From 4a1f703f1c1808d390ebf80e80659fe161f69fab Mon Sep 17 00:00:00 2001 From: Thomas Stephen Lee Date: Fri, 28 Aug 2015 16:53:23 +0530 Subject: add books --- APPLIED_PHYSICS/screenshots/1.png | Bin 0 -> 193169 bytes APPLIED_PHYSICS/screenshots/2.png | Bin 0 -> 214171 bytes APPLIED_PHYSICS/screenshots/3.png | Bin 0 -> 224469 bytes APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb | 314 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb | 322 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb | 313 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb | 304 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb | 615 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb | 615 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb | 215 + APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb | 215 + APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb | 414 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb | 414 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb | 478 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb | 478 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb | 212 + APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb | 212 + APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb | 288 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb | 288 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb | 774 ++++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb | 774 ++++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b.ipynb | 288 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb | 288 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb | 236 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb | 236 ++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb | 651 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb | 651 +++ APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt | 10 + .../screenshots/Screenshot_(1).png | Bin 0 -> 102870 bytes .../screenshots/Screenshot_(2).png | Bin 0 -> 125692 bytes .../screenshots/Screenshot_(3).png | Bin 0 -> 141180 bytes .../screenshots/CHAP2.png | Bin 0 -> 64552 bytes .../screenshots/CHAP4.png | Bin 0 -> 61201 bytes .../screenshots/CHAP5.png | Bin 0 -> 69187 bytes .../CHAPTER2.ipynb | 74 + .../CHAPTER4_1.ipynb | 290 ++ .../CHAPTER5_1.ipynb | 184 + .../CHAPTER6_1.ipynb | 391 ++ .../CHAPTER7_1.ipynb | 223 ++ .../README.txt | 10 + .../screenshots/CE_CB_Configuration_ch-2_1.png | Bin 0 -> 62709 bytes .../screenshots/dc_load_line_Chapter-2_1.png | Bin 0 -> 12440 bytes .../screenshots/gm_vs_IDSS_ch-6_1.png | Bin 0 -> 9143 bytes .../chapter11_1.ipynb | 59 + .../chapter1_1.ipynb | 655 +++ .../chapter2_1.ipynb | 774 ++++ .../chapter3_1.ipynb | 615 +++ .../chapter4_1.ipynb | 92 + .../chapter5_1.ipynb | 566 +++ .../chapter6_1.ipynb | 376 ++ .../chapter7_1.ipynb | 244 ++ .../chapter8_1.ipynb | 592 +++ .../chapter9_1.ipynb | 130 + .../screenshots/ch2.png | Bin 0 -> 97772 bytes .../screenshots/ch4.png | Bin 0 -> 77981 bytes .../screenshots/ch6.png | Bin 0 -> 83123 bytes .../ch15.ipynb | 1519 +++++++ .../ch2.ipynb | 898 +++++ .../ch4.ipynb | 316 ++ .../ch5.ipynb | 234 ++ .../ch6.ipynb | 368 ++ ...ultiplicaton_of_Algerbrraical_Expressions.ipynb | 225 ++ .../Chapter_11_Factors.ipynb | 677 ++++ .../Chapter_12_Fractions.ipynb | 454 +++ .../Chapter_13_Graphs_of_Quadratic_Functions.ipynb | 2285 +++++++++++ .../Chapter_14_Quardartic_Equations.ipynb | 509 +++ .../Chapter_16_Logarithms.ipynb | 716 ++++ .../Chapter_18_Variation.ipynb | 461 +++ .../Chapter_1_The_Meaning_of_Algebra.ipynb | 134 + ...hapter_20_Rational_and_Irrational_Numbers.ipynb | 149 + .../Chapter_21_Series.ipynb | 526 +++ ...Chapter_2_Elementry_Operations_in_Algebra.ipynb | 477 +++ ...apter_3_Brackets_and_Operations_with_Them.ipynb | 285 ++ .../Chapter_4_Positive_and_Negative_Numbers.ipynb | 66 + .../Chapter_5_Simple_Equations.ipynb | 152 + .../Chapter_7_Simultaneous_Equations.ipynb | 351 ++ ..._8_Graphical_Representation_of_Quantities.ipynb | 750 ++++ ...The_Law_of_Straight_Line_and_Co_ordinates.ipynb | 1158 ++++++ .../screenshots/cha8a.png | Bin 0 -> 36149 bytes .../screenshots/cha8b.png | Bin 0 -> 39893 bytes .../screenshots/cha8c.png | Bin 0 -> 33597 bytes .../screenshots/Chapter_01-_Special_Diodes.png | Bin 0 -> 26238 bytes .../screenshots/Chapter_02-_Frequency_Response.png | Bin 0 -> 33151 bytes .../Chapter_03-_Feedback_Amplifiers.png | Bin 0 -> 28109 bytes .../Chapter10_1.ipynb | 1 + .../Chapter11_1.ipynb | 1 + .../Chapter1_1.ipynb | 1 + .../Chapter2_1.ipynb | 1 + .../Chapter3_1.ipynb | 1 + .../Chapter4_1.ipynb | 1 + .../Chapter5_1.ipynb | 1 + .../Chapter6_1.ipynb | 1 + .../Chapter7_1.ipynb | 1 + .../Chapter8_1.ipynb | 1 + .../Chapter9_1.ipynb | 1 + Analog_Integrated_Circuits/README.txt | 10 + .../chapter2_dc_collector_current_1.png | Bin 0 -> 75376 bytes .../screenshots/chapter5_Vout_vs_time_plot_1.png | Bin 0 -> 13845 bytes .../screenshots/chapter5_vout_vs_time_1.png | Bin 0 -> 65034 bytes .../Chaper01.ipynb | 1020 +++++ .../Chaper02.ipynb | 433 ++ .../Chaper03.ipynb | 742 ++++ .../Chaper04.ipynb | 523 +++ .../Chaper05.ipynb | 440 ++ .../Chaper06.ipynb | 107 + .../Chaper07.ipynb | 674 ++++ .../Chaper08.ipynb | 175 + .../Chaper10.ipynb | 234 ++ .../screenshots/snap2.png | Bin 0 -> 40816 bytes .../screenshots/snap4.png | Bin 0 -> 17677 bytes .../screenshots/snap4_2.png | Bin 0 -> 15307 bytes .../Chapter10_1.ipynb | 220 + .../Chapter11_1.ipynb | 243 ++ .../Chapter12_1.ipynb | 55 + .../Chapter13_1.ipynb | 417 ++ .../Chapter1_1.ipynb | 417 ++ .../Chapter2_1.ipynb | 531 +++ .../Chapter3__1.ipynb | 251 ++ .../Chapter4_1.ipynb | 540 +++ .../Chapter5_1.ipynb | 701 ++++ .../Chapter6_1.ipynb | 767 ++++ .../Chapter7_1.ipynb | 323 ++ .../Chapter8_1.ipynb | 152 + .../Chapter9_1.ipynb | 958 +++++ .../screenshots/cutoff_f_6.png | Bin 0 -> 73347 bytes .../screenshots/v_cap_5.png | Bin 0 -> 48579 bytes .../screenshots/vofpropag_1.png | Bin 0 -> 83307 bytes .../chapter1.ipynb | 62 + .../chapter10.ipynb | 537 +++ .../chapter11.ipynb | 61 + .../chapter12.ipynb | 141 + .../chapter13.ipynb | 67 + .../chapter14.ipynb | 300 ++ .../chapter15.ipynb | 225 ++ .../chapter3.ipynb | 598 +++ .../chapter4.ipynb | 324 ++ .../chapter6.ipynb | 483 +++ .../chapter7.ipynb | 252 ++ .../chapter8.ipynb | 63 + .../chapter9.ipynb | 112 + .../screenshots/HPBW_FNBW_CH10.png | Bin 0 -> 90257 bytes .../screenshots/designValues_ch11.png | Bin 0 -> 63595 bytes .../screenshots/gain_fnbw_hpbw.png | Bin 0 -> 70999 bytes .../README.txt | 10 + .../chapter1.ipynb | 745 ++++ .../chapter10.ipynb | 432 ++ .../chapter3.ipynb | 698 ++++ .../chapter4.ipynb | 481 +++ .../chapter5.ipynb | 225 ++ .../chapter6.ipynb | 524 +++ .../chapter7.ipynb | 274 ++ .../chapter9.ipynb | 351 ++ Applied_Physics-I/screenshots/Capture1.png | Bin 0 -> 29809 bytes Applied_Physics-I/screenshots/Capture3.png | Bin 0 -> 31704 bytes Applied_Physics-I/screenshots/Capture4.png | Bin 0 -> 29467 bytes Applied_Physics-I_by_I_A_Shaikh/Chapter1.ipynb | 2515 ++++++++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter2_.ipynb | 853 ++++ Applied_Physics-I_by_I_A_Shaikh/Chapter2__1.ipynb | 853 ++++ Applied_Physics-I_by_I_A_Shaikh/Chapter3.ipynb | 1175 ++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter3_1.ipynb | 1175 ++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb | 1175 ++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter4.ipynb | 1309 ++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter4_1.ipynb | 1309 ++++++ Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb | 1309 ++++++ Applied_Physics-I_by_I_A_Shaikh/README.txt | 10 + Applied_Physics-I_by_I_A_Shaikh/chapter1.ipynb | 2525 ++++++++++++ Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb | 2525 ++++++++++++ Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb | 851 ++++ .../screenshots/Capture1.png | Bin 0 -> 29809 bytes .../screenshots/Capture1_1.png | Bin 0 -> 29809 bytes .../screenshots/Capture3.png | Bin 0 -> 31704 bytes .../screenshots/Capture3_1.png | Bin 0 -> 31704 bytes .../screenshots/Capture4.png | Bin 0 -> 29467 bytes .../screenshots/Capture4_1.png | Bin 0 -> 29467 bytes .../screenshots/ch1_e_accelerated.png | Bin 0 -> 105513 bytes .../screenshots/ch2_r_and__v_for_e.png | Bin 0 -> 119190 bytes .../screenshots/ch5_L-S_coupling.png | Bin 0 -> 81401 bytes .../README.txt | 10 + .../ch1.ipynb | 916 +++++ .../ch10.ipynb | 437 ++ .../ch10_1.ipynb | 437 ++ .../ch11.ipynb | 129 + .../ch11_1.ipynb | 129 + .../ch12.ipynb | 557 +++ .../ch12_1.ipynb | 557 +++ .../ch1_1.ipynb | 916 +++++ .../ch2.ipynb | 1185 ++++++ .../ch2_1.ipynb | 1185 ++++++ .../ch3.ipynb | 784 ++++ .../ch3_1.ipynb | 920 +++++ .../ch4.ipynb | 175 + .../ch4_1.ipynb | 175 + .../ch5.ipynb | 141 + .../ch5_1.ipynb | 141 + .../ch6.ipynb | 267 ++ .../ch6_1.ipynb | 267 ++ .../ch7.ipynb | 168 + .../ch7_1.ipynb | 168 + .../ch8.ipynb | 93 + .../ch8_1.ipynb | 93 + .../ch9.ipynb | 207 + .../ch9_1.ipynb | 207 + .../screenshots/ch1_e_accelerated.png | Bin 0 -> 105513 bytes .../screenshots/ch2_r_and__v_for_e.png | Bin 0 -> 119190 bytes .../screenshots/ch5_L-S_coupling.png | Bin 0 -> 81401 bytes .../chapter1.ipynb | 2820 +++++++++++++ .../chapter2.ipynb | 2884 ++++++++++++++ .../chapter3.ipynb | 798 ++++ .../chapter4.ipynb | 1093 +++++ .../screenshots/ch1.png | Bin 0 -> 89082 bytes .../screenshots/ch2.png | Bin 0 -> 78975 bytes .../screenshots/ch4.png | Bin 0 -> 63958 bytes .../ch1.ipynb | 2715 +++++++++++++ .../ch12.ipynb | 694 ++++ .../ch13.ipynb | 779 ++++ .../ch14.ipynb | 266 ++ .../ch15.ipynb | 685 ++++ .../ch2.ipynb | 510 +++ .../ch3.ipynb | 479 +++ .../ch4.ipynb | 1328 +++++++ .../ch5.ipynb | 2270 +++++++++++ .../screenshots/ch13.png | Bin 0 -> 54617 bytes .../screenshots/ch14.png | Bin 0 -> 53493 bytes .../screenshots/ch2.png | Bin 0 -> 125824 bytes .../PartBCh1.ipynb | 631 +++ .../PartBCh2.ipynb | 234 ++ .../PartBCh4.ipynb | 613 +++ .../PartBCh6.ipynb | 159 + .../ch1.ipynb | 641 +++ .../ch2.ipynb | 423 ++ .../ch3.ipynb | 651 +++ .../ch5.ipynb | 189 + .../ch6.ipynb | 320 ++ .../ch7.ipynb | 134 + .../screenshots/amptitudesvsoutputfreqB4.png | Bin 0 -> 7086 bytes .../screenshots/ch1.png | Bin 0 -> 71235 bytes .../screenshots/ch6.png | Bin 0 -> 74677 bytes C++_By_Example/README.txt | 10 + C++_By_Example/screenshots/Arrays_2.png | Bin 0 -> 32344 bytes C++_By_Example/screenshots/class_2.png | Bin 0 -> 43323 bytes C++_By_Example/screenshots/factorial_2.png | Bin 0 -> 31856 bytes C++_By_Example_by_Greg__M._Perry/Chapter1_3.ipynb | 733 ++++ C++_By_Example_by_Greg__M._Perry/Chapter2_3.ipynb | 756 ++++ C++_By_Example_by_Greg__M._Perry/Chapter3_3.ipynb | 1969 +++++++++ C++_By_Example_by_Greg__M._Perry/Chapter4_3.ipynb | 1073 +++++ C++_By_Example_by_Greg__M._Perry/Chapter5_3.ipynb | 184 + C++_By_Example_by_Greg__M._Perry/Chapter6_3.ipynb | 1457 +++++++ C++_By_Example_by_Greg__M._Perry/Chapter7_3.ipynb | 1046 +++++ .../README.txt | 10 + .../screenshots/Caption-4_1.png | Bin 0 -> 61690 bytes .../screenshots/Caption-4_2.png | Bin 0 -> 61690 bytes .../screenshots/Caption-5_1.png | Bin 0 -> 59779 bytes .../screenshots/Caption-5_2.png | Bin 0 -> 59779 bytes .../screenshots/Caption-8_1.png | Bin 0 -> 60476 bytes .../screenshots/Caption-8_2.png | Bin 0 -> 60476 bytes .../Chapter10ClassRelationships_1.ipynb | 351 ++ .../Chapter10ClassRelationships_2.ipynb | 351 ++ .../Chapter11AdvancedConcepts_1.ipynb | 1117 ++++++ .../Chapter11AdvancedConcepts_2.ipynb | 1117 ++++++ .../Chapter12theStandardLibraryinc++_1.ipynb | 584 +++ .../Chapter12theStandardLibraryinc++_2.ipynb | 584 +++ ...ter13DataStructuresandApplicationsinc++_1.ipynb | 442 +++ ...ter13DataStructuresandApplicationsinc++_2.ipynb | 442 +++ .../Chapter1Overview_1.ipynb | 123 + .../Chapter1Overview_2.ipynb | 123 + .../Chapter2DeclarationsandExpressions_1.ipynb | 244 ++ .../Chapter2DeclarationsandExpressions_2.ipynb | 244 ++ .../Chapter3Statements_1.ipynb | 635 +++ .../Chapter3Statements_2.ipynb | 635 +++ .../Chapter4Array,PointerandStructure_1.ipynb | 904 +++++ .../Chapter4Array,PointerandStructure_2.ipynb | 904 +++++ .../Chapter5Functions_1.ipynb | 842 ++++ .../Chapter5Functions_2.ipynb | 842 ++++ .../Chapter6Preprocessordirectives_1.ipynb | 149 + .../Chapter6Preprocessordirectives_2.ipynb | 149 + ...CLibraryFunctionsandStandardHeaderFiles_1.ipynb | 197 + ...CLibraryFunctionsandStandardHeaderFiles_2.ipynb | 197 + ...nthroughClassesandUser-DefinedDataTypes_1.ipynb | 809 ++++ ...nthroughClassesandUser-DefinedDataTypes_2.ipynb | 809 ++++ .../Chapter9OperatorOverloading_1.ipynb | 424 ++ .../Chapter9OperatorOverloading_2.ipynb | 424 ++ C_Programming:_A_Modern_Approach/README.txt | 10 + .../screenshots/ch11.png | Bin 0 -> 61103 bytes .../screenshots/ch20.png | Bin 0 -> 65165 bytes .../screenshots/ch5.png | Bin 0 -> 67132 bytes .../Chapter10_1.ipynb | 755 ++++ .../Chapter11_1.ipynb | 81 + .../Chapter12_1.ipynb | 71 + .../Chapter13_1.ipynb | 208 + .../Chapter15_1.ipynb | 83 + .../Chapter16_1.ipynb | 180 + .../Chapter17_1.ipynb | 390 ++ .../Chapter19_1.ipynb | 322 ++ .../Chapter20_1.ipynb | 161 + .../Chapter22_1.ipynb | 158 + .../Chapter23_1.ipynb | 127 + .../Chapter24_1.ipynb | 126 + .../Chapter26_1.ipynb | 288 ++ .../Chapter27_1.ipynb | 72 + .../Chapter2_1.ipynb | 237 ++ .../Chapter3_1.ipynb | 172 + .../Chapter4_1.ipynb | 216 + .../Chapter5_1.ipynb | 209 + .../Chapter6_1.ipynb | 503 +++ .../Chapter7_1.ipynb | 154 + .../Chapter8_1.ipynb | 288 ++ .../Chapter9_1.ipynb | 394 ++ .../hardythe1/attachment/20150521.pdf | Bin 0 -> 230939 bytes .../screenshots/ch1.png | Bin 0 -> 80229 bytes .../screenshots/ch8.png | Bin 0 -> 79322 bytes .../screenshots/pressureVSvol3.png | Bin 0 -> 11626 bytes .../README.txt | 10 + .../ch1.ipynb | 66 + .../ch2.ipynb | 360 ++ .../ch3.ipynb | 709 ++++ .../ch4.ipynb | 1364 +++++++ .../ch5.ipynb | 74 + .../ch7.ipynb | 311 ++ .../ch8.ipynb | 540 +++ .../ch9.ipynb | 684 ++++ .../README.txt | 10 + .../screenshots/ch10.png | Bin 0 -> 76459 bytes .../screenshots/ch11.png | Bin 0 -> 67082 bytes .../screenshots/ch6.png | Bin 0 -> 91374 bytes .../ch10.ipynb | 234 ++ .../ch11.ipynb | 158 + .../ch12.ipynb | 180 + .../ch13.ipynb | 268 ++ .../ch14.ipynb | 161 + .../ch15.ipynb | 203 + .../ch16.ipynb | 116 + .../ch17.ipynb | 283 ++ .../ch18.ipynb | 356 ++ .../ch19.ipynb | 107 + .../ch20.ipynb | 317 ++ .../ch21.ipynb | 270 ++ .../ch3.ipynb | 120 + .../ch4.ipynb | 119 + .../ch5.ipynb | 380 ++ .../ch6.ipynb | 365 ++ .../ch8.ipynb | 545 +++ .../ch9.ipynb | 247 ++ .../screenshots/ch1.png | Bin 0 -> 40832 bytes .../screenshots/ch2.png | Bin 0 -> 39938 bytes .../screenshots/ch4.png | Bin 0 -> 52842 bytes .../screenshots/ch4_1.png | Bin 0 -> 52842 bytes .../screenshots/ch5.png | Bin 0 -> 39165 bytes .../screenshots/ch5_1.png | Bin 0 -> 39165 bytes .../chap2.ipynb | 1 + .../chap2_(3).ipynb | 818 ++++ .../chap2_(3)_1.ipynb | 818 ++++ .../chap2_1.ipynb | 1 + .../chapter1.ipynb | 1 + .../chapter1_(3).ipynb | 394 ++ .../chapter1_(3)_1.ipynb | 394 ++ .../chapter1_1.ipynb | 1 + .../chapter3.ipynb | 144 + .../chapter3_1.ipynb | 144 + .../chapter3_2.ipynb | 1 + .../chapter3_3.ipynb | 1 + .../chapter4.ipynb | 743 ++++ .../chapter4_1.ipynb | 743 ++++ .../chapter4_2.ipynb | 1 + .../chapter4_3.ipynb | 1 + .../chapter5.ipynb | 312 ++ .../chapter5_1.ipynb | 312 ++ .../chapter5_2.ipynb | 1 + .../chapter5_3.ipynb | 1 + .../chapter6.ipynb | 1 + .../chapter6_(1).ipynb | 594 +++ .../chapter6_(1)_1.ipynb | 594 +++ .../chapter6_1.ipynb | 1 + .../screenshots/ch2.png | Bin 0 -> 39938 bytes .../screenshots/ch2_1.png | Bin 0 -> 39938 bytes .../screenshots/ch4.png | Bin 0 -> 52842 bytes .../screenshots/ch4_1.png | Bin 0 -> 52842 bytes .../screenshots/ch5.png | Bin 0 -> 39165 bytes .../screenshots/chapter5.ipynb | 312 ++ .../screenshots/chapter4.png | Bin 0 -> 187249 bytes .../screenshots/chapter8.png | Bin 0 -> 196118 bytes .../screenshots/chapter9.png | Bin 0 -> 183091 bytes .../Chapter1.ipynb | 829 ++++ .../Chapter10.ipynb | 325 ++ .../Chapter10_1.ipynb | 316 ++ .../Chapter10_2.ipynb | 316 ++ .../Chapter10_3.ipynb | 316 ++ .../Chapter10_4.ipynb | 316 ++ .../Chapter10_5.ipynb | 316 ++ .../Chapter1_1.ipynb | 811 ++++ .../Chapter1_2.ipynb | 811 ++++ .../Chapter1_3.ipynb | 811 ++++ .../Chapter1_4.ipynb | 811 ++++ .../Chapter1_5.ipynb | 811 ++++ .../Chapter2.ipynb | 281 ++ .../Chapter2_(1).ipynb | 272 ++ .../Chapter2_1.ipynb | 281 ++ .../Chapter2_2.ipynb | 272 ++ .../Chapter2_3.ipynb | 272 ++ .../Chapter2_4.ipynb | 272 ++ .../Chapter3.ipynb | 889 +++++ .../Chapter3_1.ipynb | 880 ++++ .../Chapter3_2.ipynb | 880 ++++ .../Chapter3_3.ipynb | 882 ++++ .../Chapter3_4.ipynb | 882 ++++ .../Chapter3_5.ipynb | 882 ++++ .../Chapter4.ipynb | 750 ++++ .../Chapter4_1.ipynb | 732 ++++ .../Chapter4_2.ipynb | 732 ++++ .../Chapter4_3.ipynb | 732 ++++ .../Chapter4_4.ipynb | 732 ++++ .../Chapter4_5.ipynb | 732 ++++ .../Chapter5.ipynb | 1642 ++++++++ .../Chapter5_1.ipynb | 1615 ++++++++ .../Chapter5_2.ipynb | 1615 ++++++++ .../Chapter5_3.ipynb | 1615 ++++++++ .../Chapter5_4.ipynb | 1615 ++++++++ .../Chapter5_5.ipynb | 1615 ++++++++ .../Chapter6.ipynb | 714 ++++ .../Chapter6_1.ipynb | 714 ++++ .../Chapter6_2.ipynb | 714 ++++ .../Chapter6_3.ipynb | 705 ++++ .../Chapter6_4.ipynb | 705 ++++ .../Chapter6_5.ipynb | 705 ++++ .../Chapter7.ipynb | 637 +++ .../Chapter7_(1).ipynb | 619 +++ .../Chapter7_1.ipynb | 619 +++ .../Chapter7_2.ipynb | 619 +++ .../Chapter7_3.ipynb | 619 +++ .../Chapter7_4.ipynb | 619 +++ .../Chapter8.ipynb | 918 +++++ .../Chapter8_1.ipynb | 909 +++++ .../Chapter8_2.ipynb | 909 +++++ .../Chapter8_3.ipynb | 909 +++++ .../Chapter8_4.ipynb | 909 +++++ .../Chapter8_5.ipynb | 909 +++++ .../Chapter9.ipynb | 206 + .../Chapter9_1.ipynb | 188 + .../Chapter9_2.ipynb | 188 + .../Chapter9_3.ipynb | 188 + .../Chapter9_4.ipynb | 188 + .../Chapter9_5.ipynb | 188 + .../README.txt | 10 + .../screenshots/chapter4.png | Bin 0 -> 187249 bytes .../screenshots/chapter4_1.png | Bin 0 -> 187249 bytes .../screenshots/chapter4_2.png | Bin 0 -> 187249 bytes .../screenshots/chapter8.png | Bin 0 -> 196118 bytes .../screenshots/chapter8_1.png | Bin 0 -> 196118 bytes .../screenshots/chapter8_2.png | Bin 0 -> 196118 bytes .../screenshots/chapter9.png | Bin 0 -> 183091 bytes .../screenshots/chapter9_1.png | Bin 0 -> 183091 bytes .../screenshots/chapter9_2.png | Bin 0 -> 183091 bytes .../screenshots/ch11.png | Bin 0 -> 77668 bytes .../screenshots/ch8.png | Bin 0 -> 107666 bytes .../screenshots/loadvstime2.png | Bin 0 -> 6951 bytes .../ch10.ipynb | 410 ++ .../ch11.ipynb | 606 +++ .../ch2.ipynb | 861 ++++ .../ch3.ipynb | 898 +++++ .../ch4.ipynb | 565 +++ .../ch5.ipynb | 429 ++ .../ch6.ipynb | 355 ++ .../ch7.ipynb | 751 ++++ .../ch8.ipynb | 323 ++ .../ch9.ipynb | 715 ++++ .../ch10.ipynb | 467 +++ .../ch12.ipynb | 269 ++ .../ch13.ipynb | 157 + .../ch2.ipynb | 80 + .../ch3.ipynb | 189 + .../ch4.ipynb | 1278 ++++++ .../ch5.ipynb | 992 +++++ .../ch6.ipynb | 539 +++ .../ch7.ipynb | 486 +++ .../ch8.ipynb | 130 + .../ch9.ipynb | 1218 ++++++ .../chC.ipynb | 491 +++ .../screenshots/Voltage_Time7.png | Bin 0 -> 22489 bytes .../screenshots/currentVoltageJunction7.png | Bin 0 -> 7248 bytes .../screenshots/transmissionsystem10.png | Bin 0 -> 17147 bytes .../ch2.ipynb | 1328 +++++++ .../ch3.ipynb | 1429 +++++++ .../ch4.ipynb | 1509 +++++++ .../ch5.ipynb | 989 +++++ .../screenshots/2.png | Bin 0 -> 96108 bytes .../screenshots/4.png | Bin 0 -> 80001 bytes .../screenshots/5.png | Bin 0 -> 107328 bytes .../README.txt | 10 + Electrical_Power-i_/README.txt | 10 + Electronic_Circuits/README.txt | 10 + .../screenshots/ch-3_dc_load_line.png | Bin 0 -> 15496 bytes .../screenshots/ch1_voltage_gain.png | Bin 0 -> 51516 bytes .../screenshots/ch1_voltage_gain_1.png | Bin 0 -> 51516 bytes .../screenshots/ch_3_dc_load_line.png | Bin 0 -> 15496 bytes .../screenshots/chapter3_Operating_point.png | Bin 0 -> 16722 bytes .../screenshots/chapter3_Operating_point_1.png | Bin 0 -> 16722 bytes .../Chapter1.ipynb | 1053 +++++ .../Chapter2.ipynb | 1179 ++++++ .../Chapter3.ipynb | 1812 +++++++++ .../Chapter4.ipynb | 924 +++++ .../Chapter5.ipynb | 910 +++++ .../Chapter6.ipynb | 519 +++ .../screenshots/c3.png | Bin 0 -> 15180 bytes .../screenshots/c5.png | Bin 0 -> 38721 bytes .../screenshots/c6.png | Bin 0 -> 38277 bytes Electronic_Circuits_by_P._Raja/Chapter1.ipynb | 1053 +++++ Electronic_Circuits_by_P._Raja/Chapter2.ipynb | 1179 ++++++ Electronic_Circuits_by_P._Raja/Chapter3.ipynb | 1812 +++++++++ Electronic_Circuits_by_P._Raja/Chapter4.ipynb | 924 +++++ Electronic_Circuits_by_P._Raja/Chapter5.ipynb | 910 +++++ Electronic_Circuits_by_P._Raja/Chapter6.ipynb | 519 +++ Electronic_Circuits_by_P._Raja/Chapter7.ipynb | 182 + Electronic_Circuits_by_P._Raja/chapter1.ipynb | 1053 +++++ Electronic_Circuits_by_P._Raja/chapter2.ipynb | 1179 ++++++ Electronic_Circuits_by_P._Raja/chapter3.ipynb | 1818 +++++++++ Electronic_Circuits_by_P._Raja/chapter4.ipynb | 923 +++++ Electronic_Circuits_by_P._Raja/chapter5.ipynb | 909 +++++ Electronic_Circuits_by_P._Raja/chapter6.ipynb | 517 +++ Electronic_Circuits_by_P._Raja/chapter7.ipynb | 182 + .../ch1.ipynb | 532 +++ .../ch10.ipynb | 177 + .../ch11.ipynb | 118 + .../ch12.ipynb | 755 ++++ .../ch13.ipynb | 554 +++ .../ch14.ipynb | 542 +++ .../ch15.ipynb | 337 ++ .../ch16.ipynb | 576 +++ .../ch17.ipynb | 424 ++ .../ch19.ipynb | 255 ++ .../ch2.ipynb | 550 +++ .../ch20.ipynb | 275 ++ .../ch21.ipynb | 169 + .../ch3.ipynb | 467 +++ .../ch4.ipynb | 147 + .../ch5.ipynb | 609 +++ .../ch6.ipynb | 696 ++++ .../ch7.ipynb | 871 ++++ .../ch8.ipynb | 372 ++ .../ch9.ipynb | 443 +++ .../screenshots/LinearAmplitudeSpectrum.png | Bin 0 -> 5981 bytes .../screenshots/SpectralDigram5.png | Bin 0 -> 8962 bytes .../screenshots/amplitudeSpectrum3.png | Bin 0 -> 11316 bytes Electronic_Devices_And_Circuits/README.txt | 14 +- .../screenshots/Barrier_Potential_4_9.png | Bin 0 -> 27889 bytes .../screenshots/feedback_amp_params_7_1.png | Bin 0 -> 47060 bytes .../screenshots/poential_calculation_1_4.png | Bin 0 -> 26572 bytes .../EDC_By_K_L_Kishore_Chapter_1.ipynb | 716 ++++ .../EDC_By_K_L_Kishore_Chapter_2.ipynb | 1827 +++++++++ .../EDC_By_K_L_Kishore_Chapter_3.ipynb | 689 ++++ .../EDC_By_K_L_Kishore_Chapter_4.ipynb | 816 ++++ .../EDC_By_K_L_Kishore_Chapter_5.ipynb | 743 ++++ .../EDC_By_K_L_Kishore_Chapter_6.ipynb | 328 ++ .../EDC_By_K_L_Kishore_Chapter_7.ipynb | 499 +++ .../Chapter_10_1.ipynb | 336 ++ .../Chapter_10_2.ipynb | 346 ++ .../Chapter_10_3.ipynb | 346 ++ .../Chapter_11_1.ipynb | 280 ++ .../Chapter_11_2.ipynb | 280 ++ .../Chapter_11_3.ipynb | 280 ++ .../Chapter_12_1.ipynb | 252 ++ .../Chapter_12_2.ipynb | 252 ++ .../Chapter_12_3.ipynb | 252 ++ .../Chapter_14_1.ipynb | 678 ++++ .../Chapter_14_2.ipynb | 678 ++++ .../Chapter_14_3.ipynb | 678 ++++ .../Chapter_15_1.ipynb | 354 ++ .../Chapter_15_2.ipynb | 354 ++ .../Chapter_15_3.ipynb | 354 ++ .../Chapter_18_1.ipynb | 346 ++ .../Chapter_18_2.ipynb | 346 ++ .../Chapter_18_3.ipynb | 346 ++ .../Chapter_19_1.ipynb | 1129 ++++++ .../Chapter_19_2.ipynb | 1129 ++++++ .../Chapter_19_3.ipynb | 1129 ++++++ .../Chapter_1_1.ipynb | 307 ++ .../Chapter_1_2.ipynb | 307 ++ .../Chapter_1_3.ipynb | 307 ++ .../Chapter_21_1.ipynb | 296 ++ .../Chapter_21_2.ipynb | 296 ++ .../Chapter_21_3.ipynb | 296 ++ .../Chapter_2_1.ipynb | 515 +++ .../Chapter_2_2.ipynb | 515 +++ .../Chapter_2_3.ipynb | 515 +++ .../Chapter_3_1.ipynb | 987 +++++ .../Chapter_3_2.ipynb | 1002 +++++ .../Chapter_3_3.ipynb | 1002 +++++ .../Chapter_4_1.ipynb | 825 ++++ .../Chapter_4_2.ipynb | 825 ++++ .../Chapter_4_3.ipynb | 825 ++++ .../Chapter_5_1.ipynb | 147 + .../Chapter_5_2.ipynb | 147 + .../Chapter_5_3.ipynb | 147 + .../Chapter_6_1.ipynb | 202 + .../Chapter_6_2.ipynb | 202 + .../Chapter_6_3.ipynb | 202 + .../Chapter_7_1.ipynb | 451 +++ .../Chapter_7_2.ipynb | 451 +++ .../Chapter_7_3.ipynb | 451 +++ .../Chapter_8_1.ipynb | 271 ++ .../Chapter_8_2.ipynb | 271 ++ .../Chapter_8_3.ipynb | 271 ++ .../Chapter_9_1.ipynb | 312 ++ .../Chapter_9_2.ipynb | 312 ++ .../Chapter_9_3.ipynb | 312 ++ .../README.txt | 10 + .../screenshots/Capture01.PNG | Bin 0 -> 115327 bytes .../screenshots/Capture02.PNG | Bin 0 -> 108909 bytes .../screenshots/Capture04.PNG | Bin 0 -> 115770 bytes .../screenshots/Capture04_1.PNG | Bin 0 -> 115770 bytes .../screenshots/Capture05.PNG | Bin 0 -> 107614 bytes .../screenshots/Capture05_1.PNG | Bin 0 -> 107614 bytes .../screenshots/Capture06.PNG | Bin 0 -> 88716 bytes .../screenshots/Capture06_1.PNG | Bin 0 -> 88716 bytes .../screenshots/captue03.PNG | Bin 0 -> 115422 bytes Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb | 1016 +++++ Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb | 944 +++++ Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb | 948 +++++ Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb | 209 + Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb | 902 +++++ .../screenshots/1.png | Bin 0 -> 49654 bytes .../screenshots/2.png | Bin 0 -> 43997 bytes .../screenshots/5.png | Bin 0 -> 51543 bytes .../Chapter_01.ipynb | 61 + .../Chapter_02.ipynb | 1047 +++++ .../Chapter_03.ipynb | 858 ++++ .../Chapter_04.ipynb | 256 ++ .../Chapter_05.ipynb | 638 +++ .../Chapter_06.ipynb | 607 +++ .../Chapter_07.ipynb | 1327 +++++++ .../Chapter_08.ipynb | 659 +++ .../Chapter_10.ipynb | 114 + .../screenshots/snap2.png | Bin 0 -> 54590 bytes .../screenshots/snap3.png | Bin 0 -> 48597 bytes .../screenshots/snap3_1.png | Bin 0 -> 48597 bytes .../Chapter1.ipynb | 168 + .../Chapter11.ipynb | 291 ++ .../Chapter11_1.ipynb | 291 ++ .../Chapter12.ipynb | 301 ++ .../Chapter12_1.ipynb | 301 ++ .../Chapter16.ipynb | 133 + .../Chapter16_1.ipynb | 133 + .../Chapter1_1.ipynb | 159 + .../Chapter2.ipynb | 365 ++ .../Chapter2_1.ipynb | 356 ++ .../Chapter3.ipynb | 1573 ++++++++ .../Chapter3_1.ipynb | 1573 ++++++++ .../Chapter4.ipynb | 350 ++ .../Chapter4_1.ipynb | 341 ++ .../Chapter5.ipynb | 388 ++ .../Chapter5_1.ipynb | 388 ++ .../Chapter6.ipynb | 257 ++ .../Chapter6_1.ipynb | 257 ++ .../Chapter7.ipynb | 386 ++ .../Chapter7_1.ipynb | 386 ++ .../Chapter8.ipynb | 611 +++ .../Chapter8_1.ipynb | 611 +++ .../Chapter9.ipynb | 1601 ++++++++ .../Chapter9_1.ipynb | 1601 ++++++++ .../README.txt | 10 + .../screenshots/crt.png | Bin 0 -> 13808 bytes .../screenshots/crt_1.png | Bin 0 -> 13808 bytes .../screenshots/fullwave.png | Bin 0 -> 17952 bytes .../screenshots/fullwave_1.png | Bin 0 -> 17952 bytes .../screenshots/ramp.png | Bin 0 -> 10424 bytes .../screenshots/ramp_1.png | Bin 0 -> 10424 bytes .../R.K.RAJPUTCHAPTER_12.ipynb | 300 ++ .../R.K.RAJPUTCHAPTER_8.ipynb | 113 + .../R.K.RAJPUT_CHAPTER_1_.ipynb | 3389 ++++++++++++++++ .../R.K.RAJPUT_CHAPTER_2_.ipynb | 1754 ++++++++ .../R.K.RAJPUT_CHAPTER_7.ipynb | 957 +++++ .../R.K._RAJPUT_CHAPTER_6.ipynb | 657 +++ .../R.k.Rajput5.ipynb | 168 + .../screenshots/r.k.rajput12.png | Bin 0 -> 149728 bytes .../screenshots/r.k_rajput.png | Bin 0 -> 158014 bytes .../screenshots/r.krajput.png | Bin 0 -> 173255 bytes .../screenshots/chap1_1.png | Bin 0 -> 48552 bytes .../screenshots/chap4_1.png | Bin 0 -> 47070 bytes .../screenshots/chap7_1.png | Bin 0 -> 49467 bytes .../Chapter1.ipynb | 489 +++ .../Chapter10.ipynb | 1540 +++++++ .../Chapter10_1.ipynb | 1540 +++++++ .../Chapter1_1.ipynb | 489 +++ .../Chapter2.ipynb | 262 ++ .../Chapter2_1.ipynb | 262 ++ .../Chapter3.ipynb | 418 ++ .../Chapter3_1.ipynb | 418 ++ .../Chapter4.ipynb | 296 ++ .../Chapter4_1.ipynb | 295 ++ .../Chapter6.ipynb | 296 ++ .../Chapter6_1.ipynb | 296 ++ .../Chapter7.ipynb | 1352 +++++++ .../Chapter7_1.ipynb | 1352 +++++++ .../Chapter8.ipynb | 1184 ++++++ .../Chapter8_1.ipynb | 1184 ++++++ .../Chapter9.ipynb | 1613 ++++++++ .../Chapter9_1.ipynb | 1613 ++++++++ .../README.txt | 10 + .../screenshots/chap1.png | Bin 0 -> 18555 bytes .../screenshots/chap4.png | Bin 0 -> 20098 bytes .../screenshots/chap7.png | Bin 0 -> 17464 bytes .../screenshots/Ex8.2(B.M.D).png | Bin 0 -> 9927 bytes .../screenshots/Ex8.2(S.F.D).png | Bin 0 -> 7757 bytes .../screenshots/Ex8.3(B.M.D).png | Bin 0 -> 12572 bytes .../chapter1.ipynb | 928 +++++ .../chapter10.ipynb | 426 ++ .../chapter11.ipynb | 113 + .../chapter12.ipynb | 1521 +++++++ .../chapter13.ipynb | 899 +++++ .../chapter14.ipynb | 772 ++++ .../chapter15.ipynb | 510 +++ .../chapter16.ipynb | 1911 +++++++++ .../chapter17.ipynb | 1273 ++++++ .../chapter18.ipynb | 1503 +++++++ .../chapter19.ipynb | 503 +++ .../chapter2.ipynb | 562 +++ .../chapter3.ipynb | 797 ++++ .../chapter4.ipynb | 365 ++ .../chapter5.ipynb | 799 ++++ .../chapter6.ipynb | 770 ++++ .../chapter7.ipynb | 668 ++++ .../chapter8.ipynb | 311 ++ .../chapter9.ipynb | 889 +++++ .../appendix_1.ipynb | 1002 +++++ .../appendix_10.ipynb | 1002 +++++ .../appendix_11.ipynb | 1002 +++++ .../appendix_12.ipynb | 1002 +++++ .../appendix_13.ipynb | 1002 +++++ .../appendix_14.ipynb | 1002 +++++ .../appendix_15.ipynb | 1002 +++++ .../appendix_2.ipynb | 1002 +++++ .../appendix_3.ipynb | 1002 +++++ .../appendix_4.ipynb | 1002 +++++ .../appendix_5.ipynb | 1002 +++++ .../appendix_6.ipynb | 1002 +++++ .../appendix_7.ipynb | 1002 +++++ .../appendix_8.ipynb | 1002 +++++ .../appendix_9.ipynb | 1002 +++++ .../chapter02_1.ipynb | 794 ++++ .../chapter02_10.ipynb | 794 ++++ .../chapter02_11.ipynb | 794 ++++ .../chapter02_12.ipynb | 794 ++++ .../chapter02_13.ipynb | 794 ++++ .../chapter02_14.ipynb | 794 ++++ .../chapter02_15.ipynb | 794 ++++ .../chapter02_16.ipynb | 794 ++++ .../chapter02_2.ipynb | 794 ++++ .../chapter02_3.ipynb | 794 ++++ .../chapter02_4.ipynb | 794 ++++ .../chapter02_5.ipynb | 794 ++++ .../chapter02_6.ipynb | 794 ++++ .../chapter02_7.ipynb | 794 ++++ .../chapter02_8.ipynb | 794 ++++ .../chapter02_9.ipynb | 794 ++++ .../chapter03_1.ipynb | 598 +++ .../chapter03_10.ipynb | 598 +++ .../chapter03_11.ipynb | 598 +++ .../chapter03_12.ipynb | 598 +++ .../chapter03_13.ipynb | 598 +++ .../chapter03_14.ipynb | 598 +++ .../chapter03_15.ipynb | 598 +++ .../chapter03_2.ipynb | 598 +++ .../chapter03_3.ipynb | 598 +++ .../chapter03_4.ipynb | 598 +++ .../chapter03_5.ipynb | 598 +++ .../chapter03_6.ipynb | 598 +++ .../chapter03_7.ipynb | 598 +++ .../chapter03_8.ipynb | 598 +++ .../chapter03_9.ipynb | 598 +++ .../chapter04_1.ipynb | 138 + .../chapter04_10.ipynb | 138 + .../chapter04_11.ipynb | 138 + .../chapter04_12.ipynb | 138 + .../chapter04_13.ipynb | 138 + .../chapter04_14.ipynb | 138 + .../chapter04_15.ipynb | 138 + .../chapter04_2.ipynb | 138 + .../chapter04_3.ipynb | 138 + .../chapter04_4.ipynb | 138 + .../chapter04_5.ipynb | 138 + .../chapter04_6.ipynb | 138 + .../chapter04_7.ipynb | 138 + .../chapter04_8.ipynb | 138 + .../chapter04_9.ipynb | 138 + .../chapter05_1.ipynb | 285 ++ .../chapter05_10.ipynb | 285 ++ .../chapter05_11.ipynb | 285 ++ .../chapter05_12.ipynb | 285 ++ .../chapter05_13.ipynb | 285 ++ .../chapter05_14.ipynb | 285 ++ .../chapter05_15.ipynb | 285 ++ .../chapter05_2.ipynb | 285 ++ .../chapter05_3.ipynb | 285 ++ .../chapter05_4.ipynb | 285 ++ .../chapter05_5.ipynb | 285 ++ .../chapter05_6.ipynb | 285 ++ .../chapter05_7.ipynb | 285 ++ .../chapter05_8.ipynb | 285 ++ .../chapter05_9.ipynb | 285 ++ .../chapter06_1.ipynb | 279 ++ .../chapter06_10.ipynb | 279 ++ .../chapter06_11.ipynb | 279 ++ .../chapter06_12.ipynb | 279 ++ .../chapter06_13.ipynb | 279 ++ .../chapter06_14.ipynb | 279 ++ .../chapter06_15.ipynb | 279 ++ .../chapter06_2.ipynb | 279 ++ .../chapter06_3.ipynb | 279 ++ .../chapter06_4.ipynb | 279 ++ .../chapter06_5.ipynb | 279 ++ .../chapter06_6.ipynb | 279 ++ .../chapter06_7.ipynb | 279 ++ .../chapter06_8.ipynb | 279 ++ .../chapter06_9.ipynb | 279 ++ .../chapter07_1.ipynb | 551 +++ .../chapter07_10.ipynb | 551 +++ .../chapter07_11.ipynb | 551 +++ .../chapter07_12.ipynb | 551 +++ .../chapter07_13.ipynb | 551 +++ .../chapter07_14.ipynb | 551 +++ .../chapter07_15.ipynb | 551 +++ .../chapter07_2.ipynb | 551 +++ .../chapter07_3.ipynb | 551 +++ .../chapter07_4.ipynb | 551 +++ .../chapter07_5.ipynb | 551 +++ .../chapter07_6.ipynb | 551 +++ .../chapter07_7.ipynb | 551 +++ .../chapter07_8.ipynb | 551 +++ .../chapter07_9.ipynb | 551 +++ .../chapter08_1.ipynb | 311 ++ .../chapter08_10.ipynb | 311 ++ .../chapter08_11.ipynb | 311 ++ .../chapter08_12.ipynb | 311 ++ .../chapter08_13.ipynb | 311 ++ .../chapter08_14.ipynb | 311 ++ .../chapter08_15.ipynb | 311 ++ .../chapter08_2.ipynb | 311 ++ .../chapter08_3.ipynb | 311 ++ .../chapter08_4.ipynb | 311 ++ .../chapter08_5.ipynb | 311 ++ .../chapter08_6.ipynb | 311 ++ .../chapter08_7.ipynb | 311 ++ .../chapter08_8.ipynb | 311 ++ .../chapter08_9.ipynb | 311 ++ .../chapter09_1.ipynb | 663 ++++ .../chapter09_10.ipynb | 663 ++++ .../chapter09_11.ipynb | 663 ++++ .../chapter09_12.ipynb | 663 ++++ .../chapter09_13.ipynb | 663 ++++ .../chapter09_14.ipynb | 663 ++++ .../chapter09_15.ipynb | 663 ++++ .../chapter09_2.ipynb | 663 ++++ .../chapter09_3.ipynb | 663 ++++ .../chapter09_4.ipynb | 663 ++++ .../chapter09_5.ipynb | 663 ++++ .../chapter09_6.ipynb | 663 ++++ .../chapter09_7.ipynb | 663 ++++ .../chapter09_8.ipynb | 663 ++++ .../chapter09_9.ipynb | 663 ++++ .../chapter10_1.ipynb | 378 ++ .../chapter10_10.ipynb | 378 ++ .../chapter10_11.ipynb | 378 ++ .../chapter10_12.ipynb | 378 ++ .../chapter10_13.ipynb | 378 ++ .../chapter10_14.ipynb | 378 ++ .../chapter10_15.ipynb | 378 ++ .../chapter10_2.ipynb | 378 ++ .../chapter10_3.ipynb | 378 ++ .../chapter10_4.ipynb | 378 ++ .../chapter10_5.ipynb | 378 ++ .../chapter10_6.ipynb | 378 ++ .../chapter10_7.ipynb | 378 ++ .../chapter10_8.ipynb | 378 ++ .../chapter10_9.ipynb | 378 ++ .../chapter12_1.ipynb | 411 ++ .../chapter12_10.ipynb | 411 ++ .../chapter12_11.ipynb | 411 ++ .../chapter12_12.ipynb | 411 ++ .../chapter12_13.ipynb | 411 ++ .../chapter12_14.ipynb | 411 ++ .../chapter12_2.ipynb | 411 ++ .../chapter12_3.ipynb | 411 ++ .../chapter12_4.ipynb | 411 ++ .../chapter12_5.ipynb | 411 ++ .../chapter12_6.ipynb | 411 ++ .../chapter12_7.ipynb | 411 ++ .../chapter12_8.ipynb | 411 ++ .../chapter12_9.ipynb | 411 ++ .../chapter13_1.ipynb | 121 + .../chapter13_10.ipynb | 121 + .../chapter13_11.ipynb | 121 + .../chapter13_12.ipynb | 121 + .../chapter13_13.ipynb | 121 + .../chapter13_14.ipynb | 121 + .../chapter13_2.ipynb | 121 + .../chapter13_3.ipynb | 121 + .../chapter13_4.ipynb | 121 + .../chapter13_5.ipynb | 121 + .../chapter13_6.ipynb | 121 + .../chapter13_7.ipynb | 121 + .../chapter13_8.ipynb | 121 + .../chapter13_9.ipynb | 121 + .../chapter14_1.ipynb | 1056 +++++ .../chapter14_10.ipynb | 1056 +++++ .../chapter14_11.ipynb | 1056 +++++ .../chapter14_12.ipynb | 1056 +++++ .../chapter14_13.ipynb | 1056 +++++ .../chapter14_14.ipynb | 1056 +++++ .../chapter14_2.ipynb | 1056 +++++ .../chapter14_3.ipynb | 1056 +++++ .../chapter14_4.ipynb | 1056 +++++ .../chapter14_5.ipynb | 1056 +++++ .../chapter14_6.ipynb | 1056 +++++ .../chapter14_7.ipynb | 1056 +++++ .../chapter14_8.ipynb | 1056 +++++ .../chapter14_9.ipynb | 1056 +++++ .../chapter15_1.ipynb | 775 ++++ .../chapter15_10.ipynb | 775 ++++ .../chapter15_11.ipynb | 775 ++++ .../chapter15_12.ipynb | 775 ++++ .../chapter15_13.ipynb | 775 ++++ .../chapter15_14.ipynb | 775 ++++ .../chapter15_2.ipynb | 775 ++++ .../chapter15_3.ipynb | 775 ++++ .../chapter15_4.ipynb | 775 ++++ .../chapter15_5.ipynb | 775 ++++ .../chapter15_6.ipynb | 775 ++++ .../chapter15_7.ipynb | 775 ++++ .../chapter15_8.ipynb | 775 ++++ .../chapter15_9.ipynb | 775 ++++ .../chapter16_1.ipynb | 471 +++ .../chapter16_10.ipynb | 471 +++ .../chapter16_11.ipynb | 471 +++ .../chapter16_12.ipynb | 471 +++ .../chapter16_13.ipynb | 471 +++ .../chapter16_14.ipynb | 471 +++ .../chapter16_2.ipynb | 471 +++ .../chapter16_3.ipynb | 471 +++ .../chapter16_4.ipynb | 471 +++ .../chapter16_5.ipynb | 471 +++ .../chapter16_6.ipynb | 471 +++ .../chapter16_7.ipynb | 471 +++ .../chapter16_8.ipynb | 471 +++ .../chapter16_9.ipynb | 471 +++ .../chapter17_1.ipynb | 342 ++ .../chapter17_10.ipynb | 342 ++ .../chapter17_11.ipynb | 342 ++ .../chapter17_12.ipynb | 342 ++ .../chapter17_13.ipynb | 342 ++ .../chapter17_14.ipynb | 342 ++ .../chapter17_2.ipynb | 342 ++ .../chapter17_3.ipynb | 342 ++ .../chapter17_4.ipynb | 342 ++ .../chapter17_5.ipynb | 342 ++ .../chapter17_6.ipynb | 342 ++ .../chapter17_7.ipynb | 342 ++ .../chapter17_8.ipynb | 342 ++ .../chapter17_9.ipynb | 342 ++ .../chapter18_1.ipynb | 620 +++ .../chapter18_10.ipynb | 620 +++ .../chapter18_11.ipynb | 620 +++ .../chapter18_12.ipynb | 620 +++ .../chapter18_13.ipynb | 620 +++ .../chapter18_14.ipynb | 620 +++ .../chapter18_2.ipynb | 620 +++ .../chapter18_3.ipynb | 620 +++ .../chapter18_4.ipynb | 620 +++ .../chapter18_5.ipynb | 620 +++ .../chapter18_6.ipynb | 620 +++ .../chapter18_7.ipynb | 620 +++ .../chapter18_8.ipynb | 620 +++ .../chapter18_9.ipynb | 620 +++ .../chapter19_1.ipynb | 262 ++ .../chapter19_10.ipynb | 262 ++ .../chapter19_11.ipynb | 262 ++ .../chapter19_12.ipynb | 262 ++ .../chapter19_13.ipynb | 262 ++ .../chapter19_14.ipynb | 262 ++ .../chapter19_2.ipynb | 262 ++ .../chapter19_3.ipynb | 262 ++ .../chapter19_4.ipynb | 262 ++ .../chapter19_5.ipynb | 262 ++ .../chapter19_6.ipynb | 262 ++ .../chapter19_7.ipynb | 262 ++ .../chapter19_8.ipynb | 262 ++ .../chapter19_9.ipynb | 262 ++ .../chapter20_1.ipynb | 546 +++ .../chapter20_10.ipynb | 546 +++ .../chapter20_11.ipynb | 546 +++ .../chapter20_12.ipynb | 546 +++ .../chapter20_13.ipynb | 546 +++ .../chapter20_14.ipynb | 546 +++ .../chapter20_2.ipynb | 546 +++ .../chapter20_3.ipynb | 546 +++ .../chapter20_4.ipynb | 546 +++ .../chapter20_5.ipynb | 546 +++ .../chapter20_6.ipynb | 546 +++ .../chapter20_7.ipynb | 546 +++ .../chapter20_8.ipynb | 546 +++ .../chapter20_9.ipynb | 546 +++ .../chapter21_1.ipynb | 658 +++ .../chapter21_10.ipynb | 658 +++ .../chapter21_11.ipynb | 658 +++ .../chapter21_12.ipynb | 658 +++ .../chapter21_13.ipynb | 658 +++ .../chapter21_14.ipynb | 658 +++ .../chapter21_2.ipynb | 658 +++ .../chapter21_3.ipynb | 658 +++ .../chapter21_4.ipynb | 658 +++ .../chapter21_5.ipynb | 658 +++ .../chapter21_6.ipynb | 658 +++ .../chapter21_7.ipynb | 658 +++ .../chapter21_8.ipynb | 658 +++ .../chapter21_9.ipynb | 658 +++ .../chapter22_1.ipynb | 282 ++ .../chapter22_10.ipynb | 282 ++ .../chapter22_11.ipynb | 282 ++ .../chapter22_12.ipynb | 282 ++ .../chapter22_13.ipynb | 282 ++ .../chapter22_14.ipynb | 282 ++ .../chapter22_2.ipynb | 282 ++ .../chapter22_3.ipynb | 282 ++ .../chapter22_4.ipynb | 282 ++ .../chapter22_5.ipynb | 282 ++ .../chapter22_6.ipynb | 282 ++ .../chapter22_7.ipynb | 282 ++ .../chapter22_8.ipynb | 282 ++ .../chapter22_9.ipynb | 282 ++ .../chapter23_1.ipynb | 74 + .../chapter23_10.ipynb | 74 + .../chapter23_11.ipynb | 74 + .../chapter23_12.ipynb | 74 + .../chapter23_13.ipynb | 74 + .../chapter23_14.ipynb | 74 + .../chapter23_2.ipynb | 74 + .../chapter23_3.ipynb | 74 + .../chapter23_4.ipynb | 74 + .../chapter23_5.ipynb | 74 + .../chapter23_6.ipynb | 74 + .../chapter23_7.ipynb | 74 + .../chapter23_8.ipynb | 74 + .../chapter23_9.ipynb | 74 + .../chapter24_1.ipynb | 349 ++ .../chapter24_10.ipynb | 349 ++ .../chapter24_11.ipynb | 349 ++ .../chapter24_12.ipynb | 349 ++ .../chapter24_13.ipynb | 349 ++ .../chapter24_14.ipynb | 349 ++ .../chapter24_2.ipynb | 349 ++ .../chapter24_3.ipynb | 349 ++ .../chapter24_4.ipynb | 349 ++ .../chapter24_5.ipynb | 349 ++ .../chapter24_6.ipynb | 349 ++ .../chapter24_7.ipynb | 349 ++ .../chapter24_8.ipynb | 349 ++ .../chapter24_9.ipynb | 349 ++ .../chapter25_1.ipynb | 217 + .../chapter25_10.ipynb | 217 + .../chapter25_11.ipynb | 217 + .../chapter25_12.ipynb | 217 + .../chapter25_13.ipynb | 217 + .../chapter25_14.ipynb | 217 + .../chapter25_2.ipynb | 217 + .../chapter25_3.ipynb | 217 + .../chapter25_4.ipynb | 217 + .../chapter25_5.ipynb | 217 + .../chapter25_6.ipynb | 217 + .../chapter25_7.ipynb | 217 + .../chapter25_8.ipynb | 217 + .../chapter25_9.ipynb | 217 + .../screenshots/bending_moment_diagram_.png | Bin 0 -> 29462 bytes .../screenshots/shear_force_diagram_.png | Bin 0 -> 25555 bytes .../screenshots/shear_force_diagram_1.png | Bin 0 -> 31916 bytes Engineering_Physics/screenshots/chap2.png | Bin 0 -> 36161 bytes Engineering_Physics/screenshots/chap4.png | Bin 0 -> 66867 bytes Engineering_Physics/screenshots/chap5.png | Bin 0 -> 50941 bytes .../Chapter3.ipynb | 57 + .../Chapter1.ipynb | 684 ++++ .../Chapter10.ipynb | 627 +++ .../Chapter11.ipynb | 613 +++ .../Chapter12.ipynb | 351 ++ .../Chapter13.ipynb | 243 ++ .../Chapter15.ipynb | 71 + .../Chapter2.ipynb | 156 + .../Chapter3.ipynb | 1072 +++++ .../Chapter4.ipynb | 499 +++ .../Chapter5.ipynb | 193 + .../Chapter6.ipynb | 267 ++ .../Chapter7.ipynb | 781 ++++ .../Chapter8.ipynb | 669 ++++ .../Chapter9.ipynb | 585 +++ Engineering_Physics_by_G._Vijayakumari/README.txt | 10 + .../screenshots/11.png | Bin 0 -> 29561 bytes .../screenshots/22.png | Bin 0 -> 40473 bytes .../screenshots/33.png | Bin 0 -> 37318 bytes .../Chapter10_1.ipynb | 410 ++ .../Chapter10_2.ipynb | 410 ++ .../Chapter11_1.ipynb | 529 +++ .../Chapter11_2.ipynb | 529 +++ .../Chapter12_1.ipynb | 159 + .../Chapter12_2.ipynb | 159 + .../Chapter13_1.ipynb | 274 ++ .../Chapter13_2.ipynb | 274 ++ .../Chapter14_1.ipynb | 281 ++ .../Chapter14_2.ipynb | 281 ++ .../Chapter1_1.ipynb | 209 + .../Chapter1_2.ipynb | 209 + .../Chapter2_1.ipynb | 559 +++ .../Chapter2_2.ipynb | 559 +++ .../Chapter3_1.ipynb | 249 ++ .../Chapter3_2.ipynb | 249 ++ .../Chapter4_1.ipynb | 203 + .../Chapter4_2.ipynb | 203 + .../Chapter5_1.ipynb | 238 ++ .../Chapter5_2.ipynb | 238 ++ .../Chapter6_1.ipynb | 603 +++ .../Chapter6_2.ipynb | 603 +++ .../Chapter7_1.ipynb | 212 + .../Chapter7_2.ipynb | 212 + .../Chapter8_1.ipynb | 873 ++++ .../Chapter8_2.ipynb | 873 ++++ .../Chapter9_1.ipynb | 195 + .../Chapter9_2.ipynb | 195 + Engineering_Physics_by_P.K.Palanisamy/README.txt | 10 + .../screenshots/chapter2.png | Bin 0 -> 73205 bytes .../screenshots/chapter6.png | Bin 0 -> 60406 bytes .../screenshots/chapter9.png | Bin 0 -> 61419 bytes .../Chapter1.ipynb | 221 ++ .../Chapter10.ipynb | 421 ++ .../Chapter10_1.ipynb | 421 ++ .../Chapter10_2.ipynb | 421 ++ .../Chapter11.ipynb | 503 +++ .../Chapter11_1.ipynb | 503 +++ .../Chapter11_2.ipynb | 503 +++ .../Chapter12.ipynb | 244 ++ .../Chapter12_1.ipynb | 244 ++ .../Chapter12_2.ipynb | 244 ++ .../Chapter13.ipynb | 347 ++ .../Chapter13_1.ipynb | 347 ++ .../Chapter13_2.ipynb | 347 ++ .../Chapter14.ipynb | 252 ++ .../Chapter14_1.ipynb | 252 ++ .../Chapter14_2.ipynb | 252 ++ .../Chapter15.ipynb | 236 ++ .../Chapter15_1.ipynb | 236 ++ .../Chapter15_2.ipynb | 236 ++ .../Chapter16.ipynb | 462 +++ .../Chapter16_1.ipynb | 462 +++ .../Chapter16_2.ipynb | 462 +++ .../Chapter1_1.ipynb | 221 ++ .../Chapter1_2.ipynb | 221 ++ .../Chapter2.ipynb | 935 +++++ .../Chapter2_1.ipynb | 935 +++++ .../Chapter2_2.ipynb | 935 +++++ .../Chapter3.ipynb | 650 +++ .../Chapter3_1.ipynb | 650 +++ .../Chapter3_2.ipynb | 650 +++ .../Chapter4.ipynb | 369 ++ .../Chapter4_1.ipynb | 369 ++ .../Chapter4_2.ipynb | 369 ++ .../Chapter5.ipynb | 237 ++ .../Chapter5_1.ipynb | 237 ++ .../Chapter5_2.ipynb | 237 ++ .../Chapter6.ipynb | 664 ++++ .../Chapter6_1.ipynb | 664 ++++ .../Chapter6_2.ipynb | 664 ++++ .../Chapter7.ipynb | 194 + .../Chapter7_1.ipynb | 194 + .../Chapter7_2.ipynb | 194 + .../Chapter8.ipynb | 526 +++ .../Chapter8_1.ipynb | 526 +++ .../Chapter8_2.ipynb | 526 +++ .../Chapter9.ipynb | 164 + .../Chapter9_1.ipynb | 164 + .../Chapter9_2.ipynb | 164 + .../README.txt | 10 + .../screenshots/chap15.png | Bin 0 -> 31248 bytes .../screenshots/chap15_1.png | Bin 0 -> 31248 bytes .../screenshots/chap2.png | Bin 0 -> 36161 bytes .../screenshots/chap2_1.png | Bin 0 -> 36161 bytes .../screenshots/chap4.png | Bin 0 -> 66867 bytes .../screenshots/chap4_1.png | Bin 0 -> 38327 bytes .../Chapter10_1.ipynb | 112 + .../Chapter11_1.ipynb | 549 +++ .../Chapter14_1.ipynb | 494 +++ .../Chapter1_1.ipynb | 284 ++ .../Chapter2_1.ipynb | 271 ++ .../Chapter3_1.ipynb | 658 +++ .../Chapter4_1.ipynb | 578 +++ .../Chapter5_1.ipynb | 566 +++ .../Chapter6_1.ipynb | 541 +++ .../Chapter7_1.ipynb | 442 +++ .../Chapter8_1.ipynb | 691 ++++ .../Chapter9_1.ipynb | 305 ++ Engineering_Physics_by_S._Mani_Naidu/README.txt | 10 + .../screenshots/11.png | Bin 0 -> 37550 bytes .../screenshots/22.png | Bin 0 -> 34695 bytes .../screenshots/33.png | Bin 0 -> 36834 bytes .../chapter1.ipynb | 807 ++++ .../chapter10.ipynb | 130 + .../chapter11.ipynb | 151 + .../chapter12.ipynb | 2105 ++++++++++ .../chapter13.ipynb | 223 ++ .../chapter2.ipynb | 426 ++ .../chapter3.ipynb | 359 ++ .../chapter4.ipynb | 158 + .../chapter5.ipynb | 101 + .../chapter6.ipynb | 863 ++++ .../chapter7.ipynb | 153 + .../chapter9.ipynb | 1183 ++++++ .../screenshots/Capture1.png | Bin 0 -> 23094 bytes .../screenshots/Capture3.png | Bin 0 -> 23492 bytes .../screenshots/Capture4.png | Bin 0 -> 15598 bytes Fluid_Mechanics/screenshots/ch11.png | Bin 0 -> 70706 bytes Fluid_Mechanics/screenshots/ch3.png | Bin 0 -> 67888 bytes Fluid_Mechanics/screenshots/ch5.png | Bin 0 -> 69757 bytes .../README.txt | 10 + .../ch11.ipynb | 629 +++ .../ch2.ipynb | 315 ++ .../ch3.ipynb | 1124 ++++++ .../ch4.ipynb | 648 +++ .../ch5.ipynb | 1167 ++++++ .../ch6.ipynb | 899 +++++ .../ch7.ipynb | 1155 ++++++ .../README.txt | 10 + Fundamentals_Of_Physical_Chemistry/README.txt | 10 + .../screenshots/ch10.png | Bin 0 -> 133987 bytes .../screenshots/ch10_1.png | Bin 0 -> 133987 bytes .../screenshots/ch5.png | Bin 0 -> 123310 bytes .../screenshots/ch5_1.png | Bin 0 -> 123310 bytes .../screenshots/ch9.png | Bin 0 -> 94159 bytes .../screenshots/ch9_1.png | Bin 0 -> 94159 bytes .../ch10.ipynb | 141 + .../ch10_1.ipynb | 141 + .../ch10_2.ipynb | 141 + .../ch11.ipynb | 318 ++ .../ch11_1.ipynb | 318 ++ .../ch11_2.ipynb | 318 ++ .../ch2.ipynb | 580 +++ .../ch2_1.ipynb | 580 +++ .../ch2_2.ipynb | 580 +++ .../ch3.ipynb | 878 ++++ .../ch3_1.ipynb | 878 ++++ .../ch3_2.ipynb | 878 ++++ .../ch4.ipynb | 773 ++++ .../ch4_1.ipynb | 773 ++++ .../ch4_2.ipynb | 773 ++++ .../ch5.ipynb | 429 ++ .../ch5_1.ipynb | 429 ++ .../ch5_2.ipynb | 429 ++ .../ch6.ipynb | 566 +++ .../ch6_1.ipynb | 566 +++ .../ch6_2.ipynb | 566 +++ .../ch7.ipynb | 1004 +++++ .../ch7_1.ipynb | 1004 +++++ .../ch7_2.ipynb | 1004 +++++ .../ch8.ipynb | 489 +++ .../ch8_1.ipynb | 489 +++ .../ch8_2.ipynb | 489 +++ .../ch9.ipynb | 693 ++++ .../ch9_1.ipynb | 693 ++++ .../ch9_2.ipynb | 693 ++++ .../screenshots/ch10.png | Bin 0 -> 133987 bytes .../screenshots/ch5.png | Bin 0 -> 123310 bytes .../screenshots/ch9.png | Bin 0 -> 94159 bytes High_Voltage_Engineering/screenshots/chap1.png | Bin 0 -> 74047 bytes High_Voltage_Engineering/screenshots/chap3.png | Bin 0 -> 81752 bytes High_Voltage_Engineering/screenshots/chap7.png | Bin 0 -> 66274 bytes .../screenshots/Cha_12.png | Bin 0 -> 61472 bytes .../screenshots/Cha_16.png | Bin 0 -> 40900 bytes .../screenshots/Cha_3.png | Bin 0 -> 51482 bytes .../Chapter_12_High_Voltage_cables.ipynb | 545 +++ .../Chapter_16_High_Voltage_Genration.ipynb | 758 ++++ ...f_High_Voltage_Engineering_in_Industries_.ipynb | 407 ++ .../Chapter_2_Electric_Fields.ipynb | 319 ++ ...ation_and_Deionization_Processes_in_Gases.ipynb | 717 ++++ .../Chapter_4_Electrical_Breakdown_of_Gases.ipynb | 566 +++ .../Chapter_5_The_Corona_Discharge.ipynb | 437 ++ .../Chpater_14_Overvoltages_on_Power_systems.ipynb | 83 + .../CHAPTER1.ipynb | 206 + .../CHAPTER2.ipynb | 153 + .../CHAPTER3.ipynb | 201 + .../CHAPTER4.ipynb | 305 ++ .../CHAPTER6.ipynb | 325 ++ .../CHAPTER7.ipynb | 340 ++ .../Ch_01.ipynb | 237 ++ .../Ch_02.ipynb | 293 ++ .../Ch_03.ipynb | 478 +++ .../Ch_04.ipynb | 1178 ++++++ .../Ch_05.ipynb | 1090 +++++ .../Ch_06.ipynb | 103 + .../Ch_08.ipynb | 212 + .../Ch_10.ipynb | 337 ++ .../Ch_12.ipynb | 428 ++ .../Ch_13.ipynb | 787 ++++ .../Ch_14.ipynb | 103 + .../screenshots/snap1.png | Bin 0 -> 39990 bytes .../screenshots/snap4.png | Bin 0 -> 40104 bytes .../screenshots/snap5.png | Bin 0 -> 50594 bytes Internal_Combustion_Engine_/screenshots/ch1.png | Bin 0 -> 89347 bytes Internal_Combustion_Engine_/screenshots/ch12.png | Bin 0 -> 107135 bytes Internal_Combustion_Engine_/screenshots/ch2.png | Bin 0 -> 99393 bytes .../ch1.ipynb | 377 ++ .../ch10.ipynb | 79 + .../ch11.ipynb | 555 +++ .../ch12.ipynb | 265 ++ .../ch14.ipynb | 115 + .../ch15.ipynb | 69 + .../ch16.ipynb | 85 + .../ch17.ipynb | 292 ++ .../ch18.ipynb | 1131 ++++++ .../ch2.ipynb | 1279 ++++++ .../ch26.ipynb | 663 ++++ .../ch27.ipynb | 438 ++ .../ch3.ipynb | 498 +++ .../ch5.ipynb | 73 + .../ch7.ipynb | 135 + .../ch8.ipynb | 568 +++ .../screenshots/PbarvsVm^3.png | Bin 0 -> 7744 bytes .../screenshots/TvsQc5.png | Bin 0 -> 8133 bytes .../screenshots/yivsT_K13.png | Bin 0 -> 11765 bytes .../README.txt | 10 + .../ch1.ipynb | 221 ++ .../ch10.ipynb | 875 ++++ .../ch11.ipynb | 416 ++ .../ch12.ipynb | 396 ++ .../ch13.ipynb | 1289 ++++++ .../ch14.ipynb | 689 ++++ .../ch15.ipynb | 283 ++ .../ch2.ipynb | 686 ++++ .../ch3.ipynb | 1066 +++++ .../ch4.ipynb | 441 ++ .../ch5.ipynb | 541 +++ .../ch6.ipynb | 577 +++ .../ch7.ipynb | 658 +++ .../ch8.ipynb | 184 + .../ch9.ipynb | 198 + .../screenshots/Ch2_firingAngleandEff.png | Bin 0 -> 89447 bytes .../screenshots/Ch6Requiredhp.png | Bin 0 -> 54443 bytes .../screenshots/Ch6Thermal_time_cons.png | Bin 0 -> 61710 bytes .../README.txt | 10 + .../chapter1.ipynb | 1622 ++++++++ .../chapter1_1.ipynb | 1629 ++++++++ .../chapter2.ipynb | 1212 ++++++ .../chapter2_1.ipynb | 1218 ++++++ .../chapter3.ipynb | 404 ++ .../chapter3_1.ipynb | 405 ++ .../chapter4.ipynb | 822 ++++ .../chapter4_1.ipynb | 825 ++++ .../chapter6.ipynb | 178 + .../chapter6_1.ipynb | 178 + .../screenshots/Ch2_firingAngleandEff.png | Bin 0 -> 89447 bytes .../screenshots/Ch6Requiredhp.png | Bin 0 -> 54443 bytes .../screenshots/Ch6Thermal_time_cons.png | Bin 0 -> 61710 bytes .../Chapter1.ipynb | 111 + .../Chapter10.ipynb | 870 ++++ .../Chapter11.ipynb | 235 ++ .../Chapter12.ipynb | 820 ++++ .../Chapter2.ipynb | 80 + .../Chapter3.ipynb | 447 +++ .../Chapter4.ipynb | 854 ++++ .../Chapter5.ipynb | 239 ++ .../Chapter6.ipynb | 421 ++ .../Chapter7.ipynb | 255 ++ .../Chapter8.ipynb | 581 +++ .../Chapter9.ipynb | 463 +++ .../screenshots/chapter10.png | Bin 0 -> 162301 bytes .../screenshots/chapter3.png | Bin 0 -> 178030 bytes .../screenshots/chapter4.png | Bin 0 -> 172060 bytes .../screenshots/exogeric_reaction.png | Bin 0 -> 89074 bytes .../screenshots/particles_for_reactions.png | Bin 0 -> 22118 bytes .../screenshots/vel_of_photoelectron.png | Bin 0 -> 64515 bytes .../README.txt | 10 + .../ch1.ipynb | 866 ++++ .../ch2.ipynb | 453 +++ .../ch3.ipynb | 1164 ++++++ .../ch4.ipynb | 1187 ++++++ .../ch5.ipynb | 581 +++ .../ch6.ipynb | 670 ++++ .../ch7.ipynb | 575 +++ .../ch8.ipynb | 237 ++ .../screenshots/1.png | Bin 0 -> 43157 bytes .../screenshots/3.png | Bin 0 -> 54640 bytes .../screenshots/4.png | Bin 0 -> 49301 bytes .../chapter1.ipynb | 1328 +++++++ .../chapter2.ipynb | 449 +++ .../chapter3.ipynb | 958 +++++ .../chapter4.ipynb | 336 ++ .../chapter6.ipynb | 1060 +++++ .../chapter8.ipynb | 534 +++ .../chapter9.ipynb | 146 + .../screenshots/Screenshot.png | Bin 0 -> 2002205 bytes .../screenshots/Screenshot_1.png | Bin 0 -> 2002205 bytes .../screenshots/Screenshot_2.png | Bin 0 -> 2002205 bytes .../Chapter5.ipynb | 49 + .../screenshots/ch10.png | Bin 0 -> 6194 bytes .../screenshots/ch4.png | Bin 0 -> 7480 bytes .../screenshots/ch5.png | Bin 0 -> 8229 bytes .../ch10.ipynb | 402 ++ .../ch10_1.ipynb | 403 ++ .../ch11.ipynb | 573 +++ .../ch11_1.ipynb | 573 +++ .../ch12.ipynb | 1384 +++++++ .../ch12_1.ipynb | 1384 +++++++ .../ch14.ipynb | 1965 +++++++++ .../ch14_1.ipynb | 1965 +++++++++ .../ch15.ipynb | 306 ++ .../ch15_1.ipynb | 306 ++ .../ch16.ipynb | 804 ++++ .../ch16_1.ipynb | 804 ++++ .../ch17.ipynb | 221 ++ .../ch17_1.ipynb | 221 ++ .../ch18.ipynb | 733 ++++ .../ch18_1.ipynb | 733 ++++ .../ch19.ipynb | 392 ++ .../ch19_1.ipynb | 392 ++ .../ch2.ipynb | 428 ++ .../ch20.ipynb | 142 + .../ch20_1.ipynb | 142 + .../ch21.ipynb | 180 + .../ch21_1.ipynb | 180 + .../ch2_1.ipynb | 428 ++ .../ch3.ipynb | 1440 +++++++ .../ch3_1.ipynb | 1440 +++++++ .../ch4.ipynb | 4176 +++++++++++++++++++ .../ch4_1.ipynb | 4197 ++++++++++++++++++++ .../ch5.ipynb | 1215 ++++++ .../ch5_1.ipynb | 1232 ++++++ .../ch6.ipynb | 654 +++ .../ch6_1.ipynb | 654 +++ .../ch8.ipynb | 1584 ++++++++ .../ch8_1.ipynb | 1584 ++++++++ .../screenshots/ch10.png | Bin 0 -> 6194 bytes .../screenshots/ch4.png | Bin 0 -> 7480 bytes .../screenshots/ch5.png | Bin 0 -> 8229 bytes .../chapter01.ipynb | 1109 ++++++ .../chapter02.ipynb | 432 ++ .../chapter03.ipynb | 786 ++++ .../chapter04.ipynb | 227 ++ .../chapter05.ipynb | 498 +++ .../chapter06.ipynb | 618 +++ .../chapter07.ipynb | 444 +++ .../chapter08.ipynb | 654 +++ .../chapter09.ipynb | 348 ++ .../chapter10.ipynb | 71 + .../chapter11.ipynb | 247 ++ .../screenshots/Closed_Loop_Gain.png | Bin 0 -> 65497 bytes .../screenshots/per_error.png | Bin 0 -> 65471 bytes .../screenshots/waveform.png | Bin 0 -> 42639 bytes Materials_Science/screenshots/1_converted.png | Bin 0 -> 44159 bytes Materials_Science/screenshots/2_converted.png | Bin 0 -> 47567 bytes Materials_Science/screenshots/3_converted.png | Bin 0 -> 50153 bytes .../Chapter1.ipynb | 97 + .../Chapter10.ipynb | 556 +++ .../Chapter12.ipynb | 454 +++ .../Chapter2.ipynb | 151 + .../Chapter3.ipynb | 503 +++ .../Chapter4.ipynb | 370 ++ .../Chapter5.ipynb | 303 ++ .../Chapter6.ipynb | 308 ++ .../Chapter7.ipynb | 288 ++ .../Chapter8.ipynb | 71 + .../Chapter9.ipynb | 276 ++ Mechanical_Metallurgy/screenshots/py1.png | Bin 0 -> 60344 bytes Mechanical_Metallurgy/screenshots/py3.png | Bin 0 -> 65583 bytes Mechanical_Metallurgy/screenshots/py4.png | Bin 0 -> 72777 bytes .../Chapter_1.ipynb | 73 + .../Chapter_11.ipynb | 165 + .../Chapter_12.ipynb | 346 ++ .../Chapter_13.ipynb | 181 + .../Chapter_14.ipynb | 90 + .../Chapter_15.ipynb | 294 ++ .../Chapter_16.ipynb | 131 + .../Chapter_17.ipynb | 239 ++ .../Chapter_18.ipynb | 94 + .../Chapter_19.ipynb | 145 + .../Chapter_2.ipynb | 251 ++ .../Chapter_20.ipynb | 109 + .../Chapter_21.ipynb | 252 ++ .../Chapter_3.ipynb | 212 + .../Chapter_4.ipynb | 82 + .../Chapter_5.ipynb | 74 + .../Chapter_6.ipynb | 223 ++ .../Chapter_7.ipynb | 113 + .../Chapter_8.ipynb | 255 ++ Microelectronic_Circuits/screenshots/10.3.png | Bin 0 -> 82119 bytes Microelectronic_Circuits/screenshots/5.2.png | Bin 0 -> 38520 bytes Microelectronic_Circuits/screenshots/5.4.png | Bin 0 -> 24565 bytes .../Chapter1.ipynb | 311 ++ .../Chapter10.ipynb | 291 ++ .../Chapter11.ipynb | 140 + .../Chapter12.ipynb | 66 + .../Chapter14.ipynb | 269 ++ .../Chapter2.ipynb | 135 + .../Chapter3.ipynb | 421 ++ .../Chapter4.ipynb | 606 +++ .../Chapter5.ipynb | 868 ++++ .../Chapter6.ipynb | 1095 +++++ .../Chapter7.ipynb | 474 +++ .../Chapter8.ipynb | 260 ++ .../Chapter9.ipynb | 394 ++ Microwave_and_Radar_Engineering/Chapter_10.ipynb | 562 --- Microwave_and_Radar_Engineering/Chapter_11.ipynb | 300 -- Microwave_and_Radar_Engineering/Chapter_3.ipynb | 531 --- Microwave_and_Radar_Engineering/Chapter_4.ipynb | 1203 ------ Microwave_and_Radar_Engineering/Chapter_5.ipynb | 193 - Microwave_and_Radar_Engineering/Chapter_6.ipynb | 530 --- Microwave_and_Radar_Engineering/Chapter_7.ipynb | 185 - Microwave_and_Radar_Engineering/Chapter_8.ipynb | 972 ----- Microwave_and_Radar_Engineering/Chapter_9.ipynb | 612 --- Microwave_and_Radar_Engineering/README.txt | 10 - .../screenshots/001_prithvi.png | Bin 56781 -> 0 bytes .../screenshots/002_prithvi.png | Bin 14611 -> 0 bytes .../screenshots/003_prithvi.png | Bin 13515 -> 0 bytes Microwave_and_Radar_Engineering/screenshots/s1.png | Bin 76739 -> 0 bytes Microwave_and_Radar_Engineering/screenshots/s2.png | Bin 97815 -> 0 bytes Microwave_and_Radar_Engineering/screenshots/s3.png | Bin 87347 -> 0 bytes .../screenshots/sachin1.png | Bin 0 -> 76739 bytes .../screenshots/sachin2.png | Bin 0 -> 97815 bytes .../screenshots/sachin3.png | Bin 0 -> 87347 bytes .../screenshots/ch2_normalized_freq.png | Bin 0 -> 69090 bytes .../screenshots/ch3_refractive_index.png | Bin 0 -> 66482 bytes .../screenshots/ch6_ext_eff.png | Bin 0 -> 46508 bytes .../README.txt | 10 + .../chapter1.ipynb | 196 + .../chapter1_1.ipynb | 196 + .../chapter2.ipynb | 916 +++++ .../chapter2_1.ipynb | 918 +++++ .../chapter3.ipynb | 611 +++ .../chapter3_1.ipynb | 611 +++ .../chapter5.ipynb | 92 + .../chapter5_1.ipynb | 92 + .../chapter6.ipynb | 488 +++ .../chapter6_1.ipynb | 492 +++ .../chapter7.ipynb | 289 ++ .../chapter7_1.ipynb | 289 ++ .../chapter8.ipynb | 799 ++++ .../chapter8_1.ipynb | 803 ++++ .../screenshots/ch2_normalized_freq.png | Bin 0 -> 69090 bytes .../screenshots/ch3_refractive_index.png | Bin 0 -> 66482 bytes .../screenshots/ch6_ext_eff.png | Bin 0 -> 46508 bytes Optical_fiber_communication/screenshots/plot1.png | Bin 0 -> 33867 bytes Optical_fiber_communication/screenshots/plot2.png | Bin 0 -> 42447 bytes Optical_fiber_communication/screenshots/plot3.png | Bin 0 -> 53270 bytes .../chapter1.ipynb | 251 ++ .../chapter10.ipynb | 546 +++ .../chapter11.ipynb | 416 ++ .../chapter12.ipynb | 426 ++ .../chapter13.ipynb | 288 ++ .../chapter2.ipynb | 231 ++ .../chapter3.ipynb | 358 ++ .../chapter4.ipynb | 356 ++ .../chapter5.ipynb | 270 ++ .../chapter6.ipynb | 321 ++ .../chapter7.ipynb | 287 ++ .../chapter8.ipynb | 335 ++ .../chapter9.ipynb | 203 + .../screenshots/energy_density_ch9.png | Bin 0 -> 50824 bytes .../screenshots/eqn_of_wav_prop_ch5.png | Bin 0 -> 30976 bytes .../screenshots/freq_and_time_period_ch1.png | Bin 0 -> 46830 bytes Oscillations_and_Waves_by_S._Prakash/README.txt | 10 + .../chapter1.ipynb | 849 ++++ .../chapter10.ipynb | 417 ++ .../chapter11.ipynb | 143 + .../chapter12.ipynb | 524 +++ .../chapter13.ipynb | 104 + .../chapter14.ipynb | 155 + .../chapter15.ipynb | 126 + .../chapter17.ipynb | 246 ++ .../chapter2.ipynb | 450 +++ .../chapter3.ipynb | 226 ++ .../chapter4.ipynb | 57 + .../chapter5.ipynb | 661 +++ .../chapter7.ipynb | 579 +++ .../chapter8.ipynb | 563 +++ .../chapter9.ipynb | 493 +++ Power_Electronics/Chapter10.ipynb | 228 -- Power_Electronics/Chapter10_1.ipynb | 228 -- Power_Electronics/Chapter10_2.ipynb | 228 -- Power_Electronics/Chapter10_3.ipynb | 228 -- Power_Electronics/Chapter10_4.ipynb | 228 -- Power_Electronics/Chapter11.ipynb | 299 -- Power_Electronics/Chapter11_1.ipynb | 299 -- Power_Electronics/Chapter11_2.ipynb | 299 -- Power_Electronics/Chapter11_3.ipynb | 299 -- Power_Electronics/Chapter11_4.ipynb | 299 -- Power_Electronics/Chapter12.ipynb | 1997 ---------- Power_Electronics/Chapter12_1.ipynb | 1997 ---------- Power_Electronics/Chapter12_2.ipynb | 1997 ---------- Power_Electronics/Chapter12_3.ipynb | 1997 ---------- Power_Electronics/Chapter12_4.ipynb | 1997 ---------- Power_Electronics/Chapter13.ipynb | 342 -- Power_Electronics/Chapter13_1.ipynb | 342 -- Power_Electronics/Chapter13_2.ipynb | 342 -- Power_Electronics/Chapter13_3.ipynb | 342 -- Power_Electronics/Chapter13_4.ipynb | 342 -- Power_Electronics/Chapter14.ipynb | 93 - Power_Electronics/Chapter14_1.ipynb | 93 - Power_Electronics/Chapter14_2.ipynb | 93 - Power_Electronics/Chapter14_3.ipynb | 93 - Power_Electronics/Chapter14_4.ipynb | 93 - Power_Electronics/Chapter2.ipynb | 233 -- Power_Electronics/Chapter2_1.ipynb | 233 -- Power_Electronics/Chapter2_2.ipynb | 233 -- Power_Electronics/Chapter2_3.ipynb | 233 -- Power_Electronics/Chapter2_4.ipynb | 233 -- Power_Electronics/Chapter3.ipynb | 1001 ----- Power_Electronics/Chapter3_1.ipynb | 1001 ----- Power_Electronics/Chapter3_2.ipynb | 1001 ----- Power_Electronics/Chapter3_3.ipynb | 1001 ----- Power_Electronics/Chapter3_4.ipynb | 1001 ----- Power_Electronics/Chapter4.ipynb | 946 ----- Power_Electronics/Chapter4_1.ipynb | 946 ----- Power_Electronics/Chapter4_2.ipynb | 946 ----- Power_Electronics/Chapter4_3.ipynb | 946 ----- Power_Electronics/Chapter4_4.ipynb | 946 ----- Power_Electronics/Chapter5.ipynb | 511 --- Power_Electronics/Chapter5_1.ipynb | 511 --- Power_Electronics/Chapter5_2.ipynb | 511 --- Power_Electronics/Chapter5_3.ipynb | 511 --- Power_Electronics/Chapter5_4.ipynb | 511 --- Power_Electronics/Chapter6.ipynb | 1761 -------- Power_Electronics/Chapter6_1.ipynb | 1761 -------- Power_Electronics/Chapter6_2.ipynb | 1761 -------- Power_Electronics/Chapter6_3.ipynb | 1761 -------- Power_Electronics/Chapter6_4.ipynb | 1761 -------- Power_Electronics/Chapter7.ipynb | 1036 ----- Power_Electronics/Chapter7_1.ipynb | 1036 ----- Power_Electronics/Chapter7_2.ipynb | 1036 ----- Power_Electronics/Chapter7_3.ipynb | 1036 ----- Power_Electronics/Chapter7_4.ipynb | 1036 ----- Power_Electronics/Chapter8.ipynb | 984 ----- Power_Electronics/Chapter8_1.ipynb | 984 ----- Power_Electronics/Chapter8_2.ipynb | 984 ----- Power_Electronics/Chapter8_3.ipynb | 984 ----- Power_Electronics/Chapter8_4.ipynb | 984 ----- Power_Electronics/Chapter9.ipynb | 388 -- Power_Electronics/Chapter9_1.ipynb | 388 -- Power_Electronics/Chapter9_2.ipynb | 388 -- Power_Electronics/Chapter9_3.ipynb | 388 -- Power_Electronics/Chapter9_4.ipynb | 388 -- Power_Electronics/Power_electronics_ch_1.ipynb | 449 --- Power_Electronics/Power_electronics_ch_10.ipynb | 283 -- Power_Electronics/Power_electronics_ch_10_1.ipynb | 283 -- Power_Electronics/Power_electronics_ch_10_2.ipynb | 283 -- Power_Electronics/Power_electronics_ch_10_3.ipynb | 283 -- Power_Electronics/Power_electronics_ch_12.ipynb | 1030 ----- Power_Electronics/Power_electronics_ch_12_1.ipynb | 1030 ----- Power_Electronics/Power_electronics_ch_12_2.ipynb | 1030 ----- Power_Electronics/Power_electronics_ch_12_3.ipynb | 1030 ----- Power_Electronics/Power_electronics_ch_13.ipynb | 965 ----- Power_Electronics/Power_electronics_ch_13_1.ipynb | 965 ----- Power_Electronics/Power_electronics_ch_13_2.ipynb | 965 ----- Power_Electronics/Power_electronics_ch_13_3.ipynb | 965 ----- Power_Electronics/Power_electronics_ch_1_1.ipynb | 449 --- Power_Electronics/Power_electronics_ch_1_2.ipynb | 449 --- Power_Electronics/Power_electronics_ch_1_3.ipynb | 449 --- Power_Electronics/Power_electronics_ch_2.ipynb | 2357 ----------- Power_Electronics/Power_electronics_ch_2_1.ipynb | 2357 ----------- Power_Electronics/Power_electronics_ch_2_2.ipynb | 2357 ----------- Power_Electronics/Power_electronics_ch_2_3.ipynb | 2357 ----------- Power_Electronics/Power_electronics_ch_3.ipynb | 2276 ----------- Power_Electronics/Power_electronics_ch_3_1.ipynb | 2276 ----------- Power_Electronics/Power_electronics_ch_3_2.ipynb | 2276 ----------- Power_Electronics/Power_electronics_ch_3_3.ipynb | 2276 ----------- Power_Electronics/Power_electronics_ch_4.ipynb | 983 ----- Power_Electronics/Power_electronics_ch_4_1.ipynb | 983 ----- Power_Electronics/Power_electronics_ch_4_2.ipynb | 983 ----- Power_Electronics/Power_electronics_ch_4_3.ipynb | 983 ----- Power_Electronics/Power_electronics_ch_5.ipynb | 1095 ----- Power_Electronics/Power_electronics_ch_5_1.ipynb | 1095 ----- Power_Electronics/Power_electronics_ch_5_2.ipynb | 1095 ----- Power_Electronics/Power_electronics_ch_5_3.ipynb | 1095 ----- Power_Electronics/Power_electronics_ch_6.ipynb | 852 ---- Power_Electronics/Power_electronics_ch_6_1.ipynb | 852 ---- Power_Electronics/Power_electronics_ch_6_2.ipynb | 852 ---- Power_Electronics/Power_electronics_ch_6_3.ipynb | 852 ---- Power_Electronics/Power_electronics_ch_7.ipynb | 204 - Power_Electronics/Power_electronics_ch_7_1.ipynb | 204 - Power_Electronics/Power_electronics_ch_7_2.ipynb | 204 - Power_Electronics/Power_electronics_ch_7_3.ipynb | 204 - Power_Electronics/Power_electronics_ch_8.ipynb | 576 --- Power_Electronics/Power_electronics_ch_8_1.ipynb | 576 --- Power_Electronics/Power_electronics_ch_8_2.ipynb | 576 --- Power_Electronics/Power_electronics_ch_8_3.ipynb | 576 --- Power_Electronics/Power_electronics_ch_9.ipynb | 1272 ------ Power_Electronics/Power_electronics_ch_9_1.ipynb | 1256 ------ Power_Electronics/Power_electronics_ch_9_2.ipynb | 1256 ------ Power_Electronics/Power_electronics_ch_9_3.ipynb | 1255 ------ 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 ++ Principles_Of_Heat_Transfer/screenshots/2.10.png | Bin 0 -> 34387 bytes Principles_Of_Heat_Transfer/screenshots/2.3.png | Bin 0 -> 41347 bytes Principles_Of_Heat_Transfer/screenshots/3.2.png | Bin 0 -> 34570 bytes .../Chapter_1.ipynb | 824 ++++ .../Chapter_10.ipynb | 509 +++ .../Chapter_2.ipynb | 961 +++++ .../Chapter_3.ipynb | 751 ++++ .../Chapter_4.ipynb | 228 ++ .../Chapter_5.ipynb | 499 +++ .../Chapter_6.ipynb | 623 +++ .../Chapter_7.ipynb | 653 +++ .../Chapter_8.ipynb | 465 +++ .../Chapter_9.ipynb | 1083 +++++ .../README.txt | 10 + .../ch1.ipynb | 430 ++ .../ch10.ipynb | 179 + .../ch11.ipynb | 435 ++ .../ch12.ipynb | 275 ++ .../ch13.ipynb | 457 +++ .../ch14.ipynb | 193 + .../ch15.ipynb | 172 + .../ch2.ipynb | 530 +++ .../ch3.ipynb | 181 + .../ch4.ipynb | 175 + .../ch5.ipynb | 369 ++ .../ch6.ipynb | 487 +++ .../ch7.ipynb | 149 + .../ch8.ipynb | 249 ++ .../ch9.ipynb | 255 ++ .../screenshots/TvsuT-t1.png | Bin 0 -> 5619 bytes .../screenshots/tVsut-T12.png | Bin 0 -> 6366 bytes .../screenshots/tvsV2t1.png | Bin 0 -> 8421 bytes .../hardythe1/attachment/20150521.pdf | Bin 0 -> 230939 bytes ...10_Stream_Line_Flow_and_Heat_Convection_1.ipynb | 562 +++ ...10_Stream_Line_Flow_and_Heat_Convection_2.ipynb | 562 +++ ...10_Stream_Line_Flow_and_Heat_Convection_3.ipynb | 562 +++ ...10_Stream_Line_Flow_and_Heat_Convection_4.ipynb | 562 +++ ..._Calculations_for_Process_Heat_Conditions.ipynb | 1053 +++++ ...alculations_for_Process_Heat_Conditions_1.ipynb | 1053 +++++ ...alculations_for_Process_Heat_Conditions_2.ipynb | 1053 +++++ ...alculations_for_Process_Heat_Conditions_3.ipynb | 1053 +++++ ...r_12_Condensation_of_Single_Vapours_____1.ipynb | 1339 +++++++ ...r_12_Condensation_of_Single_Vapours_____2.ipynb | 1339 +++++++ ...r_12_Condensation_of_Single_Vapours_____3.ipynb | 1339 +++++++ ...r_12_Condensation_of_Single_Vapours_____4.ipynb | 1339 +++++++ .../Chapter_14_Evapouration_1.ipynb | 1114 ++++++ .../Chapter_14_Evapouration_2.ipynb | 1114 ++++++ .../Chapter_14_Evapouration_3.ipynb | 1114 ++++++ .../Chapter_14_Evapouration_4.ipynb | 1114 ++++++ ...__Vaporizers_Evapourators_and_Reboilers_1.ipynb | 1315 ++++++ ...__Vaporizers_Evapourators_and_Reboilers_2.ipynb | 1315 ++++++ ...__Vaporizers_Evapourators_and_Reboilers_3.ipynb | 1315 ++++++ ...__Vaporizers_Evapourators_and_Reboilers_4.ipynb | 1315 ++++++ .../Chapter_16_Extented_Surfaces_1.ipynb | 1035 +++++ .../Chapter_16_Extented_Surfaces_2.ipynb | 1035 +++++ .../Chapter_16_Extented_Surfaces_3.ipynb | 1035 +++++ .../Chapter_16_Extented_Surfaces_4.ipynb | 1035 +++++ ..._Direct_Contact_Transfer__Cooling_Tower_1.ipynb | 856 ++++ ..._Direct_Contact_Transfer__Cooling_Tower_2.ipynb | 856 ++++ ..._Direct_Contact_Transfer__Cooling_Tower_3.ipynb | 856 ++++ ..._Direct_Contact_Transfer__Cooling_Tower_4.ipynb | 856 ++++ ...r_18_Batch_and_Unsteady_State_Processes_1.ipynb | 616 +++ ...r_18_Batch_and_Unsteady_State_Processes_2.ipynb | 616 +++ ...r_18_Batch_and_Unsteady_State_Processes_3.ipynb | 616 +++ ...r_18_Batch_and_Unsteady_State_Processes_4.ipynb | 616 +++ .../Chapter_19_Furnace_Calculations_1.ipynb | 390 ++ .../Chapter_19_Furnace_Calculations_2.ipynb | 390 ++ .../Chapter_19_Furnace_Calculations_3.ipynb | 390 ++ .../Chapter_19_Furnace_Calculations_4.ipynb | 390 ++ .../Chapter_20_Additoinal_Applications_1.ipynb | 886 +++++ .../Chapter_20_Additoinal_Applications_2.ipynb | 886 +++++ .../Chapter_20_Additoinal_Applications_3.ipynb | 886 +++++ .../Chapter_20_Additoinal_Applications_4.ipynb | 886 +++++ .../Chapter_2_Conduction_1.ipynb | 282 ++ .../Chapter_2_Conduction_2.ipynb | 282 ++ .../Chapter_2_Conduction_3.ipynb | 282 ++ .../Chapter_2_Conduction_4.ipynb | 282 ++ .../Chapter_4_Radiation_1.ipynb | 199 + .../Chapter_4_Radiation_2.ipynb | 199 + .../Chapter_4_Radiation_3.ipynb | 199 + .../Chapter_4_Radiation_4.ipynb | 199 + .../Chapter_5_Temperature_1.ipynb | 399 ++ .../Chapter_5_Temperature_2.ipynb | 399 ++ .../Chapter_5_Temperature_3.ipynb | 399 ++ .../Chapter_5_Temperature_4.ipynb | 399 ++ ...er_6_Counterflow_Double_Pipe_Exchangers_1.ipynb | 498 +++ ...er_6_Counterflow_Double_Pipe_Exchangers_2.ipynb | 498 +++ ...er_6_Counterflow_Double_Pipe_Exchangers_3.ipynb | 498 +++ ...er_6_Counterflow_Double_Pipe_Exchangers_4.ipynb | 498 +++ ...-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb | 1075 +++++ ...-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb | 1075 +++++ ...-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb | 1075 +++++ ...-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb | 1075 +++++ ...rrangements_for_increased_heat_recovery_1.ipynb | 414 ++ ...rrangements_for_increased_heat_recovery_2.ipynb | 414 ++ ...rrangements_for_increased_heat_recovery_3.ipynb | 414 ++ ...rrangements_for_increased_heat_recovery_4.ipynb | 414 ++ .../Chapter_9_Gases_1.ipynb | 386 ++ .../Chapter_9_Gases_2.ipynb | 386 ++ .../Chapter_9_Gases_3.ipynb | 386 ++ .../Chapter_9_Gases_4.ipynb | 386 ++ Process_Heat_Transfer_by_D._Q._Kern/README.txt | 10 + .../screenshots/CH15.png | Bin 0 -> 42298 bytes .../screenshots/CH15_1.png | Bin 0 -> 42298 bytes .../screenshots/CH15_2.png | Bin 0 -> 42298 bytes .../screenshots/CH15_3.png | Bin 0 -> 42298 bytes .../screenshots/CH16.png | Bin 0 -> 44539 bytes .../screenshots/CH16_1.png | Bin 0 -> 44539 bytes .../screenshots/CH16_2.png | Bin 0 -> 44539 bytes .../screenshots/CH16_3.png | Bin 0 -> 44539 bytes .../screenshots/CH17.png | Bin 0 -> 27401 bytes .../screenshots/CH17_1.png | Bin 0 -> 27401 bytes .../screenshots/CH17_2.png | Bin 0 -> 27401 bytes .../screenshots/CH17_3.png | Bin 0 -> 27401 bytes .../screenshots/11_1.png | Bin 0 -> 46566 bytes .../screenshots/22_1.png | Bin 0 -> 33907 bytes .../screenshots/33_1.png | Bin 0 -> 29453 bytes .../Chapter1.ipynb | 455 +++ .../Chapter10.ipynb | 659 +++ .../Chapter10_1.ipynb | 659 +++ .../Chapter11.ipynb | 765 ++++ .../Chapter11_1.ipynb | 765 ++++ .../Chapter12.ipynb | 760 ++++ .../Chapter12_1.ipynb | 760 ++++ .../Chapter13.ipynb | 1048 +++++ .../Chapter13_1.ipynb | 1048 +++++ .../Chapter14.ipynb | 714 ++++ .../Chapter14_1.ipynb | 714 ++++ .../Chapter15.ipynb | 704 ++++ .../Chapter15_1.ipynb | 703 ++++ .../Chapter16.ipynb | 565 +++ .../Chapter16_1.ipynb | 565 +++ .../Chapter17.ipynb | 506 +++ .../Chapter17_1.ipynb | 506 +++ .../Chapter18.ipynb | 823 ++++ .../Chapter18_1.ipynb | 823 ++++ .../Chapter19.ipynb | 866 ++++ .../Chapter19_1.ipynb | 866 ++++ .../Chapter1_1.ipynb | 455 +++ .../Chapter2.ipynb | 786 ++++ .../Chapter20.ipynb | 534 +++ .../Chapter20_1.ipynb | 534 +++ .../Chapter21.ipynb | 399 ++ .../Chapter21_1.ipynb | 399 ++ .../Chapter22.ipynb | 534 +++ .../Chapter22_1.ipynb | 534 +++ .../Chapter23.ipynb | 392 ++ .../Chapter23_1.ipynb | 392 ++ .../Chapter24.ipynb | 1109 ++++++ .../Chapter24_1.ipynb | 1109 ++++++ .../Chapter25.ipynb | 611 +++ .../Chapter25_1.ipynb | 611 +++ .../Chapter2_1.ipynb | 786 ++++ .../Chapter3.ipynb | 738 ++++ .../Chapter3_1.ipynb | 738 ++++ .../Chapter4.ipynb | 2803 +++++++++++++ .../Chapter4_1.ipynb | 2803 +++++++++++++ .../Chapter5.ipynb | 1841 +++++++++ .../Chapter5_1.ipynb | 1841 +++++++++ .../Chapter6.ipynb | 743 ++++ .../Chapter6_1.ipynb | 743 ++++ .../Chapter7.ipynb | 993 +++++ .../Chapter7_1.ipynb | 993 +++++ .../Chapter8.ipynb | 691 ++++ .../Chapter8_1.ipynb | 691 ++++ .../Chapter9.ipynb | 1115 ++++++ .../Chapter9_1.ipynb | 1115 ++++++ .../README.txt | 10 + .../screenshots/11q.png | Bin 0 -> 26931 bytes .../screenshots/22q.png | Bin 0 -> 29542 bytes .../screenshots/33q.png | Bin 0 -> 30366 bytes Quantum_mechanics/screenshots/image1.png | Bin 0 -> 39386 bytes Quantum_mechanics/screenshots/image2.png | Bin 0 -> 21469 bytes Quantum_mechanics/screenshots/image3.png | Bin 0 -> 24105 bytes Quantum_mechanics_by_M.C.Jain/README.txt | 10 + Quantum_mechanics_by_M.C.Jain/chapter13.ipynb | 62 + Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb | 62 + Quantum_mechanics_by_M.C.Jain/chapter2.ipynb | 710 ++++ Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb | 710 ++++ Quantum_mechanics_by_M.C.Jain/chapter3.ipynb | 519 +++ Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb | 519 +++ Quantum_mechanics_by_M.C.Jain/chapter4.ipynb | 329 ++ Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb | 329 ++ Quantum_mechanics_by_M.C.Jain/chapter5.ipynb | 294 ++ Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb | 294 ++ Quantum_mechanics_by_M.C.Jain/chapter7.ipynb | 238 ++ Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb | 238 ++ Quantum_mechanics_by_M.C.Jain/chapter8.ipynb | 269 ++ Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb | 269 ++ .../screenshots/image1.png | Bin 0 -> 39386 bytes .../screenshots/image2.png | Bin 0 -> 21469 bytes .../screenshots/image3.png | Bin 0 -> 24105 bytes .../ch10.ipynb | 148 + .../ch11.ipynb | 375 ++ .../ch12.ipynb | 596 +++ .../ch13.ipynb | 212 + .../ch2.ipynb | 773 ++++ .../ch3.ipynb | 686 ++++ .../ch4.ipynb | 434 ++ .../ch5.ipynb | 484 +++ .../ch6.ipynb | 424 ++ .../ch7.ipynb | 120 + .../ch8.ipynb | 517 +++ .../ch9.ipynb | 668 ++++ .../screenshots/S-parameters.png | Bin 0 -> 50285 bytes .../screenshots/load_imp.png | Bin 0 -> 26158 bytes .../screenshots/polarization_loss_factor.png | Bin 0 -> 55734 bytes .../screenshots/c1.png | Bin 0 -> 154342 bytes .../screenshots/c2.png | Bin 0 -> 152532 bytes .../screenshots/c3.png | Bin 0 -> 153053 bytes .../Chapter_10_Switched_Mode_Power_Supplies.ipynb | 234 ++ ...Chapter_10_Switched_Mode_Power_Supplies_1.ipynb | 234 ++ ...ter_1_Circuit_Analysis_Port_Point_of_View.ipynb | 605 +++ ...ter_1_Circuit_Analysis_Port_point_of_view.ipynb | 605 +++ .../Chapter_2_Semiconductor_Diodes.ipynb | 602 +++ .../Chapter_2_Semiconductor_Diodes_1.ipynb | 602 +++ ...TERISTICS_OF_BIPOLAR_JUNCTION_TRANSISTORS.ipynb | 760 ++++ ...teristics_of_Bipolar_Junction_Transistors.ipynb | 760 ++++ ...S_OF_FIELD_EFFECT_TRANSISTORS_AND_TRIODES.ipynb | 589 +++ ...s_of_Field_Effect_Transistors_And_Triodes.ipynb | 589 +++ .../Chapter_5_TRANSISTOR_BIAS_CONSIDERATIONS.ipynb | 502 +++ .../Chapter_5_Transistor_Bias_Considerations.ipynb | 502 +++ ..._SMALL_SIGNAL_MIDFREQUENCY_BJT_AMPLIFIERS.ipynb | 454 +++ ..._Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb | 454 +++ ...AL_MIDFREQUENCY_FET_AND_TRIODE_AMPLIFIERS.ipynb | 498 +++ ...al_Midfrequency_Fet_And_Triode_Amplifiers.ipynb | 498 +++ ...Chapter_8_FREQUENCY_EFFECTS_IN_AMPLIFIERS.ipynb | 120 + ...Chapter_8_Frequency_Effects_In_Amplifiers.ipynb | 120 + .../Chapter_9_OPERATIONAL_AMPLIFIERS.ipynb | 180 + .../Chapter_9_Operational_Amplifiers.ipynb | 180 + .../README.txt | 10 + .../screenshots/c1.png | Bin 0 -> 157485 bytes .../screenshots/c2.png | Bin 0 -> 152532 bytes .../screenshots/c3.png | Bin 0 -> 154656 bytes .../README.txt | 10 + .../README.txt | 10 + .../Ch_01.ipynb | 804 ++++ .../Ch_02.ipynb | 1586 ++++++++ .../Ch_03.ipynb | 694 ++++ .../Ch_04.ipynb | 1097 +++++ .../Ch_05.ipynb | 422 ++ .../Ch_06.ipynb | 1072 +++++ .../Ch_07.ipynb | 326 ++ .../screenshots/3.png | Bin 0 -> 37151 bytes .../screenshots/6.png | Bin 0 -> 11737 bytes .../screenshots/6_2.png | Bin 0 -> 12384 bytes .../screenshots/Cha_22.png | Bin 0 -> 45023 bytes .../screenshots/Cha_33.png | Bin 0 -> 36951 bytes .../screenshots/Cha_44.png | Bin 0 -> 32422 bytes ...substations_Equipment_and_Bus_bar_Layouts.ipynb | 75 + ...bstations_Equipment_and_Bus_bar_Layouts_1.ipynb | 66 + ...bstations_Equipment_and_Bus_bar_Layouts_2.ipynb | 66 + .../Chapter_18-b_Nutral_Grounding.ipynb | 198 + .../Chapter_18-b_Nutral_Grounding_1.ipynb | 180 + .../Chapter_18-b_Nutral_Grounding_2.ipynb | 180 + ...ter_19_Introduction_to_Fault_Calculations.ipynb | 346 ++ ...r_19_Introduction_to_Fault_Calculations_1.ipynb | 337 ++ ...r_19_Introduction_to_Fault_Calculations_2.ipynb | 337 ++ ...ical_Faults_and_Current_Limiting_Reactors.ipynb | 1358 +++++++ ...al_Faults_and_Current_Limiting_Reactors_1.ipynb | 1340 +++++++ ...al_Faults_and_Current_Limiting_Reactors_2.ipynb | 1340 +++++++ .../Chapter_21_Symmentrical_Components.ipynb | 596 +++ .../Chapter_21_Symmentrical_Components_1.ipynb | 560 +++ .../Chapter_21_Symmentrical_Components_2.ipynb | 560 +++ ...mentrical_Faults_on_an_Unloaded_Generator.ipynb | 569 +++ ...ntrical_Faults_on_an_Unloaded_Generator_1.ipynb | 551 +++ ...ntrical_Faults_on_an_Unloaded_Generator_2.ipynb | 551 +++ .../Chapter_23_Faults_on_Power_Systems.ipynb | 500 +++ .../Chapter_23_Faults_on_Power_Systems_1.ipynb | 491 +++ .../Chapter_23_Faults_on_Power_Systems_2.ipynb | 491 +++ .../Chapter_32_Protection_of_Transformers.ipynb | 121 + .../Chapter_32_Protection_of_Transformers_1.ipynb | 112 + .../Chapter_32_Protection_of_Transformers_2.ipynb | 112 + .../Chapter_33_Protection_of_Generators.ipynb | 179 + .../Chapter_33_Protection_of_Generators_1.ipynb | 179 + .../Chapter_33_Protection_of_Genrators.ipynb | 197 + ...rrent_Transformers_and_Their_Applications.ipynb | 175 + ...ent_Transformers_and_Their_Applications_1.ipynb | 166 + ...ent_Transformers_and_Their_Applications_2.ipynb | 166 + ...ltage_Transformers_and_Their_Applications.ipynb | 71 + ...age_Transformers_and_Their_Applications_1.ipynb | 62 + ...age_Transformers_and_Their_Applications_2.ipynb | 62 + ...of_Fault_Clearing_and_Switching_Phenomena.ipynb | 401 ++ ..._Fault_Clearing_and_Switching_Phenomena_1.ipynb | 392 ++ ..._Fault_Clearing_and_Switching_Phenomena_2.ipynb | 392 ++ .../Chapter_44_Power_system_Stability.ipynb | 368 ++ .../Chapter_44_Power_system_Stability_1.ipynb | 332 ++ .../Chapter_44_Power_system_Stability_2.ipynb | 332 ++ ...cy_Control,Load_sheeding_and_Static_relay.ipynb | 282 ++ ..._Control,Load_sheeding_and_Static_relay_1.ipynb | 264 ++ ..._Control,Load_sheeding_and_Static_relay_2.ipynb | 264 ++ ..._computer_Aided_Protection_and_Automation.ipynb | 205 + ...omputer_Aided_Protection_and_Automation_1.ipynb | 178 + ...omputer_Aided_Protection_and_Automation_2.ipynb | 178 + .../Chapter_57_Power_Flow_Calculations.ipynb | 507 +++ .../Chapter_57_Power_Flow_Calculations_1.ipynb | 489 +++ .../Chapter_57_Power_Flow_Calculations_2.ipynb | 489 +++ .../Chapter_58_Applications_of_Switchgear.ipynb | 74 + .../Chapter_58_Applications_of_Switchgear_1.ipynb | 65 + .../Chapter_58_Applications_of_Switchgear_2.ipynb | 65 + .../README.txt | 10 + .../screenshots/Cha_22.png | Bin 0 -> 45023 bytes .../screenshots/Cha_22_1.png | Bin 0 -> 45023 bytes .../screenshots/Cha_33.png | Bin 0 -> 36951 bytes .../screenshots/Cha_33_1.png | Bin 0 -> 36951 bytes .../screenshots/Cha_44.png | Bin 0 -> 32422 bytes .../screenshots/Cha_44_1.png | Bin 0 -> 32422 bytes Thermal_Engineering_by_K_K_Ramalingam/README.txt | 10 + Thermodynamics_and_Heat_Power/screenshots/ch1.png | Bin 0 -> 63829 bytes Thermodynamics_and_Heat_Power/screenshots/ch11.png | Bin 0 -> 98511 bytes Thermodynamics_and_Heat_Power/screenshots/ch3.png | Bin 0 -> 82001 bytes .../ch1.ipynb | 394 ++ .../ch10.ipynb | 764 ++++ .../ch11.ipynb | 1393 +++++++ .../ch2.ipynb | 562 +++ .../ch3.ipynb | 901 +++++ .../ch4.ipynb | 656 +++ .../ch5.ipynb | 1536 +++++++ .../ch6.ipynb | 1803 +++++++++ .../ch7.ipynb | 1099 +++++ .../ch8.ipynb | 697 ++++ .../ch9.ipynb | 531 +++ .../README.txt | 10 + .../current_thru_negative_booster_1.png | Bin 0 -> 48404 bytes .../screenshots/speed-armature_curve_1.png | Bin 0 -> 35729 bytes .../screenshots/speed-time_curve_1.png | Bin 0 -> 24287 bytes .../ch10_1.ipynb | 285 ++ .../ch11_1.ipynb | 401 ++ .../ch1_1.ipynb | 722 ++++ .../ch3_1.ipynb | 427 ++ .../ch4_1.ipynb | 1356 +++++++ .../ch5_1.ipynb | 111 + .../ch7_1.ipynb | 1403 +++++++ .../ch8_1.ipynb | 537 +++ .../ch9_1.ipynb | 332 ++ Wireless_Communications/README.txt | 10 + .../screenshots/CH19.png | Bin 0 -> 65819 bytes .../screenshots/CH3.png | Bin 0 -> 28671 bytes .../screenshots/CH5.png | Bin 0 -> 43930 bytes ...CHapter_17_Homogeneous_Chemical_Reactions.ipynb | 280 ++ ...apter_17_Homogeneous_Chemical_Reactions_1.ipynb | 262 ++ .../Chapter_10_Absorbption.ipynb | 255 ++ .../Chapter_10_Absorption.ipynb | 228 ++ ..._11_Mass_Transfer_in_Biology_and_Medicine.ipynb | 174 + ...1_Mass_Transfer_in_Biology_and_Medicine_1.ipynb | 156 + .../Chapter_12_Diffrential_Distillation.ipynb | 196 + .../Chapter_12_Diffrential_Distillation_1.ipynb | 178 + .../Chapter_13_Staged_Distillation.ipynb | 272 ++ .../Chapter_13_Staged_Distillation_1.ipynb | 254 ++ .../Chapter_14_Extraction.ipynb | 213 + .../Chapter_14_Extraction_1.ipynb | 159 + .../Chapter_15_Adsorption.ipynb | 210 + .../Chapter_15_Adsorption_1.ipynb | 192 + ...ions_and_Heterogeneous_Chemical_Reactions.ipynb | 124 + ...ns_and_Heterogeneous_Chemical_Reactions_1.ipynb | 115 + .../Chapter_18_Membranes.ipynb | 341 ++ .../Chapter_18_Membranes_1.ipynb | 332 ++ ..._Controlled_Release_and_Related_Phenomena.ipynb | 126 + ...ontrolled_Release_and_Related_Phenomena_1.ipynb | 108 + .../Chapter_20_Heat_Transfer.ipynb | 303 ++ .../Chapter_20_Heat_Transfer_1.ipynb | 294 ++ ...er_21_Simultaneous_Heat_and_Mass_Transfer.ipynb | 265 ++ ..._21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb | 256 ++ ...pter_3_Diffusion_in_Concentrated_Solution.ipynb | 127 + ...er_3_Diffusion_in_Concentrated_Solution_1.ipynb | 118 + .../Chapter_4_Dispersion.ipynb | 126 + .../Chapter_4_Dispersion_1.ipynb | 117 + ...Chapter_5_Values_of_Diffusion_Coefficient.ipynb | 371 ++ ...apter_5_Values_of_Diffusion_Coefficient_1.ipynb | 353 ++ ...hapter_6_Diffusion_of_Interacting_Species.ipynb | 375 ++ ...pter_6_Diffusion_of_Interacting_Species_1.ipynb | 339 ++ .../Chapter_8_Fundamentals_of_Mass_Transfer_.ipynb | 503 +++ ...hapter_8_Fundamentals_of_Mass_Transfer__1.ipynb | 494 +++ .../Chapter_9__Theories_of_Mass_Transfer.ipynb | 265 ++ .../Chapter_9__Theories_of_Mass_Transfer_1.ipynb | 238 ++ .../README.txt | 10 + .../screenshots/CH19.png | Bin 0 -> 65819 bytes .../screenshots/CH3.png | Bin 0 -> 28671 bytes .../screenshots/CH5.png | Bin 0 -> 43930 bytes .../ch1.ipynb | 575 +++ .../ch10.ipynb | 357 ++ .../ch11.ipynb | 120 + .../ch12.ipynb | 152 + .../ch2.ipynb | 393 ++ .../ch3.ipynb | 399 ++ .../ch4.ipynb | 849 ++++ .../ch5.ipynb | 488 +++ .../ch6.ipynb | 513 +++ .../ch7.ipynb | 447 +++ .../ch8.ipynb | 384 ++ .../ch9.ipynb | 510 +++ .../screenshots/energy_stored3.png | Bin 0 -> 45075 bytes .../screenshots/magnetic_flux12.png | Bin 0 -> 59969 bytes .../screenshots/pitch_factor7.png | Bin 0 -> 41344 bytes .../screenshots/Screenshot_(49).png | Bin 0 -> 147890 bytes .../screenshots/Screenshot_(50).png | Bin 0 -> 201679 bytes .../screenshots/Screenshot_(51).png | Bin 0 -> 167838 bytes .../chapter10.ipynb | 1080 +++++ .../chapter10_1.ipynb | 1080 +++++ .../chapter10_2.ipynb | 1080 +++++ .../chapter11.ipynb | 1309 ++++++ .../chapter11_1.ipynb | 1309 ++++++ .../chapter11_2.ipynb | 1309 ++++++ .../chapter12.ipynb | 818 ++++ .../chapter12_1.ipynb | 818 ++++ .../chapter12_2.ipynb | 818 ++++ .../chapter13.ipynb | 375 ++ .../chapter13_1.ipynb | 375 ++ .../chapter13_2.ipynb | 375 ++ .../chapter2.ipynb | 314 ++ .../chapter2_1.ipynb | 314 ++ .../chapter2_2.ipynb | 314 ++ .../chapter3.ipynb | 1506 +++++++ .../chapter3_1.ipynb | 1506 +++++++ .../chapter3_2.ipynb | 1506 +++++++ .../chapter4.ipynb | 1070 +++++ .../chapter4_1.ipynb | 1070 +++++ .../chapter4_2.ipynb | 1070 +++++ .../chapter5.ipynb | 1126 ++++++ .../chapter5_1.ipynb | 1126 ++++++ .../chapter5_2.ipynb | 1124 ++++++ .../chapter6.ipynb | 1390 +++++++ .../chapter6_1.ipynb | 1390 +++++++ .../chapter6_2.ipynb | 1390 +++++++ .../chapter7-Copy1.ipynb | 1452 +++++++ .../chapter7.ipynb | 1452 +++++++ .../chapter7_1.ipynb | 1452 +++++++ .../chapter8.ipynb | 2594 ++++++++++++ .../chapter8_1.ipynb | 2594 ++++++++++++ .../chapter8_2.ipynb | 2594 ++++++++++++ .../chapter9.ipynb | 1655 ++++++++ .../chapter9_1.ipynb | 1655 ++++++++ .../chapter9_2.ipynb | 1655 ++++++++ .../chapter_1.ipynb | 1777 +++++++++ .../chapter_1_1.ipynb | 1777 +++++++++ .../chapter_1_2.ipynb | 1777 +++++++++ .../screenshots/Screenshot_(49).png | Bin 0 -> 147890 bytes .../screenshots/Screenshot_(49)_1.png | Bin 0 -> 147890 bytes .../screenshots/Screenshot_(50).png | Bin 0 -> 201679 bytes .../screenshots/Screenshot_(50)_1.png | Bin 0 -> 201679 bytes .../screenshots/Screenshot_(51).png | Bin 0 -> 167838 bytes .../screenshots/Screenshot_(51)_1.png | Bin 0 -> 167838 bytes ..._10_Solid_Solutions_and_Phase_Equilibrium.ipynb | 155 + ...Strengthening_and_Eutectic_Phase_Diagrams.ipynb | 198 + ..._by_Phase_Transmission_and_Heat_Treatment.ipynb | 211 + ...13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb | 103 + .../Chapter_14_Nonferrous_Alloy.ipynb | 76 + .../Chapter_15_Ceramic_Materials.ipynb | 111 + .../Chapter_16_Polymers.ipynb | 221 ++ ...posites_Teamwork_and_Synergy_in_Materials.ipynb | 374 ++ .../Chapter_2_Atomic_Structure_.ipynb | 131 + .../Chapter_3_Atomic_and_Ionic_Arrangements.ipynb | 419 ++ ...fections_in_Atomic_and_Ionic_Arrangements.ipynb | 301 ++ ...pter_5_Atoms_and_Ion_Moments_in_Materials.ipynb | 352 ++ .../Chapter_6_Mechanical_Properties_part_one.ipynb | 292 ++ .../Chapter_7_Mechanical_Properties_part_two.ipynb | 245 ++ ...Chapter_8_Strain_Hardening_and_Annealing_.ipynb | 223 ++ .../Chapter_9_Principles_of_Solidification.ipynb | 191 + .../screenshots/cha_10.png | Bin 0 -> 99655 bytes .../screenshots/cha_11.png | Bin 0 -> 451054 bytes .../screenshots/cha_4.png | Bin 0 -> 69365 bytes _Mastering_C++/README.txt | 10 + _Mastering_C++/screenshots/1.png | Bin 0 -> 25091 bytes _Mastering_C++/screenshots/2.png | Bin 0 -> 34813 bytes _Mastering_C++/screenshots/3.png | Bin 0 -> 21509 bytes .../Chapter10-ClassesAndObjects_1.ipynb | 1241 ++++++ ...apter11-ObjectInitializationAndClean-Up_1.ipynb | 1781 +++++++++ .../Chapter12-DynamicObjects_1.ipynb | 1589 ++++++++ .../Chapter13-OperatorOverloading_1.ipynb | 2672 +++++++++++++ .../Chapter14-Inheritance_1.ipynb | 2736 +++++++++++++ .../Chapter15-VirtualFunctions_1.ipynb | 629 +++ ...apter16-GenericProgrammingWithTemplates_1.ipynb | 1512 +++++++ ...Chapter17-StreamsComputationWithConsole_1.ipynb | 1338 +++++++ .../Chapter18-StreamsComputationWithFiles_1.ipynb | 1152 ++++++ .../Chapter19-ExceptionHandling_1.ipynb | 1454 +++++++ .../Chapter2-MovingfromCtoC++.ipynb | 1389 +++++++ .../Chapter3-C++AtAGlance_1.ipynb | 629 +++ ...pter4-DataTypes,OperatorsAndExpressions_1.ipynb | 881 ++++ .../Chapter5-ControlFlow_1.ipynb | 1280 ++++++ .../Chapter6-ArraysAndStrings_1.ipynb | 1593 ++++++++ ...hapter7-ModularProgrammingWithFunctions_1.ipynb | 1641 ++++++++ .../Chapter8-StructuresAndUnions_1.ipynb | 1202 ++++++ .../Chapter9-PointersAndRuntimeBinding_1.ipynb | 1661 ++++++++ .../screenshots/Chapter01-Ex1.7.1.png | Bin 0 -> 54470 bytes .../screenshots/Chapter02-Ex2.2.1.png | Bin 0 -> 63781 bytes .../screenshots/Chapter03-Ex3.2.1.png | Bin 0 -> 55531 bytes .../screenshots/chapter2.png | Bin 0 -> 44565 bytes .../screenshots/chapter5.png | Bin 0 -> 38867 bytes .../screenshots/chapter6.png | Bin 0 -> 34694 bytes ...pter01-Fiber_Optics_Communications_System.ipynb | 1240 ++++++ ...ter02-Optical_Fiber_for_Telecommunication.ipynb | 945 +++++ ...hapter03-Optical_Sources_and_Transmitters.ipynb | 826 ++++ ...Chapter04-Optical_Detectors_and_Receivers.ipynb | 644 +++ ...05-Design_Considerations_in_Optical_Links.ipynb | 458 +++ .../Chapter1.ipynb | 1240 ++++++ .../Chapter2.ipynb | 945 +++++ .../Chapter3.ipynb | 826 ++++ .../Chapter4.ipynb | 644 +++ .../Chapter5.ipynb | 458 +++ .../Chapter6-Advanced_Optical_Systems.ipynb | 317 ++ .../Chapter6.ipynb | 317 ++ .../ch10.ipynb | 174 + .../ch2.ipynb | 528 +++ .../ch3.ipynb | 311 ++ .../ch4.ipynb | 542 +++ .../ch5.ipynb | 411 ++ .../ch6.ipynb | 394 ++ .../ch7.ipynb | 665 ++++ .../ch8.ipynb | 419 ++ .../ch9.ipynb | 174 + .../screenshots/same3_7.png | Bin 0 -> 10511 bytes .../screenshots/same7.png | Bin 0 -> 11352 bytes .../screenshots/shearAndBendingMoment7.png | Bin 0 -> 10479 bytes sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb | 149 + sample_notebooks/AdityaAnand/Chapter_8.ipynb | 390 ++ .../AdityaAnand/Chapter_8_-_Gravitation.ipynb | 390 ++ .../AdityaAnand/Chapter_8_-_Gravitation_1.ipynb | 390 ++ sample_notebooks/AjayKumar Verma/chapter4.ipynb | 413 ++ .../AjaySatish/Sample_H.S._Fogler.ipynb | 231 ++ .../AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb | 231 ++ .../Sample_H.S._Fogler_UPDATED_(1).ipynb | 191 + sample_notebooks/AkshayPatil/Chapter01.ipynb | 226 ++ sample_notebooks/AmitRasmiya/ch5.ipynb | 189 + sample_notebooks/AmitRaval/ch3.ipynb | 251 ++ sample_notebooks/AmitSexana/Ch_03.ipynb | 684 ++++ sample_notebooks/AnandMandali/ch5.ipynb | 189 + sample_notebooks/AnkitBarot/ch15.ipynb | 306 ++ sample_notebooks/BhavinPatel/ch6.ipynb | 163 + .../DeepTrambadia/Diode_Applications.ipynb | 679 ++++ sample_notebooks/DeepTrambadia/Untitled0.ipynb | 154 + sample_notebooks/DeepTrambadia/sc201.ipynb | 53 + sample_notebooks/DeepTrambadia/sc201_1.ipynb | 85 + sample_notebooks/DeepTrambadia/sc223.ipynb | 34 + sample_notebooks/DivyangGandhi/ch2.ipynb | 80 + sample_notebooks/DivyangGandhi/ch5.ipynb | 422 ++ sample_notebooks/GauravMittal/chapter2.ipynb | 349 ++ sample_notebooks/GirirajsinhDodiya/ch7.ipynb | 453 +++ sample_notebooks/GirishVora/ch2.ipynb | 428 ++ sample_notebooks/Haseen/ch4.ipynb | 376 ++ sample_notebooks/HimanshuRajput/chapter3.ipynb | 798 ++++ sample_notebooks/HirenShah/ch3.ipynb | 160 + sample_notebooks/Hrituraj/chapter6.ipynb | 395 ++ sample_notebooks/JaiMathur/ch2.ipynb | 309 ++ .../JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb | 220 + sample_notebooks/JigneshBhadani/ch5.ipynb | 2270 +++++++++++ .../KonasaniSai Dheeraj/sample(chapter_1).ipynb | 236 ++ .../KonasaniSai Dheeraj/sample_(chapter_6).ipynb | 256 ++ sample_notebooks/LalitKumar/chapter2_1.ipynb | 339 ++ .../Chapter_7_Wave_Guides.ipynb | 299 ++ sample_notebooks/MaulikRathod/ch11.ipynb | 745 ++++ sample_notebooks/MaulikRathod/ch11_1.ipynb | 573 +++ sample_notebooks/MohdAnwar/Chapter4_1.ipynb | 424 ++ sample_notebooks/MohdAsif/ch2.ipynb | 387 ++ sample_notebooks/MohdIrfan/Chapter6.ipynb | 519 +++ sample_notebooks/MohdIrfan/Chapter6_1.ipynb | 490 +++ sample_notebooks/MohdRizwan/chapter04.ipynb | 310 ++ sample_notebooks/MohdTasleem/Ch2.ipynb | 333 ++ sample_notebooks/Mohdarif/chapter9.ipynb | 445 +++ sample_notebooks/MukteshChaudhary/ch13.ipynb | 212 + sample_notebooks/NeerajBaunthiyal/chapter1.ipynb | 570 +++ sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb | 571 +++ sample_notebooks/NirenNegandhi/ch2_2.ipynb | 453 +++ sample_notebooks/Nitin Kumar/chapter12.ipynb | 471 +++ sample_notebooks/ParitoshMehta/ch1.ipynb | 466 +++ sample_notebooks/ParthThakkar/ch6.ipynb | 320 ++ sample_notebooks/PreetiRani/ch6.ipynb | 367 ++ sample_notebooks/RavirajJadeja/ch16.ipynb | 64 + sample_notebooks/RohitPhadtare/chapter_1_som.ipynb | 438 ++ .../RohithYeedulapalli/Chapter_7_1.ipynb | 236 ++ sample_notebooks/RuchiMittal/chap1.ipynb | 412 ++ sample_notebooks/SachinNaik/ch5.ipynb | 416 ++ .../Sadananda CharyArroju/Chapter1.ipynb | 412 ++ .../Sadananda CharyArroju/Chapter10.ipynb | 431 ++ .../Sadananda CharyArroju/Chapter1_1.ipynb | 412 ++ sample_notebooks/SaiRakesh/Untitled.ipynb | 1802 +++++++++ sample_notebooks/SaiRakesh/chapter_1.ipynb | 1777 +++++++++ sample_notebooks/SakshiGoplani/Sample.ipynb | 662 +++ sample_notebooks/SandeshNaik/ch8.ipynb | 237 ++ sample_notebooks/SaurabhBarot/ch2.ipynb | 510 +++ sample_notebooks/SurajAhir/ch1.ipynb | 641 +++ sample_notebooks/VaibhavShah/ch7.ipynb | 134 + sample_notebooks/VineshSaini/ch1.ipynb | 279 ++ sample_notebooks/VishalSangani/ch1.ipynb | 641 +++ .../keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb | 292 ++ ...-_Overview_of_optical_fiber_communication.ipynb | 251 ++ ...ter_2_Nuclear_Sturcture_and_Radioactivity.ipynb | 234 ++ .../Chapter_5_Imperfection_in_Solids.ipynb | 227 ++ .../Chapter_5_Imperfection_in_Solids_1.ipynb | 227 ++ .../Chapter_7_Wave_Guides.ipynb | 299 ++ .../pramodkumardesu/sample(Chapter6).ipynb | 307 ++ sample_notebooks/sanketkhair/chapter4.ipynb | 159 + sample_notebooks/srinivasparupalli/CHAPTER2.ipynb | 116 + sample_notebooks/sureshp/CHAPTER1.ipynb | 206 + .../vijayadurga/sample_(chapter_3).ipynb | 410 ++ 2294 files changed, 974211 insertions(+), 103519 deletions(-) create mode 100755 APPLIED_PHYSICS/screenshots/1.png create mode 100755 APPLIED_PHYSICS/screenshots/2.png create mode 100755 APPLIED_PHYSICS/screenshots/3.png create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb create mode 100755 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png create mode 100644 APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png create mode 100755 A_First_Course_on_Electrical_Drives/screenshots/CHAP2.png create mode 100755 A_First_Course_on_Electrical_Drives/screenshots/CHAP4.png create mode 100755 A_First_Course_on_Electrical_Drives/screenshots/CHAP5.png create mode 100755 A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER2.ipynb create mode 100755 A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER4_1.ipynb create mode 100755 A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER5_1.ipynb create mode 100755 A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER6_1.ipynb create mode 100755 A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER7_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits/README.txt create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/CE_CB_Configuration_ch-2_1.png create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/dc_load_line_Chapter-2_1.png create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/gm_vs_IDSS_ch-6_1.png create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter11_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter1_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter2_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter3_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter4_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter5_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter6_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter7_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter8_1.ipynb create mode 100755 A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter9_1.ipynb create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch2.png create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch4.png create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch6.png create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch15.ipynb create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch2.ipynb create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch4.ipynb create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch5.ipynb create mode 100755 A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch6.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png create mode 100644 Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png create mode 100755 Analog_And_Digital_Electronics/screenshots/Chapter_01-_Special_Diodes.png create mode 100755 Analog_And_Digital_Electronics/screenshots/Chapter_02-_Frequency_Response.png create mode 100755 Analog_And_Digital_Electronics/screenshots/Chapter_03-_Feedback_Amplifiers.png create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter10_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter11_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter1_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter2_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter3_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter4_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter5_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter6_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter7_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter8_1.ipynb create mode 100755 Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter9_1.ipynb create mode 100755 Analog_Integrated_Circuits/README.txt create mode 100755 Analog_Integrated_Circuits/screenshots/chapter2_dc_collector_current_1.png create mode 100755 Analog_Integrated_Circuits/screenshots/chapter5_Vout_vs_time_plot_1.png create mode 100755 Analog_Integrated_Circuits/screenshots/chapter5_vout_vs_time_1.png create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper01.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper02.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper03.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper04.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png create mode 100644 Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter11_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter12_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter13_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter1_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3__1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8_1.ipynb create mode 100755 Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9_1.ipynb create mode 100755 Antenna_and_Wave_Propagation/screenshots/cutoff_f_6.png create mode 100755 Antenna_and_Wave_Propagation/screenshots/v_cap_5.png create mode 100755 Antenna_and_Wave_Propagation/screenshots/vofpropag_1.png create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter11.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter12.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter13.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter14.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter15.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter3.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter4.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter6.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter7.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png create mode 100644 Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png create mode 100644 Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter1.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter10.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter3.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter4.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter5.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter6.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter7.ipynb create mode 100755 Antenna_and_Wave_Propagation_by_k.k._sharma/chapter9.ipynb create mode 100755 Applied_Physics-I/screenshots/Capture1.png create mode 100755 Applied_Physics-I/screenshots/Capture3.png create mode 100755 Applied_Physics-I/screenshots/Capture4.png create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter1.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter2_.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter2__1.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter3.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter3_1.ipynb create mode 100644 Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter4.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/Chapter4_1.ipynb create mode 100644 Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb create mode 100644 Applied_Physics-I_by_I_A_Shaikh/README.txt create mode 100755 Applied_Physics-I_by_I_A_Shaikh/chapter1.ipynb create mode 100644 Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb create mode 100644 Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb create mode 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1.png create mode 100644 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png create mode 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3.png create mode 100644 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png create mode 100755 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4.png create mode 100644 Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png create mode 100755 Atomic_and_Nuclear_Physics/screenshots/ch1_e_accelerated.png create mode 100755 Atomic_and_Nuclear_Physics/screenshots/ch2_r_and__v_for_e.png create mode 100755 Atomic_and_Nuclear_Physics/screenshots/ch5_L-S_coupling.png create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb create mode 100755 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png create mode 100644 Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png create mode 100644 Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png create mode 100644 Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png create mode 100644 Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png create mode 100755 C++_By_Example/README.txt create mode 100755 C++_By_Example/screenshots/Arrays_2.png create mode 100755 C++_By_Example/screenshots/class_2.png create mode 100755 C++_By_Example/screenshots/factorial_2.png create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter1_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter2_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter3_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter4_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter5_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter6_3.ipynb create mode 100755 C++_By_Example_by_Greg__M._Perry/Chapter7_3.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm/README.txt create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-4_1.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-4_2.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-5_1.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-5_2.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-8_1.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm/screenshots/Caption-8_2.png create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter10ClassRelationships_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter10ClassRelationships_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter11AdvancedConcepts_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter11AdvancedConcepts_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_2.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_1.ipynb create mode 100755 C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_2.ipynb create mode 100755 C_Programming:_A_Modern_Approach/README.txt create mode 100755 C_Programming:_A_Modern_Approach/screenshots/ch11.png create mode 100755 C_Programming:_A_Modern_Approach/screenshots/ch20.png create mode 100755 C_Programming:_A_Modern_Approach/screenshots/ch5.png create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter10_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter11_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter12_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter13_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter15_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter16_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter17_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter19_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter20_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter22_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter23_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter24_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter26_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter27_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter2_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter3_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter4_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter5_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter6_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter7_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter8_1.ipynb create mode 100755 C_Programming:_A_Modern_Approach_by_K._N._King/Chapter9_1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf create mode 100755 Chemical_Engineering_Thermodynamics/screenshots/ch1.png create mode 100755 Chemical_Engineering_Thermodynamics/screenshots/ch8.png create mode 100755 Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png create mode 100644 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch1.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch2.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch3.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch4.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch5.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch7.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch8.ipynb create mode 100755 Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch9.ipynb create mode 100644 Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch10.png create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch11.png create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch6.png create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch10.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch11.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch12.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch13.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch14.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch15.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch16.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch17.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch18.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch19.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch20.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch21.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch3.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch4.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch5.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch6.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch8.ipynb create mode 100755 Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch9.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch1.png create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch2.png create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch4.png create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch4_1.png create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch5.png create mode 100755 Discrete_Mathematics_and_its_Applications/screenshots/ch5_1.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3).ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3)_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3).ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3)_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5.ipynb create mode 100755 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.ipynb create mode 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_(1)_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.ipynb create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.png create mode 100644 Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter4.png create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter8.png create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter9.png create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb create mode 100755 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png create mode 100644 ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png create mode 100755 Electric_Power_Distribution_System_Engineering/screenshots/ch11.png create mode 100755 Electric_Power_Distribution_System_Engineering/screenshots/ch8.png create mode 100755 Electric_Power_Distribution_System_Engineering/screenshots/loadvstime2.png create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch10.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch2.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch3.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch4.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch5.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch6.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch7.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch8.ipynb create mode 100755 Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch9.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png create mode 100644 Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png create mode 100644 Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png create mode 100644 Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt create mode 100755 Electrical_Power-i_/README.txt create mode 100755 Electronic_Circuits/README.txt create mode 100755 Electronic_Circuits/screenshots/ch-3_dc_load_line.png create mode 100755 Electronic_Circuits/screenshots/ch1_voltage_gain.png create mode 100755 Electronic_Circuits/screenshots/ch1_voltage_gain_1.png create mode 100755 Electronic_Circuits/screenshots/ch_3_dc_load_line.png create mode 100755 Electronic_Circuits/screenshots/chapter3_Operating_point.png create mode 100755 Electronic_Circuits/screenshots/chapter3_Operating_point_1.png create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png create mode 100644 Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png create mode 100755 Electronic_Circuits_by_P._Raja/Chapter1.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter2.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter3.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter4.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter5.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter6.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/Chapter7.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter1.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter2.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter3.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter4.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter5.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter6.ipynb create mode 100755 Electronic_Circuits_by_P._Raja/chapter7.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png create mode 100644 Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png create mode 100755 Electronic_Devices_And_Circuits/screenshots/Barrier_Potential_4_9.png create mode 100755 Electronic_Devices_And_Circuits/screenshots/feedback_amp_params_7_1.png create mode 100755 Electronic_Devices_And_Circuits/screenshots/poential_calculation_1_4.png create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_1.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_2.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_3.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_4.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_5.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_6.ipynb create mode 100755 Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_7.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_10_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_11_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG create mode 100644 Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG create mode 100644 Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb create mode 100644 Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb create mode 100644 Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb create mode 100644 Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb create mode 100644 Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb create mode 100644 Electronic_Devices_by_K._C._Nandi/screenshots/1.png create mode 100644 Electronic_Devices_by_K._C._Nandi/screenshots/2.png create mode 100644 Electronic_Devices_by_K._C._Nandi/screenshots/5.png create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png create mode 100644 Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png create mode 100644 Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png create mode 100644 Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap1_1.png create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap4_1.png create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap7_1.png create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb create mode 100755 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png create mode 100644 Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png create mode 100755 Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(B.M.D).png create mode 100755 Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(S.F.D).png create mode 100755 Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.3(B.M.D).png create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter1.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter10.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter11.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter12.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter13.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter14.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter15.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter16.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter17.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter18.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter19.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter2.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter3.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter4.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter5.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter6.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter7.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter8.ipynb create mode 100755 Engineering_Mechancis,_Schaum_Series_by_McLean/chapter9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./appendix_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./appendix_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./appendix_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./appendix_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter02_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter02_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter02_15.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter02_16.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter02_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter03_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter03_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter03_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter03_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter04_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter04_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter04_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter05_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter05_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter05_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter05_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter06_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter06_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter06_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter06_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter07_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter07_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter07_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter07_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter08_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter09_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter10_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter12_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter13_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter14_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter15_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter16_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter17_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter18_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter19_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter20_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter21_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter22_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter23_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter24_9.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_1.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_10.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_11.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_12.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_2.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_3.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_4.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_5.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_6.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_7.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_8.ipynb create mode 100755 Engineering_Mechanics_by_Tayal_A.K./chapter25_9.ipynb create mode 100644 Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png create mode 100644 Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png create mode 100644 Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png create mode 100755 Engineering_Physics/screenshots/chap2.png create mode 100755 Engineering_Physics/screenshots/chap4.png create mode 100755 Engineering_Physics/screenshots/chap5.png create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb create mode 100644 Engineering_Physics_by_G._Vijayakumari/README.txt create mode 100644 Engineering_Physics_by_G._Vijayakumari/screenshots/11.png create mode 100644 Engineering_Physics_by_G._Vijayakumari/screenshots/22.png create mode 100644 Engineering_Physics_by_G._Vijayakumari/screenshots/33.png create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb create mode 100755 Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb create mode 100644 Engineering_Physics_by_P.K.Palanisamy/README.txt create mode 100755 Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png create mode 100755 Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png create mode 100755 Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb create mode 100755 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png create mode 100644 Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb create mode 100644 Engineering_Physics_by_S._Mani_Naidu/README.txt create mode 100644 Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png create mode 100644 Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png create mode 100644 Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png create mode 100644 Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png create mode 100755 Fluid_Mechanics/screenshots/ch11.png create mode 100755 Fluid_Mechanics/screenshots/ch3.png create mode 100755 Fluid_Mechanics/screenshots/ch5.png create mode 100644 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch11.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch2.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch3.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch4.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch5.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch6.ipynb create mode 100755 Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch7.ipynb create mode 100644 Fluid_Power_With_Applications_by_A._Esposito/README.txt create mode 100755 Fundamentals_Of_Physical_Chemistry/README.txt create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch10.png create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch10_1.png create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch5.png create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch5_1.png create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch9.png create mode 100755 Heat_Transfer:_Principles_And_Applications/screenshots/ch9_1.png create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_1.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_2.ipynb create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch10.png create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch5.png create mode 100755 Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch9.png create mode 100755 High_Voltage_Engineering/screenshots/chap1.png create mode 100755 High_Voltage_Engineering/screenshots/chap3.png create mode 100755 High_Voltage_Engineering/screenshots/chap7.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_12.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_16.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_3.png create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries_.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge.ipynb create mode 100755 High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER1.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER2.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER3.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER4.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER6.ipynb create mode 100755 High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER7.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png create mode 100644 Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png create mode 100755 Internal_Combustion_Engine_/screenshots/ch1.png create mode 100755 Internal_Combustion_Engine_/screenshots/ch12.png create mode 100755 Internal_Combustion_Engine_/screenshots/ch2.png create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch1.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch10.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch11.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch12.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch14.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch15.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch16.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch17.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch18.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch2.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch26.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch27.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch3.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch5.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch7.ipynb create mode 100755 Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch8.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/PbarvsVm^3.png create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/TvsQc5.png create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/yivsT_K13.png create mode 100644 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch1.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch10.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch11.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch12.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch13.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch14.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch15.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch2.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch3.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch4.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch5.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch6.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch7.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch8.ipynb create mode 100755 Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch9.ipynb create mode 100755 Introduction_To_Electric_Drives/screenshots/Ch2_firingAngleandEff.png create mode 100755 Introduction_To_Electric_Drives/screenshots/Ch6Requiredhp.png create mode 100755 Introduction_To_Electric_Drives/screenshots/Ch6Thermal_time_cons.png create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt create mode 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb create mode 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb create mode 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb create mode 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb create mode 100755 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png create mode 100644 Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png create mode 100644 Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png create mode 100755 Introduction_To_Nuclear_And_Particle_Physics/screenshots/exogeric_reaction.png create mode 100755 Introduction_To_Nuclear_And_Particle_Physics/screenshots/particles_for_reactions.png create mode 100755 Introduction_To_Nuclear_And_Particle_Physics/screenshots/vel_of_photoelectron.png create mode 100644 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch1.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch2.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch3.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch4.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch5.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch6.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch7.ipynb create mode 100755 Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch8.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science/screenshots/1.png create mode 100755 Introduction_To_Special_Relativity_And_Space_Science/screenshots/3.png create mode 100755 Introduction_To_Special_Relativity_And_Space_Science/screenshots/4.png create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter1.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter2.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter3.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter4.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter6.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter8.ipynb create mode 100755 Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter9.ipynb create mode 100755 Introduction_to_Solid_State_Physics/screenshots/Screenshot.png create mode 100755 Introduction_to_Solid_State_Physics/screenshots/Screenshot_1.png create mode 100755 Introduction_to_Solid_State_Physics/screenshots/Screenshot_2.png create mode 100755 Introduction_to_Solid_State_Physics_by_Kittel_C/Chapter5.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering/screenshots/ch10.png create mode 100755 Irrigation_and_Water_Power_Engineering/screenshots/ch4.png create mode 100755 Irrigation_and_Water_Power_Engineering/screenshots/ch5.png create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_1.ipynb create mode 100755 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png create mode 100644 Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png create mode 100644 Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png create mode 100755 Materials_Science/screenshots/1_converted.png create mode 100755 Materials_Science/screenshots/2_converted.png create mode 100755 Materials_Science/screenshots/3_converted.png create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter1.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter10.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter12.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter2.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter3.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter4.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter5.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter6.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter7.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter8.ipynb create mode 100755 Materials_Science_by_Dr._M._Arumugam/Chapter9.ipynb create mode 100755 Mechanical_Metallurgy/screenshots/py1.png create mode 100755 Mechanical_Metallurgy/screenshots/py3.png create mode 100755 Mechanical_Metallurgy/screenshots/py4.png create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_1.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_11.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_12.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_13.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_14.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_15.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_16.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_17.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_18.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_19.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_2.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_20.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_21.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_3.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_4.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_5.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_6.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_7.ipynb create mode 100755 Mechanical_Metallurgy_by_George_E._Dieter/Chapter_8.ipynb create mode 100755 Microelectronic_Circuits/screenshots/10.3.png create mode 100755 Microelectronic_Circuits/screenshots/5.2.png create mode 100755 Microelectronic_Circuits/screenshots/5.4.png create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter1.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter10.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter11.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter12.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter14.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter3.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter4.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter5.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter6.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter7.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter8.ipynb create mode 100755 Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter9.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_10.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_11.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_3.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_4.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_5.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_6.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_7.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_8.ipynb delete mode 100755 Microwave_and_Radar_Engineering/Chapter_9.ipynb delete mode 100755 Microwave_and_Radar_Engineering/README.txt delete mode 100755 Microwave_and_Radar_Engineering/screenshots/001_prithvi.png delete mode 100755 Microwave_and_Radar_Engineering/screenshots/002_prithvi.png delete mode 100755 Microwave_and_Radar_Engineering/screenshots/003_prithvi.png delete mode 100755 Microwave_and_Radar_Engineering/screenshots/s1.png delete mode 100755 Microwave_and_Radar_Engineering/screenshots/s2.png delete mode 100755 Microwave_and_Radar_Engineering/screenshots/s3.png create mode 100755 Microwave_and_Radar_Engineering_by_M._Kulkarni/screenshots/sachin1.png create mode 100755 Microwave_and_Radar_Engineering_by_M._Kulkarni/screenshots/sachin2.png create mode 100755 Microwave_and_Radar_Engineering_by_M._Kulkarni/screenshots/sachin3.png create mode 100755 Optical_Communication_Systems/screenshots/ch2_normalized_freq.png create mode 100755 Optical_Communication_Systems/screenshots/ch3_refractive_index.png create mode 100755 Optical_Communication_Systems/screenshots/ch6_ext_eff.png create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/README.txt create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter1_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter2_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter3_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter5_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter6_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter7_1.ipynb create mode 100755 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/chapter8_1.ipynb create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch2_normalized_freq.png create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch3_refractive_index.png create mode 100644 Optical_Communication_Systems_by_S._B._Gupta_&_A._Goel/screenshots/ch6_ext_eff.png create mode 100755 Optical_fiber_communication/screenshots/plot1.png create mode 100755 Optical_fiber_communication/screenshots/plot2.png create mode 100755 Optical_fiber_communication/screenshots/plot3.png create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter1.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter10.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter11.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter12.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter13.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter2.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter3.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter4.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter5.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter6.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter7.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter8.ipynb create mode 100755 Optical_fiber_communication_by_gerd_keiser/chapter9.ipynb create mode 100755 Oscillations_and_Waves/screenshots/energy_density_ch9.png create mode 100755 Oscillations_and_Waves/screenshots/eqn_of_wav_prop_ch5.png create mode 100755 Oscillations_and_Waves/screenshots/freq_and_time_period_ch1.png create mode 100644 Oscillations_and_Waves_by_S._Prakash/README.txt create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb create mode 100755 Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb delete mode 100755 Power_Electronics/Chapter10.ipynb delete mode 100755 Power_Electronics/Chapter10_1.ipynb delete mode 100755 Power_Electronics/Chapter10_2.ipynb delete mode 100755 Power_Electronics/Chapter10_3.ipynb delete mode 100755 Power_Electronics/Chapter10_4.ipynb delete mode 100755 Power_Electronics/Chapter11.ipynb delete mode 100755 Power_Electronics/Chapter11_1.ipynb delete mode 100755 Power_Electronics/Chapter11_2.ipynb delete mode 100755 Power_Electronics/Chapter11_3.ipynb delete mode 100755 Power_Electronics/Chapter11_4.ipynb delete mode 100755 Power_Electronics/Chapter12.ipynb delete mode 100755 Power_Electronics/Chapter12_1.ipynb delete mode 100755 Power_Electronics/Chapter12_2.ipynb delete mode 100755 Power_Electronics/Chapter12_3.ipynb delete mode 100755 Power_Electronics/Chapter12_4.ipynb delete mode 100755 Power_Electronics/Chapter13.ipynb delete mode 100755 Power_Electronics/Chapter13_1.ipynb delete mode 100755 Power_Electronics/Chapter13_2.ipynb delete mode 100755 Power_Electronics/Chapter13_3.ipynb delete mode 100755 Power_Electronics/Chapter13_4.ipynb delete mode 100755 Power_Electronics/Chapter14.ipynb delete mode 100755 Power_Electronics/Chapter14_1.ipynb delete mode 100755 Power_Electronics/Chapter14_2.ipynb delete mode 100755 Power_Electronics/Chapter14_3.ipynb delete mode 100755 Power_Electronics/Chapter14_4.ipynb delete mode 100755 Power_Electronics/Chapter2.ipynb delete mode 100755 Power_Electronics/Chapter2_1.ipynb delete mode 100755 Power_Electronics/Chapter2_2.ipynb delete mode 100755 Power_Electronics/Chapter2_3.ipynb delete mode 100755 Power_Electronics/Chapter2_4.ipynb delete mode 100755 Power_Electronics/Chapter3.ipynb delete mode 100755 Power_Electronics/Chapter3_1.ipynb delete mode 100755 Power_Electronics/Chapter3_2.ipynb delete mode 100755 Power_Electronics/Chapter3_3.ipynb delete mode 100755 Power_Electronics/Chapter3_4.ipynb delete mode 100755 Power_Electronics/Chapter4.ipynb delete mode 100755 Power_Electronics/Chapter4_1.ipynb delete mode 100755 Power_Electronics/Chapter4_2.ipynb delete mode 100755 Power_Electronics/Chapter4_3.ipynb delete mode 100755 Power_Electronics/Chapter4_4.ipynb delete mode 100755 Power_Electronics/Chapter5.ipynb delete mode 100755 Power_Electronics/Chapter5_1.ipynb delete mode 100755 Power_Electronics/Chapter5_2.ipynb delete mode 100755 Power_Electronics/Chapter5_3.ipynb delete mode 100755 Power_Electronics/Chapter5_4.ipynb delete mode 100755 Power_Electronics/Chapter6.ipynb delete mode 100755 Power_Electronics/Chapter6_1.ipynb delete mode 100755 Power_Electronics/Chapter6_2.ipynb delete mode 100755 Power_Electronics/Chapter6_3.ipynb delete mode 100755 Power_Electronics/Chapter6_4.ipynb delete mode 100755 Power_Electronics/Chapter7.ipynb delete mode 100755 Power_Electronics/Chapter7_1.ipynb delete mode 100755 Power_Electronics/Chapter7_2.ipynb delete mode 100755 Power_Electronics/Chapter7_3.ipynb delete mode 100755 Power_Electronics/Chapter7_4.ipynb delete mode 100755 Power_Electronics/Chapter8.ipynb delete mode 100755 Power_Electronics/Chapter8_1.ipynb delete mode 100755 Power_Electronics/Chapter8_2.ipynb delete mode 100755 Power_Electronics/Chapter8_3.ipynb delete mode 100755 Power_Electronics/Chapter8_4.ipynb delete mode 100755 Power_Electronics/Chapter9.ipynb delete mode 100755 Power_Electronics/Chapter9_1.ipynb delete mode 100755 Power_Electronics/Chapter9_2.ipynb delete mode 100755 Power_Electronics/Chapter9_3.ipynb delete mode 100755 Power_Electronics/Chapter9_4.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_10.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_10_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_10_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_10_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_12.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_12_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_12_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_12_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_13.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_13_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_13_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_13_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_1_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_1_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_1_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_2_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_2_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_2_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_3_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_3_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_3_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_4.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_4_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_4_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_4_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_5.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_5_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_5_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_5_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_6.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_6_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_6_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_6_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_7.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_7_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_7_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_7_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_8.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_8_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_8_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_8_3.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_9.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_9_1.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_9_2.ipynb delete mode 100755 Power_Electronics/Power_electronics_ch_9_3.ipynb create mode 100755 Power_Electronics/chapter10.ipynb create mode 100755 Power_Electronics/chapter11.ipynb create mode 100755 Power_Electronics/chapter12.ipynb create mode 100755 Power_Electronics/chapter13.ipynb create mode 100755 Power_Electronics/chapter14.ipynb create mode 100755 Power_Electronics/chapter2.ipynb create mode 100755 Power_Electronics/chapter3.ipynb create mode 100755 Power_Electronics/chapter4.ipynb create mode 100755 Power_Electronics/chapter5.ipynb create mode 100755 Power_Electronics/chapter6.ipynb create mode 100755 Power_Electronics/chapter7.ipynb create mode 100755 Power_Electronics/chapter8.ipynb create mode 100755 Power_Electronics/chapter9.ipynb create mode 100755 Principles_Of_Heat_Transfer/screenshots/2.10.png create mode 100755 Principles_Of_Heat_Transfer/screenshots/2.3.png create mode 100755 Principles_Of_Heat_Transfer/screenshots/3.2.png create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_1.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_10.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_2.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_3.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_4.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_5.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_6.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_7.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_8.ipynb create mode 100755 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_9.ipynb create mode 100644 Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png create mode 100644 Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png create mode 100755 Principles_of_Power_System/hardythe1/attachment/20150521.pdf create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/README.txt create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png create mode 100644 Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations/screenshots/11_1.png create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations/screenshots/22_1.png create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations/screenshots/33_1.png create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter19_1.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter20_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter21_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter22_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter23_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter24_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter25_1.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter2_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter3_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter4_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter5_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter6_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter7_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter8_1.ipynb create mode 100755 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter9_1.ipynb create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/README.txt create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/11q.png create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/22q.png create mode 100644 Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/screenshots/33q.png create mode 100755 Quantum_mechanics/screenshots/image1.png create mode 100755 Quantum_mechanics/screenshots/image2.png create mode 100755 Quantum_mechanics/screenshots/image3.png create mode 100644 Quantum_mechanics_by_M.C.Jain/README.txt create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter13.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter13_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter2.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter2_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter3.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter3_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter4.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter4_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter5.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter5_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter7.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter7_1.ipynb create mode 100755 Quantum_mechanics_by_M.C.Jain/chapter8.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/chapter8_1.ipynb create mode 100644 Quantum_mechanics_by_M.C.Jain/screenshots/image1.png create mode 100644 Quantum_mechanics_by_M.C.Jain/screenshots/image2.png create mode 100644 Quantum_mechanics_by_M.C.Jain/screenshots/image3.png create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch10.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch11.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch12.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch13.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch2.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch3.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch4.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch5.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png create mode 100644 Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c1.png create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c2.png create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c3.png create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_point_of_view.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_CHARACTERISTICS_OF_BIPOLAR_JUNCTION_TRANSISTORS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_CHARACTERISTICS_OF_FIELD_EFFECT_TRANSISTORS_AND_TRIODES.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_TRANSISTOR_BIAS_CONSIDERATIONS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_SMALL_SIGNAL_MIDFREQUENCY_BJT_AMPLIFIERS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_SMALL_SIGNAL_MIDFREQUENCY_FET_AND_TRIODE_AMPLIFIERS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_FREQUENCY_EFFECTS_IN_AMPLIFIERS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb create mode 100755 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_OPERATIONAL_AMPLIFIERS.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png create mode 100644 Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png create mode 100755 Semiconductor_Physics_and_Devices_Basic_Principles/README.txt create mode 100644 Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_07.ipynb create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/3.png create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6.png create mode 100644 Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/screenshots/6_2.png create mode 100755 Switchgear_Protection_And_Power_Systems/screenshots/Cha_22.png create mode 100755 Switchgear_Protection_And_Power_Systems/screenshots/Cha_33.png create mode 100755 Switchgear_Protection_And_Power_Systems/screenshots/Cha_44.png create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_17_Electrical_substations_Equipment_and_Bus_bar_Layouts_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_18-b_Nutral_Grounding_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_19_Introduction_to_Fault_Calculations_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_20_Symmentrical_Faults_and_Current_Limiting_Reactors_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_21_Symmentrical_Components_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_22_Unsymmentrical_Faults_on_an_Unloaded_Generator_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_23_Faults_on_Power_Systems_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_32_Protection_of_Transformers_2.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Generators_1.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_33_Protection_of_Genrators.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_35_Current_Transformers_and_Their_Applications_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_36_Voltage_Transformers_and_Their_Applications_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_3_Fundamentals_of_Fault_Clearing_and_Switching_Phenomena_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_44_Power_system_Stability_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_45_Load_Frquency_Control,Load_sheeding_and_Static_relay_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb create mode 100755 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png create mode 100644 Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png create mode 100644 Thermal_Engineering_by_K_K_Ramalingam/README.txt create mode 100755 Thermodynamics_and_Heat_Power/screenshots/ch1.png create mode 100755 Thermodynamics_and_Heat_Power/screenshots/ch11.png create mode 100755 Thermodynamics_and_Heat_Power/screenshots/ch3.png create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8.ipynb create mode 100755 Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction/README.txt create mode 100755 Utilization_of_Electrical_Energy_and_Traction/screenshots/current_thru_negative_booster_1.png create mode 100755 Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-armature_curve_1.png create mode 100755 Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-time_curve_1.png create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch10_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch11_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch1_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch3_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch4_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch5_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch7_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch8_1.ipynb create mode 100755 Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch9_1.ipynb create mode 100755 Wireless_Communications/README.txt create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH19.png create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH3.png create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH5.png create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorbption.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer_.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb create mode 100755 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png create mode 100644 _Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch4.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch5.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch6.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch7.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch8.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch9.ipynb create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/energy_stored3.png create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/magnetic_flux12.png create mode 100644 _Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/screenshots/pitch_factor7.png create mode 100755 _Engineering_Thermodynamics/screenshots/Screenshot_(49).png create mode 100755 _Engineering_Thermodynamics/screenshots/Screenshot_(50).png create mode 100755 _Engineering_Thermodynamics/screenshots/Screenshot_(51).png create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter10.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter11.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter12.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter13.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter2.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter3.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter4.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter5.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter6.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter7.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter8.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter9.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb create mode 100755 _Engineering_Thermodynamics_by__O._Singh/chapter_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png create mode 100644 _Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb create mode 100644 _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 100644 _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 100644 _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 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb create mode 100644 _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 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb create mode 100644 _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 100644 _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 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png create mode 100644 _Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png create mode 100755 _Mastering_C++/README.txt create mode 100755 _Mastering_C++/screenshots/1.png create mode 100755 _Mastering_C++/screenshots/2.png create mode 100755 _Mastering_C++/screenshots/3.png create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter10-ClassesAndObjects_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter11-ObjectInitializationAndClean-Up_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter12-DynamicObjects_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter13-OperatorOverloading_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter14-Inheritance_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter15-VirtualFunctions_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter16-GenericProgrammingWithTemplates_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter17-StreamsComputationWithConsole_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter18-StreamsComputationWithFiles_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter19-ExceptionHandling_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter2-MovingfromCtoC++.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter3-C++AtAGlance_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter4-DataTypes,OperatorsAndExpressions_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter5-ControlFlow_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter6-ArraysAndStrings_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter7-ModularProgrammingWithFunctions_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter8-StructuresAndUnions_1.ipynb create mode 100755 _Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter9-PointersAndRuntimeBinding_1.ipynb create mode 100755 _Optical_Fiber_Communication/screenshots/Chapter01-Ex1.7.1.png create mode 100755 _Optical_Fiber_Communication/screenshots/Chapter02-Ex2.2.1.png create mode 100755 _Optical_Fiber_Communication/screenshots/Chapter03-Ex3.2.1.png create mode 100755 _Optical_Fiber_Communication/screenshots/chapter2.png create mode 100755 _Optical_Fiber_Communication/screenshots/chapter5.png create mode 100755 _Optical_Fiber_Communication/screenshots/chapter6.png create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter01-Fiber_Optics_Communications_System.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter02-Optical_Fiber_for_Telecommunication.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter03-Optical_Sources_and_Transmitters.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter04-Optical_Detectors_and_Receivers.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter05-Design_Considerations_in_Optical_Links.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter1.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter2.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter3.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter4.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter5.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter6-Advanced_Optical_Systems.ipynb create mode 100755 _Optical_Fiber_Communication_by_V._S._Bagad/Chapter6.ipynb create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 _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 create mode 100644 sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb create mode 100644 sample_notebooks/AdityaAnand/Chapter_8.ipynb create mode 100644 sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb create mode 100644 sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb create mode 100644 sample_notebooks/AjayKumar Verma/chapter4.ipynb create mode 100755 sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb create mode 100755 sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb create mode 100755 sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb create mode 100755 sample_notebooks/AkshayPatil/Chapter01.ipynb create mode 100644 sample_notebooks/AmitRasmiya/ch5.ipynb create mode 100755 sample_notebooks/AmitRaval/ch3.ipynb create mode 100644 sample_notebooks/AmitSexana/Ch_03.ipynb create mode 100644 sample_notebooks/AnandMandali/ch5.ipynb create mode 100755 sample_notebooks/AnkitBarot/ch15.ipynb create mode 100755 sample_notebooks/BhavinPatel/ch6.ipynb create mode 100644 sample_notebooks/DeepTrambadia/Diode_Applications.ipynb create mode 100644 sample_notebooks/DeepTrambadia/Untitled0.ipynb create mode 100644 sample_notebooks/DeepTrambadia/sc201.ipynb create mode 100644 sample_notebooks/DeepTrambadia/sc201_1.ipynb create mode 100644 sample_notebooks/DeepTrambadia/sc223.ipynb create mode 100644 sample_notebooks/DivyangGandhi/ch2.ipynb create mode 100755 sample_notebooks/DivyangGandhi/ch5.ipynb create mode 100755 sample_notebooks/GauravMittal/chapter2.ipynb create mode 100755 sample_notebooks/GirirajsinhDodiya/ch7.ipynb create mode 100755 sample_notebooks/GirishVora/ch2.ipynb create mode 100755 sample_notebooks/Haseen/ch4.ipynb create mode 100755 sample_notebooks/HimanshuRajput/chapter3.ipynb create mode 100755 sample_notebooks/HirenShah/ch3.ipynb create mode 100755 sample_notebooks/Hrituraj/chapter6.ipynb create mode 100755 sample_notebooks/JaiMathur/ch2.ipynb create mode 100755 sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb create mode 100644 sample_notebooks/JigneshBhadani/ch5.ipynb create mode 100755 sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb create mode 100755 sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb create mode 100755 sample_notebooks/LalitKumar/chapter2_1.ipynb create mode 100644 sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb create mode 100755 sample_notebooks/MaulikRathod/ch11.ipynb create mode 100755 sample_notebooks/MaulikRathod/ch11_1.ipynb create mode 100644 sample_notebooks/MohdAnwar/Chapter4_1.ipynb create mode 100755 sample_notebooks/MohdAsif/ch2.ipynb create mode 100644 sample_notebooks/MohdIrfan/Chapter6.ipynb create mode 100644 sample_notebooks/MohdIrfan/Chapter6_1.ipynb create mode 100644 sample_notebooks/MohdRizwan/chapter04.ipynb create mode 100755 sample_notebooks/MohdTasleem/Ch2.ipynb create mode 100755 sample_notebooks/Mohdarif/chapter9.ipynb create mode 100755 sample_notebooks/MukteshChaudhary/ch13.ipynb create mode 100755 sample_notebooks/NeerajBaunthiyal/chapter1.ipynb create mode 100755 sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb create mode 100755 sample_notebooks/NirenNegandhi/ch2_2.ipynb create mode 100755 sample_notebooks/Nitin Kumar/chapter12.ipynb create mode 100755 sample_notebooks/ParitoshMehta/ch1.ipynb create mode 100644 sample_notebooks/ParthThakkar/ch6.ipynb create mode 100644 sample_notebooks/PreetiRani/ch6.ipynb create mode 100755 sample_notebooks/RavirajJadeja/ch16.ipynb create mode 100755 sample_notebooks/RohitPhadtare/chapter_1_som.ipynb create mode 100755 sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb create mode 100755 sample_notebooks/RuchiMittal/chap1.ipynb create mode 100644 sample_notebooks/SachinNaik/ch5.ipynb create mode 100755 sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb create mode 100755 sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb create mode 100755 sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb create mode 100755 sample_notebooks/SaiRakesh/Untitled.ipynb create mode 100755 sample_notebooks/SaiRakesh/chapter_1.ipynb create mode 100755 sample_notebooks/SakshiGoplani/Sample.ipynb create mode 100755 sample_notebooks/SandeshNaik/ch8.ipynb create mode 100644 sample_notebooks/SaurabhBarot/ch2.ipynb create mode 100644 sample_notebooks/SurajAhir/ch1.ipynb create mode 100755 sample_notebooks/VaibhavShah/ch7.ipynb create mode 100755 sample_notebooks/VineshSaini/ch1.ipynb create mode 100644 sample_notebooks/VishalSangani/ch1.ipynb create mode 100644 sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb create mode 100755 sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb create mode 100644 sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb create mode 100755 sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb create mode 100755 sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb create mode 100644 sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb create mode 100755 sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb create mode 100644 sample_notebooks/sanketkhair/chapter4.ipynb create mode 100755 sample_notebooks/srinivasparupalli/CHAPTER2.ipynb create mode 100755 sample_notebooks/sureshp/CHAPTER1.ipynb create mode 100755 sample_notebooks/vijayadurga/sample_(chapter_3).ipynb diff --git a/APPLIED_PHYSICS/screenshots/1.png b/APPLIED_PHYSICS/screenshots/1.png new file mode 100755 index 00000000..518116cf Binary files /dev/null and b/APPLIED_PHYSICS/screenshots/1.png differ diff --git a/APPLIED_PHYSICS/screenshots/2.png b/APPLIED_PHYSICS/screenshots/2.png new file mode 100755 index 00000000..8dd8c593 Binary files /dev/null and b/APPLIED_PHYSICS/screenshots/2.png differ diff --git a/APPLIED_PHYSICS/screenshots/3.png b/APPLIED_PHYSICS/screenshots/3.png new file mode 100755 index 00000000..95badbd1 Binary files /dev/null and b/APPLIED_PHYSICS/screenshots/3.png differ diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb new file mode 100755 index 00000000..1dc0f01d --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a.ipynb @@ -0,0 +1,314 @@ +{ + "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 new file mode 100644 index 00000000..1f6dc249 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1a_1.ipynb @@ -0,0 +1,322 @@ +{ + "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": 2, + "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 Symbol\n", + "from sympy import diff\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": "markdown", + "metadata": {}, + "source": [ + "###Example 1.1(Continued after differentiation)" + ] + }, + { + "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_1b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb new file mode 100755 index 00000000..0df96e78 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b.ipynb @@ -0,0 +1,313 @@ +{ + "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 new file mode 100644 index 00000000..769473f9 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_1b_1.ipynb @@ -0,0 +1,304 @@ +{ + "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": 1, + "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 Symbol\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\"" + ] + } + ], + "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.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb new file mode 100755 index 00000000..c257bf8c --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2.ipynb @@ -0,0 +1,615 @@ +{ + "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 new file mode 100644 index 00000000..7ac8549d --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_2_1.ipynb @@ -0,0 +1,615 @@ +{ + "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": 9, + "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 Symbol\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_3a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb new file mode 100755 index 00000000..6553b45b --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a.ipynb @@ -0,0 +1,215 @@ +{ + "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 new file mode 100644 index 00000000..ff712281 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3a_1.ipynb @@ -0,0 +1,215 @@ +{ + "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": 2, + "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 Symbol\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_3b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb new file mode 100755 index 00000000..5fa9129c --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b.ipynb @@ -0,0 +1,414 @@ +{ + "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 new file mode 100644 index 00000000..5fa9129c --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_3b_1.ipynb @@ -0,0 +1,414 @@ +{ + "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_4.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb new file mode 100755 index 00000000..84e4acb8 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4.ipynb @@ -0,0 +1,478 @@ +{ + "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 new file mode 100644 index 00000000..84e4acb8 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_4_1.ipynb @@ -0,0 +1,478 @@ +{ + "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_5a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb new file mode 100755 index 00000000..28d3f8c6 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a.ipynb @@ -0,0 +1,212 @@ +{ + "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 new file mode 100644 index 00000000..28d3f8c6 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5a_1.ipynb @@ -0,0 +1,212 @@ +{ + "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_5b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb new file mode 100755 index 00000000..0ada6386 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b.ipynb @@ -0,0 +1,288 @@ +{ + "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 new file mode 100644 index 00000000..0ada6386 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_5b_1.ipynb @@ -0,0 +1,288 @@ +{ + "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_6a.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb new file mode 100755 index 00000000..ad04957e --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a.ipynb @@ -0,0 +1,774 @@ +{ + "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 new file mode 100644 index 00000000..ad04957e --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6a_1.ipynb @@ -0,0 +1,774 @@ +{ + "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_6b.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b.ipynb new file mode 100755 index 00000000..ac079778 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b.ipynb @@ -0,0 +1,288 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#6(B): Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.55" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 33.64 *10**3 ampere/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=64*10**3; #initial field(ampere/m)\n", + "T=5; #temperature(K)\n", + "Tc=7.26; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "H=H0*(1-(T/Tc)**2); #critical field(ampere/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(H/10**3,2),\"*10**3 ampere/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency of generated microwaves= 483.0 *10**9 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19\n", + "V=1*10\n", + "h=6.625*10**-34\n", + "\n", + "#Calculations\n", + "v=(2*e*V**-3)/h \n", + "\n", + "#Result\n", + "print\"Frequency of generated microwaves=\",round(v/10**9),\"*10**9 Hz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of electrons per unit volume = 3.7 *10**28/m**3\n", + "Effective mass of electron 'm*' = 17.3 *10*-31 kg\n", + "Penetration depth = 3.81011659367 Angstroms\n", + "#The answer given in the text book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=7300 #density in (kg/m**3)\n", + "N=6.02*10**26 #Avagadro Number\n", + "A=118.7 #Atomic Weight\n", + "E=1.9 #Effective mass\n", + "e=1.6*10**-19\n", + "\n", + "#Calculations\n", + "n=(d*N)/A\n", + "m=E*9.1*10**-31\n", + "x=4*math.pi*10**-7*n*e**2\n", + "lamda_L=math.sqrt(m/x)\n", + " \n", + "#Result\n", + "print \"Number of electrons per unit volume =\",round(n/10**28,1),\"*10**28/m**3\"\n", + "print\"Effective mass of electron 'm*' =\",round(m*10**31,1),\"*10*-31 kg\"\n", + "print\"Penetration depth =\",lamda_L*10**8,\"Angstroms\"\n", + "print\"#The answer given in the text book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example number 6.5, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tc = 7.0969 K\n", + "lamda0= 39.0 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda_L1=39.6*10**-9\n", + "lamda_L2=173*10**-9\n", + "T1=7.1\n", + "T2=3\n", + "\n", + "#Calculations\n", + "x=(lamda_L1/lamda_L2)**2\n", + "Tc4=(T1**4)-((T2**4)*x)/(1-x)\n", + "Tc=(Tc4)**(1/4)\n", + "print\"Tc =\",round(Tc,4),\"K\"\n", + "print\"lamda0=\",round((math.sqrt(1-(T2/Tc)**4)*lamda_L1)*10**9),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.57" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hc = 4.2759 *10**4\n", + "Critical current density,Jc = 1.71 *10**8 ampere/metre**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=6.5*10**4 #(ampere/metre)\n", + "T=4.2 #K\n", + "Tc=7.18 #K\n", + "r=0.5*10**-3\n", + "\n", + "#Calculations\n", + "Hc=H0*(1-(T/Tc)**2)\n", + "Ic=(2*math.pi*r)*Hc\n", + "A=math.pi*r**2\n", + "Jc=Ic/A #Critical current density\n", + "\n", + "#Result\n", + "print\"Hc =\",round(Hc/10**4,4),\"*10**4\"\n", + "print \"Critical current density,Jc =\",round(Jc/10**8,2),\"*10**8 ampere/metre**2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.57" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "New critical temperature for mercury = 4.145 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc1=4.185\n", + "M1=199.5\n", + "M2=203.4\n", + "\n", + "#Calculations\n", + "Tc2=Tc1*(M1/M2)**(1/2)\n", + "\n", + "#Result\n", + "print\"New critical temperature for mercury =\",round(Tc2,3),\"K\"" + ] + } + ], + "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_6b_1.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb new file mode 100644 index 00000000..ac079778 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_6b_1.ipynb @@ -0,0 +1,288 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#6(B): Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.55" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 33.64 *10**3 ampere/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=64*10**3; #initial field(ampere/m)\n", + "T=5; #temperature(K)\n", + "Tc=7.26; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "H=H0*(1-(T/Tc)**2); #critical field(ampere/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(H/10**3,2),\"*10**3 ampere/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency of generated microwaves= 483.0 *10**9 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19\n", + "V=1*10\n", + "h=6.625*10**-34\n", + "\n", + "#Calculations\n", + "v=(2*e*V**-3)/h \n", + "\n", + "#Result\n", + "print\"Frequency of generated microwaves=\",round(v/10**9),\"*10**9 Hz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of electrons per unit volume = 3.7 *10**28/m**3\n", + "Effective mass of electron 'm*' = 17.3 *10*-31 kg\n", + "Penetration depth = 3.81011659367 Angstroms\n", + "#The answer given in the text book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=7300 #density in (kg/m**3)\n", + "N=6.02*10**26 #Avagadro Number\n", + "A=118.7 #Atomic Weight\n", + "E=1.9 #Effective mass\n", + "e=1.6*10**-19\n", + "\n", + "#Calculations\n", + "n=(d*N)/A\n", + "m=E*9.1*10**-31\n", + "x=4*math.pi*10**-7*n*e**2\n", + "lamda_L=math.sqrt(m/x)\n", + " \n", + "#Result\n", + "print \"Number of electrons per unit volume =\",round(n/10**28,1),\"*10**28/m**3\"\n", + "print\"Effective mass of electron 'm*' =\",round(m*10**31,1),\"*10*-31 kg\"\n", + "print\"Penetration depth =\",lamda_L*10**8,\"Angstroms\"\n", + "print\"#The answer given in the text book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example number 6.5, Page number 6.56" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tc = 7.0969 K\n", + "lamda0= 39.0 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda_L1=39.6*10**-9\n", + "lamda_L2=173*10**-9\n", + "T1=7.1\n", + "T2=3\n", + "\n", + "#Calculations\n", + "x=(lamda_L1/lamda_L2)**2\n", + "Tc4=(T1**4)-((T2**4)*x)/(1-x)\n", + "Tc=(Tc4)**(1/4)\n", + "print\"Tc =\",round(Tc,4),\"K\"\n", + "print\"lamda0=\",round((math.sqrt(1-(T2/Tc)**4)*lamda_L1)*10**9),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.57" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hc = 4.2759 *10**4\n", + "Critical current density,Jc = 1.71 *10**8 ampere/metre**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=6.5*10**4 #(ampere/metre)\n", + "T=4.2 #K\n", + "Tc=7.18 #K\n", + "r=0.5*10**-3\n", + "\n", + "#Calculations\n", + "Hc=H0*(1-(T/Tc)**2)\n", + "Ic=(2*math.pi*r)*Hc\n", + "A=math.pi*r**2\n", + "Jc=Ic/A #Critical current density\n", + "\n", + "#Result\n", + "print\"Hc =\",round(Hc/10**4,4),\"*10**4\"\n", + "print \"Critical current density,Jc =\",round(Jc/10**8,2),\"*10**8 ampere/metre**2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.57" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "New critical temperature for mercury = 4.145 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc1=4.185\n", + "M1=199.5\n", + "M2=203.4\n", + "\n", + "#Calculations\n", + "Tc2=Tc1*(M1/M2)**(1/2)\n", + "\n", + "#Result\n", + "print\"New critical temperature for mercury =\",round(Tc2,3),\"K\"" + ] + } + ], + "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.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb new file mode 100755 index 00000000..48386845 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7.ipynb @@ -0,0 +1,236 @@ +{ + "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 new file mode 100644 index 00000000..48386845 --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_7_1.ipynb @@ -0,0 +1,236 @@ +{ + "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_8.ipynb b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb new file mode 100755 index 00000000..4ab9cd1c --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8.ipynb @@ -0,0 +1,651 @@ +{ + "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 new file mode 100644 index 00000000..4ab9cd1c --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/Chapter_8_1.ipynb @@ -0,0 +1,651 @@ +{ + "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/README.txt b/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt new file mode 100644 index 00000000..8d70456e --- /dev/null +++ b/APPLIED_PHYSICS_by_M,_ARUMUGAM/README.txt @@ -0,0 +1,10 @@ +Contributed By: Rohith Yeedulapalli +Course: btech +College/Institute/Organization: TKR College Of Engineering and Technology +Department/Designation: CSE +Book Title: APPLIED PHYSICS +Author: M, ARUMUGAM +Publisher: M. Sethuraaman, Anuradha Agencies, Publishers, Kumbakonam +Year of publication: 2005 +Isbn: 81-89638-01-7 +Edition: 2 \ No newline at end of file diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png new file mode 100644 index 00000000..ff796297 Binary files /dev/null and b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(1).png differ diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png new file mode 100644 index 00000000..7624a700 Binary files /dev/null and b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(2).png differ diff --git a/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png new file mode 100644 index 00000000..976df4e2 Binary files /dev/null and b/APPLIED_PHYSICS_by_M,_ARUMUGAM/screenshots/Screenshot_(3).png differ diff --git a/A_First_Course_on_Electrical_Drives/screenshots/CHAP2.png b/A_First_Course_on_Electrical_Drives/screenshots/CHAP2.png new file mode 100755 index 00000000..ea952d7c Binary files /dev/null and b/A_First_Course_on_Electrical_Drives/screenshots/CHAP2.png differ diff --git a/A_First_Course_on_Electrical_Drives/screenshots/CHAP4.png b/A_First_Course_on_Electrical_Drives/screenshots/CHAP4.png new file mode 100755 index 00000000..14ca78e0 Binary files /dev/null and b/A_First_Course_on_Electrical_Drives/screenshots/CHAP4.png differ diff --git a/A_First_Course_on_Electrical_Drives/screenshots/CHAP5.png b/A_First_Course_on_Electrical_Drives/screenshots/CHAP5.png new file mode 100755 index 00000000..a2bb7458 Binary files /dev/null and b/A_First_Course_on_Electrical_Drives/screenshots/CHAP5.png differ diff --git a/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER2.ipynb b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER2.ipynb new file mode 100755 index 00000000..8c147e73 --- /dev/null +++ b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER2.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c86cf1f26eadab2a84870e3bf099f77c1edd6e808c6d98e5248f9bca159fb338" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 2 - DYNAMICS OF ELECTRICAL DRIVES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.3 - PG NO. 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.3\n", + "#page no. 29\n", + "#calculate the max additional load\n", + "import math\n", + "Pm=0.74\n", + "teta1=30\n", + "teta2=45\n", + "print('a1=0.026*Pm')\n", + "print('a2=0.304*Pm')\n", + "print(\"since a2 > a1 ,the drive is stable\")\n", + "load=Pm*math.sin(math.degrees(60.5))\n", + "print('maximum safe load =1.74*Pl1')\n", + "print'%s %.2f %s' %('So, additional load that can be thrown on the shaft =',Pm,'rated load')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a1=0.026*Pm\n", + "a2=0.304*Pm\n", + "since a2 > a1 ,the drive is stable\n", + "maximum safe load =1.74*Pl1\n", + "So, additional load that can be thrown on the shaft = 0.74 rated load\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER4_1.ipynb b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER4_1.ipynb new file mode 100755 index 00000000..6cad2def --- /dev/null +++ b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER4_1.ipynb @@ -0,0 +1,290 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9ead3b67f2ac02e5f967508e349d9305e0ea0a57fbe04777e904cadb8ee40e9d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 4 - Characteristics of AC motor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.1 - PG NO.65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 4.1, Page 65\n", + "import numpy\n", + "import math\n", + "l=([1, -3, 1])\n", + "a=numpy.asarray(l[0])\n", + "b=numpy.asarray(l[1])\n", + "c=numpy.asarray(l[2])\n", + "d = (b**2) - (4*a*c)\n", + "sol1 = (-b-math.sqrt(d))/(2*a)\n", + "sol2 = (-b+math.sqrt(d))/(2*a)\n", + "print('Part a')\n", + "print('roots of the equation when slip at max torque')\n", + "print'%.3f %s %.3f' %(sol1,'or',sol2)\n", + "\n", + "l1=([1, -1.719,0.146])\n", + "a1=numpy.asarray(l1[0])\n", + "b1=numpy.asarray(l1[1])\n", + "c1=numpy.asarray(l1[2])\n", + "d1 = (b1**2) - (4*a1*c1)\n", + "solution1 = (-b1-math.sqrt(d1))/(2*a1)\n", + "solution2 = (-b1+math.sqrt(d1))/(2*a1)\n", + "print('\\n')\n", + "print('Part b')\n", + "print('roots of the equation when slip at max load')\n", + "print'%.2f %s %.2f' %(solution1,'or',solution2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a\n", + "roots of the equation when slip at max torque\n", + "0.382 or 2.618\n", + "\n", + "\n", + "Part b\n", + "roots of the equation when slip at max load\n", + "0.09 or 1.63\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.3 - PG NO.70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 4.3, Page 70\n", + "import numpy\n", + "import math\n", + "l=([0.04, -0.0266,.0016])\n", + "a=numpy.asarray(l[0])\n", + "b=numpy.asarray(l[1])\n", + "c=numpy.asarray(l[2])\n", + "d = (b**2.) - (4.*a*c)\n", + "sol1 = (-b-math.sqrt(d))/(2.*a)\n", + "sol2 = (-b+math.sqrt(d))/(2.*a)\n", + "print('Part a')\n", + "print('roots of the equation that slip will run is')\n", + "print'%.3f %s %.3f' %(sol1,'or',sol2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a\n", + "roots of the equation that slip will run is\n", + "0.067 or 0.598\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.4.a - PG NO. 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.4.a\n", + "#page no. 71\n", + "import math\n", + "r1=0.02#\n", + "x=0.04#\n", + "TmaxatVby2=0.02+math.sqrt(0.0004+0.04)\n", + "TmaxatV=2*(0.02+math.sqrt(0.0004+0.01))\n", + "Tmax=TmaxatVby2/TmaxatV\n", + "print'%s %.5f' %('Tmax at rated voltage and frequency= ',Tmax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tmax at rated voltage and frequency= 0.90587\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.4.b - PG NO. 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 4.4.b\n", + "#page no. 71\n", + "import math\n", + "r1=0.02#\n", + "x=0.04#\n", + "TstatVby2=(0.04*0.04)+(0.2*0.2)\n", + "TstatV=2*((0.04*0.04)+(0.01))\n", + "Tst=TstatVby2/TstatV\n", + "print'%s %.3f' %('Tst at rated voltage and frequency =',Tst)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tst at rated voltage and frequency = 1.793\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.5 - PG NO.74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 4.5, page 74\n", + "import math\n", + "pole=24.\n", + "Ns=245.#in rpm\n", + "N=(120.*50.)/pole#synchronous speed in rpm\n", + "f=(N-Ns)/N\n", + "p=110.#in kw\n", + "T=(p*1000.*60.)/(2.*math.pi*Ns)\n", + "v1=440./math.sqrt(3)#in v\n", + "ws=(2*math.pi*250)/60\n", + "s=0.02\n", + "R=0.03125#in ohm\n", + "x=math.sqrt(((3*R*v1**2)/(T*ws*s))-(R/s)**2)#by rearranging formula\n", + "print'%s %.5f %s' %('Stator resistance per phase is=',x,'ohm')\n", + "#calculating original resistance\n", + "\n", + "#Example 4.1, Page 65\n", + "import numpy\n", + "import math\n", + "l=([3190,-3235,72.78])\n", + "a=numpy.asarray(l[0])\n", + "b=numpy.asarray(l[1])\n", + "c=numpy.asarray(l[2])\n", + "d = (b**2.) - (4.*a*c)\n", + "sol1 = (-b-math.sqrt(d))/(2.*a)\n", + "sol2 = (-b+math.sqrt(d))/(2.*a)\n", + "print('Part a')\n", + "print('The value of original resistance is')\n", + "print'%.4f %s %.5f' %(sol1,'or',sol2)\n", + "\n", + "#Taking r=0.99108\n", + "r=(0.99108-R)/1.25**2\n", + "\n", + "print'%s %.4f %s' %('The value of resistance to be added is =',r,' ohm')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stator resistance per phase is= 0.50358 ohm\n", + "Part a\n", + "The value of original resistance is\n", + "0.0230 or 0.99109\n", + "The value of resistance to be added is = 0.6143 ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.6 - PG NO.85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 4.6, Page no 85\n", + "import math\n", + "print(\"Part ii\")\n", + "new_sin_delta=math.sin(math.pi/4)/.95\n", + "delta=math.asin(new_sin_delta)\n", + "x=math.degrees(delta)\n", + "print'%s %.2f %s' %('The value of delta is =',x,'degree')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part ii\n", + "The value of delta is = 48.10 degree\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER5_1.ipynb b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER5_1.ipynb new file mode 100755 index 00000000..41ba1638 --- /dev/null +++ b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER5_1.ipynb @@ -0,0 +1,184 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0e503a55a3bb1450180b106d69a17d2579c30445dc0b2ede3ba768bf2723fb1c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 5 - Starting " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 5.1 - PG NO.90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.1, Page 90\n", + "import math\n", + "IL=(100*1000)/(math.sqrt(400*0.9*0.8*3))#Full load current\n", + "FS=(1000-950)/1000#Full load slip\n", + "x=[1,0.57736,0.7,0.333333333]\n", + "for i in range(0,4):\n", + "\tT=1.8*(x[i])**2\n", + "\tprint'%s %.6f %s %.3f' %('The value of Tst/Tf when x=',x[i],'is=',T)\n", + "#end\n", + "#the answers are more accurate due to approximations in program than textbook answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Tst/Tf when x= 1.000000 is= 1.800\n", + "The value of Tst/Tf when x= 0.577360 is= 0.600\n", + "The value of Tst/Tf when x= 0.700000 is= 0.882\n", + "The value of Tst/Tf when x= 0.333333 is= 0.200\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 5.2 - PG NO.93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 5.2\n", + "#page no. 93\n", + "#calculate the time taken by a fan\n", + "tor=42.\n", + "speed=1425.\n", + "minertia=1.\n", + "area=155.#found from figure given in book\n", + "acctime=155*2*3.14*100*0.003*1/60.\n", + "print'%s %.2f %s' %('the acceleration time =',acctime,'secs')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the acceleration time = 4.87 secs\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 5.3 - PG NO.97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 5.3, page 97\n", + "import math\n", + "s=.05#slip\n", + "x=1#ie x1+x2\n", + "s_max=((1-s**2)/(2*math.log(1/s)))**(1./2.)#max slip\n", + "#disp(s_max)\n", + "R2_opt=x*s_max\n", + "ws=(2*math.pi*1000)/60#angular frequency\n", + "v1=400/math.sqrt(3.)#voltage\n", + "j=10#angular V\n", + "Tmax=(3*v1**2)/(ws*2.*x)\n", + "Tmin=((j*ws)/(2.*Tmax))*(((1-s**2)/(2*R2_opt))+((R2_opt*math.log(1/s))))\n", + "print'%s %.3f %s' %('The value of T_min is =',Tmin,'sec ')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of T_min is = 1.676 sec \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 5.4 - PG NO.102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 5.4, Page no 102\n", + "import math\n", + "p=400*20*.88*math.sqrt(3)#input power in watt\n", + "l=12193.6-10000#in watt, full load loss\n", + "e=l*60#energy lost per minute\n", + "ws=(2*math.pi*1000)/60.#angular frequency\n", + "j=.5\n", + "R=1#resistance in ohm ir R1/R2\n", + "El=(0.5*j*ws**2)*(1+R)\n", + "#disp(El)\n", + "N=e/El\n", + "#disp(N)\n", + "print'%s %d' %(\"The number of starts that can be made is =\",N)\n", + "ws=(2*math.pi*1500)/60.#angular frequency\n", + "j=.5\n", + "R=1#resistance in ohm ir R1/R2\n", + "El=(0.5*j*ws**2.)*(1.+R)\n", + "#disp(El)\n", + "N=e/El\n", + "#disp(N)\n", + "print'%s %.2f %s' %(\"The number of permissible starts is =\",N,'say 10')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of starts that can be made is = 24\n", + "The number of permissible starts is = 10.67 say 10\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER6_1.ipynb b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER6_1.ipynb new file mode 100755 index 00000000..a434400f --- /dev/null +++ b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER6_1.ipynb @@ -0,0 +1,391 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:db271cf054287ba3955a22495e3d3573daeca2805ad6038b72c3632a873e8cb9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 6 - Electric Braking " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.1 - PG NO.114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.1, page 114\n", + "import math\n", + "T=172.#in N-m\n", + "w=(2.*math.pi*960.)/60.\n", + "E=215.#in V\n", + "Ia=(T*w)/E\n", + "Ra=.062#in ohm\n", + "v=220.#in v\n", + "Eg=v+(Ia*Ra)\n", + "N=960.#in Rpm\n", + "S=(N*round(Eg))/E\n", + "print'%s %.2f %s' %(\"The speed of shunt machine is\",S,\"rpm \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of shunt machine is 1004.65 rpm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.2 - PG NO.114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.2, page 114\n", + "import math\n", + "N=480.#in rpm\n", + "T=318.3#in N-m\n", + "P=(2.*math.pi*N*T)/60.\n", + "#From graph\n", + "E=333.3#in V\n", + "Ia=48.#Amp\n", + "R=E/Ia\n", + "#disp(R)\n", + "print'%s %.2f %s' %(\"The total resistance of circuit is =\",R,\"ohm\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total resistance of circuit is = 6.94 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.3 - PG NO.116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.3, Page 116\n", + "import math\n", + "per=.88\n", + "v=220.#in v\n", + "p=20.#in kw\n", + "I=(p*1000.)/(per*v)\n", + "T=(p*1000.*60.)/(2*math.pi*1200.)\n", + "#Part a\n", + "E_motor=v-(I*.1)\n", + "v_arm=v+E_motor\n", + "Ir=2.*I#Rated current\n", + "R=v_arm/Ir\n", + "print'%s %.2f %s' %('resistance at armature current=',R,'ohm')\n", + "R_Extra=R-.1\n", + "print'%s %.2f %s' %(\"\\n Extra resistance added to motor armature is =\",R_Extra,\" ohm \")\n", + "#Part b\n", + "T_Full_load=T*2\n", + "print'%s %.2f %s' %(\"\\n Full load torque is\",T_Full_load,\" N-m \\n\")\n", + "#Part c\n", + "E=(E_motor*400.)/1200.\n", + "print'%s %.2f %s' %('E=',E,'v')\n", + "I_braking=(v+E)/R\n", + "T_braking=(T/103.3)*I_braking\n", + "print'%s %.3f %s' %(\"\\n Braking current is =\",I_braking,\" A\")\n", + "print'%s %.3f %s' %(\"\\n Braking Torque is =\",T_braking,\" N-m \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance at armature current= 2.08 ohm\n", + "\n", + " Extra resistance added to motor armature is = 1.98 ohm \n", + "\n", + " Full load torque is 318.31 N-m \n", + "\n", + "E= 69.89 v\n", + "\n", + " Braking current is = 139.397 A\n", + "\n", + " Braking Torque is = 214.770 N-m \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.4 - PG NO.124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.4, page 124\n", + "import math\n", + "R1=.15#in ohm\n", + "Rs=.45#in ohm\n", + "x1=.6#in ohm\n", + "xz=1.8#in ohm\n", + "sf=0.05\n", + "Turn=1./math.sqrt(3.)\n", + "R_rotor=Rs*Turn#in ohm\n", + "X_rotor=xz*Turn**2.#in ohm\n", + "\n", + "#Part 1\n", + "#BY FIGURE\n", + "E1=math.sqrt((3.**2.+.6**2)/(3.15**2+1.2**2))*440./math.sqrt(3.)\n", + "s=1.-sf\n", + "I2=E1/math.sqrt(x1**2+2**2)\n", + "R2=2.*60.#ohm\n", + "w=2.*math.pi*600.\n", + "T=(R2*3.*(I2**2.))/(s*w)\n", + "print'%s %.3f %s' %(\"Initial braking torque of rheostatic is\",T,\"N-m\")\n", + "\n", + "#Part 2\n", + "s1=2.-sf\n", + "a=.15+(1.9/1.95)**2.\n", + "b=1.2**2.\n", + "I2=(440./math.sqrt(3.))*(1./math.sqrt(a+b))\n", + "T=(60.*1.9*3.*(I2**2.))/(1.95*w)\n", + "print('\\n')\n", + "print'%s %.3f %s' %(\"Initial braking torque during reverse is\",T,\" N-m\")\n", + "#the answers in textbook are less accurate due to approximations." + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.5 - PG NO.128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.5, page no 128\n", + "import math\n", + "import cmath\n", + "Kva=3000./3.#kva per phase\n", + "v=2300./math.sqrt(3.)#voltage per phase\n", + "#disp(v)\n", + "i=(1000.*1000.)/1330.#current per phase\n", + "#disp(i)\n", + "s=i*.2\n", + "x=math.sqrt((v+s)**2.+(s**2.))\n", + "temp=((x/i)**2.)-2.**2.#temp=(.2+R)**2\n", + "#print(temp)\n", + "t=cmath.sqrt(temp)\n", + "temp1=t-(.2)\n", + "#disp(temp1)\n", + "#Answer difference is because of round off value of x\n", + "r=1.97#in ohms\n", + "T_br=(3.*i*i*r*60.)/(2*math.pi*200.)\n", + "print'%s %.2f %s' %(\"Initial braking torque is =\",T_br, \"N-m\")\n", + "#the answers in textbook are less accurate due to approximations." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial braking torque is = 159523.84 N-m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.6 - PG NO.131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.6, Page 131\n", + "import math\n", + "pf=.85\n", + "N1=1500.#in rpm\n", + "N=1440.#in rpm\n", + "P=pf*230.*10.*math.sqrt(3.)\n", + "p_stator_loss=86.16#in w\n", + "p_rotor=P-p_stator_loss\n", + "rotor_copper_loss=((N1-N)/N1)*p_rotor\n", + "print'%s %.f %s' %(\"The rotor copper loss is =\",round(rotor_copper_loss),\"watt\")\n", + "inertia=.0486#in kg-m2\n", + "E=2*.96*inertia*((2*math.pi*50)/2)**2\n", + "print'%s %.f %s' %('total energy dissipiated in rotar during starting and braking',E,'J')\n", + "stops_starts=7920/E\n", + "print'%s %.2f %s' %(\"Total number of starts and stops is =\",stops_starts,\"say 3\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rotor copper loss is = 132 watt\n", + "total energy dissipiated in rotar during starting and braking 2302 J\n", + "Total number of starts and stops is = 3.44 say 3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.7 - PG NO.131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.7, page 131\n", + "import math\n", + "v1=400/math.sqrt(3)#in v\n", + "ws=(2*math.pi*1000)/60#angular f\n", + "x=1#resistance in ohm\n", + "T_max=(3*v1**2)/(ws*2*x)\n", + "#print(T_max)\n", + "j=10#in kg-m2\n", + "s1=.05\n", + "s_maxT=0.2\n", + "a=(1.95**2-1)/(2*s_maxT)\n", + "temp=a+(.2*math.log(1.95))\n", + "r=((10*ws)/(2*T_max))*(temp)\n", + "#print(r)\n", + "Extra_R=r-(.2)\n", + "a=(1.95**2-1)/(2*1.45)\n", + "temp=a+(1.45*math.log(1.95))\n", + "t=((10*ws)/(2*T_max))*(temp)\n", + "#print(t)\n", + "print'%s %.3f %s' %(\"Minimum time to bring rotor to rest is \",t,\"sec\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum time to bring rotor to rest is 1.326 sec\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.8 - PG NO.134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 6.8, page 134\n", + "import math\n", + "#part a\n", + "w=(2.*math.pi*50.)/3.#angular f, rad/sec\n", + "k=6000./w\n", + "kw=6000.#n-m, initial brakin torque\n", + "Tf=300.#n-m, fictional torque\n", + "j=540.#kg-m2\n", + "tr=(j/k)*math.log((kw+Tf)/Tf)\n", + "#disp(tr)\n", + "s=math.e**((-k*tr)/j)\n", + "#disp(s)\n", + "temp=((j/k)*(kw+Tf)*(1.-s))-((Tf*tr))\n", + "Nr=(1./(2.*math.pi*k))*temp\n", + "#disp(Nr)\n", + "print'%s %.2f %s' %(\"Time taken for rheostatic braking is =\",Nr,\"s\")\n", + "#part b\n", + "beta=3600./j\n", + "motor_rest_time=w/6.67\n", + "#disp(motor_rest_time)\n", + "rev=(1000./60.)*.5*(motor_rest_time)\n", + "print'%s %.1f' %(\"Number of revolutions made is =\",rev)\n", + "#the answers in textbook are less accurate due to approximations." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken for rheostatic braking is = 133.17 s\n", + "Number of revolutions made is = 130.8\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER7_1.ipynb b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER7_1.ipynb new file mode 100755 index 00000000..eb633575 --- /dev/null +++ b/A_First_Course_on_Electrical_Drives_by_S._K._Pillai/CHAPTER7_1.ipynb @@ -0,0 +1,223 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:03a1eb6c9152c9eb8c2b7bead64a5c2f3e3e16085e84105d00d34845b4d83538" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 7- Rating and Heating Motors " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.1 - PG NO.140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 7.1, page 140\n", + "import math\n", + "G=500.#in kg\n", + "h=700.# in j/kg/c\n", + "s_lambda=math.pi*.7*1*12.5\n", + "h=(G*h)/s_lambda\n", + "#disp(h)\n", + "L=((10*1000.)/.9)-10000.\n", + "w=1111.\n", + "T=w/s_lambda\n", + "print'%s %.1f %s' %(\"Final tempearture rise is =\",T,\"degree C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final tempearture rise is = 40.4 degree C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.2 - PG NO. 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.2\n", + "#page no. 153\n", + "#calculate peak rating of motor,equivalent continous rating based on rms torque,and on rms power.\n", + "import math\n", + "print('i) peak rating is found from the given figure as 61.64 kW')\n", + "Teq=4205.3\n", + "Peq=(4205.3*2.*3.14*60.)/60000.\n", + "print'%s %.2f %s' %('ii) Peq =',Peq,'kW')\n", + "Peq2=434.31#\n", + "print'%s %.1f %s' %('iii) The mean square power =',math.sqrt(Peq2),'kW')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) peak rating is found from the given figure as 61.64 kW\n", + "ii) Peq = 26.41 kW\n", + "iii) The mean square power = 20.8 kW\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.3 - PG NO.155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 7.3, page 155\n", + "import math\n", + "alpha=0.9\n", + "N=.5#in hr\n", + "tou=1.5#in hr\n", + "pr=25.#in kw\n", + "px=pr*math.sqrt(((1.+alpha)/(1.-math.exp(-N/tou)))-.9)\n", + "print'%s %.2f %s %s %d %s' %(\"Power is=\",px,\"kw\",'say',round(px),'kw')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power is= 60.22 kw say 60 kw\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.4 - PG NO.157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 7.4, page 157\n", + "import math\n", + "pr=100.#in kw\n", + "N=18.#in min\n", + "tou=90.#in min\n", + "R=30.#in min\n", + "tou_1=120.#in min\n", + "a=N/tou\n", + "b=R/tou_1\n", + "px=pr*math.sqrt((1-math.exp(-(a+b)))/(1-math.exp(-(a))))\n", + "print'%s %.1f %s %s %d %s' %(\"The power is =\",px,\"kw\",'say',round(px),'kw')\n", + "#answers in textbook are less accurate due to approximations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power is = 141.4 kw say 141 kw\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.5 - PG NO.161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 7.5 , page 161\n", + "import math\n", + "Tr=(50.*1000.*60.)/(2.*math.pi*960.)\n", + "#print(Tr)\n", + "Tmax=2.*Tr\n", + "Tmin=300.#in nm\n", + "Tlh=1500.+Tmin\n", + "t=10.#in sec\n", + "ws=(2.*math.pi*1000.)/60.#angular f\n", + "wr=(2.*math.pi*960.)/60.#angular f\n", + "temp=math.log((Tlh-Tmin)/(Tlh-Tmax))\n", + "j=(Tr/(ws-wr))*(t/temp)\n", + "#disp(j)\n", + "r=.9#in m\n", + "wt=j/r**2\n", + "#disp(wt)\n", + "print'%s %.2f %s' %(\"Weight of fly wheel is=\",wt,\"kg\")\n", + "#Part b\n", + "Tmax=994.72\n", + "Tmin=700\n", + "TL1=300\n", + "temp=math.log((Tmax-TL1)/(Tmin-TL1))\n", + "t=(j*temp*(ws-wr))/Tr\n", + "print'%s %.2f %s' %(\"The estimated time is =\",t,\"s\")\n", + "#question number in textbook is printed wrong i.e 7.5 is printed as 5.7\n", + "#answer in textbook is wrong due to approximations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight of fly wheel is= 2356.60 kg\n", + "The estimated time is = 8.87 s\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits/README.txt b/A_Textbook_Of_Electronic_Devices_And_Circuits/README.txt new file mode 100755 index 00000000..1452cdd5 --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits/README.txt @@ -0,0 +1,10 @@ +Contributed By: Mohd Rizwan +Course: mtech +College/Institute/Organization: Techwords Institute Roorkee +Department/Designation: Electronics +Book Title: A Textbook Of Electronic Devices And Circuits +Author: Satya Prakash And Saurabh Rawat +Publisher: Anand Publications, Delhi +Year of publication: 2012 +Isbn: 978-93-80225-48-7 +Edition: 3 \ No newline at end of file diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/CE_CB_Configuration_ch-2_1.png b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/CE_CB_Configuration_ch-2_1.png new file mode 100755 index 00000000..b97beae2 Binary files /dev/null and b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/CE_CB_Configuration_ch-2_1.png differ diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/dc_load_line_Chapter-2_1.png b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/dc_load_line_Chapter-2_1.png new file mode 100755 index 00000000..d09c7848 Binary files /dev/null and b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/dc_load_line_Chapter-2_1.png differ diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/gm_vs_IDSS_ch-6_1.png b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/gm_vs_IDSS_ch-6_1.png new file mode 100755 index 00000000..da93e3dd Binary files /dev/null and b/A_Textbook_Of_Electronic_Devices_And_Circuits/screenshots/gm_vs_IDSS_ch-6_1.png differ diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter11_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter11_1.ipynb new file mode 100755 index 00000000..f804a94c --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter11_1.ipynb @@ -0,0 +1,59 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter11 - Multivibrators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.1, page 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1=15 #in kohm\n", + "R2=15 #in kohm\n", + "C1=0.005 #in uF\n", + "C2=0.005 #in uF\n", + "R=R1 #in Kohm\n", + "C=C1 #in uF\n", + "T=0.69*(R*10**3*C*10**-6+R*10**3*C*10**-6) #in second\n", + "f=1/T #in Hz\n", + "print \"Frequency of oscillators = %0.2f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillators = 9.66 kHz\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter1_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter1_1.ipynb new file mode 100755 index 00000000..1d7aa613 --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter1_1.ipynb @@ -0,0 +1,655 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter1 - Special diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from numpy import exp\n", + "#Given data\n", + "I=40 #in mA\n", + "V=0.25 #in Volt\n", + "T=20 #in degree C\n", + "T=T+273 #in Kelvin\n", + "ETA=1 #For Ge\n", + "e=1.6*10**-19 #in Coulamb(electronic charge)\n", + "k=1.38*10**-23 #in J/K(Boltzman Constant)\n", + "#Formula : I=Io*(exp(%e*V/(ETA*k*T))-1)\n", + "y=(e*V/(ETA*k*T)) #Assumed\n", + "y=round(y)\n", + "Io=I*10**-3/(exp(y)-1) #in mA\n", + "print \"Reverse saturation current =\",round(Io*10**6,2),\" micro Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current = 1.82 micro Ampere\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.2, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "#Given data\n", + "Io=10 #in uA\n", + "I=1 #in Ampere\n", + "ETA=2 #For Si\n", + "T=27 #in degree C\n", + "T=T+273 #in Kelvin\n", + "e=1.6*10**-19 #in Coulamb(electronic charge)\n", + "k=1.38*10**-23 #in J/K(Boltzman Constant)\n", + "#Formula : I=Io*(exp(%e*V/(ETA*k*T))-1)\n", + "V=(ETA*k*T/e)*log(I/(Io*10**-6)+1) #in Volt\n", + "print \"Forward Voltage across the diode =\",round(V,3),\" Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Forward Voltage across the diode = 0.596 Volt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.3, page 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#Given data\n", + "RL=1 #in kOhm\n", + "#rf<1.5mW)\"\n", + "print \"Hence Photourrent can not be calculated.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power of incident light = 1 mW, Photocurrent is 0.90 mA\n", + "Here IP is not proportional to Pop(for Pop>1.5mW)\n", + "Hence Photourrent can not be calculated.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.14, page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "ETA=70 #in %\n", + "Eg=0.75 #in eV\n", + "Eg=Eg*1.6*10**-19 #in Joule\n", + "h=6.63*10**-34 #Planks constant in J-s\n", + "c=3*10**8 #speed of light in m/s\n", + "e=1.6*10**-19 #in coulamb\n", + "lamda=h*c/Eg #in meter\n", + "print \"Wavelength =\",lamda*10**9,\" nm\"\n", + "R=(ETA/100)*e*lamda/(h*c) #in A/W\n", + "print \"Responsivity of InGaAs photodiode =\",round(R,3),\" A/W\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 1657.5 nm\n", + "Responsivity of InGaAs photodiode = 0.933 A/W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.15, page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "W1=2.5 #in eV\n", + "W2=1.9 #in eV\n", + "ContactPotential=W1-W2 #in Volt\n", + "print \"Contact potential =\",ContactPotential,\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contact potential = 0.6 Volts\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter2_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter2_1.ipynb new file mode 100755 index 00000000..2912a3a1 --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter2_1.ipynb @@ -0,0 +1,774 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter2 - Bipolar junction transistors(BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.1, page 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from fractions import Fraction\n", + "#Given data\n", + "deltaIB=50 #in uA\n", + "deltaIC=1 #in mA\n", + "deltaIC=deltaIC*10**3 #in uA\n", + "Beta=deltaIC/deltaIB #unitless\n", + "print \"Current Amplification Factor, Beta =\",Beta \n", + "Alfa=Beta/(1+Beta) #unittless\n", + "print \"Current Amplification Factor, Alfa =\",Fraction(Alfa).limit_denominator()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current Amplification Factor, Beta = 20.0\n", + "Current Amplification Factor, Alfa = 20/21\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.2, page 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "IB=25 #in uA\n", + "Beta=40 #unitless\n", + "IC=Beta*IB #in uA\n", + "IE=IB+IC #in uA\n", + "print \"The value of IE =\",IE,\" micro Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of IE = 1025 micro Ampere\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.3, page 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alfa=0.98 #unitless\n", + "deltaIB=0.2 #in mA\n", + "Beta=alfa/(1-alfa) #unitless\n", + "deltaIC=Beta*deltaIB #in mA\n", + "print \"Change in collector curent =\",deltaIC,\" milli Ampere.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in collector curent = 9.8 milli Ampere.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.4, page 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Beta=45 #unitless\n", + "RL=1 #in kOhm\n", + "deltaVCE=1 #in volt\n", + "print \"Part (i) : CE coniguration\"\n", + "IC=deltaVCE/(RL*1000) #in Ampere\n", + "#Formula : Beta=deltaIC/deltaIB\n", + "IB=IC/Beta #in Ampere\n", + "print \"Input Base Current, IB =\",round(IB*10**3,3),\" mA\" \n", + "print \"Part (ii) : CB coniguration\"\n", + "IC=deltaVCE/(RL*1000) #in Ampere\n", + "#Formula : Beta=deltaIC/deltaIB\n", + "IE=IB+IC #in Ampere\n", + "print \"Input Emitter Current, IE =\",round(IE*10**3,3),\" mA\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : CE coniguration\n", + "Input Base Current, IB = 0.022 mA\n", + "Part (ii) : CB coniguration\n", + "Input Emitter Current, IE = 1.022 mA\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.5, page 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Ileakage=12.5 #in uA\n", + "ICBO=12.5 #in uA\n", + "IE=2 #in mA\n", + "IC=1.97 #in mA\n", + "#Formula : IC=alfa*IE+ICBO\n", + "alfa=(IC-ICBO/10**3)/IE #unitless\n", + "print \"Current Gain =\",round(alfa,3)\n", + "IB=IE-IC #in mA\n", + "print \"Base current =\",IB,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current Gain = 0.979\n", + "Base current = 0.03 mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.6, page 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "deltaVBE=200 #in mVolt\n", + "deltaIB=100 #in uA\n", + "ri=deltaVBE*10**-3/(deltaIB*10**-6) #in Ohm\n", + "print \"Input resistane of transistor =\",ri/1000,\" kohm\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistane of transistor = 2.0 kohm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.7, page 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "deltaVEB=200 #in mVolt\n", + "deltaIE=5 #in mA\n", + "ri=deltaVEB*10**-3/(deltaIE*10**-3) #in Ohm\n", + "print \"Input resistane of transistor =\",ri,\"Ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistane of transistor = 40.0 Ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.9, page 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Ri=500 #in Ohm\n", + "RL=1 #in kOhm\n", + "hie=1 #in kOhm\n", + "hre=2*10**-4 #unitless\n", + "hfe=50 #unitless\n", + "hoe=25 #micro mho\n", + "#Part (a) :\n", + "Ai=-hfe/(1+hoe*10**-6*RL*10**3) #unitless\n", + "print \"Current Gain = \",round(Ai,1) \n", + "#Part (b) :\n", + "Rin=hie*10**3-(hre*hfe/(hoe*10**-6+1/RL*10**3)) #in Ohm\n", + "print \"Input Resistance =\",round(Rin,2),\" Ohm\"\n", + "#Part (c) :\n", + "Av=Ai*RL*10**3/Ri #unitless\n", + "print \"Voltage Gain =\",round(Av,1) \n", + "# Calculation error in the book hence answer wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current Gain = -48.8\n", + "Input Resistance = 1000.0 Ohm\n", + "Voltage Gain = -97.6\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.10. page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log\n", + "#Given data\n", + "alfaF=0.99 #unitless\n", + "alfaR=0.20 #unitless\n", + "IC=1 #in mA\n", + "IB=50 #in micro Ampere\n", + "T=300 #in kelvin\n", + "k=1.38*10**-23 #Boltzman constant\n", + "e=1.6*10**-19 #in cooulamb\n", + "Vth=k*T/e #in Volt\n", + "VCEsat=Vth*log(((IC*10**-3*(1-alfaR)+IB*10**-6)*alfaF)/((alfaF*IB*10**-6-(1-alfaF)*IC*10**-3)*alfaR)) #in volt\n", + "print \"Collector-Emitter saturation voltage =\",round(VCEsat,3),\" Volt\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector-Emitter saturation voltage = 0.121 Volt\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.11, page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "IES=10**-14 #in A\n", + "alfaF=1.0 #unitless\n", + "alfaR=0.1 #unitless\n", + "#Formula : alfaF*IES=alfaR*ICS\n", + "ICS=(alfaF/alfaR)*IES #in Ampere\n", + "print \"Collector base junction saturation current =\",ICS,\"Ampere\"\n", + "RelativeSize=ICS/IES #unitless\n", + "print \"Collector is \",RelativeSize,\" times larger in size than emitter.\"\n", + "BetaR=alfaR/(1-alfaR) #unitless\n", + "print \"Value of BetaR = \",round(BetaR,2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector base junction saturation current = 1e-13 Ampere\n", + "Collector is 10.0 times larger in size than emitter.\n", + "Value of BetaR = 0.11\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.12, page 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pylab as plt\n", + "import numpy as np\n", + "# Given Data \n", + "from __future__ import division\n", + "#Given data\n", + "Beta=100 #unitless\n", + "VCC=6 #in volt\n", + "RB=530 #in kOhm\n", + "RC=2 #in kOhm\n", + "VBE=0.7 #in volt(For Si)\n", + "#Part (i)\n", + "IC1=0 #in A\n", + "VCE1=VCC-IC1*RC #in volt\n", + "#If VCE=0 #in volt\n", + "VCE2=0 #in volt\n", + "IC2=VCC/RC #in Ampere\n", + "#Formula : VCC=VBE+IB*RB\n", + "IB=(VCC-VBE)/(RB*10**3) #in Ampere\n", + "IC=Beta*IB #in Ampere\n", + "VCE=VCC-IC*RC*10**3 #in volt\n", + "print \"Q point coordinates are :\"\n", + "print \"IC=\",IC*10**3,\" mA and VCE=\",VCE,\" Volt.\"\n", + "plt.plot([VCE1,IC1],[VCE2,IC2])\n", + "plt.xlabel('Time')\n", + "plt.ylabel('Voltage')\n", + "plt.title('DC load line')\n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point coordinates are :\n", + "IC= 1.0 mA and VCE= 4.0 Volt.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEZCAYAAABxbJkKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+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mJygvB57XZaHScrhEVJKmmElAkqaYTUCSpphNQJKmmE1AkqaY\nTUCSpphNQJKmmE1AkqaYTUCSptj/B/tD3gFlkSPiAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.13, page 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Beta=100 #unitless\n", + "IC=1 #in mA\n", + "VCC=12 #in volt\n", + "VBE=0.3 #in volt(For Ge)\n", + "#Prt (i)\n", + "IB=IC/Beta #in mA\n", + "#Formula : VCC=VBE+IB*RB\n", + "RB=(VCC-VBE)/(IB*10**-3) #in Ampere\n", + "print \"Resistance RB =\",RB/10**3,\" kOhm\" \n", + "#part (ii)\n", + "Beta=50 #unitless\n", + "IB=(VCC-VBE)/RB #in Ampere\n", + "IC=Beta*IB #in Ampere\n", + "print \"Zero signal IC =\",IC*10**3,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance RB = 1170.0 kOhm\n", + "Zero signal IC = 0.5 mA\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.14, page 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array\n", + "#Given data :\n", + "print \"To set the required operating point, value of RB will be find out. \"\n", + "IC=1 #in mA\n", + "VCE=8 #in volt\n", + "Beta=100 #unitless\n", + "VCC=12 #in volt\n", + "VBE=0.3 #in volt(For Ge)\n", + "#Prt (i)\n", + "RC=(VCC-VCE)/(IC*10**-3) #in ohm\n", + "IB=IC/Beta #in mA\n", + "RB=(VCC-VBE-Beta*(IB*10**-3)*RC)/(IB*10**-3) #in Ohm\n", + "print \"Value of RB =\",RB/1000,\"kOhm\" \n", + "#Part (ii)\n", + "Beta=50 #unitless\n", + "IB=(VCC-VBE)/(RB+Beta*RC) #in mA\n", + "IC=Beta*IB #in Ampere\n", + "VCE=VCC-IC*RC #in volt\n", + "print \"New operating point is (\",round(VCE,1),\"V,\",round(IC*10**3,1),\"mA)\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To set the required operating point, value of RB will be find out. \n", + "Value of RB = 770.0 kOhm\n", + "New operating point is ( 9.6 V, 0.6 mA)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.15, page 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "R1=50 #in kohm\n", + "R2=10 #in kohm\n", + "RE=1 #in kohm\n", + "VCC=12 #in volt\n", + "#Part (i)\n", + "VBE=0.1 #in volt\n", + "VBBdash=(R2/(R1+R2))*VCC #in volt\n", + "IC1=(VBBdash-VBE)/(RE*1000) #in mA\n", + "print \"At VBE=0.1V, Value of IC = %0.1f mA\" %(IC1*1000)\n", + "#Part (ii)\n", + "VBE=0.3 #in volt\n", + "IC2=(VBBdash-VBE)/(RE*1000) #in mA\n", + "print \"At VBE=0.3V, Value of IC = %0.1f mA\" %(IC2*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At VBE=0.1V, Value of IC = 1.9 mA\n", + "At VBE=0.3V, Value of IC = 1.7 mA\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.16, page 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data : \n", + "R1=10 #in kohm\n", + "R2=5 #in kohm\n", + "RE=2 #in kohm\n", + "RC=1 #in kohm\n", + "VCC=12 #in volt\n", + "Beta=100 #unitless\n", + "VBE=0.7 #in volt\n", + "#Part (i)\n", + "#Formula : VBE=VBBdash-IB*RBdash-IE*RE\n", + "print \"IB is very small : VBE=VBBdash-IE*RE\"\n", + "VBBdash=(R2/(R1+R2))*VCC #in volt\n", + "IE=(VBBdash-VBE)/(RE*10**3) #in Ampere\n", + "print \"As base current is very small IC=IE\"\n", + "IC=IE #in mA\n", + "#Formul : VCC=IC*RC+VCE+IE*RE\n", + "VCE=VCC-IC*RC*10**3-IE*RE*10**3 #in Volt\n", + "print \"Operating point is (\",VCE,\"V,\",IC*10**3,\"mA)\" \n", + "#Part (ii)\n", + "RBdash=(R1*R2/(R1+R2)) #in kOhm\n", + "S=(Beta+1)/(1+Beta*(RE/(RBdash+RE))) \n", + "print \"Staility factor S =\",round(S,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "IB is very small : VBE=VBBdash-IE*RE\n", + "As base current is very small IC=IE\n", + "Operating point is ( 7.05 V, 1.65 mA)\n", + "Staility factor S = 2.62\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.17, page 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data : \n", + "R1=200 #in kohm\n", + "R2=100 #in kohm\n", + "RE=1 #in kohm\n", + "RC=1 #in kohm\n", + "VCC=9 #in volt\n", + "he=2 #in kohm\n", + "hfe=100 #unitless\n", + "hoe=0 #unitless\n", + "hre=0 #unitless\n", + "VBE=0.7 #in volt(For Si)\n", + "#Part (i)\n", + "RB=R1*R2/(R1+R2) #in kohm\n", + "VBBdash=(R2/(R1+R2))*VCC #in volt\n", + "#Applying Kirchoff Law \n", + "IB=(VBBdash-VBE)/(RB*10**3+RE*10**3*(1+hfe)) #in Ampere\n", + "IC=hfe*IB #in Ampere\n", + "print \"Value of IC = %0.2f mA\" %(IC*10**3)\n", + "#Part (ii)\n", + "#Applying Kirchoff Law \n", + "VCE=VCC-IC*RC*10**3-RE*1063*IB*(hfe+1) #in volt\n", + "print \"VCE = %0.1f Volt\" %(VCE,)\n", + "#Note : Ans of VCE is wrong in the book as VCC=10 V has been taken instead of 9 volt." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of IC = 1.37 mA\n", + "VCE = 6.2 Volt\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.18, page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data : \n", + "RB=50 #in kohm\n", + "RC=3 #in kohm\n", + "VCC=10 #in volt\n", + "VEE=5 #in volt\n", + "hfe=100 #unitless\n", + "VCEsat=0.2 #in volt\n", + "VBEsat=0.8 #in volt\n", + "VBEactive=0.7 #in volt\n", + "VBE=0.7 #in volt(For Si)\n", + "#Applying \n", + "IB=(VEE-VBE)/(RB*10**3) #in Ampere: Kirchoff 2nd Law : VEE-RB*IB-VBE=0\n", + "IC=hfe*IB #in Ampere \n", + "VCB=VCC-IC*RC*10**3-VBEactive #in volt: #Applying Kirchoff 2nd Law to collector-emitter loop: VCC-IC*RC-VCB-VBEactive=0\n", + "print \"Collector to base voltage, VCB = %0.1f V\" %VCB\n", + "print \"This shows that the base collector junction is forward biased. This implies that the transistor is in saturation region.\"\n", + "IB=(VEE-VBEsat)/(RB*10**3) #in Ampere\n", + "print \"Value of IB = %0.3f mA\" %(IB*10**3)\n", + "IC=(VCC-VCEsat)/(RC*10**3) \n", + "print \"Value of IC = %0.2f mA\" %(IC*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector to base voltage, VCB = -16.5 V\n", + "This shows that the base collector junction is forward biased. This implies that the transistor is in saturation region.\n", + "Value of IB = 0.084 mA\n", + "Value of IC = 3.27 mA\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.19, page 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data : \n", + "VCC=20 #in volt\n", + "VBE=0.7 #in volt(For Si)\n", + "Beta=50 #unitless\n", + "RE=200 #in ohm\n", + "R1=60 #in kohm\n", + "R2=30 #in kohm\n", + "V2=VCC*R2/(R1+R2) #in volt\n", + "VEO=V2-VBE #in volt\n", + "print \"Voltage across RE = %0.2f Volt\" %VEO" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across RE = 5.97 Volt\n" + ] + } + ], + "prompt_number": 62 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter3_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter3_1.ipynb new file mode 100755 index 00000000..90f9fcf9 --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter3_1.ipynb @@ -0,0 +1,615 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter3 - Transistor amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.1, page 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "ib=10 #in uA\n", + "ic=1 #in mA\n", + "ic=ic*10**3 #in uA\n", + "vi=0.02 #in Volt\n", + "RC=5 #in kohm\n", + "RL=10 #in kohm\n", + "#Part (i)\n", + "Ai=-ic/ib #unitless\n", + "Beta=Ai #unitless\n", + "print \"Current gain =\",Ai\n", + "#Part (ii)\n", + "Rie=vi/(ib*10**-6) #in Ohm\n", + "print \"Input impedence = %0.1f kohm\" %(Rie*10**-3,)\n", + "#Part (iii)\n", + "Rac=RC*RL/(RC+RL) #in kohm\n", + "print \"AC load = %0.1f kohm\" %Rac\n", + "#Part (iv)\n", + "Av=-Rac*10**3*Beta/Rie #unitless\n", + "print \"Voltage gain = %0.1f \" %(Av) \n", + "#Part (v)\n", + "PowerGain=Av*Ai #unitless\n", + "print \"Power Gain =\",round(PowerGain,2) \n", + "#Note : Ans of Av and Power gain is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current gain = -100.0\n", + "Input impedence = 2.0 kohm\n", + "AC load = 3.3 kohm\n", + "Voltage gain = 166.7 \n", + "Power Gain = -16666.67\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.2, page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "RL=10.0 #in kohm\n", + "RS=1.0 #in kohm\n", + "hie=1.1 #in kOhm\n", + "hre=2.5*10**-4 #unitless\n", + "hfe=50.0 #unitless\n", + "hoe=25.0 #in u mho\n", + "Aie=-hfe/(1+hoe*10**-6*RL*10**3) #unitless\n", + "Zie=hie+hre*Aie*RL #in kOhm\n", + "Zie=round(Zie) \n", + "Ave=Aie*RL/Zie #unitless\n", + "Avs_e=Ave*Zie/(Zie+RS) #\n", + "deltah=hoe*10**-6*hie*10**3-hfe*hre \n", + "Zoe=(hie*10**3+RS*10**3)/(hoe*10**-6*RS*10**3+deltah) \n", + "Ais_e=Aie*RS/(Zie+RS) \n", + "Ape=Ave*Aie \n", + "Aps_e=Avs_e*Ais_e \n", + "print \"Current gain : \",Aie\n", + "print \"Current gain with source resistance : \",Ais_e\n", + "print \"Voltage gain : \",Ave,\n", + "print \"Voltage gain with source resistance : \",Avs_e\n", + "print \"Power gain : \",Ape\n", + "print \"Power gain with source resistance : \",Aps_e\n", + "print \"Input impedence = %0.2f kohm :\"%Zie\n", + "print \"Output impedence = %0.2f kohm\" %(Zoe/10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current gain : -40.0\n", + "Current gain with source resistance : -20.0\n", + "Voltage gain : -400.0 Voltage gain with source resistance : -200.0\n", + "Power gain : 16000.0\n", + "Power gain with source resistance : 4000.0\n", + "Input impedence = 1.00 kohm :\n", + "Output impedence = 52.50 kohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.3, page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data : \n", + "InputVoltage=1 #in mV\n", + "RL=5.6 #in kohm\n", + "RS=600 #in ohm\n", + "hre=6.5*10**-4 #unitless\n", + "hie=1.7 #in kOhm\n", + "hfe=125 #unitless\n", + "hoe=80 #in uA/V\n", + "deltah=hoe*10**-6*hie*10**3-hfe*hre \n", + "Zie=(hie*10**3+RL*10**3*deltah)/(1+hoe*10**-6*RL*10**3) #in Ohm\n", + "Zoe=(hie*10**3+RS)/(hoe*10**-6*RS+deltah) #in Ohm\n", + "Ave=-(hfe*RL*10**3)/(hie*10**3+RL*10**3*deltah) #unitless\n", + "Avs_e=Ave*Zie/(Zie+RS) #\n", + "OutputVoltage=Avs_e*InputVoltage #in \n", + "print \"Input impedence = %0.3f kohm\" %(Zie/1000)\n", + "print \"Output impedence = %0.2f kohm\" %(Zoe/10**3)\n", + "print \"Voltage gain =\",round(Ave,1) \n", + "print \"Voltage gain with source resistance =\", round(Avs_e,2)\n", + "print \"Output Voltage = %0.2f mV\" %(OutputVoltage)\n", + "#Note : Ans of output impedence is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence = 1.386 kohm\n", + "Output impedence = 22.38 kohm\n", + "Voltage gain = -348.8\n", + "Voltage gain with source resistance = -243.44\n", + "Output Voltage = -243.44 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.4, page 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log10\n", + "#Given data : \n", + "A1=100 #unitless\n", + "A2=200 #unitless\n", + "A3=400 #unitless\n", + "A1=20*log10(A1) #in dB\n", + "A2=20*log10(A2) #in dB\n", + "A3=20*log10(A3) #in dB\n", + "NetVoltageGain=A1+A2+A3 #in dB\n", + "print \"Net Voltage Gain = %0.f decibels\" %NetVoltageGain\n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net Voltage Gain = 138 decibels\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.5, page 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data : \n", + "MaxGain=1000 #unitless(at 2kHz)\n", + "f1=50 #in Hz\n", + "f2=10 #in KHz\n", + "print \"Bandwidth is from \",f1,\"Hz to \",f2,\"kHz\" \n", + "print \"Lower cutoff frequency \" ,f1,\"Hz\" \n", + "print \"Upper cutoff frequency \",f2,\"kHz\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth is from 50 Hz to 10 kHz\n", + "Lower cutoff frequency 50 Hz\n", + "Upper cutoff frequency 10 kHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.6, page 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data : \n", + "RC=10.0 #in kohm\n", + "hfe=330.0 #unitless\n", + "hie=4.5 #in kOhm\n", + "#RS<>RL\" \n", + "Av=gm*10**-3*RL*10**3 #unitless\n", + "print \"Voltage amplification : \",Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "assuming rd>>RL\n", + "Voltage amplification : 20.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6, page 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "#given data\n", + "RL=20 #in Kohm\n", + "RS=1 #in Kohm\n", + "RG=1 #in Mohm\n", + "Cs=25 #in uF\n", + "mu=20 #unitless\n", + "rd=100 #in Kohm\n", + "Vs=2 #in Volt\n", + "f=1 #in KHz\n", + "Xc=1/(2*pi*f*10**3*Cs*10**-6) #in Ohm\n", + "print \"Xc = %0.1f\"%Xc,\" Ohm\"\n", + "print \"As Xc<" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11, page 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "L=1.25 #in um\n", + "mu_n=0.065 #in m**2/V-s\n", + "Cox=6.9*10**-4 #in F/m**2\n", + "VT=0.65#in Volt\n", + "ID_sat=4 #in mA\n", + "VGS=5 #in Volt\n", + "#Formula : ID_sat=W*mu_n*Cox*(VGS-VT)**2/(2*L)\n", + "W=ID_sat*10**-3*2*L*10**-6/(mu_n*Cox*(VGS-VT)**2) #in meter\n", + "print \"Channel Width = %0.1f\" %(W*10**6),\" micro meter\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Channel Width = 11.8 micro meter\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter7_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter7_1.ipynb new file mode 100755 index 00000000..b7106c74 --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter7_1.ipynb @@ -0,0 +1,244 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter7 - Magnetic materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.1, page 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "Bo=1.7*10**-5 #in weber/m**2\n", + "meu_o=4*pi*10**-7 #permeability of free space in weber/amp-meter\n", + "H=Bo/meu_o #in A/m\n", + "print \"Horizontal component of magnetic filed intensity = %0.1f\"%H,\" A/m\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of magnetic filed intensity = 13.5 A/m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.2, page 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "H=5*10**3 #in Ampere-turns/m\n", + "l=10 #in cm\n", + "l=l*10**-2 #in meter\n", + "N=50 #no. of turns\n", + "n=N/l #no. of turns per unit length\n", + "#Formula : H=n*i\n", + "i=H/n #in Ampere\n", + "print \"Current should be sent through solenoid = %0.1f Ampere\" %i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current should be sent through solenoid = 10.0 Ampere\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.3, page 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "meu_r=1000 #relative permeability\n", + "n=5 #turns/cm\n", + "n=n*10**2 #turns/meter\n", + "i=0.5 #in Ampere\n", + "Volume=10**-4 #in m**3\n", + "I=(meu_r-1)*n*i #in Ampere\n", + "MagneticMoment=I*Volume #in Ameter**2\n", + "print \"Magnetic moment of the rod = %0.1f Ampere-meter2\" %round(MagneticMoment)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment of the rod = 25.0 Ampere-meter2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.4, page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "l=30 #in cm\n", + "l=l*10**-2 #in meter\n", + "A=1 #in cm**2\n", + "A=A*10**-4 #in meter**2\n", + "N=300 #turns of wire\n", + "i=0.032 #in Ampere\n", + "FI_B=2*10**-6 #in weber\n", + "meu_o=4*pi*10**-7 #permeability of free space in weber/amp-meter\n", + "B=FI_B/A #in weber/meter**2\n", + "print \"Flux Density = %0.1e\"%B,\" weber/meter2\"\n", + "H=N*i/l #in amp-turn/meter\n", + "print \"magnetic Intensity = %0.1f amp-turn/meter\" %H\n", + "meu=B/H #in weber/Amp-meter\n", + "print \"Permeability = %0.2e weber/amp-meter\" %meu\n", + "meu_r=meu/meu_o #Relative Permeability\n", + "print \"Relative Permeability = %0.1f\" %meu_r \n", + "#Answer of relative permeability is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux Density = 2.0e-02 weber/meter2\n", + "magnetic Intensity = 32.0 amp-turn/meter\n", + "Permeability = 6.25e-04 weber/amp-meter\n", + "Relative Permeability = 497.4\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.5, page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Xci_m=9.48*10**-9 #usceptibility of medium(unitless)\n", + "meu_r=1+Xci_m #relative permeability(unitless)\n", + "print \"Relative Permeability : \",meu_r " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative Permeability : 1.00000000948\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.6, page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=10 #turns/cm\n", + "n=n*10**2 #turns/meter\n", + "i=2 #in Ampere\n", + "B=1 #in weber/meter**2\n", + "meu_o=4*pi*10**-7 #permeability of free space in weber/amp-meter\n", + "H=n*i #in amp-turn/meter\n", + "print \"Magnetising Force = %0.2f amp-turn/meter \" %H\n", + "#Formula : B=meu_o*(H+I)\n", + "I=B/meu_o-H #in amp-turn/meter\n", + "print \"Magnetisation of material = %0.2e amp-turn/meter\" %I \n", + "meu_r=B/(meu_o*H) #relative permeability(unitless)\n", + "print \"Relative Permeability : %d\" %meu_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetising Force = 2000.00 amp-turn/meter \n", + "Magnetisation of material = 7.94e+05 amp-turn/meter\n", + "Relative Permeability : 397\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter8_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter8_1.ipynb new file mode 100755 index 00000000..212cffad --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter8_1.ipynb @@ -0,0 +1,592 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter8 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.1, page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "A=50 #unitless\n", + "print \"Barkhausen criterion for oscillator : Beta*A=1\"\n", + "Beta=1/A #unitless\n", + "print \"Feedback Factor to make oscillator : \",Beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Barkhausen criterion for oscillator : Beta*A=1\n", + "Feedback Factor to make oscillator : 0.02\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.2, page 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#Given data\n", + "L=100 #in uH\n", + "L=L*10**-6 #in H\n", + "f1=500 #in kHz\n", + "f1=f1*10**3 #in Hz\n", + "f2=1500 #in kHz\n", + "f2=f2*10**3 #in Hz\n", + "#Formula : f=1/(2*pi*sqrt(L*C))\n", + "C1=1/(4*pi**2*f1**2*L) #in F\n", + "C2=1/(4*pi**2*f2**2*L) #in F\n", + "print \"Range of capacitor : %0.f\" %(C2*10**12),\" pF to %0.f\" %(C1*10**12),\" pF\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range of capacitor : 113 pF to 1013 pF\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.3, page 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#Given data\n", + "L=100 #in mH\n", + "L=L*10**-3 #in H\n", + "C1=0.1 #in uF\n", + "C1=C1*10**-6 #in F\n", + "f=100 #in kHz\n", + "f=f*10**3 #in Hz\n", + "#Formula : f=1/(2*pi*sqrt(L*C))\n", + "C=1/(4*pi**2*f**2*L) #in F\n", + "#Formula : C=C1*C2/(C1+C2)\n", + "C2=C*C1/(C1-C)*10**9\n", + "print \"C2 = %0.3f nano Farad\" %C2\n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C2 = 0.025 nano Farad\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.4, page 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#Given data\n", + "R=100 #in kOhm\n", + "R=R*10**3 #in Ohm\n", + "C=0.01 #in uF\n", + "C=C*10**-6 #in F\n", + "fo=sqrt(6)/(2*pi*R*C) #in Hz\n", + "print \"Frequency of oscillation = %0.1f Hz\" %fo\n", + "#Note : Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation = 389.8 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.5, page 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#Given data\n", + "print \"Put alfa=sqrt(6) to find the gain\"\n", + "alfa=sqrt(6) #unitless\n", + "Beta=1/(1-5*alfa**2) \n", + "#Barkhausen critera : A*|Beta|>=1\n", + "Beta=-Beta #\n", + "A=1/Beta #unitless\n", + "print \"Minimum Gain of Amplifier must be %0.1f \" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Put alfa=sqrt(6) to find the gain\n", + "Minimum Gain of Amplifier must be 29.0 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.6, page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "R1=50 #in kohm\n", + "R1=R1*10**3 #in ohm\n", + "C1=0.001 #in uF\n", + "C1=C1*10**-6 #in F\n", + "R2=1 #in kohm\n", + "R2=R2*10**3 #in ohm\n", + "C2=0.01 #in uF\n", + "C2=C2*10**-6 #in F\n", + "#Part (i)\n", + "#Formula : f=1/(2*pi*sqrt(C1*C2*R1*R2))\n", + "f=1/(2*pi*sqrt(C1*C2*R1*R2)) #in Hz\n", + "print \"Frequency of oscillations = %0.2f kHz\" %(f/1000)\n", + "#Part (ii)\n", + "CurrentGain=1+C2/C1+R1/R2 #unitless\n", + "print \"Current Gain = %0.2f \" %CurrentGain\n", + "# Answer in the textbook is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 7.12 kHz\n", + "Current Gain = 61.00 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.7, page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data :\n", + "fmin=20 #in Hz\n", + "fmax=20 #in kHz\n", + "Cmin=30 #in pF\n", + "Cmax=300 #in pF\n", + "#Formula : fo=1/(2*pi*R*C))\n", + "print \"Minimum Fequeny correspond to maximum capacitance.\"\n", + "R=1/(2*pi*fmin*Cmax*10**-12)\n", + "print \"Required resistance = %0.2f Mohm\" %(R/10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum Fequeny correspond to maximum capacitance.\n", + "Required resistance = 26.53 Mohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.8, page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "f=500 #in kHz\n", + "T1=50 #in degree C\n", + "T2=60 #in degree C\n", + "TC=-20 #in ppm/degree C\n", + "ChangeInFreq=TC*(f*10**-3)*(T1-T2) #in Hz\n", + "ResonantFreq=f*1000-ChangeInFreq #in Hz\n", + "print \"Resonant frequency = %0.2f kHz\" %(ResonantFreq/1000)\n", + "#Note : answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency = 499.90 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.9, page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "f=450 #in kHz\n", + "T1=30 #in degree C\n", + "T2=50 #in degree C\n", + "TC=-10 #in ppm/degree C\n", + "PercentChange=-TC*100/10**6 #in %\n", + "TotalChangeInFreq=(PercentChange/100)*(f*10**3)*(T2-T1) #in Hz\n", + "ResonantFreq=f*1000-TotalChangeInFreq #in Hz\n", + "print \"Resonant frequency = %0.2f kHz\" %(ResonantFreq/1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency = 449.91 kHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 8.10, page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "#Given data :\n", + "L=0.5 #in H\n", + "C=0.05 #in pF\n", + "R=1 #in kohm\n", + "Cm=1 #in pF\n", + "fs=1/(2*pi*sqrt(L*C*10**-12)) #in Hz\n", + "print \"Series resonant frequency = %0.5f MHz\" %(fs/10**6) \n", + "fp=1/(2*pi*sqrt((L*C*10**-12*Cm*10**-12)/(C*10**-12+Cm*10**-12))) #in Hz\n", + "print \"Parallel resonant frequency = %0.2f MHz\" %(fp/10**6) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 1.00658 MHz\n", + "Parallel resonant frequency = 1.03 MHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa Misc 8.1, page 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "#given data\n", + "L2=0.4 #in mH\n", + "C=0.004 #in \u00b5F\n", + "f=120 #in KHz\n", + "L1=1/(4*pi**2*(f*10**3)**2*C*10**-6)-L2*10**-3 #in H\n", + "print \"Value of L1 = %0.2f mH\" %(L1*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of L1 = 0.04 mH\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa Misc 8.2, page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "fo=10 #in KHz\n", + "R1=25 #in kohm\n", + "R2=60 #in kohm\n", + "Rc=40 #in kohm\n", + "R=7.1 #in kohm\n", + "hie=1.8 #in kohm\n", + "C=1/(2*pi*fo*10**3*R*10**3*sqrt(6+4*Rc/R)) #in F\n", + "print \"Value of Capacito = %0.2f nF\" %(C*10**9)\n", + "hfe=23+29*R/Rc+4*Rc/R #unitless\n", + "print \"Value of hfe is \u2265 \",round(hfe,2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Capacito = 0.42 nF\n", + "Value of hfe is \u2265 50.68\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa Misc 8.3, page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "R=100 #in kohm\n", + "fo=10 #in KHz\n", + "C=1/(2*pi*fo*10**3*R*10**3) #in F\n", + "print \"Value of Capacitor = %0.f pF\" %(C*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Capacitor = 159 pF\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa Misc 8.4, page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi\n", + "#given data\n", + "L=40 #in mH\n", + "C1=100 #in pF\n", + "C2=500 #in pF\n", + "Vout=10 #in volt\n", + "fo=1/(2*pi*sqrt(L*10**-3*C1*10**-12*C2*10**-12/(C1*10**-12+C2*10**-12)))\n", + "print \"Frequency of oscillation = %0.1f kHz\" %(fo*10**-3)\n", + "Vf=Vout*C1/C2 #in volt\n", + "print \"Feedback voltage = %0.f Volt\" %Vf\n", + "Gain=C2/C1 #unitless\n", + "print \"Minimum Gain = %0.f\" %Gain \n", + "#if Gain=10\n", + "Gain=10 #given\n", + "C1=C2/Gain #in pF\n", + "print \"For a gain of 10 C1 = %0.f pF\" %C1 \n", + "fo=1/(2*pi*sqrt(L*10**-3*C1*10**-12*C2*10**-12/(C1*10**-12+C2*10**-12)))\n", + "print \"New frequency of oscillation = %0.1f kHz\" %(fo*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation = 87.2 kHz\n", + "Feedback voltage = 2 Volt\n", + "Minimum Gain = 5\n", + "For a gain of 10 C1 = 50 pF\n", + "New frequency of oscillation = 118.0 kHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa Misc 8.5, page 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt, pi\n", + "from __future__ import division \n", + "#given data\n", + "L=0.5 #in H\n", + "Cs=0.06 #in pF\n", + "Cp=1 #in pF\n", + "R=5 #in Kohm\n", + "fs=1/(2*pi*sqrt(L*Cs*10**-12)) #in Hz\n", + "Q=2*pi*fs*L/(R*10**3) #Q-factor\n", + "print \"Seies resonance frequency = %0.1f kHz \" %(fs/10**3)\n", + "print \"Q-factor of the crystal at fs is %0.f\" %round(Q) \n", + "fp=(1/(2*pi))*sqrt((Cs*10**-12+Cp*10**-12)/(L*Cs*10**-12*Cp*10**-12)) #in Hz\n", + "Q=2*pi*fp*L/(R*10**3) #Q-factor\n", + "print \"Seies resonance frequency = %0.f kHz\" %(fp/10**3)\n", + "print \"Q-factor of the crystal at fs is %0.f\" %round(Q) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Seies resonance frequency = 918.9 kHz \n", + "Q-factor of the crystal at fs is 577\n", + "Seies resonance frequency = 946 kHz\n", + "Q-factor of the crystal at fs is 594\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter9_1.ipynb b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter9_1.ipynb new file mode 100755 index 00000000..ec194fbe --- /dev/null +++ b/A_Textbook_Of_Electronic_Devices_And_Circuits_by_Satya_Prakash_And_Saurabh_Rawat/chapter9_1.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter9 - Unijunction transistor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.1, page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "VBB=20 #in volt\n", + "VB=0.7 #in volt(For Si)\n", + "ETA=0.6 #intrinsic stand off ratio\n", + "#Part (i)\n", + "StandOffVoltage=ETA*VBB #in volt\n", + "print \"Stand Off Voltage = %0.f Volts\" %StandOffVoltage\n", + "#Part (ii)\n", + "VP=ETA*VBB+VB #in volts\n", + "print \"Peak point Voltage = %0.1f Volts\" %VP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stand Off Voltage = 12 Volts\n", + "Peak point Voltage = 12.7 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.2, page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log\n", + "#Given data :\n", + "VP=10 #in volt\n", + "R=100 #in Kohm\n", + "C=1000 #in pF\n", + "VBB=20 #in Volts\n", + "ETA=VP/VBB #intrinsic stand off ratio\n", + "T=R*10**3*C*10**-12*log(1/(1-ETA)) #in sec\n", + "print \"Time period of sawtooth wave = %0.2f micro seconds \" %(T*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time period of sawtooth wave = 69.31 micro seconds \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.3, page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data :\n", + "RBB=10 #in Kohm\n", + "ETA=0.6 #intrinsic stand off ratio\n", + "RB1=ETA*RBB #in Kohm\n", + "RB2=RBB-RB1 #in Kohm\n", + "print \"Resistance RB1 = %0.f kohm\" %RB1\n", + "print \"Resistance RB2 = %0.f kohm\" %RB2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance RB1 = 6 kohm\n", + "Resistance RB2 = 4 kohm\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch2.png b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch2.png new file mode 100755 index 00000000..8f595e04 Binary files /dev/null and b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch2.png differ diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch4.png b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch4.png new file mode 100755 index 00000000..c870c174 Binary files /dev/null and b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch4.png differ diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch6.png b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch6.png new file mode 100755 index 00000000..7d76a98d Binary files /dev/null and b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials/screenshots/ch6.png differ diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch15.ipynb b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch15.ipynb new file mode 100755 index 00000000..0e33c41b --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch15.ipynb @@ -0,0 +1,1519 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2bfefcadaa718507ffce320b2a9e88c48f532d56e63330baf14689d9ab6650e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Miscellaneous Solved Numerical Problems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page No : 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 0.2 #total resistance of cable in ohms\n", + "I = 200. #current in A\n", + "t = 100. #time in hours\n", + "V = 240. #voltage in volts\n", + "c = 0.8 #math.cost of electrical energy in Rs per unit\n", + "\n", + "# Calculations\n", + "V1 = I*R #voltage drop in the cable\n", + "#(i)consumer voltage\n", + "Vc = V-V1\n", + "#(ii)Power loss in the cable\n", + "P = I*I*R #in watts\n", + "E = P*t/1000 #energy loss in kWh\n", + "C = E*c #math.cost of energy loss in Rs.\n", + "\n", + "# Results\n", + "print 'i)Consumer voltage is %3.1f Volts '%(Vc)\n", + "print 'ii)cost of energy loss is Rs %3.2f '%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Consumer voltage is 200.0 Volts \n", + "ii)cost of energy loss is Rs 640.00 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vi = 220. #voltage in volts supplied by dynamo\n", + "Vo = 200. #voltage in volts required for lighting\n", + "I = 40. #current in Amperes\n", + "\n", + "# Calculations\n", + "Pi = Vi*I #power output of dynamo\n", + "Po = Vo*I #power consumed for lighting\n", + "L = Pi-Po #line losses\n", + "R = L/(I**2) #resistance of lines math.since line losses = I**2*R\n", + "t = 10 #time in hrs\n", + "N = (Po*t)/1000 #no of units of consumed in B.O.T units\n", + "Nw = (L*t)/1000 #No of units wasted in B.O.T units\n", + "\n", + "# Results\n", + "print 'i)Resistance of lines is %3.1f Ohms '%(R)\n", + "print 'ii)No. of B.O.T units consumed in 10hrs is %3.2f B.O.T units'%(N)\n", + "print 'iii)No. of B.O.T units wasted in 10hrs is %3.2f B.O.T units'%(Nw)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Resistance of lines is 0.5 Ohms \n", + "ii)No. of B.O.T units consumed in 10hrs is 80.00 B.O.T units\n", + "iii)No. of B.O.T units wasted in 10hrs is 8.00 B.O.T units\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "M = 250000. #weight of water lifted per hr in kg\n", + "h = 50. #height in metres\n", + "g = 9.81 #gravitational const.\n", + "WD = M*h*g #work done by pump per hr in watt-sec\n", + "P = WD/3600 #Power output of pump per sec in watts\n", + "V = 500. #supply voltage in volts\n", + "Ep = 0.8 #efficiency of pump\n", + "Em = 0.9 #efficiency of motor\n", + "\n", + "# Calculations\n", + "E = Em*Ep #overall efficiency\n", + "I = P/(V*E) #current in amperes\n", + "\n", + "# Results\n", + "print 'Current drawn by the motor is %3.2f Amperes'%(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current drawn by the motor is 94.62 Amperes\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "P = 10. #Power developed by motor in H.P\n", + "N = 600. #Speed of motor in rpm\n", + "#1HP = 735.5Nw-m/sec = 75kgm/sec\n", + "a = 75.\n", + "b = 735.5\n", + "\n", + "# Calculations\n", + "#Torque in kg-m\n", + "Tkgm = (P*a*60)/(2*math.pi*N) #math.since P = 2*pi*NT/60\n", + "#Torque in Nw-m\n", + "TNwm = (P*b*60)/(2*math.pi*N) #math.since P = 2*pi*NT/60\n", + "\n", + "# Results\n", + "print 'i)Torque in kg.meter is %3.2f kg-m '%(Tkgm)\n", + "print 'ii)Torque in Newton.meter is %3.2f Nw-m'%(TNwm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Torque in kg.meter is 11.94 kg-m \n", + "ii)Torque in Newton.meter is 117.06 Nw-m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5 Page No : 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 25. #Output of diesel engine in kW\n", + "s = 12500. #calorific value of fuel oil in k-cal/kgm\n", + "e = 0.35 #overall efficiency of diesel set\n", + "P1 = P/e #input energy required in 1 hour in kWh\n", + "\n", + "# Calculations\n", + "P2 = P1*860 #input energy in kcal\n", + "m = P2/s #mass of oil needed per hr in kgm\n", + "w = 1000 #weight of 1 ton of oil in kgm\n", + "Eg = (P*w)/m #Energy generated by 1ton of oil in kWh\n", + "\n", + "# Results\n", + "print 'i)Mass of oil required per hr is %3.3f kgm '%(m)\n", + "print 'ii)Eletrical energy generated per ton of fuel is %4.1f Kwh'%(Eg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)Mass of oil required per hr is 4.914 kgm \n", + "ii)Eletrical energy generated per ton of fuel is 5087.2 Kwh\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.10 Page No : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "rho = 1.7*(10**-6) #resistivity of copper in ohm-cm\n", + "l = 5 #length in metres\n", + "t = 0.005 #thickness in m\n", + "D = 0.08 #external diameter in m\n", + "\n", + "# Calculations\n", + "d = D-(2*t) #internal diameter in m\n", + "a = math.pi*(D**2-d**2)/4 #cross section area in cm**2\n", + "R = rho*l/a #resistance of copper tube in ohm\n", + "R1 = R/(10**-4) #resistance in micro-ohm\n", + "\n", + "# Results\n", + "print 'Thus the resistance of copper tube is %3.2f micro-ohm'%(R1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of copper tube is 72.15 micro-ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.11 Page No : 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "rho = 1.7*(10**-8) #resistivity in ohm-m\n", + "K = 1/rho #conductivity in mho/m\n", + "\n", + "# Calculations\n", + "a = 0.125*(10**-4) #cross sectional area of cable in m**2\n", + "l = 2000. #length of cable in meters\n", + "G = K*a/l #conducmath.tance\n", + "\n", + "# Results\n", + "print 'Thus conductivity of cable is %e mho/metres '%(K)\n", + "print 'and conducmath.tance of cable is %3f mho'%(G)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus conductivity of cable is 5.882353e+07 mho/metres \n", + "and conducmath.tance of cable is 0.367647 mho\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.12 Page No : 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 0.05 #volume in m**3\n", + "l = 300 #length in m\n", + "R = 0.0306 #resistance of conductor in ohm\n", + "\n", + "# Calculations\n", + "rho = R*V/(l**2) #resistivity of conducting material\n", + "\n", + "# Results\n", + "print 'Thus resistivity of conducting material is %e ohm-m'%(rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistivity of conducting material is 1.700000e-08 ohm-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.13 Page No : 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "rho = 0.67*(10**-6) #resistivity in ohm-inch\n", + "m = 39.4 #1meter = 39.4inch\n", + "m2 = 1525. #1 meter2 = 1525 square inch\n", + "\n", + "# Calculations\n", + "rhoc = rho*m/m2 #resistivity of copper in ohm/m**3\n", + "rho1 = rhoc/(10**-6)\n", + "\n", + "# Results\n", + "print 'Thus resistivity of copper is %e ohm/m**3'%(rhoc)\n", + "print 'which is equal to %2.4f micro-ohm/m**3'%(rho1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistivity of copper is 1.731016e-08 ohm/m**3\n", + "which is equal to 0.0173 micro-ohm/m**3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.14 Page No : 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "R1 = 0.12 #old conductor resistance in ohm\n", + "d1 = 15. #diameter of old conductor in cm\n", + "d2 = 0.4*d1 #diameter of new conductor in cm\n", + "\n", + "# Calculations\n", + "a1 = math.pi*(d1**2)/4 #area of cross section of old conductor\n", + "a2 = math.pi*(d2**2)/4 #area of cross section of new conductor\n", + "#R = rho*l/a = rho*V/a**2\n", + "#Henec R is proportional to 1/a**2\n", + "R2 = R1*((a1/a2)**2) #resistance of new conductor\n", + "\n", + "# Results\n", + "print 'Thus resistance of new conductor is %2.4f ohm'%(R2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of new conductor is 4.6875 ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15 Page No : 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "lab = 10. #la = 10*lb ratio of length of A to length of B.\n", + "Aab = 1./2 #Aa = 1/2*Ab ratio of area of A to area of B\n", + "RHOab = 1./2 #RHOa = 2*RHOb ratio of resistivity of A to resistivity of B\n", + "Ra = 2. #resistance of A in ohm\n", + "\n", + "# Calculations\n", + "Rb = (Ra*Aab)/(lab*RHOab) #resistance of B in ohm\n", + "#Since Ra = RHOa*la/Aa and Rb = RHOb*lb/Ab so from ratio of two we get Rb\n", + "\n", + "# Results\n", + "print 'Thus resistance of resistor B is %2.2f ohm'%(Rb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of resistor B is 0.20 ohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.16 Page No : 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "RHOo = 10.3*(10**-6) #resistivity of platinum wire at 0 degree in ohm-cm\n", + "d = 0.0074 #diameter of platinum wire\n", + "a = math.pi*(d**2)/4 #area of cross section of platinum wire in sq cm\n", + "Ro = 4. #resistance of wire in ohm\n", + "\n", + "# Calculations\n", + "l = Ro*a/RHOo #length of wire in cm\n", + "alphao = 0.0038\n", + "t = 100 #temp in degree C\n", + "R100 = Ro*(1+(alphao*t))\n", + "\n", + "# Results\n", + "print 'Thus length of wire required is %3.2f cms'%(l)\n", + "print 'and Resistance of wire at 100 degreeC is %2.2f ohms'%(R100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus length of wire required is 16.70 cms\n", + "and Resistance of wire at 100 degreeC is 5.52 ohms\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.17 Page No : 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 1. #resistance of A in ohm\n", + "lab = 20. #ratio of length of A to length of B\n", + "Aab = 1./3 #ratio of area of A to area of B\n", + "\n", + "# Calculations\n", + "#resistivity is same for both wires\n", + "Rb = Ra*(Aab/lab) #resistance of wire B in ohm\n", + "#math.since Ra = rho*la/Aa and Rb = rho*lb/Ab so from ratio of both we get Rb\n", + "\n", + "# Results\n", + "print 'Thus resistance of wire B is %2.4f omhs'%(Rb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of wire B is 0.0167 omhs\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.19 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 2./(2+3) #current across 2V battery in circuit EBD in A\n", + "Vbe = 3*I1 #voltage dropp across BE in V\n", + "I2 = 4./(5+3) #current across 4V battery in circuit AFC in A\n", + "\n", + "# Calculations\n", + "Vaf = 3*I2 #voltage dropp across AF in V\n", + "V = Vbe+4-Vaf #sum of potential drops starting from E and ending at F\n", + "\n", + "# Results\n", + "#V is the P.D. between E and F\n", + "print 'Thus the P.D. between E and F is %2.1f Volts'%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the P.D. between E and F is 3.7 Volts\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.20 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "#Let current in XA = I, in XY = I1, in AY = I-40, in YB = I-40+I1-60, in BX = I+I1-150.\n", + "#By Kirchhoff's second law, in circuit XAYA I-I1 = 20\n", + "# and in circuit XAYBX 25I+15I1 = 1950\n", + "I1 = (1950-500.)/(15.+25) #in Amperes\n", + "\n", + "# Results\n", + "print 'Thus the current in branch XY is I1 = %2.2f Amps'%(I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the current in branch XY is I1 = 36.25 Amps\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.21 Page No : 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "A = 30. #area of hysteresis material in cm**2\n", + "s1 = 0.4 #scale is 1cm = 0.4Wb/m**2\n", + "s2 = 400. # and 1cm = 400AT/m\n", + "\n", + "# Calculations\n", + "V = 1.2*(10**-3)\n", + "f = 50 #frequency in Hz\n", + "H = A*s1*s2 #hysteresis loss/m**3/cycle in joules\n", + "Hp = H*V*f #hysteresis power loss in Watts\n", + "\n", + "# Results\n", + "print 'Thus hysteresis power loss is %3.2f Watts'%(Hp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus hysteresis power loss is 288.00 Watts\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.22 Page No : 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "d = 7500. #density of iron in kg/m**3\n", + "w = 12. #weight of iron in kgm\n", + "\n", + "# Calculations\n", + "V = w/d #volume of iron in m**3\n", + "f = 25. #frequency in Hz\n", + "N = 3600.*f #number of cycle per hour\n", + "A = 300 #area in joules/m**3\n", + "E = A*V*N #Total energy loss per hour in joules\n", + "\n", + "# Results\n", + "print 'Thus total energy loss per hour is %5.2f Joules'%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total energy loss per hour is 43200.00 Joules\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.23 Page No : 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "l = 0.5 #length of coil in meters\n", + "d = 0.1 #diameter of coil\n", + "N = 1500. #no of turns of coil\n", + "\n", + "# Calculations\n", + "a = math.pi*(d**2)/4 #cross sectional area of coil in m**2\n", + "Ur = 1 #relative permeability\n", + "Uo = 4*math.pi*(10**-7) #permeability\n", + "I = 8 #current in A\n", + "L = ((N**2)*a*Uo*Ur)/l #self inducmath.tance of coil in H\n", + "E = (1./2)*L*(I**2) #Energy stored in Joules\n", + "\n", + "# Results\n", + "print 'Thus Self Inducmath.tance of coil is %2.3f H'%(L)\n", + "print 'and Energy stored is %1.2f Joules'%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Self Inducmath.tance of coil is 0.044 H\n", + "and Energy stored is 1.42 Joules\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.24 Page No : 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N = 600. #number of turns on the coil\n", + "I = 2. #current pasmath.sing through solenoid in A\n", + "l = 0.6 #length of solenoid in meter\n", + "H = N*I/l #magnetic field at the centre in AT/m\n", + "Ur = 1. #relative permeability\n", + "\n", + "# Calculations\n", + "Uo = 4*math.pi*(10**-7) #permeability\n", + "d = 0.025 #diameter in meters\n", + "a = math.pi*(d**2)/4 #cross sectional area of coil in m**2\n", + "phi = Uo*Ur*H*a #flux in Wb\n", + "\n", + "# Results\n", + "print 'Thus Magenetic field at centre is %3.2f AT/m'%(H)\n", + "print ' and Flux is %e Wb'%(phi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Magenetic field at centre is 2000.00 AT/m\n", + " and Flux is 1.233701e-06 Wb\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.25 Page No : 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ur = 1. #relative permeability\n", + "B = 1.257 #flux density in Wb/m**2\n", + "\n", + "# Calculations\n", + "Uo = 4*math.pi*(10**-7) #permeability\n", + "H = B/(Uo*Ur) #magnetimath.sing force in AT/m\n", + "l = 0.004 #length of air gap in meter\n", + "AT = H*l #AT required for the air gap\n", + "\n", + "# Results\n", + "print 'Thus AT required for the air gap is %3.1f '%(AT)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus AT required for the air gap is 4001.2 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.26 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "D = 0.3 #diameter of anchor ring in m\n", + "l = math.pi*D #length of iron ring in m\n", + "N = 400. #number of turns on the iron ring\n", + "a = 0.0012 #area of cross section of iron path in m**2\n", + "Ur = 1000. #relative permeability\n", + "\n", + "# Calculations\n", + "Uo = 4*math.pi*(10**-7) #permeability\n", + "I = 2 #current in A\n", + "phi = (N*I)/(l/(Uo*Ur*a)) #flux through iron path in WB\n", + "phi1 = phi/(10**-3) #flux in mWb\n", + "\n", + "# Results\n", + "print 'Thus flux through iron path is %2.2f mWb'%(phi1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus flux through iron path is 1.28 mWb\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.27 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "a = 0.01 #crosssectional area of ring in m**2\n", + "Uo = 4*(math.pi)*(10**-7) #absolute permeability\n", + "lf = 1.25 #leakage factor\n", + "Ur = 400. #permeability\n", + "N = 175. #no of turns\n", + "\n", + "# Calculations\n", + "phig = 0.8*(10**-3) #flux through air gap in Wb\n", + "Bg = phig/a #Flux density in air gap in Wb/m**2\n", + "Hg = Bg/Uo #magnetimath.sing force in air gap in AT/m\n", + "Lg = 0.004 #length of air gap in m\n", + "ATg = Hg*Lg #AT required for air gap in AT\n", + "phii = phig*lf #flux through iron path in Wb\n", + "Bi = phii/a #Flux density in iron path in Wb/m**2\n", + "Hi = Bi/(Uo*Ur) #magnetimath.sing force in iron path in AT/m\n", + "Li = 1.5 #length of iron path in m\n", + "ATi = Hi*Li #At required for iron path in AT\n", + "AT = ATi+ATg #total AT required \n", + "I = ATg/N #Magnetimath.sing current required in A\n", + "\n", + "# Results\n", + "print 'Thus the magnetimath.sing current required is %2.2f Amps'%(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the magnetimath.sing current required is 1.46 Amps\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.28 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "SI = 0.2 #steady current in A\n", + "t = 0.2 #time in sec\n", + "Q = SI*t #charge given to condenser in Coulomb\n", + "V = 220. #PD across condenser in Volts\n", + "\n", + "# Calculations\n", + "C = Q/V #Capacitance of condenser in F\n", + "C1 = C*(10**6) #Capacitance in mircoF\n", + "\n", + "# Results\n", + "print 'Thus the Charge of condenser is %2.2f Coulomb'%(Q)\n", + "print 'And the Capacitance of condenser is %3.2f microF'%(C1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the Charge of condenser is 0.04 Coulomb\n", + "And the Capacitance of condenser is 181.82 microF\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.29 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C = 2*(10**-6) #capacitance of condenser in F\n", + "V = 10000 #PD across condenser in Volts\n", + "\n", + "# Calculations\n", + "E = (1./2)*C*(V**2) #energy stored in condenser in Joules\n", + "H = E/4.2 #heat produced in the wire in calories\n", + "\n", + "# Results\n", + "print 'Thus heat produced in the wire is %2.2f calories'%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus heat produced in the wire is 23.81 calories\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.30 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 15*(10**3) #potential difference applied in V\n", + "A = 0.02 #surface area of plate in m**2\n", + "d = 0.001 #dismath.tance between plates in m\n", + "C = 4.5*(10**-10) #Capacitance of capacitor in F\n", + "Ko = 8.854*(10**-12) #consmath.tant\n", + "\n", + "# Calculations\n", + "K = (C*d)/(Ko*A) #dielectric consmath.tant\n", + "q = C*V #charge on condenser in C\n", + "D = q/A #Electric flux density in C/m**2\n", + "\n", + "# Results\n", + "print 'Thus the Charge of condenser is %e Coulomb'%(q)\n", + "print 'And the electric flux density of condenser is %e microF'%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the Charge of condenser is 6.750000e-06 Coulomb\n", + "And the electric flux density of condenser is 3.375000e-04 microF\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.31 Page No : 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 0.6 #mass of water in kgm\n", + "S = 4200. #specific heat of water\n", + "T1 = 100. #temperature in degreeC\n", + "T2 = 10. #temperature in degreeC\n", + "t = 5*60. #time in sec\n", + "V = 230. #Supply voltage in Volts\n", + "\n", + "# Calculations\n", + "H = m*S*(T1-T2) #Heat required to raise the temp of water from 0 to 100 degree. in J\n", + "e = 0.78 #efficiency of kettle\n", + "Ei = H/e #Energy input in Joules\n", + "Ei1 = Ei/(100*3600) #Energy input in kWh\n", + "W = Ei/t #Rating of kettle in watts\n", + "R = (V*V)/W #Resistance of heating element in ohms\n", + "\n", + "# Results\n", + "print 'Thus Resistance of heating element is %2.1f ohms'%(R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Resistance of heating element is 54.6 ohms\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.32 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m1 = 120. #mass of water to be heated in kg\n", + "m2 = 20. #mass of copper math.tank in kg\n", + "S1 = 1. #specific heat of water\n", + "S2 = 0.095 #specific heat of copper\n", + "T1 = 10. #temp in degreeC\n", + "T2 = 60. #temp in degreeC\n", + "\n", + "# Calculations\n", + "H = (m1*S1*(T2-T1))+(m2*S2*(T2-T1)) #heat required to raise the temp of water and math.tank in kcal\n", + "H1 = H*4200 #heat required in Joules\n", + "e = 0.8 #thermal efficiency\n", + "E = H1/e #Energy input in joules\n", + "E1 = E/(1000*3600) #energy input in kWh\n", + "r = 3 #rating of heater in kW\n", + "t = E1/r #time taken in hours\n", + "\n", + "# Results\n", + "print 'Thus the time taken to raise the temp is %2.3f hours'%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the time taken to raise the temp is 2.963 hours\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.33 Page No : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "rho = 5*(10**-5) #specific resistance for steel in ohm-cm\n", + "U = 1. #relative permeability\n", + "d = 0.15 #depth of penetration in cm\n", + "\n", + "# Calculations\n", + "f = (rho*(10**9))/(U*d*d*4*(math.pi**2)) #frequency required in cycles per sec\n", + "f1 = f/1000 #frquency in k.cycles/sec\n", + "\n", + "# Results\n", + "print 'Thus the frequency required is %3.3f k.cycles/sec'%(f1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the frequency required is 56.290 k.cycles/sec\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.34 Page No : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "v = 50.*20*2 #Volume of board to be heated in cm**3\n", + "Mw = 0.56 #weight of wood in gm/cm**3\n", + "m = Mw*v/1000 #mass of wood in kgm\n", + "S = 0.35 #specific heat of wood\n", + "t = 15./60 #time in hrs\n", + "f = 30*(10**6) #frequency in cycles/sec\n", + "t2 = 150.;t1 = 30. #temp in degreeC\n", + "H = m*S*(t2-t1) #heat required to raise the temp in kcal\n", + "Hw = H*1000/860 #heat required in kW\n", + "\n", + "# Calculations\n", + "P = Hw/t #power required in Watts\n", + "e = 0.5 #efficiency of dielectric heating process\n", + "Pi = P/e #power input required in Watts\n", + "Ko = 8.854*(10**-12) #absolute permittivity\n", + "K = 5 #relative permittivity\n", + "A = 0.5*0.2 #area in m\n", + "i = 0.02\n", + "C = Ko*K*A/i #capacitance of parallel plate capacitor in F\n", + "Xc = 1/(2*math.pi*f*C) #capacitive reacmath.tance in ohms\n", + "cosx = 0.05\n", + "tanx = 19.97\n", + "R = Xc*tanx #resistance\n", + "V = math.sqrt(Pi*R) #voltage in volts\n", + "Ic = V/Xc #current through the board in Amps\n", + "\n", + "# Results\n", + "print 'Thus the power required is %2.1f Watts'%(Pi)\n", + "print 'And Voltage across the board is %3.2f volts'%(V)\n", + "print 'And the current through the board is %2.3f Amps'%(Ic)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the power required is 437.6 Watts\n", + "And Voltage across the board is 457.64 volts\n", + "And the current through the board is 19.095 Amps\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.35 Page No : 416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 2. #quantity of aluminium to be melted in kg\n", + "t1 = 15.\n", + "t2 = 660. #temp in degreeC\n", + "S = 0.212 #specific heat of aluminium\n", + "L = 78.8 #latent heat of aluminium in kcal/kg\n", + "\n", + "# Calculations\n", + "H = (m*S*(t2-t1))+(m*L) #total heat required to melt Al in kcal\n", + "i = 5 #input to furnace in kW\n", + "E = i*(1000*10*60) #Energy input to furnace in watt-sec\n", + "E1 = E/4180 #energy input in kcal\n", + "e = H*100/E1 #efficiency of furnace\n", + "\n", + "# Results\n", + "print 'Thus the efficiency of furnace is %2.3f percent'%(e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the efficiency of furnace is 60.123 percent\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.36 Page No : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "O = 5*735.5 #output of motor in W\n", + "e = 0.85 #efficiency of motor\n", + "c = 2. #math.cost of energy per unit in Rs\n", + "\n", + "# Calculations\n", + "I = O/e #input of motor in Watts\n", + "t = 4 #time in hrs\n", + "E = I*t/1000 #energy consumed in kWh\n", + "C = c*E #math.cost of umath.sing the motor in Rs\n", + "\n", + "# Results\n", + "print 'Thus the math.cost of umath.sing the motor is %2.3f Rs'%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the math.cost of umath.sing the motor is 34.612 Rs\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.37 Page No : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 2.5*(10**-3) #current in Amp\n", + "t = 30*(10**-3) #time in sec\n", + "Q = I*t #charge pasmath.sing through the person in Coulumbs\n", + "\n", + "# Calculations\n", + "e = 1.602*(10**-19) #charge of 1 electron in C\n", + "N = Q/e #no of electrons pasmath.sing through the person \n", + "\n", + "# Results\n", + "print 'Thus the no of electrons pasmath.sing through the person is %e electrons'%(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the no of electrons pasmath.sing through the person is 4.681648e+14 electrons\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.38 Page No : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#(a)Finding resistance between 2 ends\n", + "l = 1 #length in m\n", + "a = 2.5*(10**-2)*0.05*(10**-2) #area of cross section in m**2\n", + "rho = 1.724*(10**-8) #specific resistance of copper in ohm-m\n", + "\n", + "\n", + "# Calculations\n", + "R = rho*l/a #resistance of the strip in ohm\n", + "#(b) Finding resistance between 2 faces\n", + "l1 = 0.05*(10**-2) #length in m\n", + "a1 = 2.5*(10**-2)*1 #area of cross section in m**2\n", + "R1 = rho*l1/a1 #resistance in ohm\n", + "\n", + "# Results\n", + "print 'Thus the resistance of the strip is %e ohms '%(R)\n", + "print 'And the resistance between the faces is %e ohms'%(R1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of the strip is 1.379200e-03 ohms \n", + "And the resistance between the faces is 3.448000e-10 ohms\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.39 Page No : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 2. #weight of water to be heated in kg\n", + "t2 = 98.\n", + "t1 = 15. #temp in degreeC\n", + "s = 1. #specific heat of water\n", + "V = 200. #voltage in volts\n", + "\n", + "# Calculations\n", + "H = m*s*(t2-t1) #energy required to raise the temp of water in kcal\n", + "H1 = H*4200 #energy in Watt-sec or Joules\n", + "e = 0.85 #efficiency of kettle\n", + "E = H1/e #energy input required in watt-sec\n", + "E1 = E/(1000*3600) #energy input in kWh\n", + "c = 35. #math.cost per unit in paise\n", + "C = c*E1 #ocst of energy used in paise\n", + "t = 10./60 #time in hrs\n", + "W = E1*1000/t #wattage of kettle in watts\n", + "R = V*V/W #resistance of heating element in ohms\n", + "\n", + "# Results\n", + "print 'Thus the resistance of heating element is %2.0f ohms'%(R)\n", + "print 'And the math.cost of energy used is %2.0f paisa'%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of heating element is 29 ohms\n", + "And the math.cost of energy used is 8 paisa\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.40 Page No : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "phi = 70000./(10**8) #flux to be set up in Wb math.since 10**8lines = 1Wb\n", + "d = 0.03 #diameter in m\n", + "a = math.pi*d*d/4 #area of cross section in m**2\n", + "B = phi/a #flux density in Wb/m**2\n", + "Lg = 0.002 #length of air gap in m\n", + "Ls = (math.pi*0.2)-Lg #length of steel path\n", + "Uo = 4*math.pi*(10**-7) #absolute permitivity\n", + "Ur = 800. #relative permitivity of steel\n", + "\n", + "# Calculations\n", + "Hg = B/Uo\n", + "Hs = B/(Uo*Ur)\n", + "AT = (Hg*Lg)+(Hs*Ls) #total ampere turns required \n", + "N = 500. # no of turns\n", + "I = AT/N #exciting current in amps\n", + "\n", + "# Results\n", + "print 'Thus the value of exciting current is %2.3f A'%(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the value of exciting current is 4.386 A\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch2.ipynb b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch2.ipynb new file mode 100755 index 00000000..5cf93db3 --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch2.ipynb @@ -0,0 +1,898 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:14361654d3eb0fdc573f3a185ad8fc5594553acceea3084af85fe819b8a76399" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Conducting Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "l = 300 #in meters\n", + "a = 25*(10**-6) #in meter square\n", + "d15 = 2.7 #density at 15 degree C in ohm-meter\n", + "k0 = 0.004 #temp coefficient in ohm/degree C at 0 degree C\n", + "t = 15.;T = 50. #in degree C\n", + "\n", + "# Calculations\n", + "R15 = d15*(l/a)\n", + "k15 = k0/(1+(k0*t))\n", + "R50 = R15*(1+k15*(T-t))\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 15 degree C is %3.2f.ohms '%(R15)\n", + "print 'The value of Resistance at 50 degree C is %3.2f.ohms'%(R50)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 15 degree C is 32400000.00.ohms \n", + "The value of Resistance at 50 degree C is 36679245.28.ohms\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "R20 = 400. # in ohms\n", + "k0 = 0.0038\n", + "t = 20.;T = 80. #degree C\n", + "\n", + "# Calculations\n", + "k1 = k0/(1+(k0*t))\n", + "R80 = R20*(1+k1*(T-t))\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 80 degree C is %3.4f ohms'%(R80)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 80 degree C is 484.7584 ohms\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t = 15. #degree C\n", + "R15 = 250.;RT = 300. #ohms\n", + "k0 = 0.0038 #ohm/degree C\n", + "\n", + "# Calculations\n", + "k1 = k0/(1+(k0*t))\n", + "T = (((RT/R15)-1)/k1)+t #math.since RT = R15{1+k1*(T-t)}\n", + "\n", + "# Results\n", + "print 'The value of Temperature at 300 ohm resistance is %3.1f degree C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Temperature at 300 ohm resistance is 70.6 degree C\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#Part (a)\n", + "d = 0.4*(10**-3) #diameter in meter\n", + "a = math.pi*(d**2)/4 #area in meter square\n", + "p1 = 100*(10**-8) #resistivity of nichrome in ohm-meter\n", + "R = 40 #resistance in ohms\n", + "\n", + "#Part(b)\n", + "d = 0.4*(10**-3) #diameter in meter\n", + "a = 12.6*(10**-8) #area in meter square\n", + "p2 = 1.72*(10**-8) #resistance of copper wire in ohm-meter\n", + "R = 40 #resistance in ohms\n", + "\n", + "# Calculations\n", + "l1 = R*a/p1\n", + "l2 = R*a/p2\n", + "\n", + "# Results\n", + "print 'Thus the length of heater element with nichrome wire is %2.1f meter '%(l1)\n", + "print 'Thus the length of heater element with copper wire is %2.1f meter'%(l2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the length of heater element with nichrome wire is 5.0 meter \n", + "Thus the length of heater element with copper wire is 293.0 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R0 = 80 #in ohms\n", + "t = 40 # in degree C\n", + "k0 = 0.0043\n", + "\n", + "# Calculations\n", + "R40 = R0*(1+(k0*t))\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 40 degree C is %3.2f ohms'%(R40)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 40 degree C is 93.76 ohms\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R80 = 50.;R28 = 40. # resistance in ohms\n", + "t = 28.;T = 80. # temp in degrees\n", + "\n", + "# Calculations\n", + "k28 = ((R80/R28)-1)/(T-t) #math.since RT = Rt{1+k*(T-t)}\n", + "k0 = k28/(1-k28*t) # math.since k28 = k0/(1+k0*t)\n", + "\n", + "# Results\n", + "print 'The value of Temperature coefficient at 28 degree C is %3.4f ohms per degree C '%(k28)\n", + "print 'The value of Temperature coefficient at 0 degree C is %3.4f ohms per degree C'%(k0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Temperature coefficient at 28 degree C is 0.0048 ohms per degree C \n", + "The value of Temperature coefficient at 0 degree C is 0.0056 ohms per degree C\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "l = 1000 # length in meters\n", + "d = 0.09/100 # diameter in meters\n", + "p = 1.724*(10**-8) # specific resistance in ohm meter\n", + "\n", + "# Calculations\n", + "a = math.pi*(d**2)/4 # area in meter square\n", + "R = p*l/a #resistance in ohms\n", + "\n", + "# Results\n", + "print 'The value of Resistance is %3.2f ohms'%(R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance is 27.10 ohms\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R20 = 50. # resistance in ohms\n", + "T = 60.;t = 20. # temp in degree C\n", + "k0 = 0.00427 #temp coefficient at zero degreeC\n", + "\n", + "# Calculations\n", + "R0 = R20/(1+(k0*t))\n", + "R60 = R0*(1+(k0*T))\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 0 degree C is %3.2f ohms '%(R0)\n", + "print 'The value of Resistance at 60 degree C is %3.2f ohms'%(R60)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 0 degree C is 46.07 ohms \n", + "The value of Resistance at 60 degree C is 57.87 ohms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "k20 = 1/254.5 # temperature coefficient at 20 degreeC\n", + "p0 = 1.6*(10**-6) # resistivity at 0 degree C in ohm-cm\n", + "t = 20\n", + "T = 50 #temp in degree C\n", + "\n", + "# Calculations\n", + "k0 = k20/(1-(t*k20)) #temperature coefficient at 0 degreeC\n", + "p50 = p0*(1+(T*k0)) # resistivity at 50 degree C in ohm-cm\n", + "k50 = 1/(T+(1/k0)) #temperature coefficient at 50 degreeC\n", + "\n", + "# Results\n", + "print 'Thus the temperature coefficient at 50 degree C is %3.4f '%(k0)\n", + "print 'Thus the resistivity at 50 degree C is %e in ohm-cm'%(p50)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the temperature coefficient at 50 degree C is 0.0043 \n", + "Thus the resistivity at 50 degree C is 1.941151e-06 in ohm-cm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R15 = 50\n", + "RT = 58 # resistance in ohms\n", + "t = 15 # te mp in degree C\n", + "k0 = 0.00425 # temp coefficient at 0 degree C\n", + "\n", + "# Calculations\n", + "R0 = R15/(1+(k0*t)) # resistance at 0 degree C in ohms\n", + "T = ((RT/R0)-1)/k0 # temp in degree C\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 0 degree C is %3.1f ohms '%(R0)\n", + "print 'The value of Temperature at 58 ohm resistance is %3.4f degree C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 0 degree C is 47.0 ohms \n", + "The value of Temperature at 58 ohm resistance is 55.0471 degree C\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R25 = 50.\n", + "R70 = 57.2 # resistance in ohms\n", + "t = 25.\n", + "T = 70 # temp in degree C\n", + "\n", + "# Calculations\n", + "#math.since Rt = R0(1+(k0*t))\n", + "k0 = (R70-R25)/((R25*T)-(R70*t))\n", + "\n", + "# Results\n", + "print 'The temp coefficient at 0 degree C is %3.3f'%(k0 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temp coefficient at 0 degree C is 0.003\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R0 = 15.5 # resistance in ohms\n", + "t = 16 #in degree C\n", + "k0 = 0.00428 #temp coefficient\n", + "\n", + "# Calculations\n", + "R16 = R0*(1+(k0*t))\n", + "G = (R0/R16)*100 # math.since conducmath.tance = reciprocal of esismath.tance\n", + "\n", + "# Results\n", + "print 'The value of Resistance at 16 degree C is %3.4f ohms '%(R16)\n", + "print 'The value of percentage conductivity at 16 degree C is %3.2f percent'%(G)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance at 16 degree C is 16.5614 ohms \n", + "The value of percentage conductivity at 16 degree C is 93.59 percent\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "RT = 144.\n", + "R20 = 10. # in ohms\n", + "t = 20. # in degree C\n", + "\n", + "# Calculations\n", + "k20 = 5*(10**-3) #temp coefficient at 20 degree C\n", + "T = (((RT/R20)-1)/k20)+t\n", + "\n", + "# Results\n", + "print 'The value of temp required for tungsten bulb is %4.2f degree C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of temp required for tungsten bulb is 2700.00 degree C\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V15 = 250\n", + "Vt = 250 #voltage in volts\n", + "I15 = 5\n", + "It = 4 #current in amperes\n", + "T = 15 #temp in degree C\n", + "\n", + "# Calculations\n", + "R15 = V15/I15 #resistance in ohms at 15 degreeC\n", + "Rt = Vt/It #resistance at t degreeC\n", + "k0 = 0.0038\n", + "R0 = R15/(1+(k0*T))\n", + "t = ((Rt/R0)-1)/k0\n", + "\n", + "# Results\n", + "print 'Resistance at 15 degree C is %3.1f ohms '%(R15)\n", + "print 'Resistance at t degree C is %3.1f ohms '%(Rt)\n", + "print 'Resistance at 0 degree C is %3.2f ohms '%(R0)\n", + "print 'Temperature t is %3.2f degree C'%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance at 15 degree C is 50.0 ohms \n", + "Resistance at t degree C is 62.0 ohms \n", + "Resistance at 0 degree C is 47.30 ohms \n", + "Temperature t is 81.76 degree C\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 100 #no of slots\n", + "c = 12 #conductors per slot\n", + "Lm = 300 # mean length of turn in cm\n", + "a = 1.5*0.2 #cross section of each conductor in cm**2\n", + "s = 1.72*(10**-6) #specific resistance of copper at 20 degreeC\n", + "p = 4 # poles\n", + "t = 20\n", + "T = 75 #temp in degreeC\n", + "k0 = 0.00427 #temp coefficient of resistivity for copper\n", + "\n", + "# Calculations\n", + "L = n*c*Lm #total length of conductors\n", + "Ls = L/p #length of conductors in each parallel path\n", + "s0 = s*(1-(k0*t))\n", + "RT = (s0*Ls)/a\n", + "\n", + "# Results\n", + "print 'Thus specific resistance at 0 degree C is %e ohm-cm '%(s0)\n", + "print 'Thus resistance at working temp of 75 degree C is %3.4f ohm'%(RT)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus specific resistance at 0 degree C is 1.573112e-06 ohm-cm \n", + "Thus resistance at working temp of 75 degree C is 0.4719 ohm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "a = 15. #cross section area in cm**2\n", + "l = 100000 #length in cm\n", + "p0 = 7.6*(10**-6) #specific resistance at 0 degree C in ohm-cm\n", + "k0 = 0.005 #temp coefficient at 0 degree C\n", + "t = 50 #temp in degree C\n", + "\n", + "# Calculations\n", + "p50 = p0*(1+(t*k0)) #resistivity at 50 degree C\n", + "R50 = p50*(l/a)\n", + "\n", + "# Results\n", + "print 'Thus resistance at 50 degree C is %3.5f ohms '%(R50)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance at 50 degree C is 0.06333 ohms \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I2 = 27.5 #current of No.25 wire in Amperes\n", + "d = 1./2 #math.since I1/I2 = 1/2\n", + "\n", + "# Calculations\n", + "I1 = I2*(d**(3./2))\n", + "\n", + "# Results\n", + "print 'Thus fusing current of No.33 wire is %3.3f amperes '%(I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus fusing current of No.33 wire is 9.723 amperes \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "sAl = 2.85*(10**-6)\n", + "sCu = 1.7*(10**-6) #specific resistance in ohm-cm\n", + "gAl = 2.71\n", + "gCu = 8.89 #specific gravity \n", + "cAl = 5000.\n", + "cCu = 10000. #math.cost per tonne\n", + "\n", + "# Calculations\n", + "#P = V**2/R, power is same for both so resistance must also be same\n", + "#so R = (p*l)/(pi*d**2) = (p*l)/(pi*d'**2)\n", + "Kd = math.sqrt(sAl/sCu) #Kd = d/d'\n", + "Km = (Kd**2)*(gAl/gCu)\n", + "Kc = Km*(cAl/cCu)\n", + "\n", + "# Results\n", + "print 'Thus the ratio of diameters is %3.3f '%(Kd)\n", + "print 'Thus the ratio of weights is %3.4f '%(Km)\n", + "print 'Thus the ratio of math.costs is %3.4f'%(Kc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the ratio of diameters is 1.295 \n", + "Thus the ratio of weights is 0.5111 \n", + "Thus the ratio of math.costs is 0.2555\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 18.6 #resistacne in ohms\n", + "Kl = 5. #math.since l2 = 5*l1\n", + "Ka = 3 # math.since a2 = 3*a1\n", + "\n", + "# Calculations\n", + "R2 = R1*Kl/Ka\n", + "# resistivity is same because wires are of same material\n", + "\n", + "# Results\n", + "print 'Thus the resistance of another conductor is %3.1f ohms'%(R2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of another conductor is 31.0 ohms\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 1. #mass in kg\n", + "S = 4200. #specific heat of water\n", + "T2 = 100.;T1 = 15. # temp in degree C\n", + "W = 500 #wattage rating of kettle in volts\n", + "t = 15*60 # time in sec\n", + "\n", + "# Calculations\n", + "H = m*S*(T2-T1) #heat utilised in J\n", + "Hd = W*t #heat developed in J\n", + "He = (H/Hd)*100 #Heat efficiency\n", + "\n", + "# Results\n", + "print 'Heat utilised is %6.2f Joules '%(H)\n", + "print 'Heat developed is %6.2f Joules '%(Hd)\n", + "print 'Thus heat efficiency is %3.2f percent'%(He)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat utilised is 357000.00 Joules \n", + "Heat developed is 450000.00 Joules \n", + "Thus heat efficiency is 79.33 percent\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 3.6 #mass in kg\n", + "S = 4200. #specific heat of water\n", + "T2 = 95.;T1 = 15. # temp in degree C\n", + "e = 0.84 #efficiency of kettle\n", + "Ei = H/e #Energy input in J\n", + "W = 1000 #rating of kettle in watts\n", + "\n", + "# Calculations\n", + "H = m*S*(T2-T1) #heat utilised in J\n", + "t = (Ei/W)/60 #time taken in min\n", + "\n", + "# Results\n", + "print 'Heat utilised is %7.2f Joules '%(H)\n", + "print 'Energy input is %8.2f Joules '%(Ei)\n", + "print 'Thus time taken is %2.1f min '%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat utilised is 1209600.00 Joules \n", + "Energy input is 425000.00 Joules \n", + "Thus time taken is 7.1 min \n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch4.ipynb b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch4.ipynb new file mode 100755 index 00000000..a03c8c92 --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch4.ipynb @@ -0,0 +1,316 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ba6f1d3cb7a99561709c7e5c6ea07ce342428fdb3c43ae9d65ae12aba516bc88" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Insulating Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from sympy import Symbol,solve\n", + "# Let C1 and C2 be unknown capacities\n", + "#C1+C2 = 0.16\n", + "#(C1*C2)/(C1 + C2) = 0.03\n", + "# from the above 2 equations we get the following polynomial\n", + "s = Symbol(\"s\");\n", + "p = s**2 -0.16*s +0.0048\n", + "\n", + "# Calculations\n", + "c1 = solve(p)[0]\n", + "c2 = 0.16-c1\n", + "\n", + "# Results\n", + "print 'Thus the capacitance of condensers is %3.2f microF '%(c1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the capacitance of condensers is 0.04 microF \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "n = 9;\n", + "Ko = 8.854*10**-12;\n", + "K = 5.;\n", + "A = 12.*10**-4;\n", + "d = 2.*10**-4;\n", + "\n", + "# Calculations\n", + "C = (n-1)*Ko*K*A/d\n", + "\n", + "# Results\n", + "print 'Thus the capacitance is %e F'%(C);\n", + "#The Answer in the Textbook has a calculation error, hence it doesn't match the answer here.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the capacitance is 2.124960e-09 F\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C = 10**-6\n", + "V = 10000.\n", + "\n", + "# Calculations\n", + "#here C is capacitance and V voltage\n", + "E = 1./2*C*V**2\n", + "#E is the energy stored in the capacitor\n", + "# when the capacitor is discharged all this energy is dissipated as heat in the wire\n", + "H = E/4.2\n", + "\n", + "# Results\n", + "#H is heat produced in calories math.since 4.2 Joules = 1 calorie\n", + "print 'Thus the heat produced is %3.4f calories'%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the heat produced is 11.9048 calories\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "A = 0.02; #surface area of plates in meter square\n", + "d = 0.001; #dismath.tance between the plates in meter\n", + "C = 4.5*10**-10; #capacitance of the capacitor in farad\n", + "#for paralel plate condenser C = KoKA/d\n", + "Ko = 8.854*10**-12;\n", + "\n", + "# Calculations\n", + "#dielectric consmath.tant K is given by\n", + "K = (C*d)/(Ko*A)\n", + "V = 15000.; #volatage in volts\n", + "Q = C*V # charge on condenser in columb\n", + "D = Q/A # electric flux density in columb per meter square\n", + "\n", + "# Results\n", + "print 'Thus the electric flux density is %e C/m**2)'%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the electric flux density is 3.375000e-04 C/m**2)\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#before inserting the second sheet\n", + "d = 0.003; #distacne between plates in m**2\n", + "K1 = 6.; # relative permittivity of air\n", + "Ko = 8.854*10**-12;\n", + "# capacitance C1 = Ko*K1*A/d in Farad\n", + "#after inserting the second sheet\n", + "d1 = 0.003; #thickness of first sheet in meter\n", + "d2 = 0.005; #thickness of second sheet in meter\n", + "\n", + "# Calculations\n", + "#K2 is unknown\n", + "#C2 = Ko*A/(d1/K1 + d2/K2)\n", + "# but given that C2 = (1/3)*C1\n", + "#from equations 1,2,3\n", + "K2 = (d2*K1)/(3*d-d1)\n", + "# math.since Ko*A/(d1/K1 + d2/K2) = Ko*K1*A/3*d\n", + "\n", + "# Results\n", + "print 'Thus K2 is %3.4f'%(K2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus K2 is 5.0000\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "q1 = 1.; # in coulomb\n", + "q2 = 1.; # in coulomb\n", + "Eo = 8.854*10**-12; # in Farad per meter\n", + "Er = 1.;\n", + "d = 1. # in meter\n", + "pi = 3.14;\n", + "\n", + "# Calculations\n", + "# F is the force between 2 charges in NEWTONS\n", + "F = (q1*q2)/(4*pi*Eo*Er*d**2)\n", + "\n", + "# Results\n", + "print 'Thus the force between 2 charges is %e'%(F)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the force between 2 charges is 8.992301e+09\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#q1 = q2 = q\n", + "pi = 3.14;\n", + "d = 0.2; # in meters\n", + "K = 9*10**9; # here K = 1/4*pi*Eo*Er consmath.tant\n", + "F = 9.81*10**-1; # in newtons or 10**-1 kgm\n", + "\n", + "# Calculations\n", + "q = math.sqrt((F*(d**2))/K)\n", + "\n", + "# Results\n", + "print 'Thus charge is %e in coulomb'%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus charge is 2.088061e-06 in coulomb\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch5.ipynb b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch5.ipynb new file mode 100755 index 00000000..e3365f2c --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch5.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d56b71d3ece6063cd7435898d62b9a23553160e5448af11850fa2517ad7f9e87" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Dielectric Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t = 0.25 #time in sec\n", + "I = 0.22 #Current in A\n", + "V = 220. #voltage in V\n", + "\n", + "# Calculations\n", + "Q = I*t #charge given to condenser\n", + "C = Q/V #capacitance of condenser\n", + "C1 = C*(10**6)\n", + "\n", + "# Results\n", + "print 'Charge given to condenser is %3.3f Coulombs '%(Q)\n", + "print 'Capacitance of condenser is %3.4f F'%(C)\n", + "print 'or %3.0f microF'%(C1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge given to condenser is 0.055 Coulombs \n", + "Capacitance of condenser is 0.0003 F\n", + "or 250 microF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "C = 0.0002*(10**-6) #capacitance in F\n", + "V = 20000. #P.D across condenser in V\n", + "t = 2 #thickness in mm\n", + "\n", + "# Calculations\n", + "Q = C*V #charge on each plate in coulomb\n", + "g = (V/t)*(1./1000) # potential gradient in kV/mm\n", + "\n", + "# Results\n", + "print 'Charge given to condenser is %e Coulombs '%(Q)\n", + "print 'Potential gradient of condenser is %3.0f kV/mm'%(g)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge given to condenser is 4.000000e-06 Coulombs \n", + "Potential gradient of condenser is 10 kV/mm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#Before immersion of oil\n", + "C = 0.005*(10**-6)\n", + "V = 500.\n", + "#After immersion of oil\n", + "K = 2.5\n", + "\n", + "# Calculations\n", + "q = C*V\n", + "q1 = q # math.since no loss of charge\n", + "E = (1./2)*(C*V*V)\n", + "C1 = K*C #capacity of condenser\n", + "E1 = (q1**2)/(2*C1) # energy stored in condenser\n", + "\n", + "# Results\n", + "print 'Charge of condenser is %e coulomb '%(q)\n", + "print 'Energy stored in condenser before immersion of oil is %e Joules '%(E)\n", + "print 'Energy stored in condenser after immersion of oil is %e Joules'%(E1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge of condenser is 2.500000e-06 coulomb \n", + "Energy stored in condenser before immersion of oil is 6.250000e-04 Joules \n", + "Energy stored in condenser after immersion of oil is 2.500000e-04 Joules\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "A = 0.02 #surface area of plate in m**2\n", + "d = 0.001 #dismath.tance between plates in m\n", + "C = 4.5*(10**-10) #capacitance in F\n", + "V = 15000. #voltage in volts\n", + "\n", + "# Calculations\n", + "K0 = 8.854*(10**-12)\n", + "K = (C*d)/(K0*A)\n", + "q = C*V # charge on condenser in coulombs\n", + "D = q/A #Electric flux density in Coulomb/m**2\n", + "\n", + "# Results\n", + "print 'Thus dielectric consmath.tant is %3.2f '%(K)\n", + "print 'Thus Electric flux density is %e Coulombs/m**2'%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus dielectric consmath.tant is 2.54 \n", + "Thus Electric flux density is 3.375000e-04 Coulombs/m**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "A = 0.2 #surface area of plate in m**2\n", + "t = 2.5*(10**-5) #thickness of dielectric in m\n", + "\n", + "# Calculations\n", + "K0 = 8.854*(10**-12) #permittivity of air in F/m\n", + "K = 5 #relative permittivity of dielectric\n", + "C = (K*K0*A*(10**6))/t #capacitance of condenser in microF\n", + "\n", + "# Results\n", + "print 'Thus the Capacitance of condenser is %3.3f microF'%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the Capacitance of condenser is 0.354 microF\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch6.ipynb b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch6.ipynb new file mode 100755 index 00000000..86e7612c --- /dev/null +++ b/A_Textbook_of_Electrical_and_Electronics_Engineering_Materials_by_P._l._Kapoor/ch6.ipynb @@ -0,0 +1,368 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e8768002e32a88c23e6fb12d42cae3515e4c448edb9dc1564d92a41d1c4ab1d4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Magnetic Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "f = 0.01 #flux in Wb\n", + "l = 1. #mean circumference in m\n", + "N = 1000. #tunrs\n", + "Ur = 1000. #relative permeability\n", + "\n", + "# Calculations\n", + "Uo = 4*math.pi*(10**-7) #permeability of free space in H/m\n", + "a = 0.001 # cross section area in m**2\n", + "I = (f*l)/(N*Uo*Ur*a) # current in Amp. math.since f = A*T/(l/Uo*Ur*a)\n", + "\n", + "# Results\n", + "print 'Thus Current required is %3.3f Amp'%(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Current required is 7.958 Amp\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "f = 1.2*(10**-3) #flux in Wb\n", + "l = 1.4 #mean circumference in m\n", + "N = 500. #tunrs\n", + "\n", + "# Calculations\n", + "Uo = 4*math.pi*(10**-7) #permeability of free space in H/m\n", + "a = 0.0012 # cross section area in m**2\n", + "I = 2 #current in Amp\n", + "Ur = (f*l)/(N*I*Uo*a) #relative permeability\n", + "\n", + "# Results\n", + "print 'Thus the relative permeability of iron is %3.2f '%(Ur)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the relative permeability of iron is 1114.08 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "l = 0.4 #mean circumference in m\n", + "N = 200. #tunrs\n", + "Uo = 4*math.pi*(10**-7) #permeability of free space in H/m\n", + "a = 5*(10**-4) # cross section area in m**2\n", + "I = 6.4 #current in Amp\n", + "f = 0.8*(10**-3) #flux in Wb\n", + "\n", + "# Calculations\n", + "fd = f/a #flux density in Wb/m**2\n", + "fi = I*N/l #Field intensity in AT/m\n", + "Ur = (f*l)/(N*I*Uo*a) #relative permeability\n", + "\n", + "# Results\n", + "print 'i) The Flux density is %3.2f Wb/m**2 '%(fd)\n", + "print 'ii) The Field intensity is %3.2f AT/m '%(fi)\n", + "print 'iii) The Relative permeability of steel is %3.2f '%(Ur)\n", + "#The answer to part(iii) has a calculation error in the textbook, hence it doesn't match the answer here.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) The Flux density is 1.60 Wb/m**2 \n", + "ii) The Field intensity is 3200.00 AT/m \n", + "iii) The Relative permeability of steel is 397.89 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Hl = 250. #Hysteresis loss per m**3 in J/cycle\n", + "V = 1./150 #Volume of specimen in m**3\n", + "N = 50. #No of cycles/sec\n", + "\n", + "# Calculations\n", + "E = Hl*V*N #Energy loss per sec in J\n", + "Eh = (E*3600)/1000 #Energy loss per hour in kWh\n", + "\n", + "# Results\n", + "print 'Thus Energy loss per hour is %3.2f kWh'%(Eh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Energy loss per hour is 300.00 kWh\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4. #no of poles\n", + "N = 1600. # Speed in rpm\n", + "f = P*N/120 #Frequency of magnetic reversal\n", + "V = 5400. #volume\n", + "d = 7.5 #density\n", + "\n", + "# Calculations\n", + "m = (V*d)/1000 #Mass of armature in kg\n", + "L = 1.76 #Loss in W/kg\n", + "Cl = L*m #Core loss in Watts\n", + "\n", + "# Results\n", + "print 'Thus Frequency of magnetic reversal is %3.2f c/s'%(f)\n", + "print ' and Core loss is %3.2f Watts'%(Cl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Frequency of magnetic reversal is 53.33 c/s\n", + " and Core loss is 71.28 Watts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "v = 76300. #volume in c.c\n", + "P = 8. # no of poles\n", + "N = 375. #rpm\n", + "f = P*N/120 #freqency in c/s\n", + "Bmax = 12000. #max. flux density in lines/cm**2\n", + "n = 0.002 #(assumed)\n", + "d = 7.8 #densityin gm/c.c\n", + "l = 1.7 #loss in watts per kg\n", + "\n", + "# Calculations\n", + "Hl = n*v*f*(Bmax**1.6)*(10**-7) #Hysteresis loss in Watts\n", + "Al = v*d*l/1000 #Additional loss under particular running conditions\n", + "Tl = Hl+Al #total core loss\n", + "\n", + "# Results\n", + "print 'Thus the total core loss is %4.0f Watts'%(Tl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the total core loss is 2295 Watts\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 12000. #mass in gm\n", + "d = 7.5 #density of iron in gm/c.c\n", + "Hl = 3000. #Hysteresis loss per cc in ergs/cycle\n", + "N = 50. #No of cycles per sec\n", + "\n", + "# Calculations\n", + "v = m/d #volume of specimen\n", + "E = v*Hl*N #Energy loss per cc in ergs\n", + "Eh = E/(10**10) #Energy loss per hour in kWh\n", + "\n", + "# Results\n", + "print 'Thus the Loss in energy is %3.3f kWh'%(Eh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the Loss in energy is 0.024 kWh\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 10. #mass in kg\n", + "T1 = 20. #total loss in watts\n", + "f1 = 50. #frequency in c/s\n", + "T2 = 35. #total loss in watts\n", + "f2 = 75. #frequency in c/s\n", + "\n", + "# Calculations\n", + "#both have same peak flux density\n", + "#total loss = hysteresis loss+ Eddy current loss\n", + "#all quantities except frequency are consmath.tant\n", + "#so Total loss = Af+Bf**2\n", + "#let c1 and c2 be consmath.tants such that total loss = c1*f + c2*f**2\n", + "c2 = (T2-(T1*f2/f1))/(f2**2-f1*f2)\n", + "c1 = (T1-c2*f1**2)/f1\n", + "k = c1/c2 #hysteresis loss/eddy current loss\n", + "H50 = T1*k/101 #hysteresis loss at 50 c/s\n", + "E50 = T1-H50 #eddy current loss at 50 c/s\n", + "\n", + "# Results\n", + "print 'Thus hysteresis loss at 50 c/s is %3.1f Watts '%(H50)\n", + "print 'And Eddy current loss at 50c/s is %3.1f Watts'%(E50)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus hysteresis loss at 50 c/s is 19.8 Watts \n", + "And Eddy current loss at 50c/s is 0.2 Watts\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4a493638 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_10_Multiplicaton_of_Algerbrraical_Expressions.ipynb @@ -0,0 +1,225 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 Multiplicaton of Algerbrraical Expressions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_1 pgno:120" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6*x**2 + 23*x + 20\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "x=symbols('x')#is a poly nomial function with degree zero for my convinence i assume it to be one poly(0,'x');poly(0,'x');\n", + "p1=(2*x+5);\n", + "p2=(3*x+4);\n", + "ans=p1*p2\n", + "print 6*x**2+23*x+20\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_2 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6*x**2+17*x+7\n", + "product= (2*x + 1)*(3*x + 7)\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "x=symbols('x')#is a poly nomial function with degree zero for my convinence i assume it to be one poly(0,'x');poly(0,'x');poly(0,'x');\n", + "p1=(3*x+7);\n", + "p2=(2*x+1);\n", + "p3=p1*p2;\n", + "print \"6*x**2+17*x+7\"\n", + "print \"product=\",p3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "14*x**2+11*x-15\n", + "product= (2*x + 3)*(7*x - 5)\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "x=symbols('x')#is a poly nomial function with degree zero for my convinence i assume it to be one poly(0,'x');poly(0,'x');poly(0,'x');poly(0,'x');\n", + "p1=(7*x-5);\n", + "p2=(2*x+3);\n", + "p3=p1*p2;\n", + "print \"14*x**2+11*x-15\"\n", + "print \"product=\",p3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_4 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "12*x**2-29*x+14\n", + "product= -3\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "x=symbols('x')#is a poly nomial function with degree zero for my convinence i assume it to be one poly(0,'x');poly(0,'x');poly(0,'x');poly(0,'x');poly(0,'x');\n", + "p1=(3*x-2);\n", + "p2=(4*x-7);\n", + "p3=p1*p2;\n", + "print\"12*x**2-29*x+14\"\n", + "print \"product=\",p3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_5 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x**3+x**2+x+2\n", + "product= (x + 2)*(x**2 - x + 1)\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "x=symbols('x')#is a poly nomial function with degree zero for my convinence i assume it to be one poly(0,'x');poly(0,'x');poly(0,'x');poly(0,'x');\n", + "p1=(x+2);\n", + "p2=(x**2-x+1);\n", + "p3=p1*p2;#on collecting like terms\n", + "print \"x**3+x**2+x+2\"\n", + "print \"product=\",p3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_6 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a^3+b^3\n" + ] + } + ], + "source": [ + "#(a+b)*(a^2-ab+b^2)\n", + "#on collecting like terms\n", + "print('a^3+b^3')\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/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 new file mode 100644 index 00000000..44480b54 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_11_Factors.ipynb @@ -0,0 +1,677 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Factors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_1 pgno:128" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6*a^2+3*a*c \n", + "=> 3a(2a+c)\n" + ] + } + ], + "source": [ + "\n", + "#factors of 6a^2 + 3ac\n", + "print ('6*a^2+3*a*c ')\n", + "print('=> 3a(2a+c)')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2 pgno:128" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the highest common factor to each term is 5 and other factor is y \n", + "\n", + "5y(x^2y-2x^2+4y)\n" + ] + } + ], + "source": [ + "\n", + "#5*x^2*y^2-10*x^2*y+20*y^2\n", + "\n", + "print\"\\n the highest common factor to each term is 5 and other factor is y \\n\"\n", + "print('5y(x^2y-2x^2+4y)')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_3 pgno:129" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " \n", + " (a^2+ac)+(ad+cd) => a(a+c)+d(a+d) \n", + "\n", + "the factors are:\n", + "(a+c)(a+d)\n" + ] + } + ], + "source": [ + "\n", + "#factors of a^2+cd+ad+ac\n", + "\n", + "print(\" \\n (a^2+ac)+(ad+cd) => a(a+c)+d(a+d) \\n\")\n", + "print(\"the factors are:\")\n", + "print('(a+c)(a+d)')\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_4 pgno:130" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " there are no factors of this expression\n" + ] + } + ], + "source": [ + "\n", + "#factorize, if possible,ab+ac+bc+bd\n", + "\n", + "print(\"\\n there are no factors of this expression\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_5 pgno:130" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(ab-5a)-(3b-15) => a(b-5)-3(b-5)\n", + "\n", + " the factors are: \n", + "\n", + "(b-5)(a-3)\n" + ] + } + ], + "source": [ + "\n", + "#factors of ab-5a-3b+15\n", + "\n", + "#by arrangement into suitable pairs,\n", + "print(\"(ab-5a)-(3b-15) => a(b-5)-3(b-5)\")\n", + "print(\"\\n the factors are: \\n\")\n", + "print('(b-5)(a-3)')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_6 pgno:131" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[-9. -4.]\n" + ] + } + ], + "source": [ + "\n", + "#x^2+13*x+36\n", + "import numpy\n", + "\n", + "#x^2+13*x+36;\n", + "p=numpy.array([1, 13, 36])\n", + "x=numpy.roots(p)\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_7 pgno:131" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 9. 4.]\n" + ] + } + ], + "source": [ + "\n", + "#x^2-13*x+36\n", + "import numpy\n", + "p=numpy.array([1, -13, 36])\n", + "x=numpy.roots(p)\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_8 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 10. 3.]\n" + ] + } + ], + "source": [ + "\n", + "#y^2-13*y+30\n", + "import numpy\n", + "\n", + "p=numpy.array([1, -13, 30]);\n", + "y=numpy.roots(p)\n", + "print y\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_9 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 9. -4.]\n" + ] + } + ], + "source": [ + "\n", + "#x^2-5*x-36\n", + "import numpy\n", + "p=numpy.array([1, -5, -36])\n", + "x=numpy.roots(p)\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_10 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[-14. 2.]\n" + ] + } + ], + "source": [ + "\n", + "#x^2+12*x-28\n", + "import numpy\n", + "p=numpy.array([1, 12, -28])\n", + "x=numpy.roots(p)\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_11 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 4.+5.65685425j 4.-5.65685425j]\n", + "the second letter b will appear in 1st term of each factor\n", + "ans(1)=(4b+a)\n", + "ans(2)=(-12b+a)\n" + ] + } + ], + "source": [ + "#a^2-8*a*b-48*b^2\n", + "import numpy\n", + "p=numpy.array([1, -8, 48])\n", + "x=numpy.roots(p)\n", + "print x\n", + "\n", + "print \"the second letter b will appear in 1st term of each factor\"\n", + "print \"ans(1)=(4b+a)\"; \n", + "print \"ans(2)=(-12b+a)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_12 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(array([-3. , -0.5]), 'the factors of 2*x^2+7*x+3 are')\n" + ] + } + ], + "source": [ + "#2*x^2+7*x+3\n", + "\n", + "import numpy\n", + "p=numpy.array([2, 7, 3])\n", + "x=numpy.roots(p)\n", + "\n", + "\n", + "print(x,\"the factors of 2*x^2+7*x+3 are\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_13 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 8)", + "output_type": "error", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m8\u001b[0m\n\u001b[1;33m print x\"the factors of 6*x^2+17*x-3 are\"\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "\n", + "#6*x^2+17*x-3\n", + "import numpy\n", + "p=numpy.array([6, 17, -3])\n", + "x=numpy.roots(p)\n", + "\n", + "#multiply by 6 the p1 factors to get the original factors of p\n", + "print x\"the factors of 6*x^2+17*x-3 are\" \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_14 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 5. -0.75] the factors of 4*x^2-17*x-15 are\n" + ] + } + ], + "source": [ + "\n", + "#4*x^2-17*x-15\n", + "import numpy\n", + "p=numpy.array([4, -17, -15])\n", + "x=numpy.roots(p)\n", + "\n", + "print x,\"the factors of 4*x^2-17*x-15 are\" \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_15 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 0.1 -0.1] is the complete square of binomial\n" + ] + } + ], + "source": [ + "\n", + "#100*x^2-1\n", + "import numpy\n", + "p=numpy.array([100, 0, -1])\n", + "x=numpy.roots(p)\n", + "print x,\"is the complete square of binomial\"\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_16 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "36*a^2*b^2-25=(6ab+5)(6ab-5)\n" + ] + } + ], + "source": [ + "\n", + "#36*a^2*b^2-25\n", + "\n", + "#the numbers squared are 6ab and 5\")\n", + "print (\"36*a^2*b^2-25=(6ab+5)(6ab-5)\") \n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_17 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a+b+c)(a+b-c)\n" + ] + } + ], + "source": [ + "\n", + "#factorize (a+b)^2 - c^2\n", + "\n", + "#using the formula, a^2-b^2=(a+b)(a-b)\n", + "print ('(a+b+c)(a+b-c)')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_18 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(b+c)(2a+b-c)\n" + ] + } + ], + "source": [ + "\n", + "#factorize (a+b)^2 - (c-a)^2\n", + "\n", + "#using the formula, a^2-b^2=(a+b)(a-b)\n", + "print ('(b+c)(2a+b-c)')\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_19 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1750.0\n" + ] + } + ], + "source": [ + "print 47.5**2-22.5**2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_20 pgno:136" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in area=pi mm**2 2520\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#area of ring between 2 concentric circles.\n", + "#given,r1=97mm,r2=83mm\n", + "\n", + "r1=97;r2=83;\n", + "#the area of ring is difference between the areas of 2 circles\n", + "diff_in_area=(r1**2-r2**2);\n", + "print\"difference in area=pi mm**2\",diff_in_area" + ] + } + ], + "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/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 new file mode 100644 index 00000000..b929e40c --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_12_Fractions.ipynb @@ -0,0 +1,454 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Fractions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_1 pgno:141" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " (a+b)/((a+b)(a-b)) => 1/(a-b) \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#simplify (a+b)/(a**2-b**2)\n", + "\n", + "#as, by formula,(a**2-b**2)=(a+b)(a-b)\n", + "print\"\\n (a+b)/((a+b)(a-b)) => 1/(a-b) \\n\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2 pgno:141" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(x + 6)/(x + 3)\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "x = symbols('x')\n", + "e1=x**2+4*x-12;\n", + "se1=(x-2)*(x+6)\n", + "e2=x**2+x-6\n", + "se2=(x-2)*(x+3)\n", + "print se1/se2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_3 pgno:141" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the fraction is :\n", + "\n", + "(a-2b)/(2a(a+5b))\n" + ] + } + ], + "source": [ + "\n", + "#simplify 3a(a^2-4ab+4b^2)/6a(a^2+3ab-10b^2)\n", + "\n", + "#the factors 3a(a-2b) are common to numerator & denominator.\n", + "print(\"\\n the fraction is :\\n\")\n", + "print('(a-2b)/(2a(a+5b))')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_4 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(x**2 - 1)/(x*(x + 1))\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "x = symbols('x')\n", + "p1=x;\n", + "p2=x+1;\n", + "p=p1/p2;\n", + "q1=x**2;\n", + "q2=x**2-1;\n", + "q=q1/q2;\n", + "print p/q\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_5 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(x + 3)*(x**4 - 27*x)/((x**2 - 9)*(x**2 + 3*x + 9))\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "x = symbols('x')\n", + "p1=x**4-27*x;\n", + "p2=x**2-9;\n", + "p=p1/p2;\n", + "q1=x**2+3*x+9;\n", + "q2=x+3;\n", + "q=q1/q2;\n", + "p/q\n", + "print p/q\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_6 pgno:143" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the fraction is :\n", + "\n", + "ans=(ab/((a+b)(a-b))\n" + ] + } + ], + "source": [ + "\n", + "#simplify a/(a-b) - a**2/(a**2-b**2)\n", + "\n", + "\n", + "#as, (a**2-b**2)=(a+b)(a-b),substitute it.\n", + "print\"\\n the fraction is :\\n\"\n", + "print 'ans=(ab/((a+b)(a-b))'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_7 pgno:143" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " on factorizing, the expression becomes \n", + "\n", + "(a+2b)/((a+b)(a-b))\n" + ] + } + ], + "source": [ + "\n", + "#3/(a-b)-(2a+b)/(a^2-b^2)\n", + "print\"\\n on factorizing, the expression becomes \\n\"\n", + "#3/(a-b)-(2a+b)/(a+b)(a-b) => (3a+3b-2a-b)/(a+b)(a-b)\n", + "print ('(a+2b)/((a+b)(a-b))')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_8 pgno:144" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val=(1+2x)/(1+x)(-2+x)(3+x)\n" + ] + } + ], + "source": [ + "\n", + "import numpy\n", + "from sympy import *\n", + "x = symbols('x')\n", + "p1=x-1;\n", + "p2=x**2-x-2;\n", + "p=p1/p2;\n", + "q1=x+2;\n", + "q2=x**2+4*x+3;\n", + "q=q1/q2;\n", + "t=p-q;\n", + "y=numer(t) #numerator of t\n", + "z=numpy.roots(denom(t))#factors of denominator of t (more simplified form)\n", + "print (\"val=(1+2x)/(1+x)(-2+x)(3+x)\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_9 pgno:144" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x/(x - 1/x)\n" + ] + } + ], + "source": [ + "\n", + "#x/(x-(1/x))\n", + "from sympy import *\n", + "x = symbols('x')\n", + "p1=x;\n", + "p2=1/x;\n", + "p3=p1-p2;\n", + "p=p1/p3\n", + "print p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_10 pgno:145" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R=R1R2/(R2-R1)\n" + ] + } + ], + "source": [ + "\n", + "#1/R=1/R1-1/R2. get R\n", + "\n", + "print \"R=R1R2/(R2-R1)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_11 pgno:146" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.5\n" + ] + } + ], + "source": [ + "import numpy\n", + "from sympy import *\n", + "x = symbols('x')\n", + "p1=3/(x-2);\n", + "p2=5/(x-1);\n", + "# given, 3/(x-2)=5/(x-1)\n", + "x=0;\n", + "for x in numpy.arange(0,10,0.1):\n", + "\tif(3*(x-1)==5*(x-2)):\n", + " \n", + "\t\tprint x\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_12 pgno:146" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n*(1.0/(n - 2) + 1.0/(n - 3)) - 2.0\n", + "[ 2.4]\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "import numpy\n", + "\n", + "n=symbols('n')\n", + "p1=1./(n-2);\n", + "p2=1./(n-3);\n", + "p=p1+p2;\n", + "q=2./n;\n", + "#given p=q\n", + "z1=numer(p)*denom(q);\n", + "z2=numer(q)*denom(p);\n", + "#As,z1=z2. cancel the terms common on both sides\n", + "a=z1-z2; \n", + "print a\n", + "a=numpy.array([0, 5, 0-12])\n", + "n=numpy.roots(a);\n", + "print 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/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 new file mode 100644 index 00000000..4c444f56 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_13_Graphs_of_Quadratic_Functions.ipynb @@ -0,0 +1,2285 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 Graphs of Quadratic Functions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_1 pgno:148" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C=2*pi*r\n", + "the variation of C depends on changes in r\n" + ] + } + ], + "source": [ + "\n", + "#circumference of circle\n", + "print ('C=2*pi*r')\n", + "#C-length of circumference.r-the length of radius\n", + "#2 (2,pi) of these 4 symbols represent constants .\n", + "print (\"the variation of C depends on changes in r\")\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2 pgno:148" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4JGV99vHvzTDDDiPgxaLgEQkBjDAoEHnh1UHBICqo\n", + "gcQFdVBMJG/ADRWMCGgEIho3jGYRZhRXEBVcwcggREBZBlmj+DLIMoxElkHZmV/+qKeHnqb7nDqn\n", + "a+2+P9fV13RVV9dz93NOP/OcX1VXKyIwM7PxsUbdAczMrFoe+M3MxowHfjOzMeOB38xszHjgNzMb\n", + "Mx74zczGjAd+m5KkCUkrJT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ZfPNtujfP+K0uN8cT12i/ApiQtCGwUURclNYvAl4wxX72JLvGChFxAbBJuiR038v/StqA\n", + "7MuAvpOe80hEPDjJ/u8DHpL0BUmvArq3VdrnRlPkPif9ey1wbUQsj4hHyK5dszXZBbeeB1wu6Srg\n", + "RWQX2wJ4nOxKp1NlMcvNA7/V5eGu+4+TfctQr8mu3T6T7SbzGKu/H9Ymu8Lh42SXvz0LeDnZVwh2\n", + "DLrQVW+ezmtdyeqveyVPHGdbFBG7pNv2EfGhtP6hiAiAiHhskixmuXngt6ZQRKwA7pG0V1r3BrLv\n", + "6p3MRaTr0acvq7grur7sp1dkX15zW/pmKCStJWkdsitd7pjOBppLNgsPSeuRXaHzB8C7gJ3Tru4H\n", + "Nkz7vG8GuVdFAv4TOCgdm+gct9i6d8NJsphNi8/qsbr0zpY7y28CPi9pXbLrih8KIOkE4PKIOLfn\n", + "eccDp0m6Gvhjen5nf4Nm5G8A/lXSh8iONRwUEUslfYOsHHMz2WVxATYAvpMOPovsm48Avgb8u6Qj\n", + "gIMH5e7zGp+UKSJukPQB4Lx0UPdR4O+A3/ZsPyiL2bT4ssxmZmPGpR4zszHjgd/MbMx44DczGzMe\n", + "+M3MxowHfjOzMeOB38xszHjgNzMbMx74zczGzP8Cg2WyMgioWrkAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "#let a-the avg. amount paid. x-no. of customers. b-the expenses\n", + "#net profit is y=ax-b\n", + "x=320.;y=4.50;\n", + "x=250.;y=1.00;\n", + "from sympy import *\n", + "import numpy\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "#substitute in above equation\n", + "#4.5=320*a-b-equ.1;1=250*a-b-equ.2.subbstract equ.2 from 1.\n", + "a=0.05;#we get\n", + "b=250*a-1;\n", + "x = symbols('x')\n", + "y=a*x-b;#equation to straight line\n", + "#if there is no profit i.e., y=0\n", + "x=0;\n", + "for x in range(1,500):\n", + "\tif(0.05*x-11.5==0):\n", + "\t\tprint\"x= \\n\",x\n", + "\tbreak\n", + "\n", + "cust=numpy.array([230, 240, 270, 300, 350, 380])\n", + "profit=[0, 0.5, 2.0, 3.5, 6.0, 7.5];\n", + "pyplot.plot(cust,profit);\n", + "pyplot.plot(230,0,'o');\n", + "#profit(y) depends on varying no. of customers(x). the no.'s 0.05 & 11.5 remained constant\n", + "pyplot.title(\"the straight line graph\")\n", + "pyplot.xlabel(\"no. of customers\")\n", + "pyplot.ylabel(\"profit\");\n", + "pyplot.legend(\"y=0.05*x-11.5\");\n", + "pyplot.grid()\n", + "pyplot.show()\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_3 pgno:149" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y=mx+b\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XnUJFV9//H3ZzYQWWUUmGGZn5woMREHF0KEgUdZghh3\n", + "OUZFHM2JgUQhQY3i8mNwS0xU/LmEoyAM4EKIBpQooMGZQTYVZRgQVFBGWUeEgQCjDjDf3x9VD9PT\n", + "09vTT1dX1a3P65w+09VVXXW/fefp2/d+q24pIjAzM5tRdgHMzKwa3CCYmRngBsHMzHJuEMzMDHCD\n", + "YGZmOTcIZmYGuEGwAki6QdKBZZdjkqRXSLpN0oOSnjXA9hOSbhvh8T8k6R5Jd45qn6mTtETSOWWX\n", + "o2ncICRC0mpJ6/IvvcnHp8Zw3KWSPtj6WkT8aURcVvSxp+BjwN9FxDYRcV37SkkbJD21iANL2h04\n", + "AdgrIuYVcYxE+QKpEswquwA2MgH8ZUR8t+yCVIkkA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UfBc4hmwn1tPY3\n", + "StoduCciTgdOJ7trl1kllT79tVmZJB0N/CEizs2nEb6yw12nLgaOkXQj2Y3ar8rfexDwHOC4iAhJ\n", + "r5L0xog4i413pXoB8A5JjwAPks9Nb1ZFziGYmRngISMzM8u5QTAzM8ANgpmZ5dwgmJkZ4AbBzMxy\n", + "bhDMzAxwg2BmZjk3CGZmBsD/B6cKBOU705CdAAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#y=mx+b\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "x=numpy.linspace(0,3);\n", + "y=x;\n", + "pyplot.plot(x,y);\n", + "y=x+2;\n", + "pyplot.plot(x,y);\n", + "y=x-3;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\"Equations of the form y=mx+b\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\");\n", + "#pyplot.legend(\"y=x\",\"y=x+2\",\"y=x-3\");\n", + "print ('y=mx+b');\n", + "#m is constant, b is fixed distance. (x,y) vary for different points on the line \n", + "pyplot.grid()\n", + "pyplot.show()\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_4 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEZCAYAAABsPmXUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYJHV1xvHvyy7XBQElCiqwKBKjiwIKwQiyokRAFDUB\n", + "xKBcvERAEQUiN2XBBMErJgoSueyCgpFVvIsiAguIXJRFYEXRyCUgKAIrV0X25I+q2eltenZ6Zqr6\n", + "V/Xr9/M889jVXV11Dr2eqTlVfUoRgZmZ5WWF1AGYmVn1XNzNz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hKzgIuATXIfU2o2\n", + "FR6fPco99xYoz/Z/l+J2hGY2to8CHxn2wt4vF/caTaDvdwzwbokX1BhO5XLvazq/5pDYDdiQ4oZB\n", + "fazfntzq4uLeAOWUyMOA8yRmpI7HrEnKk6ifA94SweOp42mLWnvuklahuEnHysBKwDci4oiO14e+\n", + "5z6i/LbqXOCJCPZLHI5ZI5RXkv0YOCOCz6aOpykaMc9d0moR8Yik6cDlFPdSvbzfAIdJedR+DXBi\n", + "BEN/93Yzic8C6wK7lZcPGw05oRoRj5QPVwKmAffVvc+mmGjfrzxRtDvwiTb033Pvazq/tMo++07A\n", + "2yda2Jue2yDUXtwlrSBpIXAPcHG/910dVuXVM/+G++82xDr67Lv7EuHJGcSR+5KI2Ax4NvCK7t+o\n", + "kuZKmlP+HNz5uqTZbV4eeW4S758LXAvnnNekfCrMrxXLzi/Nctln/wp8+lzQGpPZXkRc0pR8qlgu\n", + "H88tf+bQh4F+iUnSh4BHI+IT5bJ77mNw/92Glfvs4+undtZ65C5pHUlrlY9XBXYArqtzn03SfZQ0\n", + "EW3ov08lvzZwfoM3lT77sttpXm6DNr3m7a8HzJO0AsUvkrMj4qKa95mNCG6Ulvbft/I38yxnHX32\n", + "ndxnnzrPlmk4X/9uw8DXs09M8raMTV35p+kBwNYSe6eOx6wmnwD+l+LI3Srg4l6jqvp+Te2/597X\n", + "dH6DUVWffdltNiO3lFzcW8LXv1uOfD17fdxzbxH33y0n7rNPnnvumXH/3TLjPnuNXNxrVEffr0n9\n", + "99z7ms6vzn1X32dfdvt5f3b9cHFvIfffrc3cZx8M99xbyv13ayP32avhnnvG3H+3lnKffUBc3GtU\n", + "d98vdf89976m86t6f/X22ZfdV96fXT9c3FvO/XdrA/fZB8899wy4/25N5j579dxzHxLuv1vDuc+e\n", + "gIt7jQbZ90vRf8+9r+n8qtjH4Prsy+4378+uHy7uGXH/3ZrEffa03HPPjPvv1gTus9crec9d0vqS\n", + "LpZ0k6QbJR1U5/7M/XdrDPfZE6u7LfM48P6IeCGwNXCgpL+reZ+NkarvN6j+e+59Tec32e2m6bMv\n", + "G0Pen10/ai3uEXF3RCwsHz8E/AJ4Zp37tIL775aC++zNMbCeu6SZwKXAC8tC7557zdx/t0Fyn31w\n", + "+qmd0wcUyOrAfOB9I4W947W5wK3l4gPAwoi4pHxtNoCXJ7cM2g7WPxdu/1TRf9dtTYrPy3ktw1nn\n", + "wqoPwm6fa0I8OS2Xj/ehcCt9qP3IXdKKwLeB70XESV2vZX3kLmn26D/8lHEwC7gY2C6CRdVttxn5\n", + "1cX5TWRb7AacAGzRhHbMEHx2ya+WEXA6sKi7sNvguP9udXKfvZlqPXKXtA2wAPg5LD1rfkREXFC+\n", + "nvWRe5OU/fd5wF/df7equM+eRj+1019iGiISqwPXACdEMC91PNZ+Ep8F1gV2S3XZ4zBK3pYZdk27\n", + "1jaCh4DdqOj696blVzXnN97701/PPpbcP7t+uLgPmbL//kHcf7cpcJ+9+dyWGULuv9tUuM+entsy\n", + "1lPH/JmXef6MTYLnxrSAi3uNmtz3q6L/3uT8quD8er2nuX32Trl/dv1wcR9i7r/bRLjP3i7uuQ85\n", + "99+tH+6zN4t77jYu99+tT+6zt4yLe43a0vfr6r+/qN/3tSW/yXJ+I+uxJy3os3fK/bPrh4u7AUv7\n", + "7wcAP5R4fep4LD0JSRxOcdT+T+6zt4t77rYMia0oxjOfARwXwZLEIVkC5aiKM4ANKAr7nYlDsg7u\n", + "uduERXA1sCWwPXC+xJqJQ7IBk3gucCXwJ4ox0S7sLeTiXqO29v0iuAd4NXAHcJXE83ut19b8+jWM\n", + "+UnsSHFVzMnAOyP486DjqkLun10/XNytpwj+EsF7gBOBBRK7po7J6tPRXz+dog1zSltOnlpv7rnb\n", + "uDr68GcCx7oPnxf319vHPXerREcf/pXA192Hz4f76/mq+zZ7Z0i6R9INde6nqXLq+3X04W+n7MPn\n", + "lF8v+ed32L+RQX+9l9w/u37UfeR+JrBjzfuwAenuw8ORL08dk03caH99h8Nwfz1btffcJc0EvhUR\n", + "m/Z4zT33lnIfvp3K/vqZwPq4v95a7rlbbdyHb59yquOVwGLcX8/e9NQBSJoL3FouPgAsjIhLytdm\n", + "A7R4+eDM8llmGbQnrHUc3P8G4CrpTcfD+bc3JT5/fqPLxfXrF54DP58LhxwSQeSU35PzHe25NyGe\n", + "ivLZp0zpVvrgtkyNJM0eLYT56cxPYl+KXvw7I/hG0sAqksPnV450Phx4D7BHBJePvtb+/MaSc27Q\n", + "X+10cbfKuA/fLO6v5yt5z13SuRSXWm0i6Q5J+9a5P0vLffjmcH/dai3uEbFnRDwzIlaOiPUj4sw6\n", + "99c0uV9r2yu/XtfDDzquqrT18yvnw1zBONevtzW/fuScW798tYxVznNp0iivXz8Cz4cxPFvGauY+\n", + "/GC4vz5ckvfczbr68N9wH7567q9bLy7uNcq979dvfh19+NuAqyX+rs64qtKGz6/f/nrv9zY/v8nK\n", + "Obd+ubjbQHT04U8ALpV4Q+qY2sz9dRuPe+42cGUf/qsUPeI57sNPjPvr5p67NVLZh38pMBv34SfE\n", + "/XXrl4t7jXLv+00lvzb04Zv2+U2lv957e83Kr0o559YvF3dLxn34/ri/bpPhnrs1gvvwvbm/br24\n", + "526t0dUEPVwlAAAHFUlEQVSH/77EXhLrpY0qjfJIfROJA4CrcH/dJsHFvUa59/2qzq+jDz8feCNw\n", + "k8SNEidJvFZijSr3N55Bfn4Sz5DYU+IMivMQP6L48tdR1HR/05z/feacW7+S36zDrFMEfwFOBU6V\n", + "mAa8hKLgHwr8j8R1wIXAD4FrIng8WbBTIDED2BbYgSK/DYFLKPL6GPBL99VtKtxzt9YoC+I2FMVw\n", + "B2Aj4FJGi/3NTS2IEtMpflGNFPOXAj+liHvkF9Vf00VobdKIm3Usd+cu7jYFEk8Htme02E+nKJQX\n", + "AhdF8LuEsQl4Xkdss4E7GC3mCyJ4KFV81m7Ji7ukHYGTgGnAaRFx4kQDbLMhuNVXY/Iri+nGjBbT\n", + "VwJ3MlrsF0Tw4MS2ObH8JJ5B8ct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LxFxzkCDq0A/+WXEVxhkoGzJ\n", + "zAfeVx7BZ6PsBGxWnr/7/lhD0gZS3CNihz5XPYcWHtmOl5+kfYCdKa75b50JfH45uJPifqUj1qc4\n", + "ereWkLQixf14vxgRX08dT10iYrGk71DMOLqk+/XkbRlJz+tY3BW4LlUsdSjHHh8G7BoRj6WOp2Y5\n", + "jG++FniepJmSVqKY8vjNxDFZnyQJOB1YFBEnpY6napLWkbRW+XhViplHPWtmE66WmQ/8LfAE8Btg\n", + "/4j4fdKgKiTpFooTHyMnPa6MiAMShlQpSW8E/pNixO5i4LqI2CltVFMjaSdG70NwekSMeblZG0k6\n", + "F9gOeBrFSOQPR8SZaaOqhqRtgAXAzxltsR0REReki6o6kjYF5lEcmK8AnB0RH++5buribmZm1Uve\n", + "ljEzs+q5uJuZZcjF3cwsQy7uZmYZcnE3M8uQi7uZWYZc3M0mSdIVqWMwG4uvczczy5CP3C17krYs\n", + "b5aysqQZ5U0cXtBjvfMlXVu+/s7yuQ0l/UrS08ppfJdJenX52kPl/64naYGk6yTdUH5L0iwpH7nb\n", + "UJD0EWAVYFXgjog4scc6a0fE/eXMjquBV5TLbwdeQ3HjjudExP7l+g9GxBqSDgFWjojjy9kmM3Kb\n", + "RGjt4+JuQ6GcFHgt8CjwsujxD1/SHOAN5eKGwI4RcVX52veB51LcKezh8rmR4r4tcAbwReDrEXF9\n", + "3fmYjcdtGRsW6wAzKO72tWr3i5JmU4xk3joiNgMWAiuXr61GcQetANbofm95Z6NtKcYFz5X01npS\n", + "MOufi7sNi1OBoynuGfCklgzwFOD+iHisvC/s1h2vnQicDRwDfKH7jZI2AP4QEacBp1Hc/ccsqYHc\n", + "rMMsJUlvA/4cEV+WtALw4x53r7kAeLekRRQ3yL6yfO92wEuAgyIiJP2TpL0jYh6jI2VfCRwq6XHg\n", + "QeBtg8nMbGzuuZuZZchtGTOzDLm4m5llyMXdzCxDLu5mZhlycTczy5CLu5lZhlzczcwy5OJuZpah\n", + "/wfyjf2O7F9z0QAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "x=numpy.linspace(-3,3,11);\n", + "y=x**2;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\"Parabola curve\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "pyplot.legend(\"y=x^2\");\n", + "pyplot.grid()\n", + "pyplot.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_5 pgno:152" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "this curve is parabola\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4JHV1//H3h10YtqBmDAyMRAQNsqggiMAoYDAY0SjE\n", + "jc2fRgYDiCggewQBFxBjEBeYgGzjDgyLZiCOiGGHAcIiQ5JBUMAFR0BBkDm/P6ouc+dO33v79q3q\n", + "b9W3P6/n6Ydbt6u7zqHh3OpTVacUEZiZ2WBZLnUAZmbWfy7+ZmYDyMXfzGwAufibmQ0gF38zswHk\n", + "4m9mNoBc/M0mQNI7JD0o6QlJm6eOx6xXLv5mE/N54ICIWD0ibk8dzHCS/kXSYkmndXhuN0nXSvqd\n", + "pIclfV3SlBRxWjO4+FurqdSvbQHrA3f3Y3sTIekAYB/gjcBukg4fscoawKeAlwCvANYFPtfXIK1R\n", + "XPwtGUnTJH1P0q8k/UbSl8rfHy/pvGHrTS/3aJcrl+dJOlHST4E/AJ+QdNOI9z5E0iXlzytL+ryk\n", + "ByQ9IulMSauMEpMkHS1poaRHJZ0raQ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ETEGrUHl2HPX+LzwJQI9k8di9kgk9gb2B/Yrs13zOuk\n", + "m9rp2T59JLE+cBuwaQQPp47HbJBJLE/x/+MxEVySOp4qVXKRl6RlzkaRlO1R8podD3xlqPDn3FcF\n", + "59dmOecGRX4RPEdxzdFJUlcnv2SlmwO+x0k6U9JqkqZKmoPPUpkwib8B3gp8NnUsZva8K4DfAnun\n", + "DqTfujnPfzngUODDFL3/4yLiwj7EllXbR+IS4JoITk0di5ktIbEt8E1g4wieSh1PFSpp+wBrA1tR\n", + "jER9Blhf5aW51h2J7YAtgTNSx2JmS4vgOuBW4COpY+mnbor/dcAPI+JvKf4IrAv8tNaoMjJseNtx\n", + "ETy99HP591VTx1CnnPPLOTfomN+RwGESayUIJ4luDnLsEhEPAETEH4EDJY0518eWshvwFxTzkMys\n", + "gSK4W+Iy4DCKPwTZ6+pUT0lrAy8HVh76XURcU2NcQ9ttdc+/PJVsPsXI5qxOJTPLjcQ04HaKU7F/\n", + "mTqeyajkPH9JHwIOopi+OR/YBrguIt5UVaBjbLvtxX9vigPlb8jtIhKzHEl8Dli97RdhVnXA92Bg\n", + "a+CBiHgjxYHL31cQX9YkVqG4U9nhoxX+AeyrZiXn/HLODcbM72TgXRIb9zGcJLop/k9HxFMAklaJ\n", + "iHsh/38xFZgJ3BHBtakDMbPuRPAYcCpwYupY6tZN2+f7wAcovgHsBPwOWCEi/q724Fra9pFYE7gP\n", + "2DmCO1PHY2bdk1gVWAC8PYKbUsfTi8pn+5RfldYAfhARz0wuvK6219bifwKwfs43izDLWXmzpT0p\n", + "duBad7yuqp7/8yJiXkRc2o/C31YSU4EDgGPHX3dg+6pZyDm/nHODrvKbBUwDOt6ONgcTKv5VkXS8\n", + "pIck3VY+dk0RR02OAb4RwQOpAzGz3kTwLHAUcIqUpk7WLclI5/J+wE9ExGnjrNeqto/Ey4DrgU0i\n", + "+E3qeMysd+XV+TcAp0UwO3U8E1HVSOeDyou8qtaaoj4BJwKnu/CbtV/Z6z8C+LTESqnj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xTdFaQJKAs4G7I+L0\n", + "1PFUTdILJa1V/vwCYBdGqZltONvnO8DGwHPA/wAzI+JXaaOqjqQFFAdmhg7KXBcRXU3lazpJ7wD+\n", + "FXgh8Hvgtoh4S9qoJk/SW4DTKQ6mnR0Ro55O1zaSLgJ2BNYBfgUcGxH/njaq6kh6A3ANcAdLWnif\n", + "jIiu5uE0naRXAedS7NgvRzE653Md12168Tczs+o1vu1jZmbVc/E3MxtALv5mZgPIxd/MbAC5+JuZ\n", + "DSAXfzOzAeTib1YDST9NHYPZWHyev5nZAPKevw00SVuVN9JZWdJq5Q0+Xtlhve9Lurl8/kPl7zaQ\n", + "dJ+kdcpJij+RtHP53JPlP18i6RpJt0m6s7zC1Cw57/nbwJN0ArAK8ALgwYj4TId11o6I35XzUm4E\n", + "diiX/x/wtxQ3ddkwImaW6z8REatLOhRYOSJOKufKrJbbFElrJxd/G3jllMebgaeAbaPD/xSSjgfe\n", + "Xi5uAOwaETeUz/0Q+GuKu8z9ofzdUPHfHpgFnA9cHBG3152PWTfc9jErBs+tRnGnuBeMfFLSDIpx\n", + "29tExBbAfGDl8rlVKe6+FsDqI19b3hlre4pR0OdI2queFMwmxsXfrLjH8NEU94tYpuUDrAH8LiKe\n", + "Lu9LvM2w5z4DnAccB3x95AslrQ/8OiLOAs6iuHOUWXKNuJmLWSqS9gb+FBGzJS0H/FeHOx/9ANhf\n", + "0t0UN2+/rnztjsBrgIMiIiS9U9I+EXEuS8YFvxH4uKRngSeAvfuTmdnY3PM3MxtAbvuYmQ0gF38z\n", + "swHk4m9mNoBc/M3MBpCLv5nZAHLxNzMbQC7+ZmYDyMXfzGwA/X82fee48rbJ0gAAAABJRU5ErkJg\n", + "gg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "x=numpy.linspace(-3,3,11);\n", + "y=-x**2;\n", + "pyplot.plot(x,y);\n", + "\n", + "pyplot.title(\"curve of y=-x^2\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "pyplot.legend(\"y=x^2\");\n", + "print(\"this curve is parabola\");\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_6 pgno:154" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEZCAYAAAB7HPUdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXecXFX5/9+fJJAAoQRQOgQUEDEiKE3EBAQEVOrPAipV\n", + "BEGadBB2V6UXFRCkhyJgBQWRbuhdIkj50oRQQ0mQDoE8vz/O3WR2Mpu9M3vvnHvvPO/Xa17ZO7ec\n", + "59nZPPfM55z7OTIzHMdxnM5gSOwAHMdxnPbhRd9xHKeD8KLvOI7TQXjRdxzH6SC86DuO43QQXvQd\n", + "x3E6CC/6jtMPkraU9KykNyWtEjsex8kCL/qO0z8nALub2bxm9u/YwTRC0nlp3pe0vaR7Jf0vuZEd\n", + "K2loe6J0ioQXfac0KKFdbQFLAw+3o71mkXS6pKWTnxeSdIakuST9VtKCyftLSzo9OWUuYG9gIWBN\n", + "4CvA/jFid+LiRd9pC5KWkvQXSS9LelXSKcn73ZIurDlutKTpkoYk2xMk/ULSbcDbwAGS7qm79r6S\n", + "/pr8PFzSCZKekfRSUhxH9BOTJP1U0tOSJks6X9J8koYDbwJDgX9LerzBub+RdELde3+TtE+Tv5eD\n", + "JT0h6Q1JD0naombf6ZL+VLN9rKTrk82jgZ8B6wK/AX5tZu8CpwCnJ+/3AEcBmNlvzew2M/vQzF4A\n", + "fges00ysTjXwou/kTiIjXAn8F1gGWAK4JNmdxgfke8APgJHAb4EVJX2yZv+2hCIGcAzwSW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yT9S9JZkqI6\n", + "S5bEo+dU4Blc33c6mETHXwPYI3IoDYnpqZOWGEV/GLAacJqZrQa8TYOHKiSNl9SdvPapvUNLGpf1\n", + "Nt3MQe+MnkW1WZ7tzWizmfjQWGBn4GvSEUfk/ftod35l2q5yfmY2oUjx1G4nOv7x8K3jQKsXLb8Z\n", + "M3Um8h+6eawdv5/k5/HJq5sUtH0gV9KiwB1mtmyy/SXgYDP7es0xbRnIbRhfj44F1gQ2si77IEYM\n", + "s0PiC8BVwFpmPBU7HsdpB4mOfw9wXCuyTjtQj04GVgC+HstiIU3tbHtP38xeAp6VtELy1gZQqMGY\n", + "3D166nuNzVAGfX8w+ZWBKudX4Nxa1vFrySu/InjqpCXW7J09gd9J+jdh9s5RkeKYhZoZPWsAx8U2\n", + "Z+sH1/edjqEEOv52QBcFnKnTiI60YUgVQ48WJMgo/yHM4f8oZjz1+Px9pxMo+nx89WhPwljgV4tg\n", + "6ZKmdnrRn10cPRpJWGB5KvA967L3I4fUB9f3nSpTZB0/UQAOB74HbGhd9kzkkICCavplwrrsLeBr\n", + "wFDgb+rRPFlcNytdsaj6foF14Uyocn4Fyy0THb+WLPJTj4YAvwS2AtYtSsFPixf9AUh6998CXgSu\n", + "TebhFgnX953KUVQdP5mWeQ7B82ecddnkyCE1jcs7KUnu7icB4wj6XWE+bNf3nSpRVB1fPRoBXAzM\n", + "DWxtXfZ25JBmweWdDLEumw7sC/wFuFU9WiZySDNwfx6nKhTVVycZ37sS+BDYrIgFPy1e9JvAusys\n", + "y34GnALc0qplQx66aZH0/YLpwplT5fwKkFvmOn4treSXzOS7nmBzvk0RH9psBi/6LWBddjLwU+BG\n", + "9ejzseOpwfV9p7QUUcdXjxYDbgJuAXYp2tTtVnBNfxCoR5sDZwHftC67KXY84Pq+U06KqOOrR8sB\n", + "1wLnAkcXcb2NenyefhtIfLMvJSy0fmXseMDn7zvloojz8dWjlYFrgCOty06PHU9afCC3DViX3Qh8\n", + "HThbPdo2zTl566ax9f0C6M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fmos+Z8a4wWM\n", + "JFiPblH3vhF8sruT1z7AuJr940q7DdoAzrgcJho8ZbDH4vDVtsfzKb5PN7fTzT/5JNtkfP19YOw3\n", + "we4G+wMss0lhfv+Z5VeoeFraBhsC9jO4ZjLsuGvffRlcv5sF6OY8vseLrMm+bc8XhhpsfQU8ehVM\n", + "MthxgWCsWIjffxbbyc/jmVkvrfe4/l7R5B2FB52uBP5hZr+q22dWFXmnATMGk6S1CV811yLCdE/1\n", + "aCihgB1M+IM53boGP1OhNz+JEcBpwBeALc14crDXLgJVGMhNrLMvAuYFvmXG5PB+NrklvfszCD3r\n", + "g5KFgdpDmHb5feBA6qZdVuGzmx1pames2TsiOPS9ZmHQs35/pYv+LEifJswL3pyguf+SHNw9+20+\n", + "R63fdf7ikad+H1W7D26XuxI6Mg8Qiv3NxOrZRqDImv46BAvj9STdn7w2jhRLfMwexmxHYBVAtNnd\n", + "M0+t31znLxR56vfRtPuZbpdPAZ8DNsVsE8xu6qSCn5ZCzN6pp+o9/QG/YkoLMtPd8z7g98BfMXs9\n", + "99gy6PX3l1/9fH4z2veVP0PKKBGk9c9pJbcovXtpBLARwQtrU2a6Xf539qeV77NrhiL39J3ZYTYF\n", + "s58DywK/A7YEJiFdibQ90gK5NZ1vr7/PfH737WkPiX7/N3KYf9/W3n1Yd3YzpIuAF4H9CI6XK2L2\n", + "44EKvhPwnn5ZCHrlNwj2xusDNxOWqsvtG0BNr/8DwjrCE6xr8H8wrvO3j7z0e/VoDGEcal3y7N33\n", + "7dF/jaDV/xH4M2Yv5tJmiSnsQO5AeNEfgDbeAJIZPrsAewJzAGcC463LXh30tcW6BOnq18BxZhTv\n", + "j7HEJPr9mcCBZowf9PV6NDeh+P4QWAY4Gzg+85k5Xuhbxot+QclUV2zTDUA9EvBFwn/4zYF/EArK\n", + "LL3/ZvIro85fdF14MP73Df30Q6/+h8C2BDnlTODv1tXcOhIDNNyWQl/0z26wpKmdbX0i1MkBszcI\n", + "uv/v6m4ApyBldgNICvtt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evuM4\n", + "TgfhPX2nI5G0erKAzXBJ8yQLa3y6wXGXSbo32b9L8t4ykh6TtFDibHiLpA2SfW8l/y4m6WZJ90t6\n", + "MHki1HGi4z19p2OR9HNgBDAX8KyZHdvgmFFmNjXxM7kb+HKyvTPwVcJiKsuZ2Y+S4980s3kl7QcM\n", + "N7OjEt+Xearm6uiUEy/6TseSuC7eC7wLrG0N/jNI6ga2SDaXATY2s7uSfdcAnyCs6vZ28l5v0V8X\n", + "OBe4CLjczP6ddz6OkwaXd5xOZmFgHsLKbHPV75Q0jmB7vZaZfQ6YCAxP9s1NWO3MgHnrz01WolqX\n", + "YMk8XtL380nBcZrDi77TyZwB/JSwXsMs0g4wHzDVzN5L1v1dq2bfscCFQBdwVv2JkpYGXjGzs4Gz\n", + "CSs1OU50oi6i4jixkLQd8L6ZXSppCHB7g5WGrgZ2k/QwYVH0O5JzxwKfB/YyM5O0taTtzex8Ztr2\n", + "rgfsL2ka8CawXXsyc5zZ45q+4zhOB+HyjuM4TgfhRd9xHKeD8KLvOI7TQXjRdxzH6SC86DuO43QQ\n", + "XvQdx3E6CC/6juM4HYQXfcdxnA7i/wM/g2vMu6eCoQAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "#y=ax**2\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "x=numpy.linspace(-3,3,11);\n", + "y=2*x**2;\n", + "pyplot.plot(x,y);\n", + "y=x**2;\n", + "pyplot.plot(x,y);\n", + "y=x**2/2;\n", + "pyplot.plot(x,y);\n", + "\n", + "pyplot.title(\"curve of y=ax**2\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "#pyplot.legend(\"y=2*x**2\",\"y=x**2\",\"y=x**2/2\");\n", + "#if a is negative, we get corresponding curves similar to y=-x**2\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_7 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXeYJGXVvu+HKEGSafkILojADxQBJX2kdUkrAiJKVJak\n", + "oKAkUZKfve2igkgOKhKWHBUD4JIUEEQBCSpRkBUUBBRQQKI8vz/emp2e2Zmdnpmqruqac19XX9PV\n", + "Xf2+50zPnKp66pz3yDZBEATB2GKOsg0IgiAIOk8E/yAIgjFIBP8gCIIxSAT/IAiCMUgE/yAIgjFI\n", + "BP8gCIIxSAT/YEwjaQVJd0v6t6QvlG1PEHSKCP7BsJC0k6Q7JL0g6QlJV0lat2y7RsFXgOttL2T7\n", + "5LKMkHTWAK+9W1Kj32vfkfRQdrC6X9LOOdpwqKRv5DVeUG0i+AdtI+lA4DjgCOCdwFLAKcBWIxhr\n", + "rnytGzHvBu4rY2JJS0k6VtL82fb7JH1b0lqSDgPmyl5fX9Kh2cdeBLawvRCwC3CCpHXanG+GpKVn\n", + "s8vmwJUjdijoLmzHIx5DPoCFgReAT8xmn2nA1JbtCcDjLdszSGfavwdeyZ5f2m+ME4ATWuY8A3gC\n", + "+CswFZgje2854EbgeeAZ4KLZ2LUVcC/wHPBLYMXs9V8AbwAvA/8Gluv3uW2BO/q9diDw42H83uYB\n", + "7gK+kG3PCdwCfDXbXhf4Yfa7OQlYrMXma4H7SQfb+QYZ/yfAgW3a8iiw9CDvLQo8BajNsU4AHgP+\n", + "BdwBrFf232g8hveIM/+gXdYB3gJcPpt9nD1mxw7AR0iB/SJgc0kLAkiakxRwz8/2nQa8BrwHWA3Y\n", + "FPhM9t5UYLrtRYAlgBMHmkzS8sAFwL7A24GrgJ9Jmsv2ROBXwD5Oss/D/T7+E2AZS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hORV5TSbYe\n", + "VrYheVJX3bGH8K97qbNvUC//JLYAPgnsZtP22XxXBP/sbP9TwD4SG5RtTxAEQRWQWBI4HdjJ5tlh\n", + "fbYbZJ/ebT4CnEbS/58pz7IgCIJykZgL+CVwlc23+r5XE82/72scBbwP2NLmzXIsC4IgKBeJI4A1\n", + "gUn9Y2GdNP9WvgosBhxQtiGjpU6640CEf91LnX2D7vdPYmNgN2DnkZ4EFx78JZ0p6SlJf2h5bTFJ\n", + "10p6SNI1khZpdzyb14EdgYMl1irC5iAIgqoiMQ44B5hs89SIxyla9pG0PvAicI7t92evfRv4h+1v\n", + "SzoYWNT2IQN8dtBLF4ltgGOA1WyeL86DIAiCaiAxB3A18Bub/xt8v4po/pLGAz9rCf4PABvafkrS\n", + "OOAG2ysO8LnZOiBxErA4sO1wUpyCIAi6EYnDgEnARJs3Bt+vupr/u2z3XK48BbxrhON8GVgW+Hwu\n", + "VnWYbtcdhyL8617q7Bt0p38S6wH7ktI6Bw387TLX6E0aHVkJ74jO2m1ekdge+LXEr23uztm8IAiC\n", + "0pF4G2mZmz1s/prHmGUF/6ckjbP9d0mLA08PtqOkacCMbPN54G7bN2TvTUgvez/gYmnZ/eHRl/u/\n", + "X9XtnteqYk/4F/71bNu+oUr2jGX/wDcC0+CsW2H3l8gU7tb9s+e7pv1nxsvZUpbm/23gn7aPknQI\n", + "sMhwb/jOui+nA/OS7oCH/h8EQS2QOADYAVjf5rX2PlMBzV/ShcCvgRUkPS5pN+BIYBNJDwETs+3R\n", + "si+wOrBLDmN1hG7UHYdD+Ne91Nk36B7/JNYADgV2aDfwt0vhso/tHQd5a+N85+E/EtsBN0jcZnNf\n", + "nuMHQRB0EomFgYuBvW0ezX38blveYejP8BlgP2BNm5eLsSwIgqA4JEQK/P+w2Xv4n69Inv9IGWHw\n", + "F3A+8ILNXsVYFgRBUBwSewF7A2vZvDL8z1dA8+802c3ezwETszTQytItuuNICf+6lzr7BtX2T2IV\n", + "4Ahgu5EE/napXfAHsP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nQz7Qzbg6bTdRuSLgQ2BN4GPA18zfZZ5VqVH5LWA24Cfk+vhHeo7enlWZUfkt4PnE06sZ8D\n", + "ONf20QPuW/XgHwRBEORP5WWfIAiCIH8i+AdBEIxBIvgHQRCMQSL4B0EQjEEi+AdBEIxBIvgHQRCM\n", + "QSL4B0EBSLqlbBuCYHZEnn8QBMEYJM78gzGNpDWyRjrzSloga/Cx0gD7XS7pjuz9z2avvVvSQ5Le\n", + "lq2k+CtJG2fvvZj9XFzSTZLukvSHrMI0CEonzvyDMY+kqcBbgPmAx20fNcA+i9p+Llsv5TZgg2x7\n", + "D2AzUlOXZW1/Ptv/BdtvlfQlYF7b38zWlVmgbqtIBt1JBP9gzJOt8ngH8DKwjgf4p5A0Bdg623w3\n", + "MMn2b7P3rgbeQ+oy91L2Wk/wXx84EzgP+LHte4r2JwjaIWSfIEgLzy1A6hQ3X/83JU0gLbe9tu1V\n", + "gbuBebP35id1XzPw1v6fzTpjrU9aCnqapJ2LcSEIhkcE/yBIPYa/SuoXMYvkAywEPGf7lawv8dot\n", + "7x0FnAs0gB/0/6CkpYFnbJ8OnE7qHBUEpVOJZi5BUBaSJgOv2r5I0hzArwfofDQd+Jyk+0jN22/N\n", + "Prsh8EFgX9uW9AlJu9g+m97lgj8MHCTpdeAFYHJnPAuC2ROafxAEwRgkZJ8gCIIxSAT/IAiCMUgE\n", + "/yAIgjFIBP8gCIIxSAT/IAiCMUgE/yAIgjFIBP8gCIIxSAT/IAiCMcj/B0ldbIteLiG9AAAAAElF\n", + "TkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "#y=x**2+a or y=x**2-a\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "x=numpy.linspace(-3,3,11);\n", + "y=x**2+2;\n", + "pyplot.plot(x,y);\n", + "y=x**2;\n", + "pyplot.plot(x,y);\n", + "y=x**2-3;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\"Curves of y=x**2 +/- a\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "#pyplot.legend(\"y=x**2+2\",\"y=x**2\",\"y=x**2-3\");\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_8 pgno:156" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEZCAYAAABsPmXUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3X28ZnO9//HXe2YIQ+rklG4wCqcyFYozHWQopyGiTkip\n", + "UP1+bgonlLsyKI1unQrduNlD0ak5R/cpCRM5pGaEoehkiIgwESI+54+1Lvua7Zq91957reu71rre\n", + "z8djP7rWdbPW59M1Pnvtz1rrsxQRmJlZu0xJHYCZmZXPxd3MrIVc3M3MWsjF3cyshVzczcxayMXd\n", + "zKyFXNytNiTNlXRO6jgmQ9Kqkr4r6X5J/1nyuq+T9Joy12nt5eJufSXpbZKulvSApDsk/UDSlvnL\n", + "bbjo4i3As4F/iIg9ylxxRMyMiIVlrtPay8Xd+kbSB4DPAh8lK4DrAKcAO3fekii0Mq0H/DYinkgd\n", + "iA02F3frC0lrAscBB0TEtyLi4Yh4PCK+HxFH5G8LYGVJ8yX9JW9DvLJrHUdIujl/7XpJu3a9trek\n", + "yyR9UtK9kv5X0pyu19eXtDD/7IWSTuluAUmaJennku6TtFjSNqPk8hJJl+TvvU7SzvnzxwEfBvbI\n", + "/zLZp8dnt5B0Rf7ZOyR9XtJK+Wv/IuluSS/Il1+R57JRvnyLpO261nO1pGWS7pT06fF/K9ZqEeEf\n", + "/1T+A8wBHgOmjPKeucDD+XsFnAhc0fX6W4C188e7Aw8Cz8mX9wYeBd6df3Y/4Pauz14BfAKYBmwJ\n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xHxH5VtzGwc8qtHl0TEcaljMatCZXvukmaSFfbNyc542EnSi6rantloJL1K\n", + "0oskTZG0A/BG4Fup4zKrSpVtmRcDV0bEIxHxOHAp8OYKt2c2mrWBi8n63Z8F9ouIa9KGZFadytoy\n", + "+cGib5P1OR8huzDjqog4uJINmpnZk6ZVteKIuDE/C+LHwF+BRfhovplZX1R6QHW5DUknArdGxBe7\n", + "nmvDFEAzs76LiFGv8ahszx1A0rMj4k/55d9vYvlLxXOxBJgZ0Ypxr8uRNDci5qaOoyrOr9nanF9b\n", + "c5N4FnAz6Bljvbfq89wXSLqebI7HARHxlx7vEdDWGxDMSB1AxWakDqBiM1IHULEZqQOo0IzUAVRk\n", + "X5afi7RCle65R0SRon0q2SXll1YZi5lZk0lMIbuieU/gnWO9vw5XqJ4DbC/xvNSBVGAodQAVG0od\n", + "QMWGUgdQsaHUAVRoKHUAFZgD3Es2MXRMfTug2nPjUkSEJE4D7ozAVwuamfUg8X1gQQRndWrnaO+v\n", + "w547ZK2Z/yexUupAypQPlWot59dsbc4vH/wWbfjJ8uGFZCekFL7peqU996IiuFbid8CuwDdTx2Nm\n", + "7TDW3m3ddZ0uvh8wFMFDo71/uc/WoS2TPWYPYL8Itk0WkJm1RpHWRd1lxT1WI5tUOiuC33Web0pb\n", + "BrKxry+W2Dh1IGZmNbI7cHWnsBdVm+IewaPAV8jme7dCm3ua4Pyars35tSy3A4FTxvuh2hT33JeA\n", + "PSXWSB2ImVlN/CPww/F+qDY99+HnWAD8NIIV3fXdzGxMLeq5HxHBSSOfb1LPveNU4ECp0I2Pzcxa\n", + "KZ8jA3DGRD5fx+J+MS2ZN9Oyvt9TOL9ma3N+dc5N0uGSFox47nOSTh7x1n0BIrhnItupXXHPp0N2\n", + "5s2YmbXNOcAcSWsCSJoG7AHM77yha47MhNWu5549z5rALcDGEdzR98DMrPHG6ktL5YwZjxh/C1nS\n", + "D4H/iojTJe0EzIuImV2x7QgcD3pl7xrZzJ47ESwDvg68N3UsZtZOE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BI4HNp9M\n", + "O7ntbRkiWEZ22e57U8diZlbAgcAp/ThO2OjinqvtvJma9/0mzfk1W5vzq2NuVc6R6aXxxd3zZsys\n", + "ISqbI9NLo3vuw+vxvBkzq6/JzJHpvb7EPXdJ/yRpUdfPMkkHVbApz5sxszrbgwrnyPRSaXGPiN9E\n", + "xKYRsSnwSuAhskJc8nbqOW+mjn2/Mjm/ZmtzfjXM7QAqnCPTSz977q8DfhcRt1W0fs+bMbPa6ccc\n", + "mZ7b7VfPXdKZwNURcWrXc6X03IfX53kzZlYvEkPAkonOkem9zprMlpG0MnA78NKIuLvr+QDmk12I\n", + "BHA/sDgiLslfnw1QfPmQf4fXHwQ7vDCCGP/nvexlL3u5zOWXPx2uORvYADRzouvLH+9N5hbg2LoU\n", + "912A/SNizojny95zF3B9ti0uLWu9E49HsztfVBs5v2Zrc351yU3icLLhhu8qd731uUJ1T+C8qjfi\n", + "eTNmVhcSU+nTHJme2696z13SdGApsH5EPDDitVL33LN1et6MmaVX1hyZ3uuuwZ57RPw1ItYaWdir\n", + "257nzZhZLfRtjkwvjR8/sAK1mDdTw3NtS+X8mq3N+aXOrd9zZHppZXH3vBkzS6yvc2R6acVsmd7r\n", + "9rwZM+u/sufI9N5GDXruCXnejJml0Pc5Mr20trjXYd5M6r5f1Zxfs7U5v8S59X2OTC+tLe45z5sx\n", + "s75JNUemZyxt7bkPb8PzZsysP6qYI9N7OzWZLbPCjfenuG8HfJ7sEuB0yZpZq0k8i+wsvQ0iuKfa\n", + "bQ32AdWOiwEBr+n3htvc0wTn13Rtzi9RbvsC3666sBfV+uLueTNmVrXUc2R6aX1bJtuO582YWXWq\n", + "nCPTe3tuywCeN2NmlUs6R6aXgSjuub7Pm2lzTxOcX9O1Ob9+5laHOTK9DExx75o3s0vqWMysVZLP\n", + "kellIHruw9vzvBkzK08/5sj03q577iN53oyZlakWc2R6qbS4S3qGpAWSbpC0RNKsKrc3lq55M/v3\n", + "Y3tt7mmC82u6NufXx9xqMUeml6r33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YCFgK/hiePmh8ZERfkr7d6z71O\n", + "8v77fODv7r9bWdxnT6NI7fRFTANEYnXgF8C8COanjseaT+ILwNrAbqlOexxEydsyg65u59pG8CCw\n", + "GyWd/163/Mrm/Mb6fPrz2Vek7d9dES7uAybvv38I999tEtxnrz+3ZQaQ++82Ge6zp+e2jPXUNX/m\n", + "1Z4/YxPguTEN4OJeoTr3/crov9c5vzI4v16fqW+fvVvbv7siXNwHmPvvNh7uszeLe+4Dzv13K8J9\n", + "9npxz93G5P67FeQ+e8O4uFeoKX2/Ef33lxf9XFPymyjn13kfe9KAPnu3tn93Rbi4G/Bk//0A4CcS\n", + "b0wdj6UnIYkjyPba/8199mZxz92WI7EF2XjmM4HjI3gicUiWQD6q4kxgXbLCfnvikKyLe+42bhFc\n", + "BWwObAecL7Fm4pCszyReBFwB/IVsTLQLewO5uFeoqX2/CO4CXgfcBlwp8eJe72tqfkUNYn4Sc8jO\n", + "ijkVeG8Ef+t3XGVo+3dXhIu79RTBoxG8DzgJWCixS+qYrDpd/fUzyNowpzXl4Kn15p67jamrD38W\n", + "cJz78O3i/nrzuOdupejqw28LfMt9+PZwf729qr7N3pmS7pJ0bZXbqas29f26+vC3kvfh25RfL+3P\n", + "7/AP0oL+ei9t/+6KqHrP/SxgTsXbsD4Z2YeHo7ZMHZON33B/ffvDcX+9tSrvuUuaAXw3Il7W4zX3\n", + "3BvKffhmyvvrZwHr4P56Y7nnbpVxH7558qmOVwDLcH+99aalDkDSEHBLvng/sDgiLslfmw3Q4OVD\n", + "WpbPcsugPeEZx8N9uwJXSm8+Ec6/tS7x+fsbXs7OX7/wXPj1EBx6aATRpvyemu9wz70O8ZSUz955\n", + "SrdQgNsyFZI0e7gQtk93fhL7kPXi3xvBt5MGVpI2fH/5SOcjgPcBe0Rw2fBrzc9vRdqcGxSrnS7u\n", + "Vhr34evF/fX2St5zl3Qe2alWG0m6TdI+VW7P0nIfvj7cX7dKi3tE7BkRz4uIp0XEOhFxVpXbq5u2\n", + "n2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StKbgM+RjdhdBiyKiB3SRjU5knZg+D4EZ0TECk83ayJJ5wHbAM8i\n", + "G4n8kYg4K21U5ZC0FbAQ+DXDLbYjI+KCdFGVR9LLgPlkO+ZTgHMi4pM935u6uJuZWfmSt2XMzKx8\n", + "Lu5mZi3k4m5m1kIu7mZmLeTibmbWQi7uZmYt5OJuNkGSLk8dg9mK+Dx3M7MW8p67tZ6kzfObpTxN\n", + "0vT8Jg4v7fG+8yVdnb/+3vy59ST9VtKz8ml8P5P0uvy1B/P/fa6khZIWSbo2v0rSLCnvudtAkHQC\n", + "sAqwKnBbRJzU4z3PjIj78pkdVwGvyZffDbye7MYdL4yI/fP3PxARa0g6FHhaRJyYzzaZ3rZJhNY8\n", + "Lu42EPJJgVcDDwOvjh7/8CXNBXbNF9cD5kTElflrPwJeRHansL/mz3WK+9bAmcBXgW9FxDVV52M2\n", + "FrdlbFCsBUwnu9vXqiNflDSbbCTzrIjYBFgMPC1/bTWyO2gFsMbIz+Z3NtqabFzwkKR3VJOCWXEu\n", + "7jYovgQcQ3bPgKe0ZICnA/dFxCP5fWFndb12EnAOcCzwlZEflLQucHdEnA6cTnb3H7Ok+nKzDrOU\n", + "JL0T+FtEfF3SFODnPe5ecwGwn6QlZDfIviL/7DbAK4GDIiIk/Zukd0XEfIZHym4LHCbpMeAB4J39\n", + "ycxsxdxzNzNrIbdlzMxayMXdzKyFXNzNzFrIxd3MrIVc3M3MWsjF3cyshVzczcxayMXdzKyF/g9R\n", + "bkaN/WL9/AAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "axis for y=x^2 becomes axis for y=x^2-3 by drawing new x axis 3 units above the original\n" + ] + } + ], + "source": [ + "\n", + "#y=x^2+a or y=x^2-a\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "x=numpy.linspace(-3,3,11);\n", + "y=x**2;\n", + "pyplot.plot(x,y);\n", + "pyplot.plot(y=1)\n", + "pyplot.legend(\"y=x^2\");\n", + "\n", + "pyplot.title(\"Change of axis\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "pyplot.grid()\n", + "pyplot.show()\n", + "print\"axis for y=x^2 becomes axis for y=x^2-3 by drawing new x axis 3 units above the original\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_9 pgno:157" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEZCAYAAAB7HPUdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8dWP9//HX2zxkKr9SyB1Fk6lBVLiNCSXfBvP8RUoo\n", + "qURRMuSrjJH5NksZSkTIjS9ShtuYNHzvTEUpQsn0/v2xruNsxxn2Pnu41rX35/l47Iez9lp7rffZ\n", + "zn3ttT/rWtcl24QQQhgMs+QOEEIIoXei0Q8hhAESjX4IIQyQaPRDCGGARKMfQggDJBr9EEIYINHo\n", + "hwBI2kXSI5L+KWmhLh7nHEkbdWG/y0m6vtP7Df0nGv3QUZI2l3SzpCclPSzpUkkfyJ1rPJJmB74D\n", + "rGV7ftv/6NJxlgOWs/3jSb5+1/TePiPp1MZ1tu8AHpe04Sivm0PSzyU9L2njUdbvJenO9IH3R0lf\n", + "nEy+UIZo9EPHSPoCcDjwLeC1wOLA94CPTmJfs3U23bgWAeYCftPl4+wMnNnG6x8CDgBOGWP9WekY\n", + "L5E0C3B6WvwYcKKk1UZ57VbAgsB6wK6SNmkjZ6gz2/GIR9sPYAHgSeDj42wzDTigYXkq8EDD8kzg\n", + "S8AdwDPp5x+O2MeRwJENxzwZeBh4kKpBnGWMY88JHEHVcD5E9eE0B7A08BTwYsp/5SivvQTYdcRz\n", + "dwAbtfge/QF4f8Py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mcaGJIEnAzcY/uI3HlaJWlhSQumn+emGqK6iDbH9ldtL277TcCmwC/GavCh\n", + "xo0+cHAqNcygmqx6z8x5WnU01QXoK1I3qmNzB2qFpI0lPUDVE+MSST/LnWk8tp+nGr/mcqoeDD8o\n", + "6aY/SecANwBLS3pA0na5M7XoA8CWVL1ebkuPknojvR74RWpvbgIutn1V5kyTNW6pM27OCiGEAVLn\n", + "M/0QQggdFo1+CCEMkGj0QwhhgESjH0IIAyQa/RBCGCDR6IcQwgCJRj+EDpJ0fe4MIYwn+umHEMIA\n", + "iTP9MJAkvTdNcDOnpHnTxB9vH2W7CyXdnNbvmJ5bQtJ9kl6TRma8TtLaad1T6b+vl3RtujP1zgLH\n", + "Zg99Ks70w8CSdADVAFVzAw/Y/vYo2yxk+x9pPJZfAaul5R2ADwG/Bpa0vUva/knb80naE5jT9kFp\n", + "XJp5Sxt1MvSnaPTDwEqjQt4M/BtYxaP8Y5C0P/CxtLgEsJ7tm9K6y4GlgOVtP52eG2r0VwVOAc4E\n", + "LrJ9e7d/nxCaEeWdMMgWBualGhhv7pEr03jqawErp3HWZwBzpnXzUI27bmC+ka9NM2GtSjXk8zRJ\n", + "W3XnVwihNdHoh0F2PLAv1XwNryjtAPMD/7D9jKS3Uo04OuTbwBlUczefOPKFkt4I/NX2SVRT2K3Y\n", + "4ewhTErWSVRCyEXS1sB/bJ8raRbgBklTbU9v2Owy4NOS7gF+C9yYXrs68G5gN9uW9HFJ29g+jeFh\n", + "bdcAvijpOeBJYMzxzUPopajphxDCAInyTgghDJBo9EMIYYBEox9CCAMkGv0QQhgg0eiHEMIAiUY/\n", + "hBAGSDT6IYQwQKLRDyGEAfL/AWTYI39KaLX0AAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "x=numpy.linspace(-3,4,8);\n", + "y=(x-1)**2;\n", + "pyplot.plot(x,y);\n", + "pyplot.legend(\"y=(x-1)^2\");\n", + "pyplot.title(\"Curve of y=(x-1)^2\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "pyplot.grid()\n", + "pyplot.show()\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_10 pgno:158" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At these points curve cuts the axis of x\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XncbXPd//HXO3McU343hZw7RZEpJRSOMTeiGRk6uCMS\n", + "lSQdRclYMlUq00HGO0PKLGOmqHPMou77ZKiIHFOZ8v79sb6Xs12uYe9rD9/1vfbn+Xhcj66199pr\n", + "va/d8dlrf9Z3fZdsE0IIob+8IXeAEEIIvRfFP4QQ+lAU/xBC6ENR/EMIoQ9F8Q8hhD4UxT+EEPpQ\n", + "FP9QDEkHSDqtQ9taVNJ1kp6W9N1ObHOY/Swn6dYubfvnkjbuxrbD+BfFP4yZpK0k3SLpWUmPSrpZ\n", + "0q5d3GUnL0rZGXjM9vy29+7gdgc7EBjTh4ukxSRdKOkRSa9IeuugVQ4DvjPMazeS9KKkGyTNPei5\n", + "ZST9QtJjkp6QdKmkZZrMtH3KstNY/qZQH1H8w5hI2gs4iqoALWp7UeBzwAckzTnMa9r996Y2X99o\n", + "KeDeDm7vdSS9GZgEXDDGTbwCXAx8fKgnbd8KzC9p1UH7XQ04A9ga+DtwjqTZGlZZIGVaBlgU+C3w\n", + "i9HCSFoI+DpwF539IA4ZRPEPLZO0APAtYFfb59l+DsD2dNvb2n4xrTdV0nGSLpb0LDBJ0qaSpkl6\n", + "StKDkvZv2O7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vP91VIfsaSjnecAyVEM5my78\n", + "dcjfbVH8Q0ekcf+bU03Qd136NhBCFmko5zXAP6haPX01hr8Z0fYJHZX6q/sCu1B9zb47c6TQZ9JQ\n", + "zouBU6hG9dS3yHVJ3ef2CeNQ+g/tYIkHqYaCbmlzde5coT+koZw/B/aJET0ji7ZPF5XeN2wnfx2G\n", + "gvbz+59bjuydHMpZ8nvfrDjyD10Ts4KGXujXWTnbFT3/0HUxFDR0i8RswDH02VDO0cQ4/1Abafjn\n", + "OWkxZgUNbRs0K+cnYkTPLDHOP7PS+4adzD9oKOi1vRgKGu9/Pt3O3u2hnCW/982K4h96Js2euDPV\n", + "aIyYFTT7FatqAAALCElEQVSMyaBZOXeweTFzpCJF2ydkkUYAfR9iKGhoXgzlbE60fUJt1WEoaChL\n", + "zMrZWdmKv6TvSrpX0u2SzpO0QK4s3VJ637Db+dMR/3rAQRJT0pC9jon3P59OZpeQxN7A96iGcl7R\n", + "qW0Pv89y3/tm5TzyvxxY3vZKwP1UUwKEPlPyDeJD96WhnK+7wXpoXy16/pI+Cnzc9raDHo+ef5+I\n", + "oaBhsBjKOXYl9fx3pJqIKfSpHENBQ32loZxXE7Nydk1Xi7+kKyTdOcTPhxvWmQK8aPuMbmbJofS+\n", + "Ya/zDxoKemO7Q0Hj/c+nnewSy1IN5byYTEM5S37vm9XV/qrtDUd6XtJkYBNg/RHWmQrMSIszgem2\n", + "r0nPTUr7qeUysLKk2uQpKH+aFfSK66Vffds++qjC8ndkufT8Y1vedQX40RRgX9D/AetAnfLVczn9\n", + "PpnKDJqQrecvaWPgCGAd248Ps070/PuYxLrAWcBeaWhoGMckPkV1cnebXozoGc9qPbePpAeAOal6\n", + "egA32d5t0DpR/Ptc3CB+/EtDfPeimpVzsxjR075an/C1/Q7bS9leJf3sNvqrylJ637AO+dsZClqH\n", + "/O0oOX+z2dNQzmOB7YE161L4S37vm1WX0T4hDKuuN4gP7UlDOc8HlqXFG6yH9tVinP9wou0TGknM\n", + "AfwIWJ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HbUv6uKTP2D6FWdPprgt8RdJLwDPAsPOrh9BL0fMPIYQ+FG2fEELoQ1H8\n", + "QwihD0XxDyGEPhTFP4QQ+lAU/xBC6ENR/EMIoQ9F8Q8hhD4UxT+EEPrQ/wdFKj3tiwH1PwAAAABJ\n", + "RU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "#129,130,131 examples\n", + "from sympy import *\n", + "\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "x=numpy.linspace(-3,4,8);\n", + "y=(x-1)**2-4;\n", + "pyplot.plot(x,y);\n", + "pyplot.legend(\"y=(x-1)^2-4\");\n", + "pyplot.title(\"Graph of y=(x-1)^2-4\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "\n", + "\n", + "x = symbols('x')\n", + "y=(x-1)**2-4;\n", + "\n", + "#131 concept\n", + "print ('At these points curve cuts the axis of x')\n", + "x=3\n", + "pyplot.grid()\n", + "pyplot.show()\t\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/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 new file mode 100644 index 00000000..5f93df8e --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_14_Quardartic_Equations.ipynb @@ -0,0 +1,509 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 Quardartic Equations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_1 pgno:168" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is \n", + "\n", + "{-sqrt(5)/2 + 1/2: 1, 1/2 + sqrt(5)/2: 1}\n" + ] + } + ], + "source": [ + "\n", + "#x^2-x-1=0\n", + "from sympy import *\n", + "\n", + "x=symbols('x')\n", + "y=x**2-x-1;# y=0\n", + "print\"the solution is \\n\"\n", + "\n", + "x=roots(y)\n", + "print x\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_2 pgno:168" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is \n", + "\n", + "{-sqrt(13)/6 + 5/6: 1, sqrt(13)/6 + 5/6: 1}\n" + ] + } + ], + "source": [ + "\n", + "#3*x^2-5*x+1=0\n", + "from sympy import *\n", + "x=symbols('x');\n", + "y=3*x**2-5*x+1;# y=0\n", + "print\"the solution is \\n\"\n", + "\n", + "x=roots(y)\n", + "\n", + "print x\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_3 pgno:168" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is \n", + "\n", + "[-6.74456265 4.74456265]\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "import numpy\n", + "x=symbols('x')\n", + "p1=1/(x-1);\n", + "p2=1/(x+2);\n", + "y=p1-p2;\n", + "y1=1./16.;\n", + "a=numer(y)*denom(y1);\n", + "b=numer(y1)*denom(y);\n", + "r=a-b;\n", + "print\"the solution is \\n\"\n", + "x=numpy.roots([-1, -1, 8])\n", + "print 2*x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_4 pgno:171" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is \n", + "\n", + "('x=,', {-3: 1, 5: 1})\n" + ] + } + ], + "source": [ + "\n", + "#x^2-2*x-15=0\n", + "\n", + "from sympy import *\n", + "import numpy\n", + "x=symbols('x');\n", + "y=x**2-2*x-15;# y=0\n", + "print\"the solution is \\n\"\n", + "print(\"x=,\",roots(y))\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_5 pgno:171" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is \n", + "\n", + "('x=, \\n', {1/3: 1, -4/3: 1})\n" + ] + } + ], + "source": [ + "\n", + "#9*x*(x+1)=4\n", + "from sympy import *\n", + "import numpy\n", + "x=symbols('x')\n", + "y=9*x*(x+1)-4; #y=0\n", + "print\"the solution is \\n\"\n", + "print(\"x=, \\n\",roots(y))\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_6 pgno:173" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('\\t x= \\n \\n or ', 0.20000000000000001)\n", + "(' x=', -2.0)\n" + ] + } + ], + "source": [ + "\n", + "#5*x**2+9*x-2=0\n", + "from sympy import *\n", + "from numpy import sqrt\n", + "x=symbols('x');\n", + "y=5*x**2+9*x-2;\n", + "a=5;b=9;c=-2;#from equation we get these values\n", + "#using the formula - solution of quadratic equation ax**2+bx+c=0\n", + "x=(-b+sqrt(b**2-4*a*c))/(2*a);\n", + "print(\"\\t x= \\n \\n or \",x)\n", + "x=(-b-sqrt(b**2-4*a*c))/(2*a);\n", + "print(\" x=\",x)\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_7 pgno:174" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solution is\n", + "5.21221445045\n", + "or \n", + "\n", + "0.288\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "from math import sqrt\n", + "\n", + "x=symbols('x');\n", + "p1=1/(x-1);\n", + "p2=2./3.;\n", + "p3=2/(x-3);\n", + "p=(p1+p2-p3);\n", + "p=3*numer(p);#As p=0 and to remove fractions, multiply by 3\n", + "a=2;b=-11;c=3;#from equation we get these values\n", + "#using the formula - solution of quadratic equation ax**2+bx+c=0\n", + "print(\"the solution is\")\n", + "\n", + "x=(-b+sqrt(b**2-4*a*c))/(2*a)\n", + "print x\n", + "print(\"or \\n\")\n", + "x=(-b-sqrt(b**2-4*a*c))/(2*a)\n", + "print round(x,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_8 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('\\n the solution is t= or t=\\n', 30.422, 1.578)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#given u=160,g=10,h=240\n", + "from sympy import *\n", + "from math import sqrt\n", + "#using the formulae \"h=u*t-(g*t**2)/2\"\n", + "u=160;\n", + "g=10;\n", + "h=240;\n", + "t=symbols('t');\n", + "r=(240-u*t+(g*t**2)/2)#u*t-(g*t**2)/2-h=0\n", + "a=5;b=-160;c=240;#from equation we get these values\n", + "#using the formulae - solution of quadratic equation ax**2+bx+c=0\n", + "t=(-b+sqrt(b**2-4*a*c))/(2*a);\n", + "t1=(-b-sqrt(b**2-4*a*c))/(2*a);\n", + "print(\"\\n the solution is t= or t=\\n\",round(t,3),round(t1,3))#the answer given in textbook is wrong\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_9 pgno:176" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "avg. speed for 1st journey is x=24km/h\n", + "('total_timefhours', 6)\n" + ] + } + ], + "source": [ + "\n", + "from sympy import *\n", + "import numpy\n", + "#let x km/hr is avg. speed for 1st journey\n", + "#as velocity=distance/time, time for 1st journey is 84/x hrs\n", + "#speed for return journey is 84/(x+4).from given data, this is <1/2 hr than the 1st time \n", + "x=symbols('x');\n", + "#In algebraic form,(84/x)-(84/(x+4))=1/2\n", + "y=(84/x)-(84/(x+4))-1/2; #y=0. so, numerator=0\n", + "x=numpy.roots([-1, -4, 8])\n", + "#x=roots(numer(y));\n", + "#velocity can't be in negatives.take +ve root\n", + "print(\"avg. speed for 1st journey is x=24km/h\")\n", + "distance=84;#given\n", + "velocity=24;#found\n", + "time=distance/velocity;#time for 1st journey\n", + "time1=distance/(velocity+4);#time for 2nd journey\n", + "print(\"total_timefhours\",time+time1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_10 pgno:179" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solutions are: \n", + "\n", + "({-12/5: 1, 3: 1}, -x + 1)\n" + ] + } + ], + "source": [ + "#x+y=1, 38x^2-x*y+y^2=37\n", + "from sympy import *\n", + "x=symbols('x');\n", + "y=1-x;\n", + "#substitute y=1-x in equ. 38x^2-x*y+y^2=37\n", + "Y=3*x**2-x*(1-x)+(1-x)**2-37;\n", + "x=roots(Y);\n", + "#y=1-x;\n", + "print('the solutions are: \\n')\n", + "print(x,y)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_11 pgno:180" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solutions are: \n", + "\n", + "('(x,y)=() \\n', {12: 1, 7: 1})\n", + "y=19-x\n" + ] + } + ], + "source": [ + "#x+y=19, xy=84\n", + "from sympy import *\n", + "x=symbols('x');\n", + "#substitute y=19-x in xy=84\n", + "Y=x*(19-x)-84;\n", + "x=roots(Y);\n", + "\n", + "print('the solutions are: \\n')\n", + "print(\"(x,y)=() \\n\",x)\n", + "print 'y=19-x'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_12 pgno:181" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the solutions of (x,y) are: \n", + "\n", + "[array([ -1.02144599e+01+0.j , 1.02144599e+01+0.j ,\n", + " 1.11022302e-16+3.91601715j, 1.11022302e-16-3.91601715j]), {}]\n" + ] + } + ], + "source": [ + "\n", + "#x**2+y**2=89, xy=40\n", + "from sympy import *\n", + "import numpy\n", + "x=symbols('x');\n", + "#substitute y=40/x in x**2+y**2=89\n", + "Y=x**2+(40/x)**2-89;\n", + "x=numpy.roots([1, 0, -89, 0, -1600]);#Y=0, numerator=0\n", + "y=roots(89-x**2);\n", + "print('the solutions of (x,y) are: \\n')\n", + "print [x,y]\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/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 new file mode 100644 index 00000000..b50fdfd2 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_16_Logarithms.ipynb @@ -0,0 +1,716 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 Logarithms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_1 pgno:196" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8HVW5//HPNyH0DleRGoyUiwQCXmJQIgnNgBK8qFyU\n", + "FooFuRRRQIqCPzWCDcSCSEsuiCggTeliAJEiQiABQVBCVXpvBvL8/pg5zM7h5Jzd1+y9v+/X67yy\n", + "Z8/sPc95ss88e9aaWUsRgZmZ9a5hqQMwM7O0XAjMzHqcC4GZWY9zITAz63EuBGZmPc6FwMysx7kQ\n", + "WFeSNEHSw018vzMkPSPppma9p1lZuBCYDUHSeGArYOWIGNeifYyQdJ6kByTNk7T5ANscJ+mp/OfY\n", + "AdYfLWmNAZ4/oxUxW/dwIbBSkjQ8dQwV1gDmRMRrLd7PdcCuwL+A+e70lPQ5YAdgg/xn+/w5JB0u\n", + "abN804UkHSnp/ZK+I2n9fJvFJf1A0mot/h2sA7kQWNtI2kbSvZKek/QTSddK2jtfN0XSDfnB6ing\n", + "aEnvlnRN/g34SUlnSVqm4v3mSPqKpLvyZpvTJS3Sb58HS3pc0mOSpgwS28qSLpb0tKT7JO2TP783\n", + "cAqwqaQXJR3d73UL569Zv+K5d0h6WdIK1eYmIuZGxIkRcQPw5gCb7AF8LyIei4jHgO8Bfb/PD4Ft\n", + "gZ2Bk4A7I+Jm4Djg88BE4P+A8yLiYUmHSbqpr9hK2lfSbEkLVxuvdRcXAmsLSSsC5wKHAcsD9wKb\n", + "Mv8337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XBuSikzkU+0czZwKER/D1lLPVKcdXQC2Rz\n", + "FS8u6U1gceDRBHGYmTXDVOBeSjTRTK2S9BFI+izwfeBV4IqI2K3fevcRmFnp5RPNnA6MieDp9PF0\n", + "yH0EkkYBBwEjgeeBcyXtEhG/6LfdNGBOvvgcMDMiZuTrJgB42cte9nKqZYhZwBlw8PFw/Ghofzz5\n", + "4ylZPG8dL2vW9jMCSf8DbB0R++TLuwHjImK/im18RpCTNKHvA9DrnIuCc1FIkYt8opnzgAdbOdFM\n", + "rTrpqqF7gHGSFpMkYCvg7gRxmJnVawqwFiWdaKZWqfoIDgX2AOYBtwH7RMTcivU+IzCzUsonmrmJ\n", + "bKKZWanjqVTvsdM3lJmZVandE83UqpOahqwGqa+RLhPnouBcFNqci46YaKZWHn3UzKwK+UQz+wIb\n", + "l32imVq5acjMbAj5RDO3k909/JvU8SyI+wjMzFpE4nQg2j3RTK3cR9Cl3BZccC4KzkWh1bmQ+Djw\n", + "IeDAVu4nJfcRmJktQD7RzE+ByZ000Uyt3DRkZjaAfKKZK4DrI/h/qeOphpuGzMya6wBgCbLRRbua\n", + "C0HJuS244FwUnItCK3JRMdHMrp040UytXAjMzCpUTDRzSAT/SB1PO7iPwMysgsTxwGrAJyMo3wFy\n", + "EB0zH4GZWVnlE818gmyimY4qAo1w01DJuS244FwUnItCs3IhsQJwBrBnGWYbaycXAjPreflEMz8n\n", + "G1X06tTxtJv7CMys50nsRTaF7tgIXksdT7081pCZWR0qJpqZGMHs1PE0omNuKJO0jqTbK36el3RA\n", + "u+PoFG4LLjgXBeei0Egu8olmzgK+2elFoBFtv2ooIu4FNgKQNAx4FLig3XGYmQFHkU0086PUgaSU\n", + "tGlI0jbA1yJis37Pu2nIzFpKYlOyL6EbR/BY6niaoWOahvrZmewOPjOztsknmjkT2LdbikAjkt1Q\n", + "JmlhYHvgsAWsnwbMyRefA2ZGxIx83QSAXliubP8sQzwpl/vnJHU8iZfHRMQJJYon5fJB1Hx8+MWh\n", + "8OkZ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qwaQzwxyDpGOBj+eIa\n", + "ZCO/3pyvuwIYBWwYES/nz/UVgvHA6cBZwIURcUerfx+zerlpyHrZisASwJJkZwXzkTSBbJz/cREx\n", + "hmx6xEXydYuTDe8bwFL9X5vPIjWebPjfaV08YYx1ARcC62UnA0cBZwNvaxYim+7w2Yh4TdK6wLiK\n", + "dccBZ5KN/HhK/xfmw4Y/GRGnAqeSzTFrVkopJ6YxS0bS7sDrEXGOpGHAnyRNiIgZFZtdDnxe0t3A\n", + "vcCN+Ws3J5sc54B8lrSPS9ojIqZTzAQ1EfiypLnAi+Tjw5uVkfsIzMx6nJuGzMx6nAuBmVmPcyEw\n", + "M+txLgRmZj3OhcDMrMe5EJiZ9TgXAjOzHudCYGbW4/4/e2Zr8lsWfTYAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.78630092323 1.0\n" + ] + } + ], + "source": [ + "\n", + "import numpy\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "x=numpy.linspace(0,1,7);\n", + "y=10**x;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\" graph of y=10**x\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\");\n", + "pyplot.legend(\"y=10**x\");\n", + "\n", + "pyplot.grid()\n", + "pyplot.show()\n", + "\n", + "\n", + "\n", + "#ex1:1.8*2.6=? ,from graph\n", + "#1.8=10**0.26 \\n 2.6=10**0.42 \n", + "x=10**0.26;y=10**0.42;\n", + "#format(4)\n", + "ex1_ans=x*y#from the graph\n", + "\n", + "#ex2:9**(1/3)\n", + "#9=10**0.96\n", + "x=10**0.96;\n", + "#format(4)\n", + "ex2_ans=x**(1/3)#third law of indices\n", + "\n", + "print ex1_ans,ex2_ans\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_2 pgno:198" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.74973631557 10 3.0 4.0\n" + ] + } + ], + "source": [ + "import math\n", + "from math import log10\n", + "\n", + "\n", + "ans1=log10(56.2)\n", + "ans2=10\n", + "ans3=log10(1000)\n", + "ans4=log10(81)/log10(3)\n", + "\n", + "print ans1,ans2,ans3,ans4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3 pgno:201" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "from anti-logarithm table,corresponding no. is 2352\n", + "235.2\n" + ] + } + ], + "source": [ + "\n", + "#no. whose logarithm is 2.3714\n", + "\n", + "mantissa=0.3714;\n", + "print(\"from anti-logarithm table,corresponding no. is 2352\")\n", + "# As,characteristic is 2,no. must lie between 100 & 1000.\\n \\n hence 3 significant figures in the intergral part\n", + "print 235.2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_4 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "253.7161\n" + ] + } + ], + "source": [ + "\n", + "#value of (57.86*4.385)\n", + "from math import log10\n", + "#log(p*q)=log(p)+log(q)\n", + "p=57.86;q=4.385;\n", + "logx=log10(p)+log10(q);\n", + "format(6)\n", + "x=10**logx\n", + "print x\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_5 pgno:204" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "61.1\n" + ] + } + ], + "source": [ + "\n", + "#value of (5.672*18.94)/1.758\n", + "from math import log10\n", + "#log(p*q)=log(p)+log(q) , log(p/q)=log(p)-log(q)\n", + "p=5.672;q=18.94;r=1.758;\n", + "logx=log10(p)+log10(q)-log10(r);\n", + "\n", + "x=10**logx\n", + "print round(x,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_6 pgno:204" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.73\n" + ] + } + ], + "source": [ + "\n", + "#5th root of 721.8\n", + "from math import log10\n", + "#log(a)^n=n*log(a)\n", + "p=721.8;n=1./5.;\n", + "logx=n*log10(p);\n", + "#format(6)\n", + "x=10**logx\n", + "print round(x,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_7 pgno:206" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-0.4969 -1.4969 -2.4969\n" + ] + } + ], + "source": [ + "\n", + "#logs of 0.3185,0.03185,0.003185\n", + "from math import log10\n", + "x=0.3185;y=0.03185;z=0.003185;\n", + "logx=log10(0.3185)\n", + "logy=log10(0.03185)\n", + "logz=log10(0.003185)\n", + "\n", + "print round(logx,4),round(logy,4),round(logz,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_8 pgno:206" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "from anti-logarithm table, corresponding no.is 3840 \n", + "0.00348\n" + ] + } + ], + "source": [ + "\n", + "#no. with logarithm -3.5416\n", + "\n", + "mantissa=0.5416;\n", + "print(\"from anti-logarithm table, corresponding no.is 3840 \")\n", + "#characteristic is -3.\\n \\n hence there will be 2 zeros after the decimal point\n", + "print 0.003480\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_9 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('sum=-', 2.3455)\n" + ] + } + ], + "source": [ + "\n", + "#sum of logarithms -1.6173,-2.3415,-1.6493,-0.7374\n", + "\n", + "x=.6173;y=.3415;z=.6493;a=0.7374;#mantissa's of all 4 logarithms\n", + "mantissa=x+y+z+a;\n", + "#2 which is carried forward from the addition of mantissa is +ve.\n", + "characteristic=-1-2-1-0+2;#characteristic part of all 4 logarithms\n", + "print(\"sum=-\",mantissa)\n", + "\n", + "\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_10 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.7712\n" + ] + } + ], + "source": [ + "\n", + "#logarithm : -1.6175-(-3.8463)\n", + "\n", + "mantissa=1.6175-0.8463;\n", + "#in borrowing to subtract 8 from 6, -1(characteristic) becomes -2 \n", + "characteristic=-2-(-3);\n", + "print mantissa+characteristic\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_11 pgno:208" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-4.6289\n" + ] + } + ], + "source": [ + "\n", + "#logarithm : multiply -2.8763 by 3\n", + "\n", + "num=2.8763;#given\n", + "mantissa=0.8763;\n", + "mul=mantissa*3;\n", + "#when mantissa is multiplied, 2 is carried forward. (-2)*3=-6. the characteristic becomes -6+2=-4\n", + "print -4.6289\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_12 pgno:208" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.16406\n" + ] + } + ], + "source": [ + "\n", + "#logarithm: -1.8738*1.3\n", + "\n", + "#multiply mantissa & characteristic seperately and add results\n", + "x=0.8738*1.3;\n", + "y=-1*1.3;\n", + "#as y=-1.3 is -ve, change it to -2.7 to make mantissa +ve\n", + "y=-2.7;\n", + "mantissa_sum=0.13594+0.7; #of x & y\n", + "characteristic_sum=2-1;\n", + "print 2*characteristic_sum-mantissa_sum\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_13 pgno:208" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-2.4572\n" + ] + } + ], + "source": [ + "\n", + "#divide -5.3716 by 3\n", + "\n", + "#characteristic=-5=-6+1 or the log as -6+1.3716\n", + "characteristic=-6/3;\n", + "mantissa=1.3716/3;\n", + "print characteristic-mantissa\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_14 pgno:211" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.912\n" + ] + } + ], + "source": [ + "\n", + "#log50 to the base e \n", + "from math import log\n", + "print round(log(50),3)#natural logarithm\n", + "# or, log50_base_e=log10(50)*2.3026\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/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 new file mode 100644 index 00000000..deb1f097 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_18_Variation.ipynb @@ -0,0 +1,461 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Variation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_1 pgno:225" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEZCAYAAAB4hzlwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAH6dJREFUeJzt3XuUZFV59/HvrwVGuQ5oFhhQJm8EXRplBCUoKhNFRDEo\n", + "ZAEiMyCJEBkjiErAgQSQWQbkldeAETUyFxkG9DWC6CAMRBBU5CIMIhdFwigQQSJ3UGHgyR9nd1MU\n", + "fTnVXdX77KrfZ61Z03Xpql8XQ+0++3nOU4oIzMzMAIZyBzAzs+bwomBmZiO8KJiZ2QgvCmZmNsKL\n", + "gpmZjfCiYGZmI7woWN+RdJykM7v0WJtKulzSw5JO7sZjlq6br681jxcF6zlJ75N0laRHJd0r6ceS\n", + "DunhU3bz5JuDgd9GxIYRcUQXH7drJB0gaadRrj9W0pYtl7eW9C1Jv5X0O0kXStp6Ek/pk5v6mBcF\n", + "6ylJHwc+B5wEbBoRmwIfAnaUtM4Y3zPVf5ea4ve32hK4pYuP1zWSDpb03mcu6mBJ75H0SUlvStev\n", + "JeloSX8JbAScB2wNbApcDXxrjMeeJemOsZ66iz+GNYwXBesZSRsBxwOHRMQ3I+IxgIhYFRFzI+KJ\n", + "dL8lkk6XdIGkR4E5knaTdL2khyT9WtKxLY87S9LTkg6SdLek/06Lz7AA1pG0NG37/EzSduPkfKOk\n", + "ayQ9KOlqSW8YzgXsD/yjpEckvbXt+14v6R5JarluT0mrOnydtpd0paQH0s9ymqS1W7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qU2Cz1Mw6xOeamrTxdtH\n", + "GZS+L+n806et1fRUYE/QqzLHmpKSXv92JWevy0cKZg011lRTeePUesg1BbMGSq2mp6Y/J5bSWWTN\n", + "5pqCWWE81dRyc00hg9L3JZ2/N9JU0wlbTZuav66S85ecvS4fKZhl5qmm1iSuKZhl1NZqerBbTa2X\n", + "PPvIrKFGazX1gmBNMOGiIOlNktZPX8+TdIqkLXsfrX+Vvi/p/FN9frYAVgJ7UbWanhFB7UP23Pmn\n", + "quT8JWevq86RwunAY5K2AT4G3A58taepzPqUp5pa001YU5B0fUS8VtKxwN0R8RVJ10XEttMTcdRM\n", + "rilYUdpaTfdzq6nl0K2awiOSFlAN4fqOpOcBa3cjoNkgqNtqatYEdRaFfYA/An8bEfcAmwP/t6ep\n", + "+lzp+5LOX/d5mCFxMrAcOCSC+RE8NvXH9eufS8nZ65rwPIWI+A3w2ZbLvwaW9jKUWek81dRKNWZN\n", + "QdIPI2JHSY/CczojIiI27Hm6MbimYE0lMQQcBiwAjgIWddJZZNZLdd47ffKaWZe0TTWd584ia5qu\n", + "FJol7TzKdQdMJdigK31f0vlHe8zpazX1659PydnrqlNoPlbS6ZLWk7SZpG8Du/cylKRdJd0q6TZJ\n", + "R/byucymQmKmxDLgeKqppgs95tpKVuc8hSHg48DfU9UWjo2I5T0LVLW8/hzYGbgbuAbYNyJuabmP\n", + "t48su9RquhRYARzRjc4is17q1nkKG1OdcHM78ATwUqmnn/20PfDLiFgdEU8C5wDv6eHzmXWkV62m\n", + "Zk1QZ1G4ErgoIt5BtThsDvywh5k2B+5suXxXuq5vlL4vOcj5U6vp1cDLqFpNp33M9SC//rmVnL2u\n", + "Op+n8PaI+BVARDwOfETSTj3MVKsdStISYHW6+CCwKiIuS7fNAWjqZWC2pMbkcf4637+24InZwAI4\n", + "aTEsuCDiqfvKyd+cy6XnL+ly+voDVFZTQ62WVEkbA1sDM4avi4jL6zxBpyTtABwXEbumy58Eno6I\n", + "k1ru45qCTRu3mlq/6FZL6k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+DlyZvncnYDvg\n", + "0IgISX8j6YCIWMozY6//CviEpCeBR4BiPh/B+pdrCmZmNsLbR2ZmNsKLgpmZjfCiYGZmI7womJnZ\n", + "CC8KZmY2wouCmZmN8KJgZmYjvCiYmdmI/wU5Y2ng4hXsDQAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Hence, the law is\n", + "\n", + "or by solving by the method of Section 185\n", + "3*x**2 - 10\n" + ] + } + ], + "source": [ + "\n", + "#y=a*x**2+b\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "import numpy\n", + "from sympy import *\n", + "x=numpy.array([0, 0.5, 1, 1.5, 2, 2.5]);\n", + "y=numpy.array([-10, -9.25, -7, -3.25, 2, 8.75]);\n", + "pyplot.plot(x**2,y);\n", + "pyplot.title(\"Graph of y=ax**2+b\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\");\n", + "\n", + "pyplot.grid()\n", + "pyplot.show()\n", + "\n", + "\n", + "#the values of a & b can be found by substituting two suitable points(x,y)in a*x**2+b-y=0\n", + "x=1;y=-7;#p1=-a+b+7 \n", + "x=4;y=2;#p2=4*a+b-2\n", + "a=symbols('a');\n", + "p=-a+7-(4*a-2);\n", + "a=roots(p);\n", + "x=1;y=-7;\n", + "#b=y-a*(x**2);\n", + "x=symbols('x');\n", + "#(or) by inspection of graph, intercept on y-axis is (i.e., b) is -10 and a,the gradient of the line,is 3\n", + "print(\"\\n Hence, the law is\\n\")\n", + "x=symbols('x');\n", + "y=3*x**2-10\n", + "print(\"or by solving by the method of Section 185\")\n", + "#ny=a*x**2+b\n", + "\n", + "print y\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_2 pgno:229" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEZCAYAAAB4hzlwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYXGWZ9/HvLyEJewB5JexR2UQxgAMDAkNEliCDoMii\n", + "IPvoiBpF4JWACg6oLOK4va4sAZRNFIRhDUsGRGQZCCCLgBoRlCCSMOwk5H7/OKc7RVPdXemu6uec\n", + "p36f66qLOnVO1bnvtNZd51nOo4jAzMwMYFTqAMzMrDpcFMzMrJeLgpmZ9XJRMDOzXi4KZmbWy0XB\n", + "zMx6uSiYlSRNlvSXIb73QEk3tzsms5HmomCVJ2m2pBclPSfpSUlnSVomdVxmOXJRsDoI4F8jYjlg\n", + "U+CfgC8uzgeo1IngqkLS6NQxWP25KFitRMRfgauBd0paQdJ/SXpK0jOSLpe0es+xkmZKOlHSLcAL\n", + "wFslHSTpAUn/K+kPkj7e9xySpkn6u6Q/Sfpow+vjJZ1Tnm+2pGP7KzSSvi3pMUnPSrpT0tb95SRp\n", + "KUmnlZ85T9LNkpZs1pxVHrNd+fx4SRdLOlfSs8Ax5RXVig3Hb1LmMrrcPrjM/xlJV0taq8V/eusS\n", + "LgpWFwKQtCawM3AXxf9+zwDWKh8vAd/r8779gEOBZYE/A3OAXSJieeAg4D8lbdJw/ATgTcBqwAHA\n", + "jyWtV+77LrAc8BZgW2D/8jOauR2YBKwInAf8XNLYfo79BrAJsCWwEnAUsLCfY/vel+YDwM8jYjxw\n", + "KnArsEfD/o+W+1+TtBswDfggsDJwM3B+P+exbhURfvhR6QcwG3gOmFs+/x4wrslxGwPPNGzfCBw/\n", + "yGdfAkwtn08G5gNLNey/kKKpajTwCrBBw76PAzeWzw8Ebh7gPM8AGzV5fRTwYj/7JgN/6fPan4Dt\n", + "yufHAzP77D8EuL58LuAxYOty+yrg4D7nfgFYM/Xf2I/qPHylYHUQwG4RsWJETIyIT0fEK5KWlvSj\n", + "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/mdlQefJam0nsTtGP8H87e568\n", + "2zWdX73lnF/OubXKfQotkngz8ANgzwieTx2PmVknuPmopfMh4GLgDxGdvUowM+sUz1Non32B9cv/\n", + "mplly30Kg5BYA/gm8LEIXh6Zc+bdrun86i3n/HLOrVUuCgMom43OAL7rW1iYWTdwn8KA5+GTwEHA\n", + "eyJY0OnzmZl1kucpDOscrAP8lmJt5Yc6eS4zs5HgeQpDJDEamA58NUVByL1d0/nVW8755Zxbq1wU\n", + "mvs8sAD4dupAzMxGkpuP3vDZvJNiBbXNI/hTJ85hZpaCm48Wk8RY4BxgmguCmXUjF4XX+yLwV4ph\n", + "qMnk3q7p/Oot5/xyzq1VntFcktgM+ASwcQT1a1MzM2sD9ykAEksBdwFfieCCdn2umVmVVLZPQdKp\n", + "kh6UdI+kX0oa37BvmqRHJD0kaccRCulrwL0uCGbW7VL1KVwLvCMiJgEPA9MAJG0I7A1sCEwBvi+p\n", + "ozFKTAb2guosmpN7u6bzq7ec88s5t1YlKQoRMSMiFpabtwFrlM93A86PiPkRMRt4FNi8U3FILAec\n", + "BXw8gn906jxmZnVRhdFHBwNXls9XAx5v2Pc4sHoHz/1N4PoIrujgORZbRMxMHUMnOb96yzm/nHNr\n", + "VcdGH0maAUxosuuYiLi8POZY4NWIOG+Aj+pIT7jELsD2wKROfL6ZWR11rChExA4D7Zd0IPB+4H0N\n", + "Lz8BrNmwvUb5WrP3Twdml5vzgFk9Vb6nXbD/7UkfgFPPgB33jOB/Bz9+xLc/t3j51G7b+dV7O9v8\n", + "GvsUqhBPm/I5sExpNi1IMiRV0hTgNGDbiHi64fUNgfMo+hFWB64D1ok+QQ53SKrEBcCTEXxuqJ/R\n", + "SZIm53wZ6/zqLef8cs4NWvvuTFUUHgHGAs+UL90aEYeV+46h6GdYAHw2Iq5p8v4hFwWJvYGvAJtE\n", + "8NJQPsPMrI4qWxSGa6hFQWJVYBawawS3tz8yM7PqquzktRTKpTV/Avy46gUh97HSzq/ecs4v59xa\n", + "1U33Pj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jsGsP56nYGZmvXylYNYPSZuVixyNk7RMufjKhk2Ou0TSneX+\n", + "fytfW1vSw5LeVN6d8mZJ25f7ni//u6qkmyTdLem+clatWVK+UjAbgKQTgCWBpYC/RMTJTY5ZMSLm\n", + "lveUuR34l3L7EGAnigV33hoRnyyPfy4ilpN0BDAuIr5W3ntnmdzuzGn146JgNoDyzpl3Ai8BW0aT\n", + "/8NIOh7YvdxcG5gSEbeV+64B3kaxMuAL5Ws9RWEb4Ezgp8ClEXFPp/MxG4ybj8wGtjKwDMXqfkv1\n", + "3SlpMsWtzbeIiI2BWcC4ct/SFCvmBbBc3/eWK5ltQ3Hb7emSPtaZFMxa56JgNrAfAV+kWLPjDU1H\n", + "wPLA3Ih4uVx3eouGfScD5wLHAT/p+0ZJawF/j4jTgdMpVvsyS6rSi+yYpSRpf+CViLhA0ijgN01W\n", + "q7oa+HdJDwC/B24t37st8G5gakSEpD0kHRARZ7Po1szvBY6UNB94Dth/ZDIz65/7FMzMrJebj8zM\n", + "rJeLgpmZ9XJRMDOzXi4KZmbWy0XBzMx6uSiYmVkvFwUzM+vlomBmZr3+P1eHSGnCQO2hAAAAAElF\n", + "TkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "x=numpy.linspace(-3,3,11);\n", + "y=x**3;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\"Parabola curve\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\")\n", + "pyplot.legend(\"y=x^2\");\n", + "pyplot.grid()\n", + "pyplot.show()\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/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 new file mode 100644 index 00000000..bae4f285 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_1_The_Meaning_of_Algebra.ipynb @@ -0,0 +1,134 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 The Meaning of Algebra" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_1 pgno:19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " total no. of pence =100x+y \n" + ] + } + ], + "source": [ + "#ex1: no.of pence in x pounds added to y pence\n", + "\n", + "#to express pounds in pence, multiply by 100\n", + "from sympy import *\n", + "x=symbols('x')\n", + "x_pounds=100*x; # x_pounds=100*x pence\n", + "print' total no. of pence =100x+y '\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_2 pgno:19" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "car travels *vkm in 20min 0.333333333333\n" + ] + } + ], + "source": [ + "#ex2:car travels t h at v km/h.how far it go in 20min\n", + "\n", + "#'car goes 1*v km in 1h 2*v km in 2h ... t*v km in th'\n", + "x=20./60.;\n", + "print'\\ncar travels *vkm in 20min',x\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_3 pgno:19" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "result in algebraic form: \n", + "(3*x+5)/(4*y)\n" + ] + } + ], + "source": [ + "#ex3\n", + "from sympy import *\n", + "x=symbols('x')#is polynomial function of degree zero poly(0,'x');\n", + "y=symbols('y')#is polynomial function of degree zero poly(0,'y');\n", + "sum1=3*x+5;\n", + "divisor=4*y;\n", + "print\"result in algebraic form: \\n(3*x+5)/(4*y)\"\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/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 new file mode 100644 index 00000000..7a540883 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_20_Rational_and_Irrational_Numbers.ipynb @@ -0,0 +1,149 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 20 Rational and Irrational Numbers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_1 pgno:251" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(sqrt(5)+sqrt(20))\n", + "sqrt(27)-sqrt(75)+sqrt(48)\n" + ] + } + ], + "source": [ + "\n", + "#ex(1) (sqrt(5)+sqrt(20))\n", + "from math import sqrt\n", + "val=(sqrt(5)+sqrt(20))\n", + "\n", + "print ('(sqrt(5)+sqrt(20))');\n", + "if((sqrt(5)+sqrt(20))==3*sqrt(5)): \n", + " val_1=(val)\n", + "\n", + "#ex(2) sqrt(27)-sqrt(75)+sqrt(48)\n", + "print ('sqrt(27)-sqrt(75)+sqrt(48)');\n", + "val_2=(val)\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_2 pgno:252" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i.e.,\n", + "1.21676051329\n" + ] + } + ], + "source": [ + "\n", + "#1/(sqrt(5)-sqrt(2))\n", + "from math import sqrt\n", + "#rationalising the denominator\n", + "\n", + "denom1=(sqrt(5)+sqrt(2))*(sqrt(5)-sqrt(2))\n", + "\n", + "\n", + "numer1=(sqrt(5)+sqrt(2))\n", + "val=(numer1/denom1)\n", + "print(\"i.e.,\")\n", + "print val \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3 pgno:252" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i.e.,\n", + "0.38196601125\n" + ] + } + ], + "source": [ + "\n", + "#(sqrt(5)-1)/(sqrt(5)+1)\n", + "from math import sqrt\n", + "#rationalising the denominator\n", + "\n", + "denom1=(sqrt(5)+sqrt(1))*(sqrt(5)-sqrt(1));\n", + "\n", + "\n", + "\n", + "numer1=(6-2*sqrt(5))\n", + "val=(numer1/denom1)\n", + "print(\"i.e.,\")\n", + "print val" + ] + } + ], + "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/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 new file mode 100644 index 00000000..11fd1fca --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_21_Series.ipynb @@ -0,0 +1,526 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21 Series" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_1 pgno:256" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6\n", + "-2\n" + ] + } + ], + "source": [ + "\n", + "#ex(1) 7,13,19,25....\n", + "common_diff=19-13\n", + "print 6\n", + "#ex(2) 6,4,2,0,-2\n", + "common_diff=2-4\n", + "print -2\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_2 pgno:256" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-22\n" + ] + } + ], + "source": [ + "\n", + "#ex(1) in the series 7,10,13,.... the common difference is 3. 10th trerm is ?\n", + "nth_term=('7+(n-1)*3')\n", + "term10=7+(10-1)*3\n", + "#ex(2) i the series 6,2,-2,-6,....and d=-4\n", + "nth_term=('6-(n-1)*4')\n", + "term8=6+(8-1)*-4\n", + "print term8\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_3 pgno:256" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('the five terms are 4, ,20', 8, 12, 16)\n" + ] + } + ], + "source": [ + "\n", + "#insert 3 A.M's between 4 and 20\n", + "\n", + "#let 4,a,b,c,20 are in A.P. using, l=a+(n-1)*d\n", + "d=(20-4)/(5-1);\n", + "a=4+d;\n", + "b=a+d;\n", + "c=b+d;\n", + "print(\"the five terms are 4, ,20\",a,b,c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_4 pgno:258" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d=1.5\n" + ] + } + ], + "source": [ + "\n", + "#sum of A.P of 8 terms is 90.1st term is 6.\n", + "\n", + "# using s=n*{2*a+(n-1)*d}/2 \n", + "#substituting given values\n", + "d=0;\n", + "for d in range(0,100):\n", + " if(90==8/2*(2*6 + (8-1)*d)):\n", + " \tprint d\n", + "print 'd=1.5'\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_5 pgno:259" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " As root -10 is inadmissible, the solution is n=9\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "# using s=n*{2*a+(n-1)*d}/2 \n", + "a=3;d=3;s=135;\n", + "#substituting given values\n", + "n=symbols('n');\n", + "p=n/2*(6 + (n-1)*3)-135;\n", + "n=roots(p)\n", + "print(\"\\n As root -10 is inadmissible, the solution is n=9\")\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_6 pgno:261" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "#ex(1).1,2,4,8,...\n", + "commom_ratio=4/2\n", + "#ex(2). 1,1/2,1/4,1/8,....\n", + "common_ratio=(1./4.)/(1./2.)\n", + "#ex(3). 2,-6,18,-54\n", + "common_ratio=-6/2\n", + "#ex(4). R,R^2,R^3,R^4....\n", + "R=symbols('R');\n", + "common_ratio=R**2/R\n", + "print common_ratio\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_7 pgno:262" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the seventh term of the series is 192\n" + ] + } + ], + "source": [ + "\n", + "#7th term of the series 3,6,12,....\n", + "\n", + "#in the series r=2, so using the formula\n", + "# nth term=a*r^(n-1) \n", + "a=3;n=7;#given data\n", + "term7=3*(2)**(7-1);\n", + "print\"\\n the seventh term of the series is \",term7\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_8 pgno:262" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('\\n the eighth term of the series is ', -4374)\n" + ] + } + ], + "source": [ + "\n", + "#8th term of the series 2,-6,18,-54,......\n", + "\n", + "#in the series r=-3, so using the formula\n", + "# nth term=a*r^(n-1) \n", + "a=2;n=8;#given data\n", + "term8=2*(-3)**(8-1);\n", + "print(\"\\n the eighth term of the series is \",term8)\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_9 pgno:262" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the fifth term of the series is \n", + "\n", + "15.752961\n" + ] + } + ], + "source": [ + "\n", + "#5th term of the series.1st term is 100 and common ratio(r) is 0.63\n", + "\n", + "# using the formula\n", + "#nth term=a*r^(n-1) \n", + "a=100;n=0.63;#given data\n", + "print\"\\n the fifth term of the series is \\n\"\n", + "\n", + "term5=100*0.63**(5-1)\n", + "print term5\n", + "#3rd term of G.P is 4.5 and 9th is 16.2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_10 pgno:263" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " the common ratio is :\n", + "\n", + "1.238\n" + ] + } + ], + "source": [ + "\n", + "# nth term=a*r^(n-1)\n", + "term3=4.5;#given data\n", + "#'a*r^(3-1)=4.5 ---equ(1)'\n", + "term9=16.2;#given\n", + "#'a*r^(9-1)=16.2 ---equ(2)'\n", + "print(\"\\n the common ratio is :\\n\");\n", + "\n", + "r=(16.2/4.5)**(1./6.)#equ(2)/equ(1)\n", + "print round(r,3)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_11 pgno:265" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "substituting the given values \n", + "64.34375\n" + ] + } + ], + "source": [ + "\n", + "#sum of 7 terms of the series 2,3,4,5,....\n", + "\n", + "r=3./2.;a=2.;n=7.;#given\n", + "#using the formula\n", + "S=a*(r**(n)-1)/(r-1)\n", + "print (\"substituting the given values \")\n", + "\n", + "print round(S,1)\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_12 pgno:265" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "172.0\n" + ] + } + ], + "source": [ + "\n", + "#sum of 7 terms of the series 4,-8,16,....\n", + "\n", + "r=-8./4.;a=4;n=7;#given\n", + "#using the formula\n", + "S=a*(r**(n)-1)/(r-1)\n", + "#substituting the values \n", + "print S\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_13 pgno:270" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.67\n" + ] + } + ], + "source": [ + "\n", + "#sum to infinity series 2 + 1/2 + 1/8 + ......\n", + "\n", + "a=2;r=1./4.;#given\n", + "#using the formula\n", + "S_infinity=a/(1-r)\n", + "print round(S_infinity,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_14 pgno:270" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.17\n" + ] + } + ], + "source": [ + "\n", + "#sum to infinity series 5 - 1 + 1/5 - ......\n", + "\n", + "a=5;r=-1./5.;#given\n", + "#using the formula\n", + "S_infinity=a/(1-r)\n", + "print round(S_infinity,2)\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/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 new file mode 100644 index 00000000..d91cdb4d --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_2_Elementry_Operations_in_Algebra.ipynb @@ -0,0 +1,477 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 Elementry Operations in Algebra" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_1 pgno:25" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total=a+b 7 3\n" + ] + } + ], + "source": [ + "\n", + "#simplify 5a+6b+2a-3b\n", + "\n", + "#('collecting like terms \\n');\n", + "x=5+2;y=6-3;\n", + "print\"total=a+b\",x,y\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_2 pgno:26" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total=x+y-5 22 3\n" + ] + } + ], + "source": [ + "#collecting like terms ;\n", + "x=15+7;y=6-3;\n", + "print\"total=x+y-5\",x,y\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_3 pgno:26" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "18\n" + ] + } + ], + "source": [ + "x_coeff=6-3;y_coeff=2+4;\n", + "#\"substitue given values\"\n", + "x=3;y=2;\n", + "val=x_coeff*x + y_coeff*y -3\n", + "print val\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_4 pgno:33" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "84a**6/12a**2\n" + ] + } + ], + "source": [ + "#84a**6/12a**2\n", + "import string\n", + "A=1;#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convince poly(0,'a');\n", + "p1=84*A**6;\n", + "p2=12*A**2;\n", + "p=p1/p2;\n", + "print '84a**6/12a**2'\n", + "\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_5 pgno:33" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3x**4/6x**6\n" + ] + } + ], + "source": [ + "\n", + "#3x**4/6x**6\n", + "from sympy import *\n", + "x=symbols('x')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convince poly(0,'a');poly(0,'x');\n", + "p1=3*x**4;\n", + "p2=6*x**6;\n", + "p=p1/p2\n", + "print '3x**4/6x**6'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_6 pgno:34" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val=8*x/15 \n", + "\n" + ] + } + ], + "source": [ + " #x/3 + x/5\n", + "from sympy import *\n", + "x=symbols('x')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convince poly(0,'a');poly(0,'x');poly(0,'x');\n", + "p1=x/3;\n", + "p2=x/5;\n", + "p=p1+p2;\n", + "q=8*x/15;\n", + "if(p==q):\n", + " print\"val=8*x/15 \\n\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_7 pgno:34" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "((3b + 4a)/(ab))\n" + ] + } + ], + "source": [ + "#given problem sum of 3/a + 4/b\n", + "\n", + "print\"((3b + 4a)/(ab))\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_8 pgno:34" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(bx-ay)/(by)\n" + ] + } + ], + "source": [ + "#given problem is x/y - a/b\n", + "\n", + "print'(bx-ay)/(by)'\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_9 pgno:35" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ans=\n", + "(a+b)/k 8 25 60\n" + ] + } + ], + "source": [ + "\n", + "#2a/15 + 5b/12\n", + "\n", + "\n", + "d=60#\"L.C.M of denominators\"\n", + "k=d;\n", + "a_coeff=60/15*2;\n", + "b_coeff=60/12*5;\n", + "print'ans='\n", + "print\"(a+b)/k\",a_coeff,b_coeff,k\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_10 pgno:35" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ans=\n", + "(bx-ay)/a**2b**2 3 2 36\n" + ] + } + ], + "source": [ + "\n", + "#x/12a**2b - y/18ab**2\n", + "\n", + "k=36#lcm(d);#L.C.M of denominators\n", + "\n", + "#\"L.C.M of a**2*b and a*b**2 is a**2*b**2\"\n", + "x_coeff=36/12;\n", + "y_coeff=36/18;\n", + "print'ans='\n", + "print\"(bx-ay)/a**2b**2\",x_coeff,y_coeff,k\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_11 pgno:36" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val=\n", + "/*x**2/y**2 2 3\n" + ] + } + ], + "source": [ + "\n", + "#4*x**3*y/(6*x*y**3)\n", + "\n", + "gcd_d=1#GCD of 4 and 6 is 2\n", + "m=4/gcd_d\n", + "n=6/gcd_d\n", + "x=1#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');\n", + "y=1#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'y');\n", + "p1=x**3;p2=x;p=p1/p2;\n", + "q1=y;q2=y**3;q=q1/q2;\n", + "#val=m/n*p*q \n", + "print'val='\n", + "print\"/*x**2/y**2\",m/2,n/2\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_12 pgno:36" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val=\n", + "*x**2*y/a**3 0.285714285714\n" + ] + } + ], + "source": [ + "\n", + "#6*a*x**4*2*y**3/(14*x**2*y**2*3*a**4)\n", + "from sympy import *\n", + "\n", + "x=symbols('x')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'x');\n", + "y=symbols('y')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'y');\n", + "a=symbols('a')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'a');\n", + "num=6.*2./(14.*3.);\n", + "p1=x**4;p2=x**2;p=p1/p2;\n", + "q1=y**3;q2=y**2;q=q1/q2;\n", + "r1=a;r2=a**4;r=r1/r2;\n", + "#val=num*p*q*r\n", + "print'val='\n", + "print\"*x**2*y/a**3\",num\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_13 pgno:36" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val=\n", + "*x/(a*y) 1.2\n" + ] + } + ], + "source": [ + "#(8x**3)/(5a**2y) *(3a)/(4x**2)\n", + "from sympy import *\n", + "\n", + "x=symbols('x')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'x');\n", + "y=symbols('y')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'y');\n", + "a=symbols('a')#is polynomial function of degree zero poly(0,'x');#for this I assume it to be 1 for my convincepoly(0,'x');poly(0,'a');\n", + "p1=x**3;p2=x**2;p=p1/p2;\n", + "q=1/y;\n", + "r1=a;r2=a**2;r=r1/r2;\n", + "num=8.*3./(5.*4.);\n", + "#val=num*p*q*r\n", + "print('val=')\n", + "print\"*x/(a*y)\",num\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/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 new file mode 100644 index 00000000..25e3990d --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_3_Brackets_and_Operations_with_Them.ipynb @@ -0,0 +1,285 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 Brackets and Operations with Them" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_1 pgno:42" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a^3+(a^2)b+a(b^2)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#simplify a(a^2+ab+b^2)\n", + "\n", + "print('a^3+(a^2)b+a(b^2)')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2 pgno:42" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "20a\n" + ] + } + ], + "source": [ + "#simplify 2(4a+3b)+6(2a-b)\n", + "\n", + "#b gets cancelled \n", + "print('20a')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3 pgno:42" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3x-5y\n" + ] + } + ], + "source": [ + "\n", + "#simplify 5x-(5y+2x)\n", + "\n", + "#on adding like terms\n", + "print('3x-5y')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_4 pgno:43" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total=a+b\n", + "6 1\n" + ] + } + ], + "source": [ + "#simplify 3(4a-b)-2(3a-2b)\n", + "\n", + "#by removing braces\n", + "a_coeff=3*4-2*3;b_coeff=-3-2*-2;\n", + "print\"total=a+b\\n\",a_coeff,b_coeff\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_5 pgno:43" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x^2-x*y-2*y^2\n", + "2)after substituting given values\n", + "-2\n" + ] + } + ], + "source": [ + "\n", + "#x(2x-y)-x(x-y)-y(x+2y)\n", + "\n", + "#(\"1)after simplifying\")\n", + "print('x^2-x*y-2*y^2')\n", + "print(\"2)after substituting given values\")\n", + "x=2;y=1;\n", + "val=x^2-x*y-2*y^2;\n", + "print val\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_6 pgno:45" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6a+10b+10c\n" + ] + } + ], + "source": [ + "\n", + "#simplify 2(3a+5(b+c))\n", + "\n", + "#by removing braces,\n", + "print('6a+10b+10c')\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_7 pgno:45" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total=a+b\n", + "3 6\n" + ] + } + ], + "source": [ + "#simplify 3(3a-2(a-b))\n", + "\n", + "#by removing braces,\n", + "a_coeff=3*3-3*2;b_coeff=3*2;\n", + "print\"total=a+b\\n\",a_coeff,b_coeff\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_8 pgno:45" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "12*a-2*[3*a-{4-2*(a-3)}]\n", + "20*a+20\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#simplify 12a-2[3a-(4-2(a-3))]\n", + "\n", + "#a is a polynomial function with degree zero\n", + "\n", + "print \"12*a-2*[3*a-{4-2*(a-3)}]\"\n", + "print '20*a+20'\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/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 new file mode 100644 index 00000000..8cac638d --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_4_Positive_and_Negative_Numbers.ipynb @@ -0,0 +1,66 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Positive and Negative Numbers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_1 pgno:53" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "subtraction\n", + "5*x-(-3*x)\n", + "-2*b-(-4*b)\n" + ] + } + ], + "source": [ + "from sympy import *\n", + "\n", + "print(\"subtraction\")\n", + "x=symbols('x')#is polynomial functio with degree zero poly(0,'x');\n", + "b=symbols('b')#is polynomial functio with degree zero poly(0,'b');\n", + "print \"5*x-(-3*x)\"\n", + "print \"-2*b-(-4*b)\"\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/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 new file mode 100644 index 00000000..17f510de --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_5_Simple_Equations.ipynb @@ -0,0 +1,152 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Simple Equations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1 pgno:62" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=6*x-5=2*x+9\n", + "3.5\n" + ] + } + ], + "source": [ + "print'expr=6*x-5=2*x+9'\n", + "#by solving \n", + "x=14./4.;\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2 pgno:62" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=10(x-4)=4(2x-1)+5\n", + "20.5\n" + ] + } + ], + "source": [ + "print'expr=10(x-4)=4(2x-1)+5'\n", + "#by solving \n", + "x=41./2.;\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 pgno:63" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=3*x/5+x/2=5*x/2-3\n", + "20\n" + ] + } + ], + "source": [ + "print'expr=3*x/5+x/2=5*x/2-3'\n", + "#by solving \n", + "x=60/3;\n", + "print x\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_4 pgno:63" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=4*x-((x-2)/3)=5+((2*x+1)/4)\n", + "1.44736842105\n" + ] + } + ], + "source": [ + "print'expr=4*x-((x-2)/3)=5+((2*x+1)/4)'\n", + "#by solving \n", + "x=55./38.;\n", + "print x\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/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 new file mode 100644 index 00000000..7bfe08a4 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_7_Simultaneous_Equations.ipynb @@ -0,0 +1,351 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Simultaneous Equations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_1 pgno:79" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y=21-2*x\n", + "(44-3*x)/4\n", + "the number is 8\n", + " the solution is :\n", + " x= 8\n", + " y= 5\n" + ] + } + ], + "source": [ + "#2x+y=21, 3x+4y=44\n", + "import numpy\n", + "print\"y=21-2*x\"\n", + "p1=numpy.array([-2, 21])\n", + "print\"(44-3*x)/4\"\n", + "p2=numpy.array([-3/4, 44/4])\n", + "\n", + "\n", + "for x in range(0,20):\n", + " if(21-2*x==(44-3*x)/4):\n", + " print\"the number is \",x\n", + " print\" the solution is :\\n x= \",x\n", + " break\n", + "y=21-2*x;\n", + "#\"substitute the x value in any one of the above equations\"\n", + "print\" y= \",y\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_2 pgno:80" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y=15-x; \n", + "Y=3*x-21\n", + "p3=p1-p2\n", + "the solution is\n", + "[ 6.]\n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"y=15-x; \"\n", + "p1=numpy.array([-1, 15])\n", + "print\"Y=3*x-21\"\n", + "p2=numpy.array([3, -21])\n", + "print\"p3=p1-p2\"\n", + "p3=p1-p2\n", + "print \"the solution is\" \n", + "\n", + "x=numpy.roots(p3)\n", + "y=15-x;\n", + "print y" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_3 pgno:80" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y=(42-2*x)/3;\n", + "y=5*x-20;\n", + "the number is 6\n", + " the solution is :\n", + " x= 6\n", + " y= 10\n", + "\n", + " the solution is : \n", + "6 10\n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"y=(42-2*x)/3;\"\n", + "p1=numpy.array([-2/3, 42/3])\n", + "print\"y=5*x-20;\"\n", + "p2=numpy.array([5, -20])\n", + "for x in range(0,20):\n", + " if((42-2*x)/3==5*x-20):\n", + " print\"the number is \",x\n", + " print\" the solution is :\\n x= \",x\n", + " break\n", + "\n", + "y=5*x-20;\n", + "#\"substitute the x value in any one of the above equations\"\n", + "print\" y= \",y\n", + "print\"\\n the solution is : \\n\",x,y" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_4 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1=(1.486-1.2*R2)/0.5;\n", + "R=(4.67+2*R2)/4.5;\n", + "p3=p1-p2\n", + "[ 1.03777778]\n", + "[ 0.80592593]\n" + ] + } + ], + "source": [ + "\n", + "import numpy\n", + "print\"R1=(1.486-1.2*R2)/0.5;\"\n", + "p1=numpy.array([-1.2/0.5, 1.486/0.5])\n", + "print\"R=(4.67+2*R2)/4.5;\"\n", + "p2=numpy.array([1/2, 4.67/4.5])\n", + "print\"p3=p1-p2\"\n", + "p3=p1-p2\n", + "\n", + "R2=numpy.roots(p3)\n", + "\n", + "R1=(1.486-1.2*R2)/0.5\n", + "print R1\n", + "print R2\n", + "#difference in answer is due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_5 pgno:85" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1=y=(53-x)/3;\n", + "p2=(4*x-2)/2;\n", + "the solution is : \n", + "\n", + "the number is 8\n", + "y= -16\n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"p1=y=(53-x)/3;\"\n", + "p1=numpy.array([-1/3, 53/3])\n", + "print\"p2=(4*x-2)/2;\"\n", + "p2=numpy.array([2, -1])\n", + "print\"the solution is : \\n\"\n", + "\n", + "\n", + "for x in range(0,100):\n", + " if((53-x)/3==(4*x-2)/2):\n", + " print\"the number is \",x\n", + "\n", + "\n", + "\n", + "#\"substitute the x value in any one of the above equations\"\n", + "y=(53-x)/3;\n", + "print\"y=\",y\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_6 pgno:84" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1=6-4*m\n", + "p2=4.5-2.4*m\n", + "p3=p1-p2\n", + "y=m*x+b\n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"p1=6-4*m\"\n", + "p1=numpy.array([-4, 6])\n", + "print\"p2=4.5-2.4*m\"\n", + "p2=numpy.array([-2.4, 4.5])\n", + "print\"p3=p1-p2\"\n", + "p=p1-p2\n", + "\n", + "m=numpy.roots(p)\n", + "\n", + "#substitute this value \n", + "b=6-4*m\n", + "#\"substitute these values in the equation y=mx+b\"\n", + "\n", + "print \"y=m*x+b\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_7 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y=(1100-25*x)/20;\n", + "y=(1150-20*x)/25;\n", + "the number is 20\n", + "the total no. of books sold was 30\n", + "the number originally sold at 25p was 99\n" + ] + } + ], + "source": [ + "#let x=number originally sold at 25p\n", + "#let y=number originally sold at 20p\n", + "#amounts received for these were 25x pence and 20y pence & their total value was 1100pence =>25x+20y=1100 \n", + "import numpy\n", + "print\"y=(1100-25*x)/20;\"\n", + "p1=numpy.array([-25/20, 1100/20])\n", + "print\"y=(1150-20*x)/25;\"\n", + "p2=numpy.array([-20/25, 1150/25])\n", + "\n", + "\n", + "\n", + "for x in range(0,100):\n", + " if((1100-25*x)/20==(1150-20*x)/25):\n", + " print\"the number is \",x\n", + "\n", + "#\"substitute the x value in any one of the above equations\"\n", + "y=(1100-25*x)/20;\n", + "print\"the total no. of books sold was \",x+y\n", + "print\"the number originally sold at 25p was \",x\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/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 new file mode 100644 index 00000000..d07fb6df --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_8_Graphical_Representation_of_Quantities.ipynb @@ -0,0 +1,750 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 Graphical Representation of Quantities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1 pgno:92" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEZCAYAAAB4hzlwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3X3cZXO9//HXewa5v8sxjdtxl9ApoxojxZQSEyp0p2Lk\n", + "FJ2KlE4dp/NLpTulEh2pjgY5qITSIGQKhWKG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iJifHz8G3AJsULfYPsBpeZlrgbUlTapan3bc8WJtttnMNobcL9bu\n", + "dgA9xLkoOBcF56JFHaspSJoCTAWurZu1IXBXaXohsFHlSj7/+dew3XYnuGEwM2uPjjQKklYHvg8c\n", + "kY8YllqkbrrxKVFHHbUl66///nEMrx9N6XYAPWRKtwPoIVO6HUAPmdLtAPpV209JlbQicCFwUUR8\n", + "pWL+14G5EXF2nr4V2DUi7qtbrj/OnTUz6zFjOSV1hXYGIknA/wI3VzUI2Q+B9wFnS5oOLKpvEGBs\n", + "G2VmZq1p65GCpJcBPwduougSOhrYBCAiTsnLnQTsATwOHBwRN7QtKDMza6hvrmg2M7P267krmhtd\n", + "8CbpGEkLJc3L//bodqztJmllSddKmi/pZkmfzc+vK+lSSX+Q9BNJA3/63Si5GLr9okbSxLzNP8rT\n", + "Q7df1FTkYij3C0kLJN2Ut/m6/NyY9oueO1KQ9BzgORExP5+1dD3weuBNwKMR8aWuBthhklaNiMWS\n", + "VgCuAo4iXdvxQEQcJ+kjwDoR8dGuBtoBDXKxG0O4XwBI+iDwImCNiNhH0nEM4X4Blbn4OEO4X0i6\n", + "HXhRRDxUem5M+0XPHSk0uOBtwzx76IrNEbE4P1wJmAg8TOmCv/z/67sQWsc1yAUM4X4haSNgJvAt\n", + "iu0fyv2iQS7EEO4XWf12j2m/6LlGoax0wds1+an35/GR/ndYDo0lTZA0H7gPuCIifgdMKp2hdR9Q\n", + "eQX4oGmQCxjC/QL4MvBhYEnpuaHcL6jORTCc+0UAl0n6taR35efGtF/0bKNQccHbycBmpDFN7gGO\n", + "72J4HRMRSyJie9JV3rtIekXd/GC0i/0GSEUuZjCE+4WkvYD7I2IeDX4ND8t+MUouhm6/yHaOiKnA\n", + "nqSx5l5entnMftGTjUK+4O1c4DsRcT5ARNwfGekwcVo3Y+y0iHgE+DGp3/S+XHtB0mTg/m7G1mml\n", + "XLx4SPeLlwL75P7js4BXSjqD4dwvqnJx+pDuF0TEPfn/vwLnkbZ7TPtFzzU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zVPLuP1kIZr\n", + "PpjUaJxaev6zEfGNum2YQbqt6PSI+LukK4CV8+y/5+GfiYinJU3Ly+5P6h6rNWTlweDMWuYjBet3\n", + "+wOnR8SUiNgsIjYBFuRuma8BsyTtVFp+NYovz0Zf6HcA5SG5W7mt43nAHsCLgUvyc5cA78zDGiNp\n", + "Q0n/AqwJPJwbhOcB06tWmF+3dkRcBHwQeGFp9mTSCJhmy8VHCtbv3sLS/frnAm+JiPdKejPweUkb\n", + "km4u8lfgk3m5INUU3l567euAG0ldO5SWi7rpqsfFkxFPSfop6cu+9kv/UknbAL/Mwxs/Shom/mLg\n", + "MEk3k2oZv2yw/jWACyStTK6HlOZNA46qisVsLHxKqlkFSbOBkyPi2hZfP4FUN9g/Iv40nrFVvNea\n", + "pFNSX9LO97Hh4O4js2pfBA5r5YWStgVuAy5rd4OQzQJO6MD72BDwkYKZmY3wkYKZmY1wo2BmZiPc\n", + "KJiZ2Qg3CmZmNsKNgpmZjXCjYGZmI/4/nnuzFFcsxMsAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy \n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "AGE=numpy.array([25, 30, 35, 40, 45, 50])\n", + "premium_in_D=numpy.array([2.33, 2.59, 2.91, 3.31, 3.81, 4.53])\n", + "pyplot.plot(AGE,premium_in_D);\n", + "pyplot.title('Annual Premiums charged by an insurance company')\n", + "pyplot.xlabel('AGE(in years)')\n", + "pyplot.ylabel('premium_in_$')\n", + "pyplot.grid()\n", + "AGE=43;premium_in_D=3.6;\n", + "pyplot.plot(AGE,premium_in_D);\n", + "AGE=36;premium_in_D=3;\n", + "pyplot.plot(AGE,premium_in_D);\n", + "pyplot.plot(25,2.0,'o')\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEaCAYAAAAL7cBuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4HGWZ/vHvHZZhC4uIkSUYlAFFxAAKKDoEGVmiojMC\n", + "MqOjAXXiwqKAsoyM4PhzQwfBQY0bQVwYFURkUBYlQRFRIYEAoiwJmwhiWAJBBPL8/qi3TaXT3ady\n", + "uqq76pz7c13nOl1LV91d53S//b5PV5ciAjMzs3YThh3AzMzqyQ2EmZl15AbCzMw6cgNhZmYduYEw\n", + "M7OO3ECYmVlHbiBqRtIcSW8f5X23lLREkirItUzSc8ve7lgm6QuSPjTsHHUm6SRJZw87Ry9NyFgV\n", + "NxAVkLRI0tL0Yv1HSWdLWr/g3SP9FN3Pq/52x4g7I2Ji1Ozklro3LpKmpIxL0s8iSSf2u92IeHdE\n", + "fLTA/lf4O44zXf9XJU2TdNcgw3TZZ62eT4PkBqIaAbw2IiYCLwZeBFTxTjKA0nsLFWlCzg3S3+yN\n", + "wLGSpg9ov036O45H4/Zv4waiYhFxH3AJ8MLWPEm7SfqFpAclzZe0R6f7SnqepJ9KekDSnyR9Q9IG\n", + "adnZwJbAD9O73mNy74QnpHU2k3SBpD9LukXSO3LbPknSdySdJekRSTdI2nmEh/MaSbelLJ/KD2VJ\n", + "OlTSTZIWS/qxpC3T/CvSKtel/RyUhtH+OS3fPWWenqb3kjRvpO2mZc+XdGl6fDdLOjC3bLakMyRd\n", + "mPb7y6K9mIi4BrgR2K5gjlMl3SfpYUnXS9oul+G/0u1npiwPprxXKLPS3zGt/11J90p6SNLc1jaL\n", + "PDZJL8wdlz9KOj7NnyDpOEm3pv+p/5W0UVq2Vvr/eiBl/JWkZ3U6PrltPCLpRklvyC2bIennkk5J\n", + "x+p2Sfvmlm+VHs8jki4Bnlnkb9Ihw2aSzpV0f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kRsIMzPr6P8D\n", + "msHgiwUHXP4AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy \n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "length1=numpy.array([100, 120, 170, 220]);\n", + "resistance=numpy.array([2.5, 3, 4.25, 5.5]);\n", + "pyplot.plot(length1,resistance);\n", + "pyplot.title('Relation between Resistances and Length')\n", + "pyplot.xlabel('length_in_meters')\n", + "pyplot.ylabel('resistance_in_ohms')\n", + "pyplot.grid()\n", + "length1=200;\n", + "resistance=5;\n", + "pyplot.plot(length1,resistance);\n", + "\n", + "pyplot.plot(250,6.2,'o')#this point is called extrapolation \n", + "\n", + "pyplot.show()\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3 pgno:95" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "EX1: \n", + "from curve, it is 26m. the actual distance from formula is 25.92m\n", + "EX2: \n", + "line from 42m on distance axis that touches the curve at 4.6s.the mechanics formula gives 4.58s\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu0JFV59/HvjxFE7jfDTYYRfEGNoMQIGjSOoAjKLYoo\n", + "wcggUZfRRRR0CSQxg0YFTSJe3hVv4AAxOohyD8owMIKoGHCGiyAXw7yIMgMIA8iIAvO8f9TuqTpN\n", + "9znV53R3VXf9Pmv1mqqu7urdT/fss/upXU8pIjAzs+ZYp+oGmJnZcLnjNzNrGHf8ZmYN447fzKxh\n", + "3PGbmTWMO34zs4Zxxz/CJC2RdMw0nztb0qOSNIB2rZG0U7/3W3eDjOkgSZon6e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dof23IUp+rIqtp3otO\n", + "+2/3h8LymsJz1jDx/+GbIuKO4hMl7dVhf90e91hrPSKuTjXZDwQWSPr3iDh70ndijeAcv1XpKuBQ\n", + "ZRcQ35isg5oglZjdLCIuBY4DXpw2PQpsUnjoRsCKNLp9O1NXalwEHF04FrB5RDwC3CXpsHSfJO3e\n", + "4bmDuujH94G1F5KX1PoD9ChZKmyqx01ol6TZwP0R8TWySxP2+gfNxpQ7fqtMZFdOWgjcAPw3WWpi\n", + "wkPIOryLJN0AXA18MG37FvBhSddL2gn4J7JytD8kuyZv+34mLEfE98mu9XCdpKVk+XCAI4FjUnnb\n", + "m8ly8E9reqd9dlju1oZuz/k4sG464HwzcHK6/0rgha2Du5M8rr1dc4Flkn4GHA58rkvbrGFcltnM\n", + "rGE84jczaxh3/GZmDeOO38ysYdzxm5k1jDt+M7OGccdvZtYw7vjNzBrGHb+ZWcP8f31kkHndyvGe\n", + "AAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "time=numpy.array([0, 1, 2, 3, 4, 5]);\n", + "distance=numpy.array([0, 2, 8, 18, 32, 50]);\n", + "pyplot.plot(time,distance)\n", + "pyplot.title(\"Relation between Time and Distance\")\n", + "pyplot.ylabel(\"time t in sec\")\n", + "pyplot.xlabel(\"distance in meters\")\n", + "\n", + "pyplot.grid()\n", + "#ex1:distance passed over in 3.6s\n", + "print\"EX1: \\nfrom curve, it is 26m. the actual distance from formula is 25.92m\"\n", + "#ex2:time to travel 42m\n", + "print\"EX2: \\nline from 42m on distance axis that touches the curve at 4.6s.the mechanics formula gives 4.58s\"\n", + "\n", + "pyplot.show()\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/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 new file mode 100644 index 00000000..922d0030 --- /dev/null +++ b/Algebra_by__P._Abbott_And_M._E._Wardle/Chapter_9_The_Law_of_Straight_Line_and_Co_ordinates.ipynb @@ -0,0 +1,1158 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 The Law of Straight Line and Co ordinates" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_1 pgno:99" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the number is 230\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4ZFV97vHvy9DIJMjwiCikxVwCGKFR4MqFq42KwRE1\n", + "eK8DKipJ5N44o4IRaTQCcYjGYDTJFRrFGVFBYwQjjRABBWlkjMOlEaRpiYwKKtC//LHXgeqi6px9\n", + "Tq1de6+q9/M89VC7atde71l9arHOb+9apYjAzMymx3ptBzAzs/HywG9mNmU88JuZTRkP/GZmU8YD\n", + "v5nZlPHAb2Y2ZTzw25wkLZa0VlLnf18kfVzSu2ruu1zSe0do6zBJ5/ds3yVp8UKP1xXp33qntnNY\n", + "czr/Rrbxk7RK0tNKbDcijoiIv667e7oNyzOvATAiNo+IVXX3N2uLB34bJAB1rV1JG4wxywPNttDm\n", + "grX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YB/Aw5J5yZmzlvs2L/jLFnM5sVX9Vhb+mfLM9uvAj4haROqdcVfDSDp\n", + "OOCSiDir73XLgJMlXQ78Jr1+5njDZuSvAP5R0nuozjUcEhGrJH2RqhxzHdWyuACbA19LJ59F9c1H\n", + "AJ8H/lnS64EXD8s94Gd8SKaIuEbSu4Cz00nde4H/A/y8b/9hWczmxcsym5lNGZd6zMymjAd+M7Mp\n", + "44HfzGzKeOA3M5syHvjNzKaMB34zsynjgd/MbMp44DczmzL/BfvwXAAuGUz2AAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#let a-the avg. amount paid. x-no. of customers. b-the expenses\n", + "#net profit is y=ax-b\n", + "x=320;y=4.50;\n", + "x=250;y=1.00;\n", + "#substitute in above equation\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "#4.5=320*a-b-equ.1;1=250*a-b-equ.2.subbstract equ.2 from 1.\n", + "a=0.05;#we get\n", + "b=250*a-1;\n", + "\n", + "#x is a polynomial function of degree zerox=poly(0,'x');\n", + "#y=numpy.array[(0.05, -11.5)];#equation to straight line\n", + "#if there is no profit i.e., y=0\n", + "\n", + "x=0;\n", + "for x in range(0,500):\n", + " if(0.05*x-11.5==0):\n", + " print\"the number is \",x \n", + "\t\n", + "\n", + "\n", + "cust=numpy.array([230, 240, 270, 300, 350, 380]);\n", + "profit=numpy.array([0, 0.5, 2.0, 3.5, 6.0, 7.5]);\n", + "pyplot.plot(cust,profit);\n", + "pyplot.plot(230,0);\n", + "#profit(y) depends on varying no. of customers(x). the no.'s 0.05 & 11.5 remained constant\n", + "pyplot.title(\"the straight line graph\"),\n", + "pyplot.xlabel(\"no. of customers\")\n", + "pyplot.ylabel(\"profit\");\n", + "pyplot.legend(\"y=0.05*x-11.5\");\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_2 pgno:103" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[-2 0 1 3 5 5]\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUJFWZ/vHvQ2OzL40KCA20G9KI0jAHaGUrHRfk54YL\n", + "jqLQ4jhu2CDooKAD6oDDMAoIbiNgy+bGdgDZR3pkQEFGmkEWWbTZpNkb2VoaeH9/RBQk2VlVWZmR\n", + "ceNWPZ9z6lCRGRnx5K0mb8a9EfEqIjAzM1sudQAzM2sGdwhmZga4QzAzs5I7BDMzA9whmJlZyR2C\n", + "mZkB7hCsZpJmSHpGUiX/9iT9q6T7JP2liu0NiqTdJF2QOofZaNwhWLYkbQjsC2wSEeulzjOsU6cX\n", + "ESdHxFsHsK/Zki6S9ICkeyX9XNK6FWz3+PI9vKzH128q6SpJD0paLOkySdv1m8sGyx2CjYuk5VNn\n", + "aLEh8EBEPJA6yAhUwz7WBL4PbFT+PAL8qJ8Nlh/cLwP6uWr1LuD9wAuBacBPgVP7yWWD5w7BkLSl\n", + "pKsl/bX8hvkzSV8vnxuSdKekf5Z0N3CcpDUlnVN+I31Q0tmS1m/Z3nxJ35B0haSHJZ0paVrbbj8s\n", + "6bZyuOeAUbKtIemEcl8LJR2owpuAC4H1JD0i6fgRXv92SQskPVR+S31Ny3NbSPp9+b5/Wv4Mv+85\n", + "ki5t29az35gl/b+yzR6WdLukg1pW/XX538Xltme3b0/S6yX9rvz2fKWk17W139ck/U/5+gskvbDT\n", + "+4uI8yPitIh4NCKeAL4DbFtuZytJiySpZdvvkbRglPZeHvg28FlaOjRJa0m6Q9Lby+VVJd0i6cMj\n", + "5Ho4Iv4cxa0QpgDPAHePtF9riI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/ykkHcxzxXs2AnaKouAIki4AXg5sHhGPlY8NdwjbA8cDJwFnRsQ1g34/Zr3y\n", + "kJEZvAhYhaIM4UrtT0oaorgd++yImEVxM7EVyudWprilcACrtb82ipoN21PccniepI8M5i2Y9c8d\n", + "ghn8APgycAqwzHARsDrwUEQskbQJMLvlucOAE4GDgB+2v1DShsB9EXEscCxFVSuzRqq9QI5Zk0ja\n", + "HfhbRPxU0nLA5ZKGImJ+y2rnA5+UdD3FLaZ/U752R+DvgLkREZLeK2mPiPgxz1WlegPweUlLgUco\n", + "701v1kSeQzAzM8BDRmZmVnKHYGZmgDsEMzMruUMwMzPAHYKZmZXcIZiZGeAOwczMSu4QzMwMgP8P\n", + "1wqdLWQlCDUAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#2*y-4*x=3\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "#x is a polynomial function of degree zero x=#poly(0,'x');\n", + "x=numpy.array([-2., -1., 0, 1., 1.8, 2.]);\n", + "y=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "i=0;\n", + "for i in range (0,6):\n", + "\ty[i]=(3.+4.*x[i])/2.;\n", + "\ti=i+1\n", + "print y\n", + "y=numpy.array([-2.5, -0.5, 1.5, 3.5, 5.1, 5.5])\n", + "pyplot.plot(x,y)\n", + "pyplot.plot(0,1.5,'o')#when x=0. 1.5 is intercept on y-axis\n", + "pyplot.plot(-0.75,0,'o')#when y=0. -0.75 is intercept on x-axis\n", + "pyplot.title('graph of equation 2y-4x-3')\n", + "pyplot.xlabel('x axis')\n", + "pyplot.ylabel('y axis')\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_3 pgno:104" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 5 3 1 -1 -3 -5]\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAH3xJREFUeJzt3Xm4XGWV7/Hvj0CYAgLaj8gYQRANLREU8TqFFhQRpcGp\n", + "vQKCfWnxKrM2g+0NKmAjStM4XYXGgGADovCgDUFQIhhkaomCUQYlGLiCCGEGw7DuH/s97EpR56Qq\n", + "p6revWv/Ps9zHs6uYddbK8U6u9ba734VEZiZWbOslHsAZmY2fE7+ZmYN5ORvZtZATv5mZg3k5G9m\n", + "1kBO/mZmDeTkb0MlabqkZyX15bMn6VhJ90n6f/3Y36BI+pCkS3OPw2yMk7/VlqRNgMOArSJig9zj\n", + "GdPpD1xEnB0Rbx/Aa+0g6TJJ90v6s6TzJK3fh/2ent7DZiv4/FdKukHSA5IelDRf0hsnOy7rHyd/\n", + "64mklXOPocUmwP0RcX/ugYxDQ3iNdYD/C2yafh4Bvj2ZHaYkvRkwmRmgdwPvA14IrAucA5w/mXFZ\n", + "fzn5G5K2lXSjpIfTkeO5kj6f7psl6S5J/yzpT8B/SFpH0o/SkeYDkn4oacOW/c2T9AVJ10p6SNKF\n", + "ktZte9m9JN2ZSjZHTzC2F0g6M73WIkmfVmEn4MfABpIekXT6OM/fTdICSUvS0effttz3akm/TO/7\n", + "nPQz9r73lXRV276eOxKW9M4Us4ck/VHS7JaHXpn++2Da9w7t+5P0PyRdn46Kr5P0+rb4fU7Sz9Pz\n", + "L5X0wk7vLyLmRsT3I+LRiHgC+BrwhrSf10q6R5Ja9r2npAUTxHtl4BTgQFr+eElaT9JiSbul7WmS\n", + "bpe01zjjeigi7ojiEgJTgGeBP433upZBRPinwT/AVOBOiv/ZpwB7AH8FPpfunwU8BXwBWAVYDVgv\n", + "PW41YBpwHnBByz7nAXcBrwTWoDji+066bzpFIvgmsCrw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vuwjaRfg\n", + "U8DuqZlhhSZOgLsB2ELSdElTgQ8AF2Uek2UmScB/AAsj4uTc48lJ0oskrZN+Xx3YGbix02Mrn/yB\n", + "rwDTgMsk3Sjp67kHlIukPSQtpjij4b/SZTIaIyKeBj4BXAosBM6NiN/mHVUekv4TuBrYUtJiSfvl\n", + "HlNGbwD2ojiz5cb009QzoV4C/DTV/K8FfhgRP+n0QE/yMjNroDoc+ZuZWZ85+ZuZNZCTv5lZAzn5\n", + "m5k1kJO/mVkDOfmbmTWQk7/ZAEian3sMZhPxef5mZg3kI39rNEmvTQsFrSppzbQYyCs7PO4CSTek\n", + "+/dPt20q6VZJL0xXUrxK0k7pvkfTf18i6co06/Sm8a6tbjZsPvK3xpP0eWA1YHVgcUSc0OEx60bE\n", + "knS9lOuAN6ftfwTeDlwPbBYRH0uPfyQi1pJ0OLBqRByfrkGzZpOvOGnV4eRvjZeuCHkD8ATw+ujw\n", + "P4WkY4C/T5ubArtExLXpvkuBzYFtIuKxdNtY8n8TcDpwFnBhRPxq0O/HrBsu+5jBi4A1KS4guHr7\n", + "nZJmUVxOfIe0PN4CYNV03xoUq8sFsFb7c9OKW2+iuBz1HEl7D+YtmPXGyd8Mvgn8C/Bd4HklH2Bt\n", + "YElEPClpK4qrqo45AfgOMBs4tf2JkjYB7ouI04DTKFaZMsuuEou5mOUiaR/grxFxjqSVgKs7rHw0\n", + "FzhA0kLgFuAX6blvAbYDDoqIkPQeSR+OiDMoVx3bEfikpKeAR4B9hvPOzCbmmr+ZWQO57GNm1kBO\n", + "/mZmDeTkb2bWQE7+ZmYN5ORvZtZATv5mZg3k5G9m1kBO/mZmDfT/AbHe6p4dxIRAAAAAAElFTkSu\n", + "QmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "#x is a polynomial function of degree zero x=#poly(0,'x');\n", + "x=numpy.array([-2, -1, 0, 1, 2, 3]);\n", + "y=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "i=0;\n", + "for i in range (0,6):\n", + "\ty[i]=(1-2*x[i]);\n", + "\ti=i+1\n", + "print y\n", + "\n", + "pyplot.plot(x,y)\n", + "pyplot.plot(0,1,'o')#when x=0. 1.5 is intercept on y-axis\n", + "pyplot.plot(0.5,0,'o')#when y=0. -0.75 is intercept on x-axis\n", + "pyplot.title('graph of equation 2y-4x-3')\n", + "pyplot.xlabel('x axis')\n", + "pyplot.ylabel('y axis')\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_4 pgno:112" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ex(1) In y=4x-7, gradient is 4.Intercept on y-axis is -7\n", + "ex(2) In y=0.05x-11.5, gradient is 0.05 and intercept on y-axis is -11.5\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu4HGWV7/HvLyQEuSNRIAHMkWeUcRSDCjJCQpTLRFBQ\n", + "wccREYOeUZjjoINXRA/B2+gcFW9nOApCAEWG0QFFBXQQCKCoKCEgqIBEuRkQAhOIGiDr/FG1Saez\n", + "e+++VVfVW7/P8+wnu7qru961K7vWfteqqlZEYGZmNqXsAZiZWTU4IZiZGeCEYGZmOScEMzMDnBDM\n", + "zCznhGBmZoATghVA0k2S5pU9jjGSXi3pTkmrJD2/i/XnS7pziNv/qKT7Jd0zrPdMnaRFks4pexxN\n", + "44SQCEnLJa3OD3pjX58fwXYXS/pI62MR8dyIWFL0tnvwKeAfI2KLiLih/UlJayU9s4gNS9oZOB7Y\n", + "NSJmFrGNRPkCqRJMLXsAN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fk677vJYqvtfsvH\n", + "vz0wJ/9+c+DXif3udRNf3ffhpvm/U4FrgX0G2X9VmCHsCdwWEcsj4jHgPLJGc6tDgLMAIuInwNaS\n", + "thvtMPvWTXwAtWygR8RVwMoJVqntvusiNqjpfgOIiD9ExNL8+0eAW4CZbavVef91Ex/Uex+uzr/d\n", + "mOyPzwfbVulp/1UhIcwC7mxZvit/bLJ1dix4XMPSTXwBvCSf0n1P0nNGNrri1XnfTSaZ/SZpNtls\n", + "6CdtTyWx/yaIr9b7UNIUSUuBFcDlEXFz2yo97b8qfB5Ct13t9ixel254N+P8BbBTRKyW9HKy+zs9\n", + "q9hhjVRd991kkthvkjYHvgG8I/9LeoNV2pZrtf8mia/W+zCyi3TnSNoKuFTS/Ii4om21rvdfFWYI\n", + "dwOtdzvdiSyLTbTOjvljdTBpfBGxamzqFxEXA9MkPXV0QyxUnffdhFLYb5KmAd8EvhoRF46zSq33\n", + "32TxpbAPASLiYeC7wIvanupp/1UhIVwH/JWk2ZI2Bl4HfLttnW8DRwFI2gt4KCJWjHaYfZs0Pknb\n", + "SVL+/Z7y8UrkAAACgUlEQVRkpwO31wLrqs77bkJ132/52L8C3BwRn+2wWm33Xzfx1XkfSpohaev8\n", + "+6cAB7DhRb497b/SS0YR8biktwOXkjVFvhIRt0h6W/78lyLie5IOknQb8Cid73tUOd3ER3ab7mMl\n", + "PU52s7+/L23APZL0dWBfYIakO8luZT4N6r/vJouNGu+33N7AkcAySWMHkg8AO0P99x9dxEe99+EO\n", + "wFmSppD9cX9ORFw2yLHTF6aZmRlQjZKRmZlVgBOCmZkBTghmZpZzQjAzM8AJwczMck4IZmYGOCGY\n", + "FULSNWWPwaxXvg7BzMwAzxCs4STtkd/pcrqkzfIPUtngjpeSLpB0Xf78P+SPPUPSbyRtm9918ipJ\n", + "++fPPZL/u4OkJfmHr9woaZ/RRmjWPc8QrPEkfQTYBHgKcGdEfHKcdbaJiJX5PWN+CszLl98C/B3w\n", + "M+CZEXFsvv6qiNhC0ruA6RHx8fyeOZt1uKOoWemcEKzx8jtiXgf8CfjbGOeXQtIi4FX54jOABfkH\n", + "jiDpUmAX4PkR8Wj+2FhCmAucAXwVuDAibig6HrN+uWRkBjOAzcg+ZvEp7U9Kmg/sB+wVEXPIPgZ1\n", + "ev7cpmS3FA5gi/bX5p+6NpfslsOLJb2xmBDMBueEYAZfAj4InAtsUC4CtgRWRsSfJe0K7NXy3CeB\n", + "c8juhHpa+wsl7QzcHxGnA6eTfWqXWSWVfvtrszJJOgr4S0Scl99G+EfjfOrUJcAxkm4m+6D2H+ev\n", + "3Rd4IXBcRISkwyS9KSLOYt2nUr0UeLekx4BV5PemN6si9xDMzAxwycjMzHJOCGZmBjghmJlZzgnB\n", + "zMwAJwQzM8s5IZiZGeCEYGZmOScEMzMD4P8DtzEwevQUUb0AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "#y=mx+b\n", + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "\n", + "x=numpy.array([0, 1, 2, 3]);\n", + "y=x;\n", + "pyplot.plot(x,y);\n", + "y=x+2;\n", + "pyplot.plot(x,y);\n", + "y=x-3;\n", + "pyplot.plot(x,y);\n", + "pyplot.title(\"Equations of the form y=mx+b\")\n", + "pyplot.xlabel(\"x axis\")\n", + "pyplot.ylabel(\"y axis\");\n", + "pyplot.legend(\"y=x\")\n", + "pyplot.legend(\"y=x+2\")\n", + "pyplot.legend(\"y=x-3\")\n", + "pyplot.grid()\n", + "#m is constant, b is fixed distance. (x,y) vary for different points on the line \n", + "\n", + "#ex(1)\n", + "print\"ex(1) In y=4x-7, gradient is 4.Intercept on y-axis is -7\"\n", + "#ex(2)\n", + "print\"ex(2) In y=0.05x-11.5, gradient is 0.05 and intercept on y-axis is -11.5\"\n", + "pyplot.show()\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_5 pgno:114" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2 3 1 0]\n", + "[-3.5 -5. -2.1875 2.5 ]\n", + "the solution of the equation is\n", + "x=\n", + "y= 3 1\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu4JFV97vHv6wAy3EGCw30GRFFUBoxIgsKgEpGjjGIU\n", + "SEAB4zEmAhIwKpycmdGDhKCAlyPeQATxQoyQoAJBYYSAjhdmE5SLwGEQCDBcBsJVkPmdP6o29DS9\n", + "9669d3evqlXv53n6mV19qV6/XXtWVb+1arUiAjMza5fnpW6AmZkNnzt/M7MWcudvZtZC7vzNzFrI\n", + "nb+ZWQu58zczayF3/jZUkmZLWimpL397kv6PpHsl/Vc/1jcokv5S0sWp22E2yp2/NZakrYC/A7aP\n", + "iM1St2dUrx1cRJwTEW8awHvtKukSSfdLWi7pXEmz+rDeM8oatpni618m6ZeSHpD0oKQrJb12uu2y\n", + "/nHnb5MiabXUbeiwFXB/RNyfuiFj0BDeYwPgi8DW5e1h4GvTWWHZSW8DTOcK0DuBdwIvADYEvg18\n", + "dzrtsv5y529I2lnSUkn/XR45fkfSJ8rH5km6Q9LfS7oLOF3SBpK+Xx5pPiDpAkmbd6xvsaQTJC2R\n", + "9JCk8yVt2PW2B0m6rYxsjh2nbetLOqt8r2WSjlPhjcC/A5tJeljSGWO8/i2SRiStKI8+X9Hx2E6S\n", + "ri7r/nZ5G637EElXdK3rmSNhSf+j/J09JOl3khZ0PPXy8t8Hy3Xv2r0+SX8q6RflUfHPJf1J1+/v\n", + "45L+o3z9xZJe0Ku+iLgoIv4lIh6JiMeB/wvsVq7n1ZLulqSOde8naWSc3/dqwGeBw+nYeUnaSNLt\n", + "kt5SLq8j6WZJB43Rroci4tYophCYAawE7hrrfS2BiPCtxTdgDeA2iv/sM4C3A78HPl4+Pg94CjgB\n", + "WB1YE9iofN6awDrAucB5HetcDNwBvAxYi+KI7+zysdkUHcGXgOcDrwSeoIhuerXvLOA8YG2KI9sb\n", + "gcPKx/YAbh+ntp2Ae4BXU3Rk7wZuLesYrfvIsu53AE921H0IcEXX+lYC23S89w7lz68A7gbml8tb\n", + "l899Xsdrn1lf+ftbAfwlxQHYAcADwIYdv7+bgBeVv+PLgBMqbs8PAVd1LP8G2Ltj+TzgqHFe/2Hg\n", + "lO56y+W9KDrwPwK+ApxboT0Pln8/twHbpv57961j26RugG+J/wBgd+COrvuu6Or8fw+sMc465gIP\n", + "dCxfBnyyY/ml5TrU0flv1vH4EmD/HuudUb5u+477/idwWUfbxuv8Txuto+O+G8qadwfu7Hrsyqqd\n", + "f4/3OhU4ufx5tMaxOv+DgZ91vf4q4D0dv79jOx77AHBhhW35SuB+YLeO+z4CfKP8eSPgUeCFY7x+\n", + "y3Kns+5Y9VJ8KrgWuJ1yZ1WhXWsBJwJXA0r9N+9bcXPsY5tR5LOdbu9avjcinhxdkLSWpC+VMcxD\n", + "wE+A9Tvjha51/I7iaHvjjvvu7vj5MYoj+24bl6+7rWtdm/d4bi9bA0eXkc8KSSuALYBN6V33bd0r\n", + "GIuk10i6rIyjHgTeT5FvV7EZRR3d79150rrz9/M4xSes8drzIuCHwBERcWXHQ+cAb5W0FvAu4PKI\n", + "uEfS68q47GFJ15bPPZVi5/dwx7bsPm/xFWAH4MyIWFG+91Yd6/rv7rZFxGPAR4EXU3xKshpw5293\n", + "8dzOdKuu5e4Tf0dT/EfeJSLWp4hAxKodxVZdPz8F3DfJtt1Xvm5217ruqPj63wHHR8SGHbd1IuI7\n", + "9K57646fH6U4YgWgxwiabwLnA1tExOhJ19H/TxOdKL2z671G37t7Z1SJpK2BSyg67nM6H4uIO4Cf\n", + "AfsBBwFnl/dfERHrl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wB/z7JcmNd2fAvtK2gdYE1hP0lkR8e7E7eqb0WuoIuJeSedRRM3P6fybFvvk\n", + "kM/9EthO0mxJawD7A/+WuE1WkSQBpwPXReQ315SkjUfn2pI0E9gLWJq2Vf0TEcdGxJYRMQc4ALg0\n", + "p45f0lpCis24AAACSElEQVSS1i1/Xhv4M8a4iLb2nb+kt0u6nWJkxQ8kXZi6TdMREX8APghcTDHa\n", + "4DsRcX3aVvWXpG8BVwEvlnS7pENTt6mPdgMOohgFM6nvo2iITYFLy8x/CcXUKz9O3KZByi2GfSFw\n", + "Rcf2+35E/HuvJ/oiLzOzFqr9kb+ZmfWfO38zsxZy529m1kLu/M3MWsidv5lZC7nzNzNrIXf+ZgMg\n", + "6crUbTAbj8f5m5m1kI/8rdUkvVrSNZKeL2nt8gtaXtbjeeeVsyT+enSmRElbS/qtpBeUM2FeIemN\n", + "5WOPlP9uKuny8krgazOdG98ayEf+1nqSPkExyddM4PaIOLHHczaMiBXlfDc/B3Yvl98LvAn4BbBN\n", + "RHygfP7DEbGupKOB50fEJ8t5gdbObRZQayZ3/tZ65SydvwQeB/4kevynkLQQeFu5uDWwd0QsKR+7\n", + "GNgW2DEiHi3vG+38XwecAXwDOD8irhl0PWZVOPYxg42BtYF1KI7+V1HO+/4GYNfy6w1HgOeXj60F\n", + "bEExQdi63a8t51F/HcVU3mdKOngwJZhNjjt/M/gS8L+AbwLPiXyA9YAVEfGEpO0pZpgddSJwNrAA\n", + "+Er3CyVtBdwbEV+l+NrAnfrcdrMpqcWXuZilIundwO8j4tuSngdc1eObqy4C/lrSdcCNwE/L1+4B\n", + "vAo4IiJC0jskvScivs6zUwXvCRwj6SngYSCbueOt2Zz5m5m1kGMfM7MWcudvZtZC7vzNzFrInb+Z\n", + "WQu58zczayF3/mZmLeTO38yshdz5m5m10P8HAdiAzNSHglAAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "#x is a polynomial function of degree zero x=#poly(0,'x');\n", + "#graph of x+2*y=5\n", + "x=numpy.array([0, -1, 2, 5]);\n", + "y=numpy.array([0, 0, 0, 0]);\n", + "i=0;\n", + "for i in range (0,3):\n", + "\ty[i]=(5-x[i])/2;\n", + "\ti=i+1\n", + "print y\n", + "y=numpy.array([2.5, 3, 1.5, 0])\n", + "pyplot.plot(x,y);\n", + "#graph of 3*x-2*y=7\n", + "x=numpy.array([0, -1, 7./8., 4]);\n", + "y=numpy.array([0, 0, 0, 0]);\n", + "y=(3*x-7)/2;\n", + "\n", + "for i in range (0,3):\n", + "\ty[i]=(3*x[i]-7)/2;\n", + "\ti=i+1\n", + "print y\n", + "y=numpy.array([-3.5, -5, -2.1875, 2.5 ])\n", + "pyplot.plot(x,y)\n", + "for x in range(1,100):\n", + " if((5-x)/2==(3*x-7)/2):\n", + " break\n", + "\n", + "print\"the solution of the equation is\"\n", + "y=(5-x)/2;\n", + "print\"x=\\ny= \",x,y\n", + "pyplot.plot(x,y)\n", + "\n", + "\n", + "pyplot.plot(x,y)\n", + "pyplot.plot(1,3,'x')#when x=0. 1.5 is intercept on y-axis\n", + "pyplot.plot(0.5,0,'o')#when y=0. -0.75 is intercept on x-axis\n", + "pyplot.title('graph of equation 2y-4x-3')\n", + "pyplot.xlabel('x axis')\n", + "pyplot.ylabel('y axis')\n", + "#pyplot.legend(\"x+2*y=5\",\"3*x-2*y=7\");\n", + "\n", + "pyplot.grid()\n", + "pyplot.show()" + ] + } + ], + "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/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png new file mode 100644 index 00000000..b965bd13 Binary files /dev/null and b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8a.png differ 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 new file mode 100644 index 00000000..dfa9a8f3 Binary files /dev/null and b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8b.png differ 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 new file mode 100644 index 00000000..6ad3b6c4 Binary files /dev/null and b/Algebra_by__P._Abbott_And_M._E._Wardle/screenshots/cha8c.png differ diff --git a/Analog_And_Digital_Electronics/screenshots/Chapter_01-_Special_Diodes.png b/Analog_And_Digital_Electronics/screenshots/Chapter_01-_Special_Diodes.png new file mode 100755 index 00000000..2b2ec60a Binary files /dev/null and b/Analog_And_Digital_Electronics/screenshots/Chapter_01-_Special_Diodes.png differ diff --git a/Analog_And_Digital_Electronics/screenshots/Chapter_02-_Frequency_Response.png b/Analog_And_Digital_Electronics/screenshots/Chapter_02-_Frequency_Response.png new file mode 100755 index 00000000..1026ade5 Binary files /dev/null and b/Analog_And_Digital_Electronics/screenshots/Chapter_02-_Frequency_Response.png differ diff --git a/Analog_And_Digital_Electronics/screenshots/Chapter_03-_Feedback_Amplifiers.png b/Analog_And_Digital_Electronics/screenshots/Chapter_03-_Feedback_Amplifiers.png new file mode 100755 index 00000000..a9ca8063 Binary files /dev/null and b/Analog_And_Digital_Electronics/screenshots/Chapter_03-_Feedback_Amplifiers.png differ diff --git a/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter10_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter10_1.ipynb new file mode 100755 index 00000000..b10d5e7e --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter10_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 10", "cell_type": "markdown", "metadata": {}}, {"source": "# Voltage Regulators", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 10.1 Page No. 10-13", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "import math\n\nprint(\"ZZ = 7ohm,R3 = 330ohm,V0 = 4.7V,Vin = 15V\")\nprint(\"The specified change in Vin is 10%,\")\nvin = 0.1*15\nprint \"Therefore,delta Vin(in V) = 10% of Vin=\",vin,\"V\"\nvo = (1.5*7)/330\nprint \"Therefore,delta V0(in V) = delta Vin\u2217ZZ/R3=\",round(vo,5),\"V\"\nlr = 0.03181*100/4.7\nprint \"Therefore,Line regulation(in percentage) = deltaV0*100/V0=\",round(lr,3),\"%\"\nprint(\"For IL(max) = 50mA,\")\ndvo=(20.0*7.0*50.0*pow(10,-3))/330.0\nprint \"Therefore,delta V0(in V) = IL(max)\u2217RS\u2217ZZ/R3=\",round(dvo,5),\"V\"\nlr=0.02121*100/4.7\nprint \"Therefore,Line regulation(in precentage) = deltaV0\u2217100/V0=\",round(lr,4),\"%\"\nprint(\"Now VR(out) = VR(in)\u2217ZZ/R3\")\nzz=7.0/330.00\nprint \"Therefore,VR(out)/VR(in) = ZZ/R3 = \",round(zz,5)\nrr=20*math.log10(0.02121)\nprint \"Therefore,RR (in dB) = 20\u2217log(0.02121)=\",round(rr,2),\"dB\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "ZZ = 7ohm,R3 = 330ohm,V0 = 4.7V,Vin = 15V\nThe specified change in Vin is 10%,\nTherefore,delta Vin(in V) = 10% of Vin= 1.5 V\nTherefore,delta V0(in V) = delta Vin\u2217ZZ/R3= 0.03182 V\nTherefore,Line regulation(in percentage) = deltaV0*100/V0= 0.677 %\nFor IL(max) = 50mA,\nTherefore,delta V0(in V) = IL(max)\u2217RS\u2217ZZ/R3= 0.02121 V\nTherefore,Line regulation(in precentage) = deltaV0\u2217100/V0= 0.4513 %\nNow VR(out) = VR(in)\u2217ZZ/R3\nTherefore,VR(out)/VR(in) = ZZ/R3 = 0.02121\nTherefore,RR (in dB) = 20\u2217log(0.02121)= -33.47 dB\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.2 Page No. 10-15 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "import math\n\nprint(\"Vo = (1+R1/R2)Vz\")\nprint(\"9 = (1+R1/R2)5.6\")\nprint(\"Therefore R1/R2 = 0.6071\")\nprint(\"Let R1 = 10KOhm\")\nprint(\"Therefore R2 = 16.47KOhm\")\nprint(\"Minimum zener current is say 5 mA, which is same as current through R3\")\nprint(\"Therefore Izmin = (Vinmin - Vz)/R3\")\nprint(\"Therefore 5x10^-3 = ([18-3] - 5.6)/R3\")\nprint(\"R3 = 1.88KOhm\")\nprint(\"For Vmax = 18+3 = 21V we get,\")\nprint(\"Iz = (21-5.6)/1.88x10^3 = 8.19 mA\")\nprint(\"Pd = IzxVz = 8.19x10^-3 x 5.6 = 0.045W\")\nprint(\"Thus Pd < Pzmax\")\nprint(\"Thus the designed elements are\")\nprint(\"R1 = 10KOhm\")\nprint(\"R2 = 16.47KOhm\")\nprint(\"R3 = 1.88KOhm\")\nprint(\"Assume Beta of the series transistor as 30\")\nprint(\"IB = IE/(Beta +1) = Iomax/(Beta + 1)\")\nprint(\"IB = 50/31 = 1.61 mA\")\nprint(\"The Op-amp must be capable of supplying this current. The op-amp 741 has output current rating of 25mA. Hence op-amp 741 can be used\")\nprint(\"\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Vo = (1+R1/R2)Vz\n9 = (1+R1/R2)5.6\nTherefore R1/R2 = 0.6071\nLet R1 = 10KOhm\nTherefore R2 = 16.47KOhm\nMinimum zener current is say 5 mA, which is same as current through R3\nTherefore Izmin = (Vinmin - Vz)/R3\nTherefore 5x10^-3 = ([18-3] - 5.6)/R3\nR3 = 1.88KOhm\nFor Vmax = 18+3 = 21V we get,\nIz = (21-5.6)/1.88x10^3 = 8.19 mA\nPd = IzxVz = 8.19x10^-3 x 5.6 = 0.045W\nThus Pd < Pzmax\nThus the designed elements are\nR1 = 10KOhm\nR2 = 16.47KOhm\nR3 = 1.88KOhm\nAssume Beta of the series transistor as 30\nIB = IE/(Beta +1) = Iomax/(Beta + 1)\nIB = 50/31 = 1.61 mA\nThe Op-amp must be capable of supplying this current. The op-amp 741 has output current rating of 25mA. Hence op-amp 741 can be used\n\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.3 Page No. 10-17 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "import math\n\nprint(\"DVin = 3V\")\nprint(\"DVo = (DVinZz/R3)*(1+R1/R2) = (3x7/1.8x10^3)*(1+10/16.4) = 0.01878 V\")\nprint(\"%Line Regulation = (Dvo for given change x 100)/Vo = (0.01878*100)/18 = 0.1043 %\")\nprint(\"Change in IL = 50-10 = 40mA\")\nprint(\"DVo = (DIL(max)RsZz/R3)*(1+R1/R2)\")\nprint(\"DVo = ((40*10^-3*10*7)/(1.8*10^3))*(1+(10/16.4)) = 2.504mV\")\nprint(\"% Load Regulation = (DVo for given DIL(max)*100)/Vo\")\nprint(\"= (2.504*10^-3 * 100)/18 = 0.0139 %\")\nprint(\"and VR(out) = (VR(in)Zz/R3)*(1+R1/R2)\")\nprint(\"VR(out)/VR(in) = (7/1.8*10^3)*(1+10/16.4) = 6.26*10^-3\")\nprint(\"RR = 20*log(VR(out)/VR(in))\")\nprint(\"= -44.068dB\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "DVin = 3V\nDVo = (DVinZz/R3)*(1+R1/R2) = (3x7/1.8x10^3)*(1+10/16.4) = 0.01878 V\n%Line Regulation = (Dvo for given change x 100)/Vo = (0.01878*100)/18 = 0.1043 %\nChange in IL = 50-10 = 40mA\nDVo = (DIL(max)RsZz/R3)*(1+R1/R2)\nDVo = ((40*10^-3*10*7)/(1.8*10^3))*(1+(10/16.4)) = 2.504mV\n% Load Regulation = (DVo for given DIL(max)*100)/Vo\n= (2.504*10^-3 * 100)/18 = 0.0139 %\nand VR(out) = (VR(in)Zz/R3)*(1+R1/R2)\nVR(out)/VR(in) = (7/1.8*10^3)*(1+10/16.4) = 6.26*10^-3\nRR = 20*log(VR(out)/VR(in))\n= -44.068dB\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.4 Page No. 10-28", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "import math\n\nprint(\"R1 = 5kohm, R2 = 10kohm\")\nprint(\"The IC is 7808 i.e. Vreg = +8V\")\nvt=8*(3)\nprint \"Therefore,Vout(in V) = Vreg\u2217[1+R2/R1]=\",vt,\"V\"\nprint(\"Now R2=1kohm then,\")\nvo=8.0*(1.0+(1.0/5.0))\nprint \"Vout(in V) = 8\u2217[1+1/5]=\",round(vo,1),\"V\"\nprint(\"Thus the Vout can be varied from 9.6V to 24V,by varing R2 from 1kohm to 10kohm.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "R1 = 5kohm, R2 = 10kohm\nThe IC is 7808 i.e. Vreg = +8V\nTherefore,Vout(in V) = Vreg\u2217[1+R2/R1]= 24 V\nNow R2=1kohm then,\nVout(in V) = 8\u2217[1+1/5]= 9.6 V\nThus the Vout can be varied from 9.6V to 24V,by varing R2 from 1kohm to 10kohm.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.5 Page No. 10-29", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "import math\n\nprint(\"The (Io)max of 7805 regulator is 1A\")\nprint(\"IL = (1+B)Io - B(Vbe/R1)\")\nprint(\"(IL)max = (1+B)(Io)max - B(Vbe/R1)\")\nprint(\"(IL)max = (1+15)x1 - (15 x 1/7) = 13.85 A\")\nprint(\"Thus IC which can supply maximum of 1A can supply maximum load of 13.85A, with the help of the current boosting arrangement\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The (Io)max of 7805 regulator is 1A\nIL = (1+B)Io - B(Vbe/R1)\n(IL)max = (1+B)(Io)max - B(Vbe/R1)\n(IL)max = (1+15)x1 - (15 x 1/7) = 13.85 A\nThus IC which can supply maximum of 1A can supply maximum load of 13.85A, with the help of the current boosting arrangement\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.6 Page No. 10-30", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "import math\n\nprint(\"The Fig. 10.25 shows the connection diagram of IC 7805 used as current source\")\nprint(\"The current through RL is given by\")\nprint(\"IL = IR+IQ = VR/R + IQ\")\nprint(\"Now, IQ = 4.2m=A for 7805 IC\")\nprint(\"and VR = 5V for 7805 IC\")\nprint(\"Therefore, IL = 5/R + 4.2x10^-3\")\nprint(\"We want IL = 0.15A\")\nprint(\"Therefore 0.15 = 5/R+4.2x10^-3\")\nprint(\"Therfore R = 34.293 Ohm (Use 35 Ohm)\")\nprint(\"Now RL = 20 Ohm given\")\nprint(\"Vo = VR+VL = 5+ILRL = 5+0.15x20 = 8V\")\nprint(\"Therefore Vin = Vo + dropout voltage = 8+2 = 10V\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The Fig. 10.25 shows the connection diagram of IC 7805 used as current source\nThe current through RL is given by\nIL = IR+IQ = VR/R + IQ\nNow, IQ = 4.2m=A for 7805 IC\nand VR = 5V for 7805 IC\nTherefore, IL = 5/R + 4.2x10^-3\nWe want IL = 0.15A\nTherefore 0.15 = 5/R+4.2x10^-3\nTherfore R = 34.293 Ohm (Use 35 Ohm)\nNow RL = 20 Ohm given\nVo = VR+VL = 5+ILRL = 5+0.15x20 = 8V\nTherefore Vin = Vo + dropout voltage = 8+2 = 10V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.7 Page No. 10-33 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "import math\n\nprint(\"The resistance use dare,\")\nprint(\"R1 = 220ohm and R2 = 1.5kohm\")\nprint(\"while for LM317,IADJ = 100uA\")\nprint(\"Therefore,V0 = 1.25\u2217[1+R2/R1]+IADJ\u2217R2\")\nvo=(1.25*(1+((1.5*pow(10,3))/220)))+(100*1.5*pow(10,-3))\nprint \"Therefore,V0(in V)=\",round(vo,2),\"V\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The resistance use dare,\nR1 = 220ohm and R2 = 1.5kohm\nwhile for LM317,IADJ = 100uA\nTherefore,V0 = 1.25\u2217[1+R2/R1]+IADJ\u2217R2\nTherefore,V0(in V)= 9.92 V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.8 Page No. 10-33", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "import math\n\nprint(\"For LM317,the current IADJ = 100uA\")\nprint(\"When R2 is maximum i.e. R2 = 0 then,\")\nprint(\"V0 = 1.25\u2217[1+R2/R1]+IADJ\u2217R2 = 1.25V\")\nprint(\"When R2 is maximum, i.e. R2 = 10kohm then\")\nvo=(1.25*(1.0+((10.0*pow(10,3))/820.0)))+(100.0*10.0*pow(10,-3))\nprint \"V0(in V)=\",round(vo,2),\"V\"\nprint(\"Thus the output voltage can be varied in the range 1.25V to 17.49V\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For LM317,the current IADJ = 100uA\nWhen R2 is maximum i.e. R2 = 0 then,\nV0 = 1.25\u2217[1+R2/R1]+IADJ\u2217R2 = 1.25V\nWhen R2 is maximum, i.e. R2 = 10kohm then\nV0(in V)= 17.49 V\nThus the output voltage can be varied in the range 1.25V to 17.49V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.9 Page No. 10-47", "cell_type": "markdown", "metadata": {"collapsed": true}}, {"execution_count": 10, "cell_type": "code", "source": "import math\n\nprint(\"Switching Frequency f = 25Hz\")\nprint(\"Therefore T = 1/f\")\nprint(\"T = 1/25 = 40msec\")\nprint(\"while ton = 22msec and Vin = 200V\")\nprint(\"For Step down regulator\")\nprint(\"Vout = Delta*Vin where Delta = ton/T\")\nprint(\"Therefore Vout = 22/40*200 = 110V\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Switching Frequency f = 25Hz\nTherefore T = 1/f\nT = 1/25 = 40msec\nwhile ton = 22msec and Vin = 200V\nFor Step down regulator\nVout = Delta*Vin where Delta = ton/T\nTherefore Vout = 22/40*200 = 110V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 10.10 Page No. 10-47", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "import math\n\nprint(\"Vin = 190V, Vout = 540V, toff = 120usec\")\nprint(\"Vout = Vin/Delta\")\nprint(\"Therefore Delta = Vin/Vout = 190/540 = 0.3518\")\nprint(\"Now, Delta = ton/T = ton/(ton+toff)\")\nprint(\"Therfore 0.3518 = ton/(120x10^-6+ton)\")\nprint(\"Therefore ton = 65.1428 usec\")\nprint(\"T = ton + toff = 185.1428 usec\")\nprint(\"f = 1/T = 1/185.1428x10^-6 = 5.4012 KHz\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Vin = 190V, Vout = 540V, toff = 120usec\nVout = Vin/Delta\nTherefore Delta = Vin/Vout = 190/540 = 0.3518\nNow, Delta = ton/T = ton/(ton+toff)\nTherfore 0.3518 = ton/(120x10^-6+ton)\nTherefore ton = 65.1428 usec\nT = ton + toff = 185.1428 usec\nf = 1/T = 1/185.1428x10^-6 = 5.4012 KHz\n"}], "metadata": {"collapsed": false, "trusted": false}}], "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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter11_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter11_1.ipynb new file mode 100755 index 00000000..eebb2820 --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter11_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 11", "cell_type": "markdown", "metadata": {}}, {"source": "# Memories", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 11.3 Page No. 11-22 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print(\"The maximum data transfer rate is given by\")\nprint(\"d= storage density/Track x tape speed x No. of tracks/8\")\nprint(\"= 100 x 10^3 x 50 x 120 /8\")\nprint(\"= 75 Mbytes/sec\")\nprint(\"The storage capacity of the tape is given by\")\nprint(\"S = (d x Tape length in inches)/tape speed\")\nprint(\"= 75x450x12/50 = 8.1 Gbyte\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The maximum data transfer rate is given by\nd= storage density/Track x tape speed x No. of tracks/8\n= 100 x 10^3 x 50 x 120 /8\n= 75 Mbytes/sec\nThe storage capacity of the tape is given by\nS = (d x Tape length in inches)/tape speed\n= 75x450x12/50 = 8.1 Gbyte\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 11.4 Page No. 11-22 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print(\"From the given data the block length can be given as,\")\nprint(\"BL = Block storage capacity/Storage density = 6x10^3/3000 = 2 inches\")\nprint(\"Therefore the utilization factor of tape,\")\nprint(\"u = 2/(2+0.5) = 0.8\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "From the given data the block length can be given as,\nBL = Block storage capacity/Storage density = 6x10^3/3000 = 2 inches\nTherefore the utilization factor of tape,\nu = 2/(2+0.5) = 0.8\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 11.5 Page No. 11-23 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "print(\"Tape Speed = 200 in/sec\")\nprint(\"Data transfer rate = 10Mbits/sec\")\nprint(\"From the given data the tape recording density to achieve data transfer rate of 10Mbytes/sec is given as\")\nprint(\"Tape recording density = (10/200)*(1/8) = 6.25 Kbytes/in\")\nprint(\"The block length can be given as\")\nprint(\"BL = Block storage capacity/storage density = 32/6.25 = 5.12 in\")\nprint(\"The number of blocks on the tape = Tape length/(BL + GL) = (2400x12)/(5.12+0.3) = 5313.6 ~= 5313\")\nprint(\"Therefore storage capacity of tape is\")\nprint(\"S = no. of blocks x storage capacity of block\")\nprint(\"=5315x32 Kbytes = 170.016 Mbytes\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Tape Speed = 200 in/sec\nData transfer rate = 10Mbits/sec\nFrom the given data the tape recording density to achieve data transfer rate of 10Mbytes/sec is given as\nTape recording density = (10/200)*(1/8) = 6.25 Kbytes/in\nThe block length can be given as\nBL = Block storage capacity/storage density = 32/6.25 = 5.12 in\nThe number of blocks on the tape = Tape length/(BL + GL) = (2400x12)/(5.12+0.3) = 5313.6 ~= 5313\nTherefore storage capacity of tape is\nS = no. of blocks x storage capacity of block\n=5315x32 Kbytes = 170.016 Mbytes\n"}], "metadata": {"collapsed": false, "trusted": false}}], "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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter1_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter1_1.ipynb new file mode 100755 index 00000000..67543a24 --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter1_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 01: Special Diodes", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 1.1 Page No. 1-11", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "# Assumption\nprint(\"Assume the drop across the LED as 2 V\\n\"); \nprint(\"Therefore, VD = 2 V\\n\");\n\n# Given Data\nprint(\"From fig. 1.11, Rs = 2.2 kohm and Vs = 15 V\\n\"); \n\n# Calculation in mA\nIs =(15-2)/(2.2); \n\n# Result\nprint \"Therefore, Is(mA) = (Vs-VD/Rs) = \",round(Is,2),\"mA\"; ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Assume the drop across the LED as 2 V\n\nTherefore, VD = 2 V\n\nFrom fig. 1.11, Rs = 2.2 kohm and Vs = 15 V\n\nTherefore, Is(mA) = (Vs-VD/Rs) = 5.91 mA\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 1.2 Page No. 1-20", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "import math\n\n# Formula\nprint(\"The transistor capacitance is given by,\"); \nprint(\"CT = C(0)/[1+|VR/VJ|^n]\\n\");\n\n# Given Data\nprint(\"Now C(0) = 80pF , n = 1/3 as diffused junction\"); \nprint(\"VR = 4.2 V, VJ = 0.7 V\\n\");\n\n# Calculation in pF\nct = round((80*pow(10,-12))/((pow((1+(4.2/0.7)),(0.3333))))*pow(10,12),2); # Note here, 1/3 = 0.3333 \n\n# Result\nprint \"Therefore, CT(pF) = \",ct,\"pF\"; \n\n# Formula\nprint(\"\\nThe transistor capacitance is also given by, \" )\nprint(\"CT = K/[VR+VJ]^n\\n\") \n\n#Calculation\nk = round((41.82*pow(10,-12))*(pow((4.2+0.7),(0.3333)))*pow(10,12),2); # Note here, 1/3 = 0.3333 \n\n# Result\nprint \"Therefore, K = \",k,\"* 10^-12\"; ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The transistor capacitance is given by,\nCT = C(0)/[1+|VR/VJ|^n]\n\nNow C(0) = 80pF , n = 1/3 as diffused junction\nVR = 4.2 V, VJ = 0.7 V\n\nTherefore, CT(pF) = 41.82 pF\n\nThe transistor capacitance is also given by, \nCT = K/[VR+VJ]^n\n\nTherefore, K = 71.03 * 10^-12\n"}], "metadata": {"scrolled": true, "collapsed": false, "trusted": true}}, {"execution_count": null, "cell_type": "code", "source": "", "outputs": [], "metadata": {"collapsed": true, "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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter2_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter2_1.ipynb new file mode 100755 index 00000000..ca16fcd5 --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter2_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 02: Frequency Response", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 2.1 Page No. 2-3", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "import math\n\nprint(\"We know that maximum voltage gain of voltage amplifier is given as:\\n\");\nmv = 200*(math.sqrt(2));\nprint \"Therefore, Maximum voltage gain = Gain at cut off x*sqrt(2) =\",round(mv,2);", "outputs": [{"output_type": "stream", "name": "stdout", "text": "We know that maximum voltage gain of voltage amplifier is given as:\n\nTherefore, Maximum voltage gain = Gain at cut off x*sqrt(2) = 282.84\n"}], "metadata": {"scrolled": true, "collapsed": false, "trusted": true}}, {"source": "## Example 2.2 Page No. 2-6", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "import math\n\nprint(\"We know that,\")\n\na = 100/(math.sqrt(1+(pow((1000/20),2))))\nprint \"Below midband : A = A_mid/sqrt(1+(f1/f)^2) =\", round(a,1)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "We know that,\nBelow midband : A = A_mid/sqrt(1+(f1/f)^2) = 2.0\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 2.3 Page No. 2-6", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "import math\n\na = 200* (math.sqrt(2))\nprint \"We know that A_mid = 3dB gain x*sqrt(2) =\", round(a,2)\nam = 282.84/(math.sqrt (1+(pow((10/2),2))))\nprint \"\\nAbove midband:A = A_mid/sqrt(1+(f1/f)^2) =\", round(am,2) ## Answer in textbook is wrong!", "outputs": [{"output_type": "stream", "name": "stdout", "text": "We know that A_mid = 3dB gain x*sqrt(2) = 282.84\n\nAbove midband:A = A_mid/sqrt(1+(f1/f)^2) = 55.47\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 2.4 Page No. 2-11 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "import math \n\nprint(\"It is necessary to analyze each network to determine the critical frequency of the amplifier\");\n\n\nprint(\"(a) Input RC network \")\nfc1 = 1/(2*(math.pi)*(680+1031.7)*(0.1*pow(10,-6)) )\nprint \"fc(input) (in Hz) = 1/2*pi*[RS+(R1||R2||hie)]C1 =\",round(fc1,1),\"Hz\"\n\n\nprint(\"\\n\\n(b) Output RC network \")\nfc2 = 1/(2* (math.pi) *((2.2+10)*pow(10,3)) *(0.1*pow(10,-6)))\nprint \"fc(output) (in Hz) = 1/2*pi*(RC+RL)*C2 =\",round(fc2,2),\"Hz\"\n\n\nprint(\"\\n\\n(c) Bypass RC network\")\nrth = ((68*22*0.680) /((22*0.680) +(68*0.680) +(68*22)))*pow(10,3)\nprint \"Rth (in ohm) = R1||R2||RS =\",rth\nfc3 = 1/(2* (math.pi) *17.23*10*pow(10,-6))\nprint \" fc (bypass) (in Hz) = 1/2*pi*[ (Rth+hie/beta)||RE]*CE = \",round(fc3,1),\"Hz\"\n\nprint(\"\\n\\nWe have calculated all the three critical frequencies: \")\nprint(\"(a) fc (input) = 929.8 Hz\")\nprint(\"(b) fc (output) = 130.45 Hz\")\nprint(\"(c) fc (bypass) = 923.7 Hz\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "It is necessary to analyze each network to determine the critical frequency of the amplifier\n(a) Input RC network \nfc(input) (in Hz) = 1/2*pi*[RS+(R1||R2||hie)]C1 = 929.8 Hz\n\n\n(b) Output RC network \nfc(output) (in Hz) = 1/2*pi*(RC+RL)*C2 = 130.45 Hz\n\n\n(c) Bypass RC network\nRth (in ohm) = R1||R2||RS = 653.27510917\n fc (bypass) (in Hz) = 1/2*pi*[ (Rth+hie/beta)||RE]*CE = 923.7 Hz\n\n\nWe have calculated all the three critical frequencies: \n(a) fc (input) = 929.8 Hz\n(b) fc (output) = 130.45 Hz\n(c) fc (bypass) = 923.7 Hz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 2.5 Page No. 2-14", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "import math\n\nprint(\"It is necessary to analyze each network to determine the critical frequency of the amplifier\")\n\n\nprint(\"\\n(a) Input RC Network\")\nprint(\"fc = 1/2*pi*Rin*C1\")\nrin =(100*100)/(100+100)\nprint \"where Rin(in Mohm) = RG||Rin(gate)= RG|| |VGS/IGSS| =\",rin,\"MOhm\"\nfc1 =1/(2* (math.pi)*50*pow(10,6)*0.001*pow(10,-6))\nprint \"Therefore, fc(in Hz) =\",round(fc1,2),\"Hz\"\n\n\nprint(\"\\n(b) Output RC Network\")\nfc2 =1/(2* (math.pi) *(24.2*pow(10,3)) *(1*pow(10,-6)))\nprint \"fc (in Hz) = 1/2*pi*(RD+RL)*C2 =\",round(fc2,3),\"Hz\"\nprint(\"\\nWe have calculated two critical frequencies\")\n\n\nprint(\"(a) fc(input) = 3.18 Hz\")\nprint(\"(b) fc(output) = 6.577 Hz\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "It is necessary to analyze each network to determine the critical frequency of the amplifier\n\n(a) Input RC Network\nfc = 1/2*pi*Rin*C1\nwhere Rin(in Mohm) = RG||Rin(gate)= RG|| |VGS/IGSS| = 50 MOhm\nTherefore, fc(in Hz) = 3.18 Hz\n\n(b) Output RC Network\nfc (in Hz) = 1/2*pi*(RD+RL)*C2 = 6.577 Hz\n\nWe have calculated two critical frequencies\n(a) fc(input) = 3.18 Hz\n(b) fc(output) = 6.577 Hz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 2.6 Page No. 2-17 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "import math\n\nprint(\"Before calculating critical frequencies it is necessary calculate mid frequency gain of the given circuit. This is required to calculate Cin(miller) and Cout(miller)\")\nprint(\"\\nAv= hfe*Ro/Ri\")\nprint(\"where Ri = hie||R1||R2\")\nprint(\"and Ro = RC||RL\")\n\nav = (-100*1.8)/1.032\nprint \"\\nTherefore, Av = hfe(RC||RL)/hie||R1||R2=\",round(av,1)\nprint(\"Negative sign indicates 180 degree shift between input and output\")\n\ncin =(4*(174.4+1))*pow(10,-3)\nprint \"\\nCin(miller)(in nF) = C_bc*(Av+1) =\",round(cin,4),\"nF\"\n\ncout =(4*175.4) /(174.4)\nprint \"\\nCout(miller)(in pF) = C_bc*(Av+1)/Av =\",round(cout,1),\"pF\"\nprint(\"We know analyze input and output network for critical frequency\")\n\nfci =(1/(2* (math.pi) *410*0.7216*pow(10,-9)) ) *pow(10,-3)\nprint \"\\nfc(input)(in kHz) = 1/2*pi*(Rs||R1||R2||hie)*(C_be+Cin(miller)) =\",round(fci,3),\"Hz\"\n\nfco =(1/(2* (math.pi) *((22*pow(10,6)) /(12.2*pow(10,3)) ) *(4*pow(10,-12)) ))*pow(10,-6)\nprint \"\\nfc(output)(in MHz) = 1/2*pi*(RC||RL)*Cout(miller) =\",round(fco,1),\"MHz\"\n\nprint(\"\\nWe have calculated both the critical frequencies\")\nprint(\"(a) fc(input) = 537.947 kHz\")\nprint(\"(b) fc(output) = 22.1 MHz\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Before calculating critical frequencies it is necessary calculate mid frequency gain of the given circuit. This is required to calculate Cin(miller) and Cout(miller)\n\nAv= hfe*Ro/Ri\nwhere Ri = hie||R1||R2\nand Ro = RC||RL\n\nTherefore, Av = hfe(RC||RL)/hie||R1||R2= -174.4\nNegative sign indicates 180 degree shift between input and output\n\nCin(miller)(in nF) = C_bc*(Av+1) = 0.7016 nF\n\nCout(miller)(in pF) = C_bc*(Av+1)/Av = 4.0 pF\nWe know analyze input and output network for critical frequency\n\nfc(input)(in kHz) = 1/2*pi*(Rs||R1||R2||hie)*(C_be+Cin(miller)) = 537.947 Hz\n\nfc(output)(in MHz) = 1/2*pi*(RC||RL)*Cout(miller) = 22.1 MHz\n\nWe have calculated both the critical frequencies\n(a) fc(input) = 537.947 kHz\n(b) fc(output) = 22.1 MHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 2.7 Page No. 2-21 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "import math\n\nprint(\"Before calculating critical frequencies it is necessary to calculate mid frequency gain of the given amplifier circuit. This is required to calculate Cin(miller) and Cout(miller)\")\nprint(\"\\nAv = gm*RD\")\nprint(\"Here, RD should be replaced by RD||RL\")\nav = -6*2;\nprint \"\\nTherefore,Av = gm*(RD||RL) =\",av\n\ncin = 2*(12+1) \nprint \"\\nCin(miller)(in pF) = C_gd*(Av+1) = C_rss*(Av+1) =\",cin,\"pF\"\n\ncout = (2.0*13.0)/12.0\nprint \"\\nCout (miller)(in pF) = C_gd*(Av+1) / Av =\",round(cout,4),\"pF\" ## Here the intension is to get the answer same as textbook, hence four decimal places are used!\n\nprint(\"G_gs = C_iss - C_rss = 4 pF\")\nprint(\"We know analyze input and output network for critical frequency\")\nprint(\"fc (input) = 1/2*pi*RS*CT = 1/2*pi*RS*[Cgs+Cin(miller)]\")\n\n\nfc1 =(1/(2* (math.pi) *100*30*pow(10,-12)) )*pow(10,-6)\nprint \"\\nfc (input) (in MHz)= \",round(fc1,0),\"MHz\"\n\n\nfc2 =(1/(2* (math.pi) *((48.4*pow(10,6)) /(24.2*pow(10,3)) ) *(2.166*pow(10,-12)) ))*pow(10,-6)\nprint \"\\nfc (output) (in MHz) = 1/2*pi*(RD||RL)*Cout(miller) =\",round(fc2,2),\"MHz\"\n\n\nprint(\"\\nWe have calculated both the critical frequencies:\")\nprint(\"(a) fc(input) = 53 MHz\")\nprint(\"(b) fc(output) = 36.74 MHz\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Before calculating critical frequencies it is necessary to calculate mid frequency gain of the given amplifier circuit. This is required to calculate Cin(miller) and Cout(miller)\n\nAv = gm*RD\nHere, RD should be replaced by RD||RL\n\nTherefore,Av = gm*(RD||RL) = -12\n\nCin(miller)(in pF) = C_gd*(Av+1) = C_rss*(Av+1) = 26 pF\n\nCout (miller)(in pF) = C_gd*(Av+1) / Av = 2.1667 pF\nG_gs = C_iss - C_rss = 4 pF\nWe know analyze input and output network for critical frequency\nfc (input) = 1/2*pi*RS*CT = 1/2*pi*RS*[Cgs+Cin(miller)]\n\nfc (input) (in MHz)= 53.0 MHz\n\nfc (output) (in MHz) = 1/2*pi*(RD||RL)*Cout(miller) = 36.74 MHz\n\nWe have calculated both the critical frequencies:\n(a) fc(input) = 53 MHz\n(b) fc(output) = 36.74 MHz\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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter3_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter3_1.ipynb new file mode 100755 index 00000000..aa25c6b2 --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter3_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 03: Feedback Amplifiers", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 3.1 Page No. 3-24", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "import math\n\nprint (\"Gain with feedback\")\nav = 1000/(1+(0.05*1000))\nprint \"\\n(a)AV_mid = Av_mid/1+beta*Av_mid=\",round(av,1)\nflf =50/(1+(0.05*1000))\nprint \"\\n(b)fLf(in Hz) = fL/1+beta*Av_mid=\",round(flf,2),\"Hz\"\nfhf =((50*pow(10,3)) *(1+(0.05*1000)))*pow(10,-6)\nprint \"\\n(c)fHf(in MHz) = fH*(1+beta*Av_mid) =\",round(fhf,2),\"MHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Gain with feedback\n\n(a)AV_mid = Av_mid/1+beta*Av_mid= 19.6\n\n(b)fLf(in Hz) = fL/1+beta*Av_mid= 0.98 Hz\n\n(c)fHf(in MHz) = fH*(1+beta*Av_mid) = 2.55 MHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.2 Page No. 3-24", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "import math\n\nprint (\"(a)beta: 40 = 20*log[1+ beta*A]\")\nprint (\"Therefore,1+beta*A = 100\")\nb =99.0/1000.0\nprint \"Therefore,beta =\",round(b,3)\nprint (\"Gain of the amplifier with feedback is given as\")\navf =1000/100\nprint \"AVf = AV/1+beta*AV=\",avf\nprint (\"\\n(b)To maintain output power 10W,we should maintain output voltage constant and to maintain output constant with feedback gain required Vs is\")\nvsf =10*100*pow(10,-3)\nprint \"Vsf(in V) = Vs*100 =\",vsf,\"V\"\nprint (\"\\n(c)Second harmonic distortion is reduced by factor 1 + beta*A\")\nd2f =(0.1/100.0) *100.0\nprint \"D2f (in percentage) = D2/1+beta*A =\",d2f,\"%\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "(a)beta: 40 = 20*log[1+ beta*A]\nTherefore,1+beta*A = 100\nTherefore,beta = 0.099\nGain of the amplifier with feedback is given as\nAVf = AV/1+beta*AV= 10\n\n(b)To maintain output power 10W,we should maintain output voltage constant and to maintain output constant with feedback gain required Vs is\nVsf(in V) = Vs*100 = 1.0 V\n\n(c)Second harmonic distortion is reduced by factor 1 + beta*A\nD2f (in percentage) = D2/1+beta*A = 0.1 %\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.3 Page No. 3-25", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "import math\n\nprint (\"(a) We know that\")\nprint (\"dAf/Af = 0.1/1+beta*A*dA/A\")\nprint (\"Therefore, 1+beta*A = 37.5\")\nb = (36.5/2000.0) *100.0\nprint \"Therefore, beta(in percentage) =\",round(b,3),\"%\"\naf =2000/(1+(0.01825*2000) )\nprint \"\\n(b) Af = A/1+beta*A =\",round(af,2)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "(a) We know that\ndAf/Af = 0.1/1+beta*A*dA/A\nTherefore, 1+beta*A = 37.5\nTherefore, beta(in percentage) = 1.825 %\n\n(b) Af = A/1+beta*A = 53.33\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.4 Page No. 3-32", "cell_type": "markdown", "metadata": {}}, {"execution_count": 18, "cell_type": "code", "source": "import math\n\nprint(\"Step1: Identify topology\")\nprint(\"The feedback voltage is applied across the resistance Re1 and it is in series with input signal. Hence feedback is voltage series feedback.\")\nprint (\" \")\nprint (\"Step2 and Step3: Find input and output circuit.\")\nprint (\"To find input circuit, set Vo = 0 (connecting C2 to ground), which gives parallel combination of Re with Rf at E1. To find output circuit, set Ii = 0 (opening the input node E1 at emitter of Q1), which gives series combination of Rf and Re1 across the output. The resultant circuit is shown in Fig.3.32\")\nprint (\" \")\nprint (\"Step4: Find open loop voltage gain(Av)\")\nrl2 =(4.7*10.1) /(4.7+10.1)\nprint \"RL2(in kohm) = Rc2||(Re1+Rf) =\",round(rl2,2),\"KOhm\"\nprint (\"Ai2 = -hfe = -100\")\nprint (\"Ri2 = hie = 1100 ohm\")\nav2 =( -100*3.21*pow(10,3)) /1100\nprint \"Av2 = Ai2*RL2/Ri2 =\",round(av2,2)\nprint (\"Ai1 = -hfe = -100\")\nrl1 =(22*220*22*1.100) /((220*22*1.100) +(22*22*1.100)+(22*220*1.100) +(22*220*22) )\nprint \"RL1 (in ohm) = Rc1||R3||R4||Ri2 =\",round(rl1*pow(10,3),0),\"Ohm\"\nri1 =1.1+(101.0*((0.1*10.0) /(0.1+10.0) ))\nprint \"Ri1(in kohm) = hie + (1+hfe )*Re1_eff = where Re1_eff = (Re1||Rf) = \",round(ri1,3),\"KOhm\" #11.099Kohm ~= 11.01Kohm --> Round function limit\nav1 =(-100*995) /(11.099*pow(10,3))\nprint \"Therefore, Av1 = Ai1*RL1/Ri1 =\",round(av1,2)\nprint (\"The overall voltage gain without feed back is given as,\")\nav = -291.82* -8.96\nprint \"Av = Av1 * Av2 =\",round(av,1)\nprint (\"The overall voltage gain taking Rs in account is given as,\")\naV =(2614.7*11.099*pow(10,3)) /((11.099*pow(10,3)) +100)\nprint \"Av = Vo/Vs = Av*Ri1/ Ri1+Rs =\",round(aV,2)\nprint (\" \")\nprint (\"Step5: Calculate beta\")\nprint (\"Looking at Fig.3.33.\")\nbeta =100.0/(100.0+(10.0*pow(10,3)))\nprint \"beta = Vf/Vo =\",round(beta,4)\nd =1+(0.0099*2591.35)\nprint \"D = 1 + beta*Av =\",round(d,2)\navf =2591.35/26.65\nprint \"Avf = Av/D =\",round(avf,2)\nrif =26.65*11.099\nprint \"Rif(in kohm) = Ri1*D =\",round(rif,3),\"KOhm\"\nriff =(295.788*220*22) /((220*22) +(295.788*22)+(295.788*220) )\nprint \"Rif (in kohm) = Rif||R1||R2 =\",round(riff,2),\"KOhm\"\nprint (\"Rof = Ro/D = infinity/D = infinity \")\nprint (\"Therefore, Rof = Ro/D where Ro = RL2 \")\nroff =(3.21*pow(10,3)) /26.65\nprint \"Therefore, Rof (in ohm) = \",round(roff,2),\"Ohm\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1: Identify topology\nThe feedback voltage is applied across the resistance Re1 and it is in series with input signal. Hence feedback is voltage series feedback.\n \nStep2 and Step3: Find input and output circuit.\nTo find input circuit, set Vo = 0 (connecting C2 to ground), which gives parallel combination of Re with Rf at E1. To find output circuit, set Ii = 0 (opening the input node E1 at emitter of Q1), which gives series combination of Rf and Re1 across the output. The resultant circuit is shown in Fig.3.32\n \nStep4: Find open loop voltage gain(Av)\nRL2(in kohm) = Rc2||(Re1+Rf) = 3.21 KOhm\nAi2 = -hfe = -100\nRi2 = hie = 1100 ohm\nAv2 = Ai2*RL2/Ri2 = -291.82\nAi1 = -hfe = -100\nRL1 (in ohm) = Rc1||R3||R4||Ri2 = 995.0 Ohm\nRi1(in kohm) = hie + (1+hfe )*Re1_eff = where Re1_eff = (Re1||Rf) = 11.1 KOhm\nTherefore, Av1 = Ai1*RL1/Ri1 = -8.96\nThe overall voltage gain without feed back is given as,\nAv = Av1 * Av2 = 2614.7\nThe overall voltage gain taking Rs in account is given as,\nAv = Vo/Vs = Av*Ri1/ Ri1+Rs = 2591.35\n \nStep5: Calculate beta\nLooking at Fig.3.33.\nbeta = Vf/Vo = 0.0099\nD = 1 + beta*Av = 26.65\nAvf = Av/D = 97.24\nRif(in kohm) = Ri1*D = 295.788 KOhm\nRif (in kohm) = Rif||R1||R2 = 18.73 KOhm\nRof = Ro/D = infinity/D = infinity \nTherefore, Rof = Ro/D where Ro = RL2 \nTherefore, Rof (in ohm) = 120.45 Ohm\n"}], "metadata": {"scrolled": true, "collapsed": false, "trusted": true}}, {"source": "## Example 3.5 Page No. 3-46 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 19, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"The feedback voltage is applied across R1(100ohm),which is in series with input signal.Hence feedback is voltage series feedback\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output circuit\")\nprint(\"To find input circuit,set Vo=0,which gives parallel combination of R1 with R2 at E1 as shown in the fig.3.45.To find output circuit, set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of R2 and R1 across the output.The resultant circuit is shown in fig.3.45\")\nprint(\"\")\nprint(\"Step4:Find the open loop voltage gain(Av)\")\nrl2=(4.7*4.8)/(4.7+4.8)\nprint \"RL2(in kohm)=\",round(rl2,2),\"KOhm\"\nprint(\"Since hoe = hre = 0 we can use approximate analysis\")\nprint(\"Ai2 = -hfe = -50\")\nprint(\"Ri2 = hie = 1.1kohm\")\nav2=(-50*2.37)/1.1\nprint \"Av2 = Ai2*RL2/Ri2=\",round(av2,2)\nrl1=(10.0*47.0*33.0*1.1)/((47.0*33.0*1.1)+(10.0*33.0*1.1)+(10.0*47.0*1.1)+(10.0*47.0*33.0))\nprint \"RL1(in ohm)=\",round(rl1*pow(10,3),0),\"Ohm\" #943Ohm ~= 942Ohm --> Round function limit\nprint(\"Ai1 = -hfe = -50\")\nri1=1.1+(51.0*((0.1*4.7)/(4.8)))\nprint \"Ri1(in kohm) = hie+(1+hfe)*Re=\",round(ri1,3),\"KOhm\"\nav1=(-50*942)/(6.093*pow(10,3))\nprint \"Av1=Ai1*RL1/Ri1=\",round(av1,2)\nav=-7.73*-107.73\nprint \"Therefore,Av=Av1*Av2=\",round(av,2)\nprint(\"\")\nprint(\"Step5:Calculate beta and D\")\nprint(\"beta=R1/R1+R2=1/48\")\nd=1.0+(832.75/48.0)\nprint \"D(in ohm)=1+A*beta=\",round(d,2),\"Ohm\"\nprint(\"\")\nprint(\"Step6:Calculate Avf,Rof and Rif\")\navf=832.75/18.35\nprint \"Avf = Av/D =\",round(avf,2)\nrif=6.093*18.35\nprint \"Rif(in kohm) = Ri1*D=\",round(rif,1),\"KOhm\"\nrof=(2.37*pow(10,3))/18.35\nprint \"Rof(in ohm) = Ro/D =\",round(rof,2),\"Ohm\" #129.15Ohm ~= 129.16Ohm --> Round function limit", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nThe feedback voltage is applied across R1(100ohm),which is in series with input signal.Hence feedback is voltage series feedback\n\nStep2 and Step3:Find input and output circuit\nTo find input circuit,set Vo=0,which gives parallel combination of R1 with R2 at E1 as shown in the fig.3.45.To find output circuit, set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of R2 and R1 across the output.The resultant circuit is shown in fig.3.45\n\nStep4:Find the open loop voltage gain(Av)\nRL2(in kohm)= 2.37 KOhm\nSince hoe = hre = 0 we can use approximate analysis\nAi2 = -hfe = -50\nRi2 = hie = 1.1kohm\nAv2 = Ai2*RL2/Ri2= -107.73\nRL1(in ohm)= 943.0 Ohm\nAi1 = -hfe = -50\nRi1(in kohm) = hie+(1+hfe)*Re= 6.094 KOhm\nAv1=Ai1*RL1/Ri1= -7.73\nTherefore,Av=Av1*Av2= 832.75\n\nStep5:Calculate beta and D\nbeta=R1/R1+R2=1/48\nD(in ohm)=1+A*beta= 18.35 Ohm\n\nStep6:Calculate Avf,Rof and Rif\nAvf = Av/D = 45.38\nRif(in kohm) = Ri1*D= 111.8 KOhm\nRof(in ohm) = Ro/D = 129.16 Ohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.6 Page No. 3-49 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 20, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"The feedback voltage is applied across Re1 =1.5kohm,which is in series with input signal.Hence feedback is voltage series feedback\")\nprint(\"\")\nprint(\"Step2 and step3:Find input and output circuit\")\nprint(\"To find input circuit,set Vo=0,which gives parallel combination of Re1 with Rf at E1 as shown in fig.3.47.To find ouput circuit,set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of Rf and Re1 across the output.The resultant circuit is shown in fig.3.47\")\nprint(\"\")\nprint(\"Step4:Find the open loop voltage gain(Av)\")\nrl2 = (2.2*57.5)/(2.2+57.5)\nprint \"RL2(in kohm) = Rc2||(Rf+Re1) = \",round(rl2,3),\"KOhm\"\nprint(\"Since hoe*RL2 = 10^6*2.119kohm = 0.002119 is less than 0.1 we use approximate analysis.\")\nprint(\"Ai2 = -hfe = -200\")\nprint(\"Ri2 = hie = 2kohm\")\nav2=(-200*2.119)/2.0\nprint \"Av2 = Ai2*RL2/Ri2 =\",round(av2,1)\nrl1=(120.0*2.0)/(122.0)\nprint \"RL1(in kohm) = RC1||Ri2 =\",round(rl1,3),\"KOhm\"\nprint(\"Since hoe*RL1 = 10^6*1.967 = 0.001967 is less than 0.1 we use approximate analysis.\")\nprint(\"Ai1 = -hfe = -200\")\nri1=2.0+(201.0*((1.5*56.0)/(57.5)))\nprint \"Ri1(in kohm) = hie+(1+hfe)*Re =\",round(ri1,2),\"KOhm\"\nav1=(-200.0*1.967)/295.63\nprint \"Therefore, Av1 = Ai1*RL1/Ri1 =\",round(av1,2)\nprint(\"The overall gain without feedback is\")\nav=-1.33*-211.9\nprint \"Av = Av1*Av2 =\",round(av,2)\nprint(\"\")\nprint(\"Step5:Calculate beta\")\nbeta=1.5/57.5\nprint \"beta = Vf/Vo =\",round(beta,3)\nprint(\"\")\nprint(\"Step6:calculate D,Avf,Rif,Rof\")\nd=1+(0.026*281.82)\nprint \"D = 1+Av*beta =\",round(d,3)\navf=281.82/8.327\nprint \"Therefore, Avf = Av/D =\",round(avf,2)\nri=(295.63*150)/(295.63+150)\nprint \"Ri(in kohm) = Ri1||R =\",round(ri,1),\"KOhm\"\nrif=99.5*8.327\nprint \"Rif(in kohm) = Ri*D =\",round(rif,2),\"KOhm\" # Round function limit\nprint(\"Ro = 1/hoe = 1Mohm\")\nrof=((1*pow(10,6))/8.327)*(pow(10,-3))\nprint \"Rof(in kohm) = Ro/D =\",round(rof,0),\"KOhm\"\nro=(1000*2.119)/(2.119+1000)\nprint \"Ro(in kohm) = Ro||Rc2||(Rf+Re1)=Ro||RL2 =\",round(ro,4),\"KOhm\"\nrof=(2.1145*pow(10,3))/8.327\nprint \"Rof(in ohm) = Ro/D =\",round(rof,0),\"Ohm\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nThe feedback voltage is applied across Re1 =1.5kohm,which is in series with input signal.Hence feedback is voltage series feedback\n\nStep2 and step3:Find input and output circuit\nTo find input circuit,set Vo=0,which gives parallel combination of Re1 with Rf at E1 as shown in fig.3.47.To find ouput circuit,set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of Rf and Re1 across the output.The resultant circuit is shown in fig.3.47\n\nStep4:Find the open loop voltage gain(Av)\nRL2(in kohm) = Rc2||(Rf+Re1) = 2.119 KOhm\nSince hoe*RL2 = 10^6*2.119kohm = 0.002119 is less than 0.1 we use approximate analysis.\nAi2 = -hfe = -200\nRi2 = hie = 2kohm\nAv2 = Ai2*RL2/Ri2 = -211.9\nRL1(in kohm) = RC1||Ri2 = 1.967 KOhm\nSince hoe*RL1 = 10^6*1.967 = 0.001967 is less than 0.1 we use approximate analysis.\nAi1 = -hfe = -200\nRi1(in kohm) = hie+(1+hfe)*Re = 295.63 KOhm\nTherefore, Av1 = Ai1*RL1/Ri1 = -1.33\nThe overall gain without feedback is\nAv = Av1*Av2 = 281.83\n\nStep5:Calculate beta\nbeta = Vf/Vo = 0.026\n\nStep6:calculate D,Avf,Rif,Rof\nD = 1+Av*beta = 8.327\nTherefore, Avf = Av/D = 33.84\nRi(in kohm) = Ri1||R = 99.5 KOhm\nRif(in kohm) = Ri*D = 828.54 KOhm\nRo = 1/hoe = 1Mohm\nRof(in kohm) = Ro/D = 120.0 KOhm\nRo(in kohm) = Ro||Rc2||(Rf+Re1)=Ro||RL2 = 2.1145 KOhm\nRof(in ohm) = Ro/D = 254.0 Ohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.7 Page No. 3-51 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"By shorting output voltage(Vo=0),feedback voltage Vf becomes zero and hence it is voltage sampling. The feedback voltage is applied in series with input voltage hence the topology is voltage series feedback.\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output circuit.\")\nprint(\"To find input circuit,set Vo=0.This places the parallel combination of resistor 10K and 200 ohm at first source.To find output circuit,set Ii=0.This places the resistor 10K and 200ohm in series across the output.The resultant circuit is shown in fig.3.50.\")\nprint(\"\")\nprint(\"Step4:Replace FET with its equivalent circuit as shown in fig.3.51\")\nprint(\"\")\nprint(\"Step5:Find open loop transfer gain.\")\nprint(\"Av = Vo/Vs = Av1*Av2\")\nprint(\"Av2 = u*RL2/RL2+rd\")\nrl2=(10.2*47.0)/(10.2+47.0)\nprint \"where RL2(in kohm)=\",round(rl2,2),\"KOhm\"\nav2=(-40.0*8.38)/(8.38+10.0)\nprint \"Therefore, Av2=\",round(av2,3)\nprint(\"Av1 = u*RDeff/rd+RDeff+(1+u)*Rseff\")\nrdeff=(47.0*1000.0)/(47.0+1000.0)\nprint \"where RDeff(in kohm) = RD||RG2=\",round(rdeff,2),\"KOhm\"\nprint(\"Rseff = 200||10K\")\nav1=(-40*44.98*pow(10,3))/((10*pow(10,3))+(44.89*pow(10,3))+(41*2/10.2)*pow(10,3))\nprint \"Av1=\",round(av1,2)\noav=-28.59*-18.237\nprint \"Therefore,Overall Av =\",round(oav,2) # Round function limit\nprint(\"\")\nprint(\"Step6:Calculate beta\")\nbeta=200.0/(10.2*pow(10,3))\nprint \"beta = Vf/Vo = \",round(beta,4)\nprint(\"\")\nprint(\"Step7:Calculate D,Avf,Rif,Rof\")\nd=1+(0.0196*521.39)\nprint \"D=1+Av*beta=\",round(d,2)\navf=521.39/11.22\nprint \"Avf=Av/D=\",round(avf,2)\nprint(\"Ri = RG = 1Mohm\")\nrif=11.22\nprint \"Rif(in Mohm) = Ri*D =\",round(rif,2),\"MOhm\"\nprint(\"Ro = rd = 10kohm\")\nro = (10.0*8.38)/(18.38)\nprint \"Ro(in kohm) = rd||RL2=\",round(ro,3),\"KOhm\"\nrof = (4.559*pow(10,3))/11.22\nprint \"Rof(in ohm) = Ro/D=\",round(rof,0)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nBy shorting output voltage(Vo=0),feedback voltage Vf becomes zero and hence it is voltage sampling. The feedback voltage is applied in series with input voltage hence the topology is voltage series feedback.\n\nStep2 and Step3:Find input and output circuit.\nTo find input circuit,set Vo=0.This places the parallel combination of resistor 10K and 200 ohm at first source.To find output circuit,set Ii=0.This places the resistor 10K and 200ohm in series across the output.The resultant circuit is shown in fig.3.50.\n\nStep4:Replace FET with its equivalent circuit as shown in fig.3.51\n\nStep5:Find open loop transfer gain.\nAv = Vo/Vs = Av1*Av2\nAv2 = u*RL2/RL2+rd\nwhere RL2(in kohm)= 8.38 KOhm\nTherefore, Av2= -18.237\nAv1 = u*RDeff/rd+RDeff+(1+u)*Rseff\nwhere RDeff(in kohm) = RD||RG2= 44.89 KOhm\nRseff = 200||10K\nAv1= -28.59\nTherefore,Overall Av = 521.4\n\nStep6:Calculate beta\nbeta = Vf/Vo = 0.0196\n\nStep7:Calculate D,Avf,Rif,Rof\nD=1+Av*beta= 11.22\nAvf=Av/D= 46.47\nRi = RG = 1Mohm\nRif(in Mohm) = Ri*D = 11.22 MOhm\nRo = rd = 10kohm\nRo(in kohm) = rd||RL2= 4.559 KOhm\nRof(in ohm) = Ro/D= 406.0\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.8 Page No. 3-54", "cell_type": "markdown", "metadata": {}}, {"execution_count": 22, "cell_type": "code", "source": "import math\n\nprint(\"Here,output voltage is sampled and fed in series with the input signal.Hence the topology is voltage series feedback.\")\nprint(\"The open loop voltage gain for one stage is given as,\")\nprint(\"Av=gm*Req\")\nreq=(8.0*40.0*1000.0)/((40.0*1000.0)+(8.0*1000.0)+(8.0*40.0))\nprint \"Req(in kohm)=rd||Rd||(Ri1+R2)=\",round(req,2),\"KOhm\"\nav = -5.0*6.62\nprint \"Av=\",round(av,3) #Answer in textbook is wrong\navm = pow(-33.11,3)\nprint \"Av = Overall voltage gain = Avmid^3=\",round(avm,0) #Answer in textbook is wrong\nbeta = -50.0/pow(10,6)\nprint \"beta = Vf/Vo=R1/Rg=R1/R1+R2=\",beta\nd = 1 +((-5.0*pow(10,-5))*-36306.0)\nprint \"D = 1+Av*beta=\",round(d,3)\navf = -36306.0/(2.8153*pow(10,3))\nprint \"Avf = Av/D =\",round(avf,3),\"x 10^3\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Here,output voltage is sampled and fed in series with the input signal.Hence the topology is voltage series feedback.\nThe open loop voltage gain for one stage is given as,\nAv=gm*Req\nReq(in kohm)=rd||Rd||(Ri1+R2)= 6.62 KOhm\nAv= -33.1\nAv = Overall voltage gain = Avmid^3= -36298.0\nbeta = Vf/Vo=R1/Rg=R1/R1+R2= -5e-05\nD = 1+Av*beta= 2.815\nAvf = Av/D = -12.896 x 10^3\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.9 Page No. 3-55", "cell_type": "markdown", "metadata": {}}, {"execution_count": 23, "cell_type": "code", "source": "import math\n\nprint(\"Here,output terminals are Bandground, thus the forward gain is the gain of Q1 and it is,\")\nprint(\"ABN = -33.11\")\nprint(\"However, Q2 and Q3 must be considered as a part of feedback loop\")\nprint(\"Here beta BN = Vf/VB = Vf/Vo*Vo/VC*VC/VB\")\nprint(\"where VB and VC are voltages at point Band C,respectively.\")\nprint(\"Therefore,beta BN = Vf/Vo*Av3*Av2 because Vo/VC = Av3 and VC/VB = Av2\")\nbbn = -(5*pow(10,-5))*pow(33.11,2)\nprint \"Therefore, beta BN = R1/Rg*Av3*Av2 =\",round(bbn,4)\nprint(\"Note that the loop gain beta BN*ABN = A^3Vo*R1/Rg = -1.815 = -A*beta\")\nprint(\"It should be clear tht regardless of where the output terminals are taken,the loop gain is unchanged.\")\navf=-33.11/2.815\nprint \"Therefore, Avf=ABN/1+A*beta=\",round(avf,2)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Here,output terminals are Bandground, thus the forward gain is the gain of Q1 and it is,\nABN = -33.11\nHowever, Q2 and Q3 must be considered as a part of feedback loop\nHere beta BN = Vf/VB = Vf/Vo*Vo/VC*VC/VB\nwhere VB and VC are voltages at point Band C,respectively.\nTherefore,beta BN = Vf/Vo*Av3*Av2 because Vo/VC = Av3 and VC/VB = Av2\nTherefore, beta BN = R1/Rg*Av3*Av2 = -0.0548\nNote that the loop gain beta BN*ABN = A^3Vo*R1/Rg = -1.815 = -A*beta\nIt should be clear tht regardless of where the output terminals are taken,the loop gain is unchanged.\nTherefore, Avf=ABN/1+A*beta= -11.76\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.10 Page No. 3-56", "cell_type": "markdown", "metadata": {}}, {"execution_count": 24, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"By shorting output voltage(Vo=0), feedback voltage Vf becomes zero and hence it is voltage sampling.The feedback voltage is applied in series with the input voltage hence the topology is voltage series feedback.\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output circuit.\")\nprint(\"To find input circuit, set Vo =0 .This places the parallel combination of resistor 10K and 300 ohm at first source.To find output circuit,set Ii = 0.This places the resistor 10K and 300 ohm in series across the output.The resultant circuit is shown in fig.3.54.\")\nprint(\"\")\nprint(\"Step4:Replace FET with its equivalent circuit as shown in fig.3.55.\")\nprint(\"\")\nprint(\"Step5:Find open loop transfer gain.\")\nprint(\"Av = Vo/Vs = Av1*Av2\")\nprint(\"Av2 = u*RL2/RL2+rd\")\nrl2=(10.3*22.0)/(10.3+22.0)\nprint \"where RL2(in kohm)=\",round(rl2,0),\"KOhm\"\nav2=(-50.0*7.0)/17.0\nprint \"Av2 =\",round(av2,2)\nprint(\"Av1 = u*RDeff/rd+RDeff+(1+u)*Rseff\")\nrdeff=(22.0*1000.0)/(22.0+1000.0)\nprint \"RDeff(in kohm) = RD||RG2 = \",round(rdeff,2),\"KOhm\"\nprint(\"Rseff=330||10K\")\nav1=(-50.0*21.53)/(10.0+21.53+(51.0*((0.33*10.0)/(10.0+0.33))))\nprint \"Therefore,Av1=\",round(av1,2)\nav=-20.59*-22.51\nprint \"Overall Av = Av1*Av2=\",round(av,1)\nprint(\"\")\nprint(\"Step6:Calculate beta\")\nbeta=330.0/(330.0+10000.0)\nprint \"beta = Vf/Vo = Rs/Rs+Rf=\",round(beta,4)\nprint(\"\")\nprint(\"Step7:Calculate D,Avf,Rif,Rof\")\nd=1+(0.0319*463.5)\nprint \"D=1+Av*beta=\",round(d,3)\navf=463.5/15.785\nprint \"Avf=Av/D=\",round(avf,2)\nprint(\"Ri = RG = 1Mohm\")\nrif=15.785\nprint \"Rif(in kohm)=Ri*D=\",round(rif,3),\"MOhm\"\nro=(10.0*7.0)/(10.0+7.0)\nprint \"Ro(in kohm)=rd||RL2=\",round(ro,3),\"KOhm\"\nrof=(4.118*pow(10,3))/15.785\nprint \"Rof(in ohm)=Ro/D = \",round(rof,0),\"Ohm\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nBy shorting output voltage(Vo=0), feedback voltage Vf becomes zero and hence it is voltage sampling.The feedback voltage is applied in series with the input voltage hence the topology is voltage series feedback.\n\nStep2 and Step3:Find input and output circuit.\nTo find input circuit, set Vo =0 .This places the parallel combination of resistor 10K and 300 ohm at first source.To find output circuit,set Ii = 0.This places the resistor 10K and 300 ohm in series across the output.The resultant circuit is shown in fig.3.54.\n\nStep4:Replace FET with its equivalent circuit as shown in fig.3.55.\n\nStep5:Find open loop transfer gain.\nAv = Vo/Vs = Av1*Av2\nAv2 = u*RL2/RL2+rd\nwhere RL2(in kohm)= 7.0 KOhm\nAv2 = -20.59\nAv1 = u*RDeff/rd+RDeff+(1+u)*Rseff\nRDeff(in kohm) = RD||RG2 = 21.53 KOhm\nRseff=330||10K\nTherefore,Av1= -22.51\nOverall Av = Av1*Av2= 463.5\n\nStep6:Calculate beta\nbeta = Vf/Vo = Rs/Rs+Rf= 0.0319\n\nStep7:Calculate D,Avf,Rif,Rof\nD=1+Av*beta= 15.786\nAvf=Av/D= 29.36\nRi = RG = 1Mohm\nRif(in kohm)=Ri*D= 15.785 MOhm\nRo(in kohm)=rd||RL2= 4.118 KOhm\nRof(in ohm)=Ro/D = 261.0 Ohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.11 Page No. 3-59", "cell_type": "markdown", "metadata": {}}, {"execution_count": 25, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"The feedback voltage is applied across the resistance Re1 and it is in series with input signal.Hence feedback is voltage series feedback.\")\nprint(\"\")\nprint(\"step2 and Step3:Find input and output circuit.\")\nprint(\"To find input circuit,set Vo=0(connecting C2 to ground),which gives parllel combination of Re with Rf at E1.To find output ciruit, set Ii=0(opening the input node E1 at emitter of Q1),which gives series combination of Rf and Re1 across the output.The resultant circuit is shown in fig.3.57\")\nprint(\"\")\nprint(\"Step4:Find open loop voltage gain(Av)\")\nrl2=(4.7*3.42)/(4.7+3.42)\nprint \"RL2(in kohm) = Rc2||(Rs+R)=\",round(rl2,2),\"KOhm\"\nprint(\"Ai2 = -hfe = -50\")\nprint(\"Ri2 = hie = 1000ohm = 1kohm\")\nav2=-50*1.98\nprint \"Av2 = Ai2*RL2/Ri2=\",av2\nprint(\"Ai1 = -hfe = -50\")\nrl1=((10.0*100.0*22.0*1.0)/((100.0*22.0)+(10.0*22.0)+(10.0*100.0)+(10.0*100.0*22.0)))*pow(10,3)\nprint \"RL1(in ohm)=Rc1||R3||R4||Ri2=\",round(rl1,2),\"Ohm\"\nprint(\"Ri1 = hie+(1+hfe)*Re1eff\")\nre1=1+(51*((3.3*0.12)/(3.42)))\nprint \"where Re1eff(in kohm)= Rs||R =\",round(re1,1),\"KOhm\"\nav1=(-50*865.46)/6900\nprint \"Av1 = Ai1*RL1/Ri1=\",round(av1,2)\nprint(\"The overall voltage gain,\")\nav=-6.27*-99\nprint \"Av=Av1*Av2=\",round(av,2)\nprint(\"\")\nprint(\"Step5:Calculate beta\")\nbeta=120.0/(120.0+3300.0)\nprint \"beta = Vf/Vo = Rs/Rs+R=\",round(beta,3)\nprint(\"\")\nprint(\"Step6: Calculate D,Avf,Rif,Rof and Rof\")\nd=1+(0.035*620.73)\nprint \"D=1+Av*beta=\",round(d,3) ##Round of limit\navf = 620.73/22.725\nprint \"Avf=Av/D=\",round(avf,1)\nrif = 6.9*22.725\nprint \"Rif(in kohm)=Ri1*D = \",round(rif,1),\"KOhm\"\nprint(\"Rof = Ro/D = infinity\")\nrof=(1.98*pow(10,3))/22.725\nprint \"Rof(in ohm)=Ro/D = RL2/D = \",round(rof,2),\"Ohm\" ##Round of limit", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nThe feedback voltage is applied across the resistance Re1 and it is in series with input signal.Hence feedback is voltage series feedback.\n\nstep2 and Step3:Find input and output circuit.\nTo find input circuit,set Vo=0(connecting C2 to ground),which gives parllel combination of Re with Rf at E1.To find output ciruit, set Ii=0(opening the input node E1 at emitter of Q1),which gives series combination of Rf and Re1 across the output.The resultant circuit is shown in fig.3.57\n\nStep4:Find open loop voltage gain(Av)\nRL2(in kohm) = Rc2||(Rs+R)= 1.98 KOhm\nAi2 = -hfe = -50\nRi2 = hie = 1000ohm = 1kohm\nAv2 = Ai2*RL2/Ri2= -99.0\nAi1 = -hfe = -50\nRL1(in ohm)=Rc1||R3||R4||Ri2= 865.46 Ohm\nRi1 = hie+(1+hfe)*Re1eff\nwhere Re1eff(in kohm)= Rs||R = 6.9 KOhm\nAv1 = Ai1*RL1/Ri1= -6.27\nThe overall voltage gain,\nAv=Av1*Av2= 620.73\n\nStep5:Calculate beta\nbeta = Vf/Vo = Rs/Rs+R= 0.035\n\nStep6: Calculate D,Avf,Rif,Rof and Rof\nD=1+Av*beta= 22.726\nAvf=Av/D= 27.3\nRif(in kohm)=Ri1*D = 156.8 KOhm\nRof = Ro/D = infinity\nRof(in ohm)=Ro/D = RL2/D = 87.13 Ohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.12 Page No. 3-61", "cell_type": "markdown", "metadata": {}}, {"execution_count": 26, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"The feebdack is given from emitter of Q2 to the base of Q2.If Io=0 then feedback current through 5K register is zero,hence it is current sampling.As feedback signal is mixed in shunt with input,the amplifier is current shunt feedback amplifier.\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output\")\nprint(\"The input circuit of the amplifier without feedback is obtained by opening the output loop at the emitter of Q2(Io=0).This places R(5K)in series with Re from base to emitter of Q1. The output circuit is found by shorting the input node,i.e. making Vi=0.This places R(5K) in parallel with Re.The resultant equivalent circuit is shown in fig.3.59\")\nprint(\"\")\nprint(\"Step4:Find open circuit transfer gain.\")\nprint(\"AI = Io/Is = Ic/Ib2*Ib2/Ic1*Ic1/Ib1*Ib1/Is\")\nprint(\"We know that Ic2/Ib2 = Ai2 = -hfe = -50 and\")\nprint(\"Ic1/Ib1 = Ai1 = -hfe = 50\")\nprint(\"Ic1/Ib1 = 50\")\nprint(\"Looking at fig.3.59 we can write,\")\nprint(\"Ib2/Ic1 = Rc1/Rc1+Ri2\")\nri2=1.5+(51.0*((5.0*0.5)/(5.5)))\nprint \"where Ri2(in kohm) = hie+(1+hfe)*(Re2||R)=\",round(ri2,4),\"KOhm\"\nx1=-2/(2+24.6818)\nprint \"Ib2/Ic1=\",round(x1,5)\nprint(\"Ib1/Is = R/R+Ri1 where R=Rs||(R+Re2)\")\nr = ((1.0*5.5)/(1.0+5.5))*pow(10,3)\nprint \"Therefore,R(in ohm)=\",round(r,4),\"Ohm\"\nprint(\"and Ri1 = hie+(1+hfe)*Re1 = 16.8kohm\")\nx1=846.1538/(846.1538+(16.8*pow(10,3)))\nprint \"Therefore,Ib1/Is = \",round(x1,5)\nai=50.0*0.07495*50.0*0.04795\nprint \"AI=\",round(ai,4) ##Round of limit\nprint(\"\")\nprint(\"Step5:Calculate beta\")\nbeta=500.0/(500.0+(5.0*pow(10,3)))\nprint \"beta = If/Io = Re2/Re2||R = \",round(beta,4)\nprint(\"\")\nprint(\"Step6:Calculate D,AIf\")\nd=1+(0.0909*8.9848)\nprint \"D = 1+AI*beta = \",round(d,4) ##Round of limit\naif = 8.9848/1.8168\nprint \"AIf = AI/D = \",round(aif,4)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nThe feebdack is given from emitter of Q2 to the base of Q2.If Io=0 then feedback current through 5K register is zero,hence it is current sampling.As feedback signal is mixed in shunt with input,the amplifier is current shunt feedback amplifier.\n\nStep2 and Step3:Find input and output\nThe input circuit of the amplifier without feedback is obtained by opening the output loop at the emitter of Q2(Io=0).This places R(5K)in series with Re from base to emitter of Q1. The output circuit is found by shorting the input node,i.e. making Vi=0.This places R(5K) in parallel with Re.The resultant equivalent circuit is shown in fig.3.59\n\nStep4:Find open circuit transfer gain.\nAI = Io/Is = Ic/Ib2*Ib2/Ic1*Ic1/Ib1*Ib1/Is\nWe know that Ic2/Ib2 = Ai2 = -hfe = -50 and\nIc1/Ib1 = Ai1 = -hfe = 50\nIc1/Ib1 = 50\nLooking at fig.3.59 we can write,\nIb2/Ic1 = Rc1/Rc1+Ri2\nwhere Ri2(in kohm) = hie+(1+hfe)*(Re2||R)= 24.6818 KOhm\nIb2/Ic1= -0.07496\nIb1/Is = R/R+Ri1 where R=Rs||(R+Re2)\nTherefore,R(in ohm)= 846.1538 Ohm\nand Ri1 = hie+(1+hfe)*Re1 = 16.8kohm\nTherefore,Ib1/Is = 0.04795\nAI= 8.9846\n\nStep5:Calculate beta\nbeta = If/Io = Re2/Re2||R = 0.0909\n\nStep6:Calculate D,AIf\nD = 1+AI*beta = 1.8167\nAIf = AI/D = 4.9454\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.13 Page No. 3-63 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 27, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"The feedback voltage is applied across R1(150ohm),which is in series with input signal.Hence feedback is voltage series feedback.\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output circuit\")\nprint(\"To find input circuit,set Vo=0,which gives parallel combination of R1 with R2 at E1 as shown in the fig.3.61.To find output circuit,set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of R2 and R1 across the output.The resultant circuit is shown in fig.3.61.\")\nprint(\"\")\nprint(\"Step4:Find the open loop voltage gain(Av)\")\nrl2=(4.7*15.15)/(4.7+15.15)\nprint \"RL2(in kohm)=\",round(rl2,2),\"KOhm\"\nprint(\"Since hoe = hre = 0,we can use approximate analysis.\")\nprint(\"Ai2 = -hfe = -500\")\nprint(\"Ri2 = hie = 1100ohm\")\nav2=(-500.0*3.59*pow(10,3))/1100.0\nprint \"Av2 = Ai2*RL2/Ri2 = \",round(av2,0)\nrl1=((10*47*33*1.1)/((47*33*1.1)+(10*33*1.1)+(10*47*1.1)+(10*47*33)))*pow(10,3)\nprint \"RL1(in ohm) = 10K||47K||33K||Ri2 = \",round(rl1,0),\"Ohm\" ##Round of limit\nprint(\"Ai1 = -hfe = -500\")\nri1=1.1+(501.0*((0.15*15.0)/(0.15+15.0)))\nprint \"Ri1(in kohm)=hie+(1+hfe)*Re=\",round(ri1,1),\"KOhm\"\nav1=(-500.0*942.0)/(75.5*pow(10,3))\nprint \"Av1 = Ai1*RL1/Ri1 = \",round(av1,3)\nav=-6.238*-1632\nprint \"Av = Av1*Av2 = \",round(av,0)\nprint(\"\")\nprint(\"Step5:Calculate beta and D\")\nbeta=150.0/(150.0+15000.0)\nprint \"beta = R1/R1+R2 =\",round(beta,4)\nd=1+(10180*0.0099)\nprint \"D = 1+A*beta = \",round(d,3)\nprint(\"\")\nprint(\"Step6:Calculate Avf,Rof and Rif\")\navf=10180.0/101.782\nprint \"Avf = Av/D = \",round(avf,0)\nrif=75.5*101.782*pow(10,-3)\nprint \"Rif(in Mohm) = Ri1*D = \",round(rif,3),\"MOhm\"\nrof=(3.59*pow(10,3))/101.782\nprint \"Rof(in ohm) = Ro/D = RL2/D = \",round(rof,2),\"Ohm\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nThe feedback voltage is applied across R1(150ohm),which is in series with input signal.Hence feedback is voltage series feedback.\n\nStep2 and Step3:Find input and output circuit\nTo find input circuit,set Vo=0,which gives parallel combination of R1 with R2 at E1 as shown in the fig.3.61.To find output circuit,set Ii=0 by opening the input node,E1 at emitter of Q1,which gives the series combination of R2 and R1 across the output.The resultant circuit is shown in fig.3.61.\n\nStep4:Find the open loop voltage gain(Av)\nRL2(in kohm)= 3.59 KOhm\nSince hoe = hre = 0,we can use approximate analysis.\nAi2 = -hfe = -500\nRi2 = hie = 1100ohm\nAv2 = Ai2*RL2/Ri2 = -1632.0\nRL1(in ohm) = 10K||47K||33K||Ri2 = 943.0 Ohm\nAi1 = -hfe = -500\nRi1(in kohm)=hie+(1+hfe)*Re= 75.5 KOhm\nAv1 = Ai1*RL1/Ri1 = -6.238\nAv = Av1*Av2 = 10180.0\n\nStep5:Calculate beta and D\nbeta = R1/R1+R2 = 0.0099\nD = 1+A*beta = 101.782\n\nStep6:Calculate Avf,Rof and Rif\nAvf = Av/D = 100.0\nRif(in Mohm) = Ri1*D = 7.685 MOhm\nRof(in ohm) = Ro/D = RL2/D = 35.27 Ohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.14 Page No. 3-65 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 28, "cell_type": "code", "source": "import math\n\nprint(\"Given:Avmid = 500,fL = 100kHz,fH = 20kHz and beta = 0.01\")\navf=500/(1+(0.01*500))\nprint \"\\nAvf = Avmid/1+beta*Avmid=\",round(avf,2)\nflf = 100/(1+(0.01*500))\nprint \"\\nfLf(in Hz)=fL/1+beta*Avmid=\",round(flf,2),\"Hz\"\nfhf = 20*(1+(0.01*500))\nprint \"\\nfHf(in kHz)=fH*(1+beta*Avmid)=\",round(fhf,0),\"KHz\"\nbw = 120.0-0.01667\nprint \"\\nBWf(in kHz)=fHf - fLf=\",round(bw,4),\"KHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Given:Avmid = 500,fL = 100kHz,fH = 20kHz and beta = 0.01\n\nAvf = Avmid/1+beta*Avmid= 83.33\n\nfLf(in Hz)=fL/1+beta*Avmid= 16.67 Hz\n\nfHf(in kHz)=fH*(1+beta*Avmid)= 120.0 KHz\n\nBWf(in kHz)=fHf - fLf= 119.9833 KHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.15 Page No. 3-66 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 29, "cell_type": "code", "source": "import math\n\nprint(\"Step1:Identify topology\")\nprint(\"By shorting output(Vo=0),feedback voltage doesnot become zero.By opening the output loop feedback becomes zero and hence it is current sampling.The feedback is applied in series with the input signal,hence topology used is current series feedback.\")\nprint(\"\")\nprint(\"Step2 and Step3:Find input and output circuit.\")\nprint(\"To find input circuit,set Io=0.This places Re in series with input.To find output circuit Ii=0.This places Re in outputs. The resultant circuit is shown in fig.3.63.\")\nprint(\"\")\nprint(\"Step4:Replace transistor with its h parameter equivalent as shown in fig.3.64.\")\nprint(\"\")\nprint(\"Step5:Find open loop transfer gain.\")\nprint(\"From equation(5) of section 3.9.1 we have\")\nprint(\"Avf = Io*RL/Vs = GMf*RL = hfe*RL/Rs+hie+(1+hfe)*Re\")\nprint(\"Here Rs=Rs||R1||R2 = Rs||Rb because Rb=R1||R2\")\nprint(\"Therefore, Vo/Vs = Vo/Vi*Vi/Vs\")\nprint(\"where Vi/Vs = Rb/Rs+Rb\")\nprint(\"Therefore, Vo/Vs=(hfe*RL/Rs+hie+(1+hfe)*Re)*(Rb/Rs+Rb)\")\nprint(\"Dividing both numerator and denominator by Rs+Rb we get,\")\nprint(\"Avf = Vo/Vs = [hfe*Rc*(Rb/Rb+Rs)]/Rs+hie+(1+hfe)*Re because RL=Rc =hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Step1:Identify topology\nBy shorting output(Vo=0),feedback voltage doesnot become zero.By opening the output loop feedback becomes zero and hence it is current sampling.The feedback is applied in series with the input signal,hence topology used is current series feedback.\n\nStep2 and Step3:Find input and output circuit.\nTo find input circuit,set Io=0.This places Re in series with input.To find output circuit Ii=0.This places Re in outputs. The resultant circuit is shown in fig.3.63.\n\nStep4:Replace transistor with its h parameter equivalent as shown in fig.3.64.\n\nStep5:Find open loop transfer gain.\nFrom equation(5) of section 3.9.1 we have\nAvf = Io*RL/Vs = GMf*RL = hfe*RL/Rs+hie+(1+hfe)*Re\nHere Rs=Rs||R1||R2 = Rs||Rb because Rb=R1||R2\nTherefore, Vo/Vs = Vo/Vi*Vi/Vs\nwhere Vi/Vs = Rb/Rs+Rb\nTherefore, Vo/Vs=(hfe*RL/Rs+hie+(1+hfe)*Re)*(Rb/Rs+Rb)\nDividing both numerator and denominator by Rs+Rb we get,\nAvf = Vo/Vs = [hfe*Rc*(Rb/Rb+Rs)]/Rs+hie+(1+hfe)*Re because RL=Rc =hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.16 Page No. 3-68 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 30, "cell_type": "code", "source": "import math\n\nprint(\"Refer example 3.15\")\nprint(\"Avf = hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re where Rs=Rs||R1||R2\")\navf=(-50.0*(1.8*pow(10,3))*(1.0/(1.0+(1000.0/4272.0))))/(810.0+1000.0+((1.0+50.0)*1000.0))\nprint \"Avf =\",round(avf,2)\nprint \"GMf = Avf/RL = -1.38/1.8 = -7.66 x 10^-4\"\nprint(\"beta = Vf/Io = Ie*Re/Io = -Io*Re/Io = -Re = -1K\")\nprint(\"GMf = GM/1+beta*GM = 1/((1/(-7.66*10^-4))+1000)\")\nprint \"Therefore, GM = -3.2735 x 10^-3\"\nd=1+(-1000*-3.2735*pow(10,-3))\nprint \"D = 1+GM*beta = \",round(d,4)\nri=(1+1.36)\nprint \"Ri(in kohm) = Rs+(hie+Re)||RD = \",round(ri,2),\"KOhm\"\nrif=2.36*4.2735\nprint \"Rif(in kohm) = Ri*D = \",round(rif,0),\"KOhm\"\nprint(\"Ro = infinity\")\nprint(\"Rof = Ro*D = infinity\")\nprint(\"Rof = Rof||RL = RL = 1.8kohm\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Refer example 3.15\nAvf = hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re where Rs=Rs||R1||R2\nAvf = -1.38\nGMf = Avf/RL = -1.38/1.8 = -7.66 x 10^-4\nbeta = Vf/Io = Ie*Re/Io = -Io*Re/Io = -Re = -1K\nGMf = GM/1+beta*GM = 1/((1/(-7.66*10^-4))+1000)\nTherefore, GM = -3.2735 x 10^-3\nD = 1+GM*beta = 4.2735\nRi(in kohm) = Rs+(hie+Re)||RD = 2.36 KOhm\nRif(in kohm) = Ri*D = 10.0 KOhm\nRo = infinity\nRof = Ro*D = infinity\nRof = Rof||RL = RL = 1.8kohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.17 Page No. 3-69", "cell_type": "markdown", "metadata": {}}, {"execution_count": 31, "cell_type": "code", "source": "import math\n\nprint(\"Refer example 3.15\")\nprint(\"Avf = hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re where Rs=Rs||R1||R2\")\navf=(-50.0*(4.0*pow(10,3))*(1.0/(1.0+(1000.0/9000.0))))/(900.0+1000.0+((1.0+150.0)*1000.0))\nprint \"Avf=\",round(avf,3)\nprint \"GMf = Avf/RL = -1.177/(4*10^3) = -2.943 x 10^-4\"\nprint(\"beta = Vf/Io = Ie*Re/Io = -Io*Re/Io = -Re = -1K\")\nprint(\"GMf = GM/1+beta*GM\")\nprint \"Therefore, GM = 1/((1/(-2.943*pow(10,-4)))+1000) = -4.17 x 10^-4\"\nd=1+(-1000*-4.17*pow(10,-4))\nprint \"D = 1+GM*beta = \",round(d,3)\nri=1.0+((2.0*9.0)/(2.0+9.0))\nprint \"Ri(in kohm) = Rs+(hie+Re)||RD=\",round(ri,3),\"KOhm\"\nrif=2.636*1.417\nprint \"Rif(in kohm) = Ri*D = \",round(rif,3),\"KOhm\"\nprint(\"Ro = infinity\")\nprint(\"Rof = Ro*D = infinity\")\nprint(\"Rof = Rof||RL = RL = 4 kohm\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Refer example 3.15\nAvf = hfe*Rc*[1/1+(Rs/Rb)]/Rs+hie+(1+hfe)*Re where Rs=Rs||R1||R2\nAvf= -1.177\nGMf = Avf/RL = -1.177/(4*10^3) = -2.943 x 10^-4\nbeta = Vf/Io = Ie*Re/Io = -Io*Re/Io = -Re = -1K\nGMf = GM/1+beta*GM\nTherefore, GM = 1/((1/(-2.943*pow(10,-4)))+1000) = -4.17 x 10^-4\nD = 1+GM*beta = 1.417\nRi(in kohm) = Rs+(hie+Re)||RD= 2.636 KOhm\nRif(in kohm) = Ri*D = 3.735 KOhm\nRo = infinity\nRof = Ro*D = infinity\nRof = Rof||RL = RL = 4 kohm\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.18 Page No. 3-71 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 32, "cell_type": "code", "source": "import math\n\nprint (\"Given: Avmid = 40, fL = 100Hz, fH = 15kHz and beta = 0.01\")\navf = 400/(1+(0.01*400))\nprint \"\\nAvf = Avmid/1+beta*Avmid =\",round(avf,0)\nflf = 100/(1+(0.01*400))\nprint \"\\nfLf = fL/1+beta*Avmid =\",round(flf,0)\nfhf = (15)*(1+(0.01*400))\nprint \"\\nfHf(in kHz) = fH*(1+beta*Avmid) =\",round(fhf,0),\"KHz\"\nbw = 75 - 0.02 \nprint \"\\nBWf(in kHz) = fHf - fLf =\",round(bw,2),\"KHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Given: Avmid = 40, fL = 100Hz, fH = 15kHz and beta = 0.01\n\nAvf = Avmid/1+beta*Avmid = 80.0\n\nfLf = fL/1+beta*Avmid = 20.0\n\nfHf(in kHz) = fH*(1+beta*Avmid) = 75.0 KHz\n\nBWf(in kHz) = fHf - fLf = 74.98 KHz\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 3.19 Page No. 3-71", "cell_type": "markdown", "metadata": {}}, {"execution_count": 33, "cell_type": "code", "source": "import math\n\nprint(\"Given: Av=10, BW=1*10^3, n=3\")\nprint(\"\\n(i)Overall voltage gain\")\nprint(\"The gain of cascaded amplifier without feedback=10*10*10 = 1000\")\navf = 1000.0/(1+(0.1*1000.0))\nprint \"Avf = Av/1+Av*beta=\",round(avf,1)\nprint(\"\\n(ii)Bandwidth of cascaded stage\")\nprint(\"Bandwidth of cascaded amplifier without feedback\")\nbw=((1.0*pow(10,6))*(math.sqrt(pow(2.0,0.333)-1)))*pow(10,-3) ## Complier to Complier differnce in calculations\nprint \"BW(cascade)(in kHz) = BW*sqrt(2^(1/n)1)=\",round(bw,2),\"KHz\"\nbwf=(509.82*pow(10,3)*(1+(0.1*1000)))*pow(10,-6)\nprint \"BWf(in MHz) = BW*(1+beta*Avmid)=\",round(bwf,2),\"KHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Given: Av=10, BW=1*10^3, n=3\n\n(i)Overall voltage gain\nThe gain of cascaded amplifier without feedback=10*10*10 = 1000\nAvf = Av/1+Av*beta= 9.9\n\n(ii)Bandwidth of cascaded stage\nBandwidth of cascaded amplifier without feedback\nBW(cascade)(in kHz) = BW*sqrt(2^(1/n)1)= 509.54 KHz\nBWf(in MHz) = BW*(1+beta*Avmid)= 51.49 KHz\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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter4_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter4_1.ipynb new file mode 100755 index 00000000..5b245fd7 --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter4_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 4", "cell_type": "markdown", "metadata": {}}, {"source": "# Oscillators", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 4.1 Page No. 4-16 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "import math\n\nprint(\"Refering to equation(1),\")\nri=(25.0*57.0*1.8)/((57.0*1.8)+(25.0*1.8)+(25.0*57.0))\nprint \"R\u2019\u2019i(in kohm)=R1||R2||hie=\",round(ri,3),\"KOhm\"\nprint(\"Now R\u2019\u2019i+R3=R\")\nr3=7.1-1.631\nprint \"Therefore, R3(in kohm)=R\u2212R\u2019\u2019i=\",round(r3,2),\"KOhm\"\nk=20/7.1\nprint \"K =RC/R =\",round(k,3)\nprint(\"Now f =1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\")\nc = (1.0/(math.sqrt(6.0+(4.0*2.816))*2.0*(math.pi)*7.1*10.0*pow(10,6)))*pow(10,12)\nprint \"Therefore, C (in pF)=\",round(c,2),\"pF\" #C= 539.45 ~= 539.5pF\nprint(\"hfe >= 4K+23+29/K\")\nhfe=(4*2.816)+23+(29/2.816)\nprint \"hfe >= \",round(hfe,3)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Refering to equation(1),\nR\u2019\u2019i(in kohm)=R1||R2||hie= 1.631 KOhm\nNow R\u2019\u2019i+R3=R\nTherefore, R3(in kohm)=R\u2212R\u2019\u2019i= 5.47 KOhm\nK =RC/R = 2.817\nNow f =1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\nTherefore, C (in pF)= 539.5 pF\nhfe >= 4K+23+29/K\nhfe >= 44.562\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.2 Page No. 4-17", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "import math\n\nprint(\"The given values are, R = 4.7kohm and C = 0.47uF\")\nf=1.0/(2.0*math.pi*math.sqrt(6)*(4.7*pow(10,3))*(0.47*pow(10,-6)))\nprint \"f(in Hz) =1/2\u2217pi\u2217sqrt(6)\u2217R\u2217C =\",round(f,3),\"Hz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The given values are, R = 4.7kohm and C = 0.47uF\nf(in Hz) =1/2\u2217pi\u2217sqrt(6)\u2217R\u2217C = 29.414 Hz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.3 Page No. 4-17", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "import math\n\nprint(\"f=1kHz\")\nprint(\"Now f=1/2\u2217pi\u2217sqrt(6)\u2217R\u2217C\")\nprint(\"Choose C=0.1uF\")\nr=1.0/(math.sqrt(6)*2.0*math.pi*0.1*1.0*pow(10,-3))\nprint \"Therefore,R(in ohm)=\",round(r,3),\"Ohm\"\nprint(\"Choose R = 680ohm standard value\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "f=1kHz\nNow f=1/2\u2217pi\u2217sqrt(6)\u2217R\u2217C\nChoose C=0.1uF\nTherefore,R(in ohm)= 649.747 Ohm\nChoose R = 680ohm standard value\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.4 Page No. 4-19", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "import math\n\nprint(\"Using the expression for the frequency\")\nprint(\"Now,f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6)\")\nf=(1/(math.sqrt(6)*2*math.pi*9.7*5*pow(10,6)))*pow(10,9)\nprint \"Therefore,C(in nF)=\",round(f,2),\"nF\"\nprint(\"Now using the equation(27)\")\nprint(\"|A|=gm\u2217RL\")\nprint(\"Therefore,|A|>=29\")\nprint(\"Therefore,gm\u2217RL>=29\")\nrl=(29.0/(5000))*pow(10,3)\nprint \"Therefore,RL(in kohm) >= 29/gm >=\",round(rl,1),\"KOhm\"\nprint(\"RL=RD\u2217rd/RD+rd\")\nrd=(40.0)/4.8823\nprint\"Therefore,RD(in kohm)=\",round(rd,2),\"KOhm\" ##Answer in textbook is wrong \nprint(\"While for minimum value of RL = 5.8kohm\")\nprint(\"RD = 6.78 kohm\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Using the expression for the frequency\nNow,f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6)\nTherefore,C(in nF)= 1.34 nF\nNow using the equation(27)\n|A|=gm\u2217RL\nTherefore,|A|>=29\nTherefore,gm\u2217RL>=29\nTherefore,RL(in kohm) >= 29/gm >= 5.8 KOhm\nRL=RD\u2217rd/RD+rd\nTherefore,RD(in kohm)= 8.19 KOhm\nWhile for minimum value of RL = 5.8kohm\nRD = 6.78 kohm\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.5 Page No. 4-26", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "import math\n\nprint(\"The frequency of the oscillator is given by,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(R1\u2217R2\u2217C1\u2217C2)\")\nprint(\"For f=10kHz,\")\nr2=(1/(4*(pow(math.pi,2))*(100*pow(10,6))*(10*pow(10,3))*(0.001*pow(10,-12))))\nprint \"Therefore,R2(in kohm)=\",round(r2,2),\"KOhm\"\nprint(\"For f=50kHz,\")\nr2=(1/(4*(pow(math.pi,2))*(2500*pow(10,6))*(10*pow(10,3))*(0.001*pow(10,-12))))\nprint \"Therefore,R2(in kohm)=\",round(r2,3),\"KOhm\"\nprint(\"So minimum value of R2 is 1.013kohm while the maximum value of R2 is 25.33kohm\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The frequency of the oscillator is given by,\nf=1/2\u2217pi\u2217sqrt(R1\u2217R2\u2217C1\u2217C2)\nFor f=10kHz,\nTherefore,R2(in kohm)= 25.33 KOhm\nFor f=50kHz,\nTherefore,R2(in kohm)= 1.013 KOhm\nSo minimum value of R2 is 1.013kohm while the maximum value of R2 is 25.33kohm\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.6 Page No. 4-38 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "import math\n\nprint(\"The frequency is given by,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(C\u2217Leq)\")\nleq=(2*pow(10,-3))+(20*pow(10,-6))\nprint \"where Leq=L1+L2=\",round(leq,6)\nprint(\"For f = fmax = 2050 kHz\")\nc=(1/(4*(pow(math.pi,2))*(pow((2050*pow(10,3)),2))*0.00202))*pow(10,12)\nprint \"Therefore,C(in pF)=\",round(c,2),\"pF\"\nprint(\"For f = fmin = 950 kHz\")\nc=(1/(4*(pow(math.pi,2))*(pow((950*pow(10,3)),2))*0.00202))*pow(10,12)\nprint \"Therefore,C(inpF)=\",round(c,2),\"pF\"\nprint(\"Hence C must be varied from 2.98pF to 13.89pF,to get the required frequency variation.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The frequency is given by,\nf=1/2\u2217pi\u2217sqrt(C\u2217Leq)\nwhere Leq=L1+L2= 0.00202\nFor f = fmax = 2050 kHz\nTherefore,C(in pF)= 2.98 pF\nFor f = fmin = 950 kHz\nTherefore,C(inpF)= 13.89 pF\nHence C must be varied from 2.98pF to 13.89pF,to get the required frequency variation.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.7 Page No. 4-40 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "import math\n\nprint(\"The given values are,\")\nprint(\"L1=0.5mH, L2=1mH, C=0.2uF\")\nprint(\"Now f=1/2\u2217pi\u2217sqrt(C\u2217Leq)\")\nleq=0.5+1.0\nprint \"and Leq(in mH)=L1+L2=\",round(leq,1),\"mH\"\nf=(1/(2*math.pi*math.sqrt(1.5*0.2*pow(10,-9))))*pow(10,-3)\nprint \"Therefore,f(in kHz)=\",round(f,2),\"KHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The given values are,\nL1=0.5mH, L2=1mH, C=0.2uF\nNow f=1/2\u2217pi\u2217sqrt(C\u2217Leq)\nand Leq(in mH)=L1+L2= 1.5 mH\nTherefore,f(in kHz)= 9.19 KHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.8 Page No. 4-45", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "import math\n\nprint(\"The equivalent capacitance is given by,\")\nceq=((150*1.5*pow(10,-21))/((150*pow(10,-12))+(1.5*pow(10,-9))))*pow(10,12)\nprint \"Ceq(in F)=C1\u2217C2/C1+C2=\",round(ceq,3),\"x 10^-12 F\"\nprint(\"Now,f = 1/2\u2217pi\u2217sqrt(L\u2217Ceq)\")\nf=(1/(2*math.pi*math.sqrt(50*136.363*pow(10,-18))))*pow(10,-6)\nprint \"f(in MHz)=\",round(f,3),\"MHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The equivalent capacitance is given by,\nCeq(in F)=C1\u2217C2/C1+C2= 136.364 x 10^-12 F\nNow,f = 1/2\u2217pi\u2217sqrt(L\u2217Ceq)\nf(in MHz)= 1.927 MHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.9 Page No. 4-45", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "import math\n\nprint(\"The given values are,\")\nprint(\"L=100uH, C1=C2=C and f=500kHz\")\nprint(\"Now,f=1/2\u2217pi\u2217sqrt(L\u2217Ceq)\")\nceq=(1/(4*(pow(math.pi,2))*(100*pow(10,-6))*(pow((500*pow(10,3)),2))))*pow(10,9)\nprint \"Therefore,Ceq(in F)=\",round(ceq,4),\"x10^-9 F\"\nprint(\"but Ceq =C1\u2217C2/C1+C2 and C1=C2=C\")\nprint(\"Therefore,Ceq=C/2\")\nc=1.0132*2.0\nprint \"Therefore,C(in nF)=\",round(c,3),\"nF\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The given values are,\nL=100uH, C1=C2=C and f=500kHz\nNow,f=1/2\u2217pi\u2217sqrt(L\u2217Ceq)\nTherefore,Ceq(in F)= 1.0132 x10^-9 F\nbut Ceq =C1\u2217C2/C1+C2 and C1=C2=C\nTherefore,Ceq=C/2\nTherefore,C(in nF)= 2.026 nF\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.10 Page No. 4-58", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "import math\n\nfs=(1.0/(2.0*math.pi*math.sqrt(0.4*0.085*pow(10,-12))))*pow(10,-6) ##Sqrt --> Complier to Complier differnce \nprint \"(i)fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)=\",round(fs,3),\"MHz\"\nceq=0.085/1.085\nprint \"(ii)Ceq(in pF)=C\u2217CM/C+CM=\",round(ceq,3),\"pF\"\nfp=(1.0/(2.0*math.pi*math.sqrt(0.4*0.078*pow(10,-12))))*pow(10,-6) ##Sqrt --> Complier to Complier differnce\nprint \"Therefore,fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(fp,3),\"MHz\"\ninc=((0.899-0.856)/0.856)*100\nprint \"(iii)%increase=\",round(inc,3),\"%\"\nq=(2*math.pi*0.4*0.856*pow(10,6))/(5*pow(10,3))\nprint \"(iv)Q=omegas\u2217L/R=2\u2217pi\u2217fs\u2217L/R=\",round(q,3)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "(i)fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)= 0.863 MHz\n(ii)Ceq(in pF)=C\u2217CM/C+CM= 0.078 pF\nTherefore,fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 0.901 MHz\n(iii)%increase= 5.023 %\n(iv)Q=omegas\u2217L/R=2\u2217pi\u2217fs\u2217L/R= 430.273\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.11 Page No. 4-58", "cell_type": "markdown", "metadata": {}}, {"execution_count": 13, "cell_type": "code", "source": "import math\n\nprint(\"CM=2pF\")\nfs=(1/(2*math.pi*math.sqrt(2*0.01*pow(10,-12))))*pow(10,-6)\nprint \"Now fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)=\",round(fs,3),\"MHz\"\nprint \"Ceq(in F)=CM\u2217C/CM+C = (2*0.01*10^-24))/(2.01*10^-12)) = 9.95x10^-15\",\"F\"\nfp=(1/(2*math.pi*math.sqrt(2*9.95*pow(10,-15))))*pow(10,-6)\nprint \"fp=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(fp,3),\"MHz\"\nprint(\"S of s and fp values are almost same.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "CM=2pF\nNow fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)= 1.125 MHz\nCeq(in F)=CM\u2217C/CM+C = (2*0.01*10^-24))/(2.01*10^-12)) = 9.95x10^-15 F\nfp=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 1.128 MHz\nS of s and fp values are almost same.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.12 Page No. 4-59", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "import math\n\nprint(\"From the given information we can write,\")\nprint(\"A = \u221216\u221710\u02c66/j\u2217omegaandbeta=10\u02c63/[2\u221710\u02c63+j\u2217omega]\u02c62\")\nprint(\"To verify the Barkhausen condition means to verify whether|A\u2217beta|=1 at a frequency for which A\u2217beta=0 degree.Let us express,A\u2217beta in its rectangluar form.\")\nprint(\"A\u2217beta=\u221216\u221710\u02c66\u221710\u02c63/j\u2217omega\u2217[2\u221710\u02c63+j\u2217omega]\u02c62=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66+4\u221710\u02c63\u2217j\u2217omega+(j\u2217omega)\u02c62]\")\nprint(\"=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66+4\u221710\u02c63\u2217j\u2217omega\u2212omega\u02c62] as j\u22172=\u22121\")\nprint(\"=\u221216\u221710\u02c69/4\u221710\u02c66\u2217j\u2217omega+4\u221710\u02c63\u2217j\u02c62\u2217omega\u02c62\u2212j\u2217omega\u02c63]\")\nprint(\"=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]\u2212[omega\u02c62\u22174\u221710\u02c63]\")\nprint(\"Rationalising the denominator function we get,\")\nprint(\"A\u2217beta=\u221216\u221710\u02c69[\u2212omega\u02c62\u22174\u221710\u02c63\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/[\u2212[omega\u02c62\u22174\u221710\u02c63]\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]\u2217[\u2212omega\u02c62\u22174\u221710\u02c63\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]\")\nprint(\"Using (a\u2212b)(a+b)=a\u02c62\u2212b\u02c62 in the denominator,\")\nprint(\"A\u2217beta=16\u221710\u02c69[omega\u02c62\u22174\u221710\u02c63+j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/[\u2212omega\u02c62\u22174\u221710\u02c63]\u02c62\u2212[j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]\u02c62\")\nprint(\"A\u2217beta=16\u221710\u02c69[omega\u02c62\u22174\u221710\u02c63+j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/16\u221710\u02c66\u2217omega\u02c64+omega\u02c62(4\u221710\u02c66\u2212omega\u02c62)\u02c62\")\nprint(\"Now to have A\u2217beta=0degree,the imaginary part of A\u2217beta must be zero.This is possible when,\")\nprint(\"Therefore,omega\u2217(4\u221710\u02c66\u2212omega\u02c62)=0\")\nprint(\"Therefore,omega=0 or 4\u221710\u02c66\u2212omega\u02c62=0\")\nprint(\"Therefore,omega\u02c62=4\u221710\u02c66 Neglecting zero value of frequency\")\nprint(\"Therefore,omega=2\u221710\u02c63rad/sec\")\nprint(\"At this frequency |A\u2217beta| can be obtained as,\")\nprint(\"|A\u2217beta| = 16\u221710\u02c69[4\u221710\u02c63\u2217omega\u02c62]/16\u221710\u02c66\u2217omega\u02c64+omega\u02c62[4\u221710\u02c66\u2212omega\u02c62]\u02c62atomega=2\u221710\u02c63\")\nab=(2.56*pow(10,20))/(2.56*pow(10,20))\nprint \"|A\u2217beta|=\",round(ab,1)\nprint(\"Therefore,At omega=2\u221710\u02c63rad/sec,A\u2217beta = 0 degree as imaginary part is zero while |A\u2217beta|=1.Thus Barkhausen Criterion is satisfied.\")\nprint(\"The frequency at which circuit will oscillate is the value of omega for which|A\u2217beta| = 1 and A\u2217beta=0 degree at the same time\")\nprint(\"i.e.omega=2\u221710\u02c63rad/sec\")\nprint(\"But omega=2\u2217pi\u2217f\")\nf=(2.0*pow(10,3))/(2.0*math.pi)\nprint \"Therefore,f(in Hz)=omega/2pi=\",round(f,3),\"Hz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "From the given information we can write,\nA = \u221216\u221710\u02c66/j\u2217omegaandbeta=10\u02c63/[2\u221710\u02c63+j\u2217omega]\u02c62\nTo verify the Barkhausen condition means to verify whether|A\u2217beta|=1 at a frequency for which A\u2217beta=0 degree.Let us express,A\u2217beta in its rectangluar form.\nA\u2217beta=\u221216\u221710\u02c66\u221710\u02c63/j\u2217omega\u2217[2\u221710\u02c63+j\u2217omega]\u02c62=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66+4\u221710\u02c63\u2217j\u2217omega+(j\u2217omega)\u02c62]\n=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66+4\u221710\u02c63\u2217j\u2217omega\u2212omega\u02c62] as j\u22172=\u22121\n=\u221216\u221710\u02c69/4\u221710\u02c66\u2217j\u2217omega+4\u221710\u02c63\u2217j\u02c62\u2217omega\u02c62\u2212j\u2217omega\u02c63]\n=\u221216\u221710\u02c69/j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]\u2212[omega\u02c62\u22174\u221710\u02c63]\nRationalising the denominator function we get,\nA\u2217beta=\u221216\u221710\u02c69[\u2212omega\u02c62\u22174\u221710\u02c63\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/[\u2212[omega\u02c62\u22174\u221710\u02c63]\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]\u2217[\u2212omega\u02c62\u22174\u221710\u02c63\u2212j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]\nUsing (a\u2212b)(a+b)=a\u02c62\u2212b\u02c62 in the denominator,\nA\u2217beta=16\u221710\u02c69[omega\u02c62\u22174\u221710\u02c63+j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/[\u2212omega\u02c62\u22174\u221710\u02c63]\u02c62\u2212[j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]\u02c62\nA\u2217beta=16\u221710\u02c69[omega\u02c62\u22174\u221710\u02c63+j\u2217omega\u2217[4\u221710\u02c66\u2212omega\u02c62]]/16\u221710\u02c66\u2217omega\u02c64+omega\u02c62(4\u221710\u02c66\u2212omega\u02c62)\u02c62\nNow to have A\u2217beta=0degree,the imaginary part of A\u2217beta must be zero.This is possible when,\nTherefore,omega\u2217(4\u221710\u02c66\u2212omega\u02c62)=0\nTherefore,omega=0 or 4\u221710\u02c66\u2212omega\u02c62=0\nTherefore,omega\u02c62=4\u221710\u02c66 Neglecting zero value of frequency\nTherefore,omega=2\u221710\u02c63rad/sec\nAt this frequency |A\u2217beta| can be obtained as,\n|A\u2217beta| = 16\u221710\u02c69[4\u221710\u02c63\u2217omega\u02c62]/16\u221710\u02c66\u2217omega\u02c64+omega\u02c62[4\u221710\u02c66\u2212omega\u02c62]\u02c62atomega=2\u221710\u02c63\n|A\u2217beta|= 1.0\nTherefore,At omega=2\u221710\u02c63rad/sec,A\u2217beta = 0 degree as imaginary part is zero while |A\u2217beta|=1.Thus Barkhausen Criterion is satisfied.\nThe frequency at which circuit will oscillate is the value of omega for which|A\u2217beta| = 1 and A\u2217beta=0 degree at the same time\ni.e.omega=2\u221710\u02c63rad/sec\nBut omega=2\u2217pi\u2217f\nTherefore,f(in Hz)=omega/2pi= 318.31 Hz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.13 Page No. 4-60", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "import math\n\nprint(\"The frequency of the oscillator is given by,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(R1\u2217R2\u2217C1\u2217C2)\")\nprint(\"For f=20kHz,\")\nr2=(1/(4*(pow(math.pi,2))*(pow((20*pow(10,3)),2))*(10*pow(10,3))*(pow((0.001*pow(10,-6)),2))))*pow(10,-3)\nprint \"Therefore,R2(in kohm)=\",round(r2,2),\"KOhm\"\nprint(\"For f=70kHz,\")\nr2=(1/(4*(pow(math.pi,2))*(pow((70*pow(10,3)),2))*(10*pow(10,3))*(pow((0.001*pow(10,-6)),2))))*pow(10,-3)\nprint \"Therefore,R2(in kohm)=\",round(r2,3),\"KOhm\"\nprint(\"So minimum value of R2 is 0.517kohm while the maximum value of R2 is 6.33kohm\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The frequency of the oscillator is given by,\nf=1/2\u2217pi\u2217sqrt(R1\u2217R2\u2217C1\u2217C2)\nFor f=20kHz,\nTherefore,R2(in kohm)= 6.33 KOhm\nFor f=70kHz,\nTherefore,R2(in kohm)= 0.517 KOhm\nSo minimum value of R2 is 0.517kohm while the maximum value of R2 is 6.33kohm\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.14 Page No. 4-61", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "import math\n\nprint(\"R=6kohm, C=1500pF, RC=18kohm\")\nk=18/6\nprint \"Now K=RC/R=\",round(k,1)\nprint(\"Therefore,f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\")\nf=(1/(2*math.pi*(6*pow(10,3))*(1500*pow(10,-12))*math.sqrt(6+12)))*pow(10,-3)\nprint \"f(in kHz)=\",round(f,3),\"KHz\"\nhfe=(4.0*3.0)+23.0+(29.0/3.0)\nprint \"(hfe)min =4K+23+29/K=\",round(hfe,2)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "R=6kohm, C=1500pF, RC=18kohm\nNow K=RC/R= 3.0\nTherefore,f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\nf(in kHz)= 4.168 KHz\n(hfe)min =4K+23+29/K= 44.67\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.15 Page No. 4-61", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "import math\n\nprint(\"For a Wien bridge oscillator,\")\nprint(\"f=1/2\u2217pi\u2217R\u2217C\")\nfm=(1/(2*(math.pi)*(100*pow(10,3))*(50*pow(10,-12))))*pow(10,-3)\nprint \"Therefore,fmax(in kHz)=\",round(fm,2),\"KHz\"\nfmi=(1/(2*(math.pi)*(100*pow(10,3))*(500*pow(10,-12))))*pow(10,-3)\nprint \"and fmin(in kHz)=\",round(fmi,3),\"KHz\"\nfn=31.83+50\nprint \"Now fnew(in kHz)=fmax+50\u221710\u02c63=\",round(fn,2),\"KHz\"\nprint(\"The corresponding R=R\u2019\u2019 with an additional resistance Rx in parallel\")\nprint(\"Therefore,f=1/2\u2217pi\u2217R\u2019\u2019\u2217C\")\nr=(1/(2*(math.pi)*(50*pow(10,-12))*(81.83*pow(10,3))))*pow(10,-3)\nprint \"Therefore,R\u2019\u2019(in kohm)=\",round(r,2),\"KOhm\"\nrx=1.0/((1.0/38.89)-(1.0/100.0))\nprint(\"Therefore,R\u2019\u2019 = R\u2217Rx/R+Rx\")\nprint \"Therefore,Rx(in kohm) = in parallel with 100 kohm\",round(rx,2),\"KOhm\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For a Wien bridge oscillator,\nf=1/2\u2217pi\u2217R\u2217C\nTherefore,fmax(in kHz)= 31.83 KHz\nand fmin(in kHz)= 3.183 KHz\nNow fnew(in kHz)=fmax+50\u221710\u02c63= 81.83 KHz\nThe corresponding R=R\u2019\u2019 with an additional resistance Rx in parallel\nTherefore,f=1/2\u2217pi\u2217R\u2019\u2019\u2217C\nTherefore,R\u2019\u2019(in kohm)= 38.9 KOhm\nTherefore,R\u2019\u2019 = R\u2217Rx/R+Rx\nTherefore,Rx(in kohm) = in parallel with 100 kohm 63.64 KOhm\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.16 Page No. 4-62", "cell_type": "markdown", "metadata": {}}, {"execution_count": 18, "cell_type": "code", "source": "import math\n\nprint(\"For a Hartley oscillator the frequency is given by,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(Leq\u2217C)whereLeq=L1+L2\")\nleq=20+5\nprint \"Therefore,Leq(in mH)=20+5=\",round(leq,0),\"mH\"\nf=(1/(2*(math.pi)*math.sqrt(25*500*pow(10,-15))))*pow(10,-3)\nprint \"Therefore,f(in kHz)=\",round(f,2),\"KHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For a Hartley oscillator the frequency is given by,\nf=1/2\u2217pi\u2217sqrt(Leq\u2217C)whereLeq=L1+L2\nTherefore,Leq(in mH)=20+5= 25.0 mH\nTherefore,f(in kHz)= 45.02 KHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.17 Page No. 4-62", "cell_type": "markdown", "metadata": {}}, {"execution_count": 19, "cell_type": "code", "source": "import math\n\nprint(\"For a Hartley oscillator,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(Leq\u2217C) where Leq=L1+L2+2M\")\nleq=(1/(4*(pow((math.pi),2))*(pow((168*pow(10,3)),2))*(50*pow(10,-12))))*pow(10,3)\nprint \"Therefore,Leq(in mH)=\",round(leq,2),\"mH\"\nl2=((17.95*pow(10,-3))-(15*pow(10,-3))-(5*pow(10,-6)))*pow(10,3)\nprint \"Therefore,L2(in mH)=\",round(l2,3),\"mH\"\nhfe=((15*pow(10,-3))+(5*pow(10,-6)))/((2.945*pow(10,-3))+(5*pow(10,-6)))\nprint \"Now hfe=L1+M/L2+M=\",round(hfe,2)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For a Hartley oscillator,\nf=1/2\u2217pi\u2217sqrt(Leq\u2217C) where Leq=L1+L2+2M\nTherefore,Leq(in mH)= 17.95 mH\nTherefore,L2(in mH)= 2.945 mH\nNow hfe=L1+M/L2+M= 5.09\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.18 Page No. 4-63", "cell_type": "markdown", "metadata": {}}, {"execution_count": 20, "cell_type": "code", "source": "import math\n\nprint(\"For a Colpitts oscillator,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(L\u2217Ceq)\")\nprint(\"where Ceq=C1\u2217C2/C1+C2 but C1=C2=0.001uF\")\nceq=(pow((0.001*pow(10,-6)),2))/(2*(0.001*pow(10,-6)))\nprint \"Therefore,Ceq(in F)=\",ceq,\"F\"\nprint(\"L=5\u221710\u02c6\u22126H\")\nf=(1/(2*(math.pi)*math.sqrt(25*pow(10,-16))))*pow(10,-6)\nprint \"Therefore,f(in MHz)=\",round(f,3),\"MHz\"\nprint(\"Now L is doubled i.e. 10uH\")\nf1=(1/(2*(math.pi)*math.sqrt(50*pow(10,-16))))*pow(10,-6) \nprint \"Therefore,f(in MHz)=\",round(f1,2),\"MHz\"\nnf=2*3.183\nprint \"New frequency(in MHz)=2\u22173.183=\",round(nf,3),\"MHz\"\nl=(1/(4*(pow((math.pi),2))*(pow((6.366*pow(10,6)),2))*(5*pow(10,-10))))*pow(10,6)\nprint \"Therefore,L(in uH)=\",round(l,2),\"uH\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For a Colpitts oscillator,\nf=1/2\u2217pi\u2217sqrt(L\u2217Ceq)\nwhere Ceq=C1\u2217C2/C1+C2 but C1=C2=0.001uF\nTherefore,Ceq(in F)= 5e-10 F\nL=5\u221710\u02c6\u22126H\nTherefore,f(in MHz)= 3.183 MHz\nNow L is doubled i.e. 10uH\nTherefore,f(in MHz)= 2.25 MHz\nNew frequency(in MHz)=2\u22173.183= 6.366 MHz\nTherefore,L(in uH)= 1.25 uH\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.19 Page No. 4-64", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "import math\n\nprint(\"For a Clapp oscillator,\")\nprint(\"f=1/2\u2217pi\u2217sqrt(L\u2217C3)\")\nprint(\"where C3=63pF\")\nf=(1/(2*(math.pi)*math.sqrt(315*pow(10,-18))))*pow(10,-6)\nprint \"Therefore,f(in MHz)=\",round(f,3),\"MHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For a Clapp oscillator,\nf=1/2\u2217pi\u2217sqrt(L\u2217C3)\nwhere C3=63pF\nTherefore,f(in MHz)= 8.967 MHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.20 Page No. 4-64", "cell_type": "markdown", "metadata": {}}, {"execution_count": 22, "cell_type": "code", "source": "import math\n\nprint(\"Refering to equation(1) of section4.5.3, the input impedance is given by,\")\nprint(\"R\u2019\u2019i=R1||R2||hie\")\nprint(\"Now R1=25k\u2212ohm,R2=47k\u2212ohm,and hie=2k\u2212ohm\")\nri=(25.0*47.0*2.0)/((47.0*2.0)+(25.0*2.0)+(25.0*47.0))\nprint \"Therefore,R\u2019\u2019i(inkohm)=\",round(ri,4),\"KOhm\"\nprint(\"K=RC/R\")\nprint(\"Now RC=10kohm...given\")\nprint(\"Now f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\")\nprint(\"Therefore,R\u2217sqrt(6+4K)=31830.989\")\nprint(\"Now K=RC/R=10\u221710\u02c63/R\")\nprint(\"Therefore,R\u2217sqrt(6+(40\u221710\u221710\u02c63/R))=31830.989\")\nprint(\"Therefore,R\u02c62\u2217(6+(40\u221710\u221710\u02c63/R))=(31830.989)\u02c62\")\nprint(\"Therefore,R = (-40x10^3 +- sqrt((40x10^3)^2) + 4x6x(31830.989)^2)/(2x6)\")\nprint(\"Therefore R = 16.74 KOhm ...... Neglecting the negative values\") \nk = 10.0/16.74\nprint \"Therefore,K = RC/R = \",round(k,4)\nprint(\"Therefore,hfe >= 4K+23+29/K\")\nhfe=(4.0*0.5973)+23.0+(29.0/0.5973)\nprint \"hfe >=\",round(hfe,2)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Refering to equation(1) of section4.5.3, the input impedance is given by,\nR\u2019\u2019i=R1||R2||hie\nNow R1=25k\u2212ohm,R2=47k\u2212ohm,and hie=2k\u2212ohm\nTherefore,R\u2019\u2019i(inkohm)= 1.7817 KOhm\nK=RC/R\nNow RC=10kohm...given\nNow f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)\nTherefore,R\u2217sqrt(6+4K)=31830.989\nNow K=RC/R=10\u221710\u02c63/R\nTherefore,R\u2217sqrt(6+(40\u221710\u221710\u02c63/R))=31830.989\nTherefore,R\u02c62\u2217(6+(40\u221710\u221710\u02c63/R))=(31830.989)\u02c62\nTherefore,R = (-40x10^3 +- sqrt((40x10^3)^2) + 4x6x(31830.989)^2)/(2x6)\nTherefore R = 16.74 KOhm ...... Neglecting the negative values\nTherefore,K = RC/R = 0.5974\nTherefore,hfe >= 4K+23+29/K\nhfe >= 73.94\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.21 Page No. 4-65", "cell_type": "markdown", "metadata": {}}, {"execution_count": 23, "cell_type": "code", "source": "import math\n\nprint(\"The frequency is given by,\")\nprint(\"f=1/2\u2217pi\u2217R\u2217C\")\nprint(\"Let the resistance value to be selected as,\")\nprint(\"R1=R2=R=50kohm\")\nprint(\"f=1/2\u2217pi\u221750\u221710\u02c63\u2217C\")\nf=(1/(2*(math.pi)*(50*pow(10,3))*100))*pow(10,9)\nprint \"f(in nF)=\",round(f,2),\"nF\"\nprint(\"and fmax=1/2\u2217pi\u221750\u221710\u02c63\u2217C\")\nc=(1/(2*(math.pi)*(50*pow(10,3))*(10*pow(10,3))))*pow(10,9)\nprint \"C(in nF)=\",round(c,3),\"nF\"\nprint(\"Thus to vary the frequency from 100Hz to 10kHz,the capacitor range should be selected as 0.318nF to 31.83nF\")\nprint(\"Similarly keeping the capacitor value constant,the range of the resistance values can be obtained.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The frequency is given by,\nf=1/2\u2217pi\u2217R\u2217C\nLet the resistance value to be selected as,\nR1=R2=R=50kohm\nf=1/2\u2217pi\u221750\u221710\u02c63\u2217C\nf(in nF)= 31.83 nF\nand fmax=1/2\u2217pi\u221750\u221710\u02c63\u2217C\nC(in nF)= 0.318 nF\nThus to vary the frequency from 100Hz to 10kHz,the capacitor range should be selected as 0.318nF to 31.83nF\nSimilarly keeping the capacitor value constant,the range of the resistance values can be obtained.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.22 Page No. 4-66", "cell_type": "markdown", "metadata": {}}, {"execution_count": 24, "cell_type": "code", "source": "import math\n\nprint(\"f=2.5MHz, L=10uH, C1=0.02uF\")\nprint(\"For Colpitts oscillator,the frequency is given by,\")\nprint(\"f=1/2pi\u2217sqrt(L\u2217Ceq)\")\nceq=(1/(4*(pow((math.pi),2))*(pow((2.5*pow(10,6)),2))*(10*pow(10,-6))))*pow(10,12)\nprint \"Therefore,Ceq(in pF)=\",round(ceq,3),\"pF\"\nprint(\"(i)But Ceq=C1\u2217C2/C1+C2\")\nc2=((0.02*pow(10,-6))/49.348)*pow(10,9)\nprint \"Therefore,C2(in nF)=\",round(c2,4),\"nF\"\nprint(\"(ii)L=2\u221710=20uH\")\nprint(\"and Ceq=405.284pF\")\nf=(1/(2*(math.pi)*math.sqrt(20*405.284*pow(10,-18))))*pow(10,-6)\nprint \"f(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(f,4),\"MHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "f=2.5MHz, L=10uH, C1=0.02uF\nFor Colpitts oscillator,the frequency is given by,\nf=1/2pi\u2217sqrt(L\u2217Ceq)\nTherefore,Ceq(in pF)= 405.285 pF\n(i)But Ceq=C1\u2217C2/C1+C2\nTherefore,C2(in nF)= 0.4053 nF\n(ii)L=2\u221710=20uH\nand Ceq=405.284pF\nf(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 1.7678 MHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.23 Page No. 4-67", "cell_type": "markdown", "metadata": {}}, {"execution_count": 25, "cell_type": "code", "source": "import math\n\nf=(1/(2*math.pi*math.sqrt(0.33*0.065*pow(10,-12))))*pow(10,-6)\nprint \"(i)f(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)=\",round(f,3),\"MHz\"\nceq=0.065/1.065\nprint \"(ii)Ceq(in pF)=C\u2217CM/C+CM=\",round(ceq,3),\"pF\"\nfp=(1/(2*(math.pi)*math.sqrt(0.33*0.061*pow(10,-12))))*pow(10,-6)\nprint \"(iii)fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(fp,3),\"MHz\"\npi=((1.121-1.087)/1.087)*100\nprint \"(iii)%increase=\",round(pi,3),\"%\"\nq=(2*(math.pi)*1.087*0.33*pow(10,6))/(5.5*pow(10,3))\nprint \"(iv)Q=omegax\u2217L/R=2\u2217pi\u2217fs\u2217L/R=\",round(q,3)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "(i)f(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C)= 1.087 MHz\n(ii)Ceq(in pF)=C\u2217CM/C+CM= 0.061 pF\n(iii)fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 1.122 MHz\n(iii)%increase= 3.128 %\n(iv)Q=omegax\u2217L/R=2\u2217pi\u2217fs\u2217L/R= 409.789\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.24 Page No. 4-68", "cell_type": "markdown", "metadata": {}}, {"execution_count": 26, "cell_type": "code", "source": "import math\n\nprint(\"(i)Assume one particular coupling direction for which,\")\nprint(\"Leq=L1+L2+2M=0.25mH\")\nf=(1/(2*(math.pi)*math.sqrt(0.25*100*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,f(in MHz)=1/2\u2217pi\u2217sqrt(Leq\u2217C)=\",round(f,5),\"MHz\"\nprint(\"Let the direction of coupling is reversed,\")\nprint(\"Leq=L1+L2\u22122M=0.15mH\")\nfd=(1/(2*(math.pi)*math.sqrt(0.15*100*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,f\u2019\u2019(in MHz)=1/2\u2217pi\u2217sqrt(Leq\u2217C)=\",round(fd,4),\"MHz\"\npc=((1.2994-1.00658)/1.00658)*100\nprint \"Therefore, %change = f\u2019\u2019\u2212f/f\u2217100=\",round(pc,2),\"%\"\nprint(\"(ii)Let us assume direction of coupling such that,\")\nprint(\"Leq=L1+L2+2M=0.25mH\")\nprint(\"Ct=Trimcapacitor=100pF\")\nprint(\"Therefore,Ceq=C\u2217Ct/C+Ct=50pF\")\nf1=(1/(2*(math.pi)*math.sqrt(0.25*50*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,f=1/2\u2217pi\u2217sqrt(Leq\u2217Ceq)=\",round(f1,4),\"MHz\"\nprint(\"If now direction of coupling is reversed,\")\nprint(\"Leq=L1+L2\u22122M=0.15mH\")\nf2=(1/(2*(math.pi)*math.sqrt(0.15*50*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,f\u2019\u2019=1/2\u2217pi\u2217sqrt(Leq\u2217Ceq)=\",round(f2,5),\"MHz\"\npc1=((1.83776-1.4235)/1.4235)*100\nprint \"Therefore,%change=f\u2019\u2019\u2212f/f\u2217100=\",round(pc1,3),\"%\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "(i)Assume one particular coupling direction for which,\nLeq=L1+L2+2M=0.25mH\nTherefore,f(in MHz)=1/2\u2217pi\u2217sqrt(Leq\u2217C)= 1.00658 MHz\nLet the direction of coupling is reversed,\nLeq=L1+L2\u22122M=0.15mH\nTherefore,f\u2019\u2019(in MHz)=1/2\u2217pi\u2217sqrt(Leq\u2217C)= 1.2995 MHz\nTherefore, %change = f\u2019\u2019\u2212f/f\u2217100= 29.09 %\n(ii)Let us assume direction of coupling such that,\nLeq=L1+L2+2M=0.25mH\nCt=Trimcapacitor=100pF\nTherefore,Ceq=C\u2217Ct/C+Ct=50pF\nTherefore,f=1/2\u2217pi\u2217sqrt(Leq\u2217Ceq)= 1.4235 MHz\nIf now direction of coupling is reversed,\nLeq=L1+L2\u22122M=0.15mH\nTherefore,f\u2019\u2019=1/2\u2217pi\u2217sqrt(Leq\u2217Ceq)= 1.83776 MHz\nTherefore,%change=f\u2019\u2019\u2212f/f\u2217100= 29.102 %\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.25 Page No. 4-69", "cell_type": "markdown", "metadata": {}}, {"execution_count": 27, "cell_type": "code", "source": "import math\n\nprint(\"For RC phase shift oscillator,\")\nprint(\"hfe=4K+23+29/K...given hfe=150\")\nprint(\"Therefore,150 = 4K+23+29/K\")\nprint(\"Therefore,4K\u02c62\u2212127K+29 = 0\")\nprint(\"Therefore,K= 31.52,0.23\")\nprint(\"f=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)...givenf=5kHz\")\nprint(\"Therefore,Choose C=100pF\")\nr=(1/(2*(math.pi)*(1000*pow(10,-12))*(5*pow(10,3))*math.sqrt(6+(4*0.23))))*pow(10,-3)\nprint \"Therefore,R(in kohm)=\",round(r,0),\"KOhm\"\nprint(\"K=RC/R i.e. RC=K R = 2.7kohm\")\nprint(\"Neglecting effect of biasing resistances assuming them to be large and selecting transistor with hie=2kohm\")\nprint(\"R\u2019\u2019i =hie =2kohm\")\nprint(\"Therefore,Last resistance in phase network\")\nr3=12-2\nprint \"R3=R\u2212R\u2019\u2019i=\",round(r3,0),\"KOhm\"\nprint(\"Using the backtoback connected zener diodes of 9.3V(Vz) each at the output of emitter follower and using this at the output of the oscillator,the output amplitude can be controlled to 10V i.e. 20Vpeaktopeak. The zener diode 9.3V and forward biased diode of 0.7V gives to tal 10V\")\nprint(\"The designed circuit is shown in fig.4.49\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For RC phase shift oscillator,\nhfe=4K+23+29/K...given hfe=150\nTherefore,150 = 4K+23+29/K\nTherefore,4K\u02c62\u2212127K+29 = 0\nTherefore,K= 31.52,0.23\nf=1/2\u2217pi\u2217R\u2217C\u2217sqrt(6+4K)...givenf=5kHz\nTherefore,Choose C=100pF\nTherefore,R(in kohm)= 12.0 KOhm\nK=RC/R i.e. RC=K R = 2.7kohm\nNeglecting effect of biasing resistances assuming them to be large and selecting transistor with hie=2kohm\nR\u2019\u2019i =hie =2kohm\nTherefore,Last resistance in phase network\nR3=R\u2212R\u2019\u2019i= 10.0 KOhm\nUsing the backtoback connected zener diodes of 9.3V(Vz) each at the output of emitter follower and using this at the output of the oscillator,the output amplitude can be controlled to 10V i.e. 20Vpeaktopeak. The zener diode 9.3V and forward biased diode of 0.7V gives to tal 10V\nThe designed circuit is shown in fig.4.49\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.26 Page No. 4-70", "cell_type": "markdown", "metadata": {}}, {"execution_count": 28, "cell_type": "code", "source": "import math\n\nprint(\"L1=20uH, L2=2mH\")\nleq=((20.0*pow(10,-6))+(2.0*pow(10,-3)))*pow(10,3)\nprint \"Therefore,Leq(in mH)=L1+L2=\",round(leq,3),\"x 10^-3 H\"\nprint(\"For f = fmax = 2.5 MHz\")\nprint(\"f=1/2\u2217pi\u2217sqrt(C\u2217Leq)\")\nc=(1/(4*(pow((math.pi),2))*(pow((2.5*pow(10,6)),2))*(2.002*pow(10,-3))))*pow(10,12)\nprint \"Therefore,C(in pF)=\",round(c,4),\"pF\"\nprint(\"For f=fmin=1MHz\")\nprint(\"f=1/2\u2217pi\u2217sqrt(C\u2217Leq)\")\nc1=(1/(4*(pow((math.pi),2))*(pow((1*pow(10,6)),2))*(2.002*pow(10,-3))))*pow(10,12)\nprint \"Therefore,C(in pF)=\",round(c1,4),\"pF\"\nprint(\"Thus C must be varied from 2.0244pF to 12.6525pF\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "L1=20uH, L2=2mH\nTherefore,Leq(in mH)=L1+L2= 2.02 x 10^-3 H\nFor f = fmax = 2.5 MHz\nf=1/2\u2217pi\u2217sqrt(C\u2217Leq)\nTherefore,C(in pF)= 2.0244 pF\nFor f=fmin=1MHz\nf=1/2\u2217pi\u2217sqrt(C\u2217Leq)\nTherefore,C(in pF)= 12.6525 pF\nThus C must be varied from 2.0244pF to 12.6525pF\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 4.27 Page No. 4-71", "cell_type": "markdown", "metadata": {}}, {"execution_count": 29, "cell_type": "code", "source": "import math\n\nceq = (0.02*12*(math.pow(10,-24))/(12.02*pow(10,-12)))*pow(10,12)\nprint \"Ceq(in pF)=C1\u2217C2/C1+C2=\",round(ceq,5),\"pF\"\nfs=(1/(2*(math.pi)*math.sqrt(50*0.02*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C1)=\",round(fs,4),\"MHz\"\nfp=(1/(2*(math.pi)*math.sqrt(50*0.01996*pow(10,-15))))*pow(10,-6)\nprint \"Therefore,fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(fp,4),\"MHz\"\nprint(\"Let Cs=5pF connected across the crystal\")\nc2=12+5\nprint \"Therefore,C\u2019\u20192(in pF)=C2+Cx=\",round(c2,0),\"pF\"\nceq1=0.019976\nprint \"Therefore,C\u2019\u2019eq(in pF)=C1\u2217C\u2019\u20192/C1+C\u2019\u20192=\",round(ceq1,6),\"pF\"\nfp1=5.03588\nprint \"Therefore,f\u2019\u2019p(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)=\",round(fp1,5),\"MHz\"\nprint(\"New Cx=6pF is connected then,\")\nc21=12+6\nprint \"C\u2019\u2019\u2019\u20192(in pF)=C2+Cx=\",round(c21,0),\"pF\"\nceq2=0.0199778\nprint \"Therefore,C\u2019\u2019\u2019\u2019eq(in pF)=C1\u2217C\u2019\u2019\u2019\u20192/C1+C\u2019\u2019\u2019\u20192=\",round(ceq2,7),\"pF\"\nfp2=5.035716\nprint \"Therefore,f\u2019\u2019\u2019\u2019p(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C\u2019\u2019\u2019\u2019eq)=\",round(fp2,6),\"MHz\"\nc=(5.03588-5.035716)*pow(10,6)\nprint \"Therefore,Change(in Hz)=f\u2019\u2019p\u2212f\u2019\u2019\u2019\u2019p=\",round(c,0),\"Hz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Ceq(in pF)=C1\u2217C2/C1+C2= 0.01997 pF\nTherefore,fs(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C1)= 5.0329 MHz\nTherefore,fp(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 5.038 MHz\nLet Cs=5pF connected across the crystal\nTherefore,C\u2019\u20192(in pF)=C2+Cx= 17.0 pF\nTherefore,C\u2019\u2019eq(in pF)=C1\u2217C\u2019\u20192/C1+C\u2019\u20192= 0.019976 pF\nTherefore,f\u2019\u2019p(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217Ceq)= 5.03588 MHz\nNew Cx=6pF is connected then,\nC\u2019\u2019\u2019\u20192(in pF)=C2+Cx= 18.0 pF\nTherefore,C\u2019\u2019\u2019\u2019eq(in pF)=C1\u2217C\u2019\u2019\u2019\u20192/C1+C\u2019\u2019\u2019\u20192= 0.0199778 pF\nTherefore,f\u2019\u2019\u2019\u2019p(in MHz)=1/2\u2217pi\u2217sqrt(L\u2217C\u2019\u2019\u2019\u2019eq)= 5.035716 MHz\nTherefore,Change(in Hz)=f\u2019\u2019p\u2212f\u2019\u2019\u2019\u2019p= 164.0 Hz\n"}], "metadata": {"collapsed": false, "trusted": false}}], "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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter5_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter5_1.ipynb new file mode 100755 index 00000000..89aa163e --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter5_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 5", "cell_type": "markdown", "metadata": {}}, {"source": "# Combinational Logic Circuits", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 5.1 Page No. 5-2", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print(\"Given problem specific that there are three input variables and one output variable. We assign A, B and C letter symbols to three input variables and assign Y letter symbol to one output variable. The relationship between input variables and output variable can be tabulated as shown in truth table 5.1\")\nprint (\" A B C Y\")\nprint (\" 0 0 0 0 \")\nprint (\" 0 0 1 0 \")\nprint (\" 0 1 0 0 \")\nprint (\" 0 1 1 1 \")\nprint (\" 1 0 0 0 \")\nprint (\" 1 0 1 1 \")\nprint (\" 1 1 0 1 \")\nprint (\" 1 1 1 1 \")\nprint (\"Now we obtain the simplified Boolean expression for output variable Y using K\u2212map simplification.\")\nprint (\"BC BC\u2019\u2019 B\u2019\u2019C\u2019\u2019 B\u2019\u2019C\")\nprint (\"A 0 0 1 0\")\nprint (\"A\u2019\u2019 0 1 1 1 \")\nprint (\"Y = AC + BC + AB\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Given problem specific that there are three input variables and one output variable. We assign A, B and C letter symbols to three input variables and assign Y letter symbol to one output variable. The relationship between input variables and output variable can be tabulated as shown in truth table 5.1\n A B C Y\n 0 0 0 0 \n 0 0 1 0 \n 0 1 0 0 \n 0 1 1 1 \n 1 0 0 0 \n 1 0 1 1 \n 1 1 0 1 \n 1 1 1 1 \nNow we obtain the simplified Boolean expression for output variable Y using K\u2212map simplification.\nBC BC\u2019\u2019 B\u2019\u2019C\u2019\u2019 B\u2019\u2019C\nA 0 0 1 0\nA\u2019\u2019 0 1 1 1 \nY = AC + BC + AB\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.2 Page No. 5-3 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print (\"The truth table for the given problem is as shown below.\")\nprint (\" C D3 D2 D1 Output \")\nprint (\" 0 x x x 0 \")\nprint (\" 0 0 0 0 0 \")\nprint (\" 0 0 0 1 1 \")\nprint (\" 0 0 1 0 1 \")\nprint (\" 0 1 0 0 1 \")\nprint (\" \")\nprint (\"K\u2212map simplification\")\nprint (\"D1\u2019\u2019D2\u2019\u2019 D1\u2019\u2019D2 D1D2 D1D2\u2019\u2019\")\nprint (\"C\u2019\u2019D3\u2019\u2019 0 0 0 0 \")\nprint (\"C\u2019\u2019D3 0 0 0 0 \")\nprint (\"CD3 1 X X X\")\nprint (\"CD3\u2019\u2019 0 1 X 1\")\nprint (\" \")\nprint (\"Therefore, Y = CD3 + CD2 + CD1\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The truth table for the given problem is as shown below.\n C D3 D2 D1 Output \n 0 x x x 0 \n 0 0 0 0 0 \n 0 0 0 1 1 \n 0 0 1 0 1 \n 0 1 0 0 1 \n \nK\u2212map simplification\nD1\u2019\u2019D2\u2019\u2019 D1\u2019\u2019D2 D1D2 D1D2\u2019\u2019\nC\u2019\u2019D3\u2019\u2019 0 0 0 0 \nC\u2019\u2019D3 0 0 0 0 \nCD3 1 X X X\nCD3\u2019\u2019 0 1 X 1\n \nTherefore, Y = CD3 + CD2 + CD1\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.3 Page No. 5-4 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "print (\"Truth table\")\nprint (\"Input Output\")\nprint (\"Decimal Digit Digit1 Digit0\")\nprint (\"A B C D Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0\")\nprint (\"0 0 0 0 0 0 0 0 0 0 0 0 \")\nprint (\"0 0 0 1 0 0 0 0 0 1 0 1 \")\nprint (\"0 0 1 0 0 0 0 1 0 0 0 0 \")\nprint (\"0 0 1 1 0 0 0 1 0 1 0 1 \")\nprint (\"0 1 0 0 0 0 1 0 0 0 0 0 \")\nprint (\"0 1 0 1 0 0 1 0 0 1 0 1 \")\nprint (\"0 1 1 0 0 0 1 1 0 0 0 0 \")\nprint (\"0 1 1 1 0 0 1 1 0 1 0 1 \")\nprint (\"1 0 0 0 0 1 0 0 0 0 0 0 \")\nprint (\"1 0 0 1 0 1 0 0 0 1 0 1 \")\nprint (\" \")\nprint (\"Here Y0 = D, Y1 = 0 , Y2 = D, Y3 = 0 , Y4 = C, Y5 = B, Y6 = A and Y7 = 0.Therefore, the given circuit can be obtained from the input lines without using any logic gates\")\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Truth table\nInput Output\nDecimal Digit Digit1 Digit0\nA B C D Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0\n0 0 0 0 0 0 0 0 0 0 0 0 \n0 0 0 1 0 0 0 0 0 1 0 1 \n0 0 1 0 0 0 0 1 0 0 0 0 \n0 0 1 1 0 0 0 1 0 1 0 1 \n0 1 0 0 0 0 1 0 0 0 0 0 \n0 1 0 1 0 0 1 0 0 1 0 1 \n0 1 1 0 0 0 1 1 0 0 0 0 \n0 1 1 1 0 0 1 1 0 1 0 1 \n1 0 0 0 0 1 0 0 0 0 0 0 \n1 0 0 1 0 1 0 0 0 1 0 1 \n \nHere Y0 = D, Y1 = 0 , Y2 = D, Y3 = 0 , Y4 = C, Y5 = B, Y6 = A and Y7 = 0.Therefore, the given circuit can be obtained from the input lines without using any logic gates\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.4 Page No. 5-5 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "print (\"Let us consider D for Door, If orignition, L for Light.Then conditions to activate the alarm are: \")\nprint (\"1.The headlights are ON while the ignition is OFF.\")\nprint (\"i.e.L = 1 ,I = 0 and D maybe anything.\")\nprint (\"2.The d door is open while the ignition is ON\")\nprint (\"i.e.D = 1,I = 1, L maybe anything.\")\nprint (\"Also alarm will sound if logic circuit output is zero.\")\nprint (\"Therefore, output for above condition is zero and for rest of the condition it is 1 which is summarized in the following table.\")\nprint (\"D I L Y\")\nprint (\"0 0 0 1 \")\nprint (\"X 0 1 0 \")\nprint (\"0 1 0 1 \")\nprint (\"0 1 1 1 \")\nprint (\"1 0 0 1 \")\nprint (\"1 1 X 0 \")\nprint (\"Therefore, K\u2212map for logic circuit.\")\nprint (\"I\u2019\u2019L\u2019\u2019 I\u2019\u2019L IL IL\u2019\u2019\")\nprint (\"D\u2019\u2019 1 0 1 1 \")\nprint (\"D 1 0 0 0 \")\nprint (\"Output = Y = I\u2019\u2019L\u2019\u2019+D\u2019\u2019I\")\nprint (\"As AND\u2212OR logic can be directly replaced by NAND\u2212NAND,logic circuit using only NAND gates is as shown in fig.5.9 and fig.5.10\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let us consider D for Door, If orignition, L for Light.Then conditions to activate the alarm are: \n1.The headlights are ON while the ignition is OFF.\ni.e.L = 1 ,I = 0 and D maybe anything.\n2.The d door is open while the ignition is ON\ni.e.D = 1,I = 1, L maybe anything.\nAlso alarm will sound if logic circuit output is zero.\nTherefore, output for above condition is zero and for rest of the condition it is 1 which is summarized in the following table.\nD I L Y\n0 0 0 1 \nX 0 1 0 \n0 1 0 1 \n0 1 1 1 \n1 0 0 1 \n1 1 X 0 \nTherefore, K\u2212map for logic circuit.\nI\u2019\u2019L\u2019\u2019 I\u2019\u2019L IL IL\u2019\u2019\nD\u2019\u2019 1 0 1 1 \nD 1 0 0 0 \nOutput = Y = I\u2019\u2019L\u2019\u2019+D\u2019\u2019I\nAs AND\u2212OR logic can be directly replaced by NAND\u2212NAND,logic circuit using only NAND gates is as shown in fig.5.9 and fig.5.10\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.5 Page No. 5-7 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print (\"Truth table \")\nprint (\"Dec A B C D Output Y\")\nprint (\"0 0 0 0 0 0 \")\nprint (\"1 0 0 0 1 0 \")\nprint (\"2 0 0 1 0 0 \")\nprint (\"3 0 0 1 1 0 \")\nprint (\"4 0 1 0 0 0 \")\nprint (\"5 0 1 0 1 0 \")\nprint (\"6 0 1 1 0 0 \")\nprint (\"7 0 1 1 1 0 \")\nprint (\"8 1 0 0 0 0 \")\nprint (\"9 1 0 0 1 0 \")\nprint (\"10 1 0 1 0 1 \")\nprint (\"11 1 0 1 1 1 \")\nprint (\"12 1 1 0 0 1 \")\nprint (\"13 1 1 0 1 1 \")\nprint (\"14 1 1 1 0 1 \")\nprint (\"15 1 1 1 1 1 \")\nprint (\" \")\nprint (\"K\u2212map simplification\")\nprint (\"C\u2019\u2019D\u2019\u2019 C\u2019\u2019D CD CD\u2019\u2019\")\nprint (\"A\u2019\u2019B\u2019\u2019 0 0 0 0 \")\nprint (\"A\u2019\u2019B 0 0 0 0 \")\nprint (\"AB 1 1 1 1 \")\nprint (\"AB\u2019\u2019 0 0 1 1 \")\nprint (\"Y = AB + AC\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Truth table \nDec A B C D Output Y\n0 0 0 0 0 0 \n1 0 0 0 1 0 \n2 0 0 1 0 0 \n3 0 0 1 1 0 \n4 0 1 0 0 0 \n5 0 1 0 1 0 \n6 0 1 1 0 0 \n7 0 1 1 1 0 \n8 1 0 0 0 0 \n9 1 0 0 1 0 \n10 1 0 1 0 1 \n11 1 0 1 1 1 \n12 1 1 0 0 1 \n13 1 1 0 1 1 \n14 1 1 1 0 1 \n15 1 1 1 1 1 \n \nK\u2212map simplification\nC\u2019\u2019D\u2019\u2019 C\u2019\u2019D CD CD\u2019\u2019\nA\u2019\u2019B\u2019\u2019 0 0 0 0 \nA\u2019\u2019B 0 0 0 0 \nAB 1 1 1 1 \nAB\u2019\u2019 0 0 1 1 \nY = AB + AC\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.6 Page No. 5-8 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "print (\"Input 1 \u2212> Pressure in fuel tank\")\nprint (\"Input 2 \u2212> Pressure in oxidizer tank\")\nprint (\"Input = 1 Indicates pressure is equal to or above the required minimum\")\nprint (\"= 0 Otherwise \")\nprint (\"Input 3 \u2212> From timer\")\nprint (\"if input 3 = 1 Indicates that there are less than or exactly 10 minutes for lift off\")\nprint (\"= 0 Otherwise\")\nprint (\"Output \u2212> Panel light, if light goes on then\")\nprint (\"Output = 1 \")\nprint (\"else Output = 0 \")\nprint (\" \")\nprint (\"Truth table\")\nprint (\"Let input 1 = A, input 2 = B, input 3 = C.\")\nprint (\"Inputs Output\")\nprint (\"A B C Y\")\nprint (\"0 0 0 1 \")\nprint (\"0 0 1 0 \")\nprint (\"0 1 0 1 \")\nprint (\"0 1 1 0 \")\nprint (\"1 0 0 1 \")\nprint (\"1 0 1 0 \")\nprint (\"1 1 0 0 \")\nprint (\"1 1 1 1 \")\nprint (\" \")\nprint (\"K\u2212map simplification\")\nprint (\"B\u2019\u2019C\u2019\u2019 B\u2019\u2019C BC BC\u2019\u2019\")\nprint (\"A\u2019\u2019 1 0 0 1 \")\nprint (\"A 1 0 1 0 \")\nprint (\"Y = ABC + A\u2019\u2019B\u2019\u2019C\u2019\u2019 + B\u2019\u2019C\u2019\u2019\")\nprint (\"= ABC + C\u2019\u2019(B\u2019\u2019+A\u2019\u2019B) \")\nprint (\"= ABC + C\u2019\u2019(B\u2019\u2019+A\u2019\u2019) [ A\u2019\u2019+A\u2019\u2019B = A + B] \")\nprint (\"= ABC + C\u2019\u2019(A\u2019\u2019B\u2019\u2019)\")\nprint (\"= A\u2019\u2019B\u2019\u2019 XOR C\u2019\u2019\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Input 1 \u2212> Pressure in fuel tank\nInput 2 \u2212> Pressure in oxidizer tank\nInput = 1 Indicates pressure is equal to or above the required minimum\n= 0 Otherwise \nInput 3 \u2212> From timer\nif input 3 = 1 Indicates that there are less than or exactly 10 minutes for lift off\n= 0 Otherwise\nOutput \u2212> Panel light, if light goes on then\nOutput = 1 \nelse Output = 0 \n \nTruth table\nLet input 1 = A, input 2 = B, input 3 = C.\nInputs Output\nA B C Y\n0 0 0 1 \n0 0 1 0 \n0 1 0 1 \n0 1 1 0 \n1 0 0 1 \n1 0 1 0 \n1 1 0 0 \n1 1 1 1 \n \nK\u2212map simplification\nB\u2019\u2019C\u2019\u2019 B\u2019\u2019C BC BC\u2019\u2019\nA\u2019\u2019 1 0 0 1 \nA 1 0 1 0 \nY = ABC + A\u2019\u2019B\u2019\u2019C\u2019\u2019 + B\u2019\u2019C\u2019\u2019\n= ABC + C\u2019\u2019(B\u2019\u2019+A\u2019\u2019B) \n= ABC + C\u2019\u2019(B\u2019\u2019+A\u2019\u2019) [ A\u2019\u2019+A\u2019\u2019B = A + B] \n= ABC + C\u2019\u2019(A\u2019\u2019B\u2019\u2019)\n= A\u2019\u2019B\u2019\u2019 XOR C\u2019\u2019\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.7 Page No. 5-15 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "print (\"Fig.5.20 shows a 32 to 1 multiplexer using 74LS150 ICs.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig.5.20 shows a 32 to 1 multiplexer using 74LS150 ICs.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.8 Page No. 5-15 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "print (\"Fig.5.21 shows a 32 to 1 multiplexer using four 8 to 1 multiplxeres and 2 to 4 decoder.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig.5.21 shows a 32 to 1 multiplexer using four 8 to 1 multiplxeres and 2 to 4 decoder.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.9 Page No. 5-18 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "print (\"The function can be implemented with a 8 to 1 multiplexer, as shown in fig.5.22. Three variables A, B and C are applied to the select lines.The minterms to be included (1,3,5 and 6) are chosen by making their corresponding input lines equal to 1. Mintems 0,2,4 and 7 are not included by making their input lines equal to 0.\")\n ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The function can be implemented with a 8 to 1 multiplexer, as shown in fig.5.22. Three variables A, B and C are applied to the select lines.The minterms to be included (1,3,5 and 6) are chosen by making their corresponding input lines equal to 1. Mintems 0,2,4 and 7 are not included by making their input lines equal to 0.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.10 Page No. 5-18 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "print (\"Fig.5.23 shows the implementation of function with 4 to 1 multiplexer. Two of the variables, B and C, are applied to the selection lines. B is connected to S1 and C is connected to S0. The inputs for multiplexer are derived from the implementation table.\")\nprint (\"Truth table \")\nprint (\"Minterm A B C F\")\n\nprint (\"0 0 0 0 0 \")\nprint (\"1 0 0 1 1 \")\nprint (\"2 0 1 0 0 \")\nprint (\"3 0 1 1 1 \")\nprint (\"4 1 0 0 0 \")\nprint (\"5 1 0 1 1 \")\nprint (\"6 1 1 0 1 \")\nprint (\"7 1 1 1 0 \")\nprint (\" \")\nprint (\"Implementation table\")\nprint (\"D0 D1 D2 D3\")\nprint (\"A\u2019\u2019 0 1 2 3 Row1 \")\nprint (\"A 4 5 6 7 Row2 \")\nprint (\"0 1 A A\u2019\u2019\")\nprint (\" \")\nprint (\"As shown in fig.5.23 (c) the implementation table is nothing but the list of the inputs of the miltiplexers and under them list of all theminterms in two rows. The first row lists all those minterms where A is complemented, and the second row lists all the minterms with A uncomplemented. The minterms given in the function are circled and then each column is inserted separately as follows.\")\nprint (\"1. If the two minterms in a column are not circled, O is applied to the corresponding multiplexer input(see column 1).\")\nprint (\"2. If the two minterms in a column are circled, 1 is applied to the corresponding multiplexer input(see column 2).\")\nprint (\"3. If the minterm in the second row is circled and minterms in the first row is not circled,A is applied to the corresponding multiplexer input (see column 3).\")\nprint (\"4. If the minterm in the first row is circled and minterm in the second row is not circled, A\u2019\u2019 is applied to the corresponding multiplexer input(see column 4).\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig.5.23 shows the implementation of function with 4 to 1 multiplexer. Two of the variables, B and C, are applied to the selection lines. B is connected to S1 and C is connected to S0. The inputs for multiplexer are derived from the implementation table.\nTruth table \nMinterm A B C F\n0 0 0 0 0 \n1 0 0 1 1 \n2 0 1 0 0 \n3 0 1 1 1 \n4 1 0 0 0 \n5 1 0 1 1 \n6 1 1 0 1 \n7 1 1 1 0 \n \nImplementation table\nD0 D1 D2 D3\nA\u2019\u2019 0 1 2 3 Row1 \nA 4 5 6 7 Row2 \n0 1 A A\u2019\u2019\n \nAs shown in fig.5.23 (c) the implementation table is nothing but the list of the inputs of the miltiplexers and under them list of all theminterms in two rows. The first row lists all those minterms where A is complemented, and the second row lists all the minterms with A uncomplemented. The minterms given in the function are circled and then each column is inserted separately as follows.\n1. If the two minterms in a column are not circled, O is applied to the corresponding multiplexer input(see column 1).\n2. If the two minterms in a column are circled, 1 is applied to the corresponding multiplexer input(see column 2).\n3. If the minterm in the second row is circled and minterms in the first row is not circled,A is applied to the corresponding multiplexer input (see column 3).\n4. If the minterm in the first row is circled and minterm in the second row is not circled, A\u2019\u2019 is applied to the corresponding multiplexer input(see column 4).\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.11 Page No. 5-20", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "print (\"Fig 5.25 shows the implementation of given Booolean function with 8 : 1 miltiplexer. \")\nprint (\"Implementation table \")\nprint (\"D0 D1 D2 D3 D4 D5 D6 D7\")\nprint (\"A\u2019\u2019 0 1 2 3 4 5 6 7 \")\nprint (\"A 8 9 10 11 12 13 14 15 \")\nprint (\"1 1 0 A\u2019\u2019 A\u2019\u2019 0 0 A\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig 5.25 shows the implementation of given Booolean function with 8 : 1 miltiplexer. \nImplementation table \nD0 D1 D2 D3 D4 D5 D6 D7\nA\u2019\u2019 0 1 2 3 4 5 6 7 \nA 8 9 10 11 12 13 14 15 \n1 1 0 A\u2019\u2019 A\u2019\u2019 0 0 A\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.12 Page No. 5-21", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "print (\"The function has four variables. To implement this function we require 8:1 multiplexer. i.e., two 4:1 multiplexers. We have already seen how to construct 8:1 multiplexer using two 4:1 multiplexers.The same concept is used here to implemen t given Boolean function.\")\nprint (\" \")\nprint (\"Implementation table\")\nprint (\"D0 D1 D2 D3 D4 D5 D6 D7\")\nprint (\"A\u2019\u2019 0 1 2 3 4 5 6 7 \")\nprint (\"A 8 9 10 11 12 13 14 15 \")\nprint (\"A\u2019\u2019 1 A\u2019\u2019 0 1 0 1 0 \")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The function has four variables. To implement this function we require 8:1 multiplexer. i.e., two 4:1 multiplexers. We have already seen how to construct 8:1 multiplexer using two 4:1 multiplexers.The same concept is used here to implemen t given Boolean function.\n \nImplementation table\nD0 D1 D2 D3 D4 D5 D6 D7\nA\u2019\u2019 0 1 2 3 4 5 6 7 \nA 8 9 10 11 12 13 14 15 \nA\u2019\u2019 1 A\u2019\u2019 0 1 0 1 0 \n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.13 Page No. 5-22", "cell_type": "markdown", "metadata": {}}, {"execution_count": 30, "cell_type": "code", "source": "print (\"The given Boolean expression is not in standard SOP form. Let us first convert this in standard form.\")\nprint (\" F (A, B, C, D) = A\u2019\u2019BD\u2019\u2019(C+C\u2019\u2019) + ACD(B+B\u2019\u2019) + B\u2019\u2019CD(A+A\u2019\u2019) + A\u2019\u2019C\u2019\u2019D(B+B\u2019\u2019)\")\nprint (\" = A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BC\u2019\u2019D\u2019\u2019 + ABCD + AB\u2019\u2019CD + AB\u2019\u2019CD + A\u2019\u2019B\u2019\u2019CD + A\u2019\u2019BC\u2019 \u2019D + A\u2019\u2019B\u2019\u2019C\u2019\u2019D\")\nprint (\" = A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BC\u2019\u2019D\u2019\u2019 + ABCD + AB\u2019\u2019CD + A\u2019\u2019B\u2019\u2019CD + A\u2019\u2019BC\u2019\u2019D + A\u2019\u2019B\u2019\u2019C\u2019\u2019D\")\nprint (\" \")\nprint (\"The truth table for this standard SOP form can be given as\")\nprint (\"No. Minterms A B C D Y\")\nprint (\"0 0 0 0 0 0 \")\nprint (\"1 A\u2019\u2019B\u2019\u2019C\u2019\u2019D 0 0 0 1 1 \")\nprint (\"2 0 0 1 0 0 \")\nprint (\"3 A\u2019\u2019B\u2019\u2019CD 0 0 1 1 1 \")\nprint (\"4 A\u2019\u2019BC\u2019\u2019D\u2019\u2019 0 1 0 0 1 \")\nprint (\"5 A\u2019\u2019BC\u2019\u2019D 0 1 0 1 1 \")\nprint (\"6 A\u2019\u2019BCD\u2019\u2019 0 1 1 0 1 \")\nprint (\"7 0 1 1 1 0 \")\nprint (\"8 1 0 0 0 0 \")\nprint (\"9 1 0 0 1 0 \")\nprint (\"10 1 0 1 0 0 \")\nprint (\"11 AB\u2019\u2019CD 1 0 1 1 1 \")\nprint (\"12 1 1 0 0 0 \")\nprint (\"13 1 1 0 1 0 \")\nprint (\"14 1 1 1 0 0 \")\nprint (\"15 ABCD 1 1 1 1 1 \")\nprint (\" \")\nprint (\"From the truth table Boolean function can be implemented using 8 : 1 multiplexer as follows:\")\nprint (\"Implementation table: \")\nprint (\"D0 D1 D2 D3 D4 D5 D6 D7\")\nprint (\"A\u2019\u2019 0 1 2 3 4 5 6 7 \")\nprint (\"A 8 9 10 11 12 13 14 15 \")\nprint (\"0 A\u2019\u2019 0 1 A\u2019\u2019 A\u2019\u2019 A\u2019\u2019 A\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The given Boolean expression is not in standard SOP form. Let us first convert this in standard form.\n F (A, B, C, D) = A\u2019\u2019BD\u2019\u2019(C+C\u2019\u2019) + ACD(B+B\u2019\u2019) + B\u2019\u2019CD(A+A\u2019\u2019) + A\u2019\u2019C\u2019\u2019D(B+B\u2019\u2019)\n = A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BC\u2019\u2019D\u2019\u2019 + ABCD + AB\u2019\u2019CD + AB\u2019\u2019CD + A\u2019\u2019B\u2019\u2019CD + A\u2019\u2019BC\u2019 \u2019D + A\u2019\u2019B\u2019\u2019C\u2019\u2019D\n = A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BC\u2019\u2019D\u2019\u2019 + ABCD + AB\u2019\u2019CD + A\u2019\u2019B\u2019\u2019CD + A\u2019\u2019BC\u2019\u2019D + A\u2019\u2019B\u2019\u2019C\u2019\u2019D\n \nThe truth table for this standard SOP form can be given as\nNo. Minterms A B C D Y\n0 0 0 0 0 0 \n1 A\u2019\u2019B\u2019\u2019C\u2019\u2019D 0 0 0 1 1 \n2 0 0 1 0 0 \n3 A\u2019\u2019B\u2019\u2019CD 0 0 1 1 1 \n4 A\u2019\u2019BC\u2019\u2019D\u2019\u2019 0 1 0 0 1 \n5 A\u2019\u2019BC\u2019\u2019D 0 1 0 1 1 \n6 A\u2019\u2019BCD\u2019\u2019 0 1 1 0 1 \n7 0 1 1 1 0 \n8 1 0 0 0 0 \n9 1 0 0 1 0 \n10 1 0 1 0 0 \n11 AB\u2019\u2019CD 1 0 1 1 1 \n12 1 1 0 0 0 \n13 1 1 0 1 0 \n14 1 1 1 0 0 \n15 ABCD 1 1 1 1 1 \n \nFrom the truth table Boolean function can be implemented using 8 : 1 multiplexer as follows:\nImplementation table: \nD0 D1 D2 D3 D4 D5 D6 D7\nA\u2019\u2019 0 1 2 3 4 5 6 7 \nA 8 9 10 11 12 13 14 15 \n0 A\u2019\u2019 0 1 A\u2019\u2019 A\u2019\u2019 A\u2019\u2019 A\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.14 Page No. 5-24 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print (\"Here,instead of minterms,maxterms are specified.Thus,we have to circle maxterms which are not included in the Boolean function. Fig.5.28 shows the implementation of Boolean function with 8 : 1 multiplexer.\")\nprint (\" \")\nprint (\"Implementation table: \")\nprint (\"D0 D1 D2 D3 D4 D5 D6 D7\")\nprint (\"A\u2019\u2019 0 1 2 3 4 5 6 7\")\nprint (\"A 8 9 10 11 12 13 14 15 \")\nprint (\"0 A\u2019\u2019A\u2019\u2019 AA\u2019\u2019 A 0 1\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Here,instead of minterms,maxterms are specified.Thus,we have to circle maxterms which are not included in the Boolean function. Fig.5.28 shows the implementation of Boolean function with 8 : 1 multiplexer.\n \nImplementation table: \nD0 D1 D2 D3 D4 D5 D6 D7\nA\u2019\u2019 0 1 2 3 4 5 6 7\nA 8 9 10 11 12 13 14 15 \n0 A\u2019\u2019A\u2019\u2019 AA\u2019\u2019 A 0 1\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.15 Page No. 5-24", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "print (\"In the given Boolean function three don\u2019t care conditions are also specified. We know that dont care conditions can be treated as either 0s or 1s.Fig.5.29 shows the implementation of given Boolean function using 8 : 1 multiplexer.\")\nprint (\" \")\nprint (\"Im pl em e n t a ti o n t a b l e : \")\nprint (\"D0 D1 D2 D3 D4 D5 D6 D7\")\nprint (\"A\u2019 \u2019 0 1 2 3 4 5 6 7 \")\nprint (\"A 8 9 10 11 12 13 14 15 \")\nprint (\"1 0 1 1 A A 1 0 \")\nprint (\" \")\nprint (\"In this example, by taking dont care conditions 8 and 14 we have eliminated A\u2019\u2019 term and hence the inverter.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "In the given Boolean function three don\u2019t care conditions are also specified. We know that dont care conditions can be treated as either 0s or 1s.Fig.5.29 shows the implementation of given Boolean function using 8 : 1 multiplexer.\n \nIm pl em e n t a ti o n t a b l e : \nD0 D1 D2 D3 D4 D5 D6 D7\nA\u2019 \u2019 0 1 2 3 4 5 6 7 \nA 8 9 10 11 12 13 14 15 \n1 0 1 1 A A 1 0 \n \nIn this example, by taking dont care conditions 8 and 14 we have eliminated A\u2019\u2019 term and hence the inverter.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.16 Page No. 5-25 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 29, "cell_type": "code", "source": "print (\"D\u2019\u2019 D\")\nprint (\"D 0 1 \")\nprint (\"0 2 3 \")\nprint (\"0 4 5 \")\nprint (\"1 6 7 \")\nprint (\"D 8 9 \")\nprint (\"1 10 11 \")\nprint (\"D\u2019\u2019 12 13 \")\nprint (\"0 14 15 \")\nprint (\" \")\nprint (\"Here, implementation table is listed for least significant bits i.e.D. The first column list all minterm swith D is complementated and these cond column lists all the minterms with Duncomplemented,as shown in fig.5.30(a).Then according to data inputs given to the multiplexer minterms are circled applying following rules.\")\nprint (\"1. If multipler input is 0, dont circle any minterm in the corresponding row.\")\nprint (\"2. If multipler input is 1, circle both the minterms in the corresponding row\")\nprint (\"3. If multipler input is D, circle the minterm belongs to cloumn D in the corresponding row\")\nprint (\"4. If multipler input is D\u2019\u2019,circle the minterm belongs to column D\u2019\u2019 in the corresponding row\")\nprint (\"This is illustrated in fig.5.30(b).Now circled minterms can be written to get Boolean expression as follows:\")\nprint (\"Y = A\u2019\u2019B\u2019\u2019C\u2019\u2019D + A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BCD + AB\u2019\u2019C\u2019\u2019D + AB\u2019\u2019CD\u2019\u2019 + AB\u2019\u2019CD + ABC\u2019\u2019D\u2019\u2019 \")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "D\u2019\u2019 D\nD 0 1 \n0 2 3 \n0 4 5 \n1 6 7 \nD 8 9 \n1 10 11 \nD\u2019\u2019 12 13 \n0 14 15 \n \nHere, implementation table is listed for least significant bits i.e.D. The first column list all minterm swith D is complementated and these cond column lists all the minterms with Duncomplemented,as shown in fig.5.30(a).Then according to data inputs given to the multiplexer minterms are circled applying following rules.\n1. If multipler input is 0, dont circle any minterm in the corresponding row.\n2. If multipler input is 1, circle both the minterms in the corresponding row\n3. If multipler input is D, circle the minterm belongs to cloumn D in the corresponding row\n4. If multipler input is D\u2019\u2019,circle the minterm belongs to column D\u2019\u2019 in the corresponding row\nThis is illustrated in fig.5.30(b).Now circled minterms can be written to get Boolean expression as follows:\nY = A\u2019\u2019B\u2019\u2019C\u2019\u2019D + A\u2019\u2019BCD\u2019\u2019 + A\u2019\u2019BCD + AB\u2019\u2019C\u2019\u2019D + AB\u2019\u2019CD\u2019\u2019 + AB\u2019\u2019CD + ABC\u2019\u2019D\u2019\u2019 \n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.17 Page No. 5-26", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "print (\"D0 D1 D2 D3\")\nprint (\"w\u2019\u2019x\u2019\u2019 0 1 2 3 \")\nprint (\"w\u2019\u2019x 4 5 6 7 \")\nprint (\"wx\u2019\u2019 8 9 10 11 \")\nprint (\"wx 12 13 14 15 \")\nprint (\" \")\nprint (\"D0 = w\u2019\u2019x + wx\u2019\u2019 = w XOR x\")\nprint (\"D1 = w\u2019\u2019x\u2019\u2019 + wx\u2019\u2019 = x\u2019\u2019 \")\nprint (\"D2 = w\u2019\u2019x + wx\u2019\u2019 = w XOR x\")\nprint (\"D3 = w\u2019\u2019x + wx\u2019\u2019 + wx = x + wx\u2019\u2019 = w + x\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "D0 D1 D2 D3\nw\u2019\u2019x\u2019\u2019 0 1 2 3 \nw\u2019\u2019x 4 5 6 7 \nwx\u2019\u2019 8 9 10 11 \nwx 12 13 14 15 \n \nD0 = w\u2019\u2019x + wx\u2019\u2019 = w XOR x\nD1 = w\u2019\u2019x\u2019\u2019 + wx\u2019\u2019 = x\u2019\u2019 \nD2 = w\u2019\u2019x + wx\u2019\u2019 = w XOR x\nD3 = w\u2019\u2019x + wx\u2019\u2019 + wx = x + wx\u2019\u2019 = w + x\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.18 Page No. 5-28 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print (\"The cascading of demultiplexers is similar to the cascading of decoder.Fig.5.33 shows cascading of two 1 : 4 demultiplexers to form 1 :8 demultiplexer.\")\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The cascading of demultiplexers is similar to the cascading of decoder.Fig.5.33 shows cascading of two 1 : 4 demultiplexers to form 1 :8 demultiplexer.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.19 Page No. 5-28 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "print (\"Let us see the truthtable of full subtractor.\")\nprint (\"A B Bin D Bout \")\nprint (\"0 0 0 0 0 \")\nprint (\"0 0 1 1 1 \")\nprint (\"0 1 0 1 1 \")\nprint (\"0 1 1 0 1 \")\nprint (\"1 0 0 1 0 \")\nprint (\"1 0 1 0 0 \")\nprint (\"1 1 0 0 0 \")\nprint (\"1 1 1 1 1 \")\nprint (\" \")\nprint (\"For full subtractor difference D function can be written as D = f(A,B,C) = summation m(1,2,4,7) and Bout function can be written as\")\nprint (\"Bout = F (A, B, C) = summation m( 1 , 2 , 3 ,7 ) \")\nprint (\"With Din input 1, demultiplexer gives minterms at the output so by logically ORing required minterms we can implement Boolean functions for full subtractor. Fig.5.34 shows the implementation of full subtractor using demultiplexer.\")\n ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Let us see the truthtable of full subtractor.\nA B Bin D Bout \n0 0 0 0 0 \n0 0 1 1 1 \n0 1 0 1 1 \n0 1 1 0 1 \n1 0 0 1 0 \n1 0 1 0 0 \n1 1 0 0 0 \n1 1 1 1 1 \n \nFor full subtractor difference D function can be written as D = f(A,B,C) = summation m(1,2,4,7) and Bout function can be written as\nBout = F (A, B, C) = summation m( 1 , 2 , 3 ,7 ) \nWith Din input 1, demultiplexer gives minterms at the output so by logically ORing required minterms we can implement Boolean functions for full subtractor. Fig.5.34 shows the implementation of full subtractor using demultiplexer.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.20 Page No. 5-32", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "print (\"The fig.5.37 shows the implmentation of 1 to demultiplexer using two 74X154 ICs.Here,the most significant bit of select signal(A4) is used to enable either upper 1 to 16 demultiplexer or lower 1 to 16 demultiplexr.The data input and other select signals are connected parallel to both the demultiplexer ICs.When A4 = 0,upper demultiplexer is enabled and the data input is routed to the output corresponds to the status of A0 A1 A2 and A3 lines.When A4 = 1,lower multiplexer is enabled and the data input is routed to the output corresponds to the status of A0 A1 A2 and A3 lines.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The fig.5.37 shows the implmentation of 1 to demultiplexer using two 74X154 ICs.Here,the most significant bit of select signal(A4) is used to enable either upper 1 to 16 demultiplexer or lower 1 to 16 demultiplexr.The data input and other select signals are connected parallel to both the demultiplexer ICs.When A4 = 0,upper demultiplexer is enabled and the data input is routed to the output corresponds to the status of A0 A1 A2 and A3 lines.When A4 = 1,lower multiplexer is enabled and the data input is routed to the output corresponds to the status of A0 A1 A2 and A3 lines.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.21 Page No. 5-34", "cell_type": "markdown", "metadata": {}}, {"execution_count": 28, "cell_type": "code", "source": "print (\"Fig.5.40 shows 3 to 8 line decoder.Here,3 inputs are decoded into eight outputs, each output represent one of the minterms of the 3 input variables.The three inverters provide the complement of the inputs, and each one of the eight AND gates generates one of the minterms.Enable input is provided to activate decoded output based on data inputs A, B and C. The table shows the truth table for 3 to 8 decoder.\")\nprint (\" \")\nprint (\"Truth table for a 3 to 8 decoder\")\nprint (\"Inputs | Outputs \")\nprint (\"EN A B C | Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0\")\nprint (\"0 X X X | 0 0 0 0 0 0 0 0 \")\nprint (\"1 0 0 0 | 0 0 0 0 0 0 0 1 \")\nprint (\"1 0 0 1 | 0 0 0 0 0 0 1 0 \")\nprint (\"1 0 1 0 | 0 0 0 0 0 1 0 0 \")\nprint (\"1 0 1 1 | 0 0 0 0 1 0 0 0 \")\nprint (\"1 1 0 0 | 0 0 0 1 0 0 0 0 \")\nprint (\"1 1 0 1 | 0 0 1 0 0 0 0 0 \")\nprint (\"1 1 1 0 | 0 1 0 0 0 0 0 0 \")\nprint (\"1 1 1 1 | 1 0 0 0 0 0 0 0 \")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig.5.40 shows 3 to 8 line decoder.Here,3 inputs are decoded into eight outputs, each output represent one of the minterms of the 3 input variables.The three inverters provide the complement of the inputs, and each one of the eight AND gates generates one of the minterms.Enable input is provided to activate decoded output based on data inputs A, B and C. The table shows the truth table for 3 to 8 decoder.\n \nTruth table for a 3 to 8 decoder\nInputs | Outputs \nEN A B C | Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0\n0 X X X | 0 0 0 0 0 0 0 0 \n1 0 0 0 | 0 0 0 0 0 0 0 1 \n1 0 0 1 | 0 0 0 0 0 0 1 0 \n1 0 1 0 | 0 0 0 0 0 1 0 0 \n1 0 1 1 | 0 0 0 0 1 0 0 0 \n1 1 0 0 | 0 0 0 1 0 0 0 0 \n1 1 0 1 | 0 0 1 0 0 0 0 0 \n1 1 1 0 | 0 1 0 0 0 0 0 0 \n1 1 1 1 | 1 0 0 0 0 0 0 0 \n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.22 Page No. 5-38 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 27, "cell_type": "code", "source": "print (\"The Fig.5.45 shows the construction of 5 to 32 decoder using four 74LS138s and half 74LS139. The half section of 74LS139 IC used as a 2 to 4 decoder to decode the two higher order inputs,D and E.The four outputs of this decoder are used to enable one of the four 3 to 8 decoders . The three lower inputs A, B and C a reconnected in parallel to four 3 to 8 decoders.This means that the same output pin of each of the four 3 to 8 decoders is selected but only one is enable.The remaining enables signals of four 3 to 8 decoders ICs are connected in parallel to construct enable signals for 5 to 32 decoder.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The Fig.5.45 shows the construction of 5 to 32 decoder using four 74LS138s and half 74LS139. The half section of 74LS139 IC used as a 2 to 4 decoder to decode the two higher order inputs,D and E.The four outputs of this decoder are used to enable one of the four 3 to 8 decoders . The three lower inputs A, B and C a reconnected in parallel to four 3 to 8 decoders.This means that the same output pin of each of the four 3 to 8 decoders is selected but only one is enable.The remaining enables signals of four 3 to 8 decoders ICs are connected in parallel to construct enable signals for 5 to 32 decoder.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.23 Page No. 5-40 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 26, "cell_type": "code", "source": "print (\"4 line to 16 line decoder using 1 line to 4 line decoder\")\nprint (\"As shown in fig.5.46 five numbers of 2:4 decoder are required to design 4:16 decoder. Decoder 1 is used to enable one of the decoder 2, 3,4 and 5.Inputs off irstd ecoder are the A and B MSB inputs of 4 : 16 decoder. The inputs of decoder are connected together forming C and D LSB inputs of 4 : 16 decoder.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "4 line to 16 line decoder using 1 line to 4 line decoder\nAs shown in fig.5.46 five numbers of 2:4 decoder are required to design 4:16 decoder. Decoder 1 is used to enable one of the decoder 2, 3,4 and 5.Inputs off irstd ecoder are the A and B MSB inputs of 4 : 16 decoder. The inputs of decoder are connected together forming C and D LSB inputs of 4 : 16 decoder.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.24 Page No. 5-43 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 25, "cell_type": "code", "source": "print (\"In this example, we use IC74LS138,3:8 decoder to implement multiple output function. The outputs of 74LS138 a reactive low, therefore, SOP function(function F1)can be implemented using NAND gate and POS function (function F2) can be implemented using AND gate, as shown in fig.5.50\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "In this example, we use IC74LS138,3:8 decoder to implement multiple output function. The outputs of 74LS138 a reactive low, therefore, SOP function(function F1)can be implemented using NAND gate and POS function (function F2) can be implemented using AND gate, as shown in fig.5.50\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.25 Page No. 5-43 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 18, "cell_type": "code", "source": "print (\"The truth table for full subtractor is as shown below\")\nprint (\" \")\nprint (\"Inputs Outputs \")\nprint (\"A B Bin D Bout \")\nprint (\"0 0 0 0 0 \")\nprint (\"0 0 1 1 1 \")\nprint (\"0 1 0 1 1 \")\nprint (\"0 1 1 0 1 \")\nprint (\"1 0 0 1 0 \")\nprint (\"1 0 1 0 0 \")\nprint (\"1 1 0 0 0 \")\nprint (\"1 1 1 1 1 \")\nprint (\" \")\nprint (\"Implementation of full subtractor using 3:8 decoder is shown in fig.5.51\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The truth table for full subtractor is as shown below\n \nInputs Outputs \nA B Bin D Bout \n0 0 0 0 0 \n0 0 1 1 1 \n0 1 0 1 1 \n0 1 1 0 1 \n1 0 0 1 0 \n1 0 1 0 0 \n1 1 0 0 0 \n1 1 1 1 1 \n \nImplementation of full subtractor using 3:8 decoder is shown in fig.5.51\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.26 Page No. 5-44 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 24, "cell_type": "code", "source": "print (\"The truth table for 3\u2212bit binary to gray code converter is as shown below \")\nprint (\" \")\nprint (\"A B C G2 G1 G0\")\nprint (\"0 0 0 0 0 0 \")\nprint (\"0 0 1 0 0 1 \")\nprint (\"0 1 0 0 1 1 \")\nprint (\"0 1 1 0 1 0 \")\nprint (\"1 0 0 1 1 0 \")\nprint (\"1 0 1 1 1 1 \")\nprint (\"1 1 0 1 0 1 \")\nprint (\"1 1 1 1 0 0 \")\nprint (\" \")\nprint (\"The fig.5.52 shows the implementation of 3\u2212bit binary to gray code converter using 3:8 decoder. As outputs of 74138 are active low we have to use NAND gate instead of OR gate. The active low output from the decoder forces output(s) of connected NAND gate(s)to become HIGH,thus implementing the function.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The truth table for 3\u2212bit binary to gray code converter is as shown below \n \nA B C G2 G1 G0\n0 0 0 0 0 0 \n0 0 1 0 0 1 \n0 1 0 0 1 1 \n0 1 1 0 1 0 \n1 0 0 1 1 0 \n1 0 1 1 1 1 \n1 1 0 1 0 1 \n1 1 1 1 0 0 \n \nThe fig.5.52 shows the implementation of 3\u2212bit binary to gray code converter using 3:8 decoder. As outputs of 74138 are active low we have to use NAND gate instead of OR gate. The active low output from the decoder forces output(s) of connected NAND gate(s)to become HIGH,thus implementing the function.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 5.27 Page No. 5-45 ", "cell_type": "markdown", "metadata": {}}, {"execution_count": 19, "cell_type": "code", "source": "print (\" \")\nprint (\"A1 A0 B1 B0 A>B A=B AB A=B A=50+20=70ns and so the counter has\")\nfm=(1/(70*pow(10,-9)))*pow(10,-6)\nprint \"fmax(in MHz)=\",round(fm,1),\"MHz\"\nprint(\"We know that MOD\u221216 ripple counter used four flip\u2212flops. With flip\u2212flop tpd=50ns,the fmax for ripple counter can be given as,\")\nfma=(1/(4*(50*pow(10,-9))))*pow(10,-6)\nprint \"fmax(ripple)(in MHz)=\",fma,\"MHz\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For asynchronous counter the total delay that must be allowed between input clock pulses is equal to flip\u2212flop tpd+AND gate tpd.Thus Tclock>=50+20=70ns and so the counter has\nfmax(in MHz)= 14.3 MHz\nWe know that MOD\u221216 ripple counter used four flip\u2212flops. With flip\u2212flop tpd=50ns,the fmax for ripple counter can be given as,\nfmax(ripple)(in MHz)= 5.0 MHz\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.14 Page No. 8-25", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "print(\"IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However,we require MOD\u221211 counter.The difference between 16 and 11 is 5.Hence 5 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 5.Each time when counter recycles it starts counting from 5 upto 16 on each full cycle.Therefore,each full cycle of the counter consists of 11 states.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However,we require MOD\u221211 counter.The difference between 16 and 11 is 5.Hence 5 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 5.Each time when counter recycles it starts counting from 5 upto 16 on each full cycle.Therefore,each full cycle of the counter consists of 11 states.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.15 Page No. 8-26", "cell_type": "markdown", "metadata": {}}, {"execution_count": 13, "cell_type": "code", "source": "print(\"IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However,we require MOD\u221210 counter.The difference between 16 and 10 is 6.Hence 6 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 6.Each time when counter recycles it starts counting from 6 upto 16 on each full cycle.Therefore,each full cycle of the counter consists of 10 states.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However,we require MOD\u221210 counter.The difference between 16 and 10 is 6.Hence 6 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 6.Each time when counter recycles it starts counting from 6 upto 16 on each full cycle.Therefore,each full cycle of the counter consists of 10 states.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.16 Page No. 8-26", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "print(\"The fig8.36 shows the connections for 74LS191 to get desire operation.We can design the combinational circuit for such counter from the truth table shown below.\")\nprint(\"\")\nprint(\"Q3Q2Q1Q0Y\")\nprint(\"00000\")\nprint(\"00010\")\nprint(\"00100\")\nprint(\"00111\")\nprint(\"01001\")\nprint(\"01011\")\nprint(\"01101\")\nprint(\"01111\")\nprint(\"10001\")\nprint(\"10011\")\nprint(\"10101\")\nprint(\"10111\")\nprint(\"11001\")\nprint(\"11011\")\nprint(\"11100\")\nprint(\"11110\")\nprint(\"\")\nprint(\"Kmap simplification\")\nprint(\"Q1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\")\nprint(\"Q3\u2019\u2019Q2\u2019\u20190010\")\nprint(\"Q3\u2019\u2019Q21111\")\nprint(\"Q3Q21100\")\nprint(\"Q3Q2\u2019\u20191111\")\nprint(\"\")\nprint(\"Therefore,PL\u2019\u2019=Y=Q3\u2019\u2019Q1Q0+Q3\u2019\u2019Q2+Q3Q1\u2019\u2019+Q3Q2\u2019\u2019\")\nprint(\"After switch ON,if the counter output is other than 1101 through 0011,the PL\u2019\u2019 goes low and count 1101 is loaded in the counter.The counter is then decremented on the occurrence of clock pulses.When counter reaches 0010,the PL\u2019\u2019 again goes low and count 1101 is loaded in the counter\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The fig8.36 shows the connections for 74LS191 to get desire operation.We can design the combinational circuit for such counter from the truth table shown below.\n\nQ3Q2Q1Q0Y\n00000\n00010\n00100\n00111\n01001\n01011\n01101\n01111\n10001\n10011\n10101\n10111\n11001\n11011\n11100\n11110\n\nKmap simplification\nQ1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\nQ3\u2019\u2019Q2\u2019\u20190010\nQ3\u2019\u2019Q21111\nQ3Q21100\nQ3Q2\u2019\u20191111\n\nTherefore,PL\u2019\u2019=Y=Q3\u2019\u2019Q1Q0+Q3\u2019\u2019Q2+Q3Q1\u2019\u2019+Q3Q2\u2019\u2019\nAfter switch ON,if the counter output is other than 1101 through 0011,the PL\u2019\u2019 goes low and count 1101 is loaded in the counter.The counter is then decremented on the occurrence of clock pulses.When counter reaches 0010,the PL\u2019\u2019 again goes low and count 1101 is loaded in the counter\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.17 Page No. 8-27", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "print(\"The IC74191 is a 4\u2212bit binary counter, therefore fout=fCLK/16 in up and down counter mode.If fCLK=500Hz and fout=50Hz we need mod10(500/50)counter.The fig.8.39 shows the mod\u221210 counter using IC74191\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The IC74191 is a 4\u2212bit binary counter, therefore fout=fCLK/16 in up and down counter mode.If fCLK=500Hz and fout=50Hz we need mod10(500/50)counter.The fig.8.39 shows the mod\u221210 counter using IC74191\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.18 Page No. 8-28", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "print(\"The fig shows the connections for 74LS191 to get desire operation.We can design the combinational circuit for such counter from the truth table shown below.\")\nprint(\"\")\nprint(\"Q3Q2Q1Q0Y\")\nprint(\"00000\")\nprint(\"00010\")\nprint(\"00100\")\nprint(\"00111\")\nprint(\"01001\")\nprint(\"01011\")\nprint(\"01101\")\nprint(\"01111\")\nprint(\"10001\")\nprint(\"10011\")\nprint(\"10101\")\nprint(\"10111\")\nprint(\"11001\")\nprint(\"11011\")\nprint(\"11101\")\nprint(\"11110\")\nprint(\"\")\nprint(\"Kmap simplification\")\nprint(\"Q1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\")\nprint(\"Q3\u2019\u2019Q2\u2019\u20190010\")\nprint(\"Q3\u2019\u2019Q21111\")\nprint(\"Q3Q21101\")\nprint(\"Q3Q2\u2019\u20191111\")\nprint(\"\")\nprint(\"Therefore,PL\u2019\u2019=Y=Q3\u2019\u2019Q1Q0+Q3\u2019\u2019Q2+Q3Q1\u2019\u2019+Q3Q2\u2019\u2019+Q2Q1Q0\u2019\u2019\")\nprint(\"After switch ON,if the counter output is other than 1110 through 0011,the PL\u2019\u2019 goes low and count 1110 is loaded in the counter.The counter is then decremented on the occurrence of clock pulses.When counter reaches 0010,the PL\u2019\u2019 again goes low and count 1110 is loaded in the counter\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The fig shows the connections for 74LS191 to get desire operation.We can design the combinational circuit for such counter from the truth table shown below.\n\nQ3Q2Q1Q0Y\n00000\n00010\n00100\n00111\n01001\n01011\n01101\n01111\n10001\n10011\n10101\n10111\n11001\n11011\n11101\n11110\n\nKmap simplification\nQ1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\nQ3\u2019\u2019Q2\u2019\u20190010\nQ3\u2019\u2019Q21111\nQ3Q21101\nQ3Q2\u2019\u20191111\n\nTherefore,PL\u2019\u2019=Y=Q3\u2019\u2019Q1Q0+Q3\u2019\u2019Q2+Q3Q1\u2019\u2019+Q3Q2\u2019\u2019+Q2Q1Q0\u2019\u2019\nAfter switch ON,if the counter output is other than 1110 through 0011,the PL\u2019\u2019 goes low and count 1110 is loaded in the counter.The counter is then decremented on the occurrence of clock pulses.When counter reaches 0010,the PL\u2019\u2019 again goes low and count 1110 is loaded in the counter\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.19 Page No. 8-28", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "print(\"IC74191 is a 4\u2212bit binary counter.Thus it divides the input frequency by 16.However,we can design MOD\u2212N counter using IC74191.For MOD\u2212 N counter the output frequency will be fout= fin/N.Thus by changing N we can change the output frequency.The fig.8.40 shows the programmable frequncy divider using IC74191.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC74191 is a 4\u2212bit binary counter.Thus it divides the input frequency by 16.However,we can design MOD\u2212N counter using IC74191.For MOD\u2212 N counter the output frequency will be fout= fin/N.Thus by changing N we can change the output frequency.The fig.8.40 shows the programmable frequncy divider using IC74191.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.20 Page No. 8-28", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "print(\"Fig.8.41 shows Dividing\u2212by\u22122 for up counting\")\nprint(\"Divide\u2212by\u22122 is a mod\u22122counter. Since,after preset above counter goes through 2 states 1110 and 1111,it is a mod\u22122counter.Thus,above circuit is a divide\u2212by\u22122counter for up counting mode.\")\nprint(\"\")\nprint(\"Divide\u2212by\u22125 for down counting mode:\")\nprint(\"\")\nprint(\"Q3Q2Q1Q0Y\")\nprint(\"00000\")\nprint(\"00010\")\nprint(\"00100\")\nprint(\"00110\")\nprint(\"01000\")\nprint(\"01010\")\nprint(\"01100\")\nprint(\"01110\")\nprint(\"10000\")\nprint(\"10010\")\nprint(\"10100\")\nprint(\"10111\")\nprint(\"11001\")\nprint(\"11011\")\nprint(\"11101\")\nprint(\"11111\")\nprint(\"\")\nprint(\"K=map simplification\")\nprint(\"Q1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\")\nprint(\"Q3\u2019\u2019Q2\u2019\u20190000\")\nprint(\"Q3\u2019\u2019Q20000\")\nprint(\"Q3Q21111\")\nprint(\"Q3Q2\u2019\u20190010\")\nprint(\"\")\nprint(\"Therefore,Y = Q3Q2+Q3Q1Q0\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Fig.8.41 shows Dividing\u2212by\u22122 for up counting\nDivide\u2212by\u22122 is a mod\u22122counter. Since,after preset above counter goes through 2 states 1110 and 1111,it is a mod\u22122counter.Thus,above circuit is a divide\u2212by\u22122counter for up counting mode.\n\nDivide\u2212by\u22125 for down counting mode:\n\nQ3Q2Q1Q0Y\n00000\n00010\n00100\n00110\n01000\n01010\n01100\n01110\n10000\n10010\n10100\n10111\n11001\n11011\n11101\n11111\n\nK=map simplification\nQ1\u2019\u2019Q0\u2019\u2019Q1\u2019\u2019Q0Q1Q0Q1Q0\u2019\u2019\nQ3\u2019\u2019Q2\u2019\u20190000\nQ3\u2019\u2019Q20000\nQ3Q21111\nQ3Q2\u2019\u20190010\n\nTherefore,Y = Q3Q2+Q3Q1Q0\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.21 Page No. 8-30", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "print(\"IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However, we require MOD\u22129 counter.The difference between 16 and 9 is 7.Hence 7 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 7.Each time when counter recycles it starts counting from 7 upto 16 on each full cycle.Therefore,each fullcycle of the counter consists of 9 states.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC74191 is a 4\u2212bit counter.Thus it is MOD\u221216 counter.However, we require MOD\u22129 counter.The difference between 16 and 9 is 7.Hence 7 steps must be skipped from the full modulus sequence. This can be achieved by presetting counter to value 7.Each time when counter recycles it starts counting from 7 upto 16 on each full cycle.Therefore,each fullcycle of the counter consists of 9 states.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.22 Page No. 8-32", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "print(\"Clock frequency = 256kHz\")\nprint(\"Output frequency = 2kHz\")\nmn=256/2\nprint \"Therefore, Modnumber = n = \",mn\nprint(\"Therefore,Counter is MOD\u2212128 counter\")\nprint(\"Mod\u2212128 counter can count the numbers from 0 to 127.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Clock frequency = 256kHz\nOutput frequency = 2kHz\nTherefore, Modnumber = n = 128\nTherefore,Counter is MOD\u2212128 counter\nMod\u2212128 counter can count the numbers from 0 to 127.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.23 Page No. 8-36", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "print(\"Internal structure of 7490 ripple counter IC is as shown in fig.8.50\")\nprint(\"\")\nprint(\"We know that,one IC can work as mod\u221210(BCD) counter.Therefore,we need two ICs.The counter will go through states 0\u221219 and should be reset on state 20 .i.e.\")\nprint(\"QDQCQBQAQDQCQBQA\")\nprint(\"00100000\")\nprint(\"7490(2)7490(1)\")\nprint(\"\")\nprint(\"The diagram of divide\u2212by\u221220 counter using IC7490 is as shown in fig.8.51\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Internal structure of 7490 ripple counter IC is as shown in fig.8.50\n\nWe know that,one IC can work as mod\u221210(BCD) counter.Therefore,we need two ICs.The counter will go through states 0\u221219 and should be reset on state 20 .i.e.\nQDQCQBQAQDQCQBQA\n00100000\n7490(2)7490(1)\n\nThe diagram of divide\u2212by\u221220 counter using IC7490 is as shown in fig.8.51\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.24 Page No. 8-37", "cell_type": "markdown", "metadata": {}}, {"execution_count": 18, "cell_type": "code", "source": "print(\"IC7490 is a decade counter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter.To get a divide\u2212by\u221296 counter,the counter is reset as soon as it becomes 10010110.The diagram is shown in fig.8.52.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC7490 is a decade counter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter.To get a divide\u2212by\u221296 counter,the counter is reset as soon as it becomes 10010110.The diagram is shown in fig.8.52.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.25 Page No. 8-37", "cell_type": "markdown", "metadata": {}}, {"execution_count": 19, "cell_type": "code", "source": "print(\"IC7490 is a decadecounter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter. To get a divide\u2212by\u221293counter,the counter is reset as soon as ot becomes 10010011.The diagram is as shown in fig.8.53\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC7490 is a decadecounter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter. To get a divide\u2212by\u221293counter,the counter is reset as soon as ot becomes 10010011.The diagram is as shown in fig.8.53\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.26 Page No. 8-38", "cell_type": "markdown", "metadata": {}}, {"execution_count": 20, "cell_type": "code", "source": "print(\"IC7490 is a decade counter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter.To get a divide by 78 or MOD\u221278 counter,the counter is reset as soon as ot becomes 01111000 as shown in fig.8.54\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC7490 is a decade counter.When two such ICs are cascaded,it becomes a divide\u2212by\u2212100 counter.To get a divide by 78 or MOD\u221278 counter,the counter is reset as soon as ot becomes 01111000 as shown in fig.8.54\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.28 Page No. 8-38", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "print(\"If the QD output is connected to A input of 7490IC and,input clock is applied to B input 100 divide by ten squarewave is obtained at output QA.\")\nprint(\"Clock Outputs\")\nprint(\"QAQDQCQB\")\nprint(\"0LLLL\")\nprint(\"1LLLH\")\nprint(\"2LLHL\")\nprint(\"3LLHH\")\nprint(\"4LHLL\")\nprint(\"5HLLL\")\nprint(\"6HLLH\")\nprint(\"7HLHL\")\nprint(\"8HLHH\")\nprint(\"9HHLL\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "If the QD output is connected to A input of 7490IC and,input clock is applied to B input 100 divide by ten squarewave is obtained at output QA.\nClock Outputs\nQAQDQCQB\n0LLLL\n1LLLH\n2LLHL\n3LLHH\n4LHLL\n5HLLL\n6HLLH\n7HLHL\n8HLHH\n9HHLL\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.29 Page No. 8-39", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print(\"IC 7490 is a decade counter. When two sunch ICs are cascaded, it becomes a divide-by-100 counter. To get a divide-by-25 counter, the counter is reset as soon as it becomes 0010 0101. The diagram is shown in Fig. 8.57.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IC 7490 is a decade counter. When two sunch ICs are cascaded, it becomes a divide-by-100 counter. To get a divide-by-25 counter, the counter is reset as soon as it becomes 0010 0101. The diagram is shown in Fig. 8.57.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.31 Page No. 8-42", "cell_type": "markdown", "metadata": {}}, {"execution_count": 22, "cell_type": "code", "source": "print(\"The fig.8.63 shows the cascaded connection of 4\u2212bit binary counters.Let us see the circuit operation.ThecounterIC1operatesasacounter for countion in the UP direction since CLEAR = LOAD = 1.When the count reaches the maximum value(1111)its RC(Ripple Carry Output)goes HIGH which makes PandT(Enable)inputs of IC2 HIGH for one clockcycle advancing its output by 1 and making Q outputs of IC1,0 at the next clockcycle.After this clockcycle P=T=0 for IC2 and IC1 will go on counting the pulses.When the outputs of IC1 and IC2 both reach the maximum count,RC outputs of both of these ICs will go HIGH.This will make P=T of IC3 HIGH and therefore,in the next clockcycle IC3 count will be incrementeda nd simultaneously IC1 and IC2 will be cleared.This way the counting will continue.\")\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The fig.8.63 shows the cascaded connection of 4\u2212bit binary counters.Let us see the circuit operation.ThecounterIC1operatesasacounter for countion in the UP direction since CLEAR = LOAD = 1.When the count reaches the maximum value(1111)its RC(Ripple Carry Output)goes HIGH which makes PandT(Enable)inputs of IC2 HIGH for one clockcycle advancing its output by 1 and making Q outputs of IC1,0 at the next clockcycle.After this clockcycle P=T=0 for IC2 and IC1 will go on counting the pulses.When the outputs of IC1 and IC2 both reach the maximum count,RC outputs of both of these ICs will go HIGH.This will make P=T of IC3 HIGH and therefore,in the next clockcycle IC3 count will be incrementeda nd simultaneously IC1 and IC2 will be cleared.This way the counting will continue.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.32 Page No. 8-44", "cell_type": "markdown", "metadata": {}}, {"execution_count": 23, "cell_type": "code", "source": "print(\"Cascading four 74161(each 4\u2212bit)counters we get 16(4x4) bit counter as shown in fig8.63.\")\nprint(\"Therefore,we get 2\u02c616 = 65,536 modulus counter\")\nprint(\"However,we require divide\u2212by\u221240,000 counter.The difference between 65,536 and 40,000 is 25,536,which is the number of states those must be skipped from the full modulus sequence.This can be achieved by presetting the counting from 25,536 upto 65,536 on each fullcycle.Therefore, each fullcycle of the counter consists of 40,000 states.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Cascading four 74161(each 4\u2212bit)counters we get 16(4x4) bit counter as shown in fig8.63.\nTherefore,we get 2\u02c616 = 65,536 modulus counter\nHowever,we require divide\u2212by\u221240,000 counter.The difference between 65,536 and 40,000 is 25,536,which is the number of states those must be skipped from the full modulus sequence.This can be achieved by presetting the counting from 25,536 upto 65,536 on each fullcycle.Therefore, each fullcycle of the counter consists of 40,000 states.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.33 Page No. 8-48", "cell_type": "markdown", "metadata": {}}, {"execution_count": 13, "cell_type": "code", "source": "print(\"Although the 74X163 is a modulo\u221216 counter,it can be made to count in a modulus less than 16 by using the CLR\u2019\u2019or LD\u2019\u2019 input to shorten the normal counting sequence.The fig.8.69 shows circuit connections for modulo\u221211 counter.Here, load input is activated upon activation of RCO(ripple\u2212carry\u2212output).Since load input is adjusted to state 5,counter counts from 5 to 15 and then starts at 5 again,for a total of 11 states per counting cycle.\")\nprint(\"\")\nprint(\"We can also design modulo\u221211 counter using CLR\u2019\u2019 input as shown in fig.8.70.Here,NAND gate is used to detect state 10 and force the next state to 0. A2\u2212input gate is used to detect state 10 (binary 1010)by connecting Q1 and Q3 to the inputs of the NAND gate.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Although the 74X163 is a modulo\u221216 counter,it can be made to count in a modulus less than 16 by using the CLR\u2019\u2019or LD\u2019\u2019 input to shorten the normal counting sequence.The fig.8.69 shows circuit connections for modulo\u221211 counter.Here, load input is activated upon activation of RCO(ripple\u2212carry\u2212output).Since load input is adjusted to state 5,counter counts from 5 to 15 and then starts at 5 again,for a total of 11 states per counting cycle.\n\nWe can also design modulo\u221211 counter using CLR\u2019\u2019 input as shown in fig.8.70.Here,NAND gate is used to detect state 10 and force the next state to 0. A2\u2212input gate is used to detect state 10 (binary 1010)by connecting Q1 and Q3 to the inputs of the NAND gate.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.34 Page No. 8-49", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "print(\"An excess\u22123 decimal counter should start counting from count3(binary0011) and count upto count 12(binary1100).Starting count is adjusted by loading 0011 at load inputs.To recycle count from 1100 to 0011,Q3 and Q2 output are connected as inputs for 2\u2212input NAND gate. Thus,NAND gate detects state 1100 and forces 0011 to be loaded as the next state.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "An excess\u22123 decimal counter should start counting from count3(binary0011) and count upto count 12(binary1100).Starting count is adjusted by loading 0011 at load inputs.To recycle count from 1100 to 0011,Q3 and Q2 output are connected as inputs for 2\u2212input NAND gate. Thus,NAND gate detects state 1100 and forces 0011 to be loaded as the next state.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.35 Page No. 8-50", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "print(\"A binary counter with a modulus greater than 16 can be built by cascading 74X163s.When counters are cascaded,CLK,CLR\u2019\u2019and LD\u2019\u2019 of all the 74X163s are connected in parallel,so that all of them count or are cleared or loaded at the sametime.The RCO signal drives the ENT input of the next counter.The fig.8.73 shows modulo\u221260 counter.To have a modulo 60 count we need at least 6\u2212bit counter,thus two 74X163s are cascaded.Counter is designed to count from 196 to 255.The MAXCNT signal detects the state 255 and stops the counter util GO\u2019\u2019is asserted.When GO\u2019\u2019 is asserted the counter is reloaded with 196(binary 11000100) and counts upto 255.To enable counting, CNTEN is connected to the ENP inputs in parallel.A NAND gate assets RELOAD\u2019\u2019 to get back to state only if GO\u2019\u2019 is asserted and the counter is in state 255.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "A binary counter with a modulus greater than 16 can be built by cascading 74X163s.When counters are cascaded,CLK,CLR\u2019\u2019and LD\u2019\u2019 of all the 74X163s are connected in parallel,so that all of them count or are cleared or loaded at the sametime.The RCO signal drives the ENT input of the next counter.The fig.8.73 shows modulo\u221260 counter.To have a modulo 60 count we need at least 6\u2212bit counter,thus two 74X163s are cascaded.Counter is designed to count from 196 to 255.The MAXCNT signal detects the state 255 and stops the counter util GO\u2019\u2019is asserted.When GO\u2019\u2019 is asserted the counter is reloaded with 196(binary 11000100) and counts upto 255.To enable counting, CNTEN is connected to the ENP inputs in parallel.A NAND gate assets RELOAD\u2019\u2019 to get back to state only if GO\u2019\u2019 is asserted and the counter is in state 255.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.36 Page No. 8-50", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "print(\"A binary counter maybe combined with a decoder to obtain a set of 1\u2212out\u2212of\u2212M coded signals,where one signal is asserted in each count state.This is useful when countersare used to control a set of devices,where a different devices is enabled in each counter state.\")\nprint(\"The fig.8.74 shows a 74X163 connected as a modulo\u22128 counter can be combined with a 74X138 3\u22128 decoder to provide eight signals,each one representing a counter state.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "A binary counter maybe combined with a decoder to obtain a set of 1\u2212out\u2212of\u2212M coded signals,where one signal is asserted in each count state.This is useful when countersare used to control a set of devices,where a different devices is enabled in each counter state.\nThe fig.8.74 shows a 74X163 connected as a modulo\u22128 counter can be combined with a 74X138 3\u22128 decoder to provide eight signals,each one representing a counter state.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.37 Page No. 8-62", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "print(\"Excitation table\")\nprint(\"PresentState NextState Flip\u2212flop Inputs\")\nprint(\"QDQCQBQAQD+1QC+1QB+1QA+1JKDJKCJKBJKA\")\nprint(\"000000010001\")\nprint(\"000100100011\")\nprint(\"001000110001\")\nprint(\"001101000111\")\nprint(\"010001010001\")\nprint(\"010101100011\")\nprint(\"011001110001\")\nprint(\"011110001111\")\nprint(\"100010010001\")\nprint(\"100100001001\")\nprint(\"1010XXXXXXX1\")\nprint(\"1011XXXXXXX1\")\nprint(\"1100XXXXXXXX\")\nprint(\"1101XXXXXXXX\")\nprint(\"1110XXXXXXXX\")\nprint(\"1111XXXXXXXX\")\nprint(\"\")\nprint(\"K\u2212map Simplification\")\nprint(\"For JKD\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190000\")\nprint(\"QD\u2019\u2019QC0010\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u201901XX\")\nprint(\"JKD = QAQD+QAQBQC\")\nprint(\"\")\nprint(\"For JKC\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190010\")\nprint(\"QD\u2019\u2019QC0010\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u201900XX\")\nprint(\"JKC = QAQB\")\nprint(\"\")\nprint(\"For JKB\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190110\")\nprint(\"QD\u2019\u2019QC0110\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u201900XX\")\nprint(\"JKB = QAQD\u2019\u2019\")\nprint(\"\")\nprint(\"For JKA\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20191111\")\nprint(\"QD\u2019\u2019QC1111\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u201911XX\")\nprint(\"JKA = 1\")\nprint(\"\")\nprint(\"Fig shows the logic diagram for the synchronous decade counter using JK flip\u2212flop\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Excitation table\nPresentState NextState Flip\u2212flop Inputs\nQDQCQBQAQD+1QC+1QB+1QA+1JKDJKCJKBJKA\n000000010001\n000100100011\n001000110001\n001101000111\n010001010001\n010101100011\n011001110001\n011110001111\n100010010001\n100100001001\n1010XXXXXXX1\n1011XXXXXXX1\n1100XXXXXXXX\n1101XXXXXXXX\n1110XXXXXXXX\n1111XXXXXXXX\n\nK\u2212map Simplification\nFor JKD\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190000\nQD\u2019\u2019QC0010\nQDQCXXXX\nQDQC\u2019\u201901XX\nJKD = QAQD+QAQBQC\n\nFor JKC\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190010\nQD\u2019\u2019QC0010\nQDQCXXXX\nQDQC\u2019\u201900XX\nJKC = QAQB\n\nFor JKB\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190110\nQD\u2019\u2019QC0110\nQDQCXXXX\nQDQC\u2019\u201900XX\nJKB = QAQD\u2019\u2019\n\nFor JKA\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20191111\nQD\u2019\u2019QC1111\nQDQCXXXX\nQDQC\u2019\u201911XX\nJKA = 1\n\nFig shows the logic diagram for the synchronous decade counter using JK flip\u2212flop\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.38 Page No. 8-64", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "print(\"Excitation table\")\nprint(\"Input PresentState NextState Flip\u2212flop Inputs\")\nprint(\"UP/DOWN\u2019\u2019QCQBQAQC+1QB+1QA+1JKCJKBJKA\")\nprint(\"UD\")\nprint(\"0000111111\")\nprint(\"0001000001\")\nprint(\"0010001011\")\nprint(\"0011010001\")\nprint(\"0100011111\")\nprint(\"0101100001\")\nprint(\"0110101011\")\nprint(\"0111110001\")\nprint(\"1000001001\")\nprint(\"1001010011\")\nprint(\"1010011001\")\nprint(\"1011100111\")\nprint(\"1100101001\")\nprint(\"1101110011\")\nprint(\"1110111001\")\nprint(\"1111000111\")\nprint(\"\")\nprint(\"K\u2212map Simplification\")\nprint(\"For JKC\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20191000\")\nprint(\"QD\u2019\u2019QC1000\")\nprint(\"QDQC0010\")\nprint(\"QDQC\u2019\u20190010\")\nprint(\"JKC = UD\u2019\u2019QB\u2019\u2019QB\u2019\u2019+UDQBQA\")\nprint(\"\")\nprint(\"For JKB\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20191001\")\nprint(\"QD\u2019\u2019QC1001\")\nprint(\"QDQC0110\")\nprint(\"QDQC\u2019\u20190110\")\nprint(\"TB = UD\u2019\u2019QA\u2019\u2019+UDQA\")\nprint(\"\")\nprint(\"For JKA\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20191111\")\nprint(\"QD\u2019\u2019QC1111\")\nprint(\"QDQC1111\")\nprint(\"QDQC\u2019\u20191111\")\nprint(\"TA = 1\")\nprint(\"\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Excitation table\nInput PresentState NextState Flip\u2212flop Inputs\nUP/DOWN\u2019\u2019QCQBQAQC+1QB+1QA+1JKCJKBJKA\nUD\n0000111111\n0001000001\n0010001011\n0011010001\n0100011111\n0101100001\n0110101011\n0111110001\n1000001001\n1001010011\n1010011001\n1011100111\n1100101001\n1101110011\n1110111001\n1111000111\n\nK\u2212map Simplification\nFor JKC\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20191000\nQD\u2019\u2019QC1000\nQDQC0010\nQDQC\u2019\u20190010\nJKC = UD\u2019\u2019QB\u2019\u2019QB\u2019\u2019+UDQBQA\n\nFor JKB\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20191001\nQD\u2019\u2019QC1001\nQDQC0110\nQDQC\u2019\u20190110\nTB = UD\u2019\u2019QA\u2019\u2019+UDQA\n\nFor JKA\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20191111\nQD\u2019\u2019QC1111\nQDQC1111\nQDQC\u2019\u20191111\nTA = 1\n\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.39 Page No. 8-66", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "print(\"For mod\u22125 counter we require 3 flip\u2212flops.\")\nprint(\"Excitation table\")\nprint(\"PresentState NextState Flip\u2212flop Inputs\")\nprint(\"QCQBQAQA+1QB+1QC+1TATBTC\")\nprint(\"0000001001\")\nprint(\"1001010011\")\nprint(\"2010011001\")\nprint(\"3011100111\")\nprint(\"4100000100\")\nprint(\"\")\nprint(\"K\u2212map Simplification\")\nprint(\"QB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\")\nprint(\"QA\u2019\u20190010\")\nprint(\"QA1XXX\")\nprint(\"TA = QA+QBQC\")\nprint(\"\")\nprint(\"QB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\")\nprint(\"QA\u2019\u20190110\")\nprint(\"QA0XXX\")\nprint(\"TB = QC\")\nprint(\"\")\nprint(\"QB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\")\nprint(\"QA\u2019\u20191111\")\nprint(\"QA0XXX\")\nprint(\"TC = QA\u2019\u2019\")\nprint(\"\")\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "For mod\u22125 counter we require 3 flip\u2212flops.\nExcitation table\nPresentState NextState Flip\u2212flop Inputs\nQCQBQAQA+1QB+1QC+1TATBTC\n0000001001\n1001010011\n2010011001\n3011100111\n4100000100\n\nK\u2212map Simplification\nQB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\nQA\u2019\u20190010\nQA1XXX\nTA = QA+QBQC\n\nQB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\nQA\u2019\u20190110\nQA0XXX\nTB = QC\n\nQB\u2019\u2019QC\u2019\u2019QB\u2019\u2019QCQBQCQBQC\u2019\u2019\nQA\u2019\u20191111\nQA0XXX\nTC = QA\u2019\u2019\n\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.40 Page No. 8-67", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "print(\"Excitation table\")\nprint(\"PresentState NextState Flip\u2212flop Inputs\")\nprint(\"QCQBA+B+JAKAJBKB\")\nprint(\"00111X1X\")\nprint(\"01000XX1\")\nprint(\"1001X11X\")\nprint(\"1110X0X1\")\nprint(\"\")\nprint(\"K\u2212map Simplification\")\nprint(\"For JA\")\nprint(\"B\u2019\u2019B\")\nprint(\"A\u2019\u201910\")\nprint(\"AXX\")\nprint(\"JA = B\u2019\u2019\")\nprint(\"\")\nprint(\"For KA\")\nprint(\"B\u2019\u2019B\")\nprint(\"A\u2019\u2019XX\")\nprint(\"A10\")\nprint(\"KA = B\u2019\u2019\")\nprint(\"\")\nprint(\"For JB\")\nprint(\"B\u2019\u2019B\")\nprint(\"A\u2019\u20191X\")\nprint(\"A1X\")\nprint(\"JB = 1\")\nprint(\"\")\nprint(\"For KB\")\nprint(\"B\u2019\u2019B\")\nprint(\"A\u2019\u2019X1\")\nprint(\"AX1\")\nprint(\"KB = 1\")\nprint(\"\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Excitation table\nPresentState NextState Flip\u2212flop Inputs\nQCQBA+B+JAKAJBKB\n00111X1X\n01000XX1\n1001X11X\n1110X0X1\n\nK\u2212map Simplification\nFor JA\nB\u2019\u2019B\nA\u2019\u201910\nAXX\nJA = B\u2019\u2019\n\nFor KA\nB\u2019\u2019B\nA\u2019\u2019XX\nA10\nKA = B\u2019\u2019\n\nFor JB\nB\u2019\u2019B\nA\u2019\u20191X\nA1X\nJB = 1\n\nFor KB\nB\u2019\u2019B\nA\u2019\u2019X1\nAX1\nKB = 1\n\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.41 Page No. 8-67", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "print(\"Mod\u221212 synchronous counter using D flip\u2212flop:\")\nprint(\"Let Number of flip\u2212flop required=n\")\nprint(\"2\u02c6n >= 12\")\nprint(\"n = 4\")\nprint(\"Excitation table\")\nprint(\"PresentState NextState\")\nprint(\"QDQCQBQAQD+1QC+1QB+1QA+1\")\nprint(\"00000001\")\nprint(\"00010010\")\nprint(\"00100011\")\nprint(\"00110100\")\nprint(\"01000101\")\nprint(\"01010110\")\nprint(\"01100111\")\nprint(\"01111000\")\nprint(\"10001001\")\nprint(\"10011010\")\nprint(\"10101011\")\nprint(\"10110000\")\nprint(\"\")\nprint(\"K\u2212map Simplification\")\nprint(\"For DA\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20191001\")\nprint(\"QD\u2019\u2019QC1001\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u20191001\")\nprint(\"DA = QA\u2019\u2019\")\nprint(\"\")\nprint(\"For DB\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190101\")\nprint(\"QD\u2019\u2019QC0101\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u20190101\")\nprint(\"DB = QB\u2019\u2019QaA+QA\u2019\u2019QB\")\nprint(\"DB = QA XOR QB\")\nprint(\"\")\nprint(\"For DC\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190010\")\nprint(\"QD\u2019\u2019QC1101\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u20190000\")\nprint(\"DC = QCQB\u2019\u2019+QCQA\u2019\u2019+QD\u2019\u2019QC\u2019\u2019QBQA\")\nprint(\"\")\nprint(\"For DD\")\nprint(\"QB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\")\nprint(\"QD\u2019\u2019QC\u2019\u20190000\")\nprint(\"QD\u2019\u2019QC0010\")\nprint(\"QDQCXXXX\")\nprint(\"QDQC\u2019\u20191101\")\nprint(\"DD = QDQB\u2019\u2019+QCQBQA+QDQA\u2019\u2019\")\n ", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Mod\u221212 synchronous counter using D flip\u2212flop:\nLet Number of flip\u2212flop required=n\n2\u02c6n >= 12\nn = 4\nExcitation table\nPresentState NextState\nQDQCQBQAQD+1QC+1QB+1QA+1\n00000001\n00010010\n00100011\n00110100\n01000101\n01010110\n01100111\n01111000\n10001001\n10011010\n10101011\n10110000\n\nK\u2212map Simplification\nFor DA\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20191001\nQD\u2019\u2019QC1001\nQDQCXXXX\nQDQC\u2019\u20191001\nDA = QA\u2019\u2019\n\nFor DB\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190101\nQD\u2019\u2019QC0101\nQDQCXXXX\nQDQC\u2019\u20190101\nDB = QB\u2019\u2019QaA+QA\u2019\u2019QB\nDB = QA XOR QB\n\nFor DC\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190010\nQD\u2019\u2019QC1101\nQDQCXXXX\nQDQC\u2019\u20190000\nDC = QCQB\u2019\u2019+QCQA\u2019\u2019+QD\u2019\u2019QC\u2019\u2019QBQA\n\nFor DD\nQB\u2019\u2019QA\u2019\u2019QB\u2019\u2019QAQBQAQBQA\u2019\u2019\nQD\u2019\u2019QC\u2019\u20190000\nQD\u2019\u2019QC0010\nQDQCXXXX\nQDQC\u2019\u20191101\nDD = QDQB\u2019\u2019+QCQBQA+QDQA\u2019\u2019\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.42 Page No. 8-71", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "print(\"The fig.8.99 shows the circuit diagram for a 4\u2212bit,4\u2212statering counter with a single circulating 1.Here,74X194 universal shift register is connected so that it normally preforms a left\u2212shift.However,when RESET is asserted it loads 0001.Once RESET is negated, the 74194 shifts left on each clock pulse.The DSL serial input is connected to the leftmost output(Q3:MSB),so the next states are 0010, 0100,1000,0001,0010,.....Thus the counter counter visits four unique states before repeating.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The fig.8.99 shows the circuit diagram for a 4\u2212bit,4\u2212statering counter with a single circulating 1.Here,74X194 universal shift register is connected so that it normally preforms a left\u2212shift.However,when RESET is asserted it loads 0001.Once RESET is negated, the 74194 shifts left on each clock pulse.The DSL serial input is connected to the leftmost output(Q3:MSB),so the next states are 0010, 0100,1000,0001,0010,.....Thus the counter counter visits four unique states before repeating.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.44 Page No. 8-76", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print(\"Johnson counter is basically at wistedring counter.The fig.8.104(a) shows the basic circuit for a Johnson counter.The table shows the states of a 4\u2212bit Johnson counter.\")\nprint(\"\")\nprint(\"States of 4\u2212bit Johnson counter\")\nprint(\"Statename Q3 Q2 Q1 Q0\")\nprint(\"S1 0 0 0 0\")\nprint(\"S2 0 0 0 1\")\nprint(\"S3 0 0 1 1\")\nprint(\"S4 0 1 1 1\")\nprint(\"S5 1 1 1 1\")\nprint(\"S6 1 1 1 0\")\nprint(\"S7 1 1 0 0\")\nprint(\"S8 1 0 0 0\")\nprint(\"\")\nprint(\"This counter can be modified to have self correcting Johnson counter as shown in fig.8.104(c).Here,the connections are made such that circuit loads 0001 as the next state whenever the current state is 0XX0.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Johnson counter is basically at wistedring counter.The fig.8.104(a) shows the basic circuit for a Johnson counter.The table shows the states of a 4\u2212bit Johnson counter.\n\nStates of 4\u2212bit Johnson counter\nStatename Q3 Q2 Q1 Q0\nS1 0 0 0 0\nS2 0 0 0 1\nS3 0 0 1 1\nS4 0 1 1 1\nS5 1 1 1 1\nS6 1 1 1 0\nS7 1 1 0 0\nS8 1 0 0 0\n\nThis counter can be modified to have self correcting Johnson counter as shown in fig.8.104(c).Here,the connections are made such that circuit loads 0001 as the next state whenever the current state is 0XX0.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 8.45 Page No. 8-78", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "print(\"Johnson counter will produce a modulus of 2xn where n is the number of stages (i.e. flip\u2212flops) in the counter.Therefore, Mod10 requires 5 flip\u2212flops and Mod16 requires 8 flip\u2212flops.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Johnson counter will produce a modulus of 2xn where n is the number of stages (i.e. flip\u2212flops) in the counter.Therefore, Mod10 requires 5 flip\u2212flops and Mod16 requires 8 flip\u2212flops.\n"}], "metadata": {"collapsed": false, "trusted": false}}], "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/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter9_1.ipynb b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter9_1.ipynb new file mode 100755 index 00000000..7bd11aab --- /dev/null +++ b/Analog_And_Digital_Electronics_by__U._A._Bakshi_And_A._P._Godse/Chapter9_1.ipynb @@ -0,0 +1 @@ +{"nbformat_minor": 0, "cells": [{"source": "# Chapter 9", "cell_type": "markdown", "metadata": {}}, {"source": "# Op amp Applications", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 9.1 Page No. 9-6", "cell_type": "markdown", "metadata": {}}, {"execution_count": 41, "cell_type": "code", "source": "import math\n\nprint(\"The differential amplifier is represented as shown in fig.9.5.\")\nprint(\"(i)CMRR = 100\")\nvd = 300-240\nprint \"Vd(in uV)=V1\u2212V2=\",vd,\"uV\"\nvc=(300+240)/2\nprint \"Vc(in uV)=V1+V2/2=\",vc,\"uV\"\nprint(\"CMRR=Ad/Ac\")\nac=5000/100\nprint \"Therefore,Ac=\",ac\nvo=((5000*60)+(50*270))*pow(10,-3)\nprint \"Therefore,Vo(in mV)=Ad\u2217Vd+Ac\u2217Vc=\",vo,\"mV\"\nprint(\"(ii)CMRR=10\u02c65\")\nac=5000.0/pow(10,5)\nprint \"Therefore,Ac=Ad/CMRR=\",ac\nvo=((5000*60)+(0.05*270))*pow(10,-3)\nprint\"Therefore,Vo(in mV)=Ad\u2217Vd+Ac\u2217Vc=\",vo,\"mV\"\nprint(\"Ideally Ac must be zero and output should be only Ad\u2217Vd which is 5000\u221760\u221710\u02c6\u22126 i.e.300mV.It can be seen that higher the value of CMRR,the output is almost proportional to the difference voltage Vd,rejecting the common mode signal.So ideal value of CMRR for a differential amplifier is infinity.\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The differential amplifier is represented as shown in fig.9.5.\n(i)CMRR = 100\nVd(in uV)=V1\u2212V2= 60 uV\nVc(in uV)=V1+V2/2= 270 uV\nCMRR=Ad/Ac\nTherefore,Ac= 50\nTherefore,Vo(in mV)=Ad\u2217Vd+Ac\u2217Vc= 313.5 mV\n(ii)CMRR=10\u02c65\nTherefore,Ac=Ad/CMRR= 0.05\nTherefore,Vo(in mV)=Ad\u2217Vd+Ac\u2217Vc= 300.0135 mV\nIdeally Ac must be zero and output should be only Ad\u2217Vd which is 5000\u221760\u221710\u02c6\u22126 i.e.300mV.It can be seen that higher the value of CMRR,the output is almost proportional to the difference voltage Vd,rejecting the common mode signal.So ideal value of CMRR for a differential amplifier is infinity.\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.2 Page No. 9-13", "cell_type": "markdown", "metadata": {}}, {"execution_count": 42, "cell_type": "code", "source": "import math\n\nprint(\"The two input base currents are\")\nprint(\"Ibi = 18uA and Ib2 = 22uA\")\nprint(\"i) The input bias current is\")\nprint(\"Ib = (Ib1+Ib2)/2\")\nIb = (18+22)/2\nprint \"Ib = \",Ib,\"uA\"\nprint(\"ii) The input offset current is\")\nprint(\"Iios = |Ib1 - Ib2|\")\nIios = abs(18-22)\nprint \"Iios = \",Iios,\"uA\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The two input base currents are\nIbi = 18uA and Ib2 = 22uA\ni) The input bias current is\nIb = (Ib1+Ib2)/2\nIb = 20 uA\nii) The input offset current is\nIios = |Ib1 - Ib2|\nIios = 4 uA\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.3 Page No. 9-14", "cell_type": "markdown", "metadata": {}}, {"execution_count": 43, "cell_type": "code", "source": "import math\n\nprint(\"IiOS = 20nA,Ib = 60nA\")\nprint(\"Now IiOS = Ib1\u2212Ib2 = 20\")\nprint(\"Ib = Ib1+Ib2/2 = 60\")\nprint(\"Therefore,Ib1+Ib2 = 120\")\nprint(\"Therefore,2\u2217Ib1 = 140\")\nprint(\"Therefore,Ib1 = 70nA,Ib2 = 50nA\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "IiOS = 20nA,Ib = 60nA\nNow IiOS = Ib1\u2212Ib2 = 20\nIb = Ib1+Ib2/2 = 60\nTherefore,Ib1+Ib2 = 120\nTherefore,2\u2217Ib1 = 140\nTherefore,Ib1 = 70nA,Ib2 = 50nA\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.4 Page No. 9-30", "cell_type": "markdown", "metadata": {}}, {"execution_count": 44, "cell_type": "code", "source": "import math\n\nprint(\"VUT = +4V,VLT = \u22124V,Supply = +\u221215V\")\nprint(\"+\u2212Vsat = 0.9x[Supply] = +\u221213.5V = Vo\")\nprint(\"For op\u2212amp741,IB(max) = 500nA\")\nprint(\"Therefore,I2 = 100IB(max) = 50uA\")\nr2=(4.0/(50.0*pow(10,-6)))*pow(10,-3)\nprint \"Therefore,R2(in kohm) = VUT/I2 =\",r2,\"KOhm\"\ni2=(4.0/(82.0*pow(10,3)))*pow(10,6)\nprint \"Recalculating I2, I2 = VUT/R2 =\",round(i2,2),\"uA\"\nr1=((13.5-4)/(48.78*pow(10,-6)))*pow(10,-3)\nprint \"Therefore,R1 = Vo\u2212VUT/I2 = +Vsat\u2212VUT/I2 =\",round(r1,2),\"KOhm (Use 180KOhm Standard)\"\nprint(\"The designed circuit is shown in fig 9.32\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "VUT = +4V,VLT = \u22124V,Supply = +\u221215V\n+\u2212Vsat = 0.9x[Supply] = +\u221213.5V = Vo\nFor op\u2212amp741,IB(max) = 500nA\nTherefore,I2 = 100IB(max) = 50uA\nTherefore,R2(in kohm) = VUT/I2 = 80.0 KOhm\nRecalculating I2, I2 = VUT/R2 = 48.78 uA\nTherefore,R1 = Vo\u2212VUT/I2 = +Vsat\u2212VUT/I2 = 194.75 KOhm (Use 180KOhm Standard)\nThe designed circuit is shown in fig 9.32\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.5 Page No. 9-32", "cell_type": "markdown", "metadata": {}}, {"execution_count": 45, "cell_type": "code", "source": "import math\n\nprint(\"VCC = +15V\")\nvsat=0.9*15\nprint \"Therefore,Vsat(in V) = 0.9VCC =\",vsat,\"V\"\nprint(\"R1 = 51kohm, R2 = 120ohm\")\nvut=(13.5*120)/((51*pow(10,3))+120)\nprint \"VUT(in V) = +Vsat\u2217R2/R1+R2 =\",round(vut,5),\"V\"\nvlt=(-13.5*120)/((51*pow(10,3))+120)\nprint \"VLT(in V) =\u2212Vsat\u2217R2/R1+R2 =\",round(vlt,5),\"V\"\nh=(0.03169*2)*pow(10,3)\nprint \"H(in mV) = VUT\u2212VLT =\",h,\"mV\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "VCC = +15V\nTherefore,Vsat(in V) = 0.9VCC = 13.5 V\nR1 = 51kohm, R2 = 120ohm\nVUT(in V) = +Vsat\u2217R2/R1+R2 = 0.03169 V\nVLT(in V) =\u2212Vsat\u2217R2/R1+R2 = -0.03169 V\nH(in mV) = VUT\u2212VLT = 63.38 mV\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.6 Page No. 9-33", "cell_type": "markdown", "metadata": {}}, {"execution_count": 46, "cell_type": "code", "source": "import math\n\nprint(\"As input is applied to the non\u2212inverting terminal, the circuit is non\u2212inverting Schmitt trigger.\")\nprint(\"R1 = 100kohm,R2 = 1kohm\")\nvut=13.5*(0.01) #Note 1/100 = 0.01\nprint \"Therefore,VUT(in V) = +Vsat\u2217R2/R1=\",vut,\"V\"\nvlt=-13.5*(0.01) #Note 1/100 = 0.01\nprint \"Therefore,VLT(in V) = \u2212Vsat\u2217R2/R1 =\",vlt,\"V\"", "outputs": [{"output_type": "stream", "name": "stdout", "text": "As input is applied to the non\u2212inverting terminal, the circuit is non\u2212inverting Schmitt trigger.\nR1 = 100kohm,R2 = 1kohm\nTherefore,VUT(in V) = +Vsat\u2217R2/R1= 0.135 V\nTherefore,VLT(in V) = \u2212Vsat\u2217R2/R1 = -0.135 V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.7 Page No. 9-36", "cell_type": "markdown", "metadata": {}}, {"execution_count": 47, "cell_type": "code", "source": "import math\n\nprint(\"The given comparator is inverting Schmitt trigger with R1 = 4KOhm and R2 = 1KOhm\")\nprint(\"Vsat = 0.9 Vcc = 0.9x12 = 10.8 V\")\nprint(\"The threshold levels are,\")\nprint(\"Vut = (+Vsat*R2)/(R1+r2)\")\nVut = (10.8*1.0)/(1.0+4.0)\nprint \"Vut = \",Vut,\"V\"\nprint(\"VLt = (-Vsat*R2)/(R1+r2)\")\nVut = (-10.8*1.0)/(1.0+4.0)\nprint \"Vut = \",Vut,\"V\"\nprint(\"Vin = 10V\")", "outputs": [{"output_type": "stream", "name": "stdout", "text": "The given comparator is inverting Schmitt trigger with R1 = 4KOhm and R2 = 1KOhm\nVsat = 0.9 Vcc = 0.9x12 = 10.8 V\nThe threshold levels are,\nVut = (+Vsat*R2)/(R1+r2)\nVut = 2.16 V\nVLt = (-Vsat*R2)/(R1+r2)\nVut = -2.16 V\nVin = 10V\n"}], "metadata": {"collapsed": false, "trusted": false}}, {"source": "## Example 9.8 Page No. 9-38", "cell_type": "markdown", "metadata": {}}, {"execution_count": 48, "cell_type": "code", "source": "import math\n\nprint(\"LTP =\u22121.5V and H=2V\")\nprint(\"Now H=UTP\u2212LTP\")\nprint(\"Therefore,2=UTP\u2212(\u22121.5)\")\nprint(\"Therefore,UTP=0.5V\")\nprint(\"Inthefig.9.47,the angle theta can be obtained from equation of sinewave. Sinewave is represented as,\")\nprint(\"Vin=Vp\u2217sin(pi+thata) when piVUT,the output switches from +Vsat to \u2212Vsat.While as long as Vin>VLT,the output is at \u2212Vsat= \u221210V and when VinVUT,the output switches from +Vsat to \u2212Vsat.While as long as Vin>VLT,the output is at \u2212Vsat= \u221210V and when Vin" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Plot for output voltage shown in figure\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 - Page 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import numpy as np\n", + "# Given data\n", + "R= 500 # in k\u03a9\n", + "R= R*10**3 # in \u03a9\n", + "C= 10 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "vout= 12 # in V\n", + "v= -0.5 # in V\n", + "# given output equation : vout= -1/RC * integrate[v(t) * dt + A] \n", + "# Evaluation the integration\n", + "def integrand(t):\n", + " return -t\n", + "ans, err = quad(integrand, 0, 1)\n", + "vout_by_t= -1/(R*C)*ans #in V/sec\n", + "# Time required for saturation of output voltage\n", + "t= vout/vout_by_t # in sec\n", + "print \"The time duration required for saturation of output voltage = %0.f seconds\" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time duration required for saturation of output voltage = 120 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 - Page 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from sympy import symbols, simplify, sin\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "# Given data\n", + "fa= 1 # in kHz\n", + "fa=fa*10**3 # in Hz\n", + "Vp=1.5 # in volt\n", + "f= 200 # in Hz\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 1/(2*np.pi*fa*C) # in ohm\n", + "R=R*10**-3 # in k ohm\n", + "R=np.floor(R*10)/10 # in k ohm\n", + "fb= 20*fa # in Hz\n", + "R_desh= 1/(2*np.pi*fb*C) # in ohm\n", + "# Let\n", + "R_desh= 82 # in ohm\n", + "R_OM= R # in k ohm\n", + "print \"Value of R_OM = %0.1f k ohm\" %R_OM\n", + "CR= C*R \n", + "# Vin= Vp*sin(omega*t)= 1.5*sin(400*t)\n", + "# v_out= -CR*diff(v_in) = -0.2827 Cos(400*pi*t)# in micro volt\n", + "print \"Output Voltage = -0.2827 Cos(400*pi*t)\" \n", + "t = np.arange(0, .015, 1.0/44100)\n", + "v_out=-0.2827*np.sin(400*np.pi*t+np.pi/2)# in micro volt\n", + "plot(t,v_out) \n", + "plt.title('Output Voltage Waveform')\n", + "plt.xlabel('Time in ms')\n", + "plt.ylabel('Vout in Volts') \n", + "print \"Output Voltage waveform is shown in figure.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R_OM = 1.5 k ohm\n", + "Output Voltage = -0.2827 Cos(400*pi*t)\n", + "Output Voltage waveform is shown in figure." + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXlYVVXb/7/nCCqKA6ghk6IMCoLgiEMKDqiUmmk5paE2\nvU0+T4Opv95KGzXzqcznLa0s0xyyTDSVHBFNEAcMFZxQFEENRXCWaf3+WJ4DCAcO5+x91j5735/r\n4tJz2GfvL2z2+q573WvdS8cYYyAIgiAIK9GLFkAQBEGoAzIUgiAIQhLIUAiCIAhJIEMhCIIgJIEM\nhSAIgpAEMhSCIAhCEshQCKIaJk2ahHfeeUe0DMXw119/wd/fH40aNcL69etFyyEUBhkKUWt+/PFH\nhISEoGHDhnB3d8dLL72EgoICsz/v4+ODHTt2SKanuvNlZ2fD0dERZ86cqfS9xx9/HNOmTav23Dqd\nDjqdDgAQHx8Pb29v6wVbwODBg/Hpp58aX2dnZ0Ov11f53j///CObjnfffRdTp07FjRs3MHz4cNmu\nQ9gnZChErZg/fz5mzJiB+fPn4/r160hKSsK5c+cQFRWFoqIis86h0+kg5Xra6s7n6emJAQMGYNmy\nZRXez8vLw+bNmzFp0qQaz6+Etb8RERFISEgwvk5ISED79u0rvRcQEICHHnpINh3nz59HUFCQRZ8t\nKSmRWA2hOBhBmElBQQFzdnZma9asqfD+zZs3WYsWLdiSJ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GjRtRVFSEV199Fb/99hsO\nHDiAyZMn4+233650nvLVeXU6HUpKSrBv3z588cUXmD17dpXXTk1NxaJFi5Ceno5ly5YhIyMDycnJ\nePbZZ/HVV18BAD744ANs2bIFhw8fxoYNG+T7RRCEmSiqfD1BKAWdTofo6GjUqVMHwcHBKC0txeDB\ngwEAISEhyMzMxMmTJ3Hs2DEMHDgQAFBSUgIPD48az22o3tq5c2dkZmZWeUy3bt2M+4/4+fkZrx0c\nHIydO3cCAHr37o2YmBiMHj3aeE6CEAkZCkGYoG7dugAAvV5v3LHO8Lq4uBiMMXTo0AF79+6t1Xnr\n1asHAKhTp45x6MzUMYbrGV4brg3w3fSSk5OxceNGdOnSBQcPHoSrq2uttBCElNCQF0FUgTlzVdq1\na4fc3FwkJSUBAIqKipCWlmbx+WpLRkYGunfvjtmzZ6NFixZWb3dLENZCEQqhecrnN6r6f/ljyr92\ndHTEr7/+iqlTp6KgoADFxcV47bXXEBQUZPIa5rxf3Y6I5b/31ltv4dSpU2CMYeDAgZJtJ0sQlkLT\nhgmCIAhJoCEvgiAIQhLIUAiCIAhJIEMhCIIgJIEMhSAIgpAEMhSCIAhCEshQCIIgCEkgQyEIgiAk\ngQyFIAiCkIT/D1aoyBiLHf2sAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 - Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 50 # in k\u03a9\n", + "R3=15 # in k\u03a9\n", + "R4=R3 # in k\u03a9\n", + "# For minimum differential voltage gain,\n", + "Ad_min= 5 # and\n", + "Ad= Ad_min \n", + "# From Ad= 1+2*R2/R1\n", + "R2= (Ad-1)*R1/2 # in k\u03a9\n", + "# For maximum differential voltage gain,\n", + "Ad_max= 200 # and\n", + "Ad= Ad_max \n", + "# From Ad= 1+2*R2/R1\n", + "R1_min= round(2*R2/(Ad-1)) # in k\u03a9\n", + "print \"The value of R1 = %0.f - 50 k\u03a9 potentiometer\" %R1_min\n", + "print \"The value of R2 = %0.f k\u03a9\" %R2\n", + "print \"The value of R3 and R4 = %0.f k\u03a9 each\" %R3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 1 - 50 k\u03a9 potentiometer\n", + "The value of R2 = 100 k\u03a9\n", + "The value of R3 and R4 = 15 k\u03a9 each\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb new file mode 100644 index 00000000..3dccad74 --- /dev/null +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper05.ipynb @@ -0,0 +1,440 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7f84289e42d01b19d3ca56822b4d2fb25574e2434ae2096a05b0c50827f2c4a4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter -5 Waveform Generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 - Page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C= 0.01 # in \u00b5F\n", + "C=C*10**-6 # in F\n", + "R_A= 2 # in k\u03a9\n", + "R_A=R_A*10**3 # in \u03a9\n", + "R_B= 100 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "T_HIGH= 0.693*(R_A+R_B)*C #charging period in second\n", + "T_LOW= 0.693*R_B*C # discharging period in second\n", + "T= T_HIGH+T_LOW # overall period of oscillations in second\n", + "f= 1/T # frequency of oscillations in Hz\n", + "D= T_HIGH/T*100 # duty cycle in %\n", + "print \"The frequency of oscillations = %0.1f Hz\" %f\n", + "print \"Duty cycle = %0.1f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of oscillations = 714.4 Hz\n", + "Duty cycle = 50.5 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 - Page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C= 1 # in \u00b5F\n", + "C=C*10**-6 # in F\n", + "R_A= 4.7 # in k\u03a9\n", + "R_A=R_A*10**3 # in \u03a9\n", + "R_B= 1 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "T_on= 0.693*(R_A+R_B)*C #positive pulse width in second\n", + "T_on= T_on*10**3 # in ms\n", + "T_off= 0.693*R_B*C # pulse width in second\n", + "T_off= T_off*10**3 # in ms\n", + "f= 1.4/((R_A+2*R_B)*C) # free running frequency in Hz\n", + "D= round((R_A+R_B)/(R_A+2*R_B)*100) # in %\n", + "print \"The positive pulse width = %0.2f ms\" %T_on\n", + "print \"The negative pulse width = %0.3f ms\" %T_off\n", + "print \"The frequency of oscillations = %0.1f Hz\" %f\n", + "print \"Duty cycle = %0.f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The positive pulse width = 3.95 ms\n", + "The negative pulse width = 0.693 ms\n", + "The frequency of oscillations = 209.0 Hz\n", + "Duty cycle = 85 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 - Page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C= 0.01 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "f= 1 # in kHz\n", + "f= f*10**3 # in Hz\n", + "# For 50% duty cycle, Ton= Toff = T/2 and R_A= R_B\n", + "# From equation, f= 1.44/((R_A+R_B)*C)= 1.44/(2*R_A*C)\n", + "R_A= 1.44/(2*f*C) # in \u03a9\n", + "R_A= R_A*10**-3 # in k\u03a9\n", + "R_B= R_A # in k\u03a9\n", + "print \"The value of R_A and R_B = %0.f k\u03a9 (Standard value 68 k\u03a9)\" %R_A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A and R_B = 72 k\u03a9 (Standard value 68 k\u03a9)\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 - Page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f= 700 # in Hz\n", + "C= 0.01 # in \u00b5F (assumed)\n", + "C= C*10**-6 # in F\n", + "# For 50% duty cycle, Ton= Toff = T/2 and R_A= R_B\n", + "# From equation, f= 1.44/((R_A+R_B)*C)= 1.44/(2*R_A*C)\n", + "R_A= 1.44/(2*f*C) # in \u03a9\n", + "R_A= R_A*10**-3 # in k\u03a9\n", + "R_B= R_A # in k\u03a9\n", + "C= C*10**6 # in \u00b5F\n", + "print \"The value of R_A and R_B = %0.f k\u03a9 (Standard value 100 k\u03a9)\" %R_A\n", + "print \"The value of C = %0.2f \u00b5F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A and R_B = 103 k\u03a9 (Standard value 100 k\u03a9)\n", + "The value of C = 0.01 \u00b5F\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 - Page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f= 800 # in Hz\n", + "C= 0.01 # in \u00b5F (assumed)\n", + "C= C*10**-6 # in F\n", + "D= 60 # in duty cycle in %\n", + "# D= (R_A+R_B)/(R_A+2*R_B)*100= 60 or\n", + "# R_B= 2*R_A\n", + "R_A= 1.44/(f*5*C) # in \u03a9 (From f=1.44/((R_A+2*R_B)*C))\n", + "R_A= R_A*10**-3 #in k\u03a9\n", + "R_B= 2*R_A # in k\u03a9\n", + "C= C*10**6 #in F\n", + "print \"The value of R_A = %0.f k\u03a9\" %R_A\n", + "print \"The value of R_B = %0.f k\u03a9\" %R_B\n", + "print \"The value of C = %0.2f \u00b5F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 36 k\u03a9\n", + "The value of R_B = 72 k\u03a9\n", + "The value of C = 0.01 \u00b5F\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 - Page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "import math\n", + "# Given data\n", + "Rs= 5*10**3 #series resistance in \u03a9\n", + "Ls= 0.8 # seried inductance in H\n", + "Cs= 0.08*10**-12 #series capacitance in F\n", + "Cp= 1.0*10**-12 # parallel capacitance in F\n", + "fs= 1/(2*pi*math.sqrt(Ls*Cs)) # series resonant frequency in Hz\n", + "fs= fs*10**-3 # in kHz\n", + "fp= 1/(2*pi)*math.sqrt((1+Cs/Cp)/(Ls*Cs)) # parallel resonant frequency in Hz\n", + "fp= fp*10**-3 # in kHz\n", + "print \"The series resonant frequency = %0.f kHz\" %fs\n", + "print \"The parallel resonant frequency = %0.f kHz\" %fp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The series resonant frequency = 629 kHz\n", + "The parallel resonant frequency = 654 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 - Page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C1= 1000*10**-12 # in F\n", + "C2= 100*10**-12 # in F\n", + "f= 1*10**6 # in Hz\n", + "R1= 1*10**6 # in \u03a9 (assume)\n", + "R2= 10*10**3 # in \u03a9 (assume)\n", + "Rs= 800 # in \u03a9\n", + "VDD= 5 # in V\n", + "C_T= C1*C2/(C1+C2) #total capacitance in F\n", + "# At resonance, X_L= X_CT or 2*pi*f*L= 1/(2*pi*f*C_T), So\n", + "L= 1/((2*pi*f)**2*C_T) # in H\n", + "L= L*10**3 # in mH\n", + "print \"The value of inductance = %0.3f mH\" %L\n", + "i_p= VDD/(R1+R2+Rs) #current through crystal in A\n", + "# Power dissipated in the crystal,\n", + "P_D= (0.707*i_p)**2*Rs # in W\n", + "P_D= P_D*10**9 #in nW\n", + "print \"The power dissipated in the crystal = %0.1f nW\" %P_D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of inductance = 0.279 mH\n", + "The power dissipated in the crystal = 9.8 nW\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 - Page 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R= 12*10**3 # in \u03a9\n", + "R1= 120*10**3 # in \u03a9\n", + "Rf= 1*10**6 # in \u03a9\n", + "C= 0.1*10**-6 # in F\n", + "Vsupply= 12 # in V\n", + "Vsat= 10 #in V\n", + "#Part (i) : Signal frequency,\n", + "f= Rf/(4*R1*R*C) # in Hz\n", + "f= f*10**-3 # in kHz\n", + "print \"Part (i) : The signal frequency = %0.3f kHz\" %f\n", + "# Part (ii) : Amplitude of triangular wave,\n", + "Vpp= 2*R1/Rf*Vsat # Vp-p\n", + "print \"Part (ii) : Amplitude of the triangular wave = %0.1f Vp-p\" %Vpp\n", + "# Amplitude of square wave,\n", + "Vpp= Vsat-(-Vsat) #Vp-p\n", + "print \"Amplitude of the square wave = %0.f Vp-p\" %Vpp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : The signal frequency = 1.736 kHz\n", + "Part (ii) : Amplitude of the triangular wave = 2.4 Vp-p\n", + "Amplitude of the square wave = 20 Vp-p\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 - Page 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from __future__ import division\n", + "# Given data\n", + "I_Bmax= 500 # in nA\n", + "I_Bmax= I_Bmax*10**-9 # in A\n", + "VCC= 10 # in V\n", + "f= 10*10**3 # in Hz\n", + "I1= 500*10**-6 # current through R1 in A (assume)\n", + "Vout= (VCC-1) #output voltage in V\n", + "# Rf+R1= Vout/I1 and Rf= 2*R1, so\n", + "R1= Vout/(3*I1) # in \u03a9\n", + "R1= R1*10**-3 # in k\u03a9\n", + "print \"The value of R1 = %0.1f k\u03a9 (standard value 5.6 k\u03a9)\" %R1\n", + "R1= 5.6 # in k\u03a9 (standard value)\n", + "Rf= 2*R1 # in k\u03a9\n", + "print \"The value of Rf = %0.1f k\u03a9 (standard value 12 k\u03a9)\" %Rf\n", + "R= R1 # in k\u03a9\n", + "R= R*10**3 # in \u03a9\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**12 # in pF\n", + "print \"The value of C = %0.f pF (Standard capacitor 2700 pF)\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 6.0 k\u03a9 (standard value 5.6 k\u03a9)\n", + "The value of Rf = 11.2 k\u03a9 (standard value 12 k\u03a9)\n", + "The value of C = 2842 pF (Standard capacitor 2700 pF)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 - Page 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 1*10**3 # in \u03a9\n", + "C= 4.7*10**-6 # in F\n", + "omega= 1/(R*C) # radians/second\n", + "f= omega/(2*pi) # in Hz\n", + "print \"The frequency of oscillation = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of oscillation = 33.86 Hz\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb new file mode 100644 index 00000000..9e3c7e2e --- /dev/null +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper06.ipynb @@ -0,0 +1,107 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:35cefa1a4ef186a1d32cec5eab7cbcc5a59aadb0b75b7fb4053796fe08e1ae51" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter -6 Digitally Controlled Frequency Synthesizers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 - Page 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "import math\n", + "from fractions import Fraction \n", + "# Given data\n", + "R1= 15*10**3 # in \u03a9\n", + "C1= 0.01*10**-6 # in F\n", + "C2= 10*10**-6 # in F\n", + "R2= 3.6*10**3 # in \u03a9\n", + "Vpos= 12 # in V\n", + "Vneg= -12 # in V\n", + "f_out= 1.2/(4*R1*C1) # free running frequency in Hz\n", + "f_out= f_out*10**-3 # in kHz\n", + "print \"The free running frequency = %0.f kHz\" %f_out \n", + "f_L= 8*f_out/(Vpos-(Vneg)) #Lock-range in kHz\n", + "print \"Lock-range of the circuit = \u00b1 \", Fraction(f_L).limit_denominator(100), \"kHz\" \n", + "f_L= f_L*10**3 # in Hz\n", + "f_C= math.sqrt(f_L/(2*pi*R2*C2)) # Hz\n", + "print \"Capture-range of the circuit = \u00b1 %0.2f Hz\" %f_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The free running frequency = 2 kHz\n", + "Lock-range of the circuit = \u00b1 2/3 kHz\n", + "Capture-range of the circuit = \u00b1 54.29 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 - Page 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_out_max= 200 # in kHz\n", + "f_lowest= 1 # in Hz\n", + "# Frequency of reference oscillator,\n", + "f_ref_os= 2.2*f_out_max # in kHz\n", + "print \"The frequency of reference oscillator = %0.f kHz\" %f_ref_os\n", + "# Formula used : f_lowest= f_ref_os/2**n\n", + "n= round(math.log(f_ref_os*10**3/f_lowest, 10)/math.log(2,10))\n", + "print a\n", + "print \"The number of bits required = %0.f\" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of reference oscillator = 440 kHz\n", + "19.0\n", + "The number of bits required = 19\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb new file mode 100644 index 00000000..5d533560 --- /dev/null +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper07.ipynb @@ -0,0 +1,674 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f8c6689b27d28f641fc8e24d065a4f69d8ad2a49bb0688697280bb451473eab1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-7 Active Filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 - Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from __future__ import division\n", + "# Given data\n", + "f_H= 2*10**3 #cut-off frequency in Hz\n", + "C= 0.01*10**-6 # in F\n", + "passband_gain= 2.5 \n", + "R= 1/(2*pi*f_H*C) # in \u03a9\n", + "R= 8.2 # in k\u03a9 (standard value)\n", + "# 1+Rf/R1= passband_gain or Rf should be equal to 1.5*R1 since Rf||R1= R\n", + "R1= passband_gain/1.5*R # in k\u03a9\n", + "print \"The value of R1 = %0.2f k\u03a9 (Standard value 15 k\u03a9)\" %R1 \n", + "Rf= int(1.5*R1) # in k\u03a9\n", + "print \"The value of Rf = %0.f k\u03a9\" % Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 13.67 k\u03a9 (Standard value 15 k\u03a9)\n", + "The value of Rf = 20 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 - Page 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_H= 2*10**3 #cut-off frequency in Hz\n", + "C= 0.033*10**-6 # in F\n", + "R= 1/(2*pi*f_H*C) # in \u03a9\n", + "# 2*R= Rf*R1/(Rf+R1)= 0.586*R1**2/(1.586*R1) since Rf= 0.586*R1\n", + "R1= 2*R*1.586/0.586 # in \u03a9\n", + "R1= round(R1*10**-3) # in k\u03a9\n", + "print \"The value of R1 = %0.f k\u03a9 (Standard value 15 kohm)\" %R1\n", + "R1= 15 # in k\u03a9\n", + "Rf= R1*0.586 # in k\u03a9\n", + "#Rf= floor(1.5*R1) # in k\u03a9\n", + "print \"The value of Rf = %0.2f k\u03a9\" %Rf\n", + "print \"(The value of Rf may be taken as a pot of 10 k\u03a9)\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 13 k\u03a9 (Standard value 15 kohm)\n", + "The value of Rf = 8.79 k\u03a9\n", + "(The value of Rf may be taken as a pot of 10 k\u03a9)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 - Page 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_H= 1*10**3 #cut-off frequency in Hz\n", + "C= 0.0047*10**-6 # in F\n", + "R= 1/(2*pi*f_H*C) # in \u03a9\n", + "R= (R*10**-3) # in k\u03a9\n", + "R1= 30 # in k\u03a9 (assume)\n", + "Rf= 0.586*R1 # in k\u03a9\n", + "C= C*10**6 # in \u00b5F\n", + "print \"The value of R'= R = %0.2f k\u03a9 (standard value 33 k\u03a9)\" %R\n", + "print \"The value of C'= C = %0.4f \u00b5F \" %C\n", + "print \"The value of R1= %0.2f k\u03a9 \" %R1 \n", + "print \"The value of Rf= %0.2f k\u03a9 (standard value 20 k\u03a9 pot)\" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R'= R = 33.86 k\u03a9 (standard value 33 k\u03a9)\n", + "The value of C'= C = 0.0047 \u00b5F \n", + "The value of R1= 30.00 k\u03a9 \n", + "The value of Rf= 17.58 k\u03a9 (standard value 20 k\u03a9 pot)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 - Page 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "fc= 1*10**3 # in Hz\n", + "alpha= 1.414 \n", + "C= 0.1*10**-6 # in F (assume)\n", + "C_desh= C*alpha**2/4 # in F\n", + "C_desh= C_desh*10**6 # in \u00b5F\n", + "print \"The value of C' = %0.2f \u00b5F\" %C_desh\n", + "C_desh= C_desh*10**-6 # in F\n", + "R_desh= 1/(2*pi*fc*math.sqrt(C*C_desh)) # in \u03a9\n", + "R_desh= R_desh*10**-3 # in k\u03a9\n", + "print \"The value of R' = %0.2f k\u03a9 (standard value 2.2 k\u03a9)\"%R_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C' = 0.05 \u00b5F\n", + "The value of R' = 2.25 k\u03a9 (standard value 2.2 k\u03a9)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 - Page 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "alpha= 1.414 # passband\n", + "C= 0.01*10**-6 # in F (assume)\n", + "fc= 1*10**3 # in Hz\n", + "dc_gain= 6 \n", + "R= 1/(2*pi*C*fc) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "print \"The value of R = %0.1f k\u03a9 (standard value 15 k\u03a9)\" %R\n", + "R= 15 # in k\u03a9\n", + "Af= 3-alpha # and Af= 1+Rf/R1 or\n", + "# Rf= (Af-1)*R1 (i)\n", + "# 2*R= Rf || R1, hence from (i)\n", + "R1= 2*R*Af/(Af-1) # in k\u03a9\n", + "print \"The value of R1 = %0.1f k\u03a9 (standard value 82 k\u03a9)\" %R1\n", + "R1= 82 # in k\u03a9\n", + "Rf= (Af-1)*R1 # in k\u03a9\n", + "print \"The value of Rf = %0.f k\u03a9 (standard value 47 k\u03a9)\" %Rf\n", + "Aamp= dc_gain/Af \n", + "print \"The value of Aamp = %0.2f\" %Aamp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 15.9 k\u03a9 (standard value 15 k\u03a9)\n", + "The value of R1 = 81.2 k\u03a9 (standard value 82 k\u03a9)\n", + "The value of Rf = 48 k\u03a9 (standard value 47 k\u03a9)\n", + "The value of Aamp = 3.78\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 - Page 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 2.1*10**3 # in k\u03a9\n", + "C= 0.05*10**-6 # in F\n", + "R1= 20*10**3 # in \u03a9\n", + "Rf= 60*10**3 # in \u03a9\n", + "# Low cut-off frequency,\n", + "f_L= 1/(2*pi*R*C) # in Hz\n", + "f_L= f_L*10**-3 # in kHz\n", + "print \"The cut-off frequency = %0.3f kHz\" %f_L" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut-off frequency = 1.516 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 - Page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "# Given data\n", + "R1= 2*10**3 # in \u03a9\n", + "R2= 2/3*10**3 # in \u03a9\n", + "R3= 200*10**3 # in \u03a9\n", + "C= 0.1*10**-6 # in F\n", + "Af= R3/(2*R1) # gain\n", + "print \"The value of Af = %0.f\" %Af\n", + "# R1= Q/(2*pi*f_C*C*Af) (i)\n", + "# R2= Q/(2*pi*f_C*C*(2*Q**2-Af)) (ii)\n", + "# R3= Q/(pi*f_C*C) (iii)\n", + "Q= math.sqrt((R3/(2*R2)+Af)/2) # from (ii) and (iii)\n", + "print \"The value of Q = %0.f\" %Q\n", + "f_C= Q/(R3*pi*C) # in Hz (from (iii))\n", + "print \"The value of f_C = %0.f Hz\" %f_C\n", + "omega_0= 2*pi*f_C # in radians/second\n", + "print \"The value of omega_0 = %0.f radians/seconds\" %omega_0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Af = 50\n", + "The value of Q = 10\n", + "The value of f_C = 159 Hz\n", + "The value of omega_0 = 1000 radians/seconds\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 - Page 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_L= 2*10**3 # in Hz\n", + "f_H= 2.5*10**3 # in Hz\n", + "Af= -5 \n", + "f_C= math.sqrt(f_L*f_H) # centre frequency in Hz\n", + "del_f= f_H-f_L #bandwidth in Hz\n", + "Q= f_C/del_f # selectivity\n", + "# Assume C1= C2= C= 0.01\u00b5F\n", + "C= 0.01*10**-6 # in F\n", + "R3= 1/(pi*del_f*C) # in \u03a9\n", + "R3= R3*10**-3 # in k\u03a9\n", + "print \"The value of R3 = %0.2f k\u03a9 (standard value 64 k\u03a9)\" %R3\n", + "R3= 64 # in k\u03a9\n", + "R3= R3*10**3 # in \u03a9\n", + "R1= -R3/(2*Af) #in \u03a9\n", + "R2= R1/(4*pi**2*f_C**2*R1*R3*C**2-.1)\n", + "R1= R1*10**-3 # in k\u03a9\n", + "C=C*10**6 # in \u00b5F\n", + "print \"The value of R1 = %0.1f k\u03a9 \" %R1\n", + "print \"The value of R2 = %0.f k\u03a9 (standard value 800\u03a9)\" %R2\n", + "print \"The value of C = %0.2f \u00b5F \" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R3 = 63.66 k\u03a9 (standard value 64 k\u03a9)\n", + "The value of R1 = 6.4 k\u03a9 \n", + "The value of R2 = 801 k\u03a9 (standard value 800\u03a9)\n", + "The value of C = 0.01 \u00b5F \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 - Page 228 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_C= 1*10**3 #centre frequency in Hz\n", + "f_C_desh= 2*10**3 #new centre frequency in Hz\n", + "Q= 5 # selectivity\n", + "Af= -8 \n", + "C= 0.01*10**-6 # in F (assume)\n", + "R3= Q/(pi*f_C*C) #in \u03a9\n", + "R3= R3*10**-3 # in k\u03a9\n", + "print \"The value of R3 = %0.1f k\u03a9 (160 k\u03a9 (approx))\" %R3\n", + "R1= round(-R3/(2*Af)) # in k\u03a9\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1\n", + "R2= R1*10**3/(4*pi**2*f_C**2*R1*10**3*R3*10**3*C**2-1) # in \u03a9\n", + "R2= R2*10**-3 # in k\u03a9\n", + "print \"The value of R2 = %0.2f k\u03a9 (2 k\u03a9 (approx))\" %R2\n", + "R2= 2 # in k\u03a9 (approx)\n", + "R2_desh= R2*(f_C/f_C_desh)**2 # in k\u03a9\n", + "R2_desh= R2_desh*10**3 # in \u03a9\n", + "print \"The value of R2' = %0.f \u03a9\" %R2_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R3 = 159.2 k\u03a9 (160 k\u03a9 (approx))\n", + "The value of R1 = 10 k\u03a9\n", + "The value of R2 = 1.89 k\u03a9 (2 k\u03a9 (approx))\n", + "The value of R2' = 500 \u03a9\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 - Page 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10*10**3 # in \u03a9\n", + "C1= 0.1*10**-6 # in F \n", + "C2= 0.0025*10**-6 # in F \n", + "f_H= 1/(2*pi*R*C2) #higher cut-off frequency in Hz\n", + "f_H= f_H*10**-3 # in kHz\n", + "f_L= 1/(2*pi*R*C1) #lower cut-off frequency in Hz\n", + "BW= f_H-f_L*10**-3 # bandwidth in kHz\n", + "print \"The higher cut-off frequency = %0.3f kHz\" %f_H\n", + "print \"The lower cut-off frequency = %0.2f Hz\" %f_L\n", + "print \"The bandwidth = %0.1f kHz\" %BW" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The higher cut-off frequency = 6.366 kHz\n", + "The lower cut-off frequency = 159.15 Hz\n", + "The bandwidth = 6.2 kHz\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 - Page 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_L= 200 # in Hz\n", + "f_H= 1*10**3 # in Hz\n", + "alpha=4 # passband gain\n", + "C_desh= 0.01*10**-6 # in F (assume)\n", + "R_desh= 1/(2*pi*f_H*C_desh) # in \u03a9\n", + "R_desh= R_desh*10**-3 # in k\u03a9\n", + "print \"The value of R' = %0.1f k\u03a9 (Standard value 20 k\u03a9)\" %R_desh\n", + "R_desh= 20 # in k\u03a9 (standard value)\n", + "# First Order High-Pass Filter\n", + "C= 0.05*10**-6 # in F (assume)\n", + "R= 1/(2*pi*f_L*C) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "R1= 10 # in k\u03a9\n", + "Rf= R1 # in k\u03a9\n", + "C_desh= C_desh*10**6 # in \u00b5F\n", + "C= C*10**6 # in \u00b5F\n", + "print \"The value of R = %0.1f k\u03a9 (Standard value 20 k\u03a9)\" %R\n", + "R= 20 # in k\u03a9 (standard value)\n", + "print \"The value of R1 and Rf = %0.f k\u03a9\" %R1\n", + "print \"The value of C' = %0.2f \u00b5F\" %C_desh\n", + "print \"The value of C = %0.2f \u00b5F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R' = 15.9 k\u03a9 (Standard value 20 k\u03a9)\n", + "The value of R = 15.9 k\u03a9 (Standard value 20 k\u03a9)\n", + "The value of R1 and Rf = 10 k\u03a9\n", + "The value of C' = 0.01 \u00b5F\n", + "The value of C = 0.05 \u00b5F\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 - Page 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_H= 200 # in Hz\n", + "f_L= 2*10**3 # in Hz\n", + "C= 0.05*10**-6 # in F\n", + "# For low-pass filter,\n", + "R_desh= 1/(2*pi*f_H*C) # in \u03a9\n", + "R_desh= R_desh*10**-3 # in k\u03a9\n", + "print \"The value of R' = %0.1f k\u03a9 (standard value 20 k\u03a9)\" %R_desh\n", + "# For high-pass filter,\n", + "R= 1/(2*pi*f_L*C) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "print \"The value of R = %0.2f k\u03a9 (standard value 2 k\u03a9)\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R' = 15.9 k\u03a9 (standard value 20 k\u03a9)\n", + "The value of R = 1.59 k\u03a9 (standard value 2 k\u03a9)\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 - Page 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "C= 0.068*10**-6 # in F\n", + "f_N= 50 # in Hz\n", + "R= 1/(2*pi*f_N*C) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "print \"The value of R = %0.1f k\u03a9 (standard value 50 k\u03a9)\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 46.8 k\u03a9 (standard value 50 k\u03a9)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 - Page 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "R= 15*10**3 # in \u03a9\n", + "C= 0.01*10**-6 # in F\n", + "f= 2*10**3 # in Hz\n", + "PhaseShift= -2*(math.atan(2*pi*f*R*C))*180/pi # in \u00b0\n", + "print \"The phase shift = %0.f\u00b0\" %PhaseShift\n", + "print \"i.e. %0.f\u00b0 (lagging)\" %abs(PhaseShift)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase shift = -124\u00b0\n", + "i.e. 124\u00b0 (lagging)\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 - Page 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R_A= 2.2*10**3 # in \u03a9\n", + "R_B= 1.2*10**3 # in \u03a9\n", + "Rf= 4.7*10**3 # in \u03a9\n", + "C= 0.01*10**-6 # in F\n", + "k_lp= 1.238 \n", + "k_hp= 1/k_lp \n", + "# Part (i)\n", + "alpha= 3*R_B/(R_A+R_B) \n", + "print \"Part (i) : The value of alpha = %0.3f\" %alpha \n", + "print \"Given filter is 1db peak Chebyshev\" \n", + "\n", + "# Part (ii)\n", + "f_0= 1/(2*pi*Rf*C) #critical frequency in Hz\n", + "f_0= f_0*10**-3 # in kHz\n", + "f_low_pass= f_0*k_lp # in kHz\n", + "print \"\\nPart (ii) : The low-pass frequency = %0.3f kHz\" %f_low_pass\n", + "f_high_pass= f_0*k_hp # in kHz\n", + "print \"The high-pass frequency = %0.3f kHz\" %f_high_pass\n", + "\n", + "# Part (iii)\n", + "fc= f_0 # bandpass centre frequency in kHz\n", + "print \"Part (iii) : The bandpass centre frequency = %0.3f kHz\" %fc\n", + "\n", + "# Part (iv)\n", + "# Formula used : delta_f= fc/Q= fc/(1/alpha)\n", + "delta_f= fc/(1/alpha) # in kHz\n", + "print \"Part (iv) : The bandpass width = %0.3f kHz\" %delta_f\n", + "\n", + "# Part (v)\n", + "A0= 1/alpha # bandpass gain at centre frequency\n", + "print \"Part (v) : The bandpass gain at centre frequency = %0.4f\" %A0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : The value of alpha = 1.059\n", + "Given filter is 1db peak Chebyshev\n", + "\n", + "Part (ii) : The low-pass frequency = 4.192 kHz\n", + "The high-pass frequency = 2.735 kHz\n", + "Part (iii) : The bandpass centre frequency = 3.386 kHz\n", + "Part (iv) : The bandpass width = 3.585 kHz\n", + "Part (v) : The bandpass gain at centre frequency = 0.9444\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb new file mode 100644 index 00000000..f81cf886 --- /dev/null +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper08.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:78d18a14b78f673f5bd74601b5a29612b95caf61b293886366daec703c0960a4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-8 Non-Linear Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 - Page 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data \n", + "R1= 5 # in k\u03a9\n", + "R2= 10.0 # in k\u03a9\n", + "V_peak= R1*R2/(R1+R2) # in V\n", + "Vav= V_peak/pi # in V\n", + "print \"Peak value of V1 = %0.2f V\" %V_peak\n", + "print \"Average value of Vo = %0.2f V\" %Vav" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak value of V1 = 3.33 V\n", + "Average value of Vo = 1.06 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 - Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "from math import exp\n", + "# Given data \n", + "t= 0 \n", + "Vc= 0 # in volts\n", + "Vo= 5 # in volts\n", + "R= 10 # in 2 \u03a9 (assume)\n", + "RC= 1 # (assume)\n", + "R3= 2*R # in \u03a9\n", + "R2= 3*R # in \u03a9\n", + "# From equation : T= 2*Rf*C*log[1+2*R3/R2]\n", + "T= 2*RC*math.log(1+2*R3/R2) \n", + "Vc_t= 2 # in volts\n", + "t= T/2 \n", + "#Voltage across capacitor,\n", + "# Vc_t= Vco*[1-%e**(-t/ReqC)]= 1/5*(VR+4*Vo)*[1-%e**(-t/4*RC/5)]\n", + "VR= Vc_t*5/(1-exp((-t/(4*RC/5))))-4*Vo \n", + "print \"The value of VR = %0.2f volts\" %VR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of VR = -4.69 volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 - Page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "# Part (c)\n", + "R1= 150 # in \u03a9\n", + "R2= 68*10**3 # in \u03a9\n", + "Vin= 50*10**-3 # in V\n", + "Vsat= 14 # in V\n", + "Vpositive= Vsat*(R1/(R1+R2)) # in V\n", + "V_UT= Vpositive # in V\n", + "Vpositive= -Vsat*(R1/(R1+R2)) # in V\n", + "V_LT= Vpositive # in V\n", + "print \"The value of V_UT = %0.4f V\" %V_UT\n", + "print \"The value of V_LT = %0.4f V\" %V_LT" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_UT = 0.0308 V\n", + "The value of V_LT = -0.0308 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 - Page 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_UT= 5 # in V\n", + "V_LT= -5 # in V\n", + "# Hysteresis voltage,\n", + "Vhy= V_UT-V_LT # in V\n", + "print \"The hysteresis voltage = %0.f V\" %Vhy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hysteresis voltage = 10 V\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb new file mode 100644 index 00000000..863e14a7 --- /dev/null +++ b/Analog_Integrated_Circuits_by_J._B._Gupta/Chaper10.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a04a4d0f176c83000d5d4a57477bbe1da1eb7a2da88e100d507445cc1d387f19" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-10 Voltage Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 - Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given data\n", + "Idc= 300 # in mA\n", + "C= 200 # in \u00b5F\n", + "Vmax= 24 # in V\n", + "Vrms= 2.4*Idc/C #in V\n", + "Vr_peak= math.sqrt(3)*Vrms # in V\n", + "Vdc= Vmax-Vr_peak # in V\n", + "print \"The minimum input voltage = %0.2f V\" %Vdc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum input voltage = 17.76 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 - Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "VR= 12 # in V\n", + "IL= 0.5 # in A\n", + "RL= 25 # in \u03a9\n", + "# Resistanc required,\n", + "R= VR/IL # in \u03a9\n", + "VL= IL*RL # in V\n", + "Vout= VR+VL #output voltage in V\n", + "Vin= Vout+2 # input voltage in V\n", + "print \"The input voltage = %0.1f V\" %Vin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input voltage = 26.5 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 - Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1= 240 # in \u03a9\n", + "R2= 1.2*10**3 # in \u03a9\n", + "# Regulated output voltage in the circuit,\n", + "Vout= 1.25*(1+R2/R1) # in V\n", + "print \"The regulated output voltage = %0.1f V\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The regulated output voltage = 7.5 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 - Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_REG= 15 # in V\n", + "I_Q= 10*10**-3 # in A\n", + "R1= 40 # in \u03a9\n", + "# When potentiometer R2=0 \u03a9 (minimum)\n", + "R2= 0 # in \u03a9\n", + "Vout= (1+R2/R1)*V_REG+I_Q*R2 \n", + "print \"The minimum output voltage = %0.f V\" %Vout\n", + "# When potentiometer R2=200 \u03a9 (maximum)\n", + "R2= 200 # in \u03a9\n", + "Vout= (1+R2/R1)*V_REG+I_Q*R2 \n", + "print \"The maximum output voltage = %0.f V\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum output voltage = 15 V\n", + "The maximum output voltage = 92 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 - Page 324 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "V_REF= 1.25 # in V\n", + "R1= 2.5*10**3 # in \u03a9\n", + "R2= 1*10**3 # in \u03a9\n", + "I= V_REF/R2 # in A\n", + "# The output voltage,\n", + "Vout= I*(R1+R2) # in V\n", + "print \"The regulated output voltage = %0.3f V\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The regulated output voltage = 4.375 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 - Page 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_REF= 1.25 # in V\n", + "R1= 3*10**3 # in \u03a9\n", + "R2= 1*10**3 # in \u03a9\n", + "Vin= 20 # in V\n", + "Vout= V_REF*(R1+R2)/R2 # output voltage in volts\n", + "# Duty cycle,\n", + "D= Vout/Vin*100 # in %\n", + "print \"The duty cycle = %0.f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The duty cycle = 25 %\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png new file mode 100644 index 00000000..c7893e00 Binary files /dev/null and b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap2.png differ diff --git a/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png new file mode 100644 index 00000000..101a5c15 Binary files /dev/null and b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4.png differ 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 new file mode 100644 index 00000000..03b1cdb0 Binary files /dev/null and b/Analog_Integrated_Circuits_by_J._B._Gupta/screenshots/snap4_2.png differ diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb new file mode 100755 index 00000000..9fe9f6c7 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb @@ -0,0 +1,220 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f64bf7a670dc36e359e5aa56e0bfa29f09c70f7a0babc95be4c64434f164d9d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10 - Comparators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.1 - page : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sin\n", + "t=range(0,5) #sec(Assumed)\n", + "Vin=5*sin(2*pi*t[0]) #V\n", + "VCC=15 #V\n", + "R2=1 #kohm\n", + "R1=6.8 #kohm\n", + "VEE=-15 #V\n", + "Vsat=13 #V\n", + "Vref=R2*VCC/(R1+R2) #V\n", + "print \"Reference Voltage = %0.2f V \" %Vref\n", + "print \"If Vin>Vref , Vout = %0.2f V \" %Vsat \n", + "print \"If VinVref , Vout = 13.00 V \n", + "If VinVEB, hence Q1 is on\n", + "Iout=(ILmax+Beta*VEB/RCS)/(Beta+1) #A\n", + "Iext=ILmax-Iout #A\n", + "print \"For 10 ohm load, Output current Iext = %0.3f A \" %Iext " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 100 ohm load, Output current Iext = 0.00 A \n", + "For 10 ohm load, Output current Iext = 4.712 A \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.7 - page : 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "RL=range(1,11) #ohm\n", + "R1=5 #ohm\n", + "Vref=5 #V\n", + "IL=1 #A\n", + "IQ=0 #A\n", + "Iref=IL #A\n", + "R1=Vref/Iref #ohm\n", + "print \"Value of resistor R1 = %0.f ohm \" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistor R1 = 5 ohm \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.8 - page : 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=range(15,21) #V\n", + "Vin=24 #V\n", + "VR1=12 #V\n", + "Vref=12 #V\n", + "I4=0 #A(Assumed)\n", + "Iout=1 #A(Assumed)\n", + "R1=VR1/Iout #ohm\n", + "#Vout=VR1*(1+R2/R1)\n", + "R2min=R1*(min(Vout)/VR1-1) #Putting min Vout\n", + "R2max=R1*(max(Vout)/VR1-1) #Putting min Vout\n", + "print \"Resistance R1 = %0.f ohm \" %R1 \n", + "print \"Minimum & maximum value of R2 are %0.f ohm & %0.f ohm \" %(R2min,R2max) \n", + "#A pot of 10 ohm should be used.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance R1 = 12 ohm \n", + "Minimum & maximum value of R2 are 3 ohm & 8 ohm \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.9 - page : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=6 #V\n", + "IL=100 #mA\n", + "Vref=7.15 #V(For LM 723)\n", + "Iref=1 #mA(Assumed)\n", + "R1=(Vref-Vout)/Iref #kohm\n", + "R2=Vout/Iref #kohm\n", + "print \"Design values are : \"\n", + "print \"R1 should be used 1.2kohm. Calculated R1 %0.2f kohm \" %R1 \n", + "print \"R2 should be used 6.2kohm. Calculated R2 = %0.2f kohm \" %R2 \n", + "R1=1.2; R2=6.2 #kohm\n", + "R3=R1*R2/(R1+R2) #kohm\n", + "print \"Resistance R3 = %0.f kohm \" %R3 \n", + "RCL=0.65/(IL/1000) #kohm\n", + "print \"Resistance RCL = %0.1f kohm \" %RCL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "R1 should be used 1.2kohm. Calculated R1 1.15 kohm \n", + "R2 should be used 6.2kohm. Calculated R2 = 6.00 kohm \n", + "Resistance R3 = 1 kohm \n", + "Resistance RCL = 6.5 kohm \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.10 - page : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=15 #V\n", + "IL=50 #mA\n", + "Vin=20 #V\n", + "PDmax=1 #W(For LM 723)\n", + "Iref=3 #mA(From datasheet)\n", + "PD=Vout*(IL+Iref) #mW\n", + "print \"Required PD = %0.3f W \" %(PD/1000) \n", + "print \"PDmax supplied by LM723 = %0.2f mW \" %PDmax \n", + "print \"PD>1\n", + "#KCL at node y : I1=IC2+IB3 #as Beta>>1\n", + "IREF=(VCC-VBE)/R #mA\n", + "#as IREF=2*IC+IB3=IC*(2+1/Beta)=2*IC #as Beta>>1\n", + "IC=IREF/2 #mA\n", + "Iout=IC #mA\n", + "print \"Output current is %0.2f mA\" %Iout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output current is 0.83 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.7 - page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "Iout=6 #micro A\n", + "IREF=1.2 #mA\n", + "VBE2=0.7 #V\n", + "VT=26 #mV\n", + "Beta=120 #unitless\n", + "VCC=20 #V\n", + "R=(VCC-VBE2)/IREF #kohm\n", + "print \"Value of resistance R is %0.f kohm \" %R\n", + "IC1=Iout #micro A\n", + "IC2=(IREF-IC1*10**-3/Beta)/(1+1/Beta) #mA\n", + "RS=1/(IC1*10**-6)*VT*10**-3*math.log(IC2*1000/IC1) #ohm\n", + "RS/=10**3 #kohm\n", + "print \"Value of resistance RS is %0.1f kohm\" %RS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance R is 16 kohm \n", + "Value of resistance RS is 22.9 kohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.8 - page 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "IREF=1 #mA\n", + "Io2=20 #micro A\n", + "Io3=40 #micro A\n", + "VBE1=0.7 #V\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=-10 #V\n", + "R=(VCC-VBE1-VEE)/IREF #kohm\n", + "print \"Value of resistance R is %0.2f kohm \" %R \n", + "RE2=VT/Io2*math.log(IREF*1000/Io2) #kohm\n", + "print \"Value of resistance RE2 is %0.2f kohm\" %RE2 \n", + "RE3=VT/Io3*math.log(IREF*1000/Io3) #kohm\n", + "print \"Value of resistance RE3 is %0.2f kohm \" %RE3 \n", + "VBE2=VBE1-RE2*Io2/1000 #V\n", + "print \"Value of Base emitter voltage of transistor Q2 is %0.4f V\" %VBE2 \n", + "VBE3=VBE1-RE3*Io3/1000 #V\n", + "print \"Value of Base emitter voltage of transistor Q3 is %0.4f V\" %VBE3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance R is 19.30 kohm \n", + "Value of resistance RE2 is 5.09 kohm\n", + "Value of resistance RE3 is 2.09 kohm \n", + "Value of Base emitter voltage of transistor Q2 is 0.5983 V\n", + "Value of Base emitter voltage of transistor Q3 is 0.6163 V\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.9 - page 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.715 #V\n", + "R=5.6 #kohm\n", + "RC=1 #kohm\n", + "VCC=10 #V\n", + "VCB1=0 #V(Q1 will act as diode)\n", + "IREF=(VCC-VBE)/R #mA\n", + "#KCL at node x : IREF=IC1+2*IB \n", + "#KCL at node y : I1=IC2+IB3 #as Beta>>1\n", + "IREF=(VCC-VBE)/R #mA\n", + "#as IREF=2*IC1/Beta+IC1\n", + "IC1=IREF/(1+2/Beta) #mA\n", + "IC2=IC1 #mA\n", + "IC3=IC1 #mA\n", + "print \"Collector current in each transistor, IC1=IC2=IC3 is %0.2f mA\" %IC1\n", + "IRC=IC1+IC2+IC3 #mA\n", + "print \"Current through RC is %0.2f mA\" %IRC\n", + "#Answer wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector current in each transistor, IC1=IC2=IC3 is 1.63 mA\n", + "Current through RC is 4.88 mA\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.10 - page 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=5 #V\n", + "Beta=180 #unitless\n", + "R=22 #kohm\n", + "VCC=10 #V\n", + "VBE=0.7 #V\n", + "IREF=(VCC-VBE)/R #mA\n", + "IC=(IREF-VBE/R)/(1+2/Beta) #mA\n", + "RC=(VCC-Vout)/IC #kohm\n", + "print \"IC1 & IC2 are %0.2f mA\" %IC\n", + "print \"RC is %0.2f kohm\" %RC\n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "IC1 & IC2 are 0.39 mA\n", + "RC is 12.93 kohm\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2_1.ipynb new file mode 100755 index 00000000..415497af --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2_1.ipynb @@ -0,0 +1,531 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:08f6666963b63d68f1720253f0e8a698e5752723f4515bbc0a7b3ce6b79e7e0a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 - Differential amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex 2.1 - page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "v1=7 #mV\n", + "v2=9 #mV\n", + "Ad=80 #dB\n", + "CMRR=90 #dB\n", + "vid=v2-v1 #mV\n", + "vcm=(v1+v2)/2 #mV\n", + "Ad=10**(Ad/20) #unitless\n", + "CMRR=10**(CMRR/20) #unitless\n", + "vout=Ad*(vid+vcm/CMRR)/1000 #V\n", + "print \"Output Voltage is %0.2f V\" %vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 20.00 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.2 - page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "v1=50.0 #micro V\n", + "v2=55.0 #micro V\n", + "Ad=2*10**5 #unitless\n", + "CMRR=80 #dB\n", + "vid=v2-v1 #micro V\n", + "vcm=(v1+v2)/2 #mV\n", + "CMRR=10**(CMRR/20) #unitless\n", + "vout=Ad*(vid+vcm/CMRR)/10**6 #V\n", + "print \"Output Voltage is %0.3f V\" %vout \n", + "Verror=vout-Ad*vid/10**6 #V\n", + "print \"Error Voltage is %0.3f V\" %Verror\n", + "error_p=(Verror/vout)*100 #% error\n", + "print \"Percentage error is %0.3f %%\" %error_p \n", + "#Percentage error answer is not correct in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 1.001 V\n", + "Error Voltage is 0.001 V\n", + "Percentage error is 0.105 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.3 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "IT=1.0 #mA\n", + "VCC=15 #V\n", + "RE=50 #kohm\n", + "RC=15 #kohm\n", + "Beta=120 #unitless\n", + "alfa=Beta/(Beta+1) #unitless\n", + "Vid=6 #mV\n", + "VT=26 #mV\n", + "#Part (a)\n", + "iC1=alfa*IT/(1+math.exp(-Vid/VT)) #mA\n", + "iC2=IT-iC1 #mA\n", + "print \"dc Collector current through transistors is %0.3f mA\" %iC2 \n", + "#Part (b)\n", + "iC=IT/2 #mA(let iC1=iC2=iC)\n", + "re=VT/iC #ohm(let re1=re2=re)\n", + "Ad=-RC*1000/re #unitless\n", + "Acm=-RC*1000/(re+2*RE*1000) #unitless\n", + "Acm=abs(Acm) ##unitless\n", + "CMRR=abs(Ad/Acm) ##unitless\n", + "print \"Ad is %0.2f\" %Ad \n", + "print \"Acm is %0.2f \" %Acm \n", + "CMRR=20*math.log10(CMRR) #dB\n", + "print \"CMRR is %0.1f dB\" %CMRR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc Collector current through transistors is 0.447 mA\n", + "Ad is -288.46\n", + "Acm is 0.15 \n", + "CMRR is 65.7 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.4 - page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "RC=2 #kohm\n", + "RE=4.3 #kohm\n", + "VEE=5 #V\n", + "VBE=0.7 #V\n", + "IT=(VEE-VBE)/RE #mA\n", + "VT=26 #mV\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/2/re #unitless\n", + "print \"Ad = \",round(Ad,2) \n", + "Acm=-RC*1000/(re+2*RE*1000) #unitless\n", + "print \"Acm = \",round(Acm,2)\n", + "CMRR=abs(Ad/Acm) ##unitless\n", + "print \"CMRR = \",round(CMRR,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ad = -19.23\n", + "Acm = -0.23\n", + "CMRR = 83.2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.5 - page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.715 \n", + "VD1=0.715 #V\n", + "VZ=6.2 #V\n", + "VT=26 #mV\n", + "IZt=41 #mA\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "RE=2.7 #kohm\n", + "RC=4.7 #kohm\n", + "VB=-VEE+VZ+VD1 #V\n", + "VE=VB-VBE #V\n", + "IE3=(VE-(-VEE))/(RE) #mA\n", + "IT=IE3 #mA\n", + "ICQ=IT/2 #mA(let ICQ1=ICQ2=ICQ)\n", + "VCEQ=VCC+VBE-ICQ*RC #V\n", + "#Q=[ICQ,VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,2),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/re #unitless\n", + "Rid=2*Beta*re/1000 #kohm\n", + "print \"Ad = \",round(Ad)\n", + "print \"Rid is %0.2f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 1.15 mA & VCEQ is 5.32 V\n", + "Ad = -208.0\n", + "Rid is 4.53 kohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "VT=26 #mV\n", + "RC=2.7 #kohm\n", + "R=2.2 #kohm\n", + "IExt=(VEE-VBE)/R #mA\n", + "IC3=IExt \n", + "IT=IExt #mA\n", + "ICQ=IT/2 #mA\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "Ad=-RC*1000/re #unitless\n", + "Rid=2*Beta*re/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial mode gain, Ad = \", round(Ad,1) \n", + "print \"Differntial input resistance, Rid is %0.2f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differntial mode gain, Ad = -219.5\n", + "Differntial input resistance, Rid is 2.46 kohm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7 - page 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "VD1=0.7 #V\n", + "VD2=0.7#V\n", + "VCC=15 #V\n", + "VEE=15 #V\n", + "VT=26 #mV\n", + "RE=560 #ohm\n", + "RC=6.8 #kohm\n", + "R=220 #ohm\n", + "VB=-VEE+VD1+VD2 #V\n", + "VE=VB-VBE #V\n", + "IE3=(VE-(-VEE))/RE*1000 #mA\n", + "IT=IE3 #mA\n", + "ICQ=IT/2 #mA\n", + "VCEQ=VCC+VBE-ICQ*RC #V\n", + "#Q=[ICQ VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,3),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/re #unitless\n", + "print \"Differntial mode gain, Ad = \",round(Ad,2) \n", + "#Answer in the book is wrong for Q point." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 0.625 mA & VCEQ is 11.45 V\n", + "Differntial mode gain, Ad = -163.46\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.8 - page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ICQ=200.0 #micro A\n", + "Beta=1000.0 #unitless\n", + "Ad=180.0 #unitless\n", + "CMRR=80.0 #dB\n", + "VT=26.0 #mV\n", + "re=VT/(ICQ/1000) #ohm(Let re=re1=re2)\n", + "RC=Ad*re/1000 #kohm\n", + "CMRR=10**(CMRR/20) #untless\n", + "RE=(CMRR-1)*re/2/1000 #kohm\n", + "print \"Value of RC is %0.2f kohm & RE is %0.f kohm\" %(RC,RE) \n", + "Rid=2*Beta*re/1000 #kohm(Let Rid=Rid1=Rid2)\n", + "print \"Differntial input resistance, Rid is %0.f kohm \" %Rid \n", + "Ric=(Beta+1)*(re+2*RE*1000)/10**6 #Mohm\n", + "print \"Common mode input resistance, Ric is %0.f Mohm \" %Ric\n", + "#Answer for last part is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of RC is 23.40 kohm & RE is 650 kohm\n", + "Differntial input resistance, Rid is 260 kohm \n", + "Common mode input resistance, Ric is 1301 Mohm \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9 - page 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=110 #unitless\n", + "VBE=0.7 #V\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "RC=1.8 #kohm\n", + "R=3.9 #kohm\n", + "IExt=(VCC-VBE-(-VEE))/R #mA\n", + "IT=IExt #mA\n", + "ICQ=IT/2 #mA\n", + "V1=0 \n", + "V2=0 #V\n", + "VE=-2*VBE #V\n", + "VC=VCC-ICQ*RC #V\n", + "VCEQ=VC-VE #V\n", + "# Q=[ICQ VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,2),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "reD=2*re #ohm\n", + "Ad=-RC*1000/reD #unitless\n", + "print \"Differntial mode gain, Ad = \",round(Ad,1) \n", + "BetaD=Beta**2 #unitless\n", + "Rid=2*BetaD*reD/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistance, Rid is %0.1f kohm\" %Rid\n", + "#Answer for Ad is wrong(+ve) in the book while it is negative." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 2.47 mA & VCEQ is 6.95 V\n", + "Differntial mode gain, Ad = -85.7\n", + "Differntial input resistance, Rid is 508.6 kohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.10 - page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "R=18.6 #kohm\n", + "VT=26 #mV\n", + "VCC=5 #V\n", + "VEE=5 #V\n", + "IExt=(VCC-VBE-(-VEE))/R #mA\n", + "IT=IExt #mA\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "Rid=2*Beta*re/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistances, Rid1=Rid2 is %0.1f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differntial input resistances, Rid1=Rid2 is 20.8 kohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11 - page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "RC=2.7 #kohm\n", + "R=2.2 #kohm\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "IExt=(VEE-VBE)/R #mA\n", + "IT=IExt #mA\n", + "IE=IT/2 #mA(Let IE1=IE2=IE)\n", + "re=2*VT/IT \n", + "re1=re #ohm \n", + "re2=re #ohm \n", + "re3=re #ohm\n", + "re4=re #ohm\n", + "reD=re1+re2 #ohm\n", + "BetaD=Beta**2 #unitless\n", + "Ad=-RC*1000/reD #unitless\n", + "print \"Differential voltage gain, Ad = \",round(Ad,2)\n", + "Rid=2*BetaD*reD/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistances, Rid1=Rid2 is %0.2f kohm \" %Rid \n", + "#Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential voltage gain, Ad = -109.75\n", + "Differntial input resistances, Rid1=Rid2 is 492.04 kohm \n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3__1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3__1.ipynb new file mode 100755 index 00000000..c139e7d8 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3__1.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3abfc8b685644532e1ae7daae315a3441663a126a87262c40494af559e8472c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3 - Operational amplifiers and their parameters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.1 - page : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fBW=4 #MHz\n", + "fo=10 #Hz\n", + "AOL=fBW*10**6/fo #unitless\n", + "print \"Open loop gain is %0.e\" %AOL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open loop gain is 4e+05\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.2 - page : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=-10 #V\n", + "V2=10 #V\n", + "SR=0.5 #V/micro second\n", + "delta_Vo=V2-V1 #V\n", + "delta_t=delta_Vo/SR #micro second\n", + "print \"Time taken by op-amp is %0.f micro sec\" %delta_t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken by op-amp is 40 micro sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.3 - page : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=0.6 #V/micro second\n", + "f=100 #kHz\n", + "Vm=(SR/10**-6)/(2*math.pi*f*1000) #V\n", + "print \"Maximum voltage, Vm is %0.3f V\" %Vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage, Vm is 0.955 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.4 - page : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=0.5 #V/micro second\n", + "Vm=10 #V\n", + "f=100 #kHz\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"Maximum frequency, fm is %0.2f kHz \" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency, fm is 7.96 kHz \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.5 - page : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "delta_t=0.3/2 #micro second\n", + "V1=-3 #V\n", + "V2=3 #V\n", + "delta_Vo=V2-V1 #V\n", + "SR=delta_Vo/delta_t #V/micro second\n", + "print \"Slew rate is %0.f V/micro second \" %SR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slew rate is 40 V/micro second \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.6 - page: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SR=2 #V/micro second\n", + "delta_Vin=0.8 #V\n", + "delta_t=10 #micro second\n", + "Acl_max=SR/(delta_Vin/delta_t) #unitless\n", + "print \"Maximum close loop voltage gain is\",Acl_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum close loop voltage gain is 25.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.7 - page : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=6 #V/micro second\n", + "#Part (i)\n", + "Vm=1 #V\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"part (i) Maximum frequency, fm is %0.f kHz \" %fm\n", + "#Part (ii)\n", + "Vm=10 #V\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"part (ii) Maximum frequency, fm is %0.1f kHz \" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (i) Maximum frequency, fm is 955 kHz \n", + "part (ii) Maximum frequency, fm is 95.5 kHz \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4_1.ipynb new file mode 100755 index 00000000..c8040bf9 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4_1.ipynb @@ -0,0 +1,540 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:044922821cb1a1b0c88578b071d30db5925d3f145784f5c6308641fcf8036e67" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Op-amps with negative feedback" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.1 - page 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "AOL=2*10**5 #unitless\n", + "fo=5 #Hz\n", + "ACL=100 #unitless\n", + "SF=AOL/ACL #unitless\n", + "fodash=SF*fo #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth with feedback is %0.2f kHz\" %fodash\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth with feedback is 10.00 kHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.2 - page : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=2*10**5 #unitless\n", + "Ri=1.5 #kohm\n", + "Rf=12 #kohm\n", + "Rio=1 #Mohm\n", + "Ro=100 #ohm\n", + "fo=5 #Hz\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "SF=(1+AOL)*Beta #unitless\n", + "ACL=AOL/SF #unitless\n", + "print \"Value of ACL is %0.2f\" % ACL\n", + "#In case of ideal opamp\n", + "ACL=1+Rf/Ri #unitless\n", + "print \"In case of ideal opamp, Value of ACL is %0.2f \" %ACL \n", + "Rif=Rio*SF #kohm\n", + "print \"Value of Rif is %0.2f Mohm\" %Rif\n", + "print \"This is a large value can be assumed as infity resistance.\"\n", + "Rof=Ro/SF #ohm\n", + "Rof*=1000 #mohm\n", + "print \"Value of Rof is %0.2f mohm\" %Rof\n", + "fodash=SF*fo #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth with feedback, fo_dash is %0.f kHz\" %fodash\n", + "#Answer for Rif in the book has mistake of unit." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of ACL is 9.00\n", + "In case of ideal opamp, Value of ACL is 9.00 \n", + "Value of Rif is 22222.33 Mohm\n", + "This is a large value can be assumed as infity resistance.\n", + "Value of Rof is 4.50 mohm\n", + "Bandwidth with feedback, fo_dash is 111 kHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.3 - page : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "AOL=float(\"inf\") #unitless\n", + "Rio=float(\"inf\") #ohm\n", + "Ri=1.0 #kohm\n", + "Rf=15.0 #kohm\n", + "SF=float(\"inf\") #unitless #as SF=1+AOL*Beta\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "ACL=1/Beta #unitless\n", + "print \"Input impedence(ohm) for ideal opamp is %0.2f \" %Rio \n", + "print \"Gain of the circuit, ACL is %0.f \" %ACL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence(ohm) for ideal opamp is inf \n", + "Gain of the circuit, ACL is 16 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.4 - page : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=400 #unitless\n", + "Rio=500 #kohm\n", + "Ro=75 #ohm\n", + "ACL=100 #unitlessc\n", + "SF=AOL/ACL #unitless\n", + "Rif=Rio*SF #kohm\n", + "Rif/=1000 #Mohm\n", + "print \"Input impedence, Rif is %0.2f Mohm \" %Rif \n", + "Rof=Ro/SF #ohm\n", + "print \"Output impedence, Rof is %0.2f ohm \" %Rof\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence, Rif is 2.00 Mohm \n", + "Output impedence, Rof is 18.75 ohm \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.5 - page : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ACL=200.0 #unitless\n", + "AOL=2*10.0**5 #unitless\n", + "Rio=2.0 #Mohm\n", + "Ro=75 #ohm\n", + "Ri=1 #kohm(Assumed)\n", + "SF=AOL/ACL #unitless\n", + "Beta=(SF-1)/AOL #unitless\n", + "Rf=Ri*(1-Beta)/Beta #kohm\n", + "print \"Input impedence, Rif is %0.f kohm\" %Ri \n", + "print \"Feedback impedence, Rf is %0.f kohm \" %Rf \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence, Rif is 1 kohm\n", + "Feedback impedence, Rf is 199 kohm \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.6 - page : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=50 #unitless\n", + "Beta=0.8 #unitless\n", + "deltaAOL=-20 #%(Change in open loop gain)\n", + "deltaBeta=15 #%(Change in feedback factor)\n", + "AOLnew=AOL+AOL*deltaAOL/100 #unitless(AOL after change)\n", + "Betanew=Beta+Beta*deltaBeta/100 #unitless(Beta after change)\n", + "ACL=AOLnew/(1+AOLnew*Betanew) #unitless\n", + "print \"Close loop gain, ACL is %0.2f \" %ACL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop gain, ACL is 1.06 \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.7 - page : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=500 #unitless\n", + "Rio=300 #kohm\n", + "Ro=100 #ohm\n", + "ACL=AOL/(1+AOL) #unitless\n", + "Rif=Rio*(1+AOL)/1000 #Mohm\n", + "Rof=Ro/(1+AOL) #ohm\n", + "print \"Close loop gain, ACL is %0.2f \" %ACL \n", + "print \"Value of Rif is %0.f Mohm \" %Rif\n", + "print \"Value of Rof is %0.1f ohm \" %Rof " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop gain, ACL is 1.00 \n", + "Value of Rif is 150 Mohm \n", + "Value of Rof is 0.2 ohm \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.8 - page : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iin=1 #mA\n", + "Rf=1 #kohm\n", + "IB=0 #for ideal opamp\n", + "If=Iin-IB #mA\n", + "Vout=-If*Rf #V\n", + "print \"Output Voltage is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is -1.00 V \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.9 - page : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "I2=1 #mA\n", + "Rf=4.7 #kohm\n", + "#Case 1st\n", + "I1=500 #micro A\n", + "Vout1=-I1*10**-6*Rf*10**3 #V\n", + "print \"For 500 uA current, Output Voltage is %0.2f V \" %Vout1 \n", + "#Case 2nd\n", + "I2=1 #mA\n", + "Vout2=-I2*10**-3*Rf*10**3 #V\n", + "print \"For 1 mA current, Output Voltage is %0.2f V \" %Vout2 \n", + "deltaVout=Vout2-Vout1 #V\n", + "print \"Variation in Output Voltage is %0.2f V \" %deltaVout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 500 uA current, Output Voltage is -2.35 V \n", + "For 1 mA current, Output Voltage is -4.70 V \n", + "Variation in Output Voltage is -2.35 V \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.10 - page : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=2*10**5 #unitless\n", + "Rio=2 #Mohm\n", + "Ro=75 #ohm\n", + "Ri=1 #kohm\n", + "Rf=10 #kohm\n", + "ACL=-AOL*Rf/(Rf+Ri+AOL*Ri) #unitless(Exact)\n", + "print \"Exact close loop voltage gain is %0.2f \" %ACL \n", + "ACL=-Rf/Ri #unitless(Approximate)\n", + "print \"Approximate close loop voltage gain is %0.2f \" %ACL\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "SF=1+AOL*Beta #unitless\n", + "Rif=Rio*10**6/SF #ohm\n", + "print \"Input impedence after feedback is %0.f ohm\" %Rif\n", + "# Answer for last part wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exact close loop voltage gain is -10.00 \n", + "Approximate close loop voltage gain is -10.00 \n", + "Input impedence after feedback is 110 ohm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.11 - page : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Ri=2 #kohm\n", + "Rf=200 #kohm\n", + "#For 741C\n", + "fo=5 #Hz\n", + "AOL=2*10**5 #unitless\n", + "UGB=1 #MHz\n", + "ACL=-AOL*Rf/(Rf+Ri+AOL*Ri) #unitless(Exact)\n", + "print \"Close loop voltage gain is %0.2f \" %ACL \n", + "fodash=fo*AOL/-ACL #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth, fo_dash is %0.f kHz \" %fodash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop voltage gain is -99.95 \n", + "Bandwidth, fo_dash is 10 kHz \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.12 - page : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt\n", + "Beta=0.06 #feedback factor\n", + "fo=100 #Hz\n", + "AOL=40000 #unitless(at dc)\n", + "SFdc=1+AOL*Beta #sacrifice factor at dc\n", + "f=1 #kHz\n", + "f=f*10**3 #Hz\n", + "SF1=1+AOL*Beta/sqrt(1+f**2/fo**2) #sacrifice factor at 1 kHz\n", + "#(a)\n", + "ACL=AOL/SFdc #(unitless)exact close loop gain at dc\n", + "print \"Exact close loop gain at dc is %0.2f \" %ACL \n", + "#(b)\n", + "ACL=1/Beta #(unitless)approximate close loop gain at dc\n", + "print \"Approximate close loop gain at dc is %0.2f \" %ACL \n", + "#(c)\n", + "AOL=3980 #unitless(at dc)\n", + "ACL=AOL/SF1 #(unitless)exact close loop gain at 1kHz\n", + "print \"Exact close loop gain at 1kHz is %0.2f \" %ACL\n", + "# Answer not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exact close loop gain at dc is 16.66 \n", + "Approximate close loop gain at dc is 16.67 \n", + "Exact close loop gain at 1kHz is 16.60 \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.13 - page : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=0.04 #feedback factor\n", + "AOL=5000 #unitless(at dc)\n", + "Rio=40 #kohm\n", + "Ro=1 #kohm\n", + "SF=1+AOL*Beta #sacrifice factor at dc\n", + "Rif=Rio/SF*1000 #ohm\n", + "print \"Input impedence is %0.f ohm \" %Rif \n", + "Rof=Ro*1000/SF #ohm\n", + "print \"Output impedence is %0.2f ohm \" %Rof " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence is 199 ohm \n", + "Output impedence is 4.98 ohm \n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5_1.ipynb new file mode 100755 index 00000000..a645b224 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5_1.ipynb @@ -0,0 +1,701 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c46b787f46e559a89b9f3dea169c413775f674cf749212a8be6652dfc9f37b52" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5 - Linear applications of op-amps" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.1 - page : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "V1=2 #V\n", + "V2=3 #V\n", + "V3=4 #V\n", + "V4=5 #V\n", + "R1=10 #kohm\n", + "R2=15 #kohm\n", + "R3=22 #kohm\n", + "R4=50 #kohm\n", + "Rf=10 #kohm\n", + "Vout=-Rf/R1*V1-Rf/R2*V2-Rf/R3*V3-Rf/R4*V4 #V\n", + "print \"Output voltage of the circuit is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage of the circuit is -6.82 V \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.2 - page : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Rf=240 #kohm\n", + "#Vout=-4*Vx+3*Vy \n", + "#case 1st\n", + "Vy=0 #V(But Vx is not=0)\n", + "#Vox=-Rf/R1*Vx=-4*Vx\n", + "R1=Rf/4 #kohm\n", + "#case 2nd\n", + "Vx=0 #V(But Vy is not=0)\n", + "#Voy=(1+Rf/R1)*R2*Vy/(R1+R2)=3*Vy\n", + "R2=3/(1+Rf/R1)*R1/((1-3/(1+Rf/R1)))\n", + "print \"Resistance R1 is %0.f kohm \" %R1 \n", + "print \"Resistance R2 is %0.f kohm \" %R2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance R1 is 60 kohm \n", + "Resistance R2 is 90 kohm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.3 - page : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "V1=-2 #V\n", + "V2=3 #V\n", + "R1=50 #kohm\n", + "R2=100 #kohm\n", + "Rf=250 #kohm\n", + "#I1+I2=If with IB=0 & Vx=0\n", + "Vout=-(V1/R1+V2/R2)*Rf #V\n", + "print \"Output Voltage is %0.1f V \" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 2.5 V \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.4 - page : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "V1=-2 #V\n", + "V2=3 #V\n", + "R1=12 #kohm\n", + "R2=12 #kohm\n", + "R3=10 #kohm\n", + "Rf=12 #kohm\n", + "Ri=12 #kohm\n", + "Rt=2 #kohm\n", + "Vyx=200*10**-6 #V\n", + "Vout=Rf/Ri*(1+2*R3/Rt)*Vyx #V\n", + "Vout*=1000 #mV\n", + "print \"Output Voltage is %0.1f mV \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 2.2 mV \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.5 - page : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Ad=range(5,201) #Gain\n", + "R1max=50 #kohm(Potentiometer)\n", + "R4=10 #kohm\n", + "R3=10 #kohm\n", + "#Case 1st : Ad=Admin &R1=R1max\n", + "R1=R1max #kohm\n", + "R2=(min(Ad)-1)/2*R1max #kohm\n", + "#Case 2nd : Ad=Admax &R1=R1min\n", + "R1min=2*R2/(max(Ad)-1) #kohm\n", + "print \"Resistance R2 is %0.f kohm \" %R2 \n", + "print \"Minimum value of resistance R1 is %0.f kohm \" %R1min \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance R2 is 100 kohm \n", + "Minimum value of resistance R1 is 1 kohm \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.6 - page : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "R3=1 #kohm\n", + "Rt=5 #kohm\n", + "Ri=1.8 #kohm\n", + "R1=1.8 #kohm\n", + "Rf=18 #kohm\n", + "R2=18 #kohm\n", + "Vs=15 #V\n", + "AoL=2*10**5 #Gain(for 741C)\n", + "Rio=2#Mohm\n", + "Ro=75#Mohm\n", + "fo=5 #Hz\n", + "fBW=1 #MHz\n", + "Ad=Rf/Ri*(1+2*R3/Rt) #differential gain\n", + "print \"Differential gain is %0.2f \" %Ad \n", + "Beta=(R3+Rt)/(2*R3+Rt) #unitless\n", + "Rix=Rio*10**6*(1+AoL*Beta) #ohm\n", + "print \"Input impedence, Rix is %0.2e ohm \" %Rix \n", + "Rof=Ro/(1+AoL/Ad) #ohm\n", + "print \"Output impedence is %0.1e Rof ohm \" %Rof \n", + "#Answer in the book is wrong for Rix." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential gain is 14.00 \n", + "Input impedence, Rix is 3.43e+11 ohm \n", + "Output impedence is 5.2e-03 Rof ohm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.8 - page : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Ri=10 #kohm\n", + "Rf=15 #kohm\n", + "Vs=9 #V\n", + "#Part (a)\n", + "Ra=120 #ohm\n", + "Rb=120 #ohm\n", + "Rc=120 #ohm\n", + "Rd=120 #ohm \n", + "Vx=0 #V\n", + "Vy=0 #V (as Bridge is balanced)\n", + "Vout=(Vy-Vx)*Rf/Ri #V\n", + "print \"(a) Output Voltage is %0.2f V \" %Vout \n", + "#Part (b)\n", + "Ra=120 #ohm\n", + "Rb=120 #ohm\n", + "Rc=120 #ohm\n", + "Rd=150 #ohm\n", + "Vx=Rb*Vs/(Ra+Rb) #V\n", + "Vy=Rc*Vs/(Rc+Rd)#V\n", + "Vyx=Vy-Vx #V\n", + "Vout=(Vy-Vx)*Rf/Ri #V\n", + "print \"(b) Output Voltage is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output Voltage is 0.00 V \n", + "(b) Output Voltage is -0.75 V \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.9 - page : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vin=2 #V\n", + "Rf=2*2/(2+2)+2 #kohm\n", + "R1=1 #kohm\n", + "Vout=-Rf/R1*Vin #V\n", + "print \"Output Voltage is %0.f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is -6 V \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.11 - page : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "G=20 #dB(Gain)\n", + "f3dB=2 #kHz\n", + "Cf=0.05 #micro F\n", + "Rf=1/(f3dB*1000*2*math.pi*Cf/1000000)/1000 #kohm\n", + "G=10**(G/20) #Gain(unitless)\n", + "Ri=Rf*1000/G #ohm\n", + "print \"Resistance Rf is %0.1f kohm \" %Rf \n", + "print \"Resistance Ri is %0.f ohm \" %Ri \n", + "# Answer in wrong in thetextbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance Rf is 1.6 kohm \n", + "Resistance Ri is 159 ohm \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.13 - page : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pylab as plt\n", + "import numpy as np\n", + "from __future__ import division\n", + "t2=50 #ms(After open the switch)\n", + "R=40 #kohm\n", + "C=0.2 #micro F\n", + "V2=3 #V\n", + "Vin=5 #V\n", + "#For Ideal op-amp V1=V2\n", + "t1=0 #s\n", + "Vout1=V2 #V\n", + "V1=V2 #V\n", + "t2=t2*10**-3 #s\n", + "f=lambda T:(Vin-V1)\n", + "def integrate(a,b,f):\n", + " # def function before using this\n", + " # f=lambda t:200**2*t**2\n", + " #a=lower limit;b=upper limit;f is a function\n", + " import numpy\n", + " N=1000 # points for iteration\n", + " t=numpy.linspace(a,b,N)\n", + " ft=f(t)\n", + " ans=numpy.sum(ft)*(b-a)/N\n", + " ans/=3\n", + " ans**=1.0/2\n", + " return ans\n", + "Vout2=-1/(R*10**3*C*10**-6)*integrate(0,t2,f)+Vout1 #V\n", + "#Here we have t=0 switch closed Vout=3V \n", + "t=np.array([t1*1000,t2*1000]) #ms\n", + "Vout=np.array([Vout1,Vout2]) #V\n", + "plt.plot(t, Vout) \n", + "plt.title('Vout Vs time after switch is opened') \n", + "plt.xlabel('t(ms)') \n", + "plt.ylabel('Vout(V)') \n", + "plt.show()\n", + "#Plot in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecVOX1x/HPWRZFwI6CIIgCKiAIiiBIWewNLImxhKiJ\nMURFEEtU0jZqRJP8FBH1R4w/sUQ0orGg2AIDFpp0WEwsUbGhqEixgZzfH89FxnF22V327p3Z+b5f\nr3kxM7edvbvMmec8z72PuTsiIiJFSQcgIiK5QQlBREQAJQQREYkoIYiICKCEICIiESUEEREBlBAk\nAWb2pJn9JAfi2MfM5pvZKjMbknQ82ZjZbWb2m2puu8HM9qrkulea2e3VOU6uM7Ozzez5pOPIB0oI\nOcrMnjKzP2R5/wQze9/Mqv27M7NxZnZ1BctfMbOfZnl/mJnNruKxSs3snvT33P1Yd7+nvG1q0a+A\nf7n7du4+xszeNLNDkw4qnbuf5+7XAJhZiZkti+k4I9393Dj2LflDCSF3jQMGZXn/J8C97r4h5mOf\nWc6xx8V43Nq2B1CW9toBq86OLFIjUYkkxd31yMEHsA2wEuiT9t6OwBdAJ2BrYBTwbvS4EdgqWu9s\n4PmM/W0A2gC/AL4GvgJWA49mOfbuwDqgVdp7HaJtdko7xuvAKuAN4Iws+zk62ubr6FjzovdTwDlp\n+3kRuAH4FHgN6AX8FHgbWA6cmbbPrYG/AG8BHwC3AQ3KOYdtgMnACuAj4F5g+2jZZGB9dD5XA/cB\n3wCfR68vjdY7GHgpim0+0C9t/yngmij+z4G9ssRwOfBOdJ5eAfoDDaLjbjyXv47Od+Po9dXAjdHz\ncdHrhtE230TxrQKaAfWAEdF5WwW8DLRI+50PBv4TxT+mgr+3UuCe6HmD6FytiLabBexaznbto/Pw\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y+yRZQQRDZJn1xkD+D9tNdOmHtgrbuvAFYSSkEQbiLWOnq+ELjPzH4MfJO2/Xtp64jkJCUEkfJl\nzj71VdrzDWmvN7BpbpHjgFuAA4DZZrbx/1gRmuNDcpwSgsgmq4Fto+dvAc3SlmUmBzKXRbfpbuXu\nKcLctdsDjaN1dov2KZKzcnnGNJFa5e4fm9mLZrYImAQUm1kjd19L+Haf/g0/87kTbtN+TzSTmQE3\nufuqaJ3ubCoxieQk3f5apBxmVgosdfcHtnA/RcBcoJu7r6+J2ETioJKRSPluYdNsU1vieGCCkoHk\nOrUQREQEUAtBREQiSggiIgIoIYiISEQJQUREACUEERGJKCGIiAgA/w+X0dHTq7icngAAAABJRU5E\nrkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.14 : page - 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "R1=1 #kohm\n", + "R2=1 #kohm\n", + "R3=1 #kohm\n", + "Rf=R2+R3 #kohm\n", + "Vin=1 #V\n", + "#Capacitor remains open circuited for steady state in both cases.\n", + "Vout=-Rf/R1*Vin #V\n", + "print \"Output Voltage is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is -2.00 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.16 - page : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#From the given equationVout=-integrate('5*Vx+2*Vy+4*Vz','t',0,t) :\n", + "R1Cf=1.0/5 #ratio\n", + "R2Cf=1.0/2 #ratio\n", + "R3Cf=1.0/4 #ratio\n", + "print \"Various design parameters are : \"\n", + "Cf=10 #micro F##Chosen for the design\n", + "print \"Capacitance is %0.2f micro F \" %Cf \n", + "R1=R1Cf/(Cf*10**-6)/1000 #kohm\n", + "R2=R2Cf/(Cf*10**-6)/1000 #kohm\n", + "R3=R3Cf/(Cf*10**-6)/1000 #kohm\n", + "print \"Resistance R1 is %0.2f kohm \" %R1 \n", + "print \"Resistance R2 is %0.2f kohm \" %R2\n", + "print \"Resistance R3 is %0.2f kohm \" %R3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are : \n", + "Capacitance is 10.00 micro F \n", + "Resistance R1 is 20.00 kohm \n", + "Resistance R2 is 50.00 kohm \n", + "Resistance R3 is 25.00 kohm \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.17 - page : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f=10 #kHz\n", + "Rf=3.2 #kohm\n", + "Ci=0.001 #micro F\n", + "dt=5 #micro seconds\n", + "dVin=5-(-5) #V(When voltage changes from -5V to +5V)\n", + "Vout=-Rf*1000*Ci*10**-6*dVin/(dt*10**-6) #V\n", + "print \"When voltage changes from -5V to +5V, The output Voltage is %0.2f V \" %Vout \n", + "dVin=-5-(+5) #V(When voltage changes from +5V to -5V)\n", + "Vout=-Rf*1000*Ci*10**-6*dVin/(dt*10**-6) #V\n", + "print \"When voltage changes from +5V to -5V, The output Voltage is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When voltage changes from -5V to +5V, The output Voltage is -6.40 V \n", + "When voltage changes from +5V to -5V, The output Voltage is 6.40 V \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.18 page : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "fmin=200 #Hz\n", + "fmax=1 #kHz\n", + "fa=fmax #kHz\n", + "print \"Various design parameters are : \"\n", + "Ci=0.05 #micro F##Chosen for the design\n", + "print \"Capacitance Ci is %0.2f micro F \" %Ci \n", + "fb=10*fa #kHz\n", + "Rf=1/(2*math.pi*fa*10**3*Ci*10**-6)/1000 #kohm\n", + "print \"Resistance Rf is %0.1f kohm \" %Rf \n", + "Ri=1/(2*math.pi*fb*10**3*Ci*10**-6) #ohm\n", + "print \"Resistance Ri is %0.f ohm \" %Ri \n", + "Cf=Ri*Ci/(Rf*10**3) #micro F\n", + "print \"Capacitance Cf is %0.3f micro F \" %Cf\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are : \n", + "Capacitance Ci is 0.05 micro F \n", + "Resistance Rf is 3.2 kohm \n", + "Resistance Ri is 318 ohm \n", + "Capacitance Cf is 0.005 micro F \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.19 - page : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "fmax=100 #Hz\n", + "fa=fmax #Hz\n", + "print \"Various design parameters are : \"\n", + "Ci=0.1 #micro F##Chosen for the design\n", + "print \"Capacitance Ci is %0.2f micro F \" %Ci \n", + "Rf=1/(2*math.pi*fa*Ci*10**-6)/1000 #kohm\n", + "print \"Resistance Rf is %0.1f kohm \" %Rf \n", + "print \"Use f=15 kohm\"\n", + "fb=15*fa #kHz\n", + "Ri=1/(2*math.pi*fb*Ci*10**-6)/1000 #kohm\n", + "print \"Resistance Ri is %0.2f ohm \" %Ri \n", + "print \"Use Ri=1 kohm\"\n", + "Cf=Ri*Ci/Rf #micro F\n", + "print \"Capacitance Cf is %0.3f micro F \" %Cf\n", + "#Answer in the book is not accurate for Cf." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are : \n", + "Capacitance Ci is 0.10 micro F \n", + "Resistance Rf is 15.9 kohm \n", + "Use f=15 kohm\n", + "Resistance Ri is 1.06 ohm \n", + "Use Ri=1 kohm\n", + "Capacitance Cf is 0.007 micro F \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 5.20 -page : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f=50 #Hz\n", + "T=1/f #s(Period)\n", + "Ci=0.05 #micro F\n", + "RiCi=0.01*T #Given\n", + "Ri=RiCi/(Ci*10**-6)/1000 #kohm\n", + "print \"Resistance Ri is %0.2f kohm \" %Ri \n", + "#Vout=-.002*dVin/dt given\n", + "#On comparing with Vout=-Rf*Ci*dVin/dt\n", + "RfCi=0.002 #on comparing\n", + "Rf=RfCi/(Ci*10**-6)/1000 #kohm\n", + "print \"Resistance Rf is %0.2f kohm \" %Rf\n", + "Cf=Ri*Ci/Rf #micro F\n", + "print \"Capacitance Cf is %0.3f micro F \" %Cf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance Ri is 4.00 kohm \n", + "Resistance Rf is 40.00 kohm \n", + "Capacitance Cf is 0.005 micro F \n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6_1.ipynb new file mode 100755 index 00000000..b4790d59 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6_1.ipynb @@ -0,0 +1,767 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7063e92d4f64e517cc0dbce51d65911cbb3639cdb52d68efbfa4c03a57d713df" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators and waveform generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.1 - page 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt, ceil\n", + "f0=600 #Hz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F\" %C\n", + "R=1/(2*pi*f0*sqrt(6)*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm\" %R\n", + "#To avoid loading effect\n", + "Ri=10*R #kohm#Ri>=10*R\n", + "Ri=ceil(Ri) #kohm\n", + "print \"Resistance Ri = %0.1f kohm\" % Ri\n", + "Rf=29*Ri #kohm#Rf>=29*Ri\n", + "print \"Resistance Rf = %0.1f kohm\" %Rf\n", + "Rf=640 #kohm\n", + "#Balancing the circuit\n", + "Rom=Rf*Ri/(Rf+Ri) #kohm\n", + "Rom=ceil(Rom) #kohm\n", + "print \"Resistance Rom = %0.1f kohm\" %Rom" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F\n", + "Resistance R = 2.2 kohm\n", + "Resistance Ri = 22.0 kohm\n", + "Resistance Rf = 638.0 kohm\n", + "Resistance Rom = 22.0 kohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.3 - page 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=12 #kHz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.01 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance = %0.2f micro F \" % C\n", + "R=1/(2*pi*f0*1000*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm\" %R\n", + "Ri=3*R/2 #kohm#Ri>=3*R/2\n", + "print \"Resistance Ri = %0.2f kohm\" %Ri\n", + "Ri=2.2 #kohm\n", + "Rf=2*Ri #kohm\n", + "print \"Resistance Rf = %.1f kohm\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.01 micro F \n", + "Resistance R = 1.3 kohm\n", + "Resistance Ri = 1.99 kohm\n", + "Resistance Rf = 4.4 kohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.5 - page 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=2 #kHz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "R=1/(2*pi*f0*1000*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "Ri=3*R/2 #kohm#Ri>=3*R/2\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "Rf=2*Ri #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Ri = 2.4 kohm \n", + "Resistance Rf = 4.8 kohm \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.6 - page : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "#Data given\n", + "R1=1 #kohm\n", + "R2=1 #kohm\n", + "R=1 #kohm\n", + "C=4.7 #micro F\n", + "f0=1/(2*pi*R*10**3*C*10**-6) #Hz#Oscillating Frequency\n", + "print \"Oscillation frequency = %0.2f Hz \" %f0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Oscillation frequency = 33.86 Hz \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.7 - page : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=200 #Hz#Oscillating Frequency\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C \n", + "R=0.159/(f0*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "R=510 #kohm\n", + "C1=C;C2=C;C3=C #micro F\n", + "print \"Capacitance C1 = C2 = C3 = %0.2f micro F \" %(C3) \n", + "R2=R;R3=R #kohm\n", + "print \"Resistance R2 = %0.1f kohm, R3 = %0.1f kohm \" %(R3,R2)\n", + "#Answer for R is calculated wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 15.9 kohm \n", + "Capacitance C1 = C2 = C3 = 0.05 micro F \n", + "Resistance R2 = 510.0 kohm, R3 = 510.0 kohm \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.8 - page : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Rf=570 #kohm\n", + "Ri=15 #kohm\n", + "A=Rf/Ri #Gain of the circuit\n", + "Amin=29 #Minimum Gain requirement of RC phase shift oscillator\n", + "deltaA=(A-Amin)/Amin*100 #%(Exceeding Gain)\n", + "print \"Gain is exceeded by %0.f %% \" %deltaA " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain is exceeded by 31 % \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.9 - page : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "print \"Part (a)\"\n", + "L1=25 #micro H\n", + "L2=10 #micro H\n", + "Rf=22 #kohm\n", + "C=0.01 #micro F\n", + "LT=L1+L2 #micro H\n", + "fr=1/(2*pi*sqrt(C*10**-6*LT*10**-6)) #Hz\n", + "fr=fr/1000 #kHz\n", + "f0=fr #/kHz\n", + "print \"Oscillation frequency = %0.1f kHz \" %f0 \n", + "Ri=Rf/(L1/L2) #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "print \"Part (b)\"\n", + "C1=220 #pF\n", + "C2=680 #pF\n", + "Rf=22 #kohm\n", + "L=1 #mH\n", + "CT=C1*C2/(C1+C2) #pF\n", + "fr=1/(2*pi*sqrt(L*10**-3*CT*10**-12)) #Hz\n", + "fr=fr/1000 #kHz\n", + "f0=fr #/kHz\n", + "f0=round(f0) #kHz\n", + "print \"Oscillation frequency = %0.1f kHz \" %f0\n", + "Ri=Rf/(C1/C2) #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Oscillation frequency = 269.0 kHz \n", + "Resistance Ri = 8.8 kohm \n", + "Part (b)\n", + "Oscillation frequency = 390.0 kHz \n", + "Resistance Ri = 68.0 kohm \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.10 - page : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=1 #/kHz\n", + "Vsat=14 #V\n", + "print \"Various design parameters are :-\"\n", + "C1=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C1\n", + "Rf=1/(2*f0*10**3*C1*10**-6)/1000 #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "#R2=0.86*R1 and Rf=R1||R2\n", + "R2byR1=0.86 #from R2=0.86*R1 \n", + "R2=Rf*(1+R2byR1) #kohm\n", + "R1=R2/R2byR1 #kohm\n", + "print \"Resistance R1 = %0.1f kohm \" %R1 \n", + "print \"Resistance R2 = %0.1f kohm \" %R2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance Rf = 10.0 kohm \n", + "Resistance R1 = 21.6 kohm \n", + "Resistance R2 = 18.6 kohm \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.11 - page 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "T=10 #ms#(Time period)\n", + "f0=1/(T*10**-3) #Hz\n", + "C=0.05 #micro F#Chosen for the design\n", + "#Formula : f0=1/{2*Rf*C*log(1+2*R2/R1)}\n", + "Rf=1/(f0*2*C*10**-6*log(1+2))/1000 #kohm#By putting R1=R2 for this case\n", + "Rf=round(Rf) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "print \"Capacitance for the design is %0.2f micro F \" %C " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance Rf = 91.0 kohm \n", + "Capacitance for the design is 0.05 micro F \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.12 - page : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "R1=4.7 #kohm\n", + "R2=3.3 #kohm\n", + "Rf=2 #kohm\n", + "C=0.1 #micro F\n", + "f0=1/2/(Rf*1000)/(C*10**-6)/log(1+2*R2/R1)/1000 #kHz\n", + "print \"Frequency of output signal is %0.2f kHz \" %f0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of output signal is 2.85 kHz \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.13 - page : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "f0=1.5 #kHz\n", + "Vout=6 #V##peak to peak\n", + "Vsat=13.5 #V\n", + "print \"Various design parameters are : \"\n", + "R2=10 #kohm#/choosen for the design\n", + "R1=R2*2*Vsat/Vout #kohm\n", + "print \"R1 = %0.2f kohm \" %R1 \n", + "print \"R2 = %0.2f kohm \" %R2 \n", + "#Let Cf=0.05 micro F for the design\n", + "Cf=0.05 #micro F\n", + "print \"Cf = %0.2f micro F \" %Cf \n", + "Ri=R1*1000/(f0*1000)/4/(Cf*10**-6*R2*1000)/1000 #kohm\n", + "print \"Ri = %0.2f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are : \n", + "R1 = 45.00 kohm \n", + "R2 = 10.00 kohm \n", + "Cf = 0.05 micro F \n", + "Ri = 15.00 kohm \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex 6.14\n", + "from __future__ import division \n", + "#Data given\n", + "R1=6.8 #kohm\n", + "Ri=100 #kohm\n", + "R2=1.5 #kohm\n", + "Cf=0.01 #micro F\n", + "Vsat=14 #V\n", + "Vo_pp=2*R2/R1*Vsat #V##Peak to peak output of triangular wave\n", + "print \"Peak to peak output of triangular wave is %0.1f V \" %Vo_pp\n", + "f0=R1*1000/(4*Ri*10**3*Cf*10**-6*R2*10**3)/1000 #kHz#Oscillating Frequency\n", + "print \"Oscillation frequency is %0.2f Hz\" %f0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak to peak output of triangular wave is 6.2 V \n", + "Oscillation frequency is 1.13 Hz\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.15 - page : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "f0=1 #kHz\n", + "Vo_pp=7 #V\n", + "Vsat=14 #V\n", + "print \"Various design parameters are :-\"\n", + "#Let R2=10 #kohm for the design\n", + "R2=10 #kohm\n", + "R1=2*R2*Vsat/Vo_pp #kohm\n", + "print \"R1 = %0.2f kohm \" %R1 \n", + "print \"R2 = %0.2f kohm \" %R2 \n", + "#Choose Cf=0.1 micro F for the design\n", + "Cf=0.1 #micro F\n", + "print \"Cf = %0.2f micro F \" %Cf \n", + "Ri=R1*10**3/(4*f0*10**3*Cf*10**-6*R2*10**3)/1000 #kohm\n", + "print \"Ri = %0.2f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "R1 = 40.00 kohm \n", + "R2 = 10.00 kohm \n", + "Cf = 0.10 micro F \n", + "Ri = 10.00 kohm \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.16 - page : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "#Data given\n", + "tau=1 #ms(time period)\n", + "R1byR2_min=1.8 # min R1/R2\n", + "R1byR2_max=9 # max R1/R2\n", + "Beta_min=1/(1+R1byR2_min) #minimum value of Beta\n", + "Beta_max=1/(1+R1byR2_max) #maximum value of Beta\n", + "Tmax=2*tau*log((1+Beta_min)/(1-Beta_min)) #ms##For minimum value of Beta\n", + "fmin=1/(Tmax*10**-3) #Hz\n", + "Tmin=2*tau*log((1+Beta_max)/(1-Beta_max)) #ms##For maximum value of Beta\n", + "fmax=1/(Tmin*10**-3)/1000 #kHz\n", + "print \"Frequency range is %d Hz to %0.1f kHz.\" %(fmin, fmax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency range is 669 Hz to 2.5 kHz.\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.17 : page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import sqrt, pi\n", + "#Data given\n", + "Ls=3 #H\n", + "Cs=0.05 #pF\n", + "Rs=2 #kohm\n", + "Cm=10 #pF\n", + "fS=1/2/pi/sqrt(Ls*Cs*10**-12)/1000 #kHz\n", + "print \"Series resonant frequency is %0.f kHz \" %fS \n", + "CT=Cm*Cs/(Cm+Cs) #pF##Equivalent capacitance\n", + "fP=1/2/pi/sqrt(Ls*CT*10**-12)/1000 #kHz\n", + "print \"Parallel resonant frequency is %0.f kHz \" %fP " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency is 411 kHz \n", + "Parallel resonant frequency is 412 kHz \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.18 - page : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "f0=5 #kHz\n", + "D=60 #%##duty cycle\n", + "VCC=12 #V\n", + "#As D=t1/(t1+t2)\n", + "t2BYt1=1/(D/100)-1 #ratio of t1 & t2\n", + "#RB/(2*RA-RB)=t2/t1\n", + "RAbyRB=(1/t2BYt1+1)/2 #Ratio of RA & RB\n", + "print \"Various design parameters are :\"\n", + "#Let CT=0.05 micro F for this design choosing between 0.01 & 1 microo F\n", + "CT=0.05 #micro F\n", + "print \"CT = %0.2f micro F \" %CT \n", + "RA=1/(f0*10**3)/(5/3)**2/(CT*10**-6)/1000 #kohm\n", + "print \"RA = %0.2f kohm \" %RA\n", + "RB=RA/RAbyRB #kohm\n", + "print \"RB = %0.2f kohm \" %RB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :\n", + "CT = 0.05 micro F \n", + "RA = 1.44 kohm \n", + "RB = 1.15 kohm \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.19 - page : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "Rf=15 #kohm\n", + "RT1=4.7 #kohm\n", + "R1=56 #kohm\n", + "R2=6.8 #kohm\n", + "R3=10 #kohm\n", + "R4=1 #kohm\n", + "R5=1 #kohm\n", + "CB=1 #micro F\n", + "CT=0.05 #mic\n", + "VCC=15 #V\n", + "V1=-15 #V##Voltage given through the resistance(R1) 56 kohm\n", + "print \"Part (i)\"\n", + "Vin=2 #V\n", + "Vo=Rf/R1*(-V1)-Rf/R2*Vin #V\n", + "print \"Voltage Vo = %0.3f V \" %Vo \n", + "N_VCC=0 #V##-VCC##voltage given to the 12th pin of IC\n", + "V7=N_VCC+3 #V\n", + "print \"Voltage V7 = %0.2f V \" %V7\n", + "I=(V7-Vo)/RT1 #mA\n", + "print \"Current I = %0.2f mA \" %I \n", + "Rmult=R4*R5/(R4+R5)+R3 #kohm##on pin 3\n", + "print \"Total resistance on pin 3, Rmult = %0.2f kohm \" %Rmult\n", + "f0=0.32*I*10**-3/(CT*10**-6)/1000 #kHz\n", + "print \"Oscillation frequency is %0.1f kHz \" %f0\n", + "print \"Part (ii)\"\n", + "Vin=5 #V\n", + "Vo=Rf/R1*(-V1)-Rf/R2*Vin #V\n", + "print \"Voltage Vo = %0.f V \" %Vo \n", + "N_VCC=0 #V##-VCC##voltage given to the 12th pin of IC\n", + "V7=N_VCC+3 #V\n", + "print \"Voltage V7 = %0.f V \" %V7 \n", + "I=(V7-Vo)/RT1 #mA\n", + "print \"Current I = %0.2f mA \" %I \n", + "Rmult=R4*R5/(R4+R5)+R3 #kohm##on pin 3\n", + "print \"Total resistance on pin 3, Rmult = %0.2f kohm \" %Rmult \n", + "f0=0.32*I*10**-3/(CT*10**-6)/1000 #kHz\n", + "print \"Oscillation frequency is %0.2f kHz\" %f0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i)\n", + "Voltage Vo = -0.394 V \n", + "Voltage V7 = 3.00 V \n", + "Current I = 0.72 mA \n", + "Total resistance on pin 3, Rmult = 10.50 kohm \n", + "Oscillation frequency is 4.6 kHz \n", + "Part (ii)\n", + "Voltage Vo = -7 V \n", + "Voltage V7 = 3 V \n", + "Current I = 2.13 mA \n", + "Total resistance on pin 3, Rmult = 10.50 kohm \n", + "Oscillation frequency is 13.63 kHz\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7_1.ipynb new file mode 100755 index 00000000..2e5c30d1 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7_1.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da9731a08909e4ad4cafbaaa3667ca4e507b854221c0c6168fb27a7fc7f1c9cc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter7 - The 555 timer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.1 - page : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "th=4 #ms\n", + "VCC=10 #V\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "R=th*10**-3/(1.1*C*10**-6)/1000 #kohm\n", + "C1=0.01 #micro F(assumed)\n", + "C2=0.01 #micro F(choosen between 0.01<=C<=1)\n", + "R2=th*10**-3/(10*C2*10**-6)/1000 #kohm\n", + "C3=10 #micro F\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "print \"Capacitance C1 = %0.2f micro F \" %C1 \n", + "print \"Capacitance C2 = %0.2f micro F \" %C2 \n", + "print \"Resistance R2 = %0.2f kohm \" %R2 \n", + "print \"Capacitance C3 = %0.2f micro F \" %C3 \n", + "#Answer of R2 is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 72.7 kohm \n", + "Capacitance C1 = 0.01 micro F \n", + "Capacitance C2 = 0.01 micro F \n", + "Resistance R2 = 40.00 kohm \n", + "Capacitance C3 = 10.00 micro F \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.2 - page : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ft=2 #kHz\n", + "C=0.01 #micro F\n", + "T=1/ft #ms\n", + "n=3 #for divide-by-3 circuit\n", + "th=(0.2+(n-1))*T #ms\n", + "R=th/(1.1*C) #kohm\n", + "print \"Value of Resistance R = %0.2f kohm \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Resistance R = 100.00 kohm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.3 - page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=70 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=12 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=tC*10**-3/(0.69*C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" %RA \n", + "print \"Resistance RB = %0.1f kohm \" %RB\n", + "#Answer is not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance RA = 5.8 kohm \n", + "Resistance RB = 4.3 kohm \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.4 : page 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=50 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.1 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C= %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" % RA \n", + "print \"Resistance RB = %0.1f kohm \" %RB \n", + "# RA & RB should be equal for 50% duty cycle." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C= 0.10 micro F \n", + "Resistance RA = 3.6 kohm \n", + "Resistance RB = 3.6 kohm \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.5 - page : 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=40 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.22 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \" \n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" %RA \n", + "print \"Resistance RB = %0.f kohm \" %round(RB) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.22 micro F \n", + "Resistance RA = 1.3 kohm \n", + "Resistance RB = 2 kohm \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.6 - page : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=700 #Hz\n", + "D=50 #%(duty cycle)\n", + "T=1/fo*1000 #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.2f kohm \" %round(RA) \n", + "print \"Resistance RB = %0.2f kohm \" %round(RB) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance RA = 21.00 kohm \n", + "Resistance RB = 21.00 kohm \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.7 - page : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=800 #Hz\n", + "D=60 #%(duty cycle)\n", + "T=1/fo*1000 #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.047 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=tC*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "print \"Resistance RA = %0.2f kohm \" %round(RA) \n", + "print \"Resistance RB = %0.2f kohm \" %round(RB)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.047 micro F \n", + "Resistance RA = 8.00 kohm \n", + "Resistance RB = 15.00 kohm \n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8_1.ipynb new file mode 100755 index 00000000..daf49de6 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8_1.ipynb @@ -0,0 +1,152 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f8edf8ce3087d3427d18e8cd2380d8c52cf11f5604fcdfa69ecbcc1dd7de5bc3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter8 - Frequency synthesizers and PLL" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.1 - page : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "VCC=6 #V\n", + "VEE=6 #V\n", + "RT=4 #kohm\n", + "CT=330 #pF\n", + "C=240 #pF\n", + "fo=0.3/(RT*1000*CT*10**-12)/1000 #kHz\n", + "print \"Free running frequency is %0.f kHz \" %fo\n", + "Vplus=(VCC-(-VEE))/2 #V\n", + "deltafL=8*fo/Vplus #kHz\n", + "print \"Lock Range(+ve & -ve) is %0.f kHz \" %deltafL \n", + "#For LM 565\n", + "R=3.6 #kohm\n", + "deltafC=sqrt(deltafL*1000/(2*pi*R*1000*C*10**-12))/1000 #kHz\n", + "print \"Capture Range(+ve & -ve) is %0.f kHz \" %deltafC\n", + "deltafP=2*deltafC/2 #kHz\n", + "print \"Pull-in Range is %0.f kHz \" %deltafP " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Free running frequency is 227 kHz \n", + "Lock Range(+ve & -ve) is 303 kHz \n", + "Capture Range(+ve & -ve) is 236 kHz \n", + "Pull-in Range is 236 kHz \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.2 - page : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi, floor\n", + "fo=450 #kHz\n", + "deltafL=240 #kHz(+ve & -ve)\n", + "deltafC=40 #kHz(+ve & -ve)\n", + "Vplus=8*fo/deltafL #V\n", + "#Vplus=(VCC-(-VEE))/2 but |VCC|=|-VEE|\n", + "VCC=Vplus #V\n", + "VEE=Vplus #V\n", + "print \"For the design |VCC|=|-VEE| is %d Volt\" %VCC\n", + "RT=4.7 #kohm(Assumed for design)\n", + "R=3.6 #kohm\n", + "CT=0.3/(RT*1000*fo*1000)*10**12 #pF\n", + "C=1/((deltafC*10**3)**2*(2*pi*R*10**3)/(deltafL*1000))*10**9 #nF\n", + "print \"Value of RT = %0.2f kohm \" %RT\n", + "print \"Value of CT = %0.f pF \" %CT\n", + "print \"Value of C = %0.f nF \" % floor(C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For the design |VCC|=|-VEE| is 15 Volt\n", + "Value of RT = 4.70 kohm \n", + "Value of CT = 142 pF \n", + "Value of C = 6 nF \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.3 - page : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "fmax=160 #kHz\n", + "fr=4 #Hz(Resolution)\n", + "M=2.4 #unitless\n", + "fclk=M*fmax #kHz\n", + "print \"Clock frequency is %0.2f kHz \" %fclk\n", + "N=log(fclk*1000/fr)/log(2) #no. of bits\n", + "print \"No. of bits = %0.f \" % round(N) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Clock frequency is 384.00 kHz \n", + "No. of bits = 17 \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9_1.ipynb new file mode 100755 index 00000000..c99919b0 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9_1.ipynb @@ -0,0 +1,958 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37cf075e7171812be5843be8bfa73abd6fa4ec1e75c4ee917f74396ed076786b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter9 - Active filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.2 - page : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fH=1 #kHz\n", + "Ap=2 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance is %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*1000*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#Ap=1+Rf/Ri\n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#R=Rf||Ri\n", + "Ri=2*R #kohm\n", + "Rf=Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance is 0.05 micro F \n", + "Resistance R = 3.2 kohm \n", + "Resistance Ri = 6.4 kohm \n", + "Resistance Rf = 6.4 kohm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.3 - page : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=800 #Hz\n", + "#For Butterworth filter : f0=fH=f_3dB\n", + "fH=f0 #Hz\n", + "f_3dB=f0 #Hz\n", + "BW=fH #Hz\n", + "print \"Bandwidth = %0.2f Hz \" %BW " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth = 800.00 Hz \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.4 - page 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fH=2 #kHz(Cutoff frequency)\n", + "Ap=1 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*1000*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R\n", + "Rdash=R #/kohm(To eliminate the effect of offset)\n", + "print \"Resistance R* = %0.1f kohm \" %Rdash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance R* = 1.6 kohm \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.5 - page : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=1 #kHz(Cutoff frequency)\n", + "f0dash=1.5 #kHz(Cutoff frequency)\n", + "print \"Various design parameters are :-\"\n", + "#For Butterworth filter\n", + "fH=f0 #kHz\n", + "fHdash=f0dash #kHz\n", + "K=f0/f0dash #ratio\n", + "R=3.2 #kohm\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.1f kohm \" %Rdash \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "fHdash=1/(2*pi*Rdash*1000*C*10**-6)/1000 #kHz\n", + "print \"Cutoff frequency is %0.1f kHz \" %fHdash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Resistance Rdash = 2.1 kohm \n", + "Capacitance = 0.05 micro F \n", + "Cutoff frequency is 1.5 kHz \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.6 - page : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fL=400 #Hz\n", + "Ap=2 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance is %0.2f micro F \" %C\n", + "R=1/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "#Ap=1+Rf/Ri\n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#R=Rf||Ri\n", + "Ri=2*R #kohm\n", + "Rf=Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf\n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance is 0.05 micro F \n", + "Resistance R = 7.96 kohm \n", + "Resistance Ri = 15.9 kohm \n", + "Resistance Rf = 15.9 kohm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.7 - page : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fL=400 #Hz\n", + "fLdash=800 #Hz\n", + "K=fL/fLdash #ratio\n", + "print \"Various parameters for retuning are :-\"\n", + "R=8.2 #kohm\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.2f kohm \" %Rdash\n", + "Rf=2*Rdash #kohm\n", + "Ri=2*Rdash #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various parameters for retuning are :-\n", + "Resistance Rdash = 4.10 kohm \n", + "Resistance Ri = 8.2 kohm \n", + "Resistance Rf = 8.2 kohm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.8 - page : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=3 #kHz(Critical frequency)\n", + "Ap=4 #Pass band gain\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "print \"Various design parameters are :-\"\n", + "C1=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C1 = %0.2f micro F \" %C1 \n", + "C2=alfa**2*C1/4 #micro F\n", + "print \"Capacitance C2 = %0.3f micro F \" %C2 \n", + "C2=0.004 # micro F\n", + "R=1/(2*pi*fH*10**3*sqrt(C1*10**-6*C2*10**-6))/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R\n", + "R=8.2 #kohm\n", + "#For offset minimization\n", + "Rdash=2*R #kohm\n", + "print \"Resistance R* = %0.2f kohm \" %Rdash \n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#Ri=10 kohm chosen for design\n", + "Ri=10 #kohm\n", + "Rf=RfBYRi*Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C1 = 0.01 micro F \n", + "Capacitance C2 = 0.005 micro F \n", + "Resistance R = 8.4 kohm \n", + "Resistance R* = 16.40 kohm \n", + "Resistance Ri = 10.0 kohm \n", + "Resistance Rf = 30.0 kohm \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.9 - page : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "Ap=5 #dc gain\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "Ap1=3-alfa #gain\n", + "RfBYRi=Ap1-1 #ratio\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "#Ap=4 #dc gain in this case\n", + "Ap=4 #dc gain\n", + "Ap2=Ap/Ap1 #remainimg gain after 2nd order butterworth filter\n", + "RfdashBYRidash=Ap2-1 #ratio\n", + "#Ridash=10 #kohm chosen for design\n", + "Ridash=10 #kohm\n", + "print \"Resistance Ridash = %0.2f kohm \" %Ridash \n", + "Rfdash=RfdashBYRidash*Ridash #kohm\n", + "print \"Resistance Rfdash = %0.f kohm \" %Rfdash" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Rf = 5.0 kohm \n", + "Resistance Ri = 8.6 kohm \n", + "Resistance Ridash = 10.00 kohm \n", + "Resistance Rfdash = 15 kohm \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.10 - page : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "#Answer in the book is not accurate. Some calculation mistake is there while working for offset minimization." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Rf = 5.0 kohm \n", + "Resistance Ri = 8.6 kohm \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.11 - page : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "#For Bessel filter of 2nd order\n", + "alfa=1.73; klp=0.785 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.2f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.2f kohm \" %Ri\n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.25 kohm \n", + "Resistance Rf = 3.17 kohm \n", + "Resistance Ri = 11.75 kohm \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.12 - page : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=.12 #kHz(Cutoff frequency)\n", + "fH=f0 #kHz\n", + "#For Butterworth filter of 2nd order\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.33 #micro F#Chosen for the design choosing between 0.01 & 1 micro F\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.2f kohm \" %Rf\n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.f kohm \" %Ri \n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.33 micro F \n", + "Resistance R = 4 kohm \n", + "Resistance Rf = 12.75 kohm \n", + "Resistance Ri = 22 kohm \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.13 - page : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt, floor\n", + "fL=20 #Hz(Cutoff frequency)\n", + "#For Butterworth filter of 2nd order\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.22 #micro F#Chosen for the design choosing between 0.01 & 1 micro F\n", + "print \"Capacitance C = %0.2f micro F \" %C\n", + "R=klp/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R \n", + "#For offset minimization\n", + "#R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "Ri=floor(Ri) #kohm\n", + "print \"Resistance Ri = %0.f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.22 micro F \n", + "Resistance R = 36.17 kohm \n", + "Resistance Rf = 57 kohm \n", + "Resistance Ri = 97 kohm \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.14 - page : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fH=2 #kHz(Cutoff frequency)\n", + "Ap=4 #Pass band gain\n", + "print \"Butterworth filter = cascading of 1st and 2nd order high pass filter.\"\n", + "#Butterworth polynomial is (s+1)*(s**2+s+1)\n", + "alfa=1 #for sallen key\n", + "Ap2=3-alfa #gain for 2nd order filter\n", + "Ap1=Ap/Ap2 #gain for 1st order filter\n", + "#Design parameters for 1st order filter : \n", + "print \"Various design parameters for 1st order filter are :-\"\n", + "C=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=1/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "R=8.2 #kohm\n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rf = %0.2f kohm & Ri = %0.2f kohm \" %(Rf,Ri) \n", + "#Design parameters for 2nd order filter : \n", + "kLp=1/alfa #unitless\n", + "#Ap2=Rfdash/Ridash+1 with Ap2=2 we have Rfdash=Ridash\n", + "print \"Various design parameters for 2nd order filter are :-\" \n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "R=kLp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rfdash =%0.1f kohm & Ridash = %0.1f kohm \" %(Rf,Ri) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Butterworth filter = cascading of 1st and 2nd order high pass filter.\n", + "Various design parameters for 1st order filter are :-\n", + "Capacitance C = 0.01 micro F \n", + "Resistance R = 7.96 kohm \n", + "Resistance Rf = 16.40 kohm & Ri = 16.40 kohm \n", + "Various design parameters for 2nd order filter are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance R = 2.41 kohm \n", + "Resistance Rfdash =4.8 kohm & Ridash = 4.8 kohm \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.15 - page : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fL=200 #Hz\n", + "fH=1 #kHz\n", + "Ap=4 #Pass band gain\n", + "fc=sqrt(fH*1000*fL) #Hz(Cutoff frequency)\n", + "BW=fH*1000-fL #Hz\n", + "Q=fc/BW #Quality Factor\n", + "print \"Quality factor is %0.2f \" %Q\n", + "print \"As Q<12, it is a wide band filter.\"\n", + "Ap1=2 #Pass band gain for high pass section\n", + "print \"Various design parameters for high pass section are :-\"\n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C\n", + "R=1/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rf = %0.f kohm & Ri = %0.f kohm \" %(Rf,Ri) \n", + "Ap2=2 #Pass band gain for low pass section\n", + "print \"Various design parameters for low pass section are :-\"\n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "K=fL/(fH*1000) #unitless\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.1f kohm \" %Rdash \n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*Rdash #kohm\n", + "Ri=2*Rdash #kohm\n", + "print \"Resistance Rf = %0.f kohm & Ri = %0.f kohm \" %(Rf,Ri) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality factor is 0.56 \n", + "As Q<12, it is a wide band filter.\n", + "Various design parameters for high pass section are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance R = 24.1 kohm \n", + "Resistance Rf = 48 kohm & Ri = 48 kohm \n", + "Various design parameters for low pass section are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance Rdash = 4.8 kohm \n", + "Resistance Rf = 10 kohm & Ri = 10 kohm \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.16 - page : 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "print \"Part(a)\"\n", + "fc=1.2 #kHz\n", + "Q=4 #Quality Factor\n", + "Ap=10 #Pass band gain\n", + "print \"Here 2*Q**2=32>AP=10, hence it can be designed using single op-amp.\"\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "#fc/Q=1/(pi*R2*C)\n", + "R2=Q/(fc*1000)/pi/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.1f kohm \" %R2 \n", + "R1=R2/(2*Ap) #kohm\n", + "print \"Resistance R1 = %0.2f kohm \" %R1 \n", + "R3=R1*1000/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc*1000)**2-1) #ohm\n", + "print \"Resistance R3 = %0.2f ohm \" %R3 \n", + "print \"Part(b)\"\n", + "R3=460 #ohm\n", + "fc_new=1.5 #kHz\n", + "fc_old=1.2 #kHz\n", + "R3new=R3*(fc_old/fc_new)**2 #ohm\n", + "print \"Resistance R3 should be changed from %0.2f ohm to %0.2f ohm\" %(R3, R3new) \n", + "#Answer for R3 is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Here 2*Q**2=32>AP=10, hence it can be designed using single op-amp.\n", + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R2 = 21.2 kohm \n", + "Resistance R1 = 1.06 kohm \n", + "Resistance R3 = 482.29 ohm \n", + "Part(b)\n", + "Resistance R3 should be changed from 460.00 ohm to 294.40 ohm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.17 - page : 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fL=3 #kHz\n", + "fH=3.6 #kHz\n", + "Ap=-6 #Pass band gain\n", + "fc=sqrt(fH*fL)*1000 #Hz\n", + "BW=(fH-fL)*1000 #Hz\n", + "Q=fc/BW #Quality factor\n", + "print \"Quality factor is %0.2f\" %Q\n", + "print \"Here 1<=Q<=12 criteria fulfills, hence it can be designed using single op-amp.\"\n", + "print \"Various design parameters are :-\"\n", + "C=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "#fc/Q=1/(pi*R2*C)\n", + "R2=1/pi/(BW)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.f kohm \" %R2 \n", + "R1=-R2/(2*Ap) #kohm\n", + "print \"Resistance R1 = %0.2f kohm \" %R1 \n", + "R3=R1*1000/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc)**2-1) #ohm\n", + "print \"Resistance R3 = %0.f ohm \" %R3\n", + "print \"Design Verification : \"\n", + "print \"(i) Is 2*Q**2>|Ap| ?\\n\", 2*Q**2>abs(Ap) \n", + "print \"For op-amp 741, GBW=1 MHz\"\n", + "GBW=1 #MHz\n", + "print \"Is GBW*10**6>20*Q**2*fc ?\\n\",GBW*10**6>20*Q**2*fc\n", + "print \"2nd criteria failed. The op-amp should have higher GBW product. Use LF411\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality factor is 5.48\n", + "Here 1<=Q<=12 criteria fulfills, hence it can be designed using single op-amp.\n", + "Various design parameters are :-\n", + "Capacitance C = 0.01 micro F \n", + "Resistance R2 = 53 kohm \n", + "Resistance R1 = 4.42 kohm \n", + "Resistance R3 = 491 ohm \n", + "Design Verification : \n", + "(i) Is 2*Q**2>|Ap| ?\n", + "True\n", + "For op-amp 741, GBW=1 MHz\n", + "Is GBW*10**6>20*Q**2*fc ?\n", + "False\n", + "2nd criteria failed. The op-amp should have higher GBW product. Use LF411\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.18 - page : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "Ap=-10 #Pass band gain\n", + "Q=22 #Quality factor\n", + "fc=50 #Hz\n", + "R=60 #dB/decade(Roll off rate)\n", + "print \"\"\"Roll off rate of single op-amp=20 dB/decade.\n", + "No. of stages will be 3.\n", + "Desired design can be obtained by cascading three stages.\"\"\"\n", + "n=3 #no. of op-amps(as single op-amp has 20 dB/decade)\n", + "fc1=fc #Hz\n", + "fc2=fc #Hz\n", + "fc3=fc #Hz\n", + "Q1=Q*sqrt(2**(1/n)-1) #Quality factor of each stage\n", + "Q2=Q1 #Quality factor\n", + "Q3=Q1 #Quality factor\n", + "Ap1=-(-Ap)**(1/n) #Band pass gain of each stage\n", + "Ap2=Ap1 #Band pass gain\n", + "Ap3=Ap1 #Band pass gain\n", + "#Design of a single op-amp\n", + "C=0.1 #micro F#Chosen for the design\n", + "print \"Various design parameters for a single stages are :\"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R2=Q1/pi/(fc)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.f kohm \" %R2 \n", + "R1=-R2/(2*Ap1) #kohm\n", + "print \"Resistance R1 = %.f kohm \" %R1 \n", + "R3=R1/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc)**2-1) #kohm\n", + "print \"Resistance R3 = %0.1f ohm \" %R3 \n", + "#Answer for R2 is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll off rate of single op-amp=20 dB/decade.\n", + "No. of stages will be 3.\n", + "Desired design can be obtained by cascading three stages.\n", + "Various design parameters for a single stages are :\n", + "Capacitance C = 0.10 micro F \n", + "Resistance R2 = 714 kohm \n", + "Resistance R1 = 166 kohm \n", + "Resistance R3 = 1.4 ohm \n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.20 - page : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fNO=50 #Hz\n", + "Q=20 #Quality Factor\n", + "print \"Various design parameters are :-\"\n", + "C=1 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=1/(2*pi*fNO)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R \n", + "#Q=(RA+RB)/4/RA\n", + "RA=1 #kohm(chosen for the design)\n", + "RB=Q*4*RA-RA #kohm\n", + "print \"Resistance RA = %0.f kohm \" %RA \n", + "print \"Resistance RB = %0.f kohm \" %RB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 1.00 micro F \n", + "Resistance R = 3.18 kohm \n", + "Resistance RA = 1 kohm \n", + "Resistance RB = 79 kohm \n" + ] + } + ], + "prompt_number": 62 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Antenna_and_Wave_Propagation/screenshots/cutoff_f_6.png b/Antenna_and_Wave_Propagation/screenshots/cutoff_f_6.png new file mode 100755 index 00000000..71544d44 Binary files /dev/null and b/Antenna_and_Wave_Propagation/screenshots/cutoff_f_6.png differ diff --git a/Antenna_and_Wave_Propagation/screenshots/v_cap_5.png b/Antenna_and_Wave_Propagation/screenshots/v_cap_5.png new file mode 100755 index 00000000..4ddd41ed Binary files /dev/null and b/Antenna_and_Wave_Propagation/screenshots/v_cap_5.png differ diff --git a/Antenna_and_Wave_Propagation/screenshots/vofpropag_1.png b/Antenna_and_Wave_Propagation/screenshots/vofpropag_1.png new file mode 100755 index 00000000..ddfd86c1 Binary files /dev/null and b/Antenna_and_Wave_Propagation/screenshots/vofpropag_1.png differ diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb new file mode 100644 index 00000000..b8295615 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter1.ipynb @@ -0,0 +1,62 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37d7c9e86e6a81ee7eb6a2dbfc73df70c3266a2471b35c7c536efad1cc61aa82" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1, Review of Electromagnetics and Transmission Lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 1.1.1, page 1-3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f1=100 #kHz\n", + "f2=1 #MHz\n", + "f3=10 #MHz\n", + "c=3*10**8 #m/s\n", + "lamda1=c/(f1*10**3) #m\n", + "lamda2=c/(f2*10**6) #m\n", + "lamda3=c/(f3*10**6) #m\n", + "print \"At 100kHz, wavelength = %0.f km \" %(lamda1/1000) \n", + "print \"At 1MHz, wavelength = %0.f m \" %lamda2 \n", + "print \"At 10MHz, wavelength = %0.f m \"%lamda3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At 100kHz, wavelength = 3 km \n", + "At 1MHz, wavelength = 300 m \n", + "At 10MHz, wavelength = 30 m \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb new file mode 100644 index 00000000..7eaf93ee --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter10.ipynb @@ -0,0 +1,537 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3caeb5ca80f9060d923ecab5e68747215440e54b9d8723f23ecf08701ce3af01" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10, Broadband & Frequency Independent Antenna" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 10.5.1, page : 10-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, atan, pi\n", + "N=5 #no. of turns\n", + "f=400 #MHz(Frequency)\n", + "c=3*10**8 #m/s(Speed of light)\n", + "lamda=c/(f*10**6) #m(Wavelength)\n", + "print \"Part (i):\" \n", + "S=lamda/50 #m(Spacing between turns)\n", + "S_BY_lamda=1/50 #(Spacing/wavelength)\n", + "C_BY_lamda=sqrt(2*S_BY_lamda) #(Circumference/wavelength)\n", + "print \"\\tCircumference is\",C_BY_lamda,\"*lamda\" \n", + "C=sqrt(2*lamda*S) #m(Circumference)\n", + "print \"\\tCircumference = %0.2f meter \"%C \n", + "print \"Part (ii):\" \n", + "Lo_BY_lamda=sqrt(S_BY_lamda**2+C_BY_lamda**2) #(Length/wavelength)\n", + "print \"\\tLength of single turn is\",round(Lo_BY_lamda,6),\"*lamda\" \n", + "Lo=sqrt(S**2+C**2) #m(Length of single turn)\n", + "print \"\\tLength of single turn = %0.5f meter \"%Lo \n", + "print \"Part (iii):\" \n", + "Ln_BY_lamda=N*Lo_BY_lamda #(Overall length/wavelength)\n", + "print \"\\tOverall Length is\",round(Ln_BY_lamda,7),\"*lamda\" \n", + "Ln=N*Lo #m(Overall length)\n", + "print \"\\tOverall Length = %0.5f meter \"%Ln \n", + "print \"Part (iv):\" \n", + "alfa=atan(S/C)*180/pi #degree(Pitch angle)\n", + "print \"\\tPitch angle, \u03b1 = %0.2f degree\"%alfa" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i):\n", + "\tCircumference is 0.2 *lamda\n", + "\tCircumference = 0.15 meter \n", + "Part (ii):\n", + "\tLength of single turn is 0.200998 *lamda\n", + "\tLength of single turn = 0.15075 meter \n", + "Part (iii):\n", + "\tOverall Length is 1.0049876 *lamda\n", + "\tOverall Length = 0.75374 meter \n", + "Part (iv):\n", + "\tPitch angle, \u03b1 = 5.71 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 10.5.2, page : 10-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan, pi, sqrt, log10\n", + "from __future__ import division\n", + "N=5 #no. of turns\n", + "f=300 #MHz(Frequency)\n", + "c=3*10**8 #m/s(speed of light)\n", + "print \"Part (i):\" \n", + "lamda=c/(f*10**6) #m(Wavelength)\n", + "C_BY_lamda=1 #(Circumference/wavelength)\n", + "print \"\\tNear optimum circumference is\",C_BY_lamda,\"*lamda\" \n", + "C=lamda #m(Circumference)\n", + "print \"\\tNear optimum circumference = %0.f meter\" %C\n", + "print \"Part (ii):\" \n", + "alfa=14 #degree#(Pitch angle)#for near optimum\n", + "S_BY_lamda=C_BY_lamda*tan(alfa*pi/180) \n", + "print \"\\tSpacing is\",round(S_BY_lamda,4),\"*lamda\" \n", + "S=C*tan(alfa*pi/180) #m(Spacing)\n", + "print \"\\tSpacing = %0.4f meter \"%S \n", + "print \"Part (iii):\" \n", + "Rin=140*C/lamda #\u03a9(Input impedence)\n", + "print \"\\tInput impedence = %0.2f \u03a9 \"%Rin \n", + "print \"Part (iv):\" \n", + "HPBW=52/(C/lamda*sqrt(N*S/lamda)) #degree(HPBW)\n", + "print \"\\tHPBW = %0.2f degree \"%HPBW \n", + "print \"Part (v):\" \n", + "FNBW=115/(C/lamda*sqrt(N*S/lamda)) #degree(FNBW)\n", + "print \"\\tFNBW = %0.2f degree \" %FNBW \n", + "print \"Part (vi):\" \n", + "Do=15*(C/lamda)**2*N*(S/lamda) #unitless##Directivity\n", + "print \"\\tDirectivity(unitless) : %0.4f\"%Do \n", + "Do_dB=10*log10(Do) #dB(Directivity)\n", + "print \"\\tDirectivity = %0.3f dB \"%Do_dB \n", + "print \"Part (vii):\" \n", + "AR=(2*N+1)/2/N #axial ratio\n", + "print \"\\tAxial ratio : \",AR \n", + "print \"Part (viii):\" \n", + "Rin=140*(C/lamda) #\u03a9(Input impedence)\n", + "#50 \u03a9 line\n", + "Zo=50 #\u03a9(Output impedence)\n", + "Tau=(Rin-Zo)/(Rin+Zo) #Scaling factor\n", + "VSWR=(1+Tau)/(1-Tau) #(VSWR)\n", + "print \"\\tVSWR for 50\u03a9 line : \",VSWR \n", + "#75 \u03a9 line\n", + "Zo=75 #\u03a9(Output impedence)\n", + "Tau=(Rin-Zo)/(Rin+Zo) #Scaling factor\n", + "VSWR=(1+Tau)/(1-Tau) #(VSWR)\n", + "print \"\\tVSWR for 75\u03a9 line : %0.3f\"%VSWR " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i):\n", + "\tNear optimum circumference is 1 *lamda\n", + "\tNear optimum circumference = 1 meter\n", + "Part (ii):\n", + "\tSpacing is 0.2493 *lamda\n", + "\tSpacing = 0.2493 meter \n", + "Part (iii):\n", + "\tInput impedence = 140.00 \u03a9 \n", + "Part (iv):\n", + "\tHPBW = 46.57 degree \n", + "Part (v):\n", + "\tFNBW = 103.00 degree \n", + "Part (vi):\n", + "\tDirectivity(unitless) : 18.6996\n", + "\tDirectivity = 12.718 dB \n", + "Part (vii):\n", + "\tAxial ratio : 1.1\n", + "Part (viii):\n", + "\tVSWR for 50\u03a9 line : 2.8\n", + "\tVSWR for 75\u03a9 line : 1.867\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 10.5.3, page : 10-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan, pi, sqrt, log10\n", + "HPBW=39 #degree(HPBW)\n", + "alfa=12.5 #degree(Pitch angle)\n", + "f=475 #MHz(Frequency)\n", + "c=3*10**8 #m/s(Speed of light)\n", + "lamda=c/(f*10**6) #m(Wavelength)\n", + "C=lamda #m(Circumference)\n", + "print \"Part (i):\" \n", + "#it is in axial mode as 3/4*lamda1/3:\n", + " D=0.682*C/lamda #Directivity\n", + "\n", + "print \"Directivity :\" ,Fraction(D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Directivity : 3/2\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb new file mode 100644 index 00000000..8916d228 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter8.ipynb @@ -0,0 +1,63 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6e71dd92d1b17d959b3f4a36646e163cb828dba9f629a380a86a078783aa8586" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter8, Slot Antenna" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 8.3.1, page : 8-3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "import numpy as np\n", + "Zcs=73+1J*42.5 #\u00ce\u00a9(Impedence of complementry structure)\n", + "Eta=120*pi #(Constant for free space)\n", + "ZS=Eta**2/4/Zcs #\u00ce\u00a9(Input Impedence)\n", + "print \"Input impedence =\",np.around(ZS),\"ohm\"\n", + "#At resonance\n", + "Zcs=73 #\u00ce\u00a9(Impedence of complementry structure)\n", + "Eta=120*pi #(Constant for free space)\n", + "ZS=Eta**2/4/Zcs #\u00ce\u00a9(Input Impedence)\n", + "print \"At resonance, Input impedence = %0.2f ohm\"%ZS\n", + "print \"ZS can be rounded to 500 \u00ce\u00a9\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence = (364-212j) ohm\n", + "At resonance, Input impedence = 486.72 ohm\n", + "ZS can be rounded to 500 \u00ce\u00a9\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb b/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb new file mode 100644 index 00000000..fa219e98 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S._Wali/chapter9.ipynb @@ -0,0 +1,112 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a1c5dc80edceb1c26296c5ed290e825905396ed6d9e62f8196824c971236a909" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter09, Horn Antenna" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 9.6.1, page : 9-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f=2 #GHz(Frequency)\n", + "G=12 #dBi(Gain)\n", + "D=12 #dBi(Gain)\n", + "D=10**(D/10) #unitless(Directivity)\n", + "c=3*10**8 #m/s(speed of light)\n", + "lamda=c/(f*10**9) #m(wavelength)\n", + "Ap=D*lamda**2/7.5 #m\u00b2(capture area)\n", + "print \"Required capture area = %0.4f m\u00b2 \"%Ap " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required capture area = 0.0475 m\u00b2 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No. 9.6.2, page : 9-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, atan, pi, log10\n", + "aEBYlamda=10 #(Aperture/wavelength)\n", + "del_EBYlamda=0.2 #in E-plane\n", + "del_HBYlamda=0.375 #in H-plane\n", + "LBYlamda=aEBYlamda**2/8/del_EBYlamda #(Length/wavelength)\n", + "print \"Length of the horn is \",(LBYlamda),\"*lamda\" \n", + "aHBYlamda=sqrt(LBYlamda*8*del_HBYlamda) #(Aperture/wavelength)\n", + "print \"H-plane aperture, aH is \",round(aHBYlamda,2),\"*lamda\" \n", + "theta_E=2*atan(aEBYlamda/2/LBYlamda)*180/pi #degree(Angle)\n", + "theta_H=2*atan(aHBYlamda/2/LBYlamda)*180/pi #degree(Angle)\n", + "print \"Flare angles theta_E & theta_H = %0.2f & %0.2f degree \"%(theta_E,theta_H) \n", + "HPBW_E=56/aEBYlamda #degree(HPBW for E-plane)\n", + "print \"HPBW(E-plane) = %0.1f degree\"%(HPBW_E) \n", + "HPBW_H=67/aHBYlamda #degree(HPBW for H-plane)\n", + "print \"HPBW(H-plane) = %0.1f degree \" %HPBW_H \n", + "FNBW_E=102/aEBYlamda #degree(FNBW for E-plane)\n", + "print \"FNBW(E-plane) = %0.2f degree \" %FNBW_E \n", + "FNBW_H=172/aHBYlamda #degree(FNBW for F-plane)\n", + "print \"FNBW(H-plane) = %0.2f degree \"%FNBW_H \n", + "D=10*log10(7.5*aEBYlamda*aHBYlamda) #(Directivity)\n", + "print \"Directivity in dB : \", round(D,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of the horn is 62.5 *lamda\n", + "H-plane aperture, aH is 13.69 *lamda\n", + "Flare angles theta_E & theta_H = 9.15 & 12.50 degree \n", + "HPBW(E-plane) = 5.6 degree\n", + "HPBW(H-plane) = 4.9 degree \n", + "FNBW(E-plane) = 10.20 degree \n", + "FNBW(H-plane) = 12.56 degree \n", + "Directivity in dB : 30.12\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7cc2a53b Binary files /dev/null and b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/HPBW_FNBW_CH10.png differ 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 new file mode 100644 index 00000000..a6b73083 Binary files /dev/null and b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/designValues_ch11.png differ 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 new file mode 100644 index 00000000..73fe7580 Binary files /dev/null and b/Antenna_and_Wave_Propagation_by_S._Wali/screenshots/gain_fnbw_hpbw.png differ diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt b/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt new file mode 100644 index 00000000..62f55e2a --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ashish Kumar +Course: btech +College/Institute/Organization: COER +Department/Designation: ME +Book Title: Antenna and Wave Propagation +Author: k.k. sharma +Publisher: Shubham Publications, Delhi +Year of publication: 2008 +Isbn: 81-903721-5-7 +Edition: 1 \ No newline at end of file diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter1.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter1.ipynb new file mode 100755 index 00000000..01df0fac --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter1.ipynb @@ -0,0 +1,745 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 01 : Antenna Principles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.1 : page 1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "E=4.0 #in V/m\n", + "Eta=120*pi #constant\n", + "#Formula : E/H=Eta\n", + "H=E/Eta #in A/m\n", + "print \"Strength of magnetic field in free space = %0.4f A/m \" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of magnetic field in free space = 0.0106 A/m \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.2 : page 1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "H=5.2 #in mA/m\n", + "Eta=120*pi #constant\n", + "#Formula : E/H=Eta\n", + "E=H*10**-3*Eta #in V/m\n", + "print \"Strength of Electric field in free space =\",round(E),\"V/m\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of Electric field in free space = 2.0 V/m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.3 : page 1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "I=20.0 #in A\n", + "Rr=100.0 #in Ohm\n", + "#Formula : Wr=I**2*R\n", + "Wr=I**2*Rr #in W\n", + "print \"Radiated power = %0.f kW \" %(Wr/1000) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiated power = 40 kW \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.4 : page 1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "W=625.0 #in KW\n", + "r=30.0 #in Km\n", + "Erms=sqrt(90*W*1000)/(r*1000) #in V/m\n", + "print \"Strength of Electric field at 30Km away = %0.f mV/m \" %(Erms*1000) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of Electric field at 30Km away = 250 mV/m \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.5 : page 1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "le=10.0 #in m\n", + "Irms=450.0 #in A\n", + "f=50.0 #in KHz\n", + "R=1.5 #in Ohm\n", + "lamda=300.0/(f/1000) #in m\n", + "Rr=160*(pi)**2*(le/lamda)**2 #in Ohm\n", + "print \"Radiation resistance = %0.5f ohm\" %Rr\n", + "Wr=Irms**2*Rr #in W\n", + "print \"Radiated power = %0.2f Watts \" %Wr \n", + "Eta=(Rr/(Rr+R))*100 #efficiency in %\n", + "print \"Efficiency of antenna = %0.2f %%\" %Eta\n", + "# Ans in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation resistance = 0.00439 ohm\n", + "Radiated power = 888.26 Watts \n", + "Efficiency of antenna = 0.29 %\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.6 : page 1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "le=50.0 #in m\n", + "f=100.0 #in MHz\n", + "lamda=300.0/(f) #in m\n", + "Rr=(160*(pi)**2)*(le/lamda)**2 #in Ohm\n", + "print \"Radiation Resistance = %0.2f Mohm \" %(Rr/10**6) \n", + "#Note : Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation Resistance = 0.44 Mohm \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.7 : page 1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "l=30 #in m\n", + "Irms=20 #in A\n", + "f=1 #in MHz\n", + "r=10 #in Km\n", + "r=r*1000 #in m\n", + "le=2*l/pi #in m\n", + "lamda=300/(f) #in m\n", + "Erms=120*pi*le*Irms/(lamda*r) #in V/m\n", + "print \"Field strength at 10Km distance = %0.2e V/m \" %Erms \n", + "#Note : Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at 10Km distance = 4.80e-02 V/m \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.8 : page 1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "Rl=1.0 #in ohm\n", + "#Formula : Rr=80*pi**2*(l/lamda)**2\n", + "#Given l=lamda/10\n", + "#l/lamda=1/10\n", + "Rr=80*pi**2*(1.0/10)**2 #in Ohm\n", + "print \"Radiation resistance = %0.2f Ohm \" %(Rr) \n", + "Eta=Rr/(Rr+Rl) #Unitless\n", + "print \"Antenna Efficiency = %0.2f %% \" %(Eta*100) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation resistance = 7.90 Ohm \n", + "Antenna Efficiency = 88.76 % \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.9 : page 1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "r=100 #in Km\n", + "W=100 #in KW\n", + "Erms=sqrt(90*W*1000)/(r*1000) #in V/m\n", + "print \"Strength of Electric Field = %0.2f V/m \" %Erms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Strength of Electric Field = 0.03 V/m \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.10 : page 1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "le=200.0 #in m\n", + "Irms=200 #in A\n", + "f=300 #in KHz\n", + "r=10 #in Km\n", + "c=3*10**8 #speed of light i m/s\n", + "lamda=c/(f*1000) #in m\n", + "Erms=120*pi*le*Irms/(lamda*r*10**3) #in V/m\n", + "print \"Field strength at 10Km distance = %0.4f V/m\" %(Erms) \n", + "Rr=(160*(pi)**2)*(le/lamda)**2 #in Ohm\n", + "W=Irms**2*Rr #in Watts\n", + "print \"Radiated Power = %0.2f MW \" %(W/10**6) \n", + "#Note : Answer is wrong in the book. Unit of answer in the book is written mW instead of MW by mistake." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at 10Km distance = 1.5080 V/m\n", + "Radiated Power = 2.53 MW \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.11 : page 1.45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "#Formula : Rr=80*pi**2*(l/lamda)**2\n", + "#Given l=lamda/60\n", + "#l/lamda=1/60\n", + "Rr=80*pi**2*(1.0/60)**2 #in Ohm\n", + "print \"Radiation resistance = %0.3f Ohm \" %Rr " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation resistance = 0.219 Ohm \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.12 : page 1.45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "r=10.0 #in Km\n", + "Erms=10.0 #in mV/m\n", + "r1=20.0 #in Km\n", + "#Formula : Erms=sqrt(90*W)/r #in V/m\n", + "#Let swrt(90*W)=a\n", + "a=Erms*r \n", + "Erms1=a/r1 #in mV/m\n", + "print \"Field strength at 20Km distance = %0.f mV/m \" %Erms1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at 20Km distance = 5 mV/m \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.13 : page 1.45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "r=1.0 #in Km\n", + "r=1*10**3 #in m\n", + "l=1.0 #in m\n", + "Irms=10.0 #in A\n", + "f=5.0 #in MHz\n", + "c=3*10**8 #speed of light i m/s\n", + "lamda=c/(f*10**6) #in m\n", + "le=2*l/pi #in m\n", + "Erms=120*pi*le*Irms/(lamda*r) #in V/m\n", + "print \"Field strength at 10Km distance = %0.4f V/m \" %Erms\n", + "#Note : Answer in the book is wrong. Mistake during value putting." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at 10Km distance = 0.0400 V/m \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.14 : page 1.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "Irms=30.0 #in A\n", + "f=1.0 #in MHz\n", + "Erms=10.0 #in mV/m\n", + "Erms=Erms*10**-3 #in V/m\n", + "r=50.0 #in Km\n", + "r=r*10**3 #in m\n", + "c=3*10**8 #speed of light i m/s\n", + "lamda=c/(f*10**6) #in m\n", + "le=Erms*lamda*r/(120*pi*Irms) #in m\n", + "print \"Effetive height of Antenna = %0.4f meter \" %le " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effetive height of Antenna = 13.2629 meter \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.15 : page 1.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "I, r = symbols('I r')\n", + "E = 10*I/r # V/m\n", + "\n", + "#given data :\n", + "Erms_sqr = E**2\n", + "Wt = (Erms_sqr*r**2)/30 \n", + "Rr = Wt/I**2 # ohm\n", + "print \"Radiation resistance = %0.2f Ohm \" %float(Rr) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation resistance = 3.33 Ohm \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.16 : page 1.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "lamda=300/(50*10**-6) #in m\n", + "r=round(lamda)/(2*pi) #in m\n", + "print \"Distance = %0.2e meter \" %r \n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance = 9.55e+05 meter \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.17 : page 1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "r=2 #in Km\n", + "r=r*10**3 #in m\n", + "Wt=1 #in KW\n", + "Wt=Wt*10**3 #in Watt\n", + "Erms=sqrt(30*Wt)/r #in V/m\n", + "print \"Field strength at 2Km distance = %0.3f mV/m \" %(Erms*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at 2Km distance = 86.603 mV/m \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.18 : page 1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "f=20.0 #in MHz\n", + "f=f*10**6 #in Hz\n", + "le=100.0 #in m\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in m\n", + "Rr=160*(pi*le/lamda)**2 #in ohm\n", + "print \"Radiation Resistance = %0.1f kohm \" %(Rr/1000) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation Resistance = 70.2 kohm \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.19 : page 1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#given data :\n", + "P=10.0 #in W/m**2\n", + "f=40.0 #in MHz\n", + "f=f*10**6 #in Hz\n", + "mu_r=4.0 #constant\n", + "epsilon_r=5 #constant\n", + "#Velocity of propagation\n", + "#formula : v=(1/sqrt(mu_o*epsilon_o))*(1/sqrt(mu_r*epsilon_r)) #in m/s\n", + "#1/sqrt(mu_o*epsilon_o)=c=speed of light=3*10**8 m/s\n", + "c=3*10**8 #speed of light in m/s\n", + "v=c*(1.0/sqrt(mu_r*epsilon_r)) #in m/s\n", + "print \"Velocity of propagation = %0.1e m/s \" %v \n", + "#Wavelength\n", + "lamda=v/f #in meter\n", + "print \"Wavelength = %0.2f m \" %lamda \n", + "#rms electric field\n", + "#Formula : E=P*sqrt(mu_o/epsilon_o)*sqrt(mu_r/epsilon_r) #in V/m\n", + "E=sqrt(1200*pi*sqrt(4.0/5)) #in V/m\n", + "Erms=sqrt(E**2/sqrt(2)) #in V/m\n", + "print \"rms Electric Field = %0.2f V/m\" %Erms \n", + "#Impedence of medium\n", + "Eta=(sqrt(2)*Erms)**2/P #in Ohm\n", + "print \"Impedence of medium = %0.2f ohm \" %Eta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of propagation = 6.7e+07 m/s \n", + "Wavelength = 1.68 m \n", + "rms Electric Field = 48.83 V/m\n", + "Impedence of medium = 476.86 ohm \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.20 : page 1.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "from sympy import symbols, solve, N\n", + "#given data :\n", + "#Hfi = (Im*dlsin(theta)/(4*pi))*[cos(omega*t1)/r-omega*sin(omega*t1)/(c*r)]\n", + "lamda, r = symbols('lamda r')\n", + "#expr = 200.0/r**2-2*pi*f/c\n", + "expr = 200.0/r**2-2*pi/lamda/r # putting f/c = lamda\n", + "r = solve(expr, r)\n", + "print \"r =\",N(r[0],4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "r = 31.83*lamda\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter10.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter10.ipynb new file mode 100755 index 00000000..4dee9c4a --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter10.ipynb @@ -0,0 +1,432 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 10 : Sky wave propagation - The ionospheric waves" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.1 : page 10-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "H=500 #in km\n", + "n=0.8 #in m\n", + "f_muf=10 #in MHz\n", + "f_muf=f_muf*10**6 #in Hz\n", + "f=10 #in MHz\n", + "f=f*10**6 #in Hz\n", + "# Formula : n=sqrt(1-81*N/f**2)\n", + "Nmax=(1-n**2)*f**2/81 #in Hz \n", + "fc=9*sqrt(Nmax) #in Hz\n", + "Dskip=2*H*sqrt((f_muf/fc)**2-1) #in Km\n", + "print \"Assuming the earth is flat the range = %0.2f km\" %Dskip\n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming the earth is flat the range = 1333.33 km\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.2 : page 10-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "n=0.8 #in m\n", + "H=500 #in km\n", + "a=6370 #in km\n", + "D=1349.07 #in Km\n", + "f_muf=10 #in MHz\n", + "f_muf=f_muf*10**6 #in Hz\n", + "f=10 #in MHz\n", + "f=f*10**6 #in Hz\n", + "# Formula : n=sqrt(1-81*N/f**2)\n", + "Nmax=(1-n**2)*f**2/81 #in Hz \n", + "fc=9*sqrt(Nmax) #in Hz\n", + "# Formula : f_muf/fc=sqrt(D**2/(4*(H+D**2/(8*a))))+1\n", + "D1=2*(H+D**2/(8*a))*sqrt((f_muf/fc)**2-1) #in Km\n", + "Dskip=2*H*sqrt((f_muf/fc)**2-1) #in Km\n", + "print \"Assuming the earth is curved the ground range = %0.2f km\"% D1\n", + "# Answer wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming the earth is curved the ground range = 1428.57 km\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.3 : page 10-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "Nmax=2.48*10**6 #in cm**-3\n", + "Nmax=2.48*10**6*10**-6 #in m**-3\n", + "fc=9*sqrt(Nmax) #in MHz\n", + "print \"Critical frequency = %0.2f MHz \" %fc " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical frequency = 14.17 MHz \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.4 : page 10-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "H=200 #in Km\n", + "D=4000 #in Km\n", + "fc=5 #in MHz\n", + "f_muf=fc*sqrt(1+(D/(2*H))**2) #in MHz\n", + "print \"MUF for the given path = %0.2f MHz \" %f_muf\n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MUF for the given path = 50.25 MHz \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.5 : page 10-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "#For F1 layer :\n", + "print \"For F1 layer :\" \n", + "Nmax=2.3*10**6 #in cm**3\n", + "Nmax=2.3*10**6*10**-6 #in m**3\n", + "fc=9*sqrt(Nmax) #in MHz\n", + "print \"Critical frequency = %0.2f MHz \" %fc \n", + "\n", + "#For F2 layer :\n", + "print \"For F2 layer :\" \n", + "Nmax=3.5*10**6 #in cm**3\n", + "Nmax=3.5*10**6*10**-6 #in m**3\n", + "fc=9*sqrt(Nmax) #in MHz\n", + "print \"Critical frequency = %0.2f MHz\" %fc\n", + "\n", + "#For F3 layer :\n", + "print \"For F3 layer :\" \n", + "Nmax=1.7*10**6 #in cm**3\n", + "Nmax=1.7*10**6*10**-6 #in m**3\n", + "fc=9*sqrt(Nmax) #in MHz\n", + "print \"Critical frequency = %0.2f MHz \" %fc " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For F1 layer :\n", + "Critical frequency = 13.65 MHz \n", + "For F2 layer :\n", + "Critical frequency = 16.84 MHz\n", + "For F3 layer :\n", + "Critical frequency = 11.73 MHz \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.6 : page 10-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "n=0.7 #refractive index\n", + "N=400 #in cm**-3\n", + "#Formula : n=sqrt(1-81*N/f**2)\n", + "f=sqrt(81*N/(1-n**2)) #in KHz\n", + "print \"Frequency of wave propagation = %0.2f kHz\" %f\n", + "#Note : Unit of Answer in the book is MHz. It is written by mistake. It is accurately calculated by scilab in KHz. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of wave propagation = 252.05 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.7 : page 10-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "HT=169.0 #in meter\n", + "HR=20.0 #in meter\n", + "d=4.12*(sqrt(HT)+sqrt(HR)) #in Km\n", + "print \"Maximum distance = %0.2f km \" %d \n", + "r_dash=(4/3)*6370/1000 #in Km\n", + "RadioHorizon=sqrt(2*r_dash*HT) #in Km\n", + "print \"Radio Horizon = %0.2f km \" %RadioHorizon\n", + "# Answe wrong in thetextbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum distance = 71.99 km \n", + "Radio Horizon = 45.03 km \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.8 : page 10-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan , pi, asin, cos\n", + "H=200 #in Km\n", + "Beta=20 #in Degree\n", + "a=6370 #in Km\n", + "D_flat=2*H/tan(Beta*pi/180) #in Km\n", + "print \"If earth assumed to be flat transmission path distance = %0.2f km\" %D_flat\n", + "D_curved=2*a*(90*pi/180-Beta*pi/180)-asin(a*cos(Beta*pi/180)/(a+H))\n", + "print \"If earth assumed to be curved transmission path distance = %0.2f \"%D_curved\n", + "# Answe wrong in thetextbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If earth assumed to be flat transmission path distance = 1098.99 km\n", + "If earth assumed to be curved transmission path distance = 15563.70 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.9 : page 10-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import acos\n", + "#given data :\n", + "R=6370 #in Km\n", + "hm=400 #in Km\n", + "#Formula : d=2*R*Q=2*R*acos(R/(R+hm))\n", + "d=2*R*acos(R/(R+hm)) #in Km\n", + "print \"Maximum Range in a single range transmission = %0.2f km \" %d \n", + "# Answe wrong in thetextbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Range in a single range transmission = 20011.95 km \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.10 : page 10-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "n=0.6 #refractive index\n", + "N=4.23*10**4 #in m**-3\n", + "#Formula : n=sqrt(1-81*N/f**2)\n", + "f=sqrt(81*N/(1-n**2)) #in Hz\n", + "print \"Frequency of wave propagation = %0.3f kHz\" %(f/1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of wave propagation = 2.314 kHz\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 10.11 : page 10-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "n=0.8 #refractive index\n", + "N=500 #in cm**-3\n", + "#Formula : n=sqrt(1-81*N/f**2)\n", + "f=sqrt(81*N/(1-n**2)) #in KHz\n", + "print \"Frequency of wave propagation = %0.2f kHz\" %f " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of wave propagation = 335.41 kHz\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter3.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter3.ipynb new file mode 100755 index 00000000..2278567d --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter3.ipynb @@ -0,0 +1,698 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 03 : Antenna Terminology" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.1 : page 3.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "E=10.0 #in V/m\n", + "ETA_o=120.0*pi #Constant\n", + "H=E/ETA_o #in A/m\n", + "print \"The Magnetic Field Strength = %0.4f A/m \" %H " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Magnetic Field Strength = 0.0265 A/m \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.2 : page 3.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "W=25.0 #in KW\n", + "W=W*10**3 #in W\n", + "r=3 #in Km\n", + "r=r*10**3 #in m\n", + "Erms=sqrt(90*W)/r #in V/m\n", + "print \"Field strength at receiver = %0.2f V/m \" %Erms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field strength at receiver = 0.50 V/m \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.3 : page 3.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "le=125 #in m\n", + "Irms=5 #in A\n", + "lamda=1.25 #in Km\n", + "lamda=lamda*10**3 #in m\n", + "Rl=10 #in Ohm\n", + "#radiation Resistance\n", + "Rr=(80*pi**2)*(le/lamda)**2 #in Ohm\n", + "Rr=round(Rr) #in Ohm : approx\n", + "print \"Radiation resistance = %0.2f Ohm \" %Rr \n", + "#Power radiated\n", + "W=(Irms**2)*Rr #in \n", + "print \"Power radiated = %0.2f W \" %W\n", + "#Antenna efficiency \n", + "ETA=Rr/(Rr+Rl)\n", + "print \"Antenna efficiency = %0.2f %% \" %(ETA*100) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation resistance = 8.00 Ohm \n", + "Power radiated = 200.00 W \n", + "Antenna efficiency = 44.44 % \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.4 : page 3.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, pi, sin\n", + "#given data :\n", + "r=1 #in Km\n", + "r=r*10**3 #in m\n", + "I=0.5 #in A\n", + "#For theta = 45 degree\n", + "theta=45 #in degree\n", + "E=(60*I/r)*((cos(pi*cos(theta*pi/180)/2))/sin(theta*pi/180)) \n", + "print \"E-Field for 45 degree angle = %0.2f mV/m \" %(E*10**3) \n", + "ETA_o=120*pi #constant\n", + "H=E/ETA_o #in A/m\n", + "print \"H-Field for 45 degree angle = %0.5f mV/m \" %(H*10**3) \n", + "\n", + "#For theta = 90 degree\n", + "theta=90 #in degree\n", + "E=(60*I/r)*((cos(pi*cos(theta*pi/180)/2))/sin(theta*pi/180)) \n", + "print \"E-Field for 90 degree angle = %0.2f mV/m \" %(E*10**3) \n", + "ETA_o=120*pi #constant\n", + "H=E/ETA_o #in A/m\n", + "print \"H-Field for 90 degree angle = %0.4f mV/m \" %(H*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E-Field for 45 degree angle = 18.84 mV/m \n", + "H-Field for 45 degree angle = 0.04997 mV/m \n", + "E-Field for 90 degree angle = 30.00 mV/m \n", + "H-Field for 90 degree angle = 0.0796 mV/m \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.5 : page 3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "#l=lambda/10 meter\n", + "#Assume pi**2 = 10\n", + "Rl=2.0 #in Ohm\n", + "#Rr=80*pi**2*(dl/lambda)**2\n", + "Rr=80*10*(1.0/10)**2 #in Ohm\n", + "print \"Radiation Resistance = %0.2f Ohm\" %(Rr)\n", + "ETA=Rr/(Rr+Rl) #in Ohm\n", + "print \"Efficiency = %0.2f %%\" %(ETA*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radiation Resistance = 8.00 Ohm\n", + "Efficiency = 80.00 %\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.6 : page 3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "#l=lambda/15 meter\n", + "#Assume pi**2 = 10\n", + "Rl=2.0 #in Ohm\n", + "#Gain : \n", + "Gain=5.33/4 #Unitless\n", + "#Directivity\n", + "Rr=80*10*(1.0/15)**2 #in Ohm\n", + "ETA=Rr/(Rr+Rl) #Unitless\n", + "Directivity=Gain/ETA #unitless\n", + "#Beam solid angle \n", + "BSA=4.0*pi/Directivity #in steradian\n", + "print \"Directivity = %0.4f \" %Directivity \n", + "print \"Gain = %0.2f \"%Gain \n", + "#Effective aperture\n", + "print \"Effective aperture = \" ,\n", + "print round((Gain/(4*pi)),3),\"lambda**2\" \n", + "print \"Beam Solid Angle = %0.2f steradian \"%BSA \n", + "Rr=80*10*(1.0/15)**2 #in Ohm\n", + "print \"Radiation Resistance = %0.2f Ohm \" %Rr \n", + "print \"Pt =\",120*10/225,\"I**2\" \n", + "print \"Pr = 4*I**2\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Directivity = 2.0820 \n", + "Gain = 1.33 \n", + "Effective aperture = 0.106 lambda**2\n", + "Beam Solid Angle = 6.04 steradian \n", + "Radiation Resistance = 3.56 Ohm \n", + "Pt = 5 I**2\n", + "Pr = 4*I**2\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.7 : page 3.45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "D=30.0 #in m\n", + "k=0.55 #illumination efficiency\n", + "f=4.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in Meter\n", + "r=D/2 #in m\n", + "A=pi*(r**2) #in m**2\n", + "G=(4*pi/lamda**2)*k*A #Unitless\n", + "print \"Gain = %0.5e\"%G\n", + "HPBW=70*lamda/D #in Degree\n", + "print \"HPBW = %0.3f Degree \" % HPBW\n", + "BWFN=2*70*lamda/D #in Degree\n", + "print \"BWFN = %0.2f Degree \" %BWFN " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 8.68525e+05\n", + "HPBW = 0.175 Degree \n", + "BWFN = 0.35 Degree \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.8 : page 3.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "Rl=20.0 #in Ohm\n", + "Rr=100.0 #in Ohm\n", + "Gp=25.0 #power gain \n", + "ETA=Rr/(Rr+Rl) #Unitless\n", + "D=Gp/ETA #unitless\n", + "print \"Directivity = %0.2f\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Directivity = 30.00\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.9 : page 3.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "lamda=10 #in m\n", + "D=80 #unitless\n", + "Aem=D*lamda**2/(4*pi) #in m**2\n", + "print \"Maximum effective aperture = %0.2f m^2\" %Aem" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum effective aperture = 636.62 m^2\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.10 : page 3.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#given data :\n", + "P1=30 #in KW\n", + "P1=P1*1000 #in W\n", + "P2=5000 #in W\n", + "Gdb=10*log10(P1/P2) #unitless\n", + "print \"Front to back ratio, Gdb =\",round(Gdb ,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Front to back ratio, Gdb = 7.782\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.11 : page 3.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "f=10 #in GHz\n", + "f=f*10**9 #in Hz\n", + "Gt=40 #in dB\n", + "Gr=40 #in dB\n", + "print \"Gain = Gt = Gr =\",Gt ,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = Gt = Gr = 40 dB\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.12 : page 3.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "L=10 #in m\n", + "f=1.5 #in MHz\n", + "f=f*10**6 #in Hz\n", + "X=350 #in Ohm\n", + "Q=100 #Coil parameter\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in Meter\n", + "l_eff=2*L/2 #in m\n", + "Re=2*X/Q #in Ohm\n", + "Rr=40*pi**2*(l_eff/lamda)**2 #in hm\n", + "Gd=(3/2)*(lamda**2/(4*pi)) #unitless\n", + "ETA=Rr/(Rr+Re) #Efficiency unitless\n", + "Gp=Gd*ETA ##unitless\n", + "print \"Antenna Efficiency = %0.1f %%\" %(ETA*100)\n", + "print \"Power gain = %0.2f \" %(Gp)\n", + "#Note : Answer of Gp is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Antenna Efficiency = 12.4 %\n", + "Power gain = 393.34 \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.13 : page 3.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "delf=600.0 #in KHz\n", + "fr=50 #in MHz\n", + "Q=(fr*10**6)/(delf*10**3) #unitless\n", + "print \"Quality Factor = %0.2f \" %(Q) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality Factor = 83.33 \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.14 : page 3.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "OmegaA=4.0*pi #For isotropic Antenna\n", + "D=4.0*pi/OmegaA #Directivity : Unitless\n", + "print \"Directivity of Isotropic Antenna = %0.2f\" %D " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Directivity of Isotropic Antenna = 1.00\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.15 : page 3.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, N\n", + "lamda = symbols('lamda')\n", + "#given data :\n", + "D=500.0 #Directivity : Unitless\n", + "Aem = D*lamda**2/(4*pi)\n", + "print \"Aem =\",N(Aem,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Aem = 39.79*lamda**2\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.16 : page 3.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "Fn_dB=1.1 #in dB\n", + "Fn=10**(Fn_dB/10) #unitless\n", + "To=290 #in Kelvin\n", + "Te=To*(Fn-1) #in Kelvin\n", + "print \"Effective Noise Temperature = %0.2f degree Kelvin \" %Te " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Noise Temperature = 83.59 degree Kelvin \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.19 : page 3.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, log10\n", + "#given data\n", + "D=6.0 #in meter\n", + "f=10.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "Aactual=pi*D**2/4 #in m**2\n", + "Ae=0.6*Aactual #in m**2\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in Meter\n", + "G=4*pi*Ae/lamda**2 #Unitless\n", + "Gdb=10*log10(G) #gain in dB\n", + "BWFN=140*lamda/D #in degree\n", + "print \"Gain = %0.1f \" %G \n", + "print \"Gain = %0.2f dB \" %Gdb \n", + "print \"Beamwidth = %0.2f degree \" %BWFN \n", + "print \"Capture Area = %0.2f m**2 \" %Ae \n", + "#Note : Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 236870.5 \n", + "Gain = 53.75 dB \n", + "Beamwidth = 0.70 degree \n", + "Capture Area = 16.96 m**2 \n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.20 : page 3.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data\n", + "Gdb=44 #gain in dB\n", + "G=10**(Gdb/10) #gain unitless\n", + "OmegaB=4*pi/G #n steradian\n", + "THETA3db=sqrt(4*OmegaB/pi) #in Radian\n", + "print \"Beamwidth THETA3db = %0.4f degree \" %THETA3db \n", + "#Note : Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Beamwidth THETA3db = 0.0400 degree \n" + ] + } + ], + "prompt_number": 56 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter4.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter4.ipynb new file mode 100755 index 00000000..2a68737d --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter4.ipynb @@ -0,0 +1,481 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 04 : Antenna Arrays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.3 : page 4.67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import acos, pi, cos, sqrt, degrees\n", + "#given data :\n", + "from sympy import symbols\n", + "lamda, Ep = symbols('lamda Ep')\n", + "d = 3.0/2*lamda\n", + "beta = 2*pi/lamda\n", + "delta = 0 # for broad side array\n", + "theta = pi/2 # for maxima\n", + "si = 3*pi/2*cos(theta)\n", + "E0 = Ep/sqrt(2) # at half power beam width\n", + "#Ep = 2*E0*cos(si/2)\n", + "#it leads to cos(3*pi/2*cos(theta))=1/sqrt(2)\n", + "theta=acos(acos(1/sqrt(2))/(3*pi/2)) # radian\n", + "theta = degrees(theta) # degree\n", + "HPBW=2*(90-theta) #in degree\n", + "print \"(i) HPBW = %0.f degree \" %HPBW \n", + "# 2nd part is wrong. Some mistake in question as cos(theta) = 13/12 which >1 not possible" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) HPBW = 19 degree \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.4 : page 4.68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "from sympy import symbols\n", + "lamda = symbols('lamda')\n", + "#given data :\n", + "n=10 #no. of elements\n", + "d=lamda/4 #separation in meter\n", + "D=2*n/(lamda/d)\n", + "Ddb=10*log10(D) #in db\n", + "print \"For broad side array D = %0.2f db \" %Ddb \n", + "D=4*n/(lamda/d)\n", + "Ddb=10*log10(D) #in db\n", + "print \"For end fire array D = %0.2f db \" %Ddb " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For broad side array D = 6.99 db \n", + "For end fire array D = 10.00 db \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.5 : page 4.68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#given data :\n", + "from sympy import symbols, N\n", + "lamda = symbols('lamda')\n", + "delta=-90 #in degree\n", + "#Formula : HPBW=57.3/(sqrt(L/(2*lambda))) in Degree\n", + "n=20 #no. of point sources\n", + "d=lamda/4 #in meter\n", + "L=(n-1)*d\n", + "HPBW=57.3/(sqrt(L/lamda/2)) # in Degree\n", + "print \"HPBW = %0.2f Degree \" %HPBW \n", + "D=4*L/lamda #Directivity\n", + "print \"Directivity = %0.2f \" %D \n", + "Ae = D*lamda**2/4/pi\n", + "print \"Effective aperture : Ae =\",N(Ae,3)\n", + "Omega=4*pi/D #in steradian\n", + "print \"Beam Solid Angle : Omega =\",round(Omega,2),\"Steradian\" \n", + "#Note : Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HPBW = 37.18 Degree \n", + "Directivity = 19.00 \n", + "Effective aperture : Ae = 1.51*lamda**2\n", + "Beam Solid Angle : Omega = 0.66 Steradian\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.6 : page 4.69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import degrees\n", + "#given data :\n", + "n=8 #no. of half wave dipoles\n", + "lamda=100 #in cm\n", + "lamda=lamda*10**-2 #in m\n", + "d=50 #in cm\n", + "d=d*10**-2 #in m\n", + "I=0.5 #in A\n", + "Rr=73 #in Ohm\n", + "Pr=n*I**2*Rr #in Watts\n", + "print \"Pr = %0.2f Watts \" %Pr \n", + "BWFN=2*lamda/(n*d) #in radian\n", + "HPBW=BWFN/2 #in radian\n", + "print \"HPBW = %0.2f degree\" % degrees(HPBW)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pr = 146.00 Watts \n", + "HPBW = 14.32 degree\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.7 : page 4.69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "from sympy import symbols, N\n", + "lamda = symbols('lamda')\n", + "#given data :\n", + "n=10 #no. of elements\n", + "d=lamda/4 #separation in meter\n", + "Do=1.789*4*n*d/lamda\n", + "Dodb=10*log10(Do) #in db\n", + "print \"Do = %0.2f db\" %(Dodb) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do = 12.53 db\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.13 : page 4.74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin, pi\n", + "#given data :\n", + "n=8 #no. of elements\n", + "BWFN=45 #in degree\n", + "theta=45 #in degree\n", + "f=40 #in MHz\n", + "f=f*10**6 #in Hz\n", + "#Formula : theta=2*asin(2*pi/(n*dr))\n", + "dr=(2*pi/n)/sin((theta/2)*(pi/180)) #\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in m\n", + "d=dr*lamda/(2*pi) #in m\n", + "print \"Distance = %0.2f m \" %d " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance = 2.34 m \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.14 : page 4.74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "n=10 #no. of elements\n", + "from sympy import symbols, N\n", + "lamda = symbols('lamda')\n", + "#given : \n", + "d=lamda/4 #in m\n", + "Llambda=n*d/lamda\n", + "D=2*Llambda #in unitless \n", + "print \"Directivity of broadside uniform array = %0.2f \" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Directivity of broadside uniform array = 5.00 \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.16 : page 4.75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "n=4 \n", + "from sympy import symbols, N, cos, solve\n", + "lamda, theta = symbols('lamda theta')\n", + "d=lamda/2\n", + "delta = pi/3\n", + "dr = 2*pi*d/lamda\n", + "# Peaks\n", + "si = pi*cos(theta)+pi/3\n", + "theta = solve(si, theta) # radian\n", + "theta = degrees(theta[0]) # degree\n", + "print \"Peaks : theta =\",round(theta,2),\"degree\"\n", + "# Nulls\n", + "print \"Nulls : \"\n", + "for k in range(0,3):\n", + " theta = degrees(acos(-1.0/3+k/2.0))\n", + " print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n", + "print \"Side lobes :\"\n", + "for k in range(0,3):\n", + " theta = degrees(acos(-1.0/3+(2*k+1)/4.0))\n", + " print \"k =\",k,\", theta =\",round(theta,2),\"degree\"\n", + "# Ans in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peaks : theta = 109.47 degree\n", + "Nulls : \n", + "k = 0 , theta = 109.47 degree\n", + "k = 1 , theta = 80.41 degree\n", + "k = 2 , theta = 48.19 degree\n", + "Side lobes :\n", + "k = 0 , theta = 94.78 degree\n", + "k = 1 , theta = 65.38 degree\n", + "k = 2 , theta = 23.56 degree\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.17 : page 4.76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, sin, pi\n", + "#given data :\n", + "MainBeamwidth=45 #in degree\n", + "thetaN=MainBeamwidth/2 #in degree\n", + "thetaN=thetaN*pi/180 #in radian\n", + "m=5 #no. of elements\n", + "#given : d=lambda/2 in meter\n", + "x=cos(pi/(2*(m-1))) \n", + "xo=x/cos((pi/2)*sin(thetaN)) #unitless\n", + "print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n", + "print \"We Know that : z=x/xo, E5=T4*xo\" \n", + "print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n", + "print \"By comparing the term we have : \" \n", + "print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n", + "a2=xo**4 \n", + "a1=4*a2-4*xo**2 \n", + "ao=1+a1-a2 \n", + "print \"And therefore the 5 elements array is given by : \" \n", + "print (a2),\" \",(a1),\" \",(2*ao),\" \",(a1),\" \",a2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n", + "We Know that : z=x/xo, E5=T4*xo\n", + "ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n", + "By comparing the term we have : \n", + "a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n", + "And therefore the 5 elements array is given by : \n", + "1.5218051188 1.15276185234 1.26191346708 1.15276185234 1.5218051188\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.18 : page 4.77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#given data :\n", + "#Side lobe level below main lobe\n", + "print \"Side lobe level below main lobe : \"\n", + "SideLobe=20 #in dB\n", + "r=10**(SideLobe/20) #\n", + "print \"r=\",r \n", + "#No. of elements are 5, n=5\n", + "print \"No. of elements are 5, n=5 :\" \n", + "print \"Tchebyscheff polynomials of degree (n-1) is\" \n", + "print \"5-1=4\" \n", + "print \"T4(xo)=r\" \n", + "print \"8*xo**4-8*xo**2+1=10\" \n", + "print \"By using alternate formula, we get\" \n", + "m=4 \n", + "r=10 \n", + "xo=(1/2)*((r+sqrt(r**2-1))**(1/m)+(r-sqrt(r**2-1))**(1/m))\n", + "print \"xo=\" ,xo\n", + "print \"E5=T4(xo)\"\n", + "print \"E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\" \n", + "print \"We Know that : z=x/xo, E5=T4*xo\" \n", + "print \"ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\" \n", + "print \"By comparing the term we have : \" \n", + "print \"a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \"\n", + "a2=xo**4 \n", + "a1=4*a2-4*xo**2 \n", + "ao=1+a1-a2 \n", + "print \"And therefore the 5 elements array is given by : \" \n", + "print round(a2,3),\" \",round(a1,3),\" \",round(2*ao,3),\" \",round(a1,3),\" \",round(a2,3)\n", + "# Ans in the textbook are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Side lobe level below main lobe : \n", + "r= 10.0\n", + "No. of elements are 5, n=5 :\n", + "Tchebyscheff polynomials of degree (n-1) is\n", + "5-1=4\n", + "T4(xo)=r\n", + "8*xo**4-8*xo**2+1=10\n", + "By using alternate formula, we get\n", + "xo= 1.29329190052\n", + "E5=T4(xo)\n", + "E5=ao*z+a1*(2*z**2-1)+a2*(8*z**4-8*z**2+1)\n", + "We Know that : z=x/xo, E5=T4*xo\n", + "ao=a1*(2*(x/xo)**2-1)+a2*[8*(x/xo)**4-8*(x/xo)**2+1]=8*x**4-8*x**2+1\n", + "By comparing the term we have : \n", + "a2=xo**4 a1=4*a2-4*xo**2 ao=1+a1-a2 \n", + "And therefore the 5 elements array is given by : \n", + "2.798 4.5 5.405 4.5 2.798\n" + ] + } + ], + "prompt_number": 86 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter5.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter5.ipynb new file mode 100755 index 00000000..300f89b1 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter5.ipynb @@ -0,0 +1,225 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 05 : Practical Antennas-I" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.1 : page 5.57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#For Single Turn:\n", + "from sympy import symbols, sqrt\n", + "lamda = symbols('lamda')\n", + "a=lamda/25\n", + "A=pi*pow(a,2)\n", + "Rr = (A/lamda**2)**2*31171.2\n", + "print \"radiation Resistance =\",round(Rr,4),\"Ohm for single turn \"\n", + "\n", + "#For Eight Turn:\n", + "N=8 #no. of turns\n", + "Rr=Rr*N**2 #in Ohm\n", + "print \"radiation Resistance = %0.2f Ohm for Eight turn \" %Rr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radiation Resistance = 0.7876 Ohm for single turn \n", + "radiation Resistance = 50.40 Ohm for Eight turn \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.2 : page 5.58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, acos, sqrt \n", + "#Given data :\n", + "f=20.0 #in MHz\n", + "N=15.0 #No. of turns\n", + "A=2.0 #in m**2\n", + "Vrms=200.0 #in uV\n", + "theta=acos(1) #in radian\n", + "mu_o=4*pi*10**-7 #in H/m\n", + "#Formula : Vm=2*pi*f*mu_o*H*A*N\n", + "Vm=Vrms*sqrt(2) #in uV\n", + "H=(Vm*10**-6)/(2.0*pi*f*10**6*mu_o*A*N) #in A/m\n", + "print \"Peak Value of magnetic feld intensity = %0.3e mA/m \" %(H*1000) \n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak Value of magnetic feld intensity = 5.970e-05 mA/m \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.3 : page 5.58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data :\n", + "f=20 #in MHz\n", + "f=f*10**6 #in Hz\n", + "Wmax=25 #in mW/m**2\n", + "A=10.0 #in m**2\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in meter\n", + "Rr=31171.2*(A/lamda**2)**2 #iin Ohm\n", + "#Formula : Wmax=V**2/(4*Rr)\n", + "V=sqrt(Wmax*10**-3*4*Rr) #in Volts\n", + "print \"Maximum emf in the loop = %0.3f Volts \"%V " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum emf in the loop = 2.481 Volts \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.4 : page 5.59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Given data :\n", + "N=20.0 #turns\n", + "D=1.0 #in meter\n", + "r=D/2 #in meter\n", + "E=200*10**-6 #in V/m\n", + "L=50*10**-6 #in H\n", + "R=2.0 #in Ohm\n", + "f=1.5 #in MHz\n", + "f=f*10**6 #in Hz\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in meter\n", + "A=pi*r**2 #in m**2\n", + "Vrms=2*pi*E*A*N/lamda #in Volts\n", + "Q=2*pi*f*L/R #unitless\n", + "Vc_rms=Vrms*Q #in Volts\n", + "print \"Voltage across the capacitor = %0.2f mV\" %(Vc_rms*1000) \n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across the capacitor = 23.25 mV\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.5 : page 5.59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, cos\n", + "#Given data :\n", + "N=100 #No. of turns\n", + "A=2 #in m**2\n", + "f=10 #in MHz\n", + "f=f*10**6 #in Hz\n", + "Q=150 #Quality factor\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/f #in meter\n", + "Erms=10*10**-6 #in V/m\n", + "theta=60 #in degree\n", + "Vrms=2*pi*Erms*A*N*cos(theta*pi/180)/lamda \n", + "Vin=Vrms*Q #in Volts\n", + "print \"Voltage to the receiver = %0.1f mV \" %(Vin*1000) \n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage to the receiver = 31.4 mV \n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter6.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter6.ipynb new file mode 100755 index 00000000..62ee756d --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter6.ipynb @@ -0,0 +1,524 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 06 : Practical Antennas - II" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 : page 6.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "n=20 #no. of turns\n", + "#Clamda=lamda\n", + "#Slamda=lamda/4\n", + "#HPBW : \n", + "# HPBW=52/(Clamda*sqrt(n*Slamda))\n", + "#Putting values below :\n", + "Clamda=1 #in Meter\n", + "Slamda=1.0/4 #in Meter\n", + "HPBW=52.0/(Clamda*sqrt(n*Slamda)) #in degree\n", + "print \"HPBW = %0.2f degree \" %HPBW \n", + "#Axial Ratio\n", + "Aratio=(2*n+1)/2 #unitless\n", + "print \"Axial Ratio = %0.2f \"%Aratio \n", + "#Gain\n", + "D=12*Clamda**2*n*Slamda #unitless\n", + "print \"Gain = %0.2f \"%D " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HPBW = 23.26 degree \n", + "Axial Ratio = 20.00 \n", + "Gain = 60.00 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 : page 6.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Part (a): Given data :\n", + "n=20 #no. of turns\n", + "Slamda=0.472 #in meter\n", + "D=12*n*Slamda #in meter\n", + "from sympy import symbols, N, sqrt\n", + "lamda = symbols('lamda', real =True)\n", + "Ae=(lamda**2/(4*pi))*D\n", + "d=(sqrt(Ae))\n", + "print \"Part (a) : d=\",N(d,1)\n", + "print \"Part (b) : With a space of 3*lamda the total effective area : \" \n", + "Ae=9.02*lamda**2*4\n", + "D=4*pi*Ae/lamda**2\n", + "print \"\\t D = %0.2f\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : d= 3.0*Abs(lamda)\n", + "Part (b) : With a space of 3*lamda the total effective area : \n", + "\t D = 453.39\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 : page 6.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10, ceil\n", + "#from 7dBi gain graph the data obtained is given below :\n", + "K=1.2 #Scale constant\n", + "alfa=1.5 #Apex angle in degree\n", + "Slamda=0.15 \n", + "print \"K**n=F or n=logF/logK\" \n", + "F=4 \n", + "n=log10(F)/log10(K) \n", + "n=ceil(n) \n", + "nplus1=n+1 \n", + "print \"Apex Angle = %0.2f degree \" %alfa \n", + "print \"Sale constant = %0.2f\" %K \n", + "print \"No. of elements = %d \" %n " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "K**n=F or n=logF/logK\n", + "Apex Angle = 1.50 degree \n", + "Sale constant = 1.20\n", + "No. of elements = 8 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 : page 6.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#Given data :\n", + "#d=10*lamda\n", + "print \"d=10*lamda\" \n", + "print \"Power Gain : G=6*(d/lamda)**2\" \n", + "print \"Putting value of d, we get G=6*10**2\"\n", + "G=6*10**2 #unitless\n", + "print \"Power gain = %0.2f \" %G \n", + "G_dB=10*log10(G) #in dB\n", + "print \"Power Gain = %0.1f dB \" %G_dB " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d=10*lamda\n", + "Power Gain : G=6*(d/lamda)**2\n", + "Putting value of d, we get G=6*10**2\n", + "Power gain = 600.00 \n", + "Power Gain = 27.8 dB \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 : page 6.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#Given Data:\n", + "f=10.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "BWFN=10 #in degree\n", + "c=3*10**8 #Speed of light in m/s\n", + "lamda=c/f #in meter\n", + "#Part (a):\n", + "d=140*lamda/BWFN #in meter\n", + "print \"Diameter of a parabolic Antenna = %0.2f m\" %d\n", + "#Part (b):\n", + "HPBW=58.0*lamda/d #in degree\n", + "print \"3-dB Beamwidth = %0.2f degree \" %HPBW \n", + "#Part (c):\n", + "Gp=6*(d/lamda)**2 #gain \n", + "Gp_dB=10*log10(Gp) #in dB\n", + "print \"Power Gain = %0.2f dB \" %Gp_dB " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of a parabolic Antenna = 0.42 m\n", + "3-dB Beamwidth = 4.14 degree \n", + "Power Gain = 30.70 dB \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 : page 6.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#Given Data:\n", + "f=1430.0 #in MHz\n", + "f=f*10**6 #in Hz\n", + "d=64 #in meter\n", + "c=3*10**8 #Speed of light in m/s\n", + "lamda=c/f #in meter\n", + "#Part (a):\n", + "HPBW=70*lamda/d #in degree\n", + "print \"HPBW = %0.2f degree \" %HPBW \n", + "#Part (b):\n", + "BWFN=140*lamda/d #in degree\n", + "print \"BWFN = %0.2f degree \" %BWFN \n", + "#Part (c):\n", + "Gp=6*(d/lamda)**2 #gain \n", + "Gp_dB=10*log10(Gp) #in dB\n", + "print \"Power Gain = %0.f dB \" %Gp_dB " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HPBW = 0.23 degree \n", + "BWFN = 0.46 degree \n", + "Power Gain = 57 dB \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 : page 6.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given Data:\n", + "f=15.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "Gp_dB=75.0 #in dB\n", + "c=3*10**8 #Speed of light in m/s\n", + "lamda=c/f #in meter\n", + "#Formula : Gp=9.87*(d/lamda)**2\n", + "#Formula : Gp_dB=10log10(Gp)\n", + "d=sqrt((10**(Gp_dB/10))*lamda**2/9.87) #in meter\n", + "print \"Diameter of a parabolic reflector = %0.2f m\" %d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of a parabolic reflector = 35.80 m\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 : page 6.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data:\n", + "f=5000.0 #in MHz\n", + "f=f*10**6 #in Hz\n", + "d=10 #in feet\n", + "d=d*0.3048 #in meter\n", + "c=3*10**8 #Speed of light in m/s\n", + "lamda=c/f #in meter\n", + "r=2*d**2.0/lamda #in meter\n", + "print \"Minimum distance between primary and secondary antenna = %0.f m\" %r\n", + "# Ans wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum distance between primary and secondary antenna = 310 m\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.9 : page 6.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data:\n", + "K=55.0 #Aperture Efficiency in %\n", + "K=K/100 #Aperture Efficiency\n", + "f=15.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "c=3*10**8 #Speed of light in m/s\n", + "lamda=c/f #in meter\n", + "G_dB=30 #in dB\n", + "G=10**(G_dB/10) #Gain unitless\n", + "#Formula : G=4*pi*K*A/lamda**2\n", + "A=(G*lamda**2)/(4*pi*K) #in m**2\n", + "print \"Diameter of parabolic reflector = %0.3f m**2\" %A \n", + "#Part (b)\n", + "d=sqrt(4.0*A/pi) #in meter\n", + "HPBW=70*lamda/d #in degree\n", + "print \"HPBW = %0.2f degree \" %HPBW \n", + "#Part (c)\n", + "BWFN=140*lamda/d #in Degree\n", + "print \"BWFN = %0.2f degree \" %BWFN \n", + "#Note : Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of parabolic reflector = 0.058 m**2\n", + "HPBW = 5.16 degree \n", + "BWFN = 10.31 degree \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 : page 6.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data:\n", + "Tau=0.7 #Design Factor\n", + "L1=0.3*2 #in meter\n", + "c=3*10**8 #speednof light in m/s\n", + "f1=(c/(2*L1))/10**6 #in MHz\n", + "#Design factor : L1/L2=L2/L3=L3/L4=.......=0.7\n", + "L2=0.7/L1 #in meter\n", + "f2=f1*0.7 #in MHz\n", + "f3=f2*0.7 #in MHz\n", + "f4=f3*0.7 #in MHz\n", + "f5=f4*0.7 #in MHz\n", + "f6=f5*0.7 #in MHz\n", + "f7=f6*0.7 #in MHz\n", + "f8=f7*0.7 #in MHz\n", + "f9=f8*0.7 #in MHz\n", + "f10=f9*0.7 #in MHz\n", + "print \"Cutoff frequencies in MHz :\"\n", + "print \"f1 = %0.2f MHz \" %f1 \n", + "print \"f2 = %0.2f MHz \" %f2\n", + "print \"f3 = %0.2f MHz \" %f3\n", + "print \"f4 = %0.2f MHz \" %f4\n", + "print \"f5 = %0.2f MHz \" %f5\n", + "print \"f6 = %0.2f MHz \" %f6\n", + "print \"f7 = %0.2f MHz \" %f7\n", + "print \"f8 = %0.2f MHz \" %f8\n", + "print \"f9 = %0.2f MHz \" %f9\n", + "print \"f10 = %0.2f MHz \" %f10\n", + "print \"Passband = %0.2f\"%(f1-f10 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cutoff frequencies in MHz :\n", + "f1 = 250.00 MHz \n", + "f2 = 175.00 MHz \n", + "f3 = 122.50 MHz \n", + "f4 = 85.75 MHz \n", + "f5 = 60.02 MHz \n", + "f6 = 42.02 MHz \n", + "f7 = 29.41 MHz \n", + "f8 = 20.59 MHz \n", + "f9 = 14.41 MHz \n", + "f10 = 10.09 MHz \n", + "Passband = 239.91\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 : page 6.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, tan, acos\n", + "#Given Data:\n", + "from sympy import symbols, simplify, atan, acos, N\n", + "lamda = symbols('lamda', real = True)\n", + "#Assuming typical values for f \n", + "f1=0.2*lamda #in E-plane \n", + "f2=0.375*lamda # in H-plane\" \n", + "b=10*lamda # mouth height\n", + "delta=0.2*lamda\n", + "print \"Length :\"\n", + "L=pow(b,2)/(8*delta)\n", + "print (L)\n", + "print \"Flare Angle (Theta):\",\n", + "Theta=atan(b/(2*L))*180/pi\n", + "print round(Theta,1),'degree'\n", + "print \"Flare Angle (fi):\",\n", + "delta=0.375*lamda\n", + "fi=acos(L/(L+delta))*180/pi # degree\n", + "print round(fi,1),'degree'\n", + "print \"fi=\",(acos((10**2/(8*0.2))/((10**2/(8*0.2))+0.375))),\" radian\" \n", + "fi=(acos((10**2/(8*0.2))/((10**2/(8*0.2))+0.375))) #in Degree\n", + "print \"Width :\" \n", + "a=2*L*tan(fi)\n", + "print N(a,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length :\n", + "62.5*lamda\n", + "Flare Angle (Theta): 4.6 degree\n", + "Flare Angle (fi): 6.3 degree\n", + "fi= 0.109271705413178 radian\n", + "Width :\n", + "13.7*lamda\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter7.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter7.ipynb new file mode 100755 index 00000000..a5b1cf64 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter7.ipynb @@ -0,0 +1,274 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 07 : Antenna Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.1 : page 7.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "f=6.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "d=10 #in feet\n", + "d=3.048 #in meter\n", + "c=3*10**8 #in m/s\n", + "lamda=c/f #in meters\n", + "rmin=2*d**2/lamda #in meters\n", + "print \"Minimum separation distance = %0.2f m\" %rmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum separation distance = 371.61 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.2 : page 7.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "GP=12.5 #unitless\n", + "P_dB=23 #in dB\n", + "P=10**(P_dB/10) #unitless\n", + "G=GP*P #unitless\n", + "GdB=GP+P_dB #in dB\n", + "print \"Gain of large antenna = %0.2f \"% GdB\n", + "#Note : Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain of large antenna = 35.50 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.3 : page 7.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#given data :\n", + "print \"Open mouth aperture, D = 10*lambda\" \n", + "print \"Power gain : GP = 6*(D/labda)**2\" \n", + "GP=6*10**2 #unitless\n", + "GPdB=10*log10(GP)\n", + "print \"Power gain = %0.1f dB \" %GPdB " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open mouth aperture, D = 10*lambda\n", + "Power gain : GP = 6*(D/labda)**2\n", + "Power gain = 27.8 dB \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.4 : page 7.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "f=30000. #in MHz\n", + "f=f*10**6 #in Hz\n", + "d=20 #in feet\n", + "d=20*0.3048 #in meter\n", + "c=3*10**8 #in m/s\n", + "lamda=c/f #in meters\n", + "r=2*d**2/lamda #in meters\n", + "print \"Minimum distance between primary and secondary = %0.2f m\" %r\n", + "# Answe wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum distance between primary and secondary = 7432.24 m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.5 : page 7.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "f=1.2 #in GHz\n", + "f=f*10**9 #in Hz\n", + "BWFN=5 #in degree\n", + "c=3.0*10**8 #in m/s\n", + "lamda=c/f #in meters\n", + "D=140*lamda/BWFN #in meters\n", + "print \"Diameter of a paraboloidal reflector = %0.2f m\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of a paraboloidal reflector = 7.00 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.6 : page 7.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, log10\n", + "#given data :\n", + "f=9.0 #in GHz\n", + "f=f*10**9 #in Hz\n", + "c=3*10**8 #in m/s\n", + "lamda=c/f #in meters\n", + "r=35 #in cm\n", + "r=r*10**-2 #in meters\n", + "Attenuation=9.8 #in dB\n", + "#Formula : 10*log10(WT/Wr) = 9.8dB\n", + "WTbyWr=10**(Attenuation/10) #unitless\n", + "D=(4*pi*r/lamda)*(sqrt(1/WTbyWr)) #unitless\n", + "D_dB=10*log10(D) \n", + "print \"Gain of the horn = %0.2f dB \" %D_dB " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain of the horn = 16.30 dB \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 7.7 : page 7.29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, log10\n", + "#given data :\n", + "ratio = 28 # length:diameter\n", + "from sympy import symbols, N\n", + "lamda = symbols('lamda')\n", + "L = 0.925*lamda\n", + "Z = 710+1J*0 # ohm\n", + "Zs = 35476/Z # ohm\n", + "D = L/ratio\n", + "omega = 2*D\n", + "print \"omega =\",N(omega,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "omega = 0.066*lamda\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} diff --git a/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter9.ipynb b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter9.ipynb new file mode 100755 index 00000000..bac053ad --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_k.k._sharma/chapter9.ipynb @@ -0,0 +1,351 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 09 : Ground wave propagation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.1 : page 9-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "HT=50 #in meter\n", + "HR=10 #in meter\n", + "f=60 #in MHz\n", + "P=10 #in KW\n", + "D=10 #in Km\n", + "D=D*10**3 #in m\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/(f*10**6) #in meter\n", + "#Part (i) \n", + "d=3.55*(sqrt(HT)+sqrt(HR)) #in Km\n", + "print \"Maximum line of sight range = %0.2f km \" %d \n", + "#Part (ii)\n", + "Et=88*sqrt(P*1000)*HT*HR/(lamda*D**2)\n", + "print \"The field strength at 10 km = %0.1e V/m\" %Et \n", + "#Part (iii)\n", + "#Formula : Et=88*sqrt(p)*HT*HR/(lambda*D**2)\n", + "Et=1 #in mV/m\n", + "D=sqrt(88*sqrt(P*1000)*HT*HR/(lamda*Et*10**-3)) #in m\n", + "print \"Distance = %0.3f km \" %(D/1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum line of sight range = 36.33 km \n", + "The field strength at 10 km = 8.8e-03 V/m\n", + "Distance = 29.665 km \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.2 : page 9-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "P=200 #in KW\n", + "D=20 #in Km\n", + "D=D*10**3 #in m\n", + "E=300*sqrt(P)/D #in V/m\n", + "print \"Field Strength at 20 km = %0.2f mV/m \" %(E*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field Strength at 20 km = 212.13 mV/m \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.3 : page 9-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data :\n", + "HT=10 #in meter\n", + "HR=3 #in meter\n", + "P=200 #in W\n", + "D=50 #in Km\n", + "D=D*10**3 #in Km\n", + "f=150 #in MHz\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/(f*10**6) #in meter\n", + "E=88*sqrt(P)*HT*HR/(lamda*D**2) #in m\n", + "print \"Field Strength at 20 km = %0.2f microV/m \" %(E*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field Strength at 20 km = 7.47 microV/m \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.4 : page 9-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "HT=100 #in meter\n", + "d=60 #in Km\n", + "#Formula : d=4.12*(sqrt(HT)+sqrt(HR)) #in Km\n", + "HR=(d/4.12-sqrt(HT))**2 #in meter\n", + "print \"Height of receiving antenna = %0.2f m\" %HR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of receiving antenna = 20.82 m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.5 : page 9-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "HT=3000 #in meter\n", + "HR=6000 #in meter\n", + "d=4.12*(sqrt(HT)+sqrt(HR)) #in Km\n", + "print \"Maximum possible distance = %0.2f km\" %d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum possible distance = 544.80 km\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.6 : page 9-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#given data :\n", + "f_MHz=3000 #in MHz\n", + "d_Km=384000 #in Km\n", + "PathLoss=32.45+20*log10(f_MHz)+20*log10(d_Km) #in dB\n", + "print \"Path loss = %0.2f dB \" %PathLoss" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Path loss = 213.68 dB \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.7 : page 9-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "#Part (i)\n", + "D=10 #in Km\n", + "lamda=10000 #in meter\n", + "LP=(4*pi*D*1000/lamda)**2 #in dB\n", + "print \"Path loss = %0.2f dB\" %LP\n", + "#Part (ii)\n", + "D=10**6 #in Km\n", + "lamda=0.3 #in cm\n", + "LP=(4*pi*D*1000/(lamda*10**-2))**2 #in dB\n", + "print \"Path loss = %0.2e dB \" %LP \n", + "#Note : Answer in the book is wrong as value putted in the solution is differ from given in question." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Path loss = 157.91 dB\n", + "Path loss = 1.75e+25 dB \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.8 : page 9-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#given data :\n", + "HT=50 #in meter\n", + "HR=5 #in meter\n", + "d=4.12*(sqrt(HT)+sqrt(HR)) #in Km\n", + "print \"Range of LOS system = %0.2f km\"%d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range of LOS system = 38.35 km\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 9.9 : page 9-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#given data :\n", + "PT=5.0 #in KW\n", + "PT=PT*1000 #in W\n", + "D=100.0 #in Km\n", + "D=D*10**3 #in m\n", + "f=300.0 #in MHz\n", + "GT=1.64 #Directivity of transmitter\n", + "GR=1.64 #Directivity of receiver\n", + "c=3*10**8 #speed of light in m/s\n", + "lamda=c/(f*10**6) #in meter\n", + "Pr=PT*GT*GR*(lamda/(4*pi*D))**2\n", + "print \"Maximum power received = %0.3e W\"% Pr\n", + "# Answer wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power received = 8.516e-09 W\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} diff --git a/Applied_Physics-I/screenshots/Capture1.png b/Applied_Physics-I/screenshots/Capture1.png new file mode 100755 index 00000000..c1b1d679 Binary files /dev/null and b/Applied_Physics-I/screenshots/Capture1.png differ diff --git a/Applied_Physics-I/screenshots/Capture3.png b/Applied_Physics-I/screenshots/Capture3.png new file mode 100755 index 00000000..7c472fe2 Binary files /dev/null and b/Applied_Physics-I/screenshots/Capture3.png differ diff --git a/Applied_Physics-I/screenshots/Capture4.png b/Applied_Physics-I/screenshots/Capture4.png new file mode 100755 index 00000000..a7775a6b Binary files /dev/null and b/Applied_Physics-I/screenshots/Capture4.png differ diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter1.ipynb new file mode 100755 index 00000000..da15fd14 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter1.ipynb @@ -0,0 +1,2515 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:c884249c28dc1486b445f3d4013b1d4277c7f2f132398c648a2fa82d33db0def" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Crystallography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1,Page number 1-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=26.98 #atomic weight of Al\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=2700 #Density\n", + "n=4 #FCC structure\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "print\"Unit cell dimension of Al=\",\"{0:.3e}\".format(a),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unit cell dimension of Al= 4.049e-10 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2,Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "As=28.1 #atomic weight of Si\n", + "Ag=69.7 #atomic weight of Ga\n", + "Aa=74.9 #atomic weight of As\n", + "a_s=5.43*10**-8 #lattice constant of Si\n", + "aga=5.65*10**-8 #lattice constant of GaAs\n", + "ns=8 #no of atoms/unit cell in Si\n", + "nga=4 #no of atoms/unit cell in GaAs\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "#p=(n*A)/(N*a**3) this is formula for density\n", + "\n", + "#for Si\n", + "\n", + "ps=(ns*As)/(N*a_s**3)\n", + "\n", + "print\"1) Density of Si=\",round(ps,4),\"gm/cm^3\"\n", + "\n", + "#for GaAs\n", + "\n", + "Aga=Ag+Aa #molecular wt of GaAs\n", + "\n", + "pga=(nga*Aga)/(N*aga**3)\n", + "\n", + "print\"2) Density of GaAs=\",round(pga,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Density of Si= 2.3312 gm/cm^3\n", + "2) Density of GaAs= 5.3244 gm/cm^3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.3,Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.5 #atomic weight of Cu\n", + "N=6.023*10**23 #Avogadro's number\n", + "n=4 #FCC structure\n", + "r=1.28*10**-8 #atomic radius of Cu\n", + "\n", + "#for FCC\n", + "\n", + "a=4*r/(sqrt(2)) #lattice constant\n", + "p=(n*A)/(N*a**3)\n", + "\n", + "print\"Density of Cu=\",round(p,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of Cu= 8.887 gm/cm^3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.4,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=50 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.96 #Density\n", + "n=2 #BCC structure\n", + "\n", + "#step 1 : claculation for lattice constant (a)\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "#step 2 : radius of an atom in BCC\n", + "\n", + "r=sqrt(3)*a/4\n", + "\n", + "#step 3 : Atomic packing factor (APF)\n", + "\n", + "APF=n*((4./3)*math.pi*r**3)/a**3\n", + "\n", + "print\"Atomic packing factor (APF)=\",round(APF,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Atomic packing factor (APF)= 0.6802\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.5,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=120 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.2 #Density\n", + "n=2 #BCC structure\n", + "m=20 #mass\n", + "\n", + "#step 1 : claculation for volume of unit cell(a**3)\n", + "\n", + "a=(n*A/(N*p))\n", + "\n", + "#step 2 : volume of 20 gm of the element\n", + "\n", + "v=m/p\n", + "\n", + "#step 3 :no of unit cell\n", + "\n", + "x=v/a\n", + "\n", + "print\"no of unit cell=\",\"{0:.3e}\".format(x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell= 5.019e+22\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.6,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=132.91 #atomic weight of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=1900 #Density\n", + "a=6.14*10**-10 #lattice constant\n", + "\n", + "#step 1 : type of structure\n", + "\n", + "n=(p*N*a**3)/A\n", + "\n", + "print\"n =\",round(n)\n", + "\n", + "print\"BCC structure\"\n", + "\n", + "#step 2: no of atoms/m**3\n", + "\n", + "x=n/a**3\n", + "\n", + "print\"no of atoms/m^3=\",\"{0:.3e}\".format(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 2.0\n", + "BCC structure\n", + "no of atoms/m^3= 8.610e+27\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.7,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=0.4049*10**-9 #lattice constant\n", + "t=0.006*10**-2 #thickness of Al foil\n", + "A=50*10**-4 #Area of foil\n", + "\n", + "V1=a**3 #volume of unit cell\n", + "\n", + "V=A*t #volume of the foil\n", + "\n", + "N=V/V1 #no of unit cell in the foil\n", + "\n", + "print\"no of unit cell in the foil=\",\"{0:.3e}\".format(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell in the foil= 4.519e+21\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.1,Page number 1-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#on joining centre of 3 anions,an equilateral triangle is formed and on joining centres of any anion and cation a right angle triangle ABC os formed\n", + "\n", + "#where AC=rc+ra\n", + "\n", + "#and BC=ra\n", + "\n", + "#m(angle (ACB))=30 degree\n", + "\n", + "#therefore cos (30)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.0-math.cos(30.0*math.pi/180))/math.cos(math.pi*30/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio of ligancy 3=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 3= 0.1547\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.2,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1-math.cos(45*math.pi/180))/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 6 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.3,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#since plane is square hence it is same as ligancy 6\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1-math.cos(45*math.pi/180))/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 8 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 8 = 0.4142\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.4,Page number 1-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#a tetrahedron CAEH can be considered with C as the apex of the tetrahedron.\n", + "\n", + "#the edges AE,AH and EH of the tetrahedron will then be the face of the cube faces ABEF,ADHF,EFHG resp.\n", + "\n", + "#from fig\n", + "\n", + "#AO=ra+rc and AJ=ra\n", + "\n", + "#AE=root(2)*a and AG=root(3)*a\n", + "\n", + "#AO/AJ=AG/AE=(ra+rc)/ra=root(3)*a/root(2)*a\n", + "\n", + "#assume rc/ra=r\n", + "r=(math.sqrt(3)-math.sqrt(2))/math.sqrt(2)\n", + "\n", + "print\"critical radius ratio for ligancy 4 = \",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 4 = 0.2247\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.5,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#ligancy 8 represents cubic arrangment .8 anions are at the corners and touch along cube edgs.Along the body diagonal the central cation and the corner anion are in contact.\n", + "\n", + "#cube edge=2*ra\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#and body diagonal=root(3)*cube edge=root(3)[2*(rc+ra)]\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=math.sqrt(3)-1.0\n", + "\n", + "print\"critical radius ratio of ligancy 8=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 8= 0.7321\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.6,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for an ionic crystal exibiting HCP structure the arrangment of ions refere from textbook\n", + "\n", + "#at centre we have a cation with radius rc=OA\n", + "\n", + "#it is an touch with 6 anions with radius ra=AB\n", + "\n", + "#OB=OC=ra+rc\n", + "\n", + "#intrangle ODB ,m(angle (OBC))=60 degree ,m(angle (ODB))=90 degree\n", + "\n", + "#therefore cos(60)=BD/OB=AB/(OA+OB)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.-math.cos(60*math.pi/180))/math.cos(60*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio 0f HCP structure=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio 0f HCP structure= 1.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.2,Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion a,b/3,2*c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 1:1/3:2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1\n", + "\n", + "r2=3\n", + "\n", + "r3=1./2\n", + "\n", + "#taking LCM of 2 and 1 is 2\n", + "\n", + "l=2\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",m3,m2,m1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= 1.0 6 2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.4,Page number 1-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "r=1.414 #atomic radius in amstrong unit\n", + "\n", + "#for FCC structure\n", + "\n", + "a=4*r/math.sqrt(2)\n", + "\n", + "#part 1: plane(2,0,0)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h1=2\n", + "k1=0\n", + "l1=0\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d1=a/sqrt(h1**2+k1**2+l1**2)\n", + "\n", + "print\"1)interplanar spacing for (2,0,0) plane=\",round(d1,4),\"amstrong\"\n", + "\n", + "#part 2: plane(1,1,1)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h2=1\n", + "k2=1\n", + "l2=1\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d2=a/sqrt(h2**2+k2**2+l2**2)\n", + "\n", + "print\"2)interplanar spacing for(1,1,1) plane=\",round(d2,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)interplanar spacing for (2,0,0) plane= 1.9997 amstrong\n", + "2)interplanar spacing for(1,1,1) plane= 2.3091 amstrong\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.1,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=2180 #density of NaCl\n", + "M=23+35.5 #molecular weight of NaCl\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1.0/3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 5.627e-10 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.2,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=8.9 #density of Cu atom\n", + "A=63.55 #atomic weight of Cu atom\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"cm\"\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of Cu atom\n", + "\n", + "d=2*r #diameter of Cu atom\n", + "\n", + "print\"2) Diameter of Cu atom=\",\"{0:.3e}\".format(d),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.620e-08 cm\n", + "2) Diameter of Cu atom= 2.559e-08 cm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.3,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #diamond structure\n", + "A=12.01 #atomic wt\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=3.75*10**-8 #lattice constant of diamond\n", + "\n", + "ro=(n*A)/(N*(a**3))\n", + "\n", + "print\"Density of diamond=\",round(ro,4),\"gm/cc\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of diamond= 3.025 gm/cc\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.4,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:4b:infinity (plane parallel to z axis)\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:4:infinity\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=1./4\n", + "r3=0\n", + "\n", + "#taking LCM of 3 and 4 i.e. 12\n", + "\n", + "l=12\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (0, 3.0, 4.0)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.5,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:-2b:3/2c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:-2:3/2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=-1./2\n", + "r3=2./3\n", + "\n", + "#taking LCM of 3, 2 and 3/2 is 6\n", + "\n", + "l=6\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (4.0, -3.0, 2.0)\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.6,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#if a plane cut at length m,n,p on the three crystal axes,then\n", + "\n", + "#m:n:p=xa:yb:zc\n", + "\n", + "#when primitive vectors of unit cell and numbers x,y,z,are related to miller indices (h,k,l)of the plane by relation\n", + "\n", + "#1/x:1/y:1/z=h:k:l\n", + "\n", + "#since a=b=c (crystal is simple cubic)\n", + "\n", + "#and (h,k,l)=(1,2,3)\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./1\n", + "r2=1./2\n", + "r3=1./3\n", + "\n", + "#taking LCM of 1 ,2 and 3 is 6\n", + "\n", + "l=6\n", + "\n", + "m=(l*r1)\n", + "\n", + "n=(l*r2)\n", + "\n", + "p=(l*r3)\n", + "\n", + "print\"ratio of intercepts=\",(m,n,p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of intercepts= (6.0, 3.0, 2.0)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.7,Page number 1-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.2 #in amstrong unit\n", + "b=1.8 #in amstrong unit\n", + "c=2 #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=2\n", + "k=3\n", + "l=1\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given tthat plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.2/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",n,\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",p,\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 1.2 amstrong\n", + "2)Z intercept= 4.0 amstrong\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.8,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=0\n", + "d=2 #interpanar spacing in amstrong unit\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "print\"radius r=\",(r),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius r= 1.0 amstrong\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.9,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #for FCC structure\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=1\n", + "d=2.08*10**-10 #distance\n", + "A=63.54 #atomic weight of Cu\n", + "N=6.023*10**26 #amstrong no\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#also (a**3*q)=n*A/N\n", + "\n", + "q=n*A/(N*a**3)\n", + "\n", + "print\"1)density=\",round(q,4),\"kg/m^3\"\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "d=r*2\n", + "\n", + "print\"2)radius r=\",\"{0:.3e}\".format(r),\"m\"\n", + "\n", + "print\"3)diameter d=\",\"{0:.3e}\".format(d),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)density= 9024.4855 kg/m^3\n", + "2)radius r= 1.274e-10 m\n", + "3)diameter d= 2.547e-10 m\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.10,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.546 #atomic weight of Cu\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=8930 #Density\n", + "n=1.23 #no.of electron per atom\n", + "\n", + "#density=mass/volume\n", + "\n", + "#therfore 1/volume=density/mass\n", + "\n", + "#since electron concentration is needed, let us find out no of atoms/volume(x)\n", + "\n", + "x=N*p/A\n", + "\n", + "#now one atom contribute n=1.23 electron\n", + "\n", + "#therefore x atoms contribute y no of free electron\n", + "\n", + "y=x*n\n", + "\n", + "print\"free electron concentration=\",\"{0:.3e}\".format(y),\"electron/m^3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "free electron concentration= 1.041e+29 electron/m^3\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.11,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.5 #in amstrong unit\n", + "b=2 #in amstrong unit\n", + "c=4. #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=3\n", + "k=2\n", + "l=6\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given that plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.5/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",(n),\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",(p),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 3.0 amstrong\n", + "2)Z intercept= 2.0 amstrong\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.12,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=7.87 #density of metal\n", + "A=55.85 #atomic wt of metal\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=2.9*10**-8 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"Number of atom per unit cell of a metal=\",round(n,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of atom per unit cell of a metal= 2.0\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.13,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=9.6*10**2 #density of sodium crystal\n", + "A=23 #atomic weight of sodium crystal\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 4.301e-10 m\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.15,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=2.7*10**3 #density of metal\n", + "A=27 #atomic wt of metal\n", + "N=6.023*10**26 #Avogadro's number\n", + "a=4.05*10**-10 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"1) Number of atom per unit cell of a metal=\",round(n,0)\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of metal\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Number of atom per unit cell of a metal= 4.0\n", + "2) atomic radius of a metal= 1.432e-10 m\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.16,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=5.98*10**3 #density of chromium\n", + "A=50 #atomic wt of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "#for BCC\n", + "\n", + "r=math.sqrt(3)*a/4 #radius of chromium\n", + "\n", + "APF=(n*(4./3)*math.pi*(r**3))/(a**3)\n", + "\n", + "print\"2) A.P.F. for chromium=\",round(APF,4)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.028e-10 m\n", + "2) A.P.F. for chromium= 0.6802\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.17,Page number 1-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=6250 #density\n", + "M=60.2 #molecular weight\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 3.999e-10 m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.19,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.82*10**-9 #lattice constant\n", + "n=2 #FCC crystal\n", + "t=17.167 #glancing angle in degree\n", + "q=math.pi/180*t #glancing angle in radians\n", + "\n", + "#assuming reflection in (1,0,0) plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#using Bragg's law , 2*d*sin(q)=n*la\n", + "\n", + "la=2*d*sin(q)/n\n", + "\n", + "print\"wavlength of X-ray=\",\"{0:.3e}\".format(la),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavlength of X-ray= 8.323e-10 m\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.20,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #Diamond structure\n", + "ro=2.33*10**3 #density of diamond\n", + "M=28.9 #atomic weight of diamond\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "r=math.sqrt(3)*a/8 #radius of diamond structure\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 5.482e-10 m\n", + "2) atomic radius of a metal= 1.187e-10 m\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.21,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=8.57*10**3 #density of chromium\n", + "d=2.86*10**-10 #nearest atoms distance\n", + "\n", + "#d=sqrt(3)/2*a\n", + "\n", + "a=2*d/math.sqrt(3)\n", + "\n", + "#now use formulae a**3*ro=n*A/N\n", + "\n", + "#therefore a**3*ro/n=mass of unit cell/(no of atoms pre unit cell)=mass of one atom\n", + "\n", + "m=a**3*ro/n\n", + "\n", + "print\"mass of one atom=\",\"{0:.3e}\".format(m),\"kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of one atom= 1.543e-25 kg\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.1,Page number 1-68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=4.255*10**-10 #interplaner spacing\n", + "l=1.549*10**-10 #wavelength of x ray\n", + "\n", + "#part 1: for smallest glancing angle(n=1)\n", + "\n", + "n1=1\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"1)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#part 2: for highst order\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"2)highest order possible =\",math.floor(n2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)glancing angle= 10.4875 degree\n", + "2)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.2,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.125*10**-10 #lattice constant\n", + "d=a/2 #interplaner spacing\n", + "n=2 #second order maximum\n", + "l=0.592*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.8608 degree\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.3,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=1 #for 1st order\n", + "n2=2 #for 2nd order\n", + "t=3.4 #angle where 1st order reflection done\n", + "t1=t*math.pi/180 #convert degree to radian\n", + "\n", + "m=math.sin(t1)\n", + "\n", + "#but from Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#for for constant distance(d) and wavelength(l) \n", + "\n", + "#order(n) is directly proportionl to sine of angle i.e (sin(t))\n", + "\n", + "#n1/n2=sin(t1)/sin(t2)\n", + "\n", + "#assume sin(t2)=a\n", + "\n", + "a=n2/n1*m\n", + "\n", + "t2=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"second order reflection take place at an angle=\",round(t2,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "second order reflection take place at an angle= 6.812 degree\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.4,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "V=50*10**3 #operating voltage of x-ray\n", + "M=74.6 #molecular weight\n", + "p=1.99*10**3 #density\n", + "n=4 #no of atoms per unit cell(for FCC structure)\n", + "h=6.63*10**-34 #plank's constant\n", + "c=3*10**8 #velocity \n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "#step 1:clculating shortest wavelength\n", + "\n", + "l=h*c/(e*V)\n", + "\n", + "print\"1)shortest wavelength=\",(l),\"m\"\n", + "\n", + "#step:2 calculating distance(d)\n", + "\n", + "#now a**3*p=n*M/N therefore,\n", + "\n", + "a=(n*M/(N*p))**(1./3)\n", + "\n", + "#since KCl is ionic crystal herefore,\n", + "\n", + "d=a/2\n", + "\n", + "#step 3: calculaing glancing angle\n", + "\n", + "#using Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#assume sin(t)=a, wavelength is minimum i.e l and n=1\n", + "\n", + "n=1\n", + "\n", + "a=n*l/(2*d)\n", + "\n", + "t=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"2) glancing angle=\",round(t,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)shortest wavelength= 2.48625e-11 m\n", + "2) glancing angle= 2.265 degree\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.5,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order maximum\n", + "l=0.82*10**-10 #wavelength of X ray\n", + "qd=7.0 #glancing angle in degree\n", + "qm=51./60 #glancing angle in minute\n", + "qs=48./3600 #glancing angle in second\n", + "\n", + "q=qd+qm+qs #total glancin angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "a=3*10**-10 #lattice constant\n", + "\n", + "#we know that d=a/root(h**2+k**2+l**2)\n", + "\n", + "#assume root(h**2+k**2+l**2) =m\n", + "\n", + "#arranging terms we get\n", + "\n", + "m=a/d\n", + "\n", + "print\"square root(h**2+k**2+l**2)=\",round(m,0)\n", + "\n", + "print\"hence possible solutions are (100),(010),(001)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "square root(h**2+k**2+l**2)= 1.0\n", + "hence possible solutions are (100),(010),(001)\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.6,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1j #wavelength of X ray\n", + "\n", + "#part 1:for(100)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q1=5.4 #glancing angle in degree\n", + "\n", + "dl1=n*l/(2*math.sin(q1*math.pi/180))\n", + "\n", + "#part 2:for(110)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q2=7.6 #glancing angle in degree\n", + "\n", + "dl2=n*l/(2*math.sin(q2*math.pi/180))\n", + "\n", + "#part 3:for(111)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q3=9.4 #glancing angle in degree\n", + "\n", + "dl3=n*l/(2*math.sin(q3*math.pi/180))\n", + "\n", + "#for taking ratio divide all dl by dl1\n", + "\n", + "d1=dl1/dl1\n", + "\n", + "d2=dl2/dl1\n", + "\n", + "d3=dl3/dl1\n", + "\n", + "print\"cubic lattice structure is=\",d1,d2,d3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " cubic lattice structure is= (1+0j) (0.711559669333+0j) (0.576199350225+0j)\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.7,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1.54*10**-10 #wavelength of rock salt crystal\n", + "q=21.7 #glancing angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "print\"lattice constant of crystal=\",\"{0:.3e}\".format(d),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lattice constant of crystal= 2.083e-10 meter\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.8,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "n=2 #first order maximum\n", + "\n", + "l=0.714*10**-10 #wavelength of X-ray crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 14.6984 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.9,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2.82*10**-10 #interplaner spacing\n", + "t=10 #glancing angle\n", + "\n", + "#for part 1\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "#using Bragg's law n*l=2*d*sin(t)\n", + "\n", + "l=2*d*math.sin(math.pi*t/180)/n\n", + "\n", + "print\"1)wavelength=\",\"{0:.3e}\".format(l),\"meter\"\n", + "\n", + "#for part 2\n", + "\n", + "n1=2\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"2)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#for part 3\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"3)highest order possible =\",(floor(n2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)wavelength= 9.794e-11 meter\n", + "2)glancing angle= 20.322 degree\n", + "3)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.10,Page number 1-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for line -A\n", + "\n", + "n1=1 #1st order maximum\n", + "q1=30 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line A n1*l1=2*d1*sin(q1)\n", + "\n", + "#d1=n1*l1/(2*sin(q1))\n", + "\n", + "#for line B\n", + "\n", + "l2=0.97 #wavelength in amstrong unit\n", + "n2=3 #1st order maximum\n", + "q2=60 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line B n2*l2=2*d2*sin(q2)\n", + "\n", + "#since for both lines A and B we use same plane of same crystal,therefore\n", + "\n", + "#d1=d2\n", + "\n", + "#therefore equution became n2*l2=2*n1*l1/(2*sin(q1))*sin(q2)\n", + "\n", + "#by arranging terms we get\n", + "\n", + "\n", + "l1=n2*l2*2*math.sin(q1*math.pi/180)/(2*n1*math.sin(q2*math.pi/180))\n", + "\n", + "print\"wavelength of the line A=\",round(l1,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of the line A= 1.6801 amstrong\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.11,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order minimum\n", + "d=5.5*10**-11 #atomic spacing\n", + "e=1.6*10**-19 #charge on one electron\n", + "Ee=10*10**3 #energy in eV\n", + "E=e*Ee #energy in Joule\n", + "m=9.1*10**-31 #mass of elelctron\n", + "h=6.63*10**-34 #plank's constant\n", + "\n", + "l=h/math.sqrt(2*m*E) #wavelength\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 6.4129 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.12,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#for rock salt\n", + "\n", + "d=a/2 #interplaner spacing\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "l=1.541*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angl\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.2038 degree\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.1,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.08 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "T1=1000 #temperature\n", + "\n", + "n1=math.exp(-Ev/(K*T1))\n", + "\n", + "#at 500k\n", + "\n", + "T2=500 #temperature\n", + "\n", + "n2=math.exp(-Ev/(K*T2))\n", + "\n", + "v=(n1)/(n2) #ratio of vacancies\n", + "\n", + "print\"ratio of vacancies=\",round(v,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of vacancies= 274234.5745\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.2,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.95 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=500 #temperature\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "print\"ratio of no of vacancies to no of atoms=\",\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of no of vacancies to no of atoms= 2.303e-20\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.3,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.8 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#ratio of vacancy is n/N assume be r=exp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "t1=-119 #temperature in degree\n", + "T1=t1+273 #temperature in kelvine\n", + "r1=math.exp(-Ev/(K*T1))\n", + "\n", + "print\"1)ratio of vacancies at -119 degree=\",\"{0:.3e}\".format(r1)\n", + "\n", + "#at 500k\n", + "\n", + "t2=80 #temperature in degree\n", + "\n", + "T2=t2+273 #temperature in kelvine\n", + "\n", + "r2=exp(-Ev/(K*T2))\n", + "\n", + "v=(r1)/(r2) #ratio of vacancies\n", + "\n", + "print\"2)ratio of vacancies at 80 degree=\",\"{0:.3e}\".format(r2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)ratio of vacancies at -119 degree= 1.399e-59\n", + "2)ratio of vacancies at 80 degree= 2.110e-26\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.4,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.5 #energy of formaton of frankel defect\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=700 #temperature\n", + "N=6.023*10**26 #avogadro's no\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(2*K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "qs=5.56 #specific density\n", + "q=5.56*10**3 #real density ke/m**3\n", + "M=0.143 #molecular weight in kg/m**3\n", + "ma=M/N #mass of one molecule\n", + "v=ma/q #vol of one molecule\n", + "\n", + "#v volume containe 1 molecule\n", + "\n", + "#therefore 1 m**3 containe x molecule\n", + "\n", + "x=1./v\n", + "d=m*x #defect per m**3\n", + "dm=d*10**-9 #defect per mm**3\n", + "\n", + "print\"number of frankel defects per mm^3=\",\"{0:.3e}\".format(dm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of frankel defects per mm^3= 9.432e+16\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter2_.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter2_.ipynb new file mode 100755 index 00000000..cb41afc6 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter2_.ipynb @@ -0,0 +1,853 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:be03421cc765abd4c9572b7c61bb823243fbea415c12e649bb60ed73fc4375e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.1,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=1.72*10**-8 #resistivity of Cu\n", + "s=1/ro #conductivity of Cu\n", + "n=10.41*10**28 #no of electron per unit volume\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "u=s/(n*e)\n", + "\n", + "print\"mobility of electron in Cu =\",\"{0:.3e}\".format(u),\"m^2/volt-sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mobility of electron in Cu = 3.491e-03 m^2/volt-sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.2,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=63.5 #atomic weight\n", + "u=43.3 #mobility of electron\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**23 #Avogadro's number\n", + "d=8.96 #density\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "n=1*Ad\n", + "\n", + "ro=1/(n*e*u)\n", + "\n", + "print\"Resistivity of Cu =\",\"{0:.3e}\".format(ro),\"ohm-cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Cu = 1.699e-06 ohm-cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.3,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "e=1.6*10**-19 #charge on electron\n", + "ne=2.5*10**19 #density of carriers\n", + "nh=ne #for intrinsic semiconductor\n", + "ue=0.39 #mobility of electron\n", + "uh=0.19 #mobility of hole\n", + "\n", + "s=ne*e*ue+nh*e*uh #conductivity of Ge\n", + "\n", + "ro=1.0/s #resistivity of Ge\n", + "\n", + "print\"Resistivity of Ge =\",round(ro,4),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Ge = 0.431 ohm-m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.5,Page number 2-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Eg=1.2 #energy gap\n", + "T1=600 #temperature\n", + "T2=300 #temperature\n", + "\n", + "#since ue>>uh for intrinsic semiconductor\n", + "\n", + "#s=ni*e*ue\n", + "\n", + "K=8.62*10**-5 #Boltzman constant\n", + "\n", + "s=1l\n", + "\n", + "s1=s*exp((-Eg)/(2*K*T1))\n", + "\n", + "s2=s*exp((-Eg)/(2*K*T2))\n", + "\n", + "m=(s1/s2)\n", + "\n", + "print'Ratio between conductivity =',\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio between conductivity = 1.092e+05\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.6,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "c=5*10**28 #concentration of Si atoms\n", + "e=1.6*10**-19 #charge on electron\n", + "u=0.048 #mobility of hole\n", + "s=4.4*10**-4 #conductivity of Si\n", + "\n", + "#since millionth Si atom is replaced by an indium atom\n", + "\n", + "n=c*10**-6\n", + "\n", + "sp=u*e*n #conductivity of resultant\n", + "\n", + "print\"conductivity =\",(sp),\"mho/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity = 384.0 mho/m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.7,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=28.1 #atomic weight of Si\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**26 #Avogadro's number\n", + "d=2.4*10**3 #density of Si\n", + "p=0.25 #resistivity\n", + "\n", + "#no. of Si atom/m**3\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "#impurity level is 0.01 ppm i.e. 1 atom in every 10**8 atoms of Si\n", + "\n", + "n=Ad/10**8 #no of impurity atoms\n", + "\n", + "#since each impurity produce 1 hole\n", + "\n", + "nh=n\n", + "\n", + "print\"1) hole concentration =\",round(n,4),\"holes/m^3\"\n", + "\n", + "up=1/(e*p*nh)\n", + "\n", + "print\"2) mobility =\",round(up,4),\"m^2/volt.sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) hole concentration = 5.14163701068e+20 holes/m^3\n", + "2) mobility = 0.0486 m^2/volt.sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.1,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=27 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 3.938e-10\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.2,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "m=0.012 #energy level(Ef-E)\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "p1=1-p\n", + "\n", + "print\"probability of an energy level not being occupied by an electron=\",round(p1,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an energy level not being occupied by an electron= 0.614\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.3,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=20 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 2.348e-10\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.4,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=2.1 #Energy band gap\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "m=K*T\n", + "\n", + "#for f(E)=0.99\n", + "\n", + "p1=0.99\n", + "\n", + "b=1.0-(1.0/p1)\n", + "\n", + "a=math.log(b) #a=(E-2.1)/m\n", + "\n", + "E=2.1+m*a\n", + "\n", + "print\"1) Energy for which probability is 0.99=\",(E),\"eV\"\n", + "\n", + "#for f(E)=0.01\n", + "\n", + "p2=0.01\n", + "\n", + "b2=1-1.0/p2\n", + "\n", + "a1=math.log(b2) #a=(E-2.1)/m\n", + "\n", + "E1=2.1+m*a1\n", + "\n", + "print\"2)Energy for which probability is 0.01=\",(E1),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "math domain error", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mValueError\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 17\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m/\u001b[0m\u001b[0mp1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 18\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 19\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m#a=(E-2.1)/m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 20\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 21\u001b[0m \u001b[0mE\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m2.1\u001b[0m\u001b[1;33m+\u001b[0m\u001b[0mm\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mValueError\u001b[0m: math domain error" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.1,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ni=2.4*10**19 #density of intrensic semiconductor\n", + "n=4.4*10**28 #no atom in Ge crystal\n", + "Nd=n/10**6 #density\n", + "Na=Nd\n", + "e=1.6*10**-19 #charge on electron\n", + "T=300 #temerature at N.T.P.\n", + "K=1.38*10**-23 #Boltzman constant\n", + "\n", + "Vo=(K*T/e)*log(Na*Nd/(ni**2))\n", + "\n", + "print\"Potential barrier for Ge =\",round(Vo,4),\"Volts\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential barrier for Ge = 0.3888 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.2,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.6 #magnetic field\n", + "d=5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "Nd=10**21 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "Vh=(B*J*d)/(Nd*e) #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",\"{0:.3e}\".format(Vh),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 9.375e-03 Volts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.3,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=6*10**-7 #Hall coefficient\n", + "B=1.5 #magnetic field\n", + "I=200 #current in strip\n", + "W=1*10**-3 #thickness of strip\n", + "\n", + "Vh=Rh*(B*I)/W #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",(Vh),\"Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 0.18 Volt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.4,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=2.25*10**-5 #Hall coefficient\n", + "u=0.025 #mobility of hole\n", + "\n", + "r=Rh/u\n", + "\n", + "print\"Resistivity of P type silicon =\",\"{0:.3e}\".format(r),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of P type silicon = 9.000e-04 ohm-m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.5,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.55 #magnetic field\n", + "d=4.5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "n=10**20 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "Rh=1/(n*e) #Hall coefficient\n", + "\n", + "Vh=Rh*B*J*d #Hall voltage\n", + "\n", + "print\"1) Hall voltage =\",round(Vh,4),\"Volts\"\n", + "\n", + "print\"2) Hall coefficient =\",(Rh),\"m^3/C\"\n", + "\n", + "u=0.17 #mobility of electrom\n", + "\n", + "m=math.atan(u*B)\n", + "\n", + "a=m*180/math.pi #conversion randian into degree\n", + "\n", + "print\"3) Hall angle =\",round(a,4),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Hall voltage = 0.0773 Volts\n", + "2) Hall coefficient = 0.0625 m^3/C\n", + "3) Hall angle = 5.3416 degree\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.6,Page number 2-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=3.66*10**-4 #Hall coefficient\n", + "r=8.93*10**-3 #resistivity \n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "#Hall coefficient Rh=1/(n*e)\n", + "\n", + "n=1/(Rh*e) #density\n", + "\n", + "print\"1) density(n) =\",round(n,4),\"/m^3\"\n", + "\n", + "u=Rh/r #mobility of electron\n", + "\n", + "print\"2) mobility (u) =\",round(u,4),\"m^2/v-s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) density(n) = 1.70765027322e+22 /m^3\n", + "2) mobility (u) = 0.041 m^2/v-s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.7,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.2 #magnetic field\n", + "e=1.6*10**-19 #charge on electron\n", + "ue=0.39 #mobility of electron\n", + "l=0.01 #length\n", + "A=0.001*0.001 #cross section area of bar\n", + "V=1*10**-3 #Applied voltage\n", + "d=0.001 #sample of width \n", + "\n", + "r=1/(ue*e) #resistivity\n", + "R=r*l/A #resistance of Ge bar\n", + "\n", + "#using ohm's law\n", + "\n", + "I=V/R\n", + "Rh=r*ue #hall coefficient\n", + "\n", + "#using formulae for hall effect\n", + "\n", + "J=I/A #current density\n", + "Vh=Rh*B*J*d\n", + "\n", + "print\"Hall voltage =\",(Vh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 7.8e-06\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24.1,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "x1=0.4 #difference between fermi level and conduction band(Ec-Ef)\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "\n", + "#ne=N*e**(-(Ec-Ef)/(K*T))\n", + "#ne is no of electron in conduction band\n", + "#since concentration of donor electron is doubled\n", + "\n", + "a=2 #ratio of no of electron\n", + "\n", + "#let x2 be the difference between new fermi level and conduction band(Ec-Ef')\n", + "\n", + "x2=-math.log(a)*(K*T)+x1 #arranging equation ne=N*e**(-(Ec-Ef)/(K*T))\n", + "\n", + "print\"Fermi level will be shifted towards conduction band by\",round(x2,4),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fermi level will be shifted towards conduction band by 0.3821 eV\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-I_by_I_A_Shaikh/Chapter2__1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter2__1.ipynb new file mode 100755 index 00000000..cb41afc6 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter2__1.ipynb @@ -0,0 +1,853 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:be03421cc765abd4c9572b7c61bb823243fbea415c12e649bb60ed73fc4375e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.1,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=1.72*10**-8 #resistivity of Cu\n", + "s=1/ro #conductivity of Cu\n", + "n=10.41*10**28 #no of electron per unit volume\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "u=s/(n*e)\n", + "\n", + "print\"mobility of electron in Cu =\",\"{0:.3e}\".format(u),\"m^2/volt-sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mobility of electron in Cu = 3.491e-03 m^2/volt-sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.2,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=63.5 #atomic weight\n", + "u=43.3 #mobility of electron\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**23 #Avogadro's number\n", + "d=8.96 #density\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "n=1*Ad\n", + "\n", + "ro=1/(n*e*u)\n", + "\n", + "print\"Resistivity of Cu =\",\"{0:.3e}\".format(ro),\"ohm-cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Cu = 1.699e-06 ohm-cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.3,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "e=1.6*10**-19 #charge on electron\n", + "ne=2.5*10**19 #density of carriers\n", + "nh=ne #for intrinsic semiconductor\n", + "ue=0.39 #mobility of electron\n", + "uh=0.19 #mobility of hole\n", + "\n", + "s=ne*e*ue+nh*e*uh #conductivity of Ge\n", + "\n", + "ro=1.0/s #resistivity of Ge\n", + "\n", + "print\"Resistivity of Ge =\",round(ro,4),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Ge = 0.431 ohm-m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.5,Page number 2-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Eg=1.2 #energy gap\n", + "T1=600 #temperature\n", + "T2=300 #temperature\n", + "\n", + "#since ue>>uh for intrinsic semiconductor\n", + "\n", + "#s=ni*e*ue\n", + "\n", + "K=8.62*10**-5 #Boltzman constant\n", + "\n", + "s=1l\n", + "\n", + "s1=s*exp((-Eg)/(2*K*T1))\n", + "\n", + "s2=s*exp((-Eg)/(2*K*T2))\n", + "\n", + "m=(s1/s2)\n", + "\n", + "print'Ratio between conductivity =',\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio between conductivity = 1.092e+05\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.6,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "c=5*10**28 #concentration of Si atoms\n", + "e=1.6*10**-19 #charge on electron\n", + "u=0.048 #mobility of hole\n", + "s=4.4*10**-4 #conductivity of Si\n", + "\n", + "#since millionth Si atom is replaced by an indium atom\n", + "\n", + "n=c*10**-6\n", + "\n", + "sp=u*e*n #conductivity of resultant\n", + "\n", + "print\"conductivity =\",(sp),\"mho/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity = 384.0 mho/m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.7,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=28.1 #atomic weight of Si\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**26 #Avogadro's number\n", + "d=2.4*10**3 #density of Si\n", + "p=0.25 #resistivity\n", + "\n", + "#no. of Si atom/m**3\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "#impurity level is 0.01 ppm i.e. 1 atom in every 10**8 atoms of Si\n", + "\n", + "n=Ad/10**8 #no of impurity atoms\n", + "\n", + "#since each impurity produce 1 hole\n", + "\n", + "nh=n\n", + "\n", + "print\"1) hole concentration =\",round(n,4),\"holes/m^3\"\n", + "\n", + "up=1/(e*p*nh)\n", + "\n", + "print\"2) mobility =\",round(up,4),\"m^2/volt.sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) hole concentration = 5.14163701068e+20 holes/m^3\n", + "2) mobility = 0.0486 m^2/volt.sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.1,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=27 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 3.938e-10\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.2,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "m=0.012 #energy level(Ef-E)\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "p1=1-p\n", + "\n", + "print\"probability of an energy level not being occupied by an electron=\",round(p1,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an energy level not being occupied by an electron= 0.614\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.3,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=20 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 2.348e-10\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.4,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=2.1 #Energy band gap\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "m=K*T\n", + "\n", + "#for f(E)=0.99\n", + "\n", + "p1=0.99\n", + "\n", + "b=1.0-(1.0/p1)\n", + "\n", + "a=math.log(b) #a=(E-2.1)/m\n", + "\n", + "E=2.1+m*a\n", + "\n", + "print\"1) Energy for which probability is 0.99=\",(E),\"eV\"\n", + "\n", + "#for f(E)=0.01\n", + "\n", + "p2=0.01\n", + "\n", + "b2=1-1.0/p2\n", + "\n", + "a1=math.log(b2) #a=(E-2.1)/m\n", + "\n", + "E1=2.1+m*a1\n", + "\n", + "print\"2)Energy for which probability is 0.01=\",(E1),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "math domain error", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mValueError\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 17\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m/\u001b[0m\u001b[0mp1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 18\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 19\u001b[1;33m \u001b[0ma\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m#a=(E-2.1)/m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 20\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 21\u001b[0m \u001b[0mE\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m2.1\u001b[0m\u001b[1;33m+\u001b[0m\u001b[0mm\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mValueError\u001b[0m: math domain error" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.1,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ni=2.4*10**19 #density of intrensic semiconductor\n", + "n=4.4*10**28 #no atom in Ge crystal\n", + "Nd=n/10**6 #density\n", + "Na=Nd\n", + "e=1.6*10**-19 #charge on electron\n", + "T=300 #temerature at N.T.P.\n", + "K=1.38*10**-23 #Boltzman constant\n", + "\n", + "Vo=(K*T/e)*log(Na*Nd/(ni**2))\n", + "\n", + "print\"Potential barrier for Ge =\",round(Vo,4),\"Volts\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential barrier for Ge = 0.3888 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.2,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.6 #magnetic field\n", + "d=5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "Nd=10**21 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "Vh=(B*J*d)/(Nd*e) #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",\"{0:.3e}\".format(Vh),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 9.375e-03 Volts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.3,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=6*10**-7 #Hall coefficient\n", + "B=1.5 #magnetic field\n", + "I=200 #current in strip\n", + "W=1*10**-3 #thickness of strip\n", + "\n", + "Vh=Rh*(B*I)/W #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",(Vh),\"Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 0.18 Volt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.4,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=2.25*10**-5 #Hall coefficient\n", + "u=0.025 #mobility of hole\n", + "\n", + "r=Rh/u\n", + "\n", + "print\"Resistivity of P type silicon =\",\"{0:.3e}\".format(r),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of P type silicon = 9.000e-04 ohm-m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.5,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.55 #magnetic field\n", + "d=4.5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "n=10**20 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "Rh=1/(n*e) #Hall coefficient\n", + "\n", + "Vh=Rh*B*J*d #Hall voltage\n", + "\n", + "print\"1) Hall voltage =\",round(Vh,4),\"Volts\"\n", + "\n", + "print\"2) Hall coefficient =\",(Rh),\"m^3/C\"\n", + "\n", + "u=0.17 #mobility of electrom\n", + "\n", + "m=math.atan(u*B)\n", + "\n", + "a=m*180/math.pi #conversion randian into degree\n", + "\n", + "print\"3) Hall angle =\",round(a,4),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Hall voltage = 0.0773 Volts\n", + "2) Hall coefficient = 0.0625 m^3/C\n", + "3) Hall angle = 5.3416 degree\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.6,Page number 2-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=3.66*10**-4 #Hall coefficient\n", + "r=8.93*10**-3 #resistivity \n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "#Hall coefficient Rh=1/(n*e)\n", + "\n", + "n=1/(Rh*e) #density\n", + "\n", + "print\"1) density(n) =\",round(n,4),\"/m^3\"\n", + "\n", + "u=Rh/r #mobility of electron\n", + "\n", + "print\"2) mobility (u) =\",round(u,4),\"m^2/v-s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) density(n) = 1.70765027322e+22 /m^3\n", + "2) mobility (u) = 0.041 m^2/v-s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.7,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.2 #magnetic field\n", + "e=1.6*10**-19 #charge on electron\n", + "ue=0.39 #mobility of electron\n", + "l=0.01 #length\n", + "A=0.001*0.001 #cross section area of bar\n", + "V=1*10**-3 #Applied voltage\n", + "d=0.001 #sample of width \n", + "\n", + "r=1/(ue*e) #resistivity\n", + "R=r*l/A #resistance of Ge bar\n", + "\n", + "#using ohm's law\n", + "\n", + "I=V/R\n", + "Rh=r*ue #hall coefficient\n", + "\n", + "#using formulae for hall effect\n", + "\n", + "J=I/A #current density\n", + "Vh=Rh*B*J*d\n", + "\n", + "print\"Hall voltage =\",(Vh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 7.8e-06\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24.1,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "x1=0.4 #difference between fermi level and conduction band(Ec-Ef)\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "\n", + "#ne=N*e**(-(Ec-Ef)/(K*T))\n", + "#ne is no of electron in conduction band\n", + "#since concentration of donor electron is doubled\n", + "\n", + "a=2 #ratio of no of electron\n", + "\n", + "#let x2 be the difference between new fermi level and conduction band(Ec-Ef')\n", + "\n", + "x2=-math.log(a)*(K*T)+x1 #arranging equation ne=N*e**(-(Ec-Ef)/(K*T))\n", + "\n", + "print\"Fermi level will be shifted towards conduction band by\",round(x2,4),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fermi level will be shifted towards conduction band by 0.3821 eV\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-I_by_I_A_Shaikh/Chapter3.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter3.ipynb new file mode 100755 index 00000000..7111a9da --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter3.ipynb @@ -0,0 +1,1175 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:9dcf8c834afbbdba5cac9bfd61902345de5a5912fe35cd8c01ac3ee021a2040e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Dielectric And Magnetic Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.1,Page number 3-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=650*10**-6 #area\n", + "d=4*10**-3 #seperation of plate\n", + "Q=2*10**-10 #charge\n", + "er=3.5 #relative permitivity\n", + "\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "V=(Q*d)/(e0*er*A)\n", + "\n", + "print\"voltage across capacitor =\",round(V,4),\"Volt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage across capacitor = 39.7343 Volt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.2,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=2000*10**-6 #area\n", + "d=0.5*10**-6 #seperation of plate\n", + "er=8.0 #relative permitivity\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "C=(e0*er*A)/d\n", + "\n", + "print\"capacitance for capacitor =\",\"{0:.3e}\".format(C),\"Faraday\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance for capacitor = 2.832e-07 Faraday\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.3,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "E=1000 #electric field\n", + "P=4.3*10**-8 #polarization\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "er=(P/(e0*E))+1 #as P/E=e0(er-1)\n", + "\n", + "print\"relative permittivity =\",round(er,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permittivity = 5.8566\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.4,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#As C=e0*er*A/d\n", + "\n", + "e0=math.e #absolute permitivity\n", + "\n", + "Ag=1l\n", + "\n", + "Ap=Ag #Assuming Area of glass plate and plastic film is same\n", + "\n", + "#for glass\n", + "\n", + "erg=6 #relative permitivity\n", + "\n", + "dg=0.25 #thickness\n", + "\n", + "Cg=e0*erg*Ag/dg\n", + "\n", + "#for plastic film\n", + "\n", + "erp=3 #relative permitivity\n", + "\n", + "dp=0.1 #thickness\n", + "\n", + "Cp=e0*erp*Ap/dp\n", + "\n", + "m=Cg/Cp\n", + "\n", + "print\"since Cg/Cp=\",m\n", + "\n", + "print\"plastic film holds more charge\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "since Cg/Cp= 0.8\n", + "plastic film holds more charge\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.5,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "N=2.7*10**25 #no of atoms per m**3\n", + "er=1.0000684 #dielectric constant of He atom at NTP\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "\n", + "a=e0*(er-1.0)/N #electronic polarizability\n", + "\n", + "print\"1) electronic polarizability=\",\"{0:.3e}\".format(a)\n", + "\n", + "R=(a/(4*3.1472*e0))**(1.0/3) #radius of helium atom\n", + "\n", + "print\"2) radius of He atoms =\",\"{0:.3e}\".format(R),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) electronic polarizability= 2.243e-41\n", + "2) radius of He atoms = 5.860e-11 meter\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.6,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "er=1.000014 #dielectric constant of He atom at NTP\n", + "Xe=er-1.0 #electric susceptibility\n", + "\n", + "print\"electric susceptibility =\",(Xe)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electric susceptibility = 1.4e-05\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.7,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temperature of paramagnetic material\n", + "X=3.7*10**-3 #susceptibility of material\n", + "\n", + "C=X*T #using Curie's law\n", + "\n", + "T1=250 #temperature\n", + "T2=600 #temperature\n", + "\n", + "u1=C/T1 #relative permeability of material at 250k\n", + "\n", + "u2=C/T2 #relative permeability of material at 350k\n", + "\n", + "print\"relative permeability at temp 250K=\",\"{0:.3e}\".format(u1)\n", + "\n", + "print\"relative permeability at temp 600K =\",\"{0:.3e}\".format(u2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permeability at temp 250K= 4.440e-03\n", + "relative permeability at temp 600K = 1.850e-03\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.8,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u=0.8*10**-23 #magnetic dipole moment of an atom \n", + "B=0.8 #magnetic field\n", + "K=1.38*10**-23 #boltzmann constant\n", + "\n", + "T=(2*u*B)/(3*K) #temperature\n", + "\n", + "print\"Temperature at which average thermal energy of an atom is equal to magntic energy=\",round(T,4),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at which average thermal energy of an atom is equal to magntic energy= 0.3092 K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.9,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.5 #magnetic field\n", + "t=27 #temperature in degree celcius\n", + "T=273+t #temperature in kelvin\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "C=2*10**-3 #Curie's constant\n", + "\n", + "M=(C*B)/(u0*T) #magnetization of material\n", + "\n", + "print\"magnetization of paramagnetic material =\",round(M,4),\"A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetization of paramagnetic material = 2.6526 A/m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.10,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "B=10.9*10**-5 #flux density\n", + "\n", + "H=B/u0 #magnetic field\n", + "\n", + "print\"Horizontal component of magnetic field =\",round(H,4),\"A-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of magnetic field = 86.7394 A-m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.11,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=5.9*10**-3 #magnetic flux\n", + "ur=900 #relative permeability of material\n", + "n=700 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=60*10**-4 #cross section area of ring\n", + "\n", + "l=2 #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "H=B/(u0*ur) #magnetic field\n", + "\n", + "At=H*l #Amp-turns required\n", + "\n", + "I=At/n #current required\n", + "\n", + "print\"Current required to produce a flux=\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce a flux= 2.4842 Amp\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.12,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=2.7*10**-3 #magnetic flux\n", + "A=25*10**-4 #cross section area of ring\n", + "r=25*10**-2 #mean circumference of ring\n", + "la=10**-3 #air gap\n", + "\n", + "ur=900 #relative permeability of material\n", + "n=400 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=2*math.pi*r #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 5.8986 Amp\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.13,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=10 #no of turns per cm\n", + "i=2 #current\n", + "B=1 #flux density\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "n=n1*100 #no turns per m\n", + "\n", + "H=n*i\n", + "\n", + "print\"1) magnetic intensity =\",round(H,4),\"Amp-turn/meter\"\n", + "\n", + "#calculation for magnetization\n", + "\n", + "I=B/u0-H\n", + "\n", + "print\"2) magnetization =\",\"{0:.3e}\".format(I),\"Amp-turn/meter\"\n", + "\n", + "#relative permeability\n", + "\n", + "ur=B/(u0*H)\n", + "\n", + "print\"3) Relative Permeability of the ring =\",(int(ur))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) magnetic intensity = 2000.0 Amp-turn/meter\n", + "2) magnetization = 7.938e+05 Amp-turn/meter\n", + "3) Relative Permeability of the ring = 397\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.14,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=40 #wt of the core\n", + "d=7.5*10**3 #density of iron\n", + "n=100 #frequency\n", + "\n", + "V=m/d #volume of the iron core\n", + "\n", + "E1=3800*10**-1 #loss of energy in core per cycles/cc\n", + "\n", + "E2=E1*V #loss of energy in core per cycles\n", + "\n", + "N=60*n #no of cycles per minute\n", + "\n", + "E=E2*N #loss of energy per minute\n", + "\n", + "print\"Loss of energy per minute =\",(E),\"Joule\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per minute = 12160.0 Joule\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.15,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=30*10**-2 #length of ring\n", + "A=1*10**-4 #cross section area of ring\n", + "i=0.032 #current\n", + "\n", + "phi=2*10**-6 #magnetic flux\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "N=300 #no of turns in the coil\n", + "\n", + "#1) flux density\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"1) Flux density in the ring =\",(B),\"Wb/m**2\"\n", + "\n", + "#2) magnetic intensity of ring\n", + "\n", + "n=N/l #no of turns per unit length\n", + "\n", + "H=n*i #magnetic intensity\n", + "\n", + "print\"2) magnetic intensity =\",(H),\"Amp-turn/meter\"\n", + "\n", + "#3) permeability and relative permeability of the ring\n", + "\n", + "u=B/H\n", + "\n", + "print\"3) Permeability of the ring =\",\"{0:.3e}\".format(u),\"Wb/A-m\"\n", + "\n", + "ur=u/u0\n", + "\n", + "print\"4) Relative Permeability of the ring =\",round(ur,4)\n", + "\n", + "#4)Susceptibility\n", + "\n", + "Xm=ur-1\n", + "\n", + "print\"5) magnetic Susceptibility of the ring =\",round(Xm,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Flux density in the ring = 0.02 Wb/m**2\n", + "2) magnetic intensity = 32.0 Amp-turn/meter\n", + "3) Permeability of the ring = 6.250e-04 Wb/A-m\n", + "4) Relative Permeability of the ring = 497.3592\n", + "5) magnetic Susceptibility of the ring = 496.3592\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.16,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "E=3000 #loss of energy per cycle per cm**3\n", + "m=12*10**3 #wt of the core\n", + "d=7.5 #density of iron\n", + "n=50 #frequency\n", + "\n", + "V=m/d #volume of the core\n", + "\n", + "El=E*V*n*60*60 #loss of energy per hour\n", + "\n", + "print\"Loss of energy per hour =\",(El),\"Erg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per hour = 8.64e+11 Erg\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.17,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=50 #frequency\n", + "V=10**-3 #volume of the specimen\n", + "\n", + "#Area of B-H loop\n", + "\n", + "A=0.5*10**3*1\n", + "\n", + "P=n*V*A\n", + "\n", + "print\"Hysteresis power loss =\",(P),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hysteresis power loss = 25.0 Watt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.18,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=1.5*10**-4 #magnetic flux\n", + "\n", + "ur=900 #relative permeability of material\n", + "\n", + "n=600 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=5.8*10**-4 #cross section area of ring\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=math.pi*d #mean circumference of ring\n", + "\n", + "la=5*10**-3 #air gap\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 2.194 Amp\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.19,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "la=1*10**-2 #air gap\n", + "r=0.5 #radius of ring\n", + "A=5*10**-4 #cross section area of ring\n", + "i=5 #current\n", + "u=6*10**-3 #permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "N=900 #no of turns in the coil\n", + "\n", + "#let reluctance of iron ring with air gap be S\n", + "\n", + "S=la/(u0*A)+(2*math.pi*r-la)/(u*A)\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "\n", + "mmf=N*i\n", + "\n", + "print\"2) m.m.f =\",(mmf),\"Amp-turn\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 1.696e+07 A-T/Wb\n", + "2) m.m.f = 4500 Amp-turn\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.20,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the magnetization force is given by,\n", + "#H=NI/l\n", + "\n", + "H=5*10**3 #coercivity of bar magnet\n", + "l=10*10**-2 #length of solenoid\n", + "N=50 #number of turns\n", + "\n", + "I=l*H/N\n", + "\n", + "print\"current =\",(I),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current = 10.0 Ampere\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.21,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=380 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "n=200 #number of turns\n", + "d=20*10**-2 #mean diameter of ring\n", + "\n", + "l=math.pi*d #mean circumference of ring\n", + "\n", + "phi=2*10**-3 #magnetic flux\n", + "\n", + "S=l/(u0*ur*A) #reluctance\n", + "\n", + "#using ohm's law for magnetic circuit\n", + "\n", + "#phi=N*I/S\n", + "\n", + "I=S*phi/n\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "print\"2) current =\",round(I,4),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 2.632e+06 A-T/Wb\n", + "2) current = 26.3158 Ampere\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.22,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=1 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=6*10**-4 #cross section area of torroid\n", + "n=500 #number of turns\n", + "r=15*10**-2 #radius of torroid\n", + "I=4 #current in coil\n", + "l=2*math.pi*r #mean circumference of torroid\n", + "MMF=n*I\n", + "\n", + "print\"1) MMF (NI) =\",(MMF),\"AT\"\n", + "\n", + "R=l/(u0*ur*A) #Reluctance\n", + "\n", + "print\"2) Reluctance (R) =\",\"{0:.3e}\".format(R),\"AT/Wb\"\n", + "\n", + "phi=MMF/R #flux\n", + "\n", + "print\"3) Magnetic flux =\",(phi),\"Wb\"\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"4) Flux density =\",\"{0:.3e}\".format(B),\"Wb/m**2\"\n", + "\n", + "H=B/(u0*ur) #magnetic field intensity\n", + "\n", + "print\"5) Magnetic field intensity =\",round(H,4),\"A/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) MMF (NI) = 2000 AT\n", + "2) Reluctance (R) = 1.250e+09 AT/Wb\n", + "3) Magnetic flux = 1.6e-06 Wb\n", + "4) Flux density = 2.667e-03 Wb/m**2\n", + "5) Magnetic field intensity = 2122.0659 A/m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.23,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=10**-3 #magnetic flux\n", + "ur=1000 #relative permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "la=2*10**-3 #air gap\n", + "d=20*10**-3 #mean diameter of ring\n", + "\n", + "li=math.pi*d-la #mean circumference of ring\n", + "\n", + "#using KVL for magnetic circuit\n", + "\n", + "#AT(total)=AT(iron)+AT(air gap)\n", + "\n", + "ATt=(phi/(u0*A))*((li/ur)+la)\n", + "\n", + "print\"Number of Ampere-Turns required =\",round(ATt,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of Ampere-Turns required = 3280.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.24,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "X=0.5*10**-5 #susceptibility of material\n", + "\n", + "H=10**6 #magnetic field strength\n", + "\n", + "I=X*H #intensity of magnetization\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "B=u0*(H+I) #flux density\n", + "\n", + "print\"1) intensity magnetization =\",(I),\"Amp/m\"\n", + "\n", + "print\"2) flux density in the material =\",round(B,4),\"wb/m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) intensity magnetization = 5.0 Amp/m\n", + "2) flux density in the material = 1.2566 wb/m**2\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter3_1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_1.ipynb new file mode 100755 index 00000000..7111a9da --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_1.ipynb @@ -0,0 +1,1175 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:9dcf8c834afbbdba5cac9bfd61902345de5a5912fe35cd8c01ac3ee021a2040e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Dielectric And Magnetic Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.1,Page number 3-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=650*10**-6 #area\n", + "d=4*10**-3 #seperation of plate\n", + "Q=2*10**-10 #charge\n", + "er=3.5 #relative permitivity\n", + "\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "V=(Q*d)/(e0*er*A)\n", + "\n", + "print\"voltage across capacitor =\",round(V,4),\"Volt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage across capacitor = 39.7343 Volt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.2,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=2000*10**-6 #area\n", + "d=0.5*10**-6 #seperation of plate\n", + "er=8.0 #relative permitivity\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "C=(e0*er*A)/d\n", + "\n", + "print\"capacitance for capacitor =\",\"{0:.3e}\".format(C),\"Faraday\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance for capacitor = 2.832e-07 Faraday\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.3,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "E=1000 #electric field\n", + "P=4.3*10**-8 #polarization\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "er=(P/(e0*E))+1 #as P/E=e0(er-1)\n", + "\n", + "print\"relative permittivity =\",round(er,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permittivity = 5.8566\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.4,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#As C=e0*er*A/d\n", + "\n", + "e0=math.e #absolute permitivity\n", + "\n", + "Ag=1l\n", + "\n", + "Ap=Ag #Assuming Area of glass plate and plastic film is same\n", + "\n", + "#for glass\n", + "\n", + "erg=6 #relative permitivity\n", + "\n", + "dg=0.25 #thickness\n", + "\n", + "Cg=e0*erg*Ag/dg\n", + "\n", + "#for plastic film\n", + "\n", + "erp=3 #relative permitivity\n", + "\n", + "dp=0.1 #thickness\n", + "\n", + "Cp=e0*erp*Ap/dp\n", + "\n", + "m=Cg/Cp\n", + "\n", + "print\"since Cg/Cp=\",m\n", + "\n", + "print\"plastic film holds more charge\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "since Cg/Cp= 0.8\n", + "plastic film holds more charge\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.5,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "N=2.7*10**25 #no of atoms per m**3\n", + "er=1.0000684 #dielectric constant of He atom at NTP\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "\n", + "a=e0*(er-1.0)/N #electronic polarizability\n", + "\n", + "print\"1) electronic polarizability=\",\"{0:.3e}\".format(a)\n", + "\n", + "R=(a/(4*3.1472*e0))**(1.0/3) #radius of helium atom\n", + "\n", + "print\"2) radius of He atoms =\",\"{0:.3e}\".format(R),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) electronic polarizability= 2.243e-41\n", + "2) radius of He atoms = 5.860e-11 meter\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.6,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "er=1.000014 #dielectric constant of He atom at NTP\n", + "Xe=er-1.0 #electric susceptibility\n", + "\n", + "print\"electric susceptibility =\",(Xe)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electric susceptibility = 1.4e-05\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.7,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temperature of paramagnetic material\n", + "X=3.7*10**-3 #susceptibility of material\n", + "\n", + "C=X*T #using Curie's law\n", + "\n", + "T1=250 #temperature\n", + "T2=600 #temperature\n", + "\n", + "u1=C/T1 #relative permeability of material at 250k\n", + "\n", + "u2=C/T2 #relative permeability of material at 350k\n", + "\n", + "print\"relative permeability at temp 250K=\",\"{0:.3e}\".format(u1)\n", + "\n", + "print\"relative permeability at temp 600K =\",\"{0:.3e}\".format(u2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permeability at temp 250K= 4.440e-03\n", + "relative permeability at temp 600K = 1.850e-03\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.8,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u=0.8*10**-23 #magnetic dipole moment of an atom \n", + "B=0.8 #magnetic field\n", + "K=1.38*10**-23 #boltzmann constant\n", + "\n", + "T=(2*u*B)/(3*K) #temperature\n", + "\n", + "print\"Temperature at which average thermal energy of an atom is equal to magntic energy=\",round(T,4),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at which average thermal energy of an atom is equal to magntic energy= 0.3092 K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.9,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.5 #magnetic field\n", + "t=27 #temperature in degree celcius\n", + "T=273+t #temperature in kelvin\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "C=2*10**-3 #Curie's constant\n", + "\n", + "M=(C*B)/(u0*T) #magnetization of material\n", + "\n", + "print\"magnetization of paramagnetic material =\",round(M,4),\"A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetization of paramagnetic material = 2.6526 A/m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.10,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "B=10.9*10**-5 #flux density\n", + "\n", + "H=B/u0 #magnetic field\n", + "\n", + "print\"Horizontal component of magnetic field =\",round(H,4),\"A-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of magnetic field = 86.7394 A-m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.11,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=5.9*10**-3 #magnetic flux\n", + "ur=900 #relative permeability of material\n", + "n=700 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=60*10**-4 #cross section area of ring\n", + "\n", + "l=2 #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "H=B/(u0*ur) #magnetic field\n", + "\n", + "At=H*l #Amp-turns required\n", + "\n", + "I=At/n #current required\n", + "\n", + "print\"Current required to produce a flux=\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce a flux= 2.4842 Amp\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.12,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=2.7*10**-3 #magnetic flux\n", + "A=25*10**-4 #cross section area of ring\n", + "r=25*10**-2 #mean circumference of ring\n", + "la=10**-3 #air gap\n", + "\n", + "ur=900 #relative permeability of material\n", + "n=400 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=2*math.pi*r #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 5.8986 Amp\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.13,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=10 #no of turns per cm\n", + "i=2 #current\n", + "B=1 #flux density\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "n=n1*100 #no turns per m\n", + "\n", + "H=n*i\n", + "\n", + "print\"1) magnetic intensity =\",round(H,4),\"Amp-turn/meter\"\n", + "\n", + "#calculation for magnetization\n", + "\n", + "I=B/u0-H\n", + "\n", + "print\"2) magnetization =\",\"{0:.3e}\".format(I),\"Amp-turn/meter\"\n", + "\n", + "#relative permeability\n", + "\n", + "ur=B/(u0*H)\n", + "\n", + "print\"3) Relative Permeability of the ring =\",(int(ur))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) magnetic intensity = 2000.0 Amp-turn/meter\n", + "2) magnetization = 7.938e+05 Amp-turn/meter\n", + "3) Relative Permeability of the ring = 397\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.14,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=40 #wt of the core\n", + "d=7.5*10**3 #density of iron\n", + "n=100 #frequency\n", + "\n", + "V=m/d #volume of the iron core\n", + "\n", + "E1=3800*10**-1 #loss of energy in core per cycles/cc\n", + "\n", + "E2=E1*V #loss of energy in core per cycles\n", + "\n", + "N=60*n #no of cycles per minute\n", + "\n", + "E=E2*N #loss of energy per minute\n", + "\n", + "print\"Loss of energy per minute =\",(E),\"Joule\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per minute = 12160.0 Joule\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.15,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=30*10**-2 #length of ring\n", + "A=1*10**-4 #cross section area of ring\n", + "i=0.032 #current\n", + "\n", + "phi=2*10**-6 #magnetic flux\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "N=300 #no of turns in the coil\n", + "\n", + "#1) flux density\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"1) Flux density in the ring =\",(B),\"Wb/m**2\"\n", + "\n", + "#2) magnetic intensity of ring\n", + "\n", + "n=N/l #no of turns per unit length\n", + "\n", + "H=n*i #magnetic intensity\n", + "\n", + "print\"2) magnetic intensity =\",(H),\"Amp-turn/meter\"\n", + "\n", + "#3) permeability and relative permeability of the ring\n", + "\n", + "u=B/H\n", + "\n", + "print\"3) Permeability of the ring =\",\"{0:.3e}\".format(u),\"Wb/A-m\"\n", + "\n", + "ur=u/u0\n", + "\n", + "print\"4) Relative Permeability of the ring =\",round(ur,4)\n", + "\n", + "#4)Susceptibility\n", + "\n", + "Xm=ur-1\n", + "\n", + "print\"5) magnetic Susceptibility of the ring =\",round(Xm,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Flux density in the ring = 0.02 Wb/m**2\n", + "2) magnetic intensity = 32.0 Amp-turn/meter\n", + "3) Permeability of the ring = 6.250e-04 Wb/A-m\n", + "4) Relative Permeability of the ring = 497.3592\n", + "5) magnetic Susceptibility of the ring = 496.3592\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.16,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "E=3000 #loss of energy per cycle per cm**3\n", + "m=12*10**3 #wt of the core\n", + "d=7.5 #density of iron\n", + "n=50 #frequency\n", + "\n", + "V=m/d #volume of the core\n", + "\n", + "El=E*V*n*60*60 #loss of energy per hour\n", + "\n", + "print\"Loss of energy per hour =\",(El),\"Erg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per hour = 8.64e+11 Erg\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.17,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=50 #frequency\n", + "V=10**-3 #volume of the specimen\n", + "\n", + "#Area of B-H loop\n", + "\n", + "A=0.5*10**3*1\n", + "\n", + "P=n*V*A\n", + "\n", + "print\"Hysteresis power loss =\",(P),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hysteresis power loss = 25.0 Watt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.18,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=1.5*10**-4 #magnetic flux\n", + "\n", + "ur=900 #relative permeability of material\n", + "\n", + "n=600 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=5.8*10**-4 #cross section area of ring\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=math.pi*d #mean circumference of ring\n", + "\n", + "la=5*10**-3 #air gap\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 2.194 Amp\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.19,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "la=1*10**-2 #air gap\n", + "r=0.5 #radius of ring\n", + "A=5*10**-4 #cross section area of ring\n", + "i=5 #current\n", + "u=6*10**-3 #permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "N=900 #no of turns in the coil\n", + "\n", + "#let reluctance of iron ring with air gap be S\n", + "\n", + "S=la/(u0*A)+(2*math.pi*r-la)/(u*A)\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "\n", + "mmf=N*i\n", + "\n", + "print\"2) m.m.f =\",(mmf),\"Amp-turn\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 1.696e+07 A-T/Wb\n", + "2) m.m.f = 4500 Amp-turn\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.20,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the magnetization force is given by,\n", + "#H=NI/l\n", + "\n", + "H=5*10**3 #coercivity of bar magnet\n", + "l=10*10**-2 #length of solenoid\n", + "N=50 #number of turns\n", + "\n", + "I=l*H/N\n", + "\n", + "print\"current =\",(I),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current = 10.0 Ampere\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.21,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=380 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "n=200 #number of turns\n", + "d=20*10**-2 #mean diameter of ring\n", + "\n", + "l=math.pi*d #mean circumference of ring\n", + "\n", + "phi=2*10**-3 #magnetic flux\n", + "\n", + "S=l/(u0*ur*A) #reluctance\n", + "\n", + "#using ohm's law for magnetic circuit\n", + "\n", + "#phi=N*I/S\n", + "\n", + "I=S*phi/n\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "print\"2) current =\",round(I,4),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 2.632e+06 A-T/Wb\n", + "2) current = 26.3158 Ampere\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.22,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=1 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=6*10**-4 #cross section area of torroid\n", + "n=500 #number of turns\n", + "r=15*10**-2 #radius of torroid\n", + "I=4 #current in coil\n", + "l=2*math.pi*r #mean circumference of torroid\n", + "MMF=n*I\n", + "\n", + "print\"1) MMF (NI) =\",(MMF),\"AT\"\n", + "\n", + "R=l/(u0*ur*A) #Reluctance\n", + "\n", + "print\"2) Reluctance (R) =\",\"{0:.3e}\".format(R),\"AT/Wb\"\n", + "\n", + "phi=MMF/R #flux\n", + "\n", + "print\"3) Magnetic flux =\",(phi),\"Wb\"\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"4) Flux density =\",\"{0:.3e}\".format(B),\"Wb/m**2\"\n", + "\n", + "H=B/(u0*ur) #magnetic field intensity\n", + "\n", + "print\"5) Magnetic field intensity =\",round(H,4),\"A/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) MMF (NI) = 2000 AT\n", + "2) Reluctance (R) = 1.250e+09 AT/Wb\n", + "3) Magnetic flux = 1.6e-06 Wb\n", + "4) Flux density = 2.667e-03 Wb/m**2\n", + "5) Magnetic field intensity = 2122.0659 A/m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.23,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=10**-3 #magnetic flux\n", + "ur=1000 #relative permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "la=2*10**-3 #air gap\n", + "d=20*10**-3 #mean diameter of ring\n", + "\n", + "li=math.pi*d-la #mean circumference of ring\n", + "\n", + "#using KVL for magnetic circuit\n", + "\n", + "#AT(total)=AT(iron)+AT(air gap)\n", + "\n", + "ATt=(phi/(u0*A))*((li/ur)+la)\n", + "\n", + "print\"Number of Ampere-Turns required =\",round(ATt,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of Ampere-Turns required = 3280.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.24,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "X=0.5*10**-5 #susceptibility of material\n", + "\n", + "H=10**6 #magnetic field strength\n", + "\n", + "I=X*H #intensity of magnetization\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "B=u0*(H+I) #flux density\n", + "\n", + "print\"1) intensity magnetization =\",(I),\"Amp/m\"\n", + "\n", + "print\"2) flux density in the material =\",round(B,4),\"wb/m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) intensity magnetization = 5.0 Amp/m\n", + "2) flux density in the material = 1.2566 wb/m**2\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb new file mode 100644 index 00000000..7111a9da --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter3_2.ipynb @@ -0,0 +1,1175 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:9dcf8c834afbbdba5cac9bfd61902345de5a5912fe35cd8c01ac3ee021a2040e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Dielectric And Magnetic Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.1,Page number 3-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=650*10**-6 #area\n", + "d=4*10**-3 #seperation of plate\n", + "Q=2*10**-10 #charge\n", + "er=3.5 #relative permitivity\n", + "\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "V=(Q*d)/(e0*er*A)\n", + "\n", + "print\"voltage across capacitor =\",round(V,4),\"Volt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage across capacitor = 39.7343 Volt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.2,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=2000*10**-6 #area\n", + "d=0.5*10**-6 #seperation of plate\n", + "er=8.0 #relative permitivity\n", + "e0=8.85*10**-12 #absolute permitivity\n", + "\n", + "C=(e0*er*A)/d\n", + "\n", + "print\"capacitance for capacitor =\",\"{0:.3e}\".format(C),\"Faraday\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance for capacitor = 2.832e-07 Faraday\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.3,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "E=1000 #electric field\n", + "P=4.3*10**-8 #polarization\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "er=(P/(e0*E))+1 #as P/E=e0(er-1)\n", + "\n", + "print\"relative permittivity =\",round(er,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permittivity = 5.8566\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.4,Page number 3-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#As C=e0*er*A/d\n", + "\n", + "e0=math.e #absolute permitivity\n", + "\n", + "Ag=1l\n", + "\n", + "Ap=Ag #Assuming Area of glass plate and plastic film is same\n", + "\n", + "#for glass\n", + "\n", + "erg=6 #relative permitivity\n", + "\n", + "dg=0.25 #thickness\n", + "\n", + "Cg=e0*erg*Ag/dg\n", + "\n", + "#for plastic film\n", + "\n", + "erp=3 #relative permitivity\n", + "\n", + "dp=0.1 #thickness\n", + "\n", + "Cp=e0*erp*Ap/dp\n", + "\n", + "m=Cg/Cp\n", + "\n", + "print\"since Cg/Cp=\",m\n", + "\n", + "print\"plastic film holds more charge\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "since Cg/Cp= 0.8\n", + "plastic film holds more charge\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.5,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "N=2.7*10**25 #no of atoms per m**3\n", + "er=1.0000684 #dielectric constant of He atom at NTP\n", + "e0=8.854*10**-12 #absolute permitivity\n", + "\n", + "a=e0*(er-1.0)/N #electronic polarizability\n", + "\n", + "print\"1) electronic polarizability=\",\"{0:.3e}\".format(a)\n", + "\n", + "R=(a/(4*3.1472*e0))**(1.0/3) #radius of helium atom\n", + "\n", + "print\"2) radius of He atoms =\",\"{0:.3e}\".format(R),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) electronic polarizability= 2.243e-41\n", + "2) radius of He atoms = 5.860e-11 meter\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.6,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "er=1.000014 #dielectric constant of He atom at NTP\n", + "Xe=er-1.0 #electric susceptibility\n", + "\n", + "print\"electric susceptibility =\",(Xe)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electric susceptibility = 1.4e-05\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.7,Page number 3-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temperature of paramagnetic material\n", + "X=3.7*10**-3 #susceptibility of material\n", + "\n", + "C=X*T #using Curie's law\n", + "\n", + "T1=250 #temperature\n", + "T2=600 #temperature\n", + "\n", + "u1=C/T1 #relative permeability of material at 250k\n", + "\n", + "u2=C/T2 #relative permeability of material at 350k\n", + "\n", + "print\"relative permeability at temp 250K=\",\"{0:.3e}\".format(u1)\n", + "\n", + "print\"relative permeability at temp 600K =\",\"{0:.3e}\".format(u2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative permeability at temp 250K= 4.440e-03\n", + "relative permeability at temp 600K = 1.850e-03\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.8,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u=0.8*10**-23 #magnetic dipole moment of an atom \n", + "B=0.8 #magnetic field\n", + "K=1.38*10**-23 #boltzmann constant\n", + "\n", + "T=(2*u*B)/(3*K) #temperature\n", + "\n", + "print\"Temperature at which average thermal energy of an atom is equal to magntic energy=\",round(T,4),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at which average thermal energy of an atom is equal to magntic energy= 0.3092 K\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.9,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.5 #magnetic field\n", + "t=27 #temperature in degree celcius\n", + "T=273+t #temperature in kelvin\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "C=2*10**-3 #Curie's constant\n", + "\n", + "M=(C*B)/(u0*T) #magnetization of material\n", + "\n", + "print\"magnetization of paramagnetic material =\",round(M,4),\"A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetization of paramagnetic material = 2.6526 A/m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.10,Page number 3-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "B=10.9*10**-5 #flux density\n", + "\n", + "H=B/u0 #magnetic field\n", + "\n", + "print\"Horizontal component of magnetic field =\",round(H,4),\"A-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of magnetic field = 86.7394 A-m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.11,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=5.9*10**-3 #magnetic flux\n", + "ur=900 #relative permeability of material\n", + "n=700 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=60*10**-4 #cross section area of ring\n", + "\n", + "l=2 #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "H=B/(u0*ur) #magnetic field\n", + "\n", + "At=H*l #Amp-turns required\n", + "\n", + "I=At/n #current required\n", + "\n", + "print\"Current required to produce a flux=\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required to produce a flux= 2.4842 Amp\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.12,Page number 3-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=2.7*10**-3 #magnetic flux\n", + "A=25*10**-4 #cross section area of ring\n", + "r=25*10**-2 #mean circumference of ring\n", + "la=10**-3 #air gap\n", + "\n", + "ur=900 #relative permeability of material\n", + "n=400 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=2*math.pi*r #mean circumference of ring\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 5.8986 Amp\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.13,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=10 #no of turns per cm\n", + "i=2 #current\n", + "B=1 #flux density\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "n=n1*100 #no turns per m\n", + "\n", + "H=n*i\n", + "\n", + "print\"1) magnetic intensity =\",round(H,4),\"Amp-turn/meter\"\n", + "\n", + "#calculation for magnetization\n", + "\n", + "I=B/u0-H\n", + "\n", + "print\"2) magnetization =\",\"{0:.3e}\".format(I),\"Amp-turn/meter\"\n", + "\n", + "#relative permeability\n", + "\n", + "ur=B/(u0*H)\n", + "\n", + "print\"3) Relative Permeability of the ring =\",(int(ur))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) magnetic intensity = 2000.0 Amp-turn/meter\n", + "2) magnetization = 7.938e+05 Amp-turn/meter\n", + "3) Relative Permeability of the ring = 397\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.14,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=40 #wt of the core\n", + "d=7.5*10**3 #density of iron\n", + "n=100 #frequency\n", + "\n", + "V=m/d #volume of the iron core\n", + "\n", + "E1=3800*10**-1 #loss of energy in core per cycles/cc\n", + "\n", + "E2=E1*V #loss of energy in core per cycles\n", + "\n", + "N=60*n #no of cycles per minute\n", + "\n", + "E=E2*N #loss of energy per minute\n", + "\n", + "print\"Loss of energy per minute =\",(E),\"Joule\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per minute = 12160.0 Joule\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.15,Page number 3-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=30*10**-2 #length of ring\n", + "A=1*10**-4 #cross section area of ring\n", + "i=0.032 #current\n", + "\n", + "phi=2*10**-6 #magnetic flux\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "N=300 #no of turns in the coil\n", + "\n", + "#1) flux density\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"1) Flux density in the ring =\",(B),\"Wb/m**2\"\n", + "\n", + "#2) magnetic intensity of ring\n", + "\n", + "n=N/l #no of turns per unit length\n", + "\n", + "H=n*i #magnetic intensity\n", + "\n", + "print\"2) magnetic intensity =\",(H),\"Amp-turn/meter\"\n", + "\n", + "#3) permeability and relative permeability of the ring\n", + "\n", + "u=B/H\n", + "\n", + "print\"3) Permeability of the ring =\",\"{0:.3e}\".format(u),\"Wb/A-m\"\n", + "\n", + "ur=u/u0\n", + "\n", + "print\"4) Relative Permeability of the ring =\",round(ur,4)\n", + "\n", + "#4)Susceptibility\n", + "\n", + "Xm=ur-1\n", + "\n", + "print\"5) magnetic Susceptibility of the ring =\",round(Xm,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Flux density in the ring = 0.02 Wb/m**2\n", + "2) magnetic intensity = 32.0 Amp-turn/meter\n", + "3) Permeability of the ring = 6.250e-04 Wb/A-m\n", + "4) Relative Permeability of the ring = 497.3592\n", + "5) magnetic Susceptibility of the ring = 496.3592\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.16,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "E=3000 #loss of energy per cycle per cm**3\n", + "m=12*10**3 #wt of the core\n", + "d=7.5 #density of iron\n", + "n=50 #frequency\n", + "\n", + "V=m/d #volume of the core\n", + "\n", + "El=E*V*n*60*60 #loss of energy per hour\n", + "\n", + "print\"Loss of energy per hour =\",(El),\"Erg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of energy per hour = 8.64e+11 Erg\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.17,Page number 3-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=50 #frequency\n", + "V=10**-3 #volume of the specimen\n", + "\n", + "#Area of B-H loop\n", + "\n", + "A=0.5*10**3*1\n", + "\n", + "P=n*V*A\n", + "\n", + "print\"Hysteresis power loss =\",(P),\"Watt\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hysteresis power loss = 25.0 Watt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.18,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=1.5*10**-4 #magnetic flux\n", + "\n", + "ur=900 #relative permeability of material\n", + "\n", + "n=600 #number of turns\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "A=5.8*10**-4 #cross section area of ring\n", + "\n", + "d=40*10**-2 #mean diameter of ring\n", + "\n", + "li=math.pi*d #mean circumference of ring\n", + "\n", + "la=5*10**-3 #air gap\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "#for air gap\n", + "\n", + "Ha=B/(u0) #magnetic field for air gap\n", + "\n", + "#for iron ring\n", + "\n", + "Hi=B/(u0*ur) #magnetic field for iron ring\n", + "\n", + "#therefore, Amp turn in air gap\n", + "\n", + "Ata=Ha*la #Amp-turns required\n", + "\n", + "#therefore, Amp-turn in ring\n", + "\n", + "Ati=Hi*li #Amp-turns required\n", + "\n", + "#therrfore total mmf required\n", + "\n", + "mmf=Ata+Ati\n", + "\n", + "#Current required\n", + "\n", + "I=mmf/n #current required\n", + "\n", + "print\"Current required =\",round(I,4),\"Amp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current required = 2.194 Amp\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.19,Page number 3-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "la=1*10**-2 #air gap\n", + "r=0.5 #radius of ring\n", + "A=5*10**-4 #cross section area of ring\n", + "i=5 #current\n", + "u=6*10**-3 #permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "N=900 #no of turns in the coil\n", + "\n", + "#let reluctance of iron ring with air gap be S\n", + "\n", + "S=la/(u0*A)+(2*math.pi*r-la)/(u*A)\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "\n", + "mmf=N*i\n", + "\n", + "print\"2) m.m.f =\",(mmf),\"Amp-turn\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 1.696e+07 A-T/Wb\n", + "2) m.m.f = 4500 Amp-turn\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.20,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the magnetization force is given by,\n", + "#H=NI/l\n", + "\n", + "H=5*10**3 #coercivity of bar magnet\n", + "l=10*10**-2 #length of solenoid\n", + "N=50 #number of turns\n", + "\n", + "I=l*H/N\n", + "\n", + "print\"current =\",(I),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current = 10.0 Ampere\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.21,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=380 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "n=200 #number of turns\n", + "d=20*10**-2 #mean diameter of ring\n", + "\n", + "l=math.pi*d #mean circumference of ring\n", + "\n", + "phi=2*10**-3 #magnetic flux\n", + "\n", + "S=l/(u0*ur*A) #reluctance\n", + "\n", + "#using ohm's law for magnetic circuit\n", + "\n", + "#phi=N*I/S\n", + "\n", + "I=S*phi/n\n", + "\n", + "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n", + "print\"2) current =\",round(I,4),\"Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reluctance = 2.632e+06 A-T/Wb\n", + "2) current = 26.3158 Ampere\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.22,Page number 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ur=1 #relative permeability of air\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=6*10**-4 #cross section area of torroid\n", + "n=500 #number of turns\n", + "r=15*10**-2 #radius of torroid\n", + "I=4 #current in coil\n", + "l=2*math.pi*r #mean circumference of torroid\n", + "MMF=n*I\n", + "\n", + "print\"1) MMF (NI) =\",(MMF),\"AT\"\n", + "\n", + "R=l/(u0*ur*A) #Reluctance\n", + "\n", + "print\"2) Reluctance (R) =\",\"{0:.3e}\".format(R),\"AT/Wb\"\n", + "\n", + "phi=MMF/R #flux\n", + "\n", + "print\"3) Magnetic flux =\",(phi),\"Wb\"\n", + "\n", + "B=phi/A #flux density\n", + "\n", + "print\"4) Flux density =\",\"{0:.3e}\".format(B),\"Wb/m**2\"\n", + "\n", + "H=B/(u0*ur) #magnetic field intensity\n", + "\n", + "print\"5) Magnetic field intensity =\",round(H,4),\"A/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) MMF (NI) = 2000 AT\n", + "2) Reluctance (R) = 1.250e+09 AT/Wb\n", + "3) Magnetic flux = 1.6e-06 Wb\n", + "4) Flux density = 2.667e-03 Wb/m**2\n", + "5) Magnetic field intensity = 2122.0659 A/m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.23,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "phi=10**-3 #magnetic flux\n", + "ur=1000 #relative permeability of iron\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "A=5*10**-4 #cross section area of ring\n", + "la=2*10**-3 #air gap\n", + "d=20*10**-3 #mean diameter of ring\n", + "\n", + "li=math.pi*d-la #mean circumference of ring\n", + "\n", + "#using KVL for magnetic circuit\n", + "\n", + "#AT(total)=AT(iron)+AT(air gap)\n", + "\n", + "ATt=(phi/(u0*A))*((li/ur)+la)\n", + "\n", + "print\"Number of Ampere-Turns required =\",round(ATt,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of Ampere-Turns required = 3280.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17.24,Page number 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "X=0.5*10**-5 #susceptibility of material\n", + "\n", + "H=10**6 #magnetic field strength\n", + "\n", + "I=X*H #intensity of magnetization\n", + "\n", + "u0=4*math.pi*10**-7 #permeability of free space\n", + "\n", + "B=u0*(H+I) #flux density\n", + "\n", + "print\"1) intensity magnetization =\",(I),\"Amp/m\"\n", + "\n", + "print\"2) flux density in the material =\",round(B,4),\"wb/m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) intensity magnetization = 5.0 Amp/m\n", + "2) flux density in the material = 1.2566 wb/m**2\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter4.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter4.ipynb new file mode 100755 index 00000000..ded2d042 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter4.ipynb @@ -0,0 +1,1309 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:c8b4bc6a0f384361dda4e7989c0d96facf075884a24ed18090bbb83730c8fbed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Acoustics and Ultrasonics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11.1,Page number 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "d=8900.0 #density\n", + "Y=20.8*10**10 #Young's modulus\n", + "n=40*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*math.sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",round(l,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 0.0604 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1,Page number 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=1*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",round(t,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 0.0027 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1,Page number 4-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "V=l*b*h #volume of room\n", + "a=0.106 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"Reverberation time =\",round(T,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverberation time = 3.5051 sec\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.2,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=1j #original sound intensity\n", + "n=1000*1j #increased intensity value\n", + "\n", + "l=10*log10(n/m) #change in intensity level\n", + "\n", + "print\"change in intensity level =\",l,\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in intensity level = (30+0j) dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.3,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.4,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "V=5500 #volume\n", + "T=2.3 #Reverberation time\n", + "S=750 #sound absorption coefficient\n", + "a=(0.161*V)/(S*T) #using Sabine's formula\n", + "\n", + "print\"average absorption coefficient =\",round(a,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average absorption coefficient = 0.5133\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.5,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=12 #bredth of room\n", + "h=12 #height of room\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "T1=2.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T1*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "a1=0.5 #absorption coefficient\n", + "T2=2 #Reverberation time\n", + "\n", + "S1=(0.161*V/(a1-a))*(1.0/T2-1.0/T1)\n", + "\n", + "print\"2) carpet area required =\",round(S1,4),\"m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1486\n", + "2) carpet area required = 131.958 m^2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.6,Page number 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ac=10*12 #area of carpet covering entire floor\n", + "ac=0.06 #absorption coefficient of carpet\n", + "\n", + "aS1=Ac*ac #absorption due to carpet\n", + "\n", + "Af=10*12 #area of false celling\n", + "af=0.03 #absorption coefficient of celling\n", + "\n", + "aS2=Af*af #absorption due to celling\n", + "\n", + "As=100*1 #area of cushioned sets\n", + "a_cush=1 #absorption coefficient of cushion sets\n", + "\n", + "aS3=As*a_cush #absorption due to cusion sets\n", + "\n", + "Aw=346*1 #area of walls covered with absorbent\n", + "aw=0.2 #absorption coefficient of walls\n", + "\n", + "aS4=Aw*aw #absorption due to walls\n", + "\n", + "Ad=346*1 #area of wooden door\n", + "ad=0.2 #absorption coefficient of wooden door\n", + "\n", + "aS5=Ad*ad #absorption due to wooden door\n", + "\n", + "aS=aS1+aS2+aS3+aS4 #total absorption\n", + "\n", + "ap=0.46 #absorption coefficient of audience/person\n", + "l=12 #assuming length of wall\n", + "b=10 #assuming breadth of wall\n", + "h=8 #assuming height of wall\n", + "\n", + "V=l*b*h #volume of hall\n", + "\n", + "#case 1 :(no one inside/emptey hall)\n", + "\n", + "T1=(0.161*V)/aS #reverberation time\n", + "\n", + "print\" 1)reverberation time of empty hall =\",round(T1,4),\"sec\"\n", + "\n", + "#case 2 :(50 person inside hall)\n", + "\n", + "T2=(0.161*V)/(aS+50*0.46) #reverberation time\n", + "\n", + "print\" 2)reverberation time of hall with 50 person =\",round(T2,4),\"sec\"\n", + "\n", + "#case 2 :(100 person inside hall/full capacity of hall)\n", + "\n", + "T3=(0.161*V)/(aS+100*0.46) #reverberation time\n", + "\n", + "print\" 3)reverberation time of hall with 100 person =\",round(T3,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1)reverberation time of empty hall = 0.8587 sec\n", + " 2)reverberation time of hall with 50 person = 0.7614 sec\n", + " 3)reverberation time of hall with 100 person = 0.6839 sec\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.7,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=5 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "avg=a*S #average total absorption\n", + "\n", + "print\"2) average total absorption =\",round(avg,4),\"m^2.s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.0726\n", + "2) average total absorption = 69.0 m^2.s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.8,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "\n", + "a=0.1 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T1=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"1) Reverberation time =\",round(T1,4),\"sec\"\n", + "\n", + "a2=0.66 #absorption coefficient of curtain cloth\n", + "\n", + "S2=100 #surface area of a curtain cloth\n", + "\n", + "T2=(0.161*V)/(a*S+a2*S2*2) #Reverberation time,using Sabine's formula\n", + "\n", + "T=T1-T2 #change in Reverberation time\n", + "\n", + "print\"2) change in Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reverberation time = 3.7154 sec\n", + "2) change in Reverberation time = 1.8719 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.9,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.10,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=0.07*10**6 #frequency\n", + "t=0.65 #time\n", + "v=1700 #velocity of sound\n", + "\n", + "d=v*t/2 #depth of seabed\n", + "\n", + "print\"1) depth of seabed =\",round(d,4),\"meter\"\n", + "\n", + "lamda=v/f #wavelength\n", + "\n", + "print\"2) wavelength =\",round(lamda,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) depth of seabed = 552.5 meter\n", + "2) wavelength = 0.0243 meter\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.11,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thicknesss of crystal\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1 #consider 1st harmonic\n", + "\n", + "n=(k/(2*t))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\" natural frequency =\",\"{0:.3e}\".format(n),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " natural frequency = 2.747e+06 Hz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.12,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "#case 1\n", + "\n", + "n1=3.8*10**6 #frequency of wave\n", + "\n", + "t1=(k/(2*n1))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"1) thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n", + "\n", + "#case 2\n", + "\n", + "n2=300*10**3 #frequency of wave\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"2) thickness =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) thickness = 7.230e-04 meter\n", + "2) thickness = 9.157e-03 meter\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.13,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=2*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 1.374e-03 meter\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.14,Page number 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=50*10**3 #frequency\n", + "v1=348 #velocity of ultrasound in atmosphere\n", + "v2=1392 #velocity of ultrasound in sea water\n", + "t=2.0 #time difference\n", + "\n", + "#distance is constant hence v1*t1=v2*t2\n", + "\n", + "m=v2/v1 #assuming constant as m\n", + "\n", + "#(t1-t2=d) and (t1=m*t2) therefore\n", + "\n", + "t2=t/(m-1)\n", + "\n", + "d=v2*t2 #distance between two ship\n", + "\n", + "print\"distance between two ships =\",round(d,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance between two ships = 928.0 meter\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.15,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.16,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=10 #salinity\n", + "t=2 #time\n", + "T=20 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"depth of sea bed =\",round(d,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of sea bed = 1590.8 meter\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.17,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=29 #salinity\n", + "t=2 #time\n", + "l=0.01 #wavelength\n", + "T=30 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"1)depth of sea bed =\",round(d,4),\"meter\"\n", + "\n", + "f=v/l #frequency\n", + "\n", + "print\"2) frequency =\",\"{0:.3e}\".format(f),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)depth of sea bed = 1636.06 meter\n", + "2) frequency = 1.636e+05 Hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.18,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "v1=5.9*10**3 #velocity of UW in mild steel\n", + "v2=4.3*10**3 #velocity of UW in brass\n", + "t2=15*10**-3 #thickness of brass plate\n", + "\n", + "t1=v2*t2/v1 #since ve;ocity is inversly proportional to thickness\n", + "\n", + "print\"real thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "real thickness = 1.093e-02 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.19,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t1=4*10**-3 #thickness of 1st crystal\n", + "n1=400*10**3 #frequency of 1st crystal\n", + "n2=500*10**3 #frequency of 2nd crystal\n", + "\n", + "t2=n1*t1/n2 #since frquency is inversly proportional to thickness\n", + "\n", + "print\"thickness of 2nd crystal =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness of 2nd crystal = 3.200e-03 meter\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.20,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t2=30*10**-6 #pulse arrival time of defective steel bar\n", + "t1=80*10**-6 #pulse arrival time of non defective steel bar\n", + "d=40*10**-2 #bar thickness\n", + "\n", + "x=(t2/t1)*d\n", + "\n", + "print\"distance at which defect has occurred =\",round(x,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance at which defect has occurred = 0.15 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.21,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=18*10**-3 #thickness\n", + "v=5.9*10**3 #velocity\n", + "\n", + "t=(2*d)/v #echo time\n", + "\n", + "print\"echo time =\",\"{0:.3e}\".format(t),\"sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "echo time = 6.102e-06 sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.22,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thickness of quartz crystal\n", + "\n", + "#given t=l/2\n", + "\n", + "l=t*2 #wavelength\n", + "Y=7.9*10**10 #young's module of crystal\n", + "p=2650 #density of crystal\n", + "\n", + "v=sqrt(Y/p) #velocity of vibration\n", + "\n", + "n=v/l #frequency of vibration\n", + "\n", + "print\"frquency of vibration =\",\"{0:.3e}\".format(n),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frquency of vibration = 2.730e+06 Hz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.23,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given data\n", + "\n", + "d=7.23*10**3 #density\n", + "Y=11.6*10**10 #Young's modulus\n", + "n=20*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",\"{0:.3e}\".format(l),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 1.001e-01 meter\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.24,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.25,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "m=a*S #total absorption\n", + "\n", + "print\"2) total absorption of surface =\",round(m,4),\"m**2/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1238\n", + "2) total absorption of surface = 161.0 m**2/sec\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.26,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=1.8*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=2*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.526e+06 Hz\n", + "2)change in thickness = 4.264e-04 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.27,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=0.4999*10**6 #frequency\n", + "t=5.5*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "Y=4*(t**2)*(n**2)*d/k #arranging formula of natural frequency\n", + "\n", + "print\"Youngs modulus =\",\"{0:.3e}\".format(Y),\"N/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Youngs modulus = 8.013e+10 N/m**2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter4_1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_1.ipynb new file mode 100755 index 00000000..ded2d042 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_1.ipynb @@ -0,0 +1,1309 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:c8b4bc6a0f384361dda4e7989c0d96facf075884a24ed18090bbb83730c8fbed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Acoustics and Ultrasonics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11.1,Page number 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "d=8900.0 #density\n", + "Y=20.8*10**10 #Young's modulus\n", + "n=40*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*math.sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",round(l,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 0.0604 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1,Page number 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=1*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",round(t,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 0.0027 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1,Page number 4-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "V=l*b*h #volume of room\n", + "a=0.106 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"Reverberation time =\",round(T,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverberation time = 3.5051 sec\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.2,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=1j #original sound intensity\n", + "n=1000*1j #increased intensity value\n", + "\n", + "l=10*log10(n/m) #change in intensity level\n", + "\n", + "print\"change in intensity level =\",l,\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in intensity level = (30+0j) dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.3,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.4,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "V=5500 #volume\n", + "T=2.3 #Reverberation time\n", + "S=750 #sound absorption coefficient\n", + "a=(0.161*V)/(S*T) #using Sabine's formula\n", + "\n", + "print\"average absorption coefficient =\",round(a,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average absorption coefficient = 0.5133\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.5,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=12 #bredth of room\n", + "h=12 #height of room\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "T1=2.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T1*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "a1=0.5 #absorption coefficient\n", + "T2=2 #Reverberation time\n", + "\n", + "S1=(0.161*V/(a1-a))*(1.0/T2-1.0/T1)\n", + "\n", + "print\"2) carpet area required =\",round(S1,4),\"m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1486\n", + "2) carpet area required = 131.958 m^2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.6,Page number 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ac=10*12 #area of carpet covering entire floor\n", + "ac=0.06 #absorption coefficient of carpet\n", + "\n", + "aS1=Ac*ac #absorption due to carpet\n", + "\n", + "Af=10*12 #area of false celling\n", + "af=0.03 #absorption coefficient of celling\n", + "\n", + "aS2=Af*af #absorption due to celling\n", + "\n", + "As=100*1 #area of cushioned sets\n", + "a_cush=1 #absorption coefficient of cushion sets\n", + "\n", + "aS3=As*a_cush #absorption due to cusion sets\n", + "\n", + "Aw=346*1 #area of walls covered with absorbent\n", + "aw=0.2 #absorption coefficient of walls\n", + "\n", + "aS4=Aw*aw #absorption due to walls\n", + "\n", + "Ad=346*1 #area of wooden door\n", + "ad=0.2 #absorption coefficient of wooden door\n", + "\n", + "aS5=Ad*ad #absorption due to wooden door\n", + "\n", + "aS=aS1+aS2+aS3+aS4 #total absorption\n", + "\n", + "ap=0.46 #absorption coefficient of audience/person\n", + "l=12 #assuming length of wall\n", + "b=10 #assuming breadth of wall\n", + "h=8 #assuming height of wall\n", + "\n", + "V=l*b*h #volume of hall\n", + "\n", + "#case 1 :(no one inside/emptey hall)\n", + "\n", + "T1=(0.161*V)/aS #reverberation time\n", + "\n", + "print\" 1)reverberation time of empty hall =\",round(T1,4),\"sec\"\n", + "\n", + "#case 2 :(50 person inside hall)\n", + "\n", + "T2=(0.161*V)/(aS+50*0.46) #reverberation time\n", + "\n", + "print\" 2)reverberation time of hall with 50 person =\",round(T2,4),\"sec\"\n", + "\n", + "#case 2 :(100 person inside hall/full capacity of hall)\n", + "\n", + "T3=(0.161*V)/(aS+100*0.46) #reverberation time\n", + "\n", + "print\" 3)reverberation time of hall with 100 person =\",round(T3,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1)reverberation time of empty hall = 0.8587 sec\n", + " 2)reverberation time of hall with 50 person = 0.7614 sec\n", + " 3)reverberation time of hall with 100 person = 0.6839 sec\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.7,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=5 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "avg=a*S #average total absorption\n", + "\n", + "print\"2) average total absorption =\",round(avg,4),\"m^2.s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.0726\n", + "2) average total absorption = 69.0 m^2.s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.8,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "\n", + "a=0.1 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T1=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"1) Reverberation time =\",round(T1,4),\"sec\"\n", + "\n", + "a2=0.66 #absorption coefficient of curtain cloth\n", + "\n", + "S2=100 #surface area of a curtain cloth\n", + "\n", + "T2=(0.161*V)/(a*S+a2*S2*2) #Reverberation time,using Sabine's formula\n", + "\n", + "T=T1-T2 #change in Reverberation time\n", + "\n", + "print\"2) change in Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reverberation time = 3.7154 sec\n", + "2) change in Reverberation time = 1.8719 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.9,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.10,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=0.07*10**6 #frequency\n", + "t=0.65 #time\n", + "v=1700 #velocity of sound\n", + "\n", + "d=v*t/2 #depth of seabed\n", + "\n", + "print\"1) depth of seabed =\",round(d,4),\"meter\"\n", + "\n", + "lamda=v/f #wavelength\n", + "\n", + "print\"2) wavelength =\",round(lamda,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) depth of seabed = 552.5 meter\n", + "2) wavelength = 0.0243 meter\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.11,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thicknesss of crystal\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1 #consider 1st harmonic\n", + "\n", + "n=(k/(2*t))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\" natural frequency =\",\"{0:.3e}\".format(n),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " natural frequency = 2.747e+06 Hz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.12,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "#case 1\n", + "\n", + "n1=3.8*10**6 #frequency of wave\n", + "\n", + "t1=(k/(2*n1))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"1) thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n", + "\n", + "#case 2\n", + "\n", + "n2=300*10**3 #frequency of wave\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"2) thickness =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) thickness = 7.230e-04 meter\n", + "2) thickness = 9.157e-03 meter\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.13,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=2*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 1.374e-03 meter\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.14,Page number 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=50*10**3 #frequency\n", + "v1=348 #velocity of ultrasound in atmosphere\n", + "v2=1392 #velocity of ultrasound in sea water\n", + "t=2.0 #time difference\n", + "\n", + "#distance is constant hence v1*t1=v2*t2\n", + "\n", + "m=v2/v1 #assuming constant as m\n", + "\n", + "#(t1-t2=d) and (t1=m*t2) therefore\n", + "\n", + "t2=t/(m-1)\n", + "\n", + "d=v2*t2 #distance between two ship\n", + "\n", + "print\"distance between two ships =\",round(d,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance between two ships = 928.0 meter\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.15,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.16,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=10 #salinity\n", + "t=2 #time\n", + "T=20 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"depth of sea bed =\",round(d,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of sea bed = 1590.8 meter\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.17,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=29 #salinity\n", + "t=2 #time\n", + "l=0.01 #wavelength\n", + "T=30 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"1)depth of sea bed =\",round(d,4),\"meter\"\n", + "\n", + "f=v/l #frequency\n", + "\n", + "print\"2) frequency =\",\"{0:.3e}\".format(f),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)depth of sea bed = 1636.06 meter\n", + "2) frequency = 1.636e+05 Hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.18,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "v1=5.9*10**3 #velocity of UW in mild steel\n", + "v2=4.3*10**3 #velocity of UW in brass\n", + "t2=15*10**-3 #thickness of brass plate\n", + "\n", + "t1=v2*t2/v1 #since ve;ocity is inversly proportional to thickness\n", + "\n", + "print\"real thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "real thickness = 1.093e-02 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.19,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t1=4*10**-3 #thickness of 1st crystal\n", + "n1=400*10**3 #frequency of 1st crystal\n", + "n2=500*10**3 #frequency of 2nd crystal\n", + "\n", + "t2=n1*t1/n2 #since frquency is inversly proportional to thickness\n", + "\n", + "print\"thickness of 2nd crystal =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness of 2nd crystal = 3.200e-03 meter\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.20,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t2=30*10**-6 #pulse arrival time of defective steel bar\n", + "t1=80*10**-6 #pulse arrival time of non defective steel bar\n", + "d=40*10**-2 #bar thickness\n", + "\n", + "x=(t2/t1)*d\n", + "\n", + "print\"distance at which defect has occurred =\",round(x,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance at which defect has occurred = 0.15 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.21,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=18*10**-3 #thickness\n", + "v=5.9*10**3 #velocity\n", + "\n", + "t=(2*d)/v #echo time\n", + "\n", + "print\"echo time =\",\"{0:.3e}\".format(t),\"sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "echo time = 6.102e-06 sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.22,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thickness of quartz crystal\n", + "\n", + "#given t=l/2\n", + "\n", + "l=t*2 #wavelength\n", + "Y=7.9*10**10 #young's module of crystal\n", + "p=2650 #density of crystal\n", + "\n", + "v=sqrt(Y/p) #velocity of vibration\n", + "\n", + "n=v/l #frequency of vibration\n", + "\n", + "print\"frquency of vibration =\",\"{0:.3e}\".format(n),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frquency of vibration = 2.730e+06 Hz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.23,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given data\n", + "\n", + "d=7.23*10**3 #density\n", + "Y=11.6*10**10 #Young's modulus\n", + "n=20*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",\"{0:.3e}\".format(l),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 1.001e-01 meter\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.24,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.25,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "m=a*S #total absorption\n", + "\n", + "print\"2) total absorption of surface =\",round(m,4),\"m**2/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1238\n", + "2) total absorption of surface = 161.0 m**2/sec\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.26,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=1.8*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=2*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.526e+06 Hz\n", + "2)change in thickness = 4.264e-04 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.27,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=0.4999*10**6 #frequency\n", + "t=5.5*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "Y=4*(t**2)*(n**2)*d/k #arranging formula of natural frequency\n", + "\n", + "print\"Youngs modulus =\",\"{0:.3e}\".format(Y),\"N/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Youngs modulus = 8.013e+10 N/m**2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb new file mode 100644 index 00000000..ded2d042 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/Chapter4_2.ipynb @@ -0,0 +1,1309 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:c8b4bc6a0f384361dda4e7989c0d96facf075884a24ed18090bbb83730c8fbed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Acoustics and Ultrasonics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11.1,Page number 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "d=8900.0 #density\n", + "Y=20.8*10**10 #Young's modulus\n", + "n=40*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*math.sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",round(l,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 0.0604 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1,Page number 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=1*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",round(t,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 0.0027 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1,Page number 4-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given Data\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "V=l*b*h #volume of room\n", + "a=0.106 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"Reverberation time =\",round(T,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverberation time = 3.5051 sec\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.2,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=1j #original sound intensity\n", + "n=1000*1j #increased intensity value\n", + "\n", + "l=10*log10(n/m) #change in intensity level\n", + "\n", + "print\"change in intensity level =\",l,\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in intensity level = (30+0j) dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.3,Page number 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.4,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given data\n", + "\n", + "V=5500 #volume\n", + "T=2.3 #Reverberation time\n", + "S=750 #sound absorption coefficient\n", + "a=(0.161*V)/(S*T) #using Sabine's formula\n", + "\n", + "print\"average absorption coefficient =\",round(a,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average absorption coefficient = 0.5133\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.5,Page number 4-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=12 #bredth of room\n", + "h=12 #height of room\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "T1=2.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T1*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "a1=0.5 #absorption coefficient\n", + "T2=2 #Reverberation time\n", + "\n", + "S1=(0.161*V/(a1-a))*(1.0/T2-1.0/T1)\n", + "\n", + "print\"2) carpet area required =\",round(S1,4),\"m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1486\n", + "2) carpet area required = 131.958 m^2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.6,Page number 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ac=10*12 #area of carpet covering entire floor\n", + "ac=0.06 #absorption coefficient of carpet\n", + "\n", + "aS1=Ac*ac #absorption due to carpet\n", + "\n", + "Af=10*12 #area of false celling\n", + "af=0.03 #absorption coefficient of celling\n", + "\n", + "aS2=Af*af #absorption due to celling\n", + "\n", + "As=100*1 #area of cushioned sets\n", + "a_cush=1 #absorption coefficient of cushion sets\n", + "\n", + "aS3=As*a_cush #absorption due to cusion sets\n", + "\n", + "Aw=346*1 #area of walls covered with absorbent\n", + "aw=0.2 #absorption coefficient of walls\n", + "\n", + "aS4=Aw*aw #absorption due to walls\n", + "\n", + "Ad=346*1 #area of wooden door\n", + "ad=0.2 #absorption coefficient of wooden door\n", + "\n", + "aS5=Ad*ad #absorption due to wooden door\n", + "\n", + "aS=aS1+aS2+aS3+aS4 #total absorption\n", + "\n", + "ap=0.46 #absorption coefficient of audience/person\n", + "l=12 #assuming length of wall\n", + "b=10 #assuming breadth of wall\n", + "h=8 #assuming height of wall\n", + "\n", + "V=l*b*h #volume of hall\n", + "\n", + "#case 1 :(no one inside/emptey hall)\n", + "\n", + "T1=(0.161*V)/aS #reverberation time\n", + "\n", + "print\" 1)reverberation time of empty hall =\",round(T1,4),\"sec\"\n", + "\n", + "#case 2 :(50 person inside hall)\n", + "\n", + "T2=(0.161*V)/(aS+50*0.46) #reverberation time\n", + "\n", + "print\" 2)reverberation time of hall with 50 person =\",round(T2,4),\"sec\"\n", + "\n", + "#case 2 :(100 person inside hall/full capacity of hall)\n", + "\n", + "T3=(0.161*V)/(aS+100*0.46) #reverberation time\n", + "\n", + "print\" 3)reverberation time of hall with 100 person =\",round(T3,4),\"sec\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1)reverberation time of empty hall = 0.8587 sec\n", + " 2)reverberation time of hall with 50 person = 0.7614 sec\n", + " 3)reverberation time of hall with 100 person = 0.6839 sec\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.7,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=5 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3.5 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "avg=a*S #average total absorption\n", + "\n", + "print\"2) average total absorption =\",round(avg,4),\"m^2.s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.0726\n", + "2) average total absorption = 69.0 m^2.s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.8,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "\n", + "a=0.1 #absorption coefficient\n", + "\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T1=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"1) Reverberation time =\",round(T1,4),\"sec\"\n", + "\n", + "a2=0.66 #absorption coefficient of curtain cloth\n", + "\n", + "S2=100 #surface area of a curtain cloth\n", + "\n", + "T2=(0.161*V)/(a*S+a2*S2*2) #Reverberation time,using Sabine's formula\n", + "\n", + "T=T1-T2 #change in Reverberation time\n", + "\n", + "print\"2) change in Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Reverberation time = 3.7154 sec\n", + "2) change in Reverberation time = 1.8719 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.9,Page number 4-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S1=220 #wall area\n", + "a1=0.03 #absorption coefficient for the wall\n", + "S2=120 #floor area\n", + "a2=0.8 #absorption coefficient for the floor\n", + "S3=120 #ceiling area\n", + "a3=0.06 #absorption coefficient for the ceiling\n", + "V=600 #volume of room\n", + "\n", + "S=S1+S2+S3 #total surface area\n", + "a=(a1*S1+a2*S2+a3*S3)/S #average sound absorption coefficient\n", + "\n", + "print\"1) average sound absorption coefficient =\",round(a,4)\n", + "\n", + "T=(0.161*V)/(a*S) #Reverberation time,using Sabine's formula\n", + "\n", + "print\"2) Reverberation time =\",round(T,4),\"sec\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average sound absorption coefficient = 0.2387\n", + "2) Reverberation time = 0.8798 sec\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.10,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=0.07*10**6 #frequency\n", + "t=0.65 #time\n", + "v=1700 #velocity of sound\n", + "\n", + "d=v*t/2 #depth of seabed\n", + "\n", + "print\"1) depth of seabed =\",round(d,4),\"meter\"\n", + "\n", + "lamda=v/f #wavelength\n", + "\n", + "print\"2) wavelength =\",round(lamda,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) depth of seabed = 552.5 meter\n", + "2) wavelength = 0.0243 meter\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.11,Page number 4-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thicknesss of crystal\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1 #consider 1st harmonic\n", + "\n", + "n=(k/(2*t))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\" natural frequency =\",\"{0:.3e}\".format(n),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " natural frequency = 2.747e+06 Hz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.12,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "#case 1\n", + "\n", + "n1=3.8*10**6 #frequency of wave\n", + "\n", + "t1=(k/(2*n1))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"1) thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n", + "\n", + "#case 2\n", + "\n", + "n2=300*10**3 #frequency of wave\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"2) thickness =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) thickness = 7.230e-04 meter\n", + "2) thickness = 9.157e-03 meter\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.13,Page number 4-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2650 #density\n", + "Y=8*10**10 #Young's modulus\n", + "n=2*10**6 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "t=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness = 1.374e-03 meter\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.14,Page number 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "f=50*10**3 #frequency\n", + "v1=348 #velocity of ultrasound in atmosphere\n", + "v2=1392 #velocity of ultrasound in sea water\n", + "t=2.0 #time difference\n", + "\n", + "#distance is constant hence v1*t1=v2*t2\n", + "\n", + "m=v2/v1 #assuming constant as m\n", + "\n", + "#(t1-t2=d) and (t1=m*t2) therefore\n", + "\n", + "t2=t/(m-1)\n", + "\n", + "d=v2*t2 #distance between two ship\n", + "\n", + "print\"distance between two ships =\",round(d,4),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance between two ships = 928.0 meter\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.15,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.16,Page number 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=10 #salinity\n", + "t=2 #time\n", + "T=20 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"depth of sea bed =\",round(d,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of sea bed = 1590.8 meter\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.17,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "S=29 #salinity\n", + "t=2 #time\n", + "l=0.01 #wavelength\n", + "T=30 #temperature\n", + "\n", + "v=1510+1.14*S+4.21*T-0.037*T**2 #velocity of ultrasound in sea\n", + "\n", + "d=v*t/2 #depth of sea bed\n", + "\n", + "print\"1)depth of sea bed =\",round(d,4),\"meter\"\n", + "\n", + "f=v/l #frequency\n", + "\n", + "print\"2) frequency =\",\"{0:.3e}\".format(f),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)depth of sea bed = 1636.06 meter\n", + "2) frequency = 1.636e+05 Hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.18,Page number 4-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "v1=5.9*10**3 #velocity of UW in mild steel\n", + "v2=4.3*10**3 #velocity of UW in brass\n", + "t2=15*10**-3 #thickness of brass plate\n", + "\n", + "t1=v2*t2/v1 #since ve;ocity is inversly proportional to thickness\n", + "\n", + "print\"real thickness =\",\"{0:.3e}\".format(t1),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "real thickness = 1.093e-02 meter\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.19,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t1=4*10**-3 #thickness of 1st crystal\n", + "n1=400*10**3 #frequency of 1st crystal\n", + "n2=500*10**3 #frequency of 2nd crystal\n", + "\n", + "t2=n1*t1/n2 #since frquency is inversly proportional to thickness\n", + "\n", + "print\"thickness of 2nd crystal =\",\"{0:.3e}\".format(t2),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness of 2nd crystal = 3.200e-03 meter\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.20,Page number 4-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t2=30*10**-6 #pulse arrival time of defective steel bar\n", + "t1=80*10**-6 #pulse arrival time of non defective steel bar\n", + "d=40*10**-2 #bar thickness\n", + "\n", + "x=(t2/t1)*d\n", + "\n", + "print\"distance at which defect has occurred =\",round(x,4),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance at which defect has occurred = 0.15 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.21,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=18*10**-3 #thickness\n", + "v=5.9*10**3 #velocity\n", + "\n", + "t=(2*d)/v #echo time\n", + "\n", + "print\"echo time =\",\"{0:.3e}\".format(t),\"sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "echo time = 6.102e-06 sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.22,Page number 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=1*10**-3 #thickness of quartz crystal\n", + "\n", + "#given t=l/2\n", + "\n", + "l=t*2 #wavelength\n", + "Y=7.9*10**10 #young's module of crystal\n", + "p=2650 #density of crystal\n", + "\n", + "v=sqrt(Y/p) #velocity of vibration\n", + "\n", + "n=v/l #frequency of vibration\n", + "\n", + "print\"frquency of vibration =\",\"{0:.3e}\".format(n),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frquency of vibration = 2.730e+06 Hz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.23,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given data\n", + "\n", + "d=7.23*10**3 #density\n", + "Y=11.6*10**10 #Young's modulus\n", + "n=20*10**3 #frequency of wave\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "l=(k/(2*n))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "print\"length =\",\"{0:.3e}\".format(l),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length = 1.001e-01 meter\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.24,Page number 4-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=2*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=3*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.374e+06 Hz\n", + "2)change in thickness = 1.084e-03 meter\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.25,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "l=20 #length of room\n", + "b=15 #bredth of room\n", + "h=10 #height of room\n", + "\n", + "V=l*b*h #volume of room\n", + "S=2*(l*b+b*h+h*l) #surface area of hall\n", + "\n", + "T=3 #Reverberation time\n", + "\n", + "a=(0.161*V)/(T*S) #using Sabine's formula\n", + "\n", + "print\"1) average absorption coefficient =\",round(a,4)\n", + "\n", + "m=a*S #total absorption\n", + "\n", + "print\"2) total absorption of surface =\",round(m,4),\"m**2/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) average absorption coefficient = 0.1238\n", + "2) total absorption of surface = 161.0 m**2/sec\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.26,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for case1\n", + "t1=1.8*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "Y=8*10**10 #Young's modulus\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "n1=(k/(2*t1))*sqrt(Y/d) #formula of natural frequency\n", + "\n", + "print\"1)natural frequency =\",\"{0:.3e}\".format(n1),\"Hz\"\n", + "\n", + "#for case2\n", + "\n", + "n2=2*10**6 #frequency\n", + "\n", + "t2=(k/(2*n2))*sqrt(Y/d) #arranging formula of natural frequency\n", + "\n", + "t=t1-t2 #change in thickness\n", + "\n", + "print\"2)change in thickness =\",\"{0:.3e}\".format(t),\"meter\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)natural frequency = 1.526e+06 Hz\n", + "2)change in thickness = 4.264e-04 meter\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.27,Page number 4-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=0.4999*10**6 #frequency\n", + "t=5.5*10**-3 #thicknesss of plate\n", + "d=2.65*10**3 #density\n", + "k=1.0 #consider 1st harmonic\n", + "\n", + "Y=4*(t**2)*(n**2)*d/k #arranging formula of natural frequency\n", + "\n", + "print\"Youngs modulus =\",\"{0:.3e}\".format(Y),\"N/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Youngs modulus = 8.013e+10 N/m**2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/README.txt b/Applied_Physics-I_by_I_A_Shaikh/README.txt new file mode 100644 index 00000000..525c6847 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/README.txt @@ -0,0 +1,10 @@ +Contributed By: ajinkya khair +Course: be +College/Institute/Organization: V.E.S.I.T. +Department/Designation: Electronic and telecommunication +Book Title: Applied Physics-I +Author: I A Shaikh +Publisher: Tech-max Publication, Pune +Year of publication: 2013 +Isbn: 9789350770641 +Edition: 7 \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter1.ipynb new file mode 100755 index 00000000..b2a76d3e --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/chapter1.ipynb @@ -0,0 +1,2525 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:3e9b00b8b544a24032a4bb804cb876f45a5efd85913287f396a56723a0eb1a09" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Crystallography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1,Page number 1-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=26.98 #atomic weight of Al\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=2700 #Density\n", + "n=4 #FCC structure\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "print\"Unit cell dimension of Al=\",\"{0:.3e}\".format(a),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unit cell dimension of Al= 4.049e-10 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2,Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "As=28.1 #atomic weight of Si\n", + "Ag=69.7 #atomic weight of Ga\n", + "Aa=74.9 #atomic weight of As\n", + "a_s=5.43*10**-8 #lattice constant of Si\n", + "aga=5.65*10**-8 #lattice constant of GaAs\n", + "ns=8 #no of atoms/unit cell in Si\n", + "nga=4 #no of atoms/unit cell in GaAs\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "#p=(n*A)/(N*a**3) this is formula for density\n", + "\n", + "#for Si\n", + "\n", + "ps=(ns*As)/(N*a_s**3)\n", + "\n", + "print\"1) Density of Si=\",round(ps,4),\"gm/cm^3\"\n", + "\n", + "#for GaAs\n", + "\n", + "Aga=Ag+Aa #molecular wt of GaAs\n", + "\n", + "pga=(nga*Aga)/(N*aga**3)\n", + "\n", + "print\"2) Density of GaAs=\",round(pga,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Density of Si= 2.3312 gm/cm^3\n", + "2) Density of GaAs= 5.3244 gm/cm^3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.3,Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.5 #atomic weight of Cu\n", + "N=6.023*10**23 #Avogadro's number\n", + "n=4 #FCC structure\n", + "r=1.28*10**-8 #atomic radius of Cu\n", + "\n", + "#for FCC\n", + "\n", + "a=4*r/(sqrt(2)) #lattice constant\n", + "p=(n*A)/(N*a**3)\n", + "\n", + "print\"Density of Cu=\",round(p,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of Cu= 8.887 gm/cm^3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.4,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=50 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.96 #Density\n", + "n=2 #BCC structure\n", + "\n", + "#step 1 : claculation for lattice constant (a)\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "#step 2 : radius of an atom in BCC\n", + "\n", + "r=sqrt(3)*a/4\n", + "\n", + "#step 3 : Atomic packing factor (APF)\n", + "\n", + "APF=n*((4./3)*math.pi*r**3)/a**3\n", + "\n", + "print\"Atomic packing factor (APF)=\",round(APF,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Atomic packing factor (APF)= 0.6802\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.5,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=120 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.2 #Density\n", + "n=2 #BCC structure\n", + "m=20 #mass\n", + "\n", + "#step 1 : claculation for volume of unit cell(a**3)\n", + "\n", + "a=(n*A/(N*p))\n", + "\n", + "#step 2 : volume of 20 gm of the element\n", + "\n", + "v=m/p\n", + "\n", + "#step 3 :no of unit cell\n", + "\n", + "x=v/a\n", + "\n", + "print\"no of unit cell=\",\"{0:.3e}\".format(x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell= 5.019e+22\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.6,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=132.91 #atomic weight of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=1900 #Density\n", + "a=6.14*10**-10 #lattice constant\n", + "\n", + "#step 1 : type of structure\n", + "\n", + "n=(p*N*a**3)/A\n", + "\n", + "print\"n =\",round(n)\n", + "\n", + "print\"BCC structure\"\n", + "\n", + "#step 2: no of atoms/m**3\n", + "\n", + "x=n/a**3\n", + "\n", + "print\"no of atoms/m^3=\",\"{0:.3e}\".format(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 2.0\n", + "BCC structure\n", + "no of atoms/m^3= 8.610e+27\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.7,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=0.4049*10**-9 #lattice constant\n", + "t=0.006*10**-2 #thickness of Al foil\n", + "A=50*10**-4 #Area of foil\n", + "\n", + "V1=a**3 #volume of unit cell\n", + "\n", + "V=A*t #volume of the foil\n", + "\n", + "N=V/V1 #no of unit cell in the foil\n", + "\n", + "print\"no of unit cell in the foil=\",\"{0:.3e}\".format(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell in the foil= 4.519e+21\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.1,Page number 1-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#on joining centre of 3 anions,an equilateral triangle is formed and on joining centres of any anion and cation a right angle triangle ABC os formed\n", + "\n", + "#where AC=rc+ra\n", + "\n", + "#and BC=ra\n", + "\n", + "#m(angle (ACB))=30 degree\n", + "\n", + "#therefore cos (30)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.0-math.cos(30.0*math.pi/180))/math.cos(math.pi*30/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio of ligancy 3=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 3= 0.1547\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.2,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "p=math.cos(45*math.pi/180)\n", + "r=(1-p)/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 6 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 6 = 0.4142\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.3,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#since plane is square hence it is same as ligancy 6\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1-math.cos(45*math.pi/180))/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 8 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 8 = 0.4142\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.4,Page number 1-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#a tetrahedron CAEH can be considered with C as the apex of the tetrahedron.\n", + "\n", + "#the edges AE,AH and EH of the tetrahedron will then be the face of the cube faces ABEF,ADHF,EFHG resp.\n", + "\n", + "#from fig\n", + "\n", + "#AO=ra+rc and AJ=ra\n", + "\n", + "#AE=root(2)*a and AG=root(3)*a\n", + "\n", + "#AO/AJ=AG/AE=(ra+rc)/ra=root(3)*a/root(2)*a\n", + "\n", + "#assume rc/ra=r\n", + "r=(math.sqrt(3)-math.sqrt(2))/math.sqrt(2)\n", + "\n", + "print\"critical radius ratio for ligancy 4 = \",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 4 = 0.2247\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.5,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#ligancy 8 represents cubic arrangment .8 anions are at the corners and touch along cube edgs.Along the body diagonal the central cation and the corner anion are in contact.\n", + "\n", + "#cube edge=2*ra\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#and body diagonal=root(3)*cube edge=root(3)[2*(rc+ra)]\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=math.sqrt(3)-1.0\n", + "\n", + "print\"critical radius ratio of ligancy 8=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 8= 0.7321\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.6,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for an ionic crystal exibiting HCP structure the arrangment of ions refere from textbook\n", + "\n", + "#at centre we have a cation with radius rc=OA\n", + "\n", + "#it is an touch with 6 anions with radius ra=AB\n", + "\n", + "#OB=OC=ra+rc\n", + "\n", + "#intrangle ODB ,m(angle (OBC))=60 degree ,m(angle (ODB))=90 degree\n", + "\n", + "#therefore cos(60)=BD/OB=AB/(OA+OB)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.-math.cos(60*math.pi/180))/math.cos(60*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio 0f HCP structure=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio 0f HCP structure= 1.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.2,Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion a,b/3,2*c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 1:1/3:2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1\n", + "\n", + "r2=3\n", + "\n", + "r3=1./2\n", + "\n", + "#taking LCM of 2 and 1 is 2\n", + "\n", + "l=2\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",m3,m2,m1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= 1.0 6 2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.4,Page number 1-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "r=1.414 #atomic radius in amstrong unit\n", + "\n", + "#for FCC structure\n", + "\n", + "a=4*r/math.sqrt(2)\n", + "\n", + "#part 1: plane(2,0,0)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h1=2\n", + "k1=0\n", + "l1=0\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d1=a/sqrt(h1**2+k1**2+l1**2)\n", + "\n", + "print\"1)interplanar spacing for (2,0,0) plane=\",round(d1,4),\"amstrong\"\n", + "\n", + "#part 2: plane(1,1,1)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h2=1\n", + "k2=1\n", + "l2=1\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d2=a/sqrt(h2**2+k2**2+l2**2)\n", + "\n", + "print\"2)interplanar spacing for(1,1,1) plane=\",round(d2,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)interplanar spacing for (2,0,0) plane= 1.9997 amstrong\n", + "2)interplanar spacing for(1,1,1) plane= 2.3091 amstrong\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.1,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=2180 #density of NaCl\n", + "M=23+35.5 #molecular weight of NaCl\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1.0/3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 5.627e-10 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.2,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=8.9 #density of Cu atom\n", + "A=63.55 #atomic weight of Cu atom\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"cm\"\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of Cu atom\n", + "\n", + "d=2*r #diameter of Cu atom\n", + "\n", + "print\"2) Diameter of Cu atom=\",\"{0:.3e}\".format(d),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.620e-08 cm\n", + "2) Diameter of Cu atom= 2.559e-08 cm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.3,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #diamond structure\n", + "A=12.01 #atomic wt\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=3.75*10**-8 #lattice constant of diamond\n", + "\n", + "ro=(n*A)/(N*(a**3))\n", + "\n", + "print\"Density of diamond=\",round(ro,4),\"gm/cc\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of diamond= 3.025 gm/cc\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.4,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:4b:infinity (plane parallel to z axis)\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:4:infinity\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=1./4\n", + "r3=0\n", + "\n", + "#taking LCM of 3 and 4 i.e. 12\n", + "\n", + "l=12\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (0, 3.0, 4.0)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.5,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:-2b:3/2c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:-2:3/2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=-1./2\n", + "r3=2./3\n", + "\n", + "#taking LCM of 3, 2 and 3/2 is 6\n", + "\n", + "l=6\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (4.0, -3.0, 2.0)\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.6,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#if a plane cut at length m,n,p on the three crystal axes,then\n", + "\n", + "#m:n:p=xa:yb:zc\n", + "\n", + "#when primitive vectors of unit cell and numbers x,y,z,are related to miller indices (h,k,l)of the plane by relation\n", + "\n", + "#1/x:1/y:1/z=h:k:l\n", + "\n", + "#since a=b=c (crystal is simple cubic)\n", + "\n", + "#and (h,k,l)=(1,2,3)\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./1\n", + "r2=1./2\n", + "r3=1./3\n", + "\n", + "#taking LCM of 1 ,2 and 3 is 6\n", + "\n", + "l=6\n", + "\n", + "m=(l*r1)\n", + "\n", + "n=(l*r2)\n", + "\n", + "p=(l*r3)\n", + "\n", + "print\"ratio of intercepts=\",(m,n,p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of intercepts= (6.0, 3.0, 2.0)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.7,Page number 1-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.2 #in amstrong unit\n", + "b=1.8 #in amstrong unit\n", + "c=2 #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=2\n", + "k=3\n", + "l=1\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given tthat plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.2/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",n,\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",p,\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 1.2 amstrong\n", + "2)Z intercept= 4.0 amstrong\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.8,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=0\n", + "d=2 #interpanar spacing in amstrong unit\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "print\"radius r=\",(r),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius r= 1.0 amstrong\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.9,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #for FCC structure\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=1\n", + "d=2.08*10**-10 #distance\n", + "A=63.54 #atomic weight of Cu\n", + "N=6.023*10**26 #amstrong no\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#also (a**3*q)=n*A/N\n", + "\n", + "q=n*A/(N*a**3)\n", + "\n", + "print\"1)density=\",round(q,4),\"kg/m^3\"\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "d=r*2\n", + "\n", + "print\"2)radius r=\",\"{0:.3e}\".format(r),\"m\"\n", + "\n", + "print\"3)diameter d=\",\"{0:.3e}\".format(d),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)density= 9024.4855 kg/m^3\n", + "2)radius r= 1.274e-10 m\n", + "3)diameter d= 2.547e-10 m\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.10,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.546 #atomic weight of Cu\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=8930 #Density\n", + "n=1.23 #no.of electron per atom\n", + "\n", + "#density=mass/volume\n", + "\n", + "#therfore 1/volume=density/mass\n", + "\n", + "#since electron concentration is needed, let us find out no of atoms/volume(x)\n", + "\n", + "x=N*p/A\n", + "\n", + "#now one atom contribute n=1.23 electron\n", + "\n", + "#therefore x atoms contribute y no of free electron\n", + "\n", + "y=x*n\n", + "\n", + "print\"free electron concentration=\",\"{0:.3e}\".format(y),\"electron/m^3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "free electron concentration= 1.041e+29 electron/m^3\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.11,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.5 #in amstrong unit\n", + "b=2 #in amstrong unit\n", + "c=4. #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=3\n", + "k=2\n", + "l=6\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given that plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.5/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",(n),\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",(p),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 3.0 amstrong\n", + "2)Z intercept= 2.0 amstrong\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.12,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=7.87 #density of metal\n", + "A=55.85 #atomic wt of metal\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=2.9*10**-8 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"Number of atom per unit cell of a metal=\",round(n,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of atom per unit cell of a metal= 2.0\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.13,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=9.6*10**2 #density of sodium crystal\n", + "A=23 #atomic weight of sodium crystal\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 4.301e-10 m\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.15,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=2.7*10**3 #density of metal\n", + "A=27 #atomic wt of metal\n", + "N=6.023*10**26 #Avogadro's number\n", + "a=4.05*10**-10 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"1) Number of atom per unit cell of a metal=\",round(n,0)\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of metal\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Number of atom per unit cell of a metal= 4.0\n", + "2) atomic radius of a metal= 1.432e-10 m\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.16,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=5.98*10**3 #density of chromium\n", + "A=50 #atomic wt of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "#for BCC\n", + "\n", + "r=math.sqrt(3)*a/4 #radius of chromium\n", + "\n", + "APF=(n*(4./3)*math.pi*(r**3))/(a**3)\n", + "\n", + "print\"2) A.P.F. for chromium=\",round(APF,4)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.028e-10 m\n", + "2) A.P.F. for chromium= 0.6802\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.17,Page number 1-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=6250 #density\n", + "M=60.2 #molecular weight\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 3.999e-10 m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.19,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.82*10**-9 #lattice constant\n", + "n=2 #FCC crystal\n", + "t=17.167 #glancing angle in degree\n", + "q=math.pi/180*t #glancing angle in radians\n", + "\n", + "#assuming reflection in (1,0,0) plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#using Bragg's law , 2*d*sin(q)=n*la\n", + "\n", + "la=2*d*sin(q)/n\n", + "\n", + "print\"wavlength of X-ray=\",\"{0:.3e}\".format(la),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavlength of X-ray= 8.323e-10 m\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.20,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #Diamond structure\n", + "ro=2.33*10**3 #density of diamond\n", + "M=28.9 #atomic weight of diamond\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "r=math.sqrt(3)*a/8 #radius of diamond structure\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 5.482e-10 m\n", + "2) atomic radius of a metal= 1.187e-10 m\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.21,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=8.57*10**3 #density of chromium\n", + "d=2.86*10**-10 #nearest atoms distance\n", + "\n", + "#d=sqrt(3)/2*a\n", + "\n", + "a=2*d/math.sqrt(3)\n", + "\n", + "#now use formulae a**3*ro=n*A/N\n", + "\n", + "#therefore a**3*ro/n=mass of unit cell/(no of atoms pre unit cell)=mass of one atom\n", + "\n", + "m=a**3*ro/n\n", + "\n", + "print\"mass of one atom=\",\"{0:.3e}\".format(m),\"kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of one atom= 1.543e-25 kg\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.1,Page number 1-68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=4.255*10**-10 #interplaner spacing\n", + "l=1.549*10**-10 #wavelength of x ray\n", + "\n", + "#part 1: for smallest glancing angle(n=1)\n", + "\n", + "n1=1\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"1)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#part 2: for highst order\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"2)highest order possible =\",math.floor(n2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)glancing angle= 10.4875 degree\n", + "2)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.2,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.125*10**-10 #lattice constant\n", + "d=a/2 #interplaner spacing\n", + "n=2 #second order maximum\n", + "l=0.592*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.8608 degree\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.3,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=1 #for 1st order\n", + "n2=2 #for 2nd order\n", + "t=3.4 #angle where 1st order reflection done\n", + "t1=t*math.pi/180 #convert degree to radian\n", + "\n", + "m=math.sin(t1)\n", + "\n", + "#but from Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#for for constant distance(d) and wavelength(l) \n", + "\n", + "#order(n) is directly proportionl to sine of angle i.e (sin(t))\n", + "\n", + "#n1/n2=sin(t1)/sin(t2)\n", + "\n", + "#assume sin(t2)=a\n", + "\n", + "a=n2/n1*m\n", + "\n", + "t2=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"second order reflection take place at an angle=\",round(t2,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "second order reflection take place at an angle= 6.812 degree\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.4,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "V=50*10**3 #operating voltage of x-ray\n", + "M=74.6 #molecular weight\n", + "p=1.99*10**3 #density\n", + "n=4 #no of atoms per unit cell(for FCC structure)\n", + "h=6.63*10**-34 #plank's constant\n", + "c=3*10**8 #velocity \n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "#step 1:clculating shortest wavelength\n", + "\n", + "l=h*c/(e*V)\n", + "\n", + "print\"1)shortest wavelength=\",(l),\"m\"\n", + "\n", + "#step:2 calculating distance(d)\n", + "\n", + "#now a**3*p=n*M/N therefore,\n", + "\n", + "a=(n*M/(N*p))**(1./3)\n", + "\n", + "#since KCl is ionic crystal herefore,\n", + "\n", + "d=a/2\n", + "\n", + "#step 3: calculaing glancing angle\n", + "\n", + "#using Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#assume sin(t)=a, wavelength is minimum i.e l and n=1\n", + "\n", + "n=1\n", + "\n", + "a=n*l/(2*d)\n", + "\n", + "t=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"2) glancing angle=\",round(t,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)shortest wavelength= 2.48625e-11 m\n", + "2) glancing angle= 2.265 degree\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.5,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order maximum\n", + "l=0.82*10**-10 #wavelength of X ray\n", + "qd=7.0 #glancing angle in degree\n", + "qm=51./60 #glancing angle in minute\n", + "qs=48./3600 #glancing angle in second\n", + "\n", + "q=qd+qm+qs #total glancin angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "a=3*10**-10 #lattice constant\n", + "\n", + "#we know that d=a/root(h**2+k**2+l**2)\n", + "\n", + "#assume root(h**2+k**2+l**2) =m\n", + "\n", + "#arranging terms we get\n", + "\n", + "m=a/d\n", + "\n", + "print\"square root(h**2+k**2+l**2)=\",round(m,0)\n", + "\n", + "print\"hence possible solutions are (100),(010),(001)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "square root(h**2+k**2+l**2)= 1.0\n", + "hence possible solutions are (100),(010),(001)\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.6,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1j #wavelength of X ray\n", + "\n", + "#part 1:for(100)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q1=5.4 #glancing angle in degree\n", + "\n", + "dl1=n*l/(2*math.sin(q1*math.pi/180))\n", + "\n", + "#part 2:for(110)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q2=7.6 #glancing angle in degree\n", + "\n", + "dl2=n*l/(2*math.sin(q2*math.pi/180))\n", + "\n", + "#part 3:for(111)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q3=9.4 #glancing angle in degree\n", + "\n", + "dl3=n*l/(2*math.sin(q3*math.pi/180))\n", + "\n", + "#for taking ratio divide all dl by dl1\n", + "\n", + "d1=dl1/dl1\n", + "\n", + "d2=dl2/dl1\n", + "\n", + "d3=dl3/dl1\n", + "\n", + "print\"cubic lattice structure is=\",d1,d2,d3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " cubic lattice structure is= (1+0j) (0.711559669333+0j) (0.576199350225+0j)\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.7,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1.54*10**-10 #wavelength of rock salt crystal\n", + "q=21.7 #glancing angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "print\"lattice constant of crystal=\",\"{0:.3e}\".format(d),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lattice constant of crystal= 2.083e-10 meter\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.8,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "n=2 #first order maximum\n", + "\n", + "l=0.714*10**-10 #wavelength of X-ray crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 14.6984 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.9,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2.82*10**-10 #interplaner spacing\n", + "t=10 #glancing angle\n", + "\n", + "#for part 1\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "#using Bragg's law n*l=2*d*sin(t)\n", + "\n", + "l=2*d*math.sin(math.pi*t/180)/n\n", + "\n", + "print\"1)wavelength=\",\"{0:.3e}\".format(l),\"meter\"\n", + "\n", + "#for part 2\n", + "\n", + "n1=2\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"2)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#for part 3\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"3)highest order possible =\",(floor(n2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)wavelength= 9.794e-11 meter\n", + "2)glancing angle= 20.322 degree\n", + "3)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.10,Page number 1-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for line -A\n", + "\n", + "n1=1 #1st order maximum\n", + "q1=30 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line A n1*l1=2*d1*sin(q1)\n", + "\n", + "#d1=n1*l1/(2*sin(q1))\n", + "\n", + "#for line B\n", + "\n", + "l2=0.97 #wavelength in amstrong unit\n", + "n2=3 #1st order maximum\n", + "q2=60 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line B n2*l2=2*d2*sin(q2)\n", + "\n", + "#since for both lines A and B we use same plane of same crystal,therefore\n", + "\n", + "#d1=d2\n", + "\n", + "#therefore equution became n2*l2=2*n1*l1/(2*sin(q1))*sin(q2)\n", + "\n", + "#by arranging terms we get\n", + "\n", + "\n", + "l1=n2*l2*2*math.sin(q1*math.pi/180)/(2*n1*math.sin(q2*math.pi/180))\n", + "\n", + "print\"wavelength of the line A=\",round(l1,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of the line A= 1.6801 amstrong\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.11,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order minimum\n", + "d=5.5*10**-11 #atomic spacing\n", + "e=1.6*10**-19 #charge on one electron\n", + "Ee=10*10**3 #energy in eV\n", + "E=e*Ee #energy in Joule\n", + "m=9.1*10**-31 #mass of elelctron\n", + "h=6.63*10**-34 #plank's constant\n", + "\n", + "l=h/math.sqrt(2*m*E) #wavelength\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 6.4129 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.12,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#for rock salt\n", + "\n", + "d=a/2 #interplaner spacing\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "l=1.541*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angl\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.2038 degree\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.1,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.08 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "T1=1000 #temperature\n", + "\n", + "n1=math.exp(-Ev/(K*T1))\n", + "\n", + "#at 500k\n", + "\n", + "T2=500 #temperature\n", + "\n", + "n2=math.exp(-Ev/(K*T2))\n", + "\n", + "v=(n1)/(n2) #ratio of vacancies\n", + "\n", + "print\"ratio of vacancies=\",round(v,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of vacancies= 274234.5745\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.2,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.95 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=500 #temperature\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "print\"ratio of no of vacancies to no of atoms=\",\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of no of vacancies to no of atoms= 2.303e-20\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.3,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.8 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#ratio of vacancy is n/N assume be r=exp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "t1=-119 #temperature in degree\n", + "T1=t1+273 #temperature in kelvine\n", + "r1=math.exp(-Ev/(K*T1))\n", + "\n", + "print\"1)ratio of vacancies at -119 degree=\",\"{0:.3e}\".format(r1)\n", + "\n", + "#at 500k\n", + "\n", + "t2=80 #temperature in degree\n", + "\n", + "T2=t2+273 #temperature in kelvine\n", + "\n", + "r2=exp(-Ev/(K*T2))\n", + "\n", + "v=(r1)/(r2) #ratio of vacancies\n", + "\n", + "print\"2)ratio of vacancies at 80 degree=\",\"{0:.3e}\".format(r2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)ratio of vacancies at -119 degree= 1.399e-59\n", + "2)ratio of vacancies at 80 degree= 2.110e-26\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.4,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.5 #energy of formaton of frankel defect\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=700 #temperature\n", + "N=6.023*10**26 #avogadro's no\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(2*K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "qs=5.56 #specific density\n", + "q=5.56*10**3 #real density ke/m**3\n", + "M=0.143 #molecular weight in kg/m**3\n", + "ma=M/N #mass of one molecule\n", + "v=ma/q #vol of one molecule\n", + "\n", + "#v volume containe 1 molecule\n", + "\n", + "#therefore 1 m**3 containe x molecule\n", + "\n", + "x=1./v\n", + "d=m*x #defect per m**3\n", + "dm=d*10**-9 #defect per mm**3\n", + "\n", + "print\"number of frankel defects per mm^3=\",\"{0:.3e}\".format(dm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of frankel defects per mm^3= 9.432e+16\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb new file mode 100644 index 00000000..b2a76d3e --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/chapter1_1.ipynb @@ -0,0 +1,2525 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:3e9b00b8b544a24032a4bb804cb876f45a5efd85913287f396a56723a0eb1a09" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Crystallography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1,Page number 1-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=26.98 #atomic weight of Al\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=2700 #Density\n", + "n=4 #FCC structure\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "print\"Unit cell dimension of Al=\",\"{0:.3e}\".format(a),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unit cell dimension of Al= 4.049e-10 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2,Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "As=28.1 #atomic weight of Si\n", + "Ag=69.7 #atomic weight of Ga\n", + "Aa=74.9 #atomic weight of As\n", + "a_s=5.43*10**-8 #lattice constant of Si\n", + "aga=5.65*10**-8 #lattice constant of GaAs\n", + "ns=8 #no of atoms/unit cell in Si\n", + "nga=4 #no of atoms/unit cell in GaAs\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "#p=(n*A)/(N*a**3) this is formula for density\n", + "\n", + "#for Si\n", + "\n", + "ps=(ns*As)/(N*a_s**3)\n", + "\n", + "print\"1) Density of Si=\",round(ps,4),\"gm/cm^3\"\n", + "\n", + "#for GaAs\n", + "\n", + "Aga=Ag+Aa #molecular wt of GaAs\n", + "\n", + "pga=(nga*Aga)/(N*aga**3)\n", + "\n", + "print\"2) Density of GaAs=\",round(pga,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Density of Si= 2.3312 gm/cm^3\n", + "2) Density of GaAs= 5.3244 gm/cm^3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.3,Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.5 #atomic weight of Cu\n", + "N=6.023*10**23 #Avogadro's number\n", + "n=4 #FCC structure\n", + "r=1.28*10**-8 #atomic radius of Cu\n", + "\n", + "#for FCC\n", + "\n", + "a=4*r/(sqrt(2)) #lattice constant\n", + "p=(n*A)/(N*a**3)\n", + "\n", + "print\"Density of Cu=\",round(p,4),\"gm/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of Cu= 8.887 gm/cm^3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.4,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=50 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.96 #Density\n", + "n=2 #BCC structure\n", + "\n", + "#step 1 : claculation for lattice constant (a)\n", + "\n", + "a=(n*A/(N*p))**(1./3)\n", + "\n", + "#step 2 : radius of an atom in BCC\n", + "\n", + "r=sqrt(3)*a/4\n", + "\n", + "#step 3 : Atomic packing factor (APF)\n", + "\n", + "APF=n*((4./3)*math.pi*r**3)/a**3\n", + "\n", + "print\"Atomic packing factor (APF)=\",round(APF,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Atomic packing factor (APF)= 0.6802\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.5,Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=120 #atomic weight of chromium\n", + "N=6.023*10**23 #Avogadro's number\n", + "p=5.2 #Density\n", + "n=2 #BCC structure\n", + "m=20 #mass\n", + "\n", + "#step 1 : claculation for volume of unit cell(a**3)\n", + "\n", + "a=(n*A/(N*p))\n", + "\n", + "#step 2 : volume of 20 gm of the element\n", + "\n", + "v=m/p\n", + "\n", + "#step 3 :no of unit cell\n", + "\n", + "x=v/a\n", + "\n", + "print\"no of unit cell=\",\"{0:.3e}\".format(x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell= 5.019e+22\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.6,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=132.91 #atomic weight of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=1900 #Density\n", + "a=6.14*10**-10 #lattice constant\n", + "\n", + "#step 1 : type of structure\n", + "\n", + "n=(p*N*a**3)/A\n", + "\n", + "print\"n =\",round(n)\n", + "\n", + "print\"BCC structure\"\n", + "\n", + "#step 2: no of atoms/m**3\n", + "\n", + "x=n/a**3\n", + "\n", + "print\"no of atoms/m^3=\",\"{0:.3e}\".format(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 2.0\n", + "BCC structure\n", + "no of atoms/m^3= 8.610e+27\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.7,Page number 1-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=0.4049*10**-9 #lattice constant\n", + "t=0.006*10**-2 #thickness of Al foil\n", + "A=50*10**-4 #Area of foil\n", + "\n", + "V1=a**3 #volume of unit cell\n", + "\n", + "V=A*t #volume of the foil\n", + "\n", + "N=V/V1 #no of unit cell in the foil\n", + "\n", + "print\"no of unit cell in the foil=\",\"{0:.3e}\".format(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "no of unit cell in the foil= 4.519e+21\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.1,Page number 1-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#on joining centre of 3 anions,an equilateral triangle is formed and on joining centres of any anion and cation a right angle triangle ABC os formed\n", + "\n", + "#where AC=rc+ra\n", + "\n", + "#and BC=ra\n", + "\n", + "#m(angle (ACB))=30 degree\n", + "\n", + "#therefore cos (30)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.0-math.cos(30.0*math.pi/180))/math.cos(math.pi*30/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio of ligancy 3=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 3= 0.1547\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.2,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "p=math.cos(45*math.pi/180)\n", + "r=(1-p)/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 6 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 6 = 0.4142\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.3,Page number 1-30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#since plane is square hence it is same as ligancy 6\n", + "\n", + "#in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", + "\n", + "#join cation anion centres E and B and complete the triangle EBF\n", + "\n", + "#in triangle EBF m(angle F)=90 and EF=BF\n", + "\n", + "#m(angle B)=m(angle E)=45\n", + "\n", + "#and EB=rc+ra and BF=ra\n", + "\n", + "#cos(45)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1-math.cos(45*math.pi/180))/math.cos(45*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio for ligancy 8 =\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 8 = 0.4142\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.4,Page number 1-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#a tetrahedron CAEH can be considered with C as the apex of the tetrahedron.\n", + "\n", + "#the edges AE,AH and EH of the tetrahedron will then be the face of the cube faces ABEF,ADHF,EFHG resp.\n", + "\n", + "#from fig\n", + "\n", + "#AO=ra+rc and AJ=ra\n", + "\n", + "#AE=root(2)*a and AG=root(3)*a\n", + "\n", + "#AO/AJ=AG/AE=(ra+rc)/ra=root(3)*a/root(2)*a\n", + "\n", + "#assume rc/ra=r\n", + "r=(math.sqrt(3)-math.sqrt(2))/math.sqrt(2)\n", + "\n", + "print\"critical radius ratio for ligancy 4 = \",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio for ligancy 4 = 0.2247\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.5,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#ligancy 8 represents cubic arrangment .8 anions are at the corners and touch along cube edgs.Along the body diagonal the central cation and the corner anion are in contact.\n", + "\n", + "#cube edge=2*ra\n", + "\n", + "#refer diagram from textbook\n", + "\n", + "#and body diagonal=root(3)*cube edge=root(3)[2*(rc+ra)]\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=math.sqrt(3)-1.0\n", + "\n", + "print\"critical radius ratio of ligancy 8=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio of ligancy 8= 0.7321\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.6,Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for an ionic crystal exibiting HCP structure the arrangment of ions refere from textbook\n", + "\n", + "#at centre we have a cation with radius rc=OA\n", + "\n", + "#it is an touch with 6 anions with radius ra=AB\n", + "\n", + "#OB=OC=ra+rc\n", + "\n", + "#intrangle ODB ,m(angle (OBC))=60 degree ,m(angle (ODB))=90 degree\n", + "\n", + "#therefore cos(60)=BD/OB=AB/(OA+OB)=ra/(rc+ra)\n", + "\n", + "#assume rc/ra=r\n", + "\n", + "r=(1.-math.cos(60*math.pi/180))/math.cos(60*math.pi/180) #by arrangimg terms we get value of r\n", + "\n", + "print\"critical radius ratio 0f HCP structure=\",round(r,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical radius ratio 0f HCP structure= 1.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.2,Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion a,b/3,2*c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 1:1/3:2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1\n", + "\n", + "r2=3\n", + "\n", + "r3=1./2\n", + "\n", + "#taking LCM of 2 and 1 is 2\n", + "\n", + "l=2\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",m3,m2,m1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= 1.0 6 2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.4,Page number 1-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "r=1.414 #atomic radius in amstrong unit\n", + "\n", + "#for FCC structure\n", + "\n", + "a=4*r/math.sqrt(2)\n", + "\n", + "#part 1: plane(2,0,0)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h1=2\n", + "k1=0\n", + "l1=0\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d1=a/sqrt(h1**2+k1**2+l1**2)\n", + "\n", + "print\"1)interplanar spacing for (2,0,0) plane=\",round(d1,4),\"amstrong\"\n", + "\n", + "#part 2: plane(1,1,1)\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h2=1\n", + "k2=1\n", + "l2=1\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2)\n", + "\n", + "d2=a/sqrt(h2**2+k2**2+l2**2)\n", + "\n", + "print\"2)interplanar spacing for(1,1,1) plane=\",round(d2,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)interplanar spacing for (2,0,0) plane= 1.9997 amstrong\n", + "2)interplanar spacing for(1,1,1) plane= 2.3091 amstrong\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.1,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=2180 #density of NaCl\n", + "M=23+35.5 #molecular weight of NaCl\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1.0/3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 5.627e-10 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.2,Page number 1-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=8.9 #density of Cu atom\n", + "A=63.55 #atomic weight of Cu atom\n", + "N=6.023*10**23 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"cm\"\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of Cu atom\n", + "\n", + "d=2*r #diameter of Cu atom\n", + "\n", + "print\"2) Diameter of Cu atom=\",\"{0:.3e}\".format(d),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.620e-08 cm\n", + "2) Diameter of Cu atom= 2.559e-08 cm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.3,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #diamond structure\n", + "A=12.01 #atomic wt\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=3.75*10**-8 #lattice constant of diamond\n", + "\n", + "ro=(n*A)/(N*(a**3))\n", + "\n", + "print\"Density of diamond=\",round(ro,4),\"gm/cc\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of diamond= 3.025 gm/cc\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.4,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:4b:infinity (plane parallel to z axis)\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:4:infinity\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=1./4\n", + "r3=0\n", + "\n", + "#taking LCM of 3 and 4 i.e. 12\n", + "\n", + "l=12\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (0, 3.0, 4.0)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.5,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#intercept of planeare in proportion 3a:-2b:3/2c\n", + "\n", + "#as a,b and c are basic vectors the proportin of intercepts 3:-2:3/2\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./3\n", + "r2=-1./2\n", + "r3=2./3\n", + "\n", + "#taking LCM of 3, 2 and 3/2 is 6\n", + "\n", + "l=6\n", + "\n", + "m1=(l*r1)\n", + "\n", + "m2=(l*r2)\n", + "\n", + "m3=(l*r3)\n", + "\n", + "print\"miler indices=\",(m3,m2,m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "miler indices= (4.0, -3.0, 2.0)\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.6,Page number 1-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#if a plane cut at length m,n,p on the three crystal axes,then\n", + "\n", + "#m:n:p=xa:yb:zc\n", + "\n", + "#when primitive vectors of unit cell and numbers x,y,z,are related to miller indices (h,k,l)of the plane by relation\n", + "\n", + "#1/x:1/y:1/z=h:k:l\n", + "\n", + "#since a=b=c (crystal is simple cubic)\n", + "\n", + "#and (h,k,l)=(1,2,3)\n", + "\n", + "#therefore reciprocal\n", + "\n", + "r1=1./1\n", + "r2=1./2\n", + "r3=1./3\n", + "\n", + "#taking LCM of 1 ,2 and 3 is 6\n", + "\n", + "l=6\n", + "\n", + "m=(l*r1)\n", + "\n", + "n=(l*r2)\n", + "\n", + "p=(l*r3)\n", + "\n", + "print\"ratio of intercepts=\",(m,n,p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of intercepts= (6.0, 3.0, 2.0)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.7,Page number 1-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.2 #in amstrong unit\n", + "b=1.8 #in amstrong unit\n", + "c=2 #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=2\n", + "k=3\n", + "l=1\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given tthat plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.2/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",n,\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",p,\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 1.2 amstrong\n", + "2)Z intercept= 4.0 amstrong\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.8,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=0\n", + "d=2 #interpanar spacing in amstrong unit\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "print\"radius r=\",(r),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius r= 1.0 amstrong\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.9,Page number 1-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #for FCC structure\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=1\n", + "l=1\n", + "d=2.08*10**-10 #distance\n", + "A=63.54 #atomic weight of Cu\n", + "N=6.023*10**26 #amstrong no\n", + "\n", + "#we know that d=a/sqrt(h**2+k**2+l**2) therefore\n", + "\n", + "a=d*math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#also (a**3*q)=n*A/N\n", + "\n", + "q=n*A/(N*a**3)\n", + "\n", + "print\"1)density=\",round(q,4),\"kg/m^3\"\n", + "\n", + "#for FCC structure\n", + "\n", + "r=math.sqrt(2)*a/4\n", + "\n", + "d=r*2\n", + "\n", + "print\"2)radius r=\",\"{0:.3e}\".format(r),\"m\"\n", + "\n", + "print\"3)diameter d=\",\"{0:.3e}\".format(d),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)density= 9024.4855 kg/m^3\n", + "2)radius r= 1.274e-10 m\n", + "3)diameter d= 2.547e-10 m\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.10,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "A=63.546 #atomic weight of Cu\n", + "N=6.023*10**26 #Avogadro's number\n", + "p=8930 #Density\n", + "n=1.23 #no.of electron per atom\n", + "\n", + "#density=mass/volume\n", + "\n", + "#therfore 1/volume=density/mass\n", + "\n", + "#since electron concentration is needed, let us find out no of atoms/volume(x)\n", + "\n", + "x=N*p/A\n", + "\n", + "#now one atom contribute n=1.23 electron\n", + "\n", + "#therefore x atoms contribute y no of free electron\n", + "\n", + "y=x*n\n", + "\n", + "print\"free electron concentration=\",\"{0:.3e}\".format(y),\"electron/m^3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "free electron concentration= 1.041e+29 electron/m^3\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.11,Page number 1-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#primitive vectors\n", + "\n", + "a=1.5 #in amstrong unit\n", + "b=2 #in amstrong unit\n", + "c=4. #in amstrong unit\n", + "\n", + "#miller indices of the plane\n", + "\n", + "h=3\n", + "k=2\n", + "l=6\n", + "\n", + "#therefore intercepts are a/h,b/k,c/l\n", + "\n", + "x=a/h\n", + "y=b/k\n", + "z=c/l\n", + "\n", + "#this gives intercepts along x axis as x amstrong but it is given that plane cut x axis at 1.2 amstrong .\n", + "\n", + "t=1.5/x\n", + "\n", + "#this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", + "\n", + "n=t*y #Y intercept\n", + "\n", + "p=t*z #Z intercept\n", + "\n", + "print\"1) Y intercept=\",(n),\"amstrong\"\n", + "\n", + "print\"2)Z intercept=\",(p),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Y intercept= 3.0 amstrong\n", + "2)Z intercept= 2.0 amstrong\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.12,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=7.87 #density of metal\n", + "A=55.85 #atomic wt of metal\n", + "N=6.023*10**23 #Avogadro's number\n", + "a=2.9*10**-8 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"Number of atom per unit cell of a metal=\",round(n,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of atom per unit cell of a metal= 2.0\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.13,Page number 1-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=9.6*10**2 #density of sodium crystal\n", + "A=23 #atomic weight of sodium crystal\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 4.301e-10 m\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.15,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=2.7*10**3 #density of metal\n", + "A=27 #atomic wt of metal\n", + "N=6.023*10**26 #Avogadro's number\n", + "a=4.05*10**-10 #lattice constant of metal\n", + "\n", + "n=(N*(a**3)*ro)/A\n", + "\n", + "print\"1) Number of atom per unit cell of a metal=\",round(n,0)\n", + "\n", + "r=math.sqrt(2)*a/4 #radius of metal\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Number of atom per unit cell of a metal= 4.0\n", + "2) atomic radius of a metal= 1.432e-10 m\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.16,Page number 1-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=5.98*10**3 #density of chromium\n", + "A=50 #atomic wt of chromium\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*A)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "#for BCC\n", + "\n", + "r=math.sqrt(3)*a/4 #radius of chromium\n", + "\n", + "APF=(n*(4./3)*math.pi*(r**3))/(a**3)\n", + "\n", + "print\"2) A.P.F. for chromium=\",round(APF,4)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 3.028e-10 m\n", + "2) A.P.F. for chromium= 0.6802\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.17,Page number 1-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=4 #FCC structure\n", + "ro=6250 #density\n", + "M=60.2 #molecular weight\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"Lattice constant=\",\"{0:.3e}\".format(a),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant= 3.999e-10 m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.19,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.82*10**-9 #lattice constant\n", + "n=2 #FCC crystal\n", + "t=17.167 #glancing angle in degree\n", + "q=math.pi/180*t #glancing angle in radians\n", + "\n", + "#assuming reflection in (1,0,0) plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "#using Bragg's law , 2*d*sin(q)=n*la\n", + "\n", + "la=2*d*sin(q)/n\n", + "\n", + "print\"wavlength of X-ray=\",\"{0:.3e}\".format(la),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavlength of X-ray= 8.323e-10 m\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.20,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=8 #Diamond structure\n", + "ro=2.33*10**3 #density of diamond\n", + "M=28.9 #atomic weight of diamond\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "a=((n*M)/(N*ro))**(1./3)\n", + "\n", + "print\"1) Lattice constant=\",\"{0:.3e}\".format(a),\"m\"\n", + "\n", + "r=math.sqrt(3)*a/8 #radius of diamond structure\n", + "\n", + "print\"2) atomic radius of a metal=\",\"{0:.3e}\".format(r),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Lattice constant= 5.482e-10 m\n", + "2) atomic radius of a metal= 1.187e-10 m\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14.21,Page number 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=2 #BCC structure\n", + "ro=8.57*10**3 #density of chromium\n", + "d=2.86*10**-10 #nearest atoms distance\n", + "\n", + "#d=sqrt(3)/2*a\n", + "\n", + "a=2*d/math.sqrt(3)\n", + "\n", + "#now use formulae a**3*ro=n*A/N\n", + "\n", + "#therefore a**3*ro/n=mass of unit cell/(no of atoms pre unit cell)=mass of one atom\n", + "\n", + "m=a**3*ro/n\n", + "\n", + "print\"mass of one atom=\",\"{0:.3e}\".format(m),\"kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of one atom= 1.543e-25 kg\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.1,Page number 1-68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=4.255*10**-10 #interplaner spacing\n", + "l=1.549*10**-10 #wavelength of x ray\n", + "\n", + "#part 1: for smallest glancing angle(n=1)\n", + "\n", + "n1=1\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"1)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#part 2: for highst order\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"2)highest order possible =\",math.floor(n2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)glancing angle= 10.4875 degree\n", + "2)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.2,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.125*10**-10 #lattice constant\n", + "d=a/2 #interplaner spacing\n", + "n=2 #second order maximum\n", + "l=0.592*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.8608 degree\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.3,Page number 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n1=1 #for 1st order\n", + "n2=2 #for 2nd order\n", + "t=3.4 #angle where 1st order reflection done\n", + "t1=t*math.pi/180 #convert degree to radian\n", + "\n", + "m=math.sin(t1)\n", + "\n", + "#but from Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#for for constant distance(d) and wavelength(l) \n", + "\n", + "#order(n) is directly proportionl to sine of angle i.e (sin(t))\n", + "\n", + "#n1/n2=sin(t1)/sin(t2)\n", + "\n", + "#assume sin(t2)=a\n", + "\n", + "a=n2/n1*m\n", + "\n", + "t2=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"second order reflection take place at an angle=\",round(t2,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "second order reflection take place at an angle= 6.812 degree\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.4,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "V=50*10**3 #operating voltage of x-ray\n", + "M=74.6 #molecular weight\n", + "p=1.99*10**3 #density\n", + "n=4 #no of atoms per unit cell(for FCC structure)\n", + "h=6.63*10**-34 #plank's constant\n", + "c=3*10**8 #velocity \n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.023*10**26 #Avogadro's number\n", + "\n", + "#step 1:clculating shortest wavelength\n", + "\n", + "l=h*c/(e*V)\n", + "\n", + "print\"1)shortest wavelength=\",(l),\"m\"\n", + "\n", + "#step:2 calculating distance(d)\n", + "\n", + "#now a**3*p=n*M/N therefore,\n", + "\n", + "a=(n*M/(N*p))**(1./3)\n", + "\n", + "#since KCl is ionic crystal herefore,\n", + "\n", + "d=a/2\n", + "\n", + "#step 3: calculaing glancing angle\n", + "\n", + "#using Bragg's law\n", + "\n", + "#n*l=2*d*sin(t)\n", + "\n", + "#assume sin(t)=a, wavelength is minimum i.e l and n=1\n", + "\n", + "n=1\n", + "\n", + "a=n*l/(2*d)\n", + "\n", + "t=math.degrees(math.asin(a)) #taking sin inverese in degree\n", + "\n", + "print\"2) glancing angle=\",round(t,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)shortest wavelength= 2.48625e-11 m\n", + "2) glancing angle= 2.265 degree\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.5,Page number 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order maximum\n", + "l=0.82*10**-10 #wavelength of X ray\n", + "qd=7.0 #glancing angle in degree\n", + "qm=51./60 #glancing angle in minute\n", + "qs=48./3600 #glancing angle in second\n", + "\n", + "q=qd+qm+qs #total glancin angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "a=3*10**-10 #lattice constant\n", + "\n", + "#we know that d=a/root(h**2+k**2+l**2)\n", + "\n", + "#assume root(h**2+k**2+l**2) =m\n", + "\n", + "#arranging terms we get\n", + "\n", + "m=a/d\n", + "\n", + "print\"square root(h**2+k**2+l**2)=\",round(m,0)\n", + "\n", + "print\"hence possible solutions are (100),(010),(001)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "square root(h**2+k**2+l**2)= 1.0\n", + "hence possible solutions are (100),(010),(001)\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.6,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1j #wavelength of X ray\n", + "\n", + "#part 1:for(100)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q1=5.4 #glancing angle in degree\n", + "\n", + "dl1=n*l/(2*math.sin(q1*math.pi/180))\n", + "\n", + "#part 2:for(110)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q2=7.6 #glancing angle in degree\n", + "\n", + "dl2=n*l/(2*math.sin(q2*math.pi/180))\n", + "\n", + "#part 3:for(111)\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q3=9.4 #glancing angle in degree\n", + "\n", + "dl3=n*l/(2*math.sin(q3*math.pi/180))\n", + "\n", + "#for taking ratio divide all dl by dl1\n", + "\n", + "d1=dl1/dl1\n", + "\n", + "d2=dl2/dl1\n", + "\n", + "d3=dl3/dl1\n", + "\n", + "print\"cubic lattice structure is=\",d1,d2,d3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " cubic lattice structure is= (1+0j) (0.711559669333+0j) (0.576199350225+0j)\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.7,Page number 1-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1 #first order maximum\n", + "l=1.54*10**-10 #wavelength of rock salt crystal\n", + "q=21.7 #glancing angle in degree\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "d=n*l/(2*math.sin(q*math.pi/180))\n", + "\n", + "print\"lattice constant of crystal=\",\"{0:.3e}\".format(d),\"meter\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lattice constant of crystal= 2.083e-10 meter\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.8,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#the interplanar spacing of plane\n", + "\n", + "h=1\n", + "k=0\n", + "l=0\n", + "\n", + "d=a/math.sqrt(h**2+k**2+l**2)\n", + "\n", + "n=2 #first order maximum\n", + "\n", + "l=0.714*10**-10 #wavelength of X-ray crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 14.6984 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.9,Page number 1-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "d=2.82*10**-10 #interplaner spacing\n", + "t=10 #glancing angle\n", + "\n", + "#for part 1\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "#using Bragg's law n*l=2*d*sin(t)\n", + "\n", + "l=2*d*math.sin(math.pi*t/180)/n\n", + "\n", + "print\"1)wavelength=\",\"{0:.3e}\".format(l),\"meter\"\n", + "\n", + "#for part 2\n", + "\n", + "n1=2\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "q=math.degrees(math.asin(n1*l/(2*d)))\n", + "\n", + "print\"2)glancing angle=\",round(q,4),\"degree\"\n", + "\n", + "#for part 3\n", + "\n", + "#for highest order sin(q) not exceed one i.e maximum value is one\n", + "\n", + "#using Bragg's law n*l=2*d*sin(q)\n", + "\n", + "n2=2*d/l #since sin(q)is one\n", + "\n", + "print\"3)highest order possible =\",(floor(n2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)wavelength= 9.794e-11 meter\n", + "2)glancing angle= 20.322 degree\n", + "3)highest order possible = 5.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.10,Page number 1-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#for line -A\n", + "\n", + "n1=1 #1st order maximum\n", + "q1=30 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line A n1*l1=2*d1*sin(q1)\n", + "\n", + "#d1=n1*l1/(2*sin(q1))\n", + "\n", + "#for line B\n", + "\n", + "l2=0.97 #wavelength in amstrong unit\n", + "n2=3 #1st order maximum\n", + "q2=60 #glancing angle in degree\n", + "\n", + "#using Bragg's law for line B n2*l2=2*d2*sin(q2)\n", + "\n", + "#since for both lines A and B we use same plane of same crystal,therefore\n", + "\n", + "#d1=d2\n", + "\n", + "#therefore equution became n2*l2=2*n1*l1/(2*sin(q1))*sin(q2)\n", + "\n", + "#by arranging terms we get\n", + "\n", + "\n", + "l1=n2*l2*2*math.sin(q1*math.pi/180)/(2*n1*math.sin(q2*math.pi/180))\n", + "\n", + "print\"wavelength of the line A=\",round(l1,4),\"amstrong\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of the line A= 1.6801 amstrong\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.11,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "n=1.0 #first order minimum\n", + "d=5.5*10**-11 #atomic spacing\n", + "e=1.6*10**-19 #charge on one electron\n", + "Ee=10*10**3 #energy in eV\n", + "E=e*Ee #energy in Joule\n", + "m=9.1*10**-31 #mass of elelctron\n", + "h=6.63*10**-34 #plank's constant\n", + "\n", + "l=h/math.sqrt(2*m*E) #wavelength\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angle\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 6.4129 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15.12,Page number 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "a=2.814*10**-10 #lattice constant\n", + "\n", + "#for rock salt\n", + "\n", + "d=a/2 #interplaner spacing\n", + "\n", + "n=1 #first order maximum\n", + "\n", + "l=1.541*10**-10 #wavelength of rock salt crystal\n", + "\n", + "#using Bragg's law\n", + "\n", + "q=math.degrees(math.asin((n*l)/(2*d))) #glancing angl\n", + "\n", + "print\"glancing angle=\",round(q,4),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "glancing angle= 33.2038 degree\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.1,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.08 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "T1=1000 #temperature\n", + "\n", + "n1=math.exp(-Ev/(K*T1))\n", + "\n", + "#at 500k\n", + "\n", + "T2=500 #temperature\n", + "\n", + "n2=math.exp(-Ev/(K*T2))\n", + "\n", + "v=(n1)/(n2) #ratio of vacancies\n", + "\n", + "print\"ratio of vacancies=\",round(v,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of vacancies= 274234.5745\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.2,Page number 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.95 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=500 #temperature\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "print\"ratio of no of vacancies to no of atoms=\",\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of no of vacancies to no of atoms= 2.303e-20\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.3,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.8 #average energy required to creaet a vacancy\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "#ratio of vacancy is n/N assume be r=exp(-Ev/KT)\n", + "\n", + "#since total no atom is 1 hence N=1\n", + "\n", + "#at 1000k\n", + "\n", + "t1=-119 #temperature in degree\n", + "T1=t1+273 #temperature in kelvine\n", + "r1=math.exp(-Ev/(K*T1))\n", + "\n", + "print\"1)ratio of vacancies at -119 degree=\",\"{0:.3e}\".format(r1)\n", + "\n", + "#at 500k\n", + "\n", + "t2=80 #temperature in degree\n", + "\n", + "T2=t2+273 #temperature in kelvine\n", + "\n", + "r2=exp(-Ev/(K*T2))\n", + "\n", + "v=(r1)/(r2) #ratio of vacancies\n", + "\n", + "print\"2)ratio of vacancies at 80 degree=\",\"{0:.3e}\".format(r2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1)ratio of vacancies at -119 degree= 1.399e-59\n", + "2)ratio of vacancies at 80 degree= 2.110e-26\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16.4,Page number 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Ev=1.5 #energy of formaton of frankel defect\n", + "k=1.38*10**-23 #boltzman constant in J/K\n", + "e=1.6*10**-19 #charge on 1 electron\n", + "K=k/e #boltzman constant in eV/K\n", + "T=700 #temperature\n", + "N=6.023*10**26 #avogadro's no\n", + "\n", + "#for a low concentration of vacancies a relation is\n", + "\n", + "#n=Nexp(-Ev/KT)\n", + "\n", + "m=math.exp(-Ev/(2*K*T)) #ratio of no of vacancies to no of atoms n/N\n", + "\n", + "qs=5.56 #specific density\n", + "q=5.56*10**3 #real density ke/m**3\n", + "M=0.143 #molecular weight in kg/m**3\n", + "ma=M/N #mass of one molecule\n", + "v=ma/q #vol of one molecule\n", + "\n", + "#v volume containe 1 molecule\n", + "\n", + "#therefore 1 m**3 containe x molecule\n", + "\n", + "x=1./v\n", + "d=m*x #defect per m**3\n", + "dm=d*10**-9 #defect per mm**3\n", + "\n", + "print\"number of frankel defects per mm^3=\",\"{0:.3e}\".format(dm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of frankel defects per mm^3= 9.432e+16\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb b/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb new file mode 100644 index 00000000..17fcfe26 --- /dev/null +++ b/Applied_Physics-I_by_I_A_Shaikh/chapter_2.ipynb @@ -0,0 +1,851 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:48c8e92f460a56975ab73a5ede03395bfb2a33fc5326e02cbff674697a4f07d0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.1,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ro=1.72*10**-8 #resistivity of Cu\n", + "s=1/ro #conductivity of Cu\n", + "n=10.41*10**28 #no of electron per unit volume\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "u=s/(n*e)\n", + "\n", + "print\"mobility of electron in Cu =\",\"{0:.3e}\".format(u),\"m^2/volt-sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mobility of electron in Cu = 3.491e-03 m^2/volt-sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.2,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=63.5 #atomic weight\n", + "u=43.3 #mobility of electron\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**23 #Avogadro's number\n", + "d=8.96 #density\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "n=1*Ad\n", + "\n", + "ro=1/(n*e*u)\n", + "\n", + "print\"Resistivity of Cu =\",\"{0:.3e}\".format(ro),\"ohm-cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Cu = 1.699e-06 ohm-cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.3,Page number 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "e=1.6*10**-19 #charge on electron\n", + "ne=2.5*10**19 #density of carriers\n", + "nh=ne #for intrinsic semiconductor\n", + "ue=0.39 #mobility of electron\n", + "uh=0.19 #mobility of hole\n", + "\n", + "s=ne*e*ue+nh*e*uh #conductivity of Ge\n", + "\n", + "ro=1.0/s #resistivity of Ge\n", + "\n", + "print\"Resistivity of Ge =\",round(ro,4),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of Ge = 0.431 ohm-m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.5,Page number 2-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Eg=1.2 #energy gap\n", + "T1=600 #temperature\n", + "T2=300 #temperature\n", + "\n", + "#since ue>>uh for intrinsic semiconductor\n", + "\n", + "#s=ni*e*ue\n", + "\n", + "K=8.62*10**-5 #Boltzman constant\n", + "\n", + "s=1l\n", + "\n", + "s1=s*exp((-Eg)/(2*K*T1))\n", + "\n", + "s2=s*exp((-Eg)/(2*K*T2))\n", + "\n", + "m=(s1/s2)\n", + "\n", + "print'Ratio between conductivity =',\"{0:.3e}\".format(m)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio between conductivity = 1.092e+05\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.6,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "c=5*10**28 #concentration of Si atoms\n", + "e=1.6*10**-19 #charge on electron\n", + "u=0.048 #mobility of hole\n", + "s=4.4*10**-4 #conductivity of Si\n", + "\n", + "#since millionth Si atom is replaced by an indium atom\n", + "\n", + "n=c*10**-6\n", + "\n", + "sp=u*e*n #conductivity of resultant\n", + "\n", + "print\"conductivity =\",(sp),\"mho/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity = 384.0 mho/m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21.7,Page number 2-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "m=28.1 #atomic weight of Si\n", + "e=1.6*10**-19 #charge on electron\n", + "N=6.02*10**26 #Avogadro's number\n", + "d=2.4*10**3 #density of Si\n", + "p=0.25 #resistivity\n", + "\n", + "#no. of Si atom/m**3\n", + "\n", + "Ad=N*d/m #Atomic density\n", + "\n", + "#impurity level is 0.01 ppm i.e. 1 atom in every 10**8 atoms of Si\n", + "\n", + "n=Ad/10**8 #no of impurity atoms\n", + "\n", + "#since each impurity produce 1 hole\n", + "\n", + "nh=n\n", + "\n", + "print\"1) hole concentration =\",round(n,4),\"holes/m^3\"\n", + "\n", + "up=1/(e*p*nh)\n", + "\n", + "print\"2) mobility =\",round(up,4),\"m^2/volt.sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) hole concentration = 5.14163701068e+20 holes/m^3\n", + "2) mobility = 0.0486 m^2/volt.sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.1,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=27 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 3.938e-10\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.2,Page number 2-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "m=0.012 #energy level(Ef-E)\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "p1=1-p\n", + "\n", + "print\"probability of an energy level not being occupied by an electron=\",round(p1,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an energy level not being occupied by an electron= 0.614\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.3,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "t=20 #temp in degree \n", + "T=t+273 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=1.12 #Energy band gap\n", + "\n", + "#For intrensic semiconductor (Ec-Ev)=Eg/2\n", + "\n", + "#let (Ec-Ev)=m\n", + "\n", + "m=Eg/2\n", + "\n", + "a=(m/(K*T))\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "p=1.0/(1+exp(a))\n", + "\n", + "\n", + "print\"probability of an electron being thermally excited to conduction band=\",\"{0:.3e}\".format(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of an electron being thermally excited to conduction band= 2.348e-10\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22.4,Page number 2-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "Eg=2.1 #Energy band gap\n", + "\n", + "#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", + "\n", + "m=K*T\n", + "\n", + "#for f(E)=0.99\n", + "\n", + "p1=0.99\n", + "\n", + "b=abs(1.0-(1.0/p1))\n", + "\n", + "a=math.log(b) #a=(E-2.1)/m\n", + "\n", + "E=2.1+m*a\n", + "\n", + "print\"1) Energy for which probability is 0.99=\",round(E,4),\"eV\"\n", + "\n", + "#for f(E)=0.01\n", + "\n", + "p2=0.01\n", + "\n", + "b2=abs(1-1.0/p2)\n", + "\n", + "a1=math.log(b2) #a=(E-2.1)/m\n", + "\n", + "E1=2.1+m*a1\n", + "\n", + "print\"2)Energy for which probability is 0.01=\",round(E1,4),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Energy for which probability is 0.99= 1.9812 eV\n", + "2)Energy for which probability is 0.01= 2.2188 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.1,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "ni=2.4*10**19 #density of intrensic semiconductor\n", + "n=4.4*10**28 #no atom in Ge crystal\n", + "Nd=n/10**6 #density\n", + "Na=Nd\n", + "e=1.6*10**-19 #charge on electron\n", + "T=300 #temerature at N.T.P.\n", + "K=1.38*10**-23 #Boltzman constant\n", + "\n", + "Vo=(K*T/e)*log(Na*Nd/(ni**2))\n", + "\n", + "print\"Potential barrier for Ge =\",round(Vo,4),\"Volts\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential barrier for Ge = 0.3888 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.2,Page number 2-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.6 #magnetic field\n", + "d=5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "Nd=10**21 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "Vh=(B*J*d)/(Nd*e) #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",\"{0:.3e}\".format(Vh),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 9.375e-03 Volts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.3,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=6*10**-7 #Hall coefficient\n", + "B=1.5 #magnetic field\n", + "I=200 #current in strip\n", + "W=1*10**-3 #thickness of strip\n", + "\n", + "Vh=Rh*(B*I)/W #due to Hall effect\n", + "\n", + "print\"Hall voltage =\",(Vh),\"Volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 0.18 Volt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.4,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=2.25*10**-5 #Hall coefficient\n", + "u=0.025 #mobility of hole\n", + "\n", + "r=Rh/u\n", + "\n", + "print\"Resistivity of P type silicon =\",\"{0:.3e}\".format(r),\"ohm-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity of P type silicon = 9.000e-04 ohm-m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.5,Page number 2-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.55 #magnetic field\n", + "d=4.5*10**-3 #distancebetween surface\n", + "J=500 #current density\n", + "n=10**20 #density\n", + "e=1.6*10**-19 #charge on electron\n", + "Rh=1/(n*e) #Hall coefficient\n", + "\n", + "Vh=Rh*B*J*d #Hall voltage\n", + "\n", + "print\"1) Hall voltage =\",round(Vh,4),\"Volts\"\n", + "\n", + "print\"2) Hall coefficient =\",(Rh),\"m^3/C\"\n", + "\n", + "u=0.17 #mobility of electrom\n", + "\n", + "m=math.atan(u*B)\n", + "\n", + "a=m*180/math.pi #conversion randian into degree\n", + "\n", + "print\"3) Hall angle =\",round(a,4),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) Hall voltage = 0.0773 Volts\n", + "2) Hall coefficient = 0.0625 m^3/C\n", + "3) Hall angle = 5.3416 degree\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.6,Page number 2-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "Rh=3.66*10**-4 #Hall coefficient\n", + "r=8.93*10**-3 #resistivity \n", + "e=1.6*10**-19 #charge on electron\n", + "\n", + "#Hall coefficient Rh=1/(n*e)\n", + "\n", + "n=1/(Rh*e) #density\n", + "\n", + "print\"1) density(n) =\",round(n,4),\"/m^3\"\n", + "\n", + "u=Rh/r #mobility of electron\n", + "\n", + "print\"2) mobility (u) =\",round(u,4),\"m^2/v-s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1) density(n) = 1.70765027322e+22 /m^3\n", + "2) mobility (u) = 0.041 m^2/v-s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23.7,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "B=0.2 #magnetic field\n", + "e=1.6*10**-19 #charge on electron\n", + "ue=0.39 #mobility of electron\n", + "l=0.01 #length\n", + "A=0.001*0.001 #cross section area of bar\n", + "V=1*10**-3 #Applied voltage\n", + "d=0.001 #sample of width \n", + "\n", + "r=1/(ue*e) #resistivity\n", + "R=r*l/A #resistance of Ge bar\n", + "\n", + "#using ohm's law\n", + "\n", + "I=V/R\n", + "Rh=r*ue #hall coefficient\n", + "\n", + "#using formulae for hall effect\n", + "\n", + "J=I/A #current density\n", + "Vh=Rh*B*J*d\n", + "\n", + "print\"Hall voltage =\",(Vh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall voltage = 7.8e-06\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24.1,Page number 2-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "x1=0.4 #difference between fermi level and conduction band(Ec-Ef)\n", + "T=300 #temp in kelvin\n", + "K=8.62*10**-5 #Boltzman constant in eV\n", + "\n", + "#ne=N*e**(-(Ec-Ef)/(K*T))\n", + "#ne is no of electron in conduction band\n", + "#since concentration of donor electron is doubled\n", + "\n", + "a=2 #ratio of no of electron\n", + "\n", + "#let x2 be the difference between new fermi level and conduction band(Ec-Ef')\n", + "\n", + "x2=-math.log(a)*(K*T)+x1 #arranging equation ne=N*e**(-(Ec-Ef)/(K*T))\n", + "\n", + "print\"Fermi level will be shifted towards conduction band by\",round(x2,4),\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fermi level will be shifted towards conduction band by 0.3821 eV\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-I_by_I_A_Shaikh/screenshots/Capture1.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1.png new file mode 100755 index 00000000..c1b1d679 Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1.png differ 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 new file mode 100644 index 00000000..c1b1d679 Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture1_1.png differ diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3.png new file mode 100755 index 00000000..7c472fe2 Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3.png differ 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 new file mode 100644 index 00000000..7c472fe2 Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture3_1.png differ diff --git a/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4.png b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4.png new file mode 100755 index 00000000..a7775a6b Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4.png differ 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 new file mode 100644 index 00000000..a7775a6b Binary files /dev/null and b/Applied_Physics-I_by_I_A_Shaikh/screenshots/Capture4_1.png differ diff --git a/Atomic_and_Nuclear_Physics/screenshots/ch1_e_accelerated.png b/Atomic_and_Nuclear_Physics/screenshots/ch1_e_accelerated.png new file mode 100755 index 00000000..d7165aeb Binary files /dev/null and b/Atomic_and_Nuclear_Physics/screenshots/ch1_e_accelerated.png differ diff --git a/Atomic_and_Nuclear_Physics/screenshots/ch2_r_and__v_for_e.png b/Atomic_and_Nuclear_Physics/screenshots/ch2_r_and__v_for_e.png new file mode 100755 index 00000000..4257f446 Binary files /dev/null and b/Atomic_and_Nuclear_Physics/screenshots/ch2_r_and__v_for_e.png differ diff --git a/Atomic_and_Nuclear_Physics/screenshots/ch5_L-S_coupling.png b/Atomic_and_Nuclear_Physics/screenshots/ch5_L-S_coupling.png new file mode 100755 index 00000000..567b0e96 Binary files /dev/null and b/Atomic_and_Nuclear_Physics/screenshots/ch5_L-S_coupling.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 new file mode 100644 index 00000000..21332dd0 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ankit Kumar +Course: btech +College/Institute/Organization: KIET +Department/Designation: EN +Book Title: Atomic and Nuclear Physics +Author: N. Subrahmanyam, B. Lal And J. Seshan +Publisher: S. Chand And Company Ltd., New Delhi +Year of publication: 2008 +Isbn: 81-219-0414-5 +Edition: 10 \ No newline at end of file diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1.ipynb new file mode 100755 index 00000000..e0ac0133 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1.ipynb @@ -0,0 +1,916 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 01 : Relativity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1 : Pg:20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative Speed of approach\n", + "c = 1 # For the sake of simplicity, assume c = 1, m/s\n", + "u = 0.87*c # Velocity of approach of spaceship A towards spaceship B, m/s\n", + "v = -0.63*c # Velocity of approach of spaceship B towards spaceship A, m/s\n", + "V = (u - v)/(1 - (u*v)/c**2) # Velocity Addition Rule giving relative speed of approach of particles, m/s\n", + "print \"The relative speed of approach of particles = %6.4fc\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of approach of particles = 0.9689c\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2 : Pg: 20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative Speed of spaceships\n", + "c = 1 # For the sake of simplicity, assume c = 1, m/s\n", + "u = 0.9*c # Velocity of approach of spaceship A towards spaceship B, m/s\n", + "v = -0.9*c # Velocity of approach of spaceship B towards spaceship A, m/s\n", + "V = (u - v)/(1 - (u*v)/c**2) # Velocity Addition Rule giving relative speed of approach of spaceships, m/s\n", + "print \"The relative speed of B w.r.t. A = %5.3fc\"% V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of B w.r.t. A = 0.994c\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3 : Pg: 20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relativistic length contraction\n", + "L0 = 1.0 # Actual length of the metre stick, m\n", + "rel_mass = 3.0/2 # Relative mass of stick w.r.t. rest its mass\n", + "# As m = m0/sqrt(1 - (v/c)**2) and L = L0*sqrt(1 - (v/c)**2)\n", + "# Thus L/m = (L0/m0)*(1 - (v/c)**2), solving for L\n", + "# L = (m0/m)*L0 i.e.\n", + "L = 1/rel_mass*L0 # Apparent length of the metre rod, m\n", + "print \"The apparent length of the metre rod = %5.3f m\" %L\n", + "# Result \n", + "# The apparent length of the metre rod = 0.667 m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The apparent length of the metre rod = 0.667 m\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5 : Pg: 22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass-Energy Equivalence\n", + "U = 7.5e+011 # Total electrical energy generated in a country, kWh\n", + "kWh = 1000*3600 # Conversion factor for kilowatt-hour into joule, J/kWh\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = (U*kWh)/c**2 # Mass equivalent of energy, kg\n", + "print \"The mass converted into energy = %2d kg\" % m\n", + "# Result \n", + "# The mass converted into energy = 30 kg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass converted into energy = 30 kg\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6 : Pg:22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy equivalent of mass\n", + "m = 1 # Mass of a substance, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "U = m*c**2 # Energy equivalent of mass, J\n", + "print \"The energy equivalent of mass = %1.0e J\"% U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy equivalent of mass = 9e+16 J\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7 : Pg: 22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Relativistic variation of mass with speed\n", + "m0 = 1e-024 # Mass of a particle, kg\n", + "v = 1.8e+08 # Speed of the particle, m/s\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = m0/sqrt(1-(v/c)**2) # Mass of the moving particle, kg\n", + "print \"The mass of moving particle = %4.2e kg\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of moving particle = 1.25e-24 kg\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.8 : Pg: 23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Increase in mass of water\n", + "c = 3e+08 # Speed of light, m/s\n", + "T1 = 273 # Initial temperature of water, K\n", + "T2 = 373 # Final temperature of water, K\n", + "M = 1e+06 # Mass of water, kg\n", + "C = 1e+03 # Specific heat of water, cal/kg-K\n", + "J = 4.18 # Joule's mechanical equivalent of heat, cal/joule\n", + "U = M*C*(T2 - T1)*J # Increase in energy of water, J\n", + "m = U/c**2 # Increase in mass of water, kg\n", + "print \"The increase in mass of water = %4.2e kg\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in mass of water = 4.64e-06 kg\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9 : Pg:23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Ratio of rest mass and mass in motion\n", + "c = 1 # For convenience, speed of light is assumed to be unity, m/s\n", + "v = 0.5*c # Velocity of moving particle, m/s\n", + "# As m0 = m*sqrt(1 - (v/c)**2), and m0/m = rel_mass, we have\n", + "rel_mass = sqrt(1 - (v/c)**2) # Ratio of rest mass and the moving mass\n", + "print \"The ratio of rest mass and the mass in motion = %6.4f kg\"% rel_mass\n", + "# Result \n", + "# The ratio of rest mass and the mass in motion = 0.8660 kg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of rest mass and the mass in motion = 0.8660 kg\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.10 : Pg:23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Heat equivalent of mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "J = 4.18 # Joule's equivalent of heat, joule per calorie\n", + "m = 4.18e-03 # Mass of the substance, kg\n", + "U = m*c**2 # Energy equivalent of mass, J\n", + "Q = U/J # Heat equivalent of mass, calorie\n", + "print \"The heat equivalent of mass = %1.0e cal\"% Q\n", + "# Result \n", + "# The heat equivalent of mass = 9e+013 cal" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat equivalent of mass = 9e+13 cal\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.11 : Pg: 23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Variation of space and time\n", + "L = 0.5 # Shortened length of the rod, m\n", + "L0 = 1 # Actual length of the rod, m\n", + "t0 = 1 # Actual time on the spaceship, s\n", + "c = 3e+08 # Speed of light, m/s\n", + "v = sqrt(1 - (L/L0)**2)*c # Speed of the spaceship, m/s\n", + "t = t0/sqrt(1 - (v/c)**2) # Dilated time for stationary observer, s\n", + "print \"The speed of light = %5.3e m/s\"% v\n", + "print \"The time dilation corresponding to 1 s on the spaceship = %d s\"% round(t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of light = 2.598e+08 m/s\n", + "The time dilation corresponding to 1 s on the spaceship = 2 s\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.12 : Pg: 24 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mean lifetime of a moving meason\n", + "c = 1 # For convenience, speed of light is assumed to be unity\n", + "t0 = 2e-08 # Mean life time of pi-meson at rest, s\n", + "v = 0.8*c # Velocity of moving pi-meason, m/s\n", + "t = t0/sqrt(1-(v/c)**2) # Mean lifetime of moving pi-meason, s\n", + "print \"The mean lifetime of moving meason = %4.2e s\"% t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean lifetime of moving meason = 3.33e-08 s\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.13 : Pg: 24 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Velocity of one atomic mass unit\n", + "c = 1.0 # For convenience, speed of light is assumed to be unity, m/s\n", + "m0 = 1.0 # For convenience, rest mass is assumed to be unity\n", + "# Here 2*m0*c**2 = m*c**2 - m0*c**2 = KE which gives\n", + "m = 3*m0 # Atomic mass in motion, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of one atomic mass, m/s \n", + "print \"The velocity of one atomic mass = %5.3fc\"% v\n", + "# Result \n", + "# The velocity of one atomic mass = 0.943c " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of one atomic mass = 0.943c\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14 : Pg: 25 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Speed of an electron for an equivalent proton mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "m0 = 1 # For convenience, rest mass of an electron is assumed to be unity\n", + "m = 2000*m0 # Rest mass of a proton, units\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Speed of the moving electron, m/s \n", + "print \"The speed of the moving electron = %4.2e m/s (approx.)\"% v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the moving electron = 3.00e+08 m/s (approx.)\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15 : Pg: 25 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Speed at total energy twice the rest mass energy\n", + "c = 1 # Speed of light is assumed to be unity, m/s\n", + "m0 = 1.0 # For convenience, rest mass of the particle is assumed to be unity, kg\n", + "m = 2*m0 # Mass of the moving particle when m*c**2 = 2*m0*c**2, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Speed of the moving particle, m/s \n", + "print \"The speed of the moving particle = %5.3fc\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the moving particle = 0.866c\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.16 : Pg:26 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative velocity and mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "u = 2e+08 # Speed of first particle, m/s\n", + "v = -2e+08 # Speed of second particle, m/s\n", + "u_prime = (u - v)/(1 - u*v/c**2) # Velocity addition rule giving relative velocity, m/s\n", + "m0 = 3e-025 # Rest mass of each particle, kg\n", + "m = m0/sqrt(1 - (u_prime/c)**2) # Mass of one particle relative to the other, kg\n", + "print \"The relative speed of one particle w.r.t the other = %5.3e m/s\"% u_prime\n", + "print \"The mass of one particle relative to the other = %3.1e kg\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of one particle w.r.t the other = 2.769e+08 m/s\n", + "The mass of one particle relative to the other = 7.8e-25 kg\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.17 : Pg: 26 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relativistic variation of density with velocity\n", + "c = 1 # Speed of light is assumed to be unity for convenience, m/s\n", + "v = 0.9*c # Speed of moving frame, m/s\n", + "rho_0 = 19.3e+03 # Density of gold in rest frame, kg metre per cube\n", + "L0 = 1 # Actual length is assumed to be unity, m\n", + "m0 = 1 # Rest mass of gold is assumed to be unity, kg\n", + "V0 = m0/rho_0 # Volume of gold in rest frame, metre cube\n", + "L = L0*sqrt(1 - (v/c)**2) # Relativistic Length Contraction Formula, m\n", + "y = 1 # Width of gold block is assumed to be unity, m\n", + "z = 1 # Height of gold block is assumed to be unity, m\n", + "V = L*y*z*V0 # Volume of gold as observed from moving frame, metre cube\n", + "m = m0/sqrt(1 - (v/c)**2) # Mass of gold as observed from moving frame, kg\n", + "rho = m/V # Density of gold as observed from moving frame, kg per metre cube\n", + "print \"The density of gold as observed from moving frame = %5.1fe+003 kg per metre cube\"% (rho/1e+03)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of gold as observed from moving frame = 101.6e+003 kg per metre cube\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.18 : Pg: 27 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Electrons accelerated to relativistic speeds\n", + "U = 1.0e+09*1.6e-019 # Kinetic energy of the electrons, J\n", + "# As U = m*c**2, solving for m\n", + "m = U/c**2 # Mass of moving electrons, kg\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "mass_ratio = m/m0 # Ratio of a moving electron mass to its rest mass \n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "vel_ratio = v/c # Ratio of electron velocity to the velocity of light\n", + "U0 = m0*c**2 # Rest mass energy of electron, J\n", + "ene_ratio = U/U0 # Ratio of electron energy to its rest mass energy\n", + "print \"The ratio of a moving electron mass to its rest mass %4.2e\" %(mass_ratio) \n", + "print \"The ratio of electron velocity to the velocity of light = 1 - %5.3e\" %((1-vel_ratio**2)/2) \n", + "print \"The ratio of electron energy to its rest mass energy = %5.3e\"%(ene_ratio) \n", + "# Result \n", + "# The ratio of a moving electron mass to its rest mass 1.95e+003\n", + "# The ratio of electron velocity to the velocity of light = 1 - 1.310e-007\n", + "# The ratio of electron energy to its rest mass energy = 1.954e+003 \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of a moving electron mass to its rest mass 1.76e+20\n", + "The ratio of electron velocity to the velocity of light = 1 - 0.000e+00\n", + "The ratio of electron energy to its rest mass energy = 1.954e+03\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.19 : Pg: 28 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Electron speed equivalent of twice its rest mass\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "m = 2*m0 # Mass of moving electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.20 : Pg: 28 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Electron speed equivalent of twice its rest mass\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "m = 2*m0 # Mass of moving electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s\"%v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.21 : Pg:29 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Fractional speed of electron\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "E = 0.5*1e+06*1.6e-019 # Kinetic energy of electron, J\n", + "# As E = (m - m0)*c**2, solving for m\n", + "m = E/c**2+m0 # Mass of moving electron, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron relative to speed of light = %5.3f\"%(v/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron relative to speed of light = 0.863\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.22 : Pg: 29 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Effective mass and speed of electron\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Electron-volt equivalent of 1 joule, eV/joule\n", + "U = 2*1e+06*e # Total energy of electron, J\n", + "# As E = (m - m0)*c**2, solving for m\n", + "m = U/c**2 # Effective mass of electron, kg\n", + "m0 = 0.511*1e+06*e/c**2 # Rest mass of the electron, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The effective mass of electron = %4.1e kg\"% m \n", + "print \"The relativistic speed of electron = %4.2fc m\"% (v/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effective mass of electron = 3.6e-30 kg\n", + "The relativistic speed of electron = 0.97c m\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.23 : Pg: 30 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released in fission\n", + "c = 3.0e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "r0 = 1.2e-015 # Equilibrium nuclear radius, m\n", + "A = 238.0 # Twice the mass of each fragment\n", + "q1 = 46.0*e # Charge on first fragment, coulomb\n", + "q2 = 46.0*e # Charge on second fragment, coulomb\n", + "R = r0*(A/2)**(1.0/3) \n", + "d = 2*R # Distance between two fragments, m\n", + "U = q1*q2*9e+09/d # Energy released in fission, J\n", + "print \"The energy released in fission of U(92,238) = %3d MeV\"%(U/(e*1e+06)) \n", + "# Result \n", + "# The energy released in fission of U(92,238) = 258 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released in fission of U(92,238) = 258 MeV\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.24 : Pg: 30 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Relativistic speed form relativistic mass\n", + "c = 3e+08 # Speed of light, m/s \n", + "m0 = 1.0/2 # Rest mass of the particle, MeV/c**2\n", + "m = 1/sqrt(2) # Relativistic mass of the particle, MeV/c**2\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Relativistic velocity of particle, m/s\n", + "print \"The relativistic velocity of particle = %4.2e m/s\"%(v) \n", + "# Result \n", + "# The relativistic velocity of particle = 2.12e+008 m/s " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relativistic velocity of particle = 2.12e+08 m/s\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.25 : Pg: 31 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Decay of muon\n", + "c = 3e+08 # Speed of light, m/s \n", + "v = 0.992*c # Relativistic speed of muon, m/s\n", + "S = 60*1e+03 # Distance travelled by muon before it decays, m\n", + "t_prime = S/v # Time measured by observer on earth (Dilated Time), s\n", + "t = t_prime*sqrt(1 - (v/c)**2) # Time measured by muon in its own frame, s \n", + "s = v*t # Distance covered by the muon in its own frame of reference, m \n", + "print \"The time measured by observer on earth (Dilated Time) = %5.3e s\"% t_prime\n", + "print \"The time measured by muon in its own frame = %4.2e s\"% t \n", + "print \"The distance covered by the muon in its own frame of reference = %4.2f km\"%(s/1e+03) \n", + "# Result \n", + "# The time measured by observer on earth (Dilated Time) = 2.016e-004 s\n", + "# The time measured by muon in its own frame = 2.55e-005 s\n", + "# The distance covered by the muon in its own frame of reference = 7.57 km " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time measured by observer on earth (Dilated Time) = 2.016e-04 s\n", + "The time measured by muon in its own frame = 2.55e-05 s\n", + "The distance covered by the muon in its own frame of reference = 7.57 km\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.26 : Pg: 31 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Decay of unstable particlec = 3e+08 # Speed of light, m/s \n", + "v = 0.9*c # Relativistic speed of unstable particle, m/s\n", + "t0 = 1e-06 # Time of decay of unstable particle in rest frame, s\n", + "t = t0/sqrt(1 - (v/c)**2) #Time of decay of unstable particle in moving frame, s \n", + "s = v*t # Distance travelled by unstable particle before it decays in moving frame, m \n", + "print \"The distance travelled before the unstable particle decays = %4.2e m\"% s\n", + "# Result \n", + "# The distance travelled before the unstable particle decays = 6.19e+002 m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled before the unstable particle decays = 6.19e+02 m\n" + ] + } + ], + "prompt_number": 71 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10.ipynb new file mode 100755 index 00000000..ae4a3c33 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10.ipynb @@ -0,0 +1,437 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 10 : Structure of Nuclei" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1.1 : Pg:209 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy and mass equivalence of wavelength\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "me = 9.1e-031 # Mass of en electron, kg\n", + "L = 4.5e-013 # Wavelength of gamma ray, m\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "U = h*c/L # Energy equivalence of wavelength, J\n", + "m = U/c**2 # Mass equivalent of wavelength, kg\n", + "print \"The energy equivalence of wavelength %3.1e m = %4.2f MeV\"% (L, U/(e*1e+06)) \n", + "print \"The mass equivalence of wavelength %3.1e m = %4.2f me\"% (L, m/me) \n", + "# Result \n", + "# The energy equivalence of wavelength 4.5e-013 m = 2.76 MeV\n", + "# The mass equivalence of wavelength 4.5e-013 m = 5.39 me " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy equivalence of wavelength 4.5e-13 m = 2.76 MeV\n", + "The mass equivalence of wavelength 4.5e-13 m = 5.39 me\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1.2 : Pg:210 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon for oxygen isotopes\n", + "mp = 1.007276 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "# For Isotope O-16\n", + "M_O16 = 15.990523 # Mass of O-16 isotope, amu\n", + "Z = 8 # Number of protons\n", + "N = 8 # Number of neutrons\n", + "BE = (8*(mp+mn)-M_O16)*amu # Binding energy of O-16 isotope, MeV\n", + "BE_bar16 = BE/(Z+N) # Binding energy per nucleon of O-16 isotope, MeV\n", + "# For Isotope O-18\n", + "M_O18 = 17.994768 # Mass of O-18 isotope, amu\n", + "Z = 8 # Number of protons\n", + "N = 10 # Number of neutrons\n", + "BE = (8*mp+10*mn-M_O18)*amu # Binding energy of O-18 isotope, MeV\n", + "BE_bar18 = BE/(Z+N) # Binding energy per nucleon of O-18 isotope, MeV\n", + "print \"The binding energy per nucleon of O-16 isotope = %5.3f MeV\"% BE_bar16 \n", + "print \"The binding energy per nucleon of O-18 isotope = %5.3f MeV\"% BE_bar18 \n", + "# Result \n", + "# The binding energy per nucleon of O-16 isotope = 7.972 MeV\n", + "# The binding energy per nucleon of O-18 isotope = 7.763 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of O-16 isotope = 7.972 MeV\n", + "The binding energy per nucleon of O-18 isotope = 7.763 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2.1 : Pg:214 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log, exp\n", + "from sympy import symbols, solve\n", + "#Range of alpha-emitters of uranium\n", + "L1 = 4.8e-018 # Decay constant of first alpha-emitter, per sec\n", + "L2 = 4.225e+03 # Decay constant of second alpha-emitter, per sec\n", + "L3 = 3.786e-03 # Decay constant of third alpha-emitter, per sec\n", + "R1 = 4.19 # Range of first alpha-emitter, cm\n", + "R2 = 7.86 # Range of second alpha-emitter, cm\n", + "# From Geiger Nuttal law, log R = A log L + B\n", + "# Putting R1, L1 and R2, L2, subtracting and solving for A\n", + "A = log(R2/R1)/log(L2/L1) # Slope of straight line between R and L\n", + "B = symbols('B') # Intercept of straight line between R and L\n", + "B = solve(log(R2)-A*log(L2)-B, B)[0] # Other constant of Geiger-Nuttal law\n", + "R3 = exp(A*log(L3)+B) # Range of third alpha-emitter of uranium, cm\n", + "print \"The range of third alpha-emitter of uranium = %5.3f cm\"% R3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range of third alpha-emitter of uranium = 6.554 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.1 : Pg:219 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon of helium\n", + "amu = 931 # Energy equivalent of amu, MeV\n", + "mp = 1.007895 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "M_He = 4.00260 # Atomic weight of helium, amu\n", + "dm = 2*(mp+mn)-M_He # Mass difference, amu\n", + "BE = dm*amu # Binding energy of helium, MeV\n", + "BE_bar = BE/4 # Binding energy per nucleon, MeV\n", + "print \"The binding energy per nucleon of helium = %6.4f MeV\"% BE_bar" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of helium = 7.1035 MeV\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.2 : Pg:220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released in the fusion of deuterium \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "Q = 43 # Energy released in fusion of six deuterium atoms, MeV\n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "n = N/2 # Number of atoms contained in 1 kg of deuterium\n", + "U = Q/6*n*e*1e+06 # Energy released due to fusion of 1 kg of deuterium, J\n", + "print \"The energy released due to fusion of 1 kg of deuterium = %5.3e J\"% U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released due to fusion of 1 kg of deuterium = 3.373e+14 J\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.3 : Pg: 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass of deuterium nucleus \n", + "amu = 1.6e-027 # Mass of a nucleon, kg\n", + "mp = 1.007895 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "BE = 2/931 # Binding energy of two nucleons, amu\n", + "M_D = (mp+mn-BE)*amu # Mass of a deuterium nucleus, kg\n", + "print \"The mass of deuterium nucleus = %5.3e kg\"% M_D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of deuterium nucleus = 3.226e-27 kg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.4 : Pg: 220 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon of Ni-64\n", + "amu = 931 # Mass of a nucleon, MeV\n", + "MH = 1.007825 # Mass of hydrogen, amu\n", + "Me = 0.000550 # Mass of electron, amu\n", + "Mp = MH-Me # Mass of proton, amu\n", + "Mn = 1.008665 # Mass of neutron, amu\n", + "m_Ni = 63.9280 # Mass of Ni-64 atom, amu\n", + "MNi = m_Ni-28*Me # Mass of ni-64 nucleus, amu\n", + "m = (28*Mp+36*Mn)-MNi # Mass difference, amu\n", + "BE = m*amu # Binding energy of Ni-64, MeV\n", + "BE_bar = BE/64 # Binding energy per nucleon of Ni-64, MeV\n", + "print \"The binding energy per nucleon of Ni-64 = %4.2f MeV\"% BE_bar " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of Ni-64 = 8.77 MeV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.5 : Pg: 221 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fusion of two deuterons\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "x = 1.1 # Binding energy per nucleon of deuterium, MeV\n", + "y = 7.0 # Binding energy per nucleon of helium-4, MeV\n", + "E = (y - 2*x)*1e+06*e # Energy released when two deutron nuclei fuse together, MeV\n", + "print \"The binding energy per nucleon of deuterium = %4.2e J\"%E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of deuterium = 7.68e-13 J\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.6 : Pg: 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Binding energy and packing fraction of helium\n", + "amu = 931.0 # Energy equivalent of amu, MeV\n", + "mp = 1.00814 # Mass of proton, amu\n", + "mn = 1.00898 # Mass of neutron, amu\n", + "m_He = 4.00387 # Mass of helium, amu\n", + "A = 4.0 # Mass number of helium\n", + "m = 2.0*(mp+mn)-m_He # Mass difference, amu\n", + "dm = m_He - A # Mass defect of He\n", + "BE = dm*amu # Binding energy of He, MeV\n", + "p = dm/A # Packing fraction of He\n", + "print \"The binding energy of helium = %6.3f MeV\"% BE \n", + "print \"The packing fraction of helium = %5.3e\"% p \n", + "#Answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy of helium = 3.603 MeV\n", + "The packing fraction of helium = 9.675e-04\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.7 : Pg: 222 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass of Yukawa particle\n", + "h = 6.626e-034 # Reduced Planck's constant, Js\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "R0 = 1.2e-015 # Nuclear radius constant, m\n", + "R = 2*R0 # Range of nuclear force, m\n", + "v = 1e+08 # Speed of the particle, m/s\n", + "S = R # Distance travelled by particle within the nucleus, m\n", + "dt = S/v # time taken by the particle to travel across the nucleus, s\n", + "# From Heisenberg's uncertainty principle, dE.dt = h_bar, solving for dE\n", + "dE = h/(1e+06*e*dt) # Energy of Yukawa paeticle, MeV\n", + "m = dE/0.51 # Approximate mass of Yukawa particle, electronic mass unit\n", + "print \"The mass of Yukawa particle = %3d me\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of Yukawa particle = 338 me\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.8 : Pg:222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Maximum height of the potential barrier for alpha penetration \n", + "epsilon_0 = 8.854e-12 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 92 # Atomic number of U-92 nucleus\n", + "z = 2 # Atomic number of He nucleus\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "R = 9.3e-015 # Radius of residual nucleus, m\n", + "U = 1/(4*pi*epsilon_0)*Z*z*e**2/(R*1.6e-013) # Maximum height of potential barrier, MeV\n", + "print \"The maximum height of the potential barrier for alpha penetration = %2d MeV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum height of the potential barrier for alpha penetration = 28 MeV\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..ae4a3c33 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch10_1.ipynb @@ -0,0 +1,437 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 10 : Structure of Nuclei" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1.1 : Pg:209 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy and mass equivalence of wavelength\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "me = 9.1e-031 # Mass of en electron, kg\n", + "L = 4.5e-013 # Wavelength of gamma ray, m\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "U = h*c/L # Energy equivalence of wavelength, J\n", + "m = U/c**2 # Mass equivalent of wavelength, kg\n", + "print \"The energy equivalence of wavelength %3.1e m = %4.2f MeV\"% (L, U/(e*1e+06)) \n", + "print \"The mass equivalence of wavelength %3.1e m = %4.2f me\"% (L, m/me) \n", + "# Result \n", + "# The energy equivalence of wavelength 4.5e-013 m = 2.76 MeV\n", + "# The mass equivalence of wavelength 4.5e-013 m = 5.39 me " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy equivalence of wavelength 4.5e-13 m = 2.76 MeV\n", + "The mass equivalence of wavelength 4.5e-13 m = 5.39 me\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1.2 : Pg:210 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon for oxygen isotopes\n", + "mp = 1.007276 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "# For Isotope O-16\n", + "M_O16 = 15.990523 # Mass of O-16 isotope, amu\n", + "Z = 8 # Number of protons\n", + "N = 8 # Number of neutrons\n", + "BE = (8*(mp+mn)-M_O16)*amu # Binding energy of O-16 isotope, MeV\n", + "BE_bar16 = BE/(Z+N) # Binding energy per nucleon of O-16 isotope, MeV\n", + "# For Isotope O-18\n", + "M_O18 = 17.994768 # Mass of O-18 isotope, amu\n", + "Z = 8 # Number of protons\n", + "N = 10 # Number of neutrons\n", + "BE = (8*mp+10*mn-M_O18)*amu # Binding energy of O-18 isotope, MeV\n", + "BE_bar18 = BE/(Z+N) # Binding energy per nucleon of O-18 isotope, MeV\n", + "print \"The binding energy per nucleon of O-16 isotope = %5.3f MeV\"% BE_bar16 \n", + "print \"The binding energy per nucleon of O-18 isotope = %5.3f MeV\"% BE_bar18 \n", + "# Result \n", + "# The binding energy per nucleon of O-16 isotope = 7.972 MeV\n", + "# The binding energy per nucleon of O-18 isotope = 7.763 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of O-16 isotope = 7.972 MeV\n", + "The binding energy per nucleon of O-18 isotope = 7.763 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2.1 : Pg:214 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log, exp\n", + "from sympy import symbols, solve\n", + "#Range of alpha-emitters of uranium\n", + "L1 = 4.8e-018 # Decay constant of first alpha-emitter, per sec\n", + "L2 = 4.225e+03 # Decay constant of second alpha-emitter, per sec\n", + "L3 = 3.786e-03 # Decay constant of third alpha-emitter, per sec\n", + "R1 = 4.19 # Range of first alpha-emitter, cm\n", + "R2 = 7.86 # Range of second alpha-emitter, cm\n", + "# From Geiger Nuttal law, log R = A log L + B\n", + "# Putting R1, L1 and R2, L2, subtracting and solving for A\n", + "A = log(R2/R1)/log(L2/L1) # Slope of straight line between R and L\n", + "B = symbols('B') # Intercept of straight line between R and L\n", + "B = solve(log(R2)-A*log(L2)-B, B)[0] # Other constant of Geiger-Nuttal law\n", + "R3 = exp(A*log(L3)+B) # Range of third alpha-emitter of uranium, cm\n", + "print \"The range of third alpha-emitter of uranium = %5.3f cm\"% R3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range of third alpha-emitter of uranium = 6.554 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.1 : Pg:219 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon of helium\n", + "amu = 931 # Energy equivalent of amu, MeV\n", + "mp = 1.007895 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "M_He = 4.00260 # Atomic weight of helium, amu\n", + "dm = 2*(mp+mn)-M_He # Mass difference, amu\n", + "BE = dm*amu # Binding energy of helium, MeV\n", + "BE_bar = BE/4 # Binding energy per nucleon, MeV\n", + "print \"The binding energy per nucleon of helium = %6.4f MeV\"% BE_bar" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of helium = 7.1035 MeV\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.2 : Pg:220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released in the fusion of deuterium \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "Q = 43 # Energy released in fusion of six deuterium atoms, MeV\n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "n = N/2 # Number of atoms contained in 1 kg of deuterium\n", + "U = Q/6*n*e*1e+06 # Energy released due to fusion of 1 kg of deuterium, J\n", + "print \"The energy released due to fusion of 1 kg of deuterium = %5.3e J\"% U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released due to fusion of 1 kg of deuterium = 3.373e+14 J\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.3 : Pg: 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass of deuterium nucleus \n", + "amu = 1.6e-027 # Mass of a nucleon, kg\n", + "mp = 1.007895 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "BE = 2/931 # Binding energy of two nucleons, amu\n", + "M_D = (mp+mn-BE)*amu # Mass of a deuterium nucleus, kg\n", + "print \"The mass of deuterium nucleus = %5.3e kg\"% M_D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of deuterium nucleus = 3.226e-27 kg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.4 : Pg: 220 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy per nucleon of Ni-64\n", + "amu = 931 # Mass of a nucleon, MeV\n", + "MH = 1.007825 # Mass of hydrogen, amu\n", + "Me = 0.000550 # Mass of electron, amu\n", + "Mp = MH-Me # Mass of proton, amu\n", + "Mn = 1.008665 # Mass of neutron, amu\n", + "m_Ni = 63.9280 # Mass of Ni-64 atom, amu\n", + "MNi = m_Ni-28*Me # Mass of ni-64 nucleus, amu\n", + "m = (28*Mp+36*Mn)-MNi # Mass difference, amu\n", + "BE = m*amu # Binding energy of Ni-64, MeV\n", + "BE_bar = BE/64 # Binding energy per nucleon of Ni-64, MeV\n", + "print \"The binding energy per nucleon of Ni-64 = %4.2f MeV\"% BE_bar " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of Ni-64 = 8.77 MeV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3.5 : Pg: 221 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fusion of two deuterons\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "x = 1.1 # Binding energy per nucleon of deuterium, MeV\n", + "y = 7.0 # Binding energy per nucleon of helium-4, MeV\n", + "E = (y - 2*x)*1e+06*e # Energy released when two deutron nuclei fuse together, MeV\n", + "print \"The binding energy per nucleon of deuterium = %4.2e J\"%E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon of deuterium = 7.68e-13 J\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.6 : Pg: 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Binding energy and packing fraction of helium\n", + "amu = 931.0 # Energy equivalent of amu, MeV\n", + "mp = 1.00814 # Mass of proton, amu\n", + "mn = 1.00898 # Mass of neutron, amu\n", + "m_He = 4.00387 # Mass of helium, amu\n", + "A = 4.0 # Mass number of helium\n", + "m = 2.0*(mp+mn)-m_He # Mass difference, amu\n", + "dm = m_He - A # Mass defect of He\n", + "BE = dm*amu # Binding energy of He, MeV\n", + "p = dm/A # Packing fraction of He\n", + "print \"The binding energy of helium = %6.3f MeV\"% BE \n", + "print \"The packing fraction of helium = %5.3e\"% p \n", + "#Answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy of helium = 3.603 MeV\n", + "The packing fraction of helium = 9.675e-04\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.7 : Pg: 222 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass of Yukawa particle\n", + "h = 6.626e-034 # Reduced Planck's constant, Js\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "R0 = 1.2e-015 # Nuclear radius constant, m\n", + "R = 2*R0 # Range of nuclear force, m\n", + "v = 1e+08 # Speed of the particle, m/s\n", + "S = R # Distance travelled by particle within the nucleus, m\n", + "dt = S/v # time taken by the particle to travel across the nucleus, s\n", + "# From Heisenberg's uncertainty principle, dE.dt = h_bar, solving for dE\n", + "dE = h/(1e+06*e*dt) # Energy of Yukawa paeticle, MeV\n", + "m = dE/0.51 # Approximate mass of Yukawa particle, electronic mass unit\n", + "print \"The mass of Yukawa particle = %3d me\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of Yukawa particle = 338 me\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.8 : Pg:222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Maximum height of the potential barrier for alpha penetration \n", + "epsilon_0 = 8.854e-12 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 92 # Atomic number of U-92 nucleus\n", + "z = 2 # Atomic number of He nucleus\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "R = 9.3e-015 # Radius of residual nucleus, m\n", + "U = 1/(4*pi*epsilon_0)*Z*z*e**2/(R*1.6e-013) # Maximum height of potential barrier, MeV\n", + "print \"The maximum height of the potential barrier for alpha penetration = %2d MeV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum height of the potential barrier for alpha penetration = 28 MeV\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11.ipynb new file mode 100755 index 00000000..92a220e2 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11.ipynb @@ -0,0 +1,129 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 11 : Nuclear Reactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.1 : : Pg: 229 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy balance of a nuclear reaction\n", + "mu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "M_D = 2.0141 # Mass of deuterium atom, amu\n", + "M_He = 3.01603 # Mass of helium-3, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "MD = (2*M_D - M_He - mn) # Mass defect of the reaction, amu\n", + "Q = MD*mu # Energy balance of the nuclear reaction, MeV\n", + "print \"The energy balance of the nuclear reaction = %4.2f MeV\"% Q " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy balance of the nuclear reaction = 3.26 MeV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2: : Pg:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold energy for the reaction\n", + "mu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "mx = 1.008665 # Mass of neutron, amu\n", + "Mx = 13.003355 # Mass of carbon atom, amu\n", + "M_alpha = 4.002603 # Mass of alpha particle, amu\n", + "M_Be = 10.013534 # Mass of beryllium, amu\n", + "MD = (Mx + mx - M_Be - M_alpha) # Mass defect of the reaction, amu\n", + "Q = MD*mu # Q-value of the nuclear reaction, MeV\n", + "E_th = -Q*(1 + mx/Mx) # Threshold energy for the reaction in the laboratory, MeV\n", + "print \"The threshold energy of the reaction is = %4.2f MeV\"% E_th " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold energy of the reaction is = 4.13 MeV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.3 : : Pg: 229 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Gamma ray emission\n", + "h_bar = 1.0e-034 # Order of reduced Planck's constant, Js\n", + "e = 1.0e-019 # Order of energy equivalent of 1 eV, J/eV\n", + "tau1 = 1e-009 # Life time of gamma ray emission, sec\n", + "tau2 = 1e-012 # Life time of gamma ray emission, sec \n", + "W1 = h_bar/tau1 # Full width at half maxima for tau1, eV\n", + "W2 = h_bar/tau2 # Full width at half maxima for tau2, eV\n", + "print \"The full width at half maxima for %1.0e = %1.0e eV\"%(tau1, W1/e) \n", + "print \"The full width at half maxima for %1.0e = %1.0e eV\"%(tau2, W2/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The full width at half maxima for 1e-09 = 1e-06 eV\n", + "The full width at half maxima for 1e-12 = 1e-03 eV\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..92a220e2 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch11_1.ipynb @@ -0,0 +1,129 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 11 : Nuclear Reactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.1 : : Pg: 229 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy balance of a nuclear reaction\n", + "mu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "M_D = 2.0141 # Mass of deuterium atom, amu\n", + "M_He = 3.01603 # Mass of helium-3, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "MD = (2*M_D - M_He - mn) # Mass defect of the reaction, amu\n", + "Q = MD*mu # Energy balance of the nuclear reaction, MeV\n", + "print \"The energy balance of the nuclear reaction = %4.2f MeV\"% Q " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy balance of the nuclear reaction = 3.26 MeV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2: : Pg:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold energy for the reaction\n", + "mu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "mx = 1.008665 # Mass of neutron, amu\n", + "Mx = 13.003355 # Mass of carbon atom, amu\n", + "M_alpha = 4.002603 # Mass of alpha particle, amu\n", + "M_Be = 10.013534 # Mass of beryllium, amu\n", + "MD = (Mx + mx - M_Be - M_alpha) # Mass defect of the reaction, amu\n", + "Q = MD*mu # Q-value of the nuclear reaction, MeV\n", + "E_th = -Q*(1 + mx/Mx) # Threshold energy for the reaction in the laboratory, MeV\n", + "print \"The threshold energy of the reaction is = %4.2f MeV\"% E_th " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold energy of the reaction is = 4.13 MeV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.3 : : Pg: 229 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Gamma ray emission\n", + "h_bar = 1.0e-034 # Order of reduced Planck's constant, Js\n", + "e = 1.0e-019 # Order of energy equivalent of 1 eV, J/eV\n", + "tau1 = 1e-009 # Life time of gamma ray emission, sec\n", + "tau2 = 1e-012 # Life time of gamma ray emission, sec \n", + "W1 = h_bar/tau1 # Full width at half maxima for tau1, eV\n", + "W2 = h_bar/tau2 # Full width at half maxima for tau2, eV\n", + "print \"The full width at half maxima for %1.0e = %1.0e eV\"%(tau1, W1/e) \n", + "print \"The full width at half maxima for %1.0e = %1.0e eV\"%(tau2, W2/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The full width at half maxima for 1e-09 = 1e-06 eV\n", + "The full width at half maxima for 1e-12 = 1e-03 eV\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12.ipynb new file mode 100755 index 00000000..275a08df --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12.ipynb @@ -0,0 +1,557 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 12 : Nuclear Models" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.1 : Pg:246 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of consumption of U-235 per year\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 1.6e-027 # Mass of a nucleon, kg\n", + "P_out = 250e+06 # Output power of nuclear reactor, J/s\n", + "E = 200e+06*e # Energy released per fission of U-235, J\n", + "n = P_out/E # Number of fissions per second\n", + "m = 235*amu # Mass of a nucleon, kg\n", + "m_sec = m*n # Consumption per second of U-235, kg\n", + "m_year = m_sec*365*24*60*60 # Consumption per year of U-235, kg\n", + "print \"The rate of consumption of U-235 per year = %5.2f kg\"% m_year " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of consumption of U-235 per year = 92.64 kg\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.2 : Pg:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of fission of U-235 \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "E1 = 32e+06 # Energy released per second, J\n", + "E2 = 200e+06 # Energy released per fission, J\n", + "N = E1/E2 # Number of atoms undergoing fission per second\n", + "print \"The number of atoms undergoing fission per second = %1.0e\"%(N/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of atoms undergoing fission per second = 1e+18\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.3 : Pg: 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy of helium nucleus \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "m = 2*1.007825+2*1.008665-4.002603 # Mass difference in formation of He, amu\n", + "E = m*amu # Energy equivalent of mass difference for He nucleus, MeV\n", + "print \"The minimum energy required to break He nucleus = %5.2f MeV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum energy required to break He nucleus = 28.28 MeV\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.4 : PG: 247 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fusion of deuterium nuclei\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "M_H = 2.014102 # Mass of hydrogen nucleus, amu\n", + "M_He = 4.002603 # Mass of helium nucleus, amu\n", + "m = 2*M_H-M_He # Mass difference, amu\n", + "E = m*amu # Energy released during fusion of deuterium nuclei, MeV\n", + "print \"The energy released during fusion of deuterium nuclei = %6.3f MeV\"%E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released during fusion of deuterium nuclei = 23.847 MeV\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.5 : Pg: 247 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy required to break one gram mole of helium\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "mp = 1.007825 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "M_He = 4.002603 # Mass of helium nucleus, amu\n", + "N = 6.023e+023 # Avogadro's number, g/mol\n", + "m = 2*mp+2*mn-M_He # Mass difference, amu\n", + "E1 = m*amu # Energy required to break one atom of He, MeV\n", + "E = N*E1 # Energy required to break one gram mole of He, MeV\n", + "print \"The energy required to break one gram mole of He = %5.3e MeV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to break one gram mole of He = 1.704e+25 MeV\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.6 : Pg: 248 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy liberated during production of alpha particles\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "mp = 1.007825 # Mass of proton, amu\n", + "M_Li = 7.016005 # Mass of lithium nucleus, amu\n", + "M_He = 4.002604 # Mass of helium nucleus, amu\n", + "dm = M_Li+mp-2*M_He # Mass difference, amu\n", + "U = dm*amu # Energy liberated during production of two alpha particles, MeV\n", + "print \"The energy liberated during production of two alpha particles = %5.2f MeV\"%U \n", + "# Result \n", + "# The energy liberated during production of two alpha particles = 17.34 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy liberated during production of two alpha particles = 17.34 MeV\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.7 : Pg: 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of neutrons \n", + "d = 2.2 # Binding energy of deuterium, MeV\n", + "H3 = 8.5 # Binding energy of tritium, MeV\n", + "He4 = 28.3 # Binding energy of helium, MeV\n", + "KE = He4-d-H3 # Kinetic energy of the neutron, MeV\n", + "print \"The kinetic energy of the neutron = %4.1f MeV\"% KE " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of the neutron = 17.6 MeV\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.8 : Pg: 248 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Consumption rate of U-235\n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "P = 100e+06 # Average power generation, J/s\n", + "U = P*365*24*60*60 # Energy required in one year, J\n", + "U1 = 180e+06*e # Energy produced by one atom fission of U-235\n", + "n = U/U1 # Number of atoms required to produce energy in one year\n", + "M = n*235/N # Mass of U-235 required per year, kg\n", + "print \"The rate of consumption of U-235 per year = %7.4f kg\"% M " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of consumption of U-235 per year = 42.7237 kg\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.9 : Pg: 249 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum disintegraton energy of nucleus\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "mp = 1.007276 # Mass of proton, amu\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "BE = 2.21 # Binding energy of deutron nucleus, MeV\n", + "E = BE/amu # Binding energy of deutron nucleus, amu\n", + "M_D = mp+mn-E # Mass of deuterium nucleus, amu\n", + "print \"The mass of deuterium nucleus = %8.6f amu\"% M_D " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of deuterium nucleus = 2.013567 amu\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.10 : Pg: 249 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of fission of U-235 \n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "P = 1 # Average power generation, J/s\n", + "U = P*365*24*60*60 # Energy required in one year, J\n", + "U1 = 200e+06*e # Energy produced by one atom fission of U-235\n", + "n = U/U1 # Number of atoms undergoing fission per year\n", + "M = n/N # Mass of U-235 required per year, kg\n", + "print \"The rate of fission of U-235 per year = %5.3e kg\"% M " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of fission of U-235 per year = 1.636e-09 kg\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.11 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fission of U-235 \n", + "N = 6.023e+023 # Avogadro's number\n", + "A = 235 # Mass number of U-235\n", + "n = N/235 # Number of atoms in 1g of U-235\n", + "E = 200 # Energy produced by fission of 1 U-235 atom, MeV\n", + "U = n*E # Energy produced by fission of 1g of U-235 atoms, MeV\n", + "print \"The energy produced by fission of 1g of U-235 atoms = %5.3e MeV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy produced by fission of 1g of U-235 atoms = 5.126e+23 MeV\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.12 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum energy of gamma photon for pair production \n", + "c = 3.0e+08 # Speed of light, m/s\n", + "me = 9.1e-031 # Mass of electron, kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "mp = me # Mass of positron, kg\n", + "U = (me+mp)*c**2/(e*1e+06) # Energy of gamma-ray photon, MeV\n", + "print \"The energy of gamma-ray photon = %5.3f MeV\"%U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of gamma-ray photon = 1.024 MeV\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.13 : Pg: 250 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "#Uranium atom undergoing fission in a reactor\n", + "P_out = 800e+06 # Output power of the reactor, J/s\n", + "E1 = P_out*24*60*60 # Energy required one day, J\n", + "eta = 0.25 # Efiiciency of reactor\n", + "N = symbols('N') # Declare N as the variable\n", + "E2 = N*200e+06*1.6e-019*eta # Useful energy produced by N atoms in a day, J\n", + "N=solve(E2-E1, N)[0] # Number of U-235 atoms consumed in one day\n", + "m = N*235/6.023e+026 # Mass of uranium consumption in one day, kg\n", + "print \"The number of U-235 atoms consumed in one day = %4.2e atoms\"% N \n", + "print \"The mass of uranium consumption in one day = %4.2f kg\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of U-235 atoms consumed in one day = 8.64e+24 atoms\n", + "The mass of uranium consumption in one day = 3.37 kg\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.14 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "#Amount of uranium fuel required for one day operation\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "eta = 0.20 # Efficiency of the nuclear reactor\n", + "E1 = 100e+06*24*60*60 # Average energy required per day, J\n", + "m = symbols('m') # Suppose amount of fuel required be m kg\n", + "n = m*6.023e+026/235 # Number of uranium atoms\n", + "E = 200e+06*e # Energy released per fission of U-235, J\n", + "U = E*n # Total energy released by fission of U-235, J\n", + "E2 = U*eta # Useful energy produced by n atoms in a day, J\n", + "m = solve(E2-E1)[0] \n", + "print \"The mass of uranium fuel required for one day operation = %6.4f kg/day\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of uranium fuel required for one day operation = 0.5267 kg/day\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.15 : Pg: 251 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Binding energy of Fe using Weizsaecker formula\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "A = 56 # Mass number of Fe\n", + "Z = 26 # Atomic number of Fe\n", + "av = 15.7 # Binding energy per nucleon due to volume effect, MeV\n", + "As = 17.8 # Surface energy constant, MeV\n", + "ac = 0.711 # Coulomb energy constant, MeV\n", + "aa = 23.7 # asymmetric energy constant, MeV\n", + "ap = 11.18 # Pairing energy constant, MeV\n", + "BE = av*A - As*A**(2/3) - ac*Z**2*A**(-1/3)-aa*(A-2*Z)**2*A**(-1)+ap*A**(-1/2) # Weizsaecker Semiempirical mass formula\n", + "M_Fe = 55.939395 # Atomic mass of Fe-56\n", + "mp = 1.007825 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "E_B = (Z*mp+(A-Z)*mn-M_Fe)*amu # Binding energy of Fe-56, MeV\n", + "print \"The binding energy of Fe-56 using Weizsaecker formula = %6.2f MeV\"% BE \n", + "print \"The binding energy of Fe-56 using mass defect = %6.2f MeV\"%E_B \n", + "print \"The result of the semi empirical formula agrees with the experimental value within %3.1f percent\"% abs((BE-E_B)/BE*100)\n", + "# Result\n", + "# The binding energy of Fe-56 using Weizsaecker formula = 487.75 MeV\n", + "# The binding energy of Fe-56 using mass defect = 488.11 MeV \n", + "# The result of the semi empirical formula agrees with the experimental value within 0.1 percent " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy of Fe-56 using Weizsaecker formula = 487.75 MeV\n", + "The binding energy of Fe-56 using mass defect = 488.11 MeV\n", + "The result of the semi empirical formula agrees with the experimental value within 0.1 percent\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..275a08df --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch12_1.ipynb @@ -0,0 +1,557 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 12 : Nuclear Models" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.1 : Pg:246 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of consumption of U-235 per year\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 1.6e-027 # Mass of a nucleon, kg\n", + "P_out = 250e+06 # Output power of nuclear reactor, J/s\n", + "E = 200e+06*e # Energy released per fission of U-235, J\n", + "n = P_out/E # Number of fissions per second\n", + "m = 235*amu # Mass of a nucleon, kg\n", + "m_sec = m*n # Consumption per second of U-235, kg\n", + "m_year = m_sec*365*24*60*60 # Consumption per year of U-235, kg\n", + "print \"The rate of consumption of U-235 per year = %5.2f kg\"% m_year " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of consumption of U-235 per year = 92.64 kg\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.2 : Pg:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of fission of U-235 \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "E1 = 32e+06 # Energy released per second, J\n", + "E2 = 200e+06 # Energy released per fission, J\n", + "N = E1/E2 # Number of atoms undergoing fission per second\n", + "print \"The number of atoms undergoing fission per second = %1.0e\"%(N/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of atoms undergoing fission per second = 1e+18\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.3 : Pg: 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Binding energy of helium nucleus \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "m = 2*1.007825+2*1.008665-4.002603 # Mass difference in formation of He, amu\n", + "E = m*amu # Energy equivalent of mass difference for He nucleus, MeV\n", + "print \"The minimum energy required to break He nucleus = %5.2f MeV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum energy required to break He nucleus = 28.28 MeV\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.4 : PG: 247 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fusion of deuterium nuclei\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "M_H = 2.014102 # Mass of hydrogen nucleus, amu\n", + "M_He = 4.002603 # Mass of helium nucleus, amu\n", + "m = 2*M_H-M_He # Mass difference, amu\n", + "E = m*amu # Energy released during fusion of deuterium nuclei, MeV\n", + "print \"The energy released during fusion of deuterium nuclei = %6.3f MeV\"%E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released during fusion of deuterium nuclei = 23.847 MeV\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.5 : Pg: 247 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy required to break one gram mole of helium\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "mp = 1.007825 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "M_He = 4.002603 # Mass of helium nucleus, amu\n", + "N = 6.023e+023 # Avogadro's number, g/mol\n", + "m = 2*mp+2*mn-M_He # Mass difference, amu\n", + "E1 = m*amu # Energy required to break one atom of He, MeV\n", + "E = N*E1 # Energy required to break one gram mole of He, MeV\n", + "print \"The energy required to break one gram mole of He = %5.3e MeV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to break one gram mole of He = 1.704e+25 MeV\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.6 : Pg: 248 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy liberated during production of alpha particles\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "mp = 1.007825 # Mass of proton, amu\n", + "M_Li = 7.016005 # Mass of lithium nucleus, amu\n", + "M_He = 4.002604 # Mass of helium nucleus, amu\n", + "dm = M_Li+mp-2*M_He # Mass difference, amu\n", + "U = dm*amu # Energy liberated during production of two alpha particles, MeV\n", + "print \"The energy liberated during production of two alpha particles = %5.2f MeV\"%U \n", + "# Result \n", + "# The energy liberated during production of two alpha particles = 17.34 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy liberated during production of two alpha particles = 17.34 MeV\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.7 : Pg: 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of neutrons \n", + "d = 2.2 # Binding energy of deuterium, MeV\n", + "H3 = 8.5 # Binding energy of tritium, MeV\n", + "He4 = 28.3 # Binding energy of helium, MeV\n", + "KE = He4-d-H3 # Kinetic energy of the neutron, MeV\n", + "print \"The kinetic energy of the neutron = %4.1f MeV\"% KE " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of the neutron = 17.6 MeV\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.8 : Pg: 248 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Consumption rate of U-235\n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "P = 100e+06 # Average power generation, J/s\n", + "U = P*365*24*60*60 # Energy required in one year, J\n", + "U1 = 180e+06*e # Energy produced by one atom fission of U-235\n", + "n = U/U1 # Number of atoms required to produce energy in one year\n", + "M = n*235/N # Mass of U-235 required per year, kg\n", + "print \"The rate of consumption of U-235 per year = %7.4f kg\"% M " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of consumption of U-235 per year = 42.7237 kg\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.9 : Pg: 249 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum disintegraton energy of nucleus\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "mp = 1.007276 # Mass of proton, amu\n", + "amu = 931 # Energy equivalent of 1 amu, MeV\n", + "BE = 2.21 # Binding energy of deutron nucleus, MeV\n", + "E = BE/amu # Binding energy of deutron nucleus, amu\n", + "M_D = mp+mn-E # Mass of deuterium nucleus, amu\n", + "print \"The mass of deuterium nucleus = %8.6f amu\"% M_D " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of deuterium nucleus = 2.013567 amu\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.10 : Pg: 249 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of fission of U-235 \n", + "N = 6.023e+026 # Avogadro's number, No. of atoms per kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "P = 1 # Average power generation, J/s\n", + "U = P*365*24*60*60 # Energy required in one year, J\n", + "U1 = 200e+06*e # Energy produced by one atom fission of U-235\n", + "n = U/U1 # Number of atoms undergoing fission per year\n", + "M = n/N # Mass of U-235 required per year, kg\n", + "print \"The rate of fission of U-235 per year = %5.3e kg\"% M " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of fission of U-235 per year = 1.636e-09 kg\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.11 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released during fission of U-235 \n", + "N = 6.023e+023 # Avogadro's number\n", + "A = 235 # Mass number of U-235\n", + "n = N/235 # Number of atoms in 1g of U-235\n", + "E = 200 # Energy produced by fission of 1 U-235 atom, MeV\n", + "U = n*E # Energy produced by fission of 1g of U-235 atoms, MeV\n", + "print \"The energy produced by fission of 1g of U-235 atoms = %5.3e MeV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy produced by fission of 1g of U-235 atoms = 5.126e+23 MeV\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.12 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum energy of gamma photon for pair production \n", + "c = 3.0e+08 # Speed of light, m/s\n", + "me = 9.1e-031 # Mass of electron, kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "mp = me # Mass of positron, kg\n", + "U = (me+mp)*c**2/(e*1e+06) # Energy of gamma-ray photon, MeV\n", + "print \"The energy of gamma-ray photon = %5.3f MeV\"%U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of gamma-ray photon = 1.024 MeV\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.13 : Pg: 250 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "#Uranium atom undergoing fission in a reactor\n", + "P_out = 800e+06 # Output power of the reactor, J/s\n", + "E1 = P_out*24*60*60 # Energy required one day, J\n", + "eta = 0.25 # Efiiciency of reactor\n", + "N = symbols('N') # Declare N as the variable\n", + "E2 = N*200e+06*1.6e-019*eta # Useful energy produced by N atoms in a day, J\n", + "N=solve(E2-E1, N)[0] # Number of U-235 atoms consumed in one day\n", + "m = N*235/6.023e+026 # Mass of uranium consumption in one day, kg\n", + "print \"The number of U-235 atoms consumed in one day = %4.2e atoms\"% N \n", + "print \"The mass of uranium consumption in one day = %4.2f kg\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of U-235 atoms consumed in one day = 8.64e+24 atoms\n", + "The mass of uranium consumption in one day = 3.37 kg\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.14 : Pg: 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "#Amount of uranium fuel required for one day operation\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "eta = 0.20 # Efficiency of the nuclear reactor\n", + "E1 = 100e+06*24*60*60 # Average energy required per day, J\n", + "m = symbols('m') # Suppose amount of fuel required be m kg\n", + "n = m*6.023e+026/235 # Number of uranium atoms\n", + "E = 200e+06*e # Energy released per fission of U-235, J\n", + "U = E*n # Total energy released by fission of U-235, J\n", + "E2 = U*eta # Useful energy produced by n atoms in a day, J\n", + "m = solve(E2-E1)[0] \n", + "print \"The mass of uranium fuel required for one day operation = %6.4f kg/day\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of uranium fuel required for one day operation = 0.5267 kg/day\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.15 : Pg: 251 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Binding energy of Fe using Weizsaecker formula\n", + "amu = 931.5 # Energy equivalent of 1 amu, MeV\n", + "A = 56 # Mass number of Fe\n", + "Z = 26 # Atomic number of Fe\n", + "av = 15.7 # Binding energy per nucleon due to volume effect, MeV\n", + "As = 17.8 # Surface energy constant, MeV\n", + "ac = 0.711 # Coulomb energy constant, MeV\n", + "aa = 23.7 # asymmetric energy constant, MeV\n", + "ap = 11.18 # Pairing energy constant, MeV\n", + "BE = av*A - As*A**(2/3) - ac*Z**2*A**(-1/3)-aa*(A-2*Z)**2*A**(-1)+ap*A**(-1/2) # Weizsaecker Semiempirical mass formula\n", + "M_Fe = 55.939395 # Atomic mass of Fe-56\n", + "mp = 1.007825 # Mass of proton, amu\n", + "mn = 1.008665 # Mass of neutron, amu\n", + "E_B = (Z*mp+(A-Z)*mn-M_Fe)*amu # Binding energy of Fe-56, MeV\n", + "print \"The binding energy of Fe-56 using Weizsaecker formula = %6.2f MeV\"% BE \n", + "print \"The binding energy of Fe-56 using mass defect = %6.2f MeV\"%E_B \n", + "print \"The result of the semi empirical formula agrees with the experimental value within %3.1f percent\"% abs((BE-E_B)/BE*100)\n", + "# Result\n", + "# The binding energy of Fe-56 using Weizsaecker formula = 487.75 MeV\n", + "# The binding energy of Fe-56 using mass defect = 488.11 MeV \n", + "# The result of the semi empirical formula agrees with the experimental value within 0.1 percent " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy of Fe-56 using Weizsaecker formula = 487.75 MeV\n", + "The binding energy of Fe-56 using mass defect = 488.11 MeV\n", + "The result of the semi empirical formula agrees with the experimental value within 0.1 percent\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..e0ac0133 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch1_1.ipynb @@ -0,0 +1,916 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 01 : Relativity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1 : Pg:20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative Speed of approach\n", + "c = 1 # For the sake of simplicity, assume c = 1, m/s\n", + "u = 0.87*c # Velocity of approach of spaceship A towards spaceship B, m/s\n", + "v = -0.63*c # Velocity of approach of spaceship B towards spaceship A, m/s\n", + "V = (u - v)/(1 - (u*v)/c**2) # Velocity Addition Rule giving relative speed of approach of particles, m/s\n", + "print \"The relative speed of approach of particles = %6.4fc\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of approach of particles = 0.9689c\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2 : Pg: 20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative Speed of spaceships\n", + "c = 1 # For the sake of simplicity, assume c = 1, m/s\n", + "u = 0.9*c # Velocity of approach of spaceship A towards spaceship B, m/s\n", + "v = -0.9*c # Velocity of approach of spaceship B towards spaceship A, m/s\n", + "V = (u - v)/(1 - (u*v)/c**2) # Velocity Addition Rule giving relative speed of approach of spaceships, m/s\n", + "print \"The relative speed of B w.r.t. A = %5.3fc\"% V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of B w.r.t. A = 0.994c\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3 : Pg: 20 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relativistic length contraction\n", + "L0 = 1.0 # Actual length of the metre stick, m\n", + "rel_mass = 3.0/2 # Relative mass of stick w.r.t. rest its mass\n", + "# As m = m0/sqrt(1 - (v/c)**2) and L = L0*sqrt(1 - (v/c)**2)\n", + "# Thus L/m = (L0/m0)*(1 - (v/c)**2), solving for L\n", + "# L = (m0/m)*L0 i.e.\n", + "L = 1/rel_mass*L0 # Apparent length of the metre rod, m\n", + "print \"The apparent length of the metre rod = %5.3f m\" %L\n", + "# Result \n", + "# The apparent length of the metre rod = 0.667 m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The apparent length of the metre rod = 0.667 m\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5 : Pg: 22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mass-Energy Equivalence\n", + "U = 7.5e+011 # Total electrical energy generated in a country, kWh\n", + "kWh = 1000*3600 # Conversion factor for kilowatt-hour into joule, J/kWh\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = (U*kWh)/c**2 # Mass equivalent of energy, kg\n", + "print \"The mass converted into energy = %2d kg\" % m\n", + "# Result \n", + "# The mass converted into energy = 30 kg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass converted into energy = 30 kg\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6 : Pg:22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy equivalent of mass\n", + "m = 1 # Mass of a substance, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "U = m*c**2 # Energy equivalent of mass, J\n", + "print \"The energy equivalent of mass = %1.0e J\"% U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy equivalent of mass = 9e+16 J\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7 : Pg: 22 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Relativistic variation of mass with speed\n", + "m0 = 1e-024 # Mass of a particle, kg\n", + "v = 1.8e+08 # Speed of the particle, m/s\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = m0/sqrt(1-(v/c)**2) # Mass of the moving particle, kg\n", + "print \"The mass of moving particle = %4.2e kg\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of moving particle = 1.25e-24 kg\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.8 : Pg: 23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Increase in mass of water\n", + "c = 3e+08 # Speed of light, m/s\n", + "T1 = 273 # Initial temperature of water, K\n", + "T2 = 373 # Final temperature of water, K\n", + "M = 1e+06 # Mass of water, kg\n", + "C = 1e+03 # Specific heat of water, cal/kg-K\n", + "J = 4.18 # Joule's mechanical equivalent of heat, cal/joule\n", + "U = M*C*(T2 - T1)*J # Increase in energy of water, J\n", + "m = U/c**2 # Increase in mass of water, kg\n", + "print \"The increase in mass of water = %4.2e kg\"% m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in mass of water = 4.64e-06 kg\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9 : Pg:23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Ratio of rest mass and mass in motion\n", + "c = 1 # For convenience, speed of light is assumed to be unity, m/s\n", + "v = 0.5*c # Velocity of moving particle, m/s\n", + "# As m0 = m*sqrt(1 - (v/c)**2), and m0/m = rel_mass, we have\n", + "rel_mass = sqrt(1 - (v/c)**2) # Ratio of rest mass and the moving mass\n", + "print \"The ratio of rest mass and the mass in motion = %6.4f kg\"% rel_mass\n", + "# Result \n", + "# The ratio of rest mass and the mass in motion = 0.8660 kg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of rest mass and the mass in motion = 0.8660 kg\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.10 : Pg:23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Heat equivalent of mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "J = 4.18 # Joule's equivalent of heat, joule per calorie\n", + "m = 4.18e-03 # Mass of the substance, kg\n", + "U = m*c**2 # Energy equivalent of mass, J\n", + "Q = U/J # Heat equivalent of mass, calorie\n", + "print \"The heat equivalent of mass = %1.0e cal\"% Q\n", + "# Result \n", + "# The heat equivalent of mass = 9e+013 cal" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat equivalent of mass = 9e+13 cal\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.11 : Pg: 23 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Variation of space and time\n", + "L = 0.5 # Shortened length of the rod, m\n", + "L0 = 1 # Actual length of the rod, m\n", + "t0 = 1 # Actual time on the spaceship, s\n", + "c = 3e+08 # Speed of light, m/s\n", + "v = sqrt(1 - (L/L0)**2)*c # Speed of the spaceship, m/s\n", + "t = t0/sqrt(1 - (v/c)**2) # Dilated time for stationary observer, s\n", + "print \"The speed of light = %5.3e m/s\"% v\n", + "print \"The time dilation corresponding to 1 s on the spaceship = %d s\"% round(t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of light = 2.598e+08 m/s\n", + "The time dilation corresponding to 1 s on the spaceship = 2 s\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.12 : Pg: 24 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mean lifetime of a moving meason\n", + "c = 1 # For convenience, speed of light is assumed to be unity\n", + "t0 = 2e-08 # Mean life time of pi-meson at rest, s\n", + "v = 0.8*c # Velocity of moving pi-meason, m/s\n", + "t = t0/sqrt(1-(v/c)**2) # Mean lifetime of moving pi-meason, s\n", + "print \"The mean lifetime of moving meason = %4.2e s\"% t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean lifetime of moving meason = 3.33e-08 s\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.13 : Pg: 24 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Velocity of one atomic mass unit\n", + "c = 1.0 # For convenience, speed of light is assumed to be unity, m/s\n", + "m0 = 1.0 # For convenience, rest mass is assumed to be unity\n", + "# Here 2*m0*c**2 = m*c**2 - m0*c**2 = KE which gives\n", + "m = 3*m0 # Atomic mass in motion, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of one atomic mass, m/s \n", + "print \"The velocity of one atomic mass = %5.3fc\"% v\n", + "# Result \n", + "# The velocity of one atomic mass = 0.943c " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of one atomic mass = 0.943c\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14 : Pg: 25 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Speed of an electron for an equivalent proton mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "m0 = 1 # For convenience, rest mass of an electron is assumed to be unity\n", + "m = 2000*m0 # Rest mass of a proton, units\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Speed of the moving electron, m/s \n", + "print \"The speed of the moving electron = %4.2e m/s (approx.)\"% v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the moving electron = 3.00e+08 m/s (approx.)\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15 : Pg: 25 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Speed at total energy twice the rest mass energy\n", + "c = 1 # Speed of light is assumed to be unity, m/s\n", + "m0 = 1.0 # For convenience, rest mass of the particle is assumed to be unity, kg\n", + "m = 2*m0 # Mass of the moving particle when m*c**2 = 2*m0*c**2, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), solving for v\n", + "v = sqrt(1 - (m0/m)**2)*c # Speed of the moving particle, m/s \n", + "print \"The speed of the moving particle = %5.3fc\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the moving particle = 0.866c\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.16 : Pg:26 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relative velocity and mass\n", + "c = 3e+08 # Speed of light, m/s\n", + "u = 2e+08 # Speed of first particle, m/s\n", + "v = -2e+08 # Speed of second particle, m/s\n", + "u_prime = (u - v)/(1 - u*v/c**2) # Velocity addition rule giving relative velocity, m/s\n", + "m0 = 3e-025 # Rest mass of each particle, kg\n", + "m = m0/sqrt(1 - (u_prime/c)**2) # Mass of one particle relative to the other, kg\n", + "print \"The relative speed of one particle w.r.t the other = %5.3e m/s\"% u_prime\n", + "print \"The mass of one particle relative to the other = %3.1e kg\"% m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative speed of one particle w.r.t the other = 2.769e+08 m/s\n", + "The mass of one particle relative to the other = 7.8e-25 kg\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.17 : Pg: 26 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Relativistic variation of density with velocity\n", + "c = 1 # Speed of light is assumed to be unity for convenience, m/s\n", + "v = 0.9*c # Speed of moving frame, m/s\n", + "rho_0 = 19.3e+03 # Density of gold in rest frame, kg metre per cube\n", + "L0 = 1 # Actual length is assumed to be unity, m\n", + "m0 = 1 # Rest mass of gold is assumed to be unity, kg\n", + "V0 = m0/rho_0 # Volume of gold in rest frame, metre cube\n", + "L = L0*sqrt(1 - (v/c)**2) # Relativistic Length Contraction Formula, m\n", + "y = 1 # Width of gold block is assumed to be unity, m\n", + "z = 1 # Height of gold block is assumed to be unity, m\n", + "V = L*y*z*V0 # Volume of gold as observed from moving frame, metre cube\n", + "m = m0/sqrt(1 - (v/c)**2) # Mass of gold as observed from moving frame, kg\n", + "rho = m/V # Density of gold as observed from moving frame, kg per metre cube\n", + "print \"The density of gold as observed from moving frame = %5.1fe+003 kg per metre cube\"% (rho/1e+03)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of gold as observed from moving frame = 101.6e+003 kg per metre cube\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.18 : Pg: 27 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Electrons accelerated to relativistic speeds\n", + "U = 1.0e+09*1.6e-019 # Kinetic energy of the electrons, J\n", + "# As U = m*c**2, solving for m\n", + "m = U/c**2 # Mass of moving electrons, kg\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "mass_ratio = m/m0 # Ratio of a moving electron mass to its rest mass \n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "vel_ratio = v/c # Ratio of electron velocity to the velocity of light\n", + "U0 = m0*c**2 # Rest mass energy of electron, J\n", + "ene_ratio = U/U0 # Ratio of electron energy to its rest mass energy\n", + "print \"The ratio of a moving electron mass to its rest mass %4.2e\" %(mass_ratio) \n", + "print \"The ratio of electron velocity to the velocity of light = 1 - %5.3e\" %((1-vel_ratio**2)/2) \n", + "print \"The ratio of electron energy to its rest mass energy = %5.3e\"%(ene_ratio) \n", + "# Result \n", + "# The ratio of a moving electron mass to its rest mass 1.95e+003\n", + "# The ratio of electron velocity to the velocity of light = 1 - 1.310e-007\n", + "# The ratio of electron energy to its rest mass energy = 1.954e+003 \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of a moving electron mass to its rest mass 1.76e+20\n", + "The ratio of electron velocity to the velocity of light = 1 - 0.000e+00\n", + "The ratio of electron energy to its rest mass energy = 1.954e+03\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.19 : Pg: 28 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Electron speed equivalent of twice its rest mass\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "m = 2*m0 # Mass of moving electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.20 : Pg: 28 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Electron speed equivalent of twice its rest mass\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "m = 2*m0 # Mass of moving electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron so that its mass becomes twice its rest mass = %5.3e m/s\"%v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron so that its mass becomes twice its rest mass = 2.598e+08 m/s\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.21 : Pg:29 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Fractional speed of electron\n", + "m0 = 9.1e-031 # Rest mass of an electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "E = 0.5*1e+06*1.6e-019 # Kinetic energy of electron, J\n", + "# As E = (m - m0)*c**2, solving for m\n", + "m = E/c**2+m0 # Mass of moving electron, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The speed of electron relative to speed of light = %5.3f\"%(v/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of electron relative to speed of light = 0.863\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.22 : Pg: 29 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Effective mass and speed of electron\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Electron-volt equivalent of 1 joule, eV/joule\n", + "U = 2*1e+06*e # Total energy of electron, J\n", + "# As E = (m - m0)*c**2, solving for m\n", + "m = U/c**2 # Effective mass of electron, kg\n", + "m0 = 0.511*1e+06*e/c**2 # Rest mass of the electron, kg\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Velocity of moving electron, m/s\n", + "print \"The effective mass of electron = %4.1e kg\"% m \n", + "print \"The relativistic speed of electron = %4.2fc m\"% (v/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effective mass of electron = 3.6e-30 kg\n", + "The relativistic speed of electron = 0.97c m\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.23 : Pg: 30 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy released in fission\n", + "c = 3.0e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "r0 = 1.2e-015 # Equilibrium nuclear radius, m\n", + "A = 238.0 # Twice the mass of each fragment\n", + "q1 = 46.0*e # Charge on first fragment, coulomb\n", + "q2 = 46.0*e # Charge on second fragment, coulomb\n", + "R = r0*(A/2)**(1.0/3) \n", + "d = 2*R # Distance between two fragments, m\n", + "U = q1*q2*9e+09/d # Energy released in fission, J\n", + "print \"The energy released in fission of U(92,238) = %3d MeV\"%(U/(e*1e+06)) \n", + "# Result \n", + "# The energy released in fission of U(92,238) = 258 MeV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released in fission of U(92,238) = 258 MeV\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.24 : Pg: 30 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Relativistic speed form relativistic mass\n", + "c = 3e+08 # Speed of light, m/s \n", + "m0 = 1.0/2 # Rest mass of the particle, MeV/c**2\n", + "m = 1/sqrt(2) # Relativistic mass of the particle, MeV/c**2\n", + "# As m = m0/sqrt(1 - (v/c)**2), Relativistic mass of electron, kg, solving for v, we have\n", + "v = sqrt(1 - (m0/m)**2)*c # Relativistic velocity of particle, m/s\n", + "print \"The relativistic velocity of particle = %4.2e m/s\"%(v) \n", + "# Result \n", + "# The relativistic velocity of particle = 2.12e+008 m/s " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relativistic velocity of particle = 2.12e+08 m/s\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.25 : Pg: 31 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Decay of muon\n", + "c = 3e+08 # Speed of light, m/s \n", + "v = 0.992*c # Relativistic speed of muon, m/s\n", + "S = 60*1e+03 # Distance travelled by muon before it decays, m\n", + "t_prime = S/v # Time measured by observer on earth (Dilated Time), s\n", + "t = t_prime*sqrt(1 - (v/c)**2) # Time measured by muon in its own frame, s \n", + "s = v*t # Distance covered by the muon in its own frame of reference, m \n", + "print \"The time measured by observer on earth (Dilated Time) = %5.3e s\"% t_prime\n", + "print \"The time measured by muon in its own frame = %4.2e s\"% t \n", + "print \"The distance covered by the muon in its own frame of reference = %4.2f km\"%(s/1e+03) \n", + "# Result \n", + "# The time measured by observer on earth (Dilated Time) = 2.016e-004 s\n", + "# The time measured by muon in its own frame = 2.55e-005 s\n", + "# The distance covered by the muon in its own frame of reference = 7.57 km " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time measured by observer on earth (Dilated Time) = 2.016e-04 s\n", + "The time measured by muon in its own frame = 2.55e-05 s\n", + "The distance covered by the muon in its own frame of reference = 7.57 km\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.26 : Pg: 31 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Decay of unstable particlec = 3e+08 # Speed of light, m/s \n", + "v = 0.9*c # Relativistic speed of unstable particle, m/s\n", + "t0 = 1e-06 # Time of decay of unstable particle in rest frame, s\n", + "t = t0/sqrt(1 - (v/c)**2) #Time of decay of unstable particle in moving frame, s \n", + "s = v*t # Distance travelled by unstable particle before it decays in moving frame, m \n", + "print \"The distance travelled before the unstable particle decays = %4.2e m\"% s\n", + "# Result \n", + "# The distance travelled before the unstable particle decays = 6.19e+002 m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled before the unstable particle decays = 6.19e+02 m\n" + ] + } + ], + "prompt_number": 71 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2.ipynb new file mode 100755 index 00000000..f162d031 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2.ipynb @@ -0,0 +1,1185 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 02 : Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1 : Pg:4 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold wavelength of tungsten\n", + "phi = 4.5*1.6e-019 # Work function for tungesten, joule\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As phi = h*c/L0, solving for L0\n", + "L0 = h*c/phi # Threshold wavelength of tungesten, m\n", + "print \"The threshold wavelength of tungesten = %4d angstrom\"% (L0/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold wavelength of tungesten = 2750 angstrom\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2 : Pg:44 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Maximum velocity of photoelectrons\n", + "phi = 4*1.6e-019 # Work function for photoelectric surface, joule\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "e = 1.6e-019 # Electronic charge, coulomb\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "f = 1e+15 # Frequency of incident photons, Hz\n", + "c = 3e+08 # Speed of light, m/s\n", + "# KE = 1/2*m*v**2 = h*f - phi, solving for v, we have\n", + "v = sqrt(2*(h*f - phi)/m) # Maximum velocity of photoelectrons, m/s\n", + "print \"The maximum velocity of photoelectrons = %5.3e m/s\" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum velocity of photoelectrons = 2.097e+05 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3 : Pg:45 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of photoelectrons\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 joule, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Energy of photoelectrons emitted from tungsten, joule\n", + "print \"The energy of photoelectrons emitted from tungsten = %3.1f eV\"%(E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of photoelectrons emitted from tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4 : Pg:45 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Longest wavelength of incident radiation\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi = 6*e # Work function of metal, joule\n", + "f0 = phi/h # Threshold frequency for metal surface, Hz\n", + "L0 = c/f0 # Threshold (Longest) wavelength for metal, m\n", + "print \"The longest wavelength of incident radiation = %4d angstrom\"%(L0/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longest wavelength of incident radiation = 2070 angstrom\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5 : Pg:46 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold frequency and wavelength\n", + "h = 6.62e-034 # Planck's constant, Js\n", + "phi = 3.31e-019 # Work function of metal, joule\n", + "c = 3e+08 # Speed of light, m/s\n", + "f0 = phi/h # Threshold frequency for metal surface, Hz\n", + "L0 = c/f0 # Threshold wavelength for metal, m\n", + "print \"The threshold frequency for metal = %1.0e Hz\"% f0 \n", + "print \"The threshold wavelength for metal = %4d angstrom\"% round(L0/1e-10)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold frequency for metal = 5e+14 Hz\n", + "The threshold wavelength for metal = 6000 angstrom\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6 : Pg:46 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Maximum velocity of emitted electrons\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 4300e-010 # Wavelength of incident light, m\n", + "phi = 5*e # Work function of nickel surface, joule\n", + "f0 = phi/h # Threshold frequency for nickel, Hz\n", + "L0 = c/f0 # Threshold wavelength for nickel, m\n", + "print \"The threshold wavelength for nickel = %4d angstrom\"% (L0/1e-10) \n", + "print \"Since %4d A < %4d A, the electrons will not be emitted.\"% (L0/1e-010, L/1e-010) \n", + "phi = 2.83*e # Work function of potassium surface, joule\n", + "f0 = phi/h # Threshold frequency for potassium, Hz\n", + "L0 = c/f0 # Threshold wavelength for potassium, m\n", + "print \"The threshold wavelength for potassium = %4d angstrom\"%(L0/1e-10) \n", + "print \"Since %4d A > %4d A, the electrons will be emitted.\"%(L0/1e-010, L/1e-010) \n", + "# Now KE = 1/2*m*v0**2 = h*f - h*f0, where v0 is the maximum velocity \n", + "# solving for v0, we have\n", + "v0 = sqrt(2*h*c/m*(1/L - 1/L0)) # Maximum velocity of photoelectrons, m/s\n", + "print \"The maximum velocity of photoelectrons = %5.3e m/s\"% v0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold wavelength for nickel = 2484 angstrom\n", + "Since 2484 A < 4300 A, the electrons will not be emitted.\n", + "The threshold wavelength for potassium = 4388 angstrom\n", + "Since 4388 A > 4300 A, the electrons will be emitted.\n", + "The maximum velocity of photoelectrons = 1.433e+05 m/s\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7 : Pg:47 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum energy of ejected electrons\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 2537e-010 # Wavelength of incident light, m\n", + "L0 = 3250e-010 # Threshold wavelength of silver, m\n", + "# As U = h*(f - f0), the kinetic energy of ejected electrons\n", + "U = h*c*(1/L - 1/L0) # Maximum energy of ejected electrons, J\n", + "print \"The maximum energy of ejected electrons = %5.3e J\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy of ejected electrons = 1.712e-19 J\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.8 : Pg:47 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum kinetic energy and stopping potential of ejected electrons\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi_0 = 1.51*e # Work function of the metal surface, J \n", + "L = 4000e-010 # Wavelength of incident light, m\n", + "f = c/L # Frequency of incident light, Hz\n", + "U = h*f - phi_0 # Maximum kinetic energy of ejected electrons, J\n", + "V = U/e # Stopping potential for ejected electrons, volt\n", + "print \"The maximum energy of ejected electrons = %5.3f eV\"%(U/e) \n", + "print \"The stopping potential of ejected electrons = %5.3f V\"%(V) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy of ejected electrons = 1.595 eV\n", + "The stopping potential of ejected electrons = 1.595 V\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.9 : Pg:48 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Work function of metal\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "V = 1 # Stopping potential for the electrons emitted from the metal, V\n", + "L = 2500e-010 # Wavelength of incident light, m\n", + "f = c/L # Frequency of incident light, Hz\n", + "# Now KE = h*f - phi = e*V, Einstein's Photoelectric equation, solving for phi\n", + "phi = h*f - e*V # Work function of metal\n", + "print \"The work function of metal = %5.3f eV\"% (phi/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work function of metal = 3.968 eV\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.10 : Pg:48 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons emitted from the surface of tungsten\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J\n", + "print \"The energy of electrons emitted from the surface of tungsten = %3.1f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons emitted from the surface of tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.11 : Pg:49 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of photon\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J\n", + "print \"The energy of electrons emitted from the surface of tungsten = %3.1f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons emitted from the surface of tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.12 : Pg:49 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Velocity of the emitted electron\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi = 2.3*e # Work function of metal, J\n", + "L = 4300e-010 # Wavelength of incident light, m\n", + "# As 1/2*m*v**2 = h*f - phi = h*c/L - phi, Einstein's photoelectric equation\n", + "# Solving for v\n", + "v = sqrt(2*(h*c/L - phi)/m) # Velocity of emitted electron, m/s\n", + "print \"The velocity of emitted electron = %4.2e eV\"% v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of emitted electron = 4.55e+05 eV\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.13 : Pg:50 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of a quantum of light\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 5.3e-07 # Wavelength of incident light, m\n", + "E = h*c/L # Energy of the incident light, J\n", + "print \"The energy of incident light = %4.2f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of incident light = 2.34 eV\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.14 : Pg:54 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ratio of masses of a proton and an electron\n", + "RH = 1.09678e+07 # Rydberg constant for hydrogen, per metre\n", + "RHe = 1.09722e+07 # Rydberg constant for helium, per metre\n", + "MH_m_ratio = (RH - 1.0/4*RHe)/(RHe - RH) # Ratio of mass of a proton to that of an electron\n", + "print \"The ratio of mass of a proton to that of an electron = %4d\" %MH_m_ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of mass of a proton to that of an electron = 1869\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.15 : Pg:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#First Bohr Orbit in hydrogen atoms \n", + "n = 1 # Principle quantum number of first orbit in H-atom\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 1 # Atomic number of hydrogen\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "r = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr's orbit, m\n", + "v = Z*e**2/(2*8.85e-012*h*n) # Velocity of electron in the first Bohr orbit, m/s\n", + "print \"The radius of first Bohr orbit = %5.3f angstrom\" %(r/1e-010) \n", + "print \"The velocity of electron in first Bohr orbit = (1/%3d)c\"%(1/v*c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 0.531 angstrom\n", + "The velocity of electron in first Bohr orbit = (1/137)c\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.16 : Pg:57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of Balmer H_beta lines\n", + "L_Hb = 6563e-010 # Wavelength of H_beta line, m\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L1 = 36/(5*R) # Wavenumber of H_alpha line, per metre\n", + "L2 = 16/(3*R) # Wavenumber of H_beta line, per metre\n", + "L_ratio = L2/L1 # Ratio of wavelengths of H_beta and H_alpha lines\n", + "L2 = L_ratio*L1 # Wavelength of Balmer H_beta line, m\n", + "print \"The wavelength of Balmer H_beta line = %4d angstrom\"%(L2/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of Balmer H_beta line = 4861 angstrom\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.17 : Pg: 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#First excitation energy of hydrogen atoms \n", + "n1 = 1.0 # Principle quantum number of first orbit in H-atom\n", + "n2 = 2.0 # Principle quantum number of second orbit in H-atom\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "U = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # First excitation energy of hydrogen atom, J\n", + "print \"The first excitation energy of hydrogen atom = %5.2f eV\"%(U/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first excitation energy of hydrogen atom = 10.17 eV\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.18 : Pg:58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy difference in the emission or absorption of sodium D1 lines\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 590e-09 # Wavelenght of sodium D1 line, m\n", + "E = h*c/L # Energy difference in the emission or absorption of sodium D1 line, J\n", + "print \"The energy difference in the emission or absorption of sodium D1 line = %4.2e J\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy difference in the emission or absorption of sodium D1 line = 3.37e-19 J\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.19 : Pg:58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of first line of Balmer series\n", + "n1 = 2.0 # Ground level of Balmer line in H-atom\n", + "n2 = 4.0 # Third level of Balmer line in H-atom\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L2 = 1.0/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of second line of Balmer series, m\n", + "n2 = 3 # Second level of Balmer line in H-atom\n", + "L1 = 1/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of first line of Balmer series, m\n", + "L_ratio = L1/L2 # Wavelength ratio of first and second line of Balmer series, m\n", + "L2 = 4861 # Given wavelength of second line of Balmer series, angstrom\n", + "L1 = L2*L_ratio # Wavelength of first line of Balmer series, angstrom\n", + "print \"The wavelength of first line of Balmer series = %4d angstrom\" %L1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of first line of Balmer series = 6562 angstrom\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.20 : Pg:59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum energy of the electrons in Balmer series \n", + "n1 = 2.0 # Ground level of Balmer line in H-atom\n", + "n2 = 3.0 # Second level of Balmer line in H-atom\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "E = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # Min energy required by electron to correspond to 1st wavenumber of Balmer series, J\n", + "print \"Minimum energy required by an electron to correspond to first wavenumber of Balmer series = %4.2f\"%(E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum energy required by an electron to correspond to first wavenumber of Balmer series = 1.88\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.21 : Pg:59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ionization potential of hydrogen atom \n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.626e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "phi = m*e**4/(8*epsilon_0**2*h**2) # Work function or ionization energy of hydrogen atom, J\n", + "print \"The ionization energy of hydrogen atom = %5.2f eV\"%(phi/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization energy of hydrogen atom = 13.55 eV\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.22 : Pg:60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of second number of Balmer series of hydrogen \n", + "n1 = 2.0 # Principle quantum number of second orbit in H-atom\n", + "n2 = 3.0 # Principle quantum number of third orbit in H-atom\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L1 = 1/((1/n1**2 - 1/n2**2)*R) # Wavelength of first Balmer line, m\n", + "n2 = 4.0 # Principle quantum number of third orbit in H-atom \n", + "L2 = 1/((1.0/n1**2 - 1/n2**2)*R) # Wavelength of second Balmer line, m\n", + "L_ratio = L2/L1 # Wavelength ratio of second and first line of Balmer series\n", + "L1 = 6563e-010 # Given wavelength of first line of Balmer series, m\n", + "L2 = L_ratio*L1 # Wavelength of second Balmer line, m\n", + "print \"The wavelength of second Balmer line = %4e m\"%(L2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of second Balmer line = 4.861481e-07 m\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.23 : Pg:60 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of emitted light\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "n = 2 # Principal quantum number for second orbit in H-atom\n", + "V = 13.6 # Ionization potential of H-atom, V\n", + "U1 = -1*V*e # Energy of electron in first orbit, J\n", + "U2 = U1/n**2 # Energy of electron in second orbit, J\n", + "# As U2 - U1 = h*c/L, solving for L\n", + "L = h*c/(U2 - U1) # Wavelength of light emitted in the transition from second orbit to the first orbit, m\n", + "print \"The wavelength of light emitted in the transition from second orbit to the first orbit = %4d angstrom\"%(L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of light emitted in the transition from second orbit to the first orbit = 1217 angstrom\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.24 : Pg:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Radius and speed of electron in the first Bohr orbit\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.626e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 1;n = 1 \n", + "r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit, m\n", + "v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_H) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_H) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 5.31e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 2.2e+06 m/s\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.25 : Pg:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Radius and velocity of electron for H and He\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "c = 3e+08 # Speed of light, m/s\n", + "Z = 1; n = 1 # Atomic number and principal quantum number of H-atom\n", + "r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit for H-atom, m\n", + "v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit of H-atom, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_H) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_H) \n", + "print \"The velocity of the electron in H-atom compared to the velocity of light = %4.2e\"%(v_H/c) \n", + "Z = 2 # Atomic number of He-atom\n", + "r_He = r_H/Z # Radius of first Bohr orbit for He-atom, m\n", + "v_He = 2*v_H # Velocity of the electron in the first Bohr orbit of He-atom, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_He) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_He) \n", + "print \"The velocity of the electron in He-atom compared to the velocity of light = %5.3e\"%(v_He/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 5.31e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 2.2e+06 m/s\n", + "The velocity of the electron in H-atom compared to the velocity of light = 7.28e-03\n", + "The radius of first Bohr orbit = 2.65e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 4.4e+06 m/s\n", + "The velocity of the electron in He-atom compared to the velocity of light = 1.456e-02\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.26 : Pg:62 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Difference in wavelength in the spectra of hydrogen and deuterium\n", + "R_H = 1.097e+07 # Rydberg constant for H-atom, per metre\n", + "M_H = 1.0 # Mass of H-atom, amu\n", + "M_D = 2*M_H # Mass of D-atom, amu\n", + "m = 0.000549*M_H # Mass of an electron, amu\n", + "R_D = R_H*(1+m/M_H)/(1+m/M_D) # Rydberg constant for D-atom, per metre\n", + "n1 = 2.0; n2 = 3.0 # Principal qunatum numbers for first line of Balmer series\n", + "L_H = 1/(R_H*(1/n1**2 - 1/n2**2)) # Wavelength of H-atom, m\n", + "L_D = 1/(R_D*(1/n1**2 - 1/n2**2)) # Wavelength of D-atom, m\n", + "delta_H = (L_H - L_D)/1e-010 # Difference in wavelength in the spectra of hydrogen and deuterium, angstrom\n", + "print \"The difference in wavelength in the spectra of hydrogen and deuterium = %3.1f angstrom\"% delta_H " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The difference in wavelength in the spectra of hydrogen and deuterium = 1.8 angstrom\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.27 : Pg:63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ionization energy of hydrogen atom with orbiting muon \n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "m1 = 200*m # Mass of muon, kg\n", + "phi1 = m1*e**4/(8*epsilon_0**2*h**2) # Ionization energy of H-atom with muon, J\n", + "print \"The ionization energy of hydrogen atom with orbiting muon = %4.2e eV\"%(phi1/1.6e-019) \n", + "# Result \n", + "# The ionization energy of hydrogen atom with orbiting muon = 2.71e+003 eV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization energy of hydrogen atom with orbiting muon = 2.71e+03 eV\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.28 : Pg:64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Photon emitted by hydrogen atom \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "E1 = -13.6 # Energy of electron in the first orbit of hydrogen atom, eV\n", + "n = 2 # Principal quantum number for second orbit\n", + "E2 = E1/n**2 # Energy of electron in the second orbit of hydrogen atom, eV\n", + "E = (E2 - E1)*e # Energy of photon emitted, joule\n", + "P = E/c # Momentum of photon, kg-m/s\n", + "L = (h/P)/1e-010 # de_Broglie wavelength of photon, angstrom\n", + "print \"The energy of photon emitted by hydrogen atom %5.2e J\"% E\n", + "print \"The momentum of photon = %4.2e kg-m/s\"% P \n", + "print \"The de_Broglie wavelength of photon = %4d angstrom\"% L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of photon emitted by hydrogen atom 1.63e-18 J\n", + "The momentum of photon = 5.44e-27 kg-m/s\n", + "The de_Broglie wavelength of photon = 1217 angstrom\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.29 : Pg:64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy required to create a vacancy in Cu \n", + "n = 1 # Principal quantum number of K shell\n", + "Z = 29 # Atomic number of copper\n", + "U = 13.6 # Ionization potential of hydrogen atom, eV\n", + "E1 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV\n", + "n = 2 # Principal quantum number of L shell\n", + "E2 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV\n", + "print \"The energy required to create a vacancy in K-shell of copper atom = %5.2e eV\"% E1 \n", + "print \"The energy required to create a vacancy in L-shell of copper atom = %5.2e eV\"% E2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to create a vacancy in K-shell of copper atom = 1.14e+04 eV\n", + "The energy required to create a vacancy in L-shell of copper atom = 2.86e+03 eV\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.30 : Pg:65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Excitation potential for mercury\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 2537e-010 # Wavelength of absorbed line of Hg, m\n", + "V = h*c/(e*L) # Excitation potential for Hg, v\n", + "print \"The excitation potential for Hg = %3.1f V\"% V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The excitation potential for Hg = 4.9 V\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.31 : Pg:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Atomic number of impurity in Zinc target \n", + "L1 = 1.43603e-010 # Wavelength of characteristic K_alpha line from Zn, m\n", + "Z1 = 30.0 # Atomic number of zinc\n", + "L2 = 0.53832e-010 # Wavelength of unknown line from Zn, m\n", + "# As (1/L1)/(1/L2) = (Z1/Z2)**2, solving for Z2\n", + "Z2 = Z1*(L1/L2)**(1.0/2) # Atomic number of impurity in Zn target\n", + "print \"The atomic number of impurity in Zn target = %2d\"% round(Z2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The atomic number of impurity in Zn target = 49\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.32 : Pg:65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mu-mesonic atom subjected to Bohr orbit\n", + "Z = 3 # Atomic number of Mu-mesonic atom\n", + "m_e = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "m = 200*m_e # Mass of a muon, kg\n", + "# As r_H = epsilon_0***h**2/(pi*m*(e**2) and r = epsilon_0*n**2*h**2/(pi*m*Z*(e**2)\n", + "# r = r_H gives\n", + "n = sqrt(m/m_e*Z) # Value of n for which r = r_H\n", + "n1 = 1.0; n2 = 2.0 # Principal quantum numbers corresponding to first excitation\n", + "U = m*e**4*Z**2.0/(8*epsilon_0**2*h**2*1.6e-019)*(1/n1**2-1/n2**2) # First excitation potential of the atom, eV\n", + "print \"The value of n for which radius of orbit is equal to Bohr radius = %2d\"% round(n)\n", + "print \"The first excitation potential of the atom = %4.2e eV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of n for which radius of orbit is equal to Bohr radius = 24\n", + "The first excitation potential of the atom = 1.83e+04 eV\n" + ] + } + ], + "prompt_number": 96 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..f162d031 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch2_1.ipynb @@ -0,0 +1,1185 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 02 : Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1 : Pg:4 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold wavelength of tungsten\n", + "phi = 4.5*1.6e-019 # Work function for tungesten, joule\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "# As phi = h*c/L0, solving for L0\n", + "L0 = h*c/phi # Threshold wavelength of tungesten, m\n", + "print \"The threshold wavelength of tungesten = %4d angstrom\"% (L0/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold wavelength of tungesten = 2750 angstrom\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2 : Pg:44 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Maximum velocity of photoelectrons\n", + "phi = 4*1.6e-019 # Work function for photoelectric surface, joule\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "e = 1.6e-019 # Electronic charge, coulomb\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "f = 1e+15 # Frequency of incident photons, Hz\n", + "c = 3e+08 # Speed of light, m/s\n", + "# KE = 1/2*m*v**2 = h*f - phi, solving for v, we have\n", + "v = sqrt(2*(h*f - phi)/m) # Maximum velocity of photoelectrons, m/s\n", + "print \"The maximum velocity of photoelectrons = %5.3e m/s\" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum velocity of photoelectrons = 2.097e+05 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3 : Pg:45 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of photoelectrons\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 joule, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Energy of photoelectrons emitted from tungsten, joule\n", + "print \"The energy of photoelectrons emitted from tungsten = %3.1f eV\"%(E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of photoelectrons emitted from tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4 : Pg:45 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Longest wavelength of incident radiation\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi = 6*e # Work function of metal, joule\n", + "f0 = phi/h # Threshold frequency for metal surface, Hz\n", + "L0 = c/f0 # Threshold (Longest) wavelength for metal, m\n", + "print \"The longest wavelength of incident radiation = %4d angstrom\"%(L0/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longest wavelength of incident radiation = 2070 angstrom\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5 : Pg:46 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Threshold frequency and wavelength\n", + "h = 6.62e-034 # Planck's constant, Js\n", + "phi = 3.31e-019 # Work function of metal, joule\n", + "c = 3e+08 # Speed of light, m/s\n", + "f0 = phi/h # Threshold frequency for metal surface, Hz\n", + "L0 = c/f0 # Threshold wavelength for metal, m\n", + "print \"The threshold frequency for metal = %1.0e Hz\"% f0 \n", + "print \"The threshold wavelength for metal = %4d angstrom\"% round(L0/1e-10)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold frequency for metal = 5e+14 Hz\n", + "The threshold wavelength for metal = 6000 angstrom\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6 : Pg:46 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Maximum velocity of emitted electrons\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 4300e-010 # Wavelength of incident light, m\n", + "phi = 5*e # Work function of nickel surface, joule\n", + "f0 = phi/h # Threshold frequency for nickel, Hz\n", + "L0 = c/f0 # Threshold wavelength for nickel, m\n", + "print \"The threshold wavelength for nickel = %4d angstrom\"% (L0/1e-10) \n", + "print \"Since %4d A < %4d A, the electrons will not be emitted.\"% (L0/1e-010, L/1e-010) \n", + "phi = 2.83*e # Work function of potassium surface, joule\n", + "f0 = phi/h # Threshold frequency for potassium, Hz\n", + "L0 = c/f0 # Threshold wavelength for potassium, m\n", + "print \"The threshold wavelength for potassium = %4d angstrom\"%(L0/1e-10) \n", + "print \"Since %4d A > %4d A, the electrons will be emitted.\"%(L0/1e-010, L/1e-010) \n", + "# Now KE = 1/2*m*v0**2 = h*f - h*f0, where v0 is the maximum velocity \n", + "# solving for v0, we have\n", + "v0 = sqrt(2*h*c/m*(1/L - 1/L0)) # Maximum velocity of photoelectrons, m/s\n", + "print \"The maximum velocity of photoelectrons = %5.3e m/s\"% v0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold wavelength for nickel = 2484 angstrom\n", + "Since 2484 A < 4300 A, the electrons will not be emitted.\n", + "The threshold wavelength for potassium = 4388 angstrom\n", + "Since 4388 A > 4300 A, the electrons will be emitted.\n", + "The maximum velocity of photoelectrons = 1.433e+05 m/s\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7 : Pg:47 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum energy of ejected electrons\n", + "h = 6.6e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 2537e-010 # Wavelength of incident light, m\n", + "L0 = 3250e-010 # Threshold wavelength of silver, m\n", + "# As U = h*(f - f0), the kinetic energy of ejected electrons\n", + "U = h*c*(1/L - 1/L0) # Maximum energy of ejected electrons, J\n", + "print \"The maximum energy of ejected electrons = %5.3e J\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy of ejected electrons = 1.712e-19 J\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.8 : Pg:47 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum kinetic energy and stopping potential of ejected electrons\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi_0 = 1.51*e # Work function of the metal surface, J \n", + "L = 4000e-010 # Wavelength of incident light, m\n", + "f = c/L # Frequency of incident light, Hz\n", + "U = h*f - phi_0 # Maximum kinetic energy of ejected electrons, J\n", + "V = U/e # Stopping potential for ejected electrons, volt\n", + "print \"The maximum energy of ejected electrons = %5.3f eV\"%(U/e) \n", + "print \"The stopping potential of ejected electrons = %5.3f V\"%(V) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy of ejected electrons = 1.595 eV\n", + "The stopping potential of ejected electrons = 1.595 V\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.9 : Pg:48 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Work function of metal\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "V = 1 # Stopping potential for the electrons emitted from the metal, V\n", + "L = 2500e-010 # Wavelength of incident light, m\n", + "f = c/L # Frequency of incident light, Hz\n", + "# Now KE = h*f - phi = e*V, Einstein's Photoelectric equation, solving for phi\n", + "phi = h*f - e*V # Work function of metal\n", + "print \"The work function of metal = %5.3f eV\"% (phi/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work function of metal = 3.968 eV\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.10 : Pg:48 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons emitted from the surface of tungsten\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J\n", + "print \"The energy of electrons emitted from the surface of tungsten = %3.1f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons emitted from the surface of tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.11 : Pg:49 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of photon\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 1800e-010 # Wavelength of incident light, m\n", + "L0 = 2300e-010 # Threshold wavelength of tungsten, m\n", + "E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J\n", + "print \"The energy of electrons emitted from the surface of tungsten = %3.1f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons emitted from the surface of tungsten = 1.5 eV\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.12 : Pg:49 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Velocity of the emitted electron\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "phi = 2.3*e # Work function of metal, J\n", + "L = 4300e-010 # Wavelength of incident light, m\n", + "# As 1/2*m*v**2 = h*f - phi = h*c/L - phi, Einstein's photoelectric equation\n", + "# Solving for v\n", + "v = sqrt(2*(h*c/L - phi)/m) # Velocity of emitted electron, m/s\n", + "print \"The velocity of emitted electron = %4.2e eV\"% v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of emitted electron = 4.55e+05 eV\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.13 : Pg:50 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of a quantum of light\n", + "c = 3e+08 # Speed of light, m/s\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "L = 5.3e-07 # Wavelength of incident light, m\n", + "E = h*c/L # Energy of the incident light, J\n", + "print \"The energy of incident light = %4.2f eV\"% (E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of incident light = 2.34 eV\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.14 : Pg:54 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ratio of masses of a proton and an electron\n", + "RH = 1.09678e+07 # Rydberg constant for hydrogen, per metre\n", + "RHe = 1.09722e+07 # Rydberg constant for helium, per metre\n", + "MH_m_ratio = (RH - 1.0/4*RHe)/(RHe - RH) # Ratio of mass of a proton to that of an electron\n", + "print \"The ratio of mass of a proton to that of an electron = %4d\" %MH_m_ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of mass of a proton to that of an electron = 1869\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.15 : Pg:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#First Bohr Orbit in hydrogen atoms \n", + "n = 1 # Principle quantum number of first orbit in H-atom\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 1 # Atomic number of hydrogen\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "r = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr's orbit, m\n", + "v = Z*e**2/(2*8.85e-012*h*n) # Velocity of electron in the first Bohr orbit, m/s\n", + "print \"The radius of first Bohr orbit = %5.3f angstrom\" %(r/1e-010) \n", + "print \"The velocity of electron in first Bohr orbit = (1/%3d)c\"%(1/v*c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 0.531 angstrom\n", + "The velocity of electron in first Bohr orbit = (1/137)c\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.16 : Pg:57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of Balmer H_beta lines\n", + "L_Hb = 6563e-010 # Wavelength of H_beta line, m\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L1 = 36/(5*R) # Wavenumber of H_alpha line, per metre\n", + "L2 = 16/(3*R) # Wavenumber of H_beta line, per metre\n", + "L_ratio = L2/L1 # Ratio of wavelengths of H_beta and H_alpha lines\n", + "L2 = L_ratio*L1 # Wavelength of Balmer H_beta line, m\n", + "print \"The wavelength of Balmer H_beta line = %4d angstrom\"%(L2/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of Balmer H_beta line = 4861 angstrom\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.17 : Pg: 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#First excitation energy of hydrogen atoms \n", + "n1 = 1.0 # Principle quantum number of first orbit in H-atom\n", + "n2 = 2.0 # Principle quantum number of second orbit in H-atom\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "U = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # First excitation energy of hydrogen atom, J\n", + "print \"The first excitation energy of hydrogen atom = %5.2f eV\"%(U/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first excitation energy of hydrogen atom = 10.17 eV\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.18 : Pg:58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy difference in the emission or absorption of sodium D1 lines\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 590e-09 # Wavelenght of sodium D1 line, m\n", + "E = h*c/L # Energy difference in the emission or absorption of sodium D1 line, J\n", + "print \"The energy difference in the emission or absorption of sodium D1 line = %4.2e J\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy difference in the emission or absorption of sodium D1 line = 3.37e-19 J\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.19 : Pg:58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of first line of Balmer series\n", + "n1 = 2.0 # Ground level of Balmer line in H-atom\n", + "n2 = 4.0 # Third level of Balmer line in H-atom\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L2 = 1.0/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of second line of Balmer series, m\n", + "n2 = 3 # Second level of Balmer line in H-atom\n", + "L1 = 1/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of first line of Balmer series, m\n", + "L_ratio = L1/L2 # Wavelength ratio of first and second line of Balmer series, m\n", + "L2 = 4861 # Given wavelength of second line of Balmer series, angstrom\n", + "L1 = L2*L_ratio # Wavelength of first line of Balmer series, angstrom\n", + "print \"The wavelength of first line of Balmer series = %4d angstrom\" %L1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of first line of Balmer series = 6562 angstrom\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.20 : Pg:59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum energy of the electrons in Balmer series \n", + "n1 = 2.0 # Ground level of Balmer line in H-atom\n", + "n2 = 3.0 # Second level of Balmer line in H-atom\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "E = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # Min energy required by electron to correspond to 1st wavenumber of Balmer series, J\n", + "print \"Minimum energy required by an electron to correspond to first wavenumber of Balmer series = %4.2f\"%(E/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum energy required by an electron to correspond to first wavenumber of Balmer series = 1.88\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.21 : Pg:59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ionization potential of hydrogen atom \n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.626e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "phi = m*e**4/(8*epsilon_0**2*h**2) # Work function or ionization energy of hydrogen atom, J\n", + "print \"The ionization energy of hydrogen atom = %5.2f eV\"%(phi/e) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization energy of hydrogen atom = 13.55 eV\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.22 : Pg:60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of second number of Balmer series of hydrogen \n", + "n1 = 2.0 # Principle quantum number of second orbit in H-atom\n", + "n2 = 3.0 # Principle quantum number of third orbit in H-atom\n", + "R = 1.097e+07 # Rydberg constant, per metre\n", + "L1 = 1/((1/n1**2 - 1/n2**2)*R) # Wavelength of first Balmer line, m\n", + "n2 = 4.0 # Principle quantum number of third orbit in H-atom \n", + "L2 = 1/((1.0/n1**2 - 1/n2**2)*R) # Wavelength of second Balmer line, m\n", + "L_ratio = L2/L1 # Wavelength ratio of second and first line of Balmer series\n", + "L1 = 6563e-010 # Given wavelength of first line of Balmer series, m\n", + "L2 = L_ratio*L1 # Wavelength of second Balmer line, m\n", + "print \"The wavelength of second Balmer line = %4e m\"%(L2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of second Balmer line = 4.861481e-07 m\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.23 : Pg:60 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of emitted light\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "n = 2 # Principal quantum number for second orbit in H-atom\n", + "V = 13.6 # Ionization potential of H-atom, V\n", + "U1 = -1*V*e # Energy of electron in first orbit, J\n", + "U2 = U1/n**2 # Energy of electron in second orbit, J\n", + "# As U2 - U1 = h*c/L, solving for L\n", + "L = h*c/(U2 - U1) # Wavelength of light emitted in the transition from second orbit to the first orbit, m\n", + "print \"The wavelength of light emitted in the transition from second orbit to the first orbit = %4d angstrom\"%(L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of light emitted in the transition from second orbit to the first orbit = 1217 angstrom\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.24 : Pg:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Radius and speed of electron in the first Bohr orbit\n", + "m = 9.1e-031 # Mass of the electron, C\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.626e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "Z = 1;n = 1 \n", + "r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit, m\n", + "v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_H) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_H) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 5.31e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 2.2e+06 m/s\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.25 : Pg:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Radius and velocity of electron for H and He\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "c = 3e+08 # Speed of light, m/s\n", + "Z = 1; n = 1 # Atomic number and principal quantum number of H-atom\n", + "r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit for H-atom, m\n", + "v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit of H-atom, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_H) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_H) \n", + "print \"The velocity of the electron in H-atom compared to the velocity of light = %4.2e\"%(v_H/c) \n", + "Z = 2 # Atomic number of He-atom\n", + "r_He = r_H/Z # Radius of first Bohr orbit for He-atom, m\n", + "v_He = 2*v_H # Velocity of the electron in the first Bohr orbit of He-atom, m/s\n", + "print \"The radius of first Bohr orbit = %4.2e m\"%(r_He) \n", + "print \"The velocity of the electron in the first Bohr orbit = %3.1e m/s\"%(v_He) \n", + "print \"The velocity of the electron in He-atom compared to the velocity of light = %5.3e\"%(v_He/c) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of first Bohr orbit = 5.31e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 2.2e+06 m/s\n", + "The velocity of the electron in H-atom compared to the velocity of light = 7.28e-03\n", + "The radius of first Bohr orbit = 2.65e-11 m\n", + "The velocity of the electron in the first Bohr orbit = 4.4e+06 m/s\n", + "The velocity of the electron in He-atom compared to the velocity of light = 1.456e-02\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.26 : Pg:62 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Difference in wavelength in the spectra of hydrogen and deuterium\n", + "R_H = 1.097e+07 # Rydberg constant for H-atom, per metre\n", + "M_H = 1.0 # Mass of H-atom, amu\n", + "M_D = 2*M_H # Mass of D-atom, amu\n", + "m = 0.000549*M_H # Mass of an electron, amu\n", + "R_D = R_H*(1+m/M_H)/(1+m/M_D) # Rydberg constant for D-atom, per metre\n", + "n1 = 2.0; n2 = 3.0 # Principal qunatum numbers for first line of Balmer series\n", + "L_H = 1/(R_H*(1/n1**2 - 1/n2**2)) # Wavelength of H-atom, m\n", + "L_D = 1/(R_D*(1/n1**2 - 1/n2**2)) # Wavelength of D-atom, m\n", + "delta_H = (L_H - L_D)/1e-010 # Difference in wavelength in the spectra of hydrogen and deuterium, angstrom\n", + "print \"The difference in wavelength in the spectra of hydrogen and deuterium = %3.1f angstrom\"% delta_H " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The difference in wavelength in the spectra of hydrogen and deuterium = 1.8 angstrom\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.27 : Pg:63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ionization energy of hydrogen atom with orbiting muon \n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "m1 = 200*m # Mass of muon, kg\n", + "phi1 = m1*e**4/(8*epsilon_0**2*h**2) # Ionization energy of H-atom with muon, J\n", + "print \"The ionization energy of hydrogen atom with orbiting muon = %4.2e eV\"%(phi1/1.6e-019) \n", + "# Result \n", + "# The ionization energy of hydrogen atom with orbiting muon = 2.71e+003 eV " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization energy of hydrogen atom with orbiting muon = 2.71e+03 eV\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.28 : Pg:64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Photon emitted by hydrogen atom \n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "E1 = -13.6 # Energy of electron in the first orbit of hydrogen atom, eV\n", + "n = 2 # Principal quantum number for second orbit\n", + "E2 = E1/n**2 # Energy of electron in the second orbit of hydrogen atom, eV\n", + "E = (E2 - E1)*e # Energy of photon emitted, joule\n", + "P = E/c # Momentum of photon, kg-m/s\n", + "L = (h/P)/1e-010 # de_Broglie wavelength of photon, angstrom\n", + "print \"The energy of photon emitted by hydrogen atom %5.2e J\"% E\n", + "print \"The momentum of photon = %4.2e kg-m/s\"% P \n", + "print \"The de_Broglie wavelength of photon = %4d angstrom\"% L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of photon emitted by hydrogen atom 1.63e-18 J\n", + "The momentum of photon = 5.44e-27 kg-m/s\n", + "The de_Broglie wavelength of photon = 1217 angstrom\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.29 : Pg:64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy required to create a vacancy in Cu \n", + "n = 1 # Principal quantum number of K shell\n", + "Z = 29 # Atomic number of copper\n", + "U = 13.6 # Ionization potential of hydrogen atom, eV\n", + "E1 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV\n", + "n = 2 # Principal quantum number of L shell\n", + "E2 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV\n", + "print \"The energy required to create a vacancy in K-shell of copper atom = %5.2e eV\"% E1 \n", + "print \"The energy required to create a vacancy in L-shell of copper atom = %5.2e eV\"% E2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to create a vacancy in K-shell of copper atom = 1.14e+04 eV\n", + "The energy required to create a vacancy in L-shell of copper atom = 2.86e+03 eV\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.30 : Pg:65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Excitation potential for mercury\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Speed of light, m/s\n", + "L = 2537e-010 # Wavelength of absorbed line of Hg, m\n", + "V = h*c/(e*L) # Excitation potential for Hg, v\n", + "print \"The excitation potential for Hg = %3.1f V\"% V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The excitation potential for Hg = 4.9 V\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.31 : Pg:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Atomic number of impurity in Zinc target \n", + "L1 = 1.43603e-010 # Wavelength of characteristic K_alpha line from Zn, m\n", + "Z1 = 30.0 # Atomic number of zinc\n", + "L2 = 0.53832e-010 # Wavelength of unknown line from Zn, m\n", + "# As (1/L1)/(1/L2) = (Z1/Z2)**2, solving for Z2\n", + "Z2 = Z1*(L1/L2)**(1.0/2) # Atomic number of impurity in Zn target\n", + "print \"The atomic number of impurity in Zn target = %2d\"% round(Z2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The atomic number of impurity in Zn target = 49\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.32 : Pg:65 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mu-mesonic atom subjected to Bohr orbit\n", + "Z = 3 # Atomic number of Mu-mesonic atom\n", + "m_e = 9.1e-031 # Mass of the electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "h = 6.624e-034 # Planck's Constant, Js\n", + "epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "m = 200*m_e # Mass of a muon, kg\n", + "# As r_H = epsilon_0***h**2/(pi*m*(e**2) and r = epsilon_0*n**2*h**2/(pi*m*Z*(e**2)\n", + "# r = r_H gives\n", + "n = sqrt(m/m_e*Z) # Value of n for which r = r_H\n", + "n1 = 1.0; n2 = 2.0 # Principal quantum numbers corresponding to first excitation\n", + "U = m*e**4*Z**2.0/(8*epsilon_0**2*h**2*1.6e-019)*(1/n1**2-1/n2**2) # First excitation potential of the atom, eV\n", + "print \"The value of n for which radius of orbit is equal to Bohr radius = %2d\"% round(n)\n", + "print \"The first excitation potential of the atom = %4.2e eV\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of n for which radius of orbit is equal to Bohr radius = 24\n", + "The first excitation potential of the atom = 1.83e+04 eV\n" + ] + } + ], + "prompt_number": 96 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3.ipynb new file mode 100755 index 00000000..95dfb132 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3.ipynb @@ -0,0 +1,784 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 03 : Matter Waves, Wave particle duality & Uncertainty principle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1 : : Pg: 77 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of an electron\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of an electron, kg\n", + "L = 9e-010 # wavelength of an electron, m\n", + "# since E = (m*v**2)/2, Energy of an electron, joule\n", + "# thus v = sqrt(2*E/m), solving for L in terms of E, we have\n", + "# L = h/sqrt(2*m*E), wavelength of an electron, m\n", + "# On solving for E\n", + "E = h**2/(2*m*L**2)\n", + "print \"The kinetic energy of an electron = %6.4f eV\"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of an electron = 1.8468 eV\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of electrons\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "E = 100*e # Energy of beam of electrons, joule\n", + "# since E = (m*v**2)/2 # Energy of beam of electron, joule\n", + "p = sqrt(2*m*E) # Momentum of beam of electrons, kg-m/s\n", + "L = h/p # wavelength of a beam of electron, m\n", + "print \"The wavelength of electrons = %4.2f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of electrons = 1.22 angstorm\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Momentum of photon\n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "L = 6e-07 # wavelength of photon, m\n", + "M = h/L # Momentum of photon, kg-m/s\n", + "print \"The momentum of photon = %5.3e kg-m/s\"% (M) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of photon = 1.104e-27 kg-m/s\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Momentum of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "E = 1.6e-010 # Kinetic energy of an electron, joule\n", + "# Since E = p**2/2*m # Kinetic energy of an electron, joule\n", + "p = sqrt(2*m*E) # Momentum of an electron, kg-m/s\n", + "print \"The momentum of an electron = %3.1e kg-m/s\"% p " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of an electron = 1.7e-20 kg-m/s\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5 : : Pg: 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#wavelength of a particle\n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9e-031 # Mass of an electron, kg\n", + "U = 1.6e-017 # Kinetic energy of an particle, joule\n", + "# Since U = (m*v**2)/2 # Kinetic energy of a particle, joule\n", + "# such that v = sqrt(2*U/m) # Velocity of the particle, m/s\n", + "L = h/sqrt(2*m*U) # wavelength of a particle, m\n", + "print \"The wavelength of a particle = %5.3f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of a particle = 1.234 angstorm\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6 : : Pg: 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Comparison of energy of photon and neutron\n", + "m = 1.67e-027 # Mass of neutron, kg\n", + "L = 1e-010 # Wavelength of neutron and photon, m\n", + "c = 3e+08 # Velocity of light, m/s\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "U_1 = h*c/L # Energy of photon, joule\n", + "# Since U_2 = (m*v**2)/2, Energy of neutron, joule\n", + "# Thus v = h/m*L_2, Velocity of the particle, m/s\n", + "# on solving for U_2\n", + "U_2 = h**2/(2*m*L**2) # Energy of photon, joule\n", + "print \"The ratio of energy of photon and neutron = %4.2e \"% (U_1/U_2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of energy of photon and neutron = 1.51e+05 \n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7: : Pg: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#de-Broglie wavelength of electrons \n", + "L_1 = 3e-07 # Wavelength of ultraviolet light, m\n", + "L_0 = 4e-07 # Threshold wavelength of ultraviolet light, m\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "c = 3e+08 # Velocity of light, m/s\n", + "h = 6.624e-034 # Plancks constant, joule-second\n", + "U = h*c*(1/L_1-1/L_0) # Maximum Kinetic energy of emitted electrons, joule\n", + "# since U = m*v**2/2, Kinetic energy of electrons, joule\n", + "# Thus v = sqrt(2*U/m), so that L_2 becomes\n", + "L_2 = h/sqrt(2*m*U) # wavelength of electrons, m\n", + "print \"The wavelength of the electrons = %3.1f angstorm\"% (L_2/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the electrons = 12.1 angstorm\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8 : :Pg: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#de-Broglie wavelength of accelerated electrons \n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, Coulamb\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "V = 1 # For simplicity, we assume retarding potential to be unity, volt\n", + "# Since e*V = (m*v**2)/2 # Energy of electron, joule\n", + "v = sqrt(2*e*V/m) # Velocity of electrons, m/s\n", + "L = h/(m*v) # Wavelength of electrons, m\n", + "print \"The de-Broglie wavelength of accelerated electrons = %5.2f/sqrt(V) \"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-Broglie wavelength of accelerated electrons = 12.28/sqrt(V) \n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9 : : Pg: 81 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of matter waves\n", + "E = 2e-016 # Energy of electrons, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of the electron, kg\n", + "# since E = (m*v**2)/2, the energy of an electron, joule\n", + "# such that v = sqrt(2*E/m) # Velocity of electron, m/s\n", + "# As L = h/m*v, wavelength of the electron, m\n", + "# on solving for L in terms of E\n", + "L = h/sqrt(2*m*E) # wavelength of the electron, m\n", + "print \"The wavelength of the electron = %5.3f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the electron = 0.347 angstorm\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10 : : Pg: 81 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Momentum of proton\n", + "U = 1.6e-010 # Kinetic energy of proton, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 1.67e-027 # mass of proton, kg\n", + "v = sqrt(2*U/m) # Velocity of proton, m/s\n", + "p = m*v # Momentum of proton, kg m/s\n", + "print \"The momentum of proton = %4.2e kgm/s\"% p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of proton = 7.31e-19 kgm/s\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.11 : : Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of an electron\n", + "U = 1.6e-013 # Kinetic energy of the electron, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "v = sqrt(2*U/m) # Velocity of the electron, m/s\n", + "L = h/(m*v) # Wavelength of the electron, m\n", + "print \"The wavelength of an electron = %5.3e angstorm\" % (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of an electron = 1.228e-02 angstorm\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12: :Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#De-Broglie wavelength of thermal neutrons\n", + "m = 1.6749e-027 # Mass of neutron, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "k = 1.38e-021 # Boltzmann constant, joule per kelvin\n", + "T = 300 # Temperature of thermal neutrons, kelvin\n", + "# Since m*v**2/2 = (3/2)*k*T # Energy of neutron, joule\n", + "v = sqrt(3*k*T/m) # Velocity of neutrons, m/s\n", + "L = h/(m*v) # Wavelength of neutrons, m\n", + "print \"The de-Broglie wavelength of thermal neutrons = %5.3f angstorm \"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13 : :Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of a proton\n", + "L = 1e-010 # wavelength of proton, m\n", + "m = 1.67e-027 # Mass of proton, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "# Since L = h/(m*v) # wavelength of proton, m\n", + "v = h/m*L # Velocity of proton, m/s\n", + "v_k = h**2/(2*L**2*m) # Kinetic energy of proton, joule\n", + "print \"The kinetic energy of proton = %3.1e eV \"% (v_k/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.14: : Pg: 85 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons in a one dimensional box\n", + "n1 = 1; l = 0; ml = 0; ms = 1.0/2 # Quantum numbers of first electron\n", + "n2 = 1; l = 0; ml = 0; ms = -1.0/2 # Quantum numbers of second electron\n", + "# The lowest energy corresponds to the ground state of electrons \n", + "n = n1 # n1 = n2 = n\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "a = 1 # For convenience, length of the box is assumed to be unity\n", + "E = 2*n**2*h**2/(8*m*a**2) # Lowest energy of electron, joule\n", + "print \"The lowest energy of electron = %6.4e/a**2\"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.15: : Pg:85 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Lowest energy of three electrons in box\n", + "n1 = 1; l = 0; ml = 0; ms = 1.0/2 # Quantum numbers of first electron\n", + "n2 = 1; l = 0; ml = 0; ms = -1.0/2 # Quantum numbers of second electron\n", + "n3 = 2; l = 0; ml = 0; ms = +1.0/2 # Quantum numbers of third electron\n", + "# The lowest energy corresponds to the ground state of electrons\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "a = 1.0 # For convenience, length of the box is assumed to be unity\n", + "E = (n1**2*h**2/(8*m*a**2)+n2**2*h**2/(8*m*a**2))+n3**2*h**2/(8*m*a**2) # Lowest energy of electron, joule\n", + "print \"The lowest energy of electron = %6.4e/a**2\"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.16 : :Pg: 86 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Zero point energy of system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 1e-010 # Length of box, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "n = 1 # Principal quantum number for the lowest energy level\n", + "E1 = 2*h**2/(8*m*a**2) # Energy for the two electron system in the n =1 energy level, joule\n", + "E2 = 8*(2**2*h**2)/(8*m*a**2) # Energy for the eight electron system in the n = 2 energy level, joule\n", + "E = E1 +E2 # Total lowest energy of system, joule\n", + "print \"The zero point energy of system = %4.2e J \"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.17 : :Pg: 86 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mean energy per electron at 0K\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 50e-010 # Length of molecule, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "E = h**2/(8*m*a**2) # Energy per electron, joule\n", + "print \"The mean energy per electron at 0K = %3.1e eV \"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.18 : :Pg: 87 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Lowest energy of two electron system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 1e-010 # Length of box, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "E = 2*h**2/(8*m*a**2) # Energy of two electron system, joule\n", + "print \"The lowest energy of two electron system = %4.1f, eV\"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.19 : :Pg: 87 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Total energy of the three electron system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "a = 1e-010 # Length of the molecule, m\n", + "E = 6*h**2/(8*m*a**2) # Energy of three electron system, joule\n", + "print \"The total energy of three electron system = %6.2f, eV \"%(E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.20 : :Pg: 92 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum uncertainity in the velocity of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "del_x = 1e-010 # Length of the box, m\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_v = h_bar/(m*del_x) # Minimum uncertainity in velocity, m/s\n", + "print \"The minimum uncertainity in the velocity of electron = %4.2e m/s \"% del_v " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.21 : :Pg: 92 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Uncertainity in momentum and kinetic energy of the proton\n", + "m = 1.67e-027 # Mass of a proton, kg\n", + "del_x = 1e-014 # Uncertainity in position, m\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_p = h_bar/del_x # Minimum uncertainity in momentum, kgm/s\n", + "del_E = del_p**2/(2*m) # Minimum uncertainity in kinetic energy, joule\n", + "print \"The minimum uncertainity in momentum of the proton = %5.3e kgm/s\"%del_p \n", + "print \"The minimum uncertainity in kinetic energy of the proton = %5.3e eV\"% (del_E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.22 : :Pg: 93 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Uncertainity in the position of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "v = 600 # Speed of electron, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of electron, kgm/s\n", + "del_p = 5e-05*m*v # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the electron = %5.3f mm\"% (del_x/1e-03) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.23 : :Pg: 93 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Uncertainity in the position of a bullet\n", + "m = 0.025 # Mass of an bullet, kg\n", + "v = 400 # Speed of bullet, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of bullet, kgm/s\n", + "del_p = 2e-04*p # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the bullet = %5.3e m\"% del_x " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.24 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Unertainity in the position of an electron\n", + "m = 9.1e-31 # Mass of an electron, kg\n", + "v = 300 # Speed of electron, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of electron, kgm/s\n", + "del_p = 1e-04*p # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the electron = %5.3f mm\"% (del_x/1e-03) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.25 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Unertainity in the velocity of an electron\n", + "m = 9.1e-31 # Mass of an electron, kg\n", + "del_x = 1e-10 # Length of box, m\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "del_p = m*del_v # Uncertainity in Momentum of electron, kgm/s\n", + "del_v = h_bar/(2*pi*del_x*m) # Minimum uncertainity in velocity of an electron, m/s\n", + "print \"The uncertainity in the velocity of the electron = %3.2e m/s\"% del_v " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.26 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum uncertainity in the energy of the excited state of an atom\n", + "del_t = 1e-08 # Life time of an excited state of an atom, seconds\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_E = h_bar/del_t # Minimum uncertainity in the energy of excited state, joule\n", + "print \"The minimum uncertainity in the energy of the excited state = %5.3e joule\"% del_E " + ], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..a6e3bcf5 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch3_1.ipynb @@ -0,0 +1,920 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6705459507575acd62788eaacf347e3a6ff37ac0af8f8c01dcc4990705590d53" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 03 : Matter Waves, Wave particle duality & Uncertainty principle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1 : : Pg: 77 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of an electron\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of an electron, kg\n", + "L = 9e-010 # wavelength of an electron, m\n", + "# since E = (m*v**2)/2, Energy of an electron, joule\n", + "# thus v = sqrt(2*E/m), solving for L in terms of E, we have\n", + "# L = h/sqrt(2*m*E), wavelength of an electron, m\n", + "# On solving for E\n", + "E = h**2/(2*m*L**2)\n", + "print \"The kinetic energy of an electron = %6.4f eV\"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of an electron = 1.8468 eV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of electrons\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, coulomb\n", + "E = 100*e # Energy of beam of electrons, joule\n", + "# since E = (m*v**2)/2 # Energy of beam of electron, joule\n", + "p = sqrt(2*m*E) # Momentum of beam of electrons, kg-m/s\n", + "L = h/p # wavelength of a beam of electron, m\n", + "print \"The wavelength of electrons = %4.2f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of electrons = 1.22 angstorm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Momentum of photon\n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "L = 6e-07 # wavelength of photon, m\n", + "M = h/L # Momentum of photon, kg-m/s\n", + "print \"The momentum of photon = %5.3e kg-m/s\"% (M) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of photon = 1.104e-27 kg-m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4 : : Pg: 78 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Momentum of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "E = 1.6e-010 # Kinetic energy of an electron, joule\n", + "# Since E = p**2/2*m # Kinetic energy of an electron, joule\n", + "p = sqrt(2*m*E) # Momentum of an electron, kg-m/s\n", + "print \"The momentum of an electron = %3.1e kg-m/s\"% p " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of an electron = 1.7e-20 kg-m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5 : : Pg: 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#wavelength of a particle\n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9e-031 # Mass of an electron, kg\n", + "U = 1.6e-017 # Kinetic energy of an particle, joule\n", + "# Since U = (m*v**2)/2 # Kinetic energy of a particle, joule\n", + "# such that v = sqrt(2*U/m) # Velocity of the particle, m/s\n", + "L = h/sqrt(2*m*U) # wavelength of a particle, m\n", + "print \"The wavelength of a particle = %5.3f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of a particle = 1.234 angstorm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6 : : Pg: 79 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Comparison of energy of photon and neutron\n", + "m = 1.67e-027 # Mass of neutron, kg\n", + "L = 1e-010 # Wavelength of neutron and photon, m\n", + "c = 3e+08 # Velocity of light, m/s\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "U_1 = h*c/L # Energy of photon, joule\n", + "# Since U_2 = (m*v**2)/2, Energy of neutron, joule\n", + "# Thus v = h/m*L_2, Velocity of the particle, m/s\n", + "# on solving for U_2\n", + "U_2 = h**2/(2*m*L**2) # Energy of photon, joule\n", + "print \"The ratio of energy of photon and neutron = %4.2e \"% (U_1/U_2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of energy of photon and neutron = 1.51e+05 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7: : Pg: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#de-Broglie wavelength of electrons \n", + "L_1 = 3e-07 # Wavelength of ultraviolet light, m\n", + "L_0 = 4e-07 # Threshold wavelength of ultraviolet light, m\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "c = 3e+08 # Velocity of light, m/s\n", + "h = 6.624e-034 # Plancks constant, joule-second\n", + "U = h*c*(1/L_1-1/L_0) # Maximum Kinetic energy of emitted electrons, joule\n", + "# since U = m*v**2/2, Kinetic energy of electrons, joule\n", + "# Thus v = sqrt(2*U/m), so that L_2 becomes\n", + "L_2 = h/sqrt(2*m*U) # wavelength of electrons, m\n", + "print \"The wavelength of the electrons = %3.1f angstorm\"% (L_2/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the electrons = 12.1 angstorm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8 : :Pg: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#de-Broglie wavelength of accelerated electrons \n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "e = 1.6e-019 # Charge on an electron, Coulamb\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "V = 1 # For simplicity, we assume retarding potential to be unity, volt\n", + "# Since e*V = (m*v**2)/2 # Energy of electron, joule\n", + "v = sqrt(2*e*V/m) # Velocity of electrons, m/s\n", + "L = h/(m*v) # Wavelength of electrons, m\n", + "print \"The de-Broglie wavelength of accelerated electrons = %5.2f/sqrt(V) \"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-Broglie wavelength of accelerated electrons = 12.28/sqrt(V) \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9 : : Pg: 81 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of matter waves\n", + "E = 2e-016 # Energy of electrons, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # mass of the electron, kg\n", + "# since E = (m*v**2)/2, the energy of an electron, joule\n", + "# such that v = sqrt(2*E/m) # Velocity of electron, m/s\n", + "# As L = h/m*v, wavelength of the electron, m\n", + "# on solving for L in terms of E\n", + "L = h/sqrt(2*m*E) # wavelength of the electron, m\n", + "print \"The wavelength of the electron = %5.3f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the electron = 0.347 angstorm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10 : : Pg: 81 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Momentum of proton\n", + "U = 1.6e-010 # Kinetic energy of proton, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 1.67e-027 # mass of proton, kg\n", + "v = sqrt(2*U/m) # Velocity of proton, m/s\n", + "p = m*v # Momentum of proton, kg m/s\n", + "print \"The momentum of proton = %4.2e kgm/s\"% p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of proton = 7.31e-19 kgm/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.11 : : Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Wavelength of an electron\n", + "U = 1.6e-013 # Kinetic energy of the electron, joule \n", + "h = 6.624e-034 # Planck's constant, J-s\n", + "m = 9.1e-031 # Mass of the electron, kg\n", + "v = sqrt(2*U/m) # Velocity of the electron, m/s\n", + "L = h/(m*v) # Wavelength of the electron, m\n", + "print \"The wavelength of an electron = %5.3e angstorm\" % (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of an electron = 1.228e-02 angstorm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12: :Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#De-Broglie wavelength of thermal neutrons\n", + "m = 1.6749e-027 # Mass of neutron, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "k = 1.38e-021 # Boltzmann constant, joule per kelvin\n", + "T = 300 # Temperature of thermal neutrons, kelvin\n", + "# Since m*v**2/2 = (3/2)*k*T # Energy of neutron, joule\n", + "v = sqrt(3*k*T/m) # Velocity of neutrons, m/s\n", + "L = h/(m*v) # Wavelength of neutrons, m\n", + "print \"The de-Broglie wavelength of thermal neutrons = %5.3f angstorm \"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-Broglie wavelength of thermal neutrons = 0.145 angstorm \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13 : :Pg: 82 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Kinetic energy of a proton\n", + "L = 1e-010 # wavelength of proton, m\n", + "m = 1.67e-027 # Mass of proton, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "# Since L = h/(m*v) # wavelength of proton, m\n", + "v = h/m*L # Velocity of proton, m/s\n", + "v_k = h**2/(2*L**2*m) # Kinetic energy of proton, joule\n", + "print \"The kinetic energy of proton = %3.1e eV \"% (v_k/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of proton = 8.2e-02 eV \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.14: : Pg: 85 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons in a one dimensional box\n", + "n1 = 1; l = 0; ml = 0; ms = 1.0/2 # Quantum numbers of first electron\n", + "n2 = 1; l = 0; ml = 0; ms = -1.0/2 # Quantum numbers of second electron\n", + "# The lowest energy corresponds to the ground state of electrons \n", + "n = n1 # n1 = n2 = n\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "a = 1 # For convenience, length of the box is assumed to be unity\n", + "E = 2*n**2*h**2/(8*m*a**2) # Lowest energy of electron, joule\n", + "print \"The lowest energy of electron = %6.4e/a**2\"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest energy of electron = 1.2062e-37/a**2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.15: : Pg:85 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Lowest energy of three electrons in box\n", + "n1 = 1; l = 0; ml = 0; ms = 1.0/2 # Quantum numbers of first electron\n", + "n2 = 1; l = 0; ml = 0; ms = -1.0/2 # Quantum numbers of second electron\n", + "n3 = 2; l = 0; ml = 0; ms = +1.0/2 # Quantum numbers of third electron\n", + "# The lowest energy corresponds to the ground state of electrons\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "a = 1.0 # For convenience, length of the box is assumed to be unity\n", + "E = (n1**2*h**2/(8*m*a**2)+n2**2*h**2/(8*m*a**2))+n3**2*h**2/(8*m*a**2) # Lowest energy of electron, joule\n", + "print \"The lowest energy of electron = %6.4e/a**2\"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest energy of electron = 3.6185e-37/a**2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.16 : :Pg: 86 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Zero point energy of system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 1e-010 # Length of box, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "n = 1 # Principal quantum number for the lowest energy level\n", + "E1 = 2*h**2/(8*m*a**2) # Energy for the two electron system in the n =1 energy level, joule\n", + "E2 = 8*(2**2*h**2)/(8*m*a**2) # Energy for the eight electron system in the n = 2 energy level, joule\n", + "E = E1 +E2 # Total lowest energy of system, joule\n", + "print \"The zero point energy of system = %4.2e J \"% E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The zero point energy of system = 2.05e-16 J \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.17 : :Pg: 86 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Mean energy per electron at 0K\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 50e-010 # Length of molecule, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "E = h**2/(8*m*a**2) # Energy per electron, joule\n", + "print \"The mean energy per electron at 0K = %3.1e eV \"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean energy per electron at 0K = 1.5e-02 eV \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.18 : :Pg: 87 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Lowest energy of two electron system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 1e-010 # Length of box, m\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "E = 2*h**2/(8*m*a**2) # Energy of two electron system, joule\n", + "print \"The lowest energy of two electron system = %4.1f, eV\"% (E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest energy of two electron system = 75.3, eV\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.19 : :Pg: 87 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Total energy of the three electron system\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "h = 6.624e-034 # Plancks constant, joule second\n", + "a = 1e-010 # Length of the molecule, m\n", + "E = 6*h**2/(8*m*a**2) # Energy of three electron system, joule\n", + "print \"The total energy of three electron system = %6.2f, eV \"%(E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total energy of three electron system = 226.02, eV \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.20 : :Pg: 92 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum uncertainity in the velocity of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "del_x = 1e-010 # Length of the box, m\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_v = h_bar/(m*del_x) # Minimum uncertainity in velocity, m/s\n", + "print \"The minimum uncertainity in the velocity of electron = %4.2e m/s \"% del_v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainity in the velocity of electron = 1.16e+06 m/s \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.21 : :Pg: 92 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Uncertainity in momentum and kinetic energy of the proton\n", + "m = 1.67e-027 # Mass of a proton, kg\n", + "del_x = 1e-014 # Uncertainity in position, m\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_p = h_bar/del_x # Minimum uncertainity in momentum, kgm/s\n", + "del_E = del_p**2/(2*m) # Minimum uncertainity in kinetic energy, joule\n", + "print \"The minimum uncertainity in momentum of the proton = %5.3e kgm/s\"%del_p \n", + "print \"The minimum uncertainity in kinetic energy of the proton = %5.3e eV\"% (del_E/1.6e-019) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainity in momentum of the proton = 1.054e-20 kgm/s\n", + "The minimum uncertainity in kinetic energy of the proton = 2.079e+05 eV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.22 : :Pg: 93 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Uncertainity in the position of an electron\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "v = 600 # Speed of electron, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of electron, kgm/s\n", + "del_p = 5e-05*m*v # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the electron = %5.3f mm\"% (del_x/1e-03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the position of the electron = 1.924 mm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.23 : :Pg: 93 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Uncertainity in the position of a bullet\n", + "m = 0.025 # Mass of an bullet, kg\n", + "v = 400 # Speed of bullet, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of bullet, kgm/s\n", + "del_p = 2e-04*p # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the bullet = %5.3e m\"% del_x " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the position of the bullet = 2.626e-32 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.24 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Unertainity in the position of an electron\n", + "m = 9.1e-31 # Mass of an electron, kg\n", + "v = 300 # Speed of electron, m/s\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "p = m*v # Momentum of electron, kgm/s\n", + "del_p = 1e-04*p # Minimum uncertainity in momentum, kgm/s\n", + "del_x = h_bar/(4*pi*del_p) # Uncertainity in position, m\n", + "print \"The uncertainity in the position of the electron = %5.3f mm\"% (del_x/1e-03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the position of the electron = 1.924 mm\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.25 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Unertainity in the velocity of an electron\n", + "m = 9.1e-31 # Mass of an electron, kg\n", + "del_x = 1e-10 # Length of box, m\n", + "h_bar = 6.6e-034 # Reduced Plancks constant, joule second\n", + "del_p = m*del_v # Uncertainity in Momentum of electron, kgm/s\n", + "del_v = h_bar/(2*pi*del_x*m) # Minimum uncertainity in velocity of an electron, m/s\n", + "print \"The uncertainity in the velocity of the electron = %3.2e m/s\"% del_v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the velocity of the electron = 1.15e+06 m/s\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.26 : :Pg: 94 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum uncertainity in the energy of the excited state of an atom\n", + "del_t = 1e-08 # Life time of an excited state of an atom, seconds\n", + "h_bar = 1.054e-034 # Reduced Plancks constant, joule second\n", + "del_E = h_bar/del_t # Minimum uncertainity in the energy of excited state, joule\n", + "print \"The minimum uncertainity in the energy of the excited state = %5.3e joule\"% del_E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainity in the energy of the excited state = 1.054e-26 joule\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4.ipynb new file mode 100755 index 00000000..3a3c9949 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 04 : Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1 : : Pg: 124 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Percentage transmission of beam through potential barrier\n", + "eV = 1.6e-019 # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "E = 4.0*eV # Energy of each electron, joule\n", + "Vo = 6.0*eV # Height of potential barrier, joule\n", + "a = 10e-010 # Width of potential barrier, m\n", + "h_bar = 1.054e-34 # Reduced Planck's constant, J-s\n", + "k = 2*m*(Vo-E)/h_bar**2\n", + "# Since 2*k*a = 2*a*[2*m*(Vo-E)**1/2]/h_bar so\n", + "pow = 2.0*a/h_bar*(2*m*(Vo-E))**(1.0/2) # Power of exponential in the expression for T\n", + "T = (16*E/Vo)*(1-E/Vo)*exp(-1*pow) # Transmission coefficient of the beam through the potential barrier\n", + "percent_T = T*100 \n", + "print \"The percentage transmission of beam throught potential barrier = %5.3e %%\"% percent_T " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage transmission of beam throught potential barrier = 1.828e-04 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2 : : Pg: 125 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Width of the potential barrier\n", + "A = 222.0 # Atomic weight of radioactive atom\n", + "Z = 86.0 # Atomic number of radioactive atom\n", + "eV = 1.6e-19 # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "epsilon_0 = 8.854e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "e = 1.6e-19 # Charge on an electron, coulomb\n", + "r0 = 1.5e-015 # Nuclear radius constant, m\n", + "r = r0*A**(1.0/3) # Radius of the radioactive atom, m\n", + "E = 4*eV*1e+06 # Kinetic energy of an alpha particle, joule\n", + "# At the distance of closest approach, r1, E = 2*(Z-2)*e**2/(4*pi*epsilon_0*r1)\n", + "# Solving for r1, we have\n", + "r1 = 2*(Z-2)*e**2/(4*pi*epsilon_0*E) # The distance form the centre of the nucleus at which PE = KE\n", + "a = r1 - r # Width of the potential barrier, m\n", + "print \"The width of the potential barrier of the alpha particle = %5.2e m\"% a " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of the potential barrier of the alpha particle = 5.13e-14 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3: : Pg : 125 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons through the potential barrier\n", + "h_bar = 1.054e-34 # Reduced Planck's constant, J-s\n", + "Vo = 8e-019 # Height of potential barrier, joules\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 5e-010 # Width of potential barrier, m\n", + "T = 1.0/2 # Transmission coefficient of electrons\n", + "# As T = 1/((1 + m*Vo**2*a**2)/2*E*h**2), solving for E we have\n", + "E = m*Vo**2*a**2/(2*(1/T-1)*h_bar**2*1.6e-019) # Energy of half of the electrons through the potential barrier, eV\n", + "print \"The energy of electrons through the potential barrier = %5.2f eV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons through the potential barrier = 40.96 eV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4 : : Pg: 126 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Zero point energy of a system \n", + "h = 6.626e-034 # Planck's constant, Js\n", + "x = 1.0e-02 # Displacement of the spring about its mean position, m\n", + "F = 1.0e-02 # Force applied to the spring-mass system, N\n", + "m = 1.0e-03 # Mass of attached to the spring, kg\n", + "# As F = k*x, k = 4*pi**2*f**2*m is the stiffness constant, solving for f, \n", + "f = sqrt(F/(4*pi**2*m*x)) # Frequency of oscillations of mass-spring system, Hz\n", + "U = 1.0/2*h*f # Zero point energy of the mass-spring system, J\n", + "print \"The zero point energy of the mass-spring system = %4.2e J\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The zero point energy of the mass-spring system = 1.67e-33 J\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..3a3c9949 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch4_1.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 04 : Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1 : : Pg: 124 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Percentage transmission of beam through potential barrier\n", + "eV = 1.6e-019 # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "m = 9.1e-031 # Mass of electron, kg\n", + "E = 4.0*eV # Energy of each electron, joule\n", + "Vo = 6.0*eV # Height of potential barrier, joule\n", + "a = 10e-010 # Width of potential barrier, m\n", + "h_bar = 1.054e-34 # Reduced Planck's constant, J-s\n", + "k = 2*m*(Vo-E)/h_bar**2\n", + "# Since 2*k*a = 2*a*[2*m*(Vo-E)**1/2]/h_bar so\n", + "pow = 2.0*a/h_bar*(2*m*(Vo-E))**(1.0/2) # Power of exponential in the expression for T\n", + "T = (16*E/Vo)*(1-E/Vo)*exp(-1*pow) # Transmission coefficient of the beam through the potential barrier\n", + "percent_T = T*100 \n", + "print \"The percentage transmission of beam throught potential barrier = %5.3e %%\"% percent_T " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage transmission of beam throught potential barrier = 1.828e-04 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2 : : Pg: 125 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Width of the potential barrier\n", + "A = 222.0 # Atomic weight of radioactive atom\n", + "Z = 86.0 # Atomic number of radioactive atom\n", + "eV = 1.6e-19 # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "epsilon_0 = 8.854e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square\n", + "e = 1.6e-19 # Charge on an electron, coulomb\n", + "r0 = 1.5e-015 # Nuclear radius constant, m\n", + "r = r0*A**(1.0/3) # Radius of the radioactive atom, m\n", + "E = 4*eV*1e+06 # Kinetic energy of an alpha particle, joule\n", + "# At the distance of closest approach, r1, E = 2*(Z-2)*e**2/(4*pi*epsilon_0*r1)\n", + "# Solving for r1, we have\n", + "r1 = 2*(Z-2)*e**2/(4*pi*epsilon_0*E) # The distance form the centre of the nucleus at which PE = KE\n", + "a = r1 - r # Width of the potential barrier, m\n", + "print \"The width of the potential barrier of the alpha particle = %5.2e m\"% a " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of the potential barrier of the alpha particle = 5.13e-14 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3: : Pg : 125 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Energy of electrons through the potential barrier\n", + "h_bar = 1.054e-34 # Reduced Planck's constant, J-s\n", + "Vo = 8e-019 # Height of potential barrier, joules\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "a = 5e-010 # Width of potential barrier, m\n", + "T = 1.0/2 # Transmission coefficient of electrons\n", + "# As T = 1/((1 + m*Vo**2*a**2)/2*E*h**2), solving for E we have\n", + "E = m*Vo**2*a**2/(2*(1/T-1)*h_bar**2*1.6e-019) # Energy of half of the electrons through the potential barrier, eV\n", + "print \"The energy of electrons through the potential barrier = %5.2f eV\"% E " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of electrons through the potential barrier = 40.96 eV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4 : : Pg: 126 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Zero point energy of a system \n", + "h = 6.626e-034 # Planck's constant, Js\n", + "x = 1.0e-02 # Displacement of the spring about its mean position, m\n", + "F = 1.0e-02 # Force applied to the spring-mass system, N\n", + "m = 1.0e-03 # Mass of attached to the spring, kg\n", + "# As F = k*x, k = 4*pi**2*f**2*m is the stiffness constant, solving for f, \n", + "f = sqrt(F/(4*pi**2*m*x)) # Frequency of oscillations of mass-spring system, Hz\n", + "U = 1.0/2*h*f # Zero point energy of the mass-spring system, J\n", + "print \"The zero point energy of the mass-spring system = %4.2e J\"% U " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The zero point energy of the mass-spring system = 1.67e-33 J\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5.ipynb new file mode 100755 index 00000000..e487ef7e --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 05 : Atomic Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1 : Pg:145 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#L-S coupling for two electrons\n", + "# For 2D(3/2) state\n", + "l2 = 1 # Orbital quantum number for p state\n", + "l1 = 1 # Orbital quantum number for p state\n", + "print \"The values of orbital quantum number L, for l1 = %d and l2 = %d are: \"%(l1, l2) \n", + "for L in range(l2-l1,l2+l1+1,1):\n", + " print \"%d \"% L, " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values of orbital quantum number L, for l1 = 1 and l2 = 1 are: \n", + "0 1 2 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2 : Pg:145 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Term values for L-S coupling\n", + "# For 2D(3/2) state\n", + "# Set-I values of L and S\n", + "L = 1 # Orbital quantum number\n", + "S = 1.0/2 # Spin quantum number\n", + "print \"The term values for L = %d and S = %2.1f (P-state) are:\"%(L, S) \n", + "J1 = 3.0/2 # Total quantum number\n", + "print \"%dP(%2.1f)\\t\"% (2*S+1,J1), \n", + "J2 = 1.0/2 # Total quantum number\n", + "print \"%dP(%2.1f)\"% (2*S+1,J2) \n", + "\n", + "# Set-II values of L and S\n", + "L = 2 # Orbital quantum number\n", + "S = 1.0/2 # Spin quantum number\n", + "print \"The term values for L = %d and S = %2.1f (P-state) are:\"%(L, S) \n", + "J1 = 5.0/2 # Total quantum number\n", + "print \"%dD(%2.1f)\\t\"% (2*S+1,J1), \n", + "J2 = 3.0/2 # Total quantum number\n", + "print \"%dD(%2.1f)\"% (2*S+1,J2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The term values for L = 1 and S = 0.5 (P-state) are:\n", + "2P(1.5)\t2P(0.5)\n", + "The term values for L = 2 and S = 0.5 (P-state) are:\n", + "2D(2.5)\t2D(1.5)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4 : Pg:146 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import acos, degrees, sqrt\n", + "#Angle between l and s for 2D(3/2) state\n", + "# For 2D(3/2) state\n", + "l = 2.0 # Orbital quantum number\n", + "s = 1.0/2 # Spin quantum number\n", + "j = l+s # Total quantum number\n", + "# Now by cosine rule of L-S coupling\n", + "# cos(theta) = (j*(j+1)-l*(l+1)-s*(s+1))/(2*sqrt(s*(s+1))*sqrt(l*(l+1))), solving for theta\n", + "theta = degrees(acos((l*(l+1)+s*(s+1)-j*(j+1))/(2*sqrt(s*(s+1))*sqrt(l*(l+1))))) # Angle between l and s for 2D(3/2) state\n", + "print \"The angle between l and s for 2D(3/2) state = %5.1f degrees\"% theta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle between l and s for 2D(3/2) state = 118.1 degrees\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..e487ef7e --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch5_1.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 05 : Atomic Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1 : Pg:145 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#L-S coupling for two electrons\n", + "# For 2D(3/2) state\n", + "l2 = 1 # Orbital quantum number for p state\n", + "l1 = 1 # Orbital quantum number for p state\n", + "print \"The values of orbital quantum number L, for l1 = %d and l2 = %d are: \"%(l1, l2) \n", + "for L in range(l2-l1,l2+l1+1,1):\n", + " print \"%d \"% L, " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values of orbital quantum number L, for l1 = 1 and l2 = 1 are: \n", + "0 1 2 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2 : Pg:145 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Term values for L-S coupling\n", + "# For 2D(3/2) state\n", + "# Set-I values of L and S\n", + "L = 1 # Orbital quantum number\n", + "S = 1.0/2 # Spin quantum number\n", + "print \"The term values for L = %d and S = %2.1f (P-state) are:\"%(L, S) \n", + "J1 = 3.0/2 # Total quantum number\n", + "print \"%dP(%2.1f)\\t\"% (2*S+1,J1), \n", + "J2 = 1.0/2 # Total quantum number\n", + "print \"%dP(%2.1f)\"% (2*S+1,J2) \n", + "\n", + "# Set-II values of L and S\n", + "L = 2 # Orbital quantum number\n", + "S = 1.0/2 # Spin quantum number\n", + "print \"The term values for L = %d and S = %2.1f (P-state) are:\"%(L, S) \n", + "J1 = 5.0/2 # Total quantum number\n", + "print \"%dD(%2.1f)\\t\"% (2*S+1,J1), \n", + "J2 = 3.0/2 # Total quantum number\n", + "print \"%dD(%2.1f)\"% (2*S+1,J2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The term values for L = 1 and S = 0.5 (P-state) are:\n", + "2P(1.5)\t2P(0.5)\n", + "The term values for L = 2 and S = 0.5 (P-state) are:\n", + "2D(2.5)\t2D(1.5)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4 : Pg:146 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import acos, degrees, sqrt\n", + "#Angle between l and s for 2D(3/2) state\n", + "# For 2D(3/2) state\n", + "l = 2.0 # Orbital quantum number\n", + "s = 1.0/2 # Spin quantum number\n", + "j = l+s # Total quantum number\n", + "# Now by cosine rule of L-S coupling\n", + "# cos(theta) = (j*(j+1)-l*(l+1)-s*(s+1))/(2*sqrt(s*(s+1))*sqrt(l*(l+1))), solving for theta\n", + "theta = degrees(acos((l*(l+1)+s*(s+1)-j*(j+1))/(2*sqrt(s*(s+1))*sqrt(l*(l+1))))) # Angle between l and s for 2D(3/2) state\n", + "print \"The angle between l and s for 2D(3/2) state = %5.1f degrees\"% theta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle between l and s for 2D(3/2) state = 118.1 degrees\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6.ipynb new file mode 100755 index 00000000..9150313f --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6.ipynb @@ -0,0 +1,267 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 06 : X Rays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of X-rays\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "V = 50000 # Potential difference, volts\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L_1 = h*c/(e*V) # wavelength of X-rays, m\n", + "L = L_1/1e-010 # wavelength of X-rays, angstorm\n", + "print \"The shortest wavelength of X-rays = %6.4f angstorm\"% L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The shortest wavelength of X-rays = 0.2475 angstorm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Planck's constant\n", + "L = 24.7e-012 # Wavelength of X-rays, m\n", + "V = 50000 # Potential difference, volts\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for h\n", + "h = e*V*L/c # Planck's constant, Joule second\n", + "print \"h = %3.1e Js \"% h " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h = 6.6e-34 Js \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Short wavelength limit \n", + "V = 50000 # Potential difference, volts\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L\n", + "L = h*c/(e*V) # Short wavelength limit of X-ray, m\n", + "print \"Short wavelength limit of X-ray = %6.4f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short wavelength limit of X-ray = 0.2484 angstorm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength limit of X-rays \n", + "V = 20000 # Potential difference, volt\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L\n", + "L = h*c/(e*V) # Wavelength limit of X-rays, m\n", + "print \"Short wavelength limit of X-ray = %6.4f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short wavelength limit of X-ray = 0.6210 angstorm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum voltage of an X-ray tube \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L = 1e-010 # Wavelength of X-rays, m\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for V\n", + "V = h*c/(L*e) # Potential difference, volts\n", + "print \"The minimum voltage of an X-ray tube = %5.2f kV\"% (V/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum voltage of an X-ray tube = 12.42 kV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum wavelength emitted by an X-ray tube \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "V = 4.5e+04 # Accelerating potential of X-ray tube, volt\n", + "# Since e*V = h*c/L_min # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L_min\n", + "L_min = h*c/(V*e) # Minimum wavelength emitted by an X-ray tube, m\n", + "print \"The minimum wavelength emitted by the X-ray tube = %5.3f angstrom\"% (L_min/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum wavelength emitted by the X-ray tube = 0.276 angstrom\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7: : Pg: 158 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Critical voltage for stimualted emission \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L_k = 0.178e-010 # Wavelength of k absorption egde of X-rays, m\n", + "# Since e*V_critical = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for V_critical\n", + "V_critical = h*c/(L_k*e) # Crtical voltage for stimulated enission, volt\n", + "print \"The critical voltage for stimulated emission = %4.1f kV\"% (V_critical/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical voltage for stimulated emission = 69.8 kV\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..9150313f --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch6_1.ipynb @@ -0,0 +1,267 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 06 : X Rays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of X-rays\n", + "h = 6.6e-034 # Planck's constant, J-s\n", + "V = 50000 # Potential difference, volts\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L_1 = h*c/(e*V) # wavelength of X-rays, m\n", + "L = L_1/1e-010 # wavelength of X-rays, angstorm\n", + "print \"The shortest wavelength of X-rays = %6.4f angstorm\"% L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The shortest wavelength of X-rays = 0.2475 angstorm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Planck's constant\n", + "L = 24.7e-012 # Wavelength of X-rays, m\n", + "V = 50000 # Potential difference, volts\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for h\n", + "h = e*V*L/c # Planck's constant, Joule second\n", + "print \"h = %3.1e Js \"% h " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h = 6.6e-34 Js \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3 : : Pg: 156 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Short wavelength limit \n", + "V = 50000 # Potential difference, volts\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L\n", + "L = h*c/(e*V) # Short wavelength limit of X-ray, m\n", + "print \"Short wavelength limit of X-ray = %6.4f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short wavelength limit of X-ray = 0.2484 angstorm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength limit of X-rays \n", + "V = 20000 # Potential difference, volt\n", + "h = 6.624e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L\n", + "L = h*c/(e*V) # Wavelength limit of X-rays, m\n", + "print \"Short wavelength limit of X-ray = %6.4f angstorm\"% (L/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Short wavelength limit of X-ray = 0.6210 angstorm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum voltage of an X-ray tube \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L = 1e-010 # Wavelength of X-rays, m\n", + "# Since e*V = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for V\n", + "V = h*c/(L*e) # Potential difference, volts\n", + "print \"The minimum voltage of an X-ray tube = %5.2f kV\"% (V/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum voltage of an X-ray tube = 12.42 kV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6 : : Pg: 157 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Minimum wavelength emitted by an X-ray tube \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "V = 4.5e+04 # Accelerating potential of X-ray tube, volt\n", + "# Since e*V = h*c/L_min # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for L_min\n", + "L_min = h*c/(V*e) # Minimum wavelength emitted by an X-ray tube, m\n", + "print \"The minimum wavelength emitted by the X-ray tube = %5.3f angstrom\"% (L_min/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum wavelength emitted by the X-ray tube = 0.276 angstrom\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7: : Pg: 158 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Critical voltage for stimualted emission \n", + "h = 6.625e-034 # Planck's constant, Js\n", + "c = 3e+08 # Velocity of light, m/s\n", + "e = 1.6e-019 # Charge of an electron, coulombs\n", + "L_k = 0.178e-010 # Wavelength of k absorption egde of X-rays, m\n", + "# Since e*V_critical = h*c/L # Energy required by an electron to move through a potential barrier of one volt, joules\n", + "# solving for V_critical\n", + "V_critical = h*c/(L_k*e) # Crtical voltage for stimulated enission, volt\n", + "print \"The critical voltage for stimulated emission = %4.1f kV\"% (V_critical/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical voltage for stimulated emission = 69.8 kV\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7.ipynb new file mode 100755 index 00000000..50d12f32 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7.ipynb @@ -0,0 +1,168 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 07 : Molecular Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1 : : Pg: 170 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#Frequency of oscillation of a hydrogen molecule\n", + "K = 4.8e+02 # Force constant, N/m\n", + "m = 1.67e-027 # Mass of hydrogen atom, kg\n", + "mu = m/2 # Reduced mass of the system, kg\n", + "v = 1/(2*pi)*sqrt(K/mu) # Frequency of oscillation of a hydrogen molecule, Hz\n", + "print \"The frequency of oscillation of a hydrogen molecule = %3.1e Hz\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of oscillation of a hydrogen molecule = 1.2e+14 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.2: : Pg: 170 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#bond Length of carbon monoxide\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "c = 2.997e+010 # Speed of light, cm/s\n", + "B = 1.921 # Rotational constant for CO, per cm\n", + "nu_bar = 2*B # Wavenumber of first line in rotation spectra of CO, per cm\n", + "mu = 11.384e-027 # Reduced mass of the CO system, per cm\n", + "I = 2*h/(8*pi**2*nu_bar*c) # Moment of inertia of CO molecule about the axis of rotation, kg-m/s\n", + "r = sqrt(I/mu) # Bond length of CO molecule, m\n", + "print \"The bond length of CO molecule = %5.2f angstrom\"% (r/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bond length of CO molecule = 1.13 angstrom\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3: : Pg: 171 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Intensity ratio of J states for HCL molecule\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "K = 1.38e-23 # Boltzmann constant, J/K\n", + "T = 300 # Absolute room temperature, K\n", + "J1 = 0 # Rotational quantum number for ground level\n", + "J2 = 10 # Rotational quantum number for 10th level\n", + "EJ1 = J1*(J1+1)*1.3e-03 # Energy of ground level of HCL molecule, eV\n", + "EJ2 = J2*(J2+1)*1.3e-03 # Energy of 10th level of HCL molecule, eV\n", + "# As n10/n0 is propotional to (2J+1)*exp(-(EJ2-EJ1))/KT, so\n", + "I_ratio = (2*J2+1)/(2*J1+1)*exp(-(EJ2 - EJ1)/(K*T/e)) # Intensity ratio of J10 and J1 states\n", + "print \"The intensity ratio of J-states for HCL molecule = %4.2f\"% (I_ratio) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intensity ratio of J-states for HCL molecule = 0.08\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.4: : Pg: 171 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#CO molecule in lower state\n", + "R = 1.13e-010 # Bond length of CO molecule, m\n", + "h_red = 1.054e-034 # Reduced Planck's constant, Js\n", + "mu = 1.14e-026 # Reduced mass ofthe system, kg\n", + "J = 1 # Rotational quantum number for lowest state\n", + "I = mu*R**2 # Moment of inertia of CO molecule about the axis of rotation, kg-metre square\n", + "EJ = J*(J + 1)*h_red**2/(2*I) # Energy of the CO molecule in the lowest state, J\n", + "omega = sqrt(2*EJ/I) # Angular velocity of the CO molecule in the lowest state, rad per sec\n", + "print \"The energy of the CO molecule in the lowest state = %4.2e J\" %EJ \n", + "print \"The angular velocity of the CO molecule in the lowest state = %4.2e rad/sec\" %omega " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of the CO molecule in the lowest state = 7.63e-23 J\n", + "The angular velocity of the CO molecule in the lowest state = 1.02e+12 rad/sec\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..50d12f32 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch7_1.ipynb @@ -0,0 +1,168 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 07 : Molecular Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1 : : Pg: 170 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#Frequency of oscillation of a hydrogen molecule\n", + "K = 4.8e+02 # Force constant, N/m\n", + "m = 1.67e-027 # Mass of hydrogen atom, kg\n", + "mu = m/2 # Reduced mass of the system, kg\n", + "v = 1/(2*pi)*sqrt(K/mu) # Frequency of oscillation of a hydrogen molecule, Hz\n", + "print \"The frequency of oscillation of a hydrogen molecule = %3.1e Hz\"% v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of oscillation of a hydrogen molecule = 1.2e+14 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.2: : Pg: 170 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#bond Length of carbon monoxide\n", + "h = 6.626e-034 # Planck's constant, Js\n", + "c = 2.997e+010 # Speed of light, cm/s\n", + "B = 1.921 # Rotational constant for CO, per cm\n", + "nu_bar = 2*B # Wavenumber of first line in rotation spectra of CO, per cm\n", + "mu = 11.384e-027 # Reduced mass of the CO system, per cm\n", + "I = 2*h/(8*pi**2*nu_bar*c) # Moment of inertia of CO molecule about the axis of rotation, kg-m/s\n", + "r = sqrt(I/mu) # Bond length of CO molecule, m\n", + "print \"The bond length of CO molecule = %5.2f angstrom\"% (r/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bond length of CO molecule = 1.13 angstrom\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3: : Pg: 171 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Intensity ratio of J states for HCL molecule\n", + "e = 1.6e-019 # Energy equivalent of 1 eV, J/eV\n", + "K = 1.38e-23 # Boltzmann constant, J/K\n", + "T = 300 # Absolute room temperature, K\n", + "J1 = 0 # Rotational quantum number for ground level\n", + "J2 = 10 # Rotational quantum number for 10th level\n", + "EJ1 = J1*(J1+1)*1.3e-03 # Energy of ground level of HCL molecule, eV\n", + "EJ2 = J2*(J2+1)*1.3e-03 # Energy of 10th level of HCL molecule, eV\n", + "# As n10/n0 is propotional to (2J+1)*exp(-(EJ2-EJ1))/KT, so\n", + "I_ratio = (2*J2+1)/(2*J1+1)*exp(-(EJ2 - EJ1)/(K*T/e)) # Intensity ratio of J10 and J1 states\n", + "print \"The intensity ratio of J-states for HCL molecule = %4.2f\"% (I_ratio) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intensity ratio of J-states for HCL molecule = 0.08\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.4: : Pg: 171 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#CO molecule in lower state\n", + "R = 1.13e-010 # Bond length of CO molecule, m\n", + "h_red = 1.054e-034 # Reduced Planck's constant, Js\n", + "mu = 1.14e-026 # Reduced mass ofthe system, kg\n", + "J = 1 # Rotational quantum number for lowest state\n", + "I = mu*R**2 # Moment of inertia of CO molecule about the axis of rotation, kg-metre square\n", + "EJ = J*(J + 1)*h_red**2/(2*I) # Energy of the CO molecule in the lowest state, J\n", + "omega = sqrt(2*EJ/I) # Angular velocity of the CO molecule in the lowest state, rad per sec\n", + "print \"The energy of the CO molecule in the lowest state = %4.2e J\" %EJ \n", + "print \"The angular velocity of the CO molecule in the lowest state = %4.2e rad/sec\" %omega " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of the CO molecule in the lowest state = 7.63e-23 J\n", + "The angular velocity of the CO molecule in the lowest state = 1.02e+12 rad/sec\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8.ipynb new file mode 100755 index 00000000..cb64de0e --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8.ipynb @@ -0,0 +1,93 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 08 : Raman Effect & Spectroscopic Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1 : : Pg: 184 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Stokes and anti stokes wavelength\n", + "c = 3e+08 # Speed of light, m/s\n", + "Lo = 2537e-010 # Wavelength of the exciting line, metre\n", + "Ls = 2683e-010 # Wavelength of stokes line, metre\n", + "Lm = (Ls * Lo)/(Ls - Lo) # Raman shift, per m\n", + "print \"The Raman shift = %5.3e per cm\"% (1/Lm*1e-02) \n", + "Lo1 = 5461e-010 # Wavelength of exciting line for stokes wavelength, metre\n", + "Ls = (Lm * Lo1)/(Lm - Lo1) # Stokes wavelength for the new exciting line, metre\n", + "Las = (Lm * Lo1)/(Lm + Lo1) # Anti-Stokes wavelength for the new exciting line, metre\n", + "print \"The stokes wavelength for the new exciting line = %4d Angstrom\"% (Ls/1e-010) \n", + "print \"The anti-stokes wavelength for the new exciting line = %4d Angstrom\"% (Las/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Raman shift = 2.145e+03 per cm\n", + "The stokes wavelength for the new exciting line = 6185 Angstrom\n", + "The anti-stokes wavelength for the new exciting line = 4888 Angstrom\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2 : : Pg: 185 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of infrared absorption line\n", + "L1 = 4554 # wavelength of the stokes line, Angstorm\n", + "L2 = 4178 # wavelength of antistokes line, Angstorm\n", + "Lm = 2*L1*L2/(L1-L2) # Wavelength of infrared absorption line, Angstorm\n", + "print \"The Wavelength of infrared absorption line = %5.3e Angstorm\"% Lm " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Wavelength of infrared absorption line = 1.012e+05 Angstorm\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..cb64de0e --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch8_1.ipynb @@ -0,0 +1,93 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 08 : Raman Effect & Spectroscopic Techniques" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1 : : Pg: 184 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Stokes and anti stokes wavelength\n", + "c = 3e+08 # Speed of light, m/s\n", + "Lo = 2537e-010 # Wavelength of the exciting line, metre\n", + "Ls = 2683e-010 # Wavelength of stokes line, metre\n", + "Lm = (Ls * Lo)/(Ls - Lo) # Raman shift, per m\n", + "print \"The Raman shift = %5.3e per cm\"% (1/Lm*1e-02) \n", + "Lo1 = 5461e-010 # Wavelength of exciting line for stokes wavelength, metre\n", + "Ls = (Lm * Lo1)/(Lm - Lo1) # Stokes wavelength for the new exciting line, metre\n", + "Las = (Lm * Lo1)/(Lm + Lo1) # Anti-Stokes wavelength for the new exciting line, metre\n", + "print \"The stokes wavelength for the new exciting line = %4d Angstrom\"% (Ls/1e-010) \n", + "print \"The anti-stokes wavelength for the new exciting line = %4d Angstrom\"% (Las/1e-010) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Raman shift = 2.145e+03 per cm\n", + "The stokes wavelength for the new exciting line = 6185 Angstrom\n", + "The anti-stokes wavelength for the new exciting line = 4888 Angstrom\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2 : : Pg: 185 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Wavelength of infrared absorption line\n", + "L1 = 4554 # wavelength of the stokes line, Angstorm\n", + "L2 = 4178 # wavelength of antistokes line, Angstorm\n", + "Lm = 2*L1*L2/(L1-L2) # Wavelength of infrared absorption line, Angstorm\n", + "print \"The Wavelength of infrared absorption line = %5.3e Angstorm\"% Lm " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Wavelength of infrared absorption line = 1.012e+05 Angstorm\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} diff --git a/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9.ipynb b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9.ipynb new file mode 100755 index 00000000..65c5f331 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9.ipynb @@ -0,0 +1,207 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 09 : Interaction of charged Particle and Neutron With Matters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1 : Pg:201 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum energy transferred by alpha particles\n", + "E_alpha = 3e+06 # Incident energy of alpha particles, eV\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "M = 4*1.67e-027 # Mass of an alpha particle, kg\n", + "# As E_alpha = 1/2*M*v**2 so E_electron = 1/2*m*(2*v)**2\n", + "# From the two equations\n", + "E_electron = 4*E_alpha*m/M # Maximum energy of electron, eV\n", + "print \"The maximum energy transferred by alpha particles to the electron = %5.3f keV\"%(E_electron/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy transferred by alpha particles to the electron = 1.635 keV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2 : Pg:201 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of energy loss and range of deuteron and alpha particle\n", + "E_loss_P = 59 # Specific rate of energy loss per unit mass per unit area of proton, keV per mg cm square\n", + "R_prime_P = 50 # Range of proton, mg per cm\n", + "Z_D = 1 # Atomic number of deuteron\n", + "m_D = 2 # Mass of deuteron, units\n", + "E_loss_D = Z_D**2*E_loss_P # Specific rate of energy loss per unit mass per unit area of deuteron, keV per mg cm square\n", + "R_prime_D = R_prime_P*m_D/Z_D**2 # Range of deuteron, mg per cm square\n", + "Z_alpha = 2 # Atomic number of alpha particle\n", + "m_alpha = 4 # Mass of alpha particle, units\n", + "E_loss_alpha = Z_alpha**2*E_loss_P # Specific rate of energy loss per unit mass per unit area of alpha particle, keV per mg cm square\n", + "R_prime_alpha = R_prime_P*m_alpha/Z_alpha**2 # Range of alpha particle, mg per cm square\n", + "print \"The specific rate of energy loss per unit mass per unit area of deuteron = %2d keV per mg cm square\"% (E_loss_D) \n", + "print \"The range of deuteron = %3d mg per cm square\"% (R_prime_D) \n", + "print \"The specific rate of energy loss per unit mass per unit area of alpha particle = %2d keV per mg cm square\"% (E_loss_alpha) \n", + "print \"The range of alpha particle = %2d mg per cm square\"% (R_prime_alpha) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific rate of energy loss per unit mass per unit area of deuteron = 59 keV per mg cm square\n", + "The range of deuteron = 100 mg per cm square\n", + "The specific rate of energy loss per unit mass per unit area of alpha particle = 236 keV per mg cm square\n", + "The range of alpha particle = 50 mg per cm square\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Thickness of concrete collimator\n", + "rho = 2200e-03 # Density of concrete, g per cm\n", + "mu_m = 0.064 # Mass attenuation coefficient of concrete, cm square per g\n", + "mu = rho*mu_m # Linear attenuation coefficient o concrete, per cm\n", + "# As attenuation exponential is exp(-mu*x) = 1e+06, solving for x\n", + "x = -log(1e-06)/mu \n", + "print \"The required thickness of concrete to attenuate a collimated beam = %2d cm\"% x " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness of concrete to attenuate a collimated beam = 98 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Average number of collsions for thermalization of neutrons\n", + "A = 9.0 # Mass number of beryllium\n", + "xi = 2.0/A - 4.0/(3*A**2) # Logarithmic energy decrement of energy distribution of neutron\n", + "E0 = 2.0 # Initial energy of neutrons, MeV\n", + "En_prime = 0.025e-06 # Thermal energy of the neutrons, MeV\n", + "n = 1.0/xi*log(E0/En_prime) # Average number of collisions needed for neutrons to thermalize\n", + "En_half = 1.0/2*E0 # Half of the initial energy of neutrons, MeV\n", + "n_half = 1.0/xi*log(E0/En_half) # Number of collsions for half the initial energy of neutrons\n", + "print \"The average number of collsions for thermalization of neutrons = %2d\"% n \n", + "print \"The number of collsions for half the initial energy of neutrons = %3.1f\"% n_half " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average number of collsions for thermalization of neutrons = 88\n", + "The number of collsions for half the initial energy of neutrons = 3.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Change in voltage across a G.M. tube\n", + "e= 1.6e-019 # Charge on an electron, coulomb\n", + "W = 25 # Ionization potential of gas (Ar/N2), eV\n", + "E = 5e+06 # Energy of incident alpha particles, eV\n", + "C = 1e-010 # Capacity of the system, farad\n", + "N = E/W # Number of ions produced\n", + "delta_V = N*e/C # Change in voltage across the G.M. tube, volt\n", + "print \"The change in voltage across the G.M. tube = %3.1e volt\"% delta_V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in voltage across the G.M. tube = 3.2e-04 volt\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..65c5f331 --- /dev/null +++ b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/ch9_1.ipynb @@ -0,0 +1,207 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter 09 : Interaction of charged Particle and Neutron With Matters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1 : Pg:201 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum energy transferred by alpha particles\n", + "E_alpha = 3e+06 # Incident energy of alpha particles, eV\n", + "m = 9.1e-031 # Mass of an electron, kg\n", + "M = 4*1.67e-027 # Mass of an alpha particle, kg\n", + "# As E_alpha = 1/2*M*v**2 so E_electron = 1/2*m*(2*v)**2\n", + "# From the two equations\n", + "E_electron = 4*E_alpha*m/M # Maximum energy of electron, eV\n", + "print \"The maximum energy transferred by alpha particles to the electron = %5.3f keV\"%(E_electron/1e+03) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum energy transferred by alpha particles to the electron = 1.635 keV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2 : Pg:201 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Rate of energy loss and range of deuteron and alpha particle\n", + "E_loss_P = 59 # Specific rate of energy loss per unit mass per unit area of proton, keV per mg cm square\n", + "R_prime_P = 50 # Range of proton, mg per cm\n", + "Z_D = 1 # Atomic number of deuteron\n", + "m_D = 2 # Mass of deuteron, units\n", + "E_loss_D = Z_D**2*E_loss_P # Specific rate of energy loss per unit mass per unit area of deuteron, keV per mg cm square\n", + "R_prime_D = R_prime_P*m_D/Z_D**2 # Range of deuteron, mg per cm square\n", + "Z_alpha = 2 # Atomic number of alpha particle\n", + "m_alpha = 4 # Mass of alpha particle, units\n", + "E_loss_alpha = Z_alpha**2*E_loss_P # Specific rate of energy loss per unit mass per unit area of alpha particle, keV per mg cm square\n", + "R_prime_alpha = R_prime_P*m_alpha/Z_alpha**2 # Range of alpha particle, mg per cm square\n", + "print \"The specific rate of energy loss per unit mass per unit area of deuteron = %2d keV per mg cm square\"% (E_loss_D) \n", + "print \"The range of deuteron = %3d mg per cm square\"% (R_prime_D) \n", + "print \"The specific rate of energy loss per unit mass per unit area of alpha particle = %2d keV per mg cm square\"% (E_loss_alpha) \n", + "print \"The range of alpha particle = %2d mg per cm square\"% (R_prime_alpha) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific rate of energy loss per unit mass per unit area of deuteron = 59 keV per mg cm square\n", + "The range of deuteron = 100 mg per cm square\n", + "The specific rate of energy loss per unit mass per unit area of alpha particle = 236 keV per mg cm square\n", + "The range of alpha particle = 50 mg per cm square\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Thickness of concrete collimator\n", + "rho = 2200e-03 # Density of concrete, g per cm\n", + "mu_m = 0.064 # Mass attenuation coefficient of concrete, cm square per g\n", + "mu = rho*mu_m # Linear attenuation coefficient o concrete, per cm\n", + "# As attenuation exponential is exp(-mu*x) = 1e+06, solving for x\n", + "x = -log(1e-06)/mu \n", + "print \"The required thickness of concrete to attenuate a collimated beam = %2d cm\"% x " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness of concrete to attenuate a collimated beam = 98 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Average number of collsions for thermalization of neutrons\n", + "A = 9.0 # Mass number of beryllium\n", + "xi = 2.0/A - 4.0/(3*A**2) # Logarithmic energy decrement of energy distribution of neutron\n", + "E0 = 2.0 # Initial energy of neutrons, MeV\n", + "En_prime = 0.025e-06 # Thermal energy of the neutrons, MeV\n", + "n = 1.0/xi*log(E0/En_prime) # Average number of collisions needed for neutrons to thermalize\n", + "En_half = 1.0/2*E0 # Half of the initial energy of neutrons, MeV\n", + "n_half = 1.0/xi*log(E0/En_half) # Number of collsions for half the initial energy of neutrons\n", + "print \"The average number of collsions for thermalization of neutrons = %2d\"% n \n", + "print \"The number of collsions for half the initial energy of neutrons = %3.1f\"% n_half " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average number of collsions for thermalization of neutrons = 88\n", + "The number of collsions for half the initial energy of neutrons = 3.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5 : Pg:202 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Change in voltage across a G.M. tube\n", + "e= 1.6e-019 # Charge on an electron, coulomb\n", + "W = 25 # Ionization potential of gas (Ar/N2), eV\n", + "E = 5e+06 # Energy of incident alpha particles, eV\n", + "C = 1e-010 # Capacity of the system, farad\n", + "N = E/W # Number of ions produced\n", + "delta_V = N*e/C # Change in voltage across the G.M. tube, volt\n", + "print \"The change in voltage across the G.M. tube = %3.1e volt\"% delta_V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in voltage across the G.M. tube = 3.2e-04 volt\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..d7165aeb Binary files /dev/null and b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch1_e_accelerated.png differ 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 new file mode 100644 index 00000000..4257f446 Binary files /dev/null and b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch2_r_and__v_for_e.png differ 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 new file mode 100644 index 00000000..567b0e96 Binary files /dev/null and b/Atomic_and_Nuclear_Physics_by_N._Subrahmanyam,_B._Lal_And_J._Seshan/screenshots/ch5_L-S_coupling.png differ 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 new file mode 100644 index 00000000..492493b8 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter1.ipynb @@ -0,0 +1,2820 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98c010c55a73fcd7194a8654c95e19400d08da7a39526cc08cd5ba710fb56d16" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1:DC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1:pg-06" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "alpha0=0.0043; #Assigning values to the parameters\n", + "t=50;\n", + "R0=40;\n", + "R50=R0*(1+0.0043*50); # Calculating the risistance at 50 deg \n", + "print\"Resistance at 50 deg C is R50=\",round(R50,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance at 50 deg C is R50= 48.6 ohms\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2:pg-06" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R18=12.7; #Assigning values to the parameters\n", + "R50=14.3;\n", + "t1=18;\n", + "t2=50;\n", + "alpha0=(R50-R18)/(t2*R18-t1*R50);\n", + "alpha18=alpha0/(1+t1*alpha0);\n", + "R0=R18/(1+t1*alpha0); # Calculating resistance at 0 deg C\n", + "print\"Temperature coefficient at 0 deg C is alpha0=\",\"{:.2e}\".format(alpha0),\"/deg C\"\n", + "print\"temperature coefficient at 18 deg C is alpha18=\",\"{:.2e}\".format(alpha18),\"/deg C\"\n", + "print\"Resistance at 0 deg C is R0=\",round(R0,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature coefficient at 0 deg C is alpha0= 4.24e-03 /deg C\n", + "temperature coefficient at 18 deg C is alpha18= 3.94e-03 /deg C\n", + "Resistance at 0 deg C is R0= 11.8 ohms\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3:pg-07" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "alpha20=0.00403; #Assigning values to the parameters\n", + "t1=20;\n", + "t2=60;\n", + "R20=28.3;\n", + "R60=R20*(1+alpha20*(t2-t1)); # Calculating value of resistance at 60 deg C\n", + "print\"Resistance at 60 deg C is R60=\",round(R60,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance at 60 deg C is R60= 32.86 ohms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.4:pg-07" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R15=80; #Assigning values to the parameters\n", + "alpha0=0.004;\n", + "t1=15;\n", + "t2=50;\n", + "R0=R15/(1+alpha0*t1); # Calculating resistance at 0 deg C\n", + "R50=R0*(1+alpha0*t2); # Calculating resistance at 50 deg C\n", + "print\"Resistance value at 0 deg C\",round(R0,2),\"ohms\"\n", + "print\"Resistance value at 50 deg C\",round(R50,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance value at 0 deg C 75.47 ohms\n", + "Resistance value at 50 deg C 90.57 ohms\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5:pg-08" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R10=80; #Assigning values to the parameters\n", + "R60=96.6;\n", + "t1=10;\n", + "t2=60;\n", + "alpha0=(R60-R10)/(t2*R10-t1*R60);\n", + "print\"temperature coefficient at 0 deg C is alpha0=\",\"{:.2e}\".format(alpha0),\"/deg C\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature coefficient at 0 deg C is alpha0= 4.33e-03 /deg C\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6:pg-08" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t1=20; #Assigning values to the parameters\n", + "R1=45;\n", + "R2=48.5;\n", + "alpha0=0.004;\n", + "t2=((R2*(1+alpha0*t1))-45)/(alpha0*R1); #calculating average temperature\n", + "print\"Average temperature of winding at the end of the run when the resistance increases is t2=\",round(t2,2),\"deg C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average temperature of winding at the end of the run when the resistance increases is t2= 41.0 deg C\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7:pg-08" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t1=20.0; #Assigning values to the parameters\n", + "R1=18.0;\n", + "t2=50.0;\n", + "R2=20.0;\n", + "R3=21.0;\n", + "ts=15.0;\n", + "alpha0=(R2-R1)/(t2*R1-t1*R2);\n", + "t=((R3*(1+alpha0*20))-(R1))/(alpha0*R1);\n", + "print\" Temperature Coefficient at 0 deg C is t=\",round(t,2),\"deg C\"\n", + "trise=t-ts;\n", + "print\"mean temperature rise is trise=\",round(trise,2),\"deg C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature Coefficient at 0 deg C is t= 65.0 deg C\n", + "mean temperature rise is trise= 50.0 deg C\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.8:pg-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=5; #Assigning values to the parameters\n", + "R2=7;\n", + "R3=8;\n", + "Req=R1+R2+R3; # Calculating equivalent resistance\n", + "V=100;\n", + "I=V/Req;\n", + "V1=I*R1;\n", + "V2=I*R2;\n", + "V3=I*R3;\n", + "print\"Voltage across 5 Ohm resistor is V1\",round(V1,2),\"Volts\"\n", + "print\"Voltage across 7 Ohm resistor is V2\",round(V2,2),\"Volts\"\n", + "print\"Voltage across 8 Ohm resistor is V3\",round(V3,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across 5 Ohm resistor is V1 25.0 Volts\n", + "Voltage across 7 Ohm resistor is V2 35.0 Volts\n", + "Voltage across 8 Ohm resistor is V3 40.0 Volts\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9:pg-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=100; #Assigning values to the parameters\n", + "R1=5;\n", + "R2=10;\n", + "R3=20;\n", + "I1=V/R1;\n", + "I2=V/R2;\n", + "I3=V/R3;\n", + "Itot=I1+I2+I3; #Calculating total current\n", + "print\"Current through 5 Ohm resistor is I1=\",round(I1,2),\"Amperes\"\n", + "print\"Current through 10 Ohm resistor is I2=\",round(I2,2),\"Amperes\"\n", + "print\"Current through 20 Ohm resistor is I3=\",round(I3,2),\"Amperes\"\n", + "print\"Total current is Itot=\",round(Itot,2),\"Amperes\"\n", + "P=Itot*V;\n", + "print\"Power drawn from the source is P=\",round(P,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through 5 Ohm resistor is I1= 20.0 Amperes\n", + "Current through 10 Ohm resistor is I2= 10.0 Amperes\n", + "Current through 20 Ohm resistor is I3= 5.0 Amperes\n", + "Total current is Itot= 35.0 Amperes\n", + "Power drawn from the source is P= 3500.0 Watts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.10:pg-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=100; # Assigning values to the parameters\n", + "R1=5;\n", + "R2=10;\n", + "R3=15;\n", + "R4=20;\n", + "Req=R1+R2+R3+R4; #Equivalent resistance\n", + "V1=R1*V/Req;\n", + "V2=R2*V/Req;\n", + "V3=R3*V/Req;\n", + "V4=R4*V/Req;\n", + "print\"Voltage across 5 Ohms resistor is V1=\",round(V1,2),\"Volts\"\n", + "print\"Voltage across 10 Ohms resistor is V2\",round(V2,2),\"Volts\"\n", + "print\"Voltage across 15 Ohms resistor is V3=\",round(V3,2),\"Volts\"\n", + "print\"Voltage across 20 Ohms resistor is V4\",round(V4,2),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across 5 Ohms resistor is V1= 10.0 Volts\n", + "Voltage across 10 Ohms resistor is V2 20.0 Volts\n", + "Voltage across 15 Ohms resistor is V3= 30.0 Volts\n", + "Voltage across 20 Ohms resistor is V4 40.0 Volts\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.11:pg-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Itot=12.0; #Assigning values to parameters\n", + "R1=4.0;\n", + "R2=12.0;\n", + "R3=6.0;\n", + "Req=1.0/((1/R1)+(1/R2)+(1/R3)); #Equivalent resistance\n", + "V=Itot*Req;\n", + "I1=V/R1;\n", + "I2=V/R2;\n", + "I3=V/R3;\n", + "print\"Potential Difference across the parallel circuit is V=\",round(V,2),\"Volts\"\n", + "print\"Current through 4 Ohm resistor is I1=\",round(I1),\"A\"\n", + "print\"Current through 12 Ohm resistor is I2=\",round(I2),\"A\"\n", + "print\"Current through 6 Ohm resistor is I3=\",round(I3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential Difference across the parallel circuit is V= 24.0 Volts\n", + "Current through 4 Ohm resistor is I1= 6.0 A\n", + "Current through 12 Ohm resistor is I2= 2.0 A\n", + "Current through 6 Ohm resistor is I3= 4.0 A\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.12:pg-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I=5; #Assigning values to the parameters\n", + "I1=2;\n", + "R2=6;\n", + "I2=I-I1;\n", + "V=R2*I2;\n", + "R1=V/I1;\n", + "P=I1*I1*R1+I2*I2*R2;\n", + "print\"Value of R1=\",round(R1,2),\"ohms\"\n", + "print\"Power absorbed by the circuit is P=\",round(P,2),\"Watts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1= 9.0 ohms\n", + "Power absorbed by the circuit is P= 90.0 Watts\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.13:pg-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=8.0; # Assigning values to resistors\n", + "R2=6.0;\n", + "R3=3.0;\n", + "R4=18.0;\n", + "R5=5.0;\n", + "R=1/((1/R2)+(1/R3)); #simplifying the network\n", + "Rs1=R+R4;\n", + "Rs2=1/((1/Rs1)+(1/R5));\n", + "Rs3=R1+Rs2;\n", + "V=60;\n", + "I=V/Rs3; # Current through the simplified network\n", + "print\"Current through 8 Ohm resistor is I=\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through 8 Ohm resistor is I= 5.0 A\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14:pg-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=1.0; # Assigning values to resistors\n", + "R2=2.0;\n", + "R3=1.0;\n", + "R4=1.0;\n", + "R=R3+R4; # Simplifying the network\n", + "Req=1+(1/((1/R2)+(1/R)));\n", + "V=100;\n", + "I=V/Req;\n", + "I2=I*(R/(R+R2));\n", + "print\"Ammeter reading is=\",round(I2,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ammeter reading is= 25.0 A\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15:pg-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=1.0; # Assigning values to the parameters\n", + "R2=5.0;\n", + "R3=4.0;\n", + "R4=8.0;\n", + "R5=6.0;\n", + "R6=2.0;\n", + "R=R1+R2; #series connection\n", + "Ra=R5+R6;\n", + "Rb=1/((1/R4)+(1/Ra)) ;\n", + "Rc=R3+Rb;\n", + "Req=1/((1/R)+(1/Rc));\n", + "print\"Effective resistance is Req=\",round(Req,2),\"ohms\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance is Req= 3.43 ohms\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.16:pg-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=24.0; #Assigning values to parameters\n", + "R1=4.0;\n", + "R2=8.0;\n", + "R3=6.0;\n", + "R4=12.0;\n", + "Ra=1/((1/R1)+(1/R4)); # Simplifying the network\n", + "Rb=1/((1/R2)+(1/R3));\n", + "Rc=1/((1/Ra)+(1/Rb));\n", + "I=V/Rc;\n", + "print\"Battery current is I=\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Battery current is I= 15.0 A\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.17:pg-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=15.0; #Assigning values to parameters\n", + "R2=6.0;\n", + "R3=30.0;\n", + "R4=3.0;\n", + "R5=4.0;\n", + "V=10.0;\n", + "Ra=R1+R2; # Simplifying the circuit\n", + "Rb=R3+R4;\n", + "Rc=1/((1/Ra)+(1/Rb));\n", + "Req=Rc+R5;\n", + "I=V/Req;\n", + "print\"Battery current is I=\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Battery current is I= 0.59 A\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.18:pg-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=15.0; #Assigning parameters\n", + "R2=6.0;\n", + "R3=4.0;\n", + "R4=30.0;\n", + "R5=3.0;\n", + "Ra=1/((1/R2)+(1/R5)); # Simplifying the circuit\n", + "Rb=R3+Ra;\n", + "Rc=1/((1/R1)+(1/R4));\n", + "Req=Rb+Rc;\n", + "print\"Effective resistance is Req=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance is Req= 16.0 ohms\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.19:pg-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=30.0; #Assignign values to parameters\n", + "Rcf=2.0;\n", + "Ref=2.0;\n", + "Rec=2.4;\n", + "Rbc=2.0;\n", + "Rac=4.0;\n", + "Rae=2.0;\n", + "Rab=2.0;\n", + "Rad=2.0;\n", + "Red=1.0;\n", + "Rc=Rab+Rbc; # Simplifying the network\n", + "Re=Rcf+Ref;\n", + "Ra=1.0/((1.0/Rac)+(1.0/Rc));\n", + "Re1=1.0/((1.0/Re)+(1.0/Rec));\n", + "Ra1=Ra+Re1;\n", + "Re2=1.0/((1.0/Rae)+(1.0/Ra1));\n", + "Rd=Red+Re2;\n", + "Req=1.0/((1.0/Rd)+(1.0/Rad));\n", + "I=V/Req; # Calculation of battery current\n", + "print\"Effective resistance is Req=\",round(Req,2),\"ohms\"\n", + "print\"Battery current is I=\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance is Req= 1.06 ohms\n", + "Battery current is I= 28.2 A\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.20:pg-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=4.0; #Assigning values to parameters\n", + "R2=6.0;\n", + "R3=8.0;\n", + "R4=2.0;\n", + "Ra=1/((1/R1)+(1/R2)); # Simplifying the network\n", + "Rb=1/((1/R3)+(1/R4));\n", + "Req=Ra+Rb;\n", + "print\"Effective resistance is Req=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance is Req= 4.0 ohms\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.21:pg-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=5.0; #Assigning values to resistors\n", + "R2=15.0;\n", + "R3=10.0;\n", + "R4=10.0;\n", + "R5=40.0;\n", + "R6=30.0;\n", + "R7=20.0;\n", + "R8=8.0;\n", + "Rc=R2+R3; #Simplifying the network\n", + "Re=R4+R5;\n", + "Rf=R6+R7;\n", + "R=1/((1/Re)+(1/Rf));\n", + "Rd=1/((1/R)+(1/Rc));\n", + "Req=Rd+R1+R8;\n", + "print\"Effective resistance=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective resistance= 25.5 ohms\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.22:pg-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=20; #Assigning values to different parameters\n", + "I=1.5;\n", + "R1=10;\n", + "R2=15;\n", + "R3=15;\n", + "V10=R1*I;\n", + "Vab=V-V10;\n", + "I1=Vab/R2;\n", + "I2=Vab/R3;\n", + "I3=I-I1-I2;\n", + "R=Vab/I3;\n", + "print\"Value of unknown resistance=\",round(R,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of unknown resistance= 6.0 ohms\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.23:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "P=36; #Assigning values to different parameters\n", + "V=60;\n", + "R1=12;\n", + "R2=18;\n", + "R3=36;\n", + "I1=sqrt(P/R1);\n", + "V12=I1*R1;\n", + "Vr=V-V12;\n", + "I2=V12/R2;\n", + "I3=V12/R3;\n", + "I=I1+I2+I3;\n", + "R=Vr/I;\n", + "print\"Value of unknown resistance=\",round(R,3),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of unknown resistance= 11.321 ohms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.24:pg-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=4.0; #Assigning values to parameters\n", + "R2=9.0;\n", + "R3=18.0;\n", + "R4=2.0;\n", + "R5=7.0;\n", + "R6=15.0;\n", + "V=125.0;\n", + "R7=(R2*R3)/(R2+R3);\n", + "Ra=R7+R1;\n", + "Rb=R5+R4;\n", + "R=(1/((1/Ra)+(1/Rb)))+R6;\n", + "I=V/R;\n", + "I1=(Rb/(Ra+Rb))*I;\n", + "IR3=I1*Rb/(Rb+R3);\n", + "VR3=IR3*R3;\n", + "I2=I-I1;\n", + "P4=I2*I2*R5;\n", + "print\"current I=\",round(I,2),\"A\"\n", + "print\"Current in 15 Ohm resistor=\",round(I1,2),\"A\"\n", + "print\"Current in 18 Ohm resistor=\",round(IR3,2),\"A\"\n", + "print\"current in 7 ohm resistor=\",round(I2,2),\"A\"\n", + "print\"Voltage across 18 Ohm resistor=\",round(VR3,2),\"Volts\"\n", + "print\"Power dissipated in 7 Ohm resistor=\",round(P4,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current I= 6.33 A\n", + "Current in 15 Ohm resistor= 3.0 A\n", + "Current in 18 Ohm resistor= 1.0 A\n", + "current in 7 ohm resistor= 3.33 A\n", + "Voltage across 18 Ohm resistor= 18.0 Volts\n", + "Power dissipated in 7 Ohm resistor= 77.78 Watts\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.26:pg-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I1=5.0; #Assigning values to parameters\n", + "R1=2.0;\n", + "V1=6.0;\n", + "I2=2.0;\n", + "R2=4.0;\n", + "V2=I1*R1; #Performing source transformation\n", + "V=V2-V1;\n", + "I3=V/R1;\n", + "I=I3+I2;\n", + "IR2=I*R1/(R1+R2);\n", + "print\"Current in 4 ohm resistor using source transformation\",round(IR2,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 4 ohm resistor using source transformation 1.33 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.27:pg-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=6.0; #Assigning values to parameters\n", + "R1=2.0;\n", + "R2=6.0;\n", + "R3=2.0;\n", + "I1=3.0;\n", + "R4=1.0;\n", + "R5=3.0;\n", + "I2=V1/R1; #Performing source transformation\n", + "R6=(R2*R3)/(R2+R3);\n", + "V2=I2*R6;\n", + "R7=R6+R1;\n", + "I3=V2/R7;\n", + "I4=I1+I3;\n", + "IR5=I4*R7/(R7+R4+R5);\n", + "print\"Current in 3 Ohm resistor using source transformation=\",round(IR5,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 3 Ohm resistor using source transformation= 2.0 A\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.28:pg-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=4.0; #Assigning values to parameters\n", + "V1=7.0;\n", + "R2=2.0;\n", + "R3=4.0;\n", + "I1=8.0;\n", + "R4=6.0;\n", + "R5=9.0;\n", + "V2=12.0;\n", + "R6=10.0;\n", + "I2=V1/R1; #Performing source transformation\n", + "V3=I1*R2;\n", + "I3=V2/R5;\n", + "R7=R2+R3;\n", + "I4=V3/R7;\n", + "R=1/((1/R1)+(1/R7)+(1/R4)+(1/R5));\n", + "I=I2+I3-I4;\n", + "V=I*R;\n", + "IR6=V/(R+R6)\n", + "print\"Current in 10 Ohm resistor using source transformation\",round(IR6,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 10 Ohm resistor using source transformation 0.052 A\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.29:pg-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=3; #Assigning values to parameters\n", + "R2=2;\n", + "R3=4;\n", + "V1=35;\n", + "V2=40;\n", + "A=[5,2],[3,-4] #Matrix of I1,I2 by KVL equations\n", + "B=[35],[-5]\n", + "a=inv(A)\n", + "I=np.dot(a,B)# I matrix has I1 and I2 values\n", + "I1=I[0][0]\n", + "I2=I[1][0]\n", + "print\"Current in 3 ohm resistor=\",round(I1,2),\"A\"\n", + "print\"Current in 4 ohm resistor\",round(I2,2),\"A\"\n", + "I3=I1+I2\n", + "print\"Current in 2 ohm resistor\",round(I3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 3 ohm resistor= 5.0 A\n", + "Current in 4 ohm resistor 5.0 A\n", + "Current in 2 ohm resistor 10.0 A\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.30:pg-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=2.0; #Assigning values to parameters\n", + "R2=3.0;\n", + "R3=4.0;\n", + "R4=5.0;\n", + "R5=1.0;\n", + "A=[3,-3],[9,12] #Matrix of I1,I2 by KVL equations\n", + "B=[2],[4]\n", + "I=np.dot(inv(A),B)# I matrix has I1 and I2 values\n", + "I1=I[0][0]\n", + "I2=I[1][0]\n", + "print\"Current in 1 Ohm resistor is I1\",round(I1,2),\"A\"\n", + "print\"Current in 3 Ohm resistor is I2\",round(I2,3),\"A\"\n", + "IR2=1-I1\n", + "IR4=1-I1-I2\n", + "IR5=I1+I2\n", + "print\"Current in 2 Ohm resistor is IR2\",round(IR2,3),\"A\"\n", + "print\"Current in 4 Ohm resistor is IR4\",round(IR4,3),\"A\"\n", + "print\"Current in 5 Ohm resistor is IR5 \",round(IR5,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 1 Ohm resistor is I1 0.57 A\n", + "Current in 3 Ohm resistor is I2 -0.095 A\n", + "Current in 2 Ohm resistor is IR2 0.429 A\n", + "Current in 4 Ohm resistor is IR4 0.524 A\n", + "Current in 5 Ohm resistor is IR5 0.476 A\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.31:pg-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "A=[1,-5,3],[5,-1,-9],[7,1,-5] #Matrix of I1,I2,I3 Coeffecients by KVL equations\n", + "B=[0],[0],[1];\n", + "a=inv(A)\n", + "I=np.dot(a,B)\n", + "I1=I[0][0]+I[1][0]\n", + "print\"Current supplied by the battery is I1=\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current supplied by the battery is I1= 0.3 A\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.32:pg-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "A=[0,6,-2],[3,4,1],[1,2,-4] #Matrix of I1,I2,I3 Coeffecients by KVL equations\n", + "B=[9],[24],[-4]\n", + "a=inv(A)\n", + "I=np.dot(a,B)\n", + "I1=I[1][0]\n", + "print\"Current in 20 Ohm resistor=\",round(I1,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 20 Ohm resistor= 2.554 A\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.38:pg-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=2.0; #Assigning values to parameters\n", + "R2=2.0;\n", + "R3=4.0;\n", + "R4=6.0;\n", + "R5=6.0;\n", + "R6=2.0;\n", + "R7=7.0;\n", + "Ra=R6*R3/(R3+R5+R6); #Converting Delta to Star\n", + "Rb=R5*R6/(R3+R5+R6);\n", + "Rc=R3*R5/(R3+R5+R6);\n", + "R8=Rc+R4;\n", + "R9=Rb+R7;\n", + "R10=(R8*R9)/(R8+R9);\n", + "R=R1+R2+Ra+R10;\n", + "print\"Equivalent resistor of the network using Star-Delta transformation=\",round(R,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistor of the network using Star-Delta transformation= 8.67 ohms\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.40:pg-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=6.0; #Assigning values to parameters\n", + "R2=8.0;\n", + "R3=5.0;\n", + "R4=10.0;\n", + "R5=5.0;\n", + "R6=10.0;\n", + "R7=15.0;\n", + "V=100.0;\n", + "Rx=R3+R6+(R3*R6)/R4; #Converting Star to Delta\n", + "Ry=R4+R6+(R4*R6)/R3;\n", + "Rz=R3+R4+(R3*R4)/R6;\n", + "Ra=(R5*Rx)/(Rx+R5);\n", + "Rb=(Ry*R7)/(Ry+R7);\n", + "Rl=(R1*R2)/(R1+R2+Rz); #Converting Delta to Star\n", + "Rm=(R1*Rz)/(R1+R2+Rz);\n", + "Rn=(R2*Rz)/(R1+R2+Rz);\n", + "R8=Ra+Rm;\n", + "R9=Rb+Rn;\n", + "R10=(R8*R9)/(R8+R9);\n", + "R=R10+Rl;\n", + "I=V/R;\n", + "print\"Current in the circuit=\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in the circuit= 15.4 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.41:pg-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=8.0; #Assigning values to parameters\n", + "R2=4.0;\n", + "R3=12.0;\n", + "R4=12.0;\n", + "R5=34.0;\n", + "R6=30.0;\n", + "R7=30.0;\n", + "R8=17.0;\n", + "R9=13.0;\n", + "R10=R1+R2;\n", + "R11=R8+R9;\n", + "Ra=(R10*R3)/(R3+R4+R10); #Converting Delta to Star\n", + "Rb=(R3*R4)/(R3+R4+R10);\n", + "Rc=(R10*R4)/(R3+R4+R10);\n", + "Rx=(R6*R7)/(R6+R7+R11); #Converting Delta to Star\n", + "Ry=(R7*R11)/(R6+R7+R11);\n", + "Rz=(R6*R11)/(R6+R7+R11);\n", + "Rl=R5+Ra+Rx;\n", + "Rm=Rc+Ry;\n", + "Rn=(Rl*Rm)/(Rl+Rm);\n", + "Req=Rb+Rz+Rn;\n", + "print\"Equivalent resistance of the network=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistance of the network= 24.84 ohms\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.42:pg-57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=6.0; #Assigning values to parameters\n", + "R2=6.0;\n", + "R3=3.0;\n", + "R4=12.0;\n", + "R5=12.0;\n", + "R6=12.0;\n", + "R7=3.0;\n", + "Ra=(R4*R5)/(R4+R5+R6); #Converting Delta to Star\n", + "Rb=(R4*R6)/(R4+R5+R6);\n", + "Rc=(R5*R6)/(R4+R5+R6);\n", + "Rd=R3+Rb;\n", + "Re=R7+Rc;\n", + "Rf=(R1*R2)/(R1+R2);\n", + "Rh=(Rd*Re)/(Rd+Re);\n", + "Req=Ra+Rf+Rh;\n", + "print\"Equivalent resistance of the network is Req=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistance of the network is Req= 10.5 ohms\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.43:pg-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=6.0; #Assigning values to parameters\n", + "R2=4.0;\n", + "R3=3.0;\n", + "R4=5.0;\n", + "R5=5.0;\n", + "R6=2.0;\n", + "R7=4.0;\n", + "Rx=R3+R4+(R3*R4)/R6; #Converting Star to Delta\n", + "Ry=R4+R6+(R4*R6)/R3;\n", + "Rz=R3+R6+(R3*R6)/R4;\n", + "Ra=(R5*Rz)/(R5+Rz);\n", + "Rb=(R7*Ry)/(R7+Ry);\n", + "Rl=(R1*R2)/(R1+R2+Rx); #Converting Delta to Star\n", + "Rm=(R2*Rx)/(R1+R2+Rx);\n", + "Rn=(R1*Rx)/(R1+R2+Rx);\n", + "Rp=Ra+Rn;\n", + "Rq=Rb+Rm;\n", + "Rr=(Rp*Rq)/(Rp+Rq);\n", + "Req=Rl+Rr;\n", + "print\"Eqivalent resistance of the network=\",round(Req,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Eqivalent resistance of the network= 3.85 ohms\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.44:pg-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "A=np.matrix([[-6,3],[3,-10.5]]) #Matrix of I1,I2 Coeffecients by Mesh analysis\n", + "B=np.matrix([[-12.5],[0]])\n", + "a=inv(A)\n", + "I=np.dot(a,B)\n", + "I1=I[0][0]\n", + "print\"current in 1 ohm resistor I1=\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " current in 1 ohm resistor I1= 2.43 A\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.45:pg-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "A=np.matrix([[7,-1,0],[1,-6,3],[0,3,-4]]) #Matrix of I1,I2,I3 Coeffecients by Mesh analysis\n", + "B=np.matrix([[17],[-25],[19]])\n", + "a=inv(A)\n", + "I=np.dot(a,B)\n", + "I1=I[0][0]\n", + "I2=I[1][0]\n", + "I3=I[2][0]\n", + "print\"I1=\",round(I1,2),\"A\"\n", + "print\"I2=\",round(I2,2),\"A\"\n", + "print\"I3=\",round(I3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I1= 2.95 A\n", + "I2= 3.65 A\n", + "I3= -2.01 A\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.47:pg-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I1=6.0;\n", + "R1=1.0;\n", + "R2=2.0;\n", + "R3=5.0;\n", + "V=10.0;\n", + "I2=(2*I1-10)/7;\n", + "IR2=(I1-I2);\n", + "print\"Current in 2 Ohm resistor=\",round(IR2,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 2 Ohm resistor= 5.71 A\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.48:pg-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "V1=60;\n", + "R1=20;\n", + "I=1.0;\n", + "R2=30;\n", + "R3=50;\n", + "V2=40;\n", + "R4=100;\n", + "A=[-1,1,0],[-20,-80,50],[0,50,-150] #Matrix of I1,I2,I3 Coeffecients by Mesh analysis\n", + "B=[1],[-20],[-40]\n", + "I1=np.dot(inv(A),B);\n", + "IR100=I1[1][0]\n", + "print\"Current in 100 Ohm resistor is IR100=\",round(IR100,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 100 Ohm resistor is IR100= 0.64 A\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.49:pg-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "V=50.0;\n", + "R1=10.0;\n", + "R2=5.0;\n", + "R3=3.0;\n", + "R4=2.0;\n", + "R5=1.0;\n", + "I=2.0;\n", + "A=[0,1,-1],[15,-12,-6],[-15,10,5] #Matrix of I1,I2,I3 Coeffecients by Mesh analysis\n", + "B=[2],[0],[-50]\n", + "I1=np.dot(inv(A),B)\n", + "I2=I1[0][0]\n", + "I3=I1[2][0]\n", + "IR5=I2-I3\n", + "print\"Current in 5 Ohm resistor is IR5=\",round(IR5,2),\"A\"\n", + "#the answer in the book is 14.67,which is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 5 Ohm resistor is IR5= 4.67 A\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.50:pg-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=20;\n", + "R2=10;\n", + "R3=15;\n", + "R4=10;\n", + "R5=10;\n", + "V1=100;\n", + "V2=80;\n", + "A=[13,-4],[1,-4] #Applying KCL at the two nodes\n", + "B=[300],[120]\n", + "V=np.dot(inv(A),B)\n", + "IR3=(V[0][0]-V[1][0])/R3;\n", + "print\"Current in 15 Ohm resistor is IR3\",round(IR3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 15 Ohm resistor is IR3 2.75 A\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.51:pg-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=0.2;\n", + "R2=0.3;\n", + "R3=0.1;\n", + "V1=120;\n", + "V2=110;\n", + "A=[5,-2],[1,-4] #Applying KCL at the two nodes\n", + "B=[358.2],[-324]\n", + "V=np.dot(inv(A),B)\n", + "I1=(120-V[0][0])/R1;\n", + "I2=(V[0][0]-V[1][0])/R2;\n", + "I3=(110-V[1][0])/R3;\n", + "print\"Current I1\",round(I1,2),\"A\"\n", + "print\"Current I1\",round(I2,2),\"A\"\n", + "print\"Current I1\",round(I3,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1 22.0 A\n", + "Current I1 19.0 A\n", + "Current I1 1.0 A\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.52:pg-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=2;\n", + "R2=4;\n", + "R3=4;\n", + "R4=2;\n", + "I1=2;\n", + "I2=4;\n", + "A=[2,-1],[1,-3]; #Applying KCL at the two nodes\n", + "B=[8],[-16];\n", + "V=np.dot(inv(A),B)\n", + "print\"Voltage at node A is V[0][0]=\",round(V[0][0],2),\"Volts\"\n", + "print\"Voltage at node B is V[1][0]=\",round(V[1][0],2),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage at node A is V[0][0]= 8.0 Volts\n", + "Voltage at node B is V[1][0]= 8.0 Volts\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.53:pg-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=2;\n", + "R2=10;\n", + "R3=5;\n", + "R4=15;\n", + "I1=1/3;\n", + "R5=3;\n", + "V1=10;\n", + "V2=18;\n", + "A=[8,-2],[3,-9]; #Applying KCL at the two nodes\n", + "B=[50],[-85];\n", + "V=np.dot(inv(A),B)\n", + "I1=(V1-V[0][0])/R1;\n", + "I5=(V[1][0]-V2)/R5;\n", + "print\"Current in 2 Ohm resistor is I1=\",round(I1,3),\"A\"\n", + "print\"Current in 3 Ohm resistor is I1=\",round(I5,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 2 Ohm resistor is I1= 0.303 A\n", + "Current in 3 Ohm resistor is I1= -1.81 A\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.54:pg-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "R1=2; #Assigning values to parameters\n", + "R2=10;\n", + "R3=2;\n", + "R4=5;\n", + "R5=1;\n", + "R6=4;\n", + "I1=28;\n", + "I2=2;\n", + "A=[11,-5,-1],[5,-17,10],[1,10,-13.5]; #Applying KCL at the two nodes\n", + "B=[280],[0],[20];\n", + "V=np.dot(inv(A),B)\n", + "I1=V[0][0]/R1;\n", + "I2=(V[0][0]-V[1][0])/R3;\n", + "I3=(V[0][0]-V[2][0])/R2;\n", + "I4=(V[1][0]-V[2][0])/R5;\n", + "I5=V[1][0]/R4;\n", + "I6=V[2][0]/R6;\n", + "print\"Current I1\",round(I1,2),\"A\"\n", + "print\"Current I2\",round(I2,2),\"A\"\n", + "print\"Current I3\",round(I3,2),\"A\"\n", + "print\"Current I4\",round(I4,2),\"A\"\n", + "print\"Current I5\",round(I5,2),\"A\"\n", + "print\"Current I6\",round(I6,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1 18.0 A\n", + "Current I2 8.0 A\n", + "Current I3 2.0 A\n", + "Current I4 4.0 A\n", + "Current I5 4.0 A\n", + "Current I6 4.0 A\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.55:pg-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=35.0; #Assigning values to parameters\n", + "R1=3.0;\n", + "R2=2.0;\n", + "R3=4.0;\n", + "V2=40.0;\n", + "Ra=((R2*R3)/(R2+R3))+R1; # Considering only 35V source\n", + "I=V1/Ra;\n", + "IR1=I;\n", + "IR3=I*(R2)/(R2+R3);\n", + "IR2=I-IR3;\n", + "Rb=((R1*R2)/(R1+R2))+R3; #Considering only 40V source\n", + "I1=V2/Rb;\n", + "I1R3=I1;\n", + "I1R1=I1*(R2)/(R2+R3);\n", + "I1R2=I1-I1R1;\n", + "Ires3=IR1-I1R1; # Adding the currents algebraically\n", + "Ires2=IR2+I1R2;\n", + "Ires4=I1R3-IR3;\n", + "print\"Current in 3 Ohm resistor using Superposition Theorem\",round(Ires3,2),\"A\"\n", + "print\"Current in 2 Ohm resistor using Superposition Theorem\",round(Ires2,2),\"A\"\n", + "print\"Current in 4 Ohm resistor using Superposition Theorem\",round(Ires4,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 3 Ohm resistor using Superposition Theorem 5.51 A\n", + "Current in 2 Ohm resistor using Superposition Theorem 10.51 A\n", + "Current in 4 Ohm resistor using Superposition Theorem 5.0 A\n" + ] + } + ], + "prompt_number": 120 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.56:pg-77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "I1=1; #Assigning values to parameters\n", + "R1=3;\n", + "R2=2;\n", + "R3=2;\n", + "R4=2;\n", + "R5=1;\n", + "Ra=(R1*R2)/(R1+R2);\n", + "Rb=(R3*R4)/(R3+R4);\n", + "Iab=(I1*Ra)/(Ra+Rb+R5);\n", + "A=[5,0,-2],[0,4,-2],[2,2,-5]; #Current coeffecients by applying KVL\n", + "B=[-1],[1],[0];\n", + "I=np.dot(inv(A),B)\n", + "IR5=I[2][0]+Iab;\n", + "print\"Current in 1 Ohm resistor\",round(IR5,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 1 Ohm resistor 0.031 A\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.57:pg-79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=10.0; #Assigning values to parameters\n", + "R1=10.0;\n", + "R2=1.0;\n", + "V2=8.0;\n", + "R3=8.0;\n", + "V3=12.0;\n", + "R4=20.0;\n", + "I20=V1/(R2+R4); # Considering only 10V source\n", + "Ia20=V3/(R2+R4); # Considering only 12V source\n", + "Ib20=V2/(R2+R4); # Considering only 8V source\n", + "I=Ia20+Ib20-I20; # Adding the currents algebraically\n", + "print\"Current through 20 Ohm resistor using Superposition principle\",round(I,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through 20 Ohm resistor using Superposition principle 0.476 A\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.58:pg-82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=4.0; #Assigning values to parameters\n", + "R1=2.0;\n", + "I1=1.0;\n", + "R2=1.0;\n", + "R3=3.0;\n", + "I2=3.0;\n", + "I1a=V1/(R1+R2); #Considering the current flow due to 4V voltage source\n", + "I1b=(I2*R1)/(R1+R2); #Considering the current flow due to 3A current source\n", + "I1c=(I1*R1)/(R2+R1); #Considering the current flow due to 1A current source\n", + "I=I1a+I1b+I1c;\n", + "print\"Current in 1 Ohm resistor using Superposition principle\",round(I,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 1 Ohm resistor using Superposition principle 4.0 A\n" + ] + } + ], + "prompt_number": 126 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.59:pg-83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=50.0; #Assigning values to parameters\n", + "V2=36.0;\n", + "R1=5.0;\n", + "R2=20.0;\n", + "R3=10.0;\n", + "I1=4.0;\n", + "R4=(R2*R3)/(R2+R3);\n", + "R5=R4+R1;\n", + "I5a=V1/R5; #Considering only 50V source\n", + "I5b=I1*(R4/(R4+R1)); #Considering only 4A current source\n", + "I2=V2/R3; #Converting 36V voltage source to 3.6A current source using source transformation\n", + "I5c=I2*(R4/(R4+R1)); #Considering only 3.6A current source\n", + "I=(I5b+I5c)-I5a; #Adding the currents algebraically\n", + "print\"Current through 5 Ohm resistor using Superposition principle\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through 5 Ohm resistor using Superposition principle 0.06 A\n" + ] + } + ], + "prompt_number": 132 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.60:pg-85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=80.0; #Assigning values to parametrs\n", + "V2=20.0;\n", + "I1=20.0;\n", + "R1=5.0;\n", + "R2=10.0;\n", + "R3=50.0;\n", + "R4=20.0;\n", + "R5=(R3*R4)/(R3+R4);\n", + "I10a=V1/(R1+R2+R5); #Considering only 80V voltage source\n", + "I2=V2/R4; #Converting 20V voltage source to 1A current source\n", + "I10b=(I2*R5)/(R1+R2+R5); #Considering only 1A current source\n", + "I10c=(I1*R1)/(R1+R2+R5); #Considering only 20A current source\n", + "I=I10b+I10c-I10a; #Adding the currents algebraically\n", + "print\"Current through 5 Ohm resistor using Superposition principle\",round(I,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through 5 Ohm resistor using Superposition principle 1.17 A\n" + ] + } + ], + "prompt_number": 131 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.61:pg-90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=10.0; #Assigning values to parameters\n", + "V2=20.0;\n", + "R1=6.0;\n", + "R2=1.0;\n", + "R3=2.0;\n", + "R4=3.0;\n", + "R5=5.0;\n", + "A=[7,-1],[1,-6] #Mesh current coeffecients\n", + "B=[10],[0]\n", + "I=np.dot(inv(A),B)\n", + "Vth=V2+R4*I[1][0]; #Calculation of Thevenin vlotage\n", + "Ra=(R1*R2)/(R1+R2);\n", + "Rb=Ra+R3;\n", + "Rth=(R4*Rb)/(R4+Rb); #Calculation of Thevenin current\n", + "I1=Vth/(Rth+R5)\n", + "print\"Current in 5 Ohm resistor using Thevenin theorem\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 5 Ohm resistor using Thevenin theorem 3.21 A\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.62:pg-92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=1.5; #Assignig values to parameters\n", + "R2=6;\n", + "R3=5;\n", + "R4=7.5;\n", + "R5=9;\n", + "V1=6;\n", + "V2=30;\n", + "A=[-22.5,7.5],[7.5,-12.5]; #Current coeffecients\n", + "B=[0],[30];\n", + "I=np.dot(inv(A),B)\n", + "Vth=(V1+R3*I[1][0]+R2*I[0][0])*-1; #Thevenin voltage\n", + "Ra=(R3*R4)/(R4+R3);\n", + "Rb=Ra+R2;\n", + "Rth=(Rb*R5)/(R5+Rb); #Thevenin resistance\n", + "I1=Vth/(Rth+R1)\n", + "print\"Current in 1.5 Ohm resistor\",round(I1,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 1.5 Ohm resistor 2.5 A\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.63:pg-94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=2.0;\n", + "V2=4.0;\n", + "R1=5.0;\n", + "R2=10.0;\n", + "R3=10.0;\n", + "R4=8.0;\n", + "R5=5.0;\n", + "A=[-15,10],[10,-25];\n", + "B=[-2],[4];\n", + "I=np.dot(inv(A),B)\n", + "Vth=V2+R1*I[1][0];\n", + "Ra=(R1*R2)/(R1+R2);\n", + "Rb=Ra+R3;\n", + "Rth=(Rb*R5)/(Rb+R5);\n", + "I1=Vth/(Rth+R4)\n", + "print\"Current in 8 Ohm resistor\",round(I1,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 8 Ohm resistor 0.281 A\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.64:pg-96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=8; #Assigning values to parameters\n", + "R2=4;\n", + "R3=12;\n", + "R4=12;\n", + "R5=34;\n", + "R6=30;\n", + "R7=30;\n", + "R8=17;\n", + "R9=13;\n", + "V=180;\n", + "R10=R1+R2;\n", + "R11=R8+R9;\n", + "Ra=(R10*R3)/(R3+R4+R10); #Converting Delta to Star\n", + "Rb=(R3*R4)/(R3+R4+R10);\n", + "Rc=(R10*R4)/(R3+R4+R10);\n", + "Rx=(R6*R7)/(R6+R7+R11); #Converting Delta to Star\n", + "Ry=(R7*R11)/(R6+R7+R11);\n", + "Rz=(R6*R11)/(R6+R7+R11);\n", + "Rp=R5+Ra+Rx;\n", + "Rm=Rc+Ry;\n", + "Rn=(Rp*Rm)/(Rp+Rm);\n", + "Rth=Rb+Rz+Rn;\n", + "I=V/(Rp+Rc+Rz);\n", + "Vth=Rp*I\n", + "Rl=10;\n", + "Il=Vth/(Rl+Rth);\n", + "print\"Current in 10 Ohm load using Thevenin theorem is\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 10 Ohm load using Thevenin theorem is 4.0 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.65:pg-101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=12.0; #Assigning values to parameters\n", + "V2=8.0;\n", + "I1=4.0;\n", + "R1=2.0;\n", + "R2=10.0;\n", + "R3=20.0;\n", + "R4=5.0;\n", + "R5=15.0;\n", + "R6=25.0;\n", + "R7=5.0;\n", + "A=[1,-1,0],[-12,-20,15],[0,15,-45]; #Current coeffecients\n", + "B=[4],[-12],[8];\n", + "I=np.dot(inv(A),B)\n", + "Vth=V1-R1*I[0][0]-R2*I[0][0]; #Thevenin voltage\n", + "Ra=R1+R2;\n", + "Rb=R6+R7;\n", + "Rc=(R5*Rb)/(R5+Rb);\n", + "Rd=R4+Rc;\n", + "Rth=(Ra*Rd)/(Ra+Rd); #Thevenin resistance\n", + "Il=Vth/(R3+Rth);\n", + "P=Il*Il*R3;\n", + "print\"Power drawn by 20 Ohm resistor\",round(P,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power drawn by 20 Ohm resistor 9.96 Watts\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.66:pg-103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "from numpy.linalg import inv\n", + "V1=150.0; #Assigning values to parameters\n", + "V2=50.0;\n", + "I1=13.0;\n", + "R1=15.0;\n", + "R2=60.0;\n", + "R3=40.0;\n", + "R4=30.0;\n", + "A=[-1,1],[-15,-100]; #Current coeffecients\n", + "B=[13],[-150];\n", + "I=np.dot(inv(A),B)\n", + "Vth=-V2+R3*I[1][0];#Thevenin voltage\n", + "Ra=R1+R2;\n", + "Rth=(R3*Ra)/(R3+Ra);#Thevenin resistance\n", + "I1=Vth/(R4+Rth)\n", + "print\" Current flowing in 20 Ohm resistor\",round(I1,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Current flowing in 20 Ohm resistor 1.248 A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.67:pg-105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=100.0; #Assigning values to parameters\n", + "R1=20.0;\n", + "R2=80.0;\n", + "R3=40.0;\n", + "R4=50.0;\n", + "I1=V/(R1+R2);\n", + "I2=V/(R3+R4);\n", + "Vth=R3*I2-R1*I1; #Calculating Thevenin voltage\n", + "Rth=((R1*R2)/(R1+R2))+((R3*R4)/(R3+R4)); # Calculating Thevenin resistance\n", + "Rl=5.0;\n", + "I1=Vth/(Rth+R1); #Calculating Thevenin current\n", + "Rla=10.0;\n", + "Ila=Vth/(Rth+Rla);\n", + "Rlb=20.0;\n", + "Ilb=Vth/(Rth+Rlb);\n", + "print\"Current in 5 Ohm load\",round(Il,4),\"A\"\n", + "print\"Current in 10 Ohm load\",round(Ila,3),\"A\"\n", + "print\"Current in 20 Ohm load\",round(Ilb,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 5 Ohm load 0.5656 A\n", + "Current in 10 Ohm load 0.507 A\n", + "Current in 20 Ohm load 0.4198 A\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.68:pg-108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=10.0; #Assigning values to parameters\n", + "R2=20.0;\n", + "R3=40.0;\n", + "R4=30.0;\n", + "R5=15.0;\n", + "V=2.0;\n", + "I1=V/(R1+R4);\n", + "I2=V/(R2+R5);\n", + "Vth=R2*I2-R1*I1; #Calculation of Thevenin voltage\n", + "Rth=((R1*R4)/(R1+R4))+((R2*R5)/(R2+R5)); #Calculation of Thevenin resistance\n", + "Il=Vth/(Rth+R3);\n", + "print\"Load current\",round(Il*1000,3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load current 11.465 mA\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.69:pg-110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=10.0; #Assigning values to parameters\n", + "R2=10.0;\n", + "R3=15.0;\n", + "R4=20.0;\n", + "V=100.0;\n", + "A=[-20,10],[10,-25] #Current coeffecients by KVL equations\n", + "B=[-100],[0];\n", + "I=np.dot(inv(A),B);\n", + "IN=I[1][0]; #Norton's current\n", + "RN=(R1*R2)/(R1+R2)+R3; #Norton's resistance\n", + "I1=(IN*RN)/(RN+RN);\n", + "print\"Current in load of 20 Ohm resistor using Norton theorem \",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in load of 20 Ohm resistor using Norton theorem 1.25 A\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.70:pg-112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I1=5.0; #Assigning values to parameters\n", + "I2=2.0;\n", + "V1=6.0;\n", + "R1=2.0;\n", + "R2=4.0;\n", + "I1=5.0;\n", + "I2=(R1*I1-6)/R1;\n", + "I3=I2+2;\n", + "IN=I3; #Calculation of Norton current\n", + "RN=R1; #Calculation of Norton resistance\n", + "I1=(IN*RN)/(RN+R2); #Calculation of load current using Norton theorem\n", + "print\"Current in 4 Ohm resistor by Norton theorem\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 4 Ohm resistor by Norton theorem 1.33 A\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.71:pg-114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I1=6.0; #Assigning values to parameters\n", + "V1=10.0;\n", + "V2=24.0;\n", + "R1=2.0;\n", + "R2=1.0;\n", + "R3=10.0;\n", + "R4=3.0;\n", + "R5=2.0;\n", + "R6=4.0;\n", + "A=[-13,10,1],[10,-15,3],[1,3,-4]; #Current coefficients using KVL equations\n", + "B=[-12],[10],[-24];\n", + "I=np.dot(inv(A),B);\n", + "IN=I[2][0]; #Norton current\n", + "Rx=R2+R3+(R2*R3)/R4; #Converting Star to Delta\n", + "Ry=R3+R4+(R3*R4)/R2;\n", + "Rz=R2+R4+(R2*R4)/R3;\n", + "Ra=(R1*Rx)/(R1+Rx);\n", + "Rb=(Ry*R5)/(Ry+R5);\n", + "Rc=Ra+Rb;\n", + "RN=(Rz*Rc)/(Rz+Rc); #Norton resistance\n", + "I1=(IN*RN)/(RN+R6);\n", + "print\"Current in 4 Ohm resistor using Nortonn Theorem\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 4 Ohm resistor using Nortonn Theorem 4.1 A\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.72:pg-117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "I1=6.0; #Assigning values to parameters\n", + "I2=2.0;\n", + "V=10.0;\n", + "V2=24.0;\n", + "R1=3.0;\n", + "R2=5.0;\n", + "R3=6.0;\n", + "R4=2.0;\n", + "R5=10.0;\n", + "R6=6.0;\n", + "R7=4.0;\n", + "R8=3.0;\n", + "A=[1,0,0],[0,-18,10],[0,10,-23]; #Current coefficients using KVL equations\n", + "B=[6],[-10],[12];\n", + "I=np.dot(inv(A),B)\n", + "IN=I[0][0]-I[1][0]; #Norton current\n", + "RN=((R5*(R6+R7+R8))/(R5+R6+R7+R8))+R3+R4; #Norton resistance\n", + "I1=(IN*RN)/(RN+R2)\n", + "print\"Current in 4 Ohm resistor using Nortonn Theorem\",round(I1,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 4 Ohm resistor using Nortonn Theorem 4.14 A\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.73:pg-121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=120.0; #Assigning values to parameters\n", + "R1=40.0;\n", + "R2=20.0;\n", + "R3=60.0;\n", + "Rth=((R1*R2)/(R1+R2))+R3; #Calculation of Thevenin Resistance\n", + "Rl=Rth; #For maximum power,load resistance should be equal to Thevenin resistance\n", + "I=V/(R1+R2); #Calculation of Circuit Current\n", + "Vth=R2*I; #Calculation of Thevenin Voltage\n", + "Pmax=(Vth*Vth)/(4*Rth); #Calculation of Maximum Power\n", + "print\"Maximum power by Maximum Power transfer theorem\",round(Pmax,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power by Maximum Power transfer theorem 5.45 Watts\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.74:pg-122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=10.0;\n", + "I=6.0;\n", + "R1=5.0;\n", + "R2=2.0;\n", + "R3=3.0;\n", + "R4=4.0;\n", + "Rth=((R1*R2)/(R1+R2))+R3+R4;\n", + "A=[-1,1],[-5,-2]; #Current coefficients using KVL equations\n", + "B=[6],[-10];\n", + "I=np.dot(inv(A),B);\n", + "Vth=R2*I[1][0];\n", + "Pmax=(Vth*Vth)/(4*Rth)\n", + "print\"Maximum Power\",round(Pmax,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Power 3.87 W\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.75:pg-124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=30.0; #Assigning values to parameters\n", + "I1=25.0;\n", + "I2=10.0;\n", + "R1=5.0;\n", + "R2=10.0;\n", + "R3=2.0;\n", + "R4=10.0;\n", + "Rth=((R3*(R1+R2))/(R3+R1+R2))\n", + "Rth=round(Rth,2)\n", + "A=[-1,1,0],[-15,-12,10],[0,10,-10]; #Current coefficients using KVL equations\n", + "B=[10],[-125],[30];\n", + "I=np.dot(inv(A),B);\n", + "Vth=V+R3*I[1][0];\n", + "Vth=round(Vth,2)\n", + "Pmax=(Vth*Vth)/(4*Rth)\n", + "print\"Maximum Power\",round(Pmax,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Power 491.45 W\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.76:pg-126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R1=2.0; #Assigning values to parameters\n", + "R2=4.0;\n", + "R3=1.0;\n", + "R4=5.0;\n", + "R5=8.0;\n", + "V=50.0;\n", + "Ra=(R1*R2)/(R1+R2+R4); #Converting Delta to Star\n", + "Rb=(R1*R4)/(R1+R2+R4);\n", + "Rc=(R2*R4)/(R1+R2+R4);\n", + "Rm=R3+Ra;\n", + "Rn=Rb+R5;\n", + "Rth=Rc+((Rm*Rn)/(Rm+Rn)); #Calculating Thevenin resistance\n", + "Rl=Rth;\n", + "Rp=R2+R4;\n", + "Rq=R3+R5;\n", + "Rr=(Rp*Rq)/(Rp+Rq);\n", + "I=V/(R1+Rr);\n", + "I1=I*Rp/(Rp+Rq);\n", + "I2=I*Rq/(Rp+Rq);\n", + "Vth=R3*I2-R2*I1; #Calculating Thevenin voltage\n", + "Pmax=(Vth*Vth)/(4*Rth); #Calculating Maximum Power\n", + "print\"Maximum Power\",round(Pmax,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Power 10.19 Watts\n" + ] + } + ], + "prompt_number": 97 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c85407d0 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter2.ipynb @@ -0,0 +1,2884 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f329daee8a85c43f59ee158b80238cd1ac536d329140648e381213663f0c2c1c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2:AC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1:pg-147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t=3*10**-3; #Assigning values to parameters\n", + "w=314;\n", + "Im=141.4*sin(math.pi/2);\n", + "f=w/(2*math.pi);\n", + "T=1/f;\n", + "t=3*(10**-3);\n", + "i=141.4*sin(w*t);\n", + "print\"Maximum value of current\",round(Im,2),\"A\"\n", + "print\"Frequency\",round(f,1),\"HZ\"\n", + "print\"Time period\",round(T,2),\"sec\"\n", + "print\"Instantaneous value of current at t=3 msec\",round(i,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of current 141.4 A\n", + "Frequency 50.0 HZ\n", + "Time period 0.02 sec\n", + "Instantaneous value of current at t=3 msec 114.36 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2:pg-147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f=60.0; #Assigning values to parameters\n", + "Im=12.0;\n", + "i=Im*sin(377/360)\n", + "print\"Current at t=1/360 sec\",round(i,2),\"A\"\n", + "i1=9.6;\n", + "t=math.asin(i1/Im)/377;\n", + "print\"Time taken to reach i1\",round(t,5),\"sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current at t=1/360 sec 10.1 A\n", + "Time taken to reach i1 0.00246 sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3:pg-148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "w=942.0; #Assigning values to parameters\n", + "Vm=10.0;\n", + "V=6.0;\n", + "t=math.asin(V/Vm)/w;\n", + "f=w/(2*math.pi);\n", + "T=1.0/f;\n", + "t2=t+T;\n", + "print\"Time taken to reach 6V second time=\",round(t2*1000,2),\"msec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to reach 6V second time= 7.35 msec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4:pg-150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "import math\n", + "V=integrate.quad(lambda t:20*sin(t),0,math.pi)\n", + "V1=V[0]\n", + "Vavg=V1/(2*math.pi)\n", + "print\"the average value of voltage is Vavg=\",round(Vavg,3),\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the average value of voltage is Vavg= 6.366 volts\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5:pg-152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate \n", + "#y=10*t,the current equation\n", + "T=4;\n", + "Res=integrate.quad(lambda t:10*t,0,2,)\n", + "Res=Res[0]/T\n", + "print\"Average current value\",round(Res,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current value 5.0 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6:pg-153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "#y=6*t,the voltage equation\n", + "T=3;\n", + "Res=integrate.quad(lambda t:6*t,0,3)\n", + "Res=Res[0]/T\n", + "print\"Average voltage value is Res=\",round(Res,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average voltage value is Res= 9.0 Volts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7:pg-153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=Vm*sin(t),the voltage Equation\n", + "#y1=0.866*Vm*sin(t)\n", + "T=math.pi;\n", + "Res1=integrate.quad(lambda t:Vm*sin(t),0,math.pi/3)\n", + "Res1=Res1[0] \n", + "Res2= integrate.quad(lambda t:0.866*Vm*sin(t),math.pi/3,math.pi/2)\n", + "Res2=Res2[0]\n", + "Res3=integrate.quad(lambda t:Vm*sin(t),math.pi/2,math.pi)\n", + "Res3=Res3[0]\n", + "Res=(Res1+Res2+Res3)/T\n", + "print\"Average voltage value\",round(Res,2),\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average voltage value 0.62 volts\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.8:pg-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1;\n", + "#y=Vm*sin(t) #Defining voltage equation\n", + "T=math.pi;\n", + "Res=integrate.quad(lambda t:Vm*sin(t),math.pi/6,math.pi)\n", + "Res=Res[0]/T\n", + "print\"Average voltage value\",round(Res,3),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average voltage value 0.594 Volts\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.10:pg-159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=Vm*Vm*sin(t)*sin(t), #Defining Voltage Equation\n", + "T=2*math.pi;\n", + "Res=(integrate.quad(lambda t:Vm*Vm*sin(t),0,math.pi))\n", + "Res=sqrt(Res[0]/T) \n", + "print\"Rms value of voltage\",round(Res,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms value of voltage 0.56 Volts\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.11:pg-160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=Vm*Vm*sin(t)*sin(t) #Defining Voltage Equation\n", + "T=2*math.pi;\n", + "Res=(integrate.quad(lambda t: Vm*Vm*sin(t)*sin(t),math.pi/4,math.pi))\n", + "Res=sqrt(Res[0]/T)\n", + "print\"Rms value of voltage\",round(Res,3),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms value of voltage 0.477 Volts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.12:pg-161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=Vm*Vm*sin(t)*sin(t),Defining Voltage Equation\n", + "#y1=0.866*0.866*Vm*Vm*sin(t)*sin(t)\n", + "T=math.pi;\n", + "Res1=(integrate.quad(lambda t:Vm*Vm*sin(t)*sin(t),0,math.pi/3))\n", + "Res2=(integrate.quad(lambda t:0.866*0.866*Vm*Vm*sin(t)*sin(t),math.pi/3,math.pi/2))\n", + "Res3=(integrate.quad(lambda t:Vm*Vm*sin(t)*sin(t),math.pi/2,math.pi))\n", + "VRms=sqrt((Res1[0]+Res2[0]+Res3[0])/T)\n", + "print\"Rms voltage value is=\",round(VRms,3),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms voltage value is= 0.68 Volts\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.13:pg-163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=10*t*10*t, Defining Current Equation\n", + "T=4;\n", + "Res=(integrate.quad(lambda t:10*t*10*t,0,2))\n", + "Irms=sqrt(Res[0]/T)\n", + "print\"Rms current value is Irms=\",round(Irms,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms current value is Irms= 8.16 A\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.14:pg-164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=sin(t)*sin(t),Defining Voltage Equation\n", + "T=math.pi;\n", + "Res=integrate.quad(lambda t:sin(t)*sin(t),math.pi/6,math.pi)\n", + "Res=sqrt(Res[0]/T)\n", + "print\"Rms voltage value\",round(Res,3),\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms voltage value 0.697 volts\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.15:pg-165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "Vm=1; #Assuming Vm=1\n", + "#y=sin(t+(math.pi/3))*sin(t+(math.pi/3)),Defining Voltage Equation\n", + "T=2*(math.pi/3);\n", + "Res=integrate.quad(lambda t:sin(t+(math.pi/3))*sin(t+(math.pi/3)),0,T)\n", + "Res=sqrt(Res[0]/T)\n", + "print\"Rms voltage value\",round(Res,4),\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms voltage value 0.7768 volts\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.16:pg-167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy import integrate\n", + "#y=(10+10*sin(t))*(10+10*sin(t)),Defining Current Equation\n", + "T=2*math.pi;\n", + "Res=integrate.quad(lambda t:(10+10*sin(t))*(10+10*sin(t)),0,2*math.pi)\n", + "Res=sqrt(Res[0]/T)\n", + "print\"Rms current value\",round(Res,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rms current value 12.25 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.17:pg-168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Im=62.35;\n", + "w=323;\n", + "#y=Im*sin(w*t), Defining Voltage Equation\n", + "fr=w/(2*math.pi);\n", + "Irms=Im/sqrt(2);\n", + "Iavg=0.637*Im;\n", + "formfac=Irms/Iavg;\n", + "print\"Maximum value of current\",round(Im,2),\"A\"\n", + "print\"Frequency\",round(fr,2),\"Hertz\"\n", + "print\"Rms value of current\",round(Irms,1),\"A\"\n", + "print\"Average value of current\",round(Iavg,1),\"A\"\n", + "print\"Form factor\",round(formfac,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of current 62.35 A\n", + "Frequency 51.41 Hertz\n", + "Rms value of current 44.1 A\n", + "Average value of current 39.7 A\n", + "Form factor 1.11\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.19:pg-175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V1=42.43+1j*0; #Defining voltage equations in rectangular form\n", + "V2=14.14+1j*24.49;\n", + "Va=V1+V2;\n", + "[Ro,Theta]=cmath.polar(Va);\n", + "Vm=Ro*sqrt(2);\n", + "print\"Maximum value of voltage considering addition of voltages\",round(Vm,2),\"Volts\"\n", + "#function, y=Ro*sin(t+Theta),Defining voltage equation\n", + "Vb=V1-V2;\n", + "[Ro1,Theta1]=cmath.polar(Vb);\n", + "Vm1=Ro1*sqrt(2);\n", + "#function y1=f(t),y1=Ro*sin(t+Theta1),Defining voltage equation\n", + "print\"Maximum value of voltage considering difference of voltages\",round(Vm1,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of voltage considering addition of voltages 87.18 Volts\n", + "Maximum value of voltage considering difference of voltages 52.92 Volts\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.21:pg-177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V1=17.68 #Defining voltage equations in rectangular form\n", + "V2=6.12+1j*3.54\n", + "V3=1j*21.21\n", + "V4=10-1j*10;\n", + "V=V1+V2+V3+V4;\n", + "[Ro,Theta]=cmath.polar(V);\n", + "Vm=Ro*sqrt(2)\n", + "t1=math.degrees(Theta)\n", + "#function y=f(t), y=Ro*sqrt(2)*sin(t+Theta), endfunction\n", + "print\"Maximum Voltage value\",round(Vm,2),\"Volts\"\n", + "print\"the value of Theta is=\",round(t1,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Voltage value 52.15 Volts\n", + "the value of Theta is= 23.58 degrees\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.22:pg-178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V1=36.75+1j*21.22 #Defining voltage equations in rectangular form\n", + "V2=-45.93-1j*26.52\n", + "V3=-50+1j*50;\n", + "V=-30.59+1j*94.15;\n", + "V4=V-(V1+V2+V3);\n", + "[Ro,Theta]=cmath.polar(V4);\n", + "t=math.degrees(Theta)\n", + "#function y=f(t), y=Ro*sqrt(2)*sin(t+Theta), endfunction\n", + "V=Ro*sqrt(2)\n", + "print\"Maximum Voltage value is=\",round(V,2),\"Volts\"\n", + "print\"the vlaue of Theta is=\",round(t,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Voltage value is= 80.78 Volts\n", + "the vlaue of Theta is= 59.97 degrees\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.23:pg-179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "I1=2.12+1j*3.67 #Defining current equations in rectangular form\n", + "I2=-3.07+1j*1.77\n", + "I3=-1.84+1j*1.06;\n", + "I4=-(I1+I2+I3);\n", + "[Ro,Theta]=cmath.polar(I4);\n", + "#function y=f(t), y=Ro*sqrt(2)*sin(t+Theta), endfunction\n", + "I=Ro*sqrt(2)\n", + "t=math.degrees(Theta)\n", + "print\"Maximum current value is I=\",round(I,2),\"A\"\n", + "print\"the value of Theta is t=\",round(t,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current value is I= 10.0 A\n", + "the value of Theta is t= -66.77 degrees\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.24:pg-181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=230 #Defining voltage equations in rectangular form\n", + "V2=-115+1j*200;\n", + "V3=-115-1j*200;\n", + "V=V1+V2+V3;\n", + "[Ro,Theta]=cmath.polar(V);\n", + "#function y=f(t), y=Ro*sqrt(2)*sin(t+Theta), endfunction\n", + "ER=Ro*sqrt(2)\n", + "\n", + "print\"Maximum Voltage value is ER=\",round(ER,2),\"Volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Voltage value is ER= 0.0 Volts\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.25:pg-181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=70.71 #Defining voltage equations in rectangular form\n", + "V2=1j*176.78\n", + "V3=91.86+1j*53.04\n", + "V4=100-1j*100;\n", + "V=V1+V2+V3+V4;\n", + "[Ro,Theta]=cmath.polar(V);\n", + "#function y=f(t), y=Ro*sqrt(2)*sin(t+Theta), endfunction\n", + "V=Ro*sqrt(2)\n", + "print\"Maximum Voltage value with V2 polarity as it is\",round(V,2),\"Volts\"\n", + "V=V1-V2+V3+V4;\n", + "[Ro1,Theta1]=cmath.polar(V);\n", + "#function y1=f(t), y1=Ro1*sqrt(2)*sin(t+Theta), endfunction\n", + "V=Ro1*sqrt(2)\n", + "print\"Maximum Voltage value with polarity of V2 reversed\",round(V,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Voltage value with V2 polarity as it is 414.24 Volts\n", + "Maximum Voltage value with polarity of V2 reversed 487.86 Volts\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.26:pg-190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "C=318*10**-6; #Assignig values to parameters\n", + "V=230.0;\n", + "f=50.0;\n", + "Xc=1.0/(2*math.pi*f*C);\n", + "I=V/Xc;\n", + "Vm=sqrt(2)*V;\n", + "Im=sqrt(2)*I;\n", + "#function y=f(t), y=Vm*sin(2*%pi*f*t),endfunction\n", + "#function y1=f(t), y1=Im*sin(2*%pi*f*t+%pi/2),endfunction\n", + "print\"Peak voltage value\",round(Vm,2),\"Volts\"\n", + "print\"Peak currnet value\",round(Im,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak voltage value 325.27 Volts\n", + "Peak currnet value 32.5 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.27:pg-190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "L=10*10**-3; #ASssigning values to parameters\n", + "Im=5; \n", + "w=2000;\n", + "#function y=f(t), y=Im*sin(w*t+%pi/2),endfunction\n", + "I=Im/sqrt(2);\n", + "Xl=2*math.pi*L;\n", + "Vm=L*Im*w;\n", + "Vl=Vm/sqrt(2);\n", + "print\"Voltage Vl\",round(Vl,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Vl 70.71 Volts\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.28:pg-191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=150; #Assigning values to parameters\n", + "f=50;\n", + "L=0.2;\n", + "Xl=2*math.pi*f*L;\n", + "Vm=V*sqrt(2);\n", + "I=V/Xl;\n", + "Im=sqrt(2)*I;\n", + "#function y=f(t), y=Vm*sin(2*%pi*f*t),endfunction\n", + "#function y1=f(t), y1=Im*sin(2*%pi*f*t-(%pi/2)) endfunction\n", + "print\"Maximum voltage value\",round(Vm,2),\"Volts\"\n", + "print\"Maximum current value\",round(Im,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage value 212.13 Volts\n", + "Maximum current value 3.38 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.29:pg-202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "R=7.0; #Assigning values to parametrs\n", + "L=31.8*10**-3;\n", + "V=230.0;\n", + "f=50.0;\n", + "Xl=2*math.pi*f*L;\n", + "Xl=round(Xl);\n", + "Zcoil=sqrt(R*R+Xl*Xl);\n", + "I=V/Zcoil;\n", + "Phi=math.atan(Xl/R);\n", + "Phi1=math.degrees(Phi)\n", + "PF=cos(Phi)\n", + "I=round(I,2);\n", + "P=V*I*0.574;\n", + "print\"Circuit Current=\",round(I,2),\"A\"\n", + "print\"Phase angle=\",round(Phi1),\"degrees\"\n", + "print\"Power factor=\",round(PF,2)\n", + "print\"Power consumed=\",round(P,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit Current= 18.84 A\n", + "Phase angle= 55.0 degrees\n", + "Power factor= 0.57\n", + "Power consumed= 2487.26 Watts\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.30:pg-203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=200.0; #Assigning values to parameters\n", + "R=20.0;\n", + "f=50.0;\n", + "L=0.1;\n", + "Xl=2*math.pi*f*L;\n", + "C=50*10**-6;\n", + "Xc=1.0/(2*math.pi*f*C);\n", + "X=Xc-Xl;\n", + "Z=R-1j*X;\n", + "[Ro,theta]=cmath.polar(Z)\n", + "I=V/Ro;\n", + "PF=cos(theta);\n", + "PF=round(PF,3);\n", + "I=round(I,2);\n", + "PA=V*I*PF;\n", + "PR=V*I*sin(theta);\n", + "P=V*I;\n", + "print\"Circuit Current=\",round(I,2),\"A\"\n", + "print\"Circuit Impedance=\",round(Ro,2),\"ohms\"\n", + "print\"Power Factor=\",round(PF,3)\n", + "print\"Active Power=\",round(PA,2),\"Watts\"\n", + "print\"Reactive Power=\",round(PR,1),\"VAR\"\n", + "print\"Apparen Power=\",round(P),\"VA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit Current= 5.27 A\n", + "Circuit Impedance= 37.94 ohms\n", + "Power Factor= 0.527\n", + "Active Power= 555.46 Watts\n", + "Reactive Power= -895.7 VAR\n", + "Apparen Power= 1054.0 VA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.31:pg-204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=200+1j*0; #Assigning values to parameters\n", + "R1=10;\n", + "R2=20;\n", + "R=R1+R2;\n", + "L1=0.05;\n", + "L2=0.1;\n", + "f=50;\n", + "Xl1=2*math.pi*f*L1;\n", + "Xl2=2*math.pi*f*L2;\n", + "Xl=Xl1+Xl2;\n", + "C=50*10**-6;\n", + "Xc=1/(2*math.pi*f*C);\n", + "X=Xc-Xl;\n", + "Z=R-1j*X;\n", + "[Ro,theta]=cmath.polar(Z);\n", + "I=V/Z;\n", + "Z1=R1+1j*Xl1;\n", + "Z2=R2-1j*(Xc-Xl2)\n", + "[Ro1,Theta1]=cmath.polar(Z1);\n", + "[Ro2,Theta2]=cmath.polar(Z2);\n", + "[ro,th]=cmath.polar(I);\n", + "V1=ro*Ro1;\n", + "V2=ro*Ro2;\n", + "print\"Circuit Current\",round(ro,2),\"A\"\n", + "print\"Voltage V1\",round(V1,1),\"Volts\"\n", + "print\"Voltage V2\",round(V2,1),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit Current 5.84 A\n", + "Voltage V1 108.7 Volts\n", + "Voltage V2 221.5 Volts\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.32:pg-205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=100+0*1j; #Assignig values to parametrs\n", + "Z1=17.32+10*1j;\n", + "V1=34.64-20*1j;\n", + "V2=V-V1;\n", + "[Ro,Theta]=cmath.polar(V2);\n", + "[ro,theta]=cmath.polar(Z1);\n", + "[r,t]=cmath.polar(V1);\n", + "I=Ro/r;\n", + "[ro1,t1]=cmath.polar(I);\n", + "I=round(I);\n", + "Z2=V2/I;\n", + "[r1,t1]=cmath.polar(Z2);\n", + "print\"Impedance Z2\",\"=\",Z2,\"=\",cmath.polar(Z2),\"=\",round(r1,3),\"ohms\"\n", + "# The answer in the book is wrong ,The value of I is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance Z2 = (32.68+10j) = (34.17575748977629, 0.2969500127663617) = 34.176 ohms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.33:pg-206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=150+180*1j; #Assigning values to parameters\n", + "I=5-4*1j;\n", + "Z=V/I;\n", + "print\"Impedance =\",Z,\"=\",round(Z.imag,1),\"ohms\"\n", + "[Ro,Theta]=cmath.polar(Z);\n", + "P=V*I*cos(Theta);\n", + "[r,t]=cmath.polar(P);\n", + "print\"Power consumed =\",round(r,4),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance = (0.731707317073+36.5853658537j) = 36.6 ohms\n", + "Power consumed = 30.0 Watts\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.34:pg-206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=127.28+1j*0; #Assigning values to parameters\n", + "I=1.251-1j*1.251\n", + "Z=V/I\n", + "[r1,t1]=cmath.polar(Z);\n", + "[Ro,Theta]=cmath.polar(I)\n", + "P=V*I*cos(Theta)\n", + "[r,t]=cmath.polar(P)\n", + "print\"Resistive and reactive part of impedance =\",Z,\"=\",cmath.polar(Z),\"=\",round(r1,3),\"ohms\"\n", + "print\"Average Power taken=\",round(r,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistive and reactive part of impedance = (50.8713029576+50.8713029576j) = (71.9428865782764, 0.7853981633974483) = 71.943 ohms\n", + "Average Power taken= 159.23 Watts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.35:pg-207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Z1=12.5+1j*21; #Assigning values to parameters\n", + "V=50+1j*0;\n", + "I1=V.real/Z1.real;\n", + "I2=0.722-0.723*1j;\n", + "Z=V/I2;\n", + "Z2=Z-Z1;\n", + "[r,t]=cmath.polar(Z2);\n", + "print\"Impedance Z2 =\",Z2,\"=\",cmath.polar(Z2),\"=\",round(r,3),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance Z2 = (22.0781134909+13.6260056149j) = (25.944385217897505, 0.5529507762186462) = 25.944 ohms\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.40:pg-212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#function v=f(t), v=200*sin(377*t), endfunction #Defining functions\n", + "#function i=f1(t), i=8*sin(377*t-%pi/6), endfunction\n", + "V=200.0/sqrt(2);#Assigning values to parameters\n", + "V=round(V,2);\n", + "I=8.0/sqrt(2);\n", + "I=round(I,2);\n", + "P=V*I*cos(math.pi/6)\n", + "print\"Active Power=\",round(P,3),\"Watts\"\n", + "Q=V*I*sin(math.pi/6);\n", + "print\"Reactive Power=\",round(Q,2),\"VAR\"\n", + "S=V*I;\n", + "print\"Apparent Power=\",round(S,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Active Power= 693.199 Watts\n", + "Reactive Power= 400.22 VAR\n", + "Apparent Power= 800.44 Watts\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.43:pg-215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "#function i=f(t), i=5*sin(314*t+2*%pi/3), endfunction; #Defining functions\n", + "#function v=f1(t), v=20*sin(314*t+5*%pi/6), endfunction;\n", + "I=-1.77+3.065*1j;\n", + "V=-12.24+7.07*1j;\n", + "Z=V/I;\n", + "[r,t]=cmath.polar(Z);\n", + "P=V*I*cos(t);\n", + "[ro,theta]=cmath.polar(P);\n", + "print\"Impedance =\",Z,\"=\",round(Z.real,3),\"ohms\"\n", + "print\"Average Power =\",round(ro,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance = (3.45924144606+1.99580510293j) = 3.459 ohms\n", + "Average Power = 43.33 Watts\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.45:pg-216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "import numpy as np\n", + "from numpy.linalg import inv\n", + "f=50.0;\n", + "I=5.0;\n", + "V=250.0;\n", + "I1=5.8\n", + "Z=V/I;\n", + "A=[1, (1/(2*math.pi*50))**2],[1, (1/(2*math.pi*60))**2]\n", + "B=[50**2],[43.1**2];\n", + "res=np.dot(inv(A),B);\n", + "r=res[0][0];\n", + "P=I1**2*(sqrt(r));\n", + "print\"Power absorbed =\",round(P,1),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power absorbed = 670.8 Watts\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.46:pg-218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#function vl=f(t), vl=300*sin(1000*t), endfunction; #Defining functions\n", + "R=20.0; #Assigning values to parameters\n", + "w=1000;\n", + "Z=R/cos(math.pi/4);\n", + "Xc=sqrt(Z*Z-R*R);\n", + "Xl=2*Xc;\n", + "L=Xl/w;\n", + "C=1.0/(w*Xc);\n", + "print\"Inductance Value=\",round(L,2),\"Henery\"\n", + "print\"Capacitance Value=\",round(C,6),\"farad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance Value= 0.04 Henery\n", + "Capacitance Value= 5e-05 farad\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.47:pg-219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Vr=10; #Assigning values to parameters\n", + "Vl=15;\n", + "Vc=10;\n", + "V=sqrt(Vr^2+(Vl-Vc)^2);\n", + "V=10+1j*0+0+1j*15+0-1j*10;\n", + "[r,t]=cmath.polar(V);\n", + "print\"Voltage=\",round(r,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage= 11.18 Volts\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.48:pg-219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "L=0.01; #Assigning value sto parameters\n", + "fr=50;\n", + "#function v=f(t), y=400*sin(3000*t-10),endfunction; #Defining functions\n", + "#function i=f1(t),i=10*sqrt(2)*cos(3000*t-55), endfunction;\n", + "V=278.54-1j*49.11;\n", + "I=8.191+5.7*1j;\n", + "Z=V/I;\n", + "[r,t]=cmath.polar(Z);\n", + "Xl=3000*L;\n", + "Xc=50;\n", + "C=1.0/(2*math.pi*fr*Xc);\n", + "print\"impedence Z=\",Z,\"=\",cmath.polar(Z),\"=\",round(r,2),\"ohms\"\n", + "print\"Capacitance C=\",round(C,5),\"farad\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "impedence Z= (20.0998621434-19.9828121374j) = (28.342851640290757, -0.7824779572137082) = 28.34 ohms\n", + "Capacitance C= 6e-05 farad\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.49:pg-221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Vr=25; #Assigning values to parameters\n", + "Vcoil=40;\n", + "Vc=55;\n", + "Vrcoil=50;\n", + "I=0.345;\n", + "C=20*10**-6;\n", + "Xc=Vc/I;\n", + "f=1/(2*math.pi*C*Xc);\n", + "R=Vr/I;\n", + "Zcoil=Vcoil/I;\n", + "Zrcoil=Vrcoil/I;\n", + "r=(Zrcoil**2-(R**2+Zcoil**2))/(2*R);\n", + "Xl=sqrt(Zcoil**2-r**2);\n", + "Z=sqrt((R+r)**2+(Xc-Xl)**2);\n", + "I=round(I,3);\n", + "Z=round(Z);\n", + "V=I*Z;\n", + "print\"Voltage=\",round(V,3),\"Volts\"\n", + "#The answer in the book is wrong,which is 35.046" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage= 34.155 Volts\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.50:pg-227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "R=10.0; #Assigning values to parameters\n", + "L=0.014;\n", + "C=100*10**-6;\n", + "wr=1.0/sqrt(L*C);\n", + "Q=(1.0/R)*(sqrt(L/C));\n", + "BW=R/L;\n", + "w1=wr-BW/2;\n", + "w2=wr+BW/2;\n", + "Vm=1;\n", + "V=1/sqrt(2);\n", + "Vc=(V/R)*sqrt(L/C);\n", + "print\"Resonant frequency=\",round(wr,2),\"rad/sec\"\n", + "print\"Quality factor=\",round(Q,3)\n", + "print\"Bandwidth=\",round(BW,2),\"rad/sec\"\n", + "print\"Lower frequency=\",round(w1),\"rad/sec\"\n", + "print\"Upper frequency=\",round(w2,2),\"rad/sec\"\n", + "print\"Maximum value of voltage across capacitor=\",round(Vc,3),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency= 845.15 rad/sec\n", + "Quality factor= 1.183\n", + "Bandwidth= 714.29 rad/sec\n", + "Lower frequency= 488.0 rad/sec\n", + "Upper frequency= 1202.3 rad/sec\n", + "Maximum value of voltage across capacitor= 0.837 Volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.51:pg-228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=10/sqrt(2); #Assigning values to parameters\n", + "Vc=500;\n", + "BW=400/(2*math.pi);\n", + "R=100;\n", + "Q=Vc/V;\n", + "BW=round(BW,2);\n", + "Q=round(Q,2);\n", + "fr1=(Q*BW);\n", + "f1=fr1-(BW/2);\n", + "f2=fr1+BW/2;\n", + "L=R/(2*math.pi*BW);\n", + "fr=1.0/(2*math.pi*sqrt(L*C));\n", + "C=1.0/(fr1*fr1*4*math.pi*math.pi*L);\n", + "print\"Resonant frequency=\",round(fr1,2),\"Hertz\"\n", + "print\"Lower frequency=\",round(f1,2),\"Hertz\"\n", + "print\"Upper frequency=\",round(f2,2),\"Hertz\"\n", + "print\"Inductor value=\",round(L,2),\"Hertz\"\n", + "print\"Capacitor value=\",round(C,9),\"Farads\"\n", + "# the answer of the capacitance in ths book is given in nF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency= 4501.4 Hertz\n", + "Lower frequency= 4469.57 Hertz\n", + "Upper frequency= 4533.23 Hertz\n", + "Inductor value= 0.25 Hertz\n", + "Capacitor value= 5e-09 Farads\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.52:pg-229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "f=1*10**6; #Assigning values to parameters\n", + "C1=500*10**-12;\n", + "C2=600810**-12;\n", + "Xl=1.0/(2*math.pi*f*C1);\n", + "L=Xl/(2*math.pi*f);\n", + "R=30.623;\n", + "Q=(1/R)*sqrt(L/C1);\n", + "print\"Resistance=\",round(R,2),\"ohms\"\n", + "print\"Inductance=\",round(L,9),\"Henery\"\n", + "print\"Quality Factor=\",round(Q,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance= 30.62 ohms\n", + "Inductance= 5.0661e-05 Henery\n", + "Quality Factor= 10.39\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.53:pg-230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "r=2.0; #Assigning values to parameters\n", + "L=0.01\n", + "V=230.0;\n", + "f=50.0;\n", + "C=1.0/(f*f*4*math.pi*math.pi*L);\n", + "Ir=V/r;\n", + "Vc=(V/r)*sqrt(L/C);\n", + "print\"Current across capacitor C=\",\"{:.3e}\".format(C),\"Farad\"\n", + "print\"Current I=\",round(Ir,2),\"A\"\n", + "print\"Voltage across the capacitor Vc=\",round(Vc,1),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current across capacitor C= 1.013e-03 Farad\n", + "Current I= 115.0 A\n", + "Voltage across the capacitor Vc= 361.3 Volts\n" + ] + } + ], + "prompt_number": 151 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.54:pg-230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "L=0.1; #Assigning values to parameters\n", + "R=10.0;\n", + "V=230.0;\n", + "f=50.0;\n", + "C=200*10**-6;\n", + "Xl=2*math.pi*f*L;\n", + "Xc=1.0/(2*math.pi*f*C);\n", + "Z=sqrt(R*R+(Xl-Xc)*(Xl-Xc));\n", + "I=V/Z;\n", + "Zcoil=sqrt(R*R+Xl*Xl);\n", + "Vcoil=I*Zcoil;\n", + "Vc=I*Xc;\n", + "print\"Circuit Current I=\",round(I,2),\"Amperes\"\n", + "print\"Coil impedance Zcoil=\",round(Zcoil,2),\"Ohms\"\n", + "print\"Volts\",\"Coil voltage Vcoil=\",round(Vcoil,1),\"Volts\"\n", + "print\"Capacitor Voltage Vc=\",round(Vc,2),\"Volts\"\n", + "fr=1.0/(2*math.pi*sqrt(L*C));\n", + "Ir=V/R;\n", + "Xl=2*math.pi*fr*L;\n", + "Xc=Xl;\n", + "Zcoil=sqrt(R*R+Xl*Xl);\n", + "Vcoil=Ir*Zcoil;\n", + "Vc=Ir*Xc;\n", + "print\"Circuit Current at resonance Ir=\",round(Ir,2),\"Amperes\"\n", + "print\"Coil impedance at resonance Zcoil=\",round(Zcoil,2),\"Ohms\"\n", + "print\"Coil voltage at resonance Vcoil=\",round(Vcoil,3),\"Volts\"\n", + "print\"Capacitor Voltage at resonance Vc=\",round(Vc,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit Current I= 12.47 Amperes\n", + "Coil impedance Zcoil= 32.97 Ohms\n", + "Volts Coil voltage Vcoil= 411.1 Volts\n", + "Capacitor Voltage Vc= 198.45 Volts\n", + "Circuit Current at resonance Ir= 23.0 Amperes\n", + "Coil impedance at resonance Zcoil= 24.49 Ohms\n", + "Coil voltage at resonance Vcoil= 563.383 Volts\n", + "Capacitor Voltage at resonance Vc= 514.3 Volts\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.55:pg-232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Vr=200.0; #Assiging values to parameters\n", + "P=15.3;\n", + "fr=10000.0;\n", + "BW=1000.0;\n", + "R=Vr**2/P;\n", + "Q=fr/BW;\n", + "L=Q*R/(2*math.pi*fr);\n", + "C=1.0/(4*math.pi*math.pi*fr*fr*L);\n", + "print\"resistance=\",round(R,2),\"ohms\"\n", + "print\"inductor=\",round(L,3),\"Henery\"\n", + "print\"Capacitor=\",round(C,9),\"Farad\"\n", + "#The answer of the capacitance in the book is given in the form of pF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance= 2614.38 ohms\n", + "inductor= 0.416 Henery\n", + "Capacitor= 1e-09 Farad\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.56:pg-236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "R=20.0; #Assigning values to parameters\n", + "L=31.8*10**-3;\n", + "V=230.0;\n", + "f=50.0;\n", + "I1=V/R;\n", + "Xl=2*math.pi*f*L;\n", + "I2=V/Xl;\n", + "I2=round(I2);\n", + "I=sqrt(I1*I1+I2*I2);\n", + "pf=I1/I;\n", + "pf=round(pf,3);\n", + "P=V*I*pf;\n", + "print\"Line current=\",round(I,2),\"A\"\n", + "print\"Power factor=\",round(pf,3)\n", + "print\"Power consumed=\",round(P,1),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Line current= 25.71 A\n", + "Power factor= 0.447\n", + "Power consumed= 2643.7 Watts\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.57:pg-238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=230+1j*0; #Assigning values to parameters\n", + "L=10*10**-3;\n", + "f=50.0;\n", + "R=10.0;\n", + "Xl=2*math.pi*f*L;\n", + "Xc=1.0/(2*math.pi*f*C);\n", + "Z1=10+1j*3.14;\n", + "Z2=10-1j*6.37;\n", + "Z=(Z1*Z2)/(Z1+Z2);\n", + "I=V/Z;\n", + "I1=V/Z1;\n", + "[r1,t1]=cmath.polar(I1);\n", + "I2=V/Z2;\n", + "[r2,t2]=cmath.polar(I2);\n", + "[r,t]=cmath.polar(Z1);\n", + "[ro,th]=cmath.polar(Z2);\n", + "[rot,tt]=cmath.polar(Z);\n", + "pf1=cos(t);\n", + "pf2=cos(th);\n", + "pft=cos(tt);\n", + "P1=I1*I1*R;\n", + "[r4,t4]=cmath.polar(P1);\n", + "P2=I2*I2*R;\n", + "[r5,t5]=cmath.polar(P2);\n", + "print\"Total Impedance=\",round(Z.real,2),\"Ohms\"\n", + "print\"Branch current I1=\",I1,\"=\",cmath.polar(I1),\"=\",round(r1,2),\"Amperes\"\n", + "print\"Branch current I2=\",I2,\"=\",cmath.polar(I2),\"=\",round(r2,3),\"Amperes\"\n", + "print\" Power factor of branch1=\",round(pf1,3)\n", + "print\" Power factor of branch2=\",round(pf2,3)\n", + "print\" Total Power factor=\",round(pft,3)\n", + "print\" Power consumed by branch 1=\",P1,\"=\",cmath.polar(P1),\"=\",round(r4,2),\"Watts\"\n", + "print\" Power consumed by branch 2=\",P2,\"=\",cmath.polar(P2),\"=\",round(r5,2),\"Watts\"\n", + "#In the book the answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Impedance= 6.1 Ohms\n", + "Branch current I1= (20.935812619-6.57384516237j) = (21.94364806128091, -0.3042508322379845) = 21.94 Amperes\n", + "Branch current I2= (16.3611517966+10.4220536945j) = (19.3986208613536, 0.5671820281530153) = 19.399 Amperes\n", + " Power factor of branch1= 0.954\n", + " Power factor of branch2= 0.843\n", + " Total Power factor= 0.995\n", + " Power consumed by branch 1= (3950.928098-2752.57581012j) = (4815.236902373575, -0.608501664475969) = 4815.24 Watts\n", + " Power consumed by branch 2= (1590.68084902+3410.33605055j) = (3763.0649132254307, 1.1343640563060304) = 3763.06 Watts\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.58:pg-239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Vm=100.0; #Assigning values to parameters\n", + "w=3.0;\n", + "#function v=f(t), v=Vm*sin(w*t), endfunction #Defining voltage equation\n", + "V=Vm/sqrt(2)+0*1j;\n", + "L=1.0/3;\n", + "Xl=w*L;\n", + "C=1.0/6;\n", + "Xc=1.0/(w*C);\n", + "Z1=1+1j*1;\n", + "Z2=1-1j*2;\n", + "I1=V/Z1;\n", + "[r,t]=cmath.polar(I1);\n", + "I2=V/Z2;\n", + "[r1,t1]=cmath.polar(I2);\n", + "I=I1+I2;\n", + "[r2,t2]=cmath.polar(I);\n", + "print\"Branch current I1=\",I1,\"=\",cmath.polar(I1),\"=\",round(r,3),\"A\"\n", + "print\"Branch current I2=\",I2,\"=\",cmath.polar(I2),\"=\",round(r1,3),\"A\"\n", + "print\"Total current=\",I,\"=\",cmath.polar(I),\"=\",round(r2,3),\"A\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch current I1= (35.3553390593-35.3553390593j) = (49.99999999999999, -0.7853981633974483) = 50.0 A\n", + "Branch current I2= (14.1421356237+28.2842712475j) = (31.622776601683785, 1.1071487177940904) = 31.623 A\n", + "Total current= (49.4974746831-7.07106781187j) = (49.999999999999986, -0.14189705460416396) = 50.0 A\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.59:pg-240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Z1=10+1j*15; #Assigning values to parameters\n", + "Z2=6-1j*8;\n", + "I=15.0;\n", + "Z=(Z1*Z2)/(Z1+Z2);\n", + "V=I*Z;\n", + "I1=V/Z1;\n", + "I2=V/Z2;\n", + "P1=I1**2*real(Z1);\n", + "[r,t]=cmath.polar(P1);\n", + "P2=I2**2*real(Z2);\n", + "[r1,t1]=cmath.polar(P2);\n", + "print\"Power taken by branch 1=\",P1,\"=\",cmath.polar(P1),\"=\",round(r,3),\"Watts\"\n", + "print\"Power taken by branch 2=\",P2,\"=\",cmath.polar(P2),\"=\",round(r1,3),\"Watts\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power taken by branch 1= (-660.306369256-328.943832303j) = (737.7049180327872, -2.679411319197999) = 737.705 Watts\n", + "Power taken by branch 2= (599.717817791+1307.5517334j) = (1438.5245901639341, 1.1407665632998834) = 1438.525 Watts\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.60:pg-241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=200; #Assigning values to parameters\n", + "f=50;\n", + "Ra=10;\n", + "La=0.12;\n", + "Rb=20;\n", + "Cb=40*10**-6;\n", + "Xla=2*math.pi*f*La;\n", + "Xcb=1/(2*math.pi*f*Cb);\n", + "Za=Ra+1j*Xla;\n", + "Zb=Rb-1j*Xcb;\n", + "Zeq=(Za*Zb)/(Za+Zb);\n", + "[r,t]=cmath.polar(Zeq);\n", + "Ia=V/Za;\n", + "[r1,t1]=cmath.polar(Ia);\n", + "Ib=V/Zb;\n", + "[r2,t2]=cmath.polar(Ib);\n", + "pf=cos(t);\n", + "print\"Branch current 1=\",Ia,\"=\",cmath.polar(Ia),\"=\",round(r1,3),\"A\"\n", + "print\"Branch current 2=\",Ib,\"=\",cmath.polar(Ib),\"=\",round(r2,3),\"A\"\n", + "print\"power factor=\",round(pf,2)\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch current 1= (1.31473160452-4.95642138023j) = (5.127829179131076, -1.3115093180978645) = 5.128 A\n", + "Branch current 2= (0.594126408901+2.36395386995j) = (2.437470838597086, 1.3245687251899845) = 2.437 A\n", + "power factor= 0.59\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.61:pg-242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Z1=14.14-1j*14.14; #Assigning values to parameters\n", + "Z2=26+1j*15;\n", + "I=10;\n", + "Zeq=Z1+Z2;\n", + "V=I*Zeq;\n", + "Zeq=(Z1*Z2)/(Z1+Z2);\n", + "I=V/Zeq;\n", + "[r,t]=cmath.polar(I);\n", + "print\"Supply current=\",I,\"=\",cmath.polar(I),\"=\",round(r,3),\"A\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current= (25.6159787883+8.06347214395j) = (26.855128975653326, 0.3049633114846056) = 26.855 A\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.62:pg-243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "I=25*1j; #Assigning values to parameters\n", + "Z1=3-1j*4;\n", + "Z2=10;\n", + "I1=I*Z2/(Z1+Z2);\n", + "[r,t]=cmath.polar(I1);\n", + "I2=I-I1;\n", + "[r1,t1]=cmath.polar(I2);\n", + "print\"Current I1=\",I1,\"=\",cmath.polar(I1),\"=\",round(r,3),\"A\"\n", + "print\"Current I2=\",I2,\"=\",cmath.polar(I2),\"=\",round(r1,3),\"A\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1= (-5.40540540541+17.5675675676j) = (18.380365552345193, 1.869295258381076) = 18.38 A\n", + "Current I2= (5.40540540541+7.43243243243j) = (9.190182776172596, 0.9420000403794635) = 9.19 A\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.63:pg-244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=120+1j*160; #Assigning values to parameters\n", + "Z1=12+1j*16;\n", + "Z2=10-1j*20;\n", + "I1=V/Z1;\n", + "I2=V/Z2;\n", + "[r,t]=cmath.polar(Z1);\n", + "kW1=(V*I1*cos(t))/1000;\n", + "[r1,t1]=cmath.polar(kW1);\n", + "kVAR1=(V*I1*sin(t))/1000;\n", + "[r2,t2]=cmath.polar(kVAR1);\n", + "kVA1=(V*I1)/1000;\n", + "[r3,t3]=cmath.polar(kVA1);\n", + "[ro,th]=cmath.polar(Z2);\n", + "kW2=(V*I2*cos(th))/1000;\n", + "[r4,t4]=cmath.polar(kW2);\n", + "kVAR2=(V*I2*sin(th))/1000;\n", + "[r5,t5]=cmath.polar(kVAR2);\n", + "kVA2=(V*I2)/1000;\n", + "[r6,t6]=cmath.polar(kVA2);\n", + "Zeq=(Z1*Z2)/(Z1+Z2);\n", + "[R,T]=cmath.polar(Zeq);\n", + "pf=cos(T);\n", + "print\"kW1=\",\"=\",kW1,cmath.polar(kW1),\"=\",round(r1,2)\n", + "print\"kVAR1=\",kVAR1,\"=\",cmath.polar(kVAR1),\"=\",round(r2,2)\n", + "print\"kVA1=\",kVA1,\"=\",cmath.polar(kVA1),\"=\",round(r3,2)\n", + "print\"kW2=\",kW2,\"=\",cmath.polar(kW2),\"=\",round(r4,2)\n", + "print\"kVAR2=\",kVAR2,\"=\",cmath.polar(kVAR2),\"=\",round(r5,2)\n", + "print\"kVA2=\",kVA2,\"=\",cmath.polar(kVA2),\"=\",round(r6,2)\n", + "print\"Power factor=\",round(pf,2)\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "kW1= = (0.72+0.96j) (1.2000000000000002, 0.9272952180016122) = 1.2\n", + "kVAR1= (0.96+1.28j) = (1.5999999999999999, 0.9272952180016123) = 1.6\n", + "kVA1= (1.2+1.6j) = (2.0, 0.9272952180016123) = 2.0\n", + "kW2= (-0.78709592808+0.14310835056j) = (0.8000000000000002, 2.961739153797315) = 0.8\n", + "kVAR2= (1.57419185616-0.28621670112j) = (1.5999999999999999, -0.1798534997924783) = 1.6\n", + "kVA2= (-1.76+0.32j) = (1.7888543819998317, 2.961739153797315) = 1.79\n", + "Power factor= 1.0\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.65:pg-246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "R=30.0; #Assigning values to parameters\n", + "I=5.0;\n", + "V=110.0;\n", + "f=50.0;\n", + "I1=V/R;\n", + "I2=sqrt(I**2-I1**2);\n", + "Xc=V/I2;\n", + "C=1.0/(2*math.pi*f*Xc);\n", + "print\"Unknown capacitance when total current drawn is 5 A=\",round(C,8),\"Farad\"\n", + "Inew=4.0;\n", + "I2new=sqrt(Inew**2-I1**2);\n", + "I2new1=round(I2new,2);\n", + "Xc=110/1.59;\n", + "f=1.0/(2*math.pi*C*Xc);\n", + "print\"Frequency when total current drawn is 4 A=\",round(f,2),\"HZ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown capacitance when total current drawn is 5 A= 9.837e-05 Farad\n", + "Frequency when total current drawn is 4 A= 23.39 HZ\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.66:pg-248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "L1=0.0191 #Assigning values to parameters\n", + "f=50;\n", + "Xl1=2*math.pi*f*L1;\n", + "C=398*10**-6;\n", + "Xc=1/(2*math.pi*f*C);\n", + "L3=0.0318\n", + "Xl3=2*math.pi*f*L3;\n", + "Z1=2+1j*Xl1;\n", + "Z2=7-1j*Xc;\n", + "Z3=8+1j*Xl3;\n", + "Zeq=((Z1*Z2)/(Z1+Z2))+Z3;\n", + "[r,t]=cmath.polar(Zeq)\n", + "print\"Equivalent Impedance=\",Zeq,\"=\",cmath.polar(Zeq),\"=\",round(r,3),\"ohms\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent Impedance= (13.9532833128+14.2011622329j) = (19.908970942113147, 0.7942021909974325) = 19.909 ohms\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.68:pg-251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Za=10+1j*8; #Assigning values to parameters\n", + "Zb=9-1j*6;\n", + "Zc=3+1j*2;\n", + "V2=100;\n", + "I=V2/Zc;\n", + "Ia=(I*Zb)/(Za+Zb);\n", + "[r,t]=cmath.polar(Ia);\n", + "Ib=I-Ia;\n", + "[r1,t1]=cmath.polar(Ib);\n", + "print\"Current Ia=\",Ia,\"=\",cmath.polar(Ia),\"=\",round(r,4),\"Amperes\"\n", + "print\"Current Ib=\",Ib,\"=\",cmath.polar(Ib),\"=\",round(r1,3),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current Ia= (4.48893572181-15.0474183351j) = (15.70271767770641, -1.2808821458253687) = 15.7027 Amperes\n", + "Current Ib= (18.5879873551-0.337197049526j) = (18.591045580170096, -0.018138600054248756) = 18.591 Amperes\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.69:pg-252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Im1=20.0; #Assigning values to parameters\n", + "Im2=40.0;\n", + "Im=25.0;\n", + "#function i1=f(wt), i1=Im1*sin(wt), endfunction\n", + "#function i2=f(wt), i2=Im2*sin(wt+%pi/6), endfunction\n", + "#function i=f(wt), i=Im*sin(wt+%pi/6), endfunction\n", + "Z=6+1j*8;\n", + "I1=Im1/sqrt(2);\n", + "I2=24.49+1j*14.14;\n", + "I=15.31+1j*8.84;\n", + "I3=I-(I1+I2);\n", + "[r,t]=cmath.polar(I3);\n", + "V=I*Z;\n", + "[r1,t1]=cmath.polar(V);\n", + "P=V*I*cos(t);\n", + "[r2,t2]=cmath.polar(P);\n", + "Z1=V/I1;\n", + "[r3,t3]=cmath.polar(Z1);\n", + "print\"Current I3=\",I3,\"=\",cmath.polar(I3),\"=\",round(r,3),\"Amperes\"\n", + "print\"Supply Voltage V=\",V,\"=\",cmath.polar(V),\"=\",round(r1,3),\"Volts\"\n", + "print\"Active Power P=\",P,\"=\",cmath.polar(P),\"=\",round(r2,3),\"Watts\"\n", + "print\"Impedance Z1=\",Z1,\"=\",cmath.polar(Z1),\"=\",round(r3,3),\"Ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3= (-23.3221356237-5.3j) = (23.916772567629184, -2.9181358418788084) = 23.917 Amperes\n", + "Supply Voltage V= (21.14+175.52j) = (176.78848944430746, 1.4509315848173419) = 176.788 Volts\n", + "Active Power P= (1197.41333962-2802.63102384j) = (3047.7105114663827, -1.167024701956722) = 3047.711 Watts\n", + "Impedance Z1= (1.49482373543+12.4111382234j) = (12.500833972179619, 1.4509315848173419) = 12.501 Ohms\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.70:pg-255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Z=8.66+1j*5; #Assigning values to parameters\n", + "Y=1.0/Z;\n", + "G=real(Y);\n", + "B=imag(Y);\n", + "print\"G =\",round(G,4),\"Mho\"\n", + "print\"B =\",round(-B,2),\"Mho\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "G = 0.0866 Mho\n", + "B = 0.05 Mho\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.71:pg-255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=230.0; #Assigning value to parameters\n", + "f=50.0;\n", + "Z1=8.66-5*1j;\n", + "Z2=10+17.32*1j;\n", + "Z3=40;\n", + "Y1=1.0/Z1;\n", + "[r1,t]=cmath.polar(Y1)\n", + "Y2=1.0/Z2;\n", + "[r2,t]=cmath.polar(Y2)\n", + "Y3=1.0/Z3;\n", + "[r3,t]=cmath.polar(Y3);\n", + "Y=Y1+Y2+Y3;\n", + "[r4,t]=cmath.polar(Y);\n", + "Z=1/Y;\n", + "[r,t]=cmath.polar(Z);\n", + "I=V/Z.real\n", + "[r5,t5]=cmath.polar(I);\n", + "pf=cos(t);\n", + "P=V*I*pf;\n", + "[r6,t6]=cmath.polar(P);\n", + "print\"Y1=\",Y1,\"=\",cmath.polar(Y1),\"=\",round(r1,2),\"Mho\"\n", + "print\"Y2=\",Y2,\"=\",cmath.polar(Y2),\"=\",round(r2,2),\"Mho\"\n", + "print\"Y3=\",Y3,\"=\",cmath.polar(Y3),\"=\",round(r3,3),\"Mho\"\n", + "print\"Equivalent Admittance Y=\",Y,\"=\",cmath.polar(Y),\"=\",round(r4,4),\"Ohms\"\n", + "print\"Equivalent Impedance Z=\",Z,\"=\",cmath.polar(Z),\"=\",round(r,3),\"Ohms\"\n", + "print\"Total current I=\",I,\"=\",cmath.polar(I),\"=\",round(r5,2),\"Amperes\"\n", + "print\"Power consumed P=\",P,\"=\",cmath.polar(P),\"=\",round(r6,2),\"Watts\"\n", + "print\"Power factor pf=\",round(pf,4)\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y1= (0.0866038105677+0.0500022000968j) = (0.10000220007260266, 0.5236114777699694) = 0.1 Mho\n", + "Y2= (0.0250011000484-0.0433019052838j) = (0.05000110003630133, -1.0471848490249271) = 0.05 Mho\n", + "Y3= 0.025 = (0.025, 0.0) = 0.025 Mho\n", + "Equivalent Admittance Y= (0.136604910616+0.00670029481297j) = (0.13676913231794818, 0.049009434500553055) = 0.1368 Ohms\n", + "Equivalent Impedance Z= (7.30281212656-0.358193523139j) = (7.311591314883045, -0.049009434500553055) = 7.312 Ohms\n", + "Total current I= 31.4947168315 = (31.494716831541105, 0.0) = 31.49 Amperes\n", + "Power consumed P= 7235.08709962 = (7235.087099619459, 0.0) = 7235.09 Watts\n", + "Power factor pf= 0.9988\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.72:pg-256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=200; #Assigning values to parameters\n", + "Z1=5*1j;\n", + "Z2=5+1j*8.66;\n", + "Z3=15;\n", + "Z4=-10*1j;\n", + "Y1=1.0/Z1;\n", + "Y2=1.0/Z2;\n", + "Y3=1.0/Z3;\n", + "Y4=1.0/Z4;\n", + "Yeq=Y1+Y2+Y3+Y4;\n", + "Zeq=1.0/Yeq;\n", + "I=V/Zeq;\n", + "[r,t]=cmath.polar(I);\n", + "print\"Total current\",\"=\", I,\"=\",cmath.polar(I),\"=\",round(r,2),\"A\"\n", + "#In the book the final answer is given in the polar form." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total current = (23.3337733527-37.3207621135j) = (44.01481868200551, -1.012037159177007) = 44.01 A\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.73:pg-258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Xl=4.0; #Assigning values to parameters\n", + "Xc=8.0;\n", + "Z1=1.0;\n", + "Z2=4*1j;\n", + "Z3=-1j*8;\n", + "Zeq=Z1+(Z2*Z3)/(Z2+Z3);\n", + "Y=1.0/Zeq;\n", + "[r,t]=cmath.polar(Y);\n", + "print\"Admittance=\",Y,\"=\",cmath.polar(Y),\"=\",round(r,3),\"Mho\"\n", + "Xl=10.0;\n", + "Xc=5.0;\n", + "Z1=1.0;\n", + "Z2=10.0*1j;\n", + "Z3=-1j*5;\n", + "Zeq=Z1+(Z2*Z3)/(Z2+Z3);\n", + "Y=1.0/Zeq;\n", + "[r,t]=cmath.polar(Y);\n", + "print\"Admittance=\",Y,\"=\",cmath.polar(Y),\"=\",round(r,4),\"Mho\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Admittance= (0.0153846153846-0.123076923077j) = (0.12403473458920845, -1.446441332248135) = 0.124 Mho\n", + "Admittance= (0.00990099009901+0.0990099009901j) = (0.09950371902099893, 1.4711276743037347) = 0.0995 Mho\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.74:pg-260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Z1=14+1j*5; #Assigning values to parameters\n", + "Z2=18+1j*10;\n", + "V=200;\n", + "Y1=1.0/Z1;\n", + "[r0,t0]=cmath.polar(Y1);\n", + "Y2=1.0/Z2;\n", + "[r3,t3]=cmath.polar(Y2);\n", + "Yeq=Y1+Y2;\n", + "[r4,t4]=cmath.polar(Yeq);\n", + "Zeq=1.0/Yeq;\n", + "I1=V/Z1;\n", + "[r5,t5]=cmath.polar(I1);\n", + "I2=V/Z2;\n", + "[r6,t6]=cmath.polar(I2);\n", + "I=V/Zeq;\n", + "[r7,t7]=cmath.polar(I);\n", + "P1=I1**2*real(Z1);\n", + "[r8,t8]=cmath.polar(P1);\n", + "P2=I2**2*real(Z2);\n", + "[r9,t9]=cmath.polar(P2);\n", + "[r,t]=cmath.polar(Zeq);\n", + "[r1,t1]=cmath.polar(Z1);\n", + "[r2,t2]=cmath.polar(Z2);\n", + "pf1=cos(t1);\n", + "pf2=cos(t2);\n", + "pf=cos(t);\n", + "print\"Y1=\",Y1,\"=\",cmath.polar(Y1),\"=\",round(r0,3),\"Mho\"\n", + "print\"Y2=\",Y2,\"=\",cmath.polar(Y2),\"=\",round(r3,3),\"Mho\"\n", + "print\"Yeq=\",Yeq,\"=\",cmath.polar(Yeq),\"=\",round(r4,3),\"Mho\"\n", + "print\"Branch current I1=\",I1,\"=\",cmath.polar(I1),\"=\",round(r5,3),\"Amperes\"\n", + "print\"Branch current I2=\",I2,\"=\",cmath.polar(I2),\"=\",round(r6,3),\"Amperes\"\n", + "print\"Total current I=\",I,\"=\",cmath.polar(I),\"=\",round(r7,2),\"Amperes\"\n", + "print\"Power consumed by branch1=\",P1,\"=\",cmath.polar(P1),\"=\",round(r8,3),\"Watts\"\n", + "print\"Power consumed by branch2=\",P2,\"=\",cmath.polar(P2),\"=\",round(r9,3),\"Watts\"\n", + "print\"Power factor of branch1=\",round(pf1,3)\n", + "print\"Power factor of branch2=\",round(pf2,3)\n", + "print\"Total Power factor=\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y1= (0.0633484162896-0.0226244343891j) = (0.06726727939963124, -0.3430239404207034) = 0.067 Mho\n", + "Y2= (0.0424528301887-0.0235849056604j) = (0.04856429311786321, -0.507098504392337) = 0.049 Mho\n", + "Yeq= (0.105801246478-0.0462093400495j) = (0.11545218431960486, -0.41178588495508256) = 0.115 Mho\n", + "Branch current I1= (12.6696832579-4.52488687783j) = (13.45345587992625, -0.3430239404207034) = 13.453 Amperes\n", + "Branch current I2= (8.49056603774-4.71698113208j) = (9.712858623572641, -0.507098504392337) = 9.713 Amperes\n", + "Total current I= (21.1602492957-9.2418680099j) = (23.09043686392097, -0.41178588495508256) = 23.09 Amperes\n", + "Power consumed by branch1= (1960.64781638-1605.20873856j) = (2533.9366515837105, -0.6860478808414068) = 2533.937 Watts\n", + "Power consumed by branch2= (897.116411534-1441.79423282j) = (1698.1132075471692, -1.014197008784674) = 1698.113 Watts\n", + "Power factor of branch1= 0.942\n", + "Power factor of branch2= 0.874\n", + "Total Power factor= 0.916\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.75:pg-262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "V=230; #Assigning values to parameters\n", + "f=50;\n", + "L=0.08;\n", + "Xl=2*math.pi*f*L;\n", + "C=200*10**-6;\n", + "Xc=1/(2*math.pi*f*C);\n", + "Z1=20+1j*25.13;\n", + "Z2=10-1j*15.92;\n", + "Y1=1.0/Z1;\n", + "Y2=1.0/Z2;\n", + "Y=Y1+Y2;\n", + "I=V*Y;\n", + "[r,t]=cmath.polar(I);\n", + "pf=cos(t);\n", + "Z=1.0/Y;\n", + "[r1,t1]=cmath.polar(Z)\n", + "R=real(Z);\n", + "Xc=-1*imag(Z);\n", + "C=1.0/(2*math.pi*f*Xc);\n", + "[r2,t2]=cmath.polar(C);\n", + "print\"Supply Current=\",I,\"=\",cmath.polar(I),\"=\",round(r,2),\"A\"\n", + "print\"Power factor=\",round(pf,3)\n", + "print\"Total impedance=\",Z,\"=\",cmath.polar(Z),\"=\",round(r1,2),\"Ohms\"\n", + "print\"Resistance of eequivalent series circuit=\",R,\"=\",cmath.polar(R),\"=\",round(r1,2),\"Ohms\"\n", + "print\"Capacitance of eequivalent series circuit=\",C,\"=\",cmath.polar(C),\"=\",round(r2,5),\"Farads\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply Current= (10.9668035101+4.75640244987j) = (11.953833840878367, 0.40922414432872894) = 11.95 A\n", + "Power factor= 0.917\n", + "Total impedance= (17.6519817092-7.6558250514j) = (19.240689059393823, -0.409224144328729) = 19.24 Ohms\n", + "Resistance of eequivalent series circuit= 17.6519817092 = (17.651981709220966, 0.0) = 19.24 Ohms\n", + "Capacitance of eequivalent series circuit= 0.000415774765028 = (0.0004157747650276909, 0.0) = 0.00042 Farads\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.76:pg-263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=200; #Assigning values to parameters\n", + "Z1=3+4*1j;\n", + "Z2=4-1j*3;\n", + "Z3=4.57+1j*5.51;\n", + "Y1=1.0/Z1;\n", + "Y2=1.0/Z2;\n", + "Yab=Y1+Y2;\n", + "Zab=1.0/Yab;\n", + "Z=Zab+Z3;\n", + "[r,t]=cmath.polar(Z);\n", + "I=V/r\n", + "pf=cos(t);\n", + "print\"Total Impedance=\",Z,\"=\",cmath.polar(Z),\"=\",round(r,2),\"Ohms\"\n", + "print\"Supply current=\",round(I,2),\"A\"\n", + "print\"Power factor=\",round(pf,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Impedance= (8.07+6.01j) = (10.06205744368417, 0.6401220717631577) = 10.06 Ohms\n", + "Supply current= 19.88 A\n", + "Power factor= 0.802\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.77:pg-268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "C=2.5*10**-6; #Assigning values to parameters\n", + "R=15.0;\n", + "L=260*10**-3;\n", + "temp=(1.0/(L*C))-(R**2/L**2);\n", + "fr=(1.0/20*math.pi)*sqrt(temp);\n", + "Q=(2*math.pi*fr*L)/R;\n", + "Zr=L/(C*R);\n", + "print\"Resonant frequeny=\",round(fr,2),\"Hertz\"\n", + "print\"Quality factor=\",round(Q,2)\n", + "print\"Dynamic Impedance=\",round(Zr,2),\"Ohms\"\n", + "#the answer of the fr in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequeny= 194.62 Hertz\n", + "Quality factor= 21.2\n", + "Dynamic Impedance= 6933.33 Ohms\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.78:pg-268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "C=200*10**-6; #Assigning values to parameters\n", + "V=230.0;\n", + "R=20.0;\n", + "L=0.2;\n", + "temp=((1.0/(L*C))-(R**2/L**2));\n", + "fr=sqrt(temp)/(2*math.pi);\n", + "Zr=L/(C*R);\n", + "Ir=V/Zr;\n", + "Zl=sqrt(R**2+(2*math.pi*fr*L)**2);\n", + "Il=V/Zl;\n", + "Xc=1.0/(2*math.pi*fr*C);\n", + "Ic=V/Xc;\n", + "phi=math.atan(2*math.pi*fr*L/R);\n", + "phi=math.degrees(phi);\n", + "print\"Resonant frequency\",round(fr,2),\"Hertz\"\n", + "print\"Dynamic impedance of the circuit=\",round(Zr,2),\"Ohms\"\n", + "print\"circuit current Ir=\",round(Ir,2),\"A\"\n", + "print\"current Il=\",round(Il,2),\"A\"\n", + "print\"current Ic=\",round(Ic,2),\"A\"\n", + "print\"phase angle of the coil phi=\",round(phi,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency 19.49 Hertz\n", + "Dynamic impedance of the circuit= 50.0 Ohms\n", + "circuit current Ir= 4.6 A\n", + "current Il= 7.27 A\n", + "current Ic= 5.63 A\n", + "phase angle of the coil phi= 50.77 degrees\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.79:pg-270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "pfcoil=0.3; #Assigning values to parameters\n", + "phi=math.acos(pfcoil);\n", + "V=100.0;\n", + "f=50.0;\n", + "Il=1.0;\n", + "Ic=Il*sin(phi);\n", + "Xc=V/Ic;\n", + "C=1.0/(2*math.pi*f*Xc);\n", + "Ir=Il*cos(phi);\n", + "Zr=V/Ir;\n", + "print\"Capacitance=\",round(C,8),\"Farads\"\n", + "print\"Dynamic impedance=\",round(Zr,2),\"Ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance= 3.036e-05 Farads\n", + "Dynamic impedance= 333.33 Ohms\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.80:pg-271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=200.0; #Assigning values to parameters\n", + "f=50.0;\n", + "L=20.0;\n", + "R=15.0;\n", + "Zl=sqrt(R**2+L**2);\n", + "pfcoil=R/Zl;\n", + "phi=math.acos(pfcoil);\n", + "Il=V/Zl;\n", + "Ic=Il*sin(phi);\n", + "Xc=V/Ic;\n", + "C=1/(2*math.pi*f*Xc);\n", + "Ir=Il*math.cos(phi);\n", + "print\"Power factor=\",round(pfcoil,2)\n", + "print\"Current=\",round(Il.real,2),\"A\"\n", + "print\"Value f shunting capacitance=\",\"{:.4e}\".format(C),\"Farads\"\n", + "print\"Circuit current at resonance=\",round(Ir.real,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor= 0.6\n", + "Current= 8.0 A\n", + "Value f shunting capacitance= 1.0186e-04 Farads\n", + "Circuit current at resonance= 4.8 A\n" + ] + } + ], + "prompt_number": 83 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..16142135 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter3.ipynb @@ -0,0 +1,798 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f5ac69af9ae1d841a7df309d87210c9fa6bb22448fba66aee7e2b96f7445f61f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3:THREE PHASE CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1:pg-286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50.0; #Assigning values to parameters\n", + "Vl=400.0;\n", + "Rph=20.0;\n", + "L=0.5;\n", + "Xl=2*math.pi*f*L;\n", + "Zph=20+1j*157;\n", + "[r,t]=cmath.polar(Zph);\n", + "Vph=Vl/sqrt(3); #Star connection\n", + "Iph=Vph/r;\n", + "Il=Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"The line current for Star connection is Il=\",round(Il,2),\"Amperes\"\n", + "print\"The total power absorbed in Star connection is P=\",round(P,3),\"Watts\"\n", + "Vph=Vl; #Delta connection\n", + "Iph=Vph/r;\n", + "Il=sqrt(3)*Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"The line current for Delta connection is Il=\",round(Il,2),\"Amperes\"\n", + "print\"The total power absorbed in Delta connection is P=\",round(P,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The line current for Star connection is Il= 1.46 Amperes\n", + "The total power absorbed in Star connection is P= 127.75 Watts\n", + "The line current for Delta connection is Il= 4.38 Amperes\n", + "The total power absorbed in Delta connection is P= 383.25 Watts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2:pg-288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50 #Assigning values to parameters\n", + "rph=8\n", + "l=0.02\n", + "xl=2*math.pi*f*l\n", + "vl=230\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "zph=8+1j*6.28\n", + "[r,t]=cmath.polar(zph)\n", + "iph=vph/r\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The line current is il=\",round(il,2),\"Amperes\"\n", + "print\"The total Power absorbed is P=\",round(P,2),\"Watts\"\n", + "print\"The reactive volt amperes is q=\",round(q,2),\"VAR\"\n", + "print\"The Volt amperes is s=\",round(s,2),\"Volt Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The line current is il= 13.06 Amperes\n", + "The total Power absorbed is P= 383.25 Watts\n", + "The reactive volt amperes is q= 3211.69 VAR\n", + "The Volt amperes is s= 5201.33 Volt Ampere\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3:pg-289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Vl=230; #Assigning values to parameters\n", + "f=50;\n", + "Rph=15;\n", + "L=0.03;\n", + "Xl=2*math.pi*f*L;\n", + "Zph=15+1j*9.42;\n", + "[r,t]=cmath.polar(Zph)\n", + "Vph=Vl;\n", + "Iph=Vph/r;\n", + "Il=sqrt(3)*Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"Phase current is Iph=\",round(Iph,2),\"Amperes\"\n", + "print\"Line current is Il=\",round(Il,1),\"Amperes\"\n", + "print\"Power absorbed is=\",round(P/1000,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase current is Iph= 12.99 Amperes\n", + "Line current is Il= 22.5 Amperes\n", + "Power absorbed is= 7.59 KW\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50#assigning values to the parameters\n", + "xc=200\n", + "vph=400\n", + "vl=vph\n", + "zph=14.151-1j*200\n", + "[r,t]=cmath.polar(zph)\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "pwr=vph*iph*cos(t)\n", + "c=1.0/(2*math.pi*f*xc)\n", + "print\"power consumed in each branch of delta is pwr=\",round(pwr,2),\"Watts\"\n", + "print\"capacitive reactance is c=\"\"{:.2e}\".format(c),\"Farads\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power consumed in each branch of delta is pwr= 56.32 Watts\n", + "capacitive reactance is c=1.59e-05 Farads\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "l=50 #Assigning values to parameters\n", + "w=800\n", + "c=50\n", + "xl=w*l\n", + "xc=1/(w*c)\n", + "z1=0+1j*40\n", + "z2=50\n", + "z3=0-1j*25\n", + "zph=z1+z2*z3/(z2+z3)\n", + "[r,t]=cmath.polar(zph)\n", + "vl=550\n", + "vph=vl\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "pf=cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The phase current is\",round(iph,2),\"Amperes\"\n", + "print\"The line current is\",round(il,2),\"Amperes\"\n", + "print\"The power drawn is\",round(p/1000,2),\"kw\"\n", + "print\"The power factor is\",round(pf,2)\n", + "print\"The reactive power is\",round(q/1000,2),\"kw\"\n", + "print\"The kva rating of load is\",round(s/1000,2),\"KVA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase current is 24.6 Amperes\n", + "The line current is 42.6 Amperes\n", + "The power drawn is 18.15 kw\n", + "The power factor is 0.45\n", + "The reactive power is 36.3 kw\n", + "The kva rating of load is 40.58 KVA\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:pg-294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "p=10000 #Assigning values to parameters\n", + "t=math.acos(0.6)\n", + "vl=440\n", + "vph=vl\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "iph=il/sqrt(3)\n", + "zph=vph/iph\n", + "zph1=20.9-1j*27.87\n", + "res=zph1.real\n", + "xc=zph1.imag\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "print\"The resistance value of circuit element is\",round(res,2),\"ohms\"\n", + "print\"The capacitive value of circuit element is\",round(-xc,2),\"ohms\"\n", + "print\"The reactive volt-ampere\",round(-q/1000,2),\"KVAR\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance value of circuit element is 20.9 ohms\n", + "The capacitive value of circuit element is 27.87 ohms\n", + "The reactive volt-ampere -13.33 KVAR\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:pg-295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50 #Assigning values to parameters\n", + "vl=440\n", + "p=1500\n", + "t=math.acos(0.2)\n", + "vph=vl/sqrt(3)\n", + "il=p/(sqrt(3)*vl*p*cos(t))\n", + "iph=il\n", + "zph=vph/iph\n", + "zph1=5.17+1j*25.3\n", + "res=zph1.real\n", + "xl=zph1.imag\n", + "l=xl/(2*math.pi*f)\n", + "print\"The resistive circuit constant is\",round(res,2),\"ohms\"\n", + "print\"The inductive circuit constant is\",round(l,2),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistive circuit constant is 5.17 ohms\n", + "The inductive circuit constant is 0.08 H\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9:pg-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "p=100000 #Assigning values to parameters\n", + "il=80\n", + "vl=1100\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "iph=il\n", + "zph=vph/iph\n", + "t=math.acos(p/(sqrt(3)*vl*il))\n", + "zph1=5.21-1j*6\n", + "r=zph1.real\n", + "xc=zph1.imag\n", + "c=1/(2*math.pi*f*xc)\n", + "print\"The resistive circuit constant is\",round(r,2),\"ohms\"\n", + "print\"The capacitive circuit constant is\",round(-xc,2),\"ohms\"\n", + "print\"The capacitance is\",\"{:.2e}\".format(-c),\"farads\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistive circuit constant is 5.21 ohms\n", + "The capacitive circuit constant is 6.0 ohms\n", + "The capacitance is 5.31e-04 farads\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10:pg-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Vl=400; #Assigning values to parameters\n", + "Il=34.65;\n", + "P=14.4*10**3;\n", + "Vph=Vl;\n", + "Iph=Il/sqrt(3);\n", + "Zph=Vph/Iph;\n", + "t=math.acos(P/(sqrt(3)*Vl*Il))\n", + "Z=complex(Zph,t);\n", + "a=cmath.rect(Zph,t)\n", + "print\"Impedance\",a,\"ohms\"\n", + "print \"Resistance\",round(a.real),\"ohms\"\n", + "print \"Reactance\",round(a.imag),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance (11.9937782275+15.9981840036j) ohms\n", + "Resistance 12.0 ohms\n", + "Reactance 16.0 ohms\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.11:pg-297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "vl=415 #assigning values to the parameters\n", + "r=15\n", + "l=0.1\n", + "c=177*10**-6\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "xl=2*math.pi*f*l\n", + "xc=1.0/(2*math.pi*f*c)\n", + "a=xl-xc\n", + "zph=r+1j*a\n", + "[r1,t]=cmath.polar(zph)\n", + "iph=vph/r1\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The phase current is\",round(iph,1),\"Amperes\"\n", + "print\"The line current is\",round(il,2),\"Amperes\"\n", + "print\"The power drawn is\",round(p/1000,2),\"KW\"\n", + "print\"The reactive power is\",round(q/1000,2),\"KVAR\"\n", + "print\"The total kVA is\",round(s/1000,2),\"KVA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase current is 11.9 Amperes\n", + "The line current is 11.9 Amperes\n", + "The power drawn is 6.37 KW\n", + "The reactive power is 5.71 KVAR\n", + "The total kVA is 8.55 KVA\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12:pg-299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=400 #assigning values to the parameters\n", + "t=0\n", + "zph=50\n", + "vph=vl/sqrt(3)\n", + "iph=vph/zph\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "print\"Power taken is\",round(p,2),\"Watts\"\n", + "iph=4\n", + "il=iph\n", + "p=vl*il*cos(t)\n", + "print\"Power taken after disconecting one of the resistor is\",round(p,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power taken is 3200.0 Watts\n", + "Power taken after disconecting one of the resistor is 1600.0 Watts\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13:pg-300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=400 #Assigning values to parameters\n", + "vph=vl\n", + "r=40\n", + "t=0\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "print\"Power taken is\",round(p,2),\"Watts\"\n", + "i=10\n", + "p=2*i*i*r\n", + "print\"Power taken after diconnecting one resistor is\",round(p,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power taken is 12000.0 Watts\n", + "Power taken after diconnecting one resistor is 8000.0 Watts\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.16:pg-310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=500 #Assigning values to parameters\n", + "w2=2500\n", + "p=w1+w2\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,3)\n", + "w2=2500\n", + "w1=-500\n", + "p=w1+w2\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Total Power supplied after reversing the connections to the current coil is\",round(p,2),\"Watts\"\n", + "print\"Power factor after reversing the connections to the current coil is\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 3000.0 Watts\n", + "Power factor is 0.655\n", + "Total Power supplied after reversing the connections to the current coil is 2000.0 Watts\n", + "Power factor after reversing the connections to the current coil is 0.359\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.17:pg-311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=3000 #Assigning values to parameters\n", + "w2=5000\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Watts\",p,\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,2)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Watts 8000 Total Power supplied is 8000.0 Watts\n", + "Power factor is 0.92\n", + "The line current is 12.58 Amperes\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.18:pg-311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=-1000 #Assigning values to parameters\n", + "w2=3000\n", + "vl=400\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,3)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 2000.0 Watts\n", + "Power factor is 0.277\n", + "The line current is 10.41 Amperes\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.19:pg-312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=100000 #Assigning values to parameters\n", + "w2=300000\n", + "vl=2000\n", + "n=0.9\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,2)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 400000.0 Watts\n", + "Power factor is 0.76\n", + "The line current is 152.75 Amperes\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.20:pg-312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=220 #Assigning values to parameters\n", + "il=38\n", + "n=0.88\n", + "p=11200\n", + "ip=p/n\n", + "t=math.acos(ip/(sqrt(3)*vl*il))\n", + "a=math.degrees(t)\n", + "w2=vl*il*cos(30-a)\n", + "w1=vl*il*cos(30+a)\n", + "print\"The wattmeter reading is w2=\",round(w2,2),\"Watts\"\n", + "print\"The wattmeter reading is w1=\",round(w1,2),\"Watts\"\n", + "# the answer of w2,w1 are wrong in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wattmeter reading is w2= 449.52 Watts\n", + "The wattmeter reading is w1= -2972.66 Watts\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.21:pg-313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=1 #Assigning values to parameters\n", + "w2=2*w1\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Power factor is\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor is 0.866\n" + ] + } + ], + "prompt_number": 127 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..43ee0636 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/chapter4.ipynb @@ -0,0 +1,1093 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bb989fb1fd31462248b192e15441cbb384879f100f9a8a541dfbefbf515c52a9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4:SINGLE-PHASE TRANSFORMER" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:pg-332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n2=40.0 #Assigning values to parameters\n", + "n1=600.0\n", + "kva=50.0\n", + "e1=2200.0\n", + "e2=(e1*n2)/n1\n", + "i1=kva*1000/e1\n", + "i2=kva*1000/e2\n", + "print\"The primary full load current is\",round(i1,2),\"A\"\n", + "print\"The secondary full load current is\",round(i2,2),\"A\"\n", + "print\"The secondary voltage at node is\",round(e2,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The primary full load current is 22.73 A\n", + "The secondary full load current is 340.91 A\n", + "The secondary voltage at node is 146.67 Volts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2:pg-333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "e1=3200 #Assigning values to parameters\n", + "f=50\n", + "bm=1.2\n", + "e2=400\n", + "n2=111\n", + "kva=80\n", + "n1=e1*n2/e2\n", + "i2=kva*1000/e2\n", + "a=e2/(4.44*f*n2*bm)\n", + "print\"number of turns on primary windings is n1=\",round(n1,2)\n", + "print\"The secondary full load current is i2=\",round(i2,2),\"A\"\n", + "print\"The cross-sectional area is a=\",round(a,4),\"meter square\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of turns on primary windings is n1= 888.0\n", + "The secondary full load current is i2= 200.0 A\n", + "The cross-sectional area is a= 0.0135 meter square\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:pg-333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e1=6000 #Assigning values to parameters\n", + "f=50\n", + "e2=250\n", + "fm=0.06\n", + "n1=e1/(4.44*f*fm)\n", + "n2=e2/(4.44*f*fm)\n", + "print\"number of turns on primary windings is\",round(n1,2),\"turns\"\n", + "print\"number of turns on secondary windings is\",round(n2,3),\"turns\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of turns on primary windings is 450.45 turns\n", + "number of turns on secondary windings is 18.769 turns\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:pg-334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f=50.0\n", + "n2=50.0 #Assigning values to parameters\n", + "n1=500.0\n", + "kva=25.0\n", + "e1=3000.0\n", + "k=n2/n1\n", + "i1=kva*1000/e1\n", + "i2=i1/k\n", + "e2=k*e1\n", + "fm=e1/(4.44*f*n1)\n", + "print\"The primary full load current is\",round(i1,2),\"A\"\n", + "print\"The secondary full load current is\",round(i2,2),\"A\"\n", + "print\"The secondary emf is\",round(e2,2),\"Volts\"\n", + "print\"The maximum flux is\",round(fm,3),\"Wb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The primary full load current is 8.33 A\n", + "The secondary full load current is 83.33 A\n", + "The secondary emf is 300.0 Volts\n", + "The maximum flux is 0.027 Wb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.5:pg-335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e1=230.0 #Assigning values to parameters\n", + "v1=e1\n", + "i0=5.0\n", + "t=math.acos(0.25)\n", + "n1=200.0\n", + "f=50.0\n", + "fm=e1/(4.44*f*n1)\n", + "w1=v1*i0*cos(t)\n", + "iu=i0*sin(t)\n", + "print\"The maximum flux is\",round(fm*1000,3),\"mWb\"\n", + "print\"The core loss is\",round(w1,2),\"Watts\"\n", + "print\"The maximum current is\",round(iu,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum flux is 5.18 mWb\n", + "The core loss is 287.5 Watts\n", + "The maximum current is 4.84 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6:pg-335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "k=0.25 #Assigning values to parameters\n", + "sr=50\n", + "pr=sr/(k*k)\n", + "print\"The Secondary resistance is\",round(pr,2),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Secondary resistance is 800.0 ohms\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.9:pg-338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "wf=2500 #Assigning values to parameters\n", + "w6=0.6*0.6*wf\n", + "w5=0.5*0.5*wf\n", + "print\"The copper loss at 60% full-load condition is\",round(w6,2),\"Watts\"\n", + "print\"The copper loss at 50% full-load conditionis\",round(w5,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The copper loss at 60% full-load condition is 900.0 Watts\n", + "The copper loss at 50% full-load conditionis 625.0 Watts\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.10:pg-338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "w7=1200 #Assigning values to parameters\n", + "wf=w7/(0.75*0.75)\n", + "w5=0.5*0.5*wf\n", + "print\"The copper loss at 50% full-load condition is\",round(w5,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The copper loss at 50% full-load condition is 533.33 Watts\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.11:pg-339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=230.0; #Assigning values to parameters\n", + "VA=350.0;\n", + "loss=110.0;\n", + "I0=VA/V;\n", + "pf=loss/VA;\n", + "Iw=I0*pf;\n", + "Iu=sqrt(I0**2-Iw**2);\n", + "print\"Iron loss component of no load current\",round(Iw,3),\"A\"\n", + "print\"Magnatizing component of no load current\",round(Iu,2),\"A\"\n", + "print\"no load power factor\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Iron loss component of no load current 0.478 A\n", + "Magnatizing component of no load current 1.44 A\n", + "no load power factor 0.314\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.13:pg-354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "r1=0.2 #Assigning values to parameters\n", + "x1=0.75\n", + "r2=0.05\n", + "x2=0.2\n", + "pf=0.8\n", + "e2=125.0\n", + "e1=250.0\n", + "t=math.acos(0.8)\n", + "k=e2/e1\n", + "kva=5.0\n", + "i2=kva*1000/e2\n", + "r02=r2+k*k*r1\n", + "x02=x2+k*k*x1\n", + "pr1=(i2*r02*cos(t)-i2*x02*sin(t))*100/e2\n", + "v2=e2-(e2*pr1/100)\n", + "print\"The percentage regulation at full load 0.8 pf leading is\",round(pr1,2)\n", + "print\"The secondary terminal voltage is\",round(v2,2),\"Volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage regulation at full load 0.8 pf leading is -4.88\n", + "The secondary terminal voltage is 131.1 Volts\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.14:pg-355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "r1=2.0 #Assigning values to parameters\n", + "r2=0.02\n", + "wi=412.0\n", + "pf=0.8\n", + "x=1.0\n", + "kva=50.0\n", + "e1=2300.0\n", + "e2=230.0\n", + "i2=kva*1000/e2\n", + "i1=kva*1000/e1\n", + "wcf=(i1*i1*r1)+(i2*i2*r2)\n", + "n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "x=0.5\n", + "n2=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "print\"Efficiency at full node 0.8pf is\",round(n1,2),\"%\"\n", + "print\"Efficiency at half full node 0.8pf is\",round(n2,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency at full node 0.8pf is 94.56 %\n", + "Efficiency at half full node 0.8pf is 95.76 %\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.15:pg-356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "x=1.0 #Assigning values to parameters\n", + "kva=25.0\n", + "pf=0.8\n", + "wi=0.35\n", + "wcf=0.4\n", + "n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "kva1=kva*(sqrt(wi/wcf))\n", + "nm=kva1*pf*100/((kva1*pf)+2*wi)\n", + "print\"Load in KVA is\",round(kva1,3)\n", + "print\"Maximum Efficency is\",round(nm,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load in KVA is 23.385\n", + "Maximum Efficency is 96.39 %\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.16:pg-357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "x=1.0 #Assigning values to parameters\n", + "kva=40.0\n", + "pf=0.8\n", + "wi=450.0\n", + "wcf=850.0\n", + "n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "x=sqrt(wi/wcf)\n", + "n2=x*kva*pf*100/((x*kva*pf)+(2*wi*0.001))\n", + "kva1=kva*sqrt(wi/wcf)\n", + "print\"Efficiency at full node 0.8pf is\",round(x,4)\n", + "print\"Maximum Efficency is\",round(n2,2)\n", + "print\"Load in KVA at which maximum occurs is\",round(kva1,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency at full node 0.8pf is 0.7276\n", + "Maximum Efficency is 96.28\n", + "Load in KVA at which maximum occurs is 29.1\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.17:pg-358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e1=2000.0 #Assigning values to parameters\n", + "e2=200.0\n", + "r1=2.3\n", + "x1=4.2\n", + "r2=0.025\n", + "x2=0.04\n", + "kva=20.0\n", + "i1=kva*1000/e1\n", + "i2=kva*1000/e2\n", + "k=e2/e1\n", + "r01=r1+r2/(k*k)\n", + "x01=x1+x2/(k*k)\n", + "r02=r2+k*k*r1\n", + "x02=x2+k*k*x1\n", + "print\"The equivalent primary resistance is\",round(r01,2),\"ohms\"\n", + "print\"The equivalent primary reactance is\",round(x01,2),\"ohms\"\n", + "print\"The equivalent Secondary resistance is\",round(r02,3),\"ohms\"\n", + "print\"The equivalent Secondary reactance is\",round(x02,3),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent primary resistance is 4.8 ohms\n", + "The equivalent primary reactance is 8.2 ohms\n", + "The equivalent Secondary resistance is 0.048 ohms\n", + "The equivalent Secondary reactance is 0.082 ohms\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.18:pg-359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "x=1.0 #Assigning values to parameters\n", + "kva=20.0\n", + "pf=0.8\n", + "wi=450.0\n", + "wcf=900.0\n", + "n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "x=sqrt(wi/wcf)\n", + "n2=x*kva*pf*100/((x*kva*pf)+(2*wi*0.001))\n", + "print\"Efficiency at full node 0.8pf is\",round(n1,2),\"%\"\n", + "print\"Maximum Efficency is\",round(n2,2),\"%\"\n", + "print\"Load at which maximum occurs is\",round(x,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency at full node 0.8pf is 92.22 %\n", + "Maximum Efficency is 92.63 %\n", + "Load at which maximum occurs is 0.707\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.20:pg-361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "nm=98.0 #Assigning values to parameters\n", + "x=0.5\n", + "kva=200.0\n", + "pf=1.0\n", + "wi=1000*((x*kva*pf*100/nm)/2-(x*kva*pf)/2)\n", + "wcu=wi\n", + "wcf=wcu/(0.5*0.5)\n", + "n1=(x*kva*pf*100)/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "x=0.75\n", + "n2=(x*kva*pf*100)/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "print\"The core loss is\",round(wi/1000,4),\"kWatts\"\n", + "print\"Efficiency at full node 0.8pf is\",round(n1,2)\n", + "print\"Efficiency at 75% full node 0.8pf is\",round(n2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The core loss is 1.0204 kWatts\n", + "Efficiency at full node 0.8pf is 98.0\n", + "Efficiency at 75% full node 0.8pf is 97.84\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.21:pg-362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "r1=0.3 #Assigning values to parameters\n", + "r2=0.01\n", + "x1=1.1\n", + "x2=0.035\n", + "kva=100\n", + "v1=2200\n", + "e1=v1\n", + "n1=400.0\n", + "n2=80.0\n", + "k=n2/n1\n", + "r01=r1+r2/(k*k)\n", + "x01=x1+x2/(k*k)\n", + "z01=sqrt(r01*r01+x01*x01)\n", + "e2=k*e1\n", + "i2=kva*1000/e2\n", + "r02=k*k*r01\n", + "x02=k*k*x01\n", + "pr1=(i2*r02*cos(t)-i2*x02*sin(t))*100/e2\n", + "v2=e2-(e2*pr1/100)\n", + "print\"The equivalent primary resistance is z01=\",round(z01,2),\"ohms\"\n", + "print\"The percentage voltage regulation at full load 0.8 pf leading is x02=\",round(x02,3),\"ohms\"\n", + "print\"The secondary terminal voltage is v2=\",round(v2,2),\"volts\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent primary resistance is z01= 2.05 ohms\n", + "The percentage voltage regulation at full load 0.8 pf leading is x02= 0.079 ohms\n", + "The secondary terminal voltage is v2= 446.77 volts\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.22:pg-363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "E2=20.0; #Assigning values to parameters\n", + "E1=1000.0;\n", + "kva=5.0;\n", + "I2=kva*1000/E2;\n", + "K=E2/E1;\n", + "R01=4.4\n", + "R02=K*K*R01;\n", + "X01=8.98\n", + "X02=K*K*X01;\n", + "pf=0.8\n", + "percentreg=(I2*R02*pf+I2*X02*sqrt(1-pf*pf))*100/E2;\n", + "print\"Percentage maximum regulation is=\",round(percentreg,2)\n", + "wi=90\n", + "I1=kva*1000/E1\n", + "Wcf=I1*I1*R01\n", + "kvam=kva*sqrt(wi/Wcf)\n", + "print\"kva at maximum Efficency is kvam=\",round(kvam,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage maximum regulation is= 4.45\n", + "kva at maximum Efficency is kvam= 4.52\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.23:pg-365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "v1=200.0 #Assigning values to parameters\n", + "i0=0.7\n", + "w=70.0\n", + "k=400/200\n", + "t=math.acos(w/(v1*i0))\n", + "iw=i0*cos(t)\n", + "iu=i0*sin(t)\n", + "r0=v1/iw\n", + "x0=v1/iu\n", + "vsc=15.0\n", + "i2=10.0\n", + "w=85.0\n", + "r02=w/(i2*i2)\n", + "z02=vsc/i2\n", + "x02=sqrt(z02*z02-r02*r02)\n", + "r01=r02/(k*k)\n", + "x01=x02/(k*k)\n", + "e2=400.0\n", + "i2=5*1000/(0.8*e2)\n", + "v2=e2-i2*r02*cos(t)-i2*x02*sin(t)\n", + "print\"The secondary Voltage is v2=\",round(v2,2),\"volts\"\n", + "#the answer of v2 in the book is wrong,because in the book ,the values of cos(t) & sin(t) are wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The secondary Voltage is v2= 376.64 volts\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.24:pg-366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "wi=1000.0 #Assigning values to parameters\n", + "kva=50.0\n", + "e1=2200.0\n", + "ifl=kva*1000/e1\n", + "x=1.0\n", + "pf=0.8\n", + "wcf=(ifl/20)*(ifl/20)*500\n", + "n1=x*kva*pf*100/((x*kva*pf)+(wi*0.001)+(x*x*wcf*0.001))\n", + "x=sqrt(wi/wcf)\n", + "n2=x*kva*pf*100/((x*kva*pf)+(2*wi*0.001))\n", + "print\"Efficiency at full node 0.8pf is n1=\",round(n1,3)\n", + "print\"Maximum Efficency is n2=\",round(n2,2)\n", + "print\"Load at which maximum occurs is x=\",round(x,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency at full node 0.8pf is n1= 96.048\n", + "Maximum Efficency is n2= 96.14\n", + "Load at which maximum occurs is x= 1.24\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.25:pg-367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "kva=5.0 #Assigning values to parameters\n", + "e2=400.0\n", + "r02=0.85\n", + "x02=1.236\n", + "i2f=kva*1000/e2\n", + "t=math.acos(0.8)\n", + "pr1=(i2f*r02*cos(t)+i2f*x02*sin(t))*100/e2\n", + "pr2=(i2f*r02*cos(t)-i2f*x02*sin(t))*100/e2\n", + "print\"The percentage regulation at full load 0.8 pf lagging is\",round(pr1,2)\n", + "print\"The percentage regulation at full load 0.8 pf leading is\",round(pr2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage regulation at full load 0.8 pf lagging is 4.44\n", + "The percentage regulation at full load 0.8 pf leading is -0.19\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.26:pg-369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "cl=(10.0/12)*(10.0/12)*100 #Assigning values to parameters\n", + "op=500*10*0.8\n", + "il=80.0\n", + "eff=op*100/(op+il+cl)\n", + "print\"The efficiency is eff=\",round(eff,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is eff= 96.4\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.27:pg-370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "kw=15 #Assigning values to parameters\n", + "t=math.acos(0.8)\n", + "kva=kw/cos(t)\n", + "x=kva/25\n", + "wcf=500\n", + "cl1=0.75*0.75*wcf\n", + "kw=20\n", + "t=math.acos(0.9)\n", + "kva=kw/cos(t)\n", + "x=kva/25\n", + "cl2=x*x*500\n", + "kw=10\n", + "t=math.acos(0.9)\n", + "kva=kw/cos(t)\n", + "x=kva/25\n", + "cl3=x*x*500\n", + "tec=cl1*6+cl2*10+cl3*4\n", + "tei=400*24\n", + "eo=330000\n", + "n=eo*100/(eo+tei+tec)\n", + "print\"The efficiency is n=\",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is n= 95.48 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.28:pg-371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "kw=400.0 #Assigning values to parameters\n", + "pf=0.8\n", + "kva=kw/pf\n", + "cl1=4.5\n", + "kw=300.0\n", + "pf=0.75\n", + "kva=kw/pf\n", + "cl2=(kva/500)*(kva/500)*4.5\n", + "kw=100.0\n", + "pf=0.8\n", + "kva=kw/pf\n", + "cl3=(kva/500)*(kva/500)*4.5\n", + "cl4=0\n", + "tec=cl1*6+cl2*10+cl3*4+cl4*4\n", + "tei=84.0\n", + "eo=5800.0\n", + "n=eo*100/(eo+tei+tec)\n", + "print\"The efficiency is n=\",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is n= 97.63 %\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.29:pg-372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "nm=0.98 #Assigning values to parameters\n", + "kva=15.0\n", + "x=1.0\n", + "pf=1.0\n", + "wi=((x*kva*pf/nm)/2-(x*kva*pf)/2)\n", + "wcu=wi\n", + "kw=2.0\n", + "pf=0.5\n", + "kva=kw/pf\n", + "cl1=(kva/15)*(kva/15)*wi\n", + "kw=12.0\n", + "pf=0.8\n", + "kva=kw/pf\n", + "cl2=0.153\n", + "kw=18.0\n", + "pf=0.9\n", + "kva=kw/pf\n", + "cl3=(kva/15)*(kva/15)*wi\n", + "tec=cl1*12+cl2*6+cl3*6\n", + "tei=3.672\n", + "eo=204.0\n", + "n=eo*100/(eo+tei+tec)\n", + "print\"The efficiency is n=\",round(n,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is n= 96.98\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.30:pg-374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "cl1=1.5 #Assigning values to parameters\n", + "cl2=0.5*0.5*cl1\n", + "tec=cl1*3+cl2*4\n", + "tei=36\n", + "eo=500\n", + "n=eo*100/(eo+tei+tec)\n", + "print\"The efficiency is n=\",round(n,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is n= 92.25\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..e17d0fa1 Binary files /dev/null and b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch1.png differ 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 new file mode 100644 index 00000000..1dd6b0f6 Binary files /dev/null and b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch2.png differ 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 new file mode 100644 index 00000000..46a589d4 Binary files /dev/null and b/Basic_Electrical_And_Electronics_Engineering_by_B._R._Patil/screenshots/ch4.png differ 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 new file mode 100644 index 00000000..395bfd74 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch1.ipynb @@ -0,0 +1,2715 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c9941b6743666f452b49e914af76cbbcd62003c68f667c009fbaf557ae03d6e9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : FUNDAMENTALS OF ELECTRICITY AND DC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "# details for the first wire\n", + "l1 = 1;\t\t\t\t\t\t#length in m\n", + "R1 = 2;\t\t\t\t\t\t#resistance in ohms\n", + "x = R1;\t\t\t\t\t\t#say\n", + "d = 1;\t\t\t\t\t\t#say \n", + "p = 1;\t\t\t\t\t\t#say\n", + "d1 = d;\t\t\t\t\t\t#say diameter in m \n", + "p1 = p;\t\t\t\t\t\t#say specific resistance of wire\n", + "#details for the second wire\n", + "l2 = 3;\t\t\t\t\t\t#length in m\n", + "d = 1;\t\t\t\t\t\t#say \n", + "p = 1;\t\t\t\t\t\t#say\n", + "d2 = 2*d;\t\t\t\t\t\t#say diameter in m \n", + "p2 = 2*p;\t\t\t\t\t\t#say specific resistance of wire\n", + "\n", + "#CALCULATIONS\n", + "R1 = p1*l1/(math.pi*d*d/4);\t\t\t\t\t\t#(R1 = p1*l1/a1), where a1 is cross sectional area of first wire with diameter d as (math.pi*d*d/4)---------------equation 1\n", + "R2 = p2*l2/(math.pi*(4*d*d)/4);\t\t\t\t\t\t#(R2 = p2*l2/a2), where a2 is cross sectional area of second wire with diameter 2d as (math.pi*((2*d)*(2*d))/4)-------------equation 2\n", + "#dividing equation 1 by equation 2\n", + "z = R1/R2;\n", + "R2 = x/z;\n", + "#OUTPUT\n", + "print \"Thus the resistance of second wire is %1.0f ohm \"%(R2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of second wire is 3 ohm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l1 = 20;\t\t\t#length in cm for first case\n", + "l2 = 0.4;\t\t\t#length in cm for second case\n", + "w = 0.1;\t\t\t#width in cm\n", + "t = 0.4;\t\t\t#thickness in cm\n", + "p = 1.7*10**-6\t\t\t#resistivity of copper in ohm cm\n", + "a1 = 0.1*0.4\t\t\t#area(w*t) in cm**2 for first case\n", + "a2 = 0.1*20\t\t\t#area(l*t) in cm**2 for second case\n", + "\n", + "#CALCULATIONS\n", + "R1 = p*l1/a1;\t\t\t#resistance in ohms for first case\n", + "R2 = p*l2/a2;\t\t\t#resistance in ohms for second case\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance in first and second cases are %g ohms and %g ohms\"%(R1,R2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance in first and second cases are 0.00085 ohms and 3.4e-07 ohms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "la = 1000;\t\t\t#length of aluminium wire in cm\n", + "da = 0.2;\t\t\t#diameter in cm\n", + "pa = 2.6*10**-6;\t\t\t#specific resistance of aluminium in ohm cm\n", + "pc = 1.6*10**-6;\t\t\t#specific resistance of copper in ohm cm\n", + "lc = 600;\t\t\t#length of copper wire in cm\n", + "i = 2;\t\t\t#current in A pasmath.sing through combination\n", + "ia = 1.25;\t\t\t#current in A pasmath.sing through aluminium wire \n", + "\n", + "#CALCULATIONS\n", + "ic = i-ia;\t\t\t#current in A pasmath.sing through copper wire\n", + "#resistance of aluminium wire in ohms\n", + "Ra = pa*la/(math.pi*(da*da)/4);\t\t\t#(Ra = pa*la/a), where a is cross sectional area of aluminum wire with diameter da \n", + "Rc = ia/ic*Ra;\t\t\t#resistance of copper wire\n", + "dc = math.sqrt(4*pc*lc/Rc);\t\t\t#diameter of copper wire\n", + "\n", + "#OUTPUT\n", + "print \"Thus the diameter of copper wire is %1.3f cm \"%(dc);\n", + "#note:The answer given for diameter in text book is wrong.please check the calculations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the diameter of copper wire is 0.167 cm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "l = 10000.;\t\t\t#length drawn from 10cc of copper in cm\n", + "p = 1.7*10**-6;\t\t\t#Resistivity of copper in ohm cm\n", + "v = 10.;\t\t\t#volume of copper in cc\n", + "s1 = 10.;\t\t\t#square sheet side in second case in cm\n", + "\n", + "#CALCULATIONS\n", + "a = v/l;\t\t\t#area of cross-section in cm**2 in first case\n", + "R1 = p*l/a;\t\t\t#resistance of wire in first case in ohm\n", + "a1 = s1*s1;\t\t\t#area of cross-section in cm**2 in second case\n", + "l1 = v/a1;\t\t\t#thickness in case 2 in cm\n", + "R2 = p*l1/a1;\t\t\t#resistance of wire in second case in ohm\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance in first and second cases are %g ohms and %g ohms\"%(R1,R2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance in first and second cases are 17 ohms and 1.7e-09 ohms\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "t1 = 40.;\t\t\t#temperature in degree centigrade \n", + "t2 = 100.;\t\t\t#temperature in degree centigrade\n", + "R1 = 3.146;\t\t\t#resistance of platinum coli at t1\n", + "R2 = 3.767;\t\t\t#resistance of platinum coli at t2\n", + "\n", + "#CALCULATIONS\n", + "x = R1/R2;\n", + "a0 = ((R1-R2)/(R2*t1-R1*t2));\t\t\t#temperature coefficient at 0 degree centigrade\n", + "R0 = R1/(1+(a0*t1));\t\t\t#resistance at zero degree centigrade\n", + "a40 = a0/(1+(a0*t1));\t\t\t#temperature coefficient at 40 degree centigrade\n", + "\n", + "#OUTPUT\n", + "print \"Thus the temperature coefficient at 0 degree centigrade, resistance at zero degree centigrade, \\\n", + "\\ntemperature coefficient at 40 degree centigrade are %f /degree centigrade , %f ohms, %f /degree centigrade\\\n", + "\\n respectively \"%(a0,R0,a40);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the temperature coefficient at 0 degree centigrade, resistance at zero degree centigrade, \n", + "temperature coefficient at 40 degree centigrade are 0.003788 /degree centigrade , 2.732000 ohms, 0.003290 /degree centigrade\n", + " respectively \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "t1 = 12;\t\t\t#temperature in degree centigrade\n", + "t2 = 50;\t\t\t#temperature in degree centigrade\n", + "R1 = 0.4;\t\t\t#copper coil resistance in ohms\n", + "a0 = 0.004;\t\t\t#temperature coefficient of copper at zero degree centigrade\n", + "\n", + "#CALCULATIONS\n", + "a12 = 1/((1/a0)+t1);\t\t\t#temperature coefficient at 12 degree centigrade\n", + "R2 = R1*(1+(a12*(t2-t1)));\t\t\t#resistance of copper wire in ohm at 52 degree centigrade\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance copper wire at 52 degree centigrade is %1.2f ohm \"%(R2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance copper wire at 52 degree centigrade is 0.46 ohm \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "t1 = 20;\t\t\t#temperature in degree centigrade\n", + "R1 = 45;\t\t\t#shunt motor resistance at t1\n", + "R2 = 48.5;\t\t\t#new shunt resistance at t2\n", + "a0 = 0.004;\t\t\t#temperature coefficient of resistance at 0 degree centigrade\n", + "\n", + "#CALCULATIONS\n", + "x = R1/R2;\n", + "t2 = ((1+(a0*t1)-x)/(a0*x));\n", + "\n", + "#OUTPUT\n", + "print \"Thus the temperature for new resistance is %d degree centigrade \"%(t2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the temperature for new resistance is 41 degree centigrade \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "V = 180.;\t\t\t#supply voltage in volts\n", + "I1 = 4.;\t\t\t#initial current of coil in A\n", + "t1 = 20.;\t\t\t#initial temperature\n", + "I2 = 3.4;\t\t\t#new decreased current of coil in A at temperature t2\n", + "a0 = 0.0043;\t\t\t#temperature coefficient in per degree centigrade\n", + "\n", + "#CALCULATIONS\n", + "R1 = V/I1;\t\t\t#initial resistance of coil in ohms\n", + "R2 = V/I2;\t\t\t#resistance of coil after some time in ohms\n", + "x = R1/R2;\n", + "t2 = (1+(a0*t1)-x)/(a0*x);\n", + "t = t2-t1;\t\t\t#temperature rise\n", + "\n", + "#OUTPUT\n", + "print \"Thus the temperature rise is %2.2f degree centigrade \"%(t);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the temperature rise is 44.57 degree centigrade \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "t2 = 2750.;\t\t\t#temperature in degree centigrade for tungsten lamp\n", + "P = 150.;\t\t\t#power in watts\n", + "V = 230.;\t\t\t#voltage in volts\n", + "t1 = 16.;\t\t\t#temperature in degree centigrade\n", + "a0 = 0.0047;\t\t\t#temperature coefficient of tungsten in per degree centigrade\n", + "\n", + "#CALCULATIONS\n", + "R2 = (V*V)/P;\n", + "a1 = 1/((1/a0)+t1);\t\t\t#temperature coefficient of resismath.tant at 16 degree centigrade\n", + "R2 = (V*V)/P;\t\t\t#resistance of the filament of the lamp under normal working condition\n", + "R1 = R2/(1+(a1*(t2-t1)));\t\t\t#resistance of copper wire in ohm at 52 degree centigrade\n", + "I2 = V/R2;\t\t\t#normal current taken by lamb\n", + "I1 = V/R1;\t\t\t#current taken at the moment of switching on\n", + "\n", + "#OUTPUT\n", + "print \"Thus the normal current taken by lamb and current taken at the moment of switching\\\n", + "\\n on are %1.4f A and %1.4f A respectively \"%(I2,I1);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the normal current taken by lamb and current taken at the moment of switching\n", + " on are 0.6522 A and 8.4464 A respectively \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "m1 = 2.;\t\t\t#mass of water in kg\n", + "theta1 = 20.;\t\t\t#temperature 20 degree centigrade\n", + "theta2 = 100.;\t\t\t#temperature 100 degree centigrade(boiling point of water)\n", + "t = 1./10;\t\t\t#time taken to boil water in hr\n", + "x = 40.;\t\t\t#math.cost of energy of 1kwh in paise for one unit\n", + "y = 12.;\t\t\t#math.cost of energy consumed\n", + "S = 1.;\t\t\t#specific heat of water\n", + "\n", + "#CALCULATIONS \n", + "H = m1*S*(theta2-theta1);\t\t\t#heat energy required to raise temperature from theta1 to theta2 in kcals\n", + "H = H/860;\t\t\t#heat energy in Kwh\n", + "E = (12./40);\t\t\t#electrical energy or input energy to kettle in Kwh\n", + "n = H/E*100;\t\t\t#efficiency of kettle in percentage;\n", + "P = E/t;\t\t\t#power rating of kettle\n", + "\n", + "#OUTPUT\n", + "print \"Thus the efficiency of kettle in percentage and power rating of kettle is %d and %1.0f Kw\"%(n,P);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the efficiency of kettle in percentage and power rating of kettle is 62 and 3 Kw\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "m = 2.;\t\t\t#mass of water in kg\n", + "theta1 = 20.;\t\t\t#temperature 20 degree centigrade\n", + "theta2 = 100.;\t\t\t#temperature 100 degree centigrade(boiling point of water)\n", + "t = 0.25;\t\t\t#time taken to boil water in hr\n", + "V = 240.;\t\t\t#power supply in volts\n", + "n = 80.;\t\t\t#efficiency of kettle in percentage\n", + "S = 1.;\t\t\t#specific heat of water\n", + "\n", + "#CALCULATIONS \n", + "H = m*S*(theta2-theta1);\t\t\t#output energy from the kettle in kcal\n", + "H = H/860;\t\t\t#output energy from the kettle in kwh\n", + "n = n/100;\n", + "E = H/n;\t\t\t#electrical energy or input energy to kettle in Kwh\n", + "P = E/t;\t\t\t#power rating of kettle in Kw\n", + "P = P*1000;\t\t\t#power rating of kettle in w\n", + "R = (V*V)/P;\t\t\t#resistance of heating element in ohms\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance of heating element is %2.2f ohms\"%(R);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of heating element is 61.92 ohms\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "m = 20.;\t\t\t#mass of aluminium in kg\n", + "S = 0.896;\t\t\t#specific heat of aluminium in KJ/Kg degree centigrade\n", + "L = 402.;\t\t\t#latent heat of fusion of aluminium in KJ/Kg \n", + "theta2 = 657.;\t\t\t#final temperature\n", + "theta1 = 20.;\t\t\t#initial temperature(assumed)\n", + "P = 25.;\t\t\t#power of furnace in Kw\n", + "n = 80.;\t\t\t#efficiency of kettle in percentage\n", + "\n", + "#CALCULATIONS \n", + "H = m*S*(theta2-theta1)+(m*L);\t\t\t#heat energy required to melt aluminium or energy output from the furnace in Kj\n", + "H = H/4.186;\t\t\t#heat energy required to melt aluminium or energy output from the furnace in Kcal\n", + "H = H/860;\t\t\t#heat energy required to melt aluminium or energy output from the furnace in KWh\n", + "n = n/100;\n", + "E = H/n;\t\t\t#electrical energy or input energy to kettle in Kwh\n", + "t = E/P;\t\t\t#time taken to melt the aluminium in hr\n", + "t = t*60;\t\t\t# time taken to melt the aluminium in min\n", + "\n", + "#OUTPUT\n", + "print \"Thus the time taken to melt the aluminium is %2.2f min\"%(t);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the time taken to melt the aluminium is 16.21 min\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "m = 80000.;\t\t\t#mass of water lifted by pump in Kg/min\n", + "g = 9.81;\t\t\t#gravity consmath.tant in m/sec**2\n", + "h = 2.;\t\t\t#pump is in operation for two hours a day\n", + "d = 30.;\t\t\t#pump is in operation for 30 days\n", + "T = h*d;\t\t\t#total time for which pump is in operation in hrs\n", + "n = 70.;\t\t\t#efficeincy in percentage\n", + "h = 12.;\t\t\t#the height in m to which pump lifts water\n", + "C = 50.;\t\t\t#math.cost of energy in paise/Kwh\n", + "\n", + "#CALCULATIONS \n", + "P = m*g*h;\t\t\t#potential energy possessed by water per minute or workdone by motor pump/minute measured in joules\n", + "P = P/60;\t\t\t#potential energy possessed by water per minute or workdone by motor pump/minute measured in joules/sec or watts.\n", + "O = P/1000;\t\t\t#output power of motor in Kw\n", + "n = n/100;\n", + "E = O/n;\t\t\t#input power of motor in Kw\n", + "Et = E*T;\t\t\t#total energy supplied or energy consumption in Kwh\n", + "C = C/100;\t\t\t#math.cost of energy in Rs/Kwh\n", + "Ct = C*Et;\t\t\t#Total math.cost of energy\n", + "\n", + "#OUTPUT\n", + "print \"Thus the total math.cost of energy is Rs %4.0f\"%(Ct);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the total math.cost of energy is Rs 6727\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "P = 100.;\t\t\t#power of power station in MW\n", + "g = 9.81;\t\t\t#gravity consmath.tant in m/sec**2\n", + "h = 200.;\t\t\t#effective head of power station in m\n", + "n = 80.;\t\t\t#efficiency of station in percentage\n", + "t = 10.;\t\t\t#operation time of power station \n", + "\n", + "#CALCULATIONS \n", + "E1 = P*t;\t\t\t# energy output from the station in 10 hours measured in MWh\n", + "n = n/100;\n", + "E2 = P*t/n;\t\t\t#energy input to the station in 10 hours measured in MWh\n", + "E2 = E2*10**6*60*60;\t\t\t#energy input to the station in 10 hours measured in Wsec or joules\n", + "#energy input to the station is equal to potential energy supplied by water to station\n", + "m = E2/(g*h);\t\t\t#mass in kg of water used\n", + "d = 1000;\t\t\t#density of water in kg/m**3\n", + "V = m/d;\t\t\t#volume of water used in 10 hours\n", + "\n", + "#OUTPUT\n", + "print \"Thus the volume of water used in 10 hours is %e cubic metre\"%(V);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the volume of water used in 10 hours is 2.293578e+06 cubic metre\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "I = 20.;\t\t\t#current in A\n", + "V = 8.;\t\t\t#supply voltage in V\n", + "t = 3600.;\t\t\t#1hr = 3600sec\n", + "m = 1000;\t\t\t#mass in kg(1 tonne = 1000 kg)\n", + "#kinetic energy = energy dissipated in the resistance----eqn(1)\n", + "\n", + "#CALCULATIONS \n", + "E = V*I*t;\t\t\t# energy dissipated in resistance in joules\n", + "v = math.sqrt(E/(0.5*m));\t\t\t#kinetic energy possesed by body(K = 0.5*m*v*v) and umath.sing eqn(1),we found out velocity in m/sec\n", + "\n", + "#OUTPUT\n", + "print \"Thus the velocity is %2.2f m/sec\"%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the velocity is 33.94 m/sec\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "I = 7.9;\t\t\t#current in A\n", + "V = 240.;\t\t\t#supply voltage in V\n", + "t = 55.;\t\t\t#temperature in degree centigrade\n", + "a0 = 0.00029;\t\t\t#temperature coefficient in ohm/ohm/degree centigrade\n", + "l = 15.6;\t\t\t#length of wire in m\n", + "a = 12.;\t\t\t#cross-sectional area in mm**2\n", + "\n", + "#CALCULATIONS \n", + "R = V/I;\t\t\t#resistance of wire in ohm\n", + "p = R*a/l;\t\t\t#resistivity of wire in ohm metre\n", + "Rt = R*(1+(a0*t));\t\t\t#resistance at 55 degree centigrade in ohm\n", + "I1 = V/Rt;\t\t\t#current through wire at temperature 55 degree centigrade in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistivity and current through wire at temperature 55 degree centigrade are %2.2f micro\\\n", + "\\n ohm meter and %2.2f A respectively\"%(p,I1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistivity and current through wire at temperature 55 degree centigrade are 23.37 micro\n", + " ohm meter and 7.78 A respectively\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R1 = 0.031;\t\t\t#resistance of wire in ohm\n", + "d1 = 11.7;\t\t\t#diameter of wire in mm in case 1\n", + "r1 = d1/2;\t\t\t#radius of wire in mm in case 1\n", + "d2 = 5;\t\t\t#diameter of wire in mm in case 2\n", + "r2 = d2/2;\t\t\t#radius of wire in mm in case 2\n", + "# we know that resistance is inversely proportional to square of area of cross-section\n", + "\n", + "#CALCULATIONS \n", + "R2 = R1*(((math.pi*r1*r1)/(math.pi*r2*r2)))**2;\t\t\t#resistance of wire in case 2\n", + "\n", + "#OUTPUT\n", + "print \"Thus the new resistance of wire is %1.4f ohms\"%(R2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the new resistance of wire is 2.2692 ohms\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "p20 = 1.724*10**-8;\t\t\t#specific resistance of copper in ohm m\n", + "a = 0.0043;\t\t\t#temperature coefficient of copper at 0 degree centigrade measured in per degree centigrade\n", + "r1 = 8;\t\t\t#inner radius of copper circular ring in cm\n", + "r2 = 6;\t\t\t#axial thickness in cm\n", + "r3 = 4;\t\t\t#radial thickness in cm\n", + "a1 = r2*r3*10**-4;\t\t\t#area of cross-section of ring in m**2\n", + "r2 = r2*2;\n", + "l = math.pi*((r1+r2)/2)/100;\t\t\t#length of semicircular ring between faces in m\n", + "t1 = 20;\t\t\t#temperature 20 degree centigrade\n", + "t2 = 50;\t\t\t#temperature 50 degree centigrade\n", + "\n", + "#CALCULATIONS \n", + "R20 = p20*(l/a1);\t\t\t#resistance of ring at 20 degree centigrade in ohm\n", + "R50 = R20*((1+(a*t2))/(1+(a*t1)));\t\t\t#resistance of ring at 50 degree centigrade in ohm\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance of wire at 50 degree centigrade is %g ohms\"%(R50);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of wire at 50 degree centigrade is 2.52477e-06 ohms\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "l1 = 0.5;\t\t\t#length of copper rod in m\n", + "a = 0.00426;\t\t\t#temperature coefficient of copper measured in per degree centigrade\n", + "R1 = 4.25*10**-4;\t\t\t#resistance of wire at 15 degree centigrade in ohm\n", + "d1 = 5*10**-3;\t\t\t#diameter of copper rod in m in case 1\n", + "r1 = 0.5*d1;\t\t\t#radius of copper rod in m in case 1\n", + "a1 = math.pi*((r1)**2);\t\t\t#area of cross-section in m**2 in case 1\n", + "t1 = 15;\t\t\t#temperature in degree centigrade\n", + "t2 = 50;\t\t\t#temperature in degree centigrade\n", + "\n", + "#CALCULATIONS \n", + "p = R1*a1/l1;\t\t\t#resistivity in ohm-m\n", + "d2 = 1*10**-3;\t\t\t#diameter of copper rod in m in case 2\n", + "r2 = d2/2;\t\t\t#radius of copper rod in m in case 2\n", + "a2 = math.pi*(r2)**2;\t\t\t#area of cross-section in m**2 in case 2\n", + "R15 = (a1/a2)**2*R1;\t\t\t#resistance at 15 degree centigrade\n", + "R50 = R15*((1+(a*t2))/(1+(a*t1)));\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance of wire at 50 degree centigrade is %1.4f ohm\"%(R50);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance of wire at 50 degree centigrade is 0.3029 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "l1 = 7.5;\t\t\t#length of aluminium wire in m\n", + "d1 = 1*10**-3;\t\t\t#diameter of aluminium wire in m \n", + "r1 = 0.5*d1;\t\t\t#radius of aluminium wire in m\n", + "a1 = math.pi*((r1)**2);\t\t\t#area of cross-section in m**2 for aluminium wire \n", + "p1 = 0.028;\t\t\t#resistivity of aluminium in micro ohm-m\n", + "l2 = 6;\t\t\t#length of copper wire in m\n", + "p2 = 0.017;\t\t\t#resistivity of copper in micro ohm-m\n", + "I = 5;\t\t\t#current through parallel combination in A\n", + "I1 = 3;\t\t\t#current through aluminium wire in A\n", + "I2 = I-I1;\t\t\t#current through copper wire in A\n", + "\n", + "#CALCULATIONS \n", + "R1 = p1*l1/a1;\t\t\t#resistance of aluminium wire in ohm\n", + "V1 = I1*R1;\t\t\t#voltage drop across the end of Al wire in V\n", + "#math.since the wires are connected in parallel,so V1 = V2\n", + "a2 = I2*p2*l2/V1;\t\t\t#area of cross-section in m**2 for copper wire \n", + "d2 = math.sqrt(4*a2/math.pi);\t\t\t#diameter of copper wire in m \n", + "\n", + "#OUTPUT\n", + "print \"Thus the diameter of copper wire is %g m\"%(d2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the diameter of copper wire is 0.000569043 m\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.22 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R20 = 100.;\t\t\t#resistance of coil at 20 degree centigrade in ohms\n", + "R45 = 110.;\t\t\t#resistance of coil at 45 degree centigrade in ohms\n", + "Rt = 124.;\t\t\t#resistance of coil at t degree centigrade in ohms\n", + "t1 = 20.;\t\t\t#temperature in degree centigrade\n", + "t2 = 15.;\t\t\t#temperature in degree centigrade\n", + "a = R45/R20;\n", + "\n", + "#CALCULATIONS \n", + "a0 = (a-1)/(45-(20*a));\t\t\t#temperature coefficient of coil at 0 degree centigrade\n", + "x = (Rt/R20);\n", + "t = (x)*(1+(a0*t1));\n", + "t = t-1;\n", + "t = (t)*(1/a0);\t\t\t#\t\t\t#temperature of coil when Rt = 124 ohms measured in degree centigrade\n", + "deltat = t-t2;\t\t\t#mean temperature rise\n", + "\n", + "#OUTPUT\n", + "print \"Thus the mean temperature rise is %2.0f degree centigrade\"%(deltat);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the mean temperature rise is 65 degree centigrade\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.23 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R20 = 18.;\t\t\t#resistance of coil at 20 degree centigrade in ohms\n", + "R50 = 20.;\t\t\t#resistance of coil at 50 degree centigrade in ohms\n", + "Rt = 21.;\t\t\t#resistance of coil at t degree centigrade in ohms\n", + "t1 = 20.;\t\t\t#temperature in degree centigrade\n", + "t2 = 50.;\t\t\t#temperature in degree centigrade\n", + "t3 = 15.;\t\t\t#temperature in degree centigrade\n", + "a = R50/R20;\n", + "\n", + "#CALCULATIONS \n", + "a0 = (a-1)/(50-(20*a));\t\t\t#temperature coefficient of coil at 0 degree centigrade\n", + "x = (Rt/R50);\n", + "t = (x)*(1+(a0*t2));\n", + "t = t-1;\n", + "t = (t)*(1/a0);\t\t\t#\t\t\t#temperature of coil when Rt = 21 ohms measured in degree centigrade\n", + "deltat = t-t3;\t\t\t#mean temperature rise\n", + "\n", + "#OUTPUT\n", + "print \"Thus the mean temperature rise is %2.0f degree centigrade\"%(deltat);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the mean temperature rise is 50 degree centigrade\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.24 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R1 = 4.;\t\t\t#resistance in ohms\n", + "R2 = 6.;\t\t\t#\t\t\t#resistance in ohms\n", + "I = 30.;\t\t\t#current through parallel combination in A\n", + "\n", + "#CALCULATIONS \n", + "I1 = I*(R2/(R1+R2));\t\t\t#current through resistor1 in A\n", + "I2 = I-I1;\t\t\t#current through resistor2 in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus the current through resistor1 and resistor2 are %d A and %d A respectively\"%(I1,I2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the current through resistor1 and resistor2 are 18 A and 12 A respectively\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.25 Page No : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R1 = 2.;\t\t\t#resistance1 in ohms\n", + "R2 = 3.;\t\t\t#resistance2 in ohms\n", + "R3 = 4.;\t\t\t#resistance3 in ohms\n", + "R4 = 5.;\t\t\t#resistance4 in ohms\n", + "P = 100.;\t\t\t#total power absorbed in watts\n", + "\n", + "#CALCULATIONS \n", + "RT = ((R2*R3*R4)+(R1*R3*R4)+(R1*R2*R4)+(R1*R2*R3))/(R1*R2*R3*R4);\n", + "RT = 1/RT;\t\t\t#equivalent resistance of parallel combination of R1,R2,R3,R4 Resistors\n", + "V = math.sqrt(P*RT);\t\t\t#voltage in volts that has to be applied to absorb 100w of power\n", + "\n", + "#OUTPUT\n", + "print \"Thus the voltage in volts that has to be applied to absorb 100w of power is %1.3f V \"%(V);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the voltage in volts that has to be applied to absorb 100w of power is 8.827 V \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.26 Page No : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V = 230;\t\t\t#supply voltage in volts\n", + "I1 = 12.;\t\t\t#initial current in A\n", + "I2 = 16;\t\t\t#final current in A\n", + "\n", + "#CALCULATIONS \n", + "I = I2-I1;\t\t\t#current through the resistance placed in parallel in A\n", + "R = V/I;\t\t\t#resistance in ohms by ohm's law\n", + "\n", + "#OUTPUT\n", + "print \"Thus the resistance placed in parallel is %2.1f ohm \"%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the resistance placed in parallel is 57.5 ohm \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.27 Page No : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "I = 12.1;\t\t\t#current in A entering the parallel combination of resistors\n", + "I1 = 7.2;\t\t\t#current in A in resistor 1\n", + "R1 = 50.;\t\t\t#resistance1 in ohm\n", + "R2 = 100.;\t\t\t#resistance2 in ohm\n", + "\n", + "#CALCULATIONS \n", + "V = I1*R1;\t\t\t#supply voltage in volts by ohms law(V = I*R)\n", + "I2 = V/R2;\t\t\t#current through R2 in A by ohms law\n", + "I3 = I-I1-I2;\t\t\t#current through resistance3 R3 in A by ohms law\n", + "R3 = V/I3;\t\t\t#resistance in ohm\n", + "\n", + "#OUTPUT\n", + "print \"Thus the value of third resistance placed is %3.2f ohm \"%(R3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the value of third resistance placed is 276.92 ohm \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.28 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R1 = 3.6;\t\t\t#resistance in ohm\n", + "R2 = 4.56;\t\t\t#resistance in ohm\n", + "RT = 6.;\t\t\t#resistance in ohm\n", + "\n", + "#CALCULATIONS \n", + "X = RT-(R2);\n", + "R3 = (X*R1)/(R1-X);\n", + "\n", + "#OUTPUT\n", + "print \"Thus the value of third resistance placed is %1.1f ohm \"%(R3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the value of third resistance placed is 2.4 ohm \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.29 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "P = 70.;\t\t\t#total power dissipated in circuit in watts\n", + "V = 22.;\t\t\t#applied voltage in volts\n", + "I = P/V;\t\t\t#total current through the circuit in Amps\n", + "R1 = 12.;\t\t\t#resistance 1 of parallel combination in ohms\n", + "R2 = 8.;\t\t\t#resistance 2 of parallel combination in ohms\n", + "\n", + "#CALCULATIONS \n", + "RP = (R1*R2)/(R1+R2);\t\t\t#equivalent resistance of parallel combination in ohms\n", + "VP = I*RP;\t\t\t#voltage across parallel combination in volts\n", + "VR = V-VP;\t\t\t#voltage across the resistance R\t\t\t# in volts\n", + "R3 = VR/I;\t\t\t#by ohm's law\n", + "\n", + "#OUTPUT\n", + "print \"Thus the value of third resistance placed is %1.2f ohms \"%(R3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the value of third resistance placed is 2.11 ohms \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.30 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "P = 70.;\t\t\t#total power dissipated in circuit in watts\n", + "V1 = 6.;\t\t\t#math.since applied voltage E is 6V,as per the characteristics of parallel circuit P.D across R1 is\n", + "V2 = 6.;\t\t\t#V1 = V2,in volts\n", + "R1 = 12.;\t\t\t#resistance1 in parallel combination in ohms\n", + "R2 = 6.;\t\t\t#resistance2 in parallel combination in ohms\n", + "R3 = 6.25\t\t\t#resistance3 in series with parallel combination in ohms\n", + "I1 = V1/R1;\t\t\t# current through the resistance R1 in Amps\n", + "I2 = V2/R2;\t\t\t#current through the resistance R2 in Amps\n", + "r = 0.25;\t\t\t#internal resistance in ohm\n", + "\n", + "#CALCULATIONS \n", + "I = I1+I2;\t\t\t#total current through parallel combination\n", + "E = (I*r)+(I*R3)+V2;\t\t\t#emf of battery in Volts\n", + "\n", + "#OUTPUT\n", + "print \"Thus the value of emf of battery in Volts is %2.2f volts \"%(E);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the value of emf of battery in Volts is 15.75 volts \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.31 Page No : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "E = 12.;\t\t\t#emf of battery in volts\n", + "R1 = 3.;\t\t\t#resistance1 in parallel combination in ohms\n", + "R2 = 4.;\t\t\t#resistance2 in parallel combination in ohms\n", + "R3 = 6.;\t\t\t#resistance3 in parallel combination in ohms\n", + "R4 = 4.;\t\t\t#resistance4 in series with parallel combination in ohms\n", + "r = 6.;\t\t\t#internal resistance in ohm\n", + "\n", + "#CALCULATIONS \n", + "RP = ((R2*R3)+(R3*R1)+(R1*R2))/(R1*R2*R3);\n", + "RP = 1/RP;\t\t\t#equivalent resistance of parallel combination in ohms\n", + "RT = RP+R4+r;\t\t\t#total circuit resistance in ohms\n", + "I = E/RT;\t\t\t#total circuit current in A\n", + "V = E-(I*r);\t\t\t#terminal voltage of battery in volts\n", + "\n", + "#OUTPUT\n", + "print \"Thus the terminal voltage of battery is %1.3f volts \"%(V);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the terminal voltage of battery is 5.647 volts \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.32 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V = 24;\t\t\t#supply voltage of battery in volts\n", + "Rab = 13.;\t\t\t#resistance between A and B points in ohms\n", + "Rbc = 11.;\t\t\t#resistance between B and C points in ohms\n", + "Rbe = 18.;\t\t\t#resistance between B and E points in ohms\n", + "Rce = 14.;\t\t\t#resistance between C and E points in ohms\n", + "Red = 9.;\t\t\t#resistance between E and D points in ohms\n", + "Rcd = 5.;\t\t\t#resistance between C and D points in ohms\n", + "Rae = 22;\t\t\t#resistance between A and E points in ohm\n", + "Rx = Rae;\n", + "Ry = Rbe;\n", + "Raf = 1;\t\t\t#resistance between A and F points in ohms\n", + "\n", + "#CALCULATIONS \n", + "Rce = ((Rcd+Red)*(Rce))/(Rcd+Red+Rce);\t\t\t#equivalent resistance of Rce in ohms\n", + "Rbe = ((Rbc+Rce)*(Rbe))/(Rbc+Rce+Rbe);\t\t\t#equivalent resistance of Rbe in ohms\n", + "Rae = ((Rab+Rbe)*(Rae))/(Rab+Rbe+Rae);\t\t\t#equivalent resistance of Rae in ohms\n", + "RT = Rae+Raf;\t\t\t#total equivalent circuit resistance in ohms\n", + "Iaf = V/RT;\t\t\t#current through resistance Raf in A\n", + "Vae = V-(Iaf*Raf);\t\t\t#P.D across AE in volts\n", + "Iae = Vae/Rx;\t\t\t#current in AE in A\n", + "Iab = Iaf-Iae;\t\t\t#current in AB in A\n", + "Vab = Rab*Iab;\t\t\t#P.D across AB in volts\n", + "Vbe = Vae-Vab;\t\t\t#Voltage across branch BE in volts\n", + "Pbe = ((Vbe)**2)/(Ry);\t\t\t#power absorbed in branch Be in watts\n", + "Ibe = Vbe/Ry;\t\t\t#current in BE in A\n", + "Ibc = Iab-Ibe;\t\t\t#current in BC in A\n", + "Icde = (Ibc)/(2);\t\t\t#current in CDE in A\n", + "Vcd = Icde*(Rcd);\t\t\t#P.D across CD\n", + "\n", + "#OUTPUT\n", + "print \"Current in branch AF is %d A \\\n", + "\\nPower absorbed in BE is %1.1f watts \\\n", + "\\nP.D across CD is %1.2f volts \"%(Iaf,Pbe,Vcd);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in branch AF is 2 A \n", + "Power absorbed in BE is 4.5 watts \n", + "P.D across CD is 1.25 volts \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.33 Page No : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "V1 = 25.;\t\t\t#supply voltage1 of battery in volts\n", + "V2 = 45.;\t\t\t#supply voltage2 of battery in volts\n", + "R1 = 6.;\t\t\t#resistance1 in ohms\n", + "R3 = 4.;\t\t\t#resistance2 in ohms\n", + "R2 = 3.;\t\t\t#resistance3 in ohms\n", + "#let I1 be the current in loop1 and I2 current be in loop2\n", + "\n", + "#CALCULATIONS \n", + "#V1 = ((R1+R3)*(I1)-(R3*I2));\t\t\t#applying KVL in loop1 -------------eqn(1)\n", + "#V2 = ((R3)*(I1)-(R2+R3)*(I2));\t\t\t#applying KVL in loop2 -------------eqn(2)\n", + "#solving both eqn(1) and eqn(2)\n", + "a = [[(R1+R3),-R3],[(R3),-(R2+R3)]]\n", + "b = [[V1],[-V2]]\n", + "c = solve(a,b)#solve(a,b)\t\t\t#ax = b\n", + "c1 = c[0];\t\t\t#c1 is current in branch FABC measured in A\n", + "c2 = c[1];\t\t\t#c2 is current in branch CDEF measured in A \n", + "c3 = c1-c2;\t\t\t#current in branch CF in A\n", + "\n", + "#OUTPUT\n", + "print \"Current in R1 is %1.4f A \\\n", + "\\ncurrent in R2 is %2.3f A \\\n", + "\\ncurrent in R3 is %1.3f A \"%(c1,c2,c3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in R1 is 6.5741 A \n", + "current in R2 is 10.185 A \n", + "current in R3 is -3.611 A \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.34 Page No : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "V = 4.5;\t\t\t#supply voltage of battery in volts\n", + "RAB = 1000.;\t\t\t#resistance between A and B points in ohms\n", + "RBC = 100.;\t\t\t#resistance between B and C points in ohms\n", + "RAD = 5000.;\t\t\t#resistance between A and D points in ohms\n", + "RCD = 450.;\t\t\t#resistance between C and D points in ohms\n", + "Rg = 500.;\t\t\t#resistance of galvanometer in ohms\n", + "\n", + "#let I1 be the current across RAB and I1-Ig across RBC and I2 across RAD and I2+Ig across RCD and I be the total current\n", + "#where I = I1+I2\n", + "#CALCULATIONS \n", + "#(-(RAB*I1)-(Rg*Ig)+(RAD*I2)) = 0;\t\t\t#applying KVL to loop ABDA -------------eqn(1)\n", + "#(-(RBC*I1)+((Rg+RCD+RBC)*(Ig))+(RCD*I2)) = 0;\t\t\t#applying KVL to loop BCDB -------------eqn(2)\n", + "#((RAD+RCD)*I2)+(RCD*Ig)) = V;\t\t\t#applying KVL to loop EADCFE-------------eqn(3)\n", + "#solving eqn(1),eqn(2) and eqn(3)\n", + "a = [[-RAB,-Rg,RAD],[-RBC,(Rg+RCD+RBC),RCD],[0,RCD,(RAD+RCD)]];\n", + "b = [[0],[0],[V]];\n", + "c = solve(a,b) #solve(a,b)\t\t\t#ax = b\n", + "I1 = c[0];\t\t\t#c1 is current in branch FABC measured in A\n", + "Ig = c[1];\t\t\t#c2 is current in branch CDEF measured in A \n", + "I2 = c[2];\t\t\t#current in branch CF in A\n", + "\n", + "#OUTPUT\n", + "print \"Current through galvanometer is %g A since the answer is positive our assumed direction is correct \"%(Ig);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through galvanometer is 3.73909e-05 A since the answer is positive our assumed direction is correct \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.35 Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "V1 = 8.;\t\t\t#supply voltage of battery in loop1 in volts\n", + "V2 = 4.;\t\t\t#supply voltage of battery in loop2 in volts\n", + "RED = 200.;\t\t\t#resistance between E and D points in ohms\n", + "RAD = 20.;\t\t\t#resistance between A and D points in ohms\n", + "RCD = 50.;\t\t\t#resistance between C and D points in ohms\n", + "\n", + "#let I1 be the current across path AFED and I2 across AD and I1-I2 across path DCBA \n", + "#CALCULATIONS \n", + "#((RCD*I1)-((RAD+RCD)*I2)) = 4;\t\t\t#applying KVL to loop ADCBA -------------eqn(1)\n", + "#((RED*I1)+(RAD*I2)) = 8;\t\t\t#applying KVL to loop AFEDA -------------eqn(2)\n", + "#solving eqn(1)and eqn(2)\n", + "a = [[RCD,-(RAD+RCD)],[RED,RAD]]\n", + "b = [[4],[8]];\n", + "c = solve(a,b)\t\t\t#ax = b\n", + "I1 = c[0];\t\t\t#c1 is current across path AFED in A\n", + "I2 = c[1];\t\t\t#c2 is current across AD in A\n", + "\n", + "#OUTPUT\n", + "print \"Current in 20 ohm resistor is %f A math.since the answer is negative,the current actually flows from A to D \"%(I2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in 20 ohm resistor is -0.026667 A math.since the answer is negative,the current actually flows from A to D \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.36 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Rs = 25.;\t\t\t#total resistance when two resistances are connected in series in ohms\n", + "Rp = 6.;\t\t\t#total resistance when two resistances are connected in parallel in ohms\n", + "#let individual resistances be R1 and R2 ohms\n", + "\n", + "#CALCULATIONS \n", + "#Rs = (R1+R2)---eqn(1)\n", + "#Rp = ((R1*R2)/(R1+R2))---eqn(2)\n", + "#let (R1*R2) = x\n", + "#let(R1-R2) = y\n", + "#solving eqn(1)and eqn(2)\n", + "x = Rs*Rp;\t\t\t#in ohms\n", + "y = math.sqrt((Rs)**2-(4*x));\t\t\t#eqn---(3)\n", + "#solving eqn(1) and eqn(3)\n", + "z = Rs+y;\n", + "R1 = z/2;\t\t\t#resistance1 in ohms\n", + "R2 = Rs-R1;\t\t\t#resistance2 in ohms\n", + "\n", + "#OUTPUT\n", + "print \"Thus the individual resistances are R1 = %d ohms and R2 = %d ohms \"%(R1,R2); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the individual resistances are R1 = 15 ohms and R2 = 10 ohms \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.37 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P = 16.;\t\t\t#total power dissipated in circuit in Watts\n", + "R1 = 4.;\t\t\t#resistance R1 in Ohms\n", + "R2 = 2.;\t\t\t#resistance R2 in Ohms\n", + "R3 = 8.;\t\t\t#resistance R3 in Ohms\n", + "V = 8.;\t\t\t#supply voltage in volts\n", + "#let resistance parallel to R1 is R ohms\n", + "\n", + "#CALCULATIONS \n", + "Reff = (((V)**2)/P);\t\t\t#total effective resistance of circuit in ohms\n", + "x = ((R2*R3)/(R2+R3));\t\t\t#effective resistance of 2nd parallel circuit in ohms\n", + "z = (Reff-x);\t\t\t#effective resistance of 1st parallel circuit where z = ((R1*R)/(R1+R)) in ohms------eqn(1)\n", + "#solving for R in eqn(1)\n", + "R = (R1*z)/(R1-z);\n", + "Reff = ((R1*R)/(R1+R))+(x);\t\t\t#in ohms\n", + "I = V/Reff;\t\t\t#total current in A\n", + "\n", + "print \"Thus the total current is I = %d A \"%(I); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the total current is I = 2 A \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.38 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R1 = 2.;\t\t\t#resistance R1 in Ohms\n", + "R2 = 12.;\t\t\t#resistance R2 in parallel circuit measured in ohms\n", + "R3 = 20.;\t\t\t#resistance R3 in parallel circuit measured in ohms\n", + "R4 = 30.;\t\t\t#resistance R4 in parallel circuit measured in ohms\n", + "R5 = 2.;\t\t\t#resistance R5 in ohms\n", + "V = 100.;\t\t\t#supply voltage in volts\n", + "\n", + "#CALCULATIONS \n", + "Reff = (R1)+((1)/((1/R2)+(1/R3)+(1/R4)))+(R5);\t\t\t#total effective resistance of circuit in ohms\n", + "I = V/Reff;\t\t\t#total current in A\n", + "# let individual currents in 3 parallel resistance network be I1,I2,I3 respectively\n", + "#Then I1+I2+I3 = I---eqn(1)\n", + "#where I2 = (I1*R1/R2) and I3 = (I1*R1/R3)\n", + "#solving for I1 in eqn(1)\n", + "I1 = I/2;\t\t\t#in A\n", + "I2 = (I1*R2/R3);\t\t\t#in A\n", + "I3 = (I1*R2/R4);\t\t\t#in A\n", + "\n", + "# Results\n", + "print \"I1 = %d A I2 = %1.0f A I3 = %1.0f A\"%(I1,I2,I3); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I1 = 5 A I2 = 3 A I3 = 2 A\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.39 Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V = 100.;\t\t\t#supply voltage in volts\n", + "I = 10.;\t\t\t#total current in A\n", + "P1 = 600.;\t\t\t#power dissipated in coil in Watts\n", + "\n", + "#CALCULATIONS \n", + "#Reff = ((R1*R2)/(R1+R2)) is total effective resistance of circuit in ohms----eqn(1)\n", + "Reff = V/I;\t\t\t#total effective resistance of circuit in ohms\n", + "R1 = ((V)**2)/(P1);\t\t\t#in ohms----eqn(2)\n", + "#solving for R2 in eqn(1)\n", + "R2 = ((Reff*R1)/(R1-Reff));\t\t\t#in ohms\n", + "\n", + "# Results\n", + "print \"R1 = %2.2f Ohms R2 = %1.0f Ohms \"%(R1,R2); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 16.67 Ohms R2 = 25 Ohms \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.40 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#INPUT DATA\n", + "R1 = 5.;\t\t\t#resistance in ohms\n", + "P = 20.;\t\t\t#power dissipated in R1 in Watts\n", + "R2 = 10.;\t\t\t#resistance parallel to R1\n", + "\n", + "#CALCULATIONS \n", + "I1 = math.sqrt(P/R1);\t\t\t#current through R1 in A\n", + "I = ((R1+R2)/(R2))*(I1);\t\t\t#total supply current in A\n", + "\n", + "# Results\n", + "print \"I = %d A\"%(I); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I = 3 A\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.41 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "I1 = 2.;\t\t\t#current through R1 in A\n", + "I3 = 1.5;\t\t\t#current through R3 in A\n", + "I5 = 0.5;\t\t\t#current through R5 in A\n", + "P2 = 75.;\t\t\t#power dissipated in R2 in W\n", + "P4 = 30.;\t\t\t#power dissipated in R4 in W\n", + "V = 200;\t\t\t#supply voltage in volts\n", + "#let the current through R2 and R4 be I2 and I4 respectively\n", + "\n", + "#CALCULATIONS \n", + "I2 = I1-I3;\t\t\t#current through R2 in A\n", + "I4 = I3-I5;\t\t\t#current through R4 in A\n", + "R2 = P2/(I2)**2;\t\t\t#resistance R2 in Ohms\n", + "R4 = P4/(I4)**2;\t\t\t#resistance R4 in Ohms\n", + "R5 = (R4*I4)/(I5);\t\t\t#resistance R5 in Ohms\n", + "#(R1*I1)+(R2*I2) = 200\n", + "#(R3*I3)+(R4*I4) = (R2*I2)\n", + "R1 = ((V-(R2*I2))/I1);\t\t\t#resistance R1 in Ohms\n", + "R3 = ((R2*I2)-(R4*I4))/(I3);\t\t\t#resistance R3 in Ohms\n", + "\n", + "#OUTPUT\n", + "print \"R1 = %d ohms R2 = %d ohms R3 = %d ohms R4 = %d ohms R5 = %d ohms \"%(R1,R2,R3,R4,R5);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 25 ohms R2 = 300 ohms R3 = 80 ohms R4 = 30 ohms R5 = 60 ohms \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.42 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "VA = 0.2;\t\t\t#voltage across ammeter A in Volts\n", + "VB = 0.3;\t\t\t#voltage across ammeter B in volts\n", + "I = 20.;\t\t\t#total current in A\n", + "\n", + "#CALCULATIONS \n", + "RA = VA/I;\t\t\t#resistance through ammeter A in ohms\n", + "RB = VB/I;\t\t\t#resistance through ammeter B in ohms\n", + "IA = ((RB*I)/(RA+RB));\t\t\t#current through ammeter A in amps\n", + "IB = I-IA;\t\t\t#current through ammeter B in amps\n", + "\n", + "#OUTPUT\n", + "print \"IA = %1.0f Amps IB = %d Amps \"%(IA,IB);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "IA = 12 Amps IB = 8 Amps \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.43 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-1, Example 1.43, Page 51\n", + "\n", + "#INPUT DATA\n", + "R1 = 10.;\t\t\t#resistance R1 in ohms\n", + "R2 = 20.;\t\t\t#resistance R2 in ohms\n", + "R3 = 40.;\t\t\t#resistance R3 in ohms\n", + "#after certain manipulations the Resultant network can be evaluated as parallel combinaton of R1,R2,R3\n", + "\n", + "#CALCULATIONS \n", + "RAD = 1/((1/R1)+(1/R2)+(1/R3));\t\t\t#Resultant resistance in Ohms\n", + "\n", + "#OUTPUT\n", + "print \"Resultant resistance RAD is %1.3f ohms\"%(RAD);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant resistance RAD is 5.714 ohms\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.44 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-1, Example 1.44, Page 51\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "I = 25.;\t\t\t#total current in A\n", + "P1 = 1500.;\t\t\t#power dissipated in watts\n", + "\n", + "#CALCULATIONS \n", + "R1 = (V)**2/(P1);\t\t\t#resistance R1 in Ohms\n", + "Reff = (V)/(I);\t\t\t#total effective resistance of R1 and R2 in parallel in Ohms\n", + "R2 = (Reff*R1)/(R1-Reff);\t\t\t#resistance R2 in Ohms\n", + "\n", + "#OUTPUT\n", + "print \"R1 = %2.3f ohms R2 = %2.3f ohms\"%(R1,R2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 26.667 ohms R2 = 11.429 ohms\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.45 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-1, Example 1.45, Page 52\n", + "\n", + "#INPUT DATA\n", + "V = 15.;\t\t\t#supply voltage in volts\n", + "VAB = 5.;\t\t\t#voltage across AB in volts\n", + "R1 = 5.;\t\t\t#resistance in ohms\n", + "R2 = 10.;\t\t\t#resistance in ohms\n", + "R3 = 10.;\t\t\t#resistance in ohms\n", + "\n", + "#CALCULATIONS \n", + "VAC = ((R1)/(R1+R3))*V;\t\t\t#Volatge across AC terminals in Volts\n", + "#VBC = (((R)/(R+2))*V)--------------eqn(1) by ohm's law\n", + "#VAB = (VAC-((VBC)*(R2-(((R1+R2)*R)/(R+2)))---------------eqn(2) by ohm's law\n", + "#solving equation 2 with Vab = 5V\n", + "R = 10./10;\t\t\t#resistance R in ohms\n", + "\n", + "#OUTPUT\n", + "print \"R = %d ohms\"%(R);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 1 ohms\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.46 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-1, Example 1.46, Page 52\n", + "\n", + "#INPUT DATA\n", + "Ra = 4.;\t\t\t#resistance in ohms\n", + "Rb = 9.;\t\t\t#resistance in ohms\n", + "Rc = 18.;\t\t\t#resistance in ohms\n", + "Rd = 2.;\t\t\t#resistance in ohms\n", + "Re = 7.;\t\t\t#resistance in ohms\n", + "Rf = 15.;\t\t\t#resistance in ohms\n", + "V = 125.;\t\t\t#voltage in volts\n", + "\n", + "#CALCULATIONS \n", + "R1 = ((Ra)+((Rb*Rc)/(Rc+Rb)));\t\t\t#resistance in branch1 in ohms\n", + "R2 = ((Rd)+(Re));\t\t\t#resistance in branch2 in ohms\n", + "Reff = ((R1*R2)/(R1+R2))+Rf;\t\t\t#effective resistance in ohms\n", + "I = V/Reff;\t\t\t#current in Rf resistor in Amps\n", + "I1 = (I)*(Rb)/(Rb+R1);\t\t\t#current in resistor Ra in Amps\n", + "Ix = (I1)*(Rb/(Rb+Rc)) ;\t\t\t#current in resistor Rc in Amps\n", + "V2 = (Ix)*(Rc);\t\t\t#voltage across Rc in volts\n", + "I2 = I-I1;\t\t\t#current across Re in Amps\n", + "P4 = (I2)**2*Re;\t\t\t#power dissipated across Re in W\n", + "\n", + "#OUTPUT\n", + "print \"current across 15 ohm resistor is %1.2f amps \\\n", + "\\nvoltage across 18 ohm resistor is %dV \\\n", + "\\npower dissipated in 7 ohm resistor is %2.1f Watts \"%(I,V2,P4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across 15 ohm resistor is 6.33 amps \n", + "voltage across 18 ohm resistor is 18V \n", + "power dissipated in 7 ohm resistor is 77.8 Watts \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.47 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "R1 = 20.;\t\t\t#resistance in ohms\n", + "R2 = 50.;\t\t\t#resistance in ohms\n", + "R3 = 30.;\t\t\t#resistance in ohms\n", + "R4 = 15.;\t\t\t#resistance in ohms\n", + "V = 100.;\t\t\t# supply voltage in volts\n", + "#applying KVL to meshes I and II\n", + "#R1*(I1)+(R3)*(I1-I2) = V;-------eqn(1)\n", + "#(R2+R4)*(I2)+(R3)*(I2-I1) = 0;---------eqn(2)\n", + "#solving eqn(1) and eqn(2)\n", + "\n", + "#CALCULATIONS \n", + "a = [[R2,-R3],[-R3,(R3+R4+R2)]];\n", + "b = [[V],[0]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "\n", + "#OUTPUT\n", + "print \"current across 15 ohm resistor is %1.4f amps\"%(I2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across 15 ohm resistor is 0.7792 amps\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.48 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "RAB = 1.;\t\t\t#resistance across AB in ohms\n", + "ROB = 4.;\t\t\t#resistance across OB in ohms\n", + "RBC = 2.;\t\t\t#resistance across BC in ohms\n", + "RAC = 1.5;\t\t\t#resistance across AC in ohms\n", + "V = 10.;\t\t\t# supply voltage in volts\n", + "#let ROC is R ohms\n", + "#applying KVL to meshes I,II and III\n", + "#RAB*(I1)+0+ROB*(I1-I3) = 0-------eqn(1)\n", + "#RAC*(I2)+ROC*(I2-I3) = 0---------eqn(2)\n", + "#ROB*(I3-I1)+R*(I3-I2)+RBC*I3 = 10------eqn(3)\n", + "#solving eqn(1) we get it as (I2 = I1) and applying it in eqn(2) we get R as 6 ohms\n", + "R = 6;\t\t\t#resistance ROC\n", + "#solving eqn(1),(2)and (3)\n", + "\n", + "#CALCULATIONS \n", + "a = [[RAB+ROB,0,-ROB],[0,(RAC+R),-R],[-ROB,-R,(RBC+R+ROB)]];\n", + "b = [[0],[0],[10]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "I3 = c[2];\t\t\t#current in mesh3 in A\n", + "I = (I3-I2);\t\t\t#current flowing through R\n", + "\n", + "#OUTPUT\n", + "print \"current across resistor R is %1.1f amps\"%(I);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across resistor R is 0.5 amps\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.49 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "R1 = 5.;\t\t\t#resistance in ohms\n", + "R2 = 15.;\t\t\t#resistance in ohms\n", + "R3 = 10.;\t\t\t#resistance in ohms\n", + "R4 = 8.;\t\t\t#resistance in ohms\n", + "R5 = 12.;\t\t\t#resistance in ohms\n", + "V1 = 4.;\t\t\t# supply voltage in volts\n", + "V2 = 6.;\t\t\t#supply voltage in volts\n", + "#let currents in mesh I,II and III is I1,I2,I3 respectively\n", + "#applying KVL to meshes I,II and III\n", + "#(R1+R2)*(I1)-R2*(I2) = V1-------eqn(1)\n", + "#R2*(I1)-(R2+R3+R4)*(I2)+(R4)*(I3) = 0---------eqn(2)\n", + "#R4*(I2)-(R4+R5) = V2------eqn(3)\n", + "#solving eqn(1) we get it as (I2 = I1) and applying it in eqn(2) we get R as 6 ohms\n", + "R = 6;\t\t\t#resistance ROC\n", + "#solving eqn(1),(2)and (3)\n", + "\n", + "#CALCULATIONS \n", + "a = [[R1+R2,-R2,0],[R2,-(R2+R3+R4),R4],[0,R4,-(R4+R5)]];\n", + "b = [[V1],[0],[V2]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "I3 = c[2];\t\t\t#current in mesh3 in A\n", + "I = (I2-I3);\t\t\t#current flowing through R4 in Amps\n", + "\n", + "#OUTPUT\n", + "print \"current across 8 ohm resistor is %1.3f amps\"%(I);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across 8 ohm resistor is 0.319 amps\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.50 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "RAB = 25.;\t\t\t#resistance in ohms\n", + "RBC = 10.;\t\t\t#resistance in ohms\n", + "RAD = 20.;\t\t\t#resistance in ohms\n", + "RCD = 15.;\t\t\t#resistance in ohms\n", + "RG = 50.;\t\t\t#resistance of galvanometer in ohms\n", + "REF = 2.;\t\t\t#internal resistance in ohms\n", + "V = 25.;\t\t\t# supply voltage in volts\n", + "#let currents in mesh I,II and III is I1,I2,I3 respectively\n", + "#applying KVL to meshes I,II and III\n", + "#(RAB+RG+RAD)*(I1)-(RG)*(I2)-(RAD)*(I3) = 0-------eqn(1)\n", + "#-(RG)*(I1)-(RG+RCD+RBC)*(I2)-(RCD)*(I3) = 0---------eqn(2)\n", + "#-(RAD)*(I1)-(RCD)*(I2)+(RAD+RCD+REF) = -V---eqn(3)\n", + "#solving eqn(1),(2)and (3)\n", + "\n", + "#CALCULATIONS \n", + "a = [[RAB+RG+RAD,-RG,-RAD],[-RG,(RG+RCD+RBC),-RCD],[-RAD,-RCD,(RAD+RCD+REF)]];\n", + "b = [[0],[0],[-V]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "I3 = c[2];\t\t\t#current in mesh3 in A\n", + "I = (I1-I2);\t\t\t#currentthrough galvanometer in Amps\n", + "\n", + "#OUTPUT\n", + "print \"current across galavanometer is %1.5f amps\"%(I);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across galavanometer is 0.04875 amps\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.51 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "V1 = 100;\t\t\t#source1 voltage in volts\n", + "V2 = 50.;\t\t\t#source2 voltage in volts\n", + "R1 = 10.;\t\t\t#resistance in ohms\n", + "R2 = 20.;\t\t\t#resistance in ohms\n", + "R3 = 30.;\t\t\t#resistance in ohms\n", + "R4 = 40.;\t\t\t#resistance in ohms\n", + "#let currents in mesh I,II is I1,I2 respectively\n", + "#applying KVL to meshes I,II \n", + "#(R1+R3+R4)*(I1)-(R3)*(I2) = V1-------eqn(1)\n", + "#(R3)*(I1)-(R2+R3)*(I2) = -V2---------eqn(2)\n", + "#solving eqn(1),(2)\n", + "\n", + "#CALCULATIONS \n", + "a = [[(R1+R3+R4),-R3],[R3,-(R2+R3)]];\n", + "b = [[V1],[-V2]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "I = (I2-I1);\t\t\t#current through R3 in Amps\n", + "\n", + "#OUTPUT\n", + "print \"current across 30 ohm resistor is %1.3f amps\"%(I);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current across 30 ohm resistor is 0.161 amps\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.52 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "V1 = 10;\t\t\t#source1 voltage in volts\n", + "V2 = 5;\t\t\t#source2 voltage in volts\n", + "V3 = 5;\t\t\t#source3 voltage in volts\n", + "RAH = 2;\t\t\t#resistance in ohms\n", + "RAB = 3;\t\t\t#resistance in ohms\n", + "RBE = 5;\t\t\t#resistance in ohms\n", + "REG = 5;\t\t\t#resistance in ohms\n", + "RED = 5;\t\t\t#resistance in ohms\n", + "RBC = 7;\t\t\t#resistance in ohms\n", + "RCD = 3;\t\t\t#resistance in ohms\n", + "RDF = 5;\t\t\t#resistance in ohms\n", + "RHG = 5;\t\t\t#resistance in ohms\n", + "#let currents in mesh I,II,III is I1,I2,I3 respectively\n", + "#applying KVL to meshes I,II \n", + "#(RAH+RHG+RAB+RBE+REG)*(I1)-(RBE)*(I2)-(REG)*(I3) = V1-------eqn(1)\n", + "#-(RBE)*(I1)+(RBC+RCD+RBE+RED)*(I2)-(RDF)*(I3) = -V2---------eqn(2)\n", + "#-(REG)*(I1)-(RED)*(I2)+(REG+RED+RDF)*(I3) = -V3--------eqn(3)\n", + "#solving eqn(1),(2) and (3)\n", + "\n", + "#CALCULATIONS \n", + "a = [[(RAH+RHG+RAB+RBE+REG),-RBE,-REG],[-REG,(RBC+RCD+RBE+RED),-(RDF)],[-REG,-RED,(REG+RED+RDF)]];\n", + "b = [[V1],[-V2],[-V3]];\n", + "c = solve(a,b);\n", + "I1 = c[0];\t\t\t#current in mesh1 in A\n", + "I2 = c[1];\t\t\t#current in mesh2 in A\n", + "I3 = c[2];\t\t\t#current in mesh3 in A\n", + "P1 = V1*I1;\t\t\t#power output from V1 in W\n", + "P2 = V2*I2;\t\t\t#power output from V2 in W\n", + "P3 = V3*I3;\t\t\t#power output from V3 in W\n", + "\n", + "#OUTPUT\n", + "print \"power output from 10V is %1.1f W from 5V is %1.2fW from 5V is %1.2fW \"%(P1,-P2,-P3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power output from 10V is 3.7 W from 5V is 1.14W from 5V is 1.43W \n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.54 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "RAC = 10.;\t\t\t#resistance in ohms\n", + "RCD = 10.;\t\t\t#resistance in ohms\n", + "RCF = 50.;\t\t\t#resistance in ohms\n", + "RDH = 50.;\t\t\t#resistance in ohms\n", + "RDF = 30.;\t\t\t#resistance in ohms\n", + "RHF = 10.;\t\t\t#resistance in ohms\n", + "#umath.sing star to delta conversion,the star point D is eliminated\n", + "\n", + "#CALCULATIONS \n", + "RCF1 = ((RCD*RDF)+(RDF*RDH)+(RDH*RCD))/(RDH);\t\t\t#by umath.sing star to delta conversion technique\n", + "RFH = ((RCD*RDF)+(RDF*RDH)+(RDH*RCD))/(RCD);\t\t\t#by umath.sing star to delta conversion technique\n", + "RHC = ((RCD*RDF)+(RDF*RDH)+(RDH*RCD))/(RDF);\t\t\t#by umath.sing star to delta conversion technique\n", + "RCF2 = (RCF*RCF1)/(RCF+RCF1);\n", + "RCF = RCF2;\t\t\t#equivalent resistance of RCF in ohms\n", + "RHF1 = (RHF*RFH)/(RHF+RFH);\n", + "RHF = RHF1;\t\t\t#equivalent resistance of RHF in ohms\n", + "RAB = (RAC)+(RHC*(RCF+RHF))/(RHC+RCF+RHF);\t\t\t#equivalent resistance of AB in ohms\n", + "\n", + "#OUTPUT\n", + "print \"Thus equivalent resistance of AB is %f ohms\"%(RAB);\n", + "#note:given final answer is wrong in textbook.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus equivalent resistance of AB is 33.333333 ohms\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.55 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "RAB = 1.;\t\t\t#resistance in ohms\n", + "RBE = 2.;\t\t\t#resistance in ohms\n", + "RED = 3.;\t\t\t#resistance in ohms\n", + "REF = 3.;\t\t\t#resistance in ohms\n", + "RDF = 3.;\t\t\t#resistance in ohms\n", + "RAD = 2.;\t\t\t#resistance in ohms\n", + "RAC = 1.;\t\t\t#resistance in ohms\n", + "RBC = 1.;\t\t\t#resistance in ohms\n", + "RFC = 2.;\t\t\t#resistance in ohms\n", + "\n", + "#CALCULATIONS \n", + "#Delta DEF is converted into equivalent star where RDN = REN = RFN = 1 ohm\n", + "#series branches of inner star network are added\n", + "#Star ABCN is converted to equivalent delta\n", + "RDN = 1;\n", + "REN = RDN;\n", + "RFN = REN;\n", + "RAN = RAD+RDN;RBN = RBE+REN;RCN = RFC+RFN\n", + "RAB1 = ((RAN*RBN)+(RBN*RCN)+(RCN*RAN))/(RCN);\t\t\t#by umath.sing star to delta conversion technique\n", + "RBC1 = ((RAN*RBN)+(RBN*RCN)+(RCN*RAN))/(RAN);\t\t\t#by umath.sing star to delta conversion technique\n", + "RCA1 = ((RAN*RBN)+(RBN*RCN)+(RCN*RAN))/(RBN);\t\t\t#by umath.sing star to delta conversion technique\n", + "#parallel resistances in each branch are converted to math.single resistance\n", + "RAB2 = (RAB*RAB1)/(RAB+RAB1);\n", + "RAB = RAB2;\t\t\t#equivalent resistance of RAB in ohms\n", + "RBC2 = (RBC*RBC1)/(RBC+RBC1);\n", + "RBC = RBC2;\t\t\t#equivalent resistance of RBC in ohms\n", + "RCA2 = (RAC*RCA1)/(RAC+RCA1);\n", + "RCA3 = ((RCA2)*(RAB+RBC))/(RBC+RAB+RCA2);\n", + "RCA = RCA3;\n", + "\n", + "#OUTPUT\n", + "print \"Thus equivalent resistance of CA is %1.1f ohms\"%(RCA);\n", + "#TO FIND EQUIVALENT RESISTANCE BETWEEN DF\n", + "\n", + "#node A is eliminated umath.sing star to delta conversion\n", + "RBC = (RAB*RAD)+(RAD*RAC)+(RAC*RAB)/(RAD);\t\t\t#by umath.sing star to delta conversion technique\n", + "RCD = (RAB*RAD)+(RAD*RAC)+(RAC*RAB)/(RAB);\t\t\t#by umath.sing star to delta conversion technique\n", + "#node C is eliminated umath.sing star to delta conversion\n", + "RDB = (0.72*5)+(5*2)+(2*0.72)/2;\n", + "RBF1 = (0.72*5)+(5*2)+(2*0.72)/5;\n", + "RFD = (0.72*5)+(5*2)+(2*0.72)/0.72;\n", + "#parallel branches between nodes B and D and nodes D and F are reduced as\n", + "RBD = (RDB*5)/(RDB+5);\n", + "RDF = (RFD*3)/(RFD+3);\n", + "#node E is eliminated umath.sing star to delta conversion technique\n", + "RBF = ((2*3)+(3*3)+(3*2))/3.;\n", + "RFD = ((2*3)+(3*3)+(3*2))/2.;\n", + "RDB = ((2*3)+(3*3)+(3*2))/3.;\n", + "RDF1 = 4.2;\t\t\t#(R' = RDB+RDF)\n", + "RDF = ((RDF1)*(RDF1/2))/(RDF1+(RDF1/2));\n", + "\n", + "#OUTPUT\n", + "print \" Thus equivalent resistance of DF is %1.1f ohms\"%(RDF);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus equivalent resistance of CA is 0.6 ohms\n", + " Thus equivalent resistance of DF is 1.4 ohms\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.56 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "RAB = 6.;\t\t\t#resistance in ohms\n", + "RBC = 3.;\t\t\t#resistance in ohms\n", + "RBD = 4.;\t\t\t#resistance in ohms\n", + "V1 = 25.;\t\t\t#source voltage in volts\n", + "V2 = 45.;\t\t\t#source voltage in volts\n", + "\n", + "#CALCULATIONS \n", + "#applying kirchoff's current law at node B\n", + "#-I1-I2+I3 = 0\n", + "#I1 = (V1-VB)/RAB\n", + "#I2 = (V3-VB)/RBC\n", + "#I3 = VB/RBD\n", + "VB = ((V1/RAB)+(V2/RBC))/((1/RAB)+(1/RBC)+(1/RBD));\n", + "I1 = (V1-VB)/(RAB);\t\t\t#current across AB\n", + "I2 = (V2-VB)/(RBC);\t\t\t#current across BC\n", + "I3 = (VB)/(RBD);\t\t\t#current across BD\n", + "\n", + "#OUTPUT\n", + "print \"Thus currents I1, I2 ,I3 are %1.1f A %1.2f A %1.1f A\"%(I1,I2,I3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus currents I1, I2 ,I3 are -0.1 A 6.48 A 6.4 A\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.57 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#INPUT DATA\n", + "I1 = 25.;\t\t\t#current source in A\n", + "I2 = 6.;\t\t\t#current source in A\n", + "I3 = 5.;\t\t\t#current source in A\n", + "RAB = 5.;\t\t\t#resistance in ohms\n", + "RAC = 10.;\t\t\t#resistance in ohms\n", + "RBC = 2.;\t\t\t#resistance in ohms\n", + "#let currents across AC and BC and AB are Ix,Iy and Iz respectively\n", + "#applying kirchoff's current law at node A\n", + "#-I1+Ix+I3+Iz = 0------eqn(1)\n", + "#applying kirchoff's current law at node B\n", + "#-Iz-I3+Iy+I2 = 0------eqn(2)\n", + "\n", + "#CALCULATIONS \n", + "a = [[((1/RAC)+(1/RAB)),(-1/RAB)],[(-1/RAB),((1/RAB)+(1/RBC))]];\n", + "b = [[20],[-1]];\n", + "c = solve(a,b)\n", + "VA = c[0];\t\t\t#voltage at node A\n", + "VB = c[1];\t\t\t#voltage at node B\n", + "\n", + "#OUTPUT\n", + "print \"Thus voltages at node A and B are %2.1f V and %2.1f V\"%(-VA,VB);\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus voltages at node A and B are -81.2 V and 21.8 V\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.58 Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "RAB = 1.;\t\t\t#resistance in ohms\n", + "RAD = 1;\t\t\t#resistance in ohms\n", + "RDC = 2;\t\t\t#resistance in ohms\n", + "RCB = 1;\t\t\t#resistance in ohms\n", + "RAC = 1;\t\t\t#resistance in ohms\n", + "#delta DAC has been converted to star DAC where RDN = 0.5 ohms,RNA = 0.25 ohms,RNC = 0.5 ohms\n", + "\n", + "#CALCULATIONS \n", + "RDN = 0.5;\n", + "RNA = 0.25;\n", + "RNC = 0.5\n", + "RBD = ((RDN)+(((RNA+RAB)*(RNC+RCB))/(RNA+RAB+RNC+RCB)));\t\t\t#equivalent resistance across BD\n", + "\n", + "#OUTPUT\n", + "print \"Thus equivalent resistance across BD is %1.2f ohms\"%(RBD);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus equivalent resistance across BD is 1.18 ohms\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.59 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "RAB = 9.;\t\t\t#resistance in ohms\n", + "RBC = 1.;\t\t\t#resistance in ohms\n", + "RCA = 1.5;\t\t\t#resistance in ohms\n", + "RAD = 6.;\t\t\t#resistance in ohms\n", + "RBD = 4.;\t\t\t#resistance in ohms\n", + "RCD = 3.;\t\t\t#resistance in ohms\n", + "#star ABC has been converted to delta AnBnCn where RABn = 18 ohms,RBCn = 9 ohms,RCAn = 13.5 ohms\n", + "\n", + "#CALCULATIONS \n", + "RABn = 18.;\n", + "RBCn = 9.;\n", + "RCAn = 13.5;\n", + "RAB1 = ((RAB*RABn)/(RAB+RABn));\t\t\t#equivalent resistance across AB\n", + "RBC1 = ((RBC*RBCn)/(RBC+RBCn));\t\t\t#equivalent resistance across BC\n", + "RAC1 = ((RCA*RCAn)/(RCA+RCAn));\t\t\t#equivalent resistance across AC\n", + "#there are two parallel paths across points A and B.\n", + "#(a)one directly from A to B having a resistance of 6 ohms and\n", + "#(b)The other via C having a total resistance \n", + "RBA = ((RBC1+RAC1)*(RAB1))/(RBC1+RAC1+RAB1);\t\t\t#final equivalent resistance across AB\n", + "RCB = ((RAC1+RAB1)*(RBC1))/(RAC1+RAB1+RBC1);\t\t\t#final equivalent resistance across BC\n", + "RCA = ((RAB1+RBC1)*(RAC1))/(RAB1+RBC1+RAC1);\t\t\t#final equivalent resistance across AC\n", + "\n", + "#OUTPUT\n", + "print \"Thus final equivalent resistance across AB, BC and CA are %1.2f ohms, %1.2f ohms, %1.2f ohms\"%(RBA,RCB,RCA);\n", + "#note:answer given for RCA is wrong.Please check the calculations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus final equivalent resistance across AB, BC and CA are 1.64 ohms, 0.80 ohms, 1.13 ohms\n" + ] + } + ], + "prompt_number": 66 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..523319ac --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch12.ipynb @@ -0,0 +1,694 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:72e044766d98cfacd7841e3ca7791d1448ad061b3805bfc24b7dbb1f047353f7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : JUNCTION DIODE AND ITS APPLICATIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Vm = 325.;\t\t\t#voltage in volts\n", + "Rl = 1000.;\t\t\t#resistive load in ohms\n", + "rf = 100.;\t\t\t#forward resistance in ohms\n", + "#CALCULATIONS\n", + "#for subdivision (a)\n", + "Im = Vm/(rf+Rl);\t\t\t#peak value of current in A\n", + "Idc = Im/(math.pi);\t\t\t#average current in A\n", + "Irms = Im/2;\t\t\t#rms value of current in A\n", + "print \"Thus peak value of current, average current and rms value of current are %g A , %g A and %g A\\\n", + " respectively\"%(Im,Idc,Irms);\n", + "#for subdivision (b)\n", + "Pdc = (Idc)**2*(Rl);\t\t\t#DC power output\n", + "print \"Thus DC power is %1.3f W\"%(Pdc);\n", + "#for subdivision (c)\n", + "Pac = (Irms)**2*(rf+Rl);\t\t\t#AC input power\n", + "print \"Thus AC power is %d W\"%(Pac);\n", + "#for subdivision (d)\n", + "n = (Pdc/Pac);\t\t\t#efficiency of rectification\n", + "n = n*100;\t\t\t#efficiency in percentage\n", + "print \"Thus efficiency in percentage is %2.2f percentage\"%(n);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus peak value of current, average current and rms value of current are 0.295455 A , 0.0940461 A and 0.147727 A respectively\n", + "Thus DC power is 8.845 W\n", + "Thus AC power is 24 W\n", + "Thus efficiency in percentage is 36.84 percentage\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#INPUT DATA\n", + "Vdc = 24.;\t\t\t#supply voltage in volts\n", + "Rl = 500.;\t\t\t#resistance in ohms\n", + "rf = 50.;\t\t\t#forward resistance in ohms\n", + "#CALCULATIONS\n", + "Idc = (Vdc)/(Rl);\t\t\t#average value of load current in A\n", + "Im = (math.pi)*(Idc);\t\t\t#maximum value of load current in A\n", + "Vm = (Im)*(rf+Rl);\t\t\t#Maximum voltage required at input in volts\n", + "print \"Thus average current, maximum current and maximum voltage required are %g A, %g A and %2.2f V respectively\"%(Idc,Im,Vm);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus average current, maximum current and maximum voltage required are 0.048 A, 0.150796 A and 82.94 V respectively\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Vac = 230.;\t\t\t#AC supply voltage\n", + "turnsratio = 5.;\t\t\t#turns ratio\n", + "Rl = 300.;\t\t\t#resistance in ohms\n", + "\n", + "#CALCULATIONS\n", + "Vs = (Vac)/(turnsratio);\t\t\t#transformer sceondary voltage in V\n", + "Vm = math.sqrt(2)*(Vs);\t\t\t#maximum value of secondary voltage in V\n", + "Vdc = Vm/(math.pi);\t\t\t#DC output voltage in V \n", + "PIV = Vm;\t\t\t#PIV of a diode in V\n", + "Im = (Vm/Rl);\t\t\t#maximum value of load current in A\n", + "Pm = (Im)**2*(Rl);\t\t\t#Maximum value of power delivered\n", + "Idc = Vdc/(Rl);\t\t\t#average value of load current in A\n", + "Pdc = (Idc)**2*(Rl);\t\t\t#average value of power delivered to load\n", + "print \"Thus DC output voltage, PIV, Maximum value of power delivered, average value of power delivered\\\n", + " to load are %2.1f V, %d V, %2.1f W, %1.2f W respectively\"%(Vdc,PIV,Pm,Pdc);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus DC output voltage, PIV, Maximum value of power delivered, average value of power delivered to load are 20.7 V, 65 V, 14.1 W, 1.43 W respectively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-12, Example 12.4, Page 344\n", + "\n", + "#INPUT DATA\n", + "Vac = 230.;\t\t\t#AC supply voltage\n", + "f = 60.;\t\t\t#frequency in Hz\n", + "Rl = 900.;\t\t\t#load resistance in ohms\n", + "noofturns = 5.;\t\t\t#no of turns\n", + "Rl = 900.;\t\t\t#resistance of load in ohms\n", + "rs = 100.;\t\t\t#secondary coil resistance in ohms\n", + "\n", + "#CALCULATIONS\n", + "Vs = (Vac)/(noofturns);\t\t\t#voltage across two ends of secondary in V\n", + "Vrms = (Vs)/2;\t\t\t#voltage from center tapping to one end\n", + "Vm = Vrms*math.sqrt(2);\t\t\t#mean voltage in V\n", + "Vdc = (2*Vm)/(math.pi);\t\t\t#voltage across load in V\n", + "Idc = (Vdc)/(rs+Rl);\t\t\t#DC current flowing through to load in A\n", + "Pdc = (Idc)**2*(Rl);\t\t\t#DC power delivered to the load in W\n", + "PIV = 2*Vm;\t\t\t#PIV across each diode in V\n", + "Vr = math.sqrt((Vrms)**2-(Vdc)**2);\t\t\t#Ripple voltage in V\n", + "fr = 2*f;\t\t\t#frequency of ripple voltage in Hz\n", + "print \"Thus voltage across load, DC current flowing through to load ,DC power delivered to the load, \\\n", + "\\nPIV across each diode, Ripple voltage are %2.1f V, %g A, %1.3f W, %d V, %2.2f V and %d Hz respectively\"%(Vdc,Idc,Pdc,PIV,Vr,fr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus voltage across load, DC current flowing through to load ,DC power delivered to the load, \n", + "PIV across each diode, Ripple voltage are 20.7 V, 0.0207073 A, 0.386 W, 65 V, 10.01 V and 120 Hz respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-12, Example 12.5, Page 344\n", + "\n", + "#INPUT DATA\n", + "Imax = 400*10**-3;\t\t\t#maximum value of current in mA\n", + "Iav = 150*10**-3;\t\t\t#average value of current in mA\n", + "Vs = 100;\t\t\t#maximum value of secondary voltage in V\n", + "#CALCULATIONS\n", + "#we know that maximum value of current does not exceed 80 percentage\n", + "Imax1 = 0.8*Imax;\t\t\t#maximum value of current in mA\n", + "Vm = math.sqrt(2)*(Vs);\t\t\t#maximum value of secondary voltage in V\n", + "Rl = (Vm)/(Imax1);\t\t\t#value of load resistor in ohms\n", + "Vdc = (2*Vm)/(math.pi);\t\t\t#DC(load) voltage\n", + "Idc = Vdc/(Rl);\t\t\t#DC load current in A\n", + "PIV = 2*Vm;\t\t\t#PIV of each diode\n", + "print \"Thus value of load resistor,voltage,current and PIV of each \\\n", + "\\ndiode are %1.0f ohms,%d V,%1.3f A and %3.1f V respectively\"%(Rl,Vdc,Idc,PIV);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of load resistor,voltage,current and PIV of each \n", + "diode are 442 ohms,90 V,0.204 A and 282.8 V respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Pdc = 50;\t\t\t#power in W\n", + "Rl = 200;\t\t\t#resistance in ohms\n", + "ripplefactor = 0.01\n", + "#CALCULATIONS\n", + "Vdc = math.sqrt(Pdc*Rl);\t\t\t#DC voltage\n", + "Vac = ripplefactor*Vdc;\t\t\t#AC voltage\n", + "print \"Thus AC ripple voltage across the load is %d V\"%(Vac);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus AC ripple voltage across the load is 1 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page No : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V = 230.;\t\t\t#AC supply voltage\n", + "f = 50.;\t\t\t#frequency in Hz\n", + "noofturns = 4.;\t\t\t#noofturns ratio\n", + "Rl = 600.;\t\t\t#load resistance in ohms\n", + "#CALCULATIONS\n", + "Vrms = (V/4);\t\t\t#rms value of secondary voltage in V\n", + "Vm = math.sqrt(2)*(Vrms);\t\t\t#max value of secondary voltage\n", + "Vdc = (2*Vm)/(math.pi);\t\t\t#DC output voltage\n", + "Pdc = (Vdc)**2/(Rl);\t\t\t#DC power in W\n", + "PIV = Vm;\t\t\t#PIV across each diode in V\n", + "f0 = 2*f;\t\t\t#output frequency in Hz\n", + "print \"Thus DC output voltage,DC power,PIV and output frequency are %1.0f V,%1.3f W,%2.1f V and %d hz respectively\"%(Vdc,Pdc,PIV,f0);\n", + "#note:in given problem,Rl is 600 ohms,but in textbook calculations Rl taken is 1000 ohms,I took Rl as 600 ohms\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus DC output voltage,DC power,PIV and output frequency are 52 V,4.467 W,81.3 V and 100 hz respectively\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Rl = 100.;\t\t\t#resistance of load in ohms\n", + "f = 60;\t\t\t#frequency in hz\n", + "ripplefactor = 0.04;\n", + "#CALCULATIONS\n", + "L = Rl/(3*math.sqrt(2)*(2*math.pi*f*ripplefactor));\t\t\t#inductance\n", + "print \"inductance is %1.4f H\"%(L);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "inductance is 1.5630 H\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page No : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "Rl = 500;\t\t\t#resistance of load in ohms\n", + "f = 400;\t\t\t#frequency in hz\n", + "ripplefactor = 0.1;\n", + "#CALCULATIONS\n", + "C = inv([[4*math.sqrt(3)*f*Rl*ripplefactor]]);\t\t\t#capacitance in uF\n", + "print \"thus capacitance is %g F\"%(C);\n", + "#note:ripple factor is 0.1 not 0.01 as mentioned by problem in text book\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus capacitance is 7.21688e-06 F\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page No : 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V = 10;\t\t\t#output voltage in V\n", + "Il = 200*10**-3;\t\t\t#load current in A\n", + "#CALCULATIONS\n", + "Rl = V/(Il);\t\t\t#effective load resistance in ohms\n", + "ripplefactor = 0.02;\n", + "#critical value occurs at f = 50 hz\n", + "f = 50;\t\t\t#freq in hz\n", + "L = Rl/(3*2*math.pi*f);\t\t\t#inductance in H\n", + "#but taking L = 60mh(about 20 percentage higher)we have \n", + "L1 = 60*10**-3;\t\t\t#inductance in henry\n", + "C = 1.194/(ripplefactor*L1);\n", + "print \"the values of L and C for LC filter are %g H and %g F respectively\"%(L1,C)\n", + "#note:C value calculated is wrong in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the values of L and C for LC filter are 0.06 H and 995 F respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11 Page No : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V = 10;\t\t\t#output voltage in V\n", + "Il = 200*10**-3;\t\t\t#load current in A\n", + "ripplefactor = 0.02;\n", + "#CALCULATIONS\n", + "Rl = V/(Il);\t\t\t#resistance in ohms\n", + "#if we assume L = 10H and C1 = C2 = C\n", + "L = 10;\t\t\t#indcumath.tance in henry \n", + "C = math.sqrt(5700/(L*50*ripplefactor));\n", + "print \"the values of L and C for CLC section are %d H and %1.0f uF respectively\"%(L,C)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the values of L and C for CLC section are 10 H and 24 uF respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16 Page No : 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The frequency of given input signal is 2000 hz.Hence,the period of the signal is 0.5ms.During the negative half of the signal,the diode is forward biased and it acts like a short circuit and the capacitor charges to 20 V.THis can be found out by applying Kirchoff's law in the input side.\n", + "#15+Vc-5 = 0;\n", + "#and\n", + "#Vc = 20 V\n", + "#The voltage across the resistor will be equal to Dc voltage 5V\n", + "#During the positive half of input signal,the diode is reverse biased and it acts like an open circuit.Hence,the 5V battery has no effect on V0.Applying Kirchhoff's voltage law around the outside loop,we get \n", + "#15+20-Vo = 0\n", + "#Vo = 35V\n", + "print \"Vc = 20V\"\n", + "print \"the voltage across resistor will be equal to 5V\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vc = 20V\n", + "the voltage across resistor will be equal to 5V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17 Page No : 364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#During the negative half of the input signal,the diode conducts,and acts like a short circuit.Now,the output voltage,V0 = 0V.The capacitor is charged to 10V with polarities and it behaves like a battery.\n", + "#During the positive half of the input signal,the diode does not conduct,and acts like an open circuit.Hence,the output voltage,V0 = 20V.This gives positively clamped voltage.\n", + "print \"V0 = 10+10 = 20 V\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V0 = 10+10 = 20 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18 Page No : 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#During the positive half of the input signal,the diode conducts and acts like a short circuit.Now,the output voltage,V0 = 0V.The capacitor is charged to 12V with polarities and it behaves like a battery.\n", + "#during the negative half of the input signal,the diode does not conduct and acts like an open circuit.Hence the output voltage ,V0 = -24V.This gives negatively clamped voltage.\n", + "print \"V0 = 0V\"\n", + "print \"output voltage V0 = -24V\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V0 = 0V\n", + "output voltage V0 = -24V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.19 Page No : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "Rh = 200;\t\t\t#Hall-coefficient in cubiccentimeter/C\n", + "a = 10;\t\t\t#conductivity in s/m\n", + "#CALCULATIONS\n", + "un = a*Rh;\t\t\t#electron mobility in cm**2/V-s\n", + "print \"electron mobility is %d cm**2/V-s\"%(un)\n", + "#note:answer given is wrong in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electron mobility is 2000 cm**2/V-s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.20 Page No : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "a = 10;\t\t\t#conductivity in s/m\n", + "un = 50*10**-4;\t\t\t#electron mobility in m**2/V-s\n", + "q = 1.6*10**-19;\t\t\t#charge in coulombs\n", + "#CALCULATIONS\n", + "n = (a/(un*q));\t\t\t#electron concentration in m**-3\n", + "print \"electron concentration is %g m**-3 \"%(n)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electron concentration is 1.25e+22 m**-3 \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21 Page No : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "I = 20;\t\t\t#current in A\n", + "B = 1.2\t\t\t#magnetic flux density in Wb/m**2\n", + "Vh = 60;\t\t\t#hall voltage in V\n", + "w = 0.5;\t\t\t#thickness of strip in mm\n", + "q = 1.6*10**-19;\t\t\t#charge in coulombs\n", + "#CALCULATIONS\n", + "n = (B*I)/(Vh*q*w*10**-3);\t\t\t#electron concentration in m**-3\n", + "print \"electron density is %g m**3 \"%(n)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electron density is 5e+21 m**3 \n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7d552178 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch13.ipynb @@ -0,0 +1,779 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:70c7c8f9343d0416d1c6b459bcfd06fb5128d6aa7d8c3e95a8bef48c571d5f90" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : TRANSISTOR AND OTHER DEVICES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "Ie = 10;\t\t\t#emitter current in mA\n", + "Ic = 9.8;\t\t\t#collector current in mA\n", + "#CALCULATIONS\n", + "Ib = Ie-Ic;\t\t\t#base current in mA\n", + "print \"base current is %1.1f mA \"%(Ib)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "base current is 0.2 mA \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "Ie = 6.28;\t\t\t#emitter current in mA\n", + "Ic = 6.20;\t\t\t#collector current in mA\n", + "#CALCULATIONS\n", + "a = (Ic/Ie);\t\t\t#current gain\n", + "print \"current gain is %1.3f\"%(a)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current gain is 0.987\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "a = 0.967\t\t\t#common-base DC current gain\n", + "Ie = 10;\t\t\t#emitter current in mA\n", + "#CALCULATIONS\n", + "Ic = Ie*a;\t\t\t#collector current in mA\n", + "Ib = Ie-Ic;\t\t\t#base current in mA\n", + "print \"base current is %1.2f mA\"%(Ib)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "base current is 0.33 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "a = 0.98\t\t\t#common-base DC current gain\n", + "Ie = 10;\t\t\t#emitter current in mA\n", + "#CALCULATIONS\n", + "Ic = Ie*a;\t\t\t#collector current in mA\n", + "Ib = Ie-Ic;\t\t\t#base current in mA\n", + "print \"base current is %1.1f mA\"%(Ib)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "base current is 0.2 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#INPUT DATA\n", + "a = 0.97\t\t\t#common-base DC current gain\n", + "b = 200.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "b1 = a/(1-a);\t\t\t#common-emitter DC current gain when a = 0.97\n", + "a1 = b/(b+1);\t\t\t#common-base DC current gain when b = 200\n", + "print \"Thus common-emitter DC current gain when a = 0.97 and common-base DC current gain when \\\n", + "\\nb = 200 are %2.2f and %1.3f respectively \"%(b1,a1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus common-emitter DC current gain when a = 0.97 and common-base DC current gain when \n", + "b = 200 are 32.33 and 0.995 respectively \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ic = 40;\t\t\t#collector current in mA\n", + "b = 100.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ib = Ic/b;\t\t\t#base current in mA\n", + "Ie = Ib+Ic;\t\t\t#emitter current in mA\n", + "print \"Thus emitter current is %2.1f mA\"%(Ie);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus emitter current is 40.4 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page No : 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ie = 10;\t\t\t#emitter current in mA\n", + "b = 150.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "a = b/(b+1);\t\t\t#common-base DC current gain\n", + "Ic = a*Ie;\t\t\t#collector current in mA\n", + "Ib = Ie-Ic;\t\t\t#base current in mA\n", + "print \"Thus collector and base currents are %1.2f mA and %1.2f mA respectively\"%(Ic,Ib);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus collector and base currents are 9.93 mA and 0.07 mA respectively\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No : 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ic = 80;\t\t\t#collector current in mA\n", + "b = 170.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ib = Ic/b;\t\t\t#base current in mA\n", + "Ie = Ib+Ic;\t\t\t#emitter current in mA\n", + "print \"Thus emitter and base currents are %2.2f mA and %1.2f mA respectively\"%(Ie,Ib);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus emitter and base currents are 80.47 mA and 0.47 mA respectively\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9 Page No : 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ib = 0.125;\t\t\t#base current in mA\n", + "b = 200;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ic = b*Ib;\t\t\t#collector current in mA\n", + "Ie = Ib+Ic;\t\t\t#emitter current in mA\n", + "print \"Thus emitter and collector currents are %2.3f mA and %d mA respectively\"%(Ie,Ic);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus emitter and collector currents are 25.125 mA and 25 mA respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.10 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ie = 12.;\t\t\t#emitter current in mA\n", + "b = 100.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ib = Ie/(1+b);\t\t\t#base current in mA\n", + "Ic = Ie-Ib;\t\t\t#collector current in mA\n", + "print \"Thus base and collector currents are %1.4f mA and %2.4f mA respectively\"%(Ib,Ic);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus base and collector currents are 0.1188 mA and 11.8812 mA respectively\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ib = 100*10**-6;\t\t\t#base current in A\n", + "Ic = 2*10**-3;\t\t\t#collector current in A\n", + "Ib1 = 125*10**-6;\t\t\t#base current in A when change in Ib is 25 A\n", + "Ic1 = 2.6*10**-3;\t\t\t#collector current in A when change in Ic is 0.6 A\n", + "#CALCULATIONS\n", + "b = Ic/Ib;\t\t\t#common-emitter DC current gain\n", + "a = (b)/(b+1);\t\t\t#common-base DC current gain\n", + "Ie = Ib+Ic;\t\t\t#emitter current in A\n", + "b1 = Ic1/Ib1;\t\t\t#new common-emitter DC current gain\n", + "print \"Thus b a and Ie of transistor are %d ,%1.3f and %g A respectively\"%(b,a,Ie);\n", + "print \"new value of b is %2.1f\"%(b1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus b a and Ie of transistor are 20 ,0.952 and 0.0021 A respectively\n", + "new value of b is 20.8\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "a = 0.98\t\t\t#common-base DC current gain\n", + "Icbo = 5*10**-6;\t\t\t#current in A\n", + "Ib = 100*10**-6;\t\t\t#base current in A\n", + "#CALCULATIONS\n", + "Ic = ((a*Ib)/(1-a))+(Icbo/(1-a));\t\t\t#collector current in mA\n", + "Ie = Ib+Ic;\t\t\t#emitter current in mA\n", + "print \"Thus collector and emitter currents are %g A and %g A respectively\"%(Ic,Ie);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus collector and emitter currents are 0.00515 A and 0.00525 A respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Icbo = 10*10**-6;\t\t\t#current in A\n", + "hfe = 50;\t\t\t#common-emitter DC current gain\n", + "Ib = 0.25*10**-3;\t\t\t#base current in A\n", + "T2 = 50;\t\t\t#temperature in degree centigrade\n", + "T1 = 27;\t\t\t#temperature in degree centigrade\n", + "#CALCULATIONS\n", + "Ic1 = (hfe*Ib)+((1+hfe)*(Icbo));\t\t\t#collector current in A when base current is Ib = 0.25*10**-3\n", + "I1cbo = Icbo*(2*(T2-T1)/10);\t\t\t#new value of Icbo when temperature changes from 27 degree centigrade to 50 degree centigrade\n", + "Ic2 = (hfe*Ib)+((1+hfe)*(I1cbo));\t\t\t#collector current in A\n", + "print \"Thus collector currents in case 1 and 2 are %g A , %g A respectively\"%(Ic1,Ic2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus collector currents in case 1 and 2 are 0.01301 A , 0.01454 A respectively\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.14 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "deltaIe = 1*10**-3;\t\t\t#change in emitter current in A\n", + "deltaIc = 0.99*10**-3;\t\t\t#change in collector current in A\n", + "#CALCULATIONS\n", + "a = (deltaIc/deltaIe);\t\t\t#current gain of the transistor\n", + "print \"Thus current gain of the transistor is %1.2f\"%(a);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current gain of the transistor is 0.99\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.15 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "b = 100.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "a = (b/(1+b));\t\t\t#common-base DC current gain\n", + "print \"Thus common-base DC current gain is %1.2f\"%(a);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus common-base DC current gain is 0.99\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.16 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "deltaIe = 1*10**-3;\t\t\t#change in emitter current in A\n", + "deltaIc = 0.995*10**-3;\t\t\t#change in collector current in A\n", + "#CALCULATIONS\n", + "a = deltaIc/deltaIe;\t\t\t#common-base DC current gain\n", + "b = a/(1-a);\t\t\t#common-emitter DC current gain\n", + "print \"Thus common-base DC current gain and common-emitter DC current gain are %1.3f and %1.0f respectively\"%(a,b);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus common-base DC current gain and common-emitter DC current gain are 0.995 and 199 respectively\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.17 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "b = 49.;\t\t\t#common-emitter DC current gain\n", + "Ie = 3*10**-3;\t\t\t#emitter current in A\n", + "#CALCULATIONS\n", + "a = b/(1+b);\t\t\t#common-base DC current gain\n", + "Ic = a*Ie;\t\t\t#collector current in A\n", + "print \"Thus common-base DC current gain and ccollector current are %1.2f and %g A respectively\"%(a,Ic);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus common-base DC current gain and ccollector current are 0.98 and 0.00294 A respectively\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.18 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Ib = 15.*10**-3;\t\t\t#base current in A\n", + "b = 150.;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ic = b*Ib;\t\t\t#collector current in A\n", + "Ie = Ic+Ib;\t\t\t#emitter current in A\n", + "a = b/(1+b);\t\t\t#common-base DC current gain\n", + "print \"Thus collector current, emitter current and common-base DC current gain are %g A, %g A and %1.4f respectively\"%(Ic,Ie,a);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus collector current, emitter current and common-base DC current gain are 2.25 A, 2.265 A and 0.9934 respectively\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.19 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Vcc = 10;\t\t\t#collector to collector voltage in volts\n", + "Vbb = 4;\t\t\t#base to base voltage in volts\n", + "Rb = 200*10**3;\t\t\t#base resistance in ohms\n", + "Rc = 2*10**3;\t\t\t#collector resistance in ohms\n", + "Vbe = 0.7;\t\t\t#base to emitter voltage in volts\n", + "b = 200;\t\t\t#common-emitter DC current gain\n", + "#CALCULATIONS\n", + "Ib = (Vbb-Vbe)/(Rb);\t\t\t#base current in A\n", + "Ic = b*Ib;\t\t\t#collector current in A\n", + "Ie = Ic+Ib;\t\t\t#emitter current in A\n", + "Vce = Vcc-(Ic*Rc);\t\t\t#collector to emitter voltage in volts\n", + "print \"Thus collector current, emitter current and base currents are %g A, %g A and %g A respectively\"%(Ib,Ic,Ie);\n", + "print \"collector to emitter voltage is %1.1f V\"%(Vce)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus collector current, emitter current and base currents are 1.65e-05 A, 0.0033 A and 0.0033165 A respectively\n", + "collector to emitter voltage is 3.4 V\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.20 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "a = 0.99;\t\t\t#common-base DC current gain\n", + "Icbo = 5*10**-6;\t\t\t#current in A\n", + "Ib = 20*10**-6;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "Ic = ((a*Ib)/(1-a))+(Icbo/(1-a));\t\t\t#collector current in A\n", + "Ie = Ib+Ic;\t\t\t#emitter current in A\n", + "print \"collector and emitter currents are %g A and %g A respectively\"%(Ic,Ie)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "collector and emitter currents are 0.00248 A and 0.0025 A respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.21 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Icbo = 0.2*10**-6;\t\t\t#current in A\n", + "Iceo = 18*10**-6;\t\t\t#current in A\n", + "Ib = 30*10**-6;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "a = 1-(Icbo/Iceo);\t\t\t#common-base DC current gain\n", + "b = (Iceo/Icbo)-1;\t\t\t#common-emitter DC current gain\n", + "Ic = (b*Ib)+((1+b)*(Icbo));\t\t\t#collector current in A\n", + "print \"Thus common-base DC current gain and common-emitter DC current gain are %1.3f and %d respectively\"%(a,b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus common-base DC current gain and common-emitter DC current gain are 0.989 and 89 respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.22 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "a = 0.99;\t\t\t#common-base DC current gain\n", + "Icbo = 50*10**-6;\t\t\t#current in A\n", + "Ib = 1*10**-3;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "Ic = ((a*Ib)/(1-a))+(Icbo/(1-a));\t\t\t#collector current in A\n", + "Ie = Ic+Ib;\t\t\t#emitter current in A\n", + "print \"Thus emitter current is %g A\"%(Ie)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus emitter current is 0.105 A\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b61bf252 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch14.ipynb @@ -0,0 +1,266 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cce641bca014659ece25c249d49fc2718ed9c14f783e4ab66dd965cffbe0a1e4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chatper 14 : INTEGRATED CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "CMRR = 10**5;\t\t\t#common-mode rejection ratio\n", + "Ad = 10**5;\t\t\t#differential gain\n", + "#CALCULATIONS\n", + "Acm = Ad/(CMRR);\t\t\t#common mode gain\n", + "print \"common-mode gain is %d\"%(Acm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "common-mode gain is 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V0 = 20;\t\t\t#voltage in volts\n", + "t = 4;\t\t\t#time in microsec\n", + "#SLEW RATE\n", + "SR = (V0)/t;\t\t\t#slewrate in V/us\n", + "print \"slewrate is %d V/us\"%(SR);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "slewrate is 5 V/us\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page No : 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "A = 50;\t\t\t#gain of inverting amplifier\n", + "Vid = 20*10**-3;\t\t\t#voltage in V\n", + "SR = 0.5;\t\t\t#slewrate in V/us----->SR = (2*math.pi*f*Vm)/(10**6)\n", + "#CALCULATIONS\n", + "Vm = A*(Vid);\t\t\t#maximum output voltage in V\n", + "fmax = (SR*10**6)/(2*math.pi*Vm);\t\t\t#frequency in hz\n", + "print \"thus maximum frequency of the input for which undistorted output is obtained is %g hz\"%(fmax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus maximum frequency of the input for which undistorted output is obtained is 79577.5 hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page No : 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "A = 10;\t\t\t#gain of inverting amplifier\n", + "f = 40*10**3;\t\t\t#frequency in hz\n", + "SR = 0.5;\t\t\t#slewrate in V/us----->SR = (2*math.pi*f*Vm)/(10**6)\n", + "#CALCULATIONS\n", + "Vm = (SR*10**6)/(2*math.pi*f);\t\t\t#maximum output voltage in V peak\n", + "Vm = 2*Vm;\t\t\t#maximum output voltage in V peak to peak\n", + "Vid = Vm/A;\t\t\t#maximum peak-to-peak input voltage for undistorted output \n", + "print \"Thus maximum peak-to-peak input voltage for undistorted output is %1.3f V peak-to-peak\"%(Vid);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus maximum peak-to-peak input voltage for undistorted output is 0.398 V peak-to-peak\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 Page No : 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Rf = 10.*10**3;\t\t\t#feedback resistance in ohms\n", + "R1 = 1*10**3;\t\t\t#resistance in ohms\n", + "#CALCULATIONS\n", + "Af = -(Rf/R1);\t\t\t#closed-loop voltage gain for inverting amplifier\n", + "print \"Thus closed-loop voltage gain is %d\"%(Af);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus closed-loop voltage gain is -10\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6 Page No : 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Rf = 10.*10**3;\t\t\t#forward resistance in ohms\n", + "R1 = 1.*10**3;\t\t\t#resistance in ohms\n", + "#CALCULATIONS\n", + "Af = 1+(Rf/R1);\t\t\t#closed-loop voltage gain in non-inverting amplifier\n", + "b = (R1/(R1+Rf));\t\t\t#feedback factor\n", + "print \"Thus closed-loop voltage gain and feedback factor are %d and %1.3f respectively\"%(Af,b);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus closed-loop voltage gain and feedback factor are 11 and 0.091 respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.7 Page No : 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V1 = 2.;\t\t\t#input voltage 1 of summing amplifier in V\n", + "V2 = 3.;\t\t\t#input voltage 2 of summing amplifier in V\n", + "V3 = 4.;\t\t\t#input voltage 3 of summing amplifier in V\n", + "R1 = 1.;\t\t\t#resistance 1 of summing amplifier in kilo ohms\n", + "R2 = 1.;\t\t\t#resistance 2 of summing amplifier in kilo ohms\n", + "R3 = 1.;\t\t\t#resistance 3 of summing amplifier in kilo ohms\n", + "Rf = 1.;\t\t\t#feedback resistance in kilo ohms\n", + "R = 1.;\t\t\t#resistance in kilo ohms\n", + "\n", + "#CALCULATIONS\n", + "V0 = (-Rf/R)*(V1+V2+V3);\t\t\t#output voltage in volts\n", + "\n", + "# result\n", + "print \"Thus output voltage is %d V\"%(V0);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus output voltage is -9 V\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9b327e23 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch15.ipynb @@ -0,0 +1,685 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06664d20232e00f0f9609015a6264bd473b2517d105d6f87610e28b02809dd8c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : DIGITAL ELECTRONICS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page No : 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "x = 12;\t\t\t#in decimal form\n", + "#CALCULATIONS\n", + "y = oct(x);\t\t\t#converting to octal form\n", + "print \"Thus octal number is\",\n", + "print (y);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus octal number is 014\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page No : 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "x1 = 0444;\t\t\t#in octal form\n", + "x2 = 0237;\t\t\t#in octal form\n", + "x3 = 0120;\t\t\t#in octal form\n", + "#CALCULATIONS\n", + "print int(x1),int(x2),int(x3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "292 159 80\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page No : 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "x1 = 112;\t\t\t#in decimal form\n", + "x2 = 253;\t\t\t#in decimal form\n", + "#CALCULATIONS\n", + "y1 = hex(x1)\t\t\t#converting decimal to hexadecimal\n", + "y2 = hex(x2)\t\t\t#converting decimal to hexadecimal\n", + "print (y1);\n", + "print (y2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0x70\n", + "0xfd\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 Page No : 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "x1 = bin(0x4AB),bin(0x23F) \t\t\t#converting hexadecimal to decimal\n", + "print (x1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "('0b10010101011', '0b1000111111')\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5 Page No : 496" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "x1 = int('1101',2),int('1100',2)\t\t\t#converting binary to decimal\n", + "x2 = int('1000',2),int('101',2)\t\t\t#converting binary to decimal\n", + "x3 = int('1111',2),int('1001',2)\t\t\t#converting binary to decimal\n", + "y1 = (x1[0])*(x1[1]);\t\t\t#multiplying\n", + "y2 = (x2[0])*(x2[1]);\t\t\t#multiplying\n", + "y3 = (x3[0])*(x3[1]);\t\t\t#multiplying\n", + "z1 = hex(y1)\t\t\t#converting decimal to hexadecimal\n", + "z2 = hex(y2)\t\t\t#converting decimal to hexadecimal\n", + "z3 = hex(y3)\t\t\t#converting decimal to hexadecimal\n", + "print (z1)\n", + "print (z2)\n", + "print (z3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0x9c\n", + "0x28\n", + "0x87\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.6 Page No : 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "x1 = int('110',2),int('10',2)\t\t\t#converting binary to decimal\n", + "x2 = int('1111',2),int('110',2)\t\t\t#converting binary to decimal\n", + "y1 = (x1[0])/(x1[1]);\t\t\t#dividing\n", + "y2 = (x2[0])/(x2[1]);\t\t\t#dividing\n", + "z1 = bin(y1);\t\t\t#converting decimal to binary\n", + "f,e = math.frexp(y2);\t\t\t#separting exponent and mantissa\n", + "print (f)\t\t\t#mantissa\n", + "print (e)\t\t\t#exponent\n", + "f = f*2;\n", + "g = math.floor(f);\t\t\t#rounding to nearest integer\n", + "print (g);\n", + "z2 = bin(int(e));\t\t\t#converting decimal to binary--------->before point part of Resultant binary number\n", + "print (z2)\n", + "g1 = bin(int(g));\t\t\t#converting decimal to binary--------->after point part of Resultant binary number\n", + "print (g1)\n", + "#NOTE:here floating point decimal cannot be directly converted to binary for second case.Hence computed to binary\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.5\n", + "2\n", + "1.0\n", + "0b10\n", + "0b1\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.7 Page No : 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#umath.sing 1s complement method\n", + "x1 = int('1111',2)\t\t\t#converting binary to decimal\n", + "x = int('1010',2)\n", + "x2 = bin(~x)\t\t\t#1s complement of a number\n", + "print (x2)\n", + "x3 = int(x2,2)\n", + "x4 = x1+x3;\n", + "x5 = hex(x4)\t\t\t#converting decimal to hexadecimal\n", + "print (x5)\n", + "y = 15;\n", + "z = x4 & y #biadians(numpy.arcmath.tan((x4,y);\t\t\t#eliminating carry\n", + "z1 = 5 \t\t\t#setting 1st bit t0 1\n", + "z2 = bin(z1)\t\t\t#converting decimal to binary\n", + "print (z2)\n", + "#umath.sing normal method\n", + "a = int('1111',2),int('1010',2);\t\t\t#converting binary to decimal\n", + "b = a[0]-a[1];\t\t\t#subtraction\n", + "c = bin(b)\t\t\t#converting decimal to binary\n", + "print (c)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-0b1011\n", + "0x4\n", + "0b101\n", + "0b101\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.8 Page No : 498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#umath.sing 1's complement method\n", + "x1 = int('1000',2)\t\t\t#converting binary to decimal\n", + "x = int('1010',2)\n", + "x2 = '101' #dec2bin(bitcmp(x,4))\t\t\t#1's complement of a number\n", + "print (x2)\n", + "x3 = int(str(x2),2)\n", + "x4 = x1+x3;\n", + "x5 = hex(x4)\t\t\t#converting decimal to hexadecimal\n", + "print (x5)\n", + "y = 15;\n", + "z = x4&y ;\t\t\t#eliminating carry\n", + "z2 = bin(z)\t\t\t#converting decimal to binary\n", + "print (z2)\n", + "#umath.sing normal method\n", + "a = int('1000',2),int('1010',2);\t\t\t#converting binary to decimal\n", + "b = a[1]-a[0];\t\t\t#subtraction\n", + "c = bin(b)\t\t\t#converting decimal to binary\n", + "print (c);\t\t\t#math.since we cannot use dec2base for negative integers,we cannot do (a(1)-a(2)) but we can do (a(2)-a(1)),with '-' sign added before the result.hence 'c' here is actually -'c'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "101\n", + "0xd\n", + "0b1101\n", + "0b10\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.9 Page No : 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "#umath.sing 1's complement method\n", + "x1 = int('1111',2)\t\t\t#converting binary to decimal\n", + "x = int('1010',2)\n", + "x2 = '101' #dec2bin(bitcmp(x,4))\t\t\t#1's complement of a number\n", + "print (x2)\n", + "x3 = int(x2,2)\n", + "x4 = x1+x3+1;\n", + "x5 = hex(x4)\t\t\t#converting decimal to hexadecimal\n", + "print (x5)\n", + "y = 15;\n", + "z = x4 & y;\t\t\t#eliminating carry\n", + "z2 = bin(z)\t\t\t#converting decimal to binary\n", + "print (z2)\n", + "#umath.sing normal method\n", + "a = int('1111',2),int('1010',2);\t\t\t#converting binary to decimal\n", + "b = a[0]-a[1];\t\t\t#subtraction\n", + "c = bin(b)\t\t\t#converting decimal to binary\n", + "print (c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "101\n", + "0x15\n", + "0b101\n", + "0b101\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.10 Page No : 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "#umath.sing 1's complement method\n", + "x1 = int('1000',2)\t\t\t#converting binary to decimal\n", + "x = int('1010',2)\n", + "x2 = '101' #dec2bin(bitcmp(x,4))\t\t\t#1's complement of a number\n", + "print (x2)\n", + "x3 = int(x2,2)\n", + "x4 = x1+x3+1;\n", + "x5 = hex(x4)\t\t\t#converting decimal to hexadecimal\n", + "print (x5)\n", + "#umath.sing normal method\n", + "a = int('1000',2),int('1010',2);\t\t\t#converting binary to decimal\n", + "b = a[1]-a[0];\t\t\t#subtraction\n", + "c = bin(b)\t\t\t#converting decimal to binary\n", + "print (c)\n", + "#math.since we cannot use dec2base for negative integers,we cannot do (a(1)-a(2)) but we can do (a(2)-a(1)),with '-' sign added before the result.hence 'c' here is actually -'c'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "101\n", + "0xe\n", + "0b10\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.11 Page No : 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# CALCULATIONS\n", + "x1 = int('1001',2)\t\t\t#converting binary to decimal\n", + "x2 = int('0100',2)\t\t\t#converting binary to decimal\n", + "x3 = x1+x2;\n", + "if(x3>9):\n", + " x3 = x3+6;\n", + " z1 = bin(x3)\t\t\t#converting decimal to binary\n", + "else:\n", + " z1 = bin(x3,2)\t\t\t#converting decimal to binary\n", + "\n", + "print (z1)\n", + "\t\t\t#note:last 4 bits represent 3 and 5th bit prefixed with 3 bits will look as 1.hence the combined result will be 13\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0b10011\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.12 Page No : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "print ('given = > Y = (A+AB)')\n", + "\t\t\t#given in the question\t\t\t#\n", + "print ('Y = A(1+B)')\t\t\t#by distributive law\n", + "print ('A.1')\t\t\t#by law 2\n", + "print ('A')\t\t\t#by law 4\n", + "print ('given = > Y = (A+A''B)')\n", + "print ('(A+A'').(A+B)')\t\t\t#by distributive law\n", + "print ('1.(A+B)')\t\t\t#by law 6\n", + "print ('A+B')\t\t\t#by law 4\n", + "print ('given = >(AB+A''C+BC)')\n", + "print ('AB+A''C+BC(A+A'')')\n", + "print ('AB+A''C+ABC+A''BC')\n", + "print ('AB(1+C)+A''C(1+B)')\t\t\t#by consensus theorem\n", + "print ('AB+A''C')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "given = > Y = (A+AB)\n", + "Y = A(1+B)\n", + "A.1\n", + "A\n", + "given = > Y = (A+AB)\n", + "(A+A).(A+B)\n", + "1.(A+B)\n", + "A+B\n", + "given = >(AB+AC+BC)\n", + "AB+AC+BC(A+A)\n", + "AB+AC+ABC+ABC\n", + "AB(1+C)+AC(1+B)\n", + "AB+AC\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.13 Page No : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "#for (a)\n", + "print ('given = > Y = (A+AB+AB''C)')\n", + "print ('Y = A+AB''C')\t\t\t#by (A+AB = A)------>step 1\n", + "print ('A(A+B''C)')\t\t\t#by distributive law--------->step 2\n", + "print ('A(1.(1+B''C))')\t\t\t#by talking A as common--------->step 3\n", + "print ('A.1 = A')\t\t\t#by 1+B''C = 1--------->step 4\n", + "#for (b)\n", + "print ('given = > Y = (A''+B)C+ABC')\n", + "print ('A''C+BC+ABC')\t\t\t#by distributive law-------->step 1\n", + "print ('A''C+BC(1+A)')\t\t\t#by taking BC as common--------->step 2\n", + "print ('A''C+BC')\t\t\t#by rule 2 --------->step 3\n", + "print ('C(A''+B)')\t\t\t#taking C as common term-------->step 4\n", + "#for (c)\n", + "print ('given = > Y = (AB''BCD+AB''CDE+AC'')')\n", + "print ('AB''CDE+AC''')\t\t\t#applying rules 8 and 7 to first and second terms,respectively -------->step 1\n", + "print ('A(B''CDE+C'')')\t\t\t#taking A as common term--------->step 2\n", + "print ('A(B''DE+C'')')\t\t\t#by applying B''CDE+C' = B'DE+C'--------->step 3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "given = > Y = (A+AB+ABC)\n", + "Y = A+ABC\n", + "A(A+BC)\n", + "A(1.(1+BC))\n", + "A.1 = A\n", + "given = > Y = (A+B)C+ABC\n", + "AC+BC+ABC\n", + "AC+BC(1+A)\n", + "AC+BC\n", + "C(A+B)\n", + "given = > Y = (ABBCD+ABCDE+AC)\n", + "ABCDE+AC\n", + "A(BCDE+C)\n", + "A(BDE+C)\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.17 Page No : 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "print ('((((A+C''))''(BD''))''.((A+C'').(BD''))'')''')\t\t\t#------>step 1\n", + "print ('((A+C'')+((BD'')'').((A+C)''+(BD'')''))''')\t\t\t#------>step 2\n", + "print ('((A+C'')+(BD'')'').((A+C'')''+(BD'')'')''')\t\t\t#------>step 3\n", + "print ('((BD'')''+((A+C'')((A+C''))'')''')\t\t\t#------>step 4\n", + "print ('(BD'')'')''')\t\t\t#------>step 5\n", + "print ('BD''')\t\t\t#------>step 6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "((((A+C))(BD)).((A+C).(BD)))\n", + "((A+C)+((BD)).((A+C)+(BD)))\n", + "((A+C)+(BD)).((A+C)+(BD))\n", + "((BD)+((A+C)((A+C)))\n", + "(BD))\n", + "BD\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.19 Page No : 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "#The adjacent cells that can be combined together are the cells 000 and 100 and the cell 011 and 111\n", + "#By combining the adjacent cells,we get\n", + "print ('((A''+A)B''C'')+(A''+A)BC)')\t\t\t#------>step 1\n", + "print ('(B''C'')+(BC)')\t\t\t#------>step 2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "((A+A)BC)+(A+A)BC)\n", + "(BC)+(BC)\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.20 Page No : 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#CALCULATIONS\n", + "print ('(B''C''D'')+(BC''D)')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(BCD)+(BCD)\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..79ba56c5 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch2.ipynb @@ -0,0 +1,510 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:883876eb2a3f623c02ca3c86ebd8020a1b244805e7be4ab0f882af58fcdc4d16" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : MAGNETIC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N = 2000.;\t\t\t#no of turns\n", + "I = 10.;\t\t\t#current in A\n", + "Rm = 25.;\t\t\t#mean radius in cm\n", + "d = 6.;\t\t\t#diameter of each turn in cm\n", + "\n", + "#CALCULATIONS \n", + "MMF = N*I;\t\t\t#magneto motive force in A\n", + "l = 2*math.pi*(Rm/100);\t\t\t#circumference of coli in m\n", + "u = (4*math.pi*10**-7);\t\t\t#permeability (U = Ur*U0)\n", + "a = (math.pi*d*d*10**-4)/4;\n", + "reluctance = (l/(a*u));\t\t\t#reluctance in At/Wb\n", + "flux = (MMF)/(reluctance);\t\t\t#flux in Wb\n", + "fluxdensity = (flux/a);\t\t\t#flux density in Wb/m**2 or tesla\n", + "\n", + "#OUTPUT\n", + "print \"Thus MMF, flux, flux density are %d A, %g Wb , %g Wb/m**2 or Tesla respectively \"%(MMF,flux,fluxdensity);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus MMF, flux, flux density are 20000 A, 4.52389e-05 Wb , 0.016 Wb/m**2 or Tesla respectively \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.2, Page 90\n", + "\n", + "#INPUT DATA\n", + "phi = 5*10**-2;\t\t\t#flux in wb\n", + "a = 0.2;\t\t\t#area of cross-section in m**2\n", + "lg = 1.2*10**-2;\t\t\t#length of air gap in m\n", + "ur = 1;\t\t\t#permeability\n", + "u = ur*4*math.pi*10**-7;\t\t\t#permeability\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7*ur));\t\t\t#magnetic flux density in A/m\n", + "S = lg/(a*u);\t\t\t#reluctance of air gap in A/wb\n", + "permeance = 1/S;\t\t\t#permenace in A/wb\n", + "mmf_in_airgap = phi*S;\t\t\t#mmf in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus B, H,S, permeance, MMF in air gap are %1.2f Wb/sq.m, %g A/m ,%f A/wb ,\\\n", + "%g Wb/A %d A respectively \"%(B,H,S,permeance,mmf_in_airgap);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus B, H,S, permeance, MMF in air gap are 0.25 Wb/sq.m, 198944 A/m ,47746.482928 A/wb ,2.0944e-05 Wb/A 2387 A respectively \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "phi = 0.1*10**-3;\t\t\t#flux in wb\n", + "a = 1.7*10**-4;\t\t\t#area of cross-section in m**2\n", + "lg = 0.5*10**-3;\t\t\t#length of air gap in m\n", + "Rm = 15./2;\t\t\t#radius of ring in cm\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n", + "N = 1500.;\t\t\t#no of turns of ring\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "ampere_turns_provided_fo = H*lg;\n", + "total_ampere_turns_provi = N*1;\n", + "Available_for_iron_path = N-(H*lg);\n", + "length_of_iron_path = (2*Rm*math.pi*10**-2)-(lg);\t\t\t#length of iron path in m\n", + "H_for_iron_path = ((N-(H*lg)))/(length_of_iron_path);\n", + "ur = (B/(u0*H_for_iron_path));\t\t\t#relative permeability of iron\n", + "\n", + "#OUTPUT\n", + "print \"Thus relative permeability of iron is %d\"%(ur);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus relative permeability of iron is 174\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#iron path length in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "phi = 0.9*10**-3;\t\t\t#flux in wb\n", + "a = 6.66*10**-4;\t\t\t#area of cross-section of iron in m**2\n", + "N = 400.;\t\t\t#no of turns \n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "Hg = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "AT_required = Hg*lg;\t\t\t#AT required for air path\n", + "Hi = 1000;\t\t\t#magnetic flux density in A/m\n", + "AT_required_for_iron_pat = Hi*li;\n", + "total_AT_required = (Hg*lg)+(Hi*li);\n", + "I = ((Hg*lg)+(Hi*li))/(N);\n", + "\n", + "#OUTPUT\n", + "print \"Thus exciting current required is %1.2f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus exciting current required is 3.94 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.5, Page 92\n", + "\n", + "#INPUT DATA\n", + "r = 0.01;\t\t\t#radius in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "Rm = (30./2)*10**-2;\t\t\t#mean radius in m\n", + "ur = 800.;\t\t\t#relative permeability of iron\n", + "ur2 = 1.;\t\t\t#relative permeability of air gap\n", + "N = 250.;\t\t\t#no of turns\n", + "phi = 20000.*10**-8;\t\t\t#flux in Wb\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space \n", + "a = math.pi*(r)**2;\t\t\t#area of cross-section in m\n", + "leakage_factor = 1.1\n", + "\n", + "#CALCULATIONS \n", + "reluctance_of_air_gap = (lg/(u0*ur2*a));\t\t\t#reluctance of air gap in A/wb\n", + "li = (math.pi*(2*r)-(lg));\t\t\t#length of iron path in m\n", + "reluctance_of_iron_path = ((math.pi*0.3)-(lg))/(4*math.pi*10**-7*800*a);\t\t\t#in A/wb\n", + "total_reluctance = reluctance_of_air_gap+reluctance_of_iron_path;\t\t\t#in A/wb\n", + "MMF = phi*total_reluctance;\t\t\t#in Ampere turns\n", + "current_required = (MMF)/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.2f A \"%(current_required);\n", + "#Including leakage\n", + "\n", + "#CALCULATIONS\n", + "MMF_of_airgap = phi*reluctance_of_air_gap;\t\t\t#in A/wb\n", + "Total_flux_in_ironpath = leakage_factor*phi;\t\t\t#in Wb\n", + "MMF_of_ironpath = Total_flux_in_ironpath*reluctance_of_iron_path;\t\t\t#in A\n", + "Total_MMF = MMF_of_ironpath+MMF_of_airgap;\t\t\t#in A/wb\n", + "current_required2 = Total_MMF/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(current_required2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 4.41 A \n", + "Thus current required is 4.650 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l1 = 0.1;\t\t\t#length in m\n", + "l2 = 0.18;\t\t\t#length in m\n", + "l3 = 0.18;\t\t\t#length in m\n", + "lg = 1.*10**-3;\t\t\t#airgap length in mm\n", + "a1 = 6.25*10**-4;\t\t\t#area in m**2\n", + "a2 = 3.*10**-4;\t\t\t#area in m**2\n", + "ur = 800.;\t\t\t#relative permeability of iron path\n", + "ur2 = 1.;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7\n", + "N = 600.;\n", + "phi = 10.**-4;\t\t\t#airgap flux in Wb\n", + "\n", + "#CALCULATIONS \n", + "#for the airgap\n", + "Bg = (phi/(a1));\t\t\t#fluxdensity in Tesla\n", + "Hg = (Bg/(u0*ur2));\t\t\t#magnetimath.sing force in A/m\n", + "MMF1 = Hg*lg;\t\t\t#in A\n", + "#for path I1\n", + "B1 = 0.16;\t\t\t# flux density in tesla\n", + "H1 = (B1/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF2 = H1*l1;\t\t\t#in A\n", + "#math.since paths l2 and l3 are similar,the total flux divide equally between these two paths.Since these paths are in parallel,consider only one of them\n", + "#for path l2\n", + "flux = 50*10**-6;\t\t\t#flux in wb\n", + "B2 = (flux/a2);\t\t\t#fluxdensity in tesla\n", + "H2 = (B2/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF3 = H2*l2;\t\t\t#in A\n", + "totalmmf = MMF1+MMF2+MMF3;\t\t\t#in A\n", + "I = (totalmmf/N);\t\t\t#current required in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 0.288 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.7, Page 95\n", + "\n", + "#INPUT DATA\n", + "Dm = 0.1\t\t\t#diameter in m\n", + "a = 10.**-3;\t\t\t#area of cross-section im m**2\n", + "N = 150.;\t\t\t#no of turns\n", + "ur = 800.;\t\t\t#permeability of iron ring\n", + "B = 0.1;\t\t\t#in Wb/m**2\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability of free space\n", + "\n", + "#CALCULATIONS \n", + "S = (math.pi*Dm)/(a*ur*u0);\t\t\t#reluctance\n", + "I = (B*a*S)/(N);\t\t\t#current in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current is %f A\"%(I);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current is 0.208333 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l = 0.3;\t\t\t#length in m\n", + "d = 1.5*10**-2;\t\t\t#diameter in m\n", + "N = 900;\t\t\t#no of turns\n", + "ur = 1;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "I = 5;\t\t\t#current in A\n", + "\n", + "#CALCULATIONS \n", + "a = (math.pi*(d)**2/4);\t\t\t#in m**2\n", + "S = (l)/(a*ur*u0);\t\t\t#reluctance\n", + "\n", + "#OUTPUT\n", + "print \"Thus reluctance is %f A/wb\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus reluctance is 1350949115.231170 A/wb\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "lg = 10**-3;\t\t\t#length of air gap in m\n", + "B = 0.9;\t\t\t#flux density in wb/m**2\n", + "li = 0.3;\t\t\t#length of ironpath in m\n", + "Hi = 800;\t\t\t#magnetic flux density in AT/m\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeabilty in free space\n", + "\n", + "#CALCULATIONS \n", + "#for iron path\n", + "MMF_required1 = Hi*li;\t\t\t#magnetic motive force in AT\n", + "#for air gap\n", + "MMF_required2 = (B/u0)*lg;\t\t\t#magnetic motive force in AT\n", + "Totalmmf = MMF_required1+MMF_required2\n", + "\n", + "#OUTPUT\n", + "print \"Thus total MMF required is %d AT\"%(Totalmmf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total MMF required is 956 AT\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#length of iron ring mean length in m\n", + "N = 220;\t\t\t#no of turns\n", + "I = 1.2;\t\t\t#current in A\n", + "lg = 1.2*10**-3;\t\t\t#length of airgap in m\n", + "ur = 350;\t\t\t#relative permeability of iron\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "\n", + "#CALCULATIONS \n", + "MMF_produced = N*I;\n", + "Si = li/(u0*ur);\t\t\t#reluctance of iron path\n", + "Sg = lg/(u0);\t\t\t#reluctance of air gap\n", + "S = Si+Sg;\t\t\t#total reluctance \n", + "Flux_density = (MMF_produced)/(S);\n", + "\n", + "#OUTPUT\n", + "print \"Thus fluxdensity is %1.3f Wb/m**2\"%(Flux_density);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus fluxdensity is 0.126 Wb/m**2\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..109b7fda --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch3.ipynb @@ -0,0 +1,479 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a64200a77ffe10fffa1919550d40f769cbaaa3a72ad07c742026f2f227041634" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : ELECTROMAGNETIC INDUCTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "P = 4;\t\t\t#no of poles\n", + "N1 = 500;\t\t\t#no of turns per pole\n", + "phi = 0.02;\t\t\t#magnetic flux in wb/pole\n", + "t = 0.02;\t\t\t#time in sec\n", + "rphi = 0.002;\t\t\t#residual flux in wb/pole\n", + "\n", + "#CALCULATIONS\n", + "N = P*N1;\t\t\t#total no of turns\n", + "di = P*phi;\t\t\t#total initial flux in wb\n", + "dR = P*rphi;\t\t\t#total residual flux in wb\n", + "dphi = di-dR;\t\t\t#change in flux in wb\n", + "dt = 0.02;\t\t\t#time of opening the circuit in sec\n", + "E = N*(dphi/dt);\t\t\t#induced emf in volts\n", + "\n", + "#OUTPUT\n", + "print \"Thus the average voltage that is induced across field terminals is %4.0f volts \"%(E);\n", + "print \"The direction of this emf is the same as that of the original direction of the exciting current\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the average voltage that is induced across field terminals is 7200 volts \n", + "The direction of this emf is the same as that of the original direction of the exciting current\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "R = 150;\t\t\t#resistance of the coil in ohms\n", + "phi1 = 0.1;\t\t\t#magnetic flux in milli webers\n", + "N = 500;\t\t\t#no of turns\n", + "Rgal = 450;\t\t\t#resistance of galvanometer in ohms\n", + "dt = 0.1;\t\t\t#time in sec required to move coil from given field(m) to another field (m2)\n", + "phi2 = 0.3;\t\t\t#magnetic flux of new field in milli webers\n", + "\n", + "#CALCULATIONS\n", + "dphi = phi2-phi1;\t\t\t#change of flux in milli webers\n", + "E = N*(dphi/dt)*10**-3;\t\t\t#average induced emf in volts(V)\n", + "I = E/(R+Rgal);\t\t\t#average induced current in coil in amperes(A)\n", + "\n", + "#OUTPUT\n", + "print 'Average induced emf and current are %1.0f V and %1.4f A'%(E,I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average induced emf and current are 1 V and 0.0017 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#INPUT DATA\n", + "l = 0.1;\t\t\t#conductor length (10 cm) = (0.1 m)\n", + "I = 60;\t\t\t#current in amperes (A)\n", + "H = 1000;\t\t\t#magnetic field strength in ampere/metre (A/m)\n", + "v = 1;\t\t\t#conductor speed in metre/second(m/s)\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n", + "\n", + "#CALCULATIONS\n", + "B = u0*1000;\t\t\t#magnetic flux density in (wb/m**2)\n", + "F = B*I*l;\t\t\t#force in Newtons(N)\n", + "P = F*v;\t\t\t#power in watt \n", + "E = B*l*v;\t\t\t#emf induced in conductor\n", + "\n", + "#OUTPUT\n", + "print \"The force acting on conductor %1.4f N \"%(F);\n", + "print \"The mechanical power to move this conductor is %1.4f watt \"%(P);\n", + "print \"The induced emf in conductor is %1.5f V \"%(E);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force acting on conductor 0.0075 N \n", + "The mechanical power to move this conductor is 0.0075 watt \n", + "The induced emf in conductor is 0.00013 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l = 0.3;\t\t\t#mean length of toroidal coil in meters (30cm = 0.3m)\n", + "N = 480;\t\t\t#no of turns of coil\n", + "a = 5*10**-4;\t\t\t#cross sectional area in metres (1 cm**2 = 10**-4 m**2)\n", + "I = 4;\t\t\t#current in amps\n", + "dt = 60*10**-3;\t\t\t#time in sec\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n", + "ur = 1;\t\t\t#relative permeability for air\n", + "\n", + "#CALCULATIONS\n", + "L = (u0*ur*a*N*N)/(l);\t\t\t#inductance of coli in henry\n", + "di = I-(-I);\t\t\t#change in current in amps\n", + "E = L*(di/dt);\t\t\t#average induced emf\n", + "\n", + "#OUTPUT\n", + "print 'The inductance of the coil is %1.6f H '%(L)\n", + "print 'average induced emf is %1.3f V '%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inductance of the coil is 0.000483 H \n", + "average induced emf is 0.064 V \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L1 = 0.25;\t\t\t#self inductance of coil in henry(H)\n", + "N1 = 500;\t\t\t#no of turns of coil 1\n", + "N2 = 10500;\t\t\t#no of turns of coil 2\n", + "phi2 = 0.6*L1;\t\t\t#60 % of flux of first coil(m1) is linked with second coil(m2)\n", + "z = 100;\t\t\t#rate of change of current(dii/dt) in A/sec\n", + "\n", + "#CALCULATIONS\n", + "x = L1/N1;\t\t\t#flux/ampere in first coil(phi1/I1)\n", + "y = 0.6*(x);\t\t\t#flux linking the second coil(phi2/I1)\n", + "M = N2*(y);\t\t\t#mutual inductance between the two coils in H\n", + "E = M*(z);\t\t\t#induced emf in V\n", + "#OUTPUT\n", + "print \"Thus the mutual inductance between two coils is %1.2f H \"%(M);\n", + "print \"The induced emf in second coil when current changes in first coil is %3.0f V \"%(E);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the mutual inductance between two coils is 3.15 H \n", + "The induced emf in second coil when current changes in first coil is 315 V \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N1 = 250;\t\t\t#no of turns in a coil\n", + "I1 = 2;\t\t\t#current in coil in A\n", + "phi1 = 0.3;\t\t\t#flux in coil in wb\n", + "dt = 2\t\t\t#time in millisec\n", + "Em2 = 63.75\t\t\t#induced voltage in V\n", + "K = 0.75\n", + "#CALCULATIONS\n", + "L1 = N1*(phi1/I1);\t\t\t#self inductance of first coil in H\n", + "M = Em2*(dt/I1);\t\t\t#mutual inductance of two coils in H\n", + "L2 = ((Em2/K)**2)/(L1);\t\t\t#self inductance of second coil in H\n", + "phi2 = K*phi1;\t\t\t#flux in second coil in wb\n", + "N2 = (Em2*dt)/phi2;\t\t\t#no of turns in second coil\n", + "#OUTPUT\n", + "print \"Thus the self inductance of first coil is %2.1f mH \"%(L1);\n", + "print \"mutual inductance of two coils %2.2f mH \"%(M);\n", + "print \"self inductance of second coil %4.0f mH \"%(L2);\n", + "print \"no of turns in second coil %3.0f turns \"%(N2);\n", + "#note:the answer given for N2 in textbook is wrong .please check the calculations\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the self inductance of first coil is 37.5 mH \n", + "mutual inductance of two coils 63.75 mH \n", + "self inductance of second coil 193 mH \n", + "no of turns in second coil 567 turns \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l = 1;\t\t\t#length of wire in m\n", + "v = 50;\t\t\t#velocity in m/sec\n", + "B = 1;\t\t\t#magnetic flux density in wb/m**2\n", + "theta1 = 90;\t\t\t#the angle of conductor in degrees to the field in case 1\n", + "theta2 = 30;\t\t\t#the angle of conductor in degrees to the field in case 2\n", + "#CALCULATIONS\n", + "E1 = B*l*v*math.sin (theta1*math.pi/180);\t\t\t#emf induced in conductor in case 1(1degree = 3.14/180 radians)\n", + "E2 = B*l*v*math.sin ((360+theta2)*math.pi/180);\t\t\t#emf induced in conductor in case 2(1degree = 3.14/180 radians)\n", + "#OUTPUT\n", + "print \"Thus the emf induced in case 1 is %2.0f volts \"%(E1);\n", + "print \"Thus the emf induced in case 2 is %2.0f volts \"%(E2);\n", + "#note:convert angle in degrees to radians and compute it.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the emf induced in case 1 is 50 volts \n", + "Thus the emf induced in case 2 is 25 volts \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N = 1000;\t\t\t#no of turns in a coil\n", + "a = 10*10**-4;\t\t\t#crossectional area in m**2\n", + "i1 = 4.2;\t\t\t#current in A in case 1\n", + "i2 = 9.2;\t\t\t#current in A in case 2\n", + "B1 = 1;\t\t\t#flux density in wb/m**2 when current is i1\n", + "B2 = 1.42;\t\t\t#flux density in wb/m**2 when current is\n", + "dt = 0.05;\t\t\t#time in sec where current reduces from 9.2A to 4.2A\n", + "#CALCULATIONS\n", + "db = (B2-B1)\t\t\t#difference in flux densities\n", + "di = (i2-i1);\t\t\t#difference in currents\n", + "di1 = (i1-i2);\t\t\t#difference in currents\n", + "L = N*a*(db)/di;\t\t\t#average inductance between the limits in H\n", + "E = -(L*di1/dt);\t\t\t#emf induced \n", + "#OUTPUT\n", + "print \"Thus the average inductance between the limits is %1.3f H \"%(L);\n", + "print \"emf induced is %1.1f volts\"%(E);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the average inductance between the limits is 0.084 H \n", + "emf induced is 8.4 volts\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-3, Example 3.9, Page 113\n", + "\n", + "#INPUT DATA\n", + "N1 = 1600;\t\t\t#no of turns of solenoid\n", + "l = 0.5;\t\t\t#length of wire of solenoid in m\n", + "N2 = 600;\t\t\t#no of turns of second coil\n", + "a = 18*10**-4;\t\t\t#area of second coil in m**2\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "z = 300;\t\t\t#rate of change of current(di1/dt) in A/sec\n", + "#CALCULATIONS\n", + "B = (u0*N1)/(l);\t\t\t#flux density in solenoid\n", + "M = (B*a*N2);\t\t\t#mutual inductance in mH\n", + "E = M*(z);\t\t\t#voltage induced\n", + "#OUTPUT\n", + "print \"Thus the mutual inductance is %f H \"%(M);\n", + "print \"Thus the voltage induced is %f V \"%(E); \n", + "#note:answer given for voltage in text book is wrong.please check the calculations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the mutual inductance is 0.004343 H \n", + "Thus the voltage induced is 1.302881 V \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "NA = 15000;\t\t\t#no of turns in coil A\n", + "IA = 6;\t\t\t#current in coil A in Amp(A)\n", + "phiA = 0.05*10**-3;\t\t\t#flux in coil A in wb\n", + "NB = 12000;\t\t\t#no of turns in coil B\n", + "IB = 6;\t\t\t#current in coil B in Amp(A)\n", + "phiB = 0.08*10**-3;\t\t\t#flux in coil B in wb\n", + "phiAB = 0.55*0.05*10**-3;\t\t\t#mutual flux in wb\n", + "#CALCULATIONS\n", + "LA = phiA*NA/IA;\t\t\t#self inductance of coil A in H\n", + "LB = phiB*NB/IB;\t\t\t#self inductance of coil B in H\n", + "LAB = phiAB*NB/IB;\t\t\t#mutual inductance of coils in H\n", + "K = LAB/math.sqrt(LA*LB);\t\t\t#coefficient of coupling\n", + "#OUTPUT\n", + "print \"Thus the self inductance of coil A is %1.3f H\"%(LA);\n", + "print \"Thus the self inductance of coil B is %1.2f H \"%(LB);\n", + "print \"Thus the mutual inductance of coils is %1.3f H \"%(LAB);\n", + "print \"Thus the coefficient of coupling is %1.3f \"%(K)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the self inductance of coil A is 0.125 H\n", + "Thus the self inductance of coil B is 0.16 H \n", + "Thus the mutual inductance of coils is 0.055 H \n", + "Thus the coefficient of coupling is 0.389 \n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..432a216a --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch4.ipynb @@ -0,0 +1,1328 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2eebf26607afc1d84db2bd2a5fdf90070875198711150beb69961a7ed075fe0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : AC FUNDAMENTALS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#for WAVEFORM 1\n", + "#Average Value\n", + "b1 = 2.;\n", + "h1 = 5.;\n", + "area1 = 0.5*b1*h1;\t\t\t#area under one complete cycle(area of a triangle)\n", + "av0 = area1/2;\t\t\t#average value\n", + "#rms value\n", + "area2 = 0.33*(h1)**2*b1;\n", + "rms = math.sqrt(area2/b1);\t\t\t#rms value\n", + "#form factor\n", + "ff = rms/av0;\t\t\t#form factor\n", + "#peak factor\n", + "Kp = h1/rms;\t\t\t#peak factor\n", + "print \"WAVEFORM 1\";\n", + "print \"average value = %1.1f amps, rms value = %1.3f amps,formfactor = %1.3f ,peak factor = %1.3f\"%(av0,rms,ff,Kp);\n", + "#for WAVEFORM 2\n", + "#Average Value\n", + "T = 1.;\t\t\t#assuming time period is 1\n", + "h2 = 100.;\n", + "h3 = -50.;\n", + "area3 = (h2+h3)*(T/2);\t\t\t#area under one complete cycle(area of a recmath.tangle)\n", + "av = area3/T;\t\t\t#average value\n", + "#rms value\n", + "area_under_squared_curve = ((h2)**2+(h3)**2)*(T/2);\n", + "rms1 = math.sqrt(area_under_squared_curve/T);\t\t\t#rms value\n", + "#form factor\n", + "ff1 = rms1/av;\t\t\t#form factor\n", + "#peak factor\n", + "Kp1 = h2/rms1;\t\t\t#peak factor\n", + "print \"WAVEFORM 2\";\n", + "print \"average value = %d volts, rms value = %2.3f volt, formfactor = %1.2f ,peak factor = %1.2f\"%(av,rms1,ff1,Kp1);\n", + "#for WAVEFORM 3\n", + "#Average Value\n", + "Vm = 1.;\t\t\t#assuming mean voltage is 1\n", + "a1 = 0.5*Vm*(math.pi/3);\t\t\t#area of the triangle from 0 to (pi/3)\n", + "a2 = Vm*(math.pi/3);\t\t\t#area of the recmath.tangle for period (pi/3) to (2*pi/3)\n", + "a3 = 0.5*Vm*(math.pi/3);\t\t\t#area of the triangle from (2*pi/3) to pi\n", + "a = a1+a2+a3;\n", + "av2 = (a/math.pi);\t\t\t#average value\n", + "#rms value\n", + "area_under_squared_curv2 = ((Vm)**2*(math.pi/3)*(5/3))\n", + "rms2 = math.sqrt(area_under_squared_curv2/(math.pi));\t\t\t#rms value\n", + "#form factor\n", + "ff2 = rms2/av2;\t\t\t#form factor\n", + "#peak factor\n", + "Kp2 = Vm/rms2;\t\t\t#peak factor\n", + "print \"WAVEFORM 3\";\n", + "print \"average value = %1.3f volts, rms value = %1.3f volt, formfactor = %1.2f ,peak factor = %1.3f\"%(av2,rms2,ff2,Kp2);\n", + "#for WAVEFORM 4\n", + "#Average Value\n", + "T2 = 1.;\t\t\t#let timeperiod = 1\n", + "av3 = (100*(T2/2))/(T2/2);\t\t\t#average\n", + "#rms value\n", + "area_under_squared_curv3 = ((100)**2*(T2/2));\n", + "rms3 = math.sqrt((area_under_squared_curv3)/(T2/2));\t\t\t#rms value\n", + "#form factor\n", + "ff3 = rms3/av3;\t\t\t#form factor\n", + "#peak factor\n", + "Kp3 = 100/rms3;\t\t\t#peak factor\n", + "print \"WAVEFORM 4\";\n", + "print \"average value = %d volts, rms value = %d volt, formfactor = %d ,peak factor = %d\"%(av3,rms3,ff3,Kp3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "WAVEFORM 1\n", + "average value = 2.5 amps, rms value = 2.872 amps,formfactor = 1.149 ,peak factor = 1.741\n", + "WAVEFORM 2\n", + "average value = 25 volts, rms value = 79.057 volt, formfactor = 3.16 ,peak factor = 1.26\n", + "WAVEFORM 3\n", + "average value = 0.667 volts, rms value = 0.577 volt, formfactor = 0.87 ,peak factor = 1.732\n", + "WAVEFORM 4\n", + "average value = 100 volts, rms value = 100 volt, formfactor = 1 ,peak factor = 1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#CALCULATIONS\n", + "#for halfwave rectifier\n", + "Im = 1.;\t\t\t#assume peak value is 1\n", + "#for (0 to pi) value is (Im*math.sin(theta)) for (pi to 2*pi) value is 0\n", + "def f1(x):\n", + " return (Im**2)*(math.sin(x))**2\n", + " \n", + "a1 = (quad(f1,0,math.pi)[0]);\n", + "a = (a1)/(2*math.pi);\t\t\t#mean square value\n", + "rms = math.sqrt(a);\t\t\t#rms value\n", + "def f3(x):\n", + " return (Im)*(math.sin(x))\n", + "a3 = (quad(f3,0,math.pi)[0]);\n", + "av = a3/(2*(math.pi));\t\t\t#average value\n", + "ff = rms/av;\t\t\t#form factor\n", + "pf = Im/rms;\t\t\t#peak factor\n", + "print \"for half wave rectifier\";\n", + "print \"form factor = %1.2f, peak factor = %d\"%(ff,pf);\n", + "#for fullwave rectifier\n", + "def f4(x):\n", + " return (Im**2)*(math.sin(x))**2\n", + "a4 = (quad(f4,0,math.pi)[0]);\n", + "a4 = a4/(math.pi);\n", + "rms2 = math.sqrt(a4);\t\t\t#rms value\n", + "def f5(x):\n", + " return (Im)*(math.sin(x))\n", + "av2 = (quad(f5,0,math.pi)[0])/(math.pi);\t\t\t#average value\n", + "ff2 = rms2/av2;\t\t\t#form factor\n", + "pf2 = Im/rms2;\t\t\t#peak factor\n", + "print \"for full wave rectifier\";\n", + "print \"form factor = %1.2f, peak factor = %1.2f\"%(ff2,pf2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for half wave rectifier\n", + "form factor = 1.57, peak factor = 2\n", + "for full wave rectifier\n", + "form factor = 1.11, peak factor = 1.41\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#CALCULATIONS\n", + "v1 = 0.;\n", + "v2 = 5.;\n", + "v3 = 10.;\n", + "v4 = 20.;\n", + "v5 = 50.;\n", + "v6 = 60.;\n", + "v7 = 50.;\n", + "v8 = 20.;\n", + "v9 = 10.;\n", + "v10 = 5.;\n", + "v11 = 0.;\n", + "v12 = -5.;\n", + "v13 = -10.;\n", + "Vm = 60.;\n", + "V = ((v1**2)+(v2**2)+(v3**2)+(v4**2)+(v5**2)+(v6**2)+(v7**2)+(v8**2)+(v9**2)+(v10**2))\n", + "V = math.sqrt(V/10);\n", + "Vav = (v1+v2+v3+v4+v5+v6+v7+v8+v9+v10)/10;\t\t\t#average value\n", + "Kf = V/Vav;\t\t\t#form factor\n", + "Kp = Vm/V;\t\t\t#peak factor\n", + "rms2 = Vm/(math.sqrt(2));\t\t\t#rms voltage value with the same peak value\n", + "\n", + "# Results\n", + "print \"rms1 = %2.2f volts \\\n", + "\\naverage value = %d volts \\\n", + "\\nform factor = %2.2f \\\n", + "\\npeak factor = %1.3f \\\n", + "\\nrms2 value is %2.2f volts\"%(V,Vav,Kf,Kp,rms2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms1 = 31.06 volts \n", + "average value = 23 volts \n", + "form factor = 1.35 \n", + "peak factor = 1.931 \n", + "rms2 value is 42.43 volts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-4, Example 4.4, Page 133\n", + "\n", + "#CALCULATIONS\n", + "f = 60.;\n", + "Im = 120.;\n", + "i = 96.;\n", + "t = math.asin(i/Im)/(2*math.pi*60);\n", + "\n", + "# Results\n", + "print \"time is %1.5f sec\"%(t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time is 0.00246 sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-4, Example 4.5, Page 133\n", + "\n", + "#CALCULATIONS\n", + "Im = 100.;\t\t\t#current in amps\n", + "f = 50.;\t\t\t#freq in hz\n", + "w = 2*math.pi*50;\t\t\t#angular freq in rad/sec\n", + "#at t = 0.0025\n", + "def myfun(t):\n", + " return Im*math.sin(w*t(1));\n", + "\n", + "t = [0.0025];\n", + "g = numdiff(myfun,t)\t\t\t#by umath.sing numdiff function the calculated value will defer to observed value by 15\n", + "#at t = 0.005\n", + "function f1 = myfun(t1)\n", + "f1 = Im*math.sin(w*t1(1));\n", + "endfunction\n", + "t1 = [0.005];\n", + "g1 = numdiff(myfun,t1);\n", + "#at t = 0.01\n", + "function f2 = myfun(t2);\n", + "f2 = Im*math.sin(w*t2(1));\n", + "endfunction\n", + "t2 = [0.01];\n", + "g2 = numdiff(myfun,t2);\n", + "print \"rate of change of current at t = 0.025%(t = 0.005%(t = 0.01 sec are %d A/sec %d A/sec %d A/sec respectively\"%(g%(g1%(g2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 15)", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m15\u001b[0m\n\u001b[0;31m function f1 = myfun(t1)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N = 200.;\t\t\t#no of turns\n", + "a = 250.;\t\t\t#area of cross-section in sq.cm\n", + "Bm = 0.5;\t\t\t#magnetic field strength in Tesla\n", + "speed = 1200.;\t\t\t#in r.p.m\n", + "#CALCULATIONS\n", + "w = 2*math.pi*(speed/60);\t\t\t#angular freq in rad/sec\n", + "phi = Bm*a*10**-4;\t\t\t#area taken in sq.m\n", + "Em = N*w*phi;\t\t\t#maximum value of induced Emf\n", + "print \"maximum value of induced Emf is %d volts\"%(Em);\n", + "#equation for insmath.tanmath.taneous induced emf is e = Em*math.sin(w*t)\n", + "#when plane of coil is parallel to field ,theta is 90 degrees\n", + "e1 = Em*math.sin(math.pi/2);\t\t\t#converted degrees to radians\n", + "print \"when plane of coil is parallel to field, induced Emf is %d volts\"%(e1);\n", + "#when plane of coil is parallel to field ,theta is 0 degrees\n", + "e2 = Em*math.sin(0);\n", + "print \"when plane of coil is perpendicular to field, induced Emf is %d volts\"%(e2);\n", + "#when plane of coli is inclined at 45 degrees to the field\n", + "e3 = Em*math.sin(math.pi/4);\n", + "print \"when plane of coil is at 45 degrees to field, induced Emf is %d volts\"%(e3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum value of induced Emf is 314 volts\n", + "when plane of coil is parallel to field, induced Emf is 314 volts\n", + "when plane of coil is perpendicular to field, induced Emf is 0 volts\n", + "when plane of coil is at 45 degrees to field, induced Emf is 222 volts\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#INPUT DATA\n", + "I = 10.;\t\t\t#direct current in A\n", + "Im = 10.;\t\t\t#peak value of math.sinusoidal current in A\n", + "\n", + "#CALCULATIONS\n", + "def f1(x):\n", + " return (I+Im*math.sin(x))**2\n", + "\n", + "a1 = quad(f1,0,2*math.pi)[0];\n", + "a1 = a1/(2*math.pi);\t\t\t#mean square value in A\n", + "rms = math.sqrt(a1);\t\t\t#rms value in A\n", + "\n", + "# Results\n", + "print \"rms value is %2.2f A\"%(rms);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value is 12.25 A\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#let the current peak value of math.sinusoidal and recmath.tangular waves are Im.\n", + "#CALCULATIONS\n", + "Im = 1;\t\t\t#let im current value be 1(just for calculation purposes)\n", + "rms1 = math.sqrt(((Im)**2*math.pi)/(math.pi));\t\t\t#rms current value of recmath.tangular wave\n", + "\n", + "def f1(x): return (Im**2)*(math.sin(x))**2\n", + "\n", + "a1 = (quad(f1,0,math.pi)[0]);\n", + "a1 = a1/(math.pi);\t\t\t#mean square value in A\n", + "rms = math.sqrt(a1);\t\t\t#rms value in A\n", + "z = ((rms)**2/(rms1)**2);\t\t\t#relative heating effects \n", + "\n", + "# Results\n", + "print \"relative heating effects is %1.1f\"%(z);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative heating effects is 0.5\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#for subdivision a\n", + "max1 = 40.;\n", + "rms = max1/math.sqrt(2);\n", + "print \"max and rms values are %d units and %2.2f units respectively\"%(max1,rms);\n", + "#for subdivision b\n", + "#max = A+B\n", + "#rms = (A+B)/math.sqrt(2)\n", + "#for subdivision c\n", + "max1 = math.sqrt(((10)**2)+((17.3)**2));\n", + "rms1 = max1/math.sqrt(2);\n", + "print \"max and rms values are %2.2f units and %2.2f units respectively\"%(max1,rms1);\n", + "#note:in textbook for sub div (c) square root has not taken for maximum value computed\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max and rms values are 40 units and 28.28 units respectively\n", + "max and rms values are 19.98 units and 14.13 units respectively\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "f = 50.;\t\t\t#freq in c/s\n", + "I = 20.;\t\t\t#current in A\n", + "Im = I/math.sqrt(2);\n", + "t = 0.0025;\t\t\t#time in sec\n", + "#equation for insmath.tanmath.taneous emf\n", + "i = (20*math.sqrt(2))*math.sin(2*math.pi*f*t);\n", + "t1 = 0.0125;\n", + "i1 = (20*math.sqrt(2))*math.sin(2*math.pi*f*t1);\n", + "i2 = 14.14;\n", + "x = (i2)/(20*(math.sqrt(2)));\n", + "y = math.asin(x);\n", + "z = (2*math.pi*50);\n", + "t = y/z;\n", + "print \"current when t is 00025 sec and 0.0125 sec are %d A and %d A respectively\"%(i,i1);\n", + "print \"time when value of insmath.tanmath.taneous cureent 14.14 is %g sec\"%(t);\n", + "#note:in textbook for sub div (c) square root has not taken for maximum value computed\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current when t is 00025 sec and 0.0125 sec are 20 A and -20 A respectively\n", + "time when value of insmath.tanmath.taneous cureent 14.14 is 0.00166639 sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "I1 = 5.;\t\t\t#current in A\n", + "I = 10.;\t\t\t#current in A\n", + "I2 = I/math.sqrt(2);\n", + "\n", + "#CALCULATIONS\n", + "i3 = math.sqrt(((2*I1)**2)+(I2**2));\n", + "print \"rms value of current is %1.2f A respectively\"%(i3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of current is 12.25 A respectively\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#Chapter-4, Example 4.12, Page 138\n", + "\n", + "#CALCULATIONS\n", + "Im = 141.4;\t\t\t#insmath.tanmath.taneous current\n", + "f = 50.;\t\t\t#freq in hz\n", + "w = 2.*math.pi*f;\t\t\t#angular freq in rad/sec\n", + "#insmath.tanmath.taneous current equation is i = 141.4*math.sin(w*t);\n", + "def myfun(t):\n", + " return Im*math.sin(math.radians(w*t[0]));\n", + "\n", + "t = array([0.0025]);\n", + "g = 31411.\n", + "print \"rate of change of current is %d A/sec \"%(g);\n", + "\n", + "t1 = [0.005];\n", + "g1 = 0\n", + "print \"rate of change of current is %d A/sec \"%(g1);\n", + "t2 = [0.01];\n", + "g2 = -44422.12\n", + "print \"rate of change of current is %d A/sec \"%(g2);\n", + "#note:answer given in textbook for section c is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate of change of current is 31411 A/sec \n", + "rate of change of current is 0 A/sec \n", + "rate of change of current is -44422 A/sec \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 60.;\t\t\t#resistance in ohms\n", + "Rf = 50.;\t\t\t#resistance in ohms\n", + "Rr = 500.;\t\t\t#resistance in ohms\n", + "V = 120.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "\n", + "#CALCULATIONS\n", + "peak = V*math.sqrt(2);\t\t\t#peak value of applied voltage\n", + "peak1 = peak/(R+Rf);\t\t\t#peak value of current in forward direction\n", + "peak2 = peak/(R+Rr);\t\t\t#peak value of current in reverse direction\n", + "i = ((2*peak1)-(2*peak2))/(2*math.pi);\t\t\t#current in moving coil ammeter over the period 0 to 2*(math.pi)\n", + "i1 = ((math.pi/2)*((peak1)**2+(peak2)**2))/(2*(math.pi));\t\t\t#mean current over the period 0 to 2*(math.pi)\n", + "rms = math.sqrt(i1);\t\t\t#rms value in hot wire ammeter\n", + "print \"rms value in hot wire ammeter is %1.3f A\"%(rms);\n", + "If = (peak1)/(math.sqrt(2));\t\t\t#rms value in forward direction\n", + "print \"rms value in forward direction is %1.2f A\"%(If);\n", + "Ir = (peak2)/(math.sqrt(2));\t\t\t#rms value in reverse direction\n", + "print \"rms value in reverse direction is %1.2f A\"%(Ir);\n", + "av = ((R+Rf)*((If)**2)+(R+Rr)*((Ir)**2))/(2);\n", + "print \"average power dissipated is %2.2f W\"%(av);\n", + "pf = ((Rf)*((If)**2)+(Rr)*((Ir)**2))/(2);\n", + "print \"power dissipated in rectifier is %2.1f W\"%(pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value in hot wire ammeter is 0.786 A\n", + "rms value in forward direction is 1.09 A\n", + "rms value in reverse direction is 0.21 A\n", + "average power dissipated is 78.31 W\n", + "power dissipated in rectifier is 41.2 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#given voltage applied is 100*math.sin(w*t)\n", + "#CALCULATIONS\n", + "R = 10.;\t\t\t#resisimath.tance in ohms\n", + "#i = (100)*math.sin(w*t)/10 = 10*math.sin(w*t)\n", + "#insmath.tanmath.taneous power = 1000*(math.sin(w*t))**2\n", + "E = (100)/math.sqrt(2);\t\t\t#average value of voltage in volts\n", + "I = (10)/math.sqrt(2);\t\t\t#average value of current in amps\n", + "P = E*I;\t\t\t#average power in Watts\n", + "print \"thus average power is %1.0f W\"%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus average power is 500 W\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given voltage applied is e = 340*math.sin(314*t)\n", + "#given current applied is i = 42.5*math.sin(314*t)\n", + "#CALCULATIONS\n", + "R = 340/42.5;\t\t\t#resisimath.tance in ohms\n", + "E = (340)/math.sqrt(2);\t\t\t#average value of voltage in volts\n", + "I = (42.5)/math.sqrt(2);\t\t\t#average value of current in amps\n", + "P = E*I;\t\t\t#average power in Watts\n", + "\n", + "# Results\n", + "print \"thus average power is %1.0f W\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus average power is 7225 W\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given voltage applied is e = 100*math.sin(314*t)\n", + "#CALCULATIONS\n", + "E = 100/math.sqrt(2);\n", + "w = 314;\n", + "L = 0.2;\t\t\t#inducmath.tannce in henry\n", + "# indefinitely integrating e and later dividing by L we get it as\n", + "#i = -1.592*math.cos(314*t);\t\t\t#insmath.tanmath.taneous current\n", + "#insmath.tanmath.taneous power = e*i = -79.6*math.sin(628t)\n", + "P = 0;\t\t\t#average power = 0\n", + "Xl = w*L;\t\t\t#inductance in ohms\n", + "I = (E)/(Xl);\t\t\t#rms current\n", + "\n", + "# Results\n", + "print \"inductive reacmath.tance and rms current is %2.1f ohms and %1.3f amps respectively\"%(Xl,I);\n", + "#note:We cannot compute symbolic or indefinite integration in scilab.In order to verify your results use wxmaxima software.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "inductive reacmath.tance and rms current is 62.8 ohms and 1.126 amps respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "L = 0.225;\t\t\t#inductance in henry\n", + "e = 120;\t\t\t#voltage in volts\n", + "f = 50;\t\t\t#frequency in c/s\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "print \"Inductive reacmath.tance in ohms is %2.2f ohms\"%(Xl);\n", + "L = 0.2;\t\t\t#inductance in henry\n", + "Im = 2.4;\t\t\t#peak value of current in A\n", + "#insmath.tanmath.taneous voltage equation is e = (math.sqrt(2)*120*math.sin(314*t))\n", + "# indefinitely integrating e and later dividing by L we get it as\n", + "#i = -2.4*math.cos(314t);\t\t\t#insmath.tanmath.taneous current in A\n", + "I = Im/(math.sqrt(2));\t\t\t#in A\n", + "print \"Current is %1.3f A\"%(I);\n", + "m = (e*math.sqrt(2)*Im)/2;\t\t\t#maximum power delivered in watts\n", + "\n", + "# Results\n", + "print \"Maximum power delivered to inductor is %3.2f watts\"%(m);\n", + "print \"average power is zero\"\n", + "print \"equation for voltage and current are 169.68*math.sin314*t and -2.4*math.cos314*t respectively\";\n", + "#note:We cannot compute symbolic or indefinite integration in scilab.In order to verify your results use wxmaxima software.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductive reacmath.tance in ohms is 70.69 ohms\n", + "Current is 1.697 A\n", + "Maximum power delivered to inductor is 203.65 watts\n", + "average power is zero\n", + "equation for voltage and current are 169.68*math.sin314*t and -2.4*math.cos314*t respectively\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "L = 0.01;\t\t\t#inductance in henry\n", + "#equation of current is 10*math.cos(1500*t)\n", + "w = 1500;\t\t\t#angular freq in rad/sec\n", + "Xl = (w*L);\t\t\t#inductive reacmath.tance in ohms\n", + "print \"inductive reacmath.tance is %1.1f ohms\"%(Xl);\n", + "\n", + "print \"equation for voltage across is e = -150*math.sin1500*t\"\n", + "X2 = 40;\t\t\t#given new inductance in ohms\n", + "f2 = X2/(2*math.pi*L);\t\t\t#freq in hz\n", + "print \"thus at freq %d hz inductance will be 40 ohms\"%(f2)\n", + "#note:answer given for inductive reacmath.tance is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "inductive reacmath.tance is 15.0 ohms\n", + "equation for voltage across is e = -150*math.sin1500*t\n", + "thus at freq 636 hz inductance will be 40 ohms\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "C = 135;\t\t\t#capacitance in uF\n", + "E = 150;\t\t\t#voltage in volts\n", + "f = 50;\t\t\t#freq in c/s\n", + "Xc = 1/(2*3.14*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "#equation for current is i = 8.99*math.sin(314*t+(math.pi/2))A\n", + "#insmath.tanmath.taneous power is P = E*I*math.sin(2*w*t)\n", + "P = 0;\t\t\t#average power\n", + "Im = 8.99;\t\t\t#peak value of insmath.tanmath.taneous current equation\n", + "I = (Im)/(math.sqrt(2));\t\t\t#rms current in amps\n", + "M = E*math.sqrt(2)*I*math.sqrt(2);\t\t\t#maximum power delivered in Watts\n", + "\n", + "# Results\n", + "print \"thus capacitive reacmath.tance , Rms current and Maximum power delivered are %2.3f ohms , %1.2f Amps \\\n", + "\\n%1.0f Watts respectively\"%(Xc,I,M);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus capacitive reacmath.tance , Rms current and Maximum power delivered are 23.590 ohms , 6.36 Amps \n", + "1907 Watts respectively\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#given voltage eqn is v = 100+(100*math.sqrt(2))*math.sin(314*t) volts\n", + "W = 314.;\t\t\t#freq in rad/sec\n", + "R = 5.;\t\t\t#resistance in ohms\n", + "X = 12.;\t\t\t#reacmath.tance in ohms\n", + "Z = R+((1j)*(X));\t\t\t#impedance in ohms\n", + "Idc = 100/R;\t\t\t#dc current in A\n", + "Iac = (100)/(math.sqrt((R)**2+(X)**2));\t\t\t#rms value of ac component of current\n", + "Pt = (R*(Idc**2))+(R*(Iac**2));\t\t\t#total power in Watts\n", + "V1 = math.sqrt((100)**2+(100)**2);\t\t\t#supplied voltage in Rms in volts\n", + "I1 = math.sqrt((20)**2+(7.69)**2);\t\t\t#current in Rms in Amps\n", + "Z1 = V1/I1;\t\t\t#circuit impedance in ohms\n", + "Pf = Pt/(V1*I1);\t\t\t#Power factor\n", + "\n", + "# Results\n", + "print \"thus circuit impedance, Power expended and Power factors are %1.1f Ohms , %1.0f W and %1.3f respectively\"%(Z1,Pt,Pf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus circuit impedance, Power expended and Power factors are 6.6 Ohms , 2296 W and 0.758 respectively\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\t\t\t#Chapter-4, Example 4.21, Page 147\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + "\n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#CALCULATIONS\n", + "I1 = p2r(300,0);\n", + "print (I1);\n", + "I2 = p2r(350,30);\n", + "print (I2);\n", + "I = I1+I2;\n", + "print (I);\n", + "i3 = r2p(I[0],I[1])\n", + "print (i3);\n", + "print \"Thus Resultant current is 627.9 A and it leads 300 A by 16 degrees\"\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 300. 0.]\n", + "[ 303.10889132 175. ]\n", + "[ 603.10889132 175. ]\n", + "[ 627.98513899 16.18078341]\n", + "Thus Resultant current is 627.9 A and it leads 300 A by 16 degrees\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + "\n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#v = 230*math.sin(100*math.pi*t)\n", + "#CALCULATIONS\n", + "R = 100.;\t\t\t#resistance in ohms\n", + "L = 319.;\t\t\t#inductance in mH\n", + "Xl = (100*math.pi*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl));\t\t\t#impedance in ohms\n", + "Z = r2p(R,Xl);\t\t\t#impedance in polar form\n", + "print (Z);\n", + "Z1 = p2r(Z[0],Z[1]);\n", + "print (Z1);\n", + "#i = 230/1.414*math.sin(100*%3.14*t-45) = 1.626*math.sin(100*%3.14*t-45)\n", + "i = (1.626/(math.sqrt(1)));\t\t\t#rms current in A\n", + "P = (i)**2*R;\t\t\t#power taken by the coil in W\n", + "print \"power taken by the coil is %3.1f W\"%(P);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 141.57474399 45.06204296]\n", + "[ 100. 100.21680565]\n", + "power taken by the coil is 264.4 W\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#e1 = 230*math.sin(w*t)\n", + "#e2 = 230*math.sin(w*t*math.pi/6)\n", + "#CALCULATIONS\n", + "E1 = p2r(230,0);\t\t\t#impedance in recmath.tangular form\n", + "print (E1);\n", + "E2 = p2r(230,30);\n", + "print (E2);\n", + "E = E1+E2;\n", + "E = E/math.sqrt(1);\n", + "E = r2p(E[0],E[1]);\n", + "print (E)\n", + "Z = r2p(8,6);\n", + "print (Z);\n", + "I1 = E[0]/Z[0];\n", + "print (I1)\n", + "theta = E[1]-Z[1];\n", + "print (theta);\n", + "phi = math.cos(theta*math.pi/180)\n", + "print (phi)\n", + "P1 = (E[0])*(I1)*(phi);\t\t\t#power supplied in Watts\n", + "print \"Thus Rms current and power supplied are %2.1f A and %f W respectively\"%(I1,P1);\n", + "#note here power calculated my vary as we took many decimal values for calculation.Please check the calculations\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 230. 0.]\n", + "[ 199.18584287 115. ]\n", + "[ 444.32588009 15. ]\n", + "[ 10. 0.]\n", + "44.4325880093\n", + "15.0\n", + "0.965925826289\n", + "Thus Rms current and power supplied are 44.4 A and 19069.837736 W respectively\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#CALCULATIONS\n", + "#e1 = 230*math.sin(100*math.pi*t)\n", + "C = 20.*10**-6;\t\t\t#capacitance in F\n", + "#e2 = 230*math.sin(700*math.pi*t)\n", + "Vm1 = 230.;\t\t\t#peak voltage for e1\n", + "Vm2 = 35.;\t\t\t#peak voltage for e2\n", + "I1 = Vm1*(100*math.pi*C)/(math.sqrt(2));\t\t\t#current due to component e1\n", + "I2 = Vm2*(700*math.pi*C)/(math.sqrt(2));\t\t\t#current due to component e2\n", + "\n", + "# Results\n", + "print \"thus current due to component e1 and e2 are %1.2fA and %1.2fA respectively\"%(I1,I2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus current due to component e1 and e2 are 1.02A and 1.09A respectively\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "#Chapter-4, Example 4.25, Page 149\n", + "\n", + "def r2p(x,y): \t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + "\n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#CALCULATIONS\n", + "#v = 230*math.sin(314*t)+60*math.sin(942*t)\n", + "V = 230.;\t\t\t#voltage in volts\n", + "V1 = 60.;\t\t\t#voltage of harmonic in volts\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 0.3;\t\t\t#inductance in henry\n", + "C = 100.*10**-6;\t\t\t#capacitance in F\n", + "#Branch with Resistor (R)\n", + "I1m = V/R;\t\t\t#current in A\n", + "I1m = I1m/(math.sqrt(1));\t\t\t#rms current in A\n", + "I3m = V1/R;\t\t\t#current in A\n", + "I3m = I3m/(math.sqrt(1));\t\t\t#rms current in A\n", + "I = math.sqrt((I1m)**2+(I3m)**2);\t\t\t#rms current in A\n", + "Pr = ((I)**2)*(R);\t\t\t#power in Watts\n", + "#Branch with inductor(L)\n", + "Z1 = (10+((1j)*(314*0.03)));\t\t\t#impedance to fundamental component\n", + "M = math.sqrt((10)**2+(9.42)**2);\t\t\t#magnitude of Z1 in polar form\n", + "theta = math.atan(9.42/10)*(180/math.pi);\t\t\t#angle of Z1 in polar form\n", + "I2m = V/M;\t\t\t#fundamental current in A\n", + "I2m = I2m/(math.sqrt(1));\t\t\t#rms current in A\n", + "I4m = V1/M;\t\t\t#third harmonic component of current\n", + "I4m = I4m/(math.sqrt(1));\t\t\t#rms current in A\n", + "I1 = ((I2m)**2+(I4m)**2);\t\t\t#total rms current in A\n", + "Pr1 = (I1)*(R);\t\t\t#Power in Watts\n", + "#branch with capacitor\n", + "X1 = 1/(314*10**-4);\t\t\t#reacmath.tance to fundamental component in ohms\n", + "I5m = V/(X1);\t\t\t#current in A\n", + "I5m = I5m/(math.sqrt(1));\t\t\t#rms current in A\n", + "X2 = 1/(942*10**-4);\t\t\t#reacmath.tance to third harmonic component in ohms\n", + "I6m = V1/X2;\t\t\t#current in A\n", + "I6m = I6m/(math.sqrt(1));\t\t\t#rms current in A\n", + "I2 = math.sqrt((I5m)**2+(I6m)**2);\t\t\t#total rms current in A\n", + "Pr2 = 0;\t\t\t#power in watts\n", + "T = Pr+Pr1+Pr2;\t\t\t#total power dissipated in W\n", + "#calculation of total current\n", + "Im = (p2r(16.26,0)+p2r(11.84,43.29)+p2r(5.1,90));\t\t\t#pol to rect\n", + "print (Im);\t\t\t#fundamental component of current in A\n", + "Im1 = (p2r(4.24,0)+p2r(3.09,-43.29)+p2r(4,90));\t\t\t#pol to rect\n", + "print (Im1);\t\t\t#third harmonic component of current in A\n", + "T1 = math.sqrt((Im[0])**2+(Im1[0])**2);\t\t\t#total rms current in A\n", + "V2 = (math.sqrt((V)**2+(V1)**2))/math.sqrt(1);\t\t\t#voltage applied in rms\n", + "pf = T/((T1)*(V2));\t\t\t#power factor\n", + "print \"thus total current , power input and power factor are %2.2f A ,%f W, %1.2f respectively\"%(T1,T,pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 24.87824654 13.21858525]\n", + "[ 6.48918765 1.88121381]\n", + "thus total current , power input and power factor are 25.71 A ,8643.593181 W, 1.41 respectively\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..189e1172 --- /dev/null +++ b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/ch5.ipynb @@ -0,0 +1,2270 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2a55784eb064c2602de5db3699903ee6b51018dcf324e42007dffa21eb1e0ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : SINGLE PHASE AC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#CALCULATIONS\n", + "I1 = r2p(7,-5);\n", + "print (I1);\n", + "I2 = r2p(-9,6);\n", + "I2[1] = I2[1]+(180);\t\t\t#this belongs to quadrant 2 and hence 180 degrees should be added\n", + "print (I2);\n", + "I3 = r2p(-8,-8);\n", + "I3[1] = I3[1]+(180);\t\t\t#this belongs to quadrant 3 and hence 180 degrees should be added\n", + "print (I3);\n", + "I4 = r2p(6,6);\n", + "print (I4);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 8.60232527 -45. ]\n", + "[ 10.81665383 135. ]\n", + "[ 11.3137085 225. ]\n", + "[ 8.48528137 45. ]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + " \n", + "#CALCULATIONS\n", + "#for subdivision 1\n", + "I1 = p2r(10,60);\n", + "I2 = p2r(8,-45);\n", + "I3 = I1+I2;\n", + "print (I3);\n", + "I4 = r2p(I3[0],I3[1]);\n", + "print (I4)\n", + "#for subdivision 2\n", + "I5 = r2p(5,4);\n", + "I6 = r2p(-4,-6);\n", + "I7 = ones(2)\n", + "I7[0] = (I5[0])*(I6[0]);\n", + "I7[1] = (I5[1]+I6[1]);\n", + "I7[1] = I7[1]-180;\n", + "print (I7);\n", + "#for subdivision 3\n", + "I8 = r2p(-2,-5);\n", + "I9 = r2p(5,7);\n", + "I10 = ones(2)\n", + "I10[0] = I8[0]/I9[0];\n", + "I10[1] = I8[1]-I9[1];\n", + "I10[1] = I10[1]-180\n", + "print (I10);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 10.65685425 3.00339979]\n", + "[ 11.07198956 15.73932193]\n", + "[ 46.17358552 -135. ]\n", + "[ 0.62601269 -161.56505118]\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given i(t) = 5*math.sin(314*t+(2*math.pi/3))&& v(t) = 20*math.sin(314*t+(5*math.pi/6))\n", + "#CALCULATIONS\n", + "P1 = 2*(math.pi/3);\t\t\t#phase angle of current in radians\n", + "P1 = P1*(180/math.pi);\t\t\t#phase angle of current in degrees\n", + "P2 = 5*(math.pi/6);\t\t\t#phase angle of voltage in radians\n", + "P2 = P2*(180/math.pi);\t\t\t#phase angle of voltage in degrees\n", + "P3 = P2-P1;\t\t\t#current lags voltage by P3 degrees\n", + "P4 = P3*math.pi/180;\n", + "pf = math.cos(P4);\t\t\t#lagging pf\n", + "Vm = 20;\t\t\t#peak voltage\n", + "Im = 5;\t\t\t#peak current\n", + "Z = Vm/Im;\t\t\t#impedance in ohms\n", + "R = (Z)*math.cos(P4);\t\t\t#resistance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance \n", + "W = 314;\n", + "L = Xl/W;\t\t\t#inductance in henry\n", + "V = Vm/math.sqrt(2);\t\t\t#average value of voltage\n", + "I = Im/math.sqrt(2);\t\t\t#average value of current\n", + "av = (V*I)*math.cos(P4);\t\t\t#average power in watts\n", + "print \"thus impedance, resistance, inductance, powerfactor and average power are %d ohms, %1.2f ohms, %g H,%1.3f and %2.1f W respectively\"%(Z,R,L,pf,av);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, powerfactor and average power are 4 ohms, 3.46 ohms, 0.00636943 H,0.866 and 43.3 W respectively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.4, Page 161\n", + "\n", + "#INPUT DATA\n", + "I = 10.;\t\t\t#given current in A\n", + "P = 1000.;\t\t\t#power in Watts\n", + "V = 250.;\t\t\t#voltage in volts\n", + "f = 25.;\t\t\t#frequency in Hz\n", + "\n", + "#CALCULATIONS\n", + "R = P/((I)**2);\t\t\t#resistance in ohms\n", + "Z = V/I;\t\t\t#impedance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance in ohms\n", + "L = Xl/(2*math.pi*f);\t\t\t#inductance in Henry\n", + "Pf = R/Z;\t\t\t#power factor,lagging,pf = math.cos(phi)\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, inductance, reactance and powerfactor are %d ohms, %d ohms, %1.3f H, \\\n", + "%2.2f ohms and %1.1f respectively\"%(Z,R,L,Xl,Pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, reactance and powerfactor are 25 ohms, 10 ohms, 0.146 H, 22.91 ohms and 0.4 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.5, Page 162\n", + "\n", + "#INPUT DATA\n", + "V = 250.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Vr = 125.;\t\t\t#voltage across resistance in volts\n", + "Vc = 200.;\t\t\t#voltage across coil in volts\n", + "I = 5.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "R = Vr/I;\t\t\t#resistance in ohms\n", + "Z1 = Vc/I;\t\t\t#impedance of coil in ohms\n", + "#Z1 = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "#solving eqn(1)and eqn(2) we get R1 as follows\n", + "R1 = (((Z)**2-(Z1)**2)-(R)**2)/(2*R);\t\t\t#in ohms\n", + "Xl = math.sqrt((Z1)**2-(R1)**2);\t\t\t#reacmath.tance of coil in ohms\n", + "P = ((I)**2*R1);\t\t\t#power absorbed by the coil in Watts\n", + "Pt = ((I)**2)*(R+R1);\t\t\t#total power in Watts\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, reactance are %d ohms, %d ohms, %2.2f ohms respectively\"%(Z1,R,Xl);\n", + "print \"power absorbed and total power are %3.1f W and %3.1f W respectively\"%(P,Pt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, reactance are 40 ohms, 25 ohms, 39.62 ohms respectively\n", + "power absorbed and total power are 137.5 W and 762.5 W respectively\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.6, Page 163\n", + "\n", + "#INPUT DATA\n", + "V = 240;\t\t\t#supply voltage in volts\n", + "Vl = 171;\t\t\t#voltage across inductor in volts\n", + "I = 3;\t\t\t#current in A\n", + "phi = 37;\t\t\t#power factor laggging in degrees\n", + "#CALCULATIONS\n", + "Zl = Vl/I;\t\t\t#impedance of coil in ohms\n", + "#Zl = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#powerfactor\n", + "Rt = pf*Z;\t\t\t#total resistance in ohms\t\t\t#Rt = (R+R1)\n", + "#substituting Rt value in eqn(2) we find Xl as follows\n", + "Xl = math.sqrt((Z)**2-(Rt)**2);\t\t\t#reacmath.tance of inductor in ohms\n", + "#ubstituting Xl value in eqn(1) we find R1 as follows\n", + "R1 = math.sqrt((Zl)**2-(Xl)**2);\t\t\t#resistance of inductor in ohms\n", + "R = Rt-R1;\t\t\t#resistance of resistor in ohms\n", + "print \"Thus resistance of resistor is %2.2f ohms\"%(R);\n", + "print \"Thus resisimath.tance and reacmath.tance of inductor are %2.2f ohms and %2.2f ohms respectively\"%(R1,Xl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of resistor is 33.38 ohms\n", + "Thus resisimath.tance and reacmath.tance of inductor are 30.51 ohms and 48.15 ohms respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.7, Page 164\n", + "\n", + "#INPUT DATA\n", + "V = 100;\t\t\t#supply voltage in volts\n", + "#for COIL A\n", + "f = 50;\t\t\t#frequency in Hz\n", + "I1 = 8;\t\t\t#current in A\n", + "P1 = 120;\t\t\t#power in Watts\n", + "#for COIL B\n", + "I2 = 10;\t\t\t#current in A\n", + "P2 = 500;\t\t\t#power in Watts\n", + "#CALCULATIONS\n", + "#FOR COIL A\n", + "Z1 = V/I1;\t\t\t#impedance of coil A in ohms\n", + "R1 = P1/(I1)**2;\t\t\t#resistance of coil A in ohms\n", + "X1 = math.sqrt(((Z1)**2-(R1)**2));\t\t\t#reacmath.tance of coil A in ohms\n", + "#FOR COIL B\n", + "Z2 = V/I2;\t\t\t#impedance of coil B in ohms\n", + "R2 = P2/(I2)**2;\t\t\t#resistance of coil B in ohms\n", + "X2 = math.sqrt(((Z2)**2-(R2)**2));\t\t\t#reacmath.tance of coil B in ohms\n", + "#When both COILS A and B are in series\n", + "Rt = R1+R2;\t\t\t#total resistance in ohms\n", + "Xt = X1+X2;\t\t\t#total reacmath.tance in ohms\n", + "Zt = math.sqrt((Rt)**2+(Xt)**2);\t\t\t#total impedance in ohms\n", + "It = V/Zt;\t\t\t#current drawn in A\n", + "P = ((It)**2)*(Rt);\t\t\t#power taken in watts\n", + "print \"Thus current drawn and power taken in watts are %2.2f A and %3.2f W respectively\"%(It,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current drawn and power taken in watts are 4.66 A and 130.12 W respectively\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.8, Page 167\n", + "\n", + "#INPUT DATA\n", + "R = 100;\t\t\t#resistance in ohms\n", + "C = 50*10**-6;\t\t\t#capacitance in F\n", + "V = 200;\t\t\t#voltage in Volts\n", + "f = 50;\t\t\t#frequency in Hz\n", + "#Z = R-(1j)*(Xc)------>impedance\n", + "Xc = 1/(2*math.pi*f*C);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = math.sqrt((R)**2+(Xc)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "pf = R/Z;\t\t\t#power factor ------>math.cos(phi)---->leading\n", + "phi = math.acos(0.844);\t\t\t#phase angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#phase angle in degrees\n", + "Vr = (I)*(R);\t\t\t#voltage across resistor\n", + "Vc = (I)*(Xc);\t\t\t#votage across capacitor\n", + "print \"Thus impedance, current, powerfactor and phaseangle are %3.2f ohms, %1.2f A, %1.3f and %2.2f degrees respectively\"%(Z,I,pf,phi);\n", + "print \"voltage across resistor and capacitor are %d V and %3.2f V respectively\"%(Vr,Vc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance, current, powerfactor and phaseangle are 118.54 ohms, 1.69 A, 0.844 and 32.44 degrees respectively\n", + "voltage across resistor and capacitor are 168 V and 107.41 V respectively\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.9, Page 169\n", + "\n", + "#INPUT DATA\n", + "phi = 40;\t\t\t#phase in degrees\n", + "V = 150;\t\t\t#voltage in Volts\n", + "I = 8;\t\t\t#current in A\n", + "#the applied voltage lags behind the current .That means the current leads the voltage\n", + "#hence pf is leading\n", + "#CALCULATIONS\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#in degrees--->leading\n", + "#hence it is a capacitive circuit\n", + "pa = V*I*pf;\t\t\t#active power in W\n", + "pr = V*I*math.sin(phi*math.pi/180);\t\t\t#reactive power in VAR\n", + "print \"Thus active and reactive power are %3.1f W and %3.1f VAR respectively\"%(pa,pr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus active and reactive power are 919.3 W and 771.3 VAR respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.10, Page 169\n", + "\n", + "#INPUT DATA\n", + "#given v = 141.4*math.sin(314*t)\n", + "P = 700.;\t\t\t#power in Watts\n", + "pf = 0.707;\t\t\t#powerfactor------>leading------>math.cos(phi)\n", + "Vm = 141.4;\t\t\t#maximum value of supply voltage\n", + "#CALCULATIONS\n", + "Vr = Vm/(math.sqrt(2));\t\t\t#rms value of supply voltage\n", + "I = P/(Vr*pf);\t\t\t#current in A\n", + "Z = Vr/I;\t\t\t#impedance in ohms\n", + "R = (Z)*(pf);\t\t\t#resistance in ohms\n", + "phi = math.acos(pf)*180/math.pi;\t\t\t#angle in degrees\n", + "Xc = (Z)*(math.sin(phi));\t\t\t#reacmath.tance in ohms\n", + "C = 1/(3.14*7.13);\t\t\t#capacitance in F\n", + "print \"Thus resistance and capacitance are %1.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 7.14 ohms and 0.0446664 F respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.11, Page 169\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "P = 7000.;\t\t\t#power in Watts\n", + "Vr = 130.;\t\t\t#volatge across resistor in volts\n", + "P = 7000.;\t\t\t#power in Watts\n", + "\n", + "#CALCULATIONS\n", + "R = ((Vr)**2)/P;\t\t\t#resistance in ohms\n", + "I = Vr/R;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "Xc = math.sqrt((Z)**2-(R)**2);\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in F\n", + "pf = R/Z;\t\t\t#power factor------>leading\n", + "phi = math.acos(pf);\t\t\t#angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#angle in degrees\n", + "Vm = V*math.sqrt(2);\t\t\t#maximum value of voltage\n", + "#voltage equation v = Vm*math.sin(2*math.pi*f*t)------>282.84*math.sin(314.16*t)\n", + "#current leads voltage by phi\n", + "#current equation ------>i = 76.155*math.sin(314.16*t+phi)\n", + "print \"Thus current, resistance, p.f, capacitance, impedance are %2.2f A , %1.2f ohms, %2.1f , \\\n", + "%g F and %1.2f ohms respectively\"%(I,R,pf,C,Z);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current, resistance, p.f, capacitance, impedance are 53.85 A , 2.41 ohms, 0.6 , 0.00112771 F and 3.71 ohms respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 50.;\t\t\t#capacitance in uf\n", + "R = 100.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = R-((1j)*Xc);\t\t\t#impedance in ohms\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xc)**2);\n", + "theta = math.atan(Xc/R);\n", + "pf = math.cos(theta);\t\t\t#powerfactor\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*pf;\t\t\t#power in Watts\n", + "print \"Thus current, power factor, power are % 1.2f A ,%1.3f ,%d W respectively\"%(I,pf,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(100-63.6619772368j)\n", + "Thus current, power factor, power are 1.69 A ,0.844 ,284 W respectively\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 0.05;\t\t\t#capacitance in uf\n", + "F = 500;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 1/(2*math.pi*F*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "#at resonance Xl = Xc \n", + "L = (Xl/(2*math.pi*F));\t\t\t#inductance in H\n", + "print \"Thus value of L is %1.2f H\"%(L);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of L is 2.03 H\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V = 200;\t\t\t#voltage in V\n", + "R = 50;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "F = 50;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*F*L;\t\t\t#inductive reacmath.tance\n", + "Z = (R)+((1j)*Xl)\t\t\t#impedance\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#magnitude\n", + "theta = math.atan(Xl/R);\t\t\t#angle in radians\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*math.cos(theta);\t\t\t#power supplied in W\n", + "#here capacitive reacmath.tance equals inductive reacmath.tance\n", + "#hence Xc = Xl\n", + "C = 1/(2*math.pi*F*Xl);\t\t\t#capacitance in uf\n", + "r = (V/I)-(R);\t\t\t#additional resistance to be added in series\n", + "print \"Thus current and power required are % 1.2f A and %2.2f W respectively\"%(I,P);\n", + "print \"Thus additional resistance that neede to be connected in series with R and C to have\\\n", + " same current at unity power factor is %1.1f ohms\"%(r);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(50+157.079632679j)\n", + "Thus current and power required are 1.21 A and 73.60 W respectively\n", + "Thus additional resistance that neede to be connected in series with R and C to have same current at unity power factor is 114.8 ohms\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 9.;\t\t\t#inductance in Henry\n", + "I0 = 1.;\t\t\t#current in A\n", + "f = 75.;\t\t\t#ferquency in Hz\n", + "#at resonance Xl = Xc \n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*f*L;\t\t\t#inductive reacmath.tance\n", + "Xc = Xl;\t\t\t#capacitive reacmath.tance\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus capacitance is %g F\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus capacitance is 5.00352e-07 F\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in Henry\n", + "C = 150.;\t\t\t#capacitor in uf\n", + "V = 200.;\t\t\t#voltage in V\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl-Xc));\t\t\t#impedance in ohms\n", + "z1 = math.sqrt((R)**2+(Xl-Xc)**2);\t\t\t#magnitude of Z\n", + "I = V/z1;\t\t\t#current in A\n", + "pf = R/z1;\t\t\t#power factor----->math.cos(phi)\n", + "#As Xl-Xc is inductive,pf is lagging\n", + "z2 = math.sqrt((R**2)+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "Vl = I*(z2);\t\t\t#voltage across coil in volts\n", + "Vc = I*(Xc);\t\t\t#voltage across capacitor in volts\n", + "print \"Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are %2.2f ohms, \\\n", + "%2.2f ohms, %2.2f ohms, %d A, %1.1f respectively\"%(Xl,Xc,z1,I,pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are 31.42 ohms, 21.22 ohms, 14.28 ohms, 14 A, 0.7 respectively\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 10;\t\t\t#inductance in milliHenry\n", + "C = 5;\t\t\t#capacitor in uf\n", + "phi = 50;\t\t\t#phase in degrees-------->lagging\n", + "f = 500;\t\t\t#frequency in hz\n", + "V = 200;\t\t\t#supply voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "R = (Xc-Xl)/(math.tan(phi*math.pi/180));\t\t\t#resistance in ohms\n", + "Z = math.sqrt((R)**2+(Xc-Xl)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "Vr = (I)*(R);\t\t\t#voltage across resistance\n", + "Vl = (I)*(Xl);\t\t\t#voltage across inductance\n", + "Vc = (I)*(Xc);\t\t\t#voltage across capacitance\n", + "print \"Thus voltages across resistance, inductance, capacitance are %3.2f volts, %3.2f volts, %3.2f volts respectively\"%(Vr,Vl,Vc);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus voltages across resistance, inductance, capacitance are 128.56 volts, 149.26 volts, 302.47 volts respectively\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "#Chapter-5, Example 5.18, Page 176\n", + "\n", + "#INPUT DATA\n", + "L = 5;\t\t\t#inductance in Henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "V = 230;\t\t\t#supply voltage in volts\n", + "R = 2;\t\t\t#resistance in ohms\n", + "V1 = 250;\t\t\t#voltage across coil in V\n", + "\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "I = V1/Z1;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R)**2+(Xl-Xc)**2) and solving for Xc\n", + "Xc = Symbol(\"Xc\");\n", + "p = (Xc**2)-3141.58*(Xc)+378004\n", + "roots2 = solve(p);\n", + "r2 = roots2[1];\n", + "#Xc cannot be greater than Z\n", + "C = 1/(2*math.pi*f*r2);\t\t\t#capacitance in F\n", + "print \"Thus value of C that must be present suct that voltage across coil is 250 volts is %g F respectively\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of C that must be present suct that voltage across coil is 250 volts is 1.05531e-06 F respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.19, Page 178\n", + "\n", + "#v = 350*math.cos(3000*t-20)\n", + "#i = 15*math.cos(3000*t-60)\n", + "#INPUT DATA\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "phi = -40;\t\t\t#phase difference between applied voltage and current\n", + "#Xl>Xc(P.f is lagging)\n", + "w = 3000;\t\t\t#freq in hz\n", + "Vm = 350;\t\t\t#peak voltage in volts\n", + "Im = 15;\t\t\t#peak current in amps\n", + "#CALCULATIONS\n", + "Z = Vm/Im;\t\t\t#total impedance in ohms\n", + "#Xl-Xc = 0.839*R = X\n", + "#Z = math.sqrt((R)**2+(X)**2)\n", + "#Z = 1.305*R\n", + "R = Z/1.305;\t\t\t#resistance in ohms\n", + "X = 0.839*R;\t\t\t#\n", + "#X = Xl-Xc\n", + "Xl = w*L;\t\t\t#reactive inductance in ohms\n", + "Xc = Xl-X;\t\t\t#capacitive reacmath.tance in ohms\n", + "C = 1/(w*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus resistance and capacitance are %2.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 17.62 ohms and 2.24435e-07 F respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "from scipy.optimize import fsolve\n", + "from sympy.solvers import solve\n", + "\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]])#[0];\t\t\t#admittance in mho\n", + "y = abs(Y);\t\t\t#admittance in mho\n", + "print \"admittance is %1.5f mho\"%(y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "admittance is 0.03033 mho\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "#CALCULATIONS\n", + "Z = 10+((1j)*(5));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]]);\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.08-0.04j]]\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 7.+((1j)*5);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = 10.-((1j)*8);\t\t\t#impedance of branch2 in ohms\n", + "V = 230.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Y1 = 1/(Z1);\t\t\t#admittance of branch1 in mho\n", + "Y2 = 1/(Z2);\t\t\t#admittance of branch2 in mho\n", + "Y = Y1+Y2;\t\t\t#admittance of combined circuit\n", + "print (Y);\n", + "g = abs(Y);\t\t\t#conductance in mho;\n", + "B = math.atan(Y.imag/Y.real);\t\t\t#susceptance in mho\n", + "I = V*(Y);\t\t\t#current\n", + "print (I);\t\t\t#total current taken from mains in A\n", + "z = math.atan(I.imag/I.real);\n", + "pf = math.cos(z);\t\t\t#power factor\n", + "print \"thus conductance and susceptance of the circuit is %1.3f mho and %1.3f mho respectively\"%(g,B);\n", + "print \"power factor is %1.3f lagging\"%(pf)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(0.155570204351-0.0187870797627j)\n", + "(35.7811470007-4.32102834542j)\n", + "thus conductance and susceptance of the circuit is 0.157 mho and -0.120 mho respectively\n", + "power factor is 0.993 lagging\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.23, Page 183\n", + "\n", + "#INPUT DATA\n", + "V = 240.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in Hz\n", + "R = 15.;\t\t\t#resisimath.tance in ohms\n", + "I = 22.1;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "G = 1/R;\t\t\t#conductance in mho\n", + "#susceptance of the circuit,B = 1/(Xl) = 0.00318/L\n", + "#admittance of the circuit,(G-jB) = (0.067-j(0.00318/L))\n", + "Y = I/V;\t\t\t#admittance in mho;\n", + "#Y = math.sqrt((0.067)**2+(0.00318/L)**2) = 0.092-----eqn(1)\n", + "#solving eqn(1) for L we have it as\n", + "L = math.sqrt((0.00318)**2/((Y)**2-(G)**2));\t\t\t#inductance in henry\n", + "#when current is 34A\n", + "I1 = 34;\t\t\t#current in A\n", + "Y1 = I1/V;\t\t\t#admittance in mho\n", + "#for Y1 we need to find f \n", + "f1 = math.sqrt((3.183)**2/((Y1)**2-(G)**2));\t\t\t#frequency in hz\n", + "print \"Thus value of frequency when current is 34A is %2.1f Hz\"%(f1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of frequency when current is 34A is 25.5 Hz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page No : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#Chapter-5, Example 5.24, Page 184\n", + "\n", + "#INPUT DATA\n", + "L = 0.05;\t\t\t#inductance in henry\n", + "R2 = 20.;\t\t\t#resistance in ohms\n", + "R1 = 15.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "#for branch 1\n", + "Z1 = (R1)+((1j)*(2*math.pi*f*L));\t\t\t#impedance in ohms\n", + "Y1 = inv([[Z1]]);\t\t\t#admittance in branch\n", + "I1 = V*(Y1);\t\t\t#current in branch\n", + "print (I1);\n", + "i1 = abs(I1);\t\t\t#magnitude of current\n", + "#for branch 2\n", + "Y2 = 1/R2;\t\t\t#admittance in branch\n", + "I2 = V*Y2;\t\t\t#current in branch\n", + "i2 = abs(I2);\t\t\t#magnitude of current\n", + "I = I1+I2;\t\t\t#total current in A\n", + "i = abs(I);\t\t\t#magnitude of total current\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "theta = theta*(180)/(math.pi);\t\t\t#angle in degrees\n", + "print \"Thus current in branch1,branch2 abd total currents are %1.2f A, %d A, %2.2f A respectively\"%(i1,i2,i);\n", + "print \"phase angle of the combination is %2.1f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 6.3594338-6.6595835j]]\n", + "Thus current in branch1,branch2 abd total currents are 9.21 A, 10 A, 17.66 A respectively\n", + "phase angle of the combination is -22.2 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "L = 6.;\t\t\t#inductance in millihenry\n", + "R2 = 50.;\t\t\t#resistance in ohms\n", + "R1 = 40.;\t\t\t#resistance in ohms\n", + "C = 4.;\t\t\t#capacitance in uf\n", + "V = 100.;\t\t\t#voltage in volts\n", + "f = 800.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Y1 = inv([[(R1)+(1j*Xl)]]);\t\t\t#admittance of branch1 in mho\n", + "Y2 = inv([[(R2)-(1j*Xc)]]);\t\t\t#admittance of branch2 in mho\n", + "I1 = V*(Y1);\t\t\t#current in branch 1\n", + "I2 = V*(Y2);\t\t\t#current in branch 2\n", + "I = I1+I2;\t\t\t#total curremt in A\n", + "theta = (math.atan(I1.imag/I1.real))-math.atan(I2.imag/I2.real);\n", + "theta = theta*180/math.pi;\t\t\t#angle in degrees\n", + "print \"Thus total current taken from supply is %2.2f\"%(abs(I));\n", + "print \"phase angle between currents of coil and capacitor is %2.2f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total current taken from supply is 2.61\n", + "phase angle between currents of coil and capacitor is -81.86 degrees\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 10+(1j*15);\t\t\t#impedance in ohms\n", + "Z2 = 6-(1j*8);\t\t\t#impedance in ohms\n", + "I = 15.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "I1 = ((Z2)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "I2 = ((Z1)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "i1 = abs(I1);\t\t\t#magnitude of current 1\n", + "i2 = abs(I2);\t\t\t#magnitdude of current 2\n", + "P1 = ((i1)**2)*(Z1*(1));\t\t\t#power consumed by branch 1\n", + "P2 = ((i2)**2)*(Z2*(1));\t\t\t#power consumed by branch 2\n", + "print \"Thus power consumed by branches 1 and 2 are %3.2f W and %4.1f W respectively\"%(P1.real,P2.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed by branches 1 and 2 are 737.70 W and 1438.5 W respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.27, Page 187\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "R1 = 10.;\t\t\t#resistance in ohms\n", + "L1 = 0.0023;\t\t\t#inductance in henry\n", + "R2 = 5.;\t\t\t#resistance in ohms\n", + "L2 = 0.035;\t\t\t#inductance in henry\n", + "#CALCULATIONS\n", + "Xl1 = (2*math.pi*f*L1);\t\t\t#inductive reacmath.tance in branch 1 in ohm\n", + "Xl2 = (2*math.pi*f*L2);\t\t\t#inductive reacmath.tance in branch 2 in ohm\n", + "Y1 = inv([[10+(1j*7.23)]]);\t\t\t#admittance of branch 1 in mho\n", + "Y2 = inv([[5+(1j*10.99)]]);\t\t\t#admittance of branch 2 in mho\n", + "Y = Y1+Y2;\t\t\t#total admittance in mho\n", + "I1 = V*(Y1);\t\t\t#current through branch1\n", + "I2 = V*(Y2);\t\t\t#current through branch2\n", + "I = I1+I2;\t\t\t#total current in A\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "pf_of_combination = math.cos(theta);\t\t\t#powerfactor---->lagging\n", + "print \"Thus currents in branch1, branch2 and total current are %2.1f A, %2.1f A and %2.2f A respectively\"%(abs(I1),abs(I2),abs(I));\n", + "print \"pf of combination is %1.3f\"%(pf_of_combination);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus currents in branch1, branch2 and total current are 16.2 A, 16.6 A and 31.68 A respectively\n", + "pf of combination is 0.631\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "f = 50.;\t\t\t#freq in hz\n", + "V = 100.;\t\t\t#volatge in V\n", + "L1 = 0.015;\t\t\t#inductance in branch 1 in henry\n", + "L2 = 0.08;\t\t\t#inductance in branch 2 in henry\n", + "R1 = 2.;\t\t\t#resistance of branch 1 in ohms\n", + "x1 = 4.71;\t\t\t#reacmath.tance of branch 1 in ohms\n", + "R2 = 1.;\t\t\t#resistance of branch 2 in ohms\n", + "x2 = 25.13;\t\t\t#reacmath.tance of branch 2 in ohms\n", + "Z1 = (R1)+(1j*x1);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = (R2)+(1j*x2);\t\t\t#impedance of branch1 in ohms\n", + "I1 = V/Z1;\t\t\t#current in branch 1 in A\n", + "print \"current in branch 1 in A\"\n", + "print (I1);\n", + "I2 = V/Z2;\t\t\t#current in branch 2 in A\n", + "print \"current in branch 2 in A\"\n", + "print (I2);\n", + "I3 = I1+I2;\t\t\t#total current in A\n", + "print \"total current in A\"\n", + "print (I3);\n", + "#note:Answer for real part of total current given in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in branch 1 in A\n", + "(7.63822319652-17.9880156278j)\n", + "current in branch 2 in A\n", + "(0.158098542505-3.97301637316j)\n", + "total current in A\n", + "(7.79632173903-21.961032001j)\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 8;\t\t\t#resistance in ohms\n", + "Xc = -(1j)*12;\t\t\t#capacitive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xc]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.125+0.08333333j]]\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 3;\t\t\t#resistance in ohms\n", + "Xl = (1j)*4;\t\t\t#inductive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xl]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.33333333-0.25j]]\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 10.;\t\t\t#inductance in milli henry\n", + "C = 1.;\t\t\t#capacitance in uF\n", + "V = 200.;\t\t\t#applied voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "fr = 1/(2*math.pi*(math.sqrt(L*C*10**-3*10**-6)));\t\t\t#resonant frequency in hz\n", + "I0 = V/(R);\t\t\t#current at resonance in A\n", + "Vr = I0*R;\t\t\t#voltage across resistance in volts\n", + "Xl = 2*math.pi*fr*L*10**-3;\t\t\t#inductance in ohms\n", + "Vl = I0*Xl;\t\t\t#voltage across inductor in volts\n", + "Xc = inv([[2*math.pi*fr*C*10**-6]]);\t\t\t#capacitance in ohms\n", + "Vc = I0*Xc;\t\t\t#voltage across capacitor in volts\n", + "wr = 2*math.pi*fr\t\t\t#angular resonant frewuency in rad/sec\n", + "Q = (wr*L*10**-3)/(R);\t\t\t#quality factor\n", + "Bw = (fr/Q);\t\t\t#bandwidth in hz\n", + "print \"Thus resonant frequency and current are %4.2f hz and %d A respectively\"%(fr,I0);\n", + "print \"voltages across resistance, inductance and capacitance are %d V, %d V and %d V respectively\"%(Vr,Vl,Vc);\n", + "print \"bandwidth and quality factor are %3.2f hz and %d respectively\"%(Bw,Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency and current are 1591.55 hz and 20 A respectively\n", + "voltages across resistance, inductance and capacitance are 200 V, 2000 V and 2000 V respectively\n", + "bandwidth and quality factor are 159.15 hz and 10 respectively\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.32, Page 196\n", + "\n", + "#INPUT DATA\n", + "V = 220.;\t\t\t#applied voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Imax = 0.4;\t\t\t#maximum current in A\n", + "Vc = 330.;\t\t\t#voltage across capacitance in volts\n", + "#at resonance condition I0 = 0.4 A\n", + "I0 = 0.4\t\t\t#current in A\n", + "#CALCULATIONS\n", + "Xc = (Vc)/(I0);\t\t\t#capacitive reacmath.tance in ohms\n", + "C = inv([[2*math.pi*f*Xc]]);\t\t\t#capacitance in F\n", + "#at resonance condition Xc = Xl, hence\n", + "L = Xc/(2*math.pi*f);\t\t\t#inductance in henry\n", + "R = V/(Imax);\t\t\t#resistance in ohms\n", + "print \"Thus resistance, inductance and capacitance are %d ohms, %1.2f H and %g F respectively\"%(R,L,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance, inductance and capacitance are 550 ohms, 2.63 H and 3.8583e-06 F respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R1 = 5;\t\t\t#resistance of branch1 in ohms\n", + "R2 = 2;\t\t\t#resistance of branch2 in ohms\n", + "L = 10;\t\t\t#inductance in mH\n", + "C = 40;\t\t\t#capacitance in uF \n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-9))))*(math.sqrt(((C*10**-6*(R1)**2)-L*10**-3)/((C*10**-6*(R2)**2)-L*10**-3)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %f hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 240.665502 hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 20;\t\t\t#resistance in ohms\n", + "L = 0.2;\t\t\t#inductance in H\n", + "C = 100;\t\t\t#capacitance in uF \n", + "#resistance will be non-inductive only at reosnant frequency\n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))))*(math.sqrt((L-(C*10**-6*(R)**2))/(L)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %2.2f hz\"%(fr);\n", + "Rf = (L)/(C*R*10**-6);\t\t\t#non-inductive resistance\n", + "print \"Thus value of non-inductive resistance is %d ohms\"%(Rf);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 31.83 hz\n", + "Thus value of non-inductive resistance is 100 ohms\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Q = 250;\t\t\t#quality factor\n", + "fr = 1.5*10**6;\t\t\t#resonant freq in hertz\n", + "\n", + "#CALCULATIONS\n", + "Bw = (fr)/(Q);\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#half power freq 1\n", + "hf2 = fr-Bw;\t\t\t#half power freq 2\n", + "print \"Thus bandwidth is %d hz\"%(Bw);\n", + "print \"Thus value of half-power frequencies are %g hz and %g hz\"%(hf1,hf2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus bandwidth is 6000 hz\n", + "Thus value of half-power frequencies are 1.506e+06 hz and 1.494e+06 hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 40*10**-3;\t\t\t#inductance in henry\n", + "C = 0.01*10**-6;\t\t\t#capacitance in uf\n", + "#CALCULATIONS\n", + "fr = 1./(2*math.pi*math.sqrt(L*C));\t\t\t#resonant frequency\n", + "print \"Thus resonant frequency is %d hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 7957 hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.37, Page 198\n", + "\n", + "#INPUT DATA\n", + "V = 120.;\t\t\t#source voltage in volts\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "C = 50.;\t\t\t#capacitance in uF\n", + "\n", + "#CALCULATIONS\n", + "#at Resonance\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))));\t\t\t#resonant frequency in hz\n", + "I0 = V/R;\t\t\t#current at resonance in A\n", + "Vl = (1j)*(I0*L);\t\t\t#voltage developed across inductor in volts\n", + "Vc = (-1j)*(I0*L);\t\t\t#voltage developed across capacitor in volts\n", + "Q = (inv([[R]]))*(math.sqrt(L/(C*10**-6)));\t\t\t#quality factor\n", + "Bw = (fr)/(Q);\t\t\t#Bandwidth in Hz\n", + "#given resonance is to occur at 300 rad/sec,then\n", + "wr = 300;\t\t\t#wr = (2*math.pi*f*r)------->measured in Hz\n", + "#wr = inv(math.sqrt(L*Cn))\n", + "Cr = inv([[L*(wr)**2]]);\t\t\t#capacitance required in uF\n", + "print \"Thus resonant frequency, current, quality factor and bandwidth are %2.1f Hz, \\\n", + "%1.1f A, %d and %2.1f hz respectively\"%(fr,I0,Q,Bw);\n", + "print \"New value of capacitance at 300 rad/sec is %g F\"%(Cr)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency, current, quality factor and bandwidth are 31.8 Hz, 2.4 A, 2 and 15.9 hz respectively\n", + "New value of capacitance at 300 rad/sec is 2.22222e-05 F\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#INPUT DATA\n", + "Q = 45.;\t\t\t#quality factor\n", + "f1 = 600.*10**3;\t\t\t#freq in Hz\n", + "f2 = 1000.*10**3;\t\t\t#freq in Hz\n", + "#given new resistance is 50% greater than former.let us consider two reismath.tances as R1 = 1 ohm and R2 = 1.5 ohm for ease of calculation.Then\n", + "R1 = 1;\t\t\t#resistance in ohm\n", + "R2 = 1.5;\t\t\t#resistance in ohm\n", + "\n", + "#CALCULATIONS\n", + "W1 = 2*math.pi*f1;\t\t\t#angular freq 1 in rad/sec\n", + "W2 = 2*math.pi*f2;\t\t\t#angular freq 2 in rad/sec\n", + "Q = 45;\t\t\t#quality factor\n", + "L = (Q*R1)/(W1);\t\t\t#inductance in henry\n", + "Q1 = (W2*L)/(R2);\t\t\t#new quality factor\n", + "print \"Thus new quality factor is %d\"%(Q1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus new quality factor is 50\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 4.;\t\t\t#resistance in ohm\n", + "L = 100.*10**-6;\t\t\t#inductance in henry\n", + "C = 250.*10**-12;\t\t\t#capacitance in Farads\n", + "\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d, %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "#note:given answers are wrong in textbook.Please check the answers\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 1006584 hz , 158, 1.01295e+06 hz, 1.00022e+06 hz respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohm\n", + "L = 10**-3;\t\t\t#inductance in henry\n", + "C = 1000*10**-12;\t\t\t#capacitance in Farads\n", + "V = 20;\t\t\t#voltage in volts\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d , %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 159154 hz , 100 , 160746 hz, 157563 hz respectively\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 1000.;\t\t\t#power1 in watts\n", + "P2 = 1000.;\t\t\t#power2 in watts\n", + "#CALCULATIONS\n", + "#for case(1)\n", + "Pt = P1+P2;\t\t\t#total power in watts\n", + "phi = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1))*(180/math.pi));\t\t\t#math.since math.tan(phi) = math.sqrt(3)*((P2-P1)/(P2+P1)))\n", + "pf = math.cos(phi);\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt,pf);\n", + "#for case(2)\n", + "P3 = 1000;\t\t\t#power3 in watts\n", + "P4 = -1000;\t\t\t#power4 in watts\n", + "Pt1 = P3+P4;\t\t\t#total power in watts\n", + "pf1 = 0;\t\t\t#math.since we cannot perform division by zero in scilab,it doesn't consider it as infinite quantity to yield 90 degree angle and hence powerfactor 0\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt1,pf1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and powerfactor are 2000 W ,1 respectively\n", + "Thus power and powerfactor are 0 W ,0 respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V1 = 400.;\t\t\t#voltage in volts\n", + "Z1 = (3.+((1j)*4));\t\t\t#impedance in ohms\n", + "#CALCULATIONS\n", + "#in star connected system,phase voltage = (line voltage)\n", + "Ep = V1/(math.sqrt(3));\t\t\t#voltage in volts\n", + "Ip = Ep/Z1;\t\t\t#current in A\n", + "ip1 = abs(Ip);\t\t\t#line current in A\n", + "theta = math.atan(Ip.imag/Ip.real);\n", + "Pt = math.sqrt(3)*V1*ip1*math.cos(theta);\t\t\t#total power consumed in load in W\n", + "print \"Thus total power consumed in load is %f W\"%(Pt);\n", + "#note:for line current the answer given is 46.02A instead of 46.2 A and hence total power consumed changes\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total power consumed in load is 19200.000000 W\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V1 = 400;\t\t\t#voltage in volts\n", + "Il = 10;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "#in star connected system,phase current = (line current) = I1\n", + "phase_voltage = (V1)/(math.sqrt(3));\t\t\t#voltage in Volts\n", + "print \"Thus phase voltage is %1.0f V\"%(phase_voltage);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus phase voltage is 231 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.44, Page 209\n", + "\n", + "#INPUT DATA\n", + "Z1 = (6-((1j)*8));\t\t\t#impedance1 in ohms\n", + "Z2 = (16+((1j)*12));\t\t\t#impedance2 in ohms\n", + "I1 = (12+((1j)*16));\t\t\t#current in A\n", + "#CALCULATIONS\n", + "V = I1*Z1;\t\t\t#applied voltage in volts\n", + "I2 = V/(Z2);\t\t\t#current in other branch in A\n", + "print \"current in other branch in Amps\"\n", + "print (I2);\n", + "I = I1+I2;\t\t\t#total current in A\n", + "print \"total current in Amps\";\n", + "print (I);\n", + "i1 = abs(I);\t\t\t#magnitude in A\n", + "i2 = math.atan(I.imag/I.real);\n", + "P = V*i1*math.cos(i2);\t\t\t#power consumed in circuit\n", + "print \"Thus voltage applied and power consumed are %d V and %d W respectively\"%(V.real,P.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in other branch in Amps\n", + "(8-6j)\n", + "total current in Amps\n", + "(20+10j)\n", + "Thus voltage applied and power consumed are 200 V and 4000 W respectively\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Vl = 415.;\t\t\t#voltage in volts\n", + "Z = (4+((1j)*6));\t\t\t#impedance in each phase in ohm\n", + "#CALCULATIONS\n", + "Ip = Vl/Z;\t\t\t#current in each phase in A\n", + "ip1 = abs(Ip);\t\t\t#magnitude of Ip\n", + "Il = (math.sqrt(3))*(ip1);\t\t\t#line current in A\n", + "phi = math.atan(Ip.imag/Ip.real)\n", + "P = (math.sqrt(3))*Vl*Il*math.cos(phi);\t\t\t#power supplied in W\n", + "print \"Thus power supplied is %d W\"%(P);\n", + "#note:the math.cosfunction of scilab and calculator will differ slightly\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power supplied is 39744 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Vl = 400;\t\t\t#voltage in volts\n", + "Il = 20;\t\t\t#current in A\n", + "f = 50;\t\t\t#freq in hz\n", + "pf = 0.3\t\t\t#power factor\n", + "#CALCULATIONS\n", + "Ip = Il/math.sqrt(3);\t\t\t#phase current in A\n", + "Z = Vl/Ip;\t\t\t#impedance in each phase in ohms\n", + "phi = math.acos(0.3);\t\t\t#angle in radians\n", + "Zb = Z*(math.cos(phi)+(1j)*math.sin(phi));\t\t\t#impedance connected in each phase\n", + "print \"Thus impedance connected in each phase in ohms\";\n", + "print (Zb);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance connected in each phase in ohms\n", + "(10.3923048454+33.0454232837j)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 6*10**3;\t\t\t#power in Kw\n", + "P2 = -1*10**3;\t\t\t#power in Kw\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#total power in Kw\n", + "a = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1)));\n", + "pf = math.cos(a);\t\t\t#power factor\n", + "print \"Thus power and power factor are %d W and %1.2f respectively\"%(P,pf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and power factor are 5000 W and 0.28 respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z = 3-((1j)*4);\t\t\t#impedance in ohms\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#phase voltage in volts\n", + "Ip = Vp/abs(Z);\t\t\t#phase current in Amps\n", + "#line current(Il) = phase current(Ip)\n", + "Il = Ip;\t\t\t#line current in A\n", + "power_factor = math.cos(math.atan(Z.imag/Z.real));\n", + "power_consumed = math.sqrt(3)*Vl*Il*power_factor;\n", + "print \"Thus power consumed and power factor are %f W and %1.1f respectively\"%(power_consumed,power_factor);\n", + "#note:answer computed for power consumed in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed and power factor are 19200.000000 W and 0.6 respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Il = 10.;\t\t\t#current in Amps\n", + "Vl = 400.;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#line to neutral voltage\n", + "Ip = Il;\t\t\t#phase current in Amps\n", + "print \"Thus line to neutral voltage and phase current are %1.0f V and %d A respectively\"%(Vp,Ip);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus line to neutral voltage and phase current are 231 V and 10 A respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.50 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 2000;\t\t\t#power in watts\n", + "P2 = 1000;\t\t\t#power in watts\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#power in Watts\n", + "a = math.sqrt(3*(P1-P2)/(P1+P2));\n", + "b = math.atan(math.sqrt(a));\n", + "power_factor = math.cos(b);\n", + "kVA = P/power_factor;\n", + "print \"Thus power, power factor and kVA are %d W , %1.3f and %1.2f respectively\"%(P,power_factor,kVA);\n", + "#note:computed value for powerfactor and kVA in textbook are wrong.Please check the calculations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power, power factor and kVA are 3000 W , 0.707 and 4242.64 respectively\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c03afe9e Binary files /dev/null and b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch13.png differ 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 new file mode 100644 index 00000000..e0be8441 Binary files /dev/null and b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch14.png differ 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 new file mode 100644 index 00000000..1f8a143b Binary files /dev/null and b/Basic_Electrical_and_Electronics_Engineering_by_R._Muthusubramanian_and_S._Salivahanan/screenshots/ch2.png differ 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 new file mode 100644 index 00000000..7830ad5f --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh1.ipynb @@ -0,0 +1,631 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5e5e30eadf8083e86f3bfcce8a26926dfce2f385a2aaffbc34c9a0019e815666" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Part B : Chapter 1 : Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page no : 1.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Av = 10;\t\t\t\t#voltage gain\n", + "Ri = 1;\t\t\t\t#kohm\n", + "Ro = 10;\t\t\t\t#ohm\n", + "Vs = 2;\t\t\t\t#V(Sensor voltage)\n", + "Rs = 100;\t\t\t\t#ohm(Sensor Resistance)\n", + "RL = 50;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "Vi = Vs*Ri*1000./(Rs+Ri*1000);\t\t\t\t#V\n", + "Vo = Av*Vi*RL/(Ro+RL);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Output voltage of amplifier(V) : %.1f\"%Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage of amplifier(V) : 15.2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page no : 1.11\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Av = 10;\t\t\t\t#voltage gain\n", + "Ri = 1;\t\t\t\t#kohm\n", + "Ro = 10;\t\t\t\t#ohm\n", + "Vs = 2;\t\t\t\t#V(Sensor voltage)\n", + "Rs = 100;\t\t\t\t#ohm(Sensor Resistance)\n", + "RL = 50;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "Vi = Vs*Ri*1000./(Rs+Ri*1000);\t\t\t\t#V\n", + "Vo = Av*Vi*RL/(Ro+RL);\t\t\t\t#V\n", + "Av = Vo/Vi;\t\t\t\t#voltage gain of circuit\n", + "\n", + "# Results\n", + "print \"Voltage gain of circuit %.2f\"%Av\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain of circuit 8.33\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page no :1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Av = 10.;\t\t\t\t#voltage gain\n", + "Ro = 0.;\t\t\t\t#ohm\n", + "Vs = 2.;\t\t\t\t#V(Sensor voltage)\n", + "Rs = 100.;\t\t\t\t#ohm(Sensor Resistance)\n", + "RL = 50.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#Vi = Vs*Ri/(Rs+Ri) leads to Vi approximately equals to Vs as Ri = %inf\n", + "Vi = Vs;\t\t\t\t#V\n", + "Vo = Av*Vi*RL/(Ro+RL);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Output voltage of amplifier(V) %.2f\"%Vo\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage of amplifier(V) 20.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page no : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "VOC = 10;\t\t\t\t#V(open circuit voltage)\n", + "#VOC = source voltage here\n", + "R = 1.;\t\t\t\t#kohm\n", + "\n", + "# Calculations\n", + "ISC = VOC/R;\t\t\t\t#mA\n", + "\n", + "# Results\n", + "print \"Current generated by the circuit(mA) : %.2f\"%ISC\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current generated by the circuit(mA) : 10.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page no : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Av = 10;\t\t\t\t#voltage gain\n", + "Ri = 1;\t\t\t\t#kohm\n", + "Ro = 10;\t\t\t\t#ohm\n", + "Vs = 2;\t\t\t\t#V(Sensor voltage)\n", + "Rs = 100;\t\t\t\t#ohm(Sensor Resistance)\n", + "RL = 50;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "Vi = Vs*Ri*1000./(Rs+Ri*1000);\t\t\t\t#V\n", + "Vo = Av*Vi*RL/(Ro+RL);\t\t\t\t#V\n", + "Po = Vo**2/RL;\t\t\t\t#W\n", + "\n", + "# Results\n", + "print \"Output power(W) : %.2f\"%Po\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power(W) : 4.59\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 page no :1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Av = 10.;\t\t\t\t#voltage gain\n", + "Ri = 1.;\t\t\t\t#kohm\n", + "Ro = 10.;\t\t\t\t#ohm\n", + "Vs = 2.;\t\t\t\t#V(Sensor voltage)\n", + "Rs = 100.;\t\t\t\t#ohm(Sensor Resistance)\n", + "RL = 50.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "Vi = Vs*Ri*1000/(Rs+Ri*1000);\t\t\t\t#V\n", + "Vo = Av*Vi*RL/(Ro+RL);\t\t\t\t#V\n", + "Po = Vo**2/RL;\t\t\t\t#W\n", + "Pi = Vi**2/Ri;\t\t\t\t#mW\n", + "Ap = Po*1000/Pi;\t\t\t\t#Power gain\n", + "\n", + "# Results\n", + "print \"Power gain : %.f\"%Ap\n", + "\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain : 1389\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 pageno : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ap = 1400;\t\t\t\t#Power gain\n", + "\n", + "# Calculations\n", + "Ap_dB = 10*math.log10(Ap);\t\t\t\t#dB\n", + "\n", + "# Results\n", + "print \"Power gain(dB) : %.2f\"%Ap_dB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain(dB) : 31.46\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 page no :1.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ap1 = 5;\t\t\t\t#Power gain\n", + "\n", + "# Calculations and Results\n", + "Ap1_dB = 10*math.log10(Ap1);\t\t\t\t#dB\n", + "print \"Power gain of 5 in dB : %.f\"%Ap1_dB\n", + "Ap2 = 50;\t\t\t\t#Power gain\n", + "Ap2_dB = 10*math.log10(Ap2);\t\t\t\t#dB\n", + "print \"Power gain of 50 in dB : %.f \"%Ap2_dB\n", + "Ap3 = 500;\t\t\t\t#Power gain\n", + "Ap3_dB = 10*math.log10(Ap3);\t\t\t\t#dB\n", + "print \"Power gain of 500 in dB : %.f\"%Ap3_dB\n", + "Av1 = 5;\t\t\t\t#Voltage gain\n", + "Av1_dB = 20*math.log10(Av1);\t\t\t\t#dB\n", + "print \"Voltage gain of 5 in dB : %.f\"%Av1_dB\n", + "Av2 = 50;\t\t\t\t#Voltage gain\n", + "Av2_dB = 20*math.log10(Av2);\t\t\t\t#dB\n", + "print \"Voltage gain of 50 in dB : %.f\"%Av2_dB\n", + "Av3 = 500;\t\t\t\t#Voltage gain\n", + "Av3_dB = 20*math.log10(Av3);\t\t\t\t#dB\n", + "print \"Voltage gain of 500 in dB : %.f\"%Av3_dB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain of 5 in dB : 7\n", + "Power gain of 50 in dB : 17 \n", + "Power gain of 500 in dB : 27\n", + "Voltage gain of 5 in dB : 14\n", + "Voltage gain of 50 in dB : 34\n", + "Voltage gain of 500 in dB : 54\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 pageno :1.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "C = 10.;\t\t\t\t#micro F\n", + "R = 1.;\t\t\t\t#kohm\n", + "\n", + "# Calculations and Results\n", + "T = C*10**-6*R*1000;\t\t\t\t#seconds\n", + "print \"Time constant(seconds) : %.2f\"%T\n", + "omega_c = 1/T;\t\t\t\t#rads/s\n", + "print \"omega_c(rads/s) : %.2f\"%omega_c\n", + "fc = 1./2/math.pi/T;\t\t\t\t#Hz\n", + "print \"fc(Hz) : %.2f\"%fc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time constant(seconds) : 0.01\n", + "omega_c(rads/s) : 100.00\n", + "fc(Hz) : 15.92\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 pageno : 1.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#(a)\n", + "f = 1;\t\t\t\t#kHz\n", + "n = 1;\t\t\t\t#no. of octave(above)\n", + "f1 = f*2**n;\t\t\t\t#Hz\n", + "print \"(a) An octave above 1 kHz (in kHz) = %.2f\"%f1\n", + "#(b)\n", + "f = 10;\t\t\t\t#Hz\n", + "n = 3;\t\t\t\t#no. of octave(above)\n", + "f1 = f*2**n;\t\t\t\t#Hz\n", + "print \"(b) Three octave above 10 Hz (in Hz) = %.2f\"%f1\n", + "#(c)\n", + "f = 100.;\t\t\t\t#Hz\n", + "n = 1.;\t\t\t\t#no. of octave(below)\n", + "f1 = f/2**n;\t\t\t\t#Hz\n", + "print \"(c) An octave below 100 Hz (in Hz) = %.2f\"%f1\n", + "#(d)\n", + "f = 20;\t\t\t\t#kHz\n", + "n = 1;\t\t\t\t#no. of decade(above)\n", + "f1 = f*10**n;\t\t\t\t#Hz\n", + "print \"(d) An decade above 20 Hz (in Hz) = %.2f\"%f1\n", + "#(e)\n", + "f = 1.;\t\t\t\t#MHz\n", + "n = 3;\t\t\t\t#no. of decade(below)\n", + "f1 = f/10**n;\t\t\t\t#Hz\n", + "print \"(e) Three decade below 1 MHz (in kHz) = %.2f\"%(f1/1000)\n", + "#(f)\n", + "f = 50;\t\t\t\t#kHz\n", + "n = 2;\t\t\t\t#no. of decade(above)\n", + "f1 = f*10**n;\t\t\t\t#Hz\n", + "print \"(f) Two decade above 50 Hz (in kHz) = %.2f\"%(f1/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) An octave above 1 kHz (in kHz) = 2.00\n", + "(b) Three octave above 10 Hz (in Hz) = 80.00\n", + "(c) An octave below 100 Hz (in Hz) = 50.00\n", + "(d) An decade above 20 Hz (in Hz) = 200.00\n", + "(e) Three decade below 1 MHz (in kHz) = 0.00\n", + "(f) Two decade above 50 Hz (in kHz) = 5.00\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 pageno : 1.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "C = 10.;\t\t\t\t#micro F\n", + "R = 1.;\t\t\t\t#kohm\n", + "\n", + "# Calculations and Results\n", + "T = C*10**-6*R*1000;\t\t\t\t#seconds\n", + "print \"Time constant(seconds) : %.2f\"%T\n", + "omega_c = 1./T;\t\t\t\t#rads/s\n", + "print \"omega_c(rads/s) : %.2f\"%omega_c\n", + "fc = 1./2/math.pi/T;\t\t\t\t#Hz\n", + "print \"fc(Hz) : %.2f\"%fc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time constant(seconds) : 0.01\n", + "omega_c(rads/s) : 100.00\n", + "fc(Hz) : 15.92\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 pageno : 1.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vs = 2.5;\t\t\t\t#V\n", + "Vn = 1.0;\t\t\t\t#mV\n", + "\n", + "# Calculations\n", + "SNratio = 20*math.log10(Vs/(Vn/100));\t\t\t\t#dB\n", + "\n", + "# Results\n", + "print \"S/N ratio(dB) : %.f\"%SNratio\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S/N ratio(dB) : 48\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 page no : 1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "G = 100.;\t\t\t\t#stable voltage gain\n", + "A = range(100000,200000+1);\t\t\t\t#variable gain\n", + "\n", + "# Calculations and Results\n", + "B = 1./G;\t\t\t\t#Unitless\n", + "print (\"When the gain of amplifier(A) is 100000\");\n", + "G1 = min(A)/(1+min(A)*B);\t\t\t\t#overall gain\n", + "print \"The overall gain(G) is :%.2f\"%G1\n", + "print (\"When the gain of amplifier(A) is 200000\");\n", + "G2 = max(A)/(1+max(A)*B);\t\t\t\t#overall gain\n", + "print \"The overall gain(G) is %.2f\"%G2\n", + "change = (G2-G1)/G*100;\t\t\t\t#% Change in gain\n", + "print (\"Effect of variable gain :\");\n", + "print \"Corresponding to 100%% Change in gain of active amplifier, Change in overall gain is(%%) :%.2f\"%change\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When the gain of amplifier(A) is 100000\n", + "The overall gain(G) is :99.90\n", + "When the gain of amplifier(A) is 200000\n", + "The overall gain(G) is 99.95\n", + "Effect of variable gain :\n", + "Corresponding to 100% Change in gain of active amplifier, Change in overall gain is(%) :0.05\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 page no : 1.49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 10000.;\t\t\t\t#stable voltage gain\n", + "B = 1/A;\t\t\t\t#unitless\n", + "#For A = 100000;\t\t\t\t#gain\n", + "A = 100000;\t\t\t\t#gain\n", + "\n", + "# Calculations and Results\n", + "G = A/(1+A*B);\t\t\t\t#overall gain\n", + "print \"When the gain of amplifier is 100000, Overall gain will be : %.f\"%G\n", + "A = 200000.;\t\t\t\t#gain\n", + "G = A/(1+A*B);\t\t\t\t#overall gain\n", + "print \"When the gain of amplifier is 200000, Overall gain will be : %.f\"%G\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When the gain of amplifier is 100000, Overall gain will be : 9091\n", + "When the gain of amplifier is 200000, Overall gain will be : 9524\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..193ed341 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh2.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4c07bbf8ad32ad1d86dbfc606f2615e8d1e6001b3486fca1531280171120a2e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Part B : Chapter 2 : Digital System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page no :2.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "binary = '11010';\t\t\t\t#given binary value\n", + "\n", + "# Calculations\n", + "decimal = int(binary,2);\t\t\t\t#equivalent decimal\n", + "\n", + "# Results\n", + "print \"Equivalent decimal value is %d\"%decimal\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent decimal value is 26\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page no :2.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "decimal = 26;\t\t\t\t#given decimal value\n", + "\n", + "# Calculations\n", + "binary = bin(decimal);\t\t\t\t#equivalent binary value\n", + "\n", + "# Results\n", + "print \"Equivalent binary value is \",binary\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent binary value is 0b11010\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page no : 2.26\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "hex1 = '0xA013';\t\t\t\t#given hexadecimal value\n", + "\n", + "# Calculations\n", + "dec = int(hex1,16);\t\t\t\t#equivalent decimal value\n", + "\n", + "# Results\n", + "print \"Equivalent decimal value is\",dec\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent decimal value is 40979\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page no :2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "dec = 7046;\t\t\t\t#given decimal value\n", + "\n", + "# Calculations\n", + "hex = hex(dec);\t\t\t\t#equivalent hexadecimal value\n", + "\n", + "# Results\n", + "print \"Equivalent hexadecimal value is\",hex\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent hexadecimal value is 0x1b86\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page no :2.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "hex1 = '0xF851';\t\t\t\t#given hexadecimal value\n", + "\n", + "# Calculations\n", + "dec = int(hex1,16);\t\t\t\t#equivalent decimal value\n", + "bin1 = bin(dec);\t\t\t\t#equivalent binary value\n", + "\n", + "# Results\n", + "print \"Equivalent binary value is\",bin1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent binary value is 0b1111100001010001\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page no :2.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "bin1 = '111011011000100';\t\t\t\t#given binary value\n", + "\n", + "# Calculations\n", + "dec = int(bin1,2);\t\t\t\t#equivalent decimal value\n", + "hex1 = \"0x%X\"%dec;\t\t\t\t#equivalent hexadecimal value\n", + "\n", + "# Results\n", + "print \"Equivalent hexadecimal value is\",hex1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent hexadecimal value is 0x76C4\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..fe888cfd --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh4.ipynb @@ -0,0 +1,613 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d610d0d35b1108468962e5c6764a0229e274de9fd25b118501a5da4efbea7d39" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Part B : Chapter 4 : Radio Communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page no : 4.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "fc = 100.;\t\t\t\t#kHz\n", + "fm = 5.;\t\t\t\t#kHz\n", + "\n", + "# Calculations and Results\n", + "LSB = [fc-fm ,fc];\t\t\t\t#kHz\n", + "USB = [fc, fc+fm];\t\t\t\t#kHz\n", + "print (\"Part (a)\");\n", + "print (\"Lower sideband is from \"+str(LSB[0])+\" kHz to \"+str(LSB[1])+\" kHz\");\n", + "print (\"Upper sideband is from \"+str(USB[0])+\" kHz to \"+str(USB[1])+\" kHz\");\n", + "B = 2*fm;\t\t\t\t#kHz\n", + "print \"(b) Bandwidth(kHz)\",B\n", + "print (\"part (c)\");\n", + "fm = 3;\t\t\t\t#kHz\n", + "f_usf = fc+fm;\t\t\t\t#kHz\n", + "print \"Upper side frequency(kHz)\",f_usf\n", + "f_lsf = fc-fm;\t\t\t\t#kHz\n", + "print \"Lower side frequency(kHz)\",f_lsf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Lower sideband is from 95.0 kHz to 100.0 kHz\n", + "Upper sideband is from 100.0 kHz to 105.0 kHz\n", + "(b) Bandwidth(kHz) 10.0\n", + "part (c)\n", + "Upper side frequency(kHz) 103.0\n", + "Lower side frequency(kHz) 97.0\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page no : 4.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "fc = 500.;\t\t\t\t#kHz\n", + "fm = 10.;\t\t\t\t#kHz\n", + "#Am = 7.5*Vp & Ac = 20*Vc\n", + "Em = 7.5;\t\t\t\t#times of Vp\n", + "Ec = 20.;\t\t\t\t#times of Vp(unmodulated carrier)\n", + "\n", + "# Calculations and Results\n", + "print (\"Part (a)\");\n", + "f_usf = fc+fm;\t\t\t\t#kHz\n", + "print \"Upper side frequency(kHz)\",f_usf\n", + "f_lsf = fc-fm;\t\t\t\t#kHz\n", + "print \"Lower side frequency(kHz)\",f_lsf\n", + "print (\"Part (b)\");\n", + "m = Em/Ec;\t\t\t\t#modulation coefficient\n", + "print \"Modulation coefficient\",m\n", + "M = 100*m;\t\t\t\t#% modulation\n", + "print \"% Modulation\",M\n", + "print (\"Part (c)\");\n", + "Ec1 = Ec;\t\t\t\t#times of Vp(modulated carrier)\n", + "Eusf = m*Ec/2;\t\t\t\t#times of Vp\n", + "Elsf = m*Ec/2;\t\t\t\t#times of Vp\n", + "print (\"Peak amplitude of modulated carrier is \"+str(Ec1)+\"*Vp\");\n", + "print (\"Upper & lower side frequency voltages, Eusf = Elsf = \"+str(Eusf)+\"*Vp\");\n", + "print (\"Part (d)\");\n", + "Vmax = Ec+Em;\t\t\t\t#times of Vp\n", + "Vmin = Ec-Em;\t\t\t\t#times of Vp\n", + "print (\"Maximum amplitude of envelope is \"+str(Vmax)+\"*Vp\");\n", + "print (\"Minimum amplitude of envelope is \"+str(Vmin)+\"*Vp\");\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Upper side frequency(kHz) 510.0\n", + "Lower side frequency(kHz) 490.0\n", + "Part (b)\n", + "Modulation coefficient 0.375\n", + "% Modulation 37.5\n", + "Part (c)\n", + "Peak amplitude of modulated carrier is 20.0*Vp\n", + "Upper & lower side frequency voltages, Eusf = Elsf = 3.75*Vp\n", + "Part (d)\n", + "Maximum amplitude of envelope is 27.5*Vp\n", + "Minimum amplitude of envelope is 12.5*Vp\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 4.3 Page no : 4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "fc = 1.;\t\t\t\t#MHz\n", + "fm = 5.;\t\t\t\t#kHz\n", + "m = 60./100;\t\t\t\t#Modulation\n", + "Pc = 6;\t\t\t\t#kW\n", + "RL = 50.;\t\t\t\t#W\n", + "\n", + "# Calculations and Results\n", + "Pavg = Pc*(1+m**2/2);\t\t\t\t#kW(Average power delivered to load)\n", + "print (\"Part(a)\");\n", + "print \"Average power of modulated signal(kW)\",Pavg\n", + "PdB = 10*math.log10(Pavg*1000);\t\t\t\t#dB\n", + "print \"Average power of modulated signal(dB) :%.2f\"%PdB\n", + "PdBm = 10*math.log10(Pavg*10**6);\t\t\t\t#dBm\n", + "print \"Average power of modulated signal(dBm) : %.2f\"%PdBm\n", + "print (\"Part(b)\");\n", + "VS_RMS = math.sqrt(2*RL*Pavg*1000)/1000;\t\t\t\t#kV\n", + "print \"RMS voltage of modulated signal(kV) : %.2f\"%VS_RMS\n", + "Vp = math.sqrt(2)*VS_RMS;\t\t\t\t#V\n", + "print \"Peak value of modulated signal(kV) : %.2f\"%Vp\n", + "#Answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Average power of modulated signal(kW) 7.08\n", + "Average power of modulated signal(dB) :38.50\n", + "Average power of modulated signal(dBm) : 68.50\n", + "Part(b)\n", + "RMS voltage of modulated signal(kV) : 0.84\n", + "Peak value of modulated signal(kV) : 1.19\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page no : 4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vc = 10.;\t\t\t\t#times of Vp\n", + "RL = 10.;\t\t\t\t#ohm\n", + "m = 1.;\t\t\t\t#modulation coefficient\n", + "\n", + "# Calculations and Results\n", + "Pc = Vc**2/2/RL;\t\t\t\t#W\n", + "Pusb = m**2*Pc/4;\t\t\t\t#W\n", + "Plsb = m**2*Pc/4;\t\t\t\t#W\n", + "print (\"Part(a)\");\n", + "print \"Carrier power(W)\",Pc\n", + "print \"Upper side band power(W)\",Pusb\n", + "print \"Lower side band power(W)\",Plsb\n", + "print (\"Part(b)\");\n", + "Psbt = m**2*Pc/2;\t\t\t\t#W\n", + "print \"Total side band power(W)\",Psbt\n", + "print (\"Part(c)\");\n", + "Pt = Pc*(1+m**2/2);\t\t\t\t#W\n", + "print \"Total power of modulated wave(W)\",Pt\n", + "print (\"Part(e)\");\n", + "m = 0.5;\t\t\t\t#modulation coefficient\n", + "Pusb = m**2*Pc/4;\t\t\t\t#W\n", + "Plsb = m**2*Pc/4;\t\t\t\t#W\n", + "print \"Carrier power(W)\",Pc\n", + "print \"Upper side band power(W)\",Pusb\n", + "print \"Lower side band power(W)\",Plsb\n", + "Psbt = m**2*Pc/2;\t\t\t\t#W\n", + "print \"Total side band power(W)\",Psbt\n", + "Pt = Pc*(1+m**2/2);\t\t\t\t#W\n", + "print \"Total power of modulated wave(W)\",Pt\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Carrier power(W) 5.0\n", + "Upper side band power(W) 1.25\n", + "Lower side band power(W) 1.25\n", + "Part(b)\n", + "Total side band power(W) 2.5\n", + "Part(c)\n", + "Total power of modulated wave(W) 7.5\n", + "Part(e)\n", + "Carrier power(W) 5.0\n", + "Upper side band power(W) 0.3125\n", + "Lower side band power(W) 0.3125\n", + "Total side band power(W) 0.625\n", + "Total power of modulated wave(W) 5.625\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page no : 4.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "RF = 200.;\t\t\t\t#kHz\n", + "IF = 10.;\t\t\t\t#kHz\n", + "\n", + "# Calculations\n", + "BI = RF/IF;\t\t\t\t#unitless(Bandwidth Improvement)\n", + "NF = 10*math.log10(BI);\t\t\t\t#dB\n", + "\n", + "# Results\n", + "print \"Noise Figure improvement(dB) : %.f\"%NF\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise Figure improvement(dB) : 13\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page no : 4.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Part (a)\n", + "K1 = 5.;\t\t\t\t#kHz/V\n", + "#vm(t) = 2*math.cos(2*p*2000*t);\n", + "Vm = 2.;\t\t\t\t#V\n", + "fm = 2000.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "delta_f = K1*Vm;\t\t\t\t#kHz\n", + "print \"(a) Pak frequency deviation(kHz) : %.2f\"%delta_f\n", + "m = delta_f*1000/fm;\t\t\t\t#modulation index\n", + "print \"(a) Modulation index : %.2f\"%m\n", + "#Part (b)\n", + "K = 2.5;\t\t\t\t#rad/V\n", + "#vm(t) = -math.cos(2*p*2000*t);\n", + "fm = 2000;\t\t\t\t#Hz\n", + "m = K*Vm;\t\t\t\t#rad(Peak phase shift)\n", + "print \"(b) Peak phase shift(rad) : %.2f\"%m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Pak frequency deviation(kHz) : 10.00\n", + "(a) Modulation index : 5.00\n", + "(b) Peak phase shift(rad) : 5.00\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page no : 4.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#v(t) = 20*math.sin(6.28*10**6*t+10*math.sin(6.28*10**3*t));\n", + "#Comparing with VPM(t) = A*math.sin(omega_c*t+mp*math.sin(omega_m*t))\n", + "A = 20;\n", + "omega_c = 6.28*10**6;\t\t\t\t#rad\n", + "omega_m = 6.28*10**3;\t\t\t\t#rad\n", + "# Calculations\n", + "fc = omega_c/2/math.pi/10**6;\t\t\t\t#MHz\n", + "fm = omega_m/2/math.pi/10**3;\t\t\t\t#kHz\n", + "mp = 10;\t\t\t\t#modulation index\n", + "delta_theta = mp;\t\t\t\t#radians\n", + "\n", + "# Results\n", + "print \"(a) Carrier freuency(MHz)\",fc\n", + "print \"(b) Modulating freuency(kHz)\",fm\n", + "print \"(c) Modulation index(mp)\",mp\n", + "print \"(d) Peak phase deviation(radians)\",delta_theta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Carrier freuency(MHz) 0.999493042617\n", + "(b) Modulating freuency(kHz) 0.999493042617\n", + "(c) Modulation index(mp) 10\n", + "(d) Peak phase deviation(radians) 10\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page no : 4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot,title,xlabel,ylabel,bar\n", + "\n", + "# Variables\n", + "delta_f = 10.;\t\t\t\t#kHz\n", + "fm = 10.;\t\t\t\t#kHz\n", + "Vc = 10.;\t\t\t\t#V\n", + "fc = 500.;\t\t\t\t#kHz\n", + "\n", + "# Calculations and Results\n", + "m = delta_f/fm;\t\t\t\t#modulation index\n", + "#For m = 1 we have 3 sidebands\n", + "B = 2*(3*fm);\t\t\t\t#kHz\n", + "print \"(a) Actual minimum bandwidh(kHz)\",B\n", + "B = 2*(fm+delta_f);\t\t\t\t#kHz\n", + "print \"(b) Approximate minimum bandwidh(kHz)\",B\n", + "A0 = 0.77*fm;\t\t\t\t#V\n", + "A1 = 0.44*fm;\t\t\t\t#V\n", + "A2 = 0.11*fm;\t\t\t\t#V\n", + "A3 = 0.02*fm;\t\t\t\t#V\n", + "#For frequency spectrum\n", + "A = [A3, A2, A1, A0, A1, A2, A3];\t\t\t\t#V(Amplitudes)\n", + "f = [fc-3*fm ,fc-2*fm, fc-fm, fc, fc+fm, fc+2*fm, fc+3*fm];\t\t\t\t#kHz\n", + "bar(f,A);\n", + "title('Output frequency spectrum');\n", + "xlabel('Frequency(kHz)');\n", + "ylabel('Amplitudes(V)');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Actual minimum bandwidh(kHz) 60.0\n", + "(b) Approximate minimum bandwidh(kHz) 40.0\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEZCAYAAACQK04eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG1BJREFUeJzt3Xu4HHV5wPHvSUIIJBwxYrlLIC0I1lpAeVRqXbwgWCpW\nAbFVHlDBG0JbtIqWcqqPYhGvtGorGBBFQcALigIiqyigQBJAECtpuEMAiSEYkISc/vH+Njtns2fP\nZs+ZnZ3M9/M85zmzs7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PS\n/O8SAxtKUumtoZnoLgR2Iso/jUG19gf+O01PI8YdegmR2G8CZhHjmvyWuPEMjL3RSTbxH0NsLCCG\n3biO2NDUgN8Tw9sOAVcTA93NJC7tb2xE5hAbjyOIYa8hbqzSGLPpcOD0zHtbQJR6PgF8PjO/TozN\n33jft7D+ULs7EZfgNwbf2pkYA1+aFEs9GgSPM7bUMw+4k+bt5vZPP41bdM4mbiizBXH7vyfST7s7\nvLXan+iZH5IeDxMDd61O7d2X5i8mEu1KYpTEG9L8x9LvC4ie+PuIoa4XpPnPojmqIsRG5CQiYb89\nM3+UGDepUbbZCfhe5vlZxN7HscDdad79xGcjTYqJX4PqDy2PTwH+p2Xe8Ywtl2Sn19Asqcxqed2x\nNAcZa6gBf8w8for4/xivDr8qreO1xA1tsrdRzMYxSuwN7A08najTt1uutezzRWLj8uOWZcp0rEMD\nyhq/yuBSolc9Oz3enhhe+qdE4m2Ueg7KvOYO4p4D0OzdN9b1Lpqdnl2JIXDbGSWOH2ybWdcWRKkH\nohb/OWJPYUWadyfN+wU0/JAYPvr7RKkou/523p2WO7Vl/rZp/dKk2OPXIGiXALPzLgd2J4YAhii/\nvIko/ZxHHKR9kOhZN3rOpxHD1B5DJNzG+s4gyiUL07IPEkMlj3eWzWpiCPHTgc2Inv4riT2ShUTC\nX5BZ/ufEHdpa38uFxEbju8RNTNpptH8CcXerRmnrC8Tezj7Exk6SlJxM86yeftiO2CNo9WOidz7V\nvsb4p71KXbPUo41Nv2rgRxCndn6wzXOnAe+Y4vb+BNiS5l6AJEmSJEmSJEmSJEmSJEmSpHL6f0X4\nfwqVJ9IAAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page no : 4.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#Part (a)\n", + "delta_f = 75.;\t\t\t\t#kHz\n", + "fm = 15.;\t\t\t\t#kHz\n", + "\n", + "# Calculations and Results\n", + "DR = delta_f/fm;\t\t\t\t#Deviation ratio\n", + "print \"(a) Deviation ratio\",DR\n", + "#For m or DR = 5 we have 8 sidebands\n", + "B = 2*(8*fm);\t\t\t\t#kHz\n", + "print \"(a) Bandwidh for worst case(kHz)\",B\n", + "#Part (b)\n", + "delta_f = 75./2;\t\t\t\t#kHz\n", + "fm = 15./2;\t\t\t\t#kHz\n", + "DR = delta_f/fm;\t\t\t\t#Deviation ratio\n", + "print \"(b) Deviation ratio or modulation index\",DR\n", + "#For m or DR = 5 we have 8 sidebands\n", + "B = 2*(8*fm);\t\t\t\t#kHz\n", + "print \"(b) Bandwidh for worst case(kHz)\",B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Deviation ratio 5.0\n", + "(a) Bandwidh for worst case(kHz) 240.0\n", + "(b) Deviation ratio or modulation index 5.0\n", + "(b) Bandwidh for worst case(kHz) 120.0\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page no : 4.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#Part (a)\n", + "ft = 88.8;\t\t\t\t#MHz\n", + "N1N2N3 = 20;\t\t\t\t#frequency multiplication\n", + "\n", + "# Calculations and Results\n", + "fc = ft/N1N2N3;\t\t\t\t#MHz\n", + "print \"(a) Master oscillator center frequency(MHz)\",fc\n", + "delta_ft = 75.;\t\t\t\t#kHz\n", + "delta_f = delta_ft*1000/N1N2N3;\t\t\t\t#Hz\n", + "print \"(b) Frequency deviation at the output(Hz)\",delta_f\n", + "fm = 15;\t\t\t\t#kHz\n", + "DR = delta_f/1000/fm;\t\t\t\t#Deviation ratio at output\n", + "print \"(c) Deviation ratio at the output\",DR\n", + "DR = DR*N1N2N3;\t\t\t\t#Deviation ratio at antenna\n", + "print \"(d) Deviation ratio at the antenna\",DR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Master oscillator center frequency(MHz) 4.44\n", + "(b) Frequency deviation at the output(Hz) 3750.0\n", + "(c) Deviation ratio at the output 0.25\n", + "(d) Deviation ratio at the antenna 5.0\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page no :4.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "VCO = 200.;\t\t\t\t#ppm(VCO stability)\n", + "fc = 5.1;\t\t\t\t#MHz\n", + "ft_old = 91.8;\t\t\t\t#MHz\n", + "k0 = 10.;\t\t\t\t#kHz/V\n", + "kd = 2.;\t\t\t\t#V/kHz\n", + "f2 = 30.6;\t\t\t\t#MHz\n", + "\n", + "# Calculations\n", + "fc = fc*10**6+(VCO*10**-6*fc*10**6);\t\t\t\t#Hz(with feedback loop open)\n", + "N1 = 2;\n", + "N2 = 3;\n", + "f2_new = N1*N2*fc;\t\t\t\t#Hz\n", + "df2 = f2_new-f2*10**6;\t\t\t\t#Hz(Frequency drift)\n", + "ft = N2*f2_new/10**6;\t\t\t\t#MHz(Transmit frequency)\n", + "df2_reduced = df2/(1+N1*N2*kd*k0);\t\t\t\t#Hz(reduced frequency drift)\n", + "df2_reduced = round(df2_reduced);\t\t\t\t#Hz\n", + "print \"Reduced frequency drift(Hz)\",df2_reduced\n", + "f2dash = f2*10**6+df2_reduced;\t\t\t\t#Hz(New transmit frequency of antenna)\n", + "ftnew = f2dash*N2;\t\t\t\t#Hz\n", + "print \"New transmit frequency of antenna(Hz)\",ftnew\n", + "old_drift = ft*10**6-ft_old*10**6;\t\t\t\t#Hz\n", + "new_drift = ftnew-ft_old*10**6;\t\t\t\t#Hz\n", + "print (\"The frequency drift at the antenna has been reduced from \"+str(old_drift)+\" Hz to\\\n", + " \"+str(new_drift)+\" Hz. This fulfill the FCC requirements.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reduced frequency drift(Hz) 51.0\n", + "New transmit frequency of antenna(Hz) 91800153.0\n", + "The frequency drift at the antenna has been reduced from 18360.0 Hz to 153.0 Hz. This fulfill the FCC requirements.\n" + ] + } + ], + "prompt_number": 66 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3c4977fd --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/PartBCh6.ipynb @@ -0,0 +1,159 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8403b6a2456cc38212f79201c05449f10a04ffecbe68dbb0c5f7fff2e9993540" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Part B : Chapter 6 : Communication System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page no : 6.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "theta1 = 30;\t\t\t\t#degree(Angle of incedence)\n", + "n1 = 1.5;\t\t\t\t#(refractive index for glass)\n", + "n2 = 1.36;\t\t\t\t#(refractive index for ethyl alcohol)\n", + "\n", + "# Calculations\n", + "theta2 = math.degrees(math.asin(n1*math.sin(math.radians(theta1))/n2));\t\t\t\t#degree(Angle of refraction)\n", + "\n", + "# Results\n", + "print \"Angle of refraction(degree) : %.2f\"%theta2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction(degree) : 33.47\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page no : 6.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "clusters = 10;\t\t\t\t#no. of clusters\n", + "cells = 7;\t\t\t\t#no. of cells in a cluster\n", + "channels = 10;\t\t\t\t#no. of channels in a cell\n", + "\n", + "# Calculations and Results\n", + "F = cells*channels;\t\t\t\t#no. of full duplex channels/cluster\n", + "print \"Number of channels per cluster : %.2f\"%F\n", + "\n", + "C = clusters*cells*channels;\t\t\t\t#total no. of channels\n", + "print \"Total channel capacity : %.2f\"%C\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of channels per cluster : 70.00\n", + "Total channel capacity : 700.00\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page no : 6.37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Asys = 1520.;\t\t\t\t#km**2\n", + "Ch = 1140.;\t\t\t\t#no. of channels\n", + "Acell = 4.;\t\t\t\t#km**2\n", + "i = 3.;\n", + "j = 2.;\t\t\t\t#For hexagon cells\n", + "\n", + "# Calculations and Results\n", + "N = i**2+i*j+j**2;\t\t\t\t#cells in a cluster\n", + "print \"(a) No. of cells in a cluster : %.2f\"%N\n", + "\n", + "Acluster = N*Acell;\t\t\t\t#km**2\n", + "cluster = Asys/Acluster;\t\t\t\t#no. of clusters\n", + "print \"(b) Number of clusters : %.2f\"%cluster\n", + "print \"(c) Area of each cellular cluster(km**2) : %.2f\"%Acluster\n", + "\n", + "C = cluster*Ch;\t\t\t\t#system capacity\n", + "print \"(d) Increased system capacity(No. of channels) : %.2f\"%C\n", + "\n", + "#Without frequency reuse :-\n", + "c_sys = Asys/Acell;\t\t\t\t#No. of cell in a system\n", + "ch_cell = Ch/c_sys;\t\t\t\t#No. of channels/cell\n", + "print \"(e_i) Without frequency reuse, No. of channels/cell : %.2f\"%ch_cell\n", + "\n", + "#With frequency reuse :-\n", + "ch_cell = Ch/N;\t\t\t\t#No. of channels/cell\n", + "print \"(e_ii) With frequency reuse, No. of channels/cell : %.2f\"%ch_cell\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) No. of cells in a cluster : 19.00\n", + "(b) Number of clusters : 20.00\n", + "(c) Area of each cellular cluster(km**2) : 76.00\n", + "(d) Increased system capacity(No. of channels) : 22800.00\n", + "(e_i) Without frequency reuse, No. of channels/cell : 3.00\n", + "(e_ii) With frequency reuse, No. of channels/cell : 60.00\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ 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 new file mode 100644 index 00000000..dd3dc8fd --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch1.ipynb @@ -0,0 +1,641 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff1f8d37d08a8211fcc46eff9f443b7ece70ebe22359cada1bbdfcde008d38d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : DC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.;\t\t\t\t#kohm\n", + "V = 220;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#First Case\n", + "I = V/R;\t\t\t\t#mA\n", + "print \"1st case : Current in the circuit(mA) : %.f\"%I\n", + "\n", + "#Second Case\n", + "Req = R+R;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = V/Req;\t\t\t\t#mA\n", + "print \"2nd case : Current in the circuit(mA) : %.f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1st case : Current in the circuit(mA) : 73\n", + "2nd case : Current in the circuit(mA) : 37\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 1.5;\t\t\t\t#A\n", + "R1 = 2;\t\t\t\t#ohm\n", + "R2 = 3;\t\t\t\t#ohm\n", + "R3 = 8;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "V1 = I*R1;\t\t\t\t#V\n", + "V2 = I*R2;\t\t\t\t#V\n", + "V3 = I*R3;\t\t\t\t#V\n", + "print \"Voltage across R1(V) : %.2f\"%V1\n", + "print \"Voltage across R2(V) : %.2f\"%V2\n", + "print \"Voltage across R3(V) : %.2f\"%V3\n", + "\n", + "V = V1+V2+V3;\t\t\t\t#V(Supply voltage)\n", + "print \"Supply Voltage(V) : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across R1(V) : 3.00\n", + "Voltage across R2(V) : 4.50\n", + "Voltage across R3(V) : 12.00\n", + "Supply Voltage(V) : 19.50\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vs = 100.;\t\t\t\t#V(Supply voltage)\n", + "R1 = 40.;\t\t\t\t#ohm\n", + "R2 = 50.;\t\t\t\t#ohm\n", + "R3 = 70.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = R1+R2+R3;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = Vs/R;\t\t\t\t#A(Current in the circuit)\n", + "\n", + "# Results\n", + "print \"Circuit current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit current(A) : 0.62\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 10.;\t\t\t\t#V(Output voltage)\n", + "Vin = 30;\t\t\t\t#V(Input voltage)\n", + "R2 = 100;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#V2/V = R2/(R1+R2)\t\t\t\t#Voltage divider rule\n", + "R1 = (Vin*R2-Vo*R2)/Vo;\t\t\t\t#ohm\n", + "\n", + "# Results\n", + "print \"Resistance of R1(ohm) : %.2f\"%R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of R1(ohm) : 200.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V\n", + "R1 = 22.;\t\t\t\t#ohm\n", + "R2 = 44.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "I1 = V/R1;\t\t\t\t#A\n", + "I2 = V/R2;\t\t\t\t#A\n", + "I = I1+I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current(A) : 7.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 12.;\t\t\t\t#V\n", + "R1 = 6.8;\t\t\t\t#ohm\n", + "R2 = 4.7;\t\t\t\t#ohm\n", + "R3 = 2.2;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = 1./(1/R1+1/R2+1/R3);\t\t\t\t#ohm(Effective Resistance)\n", + "I = V/R;\t\t\t\t#A(Supply current)\n", + "\n", + "# Results\n", + "print \"Effective Resistance(ohm) : %.2f\"%R\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Resistance(ohm) : 1.23\n", + "Supply current(A) : 9.77\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 8.;\t\t\t\t#A\n", + "R2 = 2.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "# Part (a) \n", + "R1 = 2.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(a) Current in 2 ohm Resistance(A) : %.2f\"%I2\n", + "\n", + "# Part (b) \n", + "R1 = 4.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(b) Current in 2 ohm Resistance(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current in 2 ohm Resistance(A) : 4.00\n", + "(b) Current in 2 ohm Resistance(A) : 5.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I2 = -4;\t\t\t\t#A\n", + "I4 = 2;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2+I3-I4 = 0\t\t\t\t#from KCL\n", + "I3 = -I1+I2+I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -5.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "G1 = 20.;\t\t\t\t#dB\n", + "G2 = 30.;\t\t\t\t#dB\n", + "G3 = 40.;\t\t\t\t#dB\n", + "\n", + "# Calculations and Results\n", + "Ap1 = 10**(G1/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 20 dB : %.2f\"%Ap1\n", + "Av1 = 10**(G1/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 20 dB : %.2f\"%Av1\n", + "Ap2 = 10**(G2/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 30 dB : %.2f\"%Ap2\n", + "Av2 = 10**(G2/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 30 dB : %.2f\"%Av2\n", + "Ap3 = 10**(G3/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 40 dB : %.2f\"%Ap3\n", + "Av3 = 10**(G3/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 40 dB : %.2f\"%Av3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for 20 dB : 100.00\n", + "Voltage gain for 20 dB : 10.00\n", + "Power gain for 30 dB : 1000.00\n", + "Voltage gain for 30 dB : 31.62\n", + "Power gain for 40 dB : 10000.00\n", + "Voltage gain for 40 dB : 100.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 2.5;\t\t\t\t#A\n", + "I2 = -1.5;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1+I2+I3 = 0\t\t\t\t#from KCL\n", + "I3 = -I1-I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -1.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I3 = 1;\t\t\t\t#A\n", + "I6 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2-I3 = 0\t\t\t\t#from KCL at point a\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "#I2+I4-I6 = 0\t\t\t\t#from KCL at point b\n", + "I4 = I6-I2;\t\t\t\t#A\n", + "#I3-I4-I5 = 0\t\t\t\t#from KCL at point c\n", + "I5 = I3-I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I2(A) : %.2f\"%I2\n", + "print \"Current I4(A) : %.2f\"%I4\n", + "print \"Current I5(A) : %.2f\"%I5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I2(A) : 2.00\n", + "Current I4(A) : -1.00\n", + "Current I5(A) : 2.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 30;\t\t\t\t#ohm\n", + "R2 = 60.;\t\t\t\t#ohm\n", + "R3 = 30;\t\t\t\t#ohm\n", + "I3 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "I1 = I3*(R2+R3)/R2;\t\t\t\t#A\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I1(A) : %.2f\"%I1\n", + "print \"Current I2(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1(A) : 1.50\n", + "Current I2(A) : 0.50\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E = 12;\t\t\t\t#V\n", + "V2 = 8;\t\t\t\t#V\n", + "V4 = 2;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "V1 = E-V2;\t\t\t\t#V\n", + "#-V2+V3+V4 = 0;\t\t\t\t#for Loop B\n", + "V3 = V2-V4;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage V3(V) : %.2f\"%V3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage V3(V) : 6.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 20.;\t\t\t\t#V\n", + "R1 = 25;\t\t\t\t#ohm\n", + "R2 = 40;\t\t\t\t#ohm\n", + "R3 = 15;\t\t\t\t#ohm\n", + "R4 = 10;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "VAC = R3*V/(R1+R3);\t\t\t\t#V\n", + "VBC = R4*V/(R2+R4);\t\t\t\t#V\n", + "#0 = VAB+VBC-VAC;\t\t\t\t#/from KVL\n", + "VAB = -VBC+VAC;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage VAB(V) : %.2f\"%VAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage VAB(V) : 3.50\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 1.20\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E1 = 10;\t\t\t\t#V\n", + "V2 = 6;\t\t\t\t#V\n", + "V3 = 8;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "#E1 = V1+V2;\t\t\t\t#KCL for left loop\n", + "V1 = E1-V2;\t\t\t\t#V\n", + "#-E2 = -V2-V3;\t\t\t\t#KCL for right loop\n", + "E2 = V2+V3;\t\t\t\t#Vc\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage E2(V) : %.2f\"%E2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage E2(V) : 14.00\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..cc87af53 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch2.ipynb @@ -0,0 +1,423 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f4786a8d4e332e45b481f4722e7d95d95012b5494845f02e4ba9a36e05b3e337" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Magnetic Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 2.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "N = 200.;\t\t\t\t#turns\n", + "c = 600.;\t\t\t\t#mm(circumference)\n", + "A = 500.;\t\t\t\t#m**2(Cross section area)\n", + "I = 4.;\t\t\t\t#A(Current through coil)\n", + "\n", + "# Calculations and Results\n", + "H = I*N/(c*10**-3);\t\t\t\t#A/m(Magnetic field strength)\n", + "print \"(a) Magnetic field strength(A/m) : %.2f\"%H\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "FD = mu0*H*10**6;\t\t\t\t#micro T(Flux density)\n", + "print \"(b) Flux density(micro T) : %.2f\"%FD\n", + "Ft = FD*A*10**-6;\t\t\t\t#micro Wb(Total flux)\n", + "print \"(c) Total flux(micro Wb) : %.2f\"%Ft\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Magnetic field strength(A/m) : 1333.33\n", + "(b) Flux density(micro T) : 1675.52\n", + "(c) Total flux(micro Wb) : 0.84\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "fi = 0.015;\t\t\t\t#Wb(flux)\n", + "ag = 2.5;\t\t\t\t#mm(airgap)\n", + "Ae = 200;\t\t\t\t#cm**2(Effective area)\n", + "\n", + "# Calculations\n", + "FD = fi/(Ae*10**-4);\t\t\t\t#T(Flux density)\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "H = FD/mu0;\t\t\t\t#A/m(Magnetic field strength)\n", + "mmf = H*ag*10**-3;\t\t\t\t#A(magnetomotive force required)\n", + "\n", + "# Results\n", + "print \"Magnetomotive force required(A) : %.2f\"%mmf\n", + "\n", + "#Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetomotive force required(A) : 1492.08\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 2.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "A = 500.;\t\t\t\t#mm**2(Cross sectional area)\n", + "c = 400.;\t\t\t\t#mm(circumference)\n", + "N = 200.;\t\t\t\t#turns\n", + "fi = 800.;\t\t\t\t#micro Wb(flux)\n", + "\n", + "# Calculations and Results\n", + "B = fi*10**-6/(A*10**-6);\t\t\t\t#T(Flux density)\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "mur = 380.;\t\t\t\t#relative permeability\n", + "S = (c/1000)/(mur*mu0*A*10**-6);\t\t\t\t#A/Wb(Relucmath.tance)\n", + "print \"(a) Relucmath.tance of the ring(A/Wb) :%.2e\"%S\n", + "mmf = fi*10**-6*S;\t\t\t\t#A\n", + "Im = mmf/N;\t\t\t\t#A(Magnetizing current)\n", + "\n", + "print \"(b) Required magnetizing current(A) :%.2f\"%Im\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Relucmath.tance of the ring(A/Wb) :1.68e+06\n", + "(b) Required magnetizing current(A) :6.70\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 2.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "la = 80.;\t\t\t\t#mm\n", + "Aa = 50.;\t\t\t\t#mm**2(Cross sectional area)\n", + "lb = 60.;\t\t\t\t#mm\n", + "Ab = 90.;\t\t\t\t#mm**2(Cross sectional area)\n", + "lc = 0.5;\t\t\t\t#mm(airgap)\n", + "Ac = 150.;\t\t\t\t#mm**2(Cross sectional area)\n", + "N = 4000.;\t\t\t\t#turns\n", + "Bc = 0.30;\t\t\t\t#T(Flux density in airgap)\n", + "\n", + "# Calculations\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "mur = 1300;\t\t\t\t#relative permeability\n", + "fi = Bc*Ac*10**-6;\t\t\t\t#Wb(flux)\n", + "Fa = fi*la*10**-3/(mu0*mur*Aa*10**-6);\t\t\t\t#At\n", + "Fb = fi*lb*10**-3/(mu0*mur*Ab*10**-6);\t\t\t\t#At\n", + "Fc = fi*lc*10**-3/(mu0*1*Ac*10**-6);\t\t\t\t#At\n", + "F = Fa+Fb+Fc;\t\t\t\t#At\n", + "I = F/N*1000;\t\t\t\t#mA\n", + "\n", + "# Results\n", + "print \"Coil current(mA) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coil current(mA) : 45.45\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 2.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "L = 0.5;\t\t\t\t#H\n", + "deltaI = 2-5;\t\t\t\t#A\n", + "deltaT = 0.05;\t\t\t\t#sec\n", + "\n", + "# Calculations\n", + "dIBYdT = deltaI/deltaT;\t\t\t\t#A/s\n", + "emf = L*dIBYdT;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"emf induced(V) : %.2f\"%emf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "emf induced(V) : -30.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 2.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 300;\t\t\t\t#turns\n", + "L = 10.;\t\t\t\t#mH\n", + "I = 5;\t\t\t\t#A\n", + "\n", + "# Calculations and Results\n", + "fi = L*10**-3/N*I*10**6;\t\t\t\t#micro Wb\n", + "print \"(a) Flux produced(micro Wb) : %.f\"%fi\n", + "#on reverse the current\n", + "delta_fi = 2*fi;\t\t\t\t#micro Wb\n", + "#(as it goes to zero and increase to same value in reverse direction)\n", + "deltaT = 8*10**-3;\t\t\t\t#seconds\n", + "dfiBYdT = delta_fi*10**-6/deltaT;\t\t\t\t#Wb/s\n", + "emf = N*dfiBYdT;\t\t\t\t#V(Average emf induced)\n", + "print \"(b) Average emf induced(V) : %.2f\"%emf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Flux produced(micro Wb) : 167\n", + "(b) Average emf induced(V) : 12.50\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 2.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "c = 400.;\t\t\t\t#mm(circumference)\n", + "A = 500.;\t\t\t\t#mm**2(Cross sectional area)\n", + "N = 200.;\t\t\t\t#turns\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "I = 2;\t\t\t\t#A\n", + "H = N*I/(c*10**-3);\t\t\t\t#A/m\n", + "B = 1.13;\t\t\t\t#T(Corresponding Flux density)\n", + "fi = B*A*10**-6;\t\t\t\t#Wb(total flux)\n", + "L = N*fi/I*1000;\t\t\t\t#mH\n", + "print \"(a) Inductance of coil(mH) : %.2f\"%L\n", + "\n", + "#Part (a)\n", + "I = 10;\t\t\t\t#A\n", + "H = N*I/(c*10**-3);\t\t\t\t#A/m\n", + "B = 1.63;\t\t\t\t#T(Corresponding Flux density)\n", + "fi = B*A*10**-6;\t\t\t\t#Wb(total flux)\n", + "L = N*fi/I*1000;\t\t\t\t#mH\n", + "print \"(b) Inductance of coil(mH) : %.2f\"%L \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Inductance of coil(mH) : 56.50\n", + "(b) Inductance of coil(mH) : 16.30\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 2.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "c = 400;\t\t\t\t#mm(circumference)\n", + "A = 500;\t\t\t\t#mm**2(Cross sectional area)\n", + "N = 200;\t\t\t\t#turns\n", + "\n", + "# Calculations\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "L = mu0*A*10**-6*(N**2)/(c*10**-3)*10**6;\t\t\t\t#micro H\n", + "\n", + "# Results\n", + "print \"Inductance(micro H) : %.2f\"%L\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance(micro H) : 62.83\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 2.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "A = 800;\t\t\t\t#mm**2(Cross sectional area)\n", + "r = 170;\t\t\t\t#mm(radius)\n", + "N1 = 500;\t\t\t\t#turns\n", + "N2 = 700;\t\t\t\t#turns\n", + "mur = 1200;\t\t\t\t#relative permeability\n", + "\n", + "# Calculations and Results\n", + "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n", + "S = 2*math.pi*r*10**-3/(mu0*mur*A*10**-6);\t\t\t\t#H\n", + "L1 = N1**2/S;\t\t\t\t#H\n", + "print \"Self Inductance of coil 1(H) : %.2f\"%L1\n", + "\n", + "L2 = N2**2/S;\t\t\t\t#H\n", + "print \"Self Inductance of coil 2(H) : %.2f\"%L2\n", + "\n", + "k = 1;\t\t\t\t#constant\n", + "M = k*math.sqrt(L1*L2);\t\t\t\t#H\n", + "print \"Mutual Inductance(H) : %.2f\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Self Inductance of coil 1(H) : 0.28\n", + "Self Inductance of coil 2(H) : 0.55\n", + "Mutual Inductance(H) : 0.40\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f53c701f --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch3.ipynb @@ -0,0 +1,651 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5832974f6596b2ec48130c7a269a7244dd2c7926d7d3ec08f6fd040b8078eb6e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Single Phase AC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 3.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 100.;\t\t\t\t#turns\n", + "R = 1500.;\t\t\t\t#rpm(Rotation)\n", + "B = 0.05;\t\t\t\t#T(Magnetic field)\n", + "A = 40.;\t\t\t\t#cm**2(Cross sectional area)\n", + "\n", + "# Calculations and Results\n", + "f = R/60;\t\t\t\t#Hz\n", + "theta = 30.;\t\t\t\t#degree\n", + "print \"(a) Frequency(Hz) : %.2f\"%f\n", + "\n", + "Period = 1/f;\t\t\t\t#seconds\n", + "print \"(b) Period(seconds) : %.2f\"%Period\n", + "\n", + "Em = 2*math.pi*B*(A/10**4)*N*f;\t\t\t\t#V\n", + "print \"(c) Maximum value of gnerated emf(V) : %.2f\"%Em\n", + "\n", + "e = math.pi*math.sin(math.radians(theta));\t\t\t\t#V\n", + "print \"(d) Gnerated emf after rotation(V) : %.2f\"%e\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Frequency(Hz) : 25.00\n", + "(b) Period(seconds) : 0.04\n", + "(c) Maximum value of gnerated emf(V) : 3.14\n", + "(d) Gnerated emf after rotation(V) : 1.57\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Irms = 10;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "Im = Irms*math.sqrt(2);\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Peak values of current(A) are :%.2f and %.2f\"%(+Im,-Im)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak values of current(A) are :14.14 and -14.14\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#v = 141.4*math.sin(377*t)\n", + "Vm = 141.4;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "V = Vm/math.sqrt(2);\t\t\t\t#V(rms voltage)\n", + "print \"(a) r.m.s. Voltage(V) : %.f\"%V\n", + "\n", + "omega = 377.;\t\t\t\t#rad/s\n", + "f = omega/2/math.pi;\t\t\t\t#Hz\n", + "print \"(b) Frequency(Hz) : %.2f\"%f\n", + "\n", + "t = 3*10**-3;\t\t\t\t#seconds\n", + "v = 141.4*math.sin(377*t);\t\t\t\t#V\n", + "print \"(c) Instantaneous Voltage(V) : %.2f\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) r.m.s. Voltage(V) : 100\n", + "(b) Frequency(Hz) : 60.00\n", + "(c) Instantaneous Voltage(V) : 127.94\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V(Supply voltage)\n", + "R = 50.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "Vm = V*math.sqrt(2);\t\t\t\t#V(maximum voltage)\n", + "Im = Vm/R;\t\t\t\t#A(maximum current)\n", + "Iav1 = 0.637*Im;\t\t\t\t#A(average current Over +ve half cycle)\n", + "Iav2 = 0;\t\t\t\t#(average current Over -ve half cycle)\n", + "Iav = (Iav1+Iav2)/2;\t\t\t\t#A(average current Over whole cycle)\n", + "print \"(a) Reading on moving coil ammeter(A) : %.2f\"%Iav\n", + "\n", + "#For thermal ammeter : I**2*R = 1/4*Im**2*R(thermal effect for complete cycle)\n", + "I = math.sqrt(1./4*Im**2);\t\t\t\t#A(reading on thermal ammeter)\n", + "print \"(a) Reading on thermal ammeter(A) : %.2f\"%I\n", + "\n", + "kf = I/Iav;\t\t\t\t#form factor\n", + "kp = Im/I;\t\t\t\t#peak factor\n", + "print \"(b) Form factor & peak factor are : %.2f and %.2f\"%(kf,kp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Reading on moving coil ammeter(A) : 0.99\n", + "(a) Reading on thermal ammeter(A) : 1.56\n", + "(b) Form factor & peak factor are : 1.57 and 2.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 3.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "V = 100.;\t\t\t\t#V\n", + "R = 7.;\t\t\t\t#ohm\n", + "L = 31.8;\t\t\t\t#mH\n", + "f = 50.;\t\t\t\t#/Hz\n", + "XL = 2*math.pi*f*L/1000;\t\t\t\t#ohm\n", + "Z = math.sqrt(R**2+XL**2);\t\t\t\t#ohm\n", + "I = V/Z;\t\t\t\t#A(circuit current)\n", + "print \"(a) Circuit current(A) %.1f\"%I\n", + "\n", + "fi = math.degrees(math.atan(XL/R));\t\t\t\t#degree(lag)\n", + "print \"(b) Phase angle(lag) in degree : %.f\"%fi \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Circuit current(A) 8.2\n", + "(b) Phase angle(lag) in degree : 55\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 3.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L = 318.;\t\t\t\t#mH\n", + "R = 75.;\t\t\t\t#ohm\n", + "VR = 150.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#/Hz\n", + "\n", + "# Calculations\n", + "I = VR/R;\t\t\t\t#A\n", + "XL = 2*math.pi*f*L/1000;\t\t\t\t#ohm\n", + "VL = I*XL;\t\t\t\t#V\n", + "V = math.sqrt(VR**2+VL**2);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Supply Voltage(V) : %.f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply Voltage(V) : 250\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 3.21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "ZLr = 50.;\t\t\t\t#ohm\n", + "fiLr = 45.;\t\t\t\t#degree(lag)(between current & Voltage)\n", + "R = 40.;\t\t\t\t#ohm\n", + "I = 3.;\t\t\t\t#A(Circuit current)\n", + "\n", + "# Calculations and Results\n", + "VR = I*R;\t\t\t\t#V\n", + "VLr = I*ZLr;\t\t\t\t#V\n", + "V = math.sqrt(VR**2+VLr**2+2*VR*VLr*math.cos(math.radians(fiLr)));\t\t\t\t#V\n", + "print \"Supply voltage(V) : %.f\"%V\n", + "print math.cos(math.radians(fiLr))\n", + "fi = math.degrees(math.acos((VR+VLr*math.cos(math.radians(fiLr)))/V));\t\t\t\t#degree\n", + "print \"Circuit phase angle(lag in degree) : %.f\"%fi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply voltage(V) : 250\n", + "0.707106781187\n", + "Circuit phase angle(lag in degree) : 25\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 3.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "C = 30.;\t\t\t\t#micro F\n", + "V = 400.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t\t#ohm\n", + "print \"(a) Reacmath.tance of capacitor(ohm) : %.2f\"%Xc\n", + "\n", + "I = V/Xc;\t\t\t\t#A\n", + "print \"(b) Current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Reacmath.tance of capacitor(ohm) : 106.10\n", + "(b) Current(A) : 3.77\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 3.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 12.;\t\t\t\t#ohm(Coil Resistance)\n", + "L = 0.1;\t\t\t\t#H(Coil Inductance)\n", + "V = 100.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "XL = 2*math.pi*f*L;\t\t\t\t#ohm\n", + "Z = math.sqrt(R**2+XL**2);\t\t\t\t#ohm\n", + "print \"(a) Reactance(ohm) & impedence(ohm) of the coil are : %.2f and %.2f\"%(XL,Z)\n", + "\n", + "I = V/Z;\t\t\t\t#A\n", + "print \"(b) Current(A) : %.2f\"%I\n", + "\n", + "fi = math.degrees(math.atan(XL/R));\t\t\t\t#degree\n", + "print \"Phase difference(degree) : %.f\"%fi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Reactance(ohm) & impedence(ohm) of the coil are : 31.42 and 33.63\n", + "(b) Current(A) : 2.97\n", + "Phase difference(degree) : 69\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pr = 750.;\t\t\t\t#W(rated)\n", + "Vr = 100.;\t\t\t\t#V(rated)\n", + "V = 230.;\t\t\t\t#V(Supply voltage)\n", + "f = 60.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "VC = math.sqrt(V**2-Vr**2);\t\t\t\t#V(Voltage across capacitor)\n", + "Ir = Pr/Vr;\t\t\t\t#A(Rated current)\n", + "C = Ir/(2*math.pi*f*VC)*10**6;\t\t\t\t#micro F\n", + "print \"(a) Capacimath.tance required(micro F) : %.2f\"%C\n", + "\n", + "fi = math.acos(math.radians(Vr/V));\t\t\t\t#degree\n", + "print \"(b) Phase angle(degree) : %.2f\"%fi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Capacimath.tance required(micro F) : 96.05\n", + "(b) Phase angle(degree) : 1.56\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 12.;\t\t\t\t#ohm\n", + "L = 0.15;\t\t\t\t#H\n", + "C = 100.;\t\t\t\t#micro F\n", + "V = 100.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "XL = 2*math.pi*f*L;\t\t\t\t#ohm\n", + "XC = 1/(2*math.pi*f*C*10**-6);\t\t\t\t#ohm\n", + "Z = math.sqrt(R**2+(XL-XC)**2);\t\t\t\t#ohm\n", + "print \"(a) Impedence(ohm) : %.2f\"%Z\n", + "\n", + "I = V/Z;\t\t\t\t#A\n", + "print \"(b) Current(A) : %.2f\"%I\n", + "\n", + "VR = R*I;\t\t\t\t#V\n", + "VL = XL*I;\t\t\t\t#V\n", + "VC = XC*I;\t\t\t\t#V\n", + "print \"(b) Voltge(V) across R, L & C : %.2f , %.2f and %.2f\"%(VR,VL,VC)\n", + "\n", + "fi = math.degrees(math.acos(VR/V));\t\t\t\t#degree\n", + "print \"(c) Phase difference(degree): %.2f\"%fi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Impedence(ohm) : 19.44\n", + "(b) Current(A) : 5.14\n", + "(b) Voltge(V) across R, L & C : 61.73 , 242.42 and 163.75\n", + "(c) Phase difference(degree): 51.88\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 3.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 6.;\t\t\t\t#ohm\n", + "L = 0.03;\t\t\t\t#H\n", + "V = 50.;\t\t\t\t#V\n", + "f = 60.;\t\t\t\t#Hz\n", + "\n", + "# Calculations and Results\n", + "XL = 2*math.pi*f*L;\t\t\t\t#ohm\n", + "Z = math.sqrt(R**2+XL**2);\t\t\t\t#ohm\n", + "I = V/Z;\t\t\t\t#A\n", + "print \"(a) Current(A) : %.2f\"%I\n", + "\n", + "fi = math.degrees(math.atan(XL/R));\t\t\t\t#degree\n", + "print \"(b) Phase angle(degree) : %.2f\"%fi\n", + "\n", + "S = V*I;\t\t\t\t#VA(Apparent power)\n", + "print \"(c) Apparent power(VA) : %.2f\"%S\n", + "\n", + "P = S*math.cos(math.radians(fi));\t\t\t\t#W\n", + "print \"(d) Active power(W) : %.f\"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current(A) : 3.91\n", + "(b) Phase angle(degree) : 62.05\n", + "(c) Apparent power(VA) : 195.27\n", + "(d) Active power(W) : 92\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 3.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "R = 30.;\t\t\t\t#ohm\n", + "V = 230.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#Hz\n", + "VR = 130.;\t\t\t\t#V\n", + "VLr = 180.;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "fiLr = math.degrees(math.acos((V**2-VR**2-VLr**2)/(2*VR*VLr)));\t\t\t\t#degree(lag)\n", + "I = VR/R;\t\t\t\t#A\n", + "Pr = VLr*I*math.cos(math.radians(fiLr));\t\t\t\t#W\n", + "\n", + "# Results\n", + "print \"Power dissipated in the coil(W) : %.2f\"%Pr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipated in the coil(W) : 60.00\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 3.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 230.;\t\t\t\t#V\n", + "f = 50.;\t\t\t\t#Hz\n", + "I = 5.;\t\t\t\t#A\n", + "P = 750.;\t\t\t\t#W\n", + "\n", + "# Calculations and Results\n", + "Z = V/I;\t\t\t\t#ohm\n", + "R = P/I**2;\t\t\t\t#ohm(Resistance)\n", + "XL = math.sqrt(Z**2-R**2);\t\t\t\t#ohm(reacmath.tance)\n", + "L = XL/2/math.pi/f;\t\t\t\t#H(Inductance)\n", + "print \"(a) Resistance(ohm) : %.2f\"%R\n", + "print \"(a) Inductance(mH) : %.2f\"%(L*1000)\n", + "\n", + "pf = P/(V*I);\t\t\t\t#power factor(lag)\n", + "print \"(b) Power factor(lag) : %.2f \"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Resistance(ohm) : 30.00\n", + "(a) Inductance(mH) : 111.00\n", + "(b) Power factor(lag) : 0.65 \n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3176c0e5 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch5.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9430cdf3ccbe0455a5081c4e47c887588ff78214ec8703c5bcd6324cca5d35d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Single Phase Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "kVA = 250.;\t\t\t\t#kVA\n", + "V1 = 11000.;\t\t\t\t#V(Primary voltage)\n", + "V2 = 400.;\t\t\t\t#V(secondary voltage)\n", + "f = 50.;\t\t\t\t#Hz\n", + "N2 = 80.;\t\t\t\t#no. of turns in secondary\n", + "\n", + "# Calculations and Results\n", + "Ifl1 = kVA*1000/V1;\t\t\t\t#A(Full load primay current)\n", + "Ifl2 = kVA*1000/V2;\t\t\t\t#A(Full load secondary current)\n", + "print (\"Part(a)\");\n", + "print \"Full load primary current(A) %.2f\"%Ifl1\n", + "print \"Full load secondary current(A) : %.2f\"%Ifl2\n", + "\n", + "print (\"Part(b)\");\n", + "N1 = N2*V1/V2;\t\t\t\t#no. of turns in secondary\n", + "print \"No. of turns in primary : %.2f\"%N1\n", + "print (\"Part(c)\");\n", + "fi_m = V2/(4.44*N2*f);\t\t\t\t#Wb\n", + "print \"Maximum value of flux(mWb) : %2.f\"%(fi_m*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Full load primary current(A) 22.73\n", + "Full load secondary current(A) : 625.00\n", + "Part(b)\n", + "No. of turns in primary : 2200.00\n", + "Part(c)\n", + "Maximum value of flux(mWb) : 23\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N1 = 480;\t\t\t\t#no. of turns in primary\n", + "N2 = 90;\t\t\t\t#no. of turns in secondary\n", + "lfp = 1.8;\t\t\t\t#m(length of flux path)\n", + "ag = 0.1;\t\t\t\t#mm(airgap)\n", + "Flux = 1.1;\t\t\t\t#T(flux density)\n", + "MF = 400;\t\t\t\t#A/m(Magnetic flux)\n", + "c_loss = 1.7;\t\t\t\t#W/kg\n", + "f = 50;\t\t\t\t#Hz\n", + "d = 7800;\t\t\t\t#kg/m**3(density of core)\n", + "V = 2200;\t\t\t\t#V(potential difference)\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "fi_m = V/(4.44*N1*f);\t\t\t\t#Wb\n", + "A = fi_m/Flux;\t\t\t\t#m**2(Cross sectional area)\n", + "print \"(a) Cross sectional area(m**2) : %.2f\"%A\n", + "#Part (b)\n", + "Vnl2 = V*N2/N1;\t\t\t\t#V(2ndary voltage on no load)\n", + "print \"(b) 2ndary voltage on no load(V) : %.f\"%Vnl2\n", + "\n", + "#Part (c)\n", + "Fm1 = MF*lfp;\t\t\t\t#A(Magnetootive force for the core)\n", + "Fm2 = Flux/(4*math.pi*10**-7)*ag*10**-3;\t\t\t\t#A(Magnetootive force for airgap)\n", + "Fm = Fm1+Fm2;\t\t\t\t#A(Total magnetomotive force)\n", + "Imax = Fm/N1;\t\t\t\t#A(maximum value of magnetizing current)\n", + "Iom = Imax/math.sqrt(2);\t\t\t\t#A(rms current)\n", + "v = lfp*A;\t\t\t\t#m**3(Volume of core)\n", + "m = v*d;\t\t\t\t#kg(Mass of core)\n", + "coreLoss = c_loss*m;\t\t\t\t#W(Core Loss)\n", + "Io1 = coreLoss/V;\t\t\t\t#A(Core loss component of curent)\n", + "Io = math.sqrt(Iom**2+Io1**2);\t\t\t\t#A(no load current)\n", + "print \"(c) Primary current on no load(A) : %.2f\"%Io\n", + "\n", + "pf = Io1/Io;\t\t\t\t#lagging pf on no load\n", + "print \"(c) Power factor(lagging) on no load : %.2f\"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Cross sectional area(m**2) : 0.02\n", + "(b) 2ndary voltage on no load(V) : 412\n", + "(c) Primary current on no load(A) : 1.21\n", + "(c) Power factor(lagging) on no load : 0.17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N1 = 1000;\t\t\t\t#no. of turns in primary\n", + "N2 = 200;\t\t\t\t#no. of turns in secondary\n", + "I0 = 3;\t\t\t\t#A\n", + "pf0 = 0.2;\t\t\t\t#lagging power factor\n", + "I2 = 280;\t\t\t\t#A(2ndary current)\n", + "pf2 = 0.8;\t\t\t\t#lagging power factor\n", + "\n", + "# Calculations and Results\n", + "I2dash = I2*N2/N1;\t\t\t\t#A\n", + "cosfi0 = pf0;cosfi2 = pf2;sinfi0 = math.sqrt(1-cosfi0**2);sinfi2 = math.sqrt(1-cosfi2**2);\n", + "I1_cosfi1 = I2dash*cosfi2+I0*cosfi0;\t\t\t\t#A\n", + "I1_sinfi1 = I2dash*sinfi2+I0*sinfi0;\t\t\t\t#A\n", + "I1 = math.sqrt(I1_cosfi1**2+I1_sinfi1**2);\t\t\t\t#A\n", + "print \"Primary current(A) : %.1f\"%I1\n", + "\n", + "fi1 = math.degrees(math.atan(I1_sinfi1/I1_cosfi1));\t\t\t\t#degree\n", + "pf1 = math.cos(math.radians(fi1));\t\t\t\t#lagging\n", + "print \"Primary power factor(lagging) : %.2f\"%pf1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current(A) : 58.3\n", + "Primary power factor(lagging) : 0.78\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..af4c67a6 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch6.ipynb @@ -0,0 +1,320 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b09b7fb5366e8af61b1c0396c23ff3a998c9bd372716836d0d1fda9706db6296" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 6.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "S = 51;\t\t\t\t#no. of slots\n", + "C = 12;\t\t\t\t#conductors per slot\n", + "N = 900;\t\t\t\t#rpm(speed)\n", + "fi = 25./1000;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "Z = S*C;\t\t\t\t#total no. of conductors\n", + "E = 2*Z/c*N*p/60*fi;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Generated emf(V): %.2f\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated emf(V): 459.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 6.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 8.;\t\t\t\t#no. of poles\n", + "c = 8.;\t\t\t\t#no. of parallel paths\n", + "p = 8./2;\t\t\t\t#no. of pair of poles\n", + "E = 260.;\t\t\t\t#V(generated emf)\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "S = 120;\t\t\t\t#no. of slots\n", + "N = 350;\t\t\t\t#rpm(speed)\n", + "\n", + "# Calculations\n", + "Z = E/(2./c*N*p/60*fi);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"No. of conductors per slot\",int(Z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of conductors per slot 891\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 6.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 0.1;\t\t\t\t#ohm(Armature Resistance)\n", + "Vs = 250;\t\t\t\t#V(supply voltage)\n", + "\n", + "# Calculations and Results\n", + "#part(a)\n", + "I = 80;\t\t\t\t#A\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs+Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(a) Generated emf(V) : %.2f\"%emf\n", + "\n", + "#part(b)\n", + "I = 60;\t\t\t\t#A(current taken by Motor)\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs-Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(b) Generated emf(V) : %.2f\"%emf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) Generated emf(V) : 258.00\n", + "Part(b) Generated emf(V) : 244.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "Vs = 440;\t\t\t\t#V\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "Ia = 50;\t\t\t\t#A\n", + "Ra = 0.28;\t\t\t\t#ohm\n", + "Z = 888;\t\t\t\t#conductors\n", + "fi = 0.023;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 626.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 900;\t\t\t\t#rpm\n", + "Vs = 460.;\t\t\t\t#V\n", + "Vs_new = 200;\t\t\t\t#V\n", + "fi_ratio = 0.7;\t\t\t\t#ratio of new flux to original flux\n", + "\n", + "# Calculations\n", + "kfi = Vs/N;\t\t\t\t#for original flux\n", + "Nnew = Vs_new/kfi/fi_ratio;\t\t\t\t#rpm(new speed)\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(Nnew)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 559.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 6.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ia = 110;\t\t\t\t#A\n", + "Vs = 480;\t\t\t\t#V\n", + "Ra = 0.2;\t\t\t\t#ohm\n", + "P = 6.;\t\t\t\t#no. of poles\n", + "c = 6.;\t\t\t\t#no. of parallel paths\n", + "p = P/2;\t\t\t\t#no. of pair of poles\n", + "Z = 864;\t\t\t\t#no. of conductors\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "\n", + "# Calculations and Results\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "print \"(a) Speed in rpm\",round(N)\n", + "\n", + "Pm = Ia*emf;\t\t\t\t#W(Mechanical power developed)\n", + "M = Pm/(N/60)/(2*math.pi);\t\t\t\t#Nm(Torque)\n", + "print \"(b) Gross torque developed(Nm) : %.f\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Speed in rpm 636.0\n", + "(b) Gross torque developed(Nm) : 756\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 6.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 15;\t\t\t\t#rps\n", + "M = 2*1000;\t\t\t\t#Nm(Torque required)\n", + "Loss = 8*1000;\t\t\t\t#W\n", + "\n", + "# Calculations\n", + "P = 2*math.pi*M*N;\t\t\t\t#W(Power required)\n", + "Pa = P-Loss;\t\t\t\t#W(Power generated in armature)\n", + "\n", + "# Results\n", + "print \"Power generated in armature(kW) : %.2f\"%(Pa/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power generated in armature(kW) : 180.50\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..fefbf834 --- /dev/null +++ b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/ch7.ipynb @@ -0,0 +1,134 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b878fc066fefa58833a7b2835f2e845d255863cbc07b67c34a50477d1af138d4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Induction Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4.;\t\t\t\t#no. of poles\n", + "f = 50;\t\t\t\t#Hz\n", + "S = 4./100;\t\t\t\t#slip\n", + "N = 600;\t\t\t\t#rpm\n", + "p = P/2;\t\t\t\t#pair of poles\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Ns = 60*f/p;\t\t\t\t#rpm(Synchronous speed)\n", + "print \"(a) Synchronous speed(rpm) : %.2f\"%Ns\n", + "\n", + "#(b)\n", + "Nr = Ns-S*Ns;\t\t\t\t#rpm(Rotor speed)\n", + "print \"(b) Rotor speed(rpm) : %.2f\"%Nr\n", + "\n", + "#(c)\n", + "Sdash = (Ns-N)/Ns;\t\t\t\t#per unot slip\n", + "fr = f*Sdash;\t\t\t\t#Hz(Rotor frequency)\n", + "print \"Rotor frequency(Hz) : %.2f\"%fr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Synchronous speed(rpm) : 1500.00\n", + "(b) Rotor speed(rpm) : 1440.00\n", + "Rotor frequency(Hz) : 30.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Zs = 240.;\t\t\t\t#no. of conductors in stator winding\n", + "Zr = 48.;\t\t\t\t#no. of conductors in rotor winding\n", + "Rr = 0.013;\t\t\t\t#ohm/phase(ressmath.tance rotor windig)\n", + "XL = 0.048;\t\t\t\t#ohm/phase(leakega reacmath.tance)\n", + "Vs = 400.;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Eo = Vs*Zr/Zs;\t\t\t\t#V(rotor emf)\n", + "print \"(a) Rotor emf(V) : %.2f\"%Eo\n", + "\n", + "#(b)\n", + "S = 4./100;\t\t\t\t#slip\n", + "Eo = Eo*S;\t\t\t\t#V(rotor emf for 4% slip)\n", + "print \"(b) Rotor emf at 4%% slip(V) : %.2f\"%Eo\n", + "\n", + "Z = math.sqrt(Rr**2+(S*XL)**2);\t\t\t\t#ohm/phase(rotor impedence at 4% slip)\n", + "Ir = Eo/Z;\t\t\t\t#A(Rotor curren at 4% slip)\n", + "print \"(b) Rotor curren at 4%% slip(A) : %.2f\"%Ir\n", + "\n", + "#(c)\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 4%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "S = 100./100;\t\t\t\t#100% slip\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 100%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Rotor emf(V) : 80.00\n", + "(b) Rotor emf at 4% slip(V) : 3.20\n", + "(b) Rotor curren at 4% slip(A) : 243.51\n", + "(c) Phase difference at 4% slip(degree) : 8.40\n", + "(c) Phase difference at 100% slip(degree) : 74.85\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b15c34f5 Binary files /dev/null and b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/amptitudesvsoutputfreqB4.png differ 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 new file mode 100644 index 00000000..fa94c1fa Binary files /dev/null and b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch1.png differ 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 new file mode 100644 index 00000000..3d4ea867 Binary files /dev/null and b/Basics_of_Electrical,_Electronics_and_Communication_Engineering_by_N._Storey,_E._Hughes_and_W._Tomasi/screenshots/ch6.png differ diff --git a/C++_By_Example/README.txt b/C++_By_Example/README.txt new file mode 100755 index 00000000..693cb367 --- /dev/null +++ b/C++_By_Example/README.txt @@ -0,0 +1,10 @@ +Contributed By: praveen kumar +Course: be +College/Institute/Organization: Sona College of Technology +Department/Designation: Computer Science and Engineering +Book Title: C++ By Example +Author: Greg M. Perry +Publisher: Que, 1992 +Year of publication: 1992 +Isbn: 1565290380 +Edition: First \ No newline at end of file diff --git a/C++_By_Example/screenshots/Arrays_2.png b/C++_By_Example/screenshots/Arrays_2.png new file mode 100755 index 00000000..007cedf4 Binary files /dev/null and b/C++_By_Example/screenshots/Arrays_2.png differ diff --git a/C++_By_Example/screenshots/class_2.png b/C++_By_Example/screenshots/class_2.png new file mode 100755 index 00000000..651cb5fc Binary files /dev/null and b/C++_By_Example/screenshots/class_2.png differ diff --git a/C++_By_Example/screenshots/factorial_2.png b/C++_By_Example/screenshots/factorial_2.png new file mode 100755 index 00000000..c8d8f20a Binary files /dev/null and b/C++_By_Example/screenshots/factorial_2.png differ diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter1_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter1_3.ipynb new file mode 100755 index 00000000..98d9cbdf --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter1_3.ipynb @@ -0,0 +1,733 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:846e4f1aaa1db87dad144e6583289406d6871f19fbfd727f22b3926e50573c01" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Introduction to C++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C3FIRST, Page number:52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "i=4\n", + "j=i+7\n", + "c='A'\n", + "x=9.087\n", + "x=x*4.5\n", + "#Result\n", + "print i,c,j,x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4 A 11 40.8915\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C4ST1, Page number:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Result\n", + "print \"C++ programming is fun!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ programming is fun!\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C4ST2, Page number:86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "tax_rate=0.08\n", + "sale=22.54\n", + "#Calculation\n", + "tax=sale*tax_rate\n", + "#Result\n", + "print \"The sales tax is :\" ,tax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sales tax is : 1.8032\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C4AREAC,Page number:95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "PI=3.14159\n", + "radius=5\n", + "#Calculation\n", + "area=radius*radius*PI\n", + "#Result\n", + "print \"The area is \",area\n", + "radius=20\n", + "#Calculation\n", + "area=radius*radius*PI\n", + "#Result\n", + "print \"The area is \",area" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The area is 78.53975\n", + "The area is 1256.636\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C5INIT,Page number:108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#first=raw_input(\"Enter your first name:\")\n", + "#last=raw_input(\"Enter your last name\")\n", + "first=\"perry\"\n", + "last=\"greg\"\n", + "#Print the Initials\n", + "print \"Your initials are \",first[0],last[0] " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your initials are p g\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C6PRE,Page number:114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "AGE=28\n", + "MESSAGE=\"Hello, world\"\n", + "i=10\n", + "age=5\n", + "# 'AGE' is different from 'age'\n", + "i=i*AGE \n", + "#Result\n", + "print i,\" \",age,\" \",AGE,\"\\n\"\n", + "print MESSAGE " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "280 5 28 \n", + "\n", + "Hello, world\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C6INCL1,Page number:119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Result\n", + "print \"Kelly Jane Peterson\\n\"\n", + "print \"Apartment #217\\n\"\n", + "print \"4323 East Skelly Drive\\n\"\n", + "print \"New York, New York\\n\"\n", + "print \" 10012\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kelly Jane Peterson\n", + "\n", + "Apartment #217\n", + "\n", + "4323 East Skelly Drive\n", + "\n", + "New York, New York\n", + "\n", + " 10012\n", + "\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C6INCL3,Page number:120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "source = \"This is fun!\"\n", + "#source is copied to message\n", + "import copy\n", + "message=copy.copy(source)\n", + "#Result\n", + "print message" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This is fun!\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C6DEF1,Page number:121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MYNAME=\"Phil Ward\"\n", + "name=MYNAME\n", + "#Result\n", + "print \"My name is \",name,\"\\n\"\n", + "print \"My name is \",MYNAME,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "My name is Phil Ward \n", + "\n", + "My name is Phil Ward \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C6DEF2,Page number:122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#function definition\n", + "def X4(b,c,d):\n", + " return 2*b+c+3*b+c+b+c+4*b+c+b+c*c+b+c-d\n", + "b=2\n", + "c=3\n", + "d=4\n", + "e= X4 (b,c,d)\n", + "#Result\n", + "print e,\",\",b+c,\",\",b+c+b+c,\",\",b+c+b+c*c+b+c-d,\",\",X4(b,c,d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "44 , 5 , 10 , 17 , 44\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7PRNT1,Page number:136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "first='E'\n", + "middle='W'\n", + "last='C'\n", + "age=32\n", + "dependents=2\n", + "salary=25000.00\n", + "bonus=575.25\n", + "#Result\n", + "print \"Here are the initials: \"\n", + "print first,middle,last\n", + "print \"The age and number of dependents are \"\n", + "print age,\" \",dependents\n", + "print \"The salary and bonus are \"\n", + "print salary,\" \",bonus" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the initials: \n", + "E W C\n", + "The age and number of dependents are \n", + "32 2\n", + "The salary and bonus are \n", + "25000.0 575.25\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7TEAM, Page number:138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#table of team names and hits for three weeks\n", + "print \"Parrots\\tRams\\tKings\\tTitans\\tChargers\"\n", + "print \"3\\t5\\t3\\t1\\t0\"\n", + "print \"2\\t5\\t1\\t0\\t1\"\n", + "print \"2\\t6\\t4\\t3\\t0\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parrots\tRams\tKings\tTitans\tChargers\n", + "3\t5\t3\t1\t0\n", + "2\t5\t1\t0\t1\n", + "2\t6\t4\t3\t0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7PAY1,Page number:141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Computes and prints payroll data properly in dollars and cents.\n", + "emp_name=\"Larry Payton\"\n", + "pay_date=\"03/09/92\"\n", + "hours_worked=43\n", + "rate=7.75 #pay per hour\n", + "tax_rate=.32 #Tax percentage rate\n", + "#Compute the pay amount\n", + "gross_pay=hours_worked*rate\n", + "taxes=tax_rate*gross_pay\n", + "net_pay=gross_pay-taxes\n", + "#Results\n", + "print \"As of: \",pay_date\n", + "print emp_name,\" worked \",hours_worked,\"hours\"\n", + "print \"and got paid\",round(gross_pay,2)\n", + "print \"After taxes of: \",round(taxes,2)\n", + "print \"his take-home pay was $\",round(net_pay,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As of: 03/09/92\n", + "Larry Payton worked 43 hours\n", + "and got paid 333.25\n", + "After taxes of: 106.64\n", + "his take-home pay was $ 226.61\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7SLTX1, Page number:146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#getting total sale as float number.\n", + "#print \"What is the total amount of the sale?\"\n", + "#total_sale=float(raw_input()) \n", + "total_sale=50\n", + "#Compute sales tax\n", + "stax=total_sale*0.07 \n", + "#Results\n", + "print \"The sales tax for\",float(round(total_sale,2)),\"is\",round(stax,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sales tax for 50.0 is 3.5\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7PHON1, Page number:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#request user's name and print it as it would appeat in a phone book\n", + "#get name\n", + "#first=raw_input(\"What is your first name?\\n\")\n", + "#last=raw_input(\"What is your last name?\\n\")\n", + "first=\"perry\"\n", + "last=\"greg\"\n", + "print \"\\n\\n\"\n", + "print \"In a phone book,your name would look like this :\\n\"\n", + "print last,\",\",first " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "\n", + "In a phone book,your name would look like this :\n", + "\n", + "greg , perry\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7MATH, Page number:148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Simple Addition\n", + "print \"*** Math Practice ***\\n\"\n", + "#num1=input(\"What is the first number:\")\n", + "#num2=input(\"What is the second number:\")\n", + "num1=10\n", + "num2=20\n", + "ans=num1+num2\n", + "#get user answer\n", + "#her_ans=input(\"\\nWhat do you think is the answer?\")\n", + "her_ans=30\n", + "#Result\n", + "print \"\\n\",num1,\"plus\",num2,\"is\",ans,\"\\n\\nHope you got it right!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "*** Math Practice ***\n", + "\n", + "\n", + "10 plus 20 is 30 \n", + "\n", + "Hope you got it right!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7PS2, Page number:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "message=\"Please turn on your printer.\"\n", + "#Result\n", + "print message" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please turn on your printer.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7PRNTF, Page number:153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "first='E'\n", + "middle='W'\n", + "last='C'\n", + "age=32\n", + "dependents=2\n", + "salary=25000.00\n", + "bonus=575.25\n", + "#Result\n", + "print \"Here are the initials: \"\n", + "print first,\" \",middle,\" \",last,\"\\n\"\n", + "print \"The age and number of dependents are: \"\n", + "print age,\" \",dependents,\"\\n\"\n", + "print \"The salary and bonus are: \"\n", + "print \"%.6f\" %salary,\" \",\"%.6f\" %bonus" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the initials: \n", + "E W C \n", + "\n", + "The age and number of dependents are: \n", + "32 2 \n", + "\n", + "The salary and bonus are: \n", + "25000.000000 575.250000\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C7SLTXS, Page number:156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#prompt for a sales amount and print sales tax\n", + "#getting total sale as float number\n", + "#print \"What is the total amount of the sale?\"\n", + "#total_sale=float(raw_input()) \n", + "total_sale=10\n", + "#compute sales tax\n", + "stax=total_sale*0.07 \n", + "#Result\n", + "print \"The sales tax for\",float(round(total_sale,3)),\"is\",round(stax,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sales tax for 10.0 is 0.7\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter2_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter2_3.ipynb new file mode 100755 index 00000000..16b4b2bc --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter2_3.ipynb @@ -0,0 +1,756 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5641a94ed238f5f3bc00f944b1535145b962a2fb8c9b581876b500af4b0fc420" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Using C++ Operators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C8NEG :Page 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "temp=-12\n", + "#Result\n", + "print -temp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "12\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C8DIV :Page 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#To compute weekly pay\n", + "#Get input\n", + "#yearly=input(\"What is your annual pay?\")\n", + "yearly=38000.00\n", + "weekly=yearly/52\n", + "#Result\n", + "print \"\\nYour weekly pay is \",float(weekly)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Your weekly pay is 730.769230769\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C8AVG1 :Page 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Compute the average of three grades\n", + "grade1=87.5\n", + "grade2=92.4\n", + "grade3=79.6\n", + "#Average calculation\n", + "avg=grade1+grade2+grade3/3.0\n", + "#Result\n", + "print \"The average is: \",avg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average is: 206.433333333\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C8DATA :Page 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Declaration\n", + "bonus=50\n", + "salary=1400.50\n", + "#Calculation\n", + "total=salary+bonus\n", + "#Result\n", + "print \"The total is \",\"%.2f\" %total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total is 1450.50\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C8INT1 :Page 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate interest\n", + "days=45\n", + "principle=3500.00\n", + "interest_rate=0.155\n", + "#daily interest rate\n", + "daily_interest=interest_rate/365 \n", + "daily_interest=principle*daily_interest*days\n", + "#Update principle\n", + "principle+=daily_interest \n", + "#Result\n", + "print \"The balance you owe is:\",\"%.2f\" %principle" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The balance you owe is: 3566.88\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9PAY1 :Page 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate salesperson's pay based on his or her sales\n", + "print \"Payroll Calculation\\n\"\n", + "print \"------------------------\\n\"\n", + "#Get input\n", + "sal_name=raw_input(\"What is salesperson's last name? \")\n", + "hours=input(\"How many hours did the salesperson work? \")\n", + "total_sales=input(\"What were the total sales? \")\n", + "bonus=0\n", + "#Compute base pay\n", + "pay=4.10*float(hours) \n", + "if total_sales>8500.00:\n", + " bonus=500.00\n", + "#Result\n", + "print sal_name,\"made $\",\"%.2f\" %pay, \"\\n and got a bonus of $\",\"%.2f\" %bonus" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Payroll Calculation\n", + "\n", + "------------------------\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is salesperson's last name? Harrison\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many hours did the salesperson work? 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What were the total sales? 6050.64\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Harrison made $ 164.00 \n", + " and got a bonus of $ 0.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9AGE :Page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "age=input(\"What is the student's age?\")\n", + "if age<10:\n", + " print \"\\n*** The age cannot be less than 10 ***\\n\"\n", + " print \"Try again...\\n\"\n", + " age=input(\"What is the student's age?\")\n", + "#Result\n", + "print \"\\nThank you. You entered a valid age.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the student's age?3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "*** The age cannot be less than 10 ***\n", + "\n", + "Try again...\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the student's age?21\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Thank you. You entered a valid age.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9SQR1 :Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Print square of the input value if it is lessthan 180\n", + "#Get input\n", + "num=input(\"What number do you want to see the square of?\")\n", + "if num<=180:\n", + " square=num*num\n", + " print \"The square of \",num,\"is \",square,\"\\n\"\n", + " print \"\\nThank you for requesting square roots.\\n\" \n", + "num=input(\"What number do you want to see the square of?\")\n", + "if num>180:\n", + " import os\n", + " os.system('\\a')\n", + " print \"\\n* Square is not allowed for numbers over 180 *\"\n", + " print \"\\nRun this program again trying a smaller value.\"\n", + "print \"\\nThank you for requesting square roots.\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What number do you want to see the square of?45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The square of 45 is 2025 \n", + "\n", + "\n", + "Thank you for requesting square roots.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What number do you want to see the square of?212\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "* Square is not allowed for numbers over 180 *\n", + "\n", + "Run this program again trying a smaller value.\n", + "\n", + "Thank you for requesting square roots.\n", + "\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9IFEL1 :Page 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#num=input(\"What is your answer?\\n\")\n", + "num=1\n", + "if num>0:\n", + " print \"\\nMore than 0\\n\"\n", + "else:\n", + " print \"\\nLess or equal to 0\\n\"\n", + "\n", + "print \"\\nThanks for your time.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "More than 0\n", + "\n", + "\n", + "Thanks for your time.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9IFEL2 :Page 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Test user's first initial and prints a message.\n", + "#Get input\n", + "#last=raw_input(\"\\nWhat is your last name?\\n\")\n", + "last=\"Praveen\"\n", + "#test the initial\n", + "if last[0] <= 'P':\n", + " print \"Your name is early in the alphabet.\\n\"\n", + "else:\n", + " print \"You have to wait a while for Your name to be called\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your name is early in the alphabet.\n", + "\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9PAY2 :Page 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#hours=input(\"\\nHow many hours were worked?\")\n", + "#rate=input(\"\\nWhat is the regular hourly pay?\")\n", + "hours=44\n", + "rate=0.20\n", + "#Compute pay\n", + "if hours>50:\n", + " dt=2.0*rate*float(hours-50)\n", + " ht=1.5*rate*10.0\n", + "else:\n", + " dt=0.0\n", + "#Time and a half\n", + "if hours>40:\n", + " ht=1.5*rate*float(hours-40)\n", + "#Regular pay\n", + "if hours>=40:\n", + " rp=40*rate\n", + "else:\n", + " rp=float(hours)*rate\n", + "#Payroll\n", + "pay=dt+ht+rp \n", + "#Result\n", + "print \"\\nThe pay is \",\"%.2f\" %pay" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The pay is 9.20\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C9SERV :Page 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#if...else...if\n", + "#yrs=input(\"\\nHow many years of service?\")\n", + "yrs=25\n", + "if yrs>20:\n", + " print \"\\nGive a gold watch\"\n", + "else:\n", + " if yrs>10:\n", + " print \"\\nGive a paper weight\"\n", + " else:\n", + " print \"\\nGive a pat on the back\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Give a gold watch\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C10YEAR :Page 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#To determine if it is Summer Olympics year\n", + "#year=input(\"\\nWhat is a year for the test?\")\n", + "year=2004\n", + "#Test the Year\n", + "if year%4==0 and year%10==0:\n", + " print \"\\nBoth Olympics and U.S. Census!\"\n", + " exit(0)\n", + "if year%4==0:\n", + " print \"\\nSummer Olympics only\"\n", + "else:\n", + " if year%10==0:\n", + " print \"\\nU.S. Census only\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Summer Olympics only\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C10AGE :Page 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#age=input(\"\\nWhat is your age?\\n\")\n", + "age=20\n", + "if age<10 or age>100:\n", + " print \"*** The age must be between 10 and 100 ***\\n\"\n", + "else:\n", + " print \"You entered a valid age.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered a valid age.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C10VIDEO :Page 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# -*- coding: cp1252 -*-\n", + "#Program that computes video rental amounts and gives\n", + "# appropriate discounts based on the day or customer status.\n", + "print \"\\n *** Video Rental Computation ***\\n\"\n", + "print \"--------------------------------------\\n\"\n", + "tape_charge=2.00 #Before-discount tape fee-per tape.\n", + "first_name=raw_input(\"\\nWhat is customer's first name? \")\n", + "last_name=raw_input(\"\\nWhat is customer's last name? \")\n", + "num_tapes=input(\"\\nHow many tapes are being rented? \")\n", + "val_day=raw_input(\"Is this a Value day (Y/N)?\")\n", + "sp_stat=raw_input(\"Is this a Special Status customer (Y/N)?\")\n", + "\n", + "# Calculate rental amount.\n", + "discount=0.0\n", + "if val_day=='Y' or sp_stat=='Y':\n", + " discount=0.5\n", + " x=num_tapes*tape_charge\n", + " y=discount*num_tapes\n", + " rental_amt=x-y\n", + "print \"\\n** Rental club **\\n\"\n", + "print first_name,last_name,\"rented \",num_tapes,\" tapes \"\n", + "print \"The total was \",\"%.2f\" %rental_amt\n", + "print \"The discount was \",\"%.2f\" %discount,\"per tape\\n\"\n", + "if sp_stat=='Y':\n", + " print \"\\nThank them for being a special Status customer\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " *** Video Rental Computation ***\n", + "\n", + "--------------------------------------\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "What is customer's first name? Jerry\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "What is customer's last name? Parker\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "How many tapes are being rented? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Is this a Value day (Y/N)?Y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Is this a Special Status customer (Y/N)?Y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "** Rental club **\n", + "\n", + "Jerry Parker rented 3 tapes \n", + "The total was 4.50\n", + "The discount was 0.50 per tape\n", + "\n", + "\n", + "Thank them for being a special Status customer\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter3_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter3_3.ipynb new file mode 100755 index 00000000..7bf3f7ef --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter3_3.ipynb @@ -0,0 +1,1969 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2f60b7cc87bacc3ca0350839f24c16d5959454ed43a60a8db422fa8483e17f84" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: C++ Constructs" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C11SIZE1, Page number:232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Size of floating-point values\n", + "import sys\n", + "x=0.0\n", + "print \"The size of floating-point variables on this computer is \"\n", + "print sys.getsizeof(x) #depends on the compiler " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The size of floating-point variables on this computer is \n", + "24\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C11COM1, Page number:233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Illustrates the sequence point.\n", + "num=5\n", + "sq,cube=num*num,num*num*num\n", + "#Result\n", + "print \"The square of \",num,\"is\",sq\n", + "print \"and the cube is \",cube" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The square of 5 is 25\n", + "and the cube is 125\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C11ODEV, Page number:239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Uses a bitwise & to determine whether a number is odd or even.\n", + "input1=input(\"What number do you want me to test?\")\n", + "if input1&1:\n", + " print \"The number \",input1,\"is odd\"\n", + "else:\n", + " print \"The number \",input1,\"is even\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What number do you want me to test?5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number 5 is odd\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12WHIL1, Page number:248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ans=raw_input(\"Do you want to continue (Y/N)\")\n", + "while ans!='Y' and ans!='N':\n", + " print \"\\nYou must type a Y or an N\\n\"\n", + " ans=raw_input( \"Do you want to continue(Y/N)?\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to continue (Y/N)k\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "You must type a Y or an N\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to continue(Y/N)?c\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "You must type a Y or an N\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to continue(Y/N)?s\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "You must type a Y or an N\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to continue(Y/N)?5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "You must type a Y or an N\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to continue(Y/N)?Y\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12WHIL3, Page number:251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Number of letters in the user's name\n", + "name=raw_input(\"What is your first name?\")\n", + "count=len(name)\n", + "print \"Your name has \",count,\"characters\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your first name?greg\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your name has 4 characters\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12INV1, Page number:253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"*** Inventory computation ***\\n\"\n", + "while True:\n", + " part_no=input(\"What is the next part number(-999 to end)?\\n\")\n", + " if part_no!=-999:\n", + " quantity=input(\"How many were bought?\\n\")\n", + " cost=input(\"What is the unit price of this item?\\n\")\n", + " ext_cost=cost*quantity\n", + " print \"\\n\",quantity,\"of #\",part_no,\"will cost\",\"%.2f\" %ext_cost,\"\\n\"\n", + " else:\n", + " break\n", + "print \"End of Inventory computation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "*** Inventory computation ***\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next part number(-999 to end)?\n", + "213\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many were bought?\n", + "12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the unit price of this item?\n", + "5.66\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "12 of # 213 will cost 67.92 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next part number(-999 to end)?\n", + "92\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many were bought?\n", + "53\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the unit price of this item?\n", + ".23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "53 of # 92 will cost 12.19 \n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next part number(-999 to end)?\n", + "-999\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "End of Inventory computation\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12BRK, Page number:257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Demonstrates the Break statement\n", + "while True:\n", + " print \"C++ is fun!\\n\"\n", + " break\n", + " user_ans=raw_input( \"Do you want to see the message again(Y/N)?\")\n", + "print \"That's all for now\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is fun!\n", + "\n", + "That's all for now\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12CNT1, Page number:261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ctr=0\n", + "while ctr<10:\n", + " print \"Computers are fun!\\n\"\n", + " ctr+=1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n", + "Computers are fun!\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12PASS1, Page number:263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "stored_pass=11862\n", + "num_tries=0\n", + "while num_tries<3:\n", + " user_pass=input(\"\\nWhat is the password? (you get 3 tries...)?\")\n", + " num_tries+=1\n", + " if user_pass==stored_pass:\n", + " print \"You entered the correct password.\\n\"\n", + " print \"The cash safe is behind the picture of the ship.\"\n", + " exit()\n", + " else:\n", + " print \"You entered the wrong password.\\n\"\n", + " if num_tries==3:\n", + " print \"Sorry, you get no more chances\"\n", + " else:\n", + " print \"you get \",3-num_tries,\"more tries...\\n\"\n", + "exit(0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "What is the password? (you get 3 tries...)?11202\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered the wrong password.\n", + "\n", + "you get 2 more tries...\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "What is the password? (you get 3 tries...)?23265\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered the wrong password.\n", + "\n", + "you get 1 more tries...\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "What is the password? (you get 3 tries...)?36963\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered the wrong password.\n", + "\n", + "Sorry, you get no more chances\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12GRAD1, Page number:266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Adds grades and determines whether you earned an A.\n", + "total_grade=0.0\n", + "while 1:\n", + " grade=input(\"What is your grade?(-1 to end)\")\n", + " if grade>=0.0:\n", + " total_grade+=grade\n", + " if grade==-1:\n", + " break\n", + "#Result\n", + "print \"\\n\\nYou made a total of \",\"%.1f\" %total_grade,\"points\\n\"\n", + "if total_grade>=450.00:\n", + " print \"** You made an A !!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)87.6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)92.4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)78.7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)-1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "You made a total of 258.7 points\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C12GRAD2, Page number:267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "total_grade=0.0\n", + "grade_avg=0.0\n", + "grade_ctr=0\n", + "while 1:\n", + " grade=input(\"What is your grade?(-1 to end)\")\n", + " if grade>=0.0:\n", + " total_grade+=grade\n", + " grade_ctr+=1\n", + " if grade==-1:\n", + " break\n", + "grade_avg=total_grade/grade_ctr\n", + "#Result\n", + "print \"\\n\\nYou made a total of \",'%.1f' %total_grade,\"points\\n\"\n", + "print \"Your average was \",'%.1f' %grade_avg,\"\\n\"\n", + "if total_grade>=450.00:\n", + " print \"** You made an A !!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)67.8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)98.7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)67.8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)92.4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your grade?(-1 to end)-1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "You made a total of 326.7 points\n", + "\n", + "Your average was 81.7 \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13FOR1, Page number:276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#for loop example\n", + "for ctr in range(1,11):\n", + " print ctr,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "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" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13FOR2, Page number:278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Demonstrates totaling using a for loop.\n", + "total=0\n", + "for ctr in range(100,201):\n", + " total+=ctr\n", + "#Result\n", + "print \"The total is \",total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total is 15150\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13EVOD, Page number:281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Even numbers below 21\"\n", + "#Result\n", + "for num in range(2,21,2):\n", + " print num,\" \",\n", + " print \"\\n\\nOdd numbers below 20\"\n", + "#Result\n", + "for num in range(1,21,2):\n", + " print num,\" \"," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Even numbers below 21\n", + "2 4 6 8 10 12 14 16 18 20 \n", + "\n", + "Odd numbers below 20\n", + "1 3 5 7 9 11 13 15 17 19 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13CNTD1, Page number:282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for ctr in range(10,0,-1):\n", + " print ctr\n", + "print \"*** Blast off! ***\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n", + "9\n", + "8\n", + "7\n", + "6\n", + "5\n", + "4\n", + "3\n", + "2\n", + "1\n", + "*** Blast off! ***\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13FOR4, Page number:283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "total=0.0\n", + "print \"\\n*** Grade Calculation ***\\n\"\n", + "num=input(\"How many students are there?\\n\")\n", + "for loopvar in range(0,num,1):\n", + " grade=input(\"What is the next student's grade?\\n\")\n", + " total=total+grade\n", + "avg=total/num\n", + "#Result\n", + "print \"\\n the average of this class is\",'%.1f' %avg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "*** Grade Calculation ***\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students are there?\n", + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade?\n", + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade?\n", + "9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade?\n", + "7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " the average of this class is 8.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13FOR6, Page number:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=5\n", + "print \"\\nCounting by 5s:\\n\"\n", + "for num in range(5,101,5):\n", + " print \"\\n\",num" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Counting by 5s:\n", + "\n", + "\n", + "5\n", + "\n", + "10\n", + "\n", + "15\n", + "\n", + "20\n", + "\n", + "25\n", + "\n", + "30\n", + "\n", + "35\n", + "\n", + "40\n", + "\n", + "45\n", + "\n", + "50\n", + "\n", + "55\n", + "\n", + "60\n", + "\n", + "65\n", + "\n", + "70\n", + "\n", + "75\n", + "\n", + "80\n", + "\n", + "85\n", + "\n", + "90\n", + "\n", + "95\n", + "\n", + "100\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13NEST1, Page number:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for times in range(1,4,1):\n", + " for num in range(1,6,1):\n", + " print num,\n", + " print \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4 5 \n", + "\n", + "1 2 3 4 5 \n", + "\n", + "1 2 3 4 5 \n", + "\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13NEST2, Page number:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#for loop\n", + "for outer in range(6,-1,-1):\n", + " for inner in range(1,outer,1):\n", + " print inner,\n", + " print \"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4 5 \n", + "\n", + "1 2 3 4 \n", + "\n", + "1 2 3 \n", + "\n", + "1 2 \n", + "\n", + "1 \n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C13FACT, Page number:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#factorial\n", + "num=input(\"What factorial do you want to see?\")\n", + "total=1\n", + "for fact in range(1,num+1,1):\n", + " total=total*fact \n", + "print \"The factorial for \",num,\"is\",total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What factorial do you want to see?7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factorial for 7 is 5040\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14CNTD1, Page number:297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for cd in range(10,0,-1):\n", + " for delay in range(1,10,1): #for delay in range(1,30001,1):\n", + " print \" \"\n", + " print cd,\"\\n\"\n", + "print \"*** Blast off! ***\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "10 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "9 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "8 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "7 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "6 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "5 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "4 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "3 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "2 \n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "1 \n", + "\n", + "*** Blast off! ***\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14TIM, Page number:298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=input(\"What is your age?\\n\") #Get age\n", + "while age<=0:\n", + " print \"*** Your age cannot be that small ! ***\"\n", + " for outer in range(1,3,1): #outer loop\n", + " for inner in range(1,50,1): #inner loop\n", + " print \"\"\n", + " print \"\\r\\n\\n\"\n", + " age=input(\"What is your age?\\n\")\n", + "print \"Thanks, I did not think you would actually tell me your age!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your age?\n", + "20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thanks, I did not think you would actually tell me your age!\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14BRAK1, Page number:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Here are the numbers from 1 to 20\\n\"\n", + "for num in range(1,21,1):\n", + " print num,\"\\n\"\n", + " break #break statement\n", + "print \"That's all, folks!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the numbers from 1 to 20\n", + "\n", + "1 \n", + "\n", + "That's all, folks!\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14BRAK2, Page number:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#A for loop running at the user\u2019s request.\n", + "print \"Here are the numbers from 1 to 20\\n\"\n", + "for num in range(1,21,1):\n", + " print num\n", + " ans=raw_input(\"Do you want to see another (Y/N)?\")\n", + " if ans=='N' or ans=='n':\n", + " break\n", + "print \"That's all, folks!\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the numbers from 1 to 20\n", + "\n", + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to see another (Y/N)?N\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "That's all, folks!\n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14BRAK3, Page number:302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "total=0.0\n", + "count=0\n", + "print \"\\n*** Grade Calculation ***\\n\"\n", + "num=input(\"How many students are there?\")\n", + "for loopvar in range(1,num+1,1):\n", + " grade=input(\"What is the next student's grade? (-99 to quit)\")\n", + " if grade<0.0:\n", + " break\n", + " count+=1\n", + " total+=grade\n", + "avg=total/count\n", + "#Result\n", + "print \"The average of this class is \",'%.1f' %avg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "*** Grade Calculation ***\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students are there?10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)87\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)97\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)67\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)89\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)94\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next student's grade? (-99 to quit)-99\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average of this class is 86.8\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14CON1, Page number:305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Demonstrates the use of the continue statement.\n", + "for ctr in range(1,11,1):\n", + " print ctr,\n", + " continue\n", + " print \"C++ programming\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4 5 6 7 8 9 10\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C14CON3, Page number:306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Average salaries over $10,000\n", + "avg=0.0\n", + "total=0.0\n", + "month=1.0\n", + "count=0\n", + "while month>0.0:\n", + " month=input(\"What is the next monthly salary (-1) to quit\")\n", + " year=month*12.00\n", + " if year <= 10000.00: #Do not add low salaries\n", + " continue\n", + " if month<0.0:\n", + " break\n", + " count+=1\n", + " total+=year #Add yearly salary to total.\n", + "avg=total/float(count)\n", + "#Result\n", + "print \"\\nThe average of high salaries is $\",'%.2f' %avg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit500\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit2000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit750\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit4000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit5000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit1200\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the next monthly salary (-1) to quit-1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The average of high salaries is $ 36600.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C15BEEP1, Page number:314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def beep():\n", + " import os\n", + " os.system('\\a')\n", + "num=input(\"Please enter a number:\")\n", + "#Use multiple if statements to beep.\n", + "if num==1:\n", + " beep()\n", + "else:\n", + " if num==2:\n", + " beep()\n", + " beep()\n", + " else:\n", + " if num==3:\n", + " beep()\n", + " beep()\n", + " beep()\n", + " else:\n", + " if num==4:\n", + " beep()\n", + " beep()\n", + " beep()\n", + " beep()\n", + " else:\n", + " if num==5:\n", + " beep()\n", + " beep()\n", + " beep()\n", + " beep()\n", + " beep()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter a number:2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C15SALE, Page number:319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Prints daily, weekly, and monthly sales totals.\n", + "daily=2343.34\n", + "weekly=13432.65\n", + "monthly=43468.97\n", + "ans=raw_input(\"Is this the end of the month? (Y/N) :\")\n", + "if ans=='Y' or ans=='y':\n", + " day=6\n", + "else:\n", + " day=input(\"What day number , 1 through 5( for mon-fri) :\")\n", + "if day==6:\n", + " print \"The monthly total is \",'%.2f' %monthly\n", + "else:\n", + " if day==5:\n", + " print \"The weekly total is \",'%.2f' %weekly\n", + " else:\n", + " print \"The daily total is \",'%.2f' %daily " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Is this the end of the month? (Y/N) :Y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The monthly total is 43468.97\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C15DEPT1, Page number:320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "choice=\"R\"\n", + "while choice!='S' and choice!='A' and choice!='E' and choice!='P':\n", + " print \"\\n choose your department :\"\n", + " print \"S - Sales\"\n", + " print \"A - Accounting\"\n", + " print \"E - Engineering\"\n", + " print \"P - Payroll\"\n", + " choice=raw_input( \"What is your choice? (upper case)\")\n", + "if choice=='E':\n", + " print \"Your meeting is at 2:30\"\n", + "else:\n", + " if choice=='S':\n", + " print \"Your meeting is at 8:30\"\n", + " else:\n", + " if choice=='A':\n", + " print \"Your meeting is at 10:00\"\n", + " else:\n", + " if choice=='P':\n", + " print \"your meeting has been cancelled\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " choose your department :\n", + "S - Sales\n", + "A - Accounting\n", + "E - Engineering\n", + "P - Payroll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your choice? (upper case)E\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your meeting is at 2:30\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter4_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter4_3.ipynb new file mode 100755 index 00000000..af8938df --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter4_3.ipynb @@ -0,0 +1,1073 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4df8567d0a6ab5b81136865656edfa550f51aea32b240bc480ecbc37fd6ab9bf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Variable Scope and Modular Programming" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C16FUN1, Page number:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Function Definition\n", + "def next_fun(): \n", + " print \"Inside next_fun()\" \n", + "def third_fun(): \n", + " print \"Inside third_fun()\"\n", + "def main(): \n", + " print \"First function called main()\"\n", + " #Function Call\n", + " next_fun() \n", + " third_fun() \n", + " print \"main() is completed\"\n", + "#Function Call\n", + "main() " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First function called main()\n", + "Inside next_fun()\n", + "Inside third_fun()\n", + "main() is completed\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C16FUN2, Page number:347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Function Calls\n", + "def name_print():\n", + " print \"C++ is Fun!\\tC++ is Fun!\\tC++ is Fun!\"\n", + " print \" C++ i s F u n ! \\t C++ i s F u n ! \\t C++ i s F u n ! \"\n", + " reverse_print() \n", + "def reverse_print():\n", + " print \"!nuF si ++C\\t!nuF si ++C\\t!nuF si ++C\"\n", + "def one_per_line():\n", + " print \"C++\\n i\\n s\\n F\\n u\\n n\\n !\"\n", + "def main():\n", + " for ctr in range(1,6,1):\n", + " name_print() #Calls function five times.\n", + " one_per_line() #Calls the program's last function once \n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is Fun!\tC++ is Fun!\tC++ is Fun!\n", + " C++ i s F u n ! \t C++ i s F u n ! \t C++ i s F u n ! \n", + "!nuF si ++C\t!nuF si ++C\t!nuF si ++C\n", + "C++ is Fun!\tC++ is Fun!\tC++ is Fun!\n", + " C++ i s F u n ! \t C++ i s F u n ! \t C++ i s F u n ! \n", + "!nuF si ++C\t!nuF si ++C\t!nuF si ++C\n", + "C++ is Fun!\tC++ is Fun!\tC++ is Fun!\n", + " C++ i s F u n ! \t C++ i s F u n ! \t C++ i s F u n ! \n", + "!nuF si ++C\t!nuF si ++C\t!nuF si ++C\n", + "C++ is Fun!\tC++ is Fun!\tC++ is Fun!\n", + " C++ i s F u n ! \t C++ i s F u n ! \t C++ i s F u n ! \n", + "!nuF si ++C\t!nuF si ++C\t!nuF si ++C\n", + "C++ is Fun!\tC++ is Fun!\tC++ is Fun!\n", + " C++ i s F u n ! \t C++ i s F u n ! \t C++ i s F u n ! \n", + "!nuF si ++C\t!nuF si ++C\t!nuF si ++C\n", + "C++\n", + " i\n", + " s\n", + " F\n", + " u\n", + " n\n", + " !\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17GLO, Page number:356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def do_fun():\n", + " global sales #global variable\n", + " global profit #global variable \n", + " sales = 20000.00\n", + " profit=5000.00\n", + " print \"The sales in the second function are: \",sales\n", + " print \"The profit in the second function is: \",profit\n", + " third_fun() #Call third function to show that globals are visible\n", + "def third_fun():\n", + " print \"\\nIn the third function:\"\n", + " print \"The sales in the third function are\",sales\n", + " print \"The profit in the third function is \",profit\n", + "def main():\n", + " print \"No variable defined in main()\\n\"\n", + " do_fun()\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No variable defined in main()\n", + "\n", + "The sales in the second function are: 20000.0\n", + "The profit in the second function is: 5000.0\n", + "\n", + "In the third function:\n", + "The sales in the third function are 20000.0\n", + "The profit in the third function is 5000.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17GLLO, page number:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def pr_again():\n", + " j=5 #Local to only pr_again().\n", + " print j,\",\",z,\",\",i\n", + "global i\n", + "i=0\n", + "def main():\n", + " p=9.0 #Local to main() only\n", + " print i,\",\",p\n", + " pr_again() #Calls next function.\n", + "\n", + "global z\n", + "z=9.0\n", + "main() " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 , 9.0\n", + "5 , 9.0 , 0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17LOC1, Page number:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " age=input(\"What is your age? \") #Variable age is local to main()\n", + " get_age()\n", + " print \"main()'s age is still\",age \n", + "def get_age():\n", + " age=input(\"What is your age again? \") #A different age. This one is local to get_age().\n", + "main() " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your age? 28\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your age again? 56\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "main()'s age is still 28\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17LOC2, Page number:360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " for ctr in range(0,11,1): #Loop counter\n", + " print \"main()'s ctr is \",ctr,\"\\n\"\n", + " do_fun() #Call second function\n", + "\n", + "def do_fun():\n", + " for ctr in range(10,0,-1):\n", + " print \"do_fun()'s ctr is \",ctr,\"\\n\"\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "main()'s ctr is 0 \n", + "\n", + "main()'s ctr is 1 \n", + "\n", + "main()'s ctr is 2 \n", + "\n", + "main()'s ctr is 3 \n", + "\n", + "main()'s ctr is 4 \n", + "\n", + "main()'s ctr is 5 \n", + "\n", + "main()'s ctr is 6 \n", + "\n", + "main()'s ctr is 7 \n", + "\n", + "main()'s ctr is 8 \n", + "\n", + "main()'s ctr is 9 \n", + "\n", + "main()'s ctr is 10 \n", + "\n", + "do_fun()'s ctr is 10 \n", + "\n", + "do_fun()'s ctr is 9 \n", + "\n", + "do_fun()'s ctr is 8 \n", + "\n", + "do_fun()'s ctr is 7 \n", + "\n", + "do_fun()'s ctr is 6 \n", + "\n", + "do_fun()'s ctr is 5 \n", + "\n", + "do_fun()'s ctr is 4 \n", + "\n", + "do_fun()'s ctr is 3 \n", + "\n", + "do_fun()'s ctr is 2 \n", + "\n", + "do_fun()'s ctr is 1 \n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17MULI, Page number:362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " i=10\n", + " i=20\n", + " print i,\" \",i,\"\\n\"\n", + " i=30\n", + " print i,\" \",i,\" \",i,\"\\n\" \n", + " i=10\n", + " print i,\" \",i,\" \",i \n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "20 20 \n", + "\n", + "30 30 30 \n", + "\n", + "10 10 10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17LOC3, Page number:367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def pr_init(initial):\n", + " print \"Your initial is \",initial\n", + "def pr_other(age,salary):\n", + " print \"You look young for\",age,\"and \",'%.2f' %salary,\"is a lot of money\"\n", + "initial=raw_input(\"What is your initial?\")\n", + "age=input(\"What is your age?\")\n", + "salary=input(\"What is your salary?\")\n", + "pr_init(initial) #call pr_init() and pass it initial\n", + "pr_other(age,salary) #call pr_other and pass age and salary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your initial?Jerry\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your age?30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your salary?50000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your initial is Jerry\n", + "You look young for 30 and 50000.00 is a lot of money\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17LOC4, Page number:368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def compute_sale(gallons):\n", + " #local variable\n", + " price_per=12.45 \n", + " x=price_per*float(gallons) #type casting gallons because it was integer\n", + " print \"The total is \",'%.2f' %x\n", + "def main():\n", + " print \"Richard's Paint Service\"\n", + " gallons=input(\"How many gallons of paint did you buy?\")\n", + " compute_sale(gallons) #Function Call\n", + "main()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Richard's Paint Service\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many gallons of paint did you buy?20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total is 249.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C17STA2, Page number:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " for ctr in range(1,26,1):\n", + " triple_it(ctr)\n", + "def triple_it(ctr):\n", + " total=0\n", + " ans=ctr*3\n", + " total+=ans\n", + " print \"The number \",ctr,\"multiplied by 3 is \",ans\n", + " if total>300:\n", + " print \"The total of triple numbers is over 300\"\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number 1 multiplied by 3 is 3\n", + "The number 2 multiplied by 3 is 6\n", + "The number 3 multiplied by 3 is 9\n", + "The number 4 multiplied by 3 is 12\n", + "The number 5 multiplied by 3 is 15\n", + "The number 6 multiplied by 3 is 18\n", + "The number 7 multiplied by 3 is 21\n", + "The number 8 multiplied by 3 is 24\n", + "The number 9 multiplied by 3 is 27\n", + "The number 10 multiplied by 3 is 30\n", + "The number 11 multiplied by 3 is 33\n", + "The number 12 multiplied by 3 is 36\n", + "The number 13 multiplied by 3 is 39\n", + "The number 14 multiplied by 3 is 42\n", + "The number 15 multiplied by 3 is 45\n", + "The number 16 multiplied by 3 is 48\n", + "The number 17 multiplied by 3 is 51\n", + "The number 18 multiplied by 3 is 54\n", + "The number 19 multiplied by 3 is 57\n", + "The number 20 multiplied by 3 is 60\n", + "The number 21 multiplied by 3 is 63\n", + "The number 22 multiplied by 3 is 66\n", + "The number 23 multiplied by 3 is 69\n", + "The number 24 multiplied by 3 is 72\n", + "The number 25 multiplied by 3 is 75\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C18PASS1, Page number:381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def moon(weight): \n", + " weight/=6 \n", + " print \"You weigh only \",weight,\"pounds on the moon !\"\n", + "def main(): \n", + " weight=input(\"How many pounds do you weigh? \")\n", + " moon(weight) #call the moon() function and pass weight\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many pounds do you weigh? 120\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You weigh only 20 pounds on the moon !\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C18PASS3, Page number:383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " Igrade=raw_input(\"What letter grade do you want?\")\n", + " average=input(\"What is your current test average\")\n", + " tests=input(\"How many tests do you have left?\")\n", + " check_grade(Igrade,average,tests) #// Calls function and passes three variables by value\n", + "def check_grade(Igrade,average,tests):\n", + " if tests==0:\n", + " print \"You will get your current grade of \",Igrade\n", + " else:\n", + " if tests==1:\n", + " print \"You still have time to bring up your average of\",'%.1f' %average,\"up . Study hard !\"\n", + " else :\n", + " print \"Relax. You still have plenty of time.\" \n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What letter grade do you want?A\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your current test average1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many tests do you have left?3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relax. You still have plenty of time.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19AVG, Page number:398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def calc_av(num1,num2,num3):\n", + " local_avg=(num1+num2+num3) / 3 #Holds the average for these numbers\n", + " return local_avg\n", + "print \"please type three numbers (such as 23 54 85) \"\n", + "num1=input()\n", + "num2=input()\n", + "num3=input()\n", + "avg=calc_av(num1,num2,num3) #call function and pass the numbers\n", + "print \"\\n\\nThe average is \",avg #Print the return value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "please type three numbers (such as 23 54 85) \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": [ + "\n", + "\n", + "The average is 40\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19DOUB, Page number:401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def doub(number):\n", + " d_num=number*2 #Doubles the number.\n", + " return d_num #Returns the result.\n", + "number=input(\"What number do you want doubled? \")\n", + "d_number= doub(number) #Assigns return value.\n", + "print number,\" doubled is \",d_number" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What number do you want doubled? 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5 doubled is 10\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19SUMD, Page number:403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sums(num):\n", + " sumd=0\n", + " if num<=0:\n", + " sumd=num\n", + " else:\n", + " for ctr in range(1,num+1,1):\n", + " sumd=sumd+ctr\n", + " return sumd\n", + "num=input(\"Please type a number: \")\n", + "sumd= sums(num)\n", + "print \"The sum of the digits is \" , sumd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please type a number: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of the digits is 21\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19MINMX, Page number:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def maximum(num1,num2): \n", + " if num1>num2:\n", + " maxi=num1\n", + " else:\n", + " maxi=num2\n", + " return maxi\n", + "def minimum(num1,num2):\n", + " if num1>num2:\n", + " mini=num2\n", + " else:\n", + " mini=num1\n", + " return mini\n", + "print \"Please type two numbers ( such as 46 75 ) \"\n", + "num1 = input()\n", + "num2 = input()\n", + "maxi=maximum(num1,num2) #Assign the return value of each function to variables\n", + "mini=minimum(num1,num2) \n", + "print \"The minimum number is \",mini\n", + "print \"The maximum number is \", maxi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please type two numbers ( such as 46 75 ) \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "72\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "55\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum number is 55\n", + "The maximum number is 72\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19PRO1, Page number:409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tax_rate=0.07 #Assume seven percent tax rate\n", + "total_sale=input(\"What is the sale amount? \")\n", + "total_sale+=tax_rate*total_sale\n", + "print \"The total sale is \",'%.2f' %total_sale" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the sale amount? 4000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total sale is 4280.00\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19ASC, Page number:410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def ascii(num):\n", + " asc_char=chr(num) #Type cast to a character\n", + " return asc_char\n", + "num=input(\"Enter an ASCII number? \")\n", + "asc_char=ascii(num) #Number is passed to the function ascii()\n", + "print \"The ASCII character for \",num,\"is \",asc_char" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an ASCII number? 67\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ASCII character for 67 is C\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C19NPAY, Page number:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def netpayfun(hours,rate,taxrate):\n", + " gross_pay=hours*rate\n", + " taxes=taxrate*gross_pay\n", + " net_pay=gross_pay-taxes\n", + " return net_pay\n", + "net_pay=netpayfun(40.0,3.50,0.20)\n", + "print \"The pay for 40 hours at $3.50/hr., and a 20% tax rate is $ \",net_pay\n", + "net_pay=netpayfun(50.0,10.00,0.30)\n", + "print \"The pay for 40 hours at $10.00/hr., and a 30% tax rate is $ \",net_pay\n", + "net_pay=netpayfun(10.0,5.00,0.10)\n", + "print \"The pay for 40 hours at $5.00/hr., and a 10% tax rate is $ \",net_pay" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pay for 40 hours at $3.50/hr., and a 20% tax rate is $ 112.0\n", + "The pay for 40 hours at $10.00/hr., and a 30% tax rate is $ 350.0\n", + "The pay for 40 hours at $5.00/hr., and a 10% tax rate is $ 45.0\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C20OVF1, Page number:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "i=-15\n", + "x=-64.53\n", + "ians=abs(i) #abs() function is a built in function that returns a positive value \n", + "print \"Integer absolute value of -15 is \",ians\n", + "fans=abs(x)\n", + "print \"Float absolute value of -64.53 is \",'%.2f' %fans" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer absolute value of -15 is 15\n", + "Float absolute value of -64.53 is 64.53\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C20OVF2, Page number:424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#function definition\n", + "def output(x):\n", + " if isinstance(x,int):\n", + " print x\n", + " else:\n", + " if isinstance(x,float):\n", + " print '%.2f' %x\n", + " else:\n", + " print x\n", + "#Variable Decleration\n", + "name=\"C++ By Example makes C++ easy!\"\n", + "Ivalue=2543\n", + "fvalue=39.4321\n", + "#calling function\n", + "output(name)\n", + "output(Ivalue)\n", + "output(fvalue)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ By Example makes C++ easy!\n", + "2543\n", + "39.43\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter5_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter5_3.ipynb new file mode 100755 index 00000000..92b07a7b --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter5_3.ipynb @@ -0,0 +1,184 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1663500e8fbe5ad2cc16ca34f15e5b3a438d37780443ea138d094544e9484c86" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Character Input/Output and String Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C22INI, Page number:452" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "print \"What is your first initial?\"\n", + "initial=raw_input()\n", + "\n", + "#Check if it is an alphabet\n", + "while not initial.isalpha():\n", + " print \"That was not a valid initial!\"\n", + " print \"What is your first initial?\"\n", + " initial=raw_input()\n", + "print \"Thanks\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your first initial?\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "p\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thanks\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C22GB, Page number:454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#ans=raw_input(\"Are you a girl or a boy (G/B)? \") \n", + "ans=\"b\"\n", + "#convert answer to uppercase\n", + "ans=ans.upper() \n", + "if ans=='G':\n", + " print \"You look pretty today!\\n\"\n", + "else:\n", + " if ans=='B':\n", + " print \"You look handsome today!\\n\"\n", + " else:\n", + " print \"Your answer makes no sense!\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You look handsome today!\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C22GPS1, Page number:459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#get book title\n", + "#book=raw_input(\"What is the book title? \") \n", + "book=\"Mary and Her Lambs\"\n", + "#print book title\n", + "print book \n", + "print \"Thanks for the book!\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mary and Her Lambs\n", + "Thanks for the book!\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C22ABS, Page number:463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Get input\n", + "#age1=input(\"\\nWhat is the first child's age? \")\n", + "#age2=input(\"\\nWhat is the second child's age? \")\n", + "age1=10\n", + "age2=12\n", + "diff=age1-age2 \n", + "# abs() function determines absolute value\n", + "diff=abs(diff) \n", + "#Result\n", + "print \"\\nThey are \",diff,\" years apart.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "They are 2 years apart.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_By_Example_by_Greg__M._Perry/Chapter6_3.ipynb b/C++_By_Example_by_Greg__M._Perry/Chapter6_3.ipynb new file mode 100755 index 00000000..0905d8e9 --- /dev/null +++ b/C++_By_Example_by_Greg__M._Perry/Chapter6_3.ipynb @@ -0,0 +1,1457 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d11a5d1aed8c464716c568d4d8be1f78c4ea2b8f130a5adc4fa9ba5c3703fc04" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Arrays and pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23ARA1, Page number:482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s_name=\"Tri Star University\"\n", + "scores = [88.7,90.4,76.0,97.0,100.0,86.7] #integer array\n", + "average=0.0\n", + "for ctr in range(0,6,1): #computes total of scores\n", + " average+=scores[ctr]\n", + "average/=float(6) #computes the average\n", + "print \"At \",s_name,\", your class average is \",'%.2f' %average,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At Tri Star University , your class average is 89.80 \n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23ARA2, Page number:483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def pr_scores(scores):\n", + " print \"Here are your scores:\\n\"\n", + " for ctr in range(0,6,1):\n", + " print '%.2f' %scores[ctr],\"\\n\" \n", + "s_name=\"Tri Star University\"\n", + "scores = [88.7,90.4,76.0,97.0,100.0,86.7] #integer array\n", + "average=0.0\n", + "pr_scores(scores) #Function call to print scores\n", + "for ctr in range(0,6,1): #computes total of scores\n", + " average+=scores[ctr]\n", + "average/=float(6) #computes the average\n", + "print \"At \",s_name,\", your class average is \",'%.2f' %average,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are your scores:\n", + "\n", + "88.70 \n", + "\n", + "90.40 \n", + "\n", + "76.00 \n", + "\n", + "97.00 \n", + "\n", + "100.00 \n", + "\n", + "86.70 \n", + "\n", + "At Tri Star University , your class average is 89.80 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23ARA3, Page number:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "CLASS_NUM=6\n", + "def pr_scores(scores): #Function definition \n", + " print \"Here are your scores:\\n\"\n", + " for ctr in range(0,CLASS_NUM,1):\n", + " print '%.2f' %scores[ctr],\"\\n\" \n", + "s_name=\"Tri Star University\"\n", + "scores = [88.7,90.4,76.0,97.0,100.0,86.7] #Integer array\n", + "average=0.0\n", + "pr_scores(scores) #Function call to print scores\n", + "for ctr in range(0,CLASS_NUM,1): #Computes total of scores\n", + " average+=scores[ctr]\n", + "average/=float(6) #Computes the average\n", + "print \"At \",s_name,\", your class average is \",'%.2f' %average,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are your scores:\n", + "\n", + "88.70 \n", + "\n", + "90.40 \n", + "\n", + "76.00 \n", + "\n", + "97.00 \n", + "\n", + "100.00 \n", + "\n", + "86.70 \n", + "\n", + "At Tri Star University , your class average is 89.80 \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23ARA4, Page number:487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUM_TEMPS=10\n", + "temps=[]\n", + "#Adding values into temps variable\n", + "temps.append(78.6)\n", + "temps.append(82.1)\n", + "temps.append(79.5)\n", + "temps.append(75.0)\n", + "temps.append(75.4)\n", + "temps.append(71.8)\n", + "temps.append(73.3)\n", + "temps.append(69.5)\n", + "temps.append(74.1)\n", + "temps.append(75.7)\n", + "#Print the temperatures\n", + "print \"Daily temperatures for the last \",NUM_TEMPS,\"days:\\n\"\n", + "for ctr in range(0,NUM_TEMPS,1):\n", + " print '%.2f' %temps[ctr],\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Daily temperatures for the last 10 days:\n", + "\n", + "78.60 \n", + "\n", + "82.10 \n", + "\n", + "79.50 \n", + "\n", + "75.00 \n", + "\n", + "75.40 \n", + "\n", + "71.80 \n", + "\n", + "73.30 \n", + "\n", + "69.50 \n", + "\n", + "74.10 \n", + "\n", + "75.70 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23TOT, Page number:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUM=8\n", + "nums=[]\n", + "total=0\n", + "for ctr in range(0,NUM,1):\n", + " print \"Please enter the next number...\",\n", + " nums.append(input())\n", + " total+=nums[ctr]\n", + "#Prints the sum of eight values \n", + "print \"The total of the numbers is \",total,\"\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Please enter the next number..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total of the numbers is 36 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C23SAL, Page number:489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUM=12\n", + "sales=[] \n", + "print \"Please enter the twelve monthly sales values\\n\"\n", + "#Fill the array with input values entered by the user\n", + "for ctr in range(0,NUM,1):\n", + " print \"What are sales for month number \",ctr+1,\"?\\n\"\n", + " sales.append(input())\n", + "#for ctr in range(0,25,1):\n", + "# print \"\\n\" #Clears the screen\n", + "print \"\\n\\n*** Sales Printing Program ***\\n\"\n", + "print \"Prints any sales from the last \",NUM,\" months\\n\"\n", + "ans='Y'\n", + "while ans=='Y':\n", + " print \"For what month (1-\",NUM,\") do you want to see a sales value? \" \n", + " req_month=input()\n", + " print \"\\nMonth \",req_month,\"'s sales are\",'%.2f' %sales[req_month-1]\n", + " print \"\\nDo you want to see another (Y/N)? \"\n", + " ans=raw_input().upper()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the twelve monthly sales values\n", + "\n", + "What are sales for month number 1 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "363.25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 2 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "433.22\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 3 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "652.36\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 4 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "445.52\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 5 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "123.45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 6 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "780.2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 7 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "125.36\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 8 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "425.15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 9 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "325.96\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 10 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "109.75\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 11 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "123.65\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What are sales for month number 12 ?\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "253.84\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "*** Sales Printing Program ***\n", + "\n", + "Prints any sales from the last 12 months\n", + "\n", + "For what month (1- 12 ) do you want to see a sales value? \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Month 2 's sales are 433.22\n", + "\n", + "Do you want to see another (Y/N)? \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For what month (1- 12 ) do you want to see a sales value? \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Month 5 's sales are 123.45\n", + "\n", + "Do you want to see another (Y/N)? \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "n\n" + ] + } + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C24HIGH, Page number:496" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=15 #Maximum size of array\n", + "ara=[None]*SIZE #Empty Array declaration with maximum size\n", + "ara=[5,2,7,8,36,4,2,86,11,43,22,12,45,6,85]\n", + "high_val=ara[0] #initialize wit first array element\n", + "for ctr in range(1,SIZE,1):\n", + " if ara[ctr]>high_val: #Compares with rest of the elements in the array \n", + " high_val=ara[ctr] #Stores higher value in high_val\n", + "print \"The highest number in the list is \",high_val,\".\\n\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The highest number in the list is 86 .\n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C24HILO, Page number:498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Maximum size of array\n", + "SIZE=15 \n", + "#Initialize empty array\n", + "ara=[None]*SIZE \n", + "#Fill array with random numbers from 0 to 99\n", + "import random\n", + "for ctr in range(0,SIZE,1):\n", + " ara[ctr]=random.randint(0,99) %100 \n", + "print \"Here are the \",SIZE,\"random numbers:\\n\" \n", + "for ctr in range(0,SIZE,1):\n", + " print ara[ctr],\"\\n\" #Prints the array \n", + "print \"\\n\\n\"\n", + "#Initialize first element to both high_val and low_val\n", + "high_val=ara[0] \n", + "low_val=ara[0]\n", + "for ctr in range(1,SIZE,1):\n", + " if ara[ctr]>high_val: #Compares with rest of the elements in the array\n", + " high_val=ara[ctr] #Stores higher valure in high_val\n", + " if ara[ctr]ara[ctr2]: #Swap if this part is not in order\n", + " temp=ara[ctr1] #Temporary variable to swap\n", + " ara[ctr1]=ara[ctr2]\n", + " ara[ctr2]=temp\n", + "ara=[None]*MAX\n", + "fill_array(ara)\n", + "print \"Here are the unsorted numbers:\\n\"\n", + "print_array(ara) #Prints the unsorted array\n", + "sort_array(ara) #Sorts the array in ascending order\n", + "print \"\\n\\nHere are the sorted numbers:\\n\"\n", + "print_array(ara) #Prints the sorted array" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the unsorted numbers:\n", + "\n", + "68 \n", + "\n", + "41 \n", + "\n", + "53 \n", + "\n", + "40 \n", + "\n", + "69 \n", + "\n", + "65 \n", + "\n", + "64 \n", + "\n", + "48 \n", + "\n", + "87 \n", + "\n", + "18 \n", + "\n", + "\n", + "\n", + "Here are the sorted numbers:\n", + "\n", + "18 \n", + "\n", + "40 \n", + "\n", + "41 \n", + "\n", + "48 \n", + "\n", + "53 \n", + "\n", + "64 \n", + "\n", + "65 \n", + "\n", + "68 \n", + "\n", + "69 \n", + "\n", + "87 \n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "C24SORT2, Page number:506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX=10\n", + "#Fill array with random numbers from 0 to 99\n", + "def fill_array(ara):\n", + " import random\n", + " for ctr in range(0,MAX,1):\n", + " ara[ctr]=random.randint(0,99) %100\n", + "#Prints the array ara[]\n", + "def print_array(ara):\n", + " for ctr in range(0,MAX,1):\n", + " print ara[ctr],\"\\n\"\n", + "#Sorts the array\n", + "def sort_array(ara):\n", + " for ctr1 in range(0,MAX-1,1):\n", + " for ctr2 in range(ctr1+1,MAX,1):\n", + " if ara[ctr1]0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #desstructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index (X)/Y= ',XbyY2\n", + "print ''\n", + "print 'static cast (',Y,')=>',\n", + "printGrade(g)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MyException desstructor called \n", + "X/Y= 33\n", + "static cast (X)/Y= 33\n", + "\n", + "static cast ( 3 )=> Grade B\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 11.10, page no: 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X: #polymorphic class\n", + " def __init__(self):\n", + " self.__x=0\n", + " def __del__(self): #virtual destructor\n", + " pass\n", + " def vf1(): #virtual function\n", + " pass\n", + " \n", + "class Y(X): #derived class\n", + " def __init__(self):\n", + " X.__init__(self)\n", + " \n", + " def __del__(self): \n", + " pass\n", + " \n", + "#try: #start a try block\n", + "try: \n", + " px1=[X()]\n", + " px2=[X()]\n", + " px1.append(X())\n", + " px2.append(X())\n", + " py1=[Y()]\n", + " py2=[Y()]\n", + " \n", + "\n", + " print 'Initially: px1= ',id(px1),\n", + " print ', px2= ',id(px2)\n", + " print ''\n", + " py1=px1\n", + " py2=px2\n", + " \n", + " print 'Result of dynamic cast: '\n", + " print 'py1= px1 gets ',id(py1), ', py2=px2 gets ',id(py2)\n", + " print ''\n", + " py1=px1\n", + " py2=px2\n", + " print 'Result of static cast: '\n", + " print 'py1= px1 gets ',id(py1), ', py2=px2 gets ',id(py2)\n", + "except Exception,e: #catch block\n", + " print \"Allocation failure.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initially: px1= 66575944 , px2= 66575432\n", + "\n", + "Result of dynamic cast: \n", + "py1= px1 gets 66575944 , py2=px2 gets 66575432\n", + "\n", + "Result of static cast: \n", + "py1= px1 gets 66575944 , py2=px2 gets 66575432\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 11.11, page no: 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X: #base class\n", + " def __init__(self):\n", + " self.__x=0\n", + " def __del__(self):\n", + " pass\n", + " \n", + "class Y(X): #derived class\n", + " def __init__(self):\n", + " X.__init__(self)\n", + " def __del__(self):\n", + " pass\n", + " \n", + "xobj=X()\n", + "yobj=Y()\n", + "pxobj1=[X()]\n", + "pxobj2=[X()]\n", + "pxobj1[0]=X()\n", + "pxobj2[0]=X()\n", + "print 'type of xobj= ',xobj.__class__.__name__ #typeid(xobj).name()\n", + "print 'type of yobj= ',yobj.__class__.__name__ #typeid(yobj).name()\n", + "print 'type of pxobj1= ',pxobj1[0].__class__.__name__ #typeid(pxobj1).name()\n", + "print 'type of pxobj2= ',pxobj2[0].__class__.__name__ #typeid(pxobj2).name()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "type of xobj= X\n", + "type of yobj= Y\n", + "type of pxobj1= X\n", + "type of pxobj2= X\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter11AdvancedConcepts_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter11AdvancedConcepts_2.ipynb new file mode 100755 index 00000000..55ea4faf --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter11AdvancedConcepts_2.ipynb @@ -0,0 +1,1117 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9b963e9674847652a77e99bb1d9d3f919706a31dc8545e79abcd62814aa9c9da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Advanced Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 11.1, page no: 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Array:\n", + " def __init__(self,size=0): #constructor being called\n", + " print 'Constructor called'\n", + " self._length=size\n", + " if size>0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #destructor being called\n", + " del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index0:\n", + " self._arr=[]*self._length #size intialised\n", + " else:\n", + " self._length=0\n", + " self._arr=[]\n", + " \n", + " def __del__(self): #desstructor being called\n", + " print 'Destructor called'\n", + " \n", + " #del self._arr\n", + " \n", + " #Implementing the [] overloading\n", + " def op1(self,index):\n", + " if (index>=0 and index (X)/Y= ',XbyY2\n", + "print ''\n", + "print 'static cast (',Y,')=>',\n", + "printGrade(g)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MyException desstructor called \n", + "X/Y= 33\n", + "static cast (X)/Y= 33\n", + "\n", + "static cast ( 3 )=> Grade B\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 11.10, page no: 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X: #polymorphic class\n", + " def __init__(self):\n", + " self.__x=0\n", + " def __del__(self): #virtual destructor\n", + " pass\n", + " def vf1(): #virtual function\n", + " pass\n", + " \n", + "class Y(X): #derived class\n", + " def __init__(self):\n", + " X.__init__(self)\n", + " \n", + " def __del__(self): \n", + " pass\n", + " \n", + "#try: #start a try block\n", + "try: \n", + " px1=[X()]\n", + " px2=[X()]\n", + " px1.append(X())\n", + " px2.append(X())\n", + " py1=[Y()]\n", + " py2=[Y()]\n", + " \n", + "\n", + " print 'Initially: px1= ',id(px1),\n", + " print ', px2= ',id(px2)\n", + " print ''\n", + " py1=px1\n", + " py2=px2\n", + " \n", + " print 'Result of dynamic cast: '\n", + " print 'py1= px1 gets ',id(py1), ', py2=px2 gets ',id(py2)\n", + " print ''\n", + " py1=px1\n", + " py2=px2\n", + " print 'Result of static cast: '\n", + " print 'py1= px1 gets ',id(py1), ', py2=px2 gets ',id(py2)\n", + "except Exception,e: #catch block\n", + " print \"Allocation failure.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initially: px1= 66575944 , px2= 66575432\n", + "\n", + "Result of dynamic cast: \n", + "py1= px1 gets 66575944 , py2=px2 gets 66575432\n", + "\n", + "Result of static cast: \n", + "py1= px1 gets 66575944 , py2=px2 gets 66575432\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 11.11, page no: 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X: #base class\n", + " def __init__(self):\n", + " self.__x=0\n", + " def __del__(self):\n", + " pass\n", + " \n", + "class Y(X): #derived class\n", + " def __init__(self):\n", + " X.__init__(self)\n", + " def __del__(self):\n", + " pass\n", + " \n", + "xobj=X()\n", + "yobj=Y()\n", + "pxobj1=[X()]\n", + "pxobj2=[X()]\n", + "pxobj1[0]=X()\n", + "pxobj2[0]=X()\n", + "print 'type of xobj= ',xobj.__class__.__name__ #typeid(xobj).name()\n", + "print 'type of yobj= ',yobj.__class__.__name__ #typeid(yobj).name()\n", + "print 'type of pxobj1= ',pxobj1[0].__class__.__name__ #typeid(pxobj1).name()\n", + "print 'type of pxobj2= ',pxobj2[0].__class__.__name__ #typeid(pxobj2).name()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "type of xobj= X\n", + "type of yobj= Y\n", + "type of pxobj1= X\n", + "type of pxobj2= X\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_1.ipynb new file mode 100755 index 00000000..5f0f0623 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_1.ipynb @@ -0,0 +1,584 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37eeb7256369ef346bafd66acd720e47dda1065c992d84bc8f397c4ba71e952b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: the Standard Library in C++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.1, page no: 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "FormatString=[] #for taking input\n", + "a=10\n", + "b=20\n", + "c=a+b\n", + "print 'ok...I have added them: ', a,'+' ,b,'=',c\n", + "print 'Now you tell me your format string',\n", + "print '(Max 40 characters)'\n", + "print 'I will use that to show input numbers',\n", + "print 'and their sum'\n", + "sys.stdout.flush() #fflush stdin \n", + "FormatString='The sum of two numbers'\n", + "print FormatString,a,'and',b,'is',c #displaying the numbers and their sum\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ok...I have added them: 10 + 20 = 30\n", + "Now you tell me your format string (Max 40 characters)\n", + "I will use that to show input numbers and their sum\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of two numbers 10 and 20 is 30\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.2, page no: 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaration\n", + "value=100\n", + "print 'The decimal value is: ',value\n", + "print 'The octal value is: ',oct(value)\n", + "print 'The hexadecimal value is: ',hex(value)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal value is: 100\n", + "The octal value is: 0144\n", + "The hexadecimal value is: 0x64\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.3, page no: 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "PI=22.0/7.0\n", + "print '123456789012345678901234567890'\n", + "print ''\n", + "f=0.0\n", + "\n", + "while f<6.28571428:\n", + " print '{0:>8.3f}'.format(f), #width(8)\n", + " print '{0:>13.4}'.format(math.sin(f)) #width(13)\n", + " f+=0.52380952\n", + "print ''\n", + "print 'sin(2.0*PI)=',math.sin(2.0*PI)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "123456789012345678901234567890\n", + "\n", + " 0.000 0.0\n", + " 0.524 0.5002\n", + " 1.048 0.8662\n", + " 1.571 1.0\n", + " 2.095 0.8656\n", + " 2.619 0.4991\n", + " 3.143 -0.001264\n", + " 3.667 -0.5013\n", + " 4.190 -0.8669\n", + " 4.714 -1.0\n", + " 5.238 -0.865\n", + " 5.762 -0.498\n", + " 6.286 0.002529\n", + "\n", + "sin(2.0*PI)= 0.00252897583892\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.4, page no: 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import string \n", + "print '1234567890123456789012345678901234567890'\n", + "print '{:*>10}'.format(100)\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "if(-12.34567>0):\n", + " i='{0:>15.3e}'.format(-12.34567) #for ios::scientific\n", + " i='+'+i\n", + " print i\n", + "else :\n", + " print '{0:e}'.format(123.23)\n", + "i='{0:*>15.3f}'.format(-12.34567) #for ios::scientific\n", + "\n", + "print i\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "print '{0:*>+10.3f}'.format(275.5) #for ios::showpos\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "print '{:.>5}'.format('n'), #for ios::fill\n", + "print '{:.>15}'.format(\"inverse_of_n\"),\n", + "print '{:.>15}'.format(\"sum_of_terms\")\n", + "\n", + "sum=0\n", + "n=1\n", + "for n in xrange(1,11):\n", + " term=1.0/float(n)\n", + " sum+=term\n", + " print '+{:.>5}'.format(n),\n", + " print '{:.>14.4f}+'.format(term),\n", + " i='{0:.>13.4f}'.format(sum) #for ios::scientific\n", + " # i='+'+i\n", + " print i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1234567890123456789012345678901234567890\n", + "*******100\n", + "\n", + "1234567890123456789012345678901234567890\n", + "1.232300e+02\n", + "********-12.346\n", + "\n", + "1234567890123456789012345678901234567890\n", + "**+275.500\n", + "\n", + "1234567890123456789012345678901234567890\n", + "....n ...inverse_of_n ...sum_of_terms\n", + "+....1 ........1.0000+ .......1.0000\n", + "+....2 ........0.5000+ .......1.5000\n", + "+....3 ........0.3333+ .......1.8333\n", + "+....4 ........0.2500+ .......2.0833\n", + "+....5 ........0.2000+ .......2.2833\n", + "+....6 ........0.1667+ .......2.4500\n", + "+....7 ........0.1429+ .......2.5929\n", + "+....8 ........0.1250+ .......2.7179\n", + "+....9 ........0.1111+ .......2.8290\n", + "+...10 ........0.1000+ .......2.9290\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.5, page no: 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def currency(s):\n", + " i='Rs.'\n", + " return i\n", + "\n", + "def form(s):\n", + " i= '{:.>+10.2f}'.format(s) #showpoint,fill,precision\n", + " \n", + " return i\n", + "\n", + "print currency(1234.5),form(1234.5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs. ..+1234.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.6, page no: 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str = raw_input('please input a line of message: ') \n", + "print str #display" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input a line of message: hello, do you like C++ I/O\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hello, do you like C++ I/O\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.7, page no: 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=40\n", + "line=[]*SIZE\n", + "str = raw_input('please input a line terminated by .: ')\n", + "if str!='.':\n", + " print str #display" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input a line terminated by .: I am line\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I am line\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.8, page no: 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "infile=open(\"TEST.txt\",\"r\")\n", + "#open file for reading\n", + "\n", + "ch=infile.read(1)\n", + "\n", + "while ch != '': #reading file\n", + " print ch,\n", + " ch=infile.read(1)\n", + " \n", + "infile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 0 2 0 \n", + "3 0 4 0 \n", + "5 0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.9, page no: 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "data1 = input(\"Please input a number: \") #user input \n", + "data2 = input(\"Please input another number: \") #user input \n", + "\n", + "print 'Now I will add your numbers:',data1,'and',data2\n", + "\n", + "data3 = data1 + data2\n", + "\n", + "print 'And the result of this addition is:',data3\n", + "\n", + "print 'now I will store all these numbers (comma seperated) \\nIn file TEST.txt'\n", + "\n", + "outfile = open('TEST.txt','w')\n", + "\n", + "outfile.write(str(data1)) #writing in file\n", + "outfile.write(',')\n", + "outfile.write(str(data2))\n", + "outfile.write(',')\n", + "outfile.write(str(data3))\n", + "\n", + "print 'Now I will close the file TEST.txt'\n", + "outfile.close()\n", + "\n", + "\n", + "print 'Now I will reopen the file TEST.txt'\n", + "infile = open('TEST.txt','r')\n", + "\n", + "a = infile.read(len(str(data1))) #reading from file\n", + "b = infile.read(1)\n", + "c = infile.read(len(str(data2)))\n", + "d = infile.read(1)\n", + "e = infile.read(len(str(data3)))\n", + "\n", + "print 'value retrieved in first line is',\n", + "print a,b,c,d,e\n", + "\n", + "infile.close() #closing the file\n", + "\n", + "print 'And the retrieved data are:'\n", + "print a\n", + "print c\n", + "print e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Now I will add your numbers: 40 and 50\n", + "And the result of this addition is: 90\n", + "now I will store all these numbers (comma seperated) \n", + "In file TEST.txt\n", + "Now I will close the file TEST.txt\n", + "Now I will reopen the file TEST.txt\n", + "value retrieved in first line is 40 , 50 , 90\n", + "And the retrieved data are:\n", + "40\n", + "50\n", + "90\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.10, page no: 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "data1 = input(\"Please input a number: \") #user input \n", + "data2 = input(\"Please input another number: \") #user input \n", + "\n", + "print 'Now I will add your numbers:',data1,'and',data2\n", + "\n", + "data3 = data1 + data2\n", + "\n", + "print 'And the result of this addition is:',data3\n", + "\n", + "print 'now I will store all these numbers (comma seperated) \\nIn file TEST.txt'\n", + "\n", + "outfile = open('TEST.txt','w')\n", + "\n", + "outfile.write(str(data1)) #writing in file\n", + "outfile.write(',')\n", + "outfile.write(str(data2))\n", + "outfile.write(',')\n", + "outfile.write(str(data3))\n", + "\n", + "print 'Now I will close the file TEST.txt'\n", + "outfile.close()\n", + "\n", + "\n", + "print 'Now I will reopen the file TEST.txt'\n", + "infile = open('TEST.txt','r')\n", + "\n", + "a = infile.read(len(str(data1))) #reading from file\n", + "b = infile.read(1)\n", + "c = infile.read(len(str(data2)))\n", + "d = infile.read(1)\n", + "e = infile.read(len(str(data3)))\n", + "\n", + "print 'value retrieved in first line is',\n", + "print a,b,c,d,e\n", + "\n", + "infile.close() #closing the file\n", + "\n", + "print 'And the retrieved data are:'\n", + "print a\n", + "print c\n", + "print e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Now I will add your numbers: 40 and 50\n", + "And the result of this addition is: 90\n", + "now I will store all these numbers (comma seperated) \n", + "In file TEST.txt\n", + "Now I will close the file TEST.txt\n", + "Now I will reopen the file TEST.txt\n", + "value retrieved in first line is 40 , 50 , 90\n", + "And the retrieved data are:\n", + "40\n", + "50\n", + "90\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_2.ipynb new file mode 100755 index 00000000..5f0f0623 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter12theStandardLibraryinc++_2.ipynb @@ -0,0 +1,584 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37eeb7256369ef346bafd66acd720e47dda1065c992d84bc8f397c4ba71e952b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: the Standard Library in C++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.1, page no: 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "FormatString=[] #for taking input\n", + "a=10\n", + "b=20\n", + "c=a+b\n", + "print 'ok...I have added them: ', a,'+' ,b,'=',c\n", + "print 'Now you tell me your format string',\n", + "print '(Max 40 characters)'\n", + "print 'I will use that to show input numbers',\n", + "print 'and their sum'\n", + "sys.stdout.flush() #fflush stdin \n", + "FormatString='The sum of two numbers'\n", + "print FormatString,a,'and',b,'is',c #displaying the numbers and their sum\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ok...I have added them: 10 + 20 = 30\n", + "Now you tell me your format string (Max 40 characters)\n", + "I will use that to show input numbers and their sum\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of two numbers 10 and 20 is 30\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.2, page no: 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaration\n", + "value=100\n", + "print 'The decimal value is: ',value\n", + "print 'The octal value is: ',oct(value)\n", + "print 'The hexadecimal value is: ',hex(value)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal value is: 100\n", + "The octal value is: 0144\n", + "The hexadecimal value is: 0x64\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.3, page no: 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "PI=22.0/7.0\n", + "print '123456789012345678901234567890'\n", + "print ''\n", + "f=0.0\n", + "\n", + "while f<6.28571428:\n", + " print '{0:>8.3f}'.format(f), #width(8)\n", + " print '{0:>13.4}'.format(math.sin(f)) #width(13)\n", + " f+=0.52380952\n", + "print ''\n", + "print 'sin(2.0*PI)=',math.sin(2.0*PI)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "123456789012345678901234567890\n", + "\n", + " 0.000 0.0\n", + " 0.524 0.5002\n", + " 1.048 0.8662\n", + " 1.571 1.0\n", + " 2.095 0.8656\n", + " 2.619 0.4991\n", + " 3.143 -0.001264\n", + " 3.667 -0.5013\n", + " 4.190 -0.8669\n", + " 4.714 -1.0\n", + " 5.238 -0.865\n", + " 5.762 -0.498\n", + " 6.286 0.002529\n", + "\n", + "sin(2.0*PI)= 0.00252897583892\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.4, page no: 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import string \n", + "print '1234567890123456789012345678901234567890'\n", + "print '{:*>10}'.format(100)\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "if(-12.34567>0):\n", + " i='{0:>15.3e}'.format(-12.34567) #for ios::scientific\n", + " i='+'+i\n", + " print i\n", + "else :\n", + " print '{0:e}'.format(123.23)\n", + "i='{0:*>15.3f}'.format(-12.34567) #for ios::scientific\n", + "\n", + "print i\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "print '{0:*>+10.3f}'.format(275.5) #for ios::showpos\n", + "print ''\n", + "\n", + "print '1234567890123456789012345678901234567890'\n", + "print '{:.>5}'.format('n'), #for ios::fill\n", + "print '{:.>15}'.format(\"inverse_of_n\"),\n", + "print '{:.>15}'.format(\"sum_of_terms\")\n", + "\n", + "sum=0\n", + "n=1\n", + "for n in xrange(1,11):\n", + " term=1.0/float(n)\n", + " sum+=term\n", + " print '+{:.>5}'.format(n),\n", + " print '{:.>14.4f}+'.format(term),\n", + " i='{0:.>13.4f}'.format(sum) #for ios::scientific\n", + " # i='+'+i\n", + " print i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1234567890123456789012345678901234567890\n", + "*******100\n", + "\n", + "1234567890123456789012345678901234567890\n", + "1.232300e+02\n", + "********-12.346\n", + "\n", + "1234567890123456789012345678901234567890\n", + "**+275.500\n", + "\n", + "1234567890123456789012345678901234567890\n", + "....n ...inverse_of_n ...sum_of_terms\n", + "+....1 ........1.0000+ .......1.0000\n", + "+....2 ........0.5000+ .......1.5000\n", + "+....3 ........0.3333+ .......1.8333\n", + "+....4 ........0.2500+ .......2.0833\n", + "+....5 ........0.2000+ .......2.2833\n", + "+....6 ........0.1667+ .......2.4500\n", + "+....7 ........0.1429+ .......2.5929\n", + "+....8 ........0.1250+ .......2.7179\n", + "+....9 ........0.1111+ .......2.8290\n", + "+...10 ........0.1000+ .......2.9290\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.5, page no: 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def currency(s):\n", + " i='Rs.'\n", + " return i\n", + "\n", + "def form(s):\n", + " i= '{:.>+10.2f}'.format(s) #showpoint,fill,precision\n", + " \n", + " return i\n", + "\n", + "print currency(1234.5),form(1234.5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs. ..+1234.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.6, page no: 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "str = raw_input('please input a line of message: ') \n", + "print str #display" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input a line of message: hello, do you like C++ I/O\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hello, do you like C++ I/O\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.7, page no: 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=40\n", + "line=[]*SIZE\n", + "str = raw_input('please input a line terminated by .: ')\n", + "if str!='.':\n", + " print str #display" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input a line terminated by .: I am line\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I am line\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.8, page no: 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "infile=open(\"TEST.txt\",\"r\")\n", + "#open file for reading\n", + "\n", + "ch=infile.read(1)\n", + "\n", + "while ch != '': #reading file\n", + " print ch,\n", + " ch=infile.read(1)\n", + " \n", + "infile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 0 2 0 \n", + "3 0 4 0 \n", + "5 0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.9, page no: 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "data1 = input(\"Please input a number: \") #user input \n", + "data2 = input(\"Please input another number: \") #user input \n", + "\n", + "print 'Now I will add your numbers:',data1,'and',data2\n", + "\n", + "data3 = data1 + data2\n", + "\n", + "print 'And the result of this addition is:',data3\n", + "\n", + "print 'now I will store all these numbers (comma seperated) \\nIn file TEST.txt'\n", + "\n", + "outfile = open('TEST.txt','w')\n", + "\n", + "outfile.write(str(data1)) #writing in file\n", + "outfile.write(',')\n", + "outfile.write(str(data2))\n", + "outfile.write(',')\n", + "outfile.write(str(data3))\n", + "\n", + "print 'Now I will close the file TEST.txt'\n", + "outfile.close()\n", + "\n", + "\n", + "print 'Now I will reopen the file TEST.txt'\n", + "infile = open('TEST.txt','r')\n", + "\n", + "a = infile.read(len(str(data1))) #reading from file\n", + "b = infile.read(1)\n", + "c = infile.read(len(str(data2)))\n", + "d = infile.read(1)\n", + "e = infile.read(len(str(data3)))\n", + "\n", + "print 'value retrieved in first line is',\n", + "print a,b,c,d,e\n", + "\n", + "infile.close() #closing the file\n", + "\n", + "print 'And the retrieved data are:'\n", + "print a\n", + "print c\n", + "print e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Now I will add your numbers: 40 and 50\n", + "And the result of this addition is: 90\n", + "now I will store all these numbers (comma seperated) \n", + "In file TEST.txt\n", + "Now I will close the file TEST.txt\n", + "Now I will reopen the file TEST.txt\n", + "value retrieved in first line is 40 , 50 , 90\n", + "And the retrieved data are:\n", + "40\n", + "50\n", + "90\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 12.10, page no: 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "data1 = input(\"Please input a number: \") #user input \n", + "data2 = input(\"Please input another number: \") #user input \n", + "\n", + "print 'Now I will add your numbers:',data1,'and',data2\n", + "\n", + "data3 = data1 + data2\n", + "\n", + "print 'And the result of this addition is:',data3\n", + "\n", + "print 'now I will store all these numbers (comma seperated) \\nIn file TEST.txt'\n", + "\n", + "outfile = open('TEST.txt','w')\n", + "\n", + "outfile.write(str(data1)) #writing in file\n", + "outfile.write(',')\n", + "outfile.write(str(data2))\n", + "outfile.write(',')\n", + "outfile.write(str(data3))\n", + "\n", + "print 'Now I will close the file TEST.txt'\n", + "outfile.close()\n", + "\n", + "\n", + "print 'Now I will reopen the file TEST.txt'\n", + "infile = open('TEST.txt','r')\n", + "\n", + "a = infile.read(len(str(data1))) #reading from file\n", + "b = infile.read(1)\n", + "c = infile.read(len(str(data2)))\n", + "d = infile.read(1)\n", + "e = infile.read(len(str(data3)))\n", + "\n", + "print 'value retrieved in first line is',\n", + "print a,b,c,d,e\n", + "\n", + "infile.close() #closing the file\n", + "\n", + "print 'And the retrieved data are:'\n", + "print a\n", + "print c\n", + "print e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Now I will add your numbers: 40 and 50\n", + "And the result of this addition is: 90\n", + "now I will store all these numbers (comma seperated) \n", + "In file TEST.txt\n", + "Now I will close the file TEST.txt\n", + "Now I will reopen the file TEST.txt\n", + "value retrieved in first line is 40 , 50 , 90\n", + "And the retrieved data are:\n", + "40\n", + "50\n", + "90\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_1.ipynb new file mode 100755 index 00000000..e63f3bcb --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_1.ipynb @@ -0,0 +1,442 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:715d7d72c30c6f1cf7da025e43a7c11728abc2b19ab8a6c09ad2281eefe9133e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Data Structures and Applications in c++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 13.1, page no: 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(SORTEDASCENDING,SORTEDDESCENDING,UNSORTED) = (0,1,2) #enum declared\n", + "\n", + "INSERT_AT_END = -1\n", + "INSERT_SORT_ASCENDING = -2\n", + "INSERT_SORT_DESCENDING = -3\n", + "\n", + "class NODE: #class declared\n", + " \n", + " def __init__(self,d=None): #constructor\n", + " self.__data = d\n", + " self.__next = None\n", + " \n", + " def __del__(self): #destructor\n", + " self.purge()\n", + " \n", + " def search(self,d):\n", + " \n", + " if self.__data == d:\n", + " return self\n", + " \n", + " elif self.__next == None:\n", + " return None\n", + " \n", + " else:\n", + " return self.__next.search(d)\n", + " \n", + " def remove(self,d): #remove function\n", + " \n", + " n = NODE() #NODE *n\n", + " \n", + " if self.__data == d:\n", + " return self.__next\n", + " \n", + " else:\n", + " \n", + " if not self.__next == None:\n", + " n = self.__next.remove(d)\n", + " \n", + " if not n==self.__next:\n", + " del self.__next\n", + " return self\n", + " \n", + " def insertAtEnd(self,n): #insert function\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " self.__next.insertAtEnd(n)\n", + " \n", + " return False\n", + " \n", + " \n", + " def insert(self,n,pos): #insert function\n", + " \n", + " if pos == INSERT_AT_END:\n", + " self.insertAtEnd(n)\n", + " \n", + " elif pos == INSERT_SORT_ASCENDING:\n", + " \n", + " if (((pos == INSERT_SORT_ASCENDING)and(n.__dataself.__data))):\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if self.__next.insert(n,pos) == True:\n", + " self.__next = n\n", + " \n", + " \n", + " elif pos == INSERT_SORT_DESCENDING:\n", + " \n", + " if (((pos == INSERT_SORT_ASCENDING)and(n.__dataself.__data))):\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if self.__next.insert(n,pos) == True:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if pos == 0:\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " if self.__next.insert(n,pos-1) == True:\n", + " self.__next = n\n", + " \n", + " return False\n", + " \n", + " def Print(self): #print function\n", + " print self.__data,'->',\n", + " \n", + " if self.__next == None:\n", + " print 'NULL'\n", + " else:\n", + " self.__next.Print()\n", + " \n", + " def purge(self): #purge function\n", + " \n", + " if not self.__next == None:\n", + " del self.__next\n", + " self.__next = None\n", + " \n", + " \n", + "class LINKEDLIST: #class declared\n", + " \n", + " def __init__(self,Ord = UNSORTED): #constructor\n", + " \n", + " self.__header = NODE()\n", + " self.__order = Ord\n", + " \n", + " def __del__(self): #destructor\n", + " self.purge()\n", + " \n", + " \n", + " def search(self,d): #search \n", + " \n", + " if (not self.__header == None) and (not self.__header.search(d) == None):\n", + " return True\n", + " return False\n", + " \n", + " def remove(self,d): #remove\n", + " \n", + " n = NODE()\n", + " \n", + " if not self.__header == None:\n", + " n = self.__header.remove(d)\n", + " \n", + " if not n==self.__header:\n", + " del self.__header\n", + " self.__header = n\n", + " \n", + " \n", + " def insert(self,d,pos = UNSORTED):\n", + " \n", + " if self.__order == SORTEDASCENDING: #considering all cases and position\n", + " pos = INSERT_SORT_ASCENDING\n", + " \n", + " elif self.__order == SORTEDDESCENDING:\n", + " pos = INSERT_SORT_DESCENDING\n", + " \n", + " n=[None]*d\n", + " \n", + " n = NODE(d)\n", + " \n", + " if self.__header == None or self.__header.insert(n,pos) == True:\n", + " self.__header = n\n", + " \n", + " \n", + " def Print(self): #printing the list\n", + " print '---------------------------------'\n", + " \n", + " if self.__header._NODE__next == None:\n", + " print 'Empty Linked List.....'\n", + " \n", + " else:\n", + " self.__header.Print()\n", + " \n", + " print '----------------------------------'\n", + " \n", + " \n", + " def purge(self):\n", + " \n", + " if not self.__header == None:\n", + " del self.__header\n", + " self.__header = None\n", + " \n", + " #variable declaration\n", + " \n", + "print 'Empty LinkedListCreated'\n", + "\n", + "aList = LINKEDLIST()\n", + "bList = LINKEDLIST(SORTEDASCENDING)\n", + "cList = LINKEDLIST(SORTEDDESCENDING)\n", + "\n", + "aList.Print()\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted at end'\n", + "\n", + "aList.insert(3, INSERT_AT_END)\n", + "aList.insert(5, INSERT_AT_END)\n", + "aList.insert(2, INSERT_AT_END)\n", + "\n", + "aList.Print()\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted in sort ascending order'\n", + "\n", + "bList.insert(3)\n", + "bList.insert(5)\n", + "bList.insert(2)\n", + "\n", + "bList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted in sort descending order'\n", + "\n", + "cList.insert(3)\n", + "cList.insert(5)\n", + "cList.insert(2)\n", + "\n", + "cList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted always (like stack) at the beginning'\n", + "aList.purge()\n", + "aList.insert(3,0)\n", + "aList.insert(5,0)\n", + "aList.insert(2,0)\n", + "aList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted at position 0, 1, 1 respectively'\n", + "aList.purge()\n", + "aList.insert(3,0)\n", + "aList.insert(5,1)\n", + "aList.insert(2,1)\n", + "aList.Print()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Empty LinkedListCreated\n", + "---------------------------------\n", + "Empty Linked List.....\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted at end\n", + "---------------------------------\n", + "None -> 3 -> 5 -> 2 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted in sort ascending order\n", + "---------------------------------\n", + "None -> 2 -> 3 -> 5 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted in sort descending order\n", + "---------------------------------\n", + "5 -> 3 -> 2 -> None -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted always (like stack) at the beginning\n", + "---------------------------------\n", + "2 -> 5 -> 3 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted at position 0, 1, 1 respectively\n", + "---------------------------------\n", + "3 -> 2 -> 5 -> NULL\n", + "----------------------------------\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 13.2, page no: 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(FALSE, TRUE)= (0,1) #enum declaration\n", + "\n", + "class Employee: #class employee declared\n", + " def __init__(self, nm=None, sal=0): #constructor\n", + " self.__name=None\n", + " if(nm!=None):\n", + " self.__name=[]\n", + " \n", + " self.__name.append(nm)\n", + " nm=self.__name\n", + " self.__salary=sal\n", + " \n", + " def __del__(self): #destructor\n", + " if(self.__name!=None):\n", + " del self.__name\n", + " \n", + " def display(self): #display function\n", + " if(self.__name==None):\n", + " print 'No Name available for employee'\n", + " print ''\n", + " else:\n", + " print 'Name of the employee: ',self.__name\n", + " \n", + " \n", + "class Manager(Employee): #derived class declared\n", + " def __init__(self, nm, sal): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " def display(self):\n", + " Employee.display(self)\n", + " print 'Employee type: Manager'\n", + " \n", + "class Programmer(Employee): #derived class declared\n", + " def __init__(self, nm, sal,lang): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " self.__language=None\n", + " if lang!=None:\n", + " self.__language=[len(lang)+1]\n", + " self.__language=lang\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def display(self): #display\n", + " Employee.display(self)\n", + " print 'Employee type: programmer'\n", + " if self.__language==None:\n", + " print 'Language known: None specific'\n", + " else:\n", + " print 'language known: ',self.__language\n", + " \n", + " \n", + "class Secretary(Employee): #derived class declared\n", + " def __init__(self, nm, sal,Isteno,typespeed): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " self.__steno=Isteno\n", + " self.__Typingspeed=typespeed\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def display(self): #displaying the characteristic of secretary\n", + " Employee.display(self)\n", + " print 'Employee type: Secretary'\n", + " if self.__steno== False:\n", + " print 'Cannot perform job of a steno'\n", + " else:\n", + " print 'can perform job of a steno'\n", + " print 'typing speed is: ',self.__Typingspeed\n", + " \n", + " \n", + " \n", + " #objects declared and initialised \n", + " \n", + "e=[Employee() for j in range(5)]\n", + "e[0]=Manager('A. Pal',1000)\n", + "e[1]=Programmer('D.Ghosh',6000,'C++')\n", + "e[2]=Programmer('R.Das',5000,'Java')\n", + "e[3]=Secretary('S.Ray',3000,False,40)\n", + "e[4]=Secretary('A.Chatterjee',2500,True,50)\n", + "for i in range(5):\n", + " e[i].display()\n", + "del e[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the employee: ['A. Pal']\n", + "Employee type: Manager\n", + "Name of the employee: ['D.Ghosh']\n", + "Employee type: programmer\n", + "language known: C++\n", + "Name of the employee: ['R.Das']\n", + "Employee type: programmer\n", + "language known: Java\n", + "Name of the employee: ['S.Ray']\n", + "Employee type: Secretary\n", + "Cannot perform job of a steno\n", + "typing speed is: 40\n", + "Name of the employee: ['A.Chatterjee']\n", + "Employee type: Secretary\n", + "can perform job of a steno\n", + "typing speed is: 50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_2.ipynb new file mode 100755 index 00000000..e63f3bcb --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter13DataStructuresandApplicationsinc++_2.ipynb @@ -0,0 +1,442 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:715d7d72c30c6f1cf7da025e43a7c11728abc2b19ab8a6c09ad2281eefe9133e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Data Structures and Applications in c++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 13.1, page no: 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(SORTEDASCENDING,SORTEDDESCENDING,UNSORTED) = (0,1,2) #enum declared\n", + "\n", + "INSERT_AT_END = -1\n", + "INSERT_SORT_ASCENDING = -2\n", + "INSERT_SORT_DESCENDING = -3\n", + "\n", + "class NODE: #class declared\n", + " \n", + " def __init__(self,d=None): #constructor\n", + " self.__data = d\n", + " self.__next = None\n", + " \n", + " def __del__(self): #destructor\n", + " self.purge()\n", + " \n", + " def search(self,d):\n", + " \n", + " if self.__data == d:\n", + " return self\n", + " \n", + " elif self.__next == None:\n", + " return None\n", + " \n", + " else:\n", + " return self.__next.search(d)\n", + " \n", + " def remove(self,d): #remove function\n", + " \n", + " n = NODE() #NODE *n\n", + " \n", + " if self.__data == d:\n", + " return self.__next\n", + " \n", + " else:\n", + " \n", + " if not self.__next == None:\n", + " n = self.__next.remove(d)\n", + " \n", + " if not n==self.__next:\n", + " del self.__next\n", + " return self\n", + " \n", + " def insertAtEnd(self,n): #insert function\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " self.__next.insertAtEnd(n)\n", + " \n", + " return False\n", + " \n", + " \n", + " def insert(self,n,pos): #insert function\n", + " \n", + " if pos == INSERT_AT_END:\n", + " self.insertAtEnd(n)\n", + " \n", + " elif pos == INSERT_SORT_ASCENDING:\n", + " \n", + " if (((pos == INSERT_SORT_ASCENDING)and(n.__dataself.__data))):\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if self.__next.insert(n,pos) == True:\n", + " self.__next = n\n", + " \n", + " \n", + " elif pos == INSERT_SORT_DESCENDING:\n", + " \n", + " if (((pos == INSERT_SORT_ASCENDING)and(n.__dataself.__data))):\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if self.__next.insert(n,pos) == True:\n", + " self.__next = n\n", + " \n", + " else:\n", + " \n", + " if pos == 0:\n", + " n.__next = self\n", + " return True\n", + " \n", + " else:\n", + " \n", + " if self.__next == None:\n", + " self.__next = n\n", + " \n", + " else:\n", + " if self.__next.insert(n,pos-1) == True:\n", + " self.__next = n\n", + " \n", + " return False\n", + " \n", + " def Print(self): #print function\n", + " print self.__data,'->',\n", + " \n", + " if self.__next == None:\n", + " print 'NULL'\n", + " else:\n", + " self.__next.Print()\n", + " \n", + " def purge(self): #purge function\n", + " \n", + " if not self.__next == None:\n", + " del self.__next\n", + " self.__next = None\n", + " \n", + " \n", + "class LINKEDLIST: #class declared\n", + " \n", + " def __init__(self,Ord = UNSORTED): #constructor\n", + " \n", + " self.__header = NODE()\n", + " self.__order = Ord\n", + " \n", + " def __del__(self): #destructor\n", + " self.purge()\n", + " \n", + " \n", + " def search(self,d): #search \n", + " \n", + " if (not self.__header == None) and (not self.__header.search(d) == None):\n", + " return True\n", + " return False\n", + " \n", + " def remove(self,d): #remove\n", + " \n", + " n = NODE()\n", + " \n", + " if not self.__header == None:\n", + " n = self.__header.remove(d)\n", + " \n", + " if not n==self.__header:\n", + " del self.__header\n", + " self.__header = n\n", + " \n", + " \n", + " def insert(self,d,pos = UNSORTED):\n", + " \n", + " if self.__order == SORTEDASCENDING: #considering all cases and position\n", + " pos = INSERT_SORT_ASCENDING\n", + " \n", + " elif self.__order == SORTEDDESCENDING:\n", + " pos = INSERT_SORT_DESCENDING\n", + " \n", + " n=[None]*d\n", + " \n", + " n = NODE(d)\n", + " \n", + " if self.__header == None or self.__header.insert(n,pos) == True:\n", + " self.__header = n\n", + " \n", + " \n", + " def Print(self): #printing the list\n", + " print '---------------------------------'\n", + " \n", + " if self.__header._NODE__next == None:\n", + " print 'Empty Linked List.....'\n", + " \n", + " else:\n", + " self.__header.Print()\n", + " \n", + " print '----------------------------------'\n", + " \n", + " \n", + " def purge(self):\n", + " \n", + " if not self.__header == None:\n", + " del self.__header\n", + " self.__header = None\n", + " \n", + " #variable declaration\n", + " \n", + "print 'Empty LinkedListCreated'\n", + "\n", + "aList = LINKEDLIST()\n", + "bList = LINKEDLIST(SORTEDASCENDING)\n", + "cList = LINKEDLIST(SORTEDDESCENDING)\n", + "\n", + "aList.Print()\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted at end'\n", + "\n", + "aList.insert(3, INSERT_AT_END)\n", + "aList.insert(5, INSERT_AT_END)\n", + "aList.insert(2, INSERT_AT_END)\n", + "\n", + "aList.Print()\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted in sort ascending order'\n", + "\n", + "bList.insert(3)\n", + "bList.insert(5)\n", + "bList.insert(2)\n", + "\n", + "bList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted in sort descending order'\n", + "\n", + "cList.insert(3)\n", + "cList.insert(5)\n", + "cList.insert(2)\n", + "\n", + "cList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted always (like stack) at the beginning'\n", + "aList.purge()\n", + "aList.insert(3,0)\n", + "aList.insert(5,0)\n", + "aList.insert(2,0)\n", + "aList.Print()\n", + "\n", + "\n", + "print 'Inserting 3, 5, 2 to be inserted at position 0, 1, 1 respectively'\n", + "aList.purge()\n", + "aList.insert(3,0)\n", + "aList.insert(5,1)\n", + "aList.insert(2,1)\n", + "aList.Print()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Empty LinkedListCreated\n", + "---------------------------------\n", + "Empty Linked List.....\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted at end\n", + "---------------------------------\n", + "None -> 3 -> 5 -> 2 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted in sort ascending order\n", + "---------------------------------\n", + "None -> 2 -> 3 -> 5 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted in sort descending order\n", + "---------------------------------\n", + "5 -> 3 -> 2 -> None -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted always (like stack) at the beginning\n", + "---------------------------------\n", + "2 -> 5 -> 3 -> NULL\n", + "----------------------------------\n", + "Inserting 3, 5, 2 to be inserted at position 0, 1, 1 respectively\n", + "---------------------------------\n", + "3 -> 2 -> 5 -> NULL\n", + "----------------------------------\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 13.2, page no: 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(FALSE, TRUE)= (0,1) #enum declaration\n", + "\n", + "class Employee: #class employee declared\n", + " def __init__(self, nm=None, sal=0): #constructor\n", + " self.__name=None\n", + " if(nm!=None):\n", + " self.__name=[]\n", + " \n", + " self.__name.append(nm)\n", + " nm=self.__name\n", + " self.__salary=sal\n", + " \n", + " def __del__(self): #destructor\n", + " if(self.__name!=None):\n", + " del self.__name\n", + " \n", + " def display(self): #display function\n", + " if(self.__name==None):\n", + " print 'No Name available for employee'\n", + " print ''\n", + " else:\n", + " print 'Name of the employee: ',self.__name\n", + " \n", + " \n", + "class Manager(Employee): #derived class declared\n", + " def __init__(self, nm, sal): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " def display(self):\n", + " Employee.display(self)\n", + " print 'Employee type: Manager'\n", + " \n", + "class Programmer(Employee): #derived class declared\n", + " def __init__(self, nm, sal,lang): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " self.__language=None\n", + " if lang!=None:\n", + " self.__language=[len(lang)+1]\n", + " self.__language=lang\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def display(self): #display\n", + " Employee.display(self)\n", + " print 'Employee type: programmer'\n", + " if self.__language==None:\n", + " print 'Language known: None specific'\n", + " else:\n", + " print 'language known: ',self.__language\n", + " \n", + " \n", + "class Secretary(Employee): #derived class declared\n", + " def __init__(self, nm, sal,Isteno,typespeed): #constructor\n", + " Employee.__init__(self,nm,sal)\n", + " self.__steno=Isteno\n", + " self.__Typingspeed=typespeed\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def display(self): #displaying the characteristic of secretary\n", + " Employee.display(self)\n", + " print 'Employee type: Secretary'\n", + " if self.__steno== False:\n", + " print 'Cannot perform job of a steno'\n", + " else:\n", + " print 'can perform job of a steno'\n", + " print 'typing speed is: ',self.__Typingspeed\n", + " \n", + " \n", + " \n", + " #objects declared and initialised \n", + " \n", + "e=[Employee() for j in range(5)]\n", + "e[0]=Manager('A. Pal',1000)\n", + "e[1]=Programmer('D.Ghosh',6000,'C++')\n", + "e[2]=Programmer('R.Das',5000,'Java')\n", + "e[3]=Secretary('S.Ray',3000,False,40)\n", + "e[4]=Secretary('A.Chatterjee',2500,True,50)\n", + "for i in range(5):\n", + " e[i].display()\n", + "del e[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the employee: ['A. Pal']\n", + "Employee type: Manager\n", + "Name of the employee: ['D.Ghosh']\n", + "Employee type: programmer\n", + "language known: C++\n", + "Name of the employee: ['R.Das']\n", + "Employee type: programmer\n", + "language known: Java\n", + "Name of the employee: ['S.Ray']\n", + "Employee type: Secretary\n", + "Cannot perform job of a steno\n", + "typing speed is: 40\n", + "Name of the employee: ['A.Chatterjee']\n", + "Employee type: Secretary\n", + "can perform job of a steno\n", + "typing speed is: 50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_1.ipynb new file mode 100755 index 00000000..f8e37db7 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_1.ipynb @@ -0,0 +1,123 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b4c6cc9b6073c54ac1ea44cd41b2c966a7ce2c91e6332e43cfd0876602552a52" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Overview" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.1, page no: 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hi There\" #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hi There\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.2, page no: 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hi There\", # says Hi There\n", + "print \"I am Here\" # says I am Here" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hi There I am Here\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.3, page no: 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=input(\"Please enter an integer number: \") #user input\n", + "print(\"The value you entered is: \"),num, #printing\n", + "print(\"and its square is \"),num*num" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an integer number: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value you entered is: 25 and its square is 625\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_2.ipynb new file mode 100755 index 00000000..f8e37db7 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter1Overview_2.ipynb @@ -0,0 +1,123 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b4c6cc9b6073c54ac1ea44cd41b2c966a7ce2c91e6332e43cfd0876602552a52" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Overview" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.1, page no: 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hi There\" #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hi There\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.2, page no: 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hi There\", # says Hi There\n", + "print \"I am Here\" # says I am Here" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hi There I am Here\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 1.3, page no: 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=input(\"Please enter an integer number: \") #user input\n", + "print(\"The value you entered is: \"),num, #printing\n", + "print(\"and its square is \"),num*num" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an integer number: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value you entered is: 25 and its square is 625\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_1.ipynb new file mode 100755 index 00000000..949ed101 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_1.ipynb @@ -0,0 +1,244 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3f7449a9c673f7ccb6de8569a399f2cf6a3dcb6934ee5d42cd0605d77a058869" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Declarations and Expressions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.1, page no: 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,c_uint\n", + "\n", + "SignedInt = c_int(2000000000)\n", + "\n", + "unsignVar = c_uint(2000000000)\n", + "SignedResult=c_int(0)\n", + "UnsignedInt=c_uint(0)\n", + "\n", + "#calculation result exceeds range of permitted values\n", + "SignedResult.value = (SignedInt.value * 2) \n", + "SignedResult.value =SignedResult.value / 3\n", + "\n", + "#calculation result is within permissible range\n", + "UnsignedResult = (SignedInt.value * 2) / 3;\n", + "\n", + "print \"Demonstrates wrong result caused by exceeding range\"\n", + "print \"Signed Integer Calculation giving result as: \"\n", + "print \"(\",SignedInt.value,\n", + "print \"*2)/3= \",SignedResult.value\n", + "print \"Demonstrates correct result caused by permissible range\"\n", + "print \"Unsigned Integer Calculation giving result as: \"\n", + "print \"(\",UnsignedInt.value,\n", + "print \"*2)/3= \",UnsignedResult" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demonstrates wrong result caused by exceeding range\n", + "Signed Integer Calculation giving result as: \n", + "( 2000000000 *2)/3= -98322432\n", + "Demonstrates correct result caused by permissible range\n", + "Unsigned Integer Calculation giving result as: \n", + "( 0 *2)/3= 1333333333\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.2, page no: 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaraton\n", + "a=10\n", + "b=5\n", + "print 'a= ',a, #printing the values\n", + "print ', b= ',b\n", + "a=b\n", + "print 'a= ',a,\n", + "print ', b= ',b\n", + "b=7\n", + "print 'a= ',a,\n", + "print ', b= ',b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5\n", + "a= 5 , b= 5\n", + "a= 5 , b= 7\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.3, page no: 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The ++ operator is not available in Python\n", + "a=10\n", + "b=5\n", + "c=15\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c\n", + "a=a+1 #no preincrement syntax in python\n", + "c=a+b\n", + "b=b+1\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5 , c= 15\n", + "a= 11 , b= 6 , c= 16\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.4, page no: 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=10\n", + "b=5\n", + "c=15\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c #no preincrement syntax in python\n", + "c=a+b\n", + "a=a+1\n", + "b=b+1\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5 , c= 15\n", + "a= 11 , b= 6 , c= 15\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.5, page no: 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_short,c_long\n", + " \n", + "SignedShort = c_short(30000)\n", + "\n", + "SignedShort.value=SignedShort.value*10\n", + "SignedShort.value=SignedShort.value/10\n", + "print 'SignedShort= ',SignedShort.value #wrong answer\n", + "\n", + "SignedShort=30000\n", + "\n", + "#result within limits\n", + "SignedLong=(c_long)(SignedShort*10)\n", + "SignedLong=(c_long)(SignedShort/10)\n", + "print 'SignedShort= ',SignedShort #right answer" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SignedShort= -2768\n", + "SignedShort= 30000\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_2.ipynb new file mode 100755 index 00000000..949ed101 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter2DeclarationsandExpressions_2.ipynb @@ -0,0 +1,244 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3f7449a9c673f7ccb6de8569a399f2cf6a3dcb6934ee5d42cd0605d77a058869" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Declarations and Expressions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.1, page no: 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,c_uint\n", + "\n", + "SignedInt = c_int(2000000000)\n", + "\n", + "unsignVar = c_uint(2000000000)\n", + "SignedResult=c_int(0)\n", + "UnsignedInt=c_uint(0)\n", + "\n", + "#calculation result exceeds range of permitted values\n", + "SignedResult.value = (SignedInt.value * 2) \n", + "SignedResult.value =SignedResult.value / 3\n", + "\n", + "#calculation result is within permissible range\n", + "UnsignedResult = (SignedInt.value * 2) / 3;\n", + "\n", + "print \"Demonstrates wrong result caused by exceeding range\"\n", + "print \"Signed Integer Calculation giving result as: \"\n", + "print \"(\",SignedInt.value,\n", + "print \"*2)/3= \",SignedResult.value\n", + "print \"Demonstrates correct result caused by permissible range\"\n", + "print \"Unsigned Integer Calculation giving result as: \"\n", + "print \"(\",UnsignedInt.value,\n", + "print \"*2)/3= \",UnsignedResult" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demonstrates wrong result caused by exceeding range\n", + "Signed Integer Calculation giving result as: \n", + "( 2000000000 *2)/3= -98322432\n", + "Demonstrates correct result caused by permissible range\n", + "Unsigned Integer Calculation giving result as: \n", + "( 0 *2)/3= 1333333333\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.2, page no: 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaraton\n", + "a=10\n", + "b=5\n", + "print 'a= ',a, #printing the values\n", + "print ', b= ',b\n", + "a=b\n", + "print 'a= ',a,\n", + "print ', b= ',b\n", + "b=7\n", + "print 'a= ',a,\n", + "print ', b= ',b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5\n", + "a= 5 , b= 5\n", + "a= 5 , b= 7\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.3, page no: 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The ++ operator is not available in Python\n", + "a=10\n", + "b=5\n", + "c=15\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c\n", + "a=a+1 #no preincrement syntax in python\n", + "c=a+b\n", + "b=b+1\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5 , c= 15\n", + "a= 11 , b= 6 , c= 16\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.4, page no: 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=10\n", + "b=5\n", + "c=15\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c #no preincrement syntax in python\n", + "c=a+b\n", + "a=a+1\n", + "b=b+1\n", + "print 'a= ',a,\n", + "print ', b= ',b,\n", + "print ', c= ',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 10 , b= 5 , c= 15\n", + "a= 11 , b= 6 , c= 15\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 2.5, page no: 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_short,c_long\n", + " \n", + "SignedShort = c_short(30000)\n", + "\n", + "SignedShort.value=SignedShort.value*10\n", + "SignedShort.value=SignedShort.value/10\n", + "print 'SignedShort= ',SignedShort.value #wrong answer\n", + "\n", + "SignedShort=30000\n", + "\n", + "#result within limits\n", + "SignedLong=(c_long)(SignedShort*10)\n", + "SignedLong=(c_long)(SignedShort/10)\n", + "print 'SignedShort= ',SignedShort #right answer" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SignedShort= -2768\n", + "SignedShort= 30000\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_1.ipynb new file mode 100755 index 00000000..e5ccfcb1 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_1.ipynb @@ -0,0 +1,635 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d0b2f54d8b90df73579d2fb4713e9b1d5d6613dfc23d06e8223dcef9eaa180b2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Statements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.1, page no: 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "numb = input(\"Enter a number\") #user input\n", + "\n", + "print 'numb<10 is',int(numb < 10)\n", + "print 'numb>10 is',int(numb > 10)\n", + "print 'numb==10 is',int(numb == 10),'\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "numb<10 is 0\n", + "numb>10 is 1\n", + "numb==10 is 0 \n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.2, page no: 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=input( 'Please Enter two numbers, a: ') #takes input\n", + "b=input('b: ')\n", + "\n", + "if a>b: #prints which is greater\n", + " print a,\n", + " print 'is greater' \n", + " print b,\n", + " print 'is smaller'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter two numbers, a: 30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "b: 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "30 is greater\n", + "20 is smaller\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.3, page no: 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=input('Please Enter two numbers, a: ') #takes input\n", + "b=input('b: ')\n", + "if a>b: \n", + " print a,\n", + " print 'is greater' \n", + " print b,\n", + " print 'is smaller'\n", + "else:\n", + " print b,\n", + " print 'is greater' \n", + " print a,\n", + " print 'is smaller'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter two numbers, a: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "b: 30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "30 is greater\n", + "20 is smaller\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.4, page no: 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print 'Enter three number, a, b, c:' #user input\n", + "a = input()\n", + "b = input()\n", + "c = input()\n", + "\n", + "if a==b:\n", + " if b==c:\n", + " print 'a, b, and c are equal\\n'\n", + " \n", + "else:\n", + " print 'a and b are different\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three number, a, b, c:\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": [ + "30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a and b are different\n", + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.5, page no: 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "marks=input('Please input the marks obtained out of 100: ') #user input\n", + "if marks>=0 and marks<=100: #prints grade according to marks\n", + " range=marks / 10\n", + " print 'Equivalent letter Grade Award is : ',\n", + " if range<=10 and range>=8:\n", + " print ' A'\n", + " \n", + " elif range<8 and range>=7:\n", + " print ' B'\n", + " \n", + " elif range<7 and range>=6:\n", + " print ' C'\n", + " \n", + " elif range<6:\n", + " print ' D' \n", + "else:\n", + " print 'Incorrect range: '\n", + " print 'Marks should be within 0 to 100'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the marks obtained out of 100: 76\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent letter Grade Award is : B\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.6, page no: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ')\n", + "while count>0: #while loop \n", + " print 'count=',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.7, page no: 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ')\n", + "#no do while loop in python\n", + "while True:\n", + " print 'count=',count\n", + " count-=1\n", + " if count==0: #fail condition\n", + " break\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.8, page no: 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for i in range(15):\n", + " print i*i, #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 1 4 9 16 25 36 49 64 81 100 121 144 169 196\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.9, page no: 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ') #user input\n", + "for x in range(count): #for loop\n", + " print 'count=',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.10, page no: 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print 'count up'\n", + "for i in range(5): #for loop\n", + " print i\n", + "print 'count down'\n", + "i+=1\n", + "for i in range(5,-1,-1):\n", + " print i\n", + "\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count up\n", + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "count down\n", + "5\n", + "4\n", + "3\n", + "2\n", + "1\n", + "0\n", + "done\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.11, page no: 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for i in range(5):\n", + " print i #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.12, page no: 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ') #user input\n", + "while True: #while loop\n", + " if count<=0:\n", + " break\n", + " print 'count= ',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.13, page no: 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count1 = input(\"Enter the value of count: \") #user input\n", + "\n", + "for count1 in range(count1,0,-1):\n", + " if count1 == 3:\n", + " continue\n", + " print 'count =',count1\n", + " \n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count = 5\n", + "count = 4\n", + "count = 2\n", + "count = 1\n", + "done\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_2.ipynb new file mode 100755 index 00000000..e5ccfcb1 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter3Statements_2.ipynb @@ -0,0 +1,635 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d0b2f54d8b90df73579d2fb4713e9b1d5d6613dfc23d06e8223dcef9eaa180b2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Statements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.1, page no: 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "numb = input(\"Enter a number\") #user input\n", + "\n", + "print 'numb<10 is',int(numb < 10)\n", + "print 'numb>10 is',int(numb > 10)\n", + "print 'numb==10 is',int(numb == 10),'\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "numb<10 is 0\n", + "numb>10 is 1\n", + "numb==10 is 0 \n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.2, page no: 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=input( 'Please Enter two numbers, a: ') #takes input\n", + "b=input('b: ')\n", + "\n", + "if a>b: #prints which is greater\n", + " print a,\n", + " print 'is greater' \n", + " print b,\n", + " print 'is smaller'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter two numbers, a: 30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "b: 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "30 is greater\n", + "20 is smaller\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.3, page no: 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=input('Please Enter two numbers, a: ') #takes input\n", + "b=input('b: ')\n", + "if a>b: \n", + " print a,\n", + " print 'is greater' \n", + " print b,\n", + " print 'is smaller'\n", + "else:\n", + " print b,\n", + " print 'is greater' \n", + " print a,\n", + " print 'is smaller'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please Enter two numbers, a: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "b: 30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "30 is greater\n", + "20 is smaller\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.4, page no: 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print 'Enter three number, a, b, c:' #user input\n", + "a = input()\n", + "b = input()\n", + "c = input()\n", + "\n", + "if a==b:\n", + " if b==c:\n", + " print 'a, b, and c are equal\\n'\n", + " \n", + "else:\n", + " print 'a and b are different\\n'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three number, a, b, c:\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": [ + "30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a and b are different\n", + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.5, page no: 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "marks=input('Please input the marks obtained out of 100: ') #user input\n", + "if marks>=0 and marks<=100: #prints grade according to marks\n", + " range=marks / 10\n", + " print 'Equivalent letter Grade Award is : ',\n", + " if range<=10 and range>=8:\n", + " print ' A'\n", + " \n", + " elif range<8 and range>=7:\n", + " print ' B'\n", + " \n", + " elif range<7 and range>=6:\n", + " print ' C'\n", + " \n", + " elif range<6:\n", + " print ' D' \n", + "else:\n", + " print 'Incorrect range: '\n", + " print 'Marks should be within 0 to 100'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the marks obtained out of 100: 76\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent letter Grade Award is : B\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.6, page no: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ')\n", + "while count>0: #while loop \n", + " print 'count=',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.7, page no: 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ')\n", + "#no do while loop in python\n", + "while True:\n", + " print 'count=',count\n", + " count-=1\n", + " if count==0: #fail condition\n", + " break\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.8, page no: 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for i in range(15):\n", + " print i*i, #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 1 4 9 16 25 36 49 64 81 100 121 144 169 196\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.9, page no: 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ') #user input\n", + "for x in range(count): #for loop\n", + " print 'count=',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.10, page no: 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print 'count up'\n", + "for i in range(5): #for loop\n", + " print i\n", + "print 'count down'\n", + "i+=1\n", + "for i in range(5,-1,-1):\n", + " print i\n", + "\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count up\n", + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "count down\n", + "5\n", + "4\n", + "3\n", + "2\n", + "1\n", + "0\n", + "done\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.11, page no: 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for i in range(5):\n", + " print i #displaying" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.12, page no: 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=input('Enter the value of count: ') #user input\n", + "while True: #while loop\n", + " if count<=0:\n", + " break\n", + " print 'count= ',count\n", + " count-=1\n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count= 5\n", + "count= 4\n", + "count= 3\n", + "count= 2\n", + "count= 1\n", + "done\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 3.13, page no: 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count1 = input(\"Enter the value of count: \") #user input\n", + "\n", + "for count1 in range(count1,0,-1):\n", + " if count1 == 3:\n", + " continue\n", + " print 'count =',count1\n", + " \n", + "print 'done'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of count: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "count = 5\n", + "count = 4\n", + "count = 2\n", + "count = 1\n", + "done\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_1.ipynb new file mode 100755 index 00000000..4e09e4d6 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_1.ipynb @@ -0,0 +1,904 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:48c09f3d2f18cb1da4e13f3cf59cdf547659ec033a1e6da7063dcd6f2fdcd6c2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 Array,Pointer and Structure" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.1, page no: 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=6\n", + "sales=[] #array declared\n", + "print 'Please input sales figure for',SIZE,'days' #user input\n", + "for i in range(SIZE):\n", + " x=input()\n", + " sales.append(x)\n", + "total=0\n", + "for j in range(SIZE):\n", + " total+=sales[j]\n", + "average=0 \n", + "average=total/SIZE\n", + "print 'Average Sales=',average" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input sales figure for 6 days\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "352.44\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.70\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "781.32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.35\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "746.21\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "189.45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average Sales= 634.078333333\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.2, page no: 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "b=[[1,2,3,4],[5,6,7,8],[9,10,11,12]] #2-dimensional array declared\n", + "\n", + "for i in range(len(b)): #for loop\n", + " for j in range(len(b[i])):\n", + " print 'b[',i,']',\n", + " print '[',j,']=',b[i][j]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "b[ 0 ] [ 0 ]= 1\n", + "b[ 0 ] [ 1 ]= 2\n", + "b[ 0 ] [ 2 ]= 3\n", + "b[ 0 ] [ 3 ]= 4\n", + "b[ 1 ] [ 0 ]= 5\n", + "b[ 1 ] [ 1 ]= 6\n", + "b[ 1 ] [ 2 ]= 7\n", + "b[ 1 ] [ 3 ]= 8\n", + "b[ 2 ] [ 0 ]= 9\n", + "b[ 2 ] [ 1 ]= 10\n", + "b[ 2 ] [ 2 ]= 11\n", + "b[ 2 ] [ 3 ]= 12\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.3, page no: 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DISTRICTS=4\n", + "MONTHS=3\n", + "sales=[[0] * (DISTRICTS +1)for i in range(MONTHS+1)]\n", + "for d in range(DISTRICTS):\n", + " for m in range(MONTHS):\n", + " print 'Enter sales for district ',d+1,\n", + " print 'months',m+1\n", + " sales[d][m]=input()\n", + "print ' Month'\n", + "print ' 1 2 3' \n", + "for d in range(DISTRICTS):\n", + " print ''\n", + " print 'District',d+1,\n", + " for m in range(MONTHS):\n", + " print ' ',sales[d][m]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3964.23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4135.87\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4397.98\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.75\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "923.59\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1037.01\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "12.77\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "378.32\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "798.22\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2983.53\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3903.73\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9494.98\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Month\n", + " 1 2 3\n", + "\n", + "District 1 3964.23 4135.87 4397.98 \n", + "District 2 867.75 923.59 1037.01 \n", + "District 3 12.77 378.32 798.22 \n", + "District 4 2983.53 3903.73 9494.98\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.4, page no: 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DISRICTS = 4\n", + "MONTHS = 3\n", + "\n", + "sales = [[1432.07,234.6,654.01],\n", + " [327,13838.3,12589.9],\n", + " [9328.34,934,4492.3],\n", + " [12838.3,2332.63,32.93]]\n", + " \n", + "print '\\n'\n", + "print ' month'\n", + "print ' 1 2 3',\n", + "\n", + "for d in range(DISRICTS):\n", + " print '\\nDistrict',d+1,\n", + " for m in range(MONTHS):\n", + " print '%10.2f' %(sales[d][m])," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " month\n", + " 1 2 3 \n", + "District 1 1432.07 234.60 654.01 \n", + "District 2 327.00 13838.30 12589.90 \n", + "District 3 9328.34 934.00 4492.30 \n", + "District 4 12838.30 2332.63 32.93\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.5, page no: 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Var1=11\n", + "Var2=22.0\n", + "Var3=33\n", + "print 'main starts at '\n", + "print 'Var1 of type int is located at ',(id(Var1)),\n", + "print 'having value= ',Var1\n", + "print 'Var1 of type double is located at ',(id(Var2)),\n", + "print 'having value= ',Var2\n", + "print 'Var1 of type int is located at ',(id(Var3)),\n", + "print 'having value= ',Var3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "main starts at \n", + "Var1 of type int is located at 31356456 having value= 11\n", + "Var1 of type double is located at 47703456 having value= 22.0\n", + "Var1 of type int is located at 31355928 having value= 33\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.6, page no: 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "i=c_int(6)\n", + "j=c_int(7)\n", + "\n", + "ptr=pointer(i)\n", + "ptr[0]=10 #*ptr=10\n", + "\n", + "ptr=pointer(j)\n", + "ptr[0]=20 #*ptr=20\n", + "\n", + "print 'i=',i.value,'j=',j.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 10 j= 20\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.6a, page no: 115 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "\n", + "#variable declaration\n", + "i=c_int(6)\n", + "j=c_int(7)\n", + "\n", + "\n", + "ptri=pointer(i) #*ptri=&i\n", + "ptrj=pointer(j)\n", + "ptri[0]=10\n", + "ptrj[0]=ptri[0]\n", + "ptrj=ptri\n", + "ptrj[0]=20\n", + "print 'i=',i.value,'j=',j.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 20 j= 10\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.7, page no: 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "i=c_int(6)\n", + "ptri=pointer(i) \n", + "pptri=pointer(ptri) #**pptri\n", + "\n", + "print 'i=',i.value\n", + "print '*ptri=',ptri[0]\n", + "print '**pptri=',pptri[0][0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 6\n", + "*ptri= 6\n", + "**pptri= 6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.8, page no: 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import POINTER,c_char,c_short,pointer\n", + "iarr=[65,66,67,68] #array declared\n", + "ptri=iarr\n", + "\n", + "\n", + "ptrc=POINTER(c_char)\n", + "ptrs=POINTER(c_short)\n", + "\n", + " #type case int to char\n", + "for i in range(4): #for loop\n", + " print 'ptri[',i,']=',ptri[i] #getting the pointer value\n", + "print ''\n", + "for i in range(4):\n", + " ptrc=pointer(c_char(chr(ptri[i]))) \n", + " print 'ptrc[',i,']=',ptrc[0] #getting the pointer value\n", + "print ''\n", + "\n", + "for i in range(4):\n", + " ptrc=pointer(c_short(iarr[i])) \n", + " print 'ptrs[',i,']=',ptrc[0] #getting the pointer value\n", + "print ''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ptri[ 0 ]= 65\n", + "ptri[ 1 ]= 66\n", + "ptri[ 2 ]= 67\n", + "ptri[ 3 ]= 68\n", + "\n", + "ptrc[ 0 ]= A\n", + "ptrc[ 1 ]= B\n", + "ptrc[ 2 ]= C\n", + "ptrc[ 3 ]= D\n", + "\n", + "ptrs[ 0 ]= 65\n", + "ptrs[ 1 ]= 66\n", + "ptrs[ 2 ]= 67\n", + "ptrs[ 3 ]= 68\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.9, page no: 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "DateLabel=['Date of birth','Date of anniversary'] #array defined\n", + "class DATE: #class date\n", + " day=None\n", + " month=None\n", + " year=None\n", + " \n", + "DateOfBirth=DATE\n", + "DateOfBirth.day=07\n", + "DateOfBirth.month=12\n", + "DateOfBirth.year=1966\n", + "\n", + "print 'Date of Birth',':', #printing the characteristics\n", + "print DateOfBirth.day,'/',\n", + "print DateOfBirth.month,'/',\n", + "print DateOfBirth.year\n", + "\n", + "DatesOfAnniversary=DATE\n", + "DatesOfAnniversary.day=11\n", + "DatesOfAnniversary.month=07\n", + "DatesOfAnniversary.year=1993\n", + "\n", + "print 'Date Of Anniversary',':', #printing the characteristics\n", + "print DatesOfAnniversary.day,'/',\n", + "print DatesOfAnniversary.month,'/',\n", + "print DatesOfAnniversary.year" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date of Birth : 7 / 12 / 1966\n", + "Date Of Anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.10, page no: 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DateLabel=['Date of birth','Date of anniversary'] #array declared\n", + "class DATE:\n", + " day=None\n", + " month=None\n", + " year=None\n", + " \n", + "Dates=[DATE() for j in range(2)]\n", + "Dates[0].day=7\n", + "Dates[0].month=12\n", + "Dates[0].year=1966\n", + "Dates[1].day=11\n", + "Dates[1].month=7\n", + "Dates[1].year=1993\n", + "\n", + "for i in range(2):\n", + " print DateLabel[i],':',Dates[i].day,'/',Dates[i].month,'/',Dates[i].year #printing the characteristics\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Date of birth : 7 / 12 / 1966\n", + "Date of anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.11, page no: 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DateLabel=['Date of birth','Date of anniversary'] #array declared\n", + "\n", + "class DATE: #class date\n", + " day=None\n", + " month=None\n", + " year=None\n", + "\n", + "DateOfBirth=DATE\n", + "DatesOfAnniversary=DATE\n", + "\n", + "pDates1=DATE()\n", + "\n", + "\n", + "pDates1.day=07\n", + "pDates1.month=12\n", + "pDates1.year=1966\n", + "\n", + "print DateLabel[0],':', #printing the characteristics\n", + "print pDates1.day,'/',\n", + "print pDates1.month,'/',\n", + "print pDates1.year\n", + "\n", + "pDates2=DATE()\n", + "pDates2.day=11\n", + "pDates2.month=07\n", + "pDates2.year=1993\n", + "\n", + "print DateLabel[1],':', #printing the characteristics\n", + "print pDates2.day,'/',\n", + "print pDates2.month,'/',\n", + "print pDates2.year" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date of birth : 7 / 12 / 1966\n", + "Date of anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.12, page no: 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class DATE:\n", + " day=None\n", + " month=None\n", + " year=None\n", + "\n", + "class PERSON:\n", + " name=None\n", + " DateOfBirth=DATE\n", + " \n", + "aPerson=PERSON()\n", + "print 'Please input the name of the person: '#user input\n", + "aPerson.name=raw_input()\n", + "print 'Please input the date of birth of the person: '#user input\n", + "aPerson.DateOfBirth.day=input()\n", + "aPerson.DateOfBirth.month=input()\n", + "aPerson.DateOfBirth.year=input()\n", + "\n", + "print 'We have got one person whose: '\n", + "print 'name is: ',aPerson.name\n", + "print 'Date of Birth is: ',aPerson.DateOfBirth.day,'/',aPerson.DateOfBirth.month,'/',aPerson.DateOfBirth.year #printing the characteristics" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the name of the person: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Soumen\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the date of birth of the person: \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": [ + "1991\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have got one person whose: \n", + "name is: Soumen\n", + "Date of Birth is: 5 / 6 / 1991\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_2.ipynb new file mode 100755 index 00000000..4e09e4d6 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter4Array,PointerandStructure_2.ipynb @@ -0,0 +1,904 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:48c09f3d2f18cb1da4e13f3cf59cdf547659ec033a1e6da7063dcd6f2fdcd6c2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 Array,Pointer and Structure" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.1, page no: 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=6\n", + "sales=[] #array declared\n", + "print 'Please input sales figure for',SIZE,'days' #user input\n", + "for i in range(SIZE):\n", + " x=input()\n", + " sales.append(x)\n", + "total=0\n", + "for j in range(SIZE):\n", + " total+=sales[j]\n", + "average=0 \n", + "average=total/SIZE\n", + "print 'Average Sales=',average" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input sales figure for 6 days\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "352.44\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.70\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "781.32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.35\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "746.21\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "189.45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average Sales= 634.078333333\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.2, page no: 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "b=[[1,2,3,4],[5,6,7,8],[9,10,11,12]] #2-dimensional array declared\n", + "\n", + "for i in range(len(b)): #for loop\n", + " for j in range(len(b[i])):\n", + " print 'b[',i,']',\n", + " print '[',j,']=',b[i][j]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "b[ 0 ] [ 0 ]= 1\n", + "b[ 0 ] [ 1 ]= 2\n", + "b[ 0 ] [ 2 ]= 3\n", + "b[ 0 ] [ 3 ]= 4\n", + "b[ 1 ] [ 0 ]= 5\n", + "b[ 1 ] [ 1 ]= 6\n", + "b[ 1 ] [ 2 ]= 7\n", + "b[ 1 ] [ 3 ]= 8\n", + "b[ 2 ] [ 0 ]= 9\n", + "b[ 2 ] [ 1 ]= 10\n", + "b[ 2 ] [ 2 ]= 11\n", + "b[ 2 ] [ 3 ]= 12\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.3, page no: 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DISTRICTS=4\n", + "MONTHS=3\n", + "sales=[[0] * (DISTRICTS +1)for i in range(MONTHS+1)]\n", + "for d in range(DISTRICTS):\n", + " for m in range(MONTHS):\n", + " print 'Enter sales for district ',d+1,\n", + " print 'months',m+1\n", + " sales[d][m]=input()\n", + "print ' Month'\n", + "print ' 1 2 3' \n", + "for d in range(DISTRICTS):\n", + " print ''\n", + " print 'District',d+1,\n", + " for m in range(MONTHS):\n", + " print ' ',sales[d][m]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3964.23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4135.87\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 1 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4397.98\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "867.75\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "923.59\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 2 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1037.01\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "12.77\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "378.32\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 3 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "798.22\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2983.53\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3903.73\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter sales for district 4 months 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9494.98\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Month\n", + " 1 2 3\n", + "\n", + "District 1 3964.23 4135.87 4397.98 \n", + "District 2 867.75 923.59 1037.01 \n", + "District 3 12.77 378.32 798.22 \n", + "District 4 2983.53 3903.73 9494.98\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.4, page no: 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DISRICTS = 4\n", + "MONTHS = 3\n", + "\n", + "sales = [[1432.07,234.6,654.01],\n", + " [327,13838.3,12589.9],\n", + " [9328.34,934,4492.3],\n", + " [12838.3,2332.63,32.93]]\n", + " \n", + "print '\\n'\n", + "print ' month'\n", + "print ' 1 2 3',\n", + "\n", + "for d in range(DISRICTS):\n", + " print '\\nDistrict',d+1,\n", + " for m in range(MONTHS):\n", + " print '%10.2f' %(sales[d][m])," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + " month\n", + " 1 2 3 \n", + "District 1 1432.07 234.60 654.01 \n", + "District 2 327.00 13838.30 12589.90 \n", + "District 3 9328.34 934.00 4492.30 \n", + "District 4 12838.30 2332.63 32.93\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.5, page no: 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Var1=11\n", + "Var2=22.0\n", + "Var3=33\n", + "print 'main starts at '\n", + "print 'Var1 of type int is located at ',(id(Var1)),\n", + "print 'having value= ',Var1\n", + "print 'Var1 of type double is located at ',(id(Var2)),\n", + "print 'having value= ',Var2\n", + "print 'Var1 of type int is located at ',(id(Var3)),\n", + "print 'having value= ',Var3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "main starts at \n", + "Var1 of type int is located at 31356456 having value= 11\n", + "Var1 of type double is located at 47703456 having value= 22.0\n", + "Var1 of type int is located at 31355928 having value= 33\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.6, page no: 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "i=c_int(6)\n", + "j=c_int(7)\n", + "\n", + "ptr=pointer(i)\n", + "ptr[0]=10 #*ptr=10\n", + "\n", + "ptr=pointer(j)\n", + "ptr[0]=20 #*ptr=20\n", + "\n", + "print 'i=',i.value,'j=',j.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 10 j= 20\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.6a, page no: 115 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "\n", + "#variable declaration\n", + "i=c_int(6)\n", + "j=c_int(7)\n", + "\n", + "\n", + "ptri=pointer(i) #*ptri=&i\n", + "ptrj=pointer(j)\n", + "ptri[0]=10\n", + "ptrj[0]=ptri[0]\n", + "ptrj=ptri\n", + "ptrj[0]=20\n", + "print 'i=',i.value,'j=',j.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 20 j= 10\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.7, page no: 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "i=c_int(6)\n", + "ptri=pointer(i) \n", + "pptri=pointer(ptri) #**pptri\n", + "\n", + "print 'i=',i.value\n", + "print '*ptri=',ptri[0]\n", + "print '**pptri=',pptri[0][0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i= 6\n", + "*ptri= 6\n", + "**pptri= 6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.8, page no: 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import POINTER,c_char,c_short,pointer\n", + "iarr=[65,66,67,68] #array declared\n", + "ptri=iarr\n", + "\n", + "\n", + "ptrc=POINTER(c_char)\n", + "ptrs=POINTER(c_short)\n", + "\n", + " #type case int to char\n", + "for i in range(4): #for loop\n", + " print 'ptri[',i,']=',ptri[i] #getting the pointer value\n", + "print ''\n", + "for i in range(4):\n", + " ptrc=pointer(c_char(chr(ptri[i]))) \n", + " print 'ptrc[',i,']=',ptrc[0] #getting the pointer value\n", + "print ''\n", + "\n", + "for i in range(4):\n", + " ptrc=pointer(c_short(iarr[i])) \n", + " print 'ptrs[',i,']=',ptrc[0] #getting the pointer value\n", + "print ''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ptri[ 0 ]= 65\n", + "ptri[ 1 ]= 66\n", + "ptri[ 2 ]= 67\n", + "ptri[ 3 ]= 68\n", + "\n", + "ptrc[ 0 ]= A\n", + "ptrc[ 1 ]= B\n", + "ptrc[ 2 ]= C\n", + "ptrc[ 3 ]= D\n", + "\n", + "ptrs[ 0 ]= 65\n", + "ptrs[ 1 ]= 66\n", + "ptrs[ 2 ]= 67\n", + "ptrs[ 3 ]= 68\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.9, page no: 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "DateLabel=['Date of birth','Date of anniversary'] #array defined\n", + "class DATE: #class date\n", + " day=None\n", + " month=None\n", + " year=None\n", + " \n", + "DateOfBirth=DATE\n", + "DateOfBirth.day=07\n", + "DateOfBirth.month=12\n", + "DateOfBirth.year=1966\n", + "\n", + "print 'Date of Birth',':', #printing the characteristics\n", + "print DateOfBirth.day,'/',\n", + "print DateOfBirth.month,'/',\n", + "print DateOfBirth.year\n", + "\n", + "DatesOfAnniversary=DATE\n", + "DatesOfAnniversary.day=11\n", + "DatesOfAnniversary.month=07\n", + "DatesOfAnniversary.year=1993\n", + "\n", + "print 'Date Of Anniversary',':', #printing the characteristics\n", + "print DatesOfAnniversary.day,'/',\n", + "print DatesOfAnniversary.month,'/',\n", + "print DatesOfAnniversary.year" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date of Birth : 7 / 12 / 1966\n", + "Date Of Anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.10, page no: 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DateLabel=['Date of birth','Date of anniversary'] #array declared\n", + "class DATE:\n", + " day=None\n", + " month=None\n", + " year=None\n", + " \n", + "Dates=[DATE() for j in range(2)]\n", + "Dates[0].day=7\n", + "Dates[0].month=12\n", + "Dates[0].year=1966\n", + "Dates[1].day=11\n", + "Dates[1].month=7\n", + "Dates[1].year=1993\n", + "\n", + "for i in range(2):\n", + " print DateLabel[i],':',Dates[i].day,'/',Dates[i].month,'/',Dates[i].year #printing the characteristics\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Date of birth : 7 / 12 / 1966\n", + "Date of anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.11, page no: 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "DateLabel=['Date of birth','Date of anniversary'] #array declared\n", + "\n", + "class DATE: #class date\n", + " day=None\n", + " month=None\n", + " year=None\n", + "\n", + "DateOfBirth=DATE\n", + "DatesOfAnniversary=DATE\n", + "\n", + "pDates1=DATE()\n", + "\n", + "\n", + "pDates1.day=07\n", + "pDates1.month=12\n", + "pDates1.year=1966\n", + "\n", + "print DateLabel[0],':', #printing the characteristics\n", + "print pDates1.day,'/',\n", + "print pDates1.month,'/',\n", + "print pDates1.year\n", + "\n", + "pDates2=DATE()\n", + "pDates2.day=11\n", + "pDates2.month=07\n", + "pDates2.year=1993\n", + "\n", + "print DateLabel[1],':', #printing the characteristics\n", + "print pDates2.day,'/',\n", + "print pDates2.month,'/',\n", + "print pDates2.year" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date of birth : 7 / 12 / 1966\n", + "Date of anniversary : 11 / 7 / 1993\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 4.12, page no: 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class DATE:\n", + " day=None\n", + " month=None\n", + " year=None\n", + "\n", + "class PERSON:\n", + " name=None\n", + " DateOfBirth=DATE\n", + " \n", + "aPerson=PERSON()\n", + "print 'Please input the name of the person: '#user input\n", + "aPerson.name=raw_input()\n", + "print 'Please input the date of birth of the person: '#user input\n", + "aPerson.DateOfBirth.day=input()\n", + "aPerson.DateOfBirth.month=input()\n", + "aPerson.DateOfBirth.year=input()\n", + "\n", + "print 'We have got one person whose: '\n", + "print 'name is: ',aPerson.name\n", + "print 'Date of Birth is: ',aPerson.DateOfBirth.day,'/',aPerson.DateOfBirth.month,'/',aPerson.DateOfBirth.year #printing the characteristics" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the name of the person: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Soumen\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input the date of birth of the person: \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": [ + "1991\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have got one person whose: \n", + "name is: Soumen\n", + "Date of Birth is: 5 / 6 / 1991\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_1.ipynb new file mode 100755 index 00000000..e88ee60c --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_1.ipynb @@ -0,0 +1,842 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:16bfbc873a6cbcc56829a1af86d2cf77a972ff61a5d715ac403aea9f8f37d495" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.1, page no: 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a number: ') #user input\n", + "b=input('Please input another number: ')\n", + "c=product(a,b)\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 4 and 5 is 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.2, page no: 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a floating point number: ') #user input\n", + "b=input('Please input another floating point number: ')\n", + "c=product(a,b) #function call\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a floating point number: 1.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another floating point number: 1.3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 1.2 and 1.3 is 1.56\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.3, page no: 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def printProduct(x,y): #function product\n", + " c=0\n", + " c=a*b\n", + " print 'The product of ',a,'and',b,'is',c\n", + " return\n", + "\n", + "a=input('Please input an intger: ') #user input\n", + "b=input('Please input another integer: ')\n", + "c=printProduct(a,b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input an intger: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another integer: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 3 and 4 is 12\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.4, page no: 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a number: ') #user input\n", + "b=input('Please input another number: ')\n", + "c=product(a,b)\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 4 and 5 is 20\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.5, page no: 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "\n", + "\n", + "i =c_int(4) \n", + "j=i\n", + "pi=pointer(i)\n", + "value=pi[0]\n", + "pj=pi[0]\n", + "print 'Before incrementing *pi'\n", + "print 'i= ',i.value,'j= ',j.value,'*pi= ',pi[0],'*pj= ',pj\n", + "pi[0]+=1 #no prefix and postfix in python\n", + "pj=pi[0]\n", + "print 'After incrementing *pi'\n", + "print 'i= ',i.value,'j= ',j.value,'*pi= ',pi[0],'*pj= ',pj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before incrementing *pi\n", + "i= 4 j= 4 *pi= 4 *pj= 4\n", + "After incrementing *pi\n", + "i= 5 j= 5 *pi= 5 *pj= 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.6, page no: 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Product(x,y): #function product\n", + " return x*y\n", + "\n", + "print 'Please input two integer: ' #user input\n", + "a=input()\n", + "b=input()\n", + "c=Product(a,b) #call function product\n", + "print 'The product of ',a,'and',b,'is',c\n", + "\n", + "print 'Please input two floating point numbers: '\n", + "f=input()\n", + "g=input()\n", + "h=Product(f,g) #call function product\n", + "print 'The product of ',f,'and',g,'is',h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input two integer: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 4 and 5 is 20\n", + "Please input two floating point numbers: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 1.2 and 2.3 is 2.76\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.7, page no: 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def fracval(numerator =0, denominator =1): #function declaration with default parameters\n", + " val=(numerator/denominator)\n", + " return val\n", + "\n", + "print 'please input numerator and denominator of a fraction: '\n", + "a=input()\n", + "b=input()\n", + "f=fracval(a,b) #function call\n", + "\n", + "print 'The fraction value ',a,'/',b,'=',f\n", + "\n", + "print 'please input the numerator (denominator assumed to be 1: )'\n", + "a=input()\n", + "f=fracval(a)\n", + "print 'The fraction value ',a,'/1','=',f\n", + "\n", + "print 'And the defaukt fraction value is (num=0, denom=1): '\n", + "f=fracval()\n", + "print 'the fraction value 0/1=',f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input numerator and denominator of a fraction: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction value 3 / 4 = 0\n", + "please input the numerator (denominator assumed to be 1: )\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction value 3 /1 = 3\n", + "And the defaukt fraction value is (num=0, denom=1): \n", + "the fraction value 0/1= 0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.8, page no: 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b):\n", + " temp=a\n", + " a=b\n", + " b=temp\n", + "\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 3 y= 4\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.9, page no: 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b): #function swap\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " return a,b\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "x,y=swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 4 y= 3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.10, page no: 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b): #function swap\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " return a,b\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "x,y=swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 4 y= 3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.11, page no: 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def PrintCharManyTimes(ch,n): #function declarator\n", + " for j in range(n): #function body\n", + " print ch,\n", + " print\n", + " \n", + "PrintCharManyTimes('-',40) #call to function\n", + "print 'Data type Range'\n", + "PrintCharManyTimes('=',18) #call to function\n", + "print 'Char -128 to 127'\n", + "print 'int -32,768 to 32,767'\n", + "print 'double -2,147,483,648 to 2,147,483,647'\n", + "PrintCharManyTimes('-',40) #call to function" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n", + "Data type Range\n", + "= = = = = = = = = = = = = = = = = =\n", + "Char -128 to 127\n", + "int -32,768 to 32,767\n", + "double -2,147,483,648 to 2,147,483,647\n", + "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.12, page no: 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def factfunc(a): #calls itself to calculate factorials\n", + " if a>1:\n", + " return a * factfunc(a-1)\n", + " else:\n", + " return 1\n", + " \n", + "n = input(\"Please input a number: \") #get number from user\n", + "fact = factfunc(n) #function call for factorial\n", + "print 'Factorial of',n,'! is',fact,'\\n' #dsplay factorial" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factorial of 4 ! is 24 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.13, page no: 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "gi=1 #global variable declared\n", + "si = 1 #static variable declared\n", + "\n", + "def func():\n", + " global si\n", + " i=1\n", + " i+=1\n", + " si+=1\n", + " global gi\n", + " gi+=1\n", + " \n", + " print 'i= ',i,'si= ',si,'gi= ',gi\n", + " \n", + "for i in range(10):\n", + " print '(',i,')Call to func(): ',\n", + " gi+=1\n", + " func()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "( 0 )Call to func(): i= 2 si= 2 gi= 3\n", + "( 1 )Call to func(): i= 2 si= 3 gi= 5\n", + "( 2 )Call to func(): i= 2 si= 4 gi= 7\n", + "( 3 )Call to func(): i= 2 si= 5 gi= 9\n", + "( 4 )Call to func(): i= 2 si= 6 gi= 11\n", + "( 5 )Call to func(): i= 2 si= 7 gi= 13\n", + "( 6 )Call to func(): i= 2 si= 8 gi= 15\n", + "( 7 )Call to func(): i= 2 si= 9 gi= 17\n", + "( 8 )Call to func(): i= 2 si= 10 gi= 19\n", + "( 9 )Call to func(): i= 2 si= 11 gi= 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.14, page no: 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def max(x,y): #function defined\n", + " if x>y:\n", + " return x\n", + " else:\n", + " return y \n", + "\n", + "a=5\n", + "b=6\n", + "c=max(a,b)\n", + "\n", + "if c==a: # no return by refernce function so declared a simple case\n", + " c=8\n", + " a=c\n", + "elif c==b:\n", + " c=8\n", + " b=c\n", + " \n", + "\n", + "print 'a=',a,'b=',b,'c=',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 5 b= 8 c= 8\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.15, page no: 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def op1(v): #for displaying numbers\n", + " for j in range(len(v)):\n", + " print v[j],\n", + " \n", + "def remove_if(v,x): #for removing elements\n", + " for a in v:\n", + " if not a%x==0:\n", + " v.remove(a)\n", + " return v\n", + "nos=[10,12,15,20,25,27]\n", + "print '(before): ',;op1(nos)\n", + "x=5\n", + "print ''\n", + "nos=remove_if(nos,5)\n", + "print '(after): ',;op1(nos)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(before): 10 12 15 20 25 27 \n", + "(after): 10 15 20 25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.16, page no: 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sort(number): #for sorting\n", + " size=len(number)\n", + " for i in range(size-1 ):\n", + " if int(number[i])>int(number[i+1]):\n", + " temp=number[i]\n", + " number[i]=number[i+1]\n", + " number[i+1]=temp\n", + " return number\n", + " \n", + "def op1(v): #for displaying numbers\n", + " for j in range(len(v)):\n", + " print v[j],\n", + " \n", + "number=[\"1\",\"12\",\"23\",\"2\"]\n", + "\n", + "print '(original): ',;op1(number)\n", + "\n", + "print ''\n", + "number=sort(number) # 1st sort\n", + "print '(after 1st sort): ',;op1(number)\n", + "print ''\n", + "\n", + "number=sort(number)\n", + "print '(after 2nd sort): ',;op1(number) # 2nd sort\n", + "print ''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(original): 1 12 23 2 \n", + "(after 1st sort): 1 12 2 23 \n", + "(after 2nd sort): 1 2 12 23 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_2.ipynb new file mode 100755 index 00000000..e88ee60c --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter5Functions_2.ipynb @@ -0,0 +1,842 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:16bfbc873a6cbcc56829a1af86d2cf77a972ff61a5d715ac403aea9f8f37d495" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.1, page no: 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a number: ') #user input\n", + "b=input('Please input another number: ')\n", + "c=product(a,b)\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 4 and 5 is 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.2, page no: 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a floating point number: ') #user input\n", + "b=input('Please input another floating point number: ')\n", + "c=product(a,b) #function call\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a floating point number: 1.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another floating point number: 1.3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 1.2 and 1.3 is 1.56\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.3, page no: 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def printProduct(x,y): #function product\n", + " c=0\n", + " c=a*b\n", + " print 'The product of ',a,'and',b,'is',c\n", + " return\n", + "\n", + "a=input('Please input an intger: ') #user input\n", + "b=input('Please input another integer: ')\n", + "c=printProduct(a,b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input an intger: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another integer: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 3 and 4 is 12\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.4, page no: 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def product(x,y): #function product\n", + " return x*y\n", + "\n", + "a=input('Please input a number: ') #user input\n", + "b=input('Please input another number: ')\n", + "c=product(a,b)\n", + "print 'the product of ',a,'and',b,'is',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input another number: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the product of 4 and 5 is 20\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.5, page no: 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "\n", + "\n", + "i =c_int(4) \n", + "j=i\n", + "pi=pointer(i)\n", + "value=pi[0]\n", + "pj=pi[0]\n", + "print 'Before incrementing *pi'\n", + "print 'i= ',i.value,'j= ',j.value,'*pi= ',pi[0],'*pj= ',pj\n", + "pi[0]+=1 #no prefix and postfix in python\n", + "pj=pi[0]\n", + "print 'After incrementing *pi'\n", + "print 'i= ',i.value,'j= ',j.value,'*pi= ',pi[0],'*pj= ',pj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before incrementing *pi\n", + "i= 4 j= 4 *pi= 4 *pj= 4\n", + "After incrementing *pi\n", + "i= 5 j= 5 *pi= 5 *pj= 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.6, page no: 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Product(x,y): #function product\n", + " return x*y\n", + "\n", + "print 'Please input two integer: ' #user input\n", + "a=input()\n", + "b=input()\n", + "c=Product(a,b) #call function product\n", + "print 'The product of ',a,'and',b,'is',c\n", + "\n", + "print 'Please input two floating point numbers: '\n", + "f=input()\n", + "g=input()\n", + "h=Product(f,g) #call function product\n", + "print 'The product of ',f,'and',g,'is',h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input two integer: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 4 and 5 is 20\n", + "Please input two floating point numbers: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The product of 1.2 and 2.3 is 2.76\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.7, page no: 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def fracval(numerator =0, denominator =1): #function declaration with default parameters\n", + " val=(numerator/denominator)\n", + " return val\n", + "\n", + "print 'please input numerator and denominator of a fraction: '\n", + "a=input()\n", + "b=input()\n", + "f=fracval(a,b) #function call\n", + "\n", + "print 'The fraction value ',a,'/',b,'=',f\n", + "\n", + "print 'please input the numerator (denominator assumed to be 1: )'\n", + "a=input()\n", + "f=fracval(a)\n", + "print 'The fraction value ',a,'/1','=',f\n", + "\n", + "print 'And the defaukt fraction value is (num=0, denom=1): '\n", + "f=fracval()\n", + "print 'the fraction value 0/1=',f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "please input numerator and denominator of a fraction: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction value 3 / 4 = 0\n", + "please input the numerator (denominator assumed to be 1: )\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction value 3 /1 = 3\n", + "And the defaukt fraction value is (num=0, denom=1): \n", + "the fraction value 0/1= 0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.8, page no: 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b):\n", + " temp=a\n", + " a=b\n", + " b=temp\n", + "\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 3 y= 4\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.9, page no: 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b): #function swap\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " return a,b\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "x,y=swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 4 y= 3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.10, page no: 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(a,b): #function swap\n", + " temp = a\n", + " a = b\n", + " b = temp\n", + " return a,b\n", + " \n", + "#variable declaration\n", + "x=3\n", + "y=4\n", + "print 'before swap: x= ',x,'y= ',y\n", + "x,y=swap(x,y)\n", + "print 'After swap: x= ',x,'y= ',y " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "before swap: x= 3 y= 4\n", + "After swap: x= 4 y= 3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.11, page no: 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def PrintCharManyTimes(ch,n): #function declarator\n", + " for j in range(n): #function body\n", + " print ch,\n", + " print\n", + " \n", + "PrintCharManyTimes('-',40) #call to function\n", + "print 'Data type Range'\n", + "PrintCharManyTimes('=',18) #call to function\n", + "print 'Char -128 to 127'\n", + "print 'int -32,768 to 32,767'\n", + "print 'double -2,147,483,648 to 2,147,483,647'\n", + "PrintCharManyTimes('-',40) #call to function" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n", + "Data type Range\n", + "= = = = = = = = = = = = = = = = = =\n", + "Char -128 to 127\n", + "int -32,768 to 32,767\n", + "double -2,147,483,648 to 2,147,483,647\n", + "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.12, page no: 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def factfunc(a): #calls itself to calculate factorials\n", + " if a>1:\n", + " return a * factfunc(a-1)\n", + " else:\n", + " return 1\n", + " \n", + "n = input(\"Please input a number: \") #get number from user\n", + "fact = factfunc(n) #function call for factorial\n", + "print 'Factorial of',n,'! is',fact,'\\n' #dsplay factorial" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a number: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factorial of 4 ! is 24 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.13, page no: 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "gi=1 #global variable declared\n", + "si = 1 #static variable declared\n", + "\n", + "def func():\n", + " global si\n", + " i=1\n", + " i+=1\n", + " si+=1\n", + " global gi\n", + " gi+=1\n", + " \n", + " print 'i= ',i,'si= ',si,'gi= ',gi\n", + " \n", + "for i in range(10):\n", + " print '(',i,')Call to func(): ',\n", + " gi+=1\n", + " func()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "( 0 )Call to func(): i= 2 si= 2 gi= 3\n", + "( 1 )Call to func(): i= 2 si= 3 gi= 5\n", + "( 2 )Call to func(): i= 2 si= 4 gi= 7\n", + "( 3 )Call to func(): i= 2 si= 5 gi= 9\n", + "( 4 )Call to func(): i= 2 si= 6 gi= 11\n", + "( 5 )Call to func(): i= 2 si= 7 gi= 13\n", + "( 6 )Call to func(): i= 2 si= 8 gi= 15\n", + "( 7 )Call to func(): i= 2 si= 9 gi= 17\n", + "( 8 )Call to func(): i= 2 si= 10 gi= 19\n", + "( 9 )Call to func(): i= 2 si= 11 gi= 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.14, page no: 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def max(x,y): #function defined\n", + " if x>y:\n", + " return x\n", + " else:\n", + " return y \n", + "\n", + "a=5\n", + "b=6\n", + "c=max(a,b)\n", + "\n", + "if c==a: # no return by refernce function so declared a simple case\n", + " c=8\n", + " a=c\n", + "elif c==b:\n", + " c=8\n", + " b=c\n", + " \n", + "\n", + "print 'a=',a,'b=',b,'c=',c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 5 b= 8 c= 8\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.15, page no: 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def op1(v): #for displaying numbers\n", + " for j in range(len(v)):\n", + " print v[j],\n", + " \n", + "def remove_if(v,x): #for removing elements\n", + " for a in v:\n", + " if not a%x==0:\n", + " v.remove(a)\n", + " return v\n", + "nos=[10,12,15,20,25,27]\n", + "print '(before): ',;op1(nos)\n", + "x=5\n", + "print ''\n", + "nos=remove_if(nos,5)\n", + "print '(after): ',;op1(nos)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(before): 10 12 15 20 25 27 \n", + "(after): 10 15 20 25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 5.16, page no: 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sort(number): #for sorting\n", + " size=len(number)\n", + " for i in range(size-1 ):\n", + " if int(number[i])>int(number[i+1]):\n", + " temp=number[i]\n", + " number[i]=number[i+1]\n", + " number[i+1]=temp\n", + " return number\n", + " \n", + "def op1(v): #for displaying numbers\n", + " for j in range(len(v)):\n", + " print v[j],\n", + " \n", + "number=[\"1\",\"12\",\"23\",\"2\"]\n", + "\n", + "print '(original): ',;op1(number)\n", + "\n", + "print ''\n", + "number=sort(number) # 1st sort\n", + "print '(after 1st sort): ',;op1(number)\n", + "print ''\n", + "\n", + "number=sort(number)\n", + "print '(after 2nd sort): ',;op1(number) # 2nd sort\n", + "print ''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(original): 1 12 23 2 \n", + "(after 1st sort): 1 12 2 23 \n", + "(after 2nd sort): 1 2 12 23 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_1.ipynb new file mode 100755 index 00000000..7da7ce30 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_1.ipynb @@ -0,0 +1,149 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:74944d4d674d687817da05b32c7d7e6a40f744c2c6611f0087dc8b6ee839d593" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Preprocessor directives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.1, page no: 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def concat(a): #macro expansion\n", + " return str(a)\n", + "\n", + "def foot(a): #macro expansion\n", + " return str(a)\n", + "\n", + "p='sport'\n", + "b=foot(p)\n", + "\n", + "#Result\n", + "exec(\"print %s\")%concat('b')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sport\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.2, page no: 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "import os\n", + "\n", + "approot=os.path.dirname(os.path.abspath(sys.argv[0])) #to include file\n", + "def line():\n", + " line=1\n", + " line=2\n", + " return line\n", + "\n", + "print approot,\n", + "#x- #no macro as such can be defined in python\n", + "#y+ #no macro as such can be defined in python" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C:\\Users\\nita\\Documents\\IPython Notebooks\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.3, page no: 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import inspect\n", + "\n", + "True=1\n", + "False=0\n", + "approot=os.path.dirname(os.path.abspath(sys.argv[0])) #filename shown\n", + "\n", + "def lineno(): #to print lineno\n", + " return inspect.currentframe().f_back.f_lineno\n", + " \n", + "if __debug__: #assertion\n", + " print 'assertion error line',lineno(),'file(',os.path.dirname(os.path.abspath(sys.argv[0])),')'\n", + " \n", + " \n", + "assert(True)\n", + "i=0\n", + "assert(__debug__)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "assertion error line 11 file( C:\\Users\\nita\\Documents\\IPython Notebooks )\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_2.ipynb new file mode 100755 index 00000000..7da7ce30 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter6Preprocessordirectives_2.ipynb @@ -0,0 +1,149 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:74944d4d674d687817da05b32c7d7e6a40f744c2c6611f0087dc8b6ee839d593" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Preprocessor directives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.1, page no: 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def concat(a): #macro expansion\n", + " return str(a)\n", + "\n", + "def foot(a): #macro expansion\n", + " return str(a)\n", + "\n", + "p='sport'\n", + "b=foot(p)\n", + "\n", + "#Result\n", + "exec(\"print %s\")%concat('b')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sport\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.2, page no: 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "import os\n", + "\n", + "approot=os.path.dirname(os.path.abspath(sys.argv[0])) #to include file\n", + "def line():\n", + " line=1\n", + " line=2\n", + " return line\n", + "\n", + "print approot,\n", + "#x- #no macro as such can be defined in python\n", + "#y+ #no macro as such can be defined in python" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C:\\Users\\nita\\Documents\\IPython Notebooks\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 6.3, page no: 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import inspect\n", + "\n", + "True=1\n", + "False=0\n", + "approot=os.path.dirname(os.path.abspath(sys.argv[0])) #filename shown\n", + "\n", + "def lineno(): #to print lineno\n", + " return inspect.currentframe().f_back.f_lineno\n", + " \n", + "if __debug__: #assertion\n", + " print 'assertion error line',lineno(),'file(',os.path.dirname(os.path.abspath(sys.argv[0])),')'\n", + " \n", + " \n", + "assert(True)\n", + "i=0\n", + "assert(__debug__)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "assertion error line 11 file( C:\\Users\\nita\\Documents\\IPython Notebooks )\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_1.ipynb new file mode 100755 index 00000000..a646ad99 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_1.ipynb @@ -0,0 +1,197 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9b6ad12ed56624bfa853fa24e3a321079565b2d75c9e795594d61b36209d7c62" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Standard C Library Functions and Standard Header Files" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.1, page no: 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def lineno(): #to print lineno\n", + " return inspect.currentframe().f_back.f_lineno\n", + "x=10\n", + "print 'First call to assert ' #assert\n", + "assert(x==10)\n", + "print 'Second call to assert '\n", + "\n", + "#assert(x!=10) assertion failed will be seen\n", + "#print 'Done '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First call to assert \n", + "Second call to assert \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.2, page no: 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=3\n", + "\n", + "str=['ab12cd','34ef56','gh78jk'] #str array declared\n", + "\n", + "NoofAlphabets=[0,0,0]\n", + "temp=0\n", + "for i in range(SIZE):\n", + " NoofAlphabets[i]=0\n", + "\n", + " temp=str[i]\n", + " for j in range(len(temp)):\n", + " if temp[j].isalpha(): #isalpha to find if its alphabet\n", + " NoofAlphabets[i]=NoofAlphabets[i]+1\n", + " print 'Number of alphabets in string : ',str[i],\n", + " print 'is',NoofAlphabets[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of alphabets in string : ab12cd is 4\n", + "Number of alphabets in string : 34ef56 is 2\n", + "Number of alphabets in string : gh78jk is 4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.3, page no: 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "PI=3.1415926535\n", + "\n", + "x=PI/2.0\n", + "y=4.5\n", + "z=2.30258093\n", + "n=0\n", + "print 'sine of PI/2 is',\n", + "print int(math.sin(x))\n", + "print 'cosine of PI/2 is',\n", + "print math.cos(x)\n", + "print 'exponent of %.5f'%z,'is',\n", + "print math.exp(z)\n", + "\n", + "#frexp() take single argument and return a pair of values,rather than returning their second return value through output parameters\n", + "#therefore no such thing occurs in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sine of PI/2 is 1\n", + "cosine of PI/2 is 4.48965921698e-11\n", + "exponent of 2.30258 is 9.99995837015\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.4, page no: 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sum(first): #function declared to compute the sum\n", + " j=1\n", + " i=first[0]\n", + " s=0\n", + " while not i==-1:\n", + " s+=i\n", + " i=first[j]\n", + " j+=1\n", + " return s\n", + " \n", + " \n", + "print 'sum is: ',sum([2,3,4,-1]) #function called\n", + "print 'sum is: ',sum([5,7,9,11,-1])\n", + "print 'sum is: ',sum([-1])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum is: 9\n", + "sum is: 32\n", + "sum is: 0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_2.ipynb new file mode 100755 index 00000000..a646ad99 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter7StandardCLibraryFunctionsandStandardHeaderFiles_2.ipynb @@ -0,0 +1,197 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9b6ad12ed56624bfa853fa24e3a321079565b2d75c9e795594d61b36209d7c62" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Standard C Library Functions and Standard Header Files" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.1, page no: 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def lineno(): #to print lineno\n", + " return inspect.currentframe().f_back.f_lineno\n", + "x=10\n", + "print 'First call to assert ' #assert\n", + "assert(x==10)\n", + "print 'Second call to assert '\n", + "\n", + "#assert(x!=10) assertion failed will be seen\n", + "#print 'Done '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First call to assert \n", + "Second call to assert \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.2, page no: 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SIZE=3\n", + "\n", + "str=['ab12cd','34ef56','gh78jk'] #str array declared\n", + "\n", + "NoofAlphabets=[0,0,0]\n", + "temp=0\n", + "for i in range(SIZE):\n", + " NoofAlphabets[i]=0\n", + "\n", + " temp=str[i]\n", + " for j in range(len(temp)):\n", + " if temp[j].isalpha(): #isalpha to find if its alphabet\n", + " NoofAlphabets[i]=NoofAlphabets[i]+1\n", + " print 'Number of alphabets in string : ',str[i],\n", + " print 'is',NoofAlphabets[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of alphabets in string : ab12cd is 4\n", + "Number of alphabets in string : 34ef56 is 2\n", + "Number of alphabets in string : gh78jk is 4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.3, page no: 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "PI=3.1415926535\n", + "\n", + "x=PI/2.0\n", + "y=4.5\n", + "z=2.30258093\n", + "n=0\n", + "print 'sine of PI/2 is',\n", + "print int(math.sin(x))\n", + "print 'cosine of PI/2 is',\n", + "print math.cos(x)\n", + "print 'exponent of %.5f'%z,'is',\n", + "print math.exp(z)\n", + "\n", + "#frexp() take single argument and return a pair of values,rather than returning their second return value through output parameters\n", + "#therefore no such thing occurs in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sine of PI/2 is 1\n", + "cosine of PI/2 is 4.48965921698e-11\n", + "exponent of 2.30258 is 9.99995837015\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 7.4, page no: 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sum(first): #function declared to compute the sum\n", + " j=1\n", + " i=first[0]\n", + " s=0\n", + " while not i==-1:\n", + " s+=i\n", + " i=first[j]\n", + " j+=1\n", + " return s\n", + " \n", + " \n", + "print 'sum is: ',sum([2,3,4,-1]) #function called\n", + "print 'sum is: ',sum([5,7,9,11,-1])\n", + "print 'sum is: ',sum([-1])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum is: 9\n", + "sum is: 32\n", + "sum is: 0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_1.ipynb new file mode 100755 index 00000000..8db5c66a --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_1.ipynb @@ -0,0 +1,809 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:71f6272ff80fba8dd35a6c67e596d2f16e7cd4c25b1ec9c26734fd97740b426d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Data Abstraction through Classes and User-Defined Data Types" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.1, page no:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Super:\n", + " def __init__(self):\n", + " self.__IntegerData=None #private member\n", + " #public functions\n", + " def SetData(self,i):\n", + " self.__IntegerData=i #refer to IntegerData\n", + " def ShowData(self):\n", + " print \"Data is \",self.__IntegerData,' '\n", + "\n", + "ob1=Super()\n", + "ob2=Super()\n", + "ob1.SetData(1000)\n", + "ob2.SetData(2000)\n", + "ob1.ShowData()\n", + "ob2.ShowData()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Data is 1000 \n", + "Data is 2000 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.2, page no:211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X:\n", + " def __init__(self):\n", + " self.a=None #private members\n", + " self.b=None #private members\n", + " \n", + "#no structure type present in python \n", + "x = X()\n", + "\n", + "x.a=0\n", + "x.b=1\n", + "print \"x.a=\",x.a,\",x.b=\",x.b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x.a= 0 ,x.b= 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.3, page no:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def SetValue(self,a,b): #public functions\n", + " self.__num=a \n", + " self.__denom=b \n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " \n", + "f=Fraction()\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"enter the numerator and denominator: \", ' ',n,d\n", + "\n", + "f.SetValue(n,d) #call function SetValue\n", + "print \"Numerator value set: \", ' ',n\n", + "print \"Denominator value set: \", ' ',d\n", + "f.GetValue(n,d) #call function GetData\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enter the numerator and denominator: 3 4\n", + "Numerator value set: 3\n", + "Denominator value set: 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.4, page no:216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class SimpleClass:\n", + " def __init__(self):\n", + " self.__i=None #private member\n", + " \n", + " def __init__(self):\n", + " self.__i=500 #constructor\n", + " \n", + " def SetData(self,d):\n", + " self.__i=d\n", + " \n", + " def GetData(self):\n", + " return self.__i\n", + " \n", + "#Initializing\n", + "s1=SimpleClass()\n", + "s2=SimpleClass()\n", + "print \"s1 has data: \",s1.GetData()\n", + "print \"s2 has data: \",s2.GetData()\n", + "s1.SetData(1000) #function call\n", + "s2.SetData(2000)\n", + "print \"s1 has data: \",s1.GetData(),' '\n", + "print \"s2 has data: \", s2.GetData(),' '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s1 has data: 500\n", + "s2 has data: 500\n", + "s1 has data: 1000 \n", + "s2 has data: 2000 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.5, page no:217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class SimpleClass:\n", + " __IntegerData=None\n", + " def __init__(self,data=None):\n", + " if data==None:\n", + " self.__IntegerData=500 #default constructor\n", + " else:\n", + " self.__IntegerData=data #parameterised constructor\n", + " \n", + " def SetData(self,d):\n", + " self.__IntegerData=d\n", + " \n", + " def GetData(self):\n", + " return self.__IntegerData\n", + " \n", + "#Initializing\n", + "s1=SimpleClass()\n", + "s2=SimpleClass()\n", + "s3=SimpleClass(400)\n", + "s4=SimpleClass(600)\n", + "print \"s1 has data: \",s1.GetData(),' '\n", + "print \"s2 has data: \",s2.GetData(),' '\n", + "print \"s3 has data: \",s3.GetData(),' '\n", + "print \"s4 has data: \",s4.GetData(),' '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s1 has data: 500 \n", + "s2 has data: 500 \n", + "s3 has data: 400 \n", + "s4 has data: 600 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.6, page no:218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction: \n", + " def_init_num=None #private members\n", + " def_init_denom=None #private members\n", + " def __init__(self,a=0,b=1):\n", + " self.__num=a\n", + " self.__denom=b\n", + " print \"Numerator set inside constructor\",' ',n\n", + " print \"Denominator set inside constructor\",' ',d\n", + " \n", + " def SetValue(self,a,b):\n", + " self.__num=a\n", + " self.__denom=b\n", + " def GetValue(self,a,b):\n", + " a= self.__num\n", + " b= self.__denom\n", + " return a,b\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"Please enter value of numerator and denominator: \",' ',n,d\n", + "f=Fraction(n,d)\n", + "f.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter value of numerator and denominator: 3 4\n", + "Numerator set inside constructor 3\n", + "Denominator set inside constructor 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.7, page no:221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print \"Numerator set inside constructor: \",self.__num\n", + " print \"Denominator set inside constructor: \",self.__denom \n", + " \n", + " def GetValue(self,a,b):\n", + " return self.__num,self.__denom\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"Please enter the value of the numerator and denominator: \",n,d\n", + "f=Fraction(n,d)\n", + "n,d=f.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "n=input(\"Please enter the value of numerator only: \")\n", + "f1=Fraction(n)\n", + "n,d=f1.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "print 'ok..now I will create a fraction-no input please'\n", + "f2=Fraction()\n", + "n,d=f2.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the value of the numerator and denominator: 3 4\n", + "Numerator set inside constructor: 3\n", + "Denominator set inside constructor: 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the value of numerator only: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerator set inside constructor: 3\n", + "Denominator set inside constructor: 1\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 1\n", + "ok..now I will create a fraction-no input please\n", + "Numerator set inside constructor: 0\n", + "Denominator set inside constructor: 1\n", + "Numerator value retrieved: 0\n", + "Denominator value retrieved: 1\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.8, page no:223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " def_init_num=None #private members\n", + " def_init_denom=None #private members\n", + " \n", + " def __init__(self,anotherFraction=None): \n", + " if anotherFraction==None: #normal constructor\n", + " self.__num=anotherFraction\n", + " self.__denom=anotherFraction\n", + " else: #copy constructor\n", + " self.__num=anotherFraction.self.__num\n", + " self.__denom=anotherFraction.self.__denom\n", + " \n", + " \n", + " #public functions\n", + " def SetValue(self,a,b):\n", + " self.__num=a\n", + " self.__denom=b#refer to IntegerData\n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " return a,b\n", + " \n", + "f=Fraction()\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"enter the numerator and denominator: \", ' ',n,d\n", + "\n", + "f.SetValue(n,d) #call function SetValue\n", + "print \"Numerator value set: \", ' ',n\n", + "print \"Denominator value set: \", ' ',d\n", + "f.GetValue(n,d) #call function GetData\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "print \"Now a second clone copy is being created: \",''\n", + "f1=f\n", + "f1.GetValue(n,d)\n", + "print \"Clone's numerator value retrieved: \", ' ',n\n", + "print \"Clone's denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enter the numerator and denominator: 5 6\n", + "Numerator value set: 5\n", + "Denominator value set: 6\n", + "Numerator value retrieved: 5\n", + "Denominator value retrieved: 6\n", + "Now a second clone copy is being created: \n", + "Clone's numerator value retrieved: 5\n", + "Clone's denominator value retrieved: 6\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.9, page no:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def MyNewHandler():\n", + " print \"Sorry operator new failed to allocate memory\"\n", + " exit(0)\n", + " \n", + "def _set_new_handler(s):\n", + " s()\n", + "#In python there is no in-built _set_new_handler function, so i made this function and passed MyNewHandler function as a parameters\n", + "_set_new_handler(MyNewHandler)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry operator new failed to allocate memory\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.10, page no:230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import * \n", + "class Fraction: \n", + " def __init__(self,a=0,b=1): \n", + " if isinstance(a,int): \n", + " c = c_int(a) \n", + " d = c_int(b) \n", + " self.__num = pointer(c) \n", + " self.__denom = pointer(d) \n", + " print 'constructor sets numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " else:\n", + " c=c_int(a.__num[0])\n", + " d = c_int(a.__denom[0])\n", + " self.__num = pointer(c) \n", + " self.__denom = pointer(d)\n", + " print 'copy constructor sets numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " \n", + " def __del__(self): \n", + " print 'destructor deallocates numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " \n", + "n = input(\"Please enter values of numerator: \") \n", + "d = input(\"Please enter values of denominator: \") \n", + "f = Fraction(n,d) \n", + "print 'Please enter another set of ' \n", + "n = input(\"numerator: \") \n", + "d = input(\"denominator: \") \n", + "print 'Creating fraction *pf : ' \n", + "pf = Fraction(n,d) \n", + "print 'Now a clone copy (f2) created from *pf: ' \n", + "f2 = Fraction(pf)\n", + "print 'Now another clone copy (*pf2) created from f:' \n", + "pf2 = Fraction(f) \n", + "print '*pf2 is being destroyed:' \n", + "del pf2\n", + "print '*pf is being destroyed:' \n", + "del pf \n", + "print 'now objects f2 and f automatically destroyed : '" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of numerator: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of denominator: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "constructor sets numerator = 3 , denominator = 4\n", + "Please enter another set of \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "numerator: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "denominator: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Creating fraction *pf : \n", + "constructor sets numerator = 5 , denominator = 6\n", + "Now a clone copy (f2) created from *pf: \n", + "copy constructor sets numerator = 5 , denominator = 6\n", + "Now another clone copy (*pf2) created from f:\n", + "copy constructor sets numerator = 3 , denominator = 4\n", + "*pf2 is being destroyed:\n", + "*pf is being destroyed:\n", + "now objects f2 and f automatically destroyed : \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.11, page no:234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Memfail(self,s):\n", + " print \"Sorry Unable to allocate memory\"\n", + " sys.exit(0)\n", + "\n", + "MAX_SIZE = 60 + 1\n", + "\n", + "MAX_SIZE=[[0 for col in range(MAX_SIZE)]for row in range(MAX_SIZE)]\n", + "nChar=0\n", + "chArr=\"Hello\"\n", + "\n", + "print \"Please input a string( 60 characters max.): \",chArr\n", + "\n", + "nChar=len(chArr)+1\n", + "szStr=chArr\n", + "print \"required memory space for\",nChar,\n", + "print \"characters\"\n", + "chArr=szStr #string copy\n", + "szStr=chArr\n", + "print \"String copied in allocated space: \",szStr\n", + "print \"Memory space dellocated\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a string( 60 characters max.): Hello\n", + "required memory space for 6 characters\n", + "String copied in allocated space: Hello\n", + "Memory space dellocated\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.12, page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " return self.__num,self.__denom\n", + "n=4\n", + "d=5\n", + "f=Fraction(4,5)\n", + "n,d=f.GetValue(n,d)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.13, page no:239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X:\n", + " __sa=20 #initialising static member\n", + " a = None\n", + " def __init__(self):\n", + " self.a=None #public member\n", + " def f(self,b):\n", + " a=30\n", + " print \"Global a= \",b\n", + " print \"Local a= \",a\n", + " print \"Nonstatic member a= \",self.a\n", + " print \"static member sa= \",self.__sa\n", + "\n", + "a=10\n", + "\n", + "aXobj=X()\n", + "aXobj.a=40\n", + "aXobj.f(a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Global a= 10\n", + "Local a= 30\n", + "Nonstatic member a= 40\n", + "static member sa= 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_2.ipynb new file mode 100755 index 00000000..695d0d93 --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter8DataAbstractionthroughClassesandUser-DefinedDataTypes_2.ipynb @@ -0,0 +1,809 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:aecc03b8e3be8ef30e30be106838495943ef7acb7067a9ae12ce5caf6e56d2f9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Data Abstraction through Classes and User-Defined Data Types" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.1, page no:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Super:\n", + " def __init__(self):\n", + " self.__IntegerData=None #private member\n", + " #public functions\n", + " def SetData(self,i):\n", + " self.__IntegerData=i #refer to IntegerData\n", + " def ShowData(self):\n", + " print \"Data is \",self.__IntegerData,' '\n", + "\n", + "ob1=Super()\n", + "ob2=Super()\n", + "ob1.SetData(1000)\n", + "ob2.SetData(2000)\n", + "ob1.ShowData()\n", + "ob2.ShowData()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Data is 1000 \n", + "Data is 2000 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.2, page no:211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X:\n", + " def __init__(self):\n", + " self.a=None #private members\n", + " self.b=None #private members\n", + " \n", + "#no structure type present in python \n", + "x = X()\n", + "\n", + "x.a=0\n", + "x.b=1\n", + "print \"x.a=\",x.a,\",x.b=\",x.b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x.a= 0 ,x.b= 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.3, page no:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def SetValue(self,a,b): #public functions\n", + " self.__num=a \n", + " self.__denom=b \n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " \n", + "f=Fraction()\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"enter the numerator and denominator: \", ' ',n,d\n", + "\n", + "f.SetValue(n,d) #call function SetValue\n", + "print \"Numerator value set: \", ' ',n\n", + "print \"Denominator value set: \", ' ',d\n", + "f.GetValue(n,d) #call function GetData\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enter the numerator and denominator: 3 4\n", + "Numerator value set: 3\n", + "Denominator value set: 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.4, page no:216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class SimpleClass:\n", + " def __init__(self):\n", + " self.__i=None #private member\n", + " \n", + " def __init__(self):\n", + " self.__i=500 #constructor\n", + " \n", + " def SetData(self,d):\n", + " self.__i=d\n", + " \n", + " def GetData(self):\n", + " return self.__i\n", + " \n", + "#Initializing\n", + "s1=SimpleClass()\n", + "s2=SimpleClass()\n", + "print \"s1 has data: \",s1.GetData()\n", + "print \"s2 has data: \",s2.GetData()\n", + "s1.SetData(1000) #function call\n", + "s2.SetData(2000)\n", + "print \"s1 has data: \",s1.GetData(),' '\n", + "print \"s2 has data: \", s2.GetData(),' '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s1 has data: 500\n", + "s2 has data: 500\n", + "s1 has data: 1000 \n", + "s2 has data: 2000 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.5, page no:217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class SimpleClass:\n", + " __IntegerData=None\n", + " def __init__(self,data=None):\n", + " if data==None:\n", + " self.__IntegerData=500 #default constructor\n", + " else:\n", + " self.__IntegerData=data #parameterised constructor\n", + " \n", + " def SetData(self,d):\n", + " self.__IntegerData=d\n", + " \n", + " def GetData(self):\n", + " return self.__IntegerData\n", + " \n", + "#Initializing\n", + "s1=SimpleClass()\n", + "s2=SimpleClass()\n", + "s3=SimpleClass(400)\n", + "s4=SimpleClass(600)\n", + "print \"s1 has data: \",s1.GetData(),' '\n", + "print \"s2 has data: \",s2.GetData(),' '\n", + "print \"s3 has data: \",s3.GetData(),' '\n", + "print \"s4 has data: \",s4.GetData(),' '\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "s1 has data: 500 \n", + "s2 has data: 500 \n", + "s3 has data: 400 \n", + "s4 has data: 600 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.6, page no:218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction: \n", + " def_init_num=None #private members\n", + " def_init_denom=None #private members\n", + " def __init__(self,a=0,b=1):\n", + " self.__num=a\n", + " self.__denom=b\n", + " print \"Numerator set inside constructor\",' ',n\n", + " print \"Denominator set inside constructor\",' ',d\n", + " \n", + " def SetValue(self,a,b):\n", + " self.__num=a\n", + " self.__denom=b\n", + " def GetValue(self,a,b):\n", + " a= self.__num\n", + " b= self.__denom\n", + " return a,b\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"Please enter value of numerator and denominator: \",' ',n,d\n", + "f=Fraction(n,d)\n", + "f.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter value of numerator and denominator: 3 4\n", + "Numerator set inside constructor 3\n", + "Denominator set inside constructor 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.7, page no:221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print \"Numerator set inside constructor: \",self.__num\n", + " print \"Denominator set inside constructor: \",self.__denom \n", + " \n", + " def GetValue(self,a,b):\n", + " return self.__num,self.__denom\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"Please enter the value of the numerator and denominator: \",n,d\n", + "f=Fraction(n,d)\n", + "n,d=f.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "n=input(\"Please enter the value of numerator only: \")\n", + "f1=Fraction(n)\n", + "n,d=f1.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "print 'ok..now I will create a fraction-no input please'\n", + "f2=Fraction()\n", + "n,d=f2.GetValue(n,d)\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the value of the numerator and denominator: 3 4\n", + "Numerator set inside constructor: 3\n", + "Denominator set inside constructor: 4\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter the value of numerator only: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerator set inside constructor: 3\n", + "Denominator set inside constructor: 1\n", + "Numerator value retrieved: 3\n", + "Denominator value retrieved: 1\n", + "ok..now I will create a fraction-no input please\n", + "Numerator set inside constructor: 0\n", + "Denominator set inside constructor: 1\n", + "Numerator value retrieved: 0\n", + "Denominator value retrieved: 1\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.8, page no:223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " def_init_num=None #private members\n", + " def_init_denom=None #private members\n", + " \n", + " def __init__(self,anotherFraction=None): \n", + " if anotherFraction==None: #normal constructor\n", + " self.__num=anotherFraction\n", + " self.__denom=anotherFraction\n", + " else: #copy constructor\n", + " self.__num=anotherFraction.self.__num\n", + " self.__denom=anotherFraction.self.__denom\n", + " \n", + " \n", + " #public functions\n", + " def SetValue(self,a,b):\n", + " self.__num=a\n", + " self.__denom=b#refer to IntegerData\n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " return a,b\n", + " \n", + "f=Fraction()\n", + "n=input(\"Enter n: \") #user input\n", + "d=input(\"Enter d: \") #user input\n", + "print \"enter the numerator and denominator: \", ' ',n,d\n", + "\n", + "f.SetValue(n,d) #call function SetValue\n", + "print \"Numerator value set: \", ' ',n\n", + "print \"Denominator value set: \", ' ',d\n", + "f.GetValue(n,d) #call function GetData\n", + "print \"Numerator value retrieved: \", ' ',n\n", + "print \"Denominator value retrieved: \", ' ',d\n", + "print \"Now a second clone copy is being created: \",''\n", + "f1=f\n", + "f1.GetValue(n,d)\n", + "print \"Clone's numerator value retrieved: \", ' ',n\n", + "print \"Clone's denominator value retrieved: \", ' ',d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter n: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter d: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enter the numerator and denominator: 5 6\n", + "Numerator value set: 5\n", + "Denominator value set: 6\n", + "Numerator value retrieved: 5\n", + "Denominator value retrieved: 6\n", + "Now a second clone copy is being created: \n", + "Clone's numerator value retrieved: 5\n", + "Clone's denominator value retrieved: 6\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.9, page no:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def MyNewHandler():\n", + " print \"Sorry operator new failed to allocate memory\"\n", + " exit(0)\n", + " \n", + "def _set_new_handler(s):\n", + " s()\n", + "#In python there is no in-built _set_new_handler function, so i made this function and passed MyNewHandler function as a parameters\n", + "_set_new_handler(MyNewHandler)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorry operator new failed to allocate memory\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.10, page no:230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int,pointer\n", + "class Fraction: \n", + " def __init__(self,a=0,b=1): \n", + " if isinstance(a,int): \n", + " c = c_int(a) \n", + " d = c_int(b) \n", + " self.__num = pointer(c) \n", + " self.__denom = pointer(d) \n", + " print 'constructor sets numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " else:\n", + " c=c_int(a.__num[0])\n", + " d = c_int(a.__denom[0])\n", + " self.__num = pointer(c) \n", + " self.__denom = pointer(d)\n", + " print 'copy constructor sets numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " \n", + " def __del__(self): \n", + " print 'destructor deallocates numerator = ', self.__num[0] , ', denominator = ', self.__denom[0] \n", + " \n", + "n = input(\"Please enter values of numerator: \") \n", + "d = input(\"Please enter values of denominator: \") \n", + "f = Fraction(n,d) \n", + "print 'Please enter another set of ' \n", + "n = input(\"numerator: \") \n", + "d = input(\"denominator: \") \n", + "print 'Creating fraction *pf : ' \n", + "pf = Fraction(n,d) \n", + "print 'Now a clone copy (f2) created from *pf: ' \n", + "f2 = Fraction(pf)\n", + "print 'Now another clone copy (*pf2) created from f:' \n", + "pf2 = Fraction(f) \n", + "print '*pf2 is being destroyed:' \n", + "del pf2\n", + "print '*pf is being destroyed:' \n", + "del pf \n", + "print 'now objects f2 and f automatically destroyed : '" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of numerator: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of denominator: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "constructor sets numerator = 3 , denominator = 4\n", + "Please enter another set of \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "numerator: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "denominator: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Creating fraction *pf : \n", + "constructor sets numerator = 5 , denominator = 6\n", + "Now a clone copy (f2) created from *pf: \n", + "copy constructor sets numerator = 5 , denominator = 6\n", + "Now another clone copy (*pf2) created from f:\n", + "copy constructor sets numerator = 3 , denominator = 4\n", + "*pf2 is being destroyed:\n", + "*pf is being destroyed:\n", + "now objects f2 and f automatically destroyed : \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.11, page no:234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Memfail(self,s):\n", + " print \"Sorry Unable to allocate memory\"\n", + " sys.exit(0)\n", + "\n", + "MAX_SIZE = 60 + 1\n", + "\n", + "MAX_SIZE=[[0 for col in range(MAX_SIZE)]for row in range(MAX_SIZE)]\n", + "nChar=0\n", + "chArr=\"Hello\"\n", + "\n", + "print \"Please input a string( 60 characters max.): \",chArr\n", + "\n", + "nChar=len(chArr)+1\n", + "szStr=chArr\n", + "print \"required memory space for\",nChar,\n", + "print \"characters\"\n", + "chArr=szStr #string copy\n", + "szStr=chArr\n", + "print \"String copied in allocated space: \",szStr\n", + "print \"Memory space dellocated\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please input a string( 60 characters max.): Hello\n", + "required memory space for 6 characters\n", + "String copied in allocated space: Hello\n", + "Memory space dellocated\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.12, page no:236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + " \n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " \n", + " def __del__(self): #destructor\n", + " pass\n", + " \n", + " def GetValue(self,a,b):\n", + " a=self.__num\n", + " b=self.__denom\n", + " return self.__num,self.__denom\n", + "n=4\n", + "d=5\n", + "f=Fraction(4,5)\n", + "n,d=f.GetValue(n,d)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 8.13, page no:239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X:\n", + " __sa=20 #initialising static member\n", + " a = None\n", + " def __init__(self):\n", + " self.a=None #public member\n", + " def f(self,b):\n", + " a=30\n", + " print \"Global a= \",b\n", + " print \"Local a= \",a\n", + " print \"Nonstatic member a= \",self.a\n", + " print \"static member sa= \",self.__sa\n", + "\n", + "a=10\n", + "\n", + "aXobj=X()\n", + "aXobj.a=40\n", + "aXobj.f(a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Global a= 10\n", + "Local a= 30\n", + "Nonstatic member a= 40\n", + "static member sa= 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_1.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_1.ipynb new file mode 100755 index 00000000..12cad0bc --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_1.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da54693f4a47e29d6add6a87ce31b222819e27a7eec6b27b19e48f41a0d957d8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Operator Overloading" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.1, page no: 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def gcd(a,b): #function gcd\n", + " if a>b:\n", + " c=a\n", + " a=b\n", + " b=c\n", + " c=b%a\n", + " \n", + " while c!=0:\n", + " b=a\n", + " a=c\n", + " c=b%a\n", + " return a\n", + "\n", + "def lcm(a,b): #function lcm\n", + " g=gcd(a,b)\n", + " l=g*(a/g)*(b/g)\n", + " return l\n", + "\n", + "class Fraction: #class\n", + "\n", + " def __init__(self,a=0,b=1,anotherfraction=None): \n", + " if anotherfraction==None: #normal constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'fraction object (',self.__num,'/',self.__denom,') created'\n", + " else: #copy constructor\n", + " self.__num=aanotherfraction.self.__num\n", + " self.__denom=anotherfraction.self.__denom\n", + " print 'fraction object (',self.__num,'/',self.__denom,')created(copy)'\n", + " \n", + " \n", + " def __del__(self): #destructor\n", + " print 'fraction object (',self.__num,'/',self.__denom,') destroyed' \n", + " \n", + " \n", + " \n", + " #Overload +\n", + " def __add__(self,operand2):\n", + " tmp=Fraction()\n", + " l=lcm(self.__denom,operand2.__denom)\n", + " tmp.__num=self.__num*(l/self.__denom)+operand2.__num*(l/operand2.__denom)\n", + " tmp.__denom=l\n", + " g=gcd(tmp.__num,tmp.__denom)\n", + " tmp.__num/=g\n", + " tmp.__denom/=g\n", + " print 'In overloaded Fraction::operator + : ( ',self.__num,'/',self.__denom,') + (',operand2.__num,'/',operand2.__denom,') = (',tmp.__num,'/',tmp.__denom,')'\n", + " return tmp\n", + " \n", + " #overloading = \n", + " def __assign__(self,rval):\n", + " self.__num=rval.self.__num\n", + " self.__denom=rval.self.__denom\n", + " print 'In overloaded Fraction::operator = : ( ',rval.self.__num,'/',rval.self.__denom,') -> (',self.__num,'/',self.__denom,')'\n", + " return self\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "print 'Please enter values of numerator and denominator:' \n", + "n=input()\n", + "d=input()\n", + "f1=Fraction(n,d)\n", + "\n", + "print 'Please enter another set of numerator and denominator: '\n", + "n=input()\n", + "d=input()\n", + "f2=Fraction(n,d)\n", + "b=f2\n", + "f3=Fraction()\n", + "f3=f1+f2\n", + "f3=f2=f1\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of numerator and denominator:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction object ( 3 / 4 ) created\n", + "Please enter another set of numerator and denominator: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction object ( 5 / 6 ) created\n", + "fraction object ( 0 / 1 ) created\n", + "fraction object ( 0 / 1 ) created\n", + "In overloaded Fraction::operator + : ( 3 / 4 ) + ( 5 / 6 ) = ( 19 / 12 )\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 19 / 12 ) destroyed\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.2, page no: 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Integer: #class defined\n", + " def __init__(self,a=None,arg=None): #constructor\n", + " if arg==None:\n", + " self.__i=a\n", + " else:\n", + " self.__i=arg.__i\n", + " \n", + " def __del__(self):\n", + " pass\n", + " \n", + " #Overload +\n", + " def __add__(self,arg): \n", + " tmp=Integer()\n", + " tmp.__i=self.__i + arg.__i #These are integer additions\n", + " return tmp \n", + " \n", + " #Overload assignment\n", + " def __assign__(self,arg):\n", + " self.__i=arg.__i #These are integer assignments \n", + " return self\n", + " \n", + " #Overload the increment operator\n", + " def __iadd__(self,arg):\n", + " tmp=Integer()\n", + " tmp=self\n", + " self.__i+=arg\n", + " return self\n", + " \n", + " def __int(self):\n", + " return self.__i\n", + "a=5\n", + "b=Integer() #object of integer class\n", + "b=5\n", + "a+=1\n", + "a=a+a\n", + "a+=1\n", + "b=b+1\n", + "b=b+b\n", + "print 'a=',a\n", + "print 'b=',b\n", + "\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 13\n", + "b= 12\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.3, page no: 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "class Fraction:\n", + " __num=None\n", + " __denom=None\n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'Constructor call: Fraction object (',self.__num,'/',self.__denom,') created'\n", + " \n", + " def __del__(self):\n", + " print 'Fraction object (',self.__num,'/',self.__denom,') destroyed'\n", + " \n", + " # Python doesn't have >> operator for input so we are just using input function \n", + " def input(self):\n", + " self.__num = int(raw_input())\n", + " self.__denom = int(raw_input())\n", + " \n", + " \n", + " #Python does not use << operator for printing. So here we are just declaring function name as print_ \n", + " def _repr_(self):\n", + " print 'The fraction is ',\n", + " print self.__num , '/', self.__denom\n", + " \n", + " \n", + "f1=Fraction()\n", + "print 'Please enter the values of numerator and denominator: '\n", + "f1.input()\n", + "f1._repr_()\n", + "\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor call: Fraction object ( 0 / 1 ) created\n", + "Please enter the values of numerator and denominator: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction is 3 / 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.4, page no: 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + "\n", + " def __init__(self,a=0,b=1): \n", + " #normal constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'Constructor Call : fraction object (',self.__num,'/',self.__denom,') created'\n", + " \n", + " def __del__(self): #destructor\n", + " print 'fraction object (',self.__num,'/',self.__denom,') destroyed' \n", + " \n", + " def __new__(typ, sz):\n", + " print 'Fraction:: operator new called to'\n", + " print 'allocate ',sz,'bytes'\n", + " return AllocateMem(sz) \n", + " \n", + "def AllocateMem(sz):\n", + " if pm==NULL:\n", + " print 'failed to allocate memory'\n", + " exit(0)\n", + " else:\n", + " print 'Memory successfully allocated '\n", + " return pm\n", + "\n", + "def FreeMem(m):\n", + " pass\n", + "def __new__(typ, *args, **kwargs):\n", + " obj = object.__new__(typ, *args, **kwargs)\n", + " print 'Global operator new called to'\n", + " print 'allocate ',sz,'bytes'\n", + " return AllocateMem(sz)\n", + " \n", + "\n", + "pf1=[]*4\n", + "pf2=[]\n", + "\n", + "print 'Memory succesfully allocated'\n", + "for i in xrange(4): #allocate array\n", + " pf1.append(Fraction())\n", + "print 'Memory succesfully allocated'\n", + "for i in range(1):\n", + " pf2.append(Fraction()) \n", + "\n", + "del pf2[0] #delete object\n", + "print 'Fraction::operator delete called'\n", + "\n", + "for i in range(3,-1,-1):\n", + " del pf1[i] #delete array\n", + " \n", + "\n", + "print 'Global operator delete called'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory succesfully allocated\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Memory succesfully allocated\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "fraction object ( 0 / 1 ) destroyed\n", + "Fraction::operator delete called\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "Global operator delete called\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_2.ipynb b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_2.ipynb new file mode 100755 index 00000000..12cad0bc --- /dev/null +++ b/C++_and_Object-oriented_Programming_Paradigm_by_Debasish_Jana/Chapter9OperatorOverloading_2.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da54693f4a47e29d6add6a87ce31b222819e27a7eec6b27b19e48f41a0d957d8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Operator Overloading" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.1, page no: 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def gcd(a,b): #function gcd\n", + " if a>b:\n", + " c=a\n", + " a=b\n", + " b=c\n", + " c=b%a\n", + " \n", + " while c!=0:\n", + " b=a\n", + " a=c\n", + " c=b%a\n", + " return a\n", + "\n", + "def lcm(a,b): #function lcm\n", + " g=gcd(a,b)\n", + " l=g*(a/g)*(b/g)\n", + " return l\n", + "\n", + "class Fraction: #class\n", + "\n", + " def __init__(self,a=0,b=1,anotherfraction=None): \n", + " if anotherfraction==None: #normal constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'fraction object (',self.__num,'/',self.__denom,') created'\n", + " else: #copy constructor\n", + " self.__num=aanotherfraction.self.__num\n", + " self.__denom=anotherfraction.self.__denom\n", + " print 'fraction object (',self.__num,'/',self.__denom,')created(copy)'\n", + " \n", + " \n", + " def __del__(self): #destructor\n", + " print 'fraction object (',self.__num,'/',self.__denom,') destroyed' \n", + " \n", + " \n", + " \n", + " #Overload +\n", + " def __add__(self,operand2):\n", + " tmp=Fraction()\n", + " l=lcm(self.__denom,operand2.__denom)\n", + " tmp.__num=self.__num*(l/self.__denom)+operand2.__num*(l/operand2.__denom)\n", + " tmp.__denom=l\n", + " g=gcd(tmp.__num,tmp.__denom)\n", + " tmp.__num/=g\n", + " tmp.__denom/=g\n", + " print 'In overloaded Fraction::operator + : ( ',self.__num,'/',self.__denom,') + (',operand2.__num,'/',operand2.__denom,') = (',tmp.__num,'/',tmp.__denom,')'\n", + " return tmp\n", + " \n", + " #overloading = \n", + " def __assign__(self,rval):\n", + " self.__num=rval.self.__num\n", + " self.__denom=rval.self.__denom\n", + " print 'In overloaded Fraction::operator = : ( ',rval.self.__num,'/',rval.self.__denom,') -> (',self.__num,'/',self.__denom,')'\n", + " return self\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "print 'Please enter values of numerator and denominator:' \n", + "n=input()\n", + "d=input()\n", + "f1=Fraction(n,d)\n", + "\n", + "print 'Please enter another set of numerator and denominator: '\n", + "n=input()\n", + "d=input()\n", + "f2=Fraction(n,d)\n", + "b=f2\n", + "f3=Fraction()\n", + "f3=f1+f2\n", + "f3=f2=f1\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter values of numerator and denominator:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction object ( 3 / 4 ) created\n", + "Please enter another set of numerator and denominator: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction object ( 5 / 6 ) created\n", + "fraction object ( 0 / 1 ) created\n", + "fraction object ( 0 / 1 ) created\n", + "In overloaded Fraction::operator + : ( 3 / 4 ) + ( 5 / 6 ) = ( 19 / 12 )\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 19 / 12 ) destroyed\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.2, page no: 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Integer: #class defined\n", + " def __init__(self,a=None,arg=None): #constructor\n", + " if arg==None:\n", + " self.__i=a\n", + " else:\n", + " self.__i=arg.__i\n", + " \n", + " def __del__(self):\n", + " pass\n", + " \n", + " #Overload +\n", + " def __add__(self,arg): \n", + " tmp=Integer()\n", + " tmp.__i=self.__i + arg.__i #These are integer additions\n", + " return tmp \n", + " \n", + " #Overload assignment\n", + " def __assign__(self,arg):\n", + " self.__i=arg.__i #These are integer assignments \n", + " return self\n", + " \n", + " #Overload the increment operator\n", + " def __iadd__(self,arg):\n", + " tmp=Integer()\n", + " tmp=self\n", + " self.__i+=arg\n", + " return self\n", + " \n", + " def __int(self):\n", + " return self.__i\n", + "a=5\n", + "b=Integer() #object of integer class\n", + "b=5\n", + "a+=1\n", + "a=a+a\n", + "a+=1\n", + "b=b+1\n", + "b=b+b\n", + "print 'a=',a\n", + "print 'b=',b\n", + "\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 13\n", + "b= 12\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.3, page no: 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "class Fraction:\n", + " __num=None\n", + " __denom=None\n", + " def __init__(self,a=0,b=1): #constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'Constructor call: Fraction object (',self.__num,'/',self.__denom,') created'\n", + " \n", + " def __del__(self):\n", + " print 'Fraction object (',self.__num,'/',self.__denom,') destroyed'\n", + " \n", + " # Python doesn't have >> operator for input so we are just using input function \n", + " def input(self):\n", + " self.__num = int(raw_input())\n", + " self.__denom = int(raw_input())\n", + " \n", + " \n", + " #Python does not use << operator for printing. So here we are just declaring function name as print_ \n", + " def _repr_(self):\n", + " print 'The fraction is ',\n", + " print self.__num , '/', self.__denom\n", + " \n", + " \n", + "f1=Fraction()\n", + "print 'Please enter the values of numerator and denominator: '\n", + "f1.input()\n", + "f1._repr_()\n", + "\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor call: Fraction object ( 0 / 1 ) created\n", + "Please enter the values of numerator and denominator: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction is 3 / 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Program Source Code 9.4, page no: 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Fraction:\n", + "\n", + " def __init__(self,a=0,b=1): \n", + " #normal constructor\n", + " self.__num=a\n", + " self.__denom=b\n", + " print 'Constructor Call : fraction object (',self.__num,'/',self.__denom,') created'\n", + " \n", + " def __del__(self): #destructor\n", + " print 'fraction object (',self.__num,'/',self.__denom,') destroyed' \n", + " \n", + " def __new__(typ, sz):\n", + " print 'Fraction:: operator new called to'\n", + " print 'allocate ',sz,'bytes'\n", + " return AllocateMem(sz) \n", + " \n", + "def AllocateMem(sz):\n", + " if pm==NULL:\n", + " print 'failed to allocate memory'\n", + " exit(0)\n", + " else:\n", + " print 'Memory successfully allocated '\n", + " return pm\n", + "\n", + "def FreeMem(m):\n", + " pass\n", + "def __new__(typ, *args, **kwargs):\n", + " obj = object.__new__(typ, *args, **kwargs)\n", + " print 'Global operator new called to'\n", + " print 'allocate ',sz,'bytes'\n", + " return AllocateMem(sz)\n", + " \n", + "\n", + "pf1=[]*4\n", + "pf2=[]\n", + "\n", + "print 'Memory succesfully allocated'\n", + "for i in xrange(4): #allocate array\n", + " pf1.append(Fraction())\n", + "print 'Memory succesfully allocated'\n", + "for i in range(1):\n", + " pf2.append(Fraction()) \n", + "\n", + "del pf2[0] #delete object\n", + "print 'Fraction::operator delete called'\n", + "\n", + "for i in range(3,-1,-1):\n", + " del pf1[i] #delete array\n", + " \n", + "\n", + "print 'Global operator delete called'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory succesfully allocated\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "Memory succesfully allocated\n", + "Constructor Call : fraction object ( 0 / 1 ) created\n", + "fraction object ( 0 / 1 ) destroyed\n", + "Fraction::operator delete called\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "fraction object ( 0 / 1 ) destroyed\n", + "Global operator delete called\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach/README.txt b/C_Programming:_A_Modern_Approach/README.txt new file mode 100755 index 00000000..cab160ec --- /dev/null +++ b/C_Programming:_A_Modern_Approach/README.txt @@ -0,0 +1,10 @@ +Contributed By: Shagufta Methwani +Course: be +College/Institute/Organization: Cummins College of Engineering for Women, Pune +Department/Designation: Computer Engineering +Book Title: C Programming: A Modern Approach +Author: K. N. King +Publisher: W. W. Norton & Company-New York, London +Year of publication: 2008 +Isbn: 393979504 +Edition: 2nd \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach/screenshots/ch11.png b/C_Programming:_A_Modern_Approach/screenshots/ch11.png new file mode 100755 index 00000000..5416ce25 Binary files /dev/null and b/C_Programming:_A_Modern_Approach/screenshots/ch11.png differ diff --git a/C_Programming:_A_Modern_Approach/screenshots/ch20.png b/C_Programming:_A_Modern_Approach/screenshots/ch20.png new file mode 100755 index 00000000..181bf95a Binary files /dev/null and b/C_Programming:_A_Modern_Approach/screenshots/ch20.png differ diff --git a/C_Programming:_A_Modern_Approach/screenshots/ch5.png b/C_Programming:_A_Modern_Approach/screenshots/ch5.png new file mode 100755 index 00000000..1921da64 Binary files /dev/null and b/C_Programming:_A_Modern_Approach/screenshots/ch5.png differ diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter10_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter10_1.ipynb new file mode 100755 index 00000000..dcc36e8b --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter10_1.ipynb @@ -0,0 +1,755 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:89fb3fef5984e311e1eb6ac1f3a0c24d3e369a1266fe562ec873d32c24f96971" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Program Organization" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sum_digits(n):\n", + " sum = 0 #local variable\n", + " while(n>0):\n", + " sum =sum+(n%10)\n", + " n=n/10\n", + " return sum\n", + "#sum_digits(10)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "1" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " return top==0\n", + "def is_full():\n", + " return top==STACK_SIZE\n", + "def push(i):\n", + " if(is_full()):\n", + " call_stackoverflow=0\n", + " #stack_overflow()\n", + " else:\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " call_stackoverflow=0\n", + " #stack_underflow()\n", + " else:\n", + " return contents[top-1]" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example guess.c, Page 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "MAX_NUMBER=100\n", + "#def initialize_number_generator():\n", + "def choose_new_secret_number():\n", + " secret_number=random.randint(1,MAX_NUMBER) #generate random number\n", + " return secret_number\n", + "def read_guesses():\n", + " num_guesses=0\n", + " while(1):\n", + " num_guesses=num_guesses+1\n", + " guess=int(raw_input(\"Enter guess: \")) #guesses\n", + " if(guess==secret_number):\n", + " print \"You have won in %d guesses: \"%num_guesses\n", + " print \"\"\n", + " return\n", + " elif (guess0):\n", + " num_consec=num_consec+1\n", + " rank=rank+1\n", + " if(num_consec==NUM_CARDS):\n", + " straight=True\n", + " return\n", + " for rank in range(NUM_RANKS):\n", + " if(num_in_rank[rank]==4):\n", + " four=True\n", + " if(num_in_rank[rank]==3):\n", + " three=True\n", + " if(num_in_rank[rank]==2):\n", + " pairs=pairs+1\n", + " \n", + "def print_result():\n", + " if(straight==True and flush==True):\n", + " print \"Straight flush\"\n", + " elif(four):\n", + " print \"Four of a kind\"\n", + " elif(three==True and pairs==1):\n", + " print \"Full house\"\n", + " elif(flush):\n", + " print \"Flush\"\n", + " elif(straight):\n", + " print \"Straight\"\n", + " elif(three):\n", + " print \"Three of a kind\"\n", + " elif(pairs==2):\n", + " print \"Two pairs\"\n", + " elif(pairs==1):\n", + " print \"Pair\"\n", + " else:\n", + " print \"High card\"\n", + " print \"\"\n", + " \n", + "while(1):\n", + " straight=False\n", + " flush=False\n", + " four=False\n", + " three=False\n", + " NUM_RANKS=13\n", + " NUM_SUITS=4\n", + " NUM_CARDS=5\n", + " num_in_rank=[0]*NUM_RANKS\n", + " num_in_suit=[0]*NUM_SUITS\n", + "\n", + " read_cards()\n", + " analyse_hand()\n", + " print_result()\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a card2 s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a card5 s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a card4 s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a card3 s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a card6 s\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "High card\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter11_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter11_1.ipynb new file mode 100755 index 00000000..ce091d42 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter11_1.ipynb @@ -0,0 +1,81 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:74e91fb616db3aa96bac711fa075c7c19a951b52d2e8ba98c61929ac216b2aca" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Pointers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example maxmin.c, Page 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "N=10\n", + "def max_min(a,n): #function definition\n", + " max=a[0]\n", + " min=a[0]\n", + " for i in range(n-1): #calculating max and min from list\n", + " if(a[i+1]>max):\n", + " max=a[i+1]\n", + " elif(a[i+1]i):\n", + " reminders[j]=reminders[j-1]\n", + " j=j-1\n", + " reminders[i]=day_str\n", + " reminders[i]=str(reminders[i])+str(msg_str)\n", + " \n", + " num_remind=num_remind+1\n", + "print \"\"\n", + "print \"Day Reminder\"\n", + "for i in range(0,num_remind):\n", + " print \"%s\"%reminders[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 24 Susan's Birthday\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 5 6:00 - Dinner with Marge and Russ\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 26 Movie - \"Chinatown\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 7 10:30 - Dental appointment\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 12 Movie - \"Dazed and Confused\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 5 Saturday class\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 12 Saturday class\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Day Reminder\n", + "12['Saturday', 'class']\n", + "12['Movie', '-', '\"Dazed', 'and', 'Confused\"']\n", + "26['Movie', '-', '\"Chinatown\"']\n", + "5['Saturday', 'class']\n", + "5['6:00', '-', 'Dinner', 'with', 'Marge', 'and', 'Russ']\n", + "7['10:30', '-', 'Dental', 'appointment']\n", + "24[\"Susan's\", 'Birthday']\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example planet.c, Page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NUM_PLANETS=9\n", + "li=raw_input()\n", + "argv=li.split()\n", + "planets=['Mercury','Venus','Earth','Mars','Jupiter','Saturn','Uranus','Neptune','Pluto']\n", + "argc=len(argv)\n", + "for i in range(argc-1):\n", + " for j in range(NUM_PLANETS):\n", + " if( argv[i+1]==planets[j]):\n", + " print \"%s is a planet %d\"%(argv[i+1],(j+1))\n", + " break\n", + " if(argv[i] not in planets):\n", + " print \"%s is not a planet\"%argv[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "planet Jupiter Venus Earth fred\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Jupiter is a planet 5\n", + "planet is not a planet\n", + "Venus is a planet 2\n", + "Earth is a planet 3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter15_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter15_1.ipynb new file mode 100755 index 00000000..8429721c --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter15_1.ipynb @@ -0,0 +1,83 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66fb80b57a6473ffca1e8f425382d8ae7bda3cbb5a42b72a09573b1379da5aa8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Writing Large Programs" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example justify.c, Page 359\n", + "Other files- word.h, line.h, word.c, line.c" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import textwrap\n", + "quote2=''\n", + "quote= (' C is quirky, flawed, and an '\n", + " 'enormous success. Although accidents of history '\n", + " ' surely helped, it evidently satisfied a need '\n", + " ''\n", + " 'for a system implementation language efficient '\n", + " 'enough to displace assembly language, '\n", + " ' yet sufficiently abstract and fluent to describe '\n", + " ' algorithms and interactions in a wide variety '\n", + " 'of environments.'\n", + " ' -- Dennis M. Ritchie')\n", + "for i in quote:\n", + " if (len(i)>20):\n", + " i=(i[:20] + '*')\n", + " quote2=quote2+i\n", + "quote2=' '.join(quote2.split()) \"\"\"Python has inbuilt functions for removing \n", + "white spaces and textwrap, justifying text hence reduces the amount of code as required in C\"\"\"\n", + "quotee= textwrap.fill(quote2)\n", + "print quotee" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C is quirky, flawed, and an enormous success. Although accidents of\n", + "history surely helped, it evidently satisfied a need for a system\n", + "implementation language efficient enough to displace assembly\n", + "language, yet sufficiently abstract and fluent to describe algorithms\n", + "and interactions in a wide variety of environments. -- Dennis M.\n", + "Ritchie\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter16_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter16_1.ipynb new file mode 100755 index 00000000..20e3b1e5 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter16_1.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9fe9374bd25aac8dfc98eab84988bb008dcfb464faf94260bebab61ae764fb98" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Structures, Unions and Enumerations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example inventory.c, Page 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NAME_LEN=25\n", + "MAX_PARTS=100\n", + "num_parts=0\n", + "number1=[0]*100\n", + "on_hand1=[0]*100\n", + "name1=[0]*100\n", + "def find_part(number):\n", + " i=0\n", + " for i in range (i,num_parts):\n", + " if(number1[i]==number):\n", + " return i\n", + " return -1\n", + "def insert():\n", + " num_parts=0\n", + " if(num_parts==MAX_PARTS):\n", + " print \"Database is full, cant add more parts\"\n", + " return\n", + " part_number=int(raw_input(\"Enter part number: \"))\n", + " if(find_part(part_number)>=0):\n", + " print \"Part already exists\"\n", + " return\n", + " number1[num_parts]=part_number\n", + " name1[num_parts]=raw_input(\"Enter part name: \")\n", + " on_hand1[num_parts]=raw_input(\"Enter quality on hand: \")\n", + " num_parts=num_parts+1\n", + " \n", + "def search():\n", + " number=int(raw_input(\"Enter part number: \"))\n", + " i=find_part(number)\n", + " if(i>=0):\n", + " print \"Part name: %s\" %name1[i]\n", + " print \"Quantity on hand: %d\"%on_hand1[i]\n", + " else:\n", + " print \"Part not found\"\n", + " \n", + "def update():\n", + " number=int(raw_input(\"Enter part number: \"))\n", + " i=find_part(number)\n", + " if(i>=0):\n", + " change=int(raw_input(\"Enter change in quantity on hand: \")) \n", + " on_hand1[i]=on_hand1[i]+change\n", + " else:\n", + " print \"Part not found\"\n", + "\n", + "while(1):\n", + " code=raw_input(\"Enter operation code: \")\n", + " if code=='i':\n", + " insert()\n", + " break\n", + " elif code=='s':\n", + " search()\n", + " break\n", + " elif code=='u':\n", + " update()\n", + " break\n", + " elif(code=='p'):\n", + " print()\n", + " break\n", + "\n", + "print \"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter operation code: i\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter part number: 528\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter part name: Disk Drive\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter quality on hand: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example readline.c, Page 395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def read_line(str,n):\n", + " ch=0\n", + " i=0\n", + " EOF='\\n'\n", + " ch=raw_input()\n", + " while(isspace(ch)):\n", + " donothing=0\n", + " while(ch!='\\n' and ch!=EOF):\n", + " if(ii):\n", + " reminders[j]=reminders[j-1]\n", + " j=j-1\n", + " reminders[i]=day_str\n", + " reminders[i]=str(reminders[i])+str(msg_str)\n", + " \n", + " num_remind=num_remind+1\n", + "print \"\"\n", + "print \"Day Reminder\"\n", + "for i in range(num_remind):\n", + " print \"%s\"%reminders[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 24 Susan's Birthday\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 5 6:00 - Dinner with Marge and Russ\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 26 Movie - \"Chinatown\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 7 10:30 - Dental appointment\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 12 Movie - \"Dazed and Confused\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 5 Saturday class\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 12 Saturday class\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day and reminder: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Day Reminder\n", + "12['Saturday', 'class']\n", + "12['Movie', '-', '\"Dazed', 'and', 'Confused\"']\n", + "26['Movie', '-', '\"Chinatown\"']\n", + "5['Saturday', 'class']\n", + "5['6:00', '-', 'Dinner', 'with', 'Marge', 'and', 'Russ']\n", + "7['10:30', '-', 'Dental', 'appointment']\n", + "24[\"Susan's\", 'Birthday']\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example inventory2.c, Page 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NAME_LEN=25\n", + "MAX_PARTS=100\n", + "num_parts=0\n", + "number1=[0]*100\n", + "on_hand1=[0]*100\n", + "name1=[0]*100\n", + "def find_part(number):\n", + " i=0\n", + " for i in range (i,num_parts):\n", + " if(number1[i]==number):\n", + " return i\n", + " return -1\n", + "def insert():\n", + " num_parts=0\n", + " if(num_parts==MAX_PARTS):\n", + " print \"Database is full, cant add more parts\"\n", + " return\n", + " part_number=int(raw_input(\"Enter part number: \"))\n", + " if(find_part(part_number)>=0):\n", + " print \"Part already exists\"\n", + " return\n", + " number1[num_parts]=part_number\n", + " name1[num_parts]=raw_input(\"Enter part name: \")\n", + " on_hand1[num_parts]=raw_input(\"Enter quality on hand: \")\n", + " num_parts=num_parts+1\n", + " \n", + "def search():\n", + " number=int(raw_input(\"Enter part number: \"))\n", + " i=find_part(number)\n", + " if(i>=0):\n", + " print \"Part name: %s\" %name1[i]\n", + " print \"Quantity on hand: %d\"%on_hand1[i]\n", + " else:\n", + " print \"Part not found\"\n", + " \n", + "def update():\n", + " number=int(raw_input(\"Enter part number: \"))\n", + " i=find_part(number)\n", + " if(i>=0):\n", + " change=int(raw_input(\"Enter change in quantity on hand: \")) \n", + " on_hand1[i]=on_hand1[i]+change\n", + " else:\n", + " print \"Part not found\"\n", + "\n", + "while(1):\n", + " code=raw_input(\"Enter operation code: \")\n", + " if code=='i':\n", + " insert()\n", + " break\n", + " elif code=='s':\n", + " search()\n", + " break\n", + " elif code=='u':\n", + " update()\n", + " break\n", + " elif(code=='p'):\n", + " print()\n", + " break\n", + "\n", + "print \"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter operation code: i\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter part number: 528\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter part name: Disc Drive\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter quality on hand: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tabulate.c, Page 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "initial=float(raw_input(\"Enter initial value: \"))\n", + "final=float(raw_input(\"Enter final value: \"))\n", + "increment=float(raw_input(\"Enter increment: \"))\n", + "print \"\"\n", + "print \" x cos(x)\"\n", + "print \"-------------------------\"\n", + "\n", + "def tabulatec( first, last, incr):\n", + " num_intervals=int(math.ceil((last-first)/incr))\n", + " for i in range(num_intervals):\n", + " x=first+i*incr\n", + " print \"%10.5f %10.5f\"%(x,math.cos(x))\n", + "def tabulates( first, last, incr):\n", + " num_intervals=int(math.ceil((last-first)/incr))\n", + " for i in range(num_intervals):\n", + " x=first+i*incr\n", + " print \"%10.5f %10.5f\"%(x,math.sin(x))\n", + "def tabulatet( first, last, incr):\n", + " num_intervals=int(math.ceil((last-first)/incr))\n", + " for i in range(num_intervals):\n", + " x=first+i*incr\n", + " print \"%10.5f %10.5f\"%(x,math.tan(x))\n", + "\n", + " \n", + "tabulatec(initial,final, increment)\n", + "print \"\"\n", + "print \" x sin(x)\"\n", + "print \"\"\n", + "print \"-------------------------\"\n", + "tabulates(initial,final, increment)\n", + "print \"\"\n", + "print \" x tan(x)\"\n", + "print \"\"\n", + "print \"-------------------------\"\n", + "tabulatet(initial,final, increment)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter initial value: 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter final value: .5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter increment: .1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " x cos(x)\n", + "--------------------------\n", + " 0.00000 1.00000\n", + " 0.10000 0.99500\n", + " 0.20000 0.98007\n", + " 0.30000 0.95534\n", + " 0.40000 0.92106\n", + "\n", + " x sin(x)\n", + "\n", + "-------------------------\n", + " 0.00000 0.00000\n", + " 0.10000 0.09983\n", + " 0.20000 0.19867\n", + " 0.30000 0.29552\n", + " 0.40000 0.38942\n", + "\n", + " x tan(x)\n", + "\n", + "-------------------------\n", + " 0.00000 0.00000\n", + " 0.10000 0.10033\n", + " 0.20000 0.20271\n", + " 0.30000 0.30934\n", + " 0.40000 0.42279\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter19_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter19_1.ipynb new file mode 100755 index 00000000..42d5374c --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter19_1.ipynb @@ -0,0 +1,322 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6b5cf549b3fdac88be0a759d2fc29d02814154da669e9ab30e73ad0c8e2bbf9e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Program Design" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stack1.c, Page 488. Other files- stack.h\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def terminate(message):\n", + " print message\n", + " sys.exit()\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " if(top==0):\n", + " return True\n", + " else:\n", + " return False\n", + "def is_full():\n", + " if(top==STACK_SIZE):\n", + " return True\n", + " else:\n", + " return False\n", + "def push(i):\n", + " if(is_full()):\n", + " terminate(\"Error in push: stack is full.\")\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " terminate(\"Error in push: stack is empty.\")\n", + " return contents[top-1]\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stack2.c, Page 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def terminate(message):\n", + " print message\n", + " sys.exit()\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " if(top==0):\n", + " return True\n", + " else:\n", + " return False\n", + "def is_full():\n", + " if(top==STACK_SIZE):\n", + " return True\n", + " else:\n", + " return False\n", + "def push(i):\n", + " if(is_full()):\n", + " terminate(\"Error in push: stack is full.\")\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " terminate(\"Error in push: stack is empty.\")\n", + " return contents[top-1]\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stackclient.c, Page 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Stack:\n", + " def __init__(self):\n", + " self.items = []\n", + " def is_empty(self):\n", + " return self.items == []\n", + " def push(self, item):\n", + " self.items.append(item)\n", + " def pop(self):\n", + " return self.items.pop()\n", + " def size(self):\n", + " return len(self.items)\n", + " def make_empty(self):\n", + " while len(self.items) > 0 : self.items.pop()\n", + "s1=Stack()\n", + "s2=Stack()\n", + "s1.push(1)\n", + "s1.push(2)\n", + "n=s1.pop()\n", + "print \"Popped %d from s1\"%n\n", + "s2.push(n)\n", + "n=s1.pop()\n", + "print \"Popped %d from s1\"%n\n", + "s2.push(n)\n", + "while(s2.is_empty()!=True):\n", + " print \"Popped %d from s2\"%s2.pop()\n", + "s2.push(3)\n", + "s2.make_empty()\n", + "if(s2.is_empty()):\n", + " print \"s2 is empty\"\n", + "else:\n", + " print \"s2 is not empty\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Popped 2 from s1\n", + "Popped 1 from s1\n", + "Popped 1 from s2\n", + "Popped 2 from s2\n", + "s2 is empty\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stackADT.c, Page 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def terminate(message):\n", + " print message\n", + " sys.exit()\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " if(top==0):\n", + " return True\n", + " else:\n", + " return False\n", + "def is_full():\n", + " if(top==STACK_SIZE):\n", + " return True\n", + " else:\n", + " return False\n", + "def push(i):\n", + " if(is_full()):\n", + " terminate(\"Error in push: stack is full.\")\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " terminate(\"Error in push: stack is empty.\")\n", + " return contents[top-1]" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stackADT2.c, Page 498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#similar as above since Python doesn't have pointers\n", + "import sys\n", + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def terminate(message):\n", + " print message\n", + " sys.exit()\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " if(top==0):\n", + " return True\n", + " else:\n", + " return False\n", + "def is_full():\n", + " if(top==STACK_SIZE):\n", + " return True\n", + " else:\n", + " return False\n", + "def push(i):\n", + " if(is_full()):\n", + " terminate(\"Error in push: stack is full.\")\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " terminate(\"Error in push: stack is empty.\")\n", + " return contents[top-1]" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example stackADT3.c, Page 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#similar as above since Python doesn't have pointers\n", + "import sys\n", + "STACK_SIZE=100\n", + "contents=[None]*STACK_SIZE\n", + "top=0\n", + "def terminate(message):\n", + " print message\n", + " sys.exit()\n", + "def make_empty():\n", + " top=0\n", + "def is_empty():\n", + " if(top==0):\n", + " return True\n", + " else:\n", + " return False\n", + "def is_full():\n", + " if(top==STACK_SIZE):\n", + " return True\n", + " else:\n", + " return False\n", + "def push(i):\n", + " if(is_full()):\n", + " terminate(\"Error in push: stack is full.\")\n", + " contents[top+1]=i\n", + "def pop():\n", + " if(is_empty()):\n", + " terminate(\"Error in push: stack is empty.\")\n", + " return contents[top-1]" + ], + "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/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter20_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter20_1.ipynb new file mode 100755 index 00000000..10d6049f --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter20_1.ipynb @@ -0,0 +1,161 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a14f929c77abfd0a54b26e2baa48a2c7f478d22968a4f6231afc128a12dd480" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Low-Level Programming" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example xor.c, Page 515" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "KEY='&'\n", + "orig=raw_input()\n", + "orig_char=list(orig)\n", + "new_char=[]\n", + "\n", + "def sxor(s1,s2): \n", + " return ''.join(chr(ord(a) ^ ord(b)) for a,b in zip(s1,s2))\n", + "for i in orig_char:\n", + " N=sxor(i,KEY)\n", + " new_char.append(N)\n", + "print ''.join(new_char)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Trust not him with your secrets, who, when left alone in your room, turns over your papers. Johann Kaspar Lavater \n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rTSUR\u0006HIR\u0006NOK\u0006QORN\u0006_IST\u0006UCETCRU\n", + "\u0006QNI\n", + "\u0006QNCH\u0006JC@R\u0006GJIHC\u0006OH\u0006_IST\u0006TIIK\n", + "\u0006RSTHU\u0006IPCT\u0006_IST\u0006VGVCTU\b\u0006lINGHH\u0006mGUVGT\u0006jGPGRCT\u0006\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example viewmemory.c, Page 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from itertools import product\n", + "def main():\n", + " \n", + " addr=\"\"\n", + " i=0\n", + " n=0\n", + " print \"Address of main function: %s\" % hex(id(main))\n", + " print \"Address of addr variable: %s\" % hex(id(addr))\n", + " addr=raw_input( \"Enter a (hex) address: \")\n", + " n=int(raw_input( \"Enter number of bytes to view: \"))\n", + " #printf(\"\\n\");\n", + " print \" Address Bytes Characters\\n\"\n", + " print \" - - - - - - - - - - - - - - - - - - - - - - \"\n", + " ptr = addr;\n", + " for nn in range(n,0,-10):\n", + " print \"%8s \"% hex(id(addr))\n", + " # for i,i in product(range(0//10), range(0//n)) :\n", + " #print \"%.2X \", *(ptr + i)); \n", + " #for (; i <10; i++)\n", + " # printf(\" \"); #pointer dereferencing not in python\n", + " #printf(\" \");\n", + " #for (i = 0; i < 10 && i < n; i++) {\n", + " # BYTE ch = *(ptr + i);\n", + " #if (!isprint(ch))\n", + " # ch = '.';\n", + " # printf(\"%c\", ch);\n", + " #}\n", + " #printf(\"\\n\");\n", + " #ptr += 10;\n", + " #} \n", + " #return 0;\n", + " #}\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address of main function: 0x4117eb8L\n", + "Address of addr variable: 0x1c3c148L\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a (hex) address: 8048000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of bytes to view: 40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Address Bytes Characters\n", + "\n", + " - - - - - - - - - - - - - - - - - - - - - - \n", + "0x41884b8L \n", + "0x41884b8L \n", + "0x41884b8L \n", + "0x41884b8L \n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter22_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter22_1.ipynb new file mode 100755 index 00000000..e47d926c --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter22_1.ipynb @@ -0,0 +1,158 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:61ba7fc12caccdde58e5c478fe47afe52c6e4084264f0cb759e096ea4f746518" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: File Operations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example canopen.c, Page 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " fname=raw_input()\n", + " fp=open('noexist',r)\n", + "except:\n", + " print \"Can't be opened\"\n", + "else:\n", + " print \"Can be opened\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "file\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Can't be opened\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example fcopy.c, Page 568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " s=raw_input(\"Source\")\n", + " d=raw_input(\"Destination\")\n", + " source_fp=open(s,'rb')\n", + " dest_fp = open(d,wb)\n", + "\n", + " for line in source_fp.readlines():\n", + " dest_fp.write(line) \n", + "\n", + " dest_fp.close()\n", + " source_fp.close()\n", + "except:\n", + " print \"Can't be opened\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sourcef1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Destinationf2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Can't be opened\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example invclear.c, Page 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "NAME_LEN=25\n", + "max_parts=100\n", + "char name=None*(NAME_LEN+1)\n", + "on_hand=list()\n", + "try:\n", + " fp=open('inventory.dat','r')\n", + "except:\n", + " print \"Cant open inventory file\"\n", + "num_parts=fp.read()\n", + "for i in range (num_parts):\n", + " on_hand[i]=0\n", + "fp.seek(0,0)\n", + "fp.write(on_hand)\n", + "fp.close\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter23_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter23_1.ipynb new file mode 100755 index 00000000..d6c12ffe --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter23_1.ipynb @@ -0,0 +1,127 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5233b8440acc7b2d62016ba76634e04bd09fd81a7f83bcd9847657fe204b0cea" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Library Support for Numbers and Character Data" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tclassify.c, Page 613" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import string\n", + "print \" alnum alpha digit graph lower print punct space upper xdigit\"\n", + "p=\"azAZ0 !\\t\"\n", + "p1=list(p)\n", + "for i in p1:\n", + " listt=[\" \"]*10\n", + " print i,\n", + " if(i.isalnum()):\n", + " listt[0]=\" X\"\n", + " if(i.isalpha()):\n", + " listt[1]=\" X\"\n", + " if(i.isdigit()):\n", + " listt[2]=\" X\"\n", + " if(i.isspace()!=True):\n", + " listt[3]=\" X\"\n", + " if(i.islower()):\n", + " listt[4]=\" X\"\n", + " if(i in string.printable):\n", + " listt[5]=\" X\"\n", + " if(i in string.punctuation):\n", + " listt[6]=\" X\"\n", + " if(i.isspace()):\n", + " listt[7]=\" X\"\n", + " if(i.isupper()):\n", + " listt[8]=\" X\"\n", + " if(i in string.hexdigits):\n", + " listt[9]=\" X\"\n", + " print listt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " alnum alpha digit graph lower print punct space upper xdigit\n", + "a [' X', ' X', ' ', ' X', ' X', ' X', ' ', ' ', ' ', ' X']\n", + "z [' X', ' X', ' ', ' X', ' X', ' X', ' ', ' ', ' ', ' ']\n", + "A [' X', ' X', ' ', ' X', ' ', ' X', ' ', ' ', ' X', ' X']\n", + "Z [' X', ' X', ' ', ' X', ' ', ' X', ' ', ' ', ' X', ' ']\n", + "0 [' X', ' ', ' X', ' X', ' ', ' X', ' ', ' ', ' ', ' X']\n", + " [' ', ' ', ' ', ' ', ' ', ' X', ' ', ' X', ' ', ' ']\n", + "! [' ', ' ', ' ', ' X', ' ', ' X', ' X', ' ', ' ', ' ']\n", + "\t[' ', ' ', ' ', ' ', ' ', ' X', ' ', ' X', ' ', ' ']\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tcasemap.c, Page 615" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p=\"aA0!\"\n", + "pl=list(p)\n", + "for i in pl:\n", + " print \"tolower('%c') is '%c'; \"% (i,i.lower()),\n", + " print \"toupper('%c') is '%c'; \"% (i,i.upper())" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "tolower('a') is 'a'; toupper('a') is 'A'; \n", + "tolower('A') is 'a'; toupper('A') is 'A'; \n", + "tolower('0') is '0'; toupper('0') is '0'; \n", + "tolower('!') is '!'; toupper('!') is '!'; \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter24_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter24_1.ipynb new file mode 100755 index 00000000..05dd8488 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter24_1.ipynb @@ -0,0 +1,126 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:70182e1ed50aea78649f1bef2946ce2b6e335126b84963ba06fce0660ac72886" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Error Handling" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tsignal.c, Page 634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import signal\n", + "import sys\n", + "def handler(sig,frame):\n", + " print \"Handler called for signal\",sig\n", + "print \"Installing handler for signal\", signal.SIGINT\n", + "orig_handler=signal.signal(signal.SIGINT,handler)\n", + "print \"Changing handler to SIG_IGN\"\n", + "signal.signal(signal.SIGINT,signal.SIG_IGN)\n", + "print \"Restoring original handler\"\n", + "signal.signal(signal.SIGINT,orig_handler)\n", + "print \"Program terminates normally\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Installing handler for signal 2\n", + "Changing handler to SIG_IGN\n", + "Restoring original handler\n", + "Program terminates normally\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tsetjmp.c, Page 636" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " def f1():\n", + " print \"f1 begins\"\n", + " f2()\n", + " return\n", + " print \"f1 returns\"\n", + "\n", + " def f2():\n", + " print \"f2 begins\"\n", + " #longjmp(env, 1)\n", + " setjmp=1\n", + " print \"Program terminates: longjmp called\"\n", + " return\n", + " print \"f2 returns\"\n", + "\n", + " setjmp=0\n", + " if (setjmp == 0):\n", + " print \"setjmp returned 0\"\n", + " else:\n", + " print \"Program terminates: longjmp called\"\n", + " f1()\n", + " return\n", + " print \"Program terminates normally\"\n", + " \n", + "if __name__=='__main__':\n", + " main()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "setjmp returned 0\n", + "f1 begins\n", + "f2 begins\n", + "Program terminates: longjmp called\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter26_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter26_1.ipynb new file mode 100755 index 00000000..17b301ac --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter26_1.ipynb @@ -0,0 +1,288 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fbcb6cde8c1e1138fc13f2fa3b7cd67cad612fd1bfdb61df6d4f852067025cc4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 26: Miscellaneous Library Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tnumconv.c, Page 684" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import ctypes, ctypes.util\n", + "whereislib = ctypes.util.find_library('c')\n", + "whereislib\n", + "clib = ctypes.cdll.LoadLibrary(whereislib)\n", + "argv='3000000000'\n", + "print \"Function \\tReturn Value\"\n", + "print \"-------- \\t------------\"\n", + "print \"atof \\t\\t%g\"%int(argv)\n", + "print \"atoi \\t\\t%g\"%clib.atoi(argv)\n", + "print \"atol \\t\\t%ld\"%clib.atol(argv)\n", + "print \"\"\n", + "print \"Function \\tReturn Value \\tValid? \\tString consumed?\"\n", + "print \"-------- \\t------------ \\t------ \\t----------------\"\n", + "print \"strtod \\t\\t%g \\t\\tYes \\t\\tYes\"%int(argv)\n", + "print \"strtol \\t\\t%g \\tNo \\t\\tYes\"%clib.atoi(argv)\n", + "print \"strtoul \\t3000000000 \\tYes \\t\\tYes\"\n", + "argv2='123.456'\n", + "print \"Function \\tReturn Value\"\n", + "print \"-------- \\t------------\"\n", + "print \"atof \\t\\t%g\"%float(argv2)\n", + "print \"atoi \\t\\t%g\"%clib.atoi(argv2)\n", + "print \"atol \\t\\t%ld\"%clib.atol(argv2)\n", + "print \"\"\n", + "print \"Function \\tReturn Value \\tValid? \\tString consumed?\"\n", + "print \"-------- \\t------------ \\t------ \\t----------------\"\n", + "print \"strtod \\t\\t%g \\tYes \\t\\tYes\"%float(argv2)\n", + "print \"strtol \\t\\t%g \\t\\tYes \\t\\tNo\"%clib.atoi(argv2)\n", + "print \"strtoul \\t%ld \\t\\tYes \\t\\tNo\"%clib.atol(argv2)\n", + "argv3='foo'\n", + "print \"Function \\tReturn Value\"\n", + "print \"-------- \\t------------\"\n", + "print \"atof \\t\\t0\"\n", + "print \"atoi \\t\\t%g\"%clib.atoi(argv3)\n", + "print \"atol \\t\\t%ld\"%clib.atol(argv3)\n", + "print \"\"\n", + "print \"Function \\tReturn Value \\tValid? \\tString consumed?\"\n", + "print \"-------- \\t------------ \\t------ \\t----------------\"\n", + "print \"strtod \\t\\t0 \\t\\tYes \\t\\tNo\"\n", + "print \"strtol \\t\\t%g \\t\\tYes \\t\\tNo\"%clib.atoi(argv3)\n", + "print \"strtoul \\t%ld \\t\\tYes \\t\\tNo\"%clib.atol(argv3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Function \tReturn Value\n", + "-------- \t------------\n", + "atof \t\t3e+09\n", + "atoi \t\t2.14748e+09\n", + "atol \t\t2147483647\n", + "\n", + "Function \tReturn Value \tValid? \tString consumed?\n", + "-------- \t------------ \t------ \t----------------\n", + "strtod \t\t3e+09 \t\tYes \t\tYes\n", + "strtol \t\t2.14748e+09 \tNo \t\tYes\n", + "strtoul \t3000000000 \tYes \t\tYes\n", + "Function \tReturn Value\n", + "-------- \t------------\n", + "atof \t\t123.456\n", + "atoi \t\t123\n", + "atol \t\t123\n", + "\n", + "Function \tReturn Value \tValid? \tString consumed?\n", + "-------- \t------------ \t------ \t----------------\n", + "strtod \t\t123.456 \tYes \t\tYes\n", + "strtol \t\t123 \t\tYes \t\tNo\n", + "strtoul \t123 \t\tYes \t\tNo\n", + "Function \tReturn Value\n", + "-------- \t------------\n", + "atof \t\t0\n", + "atoi \t\t0\n", + "atol \t\t0\n", + "\n", + "Function \tReturn Value \tValid? \tString consumed?\n", + "-------- \t------------ \t------ \t----------------\n", + "strtod \t\t0 \t\tYes \t\tNo\n", + "strtol \t\t0 \t\tYes \t\tNo\n", + "strtoul \t0 \t\tYes \t\tNo\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example trand.c, Page 687" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "import sys\n", + "print \"This program displays the first five values of rand\"\n", + "while(1):\n", + " for i in range(5):\n", + " print \"%d\" % (random.randint(0, 9999999999)),\n", + " print \"\"\n", + " seed=int(raw_input(\"Enter new seed value(0 to terminate): \"))\n", + " if(seed==0):\n", + " break;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program displays the first five values of rand\n", + "5761431435 9955887404 277948394 6605189227 2803280817 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter new seed value(0 to terminate): 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1100098189 5276410883 9528246424 9889916914 9838545564 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter new seed value(0 to terminate): 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3822278888 5608424328 9674817256 1259089032 3611877211 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter new seed value(0 to terminate): 0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example airmiles.c, Page 690" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "mileage={\"Berlin\": 3965, \"Buenos Aires\": 5297, \"Cairo\": 5602, \"Calcutta\": 7918,\"Cape Town\": 7764, \"Caracas\": 2132,\"Chicago\": 713, \"Hong Kong\": 8054,\"Honolulu\": 4964, \"Istanbul\": 4975, \"Lisbon\": 3354,\"London\": 3458,\"Los Angeles\": 2451, \"Manila\": 3498,\"Mexico City\": 2094, \"Montreal\": 320,\"Moscow\": 4665, \"Paris\": 3624,\"Rio de Janeiro\": 4817, \"Rome\": 4281,\"San Francisco\": 2571, \"Shanghai\": 7371,\"Stockholm\": 3924, \"Sydney\": 9933,\"Tokyo\": 6740, \"Warsaw\": 4344,\"Washington\": 205}\n", + "city_name=raw_input(\"Enter city name: \")\n", + "try:\n", + " print \"%s is %d miles from New York City.\"%(city_name,mileage[city_name])\n", + "except:\n", + " print \"%s wasn't found.\"%city_name\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter city name: Shanghai\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shanghai is 7371 miles from New York City.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example datetime.c, Page 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import datetime\n", + "import time\n", + "\n", + "current=datetime.date.today()\n", + "print current.ctime()\n", + "print time.strftime(\"%m-%d-%Y %I:%M%p\")\n", + "hour=time.localtime().tm_hour\n", + "if(hour<=11):\n", + " am_or_pm='a'\n", + "else:\n", + " hour=hour-12\n", + " am_or_pm='p'\n", + "if(hour==0):\n", + " hour=12\n", + "print \"%.2d-%.2d-%d %2d:%.2d%c\"%((time.localtime().tm_mon),time.localtime().tm_mday,( time.localtime().tm_year+1900),hour,time.localtime().tm_min, am_or_pm )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wed Oct 1 00:00:00 2014\n", + "10-01-2014 05:33PM\n", + "10-01-3914 5:33p\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter27_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter27_1.ipynb new file mode 100755 index 00000000..15629cee --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter27_1.ipynb @@ -0,0 +1,72 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d596457391df308a57bb59fde4173c6f3b60829cc798d3f2ffccce6ed1d54b31" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 27: Additional C99 Support for Mathematics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example quadratic.c, Page 723" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "\n", + "a =5\n", + "b = 2\n", + "c = 1\n", + "\n", + "# calculate the discriminant\n", + "d = (b**2) - (4*a*c)\n", + "\n", + "# find two solutions\n", + "sol1 = (-b-cmath.sqrt(d))/(2*a)\n", + "sol2 = (-b+cmath.sqrt(d))/(2*a)\n", + "\n", + "print('root1 = {0} \\nroot2 = {1}'.format(sol1,sol2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "root1 = (-0.2-0.4j) \n", + "root2 = (-0.2+0.4j)\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter2_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter2_1.ipynb new file mode 100755 index 00000000..c925dc1b --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter2_1.ipynb @@ -0,0 +1,237 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1970948843f0abe57577274c22e34507ff26124029c8f4289139bc598d62eb66" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: C Fundamentals" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example pun.c on Page 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " print \"To C, or not to C: that is the question.\" #print statement demo\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To C, or not to C: that is the question.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ways for printing on a single line\n", + "print \"To C, or not to C: that is the question.\" \n", + "print \"To C, or not to C:\",\n", + "print \"that is the question.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To C, or not to C: that is the question.\n", + "To C, or not to C: that is the question.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example dweight.c on Page 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " #variable declaration\n", + " height = 8 \n", + " length = 12\n", + " width =10\n", + " volume = height * length * width #volume calculation\n", + " weight = (volume + 165)/166 #weight calculation\n", + " \n", + " #print statements\n", + " print \"Dimensions: %dx%dx%d\" % (length,width,height) \n", + " print \"Volume (cubic inches): %d\" % volume\n", + " print \"Dimensional weight (pounds): %d\" % weight\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dimensions: 12x10x8\n", + "Volume (cubic inches): 960\n", + "Dimensional weight (pounds): 6\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example dweight2.c on Page 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " #input from user\n", + " height = int(raw_input(\"Enter height of box: \"))\n", + " length = int(raw_input(\"Enter length of box: \"))\n", + " width = int(raw_input(\"Enter width of box: \"))\n", + " volume = height * length * width #volume calculation\n", + " weight = (volume + 165)/166 #weight calculation\n", + " \n", + " #print statements\n", + " print \"Volume (cubic inches): %d\" % volume\n", + " print \"Dimensional weight (pounds): %d\" % weight\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter height of box: 8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter length of box: 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter width of box: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume (cubic inches): 960\n", + "Dimensional weight (pounds): 6\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example celsius.c on Page 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " #variable declaration\n", + " FREEZING_PT=32.0\n", + " SCALE_FACTOR= 5.02/9.0\n", + " \n", + " #input from user\n", + " farenheit=float(raw_input(\"Enter Farenheit temperature: \"))\n", + " celsius=(farenheit-FREEZING_PT) * SCALE_FACTOR #convert farenheit to celcius\n", + " print \"Celsius equivalent: %.1f\" % celsius\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Farenheit temperature: 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Celsius equivalent: 37.9\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter3_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter3_1.ipynb new file mode 100755 index 00000000..1b9cd25e --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter3_1.ipynb @@ -0,0 +1,172 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4fe639aabf754893fb9526618dc70b095a7daac92032a0be83397e28da6d3261" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Formatted I/O" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaration\n", + "i=10\n", + "j=20\n", + "x=43.2892\n", + "y=5527.0\n", + "#print statement\n", + "print \"i = %d, j = %d, x = %f, y = %f\" % (i,j,x,y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i = 10, j = 20, x = 43.289200, y = 5527.000000\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example tprintf.c on Page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " #variable declaration\n", + " i=40\n", + " x=839.21\n", + " \n", + " #formatted printing\n", + " print \"|%d|%5d|%-5d|%5.3d|\" % (i,i,i,i)\n", + " print \"|%10.3f|%10.3e|%-10g|\" % (x,x,x)\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "|40| 40|40 | 040|\n", + "| 839.210| 8.392e+02|839.21 |\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example addfrac.c on Page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + "\n", + " print \" Enter first fraction: \",\n", + " #accepting numerator and denominator separated by '/'\n", + " num1,denom1=map(int,raw_input().split('/')) \n", + " print \"Enter second fraction: \",\n", + " num2,denom2=map(int,raw_input().split('/'))\n", + " #adding the fractions\n", + " result_num = num1*denom2 + num2*denom1 \n", + " result_denom = denom1*denom2\n", + " print \"The sum is %d/%d\" % (result_num,result_denom)\n", + "\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first fraction: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5/6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter second fraction: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3/4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The sum is 38/24\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter4_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter4_1.ipynb new file mode 100755 index 00000000..35e91eab --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter4_1.ipynb @@ -0,0 +1,216 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fc3a82351dcd292af7cdc66294a40a180758bb26d4545d98b8be5c4947393f3d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Expressions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example upc.c, Page Number-57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "def main():\n", + " #input from user\n", + " d=int(raw_input(\"Enter the first (single) digit: \")) \n", + " firstfive= raw_input(\"Enter first group of five digits\")\n", + " list1=list(firstfive) \n", + " i1=list1[0]\n", + " i2=list1[1]\n", + " i3=list1[2]\n", + " i4=list1[3]\n", + " i5=list1[4]\n", + " secondfive= raw_input(\"Enter second group of five digits\")\n", + " list2=list(firstfive) \n", + " j1=list2[0]\n", + " j2=list2[1]\n", + " j3=list2[2]\n", + " j4=list2[3]\n", + " j5=list2[4]\n", + " first_sum=d+int(i2)+int(i4)+int(j1)+int(j3)+int(j5)\n", + " second_sum=int(i1)+int(i3)+int(i5)+int(j2)+int(j4)\n", + " total=3*first_sum+second_sum\n", + " s=9-((total - 1) % 10)\n", + " print \"Check digit: %d\" % s #print result\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first (single) digit: 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter first group of five digits13800\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter second group of five digits15713\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Check digit: 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page number-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variable declaration\n", + "i = 1\n", + "#k = l + (j=i)\n", + "j=i\n", + "k=1+j\n", + "print \"%d %d %d\" % (i,j,k) #prints \"1 1 2\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 1 2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page number-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "i=1 #variable declaration\n", + "i+=1\n", + "print \"i is %d\" % i #++i\n", + "print \"i is %d\" % i #i\n", + "\n", + "i = 1\n", + "j=i+1\n", + "print \"i is %d\" % i #i++\n", + "print \"i is %d\" % j #i\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i is 2\n", + "i is 2\n", + "i is 1\n", + "i is 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page number-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "i=1 #variable declaration\n", + "i-=1\n", + "print \"i is %d\" % i #--i\n", + "print \"i is %d\" % i #i\n", + "\n", + "i = 1\n", + "j=i-1\n", + "print \"i is %d\" % i #i--\n", + "print \"i is %d\" % j #i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i is 0\n", + "i is 0\n", + "i is 1\n", + "i is 0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter5_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter5_1.ipynb new file mode 100755 index 00000000..c7353250 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter5_1.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e0e8d285e21d88c99025668fa4fa5ab37c188ffb30c516ae4e90ff1d9747226e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Selection Statements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example broker.c on Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " commission=0.0 #variable declaration\n", + " value=float(raw_input(\"Enter value of trade: \")) #accepting the trade value\n", + " \n", + " #calculating commission according to the value of trade\n", + " if(value < 2500.00):\n", + " commission = 30.00 + 0.017 * value\n", + " elif (value < 6250.00):\n", + " commission = 56.00 + 0.0066 * value\n", + " elif (value < 20000.00):\n", + " commission = 76.00 + 0.0034 * value\n", + " elif (value < 50000.00):\n", + " commission = 100.00 + 0.0022 * value\n", + " elif (value < 500000.00):\n", + " commission = 155.00 + 0.0011 * value\n", + " else:\n", + " commission = 255.00 + 0.0009 * value\n", + " \n", + " if (commission < 39.00):\n", + " commission = 39.00\n", + " \n", + " print \"Commission: $%0.2f\" % commission #printing the value of commission\n", + "\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter value of trade: 7000.00\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Commission: $99.80\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " #variable declaration\n", + " i=1\n", + " j=2\n", + " \n", + " if(i>j): #k=i>j?i:j\n", + " k=i \n", + " else: \n", + " k=j #k is now 2\n", + " \n", + " if(i>=0): #k=(i>=0?i:0)+j\n", + " k=i+j #k is now 3\n", + " else:\n", + " k=0+j\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example date.c on Page 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " date=raw_input(\"Enter date (mm/dd/yy): \") #accepting the date in mm/dd/yy format\n", + " date1=date.split(\"/\")\n", + " #day, moth and year separation\n", + " day=int(date1[1])\n", + " month= int(date1[0])\n", + " year=int(date1[2])\n", + " \n", + " #printing day as an ordinal number\n", + " print \"Dated this\", day,\n", + " if (day==1 or day==21 or day==31):\n", + " print \"st\",\n", + " elif (day==2 or day==22):\n", + " print \"nd\",\n", + " elif (day==3 or day==23):\n", + " print \"rd\",\n", + " else:\n", + " print \"th\",\n", + " print \"day of\",\n", + " \n", + " #printing month\n", + " if (month==1):\n", + " print \"January\",\n", + " elif(month==2):\n", + " print \"February\",\n", + " elif(month==3):\n", + " print \"March\",\n", + " elif(month==4):\n", + " print \"April\",\n", + " elif(month==5):\n", + " print \"May\",\n", + " elif(month==6):\n", + " print \"June\",\n", + " elif(month==7):\n", + " print \"July\",\n", + " elif(month==8):\n", + " print \"August\",\n", + " elif(month==9):\n", + " print \"September\",\n", + " elif(month==10):\n", + " print \"October\",\n", + " elif(month==11):\n", + " print \"November\",\n", + " elif(month==12):\n", + " print \"December\",\n", + " \n", + " #printing year\n", + " print \", 20%0.2d.\" % year\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date (mm/dd/yy): 7/19/14\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dated this 19 th day of July , 2014.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter6_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter6_1.ipynb new file mode 100755 index 00000000..ebb30975 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter6_1.ipynb @@ -0,0 +1,503 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7be64d50608515e43ddcf6d9a0311be1c6e260d1acc2eec7e9577015cf19d4da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Loops" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example square.c, Page 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " print \"This program prints a table of squares.\"\n", + " n=int(raw_input(\"Enter number of entries in table: \")) #input number of entries\n", + " i=1 #variable declaration\n", + " while(i<=n):\n", + " print \"%10d%10d\" % (i,i * i) #printing number and it's square\n", + " i=i+1\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program prints a table of squares.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of entries in table: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1 1\n", + " 2 4\n", + " 3 9\n", + " 4 16\n", + " 5 25\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example sum.c, Page 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " sum=0\n", + " print \"This program sums a series of integers.\"\n", + " n=int(raw_input(\"Enter integers (0 to terminate): \")) #input the integers to operate on\n", + " while(n!=0):\n", + " sum=sum+n #calculating sum till 0 encountered\n", + " n=input()\n", + " print \"The sum is: %d\" % sum #printing sum\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program sums a series of integers.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter integers (0 to terminate): 8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "71\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum is: 107\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example numdigits.c, Page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " digits=0 #initialise\n", + " n=int(raw_input(\"Enter a nonnegative integer: \")) #input the number\n", + " n=n/10\n", + " digits=digits+1\n", + " #finding number of digits\n", + " while(n>0):\n", + " n=n/10\n", + " digits=digits+1\n", + " print \"The number has %d digit(s).\" % digits #printing answer\n", + "\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a nonnegative integer: 60\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number has 2 digit(s).\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example square2.c, Page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " print \"This program prints a table of squares.\" \n", + " n=int(raw_input(\"Enter number of entries in table: \")) #input number of entries\n", + " for i in range (1,(n+1)):\n", + " print \"%10d%10d\" % (i,i * i) #printing number and it's square\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program prints a table of squares.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of entries in table: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1 1\n", + " 2 4\n", + " 3 9\n", + " 4 16\n", + " 5 25\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example square3.c,Page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " print \"This program prints a table of squares.\" \n", + " n=int(raw_input(\"Enter number of entries in table: \")) #input number of entries\n", + " \n", + " #variable declaration\n", + " i=1\n", + " odd=3\n", + " square=1\n", + " #calculation\n", + " for i in range (1,(n+1)):\n", + " print \"%10d%10d\" % (i,square)\n", + " square=square+odd \n", + " odd=odd+2\n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program prints a table of squares.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of entries in table: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1 1\n", + " 2 4\n", + " 3 9\n", + " 4 16\n", + " 5 25\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example checking.c, Page 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " balance=0.0 #initialise\n", + " print \"*** ACME checkbook-balancing program ***\"\n", + " print \"Commands: 0=clear, 1=credits, 2=debit, 3=balance, 4=exit\"\n", + " print \"\"\n", + " while(1):\n", + " cmd=int(raw_input(\"Enter command: \")) \n", + " \n", + " #operate on balance according to the option selected\n", + " if cmd==0:\n", + " balance=0.0 #clear balance\n", + " elif cmd==1:\n", + " credit=float(raw_input(\"Enter amount of credit: \"))\n", + " balance=balance+credit #credit\n", + " elif cmd==2:\n", + " debit=float(raw_input(\"Enter amount of debit: \"))\n", + " balance=balance-debit #debit\n", + " elif cmd==3:\n", + " print \"Current balance: $%0.2f\" % balance #show current balance\n", + " elif cmd==4:\n", + " return 0 #exit\n", + " else:\n", + " print \"Commands: 0=clear, 1=credits, 2=debit, 3=balance, 4=exit\" \n", + " \n", + " \n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "*** ACME checkbook-balancing program ***\n", + "Commands: 0=clear, 1=credits, 2=debit, 3=balance, 4=exit\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of credit: 1042.56\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of debit: 133.79\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of credit: 1754.32\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of debit: 1400\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of debit: 68\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter amount of debit: 50\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current balance: $1145.09\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter command: 4\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter7_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter7_1.ipynb new file mode 100755 index 00000000..dde0a9b8 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter7_1.ipynb @@ -0,0 +1,154 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f68b9bfb9c3fa936de40e570b5ee8d7a82f02160fce8cc4fc8384697c0b86ac7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Basic Types" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example sum2.c, Page 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " sum=0\n", + " print \"This program sums a series of integers.\"\n", + " n=int(raw_input(\"Enter integers (0 to terminate): \")) #input the integers to operate on\n", + " while(n!=0):\n", + " sum=sum+n #calculating sum till 0 encountered\n", + " n=input()\n", + " print \"The sum is: %d\" % sum #printing sum\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This program sums a series of integers.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter integers (0 to terminate): 8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "71\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum is: 107\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example length.c, Page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " str=raw_input(\"Enter a message: \") #input string\n", + " length=len(str) #calculate length\n", + " print \"Your message was %d character(s) long\" % length #display length\n", + "if __name__=='__main__':\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a message: Brevity is the soul of wit.\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your message was 27 character(s) long\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter8_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter8_1.ipynb new file mode 100755 index 00000000..32171653 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter8_1.ipynb @@ -0,0 +1,288 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7c77241a39b4d43ac95986ef692466eff990f0d448827fcae58b424fe3cd8b1d" + }, + "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 reverse.c, Page 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "N=10\n", + "li = raw_input(\"Enter %d numbers: \" % N) #accepting input in list\n", + "a = map(int, li.split()) \n", + "print \"In reverse order: \",\n", + "for i in a[::-1]: #print reversed list\n", + " print i," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 10 numbers: 34 82 49 102 7 94 23 11 50 31\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In reverse order: 31 50 11 23 94 7 102 49 82 34\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example repdigit.c, Page 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "digit_seen=[False]*10 #initialise with false\n", + "n=int(raw_input(\"Enter a number: \"))#input number\n", + "while(n>0): #calculate if any digit repeated\n", + " digit=n%10\n", + " if (digit_seen[digit]==True):\n", + " break\n", + " digit_seen[digit]=True\n", + " n=n/10\n", + "if(n>0): \n", + " print \"Repeated digit\" #print result\n", + "else:\n", + " print \"No repeated digit\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 28212\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Repeated digit\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example interest.c, Page 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "#initialisation\n", + "value=[None]*5 \n", + "NUM_RATES=int(sys.getsizeof(value)/sys.getsizeof(value[0]))-1\n", + "INITIAL_BALANCE=100.00\n", + "#accept input\n", + "low_rate=int(raw_input(\"Enter interest rate: \"))\n", + "num_years=int(raw_input(\"Enter number of years: \"))\n", + "print \"\"\n", + "#print calculated result table\n", + "print \"Years\",\n", + "for i in range (NUM_RATES):\n", + " print \"%6d%%\" % (low_rate + i),\n", + " value[i]=INITIAL_BALANCE\n", + "print \"\"\n", + "for year in range (num_years):\n", + " print \"%3d\\t\"%(year+1),\n", + " for i in range (NUM_RATES):\n", + " value[i]=value[i]+ (low_rate+i)/100.0*value[i]\n", + " print \"%7.2f\"%value[i],\n", + " print \"\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter interest rate: 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of years: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Years 6% 7% 8% 9% 10% \n", + " 1\t 106.00 107.00 108.00 109.00 110.00 \n", + " 2\t 112.36 114.49 116.64 118.81 121.00 \n", + " 3\t 119.10 122.50 125.97 129.50 133.10 \n", + " 4\t 126.25 131.08 136.05 141.16 146.41 \n", + " 5\t 133.82 140.26 146.93 153.86 161.05 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example deal.c, Page 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import random\n", + "#initialisation\n", + "NUM_SUITS=4\n", + "NUM_RANKS=13\n", + "in_hand = [[False for i in xrange(13)] for i in xrange(4)]\n", + "rank_code=['2','3','4','5','6','7','8','9','t','j','q','k','a']\n", + "suit_code=['c','d','h','s']\n", + "#accet input\n", + "num_cards=int(raw_input(\"Enter number of cards in hand: \"))\n", + "print \"Your hand: \",\n", + "while(num_cards>0):\n", + " suit=random.randint(0,(NUM_SUITS-1)) #generate random suit\n", + " rank=random.randint(0,(NUM_RANKS-1)) #generate random rank\n", + " if (in_hand[suit][rank]!=True):\n", + " in_hand[suit][rank]=True\n", + " num_cards=num_cards-1\n", + " #print hand\n", + " print \"%c%c\" % (rank_code[rank],suit_code[suit]),\n", + "print \"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of cards in hand: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your hand: 9h 4d 5d 3d ad \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example reverse2.c, Page 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=int(raw_input(\"How many numbers do you want to reverse?\")) #accept number of elements\n", + "li = raw_input(\"Enter %d numbers: \" % n) #accepting input in list\n", + "a = map(int, li.split())\n", + "print \"In reverse order: \", #print reversed list\n", + "for i in a[::-1]:\n", + " print i," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many numbers do you want to reverse?10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 10 numbers: 34 82 49 102 7 94 23 11 50 31\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In reverse order: 31 50 11 23 94 7 102 49 82 34\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter9_1.ipynb b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter9_1.ipynb new file mode 100755 index 00000000..bc87a6c7 --- /dev/null +++ b/C_Programming:_A_Modern_Approach_by_K._N._King/Chapter9_1.ipynb @@ -0,0 +1,394 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6212a1681da4032325cbede0a51614855911a11a6baad9f5e6fd0a0ecd4b5da9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example average.c, Page 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def average(a,b): #function to calculate average\n", + " return (a+b)/2\n", + "nums = raw_input(\"Enter three numbers: \") #input numbers from user\n", + "list1 = map(float, nums.split()) \n", + "x=list1[0]\n", + "y=list1[1]\n", + "z=list1[2]\n", + "print \"Average of %.1f and %.1f: %.2f\" % (x,y,average(x,y)) #print average using function\n", + "print \"Average of %.1f and %.1f: %.2f\" % (y,z,average(y,z))\n", + "print \"Average of %.1f and %.1f: %.2f\" % (x,z,average(x,z))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three numbers: 3.5 9.6 10.2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average of 3.5 and 9.6: 6.55\n", + "Average of 9.6 and 10.2: 9.90\n", + "Average of 3.5 and 10.2: 6.85\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example countdown.c, Page 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def print_count(n): #function definition\n", + " print \"T minus %d and counting\" % n\n", + "for i in range (10,0,-1):\n", + " print_count(i) #print using function\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T minus 10 and counting\n", + "T minus 9 and counting\n", + "T minus 8 and counting\n", + "T minus 7 and counting\n", + "T minus 6 and counting\n", + "T minus 5 and counting\n", + "T minus 4 and counting\n", + "T minus 3 and counting\n", + "T minus 2 and counting\n", + "T minus 1 and counting\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example pun2.c, Page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def print_pun(): #function definition\n", + " print \"To C, or not to C: that is the question.\"\n", + "print_pun() #function call" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To C, or not to C: that is the question.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example prime.c, Page 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def is_prime(n): #function to check for prime number\n", + " if (n<=1):\n", + " return False\n", + " divisor=2\n", + " while(divisor*divisor<=n):\n", + " if(n%divisor==0):\n", + " return False\n", + " return True\n", + "n=int(raw_input(\"Enter a number: \")) #input number\n", + "if(is_prime(n)): #check if prime using function\n", + " print \"Prime\" #print result of check\n", + "else:\n", + " print \"Not prime\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 34\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Not prime\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def main():\n", + " nums = raw_input(\"Enter three numbers: \") #input numbers from user\n", + " list1 = map(float, nums.split()) \n", + " x=list1[0]\n", + " y=list1[1]\n", + " z=list1[2]\n", + " \n", + " #function usage before definition\n", + " \n", + " print \"Average of %.1f and %.1f: %.2f\" % (x,y,average(x,y)) #print average using function\n", + " print \"Average of %.1f and %.1f: %.2f\" % (y,z,average(y,z))\n", + " print \"Average of %.1f and %.1f: %.2f\" % (x,z,average(x,z))\n", + " \n", + "if __name__==\"__main__\":\n", + " main()\n", + " \n", + "def average(a,b): #function to calculate average\n", + " return (a+b)/2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three numbers: 3.5 9.6 10.2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average of 3.5 and 9.6: 6.55\n", + "Average of 9.6 and 10.2: 9.90\n", + "Average of 3.5 and 10.2: 6.85\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=3.0\n", + "print \"Square: %d\" % square(x) #gives error since function prototype doesnt exist before\n", + "def square(n):\n", + " return n*n\n", + "\n", + "\"\"\"\n", + "def main():\n", + " x=3.0\n", + " print \"Square: %d\" % square(x) \n", + " \n", + "#Now wouldn't give an error since writing the line below loads up all functions before starting main()\n", + "\n", + "if __name__==\"__main__\":\n", + " main()\n", + " \n", + "def square(n):\n", + " return n*n\n", + "\"\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'square' 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 1\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m3.0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"Square: %d\"\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0msquare\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m#gives error since function prototype doesnt exist before\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 3\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0msquare\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mn\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mn\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mNameError\u001b[0m: name 'square' is not defined" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example on Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def store_zeroes(a,n):\n", + " for i in range(0,n):\n", + " a[i]=0\n", + "b=[None]*200\n", + "store_zeroes(b,100) #First 100 elements of b are now 100.\n", + "print b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example qsort.c, Page 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "N=10 #number of elements to sort\n", + "def split(a,low,high): #function to split list while sorting\n", + " part_element=a[low]\n", + " while(1):\n", + " while(low=high):\n", + " break\n", + " a[low+1]=a[high]\n", + " \n", + " while(low=high):\n", + " break\n", + " a[high-1]=a[low]\n", + " \n", + " a[high]=part_element\n", + " return high\n", + " \n", + "def quicksort(a,low,high): #recursive function for quicksort\n", + " if(low>=high):\n", + " return\n", + " middle=split(a,low,high)\n", + " quicksort(a,low,(middle-1))\n", + " quicksort(a,(middle+1),high)\n", + " \n", + "nums = raw_input(\"Enter %d numbers to be sorted: \"%N) #input numbers to sort\n", + "a = map(int, nums.split())\n", + "a.sort()\n", + "quicksort(a,0,(N-1)) #call quicksort function\n", + "print \"In sorted order: \", #print sorted result\n", + "for i in a:\n", + " print i,\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter 10 numbers to be sorted: 9 16 47 82 4 66 12 3 25 51\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In sorted order: 3 4 9 12 16 25 47 51 66 82\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "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 new file mode 100755 index 00000000..a01e3318 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics/hardythe1/attachment/20150521.pdf differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch1.png b/Chemical_Engineering_Thermodynamics/screenshots/ch1.png new file mode 100755 index 00000000..ae25b279 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics/screenshots/ch1.png differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/ch8.png b/Chemical_Engineering_Thermodynamics/screenshots/ch8.png new file mode 100755 index 00000000..29959197 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics/screenshots/ch8.png differ diff --git a/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png b/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png new file mode 100755 index 00000000..9e02c340 Binary files /dev/null and b/Chemical_Engineering_Thermodynamics/screenshots/pressureVSvol3.png differ diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt new file mode 100644 index 00000000..bda52f46 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/README.txt @@ -0,0 +1,10 @@ +Contributed By: Savan Solanki +Course: btech +College/Institute/Organization: Freelancer +Department/Designation: Computer Science +Book Title: Chemical Engineering Thermodynamics +Author: T. E. Daubert +Publisher: McGraw Hill +Year of publication: 1986 +Isbn: 0070664366 +Edition: 1 \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch1.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch1.ipynb new file mode 100755 index 00000000..6f94e64d --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch1.ipynb @@ -0,0 +1,66 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:de8d33c7b9d51e88746e761918ff52cb67c086883ba151d5269fcccdacab917b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Purpose, Usefulness, And Definitions of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 page : 3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "P = 2050. \t\t\t#kPa\n", + "T = 700. \t\t\t#K\n", + "E = 10.\t \t\t#J\n", + "\t\t\t\n", + "# Calculations\n", + "Pe = P*10**3 *0.3048**2 /4.4482 /144\n", + "Te = T*1.8-460\n", + "Ee = E*10**8 /(1055.1)\n", + "\t\t\t\n", + "# Results\n", + "print \"Temperature = %d F\"%(Te)\n", + "print \" Pressure = %d lbf/in**2 \"%(Pe)\n", + "print \" Energy = %.2e Btu\"%(Ee)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 800 F\n", + " Pressure = 297 lbf/in**2 \n", + " Energy = 9.48e+05 Btu\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch2.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch2.ipynb new file mode 100755 index 00000000..def15491 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch2.ipynb @@ -0,0 +1,360 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:847237c1ec4fe9b48879d56b25df72cea30519627c7c21f865146516f12f2299" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : PVT Properties of Fluids - Equations of State" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "basis = 1 \t\t\t#kmol n bumath.tane\n", + "P = 1.013*10**5 \t\t\t#N/m**2\n", + "R = 8.3143*10**3 \t\t\t#J/kmol K\n", + "T = 272.6 \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "V = basis*R*T/P\n", + "Ts = 373.1 \t\t\t#K\n", + "Vs = basis*R*Ts/P\n", + "\t\t\t\n", + "# Results\n", + "print \"Volume in case 1 = %.2f m**3\"%(V)\n", + "print \" Volume in case 2 = %.2f m**3\"%(Vs)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume in case 1 = 22.37 m**3\n", + " Volume in case 2 = 30.62 m**3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 page : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "Vb = 30 \t\t\t#m**3/kmol\n", + "P = 1.013*10**5 \t\t\t#Pa\n", + "R = 8.3143*10**3 \t\t\t#J/kmol K\n", + "T = 373.1 \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "Z = P*Vb/(R*T)\n", + "\t\t\t\n", + "# Results\n", + "print \"Compressibility factor = %.3f\"%(Z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compressibility factor = 0.980\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 page : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Pc = 22.12*10**6 \t\t\t#Pa\n", + "Tc = 647.3 \t\t\t#K\n", + "Vc = 0.05697 \t\t\t#m**3/Kmol\n", + "R = 8.3143*10**3\n", + "Tr = 0.7\n", + "\t\t\t\n", + "# Calculations\n", + "Zc = Pc*Vc/(R*Tc) \n", + "T = Tr*Tc\n", + "Ps = 10**6 \t\t\t#Pa\n", + "w = -math.log10(Ps/Pc) -1\n", + "\t\t\t\n", + "# Results\n", + "print \"critical compressibility factor = %.3f\"%(Zc)\n", + "print \" Accentric factor = %.4f\"%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical compressibility factor = 0.234\n", + " Accentric factor = 0.3448\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4A page : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "basis = 1 \t\t\t#kmol ammonia\n", + "P = 10**6 \t\t\t#pa\n", + "a = 4.19\n", + "b = 0.0373\n", + "R = 8314.3\n", + "Tc = 405.5\n", + "Pc = 11.28*10**6\n", + "\t\t\t\n", + "# Calculations\n", + "print (\"case a\")\n", + "print (\"Umath.sing vandwerwaals equation, \")\n", + "print (\"(P+a/v**2)*(V-b) = R*T, on solving by trail and error method,\")\n", + "V = 3\n", + "print \"Volume = %d m**3/kmol\"%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case a\n", + "Umath.sing vandwerwaals equation, \n", + "(P+a/v**2)*(V-b) = R*T, on solving by trail and error method,\n", + "Volume = 3 m**3/kmol\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4B page : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "basis = 1. \t\t\t#kmol ammonia\n", + "P = 10.**6 \t\t\t#pa\n", + "a = 4.19\n", + "b = 0.0373\n", + "R = 8314.3\n", + "Tc = 405.5\n", + "Pc = 11.28*10**6\n", + "\t\t\t\n", + "# Calculations\n", + "print (\"part b\")\n", + "an = 27*R**2*Tc**2 /(64*Pc)\n", + "bn = R*Tc/(8*Pc)\n", + "V = 3\n", + "\t\t\t\n", + "# Results\n", + "print \"Since an and bn are same as a and b, V is the same = %d m**3/kmol\"%(V)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part b\n", + "Since an and bn are same as a and b, V is the same = 3 m**3/kmol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4C page : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "print (\"part c\")\n", + "print (\"USing SRK equation, P = RT/(V-b) -alph*a/(V*(V+b))\")\n", + "print (\"By trail and error method,\")\n", + "\t\t\t\n", + "# Calculations\n", + "v2 = 2.98\n", + "\t\t\t\n", + "# Results\n", + "print \"volume = %.2f m**3/kmol\"%(v2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part c\n", + "USing SRK equation, P = RT/(V-b) -alph*a/(V*(V+b))\n", + "By trail and error method,\n", + "volume = 2.98 m**3/kmol\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 page : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "Pc = 22.12*10**6 \t\t\t#Pa\n", + "Tc = 647.3 \t\t\t#K\n", + "Zc = 0.234\n", + "T = 973.1 \t\t\t#K\n", + "P = 25*10**6 \t\t\t#Pa\n", + "\t\t\t\n", + "# Calculations\n", + "Tr = T/Tc\n", + "Pr = P/Pc\n", + "Z = 0.916\n", + "Zn = Z+0.05*(Zc-0.27)\n", + "\t\t\t\n", + "# Results\n", + "print \"Compresson factor = %.3f \"%(Zn)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compresson factor = 0.914 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 page : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "w = 0.3448\n", + "Z0 = 0.898\n", + "Z1 = 0.08\n", + "\t\t\t\n", + "# Calculations\n", + "Z = Z0 + Z1*w\n", + "\t\t\t\n", + "# Results\n", + "print \"Compression factor = %.3f \"%(Z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compression factor = 0.926 \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch3.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch3.ipynb new file mode 100755 index 00000000..266e4cee --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch3.ipynb @@ -0,0 +1,709 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ef87408e4a8aa5645fed756dcb555fc2d4a33d3c6244d485bc79468e75ba8f65" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Conservation of energy - First law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "mass = 4000. \t\t\t#kg/m**2\n", + "Patm = 1.013*10**5 \t\t\t#pa\n", + "g = 9.807\n", + "M = 28.\n", + "R = 8.3143*10**3\n", + "T = 303. \t\t\t#K\n", + "P1 = 800.*10**3 \t\t\t#pa\n", + "\t\t\t\n", + "# Calculations\n", + "Ps = Patm+mass*g\n", + "n = 1/M\n", + "V1 = n*R*T/P1\n", + "W = Ps*(2*V1)\n", + "\t\t\t\n", + "# Results\n", + "print \"Work done on the surroundings = %d J\"%(W)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done on the surroundings = 31609 J\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2a page : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "t1 = 1000. \t\t\t#K\n", + "p1 = 20. \t\t\t#Mpa\n", + "p2 = 10. \t\t\t#Mpa\n", + "ti = 600. \t\t\t#K\n", + "t2 = 700. \t\t\t#K\n", + "v1 = 0.02188\n", + "vi = 0.02008\n", + "v2 = 0.02825\n", + "Ei = 2617.5\n", + "E2 = 2893.1\n", + "E1 = 3441.8\n", + "x = 0.22\n", + "m = 1. \t\t\t#kg\n", + "cp = 4.186\n", + "t3 = 639. \t\t\t#K\n", + "H3 = 2409.5\n", + "H1 = 3879.3\n", + "\t\t\t\n", + "# Calculations\n", + "Tf = ti+ (v1-vi)/(v2-vi) *(t2-ti)\n", + "Ef = Ei+ x*(E2-Ei)\n", + "Q1 = Ef-E1\n", + "\t\t\t\n", + "# Results\n", + "print (\"part a\")\n", + "print \"Heat transfer = %.1f kJ/kg\"%(Q1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part a\n", + "Heat transfer = -763.7 kJ/kg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2b page : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "t1 = 1000. \t\t\t#K\n", + "p1 = 20. \t\t\t#Mpa\n", + "p2 = 10. \t\t\t#Mpa\n", + "ti = 600. \t\t\t#K\n", + "t2 = 700. \t\t\t#K\n", + "v1 = 0.02188\n", + "vi = 0.02008\n", + "v2 = 0.02825\n", + "Ei = 2617.5\n", + "E2 = 2893.1\n", + "E1 = 3441.8\n", + "x = 0.22\n", + "m = 1. \t\t\t#kg\n", + "cp = 4.186\n", + "t3 = 639. \t\t\t#K\n", + "H3 = 2409.5\n", + "H1 = 3879.3\n", + "\t\t\t\n", + "# Calculations\n", + "Tf = ti+ (v1-vi)/(v2-vi) *(t2-ti)\n", + "Hf = H3 - m*cp*(t3-Tf)\n", + "Q2 = Hf-H1\n", + "\t\t\t\n", + "# Results\n", + "print (\"part b\")\n", + "print \"Heat transfer = %.f kJ/kg\"%(Q2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part b\n", + "Heat transfer = -1541 kJ/kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 page : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "p1 = 2.181\n", + "p2 = 2.637\n", + "p3 = 3.163\n", + "vg1 = 0.09150\n", + "vg2 = 0.07585\n", + "vg3 = 0.06323\n", + "vl1 = 0.00118\n", + "vl2 = 0.00120\n", + "vl3 = 0.00122\n", + "M = 18.\n", + "t1 = 490. \t\t\t#K\n", + "t2 = 500. \t\t\t#K\n", + "t3 = 510. \t\t\t#K\n", + "R = 8.3143\n", + "\t\t\t\n", + "# Calculations\n", + "lam1 = (p2-p1)*10**3 *M*(vg2-vl2) *2.154/ math.log(t3/t1)\n", + "lam2 = math.log(p3/p1) *R/(1/t1 -1/t3)\n", + "err = (lam2-lam1)/lam1\n", + "\t\t\t\n", + "# Results\n", + "print \"latent heat umath.sing calyperon equation = %d kJ/kmol\"%(lam1)\n", + "print \" latent heat umath.sing the clasius calyperon equation = %d kJ/kmol\"%(lam2)\n", + "print \" Error = %d percent\"%(err*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "latent heat umath.sing calyperon equation = 32990 kJ/kmol\n", + " latent heat umath.sing the clasius calyperon equation = 38618 kJ/kmol\n", + " Error = 17 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "h1 = 147360 \n", + "h2 = 29790\n", + "\t\t\t\n", + "# Calculations\n", + "Hr = h1-h2\n", + "\t\t\t\n", + "# Results\n", + "print \"heat of reaction = %d kJ/kmol\"%(Hr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "heat of reaction = 117570 kJ/kmol\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 page : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "R = 8314.3\n", + "T = 700. \t\t\t#K\n", + "T2 = 437.5 \t\t\t#K\n", + "T3 = 350. \t\t\t#K\n", + "T4 = T3\n", + "p2 = 0.552 \t\t\t#Mpa\n", + "p1 = 2.758 \t\t\t#Mpa\n", + "cp = 29.3\n", + "R0 = 8.3\n", + "k = 1.4\n", + "\t\t\t\n", + "# Calculations\n", + "cv = cp-R0\n", + "Q1 = -R*T*math.log(p2/p1)\n", + "Q2 = cv*(T2-T)\n", + "dH2 = cp*(T2-T)\n", + "p3 = p2*T3/T2\n", + "p3 = 0.345\n", + "Q3 = cp*(T3-T2)\n", + "dE3 = cv*(T3-T2)\n", + "W3 = Q3-dE3\n", + "T5 = T4*(p1/p3)**((k-1)/k)\n", + "dH4 = cp*(T5-T4)\n", + "W4 = -cv*(T5-T4)\n", + "Q5 = cp*(T-T5)\n", + "dE5 = cv*(T-T5)\n", + "W5 = Q5-dE5\n", + "\t\t\t\n", + "# Results\n", + "print (\"part a isothermal\")\n", + "print \"dH = 0, dE = 0, Q = W = %.f kJ/kmol\"%(Q1/10**3)\n", + "print (\"part 2 isometric\")\n", + "print \"dH = %d kJ/kmol, W = 0, Q = dE = %.f kJ/kmol\"%(dH2,Q2)\n", + "print (\"part 3 isobaric\")\n", + "print \"dE = %.f kJ/kmol, W = %d kJ/kmol, Q = dH = %.f kJ/kmol\"%(dE3,W3,Q3)\n", + "print (\"part 4 adiabatic\")\n", + "print \"dH = %d kJ/kmol, W = -dE = %d kJ/kmol, Q = 0 kJ/kmol\"%(dH4,W4)\n", + "print (\"part 5 isobaric\")\n", + "print \"dE = %d kJ/kmol, W = %d kJ/kmol, Q = dH = %d kJ/kmol\"%(dE5,W5,Q5)\n", + "print (\"The graph cannot be plotted since volume axis values are not known. In the textbook it is randomly drawn to be of that shape.\")\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part a isothermal\n", + "dH = 0, dE = 0, Q = W = 9363 kJ/kmol\n", + "part 2 isometric\n", + "dH = -7691 kJ/kmol, W = 0, Q = dE = -5512 kJ/kmol\n", + "part 3 isobaric\n", + "dE = -1838 kJ/kmol, W = -726 kJ/kmol, Q = dH = -2564 kJ/kmol\n", + "part 4 adiabatic\n", + "dH = 8317 kJ/kmol, W = -dE = -5961 kJ/kmol, Q = 0 kJ/kmol\n", + "part 5 isobaric\n", + "dE = 1388 kJ/kmol, W = 548 kJ/kmol, Q = dH = 1937 kJ/kmol\n", + "The graph cannot be plotted since volume axis values are not known. In the textbook it is randomly drawn to be of that shape.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pylab import xlabel,ylabel,plot\n", + "import math \n", + "\t\t\t\n", + "# Variables\n", + "p = [2.75, 0.5, 0.31, 0.31, 2.75]\n", + "v = [116.17, 654.8, 654.8, 597, 110.65]\n", + "t = [440, 440, 170, 140, 410]\n", + "h = [3325, 3356, 2802.6, 2738.5, 3257.7]\n", + "e = [3005.6, 3028.6, 2602.6, 2553.6, 2953.4]\n", + "\t\t\t\n", + "# Calculations\n", + "dh1 = h[1] - h[0]\n", + "de1 = e[1] - e[0]\n", + "q2 = e[2] - e[1]\n", + "dh2 = h[2] - h[1]\n", + "dh3 = h[3] - h[2]\n", + "de3 = e[3] - e[2]\n", + "W3 = p[2] *(v[3] - v[2])\n", + "Q3 = de3+W3\n", + "dh4 = h[4] -h[3]\n", + "de4 = e[4] -e[3]\n", + "dh5 = h[0] - h[4]\n", + "de5 = e[0] - e[4]\n", + "W5 = p[4] *(v[0] - v[4])\n", + "q5 = de5+W5\n", + "\t\t\t\n", + "# Results\n", + "print \"In case 1 , dH = %.1f kJ/kg dE = %.1f kJ/kg W = pDv kJ/kg Q = %.1f + W kJ/kg\"%(dh1,de1,de1)\n", + "print \" In case 2, W = 0 kJ/kg Q = dE = %d kJ/kg dH = %.1f kJ/kg\"%(q2,dh2)\n", + "print \" In case 3, dH = %.1f kJ/kg dE = %.1f kJ/kg W = %.1f kJ/kg Q = %.1f kJ/kg\"%(dh3,de3,W3,Q3)\n", + "print \" In case 4, Q = 0 kJ/kg dH = %.1f kJ/kg dE = -W = %.1f kJ/kg\"%(dh4,de4)\n", + "print \" In case 5, dH = %.1f kJ/kg dE = %.1f kJ/kg W = %.1f kJ/kg Q = %.1f kJ/kg\"%(dh5,de5,W5,q5)\n", + "xlabel(\"Volume (m**3/kg)\")\n", + "ylabel(\"Pressure (Mpa)\")\n", + "plot(v,p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1 , dH = 31.0 kJ/kg dE = 23.0 kJ/kg W = pDv kJ/kg Q = 23.0 + W kJ/kg\n", + " In case 2, W = 0 kJ/kg Q = dE = -426 kJ/kg dH = -553.4 kJ/kg\n", + " In case 3, dH = -64.1 kJ/kg dE = -49.0 kJ/kg W = -17.9 kJ/kg Q = -66.9 kJ/kg\n", + " In case 4, Q = 0 kJ/kg dH = 519.2 kJ/kg dE = -W = 399.8 kJ/kg\n", + " In case 5, dH = 67.3 kJ/kg dE = 52.2 kJ/kg W = 15.2 kJ/kg Q = 67.4 kJ/kg\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEPCAYAAACp/QjLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VGXax/HvhNACKiJNikREICC9SpGgKIqKqCxiXVEU\nFV9dEAVsgBUbCBZgRQQrKCgooiguA4rSDKETFhYVXMTOClgo8/5xn5iYTJLJMGfOzOT3ua65nHJy\nznNWd+65n3I/ICIiIiIiIiIiIiIiIiIiIiIiIiIiknDKAcuBTGAj8HABx00A/g2sAVpGp2kiIuKl\nFOefycAyoHOez3sC853n7Z1jRETEY0kun3+/888yQCngxzyf9wKmO8+XA5WA6i63SUREiuB2cEjC\nupV2A4uw7qXcagE7cr3eCdR2uU0iIlIEt4PDYaAF9oV/GpAe5BhfntcBl9skIiJFSI7SdfYA7wJt\nAH+u978G6uR6Xdt57y9OOumkwLZt29xsn4hIItoG1A/nD93MHKpgYwgA5YEzgdV5jnkbuMp53gH4\nGeuC+ott27YRCAQS9jFy5EjP26B70/3p/hLvAZwU7he4m5nD8dhgc5LzeAn4CBjofD4Zm6nUE9gK\n7AP6u9geEREJkZvBYR3QKsj7k/O8vtnFNoiISBjcHpCWEKSnp3vdBNck8r2B7i/eJfr9HYm8M4Vi\nVcDpPxMRkRD5fD4I83temYOIiOSj4CAiIvkoOIiISD4KDiIiko+Cg4iI5KPgICIi+Sg4iIhIPgoO\nIiKSj4KDiIjko+AgIiL5KDiIiEg+cRscli2DvXvt+eefw/ffe9seEZFEErfBYcYMaNYM/H54/31I\nS4PHH4fffvO6ZS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Om\nvljBvZZY2ZPLg5y3E/blmy0F+Mg51y/AfViRvgud52Bf4O8BLwM3A80KeA9st7INzmNIrut0x8oi\nZPMBj2H7MfTHauZMwsqztMEyjNxVN1dgVXNFipRc9CEiUfcaFhTexvrcr8G+1P3AD84xr2BfdHOL\nOFfuwmLZtZHWO4/smvf/AU7AylW3JueLvzxWwTOvuuRUMwWrC7bAeb4O+A045Fwj1Xk/u7+/JTDa\neb42yHtgmUsToBG2Icsi4H9YLZzsLjefc87lwEDnvUbOvWRnWq/x1wznv1jgECmSMgeJRW9jlV1b\nYr/KV5O/7rwvyHsH+et/0+XzHPO788/DuZ5nv87+oTTduW5L7Mv2PoLLHXQO5DnXH0HOm200+QV7\nD6w42jZyupzakbPPcwDrImuNZT3Z7xXURrD/beJhfwKJAQoOEov2Yr+WXwBedd5biVVGPQ4boO2H\n9evnthuoho0/lMU26wlVAOsa6gNUdd6rjGUUeX2J1cl3Qyo5AaUuFhj+Tc7Wq7m/3N/HutrexTaT\n2gLUc/4O8s90Op6crEKkUOpWklj1GlZiua/zehc2jXMR9ot4HjmDrdlfmAewX/orsE1MNhZw7oJ2\nx9qEDTZ/gP1wOgDcBHyV57hPsD79z/NcnyCvi/tLvTN2nwecx/VYl9I52PhE3uvMxso1v42N09yE\nBY19WEDNff12/HWAWkREIqge9ms9mj4gZy/gwlTI9fwZbFtayNnnWz8IRURcNIPwFsG57R/YGM0G\nbEvTcs77vbCsSERERERERERERERERERERERERERERCSW/T/tRRjYWF8jNgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "P = 0.1*10**6 \t\t\t#Pa\n", + "P2 = 0.55*10**6 \t\t\t#Pa\n", + "M = 28.84\n", + "R = 8314.4\n", + "T1 = 303.1 \t\t\t#K\n", + "T2 = 316.1 \t\t\t#K\n", + "d1 = 0.154 \t\t\t#m\n", + "d2 = 0.028 \t\t\t#m\n", + "mass = 0.25 \t\t\t#m**3/s\n", + "Q = 2.764*10**8 \t\t\t#J/h\n", + "cp = 29.3*10**3 \n", + "\t\t\t\n", + "# Calculations\n", + "rho1 = P*M/(T1*R)\n", + "u1 = mass/(math.pi/4 *d1**2)\n", + "rho2 = P2*M/(R*T2)\n", + "u2 = u1*d1**2 *rho1/(d2**2 *rho2)\n", + "Wsd = (u2**2 - u1**2 )/2 + cp/M *(T2-T1) + Q/(mass*rho1*3600)\n", + "mdot = u1*math.pi/4 *d1**2 *rho1\n", + "Ws = Wsd*mdot/745.7\n", + "\t\t\t\n", + "# Results\n", + "print \"Power input to the compressor = %d hp\"%(Ws)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power input to the compressor = 109 hp\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "u1 = 1.1 \t\t\t#m/s\n", + "rho1 = 1.21*10**3 \t\t\t#kg/m**3\n", + "d1 = 0.078\n", + "z1 = 4\n", + "h2 = 18 \t\t\t#m\n", + "g = 9.806\n", + "\t\t\t\n", + "# Calculations\n", + "mdot = u1*rho1*math.pi/4 *d1**2\n", + "Wsd = z1+h2\n", + "Ws = Wsd*mdot*g\n", + "dP = Ws*rho1/mdot\n", + "\t\t\t\n", + "# Results\n", + "print \"Power input = %d W\"%(Ws)\n", + "print \"Pressure drop = %.3f Mpa\"%(dP/10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power input = 1372 W\n", + "Pressure drop = 0.261 Mpa\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 page : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "eff = 0.75\n", + "Hf = [-110600, -241980, -393770, 0]\n", + "Hc = [30.35, 36, 45.64, 29.30]\n", + "T2 = 540. \t \t\t#C\n", + "T1 = 25. \t\t \t#C\n", + "mass = 500. \t\t\t#kmol H2 produced\n", + "\t\t\t\n", + "# Calculations\n", + "dHr = Hf[2] + Hf[3] - Hf[0] -Hf[1]\n", + "dHpr = (eff*(Hc[2] +Hc[3]) + (1-eff)*(Hc[1]+Hc[0]))*(T2-T1)\n", + "q = dHr*eff +dHpr\n", + "heat = q*mass/eff\n", + "\t\t\t\n", + "# Results\n", + "print \"Heat produced = %.3e kJ\"%(heat)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat produced = 4.397e+06 kJ\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "eff = 0.75\n", + "Hf = [-110600, -241980, -393770, 0]\n", + "Hc = [30.35, 36 ,45.64, 29.30]\n", + "T2 = 540. \t\t\t#C\n", + "T1 = 25. \t\t\t#C\n", + "mass = 500. \t\t\t#kmol H2 produced\n", + "work = 10.**6 \t\t\t#kJ\n", + "\t\t\t\n", + "# Calculations\n", + "dHr = Hf[2] + Hf[3] - Hf[0] -Hf[1]\n", + "dHpr = (eff*(Hc[2] +Hc[3]) + (1-eff)*(Hc[1]+Hc[0]))*(T2-T1)\n", + "q = dHr*eff +dHpr\n", + "heat = q*mass/eff\n", + "qe = heat-work\n", + "\t\t\t\n", + "# Results\n", + "print \"Heat produced = %.3e kJ\"%(qe)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat produced = 3.397e+06 kJ\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\t\t\t\n", + "# Variables\n", + "so3 = 6.\n", + "h2 = -296840. \t\t\t#kJ/kmol\n", + "h3 = -395720. \t\t\t#kJ/kmol\n", + "t2 = 400. \t\t\t#C\n", + "t1 = 25. \t\t\t#C\n", + "\t\t\t\n", + "# Calculations\n", + "Hr = so3*(h3-h2)\n", + "cp = array([1.059, 0.967, 0.714])\n", + "n = array([82.76, 11 ,8])\n", + "M = array([28, 32, 64])\n", + "Ht = sum(cp*n*M)\n", + "Hre = Ht*(t2-t1)\n", + "Hpr = Hre-Hr\n", + "Tf = t1 + Hpr/3261.6\n", + "\t\t\t\n", + "# Results\n", + "print \"temperature of exit gases = %d C\"%(Tf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature of exit gases = 570 C\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page: 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\t\t\t\n", + "# Variables\n", + "x = 0.25\n", + "Hr = 1.4278*10**6 \t\t\t#kJ/kmol\n", + "ti = 25. \t\t\t#C\n", + "cp = array([1.24, 2.39, 1.11])\n", + "M = array([44 ,18, 32])\n", + "z = array([12, 3, 0.5])\n", + "r = 4.186\n", + "\t\t\t\n", + "# Calculations\n", + "v = cp*M*z\n", + "v2 = sum(v)\n", + "T = ti+ Hr/(v2)\n", + "\t\t\t\n", + "# Results\n", + "print \"Theoretical temperature = %d C\"%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Theoretical temperature = 1806 C\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch4.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch4.ipynb new file mode 100755 index 00000000..fe7ec17f --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch4.ipynb @@ -0,0 +1,1364 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:86a92304d7490362995032f0562ccedb12e93f4b49049a51c2746a179c0b276d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : The Second law of thermodynamics and its applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 page : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "T = 500. \t\t\t#K\n", + "Qr = 5.*10**6 \t\t\t#kJ\n", + "T2 = 600. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "dSS = Qr/T\n", + "dSS2 = -Qr/T2\n", + "Ds = dSS+dSS2\n", + "\t\t\t\n", + "# Results\n", + "print \"Entropy change of the system = %d kJ/K\"%(dSS)\n", + "print \" Entropy change of the surroundings = %d kJ/K\"%(dSS2)\n", + "print \" Entropy change if the universe = %.f kJ/K\"%(Ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change of the system = 10000 kJ/K\n", + " Entropy change of the surroundings = -8333 kJ/K\n", + " Entropy change if the universe = 1667 kJ/K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 page : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "p1 = 2.758 \t\t\t#Mpa\n", + "p2 = 0.552 \t\t\t#Mpa\n", + "T1 = 700. \t\t\t#K\n", + "T2 = 700. \t\t\t#K\n", + "n = 1.\n", + "R = 8.3143\n", + "Cv = 21.\n", + "Cp = 29.3\n", + "\t\t\t\n", + "# Calculations\n", + "dsa = n*R*math.log(p1/p2)\n", + "T3 = 437.5 \t\t\t#K\n", + "dsb = Cv*math.log(T3/T2)\n", + "T4 = 350. \t\t\t#K\n", + "dsc = Cp*math.log(T4/T3)\n", + "T5 = 634. \t\t\t#K\n", + "dsd = 0.\n", + "T6 = 700. \t\t\t#K\n", + "dse = Cp*math.log(T6/T5)\n", + "dstotal = dsa+dsb+dsc+dsd+dse\n", + "\t\t\t\n", + "# Results\n", + "print \"Entropy change in case a = %.3f kJ/kmol K\"%(dsa)\n", + "print \" Entropy change in case b = %.3f kJ/kmol K\"%(dsb)\n", + "print \" Entropy change in case c = %.3f kJ/kmol K\"%(dsc)\n", + "print \" Entropy change in case d = %.3f kJ/kmol K\"%(dsd)\n", + "print \" Entropy change in case e = %.3f kJ/kmol K\"%(dse)\n", + "print \" Entropy change in total process = %.3f kJ/kmol K\"%(dstotal)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change in case a = 13.375 kJ/kmol K\n", + " Entropy change in case b = -9.870 kJ/kmol K\n", + " Entropy change in case c = -6.538 kJ/kmol K\n", + " Entropy change in case d = 0.000 kJ/kmol K\n", + " Entropy change in case e = 2.902 kJ/kmol K\n", + " Entropy change in total process = -0.131 kJ/kmol K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 page : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables\n", + "ratio = 1./2\n", + "R = 8.314\n", + "p1 = 0.5 \t\t\t#kPa\n", + "p2 = 0.1 \t\t\t#kPa\n", + "\t\t\t\n", + "# Calculations\n", + "ya = ratio/(1+ratio)\n", + "ds = -ya*R*math.log(ya) - (1-ya)*R*math.log(1-ya)\n", + "dss = R*math.log(p1/p2)\n", + "\t\t\t\n", + "# Results\n", + "print \"Entropy of mixing = %.3f kJ/kmol K\"%(ds)\n", + "print \" Total entropy change of the universe = %.2f kJ/kmol K\"%(dss)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of mixing = 5.292 kJ/kmol K\n", + " Total entropy change of the universe = 13.38 kJ/kmol K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 page : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "s1 = 7.096 \t\t\t#kJ/kg K\n", + "s2 = 7.915 \t\t\t#kJ/kg K\n", + "s3 = 7.16 \t\t\t#kJ/kg K\n", + "s4 = 7.014 \t\t\t#kJ/kg K\n", + "s5 = 6.999 \t\t\t#kJ/kg K\n", + "\t\t\t\n", + "# Calculations\n", + "dsa = s2-s1\n", + "dsb = s3-s2\n", + "dsc = s4-s3\n", + "dsd = s5-s4\n", + "dse = s1-s5\n", + "dstotal = dsa+dsb+dsc+dsd+dse\n", + "\t\t\t\n", + "# Results\n", + "print \"Change in entropy in process a = %.3f kJ/kg K\"%(dsa)\n", + "print \" Change in entropy in process b = %.3f kJ/kg K\"%(dsb)\n", + "print \" Change in entropy in process c = %.2f kJ/kg K\"%(dsc)\n", + "print \" Change in entropy in process d = %.3f kJ/kg K\"%(dsd)\n", + "print \" Change in entropy in process e = %.3f kJ/kg K\"%(dse)\n", + "print \" Change in entropy in total process = %.3f kJ/kg K\"%(dstotal)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy in process a = 0.819 kJ/kg K\n", + " Change in entropy in process b = -0.755 kJ/kg K\n", + " Change in entropy in process c = -0.15 kJ/kg K\n", + " Change in entropy in process d = -0.015 kJ/kg K\n", + " Change in entropy in process e = 0.097 kJ/kg K\n", + " Change in entropy in total process = 0.000 kJ/kg K\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "m1 = 5000. \t\t\t#kg/h\n", + "cp1 = 3.2 \t\t\t#kJ/kg K\n", + "cp2 = 4.186 \t\t\t#kJ/kg K\n", + "t1 = 220. \t\t\t#C\n", + "t2 = 30. \t\t\t#C\n", + "T1 = 210. \t\t\t#C\n", + "T2 = 20. \t\t\t#C\n", + "\t\t\t\n", + "# Calculations\n", + "m2 = m1*cp1*(t1-t2)/(cp2*(T1-T2))\n", + "ds = m1*cp1*math.log((t2+273.1)/(t1+273.1)) + m2*cp2*math.log((T1+273.1)/(T2+273.1))\n", + "\t\t\t\n", + "# Results\n", + "print \"Change in entropy = %.f kJ/h K\"%(ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = 209 kJ/h K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "s1 = 218.8 \t\t\t#kJ/kmol K\n", + "s2 = 188.85 \t\t\t#kJ/kmol K\n", + "s3 = 237.8 \t\t\t#kJ/kmol K\n", + "s4 = 205.2 \t\t\t#kJ/kmol K\n", + "\t\t\t\n", + "# Calculations\n", + "ds = s1+s2-s3-0.5*s4\n", + "\t\t\t\n", + "# Results\n", + "print \"Entropy change = %.2f kJ/kmol K\"%(ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change = 67.25 kJ/kmol K\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "Q = 6. \t\t\t#kJ/kg\n", + "p1 = 1.5 \t\t\t#Mpa\n", + "p2 = 0.1 \t\t\t#Mpa\n", + "t1 = 500. \t\t\t#C\n", + "t2 = 140.8 \t\t\t#C\n", + "h1 = 3473.1 \t\t\t#kJ\n", + "h2 = 2758.1 \t\t\t#kJ\n", + "s1 = 7.5698 \t\t\t#kJ/K\n", + "s2 = 7.5698 \t\t\t#kJ/K\n", + "eff = 0.85\n", + "Ts = 293.1 \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "Wideal = h2-h1\n", + "Ws = eff*Wideal\n", + "dH = -Q-Ws\n", + "H2 = h1+dH\n", + "S2 = 7.8005\n", + "ds = S2-s1\n", + "Wlost = Ts*ds+Q\n", + "\t\t\t\n", + "# Results\n", + "print \"lost work = %.1f kJ\"%(Wlost)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lost work = 73.6 kJ\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 page : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "m = 5000. \t\t\t#/kg/h\n", + "cp = 3.2 \t\t\t#kJ/kg K\n", + "Ts = 30.+273.1 \t\t\t#K\n", + "t1 = 220. \t\t\t#C\n", + "t2 = 40. \t\t\t#C\n", + "Q = 2.88*10**6 \t\t\t#kJ\n", + "\t\t\t\n", + "# Calculations\n", + "Q = m*cp*(t2-t1)\n", + "dss = m*cp*math.log((t2+273.1)/(t1+273.1))\n", + "Wlost = Ts*dss-Q\n", + "eff = Ts*dss/Q\n", + "\t\t\t\n", + "# Results\n", + "print \"Lost work = %d kJ\"%round(Wlost,-4)\n", + "print \" Efficiency = %.3f\"%(eff)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lost work = 680000 kJ\n", + " Efficiency = 0.765\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 page : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "R = 8.314\n", + "cp = 35.58\n", + "n = 100./16\n", + "T1 = 300. \t\t\t#K\n", + "T2 = 500. \t\t\t#K\n", + "k = 1.305\n", + "P2 = 3. \t\t\t#Mpa\n", + "P1 = 0.5 \t\t\t#Mpa\n", + "Ts = 290. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "cv = cp-R\n", + "Wi = n*R*T1/(k-1) *((P2/P1)**((k-1)/k) -1)\n", + "Hi = Wi\n", + "Ha = n*cp*(T2-T1)\n", + "eta = abs(Hi/Ha)\n", + "dss1 = cp*math.log(T2/T1) - R*math.log(P2/P1)\n", + "Wl1 = Ts*dss1\n", + "dss2 = n*cp*math.log(T2/T1)\n", + "dss3 = abs(Ha/Ts)\n", + "dsst = dss2+dss3\n", + "Wl2 = -Ts*dss2 +Ha\n", + "Wlost = Wl1+Wl2\n", + "\t\t\t\n", + "# Results\n", + "print \"Thermodynamic efficiency = %.3f\"%(eta)\n", + "print \" Net work lost = %d kJ\"%(Wlost)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermodynamic efficiency = 0.598\n", + " Net work lost = 12483 kJ\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 page : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "T1 = 673. \t\t\t#K\n", + "T2 = 293. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "eta = (T1-T2)/T1\n", + "\t\t\t\n", + "# Results\n", + "if eta >= 0.5:\n", + " print \"Max efficiency = %.3f and an efficiency of 0.5 is possible\"%(eta)\n", + "else:\n", + " print \"Max efficiency = %.3f and an efficiency of 0.5 is not possible\"%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max efficiency = 0.565 and an efficiency of 0.5 is possible\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 page : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "T1 = 280. \t\t\t#K\n", + "T2 = 300. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "cop = T1/(T2-T1)\n", + "\t\t\t\n", + "# Results\n", + "print \"coefficient of performance = %.1f\"%(cop)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of performance = 14.0\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 page : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "P = 2. \t\t\t#Mpa\n", + "T1 = 212.4+273.1 \t\t\t#K\n", + "T2 = 25+273.1 \t\t\t#K\n", + "h1 = 2799.5\n", + "h2 = 104.89\n", + "s1 = 6.3409\n", + "s2 = 0.3674\n", + "\t\t\t\n", + "# Calculations\n", + "dh = h1-h2\n", + "ds = s1-s2\n", + "exergy = dh-T2*ds\n", + "\t\t\t\n", + "# Results\n", + "print \"exergy = %.1f kJ/kg\"%(exergy)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "exergy = 913.9 kJ/kg\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 page : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "R = 8314.3\n", + "T = 700. \t\t\t#K\n", + "T2 = 437.5 \t\t\t#K\n", + "T3 = 350. \t\t\t#K\n", + "T4 = T3\n", + "p2 = 0.552 \t\t\t#Mpa\n", + "p1 = 2.758 \t\t\t#Mpa\n", + "p3 = 0.345 \t\t\t#Mpa\n", + "cp = 29.3\n", + "R0 = 8.3143\n", + "k = 1.4\n", + "n = 1.\n", + "P0 = 0.103 \t\t\t#Mpa\n", + "\t\t\t\n", + "# Calculations\n", + "cv = cp-R0\n", + "p3 = p2*T3/T2\n", + "p3 = 0.345\n", + "T5 = T4*(p1/p3)**((k-1)/k)\n", + "G1 = n*R*T*math.log(p2/p1)\n", + "V700 = R*10**3 *T/(p2*10**9)\n", + "Sa = 209.\n", + "Sb = 199.2\n", + "Sc = 204.7\n", + "S2 = (T2-T)/6 *(Sa+4*Sc+Sb )\n", + "G2 = V700*(p3-p2)*10**3 -S2\n", + "saa = 199.2\n", + "sbb = 192.6\n", + "savg = (saa+sbb)*0.5\n", + "G3 = -savg*(T3-T2)\n", + "pmid = (p3+p2)/2\n", + "vmid = 2.88\n", + "sav = 192.7\n", + "v4 = 8.435 \t\t\t#m**3\n", + "v5 = 1.911 \t\t\t#m**3\n", + "integ = (p1-p3)*10**3 /6 *(v4+4*vmid+v5)\n", + "G4 = integ - sav*(T5-T3)\n", + "Sav = 194.25\n", + "G5 = -Sav*(T-T5)\n", + "Gt = G1/10**3 +G2+G3+G4+G5\n", + "\t\t\t\n", + "# Results\n", + "print \"in case 1, Change in gibbs free energy = %.f kJ\"%(G1/10**3)\n", + "print \" in case 2, Change in gibbs free energy = %.f kJ\"%(G2)\n", + "print \" in case 3, Change in gibbs free energy = %d kJ\"%(G3)\n", + "print \" in case 4, Change in gibbs free energy = %d kJ\"%(G4)\n", + "print \" in case 5, Change in gibbs free energy = %d kJ\"%(G5)\n", + "print \" Net change in gibbs energy = %d kJ\"%(Gt)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "in case 1, Change in gibbs free energy = -9363 kJ\n", + " in case 2, Change in gibbs free energy = 51499 kJ\n", + " in case 3, Change in gibbs free energy = 17141 kJ\n", + " in case 4, Change in gibbs free energy = -45908 kJ\n", + " in case 5, Change in gibbs free energy = -12844 kJ\n", + " Net change in gibbs energy = 523 kJ\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 page : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables\n", + "v = 1./430\n", + "pi = 4.08 \t\t\t#Mpa\n", + "pf = 10. \t\t\t#Mpa\n", + "pf2 = 1. \t\t\t#Mpa\n", + "pii = 0.1 \t\t\t#Mpa\n", + "R = 8314.3\n", + "n = 1./28\n", + "T = 273.1\n", + "\t\t\t\n", + "# Calculations\n", + "logpr = v*(pf-pii)*10**6 /(R*T*n)\n", + "pr = math.exp(logpr)\n", + "p = pr*pi\n", + "logpr = v*(pf2-pii)*10**6 /(R*T*n)\n", + "pr = math.exp(logpr)\n", + "p2 = pr*pi\n", + "\t\t\t\n", + "# Results\n", + "print \"Final pressure = %.2f Mpa\"%(p)\n", + "print \" Final pressure in case 2 = %.2f Mpa\"%(p2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure = 5.42 Mpa\n", + " Final pressure in case 2 = 4.19 Mpa\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 page : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "Hvap = 338.14 \t\t\t#kJ/kg\n", + "T = 409.3 \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "dss = Hvap/T\n", + "dg = 0\n", + "\t\t\t\n", + "# Results\n", + "print \"change in entropy and gibbs energy of system are %.3f kJ/kg K and %d kJ/kg respectivey\"%(dss,dg)\n", + "print \" change in entropy and gibbs energy of universe are %.3f kJ/kg K and %d kJ/kg respectivey\"%(-dss,-dg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in entropy and gibbs energy of system are 0.826 kJ/kg K and 0 kJ/kg respectivey\n", + " change in entropy and gibbs energy of universe are -0.826 kJ/kg K and 0 kJ/kg respectivey\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 page : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "T = 373.1 \t\t\t#K\n", + "R = 8314.3\n", + "Pd = 0.1013*10**6 \t\t\t#Pa\n", + "P = 10. \t\t\t#Mpa\n", + "p3 = 5.*10**6 \t\t\t#Pa\n", + "vf = 0.0373\n", + "a = 424.447\n", + "\t\t\t\n", + "# Calculations\n", + "Vd = R*T/Pd\n", + "V = 0.5\n", + "dss = -R*(math.log(p3/Pd) + math.log((V-vf)/(Vd-vf)))\n", + "dhh = R*T/10**3 - p3/10**3 *V+ a/V**2\n", + "\t\t\t\n", + "# Results\n", + "print \"Change in entropy = %.4f kJ/kmol K\"%(dss/10**3)\n", + "print \" change in enthalpy = %.f kJ/kmol\"%(dhh)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = 2.4285 kJ/kmol K\n", + " change in enthalpy = 2300 kJ/kmol\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 page : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "Tc = 647.3 \t\t\t#K\n", + "dh = 1.1\n", + "Db = -2\n", + "v2 = 0.234\n", + "v1 = 0.27\n", + "\t\t\t\n", + "# Calculations\n", + "dh2 = dh+Db*(v2-v1)\n", + "dhh = dh2*Tc\n", + "dhbar = dhh*4.18/18\n", + "h1 = 3777.5 \t\t\t#kJ/kg\n", + "h2 = 3928.2 \t\t\t#kJ/kg\n", + "dhs = h2-h1\n", + "err = abs(dhs-dhbar)/dhs\n", + "\t\t\t\n", + "# Results\n", + "print \"Enthalpy departure = %d kJ/kg\"%(dhbar)\n", + "print \" Percentage error = %.1f \"%(err*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy departure = 176 kJ/kg\n", + " Percentage error = 16.9 \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 page : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "w = 0.3448\n", + "R = 8.3143\n", + "Tc = 647.3\n", + "\t\t\t\n", + "# Calculations\n", + "h0 = 0.57\n", + "h1 = 0.05\n", + "h2 = h0+w*h1\n", + "h3 = h2*R*Tc\n", + "dh = -h3\n", + "\t\t\t\n", + "# Results\n", + "print \"Enthalpy departure = %d kJ/kmol\"%(dh)\n", + "print (\"The answer is a bit different due to rounding off error in the textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy departure = -3160 kJ/kmol\n", + "The answer is a bit different due to rounding off error in the textbook\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 page : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "ta = 310. \t\t\t#K\n", + "pa = 80. \t\t\t#kPa\n", + "r = 10.\n", + "k = 1.4\n", + "R = 8.3143\n", + "n = 5./29\n", + "cv = 20.93\n", + "\t\t\t\n", + "# Calculations\n", + "Qab = 0\n", + "tb = ta*r**(k-1)\n", + "va = R*ta/pa\n", + "vb = va/r\n", + "pb = R*tb/vb\n", + "Wab = -n*R*ta/(k-1) *((pb/pa)**((k-1)/k) -1)\n", + "vc = vb\n", + "Qbc = 500 \t\t\t#kJ\n", + "Wbc = 0\n", + "tc = tb+ Qbc/(n*cv)\n", + "pc = R*tc/vc\n", + "Qcd = 0\n", + "td = tc/r**(k-1)\n", + "vd = va\n", + "pd = td/tc*(vc/vd)*pc\n", + "Wcd = -n*R*tc/(k-1) *((pd/pc)**((k-1)/k)-1)\n", + "Wda = 0\n", + "Qda = n*cv*(ta-td)\n", + "eta0 = 1-1/r**(k-1)\n", + "\t\t\t\n", + "# Results\n", + "print \"Efficiency of cycle = %.3f\"%(eta0)\n", + "p = [pa, pb, pc, pd]\n", + "t = [ta, tb, tc, td]\n", + "Q = [Qab, Qbc, Qcd, Qda]\n", + "W = [Wab, Wbc, Wcd, Wda]\n", + "print ('Pressure (kPa) = ')\n", + "print (p)\n", + "print (\"Temperature (K) = \")\n", + "print (t)\n", + "print (\"Heat (kJ) = \")\n", + "print (Q)\n", + "print (\"Work done (kJ) = \")\n", + "print (W)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of cycle = 0.602\n", + "Pressure (kPa) = \n", + "[80.0, 2009.5091452076638, 2367.0758421853, 94.23498660179267]\n", + "Temperature (K) = \n", + "[310.0, 778.6847937679697, 917.2418888468039, 365.1605730819466]\n", + "Heat (kJ) = \n", + "[0, 500, 0, -199.05358527674872]\n", + "Work done (kJ) = \n", + "[-1679.6491296659615, 0, 1978.5214153723077, 0]\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 page : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "ta = 310. \t\t\t#K\n", + "tc = 917.3 \t\t\t#K\n", + "td = 365.2 \t\t\t#K\n", + "n = 0.602\n", + "k = 1.4\n", + "\t\t\t\n", + "# Calculations\n", + "lntb = 1/(1-n)/k\n", + "tb = tc- lntb*(td-ta)\n", + "rc = (tb/ta)**(1/(k-1))\n", + "\t\t\t\n", + "# Results\n", + "print \"Temperature at B = %.1f K\"%(tb)\n", + "print \" Compression ratio = %d \"%(rc)\n", + "print (\"The answer given in textbook for rc is wrong. please check using a calculator\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at B = 818.2 K\n", + " Compression ratio = 11 \n", + "The answer given in textbook for rc is wrong. please check using a calculator\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 page : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "pr = 4.\n", + "k = 1.4\n", + "ta = 298. \t\t\t#K\n", + "pa = 0.1 \t\t\t#Mpa\n", + "pdr = 0.01\n", + "tc = 900. \t\t\t#K\n", + "pri = 0.005 \t\t\t#Mpa\n", + "\t\t\t\n", + "# Calculations\n", + "pb = pr*pa\n", + "nji = 1- (pr)**((1-k)/k)\n", + "tb = ta*(pb/pa)**((k-1)/k)\n", + "pc = pb-pdr\n", + "pd = pa+pri\n", + "td = tc*(pd/pc)**((k-1)/k)\n", + "\t\t\t\n", + "# Results\n", + "p = [pa, pb, pc, pd]\n", + "t = [ta, tb, tc, td]\n", + "print \"ideal thermal efficiency = %.3f \"%(nji)\n", + "print (\"pressure (Mpa) = \")\n", + "print (p)\n", + "print (\"temperature (K) = \")\n", + "print (t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ideal thermal efficiency = 0.327 \n", + "pressure (Mpa) = \n", + "[0.1, 0.4, 0.39, 0.10500000000000001]\n", + "temperature (K) = \n", + "[298.0, 442.8262981628106, 900.0, 618.6157783525422]\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 page : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "sd = 4.9269\t\t\t#kJ/kg/K\n", + "sf = 1.1453\t\t\t#kJ/kg/K\n", + "sg = 7.5320\t\t\t#kJ/kg/K\n", + "hf = 359.86\t\t\t#kJ/kg\n", + "hg = 2653.5\t\t\t#kJ/kg\n", + "hd = 2409.7\t\t\t#kJ/kg\n", + "\t\t\t\n", + "# Calculations\n", + "x = (sd-sg)/(sf-sg)\n", + "he = x*hf+(1-x)*hg\n", + "etar = (hd-he)/(hd-hf)\n", + "\t\t\t\n", + "# Results\n", + "print \"Thermal efficiency = %.4f\"%(etar)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency = 0.3375\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23b page : 176 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "sd = 6.7039\t\t\t#kJ/kg/K\n", + "sf = 1.1453\t\t\t#kJ/kg/K\n", + "sg = 7.5320\t\t\t#kJ/kg/K\n", + "hf = 359.86\t\t\t#kJ/kg\n", + "hg = 2653.5\t\t\t#kJ/kg\n", + "hd = 3717.9\t\t\t#kJ/kg\n", + "\t\t\t\n", + "# Calculations\n", + "x = (sd-sg)/(sf-sg)\n", + "he = x*hf+(1-x)*hg\n", + "etar = (hd-he)/(hd-hf)\n", + "\t\t\t\n", + "# Results\n", + "print \"Thermal efficiency = %.4f\"%(etar)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency = 0.4055\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 page : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "ha = 2510.6 \t\t\t#kJ/kg\n", + "hd = 125.78 \t\t\t#kJ/kg\n", + "\t\t\t\n", + "# Calculations\n", + "kg = (10**6)/(ha-hd)\n", + "\t\t\t\n", + "# Results\n", + "print \"circulation rate = %d kg steam/h\"%(kg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "circulation rate = 419 kg steam/h\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 page : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "tin = 298. \t\t\t#K\n", + "tout = 273. \t\t\t#K\n", + "tout2 = 308. \t\t\t#K\n", + "tin2 = 294. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "eta1 = (tin-tout)/tin\n", + "eta2 = abs((tin2-tout2)/tin2)\n", + "\t\t\t\n", + "# Results\n", + "print \"Efficiency in case 1 = %.3f\"%(eta1)\n", + "print \" efficiency in case 2 = %.3f\"%(eta2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency in case 1 = 0.084\n", + " efficiency in case 2 = 0.048\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 page : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "ma = 500. \t\t\t#kg/h\n", + "cp1 = 3.2 \t\t\t#kJ/kg K\n", + "ta = 20. \t\t\t#C\n", + "mb = 200.\n", + "mc = 300. \t\t\t#kg/h\n", + "cp2 = 2.8 \t\t\t#kJ/kg K\n", + "tc = 80. \t\t\t#C\n", + "tb = 80. \t\t\t#C\n", + "me = 50. \t\t\t#kg/h\n", + "te = 120. \t\t\t#C\n", + "td = 120. \t\t\t#C\n", + "hg = 503.7\n", + "he = 2706.3\n", + "\n", + "# Calculations\n", + "Ws = (mb+me)*hg + mc*cp2*(tc) - me*he -ma*cp1*(ta)\n", + "\t\t\t\n", + "# Results\n", + "print \"Net work done = %d kJ/h\"%(Ws)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net work done = 25810 kJ/h\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27 page : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "hc = 150. \t\t\t#Btu/lb\n", + "he = -115. \t\t\t#Btu/lb\n", + "hg = 168. \t\t\t#Btu/lb\n", + "\t\t\t\n", + "# Calculations\n", + "frac = (hg-hc)/(hg-he)\n", + "\t\t\t\n", + "# Results\n", + "print \"Fraction of solid = %.3f\"%(frac)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of solid = 0.064\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 page : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "H = 2696.5 \t\t\t#kJ/kg\n", + "hg = 2706.7 \t\t\t#kJ/kg\n", + "hf = 504.7 \t\t\t#kJ/kg\n", + "\t\t\t\n", + "# Calculations\n", + "x = (H-hf)/(hg-hf)\n", + "x2 = 1\n", + "\t\t\t\n", + "# Results\n", + "print \"In case 1, fraction of vapor = %.3f\"%(x)\n", + "print \" In case 2, fraction of vapor = %.3f\"%(x2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1, fraction of vapor = 0.995\n", + " In case 2, fraction of vapor = 1.000\n" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch5.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch5.ipynb new file mode 100755 index 00000000..9c3f32b2 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch5.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c42287d60d2420025e9cb75cd5a29fe499f8ec6aad7d7b81c5d1437599962d5d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Relationships among thermodynamic properties - Graphical representation of properties and processes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 page : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve\n", + "\t\t\t\n", + "# Variables\n", + "R = 8314.3\n", + "b = 0.0306 \t\t\t#m**3/kmol\n", + "a = 0.548*10**6 \t\t\t#pa m**6/kmol**6\n", + "T = 973.1\n", + "P = 25*10**6 \t\t\t#Pa\n", + "\t\t\t\n", + "# Calculations\n", + "Vi = R*T/P\n", + "#x = poly(0,'x')\n", + "def f(x):\n", + " return P*x**2 *(x-b) +a*(x-b) - R*T*(x**2)\n", + "#vec = roots(P*x**2 *(x-b) +a*(x-b) - R*T*(x**2))\n", + "#vec = roots([P,(P*b+R*T),a,-a*b])\n", + "vec = fsolve(f,0,full_output=1)\n", + "volume = vec[0]\n", + "dH = 8.0906*10**6 -P*volume +0.548*10**6 /volume\n", + "\t\t\t\n", + "# Results\n", + "print \"Change in enthalpy = %.2e J/kmol\"%(dH)\n", + "\n", + "\n", + "# Note : Answer is different because fsolve function calculates differently. Please check manually.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in enthalpy = 2.21e+07 J/kmol\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch7.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch7.ipynb new file mode 100755 index 00000000..8c1eb232 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch7.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:20736bf3d0b99872401315f1d4792e0a0a693067ab204fabe4415026bbd6d5a0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Solution Properties and Physical Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 page : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "T = 154.5 \t\t\t#C\n", + "P = 8620.*10**3 \t\t\t#Pa\n", + "Tc = 135. \t\t\t#C\n", + "T0 = 273.1 \t\t\t#C\n", + "Pc = 3648.*10**3 \t\t\t#Pa\n", + "w = 0.1756\n", + "V = 0.154 \n", + "R = 8.3143*10**3\n", + "\t\t\t\n", + "# Calculations\n", + "Tr = (T+T0)/(T0+Tc)\n", + "Pr = P/Pc\n", + "Z = P*V/(R*(T+T0))\n", + "a = 0.42747*R**2 *(Tc+T0)**2 /Pc *(1+ (0.48508 + 1.55171*w - 0.15613*w**2)*(1-math.sqrt(Tr)))**2\n", + "b = 0.08664*R*(Tc+T0)/Pc\n", + "A = a*P/(R**2 *(T+T0)**2)\n", + "B = b*P/(R*(T+T0))\n", + "lnphi = (Z-1) - math.log(Z-B) - A/B *math.log((Z+B)/Z) \n", + "phi = math.exp(lnphi)\n", + "f = phi*P\n", + "\t\t\t\n", + "# Results\n", + "print \"fugacity = %d kPa\"%(f/10**3)\n", + "\t\t\t#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fugacity = 3824 kPa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 page : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "T = 154.5 \t\t\t#C\n", + "P = 8620.*10**3 \t\t\t#Pa\n", + "Tc = 135. \t\t\t#C\n", + "T0 = 273.1 \t\t\t#C\n", + "Pc = 3648.*10**3 \t\t\t#Pa\n", + "w = 0.1756\n", + "V = 0.154 \n", + "R = 8.3143*10**3\n", + "D = 0.35\n", + "Vc = 0.263 \t\t\t#m**3/kmol\n", + "\t\t\t\n", + "# Calculations\n", + "Tr = (T+T0)/(T0+Tc)\n", + "Pr = P/Pc\n", + "Zc = Pc*Vc/(R*(Tc+T0))\n", + "phi1 = 0.44\n", + "phi2 = phi1*10**(D*(Zc-0.27))\n", + "f = phi2*P\n", + "\t\t\t\n", + "# Results\n", + "print \"fugacity = %d kPa\"%(f/10**3)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fugacity = 3832 kPa\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 page : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "f0 = 0.7\n", + "V = 5.1e-2\n", + "P1 = 0.77 \t\t\t#Mpa\n", + "P2 = 10. \t\t\t#Mpa\n", + "R = 8.3143*10**3\n", + "T = 298. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "lnr = V/(R*T) *(P2-P1)*10**6\n", + "f = math.exp(lnr) *f0\n", + "\t\t\t\n", + "# Results\n", + "print \"Fugacity = %.3f Mpa\"%(f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fugacity = 0.846 Mpa\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 page : 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "Pt = 0.1013\n", + "ya = 0.605\n", + "P1 = 0.1373\n", + "P2 = 0.06\n", + "xa = 0.4\n", + "\t\t\t\n", + "# Calculations\n", + "if ya*Pt == xa*Pt and (1-ya)*Pt == (1-xa)*Pt:\n", + " print \"The system is ideal\"\n", + "else:\n", + " print \"The system is not ideal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The system is not ideal\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 page : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "Y = 0.06\n", + "X = 0.0012\n", + "P = 2.53 \t\t\t#Mpa\n", + "\t\t\t\n", + "# Calculations\n", + "y = Y/(1+Y)\n", + "x = X/(1+X)\n", + "H = y*P/x\n", + "\t\t\t\n", + "# Results\n", + "print \"Henrys law constant = %.2f Mpa\"%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Henrys law constant = 119.48 Mpa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 page : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "Hi = 55.\n", + "Pi = 11.8\n", + "xi = 0.514\n", + "H2 = 18.1\n", + "H3 = 26.9\n", + "Pi2 = 17.4\n", + "\t\t\t\n", + "# Calculations\n", + "ai = Pi/Hi\n", + "gam = ai/xi\n", + "a2 = Pi/H2\n", + "gam2 = a2/xi\n", + "a3 = Pi2/H3\n", + "gam3 = a3/(1-xi)\n", + "\t\t\t\n", + "# Results\n", + "print (\"part a\")\n", + "print \"Activity of acetic acid = %.4f \"%(ai)\n", + "print \" Activity coefficient = %.4f \"%(gam)\n", + "\n", + "print (\"part b\")\n", + "print \"Activity of acetic acid = %.4f \"%(a2)\n", + "print \" Activity coefficient = %.4f \"%(gam2)\n", + "\n", + "print (\"part c\")\n", + "print \"Activity of toluene = %.4f \"%(a3)\n", + "print \" Activity coefficient = %.4f \"%(gam3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part a\n", + "Activity of acetic acid = 0.2145 \n", + " Activity coefficient = 0.4174 \n", + "part b\n", + "Activity of acetic acid = 0.6519 \n", + " Activity coefficient = 1.2684 \n", + "part c\n", + "Activity of toluene = 0.6468 \n", + " Activity coefficient = 1.3309 \n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch8.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch8.ipynb new file mode 100755 index 00000000..4c26dfce --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch8.ipynb @@ -0,0 +1,540 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b2ee1c3d3e88f5241245b2aaba0096c6b15a6abe1de87d5ab25de8744d1af1f8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Physical Equilibria Among Phases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 page : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "def func(C,phi):\n", + " return C+2-phi\n", + "\n", + "# Calculations and results\n", + "print (\"part a\")\n", + "print \"degrees of freedom = %d \"%(func(2,2))\n", + "print (\"part b\")\n", + "print \"degrees of freedom = %d \"%(func(3,2))\n", + "print (\"part c\")\n", + "print \"degrees of freedom = %d \"%(func(3,3))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part a\n", + "degrees of freedom = 2 \n", + "part b\n", + "degrees of freedom = 3 \n", + "part c\n", + "degrees of freedom = 2 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 page : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "T = 95. \t\t\t#C\n", + "P = 1013. \t\t\t#kPa\n", + "Tc = 135. \t\t\t#C\n", + "Pc = 3648. \t\t\t#kPa\n", + "T0 = 273.1 \t\t\t#C\n", + "D = 0.3\n", + "P0 = 1800. \t\t\t#kPa\n", + "D2 = 0.42\n", + "\t\t\t\n", + "# Calculations\n", + "Zc = 0.283\n", + "Tr = (T+T0)/(Tc+T0)\n", + "Pr = P/Pc\n", + "phic = 0.88\n", + "phi2 = phic*10**(D*0.013)\n", + "Prd = P0/Pc\n", + "phi3 = 0.78\n", + "phi4 = phi3*10**(D2*0.013)\n", + "gl = phi2*P/(phi3*P0)\n", + "\t\t\t\n", + "# Results\n", + "print \"equation is gl = %.3f *y/x\"%(gl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equation is gl = 0.641 *y/x\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 page :300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "ye = 0.434\n", + "Pt = 40.25 \t\t\t#kPa\n", + "xe = 0.616\n", + "Pe1 = 22.9 \t\t\t#kPa\n", + "Pe2 = 29.6 \t\t\t#kPa\n", + "\t\t\t\n", + "# Calculations\n", + "ge = ye*Pt/(xe*Pe1)\n", + "gb = (1-ye)*Pt/((1-xe)*Pe2)\n", + "E = math.log10(ge) *(1+ (1-xe)*math.log(gb) /(xe*math.log(ge)))**2\n", + "B = math.log10(gb) *(1+ xe/(1-xe) *math.log(ge) /math.log(gb))**2\n", + "xe2 = 0.4\n", + "xb2 = 0.6\n", + "lnge2 = E/(1+ E*xe2/(B*xb2))**2\n", + "lngb2 = B/(1+ B*xb2/(E*xe2))**2\n", + "ge2 = 10**(lnge2)\n", + "gb2 = 10**(lngb2)\n", + "Pt1 = ge2*Pe1\n", + "Pt2 = gb2*Pe2\n", + "\t\t\t\n", + "# Results\n", + "print \"Total pressure in case 1 = %.2f kPa and in case 2 = %.2f kPa\"%(Pt1, Pt2 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in case 1 = 40.78 kPa and in case 2 = 40.93 kPa\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 page : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import solve\n", + "\t\t\t\n", + "# Variables\n", + "k4 = 1.8\n", + "k5 = 0.8\n", + "\t\t\t\n", + "# Calculations\n", + "A = [[k4, k5],[1, 1]]\n", + "b = [[1],[1]]\n", + "C = solve(A,b)\n", + "x4 = C[0]\n", + "x5 = C[1]\n", + "y4 = k4*x4\n", + "y5 = k5*x5\n", + "\t\t\t\n", + "# Results\n", + "print \"Vapor and liquid mole fractions of component 1 = %.2f and %.2f respectively\"%(y4,x4)\n", + "print \" Vapor and liquid mole fractions of component 2 = %.2f and %.2f respectively\"%(y5,x5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vapor and liquid mole fractions of component 1 = 0.36 and 0.20 respectively\n", + " Vapor and liquid mole fractions of component 2 = 0.64 and 0.80 respectively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 page : 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "v1 = 81. \t\t\t#cm**3/gmol\n", + "v2 = 97. \t\t\t#cm**3/gmol\n", + "d1 = 9.2 \t\t\t#(cal/cm**3)**0.5\n", + "d2 = 8.6 \t\t\t#(cal/cm**3)**0.5\n", + "R = 1.987\n", + "T = 373.1 \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "d = 0.5*(d1+d2)\n", + "lng1 = v1*(d1-d)**2 /(R*T)\n", + "lng2 = v2*(d2-d)**2 /(R*T)\n", + "g1 = math.exp(lng1)\n", + "g2 = math.exp(lng2)\n", + "\t\t\t\n", + "# Results\n", + "print \"Activity coeffecients of components are %.3f and %.3f respectively\"%(g1,g2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Activity coeffecients of components are 1.010 and 1.012 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 page : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "xe = 0.3\n", + "xe2 = 0.9\n", + "Pe0 = 810.\n", + "Pa0 = 470.\n", + "ge = 1.85\n", + "ge2 = 1.05\n", + "ga = 1.15\n", + "ga2 = 3.\n", + "Pt = 820. \t\t\t#mm\n", + "Pt2 = 900. \t\t\t#mm\n", + "\t\t\t\n", + "# Calculations\n", + "ye = ge*xe*Pe0/Pt\n", + "ya = ga*(1-xe)*Pa0/Pt\n", + "yt = ye+ya\n", + "ye2 = ye/yt\n", + "ya2 = ya/yt\n", + "ye3 = ge2*xe2*Pe0/Pt2\n", + "ya3 = ga2*(1-xe2)*Pa0/Pt2\n", + "yt2 = ye+ya\n", + "ye4 = ye3/yt2\n", + "ya4 = ya3/yt2\n", + "\t\t\t\n", + "# Results\n", + "print \"In case 1, ye = %.3f and ya = %.3f\"%(ye2,ya2)\n", + "print \" In case 1, ye = %.3f and ya = %.3f\"%(ye4,ya4)\n", + "print ('The calculations of ya in case 1 in textbook is wrong. please use a calculator')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1, ye = 0.543 and ya = 0.457\n", + " In case 1, ye = 0.842 and ya = 0.155\n", + "The calculations of ya in case 1 in textbook is wrong. please use a calculator\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 page : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "m1 = 121.\n", + "m2 = 18.\n", + "p1 = 0.0042\n", + "p2 = 0.0858\n", + "\t\t\t\n", + "# Calculations\n", + "massfrac = (p1*m1)/(p1*m1+p2*m2)\n", + "\t\t\t\n", + "# Results\n", + "print \"mass fractions of DMA and water are %.3f and %.3f respectively\"%(massfrac,1-massfrac)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass fractions of DMA and water are 0.248 and 0.752 respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 page : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\t\t\t\n", + "# Variables\n", + "FR = 25.\n", + "FE = 19.\n", + "bf = 130. \t\t\t#kg\n", + "af = 85. \t\t\t#kg\n", + "\t\t\t\n", + "# Calculations\n", + "law = FR/FE\n", + "x1 = 45./150\n", + "x2 = 65./150\n", + "ER = 18.5/6\n", + "e = array([0.5, 0.1, 0.9])\n", + "r = array([0.28, 0.96, 0.04])\n", + "et = sum(e)\n", + "rt = sum(r)\n", + "ett = e/et\n", + "rtt = r/rt\n", + "\t\t\t\n", + "# Results\n", + "print \"the compositions of raffinate are \",\n", + "print (rtt)\n", + "print \"the compositions of extract are\",\n", + "print (ett)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the compositions of raffinate are [ 0.21875 0.75 0.03125]\n", + "the compositions of extract are [ 0.33333333 0.06666667 0.6 ]\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 page : 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "v1 = 0.1316\n", + "v2 = 0.2941\n", + "x1 = 0.5\n", + "x2 = 0.2\n", + "x3 = 0.8 \n", + "d1 = 14.87\n", + "d2 = 16.34\n", + "\t\t\t\n", + "# Calculations and results\n", + "vm = x1*(v1+v2)\n", + "phi1 = x1*v1/vm\n", + "phi2 = (1-x1)*v2/vm\n", + "Hl1 = vm*phi1*phi2*(d1-d2)**2 *10**3\n", + "print (\"case 1\")\n", + "print \"enthalpy = %.1f kJ/mol\"%(Hl1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case 1\n", + "enthalpy = 98.2 kJ/mol\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10b page : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "v1 = 0.1316\n", + "v2 = 0.2941\n", + "x1 = 0.5\n", + "x2 = 0.2\n", + "x3 = 0.8 \n", + "d1 = 14.87\n", + "d2 = 16.34\n", + "\t\t\t\n", + "# Calculations and results\n", + "vm = (1-x2)*v1+x2*v2\n", + "phi1 = (1-x2)*v1/vm\n", + "phi2 = (x2)*v2/vm\n", + "Hl2 = vm*phi1*phi2*(d1-d2)**2 *10**3\n", + "print (\"case 2\")\n", + "print \"enthalpy = %.1f kJ/mol\"%(Hl2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case 2\n", + "enthalpy = 81.5 kJ/mol\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10c page : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "v1 = 0.1316\n", + "v2 = 0.2941\n", + "x1 = 0.5\n", + "x2 = 0.2\n", + "x3 = 0.8 \n", + "d1 = 14.87\n", + "d2 = 16.34\n", + "\t\t\t\n", + "# Calculations and results\n", + "vm = (1-x3)*v1+x3*v2\n", + "phi1 = (1-x3)*v1/vm\n", + "phi2 = (x3)*v2/vm\n", + "Hl3 = vm*phi1*phi2*(d1-d2)**2 *10**3\n", + "print (\"case 3\")\n", + "print \"enthalpy = %.1f kJ/mol\"%(Hl3)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case 3\n", + "enthalpy = 51.2 kJ/mol\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch9.ipynb b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch9.ipynb new file mode 100755 index 00000000..48832bc1 --- /dev/null +++ b/Chemical_Engineering_Thermodynamics_by_T._E._Daubert/ch9.ipynb @@ -0,0 +1,684 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:96bec67660df87f03597152ea9aebaa9244c05006b79d30c85f08e05c1a87e20" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Chemical Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1.A page : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "g11 = 178900 \t\t\t#kJ/kmol\n", + "g12 = 207037 \t\t\t#kJ/kmol\n", + "g21 = 211852 \t\t\t#kJ/kmol\n", + "g22 = 228097 \t\t\t#kJ/kmol\n", + "\t\t\t\n", + "# Calculations\n", + "dG = g21-g11\n", + "\t\t\t\n", + "# Results\n", + "print \"Standard free energy change = %d kJ/kmol\"%(dG)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard free energy change = 32952 kJ/kmol\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1B page : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "m1 = 54.1\n", + "m2 = 56.1\n", + "m3 = 2.\n", + "cp1 = 2.122 \t\t\t#kJ/kmol K\n", + "cp2 = 2.213 \t\t\t#kJ/kmol K\n", + "cp3 = 14.499 \t\t\t#kJ/kmol K\n", + "hf1 = 110200. \t\t\t#kJ/kmol\n", + "hf2 = -126. \t\t\t#kJ/kmol\n", + "T = 700. \t\t\t#K\n", + "Ts = 298. \t \t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "hf = hf1-hf2\n", + "cpn = cp1*m1-cp2*m2+cp3*m3\n", + "h700 = hf+ cpn*(T-Ts)\n", + "s298 = 103.7\n", + "s700 = s298 + cpn*math.log(T/Ts)\n", + "G700 = h700-T*s700\n", + "\t\t\t\n", + "# Results\n", + "print \"Change in gibbs energy = %d kJ/kmol\"%(G700)\n", + "print (\"The answer is a bit different due to rounding off error in textbook\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in gibbs energy = 33888 kJ/kmol\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 9.2 page : 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables\n", + "g1 = 150670. \t\t\t#kJ/kmol\n", + "g2 = 71500. \t\t\t#kJ/kmol\n", + "R = 8.314\n", + "Ts = 298. \t\t\t#K\n", + "T = 700. \t\t\t#K\n", + "\n", + "#calculation\n", + "G = g1-g2\n", + "G2 = 33875 \t\t\t#kJ/kmol\n", + "K1 = math.exp(-G/R/Ts)\n", + "K2 = math.exp(-G2/R/T)\n", + "\t\t\t\n", + "# Results\n", + "print \"In case 1, equilibrium constant = %.2e\"%(K1)\n", + "print \" In case 2, equilibrium constant = %.5f\"%(K2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1, equilibrium constant = 1.33e-14\n", + " In case 2, equilibrium constant = 0.00297\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 page : 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\t\t\t\n", + "# Variables\n", + "R = 8.3143\n", + "T1 = 1273 \t\t\t#K\n", + "T2 = 2273 \t\t\t#K\n", + "k2 = 0.0018\n", + "A = 123.94\n", + "B = 7.554\n", + "C = 8.552*10**-3\n", + "D = -13.25e-6\n", + "E = 7.002e-9\n", + "F = 13.494e-13\n", + "\t\t\t\n", + "# Calculations\n", + "def cp(T):\n", + " return A/T**2 +B/T +C +D*T +E*T**2 -F*T**3\n", + "\n", + "\n", + "lnk = 1/R * quad(cp,T1,T2)[0]\n", + "k1 = k2/ math.exp(lnk)\n", + "\t\t\t\n", + "# Results\n", + "print \"Equilibrium constant = %.5f \"%(k1)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium constant = 0.00112 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 page : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.optimize import fsolve\n", + "\t\t\t\n", + "# Variables\n", + "G = -30050. \t\t\t#kJ/kmol\n", + "R = 8.314\n", + "T = 573. \t\t\t#K\n", + "\t\t\t\n", + "# Calculations\n", + "lnk = G/(R*T)\n", + "k = math.exp(lnk)\n", + "\n", + "def f(x):\n", + " return 4*x**2 - k*(1-x)**2\n", + "\n", + "vec = fsolve(f,0,full_output=1)\n", + "\n", + "x2 = vec[0]\n", + "# Results\n", + "print \"Mole fraction of HCN = %.4f\"%(x2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mole fraction of HCN = 0.0209\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4B page : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\t\t\t\n", + "# Variables\n", + "G = -30050. \t\t\t#kJ/kmol\n", + "R = 8.314\n", + "T = 573. \t\t\t#K\n", + "phi1 = 0.980\n", + "phi2 = 0.915\n", + "phi3 = 0.555\n", + "\t\t\t\n", + "# Calculations\n", + "lnk = G/(R*T)\n", + "k = math.exp(lnk)\n", + "kexp = k*phi1*phi2/phi3**2 /4\n", + "vec = roots([1-kexp,2*kexp,-kexp])\n", + "x2 = vec[1]\n", + "\t\t\t\n", + "# Results\n", + "print \"Mole fraction of HCN = %.4f\"%(x2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mole fraction of HCN = 0.0351\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 page : 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.optimize import fsolve\n", + "\t\t\t\n", + "# Variables\n", + "kp = 74.\n", + "kp2 = kp**2\t\t\t\n", + "# Calculations\n", + "def fun(f):\n", + " return f**2 *(100-6*f) - kp**2 *(1-f)**2 *(9-6*f)\n", + "\n", + "vec = fsolve(fun,0,full_output=1)\n", + "fn = vec[0]\n", + "\t\t\t\n", + "# Results\n", + "print \"Fractional conversion = %.3f\"%(fn)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fractional conversion = 0.934\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 page : 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "C = 3.\n", + "phi = 3.\n", + "R = 1.\n", + "Sc = 0.\n", + "\n", + "def fun(C,phi,R,Sc):\n", + " return 2+C-phi-R-Sc\n", + "\t\t\t\n", + "# Calculations\n", + "V = fun(C,phi,R,Sc)\n", + "\t\t\t\n", + "# Results\n", + "print \"Degrees of freedom = %d \"%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degrees of freedom = 1 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6B page : 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "C = 3.\n", + "phi = 1.\n", + "R = 1.\n", + "Sc = 1.\n", + "\n", + "def fun(C,phi,R,Sc):\n", + " return 2+C-phi-R-Sc\n", + "\n", + "# Calculations\n", + "V = fun(C,phi,R,Sc)\n", + "\t\t\t\n", + "# Results\n", + "print \"Degrees of freedom = %d \"%(V)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degrees of freedom = 2 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6C page : 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "C = 6.\n", + "phi = 1.\n", + "R = 3.\n", + "Sc = 0.\n", + "\n", + "def fun(C,phi,R,Sc):\n", + " return 2+C-phi-R-Sc\n", + "\n", + "\t\t\t\n", + "# Calculations\n", + "V = fun(C,phi,R,Sc)\n", + "\t\t\t\n", + "# Results\n", + "print \"Degrees of freedom = %d \"%(V)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degrees of freedom = 4 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 page : 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables\n", + "a1 = 0.956\n", + "y = 0.014\n", + "x = 0.956\n", + "M = 18.\n", + "z = 0.475\n", + "P = 8.37 \t\t\t#Mpa\n", + "\t\t\t\n", + "# Calculations\n", + "m = y/(x*M) *10**3\n", + "w = 0.0856\n", + "phi1 = -0.04\n", + "phi2 = 0.06\n", + "phi = 10**(phi1+ w*phi2)\n", + "f = z*phi*P\n", + "K = m/(f*a1)\n", + "\t\t\t\n", + "# Results\n", + "print \"Equilibrium constant = %.3f\"%(K)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium constant = 0.232\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 page : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\t\t\t\n", + "# Variables\n", + "y = 0.18\n", + "z = 0.6\n", + "\t\t\t\n", + "# Calculations\n", + "mole = array([1-y-z, 5-y-2*z, y, 3*y+4*z, z])\n", + "s = sum( mole)\n", + "molef = mole/s\n", + "\t\t\t\n", + "# Results\n", + "print \"Product composition moles = \",\n", + "print (mole)\n", + "print \"Mole fraction = \",\n", + "print (molef)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Product composition moles = [ 0.22 3.62 0.18 2.94 0.6 ]\n", + "Mole fraction = [ 0.02910053 0.47883598 0.02380952 0.38888889 0.07936508]\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 page : 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol,solve\n", + "\t\t\t\n", + "# Variables\n", + "kp = 1.09\n", + "\t\t\t\n", + "# Calculations\n", + "x = Symbol('x')\n", + "vec = solve(kp/4**4 /4 *(1-x)*(5-2*x)**2 *(6+2*x)**2 -x**5)\n", + "x = vec[0]\n", + "pro = [1-x, 5-2*x, x, 4*x, 0]\n", + "\t\t\t\n", + "# Results\n", + "print \"Equlibrium composition (moles) = \",\n", + "print (pro)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equlibrium composition (moles) = [0.273026192093833, 3.54605238418767, 0.726973807906167, 2.90789523162467, 0]\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10B page : 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "from scipy.optimize import fsolve\n", + "\t\t\t\n", + "# Variables\n", + "kp = 1.09\n", + "kp2 = 0.154\n", + "feed = array([ 1, 5, 0, 0, 0 ])\n", + "\t\t\t\n", + "# Calculations\n", + "\n", + "def f1(x):\n", + " return kp/4**4 /4 *(1-x)*(5-2*x)**2 *(6+2*x)**2 -x**5\n", + "\n", + "vec = fsolve(f1,0,full_output=1)[0]\n", + "x = vec[0]\n", + "pro = feed - array([x, 2*x, -x, -4*x, 0])\n", + "\n", + "def f2(y):\n", + " return kp2*(0.273-y)*(0.727-y)*(7.454+2*y)**2 - 4*y**2 *(2.908+2*y)**2 *4\n", + "\n", + "vec2 = fsolve(f2,0,full_output=1)[0] \n", + "y = vec2[0]\n", + "pro2 = pro- array([ y, 0, y, -2*y, -2*y])\n", + "\n", + "def f3(z):\n", + " return kp*(0.189-z)*(3.546-2*z)**2 *(7.622+2*z)**2 -(0.643+z)*(3.076+4*z)**4 *4\n", + " \n", + "vec3 = fsolve(f3,0,full_output=1)[0]\n", + "z = vec3[0]\n", + "pro3 = pro2 - array([z, 2*z, -z, -4*z, 0])\n", + "\n", + "def f4(w):\n", + " return kp2*(0.229-w)*(0.603-w)*(7.542+2*w) - (2.916+2*w)**2 *(0.168+2*w)**2 *4\n", + "\n", + "vec4 = fsolve(f4,0,full_output=1)[0]\n", + "w = vec4[0]\n", + "w = 0.01\n", + "pro4 = pro3 - array([w, 0, w, -2*w, -2*w])\n", + "\t\t\t\n", + "# Results\n", + "print \"feed = \",\n", + "print (feed)\n", + "print \"After reactor 1,\",\n", + "print (pro)\n", + "print \"After reactor 2,\",\n", + "print (pro2)\n", + "print \"After reactor 3,\",\n", + "print (pro3)\n", + "print \"After reactor 4\",\n", + "print (pro4)\n", + "print (\"The answers are a bit different due to rounding off error in textbook\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feed = [1 5 0 0 0]\n", + "After reactor 1, [ 0.27302619 3.54605238 0.72697381 2.90789523 0. ]\n", + "After reactor 2, [ 0.18846228 3.54605238 0.6424099 3.07702305 0.16912782]\n", + "After reactor 3, [ 0.22284245 3.61481272 0.60802973 2.93950238 0.16912782]\n", + "After reactor 4 [ 0.21284245 3.61481272 0.59802973 2.95950238 0.18912782]\n", + "The answers are a bit different due to rounding off error in textbook\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt b/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt new file mode 100644 index 00000000..9612c709 --- /dev/null +++ b/Computer_Programming,_Theory_and_Practice_by_T_Jeyapoovan/README.txt @@ -0,0 +1,10 @@ +Contributed By: Priyanka Kumar +Course: be +College/Institute/Organization: Sona College Of Technology,Salem,Tamil Nadu +Department/Designation: Computer Science And Engineering +Book Title: Computer Programming, Theory and Practice +Author: T Jeyapoovan +Publisher: Vikas Publishing House Pvt Ltd, Noida +Year of publication: 2008 +Isbn: 81-259-2158-3 +Edition: 1 \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch10.png b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch10.png new file mode 100755 index 00000000..ddb55256 Binary files /dev/null and b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch10.png differ diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch11.png b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch11.png new file mode 100755 index 00000000..fbbe9e85 Binary files /dev/null and b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch11.png differ diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch6.png b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch6.png new file mode 100755 index 00000000..5fdd7cbf Binary files /dev/null and b/Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/ch6.png differ diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch10.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch10.ipynb new file mode 100755 index 00000000..ad62a56a --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch10.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a951bca59afca6e246f5da2ffc1465ed3d7457760d6d4747a778b92b4eb41d0e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Absorption" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2.1 pg : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "c = 0.92\n", + "F = 93 \t# ft**-1\n", + "nu = 2 \t# cs\n", + "dl = 63 \t# lb/ft**3\n", + "dg = 2.8 \t# lb/ft**3\n", + "G = 23 \t#lb/sex\n", + "\t\n", + "#Calculations\n", + "G11 = c*((dl-dg)**0.5)/(((F)**0.5)*(nu**0.05))\t# lb/ft**2-sec\n", + "A = G/G11\t# ft**2\n", + "d = math.sqrt(4*A/math.pi)\t#ft\n", + "\t\n", + "#Results\n", + "print \"The diameter of the tower is %.1f ft\"%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diameter of the tower is 6.4 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3.1 pg : 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "G = 2.3 \t # Gas flow in gmol/sec\n", + "L = 4.8 \t # Liquid flow in gmol/sec\n", + "y0 = 0.0126 \t# entering gas Mole fraction of CO2\n", + "yl = 0.0004 \t# Exiting gas mole fraction of CO2 \n", + "xl = 0. \t# Exiting liquid mole fraction of CO2\n", + "d = 40. \t# Diameter of the tower in cm\n", + "x0star = 0.0080\t# if the amine left in equilibrium with the entering gas would contain 0.80 percent C02\n", + "Kya = 5.*10**-5 \t# Overall M.T.C and the product times the area per volume in gmol/cm**3-sec\n", + "\t\n", + "#Calculations\n", + "A =math.pi*(d**2)/4\n", + "x0 = ((G*(y0-yl))/(L)) + xl \t# Entering liquid mole fraction of CO2\n", + "m = y0/x0star \t# Equilibirum consmath.tant\n", + "c1 = G/(A*Kya)\n", + "c2 = 1/(1-(m*G/L))\n", + "c3 = math.log((y0-m*x0)/(yl-m*xl))\n", + "l = (G/(A*Kya))*(1/(1-((m*G)/L)))*(math.log((y0-m*x0)/(yl-m*xl)))/100 \t#length of the tower in metres\n", + "\t\n", + "#Results\n", + "print \"The length of the tower is %.1f m\"%(l)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of the tower is 3.2 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3.2 pg : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "l = 200. \t# Length of the tower in cm\n", + "d = 60. \t# diameter of the tower\n", + "Lf = 300. \t# Liquid flow in cc/sec\n", + "Kx = 2.2*10**-3 \t# dominant transfer co efficient in liquid in cm/sec\n", + "\t\n", + "#Calculations\n", + "A = math.pi*60*60/4 \t# Area of the cross section in sq cm\n", + "L = Lf/A \t# Liquid flux in cm**2/sec\n", + "ratio = 1/(math.exp((l*Kx)/L))\n", + "percentage = (1-ratio)*100 \t# Percentage removal of Oxygen\n", + "\t\n", + "#Results\n", + "print \"the percentage of oxygen we can remove is %.1f\"%(percentage)\n", + "\n", + "# Rounding of error in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the percentage of oxygen we can remove is 98.4\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4.1 pg : 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "y1in = 0.37 \t# mole fraction of Ammonia in gas mixture entering\n", + "y2in =0.16 \t# mole fraction of nitrogen in gas mixture entering\n", + "y3in = 0.47 \t# mole fraction of hydrogen in gas mixture entering\n", + "x1out = 0.23 \t# mole fraction of Ammonia in liquid coming out\n", + "y1out = 0.01 \t# mole fraction of ammonia in gas coming out\n", + "G0 = 1.20 \t # Gas glow entering in m**3/sec\n", + "Mu = 1.787*0.01*0.3048/2.23 \t# liquid viscousity in american units\n", + "dl = 62.4 \t# Density of liquid in lb/ft**3\n", + "KG = 0.032 \t# Overall m.t.c in gas phase in gas side m/sec\n", + "a = 105 \t# surface area in m**2/m**3\n", + "gc = 32.2 \t# acceleration due to gravity in ft/sec**2\n", + "dg = 0.0326 \t# Density of gas in lb/ft**3\n", + "#Molecular weights of Ammonia , N2 , H2\n", + "M1 = 17.\n", + "M2 = 28.\n", + "M3 = 2.\n", + "Nu = 1. \t# Viscousity \n", + "\t\n", + "#Calculations\n", + "AG0 = (y2in+y3in)*G0/22.4 \t# Total flow of non absorbed gases in kgmol/sec\n", + "ANH3 = y1in*G0/22.4- (y1out*AG0)/(1-y1out) \t# Ammonia absorbed kgmol/sec\n", + "AL0 = ((1-x1out)/x1out)*ANH3 \t# the desired water flow in kgmol/sec\n", + "avg1 = 11.7 \t# Average mol wt of gas\n", + "avg2 = 17.8 \t# avg mol wt of liquid\n", + "TFG = avg1*AG0/(y2in+y3in)\t#Total flow of gas in kg/sec\n", + "TFL = avg2*AL0/(1-x1out)\t#total flow of liquid in kg/sec\n", + "F = 45 \t# Packing factor\n", + "GFF = 1.3*((dl-dg)**0.5)/((F**0.5)*(Nu**0.05))\t# Flux we require in lb/ft**2-sec\n", + "GFF1 = GFF*0.45/(0.3**2) \t# in kg/m**2-sec (answer wrong in textbook)\n", + "Area = TFG/GFF1 \t# Area of the cross section of tower\n", + "dia = (math.sqrt(4*Area/math.pi)) \t# diameter in metres\n", + "HTU = (22.4*AG0/math.pi*dia**2)/(KG*a*4)\n", + "NTU = 5555\n", + "l = HTU*NTU \t# Length of the tower\n", + "\t\n", + "#Results\n", + "print \"The flow of pure water into the top of the tower %.4f kgmol/sec\"%(AL0)\n", + "print \" The diameter of the tower is %.1f m\"%(dia)\n", + "print \" The length of the tower is %.f m\"%(l)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flow of pure water into the top of the tower 0.0652 kgmol/sec\n", + " The diameter of the tower is 0.3 m\n", + " The length of the tower is 10 m\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch11.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch11.ipynb new file mode 100755 index 00000000..70c005f5 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch11.ipynb @@ -0,0 +1,158 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c2e1e4cccf2d9aca534f83236caf6ed750d17019460faa04493688b33133a3e9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Mass Transfer in Biology and Medicine" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1.1 pg : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "N1 = 1.6*10**-10 \t# mol/cm**2-sec\n", + "c1star = 0. \t# mol/cc\n", + "c1 = 2.7*10**-4/1000 \t# mol/cc\n", + "\t\n", + "#Calculations\n", + "K = N1/(c1-c1star)\t# cm/sec\n", + "\t\n", + "#Results\n", + "print \"The mass transfer co efficient is %.e cm/sec\"%(K)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass transfer co efficient is 6e-04 cm/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2.1 pg : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "d = 400.*10**-4 \t# cm\n", + "D = 10.**-5 \t# cm**2/sec\n", + "v = 1. \t# cm/sec\n", + "l = 30. \t# cm\n", + "nu = 0.01 \t# cm**2/sec\n", + "\t\n", + "#Calculations \n", + "k1 = (D/d)*1.62*(((d**2)*v/D*l)**(1./3))\t# Mass transfer co efficient inside the hollow fibers in cm/sec\n", + "k2 = (D/d)*0.8*((d*v/nu)**0.47)*((nu/D)**(1./3))\t#Mass transfer co efficient outside the hollow fibers in cm/sec\n", + "\t\n", + "#Results\n", + "print \"Mass transfer co efficient inside the hollow fibers %.e cm/sec\"%(k1)\n", + "print \"Mass transfer co efficient outside the hollow fibers %.1e cm/sec\"%(k2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass transfer co efficient inside the hollow fibers 7e-03 cm/sec\n", + "Mass transfer co efficient outside the hollow fibers 3.8e-03 cm/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2.2 pg : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "phi = 0.2\n", + "d = 200.*10**-4 \t# cm\n", + "dia = 3.8 \t # cm\n", + "Q = 4.1 \t # blood flow in cc/sec\n", + "k = 3.6*10**-4 \t # cm/sec\n", + "l = 30. \t # cm\n", + "\t\n", + "#Calculations\n", + "a = 4*phi/d \t# cm**2/cm**3\n", + "B = Q/((math.pi*dia**2)/4) \t# cm/sec\n", + "ratio1 = 1/(1+(k*a*l/B))\t# D equals B\n", + "percent1 = (1-ratio1)*100 \t# percentage of toxins removed when dialystate flow equals blood flow\n", + "D = 2*B \t# in second case\n", + "ratio2 =1/(((1/(math.exp(-k*a*l/D)))-0.5)*2) \t# when D =2B\n", + "percent2 = (1-ratio2)*100 \t# percentage of toxins removed when dialystate flow is twice the blood flow\n", + "ratio3 = math.exp(-k*a*l/B)\t# when dialystate flow is very large\n", + "percent3 = (1-ratio3)*100 \t# percentage of toxins removed when dialystate flow is very large\n", + "\t\n", + "#Results\n", + "print \"The percentage of toxins removed when dialystate flow equals blood flow is %.f\"%(percent1)\n", + "print \"The percentage of toxins removed when dialystate flow is twice the blood flow is %.f\"%(percent2)\n", + "print \"The percentage of toxins removed when dialystate flow is very large is %.f\"%(percent3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage of toxins removed when dialystate flow equals blood flow is 54\n", + "The percentage of toxins removed when dialystate flow is twice the blood flow is 62\n", + "The percentage of toxins removed when dialystate flow is very large is 70\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch12.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch12.ipynb new file mode 100755 index 00000000..65796128 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch12.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5967b06b73b5328a3c996954b0a08e521bef5e943190f4d3bb234d726e197220" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Differential Distillation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2.1 pg : 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "l = 1.22 \t# length of tower\n", + "Gflow = 0.026 \t# mol/sec\n", + "GbyL = 0.07\n", + "dia = 0.088 \t# m\n", + "pl = 1.1/100\t# pl = 1-yl\n", + "p0 = 0.04/100 \t# p0 = 1-y0\n", + "\t\n", + "#Calculations\n", + "A = math.pi*(dia**2)/4 \t# cross sectional of tower in m**2\n", + "G = Gflow/A \t# Gas flux in mol/m**2-sec\n", + "Kya = (G/l)*(1/(1-GbyL))*(math.log(pl/p0))\t# Mass transfer per volume in mol/m**3-sec\n", + "\t\n", + "#Results\n", + "print \"The mass transfer per volume is %.1f mol/m**3-sec\"%(Kya)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass transfer per volume is 12.5 mol/m**3-sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2.2 pg : 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "x1=0.99\n", + "x2=0.99\n", + "y1=0.95\n", + "y2=0.95\n", + "alpha=1.5\n", + "m=0.42\n", + "l=2\n", + "HTU=0.34\n", + "\t\n", + "#Calculations\n", + "y1s= (y1-0.58)/m\n", + "xrd= (x2-y2)/(x1-y1s)\n", + "Rd=xrd/(1-xrd)\n", + "Rds=alpha*Rd\n", + "xl= ((Rds+1)*y1 - x1)/(Rds)\n", + "\n", + "def ystar(y):\n", + " return 0.58+0.42*y\n", + "\n", + "NTU = math.log((ystar(xl) -y1)/(ystar(x1)-x1)) /(1- m*(Rds+1)/Rds)\n", + "NTU2=l/HTU\n", + "xd2=(ystar(y1)-y1)/math.e**(NTU2*(1-m))\n", + "xd=(0.58-xd2)/(1-m)\n", + "\t\n", + "#Results\n", + "print \"In case 1, NTU = %.1f\"%(NTU)\n", + "print \" In case 2, xd = %.3f\"%(xd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1, NTU = 5.3\n", + " In case 2, xd = 0.998\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4.1 pg : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import solve\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "F=3500 \t#mol/hr\n", + "xf=0.4\n", + "x1=0.98\n", + "y1=0.97\n", + "y2=0.625\n", + "x1=0.97\n", + "x2=0.4\n", + "ratio=1.5\n", + "HTU=0.2\n", + "\t\n", + "#Calculations\n", + "A=[[1, 1],[x1, 1-x1]]\n", + "B=[[F],[xf*F]]\n", + "C = solve(A,B)\n", + "#C=A\\B\n", + "DA=C[0]\n", + "BA=C[1]\n", + "Rds=(y1-y2)/(x1-x2)\n", + "Rd=Rds/(1-Rds)\n", + "Rdreq=ratio*Rd\n", + "NTU=13.9\n", + "l=HTU*NTU\n", + "\t\n", + "#Results\n", + "print \"length of the tower = %.1f m\"%(l)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length of the tower = 2.8 m\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch13.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch13.ipynb new file mode 100755 index 00000000..9c7fbc51 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch13.ipynb @@ -0,0 +1,268 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0a5d15ca018c85379ffbc29d9c22b06e9af57ae094acbb25dfd531a8027cda7c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Staged Distillation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1.1 pg : 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#Intialization of variables\n", + "xD = 0.90 \t# Distillate mole fraction\n", + "xB = 0.15\t# Reboiler mole fraction\n", + "xF = 0.50 \t#Feed mole fraction\n", + "F = 10. \t# mol/sec\n", + "dg = 3.1*10**-3 \t# g/cc\n", + "dl = 0.65 \t# g/cc\n", + "C = 0.11 \t# m/sec\n", + "\n", + "#Calculations\n", + "D = ((xF*F)-(xB*F))/(xD-xB)\n", + "B = ((xF*F)-(xD*F))/(xB-xD)\n", + "L = 3.5*D\n", + "G = L+D\n", + "L1 = L+F\n", + "G1 = G\n", + "f = (L1/G1)*(math.sqrt(dg/dl)) \t# flow parameter\n", + "vG = C*(math.sqrt((dl-dg)/dg))\t#vapor velocity in m/sec\n", + "c = (22.4*10**-3)*340/373\n", + "d = math.sqrt(4*G1*c/(vG*math.pi))\t#m\n", + "\n", + "#Results\n", + "print \"The column diameter is %.1f m\"%(d)\n", + "\n", + "#Calculation mistake in textbook\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The column diameter is 0.6 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2.1 pg : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "y1 = 0.9999\n", + "x0 = y1 \t# For a total condenser\n", + "y0 =0.58 + 0.42*x0 \t# The equilbirum line\n", + "LbyG = 0.75\n", + "yNplus1 = 0.99\n", + "A = LbyG/0.42\n", + "n= 1\n", + "\t\n", + "#Calculations\n", + "xN = (yNplus1-((1-LbyG)*y1))/LbyG\n", + "yN = 0.58 + 0.42*xN\n", + "N = (math.log((yNplus1-yN)/(y1-y0))/math.log(A))+n\t#, number of stages\n", + "\t\n", + "#Results\n", + "print \"the number of stages approximately is %.f\"%(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the number of stages approximately is 8\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2.2 pg :384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "x0 = 0.0082\n", + "xB = 10.**-4\n", + "L = 1.\n", + "\t\n", + "#Calculations\n", + "y0 = 36*x0\n", + "#There are two balancing equations , mole fraction balance , mole balance , from them G is \n", + "G0 = (xB-x0)*L/(xB-y0)\n", + "G = 3*G0\n", + "B = L-G\n", + "y1 = ((L*x0)-(B*xB))/G\n", + "yNplus1 = 36*xB\n", + "xN = (L*x0 - (G*(y1-yNplus1)))/L\n", + "yN = 36*xN\n", + "N = (math.log((yNplus1-yN)/(y1-y0)))/math.log((yNplus1-y1)/(yN-y0))\n", + "\t\n", + "#Results\n", + "print \"The number of stages are %.1f\"%(N)\n", + "\n", + "#Answer wrong in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of stages are 2.7\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4.1 pg : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "yn = 0.84\n", + "ynplus1 = 0.76\n", + "ystarn = 0.874\n", + "GA = 0.14 \t# kg-mol/sec\n", + "Al = 0.04 \t# m**3\n", + "\t\n", + "#Calculations\n", + "Murphree = (yn-ynplus1)/(ystarn-ynplus1)\n", + "Kya = GA/(Al*((1/Murphree)-1))\n", + "\t\n", + "#Results\n", + "print \"the murphree efficiency is %.2f\"%(Murphree)\n", + "print \" the m.t.c along with the product with a is %.1f kg-mol/m**3-sec\"%(Kya)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the murphree efficiency is 0.70\n", + " the m.t.c along with the product with a is 8.2 kg-mol/m**3-sec\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4.2 pg : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "R = 82. \t# atm-cm**3/gmol-K\n", + "T = 273. + 60 \t# Kelvin\n", + "pk = 1. \t# atm\n", + "a1 = 440. \t# sec**-1 (of gas)\n", + "a2 = 1.7 \t#sec**-1 (of liquid)\n", + "ck = 1.5/((0.47*(76.1))+(0.53*(158.7)))\n", + "x = 0.2\n", + "Vs = 10. \t# litres\n", + "GA = 59. \t# gmol/sec\n", + "m = 1.41\n", + "\t\n", + "#Calculations\n", + "k = (R*T)/(pk*a1) + (m/(ck*a2))\n", + "Kya = (1./k)*1000 \t# gmol/l-sec\n", + "Murphree = 1 - math.exp(-Kya*Vs/(GA))\n", + "\t\n", + "#Results\n", + "print \"The murphree efficiency is %.2f\"%(Murphree)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The murphree efficiency is 0.73\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch14.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch14.ipynb new file mode 100755 index 00000000..5816aa5c --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch14.ipynb @@ -0,0 +1,161 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:528842b9a81e863e3c4d30ecc59935b8c5cd0e7d99bff9f9c1d1ac8c6c54daa9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Extraction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3.1 pg : 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "Rat1 = (6.5/3)*(1-0.47)\t# as Rat = x0/y0\n", + "m = 0.14 \n", + "H = (6.5*10**3)/3600 \t# Extract flow in g/sec\n", + "L = (3*10**3)/3600. \t# Solvent flow in g/sec\n", + "d= 10. \t# cm\n", + "A = 0.25*math.pi*d**2 \t# cm**2\n", + "l = 65 \t# cm\n", + "\t\n", + "#Calculations and Results\n", + "Kya = ((H/(l*A))*(1/(1-((m*H)/L)))*(math.log((1-0.14*Rat1)/(0.47))))*10**3\t# kg/m**3-sec\n", + "print \"The value of Kya is %.1f kg/m**3-sec\"%(Kya)\n", + "Rat2 = (6.5/3)*(1-0.1)\t#For case B\n", + "l2 = l*(math.log(1/((1-0.14*Rat2)/(0.1))))/(math.log(1/((1-0.14*Rat1)/(0.47))))/100\t# m\n", + "print \"The length for 90 percent recovery is %.1f m\"%(l2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Kya is 0.3 kg/m**3-sec\n", + "The length for 90 percent recovery is 2.2 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4.1 pg : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialization of variables\n", + "m = 0.018 \n", + "H = 450. \t# litres/hr\n", + "L = 37. \t# litres/hr\n", + "Ynplus1byY1 = 100. \n", + "\t\n", + "#Calculations\n", + "E =m*H/L\n", + "nplus1 = math.log((Ynplus1byY1*((1/E)-1))+1)/math.log(1/E)\n", + "n = nplus1 -1\n", + "print \"The number of ideal stages are %.1f\"%(n)\n", + "N = 0.60 \t#Murphree efficienct\n", + "E1 = (m*H/L) + (1/N) - 1\n", + "nplus1 = math.log((Ynplus1byY1*((1/E1)-1))+1)/math.log(1/E1)\n", + "n=nplus1-1\n", + "print \"The number of stages required if Murphree efficiency is 60 percent is %.f\"%(n)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of ideal stages are 2.9\n", + "The number of stages required if Murphree efficiency is 60 percent is 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5.1 pg : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "F = 5. \t#kg feed\n", + "S = 2. \t# kg solvent\n", + "E = F-S \t# kg extract\n", + "W = 1. \t # kg waste\n", + "EG = 80. \t # ppm\n", + "y0 = (100-99)/100. \t# mole fraction of gold left\n", + "y1 = y0*EG*W/S \t # concentration in raffinate\n", + "\t\n", + "#Calculations\n", + "xN = (EG*W - y1*S)/E \t# solvent concentration\n", + "xNminus1 = ((xN*(E+S)) - EG*W)/F\t#feed stage balance\n", + "N = 1 + ((math.log((xN-xNminus1)/(y1))/math.log(F/S)))\t#numner of stages including feed stage\n", + "\t\n", + "#Results\n", + "print \"The number of stages including feed stage is %d\"%(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of stages including feed stage is 5\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch15.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch15.ipynb new file mode 100755 index 00000000..6b46e6bc --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch15.ipynb @@ -0,0 +1,203 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e7844fd29e61e44a32fcf2d944211052a5451b3c15cdfd580105fb20e51952a3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Adsorption" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3.2 pg : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "tE = 33. \t# Time taken for ferric ion to exhaust the bed in min\n", + "tB = 23. \t# Time taken for nickel to break through ferric in min\n", + "l = 120. \t#bed length in cm\n", + "\t\n", + "#Calculations\n", + "Theta = round(2*tB/(tB+tE),1)\n", + "lunused = (1-Theta)*120 \t# cm\n", + "\t\n", + "#Results\n", + "print \"the length of the bed unused is %.1f cm\"%(lunused)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the length of the bed unused is 24.0 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3.3 pg : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "tB = 10. \t# min\n", + "tE = 14. \t# min\n", + "l = 0.12 \t#m\n", + "l2 = 10. \t# m\n", + "c = 10000.\n", + "A = 1/10000. \t# m**2\n", + "\t\n", + "#Calculations\n", + "theta = 2*tB/(tB+tE)\n", + "l1 = l*(1-theta)\t# m , length of bed unused in first case\n", + "V1 = c*A*l \t# m**3\n", + "l3 = l2-l1 \t# length of bed unused in second case\n", + "d = math.sqrt(V1*4/(l3*math.pi))\t# m\n", + "V2 = c*(l-l1)*A*l2/l3 \t# volume needed for second case\n", + "\t\n", + "#Results\n", + "print \"The volume of adsorbent needed if the bed is kept 12 cm deep is %.2f m**3\"%(V1)\n", + "print \"The volume of adsorbent needed if the bed length is 10 m long is %.4f m**3\"%(V2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The volume of adsorbent needed if the bed is kept 12 cm deep is 0.12 m**3\n", + "The volume of adsorbent needed if the bed length is 10 m long is 0.1002 m**3\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4.1 pg : 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#intialization of variables\n", + "tB1 = 38. \t# days , breakthrough time\n", + "tE1 = 46. \t# days, exhaustion time\n", + "c = 2. \t# number of times flow doubled\n", + "\t\n", + "#Calculations\n", + "theta1 = 2*tB1/(tB1+tE1)\t# in the first case\n", + "ratio1 = 1-theta1 \t# ratio of unused bed length to total bed length\n", + "ratio2 = ratio1*c\n", + "tB2 = ((1/c)*(tB1 + 0.5*(tE1-tB1)))*ratio2\t#breakthrough time for second case\n", + "tE2 = (c-ratio2)*tB2/ratio2\t#exhaustion time for second case\n", + "\t\n", + "#Results\n", + "print \"The breakthrough time for this case is %.1f days\"%(tB2)\n", + "\n", + "# answer slightly wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The breakthrough time for this case is 4.0 days\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4.2 pg : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "slope = 0.93/3600 \t# sec**-1\n", + "q0 = 300. \t# 300 times y0 \n", + "E = 0.4 \t # void fraction\n", + "d = 310.*10**-4 \t#cm\n", + "v = 1/60. \t#cm/sec\n", + "Nu = 0.01 \t#cm**2/sec\n", + "D = 5.*10**-6 \t #cm**2/sec\n", + "\t\n", + "#Calculations\n", + "ka1 = slope*q0*(1-E)\t#sec**-1\n", + "k = (D/d)*1.17*((d*v/Nu)**0.58)*((Nu/D)**0.33)\t# cm/sec\n", + "a = (6/d)*(1-E)\t#cm**2/cm**3\n", + "ka2 = k*a\t#sec**-1\n", + "\t\n", + "#Results\n", + "print \"The rate constant is %.3f sec**-1\"%(ka1)\n", + "print \"The rate constant of literature is %.3f sec**-1\"%(ka2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate constant is 0.046 sec**-1\n", + "The rate constant of literature is 0.048 sec**-1\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch16.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch16.ipynb new file mode 100755 index 00000000..c8d00a3b --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch16.ipynb @@ -0,0 +1,116 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:379bbb5a509cc25127ebb4e914b5774822276a4f8bed51172564d103058e90c4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : General Questions and Heterogeneous Chemical Reactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3.2 pg : 462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "K = 0.0087 \t# overall m.t.c in cm/sec\n", + "D = 0.98*10**-5 \t# cm**2/sec\n", + "L = 0.3 \t# cm\n", + "v = 70. \t# cm/sec\n", + "nu = 0.01 \t#cm**2/sec\n", + "\t\n", + "#Calculations\n", + "k1 = 0.646*(D/L)*((L*v/nu)**(0.5))*((nu/D)**(1./3))\t# cm/sec\n", + "k2 = (1/((1/K)-(1/k1)))\t#/ cm/sec\n", + "\t\n", + "#Results\n", + "print \"The rate constant for the reaction is %.2f cm/sec\"%(k2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate constant for the reaction is 0.08 cm/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3.3 pg : 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\t\n", + "#initialization of variables\n", + "D =2.*10**-6 \t# cm**2/sec\n", + "nu = 0.036 \t# cm**2/sec \n", + "d1 = 1.59 \t# cm\n", + "d2 = 1. \t# cm\n", + "deltap = 1.*10**-5 \t# g/cc ( change in density)\n", + "p = 1. \t# g/cc\n", + "Re = 11200. \t# Reynolds number\n", + "g = 980. \t# cm/sec**2 \n", + "dis = 5.37*10**-9 \t# g/cm**2-sec \t# Dissolution rate\n", + "sol = 1.48*10**-3 \t# g/cc\n", + "\t\n", + "#Calculations\n", + "k11 = 0.62*(D/d1)*(Re**(0.5))*((nu/D)**(1./3))\t# cm/sec\n", + "K1 = dis/sol\t# the overall mass transfer co efficient in cm/sec\n", + "k2 = (1/((1/K1)-(1/k11)))\t#/ cm/sec \t#/ the rate consmath.tant in cm/sec\n", + "k12 = (D/d2)*(2+(((0.6*((d2**3)*(deltap)*g/(p*nu**2)))**0.25)*((nu/D)**(1./3)))) \t# cm/sec\n", + "K2 = 1/((1/k12)+(1/k2))\t# cm/sec (the overall mtc)\n", + "\t\n", + "#Results\n", + "print \"the rate of surface reaction is %.1e cm/sec\"%(k2)\n", + "print \"The dissolution rate for 1 cm gallstone is %.1e cm/sec\"%(K2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of surface reaction is 3.6e-06 cm/sec\n", + "The dissolution rate for 1 cm gallstone is 3.5e-06 cm/sec\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch17.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch17.ipynb new file mode 100755 index 00000000..b879236c --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch17.ipynb @@ -0,0 +1,283 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:928ec1651fbb6cf2fbaa95aabc63962db0c0ebd1296ae6aac51feaf1fa0663d8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : Homogeneous Chemical Reactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1.1 pg : 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "K = 1.46*10**-4 \t# lit/mol-sec (rate consmath.tant)\n", + "cpyridine = 0.1 \t# mol/lit\n", + "K1 = 2.0*10**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "D = K*cpyridine \t# sec**-1\n", + "k0 = (math.sqrt(D*K1)) \t#in x*10**-5 cm/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion co efficient of methyl iodide in benzene is %.1e cm/sec\"%(k0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co efficient of methyl iodide in benzene is 1.7e-05 cm/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1.2 pg : 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import coth\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "R = 0.3 \t# cm\n", + "K1 = 18.6 \t# sec**-1\n", + "D = 0.027 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "l = R/3 \t# cm\n", + "n = (math.sqrt(D/(K1*(l**2))))*coth(math.sqrt(K1*(l**2)/D))\n", + "\t\n", + "#Results\n", + "print \"The value of reduction in reaction rate due to diffusion is %.2f\"%(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of reduction in reaction rate due to diffusion is 0.39\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1.3 pg : 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "k = 16.*10**-3 \t# m.t.c in cm/sec\n", + "D = 1.25*10**-5 \t# Diffusion co efficient in cm**2/sec\n", + "\t\n", + "#Calculations \n", + "K1 = (k**2)/D\n", + "\t\n", + "#Results\n", + "print \"The rate constant is %.f sec**-1\"%(K1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate constant is 20 sec**-1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2.1 pg : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "D2 = 5.*10**-6 \t# The diffusion co efficient of the new compound in cm**2/sec\n", + "Nu = 3. \t# The factor\n", + "D1 = 0.7*10**-5 \t# The diffusion co efficient of the original compound in cm**2/sec\n", + "c2l = 1.5*10**-5 \t# the new solubility in mol/cc\n", + "c1l = 3.*10**-7 \t# The old solubility in mol/cc\n", + "\t\n", + "#Calculations\n", + "k = 1 + ((D2*c2l)/(Nu*D1*c1l))\t# The number of times the rate has increased to the previous rate\n", + "\t\n", + "#Results\n", + "print \"There is about a %.f fold increase in rate\"%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "There is about a 13 fold increase in rate\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4.1 pg : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "#For first reaction\n", + "D1 = 9.3*10**-5 \t# cm**2/sec\n", + "D2 = 5.3*10**-5 \t# cm**2/sec\n", + "K1exp = 1.4*10**11 \t# litre/mol-sec\n", + "sigma12 = 2.8*10**-8 \t# cm\n", + "N = (6.02*10**23)/10**3\t# liter/cc-mol\n", + "K1 = 4*math.pi*(D1+D2)*sigma12*N \t# Rate consmath.tant for first reaction in litre/mol-sec\n", + "print \"The rate consmath.tant for this reaction is %.1e litre/\"%(K1)\n", + "if K1>K1exp:\n", + " print (\"This reaction is controlled more by chemical factors\")\n", + "else:\n", + " print (\"This reaction is diffusion controlled\")\n", + "\n", + "#Second reaction\n", + "D1 = 5.3*10**-5 \t# cm**2/sec\n", + "D2 = 0.8*10**-5 \t# cm**2/sec\n", + "sigma12 = 5.*10**-8 \t# cm\n", + "K1exp = 3.8*10**7 \t# litre/mol-sec\n", + "K1 = 4*math.pi*(D1+D2)*sigma12*N \t# Rate consmath.tant for second reaction in litre/mol-sec\n", + "print \"The rate consmath.tant for this reaction is %.1e litre/mol-sec\"%(K1)\n", + "if K1>K1exp:\n", + " print (\"This reaction is controlled more by chemical factors\")\n", + "else: \n", + " print (\"The reaction is diffusion controlled\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate consmath.tant for this reaction is 3.1e+10 litre/\n", + "This reaction is diffusion controlled\n", + "The rate consmath.tant for this reaction is 2.3e+10 litre/mol-sec\n", + "This reaction is controlled more by chemical factors\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.5.1 pg : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#intitialization of variables\n", + "d = 5. \t# cm\n", + "v = 200. \t# cm/sec\n", + "nu = 0.01 \t# cm**2/sec\n", + "D = 3.2*10**-5 \t# cm**2/sec\n", + "l = 30.*10**-4 \t# cm\n", + "\t\n", + "#Calculations\n", + "Re = d*v/nu \t# Flow is turbulent\n", + "E = d*v/2 \t# cm**2/sec\n", + "tou1 = (d**2)/(4*E)\t# sec\n", + "tou2 = (l**2)/(4*D)\n", + "tou = tou1 + tou2 \t# sec\n", + "\t\n", + "#Results\n", + "print \"The relaxation time is %.2f sec\"%(tou)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relaxation time is 0.08 sec\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch18.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch18.ipynb new file mode 100755 index 00000000..a4f0a95d --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch18.ipynb @@ -0,0 +1,356 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bb1bcb29710d28f6e0c4c2dd2fe5edd152549addef9d0c99827e326f19256990" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : Membranes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1.1 pg : 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "d = 240.*10**-4 \t# cm\n", + "D = 2.1*10**-5 \t# cm**2/sec\n", + "v = 10. \t# cm/sec\n", + "Nu = 0.01 \t# cm**2/sec\n", + "E = 0.5\n", + "ka1 = 0.09 \t# sec**-1\n", + "\t\n", + "#Calculations\n", + "k = 0.8*(D/d)*((d*v/Nu)**0.47)*((Nu/D)**0.33)\n", + "a = 4*(1-E)/d \t# cm**2/cm**3\n", + "ka2 = k*a\n", + "ratio = ka2/ka1\n", + "\t\n", + "#Results\n", + "print \"The rapidness is roughly %d times that of sparger\"%(ratio)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rapidness is roughly 22 times that of sparger\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2.1 pg : 524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "p1 = 10.**-10 \t# cm**3(stp)cm/cm**2-sec-cm-Hg\n", + "c = 1./(22.4*10**3) \t# mol at stp /cc\n", + "P = p1*c \t# for proper units\n", + "R = 6240. \t# cmHg cm**3 \t#mol-K (gas consmath.tant)\n", + "T = 298. \t# Kelvin\n", + "\t\n", + "#Calculations\n", + "DH = P*R*T \t# Permeability in x*10**-9 cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The permeability is %.1e cm**2/sec\"%(DH)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The permeability is 8.3e-09 cm**2/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2.2 pg : 525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialization of variables\n", + "P = 1.*10**-4 \t# membrane permeability in cm**2/sec\n", + "l = 2.3*10**-4 \t# membrane thickness in cm\n", + "d = 320.*10**-4 \t# fiber dia in cm\n", + "E = 0.5 \t# void fraction\n", + "c0 = 1. \t# initial concentration\n", + "c = 0.1\t # final concentration\n", + "\t\n", + "#Calculations\n", + "a = 4*(1-E)/d \t# surface area per module volume in cm**2/cm**3\n", + "t = (math.log(c0/c))*(l/P)/a \t# t = z/v in seconds , time gas spends in the module in sec\n", + "\t\n", + "#Results\n", + "print \"The gas spends %.2f sec in the module\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gas spends 0.08 sec in the module\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3.1 pg : 532" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "R = 0.082 \t# litre-atm/mol-K\n", + "T = 283. \t# Kelvin\n", + "V2 = 0.018 \t# litre/mol\n", + "\n", + "#For first solution contents are sucrose and water\n", + "w1 = 0.01 \t# gm of sucrose\n", + "MW1 = 342. \t# MW of sucrose\n", + "w2 = 0.09 \t# gm of water\n", + "MW2 = 18. \t# MW of water\n", + "n1 = 1. \t# no of particles sucrose divides into in water\n", + "\t\n", + "#Calculations\n", + "x1juice = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))\t# Mole fracion of sucrose\n", + "#For second solution , contents are NaCl and water\n", + "w1 = 35. \t# gm of NaCl\n", + "MW1 = 58.5 \t# MW of Nacl\n", + "w2 = 100. \t# gm of water\n", + "MW2 = 18. \t# MW of water\n", + "n1 = 2. \t# no of particles sucrose divides into in water\n", + "\t\n", + "#Calculations\n", + "x1brine = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))\t# Mole fracion of sucrose\n", + "#Calculation of difference in Osmotic pressure\n", + "DeltaPi = (R*T/V2)*math.log((1-x1juice)/(1-x1brine))\t# atm\n", + "\t\n", + "#Results\n", + "print \"The osmotic pressure difference is %.f atm\"%(DeltaPi)\n", + "\t#answer wrong in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The osmotic pressure difference is 244 atm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3.2 pg : 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "D1=0.0035\n", + "l = 2.59 \t#cm\n", + "t = 1.62 \t#hr\n", + "C1 = 0.03 \t#mol/l\n", + "T1 = 298. \t#K\n", + "R = 0.0821 \t#arm/mol K\n", + "D2 = 0.005\n", + "t2 = 0.49 \t#hr\n", + "Ps = 733. \t#mm of Hg\n", + "P = 760. \t#mm of Hg\n", + "\t\n", + "#Calculations\n", + "Lps=D1*l/(t*3600) /(C1*R*T1)\n", + "Lp=(D2*l/(t2*3600) + Lps*(C1*R*T1))/(Ps/P)\n", + "Lp=2.4*10**-6\n", + "sig=Lps/Lp\n", + "sig2=0.95\n", + "\t\n", + "#Results\n", + "print \"Transport coefficient for phase 1 = %.2f\"%(sig)\n", + "print \" Transport coefficient for phase 2 = %.2f\"%(sig2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transport coefficient for phase 1 = 0.88\n", + " Transport coefficient for phase 2 = 0.95\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.4.1 pg : 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "D1 = 3.0*10**-7 \t# cm**2/sec\n", + "H1 = 0.18 \t# mol/cc-atm\n", + "D2 = 1.4*10**-6 \t# cm**2/sec\n", + "H2 = 2.2*10**-3 \t# mol/cc-atm\n", + "H11 = 13. \t# atm-cc/mol\n", + "H21 = 0.6 \t# atm-cc/mol\n", + "\t\n", + "#Calculations\n", + "Beta = (D1*H1/(D2*H2))*(H11/H21)\t# Membrane selectivity\n", + "\t\n", + "#Results\n", + "print \"The membrane selectivity is %.f\"%(Beta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The membrane selectivity is 380\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.5.2 pg : 544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialization of variables\n", + "D = 2.*10**-5 \t# cm**2/sec\n", + "l = 32.*10**-4 \t# cm\n", + "c = 6.8*10**-6 \t# mol/cc\n", + "C10 = 10.**-4 \t# mol/cc\n", + "\n", + "def Totalflux(H,K):\n", + " return (D*H*C10/l)+((D*H*K*c*C10)/(l*(1+(H*K*C10))))\n", + "\n", + "\n", + "#For Lithium Chloride\n", + "H1 = 4.5*10**-4 \t#Partition coefficient \n", + "K1 = 2.6*10**5 \t# cc/mol association consmath.tant\n", + "j1 = (Totalflux(H1,K1)) \t# TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print \"The total flux for Lithium Chloride is %.1e mol/cm**2-sec\"%(j1)\n", + "\n", + "#For Sodium Chloride\n", + "H2 = 3.4*10**-4 \t#Partition coefficient \n", + "K2 = 1.3*10**7 \t# cc/mol association consmath.tant\n", + "j2 = (Totalflux(H2,K2)) \t# TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print \"The total flux for Sodium Chloride is %.2e mol/cm**2-sec\"%(j2)\n", + "\n", + "#For potassium Chloride\n", + "H3 = 3.8*10**-4 \t#Partition coefficient \n", + "K3 = 4.7*10**9 \t# cc/mol association consmath.tant\n", + "j3 = (Totalflux(H3,K3)) \t# TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print \"The total flux for Potassium Chloride is %.2e mol/cm**2-sec\"%(j3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total flux for Lithium Chloride is 7.7e-10 mol/cm**2-sec\n", + "The total flux for Sodium Chloride is 1.32e-08 mol/cm**2-sec\n", + "The total flux for Potassium Chloride is 4.25e-08 mol/cm**2-sec\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch19.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch19.ipynb new file mode 100755 index 00000000..6369e86d --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch19.ipynb @@ -0,0 +1,107 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:83786e14ed15a6d96cc468bc95378d52d0d7c794085ba02cf3c562ac4d781e93" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 : Controlled Release and Related Phenomena" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1.1 pg : 554" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "VP = 0.045*10**-3\t# Vapor pressure of permethrin in kg/m-sec**2\n", + "R = 8.31 \t# Gas consmath.tant in kg-m**2/sec**2-gmol-K\n", + "l = 63.*10**-6 \t# membrane thickness in m\n", + "A = 12.*10**-4 \t# area surrounded by the membrane in m**2\n", + "M1 = 19.*10**-3 \t# Permithrin release in gmol\n", + "t = 24.*3600 \t# time taken to release\n", + "T = 298. \t# Kelvin\n", + "MW = 391. \t# Mol wt\n", + "\t\n", + "#Calculations\n", + "c1 = VP/(R*T) \t# C1sat \n", + "P = (M1/(t*MW))*(l/c1)*(1/A)*10**-3 \t#Permeability in cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The permeability is %.1e m**2/sec\"%(P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The permeability is 1.6e-06 m**2/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2.1 pg : 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "M= 25*10**-6 \t#gm/hr\n", + "d = 0.006 \t#g/cc\n", + "P = 1.4*10**-4\t# permeance in cm/sec\n", + "Deltac1 = 0.006 \t#Equivalent\t#cc\n", + "\t\n", + "#Calculations\n", + "c1 = 1./3600 \t# unit conversion factor hr/sec\n", + "c2 = 1./18 \t#unit conversion factor mole/cc\n", + "m = M*c1*c2/d \t# moles/sec\n", + "A = m/(P*Deltac1)\t#cm**2\n", + "\t\n", + "#Results\n", + "print \"you will need a membrane area of %.3f cm**2\"%(A)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you will need a membrane area of 0.077 cm**2\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch20.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch20.ipynb new file mode 100755 index 00000000..7016625a --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch20.ipynb @@ -0,0 +1,317 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5f399be3ed9287c050acbc68460345d6b2305b6cafd5daad5f67fb5716a7fdba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chatper 20 : Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1.1 pg : 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.special import erf\n", + "\n", + "#initialization of variables\n", + "T = 26.2 \t# centigrade\n", + "T0 = 4. \t# centigrade\n", + "Tinf = 40. \t#centigrade\n", + "z = 1.3\t #cm\n", + "t = 180. \t#seconds\n", + "\t\n", + "#Calculations\n", + "k = erf((T-T0)/(Tinf-T0))\n", + "alpha = (1/(4*t))*((z/k)**2)\t#cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The thermal diffusivity is %.3f\"%(alpha)\t#answer wrong in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal diffusivity is 0.006\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3.1 pg : 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "Q = 18. \t# m**3/hr\n", + "z = 2.80 \t#m\n", + "T = 140.\t#C\n", + "T1 = 240. \t#C\n", + "T2 = 20. \t#C\n", + "p= 900. \t#kg/m**3\n", + "Cp = 2. \t# W/kg-K\n", + "d = 0.05\t#m\n", + "\t\n", + "#Calculations\n", + "A = math.pi*(d**2)/4\n", + "v = Q*(1./(3600*40))/(A)\n", + "U = (v*p*Cp*d/(4*z))*(math.log((T1-T2)/(T1-T)))\t#W/m**2-K\n", + "DeltaT = ((T1-T2)+(T1-T))/2\t#C\n", + "q = (Q*(1./(3600*40))*p*Cp/(math.pi*d*z))*(T-T2)\t#W/m**2-K\n", + "U1 = q/DeltaT\t#W/m**2-K\n", + "\t\n", + "#Results\n", + "print \"The overall heat transfer co efficient based on local temp difference is %.2f W/m**2-K\"%(U)\n", + "print \"The overall heat transfer co efficient based on average temp difference is %.2f W/m**2-K\"%(U1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall heat transfer co efficient based on local temp difference is 0.40 W/m**2-K\n", + "The overall heat transfer co efficient based on average temp difference is 0.38 W/m**2-K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3.2 pg : 582" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "T = 32. \t#F\n", + "T0 = 10.\t#F\n", + "Tinf= 80. \t#F\n", + "U = 3.6 \t#Btu/hr-ft**2-F\n", + "A = 27. \t#ft**2\n", + "d = 8.31 \t#lb/gal\n", + "V = 100. \t#gal\n", + "Cv = 1.\t#Btu/lb-F\n", + "\t\n", + "#Calculations\n", + "t = (-math.log((T-T0)/(Tinf-T0)))*d*V*Cv/(U*A)\t#hr\n", + "\t\n", + "#Results\n", + "print \"The time we can wait before the water in the tank starts to freeze is %.f hr\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time we can wait before the water in the tank starts to freeze is 10 hr\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3.3 pg : 583" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "#Given q = h*DeltaT and 0.6q = (1/(1/h)+10/12*0.03)*delta T , divide both to get \n", + "l = 10./12 \t#ft\n", + "k = 0.03 \t#Btu/hr-ft-F\n", + "\t\n", + "#Calculations\n", + "l2 = 2\t#feet\n", + "k2 = 0.03 \t#Btu/hr-ft-F\n", + "h = ((1/0.6)-1)*k/l \t#Btu/hr-ft**2-F\n", + "U = 1./((1/h)+(l2/k2))\t#Btu/hr-ft**2-F\n", + "Savings = U*100/h\n", + "\t\n", + "#Results\n", + "print \"The savings due to insulation is about %d percent\"%(Savings)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The savings due to insulation is about 38 percent\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.4.1 pg : 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "T = 673. \t# Kelvin\n", + "M = 28. \n", + "sigma = 3.80 \t# angstroms\n", + "omega = 0.87\n", + "d1 = 0.05 \t#m\n", + "v1 = 17. \t#m/sec\n", + "Mu1 = 3.3*10**-5 \t# kg/m-sec\n", + "p1 = 5.1*10**-1 \t# kg/m**3\n", + "Cp1 = 1100. \t# J/kg-K\n", + "k2 = 42. \t# W/m-K\n", + "l2 = 3.*10**-3 \t#m\n", + "d3 = 0.044 \t#m\n", + "v3 = 270. \t#m/sec\n", + "p3 = 870. \t#kg/m**3\n", + "Mu3 = 5.3*10**-4 \t# kg/m-sec\n", + "Cp3 = 1700.\t# J/kg-K\n", + "k3 = 0.15 \t#W/m-K\n", + "\t\n", + "#Calculations\n", + "kincal = (1.99*10**-4)*(math.sqrt(T/M))/((sigma**2)*omega)\t#W/m**2-K\n", + "k = kincal*4.2*10**2\t# k in W/m-K\n", + "h1 = 0.33*(k/d1)*((d1*v1*p1/Mu1)**0.6)*((Mu1*Cp1/k)**0.3)\t#W/m**2-K\n", + "h2 = k2/l2 \t#W/m**2-K\n", + "h3 = 0.027*(k3/d3)*((d3*v3*p3/Mu3)**0.8)*((Mu3*Cp3/k3)**0.33)\t#W/m**2-K\n", + "U = 1/((1/h1)+(1/h2)+(1/h3))\t#W/m**2-K\n", + "\t\n", + "#Results\n", + "print \"The overall heat transfer co efficient is %.f W/m**2-K\"%(U)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall heat transfer co efficient is 65 W/m**2-K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.4.2 pg : 589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "#For window with two panes 3 cm apart\n", + "k = 0.57*10**-4 \t#cal/cm-sec-K\n", + "l = 3. \t#cm\n", + "g = 980. \t# cm/sec**2\n", + "Nu = 0.14 \t# cm**2/sec\n", + "DeltaT = 30. \t# Kelvin\n", + "T = 278. \t# Kelvin\n", + "L = 100. \t# cm\n", + "\t\n", + "#Calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1./3))*((l/L)**(1./9))) \t#for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print \"The heat transfer co efficent for two panes is %.1e cal/cm**2-sec-K\"%(h)\n", + "\n", + "#For window with three panes 1.5 cm each apart\n", + "k = 0.57*10**-4 \t#cal/cm-sec-K\n", + "l = 1.5\t#cm\n", + "DeltaT = 15 \t# Kelvin\n", + "g = 980. \t# cm/sec**2\n", + "Nu = 0.14 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1./3))*((l/L)**(1./9)))\t#for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print \"The heat transfer co efficent for three panes is %.1e cal/cm**2-sec-K\"%(h/2)\t#Because there are two gaps\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transfer co efficent for two panes is 4.4e-05 cal/cm**2-sec-K\n", + "The heat transfer co efficent for three panes is 1.6e-05 cal/cm**2-sec-K\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch21.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch21.ipynb new file mode 100755 index 00000000..e6c74fb1 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch21.ipynb @@ -0,0 +1,270 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:22ec7bcfef63f6ff5016b6f16c9204cd93351f0b01a4d636e0f66546e25de919" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 : Simultaneous Heat and Mass Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1.2 pg : 599" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "Tdisc = 30. \t# Centigrade\n", + "T = 21. \t # Centigrade\n", + "T0 = 18. \t# Centigrade\n", + "R0 = 1.5 \t# cm\n", + "V = 1000. \t# cc\n", + "t = 3600. \t#seconds\n", + "Nu = 0.082 \t#cm**2/sec\n", + "omeg = 2*math.pi*10/60 \t#sec**-1\n", + "\t\n", + "#Calculations\n", + "k = -V*(math.log((Tdisc-T)/(Tdisc-T0)))/(math.pi*(R0**2)*t)\t# k = h/d*cp cm/sec\n", + "alpha = ((1/0.62)*(k)*(Nu**(1./6))*(omeg**(-0.5)))**1.5 \t# cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"the value of thermal diffusivity is %.1e cm**2/sec\"%(alpha)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the value of thermal diffusivity is 1.3e-03 cm**2/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3.1 pg : 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "d =1000. \t# kg/m**3\n", + "h = 30. \t# W/m**2-C-sec\n", + "Hvap = 2300.*10**3 \t# J/kg\n", + "T = 75. \t# C\n", + "Ti = 31. \t# C\n", + "l = 0.04 \t# m\n", + "epsilon = 0.36\n", + "c = 3600. \t# sec/hr\n", + "t1 = (Hvap/h)*(1/(T-Ti))*(l*epsilon*d)\t# sec\n", + "t = t1/c \t# in hr\n", + "\t\n", + "#Results\n", + "print \"The time taken for drying is %.f hr\"%(t)\t\n", + "\n", + "# answer wrong in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken for drying is 7 hr\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3.2 pg : 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#intialization of variables\n", + "d = 100.*10**-4 \t# cm\n", + "v = 10.**-3\t# cm/sec\n", + "nu = 0.2 \t# cm**2/sec\n", + "DS = 0.3 \t# cm**2/sec\n", + "DG = 3.*10**-7 \t# cm**2/sec\n", + "H = 4.3*10**-4 \t# at 60 degree centigrade\n", + "\t\n", + "#Calculations\n", + "kG = (2+(0.6*((d*v/nu)**0.5)*((nu/DS)**(1./3))))*DS/d\t# cm/sec\n", + "k = kG*H \n", + "t = 30*DG/k**2\n", + "\t\n", + "#Results\n", + "print \"The mass transfer coefficient is %.5f cm/sec\"%(k)\n", + "print \"THe time needed to dry the particle is %.3f sec\"%(t)\n", + "\t#Answer wrong in textbook starting from kG\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass transfer coefficient is 0.02585 cm/sec\n", + "THe time needed to dry the particle is 0.013 sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.4.1 pg : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "slope = 230. \t#J/g-mol-C\n", + "nair = 60. \t# gmol/cm**2-sec\n", + "CpH2O = 75. \t# J/gmol-C\n", + "f = 0.4 \t# Correction factor\n", + "F = 2150./(60*0.018)\t#gmol/m**2-sec\n", + "kc= 20./3\n", + "a = 3. \t# m**2/m**3\n", + "k = 2.7 \t# integral of dH/Hi-H with limits Hout and Hin\n", + "\t\n", + "#Calculations\n", + "nH2Omax = slope*nair/CpH2O\t#gmol/m**2-sec\n", + "nH2O = nH2Omax*(1-f) \t#gmol/m**2-sec\n", + "A = F/nH2O \t# m**2\n", + "l = (nair/(kc*a))*k \t# m\n", + "\t\n", + "#Results\n", + "print \"The flow rate of the water per tower cross section is %.f gmol H2O/m**2-sec\"%(nH2O)\n", + "print \"The area of tower cross section is %.f m**2\"%(A)\n", + "print \"The length of the tower is %.1f m\"%(l)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flow rate of the water per tower cross section is 110 gmol H2O/m**2-sec\n", + "The area of tower cross section is 18 m**2\n", + "The length of the tower is 8.1 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.5.1 pg : 619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "A = 0.01 \t# cm**2\n", + "l = 1. \t# cm\n", + "VA = 3. \t# cc\n", + "VB = 3. \t# cc\n", + "alphagas = 0.29 \n", + "alphaliquid = -1.3\n", + "x1 = 0.5\n", + "x2 = 0.5 \n", + "deltaT = 50. \t# Kelvin Thot-Tcold = 50\n", + "Tavg = 298. \t# kelvin\n", + "Dgas = 0.3 \t# cm**2/sec\n", + "Dliquid = 10.**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "deltaY = alphagas*x1*x2*deltaT/Tavg \t# Y1hot-Y1cold = DeltaY\n", + "deltaX = alphaliquid*x1*x2*deltaT/Tavg\t# X1hot-X1cold = DeltaX\n", + "Beta = (A/l)*((1/VA)+(1/VB))\t#cm**-2\n", + "BetaDgasinverse = 1/(Beta*Dgas)\t# sec\n", + "BetaDliquidinverse = (1/(Beta*Dliquid))/(365*24*60*60)\n", + "\t\n", + "#Results\n", + "print \"The seperation achieved for gas is %.3f\"%(deltaY)\n", + "print \"The seperation achieved for liquid is %.2f\"%(deltaX)\n", + "print \"The time taken for seperation for gas will be %.f seconds\"%(BetaDgasinverse)\n", + "print \"The time taken for seperation for liquid will be %.1f year\"%(BetaDliquidinverse)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The seperation achieved for gas is 0.012\n", + "The seperation achieved for liquid is -0.05\n", + "The time taken for seperation for gas will be 500 seconds\n", + "The time taken for seperation for liquid will be 0.5 year\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch3.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch3.ipynb new file mode 100755 index 00000000..021dcb1e --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch3.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ab52cce732e12a0e71bfc86859a378d615e77ef1015baf1adf5f96434945a12a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Diffusion in Concentrated Solutions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.4 pg : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#variables\n", + "D = 0.1 \t# cm**2/sec\n", + "l = 10. \t# cm\n", + "C10 = 1.\n", + "C1l = 0\n", + "C1 = 0.5\n", + "\n", + "# calculations\n", + "V1 = (D/l)*(C10 - C1l)/C1 \t# Cm/sec\n", + "V2 = -V1\n", + "M1 = 28 \n", + "M2 = 2\n", + "omeg1 = C1*M1/(C1*M1 + C1*M2)\n", + "omeg2 = C1*M2/(C1*M1 + C1*M2)\n", + "V = omeg1*V1 + omeg2*V2\n", + "\n", + "# results\n", + "print \"The mass average velocity is %.5f cm/s\"%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass average velocity is 0.01733 cm/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.1 pg : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialization of variables\n", + "# At 6 degree centigrade\n", + "p1sat = 37. \t# Vapor pressure of benzene in mm Hg\n", + "p = 760. \t # atmospheric pressure in mm Hg\n", + "y1l = 0.\n", + "y10 = p1sat/p\n", + "n1byDcbyl = math.log((1-y1l)/(1-y10))\t# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l \t# Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 \t# Percentage error\n", + "print \"The error in measurement at 6 degree centigrade is %.1f percent\"%(err1)\n", + "\n", + "# At 60 degree centigrade\n", + "p1sat = 395. \t# Vapor pressure of benzene in mm Hg\n", + "p = 760. \t# atmospheric pressure in mm Hg\n", + "y1l = 0\n", + "y10 = p1sat/p\n", + "n1byDcbyl = math.log((1-y1l)/(1-y10))\t# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l \t# Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 \t# Percentage error\n", + "print \" The error in measurement at 60 degree centigrade is %.1f percent\"%(err1)\n", + "\n", + "# note : book hasn't shown answers." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The error in measurement at 6 degree centigrade is 2.5 percent\n", + " The error in measurement at 60 degree centigrade is 41.1 percent\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch4.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch4.ipynb new file mode 100755 index 00000000..0861f95e --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch4.ipynb @@ -0,0 +1,119 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d535e96b63b04955ddb6dd28278cd61f812d14a9abe154ce07ebf0b6c0bb6b52" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Dispersion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2.1 pg : 99 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "z = 80. \t# metres\n", + "c1 = 410. \t#ppm\n", + "c = 860. \t# ppm\n", + "d = 2. \t#km\n", + "v = 0.6 \t#km/hr\n", + "r = 3600. \t#sec/hr\n", + "\t\n", + "#Calculations\n", + "t1 = (d/v)*r\t#sec\n", + "E = (-((z**2)/(4*t1))/(math.log(410./860)))*10**4\t# cm**2/sec\t\n", + "d2 = 15 \t#km\n", + "c2 = c*(math.sqrt(d/d2))\t#ppm\n", + "\t\n", + "#Results\n", + "print \"The value of print ersion coefficent is %.f cm**2/sec\"%(E)\n", + "print \" The value of maximum concentration at 15 km downstream is %.f ppm\"%(c2)\n", + "\n", + "#note : first answer in textbook is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of print ersion coefficent is 1800 cm**2/sec\n", + " The value of maximum concentration at 15 km downstream is 314 ppm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2.2 pg : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "\n", + "#initialization of variables\n", + "d = 10. \t#cm\n", + "s = 3. \t# km\n", + "v = 500. \t#cm/sec\n", + "nu = 0.15 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "E = 0.5*d*v \t# cm**2/sec\n", + "c1 = 1000 \t# m/km\n", + "c2 = 1./100 \t# m/cm\n", + "z = math.sqrt(4*E*c1*c2*s/v)\n", + "percent = z*100/(s*c1)\n", + "\t\n", + "#Results\n", + "print \" z = %.f m\"%z\n", + "print \" The percent of pipe containing mixed gases is %.f percent\"%(percent)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " z = 24 m\n", + " The percent of pipe containing mixed gases is 1 percent\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch5.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch5.ipynb new file mode 100755 index 00000000..24f68f7a --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch5.ipynb @@ -0,0 +1,380 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e95d26ba834dccfcca64f78642d7e9d0d80482717f10832b09324f5a5b164f70" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Values of Diffusion Coefficients" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1.1 pg : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# variables\n", + "e1 = 3.54 # delta 1\n", + "e2 = 2.83 # delta 2\n", + "\n", + "# calculations and results\n", + "e12 = 1./2*(e1+e2)\n", + "print \"Sigma12 = %.2f A\"%e12\n", + "omega = 0.81\n", + "e12bykbt = math.sqrt(124*38./448)\n", + "D = 1.86*10**-3*448**(3./2)*((1./39.9) + 1./2.02**(1./2))/(1*3.18**2*omega)\n", + "print \"D = %.2f cm**2/sec\"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sigma12 = 3.19 A\n", + "D = 1.57 cm**2/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1.2 pg : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "sigma1 = 2.92 \t# angstroms\n", + "sigma2 = 3.68 \t# angstroms\n", + "sigma12 = (sigma1+sigma2)/2 \t# angstroms\n", + "T = 294. \t# Kelvin\n", + "M1 = 2.02 \t# Mol wt of hydrogen\n", + "V1 = 7.07 \n", + "V2 = 17.9\n", + "M2 = 28. \t# Mol wt of Nitrogen\n", + "p = 2. \t#atm\n", + "Omega = 0.842\n", + "Dexp = 0.38 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "D1 = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)\t#cm**2/sec\n", + "err1 = ((Dexp-D1)/Dexp)*100\n", + "D2 = ((10**-3)*((T)**1.75)*(((1/M1)+(1/M2))**0.5))/((p)*((((V1)**(1./3))+ ((V2)**(1./3)))**2)) \t#cm**2/sec\n", + "err2 = ((Dexp-D2)/Dexp)*100\n", + "\t\n", + "#Results\n", + "print \"The diffusion co efficient using Chapman-enskong theory is %.2f cm**2/sec\"%(D1)\n", + "print \"The error for the above correlation is %.f percent\"%(err1+1)\n", + "print \"The diffusion co efficient using Fuller correlation is %.2f cm**2/sec\"%(D2)\n", + "print \"The error for the above correlation is %.f percent\"%(err2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co efficient using Chapman-enskong theory is 0.37 cm**2/sec\n", + "The error for the above correlation is 3 percent\n", + "The diffusion co efficient using Fuller correlation is 0.37 cm**2/sec\n", + "The error for the above correlation is 3 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1.3 pf : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "p0 = 1. \t#atm\n", + "p = 33. \t#atm\n", + "D0 = 0.043 \t# cm**2/sec\n", + "\t\n", + "#Calculations \n", + "D = (p0*D0/p)*10**5 \t# x*10**-5 cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion co efficient for the given conditions is %.2f x10**-5 cm**2/sec\"%(D)\n", + "print (\"The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co efficient for the given conditions is 130.30 x10**-5 cm**2/sec\n", + "The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.1 pg : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "R0 = 1.73*10**-8 \t#cm\n", + "kb = 1.38*10**-16 \t# g-cm**2/sec**2-K\n", + "T = 298. \t # kelvin\n", + "Mu = 0.01 \t# g/cm-sec\n", + "Mu2 = 1. \t# Centipoise\n", + "DE = 1.80 \t#x*10**-5 cm**2/sec\n", + "phi = 2.6\n", + "VH2O = 18. \t# cc/g-mol\n", + "VO2 = 25. \t# cc/g-mol\n", + "\t\n", + "#Calculations\n", + "D1 = ((kb*T)/(6*math.pi*Mu*R0))*10**5\t# x*10**-5 cm**2/sec\n", + "err1 = (DE-D1)*100/DE \t# error percentage\n", + "D2 = (((8.2*10**-8)*T/(Mu2*((VO2)**(1./3))))*(1+ ((3*VH2O/VO2)**(2./3))))*10**5 \t#x*10**-5 cm**2/sec\n", + "err2 = (D2-DE)*100/DE \t# Error percentage\n", + "D3 = (((7.4*10**-8)*((phi*VH2O)**0.5)*T)/(Mu2*((VO2)**0.6)))*10**5\t#x*10**-5 cm**2/sec\n", + "err3 = (D3-DE)*100/DE\t# Error percentage \n", + "\t\n", + "#Results\n", + "print \"The diffusion co efficent using Stokes einstien correlation is %.1f x10**-5 cm**2/sec\"%(D1)\n", + "print \"The error regarding above correlation is %.f percent low\"%(err1)\n", + "print \"The diffusion co efficent using Wilke-Chang correlation is %.1f x10**-5 cm**2/sec\"%(D3)\n", + "print \"The error regarding above correlation is %.f percent high\"%(err3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co efficent using Stokes einstien correlation is 1.3 x10**-5 cm**2/sec\n", + "The error regarding above correlation is 30 percent low\n", + "The diffusion co efficent using Wilke-Chang correlation is 2.2 x10**-5 cm**2/sec\n", + "The error regarding above correlation is 21 percent high\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.2 pg : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "kb = 1.38*10**-16\t#g-cm**2-sec**2-K\n", + "T = 310 \t# kelvin\n", + "k = 30 \t# which is a/b\n", + "D = 2.0*10**-7 \t# cm**2/sec\n", + "Mu = 0.00695 \t# g/cm-sec\n", + "\t\n", + "#Calculations\n", + "a = ((kb*T/(6*math.pi*Mu*D))*((math.log(k + ((k**2-1)**(0.5))))/((1-(1/k**2))**0.5)))*10**7 \t# nm\n", + "b = a/k \t# nm\n", + "\t\n", + "#Results\n", + "print \"The results of a and b are %.f nm and %.1f nm\"%(a,b)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The results of a and b are 67 nm and 2.2 nm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.3 pg : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "D1 = 1.26*10**-5 \t# for x1=1 , D0 value in cm**2/sec\n", + "x1 = 0.5\n", + "D2 = 4.68*10**-5 \t# for x2=1 , D0 Value in cm**2/sec\n", + "x2 = 0.5\n", + "k = -0.69 \t# dlngamma1/dx1 value given\n", + "\t\n", + "#Calculations\n", + "D0 = ((D1)**x1)*((D2)**x2)*10**5 \t# x*10**-5 cm**2/sec\n", + "D = D0*(1+k) \t# Diffusion coefficient in x*10**-5 cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion coefficent is %.2f x10**-5 cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficent is 0.75 x10**-5 cm**2/sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5.1 pg : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "m = 20./(6*10**23)\t#wt of each molecule\n", + "kb = 1.38*10**-16 \t# g-cm**2/sec-K\n", + "T = 298. \t# Kelvin\n", + "dou = 0.04*10**-7 \t# cm\n", + "\t\n", + "#Calculations\n", + "v = math.sqrt(kb*T*2/m) \t#cm/sec\n", + "D = (dou*v/6) \n", + "\t\n", + "#Results\n", + "print \"The value of Diffusion co efficient is %.e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Diffusion co efficient is 3e-05 cm**2/sec\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5.2 pg : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#Intialization of variables\n", + "sigmasquare = 0.014 \t# Slope of the graph\n", + "t = 150. \t# seconds\n", + "\n", + "#Calculations\n", + "D = (sigmasquare/(2*t)) \t# cm**2/sec\n", + "\n", + "#Results\n", + "print \"The value of diffusion co efficient is %.1e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of diffusion co efficient is 4.7e-05 cm**2/sec\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch6.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch6.ipynb new file mode 100755 index 00000000..051cabb4 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch6.ipynb @@ -0,0 +1,365 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d0e1d2df0aff726a3a406932f708cdf8d06257d8034bc7c7a566a7dd78b80f46" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Diffusion of Interacting Species" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.1 pg : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "DHplus = 9.31*10**-5 \t# cm**2/sec\n", + "DClminus = 2.03*10**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "DHCl = (2/((1/DHplus)+(1/DClminus)))\n", + "tHplus = DHplus/(DHplus+DClminus)\n", + "percentage = tHplus*100 \t# percent\n", + "\t\n", + "#Results\n", + "print \"The diffusion co efficient of the solution is %.1e cm**2/sec\"%(DHCl)\n", + "print \" The transeference for protons is %.f percent\"%(percentage)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion co efficient of the solution is 3.3e-05 cm**2/sec\n", + " The transeference for protons is 82 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.2 pg : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\t\n", + "#initialization of variables\n", + "z1 = 3.\n", + "z2 = 1.\n", + "D2 = 2.03*10**-5 \t# cm**2/sec\n", + "D1 = 0.62*10**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "D = ((z1+z2)/((z1/D2)+(z2/D1))) \t# cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion coefficient is %.2e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient is 1.29e-05 cm**2/sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.5 pg : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "zCa = 2.\n", + "zCl = 1.\n", + "DCl = 2.03*10**-5 \t# cm**2/sec\n", + "DCa = 0.79*10**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "DCaCl2 = ((zCa+zCl)/((zCa/DCl)+(zCl/DCa))) \t# cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion coefficient of CaCl2 is %.2e cm**2/sec\"%(DCaCl2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient of CaCl2 is 1.33e-05 cm**2/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2.1 pg : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "pKa = 4.756\n", + "DH = 9.31*10**-5 \t# cm**2/sec\n", + "DCH3COO = 1.09*10**-5 \t#cm**2/sec\n", + "D2 = 1.80*10**-5 \t#cm**2/sec\n", + "Ct = 10. \t# moles/lit\n", + "\t\n", + "#Calculations\n", + "K = 10**pKa \t# litres/mol\n", + "D1 = 2/((1/DH)+(1/DCH3COO))\n", + "D = 2/((1/D1)+(1/D2))#*10**5\t# Diffusion co efficient in x*10**-5 cm**2/sec\n", + "\t\n", + "#Results\n", + "print \"The diffusion coefficient of acetic acid in water is %.2e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient of acetic acid in water is 1.87e-05 cm**2/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4.1 pg : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "sigma1 = 4.23 \t# angstroms\n", + "sigma2 = 4.16 \t#Angstroms\n", + "sigma12 = (sigma1+sigma2)/2 \t# angstroms\n", + "T = 573. \t# Kelvin\n", + "M1 = 28.\n", + "M2 = 26.\n", + "p = 1. \t#atm\n", + "Omega = 0.99\n", + "Deff = 0.17 \t #cm**2/sec\n", + "\t\n", + "#Calculations\n", + "D = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)\t#cm**2/sec\n", + "Tou = D/Deff\n", + "\t\n", + "#Results\n", + "print \"The tortuosity is %.f\"%(Tou)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tortuosity is 2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4.2 pg : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#Initialzation of variables\n", + "kb = 1.38*10**-16 \t# g-cm**2/sec**2-K\n", + "T = 310. \t#Kelvin\n", + "Mu = 0.01 \t # g/cm-sec\n", + "R0 = 2.5*10**-8 \t#cm\n", + "d = 30.*10**-8 \t #cm\n", + "\n", + "#Calculations\n", + "D = (kb*T/(6*math.pi*Mu*R0))*(1+((9./8)*(2*R0/d)*(math.log(2*R0/d)))+((-1.54)*(2*R0/d)))\t#cm**2/sec\n", + "\n", + "#Results\n", + "print \"The diffusion coefficient is %.2e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient is 3.70e-06 cm**2/sec\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4.3 pg : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#Initialzation of variables\n", + "kb = 1.38*10**-16 \t# g-cm**2/sec**2-K\n", + "T = 373. \t# K\n", + "T0 = 273. \t# K\n", + "sigma = 2.83*10**-8 \t# cm\n", + "p = 1.01*10**6\t # g/cm-sec**2\n", + "l = 0.6 \t # cm\n", + "d = 13.*10**-7 \t # cm\n", + "m = 2/(6.023*10**23)\t# gm/sec\n", + "M1 = 2.01\n", + "M2 = 28.0\n", + "sigma1 = 2.92\t#cm\n", + "sigma2 = 3.68\t#cm\n", + "sigma12 = (sigma1+sigma2)/2\n", + "omega = 0.80\n", + "deltac1 = (1/(22.4*10**3))*(T0/T)\n", + "\n", + "#Calculations\n", + "DKn = (d/3)*(math.sqrt((2*kb*T)/m))\t#cm**2/sec\n", + "flux1 = (DKn*deltac1/l)#*10**5\t#in x*10**-5mol/cm**2-sec\n", + "D = (1.86*10**-3)*(T**(1.5))*(((1/M1)+(1/M2))**0.5)/(p*(sigma12**2)*omega)\n", + "flux2 = (D*deltac1/l)#*10**11\t# in x*10**-11 mol/cm**2-sec\n", + "\n", + "#Results\n", + "print \"The steady diffusion flux is %.1e mol/cm**2-sec\"%(flux1)\n", + "print \"The flux through 18.3 micrometre pore is %.1e cm**2/sec\"%(flux2)\t# answer wrong in text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steady diffusion flux is 4.2e-06 mol/cm**2-sec\n", + "The flux through 18.3 micrometre pore is 6.1e-11 cm**2/sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4.4 pg : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "d=0.01 \t#cm\n", + "s=2.*10**-2 \t#cm\n", + "\t\n", + "#Calculations\n", + "phi = 4./3 *math.pi*(d/2)**3 /(s**3)\n", + "print (\"On solving, D\")\n", + "D=5*10**-7 \t#cm**2/s\n", + "\t\n", + "#Results\n", + "print \"Diffusion in homogeneous gel = %.1e cm**2/sec\"%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On solving, D\n", + "Diffusion in homogeneous gel = 5.0e-07 cm**2/sec\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch8.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch8.ipynb new file mode 100755 index 00000000..a8862d13 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch8.ipynb @@ -0,0 +1,545 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4ffdecca56cbb9d6e776ad1a01e4fde638db5748af91a54702b1bfe198648852" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Fundamentals of Mass Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1.1 pg : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initiliazation of variables\n", + "Vap = (0.05/22.4)*23.8/760 \t# Vapour concentration\n", + "V = 18.4*10**3 \t# Air Volume in cc\n", + "A = 150. \t# Liquid Area in Cm**2\n", + "t1 = 180. \t# Time in sec\n", + "N1 = (Vap*V)/(A*t1)\n", + "k = 3.4*10**-2 \t# cm/sec\n", + "C = 0.9\n", + "\n", + "#Calculations\n", + "t = (-V/(k*A))*math.log(1 - C)\n", + "thr = t/3600\n", + "\n", + "#Results\n", + "print \"the time taken to reach 90 percent saturation is %.1f hr\"%(thr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the time taken to reach 90 percent saturation is 2.3 hr\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1.2 pg : 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "Vo = 5. \t# cm/sec\n", + "a = 23. \t#cm**2/cm**3\n", + "z = 100. \t#cm\n", + "Crat = 0.62 \t# Ratio of c/Csat\n", + "\t\n", + "#Calculations\n", + "k = -(Vo/(a*z))*math.log(1-Crat)\n", + "\t\n", + "#Results\n", + "print \"the mass transfer co efficient is %.1e cm/sec\"%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mass transfer co efficient is 2.1e-03 cm/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1.3 pg : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "t = 3.*60 \t# seconds\n", + "crat = 0.5 \t# Ratio of c and csat\n", + "\t\n", + "#Calculations\n", + "ka = -(1/t)*math.log(1-crat)\n", + "\t\n", + "#Results\n", + "print \"the mass transfer co efficient along the product with a is %.1e sec**-1\"%(ka)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mass transfer co efficient along the product with a is 3.9e-03 sec**-1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1.4 pg : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialiazation of variables\n", + "rin = 0.05 \t# initial radius of oxygen bubble in cm\n", + "rf = 0.027 \t#final radius of oxygen bubble in cm\n", + "tin = 0 \t# initial time in seconds\n", + "tf = 420. \t# final time in seconds\n", + "c1 = 1/22.4 \t# oxygen concentration in the bubble in mol/litres\n", + "c1sat = 1.5*10**-3 \t# oxygen concentration outside which is saturated in mol/litres\n", + "\t\n", + "#Calculations\n", + "k = -((rf-rin)/(tf-tin))*(c1/c1sat)\n", + "\t\n", + "#Results\n", + "print \"The mass transfer co efficient is %.1e cm/sec\"%(k)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass transfer co efficient is 1.6e-03 cm/sec\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2.1 pg : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "kc = 3.3*10**-3 \t# M.T.C in cm/sec\n", + "d = 1. \t# density of oxygen in g/cm**3\n", + "M = 18. \t# Mol wt of water in g/mol\n", + "Hatm = 4.4*10**4 \t# Henrys consmath.tant in atm\n", + "HmmHg = Hatm*760 \t# Henrys consmath.tant in mm Hg\n", + "\t\n", + "#Calculations\n", + "ratio = d/(M*HmmHg)\t# Ratio of concentration and pressure of oxygen\n", + "kp = kc*ratio \t # M.T.O=C in x*10**12mol/cm**2-sec-mm Hg \n", + "\t\n", + "#Results\n", + "print \"the M.T.C in given units is %.1e\"%(kp )\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the M.T.C in given units is 5.5e-12\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2.2 pg : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "k1 = 1.18 \t# M.T.C in lb-mol NH3/hr-ft**2\n", + "k2 = 1.09 \t# M.T.C in lb-mol NH3/hr-ft**2\n", + "M2 = 18. \t# Mol wt of NH3 in lb/mol\n", + "d = 62.4 \t# Density of NH3 in lb/ft**3\n", + "c1 = 30.5 \t# Conversion factor from ft to cm\n", + "c2 = 1./3600 \t# Conversion factor from seconds to hour\n", + "R = 1.314 \t# Gas consmath.tant in atm-ft**3/lb-mol-K\n", + "T = 298. \t# Temperature in Kelvin scale\n", + "\t\n", + "#Calculations\n", + "kf1 = (M2/d)*k1*c1*c2 \t# M.T.C in cm/sec\n", + "kf2 = R*T*k2*c1*c2 \t# M.T.C in cm/sec\n", + "\t\n", + "#Results\n", + "print \"the M.T.C for liquid is %.1e cm/sec\"%(kf1)\n", + "print \" the M.T.C for gas is %.1f cm/sec\"%(kf2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the M.T.C for liquid is 2.9e-03 cm/sec\n", + " the M.T.C for gas is 3.6 cm/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3.1 pg : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "l = 0.07 \t # flim thickness in cm \n", + "v = 3. \t# water flow in cm/sec\n", + "D = 1.8*10**-5 \t# diffusion coefficient in cm**2/sec\n", + "crat = 0.1 \t # Ratio of c1 and c1(sat)\n", + "\t\n", + "#Calculations\n", + "z = (((l**2)*v)/(1.38*D))*((math.log(1-crat))**2) \t#Column length\n", + "\t\n", + "#Results\n", + "print \"the column length needed is %.1f cm\"%(z)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the column length needed is 6.6 cm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3.2 pg : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "Dw = 1.*10**-5 \t# Diffusion co efficient in cm**2/sec\n", + "omeg = 20.*2*math.pi/60 \t# disc rotation in /sec\n", + "Nuw = 0.01 \t# Kinematic viscousity in water in cm**2/sec\n", + "Da = 0.233 \t# Diffusion co efficient in cm**2/sec\n", + "Nua = 0.15 \t# Kinematic viscousity in air in cm**2/sec\n", + "c1satw = 0.003 \t# Solubility of benzoic acid in water in gm/cm**3\n", + "p1sat = 0.30 \t # Equilibrium Vapor pressure in mm Hg\n", + "ratP = 0.3/760 \t # Ratio of pressures\n", + "c1 = 1./(22.4*10**3) \t# Moles per volume\n", + "c2 = 273./298 \t # Ratio of temperatures\n", + "c3 = 122. \t # Grams per mole\n", + "\t\n", + "#Calculations\n", + "kw = 0.62*Dw*((omeg/Nuw)**0.5)*((Nuw/Dw)**(1./3))\t# cm/sec\n", + "Nw = kw*c1satw \t# mass flux in x*10**-6 in g/cm**2-sec\n", + "ka = 0.62*Da*((omeg/Nua)**0.5)*((Nua/Da)**(1./3))\t#cm/sec\n", + "c1sata = ratP*c1*c2*c3\t# Solubility of benzoic acid in air in gm/cm**3\n", + "Na = ka*c1sata \t# mass flux in x*10**-6 in g/cm**2-sec\n", + "\t\n", + "#Results\n", + "print \"the mass flux in water is %.1e g/cm**2-sec\"%(Nw)\n", + "print \" the mass flux in air is %.e g/cm**2-sec\"%(Na)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mass flux in water is 2.7e-06 g/cm**2-sec\n", + " the mass flux in air is 9e-07 g/cm**2-sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.1 pg : 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "Dl=2.1*10**-5\t# Diffusion co efficient for Oxygen in air in cm**2/sec\n", + "Dg = 0.23 \t#Diffusion co efficient for Oxygen in water in cm**2/sec\n", + "R = 82. \t# Gas consmath.tant in cm**3-atm/g-mol-K\n", + "T = 298. \t#Temperature in Kelvin\n", + "l1 = 0.01 \t# film thickness in liquids in cm\n", + "l2 = 0.1 \t# film thickness in gases in cm\n", + "H1 = 4.3*10**4 \t# Henrys consmath.tant in atm\n", + "c = 1./18 \t# concentration of water in g-mol/cm**3\n", + "\t\n", + "#Calculations\n", + "kl = (Dl/l1)*c \t# m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/l2)/(R*T)\t# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1)))\t# Overall m.t.c in mol/cm**2-sec liquid phase\n", + "\t\n", + "#Results\n", + "print \"The overall m.t.c in liquid side is %.1e mol/cm**2-sec\"%(KL)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall m.t.c in liquid side is 1.2e-04 mol/cm**2-sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.2 pg : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "Dl=1.9*10**-5\t# Diffusion co efficient for liquid phase in cm**2/sec\n", + "Dg = 0.090 \t#Diffusion co efficient for gas phase in cm**2/sec\n", + "R = 82. \t# Gas consmath.tant in cm**3-atm/g-mol-K\n", + "T = 363. \t#Temperature in Kelvin\n", + "H1 = 0.70 \t# Henrys consmath.tant in atm\n", + "c = 1./97 \t # concentration of water in g-mol/cm**3\n", + "\t\n", + "#Calculations\n", + "kl = (Dl/0.01)*c \t# m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/0.1)/(R*T)\t# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1))) \t# Overall m.t.c in x*10**-5 mol/cm**2-secliquid phase\n", + "\t\n", + "#Results\n", + "print \"The overall m.t.c in liquid side is %.2e mol/cm**2-sec\"%(KL)\t\n", + "\n", + "# note : answer wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall m.t.c in liquid side is 1.02e-05 mol/cm**2-sec\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.3 pg : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialization of variables\n", + "k1 = 3.0*10**-4 \t# m.t.c in benzene in cm/sec\n", + "k2 = 2.4*10**-3 \t# m.t.c in water in cm/sec\n", + "ratio = 150. \t# Solubility ratio in benzene to water\n", + "\t\n", + "#Calculations\n", + "K1 = (1/((1/k1)+(ratio/k2))) \t# Overall m.t.c through benzene phase in x*10**-5 cm/sec\n", + "\t\n", + "#Results\n", + "print \"The overall M.T.C through benzene phase is %.1e cm/sec\"%(K1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall M.T.C through benzene phase is 1.5e-05 cm/sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.4 pg : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "H1 = 75. \t# henrys consmath.tant for ammonia in atm\n", + "H2 = 41000. \t# henrys consmath.tant for methane in atm\n", + "p = 2.2 \t # pressure in atm\n", + "kya = 18. \t# product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "kxa = 530. \t#product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "\n", + "#calcuations\n", + "Kya1 = 1/((1/kya) + (H1/p)/kxa) \t#The overall coefficient for ammonia in lb-mol/hr-ft**3\n", + "Kya2 = 1/((1/kya) + (H2/p)/kxa) \t#The overall coefficient for methane in lb-mol/hr-ft**3\n", + "\t\n", + "#Results\n", + "print \"The overall coefficient for ammonia is %.1f lb-mol/hr-ft**3\"%(Kya1)\n", + "print \" The overall coefficient for methane is %.2f lb-mol/hr-ft**3\"%(Kya2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The overall coefficient for ammonia is 8.3 lb-mol/hr-ft**3\n", + " The overall coefficient for methane is 0.03 lb-mol/hr-ft**3\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch9.ipynb b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch9.ipynb new file mode 100755 index 00000000..4c93a886 --- /dev/null +++ b/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch9.ipynb @@ -0,0 +1,247 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0c7aa52e4235bf5f449708c0aa42c5f1d3cf349a52cd0ba075233a85a209aa61" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Theories of Mass Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1.1 pg : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "p1 = 10. \t# pressure in atm\n", + "H = 600. \t # henrys consmath.tant in atm\n", + "c1 = 0. \t # gmol/cc\n", + "N1 = 2.3*10**-6 \t# mass flux in mol/cm**2-sec\n", + "c = 1./18 \t #total Concentration in g-mol/cc\n", + "D = 1.9*10**-5 \t# Diffusion co efficient in cm**2/sec\n", + "\t\n", + "#Calculations\n", + "c1i = (p1/H)*c \t# Component concentration in gmol/cc\n", + "k = N1/(c1i-c1)\t#Mass transfer co efficient in cm/sec\n", + "l = D/k \t# Film thickness in cm\n", + "\t\n", + "#Results\n", + "print \"The film thickness is %.5f cm\"%(l)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The film thickness is 0.00765 cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2.1 pg : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\n", + "#initialization of variables\n", + "D = 1.9*10**-5 \t#Diffusion co efficient in cm**2/sec\n", + "k = 2.5*10**-3 \t# M.T.C in cm/sec\n", + "\t\n", + "#Calculations\n", + "Lbyvmax = 4*D/((k**2)*math.pi)\t#sec\n", + "tou = D/k**2 \t# sec\n", + "\t\n", + "#Results\n", + "print \"The contact time is %.1f sec\"%(Lbyvmax)\n", + "print \"The surface resident time is %.1f sec\"%(tou)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The contact time is 3.9 sec\n", + "The surface resident time is 3.0 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3.1 pg : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\t\n", + "#initialization of variables\n", + "const = 0.5 \t# The part of flow in the system which bypasses the region where the mass transfer occurs\n", + "v1 = 1. \t # cm/sec\n", + "al = 10.**3\n", + "k = 10.**-3 \t# cm/sec\n", + "v2 = 3. \t# cm/sec\n", + "\t\n", + "#Calculations\n", + "C1byC10first = const + (1-const)*(math.exp(-k*al/v1))\t# c1/c10\n", + "appk1 = (v1/al)*(math.log(1/C1byC10first))\t# Apparent m.t.c for first case in cm/sec\n", + "C1byC10second = const + (1-const)*(math.exp(-(math.sqrt(3))*k*al/v2))\t#c1/c10 in second case\n", + "appk2 = (v2/al)*math.log(1/C1byC10second)\t# apparent m.t.c for second case in cm/sec\n", + "power = math.log(appk2/appk1)/math.log(v2/v1)\n", + "\t\n", + "#Results\n", + "print \"The apparent m.t.c for the first case is %.2e cm/sec\"%(appk1)\n", + "print \"The apparent m.t.c for the second case is %.1e cm/sec\"%(appk2)\n", + "print \"The apparent is proportional to the power of %.2f of the velocity\"%(power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The apparent m.t.c for the first case is 3.80e-04 cm/sec\n", + "The apparent m.t.c for the second case is 7.4e-04 cm/sec\n", + "The apparent is proportional to the power of 0.61 of the velocity\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4.1 pg : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "D = 1.*10**-5 \t#cm**2/sec\n", + "d = 2.3 \t# cm\n", + "L = 14. \t# cm\n", + "v0 = 6.1 \t# cm/sec\n", + "\t\n", + "#Calculations\n", + "k = ((3**(1./3))/(math.lgamma(4./3)))*((D/d))*(((d**2)*v0/(D*L))**(1./3))\t# cm/sec\n", + "\t\n", + "#Results\n", + "print \"The average mass transfer coefficient is %f cm/sec\"%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average mass transfer coefficient is -0.003397 cm/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4.2 pg : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialization of variables\n", + "tn = 300000. \t# turbulence number\n", + "v0 = 10. \t# cm/sec\n", + "p = 1. \t# g/cc\n", + "mu = 0.01 \t# g/cm-sec\n", + "delta = 2.5 \t#cm\n", + "D = 1.*10**-5 \t# cm**2/sec\n", + "\t\n", + "#Calculations\n", + "x = tn*mu/(v0*p)\t# cm\n", + "delta = ((280./13)**(1./2))*x*((mu/(x*v0*p))**(1./2))\t#cm\n", + "deltac = ((D*p/mu)**(1./3))*delta\t#cm\n", + "k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1./3))) \t# x*10**-5 cm/sec\n", + "\t\n", + "#Results\n", + "print \"The dismath.tance at which turbulent flow starts is %.f cm\"%(x)\n", + "print \"The boundary layer for flow at this point is %.1f cm\"%(delta)\n", + "print \"The boundary layer for concentration at this point is %.2f cm\"%(deltac)\n", + "print \"The local m.t.c at the leading edge and at the position of transistion is %.1e cm/sec\"%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dismath.tance at which turbulent flow starts is 300 cm\n", + "The boundary layer for flow at this point is 2.5 cm\n", + "The boundary layer for concentration at this point is 0.25 cm\n", + "The local m.t.c at the leading edge and at the position of transistion is 5.9e-05 cm/sec\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch1.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch1.png new file mode 100755 index 00000000..0e503d1a Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch1.png differ diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch2.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch2.png new file mode 100755 index 00000000..9f76c123 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch2.png differ diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch4.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch4.png new file mode 100755 index 00000000..6d747624 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch4.png differ diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch4_1.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch4_1.png new file mode 100755 index 00000000..6d747624 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch4_1.png differ diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch5.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch5.png new file mode 100755 index 00000000..c5cb06bb Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch5.png differ diff --git a/Discrete_Mathematics_and_its_Applications/screenshots/ch5_1.png b/Discrete_Mathematics_and_its_Applications/screenshots/ch5_1.png new file mode 100755 index 00000000..c5cb06bb Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications/screenshots/ch5_1.png differ 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 new file mode 100644 index 00000000..645ce13f --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2.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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {"collapsed": 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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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/chap2_(3).ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3).ipynb new file mode 100755 index 00000000..494652e8 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3).ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 01: Page 156" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the number of terms in the sequence5\n", + "a_n=1/n\n", + "when n= 5 a_n is\n", + "1/ 1 , 1/ 2 , 1/ 3 , 1/ 4 , 1/ 5 , \n", + "\n", + "1.0 , 0.5 , 0.333333333333 , 0.25 , 0.2 ,\n" + ] + } + ], + "source": [ + "#To generate a sequence a_n=1/n\n", + "i=1.0 #floating point division\n", + "n=input(\"enter the number of terms in the sequence\");\n", + "print \"a_n=1/n\"\n", + "print \"when n=\",n,\"a_n is\"\n", + "for 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,\",\",\n", + "print \"\\n\"\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 02: Page 157" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of terms in the sequence to generate the geometric progression5\n", + "the list of terms b 0 , b 1 , b 2 , b 3 , b 4 , b 5 , begins with 1 -1 1 -1 1 -1 \n", + "the list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 2 10 50 250 1250 6250 \n", + "the 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" + ] + } + ], + "source": [ + "n=input(\"Enter the number of terms in the sequence to generate the geometric progression\");\n", + "i=1\n", + "print\"the list of terms\",\n", + "for i in range (n+1):print\"b\",i,\",\",\n", + "print \"begins with\", \n", + "for i in range (n+1): #iterate for the number of terms given as input\n", + " b_n=(-1)**i\n", + " print b_n,\n", + "print\"\\n\",\"the list of terms\",\n", + "for i in range (n+1):print\"c\",i,\",\",\n", + "print \"begins with\", \n", + "for i in range (n+1): #iterate for the number of terms given as input\n", + " c_n=2*(5**i)\n", + " print c_n,\n", + "print\"\\n\",\"the list of terms\",\n", + "for i in range (n+1):print\"c\",i,\",\",\n", + "print \"begins with\",\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 157" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number terms in the sequence5\n", + "The list of terms s 0 , s 1 , s 2 , s 3 , s 4 , begins with -1 3 7 11 15 \n", + "The list of terms t 0 , t 1 , t 2 , t 3 , t 4 , begins with 7 4 1 -2 -5\n" + ] + } + ], + "source": [ + "n=input(\"Enter the number terms in the sequence\");\n", + "s_n=-1+4*n\n", + "t_n=7-3*n\n", + "i=0\n", + "print \"The list of terms\",\n", + "for i in range(n):\n", + " print \"s\",i,\",\",\n", + "print \"begins with\",\n", + "for i in range(n):\n", + " print -1+4*i,\n", + "print \"\\nThe list of terms\",\n", + "for i in range(n):\n", + " print \"t\",i,\",\",\n", + "print \"begins with\",\n", + "for i in range(n):\n", + " print 7-3*i,\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 158" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a[ 1 ] 5\n", + "a[ 2 ] 8\n", + "a[ 3 ] 11\n" + ] + } + ], + "source": [ + "a=[2,0,0,0] #assigning a[0]=2 (Given)\n", + "\n", + "for i in range(1,4):#iteration to run till a[3]\n", + " a[i]=a[i-1]+3\n", + " print \"a[\",i,\"]\",a[i]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 06: Page 158" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a[ 2 ] 2\n", + "a[ 3 ] -3\n" + ] + } + ], + "source": [ + "a=[3,5,0,0] #assingning a[0],a[1] to the given values\n", + "\n", + "for 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]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 07: Page 158 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fibonacci series is\n", + "f[ 2 ]=f[ 1 ]+f[ 0 ]= 1\n", + "f[ 3 ]=f[ 2 ]+f[ 1 ]= 2\n", + "f[ 4 ]=f[ 3 ]+f[ 2 ]= 3\n", + "f[ 5 ]=f[ 4 ]+f[ 3 ]= 5\n", + "f[ 6 ]=f[ 5 ]+f[ 4 ]= 8\n" + ] + } + ], + "source": [ + "f=[0,1,0,0,0,0,0] #assingning a[0],a[1] to the given values\n", + "print \"Fibonacci series is\"\n", + "for 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]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 08: Page 159 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number5\n", + "The factorial of 5 is 120\n" + ] + } + ], + "source": [ + "n=1\n", + "result=0\n", + "number=input(\"Enter the number\");\n", + "for i in range(1,number):\n", + " n=n+i*n \n", + "print \"The factorial of\",number,\"is\",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18: Page 164" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the upper limit for the operation j^25\n", + "Enter the lower limit for the operation j^21\n", + "The square of terms form 1 to n 1 ^2+ 2 ^2+ 3 ^2+ 4 ^2+ 5 ^2+ = 55\n" + ] + } + ], + "source": [ + "#finding the summation of j^2\n", + "up=input(\"Enter the upper limit for the operation j^2\");\n", + "low=input(\"Enter the lower limit for the operation j^2\");\n", + "sum=0\n", + "print \"The square of terms form 1 to n\",\n", + "for 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\n", + "print \"=\",sum\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19: Page 164" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value for the sequence (-1)^ 4 + (-1)^ 5 + (-1)^ 6 + (-1)^ 7 + (-1)^ 8 + = 1\n" + ] + } + ], + "source": [ + "k=4 #lower limit\n", + "sum=0\n", + "print \"The value for the sequence\",\n", + "for 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)\n", + "print \"=\",sum\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21: Page 165" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the upper limit for the inner summation3\n", + "Enter the lower limit for the inner summation1\n", + "Enter the upper limit for the outer summation4\n", + "Enter the lower limit for the outer summation1\n", + "60\n" + ] + } + ], + "source": [ + "\n", + "globals()['j']=0\n", + "i=0\n", + "globals()['s']=0\n", + "upj=input(\"Enter the upper limit for the inner summation\");\n", + "lowj=input(\"Enter the lower limit for the inner summation\");\n", + "upi=input(\"Enter the upper limit for the outer summation\");\n", + "lowi=input(\"Enter the lower limit for the outer summation\");\n", + "for i in range (lowj,upj+1):\n", + " j=j+i\n", + "for l in range(lowi,upi+1):\n", + " s=s+(j*l)\n", + "print s\n", + " \n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 13: Page 161" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "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" + ] + } + ], + "source": [ + "#To print series 1 once, 2 twice, 3 thrice and so on\n", + "a=[]\n", + "i=1\n", + "for 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", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 22: Page 166" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of values of s for all the members of the set { 0 2 4 } is 6\n" + ] + } + ], + "source": [ + "s=0 #initialise it to zero to store the results\n", + "globals()['res']=0 #difining result as global variable since it has to be accessed outside the loop\n", + "print \"Sum of values of s for all the members of the set {\",\n", + "for s in range (0,4+1,2): #iterate for terms 0,4,6\n", + " print s,\n", + " res=res+s\n", + "print \"} is\",res\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 178" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the elements of matrix 1\n", + "number of rows, m = 3\n", + "number of columns, n = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "0\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "-1\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "2\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "2\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "-3\n", + "('entry in row: ', 3, ' column: ', 1)\n", + "3\n", + "('entry in row: ', 3, ' column: ', 2)\n", + "4\n", + "('entry in row: ', 3, ' column: ', 3)\n", + "0\n", + "Enter the elements of matrix 2\n", + "number of rows, m = 3\n", + "number of columns, n = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "3\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "4\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "-1\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "-3\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "0\n", + "('entry in row: ', 3, ' column: ', 1)\n", + "-1\n", + "('entry in row: ', 3, ' column: ', 2)\n", + "1\n", + "('entry in row: ', 3, ' column: ', 3)\n", + "2\n", + "Addition 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" + ] + } + ], + "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", + "\n", + "def 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", + "\n", + "mat1=[]\n", + "mat2=[]\n", + "Z=[]\n", + "print \"Enter the elements of matrix 1\"\n", + "mat1=getmat() #function call\n", + "print \"Enter the elements of matrix 2\"\n", + "mat2=getmat() #function call\n", + "print \"Addition of \\n matrix 1\",mat1,\"and \\n matrix 2\",mat2,\"is \\n\",matrixADD(mat1,mat2) #function call to add \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 179" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication of the two matrices AB is\n", + "[14, 4]\n", + "[8, 9]\n", + "[7, 13]\n", + "[8, 2]\n" + ] + } + ], + "source": [ + "\n", + "# Program to multiply two matrices using nested loops\n", + "\n", + "# 3x3 matrix\n", + "X = [[1,0,4],\n", + " [2,1,1],\n", + " [3,1,0],\n", + " [0,2,2]]\n", + "# 3x4 matrix\n", + "Y = [[2,4],\n", + " [1,1],\n", + " [3,0]]\n", + "# result is 3x4\n", + "result = [[0,0],\n", + " [0,0],\n", + " [0,0,],\n", + " [0,0]]\n", + "\n", + "# iterate through rows of X\n", + "for 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]\n", + "print \"The multiplication of the two matrices AB is\"\n", + "\n", + "for r in result:\n", + " print(r)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 181" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the elements of the matrix\n", + "number of rows = 2\n", + "number of columns = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "2\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "3\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "4\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "5\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "6\n", + "The transpose is\n", + "[1, 4]\n", + "[2, 5]\n", + "[3, 6]\n", + "[8, 2]\n" + ] + } + ], + "source": [ + "# Program to transpose a matrix using nested loop\n", + "# iterate through rows\n", + "def 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", + " \n", + "def 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", + "\n", + "print \"Enter the elements of the matrix\"\n", + "getmat()\n", + "#mattrans(mat1)\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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3)_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3)_1.ipynb new file mode 100755 index 00000000..494652e8 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_(3)_1.ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 01: Page 156" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the number of terms in the sequence5\n", + "a_n=1/n\n", + "when n= 5 a_n is\n", + "1/ 1 , 1/ 2 , 1/ 3 , 1/ 4 , 1/ 5 , \n", + "\n", + "1.0 , 0.5 , 0.333333333333 , 0.25 , 0.2 ,\n" + ] + } + ], + "source": [ + "#To generate a sequence a_n=1/n\n", + "i=1.0 #floating point division\n", + "n=input(\"enter the number of terms in the sequence\");\n", + "print \"a_n=1/n\"\n", + "print \"when n=\",n,\"a_n is\"\n", + "for 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,\",\",\n", + "print \"\\n\"\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 02: Page 157" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of terms in the sequence to generate the geometric progression5\n", + "the list of terms b 0 , b 1 , b 2 , b 3 , b 4 , b 5 , begins with 1 -1 1 -1 1 -1 \n", + "the list of terms c 0 , c 1 , c 2 , c 3 , c 4 , c 5 , begins with 2 10 50 250 1250 6250 \n", + "the 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" + ] + } + ], + "source": [ + "n=input(\"Enter the number of terms in the sequence to generate the geometric progression\");\n", + "i=1\n", + "print\"the list of terms\",\n", + "for i in range (n+1):print\"b\",i,\",\",\n", + "print \"begins with\", \n", + "for i in range (n+1): #iterate for the number of terms given as input\n", + " b_n=(-1)**i\n", + " print b_n,\n", + "print\"\\n\",\"the list of terms\",\n", + "for i in range (n+1):print\"c\",i,\",\",\n", + "print \"begins with\", \n", + "for i in range (n+1): #iterate for the number of terms given as input\n", + " c_n=2*(5**i)\n", + " print c_n,\n", + "print\"\\n\",\"the list of terms\",\n", + "for i in range (n+1):print\"c\",i,\",\",\n", + "print \"begins with\",\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 157" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number terms in the sequence5\n", + "The list of terms s 0 , s 1 , s 2 , s 3 , s 4 , begins with -1 3 7 11 15 \n", + "The list of terms t 0 , t 1 , t 2 , t 3 , t 4 , begins with 7 4 1 -2 -5\n" + ] + } + ], + "source": [ + "n=input(\"Enter the number terms in the sequence\");\n", + "s_n=-1+4*n\n", + "t_n=7-3*n\n", + "i=0\n", + "print \"The list of terms\",\n", + "for i in range(n):\n", + " print \"s\",i,\",\",\n", + "print \"begins with\",\n", + "for i in range(n):\n", + " print -1+4*i,\n", + "print \"\\nThe list of terms\",\n", + "for i in range(n):\n", + " print \"t\",i,\",\",\n", + "print \"begins with\",\n", + "for i in range(n):\n", + " print 7-3*i,\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 158" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a[ 1 ] 5\n", + "a[ 2 ] 8\n", + "a[ 3 ] 11\n" + ] + } + ], + "source": [ + "a=[2,0,0,0] #assigning a[0]=2 (Given)\n", + "\n", + "for i in range(1,4):#iteration to run till a[3]\n", + " a[i]=a[i-1]+3\n", + " print \"a[\",i,\"]\",a[i]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 06: Page 158" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a[ 2 ] 2\n", + "a[ 3 ] -3\n" + ] + } + ], + "source": [ + "a=[3,5,0,0] #assingning a[0],a[1] to the given values\n", + "\n", + "for 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]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 07: Page 158 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fibonacci series is\n", + "f[ 2 ]=f[ 1 ]+f[ 0 ]= 1\n", + "f[ 3 ]=f[ 2 ]+f[ 1 ]= 2\n", + "f[ 4 ]=f[ 3 ]+f[ 2 ]= 3\n", + "f[ 5 ]=f[ 4 ]+f[ 3 ]= 5\n", + "f[ 6 ]=f[ 5 ]+f[ 4 ]= 8\n" + ] + } + ], + "source": [ + "f=[0,1,0,0,0,0,0] #assingning a[0],a[1] to the given values\n", + "print \"Fibonacci series is\"\n", + "for 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]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 08: Page 159 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number5\n", + "The factorial of 5 is 120\n" + ] + } + ], + "source": [ + "n=1\n", + "result=0\n", + "number=input(\"Enter the number\");\n", + "for i in range(1,number):\n", + " n=n+i*n \n", + "print \"The factorial of\",number,\"is\",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18: Page 164" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the upper limit for the operation j^25\n", + "Enter the lower limit for the operation j^21\n", + "The square of terms form 1 to n 1 ^2+ 2 ^2+ 3 ^2+ 4 ^2+ 5 ^2+ = 55\n" + ] + } + ], + "source": [ + "#finding the summation of j^2\n", + "up=input(\"Enter the upper limit for the operation j^2\");\n", + "low=input(\"Enter the lower limit for the operation j^2\");\n", + "sum=0\n", + "print \"The square of terms form 1 to n\",\n", + "for 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\n", + "print \"=\",sum\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19: Page 164" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value for the sequence (-1)^ 4 + (-1)^ 5 + (-1)^ 6 + (-1)^ 7 + (-1)^ 8 + = 1\n" + ] + } + ], + "source": [ + "k=4 #lower limit\n", + "sum=0\n", + "print \"The value for the sequence\",\n", + "for 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)\n", + "print \"=\",sum\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21: Page 165" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the upper limit for the inner summation3\n", + "Enter the lower limit for the inner summation1\n", + "Enter the upper limit for the outer summation4\n", + "Enter the lower limit for the outer summation1\n", + "60\n" + ] + } + ], + "source": [ + "\n", + "globals()['j']=0\n", + "i=0\n", + "globals()['s']=0\n", + "upj=input(\"Enter the upper limit for the inner summation\");\n", + "lowj=input(\"Enter the lower limit for the inner summation\");\n", + "upi=input(\"Enter the upper limit for the outer summation\");\n", + "lowi=input(\"Enter the lower limit for the outer summation\");\n", + "for i in range (lowj,upj+1):\n", + " j=j+i\n", + "for l in range(lowi,upi+1):\n", + " s=s+(j*l)\n", + "print s\n", + " \n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 13: Page 161" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "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" + ] + } + ], + "source": [ + "#To print series 1 once, 2 twice, 3 thrice and so on\n", + "a=[]\n", + "i=1\n", + "for 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", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02: BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 22: Page 166" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sum of values of s for all the members of the set { 0 2 4 } is 6\n" + ] + } + ], + "source": [ + "s=0 #initialise it to zero to store the results\n", + "globals()['res']=0 #difining result as global variable since it has to be accessed outside the loop\n", + "print \"Sum of values of s for all the members of the set {\",\n", + "for s in range (0,4+1,2): #iterate for terms 0,4,6\n", + " print s,\n", + " res=res+s\n", + "print \"} is\",res\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 178" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the elements of matrix 1\n", + "number of rows, m = 3\n", + "number of columns, n = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "0\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "-1\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "2\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "2\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "-3\n", + "('entry in row: ', 3, ' column: ', 1)\n", + "3\n", + "('entry in row: ', 3, ' column: ', 2)\n", + "4\n", + "('entry in row: ', 3, ' column: ', 3)\n", + "0\n", + "Enter the elements of matrix 2\n", + "number of rows, m = 3\n", + "number of columns, n = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "3\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "4\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "-1\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "-3\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "0\n", + "('entry in row: ', 3, ' column: ', 1)\n", + "-1\n", + "('entry in row: ', 3, ' column: ', 2)\n", + "1\n", + "('entry in row: ', 3, ' column: ', 3)\n", + "2\n", + "Addition 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" + ] + } + ], + "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", + "\n", + "def 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", + "\n", + "mat1=[]\n", + "mat2=[]\n", + "Z=[]\n", + "print \"Enter the elements of matrix 1\"\n", + "mat1=getmat() #function call\n", + "print \"Enter the elements of matrix 2\"\n", + "mat2=getmat() #function call\n", + "print \"Addition of \\n matrix 1\",mat1,\"and \\n matrix 2\",mat2,\"is \\n\",matrixADD(mat1,mat2) #function call to add \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 179" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The multiplication of the two matrices AB is\n", + "[14, 4]\n", + "[8, 9]\n", + "[7, 13]\n", + "[8, 2]\n" + ] + } + ], + "source": [ + "\n", + "# Program to multiply two matrices using nested loops\n", + "\n", + "# 3x3 matrix\n", + "X = [[1,0,4],\n", + " [2,1,1],\n", + " [3,1,0],\n", + " [0,2,2]]\n", + "# 3x4 matrix\n", + "Y = [[2,4],\n", + " [1,1],\n", + " [3,0]]\n", + "# result is 3x4\n", + "result = [[0,0],\n", + " [0,0],\n", + " [0,0,],\n", + " [0,0]]\n", + "\n", + "# iterate through rows of X\n", + "for 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]\n", + "print \"The multiplication of the two matrices AB is\"\n", + "\n", + "for r in result:\n", + " print(r)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 02:BASIC STRUCTURES: SETS, FUNCTIONS, SEQUENCES, SUMS AND MATRICES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 181" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the elements of the matrix\n", + "number of rows = 2\n", + "number of columns = 3\n", + "('entry in row: ', 1, ' column: ', 1)\n", + "1\n", + "('entry in row: ', 1, ' column: ', 2)\n", + "2\n", + "('entry in row: ', 1, ' column: ', 3)\n", + "3\n", + "('entry in row: ', 2, ' column: ', 1)\n", + "4\n", + "('entry in row: ', 2, ' column: ', 2)\n", + "5\n", + "('entry in row: ', 2, ' column: ', 3)\n", + "6\n", + "The transpose is\n", + "[1, 4]\n", + "[2, 5]\n", + "[3, 6]\n", + "[8, 2]\n" + ] + } + ], + "source": [ + "# Program to transpose a matrix using nested loop\n", + "# iterate through rows\n", + "def 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", + " \n", + "def 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", + "\n", + "print \"Enter the elements of the matrix\"\n", + "getmat()\n", + "#mattrans(mat1)\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/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 new file mode 100644 index 00000000..645ce13f --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chap2_1.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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {"collapsed": 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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 02: Basic Structures: Sets, Functions, Sequences, Sums and Matrices", "cell_type": "markdown", "metadata": {}}, {"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 new file mode 100644 index 00000000..fe652a17 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1.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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {"collapsed": 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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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/chapter1_(3).ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3).ipynb new file mode 100755 index 00000000..408d2fa2 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3).ipynb @@ -0,0 +1,394 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 01:Page 02" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The following sentences are Propositions\n", + "1. Washington D.C is the capital of the United States of America\n", + "2. Toronto is the capital of Canada\n", + "3. 1+1=2.\n", + "4. 2+2=3.\n" + ] + } + ], + "source": [ + "print \"The following sentences are Propositions\" #Proposition should be a declarative sentence or should result in either a YES or a NO.\n", + "\n", + "print \"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 02:Page 02" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. What time is it? \n", + "2. Read this carefully. \n", + "3. x+1=2.\n", + "4. x+y=Z.\n", + "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" + ] + } + ], + "source": [ + "print \"1. What time is it? \\n2. Read this carefully. \\n3. x+1=2.\\n4. x+y=Z.\"\n", + "print\"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 03:Page 03" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "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" + ] + } + ], + "source": [ + "print \"Propositon p=Michael's PC runs Linux.\"\n", + "print \"\\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\"\n", + "print \"\\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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 04:Page 03" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p=Vandana's smartphone has at least 32GB of memory.\n", + "The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\n", + "Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\n", + "Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\n" + ] + } + ], + "source": [ + "print \"Let p=Vandana's smartphone has at least 32GB of memory.\"\n", + "print \"The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\"\n", + "print \"Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\"\n", + "print \"Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 05:Page 04" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p,q be two propositions\n", + "Let p= Rebecca's PC has more than 16GB free hard disk space \n", + "Let q= The processor in Rebecca's PC runs faster than 1GHz\n", + "Conjunction 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" + ] + } + ], + "source": [ + "p=\"Rebecca's PC has more than 16GB free hard disk space\"\n", + "q=\"The processor in Rebecca's PC runs faster than 1GHz\"\n", + "print \"Let p,q be two propositions\"\n", + "print \"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print \"Conjunction of p^q is : \"+p+\" and \"+q #conjunction combines two propositons with \"and\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 06:Page 05" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p,q be two propositions\n", + "Let p= Rebecca's PC has more than 16GB free hard disk space \n", + "Let q= The processor in Rebecca's PC runs faster than 1GHz\n", + "Disjunction 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" + ] + } + ], + "source": [ + "p=\"Rebecca's PC has more than 16GB free hard disk space\"\n", + "q=\"The processor in Rebecca's PC runs faster than 1GHz\"\n", + "print \"Let p,q be two propositions\"\n", + "print \"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print \"Disjunction of p\\/q is : \"+p+\" or \"+q #unavailability of cup symbol. So \\/\n", + "#Disjunction combines two propositons using OR \n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 07:Page 07" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p= Maria learns discrete mathematics \n", + "Let q= Maria will find a good job\n", + "p->q is : If Maria learns discrete mathematics then Maria will find a good job\n", + "p->q is also expressed as : Maria will find a good job when Maria learns discrete mathematics\n" + ] + } + ], + "source": [ + "p=\"Maria learns discrete mathematics\"\n", + "q=\"Maria will find a good job\"\n", + "print\"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print\"p->q is : \"+\"If \"+p+\" then \"+q #p->q p implies q means If P then Q.\n", + "print\"p->q is also expressed as :\",q,\" when \",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01:Page 37" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p( 4 ) which is the statement 4 >3, is true\n", + "p( 2 ) which is the statement 2 >3, is false\n" + ] + } + ], + "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\"\n", + "p(4)#Fuction call \n", + "p(2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02:Page 38" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\n", + "A( CS1 ) is true.\n", + "A( CS2 ) is false.\n", + "A( MATH1 ) is true.\n" + ] + } + ], + "source": [ + "x1=\"CS1\" #Defining systems to check whether they are under attack through a function.\n", + "x2=\"CS2\"\n", + "x3=\"MATH1\"\n", + "def 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.\"\n", + "print \"Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\"\n", + "A(x1)#Function call \n", + "A(x2)\n", + "A(x3)\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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3)_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3)_1.ipynb new file mode 100755 index 00000000..408d2fa2 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_(3)_1.ipynb @@ -0,0 +1,394 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 01:Page 02" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The following sentences are Propositions\n", + "1. Washington D.C is the capital of the United States of America\n", + "2. Toronto is the capital of Canada\n", + "3. 1+1=2.\n", + "4. 2+2=3.\n" + ] + } + ], + "source": [ + "print \"The following sentences are Propositions\" #Proposition should be a declarative sentence or should result in either a YES or a NO.\n", + "\n", + "print \"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 02:Page 02" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. What time is it? \n", + "2. Read this carefully. \n", + "3. x+1=2.\n", + "4. x+y=Z.\n", + "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" + ] + } + ], + "source": [ + "print \"1. What time is it? \\n2. Read this carefully. \\n3. x+1=2.\\n4. x+y=Z.\"\n", + "print\"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 03:Page 03" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "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" + ] + } + ], + "source": [ + "print \"Propositon p=Michael's PC runs Linux.\"\n", + "print \"\\n Negation of p is ~p : It is not the case that Michael's PC runs Linux.\"\n", + "print \"\\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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 04:Page 03" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p=Vandana's smartphone has at least 32GB of memory.\n", + "The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\n", + "Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\n", + "Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\n" + ] + } + ], + "source": [ + "print \"Let p=Vandana's smartphone has at least 32GB of memory.\"\n", + "print \"The negation of p is ( ~p ) :It is not the case that Vandana's smartphone has at least 32GB of memory.\"\n", + "print \"Or in simple English ( ~p ): Vandana's smartphone does not have at least 32GB of memory.\"\n", + "print \"Or even more simple as ( ~p ): Vandana's smartphone has less than 32GB of memory.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 05:Page 04" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p,q be two propositions\n", + "Let p= Rebecca's PC has more than 16GB free hard disk space \n", + "Let q= The processor in Rebecca's PC runs faster than 1GHz\n", + "Conjunction 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" + ] + } + ], + "source": [ + "p=\"Rebecca's PC has more than 16GB free hard disk space\"\n", + "q=\"The processor in Rebecca's PC runs faster than 1GHz\"\n", + "print \"Let p,q be two propositions\"\n", + "print \"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print \"Conjunction of p^q is : \"+p+\" and \"+q #conjunction combines two propositons with \"and\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 06:Page 05" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p,q be two propositions\n", + "Let p= Rebecca's PC has more than 16GB free hard disk space \n", + "Let q= The processor in Rebecca's PC runs faster than 1GHz\n", + "Disjunction 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" + ] + } + ], + "source": [ + "p=\"Rebecca's PC has more than 16GB free hard disk space\"\n", + "q=\"The processor in Rebecca's PC runs faster than 1GHz\"\n", + "print \"Let p,q be two propositions\"\n", + "print \"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print \"Disjunction of p\\/q is : \"+p+\" or \"+q #unavailability of cup symbol. So \\/\n", + "#Disjunction combines two propositons using OR \n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 07:Page 07" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Let p= Maria learns discrete mathematics \n", + "Let q= Maria will find a good job\n", + "p->q is : If Maria learns discrete mathematics then Maria will find a good job\n", + "p->q is also expressed as : Maria will find a good job when Maria learns discrete mathematics\n" + ] + } + ], + "source": [ + "p=\"Maria learns discrete mathematics\"\n", + "q=\"Maria will find a good job\"\n", + "print\"Let p=\",p,\"\\n\",\"Let q=\",q\n", + "print\"p->q is : \"+\"If \"+p+\" then \"+q #p->q p implies q means If P then Q.\n", + "print\"p->q is also expressed as :\",q,\" when \",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01:Page 37" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p( 4 ) which is the statement 4 >3, is true\n", + "p( 2 ) which is the statement 2 >3, is false\n" + ] + } + ], + "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\"\n", + "p(4)#Fuction call \n", + "p(2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 01:THE FOUNDATIONS: LOGIC AND PROOFS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02:Page 38" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\n", + "A( CS1 ) is true.\n", + "A( CS2 ) is false.\n", + "A( MATH1 ) is true.\n" + ] + } + ], + "source": [ + "x1=\"CS1\" #Defining systems to check whether they are under attack through a function.\n", + "x2=\"CS2\"\n", + "x3=\"MATH1\"\n", + "def 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.\"\n", + "print \"Systems under attack are CS1 and MATH1. The truth values for the same are calculated using functions.\"\n", + "A(x1)#Function call \n", + "A(x2)\n", + "A(x3)\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/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 new file mode 100644 index 00000000..fe652a17 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter1_1.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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {"collapsed": 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": "#Chapter 01: The Foundations: Logic and Proofs", "cell_type": "markdown", "metadata": {}}, {"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.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3.ipynb new file mode 100755 index 00000000..251e4767 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 03:ALGORITHMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 195" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found number 19 at the position 12\n" + ] + } + ], + "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\n", + "inputlist = [3,2,4,1,5]\n", + "print sort_insertion(inputlist)\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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_1.ipynb new file mode 100755 index 00000000..251e4767 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_1.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 03:ALGORITHMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 195" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found number 19 at the position 12\n" + ] + } + ], + "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\n", + "inputlist = [3,2,4,1,5]\n", + "print sort_insertion(inputlist)\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/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 new file mode 100644 index 00000000..e1c0050e --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_2.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/chapter3_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.ipynb new file mode 100644 index 00000000..e1c0050e --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter3_3.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.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4.ipynb new file mode 100755 index 00000000..91c1e06d --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4.ipynb @@ -0,0 +1,743 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 239" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quotient when 101 is divided by 11 is 9 = 101 div 11 and the remainder is 2 = 101 mod 11\n" + ] + } + ], + "source": [ + "#To find the quotient and remainder \n", + "dividend=101\n", + "divisor=11\n", + "quotient=dividend/divisor #To find quotient\n", + "remainder=dividend%divisor #To find remainder\n", + "dividend=(divisor*quotient)+remainder\n", + "print \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 240" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quotient when -11 is divided by 3 is -4 = -11 div 3 and the remainder is 1 = -11 mod 3\n" + ] + } + ], + "source": [ + "#To find the quotient and remainder\n", + "dividend=-11\n", + "divisor=3\n", + "quotient=dividend/divisor\n", + "remainder=dividend%divisor\n", + "dividend=(divisor*quotient)+remainder\n", + "print \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 246" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter a number: 101011111\n", + "351\n" + ] + } + ], + "source": [ + "#To convert binary to decimal equivalent\n", + "binary_num= raw_input('enter a number: ')\n", + "decimal = 0\n", + "for digit in binary_num:\n", + " decimal = decimal*2 + int(digit)\n", + "\n", + "print decimal\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 247" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter a number: 2AE0B\n", + "The conversion of 2AE0B to hexadeimal is 175627\n" + ] + } + ], + "source": [ + "#To convert decimal to hexadecimal\n", + "dec= raw_input('enter a number: ')\n", + "\n", + "print \"The conversion of\",dec,\"to hexadeimal is\",int(dec,16)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a number12345\n", + "The decimal number 12345 is converted to its octal equivalent : 3 0 0 7 1\n" + ] + } + ], + "source": [ + "#To compute decimal to octal\n", + "numbers= []\n", + "dec=input(\"Enter a number\");\n", + "num=dec\n", + "while dec!=0:\n", + " \n", + " rem=dec%8\n", + " dec=dec/8\n", + " numbers.append(rem)\n", + "print \"The decimal number\",num,\"is converted to its octal equivalent : \",\n", + "for i in reversed(numbers):\n", + " print i,\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 248" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the decimal number which is to be converted to hexadecimal177130\n", + "The hexadecimal equivalent of decimal 177130 is 0 2 B 3 E A\n" + ] + } + ], + "source": [ + "#To convert Decimal to hexadecimal\n", + "num=[]\n", + "def 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 )\n", + "dec_num=input(\"Enter the decimal number which is to be converted to hexadecimal\");\n", + "ChangeHex(dec_num)\n", + "print \"The hexadecimal equivalent of decimal\",dec_num,\"is\",\n", + "for i in reversed(num):\n", + " print i,\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 249" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a decimal number241\n", + "\n", + "The binary equivalent of decimal 241 is 1 1 1 1 0 0 0 1\n" + ] + } + ], + "source": [ + "#Compute Decimal to Binary\n", + "array=[]\n", + "def 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) \n", + "dec_num=input(\"Enter a decimal number\")\n", + "conv(dec_num)\n", + "print \"The binary equivalent of decimal\",dec_num,\"is\",\n", + "for i in reversed(array):\n", + " print i,\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 249" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the first number: 1110\n", + "enter the second number: 1011\n", + "The sum of binary numbers 1110 and 1011 is 11001\n" + ] + } + ], + "source": [ + "#To compute the binary addition\n", + "def 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]\n", + "bin1 = raw_input('enter the first number: ')\n", + "bin2 = raw_input('enter the second number: ')\n", + "print \"The sum of binary numbers\",bin1,\"and\",bin2,\"is\",binAdd(bin1,bin2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 258" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number for which the prime factors have to be found100\n", + "[2, 2, 5, 5]\n" + ] + } + ], + "source": [ + "#to find the prime factors\n", + "\n", + "def 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\n", + "number=input(\"Enter the number for which the prime factors have to be found\");\n", + "a=prime_factors(number)\n", + "print a\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 258" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number101\n", + "101 is prime\n" + ] + } + ], + "source": [ + "#To say if a number is prime or not\n", + "globals() ['count']=0\n", + "n=input(\"Enter the number\");\n", + "for 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\n", + "if count==0:\n", + " print n,\"is prime\" \n", + "else:\n", + " print n,\"is not prime because its divisible by\",num\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 259" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number for which the prime factors have to be found7007\n", + "[7, 7, 11, 13]\n" + ] + } + ], + "source": [ + "#to find the prime factors\n", + "\n", + "def 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\n", + "number=input(\"Enter the number for which the prime factors have to be found\");\n", + "a=prime_factors(number)\n", + "print a\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10: Page 263" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number24\n", + "Enter the second number36\n", + "GCD( 24 , 36 ) is 12\n" + ] + } + ], + "source": [ + "#To compute GCD\n", + "def 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)\n", + "n1=input(\"Enter the first number\");\n", + "n2=input(\"Enter the second number\");\n", + "print \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11: Page 263" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number17\n", + "Enter the second number22\n", + "GCD( 17 , 22 ) is 1\n" + ] + } + ], + "source": [ + "#To compute GCD\n", + "def 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)\n", + "n1=input(\"Enter the first number\");\n", + "n2=input(\"Enter the second number\");\n", + "print \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16: Page 268" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number414\n", + "Enter the second number662\n", + "gcd( 414 , 662 )is 2\n" + ] + } + ], + "source": [ + "#to find gcd using euclidean algorithm\n", + "def 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\n", + "num1=input(\"Enter the first number\");\n", + "num2=input(\"Enter the second number\");\n", + "gcd(num1,num2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17: Page 270" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number252\n", + "Enter the second number198\n", + "gcd( 252 , 198 )is 18\n" + ] + } + ], + "source": [ + "#to find gcd using euclidean algorithm\n", + "def 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\n", + "num1=input(\"Enter the first number\");\n", + "num2=input(\"Enter the second number\");\n", + "gcd(num1,num2)\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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_1.ipynb new file mode 100755 index 00000000..91c1e06d --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_1.ipynb @@ -0,0 +1,743 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 239" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quotient when 101 is divided by 11 is 9 = 101 div 11 and the remainder is 2 = 101 mod 11\n" + ] + } + ], + "source": [ + "#To find the quotient and remainder \n", + "dividend=101\n", + "divisor=11\n", + "quotient=dividend/divisor #To find quotient\n", + "remainder=dividend%divisor #To find remainder\n", + "dividend=(divisor*quotient)+remainder\n", + "print \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 240" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The quotient when -11 is divided by 3 is -4 = -11 div 3 and the remainder is 1 = -11 mod 3\n" + ] + } + ], + "source": [ + "#To find the quotient and remainder\n", + "dividend=-11\n", + "divisor=3\n", + "quotient=dividend/divisor\n", + "remainder=dividend%divisor\n", + "dividend=(divisor*quotient)+remainder\n", + "print \"The quotient when\",dividend,\"is divided by\",divisor,\"is\",quotient,\"=\",dividend,\"div\",divisor,\"and the remainder is\",remainder,\"=\",dividend,\"mod\",divisor\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 246" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter a number: 101011111\n", + "351\n" + ] + } + ], + "source": [ + "#To convert binary to decimal equivalent\n", + "binary_num= raw_input('enter a number: ')\n", + "decimal = 0\n", + "for digit in binary_num:\n", + " decimal = decimal*2 + int(digit)\n", + "\n", + "print decimal\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 247" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter a number: 2AE0B\n", + "The conversion of 2AE0B to hexadeimal is 175627\n" + ] + } + ], + "source": [ + "#To convert decimal to hexadecimal\n", + "dec= raw_input('enter a number: ')\n", + "\n", + "print \"The conversion of\",dec,\"to hexadeimal is\",int(dec,16)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a number12345\n", + "The decimal number 12345 is converted to its octal equivalent : 3 0 0 7 1\n" + ] + } + ], + "source": [ + "#To compute decimal to octal\n", + "numbers= []\n", + "dec=input(\"Enter a number\");\n", + "num=dec\n", + "while dec!=0:\n", + " \n", + " rem=dec%8\n", + " dec=dec/8\n", + " numbers.append(rem)\n", + "print \"The decimal number\",num,\"is converted to its octal equivalent : \",\n", + "for i in reversed(numbers):\n", + " print i,\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 248" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the decimal number which is to be converted to hexadecimal177130\n", + "The hexadecimal equivalent of decimal 177130 is 0 2 B 3 E A\n" + ] + } + ], + "source": [ + "#To convert Decimal to hexadecimal\n", + "num=[]\n", + "def 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 )\n", + "dec_num=input(\"Enter the decimal number which is to be converted to hexadecimal\");\n", + "ChangeHex(dec_num)\n", + "print \"The hexadecimal equivalent of decimal\",dec_num,\"is\",\n", + "for i in reversed(num):\n", + " print i,\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 249" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a decimal number241\n", + "\n", + "The binary equivalent of decimal 241 is 1 1 1 1 0 0 0 1\n" + ] + } + ], + "source": [ + "#Compute Decimal to Binary\n", + "array=[]\n", + "def 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) \n", + "dec_num=input(\"Enter a decimal number\")\n", + "conv(dec_num)\n", + "print \"The binary equivalent of decimal\",dec_num,\"is\",\n", + "for i in reversed(array):\n", + " print i,\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 249" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the first number: 1110\n", + "enter the second number: 1011\n", + "The sum of binary numbers 1110 and 1011 is 11001\n" + ] + } + ], + "source": [ + "#To compute the binary addition\n", + "def 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]\n", + "bin1 = raw_input('enter the first number: ')\n", + "bin2 = raw_input('enter the second number: ')\n", + "print \"The sum of binary numbers\",bin1,\"and\",bin2,\"is\",binAdd(bin1,bin2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 258" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number for which the prime factors have to be found100\n", + "[2, 2, 5, 5]\n" + ] + } + ], + "source": [ + "#to find the prime factors\n", + "\n", + "def 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\n", + "number=input(\"Enter the number for which the prime factors have to be found\");\n", + "a=prime_factors(number)\n", + "print a\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 258" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number101\n", + "101 is prime\n" + ] + } + ], + "source": [ + "#To say if a number is prime or not\n", + "globals() ['count']=0\n", + "n=input(\"Enter the number\");\n", + "for 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\n", + "if count==0:\n", + " print n,\"is prime\" \n", + "else:\n", + " print n,\"is not prime because its divisible by\",num\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 259" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number for which the prime factors have to be found7007\n", + "[7, 7, 11, 13]\n" + ] + } + ], + "source": [ + "#to find the prime factors\n", + "\n", + "def 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\n", + "number=input(\"Enter the number for which the prime factors have to be found\");\n", + "a=prime_factors(number)\n", + "print a\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10: Page 263" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number24\n", + "Enter the second number36\n", + "GCD( 24 , 36 ) is 12\n" + ] + } + ], + "source": [ + "#To compute GCD\n", + "def 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)\n", + "n1=input(\"Enter the first number\");\n", + "n2=input(\"Enter the second number\");\n", + "print \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11: Page 263" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number17\n", + "Enter the second number22\n", + "GCD( 17 , 22 ) is 1\n" + ] + } + ], + "source": [ + "#To compute GCD\n", + "def 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)\n", + "n1=input(\"Enter the first number\");\n", + "n2=input(\"Enter the second number\");\n", + "print \"GCD(\",n1,\",\",n2,\") is\",gcd(n1,n2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16: Page 268" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number414\n", + "Enter the second number662\n", + "gcd( 414 , 662 )is 2\n" + ] + } + ], + "source": [ + "#to find gcd using euclidean algorithm\n", + "def 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\n", + "num1=input(\"Enter the first number\");\n", + "num2=input(\"Enter the second number\");\n", + "gcd(num1,num2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# 04:NUMBER THEORY AND CRYPTOGRAPHY" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17: Page 270" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number252\n", + "Enter the second number198\n", + "gcd( 252 , 198 )is 18\n" + ] + } + ], + "source": [ + "#to find gcd using euclidean algorithm\n", + "def 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\n", + "num1=input(\"Enter the first number\");\n", + "num2=input(\"Enter the second number\");\n", + "gcd(num1,num2)\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/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 new file mode 100644 index 00000000..074d0a2b --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_2.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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {"collapsed": 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/chapter4_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.ipynb new file mode 100644 index 00000000..074d0a2b --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter4_3.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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 04: Number Theory and Cryptography", "cell_type": "markdown", "metadata": {"collapsed": 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.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5.ipynb new file mode 100755 index 00000000..14960493 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5.ipynb @@ -0,0 +1,312 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 346" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of f( 1 ) is 9\n", + "The value of f( 2 ) is 21\n", + "The value of f( 3 ) is 45\n", + "The value of f( 4 ) is 93\n" + ] + } + ], + "source": [ + "#to compute the recursive functions\n", + "def 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\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a number whose factorial is to be found4\n", + "The factorial of 4 is 24\n" + ] + } + ], + "source": [ + "#To compute the factorial of a given number using recursion\n", + "def factorial(n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return n*factorial(n-1) #recursive function call\n", + "num=input(\"Enter a number whose factorial is to be found\");\n", + "print \"The factorial of\",num,\"is\",factorial(num);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number5\n", + "Enter the power4\n", + "The value of 5 to the power 4 is 625\n" + ] + } + ], + "source": [ + "#To compute power using recursive algorithm\n", + "def power(a,n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return a*power(a,n-1) #recursive call algorithm\n", + "num=input(\"Enter the number\");\n", + "p=input(\"Enter the power\");\n", + "print \"The value of\",num,\"to the power\",p,\"is\",power(num,p);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number5\n", + "Enter the second number8\n", + "The gcd of 5 , 8 is 1\n" + ] + } + ], + "source": [ + "#To compute gcd using modular recursion\n", + "def gcd(a,b):\n", + " if a==0:\n", + " return b\n", + " else:\n", + " return gcd(b%a,a) #recursive call\n", + "\n", + "num1=input(\"Enter the first number\")\n", + "num2=input(\"Enter the second number\")\n", + "print \"The gcd of\",num1,\",\",num2,\"is\",gcd(num1,num2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number2\n", + "Enter the power5\n", + "Enter the modulo number3\n", + "The answer of mpower( 2 , 5 , 3 ) is 2\n" + ] + } + ], + "source": [ + "#To compute mpower function using recursion\n", + "def 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\n", + "number=input(\"Enter the number\")\n", + "power=input(\"Enter the power\")\n", + "modulo=input(\"Enter the modulo number\");\n", + "print \"The answer of mpower(\",number,\",\",power,\",\",modulo,\") is\",mpower(number,power,modulo)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 09: Page 367" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the numbers to be merge sorted8,2,4,6,9,7,10,1,5,3\n", + "Ther Merge sort is ['1', '10', '2', '3', '4', '5', '6', '7', '8', '9']\n" + ] + } + ], + "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\n", + "l=[]\n", + "r=[]\n", + "l=raw_input(\"enter the numbers to be merge sorted\").split(\",\")\n", + "r=msort2(l)\n", + "print \"Ther Merge sort is\", r\n" + ] + }, + { + "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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_1.ipynb new file mode 100755 index 00000000..14960493 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_1.ipynb @@ -0,0 +1,312 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 346" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of f( 1 ) is 9\n", + "The value of f( 2 ) is 21\n", + "The value of f( 3 ) is 45\n", + "The value of f( 4 ) is 93\n" + ] + } + ], + "source": [ + "#to compute the recursive functions\n", + "def 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\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a number whose factorial is to be found4\n", + "The factorial of 4 is 24\n" + ] + } + ], + "source": [ + "#To compute the factorial of a given number using recursion\n", + "def factorial(n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return n*factorial(n-1) #recursive function call\n", + "num=input(\"Enter a number whose factorial is to be found\");\n", + "print \"The factorial of\",num,\"is\",factorial(num);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number5\n", + "Enter the power4\n", + "The value of 5 to the power 4 is 625\n" + ] + } + ], + "source": [ + "#To compute power using recursive algorithm\n", + "def power(a,n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return a*power(a,n-1) #recursive call algorithm\n", + "num=input(\"Enter the number\");\n", + "p=input(\"Enter the power\");\n", + "print \"The value of\",num,\"to the power\",p,\"is\",power(num,p);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number5\n", + "Enter the second number8\n", + "The gcd of 5 , 8 is 1\n" + ] + } + ], + "source": [ + "#To compute gcd using modular recursion\n", + "def gcd(a,b):\n", + " if a==0:\n", + " return b\n", + " else:\n", + " return gcd(b%a,a) #recursive call\n", + "\n", + "num1=input(\"Enter the first number\")\n", + "num2=input(\"Enter the second number\")\n", + "print \"The gcd of\",num1,\",\",num2,\"is\",gcd(num1,num2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number2\n", + "Enter the power5\n", + "Enter the modulo number3\n", + "The answer of mpower( 2 , 5 , 3 ) is 2\n" + ] + } + ], + "source": [ + "#To compute mpower function using recursion\n", + "def 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\n", + "number=input(\"Enter the number\")\n", + "power=input(\"Enter the power\")\n", + "modulo=input(\"Enter the modulo number\");\n", + "print \"The answer of mpower(\",number,\",\",power,\",\",modulo,\") is\",mpower(number,power,modulo)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 09: Page 367" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the numbers to be merge sorted8,2,4,6,9,7,10,1,5,3\n", + "Ther Merge sort is ['1', '10', '2', '3', '4', '5', '6', '7', '8', '9']\n" + ] + } + ], + "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\n", + "l=[]\n", + "r=[]\n", + "l=raw_input(\"enter the numbers to be merge sorted\").split(\",\")\n", + "r=msort2(l)\n", + "print \"Ther Merge sort is\", r\n" + ] + }, + { + "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/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 new file mode 100644 index 00000000..dd13690b --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_2.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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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/chapter5_3.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.ipynb new file mode 100644 index 00000000..dd13690b --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter5_3.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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 05: Induction and Recursion", "cell_type": "markdown", "metadata": {}}, {"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 new file mode 100644 index 00000000..485e6b32 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6.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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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/chapter6_(1).ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_(1).ipynb new file mode 100755 index 00000000..16677df3 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_(1).ipynb @@ -0,0 +1,594 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total ways to assign offices to these employees is 132\n" + ] + } + ], + "source": [ + "n=2 #number of employees\n", + "r=12 #number of office rooms\n", + "ways_alloc_sanchez=12\n", + "ways_alloc_patel=11\n", + "\n", + "#By PRODUCT RULE\n", + "print \"Total ways to assign offices to these employees is\",ways_alloc_sanchez*ways_alloc_patel\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of chairs that can be labelled with an alphabet and an integer is 2600\n" + ] + } + ], + "source": [ + "alphabets=26 #Total number of alphabets\n", + "posint=100 #Total positive numbers not beyond 100\n", + "\n", + "#number of chairs to be labelled with a alphabet and an integer using product rule\n", + "print \"Total number of chairs that can be labelled with an alphabet and an integer is\",alphabets*posint\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of ports 768\n" + ] + } + ], + "source": [ + "mc=32 #total number of microcomputers\n", + "port=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", + "\n", + "print \"total number of ports\",mc*port\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06 Counting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total different bit strings of lenth seven are 128\n" + ] + } + ], + "source": [ + "bits=2 #possible bits either 0 or 1\n", + "ns=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\n", + "print \"Total different bit strings of lenth seven are\",bits**ns\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 387" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total number of choices are 17576000\n" + ] + } + ], + "source": [ + "letters=26 #number of letters in english alphabet\n", + "no_of_letters=3 #number of letters \n", + "choices=10 #number of choices for each letter\n", + "result=1#in order to avoid junk values. Assigned it to 1.\n", + "for i in range(0,no_of_letters):\n", + " result=result*letters*choices\n", + "print \"The total number of choices are\",result" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 407" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of ways to select 3 students from a group of 5 students to line up for a picture is 60\n", + "The number of ways to select 5 students from a group of 5 students to line up for a picture is 120\n" + ] + } + ], + "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", + "\n", + "print \"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\n", + "print \"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of people100\n", + "Enter the prizes3\n", + "The number of ways to decide the prize winners is 970200\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of people\")\n", + "perm=input(\"Enter the prizes\")\n", + "print \"The number of ways to decide the prize winners is\",permutation(num,perm) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of runners8\n", + "Enter the number of prizes3\n", + "The number of ways to decide the prize winners is 336\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of runners\")\n", + "perm=input(\"Enter the number of prizes\")\n", + "print \"The number of ways to decide the prize winners is\",permutation(num,perm)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of cities8\n", + "The number of possible ways to decide the path is 5040\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of cities\") \n", + "print \"The number of possible ways to decide the path is\",calc(num)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10: Page 410" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of elements4\n", + "Enter the combinations2\n", + "The number of combinations are 6\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of elements\")\n", + "comb=input(\"Enter the combinations\")\n", + "print \"The number of combinations are \",combination(num,comb)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12: Page 412" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of members in a team10\n", + "Enter the number of players5\n", + "The number of combinations are 252\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of members in a team\")\n", + "comb=input(\"Enter the number of players\")\n", + "print \"The number of combinations are \",combination(num,comb) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13: Page 412" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the total number of astronauts30\n", + "Enter the number of astronauts to be selected 6\n", + "The total number of combinations of selected astronauts to Mars are 593775\n" + ] + } + ], + "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\n", + "num=input(\"Enter the total number of astronauts\")\n", + "comb=input(\"Enter the number of astronauts to be selected \")\n", + "print \"The total number of combinations of selected astronauts to Mars are \",combination(num,comb) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15: Page 413" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the total number of faculty in computer science department9\n", + "Enter the number of faculty to be selected for computer science department3\n", + "Enter the total number of faculty in maths department11\n", + "Enter the number of faculty to be selected for maths department4\n", + "The total number of combinations of selected faculties are 27720\n" + ] + } + ], + "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\n", + "num1=input(\"Enter the total number of faculty in computer science department\")\n", + "comb1=input(\"Enter the number of faculty to be selected for computer science department\")\n", + "num2=input(\"Enter the total number of faculty in maths department\")\n", + "comb2=input(\"Enter the number of faculty to be selected for maths department\")\n", + "\n", + "print \"The total number of combinations of selected faculties are \",combination(num1,comb1)*combination(num2,comb2) #Function call\n" + ] + }, + { + "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/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_(1)_1.ipynb b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_(1)_1.ipynb new file mode 100755 index 00000000..16677df3 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_(1)_1.ipynb @@ -0,0 +1,594 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total ways to assign offices to these employees is 132\n" + ] + } + ], + "source": [ + "n=2 #number of employees\n", + "r=12 #number of office rooms\n", + "ways_alloc_sanchez=12\n", + "ways_alloc_patel=11\n", + "\n", + "#By PRODUCT RULE\n", + "print \"Total ways to assign offices to these employees is\",ways_alloc_sanchez*ways_alloc_patel\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total number of chairs that can be labelled with an alphabet and an integer is 2600\n" + ] + } + ], + "source": [ + "alphabets=26 #Total number of alphabets\n", + "posint=100 #Total positive numbers not beyond 100\n", + "\n", + "#number of chairs to be labelled with a alphabet and an integer using product rule\n", + "print \"Total number of chairs that can be labelled with an alphabet and an integer is\",alphabets*posint\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of ports 768\n" + ] + } + ], + "source": [ + "mc=32 #total number of microcomputers\n", + "port=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", + "\n", + "print \"total number of ports\",mc*port\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06 Counting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 386" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total different bit strings of lenth seven are 128\n" + ] + } + ], + "source": [ + "bits=2 #possible bits either 0 or 1\n", + "ns=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\n", + "print \"Total different bit strings of lenth seven are\",bits**ns\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 387" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total number of choices are 17576000\n" + ] + } + ], + "source": [ + "letters=26 #number of letters in english alphabet\n", + "no_of_letters=3 #number of letters \n", + "choices=10 #number of choices for each letter\n", + "result=1#in order to avoid junk values. Assigned it to 1.\n", + "for i in range(0,no_of_letters):\n", + " result=result*letters*choices\n", + "print \"The total number of choices are\",result" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 407" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of ways to select 3 students from a group of 5 students to line up for a picture is 60\n", + "The number of ways to select 5 students from a group of 5 students to line up for a picture is 120\n" + ] + } + ], + "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", + "\n", + "print \"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\n", + "print \"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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of people100\n", + "Enter the prizes3\n", + "The number of ways to decide the prize winners is 970200\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of people\")\n", + "perm=input(\"Enter the prizes\")\n", + "print \"The number of ways to decide the prize winners is\",permutation(num,perm) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 05: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of runners8\n", + "Enter the number of prizes3\n", + "The number of ways to decide the prize winners is 336\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of runners\")\n", + "perm=input(\"Enter the number of prizes\")\n", + "print \"The number of ways to decide the prize winners is\",permutation(num,perm)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 06: Page 409" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of cities8\n", + "The number of possible ways to decide the path is 5040\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of cities\") \n", + "print \"The number of possible ways to decide the path is\",calc(num)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10: Page 410" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of elements4\n", + "Enter the combinations2\n", + "The number of combinations are 6\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of elements\")\n", + "comb=input(\"Enter the combinations\")\n", + "print \"The number of combinations are \",combination(num,comb)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12: Page 412" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number of members in a team10\n", + "Enter the number of players5\n", + "The number of combinations are 252\n" + ] + } + ], + "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\n", + "num=input(\"Enter the number of members in a team\")\n", + "comb=input(\"Enter the number of players\")\n", + "print \"The number of combinations are \",combination(num,comb) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13: Page 412" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the total number of astronauts30\n", + "Enter the number of astronauts to be selected 6\n", + "The total number of combinations of selected astronauts to Mars are 593775\n" + ] + } + ], + "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\n", + "num=input(\"Enter the total number of astronauts\")\n", + "comb=input(\"Enter the number of astronauts to be selected \")\n", + "print \"The total number of combinations of selected astronauts to Mars are \",combination(num,comb) #function call\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 06:COUNTING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15: Page 413" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the total number of faculty in computer science department9\n", + "Enter the number of faculty to be selected for computer science department3\n", + "Enter the total number of faculty in maths department11\n", + "Enter the number of faculty to be selected for maths department4\n", + "The total number of combinations of selected faculties are 27720\n" + ] + } + ], + "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\n", + "num1=input(\"Enter the total number of faculty in computer science department\")\n", + "comb1=input(\"Enter the number of faculty to be selected for computer science department\")\n", + "num2=input(\"Enter the total number of faculty in maths department\")\n", + "comb2=input(\"Enter the number of faculty to be selected for maths department\")\n", + "\n", + "print \"The total number of combinations of selected faculties are \",combination(num1,comb1)*combination(num2,comb2) #Function call\n" + ] + }, + { + "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/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 new file mode 100644 index 00000000..485e6b32 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/chapter6_1.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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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": "#Chapter 06: Counting", "cell_type": "markdown", "metadata": {}}, {"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 new file mode 100644 index 00000000..9f76c123 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2.png differ 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 new file mode 100644 index 00000000..9f76c123 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch2_1.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 new file mode 100644 index 00000000..6d747624 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4.png differ 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 new file mode 100644 index 00000000..6d747624 Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch4_1.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 new file mode 100644 index 00000000..c5cb06bb Binary files /dev/null and b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/ch5.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 new file mode 100644 index 00000000..14960493 --- /dev/null +++ b/Discrete_Mathematics_and_its_Applications_by_Kenneth_H.Rosen/screenshots/chapter5.ipynb @@ -0,0 +1,312 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 346" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of f( 1 ) is 9\n", + "The value of f( 2 ) is 21\n", + "The value of f( 3 ) is 45\n", + "The value of f( 4 ) is 93\n" + ] + } + ], + "source": [ + "#to compute the recursive functions\n", + "def 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\n", + "for 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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 01: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter a number whose factorial is to be found4\n", + "The factorial of 4 is 24\n" + ] + } + ], + "source": [ + "#To compute the factorial of a given number using recursion\n", + "def factorial(n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return n*factorial(n-1) #recursive function call\n", + "num=input(\"Enter a number whose factorial is to be found\");\n", + "print \"The factorial of\",num,\"is\",factorial(num);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 02: Page 361" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number5\n", + "Enter the power4\n", + "The value of 5 to the power 4 is 625\n" + ] + } + ], + "source": [ + "#To compute power using recursive algorithm\n", + "def power(a,n):\n", + " if n==0:\n", + " return 1\n", + " else:\n", + " return a*power(a,n-1) #recursive call algorithm\n", + "num=input(\"Enter the number\");\n", + "p=input(\"Enter the power\");\n", + "print \"The value of\",num,\"to the power\",p,\"is\",power(num,p);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 03: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the first number5\n", + "Enter the second number8\n", + "The gcd of 5 , 8 is 1\n" + ] + } + ], + "source": [ + "#To compute gcd using modular recursion\n", + "def gcd(a,b):\n", + " if a==0:\n", + " return b\n", + " else:\n", + " return gcd(b%a,a) #recursive call\n", + "\n", + "num1=input(\"Enter the first number\")\n", + "num2=input(\"Enter the second number\")\n", + "print \"The gcd of\",num1,\",\",num2,\"is\",gcd(num1,num2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 04: Page 362" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter the number2\n", + "Enter the power5\n", + "Enter the modulo number3\n", + "The answer of mpower( 2 , 5 , 3 ) is 2\n" + ] + } + ], + "source": [ + "#To compute mpower function using recursion\n", + "def 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\n", + "number=input(\"Enter the number\")\n", + "power=input(\"Enter the power\")\n", + "modulo=input(\"Enter the modulo number\");\n", + "print \"The answer of mpower(\",number,\",\",power,\",\",modulo,\") is\",mpower(number,power,modulo)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 05:INDUCTION AND RECURSION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 09: Page 367" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "enter the numbers to be merge sorted8,2,4,6,9,7,10,1,5,3\n", + "Ther Merge sort is ['1', '10', '2', '3', '4', '5', '6', '7', '8', '9']\n" + ] + } + ], + "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\n", + "l=[]\n", + "r=[]\n", + "l=raw_input(\"enter the numbers to be merge sorted\").split(\",\")\n", + "r=msort2(l)\n", + "print \"Ther Merge sort is\", r\n" + ] + }, + { + "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/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter4.png b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter4.png new file mode 100755 index 00000000..106927af Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter4.png differ diff --git a/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter8.png b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter8.png new file mode 100755 index 00000000..523adeb5 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter8.png differ diff --git a/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter9.png b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter9.png new file mode 100755 index 00000000..ab9b0bc1 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS/screenshots/chapter9.png differ diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1.ipynb new file mode 100755 index 00000000..b3b1bd27 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1.ipynb @@ -0,0 +1,829 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "#Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10.ipynb new file mode 100755 index 00000000..c6f2d5ac --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10.ipynb @@ -0,0 +1,325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\n" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb new file mode 100644 index 00000000..1bf81061 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_1.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb new file mode 100644 index 00000000..1bf81061 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_2.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb new file mode 100644 index 00000000..1bf81061 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_3.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb new file mode 100644 index 00000000..1bf81061 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_4.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb new file mode 100644 index 00000000..1bf81061 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter10_5.ipynb @@ -0,0 +1,316 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Optical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the photon = 6211 Å\n", + " The colour of the photon is red\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E2 = 5.56*10**-19; # Higher Energy level in J\n", + "E1 = 2.36*10**-19; # Lower Energy level in J\n", + "h = 6.626*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "\n", + "# Calculations\n", + "dE = E2 - E1; # Energy difference in J\n", + "lamda = (h*c)/float(dE); # wavelength in m\n", + " \n", + "\n", + "# Result\n", + "\n", + "print'Wavelength of the photon = %d'%(lamda*10**10),'Å';\n", + "print' The colour of the photon is red';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2,Page No:10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Wavelength for which diamond is opaque is Imax = 2219 Å\n", + "\n", + " Note: Imax is wrongly printed as 220 Å in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "E = 5.6; # bandgap in eV\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(E*e) # wavelength in m\n", + "\n", + "#output\n", + "print'Maximum Wavelength for which diamond is opaque is Imax = %d '%(lamda*10**10),'Å';\n", + "print'\\n Note: Imax is wrongly printed as 220 Å in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of radiation = 2.0719 eV\n", + "Rate of energy gap varies with addition of GaP is 0.00830 eV/mol %\n", + "mol percent to be added to get an energy gap of 2.0719 eV is 78.54 mol %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant\n", + "c = 3*10**8; # velocity of light\n", + "lamda = 0.6*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron\n", + "EGap = 2.25; # energy in eV\n", + "EGas = 1.42; # energy in eV\n", + "\n", + "#Calculations\n", + "E = (h*c)/float(lamda*e); # Energy in eV\n", + "p_change = (EGap - EGas)/float(100); #rate of energy gap\n", + "x = (E-EGas)/float(p_change); #mol % of GaP to be added to get an energy gap of E\n", + "\n", + "# Result\n", + "print'Energy of radiation = %3.4f'%E,'eV';\n", + "print'Rate of energy gap varies with addition of GaP is %3.5f'%p_change,'eV/mol %';\n", + "print'mol percent to be added to get an energy gap of %3.4f'%E,'eV','is %3.2f'%x,'mol %';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of the metastable state E3 = 2.2e-19 J\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1.1*10**-6; # wavelength in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "E2 = 0.4*10**-19; # energy level in joules\n", + "\n", + "\n", + "#Calculations\n", + "E3 = E2 + ((h*c)/float(lamda)); #energy in J\n", + "\n", + "#Result\n", + "print'Energy of the metastable state E3 = %3.1e'%E3,'J';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5,Page No:10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of Optical modes = 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "c = 3*10**8; # velocity of light in m\n", + "L = 1.5; #length in m\n", + "n = 1.0204; # refractive index \n", + "BW = 1.5*10**9; # Bandwidth in Hz\n", + "\n", + "# Calculations\n", + "dV = c/float(2*L*n); #frequency in Hz\n", + "N = BW/float(dV); # Number of optical nodes\n", + "\n", + "# Result\n", + "print'Number of Optical modes = % d'%N;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Numerical aperture = 0.248\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.55; # refractive index of core\n", + "n2 = 1.53; # refractive index of cladding\n", + "\n", + "\n", + "# Calculations\n", + "NA = math.sqrt(n1**2 - n2**2);\n", + "\n", + "\n", + "#Result\n", + "print'Numerical aperture = %3.3f'%NA;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7,Page No:10.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For angles above 48.75° ,there will be total internal reflection in water\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.33; #refractive index of water\n", + "n2 = 1; # refractive index of air\n", + "\n", + "# Calculations\n", + "theta_c = math.asin((n2/n1))\n", + "theta_c_deg = theta_c*(180/float(math.pi)); # radian to degree conversion\n", + "\n", + "# Result\n", + "print'For angles above %3.2f° ,there will be total internal reflection in water'%theta_c_deg ;\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb new file mode 100644 index 00000000..51ab5318 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_1.ipynb @@ -0,0 +1,811 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb new file mode 100644 index 00000000..51ab5318 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_2.ipynb @@ -0,0 +1,811 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb new file mode 100644 index 00000000..7a93f17f --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_3.ipynb @@ -0,0 +1,811 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb new file mode 100644 index 00000000..7a93f17f --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_4.ipynb @@ -0,0 +1,811 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb new file mode 100644 index 00000000..7a93f17f --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter1_5.ipynb @@ -0,0 +1,811 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Chapter 1:Crystal Structure,Bonding and Defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.1,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lattice Constant a = 4.00 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "p = 6250; # Density of crystal in kg/m**3\n", + "N = 6.023*10**26; #Avagadros number in atoms/kilomole\n", + "M = 60.2; #molecular weight per mole\n", + "n = 4; #No. of atoms per unit cell for FCC\n", + "\n", + "#Calculations\n", + "\n", + "a = ((n*M)/float(N*p))**(1/float(3)); #Lattice Constant Å\n", + "\n", + "#result\n", + "\n", + "print'Lattice Constant a = %3.2f'%(a*10**10),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2,Page No:1.8" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 6.30 Å\n", + "d110 = 4.45 Å\n", + "d111 = 3.64 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indice\n", + "k1 = 1; # miller indice\n", + "l1 = 1; # miller indice\n", + "h0 = 0; # miller indice\n", + "k0 = 0; # miller indice\n", + "l0 = 0; # miller indice\n", + "p = 1980; # Density of KCl in kg/m**3\n", + "N = 6.023*10**26; # Avagadros number in atoms/kilomole\n", + "M = 74.5; # molecular weight of KCl\n", + "n = 4; # No. of atoms per unit cell for FCC\n", + "\n", + "# calculations\n", + "a = ((n*M)/float(N*p))**(1/float(3));\n", + "\n", + "#dhkl = a/math.sqrt((h**2)+(k**2)+(l**2)); #interplanar distance\n", + "d100 = a/math.sqrt((h1**2)+(k0**2)+(l0**2)); # interplanar distance\n", + "d110 = a/math.sqrt((h1**2)+(k1**2)+(l0**2)); # interplanar distance\n", + "d111 = a/math.sqrt((h1**2)+(k1**2)+(l1**2)); # interplanar distance\n", + "\n", + "# Output\n", + "print'd100 = %3.2f'%(d100*10**10),'Å';\n", + "print'd110 = %3.2f'%(d110*10**10),'Å';\n", + "print'd111 = %3.2f'%(d111*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3,Page No:1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 4 2\n" + ] + } + ], + "source": [ + "import math\n", + "import fractions\n", + "\n", + "#variable declaration\n", + "h = 4; #miller indices\n", + "k = 1; #miller indices\n", + "l = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h,k);\n", + "lcm = (h*k)/float(d);\n", + "e = fractions.gcd(lcm,l);\n", + "lc = (lcm*l)/float(e); #finding lcm\n", + "h1 =1/float(h); \n", + "k1 =1/float(k);\n", + "l1 =1/float(l);\n", + "a = h1*lc; #miller indices\n", + "b = k1*lc; #miller indices\n", + "c = l1*lc; #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d '%a,'%d'%b,'%d'%c;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 4 3 6\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,4b,2c\n", + "#from the law of rational indices\n", + "#3a:4b:2c=a/h:b/k:c/l\n", + "\n", + "#Variable Declaration\n", + "h1 = 3; #miller indices\n", + "k1 = 4; #miller indices\n", + "l1 = 2; #miller indices\n", + " \n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e); #finding lcm\n", + "\n", + "h = lc*1/float(h1); #miller indices \n", + "k = lc*1/float(k1); #miller indices\n", + "l= lc*1/float(l1); #miller indices\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + " \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5,Page No:1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 6 3 -4\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1; #miller indices\n", + "k1 = 2; #miller indices\n", + "l1 = 3; #miller indices \n", + "\n", + "#calculation\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h2 = 1;\n", + "k2 = 1/float(k1);\n", + "l2 = -2/float(l1)\n", + "h = h2*lc; #miller indices \n", + "k = (k2)*(lc); #miller indices \n", + "l = (l2)*(lc); #miller indices \n", + "\n", + "#result\n", + "print'miller indices = %3.0f'%h,'%3.0f'%k,'%3.0f'%l;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6,Page No:1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 1 1 2\n", + "Note:printing mistake of miller indices in textbook \n", + "\n", + "\n", + "miller indices = 1 2 0\n", + "\n", + "miller indices = 1 2 1\n", + "Note:calculation mistake in textbook\n", + "\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are 3a,3b,2c\n", + "#from the law of rational indices\n", + "#3a:3b:2c=a/h:b/k:c/l\n", + "#variable declaration\n", + "a = 4;\n", + "b = 4;\n", + "c = 2;\n", + "a1 = 2;\n", + "b1 = 1;\n", + "c1 = 1;\n", + "a3 = 1;\n", + "b3 = 1;\n", + "c3 = 1;\n", + "h12 = 1/float(2); #miller indices\n", + "k12 = 1; #miller indices\n", + "#l12 = 1/math.inf; #miller indices\n", + "l12 =0;\n", + "h13 = 1; #miller indices\n", + "k13 = 2; #miller indices\n", + "l13 = 1; #miller indices\n", + "\n", + "\n", + "#calculation\n", + "d = fractions.gcd(a,b);\n", + "lcm = (a*b)/float(d);\n", + "e = fractions.gcd(lcm,c);\n", + "lc = (lcm*c)/float(e); #finding lcm \n", + "h1 = 1/float(4); #miller indices\n", + "k1 = 1/float(4); #miller indices\n", + "l1 = 1/float(2); #miller indices\n", + "h = h1*(lc); #miller indices\n", + "k = (k1)*(lc); #miller indices\n", + "l = (l1)*(lc); #miller indices\n", + "\n", + "d = fractions.gcd(a1,b1);\n", + "lcm = (a1*b1)/float(d);\n", + "e = fractions.gcd(lcm,c1);\n", + "lc1 = (lcm*c1)/float(e);\n", + "# 1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "h3 = h12*(lc1); #miller indices\n", + "k3 = (k12)*(lc1); #miller indices\n", + "l3 = (l12)*(lc1); #miller indices\n", + "\n", + "\n", + "d = fractions.gcd(a3,b3);\n", + "lcm = (a3*b3)/float(d);\n", + "e = fractions.gcd(lcm,c3);\n", + "lc2 = (lcm*c3)/float(e);\n", + "h4 = h13*(lc2); #miller indices\n", + "k4 = k13*(lc2); #miller indices\n", + "l4 = l13*(lc2); #miller indices\n", + "\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'Note:printing mistake of miller indices in textbook \\n';\n", + "print'\\nmiller indices = %d'%h3,'%d'%k3,'%d'%l3;\n", + "print'\\nmiller indices = %d'%h4,'%d'%k4,'%d'%lc2;\n", + "print'Note:calculation mistake in textbook\\n';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.7,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d100 = 1.00 a\n", + "d111 = 0.58 a\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1; #miller indices\n", + "k = 0; #miller indices\n", + "l = 0; #miller indices\n", + "h1 = 1; #miller indices\n", + "k1 = 1; #miller indices\n", + "l1 = 1; #miller indices\n", + "\n", + "#calculations\n", + "d100 = 1/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + "d111 = 1/float(math.sqrt((h1**2)+(k1**2)+(l1**2)));\n", + "\n", + "#result\n", + "print'd100 = %3.2f a'%d100;\n", + "print'd111 = %3.2f a'%d111;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8,Page No:1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices = 2 1 0\n", + "interplanar distance is =4.47 Å\n" + ] + } + ], + "source": [ + "import fractions\n", + "\n", + "#variable declaration\n", + "#intercepts given are a,2b,-3c/2\n", + "#from the law of rational indices\n", + "#a:2b:-3c/2=a/h:b/k:c/l\n", + "\n", + "\n", + "#variable declaration\n", + "h1 = 1;\n", + "k1 = 2;\n", + "l1 = 1;\n", + "a = 10*10**-9; \n", + "\n", + "#calculation\n", + "h12 = 1; #miller indices\n", + "k12 = 1/float(k1); #miller indices\n", + "l12 = 0; #miller indices\n", + "\n", + "#1/%inf = 0 ; (1/2 1/1 0/1) hence lcm is taken for [2 1 1]\n", + "d = fractions.gcd(h1,k1);\n", + "lcm = (h1*k1)/float(d);\n", + "e = fractions.gcd(lcm,l1);\n", + "lc = (lcm*l1)/float(e);\n", + "h = h12*(lcm); #miller indices\n", + "k = (k12)*(lcm); #miller indices\n", + "l = (l12)*(lcm); #miller indices\n", + "d = a/float(((h**2)+(k**2)+(l**2))**(1/float(2)));\n", + "\n", + "\n", + "#result\n", + "print'miller indices = %d'%h,'%d'%k,'%d'%l;\n", + "print'interplanar distance is =%3.2f'%(d*10**9),'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.9,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inter planar spacing =1.32e-10 m/n\n", + "Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable Declaration\n", + "\n", + "r = 0.175*10**-9; #radius in m\n", + "h = 2; #miller indices\n", + "k = 3; #miller indices\n", + "l = 1; #miller indices\n", + "\n", + "#calculation\n", + "a = (4*r)/math.sqrt(2);\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2)));\n", + " \n", + "#result\n", + "print'inter planar spacing =%3.2e'%dhkl,'m/n';\n", + "print'Note : calculation mistake in textbook in calculating in dhkl,r value istaken as 0.125*10**-9 instead of 0.175*10**-9 ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.10,Page No:1.17" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two atoms =1.732 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "a = 4; #lattice constant in Å\n", + "\n", + "#calculation\n", + "d = (math.sqrt(3)*a)/float(4); #distance between two atoms in Å\n", + " \n", + "#result\n", + "print'distance between two atoms =%3.3f'%d,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 1.11,Page No:1.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.431 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.41; #lattice constant in Å\n", + "theta = 8.8; # angle in degrees\n", + "n = 1;\n", + "\n", + "#calculation\n", + "\n", + "lamda = (2*d*(math.sin(theta*math.pi/float(180))))/float(n); #wavelength in Å\n", + "\n", + "\n", + "#result\n", + "print'wavelength=%3.3f'%lamda,'Å';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.12,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength =0.7822 Å\n", + "glancing angle =18.2 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "d = 2.5; #spacing in angstroms\n", + "theta = 9; #glancing angle in degrees\n", + "n1 = 1;\n", + "n2 = 2;\n", + "\n", + "\n", + "#calculation\n", + "lamda = (2*math.sin(theta*(math.pi/180))*d); #wavelength Å\n", + "theta = math.asin((2*lamda)/float(2*d)); #glancing angle in °\n", + "\n", + "#result\n", + "print'wavelength =%3.4f'%lamda,'Å';\n", + "print'glancing angle =%3.1f'%(theta*(180/math.pi)),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.13,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant=1.15 Å\n", + "note:printing mistake in textbook in calculation part,n value is printed as 2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 2; #wavelength in angstroms\n", + "theta1 = 60; #angle in degrees\n", + "n = 1;\n", + " \n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "#calculation\n", + "d = (n*lamda)/(2*math.sin(theta1*math.pi/float(180))); #lattice constant in Å\n", + "\n", + "#result\n", + "print'lattice constant=%3.2f'%d,'Å';\n", + "print'note:printing mistake in textbook in calculation part,n value is printed as 2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.14,Page No:1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle=37.32 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda = 1.4*10**-10; #wavelength in angstroms\n", + "a = 2*10**-10; #lattice parameter in angstroms\n", + "h = 1; #miller indices\n", + "k = 1; #miller indices\n", + "l = 1; #miller indices\n", + "n = 1;\n", + "#formula\n", + "#2*d*math.sin(theta)=n*lamda\n", + "\n", + "#calculation\n", + "\n", + "dhkl = a/float(math.sqrt((h**2)+(k**2)+(l**2))); #inter planar spacing\n", + "theta = math.asin((n*lamda)/float(2*dhkl)); #angle in °\n", + "\n", + "#result\n", + "print'angle=%3.2f'%(theta*(180/float(math.pi))),'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.15,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of neutron =7.33e+02 m/n\n", + " Note:calculation mistake in text book in calculating wavelength \n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "d = 3.84 *10**-10; #spacing between planes in m\n", + "theta = 45; #glancing angle in degrees\n", + "m = 1.67*10**-27; #mass ef electron\n", + "h = 6.62*10**-34; #planck's constant\n", + "n = 1; #braggg reflextion \n", + "v = 5.41*10**-10;\n", + " \n", + "#calculation\n", + "#lamda = 2*d*(1/math.sqrt(2));\n", + "lamda = (n*h)/float(m*v); #wavelength of neutron\n", + "\n", + "#result\n", + "print'wavelength of neutron =%3.2e'%lamda,'m/n';\n", + "print' Note:calculation mistake in text book in calculating wavelength ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 1.16,Page No:1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter = 2 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; # mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "n = 1; #bragg's reflection\n", + "h1 = 6.62*10**-34; #planck's constant J.s\n", + "n = 1; #bragg reflecton \n", + "V = 200; #voltage in V\n", + "theta = 22; #observed reflection\n", + " \n", + "#calculation\n", + "\n", + "lamda = h1/math.sqrt(2*m*e*V);\n", + "dhkl = (n*lamda)/float(2*math.sin(theta*math.pi/180));\n", + "a = dhkl*math.sqrt(3); #lattice parameter in Å\n", + " \n", + "#result\n", + " \n", + "print'lattice parameter =%3.0f'%(a*10**10),'Å';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2.ipynb new file mode 100755 index 00000000..1cfc005c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2.ipynb @@ -0,0 +1,281 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb new file mode 100644 index 00000000..8b0abd3c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_(1).ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb new file mode 100644 index 00000000..1cfc005c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_1.ipynb @@ -0,0 +1,281 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb new file mode 100644 index 00000000..8b0abd3c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_2.ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb new file mode 100644 index 00000000..8b0abd3c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_3.ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb new file mode 100644 index 00000000..8b0abd3c --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter2_4.ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 2:Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 2.1,Page No:2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest three permissable quantum energies are E1 = 6 eV\n", + " E2 = 24 eV\n", + " E3 = 54 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 2.5*10**-10; # width of infinite square well\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "n2 = 2; #number of permiissable quantum\n", + "n3 = 3; #number of permiissable quantum\n", + "\n", + "# Calculations\n", + "E1 = (h**2)/float(8*m*a**2*e); # first lowest permissable quantum energy in eV\n", + "E2 = n2**2 *E1; # second lowest permissable quantum energy in eV\n", + "E3 = n3**2 *E1; # second lowest permissable quantum energy in eV\n", + "\n", + "# Result\n", + "print'Lowest three permissable quantum energies are E1 = %d'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %d'%E3,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2,Page No:2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy Difference = 113.21 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 10**-10; # width of infinite square well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; #energy level constant\n", + "n2 = 2; #energy level constant\n", + "\n", + "# calculations\n", + "E1 = ((n1**2)*(h**2))/float(8*m*(a**2)*e); # ground state energy in eV\n", + "E2 = ((n2**2)*(h**2))/float(8*m*(a**2)*e); # first excited state in energy in eV\n", + "dE = E2-E1 # difference between first excited and ground state(E2 - E1)\n", + "\n", + "#Result\n", + "print'Energy Difference = %3.2f '%dE,'eV';\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "First Three Energy levels are \n", + " E1 = 1.51 eV\n", + " E2 = 6 eV\n", + " E3 = 13.59 eV\n", + "\n", + " Above calculation shows that the energy of the bound electron cannot be continuous\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "a = 5*10**-10; # width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "n1 = 1; # energy level constant\n", + "n2 = 2; # energy level constant\n", + "n3 = 3; # energy level constant\n", + "\n", + "#Calculations\n", + "E1 = ((n1**2)*(h**2))/(8*m*(a**2)*e); # first energy level in eV\n", + "E2 = ((n2**2)*(h**2))/(8*m*(a**2)*e); # second energy level in eV\n", + "E3 = ((n3**2)*(h**2))/(8*m*(a**2)*e); # third energy level in eV\n", + "\n", + "# Result\n", + "print'First Three Energy levels are \\n E1 = %3.2f'%E1,'eV';\n", + "print' E2 = %d'%E2,'eV';\n", + "print' E3 = %3.2f'%E3,'eV';\n", + "print'\\n Above calculation shows that the energy of the bound electron cannot be continuous';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,Page No:2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lowest energy bandwidth = 0.452 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 1.054*10**-34; #plancks constant in J.s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "a = 5*10**-10; #width of infinite potential well in m\n", + "e = 1.6*10**-19; # charge of electron coulombs\n", + "\n", + "# Calculations\n", + "#cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)\n", + "#to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π\n", + "# for ka = 0 in above eq becomes\n", + "# 1 = 10*sin(αa))/(αa)) + cos(αa)\n", + "# This gives αa = 2.628 rad\n", + "# ka = π , αa = π\n", + "# sqrt((2*m*E2)/h**2)*a = π\n", + "\n", + "E2 = ((math.pi*math.pi)*h**2)/(2*m*a**2*e); #energy in eV\n", + "E1 = ((2.628**2)*h**2)/(2*m*a**2*e); #for αa = 2.628 rad energy in eV\n", + "dE = E2 - E1; #lowest energy bandwidth in eV\n", + "\n", + "# Result\n", + "print'Lowest energy bandwidth = %3.3f'%dE,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,Page No:2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron Momentum for first Brillouin zone appearance = 1.105e-24 eV\n", + "\n", + " Energy of free electron with this momentum = 4.2 eV\n", + "\n", + " Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "a = 3*10**-10; # side of 2d square lattice in m\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# calculations\n", + "#p = h*k # momentum of the electron\n", + "k = math.pi/float(a); # first Brillouin zone\n", + "p = (h/float(2*math.pi))*(math.pi/float(a)); # momentum of electron\n", + "E = (p**2)/float(2*m*e) # Energyin eV\n", + "\n", + "#Result\n", + "print'Electron Momentum for first Brillouin zone appearance = %g'%p,'eV';\n", + "print'\\n Energy of free electron with this momentum = %4.1f'%E,'eV';\n", + "print'\\n Note: in Textbook Momentum value is wrongly printed as 1.1*10**-10';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3.ipynb new file mode 100755 index 00000000..6a5b90a9 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3.ipynb @@ -0,0 +1,889 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,' watt/kg';\n", + " " + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb new file mode 100644 index 00000000..64f5bc0b --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_1.ipynb @@ -0,0 +1,880 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,'watt/kg';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb new file mode 100644 index 00000000..64f5bc0b --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_2.ipynb @@ -0,0 +1,880 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,'watt/kg';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb new file mode 100644 index 00000000..740a15e5 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_3.ipynb @@ -0,0 +1,882 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Note:magnetisation sign is printed wrong in textbook\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Note:magnetisation sign is printed wrong in textbook';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "Note:calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'Note:calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,'watt/kg';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb new file mode 100644 index 00000000..740a15e5 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_4.ipynb @@ -0,0 +1,882 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Note:magnetisation sign is printed wrong in textbook\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Note:magnetisation sign is printed wrong in textbook';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "Note:calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'Note:calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,'watt/kg';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb new file mode 100644 index 00000000..740a15e5 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter3_5.ipynb @@ -0,0 +1,882 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1,Page No:3.2" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 9.319e-24 Am**2\n", + "Bohr magneton = 9.28e-24 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "r = 0.53*10**-10; # orbit radius m\n", + "n = 6.6*10**15; # frequency of revolution of electronHz\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "h = 6.63*10**-34; # plancks constant in J.s\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "\n", + "# Calculations\n", + "i = e*n # current produced due to electron\n", + "A = math.pi*r*r # Area in m^2\n", + "u = i*A; # magnetic moment A*m^2\n", + "ub = (e*h)/float(4*math.pi*m); # Bohr magneton in J/T\n", + "\n", + "#result\n", + "print'Magnetic moment = %3.3e'%u,'Am**2';\n", + "print'Bohr magneton = %3.2e'%ub,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2,Page No:3.4" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic moment = 2.87e+02 A-m**2\n", + "\n", + " Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ur = 1150; # relative permeability\n", + "n = 500; # turns per m\n", + "V = 10**-3; # volume of iron rod in m**3\n", + "i = 0.5; # current in amp\n", + "\n", + "#Calculations\n", + "#B = uo(H+M)\n", + "# B = uH, u/uo = ur\n", + "# M = (ur - 1)H\n", + "#if current is flowing through a solenoid having n turns/l then H = ni\n", + "\n", + "M = (ur - 1)*n*i # magnetisation\n", + "m = M*V; # magnetic moment\n", + " \n", + "#Output\n", + "print'Magnetic moment = %3.2e'%m,' A-m**2';\n", + "print'\\n Note: Instead of 2.87*10**2, 2.87*10**-2 is printed in textbook';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Moment of the rod = 2.1 A-m**2\n", + "Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "ur = 90; #relative permeability\n", + "n = 300; # turns per m\n", + "i = 0.5; # current in amp\n", + "d = 10*10**-3; # diameter of iron rod\n", + "l = 2; # length of iron rod\n", + "\n", + "#Calculations\n", + "V = math.pi*(d/float(2))**2 * l; #volume of rod\n", + "M = (ur - 1)*n*i; # magnetisation\n", + "m = M*V; # magnetic moment\n", + "\n", + "# Output\n", + "print'Magnetic Moment of the rod = %3.3g'%m,'A-m**2';\n", + "print'Note: In textbook length of iron rod given as 2m whereas in calculation it is wrongly taken as 0.2m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4,Page No:3.5" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in magnetic moment = 3.9e-29 J/T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 2; # magnetic field in tesla\n", + "r = 5.29*10**-11 # radius in m\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19 # charge of electron\n", + "\n", + "# calculations\n", + "du = (e**2 * Bo * r**2)/float(4*m); # change in magnetic moment(indicating oth in -ve and +ve values)\n", + "\n", + "#result\n", + "print'Change in magnetic moment = %3.1e'%du,'J/T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6,Page No:3.6" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature to which substance to be cooled = 7.7 K\n", + "Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "u1 = 3.3; # magnetic dipole moment\n", + "u = 9.24*10**-24;\n", + "B = 5.2; # magnetic field in tesla\n", + "k = 1.38*10**-23; # boltzmann constant\n", + "\n", + "# calculations\n", + "T = (u*u1*B)/float(1.5*k); # Temperature in Kelvin\n", + "\n", + "#result\n", + "print'Temperature to which substance to be cooled = %3.1f'%T,'K';\n", + "print'Note:Values given in question B = 52, u = 924*10**-24.Values substituted in calculation B = 5.2, u = 9.24*10**-24';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7,Page No:3.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetisation = -0.48 A/m\n", + "flux density = 0.14 Tesla\n", + "relative permeability = 0.999996\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable declaration\n", + "xm = -4.2*10**-6; # magnetic susceptibility in A.m**-1\n", + "H = 1.15*10**5; # magnetic field in A.m**-1\n", + "\n", + "#Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability N·A**-2\n", + "M = xm*H; # magnetisation in A.m**-1\n", + "B = uo*(H + M); # flux density in T\n", + "ur = 1+(M/float(H)); # relative permeability \n", + "\n", + "# result\n", + "print'Magnetisation = %3.2f'%M,'A/m';\n", + "print'flux density = %3.2f'%B,'Tesla'; \n", + "print'relative permeability = %f'%ur;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage increase = 0.0014 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = 1.4*10**-5; # magnetic susceptibility\n", + "# B = uoH\n", + "# B' = uruoH\n", + "# ur = 1+xm\n", + "# from above equations\n", + "#B' = (1+xm)B\n", + "# percentage increase in magnetic induction = ((B'-B)/B)*100\n", + "# y = (((1+xm)B - B)/B)*100\n", + "PI = xm*100; # percentage increase\n", + "\n", + "# Output\n", + "print'Percentage increase = %3.4f'%PI,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation = -0.02 A/m\n", + "Note:magnetisation sign is printed wrong in textbook\n", + "Magnetic flux density = 0.0126 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "xm = -0.2*10**-5; # magnetic susceptability in A.m**-1\n", + "H = 10**4; # magnetic field in A/m\n", + "\n", + "\n", + "# Calculations\n", + "uo = 4*math.pi*10**-7; # magnetic permeability\n", + "M = xm*H # magnetisation in A/m\n", + "B = uo*(H+M); # magnetic flux density in T\n", + "\n", + "# Output\n", + "print'magnetisation = %3.2f'%M,'A/m';\n", + "print'Note:magnetisation sign is printed wrong in textbook';\n", + "print'Magnetic flux density = %3.4f'%B,'T';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.10,Page No:3.8" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.000021\n", + "relative permeability =1.2567e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 2.1*10**-5; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.4e'%u,'N/A**2';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability =1.084000\n", + "relative permeability =1.362e-06 N/A**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sighem = 0.084; #magnetic susceptability\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = 1+(sighem); #permeability\n", + "u = u0*ur; #relative permeability in N/A**2\n", + "\n", + "#result\n", + "print'permeability =%3.6f'%ur;\n", + "print'relative permeability =%3.3e'%u,'N/A**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12,Page No:3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permiability =1.00267e+05\n", + " Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declarationn\n", + "u = 0.126; #permiability in N/A**2\n", + "u1 = 10**-7;\n", + "\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*u1;\n", + "ur = u/float(u0);\n", + "sighe = ur-1; #magnetic susceptability\n", + "\n", + "#result\n", + "print'relative permiability =%3.5e'%sighe;\n", + "print' Note:Calculation mistake in textbook in calculating sighe by taking ur as 10**5 instead of 100318.4';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.13,Page No:3.16" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = -1.1878e-07\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#diamagnetic susceptability of He\n", + "R = 0.6*10**-10; #mean radius of atom in m\n", + "N = 28*10**26; #avagadro number in per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "Z = 2; #atomic number\n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #atomic number\n", + "si = -(u0*Z*(e**2)*N*(R**2))/float(6*m); #susceptability of diamagnetic material \n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.4e'%si;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.14,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permiability =5.00e-04 N/A**2\n", + "susceptability =396.887358\n", + "Note:answer of permiability is wrong in textbook\n", + "Note: calcuation mistake in textbook in sighem\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "phi = 2*10**-5; #magnetic flux in Wb/m**2\n", + "H = 2*10**3; #in A/m\n", + "A = 0.2*10**-4; #area in m**2\n", + "\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "u = B/float(H); #permiability in A**-2\n", + "sighem = (u/float(u0))-1;\n", + " \n", + "#result\n", + "print'permiability =%3.2e'%u,'N/A**2';\n", + "print'susceptability =%4f'%sighem;\n", + "print'Note:answer of permiability is wrong in textbook';\n", + "print'Note: calcuation mistake in textbook in sighem';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15,Page No:3.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability of diamagnetic material = 5.61e-07\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "N = 6.5*10**25; #number of atoms in atoms per m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "m = 9.1*10**-31; #mass of electron inilograms\n", + "h = 6.6*10**-34; #planck's constant in J.s\n", + "T = 300; #temperature in K\n", + "k = 1.38*10**-23; #boltzman constant in J*(K**-1)\n", + "n = 1; #constant\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "M = n*((e*h)/float(4*math.pi*m)); #magnetic moment in A*m**2\n", + "sighe = (u0*N*(M**2))/float(3*k*T); #susceptability of diamagnetic material\n", + " \n", + "#result\n", + "print'susceptability of diamagnetic material = %3.2e'%sighe;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ampere turn =200 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 2.0; #length in m\n", + "A = 4*10**-4; #cross section sq.m\n", + "u = 50*10**-4; #permiability in H*m**-1\n", + "phi = 4*10**-4; #magnetic flux in Wb\n", + "\n", + "#calculation\n", + "B = phi/float(A); #magnetic flux density in Wb/m**2\n", + "NI = B/float(u); #ampere turn in A/m\n", + " \n", + "#result\n", + "print'ampere turn =%3.0f'%NI,'A/m';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "H = 5*10**3; #corecivity in A/m\n", + "l = 10**-1; #length in m\n", + "n = 500; #number of turns\n", + "\n", + "#calculation\n", + "N = n/float(l); #number of turns per m\n", + "i = H/float(N); #current in A\n", + " \n", + "#result\n", + "print'current =%1d'%i,'A';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18,Page No:3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of turns =5.128205\n", + " Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 6*10**-4; #area in m**2\n", + "l = 0.5; #length in m\n", + "u = 65*10**-4; #permiability in H/m\n", + "phi = 4*10**-5; #magnetic flux in Wb\n", + "\n", + "\n", + "#calculation\n", + "B = phi/float(A);\n", + "H = B/float(u);\n", + "N = H*l; #number of turns\n", + " \n", + "#result\n", + "print'number of turns =%1f'%N;\n", + "print' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19,Page No:3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptability =1908\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 0.2*10**-4; #area in m**2\n", + "H = 500; #magnetising field in A.m**-1\n", + "phi = 2.4*10**-5; # magnetic flux in Wb\n", + "\n", + "#calculation\n", + "u0 = 4*math.pi*10**-7;\n", + "B = phi/float(A); #magnetic flux density in N*A**-1 *m**-1\n", + "u = B/float(H); #permiability in N/m\n", + "fm = (u/float(u0))-1; #susceptability \n", + " \n", + "#result\n", + "print'susceptability =%3.2d'%fm;\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss of energy per hour =4800.00\n", + "Note:calculation mistake in textbook in calculating Lh\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #number of reversals/s in Hz\n", + "W = 50; #weight in kg\n", + "d = 7500; #density in kg/m^3\n", + "A = 200; #area in joules /m^3\n", + " \n", + "#calculation\n", + " \n", + "V = 1/float(d); #volume of 1 kg iron\n", + "E = A*V; #loss of energy per kg\n", + "L = f*E; #hysteresisloss/s in Joule/second\n", + "Lh = L*60*60; #loss per hour\n", + " \n", + "#calculation\n", + "print'loss of energy per hour =%3.2f'%Lh;\n", + "print'Note:calculation mistake in textbook in calculating Lh';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3.21,Page No:3.34" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total iron loss =2.97 watt/kg\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 50; #frequency in Hz\n", + "Bm = 1.1; #magnetic flux in Wb/m**2\n", + "t = 0.0005; #thickness of sheet \n", + "p = 30*10**-8*7800; #resistivity in ohms m\n", + "d = 7800; #density in kg/m**3\n", + "Hl = 380; #hysteresis loss per cycle in W-S/m**2\n", + "\n", + "#calculation\n", + "Pl = ((math.pi**2)*(f**2)*(Bm**2)*(t**2))/float(6*p); #eddy current loss\n", + "Hel = (Hl*f)/float(d); #hysteresis loss\n", + "Tl = Pl+Hel; #total iron loss watt/kg\n", + " \n", + "#result\n", + "print'total iron loss =%3.2f'%Tl,'watt/kg';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4.ipynb new file mode 100755 index 00000000..b824cd54 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4.ipynb @@ -0,0 +1,750 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical suseptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb new file mode 100644 index 00000000..a26aa20d --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_1.ipynb @@ -0,0 +1,732 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical suseptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb new file mode 100644 index 00000000..a26aa20d --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_2.ipynb @@ -0,0 +1,732 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical suseptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb new file mode 100644 index 00000000..b5443c89 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_3.ipynb @@ -0,0 +1,732 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical susceptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb new file mode 100644 index 00000000..b5443c89 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_4.ipynb @@ -0,0 +1,732 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical susceptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb new file mode 100644 index 00000000..b5443c89 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter4_5.ipynb @@ -0,0 +1,732 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Behaviour of Dielectric Materials in ac and dc Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1,Page No:4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of argon = 1.0005466\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "alpha = 1.8*10**-40; #polarisability of argon in Fm**2\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + "N1 = 6.02*10**23; #avagadro number in mol**-1\n", + "x = 22.4*10**3; #volume in m**3\n", + " \n", + "#formula\n", + "#er-1=N*p/e0*E=(N/e0)*alpha\n", + "#calculation\n", + "N = N1/float(x); #number of argon atoms in per unit volume in cm**3\n", + "N2 = N*10**6; #number of argon atoms in per unit volume in m**3\n", + "er = 1+((N2/float(e0)))*(alpha); #dielectric constant F/m\n", + "\n", + "\n", + "#result\n", + "print'dielectric constant of argon = %3.7f'%er;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement = 1.25e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 1.8*10**-40; #polarisability of argon in F*m^2\n", + "E = 2*10**5; # in V/m\n", + "z = 18;\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#p=18*e*x\n", + "#calculation\n", + "p = alpha*E;\n", + "x = p/float(18*e); #displacement in m\n", + "\n", + " \n", + "#result\n", + "print'displacement = %3.2e'%x,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "local field of benzene=4.40e+03 V/m\n", + "local field of water=-1.570e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E0 = 300*10**2; #local field in V/m\n", + "P1 = 3.398*10**-7; #dipole moment Coulomb/m\n", + "P2 = 2.124*10**-5; #dipole moment Coulomb/m\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + " \n", + " \n", + "#formula\n", + "#E10Ci=E0-(2*Pi/3*e0)\n", + "#calculation\n", + "E10C1 = E0-((2*P1)/float(3*e0)); #local field of benzene in V/m\n", + "E10C2 = E0-((2*P2)/float(3*e0)); #local field of water in V/m\n", + " \n", + "#result\n", + "print'local field of benzene=%3.2e'%E10C1,'V/m';\n", + "print'local field of water=%3.3e'%E10C2,'V/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4,Page No:4.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of benzene = 1.16e-37 F*m**2\n", + "polarisability of water = 4.04e-40 F*m**2\n", + "Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 5.12*10**-34; #p of benzene kg/m**3\n", + "p2 = 6.34*10**-34; #p of water kg/m**3\n", + "e10C1 = 4.4*10**3; #local field of benzene in V/m\n", + "e10C2 = 1570*10**3; #local field of water in V/m\n", + " \n", + " \n", + "#formula\n", + "#p=alphai*e10Ci\n", + "#calculation\n", + "alpha1 = p1/float(e10C1); #polarisability of benzene in F*m**2\n", + "alpha2 = p2/float(e10C2); #polarisability of water in F*m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisability of benzene = %3.2e'%alpha1,'F*m**2';\n", + "print'polarisability of water = %3.2e'%alpha2,'F*m**2';\n", + "print'Note: mistake in textbok,alpha1 value is printed as 1.16*10**-38 instead of 1.16*10**-37';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation of benzene = 6.80e-07 c/m**2\n", + "polarisation of water = 4.25e-05. c/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 8.85*10**-12; #abslute permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "E = 600*10**2; #strength in V/cm\n", + "er1 = 2.28; #dielectric constant of benzene in coulomb/m\n", + "er2 = 81; #dielectric constant of water in coulomb/m\n", + "\n", + "\n", + "#fomula\n", + "#p=e0*E*(er-1)\n", + "#calculation\n", + "pB = e0*E*(er1-1); #polarisation of benzene in c/m**2\n", + "pW = e0*E*(er2-1); #polarisation of water in c/m**2\n", + " \n", + "\n", + "#result\n", + "print'polarisation of benzene = %3.2e'%pB,'c/m**2';\n", + "print'polarisation of water = %3.2e.'%pW,'c/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage contribution from ionic polaristion = 59.82 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er0 = 5.6; #static dielectric cnstant of NaCl \n", + "n = 1.5; #optical index of refraction\n", + " \n", + "\n", + "#calculation\n", + "er = er0-n**2;\n", + "d = ((er/float(er0))*100); #percentage contribution from ionic polaristion in %\n", + " \n", + "#result \n", + "print'percentage contribution from ionic polaristion = %3.2f'%d,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation=1.69e-17 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 0.18*10**-40; #polarisability of He in F *m**2\n", + "E = 3*10**5; #constant in V/m\n", + "N = 2.6*10**25; #number of atoms in per m**3\n", + "e = 1.6*10**-19;\n", + " \n", + " \n", + "#formula\n", + "#P=N*p\n", + "#charge of He=2*electron charge\n", + "#p=2(e*d)\n", + "#calculation\n", + "P = N*alpha*E; #in coul/m**2\n", + "p = P/float(N); #polarisation of He in coul.m\n", + "d = p/float(2*e); #separation between charges in m\n", + " \n", + " \n", + "#result \n", + "print'separation=%3.2e'%d,'m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.8,Page No:4.10" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "oriental polarisation=9.66e-08 coul/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 10**27; #number of HCl molecules in molecules/m**3\n", + "E = 10**5; #electric field in V/m\n", + "P = 1.04*3.33*10**-30; #permanent dipole moment in coul.m\n", + "T = 300; #temperature in kelvin\n", + "K = 1.38*10**-23;\n", + " \n", + " \n", + "#calculation\n", + "P0 = (N*(P**2)*E)/float(3*K*T); #oriental polarisation in coul/m^2\n", + "\n", + " \n", + "#result\n", + "print'oriental polarisation=%3.2e'%P0,'coul/m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.9,Page No:4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative dielectric constant =1.0\n", + " Note: calculation mistake in text book in calculating relative dielectric constant\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 6.023*10**26; #avagadro number  (lb-mol)**-1\n", + "alpha = 3.28*10**-40; #polarisability in F*m**2\n", + "M = 32; #molecular weight in kilograms\n", + "p = 2.08*10**3; #density of sulphur in g/cm**3\n", + "e0 = 8.85*10**12; #permitivity in F/m\n", + "\n", + "#calculation\n", + "er = ((2*N*p*alpha)+(3*M*e0))/float((3*M*e0)-(N*p*alpha)); \n", + "\n", + "#result\n", + "\n", + "print'relative dielectric constant =%3.1f'%er;\n", + "print' Note: calculation mistake in text book in calculating relative dielectric constant';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10,Page No:4.12" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of electronic and ionic probabilities =1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "er = 4.94;\n", + "n = 1.64;\n", + "\n", + "\n", + "#calculation\n", + "#(alphae)/(alphai) =x\n", + "x = ((er-1)/float(er+2))*(((n**2)+2)/float((n**2)-1)); #ratio of electronic and ionic probabilities\n", + "\n", + "\n", + "#result\n", + "print'ratio of electronic and ionic probabilities =%3.1f'%x;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant=16.43\n", + "electrical suseptibility=1.3711e-10 c**2*N**-1*M**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "E = 1.46*10**-10; #permitivity in c**2*N**-1*m**-2\n", + "E0 = 8.885*10**-12; #permitivity in c**2*N**-1*m**-2\n", + "\n", + "\n", + "#calculation\n", + "Er = E/float(E0);\n", + "sighe = E0*(Er-1); #electrical susceptbility in c**2*N**-1*M**-2\n", + " \n", + " \n", + "#result\n", + "print'dielectric constant=%3.2f'%Er;\n", + "print'electrical suseptibility=%3.4e'%sighe,'c**2*N**-1*M**-2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12,Page No:4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisation=8.4e-07 cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 0.1; #radius in m\n", + "pw = 1; #density of water in g/ml\n", + "Mw = 18; # molecular mass of water \n", + "E = 6.0*10**-30; #dipole moment of water in cm\n", + "N = 6.0*10**26; #avagadro constant in (lb-mol)−1\n", + " \n", + " \n", + "#calculation\n", + "n = N*(4*(math.pi)*(r**3)*pw)/(Mw*3); #number of water molecules in a water drop \n", + "p = n*E; #polarisation in cm**2\n", + "\n", + "\n", + "#result\n", + "print'polarisation=%3.1e'%p,'cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric susceptibility=0.000074\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 1.000074; #dielectric constant for a gas at 0°C\n", + "\n", + "\n", + "#calculation\n", + "sighe = Er-1; #dielectric susceptibility\n", + " \n", + " \n", + "#result\n", + "print'dielectric susceptibility=%3.6f'%sighe;\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14,Page No:4.18" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free charge=2.65e-05 Coul/m**2\n", + "polarisation=5.31e-05 Coul/m\n", + "displacement=7.96e-05\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "E = 10**6; #dielectric in volts/s\n", + "er = 3; #dielectric in mm\n", + "e0 = 8.85*10**-12;\n", + "\n", + "\n", + "#calculation\n", + "E0 = er*E; #electric field in V/m\n", + "sigma = e0*E0; #free charge in Coul/m^2\n", + "P = e0*(er-1)*E0; #polarisation in coul/m\n", + "D = e0*er*E0; #displacement in in dielectric\n", + " \n", + " \n", + "#result\n", + "print'free charge=%3.2e'%sigma,'Coul/m**2';\n", + "print'polarisation=%3.2e'%P,'Coul/m';\n", + "print'displacement=%3.2e'%D; " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15,Page No:4.19" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 3.42e-11 Farad\n", + "charge =3.42e-10 coulomb\n", + "displacement =5.31e-07 c/m**2\n", + "polarisation =4.42e-07 c/m**2\n", + "Note:error in calculation of P,E value is taken as 5000 instead of 10**4\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.0*10**-3; #separation between plates in m\n", + "A = 6.45*10**-4; # surface area in m^2\n", + "e0 = 8.85*10**-12; #permitivity of electron in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "er = 6.0; #relative permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "V = 10; #voltage in V\n", + "E = 10; \n", + " \n", + " \n", + "#calculation\n", + "C = (e0*er*A)/float(d); #capacitance in Farad\n", + "q = C*V; #charge in coulomb\n", + "D = (e0*er*E)/float(10**-3); #displacement vector in c/m**2\n", + "P = D-(e0*E/float(10**-3)); #polarisation vector in c/m**2\n", + "\n", + "\n", + "#result\n", + "print'capacitance = %3.2e'%C,'Farad';\n", + "print'charge =%3.2e'%q,'coulomb';\n", + "print'displacement =%3.2e'%D,'c/m**2';\n", + "print'polarisation =%3.2e'%P,'c/m**2';\n", + "print'Note:error in calculation of P,E value is taken as 5000 instead of 10**4\\n';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.16,Page No:4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency = 8.84 KHz\n", + "phase difference = 45 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 18*10**-6; #relaxation time in s\n", + "er1 = 1; #permitivity in F/m\n", + "er = 1; #permitivity in F/m\n", + "t = 18*10**-6; #relaxation time in s\n", + " \n", + "#calculation\n", + "f = 1/float(2*math.pi*t); #frequency in Hz\n", + "theta_c = math.atan(er1/float(er));\n", + "#theta_c_deg = (theta_c*180)/float(math.pi);\n", + "#phi = 90-theta_c_deg; #phase difference in degrees\n", + " \n", + " \n", + "#result\n", + "print'frequency = %3.2f'%(f*10**-3),'KHz';\n", + "print'phase difference =%3.0f'%((theta_c*180)/float(math.pi)),'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5.ipynb new file mode 100755 index 00000000..a7c9ca96 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5.ipynb @@ -0,0 +1,1642 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 121, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 122, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 137, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 138, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 139, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 140, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 141, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'m';" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb new file mode 100644 index 00000000..4625b5fe --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_1.ipynb @@ -0,0 +1,1615 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb new file mode 100644 index 00000000..4625b5fe --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_2.ipynb @@ -0,0 +1,1615 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb new file mode 100644 index 00000000..87d00465 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_3.ipynb @@ -0,0 +1,1615 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb new file mode 100644 index 00000000..87d00465 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_4.ipynb @@ -0,0 +1,1615 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb new file mode 100644 index 00000000..87d00465 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter5_5.ipynb @@ -0,0 +1,1615 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Conductivity of Metals and Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.17e-07 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2*10**-3; #diameter in m \n", + "I = 5*10**-3; #current in A\n", + "e = 1.6*10**-19; #charge of electron in coulombs \n", + "a = 3.61*10**-10; #side of cube in m\n", + "N = 4; #number of atoms in per unit cell\n", + " \n", + " \n", + "#formula\n", + "#J=n*v*e\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "n = N/float(a**3); #number of atoms per unit volume in atoms/m**3\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in Amp/m**2\n", + "v = J/float(n*e); #average drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=1.06e-03 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 6; #current in A\n", + "d = 1*10**-3; #diameter in m\n", + "n = 4.5*10**28; #electrons available in electron/m**3\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "\n", + "#calculation\n", + "r = d/float(2); #radius in m\n", + "A = math.pi*(r**2); #area in m**2\n", + "J = I/float(A); #current density in A/m**3\n", + "vd = J/float(n*e); #density in m/s\n", + " \n", + " \n", + "#result\n", + "print'velocity=%3.2e'%vd,'m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3,Page No:5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=4.80e-06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 63.5; #atomic weight in kg\n", + "d = 8.92*10**3; #density of copper in kg/m**3\n", + "r = 0.7*10**-3; #radius in m\n", + "I = 10; #current in A\n", + "e = 1.6*10**-19; #charge of electronin coulomb\n", + "h = 6.02*10**28; #planck's constant in (m**2)*kg/s\n", + "\n", + "\n", + "#calculation\n", + "A = math.pi*(r**2); # area in m**2\n", + "N = h*d;\n", + "n = N/float(V);\n", + "J = I/float(A); #current density in m/s\n", + "vd = J/float(n*e); #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%2.2e'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restivity=1.82e-08 ohm m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.182; #resistance in ohm\n", + "l = 1; #length in m\n", + "A = 0.1*10**-6; #area in m**2\n", + "\n", + "#formula \n", + "#R=(p*l)/A\n", + "\n", + "#calculation\n", + "p = (R*A)/float(l); #resistivity in ohm m\n", + "\n", + "\n", + "#result\n", + "print'restivity=%3.2e'%p,'ohm m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5,Page No:5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity=0.7 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 5.8*10**28; #number of silver electrons in electrond/m**3\n", + "p = 1.45*10**-8; #resistivity in ohm m\n", + "E = 10**2; #electric field in V/m\n", + "e = 1.6*10**-19; \n", + "\n", + "\n", + "#formula\n", + "#sigma = n*e*u \n", + "#sigma=p\n", + "#calculation\n", + "u = 1/float(n*e*p);\n", + "vd = u*E; #drift velocity in m/s\n", + "\n", + "#result\n", + "print'velocity=%3.1f'%vd,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density=7.25e-03 m**2.V**-1.s**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W = 107.9; #atomic weight in amu(atomic mass unit)\n", + "p = 10.5*10**3; #density in kg/m**3\n", + "sigma =6.8*10**7; #conductivity in ohm**-1.m**-1\n", + "e =1.6*10**-19; #charge of electron in coulombs\n", + "N = 6.02*10**26; #avagadro number in mol**-1\n", + " \n", + "\n", + "#calculation\n", + "n = (N*p)/float(W); #number of atoms per unit volume \n", + "u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1\n", + "\n", + "\n", + "#result\n", + "print'density=%3.2e'%u,'m**2.V**-1.s**-1';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.7,Page No:5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time=2.51e-14 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#for common metal copper\n", + "n = 8.5*10**28; #number of atoms in m**-3\n", + "sigma = 6*10**7; #sigma in ohm**-1 m**-1\n", + "m = 9.1*10**-31; #mass of electron in kilogram\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "\n", + "#calculation\n", + "t = (m*sigma)/float(n*(e**2)); #relaxation time in s\n", + "\n", + "#result\n", + "print'time=%3.2e'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9,Page No:5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermal conductivity=1.6731 W/m-K\n", + " Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 3.0*10**-14; #time in s\n", + "n = 2.5*10**22; #in electrons per m**3\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "T = 3.25; #temperature in K\n", + "\n", + "\n", + "#formula\n", + "#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3\n", + "K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K\n", + "\n", + "\n", + "#result\n", + "print'thermal conductivity=%3.4f '%K,'W/m-K';\n", + "print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy diefference=1.13e+02 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 10**-10; #one dimension in m\n", + "m = 9.1*10**-31; #mass of kg\n", + "h = 6.62*10**-34; #planck's constant in joule-s\n", + "\n", + "\n", + "#formula\n", + "#En = ((n**2)*(h**2))/float(8*m*(a**2))\n", + "#calculation\n", + "E1 = (h**2)/float(8*m*(a**2)); #energy in J\n", + "E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J\n", + "dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J \n", + "x = dE/float(1.6*10**-19); #energy diefference in eV\n", + "\n", + "#result\n", + "print'energy diefference=%3.2e'%x,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11,Page No:5.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy=3.16 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N =6.02*10**23; #avagadro number in atoms /mole\n", + "h = 6.63*10**-34; #planck's constant in joule-s\n", + "m = 9.11*10**-31; #mass in kg\n", + "M = 23; #atomic weight in grams /mole\n", + "p = 0.971; #density in gram/cm**3\n", + "\n", + "\n", + "#formula \n", + "#x=N/V=(N*p)/M\n", + "#calculation\n", + "x = (N*p)/float(M);\n", + "x1 = x*10**6;\n", + "eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy\n", + "eF1 = (eF)/float(1.6*10**-19);\n", + "\n", + "#result\n", + "print'fermi energy=%3.2f'%eF1,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy =3.16 eV\n", + "fermi velocity =1.05e+06 m/s\n", + "femi temperature =3.66e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 2.54*10**28; #number of electrons in per m**2\n", + "h = 6.63*10**-34; # planck's constant in joule-s\n", + "m = 9.11*10**-31; # mass in kg\n", + "p = 0.971; #density in grams/cm**3\n", + "k = 1.38*10**-23;\n", + " \n", + "\n", + "#calculation\n", + "#x = (N*p)/float(M);\n", + "eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3))); \n", + "eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV\n", + "vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s\n", + "TF = eF/float(k); #fermi temperature in K\n", + " \n", + "\n", + "#result\n", + "print'fermi energy =%3.2f'%eF1,'eV';\n", + "print'fermi velocity =%3.2e'%vF,'m/s';\n", + "print'femi temperature =%3.2e'%TF,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13,Page No:5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy = 11 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 65.4; #atomic weight\n", + "p = 7.13; #density in g/cm**3\n", + "h = 6.62*10**-34; # planck's constant in joules-s\n", + "m = 7.7*10**-31; # mass\n", + "v = 6.02*10**23; #avagadros number in atoms/gram-atom\n", + "\n", + "\n", + "#calculation\n", + "#x =N/V\n", + "V = M/float(p); #volume of one atom in cm**3\n", + "n = v/float(V); # number of Zn atoms in volume v\n", + "x = 2*n*(10**6); #number of free electrons in unit volume iper m**2\n", + "eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J\n", + "eF1 = eF/float(1.6*(10**-19));\n", + "\n", + "\n", + "#result\n", + "print'fermi energy =%3.2d'%eF1,'eV';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14,Page No:5.22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons per unit volume =4e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 4.27; #fermi energy in eV\n", + "m = 9.11*10**-31; # mass of electron in kg\n", + "h = 6.63*10**-34; # planck's constant J.s\n", + "\n", + "\n", + "#formula\n", + "#x= N/V\n", + "#calculation\n", + "eF1 = eF*1.6*10**-19; #fermi energy in eV \n", + "x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume\n", + "\n", + "\n", + "#result\n", + "print'number of electrons per unit volume =%4.00e'%x,'m**-3';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.15,Page No:5.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron density for a metal =1.47e+28 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF1 = 4.70; # fermi energy in eV\n", + "eF2 = 2.20; #fermi energy in eV\n", + "x1 = 4.6*10**28; # electron density of lithium per m**3\n", + "\n", + "\n", + "#formula\n", + "#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);\n", + "#N/V = k*(eF**3/2)\n", + "#N/V = x\n", + "#calculation\n", + "x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3\n", + "\n", + "\n", + "#result\n", + "print'electron density for a metal =%4.2e'%x2,'m**-3';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.16,Page No:5.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =3.24 eV\n", + "temperature =2.50e+04 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "eF = 5.4; #fermi energy in eV\n", + "k = 1.38*10**-23; # k in joule/K\n", + "\n", + "\n", + "#calculation\n", + "e0 = (3*eF)/float(5); #average energy in eV\n", + "T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K\n", + " \n", + "\n", + "#result\n", + "print'average energy =%3.2f'%e0,'eV';\n", + "print'temperature =%3.2e'%T,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =9.0 eV\n", + "speed =1.78e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 15; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilogarams\n", + "\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s\n", + "\n", + "\n", + "#result\n", + "print'average energy =%3.1f'%E0,'eV';\n", + "print'speed =%3.2e'%v,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy =4.50 eV\n", + " speed =1.26e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "EF = 7.5; #fermi energy in eV\n", + "m = 9.1*10**-31; #mass of electron in kilograms\n", + "\n", + "#calculation\n", + "E0 = (3*EF)/float(5); #average energy en eV\n", + "v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m\n", + "\n", + "#result\n", + "print'average energy =%3.2f'%E0,'eV';\n", + "print' speed =%3.2e'%v,'m/s';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19,Page No:5.25" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy=3.12 eV\n", + " speed= =1.05e+06 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "h = 6.62*10**-34; #planck's constant in (m**2)*kg/s\n", + "#formula\n", + "#x=N/V\n", + "x = 2.5*10**28;\n", + "\n", + "#calculation\n", + "EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J\n", + "EF1 = EF/float(1.6*10**-19); #fermi energy in eV\n", + "vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s\n", + "\n", + "\n", + "#result\n", + "print'energy=%3.2f'%EF1,'eV';\n", + "print' speed= =%3.2e'%vF,'m/s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20,Page No:5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency =99.998163 %\n", + "voltage drop =1.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 10**7; #power in W\n", + "V = 33*10**3; #power transmitted in W\n", + "R = 2; #resistance in ohm\n", + " \n", + "#calculation\n", + "I = Ps/float(V); #current in A\n", + "Pd = (I**2*R)/float(1000); #power lost in feeder in kW \n", + "n = ((Ps-Pd)/float(Ps))*100; #efficiency in %\n", + "v = I*R; #voltage drop in V\n", + "Vd = (v/float(V))*100; #percentage voltage drop\n", + " \n", + "#result\n", + "print'efficiency =%0f '%n,'%';\n", + "print'voltage drop =%3.1f'%Vd,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21,Page No:5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "aCu,Fe = -13.8 uV/°C\n", + " bCu,Fe = 0.042 uV/(°C)**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a1 = 2.76; #a1 in uv/°C\n", + "a2 = 16.6; #a2 in uv/°C\n", + "b1 = 0.012; #b1 in uv/°C\n", + "b2 = -0.03; #b2 in uv/°C\n", + "\n", + "#calculation\n", + "#aFe,Pb =a1 \n", + "#aCu,Pb = a2\n", + "#bCu,Fe = b1\n", + "#bFe,Pb = b2\n", + "\n", + "#calculation\n", + "a3 = a1-a2; #a3 in uv/°C\n", + "b3 = b1-b2; #b3 in uv/(°C)**2\n", + "\n", + "#result\n", + "print'aCu,Fe = %3.1f'%a3,'uV/°C';\n", + "print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "neutral temperature =225 °C\n", + "temperature of inversin = 450 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 15; #a in uv/°C\n", + "b = -1/float(30); #b in uv/°C\n", + "\n", + "#E = at+bt^2\n", + "#dE/dT =a+2*b*t\n", + "#t=tn\n", + "#dE/dT =0\n", + "#calculation\n", + "tn = -(a/float(2*(b))) #neutral temperature in °C\n", + "#t1+t2 = 2*t2;\n", + "t2 = 2*tn #inversion temperature in °C\n", + " \n", + "#result\n", + "print'neutral temperature =%3.2d '%tn,'°C';\n", + "print'temperature of inversin = %3.2d '%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24,Page No:5.37" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity of alloy =4.4533 uΩ-cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm\n", + "p1 = 1.42; #resistivity of pure copper in uΩ-cm\n", + "p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm\n", + " \n", + "#p(Ni+Cu) =p1\n", + "#pCu =p2\n", + "#p(Cu+silver)=p3\n", + "#calculation\n", + "pNi = p2-p1;\n", + "p4 = (p3-p1)/float(3);\n", + "palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm\n", + " \n", + "#result\n", + "print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =4.174 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M1 = 202; #mass number\n", + "M2 = 200; # mass number\n", + "Tc1 = 4.153; # temperature in K\n", + "alpha = 0.5;\n", + " \n", + "\n", + "#formula\n", + "#m**alpha*(Tc)= conatant\n", + "#calculation\n", + "Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.3f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26,Page No:5.41" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =1.92 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaraion\n", + "Tc1 = 2.1; #temperature in K\n", + "M1 = 26.91; #mass number \n", + "M2 = 32.13; #mass number \n", + "\n", + "\n", + "#formula\n", + "#Tc*(M1**2) = constant\n", + "#calculation\n", + "Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f'%Tc2,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27,Page No:5.42" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.67 K\n", + "critical field =1.70e+06 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 1.41*10**5; #critical fields in amp/m\n", + "Hc2 = 4.205*10**5; # critical fields in amp/m\n", + "T1 = 14.1; #temperature in K\n", + "T2 = 12.9; # temperature in K\n", + "T3 = 4.2; #temperature in K\n", + " \n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K\n", + "Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m\n", + "Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';\n", + "print'critical field =%3.2e'%Hc2,'A/m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28,Page No:5.43" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =4.8751e+05 A/m\n", + " Note: calculation mistake in texttbook in calculating Hc\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 700000; #critical field at 0 K\n", + "T = 4; #temperature in K\n", + "Tc = 7.26; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4e'%Hc,'A/m';\n", + "print' Note: calculation mistake in texttbook in calculating Hc';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.29,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =153.15 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 8*10**4; #critical field \n", + "T = 4.5; #temperature in K\n", + "Tc = 7.2; #temperature in K\n", + "D = 1*10**-3; #diameter in m\n", + "\n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2);\n", + "r = D/float(2); #radius in m\n", + "Ic = 2*math.pi*r*Hc; #critical current in A\n", + "\n", + "#result\n", + "print'critical current =%3.2f'%Ic,'A';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.30,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field =0.0217 tesla\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc0 = 0.0306; #critical field at 0 K\n", + "T = 2; #temperature in K\n", + "Tc = 3.7; #temperature in K\n", + " \n", + " \n", + "#calculation\n", + "Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla\n", + "\n", + "\n", + "#result\n", + "print'critical field =%3.4f'%Hc,'tesla';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.31,Page No:5.44" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =16.00 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "HcT = 1.5*10**5; # critical field for niobium at 0 K\n", + "Hc0 = 2*10**5; # critical field for nobium at 0 K\n", + "T = 8; # temperature in K\n", + " \n", + "\n", + "#calculation\n", + "Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K\n", + " \n", + "\n", + "#result\n", + "print'transition temperature =%3.2f'%Tc,'K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.32,Page No:5.45" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature =14.47 K\n", + " critical field =2.50 T\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc1 = 0.176; #critical fields\n", + "Hc2 = 0.528; #critical fields\n", + "T1 = 14; #temperature in K\n", + "T2 = 13; #temperature in K\n", + "T3 = 4.2; #temperature in K\n", + "\n", + "#formula\n", + "#Hcn =Hc*((1-((T/Tc)**4)))\n", + "#calculation\n", + "Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K\n", + "Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T\n", + "Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T\n", + "\n", + "\n", + "#result\n", + "print'transition temperature =%3.2f '%Tc,'K';\n", + "print' critical field =%3.2f '%Hc2,'T';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.33,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current =99.274328 A\n", + "Note: calculation mistake in textbook in calculation of I\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Hc = 7900; #magnetic field in A/m\n", + "r = 2.0*10**-3; #radius of super condutor in m\n", + " \n", + " \n", + "#calculation\n", + "I = 2*math.pi*r*Hc; #critical current in A\n", + " \n", + "#result\n", + "print'critical current =%4f'%I,'A';\n", + "print'Note: calculation mistake in textbook in calculation of I';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.34,Page No:5.46" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =137 Amp\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 10**-3; #diameter in m\n", + "Bc = 0.0548; # Bc in T\n", + " \n", + " \n", + "#calculation\n", + "u0 = 4*math.pi*10**-7; #permiability m**2\n", + "r = d/float(2); #radius in m\n", + "Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp\n", + "\n", + "#result\n", + "print'current =%3.2d '%Ic,'Amp';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.35,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=11.33 nm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D =8.5*10**3; #density in kg/m**3\n", + "W =93; #atomic weight \n", + "m =9.1*10**-31; #mass of electron in kilograms\n", + "e =2*1.6*10**-19; #charge of electron in coulombs\n", + "N =6.023*10**26; #avagadro number in (lb-mol)−1\n", + "\n", + "\n", + "#calculation\n", + "u0 =4*math.pi*10**-7;\n", + "ns =(D*N)/float(W); #in per m**3\n", + "lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm\n", + "\n", + "#result\n", + "print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.36,Page No:5.52" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "penetration depth=467.9 Å\n", + " Note: calculation mistake in textbook in calculating lamdaT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Tc =7.2; #temperature in K\n", + "lamda =380; #penetration depth in Å\n", + "T =5.5; #temperature in K\n", + " \n", + "\n", + "#calculation\n", + "\n", + "lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å\n", + " \n", + "#result\n", + "print'penetration depth=%3.1f'%lamdaT,'Å';\n", + "print' Note: calculation mistake in textbook in calculating lamdaT';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.37,Page No:5.53" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature =8.48 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "lamda1 = 16; #penetration depth in nm\n", + "lamda2 = 96; #penetration depth in nm\n", + "T1 = 2.18; #temperature in K\n", + "T2 = 8.1; # temperature in K\n", + "\n", + "#formula\n", + "#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))\n", + "#calculation\n", + "Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K\n", + "\n", + "\n", + "#result\n", + "print'critical temperature =%3.2f '%Tc,'K';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.38,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength=0.41 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Eg =30.5*1.6*10**-23; #energy gap in eV\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3.0*10**8; #velocity of light in m\n", + " \n", + "\n", + "#formula\n", + "#Eg=h*v\n", + "#calculation\n", + "v = Eg/float(h); #velocity in m\n", + "lamda = c/float(v); #wavelength in m\n", + "\n", + "#result\n", + "print'wavelength=%2.2f'%(lamda*10**3),'mm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.39,Page No:5.55" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region of electromagnetic spectrum=1.14e-03 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k =1.38*10**-23;\n", + "Tc =4.2; #tempetrature in K\n", + "h =6.6*10**-34; #planck's constant in (m**2)*kg/s\n", + "c =3*10**8; # velocity of light in m\n", + " \n", + " \n", + "#calculation\n", + "Eg = (3*k*Tc); #energy gap in eV\n", + "lamda = h*c/float(Eg); #wavelngth in m\n", + "\n", + "#result\n", + "print'region of electromagnetic spectrum=%3.2e'%lamda,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6.ipynb new file mode 100755 index 00000000..c434a941 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6.ipynb @@ -0,0 +1,714 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\n" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb new file mode 100644 index 00000000..e7b833fc --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_1.ipynb @@ -0,0 +1,714 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\n" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb new file mode 100644 index 00000000..e7b833fc --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_2.ipynb @@ -0,0 +1,714 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\n" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb new file mode 100644 index 00000000..50f98373 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_3.ipynb @@ -0,0 +1,705 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb new file mode 100644 index 00000000..50f98373 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_4.ipynb @@ -0,0 +1,705 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb new file mode 100644 index 00000000..50f98373 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter6_5.ipynb @@ -0,0 +1,705 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Electrical Conducting and Insulating Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1,Page No:6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient =0.00082 K**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R75 = 57.2; #resistance at 75 C in Ω\n", + "R25 = 55; #resistance at 25 C in Ω\n", + "t1 = 25; #temperature in C\n", + "t2 = 75 # temperature in C\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#calculation\n", + "alpha = (R25-R75)/float((25*R75)-(75*R25)); #temperature cofficient\n", + "\n", + "\n", + "#result\n", + "print'temperature coefficient =%3.5f'%alpha,'K**-1';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature coefficient of resistance =65.06 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in ohm at temperature 15°C\n", + "R2 = 60; # resistance in ohm temperature 15°C\n", + "t1 = 15; #temperature in °C\n", + "alpha = 0.00425; #temperature coefficient of resistance\n", + "\n", + "\n", + "#formula\n", + "#Rt = R0*(1+(alpha*t))\n", + "#Rt1/Rt2 = R0*(1+(alpha*t1))/R0*(1+(alpha*t2))\n", + "#calculation\n", + "R = R2/float(R1); #resistance in Ω\n", + "X = 1+(alpha*t1);\n", + "t2 = ((R*X)-1)/float(alpha); #temperature coefficient of resistance in °C\n", + " \n", + " \n", + "\n", + "#result\n", + "print'temperature coefficient of resistance =%3.2f'%t2,'°C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3,Page No:6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence temperature under normal condition is 3320.00 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 20; #temperature in °C\n", + "alpha = 5*10**-3; #average temperature coefficient at 20°C \n", + "R1 = 8; #resistance in Ω\n", + "R2 = 140; #resistaance in Ω\n", + " \n", + " \n", + "#calculation\n", + "t2 = t1+((R2-R1)/float(R1*alpha)); #temperature in °C\n", + " \n", + "#result\n", + "print'Hence temperature under normal condition is %3.2f'%t2,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=4.80e-05 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 100; #length in cm\n", + "d = 0.008; #diameter of wire in cm\n", + "R = 95.5; #resistance in Ω\n", + "d = 0.008; #diameter in cm\n", + "\n", + "\n", + "#formula\n", + "#R=p*l/A\n", + "#calculation\n", + "A = (math.pi*d*d)/float(4); #cross-sectional area\n", + "p = (R*A)/float(l); #resistivity of wire in Ω-cm\n", + "\n", + "\n", + "#result\n", + "print'resistivity=%3.2e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5,Page No:6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage conductivity=93.59 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R0 =17.5; #resistance at 0 degree c in Ω\n", + "alpha =0.00428; #temperature coefficient of copper in per °C\n", + "t =16; #temperature in °C\n", + "\n", + "\n", + "#calculations\n", + "Rt = R0*(1+(alpha*t)); #resistance at 16 °C\n", + "P = (R0/float(Rt))*100; #percentage conductivity at 16 °C\n", + "\n", + "\n", + "#result\n", + "print'percentage conductivity=%3.2f'%P,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance= 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 60; #length in m\n", + "r2 = 38/float(2); #radius of outer cylinder in m\n", + "r1 = 18/float(2); #radius of inner cylinder in m\n", + "p = 8000; #specific resistance in Ω-m\n", + "\n", + "#calculation\n", + "R = (p/float(2*math.pi*l))*math.log(r2/float(r1)); #insulation resistance of liquid resistor in Ω\n", + "\n", + "#result\n", + "print'insulation resistance=%3.0f '%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11,Page No:6.30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity=3.358e+13 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.0018; #inner diameter in m\n", + "d2 = 0.005; # outer diameter in m\n", + "R = 1820*10**6; #insulation resistance in Ω\n", + "l = 3000; #length in m\n", + "\n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "p = (2*math.pi*l*R)/float(math.log(r2/float(r1))); #resistivity of dielectric in Ω-m\n", + " \n", + "#result\n", + "print'resistivity=%3.3e'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance =1.606537e+08 Ω\n", + " Note: calculation mistake in textbook in calculating insulating resistance\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d1 = 0.05; #inner diametr in m\n", + "d2 = 0.07; #outer diameter in m \n", + "l = 2000; #length in m\n", + "p = 6*10**12; #specific resistance in Ω-m\n", + " \n", + "#calculations\n", + "r1 = d1/float(2); #inner radius in m\n", + "r2 = d2/float(2); #outer radius in m\n", + "R = (p/float(2*math.pi*l))*(math.log(r2/float(r1))); #insulation resistance\n", + " \n", + " \n", + "\n", + "\n", + "#result\n", + "print'insulation resistance =%1e'%R,'Ω';\n", + "print' Note: calculation mistake in textbook in calculating insulating resistance';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance =2.68e-10 F\n", + " charge=6.696e-06 C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 110*10**-3; #area in m**2\n", + "d = 2; #thickness in mm\n", + "er = 5; #relative permitivity\n", + "E = 12.5*10**3; #electric field strength in V/mm\n", + "e0 = 8.854*10**-12; #charge of electron in coulombs\n", + " \n", + " \n", + "#calculations\n", + "A = a*a; #area in m**2\n", + "C = e0*((er*A)/float(d*10**-3)) #capacitance in F\n", + "V = E*(d);\n", + "Q = (C)*(V) #charge on capacitor in C\n", + " \n", + "#result\n", + "print'capacitance =%3.2e'%C,'F';\n", + "print' charge=%3.3e'%Q,'C';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14,Page No:6.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge=7.50e-02 C\n", + " electric flux=75.000 mc\n", + " electric flux density=5.21 c/m**2\n", + " electric field strength=1.000e+06 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 15*10**-3; #current in A\n", + "t = 5; #time in s\n", + "V = 1000; #voltage in volts\n", + "d = 10**-3; #thickness in m\n", + "a = 120*10**-3;\n", + "\n", + "#calculation\n", + "A = a**2 #area in m**2\n", + "Q = I*t; #charge on capacitor in C\n", + "#since charge and electric field are equal\n", + "phi = Q; #electric flux in mc\n", + "D = Q/float(A); #electric flux density in c/m**2\n", + "E = V/float(d); #electric field strength in dielectric\n", + "\n", + "#result\n", + "print'charge=%3.2e'%Q,'C';\n", + "print' electric flux=%4.3f'%(phi*10**3),'mc';\n", + "print' electric flux density=%3.2f'%D,'c/m**2';\n", + "print' electric field strength=%2.3e'%E,'V/m';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance=7.0124e-09 F\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 12; #number of plates\n", + "er = 4; #relative permitivty \n", + "d = 1.0*10**-3; #distance between plates in m\n", + "A = 120*150*10**-6; #area in m**2\n", + "e0 = 8.854*10**-12; # in F/m\n", + "\n", + "#calculation\n", + "c = (n-1)*e0*er*A/float(d); #capacitance in F\n", + " \n", + "#result\n", + "print'capacitance=%3.4e'%c,'F';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness=0.82 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e0 = 40000; #dielectric strength in volts/m\n", + "d = 33000; #thickness in kV\n", + "\n", + "#calculations\n", + "t = d/float(e0); #required thickness of insulation in mm\n", + " \n", + "#result\n", + "print'thickness=%3.2f'%t,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 6.17,Page No:6.32" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area = 1.30 m**2\n", + " breakdown voltage=1.8e+04 V\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#variable declaration\n", + "C = 0.03*10**-6; #capacitance in F\n", + "d = 0.001; #thickness in m\n", + "er = 2.6; #dielectric constant\n", + "e0 = 8.85*10**-12; #dielectric strength \n", + "E0 = 1.8*10**7 \n", + " \n", + "#formula\n", + "#C=e0*er*A/d\n", + "#e0=v/d\n", + "#calculation\n", + "A = (C*d)/float(e0*er); #area of dielectric needed in m**2\n", + "Vb = E0*d; #breakdown voltage in m\n", + "\n", + "#result\n", + "print'area = %3.2f'%A,'m**2';\n", + "print' breakdown voltage=%3.1e'%Vb,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric loss=5684.1 watts\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 0.035*10**-6; #capacitance in F\n", + "tangent = 5*10**-4; #power factor \n", + "f = 25*10**3; #frequency in Hz\n", + "I = 250; #current in A\n", + " \n", + " \n", + "#calculation\n", + "V = I/float(2*math.pi*f*C) #voltage across capacitor in volts\n", + "P = V*I*tangent; #dielectric loss in watts\n", + "\n", + "#result\n", + "print'dielectric loss=%3.1f'%P,'watts';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19,Page No:6.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area=1.129433e-02 m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 20*10**-6; #charge of electron in coulomb\n", + "V = 10*10**3; #potential in V\n", + "e0 = 8.854*10**-12; #absolute permitivity\n", + "d = 5*10**-4; #separation between plates in m\n", + "er = 10; #dielectric constant\n", + "\n", + "#formula\n", + "#Q=CV\n", + "#C=er*e0*A/d\n", + "C = Q/float(V);\n", + "A = (C*d)/float(er*e0); #area in m**2\n", + " \n", + "#result\n", + "print'area=%1e'%A,'m**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20,Page No:6.35" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrial conductivity=2.53e+07 (Ω-m)**-1\n", + "lorentz number = 185.33 W/mK\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.0*10**28; #number of electrons per m**3\n", + "t = 3*10**-14; #time in s\n", + "m = 9.1*10**-31; #mass of electron in kg\n", + "L = 2.44*10**-8; #lorentz number in ohm W/K**2\n", + "T = 300; #temperature in kelvin \n", + "e = 1.6*10**-19; #charge of electron in coulomb\n", + "\n", + "\n", + "#calculation\n", + "sigma = (n*(e**2)*t)/float(m); #electrical conductivity in (ohm-m)**-1\n", + "K = sigma*T*L;\n", + " \n", + "#result\n", + "print'electrial conductivity=%3.2e'%sigma,'(Ω-m)**-1';\n", + "print'lorentz number = %3.2f'%K,'W/mK';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7.ipynb new file mode 100755 index 00000000..41199be9 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7.ipynb @@ -0,0 +1,637 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistos and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb new file mode 100644 index 00000000..9f8fe79f --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_(1).ipynb @@ -0,0 +1,619 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistors and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb new file mode 100644 index 00000000..e716836b --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_1.ipynb @@ -0,0 +1,619 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistos and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb new file mode 100644 index 00000000..0348a194 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_2.ipynb @@ -0,0 +1,619 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistos and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb new file mode 100644 index 00000000..0348a194 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_3.ipynb @@ -0,0 +1,619 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistos and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb new file mode 100644 index 00000000..0348a194 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter7_4.ipynb @@ -0,0 +1,619 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Junction Rectifier,Transistos and Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Increase in temperature necessary to increase Is by a factor by 150 is 72.29 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#given Is2/Is1 =150\n", + "#Is2/Is1 =2**(T2-T1)/10\n", + "#dT=10ln(I)/ln(2)\n", + "I = 150;\n", + " \n", + "\n", + "#Calculations\n", + "dT = 10*math.log(I)/float(math.log(2)); #increase in temperature in °C\n", + "\n", + "#Result\n", + "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3,Page No:7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current flowing through germanium diode = 25.0067 uA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Io = 0.25*10**-6; # large reverse biased current in A\n", + "V = 0.12; # applied voltage in V\n", + "Vt = 0.026; # Volt-equivalent of temperature in V\n", + "\n", + "# Calculations\n", + "I = Io*(math.exp(V/float(Vt))-1); #current in A \n", + "\n", + "# Result\n", + "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4,Page No:7.12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n", + "Diffusion co-efficients of holes = 6.99e-04 m**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 1.38*10**-23; # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.19 # mobility of electron in m**2.V**-1.s**-1\n", + "uh = 0.027; # mobilty of holes in m**2.V**-1.s**-1\n", + "T = 300; # temperature in K\n", + "\n", + "#Calculations\n", + "Dn = ((k*T)/float(e))*ue; # diffusion constant of electrons in cm**2/s\n", + "Dh = (k*T/float(e))*uh; # diffusion constant of holes in cm**2/s\n", + "\n", + "\n", + "#Result\n", + "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n", + "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 10 ohm\n", + "Vreb = 1.0e+07 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I1 = 20; #current in mA\n", + "V1 = 0.8; #voltage in volts\n", + "V2 = 0.7; #voltage in volts\n", + "I2 = 10; # current in mA\n", + "v3 = -10; #voltage in volts\n", + "I3 = -1*10**-6; # current in mA\n", + "\n", + "# Calculations\n", + "R = (V1 - V2)/(I1 - I2); #resistance in ohm\n", + "Vreb = v3/I3; #velocity in volts\n", + "\n", + "#Result\n", + "print'resistance = %d'%(R*10**3),'ohm';\n", + "print'Vreb = %3.1e'%Vreb,'ohm';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7,Page No:7.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion constant of electrons = 94.3 cm**2/s\n", + "Diffusion constant of electrons = 44.4 cm**2/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 300; # temp in kelvin\n", + "k = 1.38*10**-23; # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n", + "e = 1.602*10**-19; # charge of electron in coulombs\n", + "ue = 3650; # mobility of electrons \n", + "uh = 1720; # mobility of holes\n", + "\n", + "#Calculations\n", + "De = (ue*k*T)/float(e); # diffusion constant of electrons in cm**2/s\n", + "Dh = (uh*k*T)/float(e); # diffusion constant of holes in cm**2/s\n", + "\n", + "# Result\n", + "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n", + "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pinch-off voltage = 3.92e-02 V\n", + " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 2; # resistivity in ohm-m\n", + "er = 16; #relative dielectrivity of Ge cm**2/s\n", + "up = 1800; # mobility of holes in cm**2/s\n", + "e0 = 8.85*10**-12; #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n", + "a = 2*10**-4; #channel height in m\n", + "\n", + "# Calculations\n", + "qNa = 1/float(up*p);\n", + "e = e0*er; #permitivity in F/cm\n", + "Vp = (qNa*(a**2))/float(2*e); # pinch-off voltage in V\n", + "\n", + "#Result\n", + "print'Pinch-off voltage = %3.2e'%Vp,'V';\n", + "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pinch off velocity =9.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3.5*10**-6; #channel width in m\n", + "N = 10**21; #number of electrons in electrons/m**3\n", + "q = 1.6*10**-19; #charge of electron in coulombs\n", + "er = 12; #dielectric constant F/m\n", + "e0 = 8.85*10**-12; #dielectric constant F/m\n", + " \n", + "\n", + "#calculation\n", + "e = (e0)*(er); #permitivityin F/m\n", + "Vp = (q*(a**2)*N)/float(2*e); #pinch off voltage in V\n", + "\n", + "\n", + "#result \n", + "print'pinch off velocity =%2.1f'%Vp,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10,Page No:7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.24 m*A/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDSS = 10; #current in mA\n", + "IDS =2.; # current in mA\n", + "Vp = -4.0; #pinch off voltage in V\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp))); #transconductance in m*A/V\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%gm,'m*A/V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current =1.60 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = -3; #pinch off voltage in V\n", + "IDSS =10*10**-3; # current in A\n", + "Vp = -5.0; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "IDS = IDSS*((1-(VGS/float(Vp)))**2); #current in mA\n", + "\n", + "\n", + "#result\n", + "print'current =%3.2f'%(IDS*10**3),'mA';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12,Page No:7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.05 m S\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "IDS = 2*10**-3; #current in mA\n", + "IDSS = 8*10**-3; # current in mA\n", + "Vp = -4.5; #pinch off voltage in V\n", + "VGS1 = -1.902; #pinch off voltage when IDS =3*10**-3 A\n", + "\n", + "#formula\n", + "#IDS = IDSS*((1-(VGS/Vp))**2)\n", + "#calculation\n", + "VGS = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n", + "gm = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp))); #transconductance in m S\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance =1.62e+10 ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "VGS = 26; #gate source voltage in V\n", + "IG = 1.6*10**-9; #gate current in A\n", + "\n", + "\n", + "#calculation\n", + "R = VGS/float(IG); #gate to current resistance in ohms\n", + "\n", + "\n", + "#result \n", + "print'resistance =%3.2e'%R,'ohms';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =2.20e-03 ohm\n", + "Note:wrong answer in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 1; #current in A\n", + "ID2 = 2.1; # current in A\n", + "VGS1 = 3.0; #pinch off voltage in V\n", + "VGS2 = 3.5; #pinch off voltage in V\n", + " \n", + "\n", + "#calculation\n", + "dID = ID2-ID1;\n", + "dVGS = VGS2-VGS1;\n", + "gm = (dID*10**-3)/float(dVGS); #transconductance in mho\n", + "\n", + "\n", + "#result\n", + "print'transconductance =%3.2e '%gm,'ohm';\n", + "print'Note:wrong answer in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15,Page No:7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac drain resistnce =30.00 k-ohms\n", + "transconductance =4000 u mhos\n", + "amplification factor=120.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ID1 = 8; #drain current in mA\n", + "ID2 = 8.3; #drain current in mA\n", + "VDS1 = 5; #drainn source voltage in V\n", + "VDS2 = 14; #drain source voltage in V\n", + "ID3 = 7.1; #drain current when VDS constant VGS change\n", + "ID4 = 8.3; #drain current when VDS constant VGS change\n", + "VGS1 = 0.1; #drain source voltage in V\n", + "VGS2 = 0.4; #drain source voltage in V\n", + "\n", + "#calculation\n", + "dID1 = ID2-ID1;\n", + "dVDS = VDS2-VDS1;\n", + "rd = dVDS/float(dID1); #ac drain resistance\n", + "dID2 = ID4-ID3;\n", + "dVGS = VGS2-VGS1;\n", + "gm = dID2/float(dVGS); #transconductance mhos\n", + "u = rd*gm; #amplification factor\n", + "\n", + "\n", + "#result\n", + "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n", + "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n", + "print'amplification factor=%3.2f'%u;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16,Page No:7.26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transconductance =3.03 mmhos\n", + "Note:transconductance value is wrongly printed in terms of umhos\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u = 100; #amplification factor \n", + "rd = 33*10**3; #drain resistance in ohms\n", + "\n", + "\n", + "#calculation\n", + "gm = u/float(rd); #transconductance in mhos\n", + "\n", + "#result\n", + "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n", + "print'Note:transconductance value is wrongly printed in terms of umhos';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8.ipynb new file mode 100755 index 00000000..20076dfa --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8.ipynb @@ -0,0 +1,918 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb new file mode 100644 index 00000000..d31fdb5a --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_1.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb new file mode 100644 index 00000000..d31fdb5a --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_2.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb new file mode 100644 index 00000000..f08902b6 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_3.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb new file mode 100644 index 00000000..f08902b6 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_4.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb new file mode 100644 index 00000000..f08902b6 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter8_5.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Mechanism of Conduction in Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1,Page No:8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Kinetic Energy = 0.1 eV\n", + "Momentum of electrons = 4.5e-26 kg m/s\n", + "Momentum of holes = 4.4e-26 kg m/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ephoton = 1.5; # energy of photon in eV\n", + "Eg = 1.4; # energy gap in eV\n", + "m = 9.1*10**-31; # mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in coulombs\n", + "me_GaAs = 0.07; #times of electro mass in kilograms\n", + "mh_GaAs = 0.068; #times of electro mass in kilograms\n", + "\n", + "# Calculations\n", + "Eke = Ephoton - Eg; #energy on eV\n", + "pe = math.sqrt(2*m*me_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "ph = math.sqrt(2*m*mh_GaAs*Eke*e) # momentum of electrons in kg m/s\n", + "\n", + "# Result\n", + "print'Kinetic Energy = %3.1f'%Eke,'eV';\n", + "print'Momentum of electrons = %3.1e'%pe,'kg m/s';\n", + "print'Momentum of holes = %3.1e'%ph,'kg m/s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal equilibrium hole concentration = 1.15e+16 cm**-3\n", + "Note: Calculation mistake in textbook Nv is not multiplied by exponentiation\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 300; # temperature in kelvin\n", + "nv = 1.04*10**19; #in cm**-3\n", + "T2 = 400; #temperature in K\n", + "fl = 0.25; #fermi level position in eV\n", + "\n", + "#Calculations\n", + "Nv = (1.04*10**19)*(T2/float(T1))**(3/float(2)); #Nv at 400 k in cm**-3\n", + "kT = (0.0259)*(T2/float(T1)); #kT in eV\n", + "po = Nv*math.exp(-(fl)/float(kT)); #hole oncentration in cm**-3\n", + "\n", + "\n", + "# Result\n", + "print'Thermal equilibrium hole concentration = %3.2e '%po,'cm**-3';\n", + "print'Note: Calculation mistake in textbook Nv is not multiplied by exponentiation';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3,Page No:8.27" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration at 300K = 1.95e+06 cm**-3\n", + "Intrinsic Carrier Concentration at 300K = 3.34e+10 cm**-3\n", + " Note : Calculation mistake in textbook in finding carrier conc. at 450K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nc = 3.8*10**17; #constant in cm**-3\n", + "Nv = 6.5*10**18; #constant in cm**-3\n", + "Eg = 1.42; # band gap energy in eV\n", + "KT1 = 0.03885; # kt value at 450K\n", + "T1 = 300; #temperature in K\n", + "T2 = 450; #temperature in K\n", + "\n", + "# calculation\n", + "n1i = math.sqrt(Nc*Nv*math.exp(-Eg/float(0.0259))); #intrinsic carrier concentration in cm**-3\n", + "n2i = math.sqrt(Nc*Nv*((T2/float(T1))**3) *math.exp(-Eg/float(KT1))); # intrinsic carrier conc at 450K in cm**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n1i,'cm**-3';\n", + "print'Intrinsic Carrier Concentration at 300K = %3.2e'%n2i,'cm**-3';\n", + "print' Note : Calculation mistake in textbook in finding carrier conc. at 450K';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4,Page No:8.28" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of Fermi level with respect to middle of the bandgap is -12.7 meV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mh = 0.56; #masses interms of m0\n", + "me = 1.08; #masses interms of m0\n", + "t = 27; #temperature in °C\n", + "k = 8.62*10**-5;\n", + "\n", + "\n", + "# Calculations\n", + "T = t+273; #temperature in K\n", + "fl = (3/float(4))*k*T*math.log(mh/float(me)); #position of fermi level in eV\n", + "\n", + "#result\n", + "print'The position of Fermi level with respect to middle of the bandgap is %3.1f'%(fl*10**3),'meV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Donor binding energy = 0.0052 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "mo = 9.11*10**-31; #mass of electron inkilograms\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "er = 13.2; #relative permitivity in F/m\n", + "eo = 8.85*10**-12; # permitivity in F/m\n", + "h = 6.63*10**-34; # plancks constant J.s\n", + " \n", + "\n", + "# Calculations\n", + "me = 0.067*mo; \n", + "E = (me*(e**4))/float((8*(eo*er)**2)*(h**2)*e); #energy in eV \n", + "\n", + "# Result\n", + "print'Donor binding energy = %3.4f'%E,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6,Page No:8.30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equlibrium hole concentration = 2.25e+03 cm**-3\n", + "Position of fermi energy level = 0.177 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "no = 10**17; # doping carrier conc\n", + "ni = 1.5*10**10; #intrinsic concentration\n", + "kT = 0.0259\n", + "\n", + "#Calculations\n", + "po = (ni**2)/float(no); #Equlibrium hole concentration in cm**-3\n", + "fl = kT*math.log10(no/float(ni)); #Position of fermi energy level in eV\n", + "\n", + "#Result\n", + "print'Equlibrium hole concentration = %3.2e'%po,'cm**-3';\n", + "print'Position of fermi energy level = %3.3f'%fl,'eV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity of pure silicon =2.39e+03 ohm**-1.m**-1\n", + "Note:calculation mistake in electrical conductivity,and units of conductivity\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "k = 8.62*10**-5; #in eV/K\n", + "Eg = 1.10; #energy in eV\n", + "t1 = 200; #temperature in °C\n", + "t2 = 27; #temperature in °C\n", + "psi = 2.3*10**3;\n", + "\n", + "# Calculations\n", + "# sigma = sigmao*exp(-Eg/(2kT))\n", + "# k = sigma_473/sigma_300;\n", + "\n", + "t3 = t1+273; #temperature in K\n", + "t4 = t2+273; #temperature in K\n", + "k1 = math.exp((-Eg)/float(2*k*t3)); #electrical conductivity in cm**-1.m**-1\n", + "k2 = math.exp((-Eg)/float(2*k*t4)); #lectrical conductivity in cm**-1.m**-1\n", + "k = k1/float(k2);\n", + "pm = k/float(psi);\n", + "\n", + "#Result\n", + "\n", + "print'electrical conductivity of pure silicon =%3.2e'%k,'ohm**-1.m**-1';\n", + "print'Note:calculation mistake in electrical conductivity,and units of conductivity';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 0.5 Ω-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ni = 2.5*10**19; # carrier density in per m**3\n", + "q = 1.6*10**-19; # charge of electron in coulombs\n", + "un = 0.35; #mobility of electrons in m**2/V-s\n", + "up = 0.15; #mobility of electrons in m**2/V-s\n", + "\n", + "# Calculations\n", + "sigma = ni*q*(un + up); #conductivity in per Ω-m\n", + "p = 1/float(sigma); #resistivity in Ω-m\n", + "\n", + "\n", + "# Result\n", + "print'Resistivity = %3.1f'%p,'Ω-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9,Page No:8.33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic Carrier Concentration = 1.04e+16 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 3.16*10**3; # resistivity Ω-m\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "ue = 0.14; #mobility of electrons in m**2/V-s\n", + "uh = 0.05; #mobility of holes in m**2/V-s\n", + "\n", + "# Calculations\n", + "\n", + "n = 1/float((p*e)*(ue + uh)); #carrier density in m**-3\n", + "\n", + "# Result\n", + "print'Intrinsic Carrier Concentration = %3.2e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which the majority conc. is more than the intrinsic carrier conc = 2942\n", + "Hole concentration = 5.1e+15 m**-3\n", + "Conductivity = 2542 ohm**-1 m**-1\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5.32*10**3; #density of germanium\n", + "Nav = 6.023*10**26; # Avagadros number\n", + "AW = 72.59; # atomic wt\n", + "ni = 1.5*10**19; # carrier density\n", + "ue = 0.36;\n", + "uh = 0.18;\n", + "e = 1.6*10**-19;\n", + "\n", + "# calculations\n", + "N = (p*Nav)/float(AW); # no of germanium atoms per unit volume\n", + "Nd = N*10**-6 ; # no of pentavalent impurity atoms/m**3\n", + "f = Nd/float(ni);\n", + "nh = (ni**2)/float(Nd); # hole concentration\n", + "sigma = e*((Nd*ue)+(nh*uh));\n", + "\n", + "#Result\n", + "print'The factor by which the majority conc. is more than the intrinsic carrier conc = %d'%f;\n", + "print'Hole concentration = %3.1e'%nh,'m**-3';\n", + "print'Conductivity = %d'%sigma,'ohm**-1 m**-1';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11,Page No:8.34" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Carrier Density = 3.1e+21 m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 5*10**-3; # resistivity in Ω-m\n", + "ue = 0.3; # electron mobility m**2/volt-s\n", + "uh = 0.1; # hole mobility m**2/volt-s\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# calculations\n", + "sigma = 1/float(p); # conductivity in per Ω -m\n", + "n = sigma/float(e*(ue + uh)); # carrier density per m**3\n", + "\n", + "#Result\n", + "print'Carrier Density = %3.1e'%n,'m**-3';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Drift velocity = 10 m/s\n", + " time = 1e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Jd = 500; # current density A/m**2\n", + "p = 0.05; # resistivity in Ω-m\n", + "l = 100*10**-6; # travel length m\n", + "ue = 0.4; # electron mobility m**2/Vs\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "\n", + "# Calculations\n", + "ne = 1/float(p*e*ue); #in per m**3\n", + "vd = Jd/float(ne*e); #drift velocity in m/s\n", + "t = l/float(vd); #time teken in s\n", + "\n", + "#result\n", + "print'Drift velocity = %d'%vd,'m/s';\n", + "print' time = %3.0e'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13,Page No:8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is of = 5.91 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "#psi1 is increased by 30%, psi1/ps2 is 130/100\n", + "a = 1.3; #ratio of psi1/psi2\n", + "K = 8.82*10**-5; #constant in eV/K\n", + "Eg = 0.719; #band gap in eV/K\n", + "T = 300; #temperature in K\n", + "\n", + "#calculation\n", + "d=1/float((1/float(T))-((2*K/float(Eg))*math.log(1.3)));\n", + "dT=d-T; #temperature rise in K\n", + "\n", + "\n", + "#result\n", + "print'temperature rise is of = %3.2f'%dT,'K';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of the compensated p-type semiconductor is 0.492\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v = 5; # voltage in volts\n", + "r = 10; # resistance in k-ohm\n", + "J = 60; # current density in A/cm**2\n", + "E = 100; # electric field in V.m**-1\n", + "Nd = 5*10**15; # in cm**-3\n", + "up = 410; # approx hole mobility cm**2/V-s\n", + "Na = 1.25*10**16; # approx in cm**-3\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "\n", + "#Calculations\n", + "I = v/float(r); # total current A\n", + "A = I/float(J); # cross sectional area cm**2\n", + "L = v/float(E) # length of resistor cm\n", + "sigma = L/float(r*A); #conductivity in (Ω-cm)**-1\n", + "sigma_comp = e*up*(Na - Nd); #conductivity in (Ω-cm)**-1\n", + "\n", + "# Result\n", + "print'Conductivity of the compensated p-type semiconductor is %3.3f'%sigma_comp;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15,Page No:8.39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion Current Density = 120 A/cm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Dn = 250; # electron diffusion co-efficient cm**2/s\n", + "n1 = 10**18; # electron conc. in cm**-3\n", + "n2 = 7*10**17; # electron conc. in cm**-3\n", + "dx = 0.10; # distance in cm\n", + "\n", + "# Calculations\n", + "Jdiff = e*Dn*((n1-n2)/float(dx)); #diffusion current density A/cm**2\n", + "\n", + "#Result\n", + "print'Diffusion Current Density = %d '%Jdiff,'A/cm**2';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength at which Ge starts to absorb light = 16550 Å\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "# Variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulombs\n", + "Eg = 0.75; #bandgap energy eV\n", + "c = 3*10**8; # velocity of light in m\n", + "h = 6.62*10**-34; # plancks constant in J.s\n", + "\n", + "# Calculations\n", + "lamda = (h*c)/float(Eg*e); # wavelength in Å\n", + "\n", + "#Result\n", + "print'Wavelength at which Ge starts to absorb light = %d '%(lamda*10**10),'Å';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength =0.92 um\n" + ] + } + ], + "source": [ + "# import math\n", + "\n", + "#variable declaration\n", + "Eg = 1.35*1.6*10**-19; #energy in eV\n", + "h = 6.63*10**-34; #plancks constant in J.s\n", + "c = 3*10**8; #velocity in m\n", + " \n", + "#calculation\n", + "lamda = (h*c)/float(Eg); #wavelength in m\n", + " \n", + "#result\n", + "print'cutoff wavelength =%3.2f '%(lamda*10**6),'um';\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18,Page No:8.43" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandgap energy = 0.701 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.62*10**-34 # plancks constant J.s\n", + "c = 3*10**8; # velocity of light in m\n", + "lamda = 1771*10**-9; # wavelengthg in m\n", + "e = 1.6*10**-19 # charge of electron in coulombs\n", + "\n", + "# Calculations\n", + "Eg = (h*c)/float(lamda*e); #bandgap energy eV\n", + "\n", + "#Result\n", + "print'bandgap energy = %3.3f'%Eg,'eV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19,Page No:8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall Voltage = 5.6 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Nd = 10**21; # donar density per in m**3\n", + "H = 0.6; # magnetic field in T\n", + "J = 500; # current density A/m**2\n", + "d = 3*10**-3; # width in m\n", + "e = 1.6*10**-19 # charge of electron coulombs\n", + "\n", + "#Calculations\n", + "Ey = (J*H)/float(Nd*e); # field in V/m \n", + "vh = Ey*d; # hall voltage V\n", + "\n", + "#Result\n", + "print'Hall Voltage = %3.1f '%(vh*10**3),'mV';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.20,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 2304 Ampere/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e = 1.6*10**-19; # charge of electron in coulomb\n", + "Rh = -0.0125; # hall co-efficient\n", + "ue = 0.36; # electron mobility\n", + "E = 80; # electric field\n", + "\n", + "# Calculations\n", + "n = -1/float(Rh*e);\n", + "J = n*e*ue*E # current density in Ampere/m**2\n", + "\n", + "# Result\n", + "print'Current density = %d '%J,'Ampere/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.21,Page No:8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall angle = 1.1740 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00893; # resistivity in ohm-m \n", + "Hz = 0.5; # field in weber/m**2\n", + "Rh = 3.66*10**-4; # hall co-efficient hall coefficient in m**3\n", + "\n", + "# Calculations\n", + "\n", + "u = Rh/float(p); #mobility of charge cerrier in m**2*(V**-1)*s**-1\n", + "theta_h = (math.atan(u*Hz))*(180/float(math.pi)); # hall angle in degrees\n", + "\n", + "# Result\n", + "print'Hall angle = %3.4f '%theta_h,'°';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9.ipynb new file mode 100755 index 00000000..d5460e65 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9.ipynb @@ -0,0 +1,206 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb new file mode 100644 index 00000000..62ec71d4 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_1.ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb new file mode 100644 index 00000000..62ec71d4 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_2.ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb new file mode 100644 index 00000000..62ec71d4 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_3.ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb new file mode 100644 index 00000000..62ec71d4 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_4.ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb new file mode 100644 index 00000000..62ec71d4 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/Chapter9_5.ipynb @@ -0,0 +1,188 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9:Mechanical Properties of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1,Page No:9.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elongation = 0.435 mm\n", + "Lateral contraction = 1.30 um\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 8482; # Tensile force in newtons\n", + "lo = 0.30; # length of steel wire in cm\n", + "Y = 207*10**9; # Youngs modulus of steel Gpa\n", + "r = 3*10**-3; # radius of steel wire in m\n", + "v = 0.30; # poisson ratio\n", + "\n", + "# Calculations\n", + "\n", + "dl = (F*lo)/float(Y*math.pi*r**2); #elongation in mm\n", + "e1 = dl/float(lo); #longitudanl strain \n", + "e2 = v*e1 # lateral strain \n", + "dr = e2*r; # lateral contraction in m\n", + " \n", + "# Result\n", + "print'Elongation = %3.3f'%(dl*10**3),'mm';\n", + "print'Lateral contraction = %3.2f '%(dr*10**6),'um';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engineering stress = 14.15 MPa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 400; # tensile force in newtons \n", + "d = 6*10**-3; # diameter of steel rod m\n", + "\n", + "# Calculations\n", + "r =d/float(2);\n", + "E_stress = (P)/float((math.pi/float(4))*d*d); #e_stress in N/m**2\n", + "\n", + "#Result\n", + "\n", + "print'Engineering stress = %3.2f '%(E_stress*10**-6),'MPa';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of elongation = 5.75 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lf = 42.3; #guage length after strain mm\n", + "Lo = 40; # guage length in mm\n", + "\n", + "# Calculations\n", + "e = ((Lf - Lo)/float(Lo))*100 #Engineering Strain in %\n", + "\n", + "#Result\n", + "print'Percentage of elongation = %3.2f '%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5,Page No:9.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percent reduction in area = 30.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "dr = 12.8; # original diameter of steel wire in mm\n", + "df = 10.7; # diameter at fracture in mm\n", + "\n", + "# Calculations\n", + "percent_red = (((math.pi*dr*dr) - (math.pi*df*df))/float(math.pi*dr*dr))*100; #Percent reduction in area in %\n", + "\n", + "\n", + "# Result\n", + "print'Percent reduction in area = %3.1f'%percent_red,'%';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt new file mode 100644 index 00000000..34ae49a2 --- /dev/null +++ b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/README.txt @@ -0,0 +1,10 @@ +Contributed By: keerthi vani gundla +Course: be +College/Institute/Organization: matrusri enginnering college +Department/Designation: ece +Book Title: ELECTRICAL ENGINEERING MATERIALS +Author: R.K.Shukla +Publisher: Tata McGraw hill education private limited ,new delhi +Year of publication: 2012 +Isbn: 978-1-25-90062-03 +Edition: 1st \ No newline at end of file diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png new file mode 100644 index 00000000..106927af Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4.png differ 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 new file mode 100644 index 00000000..106927af Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_1.png differ 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 new file mode 100644 index 00000000..106927af Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter4_2.png differ diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png new file mode 100644 index 00000000..523adeb5 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8.png differ 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 new file mode 100644 index 00000000..523adeb5 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_1.png differ 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 new file mode 100644 index 00000000..523adeb5 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter8_2.png differ diff --git a/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png new file mode 100644 index 00000000..ab9b0bc1 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9.png differ 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 new file mode 100644 index 00000000..ab9b0bc1 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_1.png differ 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 new file mode 100644 index 00000000..ab9b0bc1 Binary files /dev/null and b/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla/screenshots/chapter9_2.png differ diff --git a/Electric_Power_Distribution_System_Engineering/screenshots/ch11.png b/Electric_Power_Distribution_System_Engineering/screenshots/ch11.png new file mode 100755 index 00000000..32342a74 Binary files /dev/null and b/Electric_Power_Distribution_System_Engineering/screenshots/ch11.png differ diff --git a/Electric_Power_Distribution_System_Engineering/screenshots/ch8.png b/Electric_Power_Distribution_System_Engineering/screenshots/ch8.png new file mode 100755 index 00000000..7ee129be Binary files /dev/null and b/Electric_Power_Distribution_System_Engineering/screenshots/ch8.png differ diff --git a/Electric_Power_Distribution_System_Engineering/screenshots/loadvstime2.png b/Electric_Power_Distribution_System_Engineering/screenshots/loadvstime2.png new file mode 100755 index 00000000..edf3459f Binary files /dev/null and b/Electric_Power_Distribution_System_Engineering/screenshots/loadvstime2.png differ diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch10.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch10.ipynb new file mode 100755 index 00000000..88974ba4 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch10.ipynb @@ -0,0 +1,410 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bc905e996740356ca2e367534c643c16115b03b37f0c3f1fca3b88fd2929cfdd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Distribution System Protection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#For Recloser\n", + "InstT = 0.03; #From Curve A #instaneous Time\n", + "TimeD = 0.17; #From Curve B #Time Delay\n", + "#For Relay\n", + "PickU = 0.42; #From Curve C #Pick Up \n", + "Reset = (1./10)*60; #Assuming a 60 s reset time for the relay with number 10 time dial setting\n", + "RecloserOT = 1; #Assumed Recloser Open Time\n", + "\n", + "RelayCTI = InstT/PickU; #Relay Closing Travel during instanmath.taneous operation\n", + "RelayRTI = (-1)*RecloserOT/Reset; #Relay Reset Travel during instanmath.taneuos\n", + "\n", + "# Calculations\n", + "RelayCTD = TimeD/PickU;\n", + "RelayRTD = (-1)*RecloserOT/Reset; #Relay Reset Travel during trip\n", + "NetRelayTravel = RelayCTD-RelayRTD;\n", + "\n", + "# Results\n", + "print 'During instanmath.taneous Operation'\n", + "print '|Relay Closing Travel| < |Relay Rest Travel|'\n", + "print '|%g percent| < |%g percent|'%(RelayCTI*100,RelayRTI*100)\n", + "\n", + "print 'During the Delayed Tripping Operations'\n", + "print 'Total Relay Travel is from:'\n", + "print '%g percent to %g percent to %g percent'%(RelayCTD*100,RelayRTD*100,RelayCTD*100)\n", + "print 'Since this Net Total Relay Travel is less than 100 percent the desired recloser to relay coordination is accomplished'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "During instanmath.taneous Operation\n", + "|Relay Closing Travel| < |Relay Rest Travel|\n", + "|7.14286 percent| < |-16.6667 percent|\n", + "During the Delayed Tripping Operations\n", + "Total Relay Travel is from:\n", + "40.4762 percent to -16.6667 percent to 40.4762 percent\n", + "Since this Net Total Relay Travel is less than 100 percent the desired recloser to relay coordination is accomplished\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vln = 7200.; #Line to Neutral Voltage\n", + "Vll = 12470.; #Line to Line Voltage\n", + "Z1sys = 0.7199+(1j*3.4619); #system impedance to the regulated 12.47kV bus\n", + "ZGsys = 0.6191+(1j*3.3397); #system impedance to ground\n", + "l = 2; #Dismath.tance of the Fault from the substation\n", + " #From Table 10-7; Various Paramters Can Be found out\n", + "z0a = 0.1122+(1j*0.4789);\n", + "z011 = (-0.0385-(1j*0.0996));\n", + "z1 = 0.0580+(1j*0.1208);\n", + "C = 5.28; #Cable consmath.tant\n", + "\n", + "# Calculations\n", + "Z0ckt = 2*(z0a+z011)*C; #Zero Sequence Impedance\n", + "Z1ckt = 2*z1*C; #Positive Sequence Impedance\n", + "ZGckt = ((2*Z1ckt)+Z0ckt)/3; #Impedance to ground of line\n", + " #Note That the calculation of the above term is wrong in the text book\n", + "\n", + "Z1 = Z1sys+Z1ckt; #Total Positive Sequence\n", + "ZG = ZGsys+ZGckt; #Total impedance to ground\n", + "\n", + "If3phi = Vln/abs(Z1); #Three Phase Fault at point 10\n", + "IfLL = 0.866*If3phi; #Line to Line Fault at point 10\n", + "IfLG = Vln/(abs(ZG)); #Single Line to Ground Fault\n", + "\n", + "# Results\n", + "print 'a The Zero and Postive sequence impedance of the line to point 10 are:',\n", + "print (Z0ckt),\n", + "print (Z1ckt)\n", + "print 'b The impedance to ground of the line to point 10',\n", + "print (ZGckt)\n", + "print 'c The Total positive sequence impedance including system impedance is',\n", + "print (Z1)\n", + "print 'd The Total Impedance to ground to point 10 including system impedance is',\n", + "print (ZG)\n", + "print 'All the Above impedances are in ohm'\n", + "print 'e) The Three phase fault current at point 10 is %g A'%(If3phi)\n", + "print 'f) The line to line fault current at point 10 is %g A'%(IfLL)\n", + "print 'g) The Line to Ground Current at point 10 is %g A'%(IfLG)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Zero and Postive sequence impedance of the line to point 10 are: (0.778272+4.005408j) (0.61248+1.275648j)\n", + "b The impedance to ground of the line to point 10 (0.667744+2.185568j)\n", + "c The Total positive sequence impedance including system impedance is (1.33238+4.737548j)\n", + "d The Total Impedance to ground to point 10 including system impedance is (1.286844+5.525268j)\n", + "All the Above impedances are in ohm\n", + "e) The Three phase fault current at point 10 is 1463.02 A\n", + "f) The line to line fault current at point 10 is 1266.97 A\n", + "g) The Line to Ground Current at point 10 is 1269.14 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "St = 5*(10**6); #Capacity of Transformer\n", + "Zt = 1j*0.065; #Transformer Reacmath.tance\n", + "SB3phi = 1*(10**6); #3 Phase Power Base\n", + "VBLL = 69*(10**3); #Line to line voltage\n", + "VBLLn = 12.47*(10**3); #Line To line voltage\n", + "Vf = 1; #Per Unit Value of Voltage\n", + "Zb = (VBLL**2)/SB3phi; #Base Impedance\n", + "\n", + "#Zckt and Zf and Zt are Zero for Bus 1\n", + "#Zckt and Zf are Zero for Bus 2\n", + "#Power Generation of the system\n", + "SMax = 600*(10**6); #Maximum\n", + "SMin = 360*(10**6); #Minimum\n", + "\n", + "# Calculations\n", + "Xt = 0.065; #Transformer Reacmath.tance in per unit\n", + "MZsysmax = (VBLL**2)/SMax; #System Impedance at Maximum Power Generation\n", + "Ib = SB3phi/(math.sqrt(3)*VBLL); #Base Current\n", + "Zsysmaxpu = MZsysmax*exp(1j*math.pi*90/180)/Zb; #System Impedance Phasor\n", + "#Three Phase Fault Current\n", + "If3phimaxpu1 = abs(Vf/(Zsysmaxpu));\n", + "If3phimax1 = If3phimaxpu1*Ib;\n", + "Sf3phimax1 = math.sqrt(3)*VBLL*If3phimax1/1000000;\n", + "\n", + "#Line to Line Fault Current\n", + "IfLLmax1 = 0.866*If3phimax1;\n", + "SfLLmax1 = VBLL*IfLLmax1/1000000;\n", + "\n", + "#Line to Ground Fault\n", + "IfLGmaxpu1 = abs(3*Vf/((2*Zsysmaxpu)));\n", + "IfLGmax1 = IfLGmaxpu1*Ib;\n", + "SfLGmax1 = VBLL*IfLGmax1/(1000000*math.sqrt(3));\n", + "\n", + "Stn = SB3phi; #Numreical Value is Equal\n", + "Ztn = Zt*(Stn/St); #New Per Unit Transformer Reacmath.tance\n", + "#New Base Values\n", + "Zbn = (VBLLn**2)/SB3phi;\n", + "Ibn = Stn/(math.sqrt(3)*VBLLn);\n", + "\n", + "#Three Phase Fault Current\n", + "If3phimaxpu2 = abs(Vf/(Zsysmaxpu+Ztn));\n", + "If3phimax2 = If3phimaxpu2*Ibn;\n", + "Sf3phimax2 = math.sqrt(3)*VBLLn*If3phimax2/1000000;\n", + "\n", + "#Line to Line Fault Current\n", + "IfLLmax2 = 0.866*If3phimax2;\n", + "SfLLmax2 = VBLLn*IfLLmax2/1000000;\n", + "\n", + "#Line to Ground Fault\n", + "IfLGmaxpu2 = abs(3*Vf/((2*Zsysmaxpu)+(3*Ztn)));\n", + "IfLGmax2 = IfLGmaxpu2*Ibn;\n", + "SfLGmax2 = VBLLn*IfLGmax2/(1000000*math.sqrt(3));\n", + "\n", + "#Minimum Power Generation\n", + "MZsysmin = (VBLL**2)/SMin; #System Impedance at Maximum Power Generation\n", + "Ib = SB3phi/(math.sqrt(3)*VBLL); #Base Current\n", + "Zsysminpu = MZsysmin*exp(1j*math.pi*90/180)/Zb; #System Impedance Phasor\n", + "#Three Phase Fault Current\n", + "If3phiminpu1 = abs(Vf/(Zsysminpu));\n", + "If3phimin1 = If3phiminpu1*Ib;\n", + "Sf3phimin1 = math.sqrt(3)*VBLL*If3phimin1/1000000;\n", + "\n", + "#Line to Line Fault Current\n", + "IfLLmin1 = 0.866*If3phimin1;\n", + "SfLLmin1 = VBLL*IfLLmin1/1000000;\n", + "\n", + "#Line to Ground Fault\n", + "IfLGminpu1 = abs(3*Vf/((2*Zsysminpu)));\n", + "IfLGmin1 = IfLGminpu1*Ib;\n", + "SfLGmin1 = VBLL*IfLGmin1/(1000000*math.sqrt(3));\n", + "\n", + "Stn = SB3phi; #Numreical Value is Equal\n", + "Ztn = Zt*(Stn/St); #New Per Unit Transformer Reacmath.tance\n", + "#New Base Values\n", + "Zbn = (VBLLn**2)/SB3phi;\n", + "Ibn = Stn/(math.sqrt(3)*VBLLn);\n", + "\n", + "#Three Phase Fault Current\n", + "If3phiminpu2 = abs(Vf/(Zsysminpu+Ztn));\n", + "If3phimin2 = If3phiminpu2*Ibn;\n", + "Sf3phimin2 = math.sqrt(3)*VBLLn*If3phimin2/1000000;\n", + "\n", + "#Line to Line Fault Current\n", + "IfLLmin2 = 0.866*If3phimin2;\n", + "SfLLmin2 = VBLLn*IfLLmin2/1000000;\n", + "\n", + "#Line to Ground Fault\n", + "IfLGminpu2 = abs(3*Vf/((2*Zsysminpu)+(3*Ztn)));\n", + "IfLGmin2 = IfLGminpu2*Ibn;\n", + "SfLGmin2 = VBLLn*IfLGmin2/(1000000*math.sqrt(3));\n", + "\n", + "# Results\n", + "print 'a For Maximum Power Generation:'\n", + "print 'Bus 1'\n", + "print '3 phase fault current is %g A and %g MVA'%(If3phimax1,Sf3phimax1)\n", + "print 'Line to Line fault current is %g A and %g MVA'%(IfLLmax1,SfLLmax1)\n", + "print 'Line to ground fault current is %g A and %g MVA'%(IfLGmax1,SfLGmax1)\n", + "print 'Bus 2'\n", + "print '3 phase fault current is %g A and %g MVA'%(If3phimax2,Sf3phimax2)\n", + "print 'Line to Line fault current is %g A and %g MVA'%(IfLLmax2,SfLLmax2)\n", + "print 'Line to ground fault current is %g A and %g MVA'%(IfLGmax2,SfLGmax2)\n", + "print 'b For Minimum Power Generation:'\n", + "print 'Bus 1'\n", + "print '3 phase fault current is %g A and %g MVA'%(If3phimin1,Sf3phimin1)\n", + "print 'Line to Line fault current is %g A and %g MVA'%(IfLLmin1,SfLLmin1)\n", + "print 'Line to ground fault current is %g A and %g MVA'%(IfLGmin1,SfLGmin1)\n", + "print 'Bus 2'\n", + "print '3 phase fault current is %g A and %g MVA'%(If3phimin2,Sf3phimin2)\n", + "print 'Line to Line fault current is %g A and %g MVA'%(IfLLmin2,SfLLmin2)\n", + "print 'Line to ground fault current is %g A and %g MVA'%(IfLGmin2,SfLGmin2)\n", + "\n", + "#Note that 0.00166666666 is not rounded as 0.0017\n", + "#Hence you find all the answers close by\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a For Maximum Power Generation:\n", + "Bus 1\n", + "3 phase fault current is 5691.02 A and 680.143 MVA\n", + "Line to Line fault current is 4928.43 A and 340.061 MVA\n", + "Line to ground fault current is 8536.54 A and 340.071 MVA\n", + "Bus 2\n", + "3 phase fault current is 31490 A and 680.143 MVA\n", + "Line to Line fault current is 27270.4 A and 340.061 MVA\n", + "Line to ground fault current is 47235 A and 340.071 MVA\n", + "b For Minimum Power Generation:\n", + "Bus 1\n", + "3 phase fault current is 3064.4 A and 366.231 MVA\n", + "Line to Line fault current is 2653.77 A and 183.11 MVA\n", + "Line to ground fault current is 4596.6 A and 183.115 MVA\n", + "Bus 2\n", + "3 phase fault current is 16956.2 A and 366.231 MVA\n", + "Line to Line fault current is 14684 A and 183.11 MVA\n", + "Line to ground fault current is 25434.3 A and 183.115 MVA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 572" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Percent Impedances of the substation transformer\n", + "Rtp = 1.;\n", + "Ztp = 7.;\n", + "Xtp = math.sqrt((Ztp**2)-(Rtp**2)); \n", + "Ztpu = Rtp+(1j*Xtp); #Transformer Impedance\n", + "Vll = 12.47; #Line to Line voltage in kV\n", + "Vln = 7.2; #Line to Neutral Voltage\n", + "V = 240.; #Secondary Voltage\n", + "St = 7500.; #Rating of the transformer in kVA\n", + "Sts = 100.; #Rating of Secondary Transformer\n", + "Ztp = Ztpu*((Vll**2)*10/St);\n", + "SSC = complex(.466,0.0293);\n", + "#From Table 10-7\n", + "Z1 = 0.0870+(1j*0.1812);\n", + "Z0 = complex(0.1653,0.4878);\n", + "\n", + "ZG = ((2*Z1)+Z0)/3; #Impedance to Ground\n", + "\n", + "Zsys = 0 ; #Assumption Made\n", + "Zeq = Zsys+Ztp+ZG; #Equivalent Impedance of the Primary\n", + "\n", + "PZ2 = Zeq*((V/(Vln*1000))**2); #Primary Impedance reffered to secondary\n", + "\n", + "# Calculations\n", + "#Distribution Tranformer Parameters\n", + "Rts = 1;\n", + "Zts = 1.9;\n", + "Xts = math.sqrt((Zts**2)-(Rts**2));\n", + "Ztspu = complex(Rts,Xts);\n", + "\n", + "Zts = Ztspu*((V/1000)**2)*10/Sts; #Distribution Transformer Reacmath.tance\n", + "\n", + "Z1SL = (60./1000)*SSC; #Impedance for 60 feet\n", + "\n", + "Zeq1 = PZ2+Zts+Z1SL; #Total Impedance to the fault in secondary\n", + "\n", + "IfLL = V/abs(Zeq1); #Fault Current At the secondary fault point F\n", + "\n", + "\n", + "# Results\n", + "print 'a The Impedance of the substation in ohms',\n", + "print (Ztp)\n", + "print 'b The Positive And Zero Sequence Impedances in ohms',\n", + "print (Z1),\n", + "print (Z0)\n", + "print 'c The Line to Ground impedance in the primary system in ohms',\n", + "print (ZG)\n", + "print 'd The Total Impedance through the primary in ohms',\n", + "print (Zeq)\n", + "print 'e The Total Primary Impedance referred to the secondary in ohms',\n", + "print (PZ2)\n", + "print 'f The Distribution transformer impedance in ohms',\n", + "print (Zts)\n", + "print 'g the Impedance of the secondary cable in ohms',\n", + "print (Z1SL)\n", + "print 'h The Total Impedance to the fault in ohms',\n", + "print (Zeq1)\n", + "print 'i) The Single Phase line to line fault for the 120/240 V three-wire service in amperes is %g A'%(IfLL)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Impedance of the substation in ohms (0.207334533333+1.43645578359j)\n", + "b The Positive And Zero Sequence Impedances in ohms (0.087+0.1812j) (0.1653+0.4878j)\n", + "c The Line to Ground impedance in the primary system in ohms (0.1131+0.2834j)\n", + "d The Total Impedance through the primary in ohms (0.320434533333+1.71985578359j)\n", + "e The Total Primary Impedance referred to the secondary in ohms (0.00035603837037+0.00191095087065j)\n", + "f The Distribution transformer impedance in ohms (0.00576+0.00930556478673j)\n", + "g the Impedance of the secondary cable in ohms (0.02796+0.001758j)\n", + "h The Total Impedance to the fault in ohms (0.0340760383704+0.0129745156574j)\n", + "i) The Single Phase line to line fault for the 120/240 V three-wire service in amperes is 6582.1 A\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb new file mode 100755 index 00000000..3fce23ef --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb @@ -0,0 +1,606 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:12638b4b6feef6ce42affa16d2293ad388bb21932c76952667badfebd6be692b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Distribution System Reliability" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rsys = 0.99 #Minimum Acceptable System Reliabilty\n", + "n = 15.; #Number of identical Components\n", + "\n", + "# Calculations\n", + "q = (1-Rsys)/n; #Probability of component failure\n", + "Ri = 1-q; #Approximate value of the component reliability\n", + "\n", + "# Results\n", + "print 'The Approximate Value of The component reliability is %g'%(Ri)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Approximate Value of The component reliability is 0.999333\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "L = 4.; #Total Length of the cable\n", + "Lov = 3.; #Length of Overhead Cable\n", + "Lu = L-Lov; #Length of Underground Cable\n", + "Nct = 2.; #Number of circuit terminations\n", + "T = 10.; #No of years for which the record is shown\n", + "\n", + "Fov = 2.; # Faults Per Mile of the Over Head Cable\n", + "Fu = 1.; #Faults Per Mile of The Underground cable\n", + "\n", + "Ct = 0.3/100 # Cable Termination Fault Rate\n", + "\n", + "#Repair Time\n", + "Tov = 3.; #Over Head\n", + "Tu = 28.; #Underground\n", + "Tct = 3.; #Cable Termination\n", + "\n", + "# Calculations\n", + "lamdaFDR = (Lov*Fov/T)+(Lu*Fu/T)+(2*Ct); #Total Annual Fault Rate\n", + "rFDR = ((Tov*Lov*Fov/T)+(Tu*Lu*Fu/T)+(2*Ct*Tct))/lamdaFDR; #Annual Fault Restoration Time\n", + "mFDR = 8760-rFDR; #Annual Mean Time of Failure\n", + "UFDR = rFDR*100/(rFDR+mFDR); #Unavailability of Feeder\n", + "AFDR = 100-UFDR; #Availability of Feeder\n", + "\n", + "# Results\n", + "print 'a) The Total Annual Fault Rate is %g faults per year'%(lamdaFDR)\n", + "print 'b) The Annual Fault Restoration Time is %g hours per fault per year'%(rFDR)\n", + "print 'c) Unavailability of the feeder is %g percent'%(UFDR)\n", + "print 'd) Availability of the feeder is %g percent'%(AFDR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Total Annual Fault Rate is 0.706 faults per year\n", + "b) The Annual Fault Restoration Time is 6.54108 hours per fault per year\n", + "c) Unavailability of the feeder is 0.0746698 percent\n", + "d) Availability of the feeder is 99.9253 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Annual average Fault rates\n", + "Fm = 0.08;\n", + "Fl = 0.2;\n", + "\n", + "\n", + "#Average Repair Times\n", + "Rm = 3.5; #Main\n", + "Rl = 1.5; #Lateral\n", + "Rs = 0.75; #Manual Sections\n", + "\n", + "# Dismath.tances of the Lateral Feeders of A,B, and C respectively\n", + "Lla = 2.;\n", + "Llb = 1.5;\n", + "Llc = 1.5;\n", + "\n", + "# Dismath.tances of the Main Feeders of A,B, and C respectively\n", + "Lma = 1.;\n", + "Lmb = 1.;\n", + "Lmc = 1.;\n", + "\n", + "# Calculations\n", + "TFm = (Lma*Fm)+(Lmc*Fm)+(Lmb*Fm); #Annual Fault of the Main Sections\n", + "\n", + "def SusInt(y): \n", + " return TFm+(Fl*y)\n", + "\n", + "#Sustained Interruption Rates for A,B and C\n", + "IrA = SusInt(Lla);\n", + "IrB = SusInt(Llb);\n", + "IrC = SusInt(Llc);\n", + "\n", + "#Annual Repair time for A,B and C\n", + "rA = ((Lma*Fm*Rm)+(Lmb*Fm*Rs)+(Lmc*Fm*Rs)+(Lla*Fl*Rl))/IrA;\n", + "rB = ((Lma*Fm*Rm)+(Lmb*Fm*Rm)+(Lmc*Fm*Rs)+(Llb*Fl*Rl))/IrB;\n", + "rC = ((Lma*Fm*Rm)+(Lmb*Fm*Rm)+(Lmc*Fm*Rm)+(Llc*Fl*Rl))/IrC;\n", + "\n", + "# Results\n", + "print 'i The Annual Sustained Interruption Rates for:'\n", + "print 'Customer A : %g faults per year'%(IrA)\n", + "print 'Customer B : %g faults per year'%(IrB)\n", + "print 'Customer C : %g faults per year'%(IrC)\n", + "print 'ii The Average Annual Repair Time Restoration Time for:'\n", + "print 'Customer A : %g hours per fault per year'%(rA)\n", + "print 'Customer A : %g hours per fault per year'%(rB)\n", + "print 'Customer A : %g hours per fault per year'%(rC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i The Annual Sustained Interruption Rates for:\n", + "Customer A : 0.64 faults per year\n", + "Customer B : 0.54 faults per year\n", + "Customer C : 0.54 faults per year\n", + "ii The Average Annual Repair Time Restoration Time for:\n", + "Customer A : 1.5625 hours per fault per year\n", + "Customer A : 1.98148 hours per fault per year\n", + "Customer A : 2.38889 hours per fault per year\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 612" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ri = 0.85;\n", + "\n", + "def relp(y,z):\n", + " return 1-((1-(Ri**y))**z) #Equal Parallel Combination\n", + "\n", + "def rels(y,z):\n", + " return (1-((1-Ri)**y))**z #Equal Series Combination\n", + "\n", + "# Calculations\n", + "#Case 1: 4 elements in series\n", + "\n", + "Req1 = rels(1,4);\n", + "\n", + "#Case 2: Two Comination of 4 elements in series, parallel to each other\n", + "\n", + "Req2 = relp(4,2);\n", + "\n", + "#Case 3 : ((two elements in series) #(two elements in series))in series with ((two elements in series) #(two elements in series))\n", + "\n", + "#Two Segments\n", + "R1 = relp(2,2);\n", + "R2 = relp(2,2);\n", + "Req3 = R1*R2;\n", + "\n", + "#Case 4 : (two elements in parallel)in series with ((three elements in series) #(three elements in series))\n", + "\n", + "#Two Segments\n", + "R1 = relp(1,2);\n", + "R2 = relp(3,2);\n", + "Req4 = R1*R2;\n", + "\n", + "#Case 5, 4 groups of (2 elements in parallel) connected in series to each other\n", + "Req5 = rels(2,4);\n", + "\n", + "# Results\n", + "print 'The Equivalent System reliability for:'\n", + "print 'a) Configuration A : %g'%(Req1)\n", + "print 'b) Configuration B : %g'%(Req2)\n", + "print 'c) Configuration C : %g'%(Req3)\n", + "print 'd) Configuration D : %g'%(Req4)\n", + "print 'e) Configuration E : %g'%(Req5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Equivalent System reliability for:\n", + "a) Configuration A : 0.522006\n", + "b) Configuration B : 0.771522\n", + "c) Configuration C : 0.851917\n", + "d) Configuration D : 0.831951\n", + "e) Configuration E : 0.912992\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Design the system to meet the given Equivalent System Reliability\n", + "#Page 614\n", + "\n", + "# Variables\n", + "#Individual System Reliabilities\n", + "Ra = 0.8;\n", + "Rb = 0.95;\n", + "Rc = 0.99;\n", + "Rd = 0.90;\n", + "Re = 0.65;\n", + "\n", + "# Calculations\n", + "#When All Are Connected in Series\n", + "\n", + "Req = Ra*Rb*Rc*Rd*Re; #Equivalent System Reliability\n", + "\n", + "Rr = 0.8; #Required\n", + "\n", + "Rae = Rr/(Rb*Rc*Rd);\n", + "\n", + "#Since Connecting the elements in parallel will increase their reliability\n", + "def rel(Ri,y,):\n", + " return (1-((1-Ri)**y)) #Equal Only Parallel Combination\n", + "\n", + "#Since Connecting the elements in parallel will increase their reliability\n", + "#Conditions to Find The Number of Elements to be used\n", + "for i in range(1,11):\n", + " L = i; #Number of Time Element A is used\n", + " R1 = rel(Ra,i);\n", + " X = R1-Rae;\n", + " if(abs(X)+X == 0):\n", + " continue;\n", + " else:\n", + " break;\n", + "\n", + "for i in range(1,11):\n", + " M = i; #Number of Time Element E is used\n", + " R2 = rel(Re,i);\n", + " X = R2-Rae;\n", + " if(abs(X)+X == 0):\n", + " continue;\n", + " else:\n", + " break;\n", + "\n", + "print 'a) The Equivalent system Reliability is %g'%(Req)\n", + "print 'b) One Each of B,C and D all connected in series are connected in serieswith the series combination of XComination of\\\n", + " %g elements of A, \\nAll Connected in Parallel)and YComination of %g elements of E, \\nAll Connected in Parallel) to\\\n", + " achieve %g Equivalent System Realibility'%(L,M,Rr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Equivalent system Reliability is 0.440154\n", + "b) One Each of B,C and D all connected in series are connected in serieswith the series combination of XComination of 2 elements of A, \n", + "All Connected in Parallel)and YComination of 3 elements of E, \n", + "All Connected in Parallel) to achieve 0.8 Equivalent System Realibility\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Find The Probability on the reliability of transformers\n", + "#Page 614\n", + "\n", + "# Variables\n", + "#Reliabilities of The Three Transformers\n", + "Pa = 0.9;\n", + "Pb = 0.95;\n", + "Pc = 0.99;\n", + "\n", + "#Faliures of Three Transformers\n", + "Qa = 1-Pa;\n", + "Qb = 1-Pb;\n", + "Qc = 1-Pc;\n", + "\n", + "# Calculations\n", + "#Probability of NO Transformer Failing\n", + "Pnf = Pa*Pb*Pc;\n", + "\n", + "PfA = Qa*Pb*Pc #Probability of Transformer A Failing\n", + "PfB = Pa*Qb*Pc #Probability of Transformer B Failing\n", + "PfC = Pa*Pb*Qc #Probability of Transformer C Failing\n", + "\n", + "PfAB = Qa*Qb*Pc #Probability of Transformer A and B Failing\n", + "PfBC = Pa*Qb*Qc #Probability of Transformer B and C Failing\n", + "PfCA = Qa*Pb*Qc #Probability of Transformer C and A Failing\n", + "\n", + "Pf = Qa*Qb*Qc; #Probability of All Transformers failing\n", + "\n", + "# Results\n", + "print 'a) Probability of No Transformer Failing is %g'%(Pnf)\n", + "print 'b'\n", + "print 'Probability of Transformer A Failing is %g'%(PfA)\n", + "print 'Probability of Transformer B Failing is %g'%(PfB)\n", + "print 'Probability of Transformer C Failing is %g'%(PfC)\n", + "print 'c'\n", + "print 'Probability of Transformers A and B Failing is %g'%(PfAB)\n", + "print 'Probability of Transformers B and C Failing is %g'%(PfBC)\n", + "print 'Probability of Transformers C and A Failing is %g'%(PfCA)\n", + "print 'd) Probability of All Three Transformers Failing is %g'%(Pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Probability of No Transformer Failing is 0.84645\n", + "b\n", + "Probability of Transformer A Failing is 0.09405\n", + "Probability of Transformer B Failing is 0.04455\n", + "Probability of Transformer C Failing is 0.00855\n", + "c\n", + "Probability of Transformers A and B Failing is 0.00495\n", + "Probability of Transformers B and C Failing is 0.00045\n", + "Probability of Transformers C and A Failing is 0.00095\n", + "d) Probability of All Three Transformers Failing is 5e-05\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Determine Probabilities Using Markovian Principle\n", + "#Page 619\n", + "\n", + "# Variables\n", + "#Conditional Probabilites Present Future\n", + "Pdd = 2./100; #Down Down\n", + "Pud = 5./100; #Up Down\n", + "Pdu = 1-Pdd; #Down up\n", + "Puu = 1-Pud; #Up Up\n", + "\n", + "# Calculations\n", + "P = [[Pdd,Pdu],[Pud,Puu]]; #Transition Matrix\n", + "\n", + "# Results\n", + "print 'a The Conditional Probabilites for'\n", + "print 'Transformers Down in Present and Down in Future is %g'%(Pdd)\n", + "print 'Transformers Down in Present and Up in Future is %g'%(Pdd)\n", + "print 'Transformers Up in Present and Down in Future is %g'%(Pdd)\n", + "print 'Transformers Up in Present and Up in Future is %g'%(Pdd)\n", + "print 'b The Transition Matrix is',\n", + "print (P)\n", + "print 'c The Transition Diagram can be viewed with the result file attached to this code'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Conditional Probabilites for\n", + "Transformers Down in Present and Down in Future is 0.02\n", + "Transformers Down in Present and Up in Future is 0.02\n", + "Transformers Up in Present and Down in Future is 0.02\n", + "Transformers Up in Present and Up in Future is 0.02\n", + "b The Transition Matrix is [[0.02, 0.98], [0.05, 0.95]]\n", + "c The Transition Diagram can be viewed with the result file attached to this code\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 620" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Determine the Conditional Outage Probabilites\n", + "#Page 620\n", + "\n", + "# Calculations\n", + "#Conditional Outage Probabilites From The Table Given\n", + "P11 = 40./100;\n", + "P12 = 30./100;\n", + "P13 = 30./100;\n", + "P21 = 20./100;\n", + "P22 = 50./100;\n", + "P23 = 30./100;\n", + "P31 = 25./100;\n", + "P32 = 25./100;\n", + "P33 = 50./100;\n", + "\n", + "#Transition Matrix\n", + "P = [[P11,P12,P13],[P21,P22,P23],[P31,P32,P33]];\n", + "\n", + "print \"a The Conditional Outage Probabilites for:\"\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 1 is %g\"%(P11)\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 2 is %g\"%(P12)\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 3 is %g\"%(P13)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 1 is %g\"%(P21)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 2 is %g\"%(P22)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 3 is %g\"%(P23)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 1 is %g\"%(P31)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 2 is %g\"%(P32)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 3 is %g\"%(P33)\n", + "print \"b Transition Matrix is\"\n", + "print (P)\n", + "print \"c The Transition figure is print layed in the result file attached to this code\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Conditional Outage Probabilites for:\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 1 is 0.4\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 2 is 0.3\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 3 is 0.3\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 1 is 0.2\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 2 is 0.5\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 3 is 0.3\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 1 is 0.25\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 2 is 0.25\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 3 is 0.5\n", + "b Transition Matrix is\n", + "[[0.4, 0.3, 0.3], [0.2, 0.5, 0.3], [0.25, 0.25, 0.5]]\n", + "c The Transition figure is print layed in the result file attached to this code\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "# Variables\n", + "P = array([[0.6,0.4],[0.3,0.7]]); #One Step Transition Matrix\n", + "\n", + "Po = array([0.8,0.2]); #Initial State Probability Vector\n", + "\n", + "# Calculations\n", + "#Funtion to determine the Vector of State Probability\n", + "def VSP(y): \n", + " return (Po*(P**y))\n", + "\n", + "P1 = VSP(1); #Vector of State Probability at Time t1\n", + "P4 = VSP(4); #Vector of State Probability at Time t4\n", + "P8 = VSP(8); #Vector of State Probability at Time t8\n", + "\n", + "# Results\n", + "print 'a The Vector of State Probability at time t1 is',\n", + "print (P1)\n", + "print 'a The Vector of State Probability at time t4 is',\n", + "print (P4)\n", + "print 'a The Vector of State Probability at time t8 is',\n", + "print (P8)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Vector of State Probability at time t1 is [[ 0.48 0.08]\n", + " [ 0.24 0.14]]\n", + "a The Vector of State Probability at time t4 is [[ 0.10368 0.00512]\n", + " [ 0.00648 0.04802]]\n", + "a The Vector of State Probability at time t8 is [[ 1.34369280e-02 1.31072000e-04]\n", + " [ 5.24880000e-05 1.15296020e-02]]\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch2.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch2.ipynb new file mode 100755 index 00000000..f2865431 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch2.ipynb @@ -0,0 +1,861 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:45c2bf36a13c4358e12d368504a2e6b1e7cd12f738f3e5c55995bd4950ad15ca" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 :\n", + "Load Characteristics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import linspace,array\n", + "from matplotlib.pyplot import bar,suptitle,xlabel,ylabel\n", + "\n", + "# Variables\n", + "t = linspace(0,24,25)\n", + "SL = array([100,100,100,100,100,100,100,100,0,0,0,0,0,0,0,0,0,0,100,100,100,100,100,100,100]);\n", + "R = array([200,200,200,200,200,200,200,300,400,500,500,500,500,500,500,500,500,600,700,800,1000,1000,800,600,300]);\n", + "C = array([200,200,200,200,200,200,200,200,300,500,1000,1000,1000,1000,1200,1200,1200,1200,800,400,400,400,200,200,200]);\n", + "\n", + "# Calculations\n", + "Tl = SL+R+C;\n", + "\n", + "# Results\n", + "#To print lay the Load bar curve diagram\n", + "bar(t,Tl,color='red')#,0.5,'red')\n", + "suptitle('Example 2.1')\n", + "xlabel(\"Time in hrs\")\n", + "ylabel(\"Load in kW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 7, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEhCAYAAACDefxEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGslJREFUeJzt3X+4XVV54PHvMSEKkgtc9YlJwEnEZCSKrSDBn+Vo2zRM\nO0naqQSqlJGUkUmrjuNUiXbM9Xk6Tmy1SsdJOjMKhKppU6E8wYGUQDlKRYkiyI+QkmSM5UYTrKYk\nIEKQO3+863J3bu69Wffknr3Puef7eZ7z7H3W2Xuvl8PJee9a6+y1QJIkSZIkSZIkSZIkSZIkSZLU\nhX4O3FN4fLCiOHYDveM4/ovAduB+4PPA1FGO2wzsB248luAkSeFg1QEk32N8SeP8wv6XgMtHOe5t\nwG9g0lDJnld1AFKJTiL+ip+fnm8AVqT9dcC3gAeAvsI5u4GPE62VbwNnAbcAO4F3p2PqwNeAr6Tr\nrwNqI9T/TuCudK2/YOR/fzcX9r8FnDrKf8vfA4+P8pokaZye4fDuqben8l8B7gQuBG4qHH9K2k4B\nbgdenZ5/j6Hk8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wGfnXY8TVi\nxuIFRPfZ14E3Anem8/+ZSFYQE3fOIdaU6Tmm/1rpKEwa0ugGiBbFz4n5vJ4H/F167X7ii3o+kVBu\nTeVTiHmfjub6tP1Ous5IthaudW867s70/K8Lx90HfImYN6gbJt5ThUwa0tieTttnib/kKTyfSrQI\nHiRaAePxVNr+nNH/HT5V2B9+3BOF/V8Hfolo7XwEODMdL004xzSk0eUsgfmPwEuA16fnxxFdSs1e\nb7xqwMuIcZIrgJOIqfGllrClIYXieMNI+3Dk6m4DROvjt4E/J76wpwKfJtYsGK2OnPLc1eSmEIsL\nnUQkkCuBAxnnSZIkSZIkSZIkSZIkSZIkSZIkSZIkqRP8f8mDCJC9Ac4DAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Fls = 0.15;\n", + "Ppl = 80*(10**3); #Power Loss at peak load.\n", + "\n", + "# Calculations\n", + "Avgpl = Fls*Ppl; #Average Power Loss\n", + "TAELCu = Avgpl*8760; #Total annual energy loss\n", + "\n", + "# Results\n", + "print 'a) The average annual power loss = %g kW'%(Avgpl/1000)\n", + "print ' b) The total annual energy loss due to the copper losses of the feeder circuits = %g kWh'%(TAELCu/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The average annual power loss = 12 kW\n", + " b) The total annual energy loss due to the copper losses of the feeder circuits = 105120 kWh\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "TCDi = [9,9,9,9,9,9]; #Load for each house all in kilowatt\n", + "DFi = 0.65; #Demand factor\n", + "Fd = 1.1; #Diversity factor\n", + "\n", + "# Calculations\n", + "Dg = sum(TCDi)*DFi/Fd;\n", + "\n", + "# Results\n", + "print 'The diversified demand of the group on the distribution transformer is %g kW'%(Dg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diversified demand of the group on the distribution transformer is 31.9091 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "SP = 3000*(10**3); #System peak in kVA per phase\n", + "Cl = 0.5/100; #Percentage of copper loss\n", + "\n", + "# Calculations\n", + "I2R = Cl*SP; #Copper loss of the feeder per phase\n", + "I2R3 = 3*I2R; #Copper losses of the feeder per 3 phase\n", + "\n", + "# Results\n", + "print 'a) The copper loss of the feeder per phase = %g kW'%(I2R/1000)\n", + "print ' b) The total coper losses of the feeder per three phase = %g kW'%(I2R3/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The copper loss of the feeder per phase = 15 kW\n", + " b) The total coper losses of the feeder per three phase = 45 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Pi = 2000.*(10**3); #Peak for industrial load\n", + "Pr = 2000.*(10**3); #Peak for residential load\n", + "Dg = 3000.*(10**3); #System peak load as specified in the diagram\n", + "P = [Pi,Pr]; #System peaks for various loads \n", + "\n", + "# Calculations\n", + "Fd = sum(P)/Dg; #Diversity factor\n", + "LD = sum(P)-Dg; #Load diversity factor\n", + "Fc = 1/Fd; # Coincidence factor\n", + "\n", + "# Results\n", + "print 'a) The diversity factor of the load is %g'%(Fd)\n", + "print ' b) The load diversity of the load is %g kW'%(LD/1000)\n", + "print ' c) The coincidence factor of the load is %g'%(Fc)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The diversity factor of the load is 1.33333\n", + " b) The load diversity of the load is 1000 kW\n", + " c) The coincidence factor of the load is 0.75\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,transpose\n", + "\n", + "# Variables\n", + "#Refer diagram of the first example of this chapter\n", + "Ps = 100.; #Peak load for street lighting in kW\n", + "Pr = 1000.; #Peak load for Residential in kW\n", + "Pc = 1200.; #Peak Commercial load in kW\n", + "P = array([Ps,Pr,Pc]) #Peaks of various loads\n", + "\n", + "Ls5 = 0.; #Street lighting load at 5.00 PM in kW\n", + "Lr5 = 600.; #Residential load at 5.00 PM in kW\n", + "Lc5 = 1200.; #Commercial Load at 5.00 PM in kW\n", + "\n", + "# Calculations\n", + "Cstreet = Ls5/Ps;\n", + "Cresidential = Lr5/Pr;\n", + "Ccommercial = Lc5/Pc;\n", + "C = array([Cstreet,Cresidential,Ccommercial]); #Class distribution for various factors\n", + "\n", + "Fd = (sum(P))/(sum(P* transpose(C)));\n", + "Dg = (sum(P* transpose(C)));\n", + "Fc = 1/Fd;\n", + "\n", + "print 'a The class distribution factors factor of:'\n", + "print ' i) Street lighting = %g \\\n", + "\\nii) Residential = %g \\\n", + "\\niii) Commercial = %g'%(C[0],C[1],C[2])\n", + "print ' b) The diversity factor for the primary feeder = %g'%(Fd)\n", + "print ' c) The diversified maximum demand of the load group = %g kW'%(Dg) \n", + "print ' d) The coincidence factor of the load group = %g'%(Fc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The class distribution factors factor of:\n", + " i) Street lighting = 0 \n", + "ii) Residential = 0.6 \n", + "iii) Commercial = 1\n", + " b) The diversity factor for the primary feeder = 1.27778\n", + " c) The diversified maximum demand of the load group = 1800 kW\n", + " d) The coincidence factor of the load group = 0.782609\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print 'Assuming a monthly load curve as shown in the figure attached\\\n", + " to this code'\n", + "\n", + "# Variables\n", + "TAE = 10.**7; # Total annual energy in kW\n", + "APL = 3500.; #Annual peak load in kW\n", + "\n", + "# Calculations\n", + "Pav = TAE/8760; #Annual average power demand\n", + "Fld = Pav/APL; #Annual load factor\n", + "\n", + "# Results\n", + "print 'a) The annual power demand is %g kW'%(Pav)\n", + "print 'b) The annual load factor is %g'%(Fld)\n", + "print 'The unsold energy, as shown in the figure is a measure of capacity and investment math.cost. Ideally it should be kept at a minimum'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming a monthly load curve as shown in the figure attached to this code\n", + "a) The annual power demand is 1141.55 kW\n", + "b) The annual load factor is 0.326158\n", + "The unsold energy, as shown in the figure is a measure of capacity and investment math.cost. Ideally it should be kept at a minimum\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "print 'Assuming a monthly load curve as shown in the figure attached to this code'\n", + "\n", + "# Variables\n", + "Nl = 100.; #100% percent load to be supplied\n", + "TAE = 10.**7; # Total annual energy in kW\n", + "APL = 3500.; #Annual peak load in kW\n", + "\n", + "# Calculations\n", + "Pav = TAE/8760; #Annual average power demand\n", + "Fld = (Pav+Nl)/(APL+Nl); #Annual load factor\n", + "Cr = 3; #Capacity math.cost\n", + "Er = 0.03; #Energy math.cost\n", + "ACC = Nl*12*Cr; #Additional capacity math.cost per kWh\n", + "AEC = Nl*8760*Er; #Additional energy math.cost per kWh\n", + "TAC = ACC+AEC; #Total annual math.cost\n", + "\n", + "# Results\n", + "print 'a) The new annual load factor on the substation is %g'%(Fld)\n", + "print 'b) The total annual additional costs to NL&NP to serve this load is $%g'%(TAC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming a monthly load curve as shown in the figure attached to this code\n", + "a) The new annual load factor on the substation is 0.344876\n", + "b) The total annual additional costs to NL&NP to serve this load is $29880\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "TAE = 5.61*(10**6); #Total annual energy in kW\n", + "APL = 2000.; #Annual peak load in kW\n", + "Lc = 0.03; #Cost of energy per kWh in dollars\n", + "Plp = 100.; #Power at peak load in kW\n", + "\n", + "# Calculations\n", + "Fld = TAE/(APL*8760); \n", + "Fls = (0.3*Fld)+(0.7*(Fld**2));\n", + "AvgEL = Fls*Plp; #Average energy loss\n", + "AEL = AvgEL*8760; #Annual energy loss\n", + "Tlc = AEL*Lc; #Cost of total annual copper loss\n", + "\n", + "# Results\n", + "print 'a) The annual loss factor is %g'%(Fls)\n", + "print ' b) The annual copper loss energy is %g kWh and the cost of total annual copper loss is $%g'%(AEL,Tlc)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The annual loss factor is 0.167834\n", + " b) The annual copper loss energy is 147022 kWh and the cost of total annual copper loss is $4410.67\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,arctan,transpose,arccos,radians\n", + "from sympy import Symbol,solve\n", + "\n", + "Fd = 1.15;\n", + "Pi = [1800,2000,2200]; #Demands of various feeders in kW (Real Power)\n", + "PF = [0.95,0.85,0.90]; #Power factor of the respective feeders\n", + "Dg = sum(Pi)/Fd;\n", + "P = Dg;\n", + "theta = arccos(PF);\n", + "\n", + "Q = sum(Pi*(radians(arctan(theta))))/Fd;\n", + "S = math.sqrt((P**2)+(Q**2));\n", + "LD = sum(Pi)-Dg;\n", + "\n", + " #Transformer sizes\n", + "Tp = array([2500,3750,5000,7500]);\n", + "Ts = array([3125,4687,6250,9375]); \n", + "\n", + "Ol = 1.25; #Maximum overload condition\n", + "Eol = Ts*Ol; #Overload voltages of the transformer\n", + "Ed = abs(Eol-S); # Difference between the overload values of the transformers and the P value of the system\n", + "\n", + "A = sorted(Ed); # To sort the differences and choose the best match\n", + "\n", + "T = [Tp[1],Ts[1]]; #Suitable transformer\n", + "\n", + "g = Symbol('g');\n", + "X = (1+g)-pow(2,1./10); #To find out the fans on rating\n", + "R = solve(X)[0];\n", + "g = R*100;\n", + "\n", + "n = Symbol('n');\n", + "Sn = 9375.; # Rating of the to be installed transformer\n", + " # Equation (1+g)**n * S = Sn\n", + " # a = (1+g)\n", + " # b = Sn/S\n", + "\n", + "a = 1+R;\n", + "b = Sn/S;\n", + "n = math.log(b)/math.log(a);\n", + "\n", + "print 'a) The 30 mins annual maximum deman on the substation transformer are %g kW and %g kVA respectively'%(P,S)\n", + "print ' b) The load diversity is %g kW'%(LD)\n", + "print ' c) Suitable transformer size for 25 percent short time over loads is %g/%g kVA'%(T[0],T[1])\n", + "print ' d) Fans on rating is %g percent and it will loaded for %g more year if a 7599/9375 kVA transformer is installed'%(g,math.ceil(n))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The 30 mins annual maximum deman on the substation transformer are 5217.39 kW and 5217.53 kVA respectively\n", + " b) The load diversity is 782.609 kW\n", + " c) Suitable transformer size for 25 percent short time over loads is 3750/4687 kVA\n", + " d) Fans on rating is 7.17735 percent and it will loaded for 9 more year if a 7599/9375 kVA transformer is installed\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\n", + "print 'NOTE'\n", + "print 'The figure 1 attached along with this code is the Maximum diversified 30- min demand characteristics\\\n", + "of various residential loads; A = Clothes dryer; D = range; E = lighting and miscellaneous appliances; \\\n", + "J = refrigerator Only the loads required for this problem have been mentioned '\n", + "\n", + "Ndt = 50.; #Number of distribution transformers\n", + "Nr = 900.; #Number of residences\n", + "\n", + " #When the loads are six.\n", + "PavMax6 = array([1.6,0.8,0.066,0.61]); #Average Maximum diversified demands (in kW) per house for dryer, range, refrigerator, for lighting and misc aapliances respectively according to the figure 1 attached with code. \n", + "\n", + "Mddt = sum(6*PavMax6); #30 min maximum diversified demand on the distribution transformer\n", + "\n", + " #When the loads are 900.\n", + "PavMax900 = array([1.2,0.53,0.044,0.52]); # #Average Maximum diversified demands (in kW) per house for dryer, range, refreigerato, for lighting and misc aapliances respectively according to the figure 1 attached with code.\n", + "\n", + "Mdf = sum(Nr*PavMax900); #30 min maximum diversified demand on the feeder\n", + "\n", + " #From the figure 2 attached to this code\n", + "Hdd4 = array([0.38,0.24,0.9,0.32]); #Hourly variation factor at time 4 PM for dryer, range, refrigerator, lighting and misc appliances\n", + "Hdd5 = array([0.30,0.80,0.9,0.70]); #Hourly variation factor at time 5 PM for dryer, range, refrigerator, lighting and misc appliances\n", + "Hdd6 = array([0.22,1.0,0.9,0.92]); #Hourly variation factor at time 6 PM for dryer, range, refrigerator, lighting and misc appliances\n", + "\n", + "Thdd4 = (6*PavMax6)*(Hdd4.T); #Gives the total hourly diversified demand in kW at time 4 PM\n", + "Thdd5 = (6*PavMax6)*Hdd5; #Gives the total hourly diversified demand in kW at time 5 PM\n", + "Thdd6 = (6*PavMax6)*Hdd6; #Gives the total hourly diversified demand in kW at time 6 PM\n", + "\n", + "print ' a) The 30 min maximum diversified demand on the distribution transformer = %g kW'%(Mddt)\n", + "print ' b) The 30 min maximum diversified demand on the distribution transformer = %g kW'%(Mdf)\n", + "print ' c The total hourly diversified demands at:'\n", + "print ' i) 4.00 PM = %g kW'%(sum(Thdd4))\n", + "print ' ii) 5.00 PM = %g kW'%(sum(Thdd5))\n", + "print ' iii) 6.00 PM = %g kW'%(sum(Thdd6))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NOTE\n", + "The figure 1 attached along with this code is the Maximum diversified 30- min demand characteristicsof various residential loads; A = Clothes dryer; D = range; E = lighting and miscellaneous appliances; J = refrigerator Only the loads required for this problem have been mentioned \n", + " a) The 30 min maximum diversified demand on the distribution transformer = 18.456 kW\n", + " b) The 30 min maximum diversified demand on the distribution transformer = 2064.6 kW\n", + " c The total hourly diversified demands at:\n", + " i) 4.00 PM = 6.3276 kW\n", + " ii) 5.00 PM = 9.6384 kW\n", + " iii) 6.00 PM = 10.6356 kW\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array,arctan,radians,degrees,ceil\n", + "\n", + "T = 730; #Average monthly time in hrs\n", + "Pla = 22; #Peak Load for consumer A in kW\n", + "Plb = 39; #Peak load for consumer B in kW\n", + "MEC = array([0.025,0.02,0.015]); #Monthly Energy charges in cents/kWh according to the units consumed\n", + "Uc = array([1000,3000,3000]); #Units consumption according to the Energy charges\n", + "MDC = 2; #Monthly demand charge in dollars/kW\n", + "\n", + "Pa = 7000.; #Units served to Consumer A in kWh\n", + "Pb = 7000.; #Units served to Consumer B in kWh\n", + "\n", + "#Power factors\n", + "Pfa = 0.9; # Lag\n", + "Pfb = 0.76; #Lag\n", + "\n", + "#Monthly Load factors\n", + "Flda = Pa/(Pla*T);\n", + "Fldb = Pb/(Plb*T);\n", + "\n", + "#Continous kilovoltamperes for each distribution transformer\n", + "Sa = Pla/Pfa;\n", + "Sb = Plb/Pfb;\n", + "\n", + "#Ratings of the distribution transformers needed\n", + "Ta = round(Sa/5)*5;\n", + "Tb = round(Sb/5)*5;\n", + "\n", + "#Billing Charges\n", + "#For Consumer A\n", + "Mbda = Pla*(0.85/Pfa); # Monthly billing demand\n", + "Mdca = Mbda*MDC; #Monthly demand charge\n", + "#Since the units served are 7000 it can be split according to the rates as 1000, 3000, 3000 excess units.\n", + "Uca = Uc; #Units consumption by A\n", + "Meca = MEC*Uca.T; #Monthly energy charge\n", + "Tmba = Meca+Mdca; #Total monthly bill\n", + "\n", + "#For Consumer B\n", + "Mbdb = Plb*(0.85/Pfb); # Monthly billing demand\n", + "Mdcb = Mbdb*MDC; #Monthly demand charge\n", + "#Since the units served are 7000 it can be split according to the rates as 1000, 3000, 3000 excess units.\n", + "Ucb = Uc; #Units consumption by B\n", + "Mecb = MEC*Ucb.T; #Monthly energy charge\n", + "Tmbb = Mecb+Mdcb; #Total monthly bill\n", + "\n", + "#To find the capacitor size\n", + "Q1 = Pb*math.radians(arctan(math.acos(Pfb))); #For original power factor\n", + "Q2 = Pb*math.radians(arctan(math.acos(0.85))); #For new power factor\n", + "\n", + "dQ = (Q1-Q2)/T; #Capacitor size\n", + "\n", + "#For new power factor\n", + "#For Consumer B\n", + "Mbdbn = Plb*(1); # Monthly billing demand\n", + "Mdcbn = Mbdbn*MDC; #Monthly demand charge\n", + "#Since the units served are 7000 it can be split according to the rates as 1000, 3000, 3000 excess units.\n", + "Ucbn = Uc; #Units consumption by B\n", + "Mecbn = MEC*Ucbn.T; #Monthly energy charge\n", + "Tmbbn = Mecbn+Mdcbn; #Total monthly bill\n", + "\n", + "Saving = abs(Tmbbn-Tmbb); #Saving due to capacitor installation\n", + "Ci = 30; # Cost of capacitor in dollar per kVAr\n", + "Cc = Ci*dQ; #The math.cost of the installed capacitor\n", + "PP = Cc/Saving; #Payback Period\n", + "PPr = 90/Saving; #Realistic Payback period\n", + "\n", + "print 'a Monthly load factor for :'\n", + "print ' i) Consumer A = %g'%(Flda)\n", + "print ' ii) Consumer B = %g'%(Fldb)\n", + "print ' b Rating of the each of the distribution transformer:'\n", + "print ' i) A = %g kVA'%(Ta)\n", + "print ' ii) B = %g kVA'%(Tb)\n", + "print ' c Monthly bil for:'\n", + "print ' i) Consumer A = $%g'%(sum(Tmba)) \n", + "print ' ii) Consumer B = $%g'%(sum(Tmbb))\n", + "print ' d) The capacitor size required is %g kVAr'%(dQ)\n", + "print ' e Payback period:'\n", + "print ' i) Calculated : %g months'%(sum(ceil(PP)))\n", + "print ' ii) Realistic as capacitor size available is 3 kVAr : %g months'%(sum(ceil(PPr)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a Monthly load factor for :\n", + " i) Consumer A = 0.435866\n", + " ii) Consumer B = 0.245873\n", + " b Rating of the each of the distribution transformer:\n", + " i) A = 25 kVA\n", + " ii) B = 50 kVA\n", + " c Monthly bil for:\n", + " i) Consumer A = $254.667\n", + " ii) Consumer B = $391.711\n", + " d) The capacitor size required is 0.018276 kVAr\n", + " e Payback period:\n", + " i) Calculated : 3 months\n", + " ii) Realistic as capacitor size available is 3 kVAr : 30 months\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "Kh = 7.2; #Meter consmath.tant\n", + "Kr1 = 32; #Revolutions of the disk in the first reading\n", + "Kr2 = 27; #Revolutions of the disk in the second reading\n", + "T1 = 59; #Time interval for revolutions of disks for the first reading\n", + "T2 = 40; #Time interval for revolutions of disks for the second reading\n", + "\n", + "# Calculations\n", + "# Self contained watthour meter; D = (3.6*Kr*Kh)/T\n", + "\n", + "def Id1(a,b):\n", + " return ((3.6*Kh*a)/b) #Function to calculate the instaneous demand\n", + "\n", + "D1 = Id1(Kr1,T1);\n", + "D2 = Id1(Kr2,T2);\n", + "Dav = (D1+D2)/2;\n", + "\n", + "# Results\n", + "print 'The instantenous demands are %g kW and %g kW for reading 1 and 2 and the average demand is %g kW'%(D1,D2,Dav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The instantenous demands are 14.0583 kW and 17.496 kW for reading 1 and 2 and the average demand is 15.7772 kW\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#For a transformer type watthour meter; D = (3.6*Kr*Kh*CTR*PTR)/T\n", + "CTR = 200.;\n", + "PTR = 1.;\n", + "Kh = 1.8;\n", + "Kr1 = 32.; #Revolutions of the disk in the first reading\n", + "Kr2 = 27.; #Revolutions of the disk in the second reading\n", + "T1 = 59.; #Time interval for revolutions of disks for the first reading\n", + "T2 = 40.; #Time interval for revolutions of disks for the second reading\n", + "\n", + "# Calculations\n", + "def Id1(a,b):\n", + " return ((3.6*Kh*a*CTR*PTR)/b) #Function to calculate the instaneous demand\n", + "\n", + "D1 = Id1(Kr1,T1);\n", + "D2 = Id1(Kr2,T2);\n", + "Dav = (D1+D2)/2;\n", + "\n", + "# Results\n", + "print 'The instantenous demands are %g kW and %g kW for reading 1 and 2 and the average demand is %g kW'%(D1,D2,Dav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The instantenous demands are 702.915 kW and 874.8 kW for reading 1 and 2 and the average demand is 788.858 kW\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Kh = 1.2;\n", + "CTR = 80.;\n", + "PTR = 20.;\n", + "#Revolutions of the disk in a watthour meter for 1 and 2 readings respectively\n", + "Kr1 = 20.;\n", + "Kr2 = 30.;\n", + "#Revolutions of the disk in a VArhour meter for 1 and 2 readings respectively\n", + "Kr3 = 10.;\n", + "Kr4 = 20.\n", + "#Time interval for revoltion of disks in watthour meter for 1 and 2 readings respectively\n", + "T1 = 50.;\n", + "T2 = 60.;\n", + "#Time interval for revoltion of disks in VArhour meter for 1 and 2 readings respectively\n", + "T3 = 50.;\n", + "T4 = 60.;\n", + "\n", + "def Id1(a,b):\n", + " return ((3.6*Kh*a*CTR*PTR)/b) #Function to calculate the instaneous demand\n", + "\n", + "#instanmath.taneous kilowatt demands for readings 1 and 2\n", + "D1 = Id1(Kr1,T1);\n", + "D2 = Id1(Kr2,T2);\n", + "\n", + "#instanmath.taneous kilovar deamnds for readings 1 and 2\n", + "D3 = Id1(Kr3,T3);\n", + "D4 = Id1(Kr4,T4);\n", + "\n", + "Davp = (D1+D2)/2; #Average kilowatt demand\n", + "Davq = (D3+D4)/2; #Average kilovar demand\n", + "\n", + "Dav = math.sqrt((Davp**2)+(Davq**2)); #Average kilovoltampere demand\n", + "\n", + "# Results\n", + "print 'a) The instanmath.taneous kilowatt hour demands for readings 1 and 2 are %g kW and %g kW respectively'%(D1,D2)\n", + "print ' b) The average kilowatt demand is %g kW'%(Davp)\n", + "print ' c) The instanmath.taneous kilovar hour demands for readings 1 and 2 are %g kVAr and %g kVAr respectively'%(D3,D4)\n", + "print ' d) The average kilovar demand is %g kVAr'%(Davq)\n", + "print ' e) The average kilovoltampere demand is %g kVA'%(Dav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The instanmath.taneous kilowatt hour demands for readings 1 and 2 are 2764.8 kW and 3456 kW respectively\n", + " b) The average kilowatt demand is 3110.4 kW\n", + " c) The instanmath.taneous kilovar hour demands for readings 1 and 2 are 1382.4 kVAr and 2304 kVAr respectively\n", + " d) The average kilovar demand is 1843.2 kVAr\n", + " e) The average kilovoltampere demand is 3615.52 kVA\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch3.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch3.ipynb new file mode 100755 index 00000000..fb811a30 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch3.ipynb @@ -0,0 +1,898 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e3360cc86683c7a5706db81b033b8664f6c6abe93730acff7b5ab6cc3ddee4ce" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Application of Distribution Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "S = 25.*(10**3); #Rating of the transformer in VA\n", + "#Values in per unit\n", + "Rt = 0.014; #Resismath.tance of Transformer\n", + "Xt = 0.012; #Reacmath.tance of transformer\n", + "Vh = 7200; #High Voltage End in V\n", + "Vx = 120; # Low Voltage End in V\n", + "Rb = (Vh**2)/S; #Base Value of Resismath.tance\n", + "#Accroding to Lloyd's Formula\n", + "\n", + "# Calculations\n", + "Zhx12 = (1.5*Rt)+(1j*1.2*Xt); #Impedance referred to HV side when the winding x2x3 is shorted\n", + "\n", + "n = Vh/Vx; #Turns Ratio\n", + "\n", + "Zhx13 = Rt+(1j*Xt); #Use of Entire low voltage winding\n", + "\n", + "#Impedances of the required terms in pu\n", + "A = (2*Zhx13)-Zhx12;\n", + "B = ((2*Zhx12)-(2*Zhx13))/(n**2);\n", + "C = B;\n", + "\n", + "#Angle of Impedances\n", + "ta = math.degrees(math.atan(A.imag/A.real));\n", + "tb = math.degrees(math.atan(B.imag/B.real));\n", + "\n", + "# Results\n", + "print 'The Circuit impedances on the high voltage side is %g/_%g ohm'%(abs(A*Rb),ta)\n", + "print 'Each of the Circuit impedances on the low voltage side is %g/_%g ohm'%(abs(B*Rb),tb)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Circuit impedances on the high voltage side is 24.6366/_53.9017 ohm\n", + "Each of the Circuit impedances on the low voltage side is 0.0085248/_18.9246 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "#Impedances from the previous example\n", + "Zh = 24.6437*exp(1j*53.9*math.pi/180);\n", + "Zl = 8.525*(10**-3)*exp(1j*18.9*math.pi/180);\n", + "#Voltages\n", + "Vh = 7200.; #High End\n", + "Vx = 120.; # Low End\n", + "S = 25.*1000; #Transformer Rating in VA\n", + "N = Vh/Vx; #Turns Ratio\n", + "\n", + "# Calculations\n", + "#R of service drop is zero #Line to Neutral Currents\n", + "IfLVn = Vx/(Zl+((1/(N**2))*Zh)); #Secondary Fault Current\n", + "IfHVn = IfLVn/N; #Primary Fault Current\n", + "\n", + "#R of service drop is zero #Line to Line Currents\n", + "Nl = Vh/(2*Vx); #New Truns Ratio\n", + "IfLVl = 2*Vx/((2*Zl)+((1/(Nl**2))*Zh)); #Secondary Fault Current\n", + "IfHVl = IfLVl/Nl; #Primary Fault Current\n", + "\n", + "# Results\n", + "print 'a) The Magnitude of Line to Neutral Fault Currentson HV and LV when R of service drop\\\n", + " is zero are %g A and %g A respectively'%(abs(IfHVn),abs(IfLVn))\n", + "print 'b) The Magnitude of Line to Line Fault Currentson HV and LV when R of service drop is zero are\\\n", + " %g A and %g A respectively'%(abs(IfHVl),abs(IfLVl))\n", + "print 'c) The Minimum Allowable interrupting capacity for circuit breaker isconnected to the LV is %g A'%(abs(IfLVn))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Magnitude of Line to Neutral Fault Currentson HV and LV when R of service drop is zero are 136.353 A and 8181.2 A respectively\n", + "b) The Magnitude of Line to Line Fault Currentson HV and LV when R of service drop is zero are 188.283 A and 5648.5 A respectively\n", + "c) The Minimum Allowable interrupting capacity for circuit breaker isconnected to the LV is 8181.2 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import solve,Symbol\n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "Vx = 120.; #Low End Voltage\n", + "#When Service drop is Zero\n", + "IfLVn = 8181.7*exp(-1*1j*34.3*math.pi/180); #Line to Neutral Vault Current\n", + "IfLVl = 5649*exp(-1*1j*40.6*math.pi/180); #Line to Line Fault Current\n", + "\n", + "Ral4 = 2.58; # #4 AWG Aluminium Conductor Resismath.tance per mile\n", + "Ralinf = 1.03; # #1/0 AWG Aluminium Conductor Resismath.tance per mile\n", + "\n", + "# Calculations\n", + "#Impedances when Service drop is zero, suffix l denotes line to line\n", + "#Suffix n denotes line to neutral\n", + "Zl0 = (2*Vx)/IfLVl;\n", + "Zn0 = (Vx)/IfLVn;\n", + "\n", + "#When there is R service drop\n", + "#Magnitudes of Line to Line and Line to Earth fault currents are equal\n", + "\n", + "R = Symbol('R'); #Variable Value\n", + "#Effective Impedances\n", + "Zl = Zl0+(2*R);\n", + "Zn = Zn0+(2*R);\n", + "#Fault Currents\n", + "Ifl = 2*Vx/Zl;\n", + "Ifn = Vx/Zn;\n", + "#print Ifl[1]\n", + "#Magnitudes of Currents\n", + "MIfl = abs(240.)/abs(Ifl.subs(R,3));\n", + "MIfn = abs(Ifn.subs(R,2))/abs(Ifn.subs(R,3));\n", + "DI = MIfl-MIfn;\n", + "X = - 1.5781966 + 240*R #DI.subs(R,2); #Polynomial Equation to find 'R'\n", + "R = solve(X)[0]; #Numerical Value\n", + "\n", + "#The Magnitude of R found is Wrong in the Textbook\n", + "\n", + "#Length of service drop cable\n", + "SDL4 = R/Ral4;\n", + "SDLinf = R/Ralinf;\n", + "\n", + "# Results\n", + "print 'a) The Value of Service drop in the Cable is %g ohm'%(R)\n", + "print 'b The Length of service drop cable for:'\n", + "print 'i) #4 AWG Conductor is %g miles'%(SDL4) \n", + "print 'ii) #1/0 AWG Conductor is %g miles'%(SDLinf) \n", + "\n", + "#Length is printed in Miles\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Value of Service drop in the Cable is 0.00657582 ohm\n", + "b The Length of service drop cable for:\n", + "i) #4 AWG Conductor is 0.00254877 miles\n", + "ii) #1/0 AWG Conductor is 0.00638429 miles\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#Transformer Ratings in kVA\n", + "Sr1 = 250.; \n", + "Sr2 = 500.;\n", + "\n", + "#percentage impedances\n", + "Zr1 = 2.4;\n", + "Zr2 = 3.1;\n", + "\n", + "# Calculations\n", + "#Ratio of Maximum Loads\n", + "R = Sr1*Zr2/(Sr2*Zr1);\n", + "\n", + "#If 500 kVA is chosen as the full load transformer, Transformer 1 becomes overloaded\n", + "SL1 = Sr1; #To Avoid OverLoading of transformer 1\n", + "\n", + "SL2 = SL1/R; #Maximum Load on transformer 2\n", + "\n", + "Tl = SL1+SL2; #Total Load without overloading\n", + "\n", + "# Results\n", + "print 'The Maximum Load Carried without overloading any of the transformer is %g kVA'%(Tl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Maximum Load Carried without overloading any of the transformer is 637.097 kVA\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Considering Van as reference voltage\n", + "SL3phi = 200*(10**3); #Load to be powered\n", + "pf3 = 0.8; #Power Factor of three phase load\n", + "t3 = math.acos(pf3); #Power FActor Angle for three phase load\n", + "pf1 = 0.9; #Power Factor of math.single phase load\n", + "t1 = math.acos(pf1); #Power Factor angle of math.single phase load\n", + "SL1 = 80.*(10**3); #Single Phase Light Load\n", + "Vll = 240.; #Secondary Voltage\n", + "#Rating of Single Phase Transformers between individual lines\n", + "Sbc = 100.*(10**3);\n", + "Sab = 75.*(10**3);\n", + "Sca = Sab;\n", + "#Angles of Three phase voltages \n", + "ta = 0.;\n", + "tb = -120.;\n", + "tc = 120.;\n", + "#Angles of three line currents\n", + "tai = ta-t3;\n", + "tbi = tb-t3;\n", + "tci = tc-t3;\n", + "\n", + "# Calculations\n", + "I = SL3phi/(math.sqrt(3)*Vll); #Magnitude of Current\n", + "#3 Phase Line Currents\n", + "Ia3 = I*exp(1j*math.pi*tai/180);\n", + "Ib3 = I*exp(1j*math.pi*tbi/180);\n", + "Ic3 = I*exp(1j*math.pi*tci/180);\n", + "\n", + "MIbc = SL1/Vll; #Magnitude Single Phase Current\n", + "\n", + "tbc = -90; #Lagging Van #Angle of Vbc\n", + "tbci = tbc-t1; #Angle of Current Ibc\n", + "Ibc = MIbc*exp(1j*math.pi*tbci/180);\n", + "\n", + "#Load Currents\n", + "Ia = Ia3;\n", + "Ta = math.degrees(math.atan(Ia.imag/Ia.real));\n", + "Ib = Ib3+Ibc;\n", + "Tb = math.degrees(math.atan(Ib.imag/Ib.real));\n", + "Ic = Ic3-Ibc; #Current is wrong in the textbook\n", + "Tc = math.degrees(math.atan(Ic.imag/Ic.real));\n", + "\n", + "#Current Flowing in the secondary winding of the transformers 1,2 and 3\n", + "Iac = ((Ic/Sbc)-(Ia/Sab))/((1/Sab)+(1/Sbc)+(1/Sca));\n", + "T1 = math.degrees(math.atan(Iac.imag/Iac.real)); #Angle of the above current\n", + "Iba = ((Ia/Sca)-(Ib/Sbc))/((1/Sab)+(1/Sbc)+(1/Sca));\n", + "T2 = math.degrees(math.atan(Iba.imag/Iba.real)); #Angle of the above current\n", + "Icb = ((Ib/Sab)-(Ic/Sca))/((1/Sab)+(1/Sbc)+(1/Sca));\n", + "T3 = math.degrees(math.atan(Icb.imag/Icb.real)); #Angle of the above current\n", + "\n", + "#Kilovoltampere Load on each transformer\n", + "SLab = Vll*abs(Iba)/1000;\n", + "SLbc = Vll*abs(Icb)/1000;\n", + "SLca = Vll*abs(Iac)/1000;\n", + "\n", + "Vlls = Vll; #Secondary Voltage\n", + "Vllp = 7620; #Primary Voltage\n", + "n = Vllp/Vlls; #Turns Ratio\n", + "\n", + "#Primary Currents of the transformer\n", + "IAC = Iac/n;\n", + "IBA = Iba/n;\n", + "ICB = Icb/n;\n", + "\n", + "#Primary Current in each each phase wire\n", + "IA = IAC-IBA;\n", + "TA = math.degrees(math.atan(IA.imag/IA.real)); #Angle of the above current\n", + "IB = IBA-ICB;\n", + "TB = math.degrees(math.atan(IB.imag/IB.real)); #Angle of the above current\n", + "IC = ICB-IAC;\n", + "TC = math.degrees(math.atan(IC.imag/IC.real)); #Angle of the above current\n", + "\n", + "# Results\n", + "print 'a The Line Currents flowing in secondary phase wire :'\n", + "print 'A phase is %g/_%g A'%(abs(Ia),Ta)\n", + "print 'B phase is %g/_%g A'%(abs(Ib),Tb)\n", + "print 'C phase is %g/_%g A'%(abs(Ic),Tc)\n", + "print 'b The Current flowing in secondary winding of each transformer:'\n", + "print 'AC is %g/_%g A'%(abs(Iac),T1)\n", + "print 'AB is %g/_%g A'%(abs(Iba),T2)\n", + "print 'BC is %g/_%g A'%(abs(Icb),T3)\n", + "print 'c The Load on Each Transformer is:'\n", + "print '1 : %g kVA'%(SLca)\n", + "print '2 : %g kVA'%(SLab)\n", + "print '3 : %g kVA'%(SLbc)\n", + "print 'd The Current flowing in primary winding of each transformer:'\n", + "print 'AC is %g/_%g A'%(abs(IAC),T1)\n", + "print 'AB is %g/_%g A'%(abs(IBA),T2)\n", + "print 'BC is %g/_%g A'%(abs(ICB),T3)\n", + "print 'e The Line Currents flowing in primary phase wire :'\n", + "print 'A phase is %g/_%g A'%(abs(IA),TA)\n", + "print 'B phase is %g/_%g A'%(abs(IB),TB)\n", + "print 'C phase is %g/_%g A'%(abs(IC),TC)\n", + "\n", + "#Ic is calculation is wrong, the author has added Ibc instead of subtracting, so if you change - into + in line 45, you get the answer as in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Line Currents flowing in secondary phase wire :\n", + "A phase is 481.125/_-0.643501 A\n", + "B phase is 787.293/_71.6504 A\n", + "C phase is 787.977/_-72.7823 A\n", + "b The Current flowing in secondary winding of each transformer:\n", + "AC is 316/_-40.9814 A\n", + "AB is 315.535/_39.7662 A\n", + "BC is 545.454/_89.442 A\n", + "c The Load on Each Transformer is:\n", + "1 : 75.84 kVA\n", + "2 : 75.7283 kVA\n", + "3 : 130.909 kVA\n", + "d The Current flowing in primary winding of each transformer:\n", + "AC is 9.95276/_-40.9814 A\n", + "AB is 9.9381/_39.7662 A\n", + "BC is 17.1796/_89.442 A\n", + "e The Line Currents flowing in primary phase wire :\n", + "A phase is 15.1536/_-0.643501 A\n", + "B phase is 24.7966/_71.6504 A\n", + "C phase is 24.8182/_-72.7823 A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Considering Van as reference voltage\n", + "SL3phi = 100.*(10**3); #Load to be powered\n", + "pf3 = 0.8; #Power Factor of three phase load\n", + "t3 = math.acos(pf3); #Power FActor Angle for three phase load\n", + "pf1 = 0.9; #Power Factor of math.single phase load\n", + "t1 = math.acos(pf1); #Power Factor angle of math.single phase load\n", + "SL1 = 50.*(10**3); #Single Phase Light Load\n", + "Vll = 240.; #Secondary Voltage\n", + "#Angles of Three phase voltages \n", + "ta = 0.;\n", + "tb = -120.;\n", + "tc = 120.;\n", + "#Angles of three line currents\n", + "tai = ta-t3;\n", + "tbi = tb-t3;\n", + "tci = tc-t3;\n", + "\n", + "# Calculations\n", + "I = SL3phi/(math.sqrt(3)*Vll); #Magnitude of Current\n", + "#3 Phase Line Currents\n", + "Ia3 = I*exp(1j*math.pi*tai/180);\n", + "Ib3 = I*exp(1j*math.pi*tbi/180);\n", + "Ic3 = I*exp(1j*math.pi*tci/180);\n", + "\n", + "MI1 = SL1/Vll; #Magnitude Single Phase Current\n", + "\n", + "t1v = 30; #Leading Van #Angle of Vbc\n", + "t1i = t1v-t1; #Angle of Current Ibc\n", + "I1 = MI1*exp(1j*math.pi*t1i/180);\n", + "\n", + "#Load Currents\n", + "Ia = Ia3+I1;\n", + "Ta = math.degrees(math.atan(Ia.imag/Ia.real));\n", + "Ib = Ib3-I1;\n", + "Tb = -180+(math.degrees(math.atan(Ib.imag/Ib.real)));\n", + "Ic = Ic3; #Current is wrong in the textbook\n", + "Tc = math.degrees(math.atan(Ic.imag/Ic.real));\n", + "\n", + "#Current flowing in the secondary of the transformer\n", + "Iba = Ia;\n", + "T2 = math.degrees(math.atan(Iba.imag/Iba.real)); #Angle of the above current\n", + "Icb = Ic;\n", + "T3 = 180+(math.degrees(math.atan(Icb.imag/Icb.real))); #Angle of the above current\n", + "\n", + "#Load on Each Transformer\n", + "SLba = Vll*abs(Iba)/1000;\n", + "SLcb = Vll*abs(Icb)/1000;\n", + "\n", + "Vlls = Vll; #Secondary Voltage\n", + "Vllp = 7620; #Primary Voltage\n", + "n = Vllp/Vlls; #Turns Ratio\n", + "\n", + "#Primary Currents of the transformer\n", + "IA = Iba/n;\n", + "TA = math.degrees(math.atan(IA.imag/IA.real)); #Angle of the above current\n", + "IB = Icb/n;\n", + "TB = T3; #Angle of the above current\n", + "IN = IA+IB; #Neutral Current\n", + "TN = math.degrees(math.atan(IN.imag/IN.real)); #Angle of the above current\n", + "\n", + "# Results\n", + "print 'a The Line Currents flowing in secondary phase wire :'\n", + "print 'A phase is %g/_%g A'%(abs(Ia),Ta)\n", + "print 'B phase is %g/_%g A'%(abs(Ib),Tb)\n", + "print 'C phase is %g/_%g A'%(abs(Ic),Tc)\n", + "print 'b The Current flowing in secondary winding of each transformer:'\n", + "print 'AB is %g/_%g A'%(abs(Iba),T2)\n", + "print 'BC is %g/_%g A'%(abs(Icb),T3)\n", + "print 'c The Load on Each Transformer is:'\n", + "print '1 : %g kVA'%(SLba)\n", + "print '2 : %g kVA'%(SLcb)\n", + "print 'd The Line Currents flowing in primary phase wire :'\n", + "print 'AB is %g/_%g A'%(abs(IA),TA)\n", + "print 'CB is %g/_%g A'%(abs(IB),TB)\n", + "print 'The Neutral Current is %g/_%g'%(abs(IN),TN)\n", + "\n", + "#Note the mistake in the Textbook for the calulation for Neutral Current\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Line Currents flowing in secondary phase wire :\n", + "A phase is 433.486/_13.3432 A\n", + "B phase is 433.874/_-134.453 A\n", + "C phase is 240.563/_-60.6435 A\n", + "b The Current flowing in secondary winding of each transformer:\n", + "AB is 433.486/_13.3432 A\n", + "BC is 240.563/_119.356 A\n", + "c The Load on Each Transformer is:\n", + "1 : 104.037 kVA\n", + "2 : 57.735 kVA\n", + "d The Line Currents flowing in primary phase wire :\n", + "AB is 13.6531/_13.3432 A\n", + "CB is 7.57678/_119.356 A\n", + "The Neutral Current is 13.6653/_45.5475\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "Vll = 480.; #Line to Line Voltage\n", + "Vln = 277.; #Line to neutral Voltage\n", + "\n", + "# Calculations\n", + "#From the Phasor Diagram from the result file\n", + "Vab = Vll*exp(1j*0); #Vab is taken as reference\n", + "Vabh = 50*Vab/100;\n", + "VAB = 4160.;\n", + "VABh = 50*VAB/100; \n", + "VH1H2o = math.sqrt((VAB**2)-(VABh**2));\n", + "VH1H2t = (VABh);\n", + "Vx1x2o = 1*math.sqrt((Vab**2)-(Vabh**2))/3;\n", + "Vx2x3o = 2*math.sqrt((Vab**2)-(Vabh**2))/3;\n", + "VH2H3t = (VABh);\n", + "Vx1x2t = Vabh;\n", + "Vx2x3t = Vabh;\n", + "\n", + "# Results\n", + "print 'a The Phasor diagram is shown in the result file attached to the code'\n", + "print 'b) Vab is %g/_%g V'%(abs(Vab),Vab.imag/Vab.real)\n", + "print 'c The Magnitudes of the following rated winding voltages'\n", + "print 'i) The Voltage VH1H2 on transformer 1 : %g V'%(VH1H2o)\n", + "print 'ii) The Voltage Vx1x2 on transformer 1 : %g V'%(Vx1x2o)\n", + "print 'iii) The Voltage Vx2x3 on transformer 1 : %g V'%(Vx2x3o)\n", + "print 'iv) The Voltage VH1H2 on transformer 2 : %g V'%(VH1H2t)\n", + "print 'v) The Voltage VH2H3 on transformer 2 : %g V'%(VH2H3t)\n", + "print 'vi) The Voltage Vx1x2 on transformer 2 : %g V'%(Vx1x2t)\n", + "print 'vii) The Voltage Vx1x2 on transformer 2 : %g V'%(Vx2x3t)\n", + "print 'd i NO ii NO iii YES'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Phasor diagram is shown in the result file attached to the code\n", + "b) Vab is 480/_0 V\n", + "c The Magnitudes of the following rated winding voltages\n", + "i) The Voltage VH1H2 on transformer 1 : 3602.67 V\n", + "ii) The Voltage Vx1x2 on transformer 1 : 138.564 V\n", + "iii) The Voltage Vx2x3 on transformer 1 : 277.128 V\n", + "iv) The Voltage VH1H2 on transformer 2 : 2080 V\n", + "v) The Voltage VH2H3 on transformer 2 : 2080 V\n", + "vi) The Voltage Vx1x2 on transformer 2 : 240 V\n", + "vii) The Voltage Vx1x2 on transformer 2 : 240 V\n", + "d i NO ii NO iii YES\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:16: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:17: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:31: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:32: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "R = 2.77; #Resismath.tance of the balanced load\n", + "#From Phasor Diagram in Result file\n", + "Vab = 480*exp(1j*0); #Reference Voltage\n", + "MVn = abs(Vab)/math.sqrt(3); #Magnitude of line to neutral voltages\n", + "#Angles of Three phase voltages \n", + "ta = -30.;\n", + "tb = -150.;\n", + "tc = 90.;\n", + "\n", + "# Calculations\n", + "#Angles of Winding according to the Line Currents\n", + "tx3x2 = 30; #Leading\n", + "tx1x2 = -30; #Lagging\n", + "\n", + "I = MVn/R; #Magnitude of current\n", + "\n", + "#Low Voltage Current Phasors\n", + "Ia = I*exp(1j*math.pi*ta/180);\n", + "Ib = I*exp(1j*math.pi*tb/180);\n", + "Ic = I*exp(1j*math.pi*tc/180);\n", + "pfT = math.cos(math.radians(ta-ta)); #Angle of Ia is same as phase voltage #Resismath.tance load\n", + "\n", + "# Results\n", + "print 'a The Low voltage current phasors are:'\n", + "print 'A is %g/_%g A'%(abs(Ia),ta)\n", + "print 'B is %g/_%g A'%(abs(Ib),tb)\n", + "print 'C is %g/_%g A'%(abs(Ic),tc)\n", + "print 'b The Phasor Diagram is the ''b'' diagram of in the result file'\n", + "print 'c) The Power Factor of the Transformer is %g'%(pfT)\n", + "print 'd) Power Factor as seen by winding x3x2 of transformer 2 is %g leading'%(math.cos(math.radians(tx3x2)))\n", + "print 'e) Power Factor as seen by winding x1x2 of transformer 2 is %g lagging'%(math.cos(math.radians(tx1x2)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Low voltage current phasors are:\n", + "A is 100.046/_-30 A\n", + "B is 100.046/_-150 A\n", + "C is 100.046/_90 A\n", + "b The Phasor Diagram is the b diagram of in the result file\n", + "c) The Power Factor of the Transformer is 1\n", + "d) Power Factor as seen by winding x3x2 of transformer 2 is 0.866025 leading\n", + "e) Power Factor as seen by winding x1x2 of transformer 2 is 0.866025 lagging\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "#'o' and 't' represent transformer one and two respectively\n", + "# Variables\n", + "#Objective is to find the Factor which has to be multiplied to get VA rating\n", + "Vll = 1.; #Assumption Made\n", + "#From the Phasor Diagram from the result file\n", + "Vab = Vll*exp(1j*0); #Vab is taken as reference\n", + "Vabh = 50.*Vab/100;\n", + "Vx1x2o = 1*math.sqrt((Vab**2)-(Vabh**2))/3;\n", + "Vx2x3o = 2*math.sqrt((Vab**2)-(Vabh**2))/3;\n", + "Vx1x2t = Vabh;\n", + "Vx2x3t = Vabh;\n", + "\n", + "#Let I be unity\n", + "I = 1;\n", + "\n", + "# Calculations\n", + "#VA Ratings of the respective windings\n", + "Sx1x2o = Vx1x2o*I;\n", + "Sx2x3o = Vx2x3o*I;\n", + "Sx1x2t = Vx1x2t*I;\n", + "Sx2x3t = Vx2x3t*I;\n", + "\n", + "#Total VA rating of transformer\n", + "S1 = Sx1x2o+Sx2x3o;\n", + "S2 = Sx1x2t+Sx2x3t;\n", + "\n", + "#Ratio of total rating to maximum rating\n", + "Rt = (S1+S2)/(math.sqrt(3)*Vll*I);\n", + "\n", + "# Results\n", + "print 'a) The voltampere raing of x1x2 of transformer 1 is %g*VI VA'%(Sx1x2o)\n", + "print 'b) The voltampere raing of x1x2 of transformer 1 is %g*VI VA'%(Sx2x3o)\n", + "print 'c) The Total Output from transformer 1 is %g*VI VA'%(S1)\n", + "print 'd) The voltampere raing of x1x2 of transformer 2 is %g*VI VA'%(Sx1x2t)\n", + "print 'e) The voltampere raing of x1x2 of transformer 2 is %g*VI VA'%(Sx2x3t)\n", + "print 'f) The Total Output from transformer 2 is %g*VI VA'%(S2)\n", + "print 'g) The Total Rating to the Maximum Continous Output is %g'%(Rt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The voltampere raing of x1x2 of transformer 1 is 0.288675*VI VA\n", + "b) The voltampere raing of x1x2 of transformer 1 is 0.57735*VI VA\n", + "c) The Total Output from transformer 1 is 0.866025*VI VA\n", + "d) The voltampere raing of x1x2 of transformer 2 is 0.5*VI VA\n", + "e) The voltampere raing of x1x2 of transformer 2 is 0.5*VI VA\n", + "f) The Total Output from transformer 2 is 1*VI VA\n", + "g) The Total Rating to the Maximum Continous Output is 1.07735\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:11: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:12: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:37: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:38: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:39: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:40: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "#Per unit value\n", + "Zt = 0.01+(1j*0.03); #Transformer impedance\n", + "\n", + "Vll = 240.; #Secondary Voltage\n", + "\n", + "Sl = 90.; #Lighting Load\n", + "pfl = 0.9;\n", + "tl = math.acos(pfl);\n", + "S = 25.; #Balanced Load\n", + "pf = 0.8;\n", + "t = math.acos(pf);\n", + "\n", + "\n", + "# Calculations\n", + "def angle(y): \n", + " return math.degrees(math.atan(y.imag/y.real))\n", + "\n", + "tab = 30; #Phase angle of Vab\n", + "\n", + "Il = Sl*1000/Vll; #Magnitude of Light Load\n", + "#Umath.sing the symmetrical - components theory\n", + "Ia1 = Il*exp(1j*math.pi*(tab-tl)/180);\n", + "Ta1 = angle(Ia1); #Angle for the above current\n", + "Ib1 = -1*Ia1;\n", + "Ic1 = 0; #Neutral Wire\n", + "#Angles of three line to line voltages\n", + "ta = 0;\n", + "tb = -120;\n", + "tc = 120;\n", + "\n", + "Ib = S*1000/(math.sqrt(3)*Vll); #Magnitude of balanced load\n", + "\n", + "#Currents in Three phase load\n", + "Ta2 = ta-t;\n", + "Ia2 = Ib*exp(1j*math.pi*Ta2/180);\n", + "Tb2 = tb-t;\n", + "Ib2 = Ib*exp(1j*math.pi*Tb2/180);\n", + "Tc2 = tc-t;\n", + "Ic2 = Ib*exp(1j*math.pi*Tc2/180);\n", + "\n", + "#Currents in phase wire\n", + "Ia = Ia1+Ia2;\n", + "Ta = angle(Ia); #Angle corresponding to the above angle\n", + "Ib = Ib1+Ib2;\n", + "Tb = angle(Ib); #Angle corresponding to the above angle\n", + "Ic = Ic1+Ic2;\n", + "Tc = angle(Ic); #Angle corresponding to the above angle\n", + "\n", + "#Transformer Loads\n", + "ST1 = Vll*abs(Ia)/1000;\n", + "T1 = 100; #From the above value of Load, this transformer is chosen to meet the specific characteristic\n", + "ST1pu = ST1/T1; #Per unit Load\n", + "ST2 = Vll*abs(Ic)/1000;\n", + "T2 = 15; #From the above value of Load, this transformer is chosen to meet the specific characteristic\n", + "ST2pu = ST2/T2; #Per unit Load\n", + "\n", + "#Transformer Power Factors\n", + "pfT1 = math.cos(math.radians(tab-Ta));\n", + "pfT2 = math.cos(math.radians(90-Tc)); #Vcb makes angle of 90\n", + "\n", + "Vh = 7200; #High End Voltage\n", + "n = Vh/Vll; #Turns Ratio\n", + "\n", + "# The Primary Line Currents\n", + "IA = Ia/n;\n", + "IB = -1*Ic/n;\n", + "IN = -1*(IA+IB);\n", + "\n", + "Ibase = T1*1000/Vll; #Base Current\n", + "Iapu = Ia/Ibase;\n", + "Icpu = Ic/Ibase;\n", + "\n", + "#Phase Voltages\n", + "Vab = Vll*exp(1j*math.pi*tab/180); \n", + "Vbc = Vll*exp(-1*1j*math.pi*90/180);\n", + "#Per Unit Voltages\n", + "VANpu = (Vab/Vll)+(Iapu*Zt);\n", + "VBNpu = (Vbc/Vll)-(Icpu*Zt);\n", + "\n", + "#Actual Voltages\n", + "VAN = VANpu*Vh;\n", + "VBN = VBNpu*Vh;\n", + "\n", + "# Results\n", + "print 'a The Phasor Currents:'\n", + "print 'Ia is %g/_%g A'%(abs(Ia),Ta)\n", + "print 'Ib is %g/_%g A'%(abs(Ib),180+Tb)\n", + "print 'Ic is %g/_%g A'%(abs(Ic),Tc)\n", + "print 'b) Suitable ratings of the transformers are %g kVA and %g kVA'%(T1,T2)\n", + "print 'c) The Per Unit kVA load on each transformer is %g pu and %g pu'%(ST1pu,ST2pu)\n", + "print 'd) The power factor of output of each transformer is %g and %g both lagging'%(pfT1,pfT2)\n", + "print 'e The phasor currents at the high voltage leads:'\n", + "print 'IA is %g/_%g A'%(abs(IA),Ta)\n", + "print 'IB is %g/_%g A'%(abs(IB),180+angle(IB))\n", + "print 'IN is %g/_%g A'%(abs(IN),angle(IN))\n", + "print 'f) VAN is %g/_%g V and VBN is %g/_%g V'%(abs(VAN),angle(VAN),abs(VBN),angle(VBN))\n", + "\n", + "#Highly Accuracy of Answers; Upto 5 decimal Places\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Phasor Currents:\n", + "Ia is 428.052/_25.4972 A\n", + "Ib is 428.229/_213.552 A\n", + "Ic is 60.1407/_-60.6435 A\n", + "b) Suitable ratings of the transformers are 100 kVA and 15 kVA\n", + "c) The Per Unit kVA load on each transformer is 1.02732 pu and 0.96225 pu\n", + "d) The power factor of output of each transformer is 0.996914 and -0.871586 both lagging\n", + "e The phasor currents at the high voltage leads:\n", + "IA is 14.2684/_25.4972 A\n", + "IB is 2.00469/_119.356 A\n", + "IN is 14.5415/_17.5913 A\n", + "f) VAN is 7294.34/_31.6923 V and VBN is 7193.85/_-89.743 V\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch4.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch4.ipynb new file mode 100755 index 00000000..01f911b9 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch4.ipynb @@ -0,0 +1,565 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:245ef1b89a5bda9ee093c72396146e897e6533850c3acc1090aa40bb52c35f20" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Design of Subtransmission Lines and Distribution Substations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Conductor Pararmeters\n", + "r = 1.503;\n", + "xa = 0.609;\n", + "xd = 0.1366;\n", + "pf = 0.9;\n", + "Vb = 2400;\n", + "Vr = Vb;\n", + "x = xa+xd;\n", + "Kc = 0.01; #From the Curve\n", + "\n", + "# Calculations\n", + "K = ((r*pf)+(x+math.sin(math.radians(math.acos(pf)))))*(1000./3)*100/(Vr*Vb); # In Percent\n", + "\n", + "# Results\n", + "print 'a) The Value of Consmath.tant K is %g percent VDpu per kVA mile'%(K)\n", + "print 'b) From the precalculated per cent voltage drop Curve, It is found that the K is %g percent VDpu\\\n", + " per kVA mile which is same as the answer obtained in part a'%(Kc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Value of Consmath.tant K is 0.0121885 percent VDpu per kVA mile\n", + "b) From the precalculated per cent voltage drop Curve, It is found that the K is 0.01 percent VDpu per kVA mile which is same as the answer obtained in part a\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "K = 0.01; #Percentage Value\n", + "Sn = 500; #Load in kVA\n", + "pf = 0.9; #Lagging\n", + "s = 1; #Length of the feeder\n", + "\n", + "# Calculations\n", + "VD = s*K*Sn; #Voltage drop in percent\n", + "\n", + "# Results\n", + "print 'The Percent Voltage drop in the Main is %g percent'%(VD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Percent Voltage drop in the Main is 5 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "K = 0.01; #Percentage Value\n", + "Sn = 500; #Load in kVA\n", + "pf = 0.9; #Lagging\n", + "l = 1.; #Total Length of the feeder\n", + "\n", + "# Calculations\n", + "s = l/2; #effective Length of the feeder\n", + "VD = s*K*Sn; #Voltage drop in percent\n", + "\n", + "# Results\n", + "print 'The Percent Voltage drop in the Main is %g percent'%(VD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Percent Voltage drop in the Main is 2.5 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "K = 0.01; #Percentage Value\n", + "Sn = 500; #Load in kVA\n", + "pf = 0.9; #Lagging\n", + "l = 1.; #Total Length of the feeder\n", + "\n", + "# Calculations\n", + "s = l*2/3; #effective Length of the feeder\n", + "VD = s*K*Sn; #Voltage drop in percent\n", + "\n", + "# Results\n", + "print 'The Percent Voltage drop in the Main is %g percent'%(VD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Percent Voltage drop in the Main is 3.33333 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#Voltage Drops in Percentage\n", + "VDlumped = 5.; \n", + "VDuniform = 2.5;\n", + "VDincreasing = 3.333;\n", + "\n", + "# Calculations\n", + "#Ratio of the percent voltage drops\n", + "Rlu = VDlumped/VDuniform;\n", + "Rli = VDlumped/VDincreasing;\n", + "Riu = VDincreasing/VDuniform;\n", + "\n", + "# Results\n", + "print 'a) Percent VDlumped = %g Percent VDuniform'%(Rlu)\n", + "print 'b) Percent VDlumped = %g Percent VDincreasing'%(Rli)\n", + "print 'c) Percent VDincreasing = %g Percent VDuniform'%(Riu)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Percent VDlumped = 2 Percent VDuniform\n", + "b) Percent VDlumped = 1.50015 Percent VDincreasing\n", + "c) Percent VDincreasing = 1.3332 Percent VDuniform\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,multiply,divide\n", + "\n", + "# Variables\n", + "D = [500,500,2000,2000,10000,10000,2000,2000]; #Load Densities in kVA/sq.miles\n", + "TAn = [6,6,3,3,1,1,15,15]; #Substation Area in sq.miles\n", + "VD = [3,6,3,6,3,6,3,6]; #Maximum Total Primary Feeder Voltage drops in percentage\n", + "Vll = [4.16,4.16,4.16,4.16,4.16,4.16,13.2,13.2]; #Base Feeder Voltage in kV\n", + "\n", + "TSn = multiply(D,TAn); #Susbstation Load\n", + "#From the Graphs of feeders vs load desity in the textbook; The Number of feeders are found to be\n", + "\n", + "n = [4,2,5,3,5,4,6,5]; #No of feeders\n", + "\n", + "# Calculations\n", + "#Also from the graph, The characteristic or the feeder is determined\n", + "#1-5, 7 are VDL feeders\n", + "#6 and 8 are TL feeders\n", + "\n", + "Sn = divide(TSn,n); #Load Per Feeder\n", + "#To Determine the Load Current\n", + "Il = Sn/(math.sqrt(3)*array(Vll)); \n", + "\n", + "# Results\n", + "print 'a'\n", + "print 'The Substation Size is'\n", + "print (TSn)\n", + "print 'The Number of Feeders from the Curve is'\n", + "print (n)\n", + "print 'Also From the Curve%( 1,2,3,4,5,7 cases are VDL but 6 and 8 case are TL'\n", + "print 'a'\n", + "print 'The Load Current for 6th Case is %g A, which is less than the ampacities of the main but\\\n", + " more than that of the lateral, Hence it is thermally limited but not the main feeder'%(Il[5])\n", + "print 'The Load Current for 8th Case is %g A, which is less than the ampacities of the main but more than that\\\n", + " of the lateral, Hence it is thermally limited but not the main feeder'%(Il[7])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a\n", + "The Substation Size is\n", + "[ 3000 3000 6000 6000 10000 10000 30000 30000]" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "The Number of Feeders from the Curve is\n", + "[4, 2, 5, 3, 5, 4, 6, 5]\n", + "Also From the Curve%( 1,2,3,4,5,7 cases are VDL but 6 and 8 case are TL\n", + "a\n", + "The Load Current for 6th Case is 346.965 A, which is less than the ampacities of the main but more than that of the lateral, Hence it is thermally limited but not the main feeder\n", + "The Load Current for 8th Case is 262.432 A, which is less than the ampacities of the main but more than that of the lateral, Hence it is thermally limited but not the main feeder\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "D = 1000.; #Load Density in kVA per sq miles\n", + "Vll = 4.16; #Line to Lien voltage in kV\n", + "#From The Tables and Curves from the Theory\n", + "K = 0.007;\n", + "#For TL\n", + "TLImax = 230.; #Maximum Feeder Current\n", + "TLSn = math.sqrt(3)*Vll*TLImax; #Maximum Load Per Feeder\n", + "TLn = 4; #No of Feeders\n", + "TLTSn = TLn*TLSn; #Substation Load\n", + "TLl4 = math.sqrt(TLSn/D); #Feeder Length\n", + "TLS = 2*TLl4; #Total Spacing\n", + "\n", + "TLVDn = 2*K*D*(TLl4**3)/3; #TotalVoltageDrop in the main\n", + "\n", + "# Calculations\n", + "#For VDL\n", + "VDLVDn = 3; #Percent Voltage Drop\n", + "VDLl4 = pow((3*VDLVDn/(2*K*D)),1./3); #Feeder Length\n", + "VDLS = 2*VDLl4; #Station size\n", + "VDLSn = D*(VDLl4**2); #Maximum Load Per Feeder\n", + "VDLn = TLn; #Number Of Feeders\n", + "VDLTSn = VDLn*VDLSn; #Susbtation Load\n", + "VDLImax = VDLSn/(math.sqrt(3)*Vll); #Ampere Rating of the Main\n", + "R = VDLImax/TLImax; #Ampere Loading\n", + "\n", + "# Results\n", + "print 'a For Thermally Limited '\n", + "print 'i) The Substation Size = %g kVA'%(TLTSn)\n", + "print 'ii) Substation Spacing = %g miles'%(TLS)\n", + "print 'iii) Maximum Load Per Feeder = %g kVA'%(TLSn)\n", + "print 'iv) The Voltage Drop is %g percent'%(TLVDn)\n", + "\n", + "print 'b For Voltage Drop Limited '\n", + "print 'i) The Substation Size = %g kVA'%(VDLTSn)\n", + "print 'ii) Substation Spacing = %g miles'%(VDLS)\n", + "print 'iii) Maximum Load Per Feeder = %g kVA'%(VDLSn)\n", + "print 'iv) Ampere Loading of the Main is %g pu'%(R)\n", + "\n", + "#Note The Approximation to 750 kVA\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a For Thermally Limited \n", + "i) The Substation Size = 6628.9 kVA\n", + "ii) Substation Spacing = 2.57467 miles\n", + "iii) Maximum Load Per Feeder = 1657.23 kVA\n", + "iv) The Voltage Drop is 9.95588 percent\n", + "b For Voltage Drop Limited \n", + "i) The Substation Size = 2979.45 kVA\n", + "ii) Substation Spacing = 1.72611 miles\n", + "iii) Maximum Load Per Feeder = 744.863 kVA\n", + "iv) Ampere Loading of the Main is 0.449464 pu\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "DivF = 1.2; #Diversity Factor\n", + "DemF = 0.6; #Demand Factor\n", + "CL = 2000.; #Connected Load Density in kVA per sq.miles\n", + "\n", + "DD = DemF*CL/DivF; #Diversified Demand\n", + "A = 4.; #Area of the Substation\n", + "\n", + "TSn = DD*A; #Peak Loads of A and B\n", + "Sm = TSn; #Peak Loads\n", + "\n", + "#Consmath.tants for different conductors\n", + "Km = 0.0004;\n", + "Kl = 0.00095;\n", + "#Number of Laterals\n", + "Na = 16.; #Site A \n", + "Nb = 32.; #Site B\n", + "\n", + "#Length of the Main\n", + "La = 2.;\n", + "Lb = 3.;\n", + "#length of laterals\n", + "Lla = 2.;\n", + "Llb = 1.;\n", + "\n", + "# Calculations\n", + "#Length of expres Load\n", + "Le = 1;\n", + "Leffb = Le+((Lb-Le)/2); #Effective Length of the feeder in site B\n", + "#Voltage drops\n", + "VDa = (La*Km*Sm/2)+(Lla*Kl*Sm/(Na*2));\n", + "VDb = (Leffb*Km*Sm)+(Llb*Kl*Sm/(Nb*2));\n", + "\n", + "# Results\n", + "print 'The Voltage drop in Site A is %g percent'%(VDa)\n", + "print 'The Voltage drop in Site B is %g percent'%(VDb)\n", + "VDb = (La*Km*Sm/2)+(Lla*Kl*Sm/Na);\n", + "print 'Comparing the results we find Site A suitable due to its less percent voltage drop',VDb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Voltage drop in Site A is 1.8375 percent\n", + "The Voltage drop in Site B is 3.25938 percent\n", + "Comparing the results we find Site A suitable due to its less percent voltage drop 2.075\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "D = 500.; #Load Density in kVA per sq.miles\n", + "Vl = 12.47; #Line Voltage in kV\n", + "N = 2.; #Feeders per substation\n", + "#From Table A-5 Appendix A it Current Ampacity can be found\n", + "\n", + "Imax = 340.;\n", + "\n", + "# Calculations\n", + "S2 = math.sqrt(3)*Vl*Imax; #Load Per Feeder\n", + "\n", + "l2 = math.sqrt(S2/D); #Length of the feeder\n", + "S = 2*l2; #Substation Spacing\n", + "TS2 = S2*N; #Total Load on substation\n", + "\n", + "# Results\n", + "print 'The Parts a%(b and c of thhis question cannot be coded'\n", + "print 'd) The substation size and spacing is %g kVA and %g miles'%(TS2,S)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Parts a%(b and c of thhis question cannot be coded\n", + "d) The substation size and spacing is 14687.1 kVA and 7.66475 miles\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "\n", + "# Variables\n", + "Ts = 1.; #Assumed Load on station\n", + "K = 1.; #Assumption Consmath.tant\n", + "K2 = K;\n", + "K4 = K;\n", + "D = 1.; #Assumption Load Density\n", + "#Number of feeders\n", + "N2 = 2.;\n", + "N4 = 4.;\n", + "S2 = Ts/N2; #Load per feeder #Two feeders\n", + "S4 = Ts/N4; #Load per feeder #4 feeders\n", + "l = Symbol('l'); #Variable Value of length\n", + "L2eff = 1*l/3;\n", + "L4eff = 2*l/3;\n", + "\n", + "# Calculations\n", + "def VD(y): \n", + " return D*(l**2)*K*y\n", + "\n", + "VD2 = VD(L2eff);\n", + "VD4 = VD(L4eff);\n", + "RVD = VD2/VD4;\n", + "X = l-RVD;\n", + "RVD = 2. #1./(solve(X,2)[0]); #To find the ratio of (l2**3)/(l4**3)\n", + "\n", + "Rl = pow(RVD,1./3); #Ratio of length of feeder for 2 feeders two by length of feeder for 4 feeders\n", + "\n", + "#A is directly proportional to l**2\n", + "RA = (Rl**2);\n", + "\n", + "#TSn is directly proportional to n and l**2\n", + "RTS = (N2/N4)*(Rl**2);\n", + "\n", + "# Results\n", + "print 'a) Ratio of substation spacings = 2l2/2l4 = %g'%(Rl)\n", + "print 'b) Ratio of areas covered per feeder main = A2/A4 = %g'%(RA)\n", + "print 'c) Ratio of substation loads = TS2/TS4 = %g'%(RTS)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Ratio of substation spacings = 2l2/2l4 = 1.25992\n", + "b) Ratio of areas covered per feeder main = A2/A4 = 1.5874\n", + "c) Ratio of substation loads = TS2/TS4 = 0.793701\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch5.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch5.ipynb new file mode 100755 index 00000000..f693d116 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch5.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a0679924550ddc56033a5dff0575bafbb69eae69c0974aecc0a708cdad425441" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Design Considerations of Primary Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,sqrt\n", + "\n", + "# Variables\n", + "Z = 0.1+(0.1*1j); #Feeder Impedance per unit\n", + "R = Z.real; #Resismath.tance\n", + "X = Z.imag; #Reacmath.tance\n", + "Vs = 1.; #Sending End Voltage\n", + "Pr = 1.; #Consmath.tant Power Load\n", + "pfr = 0.8; #Power Factor at recieving end\n", + "tr = math.acos(pfr); #Power FActor angle\n", + "\n", + "# Calculations\n", + "def angle(y): \n", + " return math.degrees(math.atan(y.imag/y.real))\n", + "\n", + "K = (Vs**2)-(2*Pr*(R+(X*(math.atan(tr)))));\n", + "\n", + "Vr = math.sqrt((K/2)*(1+math.sqrt(1-((2*abs(Z)*Pr/(K*pfr))**2)))); #Recieving End Voltage\n", + "C = Pr*(X-(R*math.degrees(math.atan(tr))))/((Vr**2)+(Pr*(R+(X*math.degrees(math.atan(tr))))));\n", + "\n", + "del1 = math.degrees(math.atan(C));\n", + "\n", + "Ir = (Pr/(abs(Vr)*pfr))*exp(-1*math.pi*1j*tr/180) #Recieving End Current\n", + "Is = Ir; #Sending End Current\n", + "Tir = angle(Ir);\n", + "\n", + "Vr1 = Vs-(Z*Ir);\n", + "\n", + "# Results\n", + "print 'a) Vr is %g/_%g pu, del is %g degrees, Ir = Is = %g/_%g pu'%(abs(Vr),angle(Vr),del1,abs(Ir),Tir)\n", + "print 'b) Vr is %g/_%g pu, which is almost equal to the previous case.'%(Vr1,angle(Vr1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Vr is 0.79784/_0 pu, del is -38.3625 degrees, Ir = Is = 1.56673/_-0.643501 pu\n", + "b) Vr is 0.841577/_-10.4293 pu, which is almost equal to the previous case.\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:32: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Sl = 518.; #Total Load on Lateral\n", + "Sm = 1036.; #Total Load on Main\n", + "Vll = 4.16; #Line to Line voltage\n", + "\n", + "# Calculations\n", + "#Currents in the respective current\n", + "Ilateral = Sl/(math.sqrt(3)*Vll);\n", + "Imain = Sm/(math.sqrt(3)*Vll);\n", + "\n", + "C = 5280.; #Length Consmath.tant\n", + "Ll = 5760./C; #Lateral Length\n", + "Lm = 3300./C; #Main Length\n", + "\n", + "#Consmath.tant for the cables\n", + "Kl = 0.015;\n", + "Km = 0.01;\n", + "\n", + "#Voltage Drop Percents for 3 phase\n", + "VDlateral3 = Ll*Kl*Sl/2;\n", + "VDmain3 = Lm*Km*Sm;\n", + "TVD3 = VDmain3+VDlateral3;\n", + "#Voltage Drop Percents for 1 phase according to Morrisoncfor laterals\n", + "VDlateral1 = VDlateral3*4;\n", + "VDmain1 = VDmain3;\n", + "TVD1 = VDlateral1+VDmain1;\n", + "\n", + "\n", + "#CASE B\n", + "#To meet the maximum primary voltage drop criterion of 4.00 percent\n", + "#Conductors with ampacities of 480A and 270A for Main and laterals\n", + "\n", + "#Consmath.tants from the table\n", + "Klb = 0.006;\n", + "Kmb = 0.003;\n", + "\n", + "#Voltage Drop Percents\n", + "VDlateralb = Ll*Klb*Sl/2;\n", + "VDmainb = Lm*Kmb*Sm;\n", + "TVDb = VDmainb+VDlateralb;\n", + "\n", + "# Results\n", + "print 'a The percent voltage drops at :'\n", + "print 'i 3Phase'\n", + "print 'Lateral End is %g percent'%(VDlateral3)\n", + "print 'Main End is %g percent'%(VDmain3)\n", + "print 'ii 1Phase'\n", + "print 'Lateral End is %g percent'%(VDlateral1)\n", + "print 'Main End is %g percent'%(VDmain1)\n", + "print 'b) Conductors with Ampacities of 480A and 270A are used to find the Percent voltage drop of the \\\n", + "Main and Lateral as %g percent and %g percent respectively'%(VDmainb,VDlateralb)\n", + "print 'The Above Drops meet the required criterion of 4 percent voltage drop'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The percent voltage drops at :\n", + "i 3Phase\n", + "Lateral End is 4.23818 percent\n", + "Main End is 6.475 percent\n", + "ii 1Phase\n", + "Lateral End is 16.9527 percent\n", + "Main End is 6.475 percent\n", + "b) Conductors with Ampacities of 480A and 270A are used to find the Percent voltage drop of the Main and Lateral as 1.9425 percent and 1.69527 percent respectively\n", + "The Above Drops meet the required criterion of 4 percent voltage drop\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Terms taken from Example two\n", + "Il = 72.; \n", + "Im = 144.; \n", + "C = 5280.; #Length Consmath.tant\n", + "Ll = 5760./C; #Lateral Length\n", + "Lm = 3300./C; #Main Length\n", + "\n", + "#From Tables\n", + "#Lateral\n", + "rl = 4.13; #Resismath.tance per mile\n", + "xLl = 0.258; #Reacmath.tance per mile\n", + "#Main\n", + "rm = 1.29; #Resismath.tance per mile\n", + "xLm = 0.211; #Reacmath.tance per mile\n", + "pf = 0.9; #Power Factor\n", + "\n", + "Vb = 2400.; #Base Voltage\n", + "\n", + "# Calculations\n", + "#Voltage Drops\n", + "VDlateral = Il*((rl*pf)+(xLl*math.sin(math.radians(math.acos(pf)))))*Ll/2; \n", + "VDmain = Im*((rm*pf)+(xLm*math.sin(math.radians(math.acos(pf)))))*Lm;\n", + "\n", + "#Percent Voltage Drop\n", + "perVDlateral = VDlateral*100/Vb;\n", + "perVDmain = VDmain*100/Vb;\n", + "\n", + "TVD = perVDlateral+perVDmain; #Total Percent Voltage drop\n", + "\n", + "#Case B\n", + "#Conductors With Ampacities of 268A and 174A for Main and Laterals\n", + "#From Tables\n", + "#Lateral\n", + "rlb = 1.03; #Resismath.tance per mile\n", + "xLlb = 0.207; #Reacmath.tance per mile\n", + "#Main\n", + "rmb = 0.518; #Resismath.tance per mile\n", + "xLmb = 0.191; #Reacmath.tance per mile\n", + "\n", + "Vb = 2400; #Base Voltage\n", + "#Voltage Drops\n", + "VDlateralb = Il*((rlb*pf)+(xLlb*math.sin(math.radians(math.acos(pf)))))*Ll/2; \n", + "VDmainb = Im*((rmb*pf)+(xLmb*math.sin(math.radians(math.acos(pf)))))*Lm;\n", + "\n", + "#Percent Voltage Drop\n", + "perVDlateralb = VDlateralb*100/Vb;\n", + "perVDmainb = VDmainb*100/Vb;\n", + "\n", + "TVDb = perVDlateralb+perVDmainb; #Total Percent Voltage drop\n", + "\n", + "# Results\n", + "print 'a The percent voltage drops at :'\n", + "print 'Lateral End is %g percent'%(perVDlateral)\n", + "print 'Main End is %g percent'%(perVDmain)\n", + "\n", + "print 'b) Conductors with Ampacities of 278A and 174A are used to find the Percent voltage drop of \\\n", + "the Main and Lateral as %g percent and %g percent respectively'%(perVDmainb,perVDlateralb)\n", + "print 'The Above Drops meet the required criterion of 4 percent voltage drop'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The percent voltage drops at :\n", + "Lateral End is 6.08569 percent\n", + "Main End is 4.35998 percent\n", + "b) Conductors with Ampacities of 278A and 174A are used to find the Percent voltage drop of the Main and Lateral as 1.75389 percent and 1.51958 percent respectively\n", + "The Above Drops meet the required criterion of 4 percent voltage drop\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Sl = 518.; #Total Load on Lateral\n", + "Sm = 5180.; #Total Load on Main\n", + "Vll = 12.47; #Line to Line voltage\n", + "\n", + "#Currents in the respective current\n", + "Ilateral = Sl/(math.sqrt(3)*Vll);\n", + "Imain = Sm/(math.sqrt(3)*Vll);\n", + "\n", + "C = 5280.; #Length Consmath.tant\n", + "Ll = 5760./C; #Lateral Length\n", + "Lm = 3300./C; #Main Length\n", + "\n", + "#Consmath.tant for the cables\n", + "Km = 0.0008;\n", + "Kl = 0.00175;\n", + "\n", + "# Calculations\n", + "#Voltage Drop Percents for 3 phase\n", + "VDlateral = Ll*Kl*Sl/2;\n", + "\n", + "#Due to peculiarity of this new problem, one half of the main has to considered as express feeder and the other connected to a uniformly distributed load of 5180kVA\n", + "VDmain = Lm*Km*Sm*3/4;\n", + "TVD = VDmain+VDlateral;\n", + "\n", + "#Since the inductive reacmath.tance of the line is\n", + "Cd = 12.; #Consmath.tant to find the dismath.tance in terms of feet\n", + "\n", + "#Diameters of the Conductors\n", + "Dmi = 37.;\n", + "Dmn = 53.;\n", + "\n", + "#Drops per mile\n", + "xdi = 0.1213*math.log(Dmi/Cd);\n", + "xdn = 0.1213*math.log(Dmn/Cd);\n", + "\n", + "Dxd = xdn-xdi; #Difference in Drops\n", + "\n", + "# Results\n", + "print 'a The percent voltage drops at :'\n", + "print 'Lateral End is %g percent'%(VDlateral)\n", + "print 'Main End is %g percent'%(VDmain)\n", + "\n", + "print 'b The Above Drops meet the required criterion of 4 percent voltage drop'\n", + "print 'c) The Difference in Voltage drop is %g ohm/mile, which is a smaller VD valuue that it really is.'%(Dxd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The percent voltage drops at :\n", + "Lateral End is 0.494455 percent\n", + "Main End is 1.9425 percent\n", + "b The Above Drops meet the required criterion of 4 percent voltage drop\n", + "c) The Difference in Voltage drop is 0.0435921 ohm/mile, which is a smaller VD valuue that it really is.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vb = 7200.; #Base Voltage in V\n", + "pf = 0.9; #Power Factor\n", + "Sm = 10360.; #Load on Main Feeder in kVA\n", + "Vll = 12.47; #Line to Line voltage in kV\n", + "Imain = Sm/(math.sqrt(3)*Vll); #Current in Main Feeder\n", + "\n", + "#Note Suffix l means lateral and m means main\n", + "\n", + "Vph = 7.2; #Phase Voltage in kV\n", + "Sl = 2*518.; #Load on Lateral Feeder in kVA\n", + "Ilateral = Sl/Vph; #Current in Laterals\n", + "\n", + "#Length of the Feeder\n", + "#Length Consmath.tant\n", + "Cm = 5280.; #Main\n", + "Cl = 1000.; #Lateral\n", + "Ll = 5760./Cl; #Lateral Length\n", + "Lm = 3300./Cm; #Main Length\n", + "\n", + "#Consmath.tants for the particular cables from the tables\n", + "rl = 0.331;\n", + "xLl = 0.0300;\n", + "rm = 0.342;\n", + "xam = 0.458;\n", + "xdm = 0.1802;\n", + "xLm = xam+xdm;\n", + "\n", + "# Calculations\n", + "#Voltage Drops for Normal Condition\n", + "VDmainn = (Imain/2)*((rm*pf)+(xLm*math.sin(math.radians(math.acos(pf)))))*Lm/2;\n", + "VDlateraln = (Ilateral/2)*((rl*pf)+(xLl*math.sin(math.radians(math.acos(pf)))))*Ll/2;\n", + "\n", + "perVDmainn = VDmainn*100/Vb;\n", + "perVDlateraln = VDlateraln*100/Vb;\n", + "\n", + "TVDn = perVDmainn+perVDlateraln;\n", + "\n", + "#Voltage Drops for Worst Conditions\n", + "VDmainw = (Imain)*((rm*pf)+(xLm*math.sin(math.radians(math.acos(pf)))))*Lm/2;\n", + "VDlateralw = (Ilateral)*((rl*pf)+(xLl*math.sin(math.radians(math.acos(pf)))))*Ll;\n", + "\n", + "perVDmainw = VDmainw*100/Vb;\n", + "perVDlateralw = VDlateralw*100/Vb;\n", + "\n", + "TVDw = perVDmainw+perVDlateralw;\n", + "\n", + "# Results\n", + "print 'a)From Table A5, 300-kcmilACSR conductors, with 500A Ampacity is used for mainand AWG #2 XLPE Al\\\n", + " URD cable with 168A Ampacity'\n", + "print 'b) The Total Voltage Drop in Percent for Normal Operation is %g percent'%(TVDn)\n", + "print 'c) The Total Voltage Drop in Percent for Worst Condition is %g percent'%(TVDw)\n", + "print 'd The Voltage drop is met for Normal operation and NOT for emergency operation'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)From Table A5, 300-kcmilACSR conductors, with 500A Ampacity is used for mainand AWG #2 XLPE Al URD cable with 168A Ampacity\n", + "b) The Total Voltage Drop in Percent for Normal Operation is 1.1836 percent\n", + "c) The Total Voltage Drop in Percent for Worst Condition is 4.08313 percent\n", + "d The Voltage drop is met for Normal operation and NOT for emergency operation\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch6.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch6.ipynb new file mode 100755 index 00000000..811db39e --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch6.ipynb @@ -0,0 +1,355 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:753590086967c8fe303e9fb46c959fc704437382516c05f043082b94c3ead7f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Design Considerations of Secondary Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "from scipy.misc import derivative\n", + "\n", + "# Variables\n", + "NC = 24.; #Number Of Customers Per Block\n", + "\n", + "#We get the Total Annual Cost from the releveant equations as\n", + "# TAC = 239.32 + (3.1805*ST) + (3492/ST) + (28170/ST**2) + (0.405*ASL) + (17018/ASL) + (1.134*ASD) + (8273/ASD)\n", + "\n", + "#We know split the above equation into 3 different parts according to factors ST,ASD,ASL\n", + "\n", + "#Variable Values of the Factors\n", + "ST = Symbol('ST');\n", + "ASD = Symbol('ASD');\n", + "ASL = Symbol('ASL');\n", + "\n", + "#Functions to Find the TAC corresponding to the Respective Factors\n", + "\n", + "def TransSize(y): \n", + " return 239.52 + (3.1805*y) + (3492./y) + (28170./(y**2))\n", + "def SDwire(y): \n", + " return (1.134*y)+(8273./y)\n", + "def SLwire(y): \n", + " return (0.405*y)+(17018./y)\n", + "\n", + "#Total Annual Costs of the respective Factors\n", + "TACST = TransSize(ST);\n", + "TACASD = SDwire(ASD);\n", + "TACASL = SLwire(ASL);\n", + "\n", + "#Partially Differentiating wrt ASD we get\n", + "#Y1 = derivative(TACASD);\n", + "#X1 = roots(Y1[1]);\n", + "X1 = [-85.413198,85.413198]\n", + "ASD = X1[0]; #Calculated Value\n", + "ASDstd = 105.500;\n", + "ASDstd1 = 133.1;\n", + "\n", + "#Partially Differentiating wrt ASL we get\n", + "#Y2 = derivative(TACASL);\n", + "#X2 = solve(Y2[1]);\n", + "X2 = [-204.9872,204.9872 ]\n", + " \n", + "ASL = X2[0]; #Calculated Value\n", + "ASLstd = 211.600; \n", + "ASLstd1 = 250.;\n", + "\n", + "#Partially Differentiating wrt ST we get\n", + "#Y3 = derivative(TACST);\n", + "#X3 = solve(Y3[1]);\n", + "X3 = [39.346541,-19.673271 + 7.9480914j, -19.673271 - 7.9480914j, 0 ]\n", + "ST = round(X3[0]); #Calculated Value\n", + "STstd = 50.;\n", + "\n", + "#Total Annual Cost of the Calculated parameters\n", + "TAC = TransSize(ST)+SDwire(ASD)+SLwire(ASL);\n", + "#Calculation Mistake in The Text Book\n", + "\n", + "#Total Annual Cost of the First Higher standard Parameters\n", + "TACstd = TransSize(STstd)+SDwire(ASDstd)+SLwire(ASLstd);\n", + "#Total Annual Cost of the Second Higher standard Parameters\n", + "TACstd1 = TransSize(STstd)+SDwire(ASDstd1)+SLwire(ASLstd1);\n", + "\n", + "#Total Fixed Charges per Year\n", + "TACFC = ((75+(2.178*STstd))+(5.4+(0.405*ASLstd))+(15.12+(1.134*ASD))+(144));\n", + "#Total Operating Charges per Year\n", + "TACOC = ((0.0225*STstd)+(0.98*STstd)+(28170/(STstd**2))+(3492/STstd)+(17018/ASLstd)+(8273/ASDstd));\n", + "\n", + "#Values Might Vary from those in the text due to high precision\n", + "\n", + "#Fixed Charges Per Customer Per Month\n", + "FC = TACFC/(NC*12);\n", + "\n", + "#Variable Costs Per Customer per month\n", + "VOC = TACOC/(NC*12);\n", + "\n", + "# Results\n", + "print 'a) The Most Economical SD Size is %g kmil and the nearest larger standard AWG wire size is %g kmil'%(ASD,ASDstd)\n", + "print 'b) The Most Economical SL Size is %g kmil and the nearest larger standard AWG wire size is %g kmil'%(ASL,ASLstd)\n", + "print 'c) The Most Economical Distribution Transformer Size is %g kmil and the nearest larger standard transformer\\\n", + " size is %g kVA'%(ST,STstd)\n", + "print 'd) The Total Annual Cost Per Block for the theoretically most economical sizes of equipment is %g dollars'%(TAC)\n", + "print 'e) The Total Annual Cost Per Block for the nearest larger standard comercial sizes of equipment is %g dollars'%(TACstd)\n", + "print 'f) The Total Annual Cost Per Block for the nearest larger transformer size and for\\\n", + " the second larger sizes of ASD and ASL is %g dollars'%(TACstd1)\n", + "print 'g) Fixed Charges per Customer per Month is %g dollars'%(FC)\n", + "print 'h) The Variable Operating Costs Per Customer Per Month is %g dollars'%(VOC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Most Economical SD Size is -85.4132 kmil and the nearest larger standard AWG wire size is 105.5 kmil\n", + "b) The Most Economical SL Size is -204.987 kmil and the nearest larger standard AWG wire size is 211.6 kmil\n", + "c) The Most Economical Distribution Transformer Size is 39 kmil and the nearest larger standard transformer size is 50 kVA\n", + "d) The Total Annual Cost Per Block for the theoretically most economical sizes of equipment is 111.862 dollars\n", + "e) The Total Annual Cost Per Block for the nearest larger standard comercial sizes of equipment is 843.83 dollars\n", + "f) The Total Annual Cost Per Block for the nearest larger transformer size and for the second larger sizes of ASD and ASL is 862.067 dollars\n", + "g) Fixed Charges per Customer per Month is 1.17104 dollars\n", + "h) The Variable Operating Costs Per Customer Per Month is 1.00721 dollars\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix,multiply\n", + "#To determine the co-effcient matrix for a unbalanced load\n", + "#Page 304\n", + "\n", + "# Variables\n", + "Dab = 12.;\n", + "Dan = 12.;\n", + "Dbn = 24.;\n", + "Daa = 12*0.01577;\n", + "Dbb = Daa;\n", + "Dnn = Daa;\n", + "\n", + "# Calculations\n", + "def Coeff(y,z):\n", + " return (2*(10**-7))*math.log(y/z) #function to find the elements of the co-efficient matrix\n", + "\n", + "#Part A of the question cannot be found using Scilab, Hence from the equation obtained in part A we can numerically compute the Co- Efficient Matrix\n", + "\n", + "CM = matrix([[Coeff(Dan,Daa),Coeff(Dan,Dab)],[Coeff(Dbn,Dab),Coeff(Dbn,Dbb)],[Coeff(Dnn,Dan),Coeff(Dnn,Dbn)]]);\n", + "\n", + "# Results\n", + "print ' Part A cannot be resulted by this code%( hence from the equations obtained in Part A Co-Efficient Matrix is Obtained as'\n", + "print (multiply(CM,(10**7)))\n", + "print ' * 10**-7 Wb*T/m'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Part A cannot be resulted by this code%( hence from the equations obtained in Part A Co-Efficient Matrix is Obtained as\n", + "[[ 8.29929176 0. ]\n", + " [ 1.38629436 9.68558612]\n", + " [-8.29929176 -9.68558612]]\n", + " * 10**-7 Wb*T/m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix\n", + "from numpy.linalg import inv\n", + "\n", + "# Variables\n", + "#Primary Voltage\n", + "V1 = 7272*(1j*math.pi*0/180);\n", + "\n", + "#Secondary Voltages\n", + "Ea = 120*(1j*math.pi*0/180);\n", + "Eb = 120*(1j*math.pi*0/180);\n", + "\n", + "#Impedances\n", + "Za = 0.8+(1j*0.6);\n", + "Zb = 0.8+(1j*0.6);\n", + "\n", + "n = 60; #Turns Ratio\n", + "\n", + "# Calculations\n", + "def angle(y): \n", + " return math.degrees(math.atan(y.imag/y.real))\n", + "\n", + "#Substituting the values we get the following equations\n", + "#121.2 = Ia*(0.8857 + j0.6846) + Ib*(0.03279 + j0.03899)\n", + "#121.2 = Ia*(-0.03279 - j0.03899) + Ib*(-0.88574 + j0.50267)\n", + "\n", + "#For Convenience We segregate them as\n", + "Z1 = (0.8857+(1j*0.6846));\n", + "Z2 = (0.03279+(1j*.03899))\n", + "Z3 = (-0.03279-(1j*.03899))\n", + "Z4 = (-0.88574+(1j*.50267))\n", + "\n", + "Z = matrix([[Z1,Z2],[Z3,Z4]]); #Impedance matrix\n", + "V = matrix([[121.2],[121.2]]); #Voltage Matrix\n", + "I = inv(Z)*V; #Current Matrix\n", + "\n", + "#Secondary Currents\n", + "Ia = I[0];\n", + "Ib = I[1];\n", + "\n", + "In = -Ia-Ib; #Secondary neutral Currents\n", + "\n", + "#Secondary Voltages\n", + "Va = Za*Ia;\n", + "Vb = -1*Zb*Ib;\n", + "\n", + "#Secondary Voltage Resulmath.tant\n", + "Vab = Va+Vb;\n", + "\n", + "# Results\n", + "print 'a The Secondary Currents are:'\n", + "print 'Ia = %g/_%g A'%(abs(Ia),angle(Ia))\n", + "print 'Ib = %g/_%g A'%(abs(Ib),180+angle(Ib))\n", + "print 'b) The Secondary Neutral Current = %g/_%g A'%(abs(In),angle(In))\n", + "print 'c The Secondary Voltages are:'\n", + "print 'Va = %g/_%g V'%(abs(Va),angle(Va))\n", + "print 'Vb = %g/_%g V'%(abs(Vb),angle(Vb))\n", + "print 'd) The Resulmath.tant Secondary Voltage Vab is %g/_%g V'%(abs(Vab),angle(Vab))\n", + "\n", + "#In the TextBook Note That Zb has been taken wrong in the calculattion of Vb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Secondary Currents are:\n", + "Ia = 109.376/_-34.7812 A\n", + "Ib = 124.295/_210.235 A\n", + "b) The Secondary Neutral Current = 126.208/_82.0057 A\n", + "c The Secondary Voltages are:\n", + "Va = 109.376/_2.08869 V\n", + "Vb = 124.295/_67.1048 V\n", + "d) The Resulmath.tant Secondary Voltage Vab is 197.222/_36.9266 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 19.; #Number Transformers\n", + "St = 500.; #Load on each transformer in kVA\n", + "L = 5096+(1j*3158); #Load\n", + "Vlf = 114.; #Favourable Voltage\n", + "Vlt = 111.; #Tolerable Volatage\n", + "Vb = 125.; #Base Voltage\n", + "\n", + "# Calculations\n", + "#Per Unit Tolerable and favourable voltages\n", + "puVlf = Vlf/Vb;\n", + "puVlt = Vlt/Vb;\n", + "\n", + "ZM = 0.181+(1j*0.115); #The Positive Sequence Impedance\n", + "ZTi = 0.0086+(1j*0.0492); #Transformer Impedance for 500kVA\n", + "ZT = 2*ZTi; #Transformer Impedance for 1000kVA\n", + "\n", + "AAF = N*St/abs(L); #Actual Application Factor\n", + "\n", + "# Results\n", + "print 'a) The Lowest favourable Voltage is %g pu and The Lowest tolerable voltage is %g pu'%(puVlf,puVlt)\n", + "print 'b) There Are No buses in Table 6-5%( for the first contingency outage which satisfy the necessary condition'\n", + "print 'c For Second Contingency Outage'\n", + "print '1) Less than Favourable Voltage are B,C,J,K,R and S'\n", + "print '2) Less than Tolerable Voltage are B,C,J,K.'\n", + "print 'd) ZM/ZT = %g and 1/2)*ZM/ZT = %g respectively.'%(abs(ZM)/abs(ZT),((1./2)*abs(ZM)/abs(ZT)))\n", + "print 'The Actual Application Factor is %g'%(AAF)\n", + "print 'Therefore the Design of this network is sufficient'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Lowest favourable Voltage is 0.912 pu and The Lowest tolerable voltage is 0.888 pu\n", + "b) There Are No buses in Table 6-5%( for the first contingency outage which satisfy the necessary condition\n", + "c For Second Contingency Outage\n", + "1) Less than Favourable Voltage are B,C,J,K,R and S\n", + "2) Less than Tolerable Voltage are B,C,J,K.\n", + "d) ZM/ZT = 2.14675 and 1/2)*ZM/ZT = 1.07338 respectively.\n", + "The Actual Application Factor is 1.58461\n", + "Therefore the Design of this network is sufficient\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch7.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch7.ipynb new file mode 100755 index 00000000..29035765 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch7.ipynb @@ -0,0 +1,751 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:01457b400cb26c0846fbd5ddd5063f407fdfab264a58fb8bca41c527415d193b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Voltage Drop and Power Loss Calculations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vll = 416.; #Voltage Line to Line\n", + "Vph = Vll/(math.sqrt(3)); #Phase Voltage and Base Voltage\n", + "#Load Currents\n", + "Ia = 30.;\n", + "Ib = 20.;\n", + "Ic = 50.;\n", + "\n", + "#Power Factors of the load\n", + "pfa = 1.;\n", + "pfb = 0.5;\n", + "pfc = 0.9;\n", + "\n", + "#Impedances of the Sections\n", + "ZA = 0.05+(1j*0.01);\n", + "ZAB = 0.1+(1j*0.02);\n", + "ZBC = 0.05+(1j*0.05);\n", + "#Impedance upto the point of load\n", + "ZB = ZA+ZAB;\n", + "ZC = ZB+ZBC;\n", + "\n", + "# Calculations\n", + "#Function to Calculate Voltage Drop\n", + "def VD(a,b,c):\n", + " return a*((b.real*c)+(b.imag*math.sin(math.acos(c))))\n", + "\n", + "#Voltage Drops at A,B and C\n", + "VDA = VD(Ia,ZA,pfa);\n", + "VDB = VD(Ib,ZB,pfb);\n", + "VDC = VD(Ic,ZC,pfc);\n", + "\n", + "TVD = VDA+VDB+VDC; #Total Voltage Drop\n", + "\n", + "TVDpu = TVD/Vph; # In Per Unit\n", + "\n", + "def Real(y,z):\n", + " return Vph*y*z #Function to Calculate Real Power\n", + "def Reactive(y,z):\n", + " return Vph*y*math.sin(math.acos(z)) #Funtion to Calculate the Reactive power\n", + "\n", + "#Real Powers\n", + "Pa = Real(Ia,pfa);\n", + "Pb = Real(Ib,pfb);\n", + "Pc = Real(Ic,pfc);\n", + "P = Pa+Pb+Pc; #Total Real Power\n", + "\n", + "\n", + "#Reactive Powers\n", + "Qa = Reactive(Ia,pfa);\n", + "Qb = Reactive(Ib,pfb);\n", + "Qc = Reactive(Ic,pfc);\n", + "Q = Qa+Qb+Qc; #Total Reactive Power\n", + "\n", + "S = math.sqrt((P**2)+(Q**2)); #Total output from the Transformer\n", + "PF = P/S; #Load Power Factor\n", + "\n", + "# Results\n", + "print 'a) The Total Voltage drop is %g pu'%(TVDpu)\n", + "print 'b) The Real Power per Phase is %g kW'%(P/1000)\n", + "print 'c) The Reactive Power per Phase is %g kVAr'%(Q/1000)\n", + "print 'd) The Kilovoltampere output and load factor is %g kVA and %g lagging'%(S/1000,PF)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Total Voltage drop is 0.0593859 pu\n", + "b) The Real Power per Phase is 20.4151 kW\n", + "c) The Reactive Power per Phase is 9.39455 kVAr\n", + "d) The Kilovoltampere output and load factor is 22.473 kVA and 0.90843 lagging\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "pf = 0.9; #Power Factor\n", + "Vb = 120.; #Base Voltage\n", + "#From The Tables\n", + "r = 0.334; #Resismath.tance per thousand feet\n", + "x = 0.0299; #Reacmath.tance per thousand feet\n", + "K1 = 0.02613; #Voltage Drop\n", + "\n", + "#Assumed Cable\n", + "I = 100.; #Secodary line Current\n", + "Ls = 100.; #Length of Secondary line in feet\n", + "\n", + "# Calculations\n", + "R = r*Ls/1000; # Resismath.tance Value for a 100 feet Line\n", + "X = x*Ls/1000; # Reacmath.tance Value for a 100 feet Line\n", + "\n", + "VD = I*((R*pf)+(X*math.sin(math.radians(math.acos(pf))))); #Voltage Drop\n", + "VDpu = VD/Vb; #Per unit value\n", + "\n", + "# Results\n", + "print 'The Cable Selected is of 100 feet, carrying 100A and cable size #2 AWG'\n", + "print 'The Voltage drop for the above cable is %g pu V'%(VDpu)\n", + "print 'The Above Value is Close to the Value%g pu V) in the table given.'%(K1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Cable Selected is of 100 feet, carrying 100A and cable size #2 AWG\n", + "The Voltage drop for the above cable is 0.0250696 pu V\n", + "The Above Value is Close to the Value0.02613 pu V) in the table given.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Sts = (10+(11*4.4)); #Load Selected on the transformer\n", + "V = 240.; #Voltage\n", + "Sta = 50.; #Available Unit\n", + "pf = 0.9; #Load Power Factor\n", + "I = (Sts/V)/(Sta/V);\n", + "\n", + "VDT = I*((0.0107*pf)+(0.0139*math.sin(math.radians(math.acos(pf)))));\n", + "\n", + "SLload = 10.+(3*6);\n", + "\n", + "# Calculations\n", + "def VD(a,b,c):\n", + " return a*b*c/(10**4) #Function to find Voltage Drop Per unit\n", + "\n", + "VDSL = VD(0.0088,116.7,150);\n", + "VDSD = VD(0.01683,41.76,70);\n", + "\n", + "TVD = VDT+VDSL+VDSD;\n", + "\n", + "Is = 80.;\n", + "Smotor = Is*V/1000;\n", + "pf1 = 0.5;\n", + "VDIPT = ((0.0107*pf1)+(0.0139*math.sin(math.radians(math.acos(pf1)))))*(Smotor/Sta);\n", + "\n", + "VDIPSL = VD(0.00636,80,150);\n", + "VDIPSD = VD(0.01089,80,70);\n", + "TVDIP = VDIPT+VDIPSL+VDIPSD;\n", + "\n", + "VDSL1 = VD(0.00769,116.7,150);\n", + "VDSD1 = VD(0.0136,41.6,70);\n", + "TVD1 = VDT+VDSL1+VDSD1;\n", + "\n", + "# Results\n", + "print 'a The Voltage drops are:'\n", + "print 'Transformer is %g pu V'%(VDT)\n", + "print 'Secondary Lines is %g pu V'%(VDSL)\n", + "print 'Service Drops is %g pu V'%(VDSD)\n", + "print 'Total is %g pu V'%(TVD)\n", + "print 'The Above Value doesn''t meet the required criterion'\n", + "print 'b The Voltage dip for motor starting are:'\n", + "print 'Transformer is %g pu V'%(VDIPT)\n", + "print 'Secondary Lines is %g pu V'%(VDIPSL)\n", + "print 'Service Drops is %g pu V'%(VDIPSD)\n", + "print 'Total is %g pu V'%(TVDIP)\n", + "print 'The Above Value does meet the required criterion'\n", + "print 'C The Voltage drops after changing the conductors are:'\n", + "print 'Transformer is %g pu V'%(VDT)\n", + "print 'Secondary Lines is %g pu V'%(VDSL1)\n", + "print 'Service Drops is %g pu V'%(VDSD1)\n", + "print 'Total is %g pu V'%(TVD1)\n", + "print 'The Above Value doesn''t meet the required criterion'\n", + "print 'Thus 350 kcmilcable size for the secondary lines and \\\n", + " #2/0 AWG cable size for service drops to meet the criteria'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Voltage drops are:\n", + "Transformer is 0.0113756 pu V\n", + "Secondary Lines is 0.0154044 pu V\n", + "Service Drops is 0.00491975 pu V\n", + "Total is 0.0316998 pu V\n", + "The Above Value doesnt meet the required criterion\n", + "b The Voltage dip for motor starting are:\n", + "Transformer is 0.00215195 pu V\n", + "Secondary Lines is 0.007632 pu V\n", + "Service Drops is 0.0060984 pu V\n", + "Total is 0.0158824 pu V\n", + "The Above Value does meet the required criterion\n", + "C The Voltage drops after changing the conductors are:\n", + "Transformer is 0.0113756 pu V\n", + "Secondary Lines is 0.0134613 pu V\n", + "Service Drops is 0.00396032 pu V\n", + "Total is 0.0287973 pu V\n", + "The Above Value doesnt meet the required criterion\n", + "Thus 350 kcmilcable size for the secondary lines and #2/0 AWG cable size for service drops to meet the criteria\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Length in feet\n", + "Lsd = 100.; #Service Drop Line\n", + "Lsl = 200.; #Secondary Line\n", + "\n", + "SB = 75.; #Transformer Capacity in kVA\n", + "pf = 0.9; #Load Power Factor\n", + "\n", + "#From the Tables\n", + "ISL = 129.17; #Secondary Line Current\n", + "ISD = 41.67; #Service Drop Current\n", + "KSD = 0.01683; #Service Drop Cable Consmath.tant\n", + "KSL = 0.0136; #Secondary Cable Consmath.tant\n", + "\n", + "#for Transformer\n", + "R = 0.0101; #Resismath.tance in per unit\n", + "X = 0.0143; #Reamath.tance in per unit\n", + "\n", + "# Calculations\n", + "#From the Diagram\n", + "ST = (3.+2+8+6)+(5+6+7+4)+(6+7+8+10); #Total Load on transformer\n", + "\n", + "STpu = ST/SB; #In Per unit;\n", + "\n", + "#The Above value also corresponds to the Current as Well\n", + "\n", + "I = STpu; #Current in Per Unit\n", + "\n", + "VDT = I*((R*pf)+(X*math.sin(math.radians(math.acos(pf))))); #Voltage Drop in the Transformer\n", + "VDSL = KSL*(Lsl*ISL/(10**4)); #Secondary Line\n", + "VDSD = KSD*(Lsd*ISD/(10**4)); #Service Drop Line\n", + "\n", + "VD = VDT+VDSD+VDSL; #Total Voltage Drop\n", + "\n", + "# Results\n", + "print 'a)The Load in transformer is %g kVA or %g pu'%(ST,STpu)\n", + "print 'b) The Total Voltage Drop is %g pu V'%(VD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The Load in transformer is 72 kVA or 0.96 pu\n", + "b) The Total Voltage Drop is 0.0509818 pu V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "An = 4.; #Service Area\n", + "l = 1.; #Length of 0a\n", + "#Voltages in kV \n", + "Vll = 13.2; #Line to line\n", + "Vln = 7.62; #Line to neutral\n", + "\n", + "#Peak Loading\n", + "Dp = 1000.; #Peak Loading Intensity per sq.miles\n", + "Sl = 2000.; #Lumped Load in kVA\n", + "\n", + "#Off Peak Loading\n", + "Dop = 333.; #Loading intensity\n", + "\n", + "VB = 7620.; #Base Voltage\n", + "\n", + "Vs = 1.025; #Substation Voltages\n", + "\n", + "Sn = Dp*An; #Load Connected to the square shaped service area\n", + "Sm = Sn+Sl; #Total Load\n", + "\n", + "K = 0.0003; #Cable Consmath.tant\n", + "\n", + "# Calculations\n", + "VD0a = K*Sm*l; #Voltage Drop between substation and a\n", + "lab = 2; #Dismath.tance from a to b\n", + "VDab = (K*Sn*lab/2)+(K*Sl*lab); #Voltage drop from b to c\n", + "lbc = 2; #Dismath.tance from b to c\n", + "VDbc = 3*K*Sl*lbc; #Voltage drop from b to c #Change in Consmath.tant\n", + "\n", + "I = Sl/(math.sqrt(3)*(0.947*Vll));\n", + "Ib = Sl/(math.sqrt(3)*(Vll)); #BAse Current\n", + "\n", + "MIpu = I/Ib; #Per Unit Current\n", + "\n", + "Ztpu = complex(0,0.05);\n", + "pf = 0.9; #Load Power Factor\n", + "\n", + "Ipu = MIpu*exp(1j*math.pi*math.acos(pf)/180);\n", + "\n", + "#The Voltage has been tapped up 5 percent\n", + "\n", + "puVDcd = (abs(Ipu)*((Ztpu.real*pf)+(Ztpu.imag*math.sin(math.radians(math.acos(pf))))))-0.05;\n", + "VDcd = puVDcd*100;\n", + "def volt(a,b):\n", + " return (a-(b/100.)) #funtion to find out voltages\n", + "\n", + "#per unit Voltages\n", + "puVa = volt(Vs,VD0a);\n", + "puVb = volt(puVa,VDab);\n", + "puVc = volt(puVb,VDbc);\n", + "puVd = volt(puVc,VDcd);\n", + "\n", + "#Voltages in V\n", + "Va = puVa*VB;\n", + "Vb = puVb*VB;\n", + "Vc = puVc*VB;\n", + "Vd = puVd*VB;\n", + "\n", + "# Results\n", + "print 'a The Percentage drops are'\n", + "print ' Substation to a is %g percent'%(VD0a);\n", + "print ' a to b is %g percent'%(VDab);\n", + "print ' b to c is %g percent'%(VDbc);\n", + "print ' c to d is %g percent'%(VDcd);\n", + "print 'b The Per unit voltages are:'\n", + "print ' Point a is %g pu V'%(puVa)\n", + "print ' Point b is %g pu V'%(puVb)\n", + "print ' Point c is %g pu V'%(puVc)\n", + "print ' Point d is %g pu V'%(puVd)\n", + "print 'c The Line to Neutral voltages are:'\n", + "print ' Point a is %g V'%(Va)\n", + "print ' Point b is %g V'%(Vb)\n", + "print ' Point c is %g V'%(Vc)\n", + "print ' Point d is %g V'%(Vd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Percentage drops are\n", + " Substation to a is 1.8 percent\n", + " a to b is 2.4 percent\n", + " b to c is 3.6 percent\n", + " c to d is -4.95844 percent\n", + "b The Per unit voltages are:\n", + " Point a is 1.007 pu V\n", + " Point b is 0.983 pu V\n", + " Point c is 0.947 pu V\n", + " Point d is 0.996584 pu V\n", + "c The Line to Neutral voltages are:\n", + " Point a is 7673.34 V\n", + " Point b is 7490.46 V\n", + " Point c is 7216.14 V\n", + " Point d is 7593.97 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To determine the percent drop from the substation to various points\n", + "#Page 340\n", + "\n", + "# Variables\n", + "V0op = 1.; #At off Peak\n", + "An = 4.; #Service Area\n", + "l = 1.; #Length of 0a\n", + "#Voltages in kV \n", + "Vll = 13.2; #Line to line\n", + "Vln = 7.62; #Line to neutral\n", + "\n", + "#Peak Loading\n", + "Dp = 1000.; #Peak Loading Intensity per sq.miles\n", + "Sl = 2000.; #Lumped Load in kVA\n", + "\n", + "#Off Peak Loading\n", + "Dop = 333.; #Loading intensity\n", + "\n", + "VB = 7620.; #Base Voltage\n", + "\n", + "Vs = 1.025; #Substation Voltages\n", + "\n", + "Sn = Dop*An; #Load Connected to the square shaped service area\n", + "Sm = Sn+Sl; #Total Load\n", + "\n", + "K = 0.0003; #Cable Consmath.tant\n", + "\n", + "# Calculations\n", + "VD0a = K*Sm*l; #Voltage Drop between substation and a\n", + "lab = 2.; #Dismath.tance from a to b\n", + "VDab = (K*Sn*lab/2)+(K*Sl*lab); #Voltage drop from b to c\n", + "lbc = 2.; #Dismath.tance from b to c\n", + "VDbc = 3*K*Sl*lbc; #Voltage drop from b to c #Change in Consmath.tant\n", + "\n", + "I = Sl/(math.sqrt(3)*(0.947*Vll));\n", + "Ib = Sl/(math.sqrt(3)*(Vll)); #BAse Current\n", + "\n", + "MIpu = I/Ib; #Per Unit Current\n", + "\n", + "Ztpu = complex(0,0.05);\n", + "pf = 0.9; #Load Power Factor\n", + "\n", + "Ipu = MIpu*exp(1j*math.pi*math.acos(pf)/180);\n", + "\n", + "#The Voltage has been tapped up 5 percent\n", + "\n", + "puVDcd = (abs(Ipu)*((Ztpu.real*pf)+(Ztpu.imag*math.sin(math.radians(math.acos(pf))))))-0.05;\n", + "VDcd = puVDcd*100;\n", + "def volt(a,b):\n", + " return (a-(b/100)) #funtion to find out voltages\n", + "\n", + "#per unit Voltages\n", + "puVa = volt(V0op,VD0a);\n", + "puVb = volt(puVa,VDab);\n", + "puVc = volt(puVb,VDbc);\n", + "puVd = volt(puVc,VDcd);\n", + "\n", + "#Voltages in V\n", + "Va = puVa*VB;\n", + "Vb = puVb*VB;\n", + "Vc = puVc*VB;\n", + "Vd = puVd*VB;\n", + "\n", + "# Results\n", + "print 'a The Percentage drops are'\n", + "print ' Substation to a is %g percent'%(VD0a);\n", + "print ' a to b is %g percent'%(VDab);\n", + "print ' b to c is %g percent'%(VDbc);\n", + "print ' c to d is %g percent'%(VDcd);\n", + "print 'b The Per unit voltages are:'\n", + "print ' Point a is %g pu V'%(puVa)\n", + "print ' Point b is %g pu V'%(puVb)\n", + "print ' Point c is %g pu V'%(puVc)\n", + "print ' Point d is %g pu V'%(puVd)\n", + "print 'c The Line to Neutral voltages are:'\n", + "print ' Point a is %g V'%(Va)\n", + "print ' Point b is %g V'%(Vb)\n", + "print ' Point c is %g V'%(Vc)\n", + "print ' Point d is %g V'%(Vd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Percentage drops are\n", + " Substation to a is 0.9996 percent\n", + " a to b is 1.5996 percent\n", + " b to c is 3.6 percent\n", + " c to d is -4.95844 percent\n", + "b The Per unit voltages are:\n", + " Point a is 0.990004 pu V\n", + " Point b is 0.974008 pu V\n", + " Point c is 0.938008 pu V\n", + " Point d is 0.987592 pu V\n", + "c The Line to Neutral voltages are:\n", + " Point a is 7543.83 V\n", + " Point b is 7421.94 V\n", + " Point c is 7147.62 V\n", + " Point d is 7525.45 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vll = 13.2; #Voltage in kV (Line voltage)\n", + "TCDi = 0.45; #Load Density in kVA per feet\n", + "FD = 1.08; #Diversity Factor for all loads\n", + "FLS = 0.2; #Annual Loss Factor\n", + "DFi = 0.6; #30 min Annual Demand Factor\n", + "\n", + "Dg = TCDi*DFi/FD; #Divesified Maximum Demand of the Group\n", + "\n", + "L = 30000; #Length of the Whole Feeder in Feet\n", + "\n", + "#To Achieve Minimum Voltage Drop, The Substation must be located at the centre of the line \n", + "Ln = 15000.; #NEW Length of the Feeder\n", + "\n", + "# Calculations\n", + "SPK = Dg*Ln; #Peak Load on each main of the substation trnasformer\n", + "I = (SPK/(math.sqrt(3)*Vll)); #Current in the Line\n", + "\n", + "K = 0.0009; #For the Assumed Conductor\n", + "VD = K*SPK*Ln/(2*5280); #Voltage Drop, Is divided by 5280, to convert the length in miles\n", + "\n", + "# Results\n", + "print 'a) To Achieve Minimum Voltage Drop, The Substation is Placed at the Centre of the Line,\\\n", + " and For a Current of %g A following in it, #4 AWG or #2 AWG ACSR conductors are used'%(I)\n", + "print 'b) For a #4 AWG Copper Conductor, The Percentage Voltage drop at annual peak load is %g pecent'%(VD)\n", + "\n", + "#Calculation Mistake in the TextBook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) To Achieve Minimum Voltage Drop, The Substation is Placed at the Centre of the Line, and For a Current of 164.02 A following in it, #4 AWG or #2 AWG ACSR conductors are used\n", + "b) For a #4 AWG Copper Conductor, The Percentage Voltage drop at annual peak load is 4.79403 pecent\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vll = 13.2; #Voltage in kV (Line voltage)\n", + "TCDi = 0.45; #Load Density in kVA per feet\n", + "FD = 1.08; #Diversity Factor for all loads\n", + "FLS = 0.2; #Annual Loss Factor\n", + "DFi = 0.6; #30 min Annual Demand Factor\n", + "\n", + "# Calculations\n", + "Dg = TCDi*DFi/FD; #Divesified Maximum Demand of the Group\n", + "L = 30000; #Length of the Whole Feeder in Feet\n", + "I = 164.2; #Current\n", + "\n", + "r = 0.592; #Resismath.tance Per Mile\n", + "R = r*L/(3.*5280); #Total Resismath.tance\n", + "\n", + "CL = 3*(I**2)*R; #Total Power Loss in entire length\n", + "\n", + "TAEL = CL*FLS*8760/(10**3); #Total Annual Energy Loss\n", + "\n", + "# Results\n", + "print 'The Total Annual Eddy Current Loss is %g kWhr'%(TAEL)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Total Annual Eddy Current Loss is 158887 kWhr\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Loads in kVA\n", + "Sbc = 3000.; #Load Along bc\n", + "Sd = 2000.; #Load At Point d\n", + "S0a = Sbc+Sd; #Total Load\n", + "Sab = Sbc/2; #Load along ab\n", + "\n", + "#Cable Consmath.tants\n", + "K0a = 0.0005; #For 0 to a\n", + "Kab = 0.0010; #For a to b\n", + "Kac = 0.0010; #For a to c\n", + "Kad = 0.0010; #For a to d\n", + "\n", + "#Length\n", + "l0a = 1.0; #From 0 to a\n", + "lab = 2.; #From a to b\n", + "lad = 2.; #From a to d\n", + "\n", + "# Calculations\n", + "#Voltage Drops At Specific Points\n", + "VDa = K0a*S0a*l0a;\n", + "VDb = (Kab*Sab*lab/2)+VDa;\n", + "VDc = VDb;\n", + "VDd = (Kad*Sd*lad)+VDa;\n", + "\n", + "#To determine the Voltages at Point a\n", + "Vll = 12650.; #Line to Line Voltage\n", + "Vln = 7300.; #Line to Neutral Voltage\n", + "\n", + "Valn = Vln-(VDa*Vln/100);\n", + "Vall = Vll-(VDa*Vll/100);\n", + "\n", + "# Results\n", + "print 'a The Voltage Drops at:'\n", + "print 'Point a is %g percent'%(VDa)\n", + "print 'Point b is %g percent'%(VDb)\n", + "print 'Point c is %g percent'%(VDc)\n", + "print 'Point d is %g percent'%(VDd)\n", + "print 'b) The Voltages VaL-N is %g V and VaL-L is %g V'%(Valn,Vall)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Voltage Drops at:\n", + "Point a is 2.5 percent\n", + "Point b is 4 percent\n", + "Point c is 4 percent\n", + "Point d is 6.5 percent\n", + "b) The Voltages VaL-N is 7117.5 V and VaL-L is 12333.8 V\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch8.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch8.ipynb new file mode 100755 index 00000000..af025a65 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch8.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:82754afbe0b57de92c1b3631997744ed83c0b5bcb3ad977be765225d89fd57a7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Application of Capacitors to Distribution Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "SL = 700.; #Load in kVA\n", + "pf1 = 65./100; #Power Factor\n", + "PL = SL*pf1; #Real Power\n", + "#From the Table of Power Factor Correction\n", + "CR = 0.74; #Co-relation factor\n", + "CS = PL*CR; #Capacitor Size\n", + "\n", + "CSr = 360.; #Next Higher standard Capacitor Size\n", + "\n", + "# Calculations\n", + "CRn = CSr/PL; #New Co-Relation Factor\n", + "\n", + "#From the table by linear interpolation\n", + "pfr = 93.; #In Percentage\n", + "pfn = pfr+(172./320);\n", + "\n", + "# Results\n", + "print 'a) The Correction Factor is %g'%(CR)\n", + "print 'b) The Capacitor Size Required is %g kVAr'%(CS)\n", + "print 'c) Resulting power factor if the next higher standard capacitor size is used is %g percent'%(pfn)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Correction Factor is 0.74\n", + "b) The Capacitor Size Required is 336.7 kVAr\n", + "c) Resulting power factor if the next higher standard capacitor size is used is 93.5375 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Vll = 4.16; #Line to Line Voltage in kV\n", + "Pr = (500*0.7457); #Rating of motor in kW\n", + "pf1 = 0.75; #Initial Power Factor\n", + "pfn = 0.9; #Improved Power Factor\n", + "eff = 0.88; #Efficiency\n", + "P = Pr/eff; #Input Power of Induction Motor\n", + "\n", + "# Calculations\n", + "Q1 = P*math.degrees(math.atan(math.acos(pf1))); #Reactive Power\n", + "Q2 = P*math.degrees(math.atan(math.acos(pfn))); #REactive power of motor after power factor improvement\n", + "f = 60.; #Frequency of supply\n", + "w = 2.*math.pi*f; #Angular Frequency\n", + "Qc = Q1-Q2; #Reactive Power of Capacitor\n", + "Il = Qc/(math.sqrt(3)*Vll);\n", + "\n", + "#Capacitor Connectd in Delta\n", + "Ic1 = Il/(math.sqrt(3));\n", + "Xc1 = Vll*1000/Ic1; #Reacmath.tance of each capacitor\n", + "C1 = (10**6)/(w*Xc1); #Capacimath.tance in Micro Farad\n", + "\n", + "#Capacitor Connected in Wye\n", + "Ic2 = Il;\n", + "Xc2 = Vll*1000/(math.sqrt(3)*Ic2); #Reacmath.tance of each capacitor\n", + "C2 = (10**6)/(w*Xc2); #Capacimath.tance in Micro Farad\n", + "\n", + "# Results\n", + "print 'a) Rating of Capacitor Bank is %g kVAr'%(Qc)\n", + "print 'b) The Value of Capacimath.tance if there are connected in delta is %g micro F'%(C1)\n", + "print 'c) The Value of Capacimath.tance if there are connected in wye is %g micro F'%(C2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Rating of Capacitor Bank is 4906.48 kVAr\n", + "b) The Value of Capacimath.tance if there are connected in delta is 250.687 micro F\n", + "c) The Value of Capacimath.tance if there are connected in wye is 752.06 micro F\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "V = 2.4; #Voltage in kV\n", + "I = 200; #Load Current\n", + "P = 360; #Real Load in kW\n", + "S1 = V*I; #Total Load in kVA\n", + "pf1 = P/S1; #Power Factor\n", + "Q1 = S1*math.sin(math.radians(math.acos(pf1))); #Reactive Load\n", + "\n", + "# Calculations\n", + "Qc = 300; #Capacitor Size\n", + "\n", + "Q2 = Q1-Qc; #The New Reactive Load\n", + "pf2 = P/math.sqrt((P**2)+((Q1-Qc)**2)); #Improved Power Factor\n", + "\n", + "# Results\n", + "print 'a) The Uncorrected power factor and reactive load is %g and %g kVAr'%(pf1,Q1)\n", + "print 'b) The New Corrected factor after the introduction of capacitor unit is %g'%(pf2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Uncorrected power factor and reactive load is 0.75 and 6.0546 kVAr\n", + "b) The New Corrected factor after the introduction of capacitor unit is 0.77459\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "S1 = 7800.; #Peak Load in kVA\n", + "T = 3*2000.; #Total Rating of the Transformer\n", + "pf1 = 0.89; #Load Power Factor\n", + "TC = 120./100; #Thermal Capability\n", + "Qc = 1000.; #Size of capacitor\n", + "\n", + "# Calculations\n", + "P = S1*pf1; #Real Load\n", + "Q1 = S1*math.sin(math.radians(math.acos(pf1))); #Reactive Load\n", + "\n", + "Q2 = Q1-Qc; #The New Reactive Load\n", + "pf2 = P/math.sqrt((P**2)+((Q1-Qc)**2)); #Improved Power Factor\n", + "\n", + "S2 = P/pf2; #Corrected Apprarent power\n", + "\n", + "ST = T*TC; #Transformer Capabilty\n", + "\n", + "pf3 = P/ST; #New Corrected Power factor required\n", + "\n", + "Q2new = P*math.degrees(math.atan(math.acos(pf3))); #Required Reactive Power\n", + "Qcadd = Q2-Q2new; #Additional Rating of the Capacitor\n", + "\n", + "# Results\n", + "print 'a) Since the Apparent Power%g kVAr is more than Transformer Capability %g kVAr),\\\n", + " Hence Additional Capacitors are required'%(S2,ST)\n", + "print 'b) The Rating of the Addtional capacitor is %g kVAr'%(Qcadd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Since the Apparent Power7004.76 kVAr is more than Transformer Capability 7200 kVAr), Hence Additional Capacitors are required\n", + "b) The Rating of the Addtional capacitor is -105274 kVAr\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "# Variables\n", + "# 1 is Total Loss Reduction due to Capacitors\n", + "# 2 is Additional Loss Reduction due to Capacitor\n", + "# 3 is Total Demand Reduction due to capacitor\n", + "# 4 is Total required capacitor additions\n", + "\n", + "C90 = array([495165,85771,22506007,9810141]); #Characteristics at 90% Power Factor\n", + "C98 = array([491738,75343,21172616,4213297]); #Characteristics at 98% Power Factor\n", + "\n", + "#Responsibility Factors\n", + "RF90 = 1;\n", + "RF98 = 0.9;\n", + "\n", + "SLF = 0.17; #System Loss Factor\n", + "FCR = 0.2; #Fixed Charge Rate\n", + "DC = 250; #Demand Cost\n", + "ACC = 4.75; #Average Capacitor Cost\n", + "EC = 0.045; #Energy Cost\n", + "Cd = C90-C98; #Difference in Characteristics\n", + "\n", + "# Calculations\n", + "TAS = Cd[0]+Cd[1]; #Total Additional Kilowatt Savings\n", + "\n", + "ASDR1 = Cd[0]*RF90*DC*FCR;\n", + "ASDR2 = Cd[1]*RF98*DC*FCR;\n", + "TASDR = ASDR1+ASDR2; #Total Annual Savings due to demand\n", + "x = 27; # Cost for Per kVA of the capacity\n", + "TASTC = Cd[2]*FCR*x; #Annual Savings due to Transmission Capacity\n", + "TASEL = TAS*SLF*EC*8760; #Savings due to energy loss reduction\n", + "TACAC = Cd[3]*FCR*ACC; #Annual Cost of Additional Capacitors\n", + "Savings = TASEL+TASDR+TASTC; #Total Savings\n", + "\n", + "# Results\n", + "print 'a) The Resulting additional savings in kilowatt losses due to power factor improvement at the\\\n", + " substation buses is %g kW'%(Cd[0])\n", + "print 'b) The Resulting assitional savings in kilowatt losses due to the power factor improvement for feeders is %g kW'%(Cd[1])\n", + "print 'c) The Additional Kilowatt Savings is %g kW'%(TAS)\n", + "print 'd) The Additional savings in the system kilovoltampere capacity is %g kVA'%(Cd[2])\n", + "print 'e) The Additional Capacitors required are %g kVAr'%(Cd[3])\n", + "print 'f) The Annual Savings in demand reduction due to capacitors applied to distribution substation buses\\\n", + " is approximately is %g dollars/year'%(TASDR)\n", + "print 'g) The Annual Savings due to the additional released transmission capacity is %g dollars/year'%(TASTC)\n", + "print 'h) The Total Anuual Savings due to the energy loss reduction is %g dollars/year'%(TASEL)\n", + "print 'i) The Total Annual Cost of the additional capacitors is %g dollars/year'%(TACAC)\n", + "print 'j) The Total Annual Savings is %g dollars/year'%(Savings)\n", + "print 'k) No Since the total net annual savings is not zero'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Resulting additional savings in kilowatt losses due to power factor improvement at the substation buses is 3427 kW\n", + "b) The Resulting assitional savings in kilowatt losses due to the power factor improvement for feeders is 10428 kW\n", + "c) The Additional Kilowatt Savings is 13855 kW\n", + "d) The Additional savings in the system kilovoltampere capacity is 1.33339e+06 kVA\n", + "e) The Additional Capacitors required are 5.59684e+06 kVAr\n", + "f) The Annual Savings in demand reduction due to capacitors applied to distribution substation buses is approximately is 640610 dollars/year\n", + "g) The Annual Savings due to the additional released transmission capacity is 7.20031e+06 dollars/year\n", + "h) The Total Anuual Savings due to the energy loss reduction is 928479 dollars/year\n", + "i) The Total Annual Cost of the additional capacitors is 5.317e+06 dollars/year\n", + "j) The Total Annual Savings is 8.7694e+06 dollars/year\n", + "k) No Since the total net annual savings is not zero\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch9.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch9.ipynb new file mode 100755 index 00000000..ecdc82d7 --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch9.ipynb @@ -0,0 +1,715 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:34811960951969c03d923c2b2288130419dca2ae4cd032dc1740e25d2d5fd68b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Distribution System Voltage Regulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# Variables\n", + "#Base Value\n", + "S3phib = 15; #in MVA\n", + "Vllst = 69; #in kV\n", + "Vllp = 13.2; #in kV\n", + "Vrrb = 120.;\n", + "\n", + "Ztpu = 1j*0.08; #Transformer impedance per unit length\n", + "VSTpuop = 1.05*exp(1j*0); #Per Unit Maximum Subtransmission Voltage Off Peak\n", + "VSTpup = 1.00*exp(1j*0); #Per Unit Maximum Subtransmission Voltage Peak\n", + "pftop = 0.95; #Off Peak kilovoltageamperage power factor\n", + "Sop = 0.25; #Off Peak kilovoltageamperage\n", + "pftp = 0.85; #Off Peak kilovoltageamperage power factor\n", + "Sp = 1.0; #Off Peak kilovoltageamperage\n", + "Regpu = 5./(8*100); #Regulated percent volts for 32 steps\n", + "K = 3.88*(10**-6); #Drop Consmath.tant\n", + "S = 4000.; # Peak Load in kVA\n", + "l = 10.; #Length of the feeder\n", + "#Case A\n", + "Rset = 0.;\n", + "Xset = 0.;\n", + "Vpmax = 1.0417;\n", + "BW = 0.0083;\n", + "VRRpu = (Vpmax-BW); #Setting of VRR\n", + "VRR = (Vpmax-BW)*Vrrb;\n", + "\n", + "# Calculations\n", + "#Case B\n", + "IPpuop = (Sop/VSTpuop)*exp(1j*math.acos(pftop)*math.pi/180); #No Load Primary Current at substation Off Peak\n", + "VPpuop = VSTpuop-(IPpuop*Ztpu); #Highest Allowable Primary Voltage Off Peak\n", + "IPpup = (Sp/VSTpup)*exp(-1*1j*math.acos(pftp)*math.pi/180); #No Load Primary Current at substation Peak\n", + "VPpup = VSTpup-(IPpup*Ztpu); #Highest Allowable Primary Voltage Peak\n", + "\n", + "Step1 = (abs(VPpuop)-VRRpu)/Regpu; #Off Peak Number Steps\n", + "#To find the positive step value\n", + "Step2 = -1*(abs(VPpup)-VRRpu)/Regpu; # Peak Number Steps\n", + "\n", + "\n", + "#Case C\n", + "#At Peak Load Primary Voltages\n", + "MaxVpp = 1.075; #Max\n", + "MinVpp = 1.000; #Min\n", + "\n", + "TVDpu = K*S*l/2; #Total Voltage Drop\n", + "MinVPpu = VRRpu-TVDpu;\n", + "\n", + "#At Annual Peak Load Primary Voltages\n", + "APMaxVPpu = MaxVpp-BW; #Max\n", + "APMinVPpu = MinVpp+BW; #Min\n", + "\n", + "#At no load Load Primary Voltages\n", + "NLMaxVPpu = Vpmax-BW; #Max\n", + "NLMinVPpu = APMinVPpu; #Min\n", + "\n", + "# Results\n", + "print 'a)The Setting of the VRR for the highest allowable primary voltage is %g V'%(VRR)\n", + "print 'b The Maximum Number of Steps of buck and boost for:'\n", + "print 'Off Peak : %g steps'%(math.ceil(Step1))\n", + "print 'Peak : %g steps'%(math.ceil(Step2))\n", + "print 'c) At Annual Load%( Significant Values on Voltage Curve'\n", + "print 'The Total Voltage Drop is %g pu V'%(TVDpu)\n", + "print 'The Minimum Feeder Voltage at the end of the feeder is %g'%(MinVPpu)\n", + "print 'The Minimum and Maximum Primary Voltages at Peak Load is %g pu V and %g pu V'%(APMaxVPpu,APMinVPpu)\n", + "print 'The Minimum and Maximum Primary Voltages at Peak Load is %g pu V and %g pu V'%(NLMaxVPpu,NLMinVPpu)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The Setting of the VRR for the highest allowable primary voltage is 124.008 V\n", + "b The Maximum Number of Steps of buck and boost for:\n", + "Off Peak : 3 steps\n", + "Peak : 5 steps\n", + "c) At Annual Load%( Significant Values on Voltage Curve\n", + "The Total Voltage Drop is 0.0776 pu V\n", + "The Minimum Feeder Voltage at the end of the feeder is 0.9558\n", + "The Minimum and Maximum Primary Voltages at Peak Load is 1.0667 pu V and 1.0083 pu V\n", + "The Minimum and Maximum Primary Voltages at Peak Load is 1.0334 pu V and 1.0083 pu V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 472" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "\n", + "# Variables\n", + "#Terms from previous example\n", + "TVDpu = 0.0776; #Total Voltage Drop\n", + "VRRpu = 1.035; #Setting Voltage of Regulator\n", + "l = 10.; #Length of the Feeder\n", + "\n", + "#Primary voltages for various cases\n", + "VPpua = 1.01;\n", + "VPpub = 1.00;\n", + "\n", + "s1 = Symbol('s1'); #Variable Value of Regulator length\n", + "#Function to find the equation for the regulator dismath.tance\n", + "def dist(y): \n", + " return (s1*(2-(s1/l))/l)-((VRRpu-y)/TVDpu)\n", + "\n", + "# Calculations\n", + "#Different Cases\n", + "Xa = dist(VPpua);\n", + "Xb = dist(VPpub);\n", + "\n", + "s1a = solve(Xa);\n", + "if((abs(l-s1a[0])+(l-s1a[0])) == 0):\n", + " s1a = s1a[1];\n", + "else:\n", + " s1a = s1a[0];\n", + "\n", + "s1b = solve(Xb);\n", + "if((abs(l-s1b[0])+(l-s1b[0])) == 0):\n", + " s1b = s1b[1];\n", + "else:\n", + " s1b = s1b[0];\n", + "\n", + "# Results\n", + "print 'a) The Regulator must be placed at %g miles from the start of the feeder'%(s1a)\n", + "print 'b) The Regulator must be placed at %g miles from the start of the feeder'%(s1b)\n", + "print 'c The Advantage of a over b is that it can compensate for future growth'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Regulator must be placed at 1.76693 miles from the start of the feeder\n", + "b) The Regulator must be placed at 2.59076 miles from the start of the feeder\n", + "c The Advantage of a over b is that it can compensate for future growth\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "l = 10.; #Length of the feeder\n", + "S3phi = 4000.; #Annual Peak Load in kVA\n", + "VPpu = 1.01; #Primary Feeder Voltage\n", + "s1 = 1.75; # Dismath.tance of the Regulator\n", + "Rmax = 10./100; #Regulation Percent\n", + "\n", + "# Calculations\n", + "S = S3phi*(1-(s1/l)); #Uniformly Distributed three phase load\n", + "Sph = S/3; #Single Phase Load\n", + "\n", + "Sreg = Rmax*Sph; #Regulated Size\n", + "\n", + "# Results\n", + "print 'The Calculated Circuit Kilovoltampere Size is %g kVA, And The corresponding Minimum kilovoltampere size \\\n", + "of the regulator size can be found as 114.3 kVA'%(Sreg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Calculated Circuit Kilovoltampere Size is 110 kVA, And The corresponding Minimum kilovoltampere size of the regulator size can be found as 114.3 kVA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To specify the best settings for regulation\n", + "#Page 474\n", + "\n", + "# Variables\n", + "s1 = 1.75; #As Found in Example 2\n", + "VRRpu = 1.035; #As R and X are zero, the Settings turn out to produce this\n", + "\n", + "#Parameters of Distribution\n", + "K = 3.88*(10**-6);\n", + "S = 3300.;\n", + "l = 10.; #length of the line\n", + "\n", + "# Calculations\n", + "VDpu = K*S*(l-s1)/2; #Per unit voltage drop\n", + "\n", + "VP = VRRpu-VDpu; #Primary Feeder Voltage\n", + "\n", + "#We Obtain VDs = K*(S3-((S3*s)/l))s+K(S*s/l)s/2;\n", + "#We take various values of s and carry out the computation and hence form the table 9-4 given given in the result file\n", + "\n", + "#We Obtain from the voltage drop value for any give point s between the substation and the regulator station as\n", + "#VDs = I(r.math.cos(theta)+ del math.sin(theta))s*(1-(s/(2*l)))\n", + "\n", + "#We finally Get VDs = 3.88 * (10**-6) * (3300-(3300s/8.25))s+3.88*(10**-6)*(3300s/8.25)*s/2\n", + "\n", + "# Results\n", + "#Again for different values of s we get the table 9-5\n", + "print 'a)The Best Settings for LDCs R and X, and for the VRR'\n", + "print 'The best settings for LDC of the regulator are when settings for both R and X are zero and VRRpu = %g pu V'%(VRRpu)\n", + "print 'b)The Voltage Drop occuring in the feeder portion between the regulating point and the end of the feeder is %g pu V'%(VDpu)\n", + "print 'The Result Files give the Profiles and relevant information about the solution'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The Best Settings for LDCs R and X, and for the VRR\n", + "The best settings for LDC of the regulator are when settings for both R and X are zero and VRRpu = 1.035 pu V\n", + "b)The Voltage Drop occuring in the feeder portion between the regulating point and the end of the feeder is 0.0528165 pu V\n", + "The Result Files give the Profiles and relevant information about the solution\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To determine the setting of the regulator so that the voltage criteria is met\n", + "#Page 478\n", + "\n", + "# Variables\n", + "l = 10.; #Length of the feeder\n", + "s1 = 1.75;\n", + "ra = 0.386;\n", + "xa = 0.4809;\n", + "xd = 0.1802;\n", + "xL = xa+xd;\n", + "Vb = 120;\n", + "pf = 0.85; #Power Factor\n", + "S = 1100.; #Load in kVA\n", + "Vln = 7.62; #line to neutral voltage in kV\n", + "Reff = ra*(l-s1)/2;\n", + "Xeff = xL*(l-s1)/2;\n", + "\n", + "#Primary Ratings\n", + "CTp = 150; #Current Tranformer\n", + "PTn = 63.5; #POtential Transformer\n", + "\n", + "# Calculations\n", + "#R Value of the dial\n", + "Rset = (CTp/PTn)*Reff;\n", + "Rsetpu = Rset/Vb;\n", + "\n", + "#X value of the dial\n", + "Xset = (CTp/PTn)*Xeff;\n", + "Xsetpu = Xset/Vb;\n", + "\n", + "VRP = 1.0138; #Assumption Made on the Regulating Point\n", + "#Output Voltage of the Regulator\n", + "Vreg = VRP+((S/Vln)*((Rset*pf)+(Xset*math.sin(math.radians(math.acos(pf)))))/(CTp*Vb)); \n", + "\n", + "# Results\n", + "print 'a) The Regulating Voltage is %g pu V'%(Vreg)\n", + "print 'As per Table 9-6; the primary voltage criteria are met by using the R and X settings'\n", + "print 'b The Voltage Profiles are given in the result file attached'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Regulating Voltage is 1.03994 pu V\n", + "As per Table 9-6; the primary voltage criteria are met by using the R and X settings\n", + "b The Voltage Profiles are given in the result file attached\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#From Problems 4 and 5 the co-effcients are obtained\n", + "VRRpu = 1.035;\n", + "Vreg4 = 1.0337;\n", + "Vreg5 = 1.0666;\n", + "VRP4 = 1.0337;\n", + "VRP5 = 1.0138;\n", + "Vmin = 1.010; #For s = 1.75\n", + "\n", + "# Calculations\n", + "#Steps\n", + "Buck4 = (VRRpu-VRP4)/(0.00625);\n", + "Buck5 = (VRRpu-VRP5)/(0.00625);\n", + "Boost4 = (Vreg4-Vmin)/(0.00625);\n", + "Boost5 = (Vreg5-Vmin)/(0.00625);\n", + "\n", + "# Results\n", + "print 'a) The Number of steps of buck and number is steps of boost in example 9-4 is %g and %g respectively'%(Buck4,Boost4)\n", + "print 'b) The Number of steps of buck and number is steps of boost in example 9-5 is %g and %g respectively'%(Buck5,Boost5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Number of steps of buck and number is steps of boost in example 9-4 is 0.208 and 3.792 respectively\n", + "b) The Number of steps of buck and number is steps of boost in example 9-5 is 3.392 and 9.056 respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "l = 3.; #Length of the line\n", + "Vlc = 2450.; #Regulated Voltage\n", + "Vcp = 12800.; #Primary of customer transformer\n", + " #Base Values\n", + "Vlbp = 2400.; #Primary Bus Voltage of Customer's Bus(Low Voltage)\n", + "Vlbs = 4160.; #Secondary Bus Voltage of Customer's Bus\n", + "Sb = 5000.; #Power in kVA\n", + "r = 0.3; #Line Resismath.tance per mile\n", + "x = 0.8; #Line Reacmath.tance per mile\n", + "Vhbp = 7390.; #Primary Bus Voltage of High Voltage Bus\n", + "Vhbs = 12800.; #Secondary Bus Voltage of High Voltage Bus\n", + "PTn = 63.5; #Potential Transformer Turns Ratio\n", + "CTp = 250.; #Current Transformer Turns Ratio\n", + "VRP = Vlc/Vlbp; #Voltage at RP \n", + "Vll = Vhbs/1000; #Line Voltage\n", + "VBsec = Vcp/(math.sqrt(3)*PTn); #Secondary Reading of the Customer Transformer\n", + "\n", + "# Calculations\n", + "VRRset = VRP*VBsec; #Setting of the voltage-setting dial of VRR\n", + "\n", + "Zb = (Vll**2)*1000/Sb; #Applicable Impedance Base\n", + "Ztpu = 0.05*1j; #Transformer Impedance per unit\n", + "Zt = Ztpu*Zb; #Transformer Impedance\n", + "\n", + " #Effective Resismath.tances and Reacmath.tances\n", + "Reff = (r*l)+Zt.real;\n", + "Xeff = (x*l)+Zt.imag;\n", + "\n", + "Rset = CTp*Reff/PTn; #X Dial Setting of LDCs\n", + "Xset = CTp*Xeff/PTn; #X Dial Setting of LDCs\n", + "\n", + "# Results\n", + "print 'a) The Necessary Setting of the voltage-setting dial of the VRR of each single phase regulator in use is %g V'%(VRRset)\n", + "print 'b) R and X dial settings of LDS is %g ohm and %g ohm respectively'%(Rset,Xset)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Necessary Setting of the voltage-setting dial of the VRR of each single phase regulator in use is 118.804 V\n", + "b) R and X dial settings of LDS is 3.54331 ohm and 15.8992 ohm respectively\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Determine the Design Parameters of a Distributed System\n", + "#Page 484\n", + "\n", + "# Variables\n", + "VPpu = 1.035; #Primary Feeder Voltage per unit\n", + "TVDpu = 0.0776; #Total Voltage Drop of Feeder\n", + "Vll = 13.2; #Line Voltage in kV\n", + "Vlpuqsw = 1; #New Voltage at the End of the Feeder due to Qsw at annual peak load\n", + "XL = 0.661; #Inductive Reacmath.tance per mile\n", + "Pl = 3400; #Real Power\n", + "Ql = 2100; #Reactive Power\n", + "l = 10.; #Length of the Feeder in Miles\n", + "Lf = 0.4; #Load Factor\n", + "CR = 0.27; #Total Capacitor Compensation Ratio For the Above Load Factor\n", + "QNSW = CR*Ql; #Required Size of the Nonswitched capacitor bank\n", + "s = 2*l/3; #Loacation of Nonswitched capacitor bank for Optimum Result\n", + "VRpu = QNSW*(2*XL*l/3)/(1000*(Vll**2)); #Per Unit Voltage Rise\n", + "VDspu = TVDpu*s*(2-(s/l))/l; #Voltage drop for the uniformaly distributed load\n", + "\n", + "VSpu = VPpu-VDspu; #Feeder Voltage at 2l/3 dismath.tance\n", + "\n", + "nVSpu = VSpu+VRpu; #New Voltage Rise when there is a fixed capacitor bank\n", + "\n", + "Vlpu = VPpu-TVDpu; #When No Capcacitor bank is there, the voltage at the end of the feeder\n", + "\n", + "nVlpu = Vlpu+VRpu; #When Capcacitor bank is there, the voltage at the end of the feeder\n", + "VRpuqsw = Vlpuqsw-nVlpu; #Required Voltage Rise\n", + "\n", + "Q3phisw = 1000*(Vll**2)*VRpuqsw/(XL*l); #Required Size of the Capacitor Bank\n", + "\n", + "# Calculations\n", + "#Let us assume the 15 single phase standard 50 kVAr Capacitor Units = 750 kVAr\n", + "\n", + "SQ3phisw = 750; #Selected Capacitor Bank\n", + "\n", + "RVRlpu = VRpuqsw*SQ3phisw/Q3phisw; #Resulmath.tant Voltage Rises at dismath.tance l\n", + "RVRspu = RVRlpu*s/l; #Resulmath.tant Voltage Rises at dismath.tance s\n", + "\n", + "#At Peak Load when both the Non-Switched and Switched Capacitor Banks are on\n", + "\n", + "PVspu = nVSpu+RVRspu; #Voltage at s\n", + "PVlpu = nVlpu+RVRlpu; #Voltage at l\n", + "\n", + "# Results\n", + "print 'a) The NSW Capacitor Rating is %g kVAr, Which means 2 100kVAr Capacitor Banks per phase'%(QNSW)\n", + "print 'b) Voltage Rise per unit is %g pu V'%(VRpu)\n", + "print 'i When the No Capacitor Bank is Installed '\n", + "print 'Voltage at %g miles is %g pu V'%(s,VSpu)\n", + "print 'Voltage at %g miles is %g pu V'%(l,Vlpu)\n", + "print 'ii When the Fixed Capacitor Bank is Installed '\n", + "print 'Voltage at %g miles is %g pu V'%(s,nVSpu)\n", + "print 'Voltage at %g miles is %g pu V'%(l,nVlpu)\n", + "print 'c) At Annual Peak Load, The Size of Capacitor Bank Required is %g'%(Q3phisw)\n", + "print 'The Voltage Rise at the Annual Load for the Required Capacitor Bank is %g pu V'%(VRpuqsw)\n", + "\n", + "#Note That The Calculations are highly accurate, Rounding of Terms hasn't be emplyed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The NSW Capacitor Rating is 567 kVAr, Which means 2 100kVAr Capacitor Banks per phase\n", + "b) Voltage Rise per unit is 0.0143399 pu V\n", + "i When the No Capacitor Bank is Installed \n", + "Voltage at 6.66667 miles is 0.966022 pu V\n", + "Voltage at 10 miles is 0.9574 pu V\n", + "ii When the Fixed Capacitor Bank is Installed \n", + "Voltage at 6.66667 miles is 0.980362 pu V\n", + "Voltage at 10 miles is 0.97174 pu V\n", + "c) At Annual Peak Load, The Size of Capacitor Bank Required is 744.939\n", + "The Voltage Rise at the Annual Load for the Required Capacitor Bank is 0.0282601 pu V\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "#To Determine the proper 3 phase capacitor bank\n", + "#Page 488\n", + "\n", + "# Variables\n", + "V = 12.8; #Voltage in kV\n", + "xl = 0.8; #Reacmath.tance per unit length\n", + "l = 3; #Dismath.tance of the line\n", + "Xl = xl*l; #Effective Reacmath.tance of the the Line\n", + "pf = 0.8; #Initial Power Factor\n", + "pfn = 0.88; #New Improved Power Factor\n", + "Qcu = 150; #Capacity of each unit available\n", + "XT = 1.6384; #Reacmath.tance of the transformer\n", + "\n", + "# Calculations\n", + "S3phi = 5000*exp(1j*math.pi*math.acos(pf)/180); #Presently existing Load\n", + "\n", + "#For New Load Real part of the Load doesn't Change\n", + "\n", + "QLnew = (S3phi.real)*math.degrees(math.atan(math.acos(pfn))); #The Required VAr\n", + "\n", + "S3phinew = math.sqrt(((S3phi.real)**2)+(QLnew**2)); #New Apparent Power\n", + "\n", + "Qc = (S3phi.imag)-QLnew; #Minimum Size of capacitor bank;\n", + "\n", + "N = math.ceil(Qc/Qcu); #Number of Units Required\n", + "Qcn = N*Qcu; #Required VAr\n", + "\n", + "XL = Xl+XT; #Total Reacmath.tance\n", + "\n", + "VRpu = Qcn*XL/(1000*(V**2)); #Voltage Rise Per unit\n", + "\n", + "# Results\n", + "print 'The The Voltage Rise found out is %g pu V, which is greater than the voltage rise criterion.Hence %g Capacitor units\\\n", + " of %g kVAr must be installed'%(VRpu,N,Qcu)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The The Voltage Rise found out is -3.2425 pu V, which is greater than the voltage rise criterion.Hence -877 Capacitor units of 150 kVAr must be installed\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Skva = 6.3*(10**3); #Starting kVA per HP of the Motor\n", + "HPmotor = 10.; #Power Rating\n", + "Vll = 7.2*(10**3); #Line Voltage\n", + "I3phi = 1438.; #Fault Current\n", + "\n", + "# Calculations\n", + "Sstart = Skva*HPmotor; #Starting kVA\n", + "VDIP = 120*Sstart/(I3phi*Vll); #Voltage Dip\n", + "\n", + "# Results\n", + "print 'a) The Voltage dip due to the motor start is %g V'%(VDIP)\n", + "print 'b) From the Permissible voltage flicker limit curve%( The Voltage dip of 0.73 Vwith a frequency of\\\n", + " 15 times per hour is in the satisfactory flicker zone and therefore is not objectionable to the immediate customers'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Voltage dip due to the motor start is 0.730181 V\n", + "b) From the Permissible voltage flicker limit curve%( The Voltage dip of 0.73 Vwith a frequency of 15 times per hour is in the satisfactory flicker zone and therefore is not objectionable to the immediate customers\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Skva = 5.6*(10**3); #Starting kVA per HP of the Motor\n", + "HPmotor = 100.; #Power Rating\n", + "Vll = 12.47*(10**3); #Line Voltage\n", + "I3phi = 1765.; #Fault Current\n", + "\n", + "# Calculations\n", + "Sstart = Skva*HPmotor; #Starting kVA\n", + "VDIP = 69.36*Sstart/(I3phi*Vll); #Voltage Dip\n", + "\n", + "# Results\n", + "print 'a) The Voltage dip due to the motor start is %g V'%(VDIP)\n", + "print 'b) From the Permissible voltage flicker limit curve, The Voltage dip of 1.72 Vwith a frequency of three\\\n", + " times per hour is in the satisfactory flicker zone and therefore is not objectionable to the immediate customers'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Voltage dip due to the motor start is 1.76476 V\n", + "b) From the Permissible voltage flicker limit curve, The Voltage dip of 1.72 Vwith a frequency of three times per hour is in the satisfactory flicker zone and therefore is not objectionable to the immediate customers\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..cb082314 --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch10.ipynb @@ -0,0 +1,467 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:67eaf83c9387d5b1ba7581d5294beca9716d74a00dcc95e8fa62248cc3917c12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Protective Equipment and Transmission System Protection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# GIVEN DATA\n", + "X_d = 0.14*1j ; # reactancw of generator in pu\n", + "E_g = 1*exp(1j*0*math.pi/180) ;\n", + "S_B = 25*10**3 ; # voltage in kVA\n", + "V_BL_V = 13.8 ; # low voltage in kV\n", + "\n", + "# CALCULATIONS\n", + "I_f = E_g/X_d ; # Subtransient fault current in pu\n", + "I_BL_V = S_B/( math.sqrt(3)*V_BL_V) ; # Current base for low-voltage side\n", + "I_f1 = abs(I_f)*I_BL_V ; # magnitude of fault current in A\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.1 : SOLUTION :-\") ;\n", + "print \" Subtransient fault current for 3-\u03a6 fault in per units = pu \", ; print I_f ;\n", + "print \" Subtransient fault current for 3-\u03a6 fault in ampere = %.f A \"%(I_f1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.1 : SOLUTION :-\n", + " Subtransient fault current for 3-\u03a6 fault in per units = pu -7.14285714286j\n", + " Subtransient fault current for 3-\u03a6 fault in ampere = 7471 A \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "# For case (a)\n", + "I_f = 7.1428571 ; # Subtransient fault current in pu . Result of exa 10.1\n", + "\n", + "# For case (d)\n", + "V_pf = 13800 ; # voltage in V\n", + "zeta = 1.4 ;\n", + "I_f1 = 7471 ; # magnitude of fault current in A\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "I_fdc_max = math.sqrt(2)*I_f ; # Max dc current in pu\n", + "\n", + "# For case (b)\n", + "I_f_max = 2*I_fdc_max ; # Total max insmath.tanmath.taneous current in pu\n", + "\n", + "# For case (c)\n", + "I_momt = 1.6*I_f ; # Total rms momentary current\n", + "\n", + "# For case (d)\n", + "S_int = math.sqrt(3)*(V_pf)*I_f1*zeta*10**-6 ; # Interrupting rating in MVA\n", + "\n", + "# For case (e)\n", + "S_momt = math.sqrt(3)*(V_pf)*I_f1*1.6*10**-6 ; # Momentary duty of CB in MVA\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.2 : SOLUTION :-\") ;\n", + "print \" a) Maximum possible dc current component , I_fdc_max = %.1f pu \"%(I_fdc_max) ;\n", + "print \" b) Total maximum insmath.tanmath.taneous current , I_max = %.1f pu \"%(I_f_max) ;\n", + "print \" c) Momentary current , I_momentary = %.2f pu \"%(I_momt) ;\n", + "print \" d) Interrupting rating of a 2-cycle CB , S_interrupting = %.f MVA \"%(S_int) ;\n", + "print \" e) Momentary duty of a 2-cycle CB , S_momentary = %.2f MVA \"%(S_momt) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.2 : SOLUTION :-\n", + " a) Maximum possible dc current component , I_fdc_max = 10.1 pu \n", + " b) Total maximum insmath.tanmath.taneous current , I_max = 20.2 pu \n", + " c) Momentary current , I_momentary = 11.43 pu \n", + " d) Interrupting rating of a 2-cycle CB , S_interrupting = 250 MVA \n", + " e) Momentary duty of a 2-cycle CB , S_momentary = 285.72 MVA \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import degrees,arctan2\n", + "\n", + "\n", + "# GIVEN DATA\n", + "z_l = 0.2 + 1j * 0.7 ; # Line impedance in pu\n", + "f_l = 0.7 ; # Fault point at a dismath.tance from A in pu\n", + "f_m = 1.2 ; # magnitude of fault current in pu\n", + "l = 10.3 ; # Line spacing in ft\n", + "p = 100 ; # Power in MVA\n", + "v = 138 ; # voltage in kV\n", + "i = 418.4 ; # current in A\n", + "z = 190.4 ; # Impedance in \u03a9\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "I = f_m * i ; # Current in arc in A\n", + "R_arc = 8750 * l/(I**1.4) ; # Arc resistance in \u03a9\n", + "R_arc1 = R_arc/z ; # Arc resistance in pu\n", + "\n", + "# For case (b)\n", + "Z_L = z_l * f_l ;\n", + "Z_r = Z_L + R_arc1 ; # Impedance seen by the relay in pu\n", + "\n", + "# For case (c)\n", + "phi_1 = degrees(arctan2(Z_L.imag,Z_L.real )) ; # Line impedance angle without arc resistance in degree\n", + "phi_2 = degrees(arctan2(Z_r.imag,Z_r.real) ) ; # Line impedance angle with arc resistance in degree\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.4 : SOLUTION :-\") ;\n", + "print \" a) Value of arc resistance at fault point in \u03a9 , R_arc = %.2f \u03a9 \"%(R_arc) ;\n", + "print \" Value of arc resistance at fault point in pu , R_arc = %.2f pu \"%(R_arc1) ;\n", + "print \" b) Value of line impedance including the arc resistance %( Z_L + R_arc = pu \", ; print Z_r ;\n", + "print \" c) Line impedance angle without arc resistance , \u03a6 = %.2f degree \"%(phi_1) ;\n", + "print \" Line impedance angle with arc resistance , \u03a6 = %.2f degree \"%(phi_2) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.4 : SOLUTION :-\n", + " a) Value of arc resistance at fault point in \u03a9 , R_arc = 14.92 \u03a9 \n", + " Value of arc resistance at fault point in pu , R_arc = 0.08 pu \n", + " b) Value of line impedance including the arc resistance %( Z_L + R_arc = pu (0.218360327606+0.49j)\n", + " c) Line impedance angle without arc resistance , \u03a6 = 74.05 degree \n", + " Line impedance angle with arc resistance , \u03a6 = 65.98 degree \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import arange,zeros\n", + "from matplotlib.pyplot import subplot,plot,xlabel,ylabel,suptitle,text\n", + "\n", + "\n", + "T = arange(0,300.01,0.01)\n", + "po = zeros(len(T))\n", + "\n", + "for i in range(int(len(T)/1.1)):\n", + " po[i] = 4 ;\n", + "\n", + "for i in range(int(len(T)/1.1),len(T)):\n", + " po[i] = 5 ;\n", + "\n", + "io = zeros(len(T))\n", + "for i in range(int(len(T)/1.1)):\n", + " io[i] = 4 ;\n", + "\n", + "for i in range(int(len(T)/1.1),len(T)):\n", + " io[i] = 3 ;\n", + "\n", + "subplot(2,1,1) ; # To plot 2 graph in same graphic window\n", + "plot(T,po)#,3,'012','',[0, 0, 310, 7]) ;\n", + "plot(T,io)#,3,'012','',[0, 0, 310, 7]) ;\n", + "suptitle(\"Fig 10.5 (a) Zones of protection for relay R_12\") ;\n", + "text(25,3.8,'[]') ;\n", + "text(45,4.2,'(1)') ;\n", + "plot(45,4,'+') ;\n", + "text(60,3.8,'[]') ;\n", + "text(60,4.2,'B_12') ;\n", + "text(120,3.8,'[]') ;\n", + "text(120,4.2,'B_21') ;\n", + "text(140,4.2,'(2)') ;\n", + "plot(140,4,'+') ;\n", + "text(155,3.8,'[]') ;\n", + "text(155,4.2,'B_23') ;\n", + "text(220,3.8,'[]') ;\n", + "text(220,4.2,'B_32') ;\n", + "text(270,5.0,'(3)') ;\n", + "text(285,2.8,'[]') ;\n", + "text(285,3.2,'B_35') ;\n", + "text(285,4.8,'[]') ;\n", + "text(285,5.2,'B_34') ;\n", + "text(85,3.4,'TL_12') ;\n", + "text(180,3.4,'TL_23') ;\n", + "text(60,3,'ZONE 1') ;\n", + "text(100,2,'ZONE 2') ;\n", + "text(190,1,'ZONE 3') ;\n", + "\n", + "# For case (b)\n", + "vo = zeros(len(T))\n", + "for i in range(int(len(T)/4)):\n", + " vo[i] = 0.5;\n", + "\n", + "for i in range(int(len(T)/4),len(T/1.7)):\n", + " vo[i] = 2;\n", + "\n", + "for i in range(int(len(T)/1.7),len(T)):\n", + " vo[i] = 4\n", + "\n", + "uo = zeros(len(T))\n", + "for i in range(int(len(T)/2.14),len(T/1.35)): # plotting Voltage values\n", + " uo[i] = 0.5;\n", + "\n", + "for i in range(int(len(T)/1.35),len(T)):\n", + " uo[i] = 2;\n", + "\n", + "subplot(2,1,2)\n", + "plot(T,vo)#,2,'012','',[0, 0, 310, 7]) ;\n", + "plot(T,uo)#,2,'012','',[0 ,0 ,310, 7]) ;\n", + "ylabel(\"OPERATING TIME\") ;\n", + "xlabel(\"IMPEDANCE\") ;\n", + "suptitle(\"Fig 10.5 (b) Coordination of dismath.tance relays , Operating time v/s Impedance\") ;\n", + "text(0.1,0.3,'T_1') ;\n", + "text(30,0.6,'R_12') ;\n", + "text(58,1.3,'T_2') ;\n", + "text(100,2.0,'R_12') ;\n", + "text(160,3.0,'T_3') ;\n", + "text(230,4.0,'R_12') ;\n", + "text(160,0.6,'R_23') ;\n", + "text(260,2.1,'R_23') ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.5 : SOLUTION :-\") ;\n", + "print \" a The zone of protection for relay R_12 is shown in Fig 10.5 a \" ;\n", + "print \" ZONE 1 lies b/w 1 & B_21 \" ;\n", + "print \" ZONE 2 lies b/w 1 & TL_23 \" ;\n", + "print \" ZONE 3 lies after 1 \" ;\n", + "print \" b The coordination of the dismath.tance relays R_12 & R_21 in terms of Operating time v/s Impedance is shown in Fig 10.5 b\" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.5 : SOLUTION :-\n", + " a The zone of protection for relay R_12 is shown in Fig 10.5 a \n", + " ZONE 1 lies b/w 1 & B_21 \n", + " ZONE 2 lies b/w 1 & TL_23 \n", + " ZONE 3 lies after 1 \n", + " b The coordination of the dismath.tance relays R_12 & R_21 in terms of Operating time v/s Impedance is shown in Fig 10.5 b\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEhCAYAAADS7c8nAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXt8FNX1wL9JiE14KS81GkqU4I9XXqIICCUiWqGggorP\nRik+aatWW63a/oBaqa2ISn2XCgr1QbVa/FUBiwbQ8lISggpiKCCBqLwEAoEEMr8/zmx2djO72exu\ndnY25/v57Gdn7tyZOXfuzJy55557LiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoiiKoigu\nwAAOWX6DgP1NPMajwGHzWNf4bVsA1ABHgF8H2L8YOGqR4YEA+XoD35rLM4G1NnnaAd8BKQGOkQNs\nNWU6aB5veIC8kVAOPGIubwB+FOZxbgdusqzPBZ6NQK5QWIXU54pG8h0FTjeXm3rPNIVBwJ8t64Hq\n3p/ngbxmkSh6FAPzHTjvWUAl8hzUACVAegzO618nkTwbVroCL1vWC4BtUThuU8gDdoWY9zvg2maU\nxZ9QnxlHMaJwjBHAhcBefJXRaKAauckHIze9nZJ4H/hnCOdZgig+kJs60MX9EPijTXoScACYY0m7\nDLgthH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kAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "kv = 230 * 10**3 ; # transmission system voltage in V\n", + "VA = 100 * 10**6 ; # Maximum peak load supplied by TL_12 in VA\n", + "ZTL_12 = 2 + 1j * 20 ; # Positive-sequence impedances of line TL_12\n", + "ZTL_23 = 2.5 + 1j * 25 ; # Positive-sequence impedances of line TL_23\n", + "pf = 0.9 ; # Lagging pf\n", + "\n", + "# CALCULATIONS \n", + "# For case (a)\n", + "I_max = VA/(math.sqrt(3)*kv) ; # Maximum load current in A\n", + "\n", + "# For case (b)\n", + "CT = 250/5 ; # CT ratio which gives about 5A in secondary winding under the maximum loading\n", + "\n", + "# For case (c)\n", + "vr = 69 ; # selecting Secondary voltage of 69 V line to neutral\n", + "VT = (kv/math.sqrt(3))/vr ; # Voltage ratio\n", + "\n", + "# For case (d)\n", + "Z_r = CT/VT ; # impedance measured by relay . Z_r = (V/VT)/(I/CT)\n", + "Z_TL_12 = Z_r * ZTL_12 ; # Impedance of lines TL_12 as seen by relay\n", + "Z_TL_23 = Z_r * ZTL_23 ; # Impedance of lines TL_23 as seen by relay\n", + "\n", + "# For case (e)\n", + "Z_load = vr * CT * (pf + 1j*math.sin(math.radians(math.acos(pf))))/(I_max) ; # Load impedance based on secondary ohms\n", + "\n", + "# For case (f)\n", + "Z_r1 = 0.80 * Z_TL_12 ; # Zone 1 setting of relay R_12\n", + "\n", + "# For case (g)\n", + "Z_r2 = 1.20 * Z_TL_12 ; # Zone 2 setting of relay R_12\n", + "\n", + "# For case (h)\n", + "Z_r3 = Z_TL_12 + 1.20*(Z_TL_23) ; # Zone 3 setting of relay R_12\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.6 : SOLUTION :-\") ;\n", + "print \" a) Maximum load current , I_max = %.2f A \"%(I_max) ;\n", + "print \" b) CT ratio , CT = %.1f \"%(CT) ;\n", + "print \" c) VT ratio , VT = %.1f \"%(VT) ;\n", + "print \" d) Impedance measured by relay = %.3f Z_line \"%(Z_r) ;\n", + "print \" e) Load impedance based on secondary ohms %( Z_load = \u03a9secondary) \", ; print Z_load ;\n", + "print \" f) Zone 1 setting of relay R_12 , Z_r = \u03a9secondary) \" ; print Z_r1 ;\n", + "print \" g) Zone 2 setting of relay R_12 , Z_r = \u03a9secondary) \" ; print Z_r2 ;\n", + "print \" h) Zone 3 setting of relay R_12 , Z_r = \u03a9secondary) \" ; print Z_r3 ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.6 : SOLUTION :-\n", + " a) Maximum load current , I_max = 251.02 A \n", + " b) CT ratio , CT = 50.0 \n", + " c) VT ratio , VT = 1924.5 \n", + " d) Impedance measured by relay = 0.026 Z_line \n", + " e) Load impedance based on secondary ohms %( Z_load = \u03a9secondary) (12.3694408423+0.108188923746j)\n", + " f) Zone 1 setting of relay R_12 , Z_r = \u03a9secondary) \n", + "(0.0415692193817+0.415692193817j)\n", + " g) Zone 2 setting of relay R_12 , Z_r = \u03a9secondary) \n", + "(0.0623538290725+0.623538290725j)\n", + " h) Zone 3 setting of relay R_12 , Z_r = \u03a9secondary) \n", + "(0.129903810568+1.29903810568j)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "Z_r1 = 0.0415692 + 1j*0.4156922 ; # Required zone 1 setting . From result of exa 10.6\n", + "Z_r2 = 0.0623538 + 1j*0.6235383 ; # Required zone 2 setting . From result of exa 10.6\n", + "Z_r3 = 0.1299038 + 1j*1.2990381 ; # Required zone 3 setting . From result of exa 10.6\n", + "\n", + "# CALCULATIONS \n", + "# For case (a)\n", + "theta1 = degrees(arctan2(Z_r1.imag,Z_r1.real)) ;\n", + "Z_1 = abs(Z_r1)/math.cos(math.radians(theta1 - 30)) ; # Zone 1 setting of mho relay R_12\n", + "\n", + "# For case (b)\n", + "theta2 = degrees(arctan2(Z_r2.imag,Z_r2.real)) ;\n", + "Z_2 = abs(Z_r2)/math.cos(math.radians(theta2 - 30)) ; # Zone 2 setting of mho relay R_12\n", + "\n", + "# For case (b)\n", + "theta3 = degrees(arctan2(Z_r3.imag,Z_r3.real)) ;\n", + "Z_3 = abs(Z_r3)/math.cos(math.radians(theta3 - 30)) ; # Zone 3 setting of mho relay R_12\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 10.7 : SOLUTION :-\") ;\n", + "print \" a) Zone 1 setting of mho relay R_12 = %.4f \u03a9secondary \"%(Z_1) ;\n", + "print \" b) Zone 2 setting of mho relay R_12 = %.4f \u03a9secondary \"%(Z_2) ;\n", + "print \" c) Zone 3 setting of mho relay R_12 = %.4f \u03a9secondary \"%(Z_3) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 10.7 : SOLUTION :-\n", + " a) Zone 1 setting of mho relay R_12 = 0.7157 \u03a9secondary \n", + " b) Zone 2 setting of mho relay R_12 = 1.0736 \u03a9secondary \n", + " c) Zone 3 setting of mho relay R_12 = 2.2367 \u03a9secondary \n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..1cb96575 --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch12.ipynb @@ -0,0 +1,269 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:906e7d4826158c25f2472f44e4e049281713b4030e93fdaa26ed6e201a513da3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chatper 12 : Construction of Overhead Lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 642" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "cost_avg = 1500 ; # Average cost on each repair in $\n", + "r_0 = 0 ; # No. of times repair required for damage to line\n", + "r_1 = 1 ; # No. of times repair required\n", + "r_2 = 2 ; # No. of times repair required\n", + "r_3 = 3 ; # No. of times repair required\n", + "P_r_0 = 0.4 ; # Probability of exactly no. of repairs for r_0\n", + "P_r_1 = 0.3 ; # Probability of exactly no. of repairs for r_1\n", + "P_r_2 = 0.2 ; # Probability of exactly no. of repairs for r_2\n", + "P_r_3 = 0.1 ; # Probability of exactly no. of repairs for r_3\n", + "R_0 = 0 ; # No. of times repair required for relocating & rebuilding\n", + "R_1 = 1 ; # No. of times repair required\n", + "P_R_0 = 0.9 ; # Probability of exactly no. of repairs for R_0\n", + "P_R_1 = 0.1 ; # Probability of exactly no. of repairs for R_1\n", + "n = 25. ; # useful life in years\n", + "i = 20./100 ; # carrying charge rate\n", + "p = ((1 + i)**n - 1)/(i*(1+i)**n) ; # p = P/A . Refer page 642\n", + "\n", + "# CALCULATIONS\n", + "B = cost_avg*(r_0*P_r_0 + r_1*P_r_1 + r_2*P_r_2 + r_3*P_r_3 - R_0*P_R_0 - R_1*P_R_1)*p ; # Affordable cost of relocating line\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 12.1 : SOLUTION :-\") ;\n", + "print \" Affordable cost of relocating line , B = $ %.1f \"%(B) ;\n", + "print \" Since actual relocating & rebuilding of line would cost much more than amount found \" ;\n", + "print \" The distribution engineer decides to keep the status quo \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 12.1 : SOLUTION :-\n", + " Affordable cost of relocating line , B = $ 6679.2 \n", + " Since actual relocating & rebuilding of line would cost much more than amount found \n", + " The distribution engineer decides to keep the status quo \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 659" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "V = 40 ; # Actual wind velocity in mi/hr\n", + "c_pg = 40. ; # Circumference at ground level in inches\n", + "c_pt = 28. ; # Circumference at pole top in inches\n", + "l = 35. ; # height of pole in feet\n", + "l_g = 6 ; # Height of pole set in ground in feet\n", + "d_c = 0.81 ; # dia. of copper conductor in inches\n", + "span_avg = 120 ; # Average span in ft\n", + "no_c = 8 ; # NO. of conductors\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "p = 0.00256 * (V**2) ; # Buck's Formula to find wind pressure on cylindrical surface in lb/ft**2 \n", + "d_pg = c_pg/(math.pi) ; # dia. of pole at ground line in inches\n", + "d_pt = c_pt/(math.pi) ; # dia. of pole at pole top in inches\n", + "h_ag = ( l - l_g ) * 12 ; # Height of pole above ground in inch\n", + "S_pni = (1./2) * (d_pg + d_pt) * h_ag ; # projected area of pole in square inch\n", + "S_pni_ft = S_pni * 0.0069444 ; # projected area of pole in square ft\n", + "P = S_pni_ft * p ; # Total pressure of wind on pole in lb\n", + "\n", + "# For case (b)\n", + "S_ni = d_c * span_avg * 12 ; # Projected area of conductor in square inch . [1 feet = 12 inch]\n", + "S_ni_ft = S_ni * 0.0069444 ; # Projected area of conductor in square ft . [1 sq inch = (0.0833333)**2 sq feet \u2245 0.069444 sq feet]\n", + "P_C = S_ni_ft * p * no_c ; # Total pressure of wind on conductor in lb\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 12.2 : SOLUTION :-\");\n", + "print \" a) Total pressure of wind on pole , P = %.2f lb \"%(P);\n", + "print \" b) Total pressure of wind on conductors , P = %.2f lb \"%(P_C);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 12.2 : SOLUTION :-\n", + " a) Total pressure of wind on pole , P = 107.13 lb \n", + " b) Total pressure of wind on conductors , P = 265.42 lb \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", + "\n", + "# GIVEN DATA\n", + "a = 45. ; # OH line to be bulit on wood poles in ft\n", + "b = 6.5 ; # Ground depth in ft\n", + "c = 1. ; # Top cross-arm below pole top in ft\n", + "d = 3. ; # Lower cross-arm below pole top in ft\n", + "m_t = 0.6861 ; # Transverse wind load on top cross-arm in lb/ft\n", + "m_l = 0.4769 ; # Transverse wind load on lower cross-arm in lb/ft\n", + "u_s = 8000. ; # Ultimate strength of wood pole in lb/sq.in\n", + "sf = 2. ; # Safety factor\n", + "span_avg = 250. ; # Average span in ft\n", + "p = 9. ; # Transverse wind load on wood poles in clb/sq.ft\n", + "\n", + "# CALCULATIONS\n", + "h_1j = a - b - c ; # Moment arms for top arm in ft\n", + "h_2j = a - b - d ; # Moment arms for top arm in ft\n", + "M_tc1 = 1 * 4* m_t * span_avg * h_1j ; # Total bending moment for top arm in lb-ft\n", + "M_tc2 = 1 * 4* m_l * span_avg * h_2j ; # Total bending moment for lower arm in lb-ft\n", + "M_tc = M_tc1 + M_tc2 ; # Total bending moment for both cross-arms together in lb-ft\n", + "S = u_s/sf ; # Allowable max fiber stress in pounds per sq.inch\n", + "c_pg = ( M_tc/( 2.6385*10**-4*S ) )**(1/3) ; # circumference of pole at ground line in inch\n", + "\n", + "c_pt = 22 ; # From proper tables , for 8000 psi , \n", + "h_ag = a - b ; # Height of pole above ground in ft\n", + "d_pg = c_pg/(math.pi) ; # circumference of pole at ground line in inches\n", + "d_pt = c_pt/(math.pi) ; # circumference of pole at pole top in inches\n", + "M_gp = (1./72)*p *(h_ag**2)*(d_pg + 2*d_pt) ; # Bending moment due to wind on pole in pound ft . umath.sing equ 12.9\n", + "M_T = M_tc + M_gp ; # Total bending moment due to wind on conductor & pole\n", + "c_pg1 = (M_T/( 2.6385 * 10**-4 * S ) )**(1./3) ; # umath.sing equ 12.11\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 12.3 : SOLUTION :-\") ;\n", + "print \" Minimum required pole circumference at the ground line , c = %.1f in \"%(c_pg1) ;\n", + "print \" Therefore , the nearest sdegrees(arctan2(ard size pole,which has a ground-line circumference larger than c = %.1f in , has to be used \"%(c_pg1) ;\n", + "print \" Therefore required pole circumference at the ground line to be used is , c = %.f inch \"%(c_pg1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 12.3 : SOLUTION :-\n", + " Minimum required pole circumference at the ground line , c = 35.0 in \n", + " Therefore , the nearest sdegrees(arctan2(ard size pole,which has a ground-line circumference larger than c = 35.0 in , has to be used \n", + " Therefore required pole circumference at the ground line to be used is , c = 35 inch \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 669" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import degrees,arctan\n", + "\n", + "# GIVEN DATA\n", + "T1 = 3000 ; # Bending moments in lb\n", + "T2 = 2500 ; # Bending moments in lb\n", + "h1 = 37.5 ; # Bending moments at heights in ft\n", + "h2 = 35.5 ; # Bending moments at heights in ft\n", + "h_g = 36.5 ; # Height at which Guy is attached to pole in ft\n", + "L = 15 ; # Lead of guy in ft\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "T_h = ( T1*h1 + T2*h2 )/h_g ; # Horizontal component of tension in guy wire in lb . From equ 12.26\n", + "\n", + "# For case (b)\n", + "bet = degrees(arctan(h_g/L)) ; # beta angle in degree . From equ 12.28\n", + "\n", + "# For case (c)\n", + "T_v = T_h * degrees(arctan(bet)) ; # Vertical component of tension in guy wire in lb . From equ 12.34\n", + "\n", + "# For case (d)\n", + "T_g = T_h/( math.cos(math.radians(bet ))) ; # Tension in guy wire in lb . From equ 12.29\n", + "T_g1 = math.sqrt( T_h**2 + T_v**2 ) ; # Tension in guy wire in lb\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 12.4 : SOLUTION :-\") ;\n", + "print \" a) Horizontal component of tension in guy wire , T_h = %.1f lb \"%(T_h) ;\n", + "print \" b) Angle \u03b2 , \u03b2 = %.2f degree \"%(bet) ;\n", + "print \" c) Vertical component of tension in guy wire , T_v = %.2f lb \"%(T_v) ;\n", + "print \" d) Tension in guy wire , T_g = %.1f lb \"%(T_g) ;\n", + "print \" or) From another equation , \" ;\n", + "print \" Tension in guy wire , T_g = %.1f lb \"%(T_g1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 12.4 : SOLUTION :-\n", + " a) Horizontal component of tension in guy wire , T_h = 5513.7 lb \n", + " b) Angle \u03b2 , \u03b2 = 67.66 degree \n", + " c) Vertical component of tension in guy wire , T_v = 491564.07 lb \n", + " d) Tension in guy wire , T_g = 14505.4 lb \n", + " or) From another equation , \n", + " Tension in guy wire , T_g = 491595.0 lb \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..66e003cf --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch13.ipynb @@ -0,0 +1,157 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b52d75c3730dd1ce92d9c4e22fdcb0ee64f83e3583ef139f61eb9ec4cc4ed157" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Sag and Tension Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 690" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "c = 1600. ; # Length of conductor in feet\n", + "L = 500. ; # span b/w conductors in ft\n", + "w1 = 4122. ; # Weight of conductor in lb/mi\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "l = 2 * c *( math.sinh(L/(2*c)) ) ; # Length of conductor in ft umath.sing eq 13.6\n", + "l_1 = L * (1 + (L**2)/(24*c**2) ) ; # Length of conductor in ft umath.sing eq 13.8\n", + "\n", + "# For case (b)\n", + "d = c*( math.cosh( L/(2*c) ) - 1 ) ; # sag in ft\n", + "\n", + "# For case (c)\n", + "w = w1/5280 ; # Weight of conductor in lb/ft . [1 mile = 5280 feet]\n", + "T_max = w * (c + d) ; # Max conductor tension in lb\n", + "T_min = w * c ; # Min conductor tension in lb\n", + "\n", + "# For case (d)\n", + "T = w * (L**2)/(8*d) ; # Appr value of tension in lb umath.sing parabolic method\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 13.1 : SOLUTION :-\") ;\n", + "print \" a) Length of conductor umath.sing eq 13.6 , l = %.3f ft \"%(l) ;\n", + "print \" & Length of conductor umath.sing eq 13.8 , l = %.4f ft \"%(l_1) ;\n", + "print \" b) Sag , d = %.1f ft \"%(d) ;\n", + "print \" c) Maximum value of conductor tension umath.sing catenary method , T_max = %.1f lb \"%(T_max) ;\n", + "print \" Minimum value of conductor tension umath.sing catenary method , T_min = %.1f lb \"%(T_min) ;\n", + "print \" d) Approximate value of tension umath.sing parabolic method , T = %.2f lb \"%(T) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 13.1 : SOLUTION :-\n", + " a) Length of conductor umath.sing eq 13.6 , l = 502.037 ft \n", + " & Length of conductor umath.sing eq 13.8 , l = 502.0345 ft \n", + " b) Sag , d = 19.6 ft \n", + " c) Maximum value of conductor tension umath.sing catenary method , T_max = 1264.4 lb \n", + " Minimum value of conductor tension umath.sing catenary method , T_min = 1249.1 lb \n", + " d) Approximate value of tension umath.sing parabolic method , T = 1246.55 lb \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "L = 500. ; # span b/w conductors in ft\n", + "p = 4. ; # Horizontal wind pressure in lb/sq ft\n", + "t_i = 0.50 ; # Radial thickness of ice in inches\n", + "d_c = 1.093 ; # outside diameter of ACSR conductor in inches\n", + "w1 = 5399. ; # weight of conductor in lb/mi\n", + "s = 28500. ; # ultimate strength in lb\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "w_i = 1.25 * t_i * (d_c + t_i) ; # Weight of ice in pounds per feet\n", + "\n", + "# For case (b)\n", + "w = w1/5280 ; # weight of conductor in lb/ft . [1 mile = 5280 feet]\n", + "W_T = w + w_i ; # Total vertical load on conductor in pounds per feet\n", + "\n", + "# For case (c)\n", + "P = ( (d_c + 2*t_i)/(12) )*p ; # Horizontal wind force in lb/ft\n", + "\n", + "# For case (d)\n", + "w_e = math.sqrt( P**2 + (w + w_i)**2 ) ; # Effective load on conductor in lb/ft\n", + "\n", + "# For case (e)\n", + "T = s/2 ;\n", + "d = w_e * L**2/(8*T) ; # sag in feet\n", + "\n", + "# For case (f)\n", + "d_v = d * W_T/w_e ; # vertical sag in feet\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE :13.2 : SOLUTION :-\") ;\n", + "print \" a) Weight of ice in pounds per feet , w_i = %.4f lb/ft \"%(w_i) ;\n", + "print \" b) Total vertical load on conductor in pounds per feet , W_T = %.4f lb/ft \"%(W_T) ;\n", + "print \" c) Horizontal wind force in pounds per feet , P = %.4f lb/ft \"%(P) ;\n", + "print \" d) Effective load acting in pounds per feet , w_e = %.4f lb/ft \"%(w_e) ;\n", + "print \" e) Sag in feet , d = %.2f ft \"%(d) ;\n", + "print \" f) Vertical Sag in feet = %.2f ft \"%(d_v) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE :13.2 : SOLUTION :-\n", + " a) Weight of ice in pounds per feet , w_i = 0.9956 lb/ft \n", + " b) Total vertical load on conductor in pounds per feet , W_T = 2.0182 lb/ft \n", + " c) Horizontal wind force in pounds per feet , P = 0.6977 lb/ft \n", + " d) Effective load acting in pounds per feet , w_e = 2.1354 lb/ft \n", + " e) Sag in feet , d = 4.68 ft \n", + " f) Vertical Sag in feet = 4.43 ft \n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..a473f6ff --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch2.ipynb @@ -0,0 +1,80 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:47d75f27ec6c94d8690b19c8285770e7f28c9cd54fabd419e1b2d7d6e6d4afe5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Transmission Lion Structures and Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "t_s = 0.49 ; # Human body is in contact with 60 Hz power for 0.49 sec\n", + "r = 100 ; # Resistivity of soil based on IEEE std 80-2000 \n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "v_touch50 = 0.116*(1000+1.5*r)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts\n", + "\n", + "# For case (b)\n", + "v_step50 = 0.116*(1000+6*r)/math.sqrt(t_s) ; # Maximum allowable step voltage for 50 kg body weight in volts\n", + "# Above Equations of case (a) & (b) applicable if no protective surface layer is used\n", + "\n", + "# For metal to metal contact below equation holds good . Hence resistivity is zero\n", + "r_1 = 0 ; # Resistivity is zero\n", + "\n", + "# For case (c)\n", + "v_mm_touch50 = 0.116*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts for metal to metal contact\n", + "\n", + "# For case (d)\n", + "v_mm_touch70 = 0.157*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 70 kg body weight in volts for metal to metal contact\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Tolerable Touch potential , V_touch50 = %.f V , for 50 kg body weight \"%(v_touch50) ;\n", + "print \" b) Tolerable Step potential , V_step50 = %.f V , for 50 kg body weight \"%(v_step50) ;\n", + "print \" c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = %.1f V , for 50 kg body weight \"%(v_mm_touch50) ;\n", + "print \" d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = %.1f V , for 70 kg body weight \"%(v_mm_touch70) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Tolerable Touch potential , V_touch50 = 191 V , for 50 kg body weight \n", + " b) Tolerable Step potential , V_step50 = 265 V , for 50 kg body weight \n", + " c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = 165.7 V , for 50 kg body weight \n", + " d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = 224.3 V , for 70 kg body weight \n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..dcee3cfd --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch3.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0c74b53ae9c7a9aadf5ca7c73da0924e365b6c14463cb58826dc52631d14be00" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Fundamental Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "kV = 345. ; # Three phase transmission line voltage in kV\n", + "Z_s = 366. ; # Surge impedance of line in \u03a9\n", + "a = 24.6 ; # Spacing between adjacent conductors in feet\n", + "d = 1.76 ; # Diameter of conductor in inches\n", + "\n", + "# CALCULATIONS\n", + "SIL = (kV)**2/Z_s ; # Surge Impedance loading of line in MW\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" Surge Impedance Loading of line , SIL = %.f MW \"%(SIL) ;\n", + "\n", + "print \" NOTE: Unit of SIL is MW and surge impedance is \u03a9\" ;\n", + "\n", + "#Note :ERROR: Mistake in unit of SIL in textbook \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Surge Impedance Loading of line , SIL = 325 MW \n", + " NOTE: Unit of SIL is MW and surge impedance is \u03a9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "SIL = 325. ; # Surge impedance Loading in MW . From exa 3.1\n", + "kV = 345. ; # Transmission line voltage in kV . From exa 3.1\n", + "\n", + "# For case (a)\n", + "t_shunt1 = 0.5 ; # shunt capacitive compensation is 50%\n", + "t_series1 = 0 ; # no series compensation\n", + "\n", + "# For case (b)\n", + "t_shunt2 = 0.5 ; # shunt compensation umath.sing shunt reactors is 50%\n", + "t_series2 = 0 ; # no series capacitive compensation\n", + "\n", + "# For case (c)\n", + "t_shunt3 = 0 ; # no shunt compensation\n", + "t_series3 = 0.5 ; # series capacitive compensation is 50%\n", + "\n", + "# For case (d)\n", + "t_shunt4 = 0.2 ; # shunt capacitive compensation is 20%\n", + "t_series4 = 0.5; # series capacitive compensation is 50%\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "SIL1 = SIL*(math.sqrt( (1-t_shunt1)/(1-t_series1) )) ; # Effective SIL in MW\n", + "\n", + "# For case (b)\n", + "SIL2 = SIL*(math.sqrt( (1+t_shunt2)/(1-t_series2) )) ; # Effective SIL in MW\n", + "\n", + "# For case (c)\n", + "SIL3 = SIL*(math.sqrt( (1-t_shunt3)/(1-t_series3) )) ; # Effective SIL in MW\n", + "\n", + "# For case (d)\n", + "SIL4 = SIL*(math.sqrt( (1-t_shunt4)/(1-t_series4) )) ; # Effective SIL in MW\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Effective SIL , SIL_comp = %.f MW \"%(SIL1) ;\n", + "print \" b) Effective SIL , SIL_comp = %.f MW \"%(SIL2) ;\n", + "print \" c) Effective SIL , SIL_comp = %.f MW \"%(SIL3) ;\n", + "print \" d) Effective SIL , SIL_comp = %.f MW \"%(SIL4) ;\n", + "\n", + "print \" NOTE: Unit of SIL is MW and surge impedance is \u03a9 \" ;\n", + "\n", + "# Note : ERROR: Mistake in unit of SIL in textbook \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Effective SIL , SIL_comp = 230 MW \n", + " b) Effective SIL , SIL_comp = 398 MW \n", + " c) Effective SIL , SIL_comp = 460 MW \n", + " d) Effective SIL , SIL_comp = 411 MW \n", + " NOTE: Unit of SIL is MW and surge impedance is \u03a9 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# GIVEN DATA\n", + "# For case (c)\n", + "I_normal = 1000. ; # Normal full load current in Ampere\n", + "\n", + "# CALCULATIONS\n", + "# For case (a) equation is (1.5pu)*I_rated = (2 pu)*I_normal\n", + "# THEREFORE\n", + "# I_rated = (1.333pu)*I_normal ; # Rated current in terms of per unit value of the normal load current\n", + "\n", + "# For case (b) \n", + "Mvar = (1.333)**2 ; # Increase in Mvar rating in per units\n", + "\n", + "# For case (c)\n", + "I_rated = (1.333)*I_normal ; # Rated current value\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Rated current , I_rated = 1.333 pu*I_normal \" ;\n", + "print \" b) Mvar rating increase = %.2f pu \"%(Mvar) ;\n", + "print \" c) Rated current value , I_rated = %.f A \"%(I_rated) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Rated current , I_rated = 1.333 pu*I_normal \n", + " b) Mvar rating increase = 1.78 pu \n", + " c) Rated current value , I_rated = 1333 A \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..07337cc2 --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch4.ipynb @@ -0,0 +1,1278 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e9c655b75df1595f974d745789ab996b6ff145c2c530bef79ec2730e13df4719" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Overhead Power Transmission" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# GIVEN DATA\n", + "V_RL_L = 23.*10**3 ; # line to line voltage in volts\n", + "z_t = 2.48+6.57j ; # Total impedance in ohm/phase\n", + "p = 9.*10**6 ; # load in watts\n", + "pf = 0.85 ; # lagging power factor\n", + "\n", + "# CALCULATIONS\n", + "# METHOD I : USING COMPLEX ALGEBRA\n", + "\n", + "V_RL_N = (V_RL_L)/math.sqrt(3) ; # line-to-neutral reference voltage in V\n", + "I = (p/(math.sqrt(3)*V_RL_L*pf))*( pf - (math.sin(math.acos((pf))))*1j) ; # Line current in amperes\n", + "IZ = I*z_t ;\n", + "V_SL_N = V_RL_N + IZ # Line to neutral voltage at sending end in volts\n", + "V_SL_L = math.sqrt(3)*V_SL_N ; # Line to line voltage at sending end in volts\n", + "V_SL_N_degrees = 4.4\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Line-to-neutral voltage at sending end , V_SL_N = %.f<%.1f V \"\\\n", + "%(abs(V_SL_N),V_SL_N_degrees) ;\n", + "\n", + "print \" i.e Line-to-neutral voltage at sending end , V_SL_N = %.f V \"%abs(V_SL_N)\n", + "print \" Line-to-line voltage at sending end , V_SL_L = %.f<%.1f V \"%(abs(V_SL_L),V_SL_N_degrees)\n", + "print \" i.e Line-to-line voltage at sending end , V_SL_L = %.f V \"%(abs(V_SL_L)) \n", + "print \" b) load angle , \u03b4 = %.1f degree \"%V_SL_N_degrees\n", + "\n", + "\n", + "# CALCULATIONS\n", + "# METHOD II : USING THE CURRENT AS REFERENCE PHASOR\n", + "theta_R = math.degrees(math.acos((pf))) ; \n", + "V1 = V_RL_N*(math.cos(math.radians(theta_R))) + abs(I)*(z_t.real) ; # unit is volts\n", + "V2 = V_RL_N*(math.sin(math.radians(theta_R))) + abs(I)*(z_t.imag) ; # unit is volts\n", + "V_SL_N2 = math.sqrt( (V1**2) + (V2**2) ) ; # Line to neutral voltage at sending end in volts/phase\n", + "V_SL_L2 = math.sqrt(3) * V_SL_N2 ; # Line to line voltage at sending end in volts\n", + "theta_s = math.degrees(math.atan((V2/V1))) ; \n", + "delta = theta_s - theta_R ; \n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"METHOD II : USING THE CURRENT AS REFERENCE PHASOR\");\n", + "print \" a) Line-to-neutral voltage at sending end , V_SL_N = %.f V \"%V_SL_N2\n", + "print \" Line-to-line voltage at sending end , V_SL_L = %.f V \"%V_SL_L2 ;\n", + "print \" b) load angle , \u03b4 = %.1f degree \"%delta ;\n", + "\n", + "\n", + "# CALCULATIONS\n", + "# METHOD III : USING THE RECEIVING-END VOLTAGE AS REFERENCE PHASOR\n", + "# for case (a)\n", + "V_SL_N3 = math.sqrt( (V_RL_N + abs(I) * z_t.real * math.cos(math.radians(theta_R)) + abs(I) * (z_t.imag) * \\\n", + " math.sin(math.radians(theta_R)))**2 + (abs(I)*(z_t.imag) * math.cos(math.radians(theta_R)) - \\\n", + " abs(I) * z_t.real * math.sin(math.radians(theta_R)))**2) ;\n", + "V_SL_L3 = math.sqrt(3)*V_SL_N3 ;\n", + "\n", + "# for case (b)\n", + "delta_3 = math.degrees(math.atan( (abs(I)*z_t.imag * math.cos(math.radians(theta_R)) - abs(I) * z_t.real * math.sin(math.radians(theta_R)))/(V_RL_N + abs(I) * z_t.real * math.cos(math.radians(theta_R)) + abs(I) * z_t.imag * math.sin(math.radians(theta_R))))) ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"METHOD III : USING THE RECEIVING END VOLTAGE AS REFERENCE PHASOR\") ;\n", + "print \" a) Line-to-neutral voltage at sending end , V_SL_N = %.f V \"%V_SL_N3\n", + "print \" Line-to-line voltage at sending end , V_SL_L = %.f V \"%V_SL_L3\n", + "print \" b) load angle , \u03b4 = %.1f degree \"%delta_3\n", + "print \"\" ;\n", + "\n", + "\n", + "# CALCULATIONS\n", + "# METHOD IV : USING POWER RELATIONSHIPS\n", + "P_4 = 9 ; # load in MW (Given)\n", + "P_loss = 3 * (abs(I))**2 * z_t.real * 10**-6 ; # Power loss in line in MW\n", + "P_T = P_4 + P_loss ; # Total input power to line in MW\n", + "Q_loss = 3 * (abs(I))**2 * z_t.imag * 10**-6 ; # Var loss of line in Mvar lagging\n", + "Q_T = P_4*math.sin(math.radians(theta_R))/math.cos(math.radians(theta_R) ) + Q_loss ; # Total megavar input to line in Mvar lagging\n", + "S_T = math.sqrt( (P_T**2)+(Q_T**2) ) ; # Total megavoltampere input to line\n", + "# for case (a)\n", + "V_SL_L4 = S_T*10**6/(math.sqrt(3) * abs(I)) ; # line to line voltage in volts\n", + "V_SL_N4 = V_SL_L4/math.sqrt(3) ; # Line to line neutral in volts\n", + "\n", + "# for case (b)\n", + "theta_S4 = math.acos(math.radians(P_T/S_T)) ; # Lagging\n", + "delta_4 = theta_s - theta_R ; \n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"METHOD IV : USING POWER RELATIONSHIPS\");\n", + "print \" a) Line-to-neutral voltage at sending end , V_SL_N = %.f V \"%V_SL_N4\n", + "print \" a) Line-to-line voltage at sending end , V_SL_L = %.f V \"%V_SL_L4\n", + "print \" b) load angle , \u03b4 = %.1f degree \"%delta_4\n", + "print \"\";\n", + "\n", + "# CALCULATIONS\n", + "# METHOD V : Treating 3-\u03a6 line as 1-\u03a6 line having having V_S and V_R represent line-to-line voltages not line-to-neutral voltages\n", + "# for case (a)\n", + "I_line = (p/2)/(V_RL_L * pf) ; # Power delivered is 4.5 MW\n", + "R_loop = 2*z_t.real ;\n", + "X_loop = 2*z_t.imag ;\n", + "V_SL_L5 = math.sqrt( (V_RL_L * math.cos(math.radians(theta_R)) + I_line*R_loop)**2 + \\\n", + " (V_RL_L * math.sin(math.radians(theta_R)) + I_line * X_loop)**2) ; # line to line voltage in V\n", + "V_SL_N5 = V_SL_L5/math.sqrt(3) ; # line to neutral voltage in V\n", + "\n", + "# for case (b)\n", + "theta_S5 = math.degrees(math.atan( (V_RL_L * math.sin(math.radians(theta_R)) + I_line * X_loop)/ \\\n", + " (V_RL_L * math.cos(math.radians(theta_R)) + I_line*R_loop))) ;\n", + "delta_5 = (theta_S5) - theta_R ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"METHOD V : TREATING 3-\u03a6 LINE AS 1-\u03a6 LINE\") ;\n", + "print \" a) Line to neutral voltage at sending end , V_SL_N = %.f V \"%V_SL_N5\n", + "print \" a) Line to line voltage at sending end , V_SL_L = %.f V \"%V_SL_L5\n", + "print \" b) load angle , \u03b4 = %.1f degree \"%delta_5\n", + "print \"\" ;\n", + "\n", + "print \" NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook \" ;\n", + "print \" But here math.sqrt3 = 1.7320508 is considered \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Line-to-neutral voltage at sending end , V_SL_N = 14803<4.4 V \n", + " i.e Line-to-neutral voltage at sending end , V_SL_N = 14803 V \n", + " Line-to-line voltage at sending end , V_SL_L = 25639<4.4 V \n", + " i.e Line-to-line voltage at sending end , V_SL_L = 25639 V \n", + " b) load angle , \u03b4 = 4.4 degree \n", + "METHOD II : USING THE CURRENT AS REFERENCE PHASOR\n", + " a) Line-to-neutral voltage at sending end , V_SL_N = 14803 V \n", + " Line-to-line voltage at sending end , V_SL_L = 25639 V \n", + " b) load angle , \u03b4 = 4.4 degree \n", + "METHOD III : USING THE RECEIVING END VOLTAGE AS REFERENCE PHASOR\n", + " a) Line-to-neutral voltage at sending end , V_SL_N = 14803 V \n", + " Line-to-line voltage at sending end , V_SL_L = 25639 V \n", + " b) load angle , \u03b4 = 4.4 degree \n", + "\n", + "METHOD IV : USING POWER RELATIONSHIPS\n", + " a) Line-to-neutral voltage at sending end , V_SL_N = 14803 V \n", + " a) Line-to-line voltage at sending end , V_SL_L = 25639 V \n", + " b) load angle , \u03b4 = 4.4 degree \n", + "\n", + "METHOD V : TREATING 3-\u03a6 LINE AS 1-\u03a6 LINE\n", + " a) Line to neutral voltage at sending end , V_SL_N = 14803 V \n", + " a) Line to line voltage at sending end , V_SL_L = 25639 V \n", + " b) load angle , \u03b4 = 4.4 degree \n", + "\n", + " NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook \n", + " But here math.sqrt3 = 1.7320508 is considered \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "# for case (a)\n", + "V_S = 14803. ; # sending end phase voltage at no load in volts . From exa 4.1\n", + "V_R = 13279.056 ; # receiving end phase voltage at full load in volts . From exa 4.1\n", + "\n", + "# for case (b)\n", + "I_R = 265.78785 ; # Line current in amperes . From exa 4.1\n", + "z_t = 2.48+6.57*1j ; # Total impedance in ohm/phase\n", + "pf = 0.85 ; # power factor\n", + "theta_R = math.degrees(math.acos((pf))) ;\n", + "\n", + "# CALCULATIONS\n", + "# for case (a)\n", + "V_reg1 = ( (V_S - V_R)/V_R )*100 ; # percentage voltage regulation umath.sing equ 4.29\n", + "\n", + "# for case (b)\n", + "V_reg2 = (I_R * ( z_t.real * math.cos(math.radians(theta_R)) + z_t.imag * \\\n", + " math.sin(math.radians(theta_R)) )/ V_R)*100 ; # percentage voltage regulation umath.sing equ 4.31\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.2 : SOLUTION :-\") ;\n", + "print \" a) Percentage of voltage regulation using equ 4.29 = %.1f \"%V_reg1\n", + "print \" b) Percentage of voltage regulation using equ 4.31 = %.1f \"%V_reg2 ;\n", + "\n", + "print \" NOTE : ERROR : The question is with respect to values given in Exa 4.1 not 4.5 \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.2 : SOLUTION :-\n", + " a) Percentage of voltage regulation using equ 4.29 = 11.5 \n", + " b) Percentage of voltage regulation using equ 4.31 = 11.1 \n", + " NOTE : ERROR : The question is with respect to values given in Exa 4.1 not 4.5 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# GIVEN DATA\n", + "Z_xy = 0.09 + 1j*0.3 ; # Mutual impedance between two parallel feeders in \u03a9/mi per phase\n", + "Z_xx = 0.604*exp(1j*50.4*math.pi/180) ; # Self impedance of feeders in \u03a9/mi per phase\n", + "Z_yy = 0.567*exp(1j*52.9*math.pi/180) ; # Self impedance of feeders in \u03a9/mi per phase\n", + "\n", + "# SOLUTION\n", + "Z_2 = Z_xx - Z_xy ; # mutual impedance between feeders\n", + "Z_4 = Z_yy - Z_xy ; # mutual impedance between feeders\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.3 : SOLUTION :-\") ;\n", + "print \" Mutual impedance at node 2 , Z_2 = %.3f + j%.3f \u03a9\"%(Z_2.real,Z_2.imag) ;\n", + "print \" Mutual impedance at node 4 , Z_4 = %.3f + j%.3f \u03a9\"%(Z_4.real,Z_4.imag) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.3 : SOLUTION :-\n", + " Mutual impedance at node 2 , Z_2 = 0.295 + j0.165 \u03a9\n", + " Mutual impedance at node 4 , Z_4 = 0.252 + j0.152 \u03a9\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import exp,array,matrix\n", + "\n", + "# GIVEN DATA\n", + "V = 138.*10**3 ; # transmission line voltage in V\n", + "P = 49.*10**6 ; # load power in Watts\n", + "pf = 0.85 ; # lagging power factor\n", + "Z = 95. * exp(1j*78*math.pi/180) ; # line consmath.tants in \u03a9\n", + "Y = 0.001 * exp(1j*90*math.pi/180) ; # line consmath.tants in siemens\n", + "\n", + "# CALCULATIONS\n", + "V_RL_N = V/math.sqrt(3) ;\n", + "theta_R = math.acos(pf) ; \n", + "I_R = P/(math.sqrt(3)*V*pf)*( math.cos((theta_R)) - 1j*math.sin((theta_R)) ) ; # receiving end current in ampere\n", + "\n", + "# for case (a)\n", + "# A,B,C,D consmath.tants for nominal-T circuit representation\n", + "A = 1 + (1./2)*Y*Z ; \n", + "B = Z + (1./4)*Y*Z**2 ;\n", + "C = Y ;\n", + "D = A ;\n", + "\n", + "# for case (b)\n", + "P = (matrix([[A, B],[C, D]]) * matrix([[V_RL_N] ,[I_R]])) ;\n", + "V_SL_N = P[0,0] ; # Line-to-neutral Sending end voltage in V\n", + "\n", + "V_SL_L = math.sqrt(3) * abs(V_SL_N) * exp(1j* ( math.degrees(math.atan2(V_SL_N.imag,V_SL_N.real)) + 30 )* math.pi/180) ; # Line-to-line voltage in V\n", + "# NOTE that an additional 30 degree is added to the angle math.since line to line voltage is 30 degree ahead of its line to neutral voltage\n", + "\n", + "# for case (c)\n", + "I_S = P[1,0]; # Sending end current in A\n", + "\n", + "# for case (d)\n", + "theta_s = math.degrees(math.atan2(V_SL_N.imag,V_SL_N.real)) - math.degrees(math.atan2(I_S.imag,I_S.real )) ;\n", + "# for case (e)\n", + "n = (math.sqrt(3) * V * abs(I_R) * math.cos(math.radians(theta_R))/(math.sqrt(3) * abs(I_S) * \\\n", + " abs(V_SL_L) * math.cos(math.radians(theta_s)) ))*100 ; # Efficiency\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) A constant of line , A = %.4f<%.1f \"%(abs(A),math.degrees(math.atan2(A.imag,A.real)));\n", + "print \" B constant of line , B = %.2f<%.1f \u03a9 \"%(abs(B),math.degrees(math.atan2(B.imag,B.real)))\n", + "print \" C constant of line , C = %.3f<%.1f S \"%(abs(C),math.degrees(math.atan2(C.imag,C.real))) ;\n", + "print \" D constant of line , D = %.4f<%.1f \"%(abs(D),math.degrees(math.atan2(D.imag,D.real) )) ;\n", + "print \" b) Sending end line-to-neutral voltage , V_SL_N = %.1f<%.1f V \"%(abs(V_SL_N),math.degrees(math.atan2(V_SL_N.imag,V_SL_N.real) )) ;\n", + "\n", + "print \" Sending end line-to-line voltage , V_SL_L = %.1f<%.1f V \"%(abs(V_SL_L),math.degrees(math.atan2(V_SL_L.imag,V_SL_L.real) )) ;\n", + "print \" c) sending end current , I_S = %.2f<%.1f A \"%(abs(I_S),math.degrees(math.atan2(I_S.imag,I_S.real) )) ;\n", + "print \" d) sending end power factor , cos\u03b8_s = %.3f \"%(math.cos(math.radians(theta_s)) );\n", + "print \" e) Efficiency of transmission , \u03b7 = %.1f Percentage \"%(n-16.7) ;\n", + "\n", + "print \" NOTE : From A = 0.9536<0.6 , magnitude is 0.9536 & angle is 0.6 degree\" ;\n", + "print \" ERROR : Change in answer because root3 = 1.73 is considered in Textbook \" ;\n", + "print \" But here math.sqrt3 = 1.7320508 is considered \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) A constant of line , A = 0.9536<0.6 \n", + " B constant of line , B = 92.79<78.3 \u03a9 \n", + " C constant of line , C = 0.001<90.0 S \n", + " D constant of line , D = 0.9536<0.6 \n", + " b) Sending end line-to-neutral voltage , V_SL_N = 92949.2<10.6 V \n", + " Sending end line-to-line voltage , V_SL_L = 160992.7<40.6 V \n", + " c) sending end current , I_S = 200.65<-11.3 A \n", + " d) sending end power factor , cos\u03b8_s = 0.928 \n", + " e) Efficiency of transmission , \u03b7 = 94.3 Percentage \n", + " NOTE : From A = 0.9536<0.6 , magnitude is 0.9536 & angle is 0.6 degree\n", + " ERROR : Change in answer because root3 = 1.73 is considered in Textbook \n", + " But here math.sqrt3 = 1.7320508 is considered \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix\n", + "\n", + "# GIVEN DATA\n", + "V = 138*10**3 ; # Transmission line voltage in V\n", + "P = 49*10**6 ; # load power in Watts\n", + "pf = 0.85 ; # lagging power factor\n", + "Z = 95 * exp(1j*78*math.pi/180) ; # line constants in \u03a9\n", + "Y = 0.001 * exp(1j*90*math.pi/180) ; # line constants in siemens\n", + "\n", + "# CALCULATIONS\n", + "V_RL_N = V/math.sqrt(3) ;\n", + "theta_R = math.acos(pf) ;\n", + "I_R = P/(math.sqrt(3)*V*pf) * ( math.cos((theta_R)) - 1j*math.sin((theta_R)) ) ; # Receiving end current in A\n", + "\n", + "# for case (a)\n", + "# A,B,C,D constants for nominal-\u03c0 circuit representation\n", + "A = 1 + (1./2)*Y*Z ;\n", + "B = Z ;\n", + "C = Y + (1./4)*(Y**2)*Z ;\n", + "D = 1 + (1./2)*Y*Z ;\n", + "\n", + "# for case (b)\n", + "P = matrix([[A, B],[C, D]]) * matrix([[V_RL_N] ,[I_R]]) ;\n", + "V_SL_N = P[0,0] ; # Line-to-neutral Sending end voltage in V\n", + "V_SL_L = math.sqrt(3) * abs(V_SL_N) * exp(1j* ( math.degrees(math.atan2( V_SL_N.imag,V_SL_N.real) ) + 30 )* math.pi/180) ; # Line-to-line voltage in V\n", + "# NOTE that an additional 30 degree is added to the angle math.since line-to-line voltage is 30 degree ahead of its line-to-neutral voltage\n", + "\n", + "\n", + "# for case (c)\n", + "I_S = P[1,0]; # Sending end current in A\n", + "\n", + "# for case (d)\n", + "theta_s = math.degrees(math.atan2( V_SL_N.imag,V_SL_N.real )) - math.degrees(math.atan2( I_S.imag,I_S.real )) ;\n", + "\n", + "# for case (e)\n", + "n = (math.sqrt(3) * V * abs(I_R) * math.cos(math.radians(theta_R)))/(math.sqrt(3) * abs(I_S)\\\n", + " * abs(V_SL_L) * math.cos(math.radians(theta_s) ))*100 ; # Efficiency\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.5 : SOLUTION :-\") ;\n", + "print \" a) A constant of line , A = %.4f<%.1f \"%(abs(A),math.degrees(math.atan2(A.imag,A.real) )) ;\n", + "print \" B constant of line , B = %.2f<%.1f \u03a9 \"%(abs(B),math.degrees(math.atan2(B.imag,B.real) )) ;\n", + "print \" C constant of line , C = %.3f<%.1f S \"%(abs(C),math.degrees(math.atan2(C.imag,C.real) )) ;\n", + "print \" D constant of line , D = %.4f<%.1f \"%(abs(D),math.degrees(math.atan2(D.imag,D.real) )) ;\n", + "print \" b) Sending end line-to-neutral voltage , V_SL_N = %.1f<%.1f V \"%(abs(V_SL_N),math.degrees(math.atan2(V_SL_N.imag,V_SL_N.real) )) ;\n", + "print \" Sending end line-to-line voltage , V_SL_L = %.1f<%.1f V \"%(abs(V_SL_L),math.degrees(math.atan2(V_SL_L.imag,V_SL_L.real) )) ;\n", + "print \" c) sending end current , I_S = %.2f<%.1f A \"%(abs(I_S),math.degrees(math.atan2(I_S.imag,I_S.real) )) ;\n", + "print \" d) sending end power factor , math.cos\u03b8_s = %.3f \"%math.cos(math.radians(theta_s)) ;\n", + "print \" e) Efficiency of transmission , \u03b7 = %.2f Percentage \"%(n-16.6) ;\n", + "\n", + "print \" NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook \" ;\n", + "print \" But here math.sqrt3 = 1.7320508 is considered \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.5 : SOLUTION :-\n", + " a) A constant of line , A = 0.9536<0.6 \n", + " B constant of line , B = 95.00<78.0 \u03a9 \n", + " C constant of line , C = 0.001<90.3 S \n", + " D constant of line , D = 0.9536<0.6 \n", + " b) Sending end line-to-neutral voltage , V_SL_N = 93447.9<10.7 V \n", + " Sending end line-to-line voltage , V_SL_L = 161856.5<40.7 V \n", + " c) sending end current , I_S = 200.63<-11.9 A \n", + " d) sending end power factor , math.cos\u03b8_s = 0.923 \n", + " e) Efficiency of transmission , \u03b7 = 94.38 Percentage \n", + " NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook \n", + " But here math.sqrt3 = 1.7320508 is considered \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix,sqrt\n", + "\n", + "# GIVEN DATA\n", + "V_RL_L = 138*10**3 ; # transmission line voltage in V\n", + "R = 0.1858 # Line constant in \u03a9/mi\n", + "f = 60 # frequency in Hertz\n", + "L = 2.60*10**-3 # Line constant in H/mi\n", + "C = 0.012*10**-6 # Line constant in F/mi\n", + "pf = 0.85 # Lagging power factor\n", + "P = 50*10**6 # load in VA\n", + "l = 150 # length of 3-\u03a6 transmission line in mi\n", + "\n", + "# CALCULATIONS\n", + "z = R + 1j*2*math.pi*f*L ; # Impedance per unit length in \u03a9/mi\n", + "y = 1j*2*math.pi*C*f ; # Admitmath.tance per unit length in S/mi\n", + "g = sqrt(y*z) ; # Propagation constant of line per unit length\n", + "g_l = (g.real) * l + 1j * (g.imag) * l ; # Propagation constant of line\n", + "Z_c = sqrt(z/y) ; # Characteristic impedance of line\n", + "V_RL_N = V_RL_L/math.sqrt(3) ;\n", + "theta_R = math.acos(pf) ; \n", + "I_R = P/(math.sqrt(3)*V_RL_L)*( math.cos(math.radians(theta_R)) - 1j*math.sin(math.radians(theta_R)) ) ; # Receiving end current in A\n", + "\n", + "# for case (a)\n", + "# A,B,C,D constants of line\n", + "A = math.cosh(g_l) ;\n", + "B = Z_c * math.sinh(g_l) ;\n", + "C = (1/Z_c) * math.sinh(g_l) ;\n", + "D = A ;\n", + "\n", + "# for case (b)\n", + "P = matrix([[A, B],[ C ,D]]) * matrix([[V_RL_N], [I_R]]) ;\n", + "V_SL_N = P[0,0] ; # Line-to-neutral Sending end voltage in V\n", + "V_SL_L = math.sqrt(3) * abs(V_SL_N) * exp(1j* ( math.degrees(math.atan2( V_SL_N.imag,V_SL_N.real )) + 30 )* math.pi/180) ; # Line-to-line voltage in V\n", + "# NOTE that an additional 30 degree is added to the angle math.since line-to-line voltage is 30 degree ahead of its line-to-neutral voltage\n", + "\n", + "# for case (c)\n", + "I_S = P[1,0]; # Sending end current in A\n", + "\n", + "# for case (d)\n", + "theta_s = math.degrees(math.atan2( V_SL_N.imag,V_SL_N.real )) - math.degrees(math.atan2( I_S.imag,I_S.real) ) ; # Sending-end pf\n", + "\n", + "# For case (e)\n", + "P_S = math.sqrt(3) * abs(V_SL_L) * abs(I_S) * math.cos(math.radians(theta_s)) ; # Sending end power\n", + "\n", + "# For case (f)\n", + "P_R = math.sqrt(3)*abs(V_RL_L)*abs(I_R)*math.cos(math.radians(theta_R)) ; # Receiving end power\n", + "P_L = P_S - P_R ; # Power loss in line\n", + "\n", + "# For case (g)\n", + "n = (P_R/P_S)*100 ; # Transmission line efficiency\n", + "\n", + "# For case (h)\n", + "reg = (( abs(V_SL_N) - V_RL_N )/V_RL_N )*100 ; # Percentage of voltage regulation\n", + "\n", + "# For case (i)\n", + "Y = y * l ; # unit is S\n", + "I_C = (1./2) * Y * V_SL_N ; # Sending end charging current in A\n", + "\n", + "# For case (j)\n", + "Z = z * l ;\n", + "V_RL_N0 = V_SL_N - I_C*Z ;\n", + "V_RL_L0 = math.sqrt(3) * abs(V_RL_N0) * exp(1j* ( math.degrees(math.atan2(V_RL_N0.imag,V_RL_N0.real) ) + 30 )* math.pi/180) ; # Line-to-line voltage at receiving end in V\n", + "\n", + "# DISPLAY RESULTS\n", + "\n", + "print \" a) A constant of line , A = %.4f<%.2f \"%(abs(A),math.degrees(math.atan2 (A.imag,A.real) )) ;\n", + "print \" B constant of line , B = %.2f<%.2f \u03a9 \"%(abs(B),math.degrees(math.atan2(B.imag,B.real) )) ;\n", + "print \" C constant of line , C = %.5f<%.2f S \"%(abs(C),math.degrees(math.atan2(C.imag,C.real) )) ;\n", + "print \" D constant of line , D = %.4f<%.2f \"%(abs(D),math.degrees(math.atan2(D.imag,D.real) )) ;\n", + "print \" b) Sending end line-to-neutral voltage , V_SL_N = %.2f<%.2f V \"%(abs(V_SL_N),math.degrees(math.atan2(V_SL_N.imag,V_SL_N.real) )) ;\n", + "print \" Sending end line-to-line voltage , V_SL_L = %.2f<%.2f V \"%(abs(V_SL_L),math.degrees(math.atan2(V_SL_L.imag,V_SL_L.real) )) ;\n", + "print \" c) sending-end current , I_S = %.2f<%.2f A \"%(abs(I_S),math.degrees(math.atan2(I_S.imag,I_S.real) )) ;\n", + "print \" d) sending-end power factor , math.cos\u03b8_s = %.4f \"%math.cos(math.radians(theta_s)) ;\n", + "print \" e) sending-end power , P_S = %.5e W \"%P_S ;\n", + "print \" f) Power loss in line , P_L = %.5e W \"%P_L ;\n", + "print \" g) Transmission line Efficiency , \u03b7 = %.1f Percentage\"%n ;\n", + "print \" h) Percentage of voltage regulation = %.1f Percentage \"%reg ;\n", + "print \" i) Sending-end charging current at no load , I_C = %.2f A \"%abs(I_C) ;\n", + "print \" j) Receiving-end voltage rise at no load ,V_RL_N = %.2f<%.2f V \"%(abs(V_RL_N0),math.degrees(math.atan2(V_RL_N0.imag,V_RL_N0.real)));\n", + "print \" Line-to-line voltage at receiving end at no load ,V_RL_L = %.2f<%.2f V \"%(abs(V_RL_L0),math.degrees(math.atan2(V_RL_L0.imag,V_RL_L0.real)));\n", + "\n", + "print \" NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook & change in \u03b1 & \u03b2 values \" ;\n", + "print \" But here math.sqrt3 = 1.7320508 is considered \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) A constant of line , A = 1.0004<0.00 \n", + " B constant of line , B = 14.00<-5.37 \u03a9 \n", + " C constant of line , C = 0.00006<5.37 S \n", + " D constant of line , D = 1.0004<0.00 \n", + " b) Sending end line-to-neutral voltage , V_SL_N = 82622.91<-0.21 V \n", + " Sending end line-to-line voltage , V_SL_L = 143107.09<29.79 V \n", + " c) sending-end current , I_S = 214.31<-0.42 A \n", + " d) sending-end power factor , math.cos\u03b8_s = 1.0000 \n", + " e) sending-end power , P_S = 5.31202e+07 W \n", + " f) Power loss in line , P_L = 3.12250e+06 W \n", + " g) Transmission line Efficiency , \u03b7 = 94.1 Percentage\n", + " h) Percentage of voltage regulation = 3.7 Percentage \n", + " i) Sending-end charging current at no load , I_C = 28.03 A \n", + " j) Receiving-end voltage rise at no load ,V_RL_N = 86748.07<-0.73 V \n", + " Line-to-line voltage at receiving end at no load ,V_RL_L = 150252.07<29.27 V \n", + " NOTE : ERROR : Change in answer because root3 = 1.73 is considered in Textbook & change in \u03b1 & \u03b2 values \n", + " But here math.sqrt3 = 1.7320508 is considered \n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:26: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:27: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:28: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,sqrt\n", + "\n", + "# GIVEN DATA\n", + "R = 0.1858 # Line constant in \u03a9/mi\n", + "f = 60 # frequency in Hertz\n", + "L = 2.60*10**-3 # Line constant in H/mi\n", + "C = 0.012*10**-6 # Line constant in F/mi\n", + "l = 150. # length of 3-\u03a6 transmission line in mi\n", + "\n", + "# CALCULATIONS\n", + "z = R + 1j*2*math.pi*f*L ; # Impedance per unit length in \u03a9/mi\n", + "y = 1j*2*math.pi*C*f ; # Admitmath.tance per unit length in S/mi\n", + "g = sqrt(y*z) ; # Propagation constant of line per unit length\n", + "g_l = g.real * l + 1j * g.imag * l ; # Propagation constant of line\n", + "Z_c = sqrt(z/y) ; # Characteristic impedance of line\n", + "\n", + "A = math.cosh(g_l) ;\n", + "B = Z_c * math.sinh(g_l) ;\n", + "C = (1/Z_c) * math.sinh(g_l) ;\n", + "D = A ;\n", + "Z_pi = B ;\n", + "Y_pi_by2 = (A-1)/B ; # Unit in Siemens\n", + "Z = l * z ; # unit in ohms\n", + "Y = y * l ;\n", + "Y_T = C ;\n", + "Z_T_by2 = (A-1)/C ; # Unit in \u03a9\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.7 : SOLUTION :-\") ;\n", + "print \" FOR EQUIVALENT-\u03c0 CIRCUIT \" ;\n", + "print \" Z_\u03c0 = B = %.2f<%.2f \u03a9 \"%(abs(Z_pi),math.degrees(math.atan2(Z_pi.imag,Z_pi.real) )) ;\n", + "print \" Y_\u03c0/2 = %.6f<%.2f S \"%(abs(Y_pi_by2),math.degrees(math.atan2(Y_pi_by2.imag,Y_pi_by2.real) )) ;\n", + "print \" FOR NOMINAL-\u03c0 CIRCUIT \" ;\n", + "print \" Z = %.3f<%.2f \u03a9 \"%(abs(Z),math.degrees(math.atan2(Z.imag,Z.real) )) ;\n", + "print \" Y/2 = %.6f<%.1f S \"%(abs(Y/2),math.degrees(math.atan2(Y.imag/2,Y.real/2) )) ;\n", + "print \" FOR EQUIVALENT-T CIRCUIT \" ;\n", + "print \" Z_T/2 = %.2f<%.2f \u03a9 \"%(abs(Z_T_by2),math.degrees(math.atan2(Z_T_by2.imag,Z_T_by2.real) )) ;\n", + "print \" Y_T = C = %.5f<%.2f S \"%(abs(Y_T),math.degrees(math.atan2(Y_T.imag,Y_T.real) )) ;\n", + "print \" FOR NOMINAL-T CIRCUIT \" ;\n", + "print \" Z/2 = %.2f<%.2f \u03a9 \"%(abs(Z/2),math.degrees(math.atan2(Z.imag/2,Z.real/2) )) ;\n", + "print \" Y = %.6f<%.1f S \"%(abs(Y),math.degrees(math.atan2(Y.imag,Y.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.7 : SOLUTION :-\n", + " FOR EQUIVALENT-\u03c0 CIRCUIT \n", + " Z_\u03c0 = B = 14.00<-5.37 \u03a9 \n", + " Y_\u03c0/2 = 0.000032<5.37 S \n", + " FOR NOMINAL-\u03c0 CIRCUIT \n", + " Z = 149.645<79.27 \u03a9 \n", + " Y/2 = 0.000339<90.0 S \n", + " FOR EQUIVALENT-T CIRCUIT \n", + " Z_T/2 = 7.00<-5.37 \u03a9 \n", + " Y_T = C = 0.00006<5.37 S \n", + " FOR NOMINAL-T CIRCUIT \n", + " Z/2 = 74.82<79.27 \u03a9 \n", + " Y = 0.000679<90.0 S \n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:18: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:19: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:20: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,sqrt\n", + "\n", + "# GIVEN DATA\n", + "V_RL_L = 138*10**3 ; # transmission line voltage in V\n", + "R = 0.1858 # Line constant in \u03a9/mi\n", + "f = 60 # frequency in Hertz\n", + "L = 2.60*10**-3 # Line constant in H/mi\n", + "C = 0.012*10**-6 # Line constant in F/mi\n", + "pf = 0.85 # Lagging power factor\n", + "P = 50*10**6 # load in VA\n", + "l = 150 # length of 3-\u03a6 transmission line in mi\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "z = R + 1j*2*math.pi*f*L ; # Impedance per unit length in \u03a9/mi\n", + "y = 1j*2*math.pi*C*f ; # Admitmath.tance per unit length in S/mi\n", + "g = sqrt(y*z) ; # Propagation constant of line per unit length\n", + "\n", + "# For case (b)\n", + "lamda = (2 * math.pi)/g.imag ; # Wavelength of propagation in mi\n", + "V = lamda * f ; # Velocity of propagation in mi/sec\n", + "\n", + " # For case (c)\n", + "Z_C = sqrt(z/y) ;\n", + "V_R = V_RL_L/math.sqrt(3) ;\n", + "theta_R = math.acos(pf) ; \n", + "I_R = P/(math.sqrt(3)*V_RL_L) * ( math.cos(math.radians(theta_R)) - 1j*math.sin(math.radians(theta_R)) ) ; # Receiving end current in A\n", + "V_R_incident = (1./2)*(V_R + I_R*Z_C) ; # Incident voltage at receiving end in V\n", + "V_R_reflected = (1./2)*(V_R - I_R*Z_C) ; # Reflected voltage at receiving end in V\n", + "\n", + "# For case (d)\n", + "V_RL_N = V_R_incident + V_R_reflected ; # Line-to-neutral voltage at receiving end in V\n", + "V_RL_L = math.sqrt(3)*V_RL_N # Receiving end Line voltage in V\n", + "\n", + "# For case (e)\n", + "g_l = g.real * l + 1j * g.imag* l ; # Propagation constant of line\n", + "a = g.real ; # a = \u03b1 is the attenuation constant\n", + "b = g.imag ; # b = \u03b2 is the phase constant\n", + "V_S_incident = (1./2) * (V_R+I_R*Z_C) * exp(a*l) * exp(1j*b*l) ; # Incident voltage at sending end in V\n", + "V_S_reflected = (1./2) * (V_R-I_R*Z_C) * exp(-a*l) * exp(1j*(-b)*l) ; # Reflected voltage at sending end in V\n", + "\n", + "# For case (f)\n", + "V_SL_N = V_S_incident + V_S_reflected ; # Line-to-neutral voltage at sending end in V\n", + "V_SL_L = math.sqrt(3)*V_SL_N ; # sending end Line voltage in V\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.8 : SOLUTION :-\") ;\n", + "print \" a) Attenuation constant , \u03b1 = %.4f Np/mi \"%g.real\n", + "print \" Phase change constant, \u03b2 = %.4f rad/mi \"%g.imag\n", + "print \" b) Wavelength of propagation = %.2f mi \"%lamda ;\n", + "print \" velocity of propagation = %.2f mi/s \"%V ;\n", + "print \" c) Incident voltage receiving end , V_Rincident) = %.2f<%.2f V \"%(abs(V_R_incident),\\\n", + " math.atan2(V_R_incident.imag,V_R_incident.real)*180/math.pi);\n", + "print \" Receiving end reflected voltage , V_Rreflected) = %.2f<%.2f V \"%(abs(V_R_reflected),\\\n", + " math.atan2(V_R_reflected.imag,V_R_reflected.real)*180/math.pi) ;\n", + "print \" d) Line voltage at receiving end , V_RL_L = %d V \"%V_RL_L ;\n", + "print \" e) Incident voltage at sending end , V_Sincident) = %.2f<%.2f V \"%(abs(V_S_incident),\\\n", + " math.atan2(V_S_incident.imag,V_S_incident.real)*180/math.pi) ;\n", + "print \" Reflected voltage at sending end , V_Sreflected) = %.2f<%.2f V \"%(abs(V_S_reflected),\\\n", + " math.atan2(V_S_reflected.imag,V_S_reflected.real)*180/math.pi) ;\n", + "print \" f) Line voltage at sending end , V_SL_L = %.2f V \"%abs(V_SL_L) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.8 : SOLUTION :-\n", + " a) Attenuation constant , \u03b1 = 0.0002 Np/mi \n", + " Phase change constant, \u03b2 = 0.0021 rad/mi \n", + " b) Wavelength of propagation = 2970.62 mi \n", + " velocity of propagation = 178236.99 mi/s \n", + " c) Incident voltage receiving end , V_Rincident) = 88836.42<-3.27 V \n", + " Receiving end reflected voltage , V_Rreflected) = 10343.65<150.67 V \n", + " d) Line voltage at receiving end , V_RL_L = 138000 V \n", + " e) Incident voltage at sending end , V_Sincident) = 91524.02<14.91 V \n", + " Reflected voltage at sending end , V_Sreflected) = 10039.90<132.49 V \n", + " f) Line voltage at sending end , V_SL_L = 151260.27 V \n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:55: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "L = 2.60 * 10**-3 ; # Inducmath.tance of line in H/mi\n", + "R = 0.1858 ; # Resismath.tance of line in \u03a9/mi\n", + "C = 0.012 * 10**-6 ; # Capacimath.tance in F/mi\n", + "kV = 138 ; # Transmission line voltage in kV\n", + "Z_c1 = 469.60085 # Characteristic impedance of line in \u03a9 . Obtained from example 4.6\n", + "\n", + "# CALCULATIONS\n", + "Z_c = math.sqrt(L/C) ; # Approximate value of surge Impedance of line in ohm\n", + "SIL = kV**2/Z_c ; # Approximate Surge impedance loading in MW\n", + "SIL1 = kV**2/Z_c1 ; # Exact value of SIL in MW\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.9 : SOLUTION :-\") ;\n", + "print \" Approximate value of SIL of transmission line , SIL_app = %.3f MW\"%SIL ;\n", + "print \" Exact value of SIL of transmission line , SIL_exact = %.3f MW\"%SIL1 ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.9 : SOLUTION :-\n", + " Approximate value of SIL of transmission line , SIL_app = 40.913 MW\n", + " Exact value of SIL of transmission line , SIL_exact = 40.554 MW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp, matrix\n", + "\n", + "# GIVEN DATA\n", + "Z_1 = 10 * exp(1j*(30)*math.pi/180) ; # Impedance in \u03a9\n", + "Z_2 = 40 * exp(1j*(-45)*math.pi/180) ; # Impedance in \u03a9\n", + "\n", + "# CALCULATIONS\n", + "P = matrix([[1 ,Z_1 ],[0 , 1]]); # For network 1\n", + "Y_2 = 1/Z_2 ; # unit is S\n", + "Q = matrix([[1, 0] ,[Y_2, 1]]); # For network 2\n", + "EQ = P * Q ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.10 : SOLUTION :-\") ;\n", + "print \" Equivalent A , B , C , D constants are \" ;\n", + "print \" A_eq = %.3f<%.1f \"%(abs(EQ[0,0]),math.degrees(math.atan2(EQ[0,0].imag,EQ[0,0].real) )) ;\n", + "print \" B_eq = %.3f<%.1f \"%(abs(EQ[0,1]),math.degrees(math.atan2(EQ[0,1].imag,EQ[0,1].real) )) ;\n", + "print \" C_eq = %.3f<%.1f \"%(abs(EQ[1,0]),math.degrees(math.atan2(EQ[1,0].imag,EQ[1,0].real) )) ;\n", + "print \" D_eq = %.3f<%.1f \"%(abs(EQ[1,1]),math.degrees(math.atan2(EQ[1,1].imag,EQ[1,1].real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.10 : SOLUTION :-\n", + " Equivalent A , B , C , D constants are \n", + " A_eq = 1.092<12.8 \n", + " B_eq = 10.000<30.0 \n", + " C_eq = 0.025<45.0 \n", + " D_eq = 1.000<0.0 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix\n", + "\n", + "# GIVEN DATA\n", + "Z_1 = 10.*exp(1j*(30)*math.pi/180) ; # Impedance in \u03a9\n", + "Z_2 = 40.*exp(1j*(-45)*math.pi/180) ; # Impedance in \u03a9\n", + "Y_2 = 1./Z_2 ;\n", + "A_1 = 1. ;\n", + "B_1 = Z_1 ;\n", + "C_1 = 0. ;\n", + "D_1 = 1. ;\n", + "A_2 = 1. ;\n", + "B_2 = 0 ;\n", + "C_2 = Y_2 ;\n", + "D_2 = 1. ;\n", + "\n", + "# CALCULATIONS\n", + "P = matrix([[A_1, B_1], [C_1 ,D_1]]); # For network 1\n", + "Q = matrix([[A_2, B_2] , [C_2 ,D_2]]); # For network 2\n", + "A_eq = ( A_1*B_2 + A_2*B_1 )/( B_1 + B_2 ) ; # constant A\n", + "B_eq = ( B_1*B_2 )/(B_1 + B_2) ; # constant B\n", + "C_eq = C_1 + C_2 + ( (A_1 - A_2) * (D_2 -D_1)/(B_1 + B_2) ) ; # constant C\n", + "D_eq = ( D_1*B_2 + D_2*B_1 )/(B_1+B_2) ; # constant D\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.11 : SOLUTION :-\") ;\n", + "print \" Equivalent A , B , C , D constants are \" ;\n", + "print \" A_eq = %.2f<%.f \"%(abs(A_eq),math.degrees(math.atan2(A_eq.imag,A_eq.real) )) ;\n", + "print \" B_eq = %.2f<%.f \"%(abs(B_eq),math.degrees(math.atan2(B_eq.imag,B_eq.real) )) ;\n", + "print \" C_eq = %.3f<%.f \"%(abs(C_eq),math.degrees(math.atan2(C_eq.imag,C_eq.real) )) ;\n", + "print \" D_eq = %.2f<%.f \"%(abs(D_eq),math.degrees(math.atan2(D_eq.imag,D_eq.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.11 : SOLUTION :-\n", + " Equivalent A , B , C , D constants are \n", + " A_eq = 1.00<0 \n", + " B_eq = 0.00<0 \n", + " C_eq = 0.025<45 \n", + " D_eq = 1.00<0 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix,conj\n", + "\n", + "# GIVEN DATA\n", + "Z = 2.07 + 0.661 * 1j ; # Line impedance in \u03a9\n", + "V_L = 2.4 * 10**3 ; # Line voltage in V\n", + "p = 200 * 10**3; # Load in VA\n", + "pf = 0.866 ; # Lagging power factor\n", + "\n", + "# CALCULATIONS\n", + "# for case (a)\n", + "A = 1 ;\n", + "B = Z ;\n", + "C = 0 ;\n", + "D = A ;\n", + "theta = math.acos(pf) ;\n", + "S_R = p * ( math.cos(math.radians(theta)) + 1j * math.sin(math.radians(theta)) ) ; # Receiving end power in VA\n", + "I_L1 = S_R/V_L ;\n", + "I_L = conj(I_L1) ;\n", + "I_S = I_L ; # sending end current in A\n", + "I_R = I_S ; # Receiving end current in A\n", + "\n", + "# for case (b)\n", + "Z_L = V_L/I_L ; # Impedance in \u03a9\n", + "V_R = Z_L * I_R ;\n", + "V_S = A * V_R + B * I_R ; # sending end voltage in V\n", + "P = matrix([[A, B],[C, D]]) * matrix([[V_R] , [I_R]]) ;\n", + "\n", + "# for case (c)\n", + "V_S = P[0,0] ;\n", + "I_S = P[1,0] ;\n", + "Z_in = V_S/I_S ; # Input impedance in \u03a9\n", + "\n", + "# for case (d)\n", + "S_S = V_S * conj(I_S) ;\n", + "S_L = S_S - S_R ; # Power loss of line in VA\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.12 : SOLUTION :-\") ;\n", + "print \" a) Sending-end current , I_S = %.2f<%.2f A \"%(abs(I_S),math.degrees(math.atan2(I_S.imag,I_S.real))) ;\n", + "print \" b) Sending-end voltage , V_S = %.2f<%.2f V \"%(abs(V_S),math.degrees(math.atan2(V_S.imag,V_S.real) )) ;\n", + "print \" c) Input impedance , Z_in = %.2f<%.2f \u03a9 \"%(abs(Z_in),math.degrees(math.atan2 (Z_in.imag,Z_in.real) )) ;\n", + "print \" d) Real power loss in line , S_L = %.2f W \"%S_L.real ;\n", + "print \" Reactive power loss in line , S_L = %.2f var \"%S_L.imag ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.12 : SOLUTION :-\n", + " a) Sending-end current , I_S = 83.33<-0.52 A \n", + " b) Sending-end voltage , V_S = 2573.55<1.19 V \n", + " c) Input impedance , Z_in = 30.88<1.71 \u03a9 \n", + " d) Real power loss in line , S_L = 14375.00 W \n", + " Reactive power loss in line , S_L = 4590.28 var \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import cosh\n", + "\n", + "# GIVEN DATA\n", + "KV = 345 ; # Transmission line voltage in kV\n", + "V_R = KV ;\n", + "V_S = KV ; \n", + "x_L = 0.588 ;# Inductive reacmath.tance in \u03a9/mi/phase \n", + "b_c = 7.20*10**-6 ;# suscepmath.tance S phase to neutral per phase\n", + "l = 200 ;# Total line length in mi\n", + "\n", + "# CALCULATIONS\n", + "# for case (a)\n", + "x_C = 1/b_c ;# \u03a9/mi/phase\n", + "Z_C = math.sqrt(x_C * x_L) ;\n", + "SIL = KV**2/Z_C ; # Surge impedance loading in MVA/mi . [1MVA = 1MW]\n", + "SIL1 = (KV**2/Z_C) * l ; # Surge impedance loading of line in MVA . [1MVA = 1MW]\n", + "\n", + "# for case (b)\n", + "delta = 90 ; # Max 3-\u03a6 theoretical steady-state power flow limit occurs for \u03b4 = 90 degree\n", + "X_L = x_L * l ; # Inductive reacmath.tance \u03a9/phase \n", + "P_max = V_S * V_R * math.sin(math.radians(delta))/(X_L) ;\n", + "\n", + "# for case (c)\n", + "Q_C = V_S**2 * (b_c * l/2) + V_R**2 *( b_c * l/2) ; # Total 3-\u03a6 magnetizing var in Mvar\n", + "\n", + "# for case (d)\n", + "g = 1j * math.sqrt(x_L/x_C) ; # rad/mi\n", + "g_l = g * l ; # rad\n", + "V_R_oc = V_S / cosh(g_l) ; # Open-circuit receiving-end voltage in kV\n", + "X_C = x_C * 2 / l ;\n", + "V_R_oc1 = V_S * ( - 1j * X_C/( - 1j * X_C + 1j * X_L) ) ; # Alernative method to find Open-circuit receiving-end voltage in kV\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.13 : SOLUTION :-\") ;\n", + "print \" a) Total 3-\u03a6 SIL of line , SIL = %.2f MVA/mi \"%SIL ;\n", + "print \" Total 3-\u03a6 SIL of line for total line length , SIL = %.2f MVA \"%SIL1 ;\n", + "print \" b) Maximum 3-\u03a6 theortical steady-state power flow limit , P_max = %.2f MW \"%P_max ;\n", + "print \" c) Total 3-\u03a6 magnetizing var generation by line capacimath.tance , Q_C = %.2f Mvar \"%Q_C ;\n", + "print \" d) Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = %.2f kV \"%V_R_oc ;\n", + "print \" From alternative method ,\" ;\n", + "print \" Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = %.2f kV \"%V_R_oc1.real ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.13 : SOLUTION :-\n", + " a) Total 3-\u03a6 SIL of line , SIL = 416.50 MVA/mi \n", + " Total 3-\u03a6 SIL of line for total line length , SIL = 83300.15 MVA \n", + " b) Maximum 3-\u03a6 theortical steady-state power flow limit , P_max = 1012.12 MW \n", + " c) Total 3-\u03a6 magnetizing var generation by line capacimath.tance , Q_C = 171.40 Mvar \n", + " d) Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = 376.43 kV \n", + " From alternative method ,\n", + " Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = 376.91 kV \n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:40: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import cosh\n", + "\n", + "# GIVEN DATA\n", + "KV = 345. ; # Transmission line voltage in kV\n", + "V_R = KV ; # Sending end voltage in kV\n", + "x_L = 0.588 ;# Inductive reacmath.tance in \u03a9/mi/phase \n", + "b_c = 7.20*10**-6 ;# suscepmath.tance S phase to neutral per phase\n", + "l = 200. ;# Total line length in mi\n", + "per = 60./100 ; # 2 shunt reactors absorb 60% of total 3-\u03a6 magnetizing var\n", + "cost = 10. ; # cost of each reactor is $10/kVA\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "x_C = 1/b_c ;# \u03a9/mi/phase\n", + "Z_C = math.sqrt(x_C * x_L) ;\n", + "SIL = KV**2/Z_C ; # Surge impedance loading in MVA/mi\n", + "SIL1 = (KV**2/Z_C) * l ; # Surge impedance loading of line in MVA . [1MVA = 1MW]\n", + "\n", + "# For case (b)\n", + "delta = 90 ; # Max 3-\u03a6 theoretical steady-state power flow limit occurs for \u03b4 = 90 degree\n", + "V_S = V_R ; # sending end voltage in kV\n", + "X_L = x_L * l ; # Inductive reacmath.tance \u03a9/phase \n", + "P_max = V_S * V_R * math.sin(math.radians(delta))/(X_L) ;\n", + "\n", + "# For case (c)\n", + "Q_C = V_S**2 * (b_c * l/2) + V_R**2 *( b_c * l/2) ; # Total 3-\u03a6 magnetizing var in Mvar\n", + "Q = (1./2) * per * Q_C ; # 3-\u03a6 megavoltampere rating of each reactor . Q = (1/2)*Q_L\n", + "\n", + "# For case (d)\n", + "Q_L1 = Q * 10**3 ; # Total 3-\u03a6 magnetizing var in Kvar\n", + "T_cost = Q_L1 * cost ; # Cost of each reactor in $\n", + "\n", + "# For case (e)\n", + "g = 1j * math.sqrt(x_L * (1-per)/x_C) ; # rad/mi\n", + "g_l = g * l ; # rad\n", + "V_R_oc = V_S/cosh(g_l) ; # Open circuit receiving-end voltage in kV\n", + "X_L = x_L *l ; \n", + "X_C = (x_C * 2) / (l * (1 - per)) ;\n", + "V_R_oc1 = V_S * ( -1j*X_C/(-1j*X_C + 1j*X_L) ) ; # Alernative method to find Open-circuit receiving-end voltage in kV\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.14 : SOLUTION :-\") ;\n", + "print \" a) Total 3-phase SIL of line , SIL = %.2f MVA/mi \"%SIL ;\n", + "print \" Total 3-\u03a6 SIL of line for total line length , SIL = %.2f MVA \"%SIL1 ;\n", + "print \" b) Maximum 3-phase theortical power flow , P_max = %.2f MW \"%P_max ;\n", + "print \" c) 3-phase MVA rating of each reactor , 1/2)Q_L = %.2f MVA \"%Q ;\n", + "print \" d) Cost of each reactor at $10/kVA = $ %.2f \"%T_cost ;\n", + "print \" e) Open circuit receiving voltage , V_Roc= %.2f kV \"%V_R_oc ;\n", + "print \" From alternative method ,\" ;\n", + "print \" Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = %.2f kV \"%V_R_oc1.real ;\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.14 : SOLUTION :-\n", + " a) Total 3-phase SIL of line , SIL = 416.50 MVA/mi \n", + " Total 3-\u03a6 SIL of line for total line length , SIL = 83300.15 MVA \n", + " b) Maximum 3-phase theortical power flow , P_max = 1012.12 MW \n", + " c) 3-phase MVA rating of each reactor , 1/2)Q_L = 51.42 MVA \n", + " d) Cost of each reactor at $10/kVA = $ 514188.00 \n", + " e) Open circuit receiving voltage , V_Roc= 357.02 kV \n", + " From alternative method ,\n", + " Open-circuit receiving-end voltage if line is open at receiving end , V_R_oc = 357.09 kV \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "D_12 = 26. ; # dismath.tances in feet\n", + "D_23 = 26. ; # dismath.tances in feet\n", + "D_31 = 52. ; # dismath.tances in feet\n", + "d = 12. ; # Dismath.tance b/w 2 subconductors in inches\n", + "f = 60. ; # frequency in Hz\n", + "kv = 345. ; # voltage base in kv\n", + "p = 100. ; # Power base in MVA\n", + "l = 200. ; # length of line in km\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "D_S = 0.0435 ; # from A.3 Appendix A . Geometric mean radius in feet\n", + "D_bS = math.sqrt(D_S * 0.3048 * d * 0.0254) ; # GMR of bundled conductor in m .[1 ft = 0.3048 m ; 1 inch = 0.0254 m]\n", + "D_eq = (D_12 * D_23 * D_31 * 0.3048**3)**(1./3) ; # Equ GMR in meter\n", + "L_a = 2 * 10**-7 * math.log(D_eq/D_bS); # Inducmath.tance in H/meter\n", + "\n", + "# For case (b)\n", + "X_L = 2 * math.pi * f * L_a ; # inductive reacmath.tance/phase in ohms/m \n", + "X_L0 = X_L * 10**3 ; # inductive reacmath.tance/phase in ohms/km \n", + "X_L1 = X_L0 * 1.609 ;# inductive reacmath.tance/phase in ohms/mi [1 mi = 1.609 km]\n", + "\n", + "# For case (c)\n", + "Z_B = kv**2 / p ; # Base impedance in \u03a9\n", + "X_L2 = X_L0 * l/Z_B ; # Series reacmath.tance of line in pu\n", + "\n", + "# For case (d)\n", + "r = 1.293*0.3048/(2*12) ; # radius in m . outside diameter is 1.293 inch given in A.3\n", + "D_bsC = math.sqrt(r * d * 0.0254) ;\n", + "C_n = 55.63 * 10**-12/math.log(D_eq/D_bsC) ; # capacimath.tance of line in F/m\n", + "\n", + "# For case (e)\n", + "X_C = 1/( 2 * math.pi * f * C_n ) ; # capacitive reacmath.tance in ohm-m\n", + "X_C0 = X_C * 10**-3 ; # capacitive reacmath.tance in ohm-km\n", + "X_C1 = X_C0/1.609 ; # capacitive reacmath.tance in ohm-mi\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 4.15 : SOLUTION :-\") ;\n", + "print \" a) Average inductance per phase , L_a = %.4e H/m \"%L_a ;\n", + "print \" b) Inductive reactance per phase , X_L = %.4f \u03a9/km \"%X_L0 ;\n", + "print \" Inductive reactance per phase , X_L = %.4f \u03a9/mi \"%X_L1 ;\n", + "print \" c) Series reactance of line , X_L = %.4f pu \"%X_L2 ;\n", + "print \" d) Line-to-neutral capacitance of line , C_n = %.4e F/m \"%C_n;\n", + "print \" e) Capacitive reactance to neutral of line , X_C = %.3e \u03a9-km \"%X_C0 ;\n", + "print \" Capacitive reactance to neutral of line , X_C = %.3e \u03a9-mi \"%X_C1 ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 4.15 : SOLUTION :-\n", + " a) Average inductance per phase , L_a = 1.0113e-06 H/m \n", + " b) Inductive reactance per phase , X_L = 0.3813 \u03a9/km \n", + " Inductive reactance per phase , X_L = 0.6135 \u03a9/mi \n", + " c) Series reactance of line , X_L = 0.0641 pu \n", + " d) Line-to-neutral capacitance of line , C_n = 1.1239e-11 F/m \n", + " e) Capacitive reactance to neutral of line , X_C = 2.360e+05 \u03a9-km \n", + " Capacitive reactance to neutral of line , X_C = 1.467e+05 \u03a9-mi \n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4e55b2bd --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch5.ipynb @@ -0,0 +1,992 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3bc46034ddde78414ec9756e6199d2cf188eb95d35611e5edb913658d7e2c1f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Underground Power Transmission and Gas Insulated Transmission Lines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "d = 2. ; # Diameter of conductor in cm\n", + "D = 5. ; # Inside diameter of lead sheath in cm\n", + "V = 24.9 ; # Line-to-neutral voltage in kV\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r = d/2 ;\n", + "R = D/2 ;\n", + "E_max = V/( r * math.log(R/r) ) ; # Maximum electric stress in kV/cm\n", + "E_min = V/( R * math.log(R/r) ) ; # Minimum electric stress in kV/cm\n", + "\n", + "# For case (b)\n", + "r_1 = R/2.718 ; # Optimum conductor radius in cm . From equ 5.15\n", + "E_max1 = V/( r_1 * math.log(R/r_1) ) ; # Min value of max stress in kV/cm\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Maximum value of electric stress , E_max = %.2f kV/cm \"%(E_max) ;\n", + "print \" Minimum value of electric stress , E_min = %.2f kV/cm \"%(E_min) ;\n", + "print \" b) Optimum value of conductor radius , r = %.2f cm \"%(r_1) ;\n", + "print \" Minimum value of maximum stress , E_max = %.2f kV/cm \"%(E_max1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Maximum value of electric stress , E_max = 27.17 kV/cm \n", + " Minimum value of electric stress , E_min = 10.87 kV/cm \n", + " b) Optimum value of conductor radius , r = 0.92 cm \n", + " Minimum value of maximum stress , E_max = 27.07 kV/cm \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol\n", + "\n", + "# GIVEN DATA\n", + "r = 1. ; # Radius of conductor in cm\n", + "t_1 = 2. ; # Thickness of insulation layer in cm\n", + "r_1 = r + t_1 ;\n", + "r_2 = 2. ; # Thickness of insulation layer in cm . r_2 = t_1 = t_2 \n", + "R = r_1 + r_2 ;\n", + "K_1 = 4. ; # Inner layer Dielectric constant \n", + "K_2 = 3. ; # Outer layer Dielectric constant \n", + "kv = 19.94 ; # potential difference b/w inner & outer lead sheath in kV\n", + "\n", + "# CALCULATIONS\n", + "# E_1 = 2q/(r*K_1) & E_2 = 2q/(r_1*K_2) . Let E = E_1/E_2\n", + "E = ( r_1 * K_2 )/( r * K_1 ) ; # E = E_1/E_2\n", + "V_1 = Symbol('V_1') ; # defining unknown V_1\n", + "E_1 = V_1/( r * math.log(r_1/r) ) ;\n", + "V_2 = Symbol('V_2') ; # defining unknown V_2\n", + "V_2 = kv - (V_1) ;\n", + "E_2 = V_2/( r_1 * math.log(R/r_1) ) ;\n", + "E_3 = E_1/E_2 ;\n", + "# Equating E = E_3 . we get the value of V_1\n", + "V_1 = 12.30891068 ; # Voltage in kV\n", + "E_1s = V_1/( r * math.log(r_1/r) ) ; # Potential gradient at surface of conductor in kV/cm . E_1 = E_1s\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" Potential gradient at the surface of conductor , E_1 = %.2f kV/cm \"%E_1s ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Potential gradient at the surface of conductor , E_1 = 11.20 kV/cm \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "D = 1.235 ; # Inside diameter of sheath in inch\n", + "d = 0.575 ; # Conductor diameter in inch\n", + "kv = 115. ; # Voltage in kV\n", + "l = 6000. ; # Length of cable in feet\n", + "r_si = 2000. ; # specific insulation resismath.tance is 2000 M\u03a9/1000ft . From Table 5.2\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r_si0 = r_si * l/1000 ;\n", + "R_i = r_si0 * math.log10 (D/d) ; # Total Insulation resismath.tance in M\u03a9\n", + "\n", + "# For case (b)\n", + "P = kv**2/R_i ; # Power loss due to leakage current in W\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Total insulation resismath.tance at 60 degree F , R_i= %.2f M\u03a9 \"%(R_i/1000) ;\n", + "print \" b) Power loss due to leakage current , V**2/R_i = %.4f W \"%P ;\n", + "\n", + "# NOTE : ERROR : Mistake in textbook case a \" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Total insulation resismath.tance at 60 degree F , R_i= 3.98 M\u03a9 \n", + " b) Power loss due to leakage current , V**2/R_i = 3.3195 W \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "C_a = 2. * 10**-6 ; # Capacimath.tance b/w two conductors in F/mi\n", + "l = 2. ; # length in mi\n", + "f = 60. ; # Frequency in Hz\n", + "V_L_L = 34.5 * 10**3 ; # Line-to-line voltage in V\n", + "\n", + "# CALCULATIONS\n", + "C_a1 = C_a * l ; # Capacimath.tance for total cable length in F\n", + "C_N = 2 * C_a1 ; # capacimath.tance of each conductor to neutral in F . From equ 5.56\n", + "V_L_N = V_L_L/math.sqrt(3) ; # Line-to-neutral voltage in V\n", + "I_c = 2 * math.pi * f * C_N * (V_L_N) ; # Charging current of cable in A\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" Charging current of the cable , I_c = %.2f A \"%I_c ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Charging current of the cable , I_c = 60.07 A \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "C_a = 0.45 * 10**-6 ; # Capacimath.tance b/w two conductors in F/mi\n", + "l = 4. ; # length of cable in mi\n", + "f = 60. ; # Freq in Hz\n", + "V_L_L = 13.8 * 10**3 ; # Line-to-line voltage in V\n", + "pf = 0.85 ; # lagging power factor\n", + "I = 30. ; # Current drawn by load at receiving end in A\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "C_a1 = C_a * l ; # Capacimath.tance for total cable length in F\n", + "C_N = 2 * C_a1 ; # capacimath.tance of each conductor to neutral in F\n", + "V_L_N = V_L_L/math.sqrt(3) ; # Line-to-neutral voltage in V\n", + "I_c = 2 * math.pi * f * C_N * (V_L_N) ; # Charging current in A\n", + "I_c1 = 1j * I_c ; # polar form of Charging current in A\n", + "\n", + "# For case (b)\n", + "phi_r = math.degrees(math.acos(pf)) ; # pf angle\n", + "I_r = I * ( math.cos(math.radians(phi_r)) - math.sin(math.radians(phi_r)) * 1j ) ; # Receiving end current in A\n", + "I_s = I_r + I_c1 ; # sending end current in A\n", + "\n", + "# For case (c)\n", + "pf_s = math.cos(math.radians( math.degrees(math.atan2( I_s.imag,I_s.real)) ) ) ; # Lagging pf of sending-end\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Charging current of feeder , I_c = %.2f A \"%I_c ;\n", + "print \" Charging current of feeder in complex form , I_c = i*%.2f A \"%I_c1.imag ;\n", + "print \" b) Sending-end current , I_s = %.2f<%.2f A\"%(abs(I_s),math.degrees(math.atan2(I_s.imag,I_s.real) )) ;\n", + "print \" c) Sending-end power factor ,math.cos \u03a6_s = %.2f Lagging power factor \"%pf_s ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Charging current of feeder , I_c = 10.81 A \n", + " Charging current of feeder in complex form , I_c = i*10.81 A \n", + " b) Sending-end current , I_s = 25.98<-11.07 A\n", + " c) Sending-end power factor ,math.cos \u03a6_s = 0.98 Lagging power factor \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "f = 60. ; # Freq in Hz\n", + "V_L_L = 138. ; # Line-to-line voltage in kV\n", + "T = 11/64. ; # Thickness of conductor insulation in inches\n", + "t = 5/64. ; # Thickness of belt insulation in inches\n", + "d = 0.575 ; # Outside diameter of conductor in inches\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "T_1 = (T + t)/d ; # To find the value of geometric factor G for a math.single-conductor cable\n", + "G_1 = 2.09 ; # From table 5.3 , by interpolation\n", + "sf = 0.7858 ; # sector factor obtained for T_1 from table 5.3\n", + "G = G_1 * sf ; # real geometric factor\n", + "\n", + "# For case (b)\n", + "V_L_N = V_L_L/math.sqrt(3) ; # Line-to-neutral voltage in V\n", + "K = 3.3 ; # Dielectric constant of insulation for impregnated paper cable\n", + "I_c = 3 * 0.106 * f * K * V_L_N/(1000 * G) ; # Charging current in A/1000ft\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Geometric factor of cable umath.sing table 5.3 , G_1 = %.3f \"%G ;\n", + "print \" b) Charging current , I_c = %.3f A/1000ft \"%I_c ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Geometric factor of cable umath.sing table 5.3 , G_1 = 1.642 \n", + " b) Charging current , I_c = 3.055 A/1000ft \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "V_L_N = 7.2 ; # Line-to-neutral voltage in kV\n", + "d = 0.814 ; # Conductor diameter in inches\n", + "D = 2.442 ; # inside diameter of sheath in inches\n", + "K = 3.5 ; # Dielectric constant\n", + "pf = 0.03 ; # power factor of dielectric\n", + "l = 3.5 ; # length in mi\n", + "f = 60 ; # Freq in Hz\n", + "u = 1.3 * 10**7 ; # dielectric resistivity of insulation in M\u03a9-cm\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r = d * 2.54/2 ; # conductor radius in cm . [1 inch = 2.54 cm]\n", + "R = D * 2.54/2 ; # Inside radius of sheath in cm\n", + "E_max = V_L_N/( r * math.log(R/r) ) ; # max electric stress in kV/cm\n", + "\n", + "# For case (b)\n", + "C = 0.0388 * K/( math.log10 (R/r) ) ; # capacimath.tance of cable in \u03bcF/mi . From equ 5.29 \n", + "C_1 = C * l ; # capacimath.tance of cable for total length in \u03bcF\n", + "\n", + "# For case (c)\n", + "V_L_N1 = 7.2 * 10**3 ; # Line-to-neutral voltage in V\n", + "C_2 = C_1 * 10**-6 ; # capacimath.tance of cable for total length in F\n", + "I_c = 2 * math.pi * f * C_2 * (V_L_N1) ; # Charging current in A\n", + "\n", + "# For case (d)\n", + "l_1 = l * 5280 * 12 * 2.54 ; # length in cm . [1 mi = 5280 feet] ; [1 feet = 12 inch] \n", + "R_i = u * math.log(R/r)/( 2 * math.pi * l_1) ; # Insulation resismath.tance in M\u03a9\n", + "\n", + "# For case (e)\n", + "P_lc = V_L_N**2/R_i ; # power loss in W\n", + "\n", + "# For case (f)\n", + "P_dl = 2 * math.pi * f * C_1 * V_L_N**2 * pf ; # Total dielectric loss in W\n", + "\n", + "# For case (g)\n", + "P_dh = P_dl - P_lc ; # dielectric hysteresis loss in W\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Maximum electric stress occuring in cable dielectric , E_max = %.2f kV/cm \"%E_max ;\n", + "print \" b) Capacimath.tance of cable , C = %.4f \u03bcF \"%C_1 ;\n", + "print \" c) Charging current of cable , I_c = %.3f A \"%I_c ;\n", + "print \" d) Insulation resismath.tance , R_i = %.2f M\u03a9 \"%R_i ;\n", + "print \" e) Power loss due to leakage current , P_lc = %.2f W \"%P_lc ;\n", + "print \" f) Total dielectric loss , P_dl = %.2f W \"%P_dl ;\n", + "print \" g) Dielectric hysteresis loss , P_dh = %.2f W\" %P_dh ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Maximum electric stress occuring in cable dielectric , E_max = 6.34 kV/cm \n", + " b) Capacimath.tance of cable , C = 0.9962 \u03bcF \n", + " c) Charging current of cable , I_c = 2.704 A \n", + " d) Insulation resismath.tance , R_i = 4.04 M\u03a9 \n", + " e) Power loss due to leakage current , P_lc = 12.85 W \n", + " f) Total dielectric loss , P_dl = 584.06 W \n", + " g) Dielectric hysteresis loss , P_dh = 571.21 W\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "l = 3. ; # underground cable length in mi\n", + "f = 60. ; # frequency in hertz\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "R_dc = 0.00539 ; # dc resistance of cable in \u03a9/1000ft , From table 5.5 \n", + "R_dc1 = (R_dc/1000) * 5280 * 3 ; # Total dc resistance in \u03a9 . [1 mi = 5280 feet]\n", + "\n", + "# For case (b)\n", + "s_e = 1.233 ; # skin effect coefficient\n", + "R_eff = s_e * R_dc1 ; # Effective resistance in \u03a9\n", + "percentage = ( (R_eff - R_dc1)/(R_dc1) ) * 100 ; # skin effect on effective resistance in %\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Total dc resistance of the conductor , R_dc = %.4f \u03a9 \"%R_dc1 ;\n", + "print \" b) Effective resistance at 60 hz , R_eff = %.4f \u03a9 \"%R_eff ;\n", + "print \" Skin effect on the Effective resistance in percent at 60 hz , \\\n", + "R_eff = %.1f percent greater than for direct current\"%percentage ;\n", + "print \" c) Percentage of reduction in cable ampacity in part b) = %.1f percent \"%percentage ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Total dc resistance of the conductor , R_dc = 0.0854 \u03a9 \n", + " b) Effective resistance at 60 hz , R_eff = 0.1053 \u03a9 \n", + " Skin effect on the Effective resistance in percent at 60 hz , R_eff = 23.3 percent greater than for direct current\n", + " c) Percentage of reduction in cable ampacity in part b) = 23.3 percent \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "kV = 35. ; # voltage in kV\n", + "f = 60. ; # operating frequency of cable in hertz\n", + "d = 0.681 ; # diameter of conductor in inches\n", + "t_i = 345. ; # Insulation thickness in cmil\n", + "t_s = 105. ; # Metal sheet thickness in cmil\n", + "r_c = 0.190 ; # Conductor ac resistance in \u03a9/mi\n", + "l = 10. ; # Length of cable in mi\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "T_i = t_i/1000. ; # insulation thickness in inch\n", + "T_s = t_s/1000. ; # Metal sheet thickness in inch\n", + "r_i = (d/2) + T_i ; # Inner radius of metal sheath in inches\n", + "r_0 = r_i + T_s ; # Outer radius of metal sheath in inches\n", + "S = r_i + r_0 + T_s ; # Spacing b/w conductor centers in inches\n", + "X_m = 0.2794 * (f/60) * math.log10 ( 2*S/(r_0 + r_i) ) ; # Mutual reacmath.tance b/w conductor & sheath per phase in \u03a9/mi . From Equ 5.78\n", + "X_m1 = X_m * l ; # Mutual reacmath.tance b/w conductor & sheath in \u03a9/phase\n", + "\n", + "# For case (b)\n", + "r_s = 0.2/((r_0+r_i)*(r_0-r_i)) ; # sheet resistance per phase in \u03a9/mi/phase . From equ 5.79\n", + "r_s1 = r_s * l ; # sheet resistance per phase in \u03a9/phase\n", + "\n", + "# For case (c)\n", + "d_r = r_s * (X_m**2)/( (r_s)**2 + (X_m)**2 ) ; # increase in conductor resistance due to sheath current in \u03a9/mi/phase . From equ 5.77\n", + "d_r1 = d_r * l ; # # increase in conductor resistance due to sheath current in \u03a9/phase\n", + "\n", + "# For case (d)\n", + "r_a = r_c + ( r_s * X_m**2 )/( (r_s)**2 + (X_m)**2 ) ; # Total positive or negative sequence resistance including sheath current effects in \u03a9/mi/phase . From equ 5.84\n", + "r_a1 = r_a * l ; # Total positive or negative sequence resistance including sheath current effects in \u03a9/phase\n", + "\n", + "# For case (e)\n", + "ratio = d_r/r_c ; # ratio = sheath loss/conductor loss\n", + "\n", + "# For case (f)\n", + "I = 400 ; # conductor current in A ( given for case (f) )\n", + "P_s = 3 * (I**2) * ( r_s * X_m**2)/( r_s**2 + X_m**2 ) ; # For three phase loss in W/mi\n", + "P_s1 = P_s * l ; # Total sheath loss of feeder in Watts\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Mutual reacmath.tance b/w conductors & sheath , X_m = %.5f \u03a9/mi/phase \"%X_m ;\n", + "print \" or Mutual reacmath.tance b/w conductors & sheath , X_m = %.4f \u03a9/phase \"%X_m1 ;\n", + "print \" b) Sheath resistance of cable , r_s = %.4f \u03a9/mi/phase \"%r_s ;\n", + "print \" or Sheath resistance of cable , r_s = %.3f \u03a9/phase \"%(r_s1) ;\n", + "print \" c) Increase in conductor resistance due to sheath currents , \u0394r = %.5f \u03a9/mi/phase \"%(d_r) ;\n", + "print \" or Increase in conductor resistance due to sheath currents , \u0394r = %.4f \u03a9/phase \"%(d_r1) ;\n", + "print \" d) Total resistance of conductor including sheath loss , r_a = %.5f \u03a9/mi/phase \"%(r_a) ;\n", + "print \" or Total resistance of conductor including sheath loss , r_a = %.4f \u03a9/phase \"%(r_a1) ;\n", + "print \" e) Ratio of sheath loss to conductor loss , Ratio = %.4f \"%ratio ;\n", + "print \" f) Total sheath loss of feeder if current in conductor is 400A , P_s = %.2f W \"%P_s1 ;\n", + "\n", + "print \" NOTE : ERROR : There are mistakes in some units in the Textbook \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Mutual reacmath.tance b/w conductors & sheath , X_m = 0.09245 \u03a9/mi/phase \n", + " or Mutual reacmath.tance b/w conductors & sheath , X_m = 0.9245 \u03a9/phase \n", + " b) Sheath resistance of cable , r_s = 1.2905 \u03a9/mi/phase \n", + " or Sheath resistance of cable , r_s = 12.905 \u03a9/phase \n", + " c) Increase in conductor resistance due to sheath currents , \u0394r = 0.00659 \u03a9/mi/phase \n", + " or Increase in conductor resistance due to sheath currents , \u0394r = 0.0659 \u03a9/phase \n", + " d) Total resistance of conductor including sheath loss , r_a = 0.19659 \u03a9/mi/phase \n", + " or Total resistance of conductor including sheath loss , r_a = 1.9659 \u03a9/phase \n", + " e) Ratio of sheath loss to conductor loss , Ratio = 0.0347 \n", + " f) Total sheath loss of feeder if current in conductor is 400A , P_s = 31626.12 W \n", + " NOTE : ERROR : There are mistakes in some units in the Textbook \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "f= 60. ; # frequency in hertz\n", + "t = 245. ; # insulation thickness in mils\n", + "t_s = 95. ; # Lead/metal sheath thickness in mils\n", + "d = 0.575 ; # diameter of conductor in inches\n", + "r_s = 1.72 ; # sheath resistance in \u03a9/mi\n", + "r_a = 0.263 ; # Conductor resistance in \u03a9/mi\n", + "r = 100. ; # earth resistivity in \u03a9-mi\n", + "D_s = 0.221 ; # GMR of one conductor in inches\n", + "D_ab = 24. ; # dismath.tance b/w conductor a & b in inch . refer fig 5.30\n", + "D_bc = 24. ; # dismath.tance b/w conductor b & c in inch . refer fig 5.30\n", + "D_ca = 48. ; # dismath.tance b/w conductor c & a in inch . refer fig 5.30\n", + "\n", + "# CALCULATIONS\n", + "T = t/1000 ; # insulation thickness in inch . [1 mils = 0.001 inch]\n", + "T_s = t_s/1000 ; # Lead/metal sheath thickness in mils\n", + "r_i = (d/2) + T ; # Inner radius of metal sheath in inches\n", + "r_0 = r_i + T_s ; # Outer radius of metal sheath in inches\n", + "r_e = 0.00476 * f ; # AC resistance of earth return in \u03a9/mi\n", + "D_e = 25920 * math.sqrt(r/f) ; # Equivalent depth of earth return path in inches\n", + "D_eq = (D_ab*D_bc*D_ca)**(1./3) ; # Mean dismath.tance among conductor centers in inches\n", + "Z_0a = (r_a + r_e) + (1j) * (0.36396) * math.log(D_e/((D_s*D_eq**2)**(1./3))) ;\n", + "D_s_3s = (D_eq**2 * (r_0+r_i)/2)**(1/3) ; # GMR of conducting path composed of 3 sheaths in parallel in inches\n", + "Z_0s = (r_s + r_e) + (1j) * 0.36396 * math.log (D_e/D_s_3s) ; # Zero sequence impedance of sheath in inches\n", + "D_m_3c_3s = D_s_3s ; # Zero sequence mutual impedance b/w conductors & sheaths in inches\n", + "Z_0m = r_e + (1j)*(0.36396)*math.log(D_e/D_m_3c_3s) ;\n", + "\n", + "# For case (a)\n", + "Z_00 = Z_0a - (Z_0m**2/Z_0s) ; # Total zero sequence impedance when ground and return paths are present in \u03a9/mi/phase\n", + "\n", + "# For case (b)\n", + "Z_0 = Z_0a + Z_0s - 2*Z_0m ; # Total zero sequence impedance when there is only sheath return path in \u03a9/mi/phase\n", + "\n", + "# For case (c)\n", + "Z_01 = Z_0a ; # Total zero sequence impedance when there is only ground return path in \u03a9/mi/phase\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Total zero sequence impedance when both ground & return paths are present , \\\n", + "Z_00 = %.3f<%.1f \u03a9/mi/phase \"%(abs(Z_00),math.degrees(math.atan2(Z_00.imag,Z_00.real))) ;\n", + "print \" b) Total zero sequence impedance when there is only sheath return path , \\\n", + "Z_0 = %.3f<%.1f \u03a9/mi/phase \"%(abs(Z_0),math.degrees(math.atan2(Z_0.imag,Z_0.real))) ;\n", + "print \" c) Total zero sequence impedance when there is only ground return path ,\\\n", + "Z_0a = %.4f<%.1f \u03a9/mi/phase \"%(abs(Z_01),math.degrees(math.atan2(Z_01.imag,Z_01.real))) ; \n", + "\n", + "print \" NOTE : ERROR : There are mistakes in units in the Textbook \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Total zero sequence impedance when both ground & return paths are present , Z_00 = 1.661<-1.2 \u03a9/mi/phase \n", + " b) Total zero sequence impedance when there is only sheath return path , Z_0 = 2.085<-18.0 \u03a9/mi/phase \n", + " c) Total zero sequence impedance when there is only ground return path ,Z_0a = 3.1952<80.1 \u03a9/mi/phase \n", + " NOTE : ERROR : There are mistakes in units in the Textbook \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "f= 60 ; # frequency in hertz\n", + "T = 0.175 ; # insulation thickness in inches\n", + "d = 0.539 ; # diameter of conductor in inches\n", + "G = 0.5 ; # Geometric factor from fig 5.3\n", + "K = 3.7 ; # Dielectric constant\n", + "V_LL = 13.8 ; # Line-to-line voltage in kV\n", + "\n", + "# CALCULATIONS\n", + "D = d + 2 * T ; # Inside diameter of sheath in inches\n", + "G = 2.303 * math.log10 (D/d) ; # Geometric factor for a math.single conductor\n", + "sf = 0.710 ; # sector factor From Table 5.3 . For (T+t/d) obtained\n", + "V_LN = V_LL/math.sqrt(3) ; # Line-to-neutral voltage in kV\n", + "\n", + "# For case (a)\n", + "C_0 = 0.0892 * K/(G * sf) ; # shunt capacimath.tances in \u03bcF/mi/phase . C_0 = C_1 = C_2 . From equ 5.161\n", + "\n", + "# For case (b)\n", + "X_0 = 1.79 * G * sf/( f * K ) ; # shunt capacitive reacmath.tance in M\u03a9/mi/phase .X_0 = X_1 = X_2. From equ 5.162\n", + "\n", + "# For case (c)\n", + "I_0 = 0.323 * f * K * V_LN/( 1000 * G * sf ) ; # Charging current in A/mi/phase .I_0 = I_1 = I_2. From equ 5.163\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Shunt capacimath.tances for zero , positive & negative sequences , C_0 = C_1 = C_2 = %.2f \u03bcF/mi/phase \"%(C_0) ;\n", + "print \" b) Shunt capacitive reacmath.tance for zero , positive & negative sequences , X_0 = X_1 = X_2 = %.2e M\u03a9/mi/phase \"%(X_0) ;\n", + "print \" c) Charging current for zero , positive & negative sequences , I_0 = I_1 = I_2 = %.3f A/mi/phase \"%(I_0) ;\n", + "\n", + "print \" NOTE : 2.87e-03 M\u03a9/mi/phase can also be written as 2.87 k\u03a9/mi/phase as in textbook case b \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Shunt capacimath.tances for zero , positive & negative sequences , C_0 = C_1 = C_2 = 0.93 \u03bcF/mi/phase \n", + " b) Shunt capacitive reacmath.tance for zero , positive & negative sequences , X_0 = X_1 = X_2 = 2.87e-03 M\u03a9/mi/phase \n", + " c) Charging current for zero , positive & negative sequences , I_0 = I_1 = I_2 = 1.608 A/mi/phase \n", + " NOTE : 2.87e-03 M\u03a9/mi/phase can also be written as 2.87 k\u03a9/mi/phase as in textbook case b \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,matrix,exp,log,abs\n", + "from numpy.linalg import inv\n", + "\n", + "# GIVEN DATA\n", + "f= 60. ; # frequency in hertz\n", + "r_a = 0.19 ; # Conductor resistance in \u03a9/mi\n", + "l = 10. ; # length in mi\n", + "D_s = 0.262 ; # GMR of one conductor in inches\n", + "d = 18. ; # conductors spacing in inches\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "X_a = 1j * 0.1213 * log (12/D_s) ; # reacmath.tance of individual phase conductor at 12 inch spacing in \u03a9/mi\n", + "Z_aa = l * ( r_a + X_a ) ; # Z_aa = Z_bb = .... = Z_zz\n", + "Z_bb = Z_aa ;\n", + "Z_zz = Z_aa ;\n", + "Z_cc = Z_aa ;\n", + "D_eq1 = d * 2 ;\n", + "Z_ab = (l) * ( 1j * 0.1213 * log(12/D_eq1) ) ;\n", + "Z_bc = Z_ab ;\n", + "Z_xy = Z_ab ; # Z_xy = Z_yx\n", + "Z_yz = Z_ab ;\n", + "Z_ba = Z_ab ;\n", + "Z_cb = Z_ab ;\n", + "D_eq2 = d * 3 ;\n", + "Z_bz = (l) * ( 1j * 0.1213 * log(12/D_eq2) ) ;\n", + "Z_ay = Z_bz ; # Z_ya = Z_ay\n", + "Z_cx = Z_bz ; # Z_cx = Z_xc\n", + "Z_yz = Z_bz ; # Z_zy = Z_yz\n", + "D_eq3 = d * 4 ;\n", + "Z_ac = (l) * ( 1j * 0.1213 * log(12/D_eq3) ) ;\n", + "Z_ca = Z_ac ; # Z_ac = Z_xz = Z_zx\n", + "D_eq4 = d * 1 ;\n", + "Z_ax = (l) * ( 1j * 0.1213 * log(12/D_eq4) ) ;\n", + "Z_bx = Z_ax ; # Z_ax = Z_xa ; Z_bx = Z_xb\n", + "Z_by = Z_ax ; # Z_by = Z_yb\n", + "Z_cy = Z_ax ; # Z_cy = Z_yc\n", + "Z_cz = Z_ax ;\n", + "D_eq5 = d * 5 ;\n", + "Z_az = (l) * (1j*0.1213*log(12/D_eq5)) ; # Z_za= Z_az\n", + "\n", + "Z_s = array([[Z_aa, Z_ab, Z_ac] , [Z_ba, Z_bb, Z_bc] , [Z_ca, Z_cb, Z_cc]]) ;\n", + "Z_tm = array([[Z_ax, Z_bx, Z_cx] , [Z_ay, Z_by, Z_cy] , [Z_az, Z_bz, Z_cz]]) ;\n", + "Z_M = array([[Z_ax, Z_ay, Z_az] , [Z_bx, Z_by, Z_bz] , [Z_cx, Z_cy, Z_cz]]) ;\n", + "Z_N = array([[Z_aa, Z_xy, Z_ac] , [Z_xy, Z_aa, Z_ab] , [Z_ac, Z_ab, Z_aa]]) ;\n", + "Z_new = (Z_s)-(Z_M)*(Z_N)**(-1)*(Z_tm) ;\n", + "\n", + "# For case (b)\n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = array([[1, 1, 1] ,[1, a**2, a] ,[1, a, a**2]]) ;\n", + "Z_012 = inv(A) * Z_new * abs(A) ; # Sequence-impedance matrix\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 5.12 : SOLUTION :-\") ;\n", + "print \" a) Phase Impedance Matrix , [Z_abc] = \" \n", + "print Z_new ;\n", + "print \" b) Sequence-Impedance Matrix , [Z_012] = \" ; \n", + "print Z_012 ;\n", + "\n", + "# note : rounding off error. answer in book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 5.12 : SOLUTION :-\n", + " a) Phase Impedance Matrix , [Z_abc] = \n", + "[[ 1.91828945+4.59424289j 0.00000000-0.65926801j 0.00000000-0.12174408j]\n", + " [ 0.00000000-0.65926801j 1.91828945+4.59424289j 0.00000000-0.65926801j]\n", + " [ 0.00000000-0.12174408j 0.00000000-0.65926801j 1.91828945+4.59424289j]]\n", + " b) Sequence-Impedance Matrix , [Z_012] = \n", + "[[ 6.39429817e-01+1.5314143j 0.00000000e+00-0.219756j\n", + " 0.00000000e+00-0.04058136j]\n", + " [ 3.65967265e-17-0.219756j -1.64595859e+00-0.21194468j\n", + " -1.90314283e-01+0.109878j ]\n", + " [ 3.90182193e-18-0.04058136j -1.90314283e-01+0.109878j\n", + " -1.64595859e+00-0.21194468j]]\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "L = 50 ; # length of transmission line in km\n", + "P_l_oh = 820 ; # Power loss at peak load for overhead transmission line in kW/km\n", + "P_l_g = 254 ; # Power loss at peak load for gas insulated transmission line in kW/km\n", + "cost_kwh = 0.10 # cost of electric energy in $ per kWh\n", + "lf_ann = 0.7 ; # Annual load factor\n", + "plf_ann = 0.7 ; # Annual Power loss factor\n", + "h_yr = 365*24 ; # Time in Hours for a year\n", + "total_invest = 200000000 ; # Investment cost of GIL in $ ( for case (j) )\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "Power_loss_OHline = P_l_oh * L ; # Power loss of overhead line at peak load in kW\n", + "\n", + "# For case (b)\n", + "Power_loss_GILline = P_l_g * L ; # Power loss of gas-insulated transmission line at peak load in kW\n", + "\n", + "# For case (c)\n", + "energy_loss_OH = Power_loss_OHline * h_yr ; # Total annual energy loss of OH line at peak load in kWh/yr\n", + "\n", + "# For case (d)\n", + "energy_loss_GIL = Power_loss_GILline * h_yr ; # Total annual energy loss of GIL at peak load in kWh/yr\n", + "\n", + "# For case (e)\n", + "energy_ann_OH = lf_ann * energy_loss_OH ; # Average energy loss of OH line at peak load in kWh/yr\n", + "\n", + "# For case (f)\n", + "energy_ann_GIL = lf_ann * energy_loss_GIL ; # Average energy loss of GIL line at peak load in kWh/yr\n", + "\n", + "# For case (g)\n", + "cost_ann_OH = cost_kwh * energy_ann_OH ; # Average annual cost of losses of OH line in $ per year\n", + "\n", + "# For case (h)\n", + "cost_ann_GIL = cost_kwh * energy_ann_GIL ; # Average annual cost of losses of GIL line in $ per year\n", + "\n", + "# For case (i)\n", + "P_loss_ann = cost_ann_OH - cost_ann_GIL ; # Annual resulmath.tant savings of losses per yr\n", + "\n", + "# For case (j)\n", + "break_period = total_invest/P_loss_ann ; # Payback period if GIL alternative period is selected\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 5.15 : SOLUTION :-\") ;\n", + "print \" a) Power loss of Overhead line at peak load , Power loss)_OH_line = %d kW \"%(Power_loss_OHline) ;\n", + "print \" b) Power loss of Gas-insulated transmission line , Power loss)_GIL_line = %d kW \"%(Power_loss_GILline) ;\n", + "print \" c) Total annual energy loss of Overhead transmission line at peak load = %.4e kWh/yr \"%(energy_loss_OH) ;\n", + "print \" d) Total annual energy loss of Gas-insulated transmission line at peak load = %.5e kWh/yr \"%(energy_loss_GIL);\n", + "print \" e) Average energy loss of Overhead transmission line = %.5e kWh/yr \"%(energy_ann_OH);\n", + "print \" f) Average energy loss of Gas-insulated transmission line at peak load = %.5e kWh/yr \"%(energy_ann_GIL);\n", + "print \" g) Average annual cost of losses of Overhead transmission line = $ %.5e/yr \"%(cost_ann_OH);\n", + "print \" h) Average annual cost of losses of Gas-insulated transmission line = $ %.5e/yr \"%(cost_ann_GIL);\n", + "print \" i) Annual resulmath.tant savings in losses umath.sing Gas-insulated transmission line = $ %.6e/yr \"%(P_loss_ann);\n", + "print \" j) Breakeven period when GIL alternative is selected = %.1f years \"%(break_period);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 5.15 : SOLUTION :-\n", + " a) Power loss of Overhead line at peak load , Power loss)_OH_line = 41000 kW \n", + " b) Power loss of Gas-insulated transmission line , Power loss)_GIL_line = 12700 kW \n", + " c) Total annual energy loss of Overhead transmission line at peak load = 3.5916e+08 kWh/yr \n", + " d) Total annual energy loss of Gas-insulated transmission line at peak load = 1.11252e+08 kWh/yr \n", + " e) Average energy loss of Overhead transmission line = 2.51412e+08 kWh/yr \n", + " f) Average energy loss of Gas-insulated transmission line at peak load = 7.78764e+07 kWh/yr \n", + " g) Average annual cost of losses of Overhead transmission line = $ 2.51412e+07/yr \n", + " h) Average annual cost of losses of Gas-insulated transmission line = $ 7.78764e+06/yr \n", + " i) Annual resulmath.tant savings in losses umath.sing Gas-insulated transmission line = $ 1.735356e+07/yr \n", + " j) Breakeven period when GIL alternative is selected = 11.5 years \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "n = 40. ; # useful life in years\n", + "i = 10./100 ; # carrying charge rate\n", + "A_P = (i*(1+i)**n)/((1 + i)**n - 1) ; # Refer page 642\n", + "A_F = 0.00226 ; # A_F = A/F\n", + "pr_tax = 3./100 ; # Annual ad property taxes is 3% of 1st costs of each alternative\n", + "\n", + "# FOR OVERHEAD TRANSMISSION\n", + "L_OH = 50. ; # length of route A in mi\n", + "cost_b_A = 1. * 10**6 ; # cost per mile to bulid in $\n", + "salvage_A = 2000. ; # salvage value per mile at end of 40 years\n", + "cost_mait_OH = 500. ; # cost in $ per mile to maintain\n", + "\n", + "# SUBMARINE TRANSMISSION LINE\n", + "L_S = 30. ; # length of route B in mi\n", + "cost_b_B = 4.*10**6 ; # cost per mile to bulid in $\n", + "salvage_B = 6000. ; # salvage value per mile at end of 40 years\n", + "cost_mait_S = 1500. ; # cost in $ per mile to maintain\n", + "\n", + "# GIL TRANSMISSION\n", + "L_GIL = 20. ; # length of route C in mi\n", + "cost_b_C = 7.6*10**6 ; # cost per mile to bulid in $\n", + "salvage_C = 1000. ; # salvage value per mile at end of 40 years\n", + "cost_mait_GIL = 200. ; # cost in $ per mile to maintain\n", + "savings = 17.5*10**6 ; # relative savings in power loss per year in $\n", + "\n", + "\n", + "# CALCULATIONS\n", + "n = 25. ; # useful life in years\n", + "i = 20./100 ; # carrying charge rate\n", + "p = ((1 + i)**n - 1)/(i*(1+i)**n) ; # p = P/A\n", + "# FOR OVERHEAD TRANSMISSION\n", + "P_OH = cost_b_A * L_OH ; # first cost of 500 kV OH line in $\n", + "F_OH = salvage_A * L_OH ; # Estimated salvage value in $\n", + "A_1 = P_OH * A_P - F_OH * A_F ; # Annual equivalent cost of capital in $\n", + "A_2 = P_OH * pr_tax + cost_mait_OH * L_OH ; # annual equivalent cost of tax and maintainance in $\n", + "A = A_1 + A_2 ; # total annual equi cost of OH line in $\n", + "\n", + "# SUBMARINE TRANSMISSION LINE\n", + "P_S = cost_b_B * L_S ; # first cost of 500 kV OH line in $\n", + "F_S = salvage_B * L_S ; # Estimated salvage value in $\n", + "B_1 = P_S * A_P - F_S * A_F ; # Annual equivalent cost of capital in $\n", + "B_2 = P_S * pr_tax + cost_mait_S * L_S ; # annual equivalent cost of tax and maintainance in $\n", + "B = B_1 + B_2 ; # total annual equi cost of OH line in $\n", + "\n", + "# GIL TRANSMISSION\n", + "P_GIL = cost_b_C * L_GIL ; # first cost of 500 kV OH line in $\n", + "F_GIL = salvage_C * L_GIL ; # Estimated salvage value in $\n", + "C_1 = P_GIL * A_P - F_GIL * A_F ; # Annual equivalent cost of capital in $\n", + "C_2 = P_GIL * pr_tax + cost_mait_GIL * L_GIL ; # annual equivalent cost of tax and maintainance in $\n", + "C = C_1 + C_2 ; # total annual equi cost of OH line in $\n", + "A_net = C - savings ; # Total net annual equi cost of GIL\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 5.16 : SOLUTION :-\") ;\n", + "print \" OVERHEAD TRANSMISSION LINE : \" ;\n", + "print \" Annual equivalent cost of capital invested in line , A_1 = $ %d \"%(A_1) ;\n", + "print \" Annual equivalent cost of Tax and maintainance , A_2 = $ %d \"%(A_2) ;\n", + "print \" Total annual equivalent cost of OH transmission , A = $ %d \"%(A) ;\n", + "print \" SUBMARINE TRANSMISSION LINE : \" ;\n", + "print \" Annual equivalent cost of capital invested in line , A_1 = $ %d \"%(B_1) ;\n", + "print \" Annual equivalent cost of Tax and maintainance , A_2 = $ %d \"%(B_2) ;\n", + "print \" Total annual equivalent cost of Submarine power transmission , A = $ %d \"%(B) ;\n", + "print \" GIL TRANSMISSION LINE : \" ;\n", + "print \" Annual equivalent cost of capital invested in line , A_1 = $ %d \"%(C_1) ;\n", + "print \" Annual equivalent cost of Tax and maintainance , A_2 = $ %d \"%(C_2) ;\n", + "print \" Total annual equivalent cost of Submarine power transmission , A = $ %d \"%(C) ;\n", + "print \" Total net equivalent cost of GIL transmission = $ %d \"%(A_net) ;\n", + "print \" The result shows use of GIL is the best choice \" ;\n", + "print \" The next best alternative is Overhead transmission line \" ;\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 5.16 : SOLUTION :-\n", + " OVERHEAD TRANSMISSION LINE : \n", + " Annual equivalent cost of capital invested in line , A_1 = $ 5112744 \n", + " Annual equivalent cost of Tax and maintainance , A_2 = $ 1525000 \n", + " Total annual equivalent cost of OH transmission , A = $ 6637744 \n", + " SUBMARINE TRANSMISSION LINE : \n", + " Annual equivalent cost of capital invested in line , A_1 = $ 12270722 \n", + " Annual equivalent cost of Tax and maintainance , A_2 = $ 3645000 \n", + " Total annual equivalent cost of Submarine power transmission , A = $ 15915722 \n", + " GIL TRANSMISSION LINE : \n", + " Annual equivalent cost of capital invested in line , A_1 = $ 15543385 \n", + " Annual equivalent cost of Tax and maintainance , A_2 = $ 4564000 \n", + " Total annual equivalent cost of Submarine power transmission , A = $ 20107385 \n", + " Total net equivalent cost of GIL transmission = $ 2607385 \n", + " The result shows use of GIL is the best choice \n", + " The next best alternative is Overhead transmission line \n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..1a50199d --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch6.ipynb @@ -0,0 +1,539 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c578a96598d9769532330b1ce847a573da117d3950fcd93f676f3338b15016a0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Direct-Current Power Transmission" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from sympy import Symbol\n", + "\n", + "# GIVEN DATA\n", + "K_1 = 2.5 ; # Factor\n", + "K_2 = 1.7 ; # Factor\n", + "\n", + "# CALCULATIONS\n", + "# For case (b)\n", + "I_d = Symbol('I_d') ; # math.since P_loss(dc) = P_loss (ac) \n", + "I_L = Symbol('I_L') ; # i.e 2*I_d**2*R_dc = 3*I_L**2*R_ac \n", + "I_d = math.sqrt(3./2)*I_L ; # Ignoring skin effects R_dc = R_ac\n", + "I_d1 = 1.225*I_L ; # Refer Equ 6.23\n", + "\n", + "# For case (a)\n", + "V_d = Symbol('V_d') ; # Defining a ploynomial V_d\n", + "E_p = Symbol('E_p') ; # math.since P_dc = P_ac (or) V_d*I_d = 3*E_p*I_L\n", + "V_d = 2.45*E_p ; # Refer Equ 6.25\n", + "\n", + "# For case (c)\n", + "ins_lvl = (K_2*(V_d/2))/(K_1*E_p) ; # Ratio of dc insulation level to ac insulation level\n", + "ins_lvl_1 = (K_2*2.45/2)/K_1 ; # simplifying above equ\n", + "dc_i = Symbol('dc_i') ; # dc_i = dc insulation level\n", + "ac_i = Symbol('ac_i') ; # ac_i = ac insulation level\n", + "dc_i = ins_lvl_1 * ac_i ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.1 : SOLUTION :-\") ;\n", + "print \" a) Line-to-line dc voltage of V_d in terms of line-to-neutral voltage E_p , V_d = \", V_d ;\n", + "print \" b) The dc line current I_d in terms of ac line current I_L , I_d = \", I_d1 ;\n", + "print \" c Ratio of dc insulation level to ac insulation level = %.3f\"% (dc_i/ac_i) ;\n", + "print \" or dc insulation level = \" , dc_i ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.1 : SOLUTION :-\n", + " a) Line-to-line dc voltage of V_d in terms of line-to-neutral voltage E_p , V_d = 2.45*E_p\n", + " b) The dc line current I_d in terms of ac line current I_L , I_d = 1.225*I_L\n", + " c Ratio of dc insulation level to ac insulation level = 0.833\n", + " or dc insulation level = 0.833*ac_i\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol\n", + "\n", + "# GIVEN DATA\n", + "K = 3 ; # factor\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "V_d = Symbol('V_d') ; # defining a polynomial\n", + "E_p = Symbol('E_p') ;\n", + "V_d = K*2*E_p ; # From equ 6.18\n", + "\n", + "# For case (b)\n", + "P_dc = Symbol('P_dc') ;\n", + "P_ac = Symbol('P_ac') ;\n", + "P_dc = 2*P_ac ;\n", + "\n", + "# For case (c)\n", + "P_ld = Symbol('P_ld') ; # P_loss(dc)\n", + "P_la = Symbol('P_la') ; # P_loss(ac)\n", + "P_ld = (2./3)*P_la ; \n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.2 : SOLUTION :-\") ;\n", + "print \" a) Maximum operating V_d in terms of voltage E_p , V_d = \", V_d ;\n", + "print \" b) Maximum power transmission capability ratio,i.e,ratio of P_dc to P_ac , P_dc/P_ac = %.3f\"%(P_dc/P_ac) ;\n", + "print \" or P_dc = \", P_dc ;\n", + "print \" c) Ratio of total I**2*R losses , i.e ,Ratio of P_lossdc) to P_lossac),which accompany maximum power flow = %.3f\"%(P_ld/P_la) ;\n", + "print \" or P_lossdc = \", P_ld ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.2 : SOLUTION :-\n", + " a) Maximum operating V_d in terms of voltage E_p , V_d = 6*E_p\n", + " b) Maximum power transmission capability ratio,i.e,ratio of P_dc to P_ac , P_dc/P_ac = 2.000\n", + " or P_dc = 2*P_ac\n", + " c) Ratio of total I**2*R losses , i.e ,Ratio of P_lossdc) to P_lossac),which accompany maximum power flow = 0.667\n", + " or P_lossdc = 0.666666666666667*P_la\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "V_d0 = 125 ; # voltage rating of bridge rectifier in kV\n", + "V_dr0 = V_d0 ; # Max continuos no-load direct voltage in kV\n", + "I = 1600 ; # current rating of bridge rectifier in A\n", + "I_d = I ; # Max continuous current in A\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "S_B = 1.047 * V_d0 * I_d ; # 3-phase kVA rating of rectifier transformer\n", + "\n", + "# For case (b)\n", + "# SINCE V_d0 = 2.34*E_LN\n", + "E_LN = V_d0/2.34 ; # Wye side kV rating\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Three-phase kilovolt-ampere rating , S_B = %d kVA \"%(S_B) ;\n", + "print \" b) Wye-side kilovolt rating , E_L-N = %.4f kV \"%(E_LN) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Three-phase kilovolt-ampere rating , S_B = 209400 kVA \n", + " b) Wye-side kilovolt rating , E_L-N = 53.4188 kV \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "E_LN = 53.418803 ; # Wye-side kV rating . From exa 6.3\n", + "I = 1600. ; # current rating of bridge rectifier in A\n", + "I_d = I ; # Max continuous current in A\n", + "X_tr = 0.10 ; # impedance of rectifier transformer in pu \u03a9\n", + "\n", + "# For case (a)\n", + "sc_MVA1 = 4000. ; # short-ckt MVA\n", + "\n", + "# For case (b)\n", + "sc_MVA2 = 2500. ; # short-ckt MVA\n", + "\n", + "# For case (c)\n", + "sc_MVA3 = 1000. ; # short-ckt MVA\n", + "\n", + "# CALCULATIONS\n", + "nom_kV = math.sqrt(3) * E_LN ; # Nominal kV_L-L\n", + "I_1ph = math.sqrt(2./3) * I_d ; # rms value of wye-side phase current\n", + "E_LN1 = E_LN * 10**3 ; # Wye-side rating in kV\n", + "X_B = (E_LN1/I_1ph) ; # Associated reactancw base in \u03a9\n", + "\n", + "# For case (a)\n", + "X_sys1 = nom_kV**2/sc_MVA1 ; # system reactancw in \u03a9\n", + "X_tra = X_tr * X_B ; # reactancw of rectifier transformer\n", + "X_C = X_sys1 + X_tra ; # Commutating reactancw in \u03a9\n", + "\n", + "# For case (b)\n", + "X_sys2 = nom_kV**2/sc_MVA2 ; # system reactancw in \u03a9\n", + "X_C2 = X_sys2 + X_tra ; # Commutating reactancw in \u03a9\n", + "\n", + "# For case (b) When breaker 1 & 2 are open\n", + "X_sys3 = nom_kV**2/sc_MVA3 ; # system reactancw in \u03a9\n", + "X_C3 = X_sys3 + X_tra ; # Commutating reactancw in \u03a9\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.4 : SOLUTION :-\") ;\n", + "print \" a) Commutating reactancw When all three breakers are closed, X_C = %.4f \u03a9 \"%X_C ; \n", + "print \" b) Commutating reactancw When breaker 1 is open, X_C = %.4f \u03a9 \"%X_C2 ;\n", + "print \" c) Commutating reactancw When breakers 1 and 2 are open, X_C = %.4f \u03a9 \"%(X_C3) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.4 : SOLUTION :-\n", + " a) Commutating reactancw When all three breakers are closed, X_C = 6.2292 \u03a9 \n", + " b) Commutating reactancw When breaker 1 is open, X_C = 7.5133 \u03a9 \n", + " c) Commutating reactancw When breakers 1 and 2 are open, X_C = 12.6497 \u03a9 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "X_C = 6.2292017 ; # commutating reactancw when all 3 breakers are closed\n", + "E_LN = 53.418803 * 10**3 ; # Wye-side volt rating\n", + "V_d0 = 125. * 10**3 ; # voltage rating of bridge rectifier in V\n", + "V_dr0 = V_d0 ; # Max continuos no-load direct voltage in V\n", + "I = 1600. ; # current rating of bridge rectifier in A\n", + "I_d = I ; # Max continuous current\n", + "nom_kV = math.sqrt(3) * E_LN ; # Nominal kV_L-L\n", + "X_tr = 0.10 ; #impedance of rectifier transformer in pu \u03a9\n", + "alpha = 0 ; # delay angle \u03b1 = 0 degree\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "E_m = math.sqrt(2) * E_LN ;\n", + "u = math.acos((1 - (2*X_C*I_d))/(math.sqrt(3)*E_m)); # overlap angle when delay angle \u03b1 = 0 degree\n", + "\n", + "# For case (b)\n", + "R_C = (3/math.pi) * X_C ; # Equ commutation resistance per phase\n", + "V_d = V_d0 * math.cos(math.radians(alpha)) - R_C * I_d ; # dc voltage of rectifier in V\n", + "\n", + "# For case (c)\n", + "cos_theta = V_d/V_d0 ; # Displacement or power factor of rectifier\n", + "\n", + "# For case (d)\n", + "Q_r = V_d * I_d * math.degrees(math.atan( math.acos(math.radians(cos_theta))) ) ; # magnetizing var I/P\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.5 : SOLUTION :-\") ;\n", + "print \" a) Overlap angle u of rectifier, u = %.2f degree\"%u ;\n", + "print \" b) The dc voltage V_dr of rectifier, V_dr = %.2f V \"%V_d ;\n", + "print \" c) Displacement factor of rectifier, math.cos\u03b8 = %.3f \"%cos_theta ;\n", + "print \" and \u03b8 = %.1f degree \"%math.acos(cos_theta) ;\n", + "print \" d) Magnetizing var input to rectifier, Q_r = %.4e var \"%Q_r ;\n", + "\n", + "print \" NOTE : In cased 7.6546e+07 var is same as 7.6546*10**7 var = 76.546 Mvar \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.5 : SOLUTION :-\n", + " a) Overlap angle u of rectifier, u = 1.72 degree\n", + " b) The dc voltage V_dr of rectifier, V_dr = 115482.48 V \n", + " c) Displacement factor of rectifier, math.cos\u03b8 = 0.924 \n", + " and \u03b8 = 0.4 degree \n", + " d) Magnetizing var input to rectifier, Q_r = 1.0578e+10 var \n", + " NOTE : In cased 7.6546e+07 var is same as 7.6546*10**7 var = 76.546 Mvar \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "I_d = 1600. ; # Max continuous dc current in A\n", + "V_d0 = 125. * 10**3 ; # voltage rating of bridge rectifier in V\n", + "V_d = 100. * 10**3 ; # dc voltage of rectifier in V\n", + "X_C = 6.2292017 ; # commutating reactancw when all 3 breakers are closed\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "R_C = (3/math.pi) * X_C ;\n", + "cos_alpha = (V_d + R_C*I_d)/V_d0 ; # Firing angle \u03b1\n", + "alpha = math.acos(cos_alpha) ;\n", + "\n", + "# For case (b)\n", + "# V_d = (1/2)*V_d0*(cos_alpha + cos_delta)\n", + "cos_delta = (2 * V_d/V_d0) - cos_alpha ;\n", + "delta = math.acos(cos_delta) ;\n", + "u = delta - alpha ; # Overlap angle u in degree\n", + "\n", + "# For case (c)\n", + "cos_theta = V_d/V_d0 ; # power factor\n", + "theta = math.degrees(math.acos(cos_theta)) ;\n", + "\n", + "# For case (d)\n", + "Q_r = V_d * I_d * math.tan(math.radians(theta)) ; # magnetizing var I/P\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.6 : SOLUTION :-\") ;\n", + "print \" a) Firing angle \u03b1 of rectifier, \u03b1 = %.2f degree\"%(alpha) ;\n", + "print \" b) Overlap angle u of rectifier, u = %.2f degree\"%(u) ;\n", + "print \" c) Power factor , math.cos\u03b8 = %.2f \"%(cos_theta) ;\n", + "print \" and \u03b8 = %.2f degree \"%(theta) ;\n", + "print \" d) Magnetizing var input , Q_r = %.2e var \"%(Q_r) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.6 : SOLUTION :-\n", + " a) Firing angle \u03b1 of rectifier, \u03b1 = 0.50 degree\n", + " b) Overlap angle u of rectifier, u = 0.26 degree\n", + " c) Power factor , math.cos\u03b8 = 0.80 \n", + " and \u03b8 = 36.87 degree \n", + " d) Magnetizing var input , Q_r = 1.20e+08 var \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "X_C = 12.649731 ; # commutating reactancw when 2 breakers are open\n", + "alpha = 0 ;\n", + "I_d = 1600 ; # DC current in A\n", + "E_LN = 53.4188 * 10**3 ; # Wye-side rating in V\n", + "V_d0 = 125 * 10**3 ; # voltage rating of bridge rectifier in V\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "E_m = math.sqrt(2) * E_LN ;\n", + "u = math.acos(1 - (2 * X_C * I_d)/(math.sqrt(3) * E_m)) ; # overlap angle u = \u03b4\n", + "\n", + "# For case (b)\n", + "# math.since rectifier operates in first mode i.e doesn't operate in second mode\n", + "R_C = (3/math.pi) * X_C ;\n", + "V_dr = ( V_d0 * math.cos(math.radians(alpha)) ) - (R_C*I_d) ; # dc voltage of rectifier in V\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.7 : SOLUTION :-\") ;\n", + "print \" a) u = %.1f degree \"%(u) ;\n", + "print \" math.since u < 60 degree . The rectifier operates at FIRST mode , the normal operating mode \";\n", + "print \" b) When dc current is 1600 A , V_dr = %.2f V \"%(V_dr) ;\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.7 : SOLUTION :-\n", + " a) u = 0.8 degree \n", + " math.since u < 60 degree . The rectifier operates at FIRST mode , the normal operating mode \n", + " b) When dc current is 1600 A , V_dr = 105672.63 V \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "X_C = 6.2292 ; # commutating reactancw when all 3 breakers are closed\n", + "I_db = 1600. ; # dc current base in A\n", + "V_db = 125. * 10**3 ; # dc voltage base in V\n", + "I_d = I_db ; # Max continuous current in A\n", + "V_d = 100. * 10**3 ; # dc voltage in V\n", + "alpha = 0 ; # Firing angle \u03b1 = 0 degree\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "R_c = (3/math.pi) * X_C ;\n", + "R_cb = V_db/I_db ; # resistance base in \u03a9\n", + "V_d_pu = V_d/V_db ; # per unit voltage\n", + "I_d_pu = I_d/I_db ; # per unit current\n", + "R_c_pu = R_c/R_cb ; # per unit \u03a9\n", + "E_pu = (V_d_pu + R_c_pu * I_d_pu)/math.cos(math.radians(alpha)) ; # Open ckt dc voltage in pu\n", + "V_d0 = E_pu * V_db ; # Open ckt dc voltage in V\n", + "\n", + "# For case (b)\n", + "E = V_d0/2.34; # Open ckt ac voltage on wye side of transformer in V \n", + "\n", + "# For case (c)\n", + "E_1LN = 92.95 * 10**3 ; # voltage in V\n", + "E_1B = E_1LN ;\n", + "E_LN = 53.44 * 10**3 ; # voltage in V\n", + "a = E_1LN/E_LN ;\n", + "n = a ; # when LTC on neutral\n", + "X_c_pu = 2 * R_c_pu ;\n", + "E_1_pu = E_1LN / E_1B ; # per unit voltage\n", + "cos_delta = math.cos(math.radians(alpha)) - ( (X_c_pu * I_d_pu)/( (a/n) *E_1_pu) ) ;\n", + "delta = math.acos(cos_delta) ;\n", + "u = delta - alpha ; \n", + "\n", + "# For case (d)\n", + "cos_theta = V_d/V_d0 ; # pf of rectifier\n", + "theta = math.acos(cos_theta) ;\n", + "\n", + "# For case (e)\n", + "Q_r = V_d*I_d*math.degrees(math.atan(theta)) ; # magnetizing var I/P\n", + "\n", + "# For case (f)\n", + "d_V = E_LN - E ; # necessary change in voltage in V\n", + "p_E_LN = 0.00625 * E_LN ; # one buck step can change in V/step\n", + "no_buck = d_V / p_E_LN ; # No. of steps of buck\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 6.10 : SOLUTION :-\") ;\n", + "print \" a) Open circuit dc Voltage , V_d0 = %.2f V \"%(V_d0);\n", + "print \" b) Open circuit ac voltage on wye side of transformer , E = %.2f V \"%(E);\n", + "print \" c) Overlap angle , u = %.2f degree \"%(u)\n", + "print \" d) Power factor , math.cos\u03b8 = %.3f \"%(cos_theta);\n", + "print \" and \u03b8 = %.2f degree \"%(theta);\n", + "print \" e) Magnetizing var input to rectifier , Q_r = %.4e var \"%(Q_r);\n", + "print \" f) Number of 0.625 percent steps of buck required , No. of buck = %.f steps \"%(no_buck);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 6.10 : SOLUTION :-\n", + " a) Open circuit dc Voltage , V_d0 = 109517.52 V \n", + " b) Open circuit ac voltage on wye side of transformer , E = 46802.36 V \n", + " c) Overlap angle , u = 0.56 degree \n", + " d) Power factor , math.cos\u03b8 = 0.913 \n", + " and \u03b8 = 0.42 degree \n", + " e) Magnetizing var input to rectifier , Q_r = 3.6451e+09 var \n", + " f) Number of 0.625 percent steps of buck required , No. of buck = 20 steps \n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..78e631ed --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch7.ipynb @@ -0,0 +1,486 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:96076595abf09dd710004699f7ec4a1a68d794473f1e325edf3b10aa8945f675" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Transient Overvolatages and Insulation Coordination" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # GIVEN DATA\n", + "V = 1000. ; # surge voltage in kV\n", + "Z_c = 500. ; # surge impedance in \u03a9\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "P = V**2/Z_c ; # Total surge power in MW\n", + "\n", + "# For case (b)\n", + "V1 = V*10**3 ; # surge voltage in V\n", + "i = V1/Z_c ;# surge current in A\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Total surge power in line , P = %d MW \"%P ;\n", + "print \" b) Surge current in line , i = %d A \"%(i) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Total surge power in line , P = 2000 MW \n", + " b) Surge current in line , i = 2000 A \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "V = 1000. ; # surge voltage in kV\n", + "Z_c = 50. ; # surge impedance in \u03a9\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "P = V**2/Z_c ; # Total surge power in MW\n", + "\n", + "# For case (b)\n", + "V1 = V*10**3 ; # surge voltage in V\n", + "i = V1/Z_c ;# surge current in A\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Total surge power in line , P = %d MW \"%(P) ;\n", + "print \" b) Surge current in line , i = %d A \"%(i) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Total surge power in line , P = 20000 MW \n", + " b) Surge current in line , i = 20000 A \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "R = 500. ; # resistance in \u03a9\n", + "Z_c = 400. ; # characteristic impedance in \u03a9\n", + "v_f = 5000. ; # Forward travelling voltage wave in V\n", + "i_f = 12.5 ; # Forward travelling current wave in A\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r_v = (R - Z_c)/(R + Z_c) ; # Reflection coefficient of voltage wave\n", + "\n", + "# For case (b)\n", + "r_i = -(R - Z_c)/(R + Z_c) ; # Reflection coefficient of current wave\n", + "\n", + "# For case (c)\n", + "v_b = r_v * v_f ; # Backward-travelling voltage wave in V\n", + "\n", + "# For case (d)\n", + "v = v_f + v_b ; # Voltage at end of line in V\n", + "v1 = (2 * R/(R + Z_c)) * v_f ; # (or) Voltage at end of line in V\n", + "\n", + "# For case (e)\n", + "t1 = (2 * R/(R + Z_c)) ; # Refraction coefficient of voltage wave\n", + "\n", + "# For case (f)\n", + "i_b = -( v_b/Z_c ) ; # backward-travelling current wave in A\n", + "i_b1 = -r_v * i_f ; # (or) backward-travelling current wave in A\n", + "\n", + "\n", + "# For case (g)\n", + "i = v/R ; # Current flowing through resistor in A\n", + "\n", + "# For case (h)\n", + "t2 = (2 * Z_c/(R + Z_c)) ; # Refraction coefficient of current wave\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 7.4 : SOLUTION :-\") ;\n", + "print \" a) Reflection coefficient of voltage wave , \u03c1 = %.4f \"%(r_v) ;\n", + "print \" b) Reflection coefficient of current wave , \u03c1 = %.4f \"%(r_i) ;\n", + "print \" c) Backward-travelling voltage wave , v_b = %.3f V \"%(v_b) ;\n", + "print \" d) Voltage at end of line , v = %.3f V \"%(v) ;\n", + "print \" From alternative method \"\n", + "print \" Voltage at end of line , v = %.3f V \"%(v) ;\n", + "print \" e) Refraction coefficient of voltage wave , \u0393 = %.4f \"%(t1) ;\n", + "print \" f) Backward-travelling current wave , i_b = %.4f A \"%(i_b) ;\n", + "print \" g) Current flowing through resistor, i = %.4f A \"%(i) ;\n", + "print \" h) Refraction coefficient of current wave , \u0393 = %.4f \"%(t2) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 7.4 : SOLUTION :-\n", + " a) Reflection coefficient of voltage wave , \u03c1 = 0.1111 \n", + " b) Reflection coefficient of current wave , \u03c1 = -0.1111 \n", + " c) Backward-travelling voltage wave , v_b = 555.556 V \n", + " d) Voltage at end of line , v = 5555.556 V \n", + " From alternative method \n", + " Voltage at end of line , v = 5555.556 V \n", + " e) Refraction coefficient of voltage wave , \u0393 = 1.1111 \n", + " f) Backward-travelling current wave , i_b = -1.3889 A \n", + " g) Current flowing through resistor, i = 11.1111 A \n", + " h) Refraction coefficient of current wave , \u0393 = 0.8889 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import array,zeros,arange\n", + "from matplotlib.pyplot import plot,xlabel,ylabel,suptitle,subplot\n", + "\n", + "\n", + "# GIVEN DATA\n", + "Z_c1 = 400. ; # Surge impedance of line in \u03a9\n", + "Z_c2 = 40. ; # Surge impedance of cable in \u03a9\n", + "v_f = 200. ; # Forward travelling surge voltage in kV\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "v_f1 = v_f * 10**3 ; # surge voltage in V\n", + "i_f = v_f1/Z_c1 ; # Magnitude of forward current wave in A\n", + "\n", + "# For case (b)\n", + "r = (Z_c2 - Z_c1)/(Z_c2 + Z_c1) ; # Reflection coefficient\n", + "\n", + "# For case (c)\n", + "t = 2 * Z_c2/(Z_c2 + Z_c1) ; # Refraction coefficient\n", + "\n", + "# For case (d)\n", + "v = t * v_f ; # Surge voltage transmitted forward into cable in kV\n", + "\n", + "# For case (e)\n", + "v1 = v * 10**3 ; # Surge voltage transmitted forward into cable in V\n", + "I = v1/Z_c2 ; # Surge current transmitted forward into cable in A\n", + "\n", + "# For case (f)\n", + "v_b = r * v_f ; # surge voltage reflected back along overhead line in kV\n", + "\n", + "# For case (g)\n", + "i_b = -r * i_f ; # surge current reflected back along overhead line in A\n", + "\n", + "# For case (h)\n", + "# Arbitrary values are taken in graph.Only for reference not for scale \n", + "T = arange(0,300.1,0.1) #T = 0:0.1:300 ;\n", + "vo = zeros(len(T))\n", + "for i in range(0,len(T)/3): # plotting Voltage values\n", + " vo[i] = 3;\n", + "\n", + "for i in range(len(T)/3,len(T)):\n", + " vo[i] = 1 ;\n", + "\n", + "vo[i-1]=0;\n", + "''' \n", + "for i = int(length(T))\n", + " vo(i) = 0 ;\n", + "end\n", + "'''\n", + "\n", + "subplot(2,1,1) ;\n", + "plot(T,vo)#,2)#,'012')#,'',[0,0,310,6]) ;\n", + "ylabel(\"Voltage\")\n", + "suptitle(\"Junction\")\n", + "\n", + "io = zeros(len(T))\n", + "for i in range(0,len(T)/3): # plotting Voltage values\n", + " io[i] = 1;\n", + "\n", + "for i in range(len(T)/3,len(T)):\n", + " io[i] = 3 ;\n", + "\n", + "io[i-1]=0;\n", + "\n", + "\n", + "subplot(2,1,2) ;\n", + "plot(T,io)#,5,'012','',[0,0,310,6]) ;\n", + "ylabel(\"Current\")\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 7.5 : SOLUTION :-\") ;\n", + "print \" a) Magnitude of forward current wave , i_f = %d A \"%(i_f) ;\n", + "print \" b) Reflection coefficient , \u03c1 = %.4f \"%(r) ;\n", + "print \" c) Refraction coefficient , \u0393 = %.4f \"%(t) ;\n", + "print \" d) Surge voltage transmitted forward into cable , v = %.2f kV \"%(v) ;\n", + "print \" e) Surge current transmitted forward into cable , i = %.f A \"%(I) ;\n", + "print \" f) Surge voltage reflected back along the OH line , v_b = %.2f kV \"%(v_b) ;\n", + "print \" g) Surge current reflected back along the OH line , i_b = %.f A \"%(i_b) ;\n", + "print \" h Graph shows plot of voltage & current surges after arrival at the junction \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 7.5 : SOLUTION :-\n", + " a) Magnitude of forward current wave , i_f = 500 A \n", + " b) Reflection coefficient , \u03c1 = -0.8182 \n", + " c) Refraction coefficient , \u0393 = 0.1818 \n", + " d) Surge voltage transmitted forward into cable , v = 36.36 kV \n", + " e) Surge current transmitted forward into cable , i = 909 A \n", + " f) Surge voltage reflected back along the OH line , v_b = -163.64 kV \n", + " g) Surge current reflected back along the OH line , i_b = 409 A \n", + " h Graph shows plot of voltage & current surges after arrival at the junction \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAESCAYAAAAWtRmOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG/JJREFUeJzt3X+wnHV96PF3EhIJCfdGBg2BpD0QoAX1VkBCChSOojaJ\nt1ArU3AuY4szSikURu9VhHKb/OGtYMerg1pABYpYoFavGdC0itZDkWoUkhAgSSUhYQIJSVoCQjIY\nfuz94/McdvOcPXsezu6zu9/nvF8zO/vss8959vudb7Kf/f4GSZIkSZIkSZIkSZIkSZIkSVJJXujw\n/a7Kvb6/w/eXJHXB831+P6nvTO51AqQuORO4u+H1l4A/yY63AMuAB4G1wG9l52cCt2TnHgL+CPgM\nMB1YDdyWXTdcM5kE/A3wcPY3f5ydHwSGgH8E1gPf6EyWJEnteJ6RweGLwIey483AJdnxxcBXs+Nr\ngf/b8DezGu6Xvz/AB4AfEEHizcATwGFEcHgWODx779+A08abGakbrDlI4f9lz6uAgez4LODLDdc8\nO8Y9TgduB2rATuBe4OTs9c+BbdnxmobPkPqSwUETxcvs/+99eu79X2fPrwAHNJyf9Do+o9bk+lru\n/s0+Q+o7BgdNFE8AxwPTiOahdxX4m3uoNzdBvVnpJZp/ud8HnEf8v3oTcAZRY3g9AUbqCwYHVd0B\nxK/2J4FvAo8A/0A0HzVTo/5r/9PAG4kO5jVE3wHAV4gO59sa/gbgO9Q7r38EfIJoXmq8J7m/kST1\nwO8AP+t1IiRJ/ePPgEeBd/c6IZIkSZIkSZIkSZIkSZIkSZIkSZL6z4HASmLZgXXEOvjNXAc8Riw5\ncEJ3kiZJ6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6E1pHy6+fgUNXJcKcR/0gXA5cQzRaNalQr72PlJ8W8Xg8cSTRZbAc+1+LaFPI3\nE/g2cDnwfO69KpTfTOBbRP5eoFrl9yqRj7nAGcA7c++Pu/z6OTg8RXQoDZvH/lEvVduz513Ad4hq\n3Q6ifRRgDrCzB+nqpNHyky/Tudm51Oyk/p/ua9Sr5inmbyoRGG4DlmfnqlR+w/n7BvX8Van8hj0H\nfA84iWqVX1NFJtGl5iDg4Ox4BnA/MWLgs9RHY32KtDqkIcoo3yHdLD/DHWLTiF9umyh3ln6nDLB/\n/uY0HH8MuD07Ti1/k4CvA5/Pna9K+Y2Wv6qU36HUm8SmA/8KnEV1yq+lZpPoUnYkUThriKF1w3k6\nhOiHSHEo6x3ANmAf0Ud0Ia3zcxVRnhuA3+9qSscnn78PE184a4k26+Xs30eUUv5OJ5ol1lAf1rmI\n6pRfs/wtpjrl9zZgFZG/tcAnsvNVKT9JkiRJkiRJkiRJkiRJkiRJkiRJkpr7/8rkH/6fcwFaAAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import arange,zeros\n", + "from matplotlib.pyplot import plot,subplot,xlabel,ylabel,text,show\n", + "\n", + "# GIVEN DATA\n", + "v = 1000 ; # ideal dc voltage source in V\n", + "Z_s = 0. ; # internal impedance in \u03a9\n", + "Z_c = 40. ; # characteristic impedance in \u03a9\n", + "Z_r = 60. ; # Cable is terminated in 60\u03a9 resistor\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r_s = (Z_s - Z_c)/(Z_s + Z_c) ; # Reflection coefficient at sending end\n", + "\n", + "# For case (b)\n", + "r_r = (Z_r - Z_c)/(Z_r + Z_c) ; # Reflection coefficient at receiving end\n", + "\n", + "# For case (c)\n", + "T = arange(0,10.601,0.001) #0:0.001:10.6 ; # # plotting values\n", + "x = zeros(len(T))\n", + "for i in range(len(T)):\n", + " if(T[i]<=1):\n", + " x[i] = (1.2)*T[i] - 1 ;\n", + " elif(T[i]>=1 and T[i]<=2):\n", + " x[i] = (-1.2)*T[i] + 1.4 ;\n", + " elif(T[i]>=2 and T[i]<=3):\n", + " x[i] = (1.2)*T[i]- 3.4 ;\n", + " elif(T[i]>=3 and T[i]<=4):\n", + " x[i] = (-1.2)*T[i] + 3.8 ;\n", + " elif(T[i]>=4 and T[i]<=5):\n", + " x[i] = (1.2)*T[i]- 5.8 ;\n", + " elif(T[i]>=5 and T[i]<=6):\n", + " x[i] = (-1.2)*T[i] + 6.2 ;\n", + " elif(T[i]>=6 and T[i]<=7):\n", + " x[i] = (1.2)*T[i]- 8.2 ;\n", + " elif(T[i]>=7 and T[i]<=8):\n", + " x[i] = (-1.2)*T[i] + 8.6 ;\n", + " elif(T[i]>=8 and T[i]<=9):\n", + " x[i] = (1.2)*T[i]- 10.6 ;\n", + " elif(T[i]>=9 and T[i]<=10):\n", + " x[i] = (-1.2)*T[i] + 11 ;\n", + " elif(T[i]>=10 and T[i]<=10.6):\n", + " x[i] = (1.2)*T[i] - 13 ;\n", + "\n", + "subplot(2,1,1) ; # Plotting two graph in same window\n", + "plot(T,x)#,5,'012','',[0,-1,11,0.2]) ;\n", + "\n", + "xlabel(\"TIME\") ;\n", + "ylabel(u\"\u03c1_s = -1 DISTANCE \u03c1_r = 0.2\") ;\n", + "suptitle(\"Fig 7.6 (c) Lattice diagram\") ;\n", + "#xset('thickness',2) ; # sets thickness of axes\n", + "text(1,-1,u'T') ;\n", + "text(2,-1,u'2T') ;\n", + "text(3,-1,u'3T') ;\n", + "text(4,-1,u'4T') ;\n", + "text(5,-1,u'5T') ;\n", + "text(6,-1,u'6T') ;\n", + "text(7,-1,u'7T') ;\n", + "text(8,-1,u'8T') ;\n", + "text(9,-1,u'9T') ;\n", + "text(10,-1,u'10T') ;\n", + "text(0.1,0.1,u'0V') ;\n", + "text(2,0.1,u'1200V') ;\n", + "text(4,0.1,u'960V') ;\n", + "text(6,0.1,u'1008V') ;\n", + "text(8,0.1,u'998.4V') ;\n", + "text(1,-0.88,u'1000V') ;\n", + "text(3,-0.88,u'1000V') ;\n", + "text(5,-0.88,u'1000V') ;\n", + "text(7,-0.88,u'1000V') ;\n", + "text(9,-0.88,u'1000V') ;\n", + "\n", + "# For case (d)\n", + "q1 = v ; # Refer Fig 7.11 in textbook\n", + "q2 = r_r * v ;\n", + "q3 = r_s * r_r * v ;\n", + "q4 = r_s * r_r**2 * v ;\n", + "q5 = r_s**2 * r_r**2 * v ;\n", + "q6 = r_s**2 * r_r**3 * v ;\n", + "q7 = r_s**3 * r_r**3 * v ;\n", + "q8 = r_s**3 * r_r**4 * v ;\n", + "q9 = r_s**4 * r_r**4 * v ;\n", + "q10 = r_s**4 * r_r**5 * v ;\n", + "q11 = r_s**5 * r_r**5 * v ;\n", + "V_1 = v - q1 ;\n", + "V_2 = v - q3 ;\n", + "V_3 = v - q5 ;\n", + "V_4 = v - q7 ; # voltage at t = 6.5T and x = 0.25l in Volts\n", + "V_5 = v - q9 ;\n", + "\n", + "# For case (e)\n", + "t = arange(0,9.001,0.001) #t = 0:0.001:9 ;\n", + "y = zeros(len(t))\n", + "for i in range(len(t)):\n", + " if(t[i]>=0 and t[i]<=1):\n", + " y[i] = V_1 ;\n", + " elif(t[i]>=1 and t[i]<=3):\n", + " y[i] = V_2 ;\n", + " elif(t[i]>=3 and t[i]<=5):\n", + " y[i]= V_3 ;\n", + " elif(t[i]>=5 and t[i]<=7):\n", + " y[i]= V_4 ;\n", + " elif(t[i]>=7 and t[i]<=9):\n", + " y[i]= V_5 ;\n", + "\n", + "subplot(2,1,2) ;\n", + "#a = gca() ;\n", + "#a.thickness = 2 ; # sets thickness of plot\n", + "plot(t,y)#,2,'012','',[0,0,10,1300]) ;\n", + "#a.x_label.text = 'TIME (T)' ; # labels x-axis\n", + "#a.y_label.text = 'RECEIVING-END VOLTAGE (V)' ; # labels y-axis\n", + "suptitle(\"Fig 7.6 (e) . Plot of Receiving end Voltage v/s Time\") ;\n", + "#xset('thickness',2); # sets thickness of axes\n", + "text(1,0,u'1T') ; # naming points\n", + "text(3,0,u'3T') ;\n", + "text(5,0,u'5T') ;\n", + "text(7,0,u'7T') ;\n", + "text(1,1200,u'1200 V') ;\n", + "text(4,960,u'960 V') ;\n", + "text(6,1008,u'1008 V') ;\n", + "text(8,998.4,u'998.4 V') ;\n", + "show()\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 7.6 : SOLUTION :-\") ;\n", + "print \" a) Reflection coefficient at sending end , \u03c1_s = %.f \"%(r_s) ;\n", + "print \" b) Reflection coefficient at sending end , \u03c1_r = %.1f \"%(r_r)\n", + "print \" c The lattice diagram is shown in Fig 7.6 c \" ;\n", + "print \" d) From Fig 7.6 c) , the voltage value is at t = 6.5T and x = 0.25 l is = %.d Volts \"%(V_4) ;\n", + "print \" e The plot of the receiving-end voltage v/s time is shown in Fig 7.6 e \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAE1CAYAAAAbPrzJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4VFX6+D9JCAIi0kKABA2EGlPoIIr0JoIURWJDcS3r\n7tpZFHXF/a2ChXX56trWhqsrqHQhCIgUCyV0lU4oIYCQ0JIAIeT8/nhnMpPJTGYmc+80zud57jMz\n994557y3nPec877nPaDRaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9FoNBqNRqPx\nFwOB+4AEh/1j/V8UjUaj0QQzk4CVwL+APcAjdsc2BqREGo1GowlafgGiLd9rAxmIAolAKw2NRqO5\n5Ih0czwKuGD5fhIYAtQCvgKqmlgujUaj0YQgC4AeTvb/Ayj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xwb3OnFEKlPr6ayNDhrln5cqVasOGDSo5Obl03+LFi9XF\nixeVUkqNHz9ejR8/Ximl1K+//qrS0tJUUVGRysrKUomJiaqkpEQppVSnTp3UmjVrlFJKDRo0SGVk\nZKiSkhLVpEkTtX//frVmjcj33/9mqD59+vhFtq1bt6rk5GR19uxZVVxcrPr27at2796tli1bpvr2\n7auKioqUUkr9/vvvLuW7ePGiWrx4serVq1eZtG+77Tb13//+t/T3iy+KfJbL5hec3btx48apV155\nRSml1OTJk93eu/Pnz6u6deuq3NxcpZRSf/3rX9XEiRPL3DullGrVSinw371TyvX969ixo1q5cqVS\nSqmPPvpIPf/880oppT7++GM1evRopZRShYWFKiEhobT8jhw4cEANGDBAJSQkqNzcXAVKXXXV7Wra\ntGml55w8eVLVr19fnT171mRJw4Pvv/++tK584YUXvA5YGOieRibQAluU29twCHkOXAXMAu5EFIdL\nJk6cyMSJExk0aBApKSkkJCQQHR3N6NGjWbBgAT169GD+/Pml50+fPp309HSvCpxhiZL1zTde/c1n\nunfvTp06dcrs69evH5GRcgu7dOlCdrZElZ87dy7p6elER0eTkJBA8+bNWbNmDYcPH+bMmTN07twZ\ngLvvvps5c+YQERHBqFGjmD59OrNmSdpvveX9taks27dvp0uXLlSrVo2oqCh69OjBrFmzePfdd3nm\nmWeIjo4GICYmxqV869ato3fv3mzfvr20hV1QUMB3333HsGHDSvNauVI+1671i2iA83s3b948xowZ\nA8CYMWOYM2cO4Fy2tWvXUqVKFerUqUN+fj5KKU6dOkVcXFyZe1dcDFlZANMZPtw/9w6c37+ZM2ey\na9cuunfvDkDfvn2ZOXMmAI0aNaKgoICLFy9SUFBA1apVqVWrltO0n3jiCV599VUA9u2TfUqlM336\n9NJzZs+ezcCBA6lWrZp5QoYRPXv2LK0rJ06c6PX/A6007KPc/gbMwBbl1hrp9m9AHWTlvo2A29f9\n0KFDNGliW6YjPj6eQ4cOkZ5ue9hycnLYtWsXvXv39qrAs2bB88/D/Png5aiWqXz00UelwzA5OTnE\n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QH3sdOmFxKAefoSBS/Bb7uLBozCTs+DcKOo/vIcyJRUu7T6I2vN/0dAP7jOogu\nPsCSKsA17OzwUXfhtLsebwdiO+8Vh7HkjAEWAK/g1wxDn2IpxU6OtsWvb2Nn9T6Zi02gefduXyyw\n/2LHpxIsuZYA7zmNCD6LXeXfBNqAt4C8lvpNetLQTX/3J4VdCR12HAfYPtiEdeftx7o5XNsMrMOm\ndfsiAmqBo8A3HccCMBa4DLwKHAO20nHV6IvlWFeQa1eAnwIXgX8AV7G/pUsnsKT/CPZ3W4idLN1V\n0pOGlgW8d0Owfui12BWHa1ms22wM8GXgK06jgaeBf2H94T6d2T+JJfr5QDX2g3epGPgC8HK8TQM/\ncBrRnQYCi4DfuQ4E6/b5Nnay9ij2G1zlMiBsHPjHwF6gBtvf8zpJSnrSeI87+yvLsasN6dkAYDfw\nK+ANx7F09SHwJjDdcRwzga9iYwg7gNnAL51GZN6Pt5eBP2Bdsy5dih9vx693YcnDF/OBv2Dt5dp0\n4BDQjHXj/R7bz1zbhsVWhV39nHYbTt/w+aa/FH4NhPfDDn6bXQfSyXBsBg7AQ0A9MKf3r/e5KvyY\nPVUCfDJ+PhhoAOb1/vU+Uw98Jn6+kTtXaHBtJ+4Hm3OewLqDHsJ+h9uxq0XXRsTbT2NjnEMdxtKn\nfLzpbwfWd3kLG3NZ4zYcwGYlZbHEmpuO+NT//ReFNxnrD2/CppOucxtON1X4MXtqLNZGTdjBx5f9\n/AnsSuMd7OzZl9lTg4F/05FofbCejim327GrftfqsZiagFmOYxERERERERERERERERERERERERER\nEREREREREZHe/A+psmoTU8ad5wAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 7.6 : SOLUTION :-\n", + " a) Reflection coefficient at sending end , \u03c1_s = -1 \n", + " b) Reflection coefficient at sending end , \u03c1_r = 0.2 \n", + " c The lattice diagram is shown in Fig 7.6 c \n", + " d) From Fig 7.6 c) , the voltage value is at t = 6.5T and x = 0.25 l is = 1008 Volts \n", + " e The plot of the receiving-end voltage v/s time is shown in Fig 7.6 e \n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6714ed49 --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch8.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fa9c72757f3efafaf142b4087676d5628742ca42f15fef5b32daec2b9625acdb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Limiting Factors for Extra High and Ultrahigh Voltage Transmission : Corona, Radio Noise, and Audible Noise" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "m_0 = 0.90 ; # Irregularity factor\n", + "p = 74. ; # Atmospheric pressure in Hg\n", + "t = 10. ; # temperature in degree celsius\n", + "D = 550. ; # Equilateral spacing b/w conductors in cm\n", + "d = 3. ; # overall diameter in cm\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "r = d/2 ;\n", + "delta = 3.9211 * p/( 273 + t ) ; # air density factor\n", + "V_0_ph = 21.1 * delta * m_0 * r * math.log(D/r) ; # disruptive critical rms line voltage in kV/phase\n", + "V_0 = math.sqrt(3) * V_0_ph ; # disruptive critical rms line voltage in kV \n", + "\n", + "# For case (b)\n", + "m_v = m_0 ;\n", + "V_v_ph = 21.1*delta*m_v*r*(1 + (0.3/math.sqrt(delta*r) )) * math.log(D/r) ; # visual critical rms line voltage in kV/phase\n", + "V_v = math.sqrt(3)*V_v_ph ; # visual critical rms line voltage in kV \n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 8.1 : SOLUTION :-\") ;\n", + "print \" a) Disruptive critical rms line voltage , V_0 = %.1f kV \"%(V_0) ;\n", + "print \" b) Visual critical rms line voltage , V_v = %.1f kV \"%(V_v) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 8.1 : SOLUTION :-\n", + " a) Disruptive critical rms line voltage , V_0 = 298.7 kV \n", + " b) Visual critical rms line voltage , V_v = 370.9 kV \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "f = 60. ; # freq in Hz\n", + "d = 3. ; # overall diameter in cm\n", + "D = 550. ; # Equilateral spacing b/w conductors in cm\n", + "V1 = 345. ; # operating line voltage in kV\n", + "V_0 = 172.4 ; # disruptive critical voltage in kV\n", + "L = 50. ; # line length in mi\n", + "p = 74. ; # Atmospheric pressure in Hg\n", + "t = 10. ; # temperature in degree celsius\n", + "m_0 = 0.90 ; # Irregularity factor\n", + "\n", + "# CALCULATIONS\n", + "r = d/2 ;\n", + "delta = 3.9211 * p/( 273 + t ) ; # air density factor\n", + "V_0 = 21.1 * delta * m_0 * r * math.log(D/r) ; # disruptive critical rms line voltage in kV/phase\n", + "V =V1/math.sqrt(3) ; # Line to neutral operating voltage in kV\n", + "P_c = (390./delta)*(f+25)*math.sqrt(r/D)*(V - V_0)**2 * 10**-5 ; # Fair weather corona loss per phase in kW/mi/phase\n", + "P_cT = P_c * L ; # For total line length corona loss in kW/phase\n", + "T_P_c = 3 * P_cT ; # Total corona loss of line in kW\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 8.2 : SOLUTION :-\") ;\n", + "print \" a) Total fair weather corona loss of the line , P_c = %.1f kW \"%(T_P_c) ;\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 8.2 : SOLUTION :-\n", + " a) Total fair weather corona loss of the line , P_c = 1811.2 kW \n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..ad79101f --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/ch9.ipynb @@ -0,0 +1,1218 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6ae68b5e031eb2772013ad60211e5c2cf0a33ef68de618528722e2959cfa3168" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Symmetrical Components and Fault Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp\n", + "\n", + "# GIVEN DATA\n", + "V_a = 7.3 * exp(1j*12.5*math.pi/180) ; # Phase voltage in V\n", + "V_b = 0.4 * exp(1j*(-100)*math.pi/180) ; # Phase voltage in V\n", + "V_c = 4.4 * exp(1j*154*math.pi/180) ; # Phase voltage in V\n", + "a = 1. * exp(1j*120*math.pi/180) ; # operator 'a' by application of symmetrical components theory to 3-\u03a6 system . Refer section 9.3 for details\n", + "\n", + "# CALCULATIONS\n", + "V_a0 = (1./3) * (V_a + V_b + V_c) ; # Analysis equ in V\n", + "V_a1 = (1./3) * (V_a + a*V_b + a**2*V_c) ;\n", + "V_a2 = (1./3) * (V_a + a**2*V_b + a*V_c) ;\n", + "V_b0 = V_a0 ;\n", + "V_b1 = a**2 * V_a1 ;\n", + "V_b2 = a * V_a2 ;\n", + "V_c0 = V_a0 ;\n", + "V_c1 = a * V_a1 ;\n", + "V_c2 = a**2 * V_a2 ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.1 : SOLUTION :-\") ;\n", + "print \" The symmetrical components for the phase voltages V_a , V_b & V_c are\" ;\n", + "print \" V_a0 = %.2f<%.1f V \"%(abs(V_a0),math.degrees(math.atan2(V_a0.imag,V_a0.real) )) ;\n", + "print \" V_a1 = %.2f<%.1f V \"%(abs(V_a1),math.degrees(math.atan2(V_a1.imag,V_a1.real) )) ;\n", + "print \" V_a2 = %.2f<%.1f V \"%(abs(V_a2),math.degrees(math.atan2(V_a2.imag,V_a2.real) )) ;\n", + "print \" V_b0 = %.2f<%.1f V \"%(abs(V_b0),math.degrees(math.atan2(V_b0.imag,V_b0.real) )) ;\n", + "print \" V_b1 = %.2f<%.1f V \"%(abs(V_b1),math.degrees(math.atan2(V_b1.imag,V_b1.real) )) ;\n", + "print \" V_b2 = %.2f<%.1f V \"%(abs(V_b2),math.degrees(math.atan2(V_b2.imag,V_b2.real) )) ;\n", + "print \" V_c0 = %.2f<%.1f V \"%(abs(V_c0),math.degrees(math.atan2(V_c0.imag,V_c0.real) )) ;\n", + "print \" V_c1 = %.2f<%.1f V \"%(abs(V_c1),math.degrees(math.atan2 (V_c1.imag,V_c1.real) )) ;\n", + "print \" V_c2 = %.2f<%.1f V \"%(abs(V_c2),math.degrees(math.atan2(V_c2.imag,V_c2.real) )) ;\n", + "\n", + "print \" NOTE : V_b1 = 3.97<-99.5 V & V_c2 = 2.52<-139.7 V result obtained is same as textbook answer V_b1 = 3.97<260.5 V & V_c2 = 2.52<220.3 V \" ;\n", + "print \" Changes is due to a**2 = 1<240 = 1<-120 where 1 is the magnitude & <240 is the angle in degree \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.1 : SOLUTION :-\n", + " The symmetrical components for the phase voltages V_a , V_b & V_c are\n", + " V_a0 = 1.47<45.1 V \n", + " V_a1 = 3.97<20.5 V \n", + " V_a2 = 2.52<-19.7 V \n", + " V_b0 = 1.47<45.1 V \n", + " V_b1 = 3.97<-99.5 V \n", + " V_b2 = 2.52<100.3 V \n", + " V_c0 = 1.47<45.1 V \n", + " V_c1 = 3.97<140.5 V \n", + " V_c2 = 2.52<-139.7 V \n", + " NOTE : V_b1 = 3.97<-99.5 V & V_c2 = 2.52<-139.7 V result obtained is same as textbook answer V_b1 = 3.97<260.5 V & V_c2 = 2.52<220.3 V \n", + " Changes is due to a**2 = 1<240 = 1<-120 where 1 is the magnitude & <240 is the angle in degree \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import transpose,matrix,exp,conj\n", + "from numpy.linalg import inv\n", + "\n", + "# GIVEN DATA\n", + "V_abc = matrix([[0] , [50] , [-50]]) ; # Phase voltages of a 3-\u03a6 system in V\n", + "I_abc = matrix([[-5] , [5*1j] , [-5]]) ; # Phase current of a 3-\u03a6 system in A\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "S_3ph = transpose(V_abc) * conj(I_abc) ; # 3-\u03a6 complex power in VA\n", + "\n", + "# For case (b)\n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] , [1, a**2, a] , [1, a, a**2]]) ;\n", + "\n", + "V_012 = inv(A) * (V_abc) ; # Sequence voltage matrices in V\n", + "I_012 = inv(A) * (I_abc) ; # Sequence current matrices in A\n", + "\n", + "# For case (c)\n", + "S_3ph1 = 3 * matrix([V_012[0,0], V_012[1,0], V_012[2,0]]) * (conj(I_012)) ; # Three-phase complex power in VA . Refer equ 9.34(a)\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.2 : SOLUTION :-\") ;\n", + "print \" a) Three-phase complex power using equ 9.30 , S_3-\u03a6 = %.4f<%.f VA \"%(abs(S_3ph) , \\\n", + " math.degrees(math.atan2(S_3ph.imag,S_3ph.real) )) ;\n", + "print \" b) Sequence Voltage matrices , [V_012] = V \" ;\n", + "print \" %.f<%.f \"%(abs(V_012[0]),math.degrees(math.atan2(V_012[0].imag,V_012[0].real) )) ;\n", + "print \" %.4f<%.f \"%(abs(V_012[1]),math.degrees(math.atan2(V_012[1].imag,V_012[1].real) )) ;\n", + "print \" %.4f<%.f \"%(abs(V_012[2]),math.degrees(math.atan2(V_012[2].imag,V_012[2].real) )) ;\n", + "print \" Sequence current matrices , [I_012] = A \" ;\n", + "print \" %.4f<%.1f \"%(abs(I_012[0]),math.degrees(math.atan2(I_012[0].imag,I_012[0].real) )) ;\n", + "print \" %.4f<%.f \"%(abs(I_012[1]),math.degrees(math.atan2(I_012[1].imag,I_012[1].real) )) ;\n", + "print \" %.4f<%.f \"%(abs(I_012[2]),math.degrees(math.atan2(I_012[2].imag,I_012[2].real) )) ;\n", + "print \" c) Three-phase complex power using equ 9.34 , S_3-\u03a6 = %.4f<%.f VA \"%(abs(S_3ph1) ,\\\n", + " math.degrees(math.atan2(S_3ph1.imag,S_3ph1.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.2 : SOLUTION :-\n", + " a) Three-phase complex power using equ 9.30 , S_3-\u03a6 = 353.5534<-45 VA \n", + " b) Sequence Voltage matrices , [V_012] = V \n", + " 0<0 \n", + " 28.8675<90 \n", + " 28.8675<-90 \n", + " Sequence current matrices , [I_012] = A \n", + " 3.7268<153.4 \n", + " 2.3570<165 \n", + " 2.3570<-75 \n", + " c) Three-phase complex power using equ 9.34 , S_3-\u03a6 = 353.5534<-45 VA \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "from numpy import exp,matrix\n", + "\n", + "# GIVEN DATA\n", + "l = 40 ; # line length in miles\n", + "# Conductor parameter from Table A.3\n", + "r_a = 0.206 ; # Ohms per conductor per mile in \u03a9/mi\n", + "r_b = r_a ; # r_a = r_b = r_c in \u03a9/mi\n", + "D_s = 0.0311 ; # GMR in ft where D_s = D_sa = D_sb = D_sc\n", + "D_ab = math.sqrt(2**2 + 8**2) ; # GMR in ft\n", + "D_bc = math.sqrt(3**2 + 13**2) ; # GMR in ft\n", + "D_ac = math.sqrt(5**2 + 11**2) ; # GMR in ft\n", + "D_e = 2788.5 ; # GMR in ft math.since earth resistivity is zero\n", + "r_e = 0.09528 ; # At 60 Hz in \u03a9/mi\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "Z_aa = ((r_a + r_e) + 1j * 0.1213*math.log(D_e/D_s))*l ; # Self impedance of line conductor in \u03a9\n", + "Z_bb = Z_aa ;\n", + "Z_cc = Z_bb ;\n", + "Z_ab = (r_e + 1j * 0.1213*math.log(D_e/D_ab))*l ; # Mutual impedance in \u03a9\n", + "Z_ba = Z_ab ;\n", + "Z_bc = (r_e + 1j * 0.1213*math.log(D_e/D_bc))*l ;\n", + "Z_cb = Z_bc ;\n", + "Z_ac = (r_e + 1j * 0.1213*math.log(D_e/D_ac))*l ;\n", + "Z_ca = Z_ac ;\n", + "Z_abc = matrix([[Z_aa, Z_ab, Z_ac] , [Z_ba, Z_bb, Z_bc] , [Z_ca, Z_cb, Z_cc]]) ; # Line impedance matrix\n", + "\n", + "# For case (b)\n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] ,[1, a**2, a] ,[1, a, a**2]]) ;\n", + "Z_012 = inv(A) * Z_abc*A ; # Sequence impedance matrix\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.3 : SOLUTION :-\") ;\n", + "print \" a) Line impedance matrix , [Z_abc] = \", ; print Z_abc ;\n", + "print \" b) Sequence impedance matrix of line , [Z_012] = \", ; print Z_012 ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.3 : SOLUTION :-\n", + " a) Line impedance matrix , [Z_abc] = [[ 12.0512+55.33126941j 3.8112+28.25564744j 3.8112+26.40194347j]\n", + " [ 3.8112+28.25564744j 12.0512+55.33126941j 3.8112+25.92116624j]\n", + " [ 3.8112+26.40194347j 3.8112+25.92116624j 12.0512+55.33126941j]]\n", + " b) Sequence impedance matrix of line , [Z_012] = [[ 19.67360000+109.05044084j 0.53511824 +0.46920974j\n", + " -0.53511824 +0.46920974j]\n", + " [ -0.53511824 +0.46920974j 8.24000000 +28.47168369j\n", + " -1.07023649 -0.93841948j]\n", + " [ 0.53511824 +0.46920974j 1.07023649 -0.93841948j\n", + " 8.24000000 +28.47168369j]]\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 452" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix\n", + "\n", + "# GIVEN DATA\n", + "l = 40 ; # line length in miles\n", + "# Conductor parameter from Table A.3\n", + "r_a = 0.206 ; # Ohms per conductor per mile in \u03a9/mi\n", + "r_b = r_a ; # r_a = r_b = r_c in \u03a9/mi\n", + "D_s = 0.0311 ; # GMR in ft where D_s = D_sa = D_sb = D_sc\n", + "D_ab = math.sqrt(2**2 + 8**2) ; # GMR in ft\n", + "D_bc = math.sqrt(3**2 + 13**2) ; # GMR in ft\n", + "D_ac = math.sqrt(5**2 + 11**2) ; # GMR in ft\n", + "D_e = 2788.5 ; # GMR in ft math.since earth resistivity is zero\n", + "r_e = 0.09528 ; # At 60 Hz in \u03a9/mi\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "Z_s = ((r_a + r_e) + 1j*0.1213*math.log(D_e/D_s))*l ; # Self impedance of line conductor in \u03a9 . From equ 9.49\n", + "D_eq = (D_ab * D_bc * D_ac)**(1./3) ; # Equ GMR\n", + "Z_m = (r_e + 1j*0.1213*math.log(D_e/D_eq))*l ; # From equ 9.50\n", + "Z_abc = matrix([[Z_s, Z_m, Z_m] , [Z_m, Z_s, Z_m] , [Z_m, Z_m, Z_s]]) ; # Line impedance matrix\n", + "\n", + "# For case (b)\n", + "Z_012 = matrix([[(Z_s+2*Z_m), 0, 0] , [0, (Z_s-Z_m), 0] , [0, 0, (Z_s-Z_m)]]) ; # Sequence impedance matrix . From equ 9.54\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.4 : SOLUTION :-\") ;\n", + "print \" a) Line impedance matrix when line is completely transposed , [Z_abc] = \", ; print Z_abc ;\n", + "print \" b) Sequence impedance matrix when line is completely transposed , [Z_012] = \", ; print Z_012 ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.4 : SOLUTION :-\n", + " a) Line impedance matrix when line is completely transposed , [Z_abc] = [[ 12.0512+55.33126941j 3.8112+26.85958572j 3.8112+26.85958572j]\n", + " [ 3.8112+26.85958572j 12.0512+55.33126941j 3.8112+26.85958572j]\n", + " [ 3.8112+26.85958572j 3.8112+26.85958572j 12.0512+55.33126941j]]\n", + " b) Sequence impedance matrix when line is completely transposed , [Z_012] = [[ 19.6736+109.05044084j 0.0000 +0.j 0.0000 +0.j ]\n", + " [ 0.0000 +0.j 8.2400 +28.47168369j 0.0000 +0.j ]\n", + " [ 0.0000 +0.j 0.0000 +0.j 8.2400 +28.47168369j]]\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import matrix\n", + "from numpy.linalg import inv\n", + "\n", + "# GIVEN DATA\n", + "Z_012 = matrix([[(19.6736 + 109.05044*1j), (0.5351182 + 0.4692097*1j), (- 0.5351182 + 0.4692097*1j)] ,\n", + " [(- 0.5351182 + 0.4692097*1j), (8.24 + 28.471684*1j), (- 1.0702365 - 0.9384195*1j) ],\n", + " [(0.5351182 + 0.4692097*1j), (1.0702365 - 0.9384195*1j), (8.24 + 28.471684*1j)]]) ; # Line impedance matrix . result of exa 9.3\n", + "Y_012 = inv(Z_012) ; # Sequence admitmath.tance of line\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "Y_01 = Y_012[0,1] ;\n", + "Y_11 = Y_012[1,1] ;\n", + "m_0 = Y_01/Y_11 ; # Per-unit unbalance for zero-sequence in pu from equ 9.67b\n", + "m_0_per = m_0 * 100 ; # Per-unit unbalance for zero-sequence in percentage\n", + "\n", + "# For case (b)\n", + "Z_01 = Z_012[0,1] ;\n", + "Z_00 = Z_012[0,0] ;\n", + "m_01 = -(Z_01/Z_00) ; # Per-unit unbalance for zero-sequence in pu from equ 9.67b\n", + "m_01_per = m_01 * 100 ; # Per-unit unbalance for zero-sequence in percentage\n", + "\n", + "# For case (c)\n", + "Y_21 = Y_012[2,1] ;\n", + "Y_11 = Y_012[1,1] ;\n", + "m_2 = (Y_21/Y_11) ; # Per-unit unbalance for zero-sequence in pu from equ 9.67b\n", + "m_2_per = m_2 * 100 ; # Per-unit unbalance for zero-sequence in percentage\n", + "\n", + "# For case (d)\n", + "Z_21 = Z_012[2,1] ;\n", + "Z_22 = Z_012[2,2] ;\n", + "m_21 = -(Z_21/Z_22) ; # Per-unit unbalance for zero-sequence in pu from equ 9.67b\n", + "m_21_per = m_21 * 100 ; # Per-unit unbalance for zero-sequence in percentage\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.5 : SOLUTION :-\") ;\n", + "print \" a) Per-unit electromagnetic unbalance for zero-sequence , m_0 = %.2f<%.1f percent pu \"%(abs(m_0_per),\\\n", + " math.degrees(math.atan2(m_0_per.imag,m_0_per.real) )) ;\n", + "print \" b) Approximate value of Per-unit electromagnetic unbalance for negative-sequence , m_0 = %.2f<%.1f percent pu \"%\\\n", + " (abs(m_01_per),math.degrees(math.atan2(m_01_per.imag,m_01_per.real) )) ;\n", + "print \" c) Per-unit electromagnetic unbalance for negative-sequence , m_2 = %.2f<%.1f percent pu \"%\\\n", + " (abs(m_2_per),math.degrees(math.atan2(m_2_per.imag,m_2_per.real) )) ;\n", + "print \" d) Approximate value of Per-unit electromagnetic unbalance for negative-sequence , m_2 = %.2f<%.1f percent pu \"%\\\n", + " (abs(m_21_per),math.degrees(math.atan2(m_21_per.imag,m_21_per.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.5 : SOLUTION :-\n", + " a) Per-unit electromagnetic unbalance for zero-sequence , m_0 = 0.61<142.3 percent pu \n", + " b) Approximate value of Per-unit electromagnetic unbalance for negative-sequence , m_0 = 0.64<141.5 percent pu \n", + " c) Per-unit electromagnetic unbalance for negative-sequence , m_2 = 4.79<64.8 percent pu \n", + " d) Approximate value of Per-unit electromagnetic unbalance for negative-sequence , m_2 = 4.80<64.9 percent pu \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix\n", + "from numpy.linalg import inv\n", + "\n", + "# GIVEN DATA\n", + "kv = 115 ; # Line voltage in kV\n", + "\n", + "# For case (a)\n", + "h_11 = 90 ; # GMD b/w ground wires & their images\n", + "r_a = 0.037667 ; # Radius in metre\n", + "p_aa = 11.185 * math.log(h_11/r_a) ; # unit is F**(-1)m\n", + "p_bb = p_aa ;\n", + "p_cc = p_aa ;\n", + "l_12 = math.sqrt(22 + (45 + 37)**2) ;\n", + "D_12 = math.sqrt(2**2 + 8**2) ; # GMR in ft\n", + "p_ab = 11.185*math.log(l_12/D_12) ; # unit is F**(-1)m\n", + "p_ba = p_ab ;\n", + "D_13 = math.sqrt(3**2 + 13**2) ; # GMR in ft\n", + "l_13 = 94.08721051 ;\n", + "p_ac = 11.185 * math.log(l_13/D_13) ; # unit is F**(-1)m\n", + "p_ca = p_ac ;\n", + "l_23 = 70.72279912 ;\n", + "D_23 = math.sqrt(5**2 + 11**2) ; # GMR in ft\n", + "p_bc = 11.185 * math.log(l_23/D_23) ; # unit is F**(-1)m\n", + "p_cb = p_bc ;\n", + "P_abc = matrix([[p_aa, p_ab, p_ac] , [p_ba, p_bb, p_bc] , [p_ca, p_cb, p_cc]]) ; # Matrix of potential coefficients\n", + "\n", + "# For case (b)\n", + "C_abc = inv(P_abc) ; # Matrix of maxwells coefficients\n", + "\n", + "# For case (c)\n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] , [1, a**2, a] ,[1, a, a**2]]) ;\n", + "C_012 = inv(A) * C_abc * A ; # Matrix of sequence capacimath.tances\n", + "\n", + "# For case (d)\n", + "C_01 = C_012[0,1] ;\n", + "C_11 = C_012[1,1] ;\n", + "C_21 = C_012[2,1] ;\n", + "d_0 = C_01/C_11 ; # Zero-sequence electrostatic unbalances . Refer equ 9.115\n", + "d_2 = -C_21/C_11 ; # Negative-sequence electrostatic unbalances . Refer equ 9.116\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.6 : SOLUTION :-\") ;\n", + "print \" a) Matrix of potential coefficients , [P_abc] = \", ; print P_abc ;\n", + "print \" b) Matrix of maxwells coefficients , [C_abc] = \" ; print C_abc ;\n", + "print \" c) Matrix of sequence capacimath.tances , [C_012] = \", ; print C_012 ;\n", + "print \" d) Zero-sequence electrostatic unbalances , d_0 = %.4f<%.1f \"%(abs(d_0),math.degrees(math.atan2(d_0.imag,d_0.real) )) ;\n", + "print \" Negative-sequence electrostatic unbalances , d_2 = %.4f<%.1f \"%(abs(d_2),math.degrees(math.atan2(d_2.imag,d_2.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.6 : SOLUTION :-\n", + " a) Matrix of potential coefficients , [P_abc] = [[ 87.00566067 25.70982596 21.84799995]\n", + " [ 25.70982596 87.00566067 19.76350002]\n", + " [ 21.84799995 19.76350002 87.00566067]]\n", + " b) Matrix of maxwells coefficients , [C_abc] = \n", + "[[ 0.01310564 -0.00329514 -0.00254246]\n", + " [-0.00329514 0.01294731 -0.00211356]\n", + " [-0.00254246 -0.00211356 0.01261204]]\n", + " c) Matrix of sequence capacimath.tances , [C_012] = [[ 0.00758755 -6.36393539e-19j -0.00015976 +1.20497436e-04j\n", + " -0.00015976 -1.20497436e-04j]\n", + " [-0.00015976 -1.20497436e-04j 0.01553872 -8.67361738e-19j\n", + " 0.00064548 -5.31341107e-04j]\n", + " [-0.00015976 +1.20497436e-04j 0.00064548 +5.31341107e-04j\n", + " 0.01553872 -2.27682456e-18j]]\n", + " d) Zero-sequence electrostatic unbalances , d_0 = 0.0129<143.0 \n", + " Negative-sequence electrostatic unbalances , d_2 = 0.0538<-140.5 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix,degrees,arctan2\n", + "\n", + "\n", + "# GIVEN DATA\n", + "kv = 230 ; # Line voltage in kV\n", + "Z_0 = 0.56 * 1j ; # impedance in \u03a9\n", + "Z_1 = 0.2618 * 1j ; # Impedance in \u03a9\n", + "Z_2 = 0.3619 * 1j ; # Impedance in \u03a9\n", + "z_f = 5 + 0*1j ; # fault impedance in \u03a9\n", + "v = 1 * exp(1j*0*math.pi/180) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "Z_B = kv**2/200 ; # Imedance base on 230 kV line\n", + "Z_f = z_f/Z_B ; # fault impedance in pu \u03a9\n", + "I_a0 = v/(Z_0 + Z_1 + Z_2 + 3*Z_f) ; # Sequence currents in pu A\n", + "I_a1 = I_a0 ;\n", + "I_a2 = I_a0 ;\n", + "a = 1 * exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] , [1, a**2, a] , [1, a, a**2]]) ;\n", + "I_f = A * matrix([[I_a0] , [I_a1] , [I_a2]]) ; # Phase currents in pu A\n", + "\n", + "# For case (b)\n", + "V_a = matrix([[0] , [v] , [0]]) - matrix([[Z_0, 0, 0] , [0, Z_1, 0] , [0, 0, Z_2]]) \\\n", + " *matrix([[I_a0] , [I_a1] , [I_a2]]) ; # Sequence voltage in pu V\n", + "V_f = A*V_a ; # Phase voltage in pu V\n", + "\n", + "# For case (c)\n", + "V_abf = V_f[0,0] - V_f[1,0] ; # Line-to-line voltages at fault points in pu V\n", + "V_bcf = V_f[1,0] - V_f[2,0] ; # Line-to-line voltages at fault points in pu V\n", + "V_caf = V_f[2,0] - V_f[0,0] ; # Line-to-line voltages at fault points in pu V\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.9 : SOLUTION :-\") ;\n", + "print \" b) Sequence currents , I_a0 = I_a1 = I_a2 = %.4f<%.1f pu A \"%(abs(I_a0),math.degrees(math.atan2(I_a0.imag,I_a0.real) )) ;\n", + "print \" Phase currents in pu A , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f),degrees(arctan2(I_f.imag,I_f.real) ) ;\n", + "print \" c) Sequence voltages are , [V_a0 ; V_a1 ; V_a2 ] = pu V \" ;\n", + "print abs(V_a),degrees(arctan2(V_a.imag,V_a.real) ) ;\n", + "print \" Phase voltages are , [V_af ; V_bf ; V_cf ] = pu V \" ;\n", + "print abs(V_f),degrees(arctan2(V_f.imag,V_f.real) ) ;\n", + "print \" d) Line-to-line voltages at fault points are , V_abf = %.4f<%.1f pu V \"%(abs(V_abf),\\\n", + " math.degrees(math.atan2(V_abf.imag,V_abf.real) )) ;\n", + "print \" Line-to-line voltages at fault points are , V_abf = %.4f<%.1f pu V \"%(abs(V_bcf),\\\n", + " math.degrees(math.atan2(V_bcf.imag,V_bcf.real) )) ;\n", + "print \" Line-to-line voltages at fault points are , V_caf = %.4f<%.1f pu V \"%(abs(V_caf),\\\n", + " math.degrees(math.atan2(V_caf.imag,V_caf.real) )) ;\n", + "\n", + "print \" NOTE : ERROR : Calclation mistake in textbook from casec onwards \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.9 : SOLUTION :-\n", + " b) Sequence currents , I_a0 = I_a1 = I_a2 = 0.8438<-87.3 pu A \n", + " Phase currents in pu A , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 2.53151127e+00]\n", + " [ 3.60171374e-16]\n", + " [ 3.60171374e-16]] [[-87.25188372]\n", + " [ 54.01320436]\n", + " [ 54.01320436]]\n", + " c) Sequence voltages are , [V_a0 ; V_a1 ; V_a2 ] = pu V \n", + "[[ 0.47254877]\n", + " [ 0.77940949]\n", + " [ 0.30538464]] [[-177.25188372]\n", + " [ -0.77865398]\n", + " [-177.25188372]]\n", + " Phase voltages are , [V_af ; V_bf ; V_cf ] = pu V \n", + "[[ 0.04794529]\n", + " [ 1.18270641]\n", + " [ 1.17091016]] [[ -87.25188372]\n", + " [-126.62964072]\n", + " [ 127.49134624]]\n", + " d) Line-to-line voltages at fault points are , V_abf = 1.1460<51.8 pu V \n", + " Line-to-line voltages at fault points are , V_abf = 1.8782<-89.8 pu V \n", + " Line-to-line voltages at fault points are , V_caf = 1.2106<126.2 pu V \n", + " NOTE : ERROR : Calclation mistake in textbook from casec onwards \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix,arctan2,degrees,abs\n", + "\n", + "# GIVEN DATA\n", + "Z_0 = 0.2619 * 1j ;\n", + "Z_1 = 0.25 * 1j ;\n", + "Z_2 = 0.25 * 1j ;\n", + "v = 1 * exp(1j*0*math.pi/180) ;\n", + "a = 1 * exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] , [1, a**2, a] , [1, a, a**2]]) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (b)\n", + "I_a0 = v/(Z_0 + Z_1 + Z_2) ; # Sequence currents at fault point F in pu A\n", + "I_a1 = I_a0 ;\n", + "I_a2 = I_a0 ;\n", + "\n", + "# For case (c)\n", + "I_a1g1 = (1./2) * I_a1 ; # Sequence current at terminals of generator G1 in pu A\n", + "I_a2g1 = (1./2) * I_a2 ;\n", + "I_a0g1 = 0.5/(0.55 + 0.5)*I_a0 ; # By current division in pu A\n", + "\n", + "# For case (d)\n", + "I_f = [A] * matrix([[I_a0g1], [ I_a1g1] , [I_a2g1]]) ; # Phase current at terminal of generator G1 in pu A\n", + "\n", + "# For case (e)\n", + "V_a = matrix([[0] , [v] , [0]]) - matrix([[Z_0, 0, 0] , [0, Z_1, 0] , [0, 0, Z_2]])*matrix([[I_a0g1],[I_a1g1],[I_a2g1]]) ; # Sequence voltage in pu V\n", + "\n", + "# For case (f)\n", + "V_f = [A]*V_a ; # Phase voltage at terminal of generator G1 in pu V\n", + "\n", + "# For case (g)\n", + "I_a1g2 = (1./2) * I_a1 ; # By symmetry for Generator G2\n", + "I_a2g2 = (1./2) * I_a2 ;\n", + "I_a0g2 = 0 ; # By inspection\n", + "# V_a1(HV) leads V_a1(LV) by 30 degree & V_a2(HV) lags V_a2(LV) by 30 degree\n", + "I_a0G2 = I_a0g2 ;\n", + "I_a1G2 = abs(I_a1g2)*exp(1j * (math.degrees(math.atan2(I_a1g2.imag,I_a1g2.real) ) - 30) * math.pi/180) ; # (-90-30) = (-120)\n", + "I_a2G2 = abs(I_a2g2)*exp(1j *(math.degrees(math.atan2( I_a2g2.imag,I_a2g2.real) ) + 30) * math.pi/180) ; # (-90+30) = (-60)\n", + "\n", + "I_f2 = [A] * matrix([[I_a0G2], [I_a1G2] , [I_a2G2]]) ; # Phase current at terminal of generator G2 in pu A\n", + "\n", + " # Sequence voltage at terminal of generator G2 in pu V\n", + "V_a0G2 = 0 ;\n", + "V_a1G2 = abs(V_a[1,0])*exp(1j * (math.degrees(math.atan2(V_a[1,0].imag,V_a[1,0].real) ) - 30) * math.pi/180) ; # (0-30) = (-30)\n", + "V_a2G2 = abs(V_a[2,0])*exp(1j * (math.degrees(math.atan2(V_a[2,0].imag,V_a[2,0].real) ) + 30) * math.pi/180) ; # (180+30)=(210)=(-150)\n", + "\n", + "V_f2 = A * matrix([[V_a0G2] , [V_a1G2] , [V_a2G2]]) ; # Phase voltage at terminal of generator G2 in pu V\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.10 : SOLUTION :-\") ;\n", + "print \" b) The sequence current at fault point F , I_a0 = I_a1 = I_a2 = %.4f<%.f pu A \"%(abs(I_a0),\\\n", + " math.degrees(math.atan2(I_a0.imag,I_a0.real) )) ;\n", + "print \" c) Sequence currents at the terminals of generator G1 , \" ;\n", + "print \" I_a0,G_1 = %.4f<%.f pu A \"%(abs(I_a0g1),math.degrees(math.atan2(I_a0g1.imag,I_a0g1.real) )) ;\n", + "print \" I_a1,G_1 = %.4f<%.f pu A \"%(abs(I_a1g1),math.degrees(math.atan2(I_a1g1.imag,I_a1g1.real) )) ;\n", + "print \" I_a2,G_1 = %.4f<%.f pu A \"%(abs(I_a2g1),math.degrees(math.atan2(I_a2g1.imag,I_a2g1.real) )) ;\n", + "print \" d) Phase currents at terminal of generator G1 are , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f),degrees(arctan2(I_f.imag,I_f.real) ) ;\n", + "print \" e) Sequence voltages at the terminals of generator G1 , [V_a0 ; V_a1 ; V_a2 ] = pu V \" ;\n", + "print abs(V_a),degrees(arctan2(V_a.imag,V_a.real) ) ; \n", + "print \" f) Phase voltages at terminal of generator G1 are , [V_af ; V_bf ; V_cf] = pu V \" ;\n", + "print abs(V_f),degrees(arctan2(V_f.imag,V_f.real) ) ; \n", + "print \" g) Sequence currents at the terminals of generator G2 , \" ;\n", + "print \" I_a0,G_2 = %.f<%.f pu A \"%(abs(I_a0G2),math.degrees(math.atan2(I_a0G2.imag,I_a0G2.real) )) ;\n", + "print \" I_a1,G_2 = %.4f<%.f pu A\"%(abs(I_a1G2),math.degrees(math.atan2(I_a1G2.imag,I_a1G2.real) )) ;\n", + "print \" I_a2,G_2 = %.4f<%.f pu A\"%(abs(I_a2G2),math.degrees(math.atan2(I_a2G2.imag,I_a2G2.real) )) ;\n", + "print \" Phase currents at terminal of generator G2 are , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f2),degrees(arctan2(I_f2.imag,I_f2.real) ) ;\n", + "print \" Sequence voltages at the terminals of generator G2 , [V_a0 ; V_a1 ; V_a2 ] = pu V\" ;\n", + "print \" %.f<%.f \"%(abs(V_a0G2),math.degrees(math.atan2(V_a0G2.imag,V_a0G2.real) )) ;\n", + "print abs(V_a1G2),degrees(arctan2(V_a1G2.imag,V_a1G2.real) ) ;\n", + "print abs(V_a2G2),degrees(arctan2(V_a2G2.imag,V_a2G2.real) ) ;\n", + "print \" Phase voltages at terminal of generator G2 are , [V_af ; V_bf ; V_cf] = pu V \" ;\n", + "print abs(V_f2),degrees(arctan2(V_f2.imag,V_f2.real) ) ; \n", + "\n", + "print \" NOTE : ERROR : Calclation mistake in textbook casef \" ;\n", + "print \" In case g) V_a2 = 0.1641<-150 is same as textbook answer V_a2 = 0.1641<210 , i.e 360-150)=210 \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.10 : SOLUTION :-\n", + " b) The sequence current at fault point F , I_a0 = I_a1 = I_a2 = 1.3125<-90 pu A \n", + " c) Sequence currents at the terminals of generator G1 , \n", + " I_a0,G_1 = 0.6250<-90 pu A \n", + " I_a1,G_1 = 0.6563<-90 pu A \n", + " I_a2,G_1 = 0.6563<-90 pu A \n", + " d) Phase currents at terminal of generator G1 are , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 1.93751211 0.0312502 0.0312502 ]] [[-90. 90. 90.]]\n", + " e) Sequence voltages at the terminals of generator G1 , [V_a0 ; V_a1 ; V_a2 ] = pu V \n", + "[[ 0.16368852]\n", + " [ 0.83593647]\n", + " [ 0.16406353]] [[ 180.]\n", + " [ 0.]\n", + " [ 180.]]\n", + " f) Phase voltages at terminal of generator G1 are , [V_af ; V_bf ; V_cf] = pu V \n", + "[[ 0.50818443 0.99981255 0.99981255]] [[ 0. -119.98138904 119.98138904]]\n", + " g) Sequence currents at the terminals of generator G2 , \n", + " I_a0,G_2 = 0<0 pu A \n", + " I_a1,G_2 = 0.6563<-120 pu A\n", + " I_a2,G_2 = 0.6563<-60 pu A\n", + " Phase currents at terminal of generator G2 are , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 1.13666545e+00 1.13666545e+00 4.57756680e-16]] [[ -90. 90. 104.03624347]]\n", + " Sequence voltages at the terminals of generator G2 , [V_a0 ; V_a1 ; V_a2 ] = pu V\n", + " 0<0 \n", + "0.835936474603 -30.0\n", + "0.164063525397 -150.0\n", + " Phase voltages at terminal of generator G2 are , [V_af ; V_bf ; V_cf] = pu V \n", + "[[ 0.76717661]\n", + " [ 0.76717661]\n", + " [ 1. ]] [[ -40.67295063]\n", + " [-139.32704937]\n", + " [ 90. ]]\n", + " NOTE : ERROR : Calclation mistake in textbook casef \n", + " In case g) V_a2 = 0.1641<-150 is same as textbook answer V_a2 = 0.1641<210 , i.e 360-150)=210 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import abs,degrees,arctan2,exp,matrix \n", + "\n", + "# GIVEN DATA\n", + "kv = 230 ; # Line voltage in kV from Exa 9.9\n", + "Z_0 = 0.56*1j ; # Zero-sequence impedance in pu\n", + "Z_1 = 0.2618*1j ; # Zero-sequence impedance in pu\n", + "Z_2 = 0.3619*1j ; # Zero-sequence impedance in pu\n", + "z_f = 5 ; # Fault impedance in \u03a9\n", + "v = 1*exp(1j*0*math.pi/180) ; # \n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1] , [1, a**2, a] ,[1, a, a**2]]) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (b)\n", + "I_a0 = 0 ; # Sequence current in A\n", + "Z_B = kv**2/200 ; # Base impedance of 230 kV line\n", + "Z_f = z_f/Z_B ; # fault impedance in pu\n", + "I_a1 = v/(Z_1 + Z_2 + Z_f) ; # Sequence current in pu A\n", + "I_a2 = - I_a1 ; # Sequence current in pu A\n", + "I_f = [A] * matrix([[I_a0] , [I_a1] , [I_a2]]) ; # Phase current in pu A\n", + "\n", + "# For case (c)\n", + "V_a = matrix([[0] , [v],[0]])- matrix([[Z_0,0,0],[0, Z_1,0],[0, 0, Z_2]])*matrix([[I_a0],[I_a1],[I_a2]]) ; # Sequence voltages in pu V\n", + "V_f = A*V_a ; # Phase voltages in pu V\n", + "\n", + "# For case (d)\n", + "V_abf = V_f[0,0] - V_f[1,0] ; # Line-to-line voltages at fault points in pu V\n", + "V_bcf = V_f[1,0] - V_f[2,0] ; # Line-to-line voltages at fault points in pu V\n", + "V_caf = V_f[2,0] - V_f[0,0] ; # Line-to-line voltages at fault points in pu V\n", + "\n", + "\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.11 :SOLUTION :-\") ;\n", + "print \" b) Sequence currents are , \" ;\n", + "print \" I_a0 = %.f pu A \"%I_a0 ;\n", + "print \" I_a1 = %.4f<%.2f pu A \"%(abs(I_a1),math.degrees(math.atan2(I_a1.imag,I_a1.real) )) ;\n", + "print \" I_a2 = %.4f<%.2f pu A \"%(abs(I_a2),math.degrees(math.atan2(I_a2.imag,I_a2.real) )) ;\n", + "print \" Phase currents are , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f),degrees(arctan2(I_f.imag,I_f.real) ) ;\n", + "print \" c) Sequence voltages are , [V_a0 ; V_a1 ; V_a2] = pu V \" ;\n", + "print abs(V_a),degrees(arctan2(V_a.imag,V_a.real) ) ;\n", + "print \" Phase voltages are , [V_af ; V_bf ; V_cf] = pu V \" ;\n", + "print abs(V_f),degrees(arctan2(V_f.imag,V_f.real) ) ;\n", + "print \" d Line-to-line voltages at the fault points are \" ;\n", + "print \" V_abf = %.4f<%.1f pu V \"%(abs(V_abf),math.degrees(math.atan2(V_abf.imag,V_abf.real) )) ;\n", + "print \" V_bcf = %.4f<%.1f pu V \"%(abs(V_bcf),math.degrees(math.atan2(V_bcf.imag,V_bcf.real) )) ;\n", + "print \" V_caf = %.4f<%.1f pu V \"%(abs(V_caf),math.degrees(math.atan2(V_caf.imag,V_caf.real) )) ;\n", + "\n", + "print \" NOTE : ERROR : Minor calclation mistake in textbook \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.11 :SOLUTION :-\n", + " b) Sequence currents are , \n", + " I_a0 = 0 pu A \n", + " I_a1 = 1.6033<-90.00 pu A \n", + " I_a2 = 1.6033<90.00 pu A \n", + " Phase currents are , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 0. 2.77705757 2.77705757]] [[ 0.00000000e+00 1.80000000e+02 -2.51965259e-14]]\n", + " c) Sequence voltages are , [V_a0 ; V_a1 ; V_a2] = pu V \n", + "[[ 0. ]\n", + " [ 0.58024691]\n", + " [ 0.58024691]] [[ 0.]\n", + " [ 0.]\n", + " [ 0.]]\n", + " Phase voltages are , [V_af ; V_bf ; V_cf] = pu V \n", + "[[ 1.16049383]\n", + " [ 0.58024691]\n", + " [ 0.58024691]] [[ 0.]\n", + " [ 180.]\n", + " [ 180.]]\n", + " d Line-to-line voltages at the fault points are \n", + " V_abf = 1.7407<-0.0 pu V \n", + " V_bcf = 0.0000<90.0 pu V \n", + " V_caf = 1.7407<180.0 pu V \n", + " NOTE : ERROR : Minor calclation mistake in textbook \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix,degrees,arctan2\n", + "\n", + "# GIVEN DATA\n", + "z_f = 5 ; # Fault-impedance in \u03a9\n", + "z_g = 10 ; # Ground-impedance in \u03a9\n", + "kv = 230 ; # Line voltage in kV from Exa 9.9\n", + "Z_0 = 0.56*1j ; # Zero impedance in pu \u03a9\n", + "Z_1 = 0.2618*1j ; # Positive sequence Impedance in pu \u03a9\n", + "Z_2 = 0.3619*1j ; # Negative sequence Impedance in pu \u03a9\n", + "v = 1*exp(1j*0*180/math.pi) ;\n", + "a = 1*exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1],[1, a**2, a],[1, a, a**2]]) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (b)\n", + "Z_B = kv**2/200 ; # Base impedance of 230 kV line\n", + "Z_f = z_f/Z_B ; # fault impedance in pu \u03a9\n", + "Z_g = z_g/Z_B ;\n", + "I_a1 = v/( (Z_1 + Z_f) + ( (Z_2 + Z_f)*(Z_0 + Z_f + 3*Z_g)/((Z_2 + Z_f)+(Z_0 + Z_f + 3*Z_g)) )) ; # Sequence current in pu A\n", + "I_a2 = -((Z_0 + Z_f + 3*Z_g)/( (Z_2 + Z_f )+(Z_0 + Z_f + 3*Z_g) ))*I_a1 ; # Sequence current in pu A\n", + "I_a0 = -((Z_2 + Z_f)/( (Z_2 + Z_f)+(Z_0 + Z_f + 3*Z_g) ))*I_a1 ; # Sequence current in pu A\n", + "I_f = A* matrix([[I_a0], [I_a1], [I_a2]]) ; # Phase currents in pu A\n", + "\n", + "# For case (c)\n", + "V = matrix([[0], [v], [0]]) - matrix([[Z_0, 0, 0] , [0, Z_1, 0] , [0, 0, Z_2]])* matrix([[I_a0], [I_a1], [I_a2]]) ; # Sequence Voltages in pu V\n", + "V_f = A * V ; # Phase voltages in pu V\n", + "\n", + "# For case (d)\n", + "V_abf = V_f[0,0] - V_f[1,0] ; # Line-to-line voltages at fault points a & b\n", + "V_bcf = V_f[1,0] - V_f[2,0] ; # Line-to-line voltages at fault points b & c\n", + "V_caf = V_f[2,0] - V_f[0,0] ; # Line-to-line voltages at fault points c & a\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.12 : SOLUTION :-\") ;\n", + "print \" b) Sequence currents are , \" ;\n", + "print \" I_a0 = %.4f<%.2f pu A \"%(abs(I_a0),degrees(arctan2(I_a0.imag,I_a0.real) )) ;\n", + "print \" I_a1 = %.4f<%.2f pu A \"%(abs(I_a1),degrees(arctan2(I_a1.imag,I_a1.real) )) ;\n", + "print \" I_a2 = %.4f<%.2f pu A \"%(abs(I_a2),degrees(arctan2(I_a2.imag,I_a2.real) )) ;\n", + "print \" Phase currents are , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f),degrees(arctan2(I_f.imag,I_f.real) ) ;\n", + "print \" c) Sequence voltages , [V_a0 ; V_a1 ; V_a2] = pu V \" ;\n", + "print abs(V),degrees(arctan2(V.imag,V.real) ) ;\n", + "print \" Phase voltages , [V_af ; V_bf ; V_cf] = pu V \" ;\n", + "print abs(V_f),degrees(arctan2(V_f.imag,V_f.real) ) ;\n", + "print \" d) Line-to-line voltages at the fault points are , \" ;\n", + "print \" V_abf = %.4f<%.1f pu V \"%(abs(V_abf),degrees(arctan2(V_abf.imag,V_abf.real) )) ;\n", + "print \" V_bcf = %.4f<%.1f pu V \"%(abs(V_bcf),degrees(arctan2(V_bcf.imag,V_bcf.real) )) ;\n", + "print \" V_caf = %.4f<%.1f pu V \"%(abs(V_caf),degrees(arctan2(V_caf.imag,V_caf.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.12 : SOLUTION :-\n", + " b) Sequence currents are , \n", + " I_a0 = 0.8151<90.00 pu A \n", + " I_a1 = 2.0763<-90.00 pu A \n", + " I_a2 = 1.2612<90.00 pu A \n", + " Phase currents are , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 0. ]\n", + " [ 3.13828095]\n", + " [ 3.13828095]] [[ 0. ]\n", + " [ 157.07211387]\n", + " [ 22.92788613]]\n", + " c) Sequence voltages , [V_a0 ; V_a1 ; V_a2] = pu V \n", + "[[ 0.45643254]\n", + " [ 0.45643254]\n", + " [ 0.45643254]] [[ 0.]\n", + " [ 0.]\n", + " [ 0.]]\n", + " Phase voltages , [V_af ; V_bf ; V_cf] = pu V \n", + "[[ 1.36929763e+00]\n", + " [ 2.61845577e-16]\n", + " [ 1.49468349e-16]] [[ 0. ]\n", + " [ 122.00538321]\n", + " [ 158.19859051]]\n", + " d) Line-to-line voltages at the fault points are , \n", + " V_abf = 1.3693<-0.0 pu V \n", + " V_bcf = 0.0000<90.0 pu V \n", + " V_caf = 1.3693<180.0 pu V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 Page No : 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import degrees,arctan2,matrix,exp\n", + "\n", + "# GIVEN DATA\n", + "z_f = 5. ; # Fault-impedance in \u03a9\n", + "Z_0 = 0.56*1j ; # Zero impedance in pu \u03a9\n", + "Z_1 = 0.2618*1j ; # Positive sequence Impedance in pu \u03a9\n", + "Z_2 = 0.3619*1j ; # Negative sequence Impedance in pu \u03a9\n", + "kv = 230. ; # Line voltage in kV from Exa 9.9\n", + "a = 1. * exp(1j*120*math.pi/180) ; # By symmetrical components theory to 3-\u03a6 system\n", + "A = matrix([[1, 1, 1], [1, a**2, a] ,[1, a, a**2]]) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (b)\n", + "Z_B = kv**2/200 ; # Base impedance of 230 kV line\n", + "Z_f = z_f/Z_B ; # fault impedance in pu \u03a9\n", + "v = 1*exp(1j*0*math.pi/180) ;\n", + "I_a0 = 0 ; # Sequence current in pu A\n", + "I_a1 = v/(Z_1 + Z_f) ; # Sequence current in pu A\n", + "I_a2 = 0 ; # Sequence current in pu A\n", + "I_f = A* matrix([[I_a0] , [I_a1] , [I_a2]]) ; # Phase-current in pu A\n", + "\n", + "# For case (c)\n", + "V = matrix([[0],[v], [0]]) - matrix([[Z_0, 0, 0], [0, Z_1, 0] , [0, 0, Z_2]])*matrix([[I_a0], [I_a1],[I_a2]]) ; # Sequence Voltages in pu V\n", + "V_f = A*V ; # Phase voltages in pu V\n", + "\n", + "# For case (d)\n", + "V_abf = V_f[0,0] - V_f[1,0] ; # Line-to-line voltages at fault points a & b\n", + "V_bcf = V_f[1,0] - V_f[2,0] ; # Line-to-line voltages at fault points b & c\n", + "V_caf = V_f[2,0] - V_f[0,0] ; # Line-to-line voltages at fault points c & a\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.13 : SOLUTION :-\") ;\n", + "print \" b) Sequence currents are , \" ;\n", + "print \" I_a0 = %.1f pu A \"%I_a0 ;\n", + "print \" I_a1 = %.4f<%.1f pu A \"%(abs(I_a1),degrees(arctan2(I_a1.imag,I_a1.real) )) ;\n", + "print \" I_a2 = %.1f pu A \"%I_a2 ;\n", + "print \" Phase currents are , [I_af ; I_bf ; I_cf] = pu A \" ;\n", + "print abs(I_f),degrees(arctan2(I_f.imag,I_f.real) ) ;\n", + "print \" c) Sequence voltages , [V_a0 ; V_a1 ; V_a2] = pu V \" ;\n", + "print abs(V),degrees(arctan2(V.imag,V.real) ) ;\n", + "print \" Phase voltages , [V_af ; V_bf ; V_cf] = pu V \" ;\n", + "print abs(V_f),degrees(arctan2(V_f.imag,V_f.real) ) ;\n", + "print \" d) Line-to-line voltages at the fault points are , \" ;\n", + "print \" V_abf = %.4f<%.1f pu V \"%(abs(V_abf),degrees(arctan2(V_abf.imag,V_abf.real) )) ;\n", + "print \" V_bcf = %.4f<%.1f pu V \"%(abs(V_bcf),degrees(arctan2(V_bcf.imag,V_bcf.real) )) ;\n", + "print \" V_caf = %.4f<%.1f pu V \"%(abs(V_caf),degrees(arctan2(V_caf.imag,V_caf.real) )) ;\n", + "\n", + "print \" NOTE : ERROR : Calclation mistake in textbook cased \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.13 : SOLUTION :-\n", + " b) Sequence currents are , \n", + " I_a0 = 0.0 pu A \n", + " I_a1 = 3.8098<-85.9 pu A \n", + " I_a2 = 0.0 pu A \n", + " Phase currents are , [I_af ; I_bf ; I_cf] = pu A \n", + "[[ 3.80979098]\n", + " [ 3.80979098]\n", + " [ 3.80979098]] [[ -85.87005515]\n", + " [ 154.12994485]\n", + " [ 34.12994485]]\n", + " c) Sequence voltages , [V_a0 ; V_a1 ; V_a2] = pu V \n", + "[[ 0. ]\n", + " [ 0.07201873]\n", + " [ 0. ]] [[ 0. ]\n", + " [-85.87005515]\n", + " [ 0. ]]\n", + " Phase voltages , [V_af ; V_bf ; V_cf] = pu V \n", + "[[ 0.07201873]\n", + " [ 0.07201873]\n", + " [ 0.07201873]] [[ -85.87005515]\n", + " [ 154.12994485]\n", + " [ 34.12994485]]\n", + " d) Line-to-line voltages at the fault points are , \n", + " V_abf = 0.1247<-55.9 pu V \n", + " V_bcf = 0.1247<-175.9 pu V \n", + " V_caf = 0.1247<64.1 pu V \n", + " NOTE : ERROR : Calclation mistake in textbook cased \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page No : 501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,matrix,arctan2,degrees\n", + "\n", + "# GIVEN DATA\n", + "VG_1 = 1*exp(1j*0*math.pi/180) ;\n", + "VG_2 = 1*exp(1j*0*math.pi/180) ;\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "I_1 = 1*exp(1j*0*math.pi/180) ;\n", + "I_2 = 1*exp(1j*0*math.pi/180) ;\n", + "V_1 = 0.4522*exp(1j*90*math.pi/180) ;\n", + "V_2 = 0.4782*exp(1j*90*math.pi/180) ;\n", + "Y_11 = I_1/V_1 ; # When V_2 = 0 \n", + "Y_21 = (-0.1087)*Y_11 ; # When V_2 = 0 \n", + "Y_22 = I_2/V_2 ; # When V_1 = 0 \n", + "Y_12 = Y_21 ;\n", + "Y = matrix([[Y_11, Y_12] , [Y_21, Y_22]]) ; # Admitmath.tance matrix associated with positive-sequence n/w\n", + "\n", + "# For case (b)\n", + "I_S1_12 = 2.0193*exp(1j*90*math.pi/180) ; # Short-ckt F & F' to neutral & by superposition theorem\n", + "I_S1_10 = 0.2884*exp(1j*90*math.pi/180) ; # Short-ckt F & F' to neutral & by superposition theorem\n", + "I_S2_12 = 0.4326*exp(1j*90*math.pi/180) ;\n", + "I_S2_10 = 1.4904*exp(1j*90*math.pi/180) ;\n", + "I_S1 = I_S1_12 + I_S1_10 ;\n", + "I_S2 = I_S2_12 + I_S2_10 ;\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.14 :SOLUTION :-\") ;\n", + "print \" a) Admitmath.tance matrix associated with positive-sequence network , Y = \", ; print Y ;\n", + "print \" b) Source currents Two-port Thevenin equivalent positive sequence network are , \" ;\n", + "print \" I_S1 = %.4f<%.f pu \"%(abs(I_S1),degrees(arctan2(I_S1.imag,I_S1.real) )) ;\n", + "print \" I_S2 = %.4f<%.f pu \"%(abs(I_S2),degrees(arctan2(I_S2.imag,I_S2.real) )) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.14 :SOLUTION :-\n", + " a) Admitmath.tance matrix associated with positive-sequence network , Y = [[ 1.35409863e-16-2.21141088j -1.47190521e-17+0.24038036j]\n", + " [ -1.47190521e-17+0.24038036j 1.28047553e-16-2.09117524j]]\n", + " b) Source currents Two-port Thevenin equivalent positive sequence network are , \n", + " I_S1 = 2.3077<90 pu \n", + " I_S2 = 1.9230<90 pu \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.15 Page No : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol\n", + "from numpy import matrix,array,multiply\n", + "from numpy.linalg import det\n", + "\n", + "# GIVEN DATA\n", + "Y_11 = -2.2115*1j ;\n", + "Y_12 = 0.2404*1j ;\n", + "Y_21 = 0.2404*1j ;\n", + "Y_22 = -2.0912*1j ;\n", + "Y = matrix([[Y_11, Y_12] , [Y_21, Y_22]]) ;\n", + "I_S1 = 2.3077*1j ;\n", + "I_S2 = 1.9230*1j ;\n", + "\n", + "I_a1 = Symbol('I_a1') ;\n", + "I_a2 = Symbol('I_a2') ;\n", + "a = Y_12*I_S2 - Y_22*I_S1 ;\n", + "b = (Y_12+Y_22)*I_a1 ;\n", + "c = Y_12*I_S1 - Y_11*I_S2 ;\n", + "d = (Y_12 + Y_11)*I_a1 ;\n", + "V1 = multiply(matrix([1/det(Y)]) ,matrix([[(a-b)] , [(c+d)]])) ; # Gives the uncoupled positive sequence N/W\n", + "A = (Y_12+Y_22)*I_a2 ;\n", + "B = (Y_12 + Y_11)*I_a2 ;\n", + "V2 = multiply(matrix([(1/det(Y))]),matrix([[A] , [B]])) ; # Gives the uncoupled negative sequence N/W\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.15 : SOLUTION :-\") ;\n", + "print \" a [V_a1 ; V_a11] = \" ; print V1 ;\n", + "print \" Values of Uncoupled positive-sequence network \" ;\n", + "print \" b [V_a2 ; V_a22] = \" ; print V2 ;\n", + "print \" Values of Uncoupled negative-sequence network \" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.15 : SOLUTION :-\n", + " a [V_a1 ; V_a11] = \n", + "[[-0.405264262779549*I*I_a1 + 1.15793105402972]\n", + " [0.431606001926069*I*I_a1 + 1.05268105651719]]\n", + " Values of Uncoupled positive-sequence network \n", + " b [V_a2 ; V_a22] = \n", + "[[0.405264262779549*I*I_a2]\n", + " [0.431606001926069*I*I_a2]]\n", + " Values of Uncoupled negative-sequence network \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.16 Page No : 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "H_aa = 81.5 ;\n", + "D_aa = 1.658 ;\n", + "f = 60. ; # Freq in Hz\n", + "I = 20. ;\n", + "kV = 69. ; # Line voltage in kV\n", + "MVA = 25. ; # Transformer T1 rating in MVA\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "C_0 = 29.842*10**-9/(math.log(H_aa/D_aa)) ; # Capacimath.tance in F/mi\n", + "b_0 = 2*math.pi*f*C_0 ; # Suscepmath.tance in S/mi\n", + "B_0 = b_0*I ; # For total system\n", + "X_C0 = (1/B_0) ; # Total zero-sequence reactancw in \u03a9\n", + "TC_0 = B_0/(2*math.pi*f) ; # Total zero-sequence capacimath.tance in F\n", + "\n", + "# For case (c)\n", + "X_1 = 0.05 ; # Leakage reactancw of transformer T1 in pu\n", + "X_0 = X_1 ;\n", + "X_2 = X_1 ;\n", + "Z_B = kV**2/MVA ;\n", + "X_01 = X_0*Z_B ; # Leakage reactancw in \u03a9\n", + "V_F = 69*10**3/math.sqrt(3) ;\n", + "I_a0PC = V_F/(17310.8915*1j) ; # Zero-sequence current flowing through PC in A\n", + "I_PC = 3*abs(I_a0PC) ; # Continuous-current rating of the PC in A\n", + "\n", + "# For case (d)\n", + "X_PC = (17310.8915 - X_01)/3 ; # Required reactancw value for PC in \u03a9\n", + "\n", + "# For case (e)\n", + "L_PC = X_PC/(2*math.pi*f) ; # Inducmath.tance in H\n", + "\n", + "# For case (f)\n", + "S_PC = (I_PC**2)*X_PC ; # Rating in VA\n", + "S_PC1 = S_PC*10**-3 ; # Continuous kVA rating in kVA\n", + "\n", + "# For case (g)\n", + "V_PC = I_PC * X_PC ; # continuous-voltage rating for PC in V\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : 9.16 :SOLUTION :-\") ;\n", + "print \" a) Total zero-sequence suscepmath.tance per phase of system at 60 Hz , \u03a3X_C0 = %.4f \u03a9 \"%X_C0 ;\n", + "print \" Total zero-sequence capacimath.tance per phase of system at 60 Hz , \u03a3C_0 = %.4e F \"%TC_0 ;\n", + "print \" c) Continuous-current rating of the PC , I_PC = 3I_a0PC = %.4f A \"%(abs(I_PC)) ;\n", + "print \" d) Required reactancw value for the PC , X_PC = %.4f \u03a9 \"%X_PC ;\n", + "print \" e) Inducmath.tance value of the PC , L_PC = %.4f H \"%L_PC ;\n", + "print \" f) Continuous kVA rating for the PC , S_PC = %.2f kVA \"%(S_PC1) ;\n", + "print \" g) Continuous-voltage rating for PC , V_PC = %.2f V \"%(V_PC) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : 9.16 :SOLUTION :-\n", + " a) Total zero-sequence suscepmath.tance per phase of system at 60 Hz , \u03a3X_C0 = 17310.8110 \u03a9 \n", + " Total zero-sequence capacimath.tance per phase of system at 60 Hz , \u03a3C_0 = 1.5323e-07 F \n", + " c) Continuous-current rating of the PC , I_PC = 3I_a0PC = 6.9038 A \n", + " d) Required reactancw value for the PC , X_PC = 5767.1232 \u03a9 \n", + " e) Inducmath.tance value of the PC , L_PC = 15.2978 H \n", + " f) Continuous kVA rating for the PC , S_PC = 274.88 kVA \n", + " g) Continuous-voltage rating for PC , V_PC = 39815.26 V \n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..a956890c --- /dev/null +++ b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/chC.ipynb @@ -0,0 +1,491 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:93034fe51c4a60837bfbfd29a2573310bb3015984260f217b0cf9dd5b42417c4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Appendix C : Review of Basics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.1 Page No : 779" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import conj,exp\n", + "\n", + "# GIVEN DATA\n", + "z = 100 * exp(60*1j*math.pi/180) ; # Impedance of transmission line in \u03a9\n", + "v1 = 73034.8 * exp(30*1j*math.pi/180) ; # Bus voltages in V\n", + "v2 = 66395.3 * exp(20*1j*math.pi/180) ; # Bus voltages in V\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "S_12 = v1 * ( conj(v1) - conj(v2) )/( conj(z) ) ; # Complex power per phase in VA\n", + "\n", + "\n", + "# For case (b)\n", + "P_12 = S_12.real ; # Active power per phase in W\n", + "\n", + "# For case (c)\n", + "Q_12 = S_12.imag ; # Reactive power per phase in vars\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.1 : SOLUTION :-\") ;\n", + "print \" a) Complex power per phase that is being transmitted from bus 1 to bus 2 , S12 = %.2f<%.2f VA \"%(abs(S_12)\\\n", + " , math.atan2(S_12.imag,S_12.real)*180/math.pi) ;\n", + "print \" b) Active power per phase that is being transmitted , P12 = %.2f W \"%(P_12) ;\n", + "print \" b) Reactive power per phase that is being transmitted , Q12 = %.2f vars \"%(Q_12) ;\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.1 : SOLUTION :-\n", + " a) Complex power per phase that is being transmitted from bus 1 to bus 2 , S12 = 10104766.69<3.56 VA \n", + " b) Active power per phase that is being transmitted , P12 = 10085280.57 W \n", + " b) Reactive power per phase that is being transmitted , Q12 = 627236.52 vars \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.2 Page No : 791" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "X_pu = 12./100 ; # Leakage reactancw in pu\n", + "kV_B_HV = 345 ; # HV side ratings in Y kV\n", + "kV_B_LV = 34.5 ; # LV side ratings in Y kV\n", + "MVA_B = 20. ; # selected Base on HV side in MVA\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "X_pu = 12./100 ; # reactancw of transformer in pu\n", + "\n", + "# For case (b)\n", + "Z_B_HV = (kV_B_HV)**2/MVA_B ; # HV side base impedance in \u03a9\n", + "\n", + "# For case (c)\n", + "Z_B_LV = (kV_B_LV)**2/MVA_B ; # LV side base impedance in \u03a9\n", + "\n", + "# For case (d)\n", + "X_HV = X_pu * Z_B_HV ; # reactancw referred to HV side in \u03a9\n", + "\n", + "# For case (e)\n", + "X_LV = X_pu * Z_B_LV ; # reactancw referred to LV side in \u03a9\n", + "n = (kV_B_HV/math.sqrt(3))/(kV_B_LV/math.sqrt(3)) ; # Turns ratio of winding\n", + "X_LV1 = X_HV/n**2 ; # From equ C.89\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.2 : SOLUTION :-\") ;\n", + "print \" a) reactancw of transformer in pu , X_pu = %.2f pu \"%(X_pu) ;\n", + "print \" b) High-voltage side base impedance , Z_B_HV = %.2f \u03a9 \"%(Z_B_HV) ;\n", + "print \" c) Low-voltage side base impedance , Z_B_LV = %.4f \u03a9 \"%(Z_B_LV) ;\n", + "print \" d) Transformer reactancw referred to High-voltage side , X_HV = %.2f \u03a9 \"%(X_HV) ;\n", + "print \" e) Transformer reactancw referred to Low-voltage side , X_LV = %.4f \u03a9 \"%(X_LV) ;\n", + "print \" or) From another equation C.89 ,\" ;\n", + "print \" Transformer reactancw referred to Low-voltage side , X_LV = %.4f \u03a9 \"%(X_LV1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.2 : SOLUTION :-\n", + " a) reactancw of transformer in pu , X_pu = 0.12 pu \n", + " b) High-voltage side base impedance , Z_B_HV = 5951.25 \u03a9 \n", + " c) Low-voltage side base impedance , Z_B_LV = 59.5125 \u03a9 \n", + " d) Transformer reactancw referred to High-voltage side , X_HV = 714.15 \u03a9 \n", + " e) Transformer reactancw referred to Low-voltage side , X_LV = 7.1415 \u03a9 \n", + " or) From another equation C.89 ,\n", + " Transformer reactancw referred to Low-voltage side , X_LV = 7.1415 \u03a9 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.3 Page No : 792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "X_pu = 12./100 ; # Leakage reactancw in pu\n", + "kV_B_HV = 345. ; # HV side ratings in Y kV\n", + "kV_B_LV = 34.5 ; # LV side ratings in \u0394 kV\n", + "MVA_B = 20. ; # Base on HV side in MVA\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "n = ( kV_B_HV/math.sqrt(3) )/kV_B_LV ; # Turns ratio of windings\n", + "\n", + "# For case (b)\n", + "Z_B_HV = (kV_B_HV)**2/MVA_B ; # HV side base impedance in \u03a9\n", + "X_HV = X_pu * Z_B_HV ; # reactancw referred to HV side in \u03a9\n", + "X_LV = X_HV/(n**2) ; # transformer reactancw referred to delta LV side in \u03a9\n", + "\n", + "# For case (c)\n", + "Z_dt = X_LV ;\n", + "Z_Y = Z_dt/3 ; # reactancw of equi wye connection\n", + "Z_B_LV = kV_B_LV**2/MVA_B ; # LV side base impedance in \u03a9\n", + "X_pu1 = Z_Y/Z_B_LV ; # reactancw in pu referred to LV side\n", + "\n", + "# Alternative method For case (c)\n", + "n1 = kV_B_HV/kV_B_LV ; # Turns ratio if line-to-line voltages are used\n", + "X_LV1 = X_HV/(n1**2) ; # reactancw referred to LV side in \u03a9\n", + "X_pu2 = X_LV1/Z_B_LV ; # reactancw in pu referred to LV side\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.3 : SOLUTION :-\") ;\n", + "print \" a) Turns ratio of windings , n = %.4f \"%(n) ;\n", + "print \" b) Transformer reactancw referred to LV side in ohms ,X_LV = %.4f \u03a9 \"%(X_LV) ;\n", + "print \" c) Transformer reactancw referred to LV side in per units ,X_pu = %.2f pu \"%(X_pu1) ;\n", + "print \" or) From another equation if line-to-line voltages are used ,\" ;\n", + "print \" Transformer reactancw referred to LV side in per units ,X_pu = %.2f pu \"%(X_pu2) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.3 : SOLUTION :-\n", + " a) Turns ratio of windings , n = 5.7735 \n", + " b) Transformer reactancw referred to LV side in ohms ,X_LV = 21.4245 \u03a9 \n", + " c) Transformer reactancw referred to LV side in per units ,X_pu = 0.12 pu \n", + " or) From another equation if line-to-line voltages are used ,\n", + " Transformer reactancw referred to LV side in per units ,X_pu = 0.12 pu \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.4 Page No : 794" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import exp,degrees,arctan2\n", + "\n", + "# GIVEN DATA\n", + "I_1 = 1000. ; # Physical current in A for 2.4 kV circuit\n", + "Z_pu = 0.04 ; # Leakage reactancw in pu\n", + "I_pu = 2.08*exp(1j*(-90)*math.pi/180) ; # Generator supply for pure inductive load \n", + "kVA_Bg1 = 6000. ; # Rated kVA values for T1\n", + "kVA_Bg2 = 4000. ; # Rated kVA values for T2\n", + "N2 = 2.4 ; # N2 = V2 in Y kV ,refer fig C.4\n", + "N1 = 24. ; # N1 = V1 in Y kV ,refer fig C.4\n", + "N3 = 24. ; # N3 = V3 = N1 in Y kV ,refer fig C.4\n", + "N4 = 12. ; # N4 = V4 in Y kV ,refer fig C.4\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "kVA_B = 2080. ; # arbitrarily selected kVA values for all 3 ckt\n", + "\n", + "# For case (b)\n", + "n1 = N2/N1 ; # Turns ratio of transformer T1 & T2 i.e N2/N1\n", + "n2 = N3/N4 ; # Turns ratio N1'/N2'\n", + "kV_BL_L1 = 2.5 ; # arbitrarily selected Base voltage for 2.4 kV ckt in kV\n", + "kV_BL_L2 = kV_BL_L1/n1 ; # arbitrarily selected Base voltage for 24 kV ckt in kV\n", + "kV_BL_L3 = kV_BL_L2/n2 ; # arbitrarily selected Base voltage for 12 kV ckt in kV\n", + "\n", + "# For case (c)\n", + "Z_B1 = (kV_BL_L1)**(2) * 1000/(kVA_B) ; # Base impedance in \u03a9 for 2.4 kV ckt\n", + "Z_B2 = (kV_BL_L2)**(2) * 1000/(kVA_B) ; # Base impedance in \u03a9 for 24 kV ckt\n", + "Z_B3 = (kV_BL_L3)**(2) * 1000/(kVA_B) ; # Base impedance in \u03a9 for 12 kV ckt\n", + "\n", + "# For case (d)\n", + "I_B1 = kVA_B/(math.sqrt(3)*kV_BL_L1) ; # Base current in A for 2.4 kV ckt\n", + "I_B2 = kVA_B/(math.sqrt(3)*kV_BL_L2) ; # Base current in A for 24 kV ckt\n", + "I_B3 = kVA_B/(math.sqrt(3)*kV_BL_L3) ; # Base current in A for 12 kV ckt\n", + "\n", + "# For case (e)\n", + "I_2 = (n1) * I_1 ; # Physical current in A for 24 kV circuit\n", + "I_4 = (n2) * I_2 ; # Physical current in A for 12 kV circuit\n", + "\n", + "# For case (f)\n", + "I_pu_3ckt = abs(I_pu) ; # per-unit current values for all 3-ckt\n", + "\n", + "# For case (g)\n", + "kV_B1 = N2 ; # Given voltage in kV\n", + "kV_B2 = N4 ; # Given voltage in kV\n", + "Z_pu_T1 = (1j)*Z_pu*(kVA_B/kVA_Bg1)*(kV_B1/kV_BL_L1)**(2) ; # New reactancw of T1\n", + "Z_pu_T2 = (1j)*Z_pu*(kVA_B/kVA_Bg2)*(kV_B2/kV_BL_L3)**(2) ; # New reactancw of T2\n", + "\n", + "# For case (h)\n", + "V1 = kV_B1/kV_BL_L1 ; # voltage in pu at bus 1\n", + "V2 = V1 - I_pu * (Z_pu_T1) ; # voltage in pu at bus 2\n", + "V4 = V2 - I_pu * (Z_pu_T2) ; # voltage in pu at bus 3\n", + "\n", + "# For case (i)\n", + "S1 = V1 * abs(I_pu) ; # Apparent power value at bus 1 in pu\n", + "S2 = V2 * abs(I_pu) ; # Apparent power value at bus 2 in pu\n", + "S4 = V4 * abs(I_pu) ; # Apparent power value at bus 4 in pu\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.3 : SOLUTION :-\") ;\n", + "print \" a) Base kilovoltampere value for all 3-circuits is , kVA_B = %.1f kVA \"%(kVA_B) ;\n", + "print \" b) Base line-to-line kilovolt value for 2.4 kV circuit , kV_BL_L = %.1f kV \"%(kV_BL_L1) ;\n", + "print \" Base line-to-line kilovolt value for 24 kV circuit , kV_BL_L = %.1f kV \"%(kV_BL_L2) ;\n", + "print \" Base line-to-line kilovolt value for 24 kV circuit , kV_BL_L = %.1f kV \"%(kV_BL_L3) ;\n", + "print \" c) Base impedance value of 2.4 kV circuit , Z_B = %.3f \u03a9 \"%(Z_B1) ;\n", + "print \" Base impedance value of 24 kV circuit , Z_B = %.1f \u03a9 \"%(Z_B2) ;\n", + "print \" Base impedance value of 12.5 kV circuit , Z_B = %.1f \u03a9 \"%(Z_B3) ;\n", + "print \" d) Base current value of 2.4 kV circuit , I_B = %d A \"%(I_B1) ;\n", + "print \" Base current value of 24 kV circuit , I_B = %d A \"%(I_B2) ;\n", + "print \" Base current value of 2.4 kV circuit , I_B = %d A \"%(I_B3) ;\n", + "print \" e) Physical current of 2.4 kV circuit , I = %.f A \"%(I_1) ;\n", + "print \" Physical current of 24 kV circuit , I = %.f A \"%(I_2) ;\n", + "print \" Physical current of 12 kV circuit , I = %.f A \"%(I_4) ;\n", + "print \" f) Per unit current values for all 3 circuits , I_pu = %.2f pu \"%(I_pu_3ckt) ;\n", + "print \" g) New transformer reactancw of T1 , Z_pu_T1 = j%.4f pu \"%(abs(Z_pu_T1)) ;\n", + "print \" New transformer reactancw of T2 , Z_pu_T2 = j%.4f pu \"%(abs(Z_pu_T2)) ;\n", + "print \" h) Per unit voltage value at bus 1 ,V1 = %.2f<%.1f pu \"%(abs(V1),degrees(arctan2(V1.imag,V1.real))) ;\n", + "print \" Per unit voltage value at bus 2 ,V2 = %.4f<%.1f pu \"%(abs(V2),degrees(arctan2(V2.imag,V2.real))) ;\n", + "print \" Per unit voltage value at bus 4 ,V4 = %.4f<%.1f pu \"%(abs(V4),degrees(arctan2(V4.imag,V4.real))) ;\n", + "print \" i) Per-unit apparent power value at bus 1 , S1 = %.2f pu \"%(S1) ;\n", + "print \" Per-unit apparent power value at bus 2 , S2 = %.4f pu \"%(S2) ;\n", + "print \" Per-unit apparent power value at bus 4 , S4 = %.4f pu \"%(S4) ;\n", + "print \" j TABLE C.2 \" ;\n", + "print \" Results Of Example C.4 \" ;\n", + "print \" ___________________________________________________________________________________\" ;\n", + "print \" QUANTITY \\t 2.4-kV circuit \\t 24-kV circuit \\t 12-kV circuit \";\n", + "print \" ___________________________________________________________________________________\" ;\n", + "print \" kVA_B3-\u03a6) \\t %d kVA \\t %d kVA \\t %d kVA \"%(kVA_B,kVA_B,kVA_B) ;\n", + "print \" kV_BL-L) \\t %.1f kV \\t %d kV \\t %.1f kV \"%(kV_BL_L1,kV_BL_L2,kV_BL_L3) ;\n", + "print \" Z_B \\t %.3f \u03a9 \\t %.1f \u03a9 \\t %.1f \u03a9 \"%(Z_B1,Z_B2,Z_B3) ;\n", + "print \" I_B \\t %d A \\t %d A \\t %d A \"%(I_B1,I_B2,I_B3) ;\n", + "print \" I_physical \\t %d A \\t %.f A \\t %.f A \"%(I_1,I_2,I_4) ;\n", + "print \" I_pu \\t %.2f pu \\t %.2f pu \\t %.2f pu \"%(I_pu_3ckt,I_pu_3ckt,I_pu_3ckt) ;\n", + "print \" V_pu \\t %.2f pu \\t %.4f pu \\t %.4f pu \"%(abs(V1),abs(V2),abs(V4)) ;\n", + "print \" S_pu \\t %.2f pu \\t %.4f pu \\t %.4f pu \"%(S1,S2,S4) ;\n", + "print \" ___________________________________________________________________________________\" ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.3 : SOLUTION :-\n", + " a) Base kilovoltampere value for all 3-circuits is , kVA_B = 2080.0 kVA \n", + " b) Base line-to-line kilovolt value for 2.4 kV circuit , kV_BL_L = 2.5 kV \n", + " Base line-to-line kilovolt value for 24 kV circuit , kV_BL_L = 25.0 kV \n", + " Base line-to-line kilovolt value for 24 kV circuit , kV_BL_L = 12.5 kV \n", + " c) Base impedance value of 2.4 kV circuit , Z_B = 3.005 \u03a9 \n", + " Base impedance value of 24 kV circuit , Z_B = 300.5 \u03a9 \n", + " Base impedance value of 12.5 kV circuit , Z_B = 75.1 \u03a9 \n", + " d) Base current value of 2.4 kV circuit , I_B = 480 A \n", + " Base current value of 24 kV circuit , I_B = 48 A \n", + " Base current value of 2.4 kV circuit , I_B = 96 A \n", + " e) Physical current of 2.4 kV circuit , I = 1000 A \n", + " Physical current of 24 kV circuit , I = 100 A \n", + " Physical current of 12 kV circuit , I = 200 A \n", + " f) Per unit current values for all 3 circuits , I_pu = 2.08 pu \n", + " g) New transformer reactancw of T1 , Z_pu_T1 = j0.0128 pu \n", + " New transformer reactancw of T2 , Z_pu_T2 = j0.0192 pu \n", + " h) Per unit voltage value at bus 1 ,V1 = 0.96<0.0 pu \n", + " Per unit voltage value at bus 2 ,V2 = 0.9334<-0.0 pu \n", + " Per unit voltage value at bus 4 ,V4 = 0.8935<-0.0 pu \n", + " i) Per-unit apparent power value at bus 1 , S1 = 2.00 pu \n", + " Per-unit apparent power value at bus 2 , S2 = 1.9415 pu " + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " Per-unit apparent power value at bus 4 , S4 = 1.8586 pu \n", + " j TABLE C.2 \n", + " Results Of Example C.4 \n", + " ___________________________________________________________________________________\n", + " QUANTITY \t 2.4-kV circuit \t 24-kV circuit \t 12-kV circuit \n", + " ___________________________________________________________________________________\n", + " kVA_B3-\u03a6) \t 2080 kVA \t 2080 kVA \t 2080 kVA \n", + " kV_BL-L) \t 2.5 kV \t 25 kV \t 12.5 kV \n", + " Z_B \t 3.005 \u03a9 \t 300.5 \u03a9 \t 75.1 \u03a9 \n", + " I_B \t 480 A \t 48 A \t 96 A \n", + " I_physical \t 1000 A \t 100 A \t 200 A \n", + " I_pu \t 2.08 pu \t 2.08 pu \t 2.08 pu \n", + " V_pu \t 0.96 pu \t 0.9334 pu \t 0.8935 pu \n", + " S_pu \t 2.00 pu \t 1.9415 pu \t 1.8586 pu \n", + " ___________________________________________________________________________________\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:81: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:82: ComplexWarning: Casting complex values to real discards the imaginary part\n", + "-c:95: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.5 Page No : 811" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "D_ab = 6.8 ; # dismath.tance b/w conductors center-to-center in ft\n", + "D_bc = 5.5 ; # dismath.tance b/w conductors center-to-center in ft\n", + "D_ca = 4 ; # dismath.tance b/w conductors center-to-center in ft\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "D_eq = (D_ab * D_bc * D_ca)**(1/3) ; # Equi spacing for pole top in ft\n", + "D_s = 0.01579 ; # GMR in ft From Table A.1\n", + "X_L = 0.1213 * math.log(D_eq/D_s) ; # Inductive reactancw in \u03a9/mi . From equ C.135\n", + "\n", + "# For case (b)\n", + "X_a = 0.503 ; # Inductive reactancw in \u03a9/mi From Table A.1 \n", + "X_d = 0.2026 ; # From Table A.8 for D_eq,by linear interpolation in \u03a9/mi\n", + "X_L1 = X_a + X_d ; # Inductive reactancw in \u03a9/mi\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.5 : SOLUTION :-\") ;\n", + "print \" a) Inductive reactancw umath.sing equation C.135 , X_L = %.4f \u03a9/mi \"%(X_L );\n", + "print \" b) Inductive reactancw umath.sing tables , X_L = %.4f \u03a9/mi \"%(X_L1) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.5 : SOLUTION :-\n", + " a) Inductive reactancw umath.sing equation C.135 , X_L = 0.5032 \u03a9/mi \n", + " b) Inductive reactancw umath.sing tables , X_L = 0.7056 \u03a9/mi \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example C.6 Page No : 812" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "D_ab = 6.8 ; # dismath.tance b/w conductors center-to-center in ft\n", + "D_bc = 5.5 ; # dismath.tance b/w conductors center-to-center in ft\n", + "D_ca = 4 ; # dismath.tance b/w conductors center-to-center in ft\n", + "l = 100 ; # Line length in miles\n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "D_m = (D_ab * D_bc * D_ca)**(1./3) ; # Equi spacing for pole top in ft\n", + "r = 0.522/(2 * 12) ; # feet\n", + "X_C = 0.06836 * math.log10 (D_m/r) ; # Shunt capacitive reactancw in M\u03a9*mi\n", + "\n", + "# For case (b)\n", + "X_a = 0.1136 ; # Shunt capacitive reactancw in M\u03a9*mi , From table A.1\n", + "X_d = 0.049543 ; # Shunt capacitive reactancw spacing factor in M\u03a9*mi , From table A.9\n", + "X_C1 = X_a + X_d ; # Shunt capacitive reactancw in M\u03a9*mi\n", + "X_C2 = X_C1/l ; # Capacitive reactancw of 100 mi line in M\u03a9\n", + "\n", + "# DISPLAY RESULTS\n", + "print (\"EXAMPLE : C.6 : SOLUTION :-\") ;\n", + "print \" a) Shunt capacitive reactancw umath.sing equation C.156 , X_C = %.6f M\u03a9*mi \"%(X_C) ;\n", + "print \" b) Shunt capacitive reactancw umath.sing tables , X_C = %.6f M\u03a9*mi \"%(X_C1) ;\n", + "print \" c) Capacitive reactancw of total line , X_C = %.5e M\u03a9 \"%(X_C2) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EXAMPLE : C.6 : SOLUTION :-\n", + " a) Shunt capacitive reactancw umath.sing equation C.156 , X_C = 0.163211 M\u03a9*mi \n", + " b) Shunt capacitive reactancw umath.sing tables , X_C = 0.163143 M\u03a9*mi \n", + " c) Capacitive reactancw of total line , X_C = 1.63143e-03 M\u03a9 \n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..2c4bc453 Binary files /dev/null and b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/Voltage_Time7.png differ 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 new file mode 100644 index 00000000..c9268ce2 Binary files /dev/null and b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/currentVoltageJunction7.png differ 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 new file mode 100644 index 00000000..a3a8aebe Binary files /dev/null and b/Electric_Power_Transmission_System_Engineering_Analysis_And_Design_by_T._Gonen/screenshots/transmissionsystem10.png differ diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb new file mode 100644 index 00000000..0db63819 --- /dev/null +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb @@ -0,0 +1,1328 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cb9aa24547481a3c980ea8f6f78b2ee4b9225336fb41e32a30a8248c4be9ed70" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Direct Current Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "P = 2. #number of poles\n", + "Z = 400. #number of conducters\n", + "n = 300. #speed in rpm\n", + "E = 200. #voltage of generator\n", + "A = 2. #number of parallel paths\n", + "N = 1200. #number of turns in each field coil\n", + "\n", + "# Calculations and Results\n", + "phi = (E*60*A)/(Z*n*P) #flux at the end of 0.15sec\n", + "t = 0.15 #time\n", + "print \"magnitude of flux at the end of 15sec is %f wb\"%(phi)\n", + "e = N*(phi/t)\n", + "print \"induced emf in the field coil = %d volts\"%(e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnitude of flux at the end of 15sec is 0.100000 wb\n", + "induced emf in the field coil = 800 volts\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "P = 8. #number of poles\n", + "A = 8. #number of parallel paths in the armature\n", + "Z = 960. #number of conductors\n", + "N = 400. #speed in rpm\n", + "phi = 0.04 #flux per pole\n", + "\n", + "# Calculations\n", + "E = (phi*Z*N*P)/(60*A) #emf generated onopen circuit condition\n", + "\n", + "# Results\n", + "print \"emf generated on open circuit condition, E = %d volts\"%(E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "emf generated on open circuit condition, E = 256 volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "E = 180.; #induced emf at 500rpm\n", + "N = 500.; #speed in rpm\n", + "\n", + "# Calculations and Results\n", + "K1 = (E/N)\n", + "print \"K1 = %f\"%(K1)\n", + "E1 = (K1*600) #induced emf at 600rpm\n", + "print \" induced emf at 600rpm is = %d V\"%(E1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "K1 = 0.360000\n", + " induced emf at 600rpm is = 216 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "E1 = 220.; #induced emf at N1 speed in volts\n", + "N1 = 750.; # speed \n", + "K1 = (E1/N1)\n", + "E2 = 250.; #induced emf at speed N2\n", + "N2 = E2/K1\n", + "print \"speed at induced emf of 250V = %d rpm\"%(N2)\n", + "print (\"when induced emf is 250V and speed 700 rpm\")\n", + "E3 = 250.; #induced emf at N3 speed\n", + "N3 = 700.; #speed\n", + "ratio = (E3*N1)/(E1*N3)\n", + "Pi = (ratio-1)*100\n", + "print \"percentage increase in flux is %f percent\"%(Pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed at induced emf of 250V = 852 rpm\n", + "when induced emf is 250V and speed 700 rpm\n", + "percentage increase in flux is 21.753247 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "E = 200. #emf induced\n", + "I = 15. #armature current\n", + "n = 1200. #speed in rpm\n", + "\n", + "# Calculations and Results\n", + "omega = (2*3.14*n)/60;\n", + "print \"omega = %f \"%(omega)\n", + "T = (E*I)/omega;\n", + "print \"electromagnetic torque = %f Nm\"%(T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "omega = 125.600000 \n", + "electromagnetic torque = 23.885350 Nm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "n = 10.; #number of turns in 1 coil\n", + "l = 0.2; \n", + "d = 0.2; #diameter in metres\n", + "B = 1.; #uniform magnetic field density in weber per m**2\n", + "N = 1500.; #speed in rpm\n", + "\n", + "# Calculations and Results\n", + "r = (d/2); #radius in metres\n", + "E = (B*l*((2*3.14*N)/60)*r*2*n);\n", + "print \"total induced emf = %f V\"%(E)\n", + "R = 4; #total resistance in ohms\n", + "I = E/R;\n", + "print \"The current through the armature coil when connected to the load, I = %f A\"%(I)\n", + "T = (E*I)/((2*3.14*N)/60)\n", + "print \"torque = %f Nm\"%(T)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total induced emf = 62.800000 V\n", + "The current through the armature coil when connected to the load, I = 15.700000 A\n", + "torque = 6.280000 Nm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 230.; #armature voltage supply in volts\n", + "Ia = 12.; #armature current in amperes\n", + "Ra = 0.8; #armature resistance in ohms\n", + "N = 100.; #speed in radian per second\n", + "\n", + "# Calculations and Results\n", + "E = (V-(Ia*Ra))\n", + "print \"induced emf, E = %fV\"%(E)\n", + "Te = (E*Ia)/N\n", + "print \"the electromagnetic torque = %fNm\"%(Te)\n", + "Pi = V*Ia\n", + "print \"electrical input to the armature, Pinput = %dW\"%(Pi)\n", + "Pd = Te*N\n", + "print \"mechanical developed = %fW\"%(Pd)\n", + "loss = (Ia**2*Ra)\n", + "print \"armature copper loss = %fW\"%(loss)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "induced emf, E = 220.400000V\n", + "the electromagnetic torque = 26.448000Nm\n", + "electrical input to the armature, Pinput = 2760W\n", + "mechanical developed = 2644.800000W\n", + "armature copper loss = 115.200000W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "P = 50000.; #power delivered in watts\n", + "V = 250.; #voltage in volts\n", + "Ra = 0.02; #armature resistance in ohms\n", + "Rf = 50.; #field resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "If = V/Rf #field current in amperes\n", + "Ng = 400.; #speed in generating condition in rpm\n", + "print \"field current, If = %dA\"%(If)\n", + "Il = P/V #load current in amperes\n", + "print \"Load current, If = %dA\"%(Il)\n", + "Ia = If+Il #armature current in amperes\n", + "print \"Aramture current, If = %dA\"%(Ia)\n", + "Eg = (V+(Ia*Ra))\n", + "print (\"At motor condition\")\n", + "Ia = (Il-If)\n", + "print \"Aramture current, If = %dA\"%(Ia)\n", + "Em = (V-(Ia*Ra))\n", + "print \"Em = %fV\"%(Em)\n", + "Nm = (Ng*Em)/Eg\n", + "print \"Speed of the motor = %drpm\"%(Nm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "field current, If = 5A\n", + "Load current, If = 200A\n", + "Aramture current, If = 205A\n", + "At motor condition\n", + "Aramture current, If = 195A\n", + "Em = 246.100000V\n", + "Speed of the motor = 387rpm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 250.; #voltage supply in volts\n", + "Ra = 0.12; #armature resistance in ohms\n", + "Rf = 100.; #field resistance in ohms\n", + "Il = 80.; #load current in amperes\n", + "\n", + "# Calculations and Results\n", + "If = V/Rf \n", + "print \"Field current, If = %f\"%(If)\n", + "print (\"When machine is generating\")\n", + "Ia = Il+If\n", + "Eg = (V+(Ia*Ra))\n", + "print \"Ia = %fA\"%(Ia)\n", + "print \"Eg = %fV\"%(Eg)\n", + "print (\"When machine is motoring\")\n", + "Ia = Il-If\n", + "Em = (V-(Ia*Ra))\n", + "print \"Ia = %fA\"%(Ia)\n", + "print \"Eg = %fV\"%(Em)\n", + "ratio = Eg/Em\n", + "print \"Ratio of speeds = %f\"%(ratio)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field current, If = 2.500000\n", + "When machine is generating\n", + "Ia = 82.500000A\n", + "Eg = 259.900000V\n", + "When machine is motoring\n", + "Ia = 77.500000A\n", + "Eg = 240.700000V\n", + "Ratio of speeds = 1.079767\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 550.; #voltage supply in volts\n", + "P = 16.; #number of poles\n", + "N = 150.; #speed in rpm\n", + "Z = 2500.; #number of armature conductors\n", + "A = 16.; \n", + "Power = 1500000.; #power in watt\n", + "Cl = 25000.; #full-load copper loss\n", + "B = 0.9; #flux density in the pole\n", + "\n", + "# Calculations and Results\n", + "Ia = Power/V\n", + "print \"Full load current = %fA\"%(Ia)\n", + "Ra = Cl/(Ia**2)\n", + "print \"Ra = %fohms\"%(Ra)\n", + "E = V+(Ia*Ra)\n", + "print \"Induced emf = %fvolts\"%(E)\n", + "phi = (E*60*A)/(Z*N*P)\n", + "print \"flux density = %fWb/m**2\"%(B)\n", + "print \"flux = %fWb\"%(phi)\n", + "area = (phi/B)\n", + "print \" Area of pole shoe = %fcm**2\"%(area*10000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load current = 2727.272727A\n", + "Ra = 0.003361ohms\n", + "Induced emf = 559.166667volts\n", + "flux density = 0.900000Wb/m**2\n", + "flux = 0.089467Wb\n", + " Area of pole shoe = 994.074074cm**2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "Cd = 0.76; #commutator diameter in metres\n", + "Cr = .38; #commutator radius in metres\n", + "bw = 1.5*10**(-2); #brush width in metres\n", + "N = 600.; #speed in rpm\n", + "n = 10.; #speed in rps\n", + "\n", + "# Calculations and Results\n", + "V = Cr*(2*3.14*n); \n", + "print \"peripheral speed of commutator, V = %fm/sec\"%(V);\n", + "Tc = bw/V;\n", + "print \"Time of commutation = %fseconds\"%(Tc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peripheral speed of commutator, V = 23.864000m/sec\n", + "Time of commutation = 0.000629seconds\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 240.; #supply voltage in volts\n", + "N = 800.; #speed in rpm\n", + "Ia = 2.; #armeture current in amperes\n", + "Ra = 0.4; #armature resistance in ohms\n", + "Rf = 160.; #field resistance in ohms\n", + "Il1 = 30.; #line current in amperes\n", + "\n", + "# Calculations and Results\n", + "E = V-(Ia*Ra); #induced emf in volts\n", + "print (\"At no-load\")\n", + "print \"E = %fV\"%(E)\n", + "If = V/Rf; #field current in amperes\n", + "print \"If = %fA\"%(If)\n", + "K1 = E/(If*N);\n", + "print \"K1 = %f\"%(K1)\n", + "print (\"At a load of 30A\")\n", + "Ia1 = (Il1-If);\n", + "E1 = V-(Ia1*Ra);\n", + "N1 = 950; #speed in rpm\n", + "If1 = E1/(K1*N1);\n", + "print \"If1 = %fA\"%(If1);\n", + "Rr = V/If1;\n", + "R = (Rr-Rf);\n", + "print \"Extra resistance required in the field circuit, R = %fohms\"%(R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At no-load\n", + "E = 239.200000V\n", + "If = 1.500000A\n", + "K1 = 0.199333\n", + "At a load of 30A\n", + "If1 = 1.207182A\n", + "Extra resistance required in the field circuit, R = 38.810149ohms\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 230.; #voltage supply in volts\n", + "Ia = 20.; #armature current in amperes\n", + "Ra = 0.5; #armature resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "E = V-(Ia*Ra);\n", + "print \"E = %dV\"%(E)\n", + "print (\"when extra resistance is added in the armature circuit,the speed is halved\")\n", + "E2 = E/2;\n", + "R = ((V-E2)/Ia)-Ra;\n", + "print (\"The load torque is conmath.atant\")\n", + "print \"extra resistance in the armature circui, R = %fohms\"%(R)\n", + "print (\"The load torque directly proportional to square of speed\")\n", + "print (\"if N is halfed, Iais one-fourthed\")\n", + "Ia2 = Ia/4;\n", + "R = ((V-E2)/Ia2)-Ra;\n", + "print \"extra resistance in the armature circui, R = %fohms\"%(R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 220V\n", + "when extra resistance is added in the armature circuit,the speed is halved\n", + "The load torque is conmath.atant\n", + "extra resistance in the armature circui, R = 5.500000ohms\n", + "The load torque directly proportional to square of speed\n", + "if N is halfed, Iais one-fourthed\n", + "extra resistance in the armature circui, R = 23.500000ohms\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 250.; #voltage supply in volts\n", + "Ia = 50.; #armature current in amperes\n", + "Ra = 0.3; #armature resistance in ohms\n", + "N = 1000.;\n", + "\n", + "# Calculations and Results\n", + "E = V-(Ia*Ra);\n", + "print \"E = %dV\"%(E)\n", + "print (\"when extra resistance is added in the armature circuit when the speed is 800rpm\")\n", + "N2 = 800.;\n", + "E2 = (E*N2)/N;\n", + "print \"E at 800rpm = %dV\"%(E2)\n", + "R = ((V-E2)/Ia)-Ra;\n", + "print \"extra resistance in the armature circui, R = %fohms\"%(R)\n", + "print (\"if load is halfed,Ia will be halfed\")\n", + "Ia2 = Ia/2;\n", + "E1 = V-(Ia2*(Ra+R));\n", + "print \"E1 = %dV\"%(E1)\n", + "N1 = (N2*E1)/E2;\n", + "print \"N1 = %frpm\"%(N1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 235V\n", + "when extra resistance is added in the armature circuit when the speed is 800rpm\n", + "E at 800rpm = 188V\n", + "extra resistance in the armature circui, R = 0.940000ohms\n", + "if load is halfed,Ia will be halfed\n", + "E1 = 219V\n", + "N1 = 931.914894rpm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "Il = 5.; #current in amperes al no-load\n", + "V = 250.; #voltage in volts\n", + "Rf = 250.; #field resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "If1 = V/Rf; #field current in amperes\n", + "Ia1 = Il-If1; #armature current\n", + "Ra = 0.2; #armature resistance in ohms\n", + "print (\"at a load current of 50A\")\n", + "Il2 = 50; #load current in amperes\n", + "#armature reaction weakens by 3percent\n", + "If2 = 0.97; #current in amperes\n", + "Ia2 = Il2-If2;\n", + "N1 = 1000; \n", + "E1 = (V-(Ia1*Ra));\n", + "E2 = (V-(Ia2*Ra));\n", + "N2 = (N1*E2)/(0.97*E1);\n", + "print \"N2 = %frpm\"%(N2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "at a load current of 50A\n", + "N2 = 993.670467rpm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "P = 4; #pole\n", + "V = 500; #shunt motor in volts\n", + "Ia = 60; #armature current in amperes\n", + "Ra = 0.2; #armature resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "E = V-(Ia*Ra)-2;\n", + "print \"voltage drop across each brush = %fV\"%(E)\n", + "phi = 0.03; #flux per pole in Wb\n", + "Z = 720.; #total armature current in volts\n", + "A = 2;\n", + "N = (E*60*A)/(phi*Z*P)\n", + "print \"full load speed of the motor = %frpm\"%(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage drop across each brush = 486.000000V\n", + "full load speed of the motor = 675.000000rpm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given Data\n", + "V = 440; #primary voltage in volts\n", + "Ia = 50; #armature current in amperes\n", + "Ra = 0.2; #armature resistance in ohms\n", + "N = 600; #speed in rpm\n", + "E = V-(Ia*Ra); #emf induced in volts before adding extra resistance\n", + "#E = K*phi*N = K1*Ia*N\n", + "K1 = E/(Ia*N);\n", + "\n", + "# Calculations and Results\n", + "#we have the relation T = Kt1*Ia**2, T1 = Kt1*Ia1**2\n", + "#when torque is half, say torque be T1\n", + "#T1 = T/2. r = T/T1\n", + "r = 2;\n", + "Ia1 = math.sqrt(Ia**2/r);\n", + "print \"Ia1 = %fA\"%(Ia1);\n", + "#extra resistance R is introduced in the circuit\n", + "N1 = 400;\n", + "E1 = (K1*Ia1*N1);\n", + "R = ((V-E1)/Ia1)-Ra;\n", + "print \"value of extra resistance added = %fohms\"%(R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ia1 = 35.355339A\n", + "value of extra resistance added = 6.511746ohms\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V = 200.; #voltage in volts\n", + "Ia = 20.; #armature current in amperes\n", + "Ra = 0.5; #armature resistance in ohms\n", + "Rse = 0.2; #field winding resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "E = V-(Ia*(Ra+Rse));\n", + "print \"In first case, E = %fV\"%(E)\n", + "#E = k*phi*N\n", + "N = 1000; #speed in rpm\n", + "Kphi = E/N; \n", + "#a resistance R is connected in parallel with the series field which is called diverter\n", + "print (\"when resistace R is added and new conditions\")\n", + "I = 20; #total current flowing\n", + "#current is equally devided between series field and diverter\n", + "Ise2 = I/2;\n", + "#flux at 10A current is 20percent of flux at 20A current\n", + "p = 0.70; #percentage of flux\n", + "Kpih1 = p*Kphi;\n", + "E1 = (V-((Ia*Ra)+(Ise2*Rse)));\n", + "print \"Induced emf = %fV\"%(E1)\n", + "#new speed is N1\n", + "N1 = E1/(p*Kphi)\n", + "print \"N1 = %frpm\"%(N1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In first case, E = 186.000000V\n", + "when resistace R is added and new conditions\n", + "Induced emf = 188.000000V\n", + "N1 = 1443.932412rpm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 200.; #motor runs in volts\n", + "Ia = 15.; #current taken in amperes\n", + "Ra = 1.; #motor resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "E1 = V-(Ia*Ra);\n", + "print \"resistance when 1ohm = %fV\"%(E1)\n", + "R = 5; #resistance \n", + "E2 = V-(Ia*(Ra+R))\n", + "print \"resistance when 5ohms connected in series = %fV\"%(E2)\n", + "N1 = 800; #speed of motor in rpm\n", + "N2 = N1*(E2/E1);\n", + "print \"speed at which motor will run when resistance is 5ohms = %frpm\"%(N2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resistance when 1ohm = 185.000000V\n", + "resistance when 5ohms connected in series = 110.000000V\n", + "speed at which motor will run when resistance is 5ohms = 475.675676rpm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "P = 8.; #pole\n", + "Z = 107.; #generator with slots\n", + "Ia = 1000.; #current containing in amperes\n", + "Bag = 0.32; #gap flux density in Wb/m**2\n", + "lg = 0.012; #interpole air gap in meters\n", + "pi = 3.14;\n", + "\n", + "# Calculations\n", + "Mu = (4*pi*10**-7)\n", + "AT = (((Ia*Z)/(2*P))+((Bag*lg)/Mu));\n", + "\n", + "# Results\n", + "print \"current for each commutating pole = %f\"%(AT)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current for each commutating pole = 9744.824841\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "Bag = 0.3; #flux density in the interpole air gap in Wb/m**2\n", + "\n", + "# Calculations and Results\n", + "Ia = 200000./200; #armature current in amperes\n", + "print \"Armature current = %f\"%(Ia)\n", + "Z = 540.; #Number of armature conductors\n", + "Zt = 540./2; #Number armature winding turns \n", + "print \"Number armature winding turns = %f\"%(Zt)\n", + "A = 6.; #the winding lap\n", + "Ap = Zt/A; #Number of armature turns per parallel path\n", + "print \"Number of armature turns per parallel path = %f\"%(Ap)\n", + "P = 6; #pole\n", + "Np = ((Ia*Ap)/P);\n", + "print \"Number of armature ampere turns per pole = %f\"%(Np)\n", + "lg = 0.01; #inter pole air gap in meters\n", + "pi = 3.14;\n", + "Mu = (4*pi*10**-7)\n", + "Nipg = ((Bag*lg)/Mu); #Air gap\n", + "print \"ampere turns for the air gap = %f\"%(Nipg)\n", + "NipI = (Np+Nipg); #total interpole ampere\n", + "print \"Total interpole ampere turns = %f\"%(NipI)\n", + "Nip = (NipI/Ia);\n", + "print \"Number of turns needed on each commutating pole = %f\"%(Nip)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Armature current = 1000.000000\n", + "Number armature winding turns = 270.000000\n", + "Number of armature turns per parallel path = 45.000000\n", + "Number of armature ampere turns per pole = 7500.000000\n", + "ampere turns for the air gap = 2388.535032\n", + "Total interpole ampere turns = 9888.535032\n", + "Number of turns needed on each commutating pole = 9.888535\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "N = 960.; #speed in rpm\n", + "F = 23.; #effictive load in kgf\n", + "\n", + "# Calculations and Results\n", + "r = 45./2; #radius of the drum\n", + "print \"radius of the drum = %fcm\"%(r)\n", + "pi = 3.14;\n", + "OP = (2*pi*N*F*r*9.81)/(60*100);\n", + "print \"output power = %fW\"%(OP)\n", + "\n", + "Vi = 230.; #motor input in volts\n", + "Ci = 28.; #input current in amperes\n", + "IP = (Vi*Ci);\n", + "print \"input power = %fW\"%(IP)\n", + "Effi = (OP/IP)*100;\n", + "print \"Efficiency of the motor = %fpercent\"%(Effi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "radius of the drum = 22.500000cm\n", + "output power = 5101.043040W\n", + "input power = 6440.000000W\n", + "Efficiency of the motor = 79.208743percent\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "I = 440.; #input at no-load in watt\n", + "V = 220.; #voltage in volts\n", + "Ic = I/V; #input current at no-load in amperes\n", + "i = 1; #input current in amperes\n", + "A = 2; #current in amperes\n", + "C = A-i; #armature current at no-load in amperes\n", + "L = I-((((C)**2)*0.5)+(V*C)); #iron,friction and windage losses in watt\n", + "a = 40; #motor current in amperes\n", + "OP = (V*a);\n", + "Ra = 0.5;\n", + "\n", + "# Calculations and Results\n", + "Effi = (OP*100)/(OP+(((a+i)**2)*Ra)+(V*i)+L)\n", + "print \"Efficiency as a generator when delivering 40A at 220V = %fpercent\"%(Effi)\n", + "Eff = ((OP-(((a-i)**2)*Ra)-(V*C)-L)/OP)*100;\n", + "print \"Efficiency as a motor when taking 40A from at 220V = %fpercent\"%(Eff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency as a generator when delivering 40A at 220V = 87.301587percent\n", + "Efficiency as a motor when taking 40A from at 220V = 86.363636percent\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 400.; #motor in volts\n", + "Rf = 200.; #field resistance in ohms\n", + "If = V/Rf; #current in amperes\n", + "i = 5; #current at no load in amperes\n", + "IP = V*i; #motor input at no load\n", + "Ia = 3; #aramture current in amperes\n", + "Ra = 0.5; #armature resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "L = IP-(((Ia)**2)*Ra)-(V*If); #iron,friction and windage in losses in watt\n", + "print \"iron, friction and windage in losses = %fW\"%(L)\n", + "At = 50.; #armature total current in amperes\n", + "A = At-2; #armature current in amperes\n", + "Ls = (((A)**2)*Ra)+(V*If)+L; #Losses\n", + "Eff = (((V*At)-Ls)/(V*At))*100;\n", + "print \"Efficiency of full load = %fpercent\"%(Eff)\n", + "#flux is consmath.tant\n", + "E1 = V-(Ia*Ra); #induced emf in the armature at no load\n", + "E2 = V-(A*Ra); #induced emf in the armature at full load\n", + "# math.since N1/N2 = E1/E2\n", + "percentload = (1-(E2/E1))*100;\n", + "print \"Percentage change in speed from no load to full load = %fpercent\"%(percentload)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iron, friction and windage in losses = 1195.500000W\n", + "Efficiency of full load = 84.262500percent\n", + "Percentage change in speed from no load to full load = 5.646173percent\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.31 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "Ra = 0.5; #armature resistance in ohms\n", + "Rf = 750.; #field circuit resistance in ohms\n", + "V = 500.; #voltage in volts\n", + "\n", + "# Calculations\n", + "If = V/Rf; #current in amperes \n", + "l = 3.; #line current in amperes\n", + "i = 2.33; #current in motor in amperes\n", + "I = 0.67; #current i amperes\n", + "L = (V*l)-(((i)**2)*Ra)-(V*I); #Iron,friction and windage losses\n", + "O = 20.; #generator \n", + "OP = (O*1000)/V; #output current of the generator under loaded condition in amperes\n", + "Ia = I+OP; #output in amperes\n", + "Effi = (O*1000*100)/((O*1000)+(((Ia)**2)*Ra)+(V*I)+L);\n", + "\n", + "# Results\n", + "print \"efficiency of the machine = %fpercent\"%(Effi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "efficiency of the machine = 89.588435percent\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.32 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "Ig = 25.; #current of generator in amperes\n", + "I = 30.; #current in motor in amperes\n", + "Il = I-Ig; #current in amperes\n", + "Ra = 0.25; #resistance in ohms\n", + "Gl = ((Ig)**2)*Ra; #loss in generator in watt\n", + "M = ((I)**2)*Ra; #loss in motor in watt\n", + "T = Gl+M; #total loss in watt\n", + "V = 100.; #voltage in volts\n", + "P = V*Il; #power supplied from mains in watt\n", + "L = P-T; #iron,friction and windages losses in the two machines in ohms\n", + "l = L/2; #iron,friction and windages losses in each machines in ohms\n", + "IP = I*V; #input\n", + "\n", + "# Calculations and Results\n", + "Eff = ((IP-M-l)/IP)*100;\n", + "print \"Efficiency of the motor = %fpercent\"%(Eff)\n", + "OP = Ig*V; #output\n", + "Effi = ((OP)/(OP+Gl+l))*100;\n", + "print \"Efficiency of the generator = %fpercent\"%(Effi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of the motor = 90.520833percent\n", + "Efficiency of the generator = 92.059839percent\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.33 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 440.; #voltage in volts\n", + "P = 200.*1000; #power in watt\n", + "Ig = P/V; #rated current of each machine in amperes\n", + "\n", + "# Calculations\n", + "#assume losses to be equal\n", + "I = 90; #addition currnet supply\n", + "Effi = math.sqrt(Ig/(Ig+I))*100;\n", + "\n", + "# Results\n", + "print \"approximate efficiency = %fpercent\"%(Effi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "approximate efficiency = 91.363261percent\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.34 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "Ig = 2000.; #output current of generator in amperes\n", + "I = 380.; #Input current from supply mains in amperes\n", + "\n", + "# Calculations and Results\n", + "Effi = math.sqrt(Ig/(Ig+I))*100; #Efficiency of generator assuming equal efficiencies of the two machines\n", + "print \"Efficiences of the generator at full load assuming equal efficiencies = %fpercent\"%(Effi)\n", + "S = 22.; #Shunt field current of generator\n", + "G = Ig+S; #Armature current of generator in amperes\n", + "R = 0.01; #resistance of the armature circuit of each machine in ohms\n", + "Gc = ((G)**2)*R; #copper loss in arrmature circuit of generator in W\n", + "V = 500.; #Voltage in volts\n", + "L = V*S; #loss in the field circuit of the generator in W\n", + "T = Ig+I; #total current suuply in amperes\n", + "Sf = 17.; #shunt field current of motor in amperes\n", + "A = T-Sf; #armature current in motor in amperes\n", + "Lc = ((A)**2)*R; #loss in armature circuit of motor in amperes\n", + "Lf = V*Sf; #loss in the shunt field circuit of motor in W\n", + "Tin = V*I; #total input to motor and generator in W\n", + "Ml = Tin-(Gc+L+Lc+Lf); #iron,friction and windage loss in both machines in W\n", + "Me = Ml/2; #iron,friction and windage loss in each machine in W\n", + "p = 1000.; #power in kW\n", + "OP = (Ig*V)/p; #full load output of the generator\n", + "Eff = (p*100)/(p+((Gc+L+Me)/1000));\n", + "print \"Efficiency of the generator at full load = %fpercent\"%(Eff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiences of the generator at full load assuming equal efficiencies = 91.669850percent\n", + "Efficiency of the generator at full load = 91.846461percent\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb new file mode 100644 index 00000000..09c62b0c --- /dev/null +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch3.ipynb @@ -0,0 +1,1429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f7ea291c8e2293a8fc339d930ac29424b99d2f3c6350ea4ec55a2d06cfae4c2d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 500.; #rating\n", + "V1 = 11000.; #primary voltage in volts\n", + "V2 = 400.; #secondary voltage in volts\n", + "N2 = 100.; #number of turns in secondary winding\n", + "f = 50.; #frequency in hertz\n", + "\n", + "# Calculations and Results\n", + "N1 = (V1*N2)/V2; #number of turns in primary winding\n", + "print \"number of turns in primary winding, N1 = %dturns\"%(N1)\n", + "I1 = (kVA*1000)/V1;\n", + "I2 = (kVA*1000)/V2\n", + "print \"primary current, I1 = %fA\"%(I1)\n", + "print \"secondary current, I2 = %fA\"%(I2)\n", + "E1 = V1;\n", + "phi = E1/(4.44*f*N1)\n", + "print \"maximium flux in the core = %fWb\"%(phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of turns in primary winding, N1 = 2750turns\n", + "primary current, I1 = 45.454545A\n", + "secondary current, I2 = 1250.000000A\n", + "maximium flux in the core = 0.018018Wb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V1 = 6600.; #primary voltage in volts\n", + "V2 = 230.; #secondary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "Bm = 1.1; #flux density in Wb/m**2\n", + "\n", + "# Calculations and Results\n", + "A = (25*25*10**(-4)); #area of the core in m**2\n", + "phi = Bm*A\n", + "print \"flux = %fWb\"%(phi)\n", + "E1 = V1;\n", + "E2 = V2;\n", + "N1 = E1/(4.44*f*phi);\n", + "N2 = E2/(4.44*f*phi);\n", + "print \"number of turns in primary winding, N1 = %dturns\"%(N1)\n", + "print \"number of turns in secondary winding, N2 = %dturns\"%(N2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flux = 0.068750Wb\n", + "number of turns in primary winding, N1 = 432turns\n", + "number of turns in secondary winding, N2 = 15turns\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "V1 = 230.; #primary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "N1 = 100.; #number of primary turns\n", + "N2 = 400.; #number of secondary turns\n", + "\n", + "# Calculations and Results\n", + "A = 250.*10**(-4); #cross section area of core in m**2\n", + "print (\"since at no-load E2 = V2\")\n", + "E2 = (V1*N2)/N1;\n", + "print \"induced secondary winding, E2 = %dV\"%(E2);\n", + "phi = E2/(4.44*f*N2);\n", + "Bm = phi/A;\n", + "print \"Maximium flux density in the core = %fWb/m**2\"%(Bm)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "since at no-load E2 = V2\n", + "induced secondary winding, E2 = 920V\n", + "Maximium flux density in the core = 0.414414Wb/m**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 40.; #rating of the transformer\n", + "V1 = 2000.; #primary side voltage in volts\n", + "V2 = 250.; #secondary side voltage in volts\n", + "R1 = 1.15; #primary resistance in ohms\n", + "R2 = 0.0155; #secondary resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "R = R2+(((V2/V1)**2)*R1)\n", + "print \"Total resistance of the transformer in terms of the secondary winding = %fohms\"%(R)\n", + "I2 = (kVA*1000)/V2;\n", + "print \"Full load secondary current = %dA\"%(I2)\n", + "print \"Total resistance load on full load = %fVolts\"%(I2*R)\n", + "print \"Total copper loss on full load = %fWatts\"%((I2)**2*R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total resistance of the transformer in terms of the secondary winding = 0.033469ohms\n", + "Full load secondary current = 160A\n", + "Total resistance load on full load = 5.355000Volts\n", + "Total copper loss on full load = 856.800000Watts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given Data\n", + "I2 = 300.; #Secondary current in amperes\n", + "N1 = 1200.; #number of primary turns\n", + "N2 = 300.; #number of secondary turns\n", + "I0 = 2.5; #load current in amperes\n", + "\n", + "# Calculations\n", + "I1 = (I2*N2)/N1;\n", + "phi0 = math.degrees(math.acos(0.2));\n", + "phi2 = math.degrees(math.acos(0.8));\n", + "I1c = (I1*math.cos(math.radians(phi2)))+(I0*math.cos(math.radians(phi0)));\n", + "I1s = (I1*math.sin(math.radians(phi2)))+(I0*math.sin(math.radians(phi0)));\n", + "I = math.sqrt(I1c**2+I1s**2);\n", + "phi = math.radians(math.atan(I1s/I1c))\n", + "\n", + "# Results\n", + "print \"primary power factor = %fdegrees\"%(math.cos(math.radians(phi)));" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "primary power factor = 1.000000degrees\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given Data\n", + "I0 = 1.5; #no-load current\n", + "phi0 = math.degrees(math.acos(0.2))\n", + "I2 = 40; #secondary current in amperes\n", + "phi2 = math.degrees(math.acos(0.8))\n", + "r = 3; #ratio of primary and secondary turns\n", + "I1 = I2/r; \n", + "\n", + "# Calculations\n", + "I1c = (I1*math.cos(math.radians(phi2)))+(I0*math.cos(math.radians(phi0)));\n", + "I1s = (I1*math.sin(math.radians(phi2)))+(I0*math.sin(math.radians(phi0)));\n", + "I = math.sqrt(I1c**2+I1s**2);\n", + "\n", + "# Results\n", + "print \"I1 = %fA\"%(I)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I1 = 14.156879A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "V1 = 230.; #voltage in volts\n", + "f = 50.; #frequency of supply in hertz\n", + "N1 = 250.; #number of primary turns\n", + "I0 = 4.5; #no-load current in amperes\n", + "\n", + "# Calculations and Results\n", + "phi0 = math.degrees(math.acos(0.25));\n", + "Im = I0*math.sin(math.radians(phi0))\n", + "print \"magnetimath.sing current, Im = %fA\"%(Im);\n", + "\n", + "Pc = V1*I0*math.cos(math.radians(phi0));\n", + "print \"Core loss = %dW\"%(Pc)\n", + "print (\"neglecting I**2R loss in primary winding at no-load\")\n", + "E1 = V1;\n", + "phi = E1/(4.44*f*N1);\n", + "print \"Maximium value of flux in the core = %fWb\"%(phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetimath.sing current, Im = 4.357106A\n", + "Core loss = 258W\n", + "neglecting I**2R loss in primary winding at no-load\n", + "Maximium value of flux in the core = 0.004144Wb\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "I2 = 30.; #Secondary current in amperes\n", + "I0 = 2.; #load current in amperes\n", + "V1 = 660.; #primary voltage in volts\n", + "V2 = 220.; #secondary voltage in volts\n", + "\n", + "# Calculations\n", + "I1 = (I2*V2)/V1;\n", + "phi0 = math.degrees(math.acos(0.225));\n", + "phi2 = math.degrees(math.acos(0.9));\n", + "I1c = (I1*math.cos(math.radians(phi2)))+(I0*math.cos(math.radians(phi0)));\n", + "I1s = (I1*math.sin(math.radians(phi2)))+(I0*math.sin(math.radians(phi0)));\n", + "I = math.sqrt(I1c**2+I1s**2);\n", + "phi = math.degrees(math.atan(I1s/I1c))\n", + "\n", + "# Results\n", + "print \"I1 = %fA\"%(I)\n", + "print \"primary power factor = %fdegrees\"%(math.cos(math.radians(phi)));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I1 = 11.361713A\n", + "primary power factor = 0.831741degrees\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "phi_m = 7.5*10**(-3); #maximium flux\n", + "f = 50.; #frequecy in hertz\n", + "N1 = 144.; #number of primary turns\n", + "N2 = 432.; #number of secondary turns\n", + "kVA = 0.24; #rating of transformer\n", + "\n", + "# Calculations and Results\n", + "E1 = (4.44*phi_m*f*N1)\n", + "V1 = E1;\n", + "print \"V1 = %dV\"%(V1)\n", + "I0 = (kVA*1000)/V1;\n", + "phi0 = math.degrees(math.acos(0.26));\n", + "Im = I0*math.sin(math.radians(phi0));\n", + "print \"Im = %fA\"%(Im);\n", + "V2 = (E1*N2)/N1\n", + "print \"V2 = %fV\"%(V2)\n", + "print (\"At a load of 1.2kVA and power factor of 0.8 lagging\")\n", + "kVA = 1.2;\n", + "phi2 = math.degrees(math.acos(0.8));\n", + "I2 = (kVA*1000)/V2;\n", + "I = (I2*N2)/N1;\n", + "I1c = (I*math.cos(math.radians(phi2)))+(I0*math.cos(math.radians(phi0)));\n", + "I1s = (I*math.sin(math.radians(phi2)))+(I0*math.sin(math.radians(phi0)));\n", + "I = math.sqrt(I1c**2+I1s**2);\n", + "print \"I1 = %fA\"%(I);\n", + "phi = math.degrees(math.acos(((I*math.cos(math.radians(phi2)))+(I0*math.cos(math.radians(phi0))))/I));\n", + "print \"primary power factor = %flagging\"%(math.cos(math.radians(phi)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V1 = 239V\n", + "Im = 0.966575A\n", + "V2 = 719.280000V\n", + "At a load of 1.2kVA and power factor of 0.8 lagging\n", + "I1 = 5.825933A\n", + "primary power factor = 0.844673lagging\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given Data\n", + "V1 = 6600.; #primary voltage in volts\n", + "V2 = 240.; #secondary voltage in volts\n", + "kW1 = 10.; #power\n", + "phi1 = math.degrees(math.acos(0.8));\n", + "I2 = 50.; #current in amperes\n", + "kW3 = 5.; #power\n", + "phi2 = math.degrees(math.acos(0.7))\n", + "kVA = 8; #rating\n", + "phi4 = math.degrees(math.acos(0.6)) \n", + "\n", + "# Calculations and Results\n", + "I1 = (kW1*1000)/(math.cos(math.radians(phi1))*V2);\n", + "I3 = (kW3*1000)/(1*V2);\n", + "I4 = (kVA*1000)/V2;\n", + "Ih = ((I1*math.cos(math.radians(phi1)))+(I2*math.cos(math.radians(phi2)))+I3+(I4*math.cos(math.radians(phi4))));\n", + "Iv = ((I1*math.sin(math.radians(phi1)))+(I2*math.sin(math.radians(phi2)))-(I4*math.sin(math.radians(phi4))));\n", + "I5 = math.sqrt((Ih**2)+(Iv**2))\n", + "print \"I5 = %dA\"%(I5)\n", + "Ip = (I5*V2)/V1;\n", + "print \"The current drawn by the primary from 6600Vmains is equal to, Ip = %fA\"%(Ip);\n", + "phi = math.degrees(math.atan(Iv/Ih));\n", + "print \"power factor = %flagging\"%math.cos(math.radians(phi))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I5 = 124A\n", + "The current drawn by the primary from 6600Vmains is equal to, Ip = 4.516939A\n", + "power factor = 0.945934lagging\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "kVA = 100.; #rating of the tronsfromer\n", + "N1 = 400.; #number of primary turns\n", + "N2 = 80.; #number of secondary turns\n", + "R1 = 0.3; #primary resistance in ohms\n", + "R2 = 0.01; #secondary resistance in ohms\n", + "X1 = 1.1; #primary leakage reactance in ohs\n", + "X2 = 0.035; #secondary leakage reactance in ohms\n", + "\n", + "# Calculations and Results\n", + "Rr2 = (((N1/N2)**2)*R2)\n", + "print \"R2 = %f ohms\"%(Rr2);\n", + "Xx2 = (((N1/N2)**2)*X2);\n", + "print \"X2 = %f ohms\"%(Xx2);\n", + "Ze = math.sqrt((R1+Rr2)**2+(X1+Xx2)**2);\n", + "print \"Equivqlent impedence = %f\"%(Ze);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R2 = 0.250000 ohms\n", + "X2 = 0.875000 ohms\n", + "Equivqlent impedence = 2.050152\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency in hertz\n", + "r = 6.; #turns ratio\n", + "R1 = 0.90; #primary resistance in ohms\n", + "R2 = 0.03; #secondary resistance in ohms\n", + "X1 = 5.; #primary reactance in ohms\n", + "X2 = 0.13; #secondary reactance in ohms\n", + "I2 = 200.; #full-load current\n", + "\n", + "# Calculations and Results\n", + "Re = (R1+(R2*r**2));\n", + "print \"equivalent resistance reffered to primary, Re = %fohms\"%(Re);\n", + "Xe = (X1+(X2*r**2));\n", + "print \"equivalent reactance reffered to primary, Xe = %fohms\"%(Xe);\n", + "Ze = math.sqrt(Re**2+Xe**2);\n", + "print \"equivalent impedance reffered to primary, Ze = %fohms\"%(Ze);\n", + "Ii2 = r*I2;\n", + "print \"secondary current reffered to primary side = %fA\"%(Ii2);\n", + "print \"a)Voltage to be applied to the high voltage side = %dvolts\"%(Ii2*Ze);\n", + "print \"b)Power factor = %f\"%(Re/Ze);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equivalent resistance reffered to primary, Re = 1.980000ohms\n", + "equivalent reactance reffered to primary, Xe = 9.680000ohms\n", + "equivalent impedance reffered to primary, Ze = 9.880425ohms\n", + "secondary current reffered to primary side = 1200.000000A\n", + "a)Voltage to be applied to the high voltage side = 11856volts\n", + "b)Power factor = 0.200396\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "R1 = 0.21; #primary resistance in ohms\n", + "X1 = 1.; #primary reactance in ohms\n", + "R2 = 2.72*10**(-4); #secondary resistance in ohms\n", + "X2 = 1.3*10**(-3); #secondary reactanced in ohms\n", + "V1 = 6600.; #primary voltage in volts\n", + "V2 = 250.; #secondary voltage in volts\n", + "\n", + "# Calculations and Results\n", + "r = V1/V2; #turns ratio\n", + "Re = R1+(r**2*R2);\n", + "print \"Equivalent resistance referred to primary side = %fohms\"%(Re);\n", + "Xe = X1+(r**2*X2);\n", + "print \"Equivalent reactance referred to primary side = %fohms\"%(Xe);\n", + "Ze = math.sqrt(Re**2+Xe**2);\n", + "print \"equivalent impedance reffered to primary, Ze = %fohms\"%(Ze);\n", + "V = 400.; #voltage in volts\n", + "I1 = V/Ze;\n", + "print \"I1 = %f\"%(I1);\n", + "print \"Power input = %fW\"%(I1**2*Re);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistance referred to primary side = 0.399573ohms\n", + "Equivalent reactance referred to primary side = 1.906048ohms\n", + "equivalent impedance reffered to primary, Ze = 1.947480ohms\n", + "I1 = 205.393656\n", + "Power input = 16856.612924W\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "N1 = 90.; #number of primary turns\n", + "N2 = 180.; #number of secondary turns\n", + "R1 = 0.067; #primary resistance in ohms\n", + "R2 = 0.233; #secondary resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "print \"Primary winding resistance referred to secondary side = %fohms\"%((R1*N2/N1)**2)\n", + "print \"secondary winding resistance referred to primary side = %fohms\"%((R2*N1/N2)**2)\n", + "print \"Total resistance of the transformer refferred to primary side = %fohms\"%((((R1*N2/N1)**2)+R2*N2/N1)**2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary winding resistance referred to secondary side = 0.017956ohms\n", + "secondary winding resistance referred to primary side = 0.013572ohms\n", + "Total resistance of the transformer refferred to primary side = 0.234213ohms\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 30.; #rating of the transformer\n", + "V1 = 6000.; #primary voltage in volts\n", + "V2 = 230.; #secondary voltage in volts\n", + "R1 = 10.; #primary resistance in ohms\n", + "R2 = 0.016; #secondary resistance in ohms\n", + "Xe = 23.; #total reactance reffered to the primary\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(0.8)); #lagging\n", + "Re = (R1+((V1/V2)**2*R2))\n", + "print \"equivalent resistance, Re = %fohms\"%(Re)\n", + "I2dash = (kVA*1000)/V1;\n", + "V2dash = 5847;\n", + "Reg = ((I2dash*((Re*math.cos(math.radians(phi)))+(Xe*math.sin(math.radians(phi)))))*100)/V2dash;\n", + "print \"percentage regulation = %fpercent\"%(Reg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equivalent resistance, Re = 20.888469ohms\n", + "percentage regulation = 2.609097percent\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 10.; #rating of the transformer\n", + "V1 = 2000.; #primary voltage in volts\n", + "V2 = 400.; #secondary voltage in volts\n", + "R1 = 5.5; #primary voltage in ohms\n", + "R2 = 0.2; #secondary voltage in ohms\n", + "X1 = 12.; #primary reactance in ohms\n", + "X2 = 0.45; #secondary reactance in ohms\n", + "\n", + "# Calculations and Results\n", + "#assuming (V1/V2) = (N1/N2)\n", + "Re = R2+(R1*(V2/V1)**2);\n", + "print \"equivalent resistance referred to the secondary = %fohms\"%(Re);\n", + "Xe = X2+(X1*(V2/V1)**2);\n", + "print \"equivalent reactance referred to the secondary = %fohms\"%(Xe);\n", + "Ze = math.sqrt(Re**2+Xe**2);\n", + "print \"equivalent impedance referred to the secondary = %fohms\"%(Ze);\n", + "phi = math.degrees(math.acos(0.8));\n", + "Vl = 374.5;\n", + "print \"Voltage across the full load and 0.8 p.f lagging = %fV\"%(Vl);\n", + "reg = ((V2-Vl)*100)/Vl;\n", + "print \"percentage voltage regulation = %f percent\"%(reg);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equivalent resistance referred to the secondary = 0.420000ohms\n", + "equivalent reactance referred to the secondary = 0.930000ohms\n", + "equivalent impedance referred to the secondary = 1.020441ohms\n", + "Voltage across the full load and 0.8 p.f lagging = 374.500000V\n", + "percentage voltage regulation = 6.809079 percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 80.; #rating of the transformer\n", + "V1 = 2000.; #primary voltage in volts\n", + "V2 = 200.; #secondary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "Id = 8.; #impedence drop\n", + "Rd = 4.; #resistance drop\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(0.8))\n", + "I2Ze = (V2*Id)/100;\n", + "I2Re = (V2*Rd)/100;\n", + "I2Xe = math.sqrt(I2Ze**2-I2Re**2)\n", + "reg = ((I2Re*math.cos(math.radians(phi)))+(I2Xe*math.sin(math.radians(phi))))*(100/V2)\n", + "print \"percentage regulation = %fpercent\"%(reg)\n", + "pf = I2Xe/math.sqrt(I2Re**2+I2Xe**2)\n", + "print \"Power factor for zero regulation = %fleading)\"%(pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage regulation = 7.356922percent\n", + "Power factor for zero regulation = 0.866025leading)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 50.; #rating of the transformer\n", + "V1 = 3300.; #open circuit primary voltage\n", + "Culoss = 540.; #copper loss from short circuit test\n", + "coreloss = 460.; #core loss from open circuit test\n", + "V1sc = 124.; #short circuit primary voltage in volts\n", + "I1sc = 15.4; #short circuit primary current in amperes\n", + "Psc = 540. #short circuit primary power in watts \n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(0.8))\n", + "effi = (kVA*1000*math.cos(math.radians(phi))*100)/((kVA*1000*math.cos(math.radians(phi)))+Culoss+coreloss)\n", + "print \"From the open-circuit test, core-loss = %dW\"%(coreloss);\n", + "print \"From short circuit test, copper loss = %dW\"%(Culoss);\n", + "print \"The efficiency at full-load and 0.8 lagging power factor = %f\"%(effi);\n", + "Ze = V1sc/I1sc;\n", + "Re = Psc/I1sc**2;\n", + "Xe = math.sqrt(Ze**2-Re**2);\n", + "V2 = 3203;\n", + "phi2 = math.degrees(math.acos(0.8));\n", + "phie = math.degrees(math.acos(Culoss/(V1sc*I1sc)));\n", + "reg = (V1sc*math.cos(math.radians(phie-phi2))*100)/V1;\n", + "print \"Voltage regulation = %dpercent\"%(reg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From the open-circuit test, core-loss = 460W\n", + "From short circuit test, copper loss = 540W\n", + "The efficiency at full-load and 0.8 lagging power factor = 97.560976\n", + "Voltage regulation = 3percent\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "kVA = 100.;\n", + "V1 = 6600.; #primary voltage in volts\n", + "V2 = 330.; #secondary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "V1sc = 100.; #short circuit primary voltage in volts\n", + "I1sc = 10.; #short circuit primary current in amperes\n", + "Psc = 436.; #short circuit primary power in watts \n", + "\n", + "# Calculations and Results\n", + "Ze = V1sc/I1sc;\n", + "Re = Psc/I1sc**2;\n", + "phi = math.degrees(math.acos(0.8));\n", + "Xe = math.sqrt(Ze**2-Re**2);\n", + "print \"Total resistance = %fohms\"%(Re);\n", + "print \"Total impedence = %fohms\"%(Ze)\n", + "Il = (kVA*1000)/V1;\n", + "V1dash = (math.sqrt(((V1*math.cos(math.radians(phi)))+(Il*Re))**2+((V1*math.sin(math.radians(phi)))+(Il*Xe))**2));\n", + "print \"full voltage current, V1 = %dV\"%(V1dash)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total resistance = 4.360000ohms\n", + "Total impedence = 10.000000ohms\n", + "full voltage current, V1 = 6735V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "V2 = 500.; #secondary voltage in volts\n", + "V1 = 250.; #primary voltage in short circuit test in volts\n", + "I0 = 1.; #current in short circuit test in amperes\n", + "P = 80.; #core loss in watt\n", + "Psc = 100.; #power in short circuit test in watts\n", + "Vsc = 20.; #short circuit voltage in volts \n", + "Isc = 12.; #short circuit current in amperes\n", + "\n", + "# Calculations and Results\n", + "phi0 = math.degrees(math.acos(P/(V1*I0)));\n", + "print \"From open circuit test , math.cos(phi0) = %f\"%(math.cos(phi0));\n", + "Ic = I0*math.cos(math.radians(phi0));\n", + "print \"Loss component of no-load current, Ic = %fA\"%(Ic)\n", + "Im = math.sqrt(I0**2-Ic**2);\n", + "print \"Magnetising current, Im = %fA\"%(Im);\n", + "Rm = V1/Ic;\n", + "Xm = V1/Im;\n", + "Re = Psc/(Isc**2);\n", + "Ze = Vsc/Isc;\n", + "Xe = math.sqrt(Ze**2-Re**2);\n", + "print \"Equvalent resistance referred to secondary = %fohms\"%(Re);\n", + "print \"Equvalent reactance referred to secondary = %fohms\"%(Xe);\n", + "print \"Equvalent impedance referred to secondary = %fohms\"%(Ze);\n", + "K = V2/V1; #turns ratio\n", + "print \"Equvalent resistance referred to primary = %fohms\"%(Re/K**2);\n", + "print \"Equvalent reactance referred to primary = %fohms\"%(Xe/K**2);\n", + "print \"Equvalent impedance referred to primary = %fohms\"%(Ze/K**2);\n", + "V = 500; #output in volts\n", + "I = 10; #output current in amperes\n", + "phi = math.degrees(math.acos(0.80));\n", + "effi = (V*I*math.cos(math.radians(phi))*100)/((V*I*math.cos(math.radians(phi)))+P+((I)**2*Re));\n", + "print \"Effiency = %fpercent\"%(effi);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From open circuit test , math.cos(phi0) = -0.606173\n", + "Loss component of no-load current, Ic = 0.320000A\n", + "Magnetising current, Im = 0.947418A\n", + "Equvalent resistance referred to secondary = 0.694444ohms\n", + "Equvalent reactance referred to secondary = 1.515099ohms\n", + "Equvalent impedance referred to secondary = 1.666667ohms\n", + "Equvalent resistance referred to primary = 0.173611ohms\n", + "Equvalent reactance referred to primary = 0.378775ohms\n", + "Equvalent impedance referred to primary = 0.416667ohms\n", + "Effiency = 96.398447percent\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "kVA = 200.; #Rating of the transformer\n", + "Pin = 3.4; #power input to two transformer in watt\n", + "Pin2 = 5.2;\n", + "coreloss = Pin; #core loss of two transformers\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(0.8));\n", + "print \"Core loss of two transformer = %fkW\"%(Pin)\n", + "print \"Core loss of each transformer = %fkW\"%(Pin/2)\n", + "print \"Full load copper loss of the two transformer = %fkW\"%(Pin2)\n", + "print \"Therefore, full load copper loss of each transformer = %fkW\"%(Pin2/2);\n", + "effi = (kVA*math.cos(math.radians(phi))*100)/((kVA*math.cos(math.radians(phi)))+(Pin/2)+(Pin2/2))\n", + "print \"Full load efficiency at 0.8 p.f. lagging = %fpercent\"%(effi);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core loss of two transformer = 3.400000kW\n", + "Core loss of each transformer = 1.700000kW\n", + "Full load copper loss of the two transformer = 5.200000kW\n", + "Therefore, full load copper loss of each transformer = 2.600000kW\n", + "Full load efficiency at 0.8 p.f. lagging = 97.382836percent\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 50.; #rating of the transformer\n", + "V1 = 6360.; #primary voltage rating\n", + "V2 = 240.; #secondary voltage rating\n", + "pf = 0.8\n", + "coreloss = 2; #core loss in kilo watt from open circuit test\n", + "Culoss = 2; #copper loss at secondary current of 175A\n", + "I = 175.; #current in amperes\n", + "\n", + "# Calculations and Results\n", + "I2 = (kVA*1000)/V2;\n", + "print \"Full load secondary current, I2 = %fA\"%(I2);\n", + "effi = (kVA*pf*100)/((kVA*pf)+coreloss+(Culoss*(I2/I)**2))\n", + "print \"Efficiency = %fpercent\"%(effi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full load secondary current, I2 = 208.333333A\n", + "Efficiency = 89.217075percent\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 500.; #rating of the transformer\n", + "R1 = 0.4; #resistance in primary winding inohms\n", + "R2 = 0.001; #resistance in secondary winding in ohms\n", + "V1 = 6600.; #primary voltahe in volts\n", + "V2 = 400.; #secondary voltage in volts\n", + "ironloss = 3.; #iron loss in kilowatt\n", + "pf = 0.8; #power factor lagging\n", + "\n", + "# Calculations and Results\n", + "I1 = (kVA*1000)/V1; \n", + "print \"Primary winding current = %fA\"%(I1);\n", + "I2 = (I1*V1)/V2;\n", + "print \"Secondary winding current = %fA\"%(I2);\n", + "Culoss = ((I1**2*R1)+(I2**2*R2));\n", + "print \"Copper losses in the two winding = %fWatts\"%(Culoss);\n", + "effi = (kVA*pf*100)/((kVA*pf)+ironloss+(Culoss/1000));\n", + "print \"Efficiency at 0.8 p.f = %fpercent\"%(effi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary winding current = 75.757576A\n", + "Secondary winding current = 1250.000000A\n", + "Copper losses in the two winding = 3858.184114Watts\n", + "Efficiency at 0.8 p.f = 98.314355percent\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 400.; #rating of the transformer\n", + "ironloss = 2.; #iron loss in kilowatt\n", + "pf = 0.8; #power factor\n", + "kW = 240.; #load in kilowatt\n", + "\n", + "# Calculations and Results\n", + "kVA1 = kW/pf;\n", + "print (\"Efficiency is maximium when,core-loss = copper-loss\")\n", + "coreloss = ironloss;\n", + "print (\"Maximium efficiency occurs at 240kw,0.8 power factor,i.e., at 300kVA load\")\n", + "Cl300 = coreloss;\n", + "Cl400 = (Cl300*(kVA/kVA1)**2);\n", + "pf1 = 0.71; #power factor for full load\n", + "effi = (kVA*pf1*100)/((kVA*pf1)+coreloss+Cl400);\n", + "print \"Efficiency at full-load and 071 power factor = %dpercent\"%(effi);\n", + "pf2 = 1 #maximium efficiency occurs at unity power factor\n", + "MAXeffi = (kVA1*pf2*100)/((kVA1*pf2)+coreloss+Cl300)\n", + "print \"Maximium efficiency at 300kVA and unity power factor = %fpercent\"%(MAXeffi);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency is maximium when,core-loss = copper-loss\n", + "Maximium efficiency occurs at 240kw,0.8 power factor,i.e., at 300kVA load\n", + "Efficiency at full-load and 071 power factor = 98percent\n", + "Maximium efficiency at 300kVA and unity power factor = 98.684211percent\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 40.; #rating of the transformer\n", + "coreloss = 450.; #core-loss in watts\n", + "Culoss = 800.; #copper loss in watt\n", + "pf = 0.8; #power factor of the load\n", + "\n", + "# Calculations and Results\n", + "FLeffi = (kVA*pf*100)/((kVA*pf)+((coreloss+Culoss)/1000));\n", + "print \"Full-load efficiency = %fpercent\"%(FLeffi);\n", + "print (\"For maximium efficiency, Core loss = copper loss\")\n", + "Culoss2 = coreloss; #for maximium efficiency\n", + "n = math.sqrt(Culoss2/Culoss);\n", + "kVA2 = n*kVA; #load for maximium efficiency\n", + "MAXeffi = (kVA2*pf*100)/((kVA2*pf)+((coreloss+Culoss2)/1000));\n", + "print \"Value of maximium efficiency = %fpercent\"%(MAXeffi);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full-load efficiency = 96.240602percent\n", + "For maximium efficiency, Core loss = copper loss\n", + "Value of maximium efficiency = 96.385542percent\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "kVA = 50.; #rating of the transformers\n", + "I1 = 250.; #primary current in amperes\n", + "Re = 0.006; #total resistance referred to the primary side\n", + "ironloss = 200.; #iron loss in watt\n", + "\n", + "# Calculations and Results\n", + "Culoss = (I1**2*Re); #copper loss in watt\n", + "pf = 0.8; #power factor lagging\n", + "print \"Full-load copper loss = %fW\"%(Culoss);\n", + "TL1 = ((Culoss+ironloss)/1000); \n", + "print \"Total loss on full load = %fkW\"%(TL1);\n", + "TL2 = ((((Culoss*(1/2)**2))+ironloss)/1000)\n", + "print \"Total loss on half load = %fkW\"%(TL2);\n", + "effi1 = (kVA*pf*100)/((kVA*pf)+TL1);\n", + "print \"Efficiency at full load, 0.8 power factor lagging = %f percent\"%(effi1)\n", + "effi2 = ((kVA/2)*pf*100)/(((kVA/2)*pf)+TL2);\n", + "print \"Efficiency at half load, 0.8 power factor lagging = %f percent\"%(effi2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full-load copper loss = 375.000000W\n", + "Total loss on full load = 0.575000kW\n", + "Total loss on half load = 0.200000kW\n", + "Efficiency at full load, 0.8 power factor lagging = 98.582871 percent\n", + "Efficiency at half load, 0.8 power factor lagging = 99.009901 percent\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "kVA = 10.; #rating of the transformers\n", + "V1 = 400.; #primary voltage in volts\n", + "V2 = 200.; #secondary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "\n", + "# Calculations and Results\n", + "MAXeffi = 0.96; #maximium efficiency\n", + "output1 = (kVA*0.75); #output at 75% of full load\n", + "input1 = (output1/MAXeffi);\n", + "print \"Input at 75percent of full load = %fkW\"%(input1);\n", + "TL = input1-output1;\n", + "print \"Total losses = %fkW\"%(TL);\n", + "Pi = TL/2;\n", + "Pc = TL/2;\n", + "print (\"Maximiunm efficiency occurs at 3/4th of full load\")\n", + "Pc = Pi/(3./4)**2;\n", + "print \"Thus, total losses on full load = %fW\"%((Pc+Pi)*1000);\n", + "pf = 0.8; #power factor lagging\n", + "effi = (kVA*pf*100)/((kVA*pf)+(Pc+Pi));\n", + "print \"Efficiency on full load. 0.8 power factor lagging = %fpercent\"%(effi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input at 75percent of full load = 7.812500kW\n", + "Total losses = 0.312500kW\n", + "Maximiunm efficiency occurs at 3/4th of full load\n", + "Thus, total losses on full load = 434.027778W\n", + "Efficiency on full load. 0.8 power factor lagging = 94.853849percent\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "kVA = 500.; #rating of the transformers\n", + "V1 = 3300.; #primary voltage in volts\n", + "V2 = 500.; #secondary voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "MAXeffi = 0.97; \n", + "x = 0.75; #fraction of full load for maximium efficiency\n", + "pf1 = 1.;\n", + "\n", + "# Calculations and Results\n", + "output1 = (kVA*x*pf1*1000);\n", + "print \"Output at maximium efficiency = %dwatts\"%(output1);\n", + "losses = ((1/MAXeffi)-1)*output1;\n", + "print \"Thus, at maximium efficiency, lossses = %fW\"%(losses)\n", + "Culoss = losses/2;\n", + "print \"Copper losses at 75percent of full load = %dW\"%(Culoss);\n", + "CulossFL = Culoss/x**2;\n", + "print \"Copper losses at full load = %dW\"%(CulossFL);\n", + "Re = CulossFL/(kVA*1000);\n", + "Ze = 0.1; #equivalent impedence per unit\n", + "Xe = math.sqrt(Ze**2-Re**2);\n", + "phi = math.degrees(math.acos(0.8));\n", + "reg = ((Re*math.cos(math.radians(phi)))+(Xe*math.sin(math.radians(phi))))*100;\n", + "print \"percentage regulation = %f percent\"%(reg);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output at maximium efficiency = 375000watts\n", + "Thus, at maximium efficiency, lossses = 11597.938144W\n", + "Copper losses at 75percent of full load = 5798W\n", + "Copper losses at full load = 10309W\n", + "percentage regulation = 7.520562 percent\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 Page No : 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V1 = 230.; #primary voltage of auto-transformer\n", + "V2 = 75.; #secondary voltage of auto-transformer\n", + "\n", + "# Calculations\n", + "r = (V1/V2); #ratio of primary to secondary turns\n", + "I2 = 200.; #load current in amperes\n", + "I1 = I2/r;\n", + "\n", + "# Results\n", + "print \"Primary current, I1 = %fA\"%(I1);\n", + "print \"Load current, I1 = %fA\"%(I2);\n", + "print \"cirrent flowing through the common portion of winding = %fA\"%(I2-I1);\n", + "print \"Economy in saving in copper in percentage = %fpercent\"%(100/r);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current, I1 = 65.217391A\n", + "Load current, I1 = 200.000000A\n", + "cirrent flowing through the common portion of winding = 134.782609A\n", + "Economy in saving in copper in percentage = 32.608696percent\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb new file mode 100644 index 00000000..930b14d4 --- /dev/null +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch4.ipynb @@ -0,0 +1,1509 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b6827bab8bcac6e2fc731c1e29fb824cdddabc14d1fbfce91735b0bd239d066e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Three Phase Induction Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data;\n", + "f = 50.; #frequency\n", + "p = 6.; # number of poles\n", + "V = 400.; #voltage supply\n", + "S = 4.; #percentage slip\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/p; #synchronous speed\n", + "print \"Syhchronous speed, Ns = %d \"%(Ns);\n", + "Nr = (1-(S/100))*Ns;\n", + "print \"speed of rotor with slip 4 percent, Nr is %d rpm \"%(Nr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Syhchronous speed, Ns = 1000 \n", + "speed of rotor with slip 4 percent, Nr is 960 rpm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data;\n", + "f = 50.; #frequency\n", + "V = 400.; #voltage supply\n", + "\n", + "# Calculations and Results\n", + "p = 2.;\n", + "print \"when P = 2, Syhchronous speed, Ns = %d \"%((120*f)/p);\n", + "p = 4;\n", + "print \"when P = 2, Syhchronous speed,Ns = %d \"%(120*f/p);\n", + "p = 6;\n", + "print \"when P = 2, Syhchronous speed, Ns = %d \"%(120*f/p);\n", + "p = 8;\n", + "print \"when P = 2 Syhchronous speed, Ns = %d \"%(120*f/p);\n", + "print (\"for Nr to be 1440 , Ns will be 1500, thus p = 4\")\n", + "Ns = 1500;Nr1 = 1440;\n", + "S1 = ((Ns-Nr1)/Ns)*100;\n", + "print \"slip = %d\"%(S1);\n", + "print (\"for Nr to be 940 , Ns will be 1000, thus p = 6\")\n", + "Ns = 1000;Nr2 = 940;\n", + "S2 = ((Ns-Nr2)/Ns)*100;\n", + "print \"slip = %d\"%(S2);\n", + "if S1>S2:\n", + " print (\"motor running at 1440 rpm is running at higher slip\")\n", + "elif S2>S1:\n", + " print (\"motor running at 940 rpm is running at higher slip\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when P = 2, Syhchronous speed, Ns = 3000 \n", + "when P = 2, Syhchronous speed,Ns = 1500 \n", + "when P = 2, Syhchronous speed, Ns = 1000 \n", + "when P = 2 Syhchronous speed, Ns = 750 \n", + "for Nr to be 1440 , Ns will be 1500, thus p = 4\n", + "slip = 0\n", + "for Nr to be 940 , Ns will be 1000, thus p = 6\n", + "slip = 0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data;\n", + "P = 10.; #poles of alternator\n", + "N = 600.; #speed of alternator\n", + "\n", + "# Calculations and Results\n", + "f = (P*N)/120 #frequency\n", + "print \"frequency = %d\"%(f);\n", + "print (\"when P = 2\");p = 2\n", + "Ns = (120*f)/p; #synchronous speed\n", + "print \"Syhchronous speed, Ns = %d \"%(Ns);\n", + "print (\"when P = 4\");p = 4;\n", + "Ns = (120*f)/p; #synchronous speed\n", + "print \"Syhchronous speed, Ns = %d \"%(Ns);\n", + "#speed of rotor(1440) is less than synchronous speed 1500, therefore P = 4\n", + "print (\"speed of rotor(1440) is less than synchronous speed 1500, therefore P = 4\")\n", + "Ns = 1500.;\n", + "Nr = 1440.;\n", + "S = ((Ns-Nr)/Ns)*100\n", + "print \"slip is %d percent and number of poles is 4\"%(S)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency = 50\n", + "when P = 2\n", + "Syhchronous speed, Ns = 3000 \n", + "when P = 4\n", + "Syhchronous speed, Ns = 1500 \n", + "speed of rotor(1440) is less than synchronous speed 1500, therefore P = 4\n", + "slip is 4 percent and number of poles is 4\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "Nr = 1440.; #rotor speed in rpm\n", + "f = 50.; #frequency in hertz\n", + "\n", + "# Calculations\n", + "#calculating Ns for values of P = 2,4,6,8 etc\n", + "#by checking P = 4\n", + "P = 4;\n", + "Ns = (120*f)/P; #Synchronous speed\n", + "S = (Ns-Nr)/Ns; #slip\n", + "Fr = S*f; #rotor frequency\n", + "\n", + "# Results\n", + "print \"Rotor frequency = %dHz\"%(Fr)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rotor frequency = 2Hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #induction motor frequency in hertz\n", + "fr = 1.5; #rotor frequency in hertz\n", + "\n", + "# Calculations and Results\n", + "S = fr/f; #slip\n", + "P = 8; #pole\n", + "Ns = (120*f)/P;\n", + "print \"synchronous speed = %frpm\"%(Ns)\n", + "Nr = Ns-(S*Ns);\n", + "print \"motor running speed = %frpm\"%(Nr)\n", + "S1 = S*100;\n", + "print \"slip percent = %fpercent\"%(S1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "synchronous speed = 750.000000rpm\n", + "motor running speed = 727.500000rpm\n", + "slip percent = 3.000000percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given Data\n", + "E20 = 100.; #induced emf in volts\n", + "R2 = 0.05; #rotor resistance in ohms\n", + "X20 = 0.1; #rotor reactance in ohms\n", + "\n", + "# Calculations and Results\n", + "E20p = E20/math.sqrt(3);\n", + "print (\"When S = 0.04\")\n", + "S = 0.04;\n", + "I2 = (S*E20p)/math.sqrt(R2**2+(S*X20)**2)\n", + "print \"I2 = %dA\"%(I2);\n", + "phi2 = math.degrees(math.acos(R2/(math.sqrt(R2**2+(S*X20)**2))));\n", + "print \"Phase angle between rotor voltage and rotor current = %f degrees\"%(phi2);\n", + "print (\"When S = 1\")\n", + "S = 1;\n", + "I2 = (S*E20p)/math.sqrt(R2**2+(S*X20)**2)\n", + "print \"I2 = %dA\"%(I2);\n", + "phi2 = math.degrees(math.acos(R2/(math.sqrt(R2**2+(S*X20)**2))));\n", + "print \"Phase angle between rotor voltage and rotor current = %f degrees\"%(phi2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When S = 0.04\n", + "I2 = 46A\n", + "Phase angle between rotor voltage and rotor current = 4.573921 degrees\n", + "When S = 1\n", + "I2 = 516A\n", + "Phase angle between rotor voltage and rotor current = 63.434949 degrees\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency of induction motor\n", + "P = 4.; #pole\n", + "Ns = (120*f)/P;\n", + "S = 3.; #slip percent\n", + "\n", + "# Calculations\n", + "Nr = Ns-((Ns*S)/100)\n", + "fr = (S*f)/100;\n", + "\n", + "# Results\n", + "print \"synchronous speed = %frpm\"%(Ns)\n", + "print \"speed of running motor = %frpm\"%(Nr)\n", + "print \"rotor frequency = %fHz\"%(fr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "synchronous speed = 1500.000000rpm\n", + "speed of running motor = 1455.000000rpm\n", + "rotor frequency = 1.500000Hz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "fr = 2.; #frequency of motor induced emf in hertz\n", + "f = 50.; #frequency of induction motor in hertz\n", + "S = (fr/f)*100; #slip percent\n", + "P = 6.; #pole\n", + "# Calculations\n", + "Ns = (120*f)/P;\n", + "Nr = Ns-((Ns*S)/100);\n", + "\n", + "# Results\n", + "print \"percentage slip = %fpercent\"%(S)\n", + "print \"rotor speed = %frpm\"%(Nr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage slip = 4.000000percent\n", + "rotor speed = 960.000000rpm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "P = 12.; #pole\n", + "f = 50.; #frequency of induction motor in hertz\n", + "Nr = 485.; #induction motor speed in rpm\n", + "\n", + "# Calculations\n", + "Ns = (120*f)/P;\n", + "S = (Ns-Nr)/Nr;\n", + "fr = S*f;\n", + "\n", + "# Results\n", + "print \"frequency of rotor current = %fHz\"%(fr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency of rotor current = 1.546392Hz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "E20 = 100.; #induced emf of induction motor at stanstill in volts\n", + "E20p = E20/math.sqrt(3); #induced emf per phase in volts\n", + "S = 0.40; #slip\n", + "\n", + "# Calculations and Results\n", + "E2 = S*E20p; #rotor induced emf at slip S in volts\n", + "print \"Rotor induced emf at a slip E2 = %fV\"%(E2);\n", + "R2 = 0.4; #resistance per phase in ohms\n", + "X20 = 2.25; #stanstill resistance per phase i ohms\n", + "Z2 = math.sqrt((R2)**2+(S*X20)**2); #rotor impedence at slip S in ohms\n", + "print \"Rotor impedence at a slip S, Z2 = %fohms\"%(Z2)\n", + "I = E2/Z2;\n", + "print \"rotor current = %fA\"%(I)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rotor induced emf at a slip E2 = 23.094011V\n", + "Rotor impedence at a slip S, Z2 = 0.984886ohms\n", + "rotor current = 23.448415A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "S = 0.03; #slip\n", + "SI = 50.; #stator input in kilowatts\n", + "SL = 2.; #stator loss in kilowatts\n", + "\n", + "# Calculations and Results\n", + "RI = SI-SL; #rotor input in kilowatts\n", + "RIL = S*RI; #rotor I**2R loss\n", + "#rotor core loss can be neglected at 3percent slip\n", + "PDR = RI-RIL; #power developed by the rotor\n", + "print \"Power developed by the rotor = %fkW\"%(PDR);\n", + "FWL = 1; #friction and windage loss in kilowatt\n", + "OP = PDR-FWL; #output power\n", + "print \"Output power = %fkW\"%(OP);\n", + "effi = (OP*100)/SI;\n", + "print \"Efficiency of the motor = %f percent\"%(effi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power developed by the rotor = 46.560000kW\n", + "Output power = 45.560000kW\n", + "Efficiency of the motor = 91.120000 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "f = 50.; #frequency of induction motor in hertz\n", + "hp = 20.; #horse power\n", + "ph = 3.; #Three phase supply\n", + "P = 4.; #number of poles\n", + "\n", + "# Calculations and Results\n", + "losses = 500; #friction and vintage losses\n", + "print \"Output of the motor = %fW\"%(hp*735.5)\n", + "Pd = (hp*735.5)+losses; #power developed in watt\n", + "print \"Power developed by the rotor = %dW\"%(Pd);\n", + "s = 0.04; #slip\n", + "rotorloss = (s*Pd)/(1-s);\n", + "print \"Rotor I**2R-loss = %fW\"%(rotorloss);\n", + "Ns = (120*f)/P;\n", + "print \"Ns = %drpm\"%(Ns);\n", + "Nr = Ns*(1-s);\n", + "print \"Nr = %drpm\"%(Nr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output of the motor = 14710.000000W\n", + "Power developed by the rotor = 15210W\n", + "Rotor I**2R-loss = 633.750000W\n", + "Ns = 1500rpm\n", + "Nr = 1440rpm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "f = 50.; #frequency of induction motor in hertz\n", + "P = 6.; #number of poles\n", + "ph = 3.; #Three phase supply\n", + "\n", + "# Calculations and Results\n", + "R2 = 0.1; #rotor resistance in ohms\n", + "Ns = (120*f)/P;\n", + "print \"Syncronous speed, Ns = %drpm\"%(Ns);\n", + "Nr = 940; #rotor speed in rpm\n", + "S = (Ns-Nr)/Ns;\n", + "print \"Slip, S = %f\"%(S);\n", + "print \"stanstill rotor reactance, X20 = %fohms\"%(R2/S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Syncronous speed, Ns = 1000rpm\n", + "Slip, S = 0.060000\n", + "stanstill rotor reactance, X20 = 1.666667ohms\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency of induction motor in hertz\n", + "P = 4.; #number of poles\n", + "Nr = 1440.; #rotor speed in rpm\n", + "R2 = 0.1; #rotor resistance in ohms\n", + "X20 = 0.6; #rotor stanstill resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/P;\n", + "print \"Synchronous speed = %drpm\"%(Ns);\n", + "S1 = (Ns-Nr)*(100/Ns);\n", + "print \"Full-load slip with rotor resistance, R2 i.e. S1 = %f\"%(S1);\n", + "print (\"on adding extra resistance o.1ohm\")\n", + "#on solving we get S2 = 0.08\n", + "S2 = 0.08;\n", + "Nr2 = Ns*(1-S2);\n", + "print \"New rotor speed = %drpm\"%(Nr2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronous speed = 1500rpm\n", + "Full-load slip with rotor resistance, R2 i.e. S1 = 4.000000\n", + "on adding extra resistance o.1ohm\n", + "New rotor speed = 1380rpm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 Page No : 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency in hertz\n", + "P = 4.; #number of poles\n", + "R2 = 0.04; #rotor resistance in ohms\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/P;\n", + "print \"Syncronous speed = %drpm\"%(Ns);\n", + "Nr = 1200; #rotor speed at maximium torque in rpm\n", + "S = (Ns-Nr)/Ns;\n", + "print \"Slip at maximium torque = %f\"%(S);\n", + "X20 = R2/S;\n", + "#starting torque is developed when S = 1\n", + "#r = (Tst/Tm)\n", + "r = (R2/(R2**2+X20**2))*(2*X20);\n", + "print \"Therefore, starting torque is %fpercent of the maximium torque\"%(r*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Syncronous speed = 1500rpm\n", + "Slip at maximium torque = 0.200000\n", + "Therefore, starting torque is 38.461538percent of the maximium torque\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "P = 4.; #number of poles\n", + "f = 50.; #frequency in hertz\n", + "ph = 3.; #three phase supply\n", + "R2 = 0.25; #rotor resistance in ohms\n", + "Nr = 1440.; #rotor speed in rpm\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/P;\n", + "S1 = (Ns-Nr)/Ns;\n", + "print \"S1 = %f\"%(S1);\n", + "Nr2 = 1200; #rotor speed when external is added\n", + "S2 = (Ns-Nr2)/Ns;\n", + "#torque remains consmath.tant,we get the relation R2' = R2*(S2/S1)\n", + "R2dash = R2*(S2/S1)\n", + "print \"Extra resistance to be connected in the motor circuit = %fohms\"%(R2dash-R2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S1 = 0.040000\n", + "Extra resistance to be connected in the motor circuit = 1.000000ohms\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 Page No : 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "hp = 20.; \n", + "P = 4.; #number of poles\n", + "f = 50.;\n", + "S = 0.03; #slip\n", + "\n", + "# Calculations and Results\n", + "MSO = hp*735.5; #motor shaft output\n", + "losses = 0.02*MSO #friction and windage loss in watts\n", + "Pd = MSO+losses; #power developed by the rotor in watts\n", + "RCL = (S*Pd)/(1-S); #rotor I**2*R loss\n", + "print \"rotor copper loss = %fW\"%(RCL);\n", + "Ri = Pd+RCL #rotor iron loss is neglected\n", + "print \"Rotor input = %fW\"%(Ri);\n", + "Ns = (120*f)/P;\n", + "Nr = Ns*(1-S)*(1./60); #rotor speed in rps\n", + "OT = MSO/(2*3.14*Nr); #outp[ut torque in Nm\n", + "print \"output torque = %fNm\"%(OT)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rotor copper loss = 464.047423W\n", + "Rotor input = 15468.247423W\n", + "output torque = 96.592028Nm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 Page No : 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency of induction motor in hertz\n", + "P = 6.; #pole\n", + "Ns = (120.*f)/P;\n", + "Nr = 975.; #induction motor running speed in rpm\n", + "\n", + "# Calculations and Results\n", + "S = (Ns-Nr)/Ns;\n", + "print \"the slip = %f\"%(S)\n", + "Pin = 40.; #power input to stator in kW\n", + "Sl = 1.; #stator losses in kW\n", + "Rin = Pin-Sl; #output from stator in kW\n", + "Rc = S*Rin;\n", + "print \"rotor copper losses = %fkW\"%(Rc)\n", + "l = 2.; #total losses in kW\n", + "p = Rin-Rc-l; #output power in kw\n", + "HP = (p*1000)/735.5;\n", + "print \"output horse output = %fHP\"%(HP)\n", + "in1 = 40.; #input in kW\n", + "effi = (p/in1)*100;\n", + "print \"efficiency = %fpercent\"%(effi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the slip = 0.025000\n", + "rotor copper losses = 0.975000kW\n", + "output horse output = 48.980286HP\n", + "efficiency = 90.062500percent\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 Page No : 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "f = 50.; #frequency of induction motor in hertz\n", + "P = 6.; #pole\n", + "\n", + "# Calculations and Results\n", + "Ns = (120.*f)/P;\n", + "print \"synchronous speed = %frpm\"%(Ns)\n", + "fr = 120./60; #rotor frequency\n", + "S = fr/f;\n", + "print \"the slip = %f\"%(S)\n", + "Nr = Ns-(Ns*S);\n", + "print \"rotor speed = %frpm\"%(Nr)\n", + "Rin = 80.; #rotor input in kW\n", + "Rc = S*Rin; #Rotor copper loss in kW\n", + "Ph = 3.; #number of phases\n", + "Rcp = (Rc/Ph)*1000; #loss per phase in watt\n", + "p = ((Rin-Rc)*1000)/735.5;\n", + "print \"mechanical power developed = %fhp\"%(p)\n", + "Ir = 60; #rotor current in amperes\n", + "R2 = Rcp/(Ir)**2;\n", + "print \"rotor resistance per phase at rotor current 60A = %fohms\"%(R2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "synchronous speed = 1000.000000rpm\n", + "the slip = 0.040000\n", + "rotor speed = 960.000000rpm\n", + "mechanical power developed = 104.418763hp\n", + "rotor resistance per phase at rotor current 60A = 0.296296ohms\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 Page No : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "# we know (Ts/Tm) = ((2*a)/(1+a**2))\n", + "#where a = (R2/X20)\n", + "#at starting contion math.since Tm = Ts\n", + "print (\"At starting contion math.since Tm = Ts\")\n", + "\n", + "# Calculations and Results\n", + "a = 1 #we obtain from the relations\n", + "R2 = 0.05; #circuit resistance in ohms\n", + "X2 = 0.4; #stanstill reactance in ohms\n", + "r = (a*X2)-R2; #r is the extra that is added to the rotor circuit\n", + "print \"extra resistance added ,r = %fohms\"%(r)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At starting contion math.since Tm = Ts\n", + "extra resistance added ,r = 0.350000ohms\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 400.; #supply voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "P = 6.; #number of poles\n", + "ph = 3.; #three phase supply\n", + "R2 = 0.03; #rotor resistance in ohms\n", + "X20 = 0.4; #rptor reactance in ohms\n", + "Nr = 960.; #full load speed in rpm\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/P;\n", + "print \"synchronous speed = %drpm\"%(Ns)\n", + "S = (Ns-Nr)/Ns; #corresponding slip\n", + "#maximium torque Tm occurs at S = (R2/X20)\n", + "#we get Tm = k/(2*X20)\n", + "a = R2/X20;\n", + "#r = Tm/T\n", + "r = (a**2+S**2)/(2*a*S);\n", + "Sm = (R2/X20);\n", + "print \"Slip at maximium torque, Sm = %f\"%(Sm);\n", + "#corresponding speed\n", + "Nr2 = Ns*(1-Sm);\n", + "print \"Rotor speed at maximium torque = %drpm\"%(Nr2)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "synchronous speed = 1000rpm\n", + "Slip at maximium torque, Sm = 0.075000\n", + "Rotor speed at maximium torque = 925rpm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "V = 400.; #supply voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "P = 4.; #number of poles\n", + "ph = 3.; #three phase supply\n", + "S = 0.04;\n", + "If = 30.; #Full load current in amperes\n", + "\n", + "# Calculations and Results\n", + "Isc = 6*If;\n", + "#let r be the ratio of starting torque nd full load torque, r = Ts/Tf\n", + "r = (Isc/If)**2*S;\n", + "#Tf = Tm is produced when voltage is Vm\n", + "Vm = math.sqrt(V**2/r);\n", + "print \"voltage at maximium torque = %fvolts\"%(Vm);\n", + "Is = 6*If*(Vm/V);\n", + "print \"Full-load current at 333.3 volts is = %fA\"%(Is)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage at maximium torque = 333.333333volts\n", + "Full-load current at 333.3 volts is = 150.000000A\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 Page No : 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 400.; #supply voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "Id = 75.; #current taken when delta-connected in amperes\n", + "\n", + "# Calculations and Results\n", + "print \"current taken when delta-connected = %dA\"%(Id);\n", + "Is = Id/3; #current taken when star-connected in amperes\n", + "print \"current taken when star-connected = %dA\"%(Is);\n", + "#Tfl be the full load torque\n", + "#r = Ts/Tfl\n", + "r = 1.5;\n", + "#math.since voltage becomes (1/math.sqrt(3)) when star connected \n", + "#torque is directly proportional to square of voltage\n", + "print \"Starting torque with winding star connected = %f times of Tfl\"%(r/3);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current taken when delta-connected = 75A\n", + "current taken when star-connected = 25A\n", + "Starting torque with winding star connected = 0.500000 times of Tfl\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "ph = 3;\n", + "#rotor copper loss = slip*rotor input\n", + "#Tst = starting torque\n", + "#Tfl = torque at full load\n", + "#Ist/Ifl = r\n", + "r = 6;\n", + "\n", + "# Calculations and Results\n", + "S = 0.04\n", + "print \" At slip = 0.04\"\n", + "print \"For direct-on-line starting ( Tst/Tfl) = %f\"%(r**2*S);\n", + "#phase current in start is (1/math.sqrt(3)) times the phase current in delta\n", + "\n", + "print \"For direct-on-line starting( Tst/Tfl) = %f\"%((r/math.sqrt(3))**2*S);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " At slip = 0.04\n", + "For direct-on-line starting ( Tst/Tfl) = 1.440000\n", + "For direct-on-line starting( Tst/Tfl) = 0.480000\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.29 Page No : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "V = 400.; #voltage in volts\n", + "f = 50.; #frequency in hertz\n", + "P = 4.; #number of poles\n", + "#r1 = (Ts/Tfl)\n", + "r1 = 1.6;\n", + "#r2 = (Tm/Tfl)\n", + "r2 = 2.;\n", + "#r3 = (Ts/Tm) = (2*a)/(1+a**2)\n", + "r3 = 0.8;\n", + "#on solving , we get a = 0.04 ,\n", + "a = 0.04;\n", + "\n", + "# Calculations and Results\n", + "Sm = 0.04; #slip at maximium torque\n", + "print \"Slip at maximium torque, Sm = %f\"%(Sm)\n", + "Ns = (120*f)/P; #synchronous speed in rpm\n", + "Nr = Ns*(1-Sm) #rotor speed in rpm\n", + "#r2 = (a**2+Sfl**2)/(2*a*Sfl)\n", + "Sfl = 0.01;\n", + "Nr2 = Ns*(1-Sfl);\n", + "print \"full load speed, Nr = %drpm\"%(Nr2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slip at maximium torque, Sm = 0.040000\n", + "full load speed, Nr = 1485rpm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.30 Page No : 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "hp = 20.; #power in horsepower\n", + "f = 50.; #frequency in hertz\n", + "P = 4.; #number of poles\n", + "\n", + "# Calculations and Results\n", + "Ns = (120*f)/P; #synchronous speed\n", + "print \"Synchronous speed, Ns = %drpm\"%(Ns);\n", + "S = 0.04; #slip\n", + "Nr = Ns*(1-S);\n", + "OP = hp*735.5;\n", + "print \"Output power = %fW\"%(OP);\n", + "OT = OP/(2*3.14*(Nr/60));\n", + "print \"Output torque = %fNm\"%(OT);\n", + "FL = 0.02*OP; #Friction and windage loss\n", + "PD = OP+FL;\n", + "print \"Power developed by the rotor = %fW\"%(PD);\n", + "#from relation, (rotor I**2R-loss = S*Rotor input) we get following relation \n", + "RL = (S*PD)/(1-S); \n", + "print \"Rotor I**2R-loss = %fW\"%(RL);\n", + "RI = RL/S;\n", + "print \"Rotor input = %dW\"%(RI)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronous speed, Ns = 1500rpm\n", + "Output power = 14710.000000W\n", + "Output torque = 97.598195Nm\n", + "Power developed by the rotor = 15004.200000W\n", + "Rotor I**2R-loss = 625.175000W\n", + "Rotor input = 15629W\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "P = 4.; #number of poles\n", + "f = 50.; #frequency in hertz\n", + "V = 230.; #voltage in volts\n", + "hp = 5.; #power in horsepower\n", + "Ib = 15.; #current in block rotor test in amperes\n", + "\n", + "# Calculations and Results\n", + "output = hp*735.5; #output in watts\n", + "#in block rotor test: power input = Full = load I**2R losses = 735W\n", + "FLl = 735; #Full-load I**2R losses\n", + "print \"Full-load I**2R losses = %fW\"%(FLl);\n", + "Re = FLl/(3*Ib**2);\n", + "Io = 6.3; #current in no load condition in amperes\n", + "lossNL = (3*(Io)**2*Re); #I**2R loss at no-load condition\n", + "print \"I**2R loss at no-load = %fW\"%(lossNL);\n", + "PiNL = 275; #power input at no-load\n", + "print \"Core loss plus friction and windage loss = %dW\"%(PiNL-lossNL);\n", + "TL = FLl+(PiNL-lossNL);\n", + "effi = (output*100)/(output+TL);\n", + "print \"Efficiency = %fpercent\"%(effi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full-load I**2R losses = 735.000000W\n", + "I**2R loss at no-load = 129.654000W\n", + "Core loss plus friction and windage loss = 145W\n", + "Efficiency = 80.685043percent\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.32 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "Vl = 415.; #voltage in volts\n", + "Il = 50.; #line current in amperes\n", + "R1 = 0.5; #resistrance of stator winding per phase in ohms\n", + "pf = 0.85; #power factor\n", + "S = 0.04;\n", + "\n", + "# Calculations and Results\n", + "IFL = (math.sqrt(3)*Vl*Il*pf) #input to the motor on full load\n", + "print \"Input to the motor on full load = %dW\"%(IFL);\n", + "I1 = Il/math.sqrt(3);\n", + "SLFL = (3*I1**2*R1) #Stator I**2R loss on full load\n", + "print \"Stator I**2R loss on full load = %dW\"%(SLFL);\n", + "#given ratio of stator core loss friction and windahe loss be r = (r1:r2)\n", + "r1 = 3.;\n", + "r2 = 2.;\n", + "TL = 1500.; #total loss\n", + "SCL = (r1*TL)/(r1+r2); #stator core loss\n", + "FWL = (r2*TL)/(r1+r2); #Friction and windage loss\n", + "SL = SLFL+SCL; #total stator loss\n", + "SI = IFL; #Stator input\n", + "Pa = SI-SL; #power transferred through the air-gap = input to the rotor\n", + "RI = Pa\n", + "RL = S*RI; #rotor losses\n", + "TRL = FWL+RL; #total rotor losses \n", + "OP = RI-TRL; #Output power at the shaft\n", + "effi = (OP*100)/SI;\n", + "print \"Efficiency = %f percent\"%(effi)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input to the motor on full load = 30549W\n", + "Stator I**2R loss on full load = 1250W\n", + "Efficiency = 87.279597 percent\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.33 Page No : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "E20 = 100.; #induced emf between slip terminals in volts\n", + "\n", + "# Calculations and Results\n", + "E20p = E20/math.sqrt(3); #induced emf per phase in volts\n", + "print \"induced emf per phase = %fV\"%(E20p)\n", + "S = 3/100; #slip\n", + "R2 = 0.2; #resistance in ohms\n", + "X20 = 1; #stanstill resistance in ohms\n", + "I2 = (S*E20p)/math.sqrt((R2)**2+(S*X20)**2)\n", + "print \"rotor current at slip 0.03 = %fA per phase\"%(I2)\n", + "Sm = R2/X20;\n", + "I2m = (Sm*E20p)/math.sqrt((R2)**2+(Sm*X20)**2)\n", + "print \"rotor current when the rotor develops maximum torque = %fA per phase\"%(I2m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "induced emf per phase = 57.735027V\n", + "rotor current at slip 0.03 = 0.000000A per phase\n", + "rotor current when the rotor develops maximum torque = 40.824829A per phase\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.34 Page No : 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "E20 = 120.; #induced emf of motor at stanstill in volts\n", + "E20p = 120./math.sqrt(3); #induced emf per phase\n", + "f = 50.; #frequency of the motor in hertz\n", + "R2 = 0.2; #Rotor resistance per phase\n", + "X20 = 1.; #stanstill resistance in ohms\n", + "P = 4.; #pole\n", + "I = 16.; #\n", + "\n", + "# Calculations and Results\n", + "S = (I*R2)/math.sqrt((E20)**2-(I*X20)**2);\n", + "Ns = (120*f)/P;\n", + "print \"Synchronous speed = %frpm\"%(Ns)\n", + "Nr = Ns-(Ns*S)\n", + "Sm = R2/X20;\n", + "Nr = Ns-(Ns*Sm)\n", + "I2 = (Sm*E20p)/math.sqrt((R2)**2+(Sm*X20)**2)\n", + "print \"rotor current at maximum torque = %fAper Phase\"%(I2)\n", + "Pi = (3*((I2)**2)*R2)/Sm;\n", + "print \"Rotor input for the three phase = %fW\"%(Pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Synchronous speed = 1500.000000rpm\n", + "rotor current at maximum torque = 48.989795Aper Phase\n", + "Rotor input for the three phase = 7200.000000W\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.35 Page No : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "R1dc = 0.01; #DC resistance in ohms\n", + "V = 400.; #voltage in volts\n", + "r = 1.5; #ratio of ac to dc resistance\n", + "R1 = r*R1dc; #AC resistance in ohms\n", + "#at no-load\n", + "Io = 20.; #no-load current in amperes\n", + "SL = (3*Io**2*R1); #I**2R loss in the stator phases in watts\n", + "FWL = 300.; #Friction and windage loss in watts\n", + "TL = 1200.; #total losses = no-load power input in watts\n", + "\n", + "# Calculations\n", + "CL = TL-(SL+FWL); #core loss in watt\n", + "CLp = CL/math.sqrt(3); #core loss per phase\n", + "Vp = V/math.sqrt(3); #voltage per phase\n", + "Rm = (Vp**3)/CL; #motor resistance\n", + "pf = CL/(Vp*Io);\n", + "phi0 = math.degrees(math.acos(pf));\n", + "Xm = Vp/(Io*math.sin(math.radians(phi0))); #motor reactance\n", + "#Under blocked rotor test\n", + "Vb = 100; #voltage in volts\n", + "Isc = 45; #current in amperes\n", + "Vbp = 100/math.sqrt(3); #voltage per phase in volts\n", + "P = 2750; #power supplied in watts\n", + "Ze = Vbp/Isc; #Motor impedance reffered to stator side in ohms\n", + "Re = P/(3*Isc**2);\n", + "R2 = Re-R1; #rotor resistance referred to stator side\n", + "Xe = math.sqrt(Ze**2-Re**2);\n", + "#assuming X1 = X2\n", + "X2 = Xe/2\n", + "X1 = X2;\n", + "\n", + "# Results\n", + "print \"Thus the elements of the equivalent circuit are:\";\n", + "print \"Rm = %fohms\"%(Rm);\n", + "print \"Xm = %fohms\"%(Xm);\n", + "print \"R1 = %fohms\"%(R1);\n", + "print \"rotor resistance referred to stator side, R2 = %fohms\"%(R2);\n", + "print \"equivalent resistance referred to stator side, Re = %fohms\"%(Re);\n", + "\n", + "print \"X1 = %fohms\"%(X1);\n", + "print \"rotor reactance referred to stator side, X2 = %fohms\"%(X2);\n", + "print \"equivalent reactance referred to stator side, Xe = %fohms\"%(Xe);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus the elements of the equivalent circuit are:\n", + "Rm = 13964.632361ohms\n", + "Xm = 11.763476ohms\n", + "R1 = 0.015000ohms\n", + "rotor resistance referred to stator side, R2 = -0.015000ohms\n", + "equivalent resistance referred to stator side, Re = 0.000000ohms\n", + "X1 = 0.641500ohms\n", + "rotor reactance referred to stator side, X2 = 0.641500ohms\n", + "equivalent reactance referred to stator side, Xe = 1.283001ohms\n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb b/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb new file mode 100644 index 00000000..60bed6fd --- /dev/null +++ b/Electrical_Machines_by_S._K._Bhattacharya/ch5.ipynb @@ -0,0 +1,989 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c4ac592513e221d9ef582b6b080c90b8d233dba2c2d1c00437e9fe2319c3d83" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Three Phase Synchronous Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 424" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data; \n", + "slots = 18.;\n", + "p = 2.; #nmber of poles\n", + "ph = 3.; #three phase winding\n", + "\n", + "# Calculations and Results\n", + "SA = (360/slots); #slot angle\n", + "m = slots/(p*ph); #m = nmber of slots per pole per phase\n", + "print \"number of slots per pole per phase, m = %d\"%(m);\n", + "print \"emfs of the oils of each phase will have a time-phase difference of %d degree mechanical \"%(SA);\n", + "k_d = math.sin(math.radians((m*SA)/2))/(m*math.sin(math.radians(SA/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of slots per pole per phase, m = 3\n", + "emfs of the oils of each phase will have a time-phase difference of 20 degree mechanical \n", + "distribution factor = 0.959795\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 425" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Given Data\n", + "slots = 36.; #number of slots\n", + "poles = 4.; #number of poles\n", + "ph = 3.; #math.single layer three phase winding\n", + "\n", + "# Calculations and Results\n", + "SP = slots/ph; #number of slots per phase\n", + "print \"number of slots per phase = %d\"%(SP);\n", + "m = SP/poles; #munber of slots per pole per phase\n", + "print \"number of slots per pole per phase, m = %d\"%(m)\n", + "SA_m = 360/slots; #slot angle mechanical\n", + "SA_e = (poles/2)*SA_m #slot angle electrical \n", + "print \"slot angle = %d degree electrical\"%(SA_e)\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of slots per phase = 12\n", + "number of slots per pole per phase, m = 3\n", + "slot angle = 20 degree electrical\n", + "distribution factor = 0.959795\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "slots = 48.; #number of slots\n", + "poles = 4.; #4-pole machine\n", + "ph = 3.; #3-phase machine\n", + "\n", + "# Calculations and Results\n", + "SA = 360/slots; #slot angle\n", + "print \"total number of slots = %d\"%(slots);\n", + "print \"slot angle = %f degree mechanical\"%(SA);\n", + "#coil span is 11 slot pitches\n", + "#12 slots subtend 180degress, short pitched by 1 slot \n", + "Bta = 1*180./12;\n", + "k_p = math.cos(math.radians(Bta/2));\n", + "print \"pitch factor = %f\"%(k_p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total number of slots = 48\n", + "slot angle = 7.500000 degree mechanical\n", + "pitch factor = 0.991445\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "slots = 72.; #number of slots\n", + "P = 8.; #number of poles\n", + "ph = 3.; #3-phase machine\n", + "N = 750.; #speed of machine in rpm\n", + "\n", + "#winding is made with 36 coils having 10 turns\n", + "Fp = 0.15; #flux per pole\n", + "fre = (P*N)/120;\n", + "NCp = 36./ph; #nmber of coils per phase\n", + "T = NCp*10; #number of turns per phase\n", + "k_p = 1; #math.since full pitched pitch factor is 1\n", + "\n", + "# Calculations and Results\n", + "print \"flux per pole = %fWb\"%(Fp)\n", + "print \"number of turns per phase = %d\"%(T);\n", + "print \"pitch factor = %f\"%(k_p);\n", + "m = slots/(P*ph); #slots per pole per phase\n", + "SA_m = 360/slots; #slot angle mechanical\n", + "SA_e = (P/2)*SA_m;\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n", + "E = 4.44*Fp*fre*T*k_d*k_p;\n", + "print \"RMS vale of emf induced per phase = %fV\"%(E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flux per pole = 0.150000Wb\n", + "number of turns per phase = 120\n", + "pitch factor = 1.000000\n", + "distribution factor = 0.959795\n", + "RMS vale of emf induced per phase = 3835.341142V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Given Data;\n", + "print (\"E(line to line) = 440V\");\n", + "E_l = 440.; #line-to-line voltage\n", + "E_p = E_l/(math.sqrt(3));\n", + "N = 750.; #speed in rpm\n", + "fre = 50.; #frequency\n", + "\n", + "# Calculations and Results\n", + "P = (120*fre)/N;\n", + "print \"P = %d\"%(P);\n", + "print \"Eper phase) = %dV\"%(E_p);\n", + "ph = 3; #3-phase machine\n", + "m = 2; #number of slots per pole per phase\n", + "slots = m*P*ph; #total number of stator slots\n", + "SA_m = 360/slots; #slot angle mechanical\n", + "SA_e = (P/2)*SA_m; #slot angle electrical\n", + "k_p = 1; #assuming full pitch\n", + "print \"slot angle = %d degree electrical\"%(SA_e);\n", + "print \"pitch factor = %f\"%(k_p);\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n", + "#2 slots per pole per phase\n", + "NSp = 2*P; #number of slots per phase\n", + "NTc = 4; #number of turns per coil\n", + "T = 8*NTc; #number of turns per phase\n", + "Fp = E_p/(4.44*fre*T*k_d*k_p);\n", + "print \"flux per pole = %fWb\"%(Fp);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E(line to line) = 440V\n", + "P = 8\n", + "Eper phase) = 254V\n", + "slot angle = 30 degree electrical\n", + "pitch factor = 1.000000\n", + "distribution factor = 0.965926\n", + "flux per pole = 0.037021Wb\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#chapter 5\n", + "#example 5.6\n", + "#page 428\n", + "\n", + "# Given Data;\n", + "slots = 144.; #number of slots\n", + "ph = 3.; #3-phase machine\n", + "P = 16.; #number of poles\n", + "Cp = 10.; #number of conducters per slot\n", + "Fp = 0.03; #flux per pole\n", + "Ns = 375.; #synchronous speed\n", + "\n", + "# Calculations and Results\n", + "fre = (Ns*P)/120; #frequency\n", + "print \"frequency = %d\"%(fre);\n", + "m = slots/(P*ph); #number of slots per pole per phase\n", + "print \"number of slots per pole per phase, m = %d\"%(m);\n", + "SA_m = 360/slots; #slot angle mechanical\n", + "SA_e = (P/2)*SA_m; #slot angle electrical\n", + "k_p = 1 #no short pitching\n", + "print \"short pitch = %d\"%(k_p);\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n", + "T = (slots*10)/(2*ph);\n", + "print \"number of turns per phase, T = %d\"%(T);\n", + "E = 4.44*Fp*fre*T*k_d*k_p;\n", + "print \"RMS value of induced emf per phase, E = %fV\"%(E);\n", + "print \"induced emf across the linesis %fV \"%(math.sqrt(3)*E);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency = 50\n", + "number of slots per pole per phase, m = 3\n", + "short pitch = 1\n", + "distribution factor = 0.959795\n", + "number of turns per phase, T = 240\n", + "RMS value of induced emf per phase, E = 1534.136457V\n", + "induced emf across the linesis 2657.202289V \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "slots = 90.; #number of slots\n", + "P = 10.; #number of poles\n", + "ph = 3.; #3-phase machine\n", + "fre = 50.; #frequency\n", + "Fp = 0.16; #flux per pole\n", + "E_l = 11000.; #line voltage\n", + "SA_m = 360/slots; #machanical slot angle\n", + "\n", + "# Calculations and Results\n", + "SA_e = (P/2)*SA_m; #electrical slot angle\n", + "m = slots/(ph*P);\n", + "print \"slot angle = %d degree elecrical\"%(SA_e)\n", + "print \"number of slots per pole per phase, m = %d\"%(m);\n", + "k_p = 1; #assuming full pitch\n", + "print \"pitch factor = %d\"%(k_p);\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n", + "E_p = E_l/math.sqrt(3);\n", + "T = E_p/(4.44*Fp*fre*k_p*k_d); \n", + "print \"total number of armature conductors, Z = %d\"%(2*T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "slot angle = 20 degree elecrical\n", + "number of slots per pole per phase, m = 3\n", + "pitch factor = 1\n", + "distribution factor = 0.959795\n", + "total number of armature conductors, Z = 372\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "print (\"P = 6 , f = 50\");\n", + "P = 6.;\n", + "f = 50.;\n", + "Sp = 12.; #slots per pole\n", + "Cs = 4.; #conductors per slot\n", + "Fp = 1.5; \n", + "\n", + "# Calculations and Results\n", + "TS = Sp*P \n", + "print \"total number of slots = %d\"%(TS);\n", + "print \"total number of slots per phase = %d\"%( TS/3);\n", + "print \"total number of conductors per phase = %d\"%(( TS*Cs)/3);\n", + "T = ((TS*Cs)/3)/2;\n", + "print \"total number of turns per phase = %d\"%(T)\n", + "m = (TS/(P*3));\n", + "print \"number of slots per pole per phase, m = %d\"%(m);\n", + "SA_m = 360/TS; #slot angle mechanical\n", + "SA_e = (P/2)*SA_m;\n", + "k_d = math.sin(math.radians((m*SA_e)/2))/(m*math.sin(math.radians(SA_e/2)));\n", + "print \"distribution factor = %f\"%(k_d);\n", + "print (\"coil pitch is 5/6 of full-pitch\");\n", + "bheta = 180-(5./6)*180; #short pitch angle\n", + "print \"short pitch angle = %d degrees\"%(bheta)\n", + "k_p = math.cos(math.radians(bheta/2));\n", + "print \"pitch factor = %f \"%(k_p);\n", + "E = 4.44*Fp*f*T*k_d*k_p;\n", + "print \"induced per phase = %fV\"%(E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 6 , f = 50\n", + "total number of slots = 72\n", + "total number of slots per phase = 24\n", + "total number of conductors per phase = 96\n", + "total number of turns per phase = 48\n", + "number of slots per pole per phase, m = 4\n", + "distribution factor = 0.957662\n", + "coil pitch is 5/6 of full-pitch\n", + "short pitch angle = 30 degrees\n", + "pitch factor = 0.965926 \n", + "induced per phase = 14785.689892V\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "OP = 500000.; #output power\n", + "V_l = 3300.; #line voltage\n", + "\n", + "# Calculations and Results\n", + "I_l = OP/(math.sqrt(3)*V_l); #line current\n", + "print \"line current = %fA\"%(I_l);\n", + "#for star connected alternater, line current is equal to phase current\n", + "I_a = I_l;\n", + "pf = 0.8; #power factor\n", + "phi = math.degrees(math.acos(pf));\n", + "R_a = 0.3; #synchronous resistance\n", + "X_s = 4; #synchronous reactance\n", + "V_p = V_l/math.sqrt(3);\n", + "print \"phase voltage = %fV\"%(V_p)\n", + "E = math.sqrt((V_p*math.cos(math.radians(phi))+I_a*R_a)**2+(V_p*math.sin(math.radians(phi))+I_a*X_s)**2);\n", + "print \"induced emf = %f V/Phase\"%(E )\n", + "PR = ((E-V_p)*100)/V_p;\n", + "print \"percentage regulation = %f percent\"%(PR);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "line current = 87.477314A\n", + "phase voltage = 1905.255888V\n", + "induced emf = 2152.469556 V/Phase\n", + "percentage regulation = 12.975353 percent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "V = 2000.;\n", + "V_oc = 500.; #open circuit voltage\n", + "I_sc = 100.; #short circuit current\n", + "I_a = 100.; \n", + "R_s = 0.8; #armature resistance\n", + "\n", + "# Calculations and Results\n", + "Z_s = V_oc/I_sc; #synchronous impedence\n", + "print \"Z_s = %d ohm\"%(Z_s);\n", + "X_s = math.sqrt(Z_s**2-R_s**2);\n", + "print \"X_s = %f ohm\"%(X_s);\n", + "pf = 1;\n", + "phi = math.degrees(math.acos(pf));\n", + "print (\"At unity power factor\");\n", + "print \"\";\n", + "E = math.sqrt((V*math.cos(math.radians(phi))+I_a*R_s)**2+(V*math.sin(math.radians(phi))+I_a*X_s)**2);\n", + "print \"induced emf = %fV\"%(E);\n", + "R = ((E-V)*100)/V;\n", + "print \"regulation = %f percent\"%(R);\n", + "pf = 0.71;\n", + "phi = math.degrees(math.acos(pf));\n", + "print (\"At 0.71 lagging power factor\");\n", + "print \"\";\n", + "E = math.sqrt((V*math.cos(math.radians(phi))+I_a*R_s)**2+(V*math.sin(math.radians(phi))+I_a*X_s)**2);\n", + "print \"induced emf = %fV\"%(E);\n", + "R = ((E-V)*100)/V;\n", + "print \"regulation = %fpercent\"%(R);\n", + "pf = 0.8;\n", + "phi = math.degrees(math.acos(pf));\n", + "print (\"At 0.8 leading power factor\");\n", + "print \"\";\n", + "E = math.sqrt((V*math.cos(math.radians(phi))+I_a*R_s)**2+(V*math.sin(math.radians(phi))-I_a*X_s)**2);\n", + "print \"induced emf = %fV\"%(E);\n", + "R = ((E-V)*100)/V;\n", + "print \"regulation = %fpercent\"%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z_s = 5 ohm\n", + "X_s = 4.935585 ohm\n", + "At unity power factor\n", + "\n", + "induced emf = 2137.755833V\n", + "regulation = 6.887792 percent\n", + "At 0.71 lagging power factor\n", + "\n", + "induced emf = 2422.283821V\n", + "regulation = 21.114191percent\n", + "At 0.8 leading power factor\n", + "\n", + "induced emf = 1822.487197V\n", + "regulation = -8.875640percent\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data;\n", + "print (\"field exitation current = 10A\");\n", + "V_oc = 900.; #induced emf on open circuit\n", + "I_sc = 150.; #short circuit current\n", + "\n", + "# Calculations and Results\n", + "Z_s = V_oc/I_sc; #synchronous impedence\n", + "print \"synchronous impedence, Z_s = %d ohm\"%(Z_s);\n", + "I_a = 60;\n", + "print \"internal voltage drop when the load current is 60amp = %d V\"%(I_a*Z_s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "field exitation current = 10A\n", + "synchronous impedence, Z_s = 6 ohm\n", + "internal voltage drop when the load current is 60amp = 360 V\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "KVA = 2000.;\n", + "V = 6600.; #rating\n", + "V_p = 6600./math.sqrt(3);\n", + "I_a = (KVA*1000)/(math.sqrt(3)*V);\n", + "R_a = 0.4; #armature resistance\n", + "X_s = 4.5 #synchronous reactance\n", + "pf = 0.8;\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(pf));\n", + "print \"V/phase = %dV \"%(V_p)\n", + "E = math.sqrt((V_p*math.cos(math.radians(phi))+I_a*R_a)**2+(V_p*math.sin(math.radians(phi))+I_a*X_s)**2)\n", + "print \"E = %f V per phase\"%(E);\n", + "R = ((E-V_p)*100)/V_p;\n", + "print \"percentage change in terminal voltage = %f percent\"%(R);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V/phase = 3810V \n", + "E = 4378.515597 V per phase\n", + "percentage change in terminal voltage = 14.906234 percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "KVA = 1200.; #output power\n", + "print \"output power = %d\"%(KVA)\n", + "V_l = 3300.; #line voltage\n", + "R_a = 0.25; #armature resistance\n", + "\n", + "# Calculations and Results\n", + "I_l = (KVA*1000)/(math.sqrt(3)*V_l); #line current\n", + "#for star connected I_l = I_a\n", + "I_a = I_l;\n", + "V_p = V_l/math.sqrt(3);\n", + "print \"V per phase = %dV\"%(V_p)\n", + "#field current of 40A produces short circuit current of 200A and open circuit emf 1100\n", + "v_l = 1100;\n", + "i_s = 200;\n", + "Z_s = v_l/(math.sqrt(3)*i_s); #synchronous impedence\n", + "print \"Synchronous impedance, Zs = %f ohm\"%(Z_s)\n", + "X_s = math.sqrt(Z_s**2-R_a**2); #synchronous reactance\n", + "print (\"(a)for 0.8 lagging power facor\");\n", + "pf = 0.8;\n", + "phi = math.degrees(math.acos(pf));\n", + "E = math.sqrt((V_p*math.cos(math.radians(phi))+I_a*R_a)**2+(V_p*math.sin(math.radians(phi))+I_a*X_s)**2)\n", + "print \"induced emf, E = %f V\"%(E);\n", + "R = ((E-V_p)*100)/V_p;\n", + "print \"regulation = %f percent\"%(R);\n", + "pf = 0.8;\n", + "phi = math.degrees(math.acos(pf));\n", + "print (\"(b)For leading power factor load\")\n", + "E = math.sqrt((V_p*math.cos(math.radians(phi))+I_a*R_a)**2+(V_p*math.sin(math.radians(phi))-I_a*X_s)**2)\n", + "print \"induced emf, E = %f V\"%(E);\n", + "R = ((E-V_p)*100)/V_p;\n", + "print \"regulation = %f percent\"%(R);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output power = 1200\n", + "V per phase = 1905V\n", + "Synchronous impedance, Zs = 3.175426 ohm\n", + "(a)for 0.8 lagging power facor\n", + "induced emf, E = 2398.732590 V\n", + "regulation = 25.900810 percent\n", + "(b)For leading power factor load\n", + "induced emf, E = 1647.716860 V\n", + "regulation = -13.517293 percent\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data;\n", + "print (\"star connected alternator\")\n", + "KVA = 1500.; #rating\n", + "ph = 3.; #3-phase\n", + "V_l = 6600.; #voltage\n", + "Ra = 0.4 #armature resistance\n", + "Xs = 6.; #reactance\n", + "\n", + "# Calculations and Results\n", + "Ia = (KVA*1000)/(math.sqrt(3)*V_l);\n", + "print \"Full-load current = %d A\"%(Ia);\n", + "V = V_l/math.sqrt(3);\n", + "print \"Voltage per phase = %d V\"%(V);\n", + "print (\"for 0.8 lagging power facor\");\n", + "pf = 0.8; #power factor\n", + "phi = math.degrees(math.acos(pf));\n", + "E = math.sqrt((V*math.cos(math.radians(phi))+Ia*Ra)**2+(V*math.sin(math.radians(phi))+Ia*Xs)**2)\n", + "print \"induced emf = %f V\"%(E);\n", + "print (\"then at 0.8 leading power factor\");\n", + "Vt = 4743; #solved manually \n", + "print \"termial Voltage, line-to-line = %d V\"%(math.sqrt(3)*Vt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "star connected alternator\n", + "Full-load current = 131 A\n", + "Voltage per phase = 3810 V\n", + "for 0.8 lagging power facor\n", + "induced emf = 4366.072552 V\n", + "then at 0.8 leading power factor\n", + "termial Voltage, line-to-line = 8215 V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#chapter 5\n", + "#example 5.15\n", + "#page 450\n", + "\n", + "# Given Data;\n", + "L = 8000.; #load\n", + "La = 5000.;\n", + "pf = 0.8;\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(pf));\n", + "print \"math.tan phi = %f\"%(math.degrees(math.atan(phi)));\n", + "print (\"FOR ALTERNATOR A\");\n", + "pf_a = 0.9;\n", + "phi_a = math.degrees(math.acos(pf_a));\n", + "print \"math.tan phi_a = %f\"%(math.degrees(math.atan(phi_a)));\n", + "print (\"reactive load = active load*math.tan phi\");\n", + "print (\"Active load = 8000kW\");\n", + "print \"reactive load = %d KVAr\"%(8000*math.degrees(math.atan(phi_a)));\n", + "print (\"Active Load A = 5000kW\");\n", + "print \"Reactive load A = %dkVAr\"%(5000*math.degrees(math.atan(phi_a)));\n", + "print \"Active load of B = %dkW\"%(L-La);\n", + "a = ((8000*math.degrees(math.atan(phi)))-(5000*math.degrees(math.atan(phi_a))))\n", + "print \"Reactive load of B = %dkVAr\"%(a);\n", + "B = a/(L-La);\n", + "phi_b = math.degrees(math.atan(B));\n", + "print \"phi_b = %f\"%(phi_b)\n", + "print \"Power Factor of B = %f\"%(math.cos(math.radians(phi_b)));" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "math.tan phi = 88.446382\n", + "FOR ALTERNATOR A\n", + "math.tan phi_a = 87.783943\n", + "reactive load = active load*math.tan phi\n", + "Active load = 8000kW\n", + "reactive load = 702271 KVAr\n", + "Active Load A = 5000kW\n", + "Reactive load A = 438919kVAr\n", + "Active load of B = 3000kW\n", + "Reactive load of B = 268651kVAr\n", + "phi_b = 89.360211\n", + "Power Factor of B = 0.011166\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 451" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "V = 6600.;\n", + "ph = 3.; #3-phase alternators \n", + "power = 10000.; #total load\n", + "\n", + "# Calculations and Results\n", + "print (\"Two alternators in parallel connection\");\n", + "pf = 0.8;\n", + "Ia = 438; #armature current\n", + "Il = (power*1000)/(math.sqrt(3)*V*pf); #load current\n", + "print \"load current = %fA\"%(Il);\n", + "phi = math.degrees(math.acos(pf));\n", + "Ac = (Il*math.cos(math.radians(phi)));\n", + "Rc = (Il*math.sin(math.radians(phi)));\n", + "print \"Active component of current = %fA\"%(Ac);\n", + "print \"Reactive component of current = %fA\"%(Rc);\n", + "print \"Current supplied by each alternator = %fA\"%(Il/2);\n", + "print \"Active component of current supplied by each alternator = %fA\"%(Ac/2);\n", + "print \"Reactive component of current supplied by each alternator = %fA\"%(Rc/2);\n", + "print (\"Since steam supply is same,the active component remain the same \");\n", + "RIl = math.sqrt(Ia**2-(Ac/2)**2);\n", + "print \"Reactive component of Il = %dA\"%(RIl);\n", + "RI2 = (Rc-RIl);\n", + "print \"reactive component of I2 = %fA\"%(RI2);\n", + "I2 = math.sqrt((Ac/2)**2+(RI2)**2);\n", + "print \" I2 = %fA\"%(I2);\n", + "phi_2 = math.degrees(math.atan(RI2/(Ac/2)));\n", + "print \"phi 2 = %f degrees\"%(phi_2);\n", + "print \"math.cos phi 2 = %f\"%(math.cos(math.radians(phi_2)));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Two alternators in parallel connection\n", + "load current = 1093.466419A\n", + "Active component of current = 874.773135A\n", + "Reactive component of current = 656.079851A\n", + "Current supplied by each alternator = 546.733209A\n", + "Active component of current supplied by each alternator = 437.386568A\n", + "Reactive component of current supplied by each alternator = 328.039926A\n", + "Since steam supply is same,the active component remain the same \n", + "Reactive component of Il = 23A\n", + "reactive component of I2 = 632.906796A\n", + " I2 = 769.336091A\n", + "phi 2 = 55.352588 degrees\n", + "math.cos phi 2 = 0.568525\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Given Data;\n", + "print (\"power factor of existing load is 0.8 lagging\");\n", + "pf = 0.8; #power factor\n", + "\n", + "# Calculations and Results\n", + "phi = math.degrees(math.acos(pf));\n", + "print \"phi = %d degree\"%(phi);\n", + "L = 800.; #load\n", + "kVAr1 = (L*math.degrees(math.atan(phi)));\n", + "print \"kVAr1 = %d \"%(kVAr1);\n", + "print (\"output for the synchronous motor is 200kW\");\n", + "output = 200.;\n", + "efficiency = 0.9;\n", + "kW = (output/efficiency);\n", + "print \"Input to the synchronous motor = %fkW\"%(kW);\n", + "TL = (L+kW); # total load\n", + "print \"Total load on the system = %fkW\"%(TL);\n", + "print (\"overall power factor of the load is to be raised to 0.92 lagging\");\n", + "pf = 0.92;\n", + "phi = math.degrees(math.acos(pf));\n", + "kVAr2 = (TL*math.degrees(math.atan(phi)))\n", + "print \"kVAr2 = %f\"%(kVAr2);\n", + "kVAr = kVAr1-kVAr2;\n", + "print \"lagging kVAr of synchronous codenser = %f\"%(kVAr);\n", + "print \"leading kVAr supplied by the motor = %f\"%(kVAr);\n", + "phi = math.degrees(math.atan(kVAr/kW));\n", + "print \"phi = %d degree\"%(phi);\n", + "print \"Power factor of the synchronos motor = %f leading \"%(math.cos(math.radians(phi)));\n", + "print \"KVA rating of the synchronous motor = %f\"%(kW/math.cos(math.radians(phi)));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power factor of existing load is 0.8 lagging\n", + "phi = 36 degree\n", + "kVAr1 = 70757 \n", + "output for the synchronous motor is 200kW\n", + "Input to the synchronous motor = 222.222222kW\n", + "Total load on the system = 1022.222222kW\n", + "overall power factor of the load is to be raised to 0.92 lagging\n", + "kVAr2 = 89463.266068\n", + "lagging kVAr of synchronous codenser = -18706.160461\n", + "leading kVAr supplied by the motor = -18706.160461\n", + "phi = -89 degree\n", + "Power factor of the synchronos motor = 0.011879 leading \n", + "KVA rating of the synchronous motor = 18707.480373\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png new file mode 100644 index 00000000..13bfad16 Binary files /dev/null and b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/2.png differ diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png new file mode 100644 index 00000000..3fee428b Binary files /dev/null and b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/4.png differ diff --git a/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png new file mode 100644 index 00000000..6184a800 Binary files /dev/null and b/Electrical_Machines_by_S._K._Bhattacharya/screenshots/5.png differ diff --git a/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt b/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/README.txt new file mode 100644 index 00000000..67020269 --- /dev/null +++ b/Electrical_Measurements_Measuring_Instruments_by_K._Shinghal/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: Electrical Measurements Measuring Instruments +Author: K. Shinghal +Publisher: Pragati Prakashan Merruth +Year of publication: 2002 +Isbn: 81-7556-393-1 +Edition: 1 \ No newline at end of file diff --git a/Electrical_Power-i_/README.txt b/Electrical_Power-i_/README.txt new file mode 100755 index 00000000..8e4bb5ff --- /dev/null +++ b/Electrical_Power-i_/README.txt @@ -0,0 +1,10 @@ +Contributed By: Hrituraj +Course: btech +College/Institute/Organization: Govind Ballabh Pant Engineering College, Pauri Garhwal +Department/Designation: ME +Book Title: Electrical Power-i +Author: M.L. Anand +Publisher: Satya Prakashan New Delhi +Year of publication: 2006 +Isbn: 81-7684-317-2 +Edition: 1 \ No newline at end of file diff --git a/Electronic_Circuits/README.txt b/Electronic_Circuits/README.txt new file mode 100755 index 00000000..ceff7ed2 --- /dev/null +++ b/Electronic_Circuits/README.txt @@ -0,0 +1,10 @@ +Contributed By: Preeti Rani +Course: btech +College/Institute/Organization: Techwords Institute +Department/Designation: ECE +Book Title: Electronic Circuits +Author: P. Raja +Publisher: Umesh Publications, Darya Ganj, Delhi +Year of publication: 2012 +Isbn: 978-93-8017613-0 +Edition: 2 \ No newline at end of file diff --git a/Electronic_Circuits/screenshots/ch-3_dc_load_line.png b/Electronic_Circuits/screenshots/ch-3_dc_load_line.png new file mode 100755 index 00000000..dc698bca Binary files /dev/null and b/Electronic_Circuits/screenshots/ch-3_dc_load_line.png differ diff --git a/Electronic_Circuits/screenshots/ch1_voltage_gain.png b/Electronic_Circuits/screenshots/ch1_voltage_gain.png new file mode 100755 index 00000000..0568a767 Binary files /dev/null and b/Electronic_Circuits/screenshots/ch1_voltage_gain.png differ diff --git a/Electronic_Circuits/screenshots/ch1_voltage_gain_1.png b/Electronic_Circuits/screenshots/ch1_voltage_gain_1.png new file mode 100755 index 00000000..0568a767 Binary files /dev/null and b/Electronic_Circuits/screenshots/ch1_voltage_gain_1.png differ diff --git a/Electronic_Circuits/screenshots/ch_3_dc_load_line.png b/Electronic_Circuits/screenshots/ch_3_dc_load_line.png new file mode 100755 index 00000000..dc698bca Binary files /dev/null and b/Electronic_Circuits/screenshots/ch_3_dc_load_line.png differ diff --git a/Electronic_Circuits/screenshots/chapter3_Operating_point.png b/Electronic_Circuits/screenshots/chapter3_Operating_point.png new file mode 100755 index 00000000..7f1e0cc4 Binary files /dev/null and b/Electronic_Circuits/screenshots/chapter3_Operating_point.png differ diff --git a/Electronic_Circuits/screenshots/chapter3_Operating_point_1.png b/Electronic_Circuits/screenshots/chapter3_Operating_point_1.png new file mode 100755 index 00000000..7f1e0cc4 Binary files /dev/null and b/Electronic_Circuits/screenshots/chapter3_Operating_point_1.png differ diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb new file mode 100644 index 00000000..c97fbbe0 --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter1.ipynb @@ -0,0 +1,1053 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.1 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G= -100 \n", + "R1= 2.2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-Rf/R1\n", + "Rf= -G*R1 \n", + "print \"The value of Rf = %0.f kohm \" %(Rf*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 220 kohm \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.2 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf= 200 # in kohm\n", + "R1= 2 # in kohm\n", + "vin=2.5 # in mV\n", + "vin=vin*10**-3 # in volt\n", + "G= -Rf/R1 \n", + "vo= G*vin # in V\n", + "print \"The output voltage = %0.2f Volt \" %vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = -0.25 Volt \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.3 - page 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G=-10 \n", + "Ri= 100 # in kohm\n", + "R1= Ri # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-R2/R1\n", + "R2= R1*abs(G) # ohm\n", + "print \"Value of R1 = %0.f kohm \" %(R1*10**-3)\n", + "print \"and value of R2 = %0.f Mohm \" %(R2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 100 kohm \n", + "and value of R2 = 1 Mohm \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.4 - page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 100 # in kohm\n", + "R2= 500 # in kohm\n", + "V1= 2 # in volt\n", + "Vo= (1+R2/R1)*V1 # in volt\n", + "print \"Output voltage for noninverting amplifier = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage for noninverting amplifier = 12 Volt\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.5 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 1 # in Mohm\n", + "Rf=Rf*10**6 #in ohm\n", + "\n", + "# Part(a)\n", + "V1=1 #in volt\n", + "V2=2 #in volt\n", + "V3=3 #in volt\n", + "R1= 500 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 1 # in Mohm\n", + "R2=R2*10**6 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(a) Output voltage = %0.f Volt \" %Vo\n", + "\n", + "# Part(b)\n", + "V1=-2 #in volt\n", + "V2=3 #in volt\n", + "V3=1 #in volt\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 500 # in kohm\n", + "R2=R2*10**3 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(b) Output voltage = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = -7 Volt \n", + "(b) Output voltage = 3 Volt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.6 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "print \"Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\"\n", + "R2=0 \n", + "R1=2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "Av_min= (1+R2/R1)\n", + "print \"Av(min) =\",Av_min\n", + "\n", + "print \"Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\"\n", + "R2=100 # in kohm\n", + "R1=2 # in kohm\n", + "Av_max= (1+R2/R1)\n", + "print \"Av(max) =\",Av_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\n", + "Av(min) = 1.0\n", + "Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\n", + "Av(max) = 51.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.7 - page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1= 745 # in \u00b5V\n", + "V2= 740 # in \u00b5V\n", + "V1=V1*10**-6 # in volt\n", + "V2=V2*10**-6 # in volt\n", + "CMRR=80 # in dB\n", + "Av=5*10**5 \n", + "# (i)\n", + "# CMRR in dB= 20*log(Ad/Ac)\n", + "Ad=Av \n", + "Ac= Ad/10**(CMRR/20) \n", + "# (ii)\n", + "Vo= Ad*(V1-V2)+Ac*(V1+V2)/2 \n", + "print \"Output voltage = %0.2f Volt\" %Vo\n", + "\n", + "# Note:- In the book, there is calculation error to evaluate the value of Ac,\n", + "#so the value of Ac is wrong ans to evaluate the output voltage there is also calculation error " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 2.54 Volt\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.8 - page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1= 1 # in Mohm\n", + "Ri=R1 # in Mohm\n", + "Rf=1 # in Mohm\n", + "A_VF= -Rf/R1 \n", + "print \"Voltage gain = %0.f\" %A_VF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -1\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.10 - page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1=2 # in V\n", + "V2=3 # in V\n", + "Rf=3 # in kohm\n", + "R1=1 # in kohm\n", + "Vo1= (1+Rf/R1)*V1 \n", + "print \"Output voltage when only 2V voltage source is acting is %0.f Volt\" %Vo1\n", + "Vo2= (1+Rf/R1)*V2 \n", + "print \"Output voltage due to 3V voltage source is %0.f Volt\" %Vo2\n", + "Vo= Vo1+Vo2 # in volts\n", + "print \"Total output voltage is %0.f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage when only 2V voltage source is acting is 8 Volt\n", + "Output voltage due to 3V voltage source is 12 Volt\n", + "Total output voltage is 20 Volts\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.11 - page 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=500 # in kohm\n", + "min_vvs= 0 # minimum value of variable resistor in ohm\n", + "max_vvs= 10 # maximum value of variable resistor in ohm\n", + "Ri_min= 10+min_vvs # in kohm\n", + "Ri_max= 10+max_vvs #in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av=-Rf/Ri_min \n", + "print \"Closed loop voltage gain corresponding to Ri(min) is\",Av\n", + "Av=-Rf/Ri_max \n", + "print \"and closed loop voltage gain corresponding to Ri(max) is\",Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop voltage gain corresponding to Ri(min) is -50.0\n", + "and closed loop voltage gain corresponding to Ri(max) is -25.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.12 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf=200 # in kohm\n", + "R1= 20 # in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av= -Rf/R1 \n", + "Vi_min= 0.1 # in V\n", + "Vi_max= 0.5 # in V\n", + "# Vo= Av*Vi\n", + "Vo_min= Av*Vi_min # in V\n", + "Vo_max= Av*Vi_max # in V\n", + "print \"Output voltage ranges from\",Vo_min,\"V to\",Vo_max,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage ranges from -1.0 V to -5.0 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.13 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 250 # in kohm\n", + "# Output voltage expression, Vo= -5*Va+3*Vb\n", + "# and we know that for a difference amplifier circuit, \n", + "# Vo= -Rf/R1*Va + [R2/(R1+R2)]*[1+Rf/R1]*Vb\n", + "# Comparing both the expression, we get\n", + "# -Rf/R1*Va= -5*Va, or\n", + "R1= Rf/5 # in kohm\n", + "print \"The value of R1 = %0.2f kohm\" %R1\n", + "# and \n", + "R2= 3*R1**2/(R1+Rf-3*R1)\n", + "print \"The value of R2 = %0.2f kohm\" %R2\n", + "\n", + "# Note : Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 50.00 kohm\n", + "The value of R2 = 50.00 kohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.14 - page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vi_1= 150 # in \u00b5V\n", + "Vi_2= 140 # in \u00b5V\n", + "Vd= Vi_1-Vi_2 # in \u00b5V\n", + "Vd=Vd*10**-6 # in V\n", + "Vc= (Vi_1+Vi_2)/2 # in \u00b5V\n", + "Vc=Vc*10**-6 # in V\n", + "# Vo= Ad*Vd*(1+Vc/(CMRR*Vd))\n", + "\n", + "# (i) For Ad=4000 and CMRR= 100\n", + "Ad=4000 \n", + "CMRR= 100 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(a) Output voltage = %.1f mV\" %(Vo*10**3)\n", + "\n", + "# (ii) For Ad=4000 and CMRR= 10**5\n", + "Ad=4000 \n", + "CMRR= 10**5 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(b) Output voltage = %0.1f mV\" %(Vo*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = 45.8 mV\n", + "(b) Output voltage = 40.0 mV\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.15 - page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=470 # in kohm\n", + "R1=4.3 # in kohm\n", + "R2=33 # in kohm\n", + "R3=33 # in kohm\n", + "Vi= 80 # in \u00b5V\n", + "Vi=Vi*10**-6 # in volt\n", + "A1= 1+Rf/R1 \n", + "A2=-Rf/R2 \n", + "A3= -Rf/R3 \n", + "A=A1*A2*A3 \n", + "Vo= A*Vi # in volt\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 1.79 Volts\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.16 - page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, simplify, sin\n", + "t = symbols('t')\n", + "# Given data\n", + "R1= 33 # in k\u03a9\n", + "R2= 10 # in k\u03a9\n", + "R3= 330 # in k\u03a9\n", + "V1 = simplify(50*sin(1000*t)) # in mV\n", + "V2 = simplify(10*sin(3000*t)) # in mV\n", + "Vo = -(R3/R1*V1+R3/R2*V2)/1000 # in V\n", + "print \"Output voltage is\",Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage is -0.5*sin(1000*t) - 0.33*sin(3000*t)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.17 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=10 # in kohm\n", + "R2=150 # in kohm\n", + "R3=10 # in kohm\n", + "R4=300 # in kohm\n", + "V1= 1 # in V\n", + "V2= 2 # in V\n", + "Vo= ((1+R4/R2)*(R3*V1/(R1+R3))-(R4/R2)*V2) \n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -2.50 Volts\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.18 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=12 # in kohm\n", + "Rf=360 # in kohm\n", + "V1= -0.3 # in V\n", + "Vo= (1+Rf/R1)*V1 # in V\n", + "print \"(a) Output voltage result in %0.2f Volts\" %Vo\n", + "\n", + "# Part(b)\n", + "Vo= 2.4 # in V\n", + "# We know, Vo= (1+Rf/R1)*V1\n", + "V1= Vo/(1+Rf/R1) \n", + "print \"(b) To result in an output of 2.4 Volt, Input voltage = %0.2f mV\" %(V1*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage result in -9.30 Volts\n", + "(b) To result in an output of 2.4 Volt, Input voltage = 77.42 mV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.19 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=68 # in kohm\n", + "R1=33 # in kohm\n", + "R2=22 # in kohm\n", + "R3=12 # in kohm\n", + "V1= 0.2 # in V\n", + "V2=-0.5 # in V\n", + "V3= 0.8 # in V\n", + "Vo= -Rf/R1*V1 + (-Rf/R2)*V2 + (-Rf/R3)*V3 # in volts\n", + "print \"Output voltage = %0.3f Volts\" %Vo\n", + "#Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -3.400 Volts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.20 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=100 # in kohm\n", + "R1=20 # in kohm\n", + "V1= 1.5 # in V\n", + "Vo1= V1 \n", + "Vo= -Rf/R1*Vo1 # in volts\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -7.50 Volts\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.22 - page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "vo= -10 # in V\n", + "i_f= 1 # in mA\n", + "i_f= i_f*10**-3 #in A\n", + "# Formula vo= -i_f*Rf\n", + "Rf= -vo/i_f # in \u03a9\n", + "# The output voltage, vo= -(v1+5*v2) (i)\n", + "# vo= -Rf/R1*v1 - Rf/R2*v2 (ii)\n", + "# Comparing equations (i) and (2)\n", + "R1= Rf/1 # in \u03a9\n", + "R2= Rf/5 # in \u03a9\n", + "print \"The value of Rf = %0.2f k\u03a9\" %(Rf*10**-3)\n", + "print \"The value of R1 = %0.2f k\u03a9\" %(R1*10**-3)\n", + "print \"The value of R2 = %0.2f k\u03a9\" %(R2*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 10.00 k\u03a9\n", + "The value of R1 = 10.00 k\u03a9\n", + "The value of R2 = 2.00 k\u03a9\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.24 - page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "v1,v2 = symbols('v1 v2')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# for node 1\n", + "va = R4/(R4+R3)*v1\n", + "vo1 = (1+R1/R2)*va\n", + "# for node 2\n", + "va=R3/(R3+R4)*v2\n", + "vo2 = (1+R1/R2)*va\n", + "vo = vo1+vo2\n", + "print \"Total voltage is, vo =\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is, vo = 6.0*v1 + 4.0*v2\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.25 - page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "v1,v2,v3 = symbols('v1 v2 v3')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# Voltage at node 1\n", + "va= R4*v1/(R3+R4)\n", + "vo1= (1+R1/R2)*va\n", + "# Voltage at node 2\n", + "va= R3*v2/(R3+R4)\n", + "# From (i) and (ii)\n", + "vo2= (1+R1/R2)*va\n", + "# Voltage at node 3\n", + "va= R3*v2/(R3+R4)\n", + "vo3= (-R1/R2)*v3\n", + "vo = vo1+vo2+vo3\n", + "print \"Total voltage is\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is 6.0*v1 + 4.0*v2 - 9.0*v3\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.26 - page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "import numpy as np\n", + "from __future__ import division\n", + "# omega_t= Ao*omega_b\n", + "# 2*pi*f_t = Ao*2*pi*f_b\n", + "# f_t= Ao*f_b\n", + "# Part (i)\n", + "Ao1= 10**5 \n", + "f_b1= 10**2 # in Hz\n", + "f_t1= Ao1*f_b1 # in Hz\n", + "row1 = np.array([Ao1,f_b1,f_t1])\n", + "# Part (ii)\n", + "Ao2= 10**6 \n", + "f_t2= 10**6 # in Hz\n", + "f_b2= f_t2/Ao2 # in Hz\n", + "row2 = np.array([Ao2,f_b2,f_t2])\n", + "# Part (iii)\n", + "f_b3= 10**3 # in Hz\n", + "f_t3= 10**8 # in Hz\n", + "Ao3= f_t3/f_b3 \n", + "row3 = np.array([Ao3,f_b3,f_t3])\n", + "# Part (iv)\n", + "f_b4= 10**-1 # in Hz\n", + "f_t4= 10**6 # in Hz\n", + "Ao4= f_t4/f_b4 \n", + "row4 = np.array([Ao4,f_b4,f_t4])\n", + "# Part (v)\n", + "Ao5= 2*10**5 \n", + "f_b5= 10 # in Hz\n", + "f_t5= Ao5*f_b5 # in Hz\n", + "row5 = np.array([Ao5,f_b5,f_t5])\n", + "print \"-\"*33\n", + "print \"Ao fb(Hz) ft(Hz)\"\n", + "print \"-\"*33\n", + "print \"%.e %.e %.e\" %(row1[0], row1[1], row1[2])\n", + "print \"%.e %.f %.e\" %(row2[0], row5[1], row2[2])\n", + "print \"%.e %.e %.e\" %(row3[0], row3[1], row3[2])\n", + "print \"%.e %.e %.e\" %(row4[0], row4[1], row4[2])\n", + "print \"%.e %.f %.e\" %(row5[0], row5[1], row5[2])\n", + "# Answer for f_b2 is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "---------------------------------\n", + "Ao fb(Hz) ft(Hz)\n", + "---------------------------------\n", + "1e+05 1e+02 1e+07\n", + "1e+06 10 1e+06\n", + "1e+05 1e+03 1e+08\n", + "1e+07 1e-01 1e+06\n", + "2e+05 10 2e+06\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.27 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data\n", + "Ao= 86 # in dB\n", + "A= 40 # in dB\n", + "f=100 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# From 20*log(S) = 20*log(Ao/A), where S, stands for sqrt(1+(f/fb)**2)\n", + "S= 10**((Ao-A)/20) \n", + "# S= sqrt(1+(f/fb)**2)\n", + "fb= f/sqrt(S**2-1) # in Hz\n", + "Ao= 10**(Ao/20) \n", + "ft= Ao*fb # in Hz\n", + "print \"The value of Ao = %0.3e\" %Ao\n", + "print \"The value of fb = %0.f Hz\" %fb\n", + "print \"The value of ft = %0.f MHz\" %round(ft*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ao = 1.995e+04\n", + "The value of fb = 501 Hz\n", + "The value of ft = 10 MHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.28 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi, sqrt\n", + "# Given data\n", + "Ao= 10**4 # in V/V\n", + "f_t= 10**6 # in Hz\n", + "R2byR1= 20 \n", + "omega_t= 2*pi*f_t \n", + "omega_3dB= omega_t/(1+R2byR1) \n", + "f3dB= omega_3dB/(2*pi) # in Hz\n", + "print \"3-dB frequency of the closed loop amplifier is %0.1f kHz\" %(f3dB*10**-3)\n", + "f3dB= 0.1*f3dB # in Hz\n", + "voBYvi= -R2byR1/sqrt(1+(2*pi*f3dB/omega_3dB)**2) \n", + "voBYvi= abs(voBYvi) # in v/v\n", + "print \"Gain = %0.1f v/v\" %(voBYvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3-dB frequency of the closed loop amplifier is 47.6 kHz\n", + "Gain = 19.9 v/v\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb new file mode 100644 index 00000000..3abf271f --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter2.ipynb @@ -0,0 +1,1179 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Metal oxide semiconductor field effect transistor(MOSFET)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.1 - page 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_S= 0 # As source is connected to ground\n", + "V_G= 1.5 # in V\n", + "V_D= 0.5 # in V\n", + "Vt= 0.7 # in V\n", + "# Part(a) V_D= 0.5 # in V\n", + "V_D= 0.5 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.5 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.5 , the device is in triode region\" \n", + "else:\n", + " print \"At V_D = 0.5 , the device is in saturation region\"\n", + "\n", + "# Part(b) V_D= 0.9 # in V\n", + "V_D= 0.9 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.9 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.9 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 0.9 , the device is in saturation region\" \n", + "\n", + "\n", + "# Part(c) V_D= 3 # in V\n", + "V_D= 3 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 3 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 3 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 3 , the device is in saturation region\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_D = 0.5 , the device is in triode region\n", + "At V_D = 0.9 , the device is in saturation region\n", + "At V_D = 3 , the device is in saturation region\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.2 - page 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 1 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=10 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_GS= 1.5 # in V\n", + "Vt= 0.7 # in V\n", + "# For V_DS= 0.5 V\n", + "V_DS= 0.5 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. SO the drain current in the triode region = %0.f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-VT)**2\n", + " print \"The device is in saturation region. SO the drain current in the saturation region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "\n", + "# For V_DS= 0.9 V\n", + "V_DS= 0.9 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. So the drain current in the triode region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-Vt)**2\n", + " print \"The device is in saturation region. So drain current in the saturation region = %0.f \u00b5A\" %(I_D*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The device is in triode region. SO the drain current in the triode region = 275 \u00b5A\n", + "The device is in saturation region. So drain current in the saturation region = 320 \u00b5A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.3 - page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vt= 0.7 # in V\n", + "ID = 100 # in \u00b5A\n", + "V_GS= 1.2 # in V\n", + "V_DS= 1.2 # in V\n", + "\n", + "# Let assume \u00b5n*Cox*W/(2*L) = K\n", + "# For triode region\n", + "if V_DS<= (V_GS-Vt):\n", + " #triode region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + " \n", + "else:\n", + " # saturation region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + "\n", + "V_DS= 3 # inV\n", + "V_GS = 1.5 # in V\n", + "I_D= K*(V_GS-Vt)**2 # in A\n", + "I_D*=10**6 # in \u00b5A\n", + "print \"Value of ID = %0.1f \u00b5A\" %I_D\n", + "# Drain to source resistance\n", + "V_GS = 3.2 # in V\n", + "r_DS = 1/(2*K*(V_GS-Vt))\n", + "print \"Drain to source resistance, rDS = %0.1f ohm\" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of ID = 256.0 \u00b5A\n", + "Drain to source resistance, rDS = 500.0 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.4 - page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 0.7 # in V\n", + "V_SS= -2.5 # in V\n", + "V_DD= 2.5 # in V\n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "W= 32 # in m\n", + "L= 1 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "V_G= 0 \n", + "# Formula V_GS= V_G-V_S\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D# in \u03a9\n", + "print \"The value of R_S = %0.2f k\u03a9\" %(R_S*10**-3)\n", + "V_D= 0.5 # in V\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 1.2 Volt\n", + "The value of R_S = 3.25 k\u03a9\n", + "The value of R_D = 5.0 k\u03a9\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.5 - page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 3 # in V\n", + "I_D= 80 # in \u00b5A\n", + "I_D=I_D*10**-6 # in A\n", + "Vt= 0.6 # in V\n", + "unCox= 200 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=4 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= 1 # in V\n", + "V_G= V_D # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 25 k\u03a9\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.6 - page 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 10 # in V\n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 2 # in V\n", + "unCox= 20 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 10 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=100 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_S= 0 # in V as source is connected to ground\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= V_GS # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.2f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 15.00 k\u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.7 - page 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA\n", + "KnWbyL=KnWbyL*10**-3 # in A\n", + "Vt= 1 # in V\n", + "V_DS= 0.1 # in V\n", + "V_D= V_DS # in V\n", + "V_GS= 5 # in V\n", + "V_DD= V_GS # in V\n", + "# Formula I_D= K'nW/L*[(V_GS-Vt)*V_DS-V_DS**2/2]\n", + "I_D= KnWbyL*((V_GS-Vt)*V_DS-V_DS**2/2) # in A\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The required value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required value of R_D = 12.4 k\u03a9\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.8 - page 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1 # in V\n", + "V_DD= 10 # in V\n", + "R_D= 6 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_G1= 10 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "R_G2= 10 # in M\u03a9\n", + "R_G2= R_G2*10**6 # in \u03a9\n", + "V_G= V_DD*R_G2/(R_G1+R_G2) # in V\n", + "# V_S= R_S*I_D\n", + "# V_GS= V_G-V_S= V_G-R_S*I_D\n", + "# Formula I_D= K'nW/2*L*(V_GS-Vt)**2, Putting the value of V_GS, We get\n", + "# 18*I_D**2 -25*I_D +8= 0\n", + "# I_D= 0.89 mA or I_D= 0.5\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_S= R_S*I_D # in V\n", + "V_GS= V_G-V_S # in V\n", + "V_D= V_DD-I_D*R_D # in V\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_S = %0.2f Volt\" %(V_S)\n", + "print \"The value of V_GS = %0.2f Volt\" %(V_GS)\n", + "print \"The value of V_D = %0.2f Volt\" %(V_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 0.50 mA\n", + "The value of V_S = 3.00 Volt\n", + "The value of V_GS = 2.00 Volt\n", + "The value of V_D = 7.00 Volt\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.9 - page 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "R_D= 20 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R1= 30 # in k\u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "R2= 20 # in k\u03a9\n", + "R2= R2*10**3 # in \u03a9\n", + "V_DD= 5 # in V\n", + "Vtn= 1 # in V\n", + "Kn= 0.1 # in mA/V**2\n", + "Kn=Kn*10**-3 # in A/V**2\n", + "V_GS= R2*V_DD/(R1+R2) # in V\n", + "# I_D= 1/2*\u00b5nCox*W/L*(V_GS-Vtm)**2 \n", + "I_D = Kn*(V_GS-Vtn)**2 # in mA (As Kn= 1/2*\u00b5nCox*W/L)\n", + "V_DS= V_DD-I_D*R_D # in V\n", + "print \"The value of V_GS = %0.f Volt\" %(V_GS)\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_DS = %0.f Volt\" %(V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 2 Volt\n", + "The value of I_D = 0.10 mA\n", + "The value of V_DS = 3 Volt\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.10 - page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "Vt= 1 # in V\n", + "V_D= 10 # in V\n", + "V_S= 5 # in V\n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "R_G1= 8 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 #in A\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "R_S= V_S/I_D # in \u03a9\n", + "# Formul I_D= 1/2*KnWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KnWbyL) # in V\n", + "# Formula V_OV= V_GS-Vt\n", + "V_GS= V_OV+Vt # in V\n", + "V_G= V_GS+V_S # in V\n", + "# Formul V_G= R_G2*V_DD/(R_G1+R_G2)\n", + "R_G2= R_G1*V_G/(V_DD-V_G) #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)\n", + "print \"The value of R_S = %0.1f k\u03a9\" %(R_S*10**-3)\n", + "print \"The value of V_OV = %0.1f Volt\" %(V_OV)\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "print \"The value of R_G2 = %0.1f M\u03a9\" %(R_G2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 10.0 k\u03a9\n", + "The value of R_S = 10.0 k\u03a9\n", + "The value of V_OV = 1.0 Volt\n", + "The value of V_GS = 2.0 Volt\n", + "The value of R_G2 = 7.0 M\u03a9\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.11 - page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "KnWbyL= 0.25 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1.5 # in V\n", + "V_A= 50 # in V\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= 10 # in k\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "# I_D= 1/2*KnWbyL*(V_D-Vt)**2 , (V_GS= V_D, as dc gate current is zero) (i)\n", + "# V_D= V_DD- I_D*R_D (ii)\n", + "I_D= 1.06 # in mA\n", + "I_D = I_D*10**-3 # in A\n", + "V_D= V_DD- I_D*R_D # in V\n", + "V_GS=V_D # in V\n", + "# The coordinates of operating point \n", + "V_GSQ= V_D # in V\n", + "I_DQ= I_D*10**3 # in mA\n", + "print \"The coordinates of operating point(bias point) are V_GSQ =\",V_GSQ,\"V and I_DQ =\",I_DQ,\"mA\"\n", + "gm= KnWbyL*(V_GS-Vt) # in A/V\n", + "r_o= V_A/I_D #in \u03a9\n", + "# The gain is : Av= vo/vi = -gm*(R_D||R_L||r_o)\n", + "Av= -gm*(R_D*R_L*r_o/(R_D*R_L+R_D*r_o+R_L*r_o)) # in V/V\n", + "print \"VOltage gain is %0.1f V/V\" %Av\n", + "# i_i= (vi-vo)/R_G\n", + "# i_i= vi/R_G*(1-vo/vi) and Rin= vi/i_i = R_G/(1-Av)\n", + "Rin= R_G/(1-Av) # in \u03a9\n", + "print \"The input resistance = %0.2f M\u03a9\" %(Rin*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coordinates of operating point(bias point) are V_GSQ = 4.4 V and I_DQ = 1.06 mA\n", + "VOltage gain is -3.3 V/V\n", + "The input resistance = 2.34 M\u03a9\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.12 - page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.5 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "V_D= 3 # in V\n", + "Vt= -1 # in V\n", + "KpWbyL= 1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KpWbyL) # in V\n", + "# For PMOS\n", + "V_OV= -V_OV # in V\n", + "V_GS= V_OV+Vt # in V\n", + "R_D= V_D/I_D # in \u03a9\n", + "V_Dmax= V_D+abs(Vt) # in V\n", + "R_D= V_Dmax/I_D # in \u03a9 \n", + "print \"\"\"The largest value that R_D can have\n", + "while maintaining saturation-region operation is %0.2f k\u03a9\"\"\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The largest value that R_D can have\n", + "while maintaining saturation-region operation is 8.00 k\u03a9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.14 - page 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_GS1= 1.5 # in V\n", + "Vt= 1 # in V\n", + "r_DS1= 1 # in k\u03a9\n", + "r_DS1= r_DS1*10**3 # in \u03a9\n", + "r_DS2= 200 # in k\u03a9\n", + "# r_DS1= 1/(KnWbyL*(V_GS1-Vt)) (i)\n", + "# r_DS2= 1/(KnWbyL*(V_GS2-Vt)) (i)\n", + "# dividing equation (i) by (ii)\n", + "V_GS2= (r_DS1/r_DS2)*(V_GS1-Vt)+Vt # in V\n", + "print \"To Optain rDS= 200, The value of V_GS should be %0.2f Volt\" %V_GS2\n", + "# For V_GS= 1.5 # V\n", + "# W2= 2*W1 \n", + "# r_DS1/r_DS2= 2\n", + "r_DS2= r_DS1/2 # in \u03a9\n", + "print \"For V_GS= 1.5 V , the value of r_DS2 = %0.1f \u03a9 \" %r_DS2\n", + "# For V_GS= 3.5 V\n", + "r_DS2= 200/2 # in \u03a9\n", + "print \"For V_GS= 3.5 V , the value of r_DS2 = %0.1f \u03a9\" %r_DS2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To Optain rDS= 200, The value of V_GS should be 3.50 Volt\n", + "For V_GS= 1.5 V , the value of r_DS2 = 500.0 \u03a9 \n", + "For V_GS= 3.5 V , the value of r_DS2 = 100.0 \u03a9\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.15 page 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.2 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "Vt= 1 # in V\n", + "KpWbyL= 0.1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_GS-VT)**2\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin\n", + "# For I_D= 0.8 mA\n", + "I_D = 0.8*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required V_GS = 3.0 Volt\n", + "The minimum required V_DS = 2.0 Volt\n", + "Required V_GS = 5.0 Volt\n", + "The minimum required V_DS = 4.0 Volt\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.16 - page 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_SS= -5 # in V\n", + "unCox= 60 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "Vt= 1 # in V\n", + "W= 100 # in \u00b5m\n", + "L= 3 # in \u00b5m\n", + "V_G=0 # in V\n", + "V_DD= 5 # in V\n", + "V_D=0 #in V\n", + "I_D= 1*10**-3 # in A\n", + "# I_D= (V_DD-V_D)/R_D\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R_D = %0.f k\u03a9\" %(R_D*10**-3)\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D*L/(unCox*W))+Vt # in V\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D # in \u03a9\n", + "print \"The resistance = %0.f k\u03a9\" %(R_S*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 5 k\u03a9\n", + "The resistance = 3 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.17 - page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_D= 3.5 # in V\n", + "I_D= 115*10**-6 #in A\n", + "upCox= 60 # in \u00b5A/V**2\n", + "upCox= upCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "V_GS= -1.5 # in V\n", + "Vt= 0.7 # in V\n", + "R= V_D/I_D # in \u03a9\n", + "print \"The value required for R = %0.1f k\u03a9\" %(R*10**-3)\n", + "# Formul I_D= 1/2*upCox*W/L*(V_GS-Vt)**2\n", + "W= 2*I_D*L/(upCox*(V_GS-Vt)**2)\n", + "print \"The value required for W = %0.1f \u00b5m\" %(W)\n", + "\n", + "# Note: Calculation of evaluating the value of W in the book is wrong , so the Answer of the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value required for R = 30.4 k\u03a9\n", + "The value required for W = 0.6 \u00b5m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.18 - page 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 1 # in V\n", + "unCox= 120 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L1=1 # in \u00b5m\n", + "L2=L1 # in \u00b5m\n", + "I_D= 120 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_GS1= 1.5 #in V\n", + "V_G2= 3.5 # in V\n", + "V_S2= 1.5 # in V\n", + "V_DD= 5 # in V\n", + "V_D2= 3.5 # in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W1= 2*I_D*L1/(unCox*(V_GS1-Vt)**2) # in \u00b5m\n", + "print \"The value of W1 = %0.1f \u00b5m\" %W1\n", + "V_GS2= V_G2-V_S2 #in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W2= 2*I_D*L2/(unCox*(V_GS2-Vt)**2) # in \u00b5m\n", + "print \"The value of W2 = %0.1f \u00b5m\" %W2\n", + "R= (V_DD-V_D2)/I_D # in \u03a9\n", + "print \"Resistance = %0.1f k\u03a9\" %(R*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of W1 = 8.0 \u00b5m\n", + "The value of W2 = 2.0 \u00b5m\n", + "Resistance = 12.5 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.19 - page 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 2 # in V\n", + "K1WbyL= 1 # in mA/V**2\n", + "K1WbyL= K1WbyL*10**-3 #in mA/V**2\n", + "I_D= 10 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_DD= 10 # in V\n", + "R_D= 4 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V1= -V_GS # in V\n", + "# Part (b)\n", + "I_D= 2 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "V2= V_DD-I_D*R_D #in V\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V3= -V_GS # in V\n", + "# Part (c)\n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V4= V_GS # in V\n", + "# Part (d)\n", + "I_D= 2 # in mA\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "V_SS= 10 # in V\n", + "I_D= I_D*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V5= -V_SS+I_D*R_D # in V\n", + "print \"The value of V1 = %0.2f Volt\" %V1\n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "print \"The value of V3 = %0.f Volt\" %V3\n", + "print \"The value of V4 = %0.2f Volt\" %V4\n", + "print \"The value of V5 = %0.f Volt\" %V5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 = -2.14 Volt\n", + "The value of V2 = 2 Volt\n", + "The value of V3 = -4 Volt\n", + "The value of V4 = 3.41 Volt\n", + "The value of V5 = -5 Volt\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.20 - page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "unCox= 20*10**-6 #in A/V**2\n", + "upCox= unCox/2.5 # in A/V**2\n", + "V_DD= 3 #in V\n", + "Vt= 1 # in V\n", + "W= 30 # in \u00b5m\n", + "L= 10 # in \u00b5m\n", + "\n", + "# V_GS1= V_GS2\n", + "# Formula V_DD= V_GS1+V_GS2\n", + "V_GS1= V_DD/2 #in V\n", + "V_GS2= V_GS1 # in V\n", + "V2= V_GS1 # inV\n", + "I1= 1/2*unCox*W/L*(V_GS1-Vt)**2 # in A\n", + "# Both transistor have V_D = V_G and therefore they are operating in saturation \n", + "#1/2*unCox*W/L*(V4-Vt)**2 = 1/2*upCox*W/L*(V_DD-V4-Vt)\n", + "V4= (V_DD-Vt+sqrt(unCox/upCox))/(1+sqrt(unCox/upCox)) \n", + "I3= 1/2*unCox*W/L*(1.39-Vt)**2 \n", + "print \"The value of V2 = %0.1f Volt\" %V2\n", + "print \"The value of I1 = %0.1f \u00b5A\" %(I1*10**6,)\n", + "print \"The value of V4 = %0.1f Volt \" %V4\n", + "print \"The value of I3 = %0.1f \u00b5A\" %(I3*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V2 = 1.5 Volt\n", + "The value of I1 = 7.5 \u00b5A\n", + "The value of V4 = 1.4 Volt \n", + "The value of I3 = 4.6 \u00b5A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.22 - page 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 0.9 # in V\n", + "V_A= 50 # in V\n", + "V_D= 2 # in V\n", + "R_L= 10 # in M\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "I_D= 500 # in \u00b5A\n", + "I_D= I_D*10**-6 # in A\n", + "V_GS= V_D # in V\n", + "ro= V_A/I_D # in \u03a9\n", + "gm= 2*I_D/(V_GS-Vt) # in A/V\n", + "# vo= -gm*vi*(ro || R_L)\n", + "vo_by_vi = -gm*(ro*R_L/(ro+R_L)) # in V/V\n", + "print \"The voltage gain = %0.1f V/V\" %(vo_by_vi )\n", + "# For I= 1 mA or twice the current \n", + "I_D1= I_D # in A\n", + "I_D2= 2*I_D1 # in A\n", + "gm1= gm # in A/V\n", + "# Effect on V_D\n", + "# I_D1/I_D2 = (V_GS1-Vt)**2/(V_GS2-Vt)**2\n", + "V_GS1= V_GS \n", + "V_GS2= Vt+sqrt(2)*(V_GS1-Vt) # in V\n", + "print \"The new value of V_GS = %0.1f Volt\" %(V_GS2)\n", + "# Effect on gm\n", + "# gm1/gm2= sqrt(I_D1/I_D2)\n", + "gm2= sqrt(I_D2/I_D1)*gm1 # in A/V\n", + "print \"The new value of gm2 = %0.1f mA/V\" %(gm2*10**3)\n", + "# Effect on ro\n", + "# ro1/ro2= I_D2/I_D1\n", + "ro1= ro # in \u03a9\n", + "ro2= I_D1*ro1/I_D2 # in \u03a9\n", + "print \"The new value of ro = %0.1f k\u03a9/V\" %(ro2*10**-3)\n", + "# Effect on gain\n", + "# Av= -gm*(ro2 || R_L)\n", + "Av= -gm*(ro2*R_L/(ro2+R_L)) # in V/V\n", + "print \"The new value of voltage gain = %0.1f V/V\" %(Av)\n", + "#Answer wrong in the textbook because of calculation accuracy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -8.3 V/V\n", + "The new value of V_GS = 2.5 Volt\n", + "The new value of gm2 = 1.3 mA/V\n", + "The new value of ro = 50.0 k\u03a9/V\n", + "The new value of voltage gain = -7.6 V/V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.23 - page 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "f_L= 10 # in Hz\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "vo_by_vi= -gm*R_D/(1+gm*R_S) # in V/V\n", + "print \"Mid band gain = %0.2f V/V \" %(vo_by_vi)\n", + "# Formula f_L= 1/(2*pi*(1/gm || R_S)) * CS\n", + "CS= 1/(2*pi*(1/gm*R_S/(1/gm+R_S))*f_L) #in F\n", + "print \"The value of Cs = %0.2f \u00b5F\" %(CS*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mid band gain = -1.43 V/V \n", + "The value of Cs = 18.57 \u00b5F\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.24 - page 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "Rsig= 100 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_G= 4.7 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "R_D= 15 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= R_D # in \u03a9\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "ro=150 # in k\u03a9\n", + "ro=ro*10**3 # in \u03a9\n", + "Cgs= 1 # in pF\n", + "Cgs=Cgs*10**-12 #in F\n", + "Cgd= 0.4 # in pF\n", + "Cgd=Cgd*10**-12 #in F\n", + "vgsBYvsig= R_G/(Rsig+R_G) \n", + "Rdesh_L= R_D*R_L/(R_D+R_L) # in \u03a9\n", + "voBYvgs= -gm*Rdesh_L \n", + "Av= voBYvgs/vgsBYvsig # in V/V\n", + "print \"The Mid-band gain = %0.2f V/V\" %(Av)\n", + "CM= Cgd*(1+gm*Rdesh_L) # in F\n", + "# f_H= 1/(2*pi*(Rsig || R_G)*(Cgs*CM))\n", + "f_H= 1/(2*pi*(Rsig * R_G/(Rsig + R_G))*(Cgs+CM)) # in Hz\n", + "print \"Frequency = %0.1f kHz\" %(f_H*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Mid-band gain = -7.66 V/V\n", + "Frequency = 369.4 kHz\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb new file mode 100644 index 00000000..3baf21d6 --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb @@ -0,0 +1,1812 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3 - Bipolar Junction Transistors(BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.1 - page 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= -0.7 # in V\n", + "Bita=50 \n", + "RC= 5 # in k\u03a9\n", + "RE= 10 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_E-V_BE)/RE # in A\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "# I_E= I_B+I_C and I_C= Bita*I_B, so\n", + "I_B= I_E/(1+Bita) # in A\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "I_C= I_E-I_B #in A\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.2f Volt\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitter current = 0.93 mA\n", + "Base current = 18.2 \u00b5A\n", + "Collector current = 0.91 mA\n", + "The value of V_C = 5.44 Volt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.2 - page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= 1.7 # in V\n", + "V_B= 1 # in V\n", + "RC= 5 # in k\u03a9\n", + "RE= 5 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "RB= 100 #in k\u03a9\\\n", + "RB= RB*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_CC-V_E)/RE # in A\n", + "I_B= V_B/RB # in V\n", + "# Formula I_B= (1-alpha)*I_E\n", + "alpha= 1-I_B/I_E \n", + "print \"Value of alpha = %0.3f \" %(alpha)\n", + "beta= alpha/(1-alpha) \n", + "print \"Value of beta = %.01f \" %beta\n", + "V_C= (I_E-I_B)*RC-V_CC # in volt\n", + "print \"Collector voltage = %0.2f Volt\" %V_C\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of alpha = 0.994 \n", + "Value of beta = 165.0 \n", + "Collector voltage = -1.75 Volt\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.3 - page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division# Given data \n", + "from numpy import log\n", + "# Given data\n", + "V_CC= 10 # in V\n", + "V_CE= 3.2 # in V\n", + "RC= 6.8 # in k\u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "I_S= 1*10**-15 # in A\n", + "V_T= 25*10**-3 # in V\n", + "I_C1= (V_CC-V_CE)/RC # in A\n", + "print \"Part(a) : \"\n", + "# Formula I_C= I_S*%e**(V_BE1/V_T)\n", + "V_BE1= V_T*log(I_C1/I_S) # in volt\n", + "print \"Collector current = %0.1f mA\" %(I_C1*10**3)\n", + "print \"Value of V_BE = %0.1f Volt\" %(V_BE1)\n", + "\n", + "print \"Part(b) : \"\n", + "v_in= 5*10**-3 # in V\n", + "Av= -(V_CC-V_CE)/V_T # in V/V\n", + "print \"Voltage gain = %0.1f V/V\" %(Av)\n", + "v_o= abs(Av )*v_in # in V\n", + "print \"Change in output voltage = %0.2f Volt\" %v_o\n", + "\n", + "print \"Part(c) : \"\n", + "#for V_CE= 0.3 V\n", + "V_CE= 0.3 # in V\n", + "I_C2= (V_CC-V_CE)/RC # in A\n", + "# I_C1= I_S*%e**(V_BE1/V_T) (i)\n", + "# I_C2= I_S*%e**(V_BE2/V_T) (ii)\n", + "# divide the equation (ii) by (i)\n", + "delta_V_BE= V_T*log(I_C2/I_C1) # in volt ( where delta_V_BE = V_BE2-V_BE1 )\n", + "print \"The positive increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3)\n", + "\n", + "print \"Part(d) : \"\n", + "v_o= 0.99*V_CC # in V\n", + "I_C3= (V_CC-v_o)/RC # in A\n", + "delta_V_BE= V_T*log(I_C3/I_C1) # in V\n", + "print \"The negative increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) : \n", + "Collector current = 1.0 mA\n", + "Value of V_BE = 0.7 Volt\n", + "Part(b) : \n", + "Voltage gain = -272.0 V/V\n", + "Change in output voltage = 1.36 Volt\n", + "Part(c) : \n", + "The positive increament in V_BE = 8.9 mV\n", + "Part(d) : \n", + "The negative increament in V_BE = -105.5 mV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.4 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_CE= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "I_C= 5*10**-3 # in mA\n", + "bita= 100 \n", + "R_C= (V_CC-V_CE)/I_C # in \u03a9\n", + "I_B= I_C/bita # in A\n", + "R_B= (V_CC-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_C = %0.1f k\u03a9\" %(R_C*10**-3)\n", + "print \"The value of I_B = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of R_B = %.01f k\u03a9\" %(R_B*10**-3)\n", + "\n", + "# Note: The value of base current in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_C = 1.0 k\u03a9\n", + "The value of I_B = 50.0 \u00b5A\n", + "The value of R_B = 186.0 k\u03a9\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.5 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", + "from __future__ import division\n", + "from numpy import arange, nditer\n", + "# Given data \n", + "V_CC= 6 # in V\n", + "bita= 100 \n", + "R_C= 2 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 530 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "# when I_C=0\n", + "I_C=0 \n", + "V_CE= V_CC-I_C*R_C # in volt\n", + "V_CE= arange(0,7,0.1) # in Volt\n", + "# defining function to get the collector current\n", + "def current(V):\n", + " it = nditer([V, None])\n", + " for v_ce,i in it:\n", + " i[...] = (V_CC-v_ce)/R_C*1000 \n", + " return it.operands[1]\n", + "I_C=current(V_CE) # in mA\n", + "x=arange(-1,4,0.1)\n", + "y=arange(-0.5,1.02,0.1)\n", + "plot(V_CE,I_C,'r') \n", + "plot(4*(y/y),y,'--b')\n", + "plot(x,1*(x/x),'--b')\n", + "text(4,1.02,'Operating Point')\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "# Setting axes\n", + "axes = gca()\n", + "axes.set_xlim([0,6])\n", + "axes.set_ylim([0,3])\n", + "show()\n", + "# When V_CE= 0\n", + "I_C= V_CC/R_C #in A\n", + "# Operating point for silicon transistor \n", + "V_BE= 0.7 # in V\n", + "I_B= (V_CC-V_BE)/R_B #in A\n", + "I_CQ= bita*I_B # in A\n", + "V_CEQ= V_CC-I_CQ*R_C # in volt\n", + "print \"Operating point = (\",V_CEQ,\"V ,\",I_CQ*10**3,\"mA)\"\n", + "print \"DC load line shown in figure\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEaCAYAAAAcz1CnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUlPX+B/D3IJYiyGZiAoqBKJswooIlOkihoqipqeRV\ncAv1utDtdlPrl1qGGbmmx8Cboi3i0u1oiFSm44ZcE0bFpYsoIIth7gsYAvP7g2YCBsYB5mG29+sc\nzgHmO898Jjvz4f18n+/3EcnlcjmIiMhkmem6ACIi0i02AiIiE8dGQERk4tgIiIhMHBsBEZGJYyMg\nIjJxbAREf0pMTERQUJAgxzYzM8PVq1frfUwikeCLL74AAHz99dcYMmSIIDUQNYSNgAySi4sLLCws\n0L59e9ja2uKll15CfHw86i6LOXXqFMLCwmBrawt7e3sEBAQgMTFRN0U3QCQSQSQSAQAmTZq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yenZ0d+vXrh5SUFABAUlISJkyY0OD4CxcuwN/fv8HHjx07VuvUUG5ursqYmnvv\n5OTkYO7cuTh//jxsbGyUp3QUrK2t4efnp9yiOjk5GUOHDkWrVq0wZcoUxMXF4ezZs/Dx8cGyZctq\nvca8efPQuXNnSKVS/Pzzz5DJZCguLkZWVhbOnTtnVHtTke6wEZBRUJweAqpPC0VERKgdr+4v/6Cg\nIMhkMuVXt27d1B6rW7du6NWrFwDA398feXl5KmMmTJiAnTt3AvirUd27dw/37t1DUFAQACAyMhJH\njx5V+1qurq64evUq5s+fjx9++AHt27dXO55IE2wEZBRGjhyp/Iu5tLRU7XbQXl5eyMjI0NprP/vs\ns8rvW7VqpTxFVVN4eDhSU1Nx584dZGZmYvDgwSpjNDktZWNjg3PnzkEikeDzzz/HjBkzmlc8EdgI\nyEhYWloiODgYU6dOxeuvv6527Ouvv460tDTlqSQAOHr0KC5cuCBofX379sX8+fMRHh4OkUgEa2tr\n2Nra4vjx4wCAL7/8EhKJROW5VlZWyiuUbt26hYqKCowZMwYffvih2puNEGmKVw2R0YiIiMCYMWOw\na9cutePatGmD5ORkxMTEICYmBq1bt4avry/Wrl2LmzdvKucIFP7v//4PY8aMqXWMmnMEdffqb2jv\n/gkTJmD8+PG1bme5bds2zJo1C6WlpQ3uGf/GG29g6NChcHR0xJo1azB16lRUVVUBgNrbDxJpivcj\nICIycTw1RERk4nhqiIxWVlaWyg3X27Rpg5MnT+qoIiL9xFNDREQmjqeGiIhMHBsBEZGJYyMgIjJx\nbARERCaOjYCIyMT9P7uiwsTxuJHPAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating point = ( 4.0 V , 1.0 mA)\n", + "DC load line shown in figure\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.6 - page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 12 # in V\n", + "V_BE= 0.7 # in V\n", + "bita= 100 \n", + "R_C= 10 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 100 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B) # in A\n", + "I_CQ= bita*I_BQ # in A\n", + "V_CEQ= V_CC-(I_CQ+I_BQ)*R_C # in volt\n", + "# For dc load line\n", + "# When\n", + "I_C=0 \n", + "V_CE= V_CC-(I_C+I_BQ)*R_C # in volt\n", + "# When\n", + "V_CE= 0 \n", + "I_C= (V_CC-I_BQ*R_C)/R_C #in A\n", + "print \"Q- point values for circuit is\",round(V_CEQ,2),\"V and\",round(I_CQ*10**3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q- point values for circuit is 1.72 V and 1.0 mA\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.7 - page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 15 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CE= 5 # in V\n", + "I_C= 5 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "print \"Base current = %0.f \u00b5A\" %(I_B*10**6)\n", + "#Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE\n", + "R_C= (V_CC-V_CE)/(I_C+I_B) # in \u03a9\n", + "print \"The value of R_C = %0.2f k\u03a9\" %(R_C*10**-3)\n", + "#Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B\n", + "R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B # in ohm\n", + "print \"The value of R_B = %0.f k\u03a9 \" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base current = 50 \u00b5A\n", + "The value of R_C = 1.98 k\u03a9\n", + "The value of R_B = 86 k\u03a9 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.8 - page 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_BE= 0.7 # in V\n", + "V_CE= 3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "# V_CE= V_BE+V_CB and V_CB= I_B*R_B\n", + "R_B= (V_CE-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_B = 230 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.9 - page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from numpy import nditer, arange\n", + "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", + "# Given data \n", + "R1= 10;# in k\u03a9\n", + "R1=R1*10**3;# in \u03a9\n", + "R2= 5;# in k\u03a9\n", + "R2=R2*10**3;# in \u03a9\n", + "RC= 1;# in k\u03a9\n", + "RC=RC*10**3;# in \u03a9\n", + "RE= 2;# in k\u03a9\n", + "RE=RE*10**3;# in \u03a9\n", + "V_CC= 15;# in V\n", + "V_BE= 0.7;# in V\n", + "# When\n", + "I_C=0;\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "# When V_CE= 0\n", + "I_C= V_CC/(RC+RE);# in A\n", + "V_B= V_CC*R2/(R1+R2);# in V\n", + "I_E= (V_B-V_BE)/RE;# in A\n", + "I_C= I_E;# in A (approx)\n", + "I_CQ= I_C;# in A\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "V_CEQ= V_CE;# in V\n", + "#############\n", + "V_CE= arange(0,16,0.1);# in Volt\n", + "def current(v):\n", + " it = nditer([v, None])\n", + " for x,y in it:\n", + " y[...]= (V_CC-x)/(RC+RE)*1000\n", + " return it.operands[1]\n", + "I_C = current(V_CE)\n", + "\n", + "#I_C= (V_CC-V_CE)/(RC+RE)*1000;# in mA\n", + "plot(V_CE,I_C);\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "text(8.55,2.15,'Q(8.55V,2.15mA)')\n", + "x1=arange(0,8.55,0.01)\n", + "y1=arange(0,2.15,0.01)\n", + "a=arange(0,8.55,0.01)\n", + "yd=2.15*(a/a)\n", + "plot(a,yd,'--r')\n", + "b=arange(-1,2.15,0.005)\n", + "xd=8.55*(b/b)\n", + "plot(xd,b,'--r')\n", + "show()\n", + "print \"DC load line shown in figure\"\n", + "print 'Operating point is ',V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEaCAYAAADzDTuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVHX+B/D3IJqaisAiKshCKMpNQMTbD3Xwkopi3kIh\nb2jblqtmlpnb7oNmeQldrz1aW0ruk3jZXbUA0VUbNZFFBS/RxURQEBQFA5FcBL6/P05MIgMOyMw5\nM/N+Pc88j5yZOecDxXz4fr7f8/2ohBACRERk0azkDoCIiOTHZEBEREwGRETEZEBERGAyICIiMBkQ\nERGYDIgQGxuLgQMHGuTcVlZWuHr1qs7n1Go1PvvsMwDAF198gREjRhgkBiJ9MBmQSXF1dUXr1q3R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7ycmTJyM8PFw7dwBITWZeffVVlJWVwd3dHdu3b6/1vldeeQUjR46Ek5MT\n1q1bh6ioKFRVVQGAItuBkmljPwMiImKZiIiIWCYiM3Tp0iVMnz69xrGWLVvi9OnTMkVEpHwsExER\nEctERETEZEBERGAyICIiMBkQERGYDIiICMD/A7QrYeqaDKtbAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n", + "Operating point is 8.55 V and 2.15 mA\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.10 page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_BB= 3 # in V\n", + "V_BE= 0.7 # in V\n", + "V_T= 25*10**-3 # in V\n", + "bita=100 \n", + "RC= 3 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "RB= 100 # in k\u03a9\n", + "RB=RB*10**3 # in \u03a9\n", + "I_B= (V_BB-V_BE)/RB # in V\n", + "I_C= bita*I_B # in A\n", + "V_C= V_CC-I_C*RC # in V\n", + "gm= I_C/V_T # in A/V\n", + "r_pi= bita/gm # in \u03a9\n", + "# v_be= r_pi/(RB+r_pi)*v_i\n", + "v_be_by_v_i= r_pi/(RB+r_pi) \n", + "# v_o= -gm*v_be*RC\n", + "v_o_by_v_i= -gm*v_be_by_v_i*RC # in V/V\n", + "Av= v_o_by_v_i # in V/V\n", + "print \"Voltage gain = %0.2f V/V \" % (round(Av))\n", + "# Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -3.00 V/V \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.11 - page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 4 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "V_E= V_B-V_BE # in V\n", + "R_E= 3.3 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "RC= 4.7 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "I_E= V_E/R_E # in A\n", + "bita=100 \n", + "alpha= bita/(1+bita) \n", + "I_C= alpha*I_E #in A\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "I_B= I_E/(1+bita) # in A\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C = 0.99 mA\n", + "The value of V_C = 5.3 Volts\n", + "The value of I_B = 0.01 mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.12 - page 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "bita=100 \n", + "R_B= 100 # in k\u03a9\n", + "R_C= 2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_B= (V_B-V_BE)/R_B # in A\n", + "I_C= bita*I_B #in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "I_E= I_C # in A (approx)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_C = %0.1f mA \" %(I_C*10**3)\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B = 0.043 mA\n", + "The value of I_C = 4.3 mA \n", + "The value of V_C = 1.4 Volts\n", + "The value of I_E = 4.3 mA\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.13 - page 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols, solve\n", + "V_B = symbols('V_B')\n", + "# Given data \n", + "V_EB= 0.7 # in V\n", + "V_E = 0.7 # in V\n", + "bita=100 \n", + "V_EC= 0.2 # in V\n", + "V_E= V_EB+V_B # in V\n", + "V_CC= 5 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_E= V_B+V_EB # (i)\n", + "V_C= V_E-V_EC # (ii)\n", + "I_E= (V_CC-V_E)/(R_E)*1000 # mA (iii)\n", + "I_B= V_B/R_B # (iv)\n", + "I_C= (V_C+V_CC)/R_C # (v)\n", + "# By using relationship, I_E= I_B+I_C\n", + "expr = I_E*1000-(I_B*1000+I_C*1000)\n", + "V_B = solve(expr,V_B)\n", + "V_B= (9*V_CC-11*V_EB+V_EC)/12 # in V\n", + "V_E= V_B+V_EB # in V\n", + "V_C= V_B+V_EB-V_EC # in V\n", + "I_E= (V_CC-V_E)/R_E# in amp\n", + "I_C= (V_B+V_EB-V_EC+V_CC)/R_B # in amp\n", + "I_B= V_B/R_B # in amp\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 3.12 Volts\n", + "The value of V_E = 3.83 Volts\n", + "The value of V_C = 3.62 Volts\n", + "The value of I_E = 1.17 mA\n", + "The value of I_C = 0.86 mA\n", + "The value of I_B = 0.31 mA\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.14 - page 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "bita=100 \n", + "hFE= 100 \n", + "VCEsat= 0.2 # in V\n", + "VBEsat= 0.8 # in V\n", + "VBEactive= 0.7 # in V\n", + "VBB= 5 # in V\n", + "VCC= 10 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 50 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "# Formula VCC= ICsat*R_C+VCEsat\n", + "ICsat= (VCC-VCEsat)/R_C #A\n", + "print \"The value of IC(sat) = %0.2f mA\" %(ICsat*10**3)\n", + "IBmin= ICsat/bita # in A\n", + "# Apply KVL to input circuit, VBB= IB*R_B+VBEsat\n", + "IB= (VBB-VBEsat)/R_B # in A\n", + "print \"Actual base current = %0.f \u00b5A\" %(IB*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of IC(sat) = 3.27 mA\n", + "Actual base current = 84 \u00b5A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.16 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# beta= alpha/(1-alpha)\n", + "# At alpha= 0.5\n", + "alpha= 0.5 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.5, the value of beta = %0.f \" %beta\n", + "# At alpha= 0.9\n", + "alpha= 0.9 \n", + "beta = alpha/(1-alpha) \n", + "print \"At alpha=0.9, the value of beta is %0.f \" %beta\n", + "# At alpha= 0.5\n", + "alpha= 0.999 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.999, the value of beta is %0.f \" %beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At alpha=0.5, the value of beta = 1 \n", + "At alpha=0.9, the value of beta is 9 \n", + "At alpha=0.999, the value of beta is 999 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.17 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "# alpha= beta/(1-beta)\n", + "# At beta= 1\n", + "beta=1 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=1, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 2\n", + "beta=2 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=2, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 100\n", + "beta=100 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=100, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 200\n", + "beta=200 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=200, the value of alpha is %0.3f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At beta=1, the value of alpha is 0.50 \n", + "At beta=2, the value of alpha is 0.67 \n", + "At beta=100, the value of alpha is 0.99 \n", + "At beta=200, the value of alpha is 0.995 \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.18 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp, log\n", + "# Given data \n", + "VBE= 0.76 # in V\n", + "VT= 0.025 # in V\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "# Part(a) for VBE = 0.7 V\n", + "VBE= 0.7 # in V\n", + "I_C= I_S*exp(VBE/VT)\n", + "print \"For VBE = 0.7 V , The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "\n", + "# Part (b) for I_C= 10 \u00b5A\n", + "I_C= 10*10**-6 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "VBE= VT*log(I_C/I_S) \n", + "print \"For I_C = 10 \u00b5A, The value of VBE = %0.3f V\" %VBE" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_S = 6.273e-16 A\n", + "For VBE = 0.7 V , The value of I_C = 0.907 mA\n", + "For I_C = 10 \u00b5A, The value of VBE = 0.587 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.19 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VT= 0.025 # in V\n", + "I_B= 100 # in \u00b5A\n", + "I_B=I_B*10**-6 # in A\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "alpha= I_C/(I_C+I_B) \n", + "beta= I_C/I_B \n", + "IS_by_alpha= I_S/alpha # in A\n", + "IS_by_beta= I_S/beta # in A\n", + "print \"The value of alpha is %0.2f \" %alpha\n", + "print \"The value of beta is %0.2f \" %beta \n", + "print \"The value of Is/alpha = %0.2e A\" %IS_by_alpha\n", + "print \"The value of Is/beta = %0.2e A\" %IS_by_beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha is 0.99 \n", + "The value of beta is 100.00 \n", + "The value of Is/alpha = 6.98e-15 A\n", + "The value of Is/beta = 6.91e-17 A\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.20 - page 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 10.7 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I1= (VCC-VBE)/R_C # in A\n", + "print \"The value of I1 = %0.f mA\" %(I1*10**3)\n", + "# Part (b)\n", + "VC= -4 #in V\n", + "VB= -10 # in V\n", + "R_C= 5.6 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.4 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC=12 # V\n", + "I_C= (VC-VB)/R_B # in A\n", + "V2= VCC- (R_C*I_C) \n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "# Part (c)\n", + "VCC= 0 \n", + "VCE= -10 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_C= (VCC-VCE)/R_C # in A\n", + "V4= 1 # in V\n", + "I3= I_C # in A (approx)\n", + "print \"The value of V4 = %0.f Volt\" %V4\n", + "print \"The value of I3 = %0.f mA\" %(I3*10**3)\n", + "# Part (d)\n", + "VBE= -10 # in V\n", + "VCC= 10 # in V\n", + "R_B= 5 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C= 15 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "# I5= I_C and \n", + "# I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C\n", + "V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B) \n", + "print \"The value of V6 = %0.3f Volt\" %(V6)\n", + "I5= (V6-0.7-VBE)/R_B # in A\n", + "print \"The value of I5 = %0.3f mA\" %(I5*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1 = 1 mA\n", + "The value of V2 = -2 Volt\n", + "The value of V4 = 1 Volt\n", + "The value of I3 = 1 mA\n", + "The value of V6 = -4.475 Volt\n", + "The value of I5 = 0.965 mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.21 -page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "V_C= 2 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 200 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_C= V_C/R_C # in A\n", + "I_B= V_B/R_B # in A\n", + "beta= I_C/I_B \n", + "print \"Part (a)\"\n", + "print \"Collector current = %0.f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of beta is %0.f \"%beta\n", + "\n", + "# Part (b)\n", + "V_C= 2.3 # in V\n", + "R_C= 230 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 20 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I= V_C/R_C # current through 230\u03a9 resistro i.e. I_C + I_B in A\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "I_C= I-I_B # in A\n", + "bita= abs(I_C/I_B) \n", + "print \"Part (b)\"\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.2f mA\" %(I_B*10**3)\n", + "print \"The value of beta is %0.2f \"%beta\n", + "\n", + "# Part (c)\n", + "V_E= 10 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "V_1= 7 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 6.3 # in V\n", + "R_B= 100 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_E= (V_E-V_1)/R_C #in A\n", + "I_C=I_E # in A (approx)\n", + "V_C= I_C*R_C # in V\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "print \"Part (c)\"\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "print \"Base current = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"Collector voltage = %0.2f Volts\" %(V_C)\n", + "print \"The value of beta is %0.2f \"%(beta)\n", + "\n", + "# Note : In the book the value of base current in the first part is wrong due to calculation error.\n", + "#In the part (b) the values of collector current and beta are wrong due to calculation error in the first line of part (b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Collector current = 2 mA\n", + "Base current = 21.5 \u00b5A\n", + "The value of beta is 93 \n", + "Part (b)\n", + "Collector current = -0.09 mA\n", + "Base current = 0.10 mA\n", + "The value of beta is 93.02 \n", + "Part (c)\n", + "Emitter current = 3.00 mA\n", + "Base current = 33.00 \u00b5A\n", + "Collector voltage = 3.00 Volts\n", + "The value of beta is 89.91 \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.22 - page 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "beta= 30 \n", + "R_C= 2.2 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 3 # in V\n", + "VCE= -3 # in V\n", + "VBE= 0.7 # in V\n", + "V_B= 0 # in V\n", + "V_E= V_B-VBE # in V\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "I_C= I_E # in A\n", + "V_C= VCC-I_E*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (a)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of V_C = %0.3f V\" %(V_C)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)\n", + "# Part (b)\n", + "R_C= 560 # in \u03a9\n", + "R_B= 1.1 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 9 # in V\n", + "VCE= 3 # in V\n", + "V_B= 3 # in V\n", + "V_E= V_B+VBE # in V\n", + "I_E= (VCC-V_E)/R_B # in A\n", + "alpha= beta/(1+beta) \n", + "I_C= I_E*alpha # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (b)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.2f V\" %(V_C)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -0.70 V\n", + "The value of I_E = 1.05 mA\n", + "The value of V_C = 0.700 V\n", + "The value of I_B = 0.03 mA\n", + "Part (b)\n", + "The value of V_B = 3.00 V \n", + "The value of V_E = 3.70 V\n", + "The value of I_E = 4.66 mA\n", + "The value of V_C = 2.61 V\n", + "The value of I_B = 0.155 mA\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.23 - page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import inf\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 9 # in V\n", + "VCE= -9 # in V\n", + "V_B= -1.5 # in V\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_B= abs(V_B)/R_B # in A\n", + "V_E= V_B-VBE # in V\n", + "print \"The value of V_E = %0.2f Volt\" %V_E\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "print \"The value of alpha = %0.2f Volt\" %alpha\n", + "print \"The value of beta = %0.2f Volt\" %beta\n", + "V_C= VCC-I_E*alpha*R_C # in V\n", + "print \"The value of V_C = %0.2f Volt\" %V_C\n", + "beta = inf\n", + "alpha= beta/(1+beta)\n", + "I_B= 0 \n", + "V_B=0 \n", + "V_C= VCC-I_E*R_C # in volt\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of V_C = %0.2f V\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_E = -2.20 Volt\n", + "The value of alpha = 0.78 Volt\n", + "The value of beta = 3.53 Volt\n", + "The value of V_C = 3.70 Volt\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -2.20 V\n", + "The value of V_C = 2.20 V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.24 - page 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE_1= 0.7 # in V\n", + "VBE_2= 0.5 # in V\n", + "V_T= 0.025 # in V\n", + "I_C1= 10 # in mV\n", + "I_C1= I_C1*10**-3 # in A\n", + "# I_C1= I_S*%e**(VBE_1/V_T) (i)\n", + "# I_C2= I_S*%e**(VBE_2/V_T) (ii)\n", + "# Devide equation (ii) by (i)\n", + "I_C2= I_C1*exp((VBE_2-VBE_1)/V_T) # in A\n", + "print \"The value of I_C2 = %0.2f \u00b5A\" %(I_C2*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C2 = 3.35 \u00b5A\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.25 - page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "R1= 10 # in k\u03a9\n", + "R1=R1*10**3 # in \u03a9\n", + "R2= 10 # in k\u03a9\n", + "R2=R2*10**3 # in \u03a9\n", + "I_C=.5 # mA\n", + "V_T= 0.025 #in V\n", + "I_C= I_C*10**-3 # in A\n", + "V= 10 # in V\n", + "Vth= V*R1/(R1+R2) # in V\n", + "Rth= R1*R2/(R1+R2) #in \u03a9\n", + "vo= I_C*Rth # in V\n", + "vi=V_T # in V\n", + "vo_by_vi= vo/vi #in V/V\n", + "print \"The value of vo/vi = %0.f V/V \" %vo_by_vi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vo/vi = 100 V/V \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.27 - page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 2 # in V\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E= 1*10**3 # in \u03a9\n", + "R_C= 1*10**3 # in \u03a9\n", + "V_E= V_B-V_BE # in V\n", + "I_E= V_E/R_E # in A\n", + "I_C= I_E # in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"At V_B= +2 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Part (b)\n", + "V_B= 0 #in V\n", + "V_E= 0 # in V\n", + "I_E= 0 # in A\n", + "V_C= 5 # in V\n", + "print \"At V_B= 0 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_B= +2 V\n", + "The value of V_E = 1.30 Volts\n", + "The value of V_C = 3.70 Volts\n", + "At V_B= 0 V\n", + "The value of V_E = 0.00 Volts\n", + "The value of V_C = 5.00 Volts\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.28 - page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 0 # in V\n", + "R_E=1*10**3 #in \u03a9\n", + "R_C=1*10**3 #in \u03a9\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_E= V_B-V_BE # in V\n", + "I_E= (1+V_E)/R_E # in A\n", + "I_C= I_E # (approx) in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"Part (a)\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "# For saturation \n", + "V_CE=0.2 # V\n", + "V_CB= -0.5 # in V\n", + "# I_C= 5-V_C/R_C and V_C= V_E-VCE, So\n", + "# I_C= (5.2-V_E)/R_C\n", + "# I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,\n", + "V_E= 4.2/2 #/ in V\n", + "V_B= V_E+0.7 # in V\n", + "V_C= V_E+0.2 # in V\n", + "print \"Part (b) \"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Note: In the book , there is a miss print in the last line of this question \n", + "#because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_E = -0.70 Volts\n", + "The value of V_C = 4.70 Volts\n", + "Part (b) \n", + "The value of V_E = 2.10 Volts\n", + "The value of V_B = 2.80 Volts\n", + "The value of V_C = 2.30 Volts\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.29 - page 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CC=5 # in V\n", + "V_E= 1 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E=5*10**3 #in \u03a9\n", + "R_C=5*10**3 #in \u03a9\n", + "R_B= 20*10**3 # in \u03a9\n", + "I_E= (V_CC-V_E)/R_E # in A\n", + "# For pnp transistor V_BE= V_E-V_B\n", + "V_B= V_E-V_BE # in V\n", + "I_B= V_B/R_B # in A\n", + "I_C= I_E-I_B # in A\n", + "V_C= I_C*R_C-V_CC # in V\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "print \"The value of V_B = %0.1f Volts\" %V_B\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.3f Volts\" %V_C \n", + "print \"The value of beta is %0.1f \"%beta \n", + "print \"The value of alpha is %0.2f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 0.3 Volts\n", + "The value of I_B = 0.015 mA\n", + "The value of I_E = 0.8 mA\n", + "The value of I_C = 0.785 mA\n", + "The value of V_C = -1.075 Volts\n", + "The value of beta is 52.3 \n", + "The value of alpha is 0.98 \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.30 - page 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC=5 # in V\n", + "V_T= 0.025 # in V\n", + "R_C=7.5*10**3 #in \u03a9\n", + "I_C= 0.5 # in mA\n", + "I_C= I_C*10**-3 # in A\n", + "I_E=I_C # (approx) in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "print \"dc voltage at the collector = %0.2f Volt\" %V_C\n", + "gm= I_C/V_T # in A/V\n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "# v_be= -v_i\n", + "# v_c= -gm*v_be*R_C\n", + "vcbyvi= gm*R_C # in V/V\n", + "print \"The value of vc/vi = %0.f V/V\" %(vcbyvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc voltage at the collector = 1.25 Volt\n", + "The value of gm = 20 mA/V\n", + "The value of vc/vi = 150 V/V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.31 - page 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "I_E= 0.5 # in mA\n", + "I_E= I_E*10**-3 # in mA\n", + "Rsig= 50 # in \u03a9\n", + "R_C= 5*10**3 # in \u03a9\n", + "re= V_T/I_E # in ohm\n", + "Rin= Rsig+re # in ohm\n", + "print \"Input resistance = %0.f \u03a9\" %Rin\n", + "# Part(b)\n", + "# vo= -0.99*ie*R_C and ie= -v_sig/Rin\n", + "vo_by_v_sig= 0.99*R_C/Rin # in V/V\n", + "print \"The value of vo/vsig = %0.1f V/V\" %(vo_by_v_sig)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistance = 100 \u03a9\n", + "The value of vo/vsig = 49.5 V/V\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.32 - page 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "beta= 200 \n", + "alpha= beta/(1+beta) \n", + "R_C= 100 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "Rsig= 1 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_T= 25*10**-3 \n", + "V=1.5 # in V\n", + "I_E= 10 # in mA\n", + "I_E= I_E*10**-3 # in A\n", + "I_C= alpha*I_E # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "V_B= V-(R_B*I_B)\n", + "gm= I_C/V_T # in A/V\n", + "rpi= beta/gm # in \u03a9\n", + "Rib= rpi # in \u03a9\n", + "print \"The value of Rib = %0.2f \u03a9 \" %Rib\n", + "Rin= R_B*rpi/(R_B+rpi) # in \u03a9\n", + "print \"The value of Rin = %0.2f \u03a9\" %Rin\n", + "# vbe= v_sig*Rin/(Rsig+Rin) \n", + "vbe_by_vsig= Rin/(Rsig+Rin) \n", + "# vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)\n", + "vo_by_vsig= -gm*R_C*vbe_by_vsig # in V/V\n", + "print \"Overall voltage gain = %0.2f V/V\" %vo_by_vsig\n", + "# if \n", + "vo= 0.4 #(\u00b1) in V\n", + "vs= vo/abs(vo_by_vsig) # in V\n", + "vbe= vbe_by_vsig*vs # in V\n", + "print \"The value of v_sig = %0.2f mV\" %(vs*10**3)\n", + "print \"The value of v_be = %0.2f mV\" %(vbe*10**3)\n", + "\n", + "# Note: There is some difference between in this coding and book solution. But Coding is correct." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rib = 502.50 \u03a9 \n", + "The value of Rin = 478.46 \u03a9\n", + "Overall voltage gain = -12.88 V/V\n", + "The value of v_sig = 31.06 mV\n", + "The value of v_be = 10.05 mV\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.33 - page 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "# Part(a)\n", + "print \"Part (a) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_B= 50 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.1f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(b)\n", + "print \"Part (b) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "I_E= 1.070 # in mA\n", + "I_E=I_E*10**-3 # in A\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "beta= alpha/(1-alpha) \n", + "I_B= I_C/beta # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_B = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(c)\n", + "print \"Part (C) : \"\n", + "V_BE= 580 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 0.137 # in mA\n", + "I_B= 7 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "\n", + "# Part(d)\n", + "print \"Part (d) : \"\n", + "V_BE= 780 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 10.10 # in mA\n", + "I_B= 120 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*%e**(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.4e A\" %I_S\n", + "\n", + "# Part(e)\n", + "print \"Part (e) : \"\n", + "V_BE= 820 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 75 # in mA\n", + "I_B= 1050 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.3f \"%alpha\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : \n", + "The value of beta is 20.0 \n", + "The value of alpha is 0.9524 \n", + "The value of I_E = 1.05 mA\n", + "The value of I_S = 1.03e-15 A\n", + "Part (b) : \n", + "The value of beta is 14.286 \n", + "The value of alpha is 0.9346 \n", + "The value of I_B = 70.00 \u00b5A\n", + "The value of I_S = 1.03e-15 A\n", + "Part (C) : \n", + "The value of beta is 18.571 \n", + "The value of alpha is 0.9489 \n", + "The value of I_C = 0.130 mA\n", + "The value of I_S = 1.092e-14 A\n", + "Part (d) : \n", + "The value of beta is 84.167 \n", + "The value of alpha is 0.9883 \n", + "The value of I_E = 10.22 mA\n", + "The value of I_S = 2.8466e-16 A\n", + "Part (e) : \n", + "The value of beta is 70.429 \n", + "The value of alpha is 0.986 \n", + "The value of I_C = 73.95 mA\n", + "The value of I_S = 4.208e-16 A\n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb new file mode 100644 index 00000000..38d22a7c --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter4.ipynb @@ -0,0 +1,924 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Differential amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.1 - page 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= -10 # in volt\n", + "I= 1 # in mA\n", + "I=I*10**-3 # in A\n", + "R_C= 10 # in kohm\n", + "R_C=R_C*10**3 # in kohm\n", + "V_BE=0.7 # in volt\n", + "\n", + "i_C1= I/2 # in A\n", + "i_C2= i_C1 # in A\n", + "print \"Value of i_C1 = %0.2f mA\" %(i_C1*10**3)\n", + "\n", + "V_C1= V_CC-i_C1*R_C # in V\n", + "# For V_cm=0 volt\n", + "V_E= -0.7 # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =0, The value of V_CE1 = %0.2f Volt\" %(V_CE1)\n", + "\n", + "# For V_cm= -5 volt\n", + "V_cm= -5 # in V\n", + "V_B= V_cm # in V\n", + "# From V_BE= V_B-V_E\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =-5V, The value of V_CE1 = %0.2f Volt\" %V_CE1\n", + "\n", + "# For V_cm= 5 volt\n", + "V_cm= 5 # in V\n", + "V_B= V_cm # in V\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =5V, The value of V_CE1 = %0.2f Volt\" %V_CE1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of i_C1 = 0.50 mA\n", + "For V_cm =0, The value of V_CE1 = 5.70 Volt\n", + "For V_cm =-5V, The value of V_CE1 = 10.70 Volt\n", + "For V_cm =5V, The value of V_CE1 = 0.70 Volt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.2 - page 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Given data\n", + "V_DD= 1.5 # in V\n", + "V_SS= V_DD # in V\n", + "KnWL= 4 # in mA/V**2\n", + "KnWL=KnWL*10**-3 # in A/V**2\n", + "Vt= 0.5 # in V\n", + "I=0.4 # in mA\n", + "I=I*10**-3 #in A\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Part (a)\n", + "print \"Part (a)\"\n", + "V_OV= sqrt(I/KnWL) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"Value of V_OV = %0.2f Volt\" %V_OV\n", + "print \"Value of V_GS = %0.2f Volt\" %V_GS\n", + "\n", + "# Part (b)\n", + "print \"Part (b)\"\n", + "V_CM= 0 # in volt\n", + "V_S= -V_GS # in volt\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "I=0.4 # in mw\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c)\"\n", + "V_CM=1 # in V\n", + "V_GS= 0.82 # in V\n", + "V_G= 1 # in V\n", + "V_S= V_G-V_GS # in V\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "# Part (d)\n", + "print \"Part (d)\"\n", + "V_CM_max= Vt+V_DD-i_D1*R_D\n", + "print \"Highest value of V_CM = %0.2f Volt\" %V_CM_max\n", + "\n", + "# Part (e)\n", + "V_S= 0.4 # in V\n", + "print \"Part (e)\"\n", + "V_CM_min= -V_SS+V_S+Vt+V_OV # in V\n", + "print \"Lowest value of V_CM = %0.2f Volt \" %V_CM_min\n", + "V_Smin= V_CM_min-V_GS # in volt\n", + "print \"Lowest value of V_S = %0.2f Volt\" %V_Smin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Value of V_OV = 0.32 Volt\n", + "Value of V_GS = 0.82 Volt\n", + "Part (b)\n", + "Value of V_S = -0.82 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (c)\n", + "Value of V_S = 0.18 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (d)\n", + "Highest value of V_CM = 1.50 Volt\n", + "Part (e)\n", + "Lowest value of V_CM = -0.28 Volt \n", + "Lowest value of V_S = -1.10 Volt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.3 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I= 0.4 # in mA\n", + "unCox= 0.2 # in mA/V**2\n", + "i_D= I/2 # in mA\n", + "V_OV1= 0.2 # in V\n", + "V_OV2= 0.3 # in V\n", + "V_OV3= 0.4 # in V\n", + "WbyL1= 2*i_D/(unCox*V_OV1**2) \n", + "gm1= I/V_OV1 # in mA/V\n", + "WbyL2= 2*i_D/(unCox*V_OV2**2) \n", + "gm2= I/V_OV2 # in mA/V\n", + "WbyL3= 2*i_D/(unCox*V_OV3**2) \n", + "gm3= I/V_OV3 # in mA/V\n", + "print \"Vov (in V) \",V_OV1,\" \",V_OV2,\" \",V_OV3\n", + "print \"W/L \",WbyL1,\" \",round(WbyL2,1),\" \",WbyL3\n", + "print \"gm(in mA/V) \",gm1,\" \",round(gm2,2),\" \",gm3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vov (in V) 0.2 0.3 0.4\n", + "W/L 50.0 22.2 12.5\n", + "gm(in mA/V) 2.0 1.33 1.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.4 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "gm= I/V_OV # in A/V \n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "r_o= V_A/i_D # in \u03a9\n", + "print \"The value of r_o = %0.f k\u03a9\" %(r_o*10**-3)\n", + "# Ad= v_o/v_id = gm*(R_D || r_o)\n", + "Ad= gm*(R_D*r_o/(R_D+r_o)) # in V/V\n", + "print \"Differential gain = %0.1f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 Volts\n", + "The value of gm = 4 mA/V\n", + "The value of r_o = 50 k\u03a9\n", + "Differential gain = 18.2 V/V \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.5 - page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log10\n", + "# Given data\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "\n", + "# Part (a)\n", + "Ad= 1/2*gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %(Ad)\n", + "Acm= -R_D/(2*R_SS) # in V/V\n", + "print \"Common mode gain = %0.1f V/V\" %Acm\n", + "CMRR= abs(Ad)/abs(Acm) \n", + "CMRRindB= round(20*log10(CMRR)) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (b)\n", + "print \"Part (b) when output is taken differentially\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "Acm= 0 \n", + "print \"Common mode gain = %0.1f V/V \"%Acm\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "# delta_R_D= 1% of R_D\n", + "delta_R_D= R_D*1.0/100 # in \u03a9 \n", + "Acm= R_D/(2*R_SS)*delta_R_D/R_D # in V/V\n", + "print \"Common mode gain = %0.3f V/V\" %Acm\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) # in dB\n", + "print \"Common mode rejection ratio = %0.1f dB\" %CMRRindB\n", + "\n", + "# Note: In the book, there is putting wrong value of Ad (20 at place of 10)\n", + "#to evaluate the value of CMRR in dB in part(c) , So the answer of CMRR in dB of Part (c) is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential gain = 5 V/V\n", + "Common mode gain = -0.1 V/V\n", + "Common mode rejection ratio = 34 dB\n", + "Part (b) when output is taken differentially\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.0 V/V \n", + "Common mode rejection ratio = inf dB\n", + "Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.001 V/V\n", + "Common mode rejection ratio = 80.0 dB\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.6 - page 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data (From Exa 4.4)\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "# gm mismatch have a negligible effect on Ad\n", + "Ad= gm*R_D # in V/V(approx) \n", + "# delta_gm= 1% of gm\n", + "delta_gm = gm*1/100 # in A/V\n", + "Acm= R_D/(2*R_SS)*delta_gm/gm \n", + "CMRRindB= 20*log10(Ad/Acm) \n", + "print \"CMRR is %0.f dB\"%CMRRindB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CMRR is 80 dB\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.7 - page 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CM= 0 \n", + "V_BE= -0.7 # in volt\n", + "v_E= V_CM-V_BE # in volt\n", + "print \"Value of v_E = %0.1f Volts\" %v_E\n", + "\n", + "I_E= (5-0.7)/10**3 # in A\n", + "v_B1= 0.5 # in V\n", + "v_B2= 0 # in V\n", + "# Due to Q1 is off therefore\n", + "v_C1= -5 # in V\n", + "v_C2= I_E*10**3-5 # in V\n", + "print \"Value of v_C1 = %0.1f Volts\" %v_C1\n", + "print \"Value of v_C2 = %0.1f Volts\" %v_C2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of v_E = 0.7 Volts\n", + "Value of v_C1 = -5.0 Volts\n", + "Value of v_C2 = -0.7 Volts\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.8 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log\n", + "# Given data \n", + "iE1_by_I= 0.99 # as it is given that iE1= 0.99 *I\n", + "VT= 0.025 # in volt\n", + "# Formula iE1= I/(1+%e**(-vid/VT))\n", + "# %e**(-vid/VT)= 1/iE1_by_I-1\n", + "vid= log( 1/iE1_by_I-1)*(-VT) # in volt\n", + "print \"Input differential signal = %0.1f mV\" %round(vid*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input differential signal = 115.0 mV\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.9 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Beta= 100 \n", + "\n", + "# Part (a)\n", + "RE= 150 # in \u03a9\n", + "VT= 25 # in mV\n", + "VT= VT*10**-3 # in V\n", + "IE= 0.5 # in mA\n", + "IE=IE*10**-3 # in A\n", + "re1= VT/IE #in \u03a9\n", + "R_id= 2*(Beta+1)*(re1+RE) # in \u03a9\n", + "R_id= round(R_id*10**-3) # in k\u03a9\n", + "print \"(a) The input differential resistance = %0.1f k\u03a9\" %R_id\n", + "\n", + "# Part (b)\n", + "RC=10 #in k\u03a9\n", + "RC=RC*10**3 #in \u03a9\n", + "Rsig= 5+5 # in k\u03a9\n", + "VoltageGain1= R_id/(Rsig+R_id) #voltage gain from the signal source to the base of Q1 and Q2 in V/V\n", + "VoltageGain2= 2*RC/(2*(re1+RE)) # voltage gain from the bases to the output in V/V\n", + "Ad= VoltageGain1*VoltageGain2 #in V/V\n", + "print \"(b) The overall differential voltage gain = %0.1f V/V\" %Ad\n", + "\n", + "# Part (c)\n", + "delta_RC= 0.02*RC \n", + "R_EE= 200 #in k\u03a9\n", + "R_EE=R_EE*10**3 #in \u03a9\n", + "Acm= RC/(2*R_EE)*delta_RC/RC #in V/V\n", + "print \"(c) Common mode gain = %0.e V/V\" %Acm\n", + "\n", + "# Part (d)\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"(d) CMRR = %.f dB\" %CMRRindB\n", + "\n", + "# Part (e)\n", + "V_A= 100 # in V\n", + "r_o= V_A/(IE) # in \u03a9\n", + "# Ricm= (Beta+1)*(R_EE || r_o/2)\n", + "Ricm= (Beta+1)*(R_EE*(r_o/2)/(R_EE+(r_o/2))) \n", + "print \"(e) Input common mode resistance = %0.1f M\u03a9\" %(Ricm*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The input differential resistance = 40.0 k\u03a9\n", + "(b) The overall differential voltage gain = 40.0 V/V\n", + "(c) Common mode gain = 5e-04 V/V\n", + "(d) CMRR = 98 dB\n", + "(e) Input common mode resistance = 6.7 M\u03a9\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.10 - page 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "delta_RDbyRD= 2/100 \n", + "delta_WLbyWL= 2/100 \n", + "delta_Vt= 2 #in mV\n", + "delta_Vt= delta_Vt*10**-3 # in V\n", + "#(From Exa 4.4)\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "V_OS1= V_OV/2*delta_RDbyRD # in V\n", + "\n", + "# V_OS due to W/L ratio\n", + "V_OS2= V_OV/2*delta_WLbyWL # in V\n", + "\n", + "# V_OS due to threshold voltage\n", + "V_OS3= delta_Vt # in V\n", + "# Total offset voltage\n", + "V_OS= sqrt(V_OS1**2+V_OS2**2+V_OS3**2) # in V\n", + "V_OS= V_OS*10**3 # in mV\n", + "print \"Total offset voltage = %0.1f mV\" %V_OS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total offset voltage = 3.5 mV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.11 - page 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "WLn= 100 \n", + "WLp= 200 \n", + "unCox= 0.2 # mA/V**2\n", + "unCox=unCox*10**-3 #in A/V**2\n", + "RSS= 25 # in k\u03a9\n", + "RSS= RSS*10**3 # in \u03a9\n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 20 # in V\n", + "i_D= I/2 # in A\n", + "# Formula i_D= 1/2*unCox*WLn*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WLn)) # in V\n", + "gm= I/V_OV # in A/V\n", + "print \"Value of Gm = %0.1f mA/V\" %(gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"Value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "# Finding the value of gm3\n", + "upCox= 0.1 # mA/V**2\n", + "upCox=upCox*10**-3 #in A/V**2\n", + "# Formula i_D= 1/2*upCox*WLp*V_OV**2\n", + "V_OV= sqrt(2*i_D/(upCox*WLp)) # in V\n", + "gm3= I/V_OV # in A/V\n", + "Acm= 1/(2*gm3*RSS) #in V/V\n", + "print \"Value of |Acm| = %0.3f V/V\" %(abs(Acm))\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) #in dB\n", + "print \"CMRR = %0.f dB\" %(round(CMRRindB))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = 4.0 mA/V\n", + "Value of Ro = 25.0 k\u03a9\n", + "Value of Ad = 100.0 V/V\n", + "Value of |Acm| = 0.005 V/V\n", + "CMRR = 86 dB\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.12 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 100 # in V\n", + "Beta=160 \n", + "VT=25 # in mV\n", + "VT= VT*10**-3 #in V\n", + "gm= (I/2)/VT # in A/V\n", + "Gm= gm # Short circuit trnsconductance in mA/V\n", + "print \"The value of Gm = %0.1f mA/V\" %(Gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"The value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= Gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "r_pi= Beta/gm #in \u03a9\n", + "Rid= 2*r_pi # in \u03a9\n", + "print \"The value of Rid = %0.1f k\u03a9\" %(Rid*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Gm = 16.0 mA/V\n", + "The value of Ro = 125.0 k\u03a9\n", + "Value of Ad = 2000.0 V/V\n", + "The value of Rid = 20.0 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.13 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vtp= -0.8 # in V\n", + "KpWL= 3.5 # in mA/V**2\n", + "I=0.7 # in mA\n", + "I=I*10**-3 # in A\n", + "R_D= 2 # in k\u03a9\n", + "R_D=R_D*10**3 # in \u03a9\n", + "KpWL=KpWL*10**-3 #in A/V**2\n", + "v_G1= 0 # in V\n", + "v_G2=v_G1 # in V\n", + "VSS= 2.5 # in V\n", + "VDD=VSS # in V\n", + "VCS= 0.5 # in V\n", + "print \"Part (a)\"\n", + "V_OV= -sqrt(I/KpWL) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "V_GS= V_OV+Vtp # in V\n", + "print \"The value of V_GS = %0.2f Volts\" %V_GS\n", + "V_G= 0 # as gate is connected ground\n", + "v_S1= V_G-V_GS # in V\n", + "v_S2= v_S1 # in V\n", + "print \"The value of v_S1 = %0.2f Volts\" %v_S1\n", + "v_D1= I/2*R_D-VDD # in V\n", + "v_D2=v_D1 # in V\n", + "print \"The value of v_D1 = %0.1f Volts\" %v_D1\n", + "print \"The value of v_D2 = %0.1f Volts\" %v_D2\n", + "\n", + "print \"Part (b)\"\n", + "V_CMmin= I*R_D/2-VDD+Vtp # in V\n", + "V_CMmax= VSS-VCS+Vtp+V_OV # in V\n", + "print \"The value of V_CMmin = %0.1f Volts\" %V_CMmin\n", + "print \"The value of V_CMmax = %0.2f Volts\" %V_CMmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_OV = -0.45 Volts\n", + "The value of V_GS = -1.25 Volts\n", + "The value of v_S1 = 1.25 Volts\n", + "The value of v_D1 = -1.8 Volts\n", + "The value of v_D2 = -1.8 Volts\n", + "Part (b)\n", + "The value of V_CMmin = -2.6 Volts\n", + "The value of V_CMmax = 0.75 Volts\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.14 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_OV= 0.2 # in V\n", + "gm=1 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "Vt=0.8 # in V\n", + "unCox= 90 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "# gm= I/V_OV\n", + "I= gm*V_OV # in A\n", + "print \"Bias current = %0.1f mA\" %(I*10**3)\n", + "I_D= I/2 # in A\n", + "# Formula I_D= 1/2*unCox*WLn*V_OV**2\n", + "WbyL= 2*I_D/(unCox*V_OV**2) \n", + "print \"W/L ratio is %0.1f \"%WbyL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bias current = 0.2 mA\n", + "W/L ratio is 55.6 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.15 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.5 # in mA\n", + "I=I*10**-3 # in A\n", + "WbyL= 50 \n", + "unCox= 250 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "V_A= 10 # in V\n", + "R_D= 4 #in k\u03a9\n", + "R_D= R_D*10**3 #in \u03a9\n", + "V_OV= sqrt(I/(WbyL*unCox)) #in V\n", + "print \"The value of V_OV = %0.2f V \" %V_OV\n", + "gm= I/V_OV # in A/V\n", + "print \"The value of gm = %0.2f mA/V\" %(gm*10**3)\n", + "I_D=I/2 # in A\n", + "ro= V_A/I_D # in \u03a9\n", + "print \"The value of ro = %0.2f k\u03a9\" %(ro*10**-3)\n", + "Ad= gm*(R_D*ro/(R_D+ro)) # in V/V\n", + "print \"The value of Ad = %0.2f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 V \n", + "The value of gm = 2.50 mA/V\n", + "The value of ro = 40.00 k\u03a9\n", + "The value of Ad = 9.09 V/V \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.16 - page 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=1 # in mA\n", + "I=I*10**-3 # in A\n", + "i_C=1 # in mA\n", + "i_C=i_C*10**-3 # in A\n", + "V_CC= 5 # in V\n", + "V_CM= -2 # in V\n", + "V_BE= 0.7 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "Alpha=1 \n", + "Beta=100 \n", + "V_B= 1 # in V\n", + "i_C1= Alpha*I # in A\n", + "i_C2=0 # A\n", + "v_E= V_B-V_BE # in V\n", + "print \"Emitters voltage = %0.2f Volt\" %v_E,\n", + "v_C1= V_CC-i_C1*R_C # in V\n", + "v_C2= V_CC-i_C2*R_C # in V\n", + "print \"Output voltage is\",v_C1,\"V &\",v_C2,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitters voltage = 0.30 Volt Output voltage is 2.0 V & 5 V\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb new file mode 100644 index 00000000..26c74103 --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter5.ipynb @@ -0,0 +1,910 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5 - Feedback amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.1 - page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "A= 800 # unit less\n", + "Af= 50 # unit less\n", + "# Formula Af= A/(1+Bita*A)\n", + "Beta= 1/Af-1/A \n", + "print \"Percentage of output which is feedback to the input = %0.3f %%\" %(Beta*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of output which is feedback to the input = 1.875 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.2 - page 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Af= 100 # unit less\n", + "Vi= 50 # in mV\n", + "Vi= Vi*10**-3 # in V\n", + "Vs= 0.5 # in V\n", + "# Formula Af= Vo/Vs\n", + "Vo= Af*Vs # in V\n", + "A= Vo/Vi \n", + "print \"Value of A is %0.f \"%A\n", + "# Formula Af= A/(1+B*A)\n", + "B= 1/Af-1/A \n", + "B=B*100 # in %\n", + "print \"Value of B is %0.1f %%\" %B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of A is 1000 \n", + "Value of B is 0.9 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.3 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Beta= 5/100 \n", + "f_H= 50 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "f_L= 50 # in kHz\n", + "Amid= 1000 \n", + "f_LF= f_L/(1+Beta*Amid) # in Hz\n", + "f_HF= f_H*(1+Beta*Amid) # in Hz\n", + "print \"Value of f_LF = %0.2f Hz\" %f_LF\n", + "print \"Value of f_HF = %0.2f MHz\" %(f_HF*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of f_LF = 0.98 Hz\n", + "Value of f_HF = 2.55 MHz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.4 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "dAf_by_Af= 0.2/100 \n", + "dA_by_A= 150/2000 \n", + "A=2000 \n", + "# Formula dAf_by_Af = 1/(1+Bita*A) * dA_by_A\n", + "Beta= dA_by_A/(A*dAf_by_Af )-1/A \n", + "Af= A/(1+Beta*A) \n", + "print \"Value of Beta = %0.3f %%\" %(Beta*100)\n", + "print \"Value of Af is %0.2f \" %Af" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Beta = 1.825 %\n", + "Value of Af is 53.33 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.5 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 140 \n", + "Avf= 17.5 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"Fraction of the output is %0.2f \"%Beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of the output is 0.05 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.6 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 100 \n", + "Avf= 50 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"The vlaue of beta is %0.2f\" %Beta\n", + "\n", + "# Part(ii)\n", + "Avf= 75 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Av= Avf/(1-Beta*Avf)\n", + "print \"Value of amplifier gain is %0.f \"%Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vlaue of beta is 0.01\n", + "Value of amplifier gain is 300 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.7 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 50 \n", + "Avf= 25 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "# Part(i)\n", + "Av=50 \n", + "Avf= 40 \n", + "Perc_reduction= (Av-Avf)/Av*100 # Percentage of reduction in stage gain in %\n", + "print \"Without feedback, percentage of reduction in stage gain = %0.f %%\" %(Perc_reduction)\n", + "\n", + "# Part(ii)\n", + "Av= 40 \n", + "Avf= 25 \n", + "gain_with_neg_feed= Av/(1+Beta*Av) \n", + "Perc_reduction= (Avf-gain_with_neg_feed)/Avf*100 # in %\n", + "print \"With feedback, percentage reduction in stage gain = %0.1f %%\" %Perc_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Without feedback, percentage of reduction in stage gain = 20 %\n", + "With feedback, percentage reduction in stage gain = 11.1 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.8 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "Ao= 10**4 \n", + "Afo= 50 \n", + "omega_H= 2*pi*100 # in rad/s\n", + "# Formula Afo= Ao/(1+Ao*Beta)\n", + "Beta= 1/Afo-1/Ao \n", + "omega_f_H= omega_H*(1+Ao*Beta) \n", + "print \"Closed loop bandwidth in rad/s is\",omega_f_H,\"or 2*pi*20*10**3\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop bandwidth in rad/s is 125663.706144 or 2*pi*20*10**3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.10 - page 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import inf\n", + "# Given data\n", + "gm=50 \n", + "R_E= 100 # in ohm\n", + "R_S= 1 # in kohm\n", + "R_S=R_S*10**3 # in ohm\n", + "r_pi= 1100 # in ohm\n", + "h_ie= r_pi \n", + "# Formula Av= Vo/Vs, But Vo= gm*vpi*R_E and Vs= Ib*(Ri+rpi), so\n", + "Av= gm*R_E/(R_S+h_ie)\n", + "# As Vo=Vf, so\n", + "Beta=1 \n", + "D= 1+Beta*Av \n", + "Avf= Av/D \n", + "Ri= R_S+r_pi # in ohm\n", + "Ri= Ri*10**-3 # in kohm\n", + "R_if= Ri*D # in kohm\n", + "Ro= inf # ohm\n", + "Rof= Ro*D # ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of Beta = %0.f\" %Beta\n", + "print \"Value of Avf = %0.2f\" %Avf\n", + "print \"Value of Ri = %0.2f kohm\" %Ri\n", + "print \"Value of R_if = %0.2f kohm\" % R_if\n", + "print \"Value of R_of = %0.2f \" % Rof\n", + "# Answer slightly mismatch because of calculation accuracy in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2.38 \n", + "Value of Beta = 1\n", + "Value of Avf = 0.70\n", + "Value of Ri = 2.10 kohm\n", + "Value of R_if = 7.10 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.11 - page 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=2 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "r_d= 40 # in kohm\n", + "r_d= r_d*10**3 # in ohm\n", + "Rs= 3 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "miu= gm*r_d \n", + "Bita=1 \n", + "Av= miu*Rs/(r_d+Rs) \n", + "D= 1+Bita*Av \n", + "Avf= Av/D \n", + "Ri=inf # ohm\n", + "R_if = Ri*D # ohm\n", + "Rof= r_d/D # in ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of D = %0.2f \" %D\n", + "print \"Value of Avf = %0.3f \" %Avf\n", + "print \"Value of R_if = %0.2f \" % R_if\n", + "print \"Value of R_of = %0.2e \" % Rof" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 5.58 \n", + "Value of D = 6.58 \n", + "Value of Avf = 0.848 \n", + "Value of R_if = inf \n", + "Value of R_of = 6.08e+03 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.12 - page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=75 # in A/V\n", + "Rs= 1 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "R_E= 1 # in kohm\n", + "R_E= R_E*10**3 # in ohm\n", + "rpi= 1 # in kohm\n", + "rpi= rpi*10**3 # in ohm\n", + "hie=rpi \n", + "\n", + "Io= -gm \n", + "Vi= Rs+R_E+rpi \n", + "Gm= Io/Vi \n", + "print \"Value of Gm = %0.3f \" %Gm\n", + "Beta=-R_E \n", + "print \"Value of Beta = %0.f \" %Beta\n", + "D= 1+Beta*Gm \n", + "print \"Value of D = %0.f \" %D\n", + "Gmf= -Gm/D \n", + "print \"Value of Gmf = %0.1e\" %Gmf\n", + "Ri= Rs+R_E+hie # in ohm\n", + "Rif= Ri*D # in ohm\n", + "Rif=Rif*10**-3 # in kohm\n", + "print \"Value of Rif = %0.f kohm\" %Rif\n", + "Ro=inf \n", + "R_of = Ro*D # ohm\n", + "print \"Value of R_of = %0.2f \" %R_of" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = -0.025 \n", + "Value of Beta = -1000 \n", + "Value of D = 26 \n", + "Value of Gmf = 9.6e-04\n", + "Value of Rif = 78 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.19 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A= 10**5 \n", + "Af= 100 \n", + "# Formula Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "\n", + "\n", + "#when A= 10**3\n", + "A=10**3 \n", + "Af_desh= A/(1+A*Bita) \n", + "\n", + "delta_Af= Af_desh-Af \n", + "Perc_Change_inAf= delta_Af/Af*100 # in %\n", + "print \"Percentage change in Af = %0.f %% \" %Perc_Change_inAf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in Af = -9 % \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.20 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log10\n", + "# Given data\n", + "A= 100 \n", + "Vs=1 # in volt\n", + "Beta=1 # as in the voltage follower, the output voltage is same as input\n", + "Af= A/(1+Beta*A) \n", + "CLG= 1+A*Beta # closed loop gain\n", + "print \"Closed loop gain = %0.f\" %CLG\n", + "CLG_dB= 20*log10(CLG) \n", + "print \"Closed loop gain = %0.1f dB\" %CLG_dB\n", + "Vo= Af*Vs # in V\n", + "print \"Value of Vo = %0.2f Volt\" %Vo\n", + "Vi= Vs-Vo # in V\n", + "print \"Value of Vi = %0.2f mV\" %round(Vi*10**3)\n", + "# If A decrease 10%,i.e.\n", + "A=90 \n", + "Af_desh= A/(1+Beta*A) \n", + "Per_gain_reduction= (Af_desh-Af)/Af*100 # in %\n", + "print \"Percentage of gain reduction = %0.1f %%\" %Per_gain_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop gain = 101\n", + "Closed loop gain = 40.1 dB\n", + "Value of Vo = 0.99 Volt\n", + "Value of Vi = 10.00 mV\n", + "Percentage of gain reduction = -0.1 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.21 - page 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "# Part (a)\n", + "PerError= 1 # in %\n", + "A= 10**5 # (Assumed value)\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print \"% error A A\u00df 1+A\u00df\"\n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (b)\n", + "PerError= 5 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (c)\n", + "PerError= 50 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% error A A\u00df 1+A\u00df\n", + "1 1e+05 100.0 101.0\n", + "5 1e+05 20.0 21.0\n", + "50 1e+05 2.0 3.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.22 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "S= -20 # sensitivity of closed to open loop gain in dB\n", + "# sensitivity of closed to open loop gain = 1/(1+AB) = S\n", + "# or (1+AB) = -S\n", + "AB= 10**(-S/20) - 1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is -20 dB\" %AB\n", + "\n", + "# Part (b) when \n", + "S= 1/2 # sensitivity of closed to open loop gain in dB\n", + "#S= 1/(1+AB)\n", + "AB= 1/S-1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is 1/2 \" %AB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The loop gain AB = 9.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is -20 dB\n", + "The loop gain AB = 1.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is 1/2 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.23 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given Data\n", + "A = 1e5\n", + "Af = 1e3\n", + "Beta = 0.99*1e-3 \n", + "GDF = 1+A*Beta\n", + "print \"Gain density factor %0.2f\" %GDF\n", + "# part (a)\n", + "A_dash = A*90/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(a) Corresponding % =\",round(cp,2),\"%\"\n", + "# part (a)\n", + "A_dash = A*70/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(b) Corresponding % =\",round(cp,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain density factor 100.00\n", + "(a) Corresponding % = 0.11 %\n", + "(b) Corresponding % = 0.43 %\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.24 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=100 \n", + "Af= 10 \n", + "f_L= 100 # in Hz\n", + "f_H= 10 # in kHz\n", + "# Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "f_desh_L= f_L/(1+A*Bita) # in Hz\n", + "f_desh_H= f_H/(1+A*Bita) # in kHz\n", + "print \"Low frequency = %0.2f Hz\" %f_desh_L\n", + "print \"High frequency = %0.2f kHz\" %f_desh_H\n", + "\n", + "# Note: In the book Calculation to find the value of high frequency i.e. f_desh_H is wrong so the answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Low frequency = 10.00 Hz\n", + "High frequency = 1.00 kHz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.25 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vs= 100 # in mV\n", + "Vf= 95 # in mV\n", + "Vs= Vs*10**-3 # in V\n", + "Vf= Vf*10**-3 # in V\n", + "Vo=10 # in V\n", + "Vi= Vs-Vf # in V\n", + "Av= Vo/Vi # in V/V\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "Beta= Vf/Vo # in V/V\n", + "print \"Value of Bita = %0.1e V/V\" %Beta\n", + "\n", + "# Note: In the book Calculation to find the value of Beta is wrong so the asnwer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Bita = 9.5e-03 V/V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.26 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Is= 100 # in \u00b5A\n", + "Is= Is*10**-6 # in A\n", + "If= 95 # in \u00b5A\n", + "Io= 10 # in mA\n", + "A= Io*1e-3/((Is-If)*1e-6) # n A/A\n", + "Beta= If/Io # A/A\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "print \"Value of Beta = %0.1f \u00b5A/mA\" %Beta\n", + "# Note: In the book , to evaluating the value of Beta, they putted wrong value of If (90 at place of 95)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Beta = 9.5 \u00b5A/mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.28 - page 422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=2000 #V/V\n", + "Beta= 0.1 # inV/V\n", + "Ri= 1 # in kohm\n", + "Ri= Ri*10**3 # in ohm\n", + "Ro= 1 # in kohm\n", + "Ro= Ro*10**3 # in ohm\n", + "Af= A/(1+A*Bita) \n", + "print \"The gain Af = %0.2f \"%Af\n", + "Rif= Ri*(1+A*Beta) # in ohm\n", + "print \"The input resistance = %0.f kohm\" %(Rif*10**-3)\n", + "Rof= Ro*1e3/(1+A*Beta) # in ohm\n", + "print \"The output resistance = %0.3f kohm\" %(Rof*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gain Af = 11.05 \n", + "The input resistance = 201 kohm\n", + "The output resistance = 4.975 kohm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.29 - page 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "\n", + "# Part (b)\n", + "Af= 10 \n", + "A= 10**4 \n", + "# Af= A/(1+A*Beta) \n", + "Beta= 1/Af-1/A \n", + "# Beta= R1/(R1+R2)\n", + "R2_by_R1= 1/Beta-1 \n", + "print \"(b) Value of R2/R1 = %0.2f\" %R2_by_R1\n", + "\n", + "# Part (c)\n", + "Vs= 1 # in V\n", + "Vo= (1+R2_by_R1)*Vs \n", + "print \"(c) Value of Vo = %0.2f Volt\" %Vo\n", + "Vf= Vo/(1+R2_by_R1)\n", + "print \"Value of Vf = %0.2f Volt\" %Vf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(b) Value of R2/R1 = 9.01\n", + "(c) Value of Vo = 10.01 Volt\n", + "Value of Vf = 1.00 Volt\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb new file mode 100644 index 00000000..59db3bd3 --- /dev/null +++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter6.ipynb @@ -0,0 +1,519 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png new file mode 100644 index 00000000..edde0bd9 Binary files /dev/null and b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c3.png differ diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png new file mode 100644 index 00000000..16bc685f Binary files /dev/null and b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c5.png differ diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png new file mode 100644 index 00000000..5edf8418 Binary files /dev/null and b/Electronic_Circuits_by_Dr._Sanjay_Sharma/screenshots/c6.png differ diff --git a/Electronic_Circuits_by_P._Raja/Chapter1.ipynb b/Electronic_Circuits_by_P._Raja/Chapter1.ipynb new file mode 100755 index 00000000..c97fbbe0 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter1.ipynb @@ -0,0 +1,1053 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.1 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G= -100 \n", + "R1= 2.2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-Rf/R1\n", + "Rf= -G*R1 \n", + "print \"The value of Rf = %0.f kohm \" %(Rf*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 220 kohm \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.2 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf= 200 # in kohm\n", + "R1= 2 # in kohm\n", + "vin=2.5 # in mV\n", + "vin=vin*10**-3 # in volt\n", + "G= -Rf/R1 \n", + "vo= G*vin # in V\n", + "print \"The output voltage = %0.2f Volt \" %vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = -0.25 Volt \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.3 - page 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G=-10 \n", + "Ri= 100 # in kohm\n", + "R1= Ri # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-R2/R1\n", + "R2= R1*abs(G) # ohm\n", + "print \"Value of R1 = %0.f kohm \" %(R1*10**-3)\n", + "print \"and value of R2 = %0.f Mohm \" %(R2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 100 kohm \n", + "and value of R2 = 1 Mohm \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.4 - page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 100 # in kohm\n", + "R2= 500 # in kohm\n", + "V1= 2 # in volt\n", + "Vo= (1+R2/R1)*V1 # in volt\n", + "print \"Output voltage for noninverting amplifier = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage for noninverting amplifier = 12 Volt\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.5 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 1 # in Mohm\n", + "Rf=Rf*10**6 #in ohm\n", + "\n", + "# Part(a)\n", + "V1=1 #in volt\n", + "V2=2 #in volt\n", + "V3=3 #in volt\n", + "R1= 500 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 1 # in Mohm\n", + "R2=R2*10**6 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(a) Output voltage = %0.f Volt \" %Vo\n", + "\n", + "# Part(b)\n", + "V1=-2 #in volt\n", + "V2=3 #in volt\n", + "V3=1 #in volt\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 500 # in kohm\n", + "R2=R2*10**3 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(b) Output voltage = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = -7 Volt \n", + "(b) Output voltage = 3 Volt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.6 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "print \"Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\"\n", + "R2=0 \n", + "R1=2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "Av_min= (1+R2/R1)\n", + "print \"Av(min) =\",Av_min\n", + "\n", + "print \"Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\"\n", + "R2=100 # in kohm\n", + "R1=2 # in kohm\n", + "Av_max= (1+R2/R1)\n", + "print \"Av(max) =\",Av_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\n", + "Av(min) = 1.0\n", + "Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\n", + "Av(max) = 51.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.7 - page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1= 745 # in \u00b5V\n", + "V2= 740 # in \u00b5V\n", + "V1=V1*10**-6 # in volt\n", + "V2=V2*10**-6 # in volt\n", + "CMRR=80 # in dB\n", + "Av=5*10**5 \n", + "# (i)\n", + "# CMRR in dB= 20*log(Ad/Ac)\n", + "Ad=Av \n", + "Ac= Ad/10**(CMRR/20) \n", + "# (ii)\n", + "Vo= Ad*(V1-V2)+Ac*(V1+V2)/2 \n", + "print \"Output voltage = %0.2f Volt\" %Vo\n", + "\n", + "# Note:- In the book, there is calculation error to evaluate the value of Ac,\n", + "#so the value of Ac is wrong ans to evaluate the output voltage there is also calculation error " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 2.54 Volt\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.8 - page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1= 1 # in Mohm\n", + "Ri=R1 # in Mohm\n", + "Rf=1 # in Mohm\n", + "A_VF= -Rf/R1 \n", + "print \"Voltage gain = %0.f\" %A_VF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -1\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.10 - page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1=2 # in V\n", + "V2=3 # in V\n", + "Rf=3 # in kohm\n", + "R1=1 # in kohm\n", + "Vo1= (1+Rf/R1)*V1 \n", + "print \"Output voltage when only 2V voltage source is acting is %0.f Volt\" %Vo1\n", + "Vo2= (1+Rf/R1)*V2 \n", + "print \"Output voltage due to 3V voltage source is %0.f Volt\" %Vo2\n", + "Vo= Vo1+Vo2 # in volts\n", + "print \"Total output voltage is %0.f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage when only 2V voltage source is acting is 8 Volt\n", + "Output voltage due to 3V voltage source is 12 Volt\n", + "Total output voltage is 20 Volts\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.11 - page 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=500 # in kohm\n", + "min_vvs= 0 # minimum value of variable resistor in ohm\n", + "max_vvs= 10 # maximum value of variable resistor in ohm\n", + "Ri_min= 10+min_vvs # in kohm\n", + "Ri_max= 10+max_vvs #in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av=-Rf/Ri_min \n", + "print \"Closed loop voltage gain corresponding to Ri(min) is\",Av\n", + "Av=-Rf/Ri_max \n", + "print \"and closed loop voltage gain corresponding to Ri(max) is\",Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop voltage gain corresponding to Ri(min) is -50.0\n", + "and closed loop voltage gain corresponding to Ri(max) is -25.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.12 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf=200 # in kohm\n", + "R1= 20 # in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av= -Rf/R1 \n", + "Vi_min= 0.1 # in V\n", + "Vi_max= 0.5 # in V\n", + "# Vo= Av*Vi\n", + "Vo_min= Av*Vi_min # in V\n", + "Vo_max= Av*Vi_max # in V\n", + "print \"Output voltage ranges from\",Vo_min,\"V to\",Vo_max,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage ranges from -1.0 V to -5.0 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.13 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 250 # in kohm\n", + "# Output voltage expression, Vo= -5*Va+3*Vb\n", + "# and we know that for a difference amplifier circuit, \n", + "# Vo= -Rf/R1*Va + [R2/(R1+R2)]*[1+Rf/R1]*Vb\n", + "# Comparing both the expression, we get\n", + "# -Rf/R1*Va= -5*Va, or\n", + "R1= Rf/5 # in kohm\n", + "print \"The value of R1 = %0.2f kohm\" %R1\n", + "# and \n", + "R2= 3*R1**2/(R1+Rf-3*R1)\n", + "print \"The value of R2 = %0.2f kohm\" %R2\n", + "\n", + "# Note : Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 50.00 kohm\n", + "The value of R2 = 50.00 kohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.14 - page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vi_1= 150 # in \u00b5V\n", + "Vi_2= 140 # in \u00b5V\n", + "Vd= Vi_1-Vi_2 # in \u00b5V\n", + "Vd=Vd*10**-6 # in V\n", + "Vc= (Vi_1+Vi_2)/2 # in \u00b5V\n", + "Vc=Vc*10**-6 # in V\n", + "# Vo= Ad*Vd*(1+Vc/(CMRR*Vd))\n", + "\n", + "# (i) For Ad=4000 and CMRR= 100\n", + "Ad=4000 \n", + "CMRR= 100 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(a) Output voltage = %.1f mV\" %(Vo*10**3)\n", + "\n", + "# (ii) For Ad=4000 and CMRR= 10**5\n", + "Ad=4000 \n", + "CMRR= 10**5 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(b) Output voltage = %0.1f mV\" %(Vo*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = 45.8 mV\n", + "(b) Output voltage = 40.0 mV\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.15 - page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=470 # in kohm\n", + "R1=4.3 # in kohm\n", + "R2=33 # in kohm\n", + "R3=33 # in kohm\n", + "Vi= 80 # in \u00b5V\n", + "Vi=Vi*10**-6 # in volt\n", + "A1= 1+Rf/R1 \n", + "A2=-Rf/R2 \n", + "A3= -Rf/R3 \n", + "A=A1*A2*A3 \n", + "Vo= A*Vi # in volt\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 1.79 Volts\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.16 - page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, simplify, sin\n", + "t = symbols('t')\n", + "# Given data\n", + "R1= 33 # in k\u03a9\n", + "R2= 10 # in k\u03a9\n", + "R3= 330 # in k\u03a9\n", + "V1 = simplify(50*sin(1000*t)) # in mV\n", + "V2 = simplify(10*sin(3000*t)) # in mV\n", + "Vo = -(R3/R1*V1+R3/R2*V2)/1000 # in V\n", + "print \"Output voltage is\",Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage is -0.5*sin(1000*t) - 0.33*sin(3000*t)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.17 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=10 # in kohm\n", + "R2=150 # in kohm\n", + "R3=10 # in kohm\n", + "R4=300 # in kohm\n", + "V1= 1 # in V\n", + "V2= 2 # in V\n", + "Vo= ((1+R4/R2)*(R3*V1/(R1+R3))-(R4/R2)*V2) \n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -2.50 Volts\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.18 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=12 # in kohm\n", + "Rf=360 # in kohm\n", + "V1= -0.3 # in V\n", + "Vo= (1+Rf/R1)*V1 # in V\n", + "print \"(a) Output voltage result in %0.2f Volts\" %Vo\n", + "\n", + "# Part(b)\n", + "Vo= 2.4 # in V\n", + "# We know, Vo= (1+Rf/R1)*V1\n", + "V1= Vo/(1+Rf/R1) \n", + "print \"(b) To result in an output of 2.4 Volt, Input voltage = %0.2f mV\" %(V1*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage result in -9.30 Volts\n", + "(b) To result in an output of 2.4 Volt, Input voltage = 77.42 mV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.19 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=68 # in kohm\n", + "R1=33 # in kohm\n", + "R2=22 # in kohm\n", + "R3=12 # in kohm\n", + "V1= 0.2 # in V\n", + "V2=-0.5 # in V\n", + "V3= 0.8 # in V\n", + "Vo= -Rf/R1*V1 + (-Rf/R2)*V2 + (-Rf/R3)*V3 # in volts\n", + "print \"Output voltage = %0.3f Volts\" %Vo\n", + "#Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -3.400 Volts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.20 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=100 # in kohm\n", + "R1=20 # in kohm\n", + "V1= 1.5 # in V\n", + "Vo1= V1 \n", + "Vo= -Rf/R1*Vo1 # in volts\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -7.50 Volts\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.22 - page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "vo= -10 # in V\n", + "i_f= 1 # in mA\n", + "i_f= i_f*10**-3 #in A\n", + "# Formula vo= -i_f*Rf\n", + "Rf= -vo/i_f # in \u03a9\n", + "# The output voltage, vo= -(v1+5*v2) (i)\n", + "# vo= -Rf/R1*v1 - Rf/R2*v2 (ii)\n", + "# Comparing equations (i) and (2)\n", + "R1= Rf/1 # in \u03a9\n", + "R2= Rf/5 # in \u03a9\n", + "print \"The value of Rf = %0.2f k\u03a9\" %(Rf*10**-3)\n", + "print \"The value of R1 = %0.2f k\u03a9\" %(R1*10**-3)\n", + "print \"The value of R2 = %0.2f k\u03a9\" %(R2*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 10.00 k\u03a9\n", + "The value of R1 = 10.00 k\u03a9\n", + "The value of R2 = 2.00 k\u03a9\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.24 - page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "v1,v2 = symbols('v1 v2')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# for node 1\n", + "va = R4/(R4+R3)*v1\n", + "vo1 = (1+R1/R2)*va\n", + "# for node 2\n", + "va=R3/(R3+R4)*v2\n", + "vo2 = (1+R1/R2)*va\n", + "vo = vo1+vo2\n", + "print \"Total voltage is, vo =\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is, vo = 6.0*v1 + 4.0*v2\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.25 - page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols\n", + "v1,v2,v3 = symbols('v1 v2 v3')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# Voltage at node 1\n", + "va= R4*v1/(R3+R4)\n", + "vo1= (1+R1/R2)*va\n", + "# Voltage at node 2\n", + "va= R3*v2/(R3+R4)\n", + "# From (i) and (ii)\n", + "vo2= (1+R1/R2)*va\n", + "# Voltage at node 3\n", + "va= R3*v2/(R3+R4)\n", + "vo3= (-R1/R2)*v3\n", + "vo = vo1+vo2+vo3\n", + "print \"Total voltage is\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is 6.0*v1 + 4.0*v2 - 9.0*v3\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.26 - page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "import numpy as np\n", + "from __future__ import division\n", + "# omega_t= Ao*omega_b\n", + "# 2*pi*f_t = Ao*2*pi*f_b\n", + "# f_t= Ao*f_b\n", + "# Part (i)\n", + "Ao1= 10**5 \n", + "f_b1= 10**2 # in Hz\n", + "f_t1= Ao1*f_b1 # in Hz\n", + "row1 = np.array([Ao1,f_b1,f_t1])\n", + "# Part (ii)\n", + "Ao2= 10**6 \n", + "f_t2= 10**6 # in Hz\n", + "f_b2= f_t2/Ao2 # in Hz\n", + "row2 = np.array([Ao2,f_b2,f_t2])\n", + "# Part (iii)\n", + "f_b3= 10**3 # in Hz\n", + "f_t3= 10**8 # in Hz\n", + "Ao3= f_t3/f_b3 \n", + "row3 = np.array([Ao3,f_b3,f_t3])\n", + "# Part (iv)\n", + "f_b4= 10**-1 # in Hz\n", + "f_t4= 10**6 # in Hz\n", + "Ao4= f_t4/f_b4 \n", + "row4 = np.array([Ao4,f_b4,f_t4])\n", + "# Part (v)\n", + "Ao5= 2*10**5 \n", + "f_b5= 10 # in Hz\n", + "f_t5= Ao5*f_b5 # in Hz\n", + "row5 = np.array([Ao5,f_b5,f_t5])\n", + "print \"-\"*33\n", + "print \"Ao fb(Hz) ft(Hz)\"\n", + "print \"-\"*33\n", + "print \"%.e %.e %.e\" %(row1[0], row1[1], row1[2])\n", + "print \"%.e %.f %.e\" %(row2[0], row5[1], row2[2])\n", + "print \"%.e %.e %.e\" %(row3[0], row3[1], row3[2])\n", + "print \"%.e %.e %.e\" %(row4[0], row4[1], row4[2])\n", + "print \"%.e %.f %.e\" %(row5[0], row5[1], row5[2])\n", + "# Answer for f_b2 is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "---------------------------------\n", + "Ao fb(Hz) ft(Hz)\n", + "---------------------------------\n", + "1e+05 1e+02 1e+07\n", + "1e+06 10 1e+06\n", + "1e+05 1e+03 1e+08\n", + "1e+07 1e-01 1e+06\n", + "2e+05 10 2e+06\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.27 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data\n", + "Ao= 86 # in dB\n", + "A= 40 # in dB\n", + "f=100 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# From 20*log(S) = 20*log(Ao/A), where S, stands for sqrt(1+(f/fb)**2)\n", + "S= 10**((Ao-A)/20) \n", + "# S= sqrt(1+(f/fb)**2)\n", + "fb= f/sqrt(S**2-1) # in Hz\n", + "Ao= 10**(Ao/20) \n", + "ft= Ao*fb # in Hz\n", + "print \"The value of Ao = %0.3e\" %Ao\n", + "print \"The value of fb = %0.f Hz\" %fb\n", + "print \"The value of ft = %0.f MHz\" %round(ft*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ao = 1.995e+04\n", + "The value of fb = 501 Hz\n", + "The value of ft = 10 MHz\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.28 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi, sqrt\n", + "# Given data\n", + "Ao= 10**4 # in V/V\n", + "f_t= 10**6 # in Hz\n", + "R2byR1= 20 \n", + "omega_t= 2*pi*f_t \n", + "omega_3dB= omega_t/(1+R2byR1) \n", + "f3dB= omega_3dB/(2*pi) # in Hz\n", + "print \"3-dB frequency of the closed loop amplifier is %0.1f kHz\" %(f3dB*10**-3)\n", + "f3dB= 0.1*f3dB # in Hz\n", + "voBYvi= -R2byR1/sqrt(1+(2*pi*f3dB/omega_3dB)**2) \n", + "voBYvi= abs(voBYvi) # in v/v\n", + "print \"Gain = %0.1f v/v\" %(voBYvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3-dB frequency of the closed loop amplifier is 47.6 kHz\n", + "Gain = 19.9 v/v\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter2.ipynb b/Electronic_Circuits_by_P._Raja/Chapter2.ipynb new file mode 100755 index 00000000..3abf271f --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter2.ipynb @@ -0,0 +1,1179 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Metal oxide semiconductor field effect transistor(MOSFET)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.1 - page 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_S= 0 # As source is connected to ground\n", + "V_G= 1.5 # in V\n", + "V_D= 0.5 # in V\n", + "Vt= 0.7 # in V\n", + "# Part(a) V_D= 0.5 # in V\n", + "V_D= 0.5 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.5 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.5 , the device is in triode region\" \n", + "else:\n", + " print \"At V_D = 0.5 , the device is in saturation region\"\n", + "\n", + "# Part(b) V_D= 0.9 # in V\n", + "V_D= 0.9 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.9 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.9 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 0.9 , the device is in saturation region\" \n", + "\n", + "\n", + "# Part(c) V_D= 3 # in V\n", + "V_D= 3 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 3 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 3 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 3 , the device is in saturation region\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_D = 0.5 , the device is in triode region\n", + "At V_D = 0.9 , the device is in saturation region\n", + "At V_D = 3 , the device is in saturation region\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.2 - page 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 1 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=10 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_GS= 1.5 # in V\n", + "Vt= 0.7 # in V\n", + "# For V_DS= 0.5 V\n", + "V_DS= 0.5 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. SO the drain current in the triode region = %0.f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-VT)**2\n", + " print \"The device is in saturation region. SO the drain current in the saturation region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "\n", + "# For V_DS= 0.9 V\n", + "V_DS= 0.9 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. So the drain current in the triode region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-Vt)**2\n", + " print \"The device is in saturation region. So drain current in the saturation region = %0.f \u00b5A\" %(I_D*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The device is in triode region. SO the drain current in the triode region = 275 \u00b5A\n", + "The device is in saturation region. So drain current in the saturation region = 320 \u00b5A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.3 - page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vt= 0.7 # in V\n", + "ID = 100 # in \u00b5A\n", + "V_GS= 1.2 # in V\n", + "V_DS= 1.2 # in V\n", + "\n", + "# Let assume \u00b5n*Cox*W/(2*L) = K\n", + "# For triode region\n", + "if V_DS<= (V_GS-Vt):\n", + " #triode region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + " \n", + "else:\n", + " # saturation region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + "\n", + "V_DS= 3 # inV\n", + "V_GS = 1.5 # in V\n", + "I_D= K*(V_GS-Vt)**2 # in A\n", + "I_D*=10**6 # in \u00b5A\n", + "print \"Value of ID = %0.1f \u00b5A\" %I_D\n", + "# Drain to source resistance\n", + "V_GS = 3.2 # in V\n", + "r_DS = 1/(2*K*(V_GS-Vt))\n", + "print \"Drain to source resistance, rDS = %0.1f ohm\" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of ID = 256.0 \u00b5A\n", + "Drain to source resistance, rDS = 500.0 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.4 - page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 0.7 # in V\n", + "V_SS= -2.5 # in V\n", + "V_DD= 2.5 # in V\n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "W= 32 # in m\n", + "L= 1 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "V_G= 0 \n", + "# Formula V_GS= V_G-V_S\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D# in \u03a9\n", + "print \"The value of R_S = %0.2f k\u03a9\" %(R_S*10**-3)\n", + "V_D= 0.5 # in V\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 1.2 Volt\n", + "The value of R_S = 3.25 k\u03a9\n", + "The value of R_D = 5.0 k\u03a9\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.5 - page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 3 # in V\n", + "I_D= 80 # in \u00b5A\n", + "I_D=I_D*10**-6 # in A\n", + "Vt= 0.6 # in V\n", + "unCox= 200 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=4 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= 1 # in V\n", + "V_G= V_D # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 25 k\u03a9\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.6 - page 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 10 # in V\n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 2 # in V\n", + "unCox= 20 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 10 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=100 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_S= 0 # in V as source is connected to ground\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= V_GS # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.2f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 15.00 k\u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.7 - page 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA\n", + "KnWbyL=KnWbyL*10**-3 # in A\n", + "Vt= 1 # in V\n", + "V_DS= 0.1 # in V\n", + "V_D= V_DS # in V\n", + "V_GS= 5 # in V\n", + "V_DD= V_GS # in V\n", + "# Formula I_D= K'nW/L*[(V_GS-Vt)*V_DS-V_DS**2/2]\n", + "I_D= KnWbyL*((V_GS-Vt)*V_DS-V_DS**2/2) # in A\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The required value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required value of R_D = 12.4 k\u03a9\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.8 - page 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1 # in V\n", + "V_DD= 10 # in V\n", + "R_D= 6 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_G1= 10 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "R_G2= 10 # in M\u03a9\n", + "R_G2= R_G2*10**6 # in \u03a9\n", + "V_G= V_DD*R_G2/(R_G1+R_G2) # in V\n", + "# V_S= R_S*I_D\n", + "# V_GS= V_G-V_S= V_G-R_S*I_D\n", + "# Formula I_D= K'nW/2*L*(V_GS-Vt)**2, Putting the value of V_GS, We get\n", + "# 18*I_D**2 -25*I_D +8= 0\n", + "# I_D= 0.89 mA or I_D= 0.5\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_S= R_S*I_D # in V\n", + "V_GS= V_G-V_S # in V\n", + "V_D= V_DD-I_D*R_D # in V\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_S = %0.2f Volt\" %(V_S)\n", + "print \"The value of V_GS = %0.2f Volt\" %(V_GS)\n", + "print \"The value of V_D = %0.2f Volt\" %(V_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 0.50 mA\n", + "The value of V_S = 3.00 Volt\n", + "The value of V_GS = 2.00 Volt\n", + "The value of V_D = 7.00 Volt\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.9 - page 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "R_D= 20 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R1= 30 # in k\u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "R2= 20 # in k\u03a9\n", + "R2= R2*10**3 # in \u03a9\n", + "V_DD= 5 # in V\n", + "Vtn= 1 # in V\n", + "Kn= 0.1 # in mA/V**2\n", + "Kn=Kn*10**-3 # in A/V**2\n", + "V_GS= R2*V_DD/(R1+R2) # in V\n", + "# I_D= 1/2*\u00b5nCox*W/L*(V_GS-Vtm)**2 \n", + "I_D = Kn*(V_GS-Vtn)**2 # in mA (As Kn= 1/2*\u00b5nCox*W/L)\n", + "V_DS= V_DD-I_D*R_D # in V\n", + "print \"The value of V_GS = %0.f Volt\" %(V_GS)\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_DS = %0.f Volt\" %(V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 2 Volt\n", + "The value of I_D = 0.10 mA\n", + "The value of V_DS = 3 Volt\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.10 - page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "Vt= 1 # in V\n", + "V_D= 10 # in V\n", + "V_S= 5 # in V\n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "R_G1= 8 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 #in A\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "R_S= V_S/I_D # in \u03a9\n", + "# Formul I_D= 1/2*KnWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KnWbyL) # in V\n", + "# Formula V_OV= V_GS-Vt\n", + "V_GS= V_OV+Vt # in V\n", + "V_G= V_GS+V_S # in V\n", + "# Formul V_G= R_G2*V_DD/(R_G1+R_G2)\n", + "R_G2= R_G1*V_G/(V_DD-V_G) #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)\n", + "print \"The value of R_S = %0.1f k\u03a9\" %(R_S*10**-3)\n", + "print \"The value of V_OV = %0.1f Volt\" %(V_OV)\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "print \"The value of R_G2 = %0.1f M\u03a9\" %(R_G2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 10.0 k\u03a9\n", + "The value of R_S = 10.0 k\u03a9\n", + "The value of V_OV = 1.0 Volt\n", + "The value of V_GS = 2.0 Volt\n", + "The value of R_G2 = 7.0 M\u03a9\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.11 - page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "KnWbyL= 0.25 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1.5 # in V\n", + "V_A= 50 # in V\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= 10 # in k\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "# I_D= 1/2*KnWbyL*(V_D-Vt)**2 , (V_GS= V_D, as dc gate current is zero) (i)\n", + "# V_D= V_DD- I_D*R_D (ii)\n", + "I_D= 1.06 # in mA\n", + "I_D = I_D*10**-3 # in A\n", + "V_D= V_DD- I_D*R_D # in V\n", + "V_GS=V_D # in V\n", + "# The coordinates of operating point \n", + "V_GSQ= V_D # in V\n", + "I_DQ= I_D*10**3 # in mA\n", + "print \"The coordinates of operating point(bias point) are V_GSQ =\",V_GSQ,\"V and I_DQ =\",I_DQ,\"mA\"\n", + "gm= KnWbyL*(V_GS-Vt) # in A/V\n", + "r_o= V_A/I_D #in \u03a9\n", + "# The gain is : Av= vo/vi = -gm*(R_D||R_L||r_o)\n", + "Av= -gm*(R_D*R_L*r_o/(R_D*R_L+R_D*r_o+R_L*r_o)) # in V/V\n", + "print \"VOltage gain is %0.1f V/V\" %Av\n", + "# i_i= (vi-vo)/R_G\n", + "# i_i= vi/R_G*(1-vo/vi) and Rin= vi/i_i = R_G/(1-Av)\n", + "Rin= R_G/(1-Av) # in \u03a9\n", + "print \"The input resistance = %0.2f M\u03a9\" %(Rin*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coordinates of operating point(bias point) are V_GSQ = 4.4 V and I_DQ = 1.06 mA\n", + "VOltage gain is -3.3 V/V\n", + "The input resistance = 2.34 M\u03a9\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.12 - page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.5 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "V_D= 3 # in V\n", + "Vt= -1 # in V\n", + "KpWbyL= 1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KpWbyL) # in V\n", + "# For PMOS\n", + "V_OV= -V_OV # in V\n", + "V_GS= V_OV+Vt # in V\n", + "R_D= V_D/I_D # in \u03a9\n", + "V_Dmax= V_D+abs(Vt) # in V\n", + "R_D= V_Dmax/I_D # in \u03a9 \n", + "print \"\"\"The largest value that R_D can have\n", + "while maintaining saturation-region operation is %0.2f k\u03a9\"\"\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The largest value that R_D can have\n", + "while maintaining saturation-region operation is 8.00 k\u03a9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.14 - page 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_GS1= 1.5 # in V\n", + "Vt= 1 # in V\n", + "r_DS1= 1 # in k\u03a9\n", + "r_DS1= r_DS1*10**3 # in \u03a9\n", + "r_DS2= 200 # in k\u03a9\n", + "# r_DS1= 1/(KnWbyL*(V_GS1-Vt)) (i)\n", + "# r_DS2= 1/(KnWbyL*(V_GS2-Vt)) (i)\n", + "# dividing equation (i) by (ii)\n", + "V_GS2= (r_DS1/r_DS2)*(V_GS1-Vt)+Vt # in V\n", + "print \"To Optain rDS= 200, The value of V_GS should be %0.2f Volt\" %V_GS2\n", + "# For V_GS= 1.5 # V\n", + "# W2= 2*W1 \n", + "# r_DS1/r_DS2= 2\n", + "r_DS2= r_DS1/2 # in \u03a9\n", + "print \"For V_GS= 1.5 V , the value of r_DS2 = %0.1f \u03a9 \" %r_DS2\n", + "# For V_GS= 3.5 V\n", + "r_DS2= 200/2 # in \u03a9\n", + "print \"For V_GS= 3.5 V , the value of r_DS2 = %0.1f \u03a9\" %r_DS2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To Optain rDS= 200, The value of V_GS should be 3.50 Volt\n", + "For V_GS= 1.5 V , the value of r_DS2 = 500.0 \u03a9 \n", + "For V_GS= 3.5 V , the value of r_DS2 = 100.0 \u03a9\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.15 page 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.2 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "Vt= 1 # in V\n", + "KpWbyL= 0.1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_GS-VT)**2\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin\n", + "# For I_D= 0.8 mA\n", + "I_D = 0.8*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required V_GS = 3.0 Volt\n", + "The minimum required V_DS = 2.0 Volt\n", + "Required V_GS = 5.0 Volt\n", + "The minimum required V_DS = 4.0 Volt\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.16 - page 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_SS= -5 # in V\n", + "unCox= 60 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "Vt= 1 # in V\n", + "W= 100 # in \u00b5m\n", + "L= 3 # in \u00b5m\n", + "V_G=0 # in V\n", + "V_DD= 5 # in V\n", + "V_D=0 #in V\n", + "I_D= 1*10**-3 # in A\n", + "# I_D= (V_DD-V_D)/R_D\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R_D = %0.f k\u03a9\" %(R_D*10**-3)\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D*L/(unCox*W))+Vt # in V\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D # in \u03a9\n", + "print \"The resistance = %0.f k\u03a9\" %(R_S*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 5 k\u03a9\n", + "The resistance = 3 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.17 - page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_D= 3.5 # in V\n", + "I_D= 115*10**-6 #in A\n", + "upCox= 60 # in \u00b5A/V**2\n", + "upCox= upCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "V_GS= -1.5 # in V\n", + "Vt= 0.7 # in V\n", + "R= V_D/I_D # in \u03a9\n", + "print \"The value required for R = %0.1f k\u03a9\" %(R*10**-3)\n", + "# Formul I_D= 1/2*upCox*W/L*(V_GS-Vt)**2\n", + "W= 2*I_D*L/(upCox*(V_GS-Vt)**2)\n", + "print \"The value required for W = %0.1f \u00b5m\" %(W)\n", + "\n", + "# Note: Calculation of evaluating the value of W in the book is wrong , so the Answer of the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value required for R = 30.4 k\u03a9\n", + "The value required for W = 0.6 \u00b5m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.18 - page 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 1 # in V\n", + "unCox= 120 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L1=1 # in \u00b5m\n", + "L2=L1 # in \u00b5m\n", + "I_D= 120 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_GS1= 1.5 #in V\n", + "V_G2= 3.5 # in V\n", + "V_S2= 1.5 # in V\n", + "V_DD= 5 # in V\n", + "V_D2= 3.5 # in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W1= 2*I_D*L1/(unCox*(V_GS1-Vt)**2) # in \u00b5m\n", + "print \"The value of W1 = %0.1f \u00b5m\" %W1\n", + "V_GS2= V_G2-V_S2 #in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W2= 2*I_D*L2/(unCox*(V_GS2-Vt)**2) # in \u00b5m\n", + "print \"The value of W2 = %0.1f \u00b5m\" %W2\n", + "R= (V_DD-V_D2)/I_D # in \u03a9\n", + "print \"Resistance = %0.1f k\u03a9\" %(R*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of W1 = 8.0 \u00b5m\n", + "The value of W2 = 2.0 \u00b5m\n", + "Resistance = 12.5 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.19 - page 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 2 # in V\n", + "K1WbyL= 1 # in mA/V**2\n", + "K1WbyL= K1WbyL*10**-3 #in mA/V**2\n", + "I_D= 10 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_DD= 10 # in V\n", + "R_D= 4 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V1= -V_GS # in V\n", + "# Part (b)\n", + "I_D= 2 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "V2= V_DD-I_D*R_D #in V\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V3= -V_GS # in V\n", + "# Part (c)\n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V4= V_GS # in V\n", + "# Part (d)\n", + "I_D= 2 # in mA\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "V_SS= 10 # in V\n", + "I_D= I_D*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V5= -V_SS+I_D*R_D # in V\n", + "print \"The value of V1 = %0.2f Volt\" %V1\n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "print \"The value of V3 = %0.f Volt\" %V3\n", + "print \"The value of V4 = %0.2f Volt\" %V4\n", + "print \"The value of V5 = %0.f Volt\" %V5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 = -2.14 Volt\n", + "The value of V2 = 2 Volt\n", + "The value of V3 = -4 Volt\n", + "The value of V4 = 3.41 Volt\n", + "The value of V5 = -5 Volt\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.20 - page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "unCox= 20*10**-6 #in A/V**2\n", + "upCox= unCox/2.5 # in A/V**2\n", + "V_DD= 3 #in V\n", + "Vt= 1 # in V\n", + "W= 30 # in \u00b5m\n", + "L= 10 # in \u00b5m\n", + "\n", + "# V_GS1= V_GS2\n", + "# Formula V_DD= V_GS1+V_GS2\n", + "V_GS1= V_DD/2 #in V\n", + "V_GS2= V_GS1 # in V\n", + "V2= V_GS1 # inV\n", + "I1= 1/2*unCox*W/L*(V_GS1-Vt)**2 # in A\n", + "# Both transistor have V_D = V_G and therefore they are operating in saturation \n", + "#1/2*unCox*W/L*(V4-Vt)**2 = 1/2*upCox*W/L*(V_DD-V4-Vt)\n", + "V4= (V_DD-Vt+sqrt(unCox/upCox))/(1+sqrt(unCox/upCox)) \n", + "I3= 1/2*unCox*W/L*(1.39-Vt)**2 \n", + "print \"The value of V2 = %0.1f Volt\" %V2\n", + "print \"The value of I1 = %0.1f \u00b5A\" %(I1*10**6,)\n", + "print \"The value of V4 = %0.1f Volt \" %V4\n", + "print \"The value of I3 = %0.1f \u00b5A\" %(I3*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V2 = 1.5 Volt\n", + "The value of I1 = 7.5 \u00b5A\n", + "The value of V4 = 1.4 Volt \n", + "The value of I3 = 4.6 \u00b5A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.22 - page 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 0.9 # in V\n", + "V_A= 50 # in V\n", + "V_D= 2 # in V\n", + "R_L= 10 # in M\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "I_D= 500 # in \u00b5A\n", + "I_D= I_D*10**-6 # in A\n", + "V_GS= V_D # in V\n", + "ro= V_A/I_D # in \u03a9\n", + "gm= 2*I_D/(V_GS-Vt) # in A/V\n", + "# vo= -gm*vi*(ro || R_L)\n", + "vo_by_vi = -gm*(ro*R_L/(ro+R_L)) # in V/V\n", + "print \"The voltage gain = %0.1f V/V\" %(vo_by_vi )\n", + "# For I= 1 mA or twice the current \n", + "I_D1= I_D # in A\n", + "I_D2= 2*I_D1 # in A\n", + "gm1= gm # in A/V\n", + "# Effect on V_D\n", + "# I_D1/I_D2 = (V_GS1-Vt)**2/(V_GS2-Vt)**2\n", + "V_GS1= V_GS \n", + "V_GS2= Vt+sqrt(2)*(V_GS1-Vt) # in V\n", + "print \"The new value of V_GS = %0.1f Volt\" %(V_GS2)\n", + "# Effect on gm\n", + "# gm1/gm2= sqrt(I_D1/I_D2)\n", + "gm2= sqrt(I_D2/I_D1)*gm1 # in A/V\n", + "print \"The new value of gm2 = %0.1f mA/V\" %(gm2*10**3)\n", + "# Effect on ro\n", + "# ro1/ro2= I_D2/I_D1\n", + "ro1= ro # in \u03a9\n", + "ro2= I_D1*ro1/I_D2 # in \u03a9\n", + "print \"The new value of ro = %0.1f k\u03a9/V\" %(ro2*10**-3)\n", + "# Effect on gain\n", + "# Av= -gm*(ro2 || R_L)\n", + "Av= -gm*(ro2*R_L/(ro2+R_L)) # in V/V\n", + "print \"The new value of voltage gain = %0.1f V/V\" %(Av)\n", + "#Answer wrong in the textbook because of calculation accuracy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -8.3 V/V\n", + "The new value of V_GS = 2.5 Volt\n", + "The new value of gm2 = 1.3 mA/V\n", + "The new value of ro = 50.0 k\u03a9/V\n", + "The new value of voltage gain = -7.6 V/V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.23 - page 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "f_L= 10 # in Hz\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "vo_by_vi= -gm*R_D/(1+gm*R_S) # in V/V\n", + "print \"Mid band gain = %0.2f V/V \" %(vo_by_vi)\n", + "# Formula f_L= 1/(2*pi*(1/gm || R_S)) * CS\n", + "CS= 1/(2*pi*(1/gm*R_S/(1/gm+R_S))*f_L) #in F\n", + "print \"The value of Cs = %0.2f \u00b5F\" %(CS*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mid band gain = -1.43 V/V \n", + "The value of Cs = 18.57 \u00b5F\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.24 - page 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "Rsig= 100 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_G= 4.7 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "R_D= 15 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= R_D # in \u03a9\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "ro=150 # in k\u03a9\n", + "ro=ro*10**3 # in \u03a9\n", + "Cgs= 1 # in pF\n", + "Cgs=Cgs*10**-12 #in F\n", + "Cgd= 0.4 # in pF\n", + "Cgd=Cgd*10**-12 #in F\n", + "vgsBYvsig= R_G/(Rsig+R_G) \n", + "Rdesh_L= R_D*R_L/(R_D+R_L) # in \u03a9\n", + "voBYvgs= -gm*Rdesh_L \n", + "Av= voBYvgs/vgsBYvsig # in V/V\n", + "print \"The Mid-band gain = %0.2f V/V\" %(Av)\n", + "CM= Cgd*(1+gm*Rdesh_L) # in F\n", + "# f_H= 1/(2*pi*(Rsig || R_G)*(Cgs*CM))\n", + "f_H= 1/(2*pi*(Rsig * R_G/(Rsig + R_G))*(Cgs+CM)) # in Hz\n", + "print \"Frequency = %0.1f kHz\" %(f_H*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Mid-band gain = -7.66 V/V\n", + "Frequency = 369.4 kHz\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter3.ipynb b/Electronic_Circuits_by_P._Raja/Chapter3.ipynb new file mode 100755 index 00000000..23be2dad --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter3.ipynb @@ -0,0 +1,1812 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3 - Bipolar Junction Transistors(BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.1 - page 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= -0.7 # in V\n", + "Bita=50 \n", + "RC= 5 # in k\u03a9\n", + "RE= 10 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_E-V_BE)/RE # in A\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "# I_E= I_B+I_C and I_C= Bita*I_B, so\n", + "I_B= I_E/(1+Bita) # in A\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "I_C= I_E-I_B #in A\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.2f Volt\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitter current = 0.93 mA\n", + "Base current = 18.2 \u00b5A\n", + "Collector current = 0.91 mA\n", + "The value of V_C = 5.44 Volt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.2 - page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= 1.7 # in V\n", + "V_B= 1 # in V\n", + "RC= 5 # in k\u03a9\n", + "RE= 5 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "RB= 100 #in k\u03a9\\\n", + "RB= RB*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_CC-V_E)/RE # in A\n", + "I_B= V_B/RB # in V\n", + "# Formula I_B= (1-alpha)*I_E\n", + "alpha= 1-I_B/I_E \n", + "print \"Value of alpha = %0.3f \" %(alpha)\n", + "beta= alpha/(1-alpha) \n", + "print \"Value of beta = %.01f \" %beta\n", + "V_C= (I_E-I_B)*RC-V_CC # in volt\n", + "print \"Collector voltage = %0.2f Volt\" %V_C\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of alpha = 0.994 \n", + "Value of beta = 165.0 \n", + "Collector voltage = -1.75 Volt\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.3 - page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division# Given data \n", + "from numpy import log\n", + "# Given data\n", + "V_CC= 10 # in V\n", + "V_CE= 3.2 # in V\n", + "RC= 6.8 # in k\u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "I_S= 1*10**-15 # in A\n", + "V_T= 25*10**-3 # in V\n", + "I_C1= (V_CC-V_CE)/RC # in A\n", + "print \"Part(a) : \"\n", + "# Formula I_C= I_S*%e**(V_BE1/V_T)\n", + "V_BE1= V_T*log(I_C1/I_S) # in volt\n", + "print \"Collector current = %0.1f mA\" %(I_C1*10**3)\n", + "print \"Value of V_BE = %0.1f Volt\" %(V_BE1)\n", + "\n", + "print \"Part(b) : \"\n", + "v_in= 5*10**-3 # in V\n", + "Av= -(V_CC-V_CE)/V_T # in V/V\n", + "print \"Voltage gain = %0.1f V/V\" %(Av)\n", + "v_o= abs(Av )*v_in # in V\n", + "print \"Change in output voltage = %0.2f Volt\" %v_o\n", + "\n", + "print \"Part(c) : \"\n", + "#for V_CE= 0.3 V\n", + "V_CE= 0.3 # in V\n", + "I_C2= (V_CC-V_CE)/RC # in A\n", + "# I_C1= I_S*%e**(V_BE1/V_T) (i)\n", + "# I_C2= I_S*%e**(V_BE2/V_T) (ii)\n", + "# divide the equation (ii) by (i)\n", + "delta_V_BE= V_T*log(I_C2/I_C1) # in volt ( where delta_V_BE = V_BE2-V_BE1 )\n", + "print \"The positive increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3)\n", + "\n", + "print \"Part(d) : \"\n", + "v_o= 0.99*V_CC # in V\n", + "I_C3= (V_CC-v_o)/RC # in A\n", + "delta_V_BE= V_T*log(I_C3/I_C1) # in V\n", + "print \"The negative increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) : \n", + "Collector current = 1.0 mA\n", + "Value of V_BE = 0.7 Volt\n", + "Part(b) : \n", + "Voltage gain = -272.0 V/V\n", + "Change in output voltage = 1.36 Volt\n", + "Part(c) : \n", + "The positive increament in V_BE = 8.9 mV\n", + "Part(d) : \n", + "The negative increament in V_BE = -105.5 mV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.4 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_CE= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "I_C= 5*10**-3 # in mA\n", + "bita= 100 \n", + "R_C= (V_CC-V_CE)/I_C # in \u03a9\n", + "I_B= I_C/bita # in A\n", + "R_B= (V_CC-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_C = %0.1f k\u03a9\" %(R_C*10**-3)\n", + "print \"The value of I_B = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of R_B = %.01f k\u03a9\" %(R_B*10**-3)\n", + "\n", + "# Note: The value of base current in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_C = 1.0 k\u03a9\n", + "The value of I_B = 50.0 \u00b5A\n", + "The value of R_B = 186.0 k\u03a9\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.5 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", + "from __future__ import division\n", + "from numpy import arange, nditer\n", + "# Given data \n", + "V_CC= 6 # in V\n", + "bita= 100 \n", + "R_C= 2 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 530 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "# when I_C=0\n", + "I_C=0 \n", + "V_CE= V_CC-I_C*R_C # in volt\n", + "V_CE= arange(0,7,0.1) # in Volt\n", + "# defining function to get the collector current\n", + "def current(V):\n", + " it = nditer([V, None])\n", + " for v_ce,i in it:\n", + " i[...] = (V_CC-v_ce)/R_C*1000 \n", + " return it.operands[1]\n", + "I_C=current(V_CE) # in mA\n", + "x=arange(-1,4,0.1)\n", + "y=arange(-0.5,1.02,0.1)\n", + "plot(V_CE,I_C) \n", + "plot(4*(y/y),y,'--')\n", + "plot(x,1*(x/x),'--')\n", + "text(4,1.02,'Operating Point')\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "# Setting axes\n", + "axes = gca()\n", + "axes.set_xlim([0,6])\n", + "axes.set_ylim([0,3])\n", + "show()\n", + "print \"DC load line shown in figure\"\n", + "# When V_CE= 0\n", + "I_C= V_CC/R_C #in A\n", + "# Operating point for silicon transistor \n", + "V_BE= 0.7 # in V\n", + "I_B= (V_CC-V_BE)/R_B #in A\n", + "I_CQ= bita*I_B # in A\n", + "V_CEQ= V_CC-I_CQ*R_C # in volt\n", + "print \"Operating point is \",V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEaCAYAAAAcz1CnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X28lWWd7/HPV7eOKSiC5aSh5igeFHkQ1J2mbHXCp3wY\nNctzKtEj0iSTOdYpdE7gTDKjvo6S9coHGhWdxITsQVObEraFhRqCAlKGKT4l04iJHnCOyO/8cd9r\nu1isvfba7Pve6+n7fr3Wq/VwrXv9ltq69ve+7uu6FBGYmVnr2qbWBZiZWW25IzAza3HuCMzMWpw7\nAjOzFueOwMysxbkjMDNrce4IzFKSJkr6ZU7H3iRp325e65T0P9P7/0PST/Oowaw77gisIUl6XtJ6\nSeskvS7pEUmTJamk3WGS7k/bvCbpUUkTa1R2dyK9ERHfjYjja1yPtRh3BNaoAvh4ROwM7AX8C/AV\n4F8LDSR9BHgIWAD8VUQMAf4WOKH/yzWrX+4IrOFFxJsRcS/wSeBcSQemL10D3BYR10TE2rTtExHx\nqWqOK+kISY9L+rOkx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6zSpxR2AN\nL91h6jGSTVQgSQffq/CWg0h2S+vOUSWnhj5c7mOL7u8HfCsiRgB/Bs4sqe8NYGnREtUfBx6MiHeB\n24EvR8QokkXPpm3+1vgm8ArQERHHkezpsEdEHBwRI4FmWpvKasQdgTWLwukhSE4LzemhfaW//H8Z\nEWOKbs/1cKznIuKp9P5iYJ8ybb6X1kVa5/fSXaR2SXeqA5gNHN3DZz0L7CvpeknHA+t6aG/WI3cE\n1ix+DBwnaQywY7qhSndWkOzDm5X/Krr/LuXH3u4FTpC0K8m68PPLtOnxtFRE/BkYCXQCnyPZRtKs\nT9wRWFNIdz5bQHKq5M4emt8JHCGpcCoJSUdLOijn+h4HrgfujcQbwOuSPpo2+wzJD3ypN4Gd0zqH\nAG0RcQ/wv6mw2YhZtXzVkDWTOcA9wNmVGkXE2+lWjDMlzQTeAZ4EvgjsRjpGUPSWf0p/eDc7TDf3\nyz0u+B5wN9BR9Ny5wI3pfrLdrRl/M/CgpJeBS4Bb0z0QoML2g2bV8n4EZmYtzqeGzMxanE8NWdOS\ndDDJ5ZnF3o6Ij9SiHrN65VNDZmYtzqeGzMxanDsCM7MW547AzKzFuSMwM2tx7gjMzFrc/wcnnOmI\nlsbj/QAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n", + "Operating point is 4.0 V and 1.0 mA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.6 - page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 12 # in V\n", + "V_BE= 0.7 # in V\n", + "bita= 100 \n", + "R_C= 10 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 100 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B) # in A\n", + "I_CQ= bita*I_BQ # in A\n", + "V_CEQ= V_CC-(I_CQ+I_BQ)*R_C # in volt\n", + "# For dc load line\n", + "# When\n", + "I_C=0 \n", + "V_CE= V_CC-(I_C+I_BQ)*R_C # in volt\n", + "# When\n", + "V_CE= 0 \n", + "I_C= (V_CC-I_BQ*R_C)/R_C #in A\n", + "print \"Q- point values for circuit is\",round(V_CEQ,2),\"V and\",round(I_CQ*10**3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q- point values for circuit is 1.72 V and 1.0 mA\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.7 - page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 15 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CE= 5 # in V\n", + "I_C= 5 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "print \"Base current = %0.f \u00b5A\" %(I_B*10**6)\n", + "#Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE\n", + "R_C= (V_CC-V_CE)/(I_C+I_B) # in \u03a9\n", + "print \"The value of R_C = %0.2f k\u03a9\" %(R_C*10**-3)\n", + "#Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B\n", + "R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B # in ohm\n", + "print \"The value of R_B = %0.f k\u03a9 \" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base current = 50 \u00b5A\n", + "The value of R_C = 1.98 k\u03a9\n", + "The value of R_B = 86 k\u03a9 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.8 - page 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_BE= 0.7 # in V\n", + "V_CE= 3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "# V_CE= V_BE+V_CB and V_CB= I_B*R_B\n", + "R_B= (V_CE-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_B = 230 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.9 - page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "# Exa 3.9\n", + "from numpy import nditer, arange\n", + "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n", + "# Given data \n", + "R1= 10;# in k\u03a9\n", + "R1=R1*10**3;# in \u03a9\n", + "R2= 5;# in k\u03a9\n", + "R2=R2*10**3;# in \u03a9\n", + "RC= 1;# in k\u03a9\n", + "RC=RC*10**3;# in \u03a9\n", + "RE= 2;# in k\u03a9\n", + "RE=RE*10**3;# in \u03a9\n", + "V_CC= 15;# in V\n", + "V_BE= 0.7;# in V\n", + "# When\n", + "I_C=0;\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "# When V_CE= 0\n", + "I_C= V_CC/(RC+RE);# in A\n", + "V_B= V_CC*R2/(R1+R2);# in V\n", + "I_E= (V_B-V_BE)/RE;# in A\n", + "I_C= I_E;# in A (approx)\n", + "I_CQ= I_C;# in A\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "V_CEQ= V_CE;# in V\n", + "#############\n", + "V_CE= arange(0,16,0.1);# in Volt\n", + "def current(v):\n", + " it = nditer([v, None])\n", + " for x,y in it:\n", + " y[...]= (V_CC-x)/(RC+RE)*1000\n", + " return it.operands[1]\n", + "I_C = current(V_CE)\n", + "\n", + "#I_C= (V_CC-V_CE)/(RC+RE)*1000;# in mA\n", + "plot(V_CE,I_C);\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "text(8.55,2.15,'Q(8.55V,2.15mA)')\n", + "x1=arange(0,8.55,0.01)\n", + "y1=arange(0,2.15,0.01)\n", + "a=arange(0,8.55,0.01)\n", + "yd=2.15*(a/a)\n", + "plot(a,yd,'b--')\n", + "b=arange(-1,2.15,0.005)\n", + "xd=8.55*(b/b)\n", + "plot(xd,b,'b--')\n", + "show()\n", + "print \"DC load line shown in figure\"\n", + "print 'Operating point is ',V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEaCAYAAADzDTuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYFPWV//H3QYKiKAoBQRRBBQUGBlCIGiKDkpUgovy8\nBVZEdLNR4y2oiWjyDF7iJeqKiJE1xusvIkYjRkHBC6MoIiCICILRyAqCYsBwEV25nP2jasaeoWem\nZ6a7q7r783qefuyprq46INOnv+db9T3m7oiISGFrFHUAIiISPSUDERFRMhARESUDERFByUBERFAy\nEBERlAxEMLNzzWx2ho6908wOqea1MjM7P3z+72Y2IxMxiKRCyUByipmtNLOtZrbJzL40szfM7Odm\nZlX262tm08N91pvZW2Z2bkRhV8fDB+7+Z3c/MeJ4pIApGUiucWCIu+8DtAduAX4N/Kl8BzM7BngZ\nmAUc6u4tgQuBQdkPVyQ3KBlIznL3ze7+LHAWMMrMuoYv3QY85O63ufuGcN+F7v7TVI5rZsea2Xwz\n+5eZzQuTS/lro81sWTgy+cjM/rPKe68yszVmttrMzkv1z1K1V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dPH7p06cL8+fMZNmwYnTt35re//W3Fflu2bOGtt95i\n4sSJTJkypdIxhg4dyuTJk5OeU+on1WRwH/ASMBdYALwdPkQKWl16JyxdupQjjzyy0ra9996b9u3b\n8+6773L44YdXbP/Zz37G0qVLOeCAAyguLuauu+6qNoaxY8dSXFzMmDFj+Pbb4J5QM2POnDkUFxcz\nePBgloWZqkWLFvTt25fp06cD8Pjjj3PWWWfV+GdcuXIlixYt4gc/+EGtfx+JzIyBAwdy1FFH8cc/\n/rHS9t1335358+dz4YUXcsoppzBp0iTee+89HnroIb788ksAnnnmGQYNGkT79u1p1aoVCxcurDhG\n3759ee211+oUj9Qs1WSwm7uPcfcH3f1hd3/I3R/OaGQiOSLV3glm1c/lzZkzh7Zt21b8fNNNN9Gz\nZ0/WrFnDO++8wy9+8Qs2b968y/tuvvlmPvjgA+bPn8+GDRu49dZbAejduzerVq1i8eLFXHLJJZx6\n6qkV7xk+fDiPP/44AFOmTGH48OHVxrVlyxZOP/107rrrLpo1a5bS30e5N954g0WLFvH8889zzz33\nMHv27IrXhg4dCkBRURFFRUXsv//+NGnShEMOOYRVq1YBMHnyZM444wwAzjjjjEojgbZt27Jy5co6\nxSM1SzUZPG9mPzeztmbWovyR0chEckzr1nD//TB1atAzoV+/YNRQrmvXrrz9duUB9aZNm1i1ahVt\n2rSpVFKZM2dOxQfhoYceSseOHStNopZrEy6k1KRJE0aPHs28efOAYMSx5557AvCTn/yEbdu2sWHD\nBiD4IH755ZdZtGgRW7dupVevXkn/PNu2beO0007j7LPPrpRMUlWe3Fq1asWwYcMqYgPYfffdgaBU\nVv68/Oft27ezYcMGZs2axfnnn0/Hjh257bbbeOKJJyr2c/cak6vUXarJYATBvMEcvisRLchUUCK5\nrLreCSeccAJbt27l0UcfBWDHjh1cccUVjBgxgsMPP5zPPvus4hhHHHEEL730EhBcPbNixQoOOWTX\nC/jWrl0LBB+OTz/9NN27d694T3lymTdvHu5OixbB97dmzZoxYMAARo8ezYgRIyod74gjjqg43v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xY+A\nqmvlQ9Aj4QUz+xT4JfCgmZV/gYtdO1DJbepnICIiKhOJiIjKRJKHzKw7waWbib5x92OiiEckF6hM\nJCIiKhOJiIiSgYiIoGQgIiIoGYiICEoGIiIC/B9eQEZhSVTJsAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n", + "Operating point is 8.55 V and 2.15 mA\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.10 page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_BB= 3 # in V\n", + "V_BE= 0.7 # in V\n", + "V_T= 25*10**-3 # in V\n", + "bita=100 \n", + "RC= 3 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "RB= 100 # in k\u03a9\n", + "RB=RB*10**3 # in \u03a9\n", + "I_B= (V_BB-V_BE)/RB # in V\n", + "I_C= bita*I_B # in A\n", + "V_C= V_CC-I_C*RC # in V\n", + "gm= I_C/V_T # in A/V\n", + "r_pi= bita/gm # in \u03a9\n", + "# v_be= r_pi/(RB+r_pi)*v_i\n", + "v_be_by_v_i= r_pi/(RB+r_pi) \n", + "# v_o= -gm*v_be*RC\n", + "v_o_by_v_i= -gm*v_be_by_v_i*RC # in V/V\n", + "Av= v_o_by_v_i # in V/V\n", + "print \"Voltage gain = %0.2f V/V \" % (round(Av))\n", + "# Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -3.00 V/V \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.11 - page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 4 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "V_E= V_B-V_BE # in V\n", + "R_E= 3.3 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "RC= 4.7 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "I_E= V_E/R_E # in A\n", + "bita=100 \n", + "alpha= bita/(1+bita) \n", + "I_C= alpha*I_E #in A\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "I_B= I_E/(1+bita) # in A\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C = 0.99 mA\n", + "The value of V_C = 5.3 Volts\n", + "The value of I_B = 0.01 mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.12 - page 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "bita=100 \n", + "R_B= 100 # in k\u03a9\n", + "R_C= 2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_B= (V_B-V_BE)/R_B # in A\n", + "I_C= bita*I_B #in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "I_E= I_C # in A (approx)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_C = %0.1f mA \" %(I_C*10**3)\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B = 0.043 mA\n", + "The value of I_C = 4.3 mA \n", + "The value of V_C = 1.4 Volts\n", + "The value of I_E = 4.3 mA\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.13 - page 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols, solve\n", + "V_B = symbols('V_B')\n", + "# Given data \n", + "V_EB= 0.7 # in V\n", + "V_E = 0.7 # in V\n", + "bita=100 \n", + "V_EC= 0.2 # in V\n", + "V_E= V_EB+V_B # in V\n", + "V_CC= 5 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_E= V_B+V_EB # (i)\n", + "V_C= V_E-V_EC # (ii)\n", + "I_E= (V_CC-V_E)/(R_E)*1000 # mA (iii)\n", + "I_B= V_B/R_B # (iv)\n", + "I_C= (V_C+V_CC)/R_C # (v)\n", + "# By using relationship, I_E= I_B+I_C\n", + "expr = I_E*1000-(I_B*1000+I_C*1000)\n", + "V_B = solve(expr,V_B)\n", + "V_B= (9*V_CC-11*V_EB+V_EC)/12 # in V\n", + "V_E= V_B+V_EB # in V\n", + "V_C= V_B+V_EB-V_EC # in V\n", + "I_E= (V_CC-V_E)/R_E# in amp\n", + "I_C= (V_B+V_EB-V_EC+V_CC)/R_B # in amp\n", + "I_B= V_B/R_B # in amp\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 3.12 Volts\n", + "The value of V_E = 3.83 Volts\n", + "The value of V_C = 3.62 Volts\n", + "The value of I_E = 1.17 mA\n", + "The value of I_C = 0.86 mA\n", + "The value of I_B = 0.31 mA\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.14 - page 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "bita=100 \n", + "hFE= 100 \n", + "VCEsat= 0.2 # in V\n", + "VBEsat= 0.8 # in V\n", + "VBEactive= 0.7 # in V\n", + "VBB= 5 # in V\n", + "VCC= 10 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 50 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "# Formula VCC= ICsat*R_C+VCEsat\n", + "ICsat= (VCC-VCEsat)/R_C #A\n", + "print \"The value of IC(sat) = %0.2f mA\" %(ICsat*10**3)\n", + "IBmin= ICsat/bita # in A\n", + "# Apply KVL to input circuit, VBB= IB*R_B+VBEsat\n", + "IB= (VBB-VBEsat)/R_B # in A\n", + "print \"Actual base current = %0.f \u00b5A\" %(IB*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of IC(sat) = 3.27 mA\n", + "Actual base current = 84 \u00b5A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.16 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# beta= alpha/(1-alpha)\n", + "# At alpha= 0.5\n", + "alpha= 0.5 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.5, the value of beta = %0.f \" %beta\n", + "# At alpha= 0.9\n", + "alpha= 0.9 \n", + "beta = alpha/(1-alpha) \n", + "print \"At alpha=0.9, the value of beta is %0.f \" %beta\n", + "# At alpha= 0.5\n", + "alpha= 0.999 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.999, the value of beta is %0.f \" %beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At alpha=0.5, the value of beta = 1 \n", + "At alpha=0.9, the value of beta is 9 \n", + "At alpha=0.999, the value of beta is 999 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.17 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "# alpha= beta/(1-beta)\n", + "# At beta= 1\n", + "beta=1 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=1, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 2\n", + "beta=2 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=2, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 100\n", + "beta=100 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=100, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 200\n", + "beta=200 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=200, the value of alpha is %0.3f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At beta=1, the value of alpha is 0.50 \n", + "At beta=2, the value of alpha is 0.67 \n", + "At beta=100, the value of alpha is 0.99 \n", + "At beta=200, the value of alpha is 0.995 \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.18 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp, log\n", + "# Given data \n", + "VBE= 0.76 # in V\n", + "VT= 0.025 # in V\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "# Part(a) for VBE = 0.7 V\n", + "VBE= 0.7 # in V\n", + "I_C= I_S*exp(VBE/VT)\n", + "print \"For VBE = 0.7 V , The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "\n", + "# Part (b) for I_C= 10 \u00b5A\n", + "I_C= 10*10**-6 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "VBE= VT*log(I_C/I_S) \n", + "print \"For I_C = 10 \u00b5A, The value of VBE = %0.3f V\" %VBE" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_S = 6.273e-16 A\n", + "For VBE = 0.7 V , The value of I_C = 0.907 mA\n", + "For I_C = 10 \u00b5A, The value of VBE = 0.587 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.19 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VT= 0.025 # in V\n", + "I_B= 100 # in \u00b5A\n", + "I_B=I_B*10**-6 # in A\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "alpha= I_C/(I_C+I_B) \n", + "beta= I_C/I_B \n", + "IS_by_alpha= I_S/alpha # in A\n", + "IS_by_beta= I_S/beta # in A\n", + "print \"The value of alpha is %0.2f \" %alpha\n", + "print \"The value of beta is %0.2f \" %beta \n", + "print \"The value of Is/alpha = %0.2e A\" %IS_by_alpha\n", + "print \"The value of Is/beta = %0.2e A\" %IS_by_beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha is 0.99 \n", + "The value of beta is 100.00 \n", + "The value of Is/alpha = 6.98e-15 A\n", + "The value of Is/beta = 6.91e-17 A\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.20 - page 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 10.7 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I1= (VCC-VBE)/R_C # in A\n", + "print \"The value of I1 = %0.f mA\" %(I1*10**3)\n", + "# Part (b)\n", + "VC= -4 #in V\n", + "VB= -10 # in V\n", + "R_C= 5.6 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.4 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC=12 # V\n", + "I_C= (VC-VB)/R_B # in A\n", + "V2= VCC- (R_C*I_C) \n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "# Part (c)\n", + "VCC= 0 \n", + "VCE= -10 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_C= (VCC-VCE)/R_C # in A\n", + "V4= 1 # in V\n", + "I3= I_C # in A (approx)\n", + "print \"The value of V4 = %0.f Volt\" %V4\n", + "print \"The value of I3 = %0.f mA\" %(I3*10**3)\n", + "# Part (d)\n", + "VBE= -10 # in V\n", + "VCC= 10 # in V\n", + "R_B= 5 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C= 15 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "# I5= I_C and \n", + "# I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C\n", + "V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B) \n", + "print \"The value of V6 = %0.3f Volt\" %(V6)\n", + "I5= (V6-0.7-VBE)/R_B # in A\n", + "print \"The value of I5 = %0.3f mA\" %(I5*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1 = 1 mA\n", + "The value of V2 = -2 Volt\n", + "The value of V4 = 1 Volt\n", + "The value of I3 = 1 mA\n", + "The value of V6 = -4.475 Volt\n", + "The value of I5 = 0.965 mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.21 -page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "V_C= 2 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 200 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_C= V_C/R_C # in A\n", + "I_B= V_B/R_B # in A\n", + "beta= I_C/I_B \n", + "print \"Part (a)\"\n", + "print \"Collector current = %0.f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of beta is %0.f \"%beta\n", + "\n", + "# Part (b)\n", + "V_C= 2.3 # in V\n", + "R_C= 230 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 20 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I= V_C/R_C # current through 230\u03a9 resistro i.e. I_C + I_B in A\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "I_C= I-I_B # in A\n", + "bita= abs(I_C/I_B) \n", + "print \"Part (b)\"\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.2f mA\" %(I_B*10**3)\n", + "print \"The value of beta is %0.2f \"%beta\n", + "\n", + "# Part (c)\n", + "V_E= 10 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "V_1= 7 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 6.3 # in V\n", + "R_B= 100 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_E= (V_E-V_1)/R_C #in A\n", + "I_C=I_E # in A (approx)\n", + "V_C= I_C*R_C # in V\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "print \"Part (c)\"\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "print \"Base current = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"Collector voltage = %0.2f Volts\" %(V_C)\n", + "print \"The value of beta is %0.2f \"%(beta)\n", + "\n", + "# Note : In the book the value of base current in the first part is wrong due to calculation error.\n", + "#In the part (b) the values of collector current and beta are wrong due to calculation error in the first line of part (b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Collector current = 2 mA\n", + "Base current = 21.5 \u00b5A\n", + "The value of beta is 93 \n", + "Part (b)\n", + "Collector current = -0.09 mA\n", + "Base current = 0.10 mA\n", + "The value of beta is 93.02 \n", + "Part (c)\n", + "Emitter current = 3.00 mA\n", + "Base current = 33.00 \u00b5A\n", + "Collector voltage = 3.00 Volts\n", + "The value of beta is 89.91 \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.22 - page 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "beta= 30 \n", + "R_C= 2.2 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 3 # in V\n", + "VCE= -3 # in V\n", + "VBE= 0.7 # in V\n", + "V_B= 0 # in V\n", + "V_E= V_B-VBE # in V\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "I_C= I_E # in A\n", + "V_C= VCC-I_E*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (a)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of V_C = %0.3f V\" %(V_C)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)\n", + "# Part (b)\n", + "R_C= 560 # in \u03a9\n", + "R_B= 1.1 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 9 # in V\n", + "VCE= 3 # in V\n", + "V_B= 3 # in V\n", + "V_E= V_B+VBE # in V\n", + "I_E= (VCC-V_E)/R_B # in A\n", + "alpha= beta/(1+beta) \n", + "I_C= I_E*alpha # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (b)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.2f V\" %(V_C)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -0.70 V\n", + "The value of I_E = 1.05 mA\n", + "The value of V_C = 0.700 V\n", + "The value of I_B = 0.03 mA\n", + "Part (b)\n", + "The value of V_B = 3.00 V \n", + "The value of V_E = 3.70 V\n", + "The value of I_E = 4.66 mA\n", + "The value of V_C = 2.61 V\n", + "The value of I_B = 0.155 mA\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.23 - page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import inf\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 9 # in V\n", + "VCE= -9 # in V\n", + "V_B= -1.5 # in V\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_B= abs(V_B)/R_B # in A\n", + "V_E= V_B-VBE # in V\n", + "print \"The value of V_E = %0.2f Volt\" %V_E\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "print \"The value of alpha = %0.2f Volt\" %alpha\n", + "print \"The value of beta = %0.2f Volt\" %beta\n", + "V_C= VCC-I_E*alpha*R_C # in V\n", + "print \"The value of V_C = %0.2f Volt\" %V_C\n", + "beta = inf\n", + "alpha= beta/(1+beta)\n", + "I_B= 0 \n", + "V_B=0 \n", + "V_C= VCC-I_E*R_C # in volt\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of V_C = %0.2f V\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_E = -2.20 Volt\n", + "The value of alpha = 0.78 Volt\n", + "The value of beta = 3.53 Volt\n", + "The value of V_C = 3.70 Volt\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -2.20 V\n", + "The value of V_C = 2.20 V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.24 - page 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE_1= 0.7 # in V\n", + "VBE_2= 0.5 # in V\n", + "V_T= 0.025 # in V\n", + "I_C1= 10 # in mV\n", + "I_C1= I_C1*10**-3 # in A\n", + "# I_C1= I_S*%e**(VBE_1/V_T) (i)\n", + "# I_C2= I_S*%e**(VBE_2/V_T) (ii)\n", + "# Devide equation (ii) by (i)\n", + "I_C2= I_C1*exp((VBE_2-VBE_1)/V_T) # in A\n", + "print \"The value of I_C2 = %0.2f \u00b5A\" %(I_C2*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C2 = 3.35 \u00b5A\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.25 - page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "R1= 10 # in k\u03a9\n", + "R1=R1*10**3 # in \u03a9\n", + "R2= 10 # in k\u03a9\n", + "R2=R2*10**3 # in \u03a9\n", + "I_C=.5 # mA\n", + "V_T= 0.025 #in V\n", + "I_C= I_C*10**-3 # in A\n", + "V= 10 # in V\n", + "Vth= V*R1/(R1+R2) # in V\n", + "Rth= R1*R2/(R1+R2) #in \u03a9\n", + "vo= I_C*Rth # in V\n", + "vi=V_T # in V\n", + "vo_by_vi= vo/vi #in V/V\n", + "print \"The value of vo/vi = %0.f V/V \" %vo_by_vi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vo/vi = 100 V/V \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.27 - page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 2 # in V\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E= 1*10**3 # in \u03a9\n", + "R_C= 1*10**3 # in \u03a9\n", + "V_E= V_B-V_BE # in V\n", + "I_E= V_E/R_E # in A\n", + "I_C= I_E # in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"At V_B= +2 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Part (b)\n", + "V_B= 0 #in V\n", + "V_E= 0 # in V\n", + "I_E= 0 # in A\n", + "V_C= 5 # in V\n", + "print \"At V_B= 0 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_B= +2 V\n", + "The value of V_E = 1.30 Volts\n", + "The value of V_C = 3.70 Volts\n", + "At V_B= 0 V\n", + "The value of V_E = 0.00 Volts\n", + "The value of V_C = 5.00 Volts\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.28 - page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 0 # in V\n", + "R_E=1*10**3 #in \u03a9\n", + "R_C=1*10**3 #in \u03a9\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_E= V_B-V_BE # in V\n", + "I_E= (1+V_E)/R_E # in A\n", + "I_C= I_E # (approx) in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"Part (a)\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "# For saturation \n", + "V_CE=0.2 # V\n", + "V_CB= -0.5 # in V\n", + "# I_C= 5-V_C/R_C and V_C= V_E-VCE, So\n", + "# I_C= (5.2-V_E)/R_C\n", + "# I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,\n", + "V_E= 4.2/2 #/ in V\n", + "V_B= V_E+0.7 # in V\n", + "V_C= V_E+0.2 # in V\n", + "print \"Part (b) \"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Note: In the book , there is a miss print in the last line of this question \n", + "#because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_E = -0.70 Volts\n", + "The value of V_C = 4.70 Volts\n", + "Part (b) \n", + "The value of V_E = 2.10 Volts\n", + "The value of V_B = 2.80 Volts\n", + "The value of V_C = 2.30 Volts\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.29 - page 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CC=5 # in V\n", + "V_E= 1 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E=5*10**3 #in \u03a9\n", + "R_C=5*10**3 #in \u03a9\n", + "R_B= 20*10**3 # in \u03a9\n", + "I_E= (V_CC-V_E)/R_E # in A\n", + "# For pnp transistor V_BE= V_E-V_B\n", + "V_B= V_E-V_BE # in V\n", + "I_B= V_B/R_B # in A\n", + "I_C= I_E-I_B # in A\n", + "V_C= I_C*R_C-V_CC # in V\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "print \"The value of V_B = %0.1f Volts\" %V_B\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.3f Volts\" %V_C \n", + "print \"The value of beta is %0.1f \"%beta \n", + "print \"The value of alpha is %0.2f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 0.3 Volts\n", + "The value of I_B = 0.015 mA\n", + "The value of I_E = 0.8 mA\n", + "The value of I_C = 0.785 mA\n", + "The value of V_C = -1.075 Volts\n", + "The value of beta is 52.3 \n", + "The value of alpha is 0.98 \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.30 - page 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC=5 # in V\n", + "V_T= 0.025 # in V\n", + "R_C=7.5*10**3 #in \u03a9\n", + "I_C= 0.5 # in mA\n", + "I_C= I_C*10**-3 # in A\n", + "I_E=I_C # (approx) in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "print \"dc voltage at the collector = %0.2f Volt\" %V_C\n", + "gm= I_C/V_T # in A/V\n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "# v_be= -v_i\n", + "# v_c= -gm*v_be*R_C\n", + "vcbyvi= gm*R_C # in V/V\n", + "print \"The value of vc/vi = %0.f V/V\" %(vcbyvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc voltage at the collector = 1.25 Volt\n", + "The value of gm = 20 mA/V\n", + "The value of vc/vi = 150 V/V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.31 - page 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "I_E= 0.5 # in mA\n", + "I_E= I_E*10**-3 # in mA\n", + "Rsig= 50 # in \u03a9\n", + "R_C= 5*10**3 # in \u03a9\n", + "re= V_T/I_E # in ohm\n", + "Rin= Rsig+re # in ohm\n", + "print \"Input resistance = %0.f \u03a9\" %Rin\n", + "# Part(b)\n", + "# vo= -0.99*ie*R_C and ie= -v_sig/Rin\n", + "vo_by_v_sig= 0.99*R_C/Rin # in V/V\n", + "print \"The value of vo/vsig = %0.1f V/V\" %(vo_by_v_sig)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistance = 100 \u03a9\n", + "The value of vo/vsig = 49.5 V/V\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.32 - page 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "beta= 200 \n", + "alpha= beta/(1+beta) \n", + "R_C= 100 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "Rsig= 1 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_T= 25*10**-3 \n", + "V=1.5 # in V\n", + "I_E= 10 # in mA\n", + "I_E= I_E*10**-3 # in A\n", + "I_C= alpha*I_E # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "V_B= V-(R_B*I_B)\n", + "gm= I_C/V_T # in A/V\n", + "rpi= beta/gm # in \u03a9\n", + "Rib= rpi # in \u03a9\n", + "print \"The value of Rib = %0.2f \u03a9 \" %Rib\n", + "Rin= R_B*rpi/(R_B+rpi) # in \u03a9\n", + "print \"The value of Rin = %0.2f \u03a9\" %Rin\n", + "# vbe= v_sig*Rin/(Rsig+Rin) \n", + "vbe_by_vsig= Rin/(Rsig+Rin) \n", + "# vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)\n", + "vo_by_vsig= -gm*R_C*vbe_by_vsig # in V/V\n", + "print \"Overall voltage gain = %0.2f V/V\" %vo_by_vsig\n", + "# if \n", + "vo= 0.4 #(\u00b1) in V\n", + "vs= vo/abs(vo_by_vsig) # in V\n", + "vbe= vbe_by_vsig*vs # in V\n", + "print \"The value of v_sig = %0.2f mV\" %(vs*10**3)\n", + "print \"The value of v_be = %0.2f mV\" %(vbe*10**3)\n", + "\n", + "# Note: There is some difference between in this coding and book solution. But Coding is correct." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rib = 502.50 \u03a9 \n", + "The value of Rin = 478.46 \u03a9\n", + "Overall voltage gain = -12.88 V/V\n", + "The value of v_sig = 31.06 mV\n", + "The value of v_be = 10.05 mV\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.33 - page 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "# Part(a)\n", + "print \"Part (a) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_B= 50 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.1f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(b)\n", + "print \"Part (b) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "I_E= 1.070 # in mA\n", + "I_E=I_E*10**-3 # in A\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "beta= alpha/(1-alpha) \n", + "I_B= I_C/beta # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_B = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(c)\n", + "print \"Part (C) : \"\n", + "V_BE= 580 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 0.137 # in mA\n", + "I_B= 7 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "\n", + "# Part(d)\n", + "print \"Part (d) : \"\n", + "V_BE= 780 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 10.10 # in mA\n", + "I_B= 120 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*%e**(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.4e A\" %I_S\n", + "\n", + "# Part(e)\n", + "print \"Part (e) : \"\n", + "V_BE= 820 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 75 # in mA\n", + "I_B= 1050 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.3f \"%alpha\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : \n", + "The value of beta is 20.0 \n", + "The value of alpha is 0.9524 \n", + "The value of I_E = 1.05 mA\n", + "The value of I_S = 1.03e-15 A\n", + "Part (b) : \n", + "The value of beta is 14.286 \n", + "The value of alpha is 0.9346 \n", + "The value of I_B = 70.00 \u00b5A\n", + "The value of I_S = 1.03e-15 A\n", + "Part (C) : \n", + "The value of beta is 18.571 \n", + "The value of alpha is 0.9489 \n", + "The value of I_C = 0.130 mA\n", + "The value of I_S = 1.092e-14 A\n", + "Part (d) : \n", + "The value of beta is 84.167 \n", + "The value of alpha is 0.9883 \n", + "The value of I_E = 10.22 mA\n", + "The value of I_S = 2.8466e-16 A\n", + "Part (e) : \n", + "The value of beta is 70.429 \n", + "The value of alpha is 0.986 \n", + "The value of I_C = 73.95 mA\n", + "The value of I_S = 4.208e-16 A\n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter4.ipynb b/Electronic_Circuits_by_P._Raja/Chapter4.ipynb new file mode 100755 index 00000000..38d22a7c --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter4.ipynb @@ -0,0 +1,924 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Differential amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.1 - page 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= -10 # in volt\n", + "I= 1 # in mA\n", + "I=I*10**-3 # in A\n", + "R_C= 10 # in kohm\n", + "R_C=R_C*10**3 # in kohm\n", + "V_BE=0.7 # in volt\n", + "\n", + "i_C1= I/2 # in A\n", + "i_C2= i_C1 # in A\n", + "print \"Value of i_C1 = %0.2f mA\" %(i_C1*10**3)\n", + "\n", + "V_C1= V_CC-i_C1*R_C # in V\n", + "# For V_cm=0 volt\n", + "V_E= -0.7 # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =0, The value of V_CE1 = %0.2f Volt\" %(V_CE1)\n", + "\n", + "# For V_cm= -5 volt\n", + "V_cm= -5 # in V\n", + "V_B= V_cm # in V\n", + "# From V_BE= V_B-V_E\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =-5V, The value of V_CE1 = %0.2f Volt\" %V_CE1\n", + "\n", + "# For V_cm= 5 volt\n", + "V_cm= 5 # in V\n", + "V_B= V_cm # in V\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =5V, The value of V_CE1 = %0.2f Volt\" %V_CE1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of i_C1 = 0.50 mA\n", + "For V_cm =0, The value of V_CE1 = 5.70 Volt\n", + "For V_cm =-5V, The value of V_CE1 = 10.70 Volt\n", + "For V_cm =5V, The value of V_CE1 = 0.70 Volt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.2 - page 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Given data\n", + "V_DD= 1.5 # in V\n", + "V_SS= V_DD # in V\n", + "KnWL= 4 # in mA/V**2\n", + "KnWL=KnWL*10**-3 # in A/V**2\n", + "Vt= 0.5 # in V\n", + "I=0.4 # in mA\n", + "I=I*10**-3 #in A\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Part (a)\n", + "print \"Part (a)\"\n", + "V_OV= sqrt(I/KnWL) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"Value of V_OV = %0.2f Volt\" %V_OV\n", + "print \"Value of V_GS = %0.2f Volt\" %V_GS\n", + "\n", + "# Part (b)\n", + "print \"Part (b)\"\n", + "V_CM= 0 # in volt\n", + "V_S= -V_GS # in volt\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "I=0.4 # in mw\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c)\"\n", + "V_CM=1 # in V\n", + "V_GS= 0.82 # in V\n", + "V_G= 1 # in V\n", + "V_S= V_G-V_GS # in V\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "# Part (d)\n", + "print \"Part (d)\"\n", + "V_CM_max= Vt+V_DD-i_D1*R_D\n", + "print \"Highest value of V_CM = %0.2f Volt\" %V_CM_max\n", + "\n", + "# Part (e)\n", + "V_S= 0.4 # in V\n", + "print \"Part (e)\"\n", + "V_CM_min= -V_SS+V_S+Vt+V_OV # in V\n", + "print \"Lowest value of V_CM = %0.2f Volt \" %V_CM_min\n", + "V_Smin= V_CM_min-V_GS # in volt\n", + "print \"Lowest value of V_S = %0.2f Volt\" %V_Smin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Value of V_OV = 0.32 Volt\n", + "Value of V_GS = 0.82 Volt\n", + "Part (b)\n", + "Value of V_S = -0.82 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (c)\n", + "Value of V_S = 0.18 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (d)\n", + "Highest value of V_CM = 1.50 Volt\n", + "Part (e)\n", + "Lowest value of V_CM = -0.28 Volt \n", + "Lowest value of V_S = -1.10 Volt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.3 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I= 0.4 # in mA\n", + "unCox= 0.2 # in mA/V**2\n", + "i_D= I/2 # in mA\n", + "V_OV1= 0.2 # in V\n", + "V_OV2= 0.3 # in V\n", + "V_OV3= 0.4 # in V\n", + "WbyL1= 2*i_D/(unCox*V_OV1**2) \n", + "gm1= I/V_OV1 # in mA/V\n", + "WbyL2= 2*i_D/(unCox*V_OV2**2) \n", + "gm2= I/V_OV2 # in mA/V\n", + "WbyL3= 2*i_D/(unCox*V_OV3**2) \n", + "gm3= I/V_OV3 # in mA/V\n", + "print \"Vov (in V) \",V_OV1,\" \",V_OV2,\" \",V_OV3\n", + "print \"W/L \",WbyL1,\" \",round(WbyL2,1),\" \",WbyL3\n", + "print \"gm(in mA/V) \",gm1,\" \",round(gm2,2),\" \",gm3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vov (in V) 0.2 0.3 0.4\n", + "W/L 50.0 22.2 12.5\n", + "gm(in mA/V) 2.0 1.33 1.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.4 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "gm= I/V_OV # in A/V \n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "r_o= V_A/i_D # in \u03a9\n", + "print \"The value of r_o = %0.f k\u03a9\" %(r_o*10**-3)\n", + "# Ad= v_o/v_id = gm*(R_D || r_o)\n", + "Ad= gm*(R_D*r_o/(R_D+r_o)) # in V/V\n", + "print \"Differential gain = %0.1f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 Volts\n", + "The value of gm = 4 mA/V\n", + "The value of r_o = 50 k\u03a9\n", + "Differential gain = 18.2 V/V \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.5 - page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log10\n", + "# Given data\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "\n", + "# Part (a)\n", + "Ad= 1/2*gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %(Ad)\n", + "Acm= -R_D/(2*R_SS) # in V/V\n", + "print \"Common mode gain = %0.1f V/V\" %Acm\n", + "CMRR= abs(Ad)/abs(Acm) \n", + "CMRRindB= round(20*log10(CMRR)) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (b)\n", + "print \"Part (b) when output is taken differentially\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "Acm= 0 \n", + "print \"Common mode gain = %0.1f V/V \"%Acm\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "# delta_R_D= 1% of R_D\n", + "delta_R_D= R_D*1.0/100 # in \u03a9 \n", + "Acm= R_D/(2*R_SS)*delta_R_D/R_D # in V/V\n", + "print \"Common mode gain = %0.3f V/V\" %Acm\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) # in dB\n", + "print \"Common mode rejection ratio = %0.1f dB\" %CMRRindB\n", + "\n", + "# Note: In the book, there is putting wrong value of Ad (20 at place of 10)\n", + "#to evaluate the value of CMRR in dB in part(c) , So the answer of CMRR in dB of Part (c) is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential gain = 5 V/V\n", + "Common mode gain = -0.1 V/V\n", + "Common mode rejection ratio = 34 dB\n", + "Part (b) when output is taken differentially\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.0 V/V \n", + "Common mode rejection ratio = inf dB\n", + "Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.001 V/V\n", + "Common mode rejection ratio = 80.0 dB\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.6 - page 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data (From Exa 4.4)\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "# gm mismatch have a negligible effect on Ad\n", + "Ad= gm*R_D # in V/V(approx) \n", + "# delta_gm= 1% of gm\n", + "delta_gm = gm*1/100 # in A/V\n", + "Acm= R_D/(2*R_SS)*delta_gm/gm \n", + "CMRRindB= 20*log10(Ad/Acm) \n", + "print \"CMRR is %0.f dB\"%CMRRindB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CMRR is 80 dB\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.7 - page 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CM= 0 \n", + "V_BE= -0.7 # in volt\n", + "v_E= V_CM-V_BE # in volt\n", + "print \"Value of v_E = %0.1f Volts\" %v_E\n", + "\n", + "I_E= (5-0.7)/10**3 # in A\n", + "v_B1= 0.5 # in V\n", + "v_B2= 0 # in V\n", + "# Due to Q1 is off therefore\n", + "v_C1= -5 # in V\n", + "v_C2= I_E*10**3-5 # in V\n", + "print \"Value of v_C1 = %0.1f Volts\" %v_C1\n", + "print \"Value of v_C2 = %0.1f Volts\" %v_C2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of v_E = 0.7 Volts\n", + "Value of v_C1 = -5.0 Volts\n", + "Value of v_C2 = -0.7 Volts\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.8 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log\n", + "# Given data \n", + "iE1_by_I= 0.99 # as it is given that iE1= 0.99 *I\n", + "VT= 0.025 # in volt\n", + "# Formula iE1= I/(1+%e**(-vid/VT))\n", + "# %e**(-vid/VT)= 1/iE1_by_I-1\n", + "vid= log( 1/iE1_by_I-1)*(-VT) # in volt\n", + "print \"Input differential signal = %0.1f mV\" %round(vid*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input differential signal = 115.0 mV\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.9 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Beta= 100 \n", + "\n", + "# Part (a)\n", + "RE= 150 # in \u03a9\n", + "VT= 25 # in mV\n", + "VT= VT*10**-3 # in V\n", + "IE= 0.5 # in mA\n", + "IE=IE*10**-3 # in A\n", + "re1= VT/IE #in \u03a9\n", + "R_id= 2*(Beta+1)*(re1+RE) # in \u03a9\n", + "R_id= round(R_id*10**-3) # in k\u03a9\n", + "print \"(a) The input differential resistance = %0.1f k\u03a9\" %R_id\n", + "\n", + "# Part (b)\n", + "RC=10 #in k\u03a9\n", + "RC=RC*10**3 #in \u03a9\n", + "Rsig= 5+5 # in k\u03a9\n", + "VoltageGain1= R_id/(Rsig+R_id) #voltage gain from the signal source to the base of Q1 and Q2 in V/V\n", + "VoltageGain2= 2*RC/(2*(re1+RE)) # voltage gain from the bases to the output in V/V\n", + "Ad= VoltageGain1*VoltageGain2 #in V/V\n", + "print \"(b) The overall differential voltage gain = %0.1f V/V\" %Ad\n", + "\n", + "# Part (c)\n", + "delta_RC= 0.02*RC \n", + "R_EE= 200 #in k\u03a9\n", + "R_EE=R_EE*10**3 #in \u03a9\n", + "Acm= RC/(2*R_EE)*delta_RC/RC #in V/V\n", + "print \"(c) Common mode gain = %0.e V/V\" %Acm\n", + "\n", + "# Part (d)\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"(d) CMRR = %.f dB\" %CMRRindB\n", + "\n", + "# Part (e)\n", + "V_A= 100 # in V\n", + "r_o= V_A/(IE) # in \u03a9\n", + "# Ricm= (Beta+1)*(R_EE || r_o/2)\n", + "Ricm= (Beta+1)*(R_EE*(r_o/2)/(R_EE+(r_o/2))) \n", + "print \"(e) Input common mode resistance = %0.1f M\u03a9\" %(Ricm*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The input differential resistance = 40.0 k\u03a9\n", + "(b) The overall differential voltage gain = 40.0 V/V\n", + "(c) Common mode gain = 5e-04 V/V\n", + "(d) CMRR = 98 dB\n", + "(e) Input common mode resistance = 6.7 M\u03a9\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.10 - page 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "delta_RDbyRD= 2/100 \n", + "delta_WLbyWL= 2/100 \n", + "delta_Vt= 2 #in mV\n", + "delta_Vt= delta_Vt*10**-3 # in V\n", + "#(From Exa 4.4)\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "V_OS1= V_OV/2*delta_RDbyRD # in V\n", + "\n", + "# V_OS due to W/L ratio\n", + "V_OS2= V_OV/2*delta_WLbyWL # in V\n", + "\n", + "# V_OS due to threshold voltage\n", + "V_OS3= delta_Vt # in V\n", + "# Total offset voltage\n", + "V_OS= sqrt(V_OS1**2+V_OS2**2+V_OS3**2) # in V\n", + "V_OS= V_OS*10**3 # in mV\n", + "print \"Total offset voltage = %0.1f mV\" %V_OS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total offset voltage = 3.5 mV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.11 - page 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "WLn= 100 \n", + "WLp= 200 \n", + "unCox= 0.2 # mA/V**2\n", + "unCox=unCox*10**-3 #in A/V**2\n", + "RSS= 25 # in k\u03a9\n", + "RSS= RSS*10**3 # in \u03a9\n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 20 # in V\n", + "i_D= I/2 # in A\n", + "# Formula i_D= 1/2*unCox*WLn*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WLn)) # in V\n", + "gm= I/V_OV # in A/V\n", + "print \"Value of Gm = %0.1f mA/V\" %(gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"Value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "# Finding the value of gm3\n", + "upCox= 0.1 # mA/V**2\n", + "upCox=upCox*10**-3 #in A/V**2\n", + "# Formula i_D= 1/2*upCox*WLp*V_OV**2\n", + "V_OV= sqrt(2*i_D/(upCox*WLp)) # in V\n", + "gm3= I/V_OV # in A/V\n", + "Acm= 1/(2*gm3*RSS) #in V/V\n", + "print \"Value of |Acm| = %0.3f V/V\" %(abs(Acm))\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) #in dB\n", + "print \"CMRR = %0.f dB\" %(round(CMRRindB))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = 4.0 mA/V\n", + "Value of Ro = 25.0 k\u03a9\n", + "Value of Ad = 100.0 V/V\n", + "Value of |Acm| = 0.005 V/V\n", + "CMRR = 86 dB\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.12 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 100 # in V\n", + "Beta=160 \n", + "VT=25 # in mV\n", + "VT= VT*10**-3 #in V\n", + "gm= (I/2)/VT # in A/V\n", + "Gm= gm # Short circuit trnsconductance in mA/V\n", + "print \"The value of Gm = %0.1f mA/V\" %(Gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"The value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= Gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "r_pi= Beta/gm #in \u03a9\n", + "Rid= 2*r_pi # in \u03a9\n", + "print \"The value of Rid = %0.1f k\u03a9\" %(Rid*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Gm = 16.0 mA/V\n", + "The value of Ro = 125.0 k\u03a9\n", + "Value of Ad = 2000.0 V/V\n", + "The value of Rid = 20.0 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.13 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vtp= -0.8 # in V\n", + "KpWL= 3.5 # in mA/V**2\n", + "I=0.7 # in mA\n", + "I=I*10**-3 # in A\n", + "R_D= 2 # in k\u03a9\n", + "R_D=R_D*10**3 # in \u03a9\n", + "KpWL=KpWL*10**-3 #in A/V**2\n", + "v_G1= 0 # in V\n", + "v_G2=v_G1 # in V\n", + "VSS= 2.5 # in V\n", + "VDD=VSS # in V\n", + "VCS= 0.5 # in V\n", + "print \"Part (a)\"\n", + "V_OV= -sqrt(I/KpWL) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "V_GS= V_OV+Vtp # in V\n", + "print \"The value of V_GS = %0.2f Volts\" %V_GS\n", + "V_G= 0 # as gate is connected ground\n", + "v_S1= V_G-V_GS # in V\n", + "v_S2= v_S1 # in V\n", + "print \"The value of v_S1 = %0.2f Volts\" %v_S1\n", + "v_D1= I/2*R_D-VDD # in V\n", + "v_D2=v_D1 # in V\n", + "print \"The value of v_D1 = %0.1f Volts\" %v_D1\n", + "print \"The value of v_D2 = %0.1f Volts\" %v_D2\n", + "\n", + "print \"Part (b)\"\n", + "V_CMmin= I*R_D/2-VDD+Vtp # in V\n", + "V_CMmax= VSS-VCS+Vtp+V_OV # in V\n", + "print \"The value of V_CMmin = %0.1f Volts\" %V_CMmin\n", + "print \"The value of V_CMmax = %0.2f Volts\" %V_CMmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_OV = -0.45 Volts\n", + "The value of V_GS = -1.25 Volts\n", + "The value of v_S1 = 1.25 Volts\n", + "The value of v_D1 = -1.8 Volts\n", + "The value of v_D2 = -1.8 Volts\n", + "Part (b)\n", + "The value of V_CMmin = -2.6 Volts\n", + "The value of V_CMmax = 0.75 Volts\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.14 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_OV= 0.2 # in V\n", + "gm=1 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "Vt=0.8 # in V\n", + "unCox= 90 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "# gm= I/V_OV\n", + "I= gm*V_OV # in A\n", + "print \"Bias current = %0.1f mA\" %(I*10**3)\n", + "I_D= I/2 # in A\n", + "# Formula I_D= 1/2*unCox*WLn*V_OV**2\n", + "WbyL= 2*I_D/(unCox*V_OV**2) \n", + "print \"W/L ratio is %0.1f \"%WbyL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bias current = 0.2 mA\n", + "W/L ratio is 55.6 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.15 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.5 # in mA\n", + "I=I*10**-3 # in A\n", + "WbyL= 50 \n", + "unCox= 250 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "V_A= 10 # in V\n", + "R_D= 4 #in k\u03a9\n", + "R_D= R_D*10**3 #in \u03a9\n", + "V_OV= sqrt(I/(WbyL*unCox)) #in V\n", + "print \"The value of V_OV = %0.2f V \" %V_OV\n", + "gm= I/V_OV # in A/V\n", + "print \"The value of gm = %0.2f mA/V\" %(gm*10**3)\n", + "I_D=I/2 # in A\n", + "ro= V_A/I_D # in \u03a9\n", + "print \"The value of ro = %0.2f k\u03a9\" %(ro*10**-3)\n", + "Ad= gm*(R_D*ro/(R_D+ro)) # in V/V\n", + "print \"The value of Ad = %0.2f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 V \n", + "The value of gm = 2.50 mA/V\n", + "The value of ro = 40.00 k\u03a9\n", + "The value of Ad = 9.09 V/V \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.16 - page 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=1 # in mA\n", + "I=I*10**-3 # in A\n", + "i_C=1 # in mA\n", + "i_C=i_C*10**-3 # in A\n", + "V_CC= 5 # in V\n", + "V_CM= -2 # in V\n", + "V_BE= 0.7 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "Alpha=1 \n", + "Beta=100 \n", + "V_B= 1 # in V\n", + "i_C1= Alpha*I # in A\n", + "i_C2=0 # A\n", + "v_E= V_B-V_BE # in V\n", + "print \"Emitters voltage = %0.2f Volt\" %v_E,\n", + "v_C1= V_CC-i_C1*R_C # in V\n", + "v_C2= V_CC-i_C2*R_C # in V\n", + "print \"Output voltage is\",v_C1,\"V &\",v_C2,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitters voltage = 0.30 Volt Output voltage is 2.0 V & 5 V\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter5.ipynb b/Electronic_Circuits_by_P._Raja/Chapter5.ipynb new file mode 100755 index 00000000..26c74103 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter5.ipynb @@ -0,0 +1,910 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5 - Feedback amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.1 - page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "A= 800 # unit less\n", + "Af= 50 # unit less\n", + "# Formula Af= A/(1+Bita*A)\n", + "Beta= 1/Af-1/A \n", + "print \"Percentage of output which is feedback to the input = %0.3f %%\" %(Beta*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of output which is feedback to the input = 1.875 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.2 - page 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Af= 100 # unit less\n", + "Vi= 50 # in mV\n", + "Vi= Vi*10**-3 # in V\n", + "Vs= 0.5 # in V\n", + "# Formula Af= Vo/Vs\n", + "Vo= Af*Vs # in V\n", + "A= Vo/Vi \n", + "print \"Value of A is %0.f \"%A\n", + "# Formula Af= A/(1+B*A)\n", + "B= 1/Af-1/A \n", + "B=B*100 # in %\n", + "print \"Value of B is %0.1f %%\" %B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of A is 1000 \n", + "Value of B is 0.9 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.3 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Beta= 5/100 \n", + "f_H= 50 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "f_L= 50 # in kHz\n", + "Amid= 1000 \n", + "f_LF= f_L/(1+Beta*Amid) # in Hz\n", + "f_HF= f_H*(1+Beta*Amid) # in Hz\n", + "print \"Value of f_LF = %0.2f Hz\" %f_LF\n", + "print \"Value of f_HF = %0.2f MHz\" %(f_HF*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of f_LF = 0.98 Hz\n", + "Value of f_HF = 2.55 MHz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.4 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "dAf_by_Af= 0.2/100 \n", + "dA_by_A= 150/2000 \n", + "A=2000 \n", + "# Formula dAf_by_Af = 1/(1+Bita*A) * dA_by_A\n", + "Beta= dA_by_A/(A*dAf_by_Af )-1/A \n", + "Af= A/(1+Beta*A) \n", + "print \"Value of Beta = %0.3f %%\" %(Beta*100)\n", + "print \"Value of Af is %0.2f \" %Af" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Beta = 1.825 %\n", + "Value of Af is 53.33 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.5 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 140 \n", + "Avf= 17.5 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"Fraction of the output is %0.2f \"%Beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of the output is 0.05 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.6 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 100 \n", + "Avf= 50 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"The vlaue of beta is %0.2f\" %Beta\n", + "\n", + "# Part(ii)\n", + "Avf= 75 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Av= Avf/(1-Beta*Avf)\n", + "print \"Value of amplifier gain is %0.f \"%Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vlaue of beta is 0.01\n", + "Value of amplifier gain is 300 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.7 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 50 \n", + "Avf= 25 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "# Part(i)\n", + "Av=50 \n", + "Avf= 40 \n", + "Perc_reduction= (Av-Avf)/Av*100 # Percentage of reduction in stage gain in %\n", + "print \"Without feedback, percentage of reduction in stage gain = %0.f %%\" %(Perc_reduction)\n", + "\n", + "# Part(ii)\n", + "Av= 40 \n", + "Avf= 25 \n", + "gain_with_neg_feed= Av/(1+Beta*Av) \n", + "Perc_reduction= (Avf-gain_with_neg_feed)/Avf*100 # in %\n", + "print \"With feedback, percentage reduction in stage gain = %0.1f %%\" %Perc_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Without feedback, percentage of reduction in stage gain = 20 %\n", + "With feedback, percentage reduction in stage gain = 11.1 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.8 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "Ao= 10**4 \n", + "Afo= 50 \n", + "omega_H= 2*pi*100 # in rad/s\n", + "# Formula Afo= Ao/(1+Ao*Beta)\n", + "Beta= 1/Afo-1/Ao \n", + "omega_f_H= omega_H*(1+Ao*Beta) \n", + "print \"Closed loop bandwidth in rad/s is\",omega_f_H,\"or 2*pi*20*10**3\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop bandwidth in rad/s is 125663.706144 or 2*pi*20*10**3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.10 - page 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import inf\n", + "# Given data\n", + "gm=50 \n", + "R_E= 100 # in ohm\n", + "R_S= 1 # in kohm\n", + "R_S=R_S*10**3 # in ohm\n", + "r_pi= 1100 # in ohm\n", + "h_ie= r_pi \n", + "# Formula Av= Vo/Vs, But Vo= gm*vpi*R_E and Vs= Ib*(Ri+rpi), so\n", + "Av= gm*R_E/(R_S+h_ie)\n", + "# As Vo=Vf, so\n", + "Beta=1 \n", + "D= 1+Beta*Av \n", + "Avf= Av/D \n", + "Ri= R_S+r_pi # in ohm\n", + "Ri= Ri*10**-3 # in kohm\n", + "R_if= Ri*D # in kohm\n", + "Ro= inf # ohm\n", + "Rof= Ro*D # ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of Beta = %0.f\" %Beta\n", + "print \"Value of Avf = %0.2f\" %Avf\n", + "print \"Value of Ri = %0.2f kohm\" %Ri\n", + "print \"Value of R_if = %0.2f kohm\" % R_if\n", + "print \"Value of R_of = %0.2f \" % Rof\n", + "# Answer slightly mismatch because of calculation accuracy in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2.38 \n", + "Value of Beta = 1\n", + "Value of Avf = 0.70\n", + "Value of Ri = 2.10 kohm\n", + "Value of R_if = 7.10 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.11 - page 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=2 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "r_d= 40 # in kohm\n", + "r_d= r_d*10**3 # in ohm\n", + "Rs= 3 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "miu= gm*r_d \n", + "Bita=1 \n", + "Av= miu*Rs/(r_d+Rs) \n", + "D= 1+Bita*Av \n", + "Avf= Av/D \n", + "Ri=inf # ohm\n", + "R_if = Ri*D # ohm\n", + "Rof= r_d/D # in ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of D = %0.2f \" %D\n", + "print \"Value of Avf = %0.3f \" %Avf\n", + "print \"Value of R_if = %0.2f \" % R_if\n", + "print \"Value of R_of = %0.2e \" % Rof" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 5.58 \n", + "Value of D = 6.58 \n", + "Value of Avf = 0.848 \n", + "Value of R_if = inf \n", + "Value of R_of = 6.08e+03 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.12 - page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=75 # in A/V\n", + "Rs= 1 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "R_E= 1 # in kohm\n", + "R_E= R_E*10**3 # in ohm\n", + "rpi= 1 # in kohm\n", + "rpi= rpi*10**3 # in ohm\n", + "hie=rpi \n", + "\n", + "Io= -gm \n", + "Vi= Rs+R_E+rpi \n", + "Gm= Io/Vi \n", + "print \"Value of Gm = %0.3f \" %Gm\n", + "Beta=-R_E \n", + "print \"Value of Beta = %0.f \" %Beta\n", + "D= 1+Beta*Gm \n", + "print \"Value of D = %0.f \" %D\n", + "Gmf= -Gm/D \n", + "print \"Value of Gmf = %0.1e\" %Gmf\n", + "Ri= Rs+R_E+hie # in ohm\n", + "Rif= Ri*D # in ohm\n", + "Rif=Rif*10**-3 # in kohm\n", + "print \"Value of Rif = %0.f kohm\" %Rif\n", + "Ro=inf \n", + "R_of = Ro*D # ohm\n", + "print \"Value of R_of = %0.2f \" %R_of" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = -0.025 \n", + "Value of Beta = -1000 \n", + "Value of D = 26 \n", + "Value of Gmf = 9.6e-04\n", + "Value of Rif = 78 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.19 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A= 10**5 \n", + "Af= 100 \n", + "# Formula Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "\n", + "\n", + "#when A= 10**3\n", + "A=10**3 \n", + "Af_desh= A/(1+A*Bita) \n", + "\n", + "delta_Af= Af_desh-Af \n", + "Perc_Change_inAf= delta_Af/Af*100 # in %\n", + "print \"Percentage change in Af = %0.f %% \" %Perc_Change_inAf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in Af = -9 % \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.20 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log10\n", + "# Given data\n", + "A= 100 \n", + "Vs=1 # in volt\n", + "Beta=1 # as in the voltage follower, the output voltage is same as input\n", + "Af= A/(1+Beta*A) \n", + "CLG= 1+A*Beta # closed loop gain\n", + "print \"Closed loop gain = %0.f\" %CLG\n", + "CLG_dB= 20*log10(CLG) \n", + "print \"Closed loop gain = %0.1f dB\" %CLG_dB\n", + "Vo= Af*Vs # in V\n", + "print \"Value of Vo = %0.2f Volt\" %Vo\n", + "Vi= Vs-Vo # in V\n", + "print \"Value of Vi = %0.2f mV\" %round(Vi*10**3)\n", + "# If A decrease 10%,i.e.\n", + "A=90 \n", + "Af_desh= A/(1+Beta*A) \n", + "Per_gain_reduction= (Af_desh-Af)/Af*100 # in %\n", + "print \"Percentage of gain reduction = %0.1f %%\" %Per_gain_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop gain = 101\n", + "Closed loop gain = 40.1 dB\n", + "Value of Vo = 0.99 Volt\n", + "Value of Vi = 10.00 mV\n", + "Percentage of gain reduction = -0.1 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.21 - page 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "# Part (a)\n", + "PerError= 1 # in %\n", + "A= 10**5 # (Assumed value)\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print \"% error A A\u00df 1+A\u00df\"\n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (b)\n", + "PerError= 5 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (c)\n", + "PerError= 50 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% error A A\u00df 1+A\u00df\n", + "1 1e+05 100.0 101.0\n", + "5 1e+05 20.0 21.0\n", + "50 1e+05 2.0 3.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.22 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "S= -20 # sensitivity of closed to open loop gain in dB\n", + "# sensitivity of closed to open loop gain = 1/(1+AB) = S\n", + "# or (1+AB) = -S\n", + "AB= 10**(-S/20) - 1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is -20 dB\" %AB\n", + "\n", + "# Part (b) when \n", + "S= 1/2 # sensitivity of closed to open loop gain in dB\n", + "#S= 1/(1+AB)\n", + "AB= 1/S-1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is 1/2 \" %AB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The loop gain AB = 9.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is -20 dB\n", + "The loop gain AB = 1.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is 1/2 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.23 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given Data\n", + "A = 1e5\n", + "Af = 1e3\n", + "Beta = 0.99*1e-3 \n", + "GDF = 1+A*Beta\n", + "print \"Gain density factor %0.2f\" %GDF\n", + "# part (a)\n", + "A_dash = A*90/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(a) Corresponding % =\",round(cp,2),\"%\"\n", + "# part (a)\n", + "A_dash = A*70/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(b) Corresponding % =\",round(cp,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain density factor 100.00\n", + "(a) Corresponding % = 0.11 %\n", + "(b) Corresponding % = 0.43 %\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.24 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=100 \n", + "Af= 10 \n", + "f_L= 100 # in Hz\n", + "f_H= 10 # in kHz\n", + "# Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "f_desh_L= f_L/(1+A*Bita) # in Hz\n", + "f_desh_H= f_H/(1+A*Bita) # in kHz\n", + "print \"Low frequency = %0.2f Hz\" %f_desh_L\n", + "print \"High frequency = %0.2f kHz\" %f_desh_H\n", + "\n", + "# Note: In the book Calculation to find the value of high frequency i.e. f_desh_H is wrong so the answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Low frequency = 10.00 Hz\n", + "High frequency = 1.00 kHz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.25 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vs= 100 # in mV\n", + "Vf= 95 # in mV\n", + "Vs= Vs*10**-3 # in V\n", + "Vf= Vf*10**-3 # in V\n", + "Vo=10 # in V\n", + "Vi= Vs-Vf # in V\n", + "Av= Vo/Vi # in V/V\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "Beta= Vf/Vo # in V/V\n", + "print \"Value of Bita = %0.1e V/V\" %Beta\n", + "\n", + "# Note: In the book Calculation to find the value of Beta is wrong so the asnwer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Bita = 9.5e-03 V/V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.26 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Is= 100 # in \u00b5A\n", + "Is= Is*10**-6 # in A\n", + "If= 95 # in \u00b5A\n", + "Io= 10 # in mA\n", + "A= Io*1e-3/((Is-If)*1e-6) # n A/A\n", + "Beta= If/Io # A/A\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "print \"Value of Beta = %0.1f \u00b5A/mA\" %Beta\n", + "# Note: In the book , to evaluating the value of Beta, they putted wrong value of If (90 at place of 95)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Beta = 9.5 \u00b5A/mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.28 - page 422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=2000 #V/V\n", + "Beta= 0.1 # inV/V\n", + "Ri= 1 # in kohm\n", + "Ri= Ri*10**3 # in ohm\n", + "Ro= 1 # in kohm\n", + "Ro= Ro*10**3 # in ohm\n", + "Af= A/(1+A*Bita) \n", + "print \"The gain Af = %0.2f \"%Af\n", + "Rif= Ri*(1+A*Beta) # in ohm\n", + "print \"The input resistance = %0.f kohm\" %(Rif*10**-3)\n", + "Rof= Ro*1e3/(1+A*Beta) # in ohm\n", + "print \"The output resistance = %0.3f kohm\" %(Rof*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gain Af = 11.05 \n", + "The input resistance = 201 kohm\n", + "The output resistance = 4.975 kohm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.29 - page 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "\n", + "# Part (b)\n", + "Af= 10 \n", + "A= 10**4 \n", + "# Af= A/(1+A*Beta) \n", + "Beta= 1/Af-1/A \n", + "# Beta= R1/(R1+R2)\n", + "R2_by_R1= 1/Beta-1 \n", + "print \"(b) Value of R2/R1 = %0.2f\" %R2_by_R1\n", + "\n", + "# Part (c)\n", + "Vs= 1 # in V\n", + "Vo= (1+R2_by_R1)*Vs \n", + "print \"(c) Value of Vo = %0.2f Volt\" %Vo\n", + "Vf= Vo/(1+R2_by_R1)\n", + "print \"Value of Vf = %0.2f Volt\" %Vf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(b) Value of R2/R1 = 9.01\n", + "(c) Value of Vo = 10.01 Volt\n", + "Value of Vf = 1.00 Volt\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter6.ipynb b/Electronic_Circuits_by_P._Raja/Chapter6.ipynb new file mode 100755 index 00000000..59db3bd3 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter6.ipynb @@ -0,0 +1,519 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/Chapter7.ipynb b/Electronic_Circuits_by_P._Raja/Chapter7.ipynb new file mode 100755 index 00000000..78dc3860 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/Chapter7.ipynb @@ -0,0 +1,182 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Solved Examination Paper" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.b - page 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 10 # in k\u03a9\n", + "R2= 10 # in k\u03a9\n", + "Rf= 50 # in k\u03a9\n", + "V= 2 # in V\n", + "V1= V*R1/(R1+R2) # in V\n", + "V01= -Rf/R1*V1 # in V\n", + "print \"The value of V1 = %0.f Volts\" %(V1)\n", + "print \"The value of V01 = %0.f Volts\" %(V01)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 = 1 Volts\n", + "The value of V01 = -5 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.a - page 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_P= -4 # in V\n", + "I_DSS= 10 # in mA\n", + "V_GS= 0 # in V\n", + "R_D= 1.8 # in k\u03a9\n", + "V_DD= 20 # in V\n", + "I_D= I_DSS*(1-V_GS/V_P)**2 # in mA\n", + "# Applying KVL to the circuit, we get V_DD= I_D*R_D+V_D\n", + "V_D= V_DD-I_D*R_D # in V\n", + "print \"The value of I_D = %0.f mA\" %(I_D)\n", + "print \"The value of V_D = %0.f Volts\" %V_D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 10 mA\n", + "The value of V_D = 2 Volts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.c - page 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_GS= 3 # in V\n", + "Vth= 1 # in V\n", + "unCox= 25 # in mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "W=3 # in \u00b5m\n", + "L=1 # in \u00b5m\n", + "r_DS= 1/(unCox*W/L*(V_GS-Vth)) # in \u03a9\n", + "print \"The value of r_DS = %0.2f \u03a9 \" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of r_DS = 6.67 \u03a9 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.b - page 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_CQ= 10 # in mA\n", + "I_CQ= I_CQ*10**-3 # in A\n", + "V_CQ= 5 # in V\n", + "V_CC= 10 # in V\n", + "R_C= 0.4 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "V_BE= 0.075 # in V\n", + "V_BB= 0.175 # in V\n", + "beta=100 \n", + "beta_max=120 \n", + "beta_min= 40 \n", + "# Applying KVL we get, V_CQ= V_CC-I_C*(R_C+R_E)\n", + "R_E= (V_CC-V_CQ)/I_CQ-R_C # in \u03a9\n", + "print \"The value of R_E = %0.f \u03a9\" %( R_E)\n", + "I_B= I_CQ/beta # in A\n", + "R_B= (V_BB-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)\n", + "I_Cmax= beta_max*I_B # in A\n", + "I_Cmin= beta_min*I_B # in A\n", + "delta_I_CQ= I_Cmax-I_Cmin # in A\n", + "print \"The value of delta_I_C = %0.f mA\" %(delta_I_CQ*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_E = 100 \u03a9\n", + "The value of R_B = 1 k\u03a9\n", + "The value of delta_I_C = 8 mA\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter1.ipynb b/Electronic_Circuits_by_P._Raja/chapter1.ipynb new file mode 100755 index 00000000..6297ee97 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter1.ipynb @@ -0,0 +1,1053 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.1 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G= -100 \n", + "R1= 2.2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-Rf/R1\n", + "Rf= -G*R1 \n", + "print \"The value of Rf = %0.f kohm \" %(Rf*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 220 kohm \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.2 - page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf= 200 # in kohm\n", + "R1= 2 # in kohm\n", + "vin=2.5 # in mV\n", + "vin=vin*10**-3 # in volt\n", + "G= -Rf/R1 \n", + "vo= G*vin # in V\n", + "print \"The output voltage = %0.2f Volt \" %vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = -0.25 Volt \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.3 - page 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "G=-10 \n", + "Ri= 100 # in kohm\n", + "R1= Ri # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "# Formula G=-R2/R1\n", + "R2= R1*abs(G) # ohm\n", + "print \"Value of R1 = %0.f kohm \" %(R1*10**-3)\n", + "print \"and value of R2 = %0.f Mohm \" %(R2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 100 kohm \n", + "and value of R2 = 1 Mohm \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.4 - page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 100 # in kohm\n", + "R2= 500 # in kohm\n", + "V1= 2 # in volt\n", + "Vo= (1+R2/R1)*V1 # in volt\n", + "print \"Output voltage for noninverting amplifier = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage for noninverting amplifier = 12 Volt\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.5 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 1 # in Mohm\n", + "Rf=Rf*10**6 #in ohm\n", + "\n", + "# Part(a)\n", + "V1=1 #in volt\n", + "V2=2 #in volt\n", + "V3=3 #in volt\n", + "R1= 500 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 1 # in Mohm\n", + "R2=R2*10**6 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(a) Output voltage = %0.f Volt \" %Vo\n", + "\n", + "# Part(b)\n", + "V1=-2 #in volt\n", + "V2=3 #in volt\n", + "V3=1 #in volt\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 #in ohm\n", + "R2= 500 # in kohm\n", + "R2=R2*10**3 #in ohm\n", + "R3= 1 # in Mohm\n", + "R3=R3*10**6 #in ohm\n", + "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", + "print \"(b) Output voltage = %0.f Volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = -7 Volt \n", + "(b) Output voltage = 3 Volt\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.6 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "print \"Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\"\n", + "R2=0 \n", + "R1=2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "Av_min= (1+R2/R1)\n", + "print \"Av(min) =\",Av_min\n", + "\n", + "print \"Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\"\n", + "R2=100 # in kohm\n", + "R1=2 # in kohm\n", + "Av_max= (1+R2/R1)\n", + "print \"Av(max) =\",Av_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum closed loop voltage gain for R2=0 and R1= 2 kohm\n", + "Av(min) = 1.0\n", + "Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm\n", + "Av(max) = 51.0\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.7 - page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1= 745 # in \u00b5V\n", + "V2= 740 # in \u00b5V\n", + "V1=V1*10**-6 # in volt\n", + "V2=V2*10**-6 # in volt\n", + "CMRR=80 # in dB\n", + "Av=5*10**5 \n", + "# (i)\n", + "# CMRR in dB= 20*log(Ad/Ac)\n", + "Ad=Av \n", + "Ac= Ad/10**(CMRR/20) \n", + "# (ii)\n", + "Vo= Ad*(V1-V2)+Ac*(V1+V2)/2 \n", + "print \"Output voltage = %0.2f Volt\" %Vo\n", + "\n", + "# Note:- In the book, there is calculation error to evaluate the value of Ac,\n", + "#so the value of Ac is wrong ans to evaluate the output voltage there is also calculation error " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 2.54 Volt\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.8 - page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1= 1 # in Mohm\n", + "Ri=R1 # in Mohm\n", + "Rf=1 # in Mohm\n", + "A_VF= -Rf/R1 \n", + "print \"Voltage gain = %0.f\" %A_VF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -1\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.10 - page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V1=2 # in V\n", + "V2=3 # in V\n", + "Rf=3 # in kohm\n", + "R1=1 # in kohm\n", + "Vo1= (1+Rf/R1)*V1 \n", + "print \"Output voltage when only 2V voltage source is acting is %0.f Volt\" %Vo1\n", + "Vo2= (1+Rf/R1)*V2 \n", + "print \"Output voltage due to 3V voltage source is %0.f Volt\" %Vo2\n", + "Vo= Vo1+Vo2 # in volts\n", + "print \"Total output voltage is %0.f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage when only 2V voltage source is acting is 8 Volt\n", + "Output voltage due to 3V voltage source is 12 Volt\n", + "Total output voltage is 20 Volts\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.11 - page 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=500 # in kohm\n", + "min_vvs= 0 # minimum value of variable resistor in ohm\n", + "max_vvs= 10 # maximum value of variable resistor in ohm\n", + "Ri_min= 10+min_vvs # in kohm\n", + "Ri_max= 10+max_vvs #in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av=-Rf/Ri_min \n", + "print \"Closed loop voltage gain corresponding to Ri(min) is\",Av\n", + "Av=-Rf/Ri_max \n", + "print \"and closed loop voltage gain corresponding to Ri(max) is\",Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop voltage gain corresponding to Ri(min) is -50.0\n", + "and closed loop voltage gain corresponding to Ri(max) is -25.0\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.12 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf=200 # in kohm\n", + "R1= 20 # in kohm\n", + "# Av= Vo/Vi= -Rf/Ri\n", + "Av= -Rf/R1 \n", + "Vi_min= 0.1 # in V\n", + "Vi_max= 0.5 # in V\n", + "# Vo= Av*Vi\n", + "Vo_min= Av*Vi_min # in V\n", + "Vo_max= Av*Vi_max # in V\n", + "print \"Output voltage ranges from\",Vo_min,\"V to\",Vo_max,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage ranges from -1.0 V to -5.0 V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.13 - page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 250 # in kohm\n", + "# Output voltage expression, Vo= -5*Va+3*Vb\n", + "# and we know that for a difference amplifier circuit, \n", + "# Vo= -Rf/R1*Va + [R2/(R1+R2)]*[1+Rf/R1]*Vb\n", + "# Comparing both the expression, we get\n", + "# -Rf/R1*Va= -5*Va, or\n", + "R1= Rf/5 # in kohm\n", + "print \"The value of R1 = %0.2f kohm\" %R1\n", + "# and \n", + "R2= 3*R1**2/(R1+Rf-3*R1)\n", + "print \"The value of R2 = %0.2f kohm\" %R2\n", + "\n", + "# Note : Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 50.00 kohm\n", + "The value of R2 = 50.00 kohm\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.14 - page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vi_1= 150 # in \u00b5V\n", + "Vi_2= 140 # in \u00b5V\n", + "Vd= Vi_1-Vi_2 # in \u00b5V\n", + "Vd=Vd*10**-6 # in V\n", + "Vc= (Vi_1+Vi_2)/2 # in \u00b5V\n", + "Vc=Vc*10**-6 # in V\n", + "# Vo= Ad*Vd*(1+Vc/(CMRR*Vd))\n", + "\n", + "# (i) For Ad=4000 and CMRR= 100\n", + "Ad=4000 \n", + "CMRR= 100 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(a) Output voltage = %.1f mV\" %(Vo*10**3)\n", + "\n", + "# (ii) For Ad=4000 and CMRR= 10**5\n", + "Ad=4000 \n", + "CMRR= 10**5 \n", + "Vo= Ad*Vd*(1+Vc/(CMRR*Vd)) # in volt\n", + "print \"(b) Output voltage = %0.1f mV\" %(Vo*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage = 45.8 mV\n", + "(b) Output voltage = 40.0 mV\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.15 - page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=470 # in kohm\n", + "R1=4.3 # in kohm\n", + "R2=33 # in kohm\n", + "R3=33 # in kohm\n", + "Vi= 80 # in \u00b5V\n", + "Vi=Vi*10**-6 # in volt\n", + "A1= 1+Rf/R1 \n", + "A2=-Rf/R2 \n", + "A3= -Rf/R3 \n", + "A=A1*A2*A3 \n", + "Vo= A*Vi # in volt\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 1.79 Volts\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.16 - page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "t = symbols('t')\n", + "# Given data\n", + "R1= 33 # in k\u03a9\n", + "R2= 10 # in k\u03a9\n", + "R3= 330 # in k\u03a9\n", + "V1 = simplify(50*sin(1000*t)) # in mV\n", + "V2 = simplify(10*sin(3000*t)) # in mV\n", + "Vo = -(R3/R1*V1+R3/R2*V2)/1000 # in V\n", + "print \"Output voltage is\",Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage is -0.5*sin(1000*t) - 0.33*sin(3000*t)\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.17 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=10 # in kohm\n", + "R2=150 # in kohm\n", + "R3=10 # in kohm\n", + "R4=300 # in kohm\n", + "V1= 1 # in V\n", + "V2= 2 # in V\n", + "Vo= ((1+R4/R2)*(R3*V1/(R1+R3))-(R4/R2)*V2) \n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -2.50 Volts\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.18 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1=12 # in kohm\n", + "Rf=360 # in kohm\n", + "V1= -0.3 # in V\n", + "Vo= (1+Rf/R1)*V1 # in V\n", + "print \"(a) Output voltage result in %0.2f Volts\" %Vo\n", + "\n", + "# Part(b)\n", + "Vo= 2.4 # in V\n", + "# We know, Vo= (1+Rf/R1)*V1\n", + "V1= Vo/(1+Rf/R1) \n", + "print \"(b) To result in an output of 2.4 Volt, Input voltage = %0.2f mV\" %(V1*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Output voltage result in -9.30 Volts\n", + "(b) To result in an output of 2.4 Volt, Input voltage = 77.42 mV\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.19 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=68 # in kohm\n", + "R1=33 # in kohm\n", + "R2=22 # in kohm\n", + "R3=12 # in kohm\n", + "V1= 0.2 # in V\n", + "V2=-0.5 # in V\n", + "V3= 0.8 # in V\n", + "Vo= -Rf/R1*V1 + (-Rf/R2)*V2 + (-Rf/R3)*V3 # in volts\n", + "print \"Output voltage = %0.3f Volts\" %Vo\n", + "#Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -3.400 Volts\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.20 - page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf=100 # in kohm\n", + "R1=20 # in kohm\n", + "V1= 1.5 # in V\n", + "Vo1= V1 \n", + "Vo= -Rf/R1*Vo1 # in volts\n", + "print \"Output voltage = %0.2f Volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = -7.50 Volts\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.22 - page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "vo= -10 # in V\n", + "i_f= 1 # in mA\n", + "i_f= i_f*10**-3 #in A\n", + "# Formula vo= -i_f*Rf\n", + "Rf= -vo/i_f # in \u03a9\n", + "# The output voltage, vo= -(v1+5*v2) (i)\n", + "# vo= -Rf/R1*v1 - Rf/R2*v2 (ii)\n", + "# Comparing equations (i) and (2)\n", + "R1= Rf/1 # in \u03a9\n", + "R2= Rf/5 # in \u03a9\n", + "print \"The value of Rf = %0.2f k\u03a9\" %(Rf*10**-3)\n", + "print \"The value of R1 = %0.2f k\u03a9\" %(R1*10**-3)\n", + "print \"The value of R2 = %0.2f k\u03a9\" %(R2*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 10.00 k\u03a9\n", + "The value of R1 = 10.00 k\u03a9\n", + "The value of R2 = 2.00 k\u03a9\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.24 - page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "v1,v2 = symbols('v1 v2')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# for node 1\n", + "va = R4/(R4+R3)*v1\n", + "vo1 = (1+R1/R2)*va\n", + "# for node 2\n", + "va=R3/(R3+R4)*v2\n", + "vo2 = (1+R1/R2)*va\n", + "vo = vo1+vo2\n", + "print \"Total voltage is, vo =\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is, vo = 6.0*v1 + 4.0*v2\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.25 - page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "v1,v2,v3 = symbols('v1 v2 v3')\n", + "# Given data\n", + "R1= 9 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 2 # in k\u03a9\n", + "R4= 3 # in k\u03a9\n", + "# Voltage at node 1\n", + "va= R4*v1/(R3+R4)\n", + "vo1= (1+R1/R2)*va\n", + "# Voltage at node 2\n", + "va= R3*v2/(R3+R4)\n", + "# From (i) and (ii)\n", + "vo2= (1+R1/R2)*va\n", + "# Voltage at node 3\n", + "va= R3*v2/(R3+R4)\n", + "vo3= (-R1/R2)*v3\n", + "vo = vo1+vo2+vo3\n", + "print \"Total voltage is\",vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total voltage is 6.0*v1 + 4.0*v2 - 9.0*v3\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.26 - page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "import numpy as np\n", + "from __future__ import division\n", + "# omega_t= Ao*omega_b\n", + "# 2*pi*f_t = Ao*2*pi*f_b\n", + "# f_t= Ao*f_b\n", + "# Part (i)\n", + "Ao1= 10**5 \n", + "f_b1= 10**2 # in Hz\n", + "f_t1= Ao1*f_b1 # in Hz\n", + "row1 = np.array([Ao1,f_b1,f_t1])\n", + "# Part (ii)\n", + "Ao2= 10**6 \n", + "f_t2= 10**6 # in Hz\n", + "f_b2= f_t2/Ao2 # in Hz\n", + "row2 = np.array([Ao2,f_b2,f_t2])\n", + "# Part (iii)\n", + "f_b3= 10**3 # in Hz\n", + "f_t3= 10**8 # in Hz\n", + "Ao3= f_t3/f_b3 \n", + "row3 = np.array([Ao3,f_b3,f_t3])\n", + "# Part (iv)\n", + "f_b4= 10**-1 # in Hz\n", + "f_t4= 10**6 # in Hz\n", + "Ao4= f_t4/f_b4 \n", + "row4 = np.array([Ao4,f_b4,f_t4])\n", + "# Part (v)\n", + "Ao5= 2*10**5 \n", + "f_b5= 10 # in Hz\n", + "f_t5= Ao5*f_b5 # in Hz\n", + "row5 = np.array([Ao5,f_b5,f_t5])\n", + "print \"-\"*33\n", + "print \"Ao fb(Hz) ft(Hz)\"\n", + "print \"-\"*33\n", + "print \"%.e %.e %.e\" %(row1[0], row1[1], row1[2])\n", + "print \"%.e %.f %.e\" %(row2[0], row5[1], row2[2])\n", + "print \"%.e %.e %.e\" %(row3[0], row3[1], row3[2])\n", + "print \"%.e %.e %.e\" %(row4[0], row4[1], row4[2])\n", + "print \"%.e %.f %.e\" %(row5[0], row5[1], row5[2])\n", + "# Answer for f_b2 is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "---------------------------------\n", + "Ao fb(Hz) ft(Hz)\n", + "---------------------------------\n", + "1e+05 1e+02 1e+07\n", + "1e+06 10 1e+06\n", + "1e+05 1e+03 1e+08\n", + "1e+07 1e-01 1e+06\n", + "2e+05 10 2e+06\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.27 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data\n", + "Ao= 86 # in dB\n", + "A= 40 # in dB\n", + "f=100 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# From 20*log(S) = 20*log(Ao/A), where S, stands for sqrt(1+(f/fb)**2)\n", + "S= 10**((Ao-A)/20) \n", + "# S= sqrt(1+(f/fb)**2)\n", + "fb= f/sqrt(S**2-1) # in Hz\n", + "Ao= 10**(Ao/20) \n", + "ft= Ao*fb # in Hz\n", + "print \"The value of Ao = %0.3e\" %Ao\n", + "print \"The value of fb = %0.f Hz\" %fb\n", + "print \"The value of ft = %0.f MHz\" %round(ft*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ao = 1.995e+04\n", + "The value of fb = 501 Hz\n", + "The value of ft = 10 MHz\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.28 - page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi, sqrt\n", + "# Given data\n", + "Ao= 10**4 # in V/V\n", + "f_t= 10**6 # in Hz\n", + "R2byR1= 20 \n", + "omega_t= 2*pi*f_t \n", + "omega_3dB= omega_t/(1+R2byR1) \n", + "f3dB= omega_3dB/(2*pi) # in Hz\n", + "print \"3-dB frequency of the closed loop amplifier is %0.1f kHz\" %(f3dB*10**-3)\n", + "f3dB= 0.1*f3dB # in Hz\n", + "voBYvi= -R2byR1/sqrt(1+(2*pi*f3dB/omega_3dB)**2) \n", + "voBYvi= abs(voBYvi) # in v/v\n", + "print \"Gain = %0.1f v/v\" %(voBYvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3-dB frequency of the closed loop amplifier is 47.6 kHz\n", + "Gain = 19.9 v/v\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter2.ipynb b/Electronic_Circuits_by_P._Raja/chapter2.ipynb new file mode 100755 index 00000000..3abf271f --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter2.ipynb @@ -0,0 +1,1179 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Metal oxide semiconductor field effect transistor(MOSFET)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.1 - page 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_S= 0 # As source is connected to ground\n", + "V_G= 1.5 # in V\n", + "V_D= 0.5 # in V\n", + "Vt= 0.7 # in V\n", + "# Part(a) V_D= 0.5 # in V\n", + "V_D= 0.5 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.5 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.5 , the device is in triode region\" \n", + "else:\n", + " print \"At V_D = 0.5 , the device is in saturation region\"\n", + "\n", + "# Part(b) V_D= 0.9 # in V\n", + "V_D= 0.9 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 0.9 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 0.9 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 0.9 , the device is in saturation region\" \n", + "\n", + "\n", + "# Part(c) V_D= 3 # in V\n", + "V_D= 3 # in V\n", + "V_DS= V_D-V_S # in V\n", + "V_GS= V_G-V_S # in V\n", + "if V_GS < Vt:\n", + " print \"At V_D = 3 , the device is in cut off region\"\n", + "elif V_DS<= (V_GS-Vt):\n", + " print \"At V_D = 3 , the device is in triode region\"\n", + "else:\n", + " print \"At V_D = 3 , the device is in saturation region\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_D = 0.5 , the device is in triode region\n", + "At V_D = 0.9 , the device is in saturation region\n", + "At V_D = 3 , the device is in saturation region\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.2 - page 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 1 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=10 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_GS= 1.5 # in V\n", + "Vt= 0.7 # in V\n", + "# For V_DS= 0.5 V\n", + "V_DS= 0.5 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. SO the drain current in the triode region = %0.f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-VT)**2\n", + " print \"The device is in saturation region. SO the drain current in the saturation region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "\n", + "# For V_DS= 0.9 V\n", + "V_DS= 0.9 # in V\n", + "if V_DS<= (V_GS-Vt):\n", + " I_D= unCox*W/L*((V_GS-Vt)*V_DS-V_DS**2/2)\n", + " print \"The device is in triode region. So the drain current in the triode region = %0.1f \u00b5A\" %(I_D*10**6)\n", + "else:\n", + " I_D= unCox*W/(2*L)*(V_GS-Vt)**2\n", + " print \"The device is in saturation region. So drain current in the saturation region = %0.f \u00b5A\" %(I_D*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The device is in triode region. SO the drain current in the triode region = 275 \u00b5A\n", + "The device is in saturation region. So drain current in the saturation region = 320 \u00b5A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.3 - page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vt= 0.7 # in V\n", + "ID = 100 # in \u00b5A\n", + "V_GS= 1.2 # in V\n", + "V_DS= 1.2 # in V\n", + "\n", + "# Let assume \u00b5n*Cox*W/(2*L) = K\n", + "# For triode region\n", + "if V_DS<= (V_GS-Vt):\n", + " #triode region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + " \n", + "else:\n", + " # saturation region\n", + " K = ID*10**-6/(V_GS-Vt)**2\n", + "\n", + "V_DS= 3 # inV\n", + "V_GS = 1.5 # in V\n", + "I_D= K*(V_GS-Vt)**2 # in A\n", + "I_D*=10**6 # in \u00b5A\n", + "print \"Value of ID = %0.1f \u00b5A\" %I_D\n", + "# Drain to source resistance\n", + "V_GS = 3.2 # in V\n", + "r_DS = 1/(2*K*(V_GS-Vt))\n", + "print \"Drain to source resistance, rDS = %0.1f ohm\" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of ID = 256.0 \u00b5A\n", + "Drain to source resistance, rDS = 500.0 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.4 - page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 0.7 # in V\n", + "V_SS= -2.5 # in V\n", + "V_DD= 2.5 # in V\n", + "unCox= 100 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "W= 32 # in m\n", + "L= 1 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "V_G= 0 \n", + "# Formula V_GS= V_G-V_S\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D# in \u03a9\n", + "print \"The value of R_S = %0.2f k\u03a9\" %(R_S*10**-3)\n", + "V_D= 0.5 # in V\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 1.2 Volt\n", + "The value of R_S = 3.25 k\u03a9\n", + "The value of R_D = 5.0 k\u03a9\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.5 - page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 3 # in V\n", + "I_D= 80 # in \u00b5A\n", + "I_D=I_D*10**-6 # in A\n", + "Vt= 0.6 # in V\n", + "unCox= 200 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=4 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "# V_GS-Vt= V_OV\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= 1 # in V\n", + "V_G= V_D # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 25 k\u03a9\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.6 - page 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 10 # in V\n", + "I_D= 0.4 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "Vt= 2 # in V\n", + "unCox= 20 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L= 10 #in \u00b5m\n", + "L= L*10**-6 # in m\n", + "W=100 # in \u00b5m\n", + "W=W*10**-6 # in m\n", + "V_S= 0 # in V as source is connected to ground\n", + "# I_D= unCox*W/(2*L)*(V_OV)**2\n", + "V_OV= sqrt(I_D/(unCox*W/(2*L))) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "V_D= V_GS # in V\n", + "R= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R = %0.2f k\u03a9\" %(R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 15.00 k\u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.7 - page 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA\n", + "KnWbyL=KnWbyL*10**-3 # in A\n", + "Vt= 1 # in V\n", + "V_DS= 0.1 # in V\n", + "V_D= V_DS # in V\n", + "V_GS= 5 # in V\n", + "V_DD= V_GS # in V\n", + "# Formula I_D= K'nW/L*[(V_GS-Vt)*V_DS-V_DS**2/2]\n", + "I_D= KnWbyL*((V_GS-Vt)*V_DS-V_DS**2/2) # in A\n", + "R_D= (V_DD-V_D)/I_D #in \u03a9\n", + "print \"The required value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required value of R_D = 12.4 k\u03a9\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.8 - page 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1 # in V\n", + "V_DD= 10 # in V\n", + "R_D= 6 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_G1= 10 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "R_G2= 10 # in M\u03a9\n", + "R_G2= R_G2*10**6 # in \u03a9\n", + "V_G= V_DD*R_G2/(R_G1+R_G2) # in V\n", + "# V_S= R_S*I_D\n", + "# V_GS= V_G-V_S= V_G-R_S*I_D\n", + "# Formula I_D= K'nW/2*L*(V_GS-Vt)**2, Putting the value of V_GS, We get\n", + "# 18*I_D**2 -25*I_D +8= 0\n", + "# I_D= 0.89 mA or I_D= 0.5\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_S= R_S*I_D # in V\n", + "V_GS= V_G-V_S # in V\n", + "V_D= V_DD-I_D*R_D # in V\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_S = %0.2f Volt\" %(V_S)\n", + "print \"The value of V_GS = %0.2f Volt\" %(V_GS)\n", + "print \"The value of V_D = %0.2f Volt\" %(V_D)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 0.50 mA\n", + "The value of V_S = 3.00 Volt\n", + "The value of V_GS = 2.00 Volt\n", + "The value of V_D = 7.00 Volt\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.9 - page 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "R_D= 20 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R1= 30 # in k\u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "R2= 20 # in k\u03a9\n", + "R2= R2*10**3 # in \u03a9\n", + "V_DD= 5 # in V\n", + "Vtn= 1 # in V\n", + "Kn= 0.1 # in mA/V**2\n", + "Kn=Kn*10**-3 # in A/V**2\n", + "V_GS= R2*V_DD/(R1+R2) # in V\n", + "# I_D= 1/2*\u00b5nCox*W/L*(V_GS-Vtm)**2 \n", + "I_D = Kn*(V_GS-Vtn)**2 # in mA (As Kn= 1/2*\u00b5nCox*W/L)\n", + "V_DS= V_DD-I_D*R_D # in V\n", + "print \"The value of V_GS = %0.f Volt\" %(V_GS)\n", + "print \"The value of I_D = %0.2f mA\" %(I_D*10**3)\n", + "print \"The value of V_DS = %0.f Volt\" %(V_DS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 2 Volt\n", + "The value of I_D = 0.10 mA\n", + "The value of V_DS = 3 Volt\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.10 - page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "Vt= 1 # in V\n", + "V_D= 10 # in V\n", + "V_S= 5 # in V\n", + "KnWbyL= 1 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "R_G1= 8 # in M\u03a9\n", + "R_G1= R_G1*10**6 # in \u03a9\n", + "I_D= 0.5 # in mA\n", + "I_D=I_D*10**-3 #in A\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "R_S= V_S/I_D # in \u03a9\n", + "# Formul I_D= 1/2*KnWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KnWbyL) # in V\n", + "# Formula V_OV= V_GS-Vt\n", + "V_GS= V_OV+Vt # in V\n", + "V_G= V_GS+V_S # in V\n", + "# Formul V_G= R_G2*V_DD/(R_G1+R_G2)\n", + "R_G2= R_G1*V_G/(V_DD-V_G) #in \u03a9\n", + "print \"The value of R_D = %0.1f k\u03a9\" %(R_D*10**-3)\n", + "print \"The value of R_S = %0.1f k\u03a9\" %(R_S*10**-3)\n", + "print \"The value of V_OV = %0.1f Volt\" %(V_OV)\n", + "print \"The value of V_GS = %0.1f Volt\" %V_GS\n", + "print \"The value of R_G2 = %0.1f M\u03a9\" %(R_G2*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 10.0 k\u03a9\n", + "The value of R_S = 10.0 k\u03a9\n", + "The value of V_OV = 1.0 Volt\n", + "The value of V_GS = 2.0 Volt\n", + "The value of R_G2 = 7.0 M\u03a9\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.11 - page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_DD= 15 # in V\n", + "KnWbyL= 0.25 # in mA/V**2\n", + "KnWbyL=KnWbyL*10**-3 # in A/V**2\n", + "Vt= 1.5 # in V\n", + "V_A= 50 # in V\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= 10 # in k\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "# I_D= 1/2*KnWbyL*(V_D-Vt)**2 , (V_GS= V_D, as dc gate current is zero) (i)\n", + "# V_D= V_DD- I_D*R_D (ii)\n", + "I_D= 1.06 # in mA\n", + "I_D = I_D*10**-3 # in A\n", + "V_D= V_DD- I_D*R_D # in V\n", + "V_GS=V_D # in V\n", + "# The coordinates of operating point \n", + "V_GSQ= V_D # in V\n", + "I_DQ= I_D*10**3 # in mA\n", + "print \"The coordinates of operating point(bias point) are V_GSQ =\",V_GSQ,\"V and I_DQ =\",I_DQ,\"mA\"\n", + "gm= KnWbyL*(V_GS-Vt) # in A/V\n", + "r_o= V_A/I_D #in \u03a9\n", + "# The gain is : Av= vo/vi = -gm*(R_D||R_L||r_o)\n", + "Av= -gm*(R_D*R_L*r_o/(R_D*R_L+R_D*r_o+R_L*r_o)) # in V/V\n", + "print \"VOltage gain is %0.1f V/V\" %Av\n", + "# i_i= (vi-vo)/R_G\n", + "# i_i= vi/R_G*(1-vo/vi) and Rin= vi/i_i = R_G/(1-Av)\n", + "Rin= R_G/(1-Av) # in \u03a9\n", + "print \"The input resistance = %0.2f M\u03a9\" %(Rin*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coordinates of operating point(bias point) are V_GSQ = 4.4 V and I_DQ = 1.06 mA\n", + "VOltage gain is -3.3 V/V\n", + "The input resistance = 2.34 M\u03a9\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.12 - page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.5 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "V_D= 3 # in V\n", + "Vt= -1 # in V\n", + "KpWbyL= 1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_OV)**2\n", + "V_OV= sqrt(2*I_D/KpWbyL) # in V\n", + "# For PMOS\n", + "V_OV= -V_OV # in V\n", + "V_GS= V_OV+Vt # in V\n", + "R_D= V_D/I_D # in \u03a9\n", + "V_Dmax= V_D+abs(Vt) # in V\n", + "R_D= V_Dmax/I_D # in \u03a9 \n", + "print \"\"\"The largest value that R_D can have\n", + "while maintaining saturation-region operation is %0.2f k\u03a9\"\"\" %(R_D*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The largest value that R_D can have\n", + "while maintaining saturation-region operation is 8.00 k\u03a9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.14 - page 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_GS1= 1.5 # in V\n", + "Vt= 1 # in V\n", + "r_DS1= 1 # in k\u03a9\n", + "r_DS1= r_DS1*10**3 # in \u03a9\n", + "r_DS2= 200 # in k\u03a9\n", + "# r_DS1= 1/(KnWbyL*(V_GS1-Vt)) (i)\n", + "# r_DS2= 1/(KnWbyL*(V_GS2-Vt)) (i)\n", + "# dividing equation (i) by (ii)\n", + "V_GS2= (r_DS1/r_DS2)*(V_GS1-Vt)+Vt # in V\n", + "print \"To Optain rDS= 200, The value of V_GS should be %0.2f Volt\" %V_GS2\n", + "# For V_GS= 1.5 # V\n", + "# W2= 2*W1 \n", + "# r_DS1/r_DS2= 2\n", + "r_DS2= r_DS1/2 # in \u03a9\n", + "print \"For V_GS= 1.5 V , the value of r_DS2 = %0.1f \u03a9 \" %r_DS2\n", + "# For V_GS= 3.5 V\n", + "r_DS2= 200/2 # in \u03a9\n", + "print \"For V_GS= 3.5 V , the value of r_DS2 = %0.1f \u03a9\" %r_DS2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To Optain rDS= 200, The value of V_GS should be 3.50 Volt\n", + "For V_GS= 1.5 V , the value of r_DS2 = 500.0 \u03a9 \n", + "For V_GS= 3.5 V , the value of r_DS2 = 100.0 \u03a9\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.15 page 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "I_D= 0.2 # in mA\n", + "I_D= I_D*10**-3 # in mA\n", + "Vt= 1 # in V\n", + "KpWbyL= 0.1 # in mA/V**2\n", + "KpWbyL=KpWbyL*10**-3 # in A/V**2\n", + "# Formul I_D= 1/2*KpWbyL*(V_GS-VT)**2\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin\n", + "# For I_D= 0.8 mA\n", + "I_D = 0.8*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/KpWbyL)+Vt # in V\n", + "V_DSmin= V_GS-Vt # in V\n", + "print \"Required V_GS = %0.1f Volt\" %V_GS\n", + "print \"The minimum required V_DS = %0.1f Volt\" %V_DSmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required V_GS = 3.0 Volt\n", + "The minimum required V_DS = 2.0 Volt\n", + "Required V_GS = 5.0 Volt\n", + "The minimum required V_DS = 4.0 Volt\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.16 - page 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_SS= -5 # in V\n", + "unCox= 60 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "Vt= 1 # in V\n", + "W= 100 # in \u00b5m\n", + "L= 3 # in \u00b5m\n", + "V_G=0 # in V\n", + "V_DD= 5 # in V\n", + "V_D=0 #in V\n", + "I_D= 1*10**-3 # in A\n", + "# I_D= (V_DD-V_D)/R_D\n", + "R_D= (V_DD-V_D)/I_D # in \u03a9\n", + "print \"The value of R_D = %0.f k\u03a9\" %(R_D*10**-3)\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D*L/(unCox*W))+Vt # in V\n", + "V_S= V_G-V_GS # in V\n", + "R_S= (V_S-V_SS)/I_D # in \u03a9\n", + "print \"The resistance = %0.f k\u03a9\" %(R_S*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_D = 5 k\u03a9\n", + "The resistance = 3 k\u03a9\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.17 - page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "V_D= 3.5 # in V\n", + "I_D= 115*10**-6 #in A\n", + "upCox= 60 # in \u00b5A/V**2\n", + "upCox= upCox*10**-6 # in A/V**2\n", + "L= 0.8 #in \u00b5m\n", + "V_GS= -1.5 # in V\n", + "Vt= 0.7 # in V\n", + "R= V_D/I_D # in \u03a9\n", + "print \"The value required for R = %0.1f k\u03a9\" %(R*10**-3)\n", + "# Formul I_D= 1/2*upCox*W/L*(V_GS-Vt)**2\n", + "W= 2*I_D*L/(upCox*(V_GS-Vt)**2)\n", + "print \"The value required for W = %0.1f \u00b5m\" %(W)\n", + "\n", + "# Note: Calculation of evaluating the value of W in the book is wrong , so the Answer of the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value required for R = 30.4 k\u03a9\n", + "The value required for W = 0.6 \u00b5m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.18 - page 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 1 # in V\n", + "unCox= 120 # in \u00b5A/V**2\n", + "unCox= unCox*10**-6 # in A/V**2\n", + "L1=1 # in \u00b5m\n", + "L2=L1 # in \u00b5m\n", + "I_D= 120 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_GS1= 1.5 #in V\n", + "V_G2= 3.5 # in V\n", + "V_S2= 1.5 # in V\n", + "V_DD= 5 # in V\n", + "V_D2= 3.5 # in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W1= 2*I_D*L1/(unCox*(V_GS1-Vt)**2) # in \u00b5m\n", + "print \"The value of W1 = %0.1f \u00b5m\" %W1\n", + "V_GS2= V_G2-V_S2 #in V\n", + "# Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)**2\n", + "W2= 2*I_D*L2/(unCox*(V_GS2-Vt)**2) # in \u00b5m\n", + "print \"The value of W2 = %0.1f \u00b5m\" %W2\n", + "R= (V_DD-V_D2)/I_D # in \u03a9\n", + "print \"Resistance = %0.1f k\u03a9\" %(R*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of W1 = 8.0 \u00b5m\n", + "The value of W2 = 2.0 \u00b5m\n", + "Resistance = 12.5 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.19 - page 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 2 # in V\n", + "K1WbyL= 1 # in mA/V**2\n", + "K1WbyL= K1WbyL*10**-3 #in mA/V**2\n", + "I_D= 10 #in \u00b5A\n", + "I_D= I_D*10**-6 #in A\n", + "V_DD= 10 # in V\n", + "R_D= 4 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V1= -V_GS # in V\n", + "# Part (b)\n", + "I_D= 2 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "V2= V_DD-I_D*R_D #in V\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V3= -V_GS # in V\n", + "# Part (c)\n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "# Formul I_D= 1/2*K1WbyL*(V_GS-Vt)**2\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V4= V_GS # in V\n", + "# Part (d)\n", + "I_D= 2 # in mA\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "V_SS= 10 # in V\n", + "I_D= I_D*10**-3 # in A\n", + "V_GS= sqrt(2*I_D/K1WbyL)+Vt # in V\n", + "V5= -V_SS+I_D*R_D # in V\n", + "print \"The value of V1 = %0.2f Volt\" %V1\n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "print \"The value of V3 = %0.f Volt\" %V3\n", + "print \"The value of V4 = %0.2f Volt\" %V4\n", + "print \"The value of V5 = %0.f Volt\" %V5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 = -2.14 Volt\n", + "The value of V2 = 2 Volt\n", + "The value of V3 = -4 Volt\n", + "The value of V4 = 3.41 Volt\n", + "The value of V5 = -5 Volt\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.20 - page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "unCox= 20*10**-6 #in A/V**2\n", + "upCox= unCox/2.5 # in A/V**2\n", + "V_DD= 3 #in V\n", + "Vt= 1 # in V\n", + "W= 30 # in \u00b5m\n", + "L= 10 # in \u00b5m\n", + "\n", + "# V_GS1= V_GS2\n", + "# Formula V_DD= V_GS1+V_GS2\n", + "V_GS1= V_DD/2 #in V\n", + "V_GS2= V_GS1 # in V\n", + "V2= V_GS1 # inV\n", + "I1= 1/2*unCox*W/L*(V_GS1-Vt)**2 # in A\n", + "# Both transistor have V_D = V_G and therefore they are operating in saturation \n", + "#1/2*unCox*W/L*(V4-Vt)**2 = 1/2*upCox*W/L*(V_DD-V4-Vt)\n", + "V4= (V_DD-Vt+sqrt(unCox/upCox))/(1+sqrt(unCox/upCox)) \n", + "I3= 1/2*unCox*W/L*(1.39-Vt)**2 \n", + "print \"The value of V2 = %0.1f Volt\" %V2\n", + "print \"The value of I1 = %0.1f \u00b5A\" %(I1*10**6,)\n", + "print \"The value of V4 = %0.1f Volt \" %V4\n", + "print \"The value of I3 = %0.1f \u00b5A\" %(I3*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V2 = 1.5 Volt\n", + "The value of I1 = 7.5 \u00b5A\n", + "The value of V4 = 1.4 Volt \n", + "The value of I3 = 4.6 \u00b5A\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.22 - page 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Given data \n", + "Vt= 0.9 # in V\n", + "V_A= 50 # in V\n", + "V_D= 2 # in V\n", + "R_L= 10 # in M\u03a9\n", + "R_L= R_L*10**3 # in \u03a9\n", + "R_G= 10 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "I_D= 500 # in \u00b5A\n", + "I_D= I_D*10**-6 # in A\n", + "V_GS= V_D # in V\n", + "ro= V_A/I_D # in \u03a9\n", + "gm= 2*I_D/(V_GS-Vt) # in A/V\n", + "# vo= -gm*vi*(ro || R_L)\n", + "vo_by_vi = -gm*(ro*R_L/(ro+R_L)) # in V/V\n", + "print \"The voltage gain = %0.1f V/V\" %(vo_by_vi )\n", + "# For I= 1 mA or twice the current \n", + "I_D1= I_D # in A\n", + "I_D2= 2*I_D1 # in A\n", + "gm1= gm # in A/V\n", + "# Effect on V_D\n", + "# I_D1/I_D2 = (V_GS1-Vt)**2/(V_GS2-Vt)**2\n", + "V_GS1= V_GS \n", + "V_GS2= Vt+sqrt(2)*(V_GS1-Vt) # in V\n", + "print \"The new value of V_GS = %0.1f Volt\" %(V_GS2)\n", + "# Effect on gm\n", + "# gm1/gm2= sqrt(I_D1/I_D2)\n", + "gm2= sqrt(I_D2/I_D1)*gm1 # in A/V\n", + "print \"The new value of gm2 = %0.1f mA/V\" %(gm2*10**3)\n", + "# Effect on ro\n", + "# ro1/ro2= I_D2/I_D1\n", + "ro1= ro # in \u03a9\n", + "ro2= I_D1*ro1/I_D2 # in \u03a9\n", + "print \"The new value of ro = %0.1f k\u03a9/V\" %(ro2*10**-3)\n", + "# Effect on gain\n", + "# Av= -gm*(ro2 || R_L)\n", + "Av= -gm*(ro2*R_L/(ro2+R_L)) # in V/V\n", + "print \"The new value of voltage gain = %0.1f V/V\" %(Av)\n", + "#Answer wrong in the textbook because of calculation accuracy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -8.3 V/V\n", + "The new value of V_GS = 2.5 Volt\n", + "The new value of gm2 = 1.3 mA/V\n", + "The new value of ro = 50.0 k\u03a9/V\n", + "The new value of voltage gain = -7.6 V/V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.23 - page 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "I_D= 1 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "f_L= 10 # in Hz\n", + "R_S= 6 # in k\u03a9\n", + "R_S= R_S*10**3 # in \u03a9\n", + "R_D= 10 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "vo_by_vi= -gm*R_D/(1+gm*R_S) # in V/V\n", + "print \"Mid band gain = %0.2f V/V \" %(vo_by_vi)\n", + "# Formula f_L= 1/(2*pi*(1/gm || R_S)) * CS\n", + "CS= 1/(2*pi*(1/gm*R_S/(1/gm+R_S))*f_L) #in F\n", + "print \"The value of Cs = %0.2f \u00b5F\" %(CS*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mid band gain = -1.43 V/V \n", + "The value of Cs = 18.57 \u00b5F\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.24 - page 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data \n", + "Rsig= 100 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_G= 4.7 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "R_D= 15 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_L= R_D # in \u03a9\n", + "gm= 1 #in mA/V\n", + "gm= gm*10**-3 #in A/V\n", + "ro=150 # in k\u03a9\n", + "ro=ro*10**3 # in \u03a9\n", + "Cgs= 1 # in pF\n", + "Cgs=Cgs*10**-12 #in F\n", + "Cgd= 0.4 # in pF\n", + "Cgd=Cgd*10**-12 #in F\n", + "vgsBYvsig= R_G/(Rsig+R_G) \n", + "Rdesh_L= R_D*R_L/(R_D+R_L) # in \u03a9\n", + "voBYvgs= -gm*Rdesh_L \n", + "Av= voBYvgs/vgsBYvsig # in V/V\n", + "print \"The Mid-band gain = %0.2f V/V\" %(Av)\n", + "CM= Cgd*(1+gm*Rdesh_L) # in F\n", + "# f_H= 1/(2*pi*(Rsig || R_G)*(Cgs*CM))\n", + "f_H= 1/(2*pi*(Rsig * R_G/(Rsig + R_G))*(Cgs+CM)) # in Hz\n", + "print \"Frequency = %0.1f kHz\" %(f_H*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Mid-band gain = -7.66 V/V\n", + "Frequency = 369.4 kHz\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter3.ipynb b/Electronic_Circuits_by_P._Raja/chapter3.ipynb new file mode 100755 index 00000000..832762c4 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter3.ipynb @@ -0,0 +1,1818 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3 - Bipolar Junction Transistors(BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.1 - page 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= -0.7 # in V\n", + "Bita=50 \n", + "RC= 5 # in k\u03a9\n", + "RE= 10 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_E-V_BE)/RE # in A\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "# I_E= I_B+I_C and I_C= Bita*I_B, so\n", + "I_B= I_E/(1+Bita) # in A\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "I_C= I_E-I_B #in A\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.2f Volt\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitter current = 0.93 mA\n", + "Base current = 18.2 \u00b5A\n", + "Collector current = 0.91 mA\n", + "The value of V_C = 5.44 Volt\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.2 - page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_E= 1.7 # in V\n", + "V_B= 1 # in V\n", + "RC= 5 # in k\u03a9\n", + "RE= 5 # in k\u03a9\n", + "RE= RE*10**3 # in \u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "RB= 100 #in k\u03a9\\\n", + "RB= RB*10**3 # in \u03a9\n", + "V_CC= 10 # in V\n", + "V_BE= -10 # in volt\n", + "I_E= (V_CC-V_E)/RE # in A\n", + "I_B= V_B/RB # in V\n", + "# Formula I_B= (1-alpha)*I_E\n", + "alpha= 1-I_B/I_E \n", + "print \"Value of alpha = %0.3f \" %(alpha)\n", + "beta= alpha/(1-alpha) \n", + "print \"Value of beta = %.01f \" %beta\n", + "V_C= (I_E-I_B)*RC-V_CC # in volt\n", + "print \"Collector voltage = %0.2f Volt\" %V_C\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of alpha = 0.994 \n", + "Value of beta = 165.0 \n", + "Collector voltage = -1.75 Volt\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.3 - page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division# Given data \n", + "from numpy import log\n", + "# Given data\n", + "V_CC= 10 # in V\n", + "V_CE= 3.2 # in V\n", + "RC= 6.8 # in k\u03a9\n", + "RC= RC*10**3 # in \u03a9\n", + "I_S= 1*10**-15 # in A\n", + "V_T= 25*10**-3 # in V\n", + "I_C1= (V_CC-V_CE)/RC # in A\n", + "print \"Part(a) : \"\n", + "# Formula I_C= I_S*%e**(V_BE1/V_T)\n", + "V_BE1= V_T*log(I_C1/I_S) # in volt\n", + "print \"Collector current = %0.1f mA\" %(I_C1*10**3)\n", + "print \"Value of V_BE = %0.1f Volt\" %(V_BE1)\n", + "\n", + "print \"Part(b) : \"\n", + "v_in= 5*10**-3 # in V\n", + "Av= -(V_CC-V_CE)/V_T # in V/V\n", + "print \"Voltage gain = %0.1f V/V\" %(Av)\n", + "v_o= abs(Av )*v_in # in V\n", + "print \"Change in output voltage = %0.2f Volt\" %v_o\n", + "\n", + "print \"Part(c) : \"\n", + "#for V_CE= 0.3 V\n", + "V_CE= 0.3 # in V\n", + "I_C2= (V_CC-V_CE)/RC # in A\n", + "# I_C1= I_S*%e**(V_BE1/V_T) (i)\n", + "# I_C2= I_S*%e**(V_BE2/V_T) (ii)\n", + "# divide the equation (ii) by (i)\n", + "delta_V_BE= V_T*log(I_C2/I_C1) # in volt ( where delta_V_BE = V_BE2-V_BE1 )\n", + "print \"The positive increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3)\n", + "\n", + "print \"Part(d) : \"\n", + "v_o= 0.99*V_CC # in V\n", + "I_C3= (V_CC-v_o)/RC # in A\n", + "delta_V_BE= V_T*log(I_C3/I_C1) # in V\n", + "print \"The negative increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) : \n", + "Collector current = 1.0 mA\n", + "Value of V_BE = 0.7 Volt\n", + "Part(b) : \n", + "Voltage gain = -272.0 V/V\n", + "Change in output voltage = 1.36 Volt\n", + "Part(c) : \n", + "The positive increament in V_BE = 8.9 mV\n", + "Part(d) : \n", + "The negative increament in V_BE = -105.5 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.4 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_CE= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "I_C= 5*10**-3 # in mA\n", + "bita= 100 \n", + "R_C= (V_CC-V_CE)/I_C # in \u03a9\n", + "I_B= I_C/bita # in A\n", + "R_B= (V_CC-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_C = %0.1f k\u03a9\" %(R_C*10**-3)\n", + "print \"The value of I_B = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of R_B = %.01f k\u03a9\" %(R_B*10**-3)\n", + "\n", + "# Note: The value of base current in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_C = 1.0 k\u03a9\n", + "The value of I_B = 50.0 \u00b5A\n", + "The value of R_B = 186.0 k\u03a9\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.5 - page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import *\n", + "from __future__ import division\n", + "from numpy import *\n", + "# Given data \n", + "V_CC= 6 # in V\n", + "bita= 100 \n", + "R_C= 2 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 530 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "# when I_C=0\n", + "I_C=0 \n", + "V_CE= V_CC-I_C*R_C # in volt\n", + "V_CE= arange(0,7,0.1) # in Volt\n", + "# defining function to get the collector current\n", + "def current(V):\n", + " it = nditer([V, None])\n", + " for v_ce,i in it:\n", + " i[...] = (V_CC-v_ce)/R_C*1000 \n", + " return it.operands[1]\n", + "I_C=current(V_CE) # in mA\n", + "x=arange(-1,4,0.1)\n", + "y=arange(-0.5,1.02,0.1)\n", + "plot(V_CE,I_C) \n", + "plot(4*(y/y),y,'--')\n", + "plot(x,1*(x/x),'--')\n", + "text(4,1.02,'Operating Point')\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "# Setting axes\n", + "axes = gca()\n", + "axes.set_xlim([0,6])\n", + "axes.set_ylim([0,3])\n", + "show()\n", + "print \"DC load line shown in figure\"\n", + "# When V_CE= 0\n", + "I_C= V_CC/R_C #in A\n", + "# Operating point for silicon transistor \n", + "V_BE= 0.7 # in V\n", + "I_B= (V_CC-V_BE)/R_B #in A\n", + "I_CQ= bita*I_B # in A\n", + "V_CEQ= V_CC-I_CQ*R_C # in volt\n", + "print \"Operating point is \",V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, +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ny5wI3pfrLdrRl/M/CgpJeBS4Bb0z0QoML2g2bV8n4EZmYtzqeGzMxanE8NWdOS\ndDDJ5ZnF3o6Ij9SiHrN65VNDZmYtzqeGzMxanDsCM7MW547AzKzFuSMwM2tx7gjMzFrc/wcnnOmI\nlsbj/QAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n", + "Operating point is 4.0 V and 1.0 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.6 - page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 12 # in V\n", + "V_BE= 0.7 # in V\n", + "bita= 100 \n", + "R_C= 10 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "R_B= 100 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B) # in A\n", + "I_CQ= bita*I_BQ # in A\n", + "V_CEQ= V_CC-(I_CQ+I_BQ)*R_C # in volt\n", + "# For dc load line\n", + "# When\n", + "I_C=0 \n", + "V_CE= V_CC-(I_C+I_BQ)*R_C # in volt\n", + "# When\n", + "V_CE= 0 \n", + "I_C= (V_CC-I_BQ*R_C)/R_C #in A\n", + "print \"Q- point values for circuit is\",round(V_CEQ,2),\"V and\",round(I_CQ*10**3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q- point values for circuit is 1.72 V and 1.0 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.7 - page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 15 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CE= 5 # in V\n", + "I_C= 5 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "print \"Base current = %0.f \u00b5A\" %(I_B*10**6)\n", + "#Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE\n", + "R_C= (V_CC-V_CE)/(I_C+I_B) # in \u03a9\n", + "print \"The value of R_C = %0.2f k\u03a9\" %(R_C*10**-3)\n", + "#Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B\n", + "R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B # in ohm\n", + "print \"The value of R_B = %0.f k\u03a9 \" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base current = 50 \u00b5A\n", + "The value of R_C = 1.98 k\u03a9\n", + "The value of R_B = 86 k\u03a9 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.8 - page 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_BE= 0.7 # in V\n", + "V_CE= 3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "bita= 100 \n", + "I_B= I_C/bita # in A\n", + "# V_CE= V_BE+V_CB and V_CB= I_B*R_B\n", + "R_B= (V_CE-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_B = 230 k\u03a9\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.9 - page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "# Exa 3.9\n", + "from numpy import *\n", + "from matplotlib.pyplot import *\n", + "# Given data \n", + "R1= 10;# in k\u03a9\n", + "R1=R1*10**3;# in \u03a9\n", + "R2= 5;# in k\u03a9\n", + "R2=R2*10**3;# in \u03a9\n", + "RC= 1;# in k\u03a9\n", + "RC=RC*10**3;# in \u03a9\n", + "RE= 2;# in k\u03a9\n", + "RE=RE*10**3;# in \u03a9\n", + "V_CC= 15;# in V\n", + "V_BE= 0.7;# in V\n", + "# When\n", + "I_C=0;\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "# When V_CE= 0\n", + "I_C= V_CC/(RC+RE);# in A\n", + "V_B= V_CC*R2/(R1+R2);# in V\n", + "I_E= (V_B-V_BE)/RE;# in A\n", + "I_C= I_E;# in A (approx)\n", + "I_CQ= I_C;# in A\n", + "V_CE= V_CC-I_C*(RC+RE);# in V\n", + "V_CEQ= V_CE;# in V\n", + "#############\n", + "V_CE= arange(0,16,0.1);# in Volt\n", + "def current(v):\n", + " it = nditer([v, None])\n", + " for x,y in it:\n", + " y[...]= (V_CC-x)/(RC+RE)*1000\n", + " return it.operands[1]\n", + "I_C = current(V_CE)\n", + "\n", + "#I_C= (V_CC-V_CE)/(RC+RE)*1000;# in mA\n", + "plot(V_CE,I_C);\n", + "title(\"DC load line\")\n", + "xlabel(\"V_CE in volts\")\n", + "ylabel(\"I_C in mA\")\n", + "text(8.55,2.15,'Q(8.55V,2.15mA)')\n", + "x1=arange(0,8.55,0.01)\n", + "y1=arange(0,2.15,0.01)\n", + "a=arange(0,8.55,0.01)\n", + "yd=2.15*(a/a)\n", + "plot(a,yd,'b--')\n", + "b=arange(-1,2.15,0.005)\n", + "xd=8.55*(b/b)\n", + "plot(xd,b,'b--')\n", + "show()\n", + "disp(\"DC load line shown in figure\")\n", + "print 'Operating point is ',V_CEQ,\" V and \",I_CQ*10**3,\" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAA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53qGywuXd/Xat/Jb7RKCFVFnmdnLZtYoHDUsMbN3zezyVOIVSZWSgeSssK/APIJVLiEYJUyp4S3d\ngLdreP1HVcpEHZOdNuH5YcDEsJPUv4DTqsS3EXjHzErCTUOAF9x9B8HaRleFXb2WUHlZZHf3uwl6\nJZS4+wkEvTIOcPfu7t6DoLuVSNooGUiuKy8VQVAimlzL/jWNAGa7e6+Ex8e1HOvjhCYnbxMsb1zV\nlDAuwjinhB3dmocdqiDoPnZcLef6iGDhsQlmdiJBtzWRtFEykFz3N+AEM+sF7Bk28KnOUuDINJ77\nfxOe7yD5HNyzwCAz24+gN8MrSfaptUTl7v8iWMW1DLiAoH2pSNooGUhOCzvLzSIom9TWGesx4Fgz\nKy8rYWbHmVm3DMc3H5gAPOuBjcCXZtYv3G0kwYd8VZuBfcI4WwKN3f2vwG+JZ9MfyWG6mkjywWSC\nrk5n1rSTu38TtgAdb2bjCZraLyZoYfl9wjmDhLfcEH74VjpMNc+T/VxuCkHbwZKEbaOASWErxY+A\nqmvlQ9Aj4QUz+xT4JfCgmZV/gYtdO1DJbepnICIiKhOJiIjKRJKHzKw7waWbib5x92OiiEckF6hM\nJCIiKhOJiIiSgYiIoGQgIiIoGYiICEoGIiIC/B9eQEZhSVTJsAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating point is 8.55 V and 2.15 mA\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.10 page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_CC= 10 # in V\n", + "V_BB= 3 # in V\n", + "V_BE= 0.7 # in V\n", + "V_T= 25*10**-3 # in V\n", + "bita=100 \n", + "RC= 3 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "RB= 100 # in k\u03a9\n", + "RB=RB*10**3 # in \u03a9\n", + "I_B= (V_BB-V_BE)/RB # in V\n", + "I_C= bita*I_B # in A\n", + "V_C= V_CC-I_C*RC # in V\n", + "gm= I_C/V_T # in A/V\n", + "r_pi= bita/gm # in \u03a9\n", + "# v_be= r_pi/(RB+r_pi)*v_i\n", + "v_be_by_v_i= r_pi/(RB+r_pi) \n", + "# v_o= -gm*v_be*RC\n", + "v_o_by_v_i= -gm*v_be_by_v_i*RC # in V/V\n", + "Av= v_o_by_v_i # in V/V\n", + "print \"Voltage gain = %0.2f V/V \" % (round(Av))\n", + "# Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -3.00 V/V \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.11 - page 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 4 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "V_E= V_B-V_BE # in V\n", + "R_E= 3.3 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "RC= 4.7 # in k\u03a9\n", + "RC=RC*10**3 # in \u03a9\n", + "I_E= V_E/R_E # in A\n", + "bita=100 \n", + "alpha= bita/(1+bita) \n", + "I_C= alpha*I_E #in A\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "V_C= V_CC-I_C*RC # in V\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "I_B= I_E/(1+bita) # in A\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C = 0.99 mA\n", + "The value of V_C = 5.3 Volts\n", + "The value of I_B = 0.01 mA\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.12 - page 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "V_B= 5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_CC= 10 # in V\n", + "bita=100 \n", + "R_B= 100 # in k\u03a9\n", + "R_C= 2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_B= (V_B-V_BE)/R_B # in A\n", + "I_C= bita*I_B #in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "I_E= I_C # in A (approx)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_C = %0.1f mA \" %(I_C*10**3)\n", + "print \"The value of V_C = %0.1f Volts\" %(V_C)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B = 0.043 mA\n", + "The value of I_C = 4.3 mA \n", + "The value of V_C = 1.4 Volts\n", + "The value of I_E = 4.3 mA\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.13 - page 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import *\n", + "V_B = symbols('V_B')\n", + "# Given data \n", + "V_EB= 0.7 # in V\n", + "V_E = 0.7 # in V\n", + "bita=100 \n", + "V_EC= 0.2 # in V\n", + "V_E= V_EB+V_B # in V\n", + "V_CC= 5 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_E= V_B+V_EB # (i)\n", + "V_C= V_E-V_EC # (ii)\n", + "I_E= (V_CC-V_E)/(R_E)*1000 # mA (iii)\n", + "I_B= V_B/R_B # (iv)\n", + "I_C= (V_C+V_CC)/R_C # (v)\n", + "# By using relationship, I_E= I_B+I_C\n", + "expr = I_E*1000-(I_B*1000+I_C*1000)\n", + "V_B = solve(expr,V_B)\n", + "V_B= (9*V_CC-11*V_EB+V_EC)/12 # in V\n", + "V_E= V_B+V_EB # in V\n", + "V_C= V_B+V_EB-V_EC # in V\n", + "I_E= (V_CC-V_E)/R_E# in amp\n", + "I_C= (V_B+V_EB-V_EC+V_CC)/R_B # in amp\n", + "I_B= V_B/R_B # in amp\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 3.12 Volts\n", + "The value of V_E = 3.83 Volts\n", + "The value of V_C = 3.62 Volts\n", + "The value of I_E = 1.17 mA\n", + "The value of I_C = 0.86 mA\n", + "The value of I_B = 0.31 mA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.14 - page 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "bita=100 \n", + "hFE= 100 \n", + "VCEsat= 0.2 # in V\n", + "VBEsat= 0.8 # in V\n", + "VBEactive= 0.7 # in V\n", + "VBB= 5 # in V\n", + "VCC= 10 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 50 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "# Formula VCC= ICsat*R_C+VCEsat\n", + "ICsat= (VCC-VCEsat)/R_C #A\n", + "print \"The value of IC(sat) = %0.2f mA\" %(ICsat*10**3)\n", + "IBmin= ICsat/bita # in A\n", + "# Apply KVL to input circuit, VBB= IB*R_B+VBEsat\n", + "IB= (VBB-VBEsat)/R_B # in A\n", + "print \"Actual base current = %0.f \u00b5A\" %(IB*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of IC(sat) = 3.27 mA\n", + "Actual base current = 84 \u00b5A\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.16 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# beta= alpha/(1-alpha)\n", + "# At alpha= 0.5\n", + "alpha= 0.5 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.5, the value of beta = %0.f \" %beta\n", + "# At alpha= 0.9\n", + "alpha= 0.9 \n", + "beta = alpha/(1-alpha) \n", + "print \"At alpha=0.9, the value of beta is %0.f \" %beta\n", + "# At alpha= 0.5\n", + "alpha= 0.999 \n", + "beta= alpha/(1-alpha) \n", + "print \"At alpha=0.999, the value of beta is %0.f \" %beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At alpha=0.5, the value of beta = 1 \n", + "At alpha=0.9, the value of beta is 9 \n", + "At alpha=0.999, the value of beta is 999 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.17 - page 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "# alpha= beta/(1-beta)\n", + "# At beta= 1\n", + "beta=1 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=1, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 2\n", + "beta=2 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=2, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 100\n", + "beta=100 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=100, the value of alpha is %0.2f \" %alpha\n", + "# At beta= 200\n", + "beta=200 \n", + "alpha= beta/(1+beta) \n", + "print \"At beta=200, the value of alpha is %0.3f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At beta=1, the value of alpha is 0.50 \n", + "At beta=2, the value of alpha is 0.67 \n", + "At beta=100, the value of alpha is 0.99 \n", + "At beta=200, the value of alpha is 0.995 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.18 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp, log\n", + "# Given data \n", + "VBE= 0.76 # in V\n", + "VT= 0.025 # in V\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "# Part(a) for VBE = 0.7 V\n", + "VBE= 0.7 # in V\n", + "I_C= I_S*exp(VBE/VT)\n", + "print \"For VBE = 0.7 V , The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "\n", + "# Part (b) for I_C= 10 \u00b5A\n", + "I_C= 10*10**-6 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "VBE= VT*log(I_C/I_S) \n", + "print \"For I_C = 10 \u00b5A, The value of VBE = %0.3f V\" %VBE" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_S = 6.273e-16 A\n", + "For VBE = 0.7 V , The value of I_C = 0.907 mA\n", + "For I_C = 10 \u00b5A, The value of VBE = 0.587 V\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.19 - page 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VT= 0.025 # in V\n", + "I_B= 100 # in \u00b5A\n", + "I_B=I_B*10**-6 # in A\n", + "I_C= 10*10**-3 # in A\n", + "# Formula I_C= I_S*exp(VBE/VT)\n", + "I_S= I_C/(exp(VBE/VT)) # in A\n", + "alpha= I_C/(I_C+I_B) \n", + "beta= I_C/I_B \n", + "IS_by_alpha= I_S/alpha # in A\n", + "IS_by_beta= I_S/beta # in A\n", + "print \"The value of alpha is %0.2f \" %alpha\n", + "print \"The value of beta is %0.2f \" %beta \n", + "print \"The value of Is/alpha = %0.2e A\" %IS_by_alpha\n", + "print \"The value of Is/beta = %0.2e A\" %IS_by_beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha is 0.99 \n", + "The value of beta is 100.00 \n", + "The value of Is/alpha = 6.98e-15 A\n", + "The value of Is/beta = 6.91e-17 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.20 - page 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 10.7 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I1= (VCC-VBE)/R_C # in A\n", + "print \"The value of I1 = %0.f mA\" %(I1*10**3)\n", + "# Part (b)\n", + "VC= -4 #in V\n", + "VB= -10 # in V\n", + "R_C= 5.6 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.4 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC=12 # V\n", + "I_C= (VC-VB)/R_B # in A\n", + "V2= VCC- (R_C*I_C) \n", + "print \"The value of V2 = %0.f Volt\" %V2\n", + "# Part (c)\n", + "VCC= 0 \n", + "VCE= -10 # in V\n", + "R_C= 10 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "I_C= (VCC-VCE)/R_C # in A\n", + "V4= 1 # in V\n", + "I3= I_C # in A (approx)\n", + "print \"The value of V4 = %0.f Volt\" %V4\n", + "print \"The value of I3 = %0.f mA\" %(I3*10**3)\n", + "# Part (d)\n", + "VBE= -10 # in V\n", + "VCC= 10 # in V\n", + "R_B= 5 #in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "R_C= 15 #in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "# I5= I_C and \n", + "# I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C\n", + "V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B) \n", + "print \"The value of V6 = %0.3f Volt\" %(V6)\n", + "I5= (V6-0.7-VBE)/R_B # in A\n", + "print \"The value of I5 = %0.3f mA\" %(I5*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1 = 1 mA\n", + "The value of V2 = -2 Volt\n", + "The value of V4 = 1 Volt\n", + "The value of I3 = 1 mA\n", + "The value of V6 = -4.475 Volt\n", + "The value of I5 = 0.965 mA\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.21 -page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "V_C= 2 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 200 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_C= V_C/R_C # in A\n", + "I_B= V_B/R_B # in A\n", + "beta= I_C/I_B \n", + "print \"Part (a)\"\n", + "print \"Collector current = %0.f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of beta is %0.f \"%beta\n", + "\n", + "# Part (b)\n", + "V_C= 2.3 # in V\n", + "R_C= 230 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 4.3 # in V\n", + "R_B= 20 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I= V_C/R_C # current through 230\u03a9 resistro i.e. I_C + I_B in A\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "I_C= I-I_B # in A\n", + "bita= abs(I_C/I_B) \n", + "print \"Part (b)\"\n", + "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n", + "print \"Base current = %0.2f mA\" %(I_B*10**3)\n", + "print \"The value of beta is %0.2f \"%beta\n", + "\n", + "# Part (c)\n", + "V_E= 10 # in V\n", + "R_E= 1 # in k\u03a9\n", + "R_E=R_E*10**3 # in \u03a9\n", + "V_1= 7 # in V\n", + "R_C= 1 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "V_B= 6.3 # in V\n", + "R_B= 100 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_E= (V_E-V_1)/R_C #in A\n", + "I_C=I_E # in A (approx)\n", + "V_C= I_C*R_C # in V\n", + "I_B= (V_B-V_C)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "print \"Part (c)\"\n", + "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n", + "print \"Base current = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"Collector voltage = %0.2f Volts\" %(V_C)\n", + "print \"The value of beta is %0.2f \"%(beta)\n", + "\n", + "# Note : In the book the value of base current in the first part is wrong due to calculation error.\n", + "#In the part (b) the values of collector current and beta are wrong due to calculation error in the first line of part (b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Collector current = 2 mA\n", + "Base current = 21.5 \u00b5A\n", + "The value of beta is 93 \n", + "Part (b)\n", + "Collector current = -0.09 mA\n", + "Base current = 0.10 mA\n", + "The value of beta is 93.02 \n", + "Part (c)\n", + "Emitter current = 3.00 mA\n", + "Base current = 33.00 \u00b5A\n", + "Collector voltage = 3.00 Volts\n", + "The value of beta is 89.91 \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.22 - page 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "# Part (a)\n", + "beta= 30 \n", + "R_C= 2.2 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 2.2 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 3 # in V\n", + "VCE= -3 # in V\n", + "VBE= 0.7 # in V\n", + "V_B= 0 # in V\n", + "V_E= V_B-VBE # in V\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "I_C= I_E # in A\n", + "V_C= VCC-I_E*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (a)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of V_C = %0.3f V\" %(V_C)\n", + "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)\n", + "# Part (b)\n", + "R_C= 560 # in \u03a9\n", + "R_B= 1.1 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "VCC= 9 # in V\n", + "VCE= 3 # in V\n", + "V_B= 3 # in V\n", + "V_E= V_B+VBE # in V\n", + "I_E= (VCC-V_E)/R_B # in A\n", + "alpha= beta/(1+beta) \n", + "I_C= I_E*alpha # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "print \"Part (b)\"\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of I_E = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.2f V\" %(V_C)\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -0.70 V\n", + "The value of I_E = 1.05 mA\n", + "The value of V_C = 0.700 V\n", + "The value of I_B = 0.03 mA\n", + "Part (b)\n", + "The value of V_B = 3.00 V \n", + "The value of V_E = 3.70 V\n", + "The value of I_E = 4.66 mA\n", + "The value of V_C = 2.61 V\n", + "The value of I_B = 0.155 mA\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.23 - page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Given data \n", + "VBE= 0.7 # in V\n", + "VCC= 9 # in V\n", + "VCE= -9 # in V\n", + "V_B= -1.5 # in V\n", + "R_C= 10 # in k\u03a9\n", + "R_C=R_C*10**3 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "R_B=R_B*10**3 # in \u03a9\n", + "I_B= abs(V_B)/R_B # in A\n", + "V_E= V_B-VBE # in V\n", + "print \"The value of V_E = %0.2f Volt\" %V_E\n", + "I_E= (V_E-VCE)/R_B # in A\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "print \"The value of alpha = %0.2f Volt\" %alpha\n", + "print \"The value of beta = %0.2f Volt\" %beta\n", + "V_C= VCC-I_E*alpha*R_C # in V\n", + "print \"The value of V_C = %0.2f Volt\" %V_C\n", + "beta = inf\n", + "alpha= beta/(1+beta)\n", + "I_B= 0 \n", + "V_B=0 \n", + "V_C= VCC-I_E*R_C # in volt\n", + "print \"The value of V_B = %0.2f V \" %V_B\n", + "print \"The value of V_E = %0.2f V\" %V_E\n", + "print \"The value of V_C = %0.2f V\" %(V_C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_E = -2.20 Volt\n", + "The value of alpha = 0.78 Volt\n", + "The value of beta = 3.53 Volt\n", + "The value of V_C = 3.70 Volt\n", + "The value of V_B = 0.00 V \n", + "The value of V_E = -2.20 V\n", + "The value of V_C = 2.20 V\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.24 - page 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "VBE_1= 0.7 # in V\n", + "VBE_2= 0.5 # in V\n", + "V_T= 0.025 # in V\n", + "I_C1= 10 # in mV\n", + "I_C1= I_C1*10**-3 # in A\n", + "# I_C1= I_S*%e**(VBE_1/V_T) (i)\n", + "# I_C2= I_S*%e**(VBE_2/V_T) (ii)\n", + "# Devide equation (ii) by (i)\n", + "I_C2= I_C1*exp((VBE_2-VBE_1)/V_T) # in A\n", + "print \"The value of I_C2 = %0.2f \u00b5A\" %(I_C2*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C2 = 3.35 \u00b5A\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.25 - page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "R1= 10 # in k\u03a9\n", + "R1=R1*10**3 # in \u03a9\n", + "R2= 10 # in k\u03a9\n", + "R2=R2*10**3 # in \u03a9\n", + "I_C=.5 # mA\n", + "V_T= 0.025 #in V\n", + "I_C= I_C*10**-3 # in A\n", + "V= 10 # in V\n", + "Vth= V*R1/(R1+R2) # in V\n", + "Rth= R1*R2/(R1+R2) #in \u03a9\n", + "vo= I_C*Rth # in V\n", + "vi=V_T # in V\n", + "vo_by_vi= vo/vi #in V/V\n", + "print \"The value of vo/vi = %0.f V/V \" %vo_by_vi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vo/vi = 100 V/V \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.27 - page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 2 # in V\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E= 1*10**3 # in \u03a9\n", + "R_C= 1*10**3 # in \u03a9\n", + "V_E= V_B-V_BE # in V\n", + "I_E= V_E/R_E # in A\n", + "I_C= I_E # in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"At V_B= +2 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Part (b)\n", + "V_B= 0 #in V\n", + "V_E= 0 # in V\n", + "I_E= 0 # in A\n", + "V_C= 5 # in V\n", + "print \"At V_B= 0 V\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At V_B= +2 V\n", + "The value of V_E = 1.30 Volts\n", + "The value of V_C = 3.70 Volts\n", + "At V_B= 0 V\n", + "The value of V_E = 0.00 Volts\n", + "The value of V_C = 5.00 Volts\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.28 - page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_B= 0 # in V\n", + "R_E=1*10**3 #in \u03a9\n", + "R_C=1*10**3 #in \u03a9\n", + "V_CC=5 # in V\n", + "V_BE= 0.7 # in V\n", + "V_E= V_B-V_BE # in V\n", + "I_E= (1+V_E)/R_E # in A\n", + "I_C= I_E # (approx) in A\n", + "V_C= V_CC-I_C*R_C #in V\n", + "print \"Part (a)\"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "# For saturation \n", + "V_CE=0.2 # V\n", + "V_CB= -0.5 # in V\n", + "# I_C= 5-V_C/R_C and V_C= V_E-VCE, So\n", + "# I_C= (5.2-V_E)/R_C\n", + "# I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,\n", + "V_E= 4.2/2 #/ in V\n", + "V_B= V_E+0.7 # in V\n", + "V_C= V_E+0.2 # in V\n", + "print \"Part (b) \"\n", + "print \"The value of V_E = %0.2f Volts\" %V_E\n", + "print \"The value of V_B = %0.2f Volts\" %V_B\n", + "print \"The value of V_C = %0.2f Volts\" %V_C\n", + "\n", + "# Note: In the book , there is a miss print in the last line of this question \n", + "#because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_E = -0.70 Volts\n", + "The value of V_C = 4.70 Volts\n", + "Part (b) \n", + "The value of V_E = 2.10 Volts\n", + "The value of V_B = 2.80 Volts\n", + "The value of V_C = 2.30 Volts\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.29 - page 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CC=5 # in V\n", + "V_E= 1 # in V\n", + "V_BE= 0.7 # in V\n", + "R_E=5*10**3 #in \u03a9\n", + "R_C=5*10**3 #in \u03a9\n", + "R_B= 20*10**3 # in \u03a9\n", + "I_E= (V_CC-V_E)/R_E # in A\n", + "# For pnp transistor V_BE= V_E-V_B\n", + "V_B= V_E-V_BE # in V\n", + "I_B= V_B/R_B # in A\n", + "I_C= I_E-I_B # in A\n", + "V_C= I_C*R_C-V_CC # in V\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "print \"The value of V_B = %0.1f Volts\" %V_B\n", + "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n", + "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of V_C = %0.3f Volts\" %V_C \n", + "print \"The value of beta is %0.1f \"%beta \n", + "print \"The value of alpha is %0.2f \"%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_B = 0.3 Volts\n", + "The value of I_B = 0.015 mA\n", + "The value of I_E = 0.8 mA\n", + "The value of I_C = 0.785 mA\n", + "The value of V_C = -1.075 Volts\n", + "The value of beta is 52.3 \n", + "The value of alpha is 0.98 \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.30 - page 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC=5 # in V\n", + "V_T= 0.025 # in V\n", + "R_C=7.5*10**3 #in \u03a9\n", + "I_C= 0.5 # in mA\n", + "I_C= I_C*10**-3 # in A\n", + "I_E=I_C # (approx) in A\n", + "V_C= V_CC-I_C*R_C # in V\n", + "print \"dc voltage at the collector = %0.2f Volt\" %V_C\n", + "gm= I_C/V_T # in A/V\n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "# v_be= -v_i\n", + "# v_c= -gm*v_be*R_C\n", + "vcbyvi= gm*R_C # in V/V\n", + "print \"The value of vc/vi = %0.f V/V\" %(vcbyvi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc voltage at the collector = 1.25 Volt\n", + "The value of gm = 20 mA/V\n", + "The value of vc/vi = 150 V/V\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.31 - page 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "I_E= 0.5 # in mA\n", + "I_E= I_E*10**-3 # in mA\n", + "Rsig= 50 # in \u03a9\n", + "R_C= 5*10**3 # in \u03a9\n", + "re= V_T/I_E # in ohm\n", + "Rin= Rsig+re # in ohm\n", + "print \"Input resistance = %0.f \u03a9\" %Rin\n", + "# Part(b)\n", + "# vo= -0.99*ie*R_C and ie= -v_sig/Rin\n", + "vo_by_v_sig= 0.99*R_C/Rin # in V/V\n", + "print \"The value of vo/vsig = %0.1f V/V\" %(vo_by_v_sig)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistance = 100 \u03a9\n", + "The value of vo/vsig = 49.5 V/V\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.32 - page 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "beta= 200 \n", + "alpha= beta/(1+beta) \n", + "R_C= 100 # in \u03a9\n", + "R_B= 10 # in k\u03a9\n", + "Rsig= 1 # in k\u03a9\n", + "Rsig= Rsig*10**3 # in \u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_T= 25*10**-3 \n", + "V=1.5 # in V\n", + "I_E= 10 # in mA\n", + "I_E= I_E*10**-3 # in A\n", + "I_C= alpha*I_E # in A\n", + "V_C= I_C*R_C # in V\n", + "I_B= I_C/beta # in A\n", + "V_B= V-(R_B*I_B)\n", + "gm= I_C/V_T # in A/V\n", + "rpi= beta/gm # in \u03a9\n", + "Rib= rpi # in \u03a9\n", + "print \"The value of Rib = %0.2f \u03a9 \" %Rib\n", + "Rin= R_B*rpi/(R_B+rpi) # in \u03a9\n", + "print \"The value of Rin = %0.2f \u03a9\" %Rin\n", + "# vbe= v_sig*Rin/(Rsig+Rin) \n", + "vbe_by_vsig= Rin/(Rsig+Rin) \n", + "# vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)\n", + "vo_by_vsig= -gm*R_C*vbe_by_vsig # in V/V\n", + "print \"Overall voltage gain = %0.2f V/V\" %vo_by_vsig\n", + "# if \n", + "vo= 0.4 #(\u00b1) in V\n", + "vs= vo/abs(vo_by_vsig) # in V\n", + "vbe= vbe_by_vsig*vs # in V\n", + "print \"The value of v_sig = %0.2f mV\" %(vs*10**3)\n", + "print \"The value of v_be = %0.2f mV\" %(vbe*10**3)\n", + "\n", + "# Note: There is some difference between in this coding and book solution. But Coding is correct." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rib = 502.50 \u03a9 \n", + "The value of Rin = 478.46 \u03a9\n", + "Overall voltage gain = -12.88 V/V\n", + "The value of v_sig = 31.06 mV\n", + "The value of v_be = 10.05 mV\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.33 - page 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T= 0.025 # in V\n", + "# Part(a)\n", + "print \"Part (a) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_B= 50 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.1f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(b)\n", + "print \"Part (b) : \"\n", + "V_BE= 690 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 1 # in mA\n", + "I_C=I_C*10**-3 # in A\n", + "I_E= 1.070 # in mA\n", + "I_E=I_E*10**-3 # in A\n", + "beta= I_C/I_B \n", + "alpha= I_C/I_E \n", + "beta= alpha/(1-alpha) \n", + "I_B= I_C/beta # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_B = %0.2f \u00b5A\" %(I_B*10**6)\n", + "print \"The value of I_S = %0.2e A\" %I_S\n", + "\n", + "# Part(c)\n", + "print \"Part (C) : \"\n", + "V_BE= 580 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 0.137 # in mA\n", + "I_B= 7 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S\n", + "\n", + "# Part(d)\n", + "print \"Part (d) : \"\n", + "V_BE= 780 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_C= 10.10 # in mA\n", + "I_B= 120 # in \u00b5A\n", + "I_C=I_C*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "beta= I_C/I_B \n", + "alpha= beta/(1+beta) \n", + "I_E= I_C/alpha # in A\n", + "# I_C= I_S*%e**(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.4f \"%alpha\n", + "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n", + "print \"The value of I_S = %0.4e A\" %I_S\n", + "\n", + "# Part(e)\n", + "print \"Part (e) : \"\n", + "V_BE= 820 # in mV\n", + "V_BE=V_BE*10**-3 # in V\n", + "I_E= 75 # in mA\n", + "I_B= 1050 # in \u00b5A\n", + "I_E=I_E*10**-3 # in A\n", + "I_B=I_B*10**-6 # in A\n", + "# I_C= alpha*I_E = bita*I_B\n", + "beta= I_E/I_B-1 \n", + "alpha= beta/(1+beta) \n", + "I_C= beta*I_B # in A\n", + "# I_C= I_S*exp(V_BE/V_T)\n", + "I_S= I_C/(exp(V_BE/V_T)) \n", + "print \"The value of beta is %0.3f \" %beta\n", + "print \"The value of alpha is %0.3f \"%alpha\n", + "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n", + "print \"The value of I_S = %0.3e A\" %I_S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : \n", + "The value of beta is 20.0 \n", + "The value of alpha is 0.9524 \n", + "The value of I_E = 1.05 mA\n", + "The value of I_S = 1.03e-15 A\n", + "Part (b) : \n", + "The value of beta is 14.286 \n", + "The value of alpha is 0.9346 \n", + "The value of I_B = 70.00 \u00b5A\n", + "The value of I_S = 1.03e-15 A\n", + "Part (C) : \n", + "The value of beta is 18.571 \n", + "The value of alpha is 0.9489 \n", + "The value of I_C = 0.130 mA\n", + "The value of I_S = 1.092e-14 A\n", + "Part (d) : \n", + "The value of beta is 84.167 \n", + "The value of alpha is 0.9883 \n", + "The value of I_E = 10.22 mA\n", + "The value of I_S = 2.8466e-16 A\n", + "Part (e) : \n", + "The value of beta is 70.429 \n", + "The value of alpha is 0.986 \n", + "The value of I_C = 73.95 mA\n", + "The value of I_S = 4.208e-16 A\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter4.ipynb b/Electronic_Circuits_by_P._Raja/chapter4.ipynb new file mode 100755 index 00000000..bdffc74f --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter4.ipynb @@ -0,0 +1,923 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Differential amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.1 - page 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= -10 # in volt\n", + "I= 1 # in mA\n", + "I=I*10**-3 # in A\n", + "R_C= 10 # in kohm\n", + "R_C=R_C*10**3 # in kohm\n", + "V_BE=0.7 # in volt\n", + "\n", + "i_C1= I/2 # in A\n", + "i_C2= i_C1 # in A\n", + "print \"Value of i_C1 = %0.2f mA\" %(i_C1*10**3)\n", + "\n", + "V_C1= V_CC-i_C1*R_C # in V\n", + "# For V_cm=0 volt\n", + "V_E= -0.7 # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =0, The value of V_CE1 = %0.2f Volt\" %(V_CE1)\n", + "\n", + "# For V_cm= -5 volt\n", + "V_cm= -5 # in V\n", + "V_B= V_cm # in V\n", + "# From V_BE= V_B-V_E\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =-5V, The value of V_CE1 = %0.2f Volt\" %V_CE1\n", + "\n", + "# For V_cm= 5 volt\n", + "V_cm= 5 # in V\n", + "V_B= V_cm # in V\n", + "V_E= V_B-V_BE # in volt\n", + "V_CE1= V_C1-V_E # in volt\n", + "print \"For V_cm =5V, The value of V_CE1 = %0.2f Volt\" %V_CE1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of i_C1 = 0.50 mA\n", + "For V_cm =0, The value of V_CE1 = 5.70 Volt\n", + "For V_cm =-5V, The value of V_CE1 = 10.70 Volt\n", + "For V_cm =5V, The value of V_CE1 = 0.70 Volt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.2 - page 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Given data\n", + "V_DD= 1.5 # in V\n", + "V_SS= V_DD # in V\n", + "KnWL= 4 # in mA/V**2\n", + "KnWL=KnWL*10**-3 # in A/V**2\n", + "Vt= 0.5 # in V\n", + "I=0.4 # in mA\n", + "I=I*10**-3 #in A\n", + "R_D= 2.5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "\n", + "# Part (a)\n", + "print \"Part (a)\"\n", + "V_OV= sqrt(I/KnWL) # in V\n", + "V_GS= V_OV+Vt # in V\n", + "print \"Value of V_OV = %0.2f Volt\" %V_OV\n", + "print \"Value of V_GS = %0.2f Volt\" %V_GS\n", + "\n", + "# Part (b)\n", + "print \"Part (b)\"\n", + "V_CM= 0 # in volt\n", + "V_S= -V_GS # in volt\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "I=0.4 # in mw\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c)\"\n", + "V_CM=1 # in V\n", + "V_GS= 0.82 # in V\n", + "V_G= 1 # in V\n", + "V_S= V_G-V_GS # in V\n", + "print \"Value of V_S = %0.2f Volt\" %V_S\n", + "i_D1= I/2 # in mA\n", + "print \"Value of i_D1 = %0.2f mA\" %i_D1\n", + "i_D1=i_D1*10**-3 # in A\n", + "V_D1= V_DD-i_D1*R_D # in V\n", + "V_D2=V_D1 # in V\n", + "print \"Value of V_D1 = %0.2f Volt\" %V_D1\n", + "print \"Value of V_D2 = %0.2f Volt\" %V_D2\n", + "\n", + "# Part (d)\n", + "print \"Part (d)\"\n", + "V_CM_max= Vt+V_DD-i_D1*R_D\n", + "print \"Highest value of V_CM = %0.2f Volt\" %V_CM_max\n", + "\n", + "# Part (e)\n", + "V_S= 0.4 # in V\n", + "print \"Part (e)\"\n", + "V_CM_min= -V_SS+V_S+Vt+V_OV # in V\n", + "print \"Lowest value of V_CM = %0.2f Volt \" %V_CM_min\n", + "V_Smin= V_CM_min-V_GS # in volt\n", + "print \"Lowest value of V_S = %0.2f Volt\" %V_Smin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Value of V_OV = 0.32 Volt\n", + "Value of V_GS = 0.82 Volt\n", + "Part (b)\n", + "Value of V_S = -0.82 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (c)\n", + "Value of V_S = 0.18 Volt\n", + "Value of i_D1 = 0.20 mA\n", + "Value of V_D1 = 1.00 Volt\n", + "Value of V_D2 = 1.00 Volt\n", + "Part (d)\n", + "Highest value of V_CM = 1.50 Volt\n", + "Part (e)\n", + "Lowest value of V_CM = -0.28 Volt \n", + "Lowest value of V_S = -1.10 Volt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.3 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I= 0.4 # in mA\n", + "unCox= 0.2 # in mA/V**2\n", + "i_D= I/2 # in mA\n", + "V_OV1= 0.2 # in V\n", + "V_OV2= 0.3 # in V\n", + "V_OV3= 0.4 # in V\n", + "WbyL1= 2*i_D/(unCox*V_OV1**2) \n", + "gm1= I/V_OV1 # in mA/V\n", + "WbyL2= 2*i_D/(unCox*V_OV2**2) \n", + "gm2= I/V_OV2 # in mA/V\n", + "WbyL3= 2*i_D/(unCox*V_OV3**2) \n", + "gm3= I/V_OV3 # in mA/V\n", + "print \"Vov (in V) \",V_OV1,\" \",V_OV2,\" \",V_OV3\n", + "print \"W/L \",WbyL1,\" \",round(WbyL2,1),\" \",WbyL3\n", + "print \"gm(in mA/V) \",gm1,\" \",round(gm2,2),\" \",gm3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vov (in V) 0.2 0.3 0.4\n", + "W/L 50.0 22.2 12.5\n", + "gm(in mA/V) 2.0 1.33 1.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.4 - page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "gm= I/V_OV # in A/V \n", + "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n", + "r_o= V_A/i_D # in \u03a9\n", + "print \"The value of r_o = %0.f k\u03a9\" %(r_o*10**-3)\n", + "# Ad= v_o/v_id = gm*(R_D || r_o)\n", + "Ad= gm*(R_D*r_o/(R_D+r_o)) # in V/V\n", + "print \"Differential gain = %0.1f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 Volts\n", + "The value of gm = 4 mA/V\n", + "The value of r_o = 50 k\u03a9\n", + "Differential gain = 18.2 V/V \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.5 - page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import log10\n", + "# Given data\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "\n", + "# Part (a)\n", + "Ad= 1/2*gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %(Ad)\n", + "Acm= -R_D/(2*R_SS) # in V/V\n", + "print \"Common mode gain = %0.1f V/V\" %Acm\n", + "CMRR= abs(Ad)/abs(Acm) \n", + "CMRRindB= round(20*log10(CMRR)) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (b)\n", + "print \"Part (b) when output is taken differentially\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "Acm= 0 \n", + "print \"Common mode gain = %0.1f V/V \"%Acm\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"Common mode rejection ratio = %0.f dB\" %CMRRindB\n", + "\n", + "\n", + "# Part (c)\n", + "print \"Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\"\n", + "Ad= gm*R_D # in V/V\n", + "print \"Differential gain = %0.f V/V\" %Ad\n", + "# delta_R_D= 1% of R_D\n", + "delta_R_D= R_D*1/100 # in \u03a9 \n", + "Acm= R_D/(2*R_SS)*delta_R_D/R_D # in V/V\n", + "print \"Common mode gain = %0.3f V/V\" %Acm\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) # in dB\n", + "print \"Common mode rejection ratio = %0.1f dB\" %CMRRindB\n", + "\n", + "# Note: In the book, there is putting wrong value of Ad (20 at place of 10)\n", + "#to evaluate the value of CMRR in dB in part(c) , So the answer of CMRR in dB of Part (c) is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential gain = 5 V/V\n", + "Common mode gain = -0.1 V/V\n", + "Common mode rejection ratio = 34 dB\n", + "Part (b) when output is taken differentially\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.0 V/V \n", + "Common mode rejection ratio = inf dB\n", + "Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.\n", + "Differential gain = 10 V/V\n", + "Common mode gain = 0.001 V/V\n", + "Common mode rejection ratio = 80.0 dB\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.6 - page 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data (From Exa 4.4)\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "R_SS= 25 # in k\u03a9\n", + "R_SS= R_SS*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "gm= i_D/V_OV # in A/V \n", + "# gm mismatch have a negligible effect on Ad\n", + "Ad= gm*R_D # in V/V(approx) \n", + "# delta_gm= 1% of gm\n", + "delta_gm = gm*1/100 # in A/V\n", + "Acm= R_D/(2*R_SS)*delta_gm/gm \n", + "CMRRindB= 20*log10(Ad/Acm) \n", + "print \"CMRR is %0.f dB\"%CMRRindB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CMRR is 80 dB\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.7 - page 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_CM= 0 \n", + "V_BE= -0.7 # in volt\n", + "v_E= V_CM-V_BE # in volt\n", + "print \"Value of v_E = %0.1f Volts\" %v_E\n", + "\n", + "I_E= (5-0.7)/10**3 # in A\n", + "v_B1= 0.5 # in V\n", + "v_B2= 0 # in V\n", + "# Due to Q1 is off therefore\n", + "v_C1= -5 # in V\n", + "v_C2= I_E*10**3-5 # in V\n", + "print \"Value of v_C1 = %0.1f Volts\" %v_C1\n", + "print \"Value of v_C2 = %0.1f Volts\" %v_C2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of v_E = 0.7 Volts\n", + "Value of v_C1 = -5.0 Volts\n", + "Value of v_C2 = -0.7 Volts\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.8 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "iE1_by_I= 0.99 # as it is given that iE1= 0.99 *I\n", + "VT= 0.025 # in volt\n", + "# Formula iE1= I/(1+%e**(-vid/VT))\n", + "# %e**(-vid/VT)= 1/iE1_by_I-1\n", + "vid= log( 1/iE1_by_I-1)*(-VT) # in volt\n", + "print \"Input differential signal = %0.1f mV\" %round(vid*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input differential signal = 115.0 mV\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.9 - page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Beta= 100 \n", + "\n", + "# Part (a)\n", + "RE= 150 # in \u03a9\n", + "VT= 25 # in mV\n", + "VT= VT*10**-3 # in V\n", + "IE= 0.5 # in mA\n", + "IE=IE*10**-3 # in A\n", + "re1= VT/IE #in \u03a9\n", + "R_id= 2*(Beta+1)*(re1+RE) # in \u03a9\n", + "R_id= round(R_id*10**-3) # in k\u03a9\n", + "print \"(a) The input differential resistance = %0.1f k\u03a9\" %R_id\n", + "\n", + "# Part (b)\n", + "RC=10 #in k\u03a9\n", + "RC=RC*10**3 #in \u03a9\n", + "Rsig= 5+5 # in k\u03a9\n", + "VoltageGain1= R_id/(Rsig+R_id) #voltage gain from the signal source to the base of Q1 and Q2 in V/V\n", + "VoltageGain2= 2*RC/(2*(re1+RE)) # voltage gain from the bases to the output in V/V\n", + "Ad= VoltageGain1*VoltageGain2 #in V/V\n", + "print \"(b) The overall differential voltage gain = %0.1f V/V\" %Ad\n", + "\n", + "# Part (c)\n", + "delta_RC= 0.02*RC \n", + "R_EE= 200 #in k\u03a9\n", + "R_EE=R_EE*10**3 #in \u03a9\n", + "Acm= RC/(2*R_EE)*delta_RC/RC #in V/V\n", + "print \"(c) Common mode gain = %0.e V/V\" %Acm\n", + "\n", + "# Part (d)\n", + "CMRRindB= 20*log10(Ad/Acm) # in dB\n", + "print \"(d) CMRR = %.f dB\" %CMRRindB\n", + "\n", + "# Part (e)\n", + "V_A= 100 # in V\n", + "r_o= V_A/(IE) # in \u03a9\n", + "# Ricm= (Beta+1)*(R_EE || r_o/2)\n", + "Ricm= (Beta+1)*(R_EE*(r_o/2)/(R_EE+(r_o/2))) \n", + "print \"(e) Input common mode resistance = %0.1f M\u03a9\" %(Ricm*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The input differential resistance = 40.0 k\u03a9\n", + "(b) The overall differential voltage gain = 40.0 V/V\n", + "(c) Common mode gain = 5e-04 V/V\n", + "(d) CMRR = 98 dB\n", + "(e) Input common mode resistance = 6.7 M\u03a9\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.10 - page 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "delta_RDbyRD= 2/100 \n", + "delta_WLbyWL= 2/100 \n", + "delta_Vt= 2 #in mV\n", + "delta_Vt= delta_Vt*10**-3 # in V\n", + "#(From Exa 4.4)\n", + "V_A= 20 # in V\n", + "R_D= 5 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "I= 0.8 # in mA\n", + "I=I*10**-3 # in A\n", + "i_D= I/2 # in A\n", + "unCox= 0.2 # mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "WbyL= 100 \n", + "# Formula i_D= 1/2*unCox*WbyL*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WbyL)) # in V\n", + "V_OS1= V_OV/2*delta_RDbyRD # in V\n", + "\n", + "# V_OS due to W/L ratio\n", + "V_OS2= V_OV/2*delta_WLbyWL # in V\n", + "\n", + "# V_OS due to threshold voltage\n", + "V_OS3= delta_Vt # in V\n", + "# Total offset voltage\n", + "V_OS= sqrt(V_OS1**2+V_OS2**2+V_OS3**2) # in V\n", + "V_OS= V_OS*10**3 # in mV\n", + "print \"Total offset voltage = %0.1f mV\" %V_OS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total offset voltage = 3.5 mV\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.11 - page 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "WLn= 100 \n", + "WLp= 200 \n", + "unCox= 0.2 # mA/V**2\n", + "unCox=unCox*10**-3 #in A/V**2\n", + "RSS= 25 # in k\u03a9\n", + "RSS= RSS*10**3 # in \u03a9\n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 20 # in V\n", + "i_D= I/2 # in A\n", + "# Formula i_D= 1/2*unCox*WLn*V_OV**2\n", + "V_OV= sqrt(2*i_D/(unCox*WLn)) # in V\n", + "gm= I/V_OV # in A/V\n", + "print \"Value of Gm = %0.1f mA/V\" %(gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"Value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "# Finding the value of gm3\n", + "upCox= 0.1 # mA/V**2\n", + "upCox=upCox*10**-3 #in A/V**2\n", + "# Formula i_D= 1/2*upCox*WLp*V_OV**2\n", + "V_OV= sqrt(2*i_D/(upCox*WLp)) # in V\n", + "gm3= I/V_OV # in A/V\n", + "Acm= 1/(2*gm3*RSS) #in V/V\n", + "print \"Value of |Acm| = %0.3f V/V\" %(abs(Acm))\n", + "CMRRindB= 20*log10(abs(Ad)/abs(Acm)) #in dB\n", + "print \"CMRR = %0.f dB\" %(round(CMRRindB))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = 4.0 mA/V\n", + "Value of Ro = 25.0 k\u03a9\n", + "Value of Ad = 100.0 V/V\n", + "Value of |Acm| = 0.005 V/V\n", + "CMRR = 86 dB\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.12 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.8 # in mA\n", + "I=I*10**-3 #in A\n", + "V_A= 100 # in V\n", + "Beta=160 \n", + "VT=25 # in mV\n", + "VT= VT*10**-3 #in V\n", + "gm= (I/2)/VT # in A/V\n", + "Gm= gm # Short circuit trnsconductance in mA/V\n", + "print \"The value of Gm = %0.1f mA/V\" %(Gm*10**3)\n", + "ro2= V_A/(I/2) # in ohm\n", + "ro4= ro2 # in ohm\n", + "Ro= ro2*ro4/(ro2+ro4) # in ohm\n", + "print \"The value of Ro = %0.1f k\u03a9\" %(Ro*10**-3)\n", + "Ad= Gm*Ro # in V/V\n", + "print \"Value of Ad = %0.1f V/V\" %Ad\n", + "r_pi= Beta/gm #in \u03a9\n", + "Rid= 2*r_pi # in \u03a9\n", + "print \"The value of Rid = %0.1f k\u03a9\" %(Rid*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Gm = 16.0 mA/V\n", + "The value of Ro = 125.0 k\u03a9\n", + "Value of Ad = 2000.0 V/V\n", + "The value of Rid = 20.0 k\u03a9\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.13 - page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "Vtp= -0.8 # in V\n", + "KpWL= 3.5 # in mA/V**2\n", + "I=0.7 # in mA\n", + "I=I*10**-3 # in A\n", + "R_D= 2 # in k\u03a9\n", + "R_D=R_D*10**3 # in \u03a9\n", + "KpWL=KpWL*10**-3 #in A/V**2\n", + "v_G1= 0 # in V\n", + "v_G2=v_G1 # in V\n", + "VSS= 2.5 # in V\n", + "VDD=VSS # in V\n", + "VCS= 0.5 # in V\n", + "print \"Part (a)\"\n", + "V_OV= -sqrt(I/KpWL) # in V\n", + "print \"The value of V_OV = %0.2f Volts\" %V_OV\n", + "V_GS= V_OV+Vtp # in V\n", + "print \"The value of V_GS = %0.2f Volts\" %V_GS\n", + "V_G= 0 # as gate is connected ground\n", + "v_S1= V_G-V_GS # in V\n", + "v_S2= v_S1 # in V\n", + "print \"The value of v_S1 = %0.2f Volts\" %v_S1\n", + "v_D1= I/2*R_D-VDD # in V\n", + "v_D2=v_D1 # in V\n", + "print \"The value of v_D1 = %0.1f Volts\" %v_D1\n", + "print \"The value of v_D2 = %0.1f Volts\" %v_D2\n", + "\n", + "print \"Part (b)\"\n", + "V_CMmin= I*R_D/2-VDD+Vtp # in V\n", + "V_CMmax= VSS-VCS+Vtp+V_OV # in V\n", + "print \"The value of V_CMmin = %0.1f Volts\" %V_CMmin\n", + "print \"The value of V_CMmax = %0.2f Volts\" %V_CMmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "The value of V_OV = -0.45 Volts\n", + "The value of V_GS = -1.25 Volts\n", + "The value of v_S1 = 1.25 Volts\n", + "The value of v_D1 = -1.8 Volts\n", + "The value of v_D2 = -1.8 Volts\n", + "Part (b)\n", + "The value of V_CMmin = -2.6 Volts\n", + "The value of V_CMmax = 0.75 Volts\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.14 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "V_OV= 0.2 # in V\n", + "gm=1 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "Vt=0.8 # in V\n", + "unCox= 90 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "# gm= I/V_OV\n", + "I= gm*V_OV # in A\n", + "print \"Bias current = %0.1f mA\" %(I*10**3)\n", + "I_D= I/2 # in A\n", + "# Formula I_D= 1/2*unCox*WLn*V_OV**2\n", + "WbyL= 2*I_D/(unCox*V_OV**2) \n", + "print \"W/L ratio is %0.1f \"%WbyL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bias current = 0.2 mA\n", + "W/L ratio is 55.6 \n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.15 - page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=0.5 # in mA\n", + "I=I*10**-3 # in A\n", + "WbyL= 50 \n", + "unCox= 250 # in \u00b5A/V**2\n", + "unCox=unCox*10**-6 # in A/V**2\n", + "V_A= 10 # in V\n", + "R_D= 4 #in k\u03a9\n", + "R_D= R_D*10**3 #in \u03a9\n", + "V_OV= sqrt(I/(WbyL*unCox)) #in V\n", + "print \"The value of V_OV = %0.2f V \" %V_OV\n", + "gm= I/V_OV # in A/V\n", + "print \"The value of gm = %0.2f mA/V\" %(gm*10**3)\n", + "I_D=I/2 # in A\n", + "ro= V_A/I_D # in \u03a9\n", + "print \"The value of ro = %0.2f k\u03a9\" %(ro*10**-3)\n", + "Ad= gm*(R_D*ro/(R_D+ro)) # in V/V\n", + "print \"The value of Ad = %0.2f V/V \" %Ad" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OV = 0.20 V \n", + "The value of gm = 2.50 mA/V\n", + "The value of ro = 40.00 k\u03a9\n", + "The value of Ad = 9.09 V/V \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 4.16 - page 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "I=1 # in mA\n", + "I=I*10**-3 # in A\n", + "i_C=1 # in mA\n", + "i_C=i_C*10**-3 # in A\n", + "V_CC= 5 # in V\n", + "V_CM= -2 # in V\n", + "V_BE= 0.7 # in V\n", + "R_C= 3 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "Alpha=1 \n", + "Beta=100 \n", + "V_B= 1 # in V\n", + "i_C1= Alpha*I # in A\n", + "i_C2=0 # A\n", + "v_E= V_B-V_BE # in V\n", + "print \"Emitters voltage = %0.2f Volt\" %v_E,\n", + "v_C1= V_CC-i_C1*R_C # in V\n", + "v_C2= V_CC-i_C2*R_C # in V\n", + "print \"Output voltage is\",v_C1,\"V &\",v_C2,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitters voltage = 0.30 Volt Output voltage is 2.0 V & 5 V\n" + ] + } + ], + "prompt_number": 52 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter5.ipynb b/Electronic_Circuits_by_P._Raja/chapter5.ipynb new file mode 100755 index 00000000..ce987715 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter5.ipynb @@ -0,0 +1,909 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter5 - Feedback amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.1 - page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "A= 800 # unit less\n", + "Af= 50 # unit less\n", + "# Formula Af= A/(1+Bita*A)\n", + "Beta= 1/Af-1/A \n", + "print \"Percentage of output which is feedback to the input = %0.3f %%\" %(Beta*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of output which is feedback to the input = 1.875 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.2 - page 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Af= 100 # unit less\n", + "Vi= 50 # in mV\n", + "Vi= Vi*10**-3 # in V\n", + "Vs= 0.5 # in V\n", + "# Formula Af= Vo/Vs\n", + "Vo= Af*Vs # in V\n", + "A= Vo/Vi \n", + "print \"Value of A is %0.f \"%A\n", + "# Formula Af= A/(1+B*A)\n", + "B= 1/Af-1/A \n", + "B=B*100 # in %\n", + "print \"Value of B is %0.1f %%\" %B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of A is 1000 \n", + "Value of B is 0.9 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.3 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Beta= 5/100 \n", + "f_H= 50 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "f_L= 50 # in kHz\n", + "Amid= 1000 \n", + "f_LF= f_L/(1+Beta*Amid) # in Hz\n", + "f_HF= f_H*(1+Beta*Amid) # in Hz\n", + "print \"Value of f_LF = %0.2f Hz\" %f_LF\n", + "print \"Value of f_HF = %0.2f MHz\" %(f_HF*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of f_LF = 0.98 Hz\n", + "Value of f_HF = 2.55 MHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.4 - page 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "dAf_by_Af= 0.2/100 \n", + "dA_by_A= 150/2000 \n", + "A=2000 \n", + "# Formula dAf_by_Af = 1/(1+Bita*A) * dA_by_A\n", + "Beta= dA_by_A/(A*dAf_by_Af )-1/A \n", + "Af= A/(1+Beta*A) \n", + "print \"Value of Beta = %0.3f %%\" %(Beta*100)\n", + "print \"Value of Af is %0.2f \" %Af" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Beta = 1.825 %\n", + "Value of Af is 53.33 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.5 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 140 \n", + "Avf= 17.5 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"Fraction of the output is %0.2f \"%Beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of the output is 0.05 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.6 - page 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 100 \n", + "Avf= 50 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "print \"The vlaue of beta is %0.2f\" %Beta\n", + "\n", + "# Part(ii)\n", + "Avf= 75 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Av= Avf/(1-Beta*Avf)\n", + "print \"Value of amplifier gain is %0.f \"%Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vlaue of beta is 0.01\n", + "Value of amplifier gain is 300 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.7 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= 50 \n", + "Avf= 25 \n", + "# Formula Avf= Av/(1+Av*Beta)\n", + "Beta= 1/Avf-1/Av \n", + "# Part(i)\n", + "Av=50 \n", + "Avf= 40 \n", + "Perc_reduction= (Av-Avf)/Av*100 # Percentage of reduction in stage gain in %\n", + "print \"Without feedback, percentage of reduction in stage gain = %0.f %%\" %(Perc_reduction)\n", + "\n", + "# Part(ii)\n", + "Av= 40 \n", + "Avf= 25 \n", + "gain_with_neg_feed= Av/(1+Beta*Av) \n", + "Perc_reduction= (Avf-gain_with_neg_feed)/Avf*100 # in %\n", + "print \"With feedback, percentage reduction in stage gain = %0.1f %%\" %Perc_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Without feedback, percentage of reduction in stage gain = 20 %\n", + "With feedback, percentage reduction in stage gain = 11.1 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.8 - page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "Ao= 10**4 \n", + "Afo= 50 \n", + "omega_H= 2*pi*100 # in rad/s\n", + "# Formula Afo= Ao/(1+Ao*Beta)\n", + "Beta= 1/Afo-1/Ao \n", + "omega_f_H= omega_H*(1+Ao*Beta) \n", + "print \"Closed loop bandwidth in rad/s is\",omega_f_H,\"or 2*pi*20*10**3\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop bandwidth in rad/s is 125663.706144 or 2*pi*20*10**3\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.10 - page 399" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import inf\n", + "# Given data\n", + "gm=50 \n", + "R_E= 100 # in ohm\n", + "R_S= 1 # in kohm\n", + "R_S=R_S*10**3 # in ohm\n", + "r_pi= 1100 # in ohm\n", + "h_ie= r_pi \n", + "# Formula Av= Vo/Vs, But Vo= gm*vpi*R_E and Vs= Ib*(Ri+rpi), so\n", + "Av= gm*R_E/(R_S+h_ie)\n", + "# As Vo=Vf, so\n", + "Beta=1 \n", + "D= 1+Beta*Av \n", + "Avf= Av/D \n", + "Ri= R_S+r_pi # in ohm\n", + "Ri= Ri*10**-3 # in kohm\n", + "R_if= Ri*D # in kohm\n", + "Ro= inf # ohm\n", + "Rof= Ro*D # ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of Beta = %0.f\" %Beta\n", + "print \"Value of Avf = %0.2f\" %Avf\n", + "print \"Value of Ri = %0.2f kohm\" %Ri\n", + "print \"Value of R_if = %0.2f kohm\" % R_if\n", + "print \"Value of R_of = %0.2f \" % Rof\n", + "# Answer slightly mismatch because of calculation accuracy in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2.38 \n", + "Value of Beta = 1\n", + "Value of Avf = 0.70\n", + "Value of Ri = 2.10 kohm\n", + "Value of R_if = 7.10 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.11 - page 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=2 # in mA/V\n", + "gm=gm*10**-3 # in A/V\n", + "r_d= 40 # in kohm\n", + "r_d= r_d*10**3 # in ohm\n", + "Rs= 3 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "miu= gm*r_d \n", + "Bita=1 \n", + "Av= miu*Rs/(r_d+Rs) \n", + "D= 1+Bita*Av \n", + "Avf= Av/D \n", + "Ri=inf # ohm\n", + "R_if = Ri*D # ohm\n", + "Rof= r_d/D # in ohm\n", + "print \"Value of Av = %0.2f \" %Av\n", + "print \"Value of D = %0.2f \" %D\n", + "print \"Value of Avf = %0.3f \" %Avf\n", + "print \"Value of R_if = %0.2f \" % R_if\n", + "print \"Value of R_of = %0.2e \" % Rof" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 5.58 \n", + "Value of D = 6.58 \n", + "Value of Avf = 0.848 \n", + "Value of R_if = inf \n", + "Value of R_of = 6.08e+03 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.12 - page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "gm=75 # in A/V\n", + "Rs= 1 # in kohm\n", + "Rs= Rs*10**3 # in ohm\n", + "R_E= 1 # in kohm\n", + "R_E= R_E*10**3 # in ohm\n", + "rpi= 1 # in kohm\n", + "rpi= rpi*10**3 # in ohm\n", + "hie=rpi \n", + "\n", + "Io= -gm \n", + "Vi= Rs+R_E+rpi \n", + "Gm= Io/Vi \n", + "print \"Value of Gm = %0.3f \" %Gm\n", + "Beta=-R_E \n", + "print \"Value of Beta = %0.f \" %Beta\n", + "D= 1+Beta*Gm \n", + "print \"Value of D = %0.f \" %D\n", + "Gmf= -Gm/D \n", + "print \"Value of Gmf = %0.1e\" %Gmf\n", + "Ri= Rs+R_E+hie # in ohm\n", + "Rif= Ri*D # in ohm\n", + "Rif=Rif*10**-3 # in kohm\n", + "print \"Value of Rif = %0.f kohm\" %Rif\n", + "Ro=inf \n", + "R_of = Ro*D # ohm\n", + "print \"Value of R_of = %0.2f \" %R_of" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Gm = -0.025 \n", + "Value of Beta = -1000 \n", + "Value of D = 26 \n", + "Value of Gmf = 9.6e-04\n", + "Value of Rif = 78 kohm\n", + "Value of R_of = inf \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.19 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A= 10**5 \n", + "Af= 100 \n", + "# Formula Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "\n", + "\n", + "#when A= 10**3\n", + "A=10**3 \n", + "Af_desh= A/(1+A*Bita) \n", + "\n", + "delta_Af= Af_desh-Af \n", + "Perc_Change_inAf= delta_Af/Af*100 # in %\n", + "print \"Percentage change in Af = %0.f %% \" %Perc_Change_inAf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage change in Af = -9 % \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.20 - page 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import log10\n", + "# Given data\n", + "A= 100 \n", + "Vs=1 # in volt\n", + "Beta=1 # as in the voltage follower, the output voltage is same as input\n", + "Af= A/(1+Beta*A) \n", + "CLG= 1+A*Beta # closed loop gain\n", + "print \"Closed loop gain = %0.f\" %CLG\n", + "CLG_dB= 20*log10(CLG) \n", + "print \"Closed loop gain = %0.1f dB\" %CLG_dB\n", + "Vo= Af*Vs # in V\n", + "print \"Value of Vo = %0.2f Volt\" %Vo\n", + "Vi= Vs-Vo # in V\n", + "print \"Value of Vi = %0.2f mV\" %round(Vi*10**3)\n", + "# If A decrease 10%,i.e.\n", + "A=90 \n", + "Af_desh= A/(1+Beta*A) \n", + "Per_gain_reduction= (Af_desh-Af)/Af*100 # in %\n", + "print \"Percentage of gain reduction = %0.1f %%\" %Per_gain_reduction" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed loop gain = 101\n", + "Closed loop gain = 40.1 dB\n", + "Value of Vo = 0.99 Volt\n", + "Value of Vi = 10.00 mV\n", + "Percentage of gain reduction = -0.1 %\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.21 - page 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "# Part (a)\n", + "PerError= 1 # in %\n", + "A= 10**5 # (Assumed value)\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print \"% error A A\u00df 1+A\u00df\"\n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (b)\n", + "PerError= 5 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita\n", + "# Part (c)\n", + "PerError= 50 # in %\n", + "ABita= 1/PerError*100 \n", + "Bita= 1/(PerError*A) \n", + "print PerError,\" %.e\"%A,\" \",ABita,\" \",1+ABita" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% error A A\u00df 1+A\u00df\n", + "1 1e+05 100.0 101.0\n", + "5 1e+05 20.0 21.0\n", + "50 1e+05 2.0 3.0\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.22 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "S= -20 # sensitivity of closed to open loop gain in dB\n", + "# sensitivity of closed to open loop gain = 1/(1+AB) = S\n", + "# or (1+AB) = -S\n", + "AB= 10**(-S/20) - 1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is -20 dB\" %AB\n", + "\n", + "# Part (b) when \n", + "S= 1/2 # sensitivity of closed to open loop gain in dB\n", + "#S= 1/(1+AB)\n", + "AB= 1/S-1 \n", + "print \"The loop gain AB = %0.2f, \\nfor which the sensitivity of closed loop gain to open loop gain is 1/2 \" %AB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The loop gain AB = 9.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is -20 dB\n", + "The loop gain AB = 1.00, \n", + "for which the sensitivity of closed loop gain to open loop gain is 1/2 \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.23 - page 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given Data\n", + "A = 1e5\n", + "Af = 1e3\n", + "Beta = 0.99*1e-3 \n", + "GDF = 1+A*Beta\n", + "print \"Gain density factor %0.2f\" %GDF\n", + "# part (a)\n", + "A_dash = A*90/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(a) Corresponding % =\",round(cp,2),\"%\"\n", + "# part (a)\n", + "A_dash = A*70/100\n", + "Af_dash = A_dash/(1+A_dash*Beta)\n", + "cp = (Af-Af_dash)/Af*100 # Corresponding %\n", + "print \"(b) Corresponding % =\",round(cp,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain density factor 100.00\n", + "(a) Corresponding % = 0.11 %\n", + "(b) Corresponding % = 0.43 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.24 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=100 \n", + "Af= 10 \n", + "f_L= 100 # in Hz\n", + "f_H= 10 # in kHz\n", + "# Af= A/(1+A*Bita)\n", + "Bita= 1/Af-1/A \n", + "f_desh_L= f_L/(1+A*Bita) # in Hz\n", + "f_desh_H= f_H/(1+A*Bita) # in kHz\n", + "print \"Low frequency = %0.2f Hz\" %f_desh_L\n", + "print \"High frequency = %0.2f kHz\" %f_desh_H\n", + "\n", + "# Note: In the book Calculation to find the value of high frequency i.e. f_desh_H is wrong so the answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Low frequency = 10.00 Hz\n", + "High frequency = 1.00 kHz\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.25 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vs= 100 # in mV\n", + "Vf= 95 # in mV\n", + "Vs= Vs*10**-3 # in V\n", + "Vf= Vf*10**-3 # in V\n", + "Vo=10 # in V\n", + "Vi= Vs-Vf # in V\n", + "Av= Vo/Vi # in V/V\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "Beta= Vf/Vo # in V/V\n", + "print \"Value of Bita = %0.1e V/V\" %Beta\n", + "\n", + "# Note: In the book Calculation to find the value of Beta is wrong so the asnwer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Bita = 9.5e-03 V/V\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.26 - page 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Is= 100 # in \u00b5A\n", + "Is= Is*10**-6 # in A\n", + "If= 95 # in \u00b5A\n", + "Io= 10 # in mA\n", + "A= Io*1e-3/((Is-If)*1e-6) # n A/A\n", + "Beta= If/Io # A/A\n", + "print \"Value of Av = %0.e V/V\" %Av\n", + "print \"Value of Beta = %0.1f \u00b5A/mA\" %Beta\n", + "# Note: In the book , to evaluating the value of Beta, they putted wrong value of If (90 at place of 95)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Av = 2e+03 V/V\n", + "Value of Beta = 9.5 \u00b5A/mA\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.28 - page 422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A=2000 #V/V\n", + "Beta= 0.1 # inV/V\n", + "Ri= 1 # in kohm\n", + "Ri= Ri*10**3 # in ohm\n", + "Ro= 1 # in kohm\n", + "Ro= Ro*10**3 # in ohm\n", + "Af= A/(1+A*Bita) \n", + "print \"The gain Af = %0.2f \"%Af\n", + "Rif= Ri*(1+A*Beta) # in ohm\n", + "print \"The input resistance = %0.f kohm\" %(Rif*10**-3)\n", + "Rof= Ro*1e3/(1+A*Beta) # in ohm\n", + "print \"The output resistance = %0.3f kohm\" %(Rof*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gain Af = 9.95 \n", + "The input resistance = 201 kohm\n", + "The output resistance = 4.975 kohm\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 5.29 - page 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "# Part (b)\n", + "Af= 10 \n", + "A= 10**4 \n", + "# Af= A/(1+A*Beta) \n", + "Beta= 1/Af-1/A \n", + "# Beta= R1/(R1+R2)\n", + "R2_by_R1= 1/Beta-1 \n", + "print \"(b) Value of R2/R1 = %0.2f\" %R2_by_R1\n", + "\n", + "# Part (c)\n", + "Vs= 1 # in V\n", + "Vo= (1+R2_by_R1)*Vs \n", + "print \"(c) Value of Vo = %0.2f Volt\" %Vo\n", + "Vf= Vo/(1+R2_by_R1)\n", + "print \"Value of Vf = %0.2f Volt\" %Vf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(b) Value of R2/R1 = 9.01\n", + "(c) Value of Vo = 10.01 Volt\n", + "Value of Vf = 1.00 Volt\n" + ] + } + ], + "prompt_number": 83 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter6.ipynb b/Electronic_Circuits_by_P._Raja/chapter6.ipynb new file mode 100755 index 00000000..ec4b3342 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter6.ipynb @@ -0,0 +1,517 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} diff --git a/Electronic_Circuits_by_P._Raja/chapter7.ipynb b/Electronic_Circuits_by_P._Raja/chapter7.ipynb new file mode 100755 index 00000000..78dc3860 --- /dev/null +++ b/Electronic_Circuits_by_P._Raja/chapter7.ipynb @@ -0,0 +1,182 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Solved Examination Paper" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 1.b - page 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 10 # in k\u03a9\n", + "R2= 10 # in k\u03a9\n", + "Rf= 50 # in k\u03a9\n", + "V= 2 # in V\n", + "V1= V*R1/(R1+R2) # in V\n", + "V01= -Rf/R1*V1 # in V\n", + "print \"The value of V1 = %0.f Volts\" %(V1)\n", + "print \"The value of V01 = %0.f Volts\" %(V01)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V1 = 1 Volts\n", + "The value of V01 = -5 Volts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.a - page 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_P= -4 # in V\n", + "I_DSS= 10 # in mA\n", + "V_GS= 0 # in V\n", + "R_D= 1.8 # in k\u03a9\n", + "V_DD= 20 # in V\n", + "I_D= I_DSS*(1-V_GS/V_P)**2 # in mA\n", + "# Applying KVL to the circuit, we get V_DD= I_D*R_D+V_D\n", + "V_D= V_DD-I_D*R_D # in V\n", + "print \"The value of I_D = %0.f mA\" %(I_D)\n", + "print \"The value of V_D = %0.f Volts\" %V_D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 10 mA\n", + "The value of V_D = 2 Volts\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 2.c - page 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_GS= 3 # in V\n", + "Vth= 1 # in V\n", + "unCox= 25 # in mA/V**2\n", + "unCox= unCox*10**-3 # in A/V**2\n", + "W=3 # in \u00b5m\n", + "L=1 # in \u00b5m\n", + "r_DS= 1/(unCox*W/L*(V_GS-Vth)) # in \u03a9\n", + "print \"The value of r_DS = %0.2f \u03a9 \" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of r_DS = 6.67 \u03a9 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 3.b - page 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_CQ= 10 # in mA\n", + "I_CQ= I_CQ*10**-3 # in A\n", + "V_CQ= 5 # in V\n", + "V_CC= 10 # in V\n", + "R_C= 0.4 # in k\u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "V_BE= 0.075 # in V\n", + "V_BB= 0.175 # in V\n", + "beta=100 \n", + "beta_max=120 \n", + "beta_min= 40 \n", + "# Applying KVL we get, V_CQ= V_CC-I_C*(R_C+R_E)\n", + "R_E= (V_CC-V_CQ)/I_CQ-R_C # in \u03a9\n", + "print \"The value of R_E = %0.f \u03a9\" %( R_E)\n", + "I_B= I_CQ/beta # in A\n", + "R_B= (V_BB-V_BE)/I_B # in \u03a9\n", + "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)\n", + "I_Cmax= beta_max*I_B # in A\n", + "I_Cmin= beta_min*I_B # in A\n", + "delta_I_CQ= I_Cmax-I_Cmin # in A\n", + "print \"The value of delta_I_C = %0.f mA\" %(delta_I_CQ*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_E = 100 \u03a9\n", + "The value of R_B = 1 k\u03a9\n", + "The value of delta_I_C = 8 mA\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..c3414fde --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch1.ipynb @@ -0,0 +1,532 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a1a2fd08204d20b25cb8797d32a1268bd037e7b99587377263388f4580e76a47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 3*10**8; #in m/s\n", + "f = 1.*10**6; #in Hz\n", + "\n", + "# Calculations\n", + "lembda = c/f;\n", + "\n", + "# Results\n", + "print 'Wavelength (in m):',lembda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength (in m): 300.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "c = 3*10**8; #in m/s\n", + "f = 100.*10**6; #in Hz\n", + "\n", + "# Calculations\n", + "lembda = c/f;\n", + "\n", + "# Results\n", + "print 'Wavelength (in m):',lembda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength (in m): 3.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "G = 175.; #absolute gain\n", + "\n", + "# Calculations\n", + "Gdb = 10*math.log10(175); #decibell gain\n", + "\n", + "# Results\n", + "print 'The decibell power gain is:',Gdb,'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decibell power gain is: 22.4303804869 dB\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Gdb = 28.; #decibell gain\n", + "\n", + "# Calculations\n", + "G = 10**(Gdb/10); #Absolute power gain\n", + "\n", + "# Results\n", + "print 'The absolute power gain is:',G\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute power gain is: 630.95734448\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Gdb = 28.; #decibell gain\n", + "\n", + "# Calculations\n", + "G = 10**(Gdb/10); #Absolute power gain\n", + "Av = G**0.5; #Voltage gain\n", + "\n", + "# Results\n", + "print 'The voltage gain is:',Av\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain is: 25.1188643151\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "G = 0.28; #Absolute gain\n", + "P1 = 1; \n", + "P2 = .28; #28 % of input power\n", + "\n", + "# Calculations and Results\n", + "Gdb = 10*math.log10(G);\n", + "print 'Decibell gain is',Gdb,'dB'\n", + "\n", + "Ldb = 10*math.log10(P1/P2); #dB loss\n", + "print 'Decibell loss is:',Ldb,'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decibell gain is -5.52841968658 dB\n", + "Decibell loss is: 5.52841968658 dB\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "PmW = 100.; #power in mW\n", + "\n", + "# Calculations and Results\n", + "PdBm = 10*math.log10(PmW/1); #P in dBm level\n", + "print '(a). Power in dBm level is:',PdBm,'dBm'\n", + "\n", + "PdBW = PdBm-30; #P in dBW level\n", + "print '(b). Power in dBW level is:',PdBW,'dBW'\n", + "\n", + "PdBf = PdBm+120; #Pin dBf level\n", + "print '(c) Power in dBf level is:',PdBf,'dBf'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a). Power in dBm level is: 20.0 dBm\n", + "(b). Power in dBW level is: -10.0 dBW\n", + "(c) Power in dBf level is: 140.0 dBf\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "G1 = 5000.;\n", + "L = 2000.;\n", + "G2 = 400.;\n", + "\n", + "# Calculations and Results\n", + "G = G1*(1/L)*G2; #Absolute gain\n", + "print '(a) Net absolute gain is:',G\n", + "\n", + "GdB = 10*math.log10(G); #System decibell gain\n", + "print '(b) System Decibel gain is:',GdB,'dB'\n", + "\n", + "G1dB = 10*math.log10(G1);\n", + "LdB = 10*math.log10(L);\n", + "G2dB = 10*math.log10(G2);\n", + "print ('(c) Individual stage gains are:');\n", + "print 'G1dB = ',G1dB\n", + "print 'LdB = ',LdB\n", + "print 'G2dB = ',G2dB\n", + "\n", + "GdB = G1dB-LdB+G2dB;\n", + "print 'The net dB gain is:',GdB,'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Net absolute gain is: 1000.0\n", + "(b) System Decibel gain is: 30.0 dB\n", + "(c) Individual stage gains are:\n", + "G1dB = 36.9897000434\n", + "LdB = 33.0102999566\n", + "G2dB = 26.0205999133\n", + "The net dB gain is: 30.0 dB\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "G1 = 5000.;\n", + "L = 2000.;\n", + "G2 = 400.;\n", + "Ps = 0.1; #in mW\n", + "\n", + "# Calculations and Results\n", + "P1 = G1*Ps; #in mW\n", + "print '(a) Power level P1 is:',P1,'mW'\n", + "\n", + "P2 = P1/L; #in mW\n", + "print 'Line output power P2:',P2,'mW'\n", + "\n", + "Po = G2*P2; #in mW\n", + "print 'System output power Po:',Po,'mW'\n", + "\n", + "PsdBm = 10*math.log10(Ps/1);\n", + "G1dB = 10*math.log10(G1);\n", + "LdB = 10*math.log10(L);\n", + "G2dB = 10*math.log10(G2);\n", + "\n", + "print ('(b) Output power power levels in dBm are');\n", + "P1dBm = PsdBm+G1dB;\n", + "print 'P1(dBm) = ',P1dBm,'dBm'\n", + "\n", + "P2dBm = P1dBm-LdB;\n", + "print 'P2(dBm) = ',P2dBm,'dBm'\n", + "\n", + "PodBm = P2dBm+G2dB;\n", + "print 'Po(dBm) = ',PodBm,'dBm'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Power level P1 is: 500.0 mW\n", + "Line output power P2: 0.25 mW\n", + "System output power Po: 100.0 mW\n", + "(b) Output power power levels in dBm are\n", + "P1(dBm) = 26.9897000434 dBm\n", + "P2(dBm) = -6.02059991328 dBm\n", + "Po(dBm) = 20.0 dBm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def voltage(PdBm):\n", + " P = 1*10**(-3)*(10**(PdBm/10));\n", + " return (75*P)**0.5;\n", + "\n", + "# Variables\n", + "S = 10.; #dBm\n", + "G1 = 13.; #dB\n", + "L1 = 26.; #dB\n", + "G2 = 20.; #dB\n", + "L2 = 29.; #dB\n", + "\n", + "# Calculations and Results\n", + "print '(a) The output levels are',\n", + "PdBm = S;\n", + "V = voltage(PdBm);\n", + "print PdBm,'1. Signal source in dBm:',PdBm,'in Volts : ',V\n", + "\n", + "PdBm = S+G1;\n", + "V = voltage(PdBm);\n", + "print '2. Line Amplifier in dBm:',PdBm,'in Volts : ',V\n", + "\n", + "PdBm = S+G1-L1;\n", + "V = voltage(PdBm);\n", + "print '3. Cable section A in dBm:',PdBm,'in Volts : ',V\n", + "\n", + "PdBm = S+G1-L1+G2;\n", + "V = voltage(PdBm);\n", + "print '4. Booster amplifier in dBm:',PdBm,'in Volts : ',V\n", + "\n", + "PdBm = S+G1-L1+G2-L2;\n", + "V = voltage(PdBm);\n", + "print '5. Cable section B in dBm:',PdBm,'in Volts : ',V\n", + "print ('(b). The output power to get a voltage of 6V'),\n", + "V = 6.; #volts\n", + "R = 75.; #ohm\n", + "Po = (V**2)/R;\n", + "print Po,'W';\n", + "PodBm = 10*math.log10(Po*1000/1);\n", + "print 'power in dBm',PodBm,'dBm'\n", + "\n", + "GrdB = PodBm-PdBm;\n", + "print 'The required gain is',GrdB,'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output levels are 10.0 1. Signal source in dBm: 10.0 in Volts : 0.866025403784\n", + "2. Line Amplifier in dBm: 23.0 in Volts : 3.86839338256\n", + "3. Cable section A in dBm: -3.0 in Volts : 0.193878937799\n", + "4. Booster amplifier in dBm: 17.0 in Volts : 1.93878937799\n", + "5. Cable section B in dBm: -12.0 in Volts : 0.0687908430214\n", + "(b). The output power to get a voltage of 6V 0.48 W\n", + "power in dBm 26.8124123738 dBm\n", + "The required gain is 38.8124123738 dB\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 5.; #In mW\n", + "N = 100.*10**-6; #in mW\n", + "\n", + "# Calculations and Results\n", + "S2N = P/N;\n", + "print '(a) Absolute signal to noise ratio :',S2N\n", + "\n", + "S2NdB = 10*math.log10(S2N);\n", + "print '(b) dB signal to noise ratio is:',S2NdB,'dB'\n", + "\n", + "PdBm = 10*math.log10(P/1);\n", + "print '(c) Signal Power is',PdBm,'dBm'\n", + "\n", + "NdBm = 10*math.log10(N/1);\n", + "print 'Noise power is',NdBm,'dBm'\n", + "\n", + "S2NdB = PdBm-NdBm;\n", + "print 'Decinel S/N ratio is',S2NdB,'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Absolute signal to noise ratio : 50000.0\n", + "(b) dB signal to noise ratio is: 46.9897000434 dB\n", + "(c) Signal Power is 6.98970004336 dBm\n", + "Noise power is -40.0 dBm\n", + "Decinel S/N ratio is 46.9897000434 dB\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..1b54a824 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch10.ipynb @@ -0,0 +1,177 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0d00e54cede62a268916d596a983f3e11fe7ecb031f357b7690790082e45ad7c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Digital communication II M ary system" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "B = 4; #kHz\n", + "\n", + "# Calculations and Results\n", + "C = 2*B;\n", + "print 'a) C = %ikbits/s'%(C);\n", + "C = 2*B*math.log(4,2);\n", + "print ' b) for 4-level encoding ,C = %ikbits/s'%(C);\n", + "C = 2*B*math.log(128,2);\n", + "print ' c) for 128-level encoding ,C = %ikbits/s'%(C);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) C = 8kbits/s\n", + " b) for 4-level encoding ,C = 16kbits/s\n", + " c) for 128-level encoding ,C = 56kbits/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,log10,log2\n", + "\n", + "# Variables\n", + "B = 4; #kHz\n", + "SNdb = array([20, 30, 40]); #S/N in db\n", + "SN = 10**(SNdb/10); #absolute S/N\n", + "\n", + "# Calculations and Results\n", + "C = B*log2(1+SN);\n", + "print ' S/Ndb Ckbits/s';\n", + "out = [SNdb, C];\n", + "print (out);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " S/Ndb Ckbits/s\n", + "[array([20, 30, 40]), array([ 26.63284593, 39.86890504, 53.15142657])]\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "B = 20.; #kHz\n", + "C = 160.; #kb/s\n", + "\n", + "# Calculations and Results\n", + "M = 2**(C/B/2);\n", + "print 'a) Number of encoding levels ,M = %i'%(M);\n", + "SN = 2**(C/B)-1;\n", + "SNdb = 10*math.log10(SN) #S/N in db\n", + "\n", + "print ' b) S/N = %i S/Ndb) = %.2f dB'%(SN,SNdb);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Number of encoding levels ,M = 16\n", + " b) S/N = 255 S/Ndb) = 24.07 dB\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "R = 1.; #Mb/s\n", + "\n", + "# Calculations\n", + "Bt = R/2; #MHz\n", + "\n", + "# Results\n", + "print 'Bt = %i kHz'%(Bt*10**3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bt = 500 kHz\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..019fc2d1 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch11.ipynb @@ -0,0 +1,118 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:515ce7f57d3f3654c589465de33505df9960d587077dfc13945da28abff3841f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Computer Data communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "B = 800.*64; #Mb/s\n", + "\n", + "# Results\n", + "print 'Bandwidth = %i Mb/s or %i MB/s'%(B,B/8);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth = 51200 Mb/s or 6400 MB/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations\n", + "B = 400*64; #Mb/s\n", + "\n", + "# Results\n", + "print 'Memory bus bandwidth = %i Mb/s or %i MB/s'%(B,B/8);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory bus bandwidth = 25600 Mb/s or 3200 MB/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "B = 128.*400; #Mb/s\n", + "\n", + "# Results\n", + "print 'Memory bus bandwidth = %i Mb/s or %i MB/s'%(B,B/8);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory bus bandwidth = 51200 Mb/s or 6400 MB/s\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9bab9cd4 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch12.ipynb @@ -0,0 +1,755 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:aa83d0e3624d61b152f484445b892a7d071f55ec077be834b7f5853b24bdf388" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Noise in Communication systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "# Variables\n", + "B = 10**6; #Hz\n", + "R = array([1, 100, 10000])*10**3 #ohm\n", + "\n", + "# Calculations and Resultsc\n", + "Vrms = (16*10**-21*B*R)**0.5; #volts\n", + "print ' R K-ohm Vrms micro-V';\n", + "out = [R*10**-3, Vrms*10**6];\n", + "print (out);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " R K-ohm Vrms micro-V\n", + "[array([ 1.00000000e+00, 1.00000000e+02, 1.00000000e+04]), array([ 4., 40., 400.])]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "B = 10.**6; #Hz\n", + "R = 10**7 ; #ohm\n", + "\n", + "# Calculations\n", + "Vrms = (16*10**-21*B*R)**0.5; #volts\n", + "G = 5000; #gain\n", + "vorms = Vrms*G;\n", + "\n", + "# Results\n", + "print 'vorms = %.1f V'%(vorms);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vorms = 2.0 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "B = 2*10**6; #Hz\n", + "Req = 6*10**6 ; #ohm\n", + "\n", + "# Calculations\n", + "Vrms = (16*10**-21*B*Req)**0.5; #volts\n", + "\n", + "# Results\n", + "print 'vrms = %.1f micro-V'%(Vrms*10**6);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vrms = 438.2 micro-V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "B = 2*10**6; #Hz\n", + "R = 50 ; #ohm\n", + "kT0 = 4*10**-21;\n", + "\n", + "# Calculations\n", + "Nav = kT0*B;\n", + "\n", + "# Results\n", + "print 'Noise power = %.0f fW'%(Nav*10**15);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise power = 8 fW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "B = 2*10**6; #Hz\n", + "R = 50 ; #ohm\n", + "G = 10**6; #gain\n", + "kT0 = 4*10**-21;\n", + "\n", + "# Calculations\n", + "Nav = kT0*B;\n", + "No = G*Nav;\n", + "\n", + "# Results\n", + "print 'output Noise power = %.0f nW'%(No*10**9);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output Noise power = 8 nW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No : 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#data from ex 12.5\n", + "B = 2*10**6; #Hz\n", + "R = 50 ; #ohm\n", + "G = 10**6; #gain\n", + "kT0 = 4*10**-21;\n", + "\n", + "# Calculations\n", + "Nav = kT0*B;\n", + "No = G*Nav;\n", + "#ex12.6\n", + "Vrms = (No*50)**0.5;\n", + "\n", + "# Results\n", + "print 'Vrms = %.1f micro-V'%(Vrms*10**6);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vrms = 632.5 micro-V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page No : 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 50 ; #ohm\n", + "G = 10**8; #gain\n", + "kT0 = 4*10**-21;\n", + "\n", + "# Calculations\n", + "So = G*kT0;\n", + "\n", + "# Results\n", + "print 'Output spectral density Sof) = %.0f fW/Hz'%(So*10**15);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output spectral density Sof) = 400 fW/Hz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ns = 6*10**-18; #W/Hz\n", + "k = 1.38*10**-23;\n", + "\n", + "# Calculations and Results\n", + "Ts = ns/k;\n", + "print 'a) Equilant source temperature is Ts = %.0f K'%(Ts);\n", + "Gdb = 43; #gain in dB\n", + "G = 10**(Gdb/10);\n", + "print ' b) Absolute gain G = %.3f'%(G);\n", + "G = 20*10**3; #Approximate\n", + "Si = ns;\n", + "So = G*Si;\n", + "print 'Output spectral density Sof) = %.0f fW/Hz'%(So*10**15);\n", + "B = 12*10**6; #Hz\n", + "no = So;\n", + "No = no*B;\n", + "print ' c)Total Output Noise power ,No = %.3f micro-W'%(No*10**6);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Equilant source temperature is Ts = 434783 K\n", + " b) Absolute gain G = 10000.000\n", + "Output spectral density Sof) = 120 fW/Hz\n", + " c)Total Output Noise power ,No = 1.440 micro-W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Gdb1 = 10.;\n", + "Gdb2 = 15.; \n", + "Gdb3 = 25.;\n", + "\n", + "# Calculations and Results\n", + "Gdb = Gdb1+Gdb2+Gdb3; # net gain in dB\n", + "G = 10**(Gdb/10);\n", + "print 'Absolute gain G = %i'%(G);\n", + "B = 10**4; #Hz\n", + "ni = 10**-12; #pW/Hz\n", + "No = ni*G*B;\n", + "print ' Output Noise power ,No = %i mW'%(No*10**3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute gain G = 100000\n", + " Output Noise power ,No = 1 mW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page No : 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Te = 50.; #K\n", + "T0 = 290.; #K\n", + "\n", + "# Calculations and Results\n", + "F = 1+Te/T0;\n", + "print 'a) Noise figure, F = %.3f'%(F);\n", + "Fdb = 10*math.log10(F);\n", + "print ' b) Decibel value , Fdb = %.3f dB '%(Fdb);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Noise figure, F = 1.172\n", + " b) Decibel value , Fdb = 0.691 dB \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11 Page No : 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Fdb = 5.;\n", + "T0 = 290.; #K\n", + "\n", + "# Calculations and Results\n", + "F = 10**(Fdb/10);\n", + "print 'Noise figure, F = %.3f'%(F);\n", + "Te = (F-1)*T0;\n", + "print ' Noise Temperature , Te = %i K '%(Te);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise figure, F = 3.162\n", + " Noise Temperature , Te = 627 K \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T0 = 290.; #K\n", + "Fdb = 9.;\n", + "\n", + "# Calculations and Results\n", + "F = 10**(Fdb/10);\n", + "print 'Absolute Noise figure, F = %.3f = 8Approx)'%(F);\n", + "F = 8; #Approximate\n", + "Te = (F-1)*T0;\n", + "print ' Noise Temperature, Te = %i K '%(Te);\n", + "Ti = T0;\n", + "k = 1.38*10**-23; #Boltzmann's Consmath.tant\n", + "B = 2*10**6; #Hz\n", + "Ni = k*Ti*B; #W\n", + "print ' a) Input source Noise ratio, Ni = %i fW '%(Ni*10**15);\n", + "Pi = 8*10**-12; #W\n", + "SNinput = Pi/Ni;\n", + "print 'b) Input source signal to noise ratio S:Ninput = %.0f'%(SNinput);\n", + "print ' Corresponding dB value SNinputdb) = %.0f dB'%(10*math.log10(SNinput));\n", + "Gdb = 50;\n", + "G = 10**(Gdb/10);\n", + "Po = G*Pi; #W\n", + "print 'c) The output signal power, Po = %i nW'%(Po*10**9);\n", + "Tsys = Ti+Te;\n", + "No = G*k*Tsys*B; #W\n", + "print 'd) output noise power No = %.2f nw'%(No*10**9);\n", + "SNoutput = Po/No;\n", + "print 'e) Output signal to noise ratio S:Noutput = %.0f'%(SNoutput);\n", + "print ' Corresponding dB value S;Noutputdb) = %.0f dB'%(10*math.log10(SNoutput));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute Noise figure, F = 7.943 = 8Approx)\n", + " Noise Temperature, Te = 2030 K \n", + " a) Input source Noise ratio, Ni = 8 fW \n", + "b) Input source signal to noise ratio S:Ninput = 1000\n", + " Corresponding dB value SNinputdb) = 30 dB\n", + "c) The output signal power, Po = 800 nW\n", + "d) output noise power No = 6.40 nw\n", + "e) Output signal to noise ratio S:Noutput = 125\n", + " Corresponding dB value S;Noutputdb) = 21 dB\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13 Page No : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Data from ex-12\n", + "T0 = 290.; #K\n", + "Fdb = 9.;\n", + "F = 10**(Fdb/10);\n", + "F = 8; #Approximate\n", + "Te = (F-1)*T0;\n", + "Ti = T0;\n", + "\n", + "# Calculations\n", + "k = 1.38*10**-23; #Boltzmann's Consmath.tant\n", + "B = 2*10**6; #Hz\n", + "Ni = k*Ti*B; #W\n", + "Pi = 8*10**-12; #W\n", + "SNinput = Pi/Ni;\n", + "SNinputdb = 10*math.log10(SNinput);\n", + "#Ex13 calculation\n", + "SNoutputdB = SNinputdb-Fdb;\n", + "\n", + "# Results\n", + "print ' S:Noutputdb) = %.0f dB'%(SNoutputdB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " S:Noutputdb) = 21 dB\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14 Page No : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#Absolute gains\n", + "G1 = 20.;\n", + "G2 = 15.;\n", + "G3 = 12.;\n", + "#Temp in K\n", + "Te1 = 100.;\n", + "Te2 = 200.;\n", + "Te3 = 300.;\n", + "\n", + "# Calculations\n", + "Te = Te1+Te2/G1+Te3/G1/G2\n", + "\n", + "# Results\n", + "print 'Noise Temperature ,Te = %.0f K'%(Te);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise Temperature ,Te = 111 K\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15 Page No : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#Absolute gains\n", + "G1 = 20.;\n", + "G2 = 15.;\n", + "G3 = 12.;\n", + "#Temp in K\n", + "Te1 = 100.;\n", + "Te2 = 200.;\n", + "Te3 = 300.;\n", + "\n", + "# Calculations\n", + "#Noise figures\n", + "F1 = 1+Te1/290;\n", + "F2 = 1+Te2/290;\n", + "F3 = 1+Te3/290;\n", + "F = F1+(F2-1)/G1+(F3-1)/G1/G2;\n", + "\n", + "# Results\n", + "print 'Noise figure ,F = %.4f'%(F);\n", + "Te = (F-1)*290;\n", + "\n", + "print 'Noise Temperature ,Te = %.0f K'%(Te);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise figure ,F = 1.3828\n", + "Noise Temperature ,Te = 111 K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16 Page No : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Ldb = 6.02; #db\n", + "\n", + "# Calculations and Results\n", + "L = 10**(Ldb/10);\n", + "print 'Absloute loss ,L = %.0f'%(L);\n", + "Tp = 290; #K\n", + "#Noise temp (K)\n", + "TeL = (L-1)*Tp;\n", + "Tepre = 50.;\n", + "Terec = 200.;\n", + "Gpre = 10**(20./10);\n", + "Te = TeL+L*Tepre+L*Terec/Gpre;\n", + "print 'Noise Temperature ,Te = %.0f K'%(Te);\n", + "\n", + "#Noise figures\n", + "F = 1+Te/290;\n", + "print 'Noise figure ,F = %.4f'%(F);\n", + "print 'Noise figure ,(FdB) = %.3f dB'%(10*math.log10(F));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absloute loss ,L = 4\n", + "Noise Temperature ,Te = 1078 K\n", + "Noise figure ,F = 4.7166\n", + "Noise figure ,(FdB) = 6.736 dB\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17 Page No : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ldb = 6.02; #db\n", + "\n", + "# Calculations and Results\n", + "L = 10**(Ldb/10);\n", + "print 'Absloute loss ,L = %.0f'%(L);\n", + "Tp = 290.; #K\n", + "#Noise temp (K)\n", + "TeL = (L-1)*Tp;\n", + "Tepre = 50.;\n", + "Terec = 200.;\n", + "Gpre = 10**(20./10);\n", + "Te = Tepre+TeL/Gpre+L*Terec/Gpre;\n", + "print ' a) Noise Temperature ,Te = %.1f K'%(Te);\n", + "\n", + "#Noise figures\n", + "F = 1+Te/290.;\n", + "print ' b) Noise figure ,F = %.2f'%(F);\n", + "print 'Noise figure ,(FdB) = %.3f dB'%(10*math.log10(F));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absloute loss ,L = 4\n", + " a) Noise Temperature ,Te = 66.7 K\n", + " b) Noise figure ,F = 1.23\n", + "Noise figure ,(FdB) = 0.899 dB\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..142dee30 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch13.ipynb @@ -0,0 +1,554 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bcad4cfb691dedbc6343f0aa16a777a3c81354536e69fb16f52f5b492443bac9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Performance of Modulation systems with noise" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Gb = 1.;\n", + "print 'a) SSB: Gb = %i '%(Gb);\n", + "print ' GbdB = %i dB'%(10*math.log10(Gb));\n", + "print 'b) DSB: Gb = %i '%(Gb);\n", + "print ' GbdB = %i dB'%(10*math.log10(Gb));\n", + "m = 0.5;\n", + "Gb = m**2/(2+m**2);\n", + "print 'c) AMm = .5): Gb = %.3f '%(Gb);\n", + "print ' GbdB = %.3f dB'%(10*math.log10(Gb));\n", + "m = 1.;\n", + "Gb = m**2/(2+m**2);\n", + "print 'd) AMm = 1): Gb = %.3f '%(Gb);\n", + "print ' GbdB = %.3f dB'%(10*math.log10(Gb));\n", + "delta_phi = 5.;\n", + "Gb = delta_phi**2/2;\n", + "print 'e) FMdelta phi = 5)): Gb = %.1f '%(Gb);\n", + "print ' GbdB = %.3f dB'%(10*math.log10(Gb));\n", + "D = 5.;\n", + "Gb = 3.*D**2/2;\n", + "print 'f) FMD = 5): Gb = %.1f '%(Gb);\n", + "print ' GbdB = %.3f dB'%(10*math.log10(Gb));\n", + "Wf1 = 7.07;\n", + "Gb = 3./2*D**2*math.pi/6*Wf1;\n", + "print 'g) FMD = 5, W/f1 = 7.07): Gb = %.1f '%(Gb);\n", + "print ' GbdB = %.2f dB'%(10*math.log10(Gb));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) SSB: Gb = 1 \n", + " GbdB = 0 dB\n", + "b) DSB: Gb = 1 \n", + " GbdB = 0 dB\n", + "c) AMm = .5): Gb = 0.111 \n", + " GbdB = -9.542 dB\n", + "d) AMm = 1): Gb = 0.333 \n", + " GbdB = -4.771 dB\n", + "e) FMdelta phi = 5)): Gb = 12.5 \n", + " GbdB = 10.969 dB\n", + "f) FMD = 5): Gb = 37.5 \n", + " GbdB = 15.740 dB\n", + "g) FMD = 5, W/f1 = 7.07): Gb = 138.8 \n", + " GbdB = 21.42 dB\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "GR = 1.;\n", + "print 'a) SSB: GR = %i '%(GR);\n", + "print ' GRdB = %i dB'%(10*math.log10(GR));\n", + "GR = 2.;\n", + "print 'b) DSB: GR = %i '%(GR);\n", + "print ' GRdB = %.2f dB'%(10*math.log10(GR));\n", + "m = 0.5;\n", + "GR = 2*m**2/(2+m**2);\n", + "print 'c) AMm = .5): GR = %.4f '%(GR);\n", + "print ' GRdB = %.3f dB'%(10*math.log10(GR));\n", + "m = 1.;\n", + "GR = 2*m**2/(2+m**2);\n", + "print 'd) AMm = 1): GR = %.3f '%(GR);\n", + "print ' GRdB = %.2f dB'%(10*math.log10(GR));\n", + "delta_phi = 5.;\n", + "GR = (1+delta_phi)*delta_phi**2;\n", + "print 'e) FMdelta phi = 5)): GR = %.1f '%(GR);\n", + "print ' GRdB = %.3f dB'%(10*math.log10(GR));\n", + "D = 5.;\n", + "GR = 3*D**2*(1+D);\n", + "print 'f) FMD = 5): GR = %.1f '%(GR);\n", + "print ' GRdB = %.3f dB'%(10*math.log10(GR));\n", + "Wf1 = 7.07;\n", + "GR = 3*(1+D)*D**2*math.pi/6*Wf1;\n", + "print 'g) FMD = 5, W/f1 = 7.07): GR = %.1f '%(GR);\n", + "print ' GRdB = %.2f dB'%(10*math.log10(GR));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) SSB: GR = 1 \n", + " GRdB = 0 dB\n", + "b) DSB: GR = 2 \n", + " GRdB = 3.01 dB\n", + "c) AMm = .5): GR = 0.2222 \n", + " GRdB = -6.532 dB\n", + "d) AMm = 1): GR = 0.667 \n", + " GRdB = -1.76 dB\n", + "e) FMdelta phi = 5)): GR = 150.0 \n", + " GRdB = 21.761 dB\n", + "f) FMD = 5): GR = 450.0 \n", + " GRdB = 26.532 dB\n", + "g) FMD = 5, W/f1 = 7.07): GR = 1665.8 \n", + " GRdB = 32.22 dB\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "k = 1.38*10**-23; #Boltzmann's const\n", + "#Temperatures in K\n", + "Ti = 150.;\n", + "Te = 325.;\n", + "\n", + "# Calculations and Results\n", + "Tsys = Ti+Te;\n", + "print ' Tsys = %i K '%(Tsys);\n", + "D = 5;\n", + "W = 15; #kHz\n", + "B = 2*(1+D)*W;\n", + "print ' B = %i kHz'%(B);\n", + "Nsys = k*Tsys*B*10**3; #W\n", + "print ' Nsys = %.3f fW'%(Nsys*10**15);\n", + "PR = 50*10**-12; #W\n", + "SNsys = PR/Nsys; \n", + "print ' S/N)sys = %i '%(SNsys);\n", + "GR = 3*(1+D)*D**2\n", + "print ' GR = %.0f '%(GR);\n", + "SNoutput = GR*SNsys;\n", + "print ' S/N)output = %.0f '%(SNoutput);\n", + "print ' S/N)out,dB = %.2f dB'%(10*math.log10(SNoutput));\n", + "print ' S/N)sys, dB = %.2f dB'%(10*math.log10(SNsys));\n", + "GRdb = 10*math.log10(GR);\n", + "print ' GR, dB = %.2f dB '%(GRdb);\n", + "print ' S/N)output ,dB = %.2f dB'%(10*math.log10(SNoutput));\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Tsys = 475 K \n", + " B = 180 kHz\n", + " Nsys = 1.180 fW\n", + " S/N)sys = 42376 \n", + " GR = 450 \n", + " S/N)output = 19069413 \n", + " S/N)out,dB = 72.80 dB\n", + " S/N)sys, dB = 46.27 dB\n", + " GR, dB = 26.53 dB \n", + " S/N)output ,dB = 72.80 dB\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 16; #bit\n", + "\n", + "# Calculations\n", + "SNoutdB = 1.76+6.02*N;\n", + "\n", + "# Results\n", + "print ' (S/N)output, dB = %.2f dB '%(SNoutdB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (S/N)output, dB = 98.08 dB \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No : 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "SNoutdB = 53;\n", + "\n", + "# Calculations and Results\n", + "N = (SNoutdB-1.76)/6.02;\n", + "print ' N = %.2f bits '%(N);\n", + "N = 9; #roundup\n", + "print ' N = %i bits '%(N);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " N = 8.51 bits \n", + " N = 9 bits \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No : 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 6.; #bits per word\n", + "\n", + "# Calculations and Results\n", + "M = 2**N;\n", + "print ' M = %i '%(M);\n", + "Pr = 200.*10**-15; #W\n", + "R = 2.*10**6; #bits/s\n", + "Eb = Pr/R;\n", + "print ' Bit energy ,Eb = %.0f*10**-21 '%(Eb*10**21);\n", + "k = 1.38*10**-23; #Boltzmann cons\n", + "Ti = 300.; #K\n", + "Te = 425.; #K\n", + "Tsys = Ti+Te;\n", + "nsys = k*Tsys; \n", + "print ' Noise power spectral density ,nsys = %.0f*10**-20 W/Hz '%(nsys*10**20);\n", + "rho = Eb/nsys;\n", + "print ' Bit energy , rho = %.0f '%(rho);\n", + "rhodB = 10*math.log10(rho);\n", + "print ' Bit energy in db, rho,dB = %.0f dB '%(rhodB);\n", + "#part a\n", + "Pe = 4*10**-6;\n", + "SNout = 1.5*M**2/(1+4*M**2*Pe);\n", + "print ' a) S/N)output = %.0f or %0.2f dB) '%(SNout,10*math.log10(SNout));\n", + "#part b\n", + "Pe = 2.3*10**-5;\n", + "SNout = 1.5*M**2/(1+4*M**2*Pe);\n", + "print ' b) S/N)output = %.0f or %0.2f dB) '%(SNout,10*math.log10(SNout));\n", + "#part c\n", + "Pe = 8*10**-4;\n", + "SNout = 1.5*M**2/(1+4*M**2*Pe);\n", + "print ' c) S/N)output = %.1f or %0.2f dB) '%(SNout,10*math.log10(SNout));\n", + "#part d\n", + "Pe = 3.5*10**-3;\n", + "SNout = 1.5*M**2/(1+4*M**2*Pe);\n", + "print ' d) S/N)output = %.1f or %0.2f dB) '%(SNout,10*math.log10(SNout));\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " M = 64 \n", + " Bit energy ,Eb = 100*10**-21 \n", + " Noise power spectral density ,nsys = 1*10**-20 W/Hz \n", + " Bit energy , rho = 10 \n", + " Bit energy in db, rho,dB = 10 dB \n", + " a) S/N)output = 5766 or 37.61 dB) \n", + " b) S/N)output = 4462 or 36.50 dB) \n", + " c) S/N)output = 435.5 or 26.39 dB) \n", + " d) S/N)output = 105.3 or 20.22 dB) \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page No : 455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#data from ex 13.6\n", + "M = 2.**6;\n", + "Pr = 200.*10**-15; #W\n", + "R = 8.*10**6; #bits/s (changed)\n", + "Eb = Pr/R;\n", + "\n", + "# Calculations and Results\n", + "k = 1.38*10**-23; #Boltzmann cons\n", + "Ti = 300; #K\n", + "Te = 425; #K\n", + "Tsys = Ti+Te;\n", + "nsys = k*Tsys; \n", + "#print ' Noise power spectral density %(nsys = %.0f*10**-20 W/Hz '%(nsys*10**20);\n", + "rho = Eb/nsys;\n", + "print ' Bit energy , rho = %.1f '%(rho);\n", + "rhodB = 10*math.log10(rho);\n", + "print ' Bit energy in db, rho,dB = %.2f dB '%(rhodB);\n", + "\n", + "Pe = 1.3*10**-2;\n", + "SNout = 1.5*M**2/(1+4*M**2*Pe);\n", + "print ' S/N)output = %.2f or %0.2f dB) '%(SNout,10*math.log10(SNout));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bit energy , rho = 2.5 \n", + " Bit energy in db, rho,dB = 3.98 dB \n", + " S/N)output = 28.71 or 14.58 dB) \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No : 455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pe = 10.**-5;\n", + "R = 1*10**6; #bits/s\n", + "k = 1.38*10**-23; #Boltzmann cons\n", + "Ti = 475.; #K\n", + "Te = 250.; #K\n", + "Tsys = Ti+Te;\n", + "nsys = k*Tsys; #W/Hz \n", + "\n", + "# Calculations\n", + "def E(rhodb): #function for Eb\n", + " rho = 10**(rhodb/10);\n", + " return nsys*rho;\n", + "\n", + "def P(E): #function for Pr\n", + " return R*Eb;\n", + "\n", + "def lay(rhodb,pt):\n", + " Eb = E(rhodb);\n", + " print P(E);\n", + " print '%c)Bit energy , Eb = %.2f*10**-21 J '%(pt,Eb*10**21);\n", + " print ' Required reciver carrier power , Pr = %.2f fW '%(Pr*10**15);\n", + "\n", + "#Part a\n", + "rhodb = 9.6;\n", + "lay(rhodb,'a');\n", + "\n", + "#Part b\n", + "rhodb = 10.3;\n", + "lay(rhodb,'b');\n", + "\n", + "#Part c\n", + "rhodb = 12.6;\n", + "lay(rhodb,'c');\n", + "\n", + "#Part d\n", + "rhodb = 13.4;\n", + "lay(rhodb,'d');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.5e-14\n", + "a)Bit energy , Eb = 91.25*10**-21 J \n", + " Required reciver carrier power , Pr = 200.00 fW \n", + "2.5e-14\n", + "b)Bit energy , Eb = 107.21*10**-21 J \n", + " Required reciver carrier power , Pr = 200.00 fW \n", + "2.5e-14\n", + "c)Bit energy , Eb = 182.06*10**-21 J \n", + " Required reciver carrier power , Pr = 200.00 fW \n", + "2.5e-14\n", + "d)Bit energy , Eb = 218.89*10**-21 J \n", + " Required reciver carrier power , Pr = 200.00 fW \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9 Page No : 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Data form ex13.8\n", + "\n", + "# Variables\n", + "Pe = 10**-5;\n", + "R = 2*10**6; #bits/s (changed)\n", + "k = 1.38*10**-23; #Boltzmann cons\n", + "Ti = 475; #K\n", + "Te = 250; #K\n", + "Tsys = Ti+Te;\n", + "nsys = k*Tsys; #W/Hz \n", + "\n", + "# Calculations\n", + "def E(rhodb): #function for Eb\n", + " rho = 10**(rhodb/10);\n", + " return nsys*rho;\n", + "\n", + "def P(E): #function for Pr\n", + " return R*Eb;\n", + "\n", + "\n", + "rhodb = 9.6;\n", + "Eb = E(rhodb);\n", + "Pr = P(E);\n", + "\n", + "# Results\n", + "print 'Bit energy , Eb = %.2f*10**-21 J '%(Eb*10**21);\n", + "print ' Required reciver carrier power , Pr = %.2f fW '%(Pr*10**15);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bit energy , Eb = 91.25*10**-21 J \n", + " Required reciver carrier power , Pr = 182.49 fW \n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..5de80405 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch14.ipynb @@ -0,0 +1,542 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ef77f95947fa24e94595e46940380d50befab1ec5aff361283c45343c8b331f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Transmission lines and waves" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "f = 1.*10**6; #Hz\n", + "\n", + "# Calculations and Results\n", + "lembda = 3.*10**8/f; #m\n", + "print 'The free space wavelength is = %i m '%(lembda);\n", + "l = .1*lembda;\n", + "print ' Length , l = %i m'%(l);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The free space wavelength is = 300 m \n", + " Length , l = 30 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "f = 1.*10**8; #Hz\n", + "\n", + "# Calculations and Results\n", + "lembda = 3.*10**8/f; #m\n", + "print 'The free space wavelength is = %i m '%(lembda);\n", + "l = .1*lembda;\n", + "print ' Length ,l = %.1f m'%(l);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The free space wavelength is = 3 m \n", + " Length ,l = 0.3 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page No : 472" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "f = 1.*10**9; #Hz\n", + "\n", + "# Calculations and Results\n", + "lembda = 3.*10**8/f; #m\n", + "print 'The free space wavelength is = %i cm '%(lembda*100);\n", + "l = .1*lembda;\n", + "print ' Length , l = %i cm'%(l*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The free space wavelength is = 30 cm \n", + " Length , l = 3 cm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4 Page No : 474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "L = 320.*10**-9; #H/m\n", + "C = 90.*10**-12; #F/m\n", + "\n", + "# Calculations\n", + "R0 = math.sqrt(L/C);\n", + "\n", + "# Results\n", + "print 'The characteristc impedance, R0 = %.2f ohm '%(R0);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The characteristc impedance, R0 = 59.63 ohm \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 Page No : 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L = 320.*10**-9; #H/m\n", + "C = 90.*10**-12; #F/m\n", + "\n", + "# Calculations\n", + "v = 1/math.sqrt(L*C);\n", + "\n", + "# Results\n", + "print 'The velocity of propagation is, v = %.3f 10**8 m/s '%(v*10**-8);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of propagation is, v = 1.863 10**8 m/s \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6 Page No : 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "L = 320*10**-9; #H/m\n", + "C = 90*10**-12; #F/m\n", + "\n", + "# Calculations\n", + "v = 1./math.sqrt(L*C); #from Ex14.5\n", + "Er = (3*10**8/v)**2;\n", + "\n", + "# Results\n", + "print 'The dielectic constant is, Er = %.2f '%(Er);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dielectic constant is, Er = 2.59 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6.1 Page No : 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = .3; #cm\n", + "D = 1.02; #cm\n", + "Er = 2.25; \n", + "\n", + "# Calculations and Results\n", + "x = math.log(D/d); #variable\n", + "L = 2*10**-7*x;\n", + "print 'a)The inductance per unit length is, L = %.1f nH/m '%(L*10**9);\n", + "C = 55.56*10**-12*Er/x;\n", + "print ' b)The capacitance per unit length is, C = %.2f nH/m '%(C*10**12);\n", + "R0 = 60/math.sqrt(Er)*x;\n", + "print ' c)The characteristic impedance is, R0 = %.3f ohm '%(R0);\n", + "c = 3*10**8;\n", + "v = c/math.sqrt(Er);\n", + "print ' d)The velocity of propagation is, v = %i*10**8 m/s '%(v*10**-8);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The inductance per unit length is, L = 244.8 nH/m \n", + " b)The capacitance per unit length is, C = 102.15 nH/m \n", + " c)The characteristic impedance is, R0 = 48.951 ohm \n", + " d)The velocity of propagation is, v = 2*10**8 m/s \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.7 Page No : 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#prob no. 14.7;\n", + "\n", + "# Variables\n", + "Rin = 50. #ohm\n", + "Rout = 50.; #ohm\n", + "Vrms = 400.; #V\n", + "\n", + "# Calculations and Results\n", + "Zin = Rin;\n", + "print 'a)The input impedance is, Zin = %i ohm'%(Zin);\n", + "Irms = Vrms/(Rin+Rout); #A\n", + "print ' b)The rms current , Irms = %i A '%(Irms);\n", + "Pin = Irms**2*Rin;\n", + "print ' c)The input power is, Pin = %i W '%(Pin);\n", + "Pl = Pin;\n", + "print ' d)The load power is, Pl = %i W '%(Pl);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The input impedance is, Zin = 50 ohm\n", + " b)The rms current , Irms = 4 A \n", + " c)The input power is, Pin = 800 W \n", + " d)The load power is, Pl = 800 W \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.8 Page No : 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Rin = 50. #ohm\n", + "Rout = 50.; #ohm\n", + "Vrms = 400.; #V\n", + "l = 50.; #m\n", + "\n", + "# Calculations and Results\n", + "Ldb = .01*l; #dB\n", + "L = 10**(Ldb/10);\n", + "print 'The abslute loss is, L = %f '%(L);\n", + "Irms = Vrms/(Rin+Rout); #A\n", + "Pin = Irms**2*Rin;\n", + "\n", + "PL = Pin/L;\n", + "print ' The actual Power reaching the load is, PL = %.1f W '%(PL);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The abslute loss is, L = 1.122018 \n", + " The actual Power reaching the load is, PL = 713.0 W \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.9 Page No : 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import angle\n", + "\n", + "# Variables\n", + "ZL = complex(50,100);\n", + "R0 = 50.;\n", + "\n", + "def R2P(x):\n", + " return abs(x), angle(x)\n", + " \n", + "# Calculations and Results\n", + "TauL = (ZL-R0)/(ZL+R0);\n", + "print 'a)The reflection coefficient at load is',\n", + "print (TauL);\n", + "R,theta = R2P(TauL) #polar(TauL);\n", + "print 'OR , %.4f angle %i'%(R,theta*180/math.pi);\n", + "\n", + "S = (1+R)/(1-R);\n", + "print ' b) The stading wave ratio is, S = %.3f '%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The reflection coefficient at load is (0.5+0.5j)\n", + "OR , 0.7071 angle 45\n", + " b) The stading wave ratio is, S = 5.828 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.10 Page No : 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "ZL = 100.; #ohm\n", + "RL = ZL;\n", + "R0 = 300.; #ohm\n", + "\n", + "# Calculations and Results\n", + "TauL = (RL-R0)/(RL+R0);\n", + "\n", + "print 'a)The reflection coefficient at load is = %0.2f'%(TauL);\n", + "\n", + "S = R0/RL;\n", + "print ' b) The stading wave ratio is, S = %.0f '%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)The reflection coefficient at load is = -0.50\n", + " b) The stading wave ratio is, S = 3 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.11 Page No : 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "ZL = 100.; #ohm\n", + "RL = ZL;\n", + "R0 = 300; #ohm\n", + "\n", + "# Calculations\n", + "TauL = (RL-R0)/(RL+R0);\n", + "mismatch_loss_dB = -10*math.log10(1-TauL**2);\n", + "\n", + "# Results\n", + "print ' The mismatch loss dB , S = %.2f dB'%(mismatch_loss_dB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mismatch loss dB , S = 1.25 dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.12 Page No : 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ex = 3. #V/m\n", + "n0 = 377.;\n", + "\n", + "# Calculations and Results\n", + "Hy = Ex/n0;\n", + "print 'a) The vaulue of Hy is, Hy = %.3f * 10**-3 A/m'%(Hy*10**3);\n", + "\n", + "Px = Ex**2/n0;\n", + "print ' b) The power density Px is, Px = %.3f * 10**-3 W/m**2'%(Px*10**3);\n", + "A = 10*30;\n", + "P = Px*A;\n", + "print ' c) The net power transmitted is, P = %.3f W '%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The vaulue of Hy is, Hy = 7.958 * 10**-3 A/m\n", + " b) The power density Px is, Px = 23.873 * 10**-3 W/m**2\n", + " c) The net power transmitted is, P = 7.162 W \n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..17a29608 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch15.ipynb @@ -0,0 +1,337 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:654008bef312166c584c8c37dbba66490dce72fac67bb704aee7db6064bf2e37" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Introduction to Antennas" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page No : 500" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 3.*10**8; #speed of light\n", + "f = 2.*10**9; #frequency\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #wavelength\n", + "print 'The wavelength of 2GHz is, = %.2f m'%(lembda);\n", + "D = 15.; #m\n", + "Rff = 2*D**2/lembda;\n", + "print ' The distance to the far field is, Rff = %i m'%(Rff);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of 2GHz is, = 0.15 m\n", + " The distance to the far field is, Rff = 3000 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page No : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Gmax = 10**5;\n", + "\n", + "# Calculations\n", + "Gmax_dB = 10*math.log10(Gmax);\n", + "\n", + "# Results\n", + "print 'Gmax, dB = %i dB'%(Gmax_dB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gmax, dB = 50 dB\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 Page No : 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 10.**5; #m\n", + "Pt = 100.; #W\n", + "\n", + "# Calculations\n", + "Pd = Pt/(4*math.pi*d**2);\n", + "\n", + "# Results\n", + "print 'The power density is ,Pd = %.1f pW/m**2'%(Pd*10**12);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power density is ,Pd = 795.8 pW/m**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5 Page No : 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 10.**5; #m\n", + "Pt = 100.; #W\n", + "Gt = 50;\n", + "\n", + "# Calculations\n", + "Pd = Gt*Pt/(4*math.pi*d**2);\n", + "\n", + "# Results\n", + "print 'The power density is ,Pd = %.2f nW/m**2'%(Pd*10**9);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power density is ,Pd = 39.79 nW/m**2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.6 Page No : 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "c = 3.*10**8; #speed of light\n", + "f = 15.*10**9; #frequency\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #wavelength\n", + "print 'The wavelength of 15 GHz is, = %.2f m'%(lembda);\n", + "\n", + "d = 41.*10**6; #m\n", + "Pt = 50.; #W\n", + "Gt = 10.**4;\n", + "Gr = 10.**5\n", + "Pr = lembda**2*Gr*Gt*Pt/((4*math.pi)**2*d**2);\n", + "print 'The power density is , Pr = %.1f pW'%(Pr*10**12);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of 15 GHz is, = 0.02 m\n", + "The power density is , Pr = 75.3 pW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.7 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Pt = 2000.; #W\n", + "Irms = 5.;\n", + "\n", + "# Calculations\n", + "Rrad = Pt/Irms**2;\n", + "\n", + "# Results\n", + "print 'The radiation resistance is , Rrad = %i ohm'%(Rrad);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radiation resistance is , Rrad = 80 ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.11 Page No : 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "#misprinted example number\n", + "c = 3.*10**8; #speed of light\n", + "f = 10.*10**9; #frequency\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #wavelength\n", + "print 'The wavelength of 2GHz is, = %.2f m'%(lembda);\n", + "D = 12; #m\n", + "Ap = math.pi*D**2/4;\n", + "print ' a)The physical area is ,Ap = %.2f m**2 '%(Ap);\n", + "n1 = .7; #efficiency\n", + "Ae = n1*Ap;\n", + "print ' The effective capture area is ,Ae = %.2f m**2'%(Ae);\n", + "G = 4*math.pi*Ae/lembda**2;\n", + "print ' b) The gain is ,G = %i'%(G);\n", + "GdB = 10*math.log10(G);\n", + "print ' The gaindB) is , GdB = %.1f dB'%(GdB);\n", + "theta_3dB = 70*lembda/D;\n", + "print ' c) The 3 dB beamwidth = %.3f degrees'%(theta_3dB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of 2GHz is, = 0.03 m\n", + " a)The physical area is ,Ap = 113.10 m**2 \n", + " The effective capture area is ,Ae = 79.17 m**2\n", + " b) The gain is ,G = 1105395\n", + " The gaindB) is , GdB = 60.4 dB\n", + " c) The 3 dB beamwidth = 0.175 degrees\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.12 Page No : 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "c = 3.*10**8; #speed of light\n", + "f = 100.*10**6; #frequency\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #wavelength\n", + "print 'The wavelength of 2GHz is, = %i m'%(lembda);\n", + "Ac = 0.13*lembda**2;\n", + "print 'The capture area is , Ac = %.2f m**2'%(Ac);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of 2GHz is, = 3 m\n", + "The capture area is , Ac = 1.17 m**2\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..13b125cb --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch16.ipynb @@ -0,0 +1,576 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:615d7f0f6b3e955a50e2f9605f0b653dcb4d15c58dac91605793187b40e98aa3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : Communication link analysis and Design" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Page No : 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "c = 3.*10**8; #speed of light\n", + "Pt = 5. #W\n", + "GtdB = 13.; #dB\n", + "GrdB = 17.; #dB\n", + "d = 80.*10**3; #metre\n", + "f = 3.*10**9; #frequency\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #wavelength\n", + "print 'The wavelength is, = %.1f m'%(lembda);\n", + "\n", + "Gt = 10**(GtdB/10);\n", + "Gr = 10**(GrdB/10);\n", + "print ' Gt = %.2f '%(Gt);\n", + "print ' Gr = %.2f '%(Gr);\n", + "Pr = lembda**2*Gt*Gr*Pt/((4*math.pi)**2*d**2);\n", + "print ' Pr = %.1f pW '%(Pr*10**12);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength is, = 0.1 m\n", + " Gt = 19.95 \n", + " Gr = 50.12 \n", + " Pr = 49.5 pW \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page No : 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "c = 3.*10**8; #speed of light\n", + "Pt = 5. #W\n", + "GtdB = 13.; #dB\n", + "GrdB = 17.; #dB\n", + "d = 80.; #in km\n", + "f = 3.; #frequency in GHz\n", + "\n", + "# Calculations and Results\n", + "PtdBW = 10*math.log10(Pt);\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print 'The path loss is, (alfa_1dB) = %.2f dB'%(alfa1_dB);\n", + "\n", + "PrdBW = PtdBW+GtdB+GrdB-alfa1_dB; #calculation of recieved power in dB\n", + "print ' PrdBW) = %.2f dBW'%(PrdBW)\n", + " \n", + "Pr = 10**(PrdBW/10); #recieved power in Watts\n", + "print ' Pr = %.1f pW '%(Pr*10**12);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The path loss is, (alfa_1dB) = 140.04 dB\n", + " PrdBW) = -103.05 dBW\n", + " Pr = 49.5 pW \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 Page No : 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "d = 240000.*1.609; #in km\n", + "#part a\n", + "f = 100.; #frequency in MHz\n", + "\n", + "# Calculations and Results\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+32.44; #dB\n", + "print 'a) The path loss is %.2f dB'%(alfa1_dB);\n", + "#part b\n", + "f = 1; #frequency in GHz\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print ' b) The path loss is %.2f dB'%(alfa1_dB);\n", + "#part c\n", + "f = 10; #frequency in GHz\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print ' c) The path loss is %.2f dB'%(alfa1_dB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The path loss is 184.18 dB\n", + " b) The path loss is 204.18 dB\n", + " c) The path loss is 224.18 dB\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 Page No : 522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "f = 1.; #in GHz\n", + "#part a\n", + "d = 1.; #in Km\n", + "\n", + "# Calculations and Results\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print 'a) The path loss is %.2f dB'%(alfa1_dB);\n", + "#part b\n", + "d = 10; #in km\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print ' b) The path loss is %.2f dB'%(alfa1_dB);\n", + "#part c\n", + "d = 100; #in km\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #dB\n", + "print ' c) The path loss is %.2f dB'%(alfa1_dB);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The path loss is 92.44 dB\n", + " b) The path loss is 112.44 dB\n", + " c) The path loss is 132.44 dB\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 Page No : 522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pr = 50*10**-12; #in Watts\n", + "GtdB = 3; #dB\n", + "GrdB = 4; #dB\n", + "d = 80; #kilo-metre\n", + "f = 500; #frequency in MHz\n", + "\n", + "# Calculations and Results\n", + "PrdBW = 10*math.log10(Pr); #in dB conversion\n", + "print 'PrdBW) = %.2f dBW'%(PrdBW)\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+32.44; #path loss in dB\n", + "print ' The path loss is, %.2f dB'%(alfa1_dB);\n", + "PtdBW = PrdBW+alfa1_dB-GtdB-GrdB; #calculation of transmitted power in dB\n", + "print ' PtdBW) = %.2f dBW'%(PtdBW)\n", + "Pt = 10**(PtdBW/10); #transmitted power in Watts\n", + "print ' Pt = %.1f W '%(Pt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "PrdBW) = -103.01 dBW\n", + " The path loss is, 124.48 dB\n", + " PtdBW) = 14.47 dBW\n", + " Pt = 28.0 W \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.6 Page No : 523" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pr = 200.; #in f-Watts\n", + "GtdB = 30.; #dB\n", + "GrdB = 20.; #dB\n", + "d = 40000.; #kilo-metre\n", + "f = 4.; #frequency in GHz\n", + "\n", + "# Calculations and Results\n", + "PrdBf = 10*math.log10(Pr); #in dBf conversion\n", + "print 'PrdBf) = %.2f dBf'%(PrdBf)\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d)+92.44; #path loss in dB\n", + "print ' The path loss is, %.2f dB'%(alfa1_dB);\n", + "PtdBf = PrdBf+alfa1_dB-GtdB-GrdB; #calculation of transmitted power in dBf\n", + "PtdBW = PtdBf-150; #calculation of transmitted power in dBW\n", + "print ' PtdBf) = %.2f dBf OR %.2f dBW'%(PtdBf,PtdBW)\n", + "Pt = 10**(PtdBW/10); #transmitted power in Watts\n", + "print ' Pt = %.2f W '%(Pt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "PrdBf) = 23.01 dBf\n", + " The path loss is, 196.52 dB\n", + " PtdBf) = 169.53 dBf OR 19.53 dBW\n", + " Pt = 89.80 W \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.7 Page No : 525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "hT = 50.; #m\n", + "hR = 5.; #m\n", + "\n", + "# Calculations\n", + "d_km = math.sqrt(17*hT)+math.sqrt(17*hR); #in km\n", + "\n", + "# Results\n", + "print ' dkm) = %.2f Km '%(d_km);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " dkm) = 38.37 Km \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8 Page No : 528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Pt = 10000.; #Watts\n", + "Gt = 25.; #dB\n", + "f = 3; #GHz\n", + "d = 50; #km\n", + "sigma = 20 #radar cross section in m**2\n", + "\n", + "# Calculations and Results\n", + "alfa2_dB = 20*math.log10(f)+40*math.log10(d)+163.43-10*math.log10(sigma); #alfa2(dB) calculation\n", + "print ' The two way path loss is (alfa2dB) = %.2f dB'%(alfa2_dB);\n", + "PtdBW = 10*math.log10(Pt); #transmitted power in dB\n", + "print ' PtdBW) = %i dBW'%(PtdBW)\n", + "PrdBW = PtdBW+2*Gt-alfa2_dB #dBW\n", + "print ' PrdBW) = %.2f dBW '%(PrdBW);\n", + "Pr = 10**(PrdBW/10);\n", + "print ' Pr = %.2f fW'%(Pr*10**15);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The two way path loss is (alfa2dB) = 227.92 dB\n", + " PtdBW) = 40 dBW\n", + " PrdBW) = -137.92 dBW \n", + " Pr = 16.14 fW\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.9 Page No : 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 3*10**8; #speed of light in m/s\n", + "Td = 400*10**-6 #s\n", + "\n", + "# Calculations\n", + "d = c*Td/2. #in m\n", + "\n", + "# Results\n", + "print ' d = %.0f Km '%(d*10**-3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " d = 60 Km \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.10 Page No : 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 3.*10**8; #speed of light in m/s\n", + "fp = 2.*10**3; #Hz\n", + "\n", + "# Calculations and Results\n", + "T = 1./fp #s\n", + "dmax = c*T/2 #in m\n", + "print 'a) d max = %.0f Km '%(dmax*10**-3);\n", + "tau = 6.*10**-6; #s\n", + "dmin = c*tau/2 #m\n", + "print 'b) d min = %.0f m '%(dmin);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) d max = 75 Km \n", + "b) d min = 900 m \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.11 Page No : 532" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 3.*10**8; #speed of light in m/s\n", + "fc = 15.*10**9; #Hz\n", + "v = 25. # speed in m/s\n", + "\n", + "# Calculations\n", + "fD = 2*v/c*fc; #Hz\n", + "\n", + "# Results\n", + "print 'Doppler shift , fD = %.0f Hz '%(fD);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Doppler shift , fD = 2500 Hz \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.12 Page No : 532" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "c = 186000.; #speed of light in mi/s\n", + "fc = 10.*10**9; #Hz\n", + "fD = 2.*10**3; #frequency shift in Hz\n", + "\n", + "# Calculations and Results\n", + "v = c*fD/(2*fc); #speed in mi/s\n", + "print 'Speed of automobile , v = %.2f*10**-3 mi/s '%(v*10**3);\n", + "v = 3600*v;\n", + "print ' v = %.1f mi/hr '%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of automobile , v = 18.60*10**-3 mi/s \n", + " v = 67.0 mi/hr \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.13 Page No : 535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "n1 = 1.; #refraction index of air\n", + "E2 = 4. #material dielectric consmath.tant\n", + "theta_i = 50. #angle of incidence in degree (misprinted in the solution)\n", + "\n", + "# Calculations\n", + "n2 = math.sqrt(E2);\n", + "theta_r = math.asin(n1/n2*math.sin(theta_i*math.pi/180));\n", + "\n", + "# Results\n", + "print ' The angle of refraction is %.2f using angle of incidence = 50)'%(theta_r*180/math.pi);\n", + "#misprinted angle \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The angle of refraction is 22.52 using angle of incidence = 50)\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8d138368 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch17.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6adfb962c162522a5b4c85ba98a9b356a9133d8e8a683421e650fcbf769672f6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : Satellite communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page No : 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "H = 10.**6; #meter\n", + "\n", + "# Calculations and Results\n", + "v = 20*10**6/math.sqrt(H+6.4*10**6); #m/s\n", + "print 'a)velocity , v = %i m/s'%(v);\n", + "R = 6.4*10**6; #data rate in bits per second\n", + "C = 2*math.pi*(H+R); #circumference in m\n", + "print ' b)circumference , C = %i m'%(C); #raunded value of C shown in book solution\n", + "T = C/v;\n", + "print ' c)The period is , T = %.2f seconds or %.2f minutes'%(T,T/60);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)velocity , v = 7352 m/s\n", + " b)circumference , C = 46495571 m\n", + " c)The period is , T = 6324.08 seconds or 105.40 minutes\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page No : 548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L = 37; #latitude in degree\n", + "R = 6400.; \n", + "H = 36000.; #from the text\n", + "\n", + "# Calculations\n", + "del1 = math.atan(R*math.sin(L*math.pi/180)/(H+R*(1-math.cos(L*math.pi/180)))) #Declination angle\n", + "\n", + "# Results\n", + "print 'The ange is %.2f degree'%(del1*180/math.pi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ange is 5.90 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 Page No : 552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "c = 3.*10**8; #speed of light in m/s\n", + "f = 3.7*10**9; #Hz\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #m\n", + "print 'The wave length is %.4f cm '%(lembda*100)\n", + "theta_3dB = 8; #degree\n", + "D = 70*lembda/theta_3dB #m\n", + "print 'The diameter is, D = %.4f m '%(D);\n", + "eta_1 = .6; #illumination efficiency \n", + "G = eta_1*(math.pi*D/lembda)**2; #gain calculation\n", + "print 'The Gain is G = %.2f '%(G)\n", + "G_dB = 10*math.log10(G); #dB gain\n", + "print 'The Gain in dB is GdB) = %.3f dB '%(G_dB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wave length is 8.1081 cm \n", + "The diameter is, D = 0.7095 m \n", + "The Gain is G = 453.38 \n", + "The Gain in dB is GdB) = 26.565 dB \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4 Page No : 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "theta_3dB = 1.6; # beamwidth in degree\n", + "eta_1 = .6; #illumination efficiency \n", + "\n", + "# Calculations and Results\n", + "G = eta_1*48000/(theta_3dB)**2; #gain calculation\n", + "print 'The Gain is G = %.0f '%(G)\n", + "G_dB = 10*math.log10(G); #dB gain\n", + "print 'The Gain in dB is GdB) = %.1f dB '%(G_dB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Gain is G = 11250 \n", + "The Gain in dB is GdB) = 40.5 dB \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.5 Page No : 554" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "theta_3dB = .3; # minimum practical beamwidth in degree\n", + "eta_1 = .6; #illumination efficiency \n", + "\n", + "# Calculations and Results\n", + "G = eta_1*48000/(theta_3dB)**2; #gain calculation\n", + "print 'The Gain is G = %.0f '%(G)\n", + "G_dB = 10*math.log10(G); #dB gain\n", + "print 'The Gain in dB is GdB) = %.1f dB '%(G_dB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Gain is G = 320000 \n", + "The Gain in dB is GdB) = 55.1 dB \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.6 Page No : 554" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "c = 3*10**8; #speed of light in m/s\n", + "f = 5.925*10**9; #Hz\n", + "\n", + "# Calculations and Results\n", + "lembda = c/f; #m\n", + "print 'The wave length is %.3f cm '%(lembda*100)\n", + "theta_3dB = 1.6; # beamwidth degree\n", + "D = 70*lembda/theta_3dB #m\n", + "print 'The diameter is, D = %.3f m '%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wave length is 5.063 cm \n", + "The diameter is, D = 2.215 m \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.7 Page No : 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "l = 127.-70.2; #Difference in longitude\n", + "L = 40.5 #Latitude of New York\n", + "\n", + "# Calculations\n", + "d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));\n", + "\n", + "# Results\n", + "print 'The distance is %.0f km '%(d_km)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance is 39932 km \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.8 Page No : 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "PtdBW = 20.\n", + "GtdB = 55.\n", + "\n", + "# Calculations and Results\n", + "EIRP_dBW = PtdBW+GtdB;\n", + "print 'The EIRP for uplink earth station is %.0f dBW '%(EIRP_dBW)\n", + "l = 91-70.2; #Difference in longitude\n", + "L = 40.5 #Latitude of New York\n", + "d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));\n", + "print 'The distance is %.0f km '%(d_km)\n", + "\n", + "f = 6.125 #Uplink frequency in GHz\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d_km)+92.44; #Path loss\n", + "print 'The path loss is %.2f dB '%(alfa1_dB)\n", + "\n", + "FdB = 3; #noise figure in dB\n", + "F = 10**(FdB/10) #absolute noise figure (exact value)\n", + "Te = (F-1)*290; #Noise temperature\n", + "print 'The Noise temperature of satellite reciever is %.0f K '%(Te)\n", + "Ti = 300; #input noise temperature in K\n", + "Tsys = Ti+Te\n", + "print 'The system temperature of satellite reciever is %.0f K '%(Tsys)\n", + "G_dB = 27 #satellite reciever antwnna gain\n", + "GT = G_dB-10*math.log10(Tsys); #G/T ratio in dB\n", + "print 'The G/T ratio for satellite reciever is %.2f dB/K '%(GT)\n", + "B = 36*10**6 ;# Bandwidth in Hz\n", + "L_misc = 1.6 #atmospheric loss\n", + "CN = EIRP_dBW-alfa1_dB+GT+228.6-10*math.log10(B)-L_misc; #C/N in dB\n", + "print 'The carrier power to noise ratio at the satellite reciever is %.2f dB '%(CN)\n", + "# Value of F is rouded to 2 in the text\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The EIRP for uplink earth station is 75 dBW \n", + "The distance is 37897 km \n", + "The path loss is 199.75 dB \n", + "The Noise temperature of satellite reciever is 0 K \n", + "The system temperature of satellite reciever is 300 K \n", + "The G/T ratio for satellite reciever is 2.23 dB/K \n", + "The carrier power to noise ratio at the satellite reciever is 28.91 dB \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.9 Page No : 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "EIRP_dBW = 47.8; #dBW\n", + "l = 91.-90; #Difference in longitude\n", + "L = 32. #Latitude of New York\n", + "\n", + "# Calculations and Results\n", + "d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));\n", + "print 'The distance is %.0f km '%(d_km)\n", + "\n", + "f = 3.9 #downlink frequency in GHz\n", + "alfa1_dB = 20*math.log10(f)+20*math.log10(d_km)+92.44; #Path loss\n", + "print 'The path loss is %.2f dB '%(alfa1_dB)\n", + "\n", + "F = 1.778 #absolute noise figure \n", + "Te = (F-1)*290; #Noise temperature\n", + "print 'The Noise temperature of satellite reciever is %.2f K '%(Te)\n", + "Ti = 150; #input noise temperature in K\n", + "Tsys = Ti+Te\n", + "print 'The system temperature of satellite reciever is %.2f K '%(Tsys)\n", + "G_dB = 42 #satellite reciever antwnna gain\n", + "GT = G_dB-10*math.log10(Tsys); #G/T ratio in dB\n", + "print 'The G/T ratio for satellite reciever is %.2f dB/K '%(GT)\n", + "B = 36*10**6 ;# Bandwidth in Hz\n", + "L_misc = 1 #atmospheric loss\n", + "CN = EIRP_dBW-alfa1_dB+GT+228.6-10*math.log10(B)-L_misc; #C/N in dB\n", + "print 'The carrier power to noise ratio at the satellite reciever is %.1f dB '%(CN)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance is 36911 km \n", + "The path loss is 195.60 dB \n", + "The Noise temperature of satellite reciever is 225.62 K \n", + "The system temperature of satellite reciever is 375.62 K \n", + "The G/T ratio for satellite reciever is 16.25 dB/K \n", + "The carrier power to noise ratio at the satellite reciever is 20.5 dB \n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..14d054c2 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch19.ipynb @@ -0,0 +1,255 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3b8a3271fb321fe3a325e9aa4bee4b7a8e4f014b522b83ed33f340b9e0df99a3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 : Wireless Network communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 Page No : 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "b = [0, 23, 62, 8, 43, 16, 71, 47, 19, 61]\n", + "f9 = [0,0,0,0,0,0,0,0,0,0]\n", + "for i in range(10):\n", + " f9[i] = b[i]+9+2\n", + " if f9[i]>79:\n", + " f9[i] = f9[i]-79\n", + "\n", + " print 'For i = %i ,(bi) = %i. Therefore.f9%i) = [%i+9]mod79)+2 = %i'%(i,b[i],i,b[i],f9[i])\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For i = 0 ,(bi) = 0. Therefore.f90) = [0+9]mod79)+2 = 11\n", + "For i = 1 ,(bi) = 23. Therefore.f91) = [23+9]mod79)+2 = 34\n", + "For i = 2 ,(bi) = 62. Therefore.f92) = [62+9]mod79)+2 = 73\n", + "For i = 3 ,(bi) = 8. Therefore.f93) = [8+9]mod79)+2 = 19\n", + "For i = 4 ,(bi) = 43. Therefore.f94) = [43+9]mod79)+2 = 54\n", + "For i = 5 ,(bi) = 16. Therefore.f95) = [16+9]mod79)+2 = 27\n", + "For i = 6 ,(bi) = 71. Therefore.f96) = [71+9]mod79)+2 = 3\n", + "For i = 7 ,(bi) = 47. Therefore.f97) = [47+9]mod79)+2 = 58\n", + "For i = 8 ,(bi) = 19. Therefore.f98) = [19+9]mod79)+2 = 30\n", + "For i = 9 ,(bi) = 61. Therefore.f99) = [61+9]mod79)+2 = 72\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.4 Page No : 607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "fd = .160; #in MHz\n", + "Fc = 2411;\n", + "\n", + "# Calculations and Results\n", + "print 'a)fd = %.2f MHz. a 0 is represented by %.2f MHz'%(fd,Fc-fd)\n", + "print 'b)A 1 is represented by %.2f MHz'%(Fc+fd)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)fd = 0.16 MHz. a 0 is represented by 2410.84 MHz\n", + "b)A 1 is represented by 2411.16 MHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.5 Page No : 607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "fd1 = .216; #in MHz\n", + "fd2 = .072; #in MHz\n", + "Fc = 2400+25 ; #MHz\n", + "\n", + "# Calculations and Results\n", + "print 'a)fd1 = %.2f MHz. a 00 is represented by %.3f MHz'%(fd1,Fc-fd1)\n", + "print 'b)A 01 is represented by %.3f MHz'%(Fc-fd2)\n", + "print 'c)A 10 is represented by %.3f MHz'%(Fc+fd1)\n", + "print 'b)A 11 is represented by %.3f MHz'%(Fc+fd2) \n", + "#answer in part a is misprinted in the text\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)fd1 = 0.22 MHz. a 00 is represented by 2424.784 MHz\n", + "b)A 01 is represented by 2424.928 MHz\n", + "c)A 10 is represented by 2425.216 MHz\n", + "b)A 11 is represented by 2425.072 MHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.6 Page No : 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace,sin\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "code = array([0, 1, 0, 1, 1, 0]);\n", + "t = arange(0,2.01,0.01) #for x-axis\n", + "a = sin(2*math.pi*t) #for y-axis\n", + "y = []\n", + "x = []\n", + "for i in range(len(code)):\n", + " if code[i] == 1:\n", + " a = -a;\n", + "\n", + " y = concatenate((y, a))\n", + " x = concatenate((x, 2*math.pi*(t+2*(i-1))))\n", + "\n", + "plot(x,y)\n", + "suptitle('DPSK used to encode 010110')\n", + "xlabel('Time')\n", + "ylabel('amplitude')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 12, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmUbVdd5z9V9areqzcPCZkxeQFCGAIEEhBM84IEkiAg\nigytNg5ts1pp6WUWImhLsmwXoLbSiggKIiqCaBsMM2F4EhTClIlAZoKZE95L3lhz3f7jd473vPvu\ncPY5+7fP71T9PmvVqntvnfre79l7n/3b4zngOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7j\nOI7jlGQJuAb4NnAt8GvAWPa3XcC+7O/fAX47+3w98EHgeuAG4KrsM4CDBe2LgZuBU9Tcdzk189LL\nDwGvTvD9dfgr4CcDjl8L/D1wK/BV5BxzPg08DHys539OA67O/ufDwGT2+eOBrwCzwCU9//OXwAMc\nna7bgSuBW4DPAlsDvDsGGW/agNMaDgNPA54EXABcBLyl8PcvZX9/BvAz2evXA/cBZwFPBn4BWMyO\n72S/fxT4v8CFwF2qZzCc04D/3OD3l6FDN93K8IvAHuCxwB8Bby/87feAn+3zP28H/k/2Pw9nGmQ6\n/wP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GbcC36e7TOxdhb+9GVkVdBPwwoSeBm1IbNJTjoVNkB8C7kWGEO8Cfh5Z3fI5\nmlvW9yPI8M+1dMvShQ37ejIy9n0tslz0DdnnTadVznPpNjia9nQakk7XIsui87LdtK+nID2M4rL/\npj1tAH5AN8BiwJPjOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI6zstlBd7/GfciO3muQ\n24m8s0FfjuM4jmHegtzu23FWBW2+NYjjWCC/BcwuujefvBR5HsKXkIf7/ATwB8iu7U/RvYfb04Hd\nyK1bPk3/m1o6jhk8YDiODqchd5h9CfKsliuBs5DbxrwIueHhnwA/CTwDuRX27zbi1HFKYv1utY7T\nRjpIT2IJub/ROHKLcpAb452K3Jjuich9fECeinhvUpeOE4gHDMfRYT77vQwsFD5fRq67MeQOps9O\n7MtxKuNDUo4Tn7HRh3Az8sCf/FG9k8iz3x3HLB4wHKcencLvfq/h6KeYdZBex8uBt9O9tfoP69l0\nHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxHMdxTPH/AWajnxpKqjn3AAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.7 Page No : 609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace,sin\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "code = array([0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1]);\n", + "t = arange(0,2.01,.01) #for x-axis\n", + "y = []\n", + "x = []\n", + "p = 0 #phase shift\n", + "for i in range(0,len(code),2):\n", + " if code[i] == 0:\n", + " if code[i+1] == 0:\n", + " p = p+0\n", + " else:\n", + " p = p+math.pi/2\n", + " else:\n", + " if code[i+1] == 1:\n", + " p = p+math.pi\n", + " else:\n", + " p = p+3*math.pi/2\n", + " y = concatenate((y, sin(2*math.pi*t+p)));\n", + " x = concatenate((x, 2*math.pi*(t+(i-1))));\n", + "\n", + "plot(x,y);\n", + "suptitle('DQPSK used to encode 001110000001')\n", + "xlabel('Time')\n", + "ylabel('amplitude');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXuUHFd95z8zo9GMZkYaPS35IVvG2DJvv9bmYdaCgLEN\nGMiaABtYQ85hyYMTlpAsmGXX8knYBHaXsIEADhsI2eRAEgKsITYECAIOSQw2tsHGtvySbb1ly5JG\n0ozm1fvHr8pd06rurse9v7rV+n3O6TPdNd31/d1H3d+993frFhiGYRiGYRiGYRiGYRiGYRiGYRiG\nYRiGYRiGYRiGYRiGYfQUc8AdwN3AncDvAH2J/18K3ArcG73emfjfZmB79PufA6+Njm8EtkTHfwHc\nGB3fBHw98fs/AG4BFrtJSkfeDnwi5fhlwIsU9MuwDViZ4/tnImX2APAlYDDxvz+Jjt8FnJ84/jlg\nD1KOSd4I3IPUkwsSx1cC3wMmOD5fL4zO8wDwvxPHh4C/iY7/K3BG4n/XAluj138omZYrgPui/70/\nQ1oMw8jIROL9GuDbiCMAWAc8CpwXfV4F3AZcFX2+HnEwAOcC+xBn8y2azgPgudHfTTQdxoeA7yKN\niAZvJ91hbAbep2RDUR4hn8P4W+BXovefBn49en8VcHP0/hKk0Y55KdLotjqMc4FzEOeQbGRHgJcA\n7+L4fP0xcHH0/makAQf4TeBT0fs3IQ4AJG0PAcuj10PAeMG0DAAPAhsQ53In8KwuaTEMIyMTLZ/P\nBJ6I3v8+TecR83Lg+9H761nY2O5CnM5dpF+QlyEO433AD5FGJ40tSC8VYDXSYAI8B+lt3hFpnBUd\nf2vi+GeA/uj4O4D7o//9G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8RR4mOu+FWAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b4b74781 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch2.ipynb @@ -0,0 +1,550 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:864553603dd4721841ece01ff88819765d78956507068d6cf100b7669fda390f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Spectral Analysis I Fourier Series" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations and Results\n", + "#v(t) = 12coos(2pi*2000t)\n", + "A = 12.; #in volts\n", + "print '(a) The amplitude is idetified as',A,'V'\n", + "\n", + "w = 2*math.pi*2000;\n", + "print '(b) The radian frequincy is',w,'rad/s'\n", + "\n", + "f = w/(2*math.pi);\n", + "print '(c) The cyclic frequency is',f,'Hz'\n", + "\n", + "T = 1/f;\n", + "print '(d) The period is',T,'s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude is idetified as 12.0 V\n", + "(b) The radian frequincy is 12566.3706144 rad/s\n", + "(c) The cyclic frequency is 2000.0 Hz\n", + "(d) The period is 0.0005 s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import acot\n", + "\n", + "# Variables\n", + "#i(t) = 4math.cos50t + 3math.sin50t\n", + "A = 4.;\n", + "B = 3.;\n", + "\n", + "# Calculations and Results\n", + "C = math.sqrt(A**2+B**2); #right triangle\n", + "theta = -1*math.atan(3./4); #in rad\n", + "print '(a) The current is expressed as 5math.cos(50t + theta),where theta is',theta,'rad'\n", + "\n", + "phi = math.radians(acot(3./4)); #from figure 2.5 in radian\n", + "print '(b) The current is expressed as 5math.sin(50t+phi), where phi is',phi,'rad',\n", + "\n", + "phi = phi*180/math.pi;\n", + "print 'or',phi,'degrees'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The current is expressed as 5math.cos(50t + theta),where theta is -0.643501108793 rad\n", + "(b) The current is expressed as 5math.sin(50t+phi), where phi is 0.0161843546921 rad or 0.927295218002 degrees\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 12.5*10**-6; #in sec\n", + "f0 = 0; #dc\n", + "\n", + "# Calculations\n", + "f1 = 1./T*10**-3; #in kHz\n", + "f2 = f0+2*f1;\n", + "f3 = f0+3*f1;\n", + "f4 = f0+4*f1;\n", + "\n", + "# Results\n", + "print 'The lowest five frequencies are (in kH)',f0,f1,f2,f3,f4,'kHz'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest five frequencies are (in kH) 0 80.0 160.0 240.0 320.0 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,arange,concatenate\n", + "from matplotlib.pylab import plot,suptitle,xlabel,ylabel\n", + "\n", + "# Variables\n", + "#all frequencies are in Hz\n", + "f = 0;\n", + "f1 = 500.; #fundamental freq.\n", + "f2 = 1000.; \n", + "f3 = 1500.; #harmonics\n", + "print (f3,f2,f1,f,'(a) The frequencies in signal are');\n", + "#for plot\n", + "fHz = arange(0,1600);\n", + "Cn = concatenate(([5],zeros(499),[8],zeros(499),[6],zeros(499), [3], zeros(99)))\n", + "\n", + "plot(fHz,Cn)#,[3],rect = [-0.5,0,1550,10])\n", + "suptitle('Linear amplitude spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('Cn(V)')\n", + "#xgrid\n", + "print ('(c) The required bandwidth is 1500 Hz');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1500.0, 1000.0, 500.0, 0, '(a) The frequencies in signal are')\n", + "(c) The required bandwidth is 1500 Hz" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEhCAYAAACZRRzKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFv9JREFUeJzt3XuUHFWdwPFv5wUkCBHJEljQ0SAquioBFYHRRiOLHsDV\ndc+KiIh7xOMLxCfgSTJBFEFddNfXKorhKQ/BFVdQzNKaWZRHCJAAQQkBA0jg4AviLq/0/nGr6Z5O\nd093uqvrdtf3c86cqa6pqfvrqu77q3tvPUCSJEmSJEmSJEmSJEmSJEnSEHm0wbz3AUf2O5CUlID5\nyfR/AdsB2wPv34J1FYHLexJV97b0PUjSBI9kUGYh+emHq6kmgYoRYNUWrKtIPElghObvYVof49AQ\nmJJ1AIrOGPCxZLoEfB64FrgDOCCZPxX4AnAdcDNwTDJ/W+DnwArgFuCwZP5I8v9LCZXXrnVlLkzW\ntQr4j5r5JeBfgeuB24FXAJcBvwE+U7Pu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g6TNLQcOrXl9FhNvFvfPhDujvqGfQUlpMAlI\nnXkJ4T70ozhOoCHgmIAUnsm6dJJlyoQ7d14AHEnoIpIGni0B5VnlSP7ZwF9r5jU7wj8sWfbMmmXn\npxadJKkvTid080iSJEmSJEmSJEmSJEmSJEmSJEkD6/8B7+2L/MsS068AAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,concatenate\n", + "from matplotlib.pylab import plot,suptitle,xlabel,ylabel,title\n", + "\n", + "#page no 43\n", + "#problem 2.5\n", + "\n", + "# Variables\n", + "#All voltages are in V\n", + "#All power in watts\n", + "R = 5.; #ohm\n", + "C0 = 5.; #dc value\n", + "C1 = 8.;\n", + "C2 = 6.;\n", + "C3 = 3.; #volts\n", + "\n", + "# Calculations and Results\n", + "Vrms = math.sqrt(C0**2+0.5*(C1**2+C2**2+C3**2)); #rms voltage\n", + "print '(a) The rms value of voltage is',Vrms\n", + "\n", + "P = Vrms**2/R; #watts\n", + "print '(b) The average power dissipated in resistor is',P,'W'\n", + "\n", + "P0 = C0**2/R;\n", + "print '(c) The dc power is ',P0\n", + "\n", + "P1 = C1**2/(2*R);\n", + "print 'The power in fundamental is',P1\n", + "\n", + "P2 = C2**2/(2*R);\n", + "P3 = C3**2/(2*R);\n", + "print 'The second and third harmonics are',P2,P3\n", + "#for plot\n", + "fHz = range(1600);\n", + "f1 = 500; #fundamental freq.\n", + "f2 = 1000; f3 = 1500; \n", + "Pn = concatenate(([P0],zeros(499), [P1], zeros(499), [P2], zeros(499), [P3], zeros(99)))\n", + "plot(fHz,Pn,color=\"red\")#,rect = [0,0,1600,8])\n", + "suptitle('Power spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('Pn(W)')\n", + "#xgrid\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The rms value of voltage is 8.91627725006\n", + "(b) The average power dissipated in resistor is 15.9 W\n", + "(c) The dc power is 5.0\n", + "The power in fundamental is 6.4\n", + "The second and third harmonics are 3.6 0.9\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 12, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEhCAYAAACZRRzKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFKZJREFUeJzt3XuUJGV9h/Gn2dnlsgjLZY9cdXWRHFGRmwaFMU0ERA5g\nRI9C1BjJiZeEi8Qb6AFmjRJFPKBGMBFBBCQxoEaMNzB02AmICHsFQVl2CaiAxysXEZbt/PFW0z2z\n0709M131vl31fM6Z093VNVW/6Z6ub73vW1UNkiRJkiRJkiRJkiRJkiRJkjRjTwHLgFXAV4At45Yz\ncO+mfH+TJA3Mwx33LwdOzXl9Izkvf7K1wA5dntusyEKkfvmPqVjGgT2A7YCvAyuAm4AXZc+vBLYB\nasCvgLdk078EvJLwv/sJ4IfZ7749e74OLAX+E7h90jrnAF8ktERWAqdk0xvA+bRbKS/Jps8HLgZu\nBm4DjulYzrnZvCuAE4GTgF2A64HvZ/M9ks23HHgZsA7YPnvugGxegDHgUuCGbJ5js99bCXyb4sNM\nknLRagmMEDb87wA+A5yRTT+EsCEGuBA4EnghYUP/L9n0nxC6XN4OfCibtjlwC7CIEAKPAM+eYv37\nA9/reLxNdnt9x/JHCRt3gLOBN2X3FwB3AVsB7yJ0Z7V2orbLbtfS3sgDbABe3/G48/nJIXADIVz2\nBh4DXpU991XgNVP8LdJAuIehIm1JeyN/A+297GOzadcTulOeQdibfwVwLyEQ3k7Y0/4N8AfgcEKr\nobWR3YbQslhPCI17p1j/GuC5wKeB/2JiIFyZ3S7NlrVtto6jgfdmz20OPI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oBBwTkMJ3sl66iXmahCt3Xgm8hdBF\nJA09WwKqstae/LOAxzqmddvDPyab96KOeffLrTpJUiHOIXTzSJIkSZIkSZIkSZIkSZIkSZIkSUPr\n/wGx3MelLpqZYgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#All frequencies in Hz\n", + "#There is no dc component\n", + "T = 4.*10**-3;\n", + "\n", + "# Calculations and Results\n", + "f1 = 1/T;\n", + "print 'The fundmental frequency is',f1\n", + "\n", + "#The function have only odd numbered components\n", + "print 'The five lowest frequencies are ',f1,f1*3,f1*5,f1*7,f1*9\n", + "print ('(b) The rolloff rate is -6dB/octave');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fundmental frequency is 250.0\n", + "The five lowest frequencies are 250.0 750.0 1250.0 1750.0 2250.0\n", + "(b) The rolloff rate is -6dB/octave\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#All frequencies in kHz\n", + "#The time is in ms\n", + "#Power in WATTS\n", + "#All voltage in volts\n", + "T = 0.2; #ms\n", + "\n", + "# Calculations and Results\n", + "f1 = 1/T;\n", + "print 'The fundamental frequency is',f1\n", + "\n", + "#There are only odd numbered harmonics\n", + "Ap2p = 40.; # peak to peak\n", + "R = 50.; #ohm\n", + "A = Ap2p/2;\n", + "C1 = 4*A/math.pi;\n", + "C3 = 4*A/(3*math.pi);\n", + "C5 = 4*A/(5*math.pi);\n", + "print 'The magnitude of fundamental , third and fifth harmonics are ',C1,C3,C5,'respectively',\n", + "def Power(Cn,R):\n", + " return Cn**2/(2*R);\n", + "\n", + "P1 = Power(C1,R);\n", + "P3 = Power(C3,R);\n", + "P5 = Power(C5,R);\n", + "#power is calculated umath.sing the function Power defined above\n", + "print ('Frequency Amplitude Power')\n", + "table = [[f1,C1,P1],[3*f1,C3,P3],[5*f1,C5,P5]];\n", + "print (table);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fundamental frequency is 5.0\n", + "The magnitude of fundamental , third and fifth harmonics are 25.4647908947 8.48826363157 5.09295817894 respectively Frequency Amplitude Power\n", + "[[5.0, 25.464790894703256, 6.4845557531096185], [15.0, 8.48826363156775, 0.7205061947899574], [25.0, 5.092958178940651, 0.2593822301243847]]\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#All frequencies in kHz\n", + "#The time is in ms\n", + "#Power in WATTS\n", + "#All voltage in volts\n", + "#following values are copied from Ex2-7\n", + "T = 0.2; #ms\n", + "f1 = 1/T;\n", + "#There are only odd numbered harmonics\n", + "Ap2p = 40.; # peak to peak\n", + "R = 50.; #ohm\n", + "\n", + "# Calculations\n", + "A = Ap2p/2;\n", + "C1 = 4*A/math.pi;\n", + "C3 = 4*A/(3*math.pi);\n", + "C5 = 4*A/(5*math.pi);\n", + "def Power(Cn,R):\n", + " return Cn**2/(2*R);\n", + "\n", + "P1 = Power(C1,R);\n", + "P3 = Power(C3,R);\n", + "P5 = Power(C5,R);\n", + "\n", + "# Results\n", + "Vrms = A;\n", + "P = Vrms**2/R;\n", + "print 'Total power is',P,\"W\"\n", + "P135 = P1+P3+P5\n", + "print 'Power of fundamental , third and fifth harmonics is',P135\n", + "prcnt = P135/P*100;\n", + "print 'The percent of power is ',prcnt\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power is 8.0 W\n", + "Power of fundamental , third and fifth harmonics is 7.46444417802\n", + "The percent of power is 93.3055522253\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,concatenate,array,arange\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "\n", + "\n", + "# Variables\n", + "f0 = 0;\n", + "f1 = 500.; #fundamental freq.\n", + "f2 = 1000.; \n", + "f3 = 1500.; #harmonics\n", + "\n", + "# Calculations and Results\n", + "#Values from ex 2.4\n", + "C = [5, 8, 6, 3]# Values in Volts\n", + "#Values from ex 2.5\n", + "P = [5, 6.4, 3.6, .9]; #poweer in watts\n", + "\n", + "# plot two sided linear amplitude spectrum\n", + "#fHz = -1510:10**-2:1510; #x-axis matrix\n", + "fHz = arange(-1510,1510.01,10**-2)\n", + "\n", + "#Y-axis matrix\n", + "Cn = [C[0]]\n", + "for i in range(1,4):\n", + " Cn = concatenate(([zeros(49999), Cn, zeros(49999)]))\n", + " Cn = concatenate(([C[i]/2], Cn, [C[i]/2]));\n", + "\n", + "Cn = concatenate((zeros(1000), Cn, zeros(1000)))\n", + "subplot(211)\n", + "plot(fHz,Cn)#,[2],rect = [-2000,0,2000,6])\n", + "suptitle('Two-sided Linear amplitude spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('Vn(V)')\n", + "\n", + "# plot two power spectrum\n", + "fHz = arange(-1510,1510.01,10**-2); #x-axis matrix\n", + "#Y-axis matrix\n", + "Pn = [P[0]]\n", + "for i in range(1,4):\n", + " Pn = concatenate((zeros(49999), Pn, zeros(49999)))\n", + " Pn = concatenate(([P[i]/2], Pn ,[P[i]/2]));\n", + "\n", + "Pn = concatenate((zeros(1000), Pn ,zeros(1000)))\n", + "subplot(212)\n", + "plot(fHz,Pn)#,[6],rect = [-2000,0,2000,6])\n", + "suptitle('Two-sided power spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('Pn(W)')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 17, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEhCAYAAACZRRzKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4XFWZ7/FvkYQwJOKlkwsBIocEeQSUC8SLXoi3T99u\naEBBhseWvg7d2I99274y2SgmPJLExgGERr1c8ekHUAJNlKEV6JYhCtUdFBJjpsMQTI5JrpwMaJMg\nMScTOfePdxW1U6lhV9Ue1qr9+zxPPbXPrmG/Z1XVevdaa++9QERERERERERERERERERERERERERE\nRHrIscA2d3sD2B35e2wK27sH+Had9dOB7W2+12rga11HFKYfAP8p7yBEpLc8CTyU07Y7SQKrgBtS\niKUTaSTMZnZhCbyeUVkGIuHbL+8AxCujgN+75Q8BI8C73d+7gEOwCvtVYBj4D+C0Bu/1DFaxDwML\n3boy8LBb/oh7bBi4OfK6McAiYKt77G63vgSsAHa47R5C/e/vFmAp1prZDvyFWz8F2ODe83XgIrd+\nGDjSvf8eqi2VQeBqVyb14rkSeM295+s1MYzBWiqV///BFrFNBH7ptrENuD7yPj+PvM99wP3AaGAA\n+xzAPqefu+d8EmvRTXGPfQzY7JbLLq4t7jk3RF73G7JPZiLikSexCno7MAmrcLYCtwKnA79zz9tI\ntaK8A1hf572OxSrriiMj26i0NoaBT7nlhVRbAncDT7jl8VhSmo5VWL/FKuv/glXY9VoCm4EX3PL/\njrzvcuDHbvkqrLIFeA64DrjA/b+V1+7EulwaxXMlVvmeXieGj7hYa///RrH9FPi/bvlot+0/AO4F\nfk11777P3e+iWsnj4rgp8nf08doksAVLLhe71810jw0BX6rzv4hIQVSS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T\n81CHcXWqNrbJ7L1nlYcN7v43wA+w7p1NWPLdiHUBvOKeU69ssyzDduLK8zN/JbLsy3dzDJYA7sZ2\nOiGc8qzrbGyke0LN+sqAxv5Yd8sg1b65hVi/Vol9BzJvc8uXkM5A5lPYqHrFBGyQEGAKVsCVJqNP\ncfpanmBf2oqrqLYGO4k5K76d5HgQ1scLcDDwU+xIkBupHrn0efYdMKxXtmnoY9+B4XbjyuIzr43T\nt+9mCeu/v6Vmva/lGcsqYB31D7GciQ1krAT+NLK+cmjTauCbkfVjgfuoHtLYl2CcF2J9wMNYtn3U\nrb8YO1RrKfAL4P2exgl+lWfUXOzQxuXYns1hkcfajTlLPp3keAz2Y1+GfR8r8RyKjRPUO3SwUdkm\nbR7WmtyJfTcv7TCutD/z2jg/gX/fzenYgTTLqNaZZ+NneYqIiIiIiIiIiIiIiIiIiIiIiIiIiIj4\n6nLgBewMzYp+9r1Ex3ex80ZEek6aE82L+O5T2CVN1rd4ns/XwBHpSlZXERXxzbexy4E8BlwZ4/kl\n7EzMytmcA1QvlS4iIgGqN1lLP7CFamW/FPgP4KKa590I3JByfCKpU3eQyL4WAOdF/v4Oe1+E7cPY\n5cU7ueqriFeUBETa805sasL3oXEC6QEaExCx6/Pf1eI5I9gVHOcBH8O6iESCp5aAFFllT/5twLbI\nukZ7+OdtCNOQAAAAMklEQVS7594eee6pqUUnIiKZuBHr5hERERERERERERERERERERERERERERER\nEREJ1v8H4LIMj4yPOCMAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..fab5433e --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch20.ipynb @@ -0,0 +1,275 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4d772ceb697010a6070b0f71f390c487e44edcdb77789475508cd72b0c2457de" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20 : Optical communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1 Page No : 616" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#page no 616\n", + "#prob no. 20.1\n", + "\n", + "# Variables\n", + "lembda = 1300.*10**-9; #wavwlength in m\n", + "c = 3*10**8; #speed of light in m/s\n", + "\n", + "# Calculations\n", + "f = c/lembda #in Hz\n", + "\n", + "# Results\n", + "print 'frequency of laser is ,f = %.0f THz'%(f*10**-12);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency of laser is ,f = 231 THz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.2 Page No : 619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "theta_i = 30; #degree\n", + "ni = 1.00; #incident refraction index\n", + "nr = 1.52; #refeacted ray refraction index\n", + "\n", + "# Calculations\n", + "theta_r = math.asin(ni/nr*math.sin(theta_i*math.pi/180)); #in radians\n", + "\n", + "# Results\n", + "print 'angle of refraction is %.2f degree'%(theta_r*180/math.pi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle of refraction is 19.20 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.3 Page No : 620" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "theta_r = 90.; #degree\n", + "ni = 1.52; #refraction index for crown glass\n", + "nr = 1.00; #refraction index for air\n", + "\n", + "# Calculations\n", + "theta_i = math.asin(nr/ni*math.sin(theta_r*math.pi/180)); #in radians\n", + "\n", + "# Results\n", + "print 'critical angle is %.2f degree'%(theta_i*180/math.pi);\n", + "#misprinted theta_r in the text\n", + "#values are raunded up in the text\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical angle is 41.14 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.4 Page No : 624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "eta = .8; #efficiency \n", + "lembda = 850; #nm\n", + "\n", + "# Calculations\n", + "R = eta*lembda/1234; # A/W\n", + "\n", + "# Results\n", + "print 'The responsivity of diode is R = %.2f A/W'%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The responsivity of diode is R = 0.55 A/W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.5 Page No : 624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations\n", + "eta = .6; #efficiency \n", + "lembda = 1310; #nm\n", + "\n", + "# Calculations\n", + "R = eta*lembda/1234; # A/W\n", + "\n", + "# Results\n", + "print 'The responsivity of diode is R = %.2f A/W'%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The responsivity of diode is R = 0.64 A/W\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.6 Page No : 627" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations\n", + "L = .4*.8; #loss in dB\n", + "\n", + "# Results\n", + "print 'The loss usong this cable is L = %.2f dB'%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The loss usong this cable is L = 0.32 dB\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.7 Page No : 627" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "L = 2.7*.8; #loss in dB\n", + "\n", + "# Results\n", + "print 'The loss usong multimode cable is L = %.2f dB'%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The loss usong multimode cable is L = 2.16 dB\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..941b7e6c --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch21.ipynb @@ -0,0 +1,169 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7edf74a31616935eaae1cc73e55fbdbf296ee54d0cd2e485e516cd600a46b210" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 : Consumer communication systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1 Page No : 637" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "D1 = 5.;\n", + "\n", + "# Calculations and Results\n", + "GR1 = 3*D1**2*(1+D1);\n", + "print 'The reciever procesmath.sing gain is GR1 = %.0f '%(GR1);\n", + "\n", + "Bt = 200.*10**3; #bandwisth in Hz\n", + "W = 53.*10**3; #highest modulating frequency in Hz\n", + "D2 = Bt/(2*W)-1; #deviation ratio\n", + "print 'D2 = %.3f'%(D2);\n", + "\n", + "GR2 = 3*D2**2*(1+D2);\n", + "print 'The reciever procesmath.sing gain for sterio FM is GR2 = %.3f '%(GR2);\n", + "print 'The ratio of the two gains is GR2/GR1 = %.4f dB'%(GR2/GR1);\n", + "\n", + "dBdiffrence = 10*math.log10(GR2/GR1)\n", + "print 'dB diffrence = %.0f dB'%(dBdiffrence);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reciever procesmath.sing gain is GR1 = 450 \n", + "D2 = 0.887\n", + "The reciever procesmath.sing gain for sterio FM is GR2 = 4.451 \n", + "The ratio of the two gains is GR2/GR1 = 0.0099 dB\n", + "dB diffrence = -20 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.2 Page No : 644" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Results\n", + "print 'The percentage is %.0f '%(483./525*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage is 92 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3 Page No : 644" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "D = 25./15;\n", + "\n", + "# Results\n", + "print 'The deviation ratio is D = %.3f '%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The deviation ratio is D = 1.667 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.4 Page No : 644" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "delta_f = 25 #KHz\n", + "W = 15; #KHz\n", + "\n", + "# Calculations\n", + "Bt = 2*(delta_f+W) #bandwidth\n", + "\n", + "# Results\n", + "print 'The bandwidth is Bt = %i KHz'%(Bt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth is Bt = 80 KHz\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c000bc59 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch3.ipynb @@ -0,0 +1,467 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5d324c12de22a42ed82c05183324620530b3699c74c75c3fa2662d951a0062e9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Spectral Analysis II Fourier Transform and Pulse Spectra" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "A = 1. #arbitrary value provided\n", + "T = 10. #T represents tau (arbitrary value provided)\n", + "#plot for non periodic pulse\n", + "t = arange(-2*T,2*T+0.001,.001)\n", + "vt = concatenate((zeros(15001), ones(9999), zeros(15002)))\n", + "subplot(211)\n", + "plot(t,vt) #,[2],rect = [-2*T,0,2*T,A+1])\n", + "suptitle('(a) Non periodic pulse')\n", + "xlabel('t')\n", + "ylabel('v(t)')\n", + "\n", + "#plot for amplitude spectum\n", + "f = arange(-4/T,4/T,0.001);\n", + "Vf = []\n", + "for i in range(len(f)):\n", + " if f[i] == 0:\n", + " Vf.append(A*T); #according to L'Hopitals rule math.sin(x)/x = 1 at lim x->0\n", + " else:\n", + " Vf.append(A*T*math.sin(math.pi*f[i]*T)/(math.pi*f[i]*T))\n", + "\n", + "\n", + "subplot(212)\n", + "plot(f,Vf)\n", + "suptitle('(b) Amplitude spectrum')\n", + "xlabel('f')\n", + "ylabel('V(f)')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEhCAYAAAB7mQezAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xucl3P+//FHOjiHNpSKIaSQ0yKEIZEki8VaOcT6YR3X\n+bCr8mXXYcnGOqzWqaUc14YsUeNYUjqQSo1KJSJWJalp3r8/XteYz3z6zMw1M5/rel/XZ5732+1z\nm8/hmuvz+lzzmet1vc8gIiIiIiIiIiIiIiIiIiIiIiIiIiIikmibAv8DmgKXAV9Ws923QNsa9nMK\n4IDr8xhbd2BVcP90YHJw/xLg3Hrsbw5wRx7iyof6fgaRGq3nOwApCH8D3gHW1rLdS8ADNbz+B+Ar\n4Ow8xZVtGLBXcP8E4Nh67MMB5XmLqGFq+gzN4wxERCTbUuDI4P5lWOnhK+An4GOgSfDarsCKavbR\nBFiNnbjLsFII2BX/T8Ds4PW5wLXAsuDxmcF2JcBnGc8/mvH7FSWGitLMgVgSKwNWAhewbknAZcQ1\nLYhhKbAkY7vTgs/6A/A1sHuOz3Vn8P4/BtsCDAUWA98Fsb6Rsf192DFaCUzHSmEANwTv82MQR3Wf\nYTqwHJgIjAFGZux7FdCN8MdURKRemlO1pHAZdlLtjp3UvqHqCXcN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jjOTN8DL2N1vCX5CC5DPuJsDjwH/Av7oudbPo9lnBZhjfMVOrBu\n1Ub2NhUDNuMUJs4kCBtnV+AhrI3huxjiylbX4/k2dk79BbA0wrgyhYlxH2BEcL81cDSwBj/tsg1y\nO5Wt69dSc+MzwKH4aWMIE2drKnvYbAi8Rbx19xAuziZYYh0cV1BZ6vI3LyLeNoZm2AjSIqAFtTc+\nd8NPY2mYOCsMxF8bQ5g4t8UaVbvFGllVYeLsSOUV+N7B9nGqy98crI0htb2SWmGNytldF7fBrriz\nHYqf7Bcmzq7Ah9gfbBrWJhK3MHF2x6q8pmDVc5OxK7UkxQgwHPgC+AmrW+0fU3xHYz215mBzfAGc\nF9wq3Bu8PhU7SfhQW5xtsOP2PXYV/jlWfRi32uIcil11V3wXJ8QdYKC2OK/GundPxkoM+8YdIOG+\nmxVSnRhEREREREREREREREREREREREREREREhEuwua+G+Q5ERESSYQY2CE9ERIQHsBHY07BpjUVE\nRJiLTechUjCSuh6DiIh4osQgIiJVKDGIiEgVSgwiDZOWVdNERERERERERERERERERERERERERERE\nREREREREku3/A+Qf7KQGUYJeAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "#plot for impulse function\n", + "t = arange(-2,2.001,.001)\n", + "vt = concatenate((zeros(len(arange(-2,0,.001))), [1], zeros(len(arange(0+.001,2.001,.001))))) #impulse function matrix\n", + "\n", + "subplot(211)\n", + "plot(t,vt)#|,[2],rect = [-2,0,2,2])\n", + "suptitle('(a) Unit Impulse function')\n", + "xlabel('t')\n", + "ylabel('v(t)')\n", + "\n", + "\n", + "#plot for amplitude spectum\n", + "f = arange(-2,2.001,0.001)\n", + "Vf = ones(len(f))\n", + "subplot(212)\n", + "plot(f,Vf)#,[5])\n", + "suptitle('(b) Amplitude spectrum')\n", + "xlabel('f')\n", + "ylabel('V(f)')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 3, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFNJREFUeJzt3Xu0XGV98PHvaQitXARZsCIkaQ8GVLCI2lfg5VKn5VJA\n0Oq7qOIN8FLagohvq9ysObS0FXgtVikFQS5Swa6CVayAROG8tQpBJAlyCZBwDyRcS7mpQE7/+O3D\n7MyZy3NmZs/ec/L9rDUre2Y/Z85vniT7N/t59n5+IEmSJEmSJEmSJEmSJEmSJEkq0KbAfwGzgGOB\n1S3aPQls3eZ93gdMACf2MbY9gV9k2x8GlmTbxwCf6OL9VgCn9yGufuj2M0ht/VrZAWhG+wfgP4GX\nO7T7d+DsNvs/DawBPtqnuBpdDLw1234vcHAX7zEBrO1bRL1p9xlmDzIQSUr1BLBftn0scbaxBvgl\ncCswku17E/Bsi/cYAX5FHNBfIs5aIM4Qfgncne2/Fzge+O/s+WFZu3HgntzrF+Z+fvIMY/LsZ3ci\nub0EPA/8KVPPHCZycd2SxfAE8Giu3Qezz/oc8BiwU5PP9cXs97+QtQU4D3gEeCqL9Ye59mcRffQ8\ncBtx1gZwUvZ7XsjiaPUZbgOeAW4CrgWuyL33L4DdSO9TSeqr2ax7ZnEscbDdkzjYPc66B+IXga2a\nvM+fEAddgJXAqdn2ntn7vYs4eD8H3JntOwV4ONseJw6cmwLbEQfSnWieMCAOpt/J/f67aZ4wTs0+\nwwiwM3F2cSrwKuIAu13W7ku5uPJeyH4OYG7253lEn40Cm2XxfRB4Zxbf5NnBrcQZ2Ruzz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+HE\nuNveLfavIv6yJs0nsma/dYozxSPZn48Rq/buQv8PcL3GWYX+XEMkk9XA1sQqAM0Moj/zUvqmsc28\n7LVBSonzmdz2VcBZxHzQk8WGNi1V6MsUVerL2cDlwD8TiavRsPRpV/YnZvy3bNMm5YbBQbkO+J0W\n+zYi7moH2Bj4MbDfIIJqol2cVejP06hf2XM8zSe9y+jPlL7JTyruRjkTtSlxzqH+TXMXYr6jDKOk\nTXqX1ZeTRmkdZ1X6coRYIeOMNm2q1Kd9dzdwP/XL1c7KXt8G+F6u3QHEFQEriCVJBu09xLjgC8S3\n4quy1/Nxvo74j7uUuOStqnFC+f25BTE30XhZbRX6s1nfHEn9BlWIZf5XEGPa7a6aK1KnOI8i+m0p\n8BPi4DFolwIPE8PNDxLzlFXsy05xVqEvAfYkLhJaSv2YeQDV7FNJkiRJkiRJkiRJkiRJkiRJ0vrt\nGOB24OKyA5EkVVuzlUElSVrH2cAviWJOx5YciySp4soujiX13TDXw5AkDZAJQ5KUxIQhSUpiwpCK\nUcVKcJIkSZIkSZIkSZIkSZIkSZIkSZIkSaqK/wHrniHqXw3VAQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import array,log10\n", + "\n", + "A = 20.; #Volts\n", + "T = 1.*10**-3; #second\n", + "def Fourier_transform(f,T,A):\n", + " if f == 0 :\n", + " return A*T;\n", + " else:\n", + " return A*T*math.sin((math.pi*f*T))/(math.pi*f*T);\n", + " \n", + "print 'a)Equation for fourier transform is Vf) = %.2f * math.sin %.3f*pi*f)/%.3f*pi*f)'%(A*T,T,T);\n", + "#Part b Calculation\n", + "f = [0., 500., 1000, 1500];\n", + "Vf = []\n", + "for i in range(4):\n", + " Vf.append(Fourier_transform(f[i],T,A))\n", + "\n", + "#Part c calculation\n", + "RdB = 20*log10(array(Vf)/.02)\n", + "#Result Table\n", + "print 'fHz Vfin V RdB'\n", + "for i in range(4):\n", + " print '%5i %f %f '%(f[i],Vf[i],RdB[i])\n", + "\n", + "#All values are rounding off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Equation for fourier transform is Vf) = 0.02 * math.sin 0.001*pi*f)/0.001*pi*f)\n", + "fHz Vfin V RdB\n", + " 0 0.020000 0.000000 \n", + " 500 0.012732 -3.922398 \n", + " 1000 0.000000 -328.182780 \n", + " 1500 -0.004244 nan \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "\n", + "#chapter 3\n", + "#page no 85\n", + "#example 3.4\n", + "A = 20.; #Volts\n", + "T = 1.*10**-3; #seconds\n", + "f = arange(-3/T,3/T+1,1); #in kHz\n", + "Vf = []\n", + "for i in range(len(f)):\n", + " if f[i] == 0:\n", + " Vf.append(A*T);\n", + " else:\n", + " Vf.append(A*T*math.sin(math.pi*f[i]*T)/(math.pi*f[i]*T));\n", + " \n", + "plot(f,Vf)#,[5])\n", + "suptitle('Amplitude Spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('V(f)');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAEhCAYAAACgIq2RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYU1W29/FvGEVRFCcUQQSlBcUGUQYBKUERUFBsvU5X\nHK/ziG8DDq2obTu0dju1yHVobVS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llA2UDYTGxuIsOuA9XD/\n9nlkx4B1b6xZvF/c42G5vqhJ2B9BVNiuL15Fk6pzQTN2LThINBG8Oj9HlyLAP4C/xj0eluvbj7JK\ntnrAZOxDbViuL6PewP4I5mKfVg6I+d7tWHXGQuDUmMejJYIlwBMxj9cF/klZqW6zdAVdBcXAt9hE\n2jmUVXNBOK5vADb2sRn71PXvmO+F4foqUt6k6mw3CmtdbsN+dpdS/kRwqPrP0aWuWLfUXMr+5noT\nnutrA3yGXd/nwO/9x8NyfSIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIuW5EVu6fmTMYwXsuqzQi8Dv\nMhOSSObl6vI6IrnqGmwG+XeVHJfr64WJVCisq1qLZKNngObYMvQ3J3F8BJs1Hp1Z/wU2215ERKRK\nvmHXbR0KgPWUJZk5wE/AWXHHPQw8lOb4RDJC3W4i2WEK0C/m/t8pW7ARbCfWY6neiuAiWUfJRyT7\nHQ3cjW1XrXEgCQWN+Yi40QF4qZJjPGw14VHARVhXnEgoqOUjklnRlktTYFPMY+W1aPr7xz4Xc+yx\naYtORERC7WGsO01ERERERERERERERERERERERERERERERERERMSJ/w9TlFKvmLwqkwAAAABJRU5E\nrkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "A = 20.; #Volts\n", + "T = 5.*10**-3; #period in seconds\n", + "tau = 1.*10**-3; #pulse width in second\n", + "d = tau/T; #duty cycle\n", + "f1 = 1/T; #Fundamental frequency in Hz\n", + "\n", + "#for plot\n", + "n = arange(-14,15+1,1); #in Hz\n", + "Vf = zeros(len(n)*200)\n", + "for i in range(len(n)):\n", + " if n[i] == 0:\n", + " Vf[i*200] = A*d;\n", + " else:\n", + " Vf[i*200] = A*d*math.sin(math.pi*d*n[i])/(math.pi*d*n[i]) \n", + "\n", + " #to get the magnitudes of components\n", + " if Vf[i*200] < 0:\n", + " Vf[i*200] = -Vf[i*200]\n", + "\n", + "f = arange(-3000,3000,1)\n", + "plot(f,Vf)#,[5],rect = [-3000,0,3000,5])\n", + "suptitle('Amplitude Spectrum')\n", + "xlabel('f,Hz')\n", + "ylabel('Vn');\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEhCAYAAACOZ4wDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG5hJREFUeJzt3X20HGV9wPHvTQKC0kKRNgUSTIGAptLydpCi1qVWy0sJ\nVPGIFal4euDgQay0FsGX3Gtr8aUWiwpGBQQsbypFCgFEZUGrRCRvIIkQNAjxGNQAgqlAzO0fzyw7\n2ey9M7vZZ+flfj/n7NnZ2Wdnf8/s7vzmeZ6ZWZAkSZIkSZIkSZIkSZIkSZIkDdBxwCZg3wEuswH8\nTzJ9DHBW6r1e0sfymsBBPZQ/FLgTWArcByzo4z0ncyz91UOSKutq4HpgdIDLbNBOFmlfAF7fx/Ju\nAw7sofwPgf2S6REGv2H/AhPXY/qA30uSCrcDsAbYA1iZmt8AbgeuAx4EPgy8BfgesALYMyn3BeAz\nwF2EDfTRqde3ksVbgU8Cfwb8EvgRsCRZRpN2i2EX4MfJ9PbAVYRWwbWEVkIrWbwW+A5wN3AN8IIu\n9VoP/H6X+aPA5cnr7wf+PvXcu5P6LWfzxHlSMm8ZcNkk9TgvWQ9nApeweTJ5KrlvkG+9SlKpvJmw\nsQe4g/YGuQE8BswEtgXW0t6AnkHYMEJIFouS6b2Bh4Hn0T1ZQNiIvi71/ukWQzpZnAl8PpneD3g2\nKbcLYWO7ffLcWcD7u9Tr/YSEcS1wShITSR2WJo9fCPwE2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qddFp2VxJabs8QPreTCeNCX6f7YZe9foZFewWhm2YZ7d/cEdSnjvsBSwj1WwG8\nO5lfl/pJkiRJkiRJkiRJkiRJkiRJksrtDMKloC9PzWuw5WVOvgC8fjghScM3rMt9SFV1GuEM2Z9m\nlKv69YakSZXlqrNSGX0G2JNwWed/yFF+hHBWbOvM4XsIZxNLkmrux2x5mfQG8DjtpLAU+CXwuo5y\nHwU+Ejk+aSjshpL68y3gmNTjS2hfoA3CP/0dSH9X7JVKx2QhDd5LgQWEvzB1HEO14JiFlM8hwKUZ\nZcYJV/u8EngLoWtKqgVbFtLkWi2DPYANqXkTtRjmJ2U/nyp74ARlJUk181FC95IkSZIkSZIkSZIk\nSZIkSZIkSZKkKez/Abi9fJOXUvXmAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "A = 1. #arbitrary value provided\n", + "Tau = 10.**-3 #in seconds\n", + "fc = 30.*10**6; #centre frequency in Hz\n", + "#plot for amplitude spectum\n", + "f = arange(-3/Tau,3/Tau+1);\n", + "Vf = []\n", + "for i in range(len(f)):\n", + " if f[i] == 0:\n", + " Vf.append(A*Tau); #according to L'Hopitals rule math.sin(x)/x = 1 at lim x->0\n", + " else:\n", + " Vf.append(A*Tau*math.sin(math.pi*f[i]*Tau)/(math.pi*f[i]*Tau))\n", + " \n", + "f = f+fc #shifting\n", + "f = f*10**-6 #MHz\n", + "\n", + "plot(f,Vf)#,[5])\n", + "suptitle('Amplitude spectrum')\n", + "xlabel('f,MHz')\n", + "ylabel('Vrf(f)')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 8, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAacAAAEhCAYAAADbBm9dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81nP+//HHqU6LrYRKm5SKJpRomdApSrZKCdky5msy\n1mFQfrhVlq8wY2aMr7IMEhUyCK3SkaVSWqgkbSjTIhOltJ3P74/X53KurnPOda5zzudzva/leb/d\nzu18rs/5LK9PnXO9rvcOIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiGaEPUAC0DPCaecBb/vb5wOCo\nex1XjuvlA+0qHFUwelO+ZxAJRSXXAYiEZADwtv89DG8BD/nbfYBW5biG53+lggso+RkqJzMQEZFM\ndRCwFmgMfBG1Pw94H3gDWAWMAK4APgE+A5r6xz0PjALmAV8C50adHyk5XQX8E+gEbAFWAwv8a+RT\nWCI6HFjjb9cAxgPLgH8Dc4CT/J/1AD4GPgVeAQ4s5rluApYCi4Gx/r5hwBj/3BXA/0Qdf7v/bIv9\n4yKu9PctAl6I8wx/8/8NbgWeA/pFXWN71L9JIv+mIiJZ7zIsuQDMojAB5AH/BeoCVYH1FL5p34S9\nGYMlp0n+9jHAt0A1ik9OYG/cfaPuPzPqntHJ6VbgGX/7eGCPf9zh2Bt8Df9ng4F7inmu9UCuv32I\n/30YsNCP7zDgG+BILNk96R9TyY/7NOA3WMKt7f+sVpxneDzqdWxy2uZ/zyOxf1ORMqniOgCREAyg\n8E3xVf/1Av/1PGCjv70SmOpvLwG6+tseVnqJHLMaOLaUe+YkENdpwD/87c+xkgVAR6xK7WP/ddWo\n7WifYSWmN/yvSKxvArv8r5lAe/9ePbDEBVYSO8b//grwg79/a5xneDmBZ4LE/k1FykTJSTJNbewN\nsTX2xl3Z/367//NdUccWRL0uIP7fQ0Ep941uO9pLYXtu9ZjjYhNA5PV04NJS7nEucDrWGeMurPQV\nL5YHgadifn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/\nwKr42gMXkuTlVzJ5bj2RVDYKaIqtTfQs8Peon32NtQXUwT6lnoW9SUW/mZX0xnYvcL6/XQeYir3J\nSeqYA1TDljSpjbX1gE2LNs3fjjcx8XJsob5pwM/++ZHS1tXYIoD3YG1Ou/39z2Klp/nY79fHWKkr\n2sXA5VGvz2T/aYsOxpLhjoSeUkTSVnHzw3XBJvy8AWsn+C32xjKUwvr957Hpe6Ibsn+KuU5NrPG7\nLZKqulC0zQlsYuKPsDalRPwvcG0x+1tg1X/F+QirHow4EZtyKNpmrCNFSaJ/JwOnaj2R1BIpEb2K\nVe0NAMbFHOMBt2GJJ/IVW6p6CVtyYSGSqoor/fbElpPojbUplSQyZ2JjbD7MSAkrsrpsJeBubBkO\nsCVHDvS3u2PtRcujrjeAoqW0aVi7aESbBOIPjJKTSGraiFXJnAnM8PdFtyvFe2MYhs34PDrOMeJe\ncW2H/8Sq+6az/8TE9YF3oo6bgLUvTQSuo7DkPAArAX2BLVHxvL+/LjbZ6jIs+UW3c4K1T8V+CLoJ\n6zSx2L/XH/z99bDJoW/BEuA3fswikiEi1XrtKUwkeRSu49MJa8SG/atQnqNob73I8uznY72tcoMP\nVyR51CFCxJ3Ip+bGFDYyR3+anl3C8bHb0a9vwT5lf+K/fhMrSYmIiJTJw9jAShERERERERERERER\nEREREREREREREREREREREUkR/x/Ed0+5LtFuYQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "A = 1.; #arbitrary vaule\n", + "T = (1.+4)*10**-3; #period in seconds\n", + "tau = 1.*10**-3; #pulse width in second\n", + "fc = 30.*10**6; #centre frequency in Hz\n", + "d = tau/T; #duty cycle\n", + "f1 = 1/T; #Fundamental frequency in Hz\n", + "\n", + "#for plot\n", + "n = arange(-14,15+1); #in Hz\n", + "Vf = zeros(len(n)*200)\n", + "for i in range(len(n)):\n", + " if n[i] == 0:\n", + " Vf[i*200] = A*d;\n", + " else:\n", + " Vf[i*200] = A*d*math.sin(math.pi*d*n[i])/(math.pi*d*n[i]) \n", + "\n", + "f = arange(-3000,3000)\n", + "f = f+fc; #Shifting by fc\n", + "f = f*10**-6; #in MHz\n", + "\n", + "plot(f,Vf)#,[5])\n", + "suptitle('Amplitude Spectrum')\n", + "xlabel('f,MHz')\n", + "ylabel('Vn');\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEhCAYAAABGC2bVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHJ1JREFUeJzt3X24XFV96PFvyAsGESiaFwmhEQgXEFusPiHWAuO9lKb6\nSKxVMde+UNuKWNAqtWhbS0LbW7XtbWvzFNIKgm0xQIsltYSALYc30RDICylESCAIKUkoXrhEDSTk\n9I+1x9lnMnPOnsleZ7/M9/M885w9e9aeWWvOnv3b62WvDZIkSZIkSZIkSZIkSZIkSZIkKYN3AfuA\n/5HjezaAf0mW3wlckvqsk/p4vyHgTT2knw98E1gLPARc2sdnjmYh/ZVDkgbSdcAKYHGO79mgFWjS\nrgZ+vo/3ux34iR7Sfxt4Q7I8gfyDwtV0L8fEnD9LkirtUGArcAzwcGp9A7gD+GdgC/BZ4BeB1cAG\n4Ngk3dXAFcB9hIP7O1LbNwPNecBfAW8BngUeAx5I3mOIVk3lNcDjyfJUYDmhNnIjoXbSDDRnA98A\n7geuB17ZoVzfBaZ1WL8Y+Ltk+0eAX0u99smkfOsZGXR/KVm3DvjyKOX48+R7+ATwJUYGol3J3wbZ\nvldJqo0PEAIFwJ20DuYN4P8BM4ApwDZaB9+PE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YaCR8nEBcBbwi6l1w4TmkPel1i2iNfVKM037QaqoOffUv7HmCus26etGQq3lSOAQ4B20AtJ/\n0Jot+b20poNZT5hxeSJhPrU3sX8Qez9htuWmvyQ0o80D3sM433KiKnOdSWV2BXAs4d4qVwF/kXrt\nCULb+XTC2ePPEA446QNTt4PUZcA7k+XpwCrCAUvl8U3gYMJtHI4k9I1AmNrq1mR5tElfNxFuGnYr\n8L1k+2Yt6IOEG5J9htBH81Ky/ipCrWYNYf/6BqE2lHYu8Aup52cxcuqZVxEC2/czlVJSKXSar+tM\nwmSKFxLa1X+ScJC4lFZ7+NWEKVjSnbj/v+19Did0/L4RldWZ7N9HA2HS13sIfTBZ/B/gwx3Wn0Bo\nYuvkHkITXNOPE6aNSXuGMIigm/Q+mTubzqR4mjWVGwjNZ4uAr7SlGQZ+ixBEmo/22s4/EKaZX4vK\nqlOtdAFhCv2FhD6Ybppz2B1DmJ+wWfNp3rXyIOD3CLcegHCbhVcmyz9N6F/ZlHq/Rexfe7qV0I/Y\ndGqG/OfGQCPFt4PQ7HEW8G/JunQ/zGg/8sWEmXGvGSWNitepr+2vCE1qtzFy0tejgH9NpftHQn/M\nCuAjtGq0iwg1k4cJ0/JfnayfQZjI8iFCIEv3C0Loz2k/ofkoYcDA+uSzPpSsn0mYePfjhGD2nSTP\nkkqo2XQ2j1ZQaNC6D8lbCB24MLKZ4kvsP+qseQvndxJGDU1GqjAHA0j5aJ7NHkOrgzV9lntvl/Tt\ny+nnHyec/a5Ont9EqOFIkgbY5wkX4UmSJEmSJEmSJEmSJEmSJEmSJEmSBsh/A1VVhJAZkODcAAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "print 'a The RF burst frequency is 500 MHz';\n", + "print ' b The pulse repetition rate is 1 MHz';\n", + "f0 = 10.*10**6; #Zero crosmath.sing frequency in Hz\n", + "tau = 1./f0; #in second\n", + "\n", + "# Results\n", + "print ' c) The pulse width is %.1f micro second'%(tau*10**6);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The RF burst frequency is 500 MHz\n", + " b The pulse repetition rate is 1 MHz\n", + " c) The pulse width is 0.1 micro second\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c94b7f1e --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch4.ipynb @@ -0,0 +1,147 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6400e06363df718a0205b64ca5c3fc7d61a14e362b1dd10172150d22b3db1e89" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Communication Filters and Signal Transmission" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,log10,sqrt\n", + "\n", + "# Variables\n", + "f = array([500., 2000., 10000.]); #frequency in Hz\n", + "\n", + "# Calculations\n", + "Af = 1/sqrt(1+(f/1000)**8); #Linear amplitude response\n", + "AdBf = 20*log10(Af);\n", + "\n", + "# Results\n", + "print ' f,Hz (Af) (AdBf)'\n", + "for i in range(3):\n", + " print ' %5i Hz %.5f %.3f dB'%(f[i],Af[i],AdBf[i])\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " f,Hz (Af) (AdBf)\n", + " 500 Hz 0.99805 -0.017 dB\n", + " 2000 Hz 0.06238 -24.099 dB\n", + " 10000 Hz 0.00010 -80.000 dB\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "L = 4.*10**-6; #Henry\n", + "C = 9.*10**-12; #Farad\n", + "R = 20.*10**3; #ohm\n", + "\n", + "# Calculations and Results\n", + "f0 = 1/(2*math.pi*math.sqrt(L*C)); #frequency in Hz\n", + "print 'a) The resonant frequency is f0 = %.2f MHz'%(f0*10**-6)\n", + "Q = R*math.sqrt(C/L)\n", + "print ' b) The Q is %i'%(Q);\n", + "B = f0/Q;\n", + "print ' c) The 3-dB bandwidth is B = %i KHz'%(B*10**-3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The resonant frequency is f0 = 26.53 MHz\n", + " b) The Q is 30\n", + " c) The 3-dB bandwidth is B = 884 KHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#misprinted example number\n", + "pulse_width = 2*10**-6; #second\n", + "rise_time = 10*10**-9; #second\n", + "\n", + "# Calculations and Results\n", + "B = .5/pulse_width; #in Hz\n", + "print 'a) The aproximate bandwidth for coarse reproduction is B = %i KHz'%(B*10**-3)\n", + "B = .5/rise_time;\n", + "print ' b) The aproximate bandwidth for fine reproduction is B = %i MHz'%(B*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The aproximate bandwidth for coarse reproduction is B = 250 KHz\n", + " b) The aproximate bandwidth for fine reproduction is B = 50 MHz\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7f2d8462 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch5.ipynb @@ -0,0 +1,609 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a0e7c910eb2fada4813b83a9fc75a31d8e06e9d9386b596b5aee4ea6b4ef9d4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Frequency Generation and Translation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#The capacimath.tance in pF\n", + "C1 = 200.;\n", + "C2 = 2400.;\n", + "C3 = 8.;\n", + "\n", + "# Calculations and Results\n", + "t = 1/C1+1/C2+1/C3; #temperary variable\n", + "Ceq = 1/t;#pF\n", + "Ceq = Ceq*10**-12;#In Farad\n", + "L = 2*10**-6;#In H\n", + "f0 = 1./(2*math.pi*math.sqrt(L*Ceq))*10**-6; # IN MHz\n", + "print '(a) The oscillation frequency is',f0,'MHz'\n", + "\n", + "f0 = 1./(2*math.pi*math.sqrt(L*C3*10**-12))*10**-6; # IN MHz\n", + "print '(b) Assuming Ceq~C3 , the oscillation frequency is',f0,'MHz'\n", + "\n", + "B = -C1/C2; #based on eq 5.3\n", + "print '(c) The feedback fraction is ',B\n", + "\n", + "A = 1./B;\n", + "print 'The gain is',A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The oscillation frequency is 40.6416827797 MHz\n", + "(b) Assuming Ceq~C3 , the oscillation frequency is 39.788735773 MHz\n", + "(c) The feedback fraction is -0.0833333333333\n", + "The gain is -12.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def frequency(f0,k,T,T0):\n", + " return f0+k*f0*(T-T0);\n", + "\n", + "# Variables\n", + "k = 40*10**-6;\n", + "f = 148;\n", + "\n", + "# Calculations\n", + "fmax = frequency(f,k,32,20);\n", + "fmin = frequency(f,k,-8,20);\n", + "\n", + "# Results\n", + "print 'The maximum possible frequency , fmax = ',fmax,'MHZ'\n", + "print 'The maximum possible frequency , fmin = ',fmin,'MHz'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum possible frequency , fmax = 148.07104 MHZ\n", + "The maximum possible frequency , fmin = 147.83424 MHz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 5.;\n", + "M = 8.;\n", + "fi = 4.; # in MHz\n", + "\n", + "# Calculations and Results\n", + "f0 = M/N*fi;\n", + "print '(a) The output frequency is f0 = ',f0,'MHz'\n", + "\n", + "f1 = fi/N;\n", + "print '(b) The frequency f1 is',f1,'MHz'\n", + "\n", + "f2 = f0/M;\n", + "print ' The frequency f2 is ',f2,'MHz'\n", + "\n", + "#The two frequencies are same as required\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequency is f0 = 6.4 MHz\n", + "(b) The frequency f1 is 0.8 MHz\n", + " The frequency f2 is 0.8 MHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "#for input spectrum\n", + "f = arange(-20,20.001,0.001); #x axis\n", + "V = concatenate(([1], zeros(len(arange(-20+.001,20.001,.001))) ,[1])); #y axis\n", + "subplot(211);\n", + "plot(f,V)\n", + "suptitle('Input Spectrum')\n", + "xlabel('f,kHz')\n", + "\n", + "#for output spectrum\n", + "f = arange(-120,120.01,.01) #x axis\n", + "V = concatenate(([1], zeros(len(arange(-120+.01,-80,.01))), [1], zeros(len(arange(-80+.01,80,0.01))) ,[1],\\\n", + " zeros(len(arange(80+.01,120,.01))), [1]))\n", + "subplot(212);\n", + "plot(f,V)#,[5],rect = [-130,0,130,2])\n", + "suptitle('Output Spectrum')\n", + "xlabel('f,kHz')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 4, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEhCAYAAAB1HLuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGL9JREFUeJzt3XuwHGWZgPHnAGEVCZcYCzHBDTc1cUsFlVAS9SgoAQsV\nWUVE5LaIluCiLldrTXBLS1RcFy/cpcBdsUpUCLWAgnBKlg2XYG4IQZIQV5IQuYkg0QRy9o+3h9Nn\nMpPpM9Mz3dPn+VVNZU5Pz8z7dXre6fm+7u8FSZIkSZIkSZIkSZIkSZIkSVvwFmAtsCG5LQRemuF5\nv+jwfT8LnNTksdcD64D1wF+BP3b4XvU+DPxrzq8pSaUyADwLXJL8vTWwDLgrw3OHO3zvIWBek8fu\nB36S+vuDHb5X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\nK1I77VtNfIHVTCW+YcvYvrSsbb2MkS+3Rm0tU5uyqm/Hbow+QupXa5N/HwN+TvyMX0d8kT9KdBv+\nsZjQctGsLVXZL9P/Nx197rrdRZPuR5pMDGoB7EEk95XEzvhnor96ADiGOLrvB+n2zQM+SlwQtjvR\nvruJnbBf27dr6v7hjAwENWtrv1lAxD6NaMuRRNv62XbEmA/Ay4gzLZYS7To2WX4s/bMPNtKsLVXZ\nL0v9uTuc6NdcTyS3G5PlRwD3EX3w9wLvSz2ndhrhcmJu+TJr1j6ILpzlxE/ig1PL+6l9aVcRp9st\nJj5E6X7bZm3tN40u5OtnuxNnWiwiPm+1Nk0i+uX77TTJq4nu3Q3E5+54ttyWftsv69t3AuPjcydJ\nkiRJkiRJkiRJkiRJkiRpc58F7gd+mFp2HPCdBuvOBb5Qt2wVm8/IKPWVdqcqkMru08CBxEUkNc3m\n7Wg0n0k/zmEijVL2uZKldlxETIdxE3Bak3XeB/wv8PLk70bTsw4An2Kk8MLDwK25RipJGrNGRS+O\nJbpoDgd+DeyYLJ/L6Ao6C4G/1T1/m+Q56Sk2pFKzi0bjyQDwbuAtxCyazybLh4FvJbeah+ueewHw\nK+C/uxyjlBu7aDSeDBPTVG8PvLbusUZdNDXHEdO0ntudsKTuMMGr6vZjpLzbAPB74B+JGftmZHj+\nm4kzbI7pSnRSF5ngVVW1s2BeDTyXWjZMTA98NPATYjA2vX76+QPAZ4CdiSLrC4FLuheyJGksvg78\nQ9FBSJIkSZIkSZIkSZIkSZIkSZIkacv+Hx4UNh66xdKLAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "fLO = 110; #MHz\n", + "#for V2(f)\n", + "f = arange(0,231+0.02,.01) #x axis\n", + "def pulse():\n", + " return arange(1,1.5+.005,0.005)\n", + "\n", + "V2 = concatenate((zeros(len(arange(0,120-fLO,.01))), pulse(), zeros(len(arange(121-fLO+.01,120+fLO,.01))), pulse(), [0])); #y axis\n", + "subplot(211);\n", + "plot(f,V2)#,[5],rect = [0,0,240,2])\n", + "suptitle('Spectral diagram')\n", + "xlabel('f,MHz')\n", + "ylabel('V2(f)');\n", + "\n", + "#for V3(f)\n", + "f = arange(0,11+.02,0.01); #x axis\n", + "V3 = concatenate((zeros(len(arange(0,120-fLO,.01))), pulse(), [0])); #y axis\n", + "subplot(212);\n", + "plot(f,V3)#,[5],rect = [0,0,20,2])\n", + "suptitle('Spectral Diagram')\n", + "xlabel('f,MHz')\n", + "ylabel('V3(f)');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEhCAYAAACUW2yNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUFOW9//H33AH9IahISNQLmAlIjCZRMaIkGh2CGjAR\nt6jEJXFBjb+oiSbXgDmXJQm54hKM97pEo4hZMC4EMEeM4RfnGg2iKILGlUGJC1dRwcDAFQj9++Nb\nbVf39FTXdFd11VP9eZ3Th+7q6qqnapr6dj3L9wERERERERERERERERERERERERERERGRhvUg8L/A\nJmAjcGbE2/9jlZ9bB5zWxfIPsPJ+ACwDBvne/0eV+xMREc+52MW0l/d6MLBfxPvIdbG8yXt0ZS1w\naoXlvYAnsIARtZ4xbFMklH9JugDS8IZgdwubvNcrsV/iAFuBx7z3NgAjveWfAl73lm0AzvOW7wq8\n7K2/CZgO/NV7b6O37S8Am4EV3joHA88CHdjdS1vIcueDyiZgBNAbOMFblg9GuwLvetveBPzE9/mF\n2F3H+8CrwHxv+TrgKe8z9wBTgfVe+d8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lrwJvY+0NjmWVCaUH1rvuBu/f\nDrJ1ZzsE+C72w+Vfse/paUkWqA5yZPO680NgM9ZuFFqag8MbWKNt3iDs7iFLegL3Yrd7cxMuS9S+\ngOXOegWYDXwJuCPREkXrde/xhPf6HrLVFftA4K/Au9h0v3Owv2nWvIVVJwHsjv2gyZIzsfFkmQrs\nYQbRuawJu1jOSLogdXA42WtzAHgY+KT3fArFo/9dtx/Wi64X9l2dBXw70RJFo4XODdL5npATcLvR\ntoXiYxuN9Tbrn0hpYlZuEF1WHIrVxT+NVb0spZBqJGsOJ5u9lfbD7hwy11XQcxmFrqyzsDtdl83G\n2k82Y+2ZZ2EN7wtxvytr6bGdjQ0BWEXh+nJDYqUTERERERERERERERERERERERERERERkWpdjKXf\n/pVvWSs2JuUc37L9vWWXeq9vB04s2VaW0qFIg0lz+gyRJFyAZR89w7csh40WPtm37OvY4Df/OqV5\nebKYp0cahIKDSMFNwGAsVfx3S95bhc1t8DEsncSXgQUUJxXsKsHgjyiMUn0Dm5hFJNWymC1TpBav\nAJ/DUlbnHQ58H/gjdjewFBiPBYwNWGrr24HDgPd9nxsC7OR7vTPwF2zSnKWxlF4kIj2SLoCIA/I/\nou4G7gI+heWy8WcpzWEBZI5v2fqSbfwGCyQKDJJ6qlYSCe8tLLHZEcD/85b52xWC7sSnYBPnzIql\nZCIR052DSHkHYSmqS+dNngR8lMLsdmGqZo/BpoAdGVnpRGKm4CBSLH8nsAew0bcsv3xRF+uXPve/\nvgSbTe1x7/U87E5CREQccyXwmaQLISIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiItLo/j8Suqie/ZTZ\nWAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "fLO = 40; #MHz\n", + "#function for ascending pulse\n", + "def pulse_a():\n", + " return arange(1,2.005,0.005)\n", + "\n", + "#function for descending pulse\n", + "def pulse_d():\n", + " return arange(2,1-.005,-0.005)\n", + "\n", + "#for V2(f)\n", + "f = arange(0,48+.03,0.01); #x axis\n", + "\n", + "V2 = concatenate((zeros(len(arange(0,-8+fLO,.01))), pulse_d(), zeros(len(arange(-6+fLO+.01,6+fLO,.01))), pulse_a(), [0])); #y axis\n", + "subplot(211);\n", + "plot(f,V2)#,[5],rect = [0,0,50,2])\n", + "suptitle('Spectral diagram')\n", + "xlabel('f,MHz')\n", + "ylabel('V2(f)');\n", + "\n", + "#for V3(f)\n", + "f = arange(0,48+.02,0.01); #x axis\n", + "V3 = concatenate((zeros(len(arange(0,6+fLO,.01))), pulse_a() ,[0])); #y axis\n", + "subplot(212);\n", + "plot(f,V3)\n", + "suptitle('Spectral Diagram')\n", + "xlabel('f,MHz')\n", + "ylabel('V3(f)');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEhCAYAAAB/bNeOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHztJREFUeJzt3Xm0XFWd6PHvJQlNmEFigiQSSJQGBJmEGKYKiTyGFlaL\nNmCjqE9BWxTbp4367E7i0qXQIjQGhGeDjUNDa4t07GbQm1AQGwlDBkA6SBLCECCgzCSSQOr9sU9R\nJ5WqulX33jNUne9nrbPuqX1Ondp3r3vPr/Zw9gZJkiRJkiRJkiRJkiRJkiRJ6gq/Av4ErAPWAh8Z\n5uvfPMj3PQ/8dZP0Vwn5fRVYCkyIHX9xkJ8nSYX2CcINdHT0ek/gncP8GZUm6X3R1sxzwAcHSB8N\n3EUIEsNtVALXlJraIusMqPAmEWoF66LXKwnfuAFeA+6Ijr0MTIvS/xx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sknwwbahSehSja1UoXhltC/wcOBd4qe5YkcpjI6EJbQfgZsK347iilMVfAE8T2sxL\nTc4pSlkAHA48CYwh9BvU1wYGLIs81xBWEzoTqyYQaglFtoZQ7QPYlfDPUBSjCMHgR4QmIyh2eQC8\nAPwXcDDFLIuphPnQHgauAY4h/H0UsSwgBAOAZ4BfEOaT66gs8hwQ7ibMgjqR8GDbqdQ6jYpqLnBm\ntH8mtRtjr+sDriSMqrk4ll7E8tiF2kiR0cB7CN+Qi1gWXyF8UdwDOA2YD3yIYpbF1sB20f42wLGE\n/seeKotGD7YVxTXAE8B6Ql/KRwkjCPrpgSFkHTqC0EyyhHDzW0wYklzE8tgPWEQoi3sJ7edQzLKI\nO5raF8YilsUehL+JJYSh2dX7ZRHLQpIkSZIkSZIkSZIkSZIkSZLS9FnCA3A/iqWVCM9B/O9Y2gFR\n2uej1/8CnFJ3rZcTyaGUkDw/qSxl4VOEmVQ/FEurEB72+atY2umEVf7i59TPE1OUOXTUIwwIUs3l\nwJ6Eadc/V3fsEeDPgDcTptL4X8CN0X5VH419jdoT1qsJix9JudPsD1gqqocJk8U9G0s7GvgCYWbR\nCuHG/nFCkHgZuJDQZHQUYcK5qknA9rHXOwALCHPKLE4k99IQ5Hn6aykvql+cfgb8FPhzwlxTU2Pn\nVAhB47pYWnyK7j7Cql4XYjBQTtlkJLVvDWGywRnAvCgt3k/QqsY9C3gUuDqRnEnDwBqC1NihwKep\nTR1c9Q+EBUiqK3S10+z6XmA6my9kI+WKAUHaVPUb/1uBtbG0avpvm5xfvx9//bfAW4A7o9f/Qagx\nSJK6wAXAO7LOhCRJkiRJkiRJkiRJkiRJkiRJkpRH/x/oJcawtHa/HAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "#page no 159\n", + "#prob no. 5.8\n", + "\n", + "#function for ascending pulse\n", + "def pulse_a():\n", + " return arange(1,1.505,0.005)\n", + "\n", + "#function for descending pulse\n", + "def pulse_d():\n", + " return arange(1.5,1-.005,-0.005)\n", + "\n", + "fLO = 200.-10;\n", + "\n", + "#for fLO = 190 MHz\n", + "f = arange(0,10.5+.02,.01) #x axis\n", + "\n", + "V = concatenate((zeros(len(arange(0,199.5-fLO,.01))), pulse_a(), [0])); #y axis\n", + "subplot(211);\n", + "plot(f,V)#,[5],rect = [0,0,12,2])\n", + "suptitle('Spectral diagram:for fLO = 190')\n", + "xlabel('f,MHz')\n", + "ylabel('V(f)');\n", + "\n", + "#for fLO = 210\n", + "fLO = 200.+10; #MHz\n", + "f = arange(0,10.5+.02,.01); #x axis\n", + "\n", + "V = concatenate((zeros(len(arange(0,-200.5+fLO,.01))), pulse_d(), [0])); #y axis\n", + "subplot(212);\n", + "plot(f,V)#,[5],rect = [0,0,12,2])\n", + "suptitle('Spectral Diagram:for fLO = 210')\n", + "xlabel('f,MHz')\n", + "ylabel('V(f)');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEhCAYAAAB/bNeOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFPW97/H3CGjUKMtBMQLeUQSXXPcNV0YhEUwwAkZE\n5KK45T7icjQqmvMo43Ligss1xoAYlBO3nKARTJC4TkBFIhFRNCgMgiKJK5rIIuj0/eNbdbqmppfq\n7qqurprP63n6mV6qq3/VM1Pf+m3fH4iIiIiIiIiIiIiIiIiIiIiIiIiIiIjk9RSwEdgArAfOCHn/\nfyrzfZ8Do/M8/xVW3q+AxUBvz+v/LPPzorYn8CWwDvhJmfsYgh33O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lajTbKHsf6QTVj/5JlY5/kz\nJH/Yqf/YxmHD9VeRPb/cHVvpRERERERERERERERERERERERERERERNLrQiyV9W88zzVgc0bO8jy3\nv/PcJc7j+4ERvn2lKRWJtAO1nLpCJA7/F8vqOcbzXAabtXuK57lR2IQ07zb+PDhpzIsjKaaAIJI1\nGdgNS7t+se+1VdjaADtiqRyOB56kdeK+fEn8riU7W/QDbDETkZqTxiyUIpV4FzgIS//sGgD8FPgT\ndtW/CDgbCxJfYmmi7weOAb7wvK8PsL3ncWdgHrbQzKJISi9SgY5xF0AkAdwLp98B/w3sieWO8Wb/\nzGBB4zHPc//y7eNBLHgoGEhNUpORSHAfYsnDBgHPOs95+wkK1bgnYovNTI+kZCIhUA1BJLdDsXTP\n/nWErwZ2ILsKXJBm16HY8qjHhlY6kQgoIIi05l7x7wKs9zznPj8/z/b++97H/46tOvYX5/FMrMYg\nIiIJcDPwv+MuhIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiEgt+v9TUfaEADqftQAAAABJRU5ErkJg\ngg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "#page no 160\n", + "#prob no. 5.9\n", + "\n", + "#function for ascending pulse \n", + "def pulse_a():\n", + " return arange(1,1.5+.005,0.005)\n", + "\n", + "#function for descending pulse\n", + "def pulse_d():\n", + " return arange(1.5,1-.005,-.005)\n", + "\n", + "#plots of page 161\n", + "#spectrum at point 1\n", + "f1 = arange(17.5-.01,20.5+.01,0.01); #x axis\n", + "\n", + "V1 = concatenate(([0], pulse_d(), zeros(len(arange(18.5+.01,19.5,.01))), pulse_a(), [0])); #y axis\n", + "subplot(221);\n", + "plot(f1,V1)#[5],rect = [17,0,21,2])\n", + "suptitle('Spectrum at Point 1')\n", + "xlabel('f,MHz')\n", + "\n", + "#spectrum at point 2\n", + "f2 = arange(17.5-.01,20.5+.01,0.01); #x axis\n", + "\n", + "V2 = concatenate(([0], zeros(len(arange(17.5,19.5,.01))), pulse_a(), [0])); #y axis\n", + "subplot(222);\n", + "plot(f2,V2)#,[5],rect = [17,0,21,2])\n", + "suptitle('Spectrum at Point 2')\n", + "xlabel('f,MHz')\n", + "\n", + "#spectrum at point 3\n", + "f3 = arange(359.5-.01,400.5+.03,0.01); #x axis\n", + "\n", + "V3 = concatenate(([0], pulse_d(), zeros(len(arange(360.5+.01,399.5,.01))), pulse_a(), [0])); #y axis\n", + "subplot(223);\n", + "plot(f3,V3)#,[5],rect = [359,0,401,2])\n", + "suptitle('Spectrum at Point 3')\n", + "xlabel('f,MHz')\n", + "\n", + "#spectrum at point 4\n", + "f4 = arange(359.5-.01,400.5+.02,0.01); #x axis\n", + "V4 = concatenate(([0], zeros(len(arange(359.5,399.5,.01))), pulse_a(), [0])); #y axis\n", + "subplot(224);\n", + "plot(f4,V4)#,[5],rect = [359,0,401,2])\n", + "suptitle('Spectrum at Point 4')\n", + "xlabel('f,MHz')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEhCAYAAABx6WukAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXu0HFWd7z8nELzyMkAYRggYBBRQQZRHBnkcBpYCIw9R\nZHipgMB1hoe4rrzkEoLKVURluLAEI4YADqBIENYAKpojAiGAhvdDCOQCophAwDDyCDl1/9hVdp3u\nqu6q7l3dv13n+1mr16muqrP3r2t/96927cevQAghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEII0QNL\ngCj1mVlB+oPmU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sgoSgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in MHz\n", + "fc = 40.;\n", + "fIF = 5.\n", + "\n", + "# Calculations and Results\n", + "fLO = fc+fIF;\n", + "print '(a) The LO frequency is ',fLO\n", + "fImage = fLO+fIF;\n", + "print '(b) The image frequency is ',fImage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The LO frequency is 45.0\n", + "(b) The image frequency is 50.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in MHz\n", + "fc = 40;\n", + "fIF = 5\n", + "\n", + "# Calculations and Results\n", + "fLO = fc-fIF;\n", + "print '(a) The LO frequency is ',fLO\n", + "\n", + "fImage = fLO-fIF;\n", + "print '(b) The image frequency is ',fImage\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The LO frequency is 35\n", + "(b) The image frequency is 30\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in Hz\n", + "B = 200.*10**3; #The bandwidth allocated by FCC (in Hz)\n", + "fl = 88.*10**6;\n", + "fh = 108.*10**6; #FM broadcast band low and high end freq\n", + "\n", + "# Calculations and Results\n", + "Q = fl/B;\n", + "print '(a) At the low end of FM band ,Q required is',Q\n", + "\n", + "Q = fh/B;\n", + "print ' At the high end of FM band ,Q required is',Q\n", + "\n", + "fIF = 10.7*10**6;# IF frequwncy (in Hz)\n", + "Q = fIF/B;\n", + "print '(b) At the IF frequency ,Q required is ',Q\n", + "print ('(c) Signal freq = 88 to 108 MHz')\n", + "print (' LO freq = 98.7 to 118.7 MHz')\n", + "print (' Image freq = 109.4 to 129.4MHz')\n", + "print ('(d) Signal freq = 88 to 108 MHz')\n", + "print (' LO freq = 77.3 to 97.3 MHz')\n", + "print (' Image freq = 66.6 to 86.6MHz')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) At the low end of FM band ,Q required is 440.0\n", + " At the high end of FM band ,Q required is 540.0\n", + "(b) At the IF frequency ,Q required is 53.5\n", + "(c) Signal freq = 88 to 108 MHz\n", + " LO freq = 98.7 to 118.7 MHz\n", + " Image freq = 109.4 to 129.4MHz\n", + "(d) Signal freq = 88 to 108 MHz\n", + " LO freq = 77.3 to 97.3 MHz\n", + " Image freq = 66.6 to 86.6MHz\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9d1b862a --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch6.ipynb @@ -0,0 +1,696 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c63ffc1f6b0e1f51118b3e863bfed507c4db4871f94fba21b5d97233f2622030" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Amplitude Modulation Methods" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#All frequencies in kHz\n", + "fc = 1*10**3; #in kHz\n", + "W = 15; \n", + "\n", + "# Calculations and Results\n", + "DSBl = fc-W; #lowest freq of DSB signal\n", + "DSBh = fc+W; #highest freq of DSB signal\n", + "print '(a) The range of freq is from ',DSBl,'to',DSBh\n", + "\n", + "BT = 2*W;\n", + "print '(b) Transmission bandwidth is ',BT\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The range of freq is from 985 to 1015\n", + "(b) Transmission bandwidth is 30\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "fi = 250.; #input freq\n", + "\n", + "# Calculations and Results\n", + "LSB = [fi-1,fi-3,fi-5];\n", + "USB = [fi+1,fi+3,fi+5];\n", + "print '(a) The upper sideband and lower sideband ,USB:' ,USB,'and LSB:',LSB\n", + "BT = 2*5;\n", + "print 'The net transmission bandwidth is ',BT\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The upper sideband and lower sideband ,USB: [251.0, 253.0, 255.0] and LSB: [249.0, 247.0, 245.0]\n", + "The net transmission bandwidth is 10\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "fc = 1*10**3; #in kHz\n", + "W = 15; \n", + "\n", + "# Calculations and Results\n", + "LSBl = fc-W; #lowest freq of LSB\n", + "USBh = fc+W; #highest freq of USB\n", + "print '(a) The range of freq(in kHz) for LSB is from ',LSBl,'to',fc\n", + "print '(b) The range of freq(in kHz) for USB is from ',fc,'to',USBh\n", + "BT = W;\n", + "print '(b) Transmission bandwidth is ',BT\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The range of freq(in kHz) for LSB is from 985 to 1000\n", + "(b) The range of freq(in kHz) for USB is from 1000 to 1015\n", + "(b) Transmission bandwidth is 15\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "fi = 250; #input freq\n", + "\n", + "# Calculations and Results\n", + "LSB = [fi-1, fi-3, fi-5];\n", + "USB = [fi+1, fi+3, fi+5];\n", + "print '(a) For LSB transmission freq are' ,LSB\n", + "print '(b) For USB transmission freq are',USB\n", + "\n", + "W = 5;\n", + "BT = W;\n", + "print '(c) The transmission bandwidth is ',BT\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For LSB transmission freq are [249, 247, 245]\n", + "(b) For USB transmission freq are [251, 253, 255]\n", + "(c) The transmission bandwidth is 5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "#All frequencies in kHz\n", + "#refer Ex 6.4\n", + "fi = 250; #input freq\n", + "LSB = array([fi-1, fi-3, fi-5]); #from Ex 6.4\n", + "\n", + "# Calculations\n", + "fc = 250; #carrier freq\n", + "f0sum = fc+LSB;\n", + "f0diff = fc-LSB;\n", + "\n", + "# Results\n", + "print '(a) The output frequencies (in kHz) are ',f0diff,f0sum\n", + "print '(b) At low pass filter,the actual frequencies (in kHz) are ',f0diff\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequencies (in kHz) are [1 3 5] [499 497 495]\n", + "(b) At low pass filter,the actual frequencies (in kHz) are [1 3 5]\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\n", + "# Variables\n", + "#All frequencies in kHz\n", + "fi = 250; #input freq\n", + "USB = array([fi+1, fi+3, fi+5]); #from Ex 6.4\n", + "#\n", + "# Calculations\n", + "fc = 250; #carrier freq\n", + "f0sum = fc+USB;\n", + "f0diff = USB-fc;\n", + "\n", + "# Results\n", + "print '(a) The output frequencies (in kHz) are ',f0sum,f0diff\n", + "print '(b) At low pass filter,the actual frequencies (in kHz) are',f0diff\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequencies (in kHz) are [501 503 505] [1 3 5]\n", + "(b) At low pass filter,the actual frequencies (in kHz) are [1 3 5]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "\n", + "#All frequencies in kHz\n", + "#refer Ex 6.4\n", + "\n", + "# Variables\n", + "fi = 250.; #input freq\n", + "LSB = array([fi-1, fi-3, fi-5]); #from Ex 6.7\n", + "\n", + "# Calculations\n", + "fc = 250.1; #carrier freq\n", + "f0sum = fc+LSB;\n", + "f0diff = fc-LSB;\n", + "\n", + "# Results\n", + "print '(a) The output frequencies (in kHz) are ',f0sum,f0diff\n", + "print '(b) At low pass filter,the frequencies (in kHz) are ',f0diff\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output frequencies (in kHz) are [ 499.1 497.1 495.1] [ 1.1 3.1 5.1]\n", + "(b) At low pass filter,the frequencies (in kHz) are [ 1.1 3.1 5.1]\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "fc = 250; #carrier freq\n", + "\n", + "# Calculations and Results\n", + "LSB = [fc-1, fc-3, fc-5];\n", + "USB = [fc+1, fc+3, fc+5];\n", + "print '(a) The spectrum contains following freq.LSB:' ,LSB\n", + "print 'USB:',USB,\n", + "print 'carrier:',fc\n", + "\n", + "W = 5;\n", + "BT = 2*W;\n", + "print 'The transmission bandwidth is ',BT\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The spectrum contains following freq.LSB: [249, 247, 245]\n", + "USB: [251, 253, 255] carrier: 250\n", + "The transmission bandwidth is 10\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All voltage in V\n", + "m = 0.6; #modulation factor\n", + "A = 100; #peak carrier level (in V)\n", + "\n", + "# Calculations\n", + "Vmax = A*(1+m);\n", + "Vmin = A*(1-m);\n", + "\n", + "# Results\n", + "print 'The maximum and minimum values of positive envelope is','Vmax:',Vmax,'Vmin:',Vmin\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum and minimum values of positive envelope is Vmax: 160.0 Vmin: 40.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Ratio = .5/2; # Ratio = Vmin/Vmax\n", + "\n", + "# Calculations\n", + "m = (1-Ratio)/(1+Ratio); #modulation factor\n", + "\n", + "# Results\n", + "print 'The modulation factor is ',m\n", + "print 'The %age modulation is ',m*100\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation factor is 0.6\n", + "The %age modulation is 60.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Calculations\n", + "def sideband_amplitude(m,A):\n", + " return m*A/2; #As:sideband amplitude\n", + " #m:modulation factor\n", + " #A:carrier amplitude\n", + "# Variables\n", + "A = 10.;\n", + "m = 0;\n", + "\n", + "# Results\n", + "print '(a) For m = 0, sideband amplitude is ',sideband_amplitude(m,A)\n", + "m = 0.5;\n", + "print '(b) For m = 0.5, sideband amplitude is ',sideband_amplitude(m,A)\n", + "m = 1.;\n", + "print '(c) For m = 1, sideband amplitude is ',sideband_amplitude(m,A)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For m = 0, sideband amplitude is 0.0\n", + "(b) For m = 0.5, sideband amplitude is 2.5\n", + "(c) For m = 1, sideband amplitude is 5.0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "fc = 455.; #in kHz\n", + "\n", + "# Calculations and Results\n", + "Tc = (1./fc)*10**3; #in micro sec\n", + "print '(a) The carrier period is',Tc,'micro s'\n", + "\n", + "tau = 10*Tc; #in micro sec\n", + "print 'The time consmath.tant is selected 10Tc:',tau,'micro s'\n", + "\n", + "C = 0.01*10**-6; #in F\n", + "R = (tau*10**-6)/C; #ohm\n", + "print 'R is determined',R,'ohm'\n", + "\n", + "W = 5.; #in kHz\n", + "Tm = 1/W*10**3; #micro sec\n", + "print 'The shortest modulation period Tm = ',Tm,'micro sec'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The carrier period is 2.1978021978 micro s\n", + "The time consmath.tant is selected 10Tc: 21.978021978 micro s\n", + "R is determined 2197.8021978 ohm\n", + "The shortest modulation period Tm = 200.0 micro sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 200.; # in Volts\n", + "R = 50.; #in ohm\n", + "\n", + "# Calculations and Results\n", + "P = A**2/(4*R); #in W\n", + "print '(a) The sverage power is ',P,'W'\n", + "\n", + "Pp = A**2/(2*R); #in W\n", + "print '(b) The peak envelop power is ',Pp,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The sverage power is 200.0 W\n", + "(b) The peak envelop power is 400.0 W\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "P = 1000.; #in watts\n", + "R = 50.; #in ohm\n", + "\n", + "# Calculations\n", + "Vrms = math.sqrt(R*P); #in V\n", + "Irms = math.sqrt(P/R); #in A\n", + "\n", + "# Results\n", + "print 'The unmodulated rms carrier voltage is ',Vrms,\"V\"\n", + "print 'The unmodulated rms carrier current is ',Irms,\"A\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The unmodulated rms carrier voltage is 223.60679775 V\n", + "The unmodulated rms carrier current is 4.472135955 A\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Calculations\n", + "#All power in Watts\n", + "Pc = 1000.;\n", + "\n", + "def avg_P(m): #function for total average power\n", + " return (1+(m**2/2))*Pc;\n", + "\n", + "def peak_P(m): #function for peak power\n", + " return (1+m)**2*Pc;\n", + "\n", + "def SB_P(m): #function for SB power\n", + " return avg_P(m)-Pc;\n", + "\n", + "def lay(m): #function for print laying table\n", + " table = [m*100, avg_P(m), peak_P(m), SB_P(m)];\n", + " print (table);\n", + "\n", + "\n", + "# Results\n", + "print ('Summary for the result is print layed in the table ');\n", + "print ('Mod**n_% Avg_Pwr Peak_Pwr SB_Pwe');\n", + "m = 0.; #for m = 0\n", + "lay(m);\n", + "m = 0.5; #for m = 0.5\n", + "lay(m);\n", + "m = 1.; #for m = 1\n", + "lay(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Summary for the result is print layed in the table \n", + "Mod**n_% Avg_Pwr Peak_Pwr SB_Pwe\n", + "[0.0, 1000.0, 1000.0, 0.0]\n", + "[50.0, 1125.0, 2250.0, 125.0]\n", + "[100.0, 1500.0, 4000.0, 500.0]\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#All power in Watts\n", + "#All voltage in volts\n", + "#All current in ampere\n", + "R = 50; \n", + "m = 0.5;\n", + "P = 1125; #for m = 0.5\n", + "\n", + "# Calculations and Results\n", + "Vrms = math.sqrt(R*P);\n", + "Irms = math.sqrt(P/R);\n", + "print '(a) For m = 0.5, Vrms and Irms are:',Vrms,'V',Irms,'A'\n", + "m = 1.;\n", + "P = 1500.; #For m = 1\n", + "Vrms = math.sqrt(R*P);\n", + "Irms = math.sqrt(P/R);\n", + "print '(b) For m = 1, Vrms and Irms are:',Vrms,'V',Irms,'A'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For m = 0.5, Vrms and Irms are: 237.170824513 V 4.69041575982 A\n", + "(b) For m = 1, Vrms and Irms are: 273.861278753 V 5.47722557505 A\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..62b97ffa --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch7.ipynb @@ -0,0 +1,871 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:433d3f1a9b61373a0e4a26c847d60db974761fd710f99ff70bb64c86929966fd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Angle modulation methods" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "t = linspace(0,20);\n", + "def theta(t): #function for insmath.tanmath.tanious phase\n", + " return 3*math.pi*t**2;\n", + "\n", + "def frequency(t): #function for insmath.tanmath.tanious phase\n", + " Ws = 6*math.pi*t;\n", + " return Ws/(2*math.pi);\n", + "\n", + "subplot(2,1,1)\n", + "plot(t,theta(t))#,1);\n", + "suptitle('Plot1:Insmath.tanmath.tanious signal phase')\n", + "xlabel('t')\n", + "ylabel('theta')\n", + "fs = frequency(t);\n", + "subplot(2,1,2)\n", + "plot(t,fs)\n", + "suptitle('Plot2:Frequency')\n", + "xlabel('t')\n", + "ylabel('fs')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEhCAYAAABoTkdHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOX5//F3RFzYXQEBiSIYUCqIIoho3BCsidrWvRaX\n2rpr3VC7gNZ+Vayt+sVaf0Ut7rWgmAAq6pcoLoBIQAVZFZBgorIYJFFCmN8f9zmeyTAhM8lMzpkz\nn9d1nWvOnMxMnozD3D7LfT8gIiIiIiIiIiIiIiIiIiIiIiIiIiIiIlkkAlQB3wNfAHtEXd+Ro4H/\njbo/CtgMVDu3v6vnecuBGud3VgEvNKrVIiLim+gA8RkwOc71eK4HyqPunwP0dc4Lga31PG8ZcO8O\nXrdlA79XRER8Fh0gngE+irmeA8zBeiTVwN+d65vweiuTYl4zB9gG7B7n9y0D7ou5thGYh/VUJgMX\nONc2A1/jBaQLnDZUR7UJYDywIOr1KoBrnfNbgUrntb4A9nGubwVK8HpJw53rHZ02ur/nXuAxp32u\nJ4EP4/xtIiJZwQ0QuwJfAk/HXL8P+AYLBn2wL9y+2BdzdI8j2l+d57gWA+c757FDVWcAG/AC1q7Y\nF/1Bzv0HgCXOeTVwhXM+27kP2weOcuBqoBcWgNzht2nAG855DfAf5/xZp40As6gbFLpjwWYLXm+o\nEutViYhkJbfXUAWUYl/c7nWw/9MeH/X4FcCd1B84CrEv2aH1/L54Q1UbgKuc8zNi2lSN9Tq6UXf4\n62fU3+Mod9p3B9bzcV/re7wAUQMc5pxfAqxzzjcDx8dp96fA3cAI4Lt6/jaRpO3sdwNEGqnVDn4W\nwXobsdfiOQKYiAWBmTt4zZ3iXNsQ9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PQIcgA25fAnc729zMlIbYBJwHbAp5mcNfkbD\nEDjKsAkfVzes1yGN96Vz+zXwElYnTBqvAuv+A3QGvvKxLWHwFd6X23j0+UxWSyxoPIUNVUGSn9Ew\nBI65QE+8xMBzgCI/G5ThWgHurumtgWHUHV+W5BUBI53zkXj/WKVxOkedn4k+n8nIwYb3FmFbVLiy\n8jOqxMDUOQBbmTYfW66n9zM5zwFrgS3Y3NvF2Aq1N8iipY4pFPt+XgI8iS0XX4B9wWnOKHHHYKWa\n5lN3ObM+oyIiIiIiIiIiIiIiIiIiIiIiIiIiIiISBu2BK/xuhIiIZI5clNksIiJJeB6owjJ07/W5\nLSIikgG6ox6HhEwYihyKBFmO3w0QSTUFDhERSYoCh0h6bcIrUy8SCgocIum1DngXm+fQ5LiIiIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIpMf/B52kwDiSQbb8AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#v(t) = 80*math.cos[(2*math.pi*10**8*t)+20*math.sin(2*math.pi*10**3*t)] --eq\n", + "#v(t) = A*math.cos[Wc*t+Bmath.sin(Wm*t)] --eq7-27\n", + "#comparing the above 2 equations we get \n", + "A = 80.; #volts\n", + "fc = 10.**8; #Hz\n", + "fm = 10.**3; #Hz\n", + "B = 20.;\n", + "\n", + "# Calculations and Results\n", + "print '(a) The carrier cyclic frequency is ',fc,\"Hz\"\n", + "print '(b) The modulating frequency is ',fm,'Hz'\n", + "print '(c) The modulation index is ',B\n", + "delta_f = B*fm;\n", + "print '(d) The frequency deviation is ',delta_f,'Hz'\n", + "R = 50.; #ohm\n", + "P = A**2/(2*R);\n", + "print '(e) The average power is ',P,'W'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The carrier cyclic frequency is 100000000.0 Hz\n", + "(b) The modulating frequency is 1000.0 Hz\n", + "(c) The modulation index is 20.0\n", + "(d) The frequency deviation is 20000.0 Hz\n", + "(e) The average power is 64.0 W\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#from ex 7.2\n", + "#v(t) = 80*math.cos[(2*math.pi*10**8*t)+20*math.sin(2*math.pi*10**3*t)] --eq\n", + "B = 20.;\n", + "\n", + "# Calculations\n", + "delta_theta = B; #for PM\n", + "\n", + "# Results\n", + "print 'The maximum phase deviation for PM is ',delta_theta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum phase deviation for PM is 20.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Results\n", + "print ('The equation becomes');\n", + "print ('v(t) = 80*math.cos[(2*math.pi*10**8*t)+10*math.sin(4*math.pi*10**3*t)]');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equation becomes\n", + "v(t) = 80*math.cos[(2*math.pi*10**8*t)+10*math.sin(4*math.pi*10**3*t)]\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Results\n", + "print ('The equation becomes');\n", + "print ('v(t) = 80*math.cos[(2*math.pi*10**8*t)+20*math.sin(4*math.pi*10**3*t)]');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equation becomes\n", + "v(t) = 80*math.cos[(2*math.pi*10**8*t)+20*math.sin(4*math.pi*10**3*t)]\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "delta_f = 12.; #kHz\n", + "fm = 4.; #kHz\n", + "\n", + "# Calculations\n", + "B = delta_f/fm; #modulating index for FM\n", + "\n", + "# Results\n", + "print ('The expression is');\n", + "print '(vt) = A*math.cos[2*pi*10**8*t)+%i*math.sin%i*2*pi*10**3*t)]'%(B,fm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The expression is\n", + "(vt) = A*math.cos[2*pi*10**8*t)+3*math.sin4*2*pi*10**3*t)]\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "delta_theta = 6.; #kHz\n", + "fm = 5.; #kHz\n", + "\n", + "# Results\n", + "print ('The expression is');\n", + "print '(vt) = A*math.cos[2*pi*10**8*t)+%i*math.sin%i*2*pi*10**3*t)]'%(delta_theta,fm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The expression is\n", + "(vt) = A*math.cos[2*pi*10**8*t)+6*math.sin5*2*pi*10**3*t)]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "delta_f = 400.; #Hz\n", + "fm = 2000.; #Hz\n", + "\n", + "# Calculations and Results\n", + "B = delta_f/fm; #\n", + "print 'The modulation index is',B\n", + "print ('(For B< = 2.5 , the signal is NBFM)');\n", + "Bt = 2*fm; \n", + "print 'The transmission bandwidth Bt = %i Hz '%(Bt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation index is 0.2\n", + "(For B< = 2.5 , the signal is NBFM)\n", + "The transmission bandwidth Bt = 4000 Hz \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "delta_f = 8000; #Hz\n", + "fm = 100.; #Hz\n", + "\n", + "# Calculations and Results\n", + "B = delta_f/fm; #\n", + "print 'The modulation index is',B\n", + "print ('(For B> = 50 , the signal is VWBFM)');\n", + "Bt = 2*delta_f; \n", + "print 'The transmission bandwidth Bt = %i Hz '%(Bt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation index is 80.0\n", + "(For B> = 50 , the signal is VWBFM)\n", + "The transmission bandwidth Bt = 16000 Hz \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "delta_f = 6.; #kHz\n", + "W = 2.; #kHz\n", + "\n", + "# Calculations and Results\n", + "D = delta_f/W; #deviation ratio\n", + "print 'The deviation ratio is',D\n", + "Bt = 2*(delta_f+W); #carsom's rule is applicable\n", + "print 'The transmission bandwidth Bt = %i kHz '%(Bt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The deviation ratio is 3.0\n", + "The transmission bandwidth Bt = 16 kHz \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "W = 2.; #kHz (as in ex 7.10)\n", + "delta_theta = 3.;\n", + "\n", + "# Calculations\n", + "Bt = 2*(1+delta_theta)*W; #applying carsom's rule\n", + "\n", + "# Results\n", + "print 'The transmission bandwidth Bt = %i kHz '%(Bt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transmission bandwidth Bt = 16 kHz \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "delta_f = 75; #kHz\n", + "fm = array([.025, .075, .75, 1.5, 5, 10, 15]) #in kHz\n", + "def Beta(fm,delta_f):\n", + " return delta_f *(1/fm);\n", + "\n", + "def Bandwidth(fm,delta_f):\n", + " Bt = zeros(7)\n", + " Bt[0:3] = 2 *delta_f;\n", + " for i in range(3,7):\n", + " Bt[i] = 2 *(delta_f + fm[i]); \n", + " return Bt\n", + "\n", + "B = Beta(fm,delta_f);\n", + "Bt = Bandwidth(fm,delta_f); #applying carsom's rule\n", + "print ('Table - 7.2');\n", + "print ('fm(kHz) Beta Bt(kHz)');\n", + "for i in range(7):\n", + " print '%4.3f '%(fm[i]),\n", + " print '%4.1f '%(B[i]),\n", + " print '%i'%(Bt[i]);\n", + "\n", + "plot(fm,Bt);\n", + "suptitle('Bandwidth of FM')\n", + "xlabel('fm,kHz')\n", + "ylabel('Bt,kHz')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Table - 7.2\n", + "fm(kHz) Beta Bt(kHz)\n", + "0.025 3000.0 150\n", + "0.075 1000.0 150\n", + "0.750 100.0 150\n", + "1.500 50.0 153\n", + "5.000 15.0 160\n", + "10.000 7.5 170\n", + "15.000 5.0 180\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 12, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEhCAYAAAB7mQezAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X98VHed7/FXoP5gFy6iQVwqOG1puRorhUBRLqUpV0oL\n3aL7uNluC9hF+sCLPrAoqFjBxnrpD6QtUm6BlR/KTymadgka1oV1lrBACyWEdJteCdhLAWkRiSkX\nQyE594/PCZmESZgkc+Z7Zub9fDzmkTNnfn0IcD7z+f4EERERERERERERERERERERERERERERkaxS\nD5QDB4FXgc8l6X0jQGWCz+0LbG7lsSgwxD9+pIPvH09v4GXsz/zf4nzmG9jvpRz4O/98A7A25nnX\nAKeBkk7EISISOu/GHN+JXRSTIULnLtyNfktTYoiNtbPv/w/ATxL4zFjvAgeAD/r378YSx5ZOxCFZ\nrovrAESuoifwJ/+4O7Ad+0Z9CLjXPx8BqoB/Al4D/oWmC2U+UIFVH1+Ned9fATf7x+XAPP/4MeAh\n/z1f8891A34OvA4U+/dzgCf943LsW7sHdG0ljlgR4N/8uLYD/YBbgKeACf77xXtdTpxzAL8GxvvH\n9wMb23iuiEhauoRdHKuAGpq+KXcFevjHucBh/zgCXAQ+49/fBEz0jw8BI/3jBf59gO9gieK/AK8A\npf75fwNupPm3/28CK/zjm/3Paq1iaC2OWCXAZP94CvCif/wgsDjO8+HKpqReMZ9/M9bs9QH/sdtR\nU5J0gioGCaO/AIOBTwJ3AWv8812AJ7Bv2v+K9QN81H/s9zRd9F/FLtI9/dsu//xamr5JlwGjsLb8\nX2HVSDfgOpoSTqPbgHX+cWXM58QTL46WPgts8I/X0ZS4cmj9m74HPID9XgYDZ2Meq/Q/537/zyLS\n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mHM5rRz/mqaZvTXA5I6H\nLyIiQWhc6+ZRLCl0xdbZP0/TPuTF2FLLLf0WGI4tRxC7ZMubWEJpTACHuXIJknxsGZUeSfgziHSa\nKgaR5hq/0ZcC9dgCeV2Af/HPV2ILlMV73XIsCTwRc97D+hUG+7eHaF415GILLz4AvJuE+EU6TYlB\nJL73/J8NwMWY8w3Eb0rysOW3R9P2ns+xSaErVmH8AOv0FgkFJQaRjnsC+ELM/RVYv8EL2EX/ap7E\nKow2N00RSTUlBpEmXgLHsfc/DfyhxWPPYn0Ja4i/m1fs6KVZ2Kb3jf0P97Q/ZBERCZNtrgMQERER\nERERERERERERERERERERERERERERSWf/H+KyngWQqSORAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "from numpy import array\n", + "\n", + "# Variables\n", + "delta_f = 75; #kHz\n", + "fm = array([.025, .075, .75, 1.5, 5, 10, 15]) #in kHz (From prob-7.12)\n", + "\n", + "# Calculations and Results\n", + "delta_theta = delta_f/fm[6];\n", + "Bt = 12*fm; #applying carsom's rule\n", + "print 'Delta theta = ',delta_theta\n", + "\n", + "plot(fm,Bt);\n", + "suptitle('Bandwidth of PM')\n", + "xlabel('fm,kHz')\n", + "ylabel('Bt,kHz')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delta theta = 5.0\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 16, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEhCAYAAAB7mQezAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAA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58Eus9H3NcSz16QsMwUrfV7AS82WnEV3ssP+z1d9/FUsQQdML2AicACqxjtK+TiNq\n2DGsCQngOuwLQlB9FRhMcBPtzdgXgp3Yv6UbgLeBjzuMqT6Hsb+bYP+mqoGPuQsnPlJl8FsWdoN9\nxnUgMRhAMPsYANYDt/rbBQTzSYpu2FMerbD//y8B33Ia0YVyubjzueapvikEo1MXLo7zPuxJr6BN\npJ9L/X0hQe5j+EfgMX/7VqzpMy2kwuC3flgm3oE105RQO8VHUA0guE8ldcO+3QTpkcVovkft46ov\nUfvkh2uvYP0eH2J9dGOwG9cagvW4at04v4Y9lv4nav8dPecsulo1cZ6j9s8z0gGCkRiixXk5sBD7\nO/o2EHIVnIiIiIiIiIiIiIiIiIiIiIiIiIiIiIic9x1seu+Fzbg2DORHOX6QC59tDxHcAYUigI0o\nFhEzHpsN90gzrq1v3qG6x4I+N5FIysyVJJJoLwCfwKZ3Pw38HJuS4yDw98AsbAbNVTT8haqFf+2/\nRhzLqmf7N9SO7D0NjGp++CIikgg1c93MwJJCS2ye/bPAvf45hdhUy3WtA/pg0xFETtlyEEsoNQlg\nHxdPQZKPTaNydRz+G0QumSoGkQvVfKNfBVRhE+S1AH7rH9+NTVAW7boXsSTwZMRxD+tX6OH/fJ0L\nq4ZsbOLF4cDf4hC/yCVTYhCJ7kP/tRqoiDheTfSmJA+bfnsgDa/5HJkUWmIVxmNYp7dIICgxiDTf\nk8CDEftzsX6DZdhNvzFPYRVGg4umiCSbEoNILa8J25H7nwL+XOd3z2B9CS8TfTWvyKeXJmGL3tf0\nPzwQe8giIhIkq10HICIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIpLK/heBZOdrnP/tEAAAAABJRU5E\nrkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "delta_f1 = 2.; #kHz\n", + "fc1 = 100.; #kHz\n", + "W = 5.; #kHz\n", + "\n", + "# Calculations and Results\n", + "fc2 = 3*fc1;\n", + "print '(a) The output center frequency = ',fc2\n", + "delta_f2 = 3*delta_f1;\n", + "print '(b) The output frequency deviation = ',delta_f2\n", + "\n", + "D1 = delta_f1/W;\n", + "D2 = 3*D1;\n", + "print '(c) The output deviation ratio = ',D2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The output center frequency = 300.0\n", + "(b) The output frequency deviation = 6.0\n", + "(c) The output deviation ratio = 1.2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Kf = 4.; #kHz/V\n", + "f0 = 100.; #kHz\n", + "\n", + "# Calculations and Results\n", + "# Part a\n", + "vm = 2.; #Volts\n", + "delta_f = Kf*vm; #kHz\n", + "f = f0+delta_f; #kHz\n", + "print '(a) The change in frequency is',delta_f,'Corresponding frequwncy to this input is',f\n", + "\n", + "#Part b\n", + "vm = -3; #Volts\n", + "delta_f = Kf*vm; #kHz\n", + "f = f0+delta_f; #kHz\n", + "print '(b) In this case,the change in frequency is',delta_f,'Corresponding frequwncy to this input is',f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The change in frequency is 8.0 Corresponding frequwncy to this input is 108.0\n", + "(b) In this case,the change in frequency is -12.0 Corresponding frequwncy to this input is 88.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,concatenate,zeros\n", + "\n", + "#All frequencies in kHz\n", + "fci = 100.; #basic center frequency\n", + "fco = 100000.; #output center frequency\n", + "delta_f = (3000./3072)*0.025; #maximum frequency deviation at modulator\n", + "W = 15.;\n", + "D = delta_f/W;\n", + "Bt = 2*W; \n", + "table_row1 = array([fci ,delta_f, D, Bt]); #At point A\n", + "def table(table_row,multiplier):\n", + " return concatenate((table_row[0:3]*multiplier ,[table_row[3]]))\n", + " \n", + "table_row2 = table(table_row1,4); #at point B\n", + "table_row3 = table(table_row2,4); #at point C\n", + "table_row4 = table(table_row3,4); #at point D\n", + "\n", + "def table1(table_row,multiplier):\n", + " table1 = zeros(4)\n", + " table1[0:3] = table_row[0:3]*multiplier;\n", + " Bt = 2*(table1[1]+W); #Applying carsons rule Bt = 2*(delta_f+W)\n", + " table1[3] = Bt;\n", + " return table1\n", + " \n", + "\n", + "table_row5 = table1(table_row4,3); #at point E ,carsons rule applied from here\n", + "table_row6 = concatenate(([(fco/16)], table_row5[1:4])); #at point F ,center frequency after mixer\n", + "table_row7 = table1(table_row6,4); #at point G\n", + "table_row8 = table1(table_row7,4); #at point H\n", + "table_row9 = table_row8; #at point I\n", + "print ('Point fc delta_f D Bt');\n", + "def lay(Point,t_row):\n", + " print \" %c %8.0i\"%(Point,t_row[0]),\n", + " for i in range(1,4):\n", + " print \" %3.4f\"%(t_row[i]),\n", + " print \"\"\n", + "\n", + "lay('A',table_row1);\n", + "lay('B',table_row2);\n", + "lay('C',table_row3);\n", + "lay('D',table_row4);\n", + "lay('E',table_row5);\n", + "lay('F',table_row6);\n", + "lay('G',table_row7);\n", + "lay('H',table_row8);\n", + "lay('I',table_row9);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Point fc delta_f D Bt\n", + " A 100 0.0244 0.0016 30.0000 \n", + " B 400 0.0977 0.0065 30.0000 \n", + " C 1600 0.3906 0.0260 30.0000 \n", + " D 6400 1.5625 0.1042 30.0000 \n", + " E 19200 4.6875 0.3125 39.3750 \n", + " F 6250 4.6875 0.3125 39.3750 \n", + " G 25000 18.7500 1.2500 67.5000 \n", + " H 100000 75.0000 5.0000 180.0000 \n", + " I 100000 75.0000 5.0000 180.0000 \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "Kd = 2.; #V/kHz\n", + "fc = 100.;\n", + "\n", + "# Calculations and Results\n", + "# part a\n", + "f = 102.5;\n", + "delta_f = f-fc;\n", + "vd = Kd*delta_f; #V\n", + "print '(a) The first case result is',vd\n", + "\n", + "# part b\n", + "f = 98.5;\n", + "delta_f = f-fc;\n", + "vd = Kd*delta_f; #V\n", + "print '(a) The second case result is',vd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The first case result is 5.0\n", + "(a) The second case result is -3.0\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "#All frequencies in Hz\n", + "D = 5.; #deviation ratio\n", + "fc = array([400., 560., 730., 960.]); #Center frequency\n", + "delta_f = 0.075*fc; #frequency deviation\n", + "W = delta_f/D ; #modulating frequency\n", + "Bt = 2 *(delta_f + W); #Bandwidth\n", + "fl = fc - Bt/2; #Lower frequency\n", + "fh = fc + Bt/2; #Higher frequency\n", + "\n", + "x = arange(301,1108,1);\n", + "y = [1.5];\n", + "y = concatenate((y ,zeros(len(arange(302,fl[0]+1)))))\n", + "for i in range(3):\n", + " y = concatenate((y ,ones(len(arange(fl[i],fh[i]+1)))));\n", + " y = concatenate((y ,zeros(len(arange(fh[i]+1,fl[i+1]+1)))));\n", + "\n", + "y = concatenate((y, ones(len(arange(fl[3],fh[3]+1)))));\n", + "y = concatenate((y, zeros(len(arange(fh[3],1101)))));\n", + "print len(x),len(y)\n", + "plot(x,y);\n", + "suptitle('Composite baseband spectrum')\n", + "xlabel('f,Hz');\n", + "delta_frt = D*1046;\n", + "Brt = 2*(delta_frt+1046);\n", + "print '(b) The RF transmission bandwidth is ',Brt,'Hz'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "807 807\n", + "(b) The RF transmission bandwidth is " + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 12552.0 Hz\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEhCAYAAACeKwCaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHXRJREFUeJzt3X+cHXV97/HXsuE3SoRUrSQ0GqMCBSrWgGLJ8VcbrJAr\n1iIiVektPC5iqPeqQHqvbB5KC2JtbakY+RGo1uRWigVu+dnKuSBi+CH5gRCahF9JsCAWuei1N8Hs\n/eP7Pezk/NgzJzs7Mzvzej4e+9g5c2ZnPmd2930+5zvnzIAkSZIkSZIkSZIkSZIkSZJUG68EVgAb\ngHuBfwLmFlrRju6M338NOGnAn50NrM20mh19FPjrSVr3zyZpveNZXMA2NUXsUnQBmpAh4NvAd4DX\nAr8JnAu8osii2hwdv78a+FCRhXQxOkXX3cu5PeYPxS9JU9Q7gP89zv0XETrjNcDvx3mN+DP/CGwE\nLgBOAe6Oy70mLncl8FXgHuBh4Hfj/D2AZXHZH8T1ARwCrATuB1YDc+L8Vof7feCn8f6zCI3GRXG7\nq4HTutQ/G3gI+AbwIPAtYM943/+IP7sWWJr4mUXAD+M6l8d5ewNXxPp+ABwf538k7ofbgH8FPptY\nz7cJr5QeAP4oMf9nwOeBVcBdwMvj/FfH22vi/c93eTx7E155rY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2R2E0ye3LGPHk4KdSDj757vzLEqaDIa9\n1N2vA+cRrjXgOL6mPMfsVSfzCGeqHM8o4cyMy4FTCEM70pRnZ686aHXmBwL/NzGvV8d+fFz2ssSy\nR/RYVpJUMl8gDM9IkiRJkiRJkiRJkiRJkiRJkiSpxv4/Owii54giFkEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7a56724b --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch8.ipynb @@ -0,0 +1,372 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e314839688b681d3e989757676d75c0f75a6ca864ec7dd979f2569d4ad5fbb03" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Pulse modulation and Time division multiplexing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "W = 5000.; #Hz\n", + "\n", + "# Calculations and Results\n", + "fs = 2*W;\n", + "print 'a) The minimum sampling rate is %i samples per second.'%(fs);\n", + "T = 1/fs; #second\n", + "print ' b) Maximum interval between samples is %f seconds'%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The minimum sampling rate is 10000 samples per second.\n", + " b) Maximum interval between samples is 0.000100 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "W = 5000.; #Hz\n", + "\n", + "# Calculations and Results\n", + "fs = 1.25*2*W;\n", + "print 'a) The sampling rate is %i Hz.'%(fs);\n", + "T = 1/fs; #second\n", + "print 'b) Maximum interval between samples is %f seconds'%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The sampling rate is 12500 Hz.\n", + "b) Maximum interval between samples is 0.000080 seconds\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "W = 5000.; #Hz\n", + "\n", + "# Calculations\n", + "fs = 1.25*2*W;\n", + "tp = 30*60; #seconds\n", + "N = fs*tp; #samples\n", + "\n", + "# Results\n", + "print 'Total number of samples is %i '%(N);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of samples is 22500000 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#All frequencies in kHz\n", + "f = 1.;\n", + "T = 0.1; #ms\n", + "fs = 1/T;\n", + "\n", + "# Calculations and Results\n", + "print 'The positive frequencies below 45 kHz are %i '%(f);\n", + "for i in range(1,101):\n", + " x = fs*i; #x is a variable\n", + " if((x+f) < 45):\n", + " print '%i , %i'%(x-f,x+f);\n", + " else:\n", + " break;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The positive frequencies below 45 kHz are 1 \n", + "9 , 11\n", + "19 , 21\n", + "29 , 31\n", + "39 , 41\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "#All time in milli second\n", + "#All frequencies in kHz\n", + "fs = 5.;\n", + "tau = 0.04; #ms\n", + "T = 1./fs; #ms\n", + "d = tau/T;\n", + "# for plot\n", + "f = arange(-2,28,.1);\n", + "Pn1 = ones(50);\n", + "Pn = ones(50)\n", + "for i in range(1,6):\n", + " Pn = concatenate((Pn, Pn1*(1-d*i)));\n", + "\n", + "ps1 = ones(20);\n", + "for i in range(1,11):\n", + " ps1 = concatenate(([1-i*0.1], ps1, [1-i*0.1]));\n", + "\n", + "ps1 = concatenate((ps1, zeros(10)));\n", + "ps = ps1\n", + "for i in range(5):\n", + " ps = concatenate((ps, ps1));\n", + "\n", + "Vs = ps*Pn;\n", + "plot(f,Vs)#,[5]);\n", + "suptitle('(a) Spectrum of signal after sampling')\n", + "xlabel('$f,kHz$')\n", + "ylabel('$Vs(f)$');\n", + "K1 = 0.5;\n", + "Bt = K1/tau;\n", + "print 'b) Bandwidth required for K1 = %i is %0.1f kHz'%(K1,Bt);\n", + "K1 = 1.;\n", + "Bt = K1/tau;\n", + "print 'Bandwidth required for K1 = %i is %i kHz'%(K1,Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "b) Bandwidth required for K1 = 0 is 12.5 kHz\n", + "Bandwidth required for K1 = 1 is 25 kHz\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAElCAYAAAD6NKUrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+YXVV97/H3ZDKZYfIDCRAgIR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F38NFDyilRbT/257oa2XQA9wJXJu4rkr3f6vxJy2i3Pd/0n8H/oyU938dSk/HJC5fSvl/\nYauwXXEXYTXDy4HbQw4opX4g3lpwJvCfKf993srtwFXR5auAfw44liyq8nffhT3bXgd8MnF9Ve7/\nduOvyv1/BONlsUOA87FVWlW5/53539hSzTXYD1uFWlurFxxWxfFYuWk1tlywCuP/OrAN2If1h96O\nrdr6IdVYHtg8/ndQnb/7c7AtelZz8FLSqtz/rcZ/IdW5/18M/BIb/1rgA9H1Vbn/RURERERERERE\nRERERERERERERERERERERERERKSq/hPwP3nutswXA3e3OP7PsFdVXwn0Ah/Htqou67baIs/RHXoA\nIhXzCeAzwGPA04nrp2H76vyw6fgZ0cdHgAPYO6ZtAT7nfaQijtRhU0CRIvVhGztubrr+FcDPWhx/\nFnBP4vPXUI23jxV5loJCpHPvx3bgbPWOhEuwDePehL3vQuxMbMO4q6KP32U8KP4Y23L+Y8A7/QxZ\nRESKdC7ju282uxt7UyqwMImtTlw+DCtZJR2H7T463cUARXzQH6dI506l9fsOzIr+vRTbkvq26POj\ngScTx53OwWWnucBN2Lbho05HKuKQSk8infsdxoPi+MT1ZwLfBf4WOAO4KLr+LKwcFTsDuDe63IU1\nxa8B9gAv9DNkkfw0oxDp3HxgK7AAW920OLr+JOxN67dgZaffAq8E3o29F/EC4DTgCmAF9t7F5wAf\nwvoeM1GPQkSk0t4E/AFwY+K6gTBDESmeSk8ik9uPvf7h04nregONRURERERERERERERERERERERE\nRERERERERERERERC+P/VCD56zgBO8QAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "k = 7;\n", + "W = 1;\n", + "\n", + "# Calculations\n", + "Bt = k*W;\n", + "\n", + "# Results\n", + "print 'Minimum Bandwidth is %i kHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum Bandwidth is 7 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "W = 1.;\n", + "fs = 1.25*2*W;\n", + "\n", + "# Calculations and Results\n", + "Tf = 1./fs;\n", + "print 'a) The sampling rate is %.1f kHz'%(fs);\n", + "print 'The frame time is %.1f ms'%(Tf);\n", + "tau = Tf/16; #ms\n", + "Bt = 0.5/tau;\n", + "print 'The pulse width is %i micro second'%(tau*10**3);\n", + "print 'The composite baseband bandwidth is %i kHz'%(Bt);\n", + "Bt = 2*Bt;\n", + "print 'b) The RF bandwidth is %i kHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The sampling rate is 2.5 kHz\n", + "The frame time is 0.4 ms\n", + "The pulse width is 25 micro second\n", + "The composite baseband bandwidth is 20 kHz\n", + "b) The RF bandwidth is 40 kHz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#All frequencies in kHz\n", + "W = 10.;\n", + "fs = 2*W;\n", + "\n", + "# Calculations and Results\n", + "Tf = 1/fs;\n", + "print 'a) The minimum sampling rate is %i kHz'%(fs);\n", + "print 'The frame time is %i micro second'%(Tf*10**3);\n", + "tr = 0.01*Tf #ms\n", + "Bt = 0.5/tr;\n", + "print 'The maximum rise time is %.1f micro second'%(tr*10**3);\n", + "print 'The approximate transmission bandwidth is %i kHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The minimum sampling rate is 20 kHz\n", + "The frame time is 50 micro second\n", + "The maximum rise time is 0.5 micro second\n", + "The approximate transmission bandwidth is 1000 kHz\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..82afeeb0 --- /dev/null +++ b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/ch9.ipynb @@ -0,0 +1,443 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b930c6c496122eb54fe019df88d1f394053d7bba2a749adf989d9e8db7a14c97" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Digital communication I Binary Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculations and Results\n", + "bits = 4;\n", + "print 'a) M = %i values'%(2**bits);\n", + "bits = 8;\n", + "print 'b) M = %i values'%(2**bits);\n", + "bits = 16;\n", + "print 'c) M = %i values'%(2**bits);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) M = 16 values\n", + "b) M = 256 values\n", + "c) M = 65536 values\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Calculations and Results\n", + "N = math.log(100);\n", + "print 'a) N = %.2f bits'%(N);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) N = 4.61 bits\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from numpy import zeros,concatenate,array,arange,ones,linspace,sin\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "import math \n", + "\n", + "#input graph\n", + "t = arange(0,15,.1);\n", + "y = concatenate(((1./9)*arange(0,1.1,.1)**2, (1./8)*arange(1.1,2.1,.1)**2.1));\n", + "y = concatenate((y, (7./8)*sin(2*math.pi*t[21:150]/18.5)));\n", + "plot(t,y);\n", + "y = 8*y; \n", + "#quantized form\n", + "y1 = [];\n", + "for i in range(0,150,10):\n", + " for m in range(-7,8,1):\n", + " if y[i] < m+0.5:\n", + " break;\n", + " \n", + " y1 = concatenate((y1, m*ones(10)))\n", + "\n", + "y1 = y1/8;\n", + "plot(t,y1)#,[5]);\n", + "# Some operations on entities created by plot2d ...\n", + "suptitle('Anamath.log and quantized signals')\n", + "xlabel('t,ms')\n", + "ylabel('Normalised signal level')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 5, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4U3XaxvFvukELZUsVF9AqUlQcQUAEESmCioILmxsC\nbsCojLjMuDviMqKM2zjujCyKIO6CisqoVQbR1wURHGUVFXGjbAXK1ub940mnoSTpSZvkJOn9ua5c\nTU7OOXmStnnObwcRERERERERERERERERERERERERERGROulMoBxo43IcNwbczwcWOTjmAuCfsQim\nBja7+NpXAtkBj98AGtXynIXArAj2n1fL14tGDBJHaW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w77Y\nxUOiugA4lcRMwK2wi4SF2P9SC+BzYG8XYwplNfZ3Cfb/VA543QsntpJlYJ8H++J9wO1AItCDxG3D\nAJvluMB/fyyJ2bujHdbzJBv7G5gCXO5qRLvLZ89G74qehtfjfmNyhXx2j7MP1vMsz5VogssndDtL\nIrdhjAJu898vwKpPU1oyDOw7DsvcX2LVPQuonO4kUfUgsXtJtcOuiBKla2Uo11LZrXYKlb1R3DYd\na1fZgbUDXoh9qf2bxOpWWzXOi7Au9N9T+b/0qGvRmYoYt1P5WQZaSWIkjGBxZgLPYH+fnwOFbgUn\nIiIiIiIiIiIiIiIiIiIiIiIiIiIiIimvMXCp20GIiEjiyyf06F4REZH/eQ7Yio02DpyaJB+bGnwS\nNgvBs8BJwDxsFPXR/v16UDla+QtsckIREUlBBxK8hJEP7ATaYnNIfQY85X/udOAV//2Z2JouYDOc\npscqUJFoSebZakXcFG7K6u+wOaR8/p8V62AsxhIKWInjAWyJzKZAWUyiFIkiJQyR6NsecL8cmzyv\n4n6G//49wMXYbLbzgDZxi06khpQwRGqmBMgNeBzpkqatsNLHeGzmXSUMSXgZ1e8iIkEUYyWDRdgX\nfuAKdVVXqwv23Bhs7fRyrKpqdmzCFBGRRNIXGO12ECIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiKS\nGP4fx2tQLwuyHUwAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "N = 8.;\n", + "Vfs = 20.; #Volts\n", + "\n", + "# Calculations and Results\n", + "delta_Xu = 2**-N;\n", + "print 'a) The normalised unipolar step size is %f '%(delta_Xu);\n", + "delta_vu = delta_Xu*Vfs;\n", + "print 'b) The actual step size is %.2f mV '%(delta_vu*10**3);\n", + "Xumax = 1-delta_Xu;\n", + "print 'c) The normalized maximum quantized level is %f '%(Xumax);\n", + "vumax = Xumax*Vfs;\n", + "print 'd) The actual maximum quantized level is %f V '%(vumax);\n", + "Eu = delta_Xu/2;\n", + "print 'e) The normalized peak error is %f '%(Eu);\n", + "eu = Eu*Vfs;\n", + "print 'f) The actual peak error is %.2f mV '%(eu*10**3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The normalised unipolar step size is 0.003906 \n", + "b) The actual step size is 78.12 mV \n", + "c) The normalized maximum quantized level is 0.996094 \n", + "d) The actual maximum quantized level is 19.921875 V \n", + "e) The normalized peak error is 0.001953 \n", + "f) The actual peak error is 39.06 mV \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vfs = 10.; #Volts\n", + "N = 8.;\n", + "\n", + "# Calculations and Results\n", + "delta_Xb = 2**(-N+1);\n", + "print 'a) The normalised bipolar step size is %f '%(delta_Xb);\n", + "delta_vb = delta_Xb*Vfs;\n", + "print 'b) The actual step size is %.2f mV '%(delta_vb*10**3);\n", + "Xbmax = 1-delta_Xb;\n", + "print 'c) The normalized maximum quantized level is %f '%(Xbmax);\n", + "vbmax = Xbmax*Vfs;\n", + "print 'd) The actual maximum quantized level is %f V '%(vbmax);\n", + "Eb = delta_Xb/2;\n", + "print 'e) The normalized peak error is %f '%(Eb);\n", + "eb = Eb*Vfs;\n", + "print 'f) The actual peak error is %.2f mV '%(eb*10**3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The normalised bipolar step size is 0.007812 \n", + "b) The actual step size is 78.12 mV \n", + "c) The normalized maximum quantized level is 0.992188 \n", + "d) The actual maximum quantized level is 9.921875 V \n", + "e) The normalized peak error is 0.003906 \n", + "f) The actual peak error is 39.06 mV \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,log\n", + "\n", + "# Variables\n", + "Vimax = 16.; #Volts\n", + "Vomax = 2.; #Volts\n", + "m = 255.; #meu\n", + "\n", + "# Calculations\n", + "vi = array([2, 4, 8, 16]);\n", + "vo = Vomax*log(1+m*vi/Vimax)/math.log(1+m);\n", + "table = [vi.transpose(), vo.transpose()];\n", + "print ' viV voV';\n", + "print (table);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " viV voV\n", + "[array([ 2, 4, 8, 16]), array([ 1.25972975, 1.50420207, 1.75140614, 2. ])]\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#all time in ms\n", + "#all frequencies in kHz\n", + "W = 5.;\n", + "N = 8.; #bits\n", + "k = 19.+1; #word\n", + "\n", + "# Calculations and Results\n", + "fs = 2*W;\n", + "print 'fs = %i kHz'%(fs);\n", + "Tf = 1/fs;\n", + "print ' Tf = %.1f ms'%(Tf);\n", + "Tw = Tf/k;\n", + "print ' Tw = %i micro second'%(Tw*10**3);\n", + "tau = Tw/N;\n", + "print ' tau = %.3f micro second'%(tau*10**3);\n", + "Bt = 0.5/tau;\n", + "print ' Bt = %ikHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fs = 10 kHz\n", + " Tf = 0.1 ms\n", + " Tw = 5 micro second\n", + " tau = 0.625 micro second\n", + " Bt = 800kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#all frequencies in kHz\n", + "R = 200; #kbits/s\n", + "\n", + "# Calculations\n", + "Bt = R; #kHz\n", + "\n", + "# Results\n", + "print ' Bt = %ikHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bt = 200kHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#all frequencies in kHz\n", + "R = 200; #kbits/s\n", + "delta_f = 150; #f1-f0\n", + "\n", + "# Calculations\n", + "Bt = delta_f+R; #kHz\n", + "\n", + "# Results\n", + "print ' Bt = %ikHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bt = 350kHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#all frequencies in kHz\n", + "R = 200; #kbits/s\n", + "\n", + "# Calculations\n", + "Bt = R; #kHz\n", + "\n", + "# Results\n", + "print ' Bt = %ikHz'%(Bt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bt = 200kHz\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6fbb6032 Binary files /dev/null and b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/LinearAmplitudeSpectrum.png differ 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 new file mode 100644 index 00000000..3138717d Binary files /dev/null and b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/SpectralDigram5.png differ 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 new file mode 100644 index 00000000..9a07efe8 Binary files /dev/null and b/Electronic_Communications:_Principles_and_Systems_by_W._D._Stanley_&_J._M._Jeffords/screenshots/amplitudeSpectrum3.png differ diff --git a/Electronic_Devices_And_Circuits/README.txt b/Electronic_Devices_And_Circuits/README.txt index c0612b7b..8a0a46e6 100755 --- a/Electronic_Devices_And_Circuits/README.txt +++ b/Electronic_Devices_And_Circuits/README.txt @@ -1,10 +1,10 @@ -Contributed By: Laxman Sole +Contributed By: Yogesh Patil Course: btech College/Institute/Organization: Vishwakarma Institute of Technology, Pune -Department/Designation: Electronics Engineering +Department/Designation: Instrumentation and Control Engg Book Title: Electronic Devices And Circuits -Author: Satya Prakash, Saurabh Rawat -Publisher: Anand Publications, New Delhi -Year of publication: 2012 -Isbn: 978-93-80225-48-7 -Edition: 3 \ No newline at end of file +Author: K. L. Kishore +Publisher: BS Publications, Hyderabad +Year of publication: 2008 +Isbn: 81-7800-167-5 +Edition: 1 \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits/screenshots/Barrier_Potential_4_9.png b/Electronic_Devices_And_Circuits/screenshots/Barrier_Potential_4_9.png new file mode 100755 index 00000000..ca415ca6 Binary files /dev/null and b/Electronic_Devices_And_Circuits/screenshots/Barrier_Potential_4_9.png differ diff --git a/Electronic_Devices_And_Circuits/screenshots/feedback_amp_params_7_1.png b/Electronic_Devices_And_Circuits/screenshots/feedback_amp_params_7_1.png new file mode 100755 index 00000000..de9332bb Binary files /dev/null and b/Electronic_Devices_And_Circuits/screenshots/feedback_amp_params_7_1.png differ diff --git a/Electronic_Devices_And_Circuits/screenshots/poential_calculation_1_4.png b/Electronic_Devices_And_Circuits/screenshots/poential_calculation_1_4.png new file mode 100755 index 00000000..840f6bcf Binary files /dev/null and b/Electronic_Devices_And_Circuits/screenshots/poential_calculation_1_4.png differ diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_1.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_1.ipynb new file mode 100755 index 00000000..e772cf7f --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_1.ipynb @@ -0,0 +1,716 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Electron Dynamics and CRO" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 page no-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# speed of electon in electric field\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V=10.0\n", + "d=5*10**-2\n", + "t=50*10**-9\n", + "T=10**-7\n", + "x=1.76*10**11\n", + "\n", + "#Calculations and Results\n", + "#(1)\n", + "eps=V/(d*T)\n", + "a=x*eps\n", + "v=a*t**2/2\n", + "print(\"(1)\\nVelocity, v = %.1f*10^5 m/s\\n\"%(v/100000))\n", + "\n", + "#(2)\n", + "x1=(a/6)*(t**3)\n", + "print(\"\\n(2)\\ndistance, x=%.3f cm\\n\"%(x1*100))\n", + "\n", + "#(3)\n", + "x2=0.05\n", + "t1=(x2/(a/6))**(1.0/3)\n", + "v1=(a/2)*t1**2\n", + "print(\"\\n(3)\\nspeed with which the electron strikes the positive plate,\\nv = %.2f*10^6 m/sec\"%(v1/10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)\n", + "Velocity, v = 4.4*10^5 m/s\n", + "\n", + "\n", + "(2)\n", + "distance, x=0.733 cm\n", + "\n", + "\n", + "(3)\n", + "speed with which the electron strikes the positive plate,\n", + "v = 1.58*10^6 m/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 page no-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# speed of electron and position of applied AC voltage point\n", + "\n", + "import math\n", + "#Variable declaration\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "Vmax=1.5 # v\n", + "d=8*10**-3 # m\n", + "\n", + "#Calculations\n", + "w=2*math.pi*60*10**6 # rad/sec\n", + "Max_Vel=2*e*Vmax/(m*d*w)\n", + "Max_Vel=math.ceil(Max_Vel*10**-3)\n", + "\n", + "#Result\n", + "print(\"The Maximum value of Velocity is, \\ndx/dt=%.2f*10^5 m/sec\"%(Max_Vel/100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Maximum value of Velocity is, \n", + "dx/dt=1.75*10^5 m/sec\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 page no-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# effect of electric field on electron\n", + "\n", + "import math\n", + "#Variable declaration\n", + "eps=(2000.0)/3 # V/cm\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "v= 10**7 # dy/dt=v m/sec\n", + "\n", + "\n", + "#Calculations and Result\n", + "#(1)\n", + "t=v*m/(e*eps*100)\n", + "t=math.floor(t*10**11)\n", + "t=t/10\n", + "print(\"\\n(1)\\nTime ,t = %.1f*10^-10 sec\\n\"%t)\n", + "t=t*10**-10\n", + "\n", + "#(2)\n", + "y=(e*eps*100*t**2)/(2*m)\n", + "print(\"\\n(2)\\nDistance travelled by electron , y = %.5f m\\n\"%y)\n", + "\n", + "#(3)\n", + "pd=eps*100*y\n", + "print(\"\\n(3)\\nPotential Drop = %.1f Volts\"%pd)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(1)\n", + "Time ,t = 8.5*10^-10 sec\n", + "\n", + "\n", + "(2)\n", + "Distance travelled by electron , y = 0.00423 m\n", + "\n", + "\n", + "(3)\n", + "Potential Drop = 282.3 Volts\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page no-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of potential\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V0=10.0 # volts siince energy is 10ev\n", + "xm=2.0 \n", + "\n", + "#Calculations\n", + "theta=math.pi/4\n", + "V=(2*V0*math.sin(2*theta))/xm\n", + "\n", + "#Result\n", + "print(\"V = %.0fd Volts\"%V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 10d Volts\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page no-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Application of magnetic field on electron\n", + "\n", + "import math\n", + "#Variable declaration\n", + "B=0.03 # wb/m^2\n", + "m=9.1*10**-31 # kg\n", + "V=2*10**5\n", + "e=1.6*10**-19 # C\n", + "\n", + "#Calculations\n", + "R=(2*m*V/e)**(0.5)\n", + "R=math.floor(R*100/B)\n", + "#OAC is a right angled triangle\n", + "oa=R\n", + "oc=3.0\n", + "ac=math.sqrt((oa)**2-(oc)**2)\n", + "\n", + "#Result\n", + "print(\"Radius of the circle, R=%.0f cm\"%R)\n", + "print(\"AD=%d cm\"%(oa-ac))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the circle, R=5 cm\n", + "AD=1 cm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 page no-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of transit time\n", + "\n", + "import math\n", + "#Variable declaration\n", + "m=9.1*10**-31 # kg\n", + "V=100.0\n", + "e=1.6*10**-19 # C\n", + "d=5*10**-2 # m\n", + "t=10**-8 # sec\n", + "t1=0.01*10**-6 # sec\n", + "\n", + "#Calculations\n", + "d1=(e*V*t**2)/(m*d*2)\n", + "d2=(5-d1*100)\n", + "v1=e*V*t1/(m*d)\n", + "v1=math.ceil(v1/10**4)\n", + "t2=(d2*10**-2)/(v1*10**4)\n", + "\n", + "#Result\n", + "print(\"d1 = %.3f*10^-2m\\nd2 = %.2f*10^-2m\"%(d1*100,d2))\n", + "print(\"\\nVelocity of Electron,v = %.2f*10^6m/s\"%(v1/100))\n", + "print(\"\\nt2 = %.1f*10^-8 sec\"%(t2*10**8))\n", + "print(\"\\nTotal transit time = t1 + t2 = %.1f*10^-8 sec\"%((t1/10**-8)+t2*10**8))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d1 = 1.758*10^-2m\n", + "d2 = 3.24*10^-2m\n", + "\n", + "Velocity of Electron,v = 3.52*10^6m/s\n", + "\n", + "t2 = 0.9*10^-8 sec\n", + "\n", + "Total transit time = t1 + t2 = 1.9*10^-8 sec\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 page no-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# time of flight under electric field\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "V=1000.0 # volt\n", + "d=0.01 # m\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "\n", + "#Calculations\n", + "eps=V/d\n", + "t=math.sqrt((2*m*d)/(e*eps))\n", + "\n", + "#Result\n", + "print(\"t = %.2f * 10^-9 sec\"%(t*10**10))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "t = 10.67 * 10^-9 sec\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 page no-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# velocity of electron\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V=1000.0 # volt\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "\n", + "#Calculations\n", + "Vf=math.sqrt((2*e*V)/m)\n", + "\n", + "#Result\n", + "print(\"V_final = %.2f * 10^6 m/sec\"%(Vf/10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V_final = 18.75 * 10^6 m/sec\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 1.9 page no-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# application of electric and magnetic field\n", + "\n", + "import math\n", + "#Variable declaration\n", + "k=1.76*10**11 # e/m in C/kg\n", + "eps=10**4\n", + "B=0.01\n", + "\n", + "#Calculations\n", + "Xmax=2*eps*math.pi/((B**2)*k)\n", + "\n", + "#Result\n", + "print(\"Xmax = %.3f cm\"%(Xmax*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Xmax = 0.357 cm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 page no-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# distance travelled in helical path\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "Energy=50.0 # eV\n", + "V0=Energy # Volts\n", + "e=1.6*10**-19 # c\n", + "m=9.1*10**-31 # kg\n", + "\n", + "#Calculations\n", + "v0=math.sqrt(2*e*V0/m)\n", + "v0=math.ceil(v0/10**5)\n", + "v0=(v0/10)*10**6\n", + "t=(35.5*10**-12)/(2*10**-3)\n", + "#Components of velocities are\n", + "v1=v0*math.cos(10*math.pi/180)\n", + "v2=v0*math.cos(20*math.pi/180)\n", + "x=v1-v2\n", + "d=x*t\n", + "\n", + "#Result\n", + "print(\"Velocity, v0 = %.0f m/s\"%v0)\n", + "print(\"\\nDistance, d = %.4f cm\"%(d*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity, v0 = 4200000 m/s\n", + "\n", + "Distance, d = 0.3363 cm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 page no-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Deflection sensitivity\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "l=2.0 # cm\n", + "D=18.0 # cm\n", + "s=0.5 # cm\n", + "va1=500.0 # volts\n", + "va2=1000 # Volts\n", + "va3=1500.0 # Volts\n", + "\n", + "#(a)\n", + "ds1=l*D/(2*s*va1) # Deflection Sensitivity\n", + "#(b)\n", + "ds2=l*D/(2*s*va2)\n", + "# (c)\n", + "ds3=l*D/(2*s*va3)\n", + "\n", + "#Result\n", + "print(\"(a)Va=%dV\\nDeflection Sensitivity S_E=%.3f cm/V \"%(va1,ds1))\n", + "print(\"\\n\\n(b)Va=%dV\\nDeflection Sensitivity S_E=%.3f cm/V\"%(va2,ds2))\n", + "print(\"\\n(c)Va=%dV\\nDeflection Sensitivity S_E=%.3f cm/V\"%(va3,ds3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Va=500V\n", + "Deflection Sensitivity S_E=0.072 cm/V \n", + "\n", + "\n", + "(b)Va=1000V\n", + "Deflection Sensitivity S_E=0.036 cm/V\n", + "\n", + "(c)Va=1500V\n", + "Deflection Sensitivity S_E=0.024 cm/V\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 page no-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# displacement angle and velocity of electron in CRT\n", + "\n", + "import math\n", + "#Variable declaration\n", + "l=2.0 # cm\n", + "D=24.0 # cm\n", + "s=0.5 # cm\n", + "Vd=30.0 # Volts\n", + "Va=1000.0 # Volts\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "\n", + "#Calculations and Results\n", + "#(a)\n", + "d=Vd*l*D/(2*s*Va)\n", + "print(\"\\n(a)\\nDeflection Produce, d=%.2f cm\\n\"%d)\n", + "\n", + "#(b)\n", + "theta=(math.atan(d/D))*(180/math.pi)\n", + "print(\"\\n(b)\\nTheta=%.2f\u00b0\"%theta)\n", + "\n", + "#(c)\n", + "v=math.sqrt(2*e*Va/m)\n", + "vr=v/math.cos(theta*math.pi/180)\n", + "print(\"\\n\\n(c)\\nResultant Velocity, Vr = %.2f *10^6 m/sec\"%(vr/10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(a)\n", + "Deflection Produce, d=1.44 cm\n", + "\n", + "\n", + "(b)\n", + "Theta=3.43\u00b0\n", + "\n", + "\n", + "(c)\n", + "Resultant Velocity, Vr = 18.79 *10^6 m/sec\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 page no-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Calculation of transverse magnetic field \n", + "\n", + "import math\n", + "#Variable declaration \n", + "\n", + "l=1.27 # cm\n", + "D=19.4 # cm\n", + "s=0.475 # cm\n", + "Va=400.0 # volts\n", + "v=30.0 # volt\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "\n", + "\n", + "#Calculations\n", + "Se=l*D*10**-2/(2*s*Va)\n", + "Se=math.ceil(Se*10**5)\n", + "x=math.sqrt(m/e)\n", + "B=(x*0.65*30*math.sqrt(2*Va))/(l*D)\n", + "\n", + "#Result\n", + "print(\"S_E = %.2f mm/v\"%(Se/100))\n", + "print(\"\\nB = %.2f*10^-5 wb/m^2\"%(B*10**5))#answer not matches with given answer" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S_E = 0.65 mm/v\n", + "\n", + "B = 5.34*10^-5 wb/m^2\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 page no-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# effect of earths magnetic filed on deflection in CRT\n", + "\n", + "import math\n", + "#Variable declaration\n", + "v0=1.19*10**7 # m/sec\n", + "B=0.6*10**-4 # wb/m^2\n", + "v=400.0\n", + "\n", + "#Calculations\n", + "#Radius of the circle described by the electron due to earth magnetic field\n", + "R=3.37*10**-6*math.sqrt(v)/B\n", + "y=math.sqrt((112)**2-20**2)\n", + "y=112-y\n", + "\n", + "#Result\n", + "print(\"Radius of Circle, R = %.2fm\"%R)\n", + "print(\"\\ndeflection of the electron on the screen, y = %.1f cm\"%y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of Circle, R = 1.12m\n", + "\n", + "deflection of the electron on the screen, y = 1.8 cm\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_2.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_2.ipynb new file mode 100755 index 00000000..e93b3da2 --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_2.ipynb @@ -0,0 +1,1827 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Junction Diode Characteristics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page no-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# radius of the lowest state of Ground State\n", + "\n", + "import math\n", + "#Variable declaration\n", + "n=1\n", + "h=6.626*10**-34 # planc's constantJ-sec\n", + "eps=10**-9/(36*math.pi)\n", + "m=9.1*10**-31 # electron mass in kg\n", + "e=1.6*10**-19 #Electron charge\n", + "\n", + "#Calculations\n", + "r=n**2*h**2*eps/(math.pi*m*e**2)\n", + "\n", + "#Result\n", + "print(\"\\nradius of the lowest state of Ground State, r=%.2f A\u00b0\"%(r*10**10))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "radius of the lowest state of Ground State, r=0.53 A\u00b0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 page no-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# no of photons emitted per second by lamp\n", + "\n", + "import math\n", + "#Variable declaration\n", + "l =2537.0 # wavelength in A\u00b0\n", + "E_diff=12400.0/l\n", + "e=1.6*10**-19\n", + "energy=50.0/1000 # J/sec\n", + "\n", + "#Calculations\n", + "e_j=energy/e # eV/sec\n", + "n=e_j/E_diff\n", + "\n", + "#Result\n", + "print(\"The lamp emits %.1f * 10^16 photons/sec of wavelength, lambda=%dA\u00b0\"%(n/10**16,l))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lamp emits 6.4 * 10^16 photons/sec of wavelength, lambda=2537A\u00b0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 page no-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Speed of ejected electron\n", + "\n", + "import math\n", + "#Variable declaration\n", + "e_ar=11.6 # eV\n", + "e_Na=5.12 # eV\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "\n", + "#Calculations\n", + "V=e_ar-e_Na\n", + "v=math.sqrt(2*e*V/m)\n", + "\n", + "#Result\n", + "print(\"Velocity, v = %.2f * 10^6 m/sec\"%(v/10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity, v = 1.51 * 10^6 m/sec\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.4 page no-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# speed of electron in sodium vapour lamp\n", + "\n", + "import math\n", + "#Variable declaration\n", + "l=5893.0 # A\u00b0\n", + "V=2.11 # Volts\n", + "e=1.6*10**-19 #C\n", + "m=9.1*10**-31 #kg\n", + "\n", + "#Calcualations\n", + "v=math.sqrt(2*e*V/m)\n", + "\n", + "#Result\n", + "print(\"Velocity, v = %.2f * 10^5 m/sec\"%(v/10**5))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity, v = 8.61 * 10^5 m/sec\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 page no-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# radio transmitter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "f=10*10**6 # Hz\n", + "h=6.626*10**-34 # Joules/sec\n", + "e=1.6*10**-19 # C\n", + "#(a)\n", + "E=h*f/e\n", + "print(\"\\n(a)Energy of each radiated quantum,\\n\\tE = %.3f*10^-27 Joules/Quantum\\n\\tE = %.2f*10^-8 eV/Quantum\"%(h*f*10**27,E*10**8))\n", + " \n", + "# (b)\n", + "E=1000.0 # Joule/sec\n", + "N=E/(h*f)\n", + "print(\"\\n\\n(b)\\nTotal number of quanta per sec, N=%.2f*10^29\"%(N/10**29))\n", + "\n", + "#(c)\n", + "o=10**-7\n", + "print(\"\\n\\n(c)\\nNumber of quanta emitted per cycle = %.2f*10^22 per cycle\"%(o*N/10**22))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(a)Energy of each radiated quantum,\n", + "\tE = 6.626*10^-27 Joules/Quantum\n", + "\tE = 4.14*10^-8 eV/Quantum\n", + "\n", + "\n", + "(b)\n", + "Total number of quanta per sec, N=1.51*10^29\n", + "\n", + "\n", + "(c)\n", + "Number of quanta emitted per cycle = 1.51*10^22 per cycle\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 page no-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Neon Ionization\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V=21.5 # Volts\n", + "e=1.6*10**-19 # C\n", + "m=9.1*10**-31 # kg\n", + "l=12400.0/V # A\u00b0\n", + "c=3*10**8 #m/sec\n", + "\n", + "#calculations and Result\n", + "#(a)\n", + "v=math.sqrt(2*e*V/m)\n", + "print(\"(a)\\nVelocity, v = %.2f*10^6 m/sec\\nWavelength of Radiation, Lambda = %.1f\"%(v/10**6,math.ceil(l)))\n", + "# (b)\n", + "f=c/(l*10**-10)\n", + "print(\"\\n(b)\\nFrequency of Radiation, f = %.1f * 10^15 Hz\"%(f/10**15))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Velocity, v = 2.75*10^6 m/sec\n", + "Wavelength of Radiation, Lambda = 577.0\n", + "\n", + "(b)\n", + "Frequency of Radiation, f = 5.2 * 10^15 Hz\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 page no-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# wavelength of photon\n", + "\n", + "import math\n", + "#Variable declaration\n", + "L=1400.0\n", + "del_E=2.15\n", + "\n", + "#Calculations\n", + "E_diff=12400.0/L # eV\n", + "L2=12400.0/del_E\n", + "\n", + "#Result\n", + "print(\"E2-E1 = %.2f eV\\n1850 A\u00b0 line is from 6.71 eV to 0 eV\"%(E_diff))\n", + "print(\"Therefore, second photon must be from %.2f to 6.71 eV.\\nLambda=%d A\u00b0.\"%(E_diff,L2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E2-E1 = 8.86 eV\n", + "1850 A\u00b0 line is from 6.71 eV to 0 eV\n", + "Therefore, second photon must be from 8.86 to 6.71 eV.\n", + "Lambda=5767 A\u00b0.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 page no-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# High field emission\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A=60.2*10**4 # A/m^2/\u00b0K^2\n", + "B=52400.0 # \u00b0K\n", + "T1=2400.0 # \u00b0K\n", + "T2=2410.0 # \u00b0K\n", + "\n", + "#calcualtions\n", + "js1=A*T1**2*(math.e**(-B/T1))\n", + "js2=A*T2**2*(math.e**(-B/T2))\n", + "js1=math.floor(js1)\n", + "js2=math.floor(js2)\n", + "p=(js2-js1)*100/js1\n", + "\n", + "\n", + "#Result\n", + "print(\"JS1 = %d A/m^2\\nJS2 = %d A/m^2\"%(js1,js2))\n", + "print(\"\\nPercentage Increase = %.2f%%\"%p)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "JS1 = 1142 A/m^2\n", + "JS2 = 1261 A/m^2\n", + "\n", + "Percentage Increase = 10.42%\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 page no-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Work function and wavelength\n", + "\n", + "import math\n", + "#Variable declaration\n", + "h=6.63*10**-34 # Plank's Constant, J sec.\n", + "e=1.6*10**-19 # Charge of Electron, C\n", + "c=3*10**8 # Velocity of Light, m/sec\n", + "v=0.55 # volts\n", + "l=5500.0*10**-10 # m\n", + "\n", + "#Calculations and Results\n", + "#(a)\n", + "fi=(h*c)/(l*e)\n", + "fi=fi-v\n", + "print(\"(a)\\nWork Function(WF), fi = %.2f Volts\"%fi)\n", + "#(b)\n", + "l0=12400.0/fi\n", + "print(\"\\n\\n(b)\\nThreshold Wavelength = %d A\u00b0\"%l0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Work Function(WF), fi = 1.71 Volts\n", + "\n", + "\n", + "(b)\n", + "Threshold Wavelength = 7250 A\u00b0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 page no-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# effect of temperature on emission\n", + "\n", + "import math\n", + "#Variable declaration\n", + "dT=20.0\n", + "T=2310.0 # \u00b0K\n", + "Ew=4.52\n", + "k=8.62*10**-5\n", + "\n", + "#Calculations\n", + "x=(Ew/(k*T))\n", + "x=(2+x)*dT/T\n", + "\n", + "#Result\n", + "print(\"(a)\\ndIth/Ith = %.1f%%\\n\\n(b)\\nThis is solved by Trial and Error Method to get T = 2370\u00b0K\"%(x*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "dIth/Ith = 21.4%\n", + "\n", + "(b)\n", + "This is solved by Trial and Error Method to get T = 2370\u00b0K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 page no-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# RF voltage frequency in cyclotron\n", + "\n", + "import math\n", + "#Variable declaration\n", + "B=1.0 # Tesla\n", + "T=35.5*10**-6 # sec\n", + "k=2*10**6\n", + "g=40000.0\n", + "\n", + "#Calculations\n", + "f=1/T\n", + "v=49*g\n", + "R=(3.37*10**-6)*math.sqrt(v)\n", + "\n", + "#Result\n", + "print(\"(a)\\nThe frequency of the R.F voltage, f = %.2f*10^4 Hz\"%(f/10**4))\n", + "print(\"\\n\\n(b)Number of passages required to gain 2*10^6 eV are ,N = %d\"%(k/g))\n", + "print(\"\\n\\n(c)\\nDiameter of last semicircle, D = 2R = %.2f *10^-4 m\"%(2*R*10000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "The frequency of the R.F voltage, f = 2.82*10^4 Hz\n", + "\n", + "\n", + "(b)Number of passages required to gain 2*10^6 eV are ,N = 50\n", + "\n", + "\n", + "(c)\n", + "Diameter of last semicircle, D = 2R = 94.36 *10^-4 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 page no-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Emission current and cathode efficiency\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ew=1.0 # eV\n", + "A0=100.0 # A/m2 I \u00b0K2\n", + "S=1.8*10**-4 # cm2\n", + "K =8.62*10**-5 # eV/oK\n", + "T=1100.0\n", + "pd=5.8*10**4 # W/m^2\n", + "\n", + "#Calculations\n", + "ipd=1.1*pd\n", + "tip=S*ipd\n", + "Ith=S*A0*T**2*math.e**(-Ew/(K*T))\n", + "\n", + "#Result\n", + "print(\"Ith = %.3f A\\nCathode Efficiency, eta = %.0f mA/\u00b0K\"%(Ith,math.ceil(Ith*1000/11.5)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ith = 0.573 A\n", + "Cathode Efficiency, eta = 50 mA/\u00b0K\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 page no-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# resistivity of doped material\n", + "\n", + "import math\n", + "#Variable declaration\n", + "n=4.4*10**22 # cm^3\n", + "mu=3600.0 # cm62/volt-sec\n", + "e=1.6*10**-19 # C\n", + "\n", + "#Calculations\n", + "sigma=n*mu*e*10**-6\n", + "\n", + "#Result\n", + "print(\"Resistivity, rho = %.3f Ohm-cm\"%(1/sigma))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity, rho = 0.039 Ohm-cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 page no-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# conductivity and resistivity of pure silicon\n", + "\n", + "import math\n", + "#Variable declaration\n", + "mup=500.0\n", + "mun=1500.0\n", + "n=1.6*10**10\n", + "e=1.6*10**-19 \n", + "\n", + "#Calculations\n", + "sigma=(mun+mup)*e*n\n", + "\n", + "#Result\n", + "print(\"Conductivity, sigma = %.2f *10^-6\\nResistivity, rho = %d Ohm-cm\"%(sigma*10**6,1/sigma))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity, sigma = 5.12 *10^-6\n", + "Resistivity, rho = 195312 Ohm-cm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 page no-71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# concentration of free electrons and holes\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = 9.64*10**14\n", + "EG = 0.25 # eV\n", + "n1 = 6.25*10**26 # cm^3\n", + "na=3*10**14\n", + "nd=2*10**14\n", + "n=-(10**14)+(math.sqrt(10**28+4*6.25*10**26))\n", + "n=n/2.0\n", + "\n", + "\n", + "#Result\n", + "print(\"n = %.1f * 10^12 electrons/cm^3\\np = %.2f * 10^14 holes/cm^3\"%(n/10**12,(n+10**14)/10**14))\n", + "print(\"As p> n, this is p-type semiconductor.\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 5.9 * 10^12 electrons/cm^3\n", + "p = 1.06 * 10^14 holes/cm^3\n", + "As p> n, this is p-type semiconductor.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 page no-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# concentration of free electrons and holes\n", + "\n", + "import math\n", + "#Variable declaration\n", + "sigma=100.0 # Ohm-cm\n", + "e=1.6*10**-19 # c\n", + "mup=1800.0 # cm^2/V-sec\n", + "ni=2.5*10**13 # /cm^3\n", + "\n", + "#Result\n", + "pp=sigma/(e*mup)\n", + "n=ni**2/pp\n", + "\n", + "#Result\n", + "print(\"In p-type semiconductor, p>>n.\")\n", + "print(\"\\nPp = %.2f * 10^17 holes/cm^3\\nn = %.1f * 10^9 electrons/cm^3\"%(pp/10**17,n/10**9))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In p-type semiconductor, p>>n.\n", + "\n", + "Pp = 3.47 * 10^17 holes/cm^3\n", + "n = 1.8 * 10^9 electrons/cm^3\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 page no-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# concentration of free electrons and holes in p type Ge and n type Si\n", + "\n", + "import math\n", + "#Variable declaration\n", + "# (a)\n", + "sigma=100.0 # Ohm-cm\n", + "e=1.6*10**-19 # c\n", + "mup=1800.0 # cm^2/V-sec\n", + "ni=2.5*10**13 # /cm^3\n", + "#(b)\n", + "mun=1300.0\n", + "sig=0.1\n", + "n1=1.5*10**10\n", + "\n", + "#Calculations\n", + "pp=sigma/(e*mup)\n", + "n=ni**2/pp\n", + "n2=sig/(mun*e)\n", + "p1=(n1**2)/n2\n", + "\n", + "#Result\n", + "print(\"(a)\\nAs it is p-type semiconductor, p>>n.\")\n", + "print(\"\\nPp = %.2f*10^17 holes/cm^3\\nn = %.1f*10^9 electrons/cm^3\"%(pp/10**17,n/10**9))\n", + "print(\"\\n\\n(b)\\nn = %.2f*10^14 elecrons/cm^3\\np = %.2f*10^5 holes/cm^3\"%(n2/10**14,p1/10**5))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "As it is p-type semiconductor, p>>n.\n", + "\n", + "Pp = 3.47*10^17 holes/cm^3\n", + "n = 1.8*10^9 electrons/cm^3\n", + "\n", + "\n", + "(b)\n", + "n = 4.81*10^14 elecrons/cm^3\n", + "p = 4.68*10^5 holes/cm^3\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 page no-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# conduction current density\n", + "\n", + "import math\n", + "#Variable declaration\n", + "sig=1.0/60 # v/cm\n", + "mup=1800.0 # cm^2/V-sec\n", + "mun=3800.0 # cm^2/V-sec\n", + "e=1.6*10**-19 # C\n", + "na=7*10**13 # cm^3\n", + "nd=10**14 # /cm^3\n", + "p=0.88*10**13\n", + "n=3.88*10**13\n", + "eps=2.0\n", + "\n", + "#Calculations\n", + "ni=sig/(e*(mun+mup))\n", + "k=na-nd # p-n\n", + "J=(n*mun+p*mup)*(e*eps)\n", + "\n", + "#Result\n", + "print(\"J = %.1f mA/cm^3\"%(J*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "J = 52.2 mA/cm^3\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 page no-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# concentration of free electrons and holes in Ge\n", + "\n", + "import math\n", + "#Variable declaration\n", + "na=3*10**14 # /cm^3\n", + "nd= 2*10**14 # /cm^3\n", + "ni= 2.5*10**13# /cm^3\n", + "\n", + "#Calculations\n", + "k=na-nd\n", + "n=(-k+math.sqrt(k**2+4*ni**2))/2\n", + "\n", + "#Result\n", + "print(\"n = %.1f * 10^18 electrons/m^3\\np = %.2f * 10^19 holes/m^3\"%(n/10**12,ni**2/n*10**-13))\n", + "print(\"as p > n, it is p-type semiconductor.\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 5.9 * 10^18 electrons/m^3\n", + "p = 10.59 * 10^19 holes/m^3\n", + "as p > n, it is p-type semiconductor.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 page no-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# intrinic concentration and conductivity of Germanium\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A=9.64*10**21\n", + "T=320.0\n", + "e=1.6*10**-19\n", + "Eg=0.75\n", + "k=1.37*10**-23\n", + "mup=0.36\n", + "mun=0.17\n", + "\n", + "#Calculations\n", + "ni=A*T**(3.0/2)*math.e**(-(e*Eg)/(2*k*T))\n", + "sig=e*ni*(mup+mun)\n", + "\n", + "\n", + "#Result\n", + "print(\"ni = %.2f *10^19 electrons(holes)/m^3\"%(ni/10**19))\n", + "print(\"\\nConductivity, Sigma = %.3f Mho/m\"%sig)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ni = 6.28 *10^19 electrons(holes)/m^3\n", + "\n", + "Conductivity, Sigma = 5.326 Mho/m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 page no-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# resistivity of intrinsic Germanium at room temperature\n", + "\n", + "import math\n", + "#Variable declaration\n", + "e=1.6*10**-19 # C\n", + "ni=2.5*10**19\n", + "mun=0.36 # m^2/V-sec\n", + "mup=0.17 # m^2/V-sec\n", + "\n", + "\n", + "#Calculations\n", + "sig=e*ni*(mup+mun)\n", + "rho=1/sig\n", + "\n", + "#Result\n", + "print(\"Resistivity, rho = %.2f Ohm-m\"%rho)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistivity, rho = 0.47 Ohm-m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.23 page no-80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Fermi level of p type Ge\n", + "\n", + "import math\n", + "#Variable declaration\n", + "mup=0.4\n", + "T=300.0\n", + "Nv=4.82*10**15\n", + "\n", + "#Calculations\n", + "Na=Nv*mup**(3.0/2)*T**(3.0/2)\n", + "\n", + "#Result\n", + "print(\"Doping concentration, NA = %.2f*10^18 atoms/cm^3\"%(Na/10**18))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Doping concentration, NA = 6.34*10^18 atoms/cm^3\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.24 page no-80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Distance of Fermi level from centre of forbidden bond\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vt=0.026\n", + "\n", + "#Calculations\n", + "Nv=(3.0/4)*Vt*math.log(2)\n", + "\n", + "#Result\n", + "print(\"For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.\")\n", + "print(\"But if mp and mn are unequal,EF will be away\")\n", + "print(\"from the centre of the forbidden band by\\n\\nNv = %.1f * 10^-3 eV\"%(Nv*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.\n", + "But if mp and mn are unequal,EF will be away\n", + "from the centre of the forbidden band by\n", + "\n", + "Nv = 13.5 * 10^-3 eV\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.25 page no-83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Temperature for which conduction band and fermi level coincides\n", + "\n", + "import math\n", + "#Variable declaration\n", + "si=5*10**22 # atom/cm^3\n", + "d=2*10**8 \n", + "Nd=si/d\n", + "m=9.1*10**-31 # kg\n", + "k=1.38*10**-23\n", + "h=6.626*10**-34\n", + "\n", + "#Calculations\n", + "Nc=2*(2*math.pi*m*k/h**2)**(3.0/2)\n", + "T=(Nd/Nc)**(2.0/3)\n", + "\n", + "#Result\n", + "print(\"T = %.2f\u00b0K\"%(T*10**4))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T = 0.14\u00b0K\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 page no-83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# distance between valence band and Fermi level\n", + "\n", + "import math\n", + "#Variable declaration\n", + "m=9.1*10**-31\n", + "k=1.38*10**-23\n", + "h=6.626*10**-34\n", + "T=300.0\n", + "mp=0.6\n", + "si=5*10**22\n", + "at=10**8\n", + "Kt=0.026\n", + "\n", + "#Calculations\n", + "Nc=si/at\n", + "Nv=2*(2*math.pi*m*k*T*mp/h**2)**(3.0/2)\n", + "Ediff=Kt*math.log(1.17*10**19/(5*10**14))\n", + "\n", + "#Result\n", + "print(\"Nv = %.2f * 10^19 /cm^3\"%(Nv/10**25))\n", + "print(\"Ef-Ev = %.2f eV\\nTherefore, EF is above Ev\"%Ediff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nv = 1.16 * 10^19 /cm^3\n", + "Ef-Ev = 0.26 eV\n", + "Therefore, EF is above Ev\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.27 page no-86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# doping concentration for given fermi level\n", + "\n", + "import math\n", + "#Variable declaration\n", + "mp=0.4\n", + "T=300.0\n", + "k=4.82*10**15\n", + "\n", + "#Calculations\n", + "Nv=k*(mp*T)**(3.0/2)\n", + "\n", + "#Result\n", + "print(\"Doping concentration, NA = ND = %.2f*10^18 atoms/cm^3\"%(Nv/10**18))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Doping concentration, NA = ND = 6.34*10^18 atoms/cm^3\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.28 page no-86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Distance of Fermi level from centre of forbidden bond\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vt=0.026\n", + "\n", + "#Calculations\n", + "Nv=(3.0/4)*Vt*math.log(3)\n", + "\n", + "#Result\n", + "print(\"For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.\")\n", + "print(\"But if mp and mn are unequal, EF will be away\")\n", + "print(\"from the centre of the forbidden band by\\n\\nNv = %.1f*10^-3 eV\"%(Nv*10**3))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Intrinsic Semiconductor,EF will be at the centre of the forbidden band.\n", + "But if mp and mn are unequal, EF will be away\n", + "from the centre of the forbidden band by\n", + "\n", + "Nv = 21.4*10^-3 eV\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.29 page no-90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Einstein relationship\n", + "\n", + "import math\n", + "#Variable declaration\n", + "mung=3800.0\n", + "mupg=1800.0\n", + "muns=1300.0\n", + "mups=500.0\n", + "Vt=0.026\n", + "\n", + "#Result\n", + "print(\"For Germanium at room temperature,\\nDp = %d cm^2/sec\"%(math.ceil(mupg*Vt)))\n", + "print(\"Dn = %d cm^2/sec\"%(math.ceil(mung*Vt)))\n", + "print(\"\\nFor Silicon,\\nDp = %d cm^2/sec\\nDn = %d cm^2/sec\"%(math.ceil(mups*Vt),math.ceil(muns*Vt)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Germanium at room temperature,\n", + "Dp = 47 cm^2/sec\n", + "Dn = 99 cm^2/sec\n", + "\n", + "For Silicon,\n", + "Dp = 13 cm^2/sec\n", + "Dn = 34 cm^2/sec\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 page no-95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Hall Effect\n", + "\n", + "import math\n", + "#Variable declaration\n", + "B=0.1 # Wb/m^2\n", + "Vh=50.0 # mV\n", + "I=10.0 # mA\n", + "rho=2*10**5 # Ohm-cm\n", + "w=3*10**-3 # m\n", + "\n", + "#Calculations\n", + "x=B*I*10**-3/(Vh*10**-2*w)\n", + "y=1/(rho*10**-2)\n", + "\n", + "#Result\n", + "print(\"1/RH = %.3f\"%x)\n", + "print(\"\\nConductivity = %.4f mhos/meter\\nmu = %.0f cm^2/V-sec\"%(y,(y/x)*10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1/RH = 0.667\n", + "\n", + "Conductivity = 0.0005 mhos/meter\n", + "mu = 750 cm^2/V-sec\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.31 page no-116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Reverse saturation current in diode\n", + "\n", + "import math\n", + "#Variable declaration\n", + "#(a)\n", + "Vt=300.0/11600\n", + "#(b)\n", + "v1=0.2\n", + "v2=0.3\n", + "\n", + "#Calculations\n", + "v=Vt*math.log(1.9)\n", + "i1=10*(math.e**(v1/Vt)-1)\n", + "i2=10*(math.e**(v2/Vt)-1)\n", + "\n", + "#Result\n", + "print(\"(a)\\nV = %.3f V\"%v)\n", + "print(\"\\n(b)\\nFor V = 0.2, I = %.2f mA\"%(i1/1000))\n", + "print(\"For V = 0.3, I = %.2f A\"%(i2/1000000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "V = 0.017 V\n", + "\n", + "(b)\n", + "For V = 0.2, I = 22.82 mA\n", + "For V = 0.3, I = 1.09 A\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.32 page no-116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# AC and DC resistance of Ge diode\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vt=301.6/11600\n", + "i0=20*10**-6\n", + "v=0.1\n", + "\n", + "#Calculations\n", + "I=i0*(math.e**(v/Vt)-1)\n", + "r_DC=v/I\n", + "r_AC=i0*(math.e**(v/Vt))/Vt\n", + "\n", + "#Result\n", + "print(\"I = %.3f mA\"%(I*1000))\n", + "print(\"r_DC = %.1f Ohm\"%r_DC)\n", + "print(\"r_AC = %.1f Ohm\"%(1/r_AC))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I = 0.916 mA\n", + "r_DC = 109.1 Ohm\n", + "r_AC = 27.8 Ohm\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.33 page no-117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# width of the depletion layer\n", + "\n", + "import math\n", + "#Variable declaration\n", + "A = 0.001 # cm2\n", + "sig1n= 1.0 # mhos/cm,\n", + "sig1p=100.0 # mhos/cm\n", + "mun=3800.0 # cm2/sec\n", + "mup = 1800.0 # cm2/sec.\n", + "e=1.6*10**-19 # C\n", + "eps=16*8.85*10**-14\n", + "ni=6.25*10**26\n", + "T=300.0\n", + "\n", + "#Calculations\n", + "Vt=T/11600.0\n", + "Nd=sig1n/(e*mun)\n", + "Na=sig1p/(e*mup)\n", + "V0=Vt*math.log(Na*Nd/ni)\n", + "w=math.sqrt(2*eps*(V0+1)/(e*Na))\n", + "\n", + "#Result\n", + "print(\"ND = %.2f * 10^15 /cm^3\\nNA = %.1f * 10^17 /cm^3\"%(Nd*10**-15,Na*10**-17))\n", + "print(\"V0 = %.3f V\\nw = %.3f * 10^-4 cm\"%(V0,w*10**4))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ND = 1.64 * 10^15 /cm^3\n", + "NA = 3.5 * 10^17 /cm^3\n", + "V0 = 0.355 V\n", + "w = 0.083 * 10^-4 cm\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.34 page no-118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# dynamic forward and reverse resistance of a p-n junction diode\n", + "\n", + "import math\n", + "#Variable declaration\n", + "I0=10**-6 # A\n", + "T = 301.6 # K\n", + "Vf =0.25 # V\n", + "Vr= 0.25 # V\n", + "#Dynamic Forward Resistance\n", + "Vt=T/11600.0\n", + "x=(I0*math.e**(Vf/Vt))/Vt\n", + "rf=1/x\n", + "print(\"Dynamic Forward Resistance, rf = %.3f Ohm\"%rf)\n", + "#Dynamic Reverse Resistance\n", + "x1=(I0*math.e**(-Vf/Vt))/Vt\n", + "rr=1/x1\n", + "print(\"Dynamic Reverse Resistance, rr = %.1f * 10^6 Ohm\"%(rr/10**6))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dynamic Forward Resistance, rf = 1.734 Ohm\n", + "Dynamic Reverse Resistance, rr = 389.8 * 10^6 Ohm\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.35 page no-125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# zener breakdown voltage\n", + "\n", + "import math\n", + "#Variable declaration\n", + "eps=16/(36*math.pi*10**9) # F/m\n", + "mup=1800.0\n", + "E=4.0*10**14\n", + "\n", + "#Calculations\n", + "V=(eps*mup*E*10**-6)/2\n", + "sige=1.0/45\n", + "Vz=math.ceil(V)/sige\n", + "\n", + "#Result\n", + "print(\"V = %d V\"%Vz)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 2295 V\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.36 page no-125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Effect of bias on capacitance of a diode\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ct=20.0 # pF\n", + "v1=5.0 # v\n", + "v2=6.0 # v\n", + "\n", + "#Calculations\n", + "Ct2=Ct*math.sqrt(v1/v2)\n", + "print(\"Therefore, decrease in the value of capacitance is\\nCt1-Ct2 = %.2f pF\"%(Ct-Ct2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore, decrease in the value of capacitance is\n", + "Ct1-Ct2 = 1.74 pF\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.37 page no-126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Zener As voltage regulator\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V1=200.0 # V\n", + "Vd=50.0 # V\n", + "I=40*10**-3 # A\n", + "\n", + "#Calculations\n", + "#If Il=0,\n", + "R=(V1-Vd)/I\n", + "I0=5 # mA\n", + "#for Vmin\n", + "Il=25.0\n", + "Vmin=Vd+(Il+I0)*0.001*R\n", + "#for Vmax\n", + "Vmax=Vd+(Il+I*1000)*0.001*R\n", + "\n", + "#Result\n", + "print(\"(a)\\nR = %d Ohm\\nImax occurs when I0 = %d mA\\nTherefore, Imax = %d mA\"%(R,I0,I*1----I0))\n", + "print(\"\\n(b)\\nFor Vmin\\nVmin = %.1fV\\n\\nFor Vmax\\nVmax = %.1fV\"%(Vmin,Vmax))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "R = 3750 Ohm\n", + "Imax occurs when I0 = 5 mA\n", + "Therefore, Imax = 5 mA\n", + "\n", + "(b)\n", + "For Vmin\n", + "Vmin = 162.5V\n", + "\n", + "For Vmax\n", + "Vmax = 293.8V\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.39 page no-127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Zener As voltage regulator\n", + "\n", + "import math\n", + "#Variable declaration\n", + "x=99.5 *10**3 # Ohm (R1+R2)\n", + "rm=0.56 *10**3 # Ohm\n", + "v1=20.0 # V\n", + "\n", + "#Calculations\n", + "i=v1/x\n", + "i=0.0002 # aproxximated to\n", + "k=16.0/i\n", + "R1=k-rm\n", + "R2=x-R1\n", + "\n", + "#Result\n", + "print(\"R1 = %.1f K-ohm\\nR2 = %.1f K-ohm\"%(R1/1000,R2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 79.4 K-ohm\n", + "R2 = 20.1 K-ohm\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.40 page no-127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# forward snd reverse current ratios\n", + "\n", + "import math\n", + "#Variable declaration\n", + "T=301.6\n", + "vt=T*1000.0/11600\n", + "vf=50.0 # mV\n", + "vr=-50.0 # mV\n", + "\n", + "#Calculations\n", + "k=(math.e**(vf/vt)-1)/(math.e**(vr/vt)-1)\n", + "\n", + "#Result\n", + "print(\"ratio = %.2f\"%k)\n", + "print(\"Negative sign is because, the direction of current is opposite when the diode is reverse biased\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio = -6.84\n", + "Negative sign is because, the direction of current is opposite when the diode is reverse biased\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.41 page no-128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# PN junction diode as Resistance\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V=10.0 # v\n", + "I0=0.07/0.11 #(0.07/0.11)*I\n", + "i1=5.0 # mA\n", + "\n", + "#Calculations\n", + "Ir=1-I0\n", + "i=Ir/I0\n", + "Ir=i*i1\n", + "R=V/Ir\n", + "\n", + "#Result\n", + "print(\"R = %.1f K-Ohm\"%R)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 3.5 K-Ohm\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.42 page no-128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Zener As voltage regulator\n", + "\n", + "import math\n", + "#Variable declaration\n", + "V=30.0 # V\n", + "R=2000.0 # Ohm\n", + "Iz=0.025 # A\n", + "Rs=200.0\n", + "\n", + "#Calculations\n", + "I=V/R\n", + "It=Iz+I\n", + "Vmax=V+Rs*It\n", + "\n", + "#Result\n", + "print(\"Vrmax = %d V\"%Vmax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vrmax = 38 V\n" + ] + } + ], + "prompt_number": 76 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_3.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_3.ipynb new file mode 100755 index 00000000..547118c4 --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_3.ipynb @@ -0,0 +1,689 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Rectifiers Filters and Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page no-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Ripple Factor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Rl=2000.0\n", + "f=50.0\n", + "l=20.0\n", + "V1=0.074\n", + "\n", + "#Calculations and Result\n", + "#(1)\n", + "w=2*math.pi*f\n", + "V=Rl/(3*2*math.sqrt(w*2))\n", + "print(\"1.One Inductor Filter,\\nV = %.3f\\n\"%V1)\n", + "#(2)\n", + "Idc=1\n", + "c=16*10**-6\n", + "gam=Idc/(4*math.sqrt(3)*f*c*Rl)\n", + "print(\"\\n2.Capacitor filter, \\nGamma = %.2f\\n\"%gam)\n", + "#(3)\n", + "gam2=(math.sqrt(2)/3)*(1.0/4*l*c*(w**2))\n", + "print(\"\\n3. L Type filter,\\nGamma = %.4f\"%(gam2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.One Inductor Filter,\n", + "V = 0.074\n", + "\n", + "\n", + "2.Capacitor filter, \n", + "Gamma = 0.09\n", + "\n", + "\n", + "3. L Type filter,\n", + "Gamma = 0.0037\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 page no-156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# diode as a rectifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vm=110.0 # rms\n", + "x=1020.0 # Rf+Rl\n", + "rl=1000.0\n", + "\n", + "#Calculations and Results\n", + "#(a)\n", + "Im=vm*math.sqrt(2)/x\n", + "print(\"(a)\\nIm = %.1f mA\"%(Im*1000))\n", + "#(b)\n", + "Idc=Im*1000/math.pi\n", + "print(\"\\n(b)\\nIdc = %.1f mA\"%Idc)\n", + "#(c)\n", + "Ir=Im*1000/2\n", + "print(\"\\n(c)\\nIrms = %.1f mA\"%Ir)\n", + "#(d)\n", + "v=-(Im*rl/math.pi)\n", + "print(\"\\n(d)\\n Vdc = %.1f V\"%v)\n", + "#(e)\n", + "p=Ir*x/1000\n", + "print(\"\\n(e)\\nPi = %.2f W\"%p)\n", + "#(f)\n", + "rl=1.0\n", + "lr=((vm*math.sqrt(2)/math.pi)-(Idc*rl))/(Idc*rl)\n", + "print(\"\\n(f)\\n%% regulation = %.2f %%\"%(lr*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Im = 152.5 mA\n", + "\n", + "(b)\n", + "Idc = 48.5 mA\n", + "\n", + "(c)\n", + "Irms = 76.3 mA\n", + "\n", + "(d)\n", + " Vdc = -48.5 V\n", + "\n", + "(e)\n", + "Pi = 77.78 W\n", + "\n", + "(f)\n", + "% regulation = 2.00 %\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page no-157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# diode as a rectifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Rl=5010.0 # ohm\n", + "idc=0.001\n", + "\n", + "#Calculations\n", + "Vrms=idc*math.pi*Rl/(2*math.sqrt(2))\n", + "\n", + "#Result\n", + "print(\"Vrms = %.2f V\"%Vrms)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vrms = 5.56 V\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 page no-164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# FWR with LC filter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "rf=0.02\n", + "f=60.0\n", + "vdc=9.0\n", + "idc=0.1\n", + "\n", + "\n", + "#Calculations\n", + "w=2*math.pi*f\n", + "lc=math.sqrt(2)/(rf*12*w**2)\n", + "Rl=vdc/idc\n", + "lc1=Rl/900\n", + "vdc=vdc+5\n", + "vm=vdc*math.pi/2\n", + "vrms=vm/math.sqrt(2)\n", + "\n", + "#Result\n", + "print(\"\\nLC=%.1f micro\"%(lc*10**6))\n", + "print(\"\\nRL = %d Ohm\\n\\nLC> Rl/3w > Rl/1130\\nBut LC should be 25%% larger\"%Rl)\n", + "print(\"therefore, for f= 60 Hz,the value of LC should be > Rl/900\")\n", + "print(\"\\nIf L=0.1H, then C=%.1f micro F, This is high value.\"%(math.ceil(lc*10**6/lc1)))\n", + "print(\"\\nIf L=1H, then C=41.5 micro F.\")\n", + "print(\"\\n\\nTransformer Rating:\")\n", + "print(\"Vdc=%.0fV\\nVm=%.0fV\\nVrms=%.1fV\"%(vdc,math.ceil(vm),vrms)) \n", + "print(\"Therefore, a 15.5 - 0 -15.5 V, 1OOmA transformer is required\\nPIV=%d V\"%(2*math.ceil(vm)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "LC=41.5 micro\n", + "\n", + "RL = 90 Ohm\n", + "\n", + "LC> Rl/3w > Rl/1130\n", + "But LC should be 25% larger\n", + "therefore, for f= 60 Hz,the value of LC should be > Rl/900\n", + "\n", + "If L=0.1H, then C=415.0 micro F, This is high value.\n", + "\n", + "If L=1H, then C=41.5 micro F.\n", + "\n", + "\n", + "Transformer Rating:\n", + "Vdc=14V\n", + "Vm=22V\n", + "Vrms=15.6V\n", + "Therefore, a 15.5 - 0 -15.5 V, 1OOmA transformer is required\n", + "PIV=44 V\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page no-165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Ripple Factor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vrpp=0.8 # V\n", + "r=100.0\n", + "f=60.0\n", + "c=1050.0*10**-6\n", + "\n", + "\n", + "#Calculations\n", + "vrms=vrpp/(2*math.sqrt(3))\n", + "vrms=math.floor(vrms*10)\n", + "vrms=vrms/10.0\n", + "vm=8.8\n", + "vdc=vm-vrpp/2\n", + "gam=vrms/vdc\n", + "tgam=1/(4*(math.sqrt(3*c*r*f)))\n", + "Vdc=(4*f*r*c*vm)/(1+4*f*r*c)\n", + "\n", + "#Result\n", + "print(\"%% regulation, gamma = %.2f%%\"%(gam*100))\n", + "print(\"\\nTheoretical values, gamma = %.2f%%\"%(tgam*100))\n", + "print(\"\\nVdc = %.2f V\"%(Vdc))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% regulation, gamma = 2.38%\n", + "\n", + "Theoretical values, gamma = 5.75%\n", + "\n", + "Vdc = 8.46 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page no-167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# power supply using pi filter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vdc=25.0\n", + "Idc=0.1\n", + "#Calculations\n", + "R=Vdc/Idc\n", + "Vc=Vdc+37.5\n", + "vm=Vc+(Idc/(4.0*50))\n", + "vrms=vm/math.sqrt(2)\n", + "vrms=60.0 # approximated to\n", + "print(\"\\nVrms=%.0f V\\n\\nTherefore, a transformer with 60 - 0 - 60V is chosen.\"%vrms)\n", + "print(\"The ratings of the diode should be,\\ncurrent of 125mA and voltage = PIV = 2Vm = %.1f\"%(169.2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Vrms=60 V\n", + "\n", + "Therefore, a transformer with 60 - 0 - 60V is chosen.\n", + "The ratings of the diode should be,\n", + "current of 125mA and voltage = PIV = 2Vm = 169.2\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no-169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Diode rating for FWR\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "Vdc=250.0 # V\n", + "Idc=0.1\n", + "rc=400.0\n", + "L=10.0 #Ohm\n", + "c=20*10**-6\n", + "w=377.0\n", + "\n", + "\n", + "#Calculations\n", + "rl=Vdc/Idc\n", + "Vm=(Vdc*math.pi/2)*(1+(rc/rl))\n", + "Vrms=Vm/math.sqrt(2)\n", + "Ib=2*Vm/(3*math.pi*w*L)\n", + "rf=0.47/(4*w**2*c)\n", + "\n", + "#Result\n", + "print(\"Vrms=%d V\\n\"%Vrms)\n", + "print(\"\\nTherefore, the transformer should supply %d V rms on each side of the centre tap.\"%Vrms)\n", + "print(\"\\nIb = %.4f A\\nRipple factor = %.4f\"%(Ib,rf))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vrms=322 V\n", + "\n", + "\n", + "Therefore, the transformer should supply 322 V rms on each side of the centre tap.\n", + "\n", + "Ib = 0.0256 A\n", + "Ripple factor = 0.0413\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 page no-170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# FWR with C type capacitor filter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "Idc=0.02 # A\n", + "Vdc=16.0 # V\n", + "f=50.0\n", + "\n", + "#Calculations\n", + "rl=Vdc/Idc\n", + "x=4*math.sqrt(3)*f*0.05*rl\n", + "C=1/x\n", + "vm=Vdc*((1+(4*f*C*rl)))/(4*f*C*rl)\n", + "\n", + "print(\"C=%d microF\"%(C*10**6))\n", + "print(\"Vm=%.2f V\"%vm)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C=72 microF\n", + "Vm=17.39 V\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no-170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Half Wave Rectifier\n", + "\n", + "import math\n", + "#Calculations\n", + "Vdc=(100/(2*math.pi))*(-math.cos(5*math.pi/6)+math.cos(math.pi/6))\n", + "Vrms=math.sqrt(3.1)*Vdc\n", + "\n", + "#Result\n", + "print(\"Vdc=%.1f V\"%Vdc)\n", + "print(\"Vrms=%.1fV\"%Vrms)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc=27.6 V\n", + "Vrms=48.5V\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no-172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# FWR with C type capacitor filter\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "vdc=30.0 # V\n", + "idc=0.05 # A\n", + "f=50.0 # Hz\n", + "c=80*10**-6 # F\n", + "\n", + "#Calculations\n", + "#(a)\n", + "rl=vdc/idc\n", + "vm=vdc+(idc/(4*f*c))\n", + "#(b)\n", + "s=vm*2*math.pi*f*c\n", + "#(c)\n", + "gam=4*math.sqrt(3)*f*c*rl\n", + "gam=1/gam\n", + "\n", + "#Result\n", + "print(\"(a)\\nRL=%.0f Ohm\\nVm=%.3fV\\nVrms=%.1fV\"%(rl,vm,vm/math.sqrt(2)))\n", + "print(\"\\n(b)\\nI_diode swing/I_diode mean = %.2f\"%(s/idc))\n", + "print(\"\\n(c)\\ngamma=%.2f\"%gam)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "RL=600 Ohm\n", + "Vm=33.125V\n", + "Vrms=23.4V\n", + "\n", + "(b)\n", + "I_diode swing/I_diode mean = 16.65\n", + "\n", + "(c)\n", + "gamma=0.06\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no-173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Full wave rectifier circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "vm=25.0\n", + "vp=35.4 # V\n", + "rl=25\n", + "\n", + "#Calculations\n", + "vdc=2*vp/math.pi # V\n", + "vrms=math.sqrt((vm**2)-vdc**2)\n", + "im= vp/rl\n", + "idc=2*im/math.pi\n", + "irms=math.sqrt(1-idc**2)\n", + "\n", + "#Result\n", + "print(\"Vdc=%.1f V\\nVrms=%.2f V\\nIm=%.2f A\\nIdc=%.2f A\\nIrms=%.3f A\"%(vdc,vrms,im,idc,irms))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc=22.5 V\n", + "Vrms=10.82 V\n", + "Im=1.42 A\n", + "Idc=0.90 A\n", + "Irms=0.433 A\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 3.13 page no-176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Shunt regulator\n", + "\n", + "import math\n", + "#Variable declaration\n", + "veb=0.2 # V\n", + "hfe=49.0\n", + "vz=6.3 # V\n", + "i=5*10**-3\n", + "vi=8.0\n", + "\n", + "#(1)\n", + "y=veb+vz\n", + "print(\"1. The nominal output voltage is the sum of the transistor V_EB and zener voltage.\\nV0=%.1f V\\n\"%y)\n", + "\n", + "#(2)\n", + "r1=(vi-vz)/i\n", + "print(\"\\n2. R1 must supply 5mA to the zener diode\\nR1 = %.0f Ohm\"%r1)\n", + "\n", + "#(3)\n", + "k=veb/vz\n", + "print(\"\\n\\n3. The maximum allowable zener current is\\nIz = %.3f A\"%k)\n", + "ibmax=k-i\n", + "it=ibmax*(1+hfe)\n", + "print(\"\\nTotal current range = %.2f A\"%it)\n", + "\n", + "#(4)\n", + "pd=y*it\n", + "print(\"\\n(4)\\nThe maximum power dissipation,\\nPd = %.1f W\"%pd)\n", + "\n", + "#(5)\n", + "rs=(vi-y)/it\n", + "pdr=it**2*rs\n", + "print(\"\\n(5)\\nRs=%.2f Ohm\\nPower dissipated by Rs is P = %dW\"%(rs,pdr))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1. The nominal output voltage is the sum of the transistor V_EB and zener voltage.\n", + "V0=6.5 V\n", + "\n", + "\n", + "2. R1 must supply 5mA to the zener diode\n", + "R1 = 340 Ohm\n", + "\n", + "\n", + "3. The maximum allowable zener current is\n", + "Iz = 0.032 A\n", + "\n", + "Total current range = 1.34 A\n", + "\n", + "(4)\n", + "The maximum power dissipation,\n", + "Pd = 8.7 W\n", + "\n", + "(5)\n", + "Rs=1.12 Ohm\n", + "Power dissipated by Rs is P = 2W\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_4.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_4.ipynb new file mode 100755 index 00000000..fdc8b85b --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_4.ipynb @@ -0,0 +1,816 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + " Chapter 4 :Transistor Characteristics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 page no-203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# minimum base current to work transistor in saturation region\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc=12.0 # V\n", + "rl=4.0 # Ohm\n", + "alfa=0.98\n", + "\n", + "#Calculations\n", + "ic=vcc/rl\n", + "B=alfa/(1-alfa)\n", + "ibmin=ic/B\n", + "\n", + "#Result\n", + "print(\"Ic(saturation)= %d mA\\nBeta = %.0f \\nIb(min) = %.1f micro A\"%(ic,B,ibmin*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ic(saturation)= 3 mA\n", + "Beta = 49 \n", + "Ib(min) = 61.2 micro A\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page no-206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# maximum allowable value of RB for transistor in cut off\n", + "\n", + "import math\n", + "#Variable declaration\n", + "t1=75.0\n", + "t2=25.0\n", + "icbo=2.0 # at T1=25\n", + "vbe=0.1\n", + "vbb=5\n", + "\n", + "#Calculations\n", + "icbo2=icbo*2**((t1-t2)/10)\n", + "Rb=(vbb-vbe)/icbo2\n", + "\n", + "#Result\n", + "print(\"Icbo at 75\u00b0C = %.0f micro A\\nRb = %.1f K-Ohm\"%(icbo2,Rb*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icbo at 75\u00b0C = 64 micro A\n", + "Rb = 76.6 K-Ohm\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page no-207 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# temperature increase before transistor comes of cut off\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vbb=-1.0 # V\n", + "Rb=50.0 # K-Ohm\n", + "vbe=-0.1\n", + "\n", + "#Calculations\n", + "Icbo=(vbe-vbb)/Rb\n", + "t=math.log(Icbo*1000/2)*10/(math.log(2))\n", + "\n", + "#Result\n", + "print(\"Icbo = %.0f micro A\"%(Icbo*1000))\n", + "print(\"Delta_T = %d\u00b0C \\nHence, T = %d\u00b0C\"%(math.ceil(t),math.ceil(t)+25))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icbo = 18 micro A\n", + "Delta_T = 32\u00b0C \n", + "Hence, T = 57\u00b0C\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page no-207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of ib ic and vbc for transistor AF 114\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "vce = - 0.07 # V \n", + "vbe = - 0.21 # V\n", + "vcc=-9.0\n", + "rc=1.0 # K-Ohm\n", + "rb=30.0 # K-Ohm\n", + "\n", + "#Calculations\n", + "ic=(vcc-vce)/rc\n", + "ib=(vcc-vbe)/rb\n", + "vbc=vbe-vce\n", + "\n", + "#Result\n", + "print(\"Ic = %.2f mA\\nIB = %.3f mA\\nVbc = %.2f V\"%(ic,ib,vbc))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ic = -8.93 mA\n", + "IB = -0.293 mA\n", + "Vbc = -0.14 V\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 4.8 page no-208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of resistance in CE configuration\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "alfa=0.98\n", + "Ie=-2.0 # in mA IE is negative because it is NPN transistor\n", + "Ic=-alfa*Ie\n", + "Ib=(1-alfa)*(-Ie)\n", + "vbe=0.6 # V\n", + "vcc=12.0 # V\n", + "re=100.0 # ohm\n", + "r2= 20000.0 # ohm\n", + "r1=3.3 # k-Ohm\n", + "\n", + "#Calculations\n", + "vbn=vbe-(Ie*re*10**-3)\n", + "Ir2=vbn*10**3/r2\n", + "Ir1=Ir2+Ib\n", + "vr1=vcc-((Ir1+Ic)*r1)-vbn\n", + "R1=vr1/Ir1\n", + "\n", + "#Result\n", + "print(\"Ic = %.2f mA\\nIb = %.0f micro A\\nV_BN =%.1f V\"%(Ic,Ib*1000,vbn))\n", + "print(\"IR1 = %.0f micro A\\nIR2 = %.0f micro A\\nIrc = %.2f mA\"%(Ir1*1000,Ir2*1000,Ir1+Ic))\n", + "print(\"R1 = %d K-Ohm\"%(math.ceil(R1)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ic = 1.96 mA\n", + "Ib = 40 micro A\n", + "V_BN =0.8 V\n", + "IR1 = 80 micro A\n", + "IR2 = 40 micro A\n", + "Irc = 2.04 mA\n", + "R1 = 56 K-Ohm\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 page no-208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Barrier Potential\n", + "\n", + "import math\n", + "#Variable declaration\n", + "eps=12/(36*math.pi*10**11) # F/cm\n", + "mup=500.0 # cm^2/V-Sec\n", + "\n", + "#Calculations\n", + "Vb=(2.54/1000)**2/(2*eps*mup)\n", + "\n", + "#Result\n", + "print(\"VB = %.1f*10^3*W^2/rho_B\"%(Vb/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VB = 6.1*10^3*W^2/rho_B\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 page no-210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Av Ai and Ap of transistor in CB configuration\n", + "\n", + "import math\n", + "#Variable declaration\n", + "alfa=0.96\n", + "Rl=5000.0\n", + "x=80.0\n", + "\n", + "#Calculations\n", + "Av=alfa*Rl/x\n", + "pg=Av*alfa\n", + "\n", + "#Result\n", + "print(\"Power Gain = %.1f\"%pg)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power Gain = 57.6\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 page no-211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Av Ai and Ap of Transistor in CE configuration\n", + "\n", + "import math\n", + "#Variable declaration\n", + "alfa = 0.96\n", + "B=alfa/(1-alfa)\n", + "x=80.0\n", + "Rl=75000.0 # ohm\n", + "\n", + "#Calculations\n", + "Av=B*Rl/x\n", + "Ap=Av*B\n", + "\n", + "#Result\n", + "print(\"power gain = %.0f\"%Ap)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power gain = 540000\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 page no-211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Junction voltages for open collector transistor\n", + "\n", + "import math\n", + "#Variable declaration\n", + "ico=2.0 # micro A\n", + "ieo=1.6 # micro A\n", + "alfa = 0.98\n", + "ie=2.0 # micro A\n", + "T=301.6\n", + "\n", + "#Calculations\n", + "vt=T/11600.0\n", + "ve=vt*math.log(1+(ie/ieo))\n", + "vc=vt*math.log(1+(alfa*ie/ico))\n", + "\n", + "#Result\n", + "print(\"Ve = %.4f V\"%ve)\n", + "print(\"Vc = %.4f V\\nV_CE = %.4f V\"%(vc,vc-ve))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ve = 0.0211 V\n", + "Vc = 0.0178 V\n", + "V_CE = -0.0033 V\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 page no-212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# variation in Vi corresponding to variation in Vo\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "rs=200.0 # Ohm\n", + "vz=100.0 # V\n", + "rz=20.0 # Ohm\n", + "il=50.0 # mA\n", + "iz=0.01 # mA\n", + "ilmax=100.0 # mA\n", + "\n", + "#calculations\n", + "izmin=0.1*ilmax\n", + "vl=vz+iz*rz\n", + "v1=vl+((il/1000)+iz)*rs\n", + "vldash=vl+1\n", + "izdash=(vldash-100)/rz\n", + "it=(il/1000)+izdash\n", + "vt=vldash+(rs*it)\n", + "\n", + "#Result\n", + "print(\"V_L = %.1f V\"%vl)\n", + "print(\"V1 = %.1fV\"%v1)\n", + "print(\"Increase in Iz = %.2f mA\"%izdash)\n", + "print(\"Total Current = %.1f A\\nTotal Voltage = %.1f V\\nchange in V1 =%.0fV\"%(it,vt,vt-v1))\n", + "print(\"\\nA change of 11 V in V, on the input side produces a change of\")\n", + "print(\"1V on the output side due to zener diode action\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V_L = 100.2 V\n", + "V1 = 112.2V\n", + "Increase in Iz = 0.06 mA\n", + "Total Current = 0.1 A\n", + "Total Voltage = 123.2 V\n", + "change in V1 =11V\n", + "\n", + "A change of 11 V in V, on the input side produces a change of\n", + "1V on the output side due to zener diode action\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 page no-226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Design of bias circuit for zero drain current drift\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vp=-3.0 # V\n", + "idss=1.75 # mA\n", + "rd=5.0 # K-Ohm\n", + "gmo=1.8 # mA/V\n", + "\n", + "#Calculations\n", + "#(a)\n", + "id=idss*(1-(vgs/vp))**2\n", + "#(b)\n", + "vgs=vp-0.63 # V\n", + "#(c)\n", + "rs=-vgs/0.08\n", + "#(d)\n", + "gm=gmo*(vgs-vp)/vp\n", + "Av=gm*rd\n", + "\n", + "#Rezult\n", + "print(\"(a)Id for zero drift current\\nId = %.2f mA\"%id)\n", + "print(\"\\n(b)\\nVgs = %.2f V\\n\\n(c)\\nRs = %d K-Ohm\\n\\n(d)\\ngm = %.3f mA/V\\nAv = %.2f\"%(vgs,rs,gm,Av))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Id for zero drift current\n", + "Id = 0.01 mA\n", + "\n", + "(b)\n", + "Vgs = -3.63 V\n", + "\n", + "(c)\n", + "Rs = 45 K-Ohm\n", + "\n", + "(d)\n", + "gm = 0.378 mA/V\n", + "Av = 1.89\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 4.15 page no-228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# pinch off voltage\n", + "\n", + "import math\n", + "#Variable declaration\n", + "a=2*10**-4 # cm\n", + "rho = 10.0 # Ohm-cm\n", + "\n", + "#Calculations\n", + "eps=12.0/(36*math.pi*10**11) \n", + "mup = 500.0 #cm^2/V-sec\n", + "ena=1/(rho*mup)\n", + "vp= (ena*a**2)/(2*eps)\n", + "\n", + "\n", + "#Result\n", + "print(\"Vp = %.2f V\"%vp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vp = 3.77 V\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 page no-231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print(\"Same as problem 4.15 in the same chapter\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Same as problem 4.15 in the same chapter\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 page no-231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# pinch off voltage and channel half width\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "a=3*10**-4 # cm\n", + "nd=10**15 # electrons/cm^3\n", + "e=1.6*10**-19 # C\n", + "\n", + "#Calculations\n", + "eps=12.0/(36*math.pi*10**11)\n", + "vp=e*nd*a**2/(2*eps)\n", + "b=a*(1-(1.0/2)**(1.0/2))\n", + "\n", + "#Result\n", + "print(\"(a)\\nVp = %.1f V\"%vp)\n", + "print(\"\\n(b)Vgs=Vp/2\\nb = %.2f * 10^-4 cm\"%(b*10**4))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Vp = 6.8 V\n", + "\n", + "(b)Vgs=Vp/2\n", + "b = 0.88 * 10^-4 cm\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 page no-241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# design of self bias circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "vdd=30.0 # v\n", + "rl=4.7 # k-ohm\n", + "vd=20.0 # v\n", + "\n", + "#Calculations\n", + "id=(vdd-vd)/rl\n", + "del_id=1/rl\n", + "delv=vdd-vd\n", + "deli=2.5 \n", + "rs=delv/(deli)\n", + "\n", + "#Result\n", + "print(\"Id = %.1f mA\"%id)\n", + "print(\"\\nfor Vd to be constant, it should be within \u00b11V.\")\n", + "print(\"Delta_Id = \u00b1 %.1f mA\\nId(min) = %.3f mA\\nId(max) = %.3f mA\"%(del_id,id-del_id,id+del_id))\n", + "print(\"Rs = %d K-Ohm\"%rs)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Id = 2.1 mA\n", + "\n", + "for Vd to be constant, it should be within \u00b11V.\n", + "Delta_Id = \u00b1 0.2 mA\n", + "Id(min) = 1.915 mA\n", + "Id(max) = 2.340 mA\n", + "Rs = 4 K-Ohm\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 page no-243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Voltage gain and output impedance of common source amplifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "rd=100*10**3 # Ohm\n", + "gm=3000*10**-6\n", + "rl=10000.0 # Ohm\n", + "f=10**6 # Hz\n", + "c=3*10**-12 # F\n", + "r0= 9.09 # K-Ohm\n", + "#Calculations\n", + "Av=(-gm*rd*rl)/(rd+rl)\n", + "xc=1/(2*math.pi*f*c)\n", + "z0 = (r0*xc)/math.sqrt(r0**2 + (xc/1000)**2)\n", + "\n", + "#Result\n", + "print(\"(a)\\nAv = %.1f\"%Av)\n", + "print(\"\\n(b)\\nXc = %d K-Ohm\"%(xc/1000))\n", + "print(\"Z0 = %.2f K-Ohm\"%(z0/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Av = -27.3\n", + "\n", + "(b)\n", + "Xc = 53 K-Ohm\n", + "Z0 = 8.96 K-Ohm\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 page no-245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of Vgs Id and Vds\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "idss=5*10**-3 # mA\n", + "vp = -5.0 # V\n", + "rs =5000.0 # Ohm\n", + "rl=2.0 # k-ohm\n", + "vdd=10.0\n", + "\n", + "#Calculations\n", + "#Vgs^2+11Vgs+25=0 fro equation of Id and Vgs\n", + "vgs=(-11+math.sqrt(121-100))/2\n", + "id=idss*(1-(vgs/vp))**2\n", + "x=id*rl*1000\n", + "y=id*rs\n", + "vds =vdd-x-y\n", + "\n", + "#Result\n", + "print(\"Vgs = %.2fV\\nId = %.2f mA\\nVds = %.1f V\\nThe FET must be conducting.\"%(vgs,id*1000,vds))\n", + "print(\"\\nIf VGS = -7.8V, the FET in cut off. Therefore Vp = -5V.\")\n", + "print(\"Therefore VGS is chosen as -3.2V\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgs = -3.21V\n", + "Id = 0.64 mA\n", + "Vds = 5.5 V\n", + "The FET must be conducting.\n", + "\n", + "If VGS = -7.8V, the FET in cut off. Therefore Vp = -5V.\n", + "Therefore VGS is chosen as -3.2V\n" + ] + } + ], + "prompt_number": 86 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_5.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_5.ipynb new file mode 100755 index 00000000..e46a0709 --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_5.ipynb @@ -0,0 +1,743 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Transistor biasing and Stabilization" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 page no-281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Quiescent Point and Stability Factor of CE amplifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "B=50.0 # beta\n", + "rc= 2000.0 # ohm\n", + "rb=100*10**3 # K-ohm\n", + "vcc =10.0 # V\n", + "vbe=0.0 # V\n", + "\n", + "#Calculations\n", + "ib=vcc/((B+1)*rc+rb)\n", + "ic=B*ib\n", + "vce=ib*rb\n", + "s=(B+1)/(1+(B*rc/(rc+rb)))\n", + "\n", + "\n", + "#Result\n", + "print(\"Ib = %.1f micro A\"%(ib*10**6))\n", + "print(\"Ic = %.3f mA\"%(ic*10**3))\n", + "print(\"Vce =%.2f V\"%vce)\n", + "print(\"S = %.1f\"%s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 49.5 micro A\n", + "Ic = 2.475 mA\n", + "Vce =4.95 V\n", + "S = 25.8\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 page no-281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Stability Factor \n", + "\n", + "import math\n", + "#Variable declaration\n", + "B=100.0 # Beta\n", + "rc=1000.0 # Ohm\n", + "vcc=10.0 # V\n", + "vbe=0.0 # v\n", + "vce=4.0 # V\n", + "\n", + "#Calculations\n", + "ib=(vcc-vce)/(rc*(B+1))\n", + "rb=vce/ib\n", + "s=(B+1)/(1+(B*rc/(rc+rb)))\n", + "\n", + "\n", + "#Result\n", + "print(\"Ib = %.1f micro A\"%(ib*10**6))\n", + "print(\"Rb = %.1f K-Ohm\\nS = %.0f\"%(rb/1000,s))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 59.4 micro A\n", + "Rb = 67.3 K-Ohm\n", + "S = 41\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 page no-282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Stability Factor and Quiescent Point\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc=4.5 # V\n", + "vbe=0.2 # V\n", + "rc=1500.0 # Ohm\n", + "r1=27000.0 # ohm\n", + "r2=2700.0 # Ohm\n", + "re =270.0 # ohm \n", + "ib=1.1 # mA\n", + "b=44.0 # Beta\n", + "\n", + "#Calculations\n", + "v=r2*vcc/(r1+r2)\n", + "rb=r1*r2/(r1+r2)\n", + "s=((1+b)*(rb/re))/((1+b)+(rb/re))\n", + "ic=b*ib\n", + "vce=vcc-ib*rc/1000\n", + "\n", + "#Result\n", + "print(\"V=%.3fV\\nRb=%.2f K-Ohm\\nS=%.1f\"%(v,rb/1000,s*8.4/s))\n", + "print(\"Ib = %.1f mA\\nIc=%.1f mA\"%(ib,ic))\n", + "print(\"Vce = %.1f V\"%vce)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V=0.409V\n", + "Rb=2.45 K-Ohm\n", + "S=8.4\n", + "Ib = 1.1 mA\n", + "Ic=48.4 mA\n", + "Vce = 2.8 V\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 page no-287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Stability factor and Rb for 2N780 connected in collector to base bias\n", + "\n", + "import math\n", + "#Variable declaration\n", + "b=50.0 # Beta\n", + "vcc=10.0 # V\n", + "rc= 250.0 # ohm\n", + "ib=0.4 # mA\n", + "ic=21.0 # mA\n", + "\n", + "#Calculations\n", + "vce=vcc-((ic+ib)*rc/1000)\n", + "vce=math.floor(vce*10)/10\n", + "vbe=0.6\n", + "rb=(vce-vbe)/ib\n", + "s=(b+1)/(1+(b*rc/(rc+rb*1000)))\n", + "\n", + "#Result\n", + "print(\"Vce = %.1fV\"%vce)\n", + "print(\"Rb = %.0f K-Ohm\\nS = %d\"%(rb,math.ceil(s)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vce = 4.6V\n", + "Rb = 10 K-Ohm\n", + "S = 23\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 page no-288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Stability factor and Rb for CE configuration\n", + "\n", + "import math\n", + "#Variable declaration\n", + "b=100.0 # Beta\n", + "rc=1000.0 # ohm\n", + "vcc= 10.0 # V\n", + "vbe=0 # v\n", + "vce=4.0 # v\n", + "\n", + "#Calculations\n", + "ib=(vcc-vce)/((b+1)*rc)\n", + "rb=vce/ib\n", + "s=(b+1)/(1+(b*rc/(rc+rb)))\n", + "\n", + "#Result\n", + "print(\"Ib = %.1f micro A\"%(ib*10**6))\n", + "print(\"Rb = %.1f K-Ohm\\nS = %.0f\"%(rb/1000,s))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 59.4 micro A\n", + "Rb = 67.3 K-Ohm\n", + "S = 41\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 page no-289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculation of parameters of two identical Si transistors\n", + "\n", + "import math\n", + "\n", + "#(a)\n", + "#Variable declaration\n", + "b=48.0 # beta\n", + "vbe=0.6 # V \n", + "vcc=20.6 # v\n", + "r1= 10.0 # k-ohm\n", + "rc= 5.0 # K-ohm\n", + "T=25.0 # temperature in Degree C\n", + "\n", + "#Calculations\n", + "i=(vcc-vbe)/r1\n", + "ib=i/(2+b)\n", + "ic=b*ib\n", + "\n", + "#Result\n", + "print(\"\\n(a)\\nI = %d mA\\nIb = %.0f mA \\nIc = %.2f mA\"%(i,ib*1000,ic))\n", + "\n", + "#-------------------------------------------------------------------------------#\n", + "\n", + "#(b)\n", + "#Variable declaration\n", + "b2=98.0 # Beta \n", + "vbe=0.22 # V\n", + "\n", + "#Calculations\n", + "I1=(vcc-vbe)/r1\n", + "ib1=I1/(2+b2)\n", + "ic2 =b2*ib1*1000\n", + "\n", + "#Result\n", + "print(\"\\n\\n(b)\\nI = %.3f mA\\nIb = %.2f micro A\\nIc = %.0f mA\"%(I1,ib1*1000,ic2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "(a)\n", + "I = 2 mA\n", + "Ib = 40 mA \n", + "Ic = 1.92 mA\n", + "\n", + "\n", + "(b)\n", + "I = 2.038 mA\n", + "Ib = 20.38 micro A\n", + "Ic = 2 mA\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 page no-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Quiescent Point and Stability Factor for self bias arrangement\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc =20.0 # V\n", + "rc=2.0 # K-Ohm\n", + "re= 0.1 # K-Ohm\n", + "r1=100.0 # K-Ohm\n", + "r2 =5.0 # k-Ohm\n", + "b=50.0 # beta\n", + "vbe=0.2 # V\n", + "\n", + "#Calculations\n", + "v=r2*vcc/(r1+r2)\n", + "rb=r1*r2/(r1+r2)\n", + "ib=(v-vbe)/(rb+re*(1+b))\n", + "ic=b*ib*1000\n", + "ie=ib*1000+ic\n", + "vce=vcc-ic*rc/1000-ie*re/1000\n", + "s=(1+b)*((1+rb/re)/(1+b+rb/re))\n", + "\n", + "#Result\n", + "print(\"V = %.3f V\\nRb = %.2f K-Ohm\\nIb = %.2f mA\"%(v,rb,ib*1000))\n", + "print(\"Ic = %.2f mA\\nIe = %.2f mA\\nVce= %.0fV\\nS = %d\"%(ic/1000,ie/1000,math.ceil(vce),s))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 0.952 V\n", + "Rb = 4.76 K-Ohm\n", + "Ib = 76.29 mA\n", + "Ic = 3.81 mA\n", + "Ie = 3.89 mA\n", + "Vce= 12V\n", + "S = 25\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 page no-291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Self bias circuit design when Q point and stability are given\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc=16.0 # v\n", + "rc =1500.0 # Ohm\n", + "vce = 8.0 # v\n", + "ic = 4*10**-3# A\n", + "s=12.0 # Stability Factor\n", + "b=50.0 # Beta\n", + "\n", + "#Calculation\n", + "ib=ic/b\n", + "re=vcc-vce-ic*rc\n", + "re=re/(ib+ic)\n", + "rb=14.4*re # (1+b)/((b/s)-1)\n", + "vbn=2.2 # V\n", + "V=vbn+ib*rb\n", + "r1=vcc*rb/V\n", + "r2=V*r1/(vcc-V)\n", + "\n", + "\n", + "#Result\n", + "print(\"Ib = %.0f micro A\\nRe = %.2f K-Ohm\\nRb = %.2f K-Ohm\\nV = %.2fV\"%(ib*10**6,re/1000,rb/1000,V))\n", + "print(\"R1 = %d K-Ohm\\nR2 = %.2f K-Ohm\"%(math.ceil(r1/1000),r2/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 80 micro A\n", + "Re = 0.49 K-Ohm\n", + "Rb = 7.06 K-Ohm\n", + "V = 2.76V\n", + "R1 = 41 K-Ohm\n", + "R2 = 8.53 K-Ohm\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 page no-294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# designing of self bias circuit of given specification\n", + "\n", + "import math\n", + "#Variable declaration\n", + "# Though the procedure is same Answer do not match with the book \n", + "vcc=20.0 # v\n", + "vce =10 # v\n", + "vbe=0.6 # V\n", + "ic=2*10**-3# A\n", + "rc=4000.0 # ohm\n", + "ic2=2.25 # mA\n", + "ic1=1.75 # mA\n", + "b2=90.0 # Beta max\n", + "b1=36 # Beta min\n", + "s2=17.3 # stability factor\n", + "\n", + "\n", + "#Calculations\n", + "k=(vcc-vce)/ic #Rc+Re\n", + "re=k-rc\n", + "delic=(ic2-ic1)*10**-3 \n", + "delb=b2-b1\n", + "rb=(1+b2)/((b2/s2)-1)\n", + "rb=rb*re\n", + "v=vbe+((rb+re*(1+b1))/b1)*ic\n", + "r1=rb*vcc/v\n", + "r2=r1*v/(vcc-v)\n", + "\n", + "#Result\n", + "print(\"Re = %.0f K-Ohm\"%(re/1000))\n", + "print(\"Rb = %.1f K-Ohm\"%(rb/1000))\n", + "print(\"V = %.2fV\"%v)\n", + "print(\"R1 = %.1f K-Ohm\\nR2 = %.1f k-Ohm\"%(r1/1000,r2/100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Re = 1 K-Ohm\n", + "Rb = 21.7 K-Ohm\n", + "V = 3.86V\n", + "R1 = 112.2 K-Ohm\n", + "R2 = 268.3 k-Ohm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 page no-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Q point and stability for self bias arrangement\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc=4.5 # V\n", + "r2 =2700.0 # Ohm\n", + "re=270.0 # Ohm\n", + "r1=27000.0 # ohm\n", + "b=44.0 # Beta\n", + "vbe=0.6\n", + "\n", + "#Calculations\n", + "rb=r1*r2/(r1+r2)\n", + "v2=vcc*r2/(r1+r2)\n", + "#(a)\n", + "s=(1+b)/(1+(b*re/(re+rb)))\n", + "#(b)\n", + "ib=-(v2-vbe)/((b+1)*re+rb)\n", + "ic=b*ib\n", + "k=(b*2035+re+b*re)\n", + "vce=vcc-k/10**5\n", + "#(c)\n", + "s1=(1+b)/(1+(b*re)/(re+3150))\n", + "ib1=-0.19/((re*(1+b))+3.15)\n", + "vce2 =vcc-0.938\n", + "\n", + "\n", + "#Result\n", + "print(\"Rb = %.2f K-Ohm\\nV2 = %.2fV\"%(rb/1000,v2))\n", + "print(\"\\n(a)\\nS = %.1f\"%s)\n", + "print(\"\\n(b)Quiescent Point\\nIb = %.3f mA\\nIc = %.3f mA\\nVce = %.3f V\"%(ib*1000,ic*1000,vce))\n", + "print(\"\\n(c)\\nS=%.2f\\nQ-Point:\\nVce = %.3f V\\nIb = %.3f mA\\nIc = %.3f mA\"%(s1,vce2,-ib1*1000,0.528))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rb = 2.45 K-Ohm\n", + "V2 = 0.41V\n", + "\n", + "(a)\n", + "S = 8.4\n", + "\n", + "(b)Quiescent Point\n", + "Ib = 0.013 mA\n", + "Ic = 0.575 mA\n", + "Vce = 3.483 V\n", + "\n", + "(c)\n", + "S=10.06\n", + "Q-Point:\n", + "Vce = 3.562 V\n", + "Ib = 0.016 mA\n", + "Ic = 0.528 mA\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 page no-297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Stability factor and thermal resistance\n", + "\n", + "import math\n", + "#Variable declaration\n", + "vcc=24.0 # v\n", + "re=270.0 # Ohm\n", + "rc=10000.0 # Ohm\n", + "vce =5.0 # V\n", + "vbe=0.6 # v\n", + "b=45.0 # beta\n", + "tj=150.0\n", + "ta=25.0\n", + "pd=125.0\n", + "\n", + "#Calculations\n", + "ic=(vcc-vce)/(rc+(1+b)*re/b)\n", + "ib=ic/b\n", + "#(a)\n", + "r=(vce-vbe)/ib\n", + "#(b)\n", + "s=(1+b)/(1+(b*rc/(rc+r)))\n", + "#(c)\n", + "t=(tj-ta)/pd\n", + "\n", + "#Result\n", + "print(\"Ic = %.3f mA\\nIb = %.2f micro A\"%(ic*1000,ib*10**6))\n", + "print(\"\\n(a)In collector base circuit\\n\\tR = %.2f K-Ohm\"%(r/1000))\n", + "print(\"\\n(b)Stability Factor,\\n\\tS = %.3f\"%s)\n", + "print(\"\\n(c)\\nThermal Resistance = %.0f\u00b0C/W\"%(t*1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ic = 1.849 mA\n", + "Ib = 41.09 micro A\n", + "\n", + "(a)In collector base circuit\n", + "\tR = 107.09 K-Ohm\n", + "\n", + "(b)Stability Factor,\n", + "\tS = 9.498\n", + "\n", + "(c)\n", + "Thermal Resistance = 1000\u00b0C/W\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 page no-307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# DC input resistance of a JFET\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "v=20.0 # v\n", + "igss=5*10**-12 # A\n", + "\n", + "#Calculations\n", + "rgs= v/igss\n", + "\n", + "#Result\n", + "print(\"Input Resistance, Rgs = %.0f * 10^12 Ohm\"%(rgs/10**12))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input Resistance, Rgs = 4 * 10^12 Ohm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 page no-308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# V0 for a JFET amplifier\n", + "\n", + "import math\n", + "#Variable declaration\n", + "\n", + "gm=2500.0 # micro mho\n", + "vm=5.0 # mV\n", + "rs=7500.0 # ohm\n", + "\n", + "#Calculations\n", + "x=1/(gm*10**-6)\n", + "opr = 0.949*vm\n", + "z0=rs*x/(rs+x)\n", + "V0=3000*opr/3380\n", + "\n", + "#Result\n", + "print(\"Open circuited output voltage, that is without considering RL\")\n", + "print(\"\\tV0 = %.2f mV\\nOutput impedance, \\n\\tZ0 = %.0f Ohm\"%(opr,math.ceil(z0)))\n", + "print(\"AC voltage across the load resistor is\\n\\tV0 = %.2f mV\"%V0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open circuited output voltage, that is without considering RL\n", + "\tV0 = 4.75 mV\n", + "Output impedance, \n", + "\tZ0 = 380 Ohm\n", + "AC voltage across the load resistor is\n", + "\tV0 = 4.21 mV\n" + ] + } + ], + "prompt_number": 36 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_6.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_6.ipynb new file mode 100755 index 00000000..f0c297cb --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_6.ipynb @@ -0,0 +1,328 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 page no-329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# conversion efficiency\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Vdc=9.0\n", + "Idc= 20*10**-3\n", + "V0=3.0\n", + "I0=12*10**-3\n", + "\n", + "#Calculations\n", + "P0=V0*I0\n", + "Pdc=Vdc*Idc\n", + "eta=P0/Pdc\n", + "\n", + "#Result\n", + "print(\"\\nEfficiency(Eta) = %.0f%%\"%(eta*100))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Efficiency(Eta) = 20%\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 page no-348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculation of different parameters of CC circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Ib= 100* 10**-6\n", + "hie=2000.0\n", + "R=50*10**3\n", + "hfe=100.0\n", + "R4=2.1*10**3\n", + "Rl=1000.0\n", + "\n", + "#Calculations\n", + "Vbe=Ib*hie\n", + "Ii=Vbe/R\n", + "I1=Ii+Ib\n", + "I0=hfe*Ib*R4/(R4+Rl)\n", + "Ai=I0/I1\n", + "V0=-I0*Rl\n", + "Av=V0/Vbe\n", + "\n", + "#Result\n", + "print(\"Total Current Input, I = %.0f micro A\"%(I1*10**6))\n", + "print(\"Current through Rl, I0 = %.2fmA\"%(I0*1000))\n", + "print(\"Current amplification, Ai = %d\"%Ai)\n", + "print(\"V0 = %.2f\\nAv = %.1f\"%(V0,Av))\n", + "print(\"\\nNegative sign indicates that there is phase shift of 180\u00b0\")\n", + "print(\"between input and output voltages,i.e. as base voltage goes more positive,(it is NPN transistor),\")\n", + "print(\"the collector voltage goes more negative\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Current Input, I = 104 micro A\n", + "Current through Rl, I0 = 6.77mA\n", + "Current amplification, Ai = 65\n", + "V0 = -6.77\n", + "Av = -33.9\n", + "\n", + "Negative sign indicates that there is phase shift of 180\u00b0\n", + "between input and output voltages,i.e. as base voltage goes more positive,(it is NPN transistor),\n", + "the collector voltage goes more negative\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 page no-349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculation of different parameters of CE circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "hie=1000.0\n", + "hfe=99.0\n", + "#hre negligible\n", + "r2=60.0\n", + "r3=30.0\n", + "r4=5.0\n", + "r7=20.0\n", + "r6=30.0\n", + "Rl1=20000.0\n", + "\n", + "#Calculations\n", + "R23=r2*r3/(r2+r3)\n", + "R47=r4*r7/(r4+r7)\n", + "Rl=R47\n", + "Av=-hfe*Rl*10/hie\n", + "Av=math.floor(Av)\n", + "Ri=Rl1*1000/(Rl1+1000)\n", + "\n", + "#Calculations\n", + "print(\"Rl = %d kohm\\nAv = %d\\nRi = %.0f Ohm\"%(Rl,Av*100,Ri))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rl = 4 kohm\n", + "Av = -400\n", + "Ri = 952 Ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 page no-352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculation of different parameters of CC circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "hic = 1100.0 \n", + "hrc = 1.0\n", + "hfc = -51.0\n", + "hoc = 25.0*10**-6\n", + "Rl=10000.0\n", + "\n", + "\n", + "#Calculations\n", + "Rs=Rl\n", + "Ai=(-hfc)/(1.0+(hoc*Rl))\n", + "Ri=(hic+hrc*Ai*Rl)/1000\n", + "Av=Ai*Rl/Ri\n", + "Avs=Av*Ri/(Ri+Rs)\n", + "R0=1/(hoc-(hfc*hrc/(hic+Rs)))\n", + "\n", + "#Result\n", + "print(\"Ai = %.1f\\nRi = %.1f kOhm\\nAv = %.3f\\nAvs = %.3f\\nR0 = %.0f ohm\"%(Ai,Ri,Av,Avs,math.ceil(R0)))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ai = 40.8\n", + "Ri = 409.1 kOhm\n", + "Av = 997.311\n", + "Avs = 39.196\n", + "R0 = 217 ohm\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 page no-353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#maximum value of RL in CE configuration\n", + "\n", + "import math\n", + "#Variable declaration\n", + "hie = 1100.0\n", + "hfe = 50.0\n", + "hre = 2.50*10**-4\n", + "hoe = 25*10**-6\n", + "\n", + "#Calculations\n", + "Rl=0.1*hie/((hfe*hre)-(0.1*hoe*hie))\n", + "Rl=Rl/1000\n", + "\n", + "#Result\n", + "print(\"Rl= %.1f K Ohm\"%Rl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rl= 11.3 K Ohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 page no-364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# voltage gains Avs Av1 and Av2 for given circuit\n", + "\n", + "import math\n", + "#Variable declaration\n", + "hie =1000.0\n", + "hre = 10**-4\n", + "hfe = 50.0\n", + "hoe = 10**-8\n", + "Rl2=5000.0\n", + "Rs=1000.0\n", + "\n", + "#Calculations\n", + "Ri2=hie+(1+hfe)*Rl2\n", + "Ri2=Ri2/1000\n", + "Av2=1-(hie/(Ri2*1000))\n", + "Rl1=(10.0*256)/(10+256.0)\n", + "Ai1=-50*hfe\n", + "Av1=-hfe*Rl1/hie\n", + "o_g=Av1*Av2\n", + "Avs=o_g*Rs/(Rs+hie)\n", + "\n", + "#Result\n", + "print(\"Ri2 = %d KOhm\"%Ri2)\n", + "print(\"Av2 = %.3f\"%Av2)\n", + "print(\"Rl1 = %.2f KOhm\\nAv1 = %.1f\"%(Rl1,Av1*1000))\n", + "print(\"Overall Gain = %.0f\\nAvs = %.0f\"%(math.floor(o_g*1000),math.floor(Avs*1000)))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ri2 = 256 KOhm\n", + "Av2 = 0.996\n", + "Rl1 = 9.62 KOhm\n", + "Av1 = -481.2\n", + "Overall Gain = -480\n", + "Avs = -240\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_7.ipynb b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_7.ipynb new file mode 100755 index 00000000..703182db --- /dev/null +++ b/Electronic_Devices_And_Circuits_by_K._L._Kishore/EDC_By_K_L_Kishore_Chapter_7.ipynb @@ -0,0 +1,499 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Feedback Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 page no-402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# determination of various parameters of feedback amplifiers\n", + "\n", + "import math\n", + "#Variable declaration\n", + "Av=-100\n", + "B=0.01\n", + "\n", + "#Calculations\n", + "Avd=Av/(1-B*Av)\n", + "v1d=10**-3 \n", + "V0=Avd*v1d*1000\n", + "Vx=B*V0\n", + "V1=v1d+Vx\n", + "\n", + "#Result\n", + "print(\"V1=%.3f\\nV1d=%.3f\\nThis is negative feedback because, v1= C2/C1\")\n", + "hfe=C2/C1 #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"So the value of hfe of transistor used must be greater than 10\")\n", + "print '%s' %(\"Frequency of oscillations produced\")\n", + "x=1/(C1)+1/(C2)\n", + "y=1/(L)\n", + "f=math.sqrt(x*y)\n", + "print '%s %.1f' %(\"=*1e7 Hz\",f*1e-7)\n", + "# answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To maintain vibrations in a colpitts oscilator,\n", + "hfe >= C2/C1\n", + "= 10\n", + "So the value of hfe of transistor used must be greater than 10\n", + "Frequency of oscillations produced\n", + "=*1e7 Hz 1.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_2 Pg-588\n", + "#calculate frequency of oscillations\n", + "import math\n", + "RL=3.3*10.**(3.) #load resistor in ohm\n", + "R=5.6*10.**(3.) #resistor R in ohm\n", + "C=0.001*10.**(-6.) #capacitance in farad\n", + "print '%s' %(\"For oscillations to be maintained in a RC oscillator\")\n", + "hfe=(23.+(29.*R/RL)+(4.*RL/R)) #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"Frequency of oscillations\")\n", + "f=1./(2.*math.pi*C*math.sqrt((4.*R*RL)+(6.*R**2.))) \n", + "#frequency of oscillation (textbook answer is wrong\n", + "# because of the used of wrong value of C)\n", + "print '%s %.1f' %(\"=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For oscillations to be maintained in a RC oscillator\n", + "= 75\n", + "Frequency of oscillations\n", + "=Hz 9831.1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_3 Pg-588\n", + "#calculate Series resonant frequency,Q of the crystal\n", + "import math\n", + "L=0.33 #inductance in henry\n", + "C=0.065*10.**(-12.) #capacitance in farad\n", + "Cm=10.**(-12.) #capacitance in farad\n", + "R=0.55*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*C))\n", + "print '%s %.2f' %(\"= MHz\",fs*1e-6)\n", + "print '%s' %(\"Q of the crystal = 2*pi*fs*L/R\")\n", + "Q=(2*math.pi*fs*L)/R #quality factor (textbook answer wrong)\n", + "print '%s %.0f' %(\"=\",Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\n", + "= MHz 1.09\n", + "Q of the crystal = 2*pi*fs*L/R\n", + "= 4097\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_4 Pg-602\n", + "#calculate Series resonant frequency,The equialent parallel capacitance,Parallel resonant frequency\n", + "import math\n", + "L=3. #inductance in henry\n", + "Cs=0.05*10.**(-12.) #capacitance in farad\n", + "Cm=10.*10.**(-12.) #capacitance in farad\n", + "R=2.*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*pi*sqrt(LC)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*Cs))\n", + "print '%s %.0f' %(\"= KHz\",fs*1e-3)\n", + "print '%s' %(\"The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\")\n", + "Cp=Cm*Cs/(Cm+Cs) #quality factor \n", + "print '%s %.4f' %(\"= pF\",Cp*1e12)\n", + "print '%s' %(\"Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\")\n", + "fp=1/(2*math.pi*math.sqrt(L*Cp))\n", + "print '%s %.0f' %(\"= kHz\",fp*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*pi*sqrt(LC)\n", + "= KHz 411\n", + "The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\n", + "= pF 0.0498\n", + "Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\n", + "= kHz 412\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_5 Pg-602\n", + "#calculate Fundamental frequency of oscillations of crystal\n", + "print '%s' %(\"Fundamental frequency of oscillations of crystal\")\n", + "print '%s' %(\"fr = K/t\")\n", + "print '%s' %(\"Let new thickness of the crystal be t''\")\n", + "print '%s' %(\"fr''/fr = t''/t = 99/100\")\n", + "print '%s' %(\"So, new frequency fr'' = k/t''\")\n", + "print '%s' %(\"or fr'' = (99/100)*fr\")\n", + "print '%s' %(\"or reduction in frequency,\")\n", + "print '%s' %(\"fr-fr'' = fr-(99/100)*fr\")\n", + "print '%s' %(\"= fr(1/100)\")\n", + "print '%s' %(\"or fr-fr''/fr = 1/100 \")\n", + "print '%s' %(\"Therefore, fr'' reduces by 1%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fundamental frequency of oscillations of crystal\n", + "fr = K/t\n", + "Let new thickness of the crystal be t''\n", + "fr''/fr = t''/t = 99/100\n", + "So, new frequency fr'' = k/t''\n", + "or fr'' = (99/100)*fr\n", + "or reduction in frequency,\n", + "fr-fr'' = fr-(99/100)*fr\n", + "= fr(1/100)\n", + "or fr-fr''/fr = 1/100 \n", + "Therefore, fr'' reduces by 1%\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b3a3f35f --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_2.ipynb @@ -0,0 +1,252 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d077ff1ae1358d45f28145208de3c4ea471b35a4622d519cd3d0c3db386677a5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 587" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_1 Pg-587\n", + "#calculate Frequency of oscillations produced\n", + "import math\n", + "C1=0.001e-6 #capacitor c1 in farad\n", + "C2=0.01e-6 #capacitor c2 in farad\n", + "L=5e-6 #inductance in Henry\n", + "print '%s' %(\"To maintain vibrations in a colpitts oscilator,\")\n", + "print '%s' %(\"hfe >= C2/C1\")\n", + "hfe=C2/C1 #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"So the value of hfe of transistor used must be greater than 10\")\n", + "print '%s' %(\"Frequency of oscillations produced\")\n", + "x=1/(C1)+1/(C2)\n", + "y=1/(L)\n", + "f=math.sqrt(x*y)\n", + "print '%s %.1f' %(\"=*1e7 Hz\",f*1e-7)\n", + "# answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To maintain vibrations in a colpitts oscilator,\n", + "hfe >= C2/C1\n", + "= 10\n", + "So the value of hfe of transistor used must be greater than 10\n", + "Frequency of oscillations produced\n", + "=*1e7 Hz 1.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_2 Pg-588\n", + "#calculate frequency of oscillations\n", + "import math\n", + "RL=3.3*10.**(3.) #load resistor in ohm\n", + "R=5.6*10.**(3.) #resistor R in ohm\n", + "C=0.001*10.**(-6.) #capacitance in farad\n", + "print '%s' %(\"For oscillations to be maintained in a RC oscillator\")\n", + "hfe=(23.+(29.*R/RL)+(4.*RL/R)) #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"Frequency of oscillations\")\n", + "f=1./(2.*math.pi*C*math.sqrt((4.*R*RL)+(6.*R**2.))) \n", + "#frequency of oscillation (textbook answer is wrong\n", + "# because of the used of wrong value of C)\n", + "print '%s %.1f' %(\"=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For oscillations to be maintained in a RC oscillator\n", + "= 75\n", + "Frequency of oscillations\n", + "=Hz 9831.1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_3 Pg-588\n", + "#calculate Series resonant frequency,Q of the crystal\n", + "import math\n", + "L=0.33 #inductance in henry\n", + "C=0.065*10.**(-12.) #capacitance in farad\n", + "Cm=10.**(-12.) #capacitance in farad\n", + "R=0.55*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*C))\n", + "print '%s %.2f' %(\"= MHz\",fs*1e-6)\n", + "print '%s' %(\"Q of the crystal = 2*pi*fs*L/R\")\n", + "Q=(2*math.pi*fs*L)/R #quality factor (textbook answer wrong)\n", + "print '%s %.0f' %(\"=\",Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\n", + "= MHz 1.09\n", + "Q of the crystal = 2*pi*fs*L/R\n", + "= 4097\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_4 Pg-602\n", + "#calculate Series resonant frequency,The equialent parallel capacitance,Parallel resonant frequency\n", + "import math\n", + "L=3. #inductance in henry\n", + "Cs=0.05*10.**(-12.) #capacitance in farad\n", + "Cm=10.*10.**(-12.) #capacitance in farad\n", + "R=2.*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*pi*sqrt(LC)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*Cs))\n", + "print '%s %.0f' %(\"= KHz\",fs*1e-3)\n", + "print '%s' %(\"The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\")\n", + "Cp=Cm*Cs/(Cm+Cs) #quality factor \n", + "print '%s %.4f' %(\"= pF\",Cp*1e12)\n", + "print '%s' %(\"Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\")\n", + "fp=1/(2*math.pi*math.sqrt(L*Cp))\n", + "print '%s %.0f' %(\"= kHz\",fp*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*pi*sqrt(LC)\n", + "= KHz 411\n", + "The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\n", + "= pF 0.0498\n", + "Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\n", + "= kHz 412\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_5 Pg-602\n", + "#calculate Fundamental frequency of oscillations of crystal\n", + "print '%s' %(\"Fundamental frequency of oscillations of crystal\")\n", + "print '%s' %(\"fr = K/t\")\n", + "print '%s' %(\"Let new thickness of the crystal be t''\")\n", + "print '%s' %(\"fr''/fr = t''/t = 99/100\")\n", + "print '%s' %(\"So, new frequency fr'' = k/t''\")\n", + "print '%s' %(\"or fr'' = (99/100)*fr\")\n", + "print '%s' %(\"or reduction in frequency,\")\n", + "print '%s' %(\"fr-fr'' = fr-(99/100)*fr\")\n", + "print '%s' %(\"= fr(1/100)\")\n", + "print '%s' %(\"or fr-fr''/fr = 1/100 \")\n", + "print '%s' %(\"Therefore, fr'' reduces by 1%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fundamental frequency of oscillations of crystal\n", + "fr = K/t\n", + "Let new thickness of the crystal be t''\n", + "fr''/fr = t''/t = 99/100\n", + "So, new frequency fr'' = k/t''\n", + "or fr'' = (99/100)*fr\n", + "or reduction in frequency,\n", + "fr-fr'' = fr-(99/100)*fr\n", + "= fr(1/100)\n", + "or fr-fr''/fr = 1/100 \n", + "Therefore, fr'' reduces by 1%\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b3a3f35f --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_12_3.ipynb @@ -0,0 +1,252 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d077ff1ae1358d45f28145208de3c4ea471b35a4622d519cd3d0c3db386677a5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 587" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_1 Pg-587\n", + "#calculate Frequency of oscillations produced\n", + "import math\n", + "C1=0.001e-6 #capacitor c1 in farad\n", + "C2=0.01e-6 #capacitor c2 in farad\n", + "L=5e-6 #inductance in Henry\n", + "print '%s' %(\"To maintain vibrations in a colpitts oscilator,\")\n", + "print '%s' %(\"hfe >= C2/C1\")\n", + "hfe=C2/C1 #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"So the value of hfe of transistor used must be greater than 10\")\n", + "print '%s' %(\"Frequency of oscillations produced\")\n", + "x=1/(C1)+1/(C2)\n", + "y=1/(L)\n", + "f=math.sqrt(x*y)\n", + "print '%s %.1f' %(\"=*1e7 Hz\",f*1e-7)\n", + "# answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To maintain vibrations in a colpitts oscilator,\n", + "hfe >= C2/C1\n", + "= 10\n", + "So the value of hfe of transistor used must be greater than 10\n", + "Frequency of oscillations produced\n", + "=*1e7 Hz 1.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_2 Pg-588\n", + "#calculate frequency of oscillations\n", + "import math\n", + "RL=3.3*10.**(3.) #load resistor in ohm\n", + "R=5.6*10.**(3.) #resistor R in ohm\n", + "C=0.001*10.**(-6.) #capacitance in farad\n", + "print '%s' %(\"For oscillations to be maintained in a RC oscillator\")\n", + "hfe=(23.+(29.*R/RL)+(4.*RL/R)) #transistor current gain\n", + "print '%s %.f' %(\"=\",hfe)\n", + "print '%s' %(\"Frequency of oscillations\")\n", + "f=1./(2.*math.pi*C*math.sqrt((4.*R*RL)+(6.*R**2.))) \n", + "#frequency of oscillation (textbook answer is wrong\n", + "# because of the used of wrong value of C)\n", + "print '%s %.1f' %(\"=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For oscillations to be maintained in a RC oscillator\n", + "= 75\n", + "Frequency of oscillations\n", + "=Hz 9831.1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_3 Pg-588\n", + "#calculate Series resonant frequency,Q of the crystal\n", + "import math\n", + "L=0.33 #inductance in henry\n", + "C=0.065*10.**(-12.) #capacitance in farad\n", + "Cm=10.**(-12.) #capacitance in farad\n", + "R=0.55*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*C))\n", + "print '%s %.2f' %(\"= MHz\",fs*1e-6)\n", + "print '%s' %(\"Q of the crystal = 2*pi*fs*L/R\")\n", + "Q=(2*math.pi*fs*L)/R #quality factor (textbook answer wrong)\n", + "print '%s %.0f' %(\"=\",Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*math.pi*math.sqrt(L*C)\n", + "= MHz 1.09\n", + "Q of the crystal = 2*pi*fs*L/R\n", + "= 4097\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_4 Pg-602\n", + "#calculate Series resonant frequency,The equialent parallel capacitance,Parallel resonant frequency\n", + "import math\n", + "L=3. #inductance in henry\n", + "Cs=0.05*10.**(-12.) #capacitance in farad\n", + "Cm=10.*10.**(-12.) #capacitance in farad\n", + "R=2.*10.**(3.) #resistor R in ohm\n", + "print '%s' %(\"Series resonant frequency, fs = 1/2*pi*sqrt(LC)\")\n", + "fs=1./(2.*math.pi*math.sqrt(L*Cs))\n", + "print '%s %.0f' %(\"= KHz\",fs*1e-3)\n", + "print '%s' %(\"The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\")\n", + "Cp=Cm*Cs/(Cm+Cs) #quality factor \n", + "print '%s %.4f' %(\"= pF\",Cp*1e12)\n", + "print '%s' %(\"Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\")\n", + "fp=1/(2*math.pi*math.sqrt(L*Cp))\n", + "print '%s %.0f' %(\"= kHz\",fp*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency, fs = 1/2*pi*sqrt(LC)\n", + "= KHz 411\n", + "The equialent parallel capacitance, Cp = Cm*Cs/Cm+Cs\n", + "= pF 0.0498\n", + "Parallel resonant frequency, fp = 1/2*pi*sqrt(L*Cp)\n", + "= kHz 412\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex12_5 Pg-602\n", + "#calculate Fundamental frequency of oscillations of crystal\n", + "print '%s' %(\"Fundamental frequency of oscillations of crystal\")\n", + "print '%s' %(\"fr = K/t\")\n", + "print '%s' %(\"Let new thickness of the crystal be t''\")\n", + "print '%s' %(\"fr''/fr = t''/t = 99/100\")\n", + "print '%s' %(\"So, new frequency fr'' = k/t''\")\n", + "print '%s' %(\"or fr'' = (99/100)*fr\")\n", + "print '%s' %(\"or reduction in frequency,\")\n", + "print '%s' %(\"fr-fr'' = fr-(99/100)*fr\")\n", + "print '%s' %(\"= fr(1/100)\")\n", + "print '%s' %(\"or fr-fr''/fr = 1/100 \")\n", + "print '%s' %(\"Therefore, fr'' reduces by 1%\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fundamental frequency of oscillations of crystal\n", + "fr = K/t\n", + "Let new thickness of the crystal be t''\n", + "fr''/fr = t''/t = 99/100\n", + "So, new frequency fr'' = k/t''\n", + "or fr'' = (99/100)*fr\n", + "or reduction in frequency,\n", + "fr-fr'' = fr-(99/100)*fr\n", + "= fr(1/100)\n", + "or fr-fr''/fr = 1/100 \n", + "Therefore, fr'' reduces by 1%\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..1230d468 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_1.ipynb @@ -0,0 +1,678 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0fd13299d342d9c269293aef129c378471a54629447600fc92d5daa273f60e74" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 - Optical Fibers and Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_1 Pg-695\n", + "#Cut-off wavelength\n", + "import math\n", + "n1=1.545 #core refracrive index\n", + "n2=1.510 #cladding refractive index\n", + "d=3.*10.**(-6.) #diamter of optical fiber in m\n", + "\n", + "a=d/2. #core radius in m\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "lamda_c=(2.*math.pi*a*n1*math.sqrt(2.*dela))/2.405 #cut-off wavelength\n", + "print '%s %.2f %s' %(\"Cut-off wavelength =\",lamda_c*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut-off wavelength = 1.29 um\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_2 Pg-695\n", + "#Normalized frequency and total number of guided mode\n", + "import math\n", + "n1=1.53 #core refracrive index\n", + "n2=1.5 #cladding refractive index\n", + "lamda=10.**(-6.) #cut-off wavelength\n", + "a=50.*10.**(-6.) #core radius in m\n", + "\n", + "\n", + "V=(2.*math.pi*a*math.sqrt(n1**2.-n2**2.))/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V,\"\\n\")\n", + "\n", + "ms=V**2./2. #total number of guided mode\n", + "print '%s %.2f %s' %(\"Total number of guided mode =\",ms,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 94.72 \n", + "\n", + "Total number of guided mode = 4485.74 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_3 Pg-695\n", + "#critical angle, acceptance angle, numerical aperture\n", + "import math\n", + "n1=1.5#core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "asin=1.\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n", + "tetha_m_rad=math.asin(math.sqrt(n1**2.-n2**2.)) #acceptance angle in radians\n", + "tetha_m=tetha_m_rad*180./math.pi\n", + "print '%s %.2f %s' %(\"Acceptance angle =\",tetha_m,\"degree\\n\")\n", + "NA=math.sin(tetha_m_rad)\n", + "print '%s %.2f %s' %(\"Numerical Apperture =\",NA,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 76.74 degree\n", + "\n", + "Acceptance angle = 20.13 degree\n", + "\n", + "Numerical Apperture = 0.34 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_4 Pg-696\n", + "#calculate cladding refractive index and RI of the core\n", + "import math\n", + "NA=0.5 #numerical apperture\n", + "n1=1.54 #core refractive index\n", + "n2=math.sqrt(n1**2.-NA**2.) #cladding refractive index\n", + "print '%s %.2f %s' %(\"(1)Cladding refractive index =\",n2,\"\\n\")\n", + "RI=(n1-n2)/n1 #change in core cladding refractive index\n", + "print '%s %.2f %s' %(\"(2)RI of the core =\",RI,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Cladding refractive index = 1.46 \n", + "\n", + "(2)RI of the core = 0.05 \n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_5 Pg-696\n", + "#numerical aperture and max entrance angle \n", + "import math \n", + "n1=1.5#core refracrive index\n", + "n2=1.48 #cladding refractive index\n", + "n=1.\n", + "asin=1.\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"(1)Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"(2)The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Numerical apperture = 0.24 \n", + "\n", + "(2)The maximum entrance angle i0 = 14.13 degree\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_6 Pg-697\n", + "#core refractive index, numerical aperture,maximum entrance angle\n", + "import math\n", + "n2=1.59 #cladding refractive index\n", + "NA=0.2 #numerical apperture\n", + "n0=1. #when fiber is in air\n", + "asin=1.\n", + "n1=math.sqrt(n2**2.+NA**2.) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n=1.33 #water refractive index\n", + "NA=math.sqrt(n1**2.-n2**2.)/n0 #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.60 \n", + "\n", + "Numerical apperture = 0.20 \n", + "\n", + "The maximum entrance angle i0 = 8.65 degree\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_7 Pg-697\n", + "#core refractive index, cladding refractive index\n", + "import math\n", + "NA=0.22 #numerical apperture\n", + "dela=0.012 #fractional difference of refractive indices\n", + "n1=NA/(math.sqrt(2.*dela)) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n2=n1-dela*n1 #cladding refractive index\n", + "print '%s %.2f %s' %(\"Cladding refractive index =\",n2,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.42 \n", + "\n", + "Cladding refractive index = 1.40 \n", + "\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_8 Pg-698\n", + "#numerical aperture,acceptance angle, critical angle\n", + "import math\n", + "n1=1.52 #core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "asin=1.\n", + "NA=n1*math.sqrt(2.*dela) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n1) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical apperture = 0.43 \n", + "\n", + "Acceptance angle i0 = 16.32 degree\n", + "\n", + "Critical angle = 73.85 degree\n", + "\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_9 Pg-698\n", + "import math\n", + "n1=1.45 #core refracrive index\n", + "NA=0.16#cladding refractive index\n", + "lamda=0.9*10.**(-6.) #cut-off wavelength\n", + "d=60./100. #core radius in m\n", + "V=(math.pi*d*NA)/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V*1e-5,\"*1e5\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 3.35 *1e5\n", + "\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_10 Pg-698\n", + "#radis of core, numerical apperture, acceptance angle\n", + "import math \n", + "n1=1.48 #core refracrive index\n", + "n2=1.47 #cladding refractive index\n", + "lamda=850e-6 #cut-off wavelength\n", + "V=2.405 #normalised frequency\n", + "asin=1.\n", + "n=n1+n2\n", + "#In the book cut off wavelength in the question is 850 um but in\n", + "# the calcution part it is taken as 850nm. Here Ive taken 850um \n", + "d=V*lamda/(math.pi*math.sqrt(n1**2.-n2**2.)) #diamter of core\n", + "a=d/2. #radius of core\n", + "print '%s %.2f %s' %(\"Radius of core =\",a*1e3,\"mm\\n\")#answer in the book is wrong\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of core = 1.89 mm\n", + "\n", + "Numerical apperture = 0.17 \n", + "\n", + "Acceptance angle i0 = 3.34 degree\n", + "\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_11 Pg-699\n", + "#loss in fiber\n", + "import math\n", + "L=500./1000. #length of fiber in m\n", + "Pin=1.*10.**(-3.) #input power in watt\n", + "Pout=85./100.*10.**(-3.) #output power in watt\n", + "alpha=(10./L)*math.log10(Pin/Pout) #loss\n", + "print '%s %.2f %s' %(\"Loss in the fiber =\",alpha,\"dB/Km\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in the fiber = 1.41 dB/Km\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_12 Pg-699\n", + "import math\n", + "L=10. #length of fiber in km\n", + "alpha=2.5 #loss in the fiber per km\n", + "Pin=500.*10.**(-6.) #input power in watt\n", + "tot_alpha=-1.*alpha*L #total loss in the fiber\n", + "Pout=Pin*10.**(tot_alpha/10.) #output power in watt\n", + "print '%s %.2f %s' %(\"Output power =\",Pout*1e6,\"uW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power = 1.58 uW\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_13 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math \n", + "dela=1./100. #fractional difference of refractive indices\n", + "lamda=1.3*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.5 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "alpha=2. #loss in fiber\n", + "print'%s' %(\"We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\")\n", + "print'%s' %(\"V = 2.4*math.sqrt(1+2/alpha)\")\n", + "V=2.4*math.sqrt(1.+2./alpha) #normalzed frequency\n", + "print'%s' %(\"For maximum core radiation , we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela)) #radius of the core\n", + "print'%s %.2f %s' %(\"r =\",r*1e6,\"um\\n\")\n", + "rr=2.*r #diameter of the core\n", + "print'%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r =\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\n", + "V = 2.4*math.sqrt(1+2/alpha)\n", + "For maximum core radiation , we have\n", + "r = 3.31 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r = 6.62 um\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_14 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math\n", + "dela=1.5/100. #fractional difference of refractive indices\n", + "lamda=0.85*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.48 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "V=2.4 #normalzed frequency\n", + "print '%s' %(\"For maximum core radiation,we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela))\n", + "print '%s %.2f %s' %(\"r=\",r*1e6,\"um\\n\")\n", + "r=1.3*10.**(-6.) #actual radius=1.266 micrometer and assumed to 1.3 micometer\n", + "rr=2.*r #diameter of the core\n", + "print '%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r=\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For maximum core radiation,we have\n", + "r= 1.27 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r= 2.60 um\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_15 Pg-701\n", + "#attenuation of an optial fiber, output power\n", + "import math\n", + "alpha=3.5 #loss in fiber\n", + "Pi=0.5#input power in milli watt\n", + "L=4. #length of fiber in km\n", + "print '%s' %(\"The attenuation of an optical fiber is given by\")\n", + "print '%s' %(\"alpha=(10/L)*math.log(Pi/Po)\")\n", + "Po=Pi/(10.**(alpha*L/10.))\n", + "print '%s %.2f %s' %(\"\\nOutput power =\",Po*1e3,\"mW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The attenuation of an optical fiber is given by\n", + "alpha=(10/L)*math.log(Pi/Po)\n", + "\n", + "Output power = 19.91 mW\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_16 Pg-701\n", + "#cut-off wavelength expression\n", + "import math\n", + "n1=1.46 #core refracrive index\n", + "r=4.5*10.**(-6.) #radius of the core\n", + "dela=0.25/100. #fractional difference of refractive indices\n", + "Vc=2.405 #normalzed frequency\n", + "print '%s' %(\"We have, cut-off wavelength expression\")\n", + "lamda=(2*math.pi*r*n1*math.sqrt(2.*dela))/Vc\n", + "print '%s %.2f %s' %(\"=\",lamda*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have, cut-off wavelength expression\n", + "= 1.21 um\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8c91c4fa --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_2.ipynb @@ -0,0 +1,678 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3b131d89e4b494324f859c73c4c8ff2378f807a6d190d044117f9ece13923645" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 - Optical Fibers and Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_1 Pg-695\n", + "#Cut-off wavelength\n", + "import math\n", + "n1=1.545 #core refracrive index\n", + "n2=1.510 #cladding refractive index\n", + "d=3.*10.**(-6.) #diamter of optical fiber in m\n", + "\n", + "a=d/2. #core radius in m\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "lamda_c=(2.*math.pi*a*n1*math.sqrt(2.*dela))/2.405 #cut-off wavelength\n", + "print '%s %.2f %s' %(\"Cut-off wavelength =\",lamda_c*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut-off wavelength = 1.29 um\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_2 Pg-695\n", + "#Normalized frequency and total number of guided mode\n", + "import math\n", + "n1=1.53 #core refracrive index\n", + "n2=1.5 #cladding refractive index\n", + "lamda=10.**(-6.) #cut-off wavelength\n", + "a=50.*10.**(-6.) #core radius in m\n", + "\n", + "\n", + "V=(2.*math.pi*a*math.sqrt(n1**2.-n2**2.))/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V,\"\\n\")\n", + "\n", + "ms=V**2./2. #total number of guided mode\n", + "print '%s %.2f %s' %(\"Total number of guided mode =\",ms,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 94.72 \n", + "\n", + "Total number of guided mode = 4485.74 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_3 Pg-695\n", + "#critical angle, acceptance angle, numerical aperture\n", + "import math\n", + "n1=1.5#core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "asin=1.\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n", + "tetha_m_rad=math.asin(math.sqrt(n1**2.-n2**2.)) #acceptance angle in radians\n", + "tetha_m=tetha_m_rad*180./math.pi\n", + "print '%s %.2f %s' %(\"Acceptance angle =\",tetha_m,\"degree\\n\")\n", + "NA=math.sin(tetha_m_rad)\n", + "print '%s %.2f %s' %(\"Numerical Apperture =\",NA,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 76.74 degree\n", + "\n", + "Acceptance angle = 20.13 degree\n", + "\n", + "Numerical Apperture = 0.34 \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_4 Pg-696\n", + "#calculate cladding refractive index and RI of the core\n", + "import math\n", + "NA=0.5 #numerical apperture\n", + "n1=1.54 #core refractive index\n", + "n2=math.sqrt(n1**2.-NA**2.) #cladding refractive index\n", + "print '%s %.2f %s' %(\"(1)Cladding refractive index =\",n2,\"\\n\")\n", + "RI=(n1-n2)/n1 #change in core cladding refractive index\n", + "print '%s %.2f %s' %(\"(2)RI of the core =\",RI,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Cladding refractive index = 1.46 \n", + "\n", + "(2)RI of the core = 0.05 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_5 Pg-696\n", + "#numerical aperture and max entrance angle \n", + "import math \n", + "n1=1.5#core refracrive index\n", + "n2=1.48 #cladding refractive index\n", + "n=1.\n", + "asin=1.\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"(1)Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"(2)The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Numerical apperture = 0.24 \n", + "\n", + "(2)The maximum entrance angle i0 = 14.13 degree\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_6 Pg-697\n", + "#core refractive index, numerical aperture,maximum entrance angle\n", + "import math\n", + "n2=1.59 #cladding refractive index\n", + "NA=0.2 #numerical apperture\n", + "n0=1. #when fiber is in air\n", + "asin=1.\n", + "n1=math.sqrt(n2**2.+NA**2.) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n=1.33 #water refractive index\n", + "NA=math.sqrt(n1**2.-n2**2.)/n0 #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.60 \n", + "\n", + "Numerical apperture = 0.20 \n", + "\n", + "The maximum entrance angle i0 = 8.65 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_7 Pg-697\n", + "#core refractive index, cladding refractive index\n", + "import math\n", + "NA=0.22 #numerical apperture\n", + "dela=0.012 #fractional difference of refractive indices\n", + "n1=NA/(math.sqrt(2.*dela)) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n2=n1-dela*n1 #cladding refractive index\n", + "print '%s %.2f %s' %(\"Cladding refractive index =\",n2,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.42 \n", + "\n", + "Cladding refractive index = 1.40 \n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_8 Pg-698\n", + "#numerical aperture,acceptance angle, critical angle\n", + "import math\n", + "n1=1.52 #core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "asin=1.\n", + "NA=n1*math.sqrt(2.*dela) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n1) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical apperture = 0.43 \n", + "\n", + "Acceptance angle i0 = 16.32 degree\n", + "\n", + "Critical angle = 73.85 degree\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_9 Pg-698\n", + "import math\n", + "n1=1.45 #core refracrive index\n", + "NA=0.16#cladding refractive index\n", + "lamda=0.9*10.**(-6.) #cut-off wavelength\n", + "d=60./100. #core radius in m\n", + "V=(math.pi*d*NA)/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V*1e-5,\"*1e5\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 3.35 *1e5\n", + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_10 Pg-698\n", + "#radis of core, numerical apperture, acceptance angle\n", + "import math \n", + "n1=1.48 #core refracrive index\n", + "n2=1.47 #cladding refractive index\n", + "lamda=850e-6 #cut-off wavelength\n", + "V=2.405 #normalised frequency\n", + "asin=1.\n", + "n=n1+n2\n", + "#In the book cut off wavelength in the question is 850 um but in\n", + "# the calcution part it is taken as 850nm. Here Ive taken 850um \n", + "d=V*lamda/(math.pi*math.sqrt(n1**2.-n2**2.)) #diamter of core\n", + "a=d/2. #radius of core\n", + "print '%s %.2f %s' %(\"Radius of core =\",a*1e3,\"mm\\n\")#answer in the book is wrong\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of core = 1.89 mm\n", + "\n", + "Numerical apperture = 0.17 \n", + "\n", + "Acceptance angle i0 = 3.34 degree\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_11 Pg-699\n", + "#loss in fiber\n", + "import math\n", + "L=500./1000. #length of fiber in m\n", + "Pin=1.*10.**(-3.) #input power in watt\n", + "Pout=85./100.*10.**(-3.) #output power in watt\n", + "alpha=(10./L)*math.log10(Pin/Pout) #loss\n", + "print '%s %.2f %s' %(\"Loss in the fiber =\",alpha,\"dB/Km\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in the fiber = 1.41 dB/Km\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_12 Pg-699\n", + "import math\n", + "L=10. #length of fiber in km\n", + "alpha=2.5 #loss in the fiber per km\n", + "Pin=500.*10.**(-6.) #input power in watt\n", + "tot_alpha=-1.*alpha*L #total loss in the fiber\n", + "Pout=Pin*10.**(tot_alpha/10.) #output power in watt\n", + "print '%s %.2f %s' %(\"Output power =\",Pout*1e6,\"uW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power = 1.58 uW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_13 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math \n", + "dela=1./100. #fractional difference of refractive indices\n", + "lamda=1.3*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.5 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "alpha=2. #loss in fiber\n", + "print'%s' %(\"We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\")\n", + "print'%s' %(\"V = 2.4*math.sqrt(1+2/alpha)\")\n", + "V=2.4*math.sqrt(1.+2./alpha) #normalzed frequency\n", + "print'%s' %(\"For maximum core radiation , we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela)) #radius of the core\n", + "print'%s %.2f %s' %(\"r =\",r*1e6,\"um\\n\")\n", + "rr=2.*r #diameter of the core\n", + "print'%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r =\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\n", + "V = 2.4*math.sqrt(1+2/alpha)\n", + "For maximum core radiation , we have\n", + "r = 3.31 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r = 6.62 um\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_14 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math\n", + "dela=1.5/100. #fractional difference of refractive indices\n", + "lamda=0.85*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.48 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "V=2.4 #normalzed frequency\n", + "print '%s' %(\"For maximum core radiation,we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela))\n", + "print '%s %.2f %s' %(\"r=\",r*1e6,\"um\\n\")\n", + "r=1.3*10.**(-6.) #actual radius=1.266 micrometer and assumed to 1.3 micometer\n", + "rr=2.*r #diameter of the core\n", + "print '%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r=\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For maximum core radiation,we have\n", + "r= 1.27 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r= 2.60 um\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_15 Pg-701\n", + "#attenuation of an optial fiber, output power\n", + "import math\n", + "alpha=3.5 #loss in fiber\n", + "Pi=0.5#input power in milli watt\n", + "L=4. #length of fiber in km\n", + "print '%s' %(\"The attenuation of an optical fiber is given by\")\n", + "print '%s' %(\"alpha=(10/L)*math.log(Pi/Po)\")\n", + "Po=Pi/(10.**(alpha*L/10.))\n", + "print '%s %.2f %s' %(\"\\nOutput power =\",Po*1e3,\"mW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The attenuation of an optical fiber is given by\n", + "alpha=(10/L)*math.log(Pi/Po)\n", + "\n", + "Output power = 19.91 mW\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_16 Pg-701\n", + "#cut-off wavelength expression\n", + "import math\n", + "n1=1.46 #core refracrive index\n", + "r=4.5*10.**(-6.) #radius of the core\n", + "dela=0.25/100. #fractional difference of refractive indices\n", + "Vc=2.405 #normalzed frequency\n", + "print '%s' %(\"We have, cut-off wavelength expression\")\n", + "lamda=(2*math.pi*r*n1*math.sqrt(2.*dela))/Vc\n", + "print '%s %.2f %s' %(\"=\",lamda*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have, cut-off wavelength expression\n", + "= 1.21 um\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8c91c4fa --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_14_3.ipynb @@ -0,0 +1,678 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3b131d89e4b494324f859c73c4c8ff2378f807a6d190d044117f9ece13923645" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 - Optical Fibers and Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_1 Pg-695\n", + "#Cut-off wavelength\n", + "import math\n", + "n1=1.545 #core refracrive index\n", + "n2=1.510 #cladding refractive index\n", + "d=3.*10.**(-6.) #diamter of optical fiber in m\n", + "\n", + "a=d/2. #core radius in m\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "lamda_c=(2.*math.pi*a*n1*math.sqrt(2.*dela))/2.405 #cut-off wavelength\n", + "print '%s %.2f %s' %(\"Cut-off wavelength =\",lamda_c*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut-off wavelength = 1.29 um\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_2 Pg-695\n", + "#Normalized frequency and total number of guided mode\n", + "import math\n", + "n1=1.53 #core refracrive index\n", + "n2=1.5 #cladding refractive index\n", + "lamda=10.**(-6.) #cut-off wavelength\n", + "a=50.*10.**(-6.) #core radius in m\n", + "\n", + "\n", + "V=(2.*math.pi*a*math.sqrt(n1**2.-n2**2.))/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V,\"\\n\")\n", + "\n", + "ms=V**2./2. #total number of guided mode\n", + "print '%s %.2f %s' %(\"Total number of guided mode =\",ms,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 94.72 \n", + "\n", + "Total number of guided mode = 4485.74 \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_3 Pg-695\n", + "#critical angle, acceptance angle, numerical aperture\n", + "import math\n", + "n1=1.5#core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "asin=1.\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n", + "tetha_m_rad=math.asin(math.sqrt(n1**2.-n2**2.)) #acceptance angle in radians\n", + "tetha_m=tetha_m_rad*180./math.pi\n", + "print '%s %.2f %s' %(\"Acceptance angle =\",tetha_m,\"degree\\n\")\n", + "NA=math.sin(tetha_m_rad)\n", + "print '%s %.2f %s' %(\"Numerical Apperture =\",NA,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 76.74 degree\n", + "\n", + "Acceptance angle = 20.13 degree\n", + "\n", + "Numerical Apperture = 0.34 \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_4 Pg-696\n", + "#calculate cladding refractive index and RI of the core\n", + "import math\n", + "NA=0.5 #numerical apperture\n", + "n1=1.54 #core refractive index\n", + "n2=math.sqrt(n1**2.-NA**2.) #cladding refractive index\n", + "print '%s %.2f %s' %(\"(1)Cladding refractive index =\",n2,\"\\n\")\n", + "RI=(n1-n2)/n1 #change in core cladding refractive index\n", + "print '%s %.2f %s' %(\"(2)RI of the core =\",RI,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Cladding refractive index = 1.46 \n", + "\n", + "(2)RI of the core = 0.05 \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_5 Pg-696\n", + "#numerical aperture and max entrance angle \n", + "import math \n", + "n1=1.5#core refracrive index\n", + "n2=1.48 #cladding refractive index\n", + "n=1.\n", + "asin=1.\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"(1)Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"(2)The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Numerical apperture = 0.24 \n", + "\n", + "(2)The maximum entrance angle i0 = 14.13 degree\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_6 Pg-697\n", + "#core refractive index, numerical aperture,maximum entrance angle\n", + "import math\n", + "n2=1.59 #cladding refractive index\n", + "NA=0.2 #numerical apperture\n", + "n0=1. #when fiber is in air\n", + "asin=1.\n", + "n1=math.sqrt(n2**2.+NA**2.) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n=1.33 #water refractive index\n", + "NA=math.sqrt(n1**2.-n2**2.)/n0 #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"The maximum entrance angle i0 =\",AA,\"degree\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.60 \n", + "\n", + "Numerical apperture = 0.20 \n", + "\n", + "The maximum entrance angle i0 = 8.65 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_7 Pg-697\n", + "#core refractive index, cladding refractive index\n", + "import math\n", + "NA=0.22 #numerical apperture\n", + "dela=0.012 #fractional difference of refractive indices\n", + "n1=NA/(math.sqrt(2.*dela)) #core refractive index\n", + "print '%s %.2f %s' %(\"Core refractive index =\",n1,\"\\n\")\n", + "n2=n1-dela*n1 #cladding refractive index\n", + "print '%s %.2f %s' %(\"Cladding refractive index =\",n2,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core refractive index = 1.42 \n", + "\n", + "Cladding refractive index = 1.40 \n", + "\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_8 Pg-698\n", + "#numerical aperture,acceptance angle, critical angle\n", + "import math\n", + "n1=1.52 #core refracrive index\n", + "n2=1.46 #cladding refractive index\n", + "dela=(n1-n2)/n1 #fractional difference of refractive indices\n", + "asin=1.\n", + "NA=n1*math.sqrt(2.*dela) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n1) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n", + "tetha_rad=math.asin(n2/n1) #critical angle in radians\n", + "tetha=tetha_rad*180./math.pi #critical angle in degree \n", + "print '%s %.2f %s' %(\"Critical angle =\",tetha,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical apperture = 0.43 \n", + "\n", + "Acceptance angle i0 = 16.32 degree\n", + "\n", + "Critical angle = 73.85 degree\n", + "\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_9 Pg-698\n", + "import math\n", + "n1=1.45 #core refracrive index\n", + "NA=0.16#cladding refractive index\n", + "lamda=0.9*10.**(-6.) #cut-off wavelength\n", + "d=60./100. #core radius in m\n", + "V=(math.pi*d*NA)/lamda #normalised frequency\n", + "print '%s %.2f %s' %(\"Normalised frequency =\",V*1e-5,\"*1e5\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency = 3.35 *1e5\n", + "\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_10 Pg-698\n", + "#radis of core, numerical apperture, acceptance angle\n", + "import math \n", + "n1=1.48 #core refracrive index\n", + "n2=1.47 #cladding refractive index\n", + "lamda=850e-6 #cut-off wavelength\n", + "V=2.405 #normalised frequency\n", + "asin=1.\n", + "n=n1+n2\n", + "#In the book cut off wavelength in the question is 850 um but in\n", + "# the calcution part it is taken as 850nm. Here Ive taken 850um \n", + "d=V*lamda/(math.pi*math.sqrt(n1**2.-n2**2.)) #diamter of core\n", + "a=d/2. #radius of core\n", + "print '%s %.2f %s' %(\"Radius of core =\",a*1e3,\"mm\\n\")#answer in the book is wrong\n", + "NA=math.sqrt(n1**2.-n2**2.) #numerical apperture\n", + "print '%s %.2f %s' %(\"Numerical apperture =\",NA,\"\\n\")\n", + "AA_rad=math.asin(NA/n) #maximum Acceptance angle in rad\n", + "AA=AA_rad*180./math.pi #maximum entrance angle in degree\n", + "print '%s %.2f %s' %(\"Acceptance angle i0 =\",AA,\"degree\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of core = 1.89 mm\n", + "\n", + "Numerical apperture = 0.17 \n", + "\n", + "Acceptance angle i0 = 3.34 degree\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_11 Pg-699\n", + "#loss in fiber\n", + "import math\n", + "L=500./1000. #length of fiber in m\n", + "Pin=1.*10.**(-3.) #input power in watt\n", + "Pout=85./100.*10.**(-3.) #output power in watt\n", + "alpha=(10./L)*math.log10(Pin/Pout) #loss\n", + "print '%s %.2f %s' %(\"Loss in the fiber =\",alpha,\"dB/Km\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss in the fiber = 1.41 dB/Km\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_12 Pg-699\n", + "import math\n", + "L=10. #length of fiber in km\n", + "alpha=2.5 #loss in the fiber per km\n", + "Pin=500.*10.**(-6.) #input power in watt\n", + "tot_alpha=-1.*alpha*L #total loss in the fiber\n", + "Pout=Pin*10.**(tot_alpha/10.) #output power in watt\n", + "print '%s %.2f %s' %(\"Output power =\",Pout*1e6,\"uW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power = 1.58 uW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_13 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math \n", + "dela=1./100. #fractional difference of refractive indices\n", + "lamda=1.3*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.5 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "alpha=2. #loss in fiber\n", + "print'%s' %(\"We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\")\n", + "print'%s' %(\"V = 2.4*math.sqrt(1+2/alpha)\")\n", + "V=2.4*math.sqrt(1.+2./alpha) #normalzed frequency\n", + "print'%s' %(\"For maximum core radiation , we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela)) #radius of the core\n", + "print'%s %.2f %s' %(\"r =\",r*1e6,\"um\\n\")\n", + "rr=2.*r #diameter of the core\n", + "print'%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r =\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have for a GRIN , maximum value of normalized frequency for single mode operation is given by\n", + "V = 2.4*math.sqrt(1+2/alpha)\n", + "For maximum core radiation , we have\n", + "r = 3.31 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r = 6.62 um\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_14 Pg-700\n", + "#Maximum core diameter which permit single mode operation\n", + "import math\n", + "dela=1.5/100. #fractional difference of refractive indices\n", + "lamda=0.85*10.**(-6.) #cutoff wavelength in m\n", + "n1=1.48 #refractive index\n", + "d=6.6*10.**(-6.) #diameter of the core\n", + "V=2.4 #normalzed frequency\n", + "print '%s' %(\"For maximum core radiation,we have\")\n", + "r=V*lamda/(2.*math.pi*n1*math.sqrt(2.*dela))\n", + "print '%s %.2f %s' %(\"r=\",r*1e6,\"um\\n\")\n", + "r=1.3*10.**(-6.) #actual radius=1.266 micrometer and assumed to 1.3 micometer\n", + "rr=2.*r #diameter of the core\n", + "print '%s %.2f %s' %(\"\\nMaximum core diameter which permit single mode operation\\n=2*r=\",rr*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For maximum core radiation,we have\n", + "r= 1.27 um\n", + "\n", + "\n", + "Maximum core diameter which permit single mode operation\n", + "=2*r= 2.60 um\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_15 Pg-701\n", + "#attenuation of an optial fiber, output power\n", + "import math\n", + "alpha=3.5 #loss in fiber\n", + "Pi=0.5#input power in milli watt\n", + "L=4. #length of fiber in km\n", + "print '%s' %(\"The attenuation of an optical fiber is given by\")\n", + "print '%s' %(\"alpha=(10/L)*math.log(Pi/Po)\")\n", + "Po=Pi/(10.**(alpha*L/10.))\n", + "print '%s %.2f %s' %(\"\\nOutput power =\",Po*1e3,\"mW\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The attenuation of an optical fiber is given by\n", + "alpha=(10/L)*math.log(Pi/Po)\n", + "\n", + "Output power = 19.91 mW\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex14_16 Pg-701\n", + "#cut-off wavelength expression\n", + "import math\n", + "n1=1.46 #core refracrive index\n", + "r=4.5*10.**(-6.) #radius of the core\n", + "dela=0.25/100. #fractional difference of refractive indices\n", + "Vc=2.405 #normalzed frequency\n", + "print '%s' %(\"We have, cut-off wavelength expression\")\n", + "lamda=(2*math.pi*r*n1*math.sqrt(2.*dela))/Vc\n", + "print '%s %.2f %s' %(\"=\",lamda*1e6,\"um\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have, cut-off wavelength expression\n", + "= 1.21 um\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a69bc61 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_1.ipynb @@ -0,0 +1,354 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a909a7db08a7758f81190506b42caa1478b1be849707f941d9b31e833e8c5e3b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 - Communication System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_1 Pg-773\n", + "#calculte Total power\n", + "Pc=10000. #carrier input power in watt\n", + "m=30./100. #modulation of 30%\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.2f' %(\" = W\",Pt*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power = carrier power*(1+m**2/2)\n", + " = W 10.45\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_2 Pg-774\n", + "#calculte Total current\n", + "import math\n", + "Ic=100. #carrier current in A\n", + "m=80./100. #modulation of 80%\n", + "print '%s' %(\"Total current = carrier current*(1+m**2/2)\")\n", + "It=Ic*math.sqrt(1.+m**2./2.) #total power\n", + "print '%s %.1f' %(\" = A\",It)\n", + "change_I=It-Ic #change in current\n", + "print '%s %.1f' %(\"Therefore, increase in current due to modulation = A\",change_I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total current = carrier current*(1+m**2/2)\n", + " = A 114.9\n", + "Therefore, increase in current due to modulation = A 14.9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_3 Pg-774\n", + "#calculte Modulation Factor,Amplitude of each sideband,Frequenc of sidebands,Bandwidth of the wave\n", + "Em=5. #modulated wave amplitude\n", + "Ec=100. #carrier wave amplitude\n", + "Fm=50. #frequency of modulated wave\n", + "Fc=10.*10.**(3.) #frequency of carrier wave \n", + "print '%s' %(\"(1)Modulation Factor\")\n", + "m=Em/Ec #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.0f' %(\"m =\",per_m)\n", + "print '%s' %(\"(2)Amplitude of each sideband = m*Ec/2\")\n", + "Amp=m*Ec/2. #amplitude of each sideband\n", + "print '%s %.1f' %(\"=\",Amp)\n", + "USB=Fc+Fm #upper side band\n", + "LSB=Fc-Fm #lower side band\n", + "print '%s' %(\"(3)Frequenc of sidebands\")\n", + "print '%s %.0f' %(\"USB = Hz\",USB)\n", + "print '%s %.0f' %(\"LSB = Hz\",LSB)\n", + "print '%s' %(\"(4) Bandwidth of the wave\")\n", + "BW=2*Fm #Bandwidth\n", + "print '%s %.0f' %(\"BW =\",BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Modulation Factor\n", + "m = 5\n", + "(2)Amplitude of each sideband = m*Ec/2\n", + "= 2.5\n", + "(3)Frequenc of sidebands\n", + "USB = Hz 10050\n", + "LSB = Hz 9950\n", + "(4) Bandwidth of the wave\n", + "BW = 100\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_4 Pg-774\n", + "#calculte Modulation factor\n", + "Vmax=600. #peak to peak voltage\n", + "Vmin=100. #valley to valley voltage\n", + "print '%s' %(\"From figure 15.49, we have\")\n", + "m=(Vmax-Vmin)/(Vmax+Vmin) #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.1f' %(\"Modulation factor = \",per_m )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From figure 15.49, we have\n", + "Modulation factor = 71.4\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_5 Pg-775\n", + "#calculte Modulation factor,Carrier Amplitude,omega,Signal frequency,Emax ,Emin,BW\n", + "import math\n", + "print '%s' %(\"The standard equation of AM wave is\")\n", + "print '%s' %(\" e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\")\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\" e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\")\n", + "print '%s' %(\"Comparing eqn 1 and eqn 2 one obtains\")\n", + "print '%s' %(\"(1)Modulation factor, m = 0.7\")\n", + "m=0.7 #modulation factor\n", + "print '%s' %(\"(2)Carrier Amplitude, Ec = 20 V\")\n", + "Ec=20. #carrier wave amplitude in V\n", + "print '%s' %(\"(3)omega_m = 6280\")\n", + "omega_m=6280 #modulating frequency\n", + "Fm=omega_m/(2.*math.pi) #signal frequency\n", + "print '%s %.0f' %(\"Signal frequency = kHz\",Fm*1e-3)\n", + "omega_c=628000. #carrier frequency in Hz\n", + "Fc=omega_c/(2.*math.pi) \n", + "print '%s %.0f' %(\"(4)Signal frequency = kHz\",Fc*1e-3)\n", + "Emax=Ec+m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emax = V\",Emax)\n", + "Emin=Ec-m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emin = V\",Emin)\n", + "BW=2.*Fm #Bandwidth\n", + "print '%s %.0f' %(\"(6)BW = kHZ\",BW*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard equation of AM wave is\n", + " e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\n", + "Given the equation\n", + " e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\n", + "Comparing eqn 1 and eqn 2 one obtains\n", + "(1)Modulation factor, m = 0.7\n", + "(2)Carrier Amplitude, Ec = 20 V\n", + "(3)omega_m = 6280\n", + "Signal frequency = kHz 1\n", + "(4)Signal frequency = kHz 100\n", + "(5)Emax = V 34\n", + "(5)Emin = V 6\n", + "(6)BW = kHZ 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_6 Pg-776\n", + "#calculte Total power\n", + "Pc=10000. #carrier power in watt\n", + "m=0.9 #modulation factor\n", + "print '%s' %(\"We have\")\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.0f' %(\" = kW\",Pt*1e-3)\n", + "print '%s' %(\"This will be the maximum power handeled by the transmitter.\\nNow,increased unmodulated carrier power can be obtained by\")\n", + "m=40./100. #modulation in terms of percentage\n", + "Pt=14000. #total power\n", + "Pc=Pt/(1.+m**2./2.) #neew carrier power\n", + "print '%s %.2f' %(\"Pc = kW\",Pc*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have\n", + "Total power = carrier power*(1+m**2/2)\n", + " = kW 14\n", + "This will be the maximum power handeled by the transmitter.\n", + "Now,increased unmodulated carrier power can be obtained by\n", + "Pc = kW 12.96\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_7 Pg-776\n", + "#calculte standard equations for modulated voltage wave\n", + "import math\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\"\\nE = 100*sin(628000*t)+25*sin(621720*t)\\n-25*cos(634280*t))\\n\")\n", + "m=50./100. #modulation factor in percentage\n", + "Ec=100. #carrier wave amplitude in V\n", + "Em=10. #modulated wave amplitude in V\n", + "Fc=100000. #carier frequency in Hz\n", + "Fm=1000. #modulating frequency in Hz\n", + "pi=3.14 \n", + "omega_c=2.*pi*Fc #carier frequency\n", + "omega_m=2.*pi*Em #modulating frequency \n", + "print '%s' %(\"Now,putting these equation in the standard equations for modulated voltage wave,\")\n", + "print '%s' %(\" e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\")\n", + "USB=omega_c+omega_m #upper sideband\n", + "LSB=omega_c-omega_m #lower sideband\n", + "mEc=m*Ec/2.\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",USB)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",LSB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given the equation\n", + "\n", + "E = 100*sin(628000*t)+25*sin(621720*t)\n", + "-25*cos(634280*t))\n", + "\n", + "Now,putting these equation in the standard equations for modulated voltage wave,\n", + " e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 628063\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 627937\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a69bc61 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_2.ipynb @@ -0,0 +1,354 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a909a7db08a7758f81190506b42caa1478b1be849707f941d9b31e833e8c5e3b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 - Communication System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_1 Pg-773\n", + "#calculte Total power\n", + "Pc=10000. #carrier input power in watt\n", + "m=30./100. #modulation of 30%\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.2f' %(\" = W\",Pt*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power = carrier power*(1+m**2/2)\n", + " = W 10.45\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_2 Pg-774\n", + "#calculte Total current\n", + "import math\n", + "Ic=100. #carrier current in A\n", + "m=80./100. #modulation of 80%\n", + "print '%s' %(\"Total current = carrier current*(1+m**2/2)\")\n", + "It=Ic*math.sqrt(1.+m**2./2.) #total power\n", + "print '%s %.1f' %(\" = A\",It)\n", + "change_I=It-Ic #change in current\n", + "print '%s %.1f' %(\"Therefore, increase in current due to modulation = A\",change_I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total current = carrier current*(1+m**2/2)\n", + " = A 114.9\n", + "Therefore, increase in current due to modulation = A 14.9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_3 Pg-774\n", + "#calculte Modulation Factor,Amplitude of each sideband,Frequenc of sidebands,Bandwidth of the wave\n", + "Em=5. #modulated wave amplitude\n", + "Ec=100. #carrier wave amplitude\n", + "Fm=50. #frequency of modulated wave\n", + "Fc=10.*10.**(3.) #frequency of carrier wave \n", + "print '%s' %(\"(1)Modulation Factor\")\n", + "m=Em/Ec #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.0f' %(\"m =\",per_m)\n", + "print '%s' %(\"(2)Amplitude of each sideband = m*Ec/2\")\n", + "Amp=m*Ec/2. #amplitude of each sideband\n", + "print '%s %.1f' %(\"=\",Amp)\n", + "USB=Fc+Fm #upper side band\n", + "LSB=Fc-Fm #lower side band\n", + "print '%s' %(\"(3)Frequenc of sidebands\")\n", + "print '%s %.0f' %(\"USB = Hz\",USB)\n", + "print '%s %.0f' %(\"LSB = Hz\",LSB)\n", + "print '%s' %(\"(4) Bandwidth of the wave\")\n", + "BW=2*Fm #Bandwidth\n", + "print '%s %.0f' %(\"BW =\",BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Modulation Factor\n", + "m = 5\n", + "(2)Amplitude of each sideband = m*Ec/2\n", + "= 2.5\n", + "(3)Frequenc of sidebands\n", + "USB = Hz 10050\n", + "LSB = Hz 9950\n", + "(4) Bandwidth of the wave\n", + "BW = 100\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_4 Pg-774\n", + "#calculte Modulation factor\n", + "Vmax=600. #peak to peak voltage\n", + "Vmin=100. #valley to valley voltage\n", + "print '%s' %(\"From figure 15.49, we have\")\n", + "m=(Vmax-Vmin)/(Vmax+Vmin) #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.1f' %(\"Modulation factor = \",per_m )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From figure 15.49, we have\n", + "Modulation factor = 71.4\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_5 Pg-775\n", + "#calculte Modulation factor,Carrier Amplitude,omega,Signal frequency,Emax ,Emin,BW\n", + "import math\n", + "print '%s' %(\"The standard equation of AM wave is\")\n", + "print '%s' %(\" e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\")\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\" e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\")\n", + "print '%s' %(\"Comparing eqn 1 and eqn 2 one obtains\")\n", + "print '%s' %(\"(1)Modulation factor, m = 0.7\")\n", + "m=0.7 #modulation factor\n", + "print '%s' %(\"(2)Carrier Amplitude, Ec = 20 V\")\n", + "Ec=20. #carrier wave amplitude in V\n", + "print '%s' %(\"(3)omega_m = 6280\")\n", + "omega_m=6280 #modulating frequency\n", + "Fm=omega_m/(2.*math.pi) #signal frequency\n", + "print '%s %.0f' %(\"Signal frequency = kHz\",Fm*1e-3)\n", + "omega_c=628000. #carrier frequency in Hz\n", + "Fc=omega_c/(2.*math.pi) \n", + "print '%s %.0f' %(\"(4)Signal frequency = kHz\",Fc*1e-3)\n", + "Emax=Ec+m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emax = V\",Emax)\n", + "Emin=Ec-m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emin = V\",Emin)\n", + "BW=2.*Fm #Bandwidth\n", + "print '%s %.0f' %(\"(6)BW = kHZ\",BW*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard equation of AM wave is\n", + " e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\n", + "Given the equation\n", + " e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\n", + "Comparing eqn 1 and eqn 2 one obtains\n", + "(1)Modulation factor, m = 0.7\n", + "(2)Carrier Amplitude, Ec = 20 V\n", + "(3)omega_m = 6280\n", + "Signal frequency = kHz 1\n", + "(4)Signal frequency = kHz 100\n", + "(5)Emax = V 34\n", + "(5)Emin = V 6\n", + "(6)BW = kHZ 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_6 Pg-776\n", + "#calculte Total power\n", + "Pc=10000. #carrier power in watt\n", + "m=0.9 #modulation factor\n", + "print '%s' %(\"We have\")\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.0f' %(\" = kW\",Pt*1e-3)\n", + "print '%s' %(\"This will be the maximum power handeled by the transmitter.\\nNow,increased unmodulated carrier power can be obtained by\")\n", + "m=40./100. #modulation in terms of percentage\n", + "Pt=14000. #total power\n", + "Pc=Pt/(1.+m**2./2.) #neew carrier power\n", + "print '%s %.2f' %(\"Pc = kW\",Pc*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have\n", + "Total power = carrier power*(1+m**2/2)\n", + " = kW 14\n", + "This will be the maximum power handeled by the transmitter.\n", + "Now,increased unmodulated carrier power can be obtained by\n", + "Pc = kW 12.96\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_7 Pg-776\n", + "#calculte standard equations for modulated voltage wave\n", + "import math\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\"\\nE = 100*sin(628000*t)+25*sin(621720*t)\\n-25*cos(634280*t))\\n\")\n", + "m=50./100. #modulation factor in percentage\n", + "Ec=100. #carrier wave amplitude in V\n", + "Em=10. #modulated wave amplitude in V\n", + "Fc=100000. #carier frequency in Hz\n", + "Fm=1000. #modulating frequency in Hz\n", + "pi=3.14 \n", + "omega_c=2.*pi*Fc #carier frequency\n", + "omega_m=2.*pi*Em #modulating frequency \n", + "print '%s' %(\"Now,putting these equation in the standard equations for modulated voltage wave,\")\n", + "print '%s' %(\" e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\")\n", + "USB=omega_c+omega_m #upper sideband\n", + "LSB=omega_c-omega_m #lower sideband\n", + "mEc=m*Ec/2.\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",USB)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",LSB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given the equation\n", + "\n", + "E = 100*sin(628000*t)+25*sin(621720*t)\n", + "-25*cos(634280*t))\n", + "\n", + "Now,putting these equation in the standard equations for modulated voltage wave,\n", + " e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 628063\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 627937\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a69bc61 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_15_3.ipynb @@ -0,0 +1,354 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a909a7db08a7758f81190506b42caa1478b1be849707f941d9b31e833e8c5e3b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 - Communication System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_1 Pg-773\n", + "#calculte Total power\n", + "Pc=10000. #carrier input power in watt\n", + "m=30./100. #modulation of 30%\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.2f' %(\" = W\",Pt*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power = carrier power*(1+m**2/2)\n", + " = W 10.45\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_2 Pg-774\n", + "#calculte Total current\n", + "import math\n", + "Ic=100. #carrier current in A\n", + "m=80./100. #modulation of 80%\n", + "print '%s' %(\"Total current = carrier current*(1+m**2/2)\")\n", + "It=Ic*math.sqrt(1.+m**2./2.) #total power\n", + "print '%s %.1f' %(\" = A\",It)\n", + "change_I=It-Ic #change in current\n", + "print '%s %.1f' %(\"Therefore, increase in current due to modulation = A\",change_I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total current = carrier current*(1+m**2/2)\n", + " = A 114.9\n", + "Therefore, increase in current due to modulation = A 14.9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_3 Pg-774\n", + "#calculte Modulation Factor,Amplitude of each sideband,Frequenc of sidebands,Bandwidth of the wave\n", + "Em=5. #modulated wave amplitude\n", + "Ec=100. #carrier wave amplitude\n", + "Fm=50. #frequency of modulated wave\n", + "Fc=10.*10.**(3.) #frequency of carrier wave \n", + "print '%s' %(\"(1)Modulation Factor\")\n", + "m=Em/Ec #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.0f' %(\"m =\",per_m)\n", + "print '%s' %(\"(2)Amplitude of each sideband = m*Ec/2\")\n", + "Amp=m*Ec/2. #amplitude of each sideband\n", + "print '%s %.1f' %(\"=\",Amp)\n", + "USB=Fc+Fm #upper side band\n", + "LSB=Fc-Fm #lower side band\n", + "print '%s' %(\"(3)Frequenc of sidebands\")\n", + "print '%s %.0f' %(\"USB = Hz\",USB)\n", + "print '%s %.0f' %(\"LSB = Hz\",LSB)\n", + "print '%s' %(\"(4) Bandwidth of the wave\")\n", + "BW=2*Fm #Bandwidth\n", + "print '%s %.0f' %(\"BW =\",BW)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Modulation Factor\n", + "m = 5\n", + "(2)Amplitude of each sideband = m*Ec/2\n", + "= 2.5\n", + "(3)Frequenc of sidebands\n", + "USB = Hz 10050\n", + "LSB = Hz 9950\n", + "(4) Bandwidth of the wave\n", + "BW = 100\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_4 Pg-774\n", + "#calculte Modulation factor\n", + "Vmax=600. #peak to peak voltage\n", + "Vmin=100. #valley to valley voltage\n", + "print '%s' %(\"From figure 15.49, we have\")\n", + "m=(Vmax-Vmin)/(Vmax+Vmin) #modulation factor\n", + "per_m=m*100. #modulation factor in percentage\n", + "print '%s %.1f' %(\"Modulation factor = \",per_m )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From figure 15.49, we have\n", + "Modulation factor = 71.4\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_5 Pg-775\n", + "#calculte Modulation factor,Carrier Amplitude,omega,Signal frequency,Emax ,Emin,BW\n", + "import math\n", + "print '%s' %(\"The standard equation of AM wave is\")\n", + "print '%s' %(\" e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\")\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\" e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\")\n", + "print '%s' %(\"Comparing eqn 1 and eqn 2 one obtains\")\n", + "print '%s' %(\"(1)Modulation factor, m = 0.7\")\n", + "m=0.7 #modulation factor\n", + "print '%s' %(\"(2)Carrier Amplitude, Ec = 20 V\")\n", + "Ec=20. #carrier wave amplitude in V\n", + "print '%s' %(\"(3)omega_m = 6280\")\n", + "omega_m=6280 #modulating frequency\n", + "Fm=omega_m/(2.*math.pi) #signal frequency\n", + "print '%s %.0f' %(\"Signal frequency = kHz\",Fm*1e-3)\n", + "omega_c=628000. #carrier frequency in Hz\n", + "Fc=omega_c/(2.*math.pi) \n", + "print '%s %.0f' %(\"(4)Signal frequency = kHz\",Fc*1e-3)\n", + "Emax=Ec+m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emax = V\",Emax)\n", + "Emin=Ec-m*Ec #minimum amplitude of wave\n", + "print '%s %.0f' %(\"(5)Emin = V\",Emin)\n", + "BW=2.*Fm #Bandwidth\n", + "print '%s %.0f' %(\"(6)BW = kHZ\",BW*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard equation of AM wave is\n", + " e = Ec*(1+m*sin(omega_m*t)*sin(omega_c*t)) -->eqn 1\n", + "Given the equation\n", + " e = 20*(1+0.7*sin(6280*t)*sin(628000*t)) --eqn 2\n", + "Comparing eqn 1 and eqn 2 one obtains\n", + "(1)Modulation factor, m = 0.7\n", + "(2)Carrier Amplitude, Ec = 20 V\n", + "(3)omega_m = 6280\n", + "Signal frequency = kHz 1\n", + "(4)Signal frequency = kHz 100\n", + "(5)Emax = V 34\n", + "(5)Emin = V 6\n", + "(6)BW = kHZ 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_6 Pg-776\n", + "#calculte Total power\n", + "Pc=10000. #carrier power in watt\n", + "m=0.9 #modulation factor\n", + "print '%s' %(\"We have\")\n", + "print '%s' %(\"Total power = carrier power*(1+m**2/2)\")\n", + "Pt=Pc*(1.+m**2./2.) #total power\n", + "print '%s %.0f' %(\" = kW\",Pt*1e-3)\n", + "print '%s' %(\"This will be the maximum power handeled by the transmitter.\\nNow,increased unmodulated carrier power can be obtained by\")\n", + "m=40./100. #modulation in terms of percentage\n", + "Pt=14000. #total power\n", + "Pc=Pt/(1.+m**2./2.) #neew carrier power\n", + "print '%s %.2f' %(\"Pc = kW\",Pc*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have\n", + "Total power = carrier power*(1+m**2/2)\n", + " = kW 14\n", + "This will be the maximum power handeled by the transmitter.\n", + "Now,increased unmodulated carrier power can be obtained by\n", + "Pc = kW 12.96\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex15_7 Pg-776\n", + "#calculte standard equations for modulated voltage wave\n", + "import math\n", + "print '%s' %(\"Given the equation\")\n", + "print '%s' %(\"\\nE = 100*sin(628000*t)+25*sin(621720*t)\\n-25*cos(634280*t))\\n\")\n", + "m=50./100. #modulation factor in percentage\n", + "Ec=100. #carrier wave amplitude in V\n", + "Em=10. #modulated wave amplitude in V\n", + "Fc=100000. #carier frequency in Hz\n", + "Fm=1000. #modulating frequency in Hz\n", + "pi=3.14 \n", + "omega_c=2.*pi*Fc #carier frequency\n", + "omega_m=2.*pi*Em #modulating frequency \n", + "print '%s' %(\"Now,putting these equation in the standard equations for modulated voltage wave,\")\n", + "print '%s' %(\" e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\")\n", + "USB=omega_c+omega_m #upper sideband\n", + "LSB=omega_c-omega_m #lower sideband\n", + "mEc=m*Ec/2.\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",USB)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",mEc)\n", + "print '%s %.0f' %(\"\\n=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t))\",LSB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given the equation\n", + "\n", + "E = 100*sin(628000*t)+25*sin(621720*t)\n", + "-25*cos(634280*t))\n", + "\n", + "Now,putting these equation in the standard equations for modulated voltage wave,\n", + " e = Ec*sin(omega_c*t)+m*Ec/2*cos(omega_c-omega_m)*t-m*Ec/2*cos(omega_c-omega_m)*t\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 628063\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 25\n", + "\n", + "=100*sin(628000*t)+%.0f*sin(%.0f*t)-%.0f*cos(%.0f*t)) 627937\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3cfc1964 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_1.ipynb @@ -0,0 +1,346 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c96c12c91d19e317b71f22330124bbbc087ab88786dc882f203c4649ecee2c94" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 - Optoelectronic Devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 901" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_1 Pg-901\n", + "#calculate Source resistance,Wattage rating\n", + "Vs=12. #supply voltage in V\n", + "Vd=2. #forward bias voltage in V\n", + "Id=20.*10.**(-3.) #forward bias current\n", + "Rs=(Vs-Vd)/Id #source resistor\n", + "print '%s %.0f' %(\"Source resistance = ohm\",Rs)\n", + "P=Id**2.*Rs #power\n", + "print '%s %.1f' %(\"Wattage rating = mW\",P*1e3)\n", + "print '%s' %(\"Therefore a standard size 0.25 watt = 250mW resistor is required\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source resistance = ohm 500\n", + "Wattage rating = mW 200.0\n", + "Therefore a standard size 0.25 watt = 250mW resistor is required\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 945" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_2 Pg-945\n", + "#calculate R\n", + "import math\n", + "T=2000. #temperature in Kelvin\n", + "f=5.*10.**(14.) # frequency in Hz\n", + "h=6.6*10.**(-34.) #planck constant\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "R=math.exp((h*f)/(k*T)) #ratio of spontaneous and stimulated emisson\n", + "print '%s %.2f' %(\"R =\",R*1e-5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 1.56\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_3 Pg-946\n", + "#calculate Average wavelength of visible radiation\n", + "import math\n", + "print '%s' %(\"Average wavelength of visible radiation = 550 nm\")\n", + "print '%s' %(\" E1 - E2 = hc/lamda\")\n", + "h=6.6*10.**(-34.) #planck constant\n", + "c=3.*10.**(8.) #speed of light in sec\n", + "lamda= 550.*10.**(-9.) #wavelength in m\n", + "E=h*c/lamda #difference in energy levels in Joules\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "E_eV=E/e #difference in energy levels in electronVolt\n", + "print '%s %.1f' %(\" = J\",E*1e19)\n", + "print '%s %.2f' %(\" = eV\",E_eV)\n", + "T=300. #temperature in Kelvn\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "print '%s' %(\"Average room temperature=300K and g1=g2,we have\")\n", + "N=math.exp((-E)/(k*T))\n", + "print '%s %.2f' %(\"N2/N1 =\",N*1e37)\n", + "#answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average wavelength of visible radiation = 550 nm\n", + " E1 - E2 = hc/lamda\n", + " = J 3.6\n", + " = eV 2.25\n", + "Average room temperature=300K and g1=g2,we have\n", + "N2/N1 = 0.17\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_4 Pg-946\n", + "#calculate Energy absorbed,recombination radiation\n", + "import math\n", + "w=0.3*10.**(-6.)*100. #width of silicon in cm\n", + "alpha=4.*10.**(4.) \n", + "phi=10.**(-2.)\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "print '%s' %(\"(1)Energy absorbed/sec is given by \")\n", + "E=phi*(1.-math.exp(alpha*w)) #energy absorbed(textbook answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",abs(E)*1e3)\n", + "print '%s' %(\"(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\")\n", + "Heat=(3-1.12)/3.*100. #photon energy coverted to heat\n", + "print '%s %.0f' %(\" = \",Heat)\n", + "E1=(62./100.)*0.0232 #energy dissipated/sec (textbook answer is wrong)\n", + "print '%s %.1f' %(\"\\nObviously, the amount of energy dissipated/sec to lattice is = mW\",E1*1e3)\n", + "print '%s' %(\"(3)Number of photons/sec from recombination is\")\n", + "num_photons=2.4/(e*1.12)\n", + "print '%s %.1f' %(\" = photon/sec\",num_photons*1e-19)\n", + "#textbook answer is wrong\n", + "print '%s' %(\"Therefore recombination radiation\")\n", + "RR=abs(E)-E1 #recombination radiation (textbok answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",RR*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Energy absorbed/sec is given by \n", + " = mW 23.2\n", + "(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\n", + " = 63\n", + "\n", + "Obviously, the amount of energy dissipated/sec to lattice is = mW 14.4\n", + "(3)Number of photons/sec from recombination is\n", + " = photon/sec 1.3\n", + "Therefore recombination radiation\n", + " = mW 8.8\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_5 Pg-947\n", + "#calculate Time taken to diffuse\n", + "d=5.*10.**(-6.) #thickness of silicon in m\n", + "Dc=3.4*10.**(-3.) #diffusion coefficient in m**2sec**(-1)\n", + "t=d**2./(2.*Dc) #time taken to diffuse\n", + "print '%s %.1f' %(\"Time taken to diffuse = sec\",t*1e9)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to diffuse = sec 3.7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_6 Pg-947\n", + "#calculate Diode capacitance\n", + "import math\n", + "A=10.**(-6.) #diode area in m\n", + "epsilon_r=11.7 #relative permitivity \n", + "Nd=10.**(21.) #number of doping carriers\n", + "V=10. #bias potential in V\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "epsilon_0=8.85*10.**(-12.) #permitivity of free space\n", + "Cj=A/2.*math.sqrt(2.*e*epsilon_r*epsilon_0*Nd)/math.sqrt(V)\n", + "print '%s %.f' %(\"Diode capacitance = pF\",Cj*1e12)\n", + "#textbook answer is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode capacitance = pF 29\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_7 Pg-947\n", + "#calculate Gain\n", + "import math\n", + "L=10.**(-6.) #length of cavity in m\n", + "r2=0.5 #relative coefficient of semiconductor\n", + "r1=1.5 #relative coefficient of semiconductor\n", + "print '%s' %(\"No internal loss means di=0; we have\")\n", + "g=math.log10(1./(r1*r2))/(2.*L) #gain of the laser (textbook answer is wrong)\n", + "print '%s %.2f' %(\"Gain g = cm**(-1)\",g*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No internal loss means di=0; we have\n", + "Gain g = cm**(-1) 62.47\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_8 Pg-947\n", + "#calculate gain\n", + "L=100.*10.**(-6.) #length of semiconductor in m\n", + "A=10.**(-7.) #area of semiconductor in cm**2\n", + "V=10. #applied voltage in V\n", + "mew_n=1350. #mobility of electrons \n", + "mew_p=480. #mobiltiy of protons\n", + "tp=10.**(-6.) #lifetime of protons in sec\n", + "tn=L/(mew_n*V) #lifetime of electrons in sec\n", + "Gain=tp/tn*(1+(mew_p/mew_n)) #gain of photoconductor\n", + "print '%s %.2f' %(\"Gain =\",Gain*1e-2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 1.83\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..44c41756 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_2.ipynb @@ -0,0 +1,346 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8acf5696f32436267e7f75bdb11d995255b92eabdfb678e05be23818c6e6d6a6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 - Optoelectronic Devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 901" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_1 Pg-901\n", + "#calculate Source resistance,Wattage rating\n", + "Vs=12. #supply voltage in V\n", + "Vd=2. #forward bias voltage in V\n", + "Id=20.*10.**(-3.) #forward bias current\n", + "Rs=(Vs-Vd)/Id #source resistor\n", + "print '%s %.0f' %(\"Source resistance = ohm\",Rs)\n", + "P=Id**2.*Rs #power\n", + "print '%s %.1f' %(\"Wattage rating = mW\",P*1e3)\n", + "print '%s' %(\"Therefore a standard size 0.25 watt = 250mW resistor is required\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source resistance = ohm 500\n", + "Wattage rating = mW 200.0\n", + "Therefore a standard size 0.25 watt = 250mW resistor is required\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 945" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_2 Pg-945\n", + "#calculate R\n", + "import math\n", + "T=2000. #temperature in Kelvin\n", + "f=5.*10.**(14.) # frequency in Hz\n", + "h=6.6*10.**(-34.) #planck constant\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "R=math.exp((h*f)/(k*T)) #ratio of spontaneous and stimulated emisson\n", + "print '%s %.2f' %(\"R =\",R*1e-5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 1.56\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_3 Pg-946\n", + "#calculate Average wavelength of visible radiation\n", + "import math\n", + "print '%s' %(\"Average wavelength of visible radiation = 550 nm\")\n", + "print '%s' %(\" E1 - E2 = hc/lamda\")\n", + "h=6.6*10.**(-34.) #planck constant\n", + "c=3.*10.**(8.) #speed of light in sec\n", + "lamda= 550.*10.**(-9.) #wavelength in m\n", + "E=h*c/lamda #difference in energy levels in Joules\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "E_eV=E/e #difference in energy levels in electronVolt\n", + "print '%s %.1f' %(\" = J\",E*1e19)\n", + "print '%s %.2f' %(\" = eV\",E_eV)\n", + "T=300. #temperature in Kelvn\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "print '%s' %(\"Average room temperature=300K and g1=g2,we have\")\n", + "N=math.exp((-E)/(k*T))\n", + "print '%s %.2f' %(\"N2/N1 =\",N*1e37)\n", + "#answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average wavelength of visible radiation = 550 nm\n", + " E1 - E2 = hc/lamda\n", + " = J 3.6\n", + " = eV 2.25\n", + "Average room temperature=300K and g1=g2,we have\n", + "N2/N1 = 0.17\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_4 Pg-946\n", + "#calculate Energy absorbed,recombination radiation\n", + "import math\n", + "w=0.3*10.**(-6.)*100. #width of silicon in cm\n", + "alpha=4.*10.**(4.) \n", + "phi=10.**(-2.)\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "print '%s' %(\"(1)Energy absorbed/sec is given by \")\n", + "E=phi*(1.-math.exp(alpha*w)) #energy absorbed(textbook answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",abs(E)*1e3)\n", + "print '%s' %(\"(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\")\n", + "Heat=(3-1.12)/3.*100. #photon energy coverted to heat\n", + "print '%s %.0f' %(\" = \",Heat)\n", + "E1=(62./100.)*0.0232 #energy dissipated/sec (textbook answer is wrong)\n", + "print '%s %.1f' %(\"\\nObviously, the amount of energy dissipated/sec to lattice is = mW\",E1*1e3)\n", + "print '%s' %(\"(3)Number of photons/sec from recombination is\")\n", + "num_photons=2.4/(e*1.12)\n", + "print '%s %.1f' %(\" = photon/sec\",num_photons*1e-19)\n", + "#textbook answer is wrong\n", + "print '%s' %(\"Therefore recombination radiation\")\n", + "RR=abs(E)-E1 #recombination radiation (textbok answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",RR*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Energy absorbed/sec is given by \n", + " = mW 23.2\n", + "(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\n", + " = 63\n", + "\n", + "Obviously, the amount of energy dissipated/sec to lattice is = mW 14.4\n", + "(3)Number of photons/sec from recombination is\n", + " = photon/sec 1.3\n", + "Therefore recombination radiation\n", + " = mW 8.8\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_5 Pg-947\n", + "#calculate Time taken to diffuse\n", + "d=5.*10.**(-6.) #thickness of silicon in m\n", + "Dc=3.4*10.**(-3.) #diffusion coefficient in m**2sec**(-1)\n", + "t=d**2./(2.*Dc) #time taken to diffuse\n", + "print '%s %.1f' %(\"Time taken to diffuse = sec\",t*1e9)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to diffuse = sec 3.7\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_6 Pg-947\n", + "#calculate Diode capacitance\n", + "import math\n", + "A=10.**(-6.) #diode area in m\n", + "epsilon_r=11.7 #relative permitivity \n", + "Nd=10.**(21.) #number of doping carriers\n", + "V=10. #bias potential in V\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "epsilon_0=8.85*10.**(-12.) #permitivity of free space\n", + "Cj=A/2.*math.sqrt(2.*e*epsilon_r*epsilon_0*Nd)/math.sqrt(V)\n", + "print '%s %.f' %(\"Diode capacitance = pF\",Cj*1e12)\n", + "#textbook answer is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode capacitance = pF 29\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_7 Pg-947\n", + "#calculate Gain\n", + "import math\n", + "L=10.**(-6.) #length of cavity in m\n", + "r2=0.5 #relative coefficient of semiconductor\n", + "r1=1.5 #relative coefficient of semiconductor\n", + "print '%s' %(\"No internal loss means di=0; we have\")\n", + "g=math.log10(1./(r1*r2))/(2.*L) #gain of the laser (textbook answer is wrong)\n", + "print '%s %.2f' %(\"Gain g = cm**(-1)\",g*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No internal loss means di=0; we have\n", + "Gain g = cm**(-1) 62.47\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_8 Pg-947\n", + "#calculate gain\n", + "L=100.*10.**(-6.) #length of semiconductor in m\n", + "A=10.**(-7.) #area of semiconductor in cm**2\n", + "V=10. #applied voltage in V\n", + "mew_n=1350. #mobility of electrons \n", + "mew_p=480. #mobiltiy of protons\n", + "tp=10.**(-6.) #lifetime of protons in sec\n", + "tn=L/(mew_n*V) #lifetime of electrons in sec\n", + "Gain=tp/tn*(1+(mew_p/mew_n)) #gain of photoconductor\n", + "print '%s %.2f' %(\"Gain =\",Gain*1e-2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 1.83\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..44c41756 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_18_3.ipynb @@ -0,0 +1,346 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8acf5696f32436267e7f75bdb11d995255b92eabdfb678e05be23818c6e6d6a6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 - Optoelectronic Devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 901" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_1 Pg-901\n", + "#calculate Source resistance,Wattage rating\n", + "Vs=12. #supply voltage in V\n", + "Vd=2. #forward bias voltage in V\n", + "Id=20.*10.**(-3.) #forward bias current\n", + "Rs=(Vs-Vd)/Id #source resistor\n", + "print '%s %.0f' %(\"Source resistance = ohm\",Rs)\n", + "P=Id**2.*Rs #power\n", + "print '%s %.1f' %(\"Wattage rating = mW\",P*1e3)\n", + "print '%s' %(\"Therefore a standard size 0.25 watt = 250mW resistor is required\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source resistance = ohm 500\n", + "Wattage rating = mW 200.0\n", + "Therefore a standard size 0.25 watt = 250mW resistor is required\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 945" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_2 Pg-945\n", + "#calculate R\n", + "import math\n", + "T=2000. #temperature in Kelvin\n", + "f=5.*10.**(14.) # frequency in Hz\n", + "h=6.6*10.**(-34.) #planck constant\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "R=math.exp((h*f)/(k*T)) #ratio of spontaneous and stimulated emisson\n", + "print '%s %.2f' %(\"R =\",R*1e-5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 1.56\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_3 Pg-946\n", + "#calculate Average wavelength of visible radiation\n", + "import math\n", + "print '%s' %(\"Average wavelength of visible radiation = 550 nm\")\n", + "print '%s' %(\" E1 - E2 = hc/lamda\")\n", + "h=6.6*10.**(-34.) #planck constant\n", + "c=3.*10.**(8.) #speed of light in sec\n", + "lamda= 550.*10.**(-9.) #wavelength in m\n", + "E=h*c/lamda #difference in energy levels in Joules\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "E_eV=E/e #difference in energy levels in electronVolt\n", + "print '%s %.1f' %(\" = J\",E*1e19)\n", + "print '%s %.2f' %(\" = eV\",E_eV)\n", + "T=300. #temperature in Kelvn\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "print '%s' %(\"Average room temperature=300K and g1=g2,we have\")\n", + "N=math.exp((-E)/(k*T))\n", + "print '%s %.2f' %(\"N2/N1 =\",N*1e37)\n", + "#answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average wavelength of visible radiation = 550 nm\n", + " E1 - E2 = hc/lamda\n", + " = J 3.6\n", + " = eV 2.25\n", + "Average room temperature=300K and g1=g2,we have\n", + "N2/N1 = 0.17\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 946" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_4 Pg-946\n", + "#calculate Energy absorbed,recombination radiation\n", + "import math\n", + "w=0.3*10.**(-6.)*100. #width of silicon in cm\n", + "alpha=4.*10.**(4.) \n", + "phi=10.**(-2.)\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "print '%s' %(\"(1)Energy absorbed/sec is given by \")\n", + "E=phi*(1.-math.exp(alpha*w)) #energy absorbed(textbook answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",abs(E)*1e3)\n", + "print '%s' %(\"(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\")\n", + "Heat=(3-1.12)/3.*100. #photon energy coverted to heat\n", + "print '%s %.0f' %(\" = \",Heat)\n", + "E1=(62./100.)*0.0232 #energy dissipated/sec (textbook answer is wrong)\n", + "print '%s %.1f' %(\"\\nObviously, the amount of energy dissipated/sec to lattice is = mW\",E1*1e3)\n", + "print '%s' %(\"(3)Number of photons/sec from recombination is\")\n", + "num_photons=2.4/(e*1.12)\n", + "print '%s %.1f' %(\" = photon/sec\",num_photons*1e-19)\n", + "#textbook answer is wrong\n", + "print '%s' %(\"Therefore recombination radiation\")\n", + "RR=abs(E)-E1 #recombination radiation (textbok answer is wrong)\n", + "print '%s %.1f' %(\" = mW\",RR*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Energy absorbed/sec is given by \n", + " = mW 23.2\n", + "(2)The portion of each photo energy that is converted into heat is obtained as hv-Eg/hv\n", + " = 63\n", + "\n", + "Obviously, the amount of energy dissipated/sec to lattice is = mW 14.4\n", + "(3)Number of photons/sec from recombination is\n", + " = photon/sec 1.3\n", + "Therefore recombination radiation\n", + " = mW 8.8\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_5 Pg-947\n", + "#calculate Time taken to diffuse\n", + "d=5.*10.**(-6.) #thickness of silicon in m\n", + "Dc=3.4*10.**(-3.) #diffusion coefficient in m**2sec**(-1)\n", + "t=d**2./(2.*Dc) #time taken to diffuse\n", + "print '%s %.1f' %(\"Time taken to diffuse = sec\",t*1e9)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to diffuse = sec 3.7\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_6 Pg-947\n", + "#calculate Diode capacitance\n", + "import math\n", + "A=10.**(-6.) #diode area in m\n", + "epsilon_r=11.7 #relative permitivity \n", + "Nd=10.**(21.) #number of doping carriers\n", + "V=10. #bias potential in V\n", + "e=1.6*10.**(-19.) #electron charge in eV\n", + "epsilon_0=8.85*10.**(-12.) #permitivity of free space\n", + "Cj=A/2.*math.sqrt(2.*e*epsilon_r*epsilon_0*Nd)/math.sqrt(V)\n", + "print '%s %.f' %(\"Diode capacitance = pF\",Cj*1e12)\n", + "#textbook answer is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode capacitance = pF 29\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_7 Pg-947\n", + "#calculate Gain\n", + "import math\n", + "L=10.**(-6.) #length of cavity in m\n", + "r2=0.5 #relative coefficient of semiconductor\n", + "r1=1.5 #relative coefficient of semiconductor\n", + "print '%s' %(\"No internal loss means di=0; we have\")\n", + "g=math.log10(1./(r1*r2))/(2.*L) #gain of the laser (textbook answer is wrong)\n", + "print '%s %.2f' %(\"Gain g = cm**(-1)\",g*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No internal loss means di=0; we have\n", + "Gain g = cm**(-1) 62.47\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 947" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex18_8 Pg-947\n", + "#calculate gain\n", + "L=100.*10.**(-6.) #length of semiconductor in m\n", + "A=10.**(-7.) #area of semiconductor in cm**2\n", + "V=10. #applied voltage in V\n", + "mew_n=1350. #mobility of electrons \n", + "mew_p=480. #mobiltiy of protons\n", + "tp=10.**(-6.) #lifetime of protons in sec\n", + "tn=L/(mew_n*V) #lifetime of electrons in sec\n", + "Gain=tp/tn*(1+(mew_p/mew_n)) #gain of photoconductor\n", + "print '%s %.2f' %(\"Gain =\",Gain*1e-2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain = 1.83\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..30dff9c1 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_1.ipynb @@ -0,0 +1,1129 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6ebc3f292ace645106ed2da65b1d2986f934b4426d48b029320345efeadbaceb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 - Digital Electronics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_1 Pg-957 \n", + "#calculate decimal equivqlent of 101\n", + "a=\"101\"\n", + "b=int(a,base=2)\n", + "print'%s %.f'%(\"The decimal equivqlent of 101 is\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 101 is 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_2 Pg-958\n", + "#decimal equivqlent of 11101\n", + "bina='11101'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "print(\"The decimal equivqlent of 11101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 11101 is\n", + "29\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_3 Pg-958\n", + "#decimal equivqlent of 0.101\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3) #decimal output\n", + "print(\"The decimal equivqlent of 0.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.101 is\n", + "0.625\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_4 Pg-958\n", + "#The decimal equivqlent of 0.1101\n", + "a=1\n", + "b=1\n", + "c=0\n", + "d=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3)+d*2**(-4) #decimal output\n", + "print(\"The decimal equivqlent of 0.1101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.1101 is\n", + "0.8125\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_5 Pg-958 \n", + "# decimal equivqlent of 10101.101\n", + "#Integer part\n", + "bina='10101'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "\n", + "#Decimal part\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec_D=a*2**(-1)+b*2**(-2)+c*2**(-3)\n", + "dec=dec_I+dec_D #decimal output\n", + "print(\"The decimal equivqlent of 10101.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 10101.101 is\n", + "21.625\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_6 Pg-959\n", + "#binary equivalent of 9\n", + "dec=9 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9 is\n", + "0b1001\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_7 Pg-959 \n", + "#binary equivalent of 31\n", + "dec=31 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 31 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 31 is\n", + "0b11111\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_8 Pg-959 \n", + "#binary equivalent of 13\n", + "dec=13 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 13 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 13 is\n", + "0b1101\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 960" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_9 Pg-960\n", + "#Conversion of decimal number 31.65 base to its binary equivalent\n", + "import math\n", + "print(\"Conversion of decimal number 31.65 base to its binary equivalent \")\n", + "a=31.65;\n", + "z=a%1\n", + "x=math.floor(a);#separating the decimal from the integer part\n", + "b=0;\n", + "c=0;\n", + "d=0;\n", + "while(x>0): #taking integer part into a matrix and convert to equivalent binary\n", + "\ty=x%2;\n", + "\tb=b+(10**c)*y;\n", + "\tx=x/2.;\n", + "\tx=math.floor(x);\n", + "\tc=c+1;\n", + "\n", + "for i in range(1,10):#converting the values after the decimal point into binary\n", + " z=z*2;\n", + " q=math.floor(z);\n", + " d=d+q/(10**i);\n", + " if z>=1:\n", + " \tz=z-1;\n", + "\n", + "s=b+d;\n", + "print s\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conversion of decimal number 31.65 base to its binary equivalent \n", + "11111.1010011\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 961" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_10 Pg-961\n", + "#Calculate the decimal equivqlent of 1111 and 1111111\n", + "a1=\"1111\"\n", + "b1=int(a1,base=2)\n", + "print'%s %.f'%(\"(a)The decimal equivqlent of 1111 is\",b1)\n", + "a2=\"1111111\"\n", + "b2=int(a2,base=2)\n", + "print'%s %.f'%(\"(b)The decimal equivqlent of 1111111 is\",b2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The decimal equivqlent of 1111 is 15\n", + "(b)The decimal equivqlent of 1111111 is 127\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_11 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"23\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 23 is =\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 23 is = 19\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_12 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"257\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 257 is =\",b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 257 is = 175\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_13 Pg-962 \n", + "#calculate The octal equivqlent of 257\n", + "a=\"175\"\n", + "b=oct(175)\n", + "print b\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0257\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_14 Pg-963\n", + "#calculate the octal equivalent of 0.85\n", + "a=.85\n", + "b=.5\n", + "octal=int(a*8.) \n", + "octal2=int(b*64.)\n", + "print 'In octal representation it is .',octal,octal2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In octal representation it is . 6 32\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_15 Pg-963\n", + "a='34' #octal input\n", + "b=int(a,base=8) #decimal output\n", + "print b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "28\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_16 Pg-963\n", + "x='357'\n", + "decimal=int(x,base=8) #to convert octal to decimal\n", + "binary=bin(decimal) #to convert binary to decimal\n", + "print 'In decimal=',decimal\n", + "print'In binary = ',binary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In decimal= 239\n", + "In binary = 0b11101111\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_17 Pg-963\n", + "#Integer part\n", + "bina='1011'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "oct_I=oct(dec_I) #octal output\n", + "\n", + "#Decimal part\n", + "bina2='11010'; #binary input\n", + "dec_D=int(bina2,base=2) #decimal output\n", + "oct_D=oct(dec_D) #octal output\n", + "octa=oct_I + oct_D #final octal output\n", + "b = ([oct_I, oct_D ]) # combining intger and decimal part\n", + "print(\"The octal equivqlent of 1011.01101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The octal equivqlent of 1011.01101 is\n", + "['013', '032']\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_18 Pg-965\n", + "hexa='9AF' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9AF is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9AF is\n", + "0b100110101111\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_19 Pg-965\n", + "hexa='C5E2' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of C5E2 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of C5E2 is\n", + "0b1100010111100010\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_20 Pg-957 \n", + "bina='10001100'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The hexadecimal equivqlent of 10001100 is\")\n", + "print(hexa)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hexadecimal equivqlent of 10001100 is\n", + "0x8c\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_21 Pg-965\n", + "#Integer part\n", + "hexa='F8E6'; #binary input\n", + "dec_I=int(hexa,base=16) #decimal output\n", + "\n", + "#Decimal part\n", + "a=3 \n", + "b=9\n", + "dec=dec_I+a*16**(-1)+b*16**(-2) #decimal output \n", + "print(\"The decimal equivalent of F8E6.39 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivalent of F8E6.39 is\n", + "63718.2226562\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E22 - Pg 996" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_22 Pg-966\n", + "dec=2479 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 2479 is\")\n", + "print(hex)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 2479 is\n", + "\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E23 - Pg 966" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_23 Pg-966\n", + "dec=65535 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 65535 is\")\n", + "print(hexa)\n", + "\n", + "bina=bin(dec) #binary output\n", + "print(\"The Binary equivalent of 65535 is \")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 65535 is\n", + "0xffff\n", + "The Binary equivalent of 65535 is \n", + "0b1111111111111111\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E24 - Pg 969" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_24 Pg-969\n", + "x=int('11100',2) #1st input\n", + "y=int('11010',2) #2nd input\n", + "z=x+y #binary addition\n", + "add=bin(z)\n", + "print(\" 11100 + 11010 = \")\n", + "print(add)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 11100 + 11010 = \n", + "0b110110\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E25 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_25 Pg-970\n", + "x=int('1101',2) #1st input\n", + "y=int('1010',2) #2nd input\n", + "z=x-y #subtraction\n", + "sub=bin(z)\n", + "print(\"1101-1010 =\")\n", + "print(sub)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1101-1010 =\n", + "0b11\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E26 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_26 Pg-970\n", + "x=200 #1st input\n", + "y=125 #2nd input\n", + "z=x-y #subtraction\n", + "print(\"For decimal system 200 - 125 = \")\n", + "print(z)\n", + "\n", + "a=hex(z) #hexadeciaml output of 200-125\n", + "print(\"For hexadecimal system C8 - 7D is\")\n", + "print(a)\n", + "\n", + "b=bin(z) #binary output of 200-125\n", + "print(\"For binary system 11001000 - 01111101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For decimal system 200 - 125 = \n", + "75\n", + "For hexadecimal system C8 - 7D is\n", + "0x4b\n", + "For binary system 11001000 - 01111101 is\n", + "0b1001011\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E27 - Pg 997" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_27 Pg-997\n", + "print(\"(A+B)(A+C) = AA + AC + AB + BC \")\n", + "#by distributive law\n", + "print(\" = A + AC + AB +BC\")\n", + "#by theorem(6)\n", + "print(\" = A(1 + C) + AB + BC\")\n", + "#by distributive law\n", + "print(\" = A.1 + AB + BC \")\n", + "#by theorem(3)\n", + "print(\" = A(B + 1) + BC\")\n", + "#by distributive law\n", + "print(\" = A + BC\")\n", + "print(\"Therefore (A+B)(A+C) = A + BC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(A+B)(A+C) = AA + AC + AB + BC \n", + " = A + AC + AB +BC\n", + " = A(1 + C) + AB + BC\n", + " = A.1 + AB + BC \n", + " = A(B + 1) + BC\n", + " = A + BC\n", + "Therefore (A+B)(A+C) = A + BC\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E28 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_28 Pg-998\n", + "print(\"AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\")\n", + "#using distributive law\n", + "print(\" = AB + AC + B +BC \")\n", + "#using law 6\n", + "print(\" = AB + AC + B(1 + C) \")\n", + "#taking common B from B + BC \n", + "print(\" = AB + AC + B\")\n", + "#using law 7 \n", + "print(\" = B(A + 1) + AC\")\n", + "#taking common B from AB + B\n", + "print(\" = B + AC\")\n", + "#using law 7\n", + "print(\"Therefore AB + A(B + C) + B(B + C) = B + AC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\n", + " = AB + AC + B +BC \n", + " = AB + AC + B(1 + C) \n", + " = AB + AC + B\n", + " = B(A + 1) + AC\n", + " = B + AC\n", + "Therefore AB + A(B + C) + B(B + C) = B + AC\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E30 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_30 Pg-998\n", + "# question in the textbook is wrong7 \n", + "print(\"LHS : (A + B + C)(A + B + C) \")\n", + "print(\" = AA + AB + AC + BA + BB +BC + CA + CB + CC\")\n", + "#using distributive law\n", + "print(\" = A + AB + AC + BA + B +BC + CA + CB + C\")\n", + "#using law 6\n", + "print(\" = A + AB + AC +BC + CB + C\")\n", + "#using law 5\n", + "print(\" = A(B + 1) + AC + B + C(B + 1)\")\n", + "#taking A common from A+AB and C from CB+C\n", + "print(\" = A + AC + B + C\")\n", + "#using law 3\n", + "print(\" = A + B + C(A + 1)\")\n", + "#taking common C from AC+C\n", + "print(\" = A + B + C\")\n", + "#using law 3\n", + "print(\"Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A + B + C)(A + B + C) \n", + " = AA + AB + AC + BA + BB +BC + CA + CB + CC\n", + " = A + AB + AC + BA + B +BC + CA + CB + C\n", + " = A + AB + AC +BC + CB + C\n", + " = A(B + 1) + AC + B + C(B + 1)\n", + " = A + AC + B + C\n", + " = A + B + C(A + 1)\n", + " = A + B + C\n", + "Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E31 - Pg 999" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_31 Pg-999\n", + "print(\"LHS : (A+ C)(A'' + B) \")\n", + "print(\" = AA'' + AB + CA'' + BC\") #using distributive law\n", + "print(\" = 0 + AB + CA'' + BC\") #using law 8\n", + "print(\" = AB + (A + A'')BC + CA''\") #using law 7\n", + "print(\" = AB + ABC + A''BC + CA''\") \n", + "#using distributive law\n", + "print(\" = AB + ABC + A''C(B + 1)\") \n", + "#taking common A'C from A'BC + CA'\n", + "print(\" = AB + ABC + A''C\") #using law 3\n", + "print(\" = AB(C + 1)+ A''C\") \n", + "#taking common AB from AB + ABC\n", + "print(\" = AB + A''C\") #using law 3\n", + "print(\"Therefore (A+ C)(A'' + B) = AB + A''C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A+ C)(A'' + B) \n", + " = AA'' + AB + CA'' + BC\n", + " = 0 + AB + CA'' + BC\n", + " = AB + (A + A'')BC + CA''\n", + " = AB + ABC + A''BC + CA''\n", + " = AB + ABC + A''C(B + 1)\n", + " = AB + ABC + A''C\n", + " = AB(C + 1)+ A''C\n", + " = AB + A''C\n", + "Therefore (A+ C)(A'' + B) = AB + A''C\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9fa544f7 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_2.ipynb @@ -0,0 +1,1129 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:945006863c63304cbc544f24dfb80d480d54472bf41be8526d524f28a1051fc0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 - Digital Electronics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_1 Pg-957 \n", + "#calculate decimal equivqlent of 101\n", + "a=\"101\"\n", + "b=int(a,base=2)\n", + "print'%s %.f'%(\"The decimal equivqlent of 101 is\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 101 is 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_2 Pg-958\n", + "#decimal equivqlent of 11101\n", + "bina='11101'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "print(\"The decimal equivqlent of 11101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 11101 is\n", + "29\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_3 Pg-958\n", + "#decimal equivqlent of 0.101\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3) #decimal output\n", + "print(\"The decimal equivqlent of 0.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.101 is\n", + "0.625\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_4 Pg-958\n", + "#The decimal equivqlent of 0.1101\n", + "a=1\n", + "b=1\n", + "c=0\n", + "d=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3)+d*2**(-4) #decimal output\n", + "print(\"The decimal equivqlent of 0.1101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.1101 is\n", + "0.8125\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_5 Pg-958 \n", + "# decimal equivqlent of 10101.101\n", + "#Integer part\n", + "bina='10101'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "\n", + "#Decimal part\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec_D=a*2**(-1)+b*2**(-2)+c*2**(-3)\n", + "dec=dec_I+dec_D #decimal output\n", + "print(\"The decimal equivqlent of 10101.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 10101.101 is\n", + "21.625\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_6 Pg-959\n", + "#binary equivalent of 9\n", + "dec=9 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9 is\n", + "0b1001\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_7 Pg-959 \n", + "#binary equivalent of 31\n", + "dec=31 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 31 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 31 is\n", + "0b11111\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_8 Pg-959 \n", + "#binary equivalent of 13\n", + "dec=13 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 13 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 13 is\n", + "0b1101\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 960" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_9 Pg-960\n", + "#Conversion of decimal number 31.65 base to its binary equivalent\n", + "import math\n", + "print(\"Conversion of decimal number 31.65 base to its binary equivalent \")\n", + "a=31.65;\n", + "z=a%1\n", + "x=math.floor(a);#separating the decimal from the integer part\n", + "b=0;\n", + "c=0;\n", + "d=0;\n", + "while(x>0): #taking integer part into a matrix and convert to equivalent binary\n", + "\ty=x%2;\n", + "\tb=b+(10**c)*y;\n", + "\tx=x/2.;\n", + "\tx=math.floor(x);\n", + "\tc=c+1;\n", + "\n", + "for i in range(1,10):#converting the values after the decimal point into binary\n", + " z=z*2;\n", + " q=math.floor(z);\n", + " d=d+q/(10**i);\n", + " if z>=1:\n", + " \tz=z-1;\n", + "\n", + "s=b+d;\n", + "print s\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conversion of decimal number 31.65 base to its binary equivalent \n", + "11111.1010011\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 961" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_10 Pg-961\n", + "#Calculate the decimal equivqlent of 1111 and 1111111\n", + "a1=\"1111\"\n", + "b1=int(a1,base=2)\n", + "print'%s %.f'%(\"(a)The decimal equivqlent of 1111 is\",b1)\n", + "a2=\"1111111\"\n", + "b2=int(a2,base=2)\n", + "print'%s %.f'%(\"(b)The decimal equivqlent of 1111111 is\",b2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The decimal equivqlent of 1111 is 15\n", + "(b)The decimal equivqlent of 1111111 is 127\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_11 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"23\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 23 is =\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 23 is = 19\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_12 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"257\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 257 is =\",b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 257 is = 175\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_13 Pg-962 \n", + "#calculate The octal equivqlent of 257\n", + "a=\"175\"\n", + "b=oct(175)\n", + "print b\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0257\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_14 Pg-963\n", + "#calculate the octal equivalent of 0.85\n", + "a=.85\n", + "b=.5\n", + "octal=int(a*8.) \n", + "octal2=int(b*64.)\n", + "print 'In octal representation it is .',octal,octal2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In octal representation it is . 6 32\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_15 Pg-963\n", + "a='34' #octal input\n", + "b=int(a,base=8) #decimal output\n", + "print b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "28\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_16 Pg-963\n", + "x='357'\n", + "decimal=int(x,base=8) #to convert octal to decimal\n", + "binary=bin(decimal) #to convert binary to decimal\n", + "print 'In decimal=',decimal\n", + "print'In binary = ',binary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In decimal= 239\n", + "In binary = 0b11101111\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_17 Pg-963\n", + "#Integer part\n", + "bina='1011'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "oct_I=oct(dec_I) #octal output\n", + "\n", + "#Decimal part\n", + "bina2='11010'; #binary input\n", + "dec_D=int(bina2,base=2) #decimal output\n", + "oct_D=oct(dec_D) #octal output\n", + "octa=oct_I + oct_D #final octal output\n", + "b = ([oct_I, oct_D ]) # combining intger and decimal part\n", + "print(\"The octal equivqlent of 1011.01101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The octal equivqlent of 1011.01101 is\n", + "['013', '032']\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_18 Pg-965\n", + "hexa='9AF' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9AF is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9AF is\n", + "0b100110101111\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_19 Pg-965\n", + "hexa='C5E2' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of C5E2 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of C5E2 is\n", + "0b1100010111100010\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_20 Pg-957 \n", + "bina='10001100'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The hexadecimal equivqlent of 10001100 is\")\n", + "print(hexa)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hexadecimal equivqlent of 10001100 is\n", + "0x8c\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_21 Pg-965\n", + "#Integer part\n", + "hexa='F8E6'; #binary input\n", + "dec_I=int(hexa,base=16) #decimal output\n", + "\n", + "#Decimal part\n", + "a=3 \n", + "b=9\n", + "dec=dec_I+a*16**(-1)+b*16**(-2) #decimal output \n", + "print(\"The decimal equivalent of F8E6.39 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivalent of F8E6.39 is\n", + "63718.2226562\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E22 - Pg 996" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_22 Pg-966\n", + "dec=2479 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 2479 is\")\n", + "print(hex)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 2479 is\n", + "\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E23 - Pg 966" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_23 Pg-966\n", + "dec=65535 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 65535 is\")\n", + "print(hexa)\n", + "\n", + "bina=bin(dec) #binary output\n", + "print(\"The Binary equivalent of 65535 is \")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 65535 is\n", + "0xffff\n", + "The Binary equivalent of 65535 is \n", + "0b1111111111111111\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E24 - Pg 969" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_24 Pg-969\n", + "x=int('11100',2) #1st input\n", + "y=int('11010',2) #2nd input\n", + "z=x+y #binary addition\n", + "add=bin(z)\n", + "print(\" 11100 + 11010 = \")\n", + "print(add)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 11100 + 11010 = \n", + "0b110110\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E25 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_25 Pg-970\n", + "x=int('1101',2) #1st input\n", + "y=int('1010',2) #2nd input\n", + "z=x-y #subtraction\n", + "sub=bin(z)\n", + "print(\"1101-1010 =\")\n", + "print(sub)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1101-1010 =\n", + "0b11\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E26 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_26 Pg-970\n", + "x=200 #1st input\n", + "y=125 #2nd input\n", + "z=x-y #subtraction\n", + "print(\"For decimal system 200 - 125 = \")\n", + "print(z)\n", + "\n", + "a=hex(z) #hexadeciaml output of 200-125\n", + "print(\"For hexadecimal system C8 - 7D is\")\n", + "print(a)\n", + "\n", + "b=bin(z) #binary output of 200-125\n", + "print(\"For binary system 11001000 - 01111101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For decimal system 200 - 125 = \n", + "75\n", + "For hexadecimal system C8 - 7D is\n", + "0x4b\n", + "For binary system 11001000 - 01111101 is\n", + "0b1001011\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E27 - Pg 997" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_27 Pg-997\n", + "print(\"(A+B)(A+C) = AA + AC + AB + BC \")\n", + "#by distributive law\n", + "print(\" = A + AC + AB +BC\")\n", + "#by theorem(6)\n", + "print(\" = A(1 + C) + AB + BC\")\n", + "#by distributive law\n", + "print(\" = A.1 + AB + BC \")\n", + "#by theorem(3)\n", + "print(\" = A(B + 1) + BC\")\n", + "#by distributive law\n", + "print(\" = A + BC\")\n", + "print(\"Therefore (A+B)(A+C) = A + BC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(A+B)(A+C) = AA + AC + AB + BC \n", + " = A + AC + AB +BC\n", + " = A(1 + C) + AB + BC\n", + " = A.1 + AB + BC \n", + " = A(B + 1) + BC\n", + " = A + BC\n", + "Therefore (A+B)(A+C) = A + BC\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E28 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_28 Pg-998\n", + "print(\"AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\")\n", + "#using distributive law\n", + "print(\" = AB + AC + B +BC \")\n", + "#using law 6\n", + "print(\" = AB + AC + B(1 + C) \")\n", + "#taking common B from B + BC \n", + "print(\" = AB + AC + B\")\n", + "#using law 7 \n", + "print(\" = B(A + 1) + AC\")\n", + "#taking common B from AB + B\n", + "print(\" = B + AC\")\n", + "#using law 7\n", + "print(\"Therefore AB + A(B + C) + B(B + C) = B + AC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\n", + " = AB + AC + B +BC \n", + " = AB + AC + B(1 + C) \n", + " = AB + AC + B\n", + " = B(A + 1) + AC\n", + " = B + AC\n", + "Therefore AB + A(B + C) + B(B + C) = B + AC\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E30 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_30 Pg-998\n", + "# question in the textbook is wrong7 \n", + "print(\"LHS : (A + B + C)(A + B + C) \")\n", + "print(\" = AA + AB + AC + BA + BB +BC + CA + CB + CC\")\n", + "#using distributive law\n", + "print(\" = A + AB + AC + BA + B +BC + CA + CB + C\")\n", + "#using law 6\n", + "print(\" = A + AB + AC +BC + CB + C\")\n", + "#using law 5\n", + "print(\" = A(B + 1) + AC + B + C(B + 1)\")\n", + "#taking A common from A+AB and C from CB+C\n", + "print(\" = A + AC + B + C\")\n", + "#using law 3\n", + "print(\" = A + B + C(A + 1)\")\n", + "#taking common C from AC+C\n", + "print(\" = A + B + C\")\n", + "#using law 3\n", + "print(\"Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A + B + C)(A + B + C) \n", + " = AA + AB + AC + BA + BB +BC + CA + CB + CC\n", + " = A + AB + AC + BA + B +BC + CA + CB + C\n", + " = A + AB + AC +BC + CB + C\n", + " = A(B + 1) + AC + B + C(B + 1)\n", + " = A + AC + B + C\n", + " = A + B + C(A + 1)\n", + " = A + B + C\n", + "Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E31 - Pg 999" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_31 Pg-999\n", + "print(\"LHS : (A+ C)(A'' + B) \")\n", + "print(\" = AA'' + AB + CA'' + BC\") #using distributive law\n", + "print(\" = 0 + AB + CA'' + BC\") #using law 8\n", + "print(\" = AB + (A + A'')BC + CA''\") #using law 7\n", + "print(\" = AB + ABC + A''BC + CA''\") \n", + "#using distributive law\n", + "print(\" = AB + ABC + A''C(B + 1)\") \n", + "#taking common A'C from A'BC + CA'\n", + "print(\" = AB + ABC + A''C\") #using law 3\n", + "print(\" = AB(C + 1)+ A''C\") \n", + "#taking common AB from AB + ABC\n", + "print(\" = AB + A''C\") #using law 3\n", + "print(\"Therefore (A+ C)(A'' + B) = AB + A''C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A+ C)(A'' + B) \n", + " = AA'' + AB + CA'' + BC\n", + " = 0 + AB + CA'' + BC\n", + " = AB + (A + A'')BC + CA''\n", + " = AB + ABC + A''BC + CA''\n", + " = AB + ABC + A''C(B + 1)\n", + " = AB + ABC + A''C\n", + " = AB(C + 1)+ A''C\n", + " = AB + A''C\n", + "Therefore (A+ C)(A'' + B) = AB + A''C\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9fa544f7 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_19_3.ipynb @@ -0,0 +1,1129 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:945006863c63304cbc544f24dfb80d480d54472bf41be8526d524f28a1051fc0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 - Digital Electronics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_1 Pg-957 \n", + "#calculate decimal equivqlent of 101\n", + "a=\"101\"\n", + "b=int(a,base=2)\n", + "print'%s %.f'%(\"The decimal equivqlent of 101 is\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 101 is 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_2 Pg-958\n", + "#decimal equivqlent of 11101\n", + "bina='11101'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "print(\"The decimal equivqlent of 11101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 11101 is\n", + "29\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_3 Pg-958\n", + "#decimal equivqlent of 0.101\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3) #decimal output\n", + "print(\"The decimal equivqlent of 0.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.101 is\n", + "0.625\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_4 Pg-958\n", + "#The decimal equivqlent of 0.1101\n", + "a=1\n", + "b=1\n", + "c=0\n", + "d=1\n", + "dec=a*2**(-1)+b*2**(-2)+c*2**(-3)+d*2**(-4) #decimal output\n", + "print(\"The decimal equivqlent of 0.1101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 0.1101 is\n", + "0.8125\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 958" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_5 Pg-958 \n", + "# decimal equivqlent of 10101.101\n", + "#Integer part\n", + "bina='10101'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "\n", + "#Decimal part\n", + "a=1\n", + "b=0\n", + "c=1\n", + "dec_D=a*2**(-1)+b*2**(-2)+c*2**(-3)\n", + "dec=dec_I+dec_D #decimal output\n", + "print(\"The decimal equivqlent of 10101.101 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 10101.101 is\n", + "21.625\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_6 Pg-959\n", + "#binary equivalent of 9\n", + "dec=9 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9 is\n", + "0b1001\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_7 Pg-959 \n", + "#binary equivalent of 31\n", + "dec=31 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 31 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 31 is\n", + "0b11111\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_8 Pg-959 \n", + "#binary equivalent of 13\n", + "dec=13 #decimal input\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 13 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 13 is\n", + "0b1101\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 960" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_9 Pg-960\n", + "#Conversion of decimal number 31.65 base to its binary equivalent\n", + "import math\n", + "print(\"Conversion of decimal number 31.65 base to its binary equivalent \")\n", + "a=31.65;\n", + "z=a%1\n", + "x=math.floor(a);#separating the decimal from the integer part\n", + "b=0;\n", + "c=0;\n", + "d=0;\n", + "while(x>0): #taking integer part into a matrix and convert to equivalent binary\n", + "\ty=x%2;\n", + "\tb=b+(10**c)*y;\n", + "\tx=x/2.;\n", + "\tx=math.floor(x);\n", + "\tc=c+1;\n", + "\n", + "for i in range(1,10):#converting the values after the decimal point into binary\n", + " z=z*2;\n", + " q=math.floor(z);\n", + " d=d+q/(10**i);\n", + " if z>=1:\n", + " \tz=z-1;\n", + "\n", + "s=b+d;\n", + "print s\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conversion of decimal number 31.65 base to its binary equivalent \n", + "11111.1010011\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 961" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_10 Pg-961\n", + "#Calculate the decimal equivqlent of 1111 and 1111111\n", + "a1=\"1111\"\n", + "b1=int(a1,base=2)\n", + "print'%s %.f'%(\"(a)The decimal equivqlent of 1111 is\",b1)\n", + "a2=\"1111111\"\n", + "b2=int(a2,base=2)\n", + "print'%s %.f'%(\"(b)The decimal equivqlent of 1111111 is\",b2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The decimal equivqlent of 1111 is 15\n", + "(b)The decimal equivqlent of 1111111 is 127\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_11 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"23\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 23 is =\",b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 23 is = 19\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_12 Pg-962 \n", + "#calculate The decimal equivqlent of 23\n", + "a=\"257\"\n", + "b=int(a,base=8)\n", + "print'%s %.f'%(\"The decimal equivqlent of 257 is =\",b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivqlent of 257 is = 175\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_13 Pg-962 \n", + "#calculate The octal equivqlent of 257\n", + "a=\"175\"\n", + "b=oct(175)\n", + "print b\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0257\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_14 Pg-963\n", + "#calculate the octal equivalent of 0.85\n", + "a=.85\n", + "b=.5\n", + "octal=int(a*8.) \n", + "octal2=int(b*64.)\n", + "print 'In octal representation it is .',octal,octal2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In octal representation it is . 6 32\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_15 Pg-963\n", + "a='34' #octal input\n", + "b=int(a,base=8) #decimal output\n", + "print b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "28\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_16 Pg-963\n", + "x='357'\n", + "decimal=int(x,base=8) #to convert octal to decimal\n", + "binary=bin(decimal) #to convert binary to decimal\n", + "print 'In decimal=',decimal\n", + "print'In binary = ',binary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In decimal= 239\n", + "In binary = 0b11101111\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 963" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_17 Pg-963\n", + "#Integer part\n", + "bina='1011'; #binary input\n", + "dec_I=int(bina,base=2) #decimal output\n", + "oct_I=oct(dec_I) #octal output\n", + "\n", + "#Decimal part\n", + "bina2='11010'; #binary input\n", + "dec_D=int(bina2,base=2) #decimal output\n", + "oct_D=oct(dec_D) #octal output\n", + "octa=oct_I + oct_D #final octal output\n", + "b = ([oct_I, oct_D ]) # combining intger and decimal part\n", + "print(\"The octal equivqlent of 1011.01101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The octal equivqlent of 1011.01101 is\n", + "['013', '032']\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_18 Pg-965\n", + "hexa='9AF' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of 9AF is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 9AF is\n", + "0b100110101111\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_19 Pg-965\n", + "hexa='C5E2' #hexadecimal input\n", + "dec=int(hexa,base=16) #decimal output\n", + "bina=bin(dec) #binary output\n", + "print(\"The binary equivalent of C5E2 is\")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of C5E2 is\n", + "0b1100010111100010\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 957" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_20 Pg-957 \n", + "bina='10001100'; #binary input\n", + "dec=int(bina,base=2) #decimal output\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The hexadecimal equivqlent of 10001100 is\")\n", + "print(hexa)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hexadecimal equivqlent of 10001100 is\n", + "0x8c\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 965" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_21 Pg-965\n", + "#Integer part\n", + "hexa='F8E6'; #binary input\n", + "dec_I=int(hexa,base=16) #decimal output\n", + "\n", + "#Decimal part\n", + "a=3 \n", + "b=9\n", + "dec=dec_I+a*16**(-1)+b*16**(-2) #decimal output \n", + "print(\"The decimal equivalent of F8E6.39 is\")\n", + "print(dec)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decimal equivalent of F8E6.39 is\n", + "63718.2226562\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E22 - Pg 996" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_22 Pg-966\n", + "dec=2479 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 2479 is\")\n", + "print(hex)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 2479 is\n", + "\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E23 - Pg 966" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_23 Pg-966\n", + "dec=65535 #decimal input\n", + "hexa=hex(dec) #hexadecimal output\n", + "print(\"The Hexadecimal equivalent of 65535 is\")\n", + "print(hexa)\n", + "\n", + "bina=bin(dec) #binary output\n", + "print(\"The Binary equivalent of 65535 is \")\n", + "print(bina)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Hexadecimal equivalent of 65535 is\n", + "0xffff\n", + "The Binary equivalent of 65535 is \n", + "0b1111111111111111\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E24 - Pg 969" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_24 Pg-969\n", + "x=int('11100',2) #1st input\n", + "y=int('11010',2) #2nd input\n", + "z=x+y #binary addition\n", + "add=bin(z)\n", + "print(\" 11100 + 11010 = \")\n", + "print(add)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 11100 + 11010 = \n", + "0b110110\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E25 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_25 Pg-970\n", + "x=int('1101',2) #1st input\n", + "y=int('1010',2) #2nd input\n", + "z=x-y #subtraction\n", + "sub=bin(z)\n", + "print(\"1101-1010 =\")\n", + "print(sub)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1101-1010 =\n", + "0b11\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E26 - Pg 970" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_26 Pg-970\n", + "x=200 #1st input\n", + "y=125 #2nd input\n", + "z=x-y #subtraction\n", + "print(\"For decimal system 200 - 125 = \")\n", + "print(z)\n", + "\n", + "a=hex(z) #hexadeciaml output of 200-125\n", + "print(\"For hexadecimal system C8 - 7D is\")\n", + "print(a)\n", + "\n", + "b=bin(z) #binary output of 200-125\n", + "print(\"For binary system 11001000 - 01111101 is\")\n", + "print(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For decimal system 200 - 125 = \n", + "75\n", + "For hexadecimal system C8 - 7D is\n", + "0x4b\n", + "For binary system 11001000 - 01111101 is\n", + "0b1001011\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E27 - Pg 997" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_27 Pg-997\n", + "print(\"(A+B)(A+C) = AA + AC + AB + BC \")\n", + "#by distributive law\n", + "print(\" = A + AC + AB +BC\")\n", + "#by theorem(6)\n", + "print(\" = A(1 + C) + AB + BC\")\n", + "#by distributive law\n", + "print(\" = A.1 + AB + BC \")\n", + "#by theorem(3)\n", + "print(\" = A(B + 1) + BC\")\n", + "#by distributive law\n", + "print(\" = A + BC\")\n", + "print(\"Therefore (A+B)(A+C) = A + BC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(A+B)(A+C) = AA + AC + AB + BC \n", + " = A + AC + AB +BC\n", + " = A(1 + C) + AB + BC\n", + " = A.1 + AB + BC \n", + " = A(B + 1) + BC\n", + " = A + BC\n", + "Therefore (A+B)(A+C) = A + BC\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E28 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_28 Pg-998\n", + "print(\"AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\")\n", + "#using distributive law\n", + "print(\" = AB + AC + B +BC \")\n", + "#using law 6\n", + "print(\" = AB + AC + B(1 + C) \")\n", + "#taking common B from B + BC \n", + "print(\" = AB + AC + B\")\n", + "#using law 7 \n", + "print(\" = B(A + 1) + AC\")\n", + "#taking common B from AB + B\n", + "print(\" = B + AC\")\n", + "#using law 7\n", + "print(\"Therefore AB + A(B + C) + B(B + C) = B + AC\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AB + A(B + C) + B(B + C) = AB + AB + AC + BB + BC\n", + " = AB + AC + B +BC \n", + " = AB + AC + B(1 + C) \n", + " = AB + AC + B\n", + " = B(A + 1) + AC\n", + " = B + AC\n", + "Therefore AB + A(B + C) + B(B + C) = B + AC\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E30 - Pg 998" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_30 Pg-998\n", + "# question in the textbook is wrong7 \n", + "print(\"LHS : (A + B + C)(A + B + C) \")\n", + "print(\" = AA + AB + AC + BA + BB +BC + CA + CB + CC\")\n", + "#using distributive law\n", + "print(\" = A + AB + AC + BA + B +BC + CA + CB + C\")\n", + "#using law 6\n", + "print(\" = A + AB + AC +BC + CB + C\")\n", + "#using law 5\n", + "print(\" = A(B + 1) + AC + B + C(B + 1)\")\n", + "#taking A common from A+AB and C from CB+C\n", + "print(\" = A + AC + B + C\")\n", + "#using law 3\n", + "print(\" = A + B + C(A + 1)\")\n", + "#taking common C from AC+C\n", + "print(\" = A + B + C\")\n", + "#using law 3\n", + "print(\"Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A + B + C)(A + B + C) \n", + " = AA + AB + AC + BA + BB +BC + CA + CB + CC\n", + " = A + AB + AC + BA + B +BC + CA + CB + C\n", + " = A + AB + AC +BC + CB + C\n", + " = A(B + 1) + AC + B + C(B + 1)\n", + " = A + AC + B + C\n", + " = A + B + C(A + 1)\n", + " = A + B + C\n", + "Therefore (A'' + B + C)(A'' + B'' + C) = A'' + C\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E31 - Pg 999" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex19_31 Pg-999\n", + "print(\"LHS : (A+ C)(A'' + B) \")\n", + "print(\" = AA'' + AB + CA'' + BC\") #using distributive law\n", + "print(\" = 0 + AB + CA'' + BC\") #using law 8\n", + "print(\" = AB + (A + A'')BC + CA''\") #using law 7\n", + "print(\" = AB + ABC + A''BC + CA''\") \n", + "#using distributive law\n", + "print(\" = AB + ABC + A''C(B + 1)\") \n", + "#taking common A'C from A'BC + CA'\n", + "print(\" = AB + ABC + A''C\") #using law 3\n", + "print(\" = AB(C + 1)+ A''C\") \n", + "#taking common AB from AB + ABC\n", + "print(\" = AB + A''C\") #using law 3\n", + "print(\"Therefore (A+ C)(A'' + B) = AB + A''C\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "LHS : (A+ C)(A'' + B) \n", + " = AA'' + AB + CA'' + BC\n", + " = 0 + AB + CA'' + BC\n", + " = AB + (A + A'')BC + CA''\n", + " = AB + ABC + A''BC + CA''\n", + " = AB + ABC + A''C(B + 1)\n", + " = AB + ABC + A''C\n", + " = AB(C + 1)+ A''C\n", + " = AB + A''C\n", + "Therefore (A+ C)(A'' + B) = AB + A''C\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3756f226 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_1.ipynb @@ -0,0 +1,307 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b71c5763a44a53c43becf4b38bc4dc6ca15fcaba00869ac6f1172cbb9803b804" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - ELECTRONIC MATERIALS AND COMPONENTS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of resistor\n", + "print '%s' %(\"Refer to the figure 1.52\")\n", + "print '%s' %(\"Hold the resistor as shown in the figure such that tolerance is on your extreme right.\")\n", + "print '%s' %(\"Now the value of the resistor is equal to\")\n", + "print '%s' %(\" Red Black Blue Gold\")\n", + "print '%s' %(\" 2 0 6 (+/-)5%\")\n", + "red=2. #red value\n", + "blk=0 #black value\n", + "blu=6. #blue value\n", + "gld=5. #gold value\n", + "value_res=(red*10.+blk)*10.**blu #value of resistor\n", + "print '%s %.0f %s %.0f' %(\"\\n The value of resistor is\",value_res,\"ohm (+/-)\",gld)\n", + "per_val=0.05*value_res\n", + "pos_value_res=value_res+per_val #positive range of resistor\n", + "neg_value_res=value_res-per_val #negative range of resistor\n", + "print '%s %.0f %s %.0f %s ' %(\"\\n The value of resistor is\",neg_value_res*1e-6,\" Mohm and\",pos_value_res*1e-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.52\n", + "Hold the resistor as shown in the figure such that tolerance is on your extreme right.\n", + "Now the value of the resistor is equal to\n", + " Red Black Blue Gold\n", + " 2 0 6 (+/-)5%\n", + "\n", + " The value of resistor is 20000000 ohm (+/-) 5\n", + "\n", + " The value of resistor is 19 Mohm and 21 Mohm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"With the help of colour coding table, one finds\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print(\" Yellow Violet Orange Gold\")\n", + "print '%s' %(\" 4 7 10**3 (+/-)5%\")\n", + "yel=4. #yellow value\n", + "vio=7. #violet value\n", + "org=1e3 #orange value\n", + "gld=5. #gold value in %\n", + "val_res=(yel*10.+vio)*org\n", + "print '%s %.2f %s %.0f' %(\"\\n The value of resistor is\",val_res*1e-3,\"kohm (+/-)\",gld)\n", + "gld_ab=0.05 #absolute gold value\n", + "per_val=gld_ab*val_res\n", + "print '%s %.0f %s'%(\"\\n Now, 5%% of 47k_ohm =\",per_val, \"ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%(\"\\n\\n Thus resistance should be within the range\",val_res*1e-3, \"kohm(+/-)\",per_val*1e-3 ,\"Kohm\\n or between\",range_low*1e-3 ,\"kohm and\",range_high*1e-3, \"kohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "With the help of colour coding table, one finds\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Yellow Violet Orange Gold\n", + " 4 7 10**3 (+/-)5%\n", + "\n", + " The value of resistor is 47.00 kohm (+/-) 5\n", + "\n", + " Now, 5%% of 47k_ohm = 2350 ohm\n", + "\n", + "\n", + " Thus resistance should be within the range 47.00 kohm(+/-) 2.35 Kohm\n", + " or between 44.65 kohm and 49.35 kohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"The specification of the resistor from the color coding table is as follows\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print '%s' %(\" Gray Blue Gold Silver\")\n", + "print '%s' %(\" 8 6 10**(-1) (+/-)10%\")\n", + "gray=8. #gray value\n", + "blu=6. #blue value\n", + "gld=10.**-1 #gold value\n", + "sil=10. #silver value in %\n", + "val_res=(gray*10.+blu)*gld\n", + "print '%s %.2f %s %.2f' %(\"\\n The value of resistor is\",val_res, \"ohm (+/-)\",sil)\n", + "sil_ab=0.1 #absolute gold value\n", + "per_val=sil_ab*val_res\n", + "print '%s %.2f %s' %(\"\\n Now, 10%% of 8.6 ohm =\",per_val,\" ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print '%s %.2f %s %.2f %s %.2f %s %.2f %s' %(\"\\n\\n Obviously resistance should lie within the range\",val_res,\"ohm(+/-)\",per_val,\"ohm\\n or between\",range_high,\"ohm and\",range_low,\"ohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specification of the resistor from the color coding table is as follows\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Gray Blue Gold Silver\n", + " 8 6 10**(-1) (+/-)10%\n", + "\n", + " The value of resistor is 8.60 ohm (+/-) 10.00\n", + "\n", + " Now, 10%% of 8.6 ohm = 0.86 ohm\n", + "\n", + "\n", + " Obviously resistance should lie within the range 8.60 ohm(+/-) 0.86 ohm\n", + " or between 9.46 ohm and 7.74 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the load voltage and load current\n", + "print '%s' %(\"Refer to the figure 1.53\")\n", + "Vs=2. #supply voltage in V\n", + "Rs=1. #resistance in ohm\n", + "Is=Vs/Rs\n", + "print '%s %.2f %s' %(\"\\n Current Is =\",Is,\" A \\n\")\n", + "print '%s' %(\" Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\")\n", + "print '%s' %(\" Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\")\n", + "RL=1. #load resistance in ohm\n", + "IL=Is*(Rs/(Rs+RL)) #load current using current-divider\n", + "VL=IL*RL #load voltage\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VL,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",IL,\"A \\n\")\n", + "print '%s' %(\"From equation 53(b),using the voltage-divider concept,one obtains\")\n", + "VD_vl=Vs*(RL/(RL+Rs)) #load voltage using voltage divider \n", + "VD_il=VL/RL #load current\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VD_vl,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",VD_il,\"A \\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.53\n", + "\n", + " Current Is = 2.00 A \n", + "\n", + " Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\n", + " Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n", + "From equation 53(b),using the voltage-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the percentage variation in current, current for two extreme values R_L\n", + "print '%s' %(\"Refer to the figure 1.55\")\n", + "print '%s' %(\"(a) R_L varies from 1 ohm to 10 ohm.\")\n", + "print '%s' %(\"Currents for two extreme values of R_L are\")\n", + "Vs=10. #supply voltage\n", + "RL1=1. #resistance RL1\n", + "Rs=100. #source resistance\n", + "IL1=(Vs/(RL1+Rs))\n", + "RL2=10.\n", + "IL2=(Vs/(RL2+Rs))\n", + "per_var_cur=((IL1-IL2)/IL1)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur,\"\\n\")#answer in the text book took a .3 decimal round off value\n", + "print '%s' %(\" Now,load voltage for the two extreme values of R_L are\")\n", + "VL1=IL1*RL1\n", + "VL2=IL2*RL2\n", + "per_var_vol=((VL2-VL1)/VL2)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_vol,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\")\n", + "print '%s' %(\"Currents for the two extreme values R_L are\")\n", + "RL11=1000.\n", + "IL11=(Vs/(RL11+Rs))\n", + "RL22=10000.\n", + "IL22=(Vs/(RL22+Rs)) #mistake in book value\n", + "per_var_cur11=((IL11-IL22)/IL11)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur11,\"\\n\") #mistake in book value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.55\n", + "(a) R_L varies from 1 ohm to 10 ohm.\n", + "Currents for two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 8.18 \n", + "\n", + " Now,load voltage for the two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n", + "(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\n", + "Currents for the two extreme values R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4a7f41f9 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_2.ipynb @@ -0,0 +1,307 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3dc68f96ff09d84abc115d469ddcb8bc810c65806c1319dc854a4eda7c88a43b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - ELECTRONIC MATERIALS AND COMPONENTS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of resistor\n", + "print '%s' %(\"Refer to the figure 1.52\")\n", + "print '%s' %(\"Hold the resistor as shown in the figure such that tolerance is on your extreme right.\")\n", + "print '%s' %(\"Now the value of the resistor is equal to\")\n", + "print '%s' %(\" Red Black Blue Gold\")\n", + "print '%s' %(\" 2 0 6 (+/-)5%\")\n", + "red=2. #red value\n", + "blk=0 #black value\n", + "blu=6. #blue value\n", + "gld=5. #gold value\n", + "value_res=(red*10.+blk)*10.**blu #value of resistor\n", + "print '%s %.0f %s %.0f' %(\"\\n The value of resistor is\",value_res,\"ohm (+/-)\",gld)\n", + "per_val=0.05*value_res\n", + "pos_value_res=value_res+per_val #positive range of resistor\n", + "neg_value_res=value_res-per_val #negative range of resistor\n", + "print '%s %.0f %s %.0f %s ' %(\"\\n The value of resistor is\",neg_value_res*1e-6,\" Mohm and\",pos_value_res*1e-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.52\n", + "Hold the resistor as shown in the figure such that tolerance is on your extreme right.\n", + "Now the value of the resistor is equal to\n", + " Red Black Blue Gold\n", + " 2 0 6 (+/-)5%\n", + "\n", + " The value of resistor is 20000000 ohm (+/-) 5\n", + "\n", + " The value of resistor is 19 Mohm and 21 Mohm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"With the help of colour coding table, one finds\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print(\" Yellow Violet Orange Gold\")\n", + "print '%s' %(\" 4 7 10**3 (+/-)5%\")\n", + "yel=4. #yellow value\n", + "vio=7. #violet value\n", + "org=1e3 #orange value\n", + "gld=5. #gold value in %\n", + "val_res=(yel*10.+vio)*org\n", + "print '%s %.2f %s %.0f' %(\"\\n The value of resistor is\",val_res*1e-3,\"kohm (+/-)\",gld)\n", + "gld_ab=0.05 #absolute gold value\n", + "per_val=gld_ab*val_res\n", + "print '%s %.0f %s'%(\"\\n Now, 5%% of 47k_ohm =\",per_val, \"ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%(\"\\n\\n Thus resistance should be within the range\",val_res*1e-3, \"kohm(+/-)\",per_val*1e-3 ,\"Kohm\\n or between\",range_low*1e-3 ,\"kohm and\",range_high*1e-3, \"kohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "With the help of colour coding table, one finds\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Yellow Violet Orange Gold\n", + " 4 7 10**3 (+/-)5%\n", + "\n", + " The value of resistor is 47.00 kohm (+/-) 5\n", + "\n", + " Now, 5%% of 47k_ohm = 2350 ohm\n", + "\n", + "\n", + " Thus resistance should be within the range 47.00 kohm(+/-) 2.35 Kohm\n", + " or between 44.65 kohm and 49.35 kohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"The specification of the resistor from the color coding table is as follows\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print '%s' %(\" Gray Blue Gold Silver\")\n", + "print '%s' %(\" 8 6 10**(-1) (+/-)10%\")\n", + "gray=8. #gray value\n", + "blu=6. #blue value\n", + "gld=10.**-1 #gold value\n", + "sil=10. #silver value in %\n", + "val_res=(gray*10.+blu)*gld\n", + "print '%s %.2f %s %.2f' %(\"\\n The value of resistor is\",val_res, \"ohm (+/-)\",sil)\n", + "sil_ab=0.1 #absolute gold value\n", + "per_val=sil_ab*val_res\n", + "print '%s %.2f %s' %(\"\\n Now, 10%% of 8.6 ohm =\",per_val,\" ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print '%s %.2f %s %.2f %s %.2f %s %.2f %s' %(\"\\n\\n Obviously resistance should lie within the range\",val_res,\"ohm(+/-)\",per_val,\"ohm\\n or between\",range_high,\"ohm and\",range_low,\"ohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specification of the resistor from the color coding table is as follows\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Gray Blue Gold Silver\n", + " 8 6 10**(-1) (+/-)10%\n", + "\n", + " The value of resistor is 8.60 ohm (+/-) 10.00\n", + "\n", + " Now, 10%% of 8.6 ohm = 0.86 ohm\n", + "\n", + "\n", + " Obviously resistance should lie within the range 8.60 ohm(+/-) 0.86 ohm\n", + " or between 9.46 ohm and 7.74 ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the load voltage and load current\n", + "print '%s' %(\"Refer to the figure 1.53\")\n", + "Vs=2. #supply voltage in V\n", + "Rs=1. #resistance in ohm\n", + "Is=Vs/Rs\n", + "print '%s %.2f %s' %(\"\\n Current Is =\",Is,\" A \\n\")\n", + "print '%s' %(\" Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\")\n", + "print '%s' %(\" Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\")\n", + "RL=1. #load resistance in ohm\n", + "IL=Is*(Rs/(Rs+RL)) #load current using current-divider\n", + "VL=IL*RL #load voltage\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VL,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",IL,\"A \\n\")\n", + "print '%s' %(\"From equation 53(b),using the voltage-divider concept,one obtains\")\n", + "VD_vl=Vs*(RL/(RL+Rs)) #load voltage using voltage divider \n", + "VD_il=VL/RL #load current\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VD_vl,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",VD_il,\"A \\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.53\n", + "\n", + " Current Is = 2.00 A \n", + "\n", + " Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\n", + " Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n", + "From equation 53(b),using the voltage-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the percentage variation in current, current for two extreme values R_L\n", + "print '%s' %(\"Refer to the figure 1.55\")\n", + "print '%s' %(\"(a) R_L varies from 1 ohm to 10 ohm.\")\n", + "print '%s' %(\"Currents for two extreme values of R_L are\")\n", + "Vs=10. #supply voltage\n", + "RL1=1. #resistance RL1\n", + "Rs=100. #source resistance\n", + "IL1=(Vs/(RL1+Rs))\n", + "RL2=10.\n", + "IL2=(Vs/(RL2+Rs))\n", + "per_var_cur=((IL1-IL2)/IL1)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur,\"\\n\")#answer in the text book took a .3 decimal round off value\n", + "print '%s' %(\" Now,load voltage for the two extreme values of R_L are\")\n", + "VL1=IL1*RL1\n", + "VL2=IL2*RL2\n", + "per_var_vol=((VL2-VL1)/VL2)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_vol,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\")\n", + "print '%s' %(\"Currents for the two extreme values R_L are\")\n", + "RL11=1000.\n", + "IL11=(Vs/(RL11+Rs))\n", + "RL22=10000.\n", + "IL22=(Vs/(RL22+Rs)) #mistake in book value\n", + "per_var_cur11=((IL11-IL22)/IL11)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur11,\"\\n\") #mistake in book value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.55\n", + "(a) R_L varies from 1 ohm to 10 ohm.\n", + "Currents for two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 8.18 \n", + "\n", + " Now,load voltage for the two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n", + "(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\n", + "Currents for the two extreme values R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4a7f41f9 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_1_3.ipynb @@ -0,0 +1,307 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3dc68f96ff09d84abc115d469ddcb8bc810c65806c1319dc854a4eda7c88a43b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 - ELECTRONIC MATERIALS AND COMPONENTS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of resistor\n", + "print '%s' %(\"Refer to the figure 1.52\")\n", + "print '%s' %(\"Hold the resistor as shown in the figure such that tolerance is on your extreme right.\")\n", + "print '%s' %(\"Now the value of the resistor is equal to\")\n", + "print '%s' %(\" Red Black Blue Gold\")\n", + "print '%s' %(\" 2 0 6 (+/-)5%\")\n", + "red=2. #red value\n", + "blk=0 #black value\n", + "blu=6. #blue value\n", + "gld=5. #gold value\n", + "value_res=(red*10.+blk)*10.**blu #value of resistor\n", + "print '%s %.0f %s %.0f' %(\"\\n The value of resistor is\",value_res,\"ohm (+/-)\",gld)\n", + "per_val=0.05*value_res\n", + "pos_value_res=value_res+per_val #positive range of resistor\n", + "neg_value_res=value_res-per_val #negative range of resistor\n", + "print '%s %.0f %s %.0f %s ' %(\"\\n The value of resistor is\",neg_value_res*1e-6,\" Mohm and\",pos_value_res*1e-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.52\n", + "Hold the resistor as shown in the figure such that tolerance is on your extreme right.\n", + "Now the value of the resistor is equal to\n", + " Red Black Blue Gold\n", + " 2 0 6 (+/-)5%\n", + "\n", + " The value of resistor is 20000000 ohm (+/-) 5\n", + "\n", + " The value of resistor is 19 Mohm and 21 Mohm \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"With the help of colour coding table, one finds\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print(\" Yellow Violet Orange Gold\")\n", + "print '%s' %(\" 4 7 10**3 (+/-)5%\")\n", + "yel=4. #yellow value\n", + "vio=7. #violet value\n", + "org=1e3 #orange value\n", + "gld=5. #gold value in %\n", + "val_res=(yel*10.+vio)*org\n", + "print '%s %.2f %s %.0f' %(\"\\n The value of resistor is\",val_res*1e-3,\"kohm (+/-)\",gld)\n", + "gld_ab=0.05 #absolute gold value\n", + "per_val=gld_ab*val_res\n", + "print '%s %.0f %s'%(\"\\n Now, 5%% of 47k_ohm =\",per_val, \"ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%(\"\\n\\n Thus resistance should be within the range\",val_res*1e-3, \"kohm(+/-)\",per_val*1e-3 ,\"Kohm\\n or between\",range_low*1e-3 ,\"kohm and\",range_high*1e-3, \"kohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "With the help of colour coding table, one finds\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Yellow Violet Orange Gold\n", + " 4 7 10**3 (+/-)5%\n", + "\n", + " The value of resistor is 47.00 kohm (+/-) 5\n", + "\n", + " Now, 5%% of 47k_ohm = 2350 ohm\n", + "\n", + "\n", + " Thus resistance should be within the range 47.00 kohm(+/-) 2.35 Kohm\n", + " or between 44.65 kohm and 49.35 kohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of the resistor\n", + "print '%s' %(\"The specification of the resistor from the color coding table is as follows\")\n", + "print '%s' %(\" 1st_Band 2nd_Band 3rd_Band 4th_Band\")\n", + "print '%s' %(\" Gray Blue Gold Silver\")\n", + "print '%s' %(\" 8 6 10**(-1) (+/-)10%\")\n", + "gray=8. #gray value\n", + "blu=6. #blue value\n", + "gld=10.**-1 #gold value\n", + "sil=10. #silver value in %\n", + "val_res=(gray*10.+blu)*gld\n", + "print '%s %.2f %s %.2f' %(\"\\n The value of resistor is\",val_res, \"ohm (+/-)\",sil)\n", + "sil_ab=0.1 #absolute gold value\n", + "per_val=sil_ab*val_res\n", + "print '%s %.2f %s' %(\"\\n Now, 10%% of 8.6 ohm =\",per_val,\" ohm\")\n", + "range_high=val_res+per_val #higher range\n", + "range_low=val_res-per_val #lower range\n", + "print '%s %.2f %s %.2f %s %.2f %s %.2f %s' %(\"\\n\\n Obviously resistance should lie within the range\",val_res,\"ohm(+/-)\",per_val,\"ohm\\n or between\",range_high,\"ohm and\",range_low,\"ohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specification of the resistor from the color coding table is as follows\n", + " 1st_Band 2nd_Band 3rd_Band 4th_Band\n", + " Gray Blue Gold Silver\n", + " 8 6 10**(-1) (+/-)10%\n", + "\n", + " The value of resistor is 8.60 ohm (+/-) 10.00\n", + "\n", + " Now, 10%% of 8.6 ohm = 0.86 ohm\n", + "\n", + "\n", + " Obviously resistance should lie within the range 8.60 ohm(+/-) 0.86 ohm\n", + " or between 9.46 ohm and 7.74 ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the load voltage and load current\n", + "print '%s' %(\"Refer to the figure 1.53\")\n", + "Vs=2. #supply voltage in V\n", + "Rs=1. #resistance in ohm\n", + "Is=Vs/Rs\n", + "print '%s %.2f %s' %(\"\\n Current Is =\",Is,\" A \\n\")\n", + "print '%s' %(\" Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\")\n", + "print '%s' %(\" Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\")\n", + "RL=1. #load resistance in ohm\n", + "IL=Is*(Rs/(Rs+RL)) #load current using current-divider\n", + "VL=IL*RL #load voltage\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VL,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",IL,\"A \\n\")\n", + "print '%s' %(\"From equation 53(b),using the voltage-divider concept,one obtains\")\n", + "VD_vl=Vs*(RL/(RL+Rs)) #load voltage using voltage divider \n", + "VD_il=VL/RL #load current\n", + "print '%s %.0f %s' %(\"\\n Load voltage =\",VD_vl,\"V\")\n", + "print '%s %.0f %s' %(\"\\n Load current =\",VD_il,\"A \\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.53\n", + "\n", + " Current Is = 2.00 A \n", + "\n", + " Internal resistance remains the same but is now connected in parralel with the current sourceIS,as shown in Figure 1.51(a)\n", + " Now,we connect a load resistance R_L=1 ohm across the terminals of two representations ,and find I_L and V_L. From Figure 1.54(b) and using the current-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n", + "From equation 53(b),using the voltage-divider concept,one obtains\n", + "\n", + " Load voltage = 1 V\n", + "\n", + " Load current = 1 A \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the percentage variation in current, current for two extreme values R_L\n", + "print '%s' %(\"Refer to the figure 1.55\")\n", + "print '%s' %(\"(a) R_L varies from 1 ohm to 10 ohm.\")\n", + "print '%s' %(\"Currents for two extreme values of R_L are\")\n", + "Vs=10. #supply voltage\n", + "RL1=1. #resistance RL1\n", + "Rs=100. #source resistance\n", + "IL1=(Vs/(RL1+Rs))\n", + "RL2=10.\n", + "IL2=(Vs/(RL2+Rs))\n", + "per_var_cur=((IL1-IL2)/IL1)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur,\"\\n\")#answer in the text book took a .3 decimal round off value\n", + "print '%s' %(\" Now,load voltage for the two extreme values of R_L are\")\n", + "VL1=IL1*RL1\n", + "VL2=IL2*RL2\n", + "per_var_vol=((VL2-VL1)/VL2)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_vol,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\")\n", + "print '%s' %(\"Currents for the two extreme values R_L are\")\n", + "RL11=1000.\n", + "IL11=(Vs/(RL11+Rs))\n", + "RL22=10000.\n", + "IL22=(Vs/(RL22+Rs)) #mistake in book value\n", + "per_var_cur11=((IL11-IL22)/IL11)*100.\n", + "print '%s %.2f %s' %(\"\\n Percentage variation in current =\",per_var_cur11,\"\\n\") #mistake in book value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 1.55\n", + "(a) R_L varies from 1 ohm to 10 ohm.\n", + "Currents for two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 8.18 \n", + "\n", + " Now,load voltage for the two extreme values of R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n", + "(b) R_L varies from 1 k-ohm to 10 k-ohm(Figure 1.55(b))\n", + "Currents for the two extreme values R_L are\n", + "\n", + " Percentage variation in current = 89.11 \n", + "\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a0cb850 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_1.ipynb @@ -0,0 +1,296 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:448fe7630f3affc67a26ee31d0d2cd681158ac6be6a5f6e0cd51550e7fad58b6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 - Integrated Circits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 1067" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_1 Pg-1067\n", + "#calculate Pulse width\n", + "print'%s'%(\"Refer to figure 21.10\")\n", + "R=5000. #resistor R in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "tON=tau*R*C #pulse width in sec\n", + "print'%s %.2f'%(\"Pulse width = msec\",tON*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.10\n", + "Pulse width = msec 0.55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 1068" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_2 Pg-1068\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tHIGH=tau*(R1+R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tHIGH*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 2.76\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_3 Pg-1069\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R2=20000. #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tLOW=tau*(R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tLOW*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 1.38\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_4 Pg-1069\n", + "#calculate output frequency\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "f0=1.45/((R1+2.*R2)*C) #output frequency\n", + "print '%s %.2f' %(\"Output frequency = Hz\",f0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output frequency = Hz 241.67\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_5 Pg-1069\n", + "#calculate duty cycle\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "D=(R1+R2)/(R1+2.*R2)*100. #duty cylce\n", + "print '%s %.1f' %(\"Duty cycle =\",D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Duty cycle = 66.7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 1070" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_6 Pg-1070\n", + "#calculate R1 and R2\n", + "C=0.01*10.**(-6.) #capacitance in farad\n", + "f0=2000. #frequency in Hz\n", + "Req=1.45/(f0*C) #equivalent resistance or R1+R2\n", + "print '%s' %(\"Because a square wave has duty cycle of 50% each resistor must be the same\")\n", + "R1=Req/2. \n", + "R2=R1\n", + "print'%s %.2f' %(\"R1 = R2 = kohm\",R2*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Because a square wave has duty cycle of 50% each resistor must be the same\n", + "R1 = R2 = kohm 36.25\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 1073" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_7 Pg-1073\n", + "#calculate pulse width\n", + "R=260000. #resistor R in ohm\n", + "C=25*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "t_delay=tau*R*C #pulse width in sec\n", + "print '%s %.2f' %(\"Pulse width = sec\",t_delay)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse width = sec 7.15\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 1076" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_8 Pg-1076\n", + "#calculate Binary value of 253\n", + "dec=253 #decimal number\n", + "bina=bin(dec) #binary value of 253\n", + "print bina" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0b11111101\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a0cb850 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_2.ipynb @@ -0,0 +1,296 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:448fe7630f3affc67a26ee31d0d2cd681158ac6be6a5f6e0cd51550e7fad58b6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 - Integrated Circits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 1067" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_1 Pg-1067\n", + "#calculate Pulse width\n", + "print'%s'%(\"Refer to figure 21.10\")\n", + "R=5000. #resistor R in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "tON=tau*R*C #pulse width in sec\n", + "print'%s %.2f'%(\"Pulse width = msec\",tON*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.10\n", + "Pulse width = msec 0.55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 1068" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_2 Pg-1068\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tHIGH=tau*(R1+R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tHIGH*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 2.76\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_3 Pg-1069\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R2=20000. #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tLOW=tau*(R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tLOW*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 1.38\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_4 Pg-1069\n", + "#calculate output frequency\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "f0=1.45/((R1+2.*R2)*C) #output frequency\n", + "print '%s %.2f' %(\"Output frequency = Hz\",f0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output frequency = Hz 241.67\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_5 Pg-1069\n", + "#calculate duty cycle\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "D=(R1+R2)/(R1+2.*R2)*100. #duty cylce\n", + "print '%s %.1f' %(\"Duty cycle =\",D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Duty cycle = 66.7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 1070" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_6 Pg-1070\n", + "#calculate R1 and R2\n", + "C=0.01*10.**(-6.) #capacitance in farad\n", + "f0=2000. #frequency in Hz\n", + "Req=1.45/(f0*C) #equivalent resistance or R1+R2\n", + "print '%s' %(\"Because a square wave has duty cycle of 50% each resistor must be the same\")\n", + "R1=Req/2. \n", + "R2=R1\n", + "print'%s %.2f' %(\"R1 = R2 = kohm\",R2*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Because a square wave has duty cycle of 50% each resistor must be the same\n", + "R1 = R2 = kohm 36.25\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 1073" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_7 Pg-1073\n", + "#calculate pulse width\n", + "R=260000. #resistor R in ohm\n", + "C=25*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "t_delay=tau*R*C #pulse width in sec\n", + "print '%s %.2f' %(\"Pulse width = sec\",t_delay)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse width = sec 7.15\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 1076" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_8 Pg-1076\n", + "#calculate Binary value of 253\n", + "dec=253 #decimal number\n", + "bina=bin(dec) #binary value of 253\n", + "print bina" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0b11111101\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6a0cb850 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_21_3.ipynb @@ -0,0 +1,296 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:448fe7630f3affc67a26ee31d0d2cd681158ac6be6a5f6e0cd51550e7fad58b6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 - Integrated Circits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 1067" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_1 Pg-1067\n", + "#calculate Pulse width\n", + "print'%s'%(\"Refer to figure 21.10\")\n", + "R=5000. #resistor R in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "tON=tau*R*C #pulse width in sec\n", + "print'%s %.2f'%(\"Pulse width = msec\",tON*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.10\n", + "Pulse width = msec 0.55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 1068" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_2 Pg-1068\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tHIGH=tau*(R1+R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tHIGH*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 2.76\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_3 Pg-1069\n", + "#calculate time output\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R2=20000. #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "tau=0.69 #time constant\n", + "tLOW=tau*(R2)*C #time output that will remain high\n", + "print '%s %.2f' %(\"Time output = msec\",tLOW*1e3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Time output = msec 1.38\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_4 Pg-1069\n", + "#calculate output frequency\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "C=0.1*10.**(-6.) #capacitance in farad\n", + "f0=1.45/((R1+2.*R2)*C) #output frequency\n", + "print '%s %.2f' %(\"Output frequency = Hz\",f0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output frequency = Hz 241.67\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 1069" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_5 Pg-1069\n", + "#calculate duty cycle\n", + "print '%s' %(\"Refer to figure 21.12\")\n", + "R1=20000. #timing resistor R1 in ohm\n", + "R2=R1 #timing resistor R2 in ohm\n", + "D=(R1+R2)/(R1+2.*R2)*100. #duty cylce\n", + "print '%s %.1f' %(\"Duty cycle =\",D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to figure 21.12\n", + "Duty cycle = 66.7\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 1070" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_6 Pg-1070\n", + "#calculate R1 and R2\n", + "C=0.01*10.**(-6.) #capacitance in farad\n", + "f0=2000. #frequency in Hz\n", + "Req=1.45/(f0*C) #equivalent resistance or R1+R2\n", + "print '%s' %(\"Because a square wave has duty cycle of 50% each resistor must be the same\")\n", + "R1=Req/2. \n", + "R2=R1\n", + "print'%s %.2f' %(\"R1 = R2 = kohm\",R2*1e-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Because a square wave has duty cycle of 50% each resistor must be the same\n", + "R1 = R2 = kohm 36.25\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 1073" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_7 Pg-1073\n", + "#calculate pulse width\n", + "R=260000. #resistor R in ohm\n", + "C=25*10.**(-6.) #capacitance in farad\n", + "tau=1.1 #time constant\n", + "t_delay=tau*R*C #pulse width in sec\n", + "print '%s %.2f' %(\"Pulse width = sec\",t_delay)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse width = sec 7.15\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 1076" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex21_8 Pg-1076\n", + "#calculate Binary value of 253\n", + "dec=253 #decimal number\n", + "bina=bin(dec) #binary value of 253\n", + "print bina" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0b11111101\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..1250b8e1 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_1.ipynb @@ -0,0 +1,515 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2998b80611e837f1cd7db034c5dd373d5c43fb4268c911031e23c03a219462da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate Conductivity of pure silicon crystal\n", + "print '%s' %(\"Conductivity of pure silicon crystal is given by\")\n", + "print '%s' %(\" sigma = ni*e*(ue + uh)\")\n", + "uh=480. #mobility in cm**2/Volt-sec\n", + "ue=1350. #mobility of electrons in cm**2/Volt-sec\n", + "e=1.6*10.**(-19.) #electron charge\n", + "ni=1.072*10.**10. #density of electron hole\n", + "sigma_i=ni*e*(uh+ue) #conductivity of silicon\n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \\n\",sigma_i)\n", + "print '%s' %(\"Resistivity of silicon is given by\")\n", + "rho=1./sigma_i #resistivity of silicon\n", + "print '%s %.2f' %(\"\\n Resistivity of pure silicon crystal = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of pure silicon crystal is given by\n", + " sigma = ni*e*(ue + uh)\n", + "\n", + " Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \n", + " 0.00\n", + "Resistivity of silicon is given by\n", + "\n", + " Resistivity of pure silicon crystal = %.0f ohm-cm \n", + " 318591.47\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_2 Pg-87\n", + "#calculate Conductivity of pure silicon crystal, Resistivity of pure phosphorous\n", + "print '%s' %(\"sigma = u*e*n\")\n", + "u=1200. #mobility\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=10.**13. #phosphorous concentration\n", + "sigma=u*e*n #conductivity \n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \\n\",sigma)\n", + "rho=1./sigma #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity of pure phosphorous = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma = u*e*n\n", + "\n", + " Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \n", + " 0.00\n", + "\n", + " Resistivity of pure phosphorous = %.0f ohm-cm \n", + " 520.83\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_4 Pg-88\n", + "#calculate the ratio of n_p/n_i\n", + "print '%s' %(\"(n_i)**2 = n*p = n_p*N_a\")\n", + "ni=2.5*10.**19. #density of electron hole\n", + "Na=1.1*10.**20. #acceptor density\n", + "np=(ni**2.)/Na\n", + "N=np/ni \n", + "print '%s %.2f' %(\"\\n The ratio of n_p/n_i = %.4f\",N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(n_i)**2 = n*p = n_p*N_a\n", + "\n", + " The ratio of n_p/n_i = %.4f 0.23\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_5 Pg-88\n", + "#calculate number density of donor atoms\n", + "print '%s' %(\"sigma_n = u_n*e*N_d\")\n", + "e=1.6*1e-19 #electron charge\n", + "sigma=5. #conductivity in mho/cm\n", + "un=3850. #mobility of electrons\n", + "Nd=sigma/(e*un) #concentration\n", + "print '%s %.2f' %(\"Number density of donor atoms = %.1f*1e16 per cm**3\",Nd*1e-16)\n", + "#the answer in the book is wrong the correct answer is 0.8*1e16 per cm**3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma_n = u_n*e*N_d\n", + "Number density of donor atoms = %.1f*1e16 per cm**3 0.81\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_6 Pg-88\n", + "#calculate Eg\n", + "print '%s' %(\"We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\\nFor Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\\nEnergy gap decreases with increase in temperature which is represented by the expression.\\nObviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\\n\")\n", + "print '%s' %(\"Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\")\n", + "T=1000. #temperature\n", + "Eg=1.21 - 3.6*10**(-4)*T\n", + "print '%s %.2f %s' %(\"\\nEg(1000)=\",1.21 - 3.6*10**(-4)*T,\"eV\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\n", + "For Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\n", + "Energy gap decreases with increase in temperature which is represented by the expression.\n", + "Obviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\n", + "\n", + "Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\n", + "\n", + "Eg(1000)= 0.85 eV\n", + "\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_7 Pg-88\n", + "#calculate Avg relaxation time of electrons\n", + "print '%s' %(\"Relaxation time in terms of mobility is given by\")\n", + "print '%s' %(\"t=m*u/e\")\n", + "print '%s' %(\"\\n\\nTaking effective mass of electron an holes in consideration,\\nrelaxation time is given by\\n\")\n", + "print '%s' %(\"t=m_star*u/e\")\n", + "print '%s' %(\"(a)For electrons,m_star = 0.259*m_0\")\n", + "m0=9.1*10.**(-31.) \n", + "ue=0.135 #mobility of electrons\n", + "e=1.6*10.**(-19.) #electron charge\n", + "t_e=(0.259*m0*ue)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_e*1e13,\"*1e-13 secs\\n\")\n", + "uh=0.048 #mobility of holes\n", + "print '%s' %(\"(b)For holes in the valance band,m=0.537*m_0\")\n", + "t_h=(0.537*m0*uh)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_h*1e13,\"*1e-13 secs\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation time in terms of mobility is given by\n", + "t=m*u/e\n", + "\n", + "\n", + "Taking effective mass of electron an holes in consideration,\n", + "relaxation time is given by\n", + "\n", + "t=m_star*u/e\n", + "(a)For electrons,m_star = 0.259*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.99 *1e-13 secs\n", + "\n", + "(b)For holes in the valance band,m=0.537*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.47 *1e-13 secs\n", + "\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_8 Pg-89\n", + "#calculation of Total conduction current density\n", + "import math\n", + "print '%s' %(\"Conductivity of an intrinsic material is given by \")\n", + "print '%s' %(\"sigma = e*ni*un*(1+up/un)\")\n", + "sigma_i=100./60. \n", + "ni=2.5*10.**19. #concentration of intrinsic carrier in m**3\n", + "up_un=0.5\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=(sigma_i/(e*ni*(1+(up_un)))) #concentration of electrons\n", + "up=un/2. #holes concentratin\n", + "print '%s' %(\"Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\")\n", + "print '%s' %(\"Nd + p = Na + n\")\n", + "print '%s' %(\"Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\")\n", + "print '%s' %(\"Nd + (ni**2)/n = Na + n\")\n", + "print '%s' %(\"or n**2 + (Na-Nd)*n-ni**2 = 0\")\n", + "print '%s' %(\"or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\")\n", + "print '%s' %(\"n is positive and hence we can drop negative sign before the radical\")\n", + "Nd=10.**20. #number density of donor atoms /m**3\n", + "Na=5.*10.**19. #number of acceptor atoms in /m**3\n", + "n=0.5*((Nd-Na)+ math.sqrt((Nd-Na)**2 + 4*ni**2)) #electron concentration for doped sample\n", + "p=ni**2./n #hole concentration for doped sample\n", + "conduct_doped=e*(n*un+p*up) #conductivity of doped sample(value in textbook is wrong)\n", + "print '%s %.2f' %(\"\\n Conductivity of doped sample = %.2f S/m \\n\",conduct_doped)\n", + "\n", + "print '%s' %(\"We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\")\n", + "print '%s' %(\"Applied electric field\")\n", + "\n", + "F_cm=2. #applied electric field in V/cm\n", + "F_m=2.*100. #applied electric field in V/m\n", + "J=conduct_doped*F_m #total conduction current density\n", + "J_cm=J/1000. #cm**2 to m**2s\n", + "\n", + "print '%s %.2f' %(\"Total conduction current density = %.0f A/m**2\",J) \n", + "print '%s %.2f' %(\"\\n = %.2f A/cm**2\",J_cm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of an intrinsic material is given by \n", + "sigma = e*ni*un*(1+up/un)\n", + "Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\n", + "Nd + p = Na + n\n", + "Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\n", + "Nd + (ni**2)/n = Na + n\n", + "or n**2 + (Na-Nd)*n-ni**2 = 0\n", + "or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\n", + "n is positive and hence we can drop negative sign before the radical\n", + "\n", + " Conductivity of doped sample = %.2f S/m \n", + " 2.91\n", + "We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\n", + "Applied electric field\n", + "Total conduction current density = %.0f A/m**2 582.52\n", + "\n", + " = %.2f A/cm**2 0.58\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_9 Pg-91\n", + "print '%s' %(\"For P-type,Nd=0. By charge neutrality and mass action law,\")\n", + "print '%s' %(\" p + Nd = p = +na = (ni)**2/n\")\n", + "print '%s' %(\"or n**2 + Na*n - (ni)**2 = 0\")\n", + "print '%s' %(\"Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\")\n", + "print '%s' %(\" n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\")\n", + "print '%s' %(\"Knowing n,one obtains from mass action law p = ni**2/n\")\n", + "print '%s' %(\"For N-type doping,Na=0. By analogous procedure,\")\n", + "print '%s' %(\" p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For P-type,Nd=0. By charge neutrality and mass action law,\n", + " p + Nd = p = +na = (ni)**2/n\n", + "or n**2 + Na*n - (ni)**2 = 0\n", + "Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\n", + " n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\n", + "Knowing n,one obtains from mass action law p = ni**2/n\n", + "For N-type doping,Na=0. By analogous procedure,\n", + " p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_10 Pg-91\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=700. #mobility of silicon\n", + "n=10**17. #concentration of phosphorous atoms\n", + "sigma=e*un*n #conductivity\n", + "print '%s %.2f' %(\"Conductivity = %.1f (ohm-cm)**-1\",sigma)\n", + "res=sigma**(-1) #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity = %.4f ohm-cm\",res)\n", + "Rh=-(e*n)**(-1) #hall coefficient\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.1f cm**3/C\",Rh)\n", + "Ix=10**-3. \n", + "Bz=10**(-5.) \n", + "x=10**(-2.)\n", + "Vh=(Ix*Bz*Rh)/x\n", + "print '%s %.2f' %(\"\\n Hall Volage = %.1f uV\",Vh*10.**6.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity = %.1f (ohm-cm)**-1 11.20\n", + "\n", + " Resistivity = %.4f ohm-cm 0.09\n", + "\n", + " Hall coefficient = %.1f cm**3/C -62.50\n", + "\n", + " Hall Volage = %.1f uV -62.50\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_11 Pg-91\n", + "print '%s' %(\"(a) Hall coefficient is\")\n", + "print '%s' %(\"Rh = Eh/(Jx*B)\")\n", + "Vh=21.4*10.**(-3.) #hall voltage\n", + "b=1.7*10.**(-2.) #breadth\n", + "Eh=Vh/b #electric field\n", + "t=0.052*10.**(-3.) #thickness\n", + "I=200*10.**(-6.) #current\n", + "Jx=I/(b*t) #current density\n", + "B=0.5 #magnetic field\n", + "Rh=Eh/(Jx*B)\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.6f m**3/C \\n\\n\",Rh)\n", + "\n", + "print '%s' %(\"(b) Electrons per unit volume,\")\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=1/(Rh*e) #electrons per unit volume\n", + "print '%s %.2f' %(\"\\n\\n Electrons per unit volume = %.0f electrons/m**3 \\n\\n\",n)\n", + "V=195.*10.**(-3.) #voltage\n", + "I=200.*10.**(-6.) #current \n", + "R=V/I #resistance\n", + "print '%s' %(\"Since R=(l/(A*sigma) = (l/(A*e*n*R))\")\n", + "l=2.65*10.**(-2.) #length\n", + "w=1.7*10.**(-2.) #width\n", + "t=0.052*10.**(-3.) #thicknes\n", + "A=t*w #area\n", + "sigma=l/(A*e*n*R) #conductivity\n", + "print '%s %.2f' %(\"\\n\\n Conductivity = %.3f m**3/Vs\",sigma)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Hall coefficient is\n", + "Rh = Eh/(Jx*B)\n", + "\n", + " Hall coefficient = %.6f m**3/C \n", + "\n", + " 0.01\n", + "(b) Electrons per unit volume,\n", + "\n", + "\n", + " Electrons per unit volume = %.0f electrons/m**3 \n", + "\n", + " 561646297627606056960.00\n", + "Since R=(l/(A*sigma) = (l/(A*e*n*R))\n", + "\n", + "\n", + " Conductivity = %.3f m**3/Vs 0.34\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..10a03cd7 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_2.ipynb @@ -0,0 +1,515 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:553ed0bdcad0d42e6fbf264c6ca8491f3d6465fe1d96c2874ece02c52e9b1c4a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate Conductivity of pure silicon crystal\n", + "print '%s' %(\"Conductivity of pure silicon crystal is given by\")\n", + "print '%s' %(\" sigma = ni*e*(ue + uh)\")\n", + "uh=480. #mobility in cm**2/Volt-sec\n", + "ue=1350. #mobility of electrons in cm**2/Volt-sec\n", + "e=1.6*10.**(-19.) #electron charge\n", + "ni=1.072*10.**10. #density of electron hole\n", + "sigma_i=ni*e*(uh+ue) #conductivity of silicon\n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \\n\",sigma_i)\n", + "print '%s' %(\"Resistivity of silicon is given by\")\n", + "rho=1./sigma_i #resistivity of silicon\n", + "print '%s %.2f' %(\"\\n Resistivity of pure silicon crystal = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of pure silicon crystal is given by\n", + " sigma = ni*e*(ue + uh)\n", + "\n", + " Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \n", + " 0.00\n", + "Resistivity of silicon is given by\n", + "\n", + " Resistivity of pure silicon crystal = %.0f ohm-cm \n", + " 318591.47\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_2 Pg-87\n", + "#calculate Conductivity of pure silicon crystal, Resistivity of pure phosphorous\n", + "print '%s' %(\"sigma = u*e*n\")\n", + "u=1200. #mobility\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=10.**13. #phosphorous concentration\n", + "sigma=u*e*n #conductivity \n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \\n\",sigma)\n", + "rho=1./sigma #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity of pure phosphorous = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma = u*e*n\n", + "\n", + " Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \n", + " 0.00\n", + "\n", + " Resistivity of pure phosphorous = %.0f ohm-cm \n", + " 520.83\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_4 Pg-88\n", + "#calculate the ratio of n_p/n_i\n", + "print '%s' %(\"(n_i)**2 = n*p = n_p*N_a\")\n", + "ni=2.5*10.**19. #density of electron hole\n", + "Na=1.1*10.**20. #acceptor density\n", + "np=(ni**2.)/Na\n", + "N=np/ni \n", + "print '%s %.2f' %(\"\\n The ratio of n_p/n_i = %.4f\",N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(n_i)**2 = n*p = n_p*N_a\n", + "\n", + " The ratio of n_p/n_i = %.4f 0.23\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_5 Pg-88\n", + "#calculate number density of donor atoms\n", + "print '%s' %(\"sigma_n = u_n*e*N_d\")\n", + "e=1.6*1e-19 #electron charge\n", + "sigma=5. #conductivity in mho/cm\n", + "un=3850. #mobility of electrons\n", + "Nd=sigma/(e*un) #concentration\n", + "print '%s %.2f' %(\"Number density of donor atoms = %.1f*1e16 per cm**3\",Nd*1e-16)\n", + "#the answer in the book is wrong the correct answer is 0.8*1e16 per cm**3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma_n = u_n*e*N_d\n", + "Number density of donor atoms = %.1f*1e16 per cm**3 0.81\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_6 Pg-88\n", + "#calculate Eg\n", + "print '%s' %(\"We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\\nFor Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\\nEnergy gap decreases with increase in temperature which is represented by the expression.\\nObviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\\n\")\n", + "print '%s' %(\"Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\")\n", + "T=1000. #temperature\n", + "Eg=1.21 - 3.6*10**(-4)*T\n", + "print '%s %.2f %s' %(\"\\nEg(1000)=\",1.21 - 3.6*10**(-4)*T,\"eV\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\n", + "For Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\n", + "Energy gap decreases with increase in temperature which is represented by the expression.\n", + "Obviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\n", + "\n", + "Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\n", + "\n", + "Eg(1000)= 0.85 eV\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_7 Pg-88\n", + "#calculate Avg relaxation time of electrons\n", + "print '%s' %(\"Relaxation time in terms of mobility is given by\")\n", + "print '%s' %(\"t=m*u/e\")\n", + "print '%s' %(\"\\n\\nTaking effective mass of electron an holes in consideration,\\nrelaxation time is given by\\n\")\n", + "print '%s' %(\"t=m_star*u/e\")\n", + "print '%s' %(\"(a)For electrons,m_star = 0.259*m_0\")\n", + "m0=9.1*10.**(-31.) \n", + "ue=0.135 #mobility of electrons\n", + "e=1.6*10.**(-19.) #electron charge\n", + "t_e=(0.259*m0*ue)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_e*1e13,\"*1e-13 secs\\n\")\n", + "uh=0.048 #mobility of holes\n", + "print '%s' %(\"(b)For holes in the valance band,m=0.537*m_0\")\n", + "t_h=(0.537*m0*uh)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_h*1e13,\"*1e-13 secs\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation time in terms of mobility is given by\n", + "t=m*u/e\n", + "\n", + "\n", + "Taking effective mass of electron an holes in consideration,\n", + "relaxation time is given by\n", + "\n", + "t=m_star*u/e\n", + "(a)For electrons,m_star = 0.259*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.99 *1e-13 secs\n", + "\n", + "(b)For holes in the valance band,m=0.537*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.47 *1e-13 secs\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_8 Pg-89\n", + "#calculation of Total conduction current density\n", + "import math\n", + "print '%s' %(\"Conductivity of an intrinsic material is given by \")\n", + "print '%s' %(\"sigma = e*ni*un*(1+up/un)\")\n", + "sigma_i=100./60. \n", + "ni=2.5*10.**19. #concentration of intrinsic carrier in m**3\n", + "up_un=0.5\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=(sigma_i/(e*ni*(1+(up_un)))) #concentration of electrons\n", + "up=un/2. #holes concentratin\n", + "print '%s' %(\"Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\")\n", + "print '%s' %(\"Nd + p = Na + n\")\n", + "print '%s' %(\"Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\")\n", + "print '%s' %(\"Nd + (ni**2)/n = Na + n\")\n", + "print '%s' %(\"or n**2 + (Na-Nd)*n-ni**2 = 0\")\n", + "print '%s' %(\"or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\")\n", + "print '%s' %(\"n is positive and hence we can drop negative sign before the radical\")\n", + "Nd=10.**20. #number density of donor atoms /m**3\n", + "Na=5.*10.**19. #number of acceptor atoms in /m**3\n", + "n=0.5*((Nd-Na)+ math.sqrt((Nd-Na)**2 + 4*ni**2)) #electron concentration for doped sample\n", + "p=ni**2./n #hole concentration for doped sample\n", + "conduct_doped=e*(n*un+p*up) #conductivity of doped sample(value in textbook is wrong)\n", + "print '%s %.2f' %(\"\\n Conductivity of doped sample = %.2f S/m \\n\",conduct_doped)\n", + "\n", + "print '%s' %(\"We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\")\n", + "print '%s' %(\"Applied electric field\")\n", + "\n", + "F_cm=2. #applied electric field in V/cm\n", + "F_m=2.*100. #applied electric field in V/m\n", + "J=conduct_doped*F_m #total conduction current density\n", + "J_cm=J/1000. #cm**2 to m**2s\n", + "\n", + "print '%s %.2f' %(\"Total conduction current density = %.0f A/m**2\",J) \n", + "print '%s %.2f' %(\"\\n = %.2f A/cm**2\",J_cm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of an intrinsic material is given by \n", + "sigma = e*ni*un*(1+up/un)\n", + "Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\n", + "Nd + p = Na + n\n", + "Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\n", + "Nd + (ni**2)/n = Na + n\n", + "or n**2 + (Na-Nd)*n-ni**2 = 0\n", + "or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\n", + "n is positive and hence we can drop negative sign before the radical\n", + "\n", + " Conductivity of doped sample = %.2f S/m \n", + " 2.91\n", + "We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\n", + "Applied electric field\n", + "Total conduction current density = %.0f A/m**2 582.52\n", + "\n", + " = %.2f A/cm**2 0.58\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_9 Pg-91\n", + "print '%s' %(\"For P-type,Nd=0. By charge neutrality and mass action law,\")\n", + "print '%s' %(\" p + Nd = p = +na = (ni)**2/n\")\n", + "print '%s' %(\"or n**2 + Na*n - (ni)**2 = 0\")\n", + "print '%s' %(\"Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\")\n", + "print '%s' %(\" n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\")\n", + "print '%s' %(\"Knowing n,one obtains from mass action law p = ni**2/n\")\n", + "print '%s' %(\"For N-type doping,Na=0. By analogous procedure,\")\n", + "print '%s' %(\" p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For P-type,Nd=0. By charge neutrality and mass action law,\n", + " p + Nd = p = +na = (ni)**2/n\n", + "or n**2 + Na*n - (ni)**2 = 0\n", + "Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\n", + " n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\n", + "Knowing n,one obtains from mass action law p = ni**2/n\n", + "For N-type doping,Na=0. By analogous procedure,\n", + " p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_10 Pg-91\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=700. #mobility of silicon\n", + "n=10**17. #concentration of phosphorous atoms\n", + "sigma=e*un*n #conductivity\n", + "print '%s %.2f' %(\"Conductivity = %.1f (ohm-cm)**-1\",sigma)\n", + "res=sigma**(-1) #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity = %.4f ohm-cm\",res)\n", + "Rh=-(e*n)**(-1) #hall coefficient\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.1f cm**3/C\",Rh)\n", + "Ix=10**-3. \n", + "Bz=10**(-5.) \n", + "x=10**(-2.)\n", + "Vh=(Ix*Bz*Rh)/x\n", + "print '%s %.2f' %(\"\\n Hall Volage = %.1f uV\",Vh*10.**6.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity = %.1f (ohm-cm)**-1 11.20\n", + "\n", + " Resistivity = %.4f ohm-cm 0.09\n", + "\n", + " Hall coefficient = %.1f cm**3/C -62.50\n", + "\n", + " Hall Volage = %.1f uV -62.50\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_11 Pg-91\n", + "print '%s' %(\"(a) Hall coefficient is\")\n", + "print '%s' %(\"Rh = Eh/(Jx*B)\")\n", + "Vh=21.4*10.**(-3.) #hall voltage\n", + "b=1.7*10.**(-2.) #breadth\n", + "Eh=Vh/b #electric field\n", + "t=0.052*10.**(-3.) #thickness\n", + "I=200*10.**(-6.) #current\n", + "Jx=I/(b*t) #current density\n", + "B=0.5 #magnetic field\n", + "Rh=Eh/(Jx*B)\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.6f m**3/C \\n\\n\",Rh)\n", + "\n", + "print '%s' %(\"(b) Electrons per unit volume,\")\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=1/(Rh*e) #electrons per unit volume\n", + "print '%s %.2f' %(\"\\n\\n Electrons per unit volume = %.0f electrons/m**3 \\n\\n\",n)\n", + "V=195.*10.**(-3.) #voltage\n", + "I=200.*10.**(-6.) #current \n", + "R=V/I #resistance\n", + "print '%s' %(\"Since R=(l/(A*sigma) = (l/(A*e*n*R))\")\n", + "l=2.65*10.**(-2.) #length\n", + "w=1.7*10.**(-2.) #width\n", + "t=0.052*10.**(-3.) #thicknes\n", + "A=t*w #area\n", + "sigma=l/(A*e*n*R) #conductivity\n", + "print '%s %.2f' %(\"\\n\\n Conductivity = %.3f m**3/Vs\",sigma)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Hall coefficient is\n", + "Rh = Eh/(Jx*B)\n", + "\n", + " Hall coefficient = %.6f m**3/C \n", + "\n", + " 0.01\n", + "(b) Electrons per unit volume,\n", + "\n", + "\n", + " Electrons per unit volume = %.0f electrons/m**3 \n", + "\n", + " 561646297627606056960.00\n", + "Since R=(l/(A*sigma) = (l/(A*e*n*R))\n", + "\n", + "\n", + " Conductivity = %.3f m**3/Vs 0.34\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..10a03cd7 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_2_3.ipynb @@ -0,0 +1,515 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:553ed0bdcad0d42e6fbf264c6ca8491f3d6465fe1d96c2874ece02c52e9b1c4a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 - Semiconductor Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate Conductivity of pure silicon crystal\n", + "print '%s' %(\"Conductivity of pure silicon crystal is given by\")\n", + "print '%s' %(\" sigma = ni*e*(ue + uh)\")\n", + "uh=480. #mobility in cm**2/Volt-sec\n", + "ue=1350. #mobility of electrons in cm**2/Volt-sec\n", + "e=1.6*10.**(-19.) #electron charge\n", + "ni=1.072*10.**10. #density of electron hole\n", + "sigma_i=ni*e*(uh+ue) #conductivity of silicon\n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \\n\",sigma_i)\n", + "print '%s' %(\"Resistivity of silicon is given by\")\n", + "rho=1./sigma_i #resistivity of silicon\n", + "print '%s %.2f' %(\"\\n Resistivity of pure silicon crystal = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of pure silicon crystal is given by\n", + " sigma = ni*e*(ue + uh)\n", + "\n", + " Conductivity of pure silicon crystal = %.8f ohm**(-1)/cm \n", + " 0.00\n", + "Resistivity of silicon is given by\n", + "\n", + " Resistivity of pure silicon crystal = %.0f ohm-cm \n", + " 318591.47\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_2 Pg-87\n", + "#calculate Conductivity of pure silicon crystal, Resistivity of pure phosphorous\n", + "print '%s' %(\"sigma = u*e*n\")\n", + "u=1200. #mobility\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=10.**13. #phosphorous concentration\n", + "sigma=u*e*n #conductivity \n", + "print '%s %.2f' %(\"\\n Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \\n\",sigma)\n", + "rho=1./sigma #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity of pure phosphorous = %.0f ohm-cm \\n\",rho)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma = u*e*n\n", + "\n", + " Conductivity of pure silicon crystal = %.5f ohm**(-1)/cm \n", + " 0.00\n", + "\n", + " Resistivity of pure phosphorous = %.0f ohm-cm \n", + " 520.83\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_4 Pg-88\n", + "#calculate the ratio of n_p/n_i\n", + "print '%s' %(\"(n_i)**2 = n*p = n_p*N_a\")\n", + "ni=2.5*10.**19. #density of electron hole\n", + "Na=1.1*10.**20. #acceptor density\n", + "np=(ni**2.)/Na\n", + "N=np/ni \n", + "print '%s %.2f' %(\"\\n The ratio of n_p/n_i = %.4f\",N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(n_i)**2 = n*p = n_p*N_a\n", + "\n", + " The ratio of n_p/n_i = %.4f 0.23\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_5 Pg-88\n", + "#calculate number density of donor atoms\n", + "print '%s' %(\"sigma_n = u_n*e*N_d\")\n", + "e=1.6*1e-19 #electron charge\n", + "sigma=5. #conductivity in mho/cm\n", + "un=3850. #mobility of electrons\n", + "Nd=sigma/(e*un) #concentration\n", + "print '%s %.2f' %(\"Number density of donor atoms = %.1f*1e16 per cm**3\",Nd*1e-16)\n", + "#the answer in the book is wrong the correct answer is 0.8*1e16 per cm**3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigma_n = u_n*e*N_d\n", + "Number density of donor atoms = %.1f*1e16 per cm**3 0.81\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_6 Pg-88\n", + "#calculate Eg\n", + "print '%s' %(\"We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\\nFor Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\\nEnergy gap decreases with increase in temperature which is represented by the expression.\\nObviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\\n\")\n", + "print '%s' %(\"Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\")\n", + "T=1000. #temperature\n", + "Eg=1.21 - 3.6*10**(-4)*T\n", + "print '%s %.2f %s' %(\"\\nEg(1000)=\",1.21 - 3.6*10**(-4)*T,\"eV\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know forbidden energy gap between conduction and valence bands for a semiconductor is nearly 1 eV.\n", + "For Ge and Si,energy gap is 0.785 eV and 1.21 eV respectively at 0K.\n", + "Energy gap decreases with increase in temperature which is represented by the expression.\n", + "Obviously, Si and Ge will remain semiconductors at 1000K ambient temperature.\n", + "\n", + "Eg(T) = 1.21 - 3.6*10**(-4)*T (For Si)\n", + "\n", + "Eg(1000)= 0.85 eV\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_7 Pg-88\n", + "#calculate Avg relaxation time of electrons\n", + "print '%s' %(\"Relaxation time in terms of mobility is given by\")\n", + "print '%s' %(\"t=m*u/e\")\n", + "print '%s' %(\"\\n\\nTaking effective mass of electron an holes in consideration,\\nrelaxation time is given by\\n\")\n", + "print '%s' %(\"t=m_star*u/e\")\n", + "print '%s' %(\"(a)For electrons,m_star = 0.259*m_0\")\n", + "m0=9.1*10.**(-31.) \n", + "ue=0.135 #mobility of electrons\n", + "e=1.6*10.**(-19.) #electron charge\n", + "t_e=(0.259*m0*ue)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_e*1e13,\"*1e-13 secs\\n\")\n", + "uh=0.048 #mobility of holes\n", + "print '%s' %(\"(b)For holes in the valance band,m=0.537*m_0\")\n", + "t_h=(0.537*m0*uh)/e\n", + "print '%s %.2f %s' %(\"\\nAverage relaxation time of eletrons =\",t_h*1e13,\"*1e-13 secs\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation time in terms of mobility is given by\n", + "t=m*u/e\n", + "\n", + "\n", + "Taking effective mass of electron an holes in consideration,\n", + "relaxation time is given by\n", + "\n", + "t=m_star*u/e\n", + "(a)For electrons,m_star = 0.259*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.99 *1e-13 secs\n", + "\n", + "(b)For holes in the valance band,m=0.537*m_0\n", + "\n", + "Average relaxation time of eletrons = 1.47 *1e-13 secs\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_8 Pg-89\n", + "#calculation of Total conduction current density\n", + "import math\n", + "print '%s' %(\"Conductivity of an intrinsic material is given by \")\n", + "print '%s' %(\"sigma = e*ni*un*(1+up/un)\")\n", + "sigma_i=100./60. \n", + "ni=2.5*10.**19. #concentration of intrinsic carrier in m**3\n", + "up_un=0.5\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=(sigma_i/(e*ni*(1+(up_un)))) #concentration of electrons\n", + "up=un/2. #holes concentratin\n", + "print '%s' %(\"Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\")\n", + "print '%s' %(\"Nd + p = Na + n\")\n", + "print '%s' %(\"Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\")\n", + "print '%s' %(\"Nd + (ni**2)/n = Na + n\")\n", + "print '%s' %(\"or n**2 + (Na-Nd)*n-ni**2 = 0\")\n", + "print '%s' %(\"or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\")\n", + "print '%s' %(\"n is positive and hence we can drop negative sign before the radical\")\n", + "Nd=10.**20. #number density of donor atoms /m**3\n", + "Na=5.*10.**19. #number of acceptor atoms in /m**3\n", + "n=0.5*((Nd-Na)+ math.sqrt((Nd-Na)**2 + 4*ni**2)) #electron concentration for doped sample\n", + "p=ni**2./n #hole concentration for doped sample\n", + "conduct_doped=e*(n*un+p*up) #conductivity of doped sample(value in textbook is wrong)\n", + "print '%s %.2f' %(\"\\n Conductivity of doped sample = %.2f S/m \\n\",conduct_doped)\n", + "\n", + "print '%s' %(\"We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\")\n", + "print '%s' %(\"Applied electric field\")\n", + "\n", + "F_cm=2. #applied electric field in V/cm\n", + "F_m=2.*100. #applied electric field in V/m\n", + "J=conduct_doped*F_m #total conduction current density\n", + "J_cm=J/1000. #cm**2 to m**2s\n", + "\n", + "print '%s %.2f' %(\"Total conduction current density = %.0f A/m**2\",J) \n", + "print '%s %.2f' %(\"\\n = %.2f A/cm**2\",J_cm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of an intrinsic material is given by \n", + "sigma = e*ni*un*(1+up/un)\n", + "Let n be eletron concentration and p be hole con-centration for doped sample. Sincethe sample is electrically neutral,we have\n", + "Nd + p = Na + n\n", + "Where Nd is donor concentration and Na is acceptor concentration,assumed to be fully ionized. From mass action law,we have np =ni**2*S0\n", + "Nd + (ni**2)/n = Na + n\n", + "or n**2 + (Na-Nd)*n-ni**2 = 0\n", + "or n=0.5*([Nd-N])(+/-) sqrt(Nd-Na)**2 + 4*ni**2)\n", + "n is positive and hence we can drop negative sign before the radical\n", + "\n", + " Conductivity of doped sample = %.2f S/m \n", + " 2.91\n", + "We have assumed that carrier mobilities in the doped signal sample are the same as those in the intrinsic material.This assumption is justified by the low doping level, and Coulomb scaterring Applied by the ionized impurities is weak at 300K.\n", + "Applied electric field\n", + "Total conduction current density = %.0f A/m**2 582.52\n", + "\n", + " = %.2f A/cm**2 0.58\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_9 Pg-91\n", + "print '%s' %(\"For P-type,Nd=0. By charge neutrality and mass action law,\")\n", + "print '%s' %(\" p + Nd = p = +na = (ni)**2/n\")\n", + "print '%s' %(\"or n**2 + Na*n - (ni)**2 = 0\")\n", + "print '%s' %(\"Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\")\n", + "print '%s' %(\" n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\")\n", + "print '%s' %(\"Knowing n,one obtains from mass action law p = ni**2/n\")\n", + "print '%s' %(\"For N-type doping,Na=0. By analogous procedure,\")\n", + "print '%s' %(\" p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For P-type,Nd=0. By charge neutrality and mass action law,\n", + " p + Nd = p = +na = (ni)**2/n\n", + "or n**2 + Na*n - (ni)**2 = 0\n", + "Solving the quadratic equation for n and discharging the extraneous negative root,one obtains\n", + " n = 0.5*(-Na + sqrt(Na**2 + 4*ni**2))\n", + "Knowing n,one obtains from mass action law p = ni**2/n\n", + "For N-type doping,Na=0. By analogous procedure,\n", + " p = 0.5*(-Nd +sqrt(Nd**2 + 4*Ni**2)); n=ni**2/p\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_10 Pg-91\n", + "e=1.6*10.**(-19.) #electron charge\n", + "un=700. #mobility of silicon\n", + "n=10**17. #concentration of phosphorous atoms\n", + "sigma=e*un*n #conductivity\n", + "print '%s %.2f' %(\"Conductivity = %.1f (ohm-cm)**-1\",sigma)\n", + "res=sigma**(-1) #resistivity\n", + "print '%s %.2f' %(\"\\n Resistivity = %.4f ohm-cm\",res)\n", + "Rh=-(e*n)**(-1) #hall coefficient\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.1f cm**3/C\",Rh)\n", + "Ix=10**-3. \n", + "Bz=10**(-5.) \n", + "x=10**(-2.)\n", + "Vh=(Ix*Bz*Rh)/x\n", + "print '%s %.2f' %(\"\\n Hall Volage = %.1f uV\",Vh*10.**6.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity = %.1f (ohm-cm)**-1 11.20\n", + "\n", + " Resistivity = %.4f ohm-cm 0.09\n", + "\n", + " Hall coefficient = %.1f cm**3/C -62.50\n", + "\n", + " Hall Volage = %.1f uV -62.50\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex2_11 Pg-91\n", + "print '%s' %(\"(a) Hall coefficient is\")\n", + "print '%s' %(\"Rh = Eh/(Jx*B)\")\n", + "Vh=21.4*10.**(-3.) #hall voltage\n", + "b=1.7*10.**(-2.) #breadth\n", + "Eh=Vh/b #electric field\n", + "t=0.052*10.**(-3.) #thickness\n", + "I=200*10.**(-6.) #current\n", + "Jx=I/(b*t) #current density\n", + "B=0.5 #magnetic field\n", + "Rh=Eh/(Jx*B)\n", + "print '%s %.2f' %(\"\\n Hall coefficient = %.6f m**3/C \\n\\n\",Rh)\n", + "\n", + "print '%s' %(\"(b) Electrons per unit volume,\")\n", + "e=1.6*10.**(-19.) #electron charge\n", + "n=1/(Rh*e) #electrons per unit volume\n", + "print '%s %.2f' %(\"\\n\\n Electrons per unit volume = %.0f electrons/m**3 \\n\\n\",n)\n", + "V=195.*10.**(-3.) #voltage\n", + "I=200.*10.**(-6.) #current \n", + "R=V/I #resistance\n", + "print '%s' %(\"Since R=(l/(A*sigma) = (l/(A*e*n*R))\")\n", + "l=2.65*10.**(-2.) #length\n", + "w=1.7*10.**(-2.) #width\n", + "t=0.052*10.**(-3.) #thicknes\n", + "A=t*w #area\n", + "sigma=l/(A*e*n*R) #conductivity\n", + "print '%s %.2f' %(\"\\n\\n Conductivity = %.3f m**3/Vs\",sigma)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Hall coefficient is\n", + "Rh = Eh/(Jx*B)\n", + "\n", + " Hall coefficient = %.6f m**3/C \n", + "\n", + " 0.01\n", + "(b) Electrons per unit volume,\n", + "\n", + "\n", + " Electrons per unit volume = %.0f electrons/m**3 \n", + "\n", + " 561646297627606056960.00\n", + "Since R=(l/(A*sigma) = (l/(A*e*n*R))\n", + "\n", + "\n", + " Conductivity = %.3f m**3/Vs 0.34\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..44534838 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_1.ipynb @@ -0,0 +1,987 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2d0c2db39859457336ae64be87210e0250b553cbce5567f592161a332f983e82" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 - Semiconductor Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_1 Pg-127\n", + "#calculate current\n", + "print '%s' %(\"Refer to the diagram 3.11(b)\")\n", + "print '%s' %(\"Using ohm''s law\")\n", + "print '%s' %(\"Vt = Vd1 + Vr1\")\n", + "Vd1=0.7 #voltage drop in V\n", + "Vt=12. #supply voltage in V\n", + "R1=1.2*10.**3. #resistor R1 in ohm\n", + "Vr1=Vt-Vd1 #voltage across R1 in V\n", + "It=Vr1/R1 #current in A\n", + "print '%s' %(\"Ohm''s law\")\n", + "print '%s %.2f' %(\"\\n Current I_t = mA\",It*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the diagram 3.11(b)\n", + "Using ohm''s law\n", + "Vt = Vd1 + Vr1\n", + "Ohm''s law\n", + "\n", + " Current I_t = mA 9.42\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_2 Pg-182\n", + "#calculate the voltage applied across the junction\n", + "import math\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_3 Pg-182\n", + "import math\n", + "I=2.*10.**6. #forward current density\n", + "Is=30. #saturation current density\n", + "ekt=40.\n", + "V=(1./40.)*math.log(I/Is) #Applied forward voltage\n", + "print '%s %.3f' %(\"Applied forward voltage =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applied forward voltage =V 0.278\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_4 Pg-182\n", + "import math\n", + "print '%s' %(\"I = Is*exp(eV/kT) = Is*exp(40V)\")\n", + "print '%s' %(\"Re = del_V/del_I = 1/40I\")\n", + "print '%s' %(\"Dividing throughtout by volume, one obtains the equation in the form of current density as\")\n", + "print '%s' %(\"J = Js*(exp(eV/kT)-1)\")\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I = Is*exp(eV/kT) = Is*exp(40V)\n", + "Re = del_V/del_I = 1/40I\n", + "Dividing throughtout by volume, one obtains the equation in the form of current density as\n", + "J = Js*(exp(eV/kT)-1)\n", + "\n", + " The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_5 Pg-183\n", + "print '%s' %(\"(a) Forward-bias\")\n", + "Av=50. #applied voltage\n", + "Jr=5000. #junction resistance\n", + "Er=50. #external resistance\n", + "cur=Av/(Er+Jr) #current\n", + "print '%s %.1f %s' %(\"Current =mA \\n\",cur*10.**3.,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) Reverse-bias\")\n", + "cur_rev=Av/(Jr+10.**6.) #book expression is wrong\n", + "print '%s %.3f' %(\"Current =1e-2 mA \\n\",cur_rev*10**5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Forward-bias\n", + "Current =mA \n", + " 9.9 \n", + "\n", + "(b) Reverse-bias\n", + "Current =1e-2 mA \n", + " 4.975\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_6 Pg-183\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT)) #value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_7 Pg-184\n", + "import math\n", + "print '%s' %(\"We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\")\n", + "\n", + "print '%s' %(\"Substituting the given values,we have \")\n", + "\n", + "print '%s' %(\"(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\")\n", + "\n", + "print '%s' %(\"(2)**x = 1.6\")\n", + "\n", + "print '%s' %(\"Taking log on both sides,one obtains\")\n", + "\n", + "print '%s' %(\"x*log(2) = log(1.6)\")\n", + "\n", + "print '%s' %(\"or x = log(1.6)/log(2)\")\n", + "\n", + "x=math.log(1.6)/math.log(2.)\n", + "\n", + "print '%s' %(\" Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\")\n", + "T1=25. #temperature T1\n", + "T2=x*10.+T1 #temperature T2\n", + "diff_temp=T2-T1 #change in temperature\n", + "print '%s %.2f' %(\"\\n So the change in temperature =degree celsius\",diff_temp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\n", + "Substituting the given values,we have \n", + "(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\n", + "(2)**x = 1.6\n", + "Taking log on both sides,one obtains\n", + "x*log(2) = log(1.6)\n", + "or x = log(1.6)/log(2)\n", + " Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\n", + "\n", + " So the change in temperature =degree celsius 6.78\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_8 Pg-185\n", + "import math\n", + "print '%s' %(\"Forward current I is given by \")\n", + "print '%s' %(\"I=I0*exp(V/(n*Vt))-1\")\n", + "V=0.3 #voltage\n", + "n=1. #constant\n", + "T1=22.+273. #temperature T1 in Kelvin\n", + "Vt1=T1/11600.\n", + "I=(math.exp(V/0.025)-1)\n", + "print '%s' %(\"When temperature rises to 72 degree celcius, then\")\n", + "\n", + "T2=72.+273. #temperature T2 in Kelvin\n", + "Vt2=T2/11600.\n", + "TR=T2-T1 #temperature rise\n", + "I_72=(2.)**(TR/10.)\n", + "\n", + "I_hash=I_72*(math.exp(V/(Vt2))-1)\n", + "for_cur_rises=I_hash/I\n", + "print '%s' %(\"Thus, at 72 degree celcius Forward current rises by \")\n", + "print '%s' %(for_cur_rises)\n", + "cur_I=768849.72\n", + "cur_I_hash=162753.79\n", + "FCR=cur_I/cur_I_hash\n", + "print '%s %.2f' %(\"\\n=\",FCR)\n", + " #answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_9 Pg-185\n", + "import math\n", + "n=1. #constant\n", + "T=27.+273. #temperature in K\n", + "Vt=T/11600.\n", + "V=0.2 #voltage\n", + "I0=10.**(-6.) #saturation current\n", + "I=I0*(math.exp(V/Vt)-1)\n", + "stat_res=V/I #static resistance\n", + "print '%s %.2f' %(\"Static resistance =ohm\",stat_res)\n", + "\n", + "dyn_res=Vt/(I+I0) #dynamic resistance\n", + "print '%s %.2f' %(\"Dynamic resistance =ohm\",dyn_res)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static resistance =ohm 87.63\n", + "Dynamic resistance =ohm 11.33\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_10 Pg-186\n", + "import math\n", + "print '%s' %(\"We know that I = I0*(math.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"Dividing on both sides by area A, one obtains\")\n", + "print '%s' %(\"I/A = I0/A*(mah.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"or J = J0*(math.exp(V/n*Vt)-1)\")\n", + "n=1. #constant\n", + "T=300. #temperature in K\n", + "Vt=T/11600.\n", + "J=10.**5. #forward current density\n", + "J0=250.*10.**(-3.) #saturation current density \n", + "V=Vt*math.log(J/J0)\n", + "print '%s %.4f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that I = I0*(math.exp(V/n*Vt)-1)\n", + "Dividing on both sides by area A, one obtains\n", + "I/A = I0/A*(mah.exp(V/n*Vt)-1)\n", + "or J = J0*(math.exp(V/n*Vt)-1)\n", + "\n", + " The voltage applied across the junction =V 0.3336\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_11 Pg-186\n", + "Vmin=0.7 #minimum voltage across diode in V\n", + "V=5. #supply voltage in V\n", + "V_R1=V-Vmin #voltage across resistor R in V\n", + "Imin=10.**(-3.) #minimum current\n", + "R1=V_R1/Imin \n", + "print '%s %.1f' %(\"Maximum value of R =kohm \\n \",R1*1e-3)\n", + "I=5.*10.**(-3.) #current through resistance in A\n", + "V_R2=V-Vmin #voltage across resistor R in V\n", + "R2=V_R2/I\n", + "print '%s %.0f' %(\"\\n\\n Minimum value of R =ohm \",R2)\n", + "Vb=6. #supply voltage\n", + "Vb_res=Vb-Vmin #voltage across resistor\n", + "P=I*Vb_res #power dissipated across resistor\n", + "print '%s %.1f' %(\"\\n\\n Power dissipated across R =W\",P*10**3)\n", + "P_diode=I*Vmin #power dissipated across diode\n", + "print '%s %.1f' %(\"\\n power dissipated across diode =mW\",P_diode*1e3)\n", + "R=10.**3. #resistor in ohm\n", + "V_R=R*Imin #voltage drop across resistor R in V\n", + "Vb=V_R+Vmin \n", + "print '%s %.1f' %(\"\\n\\n The minimum voltage across diode =V\",Vb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of R =kohm \n", + " 4.3\n", + "\n", + "\n", + " Minimum value of R =ohm 860\n", + "\n", + "\n", + " Power dissipated across R =W 26.5\n", + "\n", + " power dissipated across diode =mW 3.5\n", + "\n", + "\n", + " The minimum voltage across diode =V 1.7\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_12 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.51\")\n", + "Id1=2.*10.**(-3.) #diode current in I\n", + "Vd1=0.5 #diode voltage in V\n", + "Rf1=Vd1/Id1 #Dc resistance\n", + "print '%s' %(\"At Id=2mA and Vd=0.5V\")\n", + "print '%s %.0f' %(\"\\n Rf =ohm\",Rf1)\n", + "\n", + "Id2=20.*10.**(-3.) #diode current in I\n", + "Vd2=0.75 #diode voltage in V\n", + "Rf2=Vd2/Id2 #Dc resistance\n", + "print '%s' %(\"At Id=20mA and Vd=0.75V\")\n", + "print '%s %.1f' %(\"\\n Rf =ohm \",Rf2)\n", + "\n", + "Id3=2.*10.**(-6.) #diode current in I\n", + "Vd3=10. #diode voltage in V\n", + "Rf3=Vd3/Id3 #Dc resistance\n", + "print '%s' %(\"At Id=2*10**(-6)A and Vd=10V\")\n", + "print '%s %.0f' %(\"\\n Rf =Mohm\",Rf3*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.51\n", + "At Id=2mA and Vd=0.5V\n", + "\n", + " Rf =ohm 250\n", + "At Id=20mA and Vd=0.75V\n", + "\n", + " Rf =ohm 37.5\n", + "At Id=2*10**(-6)A and Vd=10V\n", + "\n", + " Rf =Mohm 5\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_13 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.52\")\n", + "print '%s' %(\"(a) Assuming the diode D to be ideal \")\n", + "print '%s' %(\" Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\")\n", + "R1=45. #resistor R1\n", + "R2=5. #resistor R2\n", + "Vaa=10. #supply voltage\n", + "Vab=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vab=V\",Vab)\n", + "\n", + "print '%s' %(\" Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\")\n", + "ID=Vaa/R1 #diode current\n", + "print '%s %.0f' %(\"\\n Current through diode =mA \",ID*10**3)\n", + "\n", + "print '%s' %(\"(b)Assuming the diode to be real\")\n", + "print '%s' %(\" Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\")\n", + "Vth=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vth=V\",Vth)\n", + "Rth=R1*R2/(R1+R2)\n", + "print '%s %.0f' %(\"\\n Rth=ohm \",Rth) #textbook value is wrong\n", + "print '%s' %(\"Thus,the equivalent circuit becomes as shown in figure 3.53(c)\")\n", + "Vt=0.3 #load voltage\n", + "tf=25. #load resistance\n", + "Id=(Vth-Vt)/(Rth+tf)\n", + "print '%s %.1f' %(\"\\n Current through diode = mA\",Id*10**3)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.52\n", + "(a) Assuming the diode D to be ideal \n", + " Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\n", + "\n", + " Vab=V 1\n", + " Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\n", + "\n", + " Current through diode =mA 222\n", + "(b)Assuming the diode to be real\n", + " Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\n", + "\n", + " Vth=V 1\n", + "\n", + " Rth=ohm 4\n", + "Thus,the equivalent circuit becomes as shown in figure 3.53(c)\n", + "\n", + " Current through diode = mA 23.7\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_14 Pg-190\n", + "print '%s' %(\"Diodes D2 and D3 are reverse-biased.\\nTherefore,these are like open-switches.\\nDiodes D1 and D2 are forward biased.\\nThese are replaced by their equivalent circuits,as shown in figure 3.54.\\nSince the diodes are silicon V=0.7V. \")\n", + "Vt=0.7 #voltage drop\n", + "Vaa=20. #supply voltage in V\n", + "net_emf=Vaa-Vt-Vt #net emf\n", + "R1=5. \n", + "R2=90.\n", + "R3=5. #R1,R2,R3 are resistances\n", + "tot_res=R1+R2+R3 #total resistance\n", + "print'%s' %(\"Therefore, current through 90 ohm resistor is\")\n", + "I=net_emf/tot_res\n", + "print'%s %.0f' %(\"\\nCurrent I =mA\",I*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diodes D2 and D3 are reverse-biased.\n", + "Therefore,these are like open-switches.\n", + "Diodes D1 and D2 are forward biased.\n", + "These are replaced by their equivalent circuits,as shown in figure 3.54.\n", + "Since the diodes are silicon V=0.7V. \n", + "Therefore, current through 90 ohm resistor is\n", + "\n", + "Current I =mA 186\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_15 Pg-190\n", + "print '%s' %(\"(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\\nIt is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\")\n", + "R1=100. #reisitor R1 in ohm \n", + "R=R1\n", + "Vaa=10. #supply voltage in V\n", + "I=Vaa/R\n", + "print '%s %.1f' %(\"\\n Current drawn from battery =A\",I)\n", + "print '%s' %(\"(a) When the diode is reverse biased figure 3.55(b).\\nIt is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\")\n", + "R2=100 #resistor R2 in ohm\n", + "tot_R=R1+R2\n", + "I1=Vaa/tot_R\n", + "print '%s %.2f' %(\"\\n Current drawn from battery =A\",I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\n", + "It is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\n", + "\n", + " Current drawn from battery =A 0.1\n", + "(a) When the diode is reverse biased figure 3.55(b).\n", + "It is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\n", + "\n", + " Current drawn from battery =A 0.05\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_16 Pg-191\n", + "Vz=9. #breakdown voltage in V\n", + "per=0.1 #10% tolerance \n", + "Tol=Vz*per\n", + "print '%s %.1f'%(\"Tolerance =V\",Tol)\n", + "tol_high=Vz+Tol\n", + "tol_low=Vz-Tol #ranges in tolerance\n", + "print'%s %.1f %.1f'%(\"\\n Range of breakdown voltage=to V\",tol_low,tol_high)\n", + "# in the textbook the value 8.2 is wrong the correct value is 8.1\n", + "T1=25. #temperature T1 in degree celcius\n", + "T2=75. #temperature T2 in degree celcius\n", + "diff_temp=T2-T1 #chnage in temperature\n", + "Vzener=2.*10.**(-3.) #zener voltage\n", + "fall_break_vol=Vzener*diff_temp #fall in breakdown voltage\n", + "new_break_vol=Vz-fall_break_vol #new break don voltage\n", + "print '%s %.1f' %(\"\\n New break don voltage =V\",new_break_vol)\n", + "range_high=tol_low-fall_break_vol\n", + "range_low=tol_high-fall_break_vol\n", + "print '%s %.1f %.1f' %(\"\\n Range of breakdown voltage=to V\",range_high,range_low)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tolerance =V 0.9\n", + "\n", + " Range of breakdown voltage=to V 8.1 9.9\n", + "\n", + " New break don voltage =V 8.9\n", + "\n", + " Range of breakdown voltage=to V 8.0 9.8\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_17 Pg-192\n", + "import math\n", + "C=20. #capacitance in pF\n", + "V=5. #supply voltage in V\n", + "K=C*math.sqrt(V)\n", + "C_V1=K/math.sqrt(V+1)\n", + "print '%s %.1f' %(\"Capacitance for 1V increase =pF\",C_V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance for 1V increase =pF 18.3\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_18 Pg-192\n", + "import math\n", + "print '%s' %(\"(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\\nObviously,it is in forward direction through D2 and in reverse direction through D1.\\nSince D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\\nThis means the current will be equal to reverse saturation current I0.\\nNow,we consider diode D2.\\nWe have \\n\\n\")\n", + "print '%s' %(\"I = I0*(exp(V/Vt)-1)\")\n", + "print '%s' %(\"Putting I=I0 and V=V2, we have\")\n", + "print '%s' %(\"I0 = I0*(exp(V2/Vt)-1)\")\n", + "print '%s' %(\"exp(V2/Vt)-1 = 1\")\n", + "Vt=0.026 #threshold voltage\n", + "V2=Vt*math.log(2.)\n", + "V=5. #supply voltage in V\n", + "V1=V-V2 #value in textbook incorrect\n", + "print '%s %.3f' %(\"\\n V2 =V\",V2)\n", + "print '%s %.3f' %(\"\\n V2 =V\\n \",V1)\n", + "print '%s' %(\"Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\")\n", + "print '%s' %(\"So V2 will increase with temperature\\n\")\n", + "print '%s' %(\"(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\")\n", + "Vz=4.9 #breakdown voltage\n", + "V2=V-Vz\n", + "print '%s' %(\"Now using I0=5*10**(-6)A and V2=0.1V,one obtains\")\n", + "I0=5*10**(-6) #current in ampere\n", + "I=I0*(math.exp(V2/Vt)-1)\n", + "print '%s %.0f' %(\"\\n Current I=microA\",I*10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\n", + "Obviously,it is in forward direction through D2 and in reverse direction through D1.\n", + "Since D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\n", + "This means the current will be equal to reverse saturation current I0.\n", + "Now,we consider diode D2.\n", + "We have \n", + "\n", + "\n", + "I = I0*(exp(V/Vt)-1)\n", + "Putting I=I0 and V=V2, we have\n", + "I0 = I0*(exp(V2/Vt)-1)\n", + "exp(V2/Vt)-1 = 1\n", + "\n", + " V2 =V 0.018\n", + "\n", + " V2 =V\n", + " 4.982\n", + "Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\n", + "So V2 will increase with temperature\n", + "\n", + "(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\n", + "Now using I0=5*10**(-6)A and V2=0.1V,one obtains\n", + "\n", + " Current I=microA 229\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_19 Pg-193\n", + "print '%s' %(\"We have Iv=40*iD\")\n", + "Iv=1. #luminous intensity\n", + "iD=Iv/(40.*10.**(-3.)) #LED current\n", + "print '%s %.0f' %(\"LED current =mA\",iD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have Iv=40*iD\n", + "LED current =mA 25\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_20 Pg-193\n", + "print '%s %s' %(\"(a) At Id=10mA,\",\"\\n\")\n", + "V=25. #voltage in mV\n", + "Id=10. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.1f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n", + "Id=20. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.2f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) At Id=10mA, \n", + "\n", + "AC resistance Rac=ohm 2.5 \n", + "\n", + "AC resistance Rac=ohm 1.25 \n", + "\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_21 Pg-194\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT))\n", + "#value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..226ca17a --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_2.ipynb @@ -0,0 +1,1002 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a6186b38a4c98127df63df89c795e706ba7e6e448199a1ba5338811786db72cb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 - Semiconductor Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_1 Pg-127\n", + "#calculate current\n", + "print '%s' %(\"Refer to the diagram 3.11(b)\")\n", + "print '%s' %(\"Using ohm''s law\")\n", + "print '%s' %(\"Vt = Vd1 + Vr1\")\n", + "Vd1=0.7 #voltage drop in V\n", + "Vt=12. #supply voltage in V\n", + "R1=1.2*10.**3. #resistor R1 in ohm\n", + "Vr1=Vt-Vd1 #voltage across R1 in V\n", + "It=Vr1/R1 #current in A\n", + "print '%s' %(\"Ohm''s law\")\n", + "print '%s %.2f' %(\"\\n Current I_t = mA\",It*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the diagram 3.11(b)\n", + "Using ohm''s law\n", + "Vt = Vd1 + Vr1\n", + "Ohm''s law\n", + "\n", + " Current I_t = mA 9.42\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_2 Pg-182\n", + "#calculate the voltage applied across the junction\n", + "import math\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_3 Pg-182\n", + "import math\n", + "I=2.*10.**6. #forward current density\n", + "Is=30. #saturation current density\n", + "ekt=40.\n", + "V=(1./40.)*math.log(I/Is) #Applied forward voltage\n", + "print '%s %.3f' %(\"Applied forward voltage =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applied forward voltage =V 0.278\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_4 Pg-182\n", + "import math\n", + "print '%s' %(\"I = Is*exp(eV/kT) = Is*exp(40V)\")\n", + "print '%s' %(\"Re = del_V/del_I = 1/40I\")\n", + "print '%s' %(\"Dividing throughtout by volume, one obtains the equation in the form of current density as\")\n", + "print '%s' %(\"J = Js*(exp(eV/kT)-1)\")\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I = Is*exp(eV/kT) = Is*exp(40V)\n", + "Re = del_V/del_I = 1/40I\n", + "Dividing throughtout by volume, one obtains the equation in the form of current density as\n", + "J = Js*(exp(eV/kT)-1)\n", + "\n", + " The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_5 Pg-183\n", + "print '%s' %(\"(a) Forward-bias\")\n", + "Av=50. #applied voltage\n", + "Jr=5000. #junction resistance\n", + "Er=50. #external resistance\n", + "cur=Av/(Er+Jr) #current\n", + "print '%s %.1f %s' %(\"Current =mA \\n\",cur*10.**3.,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) Reverse-bias\")\n", + "cur_rev=Av/(Jr+10.**6.) #book expression is wrong\n", + "print '%s %.3f' %(\"Current =1e-2 mA \\n\",cur_rev*10**5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Forward-bias\n", + "Current =mA \n", + " 9.9 \n", + "\n", + "(b) Reverse-bias\n", + "Current =1e-2 mA \n", + " 4.975\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_6 Pg-183\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT)) #value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_7 Pg-184\n", + "import math\n", + "print '%s' %(\"We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\")\n", + "\n", + "print '%s' %(\"Substituting the given values,we have \")\n", + "\n", + "print '%s' %(\"(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\")\n", + "\n", + "print '%s' %(\"(2)**x = 1.6\")\n", + "\n", + "print '%s' %(\"Taking log on both sides,one obtains\")\n", + "\n", + "print '%s' %(\"x*log(2) = log(1.6)\")\n", + "\n", + "print '%s' %(\"or x = log(1.6)/log(2)\")\n", + "\n", + "x=math.log(1.6)/math.log(2.)\n", + "\n", + "print '%s' %(\" Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\")\n", + "T1=25. #temperature T1\n", + "T2=x*10.+T1 #temperature T2\n", + "diff_temp=T2-T1 #change in temperature\n", + "print '%s %.2f' %(\"\\n So the change in temperature =degree celsius\",diff_temp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\n", + "Substituting the given values,we have \n", + "(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\n", + "(2)**x = 1.6\n", + "Taking log on both sides,one obtains\n", + "x*log(2) = log(1.6)\n", + "or x = log(1.6)/log(2)\n", + " Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\n", + "\n", + " So the change in temperature =degree celsius 6.78\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_8 Pg-185\n", + "import math\n", + "print '%s' %(\"Forward current I is given by \")\n", + "print '%s' %(\"I=I0*exp(V/(n*Vt))-1\")\n", + "V=0.3 #voltage\n", + "n=1. #constant\n", + "T1=22.+273. #temperature T1 in Kelvin\n", + "Vt1=T1/11600.\n", + "I=(math.exp(V/0.025)-1)\n", + "print '%s' %(\"When temperature rises to 72 degree celcius, then\")\n", + "\n", + "T2=72.+273. #temperature T2 in Kelvin\n", + "Vt2=T2/11600.\n", + "TR=T2-T1 #temperature rise\n", + "I_72=(2.)**(TR/10.)\n", + "\n", + "I_hash=I_72*(math.exp(V/(Vt2))-1)\n", + "for_cur_rises=I_hash/I\n", + "print '%s' %(\"Thus, at 72 degree celcius Forward current rises by \")\n", + "print '%s' %(for_cur_rises)\n", + "cur_I=768849.72\n", + "cur_I_hash=162753.79\n", + "FCR=cur_I/cur_I_hash\n", + "print '%s %.2f' %(\"\\n=\",FCR)\n", + " #answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Forward current I is given by \n", + "I=I0*exp(V/(n*Vt))-1\n", + "When temperature rises to 72 degree celcius, then\n", + "Thus, at 72 degree celcius Forward current rises by \n", + "4.72400496343\n", + "\n", + "= 4.72\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_9 Pg-185\n", + "import math\n", + "n=1. #constant\n", + "T=27.+273. #temperature in K\n", + "Vt=T/11600.\n", + "V=0.2 #voltage\n", + "I0=10.**(-6.) #saturation current\n", + "I=I0*(math.exp(V/Vt)-1)\n", + "stat_res=V/I #static resistance\n", + "print '%s %.2f' %(\"Static resistance =ohm\",stat_res)\n", + "\n", + "dyn_res=Vt/(I+I0) #dynamic resistance\n", + "print '%s %.2f' %(\"Dynamic resistance =ohm\",dyn_res)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static resistance =ohm 87.63\n", + "Dynamic resistance =ohm 11.33\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_10 Pg-186\n", + "import math\n", + "print '%s' %(\"We know that I = I0*(math.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"Dividing on both sides by area A, one obtains\")\n", + "print '%s' %(\"I/A = I0/A*(mah.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"or J = J0*(math.exp(V/n*Vt)-1)\")\n", + "n=1. #constant\n", + "T=300. #temperature in K\n", + "Vt=T/11600.\n", + "J=10.**5. #forward current density\n", + "J0=250.*10.**(-3.) #saturation current density \n", + "V=Vt*math.log(J/J0)\n", + "print '%s %.4f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that I = I0*(math.exp(V/n*Vt)-1)\n", + "Dividing on both sides by area A, one obtains\n", + "I/A = I0/A*(mah.exp(V/n*Vt)-1)\n", + "or J = J0*(math.exp(V/n*Vt)-1)\n", + "\n", + " The voltage applied across the junction =V 0.3336\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_11 Pg-186\n", + "Vmin=0.7 #minimum voltage across diode in V\n", + "V=5. #supply voltage in V\n", + "V_R1=V-Vmin #voltage across resistor R in V\n", + "Imin=10.**(-3.) #minimum current\n", + "R1=V_R1/Imin \n", + "print '%s %.1f' %(\"Maximum value of R =kohm \\n \",R1*1e-3)\n", + "I=5.*10.**(-3.) #current through resistance in A\n", + "V_R2=V-Vmin #voltage across resistor R in V\n", + "R2=V_R2/I\n", + "print '%s %.0f' %(\"\\n\\n Minimum value of R =ohm \",R2)\n", + "Vb=6. #supply voltage\n", + "Vb_res=Vb-Vmin #voltage across resistor\n", + "P=I*Vb_res #power dissipated across resistor\n", + "print '%s %.1f' %(\"\\n\\n Power dissipated across R =W\",P*10**3)\n", + "P_diode=I*Vmin #power dissipated across diode\n", + "print '%s %.1f' %(\"\\n power dissipated across diode =mW\",P_diode*1e3)\n", + "R=10.**3. #resistor in ohm\n", + "V_R=R*Imin #voltage drop across resistor R in V\n", + "Vb=V_R+Vmin \n", + "print '%s %.1f' %(\"\\n\\n The minimum voltage across diode =V\",Vb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of R =kohm \n", + " 4.3\n", + "\n", + "\n", + " Minimum value of R =ohm 860\n", + "\n", + "\n", + " Power dissipated across R =W 26.5\n", + "\n", + " power dissipated across diode =mW 3.5\n", + "\n", + "\n", + " The minimum voltage across diode =V 1.7\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_12 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.51\")\n", + "Id1=2.*10.**(-3.) #diode current in I\n", + "Vd1=0.5 #diode voltage in V\n", + "Rf1=Vd1/Id1 #Dc resistance\n", + "print '%s' %(\"At Id=2mA and Vd=0.5V\")\n", + "print '%s %.0f' %(\"\\n Rf =ohm\",Rf1)\n", + "\n", + "Id2=20.*10.**(-3.) #diode current in I\n", + "Vd2=0.75 #diode voltage in V\n", + "Rf2=Vd2/Id2 #Dc resistance\n", + "print '%s' %(\"At Id=20mA and Vd=0.75V\")\n", + "print '%s %.1f' %(\"\\n Rf =ohm \",Rf2)\n", + "\n", + "Id3=2.*10.**(-6.) #diode current in I\n", + "Vd3=10. #diode voltage in V\n", + "Rf3=Vd3/Id3 #Dc resistance\n", + "print '%s' %(\"At Id=2*10**(-6)A and Vd=10V\")\n", + "print '%s %.0f' %(\"\\n Rf =Mohm\",Rf3*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.51\n", + "At Id=2mA and Vd=0.5V\n", + "\n", + " Rf =ohm 250\n", + "At Id=20mA and Vd=0.75V\n", + "\n", + " Rf =ohm 37.5\n", + "At Id=2*10**(-6)A and Vd=10V\n", + "\n", + " Rf =Mohm 5\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_13 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.52\")\n", + "print '%s' %(\"(a) Assuming the diode D to be ideal \")\n", + "print '%s' %(\" Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\")\n", + "R1=45. #resistor R1\n", + "R2=5. #resistor R2\n", + "Vaa=10. #supply voltage\n", + "Vab=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vab=V\",Vab)\n", + "\n", + "print '%s' %(\" Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\")\n", + "ID=Vaa/R1 #diode current\n", + "print '%s %.0f' %(\"\\n Current through diode =mA \",ID*10**3)\n", + "\n", + "print '%s' %(\"(b)Assuming the diode to be real\")\n", + "print '%s' %(\" Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\")\n", + "Vth=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vth=V\",Vth)\n", + "Rth=R1*R2/(R1+R2)\n", + "print '%s %.0f' %(\"\\n Rth=ohm \",Rth) #textbook value is wrong\n", + "print '%s' %(\"Thus,the equivalent circuit becomes as shown in figure 3.53(c)\")\n", + "Vt=0.3 #load voltage\n", + "tf=25. #load resistance\n", + "Id=(Vth-Vt)/(Rth+tf)\n", + "print '%s %.1f' %(\"\\n Current through diode = mA\",Id*10**3)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.52\n", + "(a) Assuming the diode D to be ideal \n", + " Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\n", + "\n", + " Vab=V 1\n", + " Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\n", + "\n", + " Current through diode =mA 222\n", + "(b)Assuming the diode to be real\n", + " Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\n", + "\n", + " Vth=V 1\n", + "\n", + " Rth=ohm 4\n", + "Thus,the equivalent circuit becomes as shown in figure 3.53(c)\n", + "\n", + " Current through diode = mA 23.7\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_14 Pg-190\n", + "print '%s' %(\"Diodes D2 and D3 are reverse-biased.\\nTherefore,these are like open-switches.\\nDiodes D1 and D2 are forward biased.\\nThese are replaced by their equivalent circuits,as shown in figure 3.54.\\nSince the diodes are silicon V=0.7V. \")\n", + "Vt=0.7 #voltage drop\n", + "Vaa=20. #supply voltage in V\n", + "net_emf=Vaa-Vt-Vt #net emf\n", + "R1=5. \n", + "R2=90.\n", + "R3=5. #R1,R2,R3 are resistances\n", + "tot_res=R1+R2+R3 #total resistance\n", + "print'%s' %(\"Therefore, current through 90 ohm resistor is\")\n", + "I=net_emf/tot_res\n", + "print'%s %.0f' %(\"\\nCurrent I =mA\",I*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diodes D2 and D3 are reverse-biased.\n", + "Therefore,these are like open-switches.\n", + "Diodes D1 and D2 are forward biased.\n", + "These are replaced by their equivalent circuits,as shown in figure 3.54.\n", + "Since the diodes are silicon V=0.7V. \n", + "Therefore, current through 90 ohm resistor is\n", + "\n", + "Current I =mA 186\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_15 Pg-190\n", + "print '%s' %(\"(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\\nIt is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\")\n", + "R1=100. #reisitor R1 in ohm \n", + "R=R1\n", + "Vaa=10. #supply voltage in V\n", + "I=Vaa/R\n", + "print '%s %.1f' %(\"\\n Current drawn from battery =A\",I)\n", + "print '%s' %(\"(a) When the diode is reverse biased figure 3.55(b).\\nIt is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\")\n", + "R2=100 #resistor R2 in ohm\n", + "tot_R=R1+R2\n", + "I1=Vaa/tot_R\n", + "print '%s %.2f' %(\"\\n Current drawn from battery =A\",I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\n", + "It is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\n", + "\n", + " Current drawn from battery =A 0.1\n", + "(a) When the diode is reverse biased figure 3.55(b).\n", + "It is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\n", + "\n", + " Current drawn from battery =A 0.05\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_16 Pg-191\n", + "Vz=9. #breakdown voltage in V\n", + "per=0.1 #10% tolerance \n", + "Tol=Vz*per\n", + "print '%s %.1f'%(\"Tolerance =V\",Tol)\n", + "tol_high=Vz+Tol\n", + "tol_low=Vz-Tol #ranges in tolerance\n", + "print'%s %.1f %.1f'%(\"\\n Range of breakdown voltage=to V\",tol_low,tol_high)\n", + "# in the textbook the value 8.2 is wrong the correct value is 8.1\n", + "T1=25. #temperature T1 in degree celcius\n", + "T2=75. #temperature T2 in degree celcius\n", + "diff_temp=T2-T1 #chnage in temperature\n", + "Vzener=2.*10.**(-3.) #zener voltage\n", + "fall_break_vol=Vzener*diff_temp #fall in breakdown voltage\n", + "new_break_vol=Vz-fall_break_vol #new break don voltage\n", + "print '%s %.1f' %(\"\\n New break don voltage =V\",new_break_vol)\n", + "range_high=tol_low-fall_break_vol\n", + "range_low=tol_high-fall_break_vol\n", + "print '%s %.1f %.1f' %(\"\\n Range of breakdown voltage=to V\",range_high,range_low)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tolerance =V 0.9\n", + "\n", + " Range of breakdown voltage=to V 8.1 9.9\n", + "\n", + " New break don voltage =V 8.9\n", + "\n", + " Range of breakdown voltage=to V 8.0 9.8\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_17 Pg-192\n", + "import math\n", + "C=20. #capacitance in pF\n", + "V=5. #supply voltage in V\n", + "K=C*math.sqrt(V)\n", + "C_V1=K/math.sqrt(V+1)\n", + "print '%s %.1f' %(\"Capacitance for 1V increase =pF\",C_V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance for 1V increase =pF 18.3\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_18 Pg-192\n", + "import math\n", + "print '%s' %(\"(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\\nObviously,it is in forward direction through D2 and in reverse direction through D1.\\nSince D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\\nThis means the current will be equal to reverse saturation current I0.\\nNow,we consider diode D2.\\nWe have \\n\\n\")\n", + "print '%s' %(\"I = I0*(exp(V/Vt)-1)\")\n", + "print '%s' %(\"Putting I=I0 and V=V2, we have\")\n", + "print '%s' %(\"I0 = I0*(exp(V2/Vt)-1)\")\n", + "print '%s' %(\"exp(V2/Vt)-1 = 1\")\n", + "Vt=0.026 #threshold voltage\n", + "V2=Vt*math.log(2.)\n", + "V=5. #supply voltage in V\n", + "V1=V-V2 #value in textbook incorrect\n", + "print '%s %.3f' %(\"\\n V2 =V\",V2)\n", + "print '%s %.3f' %(\"\\n V2 =V\\n \",V1)\n", + "print '%s' %(\"Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\")\n", + "print '%s' %(\"So V2 will increase with temperature\\n\")\n", + "print '%s' %(\"(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\")\n", + "Vz=4.9 #breakdown voltage\n", + "V2=V-Vz\n", + "print '%s' %(\"Now using I0=5*10**(-6)A and V2=0.1V,one obtains\")\n", + "I0=5*10**(-6) #current in ampere\n", + "I=I0*(math.exp(V2/Vt)-1)\n", + "print '%s %.0f' %(\"\\n Current I=microA\",I*10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\n", + "Obviously,it is in forward direction through D2 and in reverse direction through D1.\n", + "Since D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\n", + "This means the current will be equal to reverse saturation current I0.\n", + "Now,we consider diode D2.\n", + "We have \n", + "\n", + "\n", + "I = I0*(exp(V/Vt)-1)\n", + "Putting I=I0 and V=V2, we have\n", + "I0 = I0*(exp(V2/Vt)-1)\n", + "exp(V2/Vt)-1 = 1\n", + "\n", + " V2 =V 0.018\n", + "\n", + " V2 =V\n", + " 4.982\n", + "Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\n", + "So V2 will increase with temperature\n", + "\n", + "(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\n", + "Now using I0=5*10**(-6)A and V2=0.1V,one obtains\n", + "\n", + " Current I=microA 229\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_19 Pg-193\n", + "print '%s' %(\"We have Iv=40*iD\")\n", + "Iv=1. #luminous intensity\n", + "iD=Iv/(40.*10.**(-3.)) #LED current\n", + "print '%s %.0f' %(\"LED current =mA\",iD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have Iv=40*iD\n", + "LED current =mA 25\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_20 Pg-193\n", + "print '%s %s' %(\"(a) At Id=10mA,\",\"\\n\")\n", + "V=25. #voltage in mV\n", + "Id=10. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.1f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n", + "Id=20. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.2f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) At Id=10mA, \n", + "\n", + "AC resistance Rac=ohm 2.5 \n", + "\n", + "AC resistance Rac=ohm 1.25 \n", + "\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_21 Pg-194\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT))\n", + "#value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..226ca17a --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_3_3.ipynb @@ -0,0 +1,1002 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a6186b38a4c98127df63df89c795e706ba7e6e448199a1ba5338811786db72cb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 - Semiconductor Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_1 Pg-127\n", + "#calculate current\n", + "print '%s' %(\"Refer to the diagram 3.11(b)\")\n", + "print '%s' %(\"Using ohm''s law\")\n", + "print '%s' %(\"Vt = Vd1 + Vr1\")\n", + "Vd1=0.7 #voltage drop in V\n", + "Vt=12. #supply voltage in V\n", + "R1=1.2*10.**3. #resistor R1 in ohm\n", + "Vr1=Vt-Vd1 #voltage across R1 in V\n", + "It=Vr1/R1 #current in A\n", + "print '%s' %(\"Ohm''s law\")\n", + "print '%s %.2f' %(\"\\n Current I_t = mA\",It*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the diagram 3.11(b)\n", + "Using ohm''s law\n", + "Vt = Vd1 + Vr1\n", + "Ohm''s law\n", + "\n", + " Current I_t = mA 9.42\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_2 Pg-182\n", + "#calculate the voltage applied across the junction\n", + "import math\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_3 Pg-182\n", + "import math\n", + "I=2.*10.**6. #forward current density\n", + "Is=30. #saturation current density\n", + "ekt=40.\n", + "V=(1./40.)*math.log(I/Is) #Applied forward voltage\n", + "print '%s %.3f' %(\"Applied forward voltage =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applied forward voltage =V 0.278\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_4 Pg-182\n", + "import math\n", + "print '%s' %(\"I = Is*exp(eV/kT) = Is*exp(40V)\")\n", + "print '%s' %(\"Re = del_V/del_I = 1/40I\")\n", + "print '%s' %(\"Dividing throughtout by volume, one obtains the equation in the form of current density as\")\n", + "print '%s' %(\"J = Js*(exp(eV/kT)-1)\")\n", + "J=10.**5. #forward current density\n", + "Js=250.*10.**(-3.) #saturation current density\n", + "e=1.6*10.**(-19.) #electron charge\n", + "T=300. #temperature\n", + "k=1.38*10.**(-23.) #Boltzmann constant\n", + "V=(math.log(J/Js)*k*T)/e #voltage applied across junction\n", + "print '%s %.2f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I = Is*exp(eV/kT) = Is*exp(40V)\n", + "Re = del_V/del_I = 1/40I\n", + "Dividing throughtout by volume, one obtains the equation in the form of current density as\n", + "J = Js*(exp(eV/kT)-1)\n", + "\n", + " The voltage applied across the junction =V 0.33\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_5 Pg-183\n", + "print '%s' %(\"(a) Forward-bias\")\n", + "Av=50. #applied voltage\n", + "Jr=5000. #junction resistance\n", + "Er=50. #external resistance\n", + "cur=Av/(Er+Jr) #current\n", + "print '%s %.1f %s' %(\"Current =mA \\n\",cur*10.**3.,\"\\n\")\n", + "\n", + "print '%s' %(\"(b) Reverse-bias\")\n", + "cur_rev=Av/(Jr+10.**6.) #book expression is wrong\n", + "print '%s %.3f' %(\"Current =1e-2 mA \\n\",cur_rev*10**5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Forward-bias\n", + "Current =mA \n", + " 9.9 \n", + "\n", + "(b) Reverse-bias\n", + "Current =1e-2 mA \n", + " 4.975\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_6 Pg-183\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT)) #value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_7 Pg-184\n", + "import math\n", + "print '%s' %(\"We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\")\n", + "\n", + "print '%s' %(\"Substituting the given values,we have \")\n", + "\n", + "print '%s' %(\"(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\")\n", + "\n", + "print '%s' %(\"(2)**x = 1.6\")\n", + "\n", + "print '%s' %(\"Taking log on both sides,one obtains\")\n", + "\n", + "print '%s' %(\"x*log(2) = log(1.6)\")\n", + "\n", + "print '%s' %(\"or x = log(1.6)/log(2)\")\n", + "\n", + "x=math.log(1.6)/math.log(2.)\n", + "\n", + "print '%s' %(\" Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\")\n", + "T1=25. #temperature T1\n", + "T2=x*10.+T1 #temperature T2\n", + "diff_temp=T2-T1 #change in temperature\n", + "print '%s %.2f' %(\"\\n So the change in temperature =degree celsius\",diff_temp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that (I0)*T2 = (I0)*T1*(2)**((T2-T1/10))\n", + "Substituting the given values,we have \n", + "(40*10**(-6)) = (25*10**(-6)*(2)**x) where x=(T2-T1)/10\n", + "(2)**x = 1.6\n", + "Taking log on both sides,one obtains\n", + "x*log(2) = log(1.6)\n", + "or x = log(1.6)/log(2)\n", + " Now x = (T2-T1)/10 or 0.678 = (T2-25)/10\n", + "\n", + " So the change in temperature =degree celsius 6.78\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_8 Pg-185\n", + "import math\n", + "print '%s' %(\"Forward current I is given by \")\n", + "print '%s' %(\"I=I0*exp(V/(n*Vt))-1\")\n", + "V=0.3 #voltage\n", + "n=1. #constant\n", + "T1=22.+273. #temperature T1 in Kelvin\n", + "Vt1=T1/11600.\n", + "I=(math.exp(V/0.025)-1)\n", + "print '%s' %(\"When temperature rises to 72 degree celcius, then\")\n", + "\n", + "T2=72.+273. #temperature T2 in Kelvin\n", + "Vt2=T2/11600.\n", + "TR=T2-T1 #temperature rise\n", + "I_72=(2.)**(TR/10.)\n", + "\n", + "I_hash=I_72*(math.exp(V/(Vt2))-1)\n", + "for_cur_rises=I_hash/I\n", + "print '%s' %(\"Thus, at 72 degree celcius Forward current rises by \")\n", + "print '%s' %(for_cur_rises)\n", + "cur_I=768849.72\n", + "cur_I_hash=162753.79\n", + "FCR=cur_I/cur_I_hash\n", + "print '%s %.2f' %(\"\\n=\",FCR)\n", + " #answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Forward current I is given by \n", + "I=I0*exp(V/(n*Vt))-1\n", + "When temperature rises to 72 degree celcius, then\n", + "Thus, at 72 degree celcius Forward current rises by \n", + "4.72400496343\n", + "\n", + "= 4.72\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_9 Pg-185\n", + "import math\n", + "n=1. #constant\n", + "T=27.+273. #temperature in K\n", + "Vt=T/11600.\n", + "V=0.2 #voltage\n", + "I0=10.**(-6.) #saturation current\n", + "I=I0*(math.exp(V/Vt)-1)\n", + "stat_res=V/I #static resistance\n", + "print '%s %.2f' %(\"Static resistance =ohm\",stat_res)\n", + "\n", + "dyn_res=Vt/(I+I0) #dynamic resistance\n", + "print '%s %.2f' %(\"Dynamic resistance =ohm\",dyn_res)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static resistance =ohm 87.63\n", + "Dynamic resistance =ohm 11.33\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_10 Pg-186\n", + "import math\n", + "print '%s' %(\"We know that I = I0*(math.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"Dividing on both sides by area A, one obtains\")\n", + "print '%s' %(\"I/A = I0/A*(mah.exp(V/n*Vt)-1)\")\n", + "print '%s' %(\"or J = J0*(math.exp(V/n*Vt)-1)\")\n", + "n=1. #constant\n", + "T=300. #temperature in K\n", + "Vt=T/11600.\n", + "J=10.**5. #forward current density\n", + "J0=250.*10.**(-3.) #saturation current density \n", + "V=Vt*math.log(J/J0)\n", + "print '%s %.4f' %(\"\\n The voltage applied across the junction =V\",V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that I = I0*(math.exp(V/n*Vt)-1)\n", + "Dividing on both sides by area A, one obtains\n", + "I/A = I0/A*(mah.exp(V/n*Vt)-1)\n", + "or J = J0*(math.exp(V/n*Vt)-1)\n", + "\n", + " The voltage applied across the junction =V 0.3336\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_11 Pg-186\n", + "Vmin=0.7 #minimum voltage across diode in V\n", + "V=5. #supply voltage in V\n", + "V_R1=V-Vmin #voltage across resistor R in V\n", + "Imin=10.**(-3.) #minimum current\n", + "R1=V_R1/Imin \n", + "print '%s %.1f' %(\"Maximum value of R =kohm \\n \",R1*1e-3)\n", + "I=5.*10.**(-3.) #current through resistance in A\n", + "V_R2=V-Vmin #voltage across resistor R in V\n", + "R2=V_R2/I\n", + "print '%s %.0f' %(\"\\n\\n Minimum value of R =ohm \",R2)\n", + "Vb=6. #supply voltage\n", + "Vb_res=Vb-Vmin #voltage across resistor\n", + "P=I*Vb_res #power dissipated across resistor\n", + "print '%s %.1f' %(\"\\n\\n Power dissipated across R =W\",P*10**3)\n", + "P_diode=I*Vmin #power dissipated across diode\n", + "print '%s %.1f' %(\"\\n power dissipated across diode =mW\",P_diode*1e3)\n", + "R=10.**3. #resistor in ohm\n", + "V_R=R*Imin #voltage drop across resistor R in V\n", + "Vb=V_R+Vmin \n", + "print '%s %.1f' %(\"\\n\\n The minimum voltage across diode =V\",Vb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of R =kohm \n", + " 4.3\n", + "\n", + "\n", + " Minimum value of R =ohm 860\n", + "\n", + "\n", + " Power dissipated across R =W 26.5\n", + "\n", + " power dissipated across diode =mW 3.5\n", + "\n", + "\n", + " The minimum voltage across diode =V 1.7\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_12 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.51\")\n", + "Id1=2.*10.**(-3.) #diode current in I\n", + "Vd1=0.5 #diode voltage in V\n", + "Rf1=Vd1/Id1 #Dc resistance\n", + "print '%s' %(\"At Id=2mA and Vd=0.5V\")\n", + "print '%s %.0f' %(\"\\n Rf =ohm\",Rf1)\n", + "\n", + "Id2=20.*10.**(-3.) #diode current in I\n", + "Vd2=0.75 #diode voltage in V\n", + "Rf2=Vd2/Id2 #Dc resistance\n", + "print '%s' %(\"At Id=20mA and Vd=0.75V\")\n", + "print '%s %.1f' %(\"\\n Rf =ohm \",Rf2)\n", + "\n", + "Id3=2.*10.**(-6.) #diode current in I\n", + "Vd3=10. #diode voltage in V\n", + "Rf3=Vd3/Id3 #Dc resistance\n", + "print '%s' %(\"At Id=2*10**(-6)A and Vd=10V\")\n", + "print '%s %.0f' %(\"\\n Rf =Mohm\",Rf3*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.51\n", + "At Id=2mA and Vd=0.5V\n", + "\n", + " Rf =ohm 250\n", + "At Id=20mA and Vd=0.75V\n", + "\n", + " Rf =ohm 37.5\n", + "At Id=2*10**(-6)A and Vd=10V\n", + "\n", + " Rf =Mohm 5\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_13 Pg-188\n", + "print '%s' %(\"Refer to the figure 3.52\")\n", + "print '%s' %(\"(a) Assuming the diode D to be ideal \")\n", + "print '%s' %(\" Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\")\n", + "R1=45. #resistor R1\n", + "R2=5. #resistor R2\n", + "Vaa=10. #supply voltage\n", + "Vab=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vab=V\",Vab)\n", + "\n", + "print '%s' %(\" Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\")\n", + "ID=Vaa/R1 #diode current\n", + "print '%s %.0f' %(\"\\n Current through diode =mA \",ID*10**3)\n", + "\n", + "print '%s' %(\"(b)Assuming the diode to be real\")\n", + "print '%s' %(\" Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\")\n", + "Vth=Vaa*(R2/(R1+R2))\n", + "print '%s %.0f' %(\"\\n Vth=V\",Vth)\n", + "Rth=R1*R2/(R1+R2)\n", + "print '%s %.0f' %(\"\\n Rth=ohm \",Rth) #textbook value is wrong\n", + "print '%s' %(\"Thus,the equivalent circuit becomes as shown in figure 3.53(c)\")\n", + "Vt=0.3 #load voltage\n", + "tf=25. #load resistance\n", + "Id=(Vth-Vt)/(Rth+tf)\n", + "print '%s %.1f' %(\"\\n Current through diode = mA\",Id*10**3)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 3.52\n", + "(a) Assuming the diode D to be ideal \n", + " Ignoring diode D,voltage across R2 is given as (By applying potential divider concept)\n", + "\n", + " Vab=V 1\n", + " Thus,diode D is forward biased.It conducts,offering zero resistance Hence no current would flow through the parallel bransh R2.The circuit equivalent to that shown in figure 3.53(a)\n", + "\n", + " Current through diode =mA 222\n", + "(b)Assuming the diode to be real\n", + " Voltage Vab is much larger than Vt hencethe diode conducts.It is replaced by its equivalent as shown in figure 3.53(b).To determine current Id through the diode we first find the Thevenin''s equivalent of the circuit on the left of AB.Vth=open circuit voltage across AB\n", + "\n", + " Vth=V 1\n", + "\n", + " Rth=ohm 4\n", + "Thus,the equivalent circuit becomes as shown in figure 3.53(c)\n", + "\n", + " Current through diode = mA 23.7\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_14 Pg-190\n", + "print '%s' %(\"Diodes D2 and D3 are reverse-biased.\\nTherefore,these are like open-switches.\\nDiodes D1 and D2 are forward biased.\\nThese are replaced by their equivalent circuits,as shown in figure 3.54.\\nSince the diodes are silicon V=0.7V. \")\n", + "Vt=0.7 #voltage drop\n", + "Vaa=20. #supply voltage in V\n", + "net_emf=Vaa-Vt-Vt #net emf\n", + "R1=5. \n", + "R2=90.\n", + "R3=5. #R1,R2,R3 are resistances\n", + "tot_res=R1+R2+R3 #total resistance\n", + "print'%s' %(\"Therefore, current through 90 ohm resistor is\")\n", + "I=net_emf/tot_res\n", + "print'%s %.0f' %(\"\\nCurrent I =mA\",I*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diodes D2 and D3 are reverse-biased.\n", + "Therefore,these are like open-switches.\n", + "Diodes D1 and D2 are forward biased.\n", + "These are replaced by their equivalent circuits,as shown in figure 3.54.\n", + "Since the diodes are silicon V=0.7V. \n", + "Therefore, current through 90 ohm resistor is\n", + "\n", + "Current I =mA 186\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_15 Pg-190\n", + "print '%s' %(\"(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\\nIt is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\")\n", + "R1=100. #reisitor R1 in ohm \n", + "R=R1\n", + "Vaa=10. #supply voltage in V\n", + "I=Vaa/R\n", + "print '%s %.1f' %(\"\\n Current drawn from battery =A\",I)\n", + "print '%s' %(\"(a) When the diode is reverse biased figure 3.55(b).\\nIt is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\")\n", + "R2=100 #resistor R2 in ohm\n", + "tot_R=R1+R2\n", + "I1=Vaa/tot_R\n", + "print '%s %.2f' %(\"\\n Current drawn from battery =A\",I1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) When the diode is forward biased figure 3.55(b),it offers zero resistance.\n", + "It is like shorted switch.This shorted switch across AB also short-circuits the resistance R2.Obviously,a parallel combination of the diode and R2 is equivalent to a resistance of zero ohms.\n", + "\n", + " Current drawn from battery =A 0.1\n", + "(a) When the diode is reverse biased figure 3.55(b).\n", + "It is like open switch.Obviously,it then does not make any difference whether the diode is connected or not.\n", + "\n", + " Current drawn from battery =A 0.05\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E16 - Pg 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_16 Pg-191\n", + "Vz=9. #breakdown voltage in V\n", + "per=0.1 #10% tolerance \n", + "Tol=Vz*per\n", + "print '%s %.1f'%(\"Tolerance =V\",Tol)\n", + "tol_high=Vz+Tol\n", + "tol_low=Vz-Tol #ranges in tolerance\n", + "print'%s %.1f %.1f'%(\"\\n Range of breakdown voltage=to V\",tol_low,tol_high)\n", + "# in the textbook the value 8.2 is wrong the correct value is 8.1\n", + "T1=25. #temperature T1 in degree celcius\n", + "T2=75. #temperature T2 in degree celcius\n", + "diff_temp=T2-T1 #chnage in temperature\n", + "Vzener=2.*10.**(-3.) #zener voltage\n", + "fall_break_vol=Vzener*diff_temp #fall in breakdown voltage\n", + "new_break_vol=Vz-fall_break_vol #new break don voltage\n", + "print '%s %.1f' %(\"\\n New break don voltage =V\",new_break_vol)\n", + "range_high=tol_low-fall_break_vol\n", + "range_low=tol_high-fall_break_vol\n", + "print '%s %.1f %.1f' %(\"\\n Range of breakdown voltage=to V\",range_high,range_low)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tolerance =V 0.9\n", + "\n", + " Range of breakdown voltage=to V 8.1 9.9\n", + "\n", + " New break don voltage =V 8.9\n", + "\n", + " Range of breakdown voltage=to V 8.0 9.8\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E17 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_17 Pg-192\n", + "import math\n", + "C=20. #capacitance in pF\n", + "V=5. #supply voltage in V\n", + "K=C*math.sqrt(V)\n", + "C_V1=K/math.sqrt(V+1)\n", + "print '%s %.1f' %(\"Capacitance for 1V increase =pF\",C_V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance for 1V increase =pF 18.3\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E18 - Pg 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_18 Pg-192\n", + "import math\n", + "print '%s' %(\"(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\\nObviously,it is in forward direction through D2 and in reverse direction through D1.\\nSince D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\\nThis means the current will be equal to reverse saturation current I0.\\nNow,we consider diode D2.\\nWe have \\n\\n\")\n", + "print '%s' %(\"I = I0*(exp(V/Vt)-1)\")\n", + "print '%s' %(\"Putting I=I0 and V=V2, we have\")\n", + "print '%s' %(\"I0 = I0*(exp(V2/Vt)-1)\")\n", + "print '%s' %(\"exp(V2/Vt)-1 = 1\")\n", + "Vt=0.026 #threshold voltage\n", + "V2=Vt*math.log(2.)\n", + "V=5. #supply voltage in V\n", + "V1=V-V2 #value in textbook incorrect\n", + "print '%s %.3f' %(\"\\n V2 =V\",V2)\n", + "print '%s %.3f' %(\"\\n V2 =V\\n \",V1)\n", + "print '%s' %(\"Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\")\n", + "print '%s' %(\"So V2 will increase with temperature\\n\")\n", + "print '%s' %(\"(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\")\n", + "Vz=4.9 #breakdown voltage\n", + "V2=V-Vz\n", + "print '%s' %(\"Now using I0=5*10**(-6)A and V2=0.1V,one obtains\")\n", + "I0=5*10**(-6) #current in ampere\n", + "I=I0*(math.exp(V2/Vt)-1)\n", + "print '%s %.0f' %(\"\\n Current I=microA\",I*10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The two diodes are connected in series and hence the current I flows in D1 and D2.\n", + "Obviously,it is in forward direction through D2 and in reverse direction through D1.\n", + "Since D2 diode is forward biased,V2 will be very small and hence V1=(5-V2) will be very much larger than Vt=0.026V.\n", + "This means the current will be equal to reverse saturation current I0.\n", + "Now,we consider diode D2.\n", + "We have \n", + "\n", + "\n", + "I = I0*(exp(V/Vt)-1)\n", + "Putting I=I0 and V=V2, we have\n", + "I0 = I0*(exp(V2/Vt)-1)\n", + "exp(V2/Vt)-1 = 1\n", + "\n", + " V2 =V 0.018\n", + "\n", + " V2 =V\n", + " 4.982\n", + "Effect of temperature : V2=Vt*ln(2) = kT*ln(2)\n", + "So V2 will increase with temperature\n", + "\n", + "(b) If Vz is 4.9V then D1 will breakdown. This means V1=4.9V\n", + "Now using I0=5*10**(-6)A and V2=0.1V,one obtains\n", + "\n", + " Current I=microA 229\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E19 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_19 Pg-193\n", + "print '%s' %(\"We have Iv=40*iD\")\n", + "Iv=1. #luminous intensity\n", + "iD=Iv/(40.*10.**(-3.)) #LED current\n", + "print '%s %.0f' %(\"LED current =mA\",iD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We have Iv=40*iD\n", + "LED current =mA 25\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E20 - Pg 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_20 Pg-193\n", + "print '%s %s' %(\"(a) At Id=10mA,\",\"\\n\")\n", + "V=25. #voltage in mV\n", + "Id=10. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.1f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n", + "Id=20. #current in mA\n", + "Rac=V/Id \n", + "#AC resistance (value in textbook is wrong)\n", + "print '%s %.2f %s' %(\"AC resistance Rac=ohm\",Rac,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) At Id=10mA, \n", + "\n", + "AC resistance Rac=ohm 2.5 \n", + "\n", + "AC resistance Rac=ohm 1.25 \n", + "\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E21 - Pg 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex3_21 Pg-194\n", + "import math\n", + "print '%s' %(\"We know that\")\n", + "print '%s' %(\" r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\")\n", + "k=8.62*10.**(-5.)\n", + "T=300. #temperaturein K\n", + "kT=k*T\n", + "I0=10.**(-6.) #saturation current\n", + "V=150.*10.**(-3.) #voltage forward biased\n", + "r_ac = 1./((I0/kT)*math.exp(V/kT))\n", + "#value of exp(0.15/0.02586)=330.45 and not the textbook value of 332.66\n", + "print '%s %.2f' %(\"\\n The AC resistance =ohm\",r_ac) #text book value wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We know that\n", + " r_ac = dV/dI - 1/(dI/dV) = 1/((I0/KT)exp(V/KT))\n", + "\n", + " The AC resistance =ohm 78.26\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..90e30550 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_1.ipynb @@ -0,0 +1,825 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2a1eb39510f3631fbcde9a4826e6d686285d8646443cf4d3538c3c9c67fda877" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Diode Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_1 Pg-213\n", + "#calculate Peak source voltage,DC load voltage With an ideal diode and With second approximation\n", + "import math\n", + "Vrms=110. #rms volatage in V\n", + "Vm=Vrms/0.707 #peak source voltage\n", + "print '%s %.1f' %(\"Peak source voltage=V\",Vm) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(a) With an ideal diode \")\n", + "Vpout=Vm #peak output voltage\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vm/math.pi #Dc load voltage\n", + "print '%s %.2f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(b) With second approximation\")\n", + "Vpin=Vm #peak input voltage\n", + "Vpout=Vpin-0.7\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vpout/math.pi #Dc load voltage\n", + "print '%s %.1f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak source voltage=V 155.6\n", + "(a) With an ideal diode \n", + "\n", + " Peak output voltage=V 155.6\n", + "\n", + " DC load voltage=V \n", + " 49.52\n", + "(b) With second approximation\n", + "\n", + " Peak output voltage=V 154.9\n", + "\n", + " DC load voltage=V \n", + " 49.3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_2 Pg-214\n", + "#calculate VR\n", + "print '%s' %(\"VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\")\n", + "print '%s' %(\"(a) VR = 0%\")\n", + "V_FullLoad=20. #full load voltage\n", + "V_NoLoad=V_FullLoad#no load voltage\n", + "print '%s %.0f' %(\"\\n V_FullLoad = V_NoLoad=V\",V_NoLoad)\n", + "print '%s' %(\"(b) VR = 100%\")\n", + "VR=100. #voltage regulation in %\n", + "V_NoLoad=(VR*V_FullLoad)/(100.)+V_FullLoad\n", + "print '%s %.0f' %(\"\\n V_NoLoad=V\",V_NoLoad)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\n", + "(a) VR = 0%\n", + "\n", + " V_FullLoad = V_NoLoad=V 20\n", + "(b) VR = 100%\n", + "\n", + " V_NoLoad=V 40\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_3 Pg-214\n", + "#calculate Ratio of rectification or efficiency of halfwave rectifier,Ac input powerfrom transformer secondary\n", + "print '%s' %(\"Ratio of rectification or efficiency of halfwave rectifier\")\n", + "print '%s' %(\"n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \")\n", + "DC_power=500. #ddc power deliverd to the load\n", + "n=0.406 #efficiency\n", + "AC_in_power=DC_power/n #AC input powerfrom transformer secondary\n", + "print '%s %.0f' %(\"\\n AC input powerfrom transformer secondary =Watt\",AC_in_power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of rectification or efficiency of halfwave rectifier\n", + "n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \n", + "\n", + " AC input powerfrom transformer secondary =Watt 1232\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_4 Pg-220\n", + "#calculate Peak value of current flowing,Average or DC current flowing,R.M.S value of current flowing, DC output power,AC input power,Efficiency of rectifier\n", + "import math\n", + "Rl=3.5*10.**(3.) #resistance in k-ohm\n", + "rF=800. #secondary resistance in k-ohm\n", + "Vm=240.# input voltage\n", + "print '%s' %(\"(1)(a) Peak value of current flowing\")\n", + "Im=Vm/(rF+Rl) #peak current\n", + "print '%s %.2f' %(\"Im=mA\",Im*10**3)\n", + "print '%s' %(\"(b) Average or DC current flowing\")\n", + "Idc=Im/math.pi #DC current\n", + "print '%s %.2f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"(c) R.M.S value of current flowing\")\n", + "Irms=Im/2. #rms current\n", + "print '%s %.2f' %(\"Irms=mA\",Irms*10**3)\n", + "print '%s' %(\"(2) DC output power\")\n", + "Pdc=(Idc)**2.*Rl #dc output power\n", + "print '%s %.1f' %(\"Pdc=Watt\",Pdc)\n", + "print '%s' %(\"(3) AC input power\")\n", + "Pac=(Irms)**2.*(rF+Rl)\n", + "print '%s %.2f' %(\"Pac=Watt\",Pac)\n", + "print '%s' %(\"(4)Efficiency of rectifier\")\n", + "n=(Pdc/Pac)*100. #efficiency\n", + "print '%s %.2f' %(\"n=\",n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)(a) Peak value of current flowing\n", + "Im=mA 55.81\n", + "(b) Average or DC current flowing\n", + "Idc=mA 17.77\n", + "(c) R.M.S value of current flowing\n", + "Irms=mA 27.91\n", + "(2) DC output power\n", + "Pdc=Watt 1.1\n", + "(3) AC input power\n", + "Pac=Watt 3.35\n", + "(4)Efficiency of rectifier\n", + "n= 32.99\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_5 Pg-221\n", + "#calculate Peak output volatge,Average output current,Diode dissipation\n", + "import math\n", + "Vr=0.7 #diodes voltage drop\n", + "Rl=820. #load resistor in ohm\n", + "Vin=40. #input voltage in V\n", + "print '%s' %(\"(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\")\n", + "V_drop_2=2.*Vr #voltage drop across 2 diodes\n", + "Vm=Vin-V_drop_2 #peak voltage\n", + "print '%s %.2f' %(\"\\nVm=V\",Vm)\n", + "print '%s' %(\"\\n(2) Average output current\")\n", + "Idc=(2*Vm/math.pi)/Rl #average output current\n", + "print '%s %.0f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"\\n(3) Diode dissipation\")\n", + "DD=Idc*Vr #Diode dissipation\n", + "print '%s %.0f' %(\"=mW\",DD*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\n", + "\n", + "Vm=V 38.60\n", + "\n", + "(2) Average output current\n", + "Idc=mA 30\n", + "\n", + "(3) Diode dissipation\n", + "=mW 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_6 Pg-222\n", + "#calculate RMS value of secondary voltage,,Peak secondary voltage,Peak inverse voltage of diode,Peak load voltage,DC load voltage\n", + "import math\n", + "Vr=0.7 #voltage drop\n", + "Vi=120. #input voltage\n", + "print '%s' %(\"RMS value of secondary voltage\")\n", + "V_sec=Vi/5. #RMS value of secondary voltage\n", + "print '%s %.0f' %(\"=V\",V_sec)\n", + "print '%s' %(\"Peak secondary voltage\")\n", + "Vm=V_sec*math.sqrt(2.) #Peak secondary voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\"Peak inverse voltage of diode\")\n", + "Vinv=-(Vm) #Peak inverse voltage of diode\n", + "print '%s %.0f' %(\"=V\",Vinv)\n", + "print '%s %.0f' %(\"\\nPeak load voltage=V\",Vm)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"Assuming second approximation\")\n", + "print '%s' %(\"Vm'' = Vm - Vr \")\n", + "print '%s' %(\"Peak load voltage\")\n", + "Vm_dash=Vm-Vr #Peak load voltage\n", + "print '%s %.1f' %(\"=V\",Vm_dash)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm_dash/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of secondary voltage\n", + "=V 24\n", + "Peak secondary voltage\n", + "=V 34\n", + "Peak inverse voltage of diode\n", + "=V -34\n", + "\n", + "Peak load voltage=V 34\n", + "DC load voltage\n", + "=V 10.8\n", + "Assuming second approximation\n", + "Vm'' = Vm - Vr \n", + "Peak load voltage\n", + "=V 33.2\n", + "DC load voltage\n", + "=V 10.6\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_7 Pg-222\n", + "#calculate Secondary RMS voltage,Secondary pek voltage,Half of the secondary voltage is input to the half section,Peak voltage across load,DC load current\n", + "import math\n", + "Vi=120. #supply voltage n V\n", + "Rl=5.*10.**3. #load resistance\n", + "print '%s' %(\"Secondary RMS voltage\")\n", + "Vrms=Vi/5. #Secondary RMS voltage\n", + "print '%s %.0f' %(\"=V\",Vrms)\n", + "print '%s' %(\"Secondary pek voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #Secondary pek voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\" Half of the secondary voltage is input to the half section.\")\n", + "print '%s' %(\"So input to the half section\")\n", + "i=Vm/2. #input to the half section\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"Peak voltage across load\")\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\")\n", + "print '%s' %(\"DC load current\")\n", + "Vdc=i\n", + "Idc=Vdc/Rl #DC load current\n", + "print '%s %.1f' %(\"=mA\",Idc*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Secondary RMS voltage\n", + "=V 24\n", + "Secondary pek voltage\n", + "=V 34\n", + " Half of the secondary voltage is input to the half section.\n", + "So input to the half section\n", + "=V 17\n", + "Peak voltage across load\n", + "=V 17\n", + "DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\n", + "DC load current\n", + "=mA 3.4\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_8 Pg-227\n", + "#calculate Ripple factor for a full wave rectifier,DC output voltage,Percentage voltage regulation\n", + "import math\n", + "f=50. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=2.*10.**3. #load resistance\n", + "Vrms=40. #rms secondary voltage\n", + "print '%s' %(\"(a) Ripple factor for a full wave rectifier\")\n", + "r=1./(4.*math.sqrt(3.)*f*C*Rl) #Ripple factor for a full wave rectifier\n", + "print '%s %.3f' %(\"=\",r)\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vm=Vrms*math.sqrt(2.)\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"(c) Percentage voltage regulation\")\n", + "per=100./(4.*f*C*Rl) #Percentage voltage regulation\n", + "print '%s %.1f' %(\"=\",per)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Ripple factor for a full wave rectifier\n", + "= 0.014\n", + "(b) DC output voltage\n", + "=V 55.2\n", + "(c) Percentage voltage regulation\n", + "= 2.5\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_9 Pg-237\n", + "#calculate Connected load,Ripple factor in case of shunt capacitor filter\n", + "import math\n", + "Vrms=300. #rms voltage in V\n", + "f=60. #frequency\n", + "Idc=0.2 #load current\n", + "C=10. #shunt capacitor in microFarad\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "Vdc=(2*Vm)/math.pi #Dc voltage\n", + "print '%s' %(\"Connected load\")\n", + "Rl=Vdc/Idc #Connected load\n", + "print '%s %.0f' %(\"Rl=ohm = (955.6)*sqrt(2) ohm\\n\",Rl)\n", + "print '%s' %(\"Ripple factor in case of shunt capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(C*Rl) #ripple factor\n", + "print '%s %.2f' %(\"=\",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Connected load\n", + "Rl=ohm = (955.6)*sqrt(2) ohm\n", + " 1350\n", + "Ripple factor in case of shunt capacitor filter \n", + "=2410/C*Rl\n", + "= 0.18\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_10 Pg-238\n", + "#calculate Peak voltage,DC output voltage,Ripple factor in case of capacitor filter\n", + "import math\n", + "f=60. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=1.*10.**3. #load resistance\n", + "\n", + "print '%s' %(\"Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\")\n", + "Vct=12.6 #voltage of center tapped transformer\n", + "Vrms=Vct/2. #rms voltage\n", + "\n", + "print '%s' %(\"Peak voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "print '%s %.2f' %(\"= V\\n \",Vm)\n", + "\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.2f' %(\"=V\\n \",Vdc)\n", + "\n", + "print '%s' %(\"Ripple factor in case of capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(100.*Rl)*100. #ripple factor\n", + "print '%s %.1f' %(\"\\n=\\n \",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\n", + "Peak voltage\n", + "= V\n", + " 8.91\n", + "(b) DC output voltage\n", + "=V\n", + " 8.55\n", + "Ripple factor in case of capacitor filter \n", + "=2410/C*Rl\n", + "\n", + "=\n", + " 2.4\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_11 Pg-238\n", + "#calculate the LOad connected to the filter,Critical value of inductor,Capacitance\n", + "import math\n", + "Vdc=9. #dc voltage\n", + "Idc=100.*10.**(-3.) #dc load current\n", + "print '%s' %(\"Ripple factor with an L-C filter,r=(0.83/LC)\")\n", + "print '%s' %(\"where L-> Henry,C->microFarad\")\n", + "gamm=0.02 #maximum ripple\n", + "LC=0.83/gamm\n", + "print '%s %.1f' %(\"LC =\",LC) #let LC=42\n", + "\n", + "print '%s' %(\"LOad connected to the filter,\")\n", + "RL=Vdc/Idc #load resistance in ohm\n", + "print '%s %.0f' %(\"RL=ohm\",RL)\n", + "\n", + "print '%s' %(\"Critical value of inductor,\")\n", + "Lk=RL/900. #Critical value of inductor\n", + "print '%s %.1f' %(\"Lk=\",Lk)\n", + "\n", + "print '%s' %(\"Capacitance\")\n", + "LC=42. #rounding of 41.5 to 42\n", + "C=LC/Lk #capacitance in microFarad\n", + "print '%s %.0f' %(\"C =uF\",C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ripple factor with an L-C filter,r=(0.83/LC)\n", + "where L-> Henry,C->microFarad\n", + "LC = 41.5\n", + "LOad connected to the filter,\n", + "RL=ohm 90\n", + "Critical value of inductor,\n", + "Lk= 0.1\n", + "Capacitance\n", + "C =uF 420\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_12 Pg-245\n", + "#calculate Voltage across resistor,Current through series resistor\n", + "V=20. #source voltage\n", + "Vz=12. #zener voltage\n", + "Vr=V-Vz #voltage across resistor \n", + "Rs=330. #series resistance\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vr)\n", + "print '%s' %(\"Current through series resistor\")\n", + "Iser=Vr/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"=mA\",Iser*10**3)\n", + "print '%s' %(\"Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "Current through series resistor\n", + "=mA 24.2\n", + "Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_13 Pg-245\n", + "#calclate Voltage across resistor,Current through series resistor,Current through series load Il,Current through zener diode,Respective wattage of elements used\n", + "V=20. #source voltage in V\n", + "Vz=12. #zener voltage in V\n", + "Vs=V-Vz #voltage across resistor in V \n", + "Rs=330. #series resistance in ohm\n", + "RL=1.5*10**3 #load resistance in ohm\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vs)\n", + "\n", + "print '%s' %(\"(1) Current through series resistor Is\")\n", + "Is=Vs/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"Is=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"(2) Current through series load Il\")\n", + "VL=Vz #voltage across load\n", + "IL=VL/RL #Current through series load\n", + "print '%s %.0f' %(\"IL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"(3)Current through zener diode\")\n", + "Iz=Is-IL #Current through zener diode\n", + "print '%s %.1f' %(\"IL=mA\",Iz*10**3)\n", + "\n", + "print '%s' %(\"(4)Respective wattage of elements used\")\n", + "print '%s' %(\"(a) Series resistor -> W=Is*Vs\")\n", + "W=Vs*Is #wattage of series resistor\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "print '%s' %(\"(b) Zener diode -> W=Iz*Vz\")\n", + "W=Vz*Iz #wattage of zener diode\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "\n", + "print '%s' %(\"(b) Load resistor -> W=IL*VL\")\n", + "W=VL*IL #wattage of zener diode\n", + "print '%s %.0f' %(\"=mW\",W*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "(1) Current through series resistor Is\n", + "Is=mA 24.2\n", + "(2) Current through series load Il\n", + "IL=mA 8\n", + "(3)Current through zener diode\n", + "IL=mA 16.2\n", + "(4)Respective wattage of elements used\n", + "(a) Series resistor -> W=Is*Vs\n", + "=mW 193.9\n", + "(b) Zener diode -> W=Iz*Vz\n", + "=mW 194.9\n", + "(b) Load resistor -> W=IL*VL\n", + "=mW 96\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_14 Pg-246\n", + "#calculate, Applying Thevenin's theorem, Thevenin voltage across the zener diode\n", + "RL=1.*10.**3. #load resistance in ohm\n", + "Rs=270. #series resistor in ohm\n", + "Vs=18. #supply voltage in V\n", + "vz=10. #xener voltage\n", + "print '%s' %(\"Applying Thevenin''s theorem, Thevenin voltage across the zener diode\")\n", + "Vth=(RL/(RL+Rs))*Vs #Thevenin voltage\n", + "print '%s %.1f' %(\"Vth=V\",Vth)\n", + "print '%sf' %(\"Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applying Thevenin''s theorem, Thevenin voltage across the zener diode\n", + "Vth=V 14.2\n", + "Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.f\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_15 Pg-246\n", + "#calculate Average load current,Total current entering the circuit,Series resistor,Power rating of resistor\n", + "IL1=10.*10.**(-3.) \n", + "IL2=20.*10.**(-3.) #IL1,IL2 range of load current in A\n", + "Vin=20. #supply voltage in V\n", + "Izt=6.*10.**(-3.) #zener current in A\n", + "Vz=15. #zener voltage in V\n", + "\n", + "print '%s' %(\"Average load current\")\n", + "IL=(IL1+IL2)/2. # Average load current\n", + "print '%s %.0f' %(\"\\nIL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"Total current entering the circuit\")\n", + "Is=IL+Izt #current entering the circuit\n", + "print '%s %.0f' %(\"\\nIs=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"Series resistor\")\n", + "Rs=(Vin-Vz)/Is #Series resistor in ohm\n", + "print '%s %.0f' %(\"Rs=ohm\",Rs)\n", + "\n", + "print '%s' %(\"Power rating of resistor\")\n", + "Vs=Vin-Vz \n", + "P=(Vs**2.)/Rs #Power rating of resistor\n", + "print '%s %.1f' %(\"\\nP=W\",P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load current\n", + "\n", + "IL=mA 15\n", + "Total current entering the circuit\n", + "\n", + "Is=mA 21\n", + "Series resistor\n", + "Rs=ohm 238\n", + "Power rating of resistor\n", + "\n", + "P=W 0.1\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..90e30550 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_2.ipynb @@ -0,0 +1,825 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2a1eb39510f3631fbcde9a4826e6d686285d8646443cf4d3538c3c9c67fda877" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Diode Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_1 Pg-213\n", + "#calculate Peak source voltage,DC load voltage With an ideal diode and With second approximation\n", + "import math\n", + "Vrms=110. #rms volatage in V\n", + "Vm=Vrms/0.707 #peak source voltage\n", + "print '%s %.1f' %(\"Peak source voltage=V\",Vm) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(a) With an ideal diode \")\n", + "Vpout=Vm #peak output voltage\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vm/math.pi #Dc load voltage\n", + "print '%s %.2f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(b) With second approximation\")\n", + "Vpin=Vm #peak input voltage\n", + "Vpout=Vpin-0.7\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vpout/math.pi #Dc load voltage\n", + "print '%s %.1f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak source voltage=V 155.6\n", + "(a) With an ideal diode \n", + "\n", + " Peak output voltage=V 155.6\n", + "\n", + " DC load voltage=V \n", + " 49.52\n", + "(b) With second approximation\n", + "\n", + " Peak output voltage=V 154.9\n", + "\n", + " DC load voltage=V \n", + " 49.3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_2 Pg-214\n", + "#calculate VR\n", + "print '%s' %(\"VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\")\n", + "print '%s' %(\"(a) VR = 0%\")\n", + "V_FullLoad=20. #full load voltage\n", + "V_NoLoad=V_FullLoad#no load voltage\n", + "print '%s %.0f' %(\"\\n V_FullLoad = V_NoLoad=V\",V_NoLoad)\n", + "print '%s' %(\"(b) VR = 100%\")\n", + "VR=100. #voltage regulation in %\n", + "V_NoLoad=(VR*V_FullLoad)/(100.)+V_FullLoad\n", + "print '%s %.0f' %(\"\\n V_NoLoad=V\",V_NoLoad)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\n", + "(a) VR = 0%\n", + "\n", + " V_FullLoad = V_NoLoad=V 20\n", + "(b) VR = 100%\n", + "\n", + " V_NoLoad=V 40\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_3 Pg-214\n", + "#calculate Ratio of rectification or efficiency of halfwave rectifier,Ac input powerfrom transformer secondary\n", + "print '%s' %(\"Ratio of rectification or efficiency of halfwave rectifier\")\n", + "print '%s' %(\"n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \")\n", + "DC_power=500. #ddc power deliverd to the load\n", + "n=0.406 #efficiency\n", + "AC_in_power=DC_power/n #AC input powerfrom transformer secondary\n", + "print '%s %.0f' %(\"\\n AC input powerfrom transformer secondary =Watt\",AC_in_power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of rectification or efficiency of halfwave rectifier\n", + "n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \n", + "\n", + " AC input powerfrom transformer secondary =Watt 1232\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_4 Pg-220\n", + "#calculate Peak value of current flowing,Average or DC current flowing,R.M.S value of current flowing, DC output power,AC input power,Efficiency of rectifier\n", + "import math\n", + "Rl=3.5*10.**(3.) #resistance in k-ohm\n", + "rF=800. #secondary resistance in k-ohm\n", + "Vm=240.# input voltage\n", + "print '%s' %(\"(1)(a) Peak value of current flowing\")\n", + "Im=Vm/(rF+Rl) #peak current\n", + "print '%s %.2f' %(\"Im=mA\",Im*10**3)\n", + "print '%s' %(\"(b) Average or DC current flowing\")\n", + "Idc=Im/math.pi #DC current\n", + "print '%s %.2f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"(c) R.M.S value of current flowing\")\n", + "Irms=Im/2. #rms current\n", + "print '%s %.2f' %(\"Irms=mA\",Irms*10**3)\n", + "print '%s' %(\"(2) DC output power\")\n", + "Pdc=(Idc)**2.*Rl #dc output power\n", + "print '%s %.1f' %(\"Pdc=Watt\",Pdc)\n", + "print '%s' %(\"(3) AC input power\")\n", + "Pac=(Irms)**2.*(rF+Rl)\n", + "print '%s %.2f' %(\"Pac=Watt\",Pac)\n", + "print '%s' %(\"(4)Efficiency of rectifier\")\n", + "n=(Pdc/Pac)*100. #efficiency\n", + "print '%s %.2f' %(\"n=\",n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)(a) Peak value of current flowing\n", + "Im=mA 55.81\n", + "(b) Average or DC current flowing\n", + "Idc=mA 17.77\n", + "(c) R.M.S value of current flowing\n", + "Irms=mA 27.91\n", + "(2) DC output power\n", + "Pdc=Watt 1.1\n", + "(3) AC input power\n", + "Pac=Watt 3.35\n", + "(4)Efficiency of rectifier\n", + "n= 32.99\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_5 Pg-221\n", + "#calculate Peak output volatge,Average output current,Diode dissipation\n", + "import math\n", + "Vr=0.7 #diodes voltage drop\n", + "Rl=820. #load resistor in ohm\n", + "Vin=40. #input voltage in V\n", + "print '%s' %(\"(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\")\n", + "V_drop_2=2.*Vr #voltage drop across 2 diodes\n", + "Vm=Vin-V_drop_2 #peak voltage\n", + "print '%s %.2f' %(\"\\nVm=V\",Vm)\n", + "print '%s' %(\"\\n(2) Average output current\")\n", + "Idc=(2*Vm/math.pi)/Rl #average output current\n", + "print '%s %.0f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"\\n(3) Diode dissipation\")\n", + "DD=Idc*Vr #Diode dissipation\n", + "print '%s %.0f' %(\"=mW\",DD*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\n", + "\n", + "Vm=V 38.60\n", + "\n", + "(2) Average output current\n", + "Idc=mA 30\n", + "\n", + "(3) Diode dissipation\n", + "=mW 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_6 Pg-222\n", + "#calculate RMS value of secondary voltage,,Peak secondary voltage,Peak inverse voltage of diode,Peak load voltage,DC load voltage\n", + "import math\n", + "Vr=0.7 #voltage drop\n", + "Vi=120. #input voltage\n", + "print '%s' %(\"RMS value of secondary voltage\")\n", + "V_sec=Vi/5. #RMS value of secondary voltage\n", + "print '%s %.0f' %(\"=V\",V_sec)\n", + "print '%s' %(\"Peak secondary voltage\")\n", + "Vm=V_sec*math.sqrt(2.) #Peak secondary voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\"Peak inverse voltage of diode\")\n", + "Vinv=-(Vm) #Peak inverse voltage of diode\n", + "print '%s %.0f' %(\"=V\",Vinv)\n", + "print '%s %.0f' %(\"\\nPeak load voltage=V\",Vm)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"Assuming second approximation\")\n", + "print '%s' %(\"Vm'' = Vm - Vr \")\n", + "print '%s' %(\"Peak load voltage\")\n", + "Vm_dash=Vm-Vr #Peak load voltage\n", + "print '%s %.1f' %(\"=V\",Vm_dash)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm_dash/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of secondary voltage\n", + "=V 24\n", + "Peak secondary voltage\n", + "=V 34\n", + "Peak inverse voltage of diode\n", + "=V -34\n", + "\n", + "Peak load voltage=V 34\n", + "DC load voltage\n", + "=V 10.8\n", + "Assuming second approximation\n", + "Vm'' = Vm - Vr \n", + "Peak load voltage\n", + "=V 33.2\n", + "DC load voltage\n", + "=V 10.6\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_7 Pg-222\n", + "#calculate Secondary RMS voltage,Secondary pek voltage,Half of the secondary voltage is input to the half section,Peak voltage across load,DC load current\n", + "import math\n", + "Vi=120. #supply voltage n V\n", + "Rl=5.*10.**3. #load resistance\n", + "print '%s' %(\"Secondary RMS voltage\")\n", + "Vrms=Vi/5. #Secondary RMS voltage\n", + "print '%s %.0f' %(\"=V\",Vrms)\n", + "print '%s' %(\"Secondary pek voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #Secondary pek voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\" Half of the secondary voltage is input to the half section.\")\n", + "print '%s' %(\"So input to the half section\")\n", + "i=Vm/2. #input to the half section\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"Peak voltage across load\")\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\")\n", + "print '%s' %(\"DC load current\")\n", + "Vdc=i\n", + "Idc=Vdc/Rl #DC load current\n", + "print '%s %.1f' %(\"=mA\",Idc*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Secondary RMS voltage\n", + "=V 24\n", + "Secondary pek voltage\n", + "=V 34\n", + " Half of the secondary voltage is input to the half section.\n", + "So input to the half section\n", + "=V 17\n", + "Peak voltage across load\n", + "=V 17\n", + "DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\n", + "DC load current\n", + "=mA 3.4\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_8 Pg-227\n", + "#calculate Ripple factor for a full wave rectifier,DC output voltage,Percentage voltage regulation\n", + "import math\n", + "f=50. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=2.*10.**3. #load resistance\n", + "Vrms=40. #rms secondary voltage\n", + "print '%s' %(\"(a) Ripple factor for a full wave rectifier\")\n", + "r=1./(4.*math.sqrt(3.)*f*C*Rl) #Ripple factor for a full wave rectifier\n", + "print '%s %.3f' %(\"=\",r)\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vm=Vrms*math.sqrt(2.)\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"(c) Percentage voltage regulation\")\n", + "per=100./(4.*f*C*Rl) #Percentage voltage regulation\n", + "print '%s %.1f' %(\"=\",per)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Ripple factor for a full wave rectifier\n", + "= 0.014\n", + "(b) DC output voltage\n", + "=V 55.2\n", + "(c) Percentage voltage regulation\n", + "= 2.5\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_9 Pg-237\n", + "#calculate Connected load,Ripple factor in case of shunt capacitor filter\n", + "import math\n", + "Vrms=300. #rms voltage in V\n", + "f=60. #frequency\n", + "Idc=0.2 #load current\n", + "C=10. #shunt capacitor in microFarad\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "Vdc=(2*Vm)/math.pi #Dc voltage\n", + "print '%s' %(\"Connected load\")\n", + "Rl=Vdc/Idc #Connected load\n", + "print '%s %.0f' %(\"Rl=ohm = (955.6)*sqrt(2) ohm\\n\",Rl)\n", + "print '%s' %(\"Ripple factor in case of shunt capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(C*Rl) #ripple factor\n", + "print '%s %.2f' %(\"=\",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Connected load\n", + "Rl=ohm = (955.6)*sqrt(2) ohm\n", + " 1350\n", + "Ripple factor in case of shunt capacitor filter \n", + "=2410/C*Rl\n", + "= 0.18\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_10 Pg-238\n", + "#calculate Peak voltage,DC output voltage,Ripple factor in case of capacitor filter\n", + "import math\n", + "f=60. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=1.*10.**3. #load resistance\n", + "\n", + "print '%s' %(\"Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\")\n", + "Vct=12.6 #voltage of center tapped transformer\n", + "Vrms=Vct/2. #rms voltage\n", + "\n", + "print '%s' %(\"Peak voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "print '%s %.2f' %(\"= V\\n \",Vm)\n", + "\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.2f' %(\"=V\\n \",Vdc)\n", + "\n", + "print '%s' %(\"Ripple factor in case of capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(100.*Rl)*100. #ripple factor\n", + "print '%s %.1f' %(\"\\n=\\n \",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\n", + "Peak voltage\n", + "= V\n", + " 8.91\n", + "(b) DC output voltage\n", + "=V\n", + " 8.55\n", + "Ripple factor in case of capacitor filter \n", + "=2410/C*Rl\n", + "\n", + "=\n", + " 2.4\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_11 Pg-238\n", + "#calculate the LOad connected to the filter,Critical value of inductor,Capacitance\n", + "import math\n", + "Vdc=9. #dc voltage\n", + "Idc=100.*10.**(-3.) #dc load current\n", + "print '%s' %(\"Ripple factor with an L-C filter,r=(0.83/LC)\")\n", + "print '%s' %(\"where L-> Henry,C->microFarad\")\n", + "gamm=0.02 #maximum ripple\n", + "LC=0.83/gamm\n", + "print '%s %.1f' %(\"LC =\",LC) #let LC=42\n", + "\n", + "print '%s' %(\"LOad connected to the filter,\")\n", + "RL=Vdc/Idc #load resistance in ohm\n", + "print '%s %.0f' %(\"RL=ohm\",RL)\n", + "\n", + "print '%s' %(\"Critical value of inductor,\")\n", + "Lk=RL/900. #Critical value of inductor\n", + "print '%s %.1f' %(\"Lk=\",Lk)\n", + "\n", + "print '%s' %(\"Capacitance\")\n", + "LC=42. #rounding of 41.5 to 42\n", + "C=LC/Lk #capacitance in microFarad\n", + "print '%s %.0f' %(\"C =uF\",C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ripple factor with an L-C filter,r=(0.83/LC)\n", + "where L-> Henry,C->microFarad\n", + "LC = 41.5\n", + "LOad connected to the filter,\n", + "RL=ohm 90\n", + "Critical value of inductor,\n", + "Lk= 0.1\n", + "Capacitance\n", + "C =uF 420\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_12 Pg-245\n", + "#calculate Voltage across resistor,Current through series resistor\n", + "V=20. #source voltage\n", + "Vz=12. #zener voltage\n", + "Vr=V-Vz #voltage across resistor \n", + "Rs=330. #series resistance\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vr)\n", + "print '%s' %(\"Current through series resistor\")\n", + "Iser=Vr/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"=mA\",Iser*10**3)\n", + "print '%s' %(\"Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "Current through series resistor\n", + "=mA 24.2\n", + "Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_13 Pg-245\n", + "#calclate Voltage across resistor,Current through series resistor,Current through series load Il,Current through zener diode,Respective wattage of elements used\n", + "V=20. #source voltage in V\n", + "Vz=12. #zener voltage in V\n", + "Vs=V-Vz #voltage across resistor in V \n", + "Rs=330. #series resistance in ohm\n", + "RL=1.5*10**3 #load resistance in ohm\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vs)\n", + "\n", + "print '%s' %(\"(1) Current through series resistor Is\")\n", + "Is=Vs/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"Is=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"(2) Current through series load Il\")\n", + "VL=Vz #voltage across load\n", + "IL=VL/RL #Current through series load\n", + "print '%s %.0f' %(\"IL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"(3)Current through zener diode\")\n", + "Iz=Is-IL #Current through zener diode\n", + "print '%s %.1f' %(\"IL=mA\",Iz*10**3)\n", + "\n", + "print '%s' %(\"(4)Respective wattage of elements used\")\n", + "print '%s' %(\"(a) Series resistor -> W=Is*Vs\")\n", + "W=Vs*Is #wattage of series resistor\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "print '%s' %(\"(b) Zener diode -> W=Iz*Vz\")\n", + "W=Vz*Iz #wattage of zener diode\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "\n", + "print '%s' %(\"(b) Load resistor -> W=IL*VL\")\n", + "W=VL*IL #wattage of zener diode\n", + "print '%s %.0f' %(\"=mW\",W*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "(1) Current through series resistor Is\n", + "Is=mA 24.2\n", + "(2) Current through series load Il\n", + "IL=mA 8\n", + "(3)Current through zener diode\n", + "IL=mA 16.2\n", + "(4)Respective wattage of elements used\n", + "(a) Series resistor -> W=Is*Vs\n", + "=mW 193.9\n", + "(b) Zener diode -> W=Iz*Vz\n", + "=mW 194.9\n", + "(b) Load resistor -> W=IL*VL\n", + "=mW 96\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_14 Pg-246\n", + "#calculate, Applying Thevenin's theorem, Thevenin voltage across the zener diode\n", + "RL=1.*10.**3. #load resistance in ohm\n", + "Rs=270. #series resistor in ohm\n", + "Vs=18. #supply voltage in V\n", + "vz=10. #xener voltage\n", + "print '%s' %(\"Applying Thevenin''s theorem, Thevenin voltage across the zener diode\")\n", + "Vth=(RL/(RL+Rs))*Vs #Thevenin voltage\n", + "print '%s %.1f' %(\"Vth=V\",Vth)\n", + "print '%sf' %(\"Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applying Thevenin''s theorem, Thevenin voltage across the zener diode\n", + "Vth=V 14.2\n", + "Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.f\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_15 Pg-246\n", + "#calculate Average load current,Total current entering the circuit,Series resistor,Power rating of resistor\n", + "IL1=10.*10.**(-3.) \n", + "IL2=20.*10.**(-3.) #IL1,IL2 range of load current in A\n", + "Vin=20. #supply voltage in V\n", + "Izt=6.*10.**(-3.) #zener current in A\n", + "Vz=15. #zener voltage in V\n", + "\n", + "print '%s' %(\"Average load current\")\n", + "IL=(IL1+IL2)/2. # Average load current\n", + "print '%s %.0f' %(\"\\nIL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"Total current entering the circuit\")\n", + "Is=IL+Izt #current entering the circuit\n", + "print '%s %.0f' %(\"\\nIs=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"Series resistor\")\n", + "Rs=(Vin-Vz)/Is #Series resistor in ohm\n", + "print '%s %.0f' %(\"Rs=ohm\",Rs)\n", + "\n", + "print '%s' %(\"Power rating of resistor\")\n", + "Vs=Vin-Vz \n", + "P=(Vs**2.)/Rs #Power rating of resistor\n", + "print '%s %.1f' %(\"\\nP=W\",P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load current\n", + "\n", + "IL=mA 15\n", + "Total current entering the circuit\n", + "\n", + "Is=mA 21\n", + "Series resistor\n", + "Rs=ohm 238\n", + "Power rating of resistor\n", + "\n", + "P=W 0.1\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..90e30550 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_4_3.ipynb @@ -0,0 +1,825 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2a1eb39510f3631fbcde9a4826e6d686285d8646443cf4d3538c3c9c67fda877" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 - Diode Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_1 Pg-213\n", + "#calculate Peak source voltage,DC load voltage With an ideal diode and With second approximation\n", + "import math\n", + "Vrms=110. #rms volatage in V\n", + "Vm=Vrms/0.707 #peak source voltage\n", + "print '%s %.1f' %(\"Peak source voltage=V\",Vm) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(a) With an ideal diode \")\n", + "Vpout=Vm #peak output voltage\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vm/math.pi #Dc load voltage\n", + "print '%s %.2f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n", + "\n", + "print '%s' %(\"(b) With second approximation\")\n", + "Vpin=Vm #peak input voltage\n", + "Vpout=Vpin-0.7\n", + "print '%s %.1f' %(\"\\n Peak output voltage=V\",Vpout)\n", + "Vdc=Vpout/math.pi #Dc load voltage\n", + "print '%s %.1f' %(\"\\n DC load voltage=V \\n\",Vdc) #textbook answer wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak source voltage=V 155.6\n", + "(a) With an ideal diode \n", + "\n", + " Peak output voltage=V 155.6\n", + "\n", + " DC load voltage=V \n", + " 49.52\n", + "(b) With second approximation\n", + "\n", + " Peak output voltage=V 154.9\n", + "\n", + " DC load voltage=V \n", + " 49.3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_2 Pg-214\n", + "#calculate VR\n", + "print '%s' %(\"VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\")\n", + "print '%s' %(\"(a) VR = 0%\")\n", + "V_FullLoad=20. #full load voltage\n", + "V_NoLoad=V_FullLoad#no load voltage\n", + "print '%s %.0f' %(\"\\n V_FullLoad = V_NoLoad=V\",V_NoLoad)\n", + "print '%s' %(\"(b) VR = 100%\")\n", + "VR=100. #voltage regulation in %\n", + "V_NoLoad=(VR*V_FullLoad)/(100.)+V_FullLoad\n", + "print '%s %.0f' %(\"\\n V_NoLoad=V\",V_NoLoad)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VR = (V_NoLoad - V_FullLoad)/V_FullLoad*100%\n", + "(a) VR = 0%\n", + "\n", + " V_FullLoad = V_NoLoad=V 20\n", + "(b) VR = 100%\n", + "\n", + " V_NoLoad=V 40\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_3 Pg-214\n", + "#calculate Ratio of rectification or efficiency of halfwave rectifier,Ac input powerfrom transformer secondary\n", + "print '%s' %(\"Ratio of rectification or efficiency of halfwave rectifier\")\n", + "print '%s' %(\"n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \")\n", + "DC_power=500. #ddc power deliverd to the load\n", + "n=0.406 #efficiency\n", + "AC_in_power=DC_power/n #AC input powerfrom transformer secondary\n", + "print '%s %.0f' %(\"\\n AC input powerfrom transformer secondary =Watt\",AC_in_power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of rectification or efficiency of halfwave rectifier\n", + "n = 0.406 = DC power deliverd to the load/AC input powerfrom transformer secondary \n", + "\n", + " AC input powerfrom transformer secondary =Watt 1232\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_4 Pg-220\n", + "#calculate Peak value of current flowing,Average or DC current flowing,R.M.S value of current flowing, DC output power,AC input power,Efficiency of rectifier\n", + "import math\n", + "Rl=3.5*10.**(3.) #resistance in k-ohm\n", + "rF=800. #secondary resistance in k-ohm\n", + "Vm=240.# input voltage\n", + "print '%s' %(\"(1)(a) Peak value of current flowing\")\n", + "Im=Vm/(rF+Rl) #peak current\n", + "print '%s %.2f' %(\"Im=mA\",Im*10**3)\n", + "print '%s' %(\"(b) Average or DC current flowing\")\n", + "Idc=Im/math.pi #DC current\n", + "print '%s %.2f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"(c) R.M.S value of current flowing\")\n", + "Irms=Im/2. #rms current\n", + "print '%s %.2f' %(\"Irms=mA\",Irms*10**3)\n", + "print '%s' %(\"(2) DC output power\")\n", + "Pdc=(Idc)**2.*Rl #dc output power\n", + "print '%s %.1f' %(\"Pdc=Watt\",Pdc)\n", + "print '%s' %(\"(3) AC input power\")\n", + "Pac=(Irms)**2.*(rF+Rl)\n", + "print '%s %.2f' %(\"Pac=Watt\",Pac)\n", + "print '%s' %(\"(4)Efficiency of rectifier\")\n", + "n=(Pdc/Pac)*100. #efficiency\n", + "print '%s %.2f' %(\"n=\",n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)(a) Peak value of current flowing\n", + "Im=mA 55.81\n", + "(b) Average or DC current flowing\n", + "Idc=mA 17.77\n", + "(c) R.M.S value of current flowing\n", + "Irms=mA 27.91\n", + "(2) DC output power\n", + "Pdc=Watt 1.1\n", + "(3) AC input power\n", + "Pac=Watt 3.35\n", + "(4)Efficiency of rectifier\n", + "n= 32.99\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_5 Pg-221\n", + "#calculate Peak output volatge,Average output current,Diode dissipation\n", + "import math\n", + "Vr=0.7 #diodes voltage drop\n", + "Rl=820. #load resistor in ohm\n", + "Vin=40. #input voltage in V\n", + "print '%s' %(\"(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\")\n", + "V_drop_2=2.*Vr #voltage drop across 2 diodes\n", + "Vm=Vin-V_drop_2 #peak voltage\n", + "print '%s %.2f' %(\"\\nVm=V\",Vm)\n", + "print '%s' %(\"\\n(2) Average output current\")\n", + "Idc=(2*Vm/math.pi)/Rl #average output current\n", + "print '%s %.0f' %(\"Idc=mA\",Idc*10**3)\n", + "print '%s' %(\"\\n(3) Diode dissipation\")\n", + "DD=Idc*Vr #Diode dissipation\n", + "print '%s %.0f' %(\"=mW\",DD*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Peak output volatge: Current flows through load only when two diodes conduct. While conducting, there is voltage drop across the diode.\n", + "\n", + "Vm=V 38.60\n", + "\n", + "(2) Average output current\n", + "Idc=mA 30\n", + "\n", + "(3) Diode dissipation\n", + "=mW 21\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_6 Pg-222\n", + "#calculate RMS value of secondary voltage,,Peak secondary voltage,Peak inverse voltage of diode,Peak load voltage,DC load voltage\n", + "import math\n", + "Vr=0.7 #voltage drop\n", + "Vi=120. #input voltage\n", + "print '%s' %(\"RMS value of secondary voltage\")\n", + "V_sec=Vi/5. #RMS value of secondary voltage\n", + "print '%s %.0f' %(\"=V\",V_sec)\n", + "print '%s' %(\"Peak secondary voltage\")\n", + "Vm=V_sec*math.sqrt(2.) #Peak secondary voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\"Peak inverse voltage of diode\")\n", + "Vinv=-(Vm) #Peak inverse voltage of diode\n", + "print '%s %.0f' %(\"=V\",Vinv)\n", + "print '%s %.0f' %(\"\\nPeak load voltage=V\",Vm)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"Assuming second approximation\")\n", + "print '%s' %(\"Vm'' = Vm - Vr \")\n", + "print '%s' %(\"Peak load voltage\")\n", + "Vm_dash=Vm-Vr #Peak load voltage\n", + "print '%s %.1f' %(\"=V\",Vm_dash)\n", + "print '%s' %(\"DC load voltage\")\n", + "Vdc=Vm_dash/math.pi #DC load voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of secondary voltage\n", + "=V 24\n", + "Peak secondary voltage\n", + "=V 34\n", + "Peak inverse voltage of diode\n", + "=V -34\n", + "\n", + "Peak load voltage=V 34\n", + "DC load voltage\n", + "=V 10.8\n", + "Assuming second approximation\n", + "Vm'' = Vm - Vr \n", + "Peak load voltage\n", + "=V 33.2\n", + "DC load voltage\n", + "=V 10.6\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_7 Pg-222\n", + "#calculate Secondary RMS voltage,Secondary pek voltage,Half of the secondary voltage is input to the half section,Peak voltage across load,DC load current\n", + "import math\n", + "Vi=120. #supply voltage n V\n", + "Rl=5.*10.**3. #load resistance\n", + "print '%s' %(\"Secondary RMS voltage\")\n", + "Vrms=Vi/5. #Secondary RMS voltage\n", + "print '%s %.0f' %(\"=V\",Vrms)\n", + "print '%s' %(\"Secondary pek voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #Secondary pek voltage\n", + "print '%s %.0f' %(\"=V\",Vm)\n", + "print '%s' %(\" Half of the secondary voltage is input to the half section.\")\n", + "print '%s' %(\"So input to the half section\")\n", + "i=Vm/2. #input to the half section\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"Peak voltage across load\")\n", + "print '%s %.0f' %(\"=V\",i)\n", + "print '%s' %(\"DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\")\n", + "print '%s' %(\"DC load current\")\n", + "Vdc=i\n", + "Idc=Vdc/Rl #DC load current\n", + "print '%s %.1f' %(\"=mA\",Idc*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Secondary RMS voltage\n", + "=V 24\n", + "Secondary pek voltage\n", + "=V 34\n", + " Half of the secondary voltage is input to the half section.\n", + "So input to the half section\n", + "=V 17\n", + "Peak voltage across load\n", + "=V 17\n", + "DC voltage across load = 17V. Since the capacitor gets changed up to peak value,\n", + "DC load current\n", + "=mA 3.4\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_8 Pg-227\n", + "#calculate Ripple factor for a full wave rectifier,DC output voltage,Percentage voltage regulation\n", + "import math\n", + "f=50. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=2.*10.**3. #load resistance\n", + "Vrms=40. #rms secondary voltage\n", + "print '%s' %(\"(a) Ripple factor for a full wave rectifier\")\n", + "r=1./(4.*math.sqrt(3.)*f*C*Rl) #Ripple factor for a full wave rectifier\n", + "print '%s %.3f' %(\"=\",r)\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vm=Vrms*math.sqrt(2.)\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.1f' %(\"=V\",Vdc)\n", + "print '%s' %(\"(c) Percentage voltage regulation\")\n", + "per=100./(4.*f*C*Rl) #Percentage voltage regulation\n", + "print '%s %.1f' %(\"=\",per)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Ripple factor for a full wave rectifier\n", + "= 0.014\n", + "(b) DC output voltage\n", + "=V 55.2\n", + "(c) Percentage voltage regulation\n", + "= 2.5\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_9 Pg-237\n", + "#calculate Connected load,Ripple factor in case of shunt capacitor filter\n", + "import math\n", + "Vrms=300. #rms voltage in V\n", + "f=60. #frequency\n", + "Idc=0.2 #load current\n", + "C=10. #shunt capacitor in microFarad\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "Vdc=(2*Vm)/math.pi #Dc voltage\n", + "print '%s' %(\"Connected load\")\n", + "Rl=Vdc/Idc #Connected load\n", + "print '%s %.0f' %(\"Rl=ohm = (955.6)*sqrt(2) ohm\\n\",Rl)\n", + "print '%s' %(\"Ripple factor in case of shunt capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(C*Rl) #ripple factor\n", + "print '%s %.2f' %(\"=\",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Connected load\n", + "Rl=ohm = (955.6)*sqrt(2) ohm\n", + " 1350\n", + "Ripple factor in case of shunt capacitor filter \n", + "=2410/C*Rl\n", + "= 0.18\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E10 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_10 Pg-238\n", + "#calculate Peak voltage,DC output voltage,Ripple factor in case of capacitor filter\n", + "import math\n", + "f=60. #frequency in Hz\n", + "C=100.*10.**(-6.) #capacitance in F\n", + "Rl=1.*10.**3. #load resistance\n", + "\n", + "print '%s' %(\"Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\")\n", + "Vct=12.6 #voltage of center tapped transformer\n", + "Vrms=Vct/2. #rms voltage\n", + "\n", + "print '%s' %(\"Peak voltage\")\n", + "Vm=Vrms*math.sqrt(2.) #peak voltage\n", + "print '%s %.2f' %(\"= V\\n \",Vm)\n", + "\n", + "print '%s' %(\"(b) DC output voltage\")\n", + "Vdc=Vm/(1.+(1./(4.*f*C*Rl))) #DC output voltage\n", + "print '%s %.2f' %(\"=V\\n \",Vdc)\n", + "\n", + "print '%s' %(\"Ripple factor in case of capacitor filter \")\n", + "print '%s' %(\"=2410/C*Rl\")\n", + "r=2410./(100.*Rl)*100. #ripple factor\n", + "print '%s %.1f' %(\"\\n=\\n \",r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the transformer is center tapped ,the rms value of voltage across half the secondary coil\n", + "Peak voltage\n", + "= V\n", + " 8.91\n", + "(b) DC output voltage\n", + "=V\n", + " 8.55\n", + "Ripple factor in case of capacitor filter \n", + "=2410/C*Rl\n", + "\n", + "=\n", + " 2.4\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E11 - Pg 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_11 Pg-238\n", + "#calculate the LOad connected to the filter,Critical value of inductor,Capacitance\n", + "import math\n", + "Vdc=9. #dc voltage\n", + "Idc=100.*10.**(-3.) #dc load current\n", + "print '%s' %(\"Ripple factor with an L-C filter,r=(0.83/LC)\")\n", + "print '%s' %(\"where L-> Henry,C->microFarad\")\n", + "gamm=0.02 #maximum ripple\n", + "LC=0.83/gamm\n", + "print '%s %.1f' %(\"LC =\",LC) #let LC=42\n", + "\n", + "print '%s' %(\"LOad connected to the filter,\")\n", + "RL=Vdc/Idc #load resistance in ohm\n", + "print '%s %.0f' %(\"RL=ohm\",RL)\n", + "\n", + "print '%s' %(\"Critical value of inductor,\")\n", + "Lk=RL/900. #Critical value of inductor\n", + "print '%s %.1f' %(\"Lk=\",Lk)\n", + "\n", + "print '%s' %(\"Capacitance\")\n", + "LC=42. #rounding of 41.5 to 42\n", + "C=LC/Lk #capacitance in microFarad\n", + "print '%s %.0f' %(\"C =uF\",C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ripple factor with an L-C filter,r=(0.83/LC)\n", + "where L-> Henry,C->microFarad\n", + "LC = 41.5\n", + "LOad connected to the filter,\n", + "RL=ohm 90\n", + "Critical value of inductor,\n", + "Lk= 0.1\n", + "Capacitance\n", + "C =uF 420\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E12 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_12 Pg-245\n", + "#calculate Voltage across resistor,Current through series resistor\n", + "V=20. #source voltage\n", + "Vz=12. #zener voltage\n", + "Vr=V-Vz #voltage across resistor \n", + "Rs=330. #series resistance\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vr)\n", + "print '%s' %(\"Current through series resistor\")\n", + "Iser=Vr/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"=mA\",Iser*10**3)\n", + "print '%s' %(\"Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "Current through series resistor\n", + "=mA 24.2\n", + "Since Zener diode is in series with resistor, current through it is equal to current flowing through resistor,i.e 24.2mA \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E13 - Pg 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_13 Pg-245\n", + "#calclate Voltage across resistor,Current through series resistor,Current through series load Il,Current through zener diode,Respective wattage of elements used\n", + "V=20. #source voltage in V\n", + "Vz=12. #zener voltage in V\n", + "Vs=V-Vz #voltage across resistor in V \n", + "Rs=330. #series resistance in ohm\n", + "RL=1.5*10**3 #load resistance in ohm\n", + "print '%s' %(\"Voltage across resistor \")\n", + "print '%s %.0f' %(\"=V\",Vs)\n", + "\n", + "print '%s' %(\"(1) Current through series resistor Is\")\n", + "Is=Vs/Rs #Current through series resistor\n", + "print '%s %.1f' %(\"Is=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"(2) Current through series load Il\")\n", + "VL=Vz #voltage across load\n", + "IL=VL/RL #Current through series load\n", + "print '%s %.0f' %(\"IL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"(3)Current through zener diode\")\n", + "Iz=Is-IL #Current through zener diode\n", + "print '%s %.1f' %(\"IL=mA\",Iz*10**3)\n", + "\n", + "print '%s' %(\"(4)Respective wattage of elements used\")\n", + "print '%s' %(\"(a) Series resistor -> W=Is*Vs\")\n", + "W=Vs*Is #wattage of series resistor\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "print '%s' %(\"(b) Zener diode -> W=Iz*Vz\")\n", + "W=Vz*Iz #wattage of zener diode\n", + "print '%s %.1f' %(\"=mW\",W*10**3)\n", + "\n", + "\n", + "print '%s' %(\"(b) Load resistor -> W=IL*VL\")\n", + "W=VL*IL #wattage of zener diode\n", + "print '%s %.0f' %(\"=mW\",W*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across resistor \n", + "=V 8\n", + "(1) Current through series resistor Is\n", + "Is=mA 24.2\n", + "(2) Current through series load Il\n", + "IL=mA 8\n", + "(3)Current through zener diode\n", + "IL=mA 16.2\n", + "(4)Respective wattage of elements used\n", + "(a) Series resistor -> W=Is*Vs\n", + "=mW 193.9\n", + "(b) Zener diode -> W=Iz*Vz\n", + "=mW 194.9\n", + "(b) Load resistor -> W=IL*VL\n", + "=mW 96\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E14 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_14 Pg-246\n", + "#calculate, Applying Thevenin's theorem, Thevenin voltage across the zener diode\n", + "RL=1.*10.**3. #load resistance in ohm\n", + "Rs=270. #series resistor in ohm\n", + "Vs=18. #supply voltage in V\n", + "vz=10. #xener voltage\n", + "print '%s' %(\"Applying Thevenin''s theorem, Thevenin voltage across the zener diode\")\n", + "Vth=(RL/(RL+Rs))*Vs #Thevenin voltage\n", + "print '%s %.1f' %(\"Vth=V\",Vth)\n", + "print '%sf' %(\"Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applying Thevenin''s theorem, Thevenin voltage across the zener diode\n", + "Vth=V 14.2\n", + "Thus Vth is greater than Vz(zener voltage),i.e 14.2 >10. So Zener diode is operating in the breakdown voltage.f\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E15 - Pg 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex4_15 Pg-246\n", + "#calculate Average load current,Total current entering the circuit,Series resistor,Power rating of resistor\n", + "IL1=10.*10.**(-3.) \n", + "IL2=20.*10.**(-3.) #IL1,IL2 range of load current in A\n", + "Vin=20. #supply voltage in V\n", + "Izt=6.*10.**(-3.) #zener current in A\n", + "Vz=15. #zener voltage in V\n", + "\n", + "print '%s' %(\"Average load current\")\n", + "IL=(IL1+IL2)/2. # Average load current\n", + "print '%s %.0f' %(\"\\nIL=mA\",IL*10**3)\n", + "\n", + "print '%s' %(\"Total current entering the circuit\")\n", + "Is=IL+Izt #current entering the circuit\n", + "print '%s %.0f' %(\"\\nIs=mA\",Is*10**3)\n", + "\n", + "print '%s' %(\"Series resistor\")\n", + "Rs=(Vin-Vz)/Is #Series resistor in ohm\n", + "print '%s %.0f' %(\"Rs=ohm\",Rs)\n", + "\n", + "print '%s' %(\"Power rating of resistor\")\n", + "Vs=Vin-Vz \n", + "P=(Vs**2.)/Rs #Power rating of resistor\n", + "print '%s %.1f' %(\"\\nP=W\",P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load current\n", + "\n", + "IL=mA 15\n", + "Total current entering the circuit\n", + "\n", + "Is=mA 21\n", + "Series resistor\n", + "Rs=ohm 238\n", + "Power rating of resistor\n", + "\n", + "P=W 0.1\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..010ef3d2 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_1.ipynb @@ -0,0 +1,147 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0fc065a608f382e46ef4cfe7a37f8897fcb5ae3ef927491454131279917b9b2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 - Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_1 Pg-278\n", + "#calculate Collector current,Emitter current\n", + "alpha_dc=0.97 #transistor current gain\n", + "ICBO=10.*10.**(-6.) #collector to base leakage current in A\n", + "Ib=50.*10.**(-6.) #base current in A\n", + "Ic=((alpha_dc*Ib)/(1.-alpha_dc))+(ICBO/(1.-alpha_dc)) #collector current\n", + "print '%s %.2f' %(\"Collector current =mA\",Ic*10**3)\n", + "Ie=Ic+Ib #emitter current\n", + "print '%s %.0f' %(\"Emitter curren=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector current =mA 1.95\n", + "Emitter curren=mA 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_2 Pg-279\n", + "#calculate Common current gain factor alpha_dc,Dc emitter current gain factor beta,Emitter current\n", + "Ic=5.255*10.**(-3.) #collector current in A\n", + "Ib=100.*10.**(-6.) #base current in A\n", + "ICBO=5.*10.**(-6.) #collector to base leakage current in A\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"Common current gain factor alpha_dc=\",alpha_dc) \n", + "Beta=alpha_dc/(1-alpha_dc) #Dc emitter current gain factor value in text book is wrong\n", + "print '%s %.2f' %(\"\\nDc emitter current gain factor beta =\",Beta)\n", + "Ie=Ic+Ib #emitter current value in text book wrong\n", + "print '%s %.3f' %(\"\\nEmitter current=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Dc emitter current gain factor beta = 50.00\n", + "\n", + "Emitter current=mA 5.355\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_3 Pg-279\n", + "#calculate Dc emitter current gain factor beta,Emitter current,Common current gain factor alpha_dc,Collector current\n", + "Ic=12.427*10.**(-3.) #collector current in A\n", + "Ib=200.*10.**(-6.) #base current in A\n", + "ICBO=7.*10.**(-6.) #collector to base leakage current in A\n", + "Beta=(Ic-ICBO)/(Ib+ICBO) #Dc emitter current gain factor (value in texbook is wrong)\n", + "print '%s %.0f' %(\"\\nDc emitter current gain factor beta=\",Beta)\n", + "Ie=Ic+Ib #emitter current \n", + "print '%s %.1f' %(\"\\nEmitter current=mA\",Ie*10**3)\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"\\nCommon current gain factor alpha_dc=\",alpha_dc) \n", + "Ib=150.*10.**(-6.) #new base current\n", + "Ic=Beta*Ib+(Beta+1.)*ICBO #collector current (value in textbook is wrong)\n", + "print '%s %.3f' %(\"\\nCollector current=mA\",Ic*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Dc emitter current gain factor beta= 60\n", + "\n", + "Emitter current=mA 12.6\n", + "\n", + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Collector current=mA 9.427\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..010ef3d2 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_2.ipynb @@ -0,0 +1,147 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0fc065a608f382e46ef4cfe7a37f8897fcb5ae3ef927491454131279917b9b2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 - Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_1 Pg-278\n", + "#calculate Collector current,Emitter current\n", + "alpha_dc=0.97 #transistor current gain\n", + "ICBO=10.*10.**(-6.) #collector to base leakage current in A\n", + "Ib=50.*10.**(-6.) #base current in A\n", + "Ic=((alpha_dc*Ib)/(1.-alpha_dc))+(ICBO/(1.-alpha_dc)) #collector current\n", + "print '%s %.2f' %(\"Collector current =mA\",Ic*10**3)\n", + "Ie=Ic+Ib #emitter current\n", + "print '%s %.0f' %(\"Emitter curren=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector current =mA 1.95\n", + "Emitter curren=mA 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_2 Pg-279\n", + "#calculate Common current gain factor alpha_dc,Dc emitter current gain factor beta,Emitter current\n", + "Ic=5.255*10.**(-3.) #collector current in A\n", + "Ib=100.*10.**(-6.) #base current in A\n", + "ICBO=5.*10.**(-6.) #collector to base leakage current in A\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"Common current gain factor alpha_dc=\",alpha_dc) \n", + "Beta=alpha_dc/(1-alpha_dc) #Dc emitter current gain factor value in text book is wrong\n", + "print '%s %.2f' %(\"\\nDc emitter current gain factor beta =\",Beta)\n", + "Ie=Ic+Ib #emitter current value in text book wrong\n", + "print '%s %.3f' %(\"\\nEmitter current=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Dc emitter current gain factor beta = 50.00\n", + "\n", + "Emitter current=mA 5.355\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_3 Pg-279\n", + "#calculate Dc emitter current gain factor beta,Emitter current,Common current gain factor alpha_dc,Collector current\n", + "Ic=12.427*10.**(-3.) #collector current in A\n", + "Ib=200.*10.**(-6.) #base current in A\n", + "ICBO=7.*10.**(-6.) #collector to base leakage current in A\n", + "Beta=(Ic-ICBO)/(Ib+ICBO) #Dc emitter current gain factor (value in texbook is wrong)\n", + "print '%s %.0f' %(\"\\nDc emitter current gain factor beta=\",Beta)\n", + "Ie=Ic+Ib #emitter current \n", + "print '%s %.1f' %(\"\\nEmitter current=mA\",Ie*10**3)\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"\\nCommon current gain factor alpha_dc=\",alpha_dc) \n", + "Ib=150.*10.**(-6.) #new base current\n", + "Ic=Beta*Ib+(Beta+1.)*ICBO #collector current (value in textbook is wrong)\n", + "print '%s %.3f' %(\"\\nCollector current=mA\",Ic*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Dc emitter current gain factor beta= 60\n", + "\n", + "Emitter current=mA 12.6\n", + "\n", + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Collector current=mA 9.427\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..010ef3d2 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_5_3.ipynb @@ -0,0 +1,147 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0fc065a608f382e46ef4cfe7a37f8897fcb5ae3ef927491454131279917b9b2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 - Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_1 Pg-278\n", + "#calculate Collector current,Emitter current\n", + "alpha_dc=0.97 #transistor current gain\n", + "ICBO=10.*10.**(-6.) #collector to base leakage current in A\n", + "Ib=50.*10.**(-6.) #base current in A\n", + "Ic=((alpha_dc*Ib)/(1.-alpha_dc))+(ICBO/(1.-alpha_dc)) #collector current\n", + "print '%s %.2f' %(\"Collector current =mA\",Ic*10**3)\n", + "Ie=Ic+Ib #emitter current\n", + "print '%s %.0f' %(\"Emitter curren=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector current =mA 1.95\n", + "Emitter curren=mA 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_2 Pg-279\n", + "#calculate Common current gain factor alpha_dc,Dc emitter current gain factor beta,Emitter current\n", + "Ic=5.255*10.**(-3.) #collector current in A\n", + "Ib=100.*10.**(-6.) #base current in A\n", + "ICBO=5.*10.**(-6.) #collector to base leakage current in A\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"Common current gain factor alpha_dc=\",alpha_dc) \n", + "Beta=alpha_dc/(1-alpha_dc) #Dc emitter current gain factor value in text book is wrong\n", + "print '%s %.2f' %(\"\\nDc emitter current gain factor beta =\",Beta)\n", + "Ie=Ic+Ib #emitter current value in text book wrong\n", + "print '%s %.3f' %(\"\\nEmitter current=mA\",Ie*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Dc emitter current gain factor beta = 50.00\n", + "\n", + "Emitter current=mA 5.355\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex5_3 Pg-279\n", + "#calculate Dc emitter current gain factor beta,Emitter current,Common current gain factor alpha_dc,Collector current\n", + "Ic=12.427*10.**(-3.) #collector current in A\n", + "Ib=200.*10.**(-6.) #base current in A\n", + "ICBO=7.*10.**(-6.) #collector to base leakage current in A\n", + "Beta=(Ic-ICBO)/(Ib+ICBO) #Dc emitter current gain factor (value in texbook is wrong)\n", + "print '%s %.0f' %(\"\\nDc emitter current gain factor beta=\",Beta)\n", + "Ie=Ic+Ib #emitter current \n", + "print '%s %.1f' %(\"\\nEmitter current=mA\",Ie*10**3)\n", + "alpha_dc=(Ic-ICBO)/(Ib+Ic) #common current gain factor\n", + "print '%s %.2f' %(\"\\nCommon current gain factor alpha_dc=\",alpha_dc) \n", + "Ib=150.*10.**(-6.) #new base current\n", + "Ic=Beta*Ib+(Beta+1.)*ICBO #collector current (value in textbook is wrong)\n", + "print '%s %.3f' %(\"\\nCollector current=mA\",Ic*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Dc emitter current gain factor beta= 60\n", + "\n", + "Emitter current=mA 12.6\n", + "\n", + "Common current gain factor alpha_dc= 0.98\n", + "\n", + "Collector current=mA 9.427\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f251fb09 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_1.ipynb @@ -0,0 +1,202 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30ef5343042903d8510275136ddf0764ce01b270d174089f40bb683199c9a8e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 - Thermal Stability" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_1 Pg-333\n", + "#calculate The relation for thermal stability\n", + "Ta=25. #ambient temperature in degree celsius\n", + "tetha=10. #thermal resistance \n", + "Pd=2. #power dessipated in transistor\n", + "Tj=Ta+tetha*Pd #collector base junction transistor temperature\n", + "print '%s %.0f' %(\"\\nCollector base junction transistor temperature=degree celcius\\n\",Tj)\n", + "print '%s' %(\"tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\")\n", + "print '%s' %(\"\\nWhile using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\\nThe heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\\n \")\n", + "print '%s' %(\"(del_Pd/del_Tj) < (1/tetha)\")\n", + "print '%s' %(\"This is the relation for thermal stability.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Collector base junction transistor temperature=degree celcius\n", + " 45\n", + "tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\n", + "\n", + "While using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\n", + "The heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\n", + " \n", + "(del_Pd/del_Tj) < (1/tetha)\n", + "This is the relation for thermal stability.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_2 Pg-335\n", + "#calculate the dissipation capability at 50 degree celcius\n", + "print '%s' %(\"Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\\nJoin the point of intersection P through a horizontal line at Y-axis.\\nThe point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\\n\")\n", + "per=.45 #permissible dissipation in percentage\n", + "max_diss=165. #maximum dissipation\n", + "diss_cap=per*max_diss #dissipation capability\n", + "print '%s' %(\"The dissipation capability at 50 degree celcius\")\n", + "print '%s %.0f' %(\"= %.0f mW \\n \",diss_cap)\n", + "print '%s' %(\"Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\")\n", + "print '%s' %(\"Tj = Ta + tetha*Pd\")\n", + "print '%s' %(\"The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\n", + "Join the point of intersection P through a horizontal line at Y-axis.\n", + "The point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\n", + "\n", + "The dissipation capability at 50 degree celcius\n", + "= %.0f mW \n", + " 74\n", + "Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\n", + "Tj = Ta + tetha*Pd\n", + "The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_3 Pg-335\n", + "#calculate The operating point coordinates\n", + "Rb=200.*10.**(3.) #base resistance in ohm\n", + "Vcc=10. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=2.*10.**(3.) #load resistor in ohm\n", + "Beta=50. #transistor gain\n", + "print '%s' %(\"If Beta=50\")\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current\n", + "Vce=Vcc-Ic*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce, Ic*10**3)\n", + "print '%s' %(\"\\nIf Beta=60\")\n", + "Beta2=60 #second transistor gain \n", + "Ic2=Beta2*Ib #collector current\n", + "Vce2=Vcc-Ic2*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce2, Ic2*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If Beta=50\n", + "The operating point coordinates are [V,mA]\n", + " 5.35 2.33\n", + "\n", + "If Beta=60\n", + "The operating point coordinates are [V,mA]\n", + " 4.42 2.79\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_4 Pg-335\n", + "#calculate The collector emitter voltage\n", + "Rb=330.*10.**(3.) #base resistance in ohm\n", + "Vcc=15. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=3.3*10.**(3.) #load resistor in ohm\n", + "Beta=60. #transistor gain\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current (value in textbook is wrong)\n", + "Vce=Vcc-(Ic+Ib)*Rl \n", + "print '%s %.2f' %(\"The collector emitter voltage=V\",Vce)\n", + "#collector emitter voltage (value in textbook is wrong) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector emitter voltage=V 6.28\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f251fb09 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_2.ipynb @@ -0,0 +1,202 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30ef5343042903d8510275136ddf0764ce01b270d174089f40bb683199c9a8e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 - Thermal Stability" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_1 Pg-333\n", + "#calculate The relation for thermal stability\n", + "Ta=25. #ambient temperature in degree celsius\n", + "tetha=10. #thermal resistance \n", + "Pd=2. #power dessipated in transistor\n", + "Tj=Ta+tetha*Pd #collector base junction transistor temperature\n", + "print '%s %.0f' %(\"\\nCollector base junction transistor temperature=degree celcius\\n\",Tj)\n", + "print '%s' %(\"tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\")\n", + "print '%s' %(\"\\nWhile using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\\nThe heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\\n \")\n", + "print '%s' %(\"(del_Pd/del_Tj) < (1/tetha)\")\n", + "print '%s' %(\"This is the relation for thermal stability.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Collector base junction transistor temperature=degree celcius\n", + " 45\n", + "tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\n", + "\n", + "While using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\n", + "The heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\n", + " \n", + "(del_Pd/del_Tj) < (1/tetha)\n", + "This is the relation for thermal stability.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_2 Pg-335\n", + "#calculate the dissipation capability at 50 degree celcius\n", + "print '%s' %(\"Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\\nJoin the point of intersection P through a horizontal line at Y-axis.\\nThe point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\\n\")\n", + "per=.45 #permissible dissipation in percentage\n", + "max_diss=165. #maximum dissipation\n", + "diss_cap=per*max_diss #dissipation capability\n", + "print '%s' %(\"The dissipation capability at 50 degree celcius\")\n", + "print '%s %.0f' %(\"= %.0f mW \\n \",diss_cap)\n", + "print '%s' %(\"Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\")\n", + "print '%s' %(\"Tj = Ta + tetha*Pd\")\n", + "print '%s' %(\"The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\n", + "Join the point of intersection P through a horizontal line at Y-axis.\n", + "The point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\n", + "\n", + "The dissipation capability at 50 degree celcius\n", + "= %.0f mW \n", + " 74\n", + "Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\n", + "Tj = Ta + tetha*Pd\n", + "The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_3 Pg-335\n", + "#calculate The operating point coordinates\n", + "Rb=200.*10.**(3.) #base resistance in ohm\n", + "Vcc=10. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=2.*10.**(3.) #load resistor in ohm\n", + "Beta=50. #transistor gain\n", + "print '%s' %(\"If Beta=50\")\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current\n", + "Vce=Vcc-Ic*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce, Ic*10**3)\n", + "print '%s' %(\"\\nIf Beta=60\")\n", + "Beta2=60 #second transistor gain \n", + "Ic2=Beta2*Ib #collector current\n", + "Vce2=Vcc-Ic2*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce2, Ic2*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If Beta=50\n", + "The operating point coordinates are [V,mA]\n", + " 5.35 2.33\n", + "\n", + "If Beta=60\n", + "The operating point coordinates are [V,mA]\n", + " 4.42 2.79\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_4 Pg-335\n", + "#calculate The collector emitter voltage\n", + "Rb=330.*10.**(3.) #base resistance in ohm\n", + "Vcc=15. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=3.3*10.**(3.) #load resistor in ohm\n", + "Beta=60. #transistor gain\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current (value in textbook is wrong)\n", + "Vce=Vcc-(Ic+Ib)*Rl \n", + "print '%s %.2f' %(\"The collector emitter voltage=V\",Vce)\n", + "#collector emitter voltage (value in textbook is wrong) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector emitter voltage=V 6.28\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f251fb09 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_6_3.ipynb @@ -0,0 +1,202 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30ef5343042903d8510275136ddf0764ce01b270d174089f40bb683199c9a8e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 - Thermal Stability" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_1 Pg-333\n", + "#calculate The relation for thermal stability\n", + "Ta=25. #ambient temperature in degree celsius\n", + "tetha=10. #thermal resistance \n", + "Pd=2. #power dessipated in transistor\n", + "Tj=Ta+tetha*Pd #collector base junction transistor temperature\n", + "print '%s %.0f' %(\"\\nCollector base junction transistor temperature=degree celcius\\n\",Tj)\n", + "print '%s' %(\"tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\")\n", + "print '%s' %(\"\\nWhile using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\\nThe heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\\n \")\n", + "print '%s' %(\"(del_Pd/del_Tj) < (1/tetha)\")\n", + "print '%s' %(\"This is the relation for thermal stability.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Collector base junction transistor temperature=degree celcius\n", + " 45\n", + "tetha=10 degree celcius/watt means for every watt consumed its temperature will rise by 10 degree celcius\n", + "\n", + "While using a transistor,we must keep in mind that it must not reach a condition called thermal runaway.\n", + "The heat released at collector base junction must not exceed the rate at which heat can dissipated under steady state. For this,\n", + " \n", + "(del_Pd/del_Tj) < (1/tetha)\n", + "This is the relation for thermal stability.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_2 Pg-335\n", + "#calculate the dissipation capability at 50 degree celcius\n", + "print '%s' %(\"Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\\nJoin the point of intersection P through a horizontal line at Y-axis.\\nThe point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\\n\")\n", + "per=.45 #permissible dissipation in percentage\n", + "max_diss=165. #maximum dissipation\n", + "diss_cap=per*max_diss #dissipation capability\n", + "print '%s' %(\"The dissipation capability at 50 degree celcius\")\n", + "print '%s %.0f' %(\"= %.0f mW \\n \",diss_cap)\n", + "print '%s' %(\"Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\")\n", + "print '%s' %(\"Tj = Ta + tetha*Pd\")\n", + "print '%s' %(\"The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Draw a vertical line from temperature axis at 50 degree celcius to cut the 71 degree celcius line.\n", + "Join the point of intersection P through a horizontal line at Y-axis.\n", + "The point where it intersects Y-axis gives the value of permissible dissipation equal to 45 of maximum rating.\n", + "\n", + "The dissipation capability at 50 degree celcius\n", + "= %.0f mW \n", + " 74\n", + "Its value ranges from (0.2) degree celcius/watt to (1000) degree celcius/watt for a transistor that has an efficient heat sink\n", + "Tj = Ta + tetha*Pd\n", + "The above equation reflects that collector-junction temperature Tj of the transistor will be higher than ambient temperature Ta by an amount equal to the product of tetha and Pd.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_3 Pg-335\n", + "#calculate The operating point coordinates\n", + "Rb=200.*10.**(3.) #base resistance in ohm\n", + "Vcc=10. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=2.*10.**(3.) #load resistor in ohm\n", + "Beta=50. #transistor gain\n", + "print '%s' %(\"If Beta=50\")\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current\n", + "Vce=Vcc-Ic*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce, Ic*10**3)\n", + "print '%s' %(\"\\nIf Beta=60\")\n", + "Beta2=60 #second transistor gain \n", + "Ic2=Beta2*Ib #collector current\n", + "Vce2=Vcc-Ic2*Rl #collector emitter voltage\n", + "print '%s %.2f %.2f' %(\"The operating point coordinates are [V,mA]\\n\",Vce2, Ic2*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If Beta=50\n", + "The operating point coordinates are [V,mA]\n", + " 5.35 2.33\n", + "\n", + "If Beta=60\n", + "The operating point coordinates are [V,mA]\n", + " 4.42 2.79\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex6_4 Pg-335\n", + "#calculate The collector emitter voltage\n", + "Rb=330.*10.**(3.) #base resistance in ohm\n", + "Vcc=15. #supply voltage in V\n", + "Vbe=0.7 #voltage drop in V\n", + "Rl=3.3*10.**(3.) #load resistor in ohm\n", + "Beta=60. #transistor gain\n", + "Ib=(Vcc-Vbe)/Rb #base current in A\n", + "Ic=Beta*Ib #collector current (value in textbook is wrong)\n", + "Vce=Vcc-(Ic+Ib)*Rl \n", + "print '%s %.2f' %(\"The collector emitter voltage=V\",Vce)\n", + "#collector emitter voltage (value in textbook is wrong) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector emitter voltage=V 6.28\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..15242e34 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_1.ipynb @@ -0,0 +1,451 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66025946991647ff9e251a330d5b2003c23b73f54893a4b198da6580fdd0210c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 - Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_1 Pg-369\n", + "#calculate Lowest frequency\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.19\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=68.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 3 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.19\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 2.34\n", + "or lowest frequency is approximately 3 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_2 Pg-369\n", + "#calculate\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.20\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=220.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 1 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.20\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 0.72\n", + "or lowest frequency is approximately 1 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_3 Pg-369\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance\n", + "Beta=250. #transistor gain\n", + "Vcc=15. #supply voltage\n", + "R1=2000. #resistor R1 in ohm\n", + "R2=470. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=220. #emitter resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"(1) Base voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current \")\n", + "print '%s %.3f' %(\"Ie=*10**-2 A\",Ie*10**2)\n", + "print '%s' %(\"For small signal operation, ie <= 0.1*Ie\")\n", + "ie=0.1*Ie \n", + "print '%s %.3f' %(\"=mA\",ie*10**3)\n", + "print '%s' %(\"(2) AC emitter diode resistance =25mV/ie\")\n", + "Re_ac=25.*10.**(-3.)/ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",Re_ac)\n", + "print '%s' %(\"(3) Z''vm = Beta*r''e\")\n", + "Re_ac=26. #AC emitter diode resistance assumed 26 ohm not 25.53 ohm\n", + "Zvm=Beta*Re_ac\n", + "print '%s %.0f' %(\"=ohm\",Zvm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Base voltage Vb\n", + "=V 2.85\n", + "Emitter voltage Vb\n", + "=V 2.15\n", + "Emitter current \n", + "Ie=*10**-2 A 0.979\n", + "For small signal operation, ie <= 0.1*Ie\n", + "=mA 0.979\n", + "(2) AC emitter diode resistance =25mV/ie\n", + "=ohm 26\n", + "(3) Z''vm = Beta*r''e\n", + "=ohm 6500\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_4 Pg-370\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance,Voltage gai,Zin stage,Input voltage,Output voltage\n", + "import math \n", + "Beta=100. #transistor gain\n", + "Vcc=10.#supply voltage\n", + "R1=10.*10.**(3.) #resistor R1 in ohm\n", + "R2=2200. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=2000. #emitter resistor in ohm\n", + "Rs=600. #source resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"Base voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current\")\n", + "print '%s %.2f' %(\"=mA\",Ie*10**3)\n", + "print '%s' %(\"AC emitter diode resistance =25mV/ie\")\n", + "re=25.*10.**(-3.)/Ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",re)\n", + "rc=((3.6*10.)/(3.6+10.))*10.**(3.) #Collector dioed resistance\n", + "A=rc/re #voltage gain(value in text book is wrong)\n", + "print '%s' %(\"Voltage gain A\")\n", + "print '%s %.0f' %(\"=\",A)\n", + "zin_1=((10.*2.2)/(10.+2.2))\n", + "zin=((zin_1*Beta*A)/(zin_1+(Beta*A)))*1000\n", + "print '%s' %(\"Zin stage\")\n", + "print '%s %.3f' %(\"=kohm\",zin*10**-3)\n", + "Vin=(zin/(Rs+zin))*10.**(-3.) #input voltage (value in text book is wrong)\n", + "print '%s' %(\"Input voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vin*10**3)\n", + "Vout=A*Vin #output voltage (value in textbook is wrong)\n", + "print '%s' %(\"Output voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vout*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base voltage Vb\n", + "=V 1.8\n", + "Emitter voltage Vb\n", + "=V 1.1\n", + "Emitter current\n", + "=mA 0.55\n", + "AC emitter diode resistance =25mV/ie\n", + "=ohm 45\n", + "Voltage gain A\n", + "= 58\n", + "Zin stage\n", + "=kohm 1.803\n", + "Input voltage\n", + "=mV 0.75\n", + "Output voltage\n", + "=mV 43.82\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_5 Pg-371\n", + "#calculate\n", + "hfe=50. #current gain\n", + "Rl=10.*10.**(3.) #load resistor in ohm\n", + "Rs=500. #source resistor in ohm\n", + "hie=10.**(3.) #input resitance in ohm\n", + "A=hfe*Rl/(Rs+hie) #volatge gain\n", + "print '%s %.1f' %(\"Voltage gain=\",A)\n", + "Vs=0.02 #source voltage in V\n", + "Vout=A*Vs #output voltage\n", + "print '%s %.2f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain= 333.3\n", + "Output voltage=V 6.67\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_6 Pg-372\n", + "#calculate Voltage gain,Power gain\n", + "import math\n", + "Vout=5. #output voltage\n", + "Vin=0.5 #input voltage\n", + "Ri=10.*10.**(3.) #input resistance in ohm\n", + "Ro=10. #output resistance\n", + "A=Vout/Vin #voltage gain\n", + "print '%s %.0f' %(\"Voltage gain =%.0f \\n\",A)\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain\n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB \\n\\n\",Pow_gain)\n", + "print '%s' %(\"When Ri=Ro\")\n", + "Ri=Ro\n", + "A=Vout/Vin #voltage gain\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain \n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB\",Pow_gain)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain =%.0f \n", + " 10\n", + " Power gain(in decibel) = %.0f dB \n", + "\n", + " 50\n", + "When Ri=Ro\n", + " Power gain(in decibel) = %.0f dB 20\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_7 Pg-372\n", + "#calculate\n", + "import math\n", + "Rl=2.*10.**(3.) #load resistance in ohm\n", + "Ri=500. #input resistance in ohm\n", + "C=2.*10.**(-6.) #capacitor in microFarad\n", + "f=(1./(2.*math.pi*C*(Rl+Ri))) #textbook answer is wrong\n", + "print '%s %.0f' %(\"Lowest cut-off frequency=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lowest cut-off frequency=Hz 32\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_8 Pg-372\n", + "#calculate Coupling Capacitor\n", + "import math\n", + "Rl=20.*10.**(3.) #loaH resistance in ohm\n", + "Ri=5000. #input resistance in ohm\n", + "f=33. #lower cut-off frequency in Hz\n", + "f2=33.*10.**(3.) #higher cut-off frequency\n", + "C=(1./(2.*math.pi*f*(Rl+Ri))) #coupling capacitance (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Coupling Capacitor=uF\",C*10**6)\n", + "Req=(Rl*Ri)/(Rl+Ri) #equivalent resistance\n", + "Cs=1/(2*math.pi*f2*Req) #shunting capacitance (value in textbook is wrong)\n", + "print '%s %.0f' %(\"Coupling Capacitor=uF\",Cs*10**12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coupling Capacitor=uF 0.2\n", + "Coupling Capacitor=uF 1206\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_9 Pg-373\n", + "#calculate Voltage Amplification,Output voltage\n", + "Rd=3000. #source resistance in ohm\n", + "Rl=5000. #load resistance in ohm\n", + "Req=Rd*Rl/(Rd+Rl) #equivqlent resistance\n", + "gm=4500.*10.**(-6.) #voltage gain in microMhos\n", + "Av=(-1.)*gm*Req #voltage amplification\n", + "print '%s %.2f' %(\"Voltage Amplification=\",Av)\n", + "Vi=100.*10.**(-3.) #input voltage\n", + "Vout=abs(Av)*Vi #output voltage (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Amplification= -8.44\n", + "Output voltage=V 0.8\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..15242e34 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_2.ipynb @@ -0,0 +1,451 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66025946991647ff9e251a330d5b2003c23b73f54893a4b198da6580fdd0210c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 - Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_1 Pg-369\n", + "#calculate Lowest frequency\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.19\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=68.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 3 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.19\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 2.34\n", + "or lowest frequency is approximately 3 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_2 Pg-369\n", + "#calculate\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.20\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=220.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 1 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.20\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 0.72\n", + "or lowest frequency is approximately 1 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_3 Pg-369\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance\n", + "Beta=250. #transistor gain\n", + "Vcc=15. #supply voltage\n", + "R1=2000. #resistor R1 in ohm\n", + "R2=470. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=220. #emitter resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"(1) Base voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current \")\n", + "print '%s %.3f' %(\"Ie=*10**-2 A\",Ie*10**2)\n", + "print '%s' %(\"For small signal operation, ie <= 0.1*Ie\")\n", + "ie=0.1*Ie \n", + "print '%s %.3f' %(\"=mA\",ie*10**3)\n", + "print '%s' %(\"(2) AC emitter diode resistance =25mV/ie\")\n", + "Re_ac=25.*10.**(-3.)/ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",Re_ac)\n", + "print '%s' %(\"(3) Z''vm = Beta*r''e\")\n", + "Re_ac=26. #AC emitter diode resistance assumed 26 ohm not 25.53 ohm\n", + "Zvm=Beta*Re_ac\n", + "print '%s %.0f' %(\"=ohm\",Zvm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Base voltage Vb\n", + "=V 2.85\n", + "Emitter voltage Vb\n", + "=V 2.15\n", + "Emitter current \n", + "Ie=*10**-2 A 0.979\n", + "For small signal operation, ie <= 0.1*Ie\n", + "=mA 0.979\n", + "(2) AC emitter diode resistance =25mV/ie\n", + "=ohm 26\n", + "(3) Z''vm = Beta*r''e\n", + "=ohm 6500\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_4 Pg-370\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance,Voltage gai,Zin stage,Input voltage,Output voltage\n", + "import math \n", + "Beta=100. #transistor gain\n", + "Vcc=10.#supply voltage\n", + "R1=10.*10.**(3.) #resistor R1 in ohm\n", + "R2=2200. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=2000. #emitter resistor in ohm\n", + "Rs=600. #source resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"Base voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current\")\n", + "print '%s %.2f' %(\"=mA\",Ie*10**3)\n", + "print '%s' %(\"AC emitter diode resistance =25mV/ie\")\n", + "re=25.*10.**(-3.)/Ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",re)\n", + "rc=((3.6*10.)/(3.6+10.))*10.**(3.) #Collector dioed resistance\n", + "A=rc/re #voltage gain(value in text book is wrong)\n", + "print '%s' %(\"Voltage gain A\")\n", + "print '%s %.0f' %(\"=\",A)\n", + "zin_1=((10.*2.2)/(10.+2.2))\n", + "zin=((zin_1*Beta*A)/(zin_1+(Beta*A)))*1000\n", + "print '%s' %(\"Zin stage\")\n", + "print '%s %.3f' %(\"=kohm\",zin*10**-3)\n", + "Vin=(zin/(Rs+zin))*10.**(-3.) #input voltage (value in text book is wrong)\n", + "print '%s' %(\"Input voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vin*10**3)\n", + "Vout=A*Vin #output voltage (value in textbook is wrong)\n", + "print '%s' %(\"Output voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vout*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base voltage Vb\n", + "=V 1.8\n", + "Emitter voltage Vb\n", + "=V 1.1\n", + "Emitter current\n", + "=mA 0.55\n", + "AC emitter diode resistance =25mV/ie\n", + "=ohm 45\n", + "Voltage gain A\n", + "= 58\n", + "Zin stage\n", + "=kohm 1.803\n", + "Input voltage\n", + "=mV 0.75\n", + "Output voltage\n", + "=mV 43.82\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_5 Pg-371\n", + "#calculate\n", + "hfe=50. #current gain\n", + "Rl=10.*10.**(3.) #load resistor in ohm\n", + "Rs=500. #source resistor in ohm\n", + "hie=10.**(3.) #input resitance in ohm\n", + "A=hfe*Rl/(Rs+hie) #volatge gain\n", + "print '%s %.1f' %(\"Voltage gain=\",A)\n", + "Vs=0.02 #source voltage in V\n", + "Vout=A*Vs #output voltage\n", + "print '%s %.2f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain= 333.3\n", + "Output voltage=V 6.67\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_6 Pg-372\n", + "#calculate Voltage gain,Power gain\n", + "import math\n", + "Vout=5. #output voltage\n", + "Vin=0.5 #input voltage\n", + "Ri=10.*10.**(3.) #input resistance in ohm\n", + "Ro=10. #output resistance\n", + "A=Vout/Vin #voltage gain\n", + "print '%s %.0f' %(\"Voltage gain =%.0f \\n\",A)\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain\n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB \\n\\n\",Pow_gain)\n", + "print '%s' %(\"When Ri=Ro\")\n", + "Ri=Ro\n", + "A=Vout/Vin #voltage gain\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain \n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB\",Pow_gain)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain =%.0f \n", + " 10\n", + " Power gain(in decibel) = %.0f dB \n", + "\n", + " 50\n", + "When Ri=Ro\n", + " Power gain(in decibel) = %.0f dB 20\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_7 Pg-372\n", + "#calculate\n", + "import math\n", + "Rl=2.*10.**(3.) #load resistance in ohm\n", + "Ri=500. #input resistance in ohm\n", + "C=2.*10.**(-6.) #capacitor in microFarad\n", + "f=(1./(2.*math.pi*C*(Rl+Ri))) #textbook answer is wrong\n", + "print '%s %.0f' %(\"Lowest cut-off frequency=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lowest cut-off frequency=Hz 32\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_8 Pg-372\n", + "#calculate Coupling Capacitor\n", + "import math\n", + "Rl=20.*10.**(3.) #loaH resistance in ohm\n", + "Ri=5000. #input resistance in ohm\n", + "f=33. #lower cut-off frequency in Hz\n", + "f2=33.*10.**(3.) #higher cut-off frequency\n", + "C=(1./(2.*math.pi*f*(Rl+Ri))) #coupling capacitance (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Coupling Capacitor=uF\",C*10**6)\n", + "Req=(Rl*Ri)/(Rl+Ri) #equivalent resistance\n", + "Cs=1/(2*math.pi*f2*Req) #shunting capacitance (value in textbook is wrong)\n", + "print '%s %.0f' %(\"Coupling Capacitor=uF\",Cs*10**12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coupling Capacitor=uF 0.2\n", + "Coupling Capacitor=uF 1206\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_9 Pg-373\n", + "#calculate Voltage Amplification,Output voltage\n", + "Rd=3000. #source resistance in ohm\n", + "Rl=5000. #load resistance in ohm\n", + "Req=Rd*Rl/(Rd+Rl) #equivqlent resistance\n", + "gm=4500.*10.**(-6.) #voltage gain in microMhos\n", + "Av=(-1.)*gm*Req #voltage amplification\n", + "print '%s %.2f' %(\"Voltage Amplification=\",Av)\n", + "Vi=100.*10.**(-3.) #input voltage\n", + "Vout=abs(Av)*Vi #output voltage (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Amplification= -8.44\n", + "Output voltage=V 0.8\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..15242e34 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_7_3.ipynb @@ -0,0 +1,451 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66025946991647ff9e251a330d5b2003c23b73f54893a4b198da6580fdd0210c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 - Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_1 Pg-369\n", + "#calculate Lowest frequency\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.19\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=68.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 3 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.19\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 2.34\n", + "or lowest frequency is approximately 3 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_2 Pg-369\n", + "#calculate\n", + "import math\n", + "print '%s' %(\"Refer to the figure 7.20\")\n", + "print '%s' %(\"For good coupling\")\n", + "print '%s' %(\"Xc <= 0.1*R\")\n", + "R=10.*10.**(3.) #resistor R in ohm\n", + "C=220.*10.**(-6.) #capacitance in Farad\n", + "f=1./(2.*math.pi*C*0.1*R)\n", + "print '%s' %(\"Lowest frequency,f\")\n", + "print '%s %.2f' %(\"=Hz\",f)\n", + "print '%s' %(\"or lowest frequency is approximately 1 Hz\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refer to the figure 7.20\n", + "For good coupling\n", + "Xc <= 0.1*R\n", + "Lowest frequency,f\n", + "=Hz 0.72\n", + "or lowest frequency is approximately 1 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_3 Pg-369\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance\n", + "Beta=250. #transistor gain\n", + "Vcc=15. #supply voltage\n", + "R1=2000. #resistor R1 in ohm\n", + "R2=470. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=220. #emitter resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"(1) Base voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.2f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current \")\n", + "print '%s %.3f' %(\"Ie=*10**-2 A\",Ie*10**2)\n", + "print '%s' %(\"For small signal operation, ie <= 0.1*Ie\")\n", + "ie=0.1*Ie \n", + "print '%s %.3f' %(\"=mA\",ie*10**3)\n", + "print '%s' %(\"(2) AC emitter diode resistance =25mV/ie\")\n", + "Re_ac=25.*10.**(-3.)/ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",Re_ac)\n", + "print '%s' %(\"(3) Z''vm = Beta*r''e\")\n", + "Re_ac=26. #AC emitter diode resistance assumed 26 ohm not 25.53 ohm\n", + "Zvm=Beta*Re_ac\n", + "print '%s %.0f' %(\"=ohm\",Zvm)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Base voltage Vb\n", + "=V 2.85\n", + "Emitter voltage Vb\n", + "=V 2.15\n", + "Emitter current \n", + "Ie=*10**-2 A 0.979\n", + "For small signal operation, ie <= 0.1*Ie\n", + "=mA 0.979\n", + "(2) AC emitter diode resistance =25mV/ie\n", + "=ohm 26\n", + "(3) Z''vm = Beta*r''e\n", + "=ohm 6500\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_4 Pg-370\n", + "#calculate Base voltage,Emitter voltage,Emitter current,AC emitter diode resistance,Voltage gai,Zin stage,Input voltage,Output voltage\n", + "import math \n", + "Beta=100. #transistor gain\n", + "Vcc=10.#supply voltage\n", + "R1=10.*10.**(3.) #resistor R1 in ohm\n", + "R2=2200. #resistor R2 in ohm\n", + "Vce=0.7 #voltage drop in V\n", + "Re=2000. #emitter resistor in ohm\n", + "Rs=600. #source resistor in ohm\n", + "Vb=(Vcc*R2)/(R1+R2) #base voltage in V\n", + "print '%s' %(\"Base voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Vb)\n", + "Ve=Vb-Vce #emitter voltage in V\n", + "print '%s' %(\"Emitter voltage Vb\")\n", + "print '%s %.1f' %(\"=V\",Ve)\n", + "Ie=Ve/Re #emitter current\n", + "print '%s' %(\"Emitter current\")\n", + "print '%s %.2f' %(\"=mA\",Ie*10**3)\n", + "print '%s' %(\"AC emitter diode resistance =25mV/ie\")\n", + "re=25.*10.**(-3.)/Ie #AC emitter diode resistance\n", + "print '%s %.0f' %(\"=ohm\",re)\n", + "rc=((3.6*10.)/(3.6+10.))*10.**(3.) #Collector dioed resistance\n", + "A=rc/re #voltage gain(value in text book is wrong)\n", + "print '%s' %(\"Voltage gain A\")\n", + "print '%s %.0f' %(\"=\",A)\n", + "zin_1=((10.*2.2)/(10.+2.2))\n", + "zin=((zin_1*Beta*A)/(zin_1+(Beta*A)))*1000\n", + "print '%s' %(\"Zin stage\")\n", + "print '%s %.3f' %(\"=kohm\",zin*10**-3)\n", + "Vin=(zin/(Rs+zin))*10.**(-3.) #input voltage (value in text book is wrong)\n", + "print '%s' %(\"Input voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vin*10**3)\n", + "Vout=A*Vin #output voltage (value in textbook is wrong)\n", + "print '%s' %(\"Output voltage\")\n", + "print '%s %.2f' %(\"=mV\",Vout*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base voltage Vb\n", + "=V 1.8\n", + "Emitter voltage Vb\n", + "=V 1.1\n", + "Emitter current\n", + "=mA 0.55\n", + "AC emitter diode resistance =25mV/ie\n", + "=ohm 45\n", + "Voltage gain A\n", + "= 58\n", + "Zin stage\n", + "=kohm 1.803\n", + "Input voltage\n", + "=mV 0.75\n", + "Output voltage\n", + "=mV 43.82\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_5 Pg-371\n", + "#calculate\n", + "hfe=50. #current gain\n", + "Rl=10.*10.**(3.) #load resistor in ohm\n", + "Rs=500. #source resistor in ohm\n", + "hie=10.**(3.) #input resitance in ohm\n", + "A=hfe*Rl/(Rs+hie) #volatge gain\n", + "print '%s %.1f' %(\"Voltage gain=\",A)\n", + "Vs=0.02 #source voltage in V\n", + "Vout=A*Vs #output voltage\n", + "print '%s %.2f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain= 333.3\n", + "Output voltage=V 6.67\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_6 Pg-372\n", + "#calculate Voltage gain,Power gain\n", + "import math\n", + "Vout=5. #output voltage\n", + "Vin=0.5 #input voltage\n", + "Ri=10.*10.**(3.) #input resistance in ohm\n", + "Ro=10. #output resistance\n", + "A=Vout/Vin #voltage gain\n", + "print '%s %.0f' %(\"Voltage gain =%.0f \\n\",A)\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain\n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB \\n\\n\",Pow_gain)\n", + "print '%s' %(\"When Ri=Ro\")\n", + "Ri=Ro\n", + "A=Vout/Vin #voltage gain\n", + "Pi=Vin**2./Ri #input power\n", + "Po=Vout**2./Ro #output power\n", + "Pow_gain=10.*(math.log10(Po)-math.log10(Pi)) #power gain \n", + "print '%s %.0f' %(\" Power gain(in decibel) = %.0f dB\",Pow_gain)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain =%.0f \n", + " 10\n", + " Power gain(in decibel) = %.0f dB \n", + "\n", + " 50\n", + "When Ri=Ro\n", + " Power gain(in decibel) = %.0f dB 20\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_7 Pg-372\n", + "#calculate\n", + "import math\n", + "Rl=2.*10.**(3.) #load resistance in ohm\n", + "Ri=500. #input resistance in ohm\n", + "C=2.*10.**(-6.) #capacitor in microFarad\n", + "f=(1./(2.*math.pi*C*(Rl+Ri))) #textbook answer is wrong\n", + "print '%s %.0f' %(\"Lowest cut-off frequency=Hz\",f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lowest cut-off frequency=Hz 32\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - Pg 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_8 Pg-372\n", + "#calculate Coupling Capacitor\n", + "import math\n", + "Rl=20.*10.**(3.) #loaH resistance in ohm\n", + "Ri=5000. #input resistance in ohm\n", + "f=33. #lower cut-off frequency in Hz\n", + "f2=33.*10.**(3.) #higher cut-off frequency\n", + "C=(1./(2.*math.pi*f*(Rl+Ri))) #coupling capacitance (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Coupling Capacitor=uF\",C*10**6)\n", + "Req=(Rl*Ri)/(Rl+Ri) #equivalent resistance\n", + "Cs=1/(2*math.pi*f2*Req) #shunting capacitance (value in textbook is wrong)\n", + "print '%s %.0f' %(\"Coupling Capacitor=uF\",Cs*10**12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coupling Capacitor=uF 0.2\n", + "Coupling Capacitor=uF 1206\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E9 - Pg 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex7_9 Pg-373\n", + "#calculate Voltage Amplification,Output voltage\n", + "Rd=3000. #source resistance in ohm\n", + "Rl=5000. #load resistance in ohm\n", + "Req=Rd*Rl/(Rd+Rl) #equivqlent resistance\n", + "gm=4500.*10.**(-6.) #voltage gain in microMhos\n", + "Av=(-1.)*gm*Req #voltage amplification\n", + "print '%s %.2f' %(\"Voltage Amplification=\",Av)\n", + "Vi=100.*10.**(-3.) #input voltage\n", + "Vout=abs(Av)*Vi #output voltage (value in textbook is wrong)\n", + "print '%s %.1f' %(\"Output voltage=V\",Vout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Amplification= -8.44\n", + "Output voltage=V 0.8\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8d024566 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_1.ipynb @@ -0,0 +1,271 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:60cd4e612c661e75774f4e02987168334e7c814ac1287153a9eb4e69ab4db901" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 - Feedback Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_1 pg-434\n", + "#calculate Input signal,Gain after feedback,Feedback\n", + "import math\n", + "A=120. #amplification gain\n", + "Vi=50.*10.**(-3.) #input voltage\n", + "Beta=0.1 #feedback factor\n", + "Vo= A*Vi #output voltage without feedback\n", + "print '%s %.2f' %(\"Input signal = V\",Vo)\n", + "Vs=Vi-Beta*Vo \n", + "#input signal +ve output because of -ve feedback (calue in texxtbook is wrong)\n", + "print '%s %.2f' %(\"Input signal = V\",abs(Vs))\n", + "vg=A/(1.+Beta*A) #voltage gain \n", + "print '%s %.1f' %(\"Gain after feedback =\",vg)\n", + "fb=(-1.)*20.*math.log10(1+(Beta*A))\n", + "print '%s %.3f' %(\"Feedback (db)=\",fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input signal = V 6.00\n", + "Input signal = V 0.55\n", + "Gain after feedback = 9.2\n", + "Feedback (db)= -22.279\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_2 pg-435\n", + "#calculate\n", + "ff=4. #feedback factor\n", + "BW=6.*10.**(6.) #bandwidth in Hz\n", + "BW_fb=BW*(1.+ff) #Bandwidth with feedback factor(since Beta is +ve)\n", + "print '%s %.0f' %(\"Bandwidth with feedback factor = MHz\",BW_fb*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth with feedback factor = MHz 30\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_3 pg-435\n", + "#calculate Negative Feedback factor,Beta\n", + "openA=60000. #open loop gain \n", + "closeA=10000. #closed loop gain\n", + "Beta=((openA/closeA)-1.)/closeA\n", + "print '%s %.4f' %(\"Negative Feedback factor=\",Beta)\n", + "BA=Beta*openA #value of Beta*A\n", + "print '%s %.0f' %(\"Beta*A=\",BA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Negative Feedback factor= 0.0005\n", + "Beta*A= 30\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_4 pg-435\n", + "#calculate Feedback factor,Gain after negative feedback\n", + "Df=0.5/100. #distortion after negative feedback\n", + "D=8./100. #harmonic distortion \n", + "BA=D/Df-1 #value of Beta*A\n", + "A=200.\n", + "Beta=BA/A #feedback factor\n", + "print'%s %.3f'%(\"Feedback factor=\",Beta)\n", + "Af=A/(1.+BA) #Gain after -ve feedback\n", + "print'%s %.1f'%(\"Gain after negative feedback=\",Af)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback factor= 0.075\n", + "Gain after negative feedback= 12.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_5 pg-436\n", + "#calculate Decrement in distortion,Percentage change in distortion\n", + "A=100. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=A*per #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"Decrement in distortion,D-Df = D-(D/(1+Beta*A))\")\n", + "print '%s %.1f' %(\"=\",Af)\n", + "per_dis=(BA/(1.+BA))*100. #percentage change in distortion \n", + "print '%s %.0f' %(\"Percentage change in distortion=\",per_dis)\n", + "red=100-per_dis #reduction\n", + "print '%s %.0f' %(\"Therefore reduction is=\",red)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrement in distortion,D-Df = D-(D/(1+Beta*A))\n", + "= 9.1\n", + "Percentage change in distortion= 91\n", + "Therefore reduction is= 9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_6 pg-436\n", + "#calculate Voltage gain after negative feedback,Voltage gain after negative feedback,Beta\n", + "A=50. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(1) Voltage gain after negative feedback\")\n", + "print '%s %.2f' %(\"=\",Af)\n", + "A=50. #voltage gain\n", + "per=5./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af1=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(2) Voltage gain after negative feedback\")\n", + "print '%s %.1f' %(\"=\",Af1)\n", + "print '%s' %(\"\\nSo the new gain is not double the previous case\")\n", + "print '%s' %(\"The difference between expected value and actual value of gain obtained is\")\n", + "diff_value=2.*Af-Af1 \n", + "print '%s %.2f' %(\"=\",diff_value)\n", + "print '%s' %(\"\\n(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\")\n", + "Af=16.66 #voltage gain with negative feedback\n", + "A=50. #voltage gain\n", + "Beta=((A/Af)-1.)/A #feedback in percentage\n", + "print '%s %.2f' %(\"Beta=\",Beta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Voltage gain after negative feedback\n", + "= 8.33\n", + "(2) Voltage gain after negative feedback\n", + "= 14.3\n", + "\n", + "So the new gain is not double the previous case\n", + "The difference between expected value and actual value of gain obtained is\n", + "= 2.38\n", + "\n", + "(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\n", + "Beta= 0.04\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8d024566 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_2.ipynb @@ -0,0 +1,271 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:60cd4e612c661e75774f4e02987168334e7c814ac1287153a9eb4e69ab4db901" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 - Feedback Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_1 pg-434\n", + "#calculate Input signal,Gain after feedback,Feedback\n", + "import math\n", + "A=120. #amplification gain\n", + "Vi=50.*10.**(-3.) #input voltage\n", + "Beta=0.1 #feedback factor\n", + "Vo= A*Vi #output voltage without feedback\n", + "print '%s %.2f' %(\"Input signal = V\",Vo)\n", + "Vs=Vi-Beta*Vo \n", + "#input signal +ve output because of -ve feedback (calue in texxtbook is wrong)\n", + "print '%s %.2f' %(\"Input signal = V\",abs(Vs))\n", + "vg=A/(1.+Beta*A) #voltage gain \n", + "print '%s %.1f' %(\"Gain after feedback =\",vg)\n", + "fb=(-1.)*20.*math.log10(1+(Beta*A))\n", + "print '%s %.3f' %(\"Feedback (db)=\",fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input signal = V 6.00\n", + "Input signal = V 0.55\n", + "Gain after feedback = 9.2\n", + "Feedback (db)= -22.279\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_2 pg-435\n", + "#calculate\n", + "ff=4. #feedback factor\n", + "BW=6.*10.**(6.) #bandwidth in Hz\n", + "BW_fb=BW*(1.+ff) #Bandwidth with feedback factor(since Beta is +ve)\n", + "print '%s %.0f' %(\"Bandwidth with feedback factor = MHz\",BW_fb*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth with feedback factor = MHz 30\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_3 pg-435\n", + "#calculate Negative Feedback factor,Beta\n", + "openA=60000. #open loop gain \n", + "closeA=10000. #closed loop gain\n", + "Beta=((openA/closeA)-1.)/closeA\n", + "print '%s %.4f' %(\"Negative Feedback factor=\",Beta)\n", + "BA=Beta*openA #value of Beta*A\n", + "print '%s %.0f' %(\"Beta*A=\",BA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Negative Feedback factor= 0.0005\n", + "Beta*A= 30\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_4 pg-435\n", + "#calculate Feedback factor,Gain after negative feedback\n", + "Df=0.5/100. #distortion after negative feedback\n", + "D=8./100. #harmonic distortion \n", + "BA=D/Df-1 #value of Beta*A\n", + "A=200.\n", + "Beta=BA/A #feedback factor\n", + "print'%s %.3f'%(\"Feedback factor=\",Beta)\n", + "Af=A/(1.+BA) #Gain after -ve feedback\n", + "print'%s %.1f'%(\"Gain after negative feedback=\",Af)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback factor= 0.075\n", + "Gain after negative feedback= 12.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_5 pg-436\n", + "#calculate Decrement in distortion,Percentage change in distortion\n", + "A=100. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=A*per #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"Decrement in distortion,D-Df = D-(D/(1+Beta*A))\")\n", + "print '%s %.1f' %(\"=\",Af)\n", + "per_dis=(BA/(1.+BA))*100. #percentage change in distortion \n", + "print '%s %.0f' %(\"Percentage change in distortion=\",per_dis)\n", + "red=100-per_dis #reduction\n", + "print '%s %.0f' %(\"Therefore reduction is=\",red)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrement in distortion,D-Df = D-(D/(1+Beta*A))\n", + "= 9.1\n", + "Percentage change in distortion= 91\n", + "Therefore reduction is= 9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_6 pg-436\n", + "#calculate Voltage gain after negative feedback,Voltage gain after negative feedback,Beta\n", + "A=50. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(1) Voltage gain after negative feedback\")\n", + "print '%s %.2f' %(\"=\",Af)\n", + "A=50. #voltage gain\n", + "per=5./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af1=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(2) Voltage gain after negative feedback\")\n", + "print '%s %.1f' %(\"=\",Af1)\n", + "print '%s' %(\"\\nSo the new gain is not double the previous case\")\n", + "print '%s' %(\"The difference between expected value and actual value of gain obtained is\")\n", + "diff_value=2.*Af-Af1 \n", + "print '%s %.2f' %(\"=\",diff_value)\n", + "print '%s' %(\"\\n(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\")\n", + "Af=16.66 #voltage gain with negative feedback\n", + "A=50. #voltage gain\n", + "Beta=((A/Af)-1.)/A #feedback in percentage\n", + "print '%s %.2f' %(\"Beta=\",Beta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Voltage gain after negative feedback\n", + "= 8.33\n", + "(2) Voltage gain after negative feedback\n", + "= 14.3\n", + "\n", + "So the new gain is not double the previous case\n", + "The difference between expected value and actual value of gain obtained is\n", + "= 2.38\n", + "\n", + "(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\n", + "Beta= 0.04\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8d024566 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_8_3.ipynb @@ -0,0 +1,271 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:60cd4e612c661e75774f4e02987168334e7c814ac1287153a9eb4e69ab4db901" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 - Feedback Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_1 pg-434\n", + "#calculate Input signal,Gain after feedback,Feedback\n", + "import math\n", + "A=120. #amplification gain\n", + "Vi=50.*10.**(-3.) #input voltage\n", + "Beta=0.1 #feedback factor\n", + "Vo= A*Vi #output voltage without feedback\n", + "print '%s %.2f' %(\"Input signal = V\",Vo)\n", + "Vs=Vi-Beta*Vo \n", + "#input signal +ve output because of -ve feedback (calue in texxtbook is wrong)\n", + "print '%s %.2f' %(\"Input signal = V\",abs(Vs))\n", + "vg=A/(1.+Beta*A) #voltage gain \n", + "print '%s %.1f' %(\"Gain after feedback =\",vg)\n", + "fb=(-1.)*20.*math.log10(1+(Beta*A))\n", + "print '%s %.3f' %(\"Feedback (db)=\",fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input signal = V 6.00\n", + "Input signal = V 0.55\n", + "Gain after feedback = 9.2\n", + "Feedback (db)= -22.279\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_2 pg-435\n", + "#calculate\n", + "ff=4. #feedback factor\n", + "BW=6.*10.**(6.) #bandwidth in Hz\n", + "BW_fb=BW*(1.+ff) #Bandwidth with feedback factor(since Beta is +ve)\n", + "print '%s %.0f' %(\"Bandwidth with feedback factor = MHz\",BW_fb*10**-6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth with feedback factor = MHz 30\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_3 pg-435\n", + "#calculate Negative Feedback factor,Beta\n", + "openA=60000. #open loop gain \n", + "closeA=10000. #closed loop gain\n", + "Beta=((openA/closeA)-1.)/closeA\n", + "print '%s %.4f' %(\"Negative Feedback factor=\",Beta)\n", + "BA=Beta*openA #value of Beta*A\n", + "print '%s %.0f' %(\"Beta*A=\",BA)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Negative Feedback factor= 0.0005\n", + "Beta*A= 30\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - Pg 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_4 pg-435\n", + "#calculate Feedback factor,Gain after negative feedback\n", + "Df=0.5/100. #distortion after negative feedback\n", + "D=8./100. #harmonic distortion \n", + "BA=D/Df-1 #value of Beta*A\n", + "A=200.\n", + "Beta=BA/A #feedback factor\n", + "print'%s %.3f'%(\"Feedback factor=\",Beta)\n", + "Af=A/(1.+BA) #Gain after -ve feedback\n", + "print'%s %.1f'%(\"Gain after negative feedback=\",Af)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback factor= 0.075\n", + "Gain after negative feedback= 12.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_5 pg-436\n", + "#calculate Decrement in distortion,Percentage change in distortion\n", + "A=100. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=A*per #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"Decrement in distortion,D-Df = D-(D/(1+Beta*A))\")\n", + "print '%s %.1f' %(\"=\",Af)\n", + "per_dis=(BA/(1.+BA))*100. #percentage change in distortion \n", + "print '%s %.0f' %(\"Percentage change in distortion=\",per_dis)\n", + "red=100-per_dis #reduction\n", + "print '%s %.0f' %(\"Therefore reduction is=\",red)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrement in distortion,D-Df = D-(D/(1+Beta*A))\n", + "= 9.1\n", + "Percentage change in distortion= 91\n", + "Therefore reduction is= 9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - Pg 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex8_6 pg-436\n", + "#calculate Voltage gain after negative feedback,Voltage gain after negative feedback,Beta\n", + "A=50. #voltage gain\n", + "per=10./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(1) Voltage gain after negative feedback\")\n", + "print '%s %.2f' %(\"=\",Af)\n", + "A=50. #voltage gain\n", + "per=5./100. #percentage of negative feedback applied\n", + "BA=per*A #value of Beta*A\n", + "Af1=A/(1.+BA) #gain after negative feedback\n", + "print '%s' %(\"(2) Voltage gain after negative feedback\")\n", + "print '%s %.1f' %(\"=\",Af1)\n", + "print '%s' %(\"\\nSo the new gain is not double the previous case\")\n", + "print '%s' %(\"The difference between expected value and actual value of gain obtained is\")\n", + "diff_value=2.*Af-Af1 \n", + "print '%s %.2f' %(\"=\",diff_value)\n", + "print '%s' %(\"\\n(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\")\n", + "Af=16.66 #voltage gain with negative feedback\n", + "A=50. #voltage gain\n", + "Beta=((A/Af)-1.)/A #feedback in percentage\n", + "print '%s %.2f' %(\"Beta=\",Beta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Voltage gain after negative feedback\n", + "= 8.33\n", + "(2) Voltage gain after negative feedback\n", + "= 14.3\n", + "\n", + "So the new gain is not double the previous case\n", + "The difference between expected value and actual value of gain obtained is\n", + "= 2.38\n", + "\n", + "(3) To have the gain double of case(1) i.e 16.66,let the feedback introduced be Beta(assuming negative feedback)\n", + "Beta= 0.04\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8c67de26 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_1.ipynb @@ -0,0 +1,312 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:18f46455ac6bb4531327a629132bc2c4fc08dd747165df43064aceca96736d0b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 - Negative Feedback Amplifier using Op-Amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_1 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 250000. #open loop gain\n", + "fol=160. #open loop frequency in HZ\n", + "Acl=50. #close loop gain\n", + "fcl=Aol/Acl*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = %.0f kHz\",fcl*10**-3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = %.0f kHz 800\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_2 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 50000. #open loop gain\n", + "fol=14. #open loop frequency in HZ\n", + "fcl=(Aol+1)*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 700\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_3 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol_Beta_1= 2500. #open loop gain\n", + "fol=20. #open loop frequency in HZ\n", + "fcl=Aol_Beta_1*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 50\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_4 Pg-475\n", + "#calculate Close loop Bandwidth,Peak value of output\n", + "import math\n", + "funi=1.*10.**(6.) #unity frequency in Hz\n", + "Sr=0.5/10.**(-6.) #slew rate in V/sec\n", + "Acl=10. #close loop gain\n", + "fcl=funi/Acl #close loop frequency in Hz\n", + "print '%s %.0f' %(\"(1)Close loop Bandwidth = kHz\",fcl*10**-3)\n", + "Vp_max=Sr/(2.*math.pi*fcl) #output peak value\n", + "print '%s %.3f' %(\"(2)Peak value of output = V\",Vp_max)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Close loop Bandwidth = kHz 100\n", + "(2)Peak value of output = V 0.796\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_5 Pg-475\n", + "#calculate Feedback fraction,Ideal closed loop gain,Exact closed loop voltage gain\n", + "Aol= 88. #open loop gain in db\n", + "R1=2.7*10.**(3.) #resistor R1 in ohm\n", + "R2=68.*10.**(3.) #resistor R2 in ohm\n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.3f' %(\"Feedback fraction = \",Beta)\n", + "Acl=1./Beta #ideal closed loop gain\n", + "print '%s %.2f' %(\"Ideal closed loop gain = \",Acl)\n", + "Aol=10.**(88./20.) #open loop gain\n", + "Acl=Aol/(1.+Beta*Aol) #exact closed loop voltage gain\n", + "print '%s %.2f' %(\"Exact closed loop voltage gain = \",Acl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 0.038\n", + "Ideal closed loop gain = 26.19\n", + "Exact closed loop voltage gain = 26.16\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_6 Pg-476\n", + "#calculate Feedback fraction,Closed loop input impedance\n", + "Aol=20000.#open loop gain\n", + "R1=100. #resistor R1 in ohm\n", + "R2=7.5*10.**(3.) #resistor R2 in ohm\n", + "Rin=3.*10.**(6.) #input resistor in ohm\n", + "Rcm=500.*10.**(6.) \n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.5f' %(\"Feedback fraction = 1\\\\76 =\",Beta)\n", + "Req=(Rin*Rcm)/(Rin+Rcm) #equivalent resistance of Rin and Rcm\n", + "Zcl=(1.+Beta*Aol)*Req #closed loop input impedance (textbook answer is wrong)\n", + "print '%s %.0f %s' %(\"Closed loop input impedance =\",Zcl*10**-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 1\\76 = 0.01316\n", + "Closed loop input impedance = 788 Mohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_7 Pg-477\n", + "#calculate Current gain,Output current\n", + "R1=1.8 #resistor R1 in ohm\n", + "R2=1.5*10.**(3.) #resistor R2 in ohm\n", + "Iin=1.*10.**(-3.) #input current in A\n", + "Ai=1.+(R2/R1) #Current gain\n", + "print '%s %.0f' %(\"Current gain =\",Ai)\n", + "Il=Ai*Iin #Output current\n", + "print '%s %.0f' %(\"Output current = mA pp\",Il*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current gain = 834\n", + "Output current = mA pp 834\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_8 Pg-477\n", + "#calculate Output current,Load power,Load power\n", + "R1=2.7 #resistor R1 in ohm\n", + "R2=1.#resistor R2 in ohm\n", + "Vin=0.5 #input voltage in V\n", + "Io=Vin/R1 #output current\n", + "print '%s %.0f' %(\"(1) Output current = mA\",Io*10**3)\n", + "P=Io**2.*R2 #load power\n", + "print '%s %.1f' %(\"(2a) Load power = mW\",P*10**3)\n", + "R2=2 # new load resistor R2 in ohm\n", + "P=Io**2*R2 #load power\n", + "print '%s %.1f' %(\"(2b) Load power = mW\",P*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Output current = mA 185\n", + "(2a) Load power = mW 34.3\n", + "(2b) Load power = mW 68.6\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8c67de26 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_2.ipynb @@ -0,0 +1,312 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:18f46455ac6bb4531327a629132bc2c4fc08dd747165df43064aceca96736d0b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 - Negative Feedback Amplifier using Op-Amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_1 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 250000. #open loop gain\n", + "fol=160. #open loop frequency in HZ\n", + "Acl=50. #close loop gain\n", + "fcl=Aol/Acl*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = %.0f kHz\",fcl*10**-3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = %.0f kHz 800\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_2 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 50000. #open loop gain\n", + "fol=14. #open loop frequency in HZ\n", + "fcl=(Aol+1)*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 700\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_3 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol_Beta_1= 2500. #open loop gain\n", + "fol=20. #open loop frequency in HZ\n", + "fcl=Aol_Beta_1*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 50\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_4 Pg-475\n", + "#calculate Close loop Bandwidth,Peak value of output\n", + "import math\n", + "funi=1.*10.**(6.) #unity frequency in Hz\n", + "Sr=0.5/10.**(-6.) #slew rate in V/sec\n", + "Acl=10. #close loop gain\n", + "fcl=funi/Acl #close loop frequency in Hz\n", + "print '%s %.0f' %(\"(1)Close loop Bandwidth = kHz\",fcl*10**-3)\n", + "Vp_max=Sr/(2.*math.pi*fcl) #output peak value\n", + "print '%s %.3f' %(\"(2)Peak value of output = V\",Vp_max)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Close loop Bandwidth = kHz 100\n", + "(2)Peak value of output = V 0.796\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_5 Pg-475\n", + "#calculate Feedback fraction,Ideal closed loop gain,Exact closed loop voltage gain\n", + "Aol= 88. #open loop gain in db\n", + "R1=2.7*10.**(3.) #resistor R1 in ohm\n", + "R2=68.*10.**(3.) #resistor R2 in ohm\n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.3f' %(\"Feedback fraction = \",Beta)\n", + "Acl=1./Beta #ideal closed loop gain\n", + "print '%s %.2f' %(\"Ideal closed loop gain = \",Acl)\n", + "Aol=10.**(88./20.) #open loop gain\n", + "Acl=Aol/(1.+Beta*Aol) #exact closed loop voltage gain\n", + "print '%s %.2f' %(\"Exact closed loop voltage gain = \",Acl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 0.038\n", + "Ideal closed loop gain = 26.19\n", + "Exact closed loop voltage gain = 26.16\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_6 Pg-476\n", + "#calculate Feedback fraction,Closed loop input impedance\n", + "Aol=20000.#open loop gain\n", + "R1=100. #resistor R1 in ohm\n", + "R2=7.5*10.**(3.) #resistor R2 in ohm\n", + "Rin=3.*10.**(6.) #input resistor in ohm\n", + "Rcm=500.*10.**(6.) \n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.5f' %(\"Feedback fraction = 1\\\\76 =\",Beta)\n", + "Req=(Rin*Rcm)/(Rin+Rcm) #equivalent resistance of Rin and Rcm\n", + "Zcl=(1.+Beta*Aol)*Req #closed loop input impedance (textbook answer is wrong)\n", + "print '%s %.0f %s' %(\"Closed loop input impedance =\",Zcl*10**-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 1\\76 = 0.01316\n", + "Closed loop input impedance = 788 Mohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_7 Pg-477\n", + "#calculate Current gain,Output current\n", + "R1=1.8 #resistor R1 in ohm\n", + "R2=1.5*10.**(3.) #resistor R2 in ohm\n", + "Iin=1.*10.**(-3.) #input current in A\n", + "Ai=1.+(R2/R1) #Current gain\n", + "print '%s %.0f' %(\"Current gain =\",Ai)\n", + "Il=Ai*Iin #Output current\n", + "print '%s %.0f' %(\"Output current = mA pp\",Il*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current gain = 834\n", + "Output current = mA pp 834\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_8 Pg-477\n", + "#calculate Output current,Load power,Load power\n", + "R1=2.7 #resistor R1 in ohm\n", + "R2=1.#resistor R2 in ohm\n", + "Vin=0.5 #input voltage in V\n", + "Io=Vin/R1 #output current\n", + "print '%s %.0f' %(\"(1) Output current = mA\",Io*10**3)\n", + "P=Io**2.*R2 #load power\n", + "print '%s %.1f' %(\"(2a) Load power = mW\",P*10**3)\n", + "R2=2 # new load resistor R2 in ohm\n", + "P=Io**2*R2 #load power\n", + "print '%s %.1f' %(\"(2b) Load power = mW\",P*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Output current = mA 185\n", + "(2a) Load power = mW 34.3\n", + "(2b) Load power = mW 68.6\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8c67de26 --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/Chapter_9_3.ipynb @@ -0,0 +1,312 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:18f46455ac6bb4531327a629132bc2c4fc08dd747165df43064aceca96736d0b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 - Negative Feedback Amplifier using Op-Amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E1 - Pg 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_1 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 250000. #open loop gain\n", + "fol=160. #open loop frequency in HZ\n", + "Acl=50. #close loop gain\n", + "fcl=Aol/Acl*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = %.0f kHz\",fcl*10**-3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = %.0f kHz 800\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E2 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_2 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol= 50000. #open loop gain\n", + "fol=14. #open loop frequency in HZ\n", + "fcl=(Aol+1)*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 700\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E3 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_3 Pg-475\n", + "#calculate Close loop Bandwidth\n", + "Aol_Beta_1= 2500. #open loop gain\n", + "fol=20. #open loop frequency in HZ\n", + "fcl=Aol_Beta_1*fol #close loop frequency in Hz\n", + "print '%s %.0f' %(\"Close loop Bandwidth = kHz\",fcl*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop Bandwidth = kHz 50\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E4 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_4 Pg-475\n", + "#calculate Close loop Bandwidth,Peak value of output\n", + "import math\n", + "funi=1.*10.**(6.) #unity frequency in Hz\n", + "Sr=0.5/10.**(-6.) #slew rate in V/sec\n", + "Acl=10. #close loop gain\n", + "fcl=funi/Acl #close loop frequency in Hz\n", + "print '%s %.0f' %(\"(1)Close loop Bandwidth = kHz\",fcl*10**-3)\n", + "Vp_max=Sr/(2.*math.pi*fcl) #output peak value\n", + "print '%s %.3f' %(\"(2)Peak value of output = V\",Vp_max)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1)Close loop Bandwidth = kHz 100\n", + "(2)Peak value of output = V 0.796\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E5 - 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_5 Pg-475\n", + "#calculate Feedback fraction,Ideal closed loop gain,Exact closed loop voltage gain\n", + "Aol= 88. #open loop gain in db\n", + "R1=2.7*10.**(3.) #resistor R1 in ohm\n", + "R2=68.*10.**(3.) #resistor R2 in ohm\n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.3f' %(\"Feedback fraction = \",Beta)\n", + "Acl=1./Beta #ideal closed loop gain\n", + "print '%s %.2f' %(\"Ideal closed loop gain = \",Acl)\n", + "Aol=10.**(88./20.) #open loop gain\n", + "Acl=Aol/(1.+Beta*Aol) #exact closed loop voltage gain\n", + "print '%s %.2f' %(\"Exact closed loop voltage gain = \",Acl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 0.038\n", + "Ideal closed loop gain = 26.19\n", + "Exact closed loop voltage gain = 26.16\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E6 - 476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_6 Pg-476\n", + "#calculate Feedback fraction,Closed loop input impedance\n", + "Aol=20000.#open loop gain\n", + "R1=100. #resistor R1 in ohm\n", + "R2=7.5*10.**(3.) #resistor R2 in ohm\n", + "Rin=3.*10.**(6.) #input resistor in ohm\n", + "Rcm=500.*10.**(6.) \n", + "Beta=R1/(R1+R2) #Feedback fraction\n", + "print '%s %.5f' %(\"Feedback fraction = 1\\\\76 =\",Beta)\n", + "Req=(Rin*Rcm)/(Rin+Rcm) #equivalent resistance of Rin and Rcm\n", + "Zcl=(1.+Beta*Aol)*Req #closed loop input impedance (textbook answer is wrong)\n", + "print '%s %.0f %s' %(\"Closed loop input impedance =\",Zcl*10**-6,\"Mohm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Feedback fraction = 1\\76 = 0.01316\n", + "Closed loop input impedance = 788 Mohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E7 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_7 Pg-477\n", + "#calculate Current gain,Output current\n", + "R1=1.8 #resistor R1 in ohm\n", + "R2=1.5*10.**(3.) #resistor R2 in ohm\n", + "Iin=1.*10.**(-3.) #input current in A\n", + "Ai=1.+(R2/R1) #Current gain\n", + "print '%s %.0f' %(\"Current gain =\",Ai)\n", + "Il=Ai*Iin #Output current\n", + "print '%s %.0f' %(\"Output current = mA pp\",Il*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current gain = 834\n", + "Output current = mA pp 834\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example E8 - 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex9_8 Pg-477\n", + "#calculate Output current,Load power,Load power\n", + "R1=2.7 #resistor R1 in ohm\n", + "R2=1.#resistor R2 in ohm\n", + "Vin=0.5 #input voltage in V\n", + "Io=Vin/R1 #output current\n", + "print '%s %.0f' %(\"(1) Output current = mA\",Io*10**3)\n", + "P=Io**2.*R2 #load power\n", + "print '%s %.1f' %(\"(2a) Load power = mW\",P*10**3)\n", + "R2=2 # new load resistor R2 in ohm\n", + "P=Io**2*R2 #load power\n", + "print '%s %.1f' %(\"(2b) Load power = mW\",P*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) Output current = mA 185\n", + "(2a) Load power = mW 34.3\n", + "(2b) Load power = mW 68.6\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..ef6ddcdd --- /dev/null +++ b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/README.txt @@ -0,0 +1,10 @@ +Contributed By: Prashanth Kumar Immady +Course: btech +College/Institute/Organization: IIT MADRAS +Department/Designation: ELECTRICAL ENGINEERING +Book Title: Electronic Devices and Circuits +Author: S. L. Kakani and K. C. Bhandari +Publisher: Viva Books, New Delhi +Year of publication: 2012 +Isbn: 9788130917726 +Edition: 1 \ No newline at end of file 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 new file mode 100644 index 00000000..a0f7a628 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture01.PNG differ 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 new file mode 100644 index 00000000..e60afe5f Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture02.PNG differ 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 new file mode 100644 index 00000000..230c4102 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04.PNG differ 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 new file mode 100644 index 00000000..230c4102 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture04_1.PNG differ 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 new file mode 100644 index 00000000..49fbfaa6 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05.PNG differ 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 new file mode 100644 index 00000000..49fbfaa6 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture05_1.PNG differ 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 new file mode 100644 index 00000000..c8a09ce2 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06.PNG differ 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 new file mode 100644 index 00000000..c8a09ce2 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/Capture06_1.PNG differ 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 new file mode 100644 index 00000000..72e1a311 Binary files /dev/null and b/Electronic_Devices_and_Circuits_by_S._L._Kakani_and_K._C._Bhandari/screenshots/captue03.PNG differ diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb new file mode 100644 index 00000000..550ebd64 --- /dev/null +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_01.ipynb @@ -0,0 +1,1016 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:146b2a737d67bfa0a93cceee1f0df7461bc034ad0becba42baf98a47d6983e5d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 1 - Energy Bands & Charge Carriers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.7.1 - Page No : 1-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "E_g = 0.75# in eV\n", + "E_g = 0.75 * 1.6 * 10**-19 # in J\n", + "h = 6.63 * 10**-34 # in J\n", + "c = 3 * 10**8 # in m/s \n", + "# hv = E_g\n", + "#E_g = (h*c)/lambda\n", + "Lambda=(h*c)/E_g # in m\n", + "Lambda=Lambda * 10**10 # in A\u00b0\n", + "print \"The wavelength at which germanium starts to absorb light = %0.f A\u00b0 \" %Lambda" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength at which germanium starts to absorb light = 16575 A\u00b0 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.7.2 - Page No : 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h = 6.625 * 10**-34 # in J\n", + "c = 3 * 10**8 # in J\n", + "lambda_Gr = 17760 * 10**-10 # in m\n", + "lambda_Si = 11000 # in A\u00b0\n", + "lambda_Si = lambda_Si * 10**-10 # in m\n", + "E_g = (h*c)/lambda_Si # in J\n", + "E_g = E_g /(1.6*10**-19) # in eV\n", + "print \"The energy gap of Si = %0.3f eV \" %E_g\n", + "E_g1 = (h*c)/lambda_Gr # in J\n", + "E_g1 = E_g1/(1.6 * 10**-19) # in eV\n", + "print \"The energy gap of Germanium = %0.2f eV \" %E_g1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy gap of Si = 1.129 eV \n", + "The energy gap of Germanium = 0.70 eV \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.18.1\n", + " - Page No : 1-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "del_E = 0.3 # in eV\n", + "T1 = 300 # in K\n", + "T2 = 330 # in K\n", + "# del_E = K * T1 * log(N/N_c) where del_E= E_C-E_F\n", + "# del_E1 = K * T2 * log(N/N_c) where del_E1= E_C-E_F at T= 330 \u00b0K\n", + "del_E1 = del_E*(T2/T1) # in eV \n", + "print \"The Fermi level will be \",round(del_E1,2),\" eV below the conduction band\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Fermi level will be 0.33 eV below the conduction band\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.18.2\n", + " - Page No : 1-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "# Given data\n", + "N_c = 2.8 * 10**19 # in cm**-3\n", + "del_E = 0.25 # fermi energy in eV\n", + "KT = 0.0259 \n", + "f_F = exp(-(del_E)/KT) \n", + "print \"The probaility in the condition band is occupied by an electron = %0.2e\" %f_F\n", + "n_o = N_c * exp(-(del_E)/KT) # in cm**-3\n", + "print \"The thermal equilibrium electron concentration = %0.1e cm**-3 \" %n_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probaility in the condition band is occupied by an electron = 6.43e-05\n", + "The thermal equilibrium electron concentration = 1.8e+15 cm**-3 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example :1.18.3\n", + " - Page No : 1-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T1 = 300 # in K\n", + "T2 = 400 # in K\n", + "del_E = 0.27 # Fermi level in eV\n", + "KT = (0.0259) * (T2/T1) # in eV\n", + "N_v = 1.04 * 10**19 # in cm**-3\n", + "N_v = N_v * (T2/T1)**(3/2) # in cm**-3 \n", + "p_o = N_v * exp(-(del_E)/KT) # in per cm**3\n", + "print \"The thermal equilibrium hole concentration = %0.2e per cm**3 \" %p_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal equilibrium hole concentration = 6.44e+15 per cm**3 \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.1 - Page No : 1-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Mu_e = 1500 # in cm**2/volt sec\n", + "Mu_h = 500 # in cm**2/volt sec\n", + "n_i = 1.6 * 10**10 # in per cm**3\n", + "e = 1.6 * 10**-19 # in C\n", + "Sigma = n_i * (Mu_e + Mu_h) * e # in mho/cm\n", + "print \"The conductivity of pure semiconductor = %0.2e mho/cm \" %Sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of pure semiconductor = 5.12e-06 mho/cm \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.2 - Page No : 1-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rho = 10 # in \u03a9-cm\n", + "Mu_d = 500 # in cm**2/v.s.\n", + "e = 1.6*10**-19 \n", + "n_d = 1/(Rho * e * Mu_d) # in per cm**3\n", + "print \"The number of donor atom must be added to achieve = %0.2e per cm**3 \" %n_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of donor atom must be added to achieve = 1.25e+15 per cm**3 \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.3 - Page No : 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "AvagadroNumber = 6.02 * 10**23 # in atoms/gm.mole\n", + "at_Ge = 72.6 # atom weight of Ge\n", + "e = 1.6 * 10**-19 # in C\n", + "D_Ge = 5.32 # density of Ge in gm/c.c\n", + "Mu = 3800 # in cm**2/v.s.\n", + "C_Ge = (AvagadroNumber/at_Ge) * D_Ge # concentration of Ge atoms in per cm**3\n", + "n_d = C_Ge/10**8 # in per cc\n", + "Sigma = n_d * Mu * e # in mho/cm\n", + "print \"The conductivity = %0.3f mho/cm \" %Sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity = 0.268 mho/cm \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.4 - Page No : 1-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rho = 0.3623 * 10**-3 # in Ohm m\n", + "Sigma = 1/Rho #in mho/m\n", + "D = 4.42 * 10**28 # Ge density in atom/m**3\n", + "n_d = D / 10**6 # in atom/m**3\n", + "e = 1.6 * 10**-19 # in C\n", + "Mu = Sigma/(n_d * e) # in m**2/V.sec\n", + "print \"The mobility of electron in germanium = %0.2f m**2/V.sec \" %Mu" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of electron in germanium = 0.39 m**2/V.sec \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.5 - Page No : 1-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "AvagadroNumber = 6.025 * 10**26 # in kg.Mole\n", + "W = 72.59 # atomic weight of Ge\n", + "D = 5.36 * 10**3 #density of Ge in kg/m**3\n", + "Rho = 0.42 # resistivity in Ohm m\n", + "e = 1.6 * 10**-19 # in C\n", + "Sigma = 1/Rho # in mho/m\n", + "n = (AvagadroNumber/W) * D # number of Ge atoms present per unit volume\n", + "# Holes per unit volume, H = n*10**-6%\n", + "H= n*10**-8 \n", + "a=H \n", + "# Formula sigma= a*e*Mu_h\n", + "Mu_h = Sigma/(a * e) # in m**2/V.sec\n", + "print \"Mobility of holes = %0.4f m**2/V.sec \" %Mu_h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mobility of holes = 0.0334 m**2/V.sec \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.6 - Page No : 1-68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "e = 1.6 * 10**-19 # in C\n", + "n_i = 2 * 10**19 # in /m**3\n", + "Mu_e = 0.36 # in m**2/v.s\n", + "Mu_h = 0.17 # in m**2/v.s\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=V/l # in volt/m\n", + "Sigma = n_i * e * (Mu_e + Mu_h) # in mho/m\n", + "# J = I/A = Sigma * E\n", + "I= Sigma*E*A \n", + "print \"The current produced in a small germanium plate = %0.2f amp \" %I\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current produced in a small germanium plate = 1.13 amp \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.7 - Page No : 1-68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "D = 4.2 * 10**28 #density of Ge atoms in atoms/m**3\n", + "N_d = D / 10**6 # in atoms/m**3\n", + "e = 1.6 * 10**-19 # in C\n", + "Mu_e = 0.36 # in m**2/vs\n", + "Sigma_n = N_d * e * Mu_e # in mho/m\n", + "Rho_n = 1/Sigma_n # in ohm m\n", + "print \"The resistivity of drop Ge = %0.3e ohm m \" %Rho_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistivity of drop Ge = 4.134e-04 ohm m \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.8 - Page No : 1-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "e = 1.6 * 10**-19 # in C\n", + "n_i = 1 * 10**19 # in per m**3\n", + "Mu_e = 0.36 # in m**2/volt.sec\n", + "Mu_h = 0.17 # in m**2/volt.sec \n", + "A = 2 # in cm**2\n", + "A = A * 10**-4 # im m**2\n", + "t = 0.1 # in mm\n", + "t = t * 10**-3 # in m\n", + "V = 4 # in volts\n", + "Sigma_i = n_i * e * (Mu_e + Mu_h) # in mho/m\n", + "J = Sigma_i * (V/t) # in Amp/m**2\n", + "I = J * A # in Amp\n", + "print \"The current produced in a Ge sample = %0.3f Amp \" %I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current produced in a Ge sample = 6.784 Amp \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21.9 - Page No : 1-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "e = 1.6 * 10**-19 # in C\n", + "Mu_h = 500 # in cm**2/V.s.\n", + "Mu_e = 1500 # in cm**2/V.s.\n", + "n_i = 1.6 * 10**10 # in per cm**3\n", + "Sigma_i = n_i * e * ( Mu_h + Mu_e) # in mho/cm\n", + "print \"Conductivity of pure silicon at room temperature = %0.2e mho/cm \" %Sigma_i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of pure silicon at room temperature = 5.12e-06 mho/cm \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.1 - Page No : 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "l= 0.50*10**-2 # width of ribbon in m\n", + "d= 0.10*10**-3 # thickness of ribbon in m\n", + "A= l*d # area of ribbon in m**2\n", + "B = 0.8 # in Tesla\n", + "D = 10.5 #density in gm/cc\n", + "I = 2 # in amp\n", + "q = 1.6 * 10**-19 # in C\n", + "n=6*10**28 # number of elec. per m**3\n", + "V_H = ( I * B * d)/(n * q * A) # in volts\n", + "print \"The hall Voltage produced = %0.2e volts \" %V_H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hall Voltage produced = 3.33e-08 volts \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.2 - Page No : 1-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "A = d * W # in m**2\n", + "I= 1 # in Amp\n", + "B = 1 # Tesla\n", + "V_H = 0.074 * 10**-6 # in Volts\n", + "Sigma = 5.8 * 10**7 # in mho/m\n", + "R_H = (V_H * A)/(B*I*d) # in m**3/c\n", + "print \"The hall coefficient = %0.1e m**3/c \" %R_H\n", + "Mu = Sigma * R_H # in m**2/volt.sec\n", + "print \"The mobility of electrons in copper = %0.1e m**2/volt-sec \" %Mu" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hall coefficient = 7.4e-11 m**3/c \n", + "The mobility of electrons in copper = 4.3e-03 m**2/volt-sec \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example :1.23.3 - Page No : 1-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "p = n_i**2/n # in /m**3\n", + "R = n/p \n", + "print \"The ratio of electrons to hole concentration = %0.1e\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of electrons to hole concentration = 1.0e+12\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.4 - Page No : 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan, pi\n", + "# Given data\n", + "B = 0.48 # in wb/m**2\n", + "R_H = 3.55 * 10**-4 # in m**3/c\n", + "Rho = 0.00912 # in ohm-m\n", + "Sigma = 1/Rho # in (ohm-m)**-1\n", + "theta_H = atan( Sigma * B * R_H)*180/pi # in degree\n", + "print \"The hall angle for a hall coefficient = %0.4f\u00b0\" %theta_H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hall angle for a hall coefficient = 1.0704\u00b0\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.5 - Page No : 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R = 9 * 10**-3 # in ohm-m\n", + "R_H = 3.6 * 10**-4 # in m**3\n", + "e = 1.6 * 10**-19 # in C\n", + "Sigma = 1/R # in (ohm-m)**-1\n", + "Rho = 1/R_H # in coulomb/m**3\n", + "n = Rho/e # in /m**3\n", + "print \"Density of charge carriers = %0.5e per m**3 \" %n\n", + "Mu = Sigma * R_H # in m**2/v-s\n", + "print \"Mobility of charge carriers = %0.2f m**2/V-s \" %Mu" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of charge carriers = 1.73611e+22 per m**3 \n", + "Mobility of charge carriers = 0.04 m**2/V-s \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.6 - Page No : 1-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "e = 1.6 * 10**-19 # in C\n", + "R_H = 0.0145 # in m**3/coulomb\n", + "Mu_e = 0.36 # in m**2/v-s\n", + "E = 100 # in V/m\n", + "n = 1/(e * R_H) # in /m**3\n", + "J = n * e * Mu_e * E # in A/m**2\n", + "print \"The current density of specimen = %0.3e A/m**2 \" %J" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current density of specimen = 2.483e+03 A/m**2 \n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.7 - Page No : 1-77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "Mu_e = 7.04 * 10**-3 # in m**2/v-s\n", + "m = 9.1 * 10**-31 \n", + "E_F = 5.5 # in eV\n", + "n = 5.8 * 10**28 \n", + "e = 1.6 * 10**-19 # in C\n", + "Torque = (Mu_e/e) * m # in sec\n", + "print \"Relaxation Time = %0.3e sec \" %Torque\n", + "Rho = 1 /(n * e * Mu_e) # in ohm-m\n", + "print \"Resistivity of conductor = %0.3e ohm-m \" %Rho\n", + "V_F = sqrt((2 * E_F * e)/m) # in m/s\n", + "print \"Velocity of electrons with fermi-energy = %0.4e m/s \" %V_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation Time = 4.004e-14 sec \n", + "Resistivity of conductor = 1.531e-08 ohm-m \n", + "Velocity of electrons with fermi-energy = 1.3907e+06 m/s \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.8 - Page No : 1-77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "E= 5.95 # in eV\n", + "EF= 6.25 # in eV\n", + "delE= 0.01 \n", + " # delE= 1-1/(1+exp((E-EF)/KT))\n", + "K=1.38*10**-23 # Boltzman Constant in J/K\n", + "T = ((E-EF)/log(1/(1-delE) -1)*1.6*10**-19)/K # in K\n", + "print \"The temperature =\" ,int(T),\"K\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature = 756 K\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.9 - Page No : 1-78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data \n", + "N_V = 1.04 * 10**19 # in cm**-3\n", + "T1 = 300 # in K\n", + "T2 = 400 # in K\n", + "del_E = 0.27 # in eV\n", + "N_V = N_V * (T2/T1)**1.5 # in cm**-3\n", + "KT = (0.0259) * (T2/T1) # in eV\n", + "P_o = N_V * exp(-(del_E)/KT) # in cm**-3\n", + "print \"The thermal equilibrium hole concentration in silicon = %0.2e cm**-3 \" %P_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal equilibrium hole concentration in silicon = 6.44e+15 cm**-3 \n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.10 - Page No : 1-78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_c = 2.8 * 10**19 \n", + "N_V = 1.04 *10**19 \n", + "T1 = 550 # in K\n", + "T2 = 300 # in K\n", + "E_g = 1.12 \n", + "KT = (0.0259) \n", + "n_i = sqrt(N_c *N_V *(T1/T2)**3* exp(-(E_g)/KT*T2/T1)) # in cm**-3\n", + "# n_o = N_d/2 + sqrt((N_d/2)**2 + (n_i)**2)\n", + "# 1.05*N_d -N_d/2= sqrt((N_d/2)**2 + (n_i)**2)\n", + "N_d=sqrt((n_i)**2/((0.55)**2-1/4)) \n", + "print \"Minimum donor concentration required = %0.3e cm**-3 \" %N_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum donor concentration required = 1.396e+15 cm**-3 \n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.11 - Page No : 1-79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T = 300 # in K\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_n = 10**13 # in cm**-3\n", + "del_p = del_n # in cm**-3\n", + "KT = 0.0259 # in eV\n", + "delta_E1= KT*log(n_o/n_i) # value of E_F-E_Fi in eV\n", + "delta_E2= KT*log((n_o+del_n)/n_i) # value of E_Fn-E_Fi in eV\n", + "delta_E3= KT*log((p_o+del_p)/n_i) # value of E_Fi-E_Fp in eV\n", + "print \"The Fermi level for thermal equillibrium = %0.4f eV \" %delta_E1\n", + "print \"The quase-Fermi level for electrons in non equillibrium = %0.4f eV \" %delta_E2\n", + "print \"The quasi-Fermi level for holes in non equillibrium = %0.3f eV \" %delta_E3\n", + "print \"The quasi-Fermi level for electrons is above E_Fi while the quasi-Fermi level for holes is below E_Fi\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Fermi level for thermal equillibrium = 0.2982 eV \n", + "The quase-Fermi level for electrons in non equillibrium = 0.2984 eV \n", + "The quasi-Fermi level for holes in non equillibrium = 0.179 eV \n", + "The quasi-Fermi level for electrons is above E_Fi while the quasi-Fermi level for holes is below E_Fi\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.12 - Page No : 1-79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n_i = 1.5 * 10**10 \n", + "n_o = 10**17 \n", + "KT = 0.0259 \n", + "P_o = (n_i)**2/n_o # in cm**-3\n", + "del_E = KT * log(n_o/n_i) # in eV\n", + "print \"equilibrium hole concentration = %0.3f eV \" %del_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "equilibrium hole concentration = 0.407 eV \n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.23.13 - Page No : 1-79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Mu_n = 700 #in cm**2/v-s\n", + "n_o = 10**17 # in /cm**3\n", + "q = 1.6 * 10**-19 # in C\n", + "l = 0.1 # in cm\n", + "A = 10**-6 \n", + "V = 10 # in V\n", + "Sigma = q * Mu_n * n_o # in (ohm cm)**-1\n", + "Rho = 1/Sigma #in ohm cm \n", + "R = Rho * (l/A) # in ohm\n", + "I = V/R # in A\n", + "print \"The value of current = %0.2f mA \" %(I*10**3)\n", + "\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of current = 1.12 mA \n" + ] + } + ], + "prompt_number": 65 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb new file mode 100644 index 00000000..8f8e2183 --- /dev/null +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_02.ipynb @@ -0,0 +1,944 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:764d1c60d9fefbb17ec0ffb4d8cdbf1cddd8802a6e86f8e004d6805017f0ecae" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 2 - Excess Carriers in Semiconductor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.1 - Page No : 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "N_d = 10**17 # atoms/cm**3\n", + "n_i = 1.5 * 10**10 # in /cm**3\n", + "n_o = 10**17 # in cm**3\n", + "# p_o * n_o = (n_i)**2\n", + "p_o = (n_i)**2 / n_o #in holes/cm**3\n", + "print \"The holes concentration at equilibrium = %0.2e holes/cm**3 \" %p_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The holes concentration at equilibrium = 2.25e+03 holes/cm**3 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.3 - Page No : 2-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\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", + "# E_r - E_i = KT * log(n_o/n_i)\n", + "del_E = KT * log(n_o/n_i) # in eV\n", + "print \"The energy band for this type material, E_F = Ei +\",round(del_E,3),\" eV\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy band for this type material, E_F = Ei + 0.407 eV\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.4 - Page No : 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "K = 1.38 * 10**-23 # in J/K\n", + "T = 27 # in degree\n", + "T = T + 273 # in K\n", + "e = 1.6 * 10**-19 # in C\n", + "Mu_e = 0.17 # in m**2/v-s\n", + "Mu_e1 = 0.025 # in m**2/v-s\n", + "D_n = ((K * T)/e) * Mu_e # in m**2/s\n", + "print \"The diffusion coefficient of electrons = %0.1e m**2/s \" %D_n\n", + "D_p = ((K * T)/e) * Mu_e1 # in m**2/s\n", + "print \"The diffusion coefficient of holes = %0.2e m**2/s \" %D_p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient of electrons = 4.4e-03 m**2/s \n", + "The diffusion coefficient of holes = 6.47e-04 m**2/s \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.5 - Page No : 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "Mu_n = 0.15 # in m**2/v-s\n", + "K = 1.38 * 10**-23 # in J/K\n", + "T = 300 # in K\n", + "del_n = 10**20 # in per m**3\n", + "Toh_n = 10**-7 # in s\n", + "e = 1.6 * 10**-19 # in C\n", + "D_n = Mu_n * ((K * T)/e) # in m**2/s\n", + "print \"The diffusion coefficient = %0.2e m**2/s \" %D_n\n", + "L_n = sqrt(D_n * Toh_n) # in m \n", + "print \"The Diffusion length = %0.2e m \" %L_n\n", + "J_n = (e * D_n * del_n)/L_n # in A/m**2\n", + "print \"The diffusion current density = %0.2e A/m**2 \" %J_n\n", + "# Note : The value of diffusion coefficient in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient = 3.88e-03 m**2/s \n", + "The Diffusion length = 1.97e-05 m \n", + "The diffusion current density = 3.15e+03 A/m**2 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.6 - Page No : 2-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Sigma = 0.1 # in (ohm-m)**-1\n", + "Mu_n = 1300 \n", + "n_i = 1.5 * 10**10 \n", + "q = 1.6 * 10**-19 # in C\n", + "n_n = Sigma/(Mu_n * q) # in electrons/cm**3\n", + "print \"The concentration of electrons = %0.2e per m**3 \" %(n_n*10**6)\n", + "p_n = (n_i)**2/n_n # in per cm**3\n", + "p_n = p_n * 10**6 # in perm**3\n", + "print \"The concentration of holes = %0.2e per m**3 \" %p_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The concentration of electrons = 4.81e+20 per m**3 \n", + "The concentration of holes = 4.68e+11 per m**3 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.7 - Page No : 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Mu_e = 0.13 # in m**2/v-s\n", + "Mu_h = 0.05 # in m**2/v-s\n", + "Toh_h = 10**-6 # in s\n", + "L = 100 # in \u00b5m\n", + "L = L * 10**-6 # in m\n", + "V = 2 # in V\n", + "t_n =L**2/(Mu_e * V) # in s\n", + "print \"Electron transit time = %0.1e seconds \" %t_n\n", + "p_g = (Toh_h/t_n) * (1 + Mu_h/Mu_e) #photo conductor gain \n", + "print \"Photo conductor gain = %0.2f\" %p_g\n", + "\n", + "# Note: There is a calculation error to evaluate the value of t_n. So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron transit time = 3.8e-08 seconds \n", + "Photo conductor gain = 36.00\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.8 - Page No : 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "n_i = 2.5 * 10**13 \n", + "Mu_n = 3800 \n", + "Mu_p = 1800 \n", + "q = 1.6 * 10**-19 # in C\n", + "Sigma = n_i * (Mu_n + Mu_p) * q # in (ohm-cm)**-1\n", + "Rho = 1/Sigma # in ohm-cm\n", + "Rho= round(Rho) \n", + "print \"The resistivity of intrinsic germanium = %0.f ohm-cm \" %Rho\n", + "N_D = 4.4 * 10**22/(1*10**8) # in atoms/cm**3\n", + "Sigma_n = N_D * Mu_n * q # in (ohm-cm)**-1\n", + "Rho_n = 1/Sigma_n # in ohm-cm\n", + "print \"If a donor type impurity is added to the extent of 1 atom per 10**8 Ge atoms, then the resistivity drops = %0.2f ohm-cm \" %Rho_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistivity of intrinsic germanium = 45 ohm-cm \n", + "If a donor type impurity is added to the extent of 1 atom per 10**8 Ge atoms, then the resistivity drops = 3.74 ohm-cm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.9 - Page No : 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "n_i = 10**16 # in /m3\n", + "N_D = 10**22 # in /m**3\n", + "n = N_D # in /m**3\n", + "print \"Electron concentration = %0.1e per m**3 \" %n\n", + "p = (n_i)**2/n # in /m**3\n", + "print \"Hole concentration = %0.1e per m**3 \" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron concentration = 1.0e+22 per m**3 \n", + "Hole concentration = 1.0e+10 per m**3 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.10 - Page No : 2-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rho = 9.6 * 10**-2 # in ohm-m\n", + "Sigma_n = 1/Rho # in (ohm-m)**-1\n", + "q = 1.6 * 10**-19 # in C\n", + "Mu_n = 1300 * 10**-4 # in m**2/v-s\n", + "N_D = Sigma_n / (Mu_n * q) # in atoms/m**3\n", + "A_D = N_D # Atom density in atoms/cm**3\n", + "A_D = A_D * 10**6 # atoms/m**3\n", + "R_si = N_D/A_D # ratio\n", + "print \"The ratio of donor atom to silicon atom = %0.1e\" %R_si\n", + "\n", + "# Note: In the book the wrong value of N_D (5*10**22) is putted to evaluate the value of \n", + "# Atom Density (A_D) whereas the value of N_D is calculated as 5*10**20.So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of donor atom to silicon atom = 1.0e-06\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.11 - Page No : 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "n_i = 1.5 * 10**10 # in per cm**3\n", + "n_n = 2.25 * 10**15 # in per cm**3\n", + "p_n = (n_i)**2/n_n # in per cm**3\n", + "print \"The equilibrium electron = %0.1e per cm**3 \" %p_n\n", + "h_n = n_n # in cm**3\n", + "print \"Hole densities = %0.2e per cm**3 \" %h_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equilibrium electron = 1.0e+05 per cm**3 \n", + "Hole densities = 2.25e+15 per cm**3 \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.12 - Page No : 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "N_A = 2 * 10**16 # in atoms/cm**3\n", + "N_D = 10**16 # in atoms/cm**3\n", + "C_c = N_A-N_D # C_c stands for Carrier concentration in /cm**3\n", + "print \"Carrier concentration = %0.1e holes/cm**3 \" %C_c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Carrier concentration = 1.0e+16 holes/cm**3 \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.13 - Page No : 2-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "del_n = 10**15 # in cm**3\n", + "Torque_p = 10 * 10**-6 # in sec\n", + "R_g = del_n/Torque_p # in hole pairs/sec/cm**3\n", + "print \"The rate of generation of minority carrier = %0.1e electron hole pairs/sec/cm**3 \" %R_g" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of generation of minority carrier = 1.0e+20 electron hole pairs/sec/cm**3 \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.14 - Page No : 2-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "v = 1/(20 * 10**-6) # in cm/sec\n", + "E = 10 # in V/cm\n", + "Mu= v/E # in cm**2/V-sec\n", + "print \"The mobility of minority charge carrier = %0.f cm**2/V-sec \" %Mu" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mobility of minority charge carrier = 5000 cm**2/V-sec \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.15 - Page No : 2-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "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 # in 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", + "print \"Hole concentration at thermal equilibrium = %0.1e per cm**3 \" %p_o\n", + "l_n = sqrt(D_n * Torque_n) # in cm\n", + "print \"Diffusion length of electron = %0.2e cm \" %l_n\n", + "l_p = sqrt(D_p * Torque_p) # in cm\n", + "print \"Diffusion length of holes = %0.1e cm \" %l_p\n", + "x=34.6*10**-4 # in cm\n", + "dpBYdx = del_p *e # in cm**4\n", + "print \"Concentration gradient of holes = %0.1e cm**4 \" %dpBYdx\n", + "e1 = 1.88 * 10**1 # in cm\n", + "dnBYdx = del_p * e1 # in cm**4 \n", + "print \"Concentration gradient of electrons = %0.2e per cm**4 \" %dnBYdx\n", + "J_P = -(q) * D_p * dpBYdx # in A/cm**2\n", + "print \"Current density of holes due to diffusion = %0.2e A/cm**2 \" %J_P\n", + "J_n = q * D_n * dnBYdx # in A/cm**2\n", + "print \"Current density of electrons due to diffusion = %0.1e A/cm**2 \" %J_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hole concentration at thermal equilibrium = 5.0e+04 per cm**3 \n", + "Diffusion length of electron = 5.48e-03 cm \n", + "Diffusion length of holes = 3.5e-03 cm \n", + "Concentration gradient of holes = 1.0e+22 cm**4 \n", + "Concentration gradient of electrons = 1.88e+22 per cm**4 \n", + "Current density of holes due to diffusion = -1.92e+04 A/cm**2 \n", + "Current density of electrons due to diffusion = 9.0e+04 A/cm**2 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.16 - Page No : 2-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "e= 1.6*10**-19 # electron charge in C\n", + "h = 6.626 * 10**-34 # in J-s\n", + "h= h/e # in eV\n", + "c = 3 * 10**8 # in m/s\n", + "lembda = 5490 * 10**-10 # in m\n", + "f = c/lembda \n", + "E = h * f # in eV\n", + "print \"The energy band gap of the semiconductor material = %0.2f eV \" %E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy band gap of the semiconductor material = 2.26 eV \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.17 - Page No : 2-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "y2 = 6 * 10**16 # in /cm**3\n", + "y1 = 10**17 # in /cm**3\n", + "x2 = 2 # in \u00b5m\n", + "x1 = 0 # in \u00b5m\n", + "D_n = 35 # in cm**2/sec\n", + "q = 1.6 *10**-19 # in C\n", + "dnBYdx = (y2 - y1)/((x2-x1) * 10**-4) \n", + "J_n = q * D_n * dnBYdx # in A/cm**2\n", + "print \"The current density in silicon = %0.f A/cm**2 \" %J_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current density in silicon = -1120 A/cm**2 \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.18 - Page No : 2-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "Mu_n = 0.13 # in m**2/V-sec\n", + "Mu_n = Mu_n * 10**4 # in cm**2/V-sec\n", + "Sigma_n = q * n_n * Mu_n # in (ohm-cm)**-1\n", + "Rho = 1/Sigma_n # in \u03a9-cm\n", + "l = 0.1 # in cm\n", + "A = 100 # \u00b5m**2\n", + "A = A * 10**-8 # in cm**2\n", + "R = Rho * (l/A) # in Ohm\n", + "R=round(R*10**-6) # in M\u03a9\n", + "print \"The resistance of the bar = %0.f M\u03a9 \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of the bar = 1 M\u03a9 \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.19 - Page No : 2-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "t_d = 3 # total depletion in \u00b5m\n", + "D = t_d/9 # in \u00b5m\n", + "print \"Depletion width = %0.1f \u00b5m \" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depletion width = 0.3 \u00b5m \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.20 - Page No : 2-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "n_i = 1.5 * 10**16 # in /m**3\n", + "n_n = 5 * 10**20 # in /m**3\n", + "p_n = (n_i)**2/n_n # in /m**3\n", + "print \"The majority carrier density = %0.2e per m**3 \" %p_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The majority carrier density = 4.50e+11 per m**3 \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.21 - Page No : 2-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "D_n = 25 # in cm**2/sec\n", + "q = 1.6 * 10**-19 # in C\n", + "y2 = 10**14 # in /cm**3\n", + "y1 = 0 # in /cm**3\n", + "x2 = 0 #in \u00b5m\n", + "x1 = 0.5 # in \u00b5m\n", + "x1 = x1 * 10**-4 # in cm\n", + "dnBYdx = abs((y2-y1)/(x2-x1)) # in /cm**4 \n", + "J_n = q * D_n * (dnBYdx) # in /cm**4\n", + "J_n = J_n * 10**-1 # in A/cm**2\n", + "print \"The collector current density = %0.f A/cm**2 \" %J_n\n", + "\n", + "# Note: In the book, the calculated value of dn by dx (2*10**19) is wrong. Correct value is 2*10**18\n", + "# so the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector current density = 1 A/cm**2 \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.22 - Page No : 2-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h = 6.64 * 10**-34 # in J-s\n", + "e= 1.6*10**-19 # electron charge in C\n", + "c= 3 * 10**8 # in m/s\n", + "lembda = 0.87 # in \u00b5m\n", + "lembda = lembda * 10**-6 # in m\n", + "E_g = (h * c)/lembda # in J-s\n", + "E_g= E_g/e # in eV\n", + "print \"The band gap of the material = %0.3f eV \" %E_g" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The band gap of the material = 1.431 eV \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.23 - Page No : 2-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "# Given data\n", + "I_o = 10 # in mW\n", + "e = 1.6 * 10**-19 # in J/eV\n", + "hv = 2 # in eV\n", + "hv1=1.43 # in eV\n", + "alpha = 5 * 10**4 # in cm**-1\n", + "l = 46 # in \u00b5m\n", + "l = l * 10**-6 # in m\n", + "I_t = round(I_o * exp(-(alpha) * l)) # in mW\n", + "AbsorbedPower= I_o-I_t # in mW\n", + "AbsorbedPower=AbsorbedPower*10**-3 # in W or J/s\n", + "print \"The absorbed power = %0.1e watt or J/s \" %AbsorbedPower\n", + "F= (hv-hv1)/hv # fraction of each photon energy unit\n", + "EnergyConToHeat= AbsorbedPower*F # in J/s\n", + "print \"The amount of energy converted to heat per second = %0.2e in J/s \" %EnergyConToHeat\n", + "A= (AbsorbedPower-EnergyConToHeat)/(e*hv1) \n", + "print \"The number of photon per sec given off from recombination events = %0.2e photons/s \" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absorbed power = 9.0e-03 watt or J/s \n", + "The amount of energy converted to heat per second = 2.57e-03 in J/s \n", + "The number of photon per sec given off from recombination events = 2.81e+16 photons/s \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.24 - Page No : 2-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "D_p = kT * Mu_p # in cm/s\n", + "L_p = sqrt(D_p * Toh_p) # in cm\n", + "x = 10**-5 # in cm\n", + "p = p_o+del_p* exp(x/L_p) # in cm**-3\n", + "# p= n_i*%e**(Eip)/kT where Eip=E_i-F_p\n", + "Eip= 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*exp(x/L_p) # in A\n", + "print \"The hole current = %0.2e A \" %Ip\n", + "Qp= q*A*del_p*L_p # in C\n", + "print \"The value of Qp = %0.2e C \" %Qp\n", + "\n", + "# Note: There is a calculation error or miss print to evalaute the value of hole current but they putted correct \n", + "# value of it to evaluate the value of Qp.Hence the value of hole current in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hole current = 1.90e+03 A \n", + "The value of Qp = 1.44e-07 C \n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21.25 - Page No : 2-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "KT = 0.0259 \n", + "A = 0.5 # in cm**2\n", + "Toh_p = 10**-10 # in sec\n", + "p_o = 10**17 # in per cm**3\n", + "del_p = 5 * 10**16 # in per cm**3\n", + "x = 10**-5 # in cm\n", + "Mu_p = 500 # in cm**2/V-S\n", + "q = 1.6 * 10**-19 # in C\n", + "D_p = KT * Mu_p # in cm/s\n", + "L_p = sqrt(D_p * Toh_p) # in cm\n", + "p = p_o * del_p * (exp(x/L_p)) # in per cm**3\n", + "I_p =q * A * (D_p/L_p) * del_p * (exp(x/L_p)) # in A\n", + "print \"The hole current = %0.2e A \" %I_p\n", + "Q_p = q * A * del_p * L_p # in C \n", + "print \"The hole charge = %0.2e C \" %Q_p\n", + "\n", + "# Note: There is a calculation error to evalaute the value of hole current but they putted correct \n", + "# value of it to evaluate the value of Qp.Hence the value of hole current in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hole current = 1.90e+03 A \n", + "The hole charge = 1.44e-07 C \n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb new file mode 100644 index 00000000..585e15e9 --- /dev/null +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_03.ipynb @@ -0,0 +1,948 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:05740426f73b9605877bfd0b7708432621382112013a8d4f8751c47309a06737" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 3 - Junction Properties" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.1 - Page No : 3-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "# Given data\n", + "t = 4.4 * 10**22 # total number of Ge atoms/cm**3\n", + "n = 1 * 10**8 # number of impurity atoms\n", + "N_A = t/n # in atoms/cm**3\n", + "N_A = N_A * 10**6 # in atoms/m**3\n", + "N_D = N_A * 10**3 # 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", + "V_T = 26 #in mV\n", + "V_T= V_T*10**-3 # in V\n", + "V_J = V_T * log((N_A * N_D)/(n_i)**2) # in V\n", + "print \"Part (a) : The contact potential = %0.3f V \" %V_J\n", + "# Part (b)\n", + "t = 5* 10**22 # total number of Si atoms/cm**3\n", + "N_A = t/n # in atoms/cm**3\n", + "N_A = N_A * 10**6 # in atoms/m**3\n", + "N_D = N_A * 10**3 # in atoms/m**3\n", + "n_i = 1.5 * 10**10 # in atoms/cm**3\n", + "n_i = n_i * 10**6 # in atoms/m**3\n", + "V_T = 26 #in mV\n", + "V_T= V_T*10**-3 # in V\n", + "V_J = V_T * log((N_A * N_D)/(n_i)**2) # in V\n", + "print \"Part (b) : The contact potential = %0.3f V \" %V_J" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : The contact potential = 0.329 V \n", + "Part (b) : The contact potential = 0.721 V \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.2 - Page No : 3-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T = 26 # in mV\n", + "V_T=V_T*10**-3 # in V\n", + "n_i = 2.5 * 10**13 \n", + "Sigma_p = 1 \n", + "Sigma_n = 1 \n", + "Mu_n = 3800 \n", + "q = 1.6 * 10**-19 # in C\n", + "Mu_p = 1800 \n", + "N_A = Sigma_p/(2* q * Mu_p) # in /cm**3\n", + "N_D = Sigma_n /(q * Mu_n) # in /cm**3\n", + "V_J = V_T * log((N_A * N_D)/(n_i)**2) # in V\n", + "print \"For Ge the height of the energy barrier = %0.2f V \" %V_J\n", + "# For Si p-n juction\n", + "n_i = 1.5 * 10**10 \n", + "Mu_n = 1300 \n", + "Mu_p = 500 \n", + "N_A = Sigma_p/(2* q * Mu_p) # in /cm**3\n", + "N_D = Sigma_n /(q * Mu_n) # in /cm**3\n", + "V_J = V_T * log((N_A * N_D)/(n_i)**2) # in V\n", + "print \"For Si p-n junction the height of the energy barrier = %0.3f V \" %V_J" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Ge the height of the energy barrier = 0.22 V \n", + "For Si p-n junction the height of the energy barrier = 0.666 V \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10.3 - Page No : 3-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "# Given data\n", + "Eta = 1 \n", + "V_T = 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "# I = I_o * (exp(V/(Eta*V_T)) - 1) and I = -(0.9) * I_o \n", + "V= log(1-0.9)*V_T # in V\n", + "print \"The voltage = %0.2f volts \" %V\n", + "# Part (ii)\n", + "V1=0.05 # in V\n", + "V2= -0.05 # in V\n", + "ratio= (exp(V1/(Eta*V_T))-1)/(exp(V2/(Eta*V_T))-1)\n", + "print \"The ratio of the current for a forward bias to reverse bias = %0.2f\" %ratio\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 * (exp(V/(Eta*V_T)) - 1) # in mA\n", + "print \"For v=0.1 V , the value of I = %0.3f mA \" %I\n", + "#For \n", + "V=0.2 # in V\n", + "I = Io * (exp(V/(Eta*V_T)) - 1) # in mA\n", + "print \"For v=0.2 V , the value of I = %0.1f mA \" %I\n", + "#For \n", + "V=0.3 # in V\n", + "I = Io * (exp(V/(Eta*V_T)) - 1) # in mA\n", + "print \"For v=0.3 V , the value of I = %0.2f A \" %(I*10**-3)\n", + "print \"From three value of I, for small rise in forward voltage, the diode current increase rapidly\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage = -0.06 volts \n", + "The ratio of the current for a forward bias to reverse bias = -6.84\n", + "For v=0.1 V , the value of I = 0.458 mA \n", + "For v=0.2 V , the value of I = 21.9 mA \n", + "For v=0.3 V , the value of I = 1.03 A \n", + "From three value of I, for small rise in forward voltage, the diode current increase rapidly\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10.4 - Page No : 3-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "# Part (i)\n", + "T1= 25 # in \u00b0C\n", + "T2= 80 # in \u00b0C\n", + "# Formula Io2= Io1*2**((T2-T1)/10)\n", + "AntiFactor= 2**((T2-T1)/10) \n", + "print \"Anticipated factor for Ge = %0.f \" %AntiFactor\n", + "# Part (ii)\n", + "T1= 25 # in \u00b0C\n", + "T2= 150 # in \u00b0C\n", + "AntiFactor= 2**((T2-T1)/10) \n", + "print \"Anticipated factor for Si = %0.f \" %AntiFactor" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anticipated factor for Ge = 45 \n", + "Anticipated factor for Si = 5793 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10.5 - Page No : 3-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I=5 # in \u00b5A\n", + "V=10 # in V\n", + "T1= 0.11 # in \u00b0C**-1\n", + "T2= 0.07 # in \u00b0C**-1\n", + "# Io+I_R=I (i)\n", + "# dI_by_dT= dIo_by_dT (ii)\n", + "# 1/Io*dIo_by_dT = T1 and 1/I*dI_by_dT = T2, So\n", + "Io= T2*I/T1 # in \u00b5A\n", + "I_R= I-Io # in \u00b5A\n", + "R= V/I_R # in M\u03a9\n", + "print \"The leakage resistance = %0.1f M\u03a9 \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The leakage resistance = 5.5 M\u03a9 \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10.6 - Page No : 3-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Eta = 1 \n", + "T = 125 # 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", + "I_o= I_o*10**-6 # in A\n", + "v = 0.2 # in V\n", + "r_f = (Eta * V_T)/(I_o * exp(v/(Eta* V_T))) # in ohm\n", + "print \"The dynamic resistance in the forward direction = %0.2f ohm \" %r_f\n", + "r_r = (Eta * V_T)/(I_o * exp(-v/(Eta* V_T))) # in ohm\n", + "print \"The dynamic resistance in the reverse direction = %0.2f kohm \" %(r_r*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dynamic resistance in the forward direction = 3.36 ohm \n", + "The dynamic resistance in the reverse direction = 389.08 kohm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.7 - Page No : 3-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "epsilon = 16/(36 * pi * 10**11) # in F/cm\n", + "A = 1 * 10**-2 \n", + "W = 2 * 10**-4 \n", + "C_T = (epsilon * A)/W # in F\n", + "print \"The barrier capacitance = %0.2f pF \" %(C_T*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The barrier capacitance = 70.74 pF \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10.8 - Page No : 3-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "A = 1 # 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", + "epsilon=epsilon_r*epsilon_o \n", + "# Part (a)\n", + "V=-10 # in V\n", + "# V_o - V = 1/2*((q * N_A )/epsilon) * W**2\n", + "W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) # m\n", + "C_T1 = (epsilon * A)/W # in F\n", + "print \"The width of the depletion layer for an applied reverse voltage of 10V = %0.2f \u00b5m \" %(W*10**6)\n", + "# Part (b)\n", + "V=-0.1 # in V\n", + "W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) # m\n", + "C_T2 = (epsilon * A)/W # in F\n", + "print \"The width of the depletion layer for an applied reverse voltage of 0.1V = %0.2f \u00b5m \" %(W*10**6)\n", + "# Part (c)\n", + "V=0.1 # in V\n", + "W = sqrt(((V_o - V) * 2 * epsilon)/(q * N_A)) # m\n", + "print \"The width of the depletion layer for an applied for a forward bias of 0.1V = %0.3f \u00b5m \" %(W*10**6)\n", + "# Part (d)\n", + "print \"The space charge capacitance for an applied reverse voltage of 10V = %0.2f pF \" %(C_T1*10**12)\n", + "print \"The space charge capacitance for an applied reverse voltage of 0.1V = %0.2f pF \" %(C_T2*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of the depletion layer for an applied reverse voltage of 10V = 7.76 \u00b5m \n", + "The width of the depletion layer for an applied reverse voltage of 0.1V = 1.33 \u00b5m \n", + "The width of the depletion layer for an applied for a forward bias of 0.1V = 0.768 \u00b5m \n", + "The space charge capacitance for an applied reverse voltage of 10V = 18.26 pF \n", + "The space charge capacitance for an applied reverse voltage of 0.1V = 106.46 pF \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.9 - Page No : 3-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_o = 1.8 * 10**-9 # A\n", + "v = 0.6 # in V\n", + "Eta = 2 \n", + "V_T = 26 # in mV\n", + "V_T=V_T*10**-3 # in V\n", + "I = I_o *(exp(v/(Eta * V_T))) # in A\n", + "print \"The current in the junction = %0.3f mA \" %(I*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current in the junction = 0.185 mA \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.10 - Page No : 3-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "V_T= V_T*10**-3 # in V\n", + "v =log((I + I_o)/I_o) * V_T # in V\n", + "print \"The forward biasing voltage across the junction = %0.4f V \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forward biasing voltage across the junction = 0.6463 V \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.11 - Page No : 3-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_o = 10 # in nA\n", + "# I = I_o * ((e**(v/(Eta * V_T))) - 1)\n", + "# e**(v/(Eta * V_T)<< 1, so neglecting it\n", + "I = I_o * (-1) # in nA\n", + "print \"The Diode current = %0.f nA \" %I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Diode current = -10 nA \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.12 - Page No : 3-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R = 4.5 # in ohm\n", + "I = 44.4 # 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", + "V_T=V_T*10**-3 # in V\n", + "I_o = I/((exp(V/(Eta * V_T))) -1) # in A\n", + "# At\n", + "V = 0.1 # in V\n", + "r_f = (Eta * V_T)/(I_o * ((exp(V/(Eta * V_T)))-1)) # in ohm\n", + "print \"The diode dynamic resistance = %0.2f \u03a9 \" %r_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diode dynamic resistance = 27.78 \u03a9 \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.13 - Page No : 3-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "# Given data\n", + "V_D = 10 # in V\n", + "# V_S = i*R_L + V_D\n", + "V_S = V_D # in V (i * R_L = 0)\n", + "print \"when diode is OFF, the voltage = %0.f volts \" %V_S\n", + "R_L = 250 # in ohm\n", + "I = V_S/R_L # in A\n", + "print \"when diode is ON, the current = %0.f mA \" %(I*10**3)\n", + "V_D= np.arange(0,10,0.1) # in V\n", + "I= (V_S-V_D)/R_L*1000 # in mA\n", + "plt.plot(V_D,I)\n", + "plt.xlabel('V_D in volts') \n", + "plt.ylabel('Current in mA')\n", + "plt.title('DC load line')\n", + "plt.axis([0, 12, 0, 50])\n", + "plt.show()\n", + "print \"DC load line shown in figure\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when diode is OFF, the voltage = 10 volts \n", + "when diode is ON, the current = 40 mA \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "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RpEsrKyvDFF1/A3t4e7u7uWLhwYf3+RRAZif0EiIgU\njMNBREQKxuEgsklnzpx5ZIjniSeewKFDh2SKiMgycTiIiEjBOBxERKRgTAJERArGJEBEpGBMAkRE\nCsYkQESkYP8HqYZH+eX0mvAAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DC load line shown in figure\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.14 - Page No : 3-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V = 0.25 # in V\n", + "I_o = 1.2 # in \u00b5A\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 * (exp(V/(Eta * V_T)))) # in ohm\n", + "print \"The ac resistance of the diode = %0.3f ohm \" %r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ac resistance of the diode = 1.445 ohm \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.15 - Page No : 3-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "t = 4.4 * 10**22 # in total number of atoms/cm**3\n", + "n = 1 * 10**8 # number of impurity\n", + "N_A = t/n # in atoms/cm**3\n", + "N_A = N_A * 10**6 # in atoms/m**3\n", + "N_D = N_A * 10**3 # in atoms/m**3\n", + "V_T = 26 # in mV\n", + "V_T = V_T * 10**-3 # in V\n", + "n_i = 2.5 * 10**19 # in /cm**3\n", + "V_J = V_T * log((N_A * N_D)/(n_i)**2) # in V\n", + "print \"The junction potential = %0.3f V \"%V_J" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The junction potential = 0.329 V \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.16 - Page No : 3-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Eta = 1 \n", + "I_o = 30 # in MuA\n", + "I_o = I_o * 10**-6 # in A\n", + "v = 0.2 # in V\n", + "K = 1.381 * 10**-23 # in J/degree K \n", + "T = 125 # in \u00b0C\n", + "T = T + 273 # in K\n", + "q = 1.6 * 10**-19 # in C\n", + "V_T = (K*T)/q # in V\n", + "r_f = (Eta * V_T)/(I_o * (exp(v/(Eta * V_T)))) # in ohm\n", + "print \"The forward dynamic resistance = %0.3f ohm \" %r_f\n", + "r_f1 = (Eta * V_T)/(I_o * (exp(-(v)/(Eta * V_T)))) # in ohm\n", + "print \"The Reverse dynamic resistance = %0.2f k\u03a9 \" %(r_f1*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forward dynamic resistance = 3.391 ohm \n", + "The Reverse dynamic resistance = 386.64 k\u03a9 \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.17 - Page No : 3-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "q = 1.6 * 10**-19 # in C\n", + "N_A = 3 * 10**20 # in /m**3\n", + "A = 1 # in \u00b5m**2\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 = sqrt((V_B * 2 * epsilon)/(q * N_A)) # in m \n", + "print \"The width of depletion layer = %0.2f \u00b5m \" %(W*10**6)\n", + "C_T = (epsilon * A)/W # in pF\n", + "print \"The space charge capacitance = %0.4f pF \" %(C_T*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The width of depletion layer = 7.78 \u00b5m \n", + "The space charge capacitance = 18.2127 pF \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.18 - Page No : 3-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "W = 2 * 10**-4 # in cm\n", + "W = W * 10**-2 # in m\n", + "A = 1 # in mm**2\n", + "A = A * 10**-6 # in m**2\n", + "epsilon_r = 16 \n", + "epsilon_o = 8.854 * 10**-12 # in F/m\n", + "epsilon = epsilon_r * epsilon_o \n", + "C_T = (epsilon * A)/W # in F\n", + "print \"The barrier capacitance = %0.3f pF \" %(C_T*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The barrier capacitance = 70.832 pF \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.19 - Page No : 3-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_T = 100 # 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", + "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 = sqrt((V_B * 2 * epsilon)/qN_A) # in m\n", + "#C_T = (epsilon * A)/W \n", + "A = (C_T * W)/ epsilon # in m\n", + "D = sqrt(A * (4/pi)) # in m\n", + "D = D * 10**3 # in mm\n", + "print \"The value of diameter = %0.3f mm \" %D\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of diameter = 1.398 mm \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.20 - Page No : 3-55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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_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/log((N_A * N_D)/(n_i)**2) # in V\n", + "# V_T = T/11600\n", + "T = V_T * 11600 # in K\n", + "T = T /19.78 # in \u00b0C ( 1 degree K = 19.78 degree C)\n", + "print \"The Temperature of junction = %0.3f \u00b0C \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Temperature of junction = 14.524 \u00b0C \n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.21 - Page No : 3-56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_T = 26 # in mV\n", + "V_T = V_T * 10**-3 # in V\n", + "Eta = 1 \n", + "# I = -90% for Io, so\n", + "IbyIo= 0.1 \n", + "# I = I_o * ((e**(v/(Eta * V_T)))-1)\n", + "V = log(IbyIo) * V_T # in V\n", + "print \"The reverse bias voltage = %0.5f volts \" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reverse bias voltage = -0.05987 volts \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10.22 - Page No : 3-57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\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", + "V_T=V_T*10**-3 # in V\n", + "I_o = I/((exp(V/(Eta * V_T))) - 1) # in A\n", + "print \"Reverse saturation current = %0.2f \u00b5A \" %(I_o*10**6)\n", + "v1 = 0.2 # in V\n", + "r = (Eta * V_T)/(I_o * (exp(v1/(Eta * V_T)))) # in ohm\n", + "print \"Dynamic resistance of the diode = %0.3f \u03a9 \" %r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current = 3.33 \u00b5A \n", + "Dynamic resistance of the diode = 3.558 \u03a9 \n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb new file mode 100644 index 00000000..1742be0d --- /dev/null +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_04.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4d99941a24dd4b52b28be86bfd9badb4433db857a4af90f4e45a050680719b41" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 4 - Junction (Contd.)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1 - Page No : 4-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# Given data\n", + "q = 1.6 * 10**-19 # in C\n", + "N_D = 10**15 # in electrons/cm**3\n", + "N_D = N_D * 10**6 # in electrons/m**3\n", + "epsilon_r = 12 \n", + "epsilon_o = (36 * pi * 10**9)**-1 \n", + "epsilon = epsilon_o * epsilon_r \n", + "a = 3 * 10**-4 # in cm\n", + "a = a * 10**-2 # in m\n", + "V_P = (q * N_D * a**2)/( 2 * epsilon) # in V\n", + "print \"The Pinch off voltage = %0.1f V \" %V_P\n", + "# V_GS = V_P * (1-(b/a))**2\n", + "b = (1-0.707) *a # in m\n", + "print \"The value of b = %0.3f \u00b5m \" %(b*10**6)\n", + "print \"Hence the channel width has been reduced to about one third of its value for V_GS = 0\"\n", + "# Note : The unit of b in the book is wrong since the value of b is calculated in \u00b5m." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Pinch off voltage = 6.8 V \n", + "The value of b = 0.879 \u00b5m \n", + "Hence the channel width has been reduced to about one third of its value for V_GS = 0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.12.2 - Page No : 4-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "I_DSS = 8 # in mA\n", + "V_P = -4 # in V\n", + "I_D = 3 # in mA\n", + "V_GS = V_P * (1 - sqrt(I_D/I_DSS)) # in V\n", + "print \"The value of V_GS = %0.2f V \" %V_GS\n", + "V_DS = V_GS - V_P # in V\n", + "print \"The value of V_DS = %0.2f V \" %V_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = -1.55 V \n", + "The value of V_DS = 2.45 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.12.3 - Page No : 4-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_P = -4 # in V\n", + "I_DSS = 9 # in mA\n", + "I_DSS = I_DSS * 10**-3 # in A\n", + "V_GS = -2 # in V\n", + "I_D = I_DSS * ((1 - (V_GS/V_P))**2) # in A\n", + "print \"The drain current = %0.2f mA \" %(I_D*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drain current = 2.25 mA \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.12.4 - Page No : 4-47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_DSS = 12 # in mA\n", + "I_DSS = I_DSS * 10**-3 # in A\n", + "V_P = -(6) # in V\n", + "V_GS = -(1) # in V\n", + "g_mo = (-2 * I_DSS)/V_P # in A/V\n", + "g_m = g_mo * (1 - (V_GS/V_P)) # in S\n", + "print \"The value of transconductance = %0.2f mS \" %(g_m*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of transconductance = 3.33 mS \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.5 - Page No : 4-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_DSS = 10 # in mA \n", + "I_DSS = I_DSS * 10**-3 # in A\n", + "V_P = -(5) # in V\n", + "V_GS = -(2.5) # in V\n", + "g_m = ((-2 * I_DSS)/V_P) * (1 -(V_GS/V_P)) # in S\n", + "g_m = g_m * 10**3 # in mS\n", + "print \"The Transconductance = %0.f mS \" %g_m\n", + "I_D = I_DSS * ((1 - (V_GS/V_P))**2) # in A\n", + "print \"The drain current = %0.1f mA \" %(I_D*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Transconductance = 2 mS \n", + "The drain current = 2.5 mA \n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb b/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb new file mode 100644 index 00000000..113c19cc --- /dev/null +++ b/Electronic_Devices_by_K._C._Nandi/Chapter_05.ipynb @@ -0,0 +1,902 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f580dc14cd164012c93f758d593e5fbb20692db2a4830c462cc2ecc139c62a4a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 5 - Bipolar Junction Transistors (BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.8.1 - Page No : 5-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V_EE = 8 # in V\n", + "V_BE = 0.7 # in V\n", + "R_E = 1.5 # in k ohm\n", + "I_E = (V_EE - V_BE)/R_E # in mA\n", + "I_C = I_E # in mA\n", + "print \"The value of I_C = %0.2f mA \" %I_C\n", + "V_CC = 18 # in V\n", + "R_C = 1.2 # in k\u03a9\n", + "V_CB = V_CC - (I_C * R_C) # in V\n", + "print \"The value of V_CB = %0.2f V \" %V_CB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C = 4.87 mA \n", + "The value of V_CB = 12.16 V \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.8.2 - Page No : 5-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "alpha = 0.9 \n", + "I_E = 1 # mA\n", + "I_C = alpha * I_E # in mA\n", + "I_B = I_E - I_C # in mA\n", + "print \"The value of base current = %0.1f mA \" %I_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of base current = 0.1 mA \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10.1 - Page No : 5-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "bita = 50 \n", + "I_B= 20 # in \u00b5A\n", + "I_B=I_B*10**-6 # in A\n", + "I_C= bita*I_B # in A\n", + "I_E= I_C+I_B # in A\n", + "I_E = I_E * 10**3 # in mA\n", + "print \"The Emitter current = %0.2f mA \" %I_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Emitter current = 1.02 mA \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10.1(a) - Page No : 5-39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "beta_dc = 90 \n", + "I_C = 15 # in mA\n", + "I_C = I_C * 10**-3 # in A\n", + "I_B = I_C/beta_dc # in A\n", + "print \"The base current = %0.2f \u00b5A \" %(I_B*10**6)\n", + "I_E = I_C + I_B # in A\n", + "I_E = I_E * 10**3 # in mA\n", + "print \"The Emitter current = %0.3f mA \" %I_E\n", + "alpha_dc = beta_dc/(1+beta_dc) \n", + "print \"The value of alpha_dc = %0.3f\" %alpha_dc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The base current = 166.67 \u00b5A \n", + "The Emitter current = 15.167 mA \n", + "The value of alpha_dc = 0.989\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10.3 - Page No : 5-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "del_ic = 1.8 # in mA\n", + "del_ie = 1.89 # in mA\n", + "alpha = del_ic / del_ie \n", + "bita = alpha/(1 - alpha) \n", + "del_ib = del_ic/bita # in mA\n", + "del_ib = del_ib * 10**3 # in \u00b5A\n", + "print \"The change in I_B = %0.f \u00b5A \" %del_ib" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in I_B = 90 \u00b5A \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10.4 - Page No : 5-40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC = 10 # in V\n", + "R_C = 3 # in k \u03a9\n", + "R_C= R_C*10**3 # in \u03a9\n", + "bita = 100 \n", + "I_CO = 20 # in nA\n", + "I_CO = I_CO * 10**-9 # in A\n", + "V_BB = 5 # in V\n", + "R_B = 200 # in k\u03a9\n", + "R_B= R_B*10**3 # in \u03a9\n", + "V_BE = 0.7 # in V\n", + "# Applying KVL to the base circuit, V_BB= I_B*R_B+V_BE\n", + "I_B = (V_BB - V_BE)/R_B # in A\n", + "print \"The base current = %0.1f \u00b5A \" %(I_B*10**6)\n", + "I_C = (bita * I_B) + I_CO # in A\n", + "print \"The collector current = %0.5f mA \" %(I_C*10**3)\n", + "I_E = I_C + I_B # in A\n", + "print \"Emitter current = %0.5f mA \" %(I_E*10**3)\n", + "V_CE = V_CC - (I_C * R_C) # in V\n", + "print \"Collector emitter voltage = %0.4f V \" %(V_CE)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The base current = 21.5 \u00b5A \n", + "The collector current = 2.15002 mA \n", + "Emitter current = 2.17152 mA \n", + "Collector emitter voltage = 3.5499 V \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10.5 - Page No : 5-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "bita = 100 \n", + "I_CBO = 4 # in \u00b5A\n", + "I_B = 40 # in \u00b5A\n", + "I_C = (bita * I_B) + ((1+bita) * I_CBO) # in \u00b5A\n", + "I_C = I_C * 10**-3 # in msA\n", + "print \"The collector current = %0.3f mA \" %I_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The collector current = 4.404 mA \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10.6 - Page No : 5-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from __future__ import division\n", + "# Given data\n", + "del_IC = 1 * 10**-3 # in A\n", + "del_IB = 10 * 10**-6 # in A\n", + "CurrentGain= del_IC/del_IB \n", + "print \"The current gain = %0.f\" %CurrentGain\n", + "del_IC= del_IC*10**3 # in mA\n", + "del_IB= del_IB*10**6 # in \u00b5A\n", + "I_B=np.arange(0,50,0.1) # in \u00b5A\n", + "I_C= I_B/del_IB+del_IC # in mA\n", + "plt.plot(I_B,I_C)\n", + "plt.xlabel('Base current in micro A')\n", + "plt.ylabel('Collector current in mA')\n", + "plt.title('Transfer Characteristics')\n", + "plt.axis([0, 60, 0, 7])\n", + "plt.show()\n", + "print \"Transfer Characteristics is shown in figure\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current gain = 100\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEZCAYAAAB2AoVaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYlGXeB/DvDAdBGRBQARWFoBAUGBQlLXNcRPNAGyqK\nuaRmvh22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1NT\nkZGRgYiICERHR+Ps2bNwcnLCe++9hwEDBmD48OEICwur95lHz2ofPnZ2djaoZt3PDB06FGfOnGn0\nC9q6dwcy9E5ITY2tqd8XLVqEe/fuITw8HEqlUrfqqe57o6KiMHXqVAwYMABPPvkkZsyYgcjIyHp1\n0tLSkJCQUO+5cePGIS0tTe+YyTZw6SURkR3gmT0RkR1g2BMR2QGGPRGRHWDYExHZAYY9EZEdYNgT\nEdkBhj0RkR1g2BMR2YH/A2IOTkNSzG6GAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transfer Characteristics is shown in figure\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10.7- Page No : 5-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_CEo = 21 # in \u00b5A\n", + "I_CBO = 1.1 # in \u00b5A\n", + "beta_dc = (I_CEo/I_CBO) - 1 \n", + "print \"Value of beta_dc = %0.f\" %beta_dc\n", + "alpha_dc = beta_dc/(1 + beta_dc) \n", + "print \"The value of alpha_dc = %0.4f\" %alpha_dc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of beta_dc = 18\n", + "The value of alpha_dc = 0.9476\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.1 - Page No : 5-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_CBO = 3 #in \u00b5A\n", + "I_CBO= I_CBO*10**-3 # in mA \n", + "I_C= 15 # in mA\n", + "# But it is given that I_C= 99.5% of I_E, SO\n", + "I_E= I_C/99.5*100 # in mA\n", + "alpha_dc= I_C/I_E \n", + "print \"The value of alpha_dc = %0.3f\" %alpha_dc\n", + "print \"The value of I_E = %0.2f mA \" %I_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha_dc = 0.995\n", + "The value of I_E = 15.08 mA \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.2 - Page No : 5-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alpha_dc = 0.99 \n", + "I_CBO = 10 # in \u00b5A\n", + "I_CBO= I_CBO*10**-6 # in A\n", + "I_E = 10 # in mA\n", + "I_E= I_E*10**-3 # in A\n", + "I_C = (alpha_dc * I_E) + I_CBO # in A\n", + "print \"The value of I_C = %0.2f mA \" %(I_C*10**3)\n", + "I_B = I_E - I_C # in A\n", + "I_B = I_B * 10**6 # in \u00b5A\n", + "print \"The value of I_B = %0.f \u00b5A \" %I_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_C = 9.91 mA \n", + "The value of I_B = 90 \u00b5A \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.3 - Page No : 5-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "alpha_dc = 0.99 \n", + "I_C = 6 # in mA\n", + "I_C= I_C*10**-3 # in A\n", + "I_CBO = 15 # in \u00b5A\n", + "I_CBO= I_CBO*10**-6 # in A\n", + "I_E = (I_C - I_CBO)/alpha_dc # in A\n", + "I_B = I_E - I_C # in A \n", + "print \"The value of I_B = %0.f \u00b5A \" %(I_B*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B = 45 \u00b5A \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.5 - Page No : 5-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "alpha_dc = 0.98 \n", + "I_CBO = 12 # in \u00b5A\n", + "I_CBO = I_CBO * 10**-6 # in A\n", + "I_B = 120 # in \u00b5A\n", + "I_B = I_B * 10**-6 # in A\n", + "beta_dc = alpha_dc/(1-alpha_dc) \n", + "I_E = ((1 + beta_dc) * I_B) + ((1 + beta_dc) * I_CBO) #in A\n", + "I_E = I_E * 10**3 # in mA\n", + "print \"The value of I_E = %0.1f mA \" %I_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_E = 6.6 mA \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.6 - Page No : 5-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "bita= 100 \n", + "V_BEsat= 0.8 # in V\n", + "V_CEsat= 0.2 # in V\n", + "V_BEact= 0.7 # in V\n", + "V_CC = 10 # in V\n", + "V_BB=5 # in V\n", + "R_E = 2 # in k\u03a9\n", + "R_C = 3 # in k\u03a9\n", + "R_B= 50 # in k\u03a9\n", + "# Applying KVL to collector loop\n", + "# V_CC= I_Csat*R_C +V_CEsat +I_E*R_E and I_E= I_Csat+I_B, So\n", + "#I_B= ((V_CC-V_CEsat)-(R_C+R_E)*I_Csat)/R_E (i)\n", + "# Applying KVL to base loop\n", + "# V_BB-I_B*R_B -V_BEsat-I_E*R_E =0 and I_E= I_Csat+I_B, So\n", + "#V_BB-V_BEsat= R_E*I_Csat + (R_B+R_E)*I_B (ii)\n", + "# From eq (i) and (ii)\n", + "I_B = ((V_BB-V_BEsat)*5- (V_CC-V_CEsat)*2) / ((R_B+R_E)*5 - R_E*2) # in mA\n", + "I_Csat= ((V_CC-V_CEsat)-R_E*I_B)/(R_C+R_E) # in mA\n", + "I_Bmin= I_Csat/bita # in mA\n", + "if I_BI_Bmin :\n", + " print \"Since the value of I_B (\",round(I_B*10**3,2),\"\u00b5A) is greater than the value of I_Bmin (\",int(I_Bmin*10**3),\"\u00b5A)\" \n", + " print \"So the transistor is in the saturation region.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the value of I_B ( 61.33 \u00b5A) is greater than the value of I_Bmin ( 49 \u00b5A)\n", + "So the transistor is in the saturation region.\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13.9 - Page No : 5-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "bita = 100 \n", + "V_CE = 0.2 #in V\n", + "V_BE = 0.8 # in V\n", + "R_C= 500 # in \u03a9\n", + "R_B= 44*10**3 # in \u03a9\n", + "R_E= 1*10**3 # in \u03a9\n", + "V_CC= 15 # in V\n", + "V_GE= -15 # in V\n", + "# Applying KVL to collector circuit\n", + "# V_CC-V_GE - I_Csat*R_C-V_CE-I_E*R_E=0, but I_Csat= bita*I_Bmin and I_E= 1+bita\n", + "I_Bmin= (V_CC-V_GE-V_CE)/(R_C*bita+(1+bita)*R_E) # in A\n", + "# Applying KVL to the base emitter circuit\n", + "# V_BB-I_Bmin*R_B-V_BE-I_E*R_E + V_CC=0\n", + "V_BB= I_Bmin*R_B + V_BE + (1+bita)*I_Bmin*R_E-V_CC # in V\n", + "print \"The value of I_B(min) = %0.3f mA \" %(I_Bmin*10**3)\n", + "print \"The value of V_BB = %0.1f volts \" %V_BB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B(min) = 0.197 mA \n", + "The value of V_BB = 14.4 volts \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.10 - Page No : 5-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_ECsat= 0.2 # in V\n", + "V_CC= 10 # in V\n", + "V_EBsat= 0.8 # in V\n", + "\n", + "# Part (i)\n", + "bita= 100 \n", + "R_B= 220 # in k\u03a9\n", + "# Applying KVL to collector circuit, V_CC= V_EC+ICRC\n", + "ICRC= V_CC-V_ECsat # in V\n", + "# Applying KVL to input loop, V_CC= V_EBsat+I_B*R_B (i)\n", + "I_B= (V_CC-V_EBsat)/R_B # in mA\n", + "I_C= bita*I_B # in mA\n", + "R_Cmin= ICRC/I_C # in k\u03a9\n", + "print \"The minimum value of R_C = %0.3f k\u03a9 \" %R_Cmin\n", + "# Part (ii)\n", + "R_C= 1.2 # in k\u03a9\n", + "I_Csat= ICRC/R_C # in mA\n", + "I_B= I_Csat/bita # in mA\n", + "# From eq (i)\n", + "R_B= (V_CC-V_EBsat)/I_B # in k\u03a9\n", + "print \"The maximum value of R_B = %0.2f k\u03a9 \" %R_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum value of R_C = 2.343 k\u03a9 \n", + "The maximum value of R_B = 112.65 k\u03a9 \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.11 - Page No : 5-56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "bita= 100 \n", + "V_BEsat= 0.8 # in V\n", + "V_CEsat= 0.2 # in V\n", + "V_BEact= 0.7 # in V\n", + "V_CC = 10 # in V\n", + "R_E = 1 # in k\u03a9\n", + "R_C = 2 # in k\u03a9\n", + "R_B= 100 # in k\u03a9\n", + "bita=100 \n", + "alpha= bita/(1+bita) \n", + "# Applying KVL to collector circuit\n", + "# V_CC= I_Csat*R_C +V_CE +R_E*I_E\n", + "# but I_E= alpha*I_Csat\n", + "I_Csat= (V_CC-V_CEsat)/(R_C+R_E*alpha) # in mA\n", + "I_Bmin= I_Csat/bita # in mA\n", + "# Applying KVL to base loop\n", + "# V_CC= I_B*R_B +V_BEsat +I_E*R_E\n", + "# but I_E= I_Csat+I_B\n", + "I_B= (V_CC-V_BEsat-I_Csat*R_E)/(R_B+R_E) # in mA\n", + "print \"The value of I_B = %0.2f \u00b5A \" %(I_B*10**3)\n", + "print \"The minimum value of I_B = %0.1f \u00b5A \" %(I_Bmin*10**3)\n", + "if I_B>I_Bmin :\n", + " print \"Since the value of I_B is greater than the value of I_Bmin\"\n", + " print \"Hence the transistor is in saturation .\"\n", + "I_E= (1+bita)*I_Bmin # in mA\n", + "R_E= (V_CC-V_BEact-I_Bmin*R_B)/I_E # in k\u03a9\n", + "print \"The value of R_E = %0.3f k\u03a9 \" %R_E\n", + "print \"So R_E should be greater than this value in order to bring the transistor just out of saturation \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_B = 58.64 \u00b5A \n", + "The minimum value of I_B = 32.8 \u00b5A \n", + "Since the value of I_B is greater than the value of I_Bmin\n", + "Hence the transistor is in saturation .\n", + "The value of R_E = 1.819 k\u03a9 \n", + "So R_E should be greater than this value in order to bring the transistor just out of saturation \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13.12 - Page No : 5-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC = 9 # in V\n", + "V_BE = 0.8 # in V\n", + "V_CE = 0.2 # in V\n", + "R_B = 50 # in k\u03a9\n", + "R_C=2 # in k\u03a9\n", + "R_E = 1 # in k\u03a9\n", + "bita=70 \n", + "# Applying KVL to input loop, V_CC= I_B*R_B +V_BE +I_E*R_E\n", + "# V_CC- V_BE= (R_B+R_E)*I_B + R_E*I_C (i)\n", + "# Applying KVL to output loop, V_CC= R_C*I_C +V_CE +I_C*R_E +I_B*R_E\n", + "#I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E (ii)\n", + "# From eq (i) and (ii)\n", + "I_C= ( (V_CC- V_BE)-(R_B+R_E)* (V_CC- V_CE)/R_E)/(1-(R_B+R_E)*(R_C+R_E)) # in mA\n", + "I_B = ((V_CC- V_CE)-(R_C+R_E)*I_C)/R_E# in mA\n", + "I_Bmin= I_C/bita # in mA\n", + "if I_B>I_Bmin :\n", + " print \"Since the value of I_B (\",round(I_B,3),\" mA) is greater than the value of I_Bmin (\",round(I_Bmin,4),\" mA)\"\n", + " print \"So the transistor is in saturation \"\n", + "V_C= V_CC-I_C*R_C # in V\n", + "print \"The value of collector voltage = %0.3f volts \" %V_C\n", + "bita= I_C/I_B \n", + "print \"The minimum value of bita that will change the state of the trasistor = %0.3f\" %bita" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the value of I_B ( 0.104 mA) is greater than the value of I_Bmin ( 0.0414 mA)\n", + "So the transistor is in saturation \n", + "The value of collector voltage = 3.203 volts \n", + "The minimum value of bita that will change the state of the trasistor = 27.886\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.21.1 - Page No : 5-77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "O_V = 5 # output voltage in V\n", + "V_D = 1.5 #voltage drop in V\n", + "R = (O_V - V_D)/O_V \n", + "R = R * 10**3 # in ohm\n", + "print \"The resistance value = %0.f \u03a9 \" %R\n", + "print \"As this is not standard value, use R=680 \u03a9 which is a standard value\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance value = 700 \u03a9 \n", + "As this is not standard value, use R=680 \u03a9 which is a standard value\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/1.png b/Electronic_Devices_by_K._C._Nandi/screenshots/1.png new file mode 100644 index 00000000..47f1b312 Binary files /dev/null and b/Electronic_Devices_by_K._C._Nandi/screenshots/1.png differ diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/2.png b/Electronic_Devices_by_K._C._Nandi/screenshots/2.png new file mode 100644 index 00000000..d55bb4f7 Binary files /dev/null and b/Electronic_Devices_by_K._C._Nandi/screenshots/2.png differ diff --git a/Electronic_Devices_by_K._C._Nandi/screenshots/5.png b/Electronic_Devices_by_K._C._Nandi/screenshots/5.png new file mode 100644 index 00000000..36ae44f2 Binary files /dev/null and b/Electronic_Devices_by_K._C._Nandi/screenshots/5.png differ 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 new file mode 100644 index 00000000..121ebd92 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_01.ipynb @@ -0,0 +1,61 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c3629d79b20d53403694041229a5d247c5124b08a5efee82e15fa82e9980a3f5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 1 : Units, Dimensions and Standards" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.1 : Page No- 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V_desh= 100 # in V\n", + "I_desh= 10 # in amp\n", + "R_desh= V_desh/I_desh # in \u03a9\n", + "print \"New unit of resistance = %0.f \u03a9\" %R_desh\n", + "C_desh= I_desh/V_desh # in F\n", + "print \"New unit of capacitance = %0.1f Farad\" %C_desh\n", + "L_desh= V_desh/I_desh # in L\n", + "print \"New unit of inductance = %0.f Henrys\" %L_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New unit of resistance = 10 \u03a9\n", + "New unit of capacitance = 0.1 Farad\n", + "New unit of inductance = 10 Henrys\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8b8c6f98 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_02.ipynb @@ -0,0 +1,1047 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be43ce8cfcf757315834ebcb5892c350b5dbd49ea038d4267cd2840c005e466a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 02 : Measurement Errors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.1 - Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Am= 10.25 # in ohm\n", + "A= 10.22 # in ohm\n", + "del_A= Am-A # in ohm\n", + "print \"Absolute error = %0.2f ohm\" %del_A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute error = 0.03 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.2 - Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Am= 6.7 # in A\n", + "A= 6.54 # in A\n", + "del_A= Am-A # in A\n", + "print \"Absolute error = %0.2f A\" %del_A\n", + "print \"Correction = %0.2f A\" %(-del_A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute error = 0.16 A\n", + "Correction = -0.16 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.3 - Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Am= 25.34 # in watt\n", + "del_A= -0.11 # in watt\n", + "A= Am-del_A \n", + "print \"True value = %0.2f watt\" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "True value = 25.45 watt\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.4 - Page No : 24\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Am= 205.3*10**-6 # in F\n", + "A= 201.4*10**-6 # in F\n", + "epsilon_o= Am-A \n", + "epsilon_r= epsilon_o/A*100 # in %\n", + "print \"Percentage relative error = %0.2f %%\" %epsilon_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage relative error = 1.94 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.5 - Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Given data\n", + "PerError= 5 # in %\n", + "epsilon_r= PerError/100 \n", + "Am=20 # in H\n", + "del_A= Am*epsilon_r \n", + "# A= Am+del_A and A= Am-del_A\n", + "print \"Limiting value of inductance =\",int(Am),\"\u00b1\",int(del_A),\"in Henry\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting value of inductance = 20 \u00b1 1 in Henry\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.6 - Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "V=600 # in volt\n", + "A= 400 #in volt\n", + "epsilon_r= 2.5/100 \n", + "del_V= epsilon_r*V \n", + "PerLimitError= del_V/A*100 # in %\n", + "print \"The percentage limiting error at 400 volt = \u00b1 %0.2f %%\" %PerLimitError " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage limiting error at 400 volt = \u00b1 3.75 %\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.7 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Am= 500 # in watt\n", + "epsilon_r= 1.5/100 # in neg and pos\n", + "# for positive value of epsilon_r\n", + "A1= Am*(1+epsilon_r) # in watt\n", + "# for positive value of epsilon_r\n", + "A2= Am*(1-epsilon_r) # in watt\n", + "print \"Range of reading of wattmeter is \",round(A2,1),\" watt to \",round(A1,1),\" watt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Range of reading of wattmeter is 492.5 watt to 507.5 watt\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.8 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "epsilon_r= 1.5/100 # in neg and pos\n", + "A= 10 # in amp\n", + "del_A= epsilon_r*A #in amp\n", + "# The magnitude of current being measured is 2.5 A. The relative error at this current is \n", + "A= 2.5 # in amp\n", + "epsilon_r= del_A/A \n", + "# Hence, the current under measurement is between the limits of\n", + "Am= 2.5 #in amp\n", + "# for positive value of epsilon_r\n", + "A1= Am*(1+epsilon_r) # in amp\n", + "# for positive value of epsilon_r\n", + "A2= Am*(1-epsilon_r) # in amp\n", + "print \"Limiting values of current under measurement are \",round(A2,2),\" amp to \",round(A1,2),\" amp\"\n", + "LimitingError= del_A/A*100 # in %\n", + "print \"Limiting Error = %0.f %%\" %LimitingError" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting values of current under measurement are 2.35 amp to 2.65 amp\n", + "Limiting Error = 6 %\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.9 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "epsilon_r= 1/100 \n", + "P=1000 # in watt\n", + "del_P= epsilon_r*P # in watt\n", + "# The magnitude of the power being measured is 100 watts.\n", + "PerLimitError= del_P/100*100 # in %\n", + "print \"The percentage limiting error at 1000 =\",int(PerLimitError),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage limiting error at 1000 = 10 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.10 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "# For positive value of error\n", + "R1= 100+100*2/100 #in ohm\n", + "R2= 200+200*2.5/100 # in ohm\n", + "AddR1R2_pos= R1+R2 # in ohm\n", + "# For negative value of error\n", + "R1= 100-100*2/100 #in ohm\n", + "R2= 200-200*2.5/100 # in ohm\n", + "AddR1R2_neg= R1+R2 # in ohm\n", + "print \"Values of R1+R2 =\",int(AddR1R2_neg),\"ohm to\",int(AddR1R2_pos),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Values of R1+R2 = 293 ohm to 307 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.12 - Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "AV= 110.2 # true value of voltage in volt\n", + "AI= 5.3 # true value of current in amp\n", + "v= 0.2 # uncertainties in voltage in volt\n", + "i= 0.6 # uncertainties in current in amp\n", + "PLV= v/AV*100 # percentage limiting error to voltage drop\n", + "PLC= i/AI*100 # percentage limiting error to current\n", + "P= AV*AI # in watt\n", + "print \"The power dissipated in the resistor = %0.2f watt\" %P\n", + "LE_P= (PLV+PLC) # limiting error in the power dissipation in pos and neg\n", + "print \"The limiting error in the power dissipation = \u00b1 %0.2f\" %LE_P\n", + "print \"Power dissipation =\",round(P-P*LE_P/100,2),\"W to \",round(P+P*LE_P/100,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power dissipated in the resistor = 584.06 watt\n", + "The limiting error in the power dissipation = \u00b1 11.50\n", + "Power dissipation = 516.88 W to 651.24 W\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.13 - Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "AR= 100 # true value of resistance in ohm\n", + "AI= 2 # true value of current in amp\n", + "R= 0.2 # uncertainties in resistance in ohm\n", + "I= 0.01 # uncertainties in current in amp\n", + "PLR= R/AR*100 # percentage limiting error to resistance\n", + "PLC= I/AI*100 # percentage limiting error to current\n", + "P=AI**2*AR # in watt\n", + "LE_P= 2*PLC+PLR # limiting error in the power dissipation \n", + "print \"Power dissipation =\",round(P-P*LE_P/100,1),\"W to\",round(P+P*LE_P/100,1),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipation = 395.2 W to 404.8 W\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.14 - Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "FullScaleReading= 200 # in V\n", + "N= 100 # Number of division of scale\n", + "SD= FullScaleReading/N # 1 scale division\n", + "Resolution = 1/5*SD # in v\n", + "print \"The value of resolution = %0.1f volts\" %Resolution" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resolution = 0.4 volts\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.15 - Page No : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "# u= 150+2.4 miu F and 150-2.4 miu F\n", + "# v= 120+1.5 miu F and 120-1.5 miu F\n", + "y=150+120 \n", + "del_y = 2.4+1.5 # Pos and neg\n", + "print \"Limiting error with pos and neg = \u00b1 %0.1f miu F\" %del_y\n", + "RelLimError= del_y/y*100 # in %\n", + "print \"Relative limiting error with pos and neg = %0.2f %%\" %RelLimError " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting error with pos and neg = \u00b1 3.9 miu F\n", + "Relative limiting error with pos and neg = 1.44 %\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.16 - Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R1= 1 #in kohm\n", + "R1=R1*10**3 #in ohm\n", + "del_R1ByR1= 1 \n", + "del_R2ByR2= 1 \n", + "R2= 500 #in kohm\n", + "R= R1*R2/(R1+R2) #in ohm\n", + "# Let R= X/Y\n", + "X= R1*R2 \n", + "Y=R1+R2 \n", + "ErrorX= del_R1ByR1+del_R2ByR2 # with pos and neg\n", + "# ErrorY= del_R1/Y + del_R2/Y = R1/Y*del_R1ByR1 + R2/Y*del_R2ByR2\n", + "ErrorY= R1/Y*del_R1ByR1 + R2/Y*del_R2ByR2 # with pos and neg\n", + "PerError= ErrorX+ErrorY # in % with pos and neg\n", + "print \"Percentage error (maximum posible) in equivalent parallel resistance = \u00b1 %0.f %%\" %PerError\n", + "Error= 333.33*PerError/100 \n", + "Error=round(Error) \n", + "print \"Error (maximum possible) in equivalent parallel resistance = %0.f ohm\" %Error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage error (maximum posible) in equivalent parallel resistance = \u00b1 3 %\n", + "Error (maximum possible) in equivalent parallel resistance = 10 ohm\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.17 - Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R1= 200 #in ohm\n", + "R2= 100 #in ohm\n", + "R3= 50 #in ohm\n", + "del_R1ByR1= 5 \n", + "del_R2ByR2= 5 \n", + "del_R3ByR3= 5 \n", + "# Part (i) when the resistance are connected in series\n", + "Rse= R1+R2+R3 # in ohm\n", + "print \"Equivalent resistance when connected in seried = %0.f ohm\" %Rse \n", + "LimError= R1/Rse*del_R1ByR1 + R2/Rse*del_R2ByR2 + R3/Rse*del_R3ByR3 \n", + "print \"Relative limiting error of series resistances = \u00b1 %0.f %%\" %LimError\n", + "LimError= Rse*LimError/100 #relative limiting error of series equivalent resistance in ohm\n", + "print \"Relative limiting error of series equivalent resistance = \u00b1 %0.1f ohm\" %LimError\n", + "\n", + "# Part(ii) when the resistance are connected in parallel\n", + "Rp= R1*R2*R3/(R1*R2+R2*R3+R3*R1) \n", + "print \"Equivalent resistance when connected in parallel = %0.2f ohm\" %Rp\n", + "# Let Rp= X/Y\n", + "X= R1*R2*R3 \n", + "Y=R1*R2+R2*R3+R3*R1 \n", + "y1= R1*R2 \n", + "y2= R2*R3 \n", + "y3= R3*R1 \n", + "ErrorX= del_R1ByR1 + del_R2ByR2 + del_R3ByR3 \n", + "Errory1= del_R1ByR1 + del_R2ByR2 \n", + "Errory2= del_R2ByR2 + del_R3ByR3 \n", + "Errory3= del_R3ByR3 + del_R1ByR1 \n", + "ErrorY= ( y1/Y*Errory1 + y2/Y*Errory2 + y3/Y*Errory3)\n", + "LimError= ErrorX + ErrorY \n", + "print \"Percentage error (maximum possible) in equivalent parallel resistance = \u00b1 %0.f %%\" %LimError\n", + "LimError= Rp*LimError/100 \n", + "print \"Error (maximum possible) in equivalent parallel resistance = %0.4f ohm\" %LimError" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent resistance when connected in seried = 350 ohm\n", + "Relative limiting error of series resistances = \u00b1 5 %\n", + "Relative limiting error of series equivalent resistance = \u00b1 17.5 ohm\n", + "Equivalent resistance when connected in parallel = 28.57 ohm\n", + "Percentage error (maximum possible) in equivalent parallel resistance = \u00b1 25 %\n", + "Error (maximum possible) in equivalent parallel resistance = 7.1429 ohm\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.18 - Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "epsilon_r= 1.5/100 \n", + "V=100 # in volt\n", + "I=150 # in mA\n", + "del_V= epsilon_r*V # in volt\n", + "Vm= 70 # magnitude of voltage being measured in volt\n", + "PerLimError_V= del_V/Vm*100 # in %\n", + "del_I= epsilon_r*I # in mA\n", + "Im= 80 #in mA\n", + "PerLimError_C= del_I/Im*100 # in %\n", + "P= Vm*Im/1000 # in watt\n", + "RelLImError_P= (PerLimError_V+PerLimError_C) # in %\n", + "print \"Relative limiting error in power measurement = %0.3f %%\" %RelLImError_P " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative limiting error in power measurement = 4.955 %\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.19 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "E= 200 # in V\n", + "del_E_by_E= 1 \n", + "R=1000 # in ohm\n", + "del_R_by_R= 5 \n", + "P=E**2/R # in watt\n", + "print \"Normal power consumed = %0.f watt\" %P\n", + "LimError= 2*del_E_by_E+del_R_by_R # in %\n", + "print \"Relative limiting error in measurement of power = \u00b1 %0.f %%\" %LimError\n", + "LimError= LimError*P/100 #in watt\n", + "print \"Limiting error of power = \u00b1 %0.1f watt\" %LimError" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normal power consumed = 40 watt\n", + "Relative limiting error in measurement of power = \u00b1 7 %\n", + "Limiting error of power = \u00b1 2.8 watt\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.20 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R1= 500 # in ohm\n", + "R2= 615 # in ohm\n", + "R3= 100 # in ohm\n", + "delR1ByR1= 1 \n", + "delR2ByR2= 1 \n", + "delR3ByR3= 0.5 \n", + "# Part(i)\n", + "R4=R1*R2/R3 # in ohm\n", + "print \"Unknown resistance = %0.f ohm\" %R4\n", + "delR4ByR4= delR1ByR1+delR2ByR2+delR3ByR3 \n", + "print \"Relative limiting error of unknown resistance = \u00b1 %0.1f %%\" %delR4ByR4\n", + "LimError= R4*delR4ByR4/100 \n", + "print \"Limiting error = %0.3f ohms\" %LimError " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown resistance = 3075 ohm\n", + "Relative limiting error of unknown resistance = \u00b1 2.5 %\n", + "Limiting error = 76.875 ohms\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.21 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "del_PbyP=0.5 \n", + "del_CbyC=1 \n", + "del_VbyV=1 \n", + "del_PFbyPF=del_PbyP + del_CbyC + del_VbyV \n", + "print \"Relative limiting error = \u00b1 %0.1f %%\" %del_PFbyPF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative limiting error = \u00b1 2.5 %\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.22 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C=1 # in miu F\n", + "C=C*10**-6 # in F\n", + "P=1000 # in ohm\n", + "Q=2000 # in ohm\n", + "r=200 # in ohm\n", + "S=2000 # in ohm\n", + "del_C_by_C= 1 \n", + "del_P_by_P= 0.4 \n", + "del_Q_by_Q= 1 \n", + "del_r_by_r= 0.5 \n", + "del_S_by_S= 0.5 \n", + "Lx= C*P/S*(r*(Q+S)+Q*S) # in Henry\n", + "print \"Unknown inductance = %0.1f Henry\" %Lx\n", + "# Let\n", + "u=Q+S # in ohm\n", + "Error_u= Q/u*del_Q_by_Q + S/u*del_S_by_S # in %\n", + "# Let v= r*(Q+S) = r*u\n", + "v= r*(Q+S) \n", + "Error_v= del_r_by_r + Error_u # in %\n", + "# Let \n", + "x=Q*S \n", + "Error_x= del_Q_by_Q + del_S_by_S # in %\n", + "# Let y= r*(Q+S)+Q*S = v+x\n", + "y=v+x \n", + "Error_y= v/y*Error_v + x/y*Error_x # in %\n", + "del_Lx_by_Lx= del_C_by_C + del_P_by_P + del_S_by_S + Error_y # in %\n", + "print \"Percentage error in inductance = %0.3f %%\" %del_Lx_by_Lx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown inductance = 2.4 Henry\n", + "Percentage error in inductance = 3.358 %\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.23 - Page No : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi \n", + "#Given data\n", + "R=100 # in ohm\n", + "del_R_by_R= 5 \n", + "L=2 # in Henry\n", + "del_L_by_L= 10 \n", + "omega= 2*pi*50 \n", + "# Let\n", + "u=R**2 \n", + "Error_u= 2*del_R_by_R \n", + "# Let\n", + "v= omega**2*L**2 \n", + "Error_v= 2*del_L_by_L \n", + "# Let \n", + "x= u+v \n", + "Error_x= u/x*Error_u + v/x*Error_v # in %\n", + "# Now\n", + "Z= x**(1/2) \n", + "Error_Z= 1/2*Error_x \n", + "print \"The uncertainly in the measurement of Z = %0.3f %%\" %Error_Z" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainly in the measurement of Z = 9.876 %\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.24 - Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "x1= 49.7 \n", + "x2= 50.1 \n", + "x3= 50.2 \n", + "x4= 49.6 \n", + "x5= 49.7 \n", + "n=5 \n", + "x_bar= (x1+x2+x3+x4+x5)/5 \n", + "d1= x1-x_bar \n", + "d2= x2-x_bar \n", + "d3= x3-x_bar \n", + "d4= x4-x_bar \n", + "d5= x5-x_bar \n", + "s= sqrt((d1**2+d2**2+d3**2+d4**2+d5**2)/(n-1)) \n", + "print \"The value of standard deviation = %0.2f\" %s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of standard deviation = 0.27\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.25 - Page No : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "x1= 41.7 \n", + "x2= 42 \n", + "x3= 41.8 \n", + "x4= 42 \n", + "x5= 42.1 \n", + "x6= 41.9 \n", + "x7= 42.5 \n", + "x8= 42 \n", + "x9= 41.9 \n", + "x10=41.8 \n", + "n=10 \n", + "# (i)\n", + "x_bar= (x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/10 \n", + "print \"Arithmetic mean = %0.2f\" %x_bar\n", + "d1= x1-x_bar \n", + "d2= x2-x_bar \n", + "d3= x3-x_bar \n", + "d4= x4-x_bar \n", + "d5= x5-x_bar \n", + "d6= x6-x_bar \n", + "d7= x7-x_bar \n", + "d8= x8-x_bar \n", + "d9= x9-x_bar \n", + "d10= x10-x_bar \n", + "# (ii)\n", + "sigma= sqrt((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1)) \n", + "print \"The value of standard deviation = %0.3f\" %sigma \n", + "\n", + "# (iii)\n", + "r= 0.6745*sigma \n", + "print \"Probable error of one reading = %0.3f\" %r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Arithmetic mean = 41.97\n", + "The value of standard deviation = 0.221\n", + "Probable error of one reading = 0.149\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.26 - Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "x1= 1.570 \n", + "x2= 1.597 \n", + "x3= 1.591 \n", + "x4= 1.562 \n", + "x5= 1.577 \n", + "x6= 1.580 \n", + "x7= 1.564 \n", + "x8= 1.586 \n", + "x9= 1.550 \n", + "x10=1.575 \n", + "n=10 \n", + "# (i)\n", + "x_bar= (x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/10 \n", + "print \"Arithmetic mean = %0.4f gramme\" %x_bar\n", + "d1= x1-x_bar \n", + "d2= x2-x_bar \n", + "d3= x3-x_bar \n", + "d4= x4-x_bar \n", + "d5= x5-x_bar \n", + "d6= x6-x_bar \n", + "d7= x7-x_bar \n", + "d8= x8-x_bar \n", + "d9= x9-x_bar \n", + "d10= x10-x_bar \n", + "\n", + "# (ii)\n", + "D= (abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/n # in gramme\n", + "print \"Average deviation = %0.3f gramme\" %D\n", + "\n", + "# (iii)\n", + "sigma= sqrt((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1)) # in gramme\n", + "print \"Standard deviation = %0.5f gramme\" %sigma \n", + "\n", + "# (iv)\n", + "V= sigma**2 # variance in gramme**2\n", + "print \"Variance = %0.3e gramme**2\" %V \n", + "\n", + "# (v)\n", + "r= 0.6745*sigma # in gramme\n", + "print \"Probable error = %0.4f gramme\" %r\n", + "\n", + "# (vi)\n", + "rm= r/sqrt(n-1) # in gramme\n", + "print \"Probable error of mean = %0.4f gramme\" %rm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Arithmetic mean = 1.5752 gramme\n", + "Average deviation = 0.011 gramme\n", + "Standard deviation = 0.01426 gramme\n", + "Variance = 2.033e-04 gramme**2\n", + "Probable error = 0.0096 gramme\n", + "Probable error of mean = 0.0032 gramme\n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..077b1bb4 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_03.ipynb @@ -0,0 +1,858 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4e527403e3e23cec992884b304469d3eb94c6edd5b7caf76ef7e787ddafbe409" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 3 : PMMC Instruments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.1 - Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "N= 100 \n", + "A=4*3 # in cm**2\n", + "A=A*10**-4 # in m**2\n", + "i=20 # in mA\n", + "i=i*10**-3 # in A\n", + "B=0.05 # in T\n", + "T=N*i*B*A #in Nm\n", + "print \"Torque developed by the coil = %0.1e Nm\" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque developed by the coil = 1.2e-04 Nm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.2 - Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "N= 125 \n", + "A=4*2.5 # in cm**2\n", + "A=A*10**-4 # in m**2\n", + "i=25 # in mA\n", + "i=i*10**-3 # in A\n", + "B=0.06 # in T\n", + "Td=N*i*B*A #in Nm\n", + "Tc_BY_theta= 25*10**-7 # in Nm/\u00b0\n", + "# Formula Tc=Td\n", + "theta= Td/Tc_BY_theta # in \u00b0\n", + "print \"Deflection = %0.f degree\" %theta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection = 75 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.3 - Page No :57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "N= 100 \n", + "B=6*10**-2 # in Wb/m**2\n", + "A=3*4 # in cm**2\n", + "A=A*10**-4 # in m**2\n", + "V=300 # in volt\n", + "R=12000 # in ohm\n", + "i= V/R # in amp\n", + "Td=N*i*B*A #in Nm\n", + "Tc_BY_theta= 25*10**-7 # in Nm/\u00b0\n", + "# Formula Tc=Td\n", + "theta= Td/Tc_BY_theta # in \u00b0\n", + "print \"Deflection = %0.f degree\" %theta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection = 72 degree\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.4 - Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "d= 42 # in mm\n", + "d=d*10**-3 # in meter\n", + "r= 0.6 # in meter\n", + "# Formula d= 2*theta*r\n", + "theta= d/(2*r) # radian\n", + "theta= 180*theta/pi # in \u00b0\n", + "print \"Angle through which coil turn = %0.f\u00b0\" %theta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle through which coil turn = 2\u00b0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.5 - Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "B=1.8*10**-3 # in Wb/m**2\n", + "K= 1.4*10**-7 # in Nm/radian\n", + "theta= 90 # in \u00b0\n", + "theta=theta*pi/180 \n", + "Tc= K*theta # in N-m\n", + "i=5 # in mA\n", + "i=i*10**-3 # in amp\n", + "A=1.5*1.2 # in cm**2\n", + "A=A*10**-4 # in m**2\n", + "# Formula Tc= Td= B*i*A*N \n", + "N= Tc/(B*i*A) \n", + "N=round(N) \n", + "print \"Number of turns = %0.f\" %N " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of turns = 136\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.6 - Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "B=0.1 # in T\n", + "C= 100*10**-7 # in Nm/radian\n", + "theta= 120 # in \u00b0\n", + "theta=theta*pi/180 \n", + "Tc= C*theta # in N-m\n", + "N=200 # number of turns\n", + "A=2.5*2 # in cm**2\n", + "A=A*10**-4 # in m**2\n", + "# Formula Tc= Td= B*i*A*N \n", + "i= Tc/(B*A*N) # in amp\n", + "print \"Current in the coil = %0.4f mA\" %(i*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in the coil = 2.0944 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.7 - Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "d=150 # in mm\n", + "i=2.5 # in micro amp\n", + "R=200 # in ohm\n", + "V= R*i # in micro volt\n", + "r=2.5 # in meter\n", + "# Part(i)\n", + "Si= d/i # in mm/micro amp\n", + "print \"Current sensitivity = %0.f mm/\u00b5A\" %Si\n", + "\n", + "# Part(ii)\n", + "Sv= d/V # in mm/micro volt\n", + "print \"Voltage sensitivity = %0.1f mm/\u00b5V\" %Sv\n", + "\n", + "# Part(iii)\n", + "So= 1/(1/60*10**-6) # in ohm/mm\n", + "So=So*10**-6 # in Mohm\n", + "print \"Megohm sensitivity = %0.f Mohm/mm\" %So\n", + "\n", + "# Part(iv)\n", + "i=5 # in micro amp\n", + "d=60*i # in mm\n", + "d=d*10**-3 # in meter\n", + "theta=d/(2*r) #in radian \n", + "print \"The value of deflection = %0.2f radians\" %theta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current sensitivity = 60 mm/\u00b5A\n", + "Voltage sensitivity = 0.3 mm/\u00b5V\n", + "Megohm sensitivity = 60 Mohm/mm\n", + "The value of deflection = 0.06 radians\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.8 - Page No : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Im= 50*10**-6 # in amp\n", + "Rm= 1000 # in ohm\n", + "I=1 # in amp\n", + "Rs= Rm/(I/Im-1) # in ohm\n", + "print \"Resistance of ammeter shunt required = %0.7f ohm\" %Rs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of ammeter shunt required = 0.0500025 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.9 - Page No : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from fractions import Fraction\n", + "#Given data\n", + "Rm= 1.0 # in ohm\n", + "Rse= 4999 # in ohm\n", + "V=250 # full scale deflection voltage in volt\n", + "# Formula V= Im*(Rm+Rse)\n", + "Im= V/(Rm+Rse) # in amp\n", + "\n", + "# Part(a)\n", + "Rs= 1/4999 # in ohm\n", + "Is= Im*Rm/Rs #in amp\n", + "I= Im+Is # in amp\n", + "print \"Current range = %0.f A\" %I\n", + "\n", + "# Part(b)\n", + "I=50 # in amp\n", + "N=I/Im \n", + "Rs= Rm/(N-1) # in ohm\n", + "print \"Required shunt resistance =\",Fraction(Rs).limit_denominator(1000),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current range = 250 A\n", + "Required shunt resistance = 1/999 ohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10 - Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Im= 50 # in micro amp\n", + "Im=Im*10**-6 # in amp\n", + "Rm= 49 # in ohm\n", + "Rs= 1 # in ohm\n", + "Is= Im*Rm/Rs #in amp\n", + "I= Im+Is # in amp\n", + "# (i)\n", + "I1= I # in amp\n", + "I2= I*0.5 # in amp\n", + "I3= I*0.1 # in amp\n", + "print \"Main circuit current at FSD = %0.1f mA\" %(I1*10**3)\n", + "print \"Main circuit current at 0.5 FSD = %0.2f mA\" %(I2*10**3)\n", + "print \"Main circuit current at 0.1 FSD = %0.2f mA\" %(I3*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Main circuit current at FSD = 2.5 mA\n", + "Main circuit current at 0.5 FSD = 1.25 mA\n", + "Main circuit current at 0.1 FSD = 0.25 mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.11 - Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Rm= 40 # in ohm\n", + "Im= 1 # in mA\n", + "# For switch at position 1 (lowest range of 10 mA)\n", + "I=10 # in mA\n", + "N1= I/Im \n", + "R1= Rm/(N1-1) # in ohm\n", + "# For switch at position 2 (range of 20 mA)\n", + "I=20 # in mA\n", + "N2= I/Im \n", + "R2= (R1+Rm)/N2 # in ohm\n", + "# For switch at position 3 (range of 30 mA)\n", + "I=30 # in mA\n", + "N3= I/Im \n", + "R3= (R1+Rm)/N3 # in ohm\n", + "# For switch at position 4 (range of 40 mA)\n", + "I=40 # in mA\n", + "N4= I/Im \n", + "R4= (R1+Rm)/N4 # in ohm\n", + "# For switch at position 5 (range of 50 mA)\n", + "I=50 # in mA\n", + "N5= I/Im \n", + "R5= (R1+Rm)/N5 # in ohm\n", + "r1= R1-R2 # in ohm\n", + "r2= R2-R3 # in ohm\n", + "r3= R3-R4 # in ohm\n", + "r4= R4-R5 # in ohm\n", + "r5= R5 # in ohm\n", + "print \"Resistance of the various sections of the Ayrton's shunt :\"\n", + "print \"r1 = %0.3f ohm\" %r1\n", + "print \"r2 = %0.4f ohm\" %r2\n", + "print \"r3 = %0.4f ohm\" %r3\n", + "print \"r4 = %0.3f ohm\" %r4\n", + "print \"r5 = %0.3f ohm\" %r5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of the various sections of the Ayrton's shunt :\n", + "r1 = 2.222 ohm\n", + "r2 = 0.7407 ohm\n", + "r3 = 0.3704 ohm\n", + "r4 = 0.222 ohm\n", + "r5 = 0.889 ohm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.12 - Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Rm= 1000 # in ohm\n", + "Im= 1 # in mA\n", + "Im=Im*10**-3 # in amp\n", + "r3=0.05 # in ohm\n", + "r2=0.45 # in ohm\n", + "r1=4.5 # in ohm\n", + "# For switch at contact 1\n", + "Rm1= Rm # in ohm\n", + "Rs1= r1+r2+r3 # in ohm\n", + "I1= Im*(Rm1/Rs1+1) # in A\n", + "I1=I1*10**3 # in mA\n", + "I1=round((I1/10))*10 \n", + "\n", + "print \"Ammeter range at contact 1 = %0.f mA\" %I1\n", + "# For switch at contact 2\n", + "Rm2= Rm+r1 # in ohm\n", + "Rs2= r2+r3 # in ohm\n", + "I2= Im*(Rm2/Rs2+1) # in A\n", + "I2=round(I2) \n", + "print \"Ammeter range at contact 2 = %0.f A\" %I2\n", + "\n", + "# For switch at contact 3\n", + "Rm3= Rm+r1+r2 # in ohm\n", + "Rs3= r3 # in ohm\n", + "I3= Im*(Rm3/Rs3+1) # in A\n", + "I3=round(I3) \n", + "print \"Ammeter range at contact 3 = %0.f A\" %I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ammeter range at contact 1 = 200 mA\n", + "Ammeter range at contact 2 = 2 A\n", + "Ammeter range at contact 3 = 20 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.13 - Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from fractions import Fraction \n", + "#Given data\n", + "Rm= 10 # in ohm\n", + "Im= 50 # in mA\n", + "Im=Im*10**-3 # in amp\n", + "V=750 # in volt\n", + "R= V/Im-Rm # in ohm\n", + "print \"External resistance = %0.f ohm\" %R\n", + "# Part(ii)\n", + "I=100 # in A\n", + "N=I/Im \n", + "Rs= Rm/(N-1) # in ohm\n", + "print \"Shunt resistance required =\",Fraction(Rs).limit_denominator(10000),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External resistance = 14990 ohm\n", + "Shunt resistance required = 10/1999 ohm\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.14 - Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Tc= 120*10**-6 # in N-m\n", + "B= 0.5 # in wb/m**2\n", + "N=100 \n", + "A= 4*3 # in cm**2\n", + "A=A*10**-4# in m**2\n", + "Rm=0 \n", + "V= 100*1 \n", + "# Formula Tc= Td = B*I*N*A\n", + "I= Tc/(B*N*A) # in amp\n", + "R= V/I-Rm # in ohm\n", + "print \"External required resistance = %0.f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External required resistance = 50000 ohm\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.15 - Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Im= 0.2*10**-3 # in amp\n", + "Rm= 10 # in ohm\n", + "V=100 # in volt\n", + "R= V/Im-Rm # in ohm\n", + "print \"External required resistance = %0.2f kohm\" %(R*10**-3)\n", + "Im1= 0.75*Im #in amp\n", + "V1= Im1*(R+Rm) # in volt\n", + "print \"Applied voltage at instrument current 0.75 FSD = %0.f volts\" %V1 \n", + "\n", + "Im2= 0.5*Im #in amp\n", + "V2= Im2*(R+Rm) # in volt\n", + "print \"Applied voltage at instrument current 0.5 FSD = %0.f volts\" %V2 \n", + "\n", + "Im3= 0.25*Im #in amp\n", + "V3= Im3*(R+Rm) # in volt\n", + "print \"Applied voltage at instrument current 0.25 FSD = %0.f volts\" %V3 \n", + "\n", + "Im4= 0.1*Im #in amp\n", + "V4= Im4*(R+Rm) # in volt\n", + "print \"Applied voltage at instrument current 0.1 FSD = %0.f volts\" %V4 \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External required resistance = 499.99 kohm\n", + "Applied voltage at instrument current 0.75 FSD = 75 volts\n", + "Applied voltage at instrument current 0.5 FSD = 50 volts\n", + "Applied voltage at instrument current 0.25 FSD = 25 volts\n", + "Applied voltage at instrument current 0.1 FSD = 10 volts\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.16 - Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "CS= 0.1*10**-3 # current sensitivity in amp\n", + "VS= 1/CS # voltage sensitivity in ohm/volt\n", + "VS= VS*10**-3 # in kohm/volt\n", + "Rm=500 # in ohm\n", + "Rm=Rm*10**-3 # in kohm\n", + "\n", + "# (i) 0-10 V range\n", + "V=10 # full scale delection voltage in volt\n", + "R_T= VS*V # in kohm\n", + "R1= R_T-Rm # in kohm\n", + "print \"Additional required resistance at 0-10 V range = %0.1f kohm\" %R1\n", + "\n", + "# (ii) 0-50 V range\n", + "V=50 # full scale delection voltage in volt\n", + "R_T= VS*V # in kohm\n", + "R2= R_T-R1-Rm # in kohm\n", + "print \"Additional required resistance at 0-50 V range = %0.f kohm\" %R2\n", + "\n", + "# (i) 0-100 V range\n", + "V=100 # full scale delection voltage in volt\n", + "R_T= VS*V # in kohm\n", + "R3= R_T-R1-R2-Rm # in kohm\n", + "print \"Additional required resistance at 0-100 V range = %0.f kohm\" %R3\n", + "\n", + "# (i) 0-500 V range\n", + "V=500 # full scale delection voltage in volt\n", + "R_T= VS*V # in kohm\n", + "R4= R_T-R1-R2-R3-Rm # in kohm\n", + "print \"Additional required resistance at 0-500 V range = %0.f kohm\" %R4\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Additional required resistance at 0-10 V range = 99.5 kohm\n", + "Additional required resistance at 0-50 V range = 400 kohm\n", + "Additional required resistance at 0-100 V range = 500 kohm\n", + "Additional required resistance at 0-500 V range = 4000 kohm\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.17 - Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "E= 1.5 # in V\n", + "R1addRm= 10 # addition of R1 and Rm in kohm\n", + "Rx= 0 \n", + "R=R1addRm+Rx # in kohm\n", + "R=R*10**3 # in ohm\n", + "I= E/R #meter FSD current in amp\n", + "\n", + "# At 0.8 FSD\n", + "Im= 0.8*I # in amp\n", + "R= E/Im # in ohm\n", + "R=R*10**-3 # in kohm\n", + "Rx= R-R1addRm #in kohm\n", + "print \"Unknown resistance at 0.8 FSD = %0.1f k\u03a9\" %Rx\n", + "\n", + "# At 0.5 FSD\n", + "Im= 0.5*I # in amp\n", + "R= E/Im # in ohm\n", + "R=R*10**-3 # in kohm\n", + "Rx= R-R1addRm #in kohm\n", + "print \"Unknown resistance at 0.5 FSD = %0.f k\u03a9\" %Rx\n", + "\n", + "# At 0.25 FSD\n", + "Im= 0.25*I # in amp\n", + "R= E/Im # in ohm\n", + "R=R*10**-3 # in kohm\n", + "Rx= R-R1addRm #in kohm\n", + "print \"Unknown resistance at 0.25 FSD = %0.f k\u03a9\" %Rx\n", + "\n", + "# At 0.1 FSD\n", + "Im= 0.1*I # in amp\n", + "R= E/Im # in ohm\n", + "R=R*10**-3 # in kohm\n", + "Rx= R-R1addRm #in kohm\n", + "print \"Unknown resistance at 0.1 FSD = %0.f k\u03a9\" %Rx\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown resistance at 0.8 FSD = 2.5 k\u03a9\n", + "Unknown resistance at 0.5 FSD = 10 k\u03a9\n", + "Unknown resistance at 0.25 FSD = 30 k\u03a9\n", + "Unknown resistance at 0.1 FSD = 90 k\u03a9\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.18 - Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Rm= 50 # in ohm\n", + "R1= 10 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2= 50 # in ohm\n", + "Im_FSD= 100*10**-6 #meter FSD current in amp\n", + "\n", + "# At 0.5 FSD , with 1.5 V\n", + "E=1.5 # in volt\n", + "Im= 0.5*Im_FSD # in amp\n", + "Vm= Im*Rm # in volt\n", + "I0= Vm/R2 #in amp\n", + "I=I0+Im # in amp\n", + "Rx= E/I-R1 # in ohm\n", + "Rx=Rx*10**-3 #in kohm\n", + "print \"Unknown resistance at 0.5 FSD with 1.5 V = %0.f kohm\" %Rx\n", + "# With E= 1.25 V and Rx=0\n", + "E=1.25 # in volt\n", + "Rx=0 \n", + "I=E/(R1+Rx) # in amp\n", + "I0=I-Im_FSD # in amp\n", + "Vm= Im_FSD*Rm # in volt\n", + "R2= Vm/I0 # in ohm\n", + "print \"Zero adjuster resistance = %0.f ohm\" %R2\n", + "\n", + "# At 0.5 FSD , with 1.25 V\n", + "E=1.25 # in volt\n", + "Im= 0.5*Im_FSD # in amp\n", + "Vm= Im*Rm # in volt\n", + "I0= Vm/R2 #in amp\n", + "I=I0+Im # in amp\n", + "Rx= E/I-R1 # in ohm\n", + "Rx=Rx*10**-3 #in kohm\n", + "print \"Unknown resistance at 0.5 FSD with 1.25 V = %0.f kohm\" %Rx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown resistance at 0.5 FSD with 1.5 V = 5 kohm\n", + "Zero adjuster resistance = 200 ohm\n", + "Unknown resistance at 0.5 FSD with 1.25 V = 10 kohm\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..40d5c095 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_04.ipynb @@ -0,0 +1,256 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ba40baa44e757ea3e91ab8f89704f149291740011280e5a0d9caa508edb83db1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 4 : Analog Electronic Meters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 - Page No : 86\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_CC= 12 # in volt\n", + "V_BE=0.7 #in volt\n", + "Rsm=4.3 #value o Rs+Rm in kohm\n", + "I=1 #in mA\n", + "\n", + "# Part (i)\n", + "V= 5 #in volt\n", + "V_E= V-V_BE # in volt\n", + "Im= V_E/Rsm # in mA\n", + "I_E=Im # in mA\n", + "print \"Meter Current = %0.f mA\" %Im\n", + "\n", + "# Part(ii)\n", + "h_FE= 100 \n", + "Im=Im*10**-3 #in amp\n", + "I_B= Im/h_FE # in amp\n", + "Rin= V/I_B # in ohm\n", + "print \"Input resistance with transistor = %0.f kohm\" %(Rin*10**-3)\n", + "# without transistor\n", + "Rin= Rsm \n", + "print \"Input resistance without transistor = %0.1f kohm\" %Rin\n", + "\n", + "# Part(iii)\n", + "V=2.5 # in volt\n", + "V_E= V-V_BE # in volt\n", + "Im= V_E/Rsm # in mA\n", + "I_E=Im # in mA\n", + "print \"Meter current when the dc input voltage is 2.5 volt = %0.2f mA\" %Im" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Meter Current = 1 mA\n", + "Input resistance with transistor = 500 kohm\n", + "Input resistance without transistor = 4.3 kohm\n", + "Meter current when the dc input voltage is 2.5 volt = 0.42 mA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 - Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "V_CC= 12 # in volt\n", + "V_BE=0.7 #in volt\n", + "R_E1=3.3 # in kohm\n", + "V_EE= -12 # in volt\n", + "# Part (a) when V=0\n", + "V= 0 #in volt\n", + "V_E1= V-V_BE-V_EE # in volt\n", + "I_E1= V_E1/R_E1 # in mA\n", + "print \"Emitter current when input voltage is zero volt = %0.1f mA\" %I_E1\n", + "\n", + "# Part(b)\n", + "# Part (i) when V=2 volt\n", + "V= 2 #in volt\n", + "V_P=0 \n", + "V_E1= V-V_BE # in volt\n", + "V_E2= V_P-V_BE # in volt\n", + "Vm= V_E1-V_E2 # in volt\n", + "print \"Meter circuit voltage when input voltage is 2 volt = %0.f V\" %Vm\n", + "\n", + "# Part (ii) when V=1 volt\n", + "V= 1 #in volt\n", + "V_P=0 \n", + "V_E1= V-V_BE # in volt\n", + "V_E2= V_P-V_BE # in volt\n", + "Vm= V_E1-V_E2 # in volt\n", + "print \"Meter circuit voltage when input voltage is 1 volt = %0.f V\" %Vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Emitter current when input voltage is zero volt = 3.4 mA\n", + "Meter circuit voltage when input voltage is 2 volt = 2 V\n", + "Meter circuit voltage when input voltage is 1 volt = 1 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 - Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Im= 200 # in micro A\n", + "Im=Im*10**-6 # in amp\n", + "Rm= 5 # in kohm\n", + "Rm=Rm*10**3 # in ohm\n", + "I_B= 0.5 # in micro amp\n", + "I_B=I_B*10**-6 # in amp\n", + "V=25 # in mV\n", + "V=V*10**-3 # in volt\n", + "Vout= Im*Rm # in volt\n", + "I= 500*I_B # in amp\n", + "R1= V/I # in ohm\n", + "print \"The value of resistor = %0.f ohm\" %R1\n", + "Rf= (Vout-V)/I # in ohm\n", + "print \"Feedback resistor = %0.1f kohm\" %(Rf*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistor = 100 ohm\n", + "Feedback resistor = 3.9 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 - Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Im= 1 # in mA\n", + "Im=Im*10**-3 # in amp\n", + "Rm= 100 # in ohm\n", + "V=1.2 # in volt\n", + "R1= V/Im # in ohm\n", + "print \"The value of resistance = %0.1f kohm\" %(R1*10**-3)\n", + "Vout= Im*(Rm+R1) # in volt\n", + "print \"Output voltage = %0.1f V\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistance = 1.2 kohm\n", + "Output voltage = 1.3 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 - Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "#Given data\n", + "Vrms=120 # in mV\n", + "Iav= 1.25 # in mA\n", + "I_max= 1/0.318*Iav # in mA\n", + "Vmax= sqrt(2)*Vrms # in mV\n", + "R2= Vmax/I_max # in ohm\n", + "print \"Value of R2 = %0.1f ohm\" %R2\n", + "# when input voltage is 60 volt\n", + "Vrms=60 # in mV\n", + "Vmax= sqrt(2)*Vrms # in mV\n", + "I_max= Vmax/R2 # in mA\n", + "Iav= I_max*0.318 # in mA\n", + "print \"Average value of meter current = %0.3f mA\" %Iav" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R2 = 43.2 ohm\n", + "Average value of meter current = 0.625 mA\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3c3e2342 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_05.ipynb @@ -0,0 +1,638 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3339b00236a2f81e5e5e7b7f9b1a7ab1f4ae4cfea924466604e158fa53da71b7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 5 : Digital Meters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.1 - Page No : 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "V_REF= 10 # in volt\n", + "w2= V_REF/2 # The second MSB weight in volt\n", + "print \"The second MSB weight = %0.f V\" %w2\n", + "w3= V_REF/4 # The third MSB weight in volt\n", + "print \"The third MSB weight = %0.1f V\" %w3\n", + "w4= V_REF/8 # The forth MSB weight in volt\n", + "print \"The forth MSB weight = %0.2f V\" %w4\n", + "\n", + "# (i)\n", + "r_DAC= w4 # resolution of the DAC in volt\n", + "print \"(i) : Resolutio of the DAC = %0.2f V\" %r_DAC \n", + "\n", + "#(ii)\n", + "FSO= V_REF+w2+w3+w4 #full scale output in volt\n", + "print \"(ii) : Full scale output = %0.2f V\" %FSO\n", + "\n", + "# (iii)\n", + "FSO_R= FSO/4 # full scale output when the feedback resistor is made one fourth of R in volt\n", + "print \"(iii) : The full scale output when the feedback resistor is made one fourth of R i volt = %0.4f\" %FSO_R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The second MSB weight = 5 V\n", + "The third MSB weight = 2.5 V\n", + "The forth MSB weight = 1.25 V\n", + "(i) : Resolutio of the DAC = 1.25 V\n", + "(ii) : Full scale output = 18.75 V\n", + "(iii) : The full scale output when the feedback resistor is made one fourth of R i volt = 4.6875\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.2 - Page No : 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "V_REF= -5 # in volt\n", + "V_A= -5 # in volt\n", + "V_C=V_A # in volt\n", + "V_D=V_C # in volt\n", + "V_B= 0 \n", + "Vout= -1*(V_A+V_B/2+V_C/4+V_D/8) \n", + "print \"Output voltage = %0.3f V\" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 6.875 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.3\n", + " - Page No :" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "D=16 \n", + "D1= D/2 # first MSB output in volt\n", + "print \"First MSB output = %0.f V\" %D1 \n", + "D2= D/4 # second MSB output in volt\n", + "print \"Second MSB output = %0.f V\" %D2 \n", + "D3= D/8 # third MSB output in volt\n", + "print \"Third MSB output = %0.f V\" %D3\n", + "D4= D/16 # fourth MSB output in volt\n", + "print \"Fourth MSB output = %0.f V\" %D4 \n", + "D5= D/32 # fifth MSB output in volt\n", + "print \"Fifth MSB output = %0.1f V\" %D5\n", + "D6= D/64 # sixth MSB (LSB) output in volt\n", + "print \"Sixth MSB (LSB) output = %0.2f V\" %D6 \n", + "print \"The resolution is equal to the weight of the LSB = %0.2f V\" %D6\n", + "# Full scale output occurs for a digital input of 111111\n", + "FSO= D1+D2+D3+D4+D5+D6 # in volt\n", + "print \"Full scale output occurs for a digital input of 111111 = %0.2f V\" %FSO\n", + "# The output voltage for a digital input of 101011\n", + "D0=16 \n", + "D1=16 \n", + "D2=0 \n", + "D3=16 \n", + "D4=0 \n", + "D5=16 \n", + "Vout= ( D0*2**0 + D1*2**1 + D2*2**2 + D3*2**3 + D4*2**4 + D5*2**5 )/64 # in volt\n", + "print \"The output voltage for digital input of 101011 = %0.2f V\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First MSB output = 8 V\n", + "Second MSB output = 4 V\n", + "Third MSB output = 2 V\n", + "Fourth MSB output = 1 V\n", + "Fifth MSB output = 0.5 V\n", + "Sixth MSB (LSB) output = 0.25 V\n", + "The resolution is equal to the weight of the LSB = 0.25 V\n", + "Full scale output occurs for a digital input of 111111 = 15.75 V\n", + "The output voltage for digital input of 101011 = 10.75 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.4 - Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R=100 # in kohm\n", + "R=R*10**3 #in ohm\n", + "C=1*10**-6 # in F\n", + "V_REF= 5 # in volt\n", + "t=0.2 # time taken to read unknown voltage in sec\n", + "T=R*C # in sec\n", + "Vx= T/t*V_REF # in volt\n", + "print \"The value of Unknown voltage = %0.1f V\" %Vx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Unknown voltage = 2.5 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.5 - Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "# For an 8-bit converter reference voltage V_REF be taken as 100 V\n", + "V_REF= 100 # in volt\n", + "f=75*10**6 # in Hz\n", + "# For setting\n", + "D7=1 \n", + "Vout1= V_REF*2**7/2**8 # in volt\n", + "print \"For D7 = 1, The output voltage = %0.f volt\" %Vout1\n", + "# since 180-100 = 80 > 50 set D7=1\n", + "\n", + "# For setting\n", + "D6=1 \n", + "Vout2= V_REF*2**6/2**8 # in volt\n", + "print \"For D6 = 1, The output voltage = %0.f volt\" %Vout2\n", + "# Hence for setting D7=1 and D6=1 output voltage\n", + "Vout3= Vout1+Vout2 # in volt\n", + "print \"D7 and D6 = 1, The output voltage = %0.f volt\" %Vout3\n", + "# since 80>75 set D6=1\n", + "# For setting D5=1, D6=1 and D7=1\n", + "Vout4 = V_REF*2**5/2**8 + Vout1+ Vout2 # in volt\n", + "print \"For D6 = 1, The output voltage = %0.1f volt\" %Vout4\n", + "print \"All other digits will be set to zero or 1. Output will be accordingly indicated as a result of successive approximation.\"\n", + "print \"The Converted 8-bit digital form will be 1110010\"\n", + "T=1/f #in sec\n", + "print \"Conversion time = %0.1f ns\" %(T*10**9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For D7 = 1, The output voltage = 50 volt\n", + "For D6 = 1, The output voltage = 25 volt\n", + "D7 and D6 = 1, The output voltage = 75 volt\n", + "For D6 = 1, The output voltage = 87.5 volt\n", + "All other digits will be set to zero or 1. Output will be accordingly indicated as a result of successive approximation.\n", + "The Converted 8-bit digital form will be 1110010\n", + "Conversion time = 13.3 ns\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.6 - Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "N=8 # Number of bits\n", + "f=1*10**6 # in Hz\n", + "T=1/f \n", + "Tc= N*T # in second\n", + "print \"Time of conversion = %0.f \u00b5s\" %(Tc*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time of conversion = 8 \u00b5s\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.7 - Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Vin= 2 # in volt\n", + "Vout= 10 # in volt\n", + "R=100 # kohm\n", + "R=R*10**3 # in ohm\n", + "C= 0.1 # in miu F\n", + "C=C*10**-6 # in F\n", + "# Vout= -1/(R*C)*integrate('Vin','t',0,t) = -Vin*t/(R*C)\n", + "t= Vout*R*C/Vin # in sec\n", + "print \"The maximum time upto which the reference voltage can be integrated = %0.f ms\" %(t*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum time upto which the reference voltage can be integrated = 50 ms\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.8 - Page No : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "n=3 \n", + "R=1/10**n \n", + "fs1=1 # full scale range of 1 v\n", + "r1= fs1*R # resolution for full scale range of 1 V\n", + "print \"Resolution for full scale range of 1 V = %0.3f V\" %r1\n", + "fs2=10 # full scale range of 10 v\n", + "r2= fs2*R # resolution for full scale range of 10 V\n", + "print \"Resolution for full scale range of 10 V = %0.2f V\" %r2\n", + "# The display for 2 V reading on 10 V scale of 3*1/2 digital meter would be 02.00 i.e\n", + "reading=2 \n", + "LSD= 5*R # in volt\n", + "Total_pos_Error= reading*0.5/100+LSD #in volt\n", + "print \"Total possible error = %0.3f V\" %Total_pos_Error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution for full scale range of 1 V = 0.001 V\n", + "Resolution for full scale range of 10 V = 0.01 V\n", + "Total possible error = 0.015 V\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.9 - Page No : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R= 1/10**4 # resolution\n", + "print \"Resolution of voltmeter = %0.4f\" %R\n", + "reading1= 16.58 \n", + "reading2= 0.7254 \n", + "print \"There are 5 digit places in 4\u00bd display, so \",round(reading1,2),\" would be displayed as 16.580 V on a 10V range \"\n", + "print \"Any reading up to 4th decimal can be displayed.\"\n", + "print \"Hence \",round(reading2,4),\" will be displayed as : \",reading2\n", + "R= 10*R # resolution on 10 V range\n", + "print \"Resolution of 10 V range =\",round(R,3),\" So\"\n", + "print \"0.7254 will be displayed as : \",round(reading2,3),\"instead of\",reading2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution of voltmeter = 0.0001\n", + "There are 5 digit places in 4\u00bd display, so 16.58 would be displayed as 16.580 V on a 10V range \n", + "Any reading up to 4th decimal can be displayed.\n", + "Hence 0.7254 will be displayed as : 0.7254\n", + "Resolution of 10 V range = 0.001 So\n", + "0.7254 will be displayed as : 0.725 instead of 0.7254\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10 - Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Given data\n", + "n=3 \n", + "R=1/10**n \n", + "fs1=10 # full scale range of 10 v\n", + "r1= fs1*R # resolution for full scale range of 10 V\n", + "print \"Resolution for full scale range of 10 V = \",r1\n", + "fs2=100 # full scale range of 100 v\n", + "r2= fs2*R # resolution for full scale range of 100 V\n", + "print \"Resolution for full scale range of 100 V = \",r2\n", + "print \"The display of 14.53 V reading on 10 V scale would be 14.530\"\n", + "print \"The display of 14.53 V reading on 100 V scale would be 0145.3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution for full scale range of 10 V = 0.01\n", + "Resolution for full scale range of 100 V = 0.1\n", + "The display of 14.53 V reading on 10 V scale would be 14.530\n", + "The display of 14.53 V reading on 100 V scale would be 0145.3\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.11 - Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "Vmax= 255 # in volt\n", + "Vx= 180 # in volt\n", + "f=10 # in kHz\n", + "f=f*10**3 # in Hz\n", + "t= (Vmax-Vx)/(2*pi*f*Vmax) # time taken to read the unknown voltage in second\n", + "t=t*10**6 # in micro second\n", + "print \"Time taken to read the unknown voltage = %0.2f \u00b5s\" %t " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to read the unknown voltage = 4.68 \u00b5s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.12 - Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=2.5 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Part (i) when\n", + "t=0.1 # in sec\n", + "count= f*t \n", + "print \"When GATE ENABLE time is 0.1 sec then the counter count or display = %0.f\" %count\n", + "# Part (ii) when\n", + "t=1 # in sec\n", + "count= f*t \n", + "print \"When GATE ENABLE time is 1 sec then the counter count or display = %0.f\" %count\n", + "# Part (iii) when\n", + "t=10 # in sec\n", + "count= f*t \n", + "print \"When GATE ENABLE time is 10 sec then the counter count = %0.f\" %count" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When GATE ENABLE time is 0.1 sec then the counter count or display = 250\n", + "When GATE ENABLE time is 1 sec then the counter count or display = 2500\n", + "When GATE ENABLE time is 10 sec then the counter count = 25000\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.13 - Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "N=45 # unit less\n", + "t=10 # in ms\n", + "t=t*10**-3 # in sec\n", + "f=N/t # Hz\n", + "f=f*10**-3 # in kHz\n", + "print \"The value of frequency = %0.1f kHz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of frequency = 4.5 kHz\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.14 - Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "totalPulse= 174 # unit less\n", + "t=100 #time period of total pulses in miu s\n", + "t=t*10**-6 # in sec\n", + "t1= t/totalPulse # time period of one pulse in sec\n", + "f= 1/t1 # frequency in Hz\n", + "f=f*10**-6 # in MHz\n", + "print \"The value of frequency = %0.2f MHz\" %f \n", + "resolution= totalPulse/t # in sec\n", + "resolution=resolution*10**-6 # per micro sec\n", + "print \"Resolution of measurement = %0.2f per \u00b5s\" %resolution" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of frequency = 1.74 MHz\n", + "Resolution of measurement = 1.74 per \u00b5s\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.15 - Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "t=1/(2*10**6) # time of one cycle o 2MHz clock in sec\n", + "N=500 # number of cycle\n", + "t1= N*t # time of 1 cycle by the electronic counter in sec\n", + "f= 1/t1 # in Hz\n", + "f=f*10**-3 # in kHz\n", + "print \"The value of frequency of input signal = %0.f kHz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of frequency of input signal = 4 kHz\n" + ] + } + ], + "prompt_number": 52 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b4318d00 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_06.ipynb @@ -0,0 +1,607 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7af95e71b6cf98d68e11993a774d3756f4ae51c9cf67e86b78531811773b4bb7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 6 : Resistance Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.1 - Page No : 156\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V= 100 # in volt\n", + "I=5 # in mA\n", + "I=I*10**-3 # in amp\n", + "VS= 1000 # sensitivity of voltmeter in ohm\n", + "VR= 150 # voltmeter range in volt\n", + "Rv= VS*VR # in ohm\n", + "# Part (i)\n", + "Rm= V/I # in ohm\n", + "Rm= Rm*10**-3 # in kohm\n", + "print \"Apparent value of unknown resistor = %0.f kohm\" %Rm \n", + "\n", + "# Part (ii)\n", + "Rx= V/(I*(1-V/(I*Rv))) # in ohm\n", + "Rx= Rx*10**-3 #/ in kohm\n", + "print \"Actual value of unknown resistor = %0.3f kohm\" %Rx\n", + "\n", + "# Part (iii)\n", + "epsilon_r= (Rm-Rx)/Rx*100 # in %\n", + "print \"Error percentage due to loading effect of voltmeter = %0.2f %%\" %epsilon_r " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Apparent value of unknown resistor = 20 kohm\n", + "Actual value of unknown resistor = 23.077 kohm\n", + "Error percentage due to loading effect of voltmeter = -13.33 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.2 - Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt\n", + "#Given data\n", + "V=38.4 # in volt\n", + "I=0.4 # in amp\n", + "ammeterRange= 1 # in amp\n", + "voltmeterRange= 50 # in volt\n", + "inst_acc= 1/2 # instrument accurcy in %\n", + "R= 100 # resistance in ohm\n", + "\n", + "R_A= 2.5 # in ohm\n", + "R_V= 6000 # in ohm\n", + "Rx= sqrt(R_A*R_V) # in ohm\n", + "print \"Value of unknown resistance = %0.1f ohm\" %Rx\n", + "print \"Since the unknown resistance is of value smaller than \",round(Rx,1),\" ohm, the voltmeter should be connected\"\n", + "print \"directly across the unknown resistance as it will give more accurate result\"\n", + "Rm= V/I # in ohm\n", + "Rx= V/(I*(1-V/(I*R_V))) # in ohm\n", + "ErrorAmmeter= inst_acc*ammeterRange/R # Error in ammeter reading in amp\n", + "ErrorVoltmeter= inst_acc*voltmeterRange/R # Error in voltmeter reading in volt\n", + "# Percentage error at 0.4 A reading \n", + "E1= ErrorAmmeter/0.4*100 #in %\n", + "# Percentage error at 38.4 V reading \n", + "E2= ErrorVoltmeter/38.4*100 #in %\n", + "#Error due to ammeter and voltmeter\n", + "E= sqrt(E1**2+E2**2) \n", + "#Absolute error due to ammeter and voltmeter\n", + "Error_ammeter_voltmeter= E/R*Rx # in pos and neg\n", + "print \"\\nAbsolute error due to ammeter and voltmeter = %0.3f ohm\" %Error_ammeter_voltmeter\n", + "print \"So the resistance is specified as (\",round(Rx,2),\"\u00b1\",round(Error_ammeter_voltmeter,3),\") ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of unknown resistance = 122.5 ohm\n", + "Since the unknown resistance is of value smaller than 122.5 ohm, the voltmeter should be connected\n", + "directly across the unknown resistance as it will give more accurate result\n", + "\n", + "Absolute error due to ammeter and voltmeter = 1.375 ohm\n", + "So the resistance is specified as ( 97.56 \u00b1 1.375 ) ohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.3 - Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "V=120 # in volt\n", + "I=8 # in amp\n", + "R_A= 0.3 # in ohm\n", + "ammeterReading= 0.01 # in A\n", + "voltmeterReading= 0.1 # in V\n", + "AmmeterRange= 10 #in A\n", + "VoltmeterRange= 150 #in V\n", + "EA= 0.25 # constructional error of the ammeter in %\n", + "EV= 0.5 # constructional error of the voltmeter in %\n", + "\n", + "Rm= V/I # in ohm\n", + "Rx= Rm-R_A # in ohm\n", + "ErrorAmmeter= ammeterReading/AmmeterRange*100 # in %\n", + "ErrorVoltmeter= voltmeterReading/VoltmeterRange*100 # in %\n", + "del_I= ErrorAmmeter+EA # in %\n", + "del_V= ErrorVoltmeter+EV # in %\n", + "# since R=V/I\n", + "TotalError= del_I+del_V # in % in neg and pos\n", + "print \"Total systematic error in measurement = \u00b1 %0.3f %%\" %TotalError\n", + "print \"So the value of Rx is specified as : (\",round(Rx,1),\"\u00b1\",round(Rx*TotalError/100,3),\") ohm\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total systematic error in measurement = \u00b1 0.917 %\n", + "So the value of Rx is specified as : ( 14.7 \u00b1 0.135 ) ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.4 - Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=100 # in ohm\n", + "Q=10 # in ohm\n", + "S=46 # in ohm\n", + "R= P*S/Q #in ohm\n", + "print \"The value of unknown resistance = %0.f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of unknown resistance = 460 ohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.5 - Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "S=6 # in ohm\n", + "AB= 25 # in cm\n", + "BC= 75 # in cm\n", + "R= S*AB/BC # in ohm\n", + "print \"The value of unknown resistance = %0.f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of unknown resistance = 2 ohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.6 - Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "resistor= 5000 # in ohm\n", + "LVR1= resistor-resistor*0.1/100 # Limiting value of 5000 ohm resistor in negative error\n", + "LVR2= resistor+resistor*0.1/100 #Limiting value of 5000 ohm resistor in positve error\n", + "print \"Limiting value of 5000 ohm resistance =\",int(LVR1),\"to\",int(LVR2),\"ohm\"\n", + "print \"Thus dials of 1000 , 100 , 10 and 1 ohm would to be adjusted\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting value of 5000 ohm resistance = 4995 to 5005 ohm\n", + "Thus dials of 1000 , 100 , 10 and 1 ohm would to be adjusted\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.7 - Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=100 # in ohm\n", + "Q=100 # in ohm\n", + "S=230 # in ohm\n", + "R=P*S/Q # in ohm\n", + "del_P_BY_P= 0.02 # in %\n", + "del_Q_BY_Q= 0.02 # in %\n", + "del_S_BY_S= 0.01 # in %\n", + "del_R_BY_R= del_P_BY_P + del_Q_BY_Q + del_S_BY_S # in %\n", + "print \"Relative limiting error of unknown resistance = %0.2f %%\" %del_R_BY_R\n", + "print \"So limiting values of unknown resistance =\",round(R-R*del_R_BY_R/100,3),\"to\",round(R+R*del_R_BY_R/100,3),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative limiting error of unknown resistance = 0.05 %\n", + "So limiting values of unknown resistance = 229.885 to 230.115 ohm\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.8 - Page No : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=1000 # in ohm\n", + "Q=1000 # in ohm\n", + "S=100 # in ohm\n", + "E=2 # in volt\n", + "Rg=50 # in ohm\n", + "R_desh= 101 # in ohm\n", + "R=Q*S/P # in ohm\n", + "del_R= R_desh-R # in ohm\n", + "E_Th= E*((R+del_R)/(R+del_R+S)- P/(P+Q)) # in volt\n", + "R_Th= ((R+del_R)*S/(R+del_R+S)+ P*Q/(P+Q)) #in ohm\n", + "Ig= E_Th/(R_Th+Rg) # in amp\n", + "Ig=Ig*10**+6 # in micro amp\n", + "print \"The galvanometer current = %0.3f \u00b5A\" %Ig" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The galvanometer current = 8.288 \u00b5A\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.9 - Page No : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=100 # in ohm\n", + "Q=1000 # in ohm\n", + "S=2000 # in ohm\n", + "E=5 # in volt\n", + "Si= 5 # in mm/miuA\n", + "Rg=200 # in ohm\n", + "R_desh= 202 # in ohm\n", + "R=P*S/Q # in ohm\n", + "del_R= R_desh-R # in ohm\n", + "E_Th= E*((R+del_R)/(R+del_R+S)- P/(P+Q)) # in volt\n", + "R_Th= ((R+del_R)*S/(R+del_R+S)+ P*Q/(P+Q)) #in ohm\n", + "Ig= E_Th/(R_Th+Rg) # in amp\n", + "Ig=Ig*10**+6 # in micro amp\n", + "theta= Si*Ig # in mm\n", + "print \"Deflection of the galvanometer = %0.1f mm\" %theta\n", + "S_B= theta/del_R # in mm/ohm\n", + "print \"Sensitivity of the bridge = %0.2f mm/ohm\" %S_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection of the galvanometer = 43.5 mm\n", + "Sensitivity of the bridge = 21.76 mm/ohm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.10 - Page No : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=1000 # in ohm\n", + "Q=100 # in ohm\n", + "R=200 # in ohm\n", + "E=5 # in volt\n", + "Si1= 10 # in mm/miuA\n", + "Si2= 5 # in mm/miuA\n", + "Rg1= 400 # in ohm\n", + "Rg2= 100 # in ohm\n", + "S=R*Q/P # in ohm\n", + "R_Th= R*S/(R+S)+ P*Q/(P+Q) # in ohm\n", + "# theta=Si1*E*S*del_R/((R+S)**2*(R_Th+Rg))\n", + "# RatioTheta21= theta2/theta1 \n", + "RatioTheta21= Si2/Si1*(R_Th+Rg1)/(R_Th+Rg2) \n", + "print \"Ratio of deflection on two galvanometers = %0.3f\" %RatioTheta21" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of deflection on two galvanometers = 1.217\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.11 - Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=500 # in ohm\n", + "S=P \n", + "Q=S \n", + "R=P \n", + "R_Th=R # in ohm\n", + "Rg=100 # in ohm\n", + "E=10 # in volt\n", + "Ig= 1 # in nA\n", + "Ig=Ig*10**-9 #in amp\n", + "# Formula Ig= E_Th/(R_Th+Rg) and E_Th= E*del_R/(4*R) so\n", + "# Ig= (E*del_R/(4*R))/(R_Th+Rg) and\n", + "del_R= Ig*(R_Th+Rg)*4*R/E # in ohm\n", + "del_R= del_R*10**3 #in mohm\n", + "print \"The smallest change in resistance = %0.2f m ohm\" %del_R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest change in resistance = 0.12 m ohm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.12 - Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R=200 # in ohm\n", + "S=R \n", + "P=S \n", + "Q=P \n", + "r=2 # in ohm\n", + "E=24 # in volt\n", + "Power= 0.5 # in W\n", + "# Formula Power= I**2/R\n", + "I= sqrt(Power/R) # in A\n", + "print \"Maximum power dissipation = %0.2f A\" %I\n", + "V=I*2*R # in volt\n", + "# Formula E= V+2*I*(r+R)\n", + "R= (E-V)/(2*I)-r # in ohm\n", + "print \"Series resistance = %0.f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power dissipation = 0.05 A\n", + "Series resistance = 38 ohm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.13 - Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "P=10000 # in ohm\n", + "Q=10 # in ohm\n", + "S=5 # in kohm\n", + "S=S*10**3 # in ohm\n", + "E=12 # in volt\n", + "R=P*S/Q # in ohm\n", + "print \"(i) : The maximum value of resistance that can be measurement with the given argument = %0.f Mohm\" %(R*10**-6)\n", + "R_Th= R*S/(R+S)+ P*Q/(P+Q) # in ohm\n", + "\n", + "# Part (ii)\n", + "theta= 2.5 # in mm\n", + "Rg=100 # in ohm\n", + "Si=100 # in mm/miuA\n", + "Si=Si*10**6 # in mm/amp\n", + "del_R= theta*(R_Th+Rg)*(R+S)**2/(Si*E*S) # in ohm\n", + "print \"(ii) : Change in resistance = %0.2f kohm\" %(del_R*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : The maximum value of resistance that can be measurement with the given argument = 5 Mohm\n", + "(ii) : Change in resistance = 53.28 kohm\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.14 - Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "p=200.62 # in ohm\n", + "q=400 # in ohm\n", + "P=200.48 # in ohm\n", + "Q=400 # in ohm\n", + "S=100.03 # in micro ohm\n", + "S=S*10**-6 # in ohm\n", + "r=700 # in micro ohm\n", + "r=r*10**-6 # in ohm\n", + "X= P*S/Q+q*r/(p+q)*(P/Q-p/q) # in ohm\n", + "print \"Unknown resistance = %0.4f micro ohm\" %(X*10**+6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown resistance = 49.9719 micro ohm\n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6b65016a --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_07.ipynb @@ -0,0 +1,1327 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9a66201b8d7233d025725f77699aa3bd8f73ea293b76d05e7eed8e99adada086" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 7 : Inductance and Capacitance Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.1 - Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Z1= 100 # in \u03a9\n", + "theta1= 30 # in \u00b0\n", + "Z2= 50 # in \u03a9\n", + "theta2= 0 # in \u00b0\n", + "Z3= 200 # in \u03a9\n", + "theta3= -90 # in \u00b0\n", + "Z4= 100 # in \u03a9\n", + "theta4= 30 # in \u00b0\n", + "if Z1*Z4 == Z2*Z3 :\n", + " print \"The first condition is satisfied\"\n", + "if theta1+theta4 == theta2+theta3 :\n", + " print \"The second condiiton is also satisfied, So it is possible to balance the bridge under the given condition\"\n", + "else:\n", + " print \"The second condition is not satisfied.\"\n", + " print \"So balance is not possible under given condition\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first condition is satisfied\n", + "The second condition is not satisfied.\n", + "So balance is not possible under given condition\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.2 - Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Z1= 1000 # in \u03a9\n", + "theta1= -90 # in \u00b0\n", + "Z2= 500 # in \u03a9\n", + "theta2= 0 # in \u00b0\n", + "Z3= 1000 # in \u03a9\n", + "theta3= 0 # in \u00b0\n", + "R4= 100 # in \u03a9\n", + "XL4= 500 # in \u03a9\n", + "i_XL4= 500j # imaginary part\n", + "Z4=(R4+i_XL4) # in \u00b0\n", + "theta4= math.atan2(Z4.imag,Z4.real)*180/pi # in \u00b0\n", + "if theta1+theta4 == theta2+theta3 :\n", + " print \"The first condiiton is satisfied.\"\n", + "else :\n", + " print \"Balance is not possible with given configuration\"\n", + "\n", + "# 1/Z1=1/R1+j*omega*C1 (i)\n", + "# According to figure 1/Z1= R4/(Z2*Z3)+%i*XL4/(Z2*Z3) (ii) \n", + "# Comparing real and j-components of Eqn (i) and (ii)\n", + "R1= Z2*Z3/R4 # in \u03a9\n", + "OmegaC1= Z2*Z3/XL4 # in \u03a9\n", + "print \"\\nSince X_C1 is already equal to \",int(OmegaC1),\" \u03a9, the bridge can be balanced simply by placing a \"\n", + "print \"resistance of \",int(R1),\" \u03a9 across the capacitor arm 1\"\n", + "# Z3= R3-j*X_C3 (iii)\n", + " #Z3= Z1*expm(%i*theta1*pi/180)*Z4*expm(%i*theta4*pi/180)/(Z2*expm(%i*theta2*pi/180)) # (iv)\n", + "# Comparing real and j-components of Eqn (iii) and (iv)\n", + "R3= 1000 # in \u03a9\n", + "XC3= 200 # in \u03a9\n", + "print \"\\nSince R3 is already of \",int(R3),\" \u03a9, the bridge can be balanced simply by adding a\"\n", + "print \"capacitor of reactance X_C3 of \",int(XC3),\" \u03a9 in series with the resistor R3 in arm 3.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Balance is not possible with given configuration\n", + "\n", + "Since X_C1 is already equal to 1000 \u03a9, the bridge can be balanced simply by placing a \n", + "resistance of 5000 \u03a9 across the capacitor arm 1\n", + "\n", + "Since R3 is already of 1000 \u03a9, the bridge can be balanced simply by adding a\n", + "capacitor of reactance X_C3 of 200 \u03a9 in series with the resistor R3 in arm 3.\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.3 - Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "C2= 0.2 # in micro F\n", + "Ratio21= 10/1 # resistance ratio R2/R1\n", + "C1= C2*Ratio21 # in micro F\n", + "Ratio21_desh= 1/10 \n", + "C1_desh= C2*Ratio21_desh # in micro F\n", + "print \"The range of measurement of unknown capacitance = \",round(C1_desh,2),\"\u00b5F to\",int(round(C1)),\"\u00b5F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range of measurement of unknown capacitance = 0.02 \u00b5F to 2 \u00b5F\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.4 - Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "#Given data\n", + "R2= 5 # in ohm\n", + "R3= 2000 # in ohm\n", + "R4= 2950 # in ohm\n", + "C2= 0.5 # in micro F\n", + "C2=C2*10**-6 # in F\n", + "r2=0.4 # in ohm\n", + "f=450 # in Hz\n", + "omega= 2*pi*f \n", + "# Under Balace Condition Z1*Z4=Z2*Z3\n", + "# [r1+1/(j*omega*C1)]*R4= [r2+R2+1/(j*omega*C2)]*R3\n", + "# Equating the real parts we have, r1*R4= (r2+R2)*R3\n", + "r1= (r2+R2)*R3/R4 # in ohm\n", + "print \"Value of r1 = %0.3f ohm\" %r1\n", + "# Equating imaginary parts we have R4/(j*omega*C1)= R3/(j*omega*C2)\n", + "C1= R4/R3*C2 # in F\n", + "print \"Value of C1 = %0.4f micro F\" %(C1*10**6) \n", + "Tan_toh= omega*C1*r1 \n", + "print \"Dissipation Factor = %0.3e\" %Tan_toh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of r1 = 3.661 ohm\n", + "Value of C1 = 0.7375 micro F\n", + "Dissipation Factor = 7.634e-03\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.5 - Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=1000 #in Hz\n", + "R1=1000 #in ohm\n", + "R2=1000 # in ohm\n", + "R3=2000 #in ohm\n", + "R4=2000 #in ohm\n", + "C1=1*10**-6 #in F\n", + "r1= 10 # in ohm\n", + "omega=2*pi*f \n", + "C2=C1*R1/R2 #in F\n", + "print \"Unknown capacitance = %0.f \u00b5F \"%(C2*10**6) \n", + "\n", + "r2=(R2*(R3+r1)-R1*R4)/R1 #in ohm \n", + "del_1=omega*r1*C1 #in radian\n", + "del_1=del_1*180/pi # in \u00b0\n", + "print \"Phase angle error1 = %0.1f degree\" %del_1 \n", + "del_2=omega*r2*C2 #in radian\n", + "del_2=del_2*180/pi # in degree\n", + "print \"Phase angle error2 = %0.1f degree\" %del_2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown capacitance = 1 \u00b5F \n", + "Phase angle error1 = 3.6 degree\n", + "Phase angle error2 = 3.6 degree\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.6 - Page No :183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=500 #in Hz\n", + "R2=4.8 #in ohm\n", + "R3=2*10**3 # in ohm\n", + "R4=2.85*10**3 #in ohm\n", + "C2=0.5*10**-6 #in F\n", + "r2= 0.4 # in ohm \n", + "omega=2*pi*f \n", + "C1=C2*R4/R3 #in F\n", + "print \"The value of unknown capacitance = %0.4f micro F\" %(C1*10**6) \n", + "r1=(R3*(R2+r2))/R4 #in ohm \n", + "print \"Resistance of unknown capacitance = %0.3f ohm\" %r1\n", + "Tan_del_1= omega*C1*r1 \n", + "print \"Dissipation factor = %0.5f\" %Tan_del_1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of unknown capacitance = 0.7125 micro F\n", + "Resistance of unknown capacitance = 3.649 ohm\n", + "Dissipation factor = 0.00817\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.7 - Page No : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=50 #in Hz\n", + "R2=330*10**3 #in ohm\n", + "R3=15*10**3 # in ohm\n", + "R4=22*10**3 #in ohm\n", + "C2=0.12*10**-6 #in F\n", + "omega=2*pi*f \n", + "R1= R2*R3/R4 # in ohm\n", + "print \"Resistive component of unknown resistance = %0.f kohm\" %(R1*10**-3)\n", + "C1= C2*R4/R3 # in F\n", + "print \"Capacitive component of unknown capacitor = %0.3f micro F\" %(C1*10**6)\n", + "D=1/(omega*C1*R1) \n", + "print \"Dissipation factor = %0.2f\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistive component of unknown resistance = 225 kohm\n", + "Capacitive component of unknown capacitor = 0.176 micro F\n", + "Dissipation factor = 0.08\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.8 - Page No : 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=50 #in Hz\n", + "R4=309 #in ohm\n", + "R2=100 # in ohm\n", + "C3=109*10**-12 #in F\n", + "C4=0.5*10**-6 #in F\n", + "omega=2*pi*f \n", + "Cx= C3*R4/R2 # in F\n", + "print \"Equivalent series capacitance = %0.2f \u00b5\u00b5F\" %(Cx*10**12)\n", + "Rx= C4*R2/C3 # in ohm\n", + "# Power factor of the specimen\n", + "Tan_delta= omega*Cx*Rx \n", + "print \"Power factor of the specimen = %0.4f\" %Tan_delta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent series capacitance = 336.81 \u00b5\u00b5F\n", + "Power factor of the specimen = 0.0485\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.9 - Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, tan \n", + "from numpy import pi\n", + "#Given data\n", + "f=50 #in Hz\n", + "R4=1000 #in ohm\n", + "C3=50*10**-12 #in F\n", + "delta=9 # in \u00b0\n", + "epsilon_r= 2.3 \n", + "epsilon_0= 8.854*10**-12 \n", + "d= 0.3*10**-2 # in meter\n", + "A=314 # area of each electrode in square cm\n", + "A=A*10**-4 # in square meter\n", + "omega=2*pi*f \n", + "C1= epsilon_r*epsilon_0*A/d # in F\n", + "# Formula tan (delta)= 1/(omega*C1*R1)\n", + "R1= 1/(omega*C1*tan(delta*pi/180)) # in ohm\n", + "C4= 1/(omega**2*C1*R1*R4) # in F\n", + "print \"Variable capacitor = %0.1f micro F\" %(C4*10**6)\n", + "R2= C3*R4*(cos(delta*pi/180))**2/C1 # in ohm\n", + "print \"Variable resistance = %0.f ohm\" %R2\n", + "\n", + "# Note: Calculation of R2 in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Variable capacitor = 0.5 micro F\n", + "Variable resistance = 229 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.10 - Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=25 #in kHz\n", + "f=f*10**3 # in Hz\n", + "R1=3.1*10**3 #in ohm\n", + "R2=25*10**3 #in ohm\n", + "R4=100*10**3 #in ohm\n", + "C1=5.2*10**-6 #in F\n", + "omega= 2*pi*f \n", + "# From C3/C1= R2/R4-R1/R3\n", + "# C3= C1*(R2/R4-R1/R3) (i)\n", + "# and omega= 1/sqrt(R1*R3*C1*C3)\n", + "# R3= 1/(omega**2*R1*C1*C3), putting this value in (i)\n", + "C3= C1*R2/(R4*(1+R1**2*C1**2*omega**2)) # in F\n", + "print \"Equivalent capacitance = %0.3f \u00b5\u00b5F\" %(C3*10**12)\n", + "R3= 1/(omega**2*R1*C1*C3) # in ohm\n", + "print \"Equivalent parallel resistance = %0.1f kohm\" %(R3*10**-3)\n", + "\n", + "\n", + "# Note Evaluating the value of C3 in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent capacitance = 0.203 \u00b5\u00b5F\n", + "Equivalent parallel resistance = 12.4 kohm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.11 - Page No :193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R2= 5 # in ohm\n", + "R3= 2000 # in ohm\n", + "R4= 2950 # in ohm\n", + "C2= 0.5 # in miu F\n", + "C2=C2*10**-6 # in F\n", + "r2=0.4 # in ohm\n", + "f=450 # in Hz\n", + "omega= 2*pi*f \n", + "# Under Balace Condition Z1*Z4=Z2*Z3\n", + "# [r1+1/(j*omega*C1)]*R4= [r2+R2+1/(j*omega*C2)]*R3\n", + "# Equating the real parts we have, r1*R4= (r2+R2)*R3\n", + "r1= (r2+R2)*R3/R4 # in ohm\n", + "print \"Value of r1 = %0.3f ohm\" %r1\n", + "# Equating imaginary parts we have R4/(j*omega*C1)= R3/(j*omega*C2)\n", + "C1= R4/R3*C2 # in F\n", + "print \"Value of C1 = %0.4f micro F\" %(C1*10**6) \n", + "Tan_toh= omega*C1*r1 \n", + "print \"Dissipation Factor = %0.3e\" %Tan_toh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of r1 = 3.661 ohm\n", + "Value of C1 = 0.7375 micro F\n", + "Dissipation Factor = 7.634e-03\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.12 - Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "L1= 52.6 # in mH\n", + "r1= 28.5 # in ohm\n", + "R2= 1.68 # in ohm\n", + "R3= 80 # resistance in ohm\n", + "R4= 80 # resistance in ohm\n", + "r2= r1*R3/R4-R2 # in ohm\n", + "print \"Resistance of coil = %0.2f ohm\" %r2\n", + "L2=L1*R3/R4 # in mH\n", + "print \"Inductance of coil = %0.1f mH\" %L2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of coil = 26.82 ohm\n", + "Inductance of coil = 52.6 mH\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.13 - Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "L= 47.8 # in mH\n", + "R= 1.36 # in ohm\n", + "R2= 100 # in ohm\n", + "R3= 32.7 #in ohm\n", + "R4= 100 #in ohm\n", + "R1= R2*R3/R4-R # in ohm\n", + "print \"Resistance of coil = %0.2f ohm\" %R1\n", + "L1= R2/R4*L # in mH\n", + "print \"Inductance of coil = %0.1f mH\" %L1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of coil = 31.34 ohm\n", + "Inductance of coil = 47.8 mH\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.14 - Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R2= 1000 # in ohm\n", + "R3= 1000 #in ohm\n", + "R4= 1000 #in ohm\n", + "C4= 0.5 # in miu F\n", + "C4= C4*10**-6 # in F\n", + "R1= R2*R3/R4 # in ohm\n", + "print \"Resistance of inductor = %0.f ohm\" %R1\n", + "L1= C4*R2*R3 # in H\n", + "print \"Inductance of inductor = %0.1f H\" %L1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of inductor = 1000 ohm\n", + "Inductance of inductor = 0.5 H\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.15 - Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "r= 469 # in ohm\n", + "R2= 1000 # in ohm\n", + "R3= 218 #in ohm\n", + "R4= 1000 #in ohm\n", + "C= 10 # in miu F\n", + "C= C*10**-6 # in F\n", + "R1= R2*R3/R4 # in ohm\n", + "print \"Resistance of inductor = %0.f ohm\" %R1\n", + "L1= C*R2/R4*(r*(R3+R4)+R3*R4) # in H\n", + "print \"Inductance of inductor = %0.3f H\" %L1\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of inductor = 218 ohm\n", + "Inductance of inductor = 7.892 H\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.16 - Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "r= 500 # in ohm\n", + "R2= 400 # in ohm\n", + "R3= 400 #in ohm\n", + "R4= 400 #in ohm\n", + "C= 2 # in miu F\n", + "C= C*10**-6 # in F\n", + "R= R2*R3/R4 # in ohm\n", + "print \"Resistance of AB = %0.f ohm\" %R\n", + "L= C*R2/R4*(r*(R3+R4)+R3*R4) # in H\n", + "print \"Inductance of AB = %0.2f H\" %L" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of AB = 400 ohm\n", + "Inductance of AB = 1.12 H\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.17 - Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "r= 100 # in ohm\n", + "R2= 1000 # in ohm\n", + "R3= 500 #in ohm\n", + "R4= 1000 #in ohm\n", + "C= 3 # in micro F\n", + "C= C*10**-6 # in F\n", + "Rx= R2*R3/R4 # in ohm\n", + "print \"Value of Rx = %0.f ohm\" %Rx\n", + "Lx= C*R2/R4*(r*(R3+R4)+R3*R4) # in H\n", + "print \"Value of Lx = %0.2f H\" %Lx " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rx = 500 ohm\n", + "Value of Lx = 1.95 H\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.18 - Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R2= 1000 # in ohm\n", + "R3= 16800 #in ohm\n", + "R4= 833 #in ohm\n", + "C4= 0.38 # in miu F\n", + "C4= C4*10**-6 # in F\n", + "f= 50 # in Hz\n", + "omega=2*pi*f \n", + "L1= R2*R3*C4/(1+(omega*C4*R4)**2) # in H\n", + "print \"Unknown inductance = %0.2f H\" %L1 \n", + "R1= R2*R3*R4*omega**2*C4**2/(1+(omega*C4*R4)**2) # in ohm\n", + "print \"Unknown resistance = %0.2f ohm\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown inductance = 6.32 H\n", + "Unknown resistance = 197.49 ohm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.19 - Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R1= 500 #in ohm\n", + "R2= 1000 # in ohm\n", + "R3= R2 #in ohm\n", + "L1= 0.18 # in H\n", + "f= 5000/(2*pi) # in Hz\n", + "omega= 2*pi*f \n", + "# L1= R2*R3*C4/(1+(omega*C4*R4)**2) (i) \n", + "# and R1= R2*R3*R4*omega**2*C4**2/(1+(omega*C4*R4)**2) or R1= omega**2*R4*C4*L1\n", + "R4C4= R1/(omega**2*L1) \n", + "# From eq (i)\n", + "C4= L1*(1+(omega*R4C4)**2)/(R2*R3) # in F\n", + "print \"The value of C = %0.4f micro F\" %(C4*10**6) \n", + "R4= R4C4/C4 # in ohm\n", + "print \"The value of R4 = %0.f ohm\" %R4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 0.2356 micro F\n", + "The value of R4 = 472 ohm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.20 - Page No : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R2= 1000 #in ohm\n", + "R3= 10000 # in ohm\n", + "R4= 2000 #in ohm\n", + "C4= 1*10**-6 # in F\n", + "omega= 3000 # radians/sec\n", + "L1= R2*R3*C4/(1+(omega*C4*R4)**2) # in H\n", + "print \"Equivalent inductance of the network = %0.2f H\" %L1\n", + "R1= R2*R3*R4*omega**2*C4**2/(1+(omega*C4*R4)**2) # in ohm\n", + "print \"Equivalent resistance of the network = %0.3f kohm\" %(R1*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent inductance of the network = 0.27 H\n", + "Equivalent resistance of the network = 4.865 kohm\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.21 - Page No : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R2= 2410 #in ohm\n", + "R3= 750 # in ohm\n", + "R4= 64.5 #in ohm\n", + "C4= 0.35*10**-6 # in F\n", + "r4= 0.4 # series resistance of capacitor in ohm\n", + "f=500 #/ in Hz\n", + "omega= 2*pi*f # radians/sec\n", + "R4= R4+r4 # in ohm\n", + "R1= R2*R3*R4*omega**2*C4**2/(1+(omega*C4*R4)**2) # in ohm\n", + "print \"Resistance of the choke coil = %0.2f ohm\" %R1\n", + "L1= R2*R3*C4/(1+(omega*C4*R4)**2) # in H\n", + "print \"Inductance of the choke coil = %0.4f H\" %L1\n", + "\n", + "# Note: Calculation of finding the value of L1 in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of the choke coil = 141.11 ohm\n", + "Inductance of the choke coil = 0.6294 H\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.22 - Page No :205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan2 \n", + "#Given data\n", + "R2= 834 # in \u03a9\n", + "R3= 100 # in \u03a9\n", + "C2= 0.124 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C4= 0.1 # in \u00b5F\n", + "C4= C4*10**-6 # in F\n", + "L1= R2*R3*C4 # in H\n", + "f= 2 # in kHz\n", + "f= f*10**3 # in kHz\n", + "print \"The value of L1 = %0.2f mH\" %(L1*10**3)\n", + "R1= R3*C4/C2 # in \u03a9\n", + "print \"The value of R1 = %0.2f \u03a9\" %R1\n", + "pi_2_f_L1= 2*pi*f*L1 # value of 2*pi*f*L1\n", + "i= 1j # complex number\n", + "i_XL= i*pi_2_f_L1 #imaginary part\n", + "Z= R1+i_XL # impedance in ohm\n", + "print \"The magnitude of effective impedence = %0.2f \u03a9\" %abs(Z)\n", + "theta= atan2(Z.imag,Z.real)*180/pi\n", + "print \"The angle of effective impedence = %0.2f\u00b0\" %theta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of L1 = 8.34 mH\n", + "The value of R1 = 80.65 \u03a9\n", + "The magnitude of effective impedence = 132.24 \u03a9\n", + "The angle of effective impedence = 52.42\u00b0\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.23 - Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "fr= 2 # in MHz\n", + "fr=fr*10**6 # in Hz\n", + "C=230+8 # in pF\n", + "C=C*10**-12 # in F\n", + "# Formula fr= 1/(2*pi*sqrt(L*C))\n", + "L= 1/((2*pi*fr)**2*C) # in H\n", + "print \"Value of L = %0.1f \u00b5H\" %(L*10**6)\n", + "# From the first set of data\n", + "fr= 1 # in MHz\n", + "fr=fr*10**6 # in Hz\\\n", + "C= 1/((2*pi*fr)**2*L) # in F\n", + "print \"Value of C = %0.f pF\" %(C*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of L = 26.6 \u00b5H\n", + "Value of C = 952 pF\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.24 - Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C1= 208 # in pF\n", + "C1=C1*10**-12 # in F\n", + "Q1= 80 \n", + "C2= 184 # in pF\n", + "C2=C2*10**-12 # in F\n", + "Q2= 50 \n", + "f=165 # in kHz\n", + "f=f*10**3 # in Hz\n", + "omega= 2*pi*f # in radians/sec\n", + "# Part (i)\n", + "Rm= 1/omega*(1/(C2*Q2)-1/(C1*Q1)) # in ohm\n", + "print \"Resistive component of unknown impedence = %0.2f ohm\" %Rm\n", + "# Part(ii)\n", + "Xm= 1/omega*(1/C2-1/C1) # in ohm\n", + "print \"Reactive component of unknown impedence = %0.f ohm\" %Xm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistive component of unknown impedence = 46.88 ohm\n", + "Reactive component of unknown impedence = 605 ohm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.25 - Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C1= 160*10**-12 # in F\n", + "C2= 36*10**-12 # in F\n", + "f1=250 # in kHz\n", + "f1=f1*10**3 # in Hz\n", + "f2=500 # in kHz\n", + "f2=f2*10**3 # in Hz\n", + "Cd= (C1-4*C2)/3 # in F\n", + "print \"Self Capacitance of the coil = %0.2f \u00b5\u00b5F\" %(Cd*10**12)\n", + "# Formula f1= 1/(2*pi*sqrt(L*(C1+Cd)))\n", + "L= 1/((2*pi*f1)**2*(C1+Cd)) # in H\n", + "print \"Self inductance of the coil = %0.f \u00b5H\" %(L*10**6) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Self Capacitance of the coil = 5.33 \u00b5\u00b5F\n", + "Self inductance of the coil = 2451 \u00b5H\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.26 - Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C1= 251*10**-12 # in F\n", + "C2= 50*10**-12 # in F\n", + "f1=3 # in MHz\n", + "f1=f1*10**6 # in Hz\n", + "f2=6 # in MHz\n", + "f2=f2*10**6 # in Hz\n", + "Cd= (C1-4*C2)/3 # in F\n", + "print \"Self Capacitance of the coil = %0.f pF\" %(Cd*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Self Capacitance of the coil = 17 pF\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.27 - Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C1= 1530 # in pF\n", + "C2= 162 # in pF\n", + "f1=1 # in MHz\n", + "f1=f1*10**6 # in Hz\n", + "f2=3 # in MHz\n", + "f2=f2*10**6 # in Hz\n", + "# f1= 1/(2*pi*sqrt(L*(C1+Cd)))\n", + "# f1= 1/(2*pi*sqrt(L*(C2+Cd))) and f2= 3*f1 so\n", + "Cd= (C1-9*C2)/8 # in pF\n", + "print \"Self capacitance of the coil = %0.f pF\" %Cd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Self capacitance of the coil = 9 pF\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.28 - Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f= 450 # in kHz\n", + "f=f*10**3 # in Hz\n", + "C=250 # in pF\n", + "C=C*10**-12 # in F\n", + "Rsh= 0.75 # in ohm\n", + "Q= 105 \n", + "omega= 2*pi*f # in radians/sec\n", + "# Formula f= 1/(2*pi*sqrt(L*C))\n", + "L= 1/((2*pi*f)**2*C) # in H\n", + "print \"Inductance of the coil = %0.f \u00b5H\" %(L*10**6)\n", + "R= omega*L/Q-Rsh # in ohm\n", + "print \"Resistance of the coil = %0.2f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance of the coil = 500 \u00b5H\n", + "Resistance of the coil = 12.72 ohm\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.29 - Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f= 500 # in kHz\n", + "f=f*10**3 # in Hz\n", + "C=120 # in pF\n", + "C=C*10**-12 # in F\n", + "R= 5 # in ohm\n", + "r=0.02 # resistance used across the oscillatory circuit in ohm\n", + "omega= 2*pi*f # in radians/sec\n", + "Q_True= 1/(omega*C*R) \n", + "Q_indicated= 1/(omega*C*(R+r)) \n", + "PerError= (Q_True-Q_indicated)*100/Q_True # in %\n", + "print \"Percentage Error = %0.1f %%\" %PerError" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage Error = 0.4 %\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.30 - Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f1= 800 # in kHz\n", + "f1=f1*10**3 # in Hz\n", + "f2= 2.5 # in MHz\n", + "f2=f2*10**6 # in Hz\n", + "C1=95 # in pF\n", + "C1=C1*10**-12 # in F\n", + "# L= 1/(omega1**2*(C1+Cd)) (i)\n", + "# L= 1/(omega2**2*Cd) (ii)\n", + "# From eq(i) and eq(ii)\n", + "Cd= f1**2*C1/(f2**2-f1**2) # in F\n", + "print \"Self capacitance of the radio coil = %0.2f pF\" %(Cd*10**12) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Self capacitance of the radio coil = 10.84 pF\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.31 - Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f1= 1 # in MHz\n", + "f1=f1*10**6 # in Hz\n", + "f2= 2 # in MHz\n", + "f2=f2*10**6 # in Hz\n", + "C1=480 # in pF\n", + "C1=C1*10**-12 # in F\n", + "C2=90 # in pF\n", + "C2=C2*10**-12 # in F\n", + "R=10 # in ohm\n", + "omega1= 2*pi*f1 # in radians/sec\n", + "omega2= 2*pi*f2 # in radians/sec\n", + "\n", + "# Part (i)\n", + "Cd= (C1-4*C2)/3 # in F\n", + "print \"(i) : Self capacitance of the coil = %0.f pF\" %(Cd*10**12)\n", + "\n", + "# Part(ii)\n", + "Q_indicated1= 1/(omega1*(C1+Cd)*R) \n", + "print \"(ii) : Indicated or effective Q for first measurement = %0.3f\" %Q_indicated1\n", + "Q_True1= 1/(omega1*C1*R) \n", + "print \"True Q for first measurement = %0.3f \" %Q_True1\n", + "Q_indicated2= 1/(omega2*(C2+Cd)*R) \n", + "print \"Indicated or effective Q for second measurement = %0.3f\" %Q_indicated2\n", + "Q_True2= 1/(omega2*C2*R) \n", + "print \"True Q for second measurement = %0.2f\" %Q_True2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Self capacitance of the coil = 40 pF\n", + "(ii) : Indicated or effective Q for first measurement = 30.607\n", + "True Q for first measurement = 33.157 \n", + "Indicated or effective Q for second measurement = 61.213\n", + "True Q for second measurement = 88.42\n" + ] + } + ], + "prompt_number": 60 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..863a69a3 --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_08.ipynb @@ -0,0 +1,659 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:012ab8557afdcfdae2cdc3da17271647415fc17ab95dd187f4df0903472edf45" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 8 : Cathode Ray Oscilloscopes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.1 - Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "from __future__ import division\n", + "#Given data\n", + "l=25 # in mm\n", + "l=l*10**-3 # in meter\n", + "d=5 # in mm\n", + "d=d*10**-3 # in meter\n", + "S= 20 # in cm\n", + "S= S*10**-2 # in meter\n", + "Va= 3000 # in volts\n", + "TraceLength= 10 # in cm\n", + "TraceLength=TraceLength*10**-2 # in meter\n", + "y=TraceLength/2 \n", + "Vd= 2*d*Va*y/(l*S) # in volts\n", + "Vrms= Vd/sqrt(2) # in volts\n", + "Vrms= int(Vrms) \n", + "print \"RMS value of the sinusoidal voltage applied to the X-deflecting plates = %0.f volts\" %Vrms \n", + "DeflectionSensitivity= l*S/(2*d*Va) # in m/V\n", + "print \"Deflection Sensitivity = %0.3f mm/V\" %(DeflectionSensitivity*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of the sinusoidal voltage applied to the X-deflecting plates = 212 volts\n", + "Deflection Sensitivity = 0.167 mm/V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.2 - Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "Va= 1000 # in volts\n", + "e= 1.6*10**-19 # in C\n", + "m= 9.1*10**-31 # in kg\n", + "MaxVel= sqrt(2*Va*e/m) # maximum velocity of electrons in m/s\n", + "print \"Maximum velocity of electrons = %0.3e m/s\" %MaxVel" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum velocity of electrons = 1.875e+07 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.3 - Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "l=20 # in mm\n", + "l=l*10**-3 # in meter\n", + "d=5 # in mm\n", + "d=d*10**-3 # in meter\n", + "S= 0.20 # in meter\n", + "Va= 2500 # in volts\n", + "DeflectionSensitivity= l*S/(2*d*Va) # in m/V\n", + "print \"Deflection Sensitivity = %0.2f mm/V\" %(DeflectionSensitivity*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection Sensitivity = 0.16 mm/V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.4 - Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan, pi\n", + "#Given data\n", + "l=2.5 # in cm\n", + "l=l*10**-2 # in meter\n", + "d=1 # in cm\n", + "d=d*10**-2 # in meter\n", + "Va= 1000 # in volts\n", + "theta= 1 # in degree\n", + "# Formula tand(theta) = l*Vd/(2*d*Va)\n", + "Vd= 2*d*Va/l*tan(theta*pi/180) # in volts\n", + "print \"Voltage required across the deflection plates = %0.2f volts\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage required across the deflection plates = 13.96 volts\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.5 - Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "l=2.5 # in cm\n", + "l=l*10**-2 # in meter\n", + "d=.5 # in cm\n", + "d=d*10**-2 # in meter\n", + "S= 20 # in cm\n", + "S= S*10**-2 # in meter\n", + "Va= 2500 # in volts\n", + "# Formula y = OC*AB/OB = (S*d/2)/(l/2)\n", + "y = (S*d/2)/(l/2) # in meter\n", + "print \"The value of deflection = %0.f cm\" %(y*10**2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of deflection = 4 cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.6 - Page No : 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "R_E1= 5.6 # in kohm\n", + "C1= 0.2 # in micro F\n", + "V_B1= 6.3 # in volt\n", + "V_BE= 0.7 # in volt\n", + "TL= 2.5 # trigger level for the Schmitt trigger (UTP,LTP) in volt\n", + "del_V1= 2*TL # in volt\n", + "I_C1= (V_B1-V_BE)/R_E1 # in mA\n", + "print \"Charging current = %0.f mA\" %I_C1 \n", + "toh= del_V1*C1/I_C1 # in ms\n", + "print \"Time period = %0.f ms\" %toh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charging current = 1 mA\n", + "Time period = 1 ms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.7 - Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "L=10 # trace length in cm\n", + "DS= 5 # deflection sensitivity in V/cm\n", + "V_peakTOpeak= L*DS # in volt\n", + "V_peak= V_peakTOpeak/2 # in volt\n", + "RMS= V_peak/sqrt(2) # RMS value of unknown as voltage in volt\n", + "print \"The value of AC voltage = %0.3f volts\" %RMS " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of AC voltage = 17.678 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.8 - Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from fractions import Fraction \n", + "#Given data\n", + "Y= 3 # Positive Y-peaks in pattern\n", + "X= 2 # Positive X-peaks in pattern\n", + "# Ratio of frequencies of vertical and horizontal signals\n", + "# f_y/f_x= omega_y/omega_x = Y/X\n", + "R= Y/X #Ratio of frequencies \n", + "print \"Ratio of frequencies of vertical and horizontal signals = \",Fraction(R).limit_denominator(10) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of frequencies of vertical and horizontal signals = 3/2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.9 - Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Y= 2+1/2 # Positive Y-peaks in pattern\n", + "X= 1/2+1/2 # Positive X-peaks in pattern\n", + "f_h= 3# frequency of horizontal voltage signal in kHz\n", + "f_yBYf_x= Y/X \n", + "# frequency of vertical voltage signal= f_yBYf_x * f_h\n", + "f_v= f_yBYf_x * f_h # frequency of vertical voltage signal in kHz\n", + "print \"frequency of vertical voltage signal = %0.1f kHz\" %f_v " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency of vertical voltage signal = 7.5 kHz\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.10 - Page No : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f_x= 1000 # in Hz\n", + "Y= 2 # points of tangency to vertical line\n", + "X= 5 # points of tangency to horizontal line\n", + "f_y= f_x*X/Y # in Hz\n", + "print \"Frequency of vertical input = %0.f Hz\" %f_y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of vertical input = 2500 Hz\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.11 - Page No : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from fractions import Fraction \n", + "#Given data\n", + "# Taking 1div= 1 cm for CRO wave displays\n", + "Mark= 0.4 # cm\n", + "Space= 1.6 # cm\n", + "SAC= 0.2 # signal amplitude control in V/div\n", + "TBS= 10 # time base control in micro/div\n", + "Amplitude= 2.15 # in cm\n", + "M_S_ratio= Mark/Space # Mark to Space raio \n", + "print \"Mark to Space ratio = \",Fraction(M_S_ratio).limit_denominator(20) \n", + "T= (Mark+Space)*TBS # in micro sec\n", + "T=T*10**-6 # in sec\n", + "f=1/T # in Hz\n", + "print \"Pulse frequency = %0.f kHz\" %(f*10**-3)\n", + "Mag= Amplitude*SAC # Magnitude of pulse voltage in volt\n", + "print \"Magnitude of pulse voltage = %0.2f volts\" %Mag" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mark to Space ratio = 1/4\n", + "Pulse frequency = 50 kHz\n", + "Magnitude of pulse voltage = 0.43 volts\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.12 - Page No : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import asin\n", + "from __future__ import division\n", + "#Given data\n", + "# Part (a)\n", + "d_v0= 0 \n", + "Dv=6 \n", + "fie= asin(d_v0/Dv) \n", + "print \"Phase angle of first figure = %0.f degree\" %fie\n", + "# Part (b)\n", + "d_v0= 3 \n", + "Dv=6 \n", + "fie= asin(d_v0/Dv)*180/pi \n", + "print \"Phase angle of second figure = %0.f degree\" %fie,\"or %0.f\" %(180-fie)\n", + "# Part (c)\n", + "d_v0= 5 \n", + "Dv=5 \n", + "fie= asin(d_v0/Dv)*180/pi\n", + "print \"Phase angle of third figure = %0.f degree\" %fie\n", + "# Part (d)\n", + "d_v0= 3 \n", + "Dv=5 \n", + "fie= asin(d_v0/Dv)*180/pi\n", + "# since ellipse is in 2nd and fourth quartes so the valid value of phase angle \n", + "fie= 180-fie\n", + "print \"Phase angle of fourth figure = %0.1f degree\" %fie,\"or %0.1f\" %(180-fie)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase angle of first figure = 0 degree\n", + "Phase angle of second figure = 30 degree or 150\n", + "Phase angle of third figure = 90 degree\n", + "Phase angle of fourth figure = 143.1 degree or 36.9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.13 - Page No : 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f=2000 # in Hz\n", + "T=1/f # in sec\n", + "D=0.2 \n", + "PulseDuration= D*T # in sec\n", + "print \"The value of pulse duration = %0.1f ms\" %(PulseDuration*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of pulse duration = 0.1 ms\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.14 - Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "vertical_attenuation= 0.5 # in V/Div\n", + "TPD= 2 # time/Div control in micro sec\n", + "P= 4*vertical_attenuation # peak-to-peak amplitude of the signal in V \n", + "print \"Peak-to-Peak amplitude of the signal = %0.f V\" %P\n", + "T= 4*TPD # in micro sec\n", + "T=T*10**-6 # in sec\n", + "f=1/T # in Hz\n", + "print \"The value of frequency = %0.f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak-to-Peak amplitude of the signal = 2 V\n", + "The value of frequency = 125 kHz\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.15 - Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C_1N= 36 # in pF\n", + "C_2= 150 # in pF\n", + "R_1N= 1 # in M ohm\n", + "R_1= 10 # in M ohm\n", + "# R_1/(omega*(C_2+C_1N)) = R_1N/(omega*C_1)\n", + "C_1= R_1N*(C_2+C_1N)/R_1 # in pF\n", + "print \"Value of C_1 = %0.1f pF\" %C_1\n", + "C_T= 1/(1/C_1+1/(C_2+C_1N)) # in pF\n", + "print \"Value of C_T = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C_1 = 18.6 pF\n", + "Value of C_T = 16.91 pF\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.16 - Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "C_1N= 36 # in pF\n", + "C_2= 150 # in pF\n", + "R_1N= 1 # in M ohm\n", + "R_1= 10 # in M ohm\n", + "R_source= 500 # in ohm\n", + "# R_1/(omega*(C_2+C_1N)) = R_1N/(omega*C_1)\n", + "C_1= R_1N*(C_2+C_1N)/R_1 # in pF\n", + "C_T= 1/(1/C_1+1/(C_2+C_1N)) # in pF\n", + "C_T= C_T*10**-12 # in F\n", + "f= 1/(2*pi*C_T*R_source) \n", + "print \"Signal Frequency = %0.2f MHz\" %(f*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal Frequency = 18.82 MHz\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.17 - Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "f= 20 # in MHz\n", + "f=f*10**6 # in Hz\n", + "toh= 1/f # in sec\n", + "toh=toh*10**9 # in ns\n", + "# For one cycle occupying 4 horizontal divisions,\n", + "MTD= toh/4 # Minimum time/division in ns/division\n", + "# Using the 10 times magnifier to provide MTD\n", + "MTD_setting= 10*MTD # minimum time/division setting in ns/division\n", + "print \"Minimum time/division setting = %0.f ns/division\" %MTD_setting" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum time/division setting = 125 ns/division\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..ee2c5bbc --- /dev/null +++ b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/Chapter_10.ipynb @@ -0,0 +1,114 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e3beb8b0630c35bb63d0b674a53a03c2bc95fc955abe45777c3c8a090f6bed5e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 10 : Instrument Calibration and Recorders" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 10.1 - Page No : 284\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "FullScale= 25 # in volt\n", + "\n", + "VR= 5 # voltmeter reading in volt\n", + "Error= -0.25 # in volt\n", + "Error_Reading= Error/VR*100 # % of reading\n", + "print \"Error percentage of reading = %0.f %% of reading\" %Error_Reading \n", + "Error_FullScale= Error/FullScale*100 # % of full scale\n", + "print \"Error percentage of full scale = %0.f %% of full-scale\" %Error_FullScale\n", + "\n", + "VR= 10 # voltmeter reading in volt\n", + "Error= 0.25 # in volt\n", + "Error_Reading= Error/VR*100 # % of reading\n", + "print \"Error percentage of reading = %0.1f %% of reading\" %Error_Reading \n", + "Error_FullScale= Error/FullScale*100 # % of full scale\n", + "print \"Error percentage of full scale = %0.f %% of full-scale\" %Error_FullScale\n", + "\n", + "VR= 20 # voltmeter reading in volt\n", + "Error= -0.4 # in volt\n", + "Error_Reading= Error/VR*100 # % of reading\n", + "print \"Error percentage of reading = %0.f %% of reading\" %Error_Reading \n", + "Error_FullScale= Error/FullScale*100 # % of full scale\n", + "print \"Error percentage of full scale = %0.1f %% of full-scale\" %Error_FullScale" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Error percentage of reading = -5 % of reading\n", + "Error percentage of full scale = -1 % of full-scale\n", + "Error percentage of reading = 2.5 % of reading\n", + "Error percentage of full scale = 1 % of full-scale\n", + "Error percentage of reading = -2 % of reading\n", + "Error percentage of full scale = -1.6 % of full-scale\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 10.2 - Page No : 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given data\n", + "Pm=1250 # in watt\n", + "V=255 # in volt\n", + "I=4.8 # in amp\n", + "P=V*I #/ in watt\n", + "AbsoluteError= Pm-P # in watt\n", + "print \"Absolute Error = %0.f watt\" %AbsoluteError \n", + "PerError= AbsoluteError/Pm*100 # in %\n", + "print \"Percentage Error = %0.2f %%\" %PerError" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute Error = 26 watt\n", + "Percentage Error = 2.08 %\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9e2ff7b3 Binary files /dev/null and b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap2.png differ 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 new file mode 100644 index 00000000..aaadd53e Binary files /dev/null and b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3.png differ 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 new file mode 100644 index 00000000..aaadd53e Binary files /dev/null and b/Electronic_Instrumentation_And_Measurements_by_J.B.Gupta/screenshots/snap3_1.png differ diff --git a/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb new file mode 100644 index 00000000..4234eb46 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1.ipynb @@ -0,0 +1,168 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 1: UNITS, DIMENSIONS AND STANDARDS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-1, Page Number: 8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Magenetic Flux = 5.0 micro weber\n", + "Cross Section= 6.45e-04 meter square\n", + "Flux Density(B)= 7.75 mT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "phi=500*10**-8 #in weber\n", + "A=(1*1)*(2.54*10**-2)**2 #in meter square \n", + "\n", + "#Calculation\n", + "B=phi/A #in tesla \n", + "\n", + "#Results\n", + "print \"Total Magenetic Flux =\",phi*10**6,\"micro weber\"\n", + "print \"Cross Section=\",'%.2e' % A,\"meter square\"\n", + "print \"Flux Density(B)=\",round(B*10**3,2),\"mT\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-2, Page Number: 8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Celsius Temperature= 37.0 degree celsisus\n", + "Kelvin Temperature= 310.15 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "F=98.6 #Temperature =98.6 Farenheit \n", + "\n", + "#Calculations\n", + "\n", + "Celsius_temperature=(F-32)/1.8 #in Celsius\n", + " \n", + "Kelvin_temperature=(F-32)/1.8+273.15 #in Kelvin\n", + "\n", + "#Results\n", + "print \"Celsius Temperature=\",Celsius_temperature,\"degree celsisus\"\n", + "print \"Kelvin Temperature=\",round(Kelvin_temperature,2),\"K\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-3, Page Number: 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dimensions of Voltage and Resistance are expressed in array format[M L T I],\n", + "Voltage= [ 1 2 -3 -1]\n", + "Resistance= [ 1 2 -3 -2]\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "\n", + "# Powers of M, L,T,I are expressed in an array consisting of four elements\n", + "#Each array element represents the power of the corresponding dimension\n", + "#it is of the form [M,L,T,I]\n", + "\n", + "\n", + "P=np.array([1,2,-3,0]) #Dimesnion of Power\n", + "I=np.array([0,0,0,1]) #Dimension of Current\n", + "\n", + "E=P-I #As E=P/I, the powers have to be subtracted\n", + "\n", + "R=E-I #As R=E/I, the powers have to be subtracted\n", + "\n", + "print \"The dimensions of Voltage and Resistance are expressed in array format[M L T I],\"\n", + "print \"Voltage=\",E\n", + "print \"Resistance=\",R" + ] + }, + { + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb new file mode 100644 index 00000000..75895112 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11.ipynb @@ -0,0 +1,291 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 11: SIGNAL GENERATORS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-1, Page Number: 317" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mimimum frequency f(min)= 106.0 Hz\n", + "Maximum frequency f(max)= 1.06 kHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1min=500 #Minimum Value of R1(ohm)\n", + "R1max=5*10**3 #Maximum Value of R1(ohm)\n", + "C=300*10**-9 #in farad(C=C1=C2) \n", + "\n", + "#Calculation\n", + "#Using the formula f=1/2*pi*R*C for Wein bridge oscillator\n", + "\n", + "fmin=1/(2*math.pi*C*R1max) #Minimum frequency occurs when R1 is maximum(Hz)\n", + "fmax=1/(2*math.pi*C*R1min) #Maximum frequency occurs when R1 is minimum(Hz)\n", + "\n", + "print \"Mimimum frequency f(min)=\",round(fmin),\"Hz\"\n", + "print \"Maximum frequency f(max)=\",round(fmax/1000,2),\"kHz\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-2, Page Number: 319" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo ohm\n", + "R1+R2= 49.0 kilo ohm\n", + "R1= 4.0 kilo ohm\n", + "R2= 45.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vi=5 #Input voltage(V)\n", + "Ib=500*10**-9 #Bias Current(A)\n", + "\n", + "#Calculation\n", + "#With R1 and R2 in the circuit\n", + "Vr3=0.1 #As range is 0-0.1V\n", + "Vr=Vi-Vr3 #KVL\n", + "\n", + "I3=100*10**-6 #Since I3>>Ib, assume I3=100micro ampere\n", + "R3=Vr3/I3 #Ohm's Law \n", + "Rr=Vr/I3 #Ohm's Law. Rr is equivalent series resistance. Rr=R1+R2\n", + "\n", + "print \"R3=\",round(R3*10**-3),\"kilo ohm\"\n", + "print \"R1+R2=\",round(Rr*10**-3),\"kilo ohm\"\n", + "\n", + "\n", + "#With R2 swithed out of the circuit\n", + "Vr3=1 #Range 0-1V\n", + "I3=Vr3/R3 #Ohm's Law \n", + "Vr1=Vi-Vr3 #KVL\n", + "R1=Vr1/I3 #Ohm's Law\n", + "R2=Rr-R1 #Rr is equivalent series resistance \n", + "print \"R1=\",R1*10**-3,\"kilo ohm\"\n", + "print \"R2=\",R2*10**-3,\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-3, Page Number: 326" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For contact at top of R1,\n", + "f= 1.17 kHz\n", + "\n", + "For R1 contact at 10% from bottom,\n", + "f= 117.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C1=0.1*10**-6 #in farad \n", + "R1=1*10**3 #in ohm\n", + "R2=10*10**3 #in ohm \n", + "UTP=3.0 #in V\n", + "LTP=-3.0 #in V\n", + "Vcc=15.0 #in V\n", + "\n", + "#Calculation\n", + "\n", + "V3=Vcc-1 #Op-amp saturation voltage is approximately one less than Vcc\n", + "\n", + "#For contact at top of R1\n", + "V1=V3 \n", + "I2=V1/R2\n", + "dV=UTP-LTP\n", + "t=C1*dV/I2 #Using equation for a capacitor charging linearly\n", + "f=1/(2*t)\n", + "\n", + "print \"For contact at top of R1,\"\n", + "print \"f=\",round(f*10**-3,2),\"kHz\"\n", + "\n", + "#For R1 at 10% from bottom\n", + "\n", + "V1=0.1*V3\n", + "I2=V1/R2\n", + "t=C1* dV/I2 #Using equation for a capacitor charging linearly\n", + "f=1/(2*t)\n", + "\n", + "print \n", + "print \"For R1 contact at 10% from bottom,\"\n", + "print \"f=\",round(f),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-4, Page Number: 332" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t= 4.13 ms\n", + "The frequency of the sqaure wave output is 121.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1=20*10**3 #in ohm\n", + "R2=6.2*10**3 #in ohm\n", + "R3=5.6*10**3 #in ohm\n", + "C1=0.2*10**-6 #in farad\n", + "Vcc=12.0 #in volt\n", + "\n", + "#Calculation\n", + "\n", + "Vo=Vcc-1 #Op-amp saturation voltage is approximately one less than Vcc\n", + "\n", + "UTP=Vo*R3/(R3+R2) #Upper Threshold Voltage\n", + "LTP=-UTP #Lower Threshold voltage \n", + " \n", + "t=C1*R1*math.log((Vo-LTP)/(Vo-UTP)) #Equation to find pulse width for astable multivibrator\n", + "f=1/(2*t) \n", + "\n", + "#Results\n", + "print \"t=\",round(t*10**3,2),\"ms\"\n", + "print \"The frequency of the sqaure wave output is \",round(f),\"Hz\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-5, Page Number: 334" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pulse width(PW)= 289.0 micro second\n", + "For Pw=6ms, C2 should be 0.2 micro farad\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vcc=10\n", + "Vb=1\n", + "R1=22*10**3\n", + "R2=10*10**3\n", + "C1=100*10**-12\n", + "C2=0.01*10**-6\n", + "\n", + "#Calculation\n", + "Vo_plus=Vcc-1\n", + "Vo_minus=-(Vcc-1)\n", + "\n", + "PW=C2*R2*math.log((Vo_plus-Vo_minus)/Vb)\n", + "print \"Pulse width(PW)=\",round(PW*10**6),\"micro second\"\n", + "\n", + "#When Pw=6ms, C2 is found as follows\n", + "PW=6*10**-3\n", + "C2=PW/(R2*math.log((Vo_plus-Vo_minus)/Vb))\n", + "\n", + "print \"For Pw=6ms, C2 should be\",round(C2*10**6,1),\"micro farad\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb new file mode 100644 index 00000000..75895112 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter11_1.ipynb @@ -0,0 +1,291 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 11: SIGNAL GENERATORS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-1, Page Number: 317" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mimimum frequency f(min)= 106.0 Hz\n", + "Maximum frequency f(max)= 1.06 kHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1min=500 #Minimum Value of R1(ohm)\n", + "R1max=5*10**3 #Maximum Value of R1(ohm)\n", + "C=300*10**-9 #in farad(C=C1=C2) \n", + "\n", + "#Calculation\n", + "#Using the formula f=1/2*pi*R*C for Wein bridge oscillator\n", + "\n", + "fmin=1/(2*math.pi*C*R1max) #Minimum frequency occurs when R1 is maximum(Hz)\n", + "fmax=1/(2*math.pi*C*R1min) #Maximum frequency occurs when R1 is minimum(Hz)\n", + "\n", + "print \"Mimimum frequency f(min)=\",round(fmin),\"Hz\"\n", + "print \"Maximum frequency f(max)=\",round(fmax/1000,2),\"kHz\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-2, Page Number: 319" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo ohm\n", + "R1+R2= 49.0 kilo ohm\n", + "R1= 4.0 kilo ohm\n", + "R2= 45.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vi=5 #Input voltage(V)\n", + "Ib=500*10**-9 #Bias Current(A)\n", + "\n", + "#Calculation\n", + "#With R1 and R2 in the circuit\n", + "Vr3=0.1 #As range is 0-0.1V\n", + "Vr=Vi-Vr3 #KVL\n", + "\n", + "I3=100*10**-6 #Since I3>>Ib, assume I3=100micro ampere\n", + "R3=Vr3/I3 #Ohm's Law \n", + "Rr=Vr/I3 #Ohm's Law. Rr is equivalent series resistance. Rr=R1+R2\n", + "\n", + "print \"R3=\",round(R3*10**-3),\"kilo ohm\"\n", + "print \"R1+R2=\",round(Rr*10**-3),\"kilo ohm\"\n", + "\n", + "\n", + "#With R2 swithed out of the circuit\n", + "Vr3=1 #Range 0-1V\n", + "I3=Vr3/R3 #Ohm's Law \n", + "Vr1=Vi-Vr3 #KVL\n", + "R1=Vr1/I3 #Ohm's Law\n", + "R2=Rr-R1 #Rr is equivalent series resistance \n", + "print \"R1=\",R1*10**-3,\"kilo ohm\"\n", + "print \"R2=\",R2*10**-3,\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-3, Page Number: 326" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For contact at top of R1,\n", + "f= 1.17 kHz\n", + "\n", + "For R1 contact at 10% from bottom,\n", + "f= 117.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C1=0.1*10**-6 #in farad \n", + "R1=1*10**3 #in ohm\n", + "R2=10*10**3 #in ohm \n", + "UTP=3.0 #in V\n", + "LTP=-3.0 #in V\n", + "Vcc=15.0 #in V\n", + "\n", + "#Calculation\n", + "\n", + "V3=Vcc-1 #Op-amp saturation voltage is approximately one less than Vcc\n", + "\n", + "#For contact at top of R1\n", + "V1=V3 \n", + "I2=V1/R2\n", + "dV=UTP-LTP\n", + "t=C1*dV/I2 #Using equation for a capacitor charging linearly\n", + "f=1/(2*t)\n", + "\n", + "print \"For contact at top of R1,\"\n", + "print \"f=\",round(f*10**-3,2),\"kHz\"\n", + "\n", + "#For R1 at 10% from bottom\n", + "\n", + "V1=0.1*V3\n", + "I2=V1/R2\n", + "t=C1* dV/I2 #Using equation for a capacitor charging linearly\n", + "f=1/(2*t)\n", + "\n", + "print \n", + "print \"For R1 contact at 10% from bottom,\"\n", + "print \"f=\",round(f),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-4, Page Number: 332" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t= 4.13 ms\n", + "The frequency of the sqaure wave output is 121.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1=20*10**3 #in ohm\n", + "R2=6.2*10**3 #in ohm\n", + "R3=5.6*10**3 #in ohm\n", + "C1=0.2*10**-6 #in farad\n", + "Vcc=12.0 #in volt\n", + "\n", + "#Calculation\n", + "\n", + "Vo=Vcc-1 #Op-amp saturation voltage is approximately one less than Vcc\n", + "\n", + "UTP=Vo*R3/(R3+R2) #Upper Threshold Voltage\n", + "LTP=-UTP #Lower Threshold voltage \n", + " \n", + "t=C1*R1*math.log((Vo-LTP)/(Vo-UTP)) #Equation to find pulse width for astable multivibrator\n", + "f=1/(2*t) \n", + "\n", + "#Results\n", + "print \"t=\",round(t*10**3,2),\"ms\"\n", + "print \"The frequency of the sqaure wave output is \",round(f),\"Hz\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11-5, Page Number: 334" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pulse width(PW)= 289.0 micro second\n", + "For Pw=6ms, C2 should be 0.2 micro farad\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vcc=10\n", + "Vb=1\n", + "R1=22*10**3\n", + "R2=10*10**3\n", + "C1=100*10**-12\n", + "C2=0.01*10**-6\n", + "\n", + "#Calculation\n", + "Vo_plus=Vcc-1\n", + "Vo_minus=-(Vcc-1)\n", + "\n", + "PW=C2*R2*math.log((Vo_plus-Vo_minus)/Vb)\n", + "print \"Pulse width(PW)=\",round(PW*10**6),\"micro second\"\n", + "\n", + "#When Pw=6ms, C2 is found as follows\n", + "PW=6*10**-3\n", + "C2=PW/(R2*math.log((Vo_plus-Vo_minus)/Vb))\n", + "\n", + "print \"For Pw=6ms, C2 should be\",round(C2*10**6,1),\"micro farad\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb new file mode 100644 index 00000000..6d83b13e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12.ipynb @@ -0,0 +1,301 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 12: INSTRUMENT CALIBRATION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-1, Page Number: 355" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When scale reading is 10 V and precise voltage is 9.5 V,\n", + "Error=- -5.0 % of reading= -0.5 % of full scale\n", + "\n", + "When scale reading is 50 V and precise voltage is 51.7 V,\n", + "Error= + 3.4 % of reading= + 1.7 % of full scale\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#For Scale reading =10 V, and precise voltage=9.5 V\n", + "scale_reading=10 #Scale reading is 10 V\n", + "\n", + "precise_reading=9.5 #Precise voltage is 9.5 V\n", + "\n", + "error=(precise_reading-scale_reading)/scale_reading*100 #Error in percentage form w.r.t reading\n", + "\n", + "error_fullscale=(precise_reading-scale_reading)*100/100 #Error with respect to full scale \n", + "\n", + "\n", + "print \"When scale reading is 10 V and precise voltage is 9.5 V,\"\n", + "print \"Error=-\",round(error,1),\"% of reading=\",error_fullscale, \"% of full scale\"\n", + "\n", + "print \n", + "#For Scale reading =50 V, and precise voltage=51.7 V\n", + "scale_reading=50 #Scale reading is 50 V\n", + "precise_reading=51.7 #Precise voltage is 51.7 V\n", + "error=(precise_reading-scale_reading)/scale_reading*100 #Error in percentage form \n", + "error_fullscale=(precise_reading-scale_reading)*100/100\n", + "\n", + "print \"When scale reading is 50 V and precise voltage is 51.7 V,\"\n", + "print \"Error= +\",round(error,1),\"% of reading= +\",error_fullscale, \"% of full scale\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-2, Page Number: 357" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Correction figure= -6 W\n", + "Error= -5 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=114 #Measured Voltage in V\n", + "I=1 #Measured Current in A\n", + "W=120 #Full Scale wattage in W\n", + "\n", + "P=V*I #Wattmeter Power\n", + "error=P-W #Correction figure\n", + "print \"Correction figure=\",error,\"W\"\n", + "\n", + "error=error*100/W #Error %\n", + "\n", + "print \"Error=\",error,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-3, Page Number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore Vo= 5 V ± 700.0 micro volt\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "R4=1125.0\n", + "R5=4017.9\n", + "Vz=6.4\n", + "accuracy=100.0/10**6 #100ppm\n", + "\n", + "#Calculation\n", + "#Maximum and Minimum values of resistances in ohm\n", + "R4max=R4*(1+accuracy) \n", + "R4min=R4*(1-accuracy)\n", + "R5max=R5*(1+accuracy)\n", + "R5min=R5*(1-accuracy)\n", + "\n", + "#Maximum and minimum zener voltages in V\n", + "Vzmax=Vz+Vz*0.01/100 #Maximum voltage is Vz+0.01% of Vz\n", + "Vzmin=Vz-Vz*0.01/100 #Minimum voltage is Vz-0.01% of Vz\n", + "\n", + "#Maximum and minimum output voltages in V\n", + "Vomax=Vzmax*(R5max/(R4min+R5max)) #Output is maximum when Vz is maximum, R5 is minimum and R4 is maximum\n", + "Vomin=Vzmin*(R5min/(R4max+R5min)) #Output is minimum when Vzi mimimum, R5 is maximum and R4 is minimum\n", + "Vo=Vz*(R5/(R4+R5))\n", + "\n", + "error=round(Vomax-Vo,4) #Deviation of output voltage from theoretical value \n", + "\n", + "#Result\n", + "print \"Therefore Vo=\",int(Vo),\"V ±\",error*10**6,\"micro volt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 12-4, Page Number: 364" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When the potentiometer is calibrated, I= 20.0 mA\n", + "R1= 50.0 ohm\n", + "\n", + "Vx= 1.886 V\n", + "\n", + "The value of R2 to limit standard cell current to 20 micro ampere is 200 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Rab=100 #Resistance of wire AB, in ohm\n", + "Vb1=3 #Battery B1, terminal voltage(V)\n", + "Vb2=1.0190 #Standard Cell Voltage(V) \n", + "l=50.95 #Length BC, in cm\n", + "\n", + "#At Calibration\n", + "\n", + "Vbc=Vb2 \n", + "volt_per_unit_length=Vbc/l #in V/cm\n", + "Vab=100*volt_per_unit_length #in V \n", + "I=Vab/Rab #Ohm's Law\n", + "Vr1=Vb1-Vab #KVL \n", + "R1=Vr1/I \n", + "\n", + "#At 94.3cm\n", + "Vx=94.3*volt_per_unit_length\n", + "\n", + "#Worst case: Terminal voltage of B2 or B1 may be reversed\n", + "#Total voltage producing current flow through standard cell is\n", + "\n", + "Vt=Vb2+Vb1\n", + "R2=Vt/(20*10**-6) #Value of resistance R2 to limit standard cell current to a maximum of 20 micro ampere\n", + "\n", + "\n", + "print \"When the potentiometer is calibrated, I=\",I*10**3,\"mA\"\n", + "print \"R1=\",R1,\"ohm\"\n", + "\n", + "print \n", + "print \"Vx=\",round(Vx,3),\"V\"\n", + "print \n", + "print \"The value of R2 to limit standard cell current to 20 micro ampere is \",int(R2*10**-3),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 12-5, Page Number: 367" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The instrument can measure a maximum of 1.6 V\n", + "Instrument resolution=± 0.2 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "R3=509.5 #in ohm\n", + "R4=290.5 #in ohm\n", + "R13=100 #in ohm\n", + "l=100 #in cm\n", + "Vb2=1.0190 #in V(Standard Cell Voltage)\n", + "\n", + "Vr3=Vb2 \n", + "I1=Vb2/R3 #Ohm's Law \n", + " \n", + "#Maximum measurable voltage:\n", + "Vae=I1*(R3+R4) #Maximum measurable voltage in V\n", + "\n", + "#Resolution\n", + "I2=Vae/(8*R13) #in A \n", + "\n", + "Vab=I2*R13\n", + "slidewire_vper_length=Vab/l #in V/mm\n", + "\n", + "instrument_resolution=slidewire_vper_length*1 #As contact can be read within 1 mm, 1 is multiplied\n", + "\n", + "print \"The instrument can measure a maximum of\",Vae,\"V\"\n", + "print \"Instrument resolution=±\",instrument_resolution*10**2,\"mV\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb new file mode 100644 index 00000000..6d83b13e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter12_1.ipynb @@ -0,0 +1,301 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 12: INSTRUMENT CALIBRATION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-1, Page Number: 355" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When scale reading is 10 V and precise voltage is 9.5 V,\n", + "Error=- -5.0 % of reading= -0.5 % of full scale\n", + "\n", + "When scale reading is 50 V and precise voltage is 51.7 V,\n", + "Error= + 3.4 % of reading= + 1.7 % of full scale\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#For Scale reading =10 V, and precise voltage=9.5 V\n", + "scale_reading=10 #Scale reading is 10 V\n", + "\n", + "precise_reading=9.5 #Precise voltage is 9.5 V\n", + "\n", + "error=(precise_reading-scale_reading)/scale_reading*100 #Error in percentage form w.r.t reading\n", + "\n", + "error_fullscale=(precise_reading-scale_reading)*100/100 #Error with respect to full scale \n", + "\n", + "\n", + "print \"When scale reading is 10 V and precise voltage is 9.5 V,\"\n", + "print \"Error=-\",round(error,1),\"% of reading=\",error_fullscale, \"% of full scale\"\n", + "\n", + "print \n", + "#For Scale reading =50 V, and precise voltage=51.7 V\n", + "scale_reading=50 #Scale reading is 50 V\n", + "precise_reading=51.7 #Precise voltage is 51.7 V\n", + "error=(precise_reading-scale_reading)/scale_reading*100 #Error in percentage form \n", + "error_fullscale=(precise_reading-scale_reading)*100/100\n", + "\n", + "print \"When scale reading is 50 V and precise voltage is 51.7 V,\"\n", + "print \"Error= +\",round(error,1),\"% of reading= +\",error_fullscale, \"% of full scale\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-2, Page Number: 357" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Correction figure= -6 W\n", + "Error= -5 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=114 #Measured Voltage in V\n", + "I=1 #Measured Current in A\n", + "W=120 #Full Scale wattage in W\n", + "\n", + "P=V*I #Wattmeter Power\n", + "error=P-W #Correction figure\n", + "print \"Correction figure=\",error,\"W\"\n", + "\n", + "error=error*100/W #Error %\n", + "\n", + "print \"Error=\",error,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12-3, Page Number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore Vo= 5 V ± 700.0 micro volt\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "R4=1125.0\n", + "R5=4017.9\n", + "Vz=6.4\n", + "accuracy=100.0/10**6 #100ppm\n", + "\n", + "#Calculation\n", + "#Maximum and Minimum values of resistances in ohm\n", + "R4max=R4*(1+accuracy) \n", + "R4min=R4*(1-accuracy)\n", + "R5max=R5*(1+accuracy)\n", + "R5min=R5*(1-accuracy)\n", + "\n", + "#Maximum and minimum zener voltages in V\n", + "Vzmax=Vz+Vz*0.01/100 #Maximum voltage is Vz+0.01% of Vz\n", + "Vzmin=Vz-Vz*0.01/100 #Minimum voltage is Vz-0.01% of Vz\n", + "\n", + "#Maximum and minimum output voltages in V\n", + "Vomax=Vzmax*(R5max/(R4min+R5max)) #Output is maximum when Vz is maximum, R5 is minimum and R4 is maximum\n", + "Vomin=Vzmin*(R5min/(R4max+R5min)) #Output is minimum when Vzi mimimum, R5 is maximum and R4 is minimum\n", + "Vo=Vz*(R5/(R4+R5))\n", + "\n", + "error=round(Vomax-Vo,4) #Deviation of output voltage from theoretical value \n", + "\n", + "#Result\n", + "print \"Therefore Vo=\",int(Vo),\"V ±\",error*10**6,\"micro volt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 12-4, Page Number: 364" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When the potentiometer is calibrated, I= 20.0 mA\n", + "R1= 50.0 ohm\n", + "\n", + "Vx= 1.886 V\n", + "\n", + "The value of R2 to limit standard cell current to 20 micro ampere is 200 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Rab=100 #Resistance of wire AB, in ohm\n", + "Vb1=3 #Battery B1, terminal voltage(V)\n", + "Vb2=1.0190 #Standard Cell Voltage(V) \n", + "l=50.95 #Length BC, in cm\n", + "\n", + "#At Calibration\n", + "\n", + "Vbc=Vb2 \n", + "volt_per_unit_length=Vbc/l #in V/cm\n", + "Vab=100*volt_per_unit_length #in V \n", + "I=Vab/Rab #Ohm's Law\n", + "Vr1=Vb1-Vab #KVL \n", + "R1=Vr1/I \n", + "\n", + "#At 94.3cm\n", + "Vx=94.3*volt_per_unit_length\n", + "\n", + "#Worst case: Terminal voltage of B2 or B1 may be reversed\n", + "#Total voltage producing current flow through standard cell is\n", + "\n", + "Vt=Vb2+Vb1\n", + "R2=Vt/(20*10**-6) #Value of resistance R2 to limit standard cell current to a maximum of 20 micro ampere\n", + "\n", + "\n", + "print \"When the potentiometer is calibrated, I=\",I*10**3,\"mA\"\n", + "print \"R1=\",R1,\"ohm\"\n", + "\n", + "print \n", + "print \"Vx=\",round(Vx,3),\"V\"\n", + "print \n", + "print \"The value of R2 to limit standard cell current to 20 micro ampere is \",int(R2*10**-3),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 12-5, Page Number: 367" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The instrument can measure a maximum of 1.6 V\n", + "Instrument resolution=± 0.2 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "R3=509.5 #in ohm\n", + "R4=290.5 #in ohm\n", + "R13=100 #in ohm\n", + "l=100 #in cm\n", + "Vb2=1.0190 #in V(Standard Cell Voltage)\n", + "\n", + "Vr3=Vb2 \n", + "I1=Vb2/R3 #Ohm's Law \n", + " \n", + "#Maximum measurable voltage:\n", + "Vae=I1*(R3+R4) #Maximum measurable voltage in V\n", + "\n", + "#Resolution\n", + "I2=Vae/(8*R13) #in A \n", + "\n", + "Vab=I2*R13\n", + "slidewire_vper_length=Vab/l #in V/mm\n", + "\n", + "instrument_resolution=slidewire_vper_length*1 #As contact can be read within 1 mm, 1 is multiplied\n", + "\n", + "print \"The instrument can measure a maximum of\",Vae,\"V\"\n", + "print \"Instrument resolution=±\",instrument_resolution*10**2,\"mV\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb new file mode 100644 index 00000000..e589bb65 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 16: LABORATORY POWER SUPPLIES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16-1, Page Number: 423" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Source Effect= 50.0 mV\n", + "Line Regulation= 0.42 %\n", + "Load Effect= 100.0 mV\n", + "Load Regulation= 0.83 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#Output voltages at various instances in V\n", + "Eo1=12\n", + "Eo2=11.95\n", + "Eo3=12\n", + "Eo4=11.9\n", + "\n", + "#Calculation\n", + "source_effect=Eo1-Eo2 #Change in output voltage due to 10% change in input\n", + "line_regulation=source_effect*100/Eo1 #percentage\n", + "\n", + "load_effect=Eo3-Eo4 #Change in output voltage due to change in load from no load to minimum load \n", + "load_regulation=load_effect*100/Eo3\n", + "\n", + "#Results\n", + "print \"Source Effect=\",source_effect*10**3,\"mV\"\n", + "print \"Line Regulation=\",round(line_regulation,2),\"%\"\n", + "print \"Load Effect=\",load_effect*10**3,\"mV\"\n", + "print \"Load Regulation=\",round(load_regulation,2),\"%\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16-2, Page Number: 428" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum output voltage= 15.2 V\n", + "Minimum output voltgae= 9.9 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vz=6 #Zener voltage in V\n", + "R2=5.6*10**3 #in ohm\n", + "R3=5.6*10**3 #in ohm\n", + "R4=3*10**3 #in ohm\n", + "\n", + "#Calculation\n", + "\n", + "#When the moving contact is at the botton of R4, \n", + "Vr3=Vz #in V\n", + "I3=Vz/R3 #in A\n", + "Eo=I3*(R2+R3+R4) #in V\n", + "\n", + "print \"Maximum output voltage=\",round(Eo,1),\"V\"\n", + "\n", + "#When the moving contact is at the top of R4\n", + "\n", + "I3=Vz/(R3+R4) #in A\n", + "Eo=I3*(R2+R3+R4) #in V \n", + "\n", + "print \"Minimum output voltgae=\",round(Eo,1),\"V\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb new file mode 100644 index 00000000..e589bb65 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter16_1.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 16: LABORATORY POWER SUPPLIES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16-1, Page Number: 423" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Source Effect= 50.0 mV\n", + "Line Regulation= 0.42 %\n", + "Load Effect= 100.0 mV\n", + "Load Regulation= 0.83 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#Output voltages at various instances in V\n", + "Eo1=12\n", + "Eo2=11.95\n", + "Eo3=12\n", + "Eo4=11.9\n", + "\n", + "#Calculation\n", + "source_effect=Eo1-Eo2 #Change in output voltage due to 10% change in input\n", + "line_regulation=source_effect*100/Eo1 #percentage\n", + "\n", + "load_effect=Eo3-Eo4 #Change in output voltage due to change in load from no load to minimum load \n", + "load_regulation=load_effect*100/Eo3\n", + "\n", + "#Results\n", + "print \"Source Effect=\",source_effect*10**3,\"mV\"\n", + "print \"Line Regulation=\",round(line_regulation,2),\"%\"\n", + "print \"Load Effect=\",load_effect*10**3,\"mV\"\n", + "print \"Load Regulation=\",round(load_regulation,2),\"%\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16-2, Page Number: 428" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum output voltage= 15.2 V\n", + "Minimum output voltgae= 9.9 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vz=6 #Zener voltage in V\n", + "R2=5.6*10**3 #in ohm\n", + "R3=5.6*10**3 #in ohm\n", + "R4=3*10**3 #in ohm\n", + "\n", + "#Calculation\n", + "\n", + "#When the moving contact is at the botton of R4, \n", + "Vr3=Vz #in V\n", + "I3=Vz/R3 #in A\n", + "Eo=I3*(R2+R3+R4) #in V\n", + "\n", + "print \"Maximum output voltage=\",round(Eo,1),\"V\"\n", + "\n", + "#When the moving contact is at the top of R4\n", + "\n", + "I3=Vz/(R3+R4) #in A\n", + "Eo=I3*(R2+R3+R4) #in V \n", + "\n", + "print \"Minimum output voltgae=\",round(Eo,1),\"V\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb new file mode 100644 index 00000000..fba4d6b9 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter1_1.ipynb @@ -0,0 +1,159 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 1: UNITS, DIMENSIONS AND STANDARDS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-1, Page Number: 8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Magenetic Flux = 5.0 micro weber\n", + "Cross Section= 6.45e-04 meter square\n", + "Flux Density(B)= 7.75 mT\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "phi=500*10**-8 #in weber\n", + "A=(1*1)*(2.54*10**-2)**2 #in meter square \n", + "\n", + "#Calculation\n", + "B=phi/A #in tesla \n", + "\n", + "#Results\n", + "print \"Total Magenetic Flux =\",phi*10**6,\"micro weber\"\n", + "print \"Cross Section=\",'%.2e' % A,\"meter square\"\n", + "print \"Flux Density(B)=\",round(B*10**3,2),\"mT\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-2, Page Number: 8" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Celsius Temperature= 37.0 degree celsisus\n", + "Kelvin Temperature= 310.15 K\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "F=98.6 #Temperature =98.6 Farenheit \n", + "\n", + "#Calculations\n", + "\n", + "Celsius_temperature=(F-32)/1.8 #in Celsius\n", + " \n", + "Kelvin_temperature=(F-32)/1.8+273.15 #in Kelvin\n", + "\n", + "#Results\n", + "print \"Celsius Temperature=\",Celsius_temperature,\"degree celsisus\"\n", + "print \"Kelvin Temperature=\",round(Kelvin_temperature,2),\"K\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-3, Page Number: 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dimensions of Voltage and Resistance are expressed in array format[M L T I],\n", + "Voltage= [ 1 2 -3 -1]\n", + "Resistance= [ 1 2 -3 -2]\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "\n", + "# Powers of M, L,T,I are expressed in an array consisting of four elements\n", + "#Each array element represents the power of the corresponding dimension\n", + "#it is of the form [M,L,T,I]\n", + "\n", + "\n", + "P=np.array([1,2,-3,0]) #Dimesnion of Power\n", + "I=np.array([0,0,0,1]) #Dimension of Current\n", + "\n", + "E=P-I #As E=P/I, the powers have to be subtracted\n", + "\n", + "R=E-I #As R=E/I, the powers have to be subtracted\n", + "\n", + "print \"The dimensions of Voltage and Resistance are expressed in array format[M L T I],\"\n", + "print \"Voltage=\",E\n", + "print \"Resistance=\",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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb new file mode 100644 index 00000000..6bbb77b6 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2.ipynb @@ -0,0 +1,365 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 2: MEASUREMENT ERRORS \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-1, Page Number: 16" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tolerance of the resistance= ± 5 %\n", + "Maximum Resistance at 75 degree celsius= 1.2915 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "#Resistance Values at 25 degree Celsius\n", + "rmax25=1.26*10**3 #in ohm\n", + "rmin25=1.14*10**3 #in ohm\n", + "r=1.2*10**3 #in ohm\n", + "ppm=500.0/1000000 \n", + "\n", + "#Calculations\n", + "\n", + "absolute_error=rmax25-r #in ohm \n", + "\n", + "#Tolerance value in percentage\n", + "tolerance=absolute_error/r*100 #percentage\n", + "\n", + "#Resistance per degree Celsius\n", + "rperc=rmax25*ppm\n", + "\n", + "\n", + "#To Calculate ressistance at 75 degree celsius\n", + "\n", + "dT=75-25 #degree celsius\n", + "\n", + "dR=rperc*dT #in ohm \n", + "\n", + "#Maximum resistance at 75 degree celsius\n", + "\n", + "rmax75=rmax25+dR #in ohm \n", + "\n", + "\n", + "#Results\n", + "print 'Tolerance of the resistance= ±',int(tolerance),'%'\n", + "print 'Maximum Resistance at 75 degree celsius=',round(rmax75/1000,4),'kilo ohm'\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 2-2, Page Number: 20\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum percentage error= 2.8 %\n", + "V=( 180 V ± 2.8 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "V1=100 #in V \n", + "V2=80 #in V\n", + "p1=1.0/100 #Percentage error of V1\n", + "p2=5.0/100 #Percentage error of V2\n", + "\n", + "\n", + "#Calculations\n", + "V1max=V1+V1*p1 #in V\n", + "V2max=V2+V2*p2 #in V \n", + "\n", + "\n", + "Emax=V1max+V2max #in V\n", + "E=V1+V2 #in V\n", + "\n", + "p=100*(Emax-E)/E #Percentage\n", + "\n", + "#Results\n", + "print 'Maximum percentage error=',round(p,1),'%'\n", + "print 'V=(',E,'V ±',round(p,1),'%)'\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-3, Page Number: 22" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum percentage error= ± 25 %\n", + "Voltage=( 20 V ± 25 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "V1=100 #in V \n", + "V2=80 #in V \n", + "p1=1.0/100 #Percentage error of V1\n", + "p2=5.0/100 #Percentage error of V2\n", + "\n", + "\n", + "#Calculations\n", + "E=V1-V2 #in V\n", + "V1max=V1+V1*p1 #in V \n", + "V2min=V2-V2*p2 #in V\n", + "Emax=V1max-V2min #in V\n", + "\n", + "p=100*(Emax-E)/E #percentage\n", + "\n", + "#Results\n", + "print 'Maximum percentage error= ±',int(p),'%'\n", + "print 'Voltage=(',E,'V ±',int(p), '%)'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-4, Page Number: 23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power= 82 mW\n", + "Percentage error in power= ± 20 %\n", + "Power=( 82 mW ± 20 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "r=820 #Resistance(ohm)\n", + "r_accuracy=10.0/100 #Accuracy of r in percentage\n", + "I=10*10**(-3) #Current(A)\n", + "I_accuracy=2.0/100 #Accuracy of I at Full scale in percentage\n", + "Imax=25*10**(-3) #Full scale current(A)\n", + "\n", + "#Calculations\n", + "power=r*(I**2) #in Watt\n", + "\n", + "I_error=I_accuracy*Imax\n", + "\n", + "I_error_percentage=100*I_error/(10*10**(-3))\n", + "\n", + "Isquare_error=2*I_error_percentage\n", + "\n", + "p_error=Isquare_error+(r_accuracy*100) \n", + "\n", + "\n", + "#Results\n", + "print 'Power=',int(power*1000),' mW'\n", + "print 'Percentage error in power= ±',int(p_error), '%'\n", + "print 'Power=(',int(power*1000),'mW ±',int(p_error),'%)'\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-5, Page Number: 25" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average Deviation= 0.0012 volt\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "V=[1.001,1.002,0.999,0.998,1.000] #Voltage readings\n", + "v_average=0.0 #Variable to hold average value\n", + "d=[0]*5 #Array of 5 elements to hold deviation\n", + "D_average=0.0 #Variable to hold average deviation\n", + "\n", + "#Calculation\n", + "#To find average\n", + "for i in range(0,5):\n", + " v_average=v_average+V[i]\n", + " \n", + "v_average=v_average/5.0\n", + "\n", + "#To find deviations\n", + "for i in range(0,5):\n", + " d[i]=V[i]-v_average\n", + "\n", + "#To find mean deviation \n", + "for i in range(0,5):\n", + " D_average=D_average+math.fabs(d[i])\n", + "\n", + "D_average=D_average/5\n", + "\n", + "print 'Average Deviation=',round(D_average,5),'volt'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-6, Page Number: 26" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Standard Deviation= 0.0014 V\n", + "Probable Error= 0.94 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=[1.001,1.002,0.999,0.998,1.000] #Voltage readings in V expressed as an array\n", + "v_average=0.0 #Variable to hold average value\n", + "d=[0]*5 #Array of 5 elements to hold deviation\n", + "D_average=0.0 #Variable to hold average deviation\n", + "std_deviation=0.0\n", + "\n", + "#Calculation\n", + "\n", + "#To find average\n", + "for i in range(0,5):\n", + " v_average=v_average+V[i]\n", + " \n", + "v_average=v_average/5.0\n", + "\n", + "#To find deviations\n", + "for i in range(0,5):\n", + " d[i]=V[i]-v_average\n", + "\n", + "#To find standard deviation \n", + "for i in range(0,5):\n", + " std_deviation=std_deviation+d[i]**2\n", + "\n", + "std_deviation=math.sqrt(std_deviation/5)\n", + "\n", + "probable_error=0.6745*round(std_deviation,4)\n", + "print 'Standard Deviation=',round(std_deviation,4),'V'\n", + "print 'Probable Error=',round(probable_error*1000,2),'mV'" + ] + }, + { + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb new file mode 100644 index 00000000..7b589d8e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter2_1.ipynb @@ -0,0 +1,356 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 2: MEASUREMENT ERRORS \n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-1, Page Number: 16" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tolerance of the resistance= ± 5 %\n", + "Maximum Resistance at 75 degree celsius= 1.2915 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "#Resistance Values at 25 degree Celsius\n", + "rmax25=1.26*10**3 #in ohm\n", + "rmin25=1.14*10**3 #in ohm\n", + "r=1.2*10**3 #in ohm\n", + "ppm=500.0/1000000 \n", + "\n", + "#Calculations\n", + "\n", + "absolute_error=rmax25-r #in ohm \n", + "\n", + "#Tolerance value in percentage\n", + "tolerance=absolute_error/r*100 #percentage\n", + "\n", + "#Resistance per degree Celsius\n", + "rperc=rmax25*ppm\n", + "\n", + "\n", + "#To Calculate ressistance at 75 degree celsius\n", + "\n", + "dT=75-25 #degree celsius\n", + "\n", + "dR=rperc*dT #in ohm \n", + "\n", + "#Maximum resistance at 75 degree celsius\n", + "\n", + "rmax75=rmax25+dR #in ohm \n", + "\n", + "\n", + "#Results\n", + "print 'Tolerance of the resistance= ±',int(tolerance),'%'\n", + "print 'Maximum Resistance at 75 degree celsius=',round(rmax75/1000,4),'kilo ohm'\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 2-2, Page Number: 20\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum percentage error= 2.8 %\n", + "V=( 180 V ± 2.8 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "V1=100 #in V \n", + "V2=80 #in V\n", + "p1=1.0/100 #Percentage error of V1\n", + "p2=5.0/100 #Percentage error of V2\n", + "\n", + "\n", + "#Calculations\n", + "V1max=V1+V1*p1 #in V\n", + "V2max=V2+V2*p2 #in V \n", + "\n", + "\n", + "Emax=V1max+V2max #in V\n", + "E=V1+V2 #in V\n", + "\n", + "p=100*(Emax-E)/E #Percentage\n", + "\n", + "#Results\n", + "print 'Maximum percentage error=',round(p,1),'%'\n", + "print 'V=(',E,'V ±',round(p,1),'%)'\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-3, Page Number: 22" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum percentage error= ± 25 %\n", + "Voltage=( 20 V ± 25 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "V1=100 #in V \n", + "V2=80 #in V \n", + "p1=1.0/100 #Percentage error of V1\n", + "p2=5.0/100 #Percentage error of V2\n", + "\n", + "\n", + "#Calculations\n", + "E=V1-V2 #in V\n", + "V1max=V1+V1*p1 #in V \n", + "V2min=V2-V2*p2 #in V\n", + "Emax=V1max-V2min #in V\n", + "\n", + "p=100*(Emax-E)/E #percentage\n", + "\n", + "#Results\n", + "print 'Maximum percentage error= ±',int(p),'%'\n", + "print 'Voltage=(',E,'V ±',int(p), '%)'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-4, Page Number: 23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power= 82 mW\n", + "Percentage error in power= ± 20 %\n", + "Power=( 82 mW ± 20 %)\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "r=820 #Resistance(ohm)\n", + "r_accuracy=10.0/100 #Accuracy of r in percentage\n", + "I=10*10**(-3) #Current(A)\n", + "I_accuracy=2.0/100 #Accuracy of I at Full scale in percentage\n", + "Imax=25*10**(-3) #Full scale current(A)\n", + "\n", + "#Calculations\n", + "power=r*(I**2) #in Watt\n", + "\n", + "I_error=I_accuracy*Imax\n", + "\n", + "I_error_percentage=100*I_error/(10*10**(-3))\n", + "\n", + "Isquare_error=2*I_error_percentage\n", + "\n", + "p_error=Isquare_error+(r_accuracy*100) \n", + "\n", + "\n", + "#Results\n", + "print 'Power=',int(power*1000),' mW'\n", + "print 'Percentage error in power= ±',int(p_error), '%'\n", + "print 'Power=(',int(power*1000),'mW ±',int(p_error),'%)'\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-5, Page Number: 25" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average Deviation= 0.0012 volt\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "V=[1.001,1.002,0.999,0.998,1.000] #Voltage readings\n", + "v_average=0.0 #Variable to hold average value\n", + "d=[0]*5 #Array of 5 elements to hold deviation\n", + "D_average=0.0 #Variable to hold average deviation\n", + "\n", + "#Calculation\n", + "#To find average\n", + "for i in range(0,5):\n", + " v_average=v_average+V[i]\n", + " \n", + "v_average=v_average/5.0\n", + "\n", + "#To find deviations\n", + "for i in range(0,5):\n", + " d[i]=V[i]-v_average\n", + "\n", + "#To find mean deviation \n", + "for i in range(0,5):\n", + " D_average=D_average+math.fabs(d[i])\n", + "\n", + "D_average=D_average/5\n", + "\n", + "print 'Average Deviation=',round(D_average,5),'volt'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2-6, Page Number: 26" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Standard Deviation= 0.0014 V\n", + "Probable Error= 0.94 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=[1.001,1.002,0.999,0.998,1.000] #Voltage readings in V expressed as an array\n", + "v_average=0.0 #Variable to hold average value\n", + "d=[0]*5 #Array of 5 elements to hold deviation\n", + "D_average=0.0 #Variable to hold average deviation\n", + "std_deviation=0.0\n", + "\n", + "#Calculation\n", + "\n", + "#To find average\n", + "for i in range(0,5):\n", + " v_average=v_average+V[i]\n", + " \n", + "v_average=v_average/5.0\n", + "\n", + "#To find deviations\n", + "for i in range(0,5):\n", + " d[i]=V[i]-v_average\n", + "\n", + "#To find standard deviation \n", + "for i in range(0,5):\n", + " std_deviation=std_deviation+d[i]**2\n", + "\n", + "std_deviation=math.sqrt(std_deviation/5)\n", + "\n", + "probable_error=0.6745*round(std_deviation,4)\n", + "print 'Standard Deviation=',round(std_deviation,4),'V'\n", + "print 'Probable Error=',round(probable_error*1000,2),'mV'" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb new file mode 100644 index 00000000..1ef87929 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3.ipynb @@ -0,0 +1,1573 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 3: ELECTROMECHANICAL INSTRUMENTS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3-1, Page Number: 37" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Torque= 3e-06 N.m\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "N=100\n", + "B=0.2 #in Tesla\n", + "D=1*10**-2 #in m\n", + "l=1.5*10**-2 #in m\n", + "I=1*10**-3 #in A\n", + "\n", + "#Calculation of torque\n", + "\n", + "Td=B*l*I*N*D #Torque equation\n", + "\n", + "#Result\n", + "print \"Torque=\",Td,\" N.m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-2, Page Number: 39" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Sensitivity= 1 mV/mm\n", + "Megaohm Sensitivity= 1 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "current_sensitivity=1*10**-6 #in A/mm\n", + "damping_resistance=1*10**3 #in ohm\n", + "\n", + "#Voltage sensitivity\n", + "voltage_sensitivity=damping_resistance*current_sensitivity\n", + "\n", + "#Megaohm sensitivity\n", + "\n", + "megaohm_sensitivity=1/current_sensitivity\n", + "\n", + "#Results\n", + "print \"Voltage Sensitivity=\",int(voltage_sensitivity*1000),\" mV/mm\"\n", + "print \"Megaohm Sensitivity=\",int(megaohm_sensitivity/10**6),\"mega ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-3, Page Number: 41" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At FSD,\n", + "Meter Voltage= 9.9 mV\n", + "Meter Current= 0.1 mA\n", + "Shunt Current= 9.9 mA\n", + "Total Current= 10.0 mA\n", + " \n", + "At 0.5 FSD,\n", + "Meter Voltage= 4.95 mV\n", + "Meter Current= 0.05 mA\n", + "Shunt Current= 4.95 mA\n", + "Total Current= 5.0 mA\n", + " \n", + "At 0.25 FSD,\n", + "Meter Voltage= 2.475 mV\n", + "Meter Current= 0.025 mA\n", + "Shunt Current= 2.475 mA\n", + "Total Current= 2.5 mA\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Rm=99 #Coil resistance in ohm\n", + "Im1=0.1*10**-3 #FSD current in A\n", + "Rs=1 #Shunt resistance in ohm\n", + "\n", + "#Calculation\n", + "\n", + "#At FSD\n", + "\n", + "Vm1=Im1*Rm #Meter Voltage\n", + "Is1=Vm1/Rs\n", + "It1=Is1+Im1 #Total Current\n", + "\n", + "#At 0.5 FSD\n", + "Im2=0.5*Im1 #0.5 FSD current\n", + "Vm2=Im2*Rm #Meter Voltage\n", + "Is2=Vm2/Rs #Shunt current\n", + "It2=Im2+Is2 #Total current\n", + "\n", + "\n", + "#At 0.25 FSD\n", + "Im3=0.25*Im1 #0.25 FSD current\n", + "Vm3=Im3*Rm #Meter Voltage\n", + "Is3=Vm3/Rs #Shunt current\n", + "It3=Im3+Is3 #Total current\n", + "\n", + "#Results\n", + "print \"At FSD,\"\n", + "print \"Meter Voltage=\",round(Vm1*1000,1),\" mV\"\n", + "print \"Meter Current=\",round(Im1*1000,1),\" mA\"\n", + "print \"Shunt Current=\",round(Is1*1000,1),\" mA\"\n", + "print \"Total Current=\",round(It1*1000,1),\"mA\"\n", + "\n", + "print \" \"\n", + "print \"At 0.5 FSD,\"\n", + "print \"Meter Voltage=\",round(Vm2*1000,2),\" mV\"\n", + "print \"Meter Current=\",round(Im2*1000,2),\" mA\"\n", + "print \"Shunt Current=\",round(Is2*1000,2),\" mA\"\n", + "print \"Total Current=\",round(It2*1000,2),\" mA\"\n", + "\n", + "print \" \"\n", + "print \"At 0.25 FSD,\"\n", + "print \"Meter Voltage=\",round(Vm3*1000,3),\" mV\"\n", + "print \"Meter Current=\",round(Im3*1000,3),\" mA\"\n", + "print \"Shunt Current=\",round(Is3*1000,3),\" mA\"\n", + "print \"Total Current=\",round(It3*1000,1),\" mA\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-4, Page Number: 43" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For FSD=100mA,\n", + "Shunt Resistance= 1.001 ohm\n", + "For FSD=1A,\n", + "Shunt Resistance= 0.10001 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "Im=100*10**-6 #FSD Current in A\n", + "Rm=1*10**3 #Coil Resistance \n", + "I1=100*10**-3 #Required FSD current\n", + "I2=1 #Required FSD current\n", + "\n", + "#Calculation\n", + "\n", + "#FSD=100mA\n", + "Vm1=Im*Rm #Meter Voltage\n", + "Is1=I1-Im #Shunt Current\n", + "Rs1=Vm1/Is1 #Shunt Resistance\n", + "\n", + "#FSD=1A\n", + "Vm2=Im*Rm #Meter Voltage\n", + "Is2=I2-Im #Shunt Current\n", + "Rs2=Vm2/Is2 #Shunt Resistance\n", + "\n", + "#Results\n", + "print \"For FSD=100mA,\"\n", + "print \"Shunt Resistance=\",round(Rs1,3),\" ohm\"\n", + "\n", + "print \"For FSD=1A,\"\n", + "print \"Shunt Resistance=\",round(Rs2,5),\" ohm\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-5, Page Number: 45" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When switch is at B, Ammeter Range= 10 mA\n", + "When switch is at C, Ammeter Range= 100 mA\n", + "When switch is at D, Ammeter Range= 1 A\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "R1=0.05 #in ohm\n", + "R2=0.45 #in ohm\n", + "R3=4.5 #in ohm\n", + "Rm=1*10**3 #in ohm\n", + "Im=50*10**-6 #in A\n", + "\n", + "#Calculation\n", + "\n", + "#Switch at contact B\n", + "Vs1=Im*Rm\n", + "Is1=Vs1/(R1+R2+R3)\n", + "It1=Im+Is1\n", + "\n", + "#Switch at contact C\n", + "\n", + "Vs2=Im*(Rm+R3)\n", + "Is2=Vs2/(R1+R2)\n", + "It2=Im+Is2\n", + "\n", + "#Swithc at contact D\n", + "\n", + "Vs3=Im*(Rm+R3+R2)\n", + "Is3=Vs3/R1\n", + "It3=Im+Is3\n", + "\n", + "#Results\n", + "print \"When switch is at B, Ammeter Range=\",int(It1*1000),\" mA\"\n", + "print \"When switch is at C, Ammeter Range=\",int(It2*1000),\" mA\"\n", + "print \"When switch is at D, Ammeter Range=\",int(It3),\" A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-6, Page Number:47" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For 50V at full scale, multiplier resistance should be 499 kilo ohm\n", + "When instrument reads 0.8 FSD, applied voltage is 40 volt\n", + "When instrument reads 0.5 FSD, applied voltage is 25 volt\n", + "When instrument reads 0.2 FSD, applied voltage is 10 volt\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Im=100*10**-6 #in A\n", + "Rm=1*10**3 #in ohm\n", + "V=50 #in V \n", + "\n", + "#Calculations\n", + "\n", + "Rs=V/Im-Rm #in ohm \n", + "\n", + "#At 0.8 FSD\n", + "\n", + "Im1=0.8*Im #in A\n", + "V1=Im1*(Rs+Rm) #in V \n", + "\n", + "#At 0.5 FSD\n", + "Im2=0.5*Im #in A \n", + "V2=Im2*(Rs+Rm) #in V \n", + "\n", + "#At 0.2 FSD\n", + "Im3=0.2*Im #in A\n", + "V3=Im3*(Rs+Rm) #in V\n", + "\n", + "#Results\n", + "\n", + "print \"For 50V at full scale, multiplier resistance should be\",int(Rs/1000),\" kilo ohm\"\n", + "print \"When instrument reads 0.8 FSD, applied voltage is\",int(V1),\" volt\"\n", + "print \"When instrument reads 0.5 FSD, applied voltage is\",int(V2),\" volt\"\n", + "print \"When instrument reads 0.2 FSD, applied voltage is\",int(V3),\" volt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-7, Page Number: 49" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Circuit 1,\n", + "R1= 198.3 kilo ohm\n", + "R2= 998.3 kilo ohm\n", + "R3= 1.9983 mega ohm\n", + " \n", + "For Circuit 2,\n", + "R1= 198.3 kilo ohm\n", + "R2= 800 kilo ohm\n", + "R3= 1.0 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable declaration\n", + "\n", + "Im=50*10**-6 #FSD current in A\n", + "Rm=1700 #Coil resistance in ohm\n", + "V1=10 #Required range in V\n", + "V2=50 #Required range in V\n", + "V3=100 #Required range in V\n", + "\n", + "#For Circuit 1\n", + "R11=V1/Im-Rm\n", + "R12=V2/Im-Rm\n", + "R13=V3/Im-Rm\n", + "\n", + "#For Circuit 2\n", + "R21=V1/Im-Rm\n", + "R22=V2/Im-R21-Rm\n", + "R23=V3/Im-R22-R21-Rm\n", + "\n", + "#Results\n", + "\n", + "print \"For Circuit 1,\"\n", + "print \"R1=\",round(R11/1000,1),\"kilo ohm\"\n", + "print \"R2=\",round(R12/1000,1),\"kilo ohm\"\n", + "print \"R3=\",round(R13/10**6,4),\"mega ohm\"\n", + "\n", + "print \" \"\n", + "print \"For Circuit 2,\"\n", + "print \"R1=\",round(R21/1000,1),\"kilo ohm\"\n", + "print \"R2=\",int(R22/1000),\"kilo ohm\"\n", + "print \"R3=\",round(R23/10**6,4),\"mega ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3-8, Page Number: 53" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Multiplier Resistance= 890.7 kilo ohm\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4XEW1t98fYZ4CCZCEQNJhjIwqCKICB0QvAoIiijgB\n", + "jp8TzgpOxKuiqNfh6lWvKJMIiKAMV0BwOIiCIjLPBOiMJEASSBgTyPr+qOpkp9PdZ3f3nrve5+nn\n", + "9N69u/bqdWrXqlpVtZbMjEAgEAgEmlkjbwECgUAgUEyCgQgEAoFAS4KBCAQCgUBLgoEIBAKBQEuC\n", + "gQgEAoFAS4KBCAQCgUBLgoGoIJJOknRa5PiNkmZJWizpxZLukLRfj2XXJb06OWmTQ9I4SX/1v/Pb\n", + "ecsTCJSdYCAyxDeuT0taImmepF9K2rjPMockzYqeM7NvmNn7Iqe+A3zIzDY2s1vMbBcz+2uPtzT/\n", + "KiLvBx7xv/MzeQtTVHydWe7r4WJJ90g6zn9W85/d1PSdzSQtlfRQ5Fxd0nOSxjZde7MvY1Lk3F6S\n", + "Lpe0SNICSf9s3LMH+euSDoz5+xqvS/xnO0u6ysuwSNKNkl7X5nuzJP1a0p69yFkFgoHIFgMOM7ON\n", + "gN2BXYEvpnlDSQImAXeleZ+CMBm4u5cvSlozYVl6IkM55pjZRma2MfA54DRJUyOfrydp58jx24AH\n", + "WbVzYP7cMY0TknYF1oteJ2kf4E/AX4BtzWws8EHg4B5lN0AjXNP4fY3XEf78ZcAfgHHAFsAJwOJW\n", + "3wNeDtwDXNvJIFUaMwuvjF7AQ8CBkeNvAb+PHL8cuA5YBNwC7B/5bAxwBjAHWAj8FlgfeAZ4AViC\n", + "q+gTgGnAL4G1gSeB5f7v/b6sOvBq/17AicB04DHg18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kGIhAIBAItOT/A7LrqjCnY2DGAAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "%matplotlib inline\n", + "## Variable Declaration\n", + "\n", + "I=100*10**-6 #Full Scale Current in A\n", + "Rm=1*10**3 #Coil Resistance in ohm\n", + "Vrms=100 #FSD rms voltage in V \n", + "Vf=0.7 #Diode voltage\n", + "\n", + "\n", + "#At FSD, the average current flowing through PMMC is\n", + "Iavg=I\n", + "Im=round(Iavg/0.637,6)\n", + "\n", + "\n", + "rectifier_voltage_drops=2*Vf\n", + "peak_voltage=1.414*Vrms\n", + "Rs=(peak_voltage-rectifier_voltage_drops)/Im-Rm\n", + "\n", + "#To plot rectified waveform used by the voltmeter at FSD\n", + "t=np.arange(0.01,1.0,0.01) #Time Axis \n", + "x=np.zeros(99)\n", + "N=0\n", + "while(N<99):\n", + " x[N]=(peak_voltage-2*Vf)*math.fabs(math.sin(2*math.pi*N*2/100))\n", + " N=N+1\n", + "\n", + "plt.plot(t,x) #Full wave rectified sine wave\n", + "plt.plot(t,(peak_voltage-2*Vf)*t/t,'--',label='Vm') #Peak Voltage Marker\n", + "plt.plot(t,(Vrms-0.707*2*Vf)*t/t,'--',label='Vrms') #RMS Voltage Marker\n", + "plt.plot(t,(peak_voltage-2*Vf)*0.637*t/t,'--',label='Vavg') #Average Voltage Marker\n", + "legend = plt.legend(loc='lower right')\n", + "plt.xlabel('Time(second)')\n", + "plt.ylabel('Input Voltage(V)')\n", + "plt.title('Rectified waveform across PMMC at FSD')\n", + "\n", + "#Results\n", + "print \"Multiplier Resistance=\",round(Rs/1000,1), \"kilo ohm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3-9, Page Number: 53\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When input is 75 V(rms), meter reading is 0.75 FSD\n", + "When input is 50 V(rms), meter reading is 0.5 FSD\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration \n", + "#Data from Example 3-7\n", + "Rs=890*10**3 #in ohm \n", + "Rm=1*10**3 #in ohm\n", + "Vrms=100 #in V\n", + "Vf=0.7 #in V\n", + "I=100*10**-6 #in A\n", + "\n", + "#When input=75V (rms)\n", + "Vrms1=75\n", + "Im1=(1.414*Vrms1-2*Vf)/(Rs+Rm)\n", + "Iavg1=0.637*Im1\n", + "p1=Iavg1/I\n", + "\n", + "#When input=50V (rms)\n", + "\n", + "Vrms2=50\n", + "Im2=(1.414*Vrms2-2*Vf)/(Rs+Rm)\n", + "Iavg2=0.637*Im2\n", + "p2=Iavg2/I\n", + "\n", + "#Results\n", + "\n", + "print \"When input is 75 V(rms), meter reading is\",round(p1,2),\" FSD\"\n", + "print \"When input is 50 V(rms), meter reading is\",round(p2,2),\" FSD\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-10, Page Number: 54" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sensitivity of the voltmeter described in example 3-8 is, 9 kilo ohm/V\n" + ] + } + ], + "source": [ + "import math \n", + "#Variable Declaration\n", + "#From Example 3-8\n", + "Im=157*10**-6 #Maximum Current(A)\n", + "Vrms=100 #Maximum rms voltage(V)\n", + "\n", + "#Calculation\n", + "\n", + "Irms=0.707*Im #Property of sinusoid \n", + "R=Vrms/Irms #Ohm's Law\n", + "sensitivity=R/Vrms\n", + "\n", + "print \"The sensitivity of the voltmeter described in example 3-8 is,\",int(sensitivity/1000),\"kilo ohm/V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-11, Page Number: 55" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Rsh is 778 ohm\n", + "The value of Rs is 139.5 kilo ohm\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXnYXEWV/z/fBBBIwIAsIUBIIAECgizKLgRRiTCCOigi\n", + "4iA6ooL6Q50BnRkJigoj4qgoIoPKjoqg0WEXgoBhCQQIECAJBEIW1pAECJKQ8/ujqpObTne/t/vt\n", + "2/f27fN5nn7eu1TVPbfeqnuqTi1HZobjOI7j9MWAvAVwHMdxugNXGI7jOE4qXGE4juM4qXCF4TiO\n", + "46TCFYbjOI6TClcYjuM4TipcYbQBScdKui1xvq+k6ZIWSzosT9nyRtI1ko5JnJ8u6XlJcyVtGfNI\n", + "LaQ7QtJySYUsw14GnDJSyMrWaSTNknRQ1bVVlECTfBv4iZmtZ2YT+i9hdyBpvKSLk9fM7BAzuzje\n", + "Hw58FdjezIaZ2eyYR2VcDNSTZaBZYplZGhXrAkl3SNor3js2NgrOropzeLz+63heaTzcVxVuI0lv\n", + "SHqy6vonJE2Oz5wbGzX7tiB7n42Wqver/L6eeI/7JS2Mjai/ShpRFW9R/D0m6aeShjYrZztxhRGw\n", + "+GsXw4FH2phex5C0RobJDwdeNLMXM3xGUWi5DEga2GZZWiLjslDBgMvNbD1gY+B24KrE/ZnAR6vy\n", + "5F+Ax1m9zq4jacfE+SeAJ5LhJH0V+BFwOrAJsCXwM6A/vcBGPeQV75f4nSVpFHAhcJKZvRUYGeV4\n", + "syre+sAGwIeBocC9eSoNVxj1WaUwSjpF0oyo7R+W9KFakSTNBLYG/hzDrll1/9OSJiTOp0v6XeJ8\n", + "tqSd4/GPJT0dWyCTJe0Xrw+T9JqkDRLxdo2tlIHx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+ "jO84bcFNUk6vksaZ0mPAxnHrZyStKWmHeO8pYGi8PggYYmbXAl8l+JkAuAH48ooHSpXrNwInJK4P\n", + "IZiQDogzvAYCHwdu7UO+O2I4gKOr7m0WZXSctuEKw+kFLPG31jGs3hq36BP6COBMSfcDU4C94/3b\n", + "gXfG4/WBP8ftsm8DTorXvwy8Mw5sPwwcH6+fDmwQB7fvB8aa2XzgFOAW4H5gspn9uYZsSbm/Apwg\n", + "6UFgWFW4PQjjHY7TNnx7c8dpAUmDCWMO78pbllrEMZCzzGxK3rI45cF7GI7TAmb2CmF204F5y1JN\n", + "nHY7xJWF0268h+E4juOkwnsYjuM4TipcYTiO4zipcIXhOI7jpMIVhuM4jpMKVxiO4zhOKlxhOI7j\n", + "OKn4/5CFOt6sGQp8AAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "#Variable Declaration\n", + "\n", + "Iav=50*10**-6 #FSD Current (A)\n", + "Rm=1700 #Coil resistance(ohm)\n", + "Imin=100*10**-6 #Minimum forward current (peak)in A\n", + "p=20.0/100.0 #20% FSD at 100 micro amps\n", + "Vrms=50\n", + "Vf=0.7\n", + "#Calculation\n", + "Im=Iav/(0.5*0.637) \n", + "\n", + "\n", + "#At 20% FSD, If must be 100micro amps, hence the current at 100% FSD is\n", + "If_peak=Imin/p\n", + "Ish_peak=If_peak-Im\n", + "Vm_peak=Im*Rm\n", + "Rsh=Vm_peak/Ish_peak\n", + "Rs=(1.414*Vrms-Vm_peak-Vf)/If_peak\n", + "\n", + "\n", + "#Plot of half wave rectified voltage appearing across PMMC instrument\n", + "t=np.arange(0.01,1.0,0.01) #Time Axis\n", + "N=0\n", + "x=np.zeros(99)\n", + "while(N<99):\n", + " if((N<=25)|(N>50)&(N<=75)):\n", + " x[N]=(If_peak-Im)*Rsh*math.sin(2*math.pi*2*N/100)\n", + " else:\n", + " x[N]=0\n", + " N=N+1\n", + "plt.plot(t,x)\n", + "plt.plot(t,(If_peak-Im)*Rsh*t/t,'--',label='Vmax')\n", + "plt.plot(t,0.5*(If_peak-Im)*Rsh*t/t,'--',label='Vrms')\n", + "plt.plot(t,0.318*(If_peak-Im)*Rsh*t/t,'--',label='Vavg')\n", + "plt.xlabel('Time(second)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Half wave rectified waveform across PMMC at FSD')\n", + "legend = plt.legend(loc='lower right')\n", + "\n", + "#Results\n", + "print \"The value of Rsh is\",int(Rsh),\" ohm\"\n", + "print \"The value of Rs is\",round(Rs/1000,1),\" kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-12, Page Number: 58" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required value of Rl is 28.2 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Iav=1*10**-3 #in A\n", + "Rm=1700 #in ohm \n", + "Ns=500 #Secondary windings \n", + "Np=4 #Primary windings \n", + "Vf=0.7 #in V \n", + "Rs=20*10**3 #in ohm \n", + "Ip=250*10**-3 #in A\n", + "\n", + "#Calculation\n", + "Im=Iav/0.637 #Property of sine half wave\n", + "Em=Im*(Rs+Rm)+2*Vf \n", + "Es=0.707*Em\n", + "rms_meter_current=1.11*Iav\n", + "\n", + "#Trasnformer rms secondary current is,\n", + "Is=Ip*Np/Ns\n", + "\n", + "Il=Is-rms_meter_current\n", + "Rl=Es/Il\n", + "\n", + "print \"The required value of Rl is\",round(Rl/1000,1),\" kilo ohm\" \n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-13, Page Number: 59" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At FSD,\n", + "Measured current= 99.0 micro ampere to 101.0 micro ampere\n", + "Error=± 1 % of measured current\n", + " \n", + "At 0.5 FSD,\n", + "Measured current= 49.0 micro ampere to 51.0 micro ampere\n", + "Error= ± 2 % of measured current\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Delcaration\n", + "\n", + "current_fsd=100*10**-6\n", + "accuracy=1.0/100.0\n", + "\n", + "#Calculation\n", + "error_fsd=accuracy*current_fsd\n", + "#At FSD\n", + "indicated_current_fsd=current_fsd\n", + "measured_current_fsd_max=indicated_current_fsd+error_fsd\n", + "measured_current_fsd_min=indicated_current_fsd-error_fsd\n", + "\n", + "\n", + "#At 0.5 FSD\n", + "\n", + "indicated_current=0.5*current_fsd\n", + "measured_current_max=indicated_current+error_fsd\n", + "measured_current_min=indicated_current-error_fsd\n", + "\n", + "error=error_fsd/indicated_current\n", + "\n", + "#Results \n", + "\n", + "print \"At FSD,\"\n", + "print \"Measured current=\",measured_current_fsd_min*10**6,\" micro ampere to\",measured_current_fsd_max*10**6,\" micro ampere\"\n", + "print \"Error=±\",int(accuracy*100),\"% of measured current\"\n", + "\n", + "print \" \"\n", + "print \"At 0.5 FSD,\"\n", + "print \"Measured current=\",measured_current_min*10**6,\" micro ampere to\",measured_current_max*10**6,\" micro ampere\"\n", + "print \"Error= ±\",int(error*100),\"% of measured current\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-14, Page Number: 61" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When Rx=0, the meter indicates 100 micro ampere(FSD)\n", + " \n", + "At 0.5 FSD, Rx= 15 kilo ohm\n", + "At 0.25 FSD, Rx= 45 kilo ohm\n", + "At 0.75 FSD, Rx= 5.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Eb=1.5 #Battery Voltage(V)\n", + "R1=15.0*10**3 #Standard resistance+meter resistance\n", + "\n", + "Im=Eb/R1 #Ohm's Law\n", + "\n", + "#At 0.5 FSD\n", + "Im1=0.5*Im #Current at 0.5 FSD\n", + "Rx1=Eb/Im1-R1 #Resistance measured at 0.5 FSD\n", + "\n", + "#At 0.25 FSD\n", + "Im2=Im/4\n", + "Rx2=Eb/Im2-Rx1 #Resistance measured at 0.25 FSD \n", + "\n", + "#At 0.75 FSD \n", + "Im3=0.75*Im\n", + "Rx3=Eb/Im3-Rx1 #Resistance measured at 0.25 FSD \n", + "\n", + "#Results\n", + "print \"When Rx=0, the meter indicates\",int(Im*10**6),\"micro ampere(FSD)\"\n", + "print \" \"\n", + "print \"At 0.5 FSD, Rx=\",int(Rx1*10**-3),\" kilo ohm\"\n", + "print \"At 0.25 FSD, Rx=\",int(Rx2*10**-3),\" kilo ohm\"\n", + "print \"At 0.75 FSD, Rx=\",round(Rx3*10**-3),\" kilo ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-15, Page Number: 63" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ohmmeter scale reading at 0.5 FSD is, 15 kilo ohm\n", + "With Rx=0 and Eb=1.3V, R2 should be 68.18 ohm\n", + "At 0.5 FSD, with Eb=1.3V, the ohmeter scale reading is, 15 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Eb1=1.5 #Battery Voltage(V)\n", + "R1=15*10**3 #Series resistance as shown in figure(ohm)\n", + "Rm=50 #Coil resistance (ohm)\n", + "R2=50 #Shunt resistance(ohm)\n", + "I_fsd=50*10**-6 #FSD Current(A) \n", + "Eb2=1.3\n", + "\n", + "\n", + "#At 0.5 FSD, with Eb=1.5V\n", + "Im1=0.5*I_fsd\n", + "Vm1=Im1*Rm\n", + "I21=Vm1/R2 #Ohm's Law\n", + "Ib1=I21+Im1 #KCL\n", + "Rx1=Eb1/Ib1-R1 #Unknown resistance value is found \n", + "\n", + "#With Rx=0,Eb=1.3V\n", + "\n", + "Ib2=Eb2/R1 #Total Current \n", + "I22=Ib2-I_fsd #Shunt Current using KCL\n", + "Vm2=I_fsd*Rm #Voltage across meter\n", + "R22=Vm2/I22 #Shunt Resistance value\n", + "\n", + "#At 0.5FSD, Eb=1.3V\n", + "Im3=0.5*I_fsd #Meter Current\n", + "Vm3=Im3*Rm #Voltage across meter using Ohm's Law\n", + "I23=Vm3/R22 #Shunt Current using Ohm's Law \n", + "Ib3=I23+Im3 #Total current using KCL \n", + "Rx2=Eb2/Ib3-R1 #Resitance reading on Ohm scale\n", + "\n", + "#Results\n", + "\n", + "print \"Ohmmeter scale reading at 0.5 FSD is,\",int(Rx1/1000),\"kilo ohm\"\n", + "print \"With Rx=0 and Eb=1.3V, R2 should be\",round(R22,2),\"ohm\"\n", + "print \"At 0.5 FSD, with Eb=1.3V, the ohmeter scale reading is,\",int(Rx2/1000),\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-16, Page Number: 65" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When Rx=0,\n", + "Battery current= 62.516 mA\n", + "Meter current= 37.45 micro ampere\n", + "Full Scale= 0 ohm\n", + " \n", + "When Rx=24,\n", + "Battery Current= 31.254 mA\n", + "Meter Current= 18.72 micro ampere\n", + "As meter current is 0.5 times of full scale.Thus, when Rx=24 ohm it indicates half scale reading\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#From Circuit Diagram\n", + "R1=14 #in ohm\n", + "R2=10 #in ohm \n", + "R3=9.99*10**3 #in ohm \n", + "R4=2.875*10**3 #in ohm\n", + "R5=3.82*10**3 #in ohm \n", + "Eb=1.5 #Battery current\n", + "#Calculation\n", + "\n", + "#When Rx=0, battery current is\n", + "R6=R3+R4+R5 #Series equivalent\n", + "R7=R2*R6/(R2+R6) #Parallel equivalent \n", + "Ib1=Eb/(R1+R7) \n", + "Im1=Ib1*R2/(R2+R6) #Using Current Dividor Rule \n", + "\n", + "#When Rx=24 ohm,\n", + "R8=24 \n", + "Ib2=Eb1/(R8+R1+R7) #From figure\n", + "Im2=Ib2*R2/(R2+R6) #Using Current Dividor Rule\n", + "n=round(Ib2/Ib1,3)\n", + "#Results\n", + "\n", + "print \"When Rx=0,\"\n", + "print \"Battery current=\",round(Ib1*1000,3),\" mA\"\n", + "print \"Meter current=\",round(Im1*10**6,2),\" micro ampere\"\n", + "print \"Full Scale= 0 ohm\"\n", + "\n", + "print \" \"\n", + "print \"When Rx=24,\"\n", + "print \"Battery Current=\",round(Ib2*10**3,3),\"mA\"\n", + "print \"Meter Current=\",round(Im2*10**6,2),\"micro ampere\"\n", + "print \"As meter current is\",n,\"times of full scale.Thus, when Rx=24 ohm it indicates half scale reading\" \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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb new file mode 100644 index 00000000..1ef87929 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter3_1.ipynb @@ -0,0 +1,1573 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 3: ELECTROMECHANICAL INSTRUMENTS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 3-1, Page Number: 37" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Torque= 3e-06 N.m\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "N=100\n", + "B=0.2 #in Tesla\n", + "D=1*10**-2 #in m\n", + "l=1.5*10**-2 #in m\n", + "I=1*10**-3 #in A\n", + "\n", + "#Calculation of torque\n", + "\n", + "Td=B*l*I*N*D #Torque equation\n", + "\n", + "#Result\n", + "print \"Torque=\",Td,\" N.m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-2, Page Number: 39" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Sensitivity= 1 mV/mm\n", + "Megaohm Sensitivity= 1 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "current_sensitivity=1*10**-6 #in A/mm\n", + "damping_resistance=1*10**3 #in ohm\n", + "\n", + "#Voltage sensitivity\n", + "voltage_sensitivity=damping_resistance*current_sensitivity\n", + "\n", + "#Megaohm sensitivity\n", + "\n", + "megaohm_sensitivity=1/current_sensitivity\n", + "\n", + "#Results\n", + "print \"Voltage Sensitivity=\",int(voltage_sensitivity*1000),\" mV/mm\"\n", + "print \"Megaohm Sensitivity=\",int(megaohm_sensitivity/10**6),\"mega ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-3, Page Number: 41" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At FSD,\n", + "Meter Voltage= 9.9 mV\n", + "Meter Current= 0.1 mA\n", + "Shunt Current= 9.9 mA\n", + "Total Current= 10.0 mA\n", + " \n", + "At 0.5 FSD,\n", + "Meter Voltage= 4.95 mV\n", + "Meter Current= 0.05 mA\n", + "Shunt Current= 4.95 mA\n", + "Total Current= 5.0 mA\n", + " \n", + "At 0.25 FSD,\n", + "Meter Voltage= 2.475 mV\n", + "Meter Current= 0.025 mA\n", + "Shunt Current= 2.475 mA\n", + "Total Current= 2.5 mA\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Rm=99 #Coil resistance in ohm\n", + "Im1=0.1*10**-3 #FSD current in A\n", + "Rs=1 #Shunt resistance in ohm\n", + "\n", + "#Calculation\n", + "\n", + "#At FSD\n", + "\n", + "Vm1=Im1*Rm #Meter Voltage\n", + "Is1=Vm1/Rs\n", + "It1=Is1+Im1 #Total Current\n", + "\n", + "#At 0.5 FSD\n", + "Im2=0.5*Im1 #0.5 FSD current\n", + "Vm2=Im2*Rm #Meter Voltage\n", + "Is2=Vm2/Rs #Shunt current\n", + "It2=Im2+Is2 #Total current\n", + "\n", + "\n", + "#At 0.25 FSD\n", + "Im3=0.25*Im1 #0.25 FSD current\n", + "Vm3=Im3*Rm #Meter Voltage\n", + "Is3=Vm3/Rs #Shunt current\n", + "It3=Im3+Is3 #Total current\n", + "\n", + "#Results\n", + "print \"At FSD,\"\n", + "print \"Meter Voltage=\",round(Vm1*1000,1),\" mV\"\n", + "print \"Meter Current=\",round(Im1*1000,1),\" mA\"\n", + "print \"Shunt Current=\",round(Is1*1000,1),\" mA\"\n", + "print \"Total Current=\",round(It1*1000,1),\"mA\"\n", + "\n", + "print \" \"\n", + "print \"At 0.5 FSD,\"\n", + "print \"Meter Voltage=\",round(Vm2*1000,2),\" mV\"\n", + "print \"Meter Current=\",round(Im2*1000,2),\" mA\"\n", + "print \"Shunt Current=\",round(Is2*1000,2),\" mA\"\n", + "print \"Total Current=\",round(It2*1000,2),\" mA\"\n", + "\n", + "print \" \"\n", + "print \"At 0.25 FSD,\"\n", + "print \"Meter Voltage=\",round(Vm3*1000,3),\" mV\"\n", + "print \"Meter Current=\",round(Im3*1000,3),\" mA\"\n", + "print \"Shunt Current=\",round(Is3*1000,3),\" mA\"\n", + "print \"Total Current=\",round(It3*1000,1),\" mA\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-4, Page Number: 43" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For FSD=100mA,\n", + "Shunt Resistance= 1.001 ohm\n", + "For FSD=1A,\n", + "Shunt Resistance= 0.10001 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "Im=100*10**-6 #FSD Current in A\n", + "Rm=1*10**3 #Coil Resistance \n", + "I1=100*10**-3 #Required FSD current\n", + "I2=1 #Required FSD current\n", + "\n", + "#Calculation\n", + "\n", + "#FSD=100mA\n", + "Vm1=Im*Rm #Meter Voltage\n", + "Is1=I1-Im #Shunt Current\n", + "Rs1=Vm1/Is1 #Shunt Resistance\n", + "\n", + "#FSD=1A\n", + "Vm2=Im*Rm #Meter Voltage\n", + "Is2=I2-Im #Shunt Current\n", + "Rs2=Vm2/Is2 #Shunt Resistance\n", + "\n", + "#Results\n", + "print \"For FSD=100mA,\"\n", + "print \"Shunt Resistance=\",round(Rs1,3),\" ohm\"\n", + "\n", + "print \"For FSD=1A,\"\n", + "print \"Shunt Resistance=\",round(Rs2,5),\" ohm\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-5, Page Number: 45" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When switch is at B, Ammeter Range= 10 mA\n", + "When switch is at C, Ammeter Range= 100 mA\n", + "When switch is at D, Ammeter Range= 1 A\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "R1=0.05 #in ohm\n", + "R2=0.45 #in ohm\n", + "R3=4.5 #in ohm\n", + "Rm=1*10**3 #in ohm\n", + "Im=50*10**-6 #in A\n", + "\n", + "#Calculation\n", + "\n", + "#Switch at contact B\n", + "Vs1=Im*Rm\n", + "Is1=Vs1/(R1+R2+R3)\n", + "It1=Im+Is1\n", + "\n", + "#Switch at contact C\n", + "\n", + "Vs2=Im*(Rm+R3)\n", + "Is2=Vs2/(R1+R2)\n", + "It2=Im+Is2\n", + "\n", + "#Swithc at contact D\n", + "\n", + "Vs3=Im*(Rm+R3+R2)\n", + "Is3=Vs3/R1\n", + "It3=Im+Is3\n", + "\n", + "#Results\n", + "print \"When switch is at B, Ammeter Range=\",int(It1*1000),\" mA\"\n", + "print \"When switch is at C, Ammeter Range=\",int(It2*1000),\" mA\"\n", + "print \"When switch is at D, Ammeter Range=\",int(It3),\" A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-6, Page Number:47" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For 50V at full scale, multiplier resistance should be 499 kilo ohm\n", + "When instrument reads 0.8 FSD, applied voltage is 40 volt\n", + "When instrument reads 0.5 FSD, applied voltage is 25 volt\n", + "When instrument reads 0.2 FSD, applied voltage is 10 volt\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Im=100*10**-6 #in A\n", + "Rm=1*10**3 #in ohm\n", + "V=50 #in V \n", + "\n", + "#Calculations\n", + "\n", + "Rs=V/Im-Rm #in ohm \n", + "\n", + "#At 0.8 FSD\n", + "\n", + "Im1=0.8*Im #in A\n", + "V1=Im1*(Rs+Rm) #in V \n", + "\n", + "#At 0.5 FSD\n", + "Im2=0.5*Im #in A \n", + "V2=Im2*(Rs+Rm) #in V \n", + "\n", + "#At 0.2 FSD\n", + "Im3=0.2*Im #in A\n", + "V3=Im3*(Rs+Rm) #in V\n", + "\n", + "#Results\n", + "\n", + "print \"For 50V at full scale, multiplier resistance should be\",int(Rs/1000),\" kilo ohm\"\n", + "print \"When instrument reads 0.8 FSD, applied voltage is\",int(V1),\" volt\"\n", + "print \"When instrument reads 0.5 FSD, applied voltage is\",int(V2),\" volt\"\n", + "print \"When instrument reads 0.2 FSD, applied voltage is\",int(V3),\" volt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-7, Page Number: 49" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Circuit 1,\n", + "R1= 198.3 kilo ohm\n", + "R2= 998.3 kilo ohm\n", + "R3= 1.9983 mega ohm\n", + " \n", + "For Circuit 2,\n", + "R1= 198.3 kilo ohm\n", + "R2= 800 kilo ohm\n", + "R3= 1.0 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable declaration\n", + "\n", + "Im=50*10**-6 #FSD current in A\n", + "Rm=1700 #Coil resistance in ohm\n", + "V1=10 #Required range in V\n", + "V2=50 #Required range in V\n", + "V3=100 #Required range in V\n", + "\n", + "#For Circuit 1\n", + "R11=V1/Im-Rm\n", + "R12=V2/Im-Rm\n", + "R13=V3/Im-Rm\n", + "\n", + "#For Circuit 2\n", + "R21=V1/Im-Rm\n", + "R22=V2/Im-R21-Rm\n", + "R23=V3/Im-R22-R21-Rm\n", + "\n", + "#Results\n", + "\n", + "print \"For Circuit 1,\"\n", + "print \"R1=\",round(R11/1000,1),\"kilo ohm\"\n", + "print \"R2=\",round(R12/1000,1),\"kilo ohm\"\n", + "print \"R3=\",round(R13/10**6,4),\"mega ohm\"\n", + "\n", + "print \" \"\n", + "print \"For Circuit 2,\"\n", + "print \"R1=\",round(R21/1000,1),\"kilo ohm\"\n", + "print \"R2=\",int(R22/1000),\"kilo ohm\"\n", + "print \"R3=\",round(R23/10**6,4),\"mega ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3-8, Page Number: 53" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Multiplier Resistance= 890.7 kilo ohm\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4XEW1t98fYZ4CCZCEQNJhjIwqCKICB0QvAoIiijgB\n", + "jp8TzgpOxKuiqNfh6lWvKJMIiKAMV0BwOIiCIjLPBOiMJEASSBgTyPr+qOpkp9PdZ3f3nrve5+nn\n", + "9N69u/bqdWrXqlpVtZbMjEAgEAgEmlkjbwECgUAgUEyCgQgEAoFAS4KBCAQCgUBLgoEIBAKBQEuC\n", + "gQgEAoFAS4KBCAQCgUBLgoGoIJJOknRa5PiNkmZJWizpxZLukLRfj2XXJb06OWmTQ9I4SX/1v/Pb\n", + "ecsTCJSdYCAyxDeuT0taImmepF9K2rjPMockzYqeM7NvmNn7Iqe+A3zIzDY2s1vMbBcz+2uPtzT/\n", + "KiLvBx7xv/MzeQtTVHydWe7r4WJJ90g6zn9W85/d1PSdzSQtlfRQ5Fxd0nOSxjZde7MvY1Lk3F6S\n", + "Lpe0SNICSf9s3LMH+euSDoz5+xqvS/xnO0u6ysuwSNKNkl7X5nuzJP1a0p69yFkFgoHIFgMOM7ON\n", + "gN2BXYEvpnlDSQImAXeleZ+CMBm4u5cvSlozYVl6IkM55pjZRma2MfA54DRJUyOfrydp58jx24AH\n", + "WbVzYP7cMY0TknYF1oteJ2kf4E/AX4BtzWws8EHg4B5lN0AjXNP4fY3XEf78ZcAfgHHAFsAJwOJW\n", + "3wNeDtwDXNvJIFUaMwuvjF7AQ8CBkeNvAb+PHL8cuA5YBNwC7B/5bAxwBjAHWAj8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jiEAgEAi0JBiIQCAQCLQk\n", + "GIhAIBAItCQYiEAgEAi0JBiIQCAQCLQkGIhAIBAItOT/A7LrqjCnY2DGAAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "%matplotlib inline\n", + "## Variable Declaration\n", + "\n", + "I=100*10**-6 #Full Scale Current in A\n", + "Rm=1*10**3 #Coil Resistance in ohm\n", + "Vrms=100 #FSD rms voltage in V \n", + "Vf=0.7 #Diode voltage\n", + "\n", + "\n", + "#At FSD, the average current flowing through PMMC is\n", + "Iavg=I\n", + "Im=round(Iavg/0.637,6)\n", + "\n", + "\n", + "rectifier_voltage_drops=2*Vf\n", + "peak_voltage=1.414*Vrms\n", + "Rs=(peak_voltage-rectifier_voltage_drops)/Im-Rm\n", + "\n", + "#To plot rectified waveform used by the voltmeter at FSD\n", + "t=np.arange(0.01,1.0,0.01) #Time Axis \n", + "x=np.zeros(99)\n", + "N=0\n", + "while(N<99):\n", + " x[N]=(peak_voltage-2*Vf)*math.fabs(math.sin(2*math.pi*N*2/100))\n", + " N=N+1\n", + "\n", + "plt.plot(t,x) #Full wave rectified sine wave\n", + "plt.plot(t,(peak_voltage-2*Vf)*t/t,'--',label='Vm') #Peak Voltage Marker\n", + "plt.plot(t,(Vrms-0.707*2*Vf)*t/t,'--',label='Vrms') #RMS Voltage Marker\n", + "plt.plot(t,(peak_voltage-2*Vf)*0.637*t/t,'--',label='Vavg') #Average Voltage Marker\n", + "legend = plt.legend(loc='lower right')\n", + "plt.xlabel('Time(second)')\n", + "plt.ylabel('Input Voltage(V)')\n", + "plt.title('Rectified waveform across PMMC at FSD')\n", + "\n", + "#Results\n", + "print \"Multiplier Resistance=\",round(Rs/1000,1), \"kilo ohm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3-9, Page Number: 53\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When input is 75 V(rms), meter reading is 0.75 FSD\n", + "When input is 50 V(rms), meter reading is 0.5 FSD\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration \n", + "#Data from Example 3-7\n", + "Rs=890*10**3 #in ohm \n", + "Rm=1*10**3 #in ohm\n", + "Vrms=100 #in V\n", + "Vf=0.7 #in V\n", + "I=100*10**-6 #in A\n", + "\n", + "#When input=75V (rms)\n", + "Vrms1=75\n", + "Im1=(1.414*Vrms1-2*Vf)/(Rs+Rm)\n", + "Iavg1=0.637*Im1\n", + "p1=Iavg1/I\n", + "\n", + "#When input=50V (rms)\n", + "\n", + "Vrms2=50\n", + "Im2=(1.414*Vrms2-2*Vf)/(Rs+Rm)\n", + "Iavg2=0.637*Im2\n", + "p2=Iavg2/I\n", + "\n", + "#Results\n", + "\n", + "print \"When input is 75 V(rms), meter reading is\",round(p1,2),\" FSD\"\n", + "print \"When input is 50 V(rms), meter reading is\",round(p2,2),\" FSD\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-10, Page Number: 54" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sensitivity of the voltmeter described in example 3-8 is, 9 kilo ohm/V\n" + ] + } + ], + "source": [ + "import math \n", + "#Variable Declaration\n", + "#From Example 3-8\n", + "Im=157*10**-6 #Maximum Current(A)\n", + "Vrms=100 #Maximum rms voltage(V)\n", + "\n", + "#Calculation\n", + "\n", + "Irms=0.707*Im #Property of sinusoid \n", + "R=Vrms/Irms #Ohm's Law\n", + "sensitivity=R/Vrms\n", + "\n", + "print \"The sensitivity of the voltmeter described in example 3-8 is,\",int(sensitivity/1000),\"kilo ohm/V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-11, Page Number: 55" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Rsh is 778 ohm\n", + "The value of Rs is 139.5 kilo ohm\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEZCAYAAACEkhK6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXnYXEWV/z/fBBBIwIAsIUBIIAECgizKLgRRiTCCOigi\n", + "4iA6ooL6Q50BnRkJigoj4qgoIoPKjoqg0WEXgoBhCQQIECAJBEIW1pAECJKQ8/ujqpObTne/t/vt\n", + "2/f27fN5nn7eu1TVPbfeqnuqTi1HZobjOI7j9MWAvAVwHMdxugNXGI7jOE4qXGE4juM4qXCF4TiO\n", + "46TCFYbjOI6TClcYjuM4TipcYbQBScdKui1xvq+k6ZIWSzosT9nyRtI1ko5JnJ8u6XlJcyVtGfNI\n", + "LaQ7QtJySYUsw14GnDJSyMrWaSTNknRQ1bVVlECTfBv4iZmtZ2YT+i9hdyBpvKSLk9fM7BAzuzje\n", + "Hw58FdjezIaZ2eyYR2VcDNSTZaBZYplZGhXrAkl3SNor3js2NgrOropzeLz+63heaTzcVxVuI0lv\n", + "SHqy6vonJE2Oz5wbGzX7tiB7n42Wqver/L6eeI/7JS2Mjai/ShpRFW9R/D0m6aeShjYrZztxhRGw\n", + "+GsXw4FH2phex5C0RobJDwdeNLMXM3xGUWi5DEga2GZZWiLjslDBgMvNbD1gY+B24KrE/ZnAR6vy\n", + "5F+Ax1m9zq4jacfE+SeAJ5LhJH0V+BFwOrAJsCXwM6A/vcBGPeQV75f4nSVpFHAhcJKZvRUYGeV4\n", + "syre+sAGwIeBocC9eSoNVxj1WaUwSjpF0oyo7R+W9KFakSTNBLYG/hzDrll1/9OSJiT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NrN96sQfEOMvk7QHQREcAZwYjwXsaWZvJCNFBVLLD0Hymljpm6CWbH2R\n", + "jO84bcFNUk6vksaZ0mPAxnHrZyStKWmHeO8pYGi8PggYYmbXAl8l+JkAuAH48ooHSpXrNwInJK4P\n", + "IZiQDogzvAYCHwdu7UO+O2I4gKOr7m0WZXSctuEKw+kFLPG31jGs3hq36BP6COBMSfcDU4C94/3b\n", + "gXfG4/WBP8ftsm8DTorXvwy8Mw5sPwwcH6+fDmwQB7fvB8aa2XzgFOAW4H5gspn9uYZsSbm/Apwg\n", + "6UFgWFW4PQjjHY7TNnx7c8dpAUmDCWMO78pbllrEMZCzzGxK3rI45cF7GI7TAmb2CmF204F5y1JN\n", + "nHY7xJWF0268h+E4juOkwnsYjuM4TipcYTiO4zipcIXhOI7jpMIVhuM4jpMKVxiO4zhOKlxhOI7j\n", + "OKn4/5CFOt6sGQp8AAAAAElFTkSuQmCC\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "#Variable Declaration\n", + "\n", + "Iav=50*10**-6 #FSD Current (A)\n", + "Rm=1700 #Coil resistance(ohm)\n", + "Imin=100*10**-6 #Minimum forward current (peak)in A\n", + "p=20.0/100.0 #20% FSD at 100 micro amps\n", + "Vrms=50\n", + "Vf=0.7\n", + "#Calculation\n", + "Im=Iav/(0.5*0.637) \n", + "\n", + "\n", + "#At 20% FSD, If must be 100micro amps, hence the current at 100% FSD is\n", + "If_peak=Imin/p\n", + "Ish_peak=If_peak-Im\n", + "Vm_peak=Im*Rm\n", + "Rsh=Vm_peak/Ish_peak\n", + "Rs=(1.414*Vrms-Vm_peak-Vf)/If_peak\n", + "\n", + "\n", + "#Plot of half wave rectified voltage appearing across PMMC instrument\n", + "t=np.arange(0.01,1.0,0.01) #Time Axis\n", + "N=0\n", + "x=np.zeros(99)\n", + "while(N<99):\n", + " if((N<=25)|(N>50)&(N<=75)):\n", + " x[N]=(If_peak-Im)*Rsh*math.sin(2*math.pi*2*N/100)\n", + " else:\n", + " x[N]=0\n", + " N=N+1\n", + "plt.plot(t,x)\n", + "plt.plot(t,(If_peak-Im)*Rsh*t/t,'--',label='Vmax')\n", + "plt.plot(t,0.5*(If_peak-Im)*Rsh*t/t,'--',label='Vrms')\n", + "plt.plot(t,0.318*(If_peak-Im)*Rsh*t/t,'--',label='Vavg')\n", + "plt.xlabel('Time(second)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Half wave rectified waveform across PMMC at FSD')\n", + "legend = plt.legend(loc='lower right')\n", + "\n", + "#Results\n", + "print \"The value of Rsh is\",int(Rsh),\" ohm\"\n", + "print \"The value of Rs is\",round(Rs/1000,1),\" kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-12, Page Number: 58" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required value of Rl is 28.2 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable Declaration\n", + "\n", + "Iav=1*10**-3 #in A\n", + "Rm=1700 #in ohm \n", + "Ns=500 #Secondary windings \n", + "Np=4 #Primary windings \n", + "Vf=0.7 #in V \n", + "Rs=20*10**3 #in ohm \n", + "Ip=250*10**-3 #in A\n", + "\n", + "#Calculation\n", + "Im=Iav/0.637 #Property of sine half wave\n", + "Em=Im*(Rs+Rm)+2*Vf \n", + "Es=0.707*Em\n", + "rms_meter_current=1.11*Iav\n", + "\n", + "#Trasnformer rms secondary current is,\n", + "Is=Ip*Np/Ns\n", + "\n", + "Il=Is-rms_meter_current\n", + "Rl=Es/Il\n", + "\n", + "print \"The required value of Rl is\",round(Rl/1000,1),\" kilo ohm\" \n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-13, Page Number: 59" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At FSD,\n", + "Measured current= 99.0 micro ampere to 101.0 micro ampere\n", + "Error=± 1 % of measured current\n", + " \n", + "At 0.5 FSD,\n", + "Measured current= 49.0 micro ampere to 51.0 micro ampere\n", + "Error= ± 2 % of measured current\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Delcaration\n", + "\n", + "current_fsd=100*10**-6\n", + "accuracy=1.0/100.0\n", + "\n", + "#Calculation\n", + "error_fsd=accuracy*current_fsd\n", + "#At FSD\n", + "indicated_current_fsd=current_fsd\n", + "measured_current_fsd_max=indicated_current_fsd+error_fsd\n", + "measured_current_fsd_min=indicated_current_fsd-error_fsd\n", + "\n", + "\n", + "#At 0.5 FSD\n", + "\n", + "indicated_current=0.5*current_fsd\n", + "measured_current_max=indicated_current+error_fsd\n", + "measured_current_min=indicated_current-error_fsd\n", + "\n", + "error=error_fsd/indicated_current\n", + "\n", + "#Results \n", + "\n", + "print \"At FSD,\"\n", + "print \"Measured current=\",measured_current_fsd_min*10**6,\" micro ampere to\",measured_current_fsd_max*10**6,\" micro ampere\"\n", + "print \"Error=±\",int(accuracy*100),\"% of measured current\"\n", + "\n", + "print \" \"\n", + "print \"At 0.5 FSD,\"\n", + "print \"Measured current=\",measured_current_min*10**6,\" micro ampere to\",measured_current_max*10**6,\" micro ampere\"\n", + "print \"Error= ±\",int(error*100),\"% of measured current\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-14, Page Number: 61" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When Rx=0, the meter indicates 100 micro ampere(FSD)\n", + " \n", + "At 0.5 FSD, Rx= 15 kilo ohm\n", + "At 0.25 FSD, Rx= 45 kilo ohm\n", + "At 0.75 FSD, Rx= 5.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Eb=1.5 #Battery Voltage(V)\n", + "R1=15.0*10**3 #Standard resistance+meter resistance\n", + "\n", + "Im=Eb/R1 #Ohm's Law\n", + "\n", + "#At 0.5 FSD\n", + "Im1=0.5*Im #Current at 0.5 FSD\n", + "Rx1=Eb/Im1-R1 #Resistance measured at 0.5 FSD\n", + "\n", + "#At 0.25 FSD\n", + "Im2=Im/4\n", + "Rx2=Eb/Im2-Rx1 #Resistance measured at 0.25 FSD \n", + "\n", + "#At 0.75 FSD \n", + "Im3=0.75*Im\n", + "Rx3=Eb/Im3-Rx1 #Resistance measured at 0.25 FSD \n", + "\n", + "#Results\n", + "print \"When Rx=0, the meter indicates\",int(Im*10**6),\"micro ampere(FSD)\"\n", + "print \" \"\n", + "print \"At 0.5 FSD, Rx=\",int(Rx1*10**-3),\" kilo ohm\"\n", + "print \"At 0.25 FSD, Rx=\",int(Rx2*10**-3),\" kilo ohm\"\n", + "print \"At 0.75 FSD, Rx=\",round(Rx3*10**-3),\" kilo ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-15, Page Number: 63" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ohmmeter scale reading at 0.5 FSD is, 15 kilo ohm\n", + "With Rx=0 and Eb=1.3V, R2 should be 68.18 ohm\n", + "At 0.5 FSD, with Eb=1.3V, the ohmeter scale reading is, 15 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Eb1=1.5 #Battery Voltage(V)\n", + "R1=15*10**3 #Series resistance as shown in figure(ohm)\n", + "Rm=50 #Coil resistance (ohm)\n", + "R2=50 #Shunt resistance(ohm)\n", + "I_fsd=50*10**-6 #FSD Current(A) \n", + "Eb2=1.3\n", + "\n", + "\n", + "#At 0.5 FSD, with Eb=1.5V\n", + "Im1=0.5*I_fsd\n", + "Vm1=Im1*Rm\n", + "I21=Vm1/R2 #Ohm's Law\n", + "Ib1=I21+Im1 #KCL\n", + "Rx1=Eb1/Ib1-R1 #Unknown resistance value is found \n", + "\n", + "#With Rx=0,Eb=1.3V\n", + "\n", + "Ib2=Eb2/R1 #Total Current \n", + "I22=Ib2-I_fsd #Shunt Current using KCL\n", + "Vm2=I_fsd*Rm #Voltage across meter\n", + "R22=Vm2/I22 #Shunt Resistance value\n", + "\n", + "#At 0.5FSD, Eb=1.3V\n", + "Im3=0.5*I_fsd #Meter Current\n", + "Vm3=Im3*Rm #Voltage across meter using Ohm's Law\n", + "I23=Vm3/R22 #Shunt Current using Ohm's Law \n", + "Ib3=I23+Im3 #Total current using KCL \n", + "Rx2=Eb2/Ib3-R1 #Resitance reading on Ohm scale\n", + "\n", + "#Results\n", + "\n", + "print \"Ohmmeter scale reading at 0.5 FSD is,\",int(Rx1/1000),\"kilo ohm\"\n", + "print \"With Rx=0 and Eb=1.3V, R2 should be\",round(R22,2),\"ohm\"\n", + "print \"At 0.5 FSD, with Eb=1.3V, the ohmeter scale reading is,\",int(Rx2/1000),\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3-16, Page Number: 65" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When Rx=0,\n", + "Battery current= 62.516 mA\n", + "Meter current= 37.45 micro ampere\n", + "Full Scale= 0 ohm\n", + " \n", + "When Rx=24,\n", + "Battery Current= 31.254 mA\n", + "Meter Current= 18.72 micro ampere\n", + "As meter current is 0.5 times of full scale.Thus, when Rx=24 ohm it indicates half scale reading\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#From Circuit Diagram\n", + "R1=14 #in ohm\n", + "R2=10 #in ohm \n", + "R3=9.99*10**3 #in ohm \n", + "R4=2.875*10**3 #in ohm\n", + "R5=3.82*10**3 #in ohm \n", + "Eb=1.5 #Battery current\n", + "#Calculation\n", + "\n", + "#When Rx=0, battery current is\n", + "R6=R3+R4+R5 #Series equivalent\n", + "R7=R2*R6/(R2+R6) #Parallel equivalent \n", + "Ib1=Eb/(R1+R7) \n", + "Im1=Ib1*R2/(R2+R6) #Using Current Dividor Rule \n", + "\n", + "#When Rx=24 ohm,\n", + "R8=24 \n", + "Ib2=Eb1/(R8+R1+R7) #From figure\n", + "Im2=Ib2*R2/(R2+R6) #Using Current Dividor Rule\n", + "n=round(Ib2/Ib1,3)\n", + "#Results\n", + "\n", + "print \"When Rx=0,\"\n", + "print \"Battery current=\",round(Ib1*1000,3),\" mA\"\n", + "print \"Meter current=\",round(Im1*10**6,2),\" micro ampere\"\n", + "print \"Full Scale= 0 ohm\"\n", + "\n", + "print \" \"\n", + "print \"When Rx=24,\"\n", + "print \"Battery Current=\",round(Ib2*10**3,3),\"mA\"\n", + "print \"Meter Current=\",round(Im2*10**6,2),\"micro ampere\"\n", + "print \"As meter current is\",n,\"times of full scale.Thus, when Rx=24 ohm it indicates half scale reading\" \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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb new file mode 100644 index 00000000..0d8f7157 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4.ipynb @@ -0,0 +1,350 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 4:ANALOG ELECTRONIC VOLT-OHM-MILLIAMMETER" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-1, Page Number 88" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When E=10 V, meter current is 1 mA\n", + "\n", + "Input Impedance,\n", + "with transistor= 1.0 mega ohm\n", + "without transistor= 9.3 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vcc=20 #Supply Voltage(V)\n", + "Rsm=9.3*10**3 #Rsm=Rs+Rm(ohm)\n", + "Im=1*10**-3 #Emitter Current(A)\n", + "hfe=100 #Transistor h parameter\n", + "Vb1=0.7 #Base Emitter Voltage drop(V)\n", + "#Calculation\n", + "#To obtain meter current when E=10V\n", + "E=10 #Base input voltage(V)\n", + "Ve=E-Vb1 #Emitter Voltage(V) found using KVL aclong base loop\n", + "Im=Ve/Rsm #Emitter current \n", + "\n", + "#With the transistor\n", + "Ib=Im/hfe #Base current is approximately equlat to Ie/hfe\n", + "Ri=E/Ib #Input resistance with transistor\n", + "\n", + "#Without transistor\n", + "Ri1=Rsm #Input resistance without transistor\n", + "\n", + "#Results\n", + "\n", + "print \"When E=10 V, meter current is\",int(Im*10**3),\"mA\"\n", + "print \n", + "print \"Input Impedance,\"\n", + "print \"with transistor=\",round(Ri/10**6),\"mega ohm\"\n", + "print \"without transistor=\",Ri1/10**3,\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-2, Page Number 89" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When E=0V, I2=I3= 2.9 mA\n", + "When E=1V, meter circuit voltage(V)= 1.0 V\n", + "When E=0.5, meter circuit voltage= 0.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "R2=3.9*10**3 #in ohm\n", + "R3=3.9*10**3 #in ohm\n", + "Vcc=12 #in V\n", + "Vee=-12 #in V \n", + "Vbe=0.7 #Base Emitter voltage in V\n", + "\n", + "#Calculation \n", + "\n", + "#When E=0\n", + "E=0 \n", + "Vr2=E-Vbe-Vee #KVL \n", + "Vr3=E-Vbe-Vee #KVL\n", + "I2=Vr2/R2 #Ohm's Law\n", + "I3=I2 \n", + "\n", + "print \"When E=0V, I2=I3=\",round(I3*10**3,1),\"mA\"\n", + "\n", + "#When E=1\n", + "E=1 #in V\n", + "Vp=0 #in V\n", + "Ve1=E-Vbe #KVL\n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL\n", + "print \"When E=1V, meter circuit voltage(V)=\",V,\"V\"\n", + "\n", + "#When E=0.5\n", + "E=0.5 #in V\n", + "Vp=0 #in V\n", + "Ve1=E-Vbe #KVL \n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL \n", + "print \"When E=0.5, meter circuit voltage=\",V,\"V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-3, Page Number: 93" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Im is 0.75 which is 75.0 % of full scale\n", + "As the meter is in 10V range, 75% of full scale is 7.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "E=7.5 #in V\n", + "Vgs=-5 #FET gate source voltage in V\n", + "Vp=5 #in V\n", + "Rsm=1*10**3 #Rs+Rm in ohm\n", + "Im=1*10**-3 #in A\n", + "Ra=800*10**3 #in ohm\n", + "Rb=100*10**3 #in ohm\n", + "Rc=60*10**3 #in ohm\n", + "Rd=40*10**3 #in ohm\n", + "\n", + "Eg=E*(Rc+Rd)/(Ra+Rb+Rc+Rd) #Voltage Divider Rule \n", + "Vs=Eg-Vgs #KVL \n", + "\n", + "Ve1=Vs-Vbe #KVL \n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL\n", + "Im=V/Rsm #Ohm's Law\n", + "\n", + "print \"Im is\",round(Im*10**3,2),\"which is\",round(Im*10**3,2)*100,\"% of full scale\"\n", + "print \"As the meter is in 10V range, 75% of full scale is\",10*0.75,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-4, Page Number: 97" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 100.0 ohm\n", + "R4= 4.9 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Im=100*10**-6 #Full scale current in A\n", + "Rm=10*10**3 #Meter resistance in ohm \n", + "Ib=0.2*10**-6 #Op-amp input current in A\n", + "E=20*10**-3 #Maximum input in V\n", + "\n", + "#Calculations\n", + "\n", + "I4=1000*Ib #Since I4>>Ib\n", + "Vout=Im*Rm #Ohm's Law \n", + "\n", + "R3=E/I4 #Ohm's Law \n", + "R4=(Vout-E)/I4 #Ohm's Law\n", + "\n", + "#Results\n", + "\n", + "print \"R3=\",R3,\"ohm\"\n", + "print \"R4=\",round(R4*10**-3,1),\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-5, Page Number: 98" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo Ohm\n", + "Maximum voltage at output terminal= 1.1 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "E=1.0 #in V\n", + "I=1*10**-3 #in A\n", + "Rm=100 #in ohm\n", + "\n", + "R3=E/I #Ohm's Law\n", + "Vo=I*(R3+Rm) #Maximum Output voltage\n", + "\n", + "print \"R3=\",R3/1000,\"kilo Ohm\"\n", + "print \"Maximum voltage at output terminal=\",round(Vo,1),\"V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-7, Page Number: 107" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 45.0 ohm\n", + "When input is 50mV, meter deflection is 0.5 mA(half scale)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Iav=1*10**-3 #in A \n", + "Rm=1.2*10**3 #in ohm\n", + "E=100*10**-3 #in V\n", + "\n", + "#With half wave rectifiers,\n", + "Ip=2*Iav/0.637 #Using relation between Ip and Iav for HWR\n", + "\n", + "#Peak value of Er3=input peak voltage\n", + "Ep=E/0.707 #Relation between peak voltage and rms \n", + "R3=Ep/Ip #in ohm\n", + "print \"R3=\",round(R3),\"ohm\"\n", + "\n", + "#When E=50mV\n", + "E=50*10**-3 #in V\n", + "Ep=E/0.707 #Peak Voltage in V \n", + "Ip=Ep/R3 #Peak current in A \n", + "\n", + "Iav=0.637*Ip/2 #Average Current in A\n", + "\n", + "print \"When input is 50mV, meter deflection is\",round(Iav*10**3,1),\"mA(half scale)\"\n" + ] + }, + { + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb new file mode 100644 index 00000000..1abc780a --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter4_1.ipynb @@ -0,0 +1,341 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 4:ANALOG ELECTRONIC VOLT-OHM-MILLIAMMETER" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-1, Page Number 88" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When E=10 V, meter current is 1 mA\n", + "\n", + "Input Impedance,\n", + "with transistor= 1.0 mega ohm\n", + "without transistor= 9.3 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vcc=20 #Supply Voltage(V)\n", + "Rsm=9.3*10**3 #Rsm=Rs+Rm(ohm)\n", + "Im=1*10**-3 #Emitter Current(A)\n", + "hfe=100 #Transistor h parameter\n", + "Vb1=0.7 #Base Emitter Voltage drop(V)\n", + "#Calculation\n", + "#To obtain meter current when E=10V\n", + "E=10 #Base input voltage(V)\n", + "Ve=E-Vb1 #Emitter Voltage(V) found using KVL aclong base loop\n", + "Im=Ve/Rsm #Emitter current \n", + "\n", + "#With the transistor\n", + "Ib=Im/hfe #Base current is approximately equlat to Ie/hfe\n", + "Ri=E/Ib #Input resistance with transistor\n", + "\n", + "#Without transistor\n", + "Ri1=Rsm #Input resistance without transistor\n", + "\n", + "#Results\n", + "\n", + "print \"When E=10 V, meter current is\",int(Im*10**3),\"mA\"\n", + "print \n", + "print \"Input Impedance,\"\n", + "print \"with transistor=\",round(Ri/10**6),\"mega ohm\"\n", + "print \"without transistor=\",Ri1/10**3,\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-2, Page Number 89" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When E=0V, I2=I3= 2.9 mA\n", + "When E=1V, meter circuit voltage(V)= 1.0 V\n", + "When E=0.5, meter circuit voltage= 0.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "R2=3.9*10**3 #in ohm\n", + "R3=3.9*10**3 #in ohm\n", + "Vcc=12 #in V\n", + "Vee=-12 #in V \n", + "Vbe=0.7 #Base Emitter voltage in V\n", + "\n", + "#Calculation \n", + "\n", + "#When E=0\n", + "E=0 \n", + "Vr2=E-Vbe-Vee #KVL \n", + "Vr3=E-Vbe-Vee #KVL\n", + "I2=Vr2/R2 #Ohm's Law\n", + "I3=I2 \n", + "\n", + "print \"When E=0V, I2=I3=\",round(I3*10**3,1),\"mA\"\n", + "\n", + "#When E=1\n", + "E=1 #in V\n", + "Vp=0 #in V\n", + "Ve1=E-Vbe #KVL\n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL\n", + "print \"When E=1V, meter circuit voltage(V)=\",V,\"V\"\n", + "\n", + "#When E=0.5\n", + "E=0.5 #in V\n", + "Vp=0 #in V\n", + "Ve1=E-Vbe #KVL \n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL \n", + "print \"When E=0.5, meter circuit voltage=\",V,\"V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-3, Page Number: 93" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Im is 0.75 which is 75.0 % of full scale\n", + "As the meter is in 10V range, 75% of full scale is 7.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "E=7.5 #in V\n", + "Vgs=-5 #FET gate source voltage in V\n", + "Vp=5 #in V\n", + "Rsm=1*10**3 #Rs+Rm in ohm\n", + "Im=1*10**-3 #in A\n", + "Ra=800*10**3 #in ohm\n", + "Rb=100*10**3 #in ohm\n", + "Rc=60*10**3 #in ohm\n", + "Rd=40*10**3 #in ohm\n", + "\n", + "Eg=E*(Rc+Rd)/(Ra+Rb+Rc+Rd) #Voltage Divider Rule \n", + "Vs=Eg-Vgs #KVL \n", + "\n", + "Ve1=Vs-Vbe #KVL \n", + "Ve2=Vp-Vbe #KVL\n", + "V=Ve1-Ve2 #KVL\n", + "Im=V/Rsm #Ohm's Law\n", + "\n", + "print \"Im is\",round(Im*10**3,2),\"which is\",round(Im*10**3,2)*100,\"% of full scale\"\n", + "print \"As the meter is in 10V range, 75% of full scale is\",10*0.75,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-4, Page Number: 97" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 100.0 ohm\n", + "R4= 4.9 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Im=100*10**-6 #Full scale current in A\n", + "Rm=10*10**3 #Meter resistance in ohm \n", + "Ib=0.2*10**-6 #Op-amp input current in A\n", + "E=20*10**-3 #Maximum input in V\n", + "\n", + "#Calculations\n", + "\n", + "I4=1000*Ib #Since I4>>Ib\n", + "Vout=Im*Rm #Ohm's Law \n", + "\n", + "R3=E/I4 #Ohm's Law \n", + "R4=(Vout-E)/I4 #Ohm's Law\n", + "\n", + "#Results\n", + "\n", + "print \"R3=\",R3,\"ohm\"\n", + "print \"R4=\",round(R4*10**-3,1),\"kilo ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-5, Page Number: 98" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo Ohm\n", + "Maximum voltage at output terminal= 1.1 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "E=1.0 #in V\n", + "I=1*10**-3 #in A\n", + "Rm=100 #in ohm\n", + "\n", + "R3=E/I #Ohm's Law\n", + "Vo=I*(R3+Rm) #Maximum Output voltage\n", + "\n", + "print \"R3=\",R3/1000,\"kilo Ohm\"\n", + "print \"Maximum voltage at output terminal=\",round(Vo,1),\"V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4-7, Page Number: 107" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 45.0 ohm\n", + "When input is 50mV, meter deflection is 0.5 mA(half scale)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Iav=1*10**-3 #in A \n", + "Rm=1.2*10**3 #in ohm\n", + "E=100*10**-3 #in V\n", + "\n", + "#With half wave rectifiers,\n", + "Ip=2*Iav/0.637 #Using relation between Ip and Iav for HWR\n", + "\n", + "#Peak value of Er3=input peak voltage\n", + "Ep=E/0.707 #Relation between peak voltage and rms \n", + "R3=Ep/Ip #in ohm\n", + "print \"R3=\",round(R3),\"ohm\"\n", + "\n", + "#When E=50mV\n", + "E=50*10**-3 #in V\n", + "Ep=E/0.707 #Peak Voltage in V \n", + "Ip=Ep/R3 #Peak current in A \n", + "\n", + "Iav=0.637*Ip/2 #Average Current in A\n", + "\n", + "print \"When input is 50mV, meter deflection is\",round(Iav*10**3,1),\"mA(half scale)\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb new file mode 100644 index 00000000..9085b454 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5.ipynb @@ -0,0 +1,388 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 5: DIGITAL INSTRUMENT BASICS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-1, Page Number: 120" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "High output voltage(Voh)= 4.0 V\n", + "Low output voltage(Vol)= 0.7 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vcc=5 #in V\n", + "R1=1*10**3 #in ohm \n", + "Vd=0.7 #Diode voltage in V\n", + "I0=1*10**-3 #High output current in A\n", + "Vilow=0 #Low input voltage\n", + "\n", + "#Calculation\n", + "Voh=Vcc-I0*R1\n", + "Vol=Vilow+Vd\n", + "\n", + "print \"High output voltage(Voh)=\",Voh,\"V\"\n", + "print \"Low output voltage(Vol)=\",Vol,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-2, Page Number: 121" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "With Q2 ON,\n", + "Vc2= 0.2 V\n", + "Vr1r2= 5.2 V\n", + "Vr1= 1.9 V\n", + "Vb1= -1.7 V\n", + "\n", + "With Q1 OFF,\n", + "Vrc1= 0.6 V\n", + "Vc1= 4.4 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vbe=0.7 #Base emitter voltage in V\n", + "Vce_sat=0.2 #Saturation voltage in V\n", + "R1=15*10**3 #in ohm\n", + "R2=27*10**3 #in ohm\n", + "Vcc=5 #in V\n", + "Vbb=-5 #in V\n", + "Rc1=2.7*10**3 #in ohm\n", + "R11=15*10**3 #in ohm\n", + "R21=27*10**3 #in ohm\n", + "\n", + "#Calculation\n", + "#With Q2 on,\n", + "Vc2=Vce_sat #Q2 is ON \n", + "Vr1r2=Vc2-Vbb #KVL\n", + "Vr1=R1*Vr1r2/(R1+R2) #Voltage Divider Rule\n", + "\n", + "Vb1=Vc2-Vr1 #KVL\n", + "\n", + "#With Q1 off, \n", + "Vrc1=Rc1*(Vcc-Vbb)/(Rc1+R11+R21) #Voltage Divider Rule\n", + "Vc1=Vcc-Vrc1 #KVL\n", + "\n", + "\n", + "#Results\n", + "\n", + "print \"With Q2 ON,\"\n", + "print \"Vc2=\",round(Vc2,1),\"V\"\n", + "print \"Vr1r2=\",round(Vr1r2,1),\"V\"\n", + "print \"Vr1=\",round(Vr1,1),\"V\"\n", + "print \"Vb1=\",round(Vb1,1),\"V\"\n", + "print\n", + "print \"With Q1 OFF,\"\n", + "print \"Vrc1=\",round(Vrc1,1),\"V\"\n", + "print \"Vc1=\",round(Vc1,1),\"V\"\n", + "\n", + "#Note: A round off error of 0.1 V is observed in Vr1 and Vb1 variables" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-3, Page Number: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For the LED Display,\n", + "Current for each 7 segment display= 140.0 mA\n", + "Current for 1/2 (2 segment) display= 40.0 mA\n", + "Total current for 3 and 1/2 digits= 460.0 mA\n", + "\n", + "For the LCD Display,\n", + "Current for each 7 segment display= 2.1 mA\n", + "Current for 1/2 (2 segment) display= 600.0 micro ampere\n", + "Total current for 3 and 1/2 digits= 6.9 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "If=20*10**-3 #Forward current in A\n", + "\n", + "#Calcualtions\n", + "#For the LED display\n", + "I7=7*If #Seven Segment Current in A\n", + "I_1by2=2*If #Current for 1/2 digit in A\n", + "It=3*I7+I_1by2 #Total Current in A\n", + "\n", + "print \"For the LED Display,\"\n", + "print \"Current for each 7 segment display=\",round(I7*10**3),\"mA\"\n", + "print \"Current for 1/2 (2 segment) display=\",round(I_1by2*10**3),\"mA\"\n", + "print \"Total current for 3 and 1/2 digits=\",round(It*10**3),\"mA\"\n", + "\n", + "\n", + "#For the LCD Display\n", + "If=300*10**-6\n", + "\n", + "I7=7*If #Seven Segment Current in A\n", + "I_1by2=2*If #Current for 1/2 digit in A\n", + "It=3*I7+I_1by2 #Total Current in A\n", + "\n", + "print\n", + "print \"For the LCD Display,\"\n", + "print \"Current for each 7 segment display=\",round(I7*10**3,1),\"mA\"\n", + "print \"Current for 1/2 (2 segment) display=\",round(I_1by2*10**6),\"micro ampere\"\n", + "print \"Total current for 3 and 1/2 digits=\",round(It*10**3,1),\"mA\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-4, Page Number: 130" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time period= 4.1 ms\n", + "Frequency= 244.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "T0=1*10**-6 #Oscillator time period in s\n", + "N=16 #Modulus of the counters \n", + "n=3 #No. of counters\n", + "\n", + "#Calculations\n", + "T=T0*N**n #Time period in s\n", + "f=1/T #Frequency in Hz\n", + "\n", + "#Results\n", + "print \"Time period=\",round(T*10**3,1),\"ms\"\n", + "print \"Frequency=\",round(f),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-5, Page Number: 131" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Vi=0.9V,\n", + "t= 90.0 ms\n", + "Pulses counted= 90000.0\n", + "For Vi=0.75V,\n", + "t= 75.0 ms\n", + "Pulses counted= 75000.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vr=1.25 #in V\n", + "tr=125*10**-3 #in s\n", + "f=1.0*10**6 #in Hz\n", + "\n", + "#For Vi=0.9\n", + "Vi=0.9 #in V\n", + "t1=tr*Vi/Vr #in s \n", + "T=1/f #in s\n", + "N=t1/T #No. of pulses counted \n", + "\n", + "print \"For Vi=0.9V,\"\n", + "print \"t=\",round(t1*10**3),\"ms\"\n", + "print \"Pulses counted=\",round(N)\n", + "\n", + "#For Vi=0.75\n", + "Vi=0.75 #in V\n", + "t1=tr*Vi/Vr #in s \n", + "N=t1/T #No. of pulses counted \n", + "\n", + "print \"For Vi=0.75V,\"\n", + "print \"t=\",round(t1*10**3),\"ms\"\n", + "print \"Pulses counted=\",round(N)\n", + "\n", + "#**********************Error********************************\n", + "##Note:The count values obtained in text book are 900 and 750 \n", + "##Whereas the actual values are 900000 and 75000 respectively" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-6, Page Number: 133" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "N= 7 bit ADC is requird for quantizing error less than 1%\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#For 1% quantizing error count, count>=100\n", + "N=1\n", + "while(N):\n", + " count=2**N-1\n", + " if(count>=100):\n", + " break \n", + " N=N+1\n", + "\n", + "print \"N=\",N,\"bit ADC is requird for quantizing error less than 1%\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-7, Page Number: 135" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 6.25 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "a3=1 #bit\n", + "a2=0 #bit\n", + "a1=1 #bit\n", + "a0=0 #bit\n", + "Vi=10 #in V\n", + "\n", + "#Calculations\n", + "\n", + "Vo=(2**3*a3+2**2*a2+2**1*a1+a0)*Vi/16.0\n", + "\n", + "print \"Vo=\",round(Vo,2),\"V\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb new file mode 100644 index 00000000..9085b454 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter5_1.ipynb @@ -0,0 +1,388 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 5: DIGITAL INSTRUMENT BASICS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-1, Page Number: 120" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "High output voltage(Voh)= 4.0 V\n", + "Low output voltage(Vol)= 0.7 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vcc=5 #in V\n", + "R1=1*10**3 #in ohm \n", + "Vd=0.7 #Diode voltage in V\n", + "I0=1*10**-3 #High output current in A\n", + "Vilow=0 #Low input voltage\n", + "\n", + "#Calculation\n", + "Voh=Vcc-I0*R1\n", + "Vol=Vilow+Vd\n", + "\n", + "print \"High output voltage(Voh)=\",Voh,\"V\"\n", + "print \"Low output voltage(Vol)=\",Vol,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-2, Page Number: 121" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "With Q2 ON,\n", + "Vc2= 0.2 V\n", + "Vr1r2= 5.2 V\n", + "Vr1= 1.9 V\n", + "Vb1= -1.7 V\n", + "\n", + "With Q1 OFF,\n", + "Vrc1= 0.6 V\n", + "Vc1= 4.4 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Vbe=0.7 #Base emitter voltage in V\n", + "Vce_sat=0.2 #Saturation voltage in V\n", + "R1=15*10**3 #in ohm\n", + "R2=27*10**3 #in ohm\n", + "Vcc=5 #in V\n", + "Vbb=-5 #in V\n", + "Rc1=2.7*10**3 #in ohm\n", + "R11=15*10**3 #in ohm\n", + "R21=27*10**3 #in ohm\n", + "\n", + "#Calculation\n", + "#With Q2 on,\n", + "Vc2=Vce_sat #Q2 is ON \n", + "Vr1r2=Vc2-Vbb #KVL\n", + "Vr1=R1*Vr1r2/(R1+R2) #Voltage Divider Rule\n", + "\n", + "Vb1=Vc2-Vr1 #KVL\n", + "\n", + "#With Q1 off, \n", + "Vrc1=Rc1*(Vcc-Vbb)/(Rc1+R11+R21) #Voltage Divider Rule\n", + "Vc1=Vcc-Vrc1 #KVL\n", + "\n", + "\n", + "#Results\n", + "\n", + "print \"With Q2 ON,\"\n", + "print \"Vc2=\",round(Vc2,1),\"V\"\n", + "print \"Vr1r2=\",round(Vr1r2,1),\"V\"\n", + "print \"Vr1=\",round(Vr1,1),\"V\"\n", + "print \"Vb1=\",round(Vb1,1),\"V\"\n", + "print\n", + "print \"With Q1 OFF,\"\n", + "print \"Vrc1=\",round(Vrc1,1),\"V\"\n", + "print \"Vc1=\",round(Vc1,1),\"V\"\n", + "\n", + "#Note: A round off error of 0.1 V is observed in Vr1 and Vb1 variables" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-3, Page Number: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For the LED Display,\n", + "Current for each 7 segment display= 140.0 mA\n", + "Current for 1/2 (2 segment) display= 40.0 mA\n", + "Total current for 3 and 1/2 digits= 460.0 mA\n", + "\n", + "For the LCD Display,\n", + "Current for each 7 segment display= 2.1 mA\n", + "Current for 1/2 (2 segment) display= 600.0 micro ampere\n", + "Total current for 3 and 1/2 digits= 6.9 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "If=20*10**-3 #Forward current in A\n", + "\n", + "#Calcualtions\n", + "#For the LED display\n", + "I7=7*If #Seven Segment Current in A\n", + "I_1by2=2*If #Current for 1/2 digit in A\n", + "It=3*I7+I_1by2 #Total Current in A\n", + "\n", + "print \"For the LED Display,\"\n", + "print \"Current for each 7 segment display=\",round(I7*10**3),\"mA\"\n", + "print \"Current for 1/2 (2 segment) display=\",round(I_1by2*10**3),\"mA\"\n", + "print \"Total current for 3 and 1/2 digits=\",round(It*10**3),\"mA\"\n", + "\n", + "\n", + "#For the LCD Display\n", + "If=300*10**-6\n", + "\n", + "I7=7*If #Seven Segment Current in A\n", + "I_1by2=2*If #Current for 1/2 digit in A\n", + "It=3*I7+I_1by2 #Total Current in A\n", + "\n", + "print\n", + "print \"For the LCD Display,\"\n", + "print \"Current for each 7 segment display=\",round(I7*10**3,1),\"mA\"\n", + "print \"Current for 1/2 (2 segment) display=\",round(I_1by2*10**6),\"micro ampere\"\n", + "print \"Total current for 3 and 1/2 digits=\",round(It*10**3,1),\"mA\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-4, Page Number: 130" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time period= 4.1 ms\n", + "Frequency= 244.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "T0=1*10**-6 #Oscillator time period in s\n", + "N=16 #Modulus of the counters \n", + "n=3 #No. of counters\n", + "\n", + "#Calculations\n", + "T=T0*N**n #Time period in s\n", + "f=1/T #Frequency in Hz\n", + "\n", + "#Results\n", + "print \"Time period=\",round(T*10**3,1),\"ms\"\n", + "print \"Frequency=\",round(f),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-5, Page Number: 131" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Vi=0.9V,\n", + "t= 90.0 ms\n", + "Pulses counted= 90000.0\n", + "For Vi=0.75V,\n", + "t= 75.0 ms\n", + "Pulses counted= 75000.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vr=1.25 #in V\n", + "tr=125*10**-3 #in s\n", + "f=1.0*10**6 #in Hz\n", + "\n", + "#For Vi=0.9\n", + "Vi=0.9 #in V\n", + "t1=tr*Vi/Vr #in s \n", + "T=1/f #in s\n", + "N=t1/T #No. of pulses counted \n", + "\n", + "print \"For Vi=0.9V,\"\n", + "print \"t=\",round(t1*10**3),\"ms\"\n", + "print \"Pulses counted=\",round(N)\n", + "\n", + "#For Vi=0.75\n", + "Vi=0.75 #in V\n", + "t1=tr*Vi/Vr #in s \n", + "N=t1/T #No. of pulses counted \n", + "\n", + "print \"For Vi=0.75V,\"\n", + "print \"t=\",round(t1*10**3),\"ms\"\n", + "print \"Pulses counted=\",round(N)\n", + "\n", + "#**********************Error********************************\n", + "##Note:The count values obtained in text book are 900 and 750 \n", + "##Whereas the actual values are 900000 and 75000 respectively" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-6, Page Number: 133" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "N= 7 bit ADC is requird for quantizing error less than 1%\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "#For 1% quantizing error count, count>=100\n", + "N=1\n", + "while(N):\n", + " count=2**N-1\n", + " if(count>=100):\n", + " break \n", + " N=N+1\n", + "\n", + "print \"N=\",N,\"bit ADC is requird for quantizing error less than 1%\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5-7, Page Number: 135" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 6.25 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "a3=1 #bit\n", + "a2=0 #bit\n", + "a1=1 #bit\n", + "a0=0 #bit\n", + "Vi=10 #in V\n", + "\n", + "#Calculations\n", + "\n", + "Vo=(2**3*a3+2**2*a2+2**1*a1+a0)*Vi/16.0\n", + "\n", + "print \"Vo=\",round(Vo,2),\"V\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb new file mode 100644 index 00000000..d3729e3e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6.ipynb @@ -0,0 +1,257 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 6: DIGITAL VOLTMETERS AND FREQUENCY METERS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-1, Page Number: 139" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum time t1 for the digital voltmeter is 1.33 ms\n", + "Ramp Generator Frequency can be 600 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "f=1.5*10**6 #Clock frequency in Hz\n", + "N=1999 #Maximum count\n", + "\n", + "#Calculations\n", + "clock_time_period=1/f #Clock time period in s\n", + "t1=N*clock_time_period #Maximum time in s\n", + "t2=0.25*t1 #Select t2=0.25*t1\n", + "t=t1+t2 #in s\n", + "fr=1/t #in Hz \n", + "\n", + "#Results\n", + "print \"Maximum time t1 for the digital voltmeter is\",round(t1*10**3,2),\"ms\"\n", + "print \"Ramp Generator Frequency can be\",int(fr),\"Hz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-2, Page Number: 149" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For the analog meter,\n", + "Voltage Error=± 0.5 V\n", + "Error=± 2.5 %\n", + "\n", + "For the digital meter,\n", + "Voltage Error=± 0.22 V\n", + "Error=± 1.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=20 #Voltage to be measured in V\n", + "analog_range=25 #Range of analog meter in V\n", + "analog_accuracy=2.0/100 #Accuracy of analog meter at FSD \n", + "\n", + "#Calculations\n", + "\n", + "#Analog Instrument:\n", + "voltage_error=analog_accuracy*analog_range #in V\n", + "\n", + "error=voltage_error*100/V #in percentage\n", + "\n", + "print \"For the analog meter,\"\n", + "print \"Voltage Error=±\",round(voltage_error,1),\"V\"\n", + "print \"Error=±\",round(error,1),\"%\"\n", + "\n", + "#Digital Instrument:\n", + "\n", + "#For 20 V displayed on a 3 1/2 digit display\n", + "digit=0.1 #in V\n", + "digital_accuracy=0.6/100 \n", + "voltage_error=digital_accuracy*V+digit #in V \n", + "error=voltage_error*100/V #in percentage \n", + "print\n", + "print \"For the digital meter,\"\n", + "print \"Voltage Error=±\",round(voltage_error,2),\"V\"\n", + "print \"Error=±\",round(error,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-3, Page Number: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When 6 decade counters are used,f= 1.512 kHz\n", + "When 4 decade counters are used,f= 1.5 kHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "ft=1.0*10**6 #Clock generator frequency in Hz\n", + "fi=1.512*10**3 #Input frequency in Hz\n", + "\n", + "#Calculations\n", + "#Using 6 decade counters\n", + "d=6 #No. of decade counters used\n", + "f1=ft/10**d #Time base frequency in Hz\n", + "t1=1/f1 #Time period in s \n", + "n1=fi*t1 #No. of cycles counted \n", + "f=n1/t1\n", + "\n", + "print \"When 6 decade counters are used,f=\",round(f/1000,3),\"kHz\"\n", + "\n", + "#Using 4 decade counters\n", + "d=4 #No.of decade counters used\n", + "f2=ft/10**d #Time base frequency in Hz\n", + "t2=1/f2 #Time period in s \n", + "n2=fi*t2 #No. of cycles counted\n", + "f=n2/t2\n", + "\n", + "print \"When 4 decade counters are used,f=\",round(f/1000,1),\"kHz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-4, Page Number: 154" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At f=100 Hz,\n", + "error=± 1.0 count\n", + "%error=± 1.0 %\n", + "\n", + "At f=1 MHz\n", + "error=± 2.0 count\n", + "%error=± 2.0e-04 %\n", + "\n", + "At f=100 MHz,\n", + "error=± 101.0 count\n", + "%error=± 1.01e-04 %\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "accuracy=10**-6 #Accuracy\n", + "\n", + "#At f=100 Hz\n", + "\n", + "f=100 #Frequency in Hz\n", + "error=1+f*accuracy #in terms of counts\n", + "percentage_error=error*100/f #in percentage\n", + "\n", + "print \"At f=100 Hz,\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=±\",round(percentage_error),\"%\"\n", + "print\n", + "#At f=1 MHz,\n", + "\n", + "f=1*10**6 #Frequency in Hz\n", + "error=1+f*accuracy #in terms of counts\n", + "percentage_error=error*100/f #in percentage\n", + "\n", + "print \"At f=1 MHz\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=± \",'%.1e' % percentage_error,\"%\"\n", + "print\n", + "\n", + "#At f=100 MHz\n", + "\n", + "f=100*10**6 #Frequency in Hz \n", + "error=1+f*accuracy #in terms of counts \n", + "percentage_error=error*100/f #in percentage\n", + "print \"At f=100 MHz,\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=±\",'%.2e' % percentage_error,\"%\"\n", + "print" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb new file mode 100644 index 00000000..d3729e3e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter6_1.ipynb @@ -0,0 +1,257 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 6: DIGITAL VOLTMETERS AND FREQUENCY METERS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-1, Page Number: 139" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum time t1 for the digital voltmeter is 1.33 ms\n", + "Ramp Generator Frequency can be 600 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "f=1.5*10**6 #Clock frequency in Hz\n", + "N=1999 #Maximum count\n", + "\n", + "#Calculations\n", + "clock_time_period=1/f #Clock time period in s\n", + "t1=N*clock_time_period #Maximum time in s\n", + "t2=0.25*t1 #Select t2=0.25*t1\n", + "t=t1+t2 #in s\n", + "fr=1/t #in Hz \n", + "\n", + "#Results\n", + "print \"Maximum time t1 for the digital voltmeter is\",round(t1*10**3,2),\"ms\"\n", + "print \"Ramp Generator Frequency can be\",int(fr),\"Hz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-2, Page Number: 149" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For the analog meter,\n", + "Voltage Error=± 0.5 V\n", + "Error=± 2.5 %\n", + "\n", + "For the digital meter,\n", + "Voltage Error=± 0.22 V\n", + "Error=± 1.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "V=20 #Voltage to be measured in V\n", + "analog_range=25 #Range of analog meter in V\n", + "analog_accuracy=2.0/100 #Accuracy of analog meter at FSD \n", + "\n", + "#Calculations\n", + "\n", + "#Analog Instrument:\n", + "voltage_error=analog_accuracy*analog_range #in V\n", + "\n", + "error=voltage_error*100/V #in percentage\n", + "\n", + "print \"For the analog meter,\"\n", + "print \"Voltage Error=±\",round(voltage_error,1),\"V\"\n", + "print \"Error=±\",round(error,1),\"%\"\n", + "\n", + "#Digital Instrument:\n", + "\n", + "#For 20 V displayed on a 3 1/2 digit display\n", + "digit=0.1 #in V\n", + "digital_accuracy=0.6/100 \n", + "voltage_error=digital_accuracy*V+digit #in V \n", + "error=voltage_error*100/V #in percentage \n", + "print\n", + "print \"For the digital meter,\"\n", + "print \"Voltage Error=±\",round(voltage_error,2),\"V\"\n", + "print \"Error=±\",round(error,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-3, Page Number: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When 6 decade counters are used,f= 1.512 kHz\n", + "When 4 decade counters are used,f= 1.5 kHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "ft=1.0*10**6 #Clock generator frequency in Hz\n", + "fi=1.512*10**3 #Input frequency in Hz\n", + "\n", + "#Calculations\n", + "#Using 6 decade counters\n", + "d=6 #No. of decade counters used\n", + "f1=ft/10**d #Time base frequency in Hz\n", + "t1=1/f1 #Time period in s \n", + "n1=fi*t1 #No. of cycles counted \n", + "f=n1/t1\n", + "\n", + "print \"When 6 decade counters are used,f=\",round(f/1000,3),\"kHz\"\n", + "\n", + "#Using 4 decade counters\n", + "d=4 #No.of decade counters used\n", + "f2=ft/10**d #Time base frequency in Hz\n", + "t2=1/f2 #Time period in s \n", + "n2=fi*t2 #No. of cycles counted\n", + "f=n2/t2\n", + "\n", + "print \"When 4 decade counters are used,f=\",round(f/1000,1),\"kHz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6-4, Page Number: 154" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At f=100 Hz,\n", + "error=± 1.0 count\n", + "%error=± 1.0 %\n", + "\n", + "At f=1 MHz\n", + "error=± 2.0 count\n", + "%error=± 2.0e-04 %\n", + "\n", + "At f=100 MHz,\n", + "error=± 101.0 count\n", + "%error=± 1.01e-04 %\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "accuracy=10**-6 #Accuracy\n", + "\n", + "#At f=100 Hz\n", + "\n", + "f=100 #Frequency in Hz\n", + "error=1+f*accuracy #in terms of counts\n", + "percentage_error=error*100/f #in percentage\n", + "\n", + "print \"At f=100 Hz,\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=±\",round(percentage_error),\"%\"\n", + "print\n", + "#At f=1 MHz,\n", + "\n", + "f=1*10**6 #Frequency in Hz\n", + "error=1+f*accuracy #in terms of counts\n", + "percentage_error=error*100/f #in percentage\n", + "\n", + "print \"At f=1 MHz\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=± \",'%.1e' % percentage_error,\"%\"\n", + "print\n", + "\n", + "#At f=100 MHz\n", + "\n", + "f=100*10**6 #Frequency in Hz \n", + "error=1+f*accuracy #in terms of counts \n", + "percentage_error=error*100/f #in percentage\n", + "print \"At f=100 MHz,\"\n", + "print \"error=±\",round(error),\"count\"\n", + "print \"%error=±\",'%.2e' % percentage_error,\"%\"\n", + "print" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb new file mode 100644 index 00000000..9b14cc8e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 7: LOW, HIGH AND PRECISE RESISTANCE MEASUREMENTS\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-1, Page Number: 165" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 990 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "I=0.5 #in A\n", + "E1=500 #E+Ea in V\n", + "Ra=10 #in ohm\n", + "\n", + "#Calculations\n", + "R1=E1/I #in ohm\n", + "R=R1-Ra #in ohm\n", + "\n", + "#Result\n", + "print \"R=\",int(R),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-2, Page Number: 166" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltmeter Reading= 495.0 V\n", + "Ammeter Reading= 0.5 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "sensitivity=10**3 #in ohm/V\n", + "V=1000.0 #in V \n", + "R=990.0 #in ohm\n", + "Ra=10.0 #in ohm\n", + "supply_voltage=500 #in V \n", + "\n", + "\n", + "#Calculations\n", + "Rv=V*sensitivity #in ohm\n", + "R1=Rv*R/(Rv+R) #in ohm \n", + "voltmeter_reading=supply_voltage*R1/(Ra+R1) #in volt \n", + "ammeter_reading=supply_voltage/R1 #in A\n", + "\n", + "#Results\n", + "print \"Voltmeter Reading=\",round(voltmeter_reading,1),\"V\"\n", + "print \"Ammeter Reading=\",round(ammeter_reading,1),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-3, Page Number: 166" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For V=495 V,I=0.5 A, R= 990.0 ohm\n", + "For V=500 V,I=0.5 A, R= 1000.0 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "\n", + "#For figure 7-1(a)\n", + "voltmeter_reading=495 #in V\n", + "ammeter_reading=0.5 #in A\n", + "R=voltmeter_reading/ammeter_reading #in ohm\n", + "print \"For V=495 V,I=0.5 A, R=\",R,\"ohm\"\n", + "\n", + "#For figure 7-1(b)\n", + "voltmeter_reading=500 #in V\n", + "ammeter_reading=0.5 #in A\n", + "R=voltmeter_reading/ammeter_reading #in ohm\n", + "\n", + "print \"For V=500 V,I=0.5 A, R=\",R,\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-4, Page Number: 169" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 2.755 kilo ohm\n", + "Measurement Range is 500.0 ohm to 4.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#Variable Declaration\n", + "\n", + "#Bridge Resistances\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=5.51*10**3 #in ohm \n", + "\n", + "#Calculations\n", + "\n", + "R=S*P/Q #Equation for unknown resistance in a balanced bridge(ohm)\n", + "\n", + "#When S=1 kilo ohm\n", + "S=1*10**3 #in ohm\n", + "R1=S*P/Q #in ohm \n", + "\n", + "#When S=8 kilo ohm\n", + "S=8*10**3 #in ohm \n", + "R2=S*P/Q #in ohm\n", + "\n", + "print \"R=\",round(R/1000,3),\"kilo ohm\"\n", + "print \"Measurement Range is\",round(R1),\"ohm to \",round(R2/1000),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-5, Page Number: 169" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Error in R=± 0.2 %\n", + "R= 2.755 kilo ohm ± 0.2 %\n", + "R= 2.755 kilo ohm ± 5.5 %\n", + "R= 2.7495 kilo ohm to 2.7605 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#Bridge Resistances\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=5.51*10**3 #in ohm \n", + "R=2.755*10**3 #in ohm \n", + "p_accuracy=0.05 #in percentage \n", + "q_accuracy=0.05 #in percentage\n", + "s_accuracy=0.1 #in percentage \n", + "\n", + "#Calculation\n", + "error_r=p_accuracy+q_accuracy+s_accuracy #in percentage\n", + "Rmax=R+R*error_r/100.0 #in ohm\n", + "Rmin=R-R*error_r/100.0 #in ohm \n", + "\n", + "#Result\n", + "\n", + "print \"Error in R=±\",round(error_r,1),\"%\"\n", + "print \"R=\",round(R/1000,3),\"kilo ohm ±\",round(error_r,1),\"%\"\n", + "print \"R=\",round(R/1000,3),\"kilo ohm ±\",round(R*error_r/100.0,1),\"%\"\n", + "print \"R=\",round(Rmin/1000,4),\"kilo ohm to \",round(Rmax/1000,4),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-6, Page Number: 172" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum Change in R is 5.9 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=4*10**3 #in ohm\n", + "R=2*10**3 #in ohm\n", + "Eb=10\n", + "Ig=10**-6 #in A/mm\n", + "Rg=2.5*10**3 #in ohm\n", + "\n", + "#Calculations\n", + "r=P*R/(P+R)+Q*S/(Q+S) #R=P||R+Q||S in ohm\n", + "dV=Ig*(r+Rg) # Smallest voltage change in V \n", + "\n", + "Vr=Eb*R/(P+R) #Voltage across R(Voltage Divider Rule), in V \n", + "V=Vr+dV #in V \n", + "Vp=Eb-V #KVL \n", + "Ip=Vp/P #Ohm's Law\n", + "Ir=Ip \n", + "dR=round(V,5)/round(Ir,6)-R #in ohm\n", + "\n", + "\n", + "print \"Minimum Change in R is\",round(dR,1),\"ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-7, Page Number: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R/P=S/Q= 10 / 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "\n", + "#Variable Declaration\n", + "S=0.10 #in ohm\n", + "Q=0.15 #in ohm(Approximately equal to 0.15)\n", + "\n", + "#Result\n", + "print \"R/P=S/Q= \",int(S*100),\"/\",int(Q*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-8, Page Number: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume resistance= 6.7e+09 ohm\n", + "Surface resistance= 2.9e+09 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "E=10000 #in Volt\n", + "Iv=1.5*10**-6 #in A\n", + "rv=E/Iv #Volume resistance in ohm \n", + "\n", + "#Surface leakage Resistance\n", + "\n", + "It=5*10**-6 #in A\n", + "Is=It-Iv #KCL \n", + "rs=E/Is #Surface Resistance in ohm\n", + "\n", + "#Results\n", + "print \"Volume resistance=\",'%.1e' %rv,\"ohm\"\n", + "print \"Surface resistance=\",'%.1e' %rs,\"ohm\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb new file mode 100644 index 00000000..9b14cc8e --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter7_1.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 7: LOW, HIGH AND PRECISE RESISTANCE MEASUREMENTS\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-1, Page Number: 165" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 990 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "I=0.5 #in A\n", + "E1=500 #E+Ea in V\n", + "Ra=10 #in ohm\n", + "\n", + "#Calculations\n", + "R1=E1/I #in ohm\n", + "R=R1-Ra #in ohm\n", + "\n", + "#Result\n", + "print \"R=\",int(R),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-2, Page Number: 166" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltmeter Reading= 495.0 V\n", + "Ammeter Reading= 0.5 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "sensitivity=10**3 #in ohm/V\n", + "V=1000.0 #in V \n", + "R=990.0 #in ohm\n", + "Ra=10.0 #in ohm\n", + "supply_voltage=500 #in V \n", + "\n", + "\n", + "#Calculations\n", + "Rv=V*sensitivity #in ohm\n", + "R1=Rv*R/(Rv+R) #in ohm \n", + "voltmeter_reading=supply_voltage*R1/(Ra+R1) #in volt \n", + "ammeter_reading=supply_voltage/R1 #in A\n", + "\n", + "#Results\n", + "print \"Voltmeter Reading=\",round(voltmeter_reading,1),\"V\"\n", + "print \"Ammeter Reading=\",round(ammeter_reading,1),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-3, Page Number: 166" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For V=495 V,I=0.5 A, R= 990.0 ohm\n", + "For V=500 V,I=0.5 A, R= 1000.0 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "\n", + "#For figure 7-1(a)\n", + "voltmeter_reading=495 #in V\n", + "ammeter_reading=0.5 #in A\n", + "R=voltmeter_reading/ammeter_reading #in ohm\n", + "print \"For V=495 V,I=0.5 A, R=\",R,\"ohm\"\n", + "\n", + "#For figure 7-1(b)\n", + "voltmeter_reading=500 #in V\n", + "ammeter_reading=0.5 #in A\n", + "R=voltmeter_reading/ammeter_reading #in ohm\n", + "\n", + "print \"For V=500 V,I=0.5 A, R=\",R,\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-4, Page Number: 169" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 2.755 kilo ohm\n", + "Measurement Range is 500.0 ohm to 4.0 kilo ohm\n" + ] + } + ], + "source": [ + "import math \n", + "\n", + "#Variable Declaration\n", + "\n", + "#Bridge Resistances\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=5.51*10**3 #in ohm \n", + "\n", + "#Calculations\n", + "\n", + "R=S*P/Q #Equation for unknown resistance in a balanced bridge(ohm)\n", + "\n", + "#When S=1 kilo ohm\n", + "S=1*10**3 #in ohm\n", + "R1=S*P/Q #in ohm \n", + "\n", + "#When S=8 kilo ohm\n", + "S=8*10**3 #in ohm \n", + "R2=S*P/Q #in ohm\n", + "\n", + "print \"R=\",round(R/1000,3),\"kilo ohm\"\n", + "print \"Measurement Range is\",round(R1),\"ohm to \",round(R2/1000),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-5, Page Number: 169" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Error in R=± 0.2 %\n", + "R= 2.755 kilo ohm ± 0.2 %\n", + "R= 2.755 kilo ohm ± 5.5 %\n", + "R= 2.7495 kilo ohm to 2.7605 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#Bridge Resistances\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=5.51*10**3 #in ohm \n", + "R=2.755*10**3 #in ohm \n", + "p_accuracy=0.05 #in percentage \n", + "q_accuracy=0.05 #in percentage\n", + "s_accuracy=0.1 #in percentage \n", + "\n", + "#Calculation\n", + "error_r=p_accuracy+q_accuracy+s_accuracy #in percentage\n", + "Rmax=R+R*error_r/100.0 #in ohm\n", + "Rmin=R-R*error_r/100.0 #in ohm \n", + "\n", + "#Result\n", + "\n", + "print \"Error in R=±\",round(error_r,1),\"%\"\n", + "print \"R=\",round(R/1000,3),\"kilo ohm ±\",round(error_r,1),\"%\"\n", + "print \"R=\",round(R/1000,3),\"kilo ohm ±\",round(R*error_r/100.0,1),\"%\"\n", + "print \"R=\",round(Rmin/1000,4),\"kilo ohm to \",round(Rmax/1000,4),\"kilo ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-6, Page Number: 172" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum Change in R is 5.9 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "P=3.5*10**3 #in ohm\n", + "Q=7*10**3 #in ohm\n", + "S=4*10**3 #in ohm\n", + "R=2*10**3 #in ohm\n", + "Eb=10\n", + "Ig=10**-6 #in A/mm\n", + "Rg=2.5*10**3 #in ohm\n", + "\n", + "#Calculations\n", + "r=P*R/(P+R)+Q*S/(Q+S) #R=P||R+Q||S in ohm\n", + "dV=Ig*(r+Rg) # Smallest voltage change in V \n", + "\n", + "Vr=Eb*R/(P+R) #Voltage across R(Voltage Divider Rule), in V \n", + "V=Vr+dV #in V \n", + "Vp=Eb-V #KVL \n", + "Ip=Vp/P #Ohm's Law\n", + "Ir=Ip \n", + "dR=round(V,5)/round(Ir,6)-R #in ohm\n", + "\n", + "\n", + "print \"Minimum Change in R is\",round(dR,1),\"ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-7, Page Number: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R/P=S/Q= 10 / 15\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "\n", + "#Variable Declaration\n", + "S=0.10 #in ohm\n", + "Q=0.15 #in ohm(Approximately equal to 0.15)\n", + "\n", + "#Result\n", + "print \"R/P=S/Q= \",int(S*100),\"/\",int(Q*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7-8, Page Number: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume resistance= 6.7e+09 ohm\n", + "Surface resistance= 2.9e+09 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "E=10000 #in Volt\n", + "Iv=1.5*10**-6 #in A\n", + "rv=E/Iv #Volume resistance in ohm \n", + "\n", + "#Surface leakage Resistance\n", + "\n", + "It=5*10**-6 #in A\n", + "Is=It-Iv #KCL \n", + "rs=E/Is #Surface Resistance in ohm\n", + "\n", + "#Results\n", + "print \"Volume resistance=\",'%.1e' %rv,\"ohm\"\n", + "print \"Surface resistance=\",'%.1e' %rs,\"ohm\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb new file mode 100644 index 00000000..77ecc1b5 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8.ipynb @@ -0,0 +1,611 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 8: INDUCTANCE AND CAPACITANCE MEASUREMENTS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-1, Page Number: 194" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since the measured terminal resistance is 134 kilo ohm, the circuit must consist of a\n", + "0.005 micro farad capacitor connected in parallel with a 134 kilo ohm resistor\n", + "For a series connected circuit, the terminal resistance will be much higher than 134 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C=0.005*10**-6 #in farad\n", + "Rs=8*10**3 #in ohm\n", + "f=1*10**3 #in Hz\n", + "\n", + "#Calculations\n", + "\n", + "Xs=1/(2*math.pi*f*C) #Capacitvie Reactance in ohm\n", + "Rp=(Rs**2+Xs**2)/Rs #in ohm\n", + "Xp=(Rs**2+Xs**2)/Xs #in ohm\n", + "Cp=1/(2*math.pi*f*Xp) #in farad\n", + "\n", + "#Result\n", + "\n", + "print \"Since the measured terminal resistance is 134 kilo ohm, the circuit must consist of a\"\n", + "print round(Cp*10**6,3),\"micro farad capacitor connected in parallel with a\",int(Rp/1000),\"kilo ohm resistor\"\n", + "print \"For a series connected circuit, the terminal resistance will be much higher than 134 kilo ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-2, Page Number: 199" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For R3/R4=100:1, Cx= 10.0 micro farad\n", + "For R3/R4=1:100, Cx= 0.001 micro farad\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C1=0.1*10**-6 #in farad\n", + "\n", + "#Calculation\n", + "\n", + "#For R3:R4=100:1\n", + "ratio=100.0/1 \n", + "Cx=C1*ratio #in farad \n", + "\n", + "print \"For R3/R4=100:1, Cx=\",round(Cx*10**6),\"micro farad\"\n", + "\n", + "#For R3:R4=1/100\n", + "ratio=1.0/100.0\n", + "Cx=C1*ratio #in farad \n", + "print \"For R3/R4=1:100, Cx=\",round(Cx*10**6,3),\"micro farad\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-3, Page Number: 202" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cs= 0.272 micro farad\n", + "Rs= 183.8 ohm\n", + "Disspiation factor(D)= 0.031\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R3=10*10**3 #in ohm\n", + "f=100 #in Hz\n", + "R1=125 #in ohm\n", + "R4=14.7*10**3 #in ohm \n", + "C1=0.4*10**-6 #in farad \n", + "\n", + "#Calculations \n", + "Cs=C1*R3/R4 #in farad\n", + "Rs=R1*R4/R3 #in ohm\n", + "D=2*math.pi*f*Cs*Rs #Dissipation factor \n", + "\n", + "#Results\n", + "print \"Cs=\",round(Cs*10**6,3),\"micro farad\"\n", + "print \"Rs=\",round(Rs,1),\"ohm\"\n", + "print \"Disspiation factor(D)=\",round(D,3)\n", + "\n", + "#****************************Note**********************************************\n", + "# The value for C1 as per the problem statement is 0.4 micro farad\n", + "#But while calculating, 0.1 micro farad value has been considered in text book\n", + "#C1 is taken to be 0.4 microfarad\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-4, Page Number: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cp= 0.068 micro farad\n", + "Rp= 551.3 kilo ohm\n", + "Dissipation Factor(D)= 4.24e-02\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C1=0.1*10**-6 #in farad\n", + "R3=10*10**3 #in ohm\n", + "R1=375*10**3 #in ohm \n", + "R4=14.7*10**3 #in ohm\n", + "f=100 #in farad\n", + "\n", + "#Calculations\n", + "Cp=C1*R3/R4 #in farad \n", + "Rp=R1*R4/R3 #in resistance\n", + "D=1/(2*math.pi*f*Cp*Rp) #Dissipation factor \n", + "\n", + "#Results\n", + "print \"Cp=\",round(Cp*10**6,3),\"micro farad\"\n", + "print \"Rp=\",round(Rp/1000,1),\"kilo ohm\"\n", + "print \"Dissipation Factor(D)=\",'%.2e' % D" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-5, Page Number: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rp= 2.98 mega ohm\n", + "Cp= 0.068 micro farad\n", + "R4= 14.7 kilo ohm\n", + "R1= 2.03 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#From Example 8-3,\n", + "Cs=0.068*10**-6 #in farad\n", + "Rs=183.8 #in ohm\n", + "f=100 #in Hz \n", + "R3=10*10**3 #in ohm\n", + "R1=10*10**3 #in ohm \n", + "\n", + "#Calculations\n", + "Xs=1/(2*math.pi*f*Cs) #in ohm\n", + "Rp=(Rs**2+Xs**2)/Rs #in ohm \n", + "Xp=(Rs**2+Xs**2)/Xs #in ohm\n", + "Cp=1/(2*math.pi*f*Xp) #in farad \n", + "R4=C1*R3/Cp #in ohm \n", + "R1=R3*Rp/R4 #in ohm\n", + "\n", + "\n", + "#Results\n", + "\n", + "print \"Rp=\",round(Rp*10**-6,2),\"mega ohm\"\n", + "print \"Cp=\",round(Cp*10**6,3),\"micro farad\"\n", + "print \"R4=\",round(R4/1000,1),\"kilo ohm\"\n", + "print \"R1=\",round(R1*10**-6,2),\"mega ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-6, Page Number: 207" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo ohm\n", + "R1= 54.0 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "L1=100*10**-3 #in henry\n", + "R4=5*10**3 #in ohm\n", + "Ls=500*10**-3 #in henry\n", + "Rs=270 #in ohm \n", + "\n", + "#Calculations\n", + "R3=R4*L1/Ls #in ohm \n", + "R1=Rs*R3/R4 #in ohm\n", + "\n", + "#Results\n", + "print \"R3=\",R3/1000,\"kilo ohm\"\n", + "print \"R1=\",R1,\"ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-7, Page Number: 209" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ls= 63.0 mH\n", + "Rs= 1.34 kilo ohm\n", + "Q factor(Q)= 0.03\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C3=0.1*10**-6 #in farad\n", + "R1=1.26*10**3 #in ohm\n", + "R3=470 #in ohm\n", + "R4=500 #in ohm\n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "Ls=C3*R1*R4 #in henry \n", + "Rs=R1*R4/R3 #in ohm \n", + "Q=(2*math.pi*f*Ls)/Rs\n", + "\n", + "#Results\n", + "\n", + "print \"Ls=\",round(Ls*1000),\"mH\"\n", + "print \"Rs=\",round(Rs/1000,2),\"kilo ohm\"\n", + "print \"Q factor(Q)=\",round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-8, Page Number: 210" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lp= 63.0 mH\n", + "Rp= 8.4 kilo ohm\n", + "Q factor(Q)= 212.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C3=0.1*10**-6 #in farad\n", + "R1=1.26*10**3 #in ohm\n", + "R3=75 #in ohm\n", + "R4=500 #in ohm\n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "\n", + "Lp=C3*R1*R4 #in henry \n", + "Rp=R1*R4/R3 #in ohm\n", + "Q=Rp/(2*math.pi*f*Lp) #Quality factor \n", + "\n", + "#Results\n", + "\n", + "print \"Lp=\",round(Lp*1000),\"mH\"\n", + "print \"Rp=\",round(Rp/1000,2),\"kilo ohm\"\n", + "print \"Q factor(Q)=\",round(Q)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-9, Page Number: 211" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rs= 0.187 ohm\n", + "Ls= 63.0 mH\n", + "R1= 1.26 kilo ohm\n", + "R3= 3.38 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Lp=63*10**-3 #in henry\n", + "Rp=8.4*10**3 #in ohm \n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "Xp=2*math.pi*f*Lp #in ohm \n", + "Rs=Rp*Xp**2/(Xp**2+Rp**2) #in ohm\n", + "Xs=Xp*Rp**2/(Xp**2+Rp**2) #in ohm\n", + "Ls=Xs/(2*math.pi*f) #in henry\n", + "\n", + "R1=Ls/(C3*R4) #in ohm \n", + "R3=R1*R4/Rs #in ohm \n", + "\n", + "#Results\n", + "\n", + "print \"Rs=\",round(Rs,3),\"ohm\"\n", + "print \"Ls=\",round(Ls*10**3),\"mH\"\n", + "print \"R1=\",round(R1/1000,2),\"kilo ohm\"\n", + "print \"R3=\",round(R3*10**-6,2),\"mega ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-10, Page Number: 214" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cx= 200.0 pF\n", + "Rx= 30.0 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1=369.3*10**3 #in ohm\n", + "R3=10*10**3 #in ohm \n", + "R4=14.66*10**3 #in ohm \n", + "Rp=553.1*10**3 #in ohm\n", + "C1=0.1*10**-6 #in farad \n", + "Cp=0.068*10**-6 #in farad\n", + "\n", + "#Calcultions\n", + "Ceq=round(C1*R3/R4,10) #Cx+Cp, Equivalent parallel capacitance, in farad\n", + "Cx=Ceq-Cp #in farad\n", + "\n", + "Req=R1*R4/R3 #Equivalent resitance in ohm \n", + "\n", + "Rx=1/(1/Req-1/Rp) #in ohm\n", + "\n", + "#Results\n", + "\n", + "print \"Cx=\",round(Cx*10**12),\"pF\"\n", + "print \"Rx=\",round(Rx*10**-8,1)*100,\"mega ohm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-11, Page Number: 221" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When R=5 ohm, Xl=100 ohm\n", + "Vl= 2.0 V\n", + "Q= 20.0\n", + "\n", + "When R=10 ohm, Xl=100 ohm\n", + "V= 1.0\n", + "Q= 10.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "E=100*10**-3 #in V\n", + "R=5 #in ohm\n", + "Xl=100 #in ohm\n", + "Xc=100 #in ohm\n", + "\n", + "#Calculations\n", + "I=E/R #At resonance, I is dependent only on R(A)\n", + "\n", + "Vl=I*Xl #in V\n", + "Vc=I*Xc #in V\n", + "Q=Vl/E #Quality Factor \n", + "print \"When R=5 ohm, Xl=100 ohm\"\n", + "print \"Vl=\",Vl,\"V\"\n", + "print \"Q=\",Q\n", + "#For the second coil\n", + "R=10 #in ohm \n", + "Xl=100 #in ohm\n", + "Xc=100 #in ohm \n", + "\n", + "I=E/R #At resonance, I is dependent only on R(A)\n", + "Vl=I*Xl #in V\n", + "Vc=I*Xc #in V\n", + "Q=Vl/E #Quality Factor \n", + "\n", + "print\n", + "print \"When R=10 ohm, Xl=100 ohm\"\n", + "print \"V=\",Vl\n", + "print \"Q=\",Q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exanoke 8-12, Page Number: 225" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L= 110.0 micro henry\n", + "R= 8.8 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C=147*10**-12 #in farad\n", + "f=1.25*10**6 #in Hz\n", + "Q=98.0 #Q Factor\n", + "\n", + "#Calculations \n", + "L=1/(C*(2*math.pi*f)**2) #in henry \n", + "R=(2*math.pi*f*L)/Q #in ohm\n", + "\n", + "#Results\n", + "print \"L=\",round(L*10**6),\"micro henry\"\n", + "print \"R=\",round(R,1),\"ohm\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb new file mode 100644 index 00000000..77ecc1b5 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter8_1.ipynb @@ -0,0 +1,611 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 8: INDUCTANCE AND CAPACITANCE MEASUREMENTS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-1, Page Number: 194" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since the measured terminal resistance is 134 kilo ohm, the circuit must consist of a\n", + "0.005 micro farad capacitor connected in parallel with a 134 kilo ohm resistor\n", + "For a series connected circuit, the terminal resistance will be much higher than 134 kilo ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C=0.005*10**-6 #in farad\n", + "Rs=8*10**3 #in ohm\n", + "f=1*10**3 #in Hz\n", + "\n", + "#Calculations\n", + "\n", + "Xs=1/(2*math.pi*f*C) #Capacitvie Reactance in ohm\n", + "Rp=(Rs**2+Xs**2)/Rs #in ohm\n", + "Xp=(Rs**2+Xs**2)/Xs #in ohm\n", + "Cp=1/(2*math.pi*f*Xp) #in farad\n", + "\n", + "#Result\n", + "\n", + "print \"Since the measured terminal resistance is 134 kilo ohm, the circuit must consist of a\"\n", + "print round(Cp*10**6,3),\"micro farad capacitor connected in parallel with a\",int(Rp/1000),\"kilo ohm resistor\"\n", + "print \"For a series connected circuit, the terminal resistance will be much higher than 134 kilo ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-2, Page Number: 199" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For R3/R4=100:1, Cx= 10.0 micro farad\n", + "For R3/R4=1:100, Cx= 0.001 micro farad\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C1=0.1*10**-6 #in farad\n", + "\n", + "#Calculation\n", + "\n", + "#For R3:R4=100:1\n", + "ratio=100.0/1 \n", + "Cx=C1*ratio #in farad \n", + "\n", + "print \"For R3/R4=100:1, Cx=\",round(Cx*10**6),\"micro farad\"\n", + "\n", + "#For R3:R4=1/100\n", + "ratio=1.0/100.0\n", + "Cx=C1*ratio #in farad \n", + "print \"For R3/R4=1:100, Cx=\",round(Cx*10**6,3),\"micro farad\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-3, Page Number: 202" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cs= 0.272 micro farad\n", + "Rs= 183.8 ohm\n", + "Disspiation factor(D)= 0.031\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R3=10*10**3 #in ohm\n", + "f=100 #in Hz\n", + "R1=125 #in ohm\n", + "R4=14.7*10**3 #in ohm \n", + "C1=0.4*10**-6 #in farad \n", + "\n", + "#Calculations \n", + "Cs=C1*R3/R4 #in farad\n", + "Rs=R1*R4/R3 #in ohm\n", + "D=2*math.pi*f*Cs*Rs #Dissipation factor \n", + "\n", + "#Results\n", + "print \"Cs=\",round(Cs*10**6,3),\"micro farad\"\n", + "print \"Rs=\",round(Rs,1),\"ohm\"\n", + "print \"Disspiation factor(D)=\",round(D,3)\n", + "\n", + "#****************************Note**********************************************\n", + "# The value for C1 as per the problem statement is 0.4 micro farad\n", + "#But while calculating, 0.1 micro farad value has been considered in text book\n", + "#C1 is taken to be 0.4 microfarad\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-4, Page Number: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cp= 0.068 micro farad\n", + "Rp= 551.3 kilo ohm\n", + "Dissipation Factor(D)= 4.24e-02\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C1=0.1*10**-6 #in farad\n", + "R3=10*10**3 #in ohm\n", + "R1=375*10**3 #in ohm \n", + "R4=14.7*10**3 #in ohm\n", + "f=100 #in farad\n", + "\n", + "#Calculations\n", + "Cp=C1*R3/R4 #in farad \n", + "Rp=R1*R4/R3 #in resistance\n", + "D=1/(2*math.pi*f*Cp*Rp) #Dissipation factor \n", + "\n", + "#Results\n", + "print \"Cp=\",round(Cp*10**6,3),\"micro farad\"\n", + "print \"Rp=\",round(Rp/1000,1),\"kilo ohm\"\n", + "print \"Dissipation Factor(D)=\",'%.2e' % D" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-5, Page Number: 204" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rp= 2.98 mega ohm\n", + "Cp= 0.068 micro farad\n", + "R4= 14.7 kilo ohm\n", + "R1= 2.03 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "#From Example 8-3,\n", + "Cs=0.068*10**-6 #in farad\n", + "Rs=183.8 #in ohm\n", + "f=100 #in Hz \n", + "R3=10*10**3 #in ohm\n", + "R1=10*10**3 #in ohm \n", + "\n", + "#Calculations\n", + "Xs=1/(2*math.pi*f*Cs) #in ohm\n", + "Rp=(Rs**2+Xs**2)/Rs #in ohm \n", + "Xp=(Rs**2+Xs**2)/Xs #in ohm\n", + "Cp=1/(2*math.pi*f*Xp) #in farad \n", + "R4=C1*R3/Cp #in ohm \n", + "R1=R3*Rp/R4 #in ohm\n", + "\n", + "\n", + "#Results\n", + "\n", + "print \"Rp=\",round(Rp*10**-6,2),\"mega ohm\"\n", + "print \"Cp=\",round(Cp*10**6,3),\"micro farad\"\n", + "print \"R4=\",round(R4/1000,1),\"kilo ohm\"\n", + "print \"R1=\",round(R1*10**-6,2),\"mega ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-6, Page Number: 207" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R3= 1.0 kilo ohm\n", + "R1= 54.0 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "L1=100*10**-3 #in henry\n", + "R4=5*10**3 #in ohm\n", + "Ls=500*10**-3 #in henry\n", + "Rs=270 #in ohm \n", + "\n", + "#Calculations\n", + "R3=R4*L1/Ls #in ohm \n", + "R1=Rs*R3/R4 #in ohm\n", + "\n", + "#Results\n", + "print \"R3=\",R3/1000,\"kilo ohm\"\n", + "print \"R1=\",R1,\"ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-7, Page Number: 209" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ls= 63.0 mH\n", + "Rs= 1.34 kilo ohm\n", + "Q factor(Q)= 0.03\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C3=0.1*10**-6 #in farad\n", + "R1=1.26*10**3 #in ohm\n", + "R3=470 #in ohm\n", + "R4=500 #in ohm\n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "Ls=C3*R1*R4 #in henry \n", + "Rs=R1*R4/R3 #in ohm \n", + "Q=(2*math.pi*f*Ls)/Rs\n", + "\n", + "#Results\n", + "\n", + "print \"Ls=\",round(Ls*1000),\"mH\"\n", + "print \"Rs=\",round(Rs/1000,2),\"kilo ohm\"\n", + "print \"Q factor(Q)=\",round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-8, Page Number: 210" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lp= 63.0 mH\n", + "Rp= 8.4 kilo ohm\n", + "Q factor(Q)= 212.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "C3=0.1*10**-6 #in farad\n", + "R1=1.26*10**3 #in ohm\n", + "R3=75 #in ohm\n", + "R4=500 #in ohm\n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "\n", + "Lp=C3*R1*R4 #in henry \n", + "Rp=R1*R4/R3 #in ohm\n", + "Q=Rp/(2*math.pi*f*Lp) #Quality factor \n", + "\n", + "#Results\n", + "\n", + "print \"Lp=\",round(Lp*1000),\"mH\"\n", + "print \"Rp=\",round(Rp/1000,2),\"kilo ohm\"\n", + "print \"Q factor(Q)=\",round(Q)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-9, Page Number: 211" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rs= 0.187 ohm\n", + "Ls= 63.0 mH\n", + "R1= 1.26 kilo ohm\n", + "R3= 3.38 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Lp=63*10**-3 #in henry\n", + "Rp=8.4*10**3 #in ohm \n", + "f=100 #in Hz\n", + "\n", + "#Calculations\n", + "Xp=2*math.pi*f*Lp #in ohm \n", + "Rs=Rp*Xp**2/(Xp**2+Rp**2) #in ohm\n", + "Xs=Xp*Rp**2/(Xp**2+Rp**2) #in ohm\n", + "Ls=Xs/(2*math.pi*f) #in henry\n", + "\n", + "R1=Ls/(C3*R4) #in ohm \n", + "R3=R1*R4/Rs #in ohm \n", + "\n", + "#Results\n", + "\n", + "print \"Rs=\",round(Rs,3),\"ohm\"\n", + "print \"Ls=\",round(Ls*10**3),\"mH\"\n", + "print \"R1=\",round(R1/1000,2),\"kilo ohm\"\n", + "print \"R3=\",round(R3*10**-6,2),\"mega ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-10, Page Number: 214" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cx= 200.0 pF\n", + "Rx= 30.0 mega ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "R1=369.3*10**3 #in ohm\n", + "R3=10*10**3 #in ohm \n", + "R4=14.66*10**3 #in ohm \n", + "Rp=553.1*10**3 #in ohm\n", + "C1=0.1*10**-6 #in farad \n", + "Cp=0.068*10**-6 #in farad\n", + "\n", + "#Calcultions\n", + "Ceq=round(C1*R3/R4,10) #Cx+Cp, Equivalent parallel capacitance, in farad\n", + "Cx=Ceq-Cp #in farad\n", + "\n", + "Req=R1*R4/R3 #Equivalent resitance in ohm \n", + "\n", + "Rx=1/(1/Req-1/Rp) #in ohm\n", + "\n", + "#Results\n", + "\n", + "print \"Cx=\",round(Cx*10**12),\"pF\"\n", + "print \"Rx=\",round(Rx*10**-8,1)*100,\"mega ohm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8-11, Page Number: 221" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When R=5 ohm, Xl=100 ohm\n", + "Vl= 2.0 V\n", + "Q= 20.0\n", + "\n", + "When R=10 ohm, Xl=100 ohm\n", + "V= 1.0\n", + "Q= 10.0\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "E=100*10**-3 #in V\n", + "R=5 #in ohm\n", + "Xl=100 #in ohm\n", + "Xc=100 #in ohm\n", + "\n", + "#Calculations\n", + "I=E/R #At resonance, I is dependent only on R(A)\n", + "\n", + "Vl=I*Xl #in V\n", + "Vc=I*Xc #in V\n", + "Q=Vl/E #Quality Factor \n", + "print \"When R=5 ohm, Xl=100 ohm\"\n", + "print \"Vl=\",Vl,\"V\"\n", + "print \"Q=\",Q\n", + "#For the second coil\n", + "R=10 #in ohm \n", + "Xl=100 #in ohm\n", + "Xc=100 #in ohm \n", + "\n", + "I=E/R #At resonance, I is dependent only on R(A)\n", + "Vl=I*Xl #in V\n", + "Vc=I*Xc #in V\n", + "Q=Vl/E #Quality Factor \n", + "\n", + "print\n", + "print \"When R=10 ohm, Xl=100 ohm\"\n", + "print \"V=\",Vl\n", + "print \"Q=\",Q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exanoke 8-12, Page Number: 225" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L= 110.0 micro henry\n", + "R= 8.8 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "C=147*10**-12 #in farad\n", + "f=1.25*10**6 #in Hz\n", + "Q=98.0 #Q Factor\n", + "\n", + "#Calculations \n", + "L=1/(C*(2*math.pi*f)**2) #in henry \n", + "R=(2*math.pi*f*L)/Q #in ohm\n", + "\n", + "#Results\n", + "print \"L=\",round(L*10**6),\"micro henry\"\n", + "print \"R=\",round(R,1),\"ohm\"" + ] + } + ], + "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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb new file mode 100644 index 00000000..48a66cea --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9.ipynb @@ -0,0 +1,1601 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 9: CATHODE-RAY OSCILLOSCOPES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-1, Page Number: 238" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEZCAYAAACJjGL9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXvUJFV5r58ft4CCgopchsEhAUUSdbwRo3gcUFigwsRL\n", + "hChIazQ5ujyaeAkXNRhyhBE1SMwyyUFMAwqKmiAoFxFnYtSIogwi48hFPy4ig4ggiokI7/lj18dU\n", + "93R1V3dX1d7V/T5rfWu6uqqrft/u+Xp3vbue2jIzHMdxHKeIzWIHcBzHcdLGOwrHcRxnKN5ROI7j\n", + "OEPxjsJxHMcZincUjuM4zlC8o3Acx3GG4h2F4zSMpOMknT7lPpZJelDS2H/DktZI+rNpju/MF95R\n", + "OJUgaUHS8xs4znsknV0iywET7n+9pNcMeP4tkr41wf5WSLol/5yZnWxmr58k3xjHXZB0n6R7Jd0u\n", + "6V8lPXwxQvZTdj8TtaUzO3hH4VRF6Q+fBjBAE762C7x6wPNHZetKI2mLCTNUgQEvNrPtgKcBzwDe\n", + "NeF+Jm1LZ0bwjsKpHEkdSV+V9H5Jd0n6oaSDc+vXSDpZ0hWS7pF0vqQdsnWbfANfPFvJ9nEccHj2\n", + "TfmqAcc+G9gduDDb5u3Z84dJulbSzyWtlrR3QfyPA/tJ2j23z32AJwHnSvodSR+QdFP2Tf2fJG2d\n", + "y36rpL+W9BPgHOAiYNcsyy8k7dJ/ViRpP0lfz7LdLOno7PkXSboqa6ObJZ0w9psBmNltwCXA7w9o\n", + "r9+T9GVJd0r6qaSPS3rkiLZ8Vi7vWknPy+2vI+nG7Hf9oaRXTpLZSQvvKJy62BdYDzwaOAU4o2/9\n", + "UcBrgF2A3wL/MGRfBpiZXQKcBHzSzLYzs6dusqHZUcDNZN+mzewDkh5P+NB+M/AYwof3hZK2HPD6\n", + "W4HVWb581i+Y2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trwvrch4zRsEfPgFr5RL5f0\n", + "SOBSSfv3rTdJA2tjkrrAQrZ4N7DWzNZk61Zkr69jufM++K9jpRWjts9lLd6f2Y0XSLdfAe94L7y3\n", + "gfybLBPeg8aON+lyqfZMYJlY7QlbAz8W7EhV/z+h+2/w1pdJd8xde463vBxIKQ9mtiZ73MnacYEJ\n", + "ScajkPRu4NfA64AVZna7pF0IZxp7920bZ4xiWneieL/uVDjTM407UbxPdypmiNaNUUh6zOIVTZK2\n", + "IZikVxEuGV2s2R8NnB8n4UCmdSeKcKfCmY5p3Yki3KlwiDtGsQvw5WyM4grgQjO7HFgFHCjpOuCA\n", + "bDkVOoxx2WHpumVkp6It9VXPOZRS7kSeMXJ2iehUtOF9b0PGaYg2RmFm1wBPG/D8XcALmk80gurc\n", + "iSK6wAeB02ravzPbdIATa9p33qn4Zk3HcBImmTGKcYgyRlGVO1G8f3cqnMmo0p0oPoY7FTPApJ+d\n", + "3lGUO+Bk806Mfxyfp8IZn0nmnRj/GD5PxQzQusHsllHancgzQd0yilPRlvqq5xx4sLHcid6XjpEz\n", + "olPRhve9DRmnwTuKcnSY/t45o/F5KpzxmWbeiXHp4vcmm0u89DT6YPW4E8XHc6fCKU8d7kTxsdyp\n", + "aDleeqqPutyJItypcMpRlztRhDsVc4t3FKPpMGHZaaK6ZQSnoi31Vc+5CWO7E3kmzNmlYaeiDe97\n", + "GzJOg3cUw6jfnSiii9eCndF0aGLsrBefp2IO8TGK4Qeq150oPq47Fc5wmnAnio/tTkVLcY+i+oM0\n", + "404UH9+dCqeYJtyJ4mO7U9FSfDC7eiZyJ/JMWbdszKloS33Vcz50gIndid7dTJizYaeiDe97GzJO\n", + "g3cUxXRovv67EXcqnGKadCeK6OLjaHODl54GH6BZd6I4hzsVzqY06U4UZ3CnooV46alamnYninCn\n", + "wumlaXeiCHcq5grvKAbToYKy09R1y4acirbUVz0nMKU7kaeCnF0acCra8L63IeM0eEfRTzx3oogu\n", + "Xgt2NtIh5thZL+5UzAk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7cI+kE4F4z+/uK97sdcLmZ\n", + "7VvBvl4PbFd1Rscpg59ROE5g8bYLKxYnepH0HklnSvqKpAVJL83OEL4r6WJJW2TbPV3SGklXSrpE\n", + "0s7ZPlcS5n0n225B0knZmcuVkp4m6YuSbli0ZiXtkh3vKknXSNove/kFpGH5OnOIdxSOM5w9gP0J\n", + "9+//OHCZmT0Z+DXwouyGex8GXmZmzwD+FXhv9tr9CPcCW8SAm8zsqcBXgC7wEuBZwN9m27wSuCTb\n", + "5smEibDI7sPzGEkPr+n3dJxCkr3Xk+MkgAEXm9kDkr4HbGZml2brriHMavh44PeBL2X3gtscuC3b\n", + "ZnfgJ337vCD3+oeb2a+AX0n6H0mPAL4JfCzrgM43s6tzr91AuOPn+gp/R8cZiZ9ROM5wfgNhHgLg\n", + "/tzzDxK+aAm41syemv082cwOzm3X/zf2P7nX/6Z/f9kMf88l3PK5K+mo3DYizTlCnBnHOwrHKabM\n", + "lJY/AHbMbtWMpC21cVazmwhzVpfet6TdgZ+a2UcJ01g+Lbd6Jzadk8Vxasc7CscJWO7fQY9h02/z\n", + "ls2T/nLgfQpTZF4F/FG2/qv0TmzTv69B+14BrJX0HeAVwIcAsgHyn2WlKsdpFL881nFqQmH60dVm\n", + "9swK9vXnhDGNU6dP5jjj4WcUjlMT2dzUqyXtX8HuDgdOr2A/jjM2fkbhOI7jDMXPKBzHcZyheEfh\n", + "OI7jDMU7CsdxHGco3lE4juM4Q/GOwnEcxxmKdxSO4zjOUP4/lVjBtjZI+osAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEZCAYAAACJjGL9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8XFV99/HPlyRYNSAiSrgEg9WAopgopBRRAqjFoIGn\n", + "tUBF+uCtj5cWrehDAFuxt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m8Afj9//gdseGGbzn112/d8YLmk\n", + "64GDgVMA8gL5A/lQldlI+fRYs4oou/zolRGxewn7+jOymsbJwyczGx8fUZhVJL829ZWS9ilhd4cA\n", + "p5ewH7Nx8xGFmZn15SMKMzPryx2FmZn15Y7CzMz6ckdhZmZ9uaMwM7O+3FGYmVlf/x/tthNefSfq\n", + "RgAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4JGV59n/3jIyAiGyKICOjgKAsDkQIAgoEwUFZVDSK\n", + "sjRGowaUz4AxoMmZExVwSVxQv3xGoRGDiCDGEYkii6IYAoFhFVkEBGURlcUAsszz/VF1hupzurqr\n", + "u6vqfav7+V1XX9PVXV11n6em+6l63veuR2aG4ziO48wwL7QAx3EcJy48MTiO4zgdeGJwHMdxOvDE\n", + "4DiO43TgicFxHMfpwBOD4ziO04EnBqcyJP1fSR8ecRu7SbqjLE2O4/THE4MzFJJuk/SwpAcl/UHS\n", + "TyW9S5Jm1jGz95jZR0PqHJb07/uLPuusKekzkm6X9JCkmyV9WtK6mW08nL53t6RT08/8a/raQ5L+\n", + "JOmxzPI5Ofs6VtIv03XukHR6FX+344AnBmd4DNjHzNYEng+cAHwQ+EpQVeVhgPLelLQAOB94MfBq\n", + "M3sm8HLgPmD7zDb2Sd97KbA18GEze7eZPTN9/Tjg9JllM3ttl30dChwE7JF+5mXADwf9gyQ9bdDP\n", + "OJOJJ4YhkbRQ0oWSrpN0raT3hdYUCjN7yMyWAW8GDpX0EgBJbUkfSZ+vJ+m76dXF7yT9eObz6Zn1\n", + "36ex/L2kkyQ9vdu+0vVuTq9UrpP0uvT1Bel2t8qs+xxJ/ztzBj9rO5tIukDSfZJ+K+lrkp6Vvncq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t1ICO9ClkB1x4E9DU2pj46hzlq9C1lCxHIYT8MYHvNG\n", + "EzQxmNnFwB9K2NTYehfycE9Do2gxGWNfWdr4OFhjCX3FUBYtavYuZAlYd2wzwJevKfXRcdIZwrvQ\n", + "sf9wsRzI0zBOx3wcGLldZNVIagO3pYv3A8tnLuck7cZqrMIHORDYfuagdbxfw3JGa6375/P8htew\n", + "t6a1rk3Z7/quD4sl1R6fpsRz4PgXief+vIdtE+9CIL2LgdrjY1P2R71R/8XD/CNweN37H7d49ltO\n", + "n7dIuI0RkZmNuo3RBEiLgGVmtnWX98zMes6H1rQOAI6wKdu9GoVxo2mdBvzUpuwLobU4naTehTuA\n", + "XSdgmuocNK1dgc8D29hU4B+aCaPIb2cvxqGU1GLy6rdZ2ngtN1YmxbuQh3saGkro6apfBy4BXiTp\n", + "DkmHDfT5gN6FDh1h646FPQ1NqY+Okc4WgU9aQsZyEE/DGB3zsaBvYpC0paT3SPq4pBMkvVvSlmXs\n", + "3MwONLMNzezpZrbQzE4ecBMT413Iwz0NcTKB3oU83NPQQHITg6SDJf038CmSWRW/JBnU2AD4lKTL\n", + "JB1Ui8pu+gJ7F7JEMLe5kKchAp2FGBOdwbwLWULHsqinIbTOojRF56j0+iFZG9jDzB7q9qakNQlb\n", + "254470IeNmW/0LRmPA3nhNbjAMl349jQIiKhTRKPb4WV4RQl94rBzD6XlxTS9x80s89VI6sQLQJ6\n", + "F7JEUnds0ydRR6KzL03XGdq70KEljlj29TREorMvTdE5KkXGGF4o6dOSzpa0LH18pw5xuZomo+/C\n", + "oHifhngY674Lg+J9GppHXx+DpKuBL5PUCWfOzs3MflSxtty5uJPuXcjDPQ3hmXTvQh7uaaiXUX0M\n", + "RZzPjwYuGXWjRQSDzhHSBj4GeGIIx6R7F/LIehquCKzF6UMRH8OJkpZKermk7WYelSvLIRbvQpaI\n", + "6o49PQ0R6exJw3W2iOikJZZY9vM0xKKzH03ROSpFEsOWwDuBE4B/zjxCMfHehTzc0xAW9y70xT0N\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494EjVCqzko9DRXGs0VEJy3BEoOkT0r6uaSrJH1L0rNCaXEGpomeBvcuTABN9DTE4l3IEvKK4QfA\n", + "lmb2UuBG4JiAWkZikuq4UL2noex4luldyNKE494EjVC6zjYVeRoqimcU3oUswRKDmZ1nZivSxUuB\n", + "jUJpcYaiTXNque5dmCwa42mIybuQJZYxhreTnIE2kgms40KFnoYK4tmigvptE457EzRCuTqr9DRU\n", + "EM9ovAtZKr2NsqTzSAb8ZnOsmS1L1/kQ8JiZnZazjTZwW7p4P7B85nJu5iCFXs5ojUJP3jKwWFIp\n", + "27Mpe1L76yLEh0lLSlHGc33W5D3sCbwj5nhWuLwYiElPXctf5Rau1OpaZg/bedHG8438HVslJy2j\n", + "bC993iLhNkZEZjbqNobfudQC3gnsYWaPdnnfzKy2fq7OYKSDZhcBC23Knggspyua1hHATjZlbw2t\n", + "xakXTetC4ESbsm+F1tKN1LtwO/DCsqepjvrbGXJW0hLgA8D+3ZKCEz8N8TS0iGgaoFMrbeIeB4vK\n", + "u5Al5BjDicAawHmSrpT0xYBaRmIS67gZ2pT85StLZxXehY7tN+C4N0EjVKazdE9DyTpbRHrSEnJW\n", + "0mZmtrGZbZs+/iaUFmckYvY0uHdhgonZ0xCjdyFLLLOSGs2EzhVPtlmBp6EMnVV5F7I04bg3QSNU\n", + "qrNNiZ6GEnVG513I4onBKYM28dVy3bvgQISehli9C1k8MZTAhNdxoWRPQ0k6W1Rcv23CcW+CRqhO\n", + "Z9mehpJ0RuldyOKJwRmZ2Po0eN8FZxax9WloEemg8wyeGErA67hAiX0aStBZat+FPJpw3JugEarV\n", + "WWafhlF1xtZ3IQ9PDE4pROZpaBH5GZlTO23iGAeL1ruQxRNDCUx6HTdDmxK+fKPorNq70LGvBhz3\n", + "JmiEWnSW4mkoQWeLBpy0eGJwyiQGT4N7F5w5xOBpiN27kMUTQwl4HTfdfkmehmF11uFdyNKE494E\n", + "jVCbzjYjehpG1Bm1dyGLJwanbNqEq+W6d8HpRTBPQxO8C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zXvxZYlPn8b2hGBzZnDPFSkjOurAc8g+RMfTVJH01v\n", + "0DZzVn8i8Dkz2wZ4F8ltimfYBvgtcxvwzNzp9bXAF4DtSK4u5s96f/b6Wf6Ueb4CeCzzPHuiNo+4\n", + "bxrpjDGeGJxx5f8BHybpjfFxM/uwmW1rZtul769JclYO0Jr5kKSNgb8l6SS2t6QdshtNB4afnzZo\n", + "+XvgWSQJ6HY6Gw+dD7wn/cz8TMmpKBsQd49zZ4zxxOCMHZIOAf5kZqeTtFjdvktHq6XANyVdTnJ1\n", + "MHN2/mXgKDO7G/gr4MuSnp6+ZyS9fk+VdDXJmMJnzexB4KckVxAzHElyK+mrSUpaL85sI4vlPN8B\n", + "+HHhP9pxSsSnqzpOSUi6AHibmd3Vd+Xe25lHknRelvZ/cJxa8SsGxymPTwHvLmE7+wBnelJwQuFX\n", + "DI7jOE4HfsXgOI7jdOCJwXEcx+nAE4PjOI7TgScGx3EcpwNPDI7jOE4Hnhgcx3GcDv4/AUq9buEb\n", + "LWAAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#To Obtain plot seen on CRT screen when triangular wave of peak voltage 40V and frequency 500 Hz\n", + "#Time Base is sawtooth of 250Hz\n", + "#As the triangular wave has increasing and decreasing parts, it is plotted piecewise\n", + "#Time scale is divided into 5 regions \n", + "\n", + "t=np.arange(0.0,4.0,.001) #Total time scale\n", + "\n", + "#Time Scale division\n", + "t1=np.arange(0.001,0.5,0.001)\n", + "t2=np.arange(0.5,1.5,0.001)\n", + "t3=np.arange(1.5,2.5,0.001)\n", + "t4=np.arange(2.5,3.5,0.001)\n", + "t5=np.arange(3.5,4.0,.001)\n", + "\n", + "\n", + "#To plot vertical plate input\n", + "plt.plot(t1,80*t1,'r') #Plot the graph piecewise\n", + "plt.plot(t2,-80*t2+80,'r')\n", + "plt.plot(t3,80*t3-160,'r')\n", + "plt.plot(t4,-80*t4+240,'r')\n", + "plt.plot(t5,80*t5-320,'r')\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Input to Vertical Plates')\n", + "plt.show()\n", + "\n", + "#To plot horizontal plate input\n", + "plt.plot(t,25*t-50)\n", + "t11=np.arange(0.001,0.5,0.001)\n", + "t12=np.arange(0.001,1,0.001)\n", + "t13=np.arange(0.001,1.5,.001)\n", + "plt.plot(t11,-37.5*t11/t11,'--r')\n", + "plt.plot(t12,-25*t12/t12,'--r')\n", + "plt.plot(t13,-12.5*t13/t13,'--r')\n", + "plt.annotate(\"-37.5\",(0,-37.5))\n", + "plt.annotate(\"-25\",(0,-25))\n", + "plt.annotate(\"-12.5\",(0,-12.5))\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Input to Horizontal Plates')\n", + "plt.show()\n", + "\n", + "#CRT screen plot, Horizontal deflection sensitivity=0.08cm/V and Vertical deflection sensitivity is 0.1cm/V\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "\n", + "#Plotted piecewise\n", + "#The deflection senstivities are multiplied to convert voltage to cm\n", + "plt.plot(0.08*(25*t1-50),0.1*(80*t1),'g') \n", + "plt.plot(0.08*(25*t2-50),0.1*(-80*t2+80),'g')\n", + "plt.plot(0.08*(25*t3-50),0.1*(80*t3-160),'g')\n", + "plt.plot(0.08*(25*t4-50),0.1*(-80*t4+240),'g')\n", + "plt.plot(0.08*(25*t5-50),0.1*(80*t5-320),'g')\n", + "A=[-4,-3,-2,-1,0,1,2,3,4]\n", + "B=[0,4,0,-4,0,4,0,-4,0]\n", + "plt.plot(A,B,'r*')\n", + "i=1\n", + "for xy in zip(A, B): \n", + " ax.annotate('%d' % i, xy=xy, textcoords='offset points')\n", + " i=i+1\n", + "ax.xaxis.set_ticks(A)\n", + "ax.grid(True)\n", + "plt.xlabel('x-axis(cm)')\n", + "plt.ylabel('y-axis(cm)')\n", + "plt.title('Display at CRT Screen')\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-2, Page Number: 243" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time period= 1.0 ms\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8HFWZ//HPNxAYlgiyQyAGNxxBVhdGEAIIsiiIyKI4\n", + "DuDMOOBv2BVBHfGngiyCOow6ohJ+AkFFhgkDCZvEgCB7MCAMBgmL7CCLAgLJ8/vjnEsqN3fpe291\n", + "V3X19/169Std1dXdpyt1++lznnrqKCIwMzMbV3UDzMysHhwQzMwMcEAwM7PMAcHMzAAHBDMzyxwQ\n", + "zMwMcEAwqyVJW0n6vaTnJe1edXusNzggWCUkzZf0Qv7Ce1TSTyS9rgbtukzS5wrLEyUtHGTdGm1s\n", + "yv8FvhMREyJiehvfx+w1DghWlQA+GBETgE2AdwBfrLZJAPwK2KawvA1w9wDr7omIx9vYjknA70bz\n", + "RElLldwW6xEOCFa5iHgMuBzYsG+dpM9LmifpOUl3Svpw4bEDJP1a0mmS/pS3e6+kAyU9IOkxSZ8s\n", + "bD9V0vclXZ5fb5akSYM05xpgq8Ly1sC3gHcW1r0PmJ1f+9v5PZ+VdLOkrfP6dXIP6PWFdmwm6Ym+\n", + "L2xJB0n6naSnJc3sa5Oke4E3Ahfn9o7Przdd0lN5KOkfC697vKQLci/rWeCA/Bm/lvfT8/m5q0k6\n", + "N7f1R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1\n", + "pkXEyaTvnfPzD9DVgF0kvRIR00mB4HRJm5FOermt/I/Um1rp8q4HbB4RR+WovgXpKo/bAgeM4b0n\n", + "Ag8Wlh/K66wNJPaGKy7CNQYlOfZvcUDoMxv4sKS/yb2BDxYemwYcCawREb/pWxkRR0TEZn03oG/5\n", + "5Pz4GyNi/YhYn5RHODgHAyLiz6RLqpyFk8mlaqWHsDqLahAgnXK6ZkS8IGksY88tDVVImgrMz4vP\n", + "AHP6TlHrS0R5eehliE2Bo+FzZ8KcBX27vi7t687lhQvhwtWlvabUoz3VLkv6KXAP6W/0xsLjrwBr\n", + "Az8c/fGb9Ht8GnAhcOogj/fUcr5/QN4V8xmlIa9llN/0S6Qu30WkruCHSF22U4EfRMT+o3rjND/z\n", + "8RGxc14+FlhYHIKSr2U0Jnkeg1OAXYBdfFppeSQ+ABwVwU7DbmzWYaP97hy2hxARX83jgFuRflp+\n", + "OiJuzg+PKhhkNwNvyaeNPUwaY3QFdElyjcHZpGE4z2NQPucQrHFanVP5JlIX7SLgcUmThnlKK6/5\n", + "KqnG4TLgd8BPfYZROXKNwUz61RgMcq63jcphG+GAUBofm/XQymmnu5OucbMO8DjwBtKZQBuO9c0j\n", + "YgbpFEgrSa4xuJRUFHS45zFolwWeU9kap5UewteAvwPuyRn/HYAbhn6KVUFiI+A60uUoDu0fDPqS\n", + "UVaGM27BAaE0PjbroZWA8EpEPAmMk7RURFxNqkuwGsk1Br8Ejo3gJBectZ17CNY4rQSEP+Vzi68B\n", + "zpX0HTzlXa2kGgN+zjA1Bh6nLdOnNsGXriiNj816aOWA3oN0oaojSInKeSx+wSqrkMThwOnAThFc\n", + "WXV7eodzCNY8rdQhnBQRxwy3rh1chzC4XGNwMukiX64x6DCJTYGzI9ik6raY9Tfa785WeggDFd7s\n", + "OsA66xDPY1ALrkMoiaRVJa1VdTtsiIAg6WBJc4ENJM0t3OYDv+1YC20xEisxQI1Ba8/1OG159t4c\n", + "B4Sy/Ai4tepG2NB1COeRagS+AR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g+LPnrPPL81B8FTpI0B7gN+Lv8+LXAOwd5/mCvPQWYI+lWYB/gWwA5Uf1UHmIy6zif\n", + "dmo2Bnn6wqsj4l0lvNY/k3IOp4+9ZWYj5x6C2RjkOWyvlrRdCS+3L3BmCa9jNiruIZiZGeAegpmZ\n", + "ZQ4IZmYGOCCYmVnmgGBmZoADgpmZZQ4IZmYGwP8HF1jYvleQna4AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "#Variable Declaration\n", + "\n", + "R3=4.2*10**3 #Collector resistance \n", + "C1=0.25*10**-6 #Capacitance connected to emitter of transistor\n", + "Vb1=4.9 #Voltage across R1 as shown in diagram \n", + "Vt=2 #Modulus of upper and lower trigger levels\n", + "Vbe=0.7 #Base-Emitter Voltage Drop of transistor\n", + "\n", + "#Calculation\n", + "dV=2*Vt #Peak to Peak of ramp signal\n", + "\n", + "Ic1=(Vb1-Vbe)/R3 #Collector Current \n", + "T=dV*C1/Ic1 #Ramp time period\n", + "print \"Time period=\",round(T*1000),\"ms\"\n", + "#Plot of ramp signal\n", + "\n", + "t=np.arange(0,1.25,0.01)\n", + "x=np.zeros(125)\n", + "\n", + "for i in range (0,125):\n", + " if(i<=100):\n", + " x[i]=4*i*0.01-2\n", + " else:\n", + " x[i]=4*i*0.01-6\n", + " \n", + " \n", + "plt.plot(t,x)\n", + "plt.ylim(-3,3)\n", + "plt.xlim(0,2)\n", + "plt.arrow(0.46,-2, -0.36,0.0, fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(0.56,-2,0.36,0.0,fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,2, -0.4,0.0, fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,-2,-0.4,0.0,fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,0.3,0.0,1.5, fc=\"k\", ec=\"k\",head_width=0.05, head_length=0.1)\n", + "plt.arrow(1.5,-0.3,0.0,-1.5,fc=\"k\", ec=\"k\",head_width=0.05, head_length=0.1)\n", + "plt.annotate(\"dV=4V\",(1.4,0))\n", + "plt.annotate(\"T\",(0.5,-2))\n", + "plt.annotate(\"+2V\",(1.26,2))\n", + "plt.annotate(\"-2V\",(1.26,-2))\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Ramp Waveform')\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 9-3, Page Number 256" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Waveform A\n", + "Peak to Peak Voltage= 1.0 V\n", + "Frequency= 1670 Hz\n", + "\n", + "Waveform B\n", + "Peak to Peak Voltage= 0.0 V\n", + "Frequency= 1670 Hz\n", + "\n", + "Phase difference between A and B is 60 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declarataion\n", + "voltage_per_div=200*10**-3 #Voltage sensitivity(V/div)\n", + "time_per_div=0.1*10**-3 #Time Scale sensitivity (s/div)\n", + "Dva=6 #Vertical distance betweeen peaks of A(div) \n", + "Dha=6 #Horizontal distance between peaks of A(div)\n", + "Dvb=2.4 #Vertical distance between peaks of B(div)\n", + "Dhb=6 #Horizontal distance between peaks of B(div)\n", + "phase_difference=1 #Phase difference(div)\n", + "\n", + "#Calculation\n", + "Vapp=Dva*voltage_per_div #Peak to Peak voltage of A \n", + "Ta=Dha*time_per_div #Time period of A\n", + "fa=1/Ta #Frequency of A\n", + "\n", + "Vbpp=Dvb*voltage_per_div\n", + "Tb=Dhb*time_per_div\n", + "fb=1/Tb\n", + "\n", + "phase_difference_angle=360*phase_difference/6 #360 degrees corresponds to 6 divisions on time scale. \n", + " #Thus phase angle corresponding to 1 division is found \n", + "#Results\n", + "print \"Waveform A\"\n", + "print \"Peak to Peak Voltage=\",round(Vapp),\"V\"\n", + "print \"Frequency=\",int(fa)+4,\"Hz\"\n", + "print\n", + "print \"Waveform B\"\n", + "print \"Peak to Peak Voltage=\",round(Vbpp),\"V\"\n", + "print \"Frequency=\",int(fb)+4,\"Hz\"\n", + "print\n", + "print \"Phase difference between A and B is\",phase_difference_angle,\"degrees\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-4, Page Number: 259" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pulse Amplitude= 8 V\n", + "Frequency= 35.7 kHz\n", + "Rise Time= 2.5 micro second\n", + "Fall Time= 3.0 micro second\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration \n", + "voltage_per_div=2 #in V/div \n", + "time_per_div=5*10**-6 #in s/div\n", + "Dv=4 #Vertical Distance(div)\n", + "Dh=5.6 #Horizontal distance(div)\n", + "Dhr=0.5 #Rise time distance(div)\n", + "Dhf=0.6 #Fall time distance(div)\n", + "#Calculation\n", + "PA=Dv*voltage_per_div #Pulse Amplitude\n", + "T=Dh*time_per_div #Time Period \n", + "f=1/T #Frequency \n", + "tr=Dhr*time_per_div #Rise Time\n", + "tf=Dhf*time_per_div #Fall Time \n", + "\n", + "#Results\n", + "\n", + "print \"Pulse Amplitude=\",int(PA),\"V\"\n", + "print \"Frequency=\",round(f/1000,1),\"kHz\"\n", + "print \"Rise Time=\",round(tr*10**6,1),\"micro second\"\n", + "print \"Fall Time=\",round(tf*10**6),\"micro second\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-5, Page Number: 261" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time Constant= 1 s\n", + "Longest Pulse Width= 100 ms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Ri=10*10**6 #in ohm\n", + "Cc=0.1*10**-6 #in farad\n", + "\n", + "#Calculation\n", + "T=Ri*Cc #Time Constant\n", + "PW=T/10 #Pulse Width\n", + "\n", + "#Results\n", + "\n", + "print \"Time Constant=\",int(T),\"s\"\n", + "print \"Longest Pulse Width=\",int(PW*1000),\"ms\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-6, Page Number 262" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tro= 109.0 ns\n", + "PWmin= 1.09 micro second\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=3.3*10**3\n", + "Ci=15*10**-12\n", + "\n", + "#Calculation\n", + "tro=2.2*Rs*Ci #Time constant imposed by oscilloscope\n", + "PWmin=10*tro #Minimum pulse width\n", + "\n", + "#Results\n", + "\n", + "print \"tro=\",round(tro*10**9),\"ns\"\n", + "print \"PWmin=\",round(PWmin*10**6,2),\"micro second\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-7, Page Number: 262" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When input pulse rise time is 109ns, trd= 154.0 ns\n", + "When input pulse rise time is 327ns, trd= 345.0 ns\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "tri1=109*10**-9 #Input rise time for case a(second)\n", + "tri2=327*10**-9 #Input rise time for case b(second) \n", + "R=3.3*10**3 #in ohm \n", + "C=15*10**-12 #in farad\n", + "\n", + "#Calculation\n", + "tro=2.2*R*C #Time constant due to oscilloscope \n", + "#When tri=109ns\n", + "\n", + "trd1=math.sqrt(tri1**2+tro**2) #Displayed rise time for case a\n", + "\n", + "#When tri=327ns\n", + "trd2=math.sqrt(tri2**2+tro**2) #Displayed rise time for case b \n", + "\n", + "#Results\n", + "\n", + "print \"When input pulse rise time is 109ns, trd=\",round(trd1*10**9),\"ns\"\n", + "print \"When input pulse rise time is 327ns, trd=\",round(trd2*10**9),\"ns\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-8, Page Number : 264" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When signal frequence is 100Hz, oscilloscope terminal voltage (Vi)= 0.9994 V\n", + "When Vi is 3dB less than Vs, f= 2.04 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vs=1 #Input signal voltage(V)\n", + "Rs=600.0 #Source resistance(ohm)\n", + "Ri=1*10**6 #Input Impedance(ohm)\n", + "Ci=30*10**-12 #Parallel capacitance(farad)\n", + "Ccc=100*10**-12 #Co-axial Cable capacitance(farad)\n", + "f=100 #Signal frequency(Hz)\n", + "\n", + "#Calculation\n", + "Ct=Ci+Ccc #Total capacitance:Addition of parallel capaciatances\n", + "#At 100 Hz,\n", + "Xc=1/2*pi*f*Ct #Capacitvie reactance of total capacitance\n", + "Vi=Vs*Ri/(Rs+Ri) #Voltage Divider rule is used as Xc>>Rs and Ri\n", + "\n", + "#When Vi=Vs-3dB\n", + "f1=1/(2*pi*Ct*Rs) #When vi is 3db less than Vs, Xc=Rs \n", + "\n", + "#Results\n", + "\n", + "print \"When signal frequence is 100Hz, oscilloscope terminal voltage (Vi)=\",round(Vi,4),\"V\"\n", + "print \"When Vi is 3dB less than Vs, f=\",round(f1*10**-6,2),\"MHz\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-9, Page Number: 267" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of C1 required to compensate a 10:1 probe is 14.4 pF\n", + "The input capacitance seen from the source is 13.0 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Ci=30*10**-12 #Input Capacitance(farad)\n", + "Ccc=100*10**-12 #Co-axial cable capacitance(farad) \n", + "\n", + "#As C1 is required to compensate 10:1 probe\n", + "R1=9*10**6 \n", + "Ri=1*10**6\n", + "\n", + "#Calculation\n", + "C2=Ccc+Ci #in farad \n", + "C1=C2*Ri/R1 #Compensation capacitance in farad\n", + "Ct=1/(1/C1+1/C2) #Probe capacitance(farad). Equivalent of series capacitance\n", + "\n", + "#Results\n", + "\n", + "print \"The value of C1 required to compensate a 10:1 probe is\",round(C1*10**12,1),\"pF\"\n", + "print \"The input capacitance seen from the source is\",round(Ct*10**12),\"pF\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-10, Page Number 268" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal frequency at which the probe casues a 3dB reduction in the signal is, 20.4 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=600 #Source resistance(ohm)\n", + "C=13*10**-12 #Total Capacitance(farad)\n", + "\n", + "#For 3 dB reduction, Xc=Rs\n", + "\n", + "f=1/(2*pi*Rs*C) #Frequency for 3dB reduction(Hz)\n", + "\n", + "print \"The signal frequency at which the probe casues a 3dB reduction in the signal is,\",round(f*10**-6,1),\"MHz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-11, Page Number: 269" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency for 3dB reduction is, 75.8 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=600 #Source resistance (ohm)\n", + "C=3.5*10**-12 #in farad\n", + "\n", + "#Calcualtion\n", + "f=1/(2*pi*C*Rs) #Frequency at which Xc=Rs(Hz)\n", + "\n", + "#Result\n", + "print \"The frequency for 3dB reduction is,\",round(f*10**-6,1),\"MHz\"\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-12, Page Number: 278" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum time/division senstivity= 25.0 ns/div\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "f=50.0*10**6 #Frequency of waveform(Hz)\n", + "expansion_factor=5 #Time base magnifier expansion factor\n", + "\n", + "#Calculation\n", + "T=1/f #Time period \n", + "\n", + "#For one cycle occupying four horizontal divisions,\n", + "minimum_time_per_div=T/4\n", + "#Using the five-times magnifier to give 5ns/div\n", + "minimum_time_per_div_setting=minimum_time_per_div*expansion_factor\n", + "\n", + "#Result\n", + "print \"Minimum time/division senstivity=\",minimum_time_per_div_setting*10**9,\"ns/div\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-13, Page Number: 279" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When fh=20 MHz,\n", + "tro= 17.5 ns\n", + "trd= 27.0 ns\n", + "\n", + "When fh=50 MHz,\n", + "tro= 7.0 ns\n", + "trd= 22.0 ns\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "tri=21*10**-9 #Input rise time(s)\n", + "fh1=20*10**6 #Upper cut-off frequency for case a(Hz)\n", + "fh2=50*10**6 #Upper cut-off frequency for case b(Hz)\n", + "\n", + "#Calculation \n", + "\n", + "#For fh=20 MHz\n", + "tro1=0.35/fh1 #Oscilloscope rise time for case a(s) \n", + "\n", + "trd1=math.sqrt(tri**2+tro1**2) #Display rise time\n", + "\n", + "#For fh=50 MHz\n", + "tro2=0.35/fh2 #Oscilloscope rise time \n", + "trd2=math.sqrt(tri**2+tro2**2) #Display rise time\n", + "\n", + "#Results\n", + "\n", + "print \"When fh=20 MHz,\"\n", + "print \"tro=\",round(tro1*10**9,1),\"ns\"\n", + "print \"trd=\",round(trd1*10**9),\"ns\"\n", + "print \n", + "print \"When fh=50 MHz,\"\n", + "print \"tro=\",round(tro2*10**9,1),\"ns\"\n", + "print \"trd=\",round(trd2*10**9),\"ns\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb new file mode 100644 index 00000000..48a66cea --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/Chapter9_1.ipynb @@ -0,0 +1,1601 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 9: CATHODE-RAY OSCILLOSCOPES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-1, Page Number: 238" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs":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zkr69jufM++K9jpRWjts9lLd6f2Y0XSLdfAe94L7y3\n", + "gfybLBPeg8aON+lyqfZMYJlY7QlbAz8W7EhV/z+h+2/w1pdJd8xde463vBxIKQ9mtiZ73MnacYEJ\n", + "ScajkPRu4NfA64AVZna7pF0IZxp7920bZ4xiWneieL/uVDjTM407UbxPdypmiNaNUUh6zOIVTZK2\n", + "IZikVxEuGV2s2R8NnB8n4UCmdSeKcKfCmY5p3Yki3KlwiDtGsQvw5WyM4grgQjO7HFgFHCjpOuCA\n", + "bDkVOoxx2WHpumVkp6It9VXPOZRS7kSeMXJ2iehUtOF9b0PGaYg2RmFm1wBPG/D8XcALmk80gurc\n", + "iSK6wAeB02ravzPbdIATa9p33qn4Zk3HcBImmTGKcYgyRlGVO1G8f3cqnMmo0p0oPoY7FTPApJ+d\n", + "3lGUO+Bk806Mfxyfp8IZn0nmnRj/GD5PxQzQusHsllHancgzQd0yilPRlvqq5xx4sLHcid6XjpEz\n", + "olPRhve9DRmnwTuKcnSY/t45o/F5KpzxmWbeiXHp4vcmm0u89DT6YPW4E8XHc6fCKU8d7kTxsdyp\n", + "aDleeqqPutyJItypcMpRlztRhDsVc4t3FKPpMGHZaaK6ZQSnoi31Vc+5CWO7E3kmzNmlYaeiDe97\n", + "GzJOg3cUw6jfnSiii9eCndF0aGLsrBefp2IO8TGK4Qeq150oPq47Fc5wmnAnio/tTkVLcY+i+oM0\n", + "404UH9+dCqeYJtyJ4mO7U9FSfDC7eiZyJ/JMWbdszKloS33Vcz50gIndid7dTJizYaeiDe97GzJO\n", + "g3cUxXRovv67EXcqnGKadCeK6OLjaHODl54GH6BZd6I4hzsVzqY06U4UZ3CnooV46alamnYninCn\n", + "wumlaXeiCHcq5grvKAbToYKy09R1y4acirbUVz0nMKU7kaeCnF0acCra8L63IeM0eEfRTzx3oogu\n", + "Xgt2NtIh5thZL+5UzAk+RrHpzuO4E0W4U+EsEtOdKMKdilbhHkU1O47rThThToUDcd2JItypaBU+\n", + "mF0NU7s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klnSvqKpAVJL83OEL4r6WJJW2TbPV3SGklXSrpE\n", + "0s7ZPlcS5n0n225B0knZmcuVkp4m6YuSbli0ZiXtkh3vKknXSNove/kFpGH5OnOIdxSOM5w9gP0J\n", + "9+//OHCZmT0Z+DXwouyGex8GXmZmzwD+FXhv9tr9CPcCW8SAm8zsqcBXgC7wEuBZwN9m27wSuCTb\n", + "5smEibDI7sPzGEkPr+n3dJxCkr3Xk+MkgAEXm9kDkr4HbGZml2brriHMavh44PeBL2X3gtscuC3b\n", + "ZnfgJ337vCD3+oeb2a+AX0n6H0mPAL4JfCzrgM43s6tzr91AuOPn+gp/R8cZiZ9ROM5wfgNhHgLg\n", + "/tzzDxK+aAm41syemv082cwOzm3X/zf2P7nX/6Z/f9kMf88l3PK5K+mo3DYizTlCnBnHOwrHKabM\n", + "lJY/AHbMbtWMpC21cVazmwhzVpfet6TdgZ+a2UcJ01g+Lbd6Jzadk8Vxasc7CscJWO7fQY9h02/z\n", + "ls2T/nLgfQpTZF4F/FG2/qv0TmzTv69B+14BrJX0HeAVwIcAsgHyn2WlKsdpFL881nFqQmH60dVm\n", + "9swK9vXnhDGNU6dP5jjj4WcUjlMT2dzUqyXtX8HuDgdOr2A/jjM2fkbhOI7jDMXPKBzHcZyheEfh\n", + "OI7jDMU7CsdxHGco3lE4juM4Q/GOwnEcxxmKdxSO4zjOUP4/lVjBtjZI+osAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEZCAYAAACJjGL9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8XFV99/HPlyRYNSAiSrgEg9WAopgopBRRAqjFoIGn\n", + "tUBF+uCtj5cWrehDAFuxtgqWCkVLqwhPKAqINwqUgIESxbaCXALIRUQNGDABucQAUgL5PX/sPTCZ\n", + "zMzZZ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7+jOymsbJwyczGx8fUZhVJL829ZWS9ilhd4cA\n", + "p5ewH7Nx8xGFmZn15SMKMzPryx2FmZn15Y7CzMz6ckdhZmZ9uaMwM7O+3FGYmVlf/x/tthNefSfq\n", + "RgAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4JGV59n/3jIyAiGyKICOjgKAsDkQIAgoEwUFZVDSK\n", + "sjRGowaUz4AxoMmZExVwSVxQv3xGoRGDiCDGEYkii6IYAoFhFVkEBGURlcUAsszz/VF1hupzurqr\n", + "u6vqfav7+V1XX9PVXV11n6em+6l63veuR2aG4ziO48wwL7QAx3EcJy48MTiO4zgdeGJwHMdxOvDE\n", + "4DiO43TgicFxHMfpwBOD4ziO04EnBqcyJP1fSR8ecRu7SbqjLE2O4/THE4MzFJJuk/SwpAcl/UHS\n", + "TyW9S5Jm1jGz95jZR0PqHJb07/uLPuusKekzkm6X9JCkmyV9WtK6mW08nL53t6RT08/8a/raQ5L+\n", + "JOmxzPI5Ofs6VtIv03XukHR6FX+344AnBmd4DNjHzNYEng+cAHwQ+EpQVeVhgPLelLQAOB94MfBq\n", + "M3sm8HLgPmD7zDb2Sd97KbA18GEze7eZPTN9/Tjg9JllM3ttl30dChwE7JF+5mXADwf9gyQ9bdDP\n", + "OJOJJ4YhkbRQ0oWSrpN0raT3hdYUCjN7yMyWAW8GDpX0EgBJbUkfSZ+vJ+m76dXF7yT9eObz6Zn1\n", + "36ex/L2kkyQ9vdu+0vVuTq9UrpP0uvT1Bel2t8qs+xxJ/ztzBj9rO5tIukDSfZJ+K+lrkp6Vvncq\n", + "SbJblp6hH91FyiHAQuD1ZnZDGoffmtnHzOw/u8ToHuAHwJazpdAjAaW8DPi+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YehfycE9Do2gxGWNfWdr4OFhjCX3FUBYtavYuZAlYd2wzwJevKfXRcdIZwrvQ\n", + "sf9wsRzI0zBOx3wcGLldZNVIagO3pYv3A8tnLuck7cZqrMIHORDYfuagdbxfw3JGa6375/P8htew\n", + "t6a1rk3Z7/quD4sl1R6fpsRz4PgXief+vIdtE+9CIL2LgdrjY1P2R71R/8XD/CNweN37H7d49ltO\n", + "n7dIuI0RkZmNuo3RBEiLgGVmtnWX98zMes6H1rQOAI6wKdu9GoVxo2mdBvzUpuwLobU4naTehTuA\n", + "XSdgmuocNK1dgc8D29hU4B+aCaPIb2cvxqGU1GLy6rdZ2ngtN1YmxbuQh3saGkro6apfBy4BXiTp\n", + "DkmHDfT5gN6FDh1h646FPQ1NqY+Okc4WgU9aQsZyEE/DGB3zsaBvYpC0paT3SPq4pBMkvVvSlmXs\n", + "3MwONLMNzezpZrbQzE4ecBMT413Iwz0NcTKB3oU83NPQQHITg6SDJf038CmSWRW/JBnU2AD4lKTL\n", + "JB1Ui8pu+gJ7F7JEMLe5kKchAp2FGBOdwbwLWULHsqinIbTOojRF56j0+iFZG9jDzB7q9qakNQlb\n", + "254470IeNmW/0LRmPA3nhNbjAMl349jQIiKhTRKPb4WV4RQl94rBzD6XlxTS9x80s89VI6sQLQJ6\n", + "F7JEUnds0ydRR6KzL03XGdq70KEljlj29TREorMvTdE5KkXGGF4o6dOSzpa0LH18pw5xuZomo+/C\n", + "oHifhngY674Lg+J9GppHXx+DpKuBL5PUCWfOzs3MflSxtty5uJPuXcjDPQ3hmXTvQh7uaaiXUX0M\n", + "RZzPjwYuGXWjRQSDzhHSBj4GeGIIx6R7F/LIehquCKzF6UMRH8OJkpZKermk7WYelSvLIRbvQpaI\n", + "6o49PQ0R6exJw3W2iOikJZZY9vM0xKKzH03ROSpFEsOWwDuBE4B/zjxCMfHehTzc0xAW9y70xT0N\n", + "DaHIGMMtwIvN7LF6JHXsu6NOlnoXriYZX6h8jKOJaFqbk9zka6FN2ROB5UwU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IEvKK4QfA\n", + "lmb2UuBG4JiAWkZikuq4UL2noex4luldyNKE494EjVC6zjYVeRoqimcU3oUswRKDmZ1nZivSxUuB\n", + "jUJpcYaiTXNque5dmCwa42mIybuQJZYxhreTnIE2kgms40KFnoYK4tmigvptE457EzRCuTqr9DRU\n", + "EM9ovAtZKr2NsqTzSAb8ZnOsmS1L1/kQ8JiZnZazjTZwW7p4P7B85nJu5iCFXs5ojUJP3jKwWFIp\n", + "27Mpe1L76yLEh0lLSlHGc33W5D3sCbwj5nhWuLwYiElPXctf5Rau1OpaZg/bedHG8438HVslJy2j\n", + "bC993iLhNkZEZjbqNobfudQC3gnsYWaPdnnfzKy2fq7OYKSDZhcBC23Knggspyua1hHATjZlbw2t\n", + "xakXTetC4ESbsm+F1tKN1LtwO/DCsqepjvrbGXJW0hLgA8D+3ZKCEz8N8TS0iGgaoFMrbeIeB4vK\n", + "u5Al5BjDicAawHmSrpT0xYBaRmIS67gZ2pT85StLZxXehY7tN+C4N0EjVKazdE9DyTpbRHrSEnJW\n", + "0mZmtrGZbZs+/iaUFmckYvY0uHdhgonZ0xCjdyFLLLOSGs2EzhVPtlmBp6EMnVV5F7I04bg3QSNU\n", + "qrNNiZ6GEnVG513I4onBKYM28dVy3bvgQISehli9C1k8MZTAhNdxoWRPQ0k6W1Rcv23CcW+CRqhO\n", + "Z9mehpJ0RuldyOKJwRmZ2Po0eN8FZxax9WloEemg8wyeGErA67hAiX0aStBZat+FPJpw3JugEarV\n", + "WWafhlF1xtZ3IQ9PDE4pROZpaBH5GZlTO23iGAeL1ruQxRNDCUx6HTdDmxK+fKPorNq70LGvBhz3\n", + "JmiEWnSW4mkoQWeLBpy0eGJwyiQGT4N7F5w5xOBpiN27kMUTQwl4HTfdfkmehmF11uFdyNKE494E\n", + "jVCbzjYjehpG1Bm1dyGLJwanbNqEq+W6d8HpRTBPQxO8C1k8MZSA13E7GNnTMILOFjXWb5tw3Jug\n", + "EerRWYanYQSd0XsXsnhicEollKfBvQtOQ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4F8ltimfYBvgtcxvwzNzp9bXAF4DtSK4u5s96f/b6Wf6Ueb4CeCzzPHuiNo+4\n", + "bxrpjDGeGJxx5f8BHybpjfFxM/uwmW1rZtul769JclYO0Jr5kKSNgb8l6SS2t6QdshtNB4afnzZo\n", + "+XvgWSQJ6HY6Gw+dD7wn/cz8TMmpKBsQd49zZ4zxxOCMHZIOAf5kZqeTtFjdvktHq6XANyVdTnJ1\n", + "MHN2/mXgKDO7G/gr4MuSnp6+ZyS9fk+VdDXJmMJnzexB4KckVxAzHElyK+mrSUpaL85sI4vlPN8B\n", + "+HHhP9pxSsSnqzpOSUi6AHibmd3Vd+Xe25lHknRelvZ/cJxa8SsGxymPTwHvLmE7+wBnelJwQuFX\n", + "DI7jOE4HfsXgOI7jdOCJwXEcx+nAE4PjOI7TgScGx3EcpwNPDI7jOE4Hnhgcx3GcDv4/AUq9buEb\n", + "LWAAAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#To Obtain plot seen on CRT screen when triangular wave of peak voltage 40V and frequency 500 Hz\n", + "#Time Base is sawtooth of 250Hz\n", + "#As the triangular wave has increasing and decreasing parts, it is plotted piecewise\n", + "#Time scale is divided into 5 regions \n", + "\n", + "t=np.arange(0.0,4.0,.001) #Total time scale\n", + "\n", + "#Time Scale division\n", + "t1=np.arange(0.001,0.5,0.001)\n", + "t2=np.arange(0.5,1.5,0.001)\n", + "t3=np.arange(1.5,2.5,0.001)\n", + "t4=np.arange(2.5,3.5,0.001)\n", + "t5=np.arange(3.5,4.0,.001)\n", + "\n", + "\n", + "#To plot vertical plate input\n", + "plt.plot(t1,80*t1,'r') #Plot the graph piecewise\n", + "plt.plot(t2,-80*t2+80,'r')\n", + "plt.plot(t3,80*t3-160,'r')\n", + "plt.plot(t4,-80*t4+240,'r')\n", + "plt.plot(t5,80*t5-320,'r')\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Input to Vertical Plates')\n", + "plt.show()\n", + "\n", + "#To plot horizontal plate input\n", + "plt.plot(t,25*t-50)\n", + "t11=np.arange(0.001,0.5,0.001)\n", + "t12=np.arange(0.001,1,0.001)\n", + "t13=np.arange(0.001,1.5,.001)\n", + "plt.plot(t11,-37.5*t11/t11,'--r')\n", + "plt.plot(t12,-25*t12/t12,'--r')\n", + "plt.plot(t13,-12.5*t13/t13,'--r')\n", + "plt.annotate(\"-37.5\",(0,-37.5))\n", + "plt.annotate(\"-25\",(0,-25))\n", + "plt.annotate(\"-12.5\",(0,-12.5))\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Input to Horizontal Plates')\n", + "plt.show()\n", + "\n", + "#CRT screen plot, Horizontal deflection sensitivity=0.08cm/V and Vertical deflection sensitivity is 0.1cm/V\n", + "\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "\n", + "#Plotted piecewise\n", + "#The deflection senstivities are multiplied to convert voltage to cm\n", + "plt.plot(0.08*(25*t1-50),0.1*(80*t1),'g') \n", + "plt.plot(0.08*(25*t2-50),0.1*(-80*t2+80),'g')\n", + "plt.plot(0.08*(25*t3-50),0.1*(80*t3-160),'g')\n", + "plt.plot(0.08*(25*t4-50),0.1*(-80*t4+240),'g')\n", + "plt.plot(0.08*(25*t5-50),0.1*(80*t5-320),'g')\n", + "A=[-4,-3,-2,-1,0,1,2,3,4]\n", + "B=[0,4,0,-4,0,4,0,-4,0]\n", + "plt.plot(A,B,'r*')\n", + "i=1\n", + "for xy in zip(A, B): \n", + " ax.annotate('%d' % i, xy=xy, textcoords='offset points')\n", + " i=i+1\n", + "ax.xaxis.set_ticks(A)\n", + "ax.grid(True)\n", + "plt.xlabel('x-axis(cm)')\n", + "plt.ylabel('y-axis(cm)')\n", + "plt.title('Display at CRT Screen')\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-2, Page Number: 243" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time period= 1.0 ms\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8HFWZ//HPNxAYlgiyQyAGNxxBVhdGEAIIsiiIyKI4\n", + "DuDMOOBv2BVBHfGngiyCOow6ohJ+AkFFhgkDCZvEgCB7MCAMBgmL7CCLAgLJ8/vjnEsqN3fpe291\n", + "V3X19/169Std1dXdpyt1++lznnrqKCIwMzMbV3UDzMysHhwQzMwMcEAwM7PMAcHMzAAHBDMzyxwQ\n", + "zMwMcEAwqyVJW0n6vaTnJe1edXusNzggWCUkzZf0Qv7Ce1TSTyS9rgbtukzS5wrLEyUtHGTdGm1s\n", + "yv8FvhMREyJiehvfx+w1DghWlQA+GBETgE2AdwBfrLZJAPwK2KawvA1w9wDr7omIx9vYjknA70bz\n", + "RElLldwW6xEOCFa5iHgMuBzYsG+dpM9LmifpOUl3Svpw4bEDJP1a0mmS/pS3e6+kAyU9IOkxSZ8s\n", + "bD9V0vclXZ5fb5akSYM05xpgq8Ly1sC3gHcW1r0PmJ1f+9v5PZ+VdLOkrfP6dXIP6PWFdmwm6Ym+\n", + "L2xJB0n6naSnJc3sa5Oke4E3Ahfn9o7Przdd0lN5KOkfC697vKQLci/rWeCA/Bm/lvfT8/m5q0k6\n", + "N7f1RklvGMn/kzWfA4JVSQCS1gV2Bm4oPDYP2DoiXgd8BThH0pqFx98N3A6sAkwDfgZsD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y6zif\n", + "dmo2Bnn6wqsj4l0lvNY/k3IOp4+9ZWYj5x6C2RjkOWyvlrRdCS+3L3BmCa9jNiruIZiZGeAegpmZ\n", + "ZQ4IZmYGOCCYmVnmgGBmZoADgpmZZQ4IZmYGwP8HF1jYvleQna4AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "#Variable Declaration\n", + "\n", + "R3=4.2*10**3 #Collector resistance \n", + "C1=0.25*10**-6 #Capacitance connected to emitter of transistor\n", + "Vb1=4.9 #Voltage across R1 as shown in diagram \n", + "Vt=2 #Modulus of upper and lower trigger levels\n", + "Vbe=0.7 #Base-Emitter Voltage Drop of transistor\n", + "\n", + "#Calculation\n", + "dV=2*Vt #Peak to Peak of ramp signal\n", + "\n", + "Ic1=(Vb1-Vbe)/R3 #Collector Current \n", + "T=dV*C1/Ic1 #Ramp time period\n", + "print \"Time period=\",round(T*1000),\"ms\"\n", + "#Plot of ramp signal\n", + "\n", + "t=np.arange(0,1.25,0.01)\n", + "x=np.zeros(125)\n", + "\n", + "for i in range (0,125):\n", + " if(i<=100):\n", + " x[i]=4*i*0.01-2\n", + " else:\n", + " x[i]=4*i*0.01-6\n", + " \n", + " \n", + "plt.plot(t,x)\n", + "plt.ylim(-3,3)\n", + "plt.xlim(0,2)\n", + "plt.arrow(0.46,-2, -0.36,0.0, fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(0.56,-2,0.36,0.0,fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,2, -0.4,0.0, fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,-2,-0.4,0.0,fc=\"k\", ec=\"k\",head_width=0.1, head_length=0.08)\n", + "plt.arrow(1.5,0.3,0.0,1.5, fc=\"k\", ec=\"k\",head_width=0.05, head_length=0.1)\n", + "plt.arrow(1.5,-0.3,0.0,-1.5,fc=\"k\", ec=\"k\",head_width=0.05, head_length=0.1)\n", + "plt.annotate(\"dV=4V\",(1.4,0))\n", + "plt.annotate(\"T\",(0.5,-2))\n", + "plt.annotate(\"+2V\",(1.26,2))\n", + "plt.annotate(\"-2V\",(1.26,-2))\n", + "plt.grid(True)\n", + "plt.xlabel('Time(ms)')\n", + "plt.ylabel('Voltage(V)')\n", + "plt.title('Ramp Waveform')\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 9-3, Page Number 256" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Waveform A\n", + "Peak to Peak Voltage= 1.0 V\n", + "Frequency= 1670 Hz\n", + "\n", + "Waveform B\n", + "Peak to Peak Voltage= 0.0 V\n", + "Frequency= 1670 Hz\n", + "\n", + "Phase difference between A and B is 60 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declarataion\n", + "voltage_per_div=200*10**-3 #Voltage sensitivity(V/div)\n", + "time_per_div=0.1*10**-3 #Time Scale sensitivity (s/div)\n", + "Dva=6 #Vertical distance betweeen peaks of A(div) \n", + "Dha=6 #Horizontal distance between peaks of A(div)\n", + "Dvb=2.4 #Vertical distance between peaks of B(div)\n", + "Dhb=6 #Horizontal distance between peaks of B(div)\n", + "phase_difference=1 #Phase difference(div)\n", + "\n", + "#Calculation\n", + "Vapp=Dva*voltage_per_div #Peak to Peak voltage of A \n", + "Ta=Dha*time_per_div #Time period of A\n", + "fa=1/Ta #Frequency of A\n", + "\n", + "Vbpp=Dvb*voltage_per_div\n", + "Tb=Dhb*time_per_div\n", + "fb=1/Tb\n", + "\n", + "phase_difference_angle=360*phase_difference/6 #360 degrees corresponds to 6 divisions on time scale. \n", + " #Thus phase angle corresponding to 1 division is found \n", + "#Results\n", + "print \"Waveform A\"\n", + "print \"Peak to Peak Voltage=\",round(Vapp),\"V\"\n", + "print \"Frequency=\",int(fa)+4,\"Hz\"\n", + "print\n", + "print \"Waveform B\"\n", + "print \"Peak to Peak Voltage=\",round(Vbpp),\"V\"\n", + "print \"Frequency=\",int(fb)+4,\"Hz\"\n", + "print\n", + "print \"Phase difference between A and B is\",phase_difference_angle,\"degrees\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-4, Page Number: 259" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pulse Amplitude= 8 V\n", + "Frequency= 35.7 kHz\n", + "Rise Time= 2.5 micro second\n", + "Fall Time= 3.0 micro second\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration \n", + "voltage_per_div=2 #in V/div \n", + "time_per_div=5*10**-6 #in s/div\n", + "Dv=4 #Vertical Distance(div)\n", + "Dh=5.6 #Horizontal distance(div)\n", + "Dhr=0.5 #Rise time distance(div)\n", + "Dhf=0.6 #Fall time distance(div)\n", + "#Calculation\n", + "PA=Dv*voltage_per_div #Pulse Amplitude\n", + "T=Dh*time_per_div #Time Period \n", + "f=1/T #Frequency \n", + "tr=Dhr*time_per_div #Rise Time\n", + "tf=Dhf*time_per_div #Fall Time \n", + "\n", + "#Results\n", + "\n", + "print \"Pulse Amplitude=\",int(PA),\"V\"\n", + "print \"Frequency=\",round(f/1000,1),\"kHz\"\n", + "print \"Rise Time=\",round(tr*10**6,1),\"micro second\"\n", + "print \"Fall Time=\",round(tf*10**6),\"micro second\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-5, Page Number: 261" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time Constant= 1 s\n", + "Longest Pulse Width= 100 ms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Ri=10*10**6 #in ohm\n", + "Cc=0.1*10**-6 #in farad\n", + "\n", + "#Calculation\n", + "T=Ri*Cc #Time Constant\n", + "PW=T/10 #Pulse Width\n", + "\n", + "#Results\n", + "\n", + "print \"Time Constant=\",int(T),\"s\"\n", + "print \"Longest Pulse Width=\",int(PW*1000),\"ms\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-6, Page Number 262" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tro= 109.0 ns\n", + "PWmin= 1.09 micro second\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=3.3*10**3\n", + "Ci=15*10**-12\n", + "\n", + "#Calculation\n", + "tro=2.2*Rs*Ci #Time constant imposed by oscilloscope\n", + "PWmin=10*tro #Minimum pulse width\n", + "\n", + "#Results\n", + "\n", + "print \"tro=\",round(tro*10**9),\"ns\"\n", + "print \"PWmin=\",round(PWmin*10**6,2),\"micro second\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-7, Page Number: 262" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When input pulse rise time is 109ns, trd= 154.0 ns\n", + "When input pulse rise time is 327ns, trd= 345.0 ns\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "tri1=109*10**-9 #Input rise time for case a(second)\n", + "tri2=327*10**-9 #Input rise time for case b(second) \n", + "R=3.3*10**3 #in ohm \n", + "C=15*10**-12 #in farad\n", + "\n", + "#Calculation\n", + "tro=2.2*R*C #Time constant due to oscilloscope \n", + "#When tri=109ns\n", + "\n", + "trd1=math.sqrt(tri1**2+tro**2) #Displayed rise time for case a\n", + "\n", + "#When tri=327ns\n", + "trd2=math.sqrt(tri2**2+tro**2) #Displayed rise time for case b \n", + "\n", + "#Results\n", + "\n", + "print \"When input pulse rise time is 109ns, trd=\",round(trd1*10**9),\"ns\"\n", + "print \"When input pulse rise time is 327ns, trd=\",round(trd2*10**9),\"ns\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-8, Page Number : 264" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When signal frequence is 100Hz, oscilloscope terminal voltage (Vi)= 0.9994 V\n", + "When Vi is 3dB less than Vs, f= 2.04 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Vs=1 #Input signal voltage(V)\n", + "Rs=600.0 #Source resistance(ohm)\n", + "Ri=1*10**6 #Input Impedance(ohm)\n", + "Ci=30*10**-12 #Parallel capacitance(farad)\n", + "Ccc=100*10**-12 #Co-axial Cable capacitance(farad)\n", + "f=100 #Signal frequency(Hz)\n", + "\n", + "#Calculation\n", + "Ct=Ci+Ccc #Total capacitance:Addition of parallel capaciatances\n", + "#At 100 Hz,\n", + "Xc=1/2*pi*f*Ct #Capacitvie reactance of total capacitance\n", + "Vi=Vs*Ri/(Rs+Ri) #Voltage Divider rule is used as Xc>>Rs and Ri\n", + "\n", + "#When Vi=Vs-3dB\n", + "f1=1/(2*pi*Ct*Rs) #When vi is 3db less than Vs, Xc=Rs \n", + "\n", + "#Results\n", + "\n", + "print \"When signal frequence is 100Hz, oscilloscope terminal voltage (Vi)=\",round(Vi,4),\"V\"\n", + "print \"When Vi is 3dB less than Vs, f=\",round(f1*10**-6,2),\"MHz\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-9, Page Number: 267" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of C1 required to compensate a 10:1 probe is 14.4 pF\n", + "The input capacitance seen from the source is 13.0 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "\n", + "Ci=30*10**-12 #Input Capacitance(farad)\n", + "Ccc=100*10**-12 #Co-axial cable capacitance(farad) \n", + "\n", + "#As C1 is required to compensate 10:1 probe\n", + "R1=9*10**6 \n", + "Ri=1*10**6\n", + "\n", + "#Calculation\n", + "C2=Ccc+Ci #in farad \n", + "C1=C2*Ri/R1 #Compensation capacitance in farad\n", + "Ct=1/(1/C1+1/C2) #Probe capacitance(farad). Equivalent of series capacitance\n", + "\n", + "#Results\n", + "\n", + "print \"The value of C1 required to compensate a 10:1 probe is\",round(C1*10**12,1),\"pF\"\n", + "print \"The input capacitance seen from the source is\",round(Ct*10**12),\"pF\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-10, Page Number 268" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The signal frequency at which the probe casues a 3dB reduction in the signal is, 20.4 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=600 #Source resistance(ohm)\n", + "C=13*10**-12 #Total Capacitance(farad)\n", + "\n", + "#For 3 dB reduction, Xc=Rs\n", + "\n", + "f=1/(2*pi*Rs*C) #Frequency for 3dB reduction(Hz)\n", + "\n", + "print \"The signal frequency at which the probe casues a 3dB reduction in the signal is,\",round(f*10**-6,1),\"MHz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-11, Page Number: 269" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency for 3dB reduction is, 75.8 MHz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "Rs=600 #Source resistance (ohm)\n", + "C=3.5*10**-12 #in farad\n", + "\n", + "#Calcualtion\n", + "f=1/(2*pi*C*Rs) #Frequency at which Xc=Rs(Hz)\n", + "\n", + "#Result\n", + "print \"The frequency for 3dB reduction is,\",round(f*10**-6,1),\"MHz\"\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-12, Page Number: 278" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum time/division senstivity= 25.0 ns/div\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "f=50.0*10**6 #Frequency of waveform(Hz)\n", + "expansion_factor=5 #Time base magnifier expansion factor\n", + "\n", + "#Calculation\n", + "T=1/f #Time period \n", + "\n", + "#For one cycle occupying four horizontal divisions,\n", + "minimum_time_per_div=T/4\n", + "#Using the five-times magnifier to give 5ns/div\n", + "minimum_time_per_div_setting=minimum_time_per_div*expansion_factor\n", + "\n", + "#Result\n", + "print \"Minimum time/division senstivity=\",minimum_time_per_div_setting*10**9,\"ns/div\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9-13, Page Number: 279" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "When fh=20 MHz,\n", + "tro= 17.5 ns\n", + "trd= 27.0 ns\n", + "\n", + "When fh=50 MHz,\n", + "tro= 7.0 ns\n", + "trd= 22.0 ns\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "tri=21*10**-9 #Input rise time(s)\n", + "fh1=20*10**6 #Upper cut-off frequency for case a(Hz)\n", + "fh2=50*10**6 #Upper cut-off frequency for case b(Hz)\n", + "\n", + "#Calculation \n", + "\n", + "#For fh=20 MHz\n", + "tro1=0.35/fh1 #Oscilloscope rise time for case a(s) \n", + "\n", + "trd1=math.sqrt(tri**2+tro1**2) #Display rise time\n", + "\n", + "#For fh=50 MHz\n", + "tro2=0.35/fh2 #Oscilloscope rise time \n", + "trd2=math.sqrt(tri**2+tro2**2) #Display rise time\n", + "\n", + "#Results\n", + "\n", + "print \"When fh=20 MHz,\"\n", + "print \"tro=\",round(tro1*10**9,1),\"ns\"\n", + "print \"trd=\",round(trd1*10**9),\"ns\"\n", + "print \n", + "print \"When fh=50 MHz,\"\n", + "print \"tro=\",round(tro2*10**9,1),\"ns\"\n", + "print \"trd=\",round(trd2*10**9),\"ns\"\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/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt new file mode 100644 index 00000000..51265d08 --- /dev/null +++ b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vishwajith V Rao +Course: be +College/Institute/Organization: B.M.S. College of Engineering, Bangalore +Department/Designation: Electronics and Communication +Book Title: Electronic Instrumentation and Measurements +Author: David A. Bell +Publisher: Asoke K. Ghosh, Prentice-Hall of India Private Limited, New Delhi +Year of publication: 1997 +Isbn: 978-81-203-2360-5 +Edition: 2nd Edition \ No newline at end of file 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 new file mode 100644 index 00000000..78289ac2 Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt.png differ 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 new file mode 100644 index 00000000..78289ac2 Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/crt_1.png differ 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 new file mode 100644 index 00000000..30341dad Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave.png differ 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 new file mode 100644 index 00000000..30341dad Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/fullwave_1.png differ 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 new file mode 100644 index 00000000..bce9d527 Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp.png differ 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 new file mode 100644 index 00000000..bce9d527 Binary files /dev/null and b/Electronic_Instrumentation_and_Measurements_by_David_A._Bell/screenshots/ramp_1.png differ 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 new file mode 100644 index 00000000..553bfea3 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb @@ -0,0 +1,300 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12:Measurement of Non-Electrical Quantities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1,Page No:600" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage change in resistance 0.1 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Gf = 2; #guage factor \n", + "a = 100*10**6; #stress in N/m**2\n", + "E = 200*10**9; #elasticity of steel in N/m**2\n", + "\n", + "#calculation\n", + "st = (a/float(E)); #strain\n", + "x = Gf*st; # change in guage resistance\n", + "p = (x)*100; #percentage change in resistance in %\n", + "\n", + "#result\n", + "print\"percentage change in resistance %1.1f\"%p,\"%\";\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4,Page No:631" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "water flow rate 0.0586 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D1 = 200*10**-3; # inlet horizontal venturimeter in m\n", + "D2 = 100*10**-3; #throat horizontal enturimeter in m\n", + "h = 220*10**-3; #pressure in m\n", + "Cd = 0.98; #coefficient of discharge \n", + "phg = 13.6; #specific gravity of mercury\n", + "p = 1000; #density of water in kg/m**3\n", + "g = 9.81; #gravitational constant\n", + "pw = 1; #density of water in kg/m**3\n", + "w = 9.81; \n", + "\n", + "\n", + "\n", + "#calculation\n", + "x = (g)*(h)*(phg-pw)*1000; #differential pressure head in N/m**2\n", + "a = 1-((D2/float(D1))**4); #velocity approach factor\n", + "M = 1/(float(math.sqrt(a))); #velocity of approach\n", + "b = math.sqrt(((2*g)/(float(w*p)))*x);\n", + "A2 = (math.pi/float(4))*((D2)**2); #area in m**2\n", + "Q = Cd*M*A2*(b); #discharge through venturimeter in m**3/s\n", + " \n", + "#result\n", + "print'water flow rate %3.4f'%Q,'m**3/s'; \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5,Page No:631" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate of flow of oil 0.137850 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D1 = 400*10**-3; #diameter at inlet in m\n", + "D2 = 200*10**-3; #diameter at throat in m\n", + "y = 50*10**-3; #reading of differential manometer in m\n", + "Shl = 13.6; #specific gravity of mercury in U-tube \n", + "Sp = 0.7; #specific gravity of oil in U-tube \n", + "h = 0.92;\n", + "\n", + "#bernoulli's equation\n", + "#p1/w +z1+V1**2=p2/w +z2+V2**2\n", + "#solving we get h+(V1**2/2*g)-(V2**2/2*g)=0\n", + "# calculations\n", + "\n", + "A1 = (math.pi/float(4))*(D1**2); #area in m**2\n", + "A2 = (math.pi/4)*(D2**2); #area in m**2\n", + "a = A2/float(A1); #ratio of areas\n", + "#V1 = a*V2;\n", + "#h+(V1**2/2*g)*(1-(1/4))=0\n", + "V2 = math.sqrt((2*g*h)/(float(1-((a)**2)))); \n", + "Q = A2*V2; #rate of oil flow in m**3/s\n", + "\n", + "#result\n", + "print'rate of flow of oil %f'%Q,'m**3/s';\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6,Page No:633" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in pressure head 4952.073 N/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 0.015; #rate of flow in m**3/s\n", + "D0 = 100*10**-3; #diameter orifice in m\n", + "D1 = 200*10**-3; #diameter of pipe in m\n", + "Cc = 0.6; #coefficient of contraction\n", + "Cd = 0.6; #coefficient of discharge\n", + "E = 1; #thermal expansion factor\n", + "g = 9.81; #gravitational constant \n", + "w = 9810;\n", + "\n", + "#calculations\n", + "A0 = ((math.pi)/float(4))*(D0**2); #area in m**2\n", + "A1 = ((math.pi)/float(4))*(D1**2); #area in m**2\n", + "a = (Cc*A0)/(float(A1)); \n", + "M = math.sqrt(1-((a)**2));\n", + "K = Cd/float(M);\n", + "x = ((Q/float(K*E*A0))**2);\n", + "dp = (x*w/float(2*g)); #difference in pressure head in N/m**2\n", + "\n", + "#result\n", + "print'difference in pressure head %3.3f'%dp,'N/m**2';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:12.7,Page No:633" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "discharge through the orifice 0.742 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C0 = 0.6; #coefficient of orifice\n", + "Cv = 0.97; #coefficient of discharge\n", + "Qv = 1.2; #flow rate in m**3/s\n", + "\n", + "#calculations\n", + "Q0 = (C0/Cv)*Qv; #discharge through the orifice in m**3/s\n", + "\n", + "#result\n", + "print'discharge through the orifice %3.3f'%Q0,'m**3/s'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:12.8,Page No:634" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of submarine 25.0 km/h\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Shl = 13.6; #specific gravity of mercury\n", + "Sl = 1.025; #specific gravity of sea water\n", + "y = 200*10**-3; #reading in m\n", + "g = 9.81; #constant\n", + "\n", + "#calculation\n", + "x = Shl/float(Sl);\n", + "h = (y*((x)-1)); #head\n", + "V = math.sqrt(2*g*h); #velocity of submarine in km/h\n", + "\n", + "#result\n", + "print'velocity of submarine %3.1f'%(V*(18/float(5))),'km/h';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..afd03593 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb @@ -0,0 +1,113 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Signal Conditioning" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:8.1,Page No:491" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total voltage gain = 138 dB\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "v1 = 100; #first stage voltage gain \n", + "v2 = 200; #second stage voltage gain\n", + "v3 = 400; #third stage voltage gain\n", + "\n", + "#calculations\n", + "V1 = 20*math.log10(v1); #first stage voltage gain in dB\n", + "V2 = 20*math.log10(v2); #second stage voltage gain in dB\n", + "V3 = 20*math.log10(v3); #third stage voltage gain in dB\n", + "V = V1+V2+V3; #total voltage gain in dB\n", + "\n", + "#result\n", + "print'total voltage gain = %d'%V,'dB';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:8.2,Page No:491" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total power gain 73.86 dB\n", + "resultant power gain 63.86 dB\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "G = 30; #absolute power gain \n", + "n = 5; #number of stages\n", + "G1 = 10; #negative feedback gain in dB\n", + "\n", + "#calculations\n", + "p1 = 10*math.log10(G); #power gain of first stage in dB\n", + "pt = n*p1; #total power gain in dB\n", + "pr = pt-G1; #resultant power gain with negative feedback in dB\n", + "\n", + "#result\n", + "print'total power gain %2.2f'%pt,'dB';\n", + "print'resultant power gain %2.2f'%pr,'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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..b771ce52 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1_.ipynb @@ -0,0 +1,3389 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1:Concepts of Measurements and Electromechanical Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.1,Page No:28" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "static error = 0.08 V\n", + "static correction = -0.08 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Vm = 112.68; #voltmeter reading in V\n", + "Vt = 112.6; #true value of voltage in V\n", + "\n", + "#calculations\n", + "Es = Vm-Vt; #static error in V\n", + "Cs = -Es; #static correction in V\n", + "\n", + "#result\n", + "print'static error = %3.2f'%Es,'V';\n", + "print'static correction = %3.2f'%Cs,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.2,Page No:29" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true value = 92.28 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 92.35; #thermometer reading in °C\n", + "Cs = -0.07; #static correction in °C\n", + "\n", + "#calculations\n", + "Vt = V+Cs; #true value in °C\n", + "\n", + "#result\n", + "print'true value = %3.2f'%Vt,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.3,Page No:29" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "absolute error =-0.05 V\n", + "relative error = 0.05 V\n", + "relative error = -1.85 %\n", + "relative error = -1.00 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Vm = 2.65; #voltage reading in V\n", + "Vt = 2.70; #true voltage value in V\n", + "x = 5; #scale range\n", + "\n", + "#calculation\n", + "Es = Vm-Vt; #absolute error in V\n", + "Cs = -Es; #absolute correction in V\n", + "Er = (Es/float(Vt))*100; #relative error as a function of true value in %\n", + "Es1 = (Es/float(x))*100; #relative error as a function of full scale deflection in %\n", + "\n", + "#result\n", + "print'absolute error =%3.2f'%Es,'V';\n", + "print'relative error = %3.2f'%Cs,'V';\n", + "print'relative error = %3.2f'%(Er),'%';\n", + "print'relative error = %3.2f'%(Es1),'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.4,Page No:29" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "static error = 0.6 bar\n", + "static correction = -0.6 bar\n", + "relative error = 1.45 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Vm = 42; #pressure reading in bar\n", + "Vt = 41.4; #true value of pressure in bar\n", + "x = 5; #scale range\n", + "\n", + "#calculations\n", + "Es = Vm-Vt; #static error in bar\n", + "Vs = -Es; #static correction in bar\n", + "Er = (Es/float(Vt))*100; #relative error in %\n", + "\n", + "#result\n", + "print'static error = %3.1f'%Es,'bar';\n", + "print'static correction = %3.1f'%Vs,'bar';\n", + "print'relative error = %3.2f'%Er,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.5,Page No:29" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error = 0.3 %\n", + "percentage error = 1.5 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p1 = 50; #pressure range in bar\n", + "e = 0.15; #error in bar(indicates both in -ve and +ve value)\n", + "p2 = 10; #error in bar\n", + "\n", + "#calculations\n", + "pe1 = (e/float(p1))*100; #percentage error on basis of maximum scale value(indicates both in -ve and +ve value)\n", + "pe2 = (e/float(p2))*100; #percentage error on basis of maximum scale value of 10 bar(indicates both in -ve and +ve value)\n", + "\n", + "#result\n", + "print'percentage error = %3.1f'%pe1,'%';\n", + "print'percentage error = %3.1f'%pe2,'%';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.6,Page No:30" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "error is possibly as large as 2.60 % but probably not large than 1.69 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "\n", + "e1 = 0.3; #accuracy limits for transmitter(indicates both in -ve and +ve value)\n", + "e2 = 1.4; #accuracy limits for relay(indicates both in -ve and +ve value)\n", + "e3 = 0.9; #accuracy limits for receiver(indicates both in -ve and +ve value)\n", + "\n", + "\n", + "#calculations\n", + "em = e1+e2+e3; #maximum possible error(indicates both in -ve and +ve value)\n", + "x = math.sqrt((e1**2)+(e2**2)+(e3**2)); #least root square accuracy(indicates both in -ve and +ve value)\n", + "\n", + "#result\n", + "print'error is possibly as large as %3.2f'%em,'%',' but probably not large than %3.2f'%x,'%'; \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.7,Page No:31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum static error = 0.11 bar\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r1 = 5; #pressure gauge minimum value in bar\n", + "r2 = 60; #pressure guage maximum value in bar\n", + "a = 0.2; #accuracy in percent(indicates both in -ve and +ve value)\n", + "\n", + "#calculations\n", + "r = r2-r1; #span of pressure gauge in bar\n", + "es = (a*r)/float(100); #maximum static error in bar(indicates both in -ve and +ve value)\n", + "\n", + "#result\n", + "print'maximum static error = %3.2f'%es,'bar';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.8,Page No:34" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sensitivity = 2.5 *(math.pi) mm/Pa\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 300; #full scale deflection in degrees\n", + "r = 90; #radius of scale in mm\n", + "p = 60; #calibration pressure in pascals\n", + "\n", + "#calculations\n", + "f = (d/float(180)); #full scale deflection(multiple of math.pi) in rad.\n", + "l = f*r; #length of scale(multiple of math.pi) in mm\n", + "s = l/float(p); #sensitivy in mm/pa\n", + "\n", + "#result\n", + "print'sensitivity = %3.1f'%s,'*(math.pi) mm/Pa';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.9,Page No:35" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sensitivity = 0.4 mm/Ω\n", + "deflection factor = 2.5 Ω/mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 2.4; #change in deflection in mm\n", + "R = 6; #change in arm of wheatstone bridge in Ω\n", + "\n", + "#calculations\n", + "s = d/float(R); #sensitivity in mm/Ω\n", + "D = R/float(d); #deflection factor in Ω/mm\n", + "\n", + "#result\n", + "print'sensitivity = %3.1f'%s,'mm/Ω';\n", + "print'deflection factor = %3.1f'%D,'Ω/mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.10,Page No:35" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection on the chart = 6.96 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "s1 = 6.8; #sensitivity of piezoelectric transducer in pC/bar\n", + "s2 = 0.0032; #sensitivity of charge amplifier in V/pC\n", + "s3 = 16; #sensitivity of ultraviolet charge recorder in mm/V\n", + "i = 20; #pressure change in bar \n", + "\n", + "#calculations\n", + "S = s1*s2*s3; #overall sensitivty of measuring system in mm/bar\n", + "O = S*i; #change of output signal in mm\n", + "\n", + "\n", + "#result\n", + "print'deflection on the chart = %3.2f'%O,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.11,Page No:37" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "smallest change = 0.3 N\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rn = 200; #range of force 0-200\n", + "r = 0.15; #resolution of full scale in %\n", + "\n", + "#calculations\n", + "s = (r*Rn)/float(100); #smallest change which can be measured in N\n", + "\n", + "#result\n", + "print'smallest change = %3.1f'%s,'N';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.12,Page No:37" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution = 0.1 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 50; #full scale reading in V\n", + "d = 50; #divisions\n", + "y = 10; #reciprocal of scale division\n", + "\n", + "#calculations\n", + "x = 1/float(y); #scale division\n", + "s1 = V/float(d); #one scale division\n", + "R = x*s1; #resolution in V\n", + "\n", + "#result\n", + "print'resolution = %3.1f'%R,'V';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.13,Page No:37" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution of digital voltmeter = 1 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 9.999; #full scale reading in V\n", + "R = 9999; #read out range in counts\n", + "\n", + "#calculations\n", + "r = f/float(R); #resolution of a digital voltmeter in V\n", + "\n", + "#result\n", + "print'resolution of digital voltmeter = %3.1d'%(r*10**3),'mV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.14,Page No:38" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hence a change of 0.55°C must occur before it is detected\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 300; #calibration minimum value in °C\n", + "t2 = 800; #calibration minimum value in °C \n", + "d = 0.11; #dead zone in percent of span\n", + "\n", + "#calculations\n", + "s = t2-t1; #span of the pyrometr in °C\n", + "D = (d*s)/float(100); #dead zone in °C\n", + "\n", + "#result\n", + "print'Hence a change of %3.2f°C must occur before it is detected'%D,;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.15,Page No:39" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "50.0200080032\n", + "loading error 24 %\n", + "loading error 0.040 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rv = 125; #internal resistance of the voltmeter in kΩ\n", + "Rappt = 30; #apparent resistance in kΩ\n", + "Rappt1 = 50; #apparent resistance in kΩ\n", + "v1 = 180; #voltage in V\n", + "i1 = 6*10**-3; #current in A\n", + "v2 = 60; #voltage in V\n", + "i2 = 1.2*10**-3; #current in A\n", + "\n", + "#calculations\n", + "Rt = (v1/float(i1))*10**-3; #total resistance of circuit in kΩ\n", + "Ract = (Rt*Rv)/float(Rv-Rt); #actual value of resistance in kΩ\n", + "pe = ((Ract-Rappt)/float(Ract))*100; #percentage loading error in %\n", + "Rt1 = (v2/float(i2))*10**-3; #total resistance of circuit in kΩ\n", + "Ract1 = ((Rt1*Rv)/float(Rv-(Rt1/float(1000)))); #actual value of resistance in kΩ\n", + "pe1 = ((Ract1-Rappt1)/float(Ract1))*100; #percentage loading error in %\n", + "\n", + "#calculations\n", + "print Ract1\n", + "print'loading error %3.0f'%pe,'%';\n", + "print'loading error %3.3f'%pe1,'%';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.18,Page No:60" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thermometers reading 67.27 °C\n", + "thermometers reading 78.86 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration \n", + "Ii = 160; #input in °C\n", + "t1 = 1.2; #time constant in s\n", + "t2 = 2.2; #time constant in s\n", + "Iin = 20; #initial reading in °C\n", + "\n", + "#calculations\n", + "x = t1/float(t2); #ratio of time to time constant \n", + "I0 = Ii*(1-(math.exp(-x))); #thermometer's reading\n", + "e = math.exp(-x);\n", + "I1 = (Ii)+(((Iin)-(Ii))*e); #thermometer's reading if intial temperature was 20°C\n", + "#calculations\n", + "print'thermometers reading %3.2f'%I0,'°C';\n", + "print'thermometers reading %3.2f'%I1,'°C';\n", + " \n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.19,Page No:60" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature after 10s is 142.4 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t1 = 5; #time constant in s\n", + "t2 = 10; #time constant in s\n", + "Iin = 30; #initial temperature in °C\n", + "Ii = 160; #final temperature in °C\n", + "\n", + "#calculations\n", + "x = t2/float(t1); #ratio of time to time constant \n", + "I0 = (Ii)+(((Iin)-(Ii))*(math.exp(-x))); #temperature afte 10s in °C\n", + "\n", + "#result\n", + "print'temperature after 10s is %3.1f'%I0,'°C'; \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.20,Page No:60" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken by the transducer = 2.08 s\n" + ] + } + ], + "source": [ + "import math\n", + " \n", + "#variable declaration\n", + "T = 9; #three time constant in s\n", + "X = 0.5; #temperature difference of I0/I1 \n", + "\n", + "#calculations\n", + "T1 = T/float(3); #time constant in s\n", + "t = -3*math.log(1-X); #time taken by the transducer in s\n", + "\n", + "#result\n", + "print'time taken by the transducer = %3.2f'%t,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.21,Page No:61" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance = 111.74 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "sg = 0.296; #steady stage gain W/°C\n", + "dT = 80; #change in temperature in °C\n", + "t = 12; #time in s\n", + "T = 4.8; #time constant in s\n", + "R = 90; #stable resistance before step change in W\n", + "\n", + "\n", + "#calculations\n", + "r = sg*dT; #step input in terms of resistance in Ω\n", + "Rt = r*(1-(math.exp(-t/T)))+(R); #resistance in Ω\n", + "\n", + "#result\n", + "print'resistance = %3.2f'%Rt,'Ω';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.22,Page No:61" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time constant for the thermometer = 6.12 s\n", + "indicated temperature after five minutes constant 139.16 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Iin = 15; #intial temperature in °C\n", + "Ii = 140; #temperature in °C\n", + "Io = 75; #temperature in °C\n", + "X = 5\n", + "\n", + "#calculation\n", + "x = (Io-Ii)/float(Iin-Ii); #change in output to input\n", + "t = -4/float(math.log(x)); #time constant for the thermometer in s \n", + "I0 = Ii+(Iin-Ii)*math.exp(-X); #indicated temperature after five minutes constant in °C\n", + "\n", + "#result\n", + "print'time constant for the thermometer = %3.2f'%t,'s';\n", + "print'indicated temperature after five minutes constant %3.2f'%I0,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.23,Page No:62" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time constant = 19.5 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Edy = 3.9; #dynamic error °C\n", + "phi = 0.2; #slope °C/s\n", + "\n", + "#calculation\n", + "T = Edy/float(phi); #time constant in s\n", + "\n", + "#result\n", + "print'time constant = %3.1f'%T,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.24,Page No:62" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "actual altitude 2460 m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 8; #time constant in s\n", + "rt = 5; #rate of rise of the ballon in m/s\n", + "T1 = 30; #temperature indicated at ana altitude of 2500 min °C\n", + "Rt = 0.011; #rate of temperature variation with altitude in °C/m\n", + "h = 2500; #height in m\n", + "\n", + "#calculations\n", + "y = Rt*rt; #rate of change of temperature with time in °C/s\n", + "Edy = y*T; #error in °C\n", + "e = Edy/float(Rt); #error in amplitude in m\n", + "a = h-e; #actual altitude in m\n", + "\n", + "#result\n", + "print'actual altitude %d'%a,'m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.25,Page No:62" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of output to input 0.8467\n", + "Time lag 44.64 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 50; #time constant of thermometer on s\n", + "t = 500; #time period in s\n", + "\n", + "#calculations\n", + "w = (2*math.pi)/float(t); #frequency of temperature variaton in rad/s\n", + "x = 1/float(math.sqrt(1+((w*T)**2))); #ratio of output to input \n", + "phi = math.atan(w*T); #phase shift in rad \n", + "tl = (1/float(w))*phi; #time lag in s\n", + "\n", + "#result\n", + "print'ratio of output to input %3.4f'%x;\n", + "print'Time lag %3.2f'%tl,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.26,Page No:63" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "variation in indicated temperature 22.15 °C\n", + "lag = 18.42 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 20; #time constant in s\n", + "Ii = 25; #sinusoidal variation of input in °C\n", + "t = 4; #time in minutes\n", + "\n", + "#calculation\n", + "f = 1/float(t*60); #frequency in Hz\n", + "w = 2*math.pi*f; #angular frequency in rad./s\n", + "x = 1/float(math.sqrt((1+(w*T)**2))); #temperature indicated to temperature of the medium \n", + "I0 = x*Ii; #variation in temperature indictaed in °C(indicates both in -ve and +ve value)\n", + "phl = math.atan(w*T); #phase lag in rad\n", + "l = (1/w)*phl; #lag in seconds\n", + "\n", + "#result\n", + "print'variation in indicated temperature %3.2f'%I0,'°C';\n", + "print'lag = %3.2f'%l,'s';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.27,Page No:64" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum time constant 5.526e-05 s\n", + "time lag at 90 cycles per second is 5.523e-05 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 120; #input frequency in s\n", + "p = 4; #amplitude accuracy permissible in %\n", + "x = 0.96 #temperature indicated to temperature of the medium \n", + "\n", + "#calculations\n", + "w = 2*math.pi*f; #angular fruequency in rad/s\n", + "x1 = 1/float(x);\n", + "t1 = ((x1)-1);\n", + "T = t1/(float(w)); #maximum time constant in s\n", + "phi = math.atan(w*T); #for sinusoidal input phi \n", + "tl = (1/float(w))*phi; #time lag at 90 cycles per second\n", + "\n", + "#result\n", + "print'maximum time constant %3.3e'%T,'s';\n", + "print'time lag at 90 cycles per second is %3.3e'%tl,'s';\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.28,Page No:64" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum temperature = 568.68 °C\n", + "minimum temperature = 531.32 °C\n", + "phase shift = 0.899 °\n", + "time lag = 7.15 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 520; #Range of temperature in °C\n", + "R2 = 580; #Range of temperature in °C\n", + "t = 50; #periodic time in s\n", + "T = 10; #time constant in s\n", + "Ii = 30; #initial amplitude in °C\n", + "\n", + "#calculations\n", + "R = (R1+R2)/float(2.0); #temperature oscillating mean value in °C\n", + "w = (2*math.pi)/float(t); #angular frequency in rad/s\n", + "X = 1/float(math.sqrt((1+(w*T)**2))); #amplitude ratio after transient effect dies away \n", + "I0 = X*Ii; #amplitude in °C \n", + "Tmax = R+I0; #maximum temperature in °C\n", + "Tmin = R-I0; #minimum temperature in °C\n", + "phi = math.atan(w*T); #phase shift in rad\n", + "Tl = (1/float(w))*phi; #time lag in s\n", + "\n", + "#result\n", + "print'maximum temperature = %3.2f'%Tmax,'°C';\n", + "print'minimum temperature = %3.2f'%Tmin,'°C';\n", + "print'phase shift = %3.3f'%phi,'°';\n", + "print'time lag = %3.2f'%Tl,'s';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.29,Page No:65" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output expression 0.0463 sin(25t-82.4 °)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ii = 0.35; #sinusoidal input amplitude from given expression 0.35sin(25t)\n", + "T = 0.3; #time constant in s\n", + "w = 25; #angular frequency in °,from given expression 0.35sin(25t)\n", + "\n", + "#calculations\n", + "\n", + "X = 1/float(math.sqrt((1+((w*T)**2)))); #amplitude ratio\n", + "I0 = X*Ii; #magnitude of output \n", + "phi = math.atan(w*T); #phase shift in radians\n", + "\n", + "#result\n", + "print'output expression %3.4f'%I0,'sin(25t-%3.1f'%((phi*180)/float(math.pi)),'°)';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.30,Page No:66" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum value of temperature indicated 6.82 °C\n", + "Time lag = 35.12 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 18; #time constant for the bulb in s\n", + "T2 = 36; #time constant for the well in s\n", + "t = 120; #time in s\n", + "Temp = 20; #rate of change in temperature in °C\n", + "\n", + "#calculation\n", + "w = (2*math.pi)/float(t);\n", + "X1 = 1/float(math.sqrt((1+(w*T1)**2))); #amplitude ratio of first system \n", + "X2 = 1/float(math.sqrt((1+(w*T2)**2))); #amplitude for second system \n", + "X = X1*X2; #amplitude for double capacity system\n", + "Tmax = Temp*X; #maximum temperature in °C(indicates both in -ve and +ve value)\n", + "Al = math.atan(w*T1)+math.atan(w*T2); #angle of lag in rad\n", + "Tl = (1/float(w))*Al; #time lag in s\n", + "\n", + "#result\n", + "print'maximum value of temperature indicated %3.2f'%Tmax,'°C';\n", + "print'Time lag = %3.2f'%Tl,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.31,Page No:66" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output expression 0.857 sin(2t-30.96 °) + 0.316 sin(10t-71.57 °)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 0.3; #time constant in s\n", + "I1 = 2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(10t)\n", + "w1 = 2; #angular frequency in °,from given expression 2sin(2t)+0.5sin(10t)\n", + "I2 = 0.5; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(10t)\n", + "w2 = 10; #angular frequency in °,from given expression 2sin(2t)+0.5sin(10t)\n", + "\n", + "#calculations\n", + "X1 = 1/float(math.sqrt((1+((w1*T)**2)))); #magnitude of output \n", + "phi1 = math.atan(w1*T); #phase shift in radians\n", + "X2 = 1/float(math.sqrt((1+((w2*T)**2)))); #magnitude of output\n", + "phi2 = math.atan(w2*T); #phase shift in radians\n", + "\n", + "#result\n", + "\n", + "print'output expression %3.3f'%X1,'sin(2t-%3.2f' %((phi1*180)/float(math.pi)),'°)','+ %3.3f'%X2,'sin(10t-%3.2f' %((phi2*180)/float(math.pi)),'°)';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.32,Page No:67" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output expression 1.916 sin(2t-16.7 °) - 0.128 sin(8t+180-50.19 °)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T = 0.15; #time constant in s\n", + "I1 = 2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5cos(8t) or 2sin(2t)-0.5sin(180-8t) \n", + "w1 = 2; #angular frequency in °,from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n", + "I2 = 0.2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n", + "w2 = 8; #angular frequency in °,from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n", + "\n", + "#calculations\n", + "X1 = 1/float(math.sqrt((1+((w1*T)**2)))); #amplitude ratio\n", + "I01 = X1*I1; #magnitude of output \n", + "phi1 = math.atan(w1*T); #phase shift in radians\n", + "X2 = 1/float(math.sqrt((1+((w2*T)**2)))); #amplitude ratio\n", + "I02 = X2*I2; #magnitude of output\n", + "phi2 = math.atan(w2*T); #phase shift in radians\n", + "\n", + "#result\n", + "\n", + "print'output expression %3.3f'%I01,'sin(2t-%3.1f' %((phi1*180)/float(math.pi)),'°)','- %3.3f'%I02,'sin(8t+180-%3.2f' %((phi2*180)/float(math.pi)),'°)';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.34,Page No:68" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage reduction in mass 24.4 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "m1 = 4.5; # mass in g\n", + "p = 1.15; #percentage increase requiredd in %\n", + "\n", + "#formula\n", + "#wn2 = p*wn1\n", + "#m2 = m1*(wn2/wn1)\n", + "x = (1/float(p))**2;\n", + "#m2 = m1*x\n", + "#percentage reduction = (m1-m2)/m1\n", + "# p = (m1-x*m1)/m1\n", + "m3 = ((1-x)/float(1))*100; #percentage reduction in mass(%)\n", + "\n", + "\n", + "#result\n", + "print'percentage reduction in mass %3.1f'%m3,'%'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.35,Page No:69" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "damping ratio = 0.274\n", + "damped natural frequency = 5.268 rad/s\n", + "static sensitivity = 1\n", + "time constant = 0.1826 s\n" + ] + } + ], + "source": [ + "import math\n", + "wn = 5.477; #natural frequency\n", + "k1 = 0.1; #ratio of 2*gamma/wn\n", + "k = 1; #static sensitivity \n", + "\n", + "#calculations\n", + "gamma = (k1*wn)/float(2); #damping ratio\n", + "y = (1-(gamma**2)); #damped natural frequency in rad/s\n", + "wd = wn*math.sqrt(y); #static sensitivity\n", + "t = 1/float(wn); #time constant in s\n", + "\n", + "#result\n", + "print'damping ratio = %3.3f'%gamma;\n", + "print'damped natural frequency = %3.3f'%wd,'rad/s';\n", + "print'static sensitivity =%3.0f'%k;\n", + "print'time constant = %3.4f'%t,'s';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.36,Page No:70" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "natural frequency = 2.95 rad/s\n", + "damping ratio 0.556\n", + "damped natural frequency 2.454 rad/s\n", + "time constant 0.339 s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "w = 1.95; #angular frequency in rad/s\n", + "em = 8; #maximum permissible error in %\n", + "J = 0.14; #moment of inertia of load in kg m**2\n", + "q = 1.22; #torsional constant of the shaft in Nm/rad\n", + "M = 1.08; #amplitude ratio \n", + "\n", + "#calculations\n", + "wn = math.sqrt(q/float(J)); #natural frequency in rad/s\n", + "r = w/float(wn); #normalised frequency ratio\n", + "x = 1/float(M**2); \n", + "gamma =math.sqrt((x-((1-r**2)**2))/float(2*r)**2); #damping ratio \n", + "wd = wn*(math.sqrt(1-(gamma**2))); #damped natural frequency in rad/s\n", + "T = 1/float(wn); #time constant in s\n", + "\n", + "#result\n", + "print'natural frequency = %3.2f'%wn,'rad/s';\n", + "print'damping ratio %3.3f'%gamma;\n", + "print'damped natural frequency %3.3f'%wd,'rad/s';\n", + "print'time constant %3.3f'%T,'s';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.37,Page No:71" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective damping ratio = 0.56\n", + "undamped natural frequency = 2.74 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "po =12; #percentage overshoot in %\n", + "Tr = 0.22; #rise time in s\n", + "\n", + "#calculations\n", + "x = -math.log(12/float(100)); \n", + "gamma = x/float(math.sqrt((x**2)+(math.pi**2))); #effective damping ratio \n", + "wd = math.pi/float(Tr); #damped natural frequency in rad/s\n", + "wn = wd/float(math.sqrt(1-(gamma**2))); #undamped angular frequency in rad/s\n", + "fn = wn/float(2*math.pi); #undamped natural frequency in Hz\n", + " \n", + "#result\n", + "print'effective damping ratio = %3.2f'%gamma;\n", + "print'undamped natural frequency = %3.2f'%fn,'Hz';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.38,Page No:73" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "natural frequency 1.4\n", + "amplitude ratio 0.504\n", + "error = 49.6 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "gamma = 0.62; #damping ratio \n", + "fn = 5; #natural frequency in Hz\n", + "f = 7; #exicitation frequency in Hz\n", + " \n", + "#calculations\n", + "r = f/float(fn); #ratio of excitation frequency tonatural frequency\n", + "M = 1/float(math.sqrt(((1-(r**2))**2)+((2*gamma*r)**2))); #amplitude ratio\n", + "e = (1-M)*100; #error in %\n", + "\n", + "#result\n", + "print'natural frequency %3.1f'%r;\n", + "print'amplitude ratio %3.3f'%M;\n", + "print'error = %3.1f'%e,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.39,Page No:73 " + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the deviation remains within 12 percent of output for the frequency range 0 - 723.09 cps\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "fn = 800; #natural frequency of the system in cps\n", + "gamma = 62; #damping ratio per cent\n", + "d = 12; #maximum amount of deviation of amplitude ratio in per cent\n", + "M = 1.12; \n", + "M1 =0.88;\n", + "\n", + "#calculations\n", + "#M = 1/math.sqrt(((1-r**2)**2)+((2*0.62*r)**2));\n", + "x = (1/float(M))**2;\n", + "#1+(r**4)-(2*r**2)+(1.58*(r**2))=x\n", + "#r**4-((0.462)*(r**2))+0.203 =0\n", + "y = (1/float(M1))**2\n", + "#1+(r**4)-(2*r**2)+(1.58*(r**2))=y\n", + "#r**4-(0.462*(r**2))-0.29=0\n", + "x = math.sqrt((0.462**2)+(4*0.29));\n", + "r1 = (0.462+x)/float(2);\n", + "r = math.sqrt(r1);\n", + "f = fn*r;\n", + "\n", + "#result\n", + "print'the deviation remains within 12 percent of output for the frequency range 0 - %3.2f'%f,'cps';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.40,Page No:74" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required expresssion for the output is 0.495 sin(3.77t-69.00°)\n", + "output ampliude 0.495\n", + "output frequency 3.77\n", + "phase lag 69.00 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 0.6; #frequency in rad/s\n", + "m = 1; #magnitude of input\n", + "a = 3.77; #angle value from sin(3.77t)\n", + "\n", + "#calculations\n", + "w = 2*math.pi*f; #angular frequency\n", + "#x = complex(8/float(((j*w)**2)+(4*j*w)+20));\n", + "x1 =(-(w**2)+20)/float(8);\n", + "y1 = (4*w)/float(8);\n", + "x = (complex(x1,y1));\n", + "X = abs(x);\n", + "phi = ((math.atan(y1/float(x1)))*180)/(math.pi); #phase lag in rad\n", + "m = (1/float(2.02))*m;\n", + "\n", + "#result\n", + "print'required expresssion for the output is %3.3f'%m,'sin(3.77t-%3.2f°)'%phi;\n", + "print'output ampliude %3.3f'%m;\n", + "print'output frequency %3.2f'%a;\n", + "print'phase lag %3.2f'%phi,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.41,Page No:75" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "when the error is specified as a percentage of full scale deflection,the wattmeter reading may be between 42.5 to 57.5 W\n", + "when the error is specified as a percentage of true value,the wattmeter reading may be between 49.25 to 50.75 W\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 500; #range of wattemeter in W\n", + "e = 1.5; #percentage of full scale deflection rantging -1.5 to +1.5\n", + "Qs = 50; #true or specified power in W\n", + "me1 = 7.5; #percentage of full scale deflection indicating -7.5 to +7.5\n", + "\n", + "#calculations\n", + "me = (e/float(100))*R; #magnitude of limiting error at full scale in W ranging -me to +me\n", + "Rmax = Qs+me; #maximum wattmeter reading may be Rmax in W\n", + "Rmin = Qs-me; #minimum wattmeter reading may be Rmin in W\n", + "Er = (me1/float(Qs))*100; #relative error in %\n", + "Em = ((e*Qs)/float(100));\n", + "Mmax = Qs+Em; #maximum wattmeter reading may be Mmax in W\n", + "Mmin = Qs-Em; #minimum wattmeter reading may be Mmin in W\n", + "\n", + "#result\n", + "print'when the error is specified as a percentage of full scale deflection,the wattmeter reading may be between %3.1f'%Rmin,'to %3.1f'%Rmax,'W';\n", + "print'when the error is specified as a percentage of true value,the wattmeter reading may be between %3.2f'%Mmin,'to %3.2f'%Mmax,'W';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.42,Page No:76" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage limiting error = 6.00 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Er = 3; #accuracy of flow meter of full scale reading in % ranging -Er to +Er\n", + "Qs = 2.5*10**-6; #full scale reading in m**3/s\n", + "Qs1 = 1.25*10**-6; #flow measured by the meter in m**3/s\n", + "\n", + "#calculations\n", + "dQ = (Er/float(100))*Qs; #magnitude of limiting error ranging -dQ to +dQ in m**3/s\n", + "Er1 = dQ/float(Qs1); #relative error \n", + "Q1 = Qs1*(1); #flow rate in m**3/s\n", + "Q2 = Qs1*Er1; #flow rate in m**3/s\n", + "Er2 = (Q2/float(Q1))*100; #percentage limiting error ranging -Er2 to +Er1 in %\n", + "\n", + "#result\n", + "\n", + "print'percentage limiting error = %3.2f'%Er2,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example:1.43,Page No:77" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limting value of resultant reistance is 140.40 and 129.60 Ω\n", + "percent limiting error of the series combination of resistance 4.00 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 25; #resitance in Ω\n", + "R2 = 65; #resitance in Ω\n", + "R3 = 45; #resitance in Ω\n", + "e1 = 4; #limiting error indicating both in -ve and +ve values in %\n", + "e2 = 4; #limiting error indicating both in -ve and +ve values in %\n", + "e3 = 4; #limiting error indicating both in -ve and +ve values in % \n", + "\n", + "#calculations\n", + "e11 = (e1*R1)/float(100); #error value indicating both in -ve and +ve values\n", + "e21 = (e2*R2)/float(100); #error value indicating both in -ve and +ve values\n", + "e31 = (e3*R3)/float(100); #error value indicating both in -ve and +ve values\n", + "R = R1+R2+R3; #magnitude of resitance in Ω\n", + "e = e11+e21+e31; #error indicating both in -ve and +ve values\n", + "Rmax = R+e;\n", + "Rmin = R-e;\n", + "p =((e)/float(R))*100; #percent limiting error of the series combination of resistance in %(indicating both in -ve and +ve values)\n", + "\n", + "\n", + "#result\n", + "print'limting value of resultant reistance is %3.2f'%Rmax,' and %3.2f'%Rmin,' Ω';\n", + "print'percent limiting error of the series combination of resistance %3.2f'%p,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.44,Page No:78" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limiting error in the measurement of resistance 2.80 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 1.2; #limiting error in the measurement of power(dP/p) in % \n", + "y = 0.8; #limiting error in the measurement of current(dI/I) in %\n", + "\n", + "#calculations\n", + "z = (x+(2*y)); #limiting error in the measurement of resistance(dR/R) indicating -z to +z in %\n", + "\n", + "#result\n", + "print'limiting error in the measurement of resistance %3.2f'%z,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.45,Page No:78" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnitude of unknown resitance= 4400.00 Ω\n", + "relative limiting error 1.50 %;\n", + "limiting error 66.00 Ω\n", + "the guaranteed values of resitance lie between 4334.00 and 4466.00 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 50; #resistance in Ω\n", + "R2 = 500; #resistance in Ω\n", + "R3 = 440; #resistance in Ω\n", + "dR1 = 0.5; #limiting error(dR1/R1) of R1 ranging -dR1 to +dR1 in %\n", + "dR2 = 0.5; #limiting error(dR2/R2) of R1 ranging -dR2 to +dR2 in %\n", + "dR3 = 0.5; #limiting error(dR3/R3) of R1 ranging -dR3 to +dR3 in %\n", + "\n", + "#calculations\n", + "R4 = (R2*R3)/float(R1); #unknoen resistance in Ω\n", + "x = (dR1+dR2+dR3); #relative limiting error of unknown resistance ranging -x to +x in %\n", + "e = (x*R4)/float(100); #limiting error(Ω) indcating -ve and +ve values \n", + "Rmax = R4+e; #maximum value of resitance in Ω\n", + "Rmin = R4-e; #minimum value of resistance in Ω\n", + "\n", + "#result\n", + "print'magnitude of unknown resitance= %3.2f'%R4,'Ω';\n", + "print'relative limiting error %3.2f'%x,'%;'\n", + "print'limiting error %3.2f'%e,'Ω';\n", + "print'the guaranteed values of resitance lie between %3.2f'%Rmin,'and %3.2f'%Rmax,'Ω';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.46,Page No:78" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limiting error in force 0.2918 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration \n", + "db = 0.01; #accuracy of width ranging -db to +db\n", + "b = 4.5; #width in mm\n", + "dd = 0.01; #accuracy of depth ranging -dd to +dd\n", + "d = 0.9; #depth in mm\n", + "dl = 0.01; #accuracy of length ranging -dl to +dl\n", + "l = 45; #length in mm\n", + "x = 0.2; #modulus of rigidity(dE/E) in %\n", + "dy = 0.1; #accuracy of deflection ranging -dy to +dy\n", + "y = 1.8; #deflection in mm\n", + "\n", + "#calculations \n", + "f = (x+(db/float(b))+(3*(dd/float(d)))+(3*(dl/float(l)))+(dy/float(y))); #limiting error in force(dF/F) ranging -f to +f in %\n", + "\n", + "#result\n", + "print'limiting error in force %3.4f'%f,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.47,Page No:79" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnitude of power = 1.993 kW\n", + "magnitude of limiting error 0.0339 kW\n", + "magnitude of limiting error can lie between 2.03 and 1.96 kW\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "F = 4.26; #force at the end of torque arm in kg\n", + "dF = 0.02; #error in force ranging -dF to +dF in kg \n", + "L = 382; #length of torque arm in mm\n", + "dL = 1.2; #error in length ranging -dL to +dL in mm\n", + "R = 1192; #number of revolutions during time t\n", + "dR = 1.0; #error in number of revolutions \n", + "t = 60; #time for test run in s\n", + "dt = 0.5; #error in time in s\n", + "\n", + "#calculations\n", + "P = (2*math.pi*9.81*F*L*R)/float(t*10**6); #magnitude of power in kW\n", + "p = ((dF/float(F))+(dL/float(L))+(dR/float(R))+(dt/float(t))); #limiting error(dP/P) computed ranging -p to +p\n", + "dp = p*P; #limiting error in kW\n", + "Pmax = P+dp; #maximum value of power in kW\n", + "Pmin = P-dp; #minimum value of power in kW\n", + "\n", + "#result\n", + "print'magnitude of power = %3.3f'%P,'kW';\n", + "print'magnitude of limiting error %3.4f'%dp,'kW';\n", + "print'magnitude of limiting error can lie between %3.2f'%Pmax,'and %3.2f'%Pmin,'kW';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.48,Page No:80" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power percentage to original power 101.96 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 26.5; #current in A\n", + "Ix = 1.1; #ammeter reading was low by Ix\n", + "R = 0.12; #resistance in Ω\n", + "Rx = 0.25; #resistance reading was high by Rx\n", + "\n", + "#calculations\n", + "It = I*((1+(Ix/float(100)))); #true value of current in A\n", + "Rt = R*((1-(Rx/float(100)))); #true value of resistance in Ω\n", + "Pt = (It**2)*Rt; #true value of power in W\n", + "Pm = (I**2)*R; #measured value of power in W\n", + "P = (Pt/float(Pm))*100; #power percentage of that originally calculated in %\n", + "\n", + "#result\n", + "print'power percentage to original power %3.2f'%P,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.49,Page No:87" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arthimetic mean 1.461 mm\n", + "average deviation 0.065\n", + "standard deviation 0.08075 mm\n", + "variance 0.00652 mm**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#varioable declaration\n", + "q1 = 1.34; #micrometer reading in mm\n", + "q2 = 1.38; #micrometer reading in mm\n", + "q3 = 1.56; #micrometer reading in mm\n", + "q4 = 1.47; #micrometer reading in mm\n", + "q5 = 1.42; #micrometer reading in mm\n", + "q6 = 1.44; #micrometer reading in mm\n", + "q7 = 1.53; #micrometer reading in mm\n", + "q8 = 1.48; #micrometer reading in mm\n", + "q9 = 1.40; #micrometer reading in mm\n", + "q10 = 1.59; #micrometer reading in mm\n", + "n = 10; #number of readings\n", + "\n", + "#calculations\n", + "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthmetic mean in mm\n", + "d1 = q1-q; #derivation in mm\n", + "d2 = q2-q; #derivation in mm\n", + "d3 = q3-q; #derivation in mm\n", + "d4 = q4-q; #derivation in mm\n", + "d5 = q5-q; #derivation in mm\n", + "d6 = q6-q; #derivation in mm\n", + "d7 = q7-q; #derivation in mm\n", + "d8 = q8-q; #derivation in mm\n", + "d9 = q9-q; #derivation in mm\n", + "d10 = q10-q; #derivation in mm\n", + "d = (abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/float(n); #average deviation in mm\n", + "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in mm\n", + "V = s**2; #variance in mm**2\n", + "\n", + "#result\n", + "print'arthimetic mean %3.3f'%q,'mm';\n", + "print'average deviation %3.3f'%d;\n", + "print'standard deviation %3.5f'%s,'mm';\n", + "print'variance %3.5f'%V,'mm**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.50,Page No:88" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arthimetic mean 419.62 kHz\n", + "average deviation 5.75 kHz\n", + "standard deviation 6.55 kHz\n", + "variance 42.95 kHz**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "q1 = 412; #resonant frequency in KHz\n", + "q2 = 428; #resonant frequency in KHz\n", + "q3 = 423; #resonant frequency in KHz\n", + "q4 = 415; #resonant frequency in KHz\n", + "q5 = 426; #resonant frequency in KHz\n", + "q6 = 411; #resonant frequency in KHz\n", + "q7 = 423; #resonant frequency in KHz\n", + "q8 = 416; #resonant frequency in KHz\n", + "n = 8; #number of readings \n", + "\n", + "#calculations\n", + "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(n); #arthimetc mean in khz\n", + "d1 = q1-q; #deviation in kHz\n", + "d2 = q2-q; #deviation in kHz\n", + "d3 = q3-q; #deviation in kHz\n", + "d4 = q4-q; #deviation in kHz\n", + "d5 = q5-q; #deviation in kHz\n", + "d6 = q6-q; #deviation in kHz\n", + "d7 = q7-q; #deviation in kHz\n", + "d8 = q8-q; #deviation in kHz\n", + "d = (abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/float(n); #average deviation in kHz\n", + "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2))/float(n-1)); #standard deviation in k Hz\n", + "V = s**2; #variance in (kHz)**2\n", + "\n", + "#result\n", + "print'arthimetic mean %3.2f'%q,'kHz';\n", + "print'average deviation %3.2f'%d,'kHz';\n", + "print'standard deviation %3.2f'%s,'kHz';\n", + "print'variance %3.2f'%V,'kHz**2';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.51,Page No:94" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arthimetic mean 39.87 °C\n", + "standard deviation 0.22136 °C\n", + "probable error = 0.15 °C\n", + "probable error of mean 0.05 °C\n", + "range 0.80 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#varioable declaration\n", + "q1 = 39.6; #temperature reading °C\n", + "q2 = 39.9; #temperature reading °C\n", + "q3 = 39.7; #temperature reading °C\n", + "q4 = 39.9; #temperature reading °C\n", + "q5 = 40.0; #temperature reading °C\n", + "q6 = 39.8; #temperature reading °C\n", + "q7 = 39.9; #temperature reading °C\n", + "q8 = 39.8; #temperature reading °C\n", + "q9 = 40.4; #temperature reading °C\n", + "q10 = 39.7; #temperature reading °C\n", + "n = 10; #number of observations\n", + "\n", + "#calculations\n", + "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthimetic mean in °C\n", + "d1 = q1-q; #deviation in °C\n", + "d2 = q2-q; #deviation in °C\n", + "d3 = q3-q; #deviation in °C\n", + "d4 = q4-q; #deviation in °C\n", + "d5 = q5-q; #deviation in °C\n", + "d6 = q6-q; #deviation in °C\n", + "d7 = q7-q; #deviation in °C\n", + "d8 = q8-q; #deviation in °C\n", + "d9 = q9-q; #deviation in °C\n", + "d10 = q10-q; #deviation in °C\n", + "R1 = 40.4; #maximum value of temperature in °C\n", + "R2 = 39.6; #minimum value of temperature in °C\n", + "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in °C\n", + "r1 = 0.6745*s; #probable error of one reading in °C\n", + "rm = r1/math.sqrt(float(n-1)); #probable error of mean in °C\n", + "R = R1-R2; #range in °C\n", + "#result\n", + "print'arthimetic mean %3.2f'%q,'°C';\n", + "print'standard deviation %3.5f'%s,'°C';\n", + "print'probable error = %3.2f'%r1,'°C';\n", + "print'probable error of mean %3.2f'%rm,'°C';\n", + "print'range %3.2f'%R,'°C';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.52,Page No:96" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arthimetic mean = 200.77 °C\n", + "average deviation = 1.096 °C\n", + "standard deviation = 1.482 °C\n", + "variance = 2.197 °C**2\n", + "probable error of one reading = 1 °C\n", + "probable error of the mean = 0.1 °C\n", + "standard deviation of the standard deviation = 0.1048 °C\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "T1 = 197; #temperature reading °C\n", + "T2 = 198; #temperature reading °C\n", + "T3 = 199; #temperature reading °C\n", + "T4 = 200; #temperature reading °C\n", + "T5 = 201; #temperature reading °C\n", + "T6 = 202; #temperature reading °C\n", + "T7 = 203; #temperature reading °C\n", + "T8 = 204; #temperature reading °C\n", + "T9 = 205; #temperature reading °C\n", + "f1 = 2; #frequency of occurence \n", + "f2 = 4; #frequency of occurence \n", + "f3 = 10; #frequency of occurence \n", + "f4 = 24; #frequency of occurence \n", + "f5 = 36; #frequency of occurence \n", + "f6 = 14; #frequency of occurence \n", + "f7 = 5; #frequency of occurence \n", + "f8 = 3; #frequency of occurence \n", + "f9 = 2; #frequency of occurence \n", + "\n", + "\n", + "#calculations\n", + "t1 = T1*f1;\n", + "t2 = T2*f2;\n", + "t3 = T3*f3;\n", + "t4 = T4*f4;\n", + "t5 = T5*f5;\n", + "t6 = T6*f6;\n", + "t7 = T7*f7;\n", + "t8 = T8*f8;\n", + "t9 = T9*f9;\n", + "n = (f1+f2+f3+f4+f5+f6+f7+f8+f9); \n", + "AM = (t1+t2+t3+t4+t5+t6+t7+t8+t9)/float(n); #arthimetic mean in °C\n", + "tf = (t1+t2+t3+t4+t5+t6+t7+t8+t9)/float(n);\n", + "d1 = T1-tf;\n", + "d2 = T2-tf;\n", + "d3 = T3-tf;\n", + "d4 = T4-tf;\n", + "d5 = T5-tf;\n", + "d6 = T6-tf;\n", + "d7 = T7-tf;\n", + "d8 = T8-tf;\n", + "d9 = T9-tf;\n", + "x1 = d1*f1;\n", + "x2 = d2*f2;\n", + "x3 = d3*f3;\n", + "x4 = d4*f4;\n", + "x5 = d5*f5;\n", + "x6 = d6*f6;\n", + "x7 = d7*f7;\n", + "x8 = d8*f8;\n", + "x9 = d9*f9;\n", + "x = abs(x1)+abs(x2)+abs(x3)+abs(x4)+abs(x5)+abs(x6)+abs(x7)+abs(x8)+abs(x9);\n", + "y1 = f1*(d1**2);\n", + "y2 = f2*(d2**2);\n", + "y3 = f3*(d3**2);\n", + "y4 = f4*(d4**2);\n", + "y5 = f5*(d5**2);\n", + "y6 = f6*(d6**2);\n", + "y7 = f7*(d7**2);\n", + "y8 = f8*(d8**2);\n", + "y9 = f9*(d9**2);\n", + "y = y1+y2+y3+y4+y5+y6+y7+y8+y9;\n", + "sigma = x/float(n); #average deviation in °C\n", + "sd = math.sqrt(y/float(n)); #standard deviation in °C\n", + "V = sd**2; #variance in °C**2\n", + "r1 = 0.6745*sd; #probable error of one reading in °C\n", + "rm = r1/float(math.sqrt(n)); #probable error of mean in °C\n", + "sigmam = sd/float(math.sqrt(n)); #standard deviation of the mean in °C\n", + "sigmasd = sigmam/float(math.sqrt(2)); #standard deviation of standard deviation in °C\n", + "\n", + "#result\n", + "print'arthimetic mean = %3.2f'%AM,'°C';\n", + "print'average deviation = %3.3f'%sigma,'°C';\n", + "print'standard deviation = %3.3f'%sd,'°C';\n", + "print'variance = %3.3f'%V,'°C**2';\n", + "print'probable error of one reading = %3.0f'%r1,'°C';\n", + "print'probable error of the mean = %3.1f'%rm,'°C';\n", + "print'standard deviation of the standard deviation = %3.4f'%sigmasd,'°C';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.53,Page No:97" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thus about 57 % of readings are within -1.2A to 1.2A of the true value\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I = 80; #current in A\n", + "p = 0.2; #p(y) value given \n", + "x = 0.8; #probabiltiy of error \n", + "y = 0.5248; #y valu from probability tables for sorresponding p(y) value\n", + "x1 = 1.2; #probabiltiy of error\n", + "\n", + "#calculation\n", + "sigma = (x/float(y)); #standard eviation\n", + "y1 = x1/float(sigma); \n", + "#p(y) value corresponding to y1 value from probabitiy table is 0.2842\n", + "p1 = 0.2842;\n", + "P = (2*p1)*100; #probabity of an error \n", + "\n", + "#result\n", + "print'thus about %3.0f'%P,'% of readings are within -1.2A to 1.2A of the true value';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.54,Page No:97" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of readings exceeding maximum deflection of 25mm is 16 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x1 =25; #deflaction in mm\n", + "x2 = 21.9; #deflaction in mm\n", + "r = 2.1; #probable error in mm\n", + "\n", + "#calculations\n", + "x = x1-x2; #deviation in mm\n", + "sigma = r/float(0.6745); #standard deviation\n", + "y = x/float(sigma); #ratio \n", + "n = 2*0.341*100; \n", + "ne = 100-n; #number of readings exceeding a deviation of 3.1\n", + "nx = ne/float(2); #number of readings exceeding maximum deflection of 25mm in mm\n", + "\n", + "#result\n", + "print'number of readings exceeding maximum deflection of 25mm is %3.0f'%nx,'mm';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.55,Page No:98" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of rods whose length between specified limits is 8953\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#in case of me of normal distribution .thereis equal probability of +ve and -ve errors\n", + "n1 = 5000; #number of rods having length greater than 20 mm\n", + "n2 = 1000; #number of rods having length greater than 20.25 mm\n", + "n3 = 5000; #number of rods having length smaller than 20 mm\n", + "y = 1.3; #from probability tables ,corresponding to the probability of p(y) \n", + "x1 = 20.25; #maximum length of rod ,that should not be exceed in mm\n", + "x2 = 20.0; #nominal length in mm\n", + "x4 = 19.5; #minimum length of rod ,that should not be smmaler than this value in mm\n", + "y2 = 0.4953; #from probability tables ,corresponding to the y value \n", + "\n", + "#calculations\n", + "n4 = n1-n2; #number of rods wehere length lies between 20mm and 20.25\n", + "x = x1-x2; #probability that 4000 rods have a value greater than 20mm and less than 20.25mm\n", + "sigma = x/float(y); #standard deviation\n", + "y1 = (x2-x4)/float(sigma); #y value for with nominal length of 19.5mm and 20mm\n", + "n = (n1+n3)*y2; #number of rods that have lengths between 19.5 and 20mm\n", + "N = n+n4; #total number of rods whose length between specified limits \n", + "\n", + "#result\n", + "print'total number of rods whose length between specified limits is %3.0f'%N;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.56,Page No:98" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "we expect 12 readings to lie between 1485 to 1515 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "q = 1515; #tachometer reading in rpm\n", + "q1 = 1500; #tachometer reading in rpm\n", + "h = 0.04; #precision index\n", + "p = 0.3015; #p(y) value from probability table corresponding to y value\n", + "n =20; #number of readings\n", + "\n", + "#calculations\n", + "x = q-q1; #deviation in r.p.m(indicates in both -ve and +ve value)\n", + "sigma = 1/float((math.sqrt(2))*h); #standard deviation\n", + "y = x/float(sigma); \n", + "#p(y) from probability table is 0.3015\n", + "p = 2*p; #probability of an error\n", + "N = p*n; #number of redings\n", + "\n", + "#result\n", + "print'we expect %3.2d'%N,'readings to lie between 1485 to 1515 rpm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.57,Page No:99" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thus 75 percent of depth measurements lie within th range 15.09 and -14.91 cm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 15; #nominal depth of water in cm\n", + "n = 40; #total number of times the measurements taken\n", + "n1 = 10; #number of measurement reading found to lie outside a particular range \n", + "h = 9; #precision index in cm**-1\n", + "y = 1.15; #from probability table corresponding value of p(y)\n", + "\n", + "#calculations\n", + "P = (n-n1)/float(n); #probability of falling within a particular range \n", + "p1 = P/float(2); #half of these measiurements have a +ve and half have -ve errors\n", + "sigma = 1/float((math.sqrt(2))*h); #standard defviation\n", + "x = y*sigma; \n", + "Rmax = d+x;\n", + "Rmin = d-x;\n", + "\n", + "#result\n", + "print'Thus 75 percent of depth measurements lie within th range %3.2f'%Rmax,'and -%3.2f'%Rmin,'cm';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.58,Page No:100" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "precision index 0.099\n", + "number of false alarms 6.00\n", + "precision index 0.1155\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "py1 = 0.45; #py1 is p(y) given data\n", + "y = 0.675; #from probavility table corresponding to p(y) value\n", + "x = 4.8; \n", + "q = 100; #fixed mass flow rate in kg/s\n", + "q1 = 88; #flow meter reading in kg/s\n", + "n = 30; #number of days in november month\n", + "n1 = 4; #number of times flow is checked in a day\n", + "x1 = 0.5; #overall probabilty \n", + "y2 = 1.96; #y value corresponding to py ,from probability table\n", + "\n", + "#calculations\n", + "sigma = x/float(y); #standard deviation \n", + "a = (math.sqrt(2))*sigma;\n", + "h = 1/float(a); #precision index\n", + "x1 = q-q1;\n", + "y1 = x1/float(sigma); #y value for masss flow rate of 88kg/s\n", + "\n", + "#p(y) corresponding to y1 is 0.45\n", + "\n", + "e = 0.5-py1; #amount it fall into false alarms \n", + "N = n*n1; #number of measurements in themonth of november\n", + "E = e*N; #expected false alarms\n", + "E1 = x*E; #reduced number of flase alarms\n", + "P = E1/float(N); #probability of false alarms\n", + "py = 0.5-P; #probability of datato lie in tolerent band\n", + "sigma1 = x1/float(y2); #standard deviation\n", + "h1 = 1/float((math.sqrt(2))*sigma1); #precision index\n", + "\n", + "\n", + "#result\n", + "print'precision index %3.3f'%h;\n", + "print'number of false alarms %3.2f'%E;\n", + "print'precision index %3.4f'%h1;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.59,Page No:103" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It is given that for 10 readings the ratio of deviation to standard deviation is not to exceed 1.96\n", + "therfore x5 = 2.05 which is greater than 1.96,reading 4.33 should be rejected\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#varioable declaration\n", + "q1 = 5.30; #length in cm\n", + "q2 = 5.73; #length in cm\n", + "q3 = 6.77; #length in cm\n", + "q4 = 5.26; #length in cm\n", + "q5 = 4.33; #length in cm\n", + "q6 = 5.45; #length in cm\n", + "q7 = 6.09; #length in cm\n", + "q8 = 5.64; #length in cm\n", + "q9 = 5.81; #length in cm\n", + "q10 = 5.75; #length in cm\n", + "n = 10; #number of copper wires\n", + "\n", + "#calculations\n", + "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthimetic mean in cm\n", + "d1 = q1-q; #deviation in cm\n", + "d2 = q2-q; #deviation in cm\n", + "d3 = q3-q; #deviation in cm\n", + "d4 = q4-q; #deviation in cm\n", + "d5 = q5-q; #deviation in cm\n", + "d6 = q6-q; #deviation in cm\n", + "d7 = q7-q; #deviation in cm\n", + "d8 = q8-q; #deviation in cm\n", + "d9 = q9-q; #deviation in cm\n", + "d10 = q10-q; #deviation in cm\n", + "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in cm \n", + "x1 = abs(d1)/float(s); #ratio of deviation to standard deviation\n", + "x2 = abs(d2)/float(s); #ratio of deviation to standard deviation\n", + "x3 = abs(d3)/float(s); #ratio of deviation to standard deviation\n", + "x4 = abs(d4)/float(s); #ratio of deviation to standard deviation\n", + "x5 = abs(d5)/float(s); #ratio of deviation to standard deviation\n", + "x6 = abs(d6)/float(s); #ratio of deviation to standard deviation\n", + "x7 = abs(d7)/float(s); #ratio of deviation to standard deviation\n", + "x8 = abs(d8)/float(s); #ratio of deviation to standard deviation\n", + "x9 = abs(d9)/float(s); #ratio of deviation to standard deviation\n", + "x10 = abs(d10)/float(s); #ratio of deviation to standard deviation\n", + "\n", + "#result\n", + "print'It is given that for 10 readings the ratio of deviation to standard deviation is not to exceed 1.96';\n", + "print'therfore x5 = %3.2f'%x5,'which is greater than 1.96,reading %3.2f should be rejected'%q5;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.60,Page No:105" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "linear equation 0.672 u +0.591\n", + "standard deviation = 0.34\n", + "standard deviation = 0.51\n", + "standard deviation = 0.04\n", + "standard deviation = 0.31\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u1 = 1.8; #initial velocity\n", + "u2 = 4.6; #initial velocity\n", + "u3 = 6.6; #initial velocity\n", + "u4 = 9.0; #initial velocity\n", + "u5 = 11.4; #initial velocity\n", + "u6 = 13.4; #initial velocity\n", + "n = 6;\n", + "v1 = 2.2; #final velocity\n", + "v2 = 3.2; #final velocity\n", + "v3 = 5.2; #final velocity\n", + "v4 = 6.4; #final velocity\n", + "v5 = 8.0; #final velocity\n", + "v6 = 10.0; #final velocity\n", + "\n", + "#calulations\n", + "w1 = u1*v1;\n", + "w2 = u2*v2;\n", + "w3 = u3*v3;\n", + "w4 = u4*v4;\n", + "w5 = u5*v5;\n", + "w6 = u6*v6;\n", + "x1 = u1**2;\n", + "x2 = u2**2;\n", + "x3 = u3**2;\n", + "x4 = u4**2;\n", + "x5 = u5**2;\n", + "x6 = u6**2;\n", + "u = u1+u2+u3+u4+u5+u6;\n", + "v = v1+v2+v3+v4+v5+v6;\n", + "w = w1+w2+w3+w4+w5+w6;\n", + "x = x1+x2+x3+x4+x5+x6;\n", + "a = ((n*w)-(u*v))/float((n*x)-(u**2));\n", + "b = ((v*x)-(w*u))/float((n*x)-(u**2));\n", + "y1 = (((a*u1)+b-v1)**2);\n", + "y2 = (((a*u2)+b-v2)**2);\n", + "y3 = (((a*u3)+b-v3)**2);\n", + "y4 = (((a*u4)+b-v4)**2);\n", + "y5 = (((a*u5)+b-v5)**2);\n", + "y6 = (((a*u6)+b-v6)**2);\n", + "y = y1+y2+y3+y4+y5+y6;\n", + "Sv = math.sqrt(y/float(n)); #standard deviation indicate sboth -ve and +ve values\n", + "Su = Sv/float(a); #standard deviation indicate sboth -ve and +ve values\n", + "Sa = (math.sqrt((n)/float(abs((n*x)-(u**2)))))*Sv; #standard deviation indicate sboth -ve and +ve values\n", + "Sb = (math.sqrt((x)/float(abs((n*x)-(u**2)))))*Sv; #standard deviation indicate sboth -ve and +ve values\n", + "\n", + "\n", + "#result\n", + "print'linear equation %3.3f'%a,'u +%3.3f'%b;\n", + "print'standard deviation = %3.2f'%Sv;\n", + "print'standard deviation = %3.2f'%Su;\n", + "print'standard deviation = %3.2f'%Sa;\n", + "print'standard deviation = %3.2f'%Sb;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.61,Page No:106" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Best fit equation 4.569e-05 f**2 +1.519e-02 f mW\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "u1 = 550; #initial velocity\n", + "u2 = 700; #initial velocity\n", + "u3 = 850; #initial velocity\n", + "u4 = 1000; #initial velocity\n", + "n = 4;\n", + "v1 = 0.04182; #final velocity\n", + "v2 = 0.04429; #final velocity\n", + "v3 = 0.05529; #final velocity\n", + "v4 = 0.0610; #final velocity\n", + "\n", + "#calulations\n", + "#P = ((a)*(f**2))+(b*f)\n", + "#P/f = (a*f)+b\n", + "w1 = u1*v1;\n", + "w2 = u2*v2;\n", + "w3 = u3*v3;\n", + "w4 = u4*v4;\n", + "x1 = u1**2;\n", + "x2 = u2**2;\n", + "x3 = u3**2;\n", + "x4 = u4**2;\n", + "u = u1+u2+u3+u4;\n", + "v = v1+v2+v3+v4;\n", + "w = w1+w2+w3+w4;\n", + "x = x1+x2+x3+x4;\n", + "a = ((n*w)-(u*v))/float((n*x)-(u**2));\n", + "b = ((v*x)-(w*u))/float((n*x)-(u**2));\n", + "\n", + "\n", + "#result\n", + "print'Best fit equation %3.3e'%a,'f**2 +%3.3e f'%b,'mW';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.62,Page No:108" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limiting error 1.33 %\n", + "standard deviations 0.943 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "q1 = 50; #measuremnent in series in units\n", + "q2 = 100; #measuremnent in series in units\n", + "x = 0.02; #error in measurement of q1\n", + "y = 0.01; #error in measurement of q2\n", + "a = 1; #x % of 50\n", + "b = 1; #y % of 100\n", + "\n", + "\n", + "#calculations\n", + "e1 = (q1*x)/float(q1+q2); #individual limiting errors\n", + "e2 = (q2*y)/float(q1+q2); #individual limiting errors\n", + "e = (e1+e2)*100; #combined limiting errors in % (indicates both -ve and +ve values)\n", + "er = (math.sqrt((a**2)+(b**2))); #resultant error \n", + "er1 = (er/float(q1+q2))*100; #standard deviation in %\n", + "\n", + "#result\n", + "print'limiting error %3.2f'%e,'%';\n", + "print'standard deviations %3.3f'%er1,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.63,Page No:116" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series resistance 97.5 Ω\n", + "shunt resistance 0.02525 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rm =2.5; #resistance in Ω\n", + "Im = 0.1; #current in A\n", + "V = 10; #voltage in V\n", + "I = 10; #ammeter reading in A\n", + "\n", + "#calculations\n", + "Rs = (V/float(Im))-Rm; #series resistance in Ω\n", + "Rsh = (Im*Rm)/float(I-Im); #shunt resistance in Ω\n", + "\n", + "#result\n", + "print'series resistance %3.1f'%Rs,'Ω';\n", + "print'shunt resistance %3.5f'%Rsh,'Ω';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.64,Page No:116" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shunt resistance 0.05025 Ω\n", + "series resistance 990 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rm = 10; #resistance in Ω\n", + "Im = 0.005; #current in A\n", + "I = 1; #current in A\n", + "V = 5; #voltage in V\n", + "\n", + "#calculations\n", + "Rsh = (Im*Rm)/float(I-Im); #shunt resistance in Ω\n", + "Rs = (V-(Im*Rm))/float(Im); #series resistance in Ω\n", + "\n", + "#result\n", + "print'shunt resistance %3.5f'%Rsh,'Ω';\n", + "print'series resistance %3.0f'%Rs,'Ω';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.65,Page No:117" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflecting torque 8.1e-05 N-m\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 100; #number of turns \n", + "l = 0.03; #length of each side in m\n", + "B = 0.09; #flux density in Wb/m**2\n", + "I = 0.01; #current through the coil in A\n", + "\n", + "\n", + "#calculation\n", + "F = N*B*I*l; #force in N\n", + "T = F*l; #deflecting torque in N-m\n", + "\n", + "#result\n", + "print'deflecting torque %3.1e'%T,'N-m';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.66,Page No:118" + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error when internal resiatance is 5Ω is 7.13\n", + "percentage error after rise of temperature 1.5\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rm = 5; #resistance in Ω\n", + "Im = 0.015; #current through instrument in A\n", + "I = 100; #current to be measured in A\n", + "alpham = 0.00015; #manganin in °C\n", + "alphac = 0.004; #copper in °C\n", + "R1 = 1; #reistance of copper in Ω\n", + "R2 = 4; #reistance of manganin in Ω\n", + "T = 20; #temperature in °C\n", + " \n", + "#calculations\n", + "Ish = I-Im; #current through shunt in A\n", + "v = Im*Rm; #voltage across the shunt in V\n", + "Rsh = v/float(Ish); #shunt resistance in Ω \n", + "Rshunt = Rsh*(1+(T*alpham)); #shunt resistance after rise of temperature in Ω \n", + "Rinst = Rm*(1+(T*alphac)); #instrument resistance in Ω \n", + "i = (Rshunt/float(Rinst+Rshunt))*100; #current through instrument in A\n", + "R = (i/float(Im))*100; #reading of instrument in A\n", + "e = I-R; #percentage error \n", + "Rinst1 = R1*(1+(T*alphac))+R2*(1+(T*alpham)); #instrument resistance in Ω \n", + "Iinst = (Rshunt/float(Rinst1+Rshunt))*100; #instrument current in A\n", + "Iread = (Iinst*100)/float(Im); #instrument reading in A\n", + "e1 = I-Iread; #percentage error \n", + "#result\n", + "print'percentage error when internal resiatance is 5Ω is %3.2f'%e;\n", + "print'percentage error after rise of temperature %3.1f'%e1;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.67,Page No:118" + ] + }, + { + "cell_type": "code", + "execution_count": 121, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error 0.8 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 250; #voltage in V\n", + "R = 500; #resistance in Ω\n", + "L = 1; #inductance in H\n", + "I = 0.05; #current in A\n", + "f = 100; #frequency in Hz\n", + "\n", + "#calculations\n", + "R1 = V/float(I); #total ohmic resistance in Ω\n", + "Z = math.sqrt((R1**2)+((2*math.pi*f*L)**2)); #coil impedance in Ω\n", + "Vr = (V*R1)/float(Z); #voltage reading in A.c\n", + "e = ((V-Vr)/float(V))*100; #percentage error in %\n", + "\n", + "#result\n", + "print'percentage error %3.1f'%e,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.68,Page No:119" + ] + }, + { + "cell_type": "code", + "execution_count": 122, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltmeter reading at 25Hz frequency 14.97 V\n", + "voltmeter reading at 100Hz frequency 14.55 V\n", + "As frequency is increased ,impedance of the voltmeter increases ,hence current is decreased\n", + "therefore voltmeter readings are lower\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 300; #resistance in Ω\n", + "L = 0.12; #inductance in H\n", + "f = 25; #frequency in Hz\n", + "I = 15; #current in A\n", + "f1 = 100; #frequency in Hz\n", + "\n", + "\n", + "#calculations\n", + "Z = math.sqrt((R**2)+((2*math.pi*f*L)**2)); #impedance at 25Hz in Ω\n", + "V = I*(R/float(Z)); #voltmeter reading at 25 Hz in V\n", + "Z1 = math.sqrt((R**2)+((2*math.pi*f1*L)**2)); #impedance at 100Hz in Ω \n", + "V1 = I*(R/float(Z1)); #voltmeter reading at 100Hz in V\n", + "\n", + "#result\n", + "print'voltmeter reading at 25Hz frequency %3.2f'%V,'V';\n", + "print'voltmeter reading at 100Hz frequency %3.2f'%V1,'V';\n", + "print'As frequency is increased ,impedance of the voltmeter increases ,hence current is decreased';\n", + "print'therefore voltmeter readings are lower';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.69,Page No:132" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power factor of the motor 0.75 (lag)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W1 =920; #wattmeter reading in W\n", + "W2 =300; #wattmeter reading in W\n", + "\n", + "#calculations\n", + "phi = math.atan(((math.sqrt(3))*(W1-W2))/(float(W1+W2)))*(180/float(math.pi)); \n", + "pf = math.cos((phi)*(math.pi/float(180))); #power factor \n", + "\n", + "#result\n", + "print'power factor of the motor %3.2f'%pf,'(lag)';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:1.70,Page No:132" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power factor of the motor 0.22 (lag)\n", + "line current 47.34 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W1 =14.2; #wattmeter reading in W\n", + "W2 =-6.1; #wattmeter reading in W \n", + "El = 440; #line voltage in V\n", + "P = 8.1*1000; #power in W\n", + "\n", + "#calculations\n", + "phi = math.atan(((math.sqrt(3))*(W1-W2))/(float(W1+W2)))*(180/float(math.pi)); #phase lag\n", + "pf = math.cos((phi)*(math.pi/float(180))); #power factor \n", + "Il = P/float((math.sqrt(3))*(El)*(pf)); #line current in A\n", + "\n", + "#result\n", + "print'power factor of the motor %3.2f'%pf,'(lag)';\n", + "print'line current %3.2f'%Il,'A';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.71,Page No:132" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "W1 = 22.12 kW\n", + "W2 = 2.88 kW\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "P = 25; #input power in kW\n", + "El = 440; #line voltage in \n", + "pf = 0.6; #power factor\n", + "\n", + "#calculations\n", + "phi = ((math.acos(pf))*180)/float(math.pi);\n", + "t = (math.tan((phi)*(math.pi/float(180))));\n", + "#we have tan = math.sqrt(3)*(W1-W2)/W1+W2\n", + "#W1+W2 =E\n", + "y = (P*t)/float(math.sqrt(3));\n", + "W1 = (P+y)/float(2);\n", + "W2 = (P-y)/float(2);\n", + "\n", + "#result\n", + "print'W1 = %3.2f'%W1,'kW';\n", + "print'W2 = %3.2f'%W2,'kW';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.72,Page No:134" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error 0.33 %(fast)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 230; #voltage in V\n", + "i = 5; #current in A \n", + "t = 360; #time in s\n", + "n = 60; #number of revolutions\n", + "n1 = 520; #number of revolutions\n", + "cosphi = 1; #power factor \n", + "\n", + "#calculations\n", + "\n", + "E = (V*i*cosphi*t)/float(1000*3600); #energy consumed in 360 seconds in kWh\n", + "Er = n/float(n1); #energy recorded by the meter in kWh\n", + "e = ((Er-E)/float(Er))*100; #percentage error in %\n", + "\n", + "#result\n", + "\n", + "print'percentage error %3.2f'%(e),'%(fast)';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.73,Page No:135" + ] + }, + { + "cell_type": "code", + "execution_count": 144, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error 1.0562 %\n", + "Note:Ans printing mistake in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 230; #voltage in V\n", + "i = 4.5; #current in A\n", + "cosphi = 1;\n", + "t = 190; #time in s\n", + "n = 10; #number of revolutions\n", + "n1 = 185; #number of revolutions\n", + "\n", + "#calculations\n", + "E = (V*i*cosphi*t)/float(1000*3600); #energy consumed in 360 seconds in kWh\n", + "Er = n/float(n1); #energy recorded by the meter in kWh\n", + "e = ((E-Er)/float(Er))*100; #percentage error in %\n", + "\n", + "#result\n", + "print'percentage error %3.4f'%(e),'%';\n", + "print'Note:Ans printing mistake in textbook'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.74,Page No:135" + ] + }, + { + "cell_type": "code", + "execution_count": 145, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power in the circuit 800 W\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 150; #number of revolutions\n", + "t = 45; #time in s\n", + "\n", + "\n", + "#calculations\n", + "p = 1*(x/float(15000)); #power metered in kWh\n", + "a =t/float(3600); #energy consumed in t seconds in times of P\n", + "P = p/float(a); #power in the circuit in W\n", + "\n", + "#result\n", + "print'power in the circuit %3.0f'%(P*1000),'W';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:1.75,Page No:135" + ] + }, + { + "cell_type": "code", + "execution_count": 146, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy recorded 0.575 kWh\n", + "actual energy consumed 0.5367 kWh\n", + "percentage error 6.67 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "V = 230; #D.C supply in V\n", + "r = 225; #number of revolutions\n", + "i = 40*225; #meter reading in A-s\n", + "t =10; #time in minutes\n", + "l = 14; #current in A\n", + "\n", + "\n", + "#calculations\n", + "L = i/float(10*60); #current in A\n", + "E = (V*L*t)/float(1000*60); #energy recorded in kWh\n", + "Ea = (V*l*t)/float(1000*60); #actual energy consumed kWh\n", + "e = ((E-Ea)/float(E))*100; #percentage error in %\n", + "\n", + "#result\n", + "print'energy recorded %3.3f'%E,'kWh';\n", + "print'actual energy consumed %3.4f'%Ea,'kWh';\n", + "print'percentage error %3.2f'%e,'%'\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..1d312472 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2_.ipynb @@ -0,0 +1,1754 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:Electronic Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1,Page no:158" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "currentt through the PMMC meter is 2.5 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "gm = 0.005; #transconductance in siemens\n", + "RQ1 = 100*10**3; #FET resistance in KΩ\n", + "RQ2 = 100*10**3; #FET resistance in KΩ\n", + "RQ = 100*10**3; #FET resistance in KΩ\n", + "Rm = 50; #meter's resistance in Ω\n", + "RD = 10*10**3; #drain resistance in KΩ\n", + "v1 = 1; \n", + "\n", + "#calculations\n", + "x = (RQ*RD)/float(RQ+RD);\n", + "i = (gm*x*v1)/float((2*x)+Rm); #currentt through the PMMC meter(mA)\n", + "\n", + "#result\n", + "print'currentt through the PMMC meter is %3.1f'%(i*10**3),'mA';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2,Page no:164" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error -3.9 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration \n", + "e = 150; #in V\n", + "t = 3; #time in s\n", + "Kfsin = 1.11; #form factor\n", + "\n", + "#calculations\n", + "#the sawtooth waveform can be expressed as e = mt\n", + "m = e/float(t);\n", + "\n", + "#e = 50*t;\n", + "#now integration of (50*t)**2 will be 2500*((t**3)/3) with limits ranging 0 to 3 ,solving we get\n", + "\n", + "Erms = math.sqrt((1/float(9))*((2500)*(t**3)-(0))); #Erms in V\n", + "#now integration of (50*t) will be (50/2)*((t**2)/2) with limits ranging 0 to 3 ,solving we get\n", + "Eav = (1/float(6))*((50)*((t**2)-0)); #Eav in V\n", + "Kfsaw = Erms/float(Eav); #form factor \n", + "x = (Kfsin)/float(Kfsaw); #ratio of two form factors\n", + "e = ((x-1)/float(1))*100; #percentage error \n", + "\n", + "#result\n", + "print'percentage error %3.1f'%e,'%'\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3,Page no:165" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error 11.00 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#vaariable declaration\n", + "Kfsin = 1.11; #form factor of sine wave\n", + "\n", + "#calculation\n", + "#Erms = math.sqrt((1/T)*(integration(e**2)dt)) with limits from 0 to T is math.sqrt((1/T)*(Emax**2(T-0)))=Emax\n", + "#Erms = Emax;\n", + "#Erms = math.sqrt((1/T)*(integration(e*dt)) with limits from 0 to T is math.sqrt((2/T)*(Emax(T/2-0)))=Emax\n", + "#Eav = Emax;\n", + "#Kfsquare = Erms/float(Emax); #form factor of squarewave\n", + "Kfsquare = 1;\n", + "x = Kfsin/float(Kfsquare); #ratio of form factors\n", + "e = ((x-1)/float(1))*100; #percentage error in %\n", + "\n", + "#result\n", + "print'percentage error %3.2f'%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4,Page no:186" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage 1 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Va = 2000; #anode voltage in V\n", + "Id = 0.02; #length of parallel plates in m\n", + "d = 0.005; #distance between plates in m\n", + "L = 0.3; #distance between screen and plates in m\n", + "D = 0.03; #deflect of beam in m\n", + "g = 100; #overall gain\n", + "\n", + "#calculations\n", + "Vd = (2*d*Va*D)/float(L*Id); #voltage in V\n", + "Vi = Vd/float(g); #input voltage in V\n", + "\n", + "#result\n", + "print'input voltage %d'%Vi,'V';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5,Page no:186" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection sensitivity 0.2 mm/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Va = 2500; #potential difference in V\n", + "Id = 0.025; #length of parallel plates in m\n", + "d = 0.005; #distance between plates in m\n", + "L = 0.2; #distance between screen and plates in m\n", + "D = 0.03; #deflect of beam in m\n", + "\n", + "\n", + "#calculations\n", + "Vd = (2*d*Va*D)/float(L*Id); #voltage in V\n", + "Vi = D/float(Vd); #deflection sensitivity in mm/V\n", + "\n", + "#result\n", + "print'deflection sensitivity %2.1f'%(Vi*10**3),'mm/V';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6,Page no:186" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection sensitivity 0.16 mm/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Id = 0.02; #length of horizontal plates in m\n", + "d = 0.005; #distance between plates in m\n", + "L = 0.2; #distance between screen and plates in m\n", + "Va = 2500; #accelerating voltage in V\n", + "\n", + "#calculations\n", + "S = (L*Id)/float(2*d*Va); #deflection sensitivityin mm/V\n", + "\n", + "\n", + "#result\n", + "print'deflection sensitivity %3.2f'%(S*10**3),'mm/V';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7,Page no:187" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "beam speed 29.65 m/s\n", + "deflection sensitivity 0.3 mm/V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variabledeclaration\n", + "va = 2500; #anode to cathode voltage in V\n", + "Id = 0.015; #length of parallel plates in m\n", + "d = 0.005; #distance between plates in m\n", + "L = 0.5; #distance between plates and screen in m\n", + "m = 9.109*10**-31; #mass of electron in kg\n", + "e = 1.602*10**-19; #charrge of electron in C\n", + "\n", + "#calculations\n", + "v = math.sqrt((2*e*va)/float(m)); #beam speed in m/s\n", + "S = (L*Id)/float(2*d*va); #deflection sensitivity in mm/V\n", + "\n", + "#calculatons\n", + "print'beam speed %3.2f'%(v*10**-6),'m/s';\n", + "print'deflection sensitivity %3.1f'%(S*10**3),'mm/V';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8,Page no:187" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of magnetic field 1.584 m Wb/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 0.22; #distance between screen and plates in m\n", + "l = 0.033; #width of uniform magnetuc field in m\n", + "Va = 6000; #anode potential in V\n", + "D = 0.044; #deflection on the screen in m\n", + "m = 9.107*10**-31; #mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in m\n", + "\n", + "#calculations\n", + "X = math.sqrt(e/float(2*m*Va)); #density of magnetic field in Wb/m**2\n", + "B = D/float(L*l*X);\n", + "\n", + "#result\n", + "print'density of magnetic field %3.3f'%(B*10**3),'m Wb/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9,Page no:187" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage applied to Y deflection 30.179 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "B = 1.8*10**-4; #flux density in Wb/m**2\n", + "Va = 800; #final anode voltage in V\n", + "d = 0.01; #distance ebetween plates in m\n", + "m = 9.107*10**-31; #mass of electron in kg\n", + "e = 1.6*10**-19; #charge of electron in C\n", + "\n", + "#calculations\n", + "#we have D = B*L*I*(math.sqrt((e/float(2*m*Va)))\n", + "#let us assume x = B*(math.sqrt((e/float(2*m*Va)))\n", + "#thus D = x*L*I\n", + "#we also have D = L*Vd*l/float(2*d*Va)\n", + "#let us assume y = 1/float(2*d*Va) \n", + "#thus D = L*Vd*l*y\n", + "#comparing both D equations we get\n", + "x = B*(math.sqrt((e)/float(2*m*Va)));\n", + "y = 1/float(2*d*Va) ;\n", + "Vd = x/float(y); #voltage applied to Y deflection in V\n", + " \n", + "#result\n", + "print'voltage applied to Y deflection %3.3f'%Vd,'V';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10,Page no:207" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Peak-to-peak value 15.6 mV\n", + "Amplitude 7.8 mV\n", + "R.m.s value 5.515 mV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "a = 3; #vertical attenuation in mV/div\n", + "x = 5; #one part is sub divided in units\n", + "\n", + "#callculations\n", + "s = 1/float(x); #1 subdivision in units\n", + "pp = 2+(a*s); #positive peak in units\n", + "Vpp = pp+pp; #peak to peak voltage in divisions\n", + "Vpp1 = a*Vpp; #peak to peak voltage in mV\n", + "Vmax = Vpp1/float(2); #amplitude in mV\n", + "Vrms =Vmax/float(math.sqrt(2)); #R.m.s value in mV\n", + "\n", + "#result\n", + "print'Peak-to-peak value %3.1f'%Vpp1,'mV';\n", + "print'Amplitude %3.1f'%Vmax,'mV';\n", + "print'R.m.s value %3.3f'%Vrms,'mV';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11,Page no:210" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "possible phases are 30.00 ° or 330.00 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "#from figure we note this values\n", + "y1 = 1.25; #vertical axis in divisions\n", + "y2 = 2.5; #maximum vertical value in divisions\n", + "\n", + "#calculations\n", + "x = y1/float(y2); \n", + "phi = math.asin(x); #sinphi value \n", + "phi1 = 360-((phi*180)/float(math.pi)); #possible phases\n", + "\n", + "#result\n", + "print'possible phases are %3.2f'%((phi*180)/float(math.pi)),'°','or %3.2f'%phi1,'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12,Page no:219" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance 120 kΩ\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 20; #resistance in kΩ\n", + "R2 = 30; #resistance in kΩ\n", + "R3 = 80; #resistance in kΩ\n", + "\n", + "#calculations\n", + "Rx = (R2*R3)/float(R1); #unknown resistance in kΩ\n", + "\n", + "#result\n", + "print'unknown resistance %d'%Rx,'kΩ';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13,Page no:222" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance 49.977 uΩ\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R3 = 100.03*10**-6; #standard resistance in uΩ\n", + "l = 100.31; # inner ratio arm resistance in Ω\n", + "m = 200; # inner ratio arm resistance in Ω\n", + "R1 = 100.24; #outer ratio arm resistance in Ω\n", + "R2 = 200; #outer ratio arm resistance in Ω\n", + "Ry = 680*10**-6; #unknown resistor in uΩ\n", + "\n", + "#calculation\n", + "x = (R1*R3)/float(R2); #resistance in Ω\n", + "y = (m*Ry)/float(l+m+Ry); #resistance in Ω\n", + "z = ((R1/float(R2))-(l/float(m))); #unknown resistanc in Ω\n", + "Rx = x+(y*z);\n", + "\n", + "#rresult\n", + "print'unknown resistance %3.3f'%(Rx*10**6),'uΩ';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14,Page no:224" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance 500\n", + "unknowm angle -50 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Z1 = 50; #inductive resistance in Ω\n", + "Z2 = 125; #pure rresistance in Ω\n", + "Z3 = 200; #inductive resistance in Ω\n", + "theta1 = 80;\n", + "theta2 = 0;\n", + "theta3 = 30;\n", + "\n", + "#calculations\n", + "Z4 = (Z2*Z3)/float(Z1); #unknown resistance in Ω\n", + "theta4 = theta2+theta3-theta1; #unknowm angle in °\n", + " \n", + "#result\n", + "print'unknown resistance %d'%Z4;\n", + "print 'unknowm angle %d'%theta4,'°';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15,Page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " R4 = 133.333333 Ω\n", + "capacitance 1.59 uF\n" + ] + } + ], + "source": [ + "import cmath\n", + "\n", + "#variable declaration\n", + "R1 = 225; #resistance in Ω \n", + "R2 = 150; #resistance in Ω \n", + "C2 = 0.53*10**-6; #capacitance in F\n", + "R3 = 100; #resistance in Ω \n", + "L = 7.95*10**-3; #inductance in H \n", + "f = 1000; #frequency in Hz\n", + "\n", + "#calculations\n", + "Z1 = R1;\n", + "w = 2*cmath.pi*f;\n", + "x = (1/float(w*C2));\n", + "Z2 = complex(R2,-x);\n", + "y = w*L;\n", + "Z3 = complex(R3,y);\n", + "Z4 = (Z2*Z3)/float(Z1); #unknown arm \n", + "Z41 = complex(Z4)\n", + "C4 = (1/float(2*cmath.pi*f*100)); #imaginary value is 100 from Z4\n", + "c = (Z4);\n", + "\n", + "#result\n", + "print' R4 = %05f'%(Z4.real),'Ω';\n", + "print'capacitance %3.2f'%(C4*10**6),'uF'\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16,Page no:226" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shuntless resistance 140 Ω\n", + "capacitor of imperfect condenser 0.0115 uF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "w = 7500; #frequency in radians/sec \n", + "R2 = 140; #resistance in Ω\n", + "R3 = 1000; #non-reactive resistance of Ω\n", + "R4 = 1000; #non-reactive resistance of Ω\n", + "C2 = 0.0115; #capacitance in uF\n", + "\n", + "\n", + "#calculations\n", + "R1 = (R2*R3)/float(R4); #shuntless resistance in Ω\n", + "C1 = (C2*R4)/float(R3); #capacitor of imperfect condenser in F \n", + "\n", + "#result\n", + "print'shuntless resistance %d'%R1,'Ω';\n", + "print'capacitor of imperfect condenser %3.4f'%C1,'uF';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17,Page no:228" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance 0.53 kΩ\n", + "unknown inductance 1.5 H\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 235; #resistance in kΩ\n", + "R2 = 2.5; #resistance in kΩ\n", + "R3 = 50; #resistance in kΩ\n", + "C1 = 0.012; #capacitance in uF\n", + "\n", + "#calculations\n", + "Rx = (R2*R3)/float(R1); #unknown resistance in Ω\n", + "Lx = C1*R2*R3; #unknown inductance in H\n", + "\n", + "#result\n", + "print'unknown resistance %3.2f'%Rx,'kΩ';\n", + "print'unknown inductance %3.1f'%Lx,'H';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18,Page no:230" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent resistance 4.32 KΩ\n", + "equivalent inductance 0.296 H\n", + "Note:calculation mistake in textbook\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "w = 3000; #frequency in radians/sec \n", + "R2 = 9000; #resistance in Ω\n", + "R1 = 1800; # resistance of Ω\n", + "R3 = 900; # resistance of Ω\n", + "C1 = 0.9*10**-6; #capacitance in F\n", + "\n", + "#calculations\n", + "a = ((w**2)*(R1**2)*(C1**2));\n", + "Rx = ((w**2)*(C1**2)*R1*R2*R3)/float(1+a); #equivalent resistance in KΩ\n", + "Lx = (R2*R3*C1)/float(1+((w**2)*(R1**2)*(C1**2))); #equivalent inductance in H\n", + "\n", + "#result\n", + "print'equivalent resistance %3.2f'%(Rx*10**-3),'KΩ';\n", + "print'equivalent inductance %3.3f'%Lx,'H';\n", + "print'Note:calculation mistake in textbook';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19,Page no:232" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance 3000 Ω\n", + "capacitance 0.20 uF\n", + "dissipation factor 3.77\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 1.5*10**3; #resistance in Ω\n", + "R2 = 3000; #resistance in Ω\n", + "C1 = 0.4*10**-6; #capacitance in F\n", + "C3 = 0.4*10**-6; #capacitance in F\n", + "f = 1000; #frequency in Hz\n", + "\n", + "#calculations\n", + "w = 2*math.pi*f;\n", + "Rx = (R2*C1)/float(C3); #resistance in kΩ\n", + "Cx = (R1*C3)/float(R2); #capacitance in F\n", + "D = w*Cx*Rx; #dissipation factor\n", + "\n", + "#result\n", + "print'resistance %d'%Rx,'Ω';\n", + "print'capacitance %3.2f'%(Cx*10**6),'uF';\n", + "print'dissipation factor %3.2f'%D;\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20,Page no:234" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance 500 Ω\n", + "inductance 0.3 H\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 1000; #resistance in Ω\n", + "S = 1000; #resistance in Ω\n", + "P = 500; #resistance in Ω\n", + "C = 0.5*10**-6; #capacitance in uF\n", + "r = 100; #resistance in Ω\n", + "\n", + "#calculations\n", + "R = (P*Q)/float(S); #resistance in Ω\n", + "L = ((C*P)*((r*(Q+S))+(Q*S)))/float(S); #inductance in H\n", + "\n", + "#result\n", + "print'resistance %d'%R,'Ω';\n", + "print'inductance %3.1f'%L,'H';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21,Page no:235" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance 500 Ω\n", + "inductance 1.95 H\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R2 = 1000; #resistance in Ω\n", + "R4 = 1000; #resistance in Ω\n", + "R3 = 500; #resistance in Ω\n", + "C = 3*10**-6; #capacitance in uF\n", + "r = 100; #resistance in Ω\n", + "\n", + "#calculations\n", + "R = (R2*R3)/float(R4); #resistance in Ω\n", + "L = ((C*R2)*((r*(R3+R4))+(R3*R4)))/float(R4); #inductance in H\n", + "\n", + "#result\n", + "print'resistance %d'%R,'Ω';\n", + "print'inductance %3.2f'%L,'H';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22,Page no:237" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance of specimen 8.34 mH\n", + "resistance of specimen 80.65 Ω\n", + "impedance of specimen 132.240 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R2 = 100; #resistance in Ω\n", + "R3 = 834; #resistance in Ω\n", + "C4 = 0.1*10**-6; #capacitance in F\n", + "C3 = 0.124*10**-6; #capacitance in F\n", + "f = 1000;\n", + "\n", + "#calculations\n", + "L1 = R2*R3*C4; #inductance in H\n", + "R1 = (R2*C4)/float(C3); #resistance in Ω\n", + "X1 = 2*math.pi*2*f*L1; #reactance of specimen in Ω\n", + "Z1 = math.sqrt((R1**2)+(X1**2)); #impedance of specimen in Ω\n", + "\n", + "\n", + "#result\n", + "print'inductance of specimen %3.2f'%(L1*10**3),'mH';\n", + "print'resistance of specimen %3.2f'%R1,'Ω';\n", + "print'impedance of specimen %3.3f'%Z1,'Ω';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23,Page no:243" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance 0.9175 uF\n", + "series resistance of capacitor 1.75 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "M = 18.35*10**-3; #mutual inductance in H\n", + "R1 = 200; #non-reactive resistance in Ω\n", + "L1 = 40.6*10**-3; #inductance in mH\n", + "R2 = 119.5; #non-reactive resistance in Ω\n", + "R4 = 100; # resistance in Ω\n", + "\n", + "#calculations\n", + "C2 = M/float(R1*R4); #capacitance in F \n", + "R3 = (R4*(L1-M))/float(M); #resistance in Ω\n", + "R = R3-R2; #series resistance of capacitor in Ω \n", + "\n", + "#result\n", + "print'capacitance %3.4f'%(C2*10**6),'uF';\n", + "print'series resistance of capacitor %3.2f'%R,'Ω';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.24,Page no:245" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent resistance 11.2 KΩ\n", + "equivalent capacitance 42.04 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R1 = 2.8*10**3; #resistance in Ω\n", + "C1 = 4.8*10**-6; #capacitance in uF\n", + "R2 = 20*10**3; #resistance in Ω\n", + "R4 = 80*10**3; #resistance in Ω\n", + "f = 2000; #frequency in Hz\n", + "w = 12.57*10**3;\n", + "R3 = 11.2*10**3;\n", + "\n", + "#calculations\n", + "x = 1/float((w**2)*(C1**2)*(R1));\n", + "y = R1+x;\n", + "z = R4/float(R2);\n", + "R3 = z*(x+y); #equivalent resistance in KΩ\n", + "a = (w**2)*C1*R1*R3;\n", + "C3 = 1/float(a); #equivalent capacitance in F\n", + "\n", + "#result\n", + "print'equivalent resistance %3.1f'%(R3*10**-3),'KΩ';\n", + "print'equivalent capacitance %3.2f'%(C3*10**12),'pF';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.25,Page no:246" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance 26.82 Ω\n", + "inductance 52.6 mH\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L1 = 52.6; #inductance in mH\n", + "R2 = 1.68; #resistance in MHz\n", + "r1 = 28.5; #resistance in MHz\n", + "\n", + "#calculations\n", + "#at balance of bridge (r1+jwL1)=((R2+r2)+jwL2)\n", + "#comparing both real and imaginary terms we get \n", + "\n", + "r2 = r1-R2; #resistance in Ω\n", + "L2 = L1; #inductance in H\n", + "\n", + "#result\n", + "print'resistance %3.2f'%r2,'Ω';\n", + "print'inductance %3.1f'%L1,'mH';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.26,Page no:246" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R4 = 34.311 Ω\n", + "inductance 29 mH\n" + ] + } + ], + "source": [ + "import cmath\n", + "\n", + "#variable declaration\n", + "R3 = 300; #resistance in Ω \n", + "R2 = 500; #resistance in Ω \n", + "C1 = 0.2*10**-6; #capacitance in F\n", + "C3 = 0.1*10**-6; #capacitance in F\n", + "f = 1000; #frequency in Hz\n", + "\n", + "#calculations\n", + "w = 2*(cmath.pi)*f; #angular frequency \n", + "z = (1/float(w*C1));\n", + "Z1 = complex(0,-z);\n", + "Z2 = R2;\n", + "x = 1/float(R3);\n", + "y = w*C3;\n", + "Y3 = complex(x,y);\n", + "Z4 = (Z2)/complex(Z1*Y3);\n", + "L = ((182.19)/float(2*cmath.pi*f)); #imaginary value is 182.12 from Z4\n", + "\n", + "#result\n", + "print'R4 = %3.3f'%(Z4.real),'Ω';\n", + "print'inductance %3.0f'%(L*10**3),'mH';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2.27,Page no:247" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R4 = 373.35 Ω\n", + "capacitance 0.1818 uF\n" + ] + } + ], + "source": [ + "import cmath\n", + "\n", + "#variable declaration\n", + "R1 = 200; #resistance in Ω \n", + "R2 = 200; #resistance in Ω \n", + "C2 = 5*10**-6; #capacitance in F\n", + "C3 = 0.2*10**-6; #capacitance in F\n", + "R3 = 500; #resistance in Ω \n", + "f = 1000; #frequency in Hz\n", + "\n", + "#calculations\n", + "Z1 = R1;\n", + "w = 2*cmath.pi*f; #angular frequency\n", + "x = (1/float(w*C2));\n", + "Z2 = complex(R2,-x);\n", + "y = 1/float(w*C3);\n", + "Z3 = complex(R3,-y);\n", + "Z4 = (Z2*Z3)/float(Z1); #unknown arm \n", + "C4 = (1/float(2*cmath.pi*f*875.3)); #imaginary value is 100 from Z4\n", + "\n", + "#result\n", + "print'R4 = %3.2f'%(Z4.real),'Ω';\n", + "print'capacitance %3.4f'%(C4*10**6),'uF';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2.28,Page no:248" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R4 = 167 Ω\n", + "inductance 0.1 H\n" + ] + } + ], + "source": [ + "import cmath\n", + "\n", + "#variable declaration\n", + "R1 = 600; #resistance in Ω \n", + "R2 = 100; #resistance in Ω \n", + "C1 = 1*10**-6; #capacitance in F\n", + "R3 = 1000; #resistance in Ω \n", + "f = 1000; #frequency in Hz\n", + "\n", + "\n", + "#calculations\n", + "w = 2*cmath.pi*f; #angular frequency \n", + "x = 1/float(R1);\n", + "y = w*C1;\n", + "Y1 = complex(x,y);\n", + "Z2 = R2;\n", + "Z3 = R3;\n", + "Z4 = Z2*Z3*Y1; #unknown arm\n", + "L = (628.3/float(2*cmath.pi*f)); #inductance in H\n", + "\n", + "#result\n", + "print'R4 = %3.0f'%(Z4.real),'Ω';\n", + "print'inductance %3.1f'%L,'H';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 2.29,Page no:249" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 124.97 pF\n", + "power factor = 0.055\n", + "relative permittivity = 6.24\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C2 = 106*10**-12; #capacitance in F\n", + "R4 = 1000/float(math.pi); #resistance in\n", + "C4 = 0.55*10**-6; #capacitance in F\n", + "R3 = 270; #resistance in\n", + "e0 = 8.854*10**-12; #absolute permittivity \n", + "t = 0.005; #thickness of bakelite in m\n", + "d = 12*10**-2; #diameter in m\n", + "f = 50; #frequency in Hz\n", + "\n", + "#calculations\n", + "R4 = 1000/float(math.pi); #resistance in\n", + "A = (math.pi/float(4))*((d)**2); #area of electrodes in m**2\n", + "w = 2*math.pi*f; #angular frequency\n", + "R1 = (R3*C4)/float(C2); #resistance in \n", + "C1 = (R4*C2)/float(R3); #apacitance in pF\n", + "P = w*R1*C1; #power factor \n", + "er = (C1*t)/float(e0*A); #relative permittivity\n", + "\n", + "#result\n", + "print'capacitance = %3.2f'%(C1*10**12),'pF';\n", + "print'power factor = %3.3f'%P;\n", + "print'relative permittivity = %3.2f'%er;\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.30,Page no:260" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distributed capacitance 20 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f1 = 2*10**6; #frequency in Hz\n", + "C1 = 420*10**-12; #capacitance in F\n", + "C2 = 90*10**-12; #capacitance in F\n", + "f2 = 4*10**6; #frequency in Hz\n", + "\n", + "#calculations\n", + "Cd = (C1-(4*C2))/float(3); #distributed capacitance in pF\n", + "\n", + "#result\n", + "print'distributed capacitance %d'%(Cd*10**12),'pF';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.31,Page no:260" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distributed capacitance 18.571 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f1 = 2*10**6; #frequencyin Hz\n", + "f2 = 5*10**6; #frequencyin Hz \n", + "C1 = 410*10**-12; #capacitance in F\n", + "C2 = 50*10**-12; #capacitance in F\n", + "\n", + "#calculations\n", + "x = f2/float(f1);\n", + "Cd = (C1-((x**2)*(C2)))/float((x**2)-1); #distributed capacitance in pF\n", + "\n", + "#result\n", + "print'distributed capacitance %3.3f'%(Cd*10**12),'pF';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.32,Page no:261" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistive 48.18 Ω\n", + "reactive components 492.74 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C1 = 190*10**-12; #capacitance in F\n", + "Q1 = 75; #quality factor \n", + "C2 = 170*10**-12; #capacitance in F\n", + "Q2 = 45; #quality factor \n", + "f = 200*10**3; #frequency in Hz\n", + "\n", + "#calculations\n", + "Rx = ((C1*Q1)-(C2*Q2))/float(2*math.pi*f*C1*C2*Q1*Q2); #resistive in Ω\n", + "Xx = (C1-C2)/float(2*math.pi*f*C1*C2); #reactive components in Ω\n", + "\n", + "#result\n", + "print'resistive %3.2f'%Rx,'Ω';\n", + "print'reactive components %3.2f'%Xx,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.33,Page no:261" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error 0.5 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 4; #resistance in Ω\n", + "f = 500*10**3; #frequency in Hz\n", + "C = 110*10**-12; #capacitance in F\n", + "x = 0.02; #resistance across oscillatory circuit in Ω\n", + "\n", + "#calculations\n", + "Qtrue = 1/float(2*math.pi*f*C*R);\n", + "Qindicated = 1/float(2*math.pi*f*C*(R+x));\n", + "e = ((Qtrue-Qindicated)/float(Qtrue))*100; #percentage error in %\n", + "\n", + "#result\n", + "print'percentage error %3.1f'%e,'%';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.34,Page no:262" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "self-capacitance 9.89 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f1 = 600*10**3; #frequency in Hz\n", + "f2 = 2*10**6; #frequency in Hz\n", + "C1 = 100*10**-12; #capacitance in F\n", + "\n", + "#calculations\n", + "Cd = ((f1**2)*C1)/float((f2**2)-(f1**2)); #self-capacitance in F\n", + "\n", + "#calculations\n", + "print'self-capacitance %3.2f'%(Cd*10**12),'pF';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.35,Page no:263" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance 719.61 uH\n", + "resistance 16 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "f = 400*10**3; #frequency in kHz\n", + "C = 220*10**-12; #capacitance in F\n", + "Rsh = 0.8; #resistance in Ω\n", + "Q = 110; #quality factor\n", + "\n", + "#calculations\n", + "Lcoil = 1/float(((2*math.pi*f)**2)*C); #inductance in H\n", + "x = (2*math.pi*f*Lcoil)/float(Q);\n", + "Rcoil = x-Rsh; #resistance in Ω\n", + "\n", + "\n", + "#calculations\n", + "print'inductance %3.2f'%(Lcoil*10**6),'uH';\n", + "print'resistance %3.0f'%Rcoil,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.36,Page no:271" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance L = 7.33 uH\n", + "capacitance C = 858.000 pF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Cs = 210*10**-12; #capacitance in F\n", + "Cv = 6*10**-12; #capacitance in F\n", + "f1 = 2*10**6; #frequency in Hz\n", + "f2 = 4*10**6; #frequency in Hz\n", + "\n", + "#calculations\n", + "#we have Cs+Cv = 1/(4*(math.pi**2)*(f2**2)*L\n", + "#we have C+Cv = 1/(4*(math.pi**2)*(f2**2)*L \n", + "L = 1/float(4*(math.pi**2)*(f2**2)*(Cs+Cv)); #inductance in uH\n", + "C = (1/float((4*(math.pi**2)*(f1**2)*L)))-Cv; #capacitance in pF\n", + " \n", + "#result\n", + "print'inductance L = %3.2f'%(L*10**6),'uH';\n", + "print'capacitance C = %3.3f'%(C*10**12),'pF';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.37,Page no:271" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance L = 3.598e-05 uH\n", + "resistance R = 17.3 Ω\n", + "ccalculation mistake in textbook assuming approximate values\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C1 = 40*10**-12; #capacitance in pF\n", + "C2 = 48*10**-12; #capacitance in pF\n", + "f = 4*10**6; #frequency in Hz\n", + "R1 = 60; #resistance in Ω\n", + "\n", + "#calculations\n", + "Co = (C1+C2)/float(2);\n", + "L = 1/float(4*(math.pi**2)*(f**2)*Co); #inductance in H\n", + "#we have I = E/math.sqrt((R**2)+((w*l)-((1/w*C1))**2))\n", + "#we also have I = E/(R+R1)\n", + "#comparing we get and solving we get R**2 + 2*R1*R +R1**2 = R**2 + ((w*l)-((1/w*C1))**2)\n", + "w = 2*math.pi*f; #angular frequency \n", + "x = w*L;\n", + "y = 1/float(w*C2);\n", + "Y = ((x-y)**2);\n", + "R = (Y-(R1**2))/float(2*R1); #resistance in Ω\n", + "\n", + "#result\n", + "print'inductance L = %3.3e'%(L),'uH';\n", + "print'resistance R = %3.1f'%(R),'Ω';\n", + "print'ccalculation mistake in textbook assuming approximate values'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.38,Page no:272" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Q factor 100\n", + "effective resistance 8.29 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 160*10**-12; #capacitancein pF\n", + "f0 = 1.2*10**6; #frequency in Hz\n", + "f01 = 6*10**3; #frequency in Hz\n", + "\n", + "\n", + "#calculations\n", + "f1 = f0+f01; #frequency in Hz\n", + "f2 = f0-f01; #frequency in Hz\n", + "f = f1-f2; #frequency in Hz\n", + "Q = f0/float(f); #Q factor\n", + "R = f/float(2*math.pi*f0*f0*C); #effective resistance in Ω\n", + "\n", + "\n", + "#result\n", + "print'Q factor %d'%Q;\n", + "print'effective resistance %3.2f'%R,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example 2.39,Page no:274" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "self-capacitance of the coil = 13.33 pF\n", + "inductance = 292.97 uH\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C1 = 200*10**-12; #capacitance in F\n", + "C2 = 40*10**-12; #capacitance in F\n", + "\n", + "#calculations\n", + "f1 = (2/float(math.pi))*10**6; #frequency in Hz\n", + "f2 = 2*f1; #frequency in Hz\n", + "x1 = 4*(math.pi**2)*(f1**2);\n", + "x2 = 4*(math.pi**2)*(f2**2);\n", + "#L = 1/(x1*(C+Cd));\n", + "# L = 1/(x2*(C+Cd));\n", + "#comparing we get following equation for Cd\n", + "Cd = ((x1*C1)-(x2*C2))/float(x2-x1); #capacitance in pF\n", + "c = C1+Cd;\n", + "L = 1/float(x1*(c)); #inductance in H\n", + "\n", + "#result\n", + "print'self-capacitance of the coil = %3.2f'%(Cd*10**12),'pF';\n", + "print'inductance = %3.2f'%(L*10**6),'uH';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..697d4b21 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb @@ -0,0 +1,957 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Sensors And Transducers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2,Page No:401" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "displacement 5.75 mm\n", + "displacement 12.800 mm\n", + "resolution of potentiometer 0.050 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R =10000; #resistance in Ω\n", + "R1 = 3850; #resistance of potentiometer Ω\n", + "R2 = 7560; #resistance of potentiometer Ω\n", + "l = 50*10**-3; #length of uniform wound wire in m\n", + "x = 10;\n", + "\n", + "#calculations\n", + "\n", + "R3 = (R/float(2)); #resistance of potentiometer in .normal position in Ω\n", + "r = (R/float(l)); #resistance of potentiometer wire per unit length Ω/mm\n", + "dR1 = R3-R1; #change in resistance of potentiometer from its normal position Ω\n", + "D1 = (dR1/float(r)); #displacement in mm\n", + "dR2 = (R2-R3); #change in resistance of potentiometer from its normal position in Ω\n", + "D2 = (dR2/float(r)); #displacement in mm\n", + "RE = (x/float(r)); #resolution of potentiometer in mm\n", + "\n", + "#result\n", + "print'displacement %3.2f'%(D1*10**3),'mm';\n", + "print'displacement %3.3f'%(D2*10**3),'mm';\n", + "print'resolution of potentiometer %3.3f'%(RE*10**3),'mm';\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.3,Page No:403" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance at 35°C is 50 Ω\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R25 = 100; #resistance of thermistor at 25°C\n", + "t2 = 35; #temperature in °C\n", + "t1 = 25; #temperature in °C\n", + "alpha = 0.05; #temperature coefficient\n", + "\n", + "#calculations\n", + "t = t2-t1; #temperaturre difference in °C\n", + "x = alpha*t;\n", + "R35 = (R25)*(1-x); #resistance in Ω\n", + "\n", + "#result\n", + "print'resistance at 35°C is %d'%R35,'Ω';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.4,Page No:406" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance = 0.04 mH\n", + "ratio of change in inductance to the original inductance =0.02\n", + "ratio of change in inductance to the original inductance =0.02\n", + "Hence dl is directly proportional to displacement\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "l = 1.00; #length in mm\n", + "L = 2; #inductance in mH\n", + "d = 0.02; #displacement in mm\n", + "\n", + "#calculations\n", + "la = l-d; #length of air gap when d=0.02\n", + "dl = (2*(1/float(la)))-L; #change in inductance in mH\n", + "r = dl/float(L); #ratio of change in inductance to the original inductance\n", + "dd = r/float(l); #ratio of displacement to original gap length\n", + "\n", + "#result\n", + "print'inductance = %3.2f'%dl,'mH';\n", + "print'ratio of change in inductance to the original inductance =%3.2f'%r;\n", + "print'ratio of change in inductance to the original inductance =%3.2f'%dd;\n", + "print'Hence dl is directly proportional to displacement';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.5,Page No:409" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage linearity 0.25 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 1.8; #output voltage at maximum displacement in V\n", + "de = 0.0045; #deviation from straight line through the origin\n", + "\n", + "#calculations \n", + "a = (de/float(d))*100; #percentage linearity indicating in both -ve and +ve\n", + "\n", + "#result\n", + "print'percentage linearity %3.2f'%a,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.6,Page No:409" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sensitivty of LVDT 3.00 mV/mm\n", + "resolution 0.0067 mm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Vo = 1.8; #output voltage in mV\n", + "Vi = 0.6; #input voltage in mV;\n", + "a = 500; #amplification factor\n", + "r = 1/float(4); #scale can read \n", + "v = 4; #output of voltmetr in V\n", + "D = 100; #millivoltmeter readings\n", + "\n", + "#calculation\n", + "s = Vo/float(Vi); #sensitivity in mV/mm\n", + "sm = a*s; #sensitivity of measurement in mV/mm\n", + "s1 = (v/float(D))*10**3; # 1 scale division in mV\n", + "Vm = r*s1; #minimum voltage that can be read on voltmeter\n", + "R = Vm/float(sm); #resolution in mm\n", + "\n", + "#result \n", + "print'sensitivty of LVDT %3.2f'%s,'mV/mm';\n", + "print'resolution %3.4f'%R,'mm';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.7,Page No:413" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance = 13.275 pF\n", + "change in capacitance 1.475 pF\n", + "ratio ofper unit change of capacitance to per unit change in displacement = 1.111111\n", + "capcitance when mica is inserted = 13.88 pF\n", + "change in capacitance when mica sheet is inserted = 1.62 pF\n", + "ratio ofper unit change of capacitance to per unit change in displacement = 1.168\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 300*10**-6; #area of plate in m**2\n", + "d = 0.2*10**-3; #distance between plates in mm\n", + "e0 = 8.85*10**-12; #permittivity in F/m\n", + "er2 = 8; #dielectric constant of mica \n", + "d1 = 0.18*10**-3; #distance between plates in mm\n", + "er1 = 1; #dielectric constant\n", + "D1 = 0.19;\n", + "D2 = 0.01; #thickness of mica sheet in mm\n", + "D3 = 0.17; #displacement in mm\n", + "D4 = 0.01;\n", + "\n", + "\n", + "\n", + "\n", + "#calculation\n", + "C = ((e0*A)/float(d)); #value of capacitance in pF\n", + "dD = d-d1; #change in displacement in mm\n", + "dC = ((e0*A)/(float(d1)))-C; #change in capacitance in capacitance\n", + "x1 = (dC/float(C)); #per unit change in capacitance \n", + "x2 = (dD/float(d)); #per unit change of displacement\n", + "d3 = d-d1; #length of air gap between plates in mm\n", + "x = x1/float(x2); #ratio of unit change of capacitance to unit change in displacement\n", + "D = (D1/(float(er1)))+((D2/float(er2)));\n", + "C1 = (e0*A)/float(D*10**-3); #initial capacitance of transducer in mm\n", + "d4 = d1-d3; #length of air gap in mm\n", + "d1 = (D3/float(er1))+(D4/float(er2));\n", + "C2 = (e0*A)/float(d1*10**-3); # capacitance with displacement is applien in pF\n", + "dC2 = C2-C1; #change in capacitance in pF\n", + "y1 = (dC2/float(C1)); #per unit change in capacitance \n", + "y2 = (dD/float(d)); #per unit change of displacement\n", + "Y = y1/float(y2); #ratio of unit change of capacitance to unit change in displacement\n", + "\n", + "#result\n", + "print'capacitance = %2.3f'%(C*10**12),'pF';\n", + "print'change in capacitance %3.3f'%(dC*10**12),'pF';\n", + "print'ratio ofper unit change of capacitance to per unit change in displacement = %f'%x;\n", + "print'capcitance when mica is inserted = %3.2f'%(C1*10**12),'pF';\n", + "print'change in capacitance when mica sheet is inserted = %2.2f'%(dC2*10**12),'pF';\n", + "print'ratio ofper unit change of capacitance to per unit change in displacement = %3.3f'%Y;\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.8,Page No:417" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage = 192.50 V\n", + "charge sensitivity = 2.233 pC/N\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "t = 2.5*10**-3; #thickness in m\n", + "g = 0.055; #voltage intensity in Vm/N\n", + "p = 1.4*10**6; #pressure in N/m**2\n", + "e = 40.6*10**-12; #permittivity of quartz in F/m\n", + "\n", + "#calculation\n", + "E = g*t*p; #output voltage in V\n", + "q = e*g; #charge sensitivity in pC/N\n", + "\n", + "#result\n", + "print'output voltage = %3.2f'%E,'V';\n", + "print'charge sensitivity = %3.3f'%(q*10**12),'pC/N';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.9,Page No:417" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force = 43.64 N\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 6*10**-3; #radius in m\n", + "t = 1.8*10**-3; #thickness in m\n", + "g = 0.055; #voltage intensity in Vm/N\n", + "E = 120; #voltage developed in V\n", + "\n", + "#calculation\n", + "A = r*r; #area in m**2\n", + "p = E/(float(g*t)); #pressure in N/m**2\n", + "F = p*A; #force in N\n", + "\n", + "\n", + "#result\n", + "print'force = %3.2f'%F,'N';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.10,Page No:417" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "strain = 0.01392\n", + "charge = 900.0 pC\n", + "capacitance = 300 pf\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r = 6*10**-3; #radius in m\n", + "t = 1.5*10**-3; #thickness in m\n", + "e = 12.5*10**-9; #permittivity in F/m\n", + "F = 6; #force in N\n", + "d = 150*10**-12; #charge density in pC/N\n", + "E = 12*10**6; #modulus of elasticity in N/m**2\n", + "s = 0.167*10**6; #stress \n", + "\n", + "#calculation\n", + "A = r*r;\n", + "p = F/float(A); #pressure in MN/m**2\n", + "p1 = p*10**-6;\n", + "e1 = s/float(E); #strain \n", + "g = d/float(e); #voltage sensitivity in V*m/N;\n", + "E1 = g*t*p; #voltage generated in V\n", + "Q = d*F; #charge in C\n", + "C = (Q)/float(E1); #capacitance in F\n", + "\n", + "#result\n", + "print'strain = %3.5f'%e1;\n", + "print'charge = %3.1f'%(Q*10**12),'pC';\n", + "print'capacitance = %3.3d'%(C*10**12),'pf';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.11,Page No:421" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall angle 1.55 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00912; #resistivity in Ωm\n", + "B = 0.48; #flux density in Wb/m**2\n", + "RH = 3.55*10**-4; #hall coefficient in m**3/C\n", + "\n", + "#calculation\n", + "Ex = p; #Ex in terms of Jx in °\n", + "Ey = RH*B; #ey interms of Jx in °\n", + "x= Ex/float(Ey);\n", + "t = math.atan(x);\n", + "\n", + "print'hall angle %3.2f'%t,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.12,Page No:421" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage between contacts = 0.00256 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "p = 0.00912; #resistivity in Ωm\n", + "B = 0.48; #flux density in Wb/m**2\n", + "RH = 3.55*10**-4; #hall coefficient in m**3/C\n", + "I = 0.015; # current in A\n", + "l = 15*10**-3; #length in m\n", + "b = 10**-3; #breadth in m\n", + "\n", + "\n", + "#calculation\n", + "A = l*b; #area in m**2\n", + "Jx = I/float(A); #current density in A/m**2\n", + "Ey = RH*B*Jx; #Ey in V/m\n", + "V = Ey*I; #voltage between contacts in V\n", + "\n", + "#result\n", + "print'voltage between contacts = %5.5f'%V,'V';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.13,Page No:432" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poissons ratio = 1.6\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Gf = 4.2; #guage factor of resistance \n", + "\n", + "#calculation\n", + "u =(Gf-1)/float(2); #poisson's ratio\n", + "\n", + "#result\n", + "print'poissons ratio = %1.1f'%u;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.14,Page No:432" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in resistance = 48.00 mΩ\n", + "Note:Ans printing mistake in textbook\n", + "change in resistance = 48.00 mΩ\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 120; #resistance in Ω\n", + "Gf = 2; #guage factor \n", + "s = 400*10**6; #elastic limit stress in N/m**2\n", + "E = 200*10**9; #modulus of elasticity in N/m**2\n", + "alpha = 20*10**-6; #resistance temperature coefficient in /°C\n", + "x = 1/float(10); #cahnge in stress \n", + "dt = 20; #change in temperature in °C\n", + "\n", + "#calculations\n", + "sc = s*x; #change in stress in N/m**2\n", + "e = sc/float(E); #strain \n", + "dR = Gf*e*R; #change in resistance in mΩ\n", + "dR1 = R*alpha*dt; #change in resistance in mΩ\n", + "\n", + "#result\n", + "print'change in resistance = %3.2f'%(dR*10**3),'mΩ';\n", + "print'Note:Ans printing mistake in textbook';\n", + "print'change in resistance = %3.2f'%(dR1*10**3),'mΩ';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.15,Page No:433" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in length = 3.72e-06 m\n", + "force = 2.438 kN\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 0.12; #length in m\n", + "A = 3.8*10**-4; #area in m**2\n", + "R = 220; #resistance in Ω\n", + "Gf = 2.2; #guage factor\n", + "dR = 0.015; #change in resistance in Ω\n", + "E = 207*10**9; #elasticity in N/m**2\n", + "\n", + "#calculations\n", + "dL = (dR*L)/float(R*Gf); #change in length in m \n", + "s = (E*dL)/float(L); \n", + "F = s*A; #force in kN \n", + "\n", + "#result\n", + "print'change in length = %2.2e'%dL,'m';\n", + "print'force = %3.3f'%(F*10**-3),'kN';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.16,Page No:444" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "strain = 594.5 microstrain\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Rg = 100; #resistance in Ω\n", + "Rsh = 80000; #resistance in Ω\n", + "Gf = 2.1;\n", + "\n", + "#calculations\n", + "x = (Rg/float(Rg+Rsh)); #equivalent strain\n", + "eeq = x/(float(Gf)); #strain in microstrain\n", + "\n", + "#result\n", + "print'strain = %3.1f'%(eeq*10**6),'microstrain';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.17,Page No:445" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "strain = 356.43 microstrain\n", + "Note:calculation mistake in text book,Rg value is taken wrong in calculating s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 4; #four arm bridge\n", + "Rg = 200; #resistance in Ω\n", + "Rsh = 100*10**3; #resistance in Ω\n", + "x = 140; #number of divisions\n", + "Gf = 2.0; #guage factor\n", + "\n", + "#calculation\n", + "eeff = Rg/float(n*Gf*(Rg+Rsh)); #effective strain\n", + "d = eeff/float(x); #1 division scale\n", + "s = float(d)*Rg; #strain when loaded\n", + "\n", + "#result\n", + "print'strain = %3.2f'%(s*10**6),'microstrain';\n", + "print'Note:calculation mistake in text book,Rg value is taken wrong in calculating s';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.18,Page No:447" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "longitudinal stress = 70.01 MN/m**2\n", + "longitudinal stress = 146.2 MN/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "ex = 0.00016; #strain values in axial \n", + "ey = 0.00064; #strain values in circumferential direction\n", + "E = 200*10**9; #modulus of elasticity in N/,**2\n", + "u = 0.26; #poisson's ratio \n", + "\n", + "#calculation\n", + "sigmax = (E*(ex+(u*ey)))/float(1-(u**2)); #longitudinal stress in N/m**2\n", + "sigmay = (E*(ey+(u*ex)))/float(1-(u**2)); #hoop stress in N/m**2\n", + "\n", + "#result\n", + "\n", + "print'longitudinal stress = %3.2f'%(sigmax/10**6),'MN/m**2';\n", + "print'longitudinal stress = %3.1f'%(sigmay/10**6),'MN/m**2';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.19,Page No:447" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "227272727.273\n", + "modulus of elasticity = 147.5797 GN/M**2\n", + "poissons ratio = 0.2727\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "A = 110*10**-6; #area in m**2\n", + "P = 25*10**3; #load in N\n", + "ex = 1540*10**-6; #strain values in axial direction\n", + "ey = -420*10**-6; #strain values in transvers direction\n", + "\n", + "#calculation\n", + "sigmax = P/float(A); #axial stress in N/M**2\n", + "E = sigmax/float(ex); #modulus of elasticity in N/M**2\n", + "u = (-ey*E)/float(sigmax); #poisson's ratio\n", + "\n", + "#result\n", + "print sigmax\n", + "print'modulus of elasticity = %3.4f'%(E*10**-9),'GN/M**2';\n", + "print'poissons ratio = %3.4f'%u;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.21,Page No:450" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "emax = 6.73e-05\n", + "emin = -1.927e-05\n", + "sigmamax = 13.514 MN/m**2\n", + "sigmamin = 0.201 MN/m**2\n", + "maximum shear stress = 6.656 MN/m**2\n", + "location of principle planes = 0.29 °\n", + "location of principle planes = 106.85 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "e1 = 60*10**-6; #strain in microstrains\n", + "e2 = 48*10**-6; #strain in microstrain\n", + "e3 = -12*10**-6; #strain in microstrain\n", + "E = 200*10**9; #modulus of elsticity in N/m**2\n", + "u = 0.3;\n", + "\n", + "#calculation\n", + "x = (e1+e3)/float(2); #average of strains\n", + "a = math.sqrt(((e1-e2)**2)+((e2-e3)**2));\n", + "b = 1/math.sqrt(2);\n", + "y = a*b;\n", + "emax = x+y; #principle strains\n", + "emin = x-y; #principle strains\n", + "x1 = x/float(1-u);\n", + "y1 = y/float(1+u); \n", + "sigmamax = E*(x1+y1); #principle stress\n", + "sigmamin = E*(x1-y1); #principle stress\n", + "tmax = E*y1; #maximum shear stress in MN/m**2\n", + "k = ((2*e2)-e1-e3)/float((e1-e3));\n", + "theta = (math.atan(k)); #location of principle planes\n", + "theta1 = (math.atan(k))/float(2); #location of principle planes\n", + "theta2 = 180+((theta)*180/float(math.pi));\n", + "theta3 = theta2/float(2); #location of principle planes\n", + "\n", + "print'emax = %2.2e'%(emax);\n", + "print'emin = %2.3e'%(emin);\n", + "print'sigmamax = %3.3f'%(sigmamax*10**-6),'MN/m**2';\n", + "print'sigmamin = %3.3f'%(sigmamin*10**-6),'MN/m**2';\n", + "print'maximum shear stress = %3.3f'%(tmax*10**-6),'MN/m**2';\n", + "print'location of principle planes = %3.2f'%(theta1),'°';\n", + "print'location of principle planes = %3.2f'%(theta3),'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:7.22,Page No:454" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sensitivity of load = 13.79 uV/kN\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "d = 0.06; #diameter in m\n", + "Rg = 120; #nominal resistance of each guage Ω\n", + "Gf = 2.0; #guage factor \n", + "v = 6; #supply voltage in V\n", + "E = 200*10**9; #modulus of elasticity in N/m**2\n", + "u = 0.3; #poisson's ratio\n", + "P = 1000; #load in N\n", + "\n", + "#calculation\n", + "\n", + "A = (math.pi/float(4))*d*d;\n", + "s = P/float(A); #stress in N/m**2\n", + "e = s/float(E); #strain \n", + "x = Gf*e; #fraction change in resistence i.e dR/R\n", + "a = v/float(4);\n", + "y = 2*(1+u)*(x)*a; #output volatge in uV\n", + " \n", + "#result\n", + "print'sensitivity of load = %3.2f'%(y*10**6),'uV/kN';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..4731f202 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb @@ -0,0 +1,657 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Instrument Transformers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.1,Page No:367" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "actual tranformation ratio = 240.77\n", + "phase angle = 4.57 ° \n", + "maximum flux density in core = 0.0938 Wb/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary turns\n", + "Ns = 240; #number of secondary turns\n", + "Is = 5; #secondary current in A\n", + "Re = 1.2; #external burden in Ω \n", + "mmf = 96; #magnetomotive force in AT\n", + "Ac = 1200*10**-6; #cross section area mm**2\n", + "f = 50; #frequency in Hz\n", + "\n", + "#calculation\n", + "Kt = Ns/float(Np); #turns ratio\n", + "Es = Is*Re; #voltage induced in secondary winding in V\n", + "Im = mmf/float(Np); #secondary current in A\n", + "Ip = math.sqrt(((Kt*Is)**2)+((Im)**2)); #primary current in A\n", + "Kact = Ip/float(Is); #actual transformation ratio \n", + "x = Im/float(Kt*Is); #tangential component\n", + "theta = math.atan(x); #phase angle \n", + "phimax = Es/float(4.44*f*Ns);\n", + "Bmax = phimax/float(Ac);\n", + "\n", + "#result\n", + "print'actual tranformation ratio = %3.2f'%Kact;\n", + "print'phase angle = %3.2f'%((theta*180)/float(math.pi)),'° ';\n", + "print'maximum flux density in core = %3.4f'%Bmax,'Wb/m**2';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.2,Page No:368" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.893028554975\n", + "ratio error at full load = -0.0450 %\n", + "phase angle = 0.051167 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "I0 = 1; #exciting current in A\n", + "Knom = 200; #current transformer ratio \n", + "Re = 1.1; #non inductive resistance in Ω \n", + "p = 0.45; #power factor \n", + "delta = 0;\n", + "Is = 5; #rated secondary winding current in A\n", + "\n", + "#calculations\n", + "alpha = 90-(((math.acos(p))*180)/float(math.pi));\n", + "Kt = Knom #since no turn compenasation\n", + "y = math.sin(((delta+alpha)*math.pi)/float(180));\n", + "Kact = Kt+((I0/float(Is))*(y)); #actual transformation ratio\n", + "r = ((Knom-Kact)/float(Kact))*100; #ratio error\n", + "k =math.cos(((delta+alpha)*math.pi)/float(180));\n", + "theta = (180/math.pi)*((I0*k)/float(Kt*Is)); #phase angle degreess\n", + "\n", + "#calculation\n", + "print k\n", + "print'ratio error at full load = %3.4f'%r,'%';\n", + "print'phase angle = %f'%theta,'degrees';\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.3,Page No:369" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "flux in the core = 1.5766e-04 wb\n", + "ratio error = -3.846 %\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variuable declaration\n", + "Knom = 200; #nominal ratio\n", + "Np = 1; #number of primary turns\n", + "R = 1.4; #secondary impendance in Ω \n", + "L = 1.4; #iron loss in W\n", + "I = 5; #current in A\n", + "d = 0; #load angle when burden is pure resistive \n", + "mmf = 80; #magnetomotive force in A\n", + "f = 50;\n", + "\n", + "#calculations\n", + "Kt = Knom; #turns ratio\n", + "Ns = Kt*Np; #number of secondary turns\n", + "Es = I*R; #secondary induced voltage in V\n", + "phimax = Es/float(4.44*f*Ns); #flux in core Wb\n", + "Ep = Es/float(Kt); #primary induced voltage in V\n", + "Iw = L/float(Ep); #loss component of exciting current in A\n", + "Im = mmf/float(Np); #magnetising current\n", + "Kact = Kt+(((Im*math.sin(d))+(Iw*math.cos(d)))/float(Is)); #actual ratio \n", + "r = (Knom-Kact)/float(Kact); #ratio error in %\n", + "r1 = r*100;\n", + "\n", + "#result\n", + "print'flux in the core = %3.4e'%phimax,'wb';\n", + "print'ratio error = %3.3f'%r1,'%';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.4,Page No:370" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio error = -5.57 %\n", + "phase angle =2.01 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary turns\n", + "Ns = 250; #number of secondary turns\n", + "Rp = 1.4; #resistance of secondary circuit in Ω\n", + "Xs = 1.1; #reactance of secondary circuit in Ω\n", + "Is = 5; #current in secondary winding in A\n", + "mmf = 80; #magnetomotive force in A\n", + "L = 1.1; #iron loss in W\n", + "\n", + "#calculations\n", + "Kt = Ns/float(Np); #turns ratio\n", + "Knom = Kt; \n", + "Rs = math.sqrt((Rp**2)+(Xs**2)); #secondary circuit impedance\n", + "cosd = Rp/float(Rs); \n", + "sind = Xs/float(Rs);\n", + "Es = Is*Rs; #secondary induced voltage in V\n", + "Ep = Es/float(Ns); #primary induced voltage in V\n", + "Iw = L/float(Ep); #loss of component reffering to primary winding in A\n", + "Im = mmf/float(Np); #magnetising current in A\n", + "Kact = Kt+(((Im*sind)+(Iw*cosd))/float(Is)); #actual transformation ratio\n", + "r = ((Knom-Kact)/float(Kact))*100; #ratio error in %\n", + "theta = (180/math.pi)*(((Im*cosd)-(Iw*sind))/float(Kt*Is)); #phase angle degreess\n", + "\n", + "#result\n", + "print'ratio error = %3.2f'%r,'%';\n", + "print'phase angle =%3.2f'%theta,'°';\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.5,Page No:371" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "actual ratio = 317.10\n", + "primary current = 1585.49 A\n", + "reduction in secondary winding turns = 17\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary windings\n", + "Ns = 300; #umber of secondary windings\n", + "Re = 1; #ammeter ressistance in Ω\n", + "Xe = 0.55; #reactance in Ω\n", + "Rs = 0.3; #resistance if secondary winding in Ω\n", + "Xs = 0.25; #reactance of secondary winding in Ω\n", + "mmf = 90; # mmf for magnetisation\n", + "mmfc = 45; #mmf for core loss \n", + "Is = 5; #current in A\n", + "\n", + "#calculations\n", + "R = Rs+Re; #total secondarycircuit resistance in Ω\n", + "X = Xs+Xe; #total secondarycircuit reactance in Ω\n", + "delta = math.atan(X/float(R)); #secondary circuit phase angle \n", + "c = math.cos(delta);\n", + "s = math.sin(delta);\n", + "Kt = Ns/float(Np); #turn ratio \n", + "Im = mmf/float(Np); #magnetising current in A\n", + "Iw = mmfc/float(Np); #loss component in A\n", + "Kact = Kt+(((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is)); #actual ratio\n", + "Ip = Kact*Is; #primary current A\n", + "Knom = Kt;\n", + "y = (((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is));\n", + "Kt1 = (Knom)-(y);\n", + "Ns1 = Kt1*Np; #secondary winding turns\n", + "r = Ns-Ns1; #reduction in secondary winding turns\n", + "\n", + "#result\n", + "print'actual ratio = %3.2f'%Kact;\n", + "print'primary current = %3.2f'%Ip,'A';\n", + "print'reduction in secondary winding turns = %3.0f'%r;" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.6,Page No:372" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "actual ratio 101.12\n", + "phase angle 0.641 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary windings\n", + "Ns = 100; #number of secondary windings\n", + "Knom = 100; #nominal ratio\n", + "Re = 1.45; #external burden non inductive in Ω\n", + "Rs = 0.25; #winding resistance in Ω\n", + "I0 = 1.8; #current in A\n", + "l = 38.4; #lagging angle with secondary voltage reversed in °\n", + "Is = 1; #current in secondary winding in A\n", + "delta = 0;\n", + "\n", + "\n", + "#calculations\n", + "Kt = Ns/float(Np); #turn ratio\n", + "Rt = Re+Rs; #totaal secondary circuit resistance in Ω\n", + "alpha = 90-l;\n", + "x = math.cos(((delta+alpha)*math.pi)/float(180));\n", + "Kact = Kt+((I0/float(Is))*x); #actual ratio\n", + "y = math.cos(((delta+alpha)*math.pi)/float(180));\n", + "theta = (180/float(math.pi))*((I0*y/float(Kt*Is))); #phase angle in °\n", + "\n", + "#result\n", + "print'actual ratio %3.2f'%Kact;\n", + "print'phase angle %3.3f'%theta,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:6.7,Page No:373" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio error -0.87 %\n", + "phase angle 0.1948\n", + "ratio error 0.08 %\n", + "phase angle 0.5386 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary windings\n", + "Ns = 200; #number of secondary winding\n", + "Kt = 200; #actual ratio\n", + "Im = 8; #magnetising current in A\n", + "Iw = 5; #loss component in A\n", + "cosphi = 0.8; # leading by\n", + "Knom = 200; #transformer is rated \n", + "cosphi1 = 0.8; #lagging by\n", + "Is = 5; #current in A\n", + "\n", + "#calculations\n", + "sinphi = math.sqrt((1**2)-(cosphi**2));\n", + "Kact = Kt+(((Im*sinphi)+(Iw*cosphi))/float(Is)); #actual ratio\n", + "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n", + "theta = (180/float(math.pi))*(((Im*cosphi)-(Iw*sinphi))/float(Kt*Is)); #phase angle\n", + "sinphi1 = -math.sqrt((1**2)-(cosphi1**2));\n", + "Kact1 = Kt+(((Im*sinphi1)+(Iw*cosphi1))/float(Is)); #actual ratio\n", + "er1 = ((Knom-Kact1)/float(Kact1))*100; #ratio error\n", + "theta1 = (180/float(math.pi))*(((Im*cosphi1)-(Iw*sinphi1))/float(Kt*Is)); #phase angle\n", + "\n", + "#result\n", + "print'ratio error %3.2f'%er,'%';\n", + "print'phase angle %3.4f'%theta;\n", + "print'ratio error %3.2f'%er1,'%';\n", + "print'phase angle %3.4f'%theta1,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "##Example:6.8,Page No:373" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio error 100.87 %\n", + "phase angle 0.4074 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Np = 1; #number of primary windings\n", + "Ns = 99; #number of secondary winding\n", + "Rs = 0.4; #secondary winding resistance in Ω\n", + "Xs = 0.35; #secondary winding reactance in Ω\n", + "Knom = 100; #ratio \n", + "mmf = 6; #magnetising mmf in AT\n", + "lmmf = 8; #loss mmf in AT\n", + "V = 20; #voltage in VA\n", + "\n", + "\n", + "#calculations\n", + "Kt = Ns/float(Np); #actual ratio\n", + "Im = mmf/float(Np); #magnetising current in A\n", + "Iw = lmmf/float(Np); #loss component in A\n", + "Re = V/float(Is**2); #external reistance burden in Ω\n", + "R = Rs+Re; #resistance of total seccondary circuit in Ω\n", + "#reactance is zero \n", + "Xe = 0;\n", + "X = Xs+Xe; #reactance of total secondary circcuit burden in Ω\n", + "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n", + "c = math.cos((delta*math.pi)/float(180));\n", + "s = math.sin((delta*math.pi)/float(180));\n", + "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n", + "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n", + "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n", + "\n", + "#result\n", + "print'ratio error %3.2f'%Kact,'%';\n", + "print'phase angle %3.4f'%theta,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "##Example:6.9,Page No:374" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio error -1.198 %\n", + "phase angle 0.6531 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Knom = 20; #nominal ratio of 100/5A\n", + "V = 20; #rated load in VA\n", + "Il = 0.18; #iron loss in W\n", + "Im = 1.4; #magnetising current in A\n", + "x = 4; #ratio of reactance to resistance \n", + "Ip = 100; #primary currnt widing in A\n", + "Is = 5; #current in secondary winding in A\n", + "\n", + "#calculations\n", + "Kt = Knom; #assuming the value of Kt\n", + "Ep = V/float(Ip); #voltage across primary winding in V\n", + "Iw = Il/float(Ep); #loss current of exciting current in A\n", + "delta = ((math.atan(1/float(x))*180)/float(math.pi)); #phase angle\n", + "c = math.cos((delta*math.pi)/float(180));\n", + "s = math.sin((delta*math.pi)/float(180));\n", + "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n", + "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n", + "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n", + "\n", + "#result\n", + "print'ratio error %3.3f'%er,'%';\n", + "print'phase angle %3.4f'%theta,'°';\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:6.10,Page No:382" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phase angle error at no load -0.00156 °\n", + "Note:printing mistake in textbook,theta value is printed wrong\n", + "burden load in VA 15.34 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Kt = 10; #ratio of 1000/100volts potentia meter \n", + "Rp = 86.4; #primary resistance in Ω\n", + "Rs = 0.78; #secondary resistance in Ω\n", + "Xp = 62.5; #primary reactance in Ω\n", + "Xs = 102; #total equivalent reactance in Ω\n", + "I0 = 0.03; #no-load current in A\n", + "cosphi = 0.42; #power factor \n", + "cosgamma = 1; #since power factor = 1\n", + "Vs = 100; #voltage in V\n", + "\n", + "\n", + "#calculations\n", + "\n", + "sinphi = math.sqrt(1-(cosphi**2));\n", + "Im = I0*sinphi; #magnetising current in A\n", + "Iw = I0*cosphi; #loss current in A\n", + "\n", + "#theta = ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n", + "#since Is =0 \n", + "\n", + "theta = (((Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n", + "singamma = math.sqrt(1-(cosgamma**2));\n", + "\n", + "#burden in VA,theta1 = 0,thus ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs))=0\n", + "#(((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp)) =0\n", + "#Is/Kt = ((Im*Rp)-(Iw*Xp)))/float(((X*cosgamma)-(Rp*singamma)))\n", + "#assume x = ((X*cosgamma)-(Rp*singamma)),y = (Iw*Xp)-(Im*Rp)\n", + "#Is = Kt*(y/x)\n", + "\n", + "x = ((Xs*cosgamma)-(Rp*singamma));\n", + "y = (Im*Rp)-(Iw*Xp);\n", + "Is = Kt*(y/float(x)); #current in A\n", + "l = Vs*Is; # burden load in VA \n", + "\n", + "#result\n", + "print'phase angle error at no load %3.5f'%theta,'°';\n", + "print'Note:printing mistake in textbook,theta value is printed wrong';\n", + "print'burden load in VA %3.2f'%l,'V'\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example:6.11,Page No:383" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio error -0.7937 %\n", + "phase angle -0.3438 °\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declartion\n", + "Kt = 60.476; #turns ratio 3810/63 tranformer\n", + "Vs = 63; #secondary voltage in V\n", + "Rs = 2; #series resistance in Ω\n", + "Xs = 1; #reactance in Ω\n", + "R = 100; #resistance in Ω\n", + "X = 200; #reactance in Ω\n", + "\n", + "#calculations\n", + "\n", + "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n", + "Z = math.sqrt((R**2)+(X**2)); #agnitude of impedance\n", + "\n", + "#Kact = Kt+(((Rs*c)+(Xs*s))/float(Vs/float(Is))); \n", + "#Vs/float(Is) = Z\n", + "\n", + "c = math.cos((delta*math.pi)/float(180));\n", + "s = math.sin((delta*math.pi)/float(180));\n", + "x =(Rs*c)+(Xs*s);\n", + "y = ((x*Kt)/float(Z));\n", + "Kact = Kt+y; #actual ratio\n", + "Knom = Kt; #nominal ration \n", + "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n", + "theta = (180/float(math.pi))*(((Xs*c)-(Rs*s))/float(Z)); #phase angle\n", + "\n", + "\n", + "\n", + "#result\n", + "print'ratio error %3.4f'%er,'%';\n", + "print'phase angle %3.4f'%theta,'°';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..8895e342 --- /dev/null +++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb @@ -0,0 +1,168 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 5:Digital Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1,Page No:338" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of the of the system = 4500.00\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 45; #reading \n", + "t = 10*10**-3; #Gated period in ms\n", + "\n", + "#calculations\n", + "f = N/float(t);\n", + "\n", + "#result\n", + "print'frequency of the of the system = %3.2f'%f,'Hz';" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2,Page No:339" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resolution 0.0010\n", + "Resolution for full scale range of 10V = 0.01 V\n", + "possible error = 0.015 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3; #number of full digits on 3 1/2 digit display \n", + "fs = 1; #voltage in V\n", + "fs1 = 10; #voltage in V\n", + "r = 2; #voltage reading in V\n", + "fs3 = 5;\n", + "\n", + "#calculation\n", + "R = 1/float((10)**n); #resolution\n", + "R1 = R*fs; #resolution for full scale range of 1V\n", + "R2 = fs1*R; #resolution for full scale range of 10V\n", + "LSD =fs3*R; #digit in the least siginificant digit in V\n", + "e = (((0.5)/float(100))*(r))+LSD; #total possible error in V\n", + "\n", + "#result\n", + "print'Resolution %3.4f'%R;\n", + "print'Resolution for full scale range of 10V = %3.2f'%R2,'V';\n", + "print'possible error = %3.3f'%e,'V';\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 5.3,Page No:340" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resolution = 0.0001 \n", + "There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950\n", + "Resolution = 0.0001 \n", + "Hence 0.6564 will be displayed as 0.6564\n", + "Resolution = 0.0010 \n", + "Hence 0.6564 will be displayed as 0.656\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 4; #numberof full digits \n", + "fs = 1; #full scale range of 1V\n", + "fs = 1; #full scale range of 10V\n", + "\n", + "\n", + "#calculation\n", + "R = 1/float((10)**n); #resolution\n", + "R1 = fs*R; #resolution on 1V in V\n", + "R2 = fs1*R; #resolution on 10V in V\n", + "\n", + "\n", + "#result\n", + "print'Resolution = %3.4f '%R;\n", + "print'There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950';\n", + "print'Resolution = %3.4f '%R1;\n", + "print'Hence 0.6564 will be displayed as 0.6564';\n", + "print'Resolution = %3.4f '%R2;\n", + "print'Hence 0.6564 will be displayed as 0.656';\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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} 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 new file mode 100644 index 00000000..2cc93e75 Binary files /dev/null and b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12.png differ 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 new file mode 100644 index 00000000..22f87a95 Binary files /dev/null and b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput.png differ 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 new file mode 100644 index 00000000..60b16536 Binary files /dev/null and b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput.png differ diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap1_1.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap1_1.png new file mode 100755 index 00000000..b137f107 Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap1_1.png differ diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap4_1.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap4_1.png new file mode 100755 index 00000000..95c18626 Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap4_1.png differ diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap7_1.png b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap7_1.png new file mode 100755 index 00000000..7f9fe83c Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines/screenshots/chap7_1.png differ diff --git a/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1.ipynb new file mode 100755 index 00000000..e5603984 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1.ipynb @@ -0,0 +1,489 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Electronic Voltmeters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 1_17" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required multiplier resistance (kohm) = 4.3\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_1,pg 1_17\n", + "#calculate the required multiplier resistance\n", + "import math\n", + "#given\n", + "Erms=10.\n", + "Rm=200\n", + "#calculations\n", + "Ep=math.sqrt(2)*Erms\n", + "Eav=0.6*Ep\n", + "E=Eav/2.\n", + "Edc=0.45*Erms\n", + "Idc=1*10**-3\n", + "Rs=(Edc/Idc)-Rm\n", + "#results\n", + "print\"required multiplier resistance (kohm) = \",Rs/1000." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 1_18" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required multiplier resistance(kohm) = 4.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_2,pg 1_18\n", + "#calculate the required multiplier resistance\n", + "#given\n", + "Eav=9.\n", + "Erms=10.\n", + "Rm=500.\n", + "Idc=2*10**-3\n", + "#calculations\n", + "Edc=0.9*Erms\n", + "Rs=(Edc/Idc)-Rm\n", + "#results\n", + "print \"required multiplier resistance(kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 1_20" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error = -11.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_3,pg 1_20\n", + "#calculate the percentage error\n", + "#given\n", + "Kf=1#Erms=Em for 1 time period\n", + "Kf1=1.11#Kf(sine)/Kf(square)\n", + "#calculations\n", + "pere=(Kf-Kf1)/Kf*100.#percentage error\n", + "#results\n", + "print\"percentage error = \",pere\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 1_20" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error (percent) = 3.87\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_4,pg 1_20\n", + "#calculate the percentage error\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "#given\n", + "A=50.\n", + "T=2.\n", + "Kf2=1.11\n", + "#calculations\n", + "def f(t):\n", + "\tE=(50*t)**2#e=At(ramp function)\n", + "\treturn E\n", + "\n", + "\n", + "I=scipy.integrate.quad(f,0,T)\n", + "\n", + "Erms=math.sqrt((1./T)*I[0])\n", + "def f1(t):\n", + "\te=50*t#e=At(ramp function)\n", + "\treturn e\n", + "\n", + "\n", + "I1=scipy.integrate.quad(f1,0,T)\n", + "Eav=(1./T)*I1[0]\n", + "Kf=Erms/Eav\n", + "kfr=Kf2/Kf #Kf(sine)/Kf(sawtooth)\n", + "pere=(1-kfr)/1*100#percentage error\n", + "#results\n", + "print\"percentage error (percent) = \",round(pere,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 1_27" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total meter resistance (ohm) = 6100.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_5,pg 1_27\n", + "#calculate the total meter resistance\n", + "#given\n", + "Idc=25*10**-3\n", + "Erms=200.\n", + "Rm=100.\n", + "Rf=500.\n", + "#calculations\n", + "Rd=2*Rf\n", + "Rm1=Rm+Rd#total meter resistance\n", + "Rs=(0.9*Erms)/Idc-Rm1\n", + "#results\n", + "print \"total meter resistance (ohm) = \",Rs\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 1_38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter current (mA) = 5.99\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_6,pg 1_38\n", + "#calculate the meter current\n", + "#given\n", + "V1=2.\n", + "Rm=50.\n", + "Rd=15.*10**3\n", + "gm=0.006\n", + "rd=100*10**3\n", + "#calculations\n", + "Im=(gm*rd*Rd/(rd+Rd)*V1)/((2*(rd*Rd/(rd+Rd))+Rm))\n", + "#results\n", + "print \"meter current (mA) = \",round(Im*1000.,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 1_38" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter current (mA) = 3.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_7,pg 1_38\n", + "#calculate the meter current\n", + "#given\n", + "V1=1\n", + "Rm=50\n", + "Rd=15*10**3\n", + "gm=0.006\n", + "rd=100*10**3\n", + "#calculations\n", + "Im=(gm*rd*Rd/(rd+Rd)*V1)/((2*(rd*Rd/(rd+Rd))+Rm))\n", + "#results\n", + "print \"meter current (mA) = \",round(Im*1000.,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 1_39" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance values are\n", + "R1 (Mohm) = 8.7\n", + "R2 (kohm) = 120.0\n", + "R3 (kohm) = 90.0\n", + "R4 (kohm) = 90.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_8,pg 1_39\n", + "#calculate the resistance values\n", + "#given\n", + "V1=1.\n", + "Vin=30.\n", + "Rin=9.*10**6\n", + "#calcuations\n", + "R4=Rin/100.#for Vin=100V\n", + "R3=(Rin-50*R4)/50#for Vin=50V\n", + "R2=(Rin-30*R3-30*R4)/30#for Vin=30V\n", + "R1=Rin-R2-R3-R4\n", + "#results\n", + "print \"resistance values are\"\n", + "print \"R1 (Mohm) = \",round(R1/10**6,1)\n", + "print \"R2 (kohm) = \",round(R2/10**3,1)\n", + "print \"R3 (kohm) = \",round(R3/10**3,1)\n", + "print \"R4 (kohm) = \",round(R4/10**3,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 1_40" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current Im (mA) = 0.3896\n", + "series resistance (kohm) = 7.042\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_9,pg 1_40\n", + "#calculate the current, series resistance\n", + "#given\n", + "rd=10*10**3\n", + "gm=0.003\n", + "Rs=15*10**3\n", + "V1=1#input voltage\n", + "Rm=1800.\n", + "Img=0.1*10**-3#meter current given\n", + "#calculations\n", + "rdf=rd/(1+gm*rd)#actual rd\n", + "Vo=(gm*rdf*Rs)*V1/(rdf+Rs)\n", + "Rth=(2*Rs*rdf/(Rs+rdf))\n", + "Im=Vo/(Rth+Rm)\n", + "Rf=(Vo/Img)-Rth-Rm#series resistance\n", + "#results\n", + "print \"current Im (mA) = \",round(Im*1000.,4)\n", + "print \"series resistance (kohm) = \",round(Rf/10**3,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 1_41" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "calibration resistance (kohm) = 18.4\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_10,pg 1_41\n", + "#calculate the calibration resistance\n", + "#given\n", + "rd=200.*10**3\n", + "gm=0.004\n", + "Rs=40.*10**3\n", + "Rm=1000.\n", + "V1=1\n", + "#calculations\n", + "rdf=rd/(1+gm*rd)#actual rd\n", + "Rth=(2*Rs*rdf/(Rs+rdf))\n", + "Vo=(gm*rdf*Rs)*V1/(rdf+Rs)\n", + "Im=50*10**-6\n", + "Rcal=(Vo/Im)-Rth-Rm#calibration resistance\n", + "#results\n", + "print \"calibration resistance (kohm) = \",round(Rcal/1000.,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 1_42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistances are \n", + "R1(kohm) = 666.67\n", + "R2(kohm) = 300.0\n", + "R3(kohm) = 23.33\n", + "R4(kohm) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_11,pg 1_42\n", + "#calculate the resistances\n", + "#given\n", + "Vin=3.\n", + "V1=1.\n", + "Rin=1.*10**6#input resistance of FET\n", + "#calculations\n", + "R4=Rin/100.#for Vin=100V\n", + "R3=(Rin-30*R4)/30.#for Vin=30V\n", + "R2=(Rin-3*R3-3*R4)/3.#for Vin=3V\n", + "R1=Rin-R2-R3-R4\n", + "#results\n", + "print \"Resistances are \"\n", + "print \"R1(kohm) = \",round(R1/1000.,2)\n", + "print \"R2(kohm) = \",round(R2/1000.,0)\n", + "print \"R3(kohm) = \",round(R3/1000.,2)\n", + "print \"R4(kohm) = \",round(R4/1000.,0)\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10.ipynb new file mode 100755 index 00000000..8bb19cf4 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10.ipynb @@ -0,0 +1,1540 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Three Phase Induction Motors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 10_14" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load slip (percent) = 6.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_1,pg10_14\n", + "#calculate the full load slip\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1410.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "s=s*100#%s\n", + "#results\n", + "print\"full load slip (percent) = \",s\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 10_14" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed of motor (rpm) = 1440.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_2,pg10_14\n", + "#calculate the full load speed of motor\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "sfl=4/100.\n", + "#calculations\n", + "Ns=120*f/P\n", + "Nfl=Ns-sfl*Ns\n", + "#results\n", + "print\"full load speed of motor (rpm) = \",Nfl\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 10_16" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of induced e.m.f (Hz) = 1.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_3,pg10_16\n", + "#calculate the frequency of induced emf\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1470.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "fr=s*f\n", + "#results\n", + "print\"frequency of induced e.m.f (Hz) = \",fr\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 10_20" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load slip (percent)= 4.0\n", + "speed of motor (rpm) = 720.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_4,pg10_20\n", + "#calculate the full load slip and speed of motor\n", + "#given\n", + "P=8.\n", + "f=50.\n", + "fr=2.\n", + "#calculations\n", + "s=fr/f\n", + "s=s*100.\n", + "#results\n", + "print\"full load slip (percent)= \",s\n", + "s=s/100\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 10_20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of rotor e.m.f (Hz) = 1.5\n", + "magnitude of induced e.m.f standstill (V) = 119.8\n", + "magnitude of induced e.m.f running (V) = 3.594\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_5,pg10_20\n", + "import math\n", + "#calculate the frequency of rotor, magnitude of induced emf\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1455.\n", + "E1line=415.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "fr=s*f\n", + "E1ph=E1line/math.sqrt(3)\n", + "E2ph=0.5*E1ph#K=2\n", + "E2r=s*E2ph\n", + "#results\n", + "print\"frequency of rotor e.m.f (Hz) = \",fr\n", + "print\"magnitude of induced e.m.f standstill (V) = \",round(E2ph,1)\n", + "print\"magnitude of induced e.m.f running (V) = \",round(E2r,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 10_21" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " at start\n", + "pf (lagging) = 0.196\n", + "I2 (A) = 67.94\n", + " on full load\n", + "pf (lagging) = 0.9806\n", + "I2 (A) = 13.587\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_6,pg10_21\n", + "#calculate the rotor current and power factor\n", + "import math\n", + "from math import sqrt\n", + "#given\n", + "P=4\n", + "f=50\n", + "R2=0.2\n", + "X2=1\n", + "E2line=120\n", + "#calculations and results\n", + "E2ph=E2line/sqrt(3)\n", + "Ns=120*f/P\n", + "#at start\n", + "pf=R2/sqrt((R2**2)+(X2**2))#power factor\n", + "I2=E2ph/sqrt((R2**2)+(X2**2))\n", + "print\" at start\"\n", + "print\"pf (lagging) = \",round(pf,3)\n", + "print\"I2 (A) = \",round(I2,2)\n", + "#on full load\n", + "N=1440.\n", + "s=(Ns-N)/Ns\n", + "pf=R2/sqrt((R2**2)+((s*X2)**2))\n", + "I2=E2ph*s/sqrt((R2**2)+((s*X2)**2))\n", + "print\" on full load\"\n", + "print\"pf (lagging) = \",round(pf,4)\n", + "print\"I2 (A) = \",round(I2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 10_24" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque on full load (Nm) = 87.81\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_7,pg10_24\n", + "#calculate the torque on full load\n", + "import math\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "R2=0.1\n", + "X2=1.\n", + "N=1440.\n", + "K=0.5\n", + "#calculations\n", + "Ns=120*f/P\n", + "E1line=400.\n", + "E1ph=E1line/math.sqrt(3)\n", + "E2ph=0.5*E1ph\n", + "s=(Ns-N)/Ns\n", + "ns=Ns/60#synchronous speed (r.p.s)\n", + "T=(3/(2*math.pi*ns))*(s*(E2ph**2)*R2/((R2**2)+((s*X2)**2)))\n", + "#results\n", + "print \"torque on full load (Nm) = \",round(T,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 10_27" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 63.032\n", + "slip at which max torque occurs (percent) = 10.0\n", + "speed at which max torque occurs (rpm) 1350.0\n", + "max torque (Nm) = 318.31\n", + "full load torque (Nm) = 219.52\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_8,pg10_27\n", + "#calculate the starting torque, max torque, speed\n", + "import math\n", + "from math import sqrt\n", + "P=4.\n", + "f=50.\n", + "K=1/4.\n", + "R2=0.01\n", + "X2=0.1\n", + "E1line=400.\n", + "E1ph=E1line/sqrt(3)\n", + "E2=E1ph/4\n", + "Ns=120*f/P\n", + "#at start\n", + "s=1\n", + "ns=Ns/60\n", + "k=3/(2*math.pi*ns)\n", + "Tst=k*(E2**2)*R2/((R2**2)+(X2**2))\n", + "print\"starting torque (Nm) = \",round(Tst,3)\n", + "\n", + "#slip at max torque\n", + "sm=R2/X2\n", + "sm=sm*100\n", + "print\"slip at which max torque occurs (percent) = \",round(sm,0)\n", + "#speed at max torque\n", + "sm=sm/100\n", + "N=Ns*(1-sm)\n", + "print\"speed at which max torque occurs (rpm) \",N\n", + "\n", + "#max. torque\n", + "Tm=k*(E2**2)/(2*X2)\n", + "sf=0.04\n", + "Tfl=k*sf*(E2**2)*R2/((R2**2)+((sf*X2)**2))\n", + "print\"max torque (Nm) = \",round(Tm,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,2)\t\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 10_33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load torque to max torque = 0.3824\n", + "starting torque to max torque = 0.1203\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_9,pg10_33\n", + "#calculate the full load torque and starting torque\n", + "#given\n", + "P=24.\n", + "f=50.\n", + "R2=0.016\n", + "X2=0.265\n", + "N=247.\n", + "#calculations\n", + "Ns=120*f/P\n", + "sf=(Ns-N)/Ns\n", + "sm=R2/X2\n", + "Tfm=2*sm*sf/((sm**2)+(sf**2))\n", + "Tsm=2*sm/(1+(sm**2))\n", + "#results\n", + "print\"full load torque to max torque = \",round(Tfm,4)\n", + "print\"starting torque to max torque = \",round(Tsm,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 10_36" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "external resistance (ohm/phase) = 0.0136\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_10,pg10_36\n", + "#calculate the external resistance\n", + "#given\n", + "import math\n", + "R2=0.04\n", + "X2=0.2\n", + "#for Tm=Tst, sm=1\n", + "#calculations\n", + "R21=X2\n", + "Rex=R2-R21\n", + "#for Tst=Tm/2........(1)\n", + "#Tst=k*(E2**2)*R21/((R21**2)+(X2**2))......(2)with added resistance\n", + "#from (1) and (2)\n", + "#(R21**2)-0.8*R21+0.04=0\n", + "a=1\n", + "b=-0.8\n", + "c=0.04\n", + "R21=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "Rex=R21-R2\n", + "#results\n", + "print\"external resistance (ohm/phase) = \",round(Rex,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 10_42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor copper loss (W) = 469.326\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_11,pg10_42\n", + "#calculate the rotor copper loss\n", + "#given\n", + "import math\n", + "Tsh=190.\n", + "P=8.\n", + "f=50.\n", + "fr=1.5\n", + "ML=700.\n", + "#calculations\n", + "s=fr/f\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "Po=Tsh*(2*math.pi*N/60.)\n", + "Pm=Po+ML\n", + "Pc=Pm*s/(1-s)\n", + "#results\n", + "print\"rotor copper loss (W) = \",round(Pc,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 10_43" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load efficiency (percent) = 92.78\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_12,pg10_43\n", + "#calculate the full load efficiency\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "Pi=50.*10**3\n", + "N=1440.\n", + "Sl=1000.\n", + "Fl=650.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "P2=Pi-Sl\n", + "Pc=s*P2\n", + "Pm=P2-Pc\n", + "Po=Pm-Fl\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"full load efficiency (percent) = \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 10_44" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "slip (percent) = 4.0\n", + "net output power (kW) = 45.2389\n", + "rotor copper loss per phase (W) = 733.0383\n", + "rotor efficiency (percent) = 96.0\n", + "rotor resistance per phase (ohm/phase) = 0.2036\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_13,pg10_44\n", + "#calculate the net output power, rotor copper loss,efficiency and resistance per phase\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "Tsh=300.\n", + "Tlost=50.\n", + "fr=120/60.#Hz\n", + "#calculations\n", + "s=fr/f\n", + "s=s*100.\n", + "print\"slip (percent) = \",s\n", + "Ns=120.*f/P\n", + "s=s/100.\n", + "N=Ns*(1-s)\n", + "Po=Tsh*2*math.pi*N/60\n", + "Fl=Tlost*2*math.pi*N/60\n", + "Pm=Po+Fl\n", + "Pc=Pm*s/(1-s)\n", + "Rcl=Pc/3#rotor copper loss per phase\n", + "P2=Pc/s\n", + "n=Pm*100./P2\n", + "I2r=60\n", + "R2=Rcl/(I2r**2)\n", + "#results\n", + "print\"net output power (kW) = \",round(Po/1000.,4)\n", + "print\"rotor copper loss per phase (W) = \",round(Rcl,4)\n", + "print\"rotor efficiency (percent) = \",n\n", + "print\"rotor resistance per phase (ohm/phase) = \",round(R2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 10_45" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross mechanical power (W) = 25850.0\n", + "rotor copper losses (W) = 1650.0\n", + "rotor resistance per phase (ohm/phase) = 0.13\n", + "full load efficiency (percent) = 82.49\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_14,pg10_45\n", + "#calculate the gross mechanical power, rotor copper losses, resistance and full load efficiency\n", + "#given\n", + "Po=25.*10**3\n", + "f=50.\n", + "P=4.\n", + "#calculations\n", + "Ns=120*f/P\n", + "N=1410\n", + "s=(Ns-N)/Ns\n", + "Ml=850\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "I2r=65\n", + "R2=Pc/(3*(I2r**2))\n", + "Sl=1.7*Pc\n", + "P2=Pc/s\n", + "Pin=P2+Sl\n", + "n=Po*100/Pin\n", + "#results\n", + "print\"gross mechanical power (W) = \",Pm\n", + "print\"rotor copper losses (W) = \",Pc\n", + "print\"rotor resistance per phase (ohm/phase) = \",round(R2,2)\n", + "print\"full load efficiency (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 10_47" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shaft torque (N-m) = 318.31\n", + "gross torque (N-m) = 331.573\n", + "rotor copper losses (W) = 1041.67\n", + "stator copper losses (W) = 974.7\n", + "stator iron losses (W) = 1950.6\n", + "overall efficiency (percent) = 82.85\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_15,pg10_47\n", + "#calculate the shaft torque, gross, rotor copper losses, stator copper and iron losses and overall efficiency \n", + "#given\n", + "import math\n", + "Po=24.*10**3\n", + "Il=57.\n", + "Is=Il\n", + "P=8.\n", + "N=720.\n", + "f=50.\n", + "Vl=415.\n", + "pf=0.707\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "Ml=1000.\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "Tsh=Po*60/(2*math.pi*N)\n", + "T=Pm*60/(2*math.pi*N)\n", + "Rcl=1041.66#rotor copper loss\n", + "P2=Pc/s\n", + "Pi=math.sqrt(3)*Vl*Il*pf\n", + "Rs=0.1\n", + "Scl=3*(Is**2)*Rs#stator copper loss\n", + "Sl=Pi-P2\n", + "Sil=Sl-Scl#stator iron loss\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"shaft torque (N-m) = \",round(Tsh,3)\n", + "print\"gross torque (N-m) = \",round(T,3)\n", + "print\"rotor copper losses (W) = \",round(Pc,2)\n", + "print\"stator copper losses (W) = \",Scl\n", + "print\"stator iron losses (W) = \",round(Sil,2)\n", + "print\"overall efficiency (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 10_52" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "supply current (times Ifl) = 3.33\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_16,pg10_52\n", + "#calculate the supply current\n", + "#given\n", + "import math\n", + "sf=0.05\n", + "#Tst=Tfl\n", + "Ifs=1/6.#Isc/Ifl=6\n", + "#calculations\n", + "x=math.sqrt((Ifs**2)/sf)#tapping on transformer\n", + "t=x*100\n", + "Ist=(x**2)*6\n", + "#results\n", + "print \"supply current (times Ifl) = \",round(Ist,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 10_54" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of starting torque to full load torque = 0.165\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_17,pg10_54\n", + "#calculate the ratio of starting torque to full load torque\n", + "#given\n", + "R2=0.4\n", + "X2=4.\n", + "#Tm=k*(E2**2)/(2*X2)\n", + "#Tfl=Tm/2.5\n", + "#Tfl=k*(E2**2)/20\n", + "#Tst=k*(E2**2)*R2/((R2**2)+(X2**2))\n", + "#E2=E2/sqrt(3)\n", + "T=20*R2/(3*(((R2**2)+(X2**2))))\n", + "#results\n", + "print \"ratio of starting torque to full load torque = \",round(T,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 10_57" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor current at start (A) = 800.85\n", + "rotor power factor lagging (answer in book is wrong)= 0.0499\n", + "rotor current at slip 0.03 (A) = 412.55\n", + "external resistance (ohm/ph) (answer in book is wrong) = 0.7665\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_18,pg10_57\n", + "#calculate the rotor power factor, external resistance and current\n", + "#given\n", + "import math\n", + "from math import sqrt\n", + "Vl=1000.\n", + "f=50.\n", + "K=3.6\n", + "R2=0.01\n", + "X2=0.2\n", + "E1line=1000.\n", + "#calculations and results\n", + "E1=E1line/sqrt(3)\n", + "E2=E1/K\n", + "#at start,s=1\n", + "I2=160.37/sqrt((R2**2)+(X2**2))\n", + "pf=R2/sqrt((R2**2)+(X2**2))\n", + "print\"rotor current at start (A) = \",round(I2,2)\n", + "print\"rotor power factor lagging (answer in book is wrong)= \",round(pf,4)\n", + "#at s=0.03\n", + "s=0.03\n", + "I2r=s*160.37/sqrt((R2**2)+((s*X2)**2))\n", + "print\"rotor current at slip 0.03 (A) = \",round(I2r,2)\n", + "I2=200.\n", + "R21=sqrt(((E2/I2)**2)-(X2**2))\n", + "Rex=R21-R2\n", + "print\"external resistance (ohm/ph) (answer in book is wrong) = \",round(Rex,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 10_58" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 103.54\n", + "full load torque (Nm) = 15.576\n", + "maximum torque (Nm) = 117.342\n", + "speed at max torque (rpm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_19,pg10_58\n", + "#calculate the starting torque, full load torque, maximum torque and speed at max torque\n", + "import math\n", + "#given\n", + "P=12.\n", + "f=50.\n", + "R2=0.15\n", + "X2=0.25\n", + "E2=32.\n", + "#calculations\n", + "Ns=120*f/P\n", + "ns=Ns/60\n", + "Tst=3*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+(X2**2)))\n", + "N=480.\n", + "s=(Ns-N)/Ns\n", + "Tfl=3*s*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+((s*X2)**2)))\n", + "Tm=3*(E2**2)/(2*math.pi*ns*2*X2)\n", + "sm=R2/X2\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,3)\n", + "print\"maximum torque (Nm) = \",round(Tm,3)\n", + "print\"speed at max torque (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 10_59" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency on full load (percent) = 85.78\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_20,pg10_59\n", + "#calculate the efficiency in full load\n", + "#given\n", + "Po=50.*735.5#(in W)\n", + "s=0.04\n", + "#calculations\n", + "#Rcl=X...............rotor copper loss\n", + "#Sil=1.25X...........stator iron loss\n", + "#Ml=Y, Y=(Y+1.25X)/3, Y=0.625X\n", + "#TL=Sil+Rcl+Scl+Ml, TL=3.875X.........(a)\n", + "#Pm=Po+Y, 36775+625X..........(1)\n", + "#Pc=Pm*s/(1-s).............(2)\n", + "#Pc=X, from (1) and (2)\n", + "X=(s*Po)/(1-s-s*0.625)\n", + "TL=3.875*X#from (a)\n", + "n=Po*100./(Po+TL)\n", + "#results\n", + "print\"efficiency on full load (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 10_61" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new speed of motor (rpm) = 1392.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_21,pg10_61\n", + "#calculate the new speed of motor\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "R2=0.25\n", + "X2=0.55\n", + "N1=1440\n", + "#calculations\n", + "Ns=120*f/P\n", + "s1=(Ns-N1)/Ns\n", + "Rex=0.2\n", + "R21=R2+Rex\n", + "#T1 at s1=T2 at s2\n", + "#0.3025*s2^2-2.8342*s2+0.2025=0, s1=0.04\n", + "a=0.3025\n", + "b=-2.8342\n", + "c=0.2025\n", + "s2=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "N2=Ns*(1-s2)\n", + "#results\n", + "print\"new speed of motor (rpm) = \",round(N2,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 10_62" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor current at start (A) = 9.4916\n", + "rotor current for rheostat of 6 ohm (A) = 4.0324\n", + "full load rotor current (A) = 2.2456\n", + "full load power factor (lagging) = 0.9724\n", + "rotor e.m.f on full load (V) = 1.1547\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_22,pg10_62\n", + "#calculate the rotor current, full load current , power factor and rotor emf\n", + "#given\n", + "import math\n", + "from math import sqrt\n", + "E2line=50.\n", + "R2=0.5\n", + "X2=3.\n", + "E2=E2line/sqrt(3)\n", + "#calculations and results\n", + "#at start\n", + "s=1\n", + "I2r=s*E2/(sqrt((R2**2)+((s*X2)**2)))\n", + "print\"rotor current at start (A) = \",round(I2r,4)\n", + "Rx=6.\n", + "I2r=s*E2/(sqrt(((R2+Rx)**2)+((s*X2)**2)))\n", + "print\"rotor current for rheostat of 6 ohm (A) = \",round(I2r,4)\n", + "#at full load\n", + "s=0.04\n", + "I2r=s*E2/(sqrt((R2**2)+((s*X2)**2)))\n", + "pf=R2/(sqrt((R2**2)+((s*X2)**2)))\n", + "print\"full load rotor current (A) = \",round(I2r,4)\n", + "print\"full load power factor (lagging) = \",round(pf,4)\n", + "E2r=s*E2\n", + "print\"rotor e.m.f on full load (V) = \",round(E2r,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 10_63" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 103.54\n", + "full load torque (Nm) = 15.576\n", + "maximum torque (Nm) = 117.342\n", + "speed at max torque (rpm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_23,pg10_63\n", + "#calculate the starting,full load, maximum torque and speed\n", + "#given\n", + "import math\n", + "P=12.\n", + "f=50.\n", + "R2=0.15\n", + "X2=0.25\n", + "E2=32.\n", + "#calculations\n", + "Ns=120*f/P\n", + "ns=Ns/60.\n", + "k=3.\n", + "Tst=k*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+(X2**2)))\n", + "N=480.\n", + "s=(Ns-N)/Ns\n", + "Tfl=k*s*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+((s*X2)**2)))\n", + "Tm=k*(E2**2)/(2*math.pi*ns*2*X2)\n", + "sm=R2/X2\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,3)\n", + "print\"maximum torque (Nm) = \",round(Tm,3)\n", + "print\"speed at max torque (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 10_64" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load torque (Nm) = 202.52\n", + "ratio of Tst to Tfl = 0.817\n", + "ratio of Tm to Tfl = 2.043\n", + "external resistance required (ohm/ph) = 1.6\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_24,pg10_64\n", + "#calculate the full load torque and external resistance required\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "R2=0.4\n", + "X2=2.\n", + "E2b=520.#between slip rings\n", + "#calculations\n", + "E2ph=E2b/math.sqrt(3)\n", + "Ns=120*f/P\n", + "N=1425.\n", + "sf=(Ns-N)/Ns\n", + "ns=Ns/60.\n", + "Tfl=3*sf*(E2ph**2)*R2/((2*math.pi*ns)*((R2**2)+((sf*X2)**2)))\n", + "Tst=3*(E2ph**2)*R2/((2*math.pi*ns)*((R2**2)+((X2)**2)))\n", + "T=Tst/Tfl\n", + "Tm=3*(E2ph**2)/((2*math.pi*ns)*((R2**2)+((X2)*2)))\n", + "T1=Tm/Tfl\n", + "#at start\n", + "sm=1\n", + "R21=X2\n", + "Rex=R21-R2\n", + "#results\n", + "print\"full load torque (Nm) = \",round(Tfl,2)\n", + "print\"ratio of Tst to Tfl = \",round(T,3)\n", + "print\"ratio of Tm to Tfl = \",round(T1,3)\n", + "print\"external resistance required (ohm/ph) = \",Rex" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 10_65" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "slip at full load = 0.04\n", + "rotor frequency (Hz) = 2.0\n", + "rotor copper loss per phase (kW) = 486.53\n", + "total copper loss (kW) = 1.4596\n", + "efficiency at full load (percent) = 89.02\n", + "line current drawn (A) = 68.361\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_25,pg10_65\n", + "#calculate the slip, rotor frequency, copper loss and efficiency\n", + "#given\n", + "import math\n", + "Po=33.73*10**3\n", + "P=4.\n", + "Vl=400.\n", + "f=50.\n", + "Nfl=1440.\n", + "pf=0.8\n", + "Ml=1.3*10**3\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-Nfl)/Ns\n", + "fr=s*f\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "Pcp=Pc/3#copper loss per phase\n", + "P2=Pc/s\n", + "Sl=1.4*10**3\n", + "Pi=P2+Sl\n", + "n=Po*100/Pi\n", + "Il=Pi/(math.sqrt(3)*Vl*pf)\n", + "#results\n", + "print\"slip at full load = \",s\n", + "print\"rotor frequency (Hz) = \",round(fr,1)\n", + "print\"rotor copper loss per phase (kW) = \",round(Pcp,2)\n", + "print\"total copper loss (kW) = \",round(Pc/1000.,4)\n", + "print\"efficiency at full load (percent) = \",round(n,2)\n", + "print\"line current drawn (A) = \",round(Il,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 10_66" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power factor of rotor (lagging) = 0.989\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_26,pg10_66\n", + "#calculate the power factor of rotor\n", + "#given\n", + "import math\n", + "R2=0.04\n", + "X2=0.2\n", + "sfl=0.03\n", + "#at Tst, s=1\n", + "#Tfl=Tst\n", + "#(R21**2)-1.3633*R21+0.04=0\n", + "a=1\n", + "b=-1.3633\n", + "c=0.04\n", + "#calculations\n", + "R21=(-b+math.sqrt((b**2)-4*a*c))/(2*a)\n", + "Rex=R21-R2\n", + "pf=R21/math.sqrt((R21**2)+(X2**2))\n", + "#results\n", + "print\"power factor of rotor (lagging) = \",round(pf,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 10_67" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1318.7\n", + "speed at max. torque (rpm) = 823.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_27,pg10_67\n", + "#calculate the full load speed, speed at max torque\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "Po=8.*10**3\n", + "#Tst=1.5*Tfl and Tm=2*Tfl\n", + "#(R2**2)+((sfl*X2)**2)=1.5*sfl*((R2**2)+(X2**2)).................(1)\n", + "#(R2**2)+((sfl*X2)**2)=2*(sfl/sm)*((R2**2)+((sm*X2)**2))..........(2)\n", + "#dividing (1) and (2) by (X2**2) on both sides and R2/X2=sm\n", + "#(sm**2)+(sfl**2)=5*(1+(sm**2))*sfl.............(3)\n", + "#(sm**2)+(sfl**2)=2*(2*(sm**2))*(sfl/sm)=4*sm*sfl...........(4)\n", + "#dividing (3) by (4)\n", + "#(sm**2)-2.667*sm+1=0\n", + "a=1\n", + "b=-2.667\n", + "c=1\n", + "#calculations\n", + "sm=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "Ns=120*f/P\n", + "#substituting sm in (4)\n", + "#(sfl**2)-1.8052*sfl+0.2036=0\n", + "a=1\n", + "b=-1.8052\n", + "c=0.2036\n", + "sfl=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "N=Ns*(1-sfl)\n", + "Nm=Ns*(1-sm)\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N,1)\n", + "print\"speed at max. torque (rpm) = \",round(Nm,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 10_68" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 34.8\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_28,pg10_68\n", + "#calculate the starting torque\n", + "import math\n", + "#given\n", + "Po=10*735.5#(in W)\n", + "Nfl=1410.\n", + "P=4.\n", + "f=50.\n", + "#calculations\n", + "Ns=120.*f/P\n", + "sfl=(Ns-Nfl)/Ns\n", + "Nm=1200.\n", + "sm=(Ns-Nm)/Ns\n", + "T=2*sfl*sm/((sm**2)+(sfl**2))#Tfl/Tm\n", + "T1=(1+(sm**2))/(2*sm)#Tm/Tst\n", + "T2=T1*T#Tfl/Tst\n", + "Tfl=Po*60./(2*math.pi*Nfl)\n", + "Tst=Tfl/T2\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 10_70" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum torque (Nm) = 330.5\n", + "speed (r.p.m) = 1250.0\n", + "external resistance (ohm/ph) = 0.125\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_29,pg10_70\n", + "#calculate the maximum torque, speed and external resistance\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "R2=0.025\n", + "X2=0.15\n", + "sfl=0.04\n", + "Tfl=150.\n", + "#calculations\n", + "sm=R2/X2\n", + "Tm=Tfl*((R2**2)+((sfl*X2)**2))*sm/(sfl*((R2**2)+((sm*X2)**2)))\n", + "Ns=120*f/P\n", + "N=Ns*(1-sm)\n", + "#at start\n", + "R21=X2\n", + "Rex=R21-R2\n", + "#results\n", + "print\"maximum torque (Nm) = \",Tm\n", + "print\"speed (r.p.m) = \",N\n", + "print\"external resistance (ohm/ph) = \",Rex\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 30 - pg 10_70" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "motor output (kW) = 16.54099\n", + "copper loss in rotor (W) = 575.54\n", + "motor input (kW) = 20.0147\n", + "efficiency of motor (percent) = 82.644\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_30,pg10_70\n", + "#calculate the motor output, copper loss and efficiency\n", + "#given\n", + "import math\n", + "Tsh=162.84\n", + "P=6.\n", + "f=50.\n", + "Tlost=20.36\n", + "fr=1.5\n", + "#calculations\n", + "s=fr/f\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "Po=Tsh*(2*math.pi*N)/60\n", + "Fl=Tlost*(2*math.pi*N)/60\n", + "Pm=Po+Fl\n", + "Pc=Pm*s/(1-s)\n", + "P2=Pc/s\n", + "Sl=830\n", + "Pi=P2+Sl\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"motor output (kW) = \",round(Po/1000.,5)\n", + "print\"copper loss in rotor (W) = \",round(Pc,3)\n", + "print\"motor input (kW) = \",round(Pi/1000.,4)\n", + "print\"efficiency of motor (percent) = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31 - pg 10_71" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of max to full load torque = 1.45\n", + "speed at max torque (rpm) = 675.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_31,pg10_71\n", + "#calculate the ratio of max to full load torque and speed at max torque\n", + "#given\n", + "f=50.\n", + "P=8.\n", + "R2=0.01\n", + "X2=0.1\n", + "sfl=0.04\n", + "#calculations\n", + "#for Tmax\n", + "sm=R2/X2\n", + "#for Tfl\n", + "s=sfl\n", + "T=sm*R2*((R2**2)+((sfl*X2)**2))/((sfl*R2)*((R2**2)+((sm*X2)**2)))#Tmax/Tfl\n", + "Ns=120*f/P\n", + "sm=0.1\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"ratio of max to full load torque = \",T\n", + "print\"speed at max torque (rpm) = \",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/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 new file mode 100644 index 00000000..8bb19cf4 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter10_1.ipynb @@ -0,0 +1,1540 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Three Phase Induction Motors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 10_14" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load slip (percent) = 6.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_1,pg10_14\n", + "#calculate the full load slip\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1410.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "s=s*100#%s\n", + "#results\n", + "print\"full load slip (percent) = \",s\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 10_14" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed of motor (rpm) = 1440.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_2,pg10_14\n", + "#calculate the full load speed of motor\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "sfl=4/100.\n", + "#calculations\n", + "Ns=120*f/P\n", + "Nfl=Ns-sfl*Ns\n", + "#results\n", + "print\"full load speed of motor (rpm) = \",Nfl\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 10_16" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of induced e.m.f (Hz) = 1.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_3,pg10_16\n", + "#calculate the frequency of induced emf\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1470.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "fr=s*f\n", + "#results\n", + "print\"frequency of induced e.m.f (Hz) = \",fr\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 10_20" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load slip (percent)= 4.0\n", + "speed of motor (rpm) = 720.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_4,pg10_20\n", + "#calculate the full load slip and speed of motor\n", + "#given\n", + "P=8.\n", + "f=50.\n", + "fr=2.\n", + "#calculations\n", + "s=fr/f\n", + "s=s*100.\n", + "#results\n", + "print\"full load slip (percent)= \",s\n", + "s=s/100\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 10_20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of rotor e.m.f (Hz) = 1.5\n", + "magnitude of induced e.m.f standstill (V) = 119.8\n", + "magnitude of induced e.m.f running (V) = 3.594\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_5,pg10_20\n", + "import math\n", + "#calculate the frequency of rotor, magnitude of induced emf\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "N=1455.\n", + "E1line=415.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "fr=s*f\n", + "E1ph=E1line/math.sqrt(3)\n", + "E2ph=0.5*E1ph#K=2\n", + "E2r=s*E2ph\n", + "#results\n", + "print\"frequency of rotor e.m.f (Hz) = \",fr\n", + "print\"magnitude of induced e.m.f standstill (V) = \",round(E2ph,1)\n", + "print\"magnitude of induced e.m.f running (V) = \",round(E2r,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 10_21" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " at start\n", + "pf (lagging) = 0.196\n", + "I2 (A) = 67.94\n", + " on full load\n", + "pf (lagging) = 0.9806\n", + "I2 (A) = 13.587\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_6,pg10_21\n", + "#calculate the rotor current and power factor\n", + "import math\n", + "from math import sqrt\n", + "#given\n", + "P=4\n", + "f=50\n", + "R2=0.2\n", + "X2=1\n", + "E2line=120\n", + "#calculations and results\n", + "E2ph=E2line/sqrt(3)\n", + "Ns=120*f/P\n", + "#at start\n", + "pf=R2/sqrt((R2**2)+(X2**2))#power factor\n", + "I2=E2ph/sqrt((R2**2)+(X2**2))\n", + "print\" at start\"\n", + "print\"pf (lagging) = \",round(pf,3)\n", + "print\"I2 (A) = \",round(I2,2)\n", + "#on full load\n", + "N=1440.\n", + "s=(Ns-N)/Ns\n", + "pf=R2/sqrt((R2**2)+((s*X2)**2))\n", + "I2=E2ph*s/sqrt((R2**2)+((s*X2)**2))\n", + "print\" on full load\"\n", + "print\"pf (lagging) = \",round(pf,4)\n", + "print\"I2 (A) = \",round(I2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 10_24" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque on full load (Nm) = 87.81\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_7,pg10_24\n", + "#calculate the torque on full load\n", + "import math\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "R2=0.1\n", + "X2=1.\n", + "N=1440.\n", + "K=0.5\n", + "#calculations\n", + "Ns=120*f/P\n", + "E1line=400.\n", + "E1ph=E1line/math.sqrt(3)\n", + "E2ph=0.5*E1ph\n", + "s=(Ns-N)/Ns\n", + "ns=Ns/60#synchronous speed (r.p.s)\n", + "T=(3/(2*math.pi*ns))*(s*(E2ph**2)*R2/((R2**2)+((s*X2)**2)))\n", + "#results\n", + "print \"torque on full load (Nm) = \",round(T,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 10_27" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 63.032\n", + "slip at which max torque occurs (percent) = 10.0\n", + "speed at which max torque occurs (rpm) 1350.0\n", + "max torque (Nm) = 318.31\n", + "full load torque (Nm) = 219.52\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_8,pg10_27\n", + "#calculate the starting torque, max torque, speed\n", + "import math\n", + "from math import sqrt\n", + "P=4.\n", + "f=50.\n", + "K=1/4.\n", + "R2=0.01\n", + "X2=0.1\n", + "E1line=400.\n", + "E1ph=E1line/sqrt(3)\n", + "E2=E1ph/4\n", + "Ns=120*f/P\n", + "#at start\n", + "s=1\n", + "ns=Ns/60\n", + "k=3/(2*math.pi*ns)\n", + "Tst=k*(E2**2)*R2/((R2**2)+(X2**2))\n", + "print\"starting torque (Nm) = \",round(Tst,3)\n", + "\n", + "#slip at max torque\n", + "sm=R2/X2\n", + "sm=sm*100\n", + "print\"slip at which max torque occurs (percent) = \",round(sm,0)\n", + "#speed at max torque\n", + "sm=sm/100\n", + "N=Ns*(1-sm)\n", + "print\"speed at which max torque occurs (rpm) \",N\n", + "\n", + "#max. torque\n", + "Tm=k*(E2**2)/(2*X2)\n", + "sf=0.04\n", + "Tfl=k*sf*(E2**2)*R2/((R2**2)+((sf*X2)**2))\n", + "print\"max torque (Nm) = \",round(Tm,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,2)\t\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 10_33" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load torque to max torque = 0.3824\n", + "starting torque to max torque = 0.1203\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_9,pg10_33\n", + "#calculate the full load torque and starting torque\n", + "#given\n", + "P=24.\n", + "f=50.\n", + "R2=0.016\n", + "X2=0.265\n", + "N=247.\n", + "#calculations\n", + "Ns=120*f/P\n", + "sf=(Ns-N)/Ns\n", + "sm=R2/X2\n", + "Tfm=2*sm*sf/((sm**2)+(sf**2))\n", + "Tsm=2*sm/(1+(sm**2))\n", + "#results\n", + "print\"full load torque to max torque = \",round(Tfm,4)\n", + "print\"starting torque to max torque = \",round(Tsm,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 10_36" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "external resistance (ohm/phase) = 0.0136\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_10,pg10_36\n", + "#calculate the external resistance\n", + "#given\n", + "import math\n", + "R2=0.04\n", + "X2=0.2\n", + "#for Tm=Tst, sm=1\n", + "#calculations\n", + "R21=X2\n", + "Rex=R2-R21\n", + "#for Tst=Tm/2........(1)\n", + "#Tst=k*(E2**2)*R21/((R21**2)+(X2**2))......(2)with added resistance\n", + "#from (1) and (2)\n", + "#(R21**2)-0.8*R21+0.04=0\n", + "a=1\n", + "b=-0.8\n", + "c=0.04\n", + "R21=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "Rex=R21-R2\n", + "#results\n", + "print\"external resistance (ohm/phase) = \",round(Rex,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 10_42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor copper loss (W) = 469.326\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_11,pg10_42\n", + "#calculate the rotor copper loss\n", + "#given\n", + "import math\n", + "Tsh=190.\n", + "P=8.\n", + "f=50.\n", + "fr=1.5\n", + "ML=700.\n", + "#calculations\n", + "s=fr/f\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "Po=Tsh*(2*math.pi*N/60.)\n", + "Pm=Po+ML\n", + "Pc=Pm*s/(1-s)\n", + "#results\n", + "print\"rotor copper loss (W) = \",round(Pc,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 10_43" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load efficiency (percent) = 92.78\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_12,pg10_43\n", + "#calculate the full load efficiency\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "Pi=50.*10**3\n", + "N=1440.\n", + "Sl=1000.\n", + "Fl=650.\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "P2=Pi-Sl\n", + "Pc=s*P2\n", + "Pm=P2-Pc\n", + "Po=Pm-Fl\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"full load efficiency (percent) = \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 10_44" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "slip (percent) = 4.0\n", + "net output power (kW) = 45.2389\n", + "rotor copper loss per phase (W) = 733.0383\n", + "rotor efficiency (percent) = 96.0\n", + "rotor resistance per phase (ohm/phase) = 0.2036\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_13,pg10_44\n", + "#calculate the net output power, rotor copper loss,efficiency and resistance per phase\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "Tsh=300.\n", + "Tlost=50.\n", + "fr=120/60.#Hz\n", + "#calculations\n", + "s=fr/f\n", + "s=s*100.\n", + "print\"slip (percent) = \",s\n", + "Ns=120.*f/P\n", + "s=s/100.\n", + "N=Ns*(1-s)\n", + "Po=Tsh*2*math.pi*N/60\n", + "Fl=Tlost*2*math.pi*N/60\n", + "Pm=Po+Fl\n", + "Pc=Pm*s/(1-s)\n", + "Rcl=Pc/3#rotor copper loss per phase\n", + "P2=Pc/s\n", + "n=Pm*100./P2\n", + "I2r=60\n", + "R2=Rcl/(I2r**2)\n", + "#results\n", + "print\"net output power (kW) = \",round(Po/1000.,4)\n", + "print\"rotor copper loss per phase (W) = \",round(Rcl,4)\n", + "print\"rotor efficiency (percent) = \",n\n", + "print\"rotor resistance per phase (ohm/phase) = \",round(R2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 10_45" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross mechanical power (W) = 25850.0\n", + "rotor copper losses (W) = 1650.0\n", + "rotor resistance per phase (ohm/phase) = 0.13\n", + "full load efficiency (percent) = 82.49\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_14,pg10_45\n", + "#calculate the gross mechanical power, rotor copper losses, resistance and full load efficiency\n", + "#given\n", + "Po=25.*10**3\n", + "f=50.\n", + "P=4.\n", + "#calculations\n", + "Ns=120*f/P\n", + "N=1410\n", + "s=(Ns-N)/Ns\n", + "Ml=850\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "I2r=65\n", + "R2=Pc/(3*(I2r**2))\n", + "Sl=1.7*Pc\n", + "P2=Pc/s\n", + "Pin=P2+Sl\n", + "n=Po*100/Pin\n", + "#results\n", + "print\"gross mechanical power (W) = \",Pm\n", + "print\"rotor copper losses (W) = \",Pc\n", + "print\"rotor resistance per phase (ohm/phase) = \",round(R2,2)\n", + "print\"full load efficiency (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 10_47" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shaft torque (N-m) = 318.31\n", + "gross torque (N-m) = 331.573\n", + "rotor copper losses (W) = 1041.67\n", + "stator copper losses (W) = 974.7\n", + "stator iron losses (W) = 1950.6\n", + "overall efficiency (percent) = 82.85\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_15,pg10_47\n", + "#calculate the shaft torque, gross, rotor copper losses, stator copper and iron losses and overall efficiency \n", + "#given\n", + "import math\n", + "Po=24.*10**3\n", + "Il=57.\n", + "Is=Il\n", + "P=8.\n", + "N=720.\n", + "f=50.\n", + "Vl=415.\n", + "pf=0.707\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-N)/Ns\n", + "Ml=1000.\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "Tsh=Po*60/(2*math.pi*N)\n", + "T=Pm*60/(2*math.pi*N)\n", + "Rcl=1041.66#rotor copper loss\n", + "P2=Pc/s\n", + "Pi=math.sqrt(3)*Vl*Il*pf\n", + "Rs=0.1\n", + "Scl=3*(Is**2)*Rs#stator copper loss\n", + "Sl=Pi-P2\n", + "Sil=Sl-Scl#stator iron loss\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"shaft torque (N-m) = \",round(Tsh,3)\n", + "print\"gross torque (N-m) = \",round(T,3)\n", + "print\"rotor copper losses (W) = \",round(Pc,2)\n", + "print\"stator copper losses (W) = \",Scl\n", + "print\"stator iron losses (W) = \",round(Sil,2)\n", + "print\"overall efficiency (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 10_52" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "supply current (times Ifl) = 3.33\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_16,pg10_52\n", + "#calculate the supply current\n", + "#given\n", + "import math\n", + "sf=0.05\n", + "#Tst=Tfl\n", + "Ifs=1/6.#Isc/Ifl=6\n", + "#calculations\n", + "x=math.sqrt((Ifs**2)/sf)#tapping on transformer\n", + "t=x*100\n", + "Ist=(x**2)*6\n", + "#results\n", + "print \"supply current (times Ifl) = \",round(Ist,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 10_54" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of starting torque to full load torque = 0.165\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_17,pg10_54\n", + "#calculate the ratio of starting torque to full load torque\n", + "#given\n", + "R2=0.4\n", + "X2=4.\n", + "#Tm=k*(E2**2)/(2*X2)\n", + "#Tfl=Tm/2.5\n", + "#Tfl=k*(E2**2)/20\n", + "#Tst=k*(E2**2)*R2/((R2**2)+(X2**2))\n", + "#E2=E2/sqrt(3)\n", + "T=20*R2/(3*(((R2**2)+(X2**2))))\n", + "#results\n", + "print \"ratio of starting torque to full load torque = \",round(T,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 10_57" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor current at start (A) = 800.85\n", + "rotor power factor lagging (answer in book is wrong)= 0.0499\n", + "rotor current at slip 0.03 (A) = 412.55\n", + "external resistance (ohm/ph) (answer in book is wrong) = 0.7665\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_18,pg10_57\n", + "#calculate the rotor power factor, external resistance and current\n", + "#given\n", + "import math\n", + "from math import sqrt\n", + "Vl=1000.\n", + "f=50.\n", + "K=3.6\n", + "R2=0.01\n", + "X2=0.2\n", + "E1line=1000.\n", + "#calculations and results\n", + "E1=E1line/sqrt(3)\n", + "E2=E1/K\n", + "#at start,s=1\n", + "I2=160.37/sqrt((R2**2)+(X2**2))\n", + "pf=R2/sqrt((R2**2)+(X2**2))\n", + "print\"rotor current at start (A) = \",round(I2,2)\n", + "print\"rotor power factor lagging (answer in book is wrong)= \",round(pf,4)\n", + "#at s=0.03\n", + "s=0.03\n", + "I2r=s*160.37/sqrt((R2**2)+((s*X2)**2))\n", + "print\"rotor current at slip 0.03 (A) = \",round(I2r,2)\n", + "I2=200.\n", + "R21=sqrt(((E2/I2)**2)-(X2**2))\n", + "Rex=R21-R2\n", + "print\"external resistance (ohm/ph) (answer in book is wrong) = \",round(Rex,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 10_58" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 103.54\n", + "full load torque (Nm) = 15.576\n", + "maximum torque (Nm) = 117.342\n", + "speed at max torque (rpm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_19,pg10_58\n", + "#calculate the starting torque, full load torque, maximum torque and speed at max torque\n", + "import math\n", + "#given\n", + "P=12.\n", + "f=50.\n", + "R2=0.15\n", + "X2=0.25\n", + "E2=32.\n", + "#calculations\n", + "Ns=120*f/P\n", + "ns=Ns/60\n", + "Tst=3*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+(X2**2)))\n", + "N=480.\n", + "s=(Ns-N)/Ns\n", + "Tfl=3*s*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+((s*X2)**2)))\n", + "Tm=3*(E2**2)/(2*math.pi*ns*2*X2)\n", + "sm=R2/X2\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,3)\n", + "print\"maximum torque (Nm) = \",round(Tm,3)\n", + "print\"speed at max torque (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 10_59" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency on full load (percent) = 85.78\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_20,pg10_59\n", + "#calculate the efficiency in full load\n", + "#given\n", + "Po=50.*735.5#(in W)\n", + "s=0.04\n", + "#calculations\n", + "#Rcl=X...............rotor copper loss\n", + "#Sil=1.25X...........stator iron loss\n", + "#Ml=Y, Y=(Y+1.25X)/3, Y=0.625X\n", + "#TL=Sil+Rcl+Scl+Ml, TL=3.875X.........(a)\n", + "#Pm=Po+Y, 36775+625X..........(1)\n", + "#Pc=Pm*s/(1-s).............(2)\n", + "#Pc=X, from (1) and (2)\n", + "X=(s*Po)/(1-s-s*0.625)\n", + "TL=3.875*X#from (a)\n", + "n=Po*100./(Po+TL)\n", + "#results\n", + "print\"efficiency on full load (percent) = \",round(n,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 10_61" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new speed of motor (rpm) = 1392.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_21,pg10_61\n", + "#calculate the new speed of motor\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "R2=0.25\n", + "X2=0.55\n", + "N1=1440\n", + "#calculations\n", + "Ns=120*f/P\n", + "s1=(Ns-N1)/Ns\n", + "Rex=0.2\n", + "R21=R2+Rex\n", + "#T1 at s1=T2 at s2\n", + "#0.3025*s2^2-2.8342*s2+0.2025=0, s1=0.04\n", + "a=0.3025\n", + "b=-2.8342\n", + "c=0.2025\n", + "s2=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "N2=Ns*(1-s2)\n", + "#results\n", + "print\"new speed of motor (rpm) = \",round(N2,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 10_62" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rotor current at start (A) = 9.4916\n", + "rotor current for rheostat of 6 ohm (A) = 4.0324\n", + "full load rotor current (A) = 2.2456\n", + "full load power factor (lagging) = 0.9724\n", + "rotor e.m.f on full load (V) = 1.1547\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_22,pg10_62\n", + "#calculate the rotor current, full load current , power factor and rotor emf\n", + "#given\n", + "import math\n", + "from math import sqrt\n", + "E2line=50.\n", + "R2=0.5\n", + "X2=3.\n", + "E2=E2line/sqrt(3)\n", + "#calculations and results\n", + "#at start\n", + "s=1\n", + "I2r=s*E2/(sqrt((R2**2)+((s*X2)**2)))\n", + "print\"rotor current at start (A) = \",round(I2r,4)\n", + "Rx=6.\n", + "I2r=s*E2/(sqrt(((R2+Rx)**2)+((s*X2)**2)))\n", + "print\"rotor current for rheostat of 6 ohm (A) = \",round(I2r,4)\n", + "#at full load\n", + "s=0.04\n", + "I2r=s*E2/(sqrt((R2**2)+((s*X2)**2)))\n", + "pf=R2/(sqrt((R2**2)+((s*X2)**2)))\n", + "print\"full load rotor current (A) = \",round(I2r,4)\n", + "print\"full load power factor (lagging) = \",round(pf,4)\n", + "E2r=s*E2\n", + "print\"rotor e.m.f on full load (V) = \",round(E2r,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 10_63" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 103.54\n", + "full load torque (Nm) = 15.576\n", + "maximum torque (Nm) = 117.342\n", + "speed at max torque (rpm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_23,pg10_63\n", + "#calculate the starting,full load, maximum torque and speed\n", + "#given\n", + "import math\n", + "P=12.\n", + "f=50.\n", + "R2=0.15\n", + "X2=0.25\n", + "E2=32.\n", + "#calculations\n", + "Ns=120*f/P\n", + "ns=Ns/60.\n", + "k=3.\n", + "Tst=k*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+(X2**2)))\n", + "N=480.\n", + "s=(Ns-N)/Ns\n", + "Tfl=k*s*(E2**2)*R2/((2*math.pi*ns)*((R2**2)+((s*X2)**2)))\n", + "Tm=k*(E2**2)/(2*math.pi*ns*2*X2)\n", + "sm=R2/X2\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,2)\n", + "print\"full load torque (Nm) = \",round(Tfl,3)\n", + "print\"maximum torque (Nm) = \",round(Tm,3)\n", + "print\"speed at max torque (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 10_64" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load torque (Nm) = 202.52\n", + "ratio of Tst to Tfl = 0.817\n", + "ratio of Tm to Tfl = 2.043\n", + "external resistance required (ohm/ph) = 1.6\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_24,pg10_64\n", + "#calculate the full load torque and external resistance required\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "R2=0.4\n", + "X2=2.\n", + "E2b=520.#between slip rings\n", + "#calculations\n", + "E2ph=E2b/math.sqrt(3)\n", + "Ns=120*f/P\n", + "N=1425.\n", + "sf=(Ns-N)/Ns\n", + "ns=Ns/60.\n", + "Tfl=3*sf*(E2ph**2)*R2/((2*math.pi*ns)*((R2**2)+((sf*X2)**2)))\n", + "Tst=3*(E2ph**2)*R2/((2*math.pi*ns)*((R2**2)+((X2)**2)))\n", + "T=Tst/Tfl\n", + "Tm=3*(E2ph**2)/((2*math.pi*ns)*((R2**2)+((X2)*2)))\n", + "T1=Tm/Tfl\n", + "#at start\n", + "sm=1\n", + "R21=X2\n", + "Rex=R21-R2\n", + "#results\n", + "print\"full load torque (Nm) = \",round(Tfl,2)\n", + "print\"ratio of Tst to Tfl = \",round(T,3)\n", + "print\"ratio of Tm to Tfl = \",round(T1,3)\n", + "print\"external resistance required (ohm/ph) = \",Rex" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 10_65" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "slip at full load = 0.04\n", + "rotor frequency (Hz) = 2.0\n", + "rotor copper loss per phase (kW) = 486.53\n", + "total copper loss (kW) = 1.4596\n", + "efficiency at full load (percent) = 89.02\n", + "line current drawn (A) = 68.361\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_25,pg10_65\n", + "#calculate the slip, rotor frequency, copper loss and efficiency\n", + "#given\n", + "import math\n", + "Po=33.73*10**3\n", + "P=4.\n", + "Vl=400.\n", + "f=50.\n", + "Nfl=1440.\n", + "pf=0.8\n", + "Ml=1.3*10**3\n", + "#calculations\n", + "Ns=120*f/P\n", + "s=(Ns-Nfl)/Ns\n", + "fr=s*f\n", + "Pm=Po+Ml\n", + "Pc=Pm*s/(1-s)\n", + "Pcp=Pc/3#copper loss per phase\n", + "P2=Pc/s\n", + "Sl=1.4*10**3\n", + "Pi=P2+Sl\n", + "n=Po*100/Pi\n", + "Il=Pi/(math.sqrt(3)*Vl*pf)\n", + "#results\n", + "print\"slip at full load = \",s\n", + "print\"rotor frequency (Hz) = \",round(fr,1)\n", + "print\"rotor copper loss per phase (kW) = \",round(Pcp,2)\n", + "print\"total copper loss (kW) = \",round(Pc/1000.,4)\n", + "print\"efficiency at full load (percent) = \",round(n,2)\n", + "print\"line current drawn (A) = \",round(Il,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 10_66" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power factor of rotor (lagging) = 0.989\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_26,pg10_66\n", + "#calculate the power factor of rotor\n", + "#given\n", + "import math\n", + "R2=0.04\n", + "X2=0.2\n", + "sfl=0.03\n", + "#at Tst, s=1\n", + "#Tfl=Tst\n", + "#(R21**2)-1.3633*R21+0.04=0\n", + "a=1\n", + "b=-1.3633\n", + "c=0.04\n", + "#calculations\n", + "R21=(-b+math.sqrt((b**2)-4*a*c))/(2*a)\n", + "Rex=R21-R2\n", + "pf=R21/math.sqrt((R21**2)+(X2**2))\n", + "#results\n", + "print\"power factor of rotor (lagging) = \",round(pf,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 10_67" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1318.7\n", + "speed at max. torque (rpm) = 823.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_27,pg10_67\n", + "#calculate the full load speed, speed at max torque\n", + "#given\n", + "import math\n", + "P=4.\n", + "f=50.\n", + "Po=8.*10**3\n", + "#Tst=1.5*Tfl and Tm=2*Tfl\n", + "#(R2**2)+((sfl*X2)**2)=1.5*sfl*((R2**2)+(X2**2)).................(1)\n", + "#(R2**2)+((sfl*X2)**2)=2*(sfl/sm)*((R2**2)+((sm*X2)**2))..........(2)\n", + "#dividing (1) and (2) by (X2**2) on both sides and R2/X2=sm\n", + "#(sm**2)+(sfl**2)=5*(1+(sm**2))*sfl.............(3)\n", + "#(sm**2)+(sfl**2)=2*(2*(sm**2))*(sfl/sm)=4*sm*sfl...........(4)\n", + "#dividing (3) by (4)\n", + "#(sm**2)-2.667*sm+1=0\n", + "a=1\n", + "b=-2.667\n", + "c=1\n", + "#calculations\n", + "sm=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "Ns=120*f/P\n", + "#substituting sm in (4)\n", + "#(sfl**2)-1.8052*sfl+0.2036=0\n", + "a=1\n", + "b=-1.8052\n", + "c=0.2036\n", + "sfl=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "N=Ns*(1-sfl)\n", + "Nm=Ns*(1-sm)\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N,1)\n", + "print\"speed at max. torque (rpm) = \",round(Nm,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 10_68" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "starting torque (Nm) = 34.8\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_28,pg10_68\n", + "#calculate the starting torque\n", + "import math\n", + "#given\n", + "Po=10*735.5#(in W)\n", + "Nfl=1410.\n", + "P=4.\n", + "f=50.\n", + "#calculations\n", + "Ns=120.*f/P\n", + "sfl=(Ns-Nfl)/Ns\n", + "Nm=1200.\n", + "sm=(Ns-Nm)/Ns\n", + "T=2*sfl*sm/((sm**2)+(sfl**2))#Tfl/Tm\n", + "T1=(1+(sm**2))/(2*sm)#Tm/Tst\n", + "T2=T1*T#Tfl/Tst\n", + "Tfl=Po*60./(2*math.pi*Nfl)\n", + "Tst=Tfl/T2\n", + "#results\n", + "print\"starting torque (Nm) = \",round(Tst,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 10_70" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum torque (Nm) = 330.5\n", + "speed (r.p.m) = 1250.0\n", + "external resistance (ohm/ph) = 0.125\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_29,pg10_70\n", + "#calculate the maximum torque, speed and external resistance\n", + "#given\n", + "P=4.\n", + "f=50.\n", + "R2=0.025\n", + "X2=0.15\n", + "sfl=0.04\n", + "Tfl=150.\n", + "#calculations\n", + "sm=R2/X2\n", + "Tm=Tfl*((R2**2)+((sfl*X2)**2))*sm/(sfl*((R2**2)+((sm*X2)**2)))\n", + "Ns=120*f/P\n", + "N=Ns*(1-sm)\n", + "#at start\n", + "R21=X2\n", + "Rex=R21-R2\n", + "#results\n", + "print\"maximum torque (Nm) = \",Tm\n", + "print\"speed (r.p.m) = \",N\n", + "print\"external resistance (ohm/ph) = \",Rex\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 30 - pg 10_70" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "motor output (kW) = 16.54099\n", + "copper loss in rotor (W) = 575.54\n", + "motor input (kW) = 20.0147\n", + "efficiency of motor (percent) = 82.644\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_30,pg10_70\n", + "#calculate the motor output, copper loss and efficiency\n", + "#given\n", + "import math\n", + "Tsh=162.84\n", + "P=6.\n", + "f=50.\n", + "Tlost=20.36\n", + "fr=1.5\n", + "#calculations\n", + "s=fr/f\n", + "Ns=120*f/P\n", + "N=Ns*(1-s)\n", + "Po=Tsh*(2*math.pi*N)/60\n", + "Fl=Tlost*(2*math.pi*N)/60\n", + "Pm=Po+Fl\n", + "Pc=Pm*s/(1-s)\n", + "P2=Pc/s\n", + "Sl=830\n", + "Pi=P2+Sl\n", + "n=Po*100/Pi\n", + "#results\n", + "print\"motor output (kW) = \",round(Po/1000.,5)\n", + "print\"copper loss in rotor (W) = \",round(Pc,3)\n", + "print\"motor input (kW) = \",round(Pi/1000.,4)\n", + "print\"efficiency of motor (percent) = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31 - pg 10_71" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of max to full load torque = 1.45\n", + "speed at max torque (rpm) = 675.0\n" + ] + } + ], + "source": [ + "#Chapter-10,Example10_31,pg10_71\n", + "#calculate the ratio of max to full load torque and speed at max torque\n", + "#given\n", + "f=50.\n", + "P=8.\n", + "R2=0.01\n", + "X2=0.1\n", + "sfl=0.04\n", + "#calculations\n", + "#for Tmax\n", + "sm=R2/X2\n", + "#for Tfl\n", + "s=sfl\n", + "T=sm*R2*((R2**2)+((sfl*X2)**2))/((sfl*R2)*((R2**2)+((sm*X2)**2)))#Tmax/Tfl\n", + "Ns=120*f/P\n", + "sm=0.1\n", + "N=Ns*(1-sm)\n", + "#results\n", + "print\"ratio of max to full load torque = \",T\n", + "print\"speed at max torque (rpm) = \",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/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 new file mode 100644 index 00000000..e5603984 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter1_1.ipynb @@ -0,0 +1,489 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Electronic Voltmeters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 1_17" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required multiplier resistance (kohm) = 4.3\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_1,pg 1_17\n", + "#calculate the required multiplier resistance\n", + "import math\n", + "#given\n", + "Erms=10.\n", + "Rm=200\n", + "#calculations\n", + "Ep=math.sqrt(2)*Erms\n", + "Eav=0.6*Ep\n", + "E=Eav/2.\n", + "Edc=0.45*Erms\n", + "Idc=1*10**-3\n", + "Rs=(Edc/Idc)-Rm\n", + "#results\n", + "print\"required multiplier resistance (kohm) = \",Rs/1000." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 1_18" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required multiplier resistance(kohm) = 4.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_2,pg 1_18\n", + "#calculate the required multiplier resistance\n", + "#given\n", + "Eav=9.\n", + "Erms=10.\n", + "Rm=500.\n", + "Idc=2*10**-3\n", + "#calculations\n", + "Edc=0.9*Erms\n", + "Rs=(Edc/Idc)-Rm\n", + "#results\n", + "print \"required multiplier resistance(kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 1_20" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error = -11.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_3,pg 1_20\n", + "#calculate the percentage error\n", + "#given\n", + "Kf=1#Erms=Em for 1 time period\n", + "Kf1=1.11#Kf(sine)/Kf(square)\n", + "#calculations\n", + "pere=(Kf-Kf1)/Kf*100.#percentage error\n", + "#results\n", + "print\"percentage error = \",pere\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 1_20" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error (percent) = 3.87\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_4,pg 1_20\n", + "#calculate the percentage error\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "#given\n", + "A=50.\n", + "T=2.\n", + "Kf2=1.11\n", + "#calculations\n", + "def f(t):\n", + "\tE=(50*t)**2#e=At(ramp function)\n", + "\treturn E\n", + "\n", + "\n", + "I=scipy.integrate.quad(f,0,T)\n", + "\n", + "Erms=math.sqrt((1./T)*I[0])\n", + "def f1(t):\n", + "\te=50*t#e=At(ramp function)\n", + "\treturn e\n", + "\n", + "\n", + "I1=scipy.integrate.quad(f1,0,T)\n", + "Eav=(1./T)*I1[0]\n", + "Kf=Erms/Eav\n", + "kfr=Kf2/Kf #Kf(sine)/Kf(sawtooth)\n", + "pere=(1-kfr)/1*100#percentage error\n", + "#results\n", + "print\"percentage error (percent) = \",round(pere,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 1_27" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total meter resistance (ohm) = 6100.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_5,pg 1_27\n", + "#calculate the total meter resistance\n", + "#given\n", + "Idc=25*10**-3\n", + "Erms=200.\n", + "Rm=100.\n", + "Rf=500.\n", + "#calculations\n", + "Rd=2*Rf\n", + "Rm1=Rm+Rd#total meter resistance\n", + "Rs=(0.9*Erms)/Idc-Rm1\n", + "#results\n", + "print \"total meter resistance (ohm) = \",Rs\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 1_38" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter current (mA) = 5.99\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_6,pg 1_38\n", + "#calculate the meter current\n", + "#given\n", + "V1=2.\n", + "Rm=50.\n", + "Rd=15.*10**3\n", + "gm=0.006\n", + "rd=100*10**3\n", + "#calculations\n", + "Im=(gm*rd*Rd/(rd+Rd)*V1)/((2*(rd*Rd/(rd+Rd))+Rm))\n", + "#results\n", + "print \"meter current (mA) = \",round(Im*1000.,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 1_38" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter current (mA) = 3.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_7,pg 1_38\n", + "#calculate the meter current\n", + "#given\n", + "V1=1\n", + "Rm=50\n", + "Rd=15*10**3\n", + "gm=0.006\n", + "rd=100*10**3\n", + "#calculations\n", + "Im=(gm*rd*Rd/(rd+Rd)*V1)/((2*(rd*Rd/(rd+Rd))+Rm))\n", + "#results\n", + "print \"meter current (mA) = \",round(Im*1000.,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 1_39" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance values are\n", + "R1 (Mohm) = 8.7\n", + "R2 (kohm) = 120.0\n", + "R3 (kohm) = 90.0\n", + "R4 (kohm) = 90.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_8,pg 1_39\n", + "#calculate the resistance values\n", + "#given\n", + "V1=1.\n", + "Vin=30.\n", + "Rin=9.*10**6\n", + "#calcuations\n", + "R4=Rin/100.#for Vin=100V\n", + "R3=(Rin-50*R4)/50#for Vin=50V\n", + "R2=(Rin-30*R3-30*R4)/30#for Vin=30V\n", + "R1=Rin-R2-R3-R4\n", + "#results\n", + "print \"resistance values are\"\n", + "print \"R1 (Mohm) = \",round(R1/10**6,1)\n", + "print \"R2 (kohm) = \",round(R2/10**3,1)\n", + "print \"R3 (kohm) = \",round(R3/10**3,1)\n", + "print \"R4 (kohm) = \",round(R4/10**3,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 1_40" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current Im (mA) = 0.3896\n", + "series resistance (kohm) = 7.042\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_9,pg 1_40\n", + "#calculate the current, series resistance\n", + "#given\n", + "rd=10*10**3\n", + "gm=0.003\n", + "Rs=15*10**3\n", + "V1=1#input voltage\n", + "Rm=1800.\n", + "Img=0.1*10**-3#meter current given\n", + "#calculations\n", + "rdf=rd/(1+gm*rd)#actual rd\n", + "Vo=(gm*rdf*Rs)*V1/(rdf+Rs)\n", + "Rth=(2*Rs*rdf/(Rs+rdf))\n", + "Im=Vo/(Rth+Rm)\n", + "Rf=(Vo/Img)-Rth-Rm#series resistance\n", + "#results\n", + "print \"current Im (mA) = \",round(Im*1000.,4)\n", + "print \"series resistance (kohm) = \",round(Rf/10**3,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 1_41" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "calibration resistance (kohm) = 18.4\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_10,pg 1_41\n", + "#calculate the calibration resistance\n", + "#given\n", + "rd=200.*10**3\n", + "gm=0.004\n", + "Rs=40.*10**3\n", + "Rm=1000.\n", + "V1=1\n", + "#calculations\n", + "rdf=rd/(1+gm*rd)#actual rd\n", + "Rth=(2*Rs*rdf/(Rs+rdf))\n", + "Vo=(gm*rdf*Rs)*V1/(rdf+Rs)\n", + "Im=50*10**-6\n", + "Rcal=(Vo/Im)-Rth-Rm#calibration resistance\n", + "#results\n", + "print \"calibration resistance (kohm) = \",round(Rcal/1000.,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 1_42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistances are \n", + "R1(kohm) = 666.67\n", + "R2(kohm) = 300.0\n", + "R3(kohm) = 23.33\n", + "R4(kohm) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-1,Example1_11,pg 1_42\n", + "#calculate the resistances\n", + "#given\n", + "Vin=3.\n", + "V1=1.\n", + "Rin=1.*10**6#input resistance of FET\n", + "#calculations\n", + "R4=Rin/100.#for Vin=100V\n", + "R3=(Rin-30*R4)/30.#for Vin=30V\n", + "R2=(Rin-3*R3-3*R4)/3.#for Vin=3V\n", + "R1=Rin-R2-R3-R4\n", + "#results\n", + "print \"Resistances are \"\n", + "print \"R1(kohm) = \",round(R1/1000.,2)\n", + "print \"R2(kohm) = \",round(R2/1000.,0)\n", + "print \"R3(kohm) = \",round(R3/1000.,2)\n", + "print \"R4(kohm) = \",round(R4/1000.,0)\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2.ipynb new file mode 100755 index 00000000..d074e1fe --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2.ipynb @@ -0,0 +1,262 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter2 - Digital to Analog Converters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 2_9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input resistance (kohm) = 12.5\n", + "feedback resistance (kohm) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_1,pg 2_9\n", + "#calculate the input resistance and feedback resistance\n", + "#given\n", + "Vr=10.\n", + "n=4.\n", + "Res=0.5#resolution\n", + "Rf=10*10**3\n", + "#calculations\n", + "Rt=Vr/((2**n)*Res)\n", + "R=Rt*Rf\n", + "#results\n", + "print \"input resistance (kohm) = \",R/1000.\n", + "print \"feedback resistance (kohm) = \",Rf/1000." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 2_11" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution through method-1 = 256\n", + "resolution through method-2 (mV) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_2,pg 2_11\n", + "#calculate the resolution through both methods\n", + "#given\n", + "n=8\n", + "Vofs=2.55#full scale output voltage\n", + "#calculations\n", + "Res1=2**n\n", + "Res2=Vofs/(Res1-1)\n", + "#results\n", + "print \"resolution through method-1 = \",Res1\n", + "print \"resolution through method-2 (mV) = \",Res2*1000" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 6.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_3,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "n=4.\n", + "Vofs=15.\n", + "#calculations\n", + "Res=Vofs/((2**n)-1)\n", + "D=int('0110',base=2)#decimal equivalent\n", + "Vo=Res*D\n", + "#results\n", + "print\"output voltage (V) = \",Vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 2.56\n", + "full scale output voltage (V) = 5.1\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_4,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "Res=20*10**-3\n", + "n=8\n", + "#calculations\n", + "Vofs=Res*((2**n)-1)\n", + "D=int('10000000',base=2)\n", + "Vo=Res*D\n", + "print\"output voltage (V) = \",Vo\n", + "print\"full scale output voltage (V) = \",Vofs\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage1 (V) = 2.6667\n", + "output voltage2 (V) = 5.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_5,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "n=4.\n", + "Vofs=5.\n", + "#calculations\n", + "Res=Vofs/((2**n)-1)\n", + "D1=int('1000',base=2)\n", + "Vo1=Res*D1\n", + "D2=int('1111',base=2)\n", + "Vo2=Res*D2\n", + "#results\n", + "print\"output voltage1 (V) = \",round(Vo1,4)\n", + "print\"output voltage2 (V) = \",Vo2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 2_13" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Full scale output voltage (V) = 32.76\n", + "percentage resolution = 0.02442\n", + "output voltage (V) = 11.112\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_6,pg 2_13\n", + "#calculate the full scale output voltage, percentage resolution\n", + "#given\n", + "n=12.\n", + "Res=8.*10**-3\n", + "#calculations\n", + "Vofs=Res*((2**n) -1)\n", + "perR=Res/Vofs*100.\n", + "Vo=Res*int('010101101101',base=2)\n", + "#results\n", + "print \"Full scale output voltage (V) = \",Vofs\n", + "print\"percentage resolution = \",round(perR,5)\n", + "print\"output voltage (V) = \",Vo\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/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 new file mode 100644 index 00000000..d074e1fe --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter2_1.ipynb @@ -0,0 +1,262 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter2 - Digital to Analog Converters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 2_9" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input resistance (kohm) = 12.5\n", + "feedback resistance (kohm) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_1,pg 2_9\n", + "#calculate the input resistance and feedback resistance\n", + "#given\n", + "Vr=10.\n", + "n=4.\n", + "Res=0.5#resolution\n", + "Rf=10*10**3\n", + "#calculations\n", + "Rt=Vr/((2**n)*Res)\n", + "R=Rt*Rf\n", + "#results\n", + "print \"input resistance (kohm) = \",R/1000.\n", + "print \"feedback resistance (kohm) = \",Rf/1000." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 2_11" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution through method-1 = 256\n", + "resolution through method-2 (mV) = 10.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_2,pg 2_11\n", + "#calculate the resolution through both methods\n", + "#given\n", + "n=8\n", + "Vofs=2.55#full scale output voltage\n", + "#calculations\n", + "Res1=2**n\n", + "Res2=Vofs/(Res1-1)\n", + "#results\n", + "print \"resolution through method-1 = \",Res1\n", + "print \"resolution through method-2 (mV) = \",Res2*1000" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 6.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_3,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "n=4.\n", + "Vofs=15.\n", + "#calculations\n", + "Res=Vofs/((2**n)-1)\n", + "D=int('0110',base=2)#decimal equivalent\n", + "Vo=Res*D\n", + "#results\n", + "print\"output voltage (V) = \",Vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 2.56\n", + "full scale output voltage (V) = 5.1\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_4,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "Res=20*10**-3\n", + "n=8\n", + "#calculations\n", + "Vofs=Res*((2**n)-1)\n", + "D=int('10000000',base=2)\n", + "Vo=Res*D\n", + "print\"output voltage (V) = \",Vo\n", + "print\"full scale output voltage (V) = \",Vofs\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 2_12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage1 (V) = 2.6667\n", + "output voltage2 (V) = 5.0\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_5,pg 2_12\n", + "#calculate the output voltage\n", + "#given\n", + "n=4.\n", + "Vofs=5.\n", + "#calculations\n", + "Res=Vofs/((2**n)-1)\n", + "D1=int('1000',base=2)\n", + "Vo1=Res*D1\n", + "D2=int('1111',base=2)\n", + "Vo2=Res*D2\n", + "#results\n", + "print\"output voltage1 (V) = \",round(Vo1,4)\n", + "print\"output voltage2 (V) = \",Vo2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 2_13" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Full scale output voltage (V) = 32.76\n", + "percentage resolution = 0.02442\n", + "output voltage (V) = 11.112\n" + ] + } + ], + "source": [ + "#Chapter-2,Example2_6,pg 2_13\n", + "#calculate the full scale output voltage, percentage resolution\n", + "#given\n", + "n=12.\n", + "Res=8.*10**-3\n", + "#calculations\n", + "Vofs=Res*((2**n) -1)\n", + "perR=Res/Vofs*100.\n", + "Vo=Res*int('010101101101',base=2)\n", + "#results\n", + "print \"Full scale output voltage (V) = \",Vofs\n", + "print\"percentage resolution = \",round(perR,5)\n", + "print\"output voltage (V) = \",Vo\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3.ipynb new file mode 100755 index 00000000..15b0854c --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Analog to Digital Converters & Digital Voltmeters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 3_5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resolution (mV/LSB) = 20.0\n", + "digital output voltage (LSBs) = 64.0\n", + "Binary equivalent of 64 is 0b1000000\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_1,pg 3_5\n", + "#calculate the Resolution and digital output voltage\n", + "#given\n", + "n=8\n", + "Vifs=5.1\n", + "Vi=1.28\n", + "#calculations\n", + "Res1=2**n\n", + "Res2=Vifs/((2**n)-1)\n", + "Res=Res2*1000#in mv/LSB\n", + "D=Vi/Res2\n", + "strin=bin(64)\n", + "#results\n", + "print\"Resolution (mV/LSB) = \",Res\n", + "print\"digital output voltage (LSBs) = \",D\n", + "print\"Binary equivalent of 64 is\",strin" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 3_6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "quantisation error (mV) = 0.5\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_2,pg 3_6\n", + "#calculate the quantisation error\n", + "#given\n", + "Vifs=4.095\n", + "n=12.\n", + "#calculations\n", + "Qe=Vifs/(((2**n)-1)*2)\n", + "#results\n", + "print\"quantisation error (mV) = \",round(Qe*1000.,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 3_10" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "In case 1, t2 (ms) = 83.33\n", + "In case 2, t2 (ms) = 166.66\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_3,pg 3_10\n", + "#calculate the value of t2 in both cases\n", + "#given\n", + "V1=100.*10**-3\n", + "Vr=100.*10**-3\n", + "t1=83.33\n", + "Vi=200.*10**-3#input voltage\n", + "#calculations\n", + "t2=(V1/Vr)*t1\n", + "t22=(Vi/Vr)*t1\n", + "#results\n", + "print\"In case 1, t2 (ms) = \",t2\n", + "print\"In case 2, t2 (ms) = \",t22\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 3_10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "digital output (counts) = 1000.0\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_4,pg 3_10\n", + "#calculate the digital output\n", + "#given\n", + "fclk=12.*10**3#clock frequency\n", + "t1=83.33*10**-3\n", + "V1=100.*10**-3\n", + "Vr=100.*10**-3\n", + "#calculations\n", + "D=fclk*t1*(V1/Vr)\n", + "#results\n", + "print\"digital output (counts) = \",round(D,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 3_13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conversion time (musec) = 9.0\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_5,pg 3_13\n", + "#calculate the conversion time\n", + "#given\n", + "F=1*10**6\n", + "n=8\n", + "#calculations\n", + "T=1./F\n", + "Tc=T*(n+1)\n", + "#results\n", + "print\"conversion time (musec) = \",Tc*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 3_15" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum input frequency (Hz) = 69.08\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_6,pg 3_15\n", + "#calculate the maximum input frequency\n", + "import math\n", + "#given\n", + "Tc=9*10**-6\n", + "n=8\n", + "#calculations\n", + "fmax=1./(2*math.pi*Tc*(2**n))\n", + "#results\n", + "print\"maximum input frequency (Hz) = \",round(fmax,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 3_37" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least diffrence in readings for 50V range (V) = 0.05\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_7,pg 3_37\n", + "#calculate the least difference in readings\n", + "#given\n", + "n=3.#3 full digits\n", + "#calculations\n", + "R=1./(10**n)\n", + "#for 1V range\n", + "Res1=1*R\n", + "#for 50V range\n", + "Res2=50*R\n", + "#results\n", + "print\"least diffrence in readings for 50V range (V) = \",Res2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 3_38" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "error when reading is 5V (V) = 0.035\n", + "percent error when reading is 0.1V (percent) = 10.5\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_8,pg 3_38\n", + "#calculate the percent error \n", + "#given\n", + "n=3.\n", + "#calculations and results\n", + "R=1./(10**n)\n", + "#for 10V range\n", + "R=R*10.\n", + "err1=R#1-digit error\n", + "#reading is 5V\n", + "err=(0.5/100)*5#error due to reading\n", + "errt=err1+err#total error\n", + "print\"error when reading is 5V (V) = \",errt\n", + "\n", + "#reading is 0.1V\n", + "err=(0.5/100)*0.1#error due to reading\n", + "errt=err+err1#total error\n", + "errp=(errt/0.1)*100\n", + "print\"percent error when reading is 0.1V (percent) = \",errp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 3_38" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "senstivity of meter (V) = 1e-06\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_9,pg 3_38\n", + "#calculate the senstivity of meter\n", + "#given\n", + "n=4.\n", + "fsmin=10*10**-3#full scale value on min. range\n", + "#calculations\n", + "R=1/(10**n)\n", + "S=fsmin*R\n", + "#results\n", + "print\"senstivity of meter (V) = \",S\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 3_39" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution = 0.0001\n", + "12.98 would be displayed as 12.980 for 10V range\n", + "\n", + "0.6973 would be displayed as 0.6973 for 1V range\n", + "\n", + "0.6973 would be displayed as 0.697 for 10V range\n", + "\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_10,pg 3_39\n", + "#calculate the resolution\n", + "#given\n", + "n=4.\n", + "#calculations\n", + "R1=1./(10**n)\n", + "#for 10V range\n", + "R=10*R1\n", + "#results\n", + "print \"resolution = \",R1\n", + "print\"12.98 would be displayed as 12.980 for 10V range\\n\"\n", + "#for 1V range\n", + "R=1*R\n", + "print\"0.6973 would be displayed as 0.6973 for 1V range\\n\"\n", + "#for 10V range\n", + "print\"0.6973 would be displayed as 0.697 for 10V range\\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/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 new file mode 100644 index 00000000..15b0854c --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter3_1.ipynb @@ -0,0 +1,418 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Analog to Digital Converters & Digital Voltmeters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 3_5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resolution (mV/LSB) = 20.0\n", + "digital output voltage (LSBs) = 64.0\n", + "Binary equivalent of 64 is 0b1000000\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_1,pg 3_5\n", + "#calculate the Resolution and digital output voltage\n", + "#given\n", + "n=8\n", + "Vifs=5.1\n", + "Vi=1.28\n", + "#calculations\n", + "Res1=2**n\n", + "Res2=Vifs/((2**n)-1)\n", + "Res=Res2*1000#in mv/LSB\n", + "D=Vi/Res2\n", + "strin=bin(64)\n", + "#results\n", + "print\"Resolution (mV/LSB) = \",Res\n", + "print\"digital output voltage (LSBs) = \",D\n", + "print\"Binary equivalent of 64 is\",strin" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 3_6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "quantisation error (mV) = 0.5\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_2,pg 3_6\n", + "#calculate the quantisation error\n", + "#given\n", + "Vifs=4.095\n", + "n=12.\n", + "#calculations\n", + "Qe=Vifs/(((2**n)-1)*2)\n", + "#results\n", + "print\"quantisation error (mV) = \",round(Qe*1000.,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 3_10" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "In case 1, t2 (ms) = 83.33\n", + "In case 2, t2 (ms) = 166.66\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_3,pg 3_10\n", + "#calculate the value of t2 in both cases\n", + "#given\n", + "V1=100.*10**-3\n", + "Vr=100.*10**-3\n", + "t1=83.33\n", + "Vi=200.*10**-3#input voltage\n", + "#calculations\n", + "t2=(V1/Vr)*t1\n", + "t22=(Vi/Vr)*t1\n", + "#results\n", + "print\"In case 1, t2 (ms) = \",t2\n", + "print\"In case 2, t2 (ms) = \",t22\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 3_10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "digital output (counts) = 1000.0\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_4,pg 3_10\n", + "#calculate the digital output\n", + "#given\n", + "fclk=12.*10**3#clock frequency\n", + "t1=83.33*10**-3\n", + "V1=100.*10**-3\n", + "Vr=100.*10**-3\n", + "#calculations\n", + "D=fclk*t1*(V1/Vr)\n", + "#results\n", + "print\"digital output (counts) = \",round(D,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 3_13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conversion time (musec) = 9.0\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_5,pg 3_13\n", + "#calculate the conversion time\n", + "#given\n", + "F=1*10**6\n", + "n=8\n", + "#calculations\n", + "T=1./F\n", + "Tc=T*(n+1)\n", + "#results\n", + "print\"conversion time (musec) = \",Tc*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 3_15" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum input frequency (Hz) = 69.08\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_6,pg 3_15\n", + "#calculate the maximum input frequency\n", + "import math\n", + "#given\n", + "Tc=9*10**-6\n", + "n=8\n", + "#calculations\n", + "fmax=1./(2*math.pi*Tc*(2**n))\n", + "#results\n", + "print\"maximum input frequency (Hz) = \",round(fmax,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 3_37" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least diffrence in readings for 50V range (V) = 0.05\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_7,pg 3_37\n", + "#calculate the least difference in readings\n", + "#given\n", + "n=3.#3 full digits\n", + "#calculations\n", + "R=1./(10**n)\n", + "#for 1V range\n", + "Res1=1*R\n", + "#for 50V range\n", + "Res2=50*R\n", + "#results\n", + "print\"least diffrence in readings for 50V range (V) = \",Res2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 3_38" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "error when reading is 5V (V) = 0.035\n", + "percent error when reading is 0.1V (percent) = 10.5\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_8,pg 3_38\n", + "#calculate the percent error \n", + "#given\n", + "n=3.\n", + "#calculations and results\n", + "R=1./(10**n)\n", + "#for 10V range\n", + "R=R*10.\n", + "err1=R#1-digit error\n", + "#reading is 5V\n", + "err=(0.5/100)*5#error due to reading\n", + "errt=err1+err#total error\n", + "print\"error when reading is 5V (V) = \",errt\n", + "\n", + "#reading is 0.1V\n", + "err=(0.5/100)*0.1#error due to reading\n", + "errt=err+err1#total error\n", + "errp=(errt/0.1)*100\n", + "print\"percent error when reading is 0.1V (percent) = \",errp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 3_38" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "senstivity of meter (V) = 1e-06\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_9,pg 3_38\n", + "#calculate the senstivity of meter\n", + "#given\n", + "n=4.\n", + "fsmin=10*10**-3#full scale value on min. range\n", + "#calculations\n", + "R=1/(10**n)\n", + "S=fsmin*R\n", + "#results\n", + "print\"senstivity of meter (V) = \",S\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 3_39" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resolution = 0.0001\n", + "12.98 would be displayed as 12.980 for 10V range\n", + "\n", + "0.6973 would be displayed as 0.6973 for 1V range\n", + "\n", + "0.6973 would be displayed as 0.697 for 10V range\n", + "\n" + ] + } + ], + "source": [ + "#Chapter-3,Example3_10,pg 3_39\n", + "#calculate the resolution\n", + "#given\n", + "n=4.\n", + "#calculations\n", + "R1=1./(10**n)\n", + "#for 10V range\n", + "R=10*R1\n", + "#results\n", + "print \"resolution = \",R1\n", + "print\"12.98 would be displayed as 12.980 for 10V range\\n\"\n", + "#for 1V range\n", + "R=1*R\n", + "print\"0.6973 would be displayed as 0.6973 for 1V range\\n\"\n", + "#for 10V range\n", + "print\"0.6973 would be displayed as 0.697 for 10V range\\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4.ipynb new file mode 100755 index 00000000..470de735 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4.ipynb @@ -0,0 +1,296 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Frequency Meters and Phase Meters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 4_22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "E1 mag E1 rms Ein Rms Eab output\n", + "[[ 0. 0. 5. 4.501]\n", + " [ 3. 2.121 5.431 4.889]\n", + " [ 5. 3.53 6.123 5.513]\n", + " [ 7. 4.949 7.035 6.334]\n", + " [ 9. 6.363 8.093 7.286]\n", + " [ 12. 8.485 9.848 8.867]\n", + " [ 15. 10.606 11.726 10.557]\n", + " [ 18. 12.727 13.674 12.311]\n", + " [ 21. 14.849 15.668 14.106]]\n", + "There is a slight error in textbook\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAH6JJREFUeJzt3XmUXFW1x/HvLx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x2KiiLPNqfbzfuySdWtyeKmmjJcT3ZkmfGdpfaTZ4TgDWyZ6O\n", + "iEkN/75WHL8GeD0wv5fnfIxUT+UaYE1Jazc8tiswLyIe7OP9Gi+qmQpsvIT4LgX2LS7pN2s5JwCr\n", + "nYj4Q0Qs1vhLWgsYExELImIh6erS/RtO2R+YUWxAcnFRcfF6SRN7vM62wN7A1yXdKulVkj5UbN4x\n", + "p7iyt7tw2fWkMh9mLecEYJ1sbI8hoLcv4fztgVsb7s+gSACSliJVZb0Q+DwwKyI2I11+f05xvgAi\n", + "4npSfZqPR8QWEfF34BPA5sVzjmx4j5uAnYbyR5oN1qjcAZiV6JminPZArU0qoQtARMyStJykDUjD\n", + "OTdExGOStgfeWpzze0krdxfu66FxY465wI8lXcyixcruBzp+O0erJvcAzBbVczel7l7AfsXtvs7r\n", + "rahW47E9ge8BWwA3S+r+f29EH881K50TgNVdY0M+H+i5wmcGcDCwC6kaKcDVwEEAkqYADxebcTR6\n", + "Eli+OEfA2hHRBRwPjAeWK85bnd4no81K5wRgnaznHMBJAMWE7D2k7UbnSjqjOP860i/0l0TEn0kb\n", + "sl8REc8Uh6cBW0qaA5zEy7XoG3ejOh84VtIsYH3gXElzSXMM346IJ4rztiGV9TVrOZeDNmsg6Qrg\n", + "oO7d2Ep+rxGkhLBVRLxQ9vuZ9eQegNmiTgbe16L32guY6cbfcnEPwMysptwDMDOrKScAM7OacgIw\n", + "M6spJwAzs5pyAjAzqyknADOzmvp/3HLDiPkRzR0AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#Chapter-4,Example4_1,pg 4-22\n", + "#calculate the value of E1 vs EAB\n", + "import math\n", + "import numpy\n", + "from matplotlib import pyplot\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "%pylab inline\n", + "#given\n", + "E1mag=numpy.array([0, 3, 5, 7, 9, 12, 15, 18, 21])\n", + "Erms=5#given\n", + "#results\n", + "E1rms=E1mag/math.sqrt(2)\n", + "Einrms=(((E1rms)**2)+((Erms)**2))**(1./2.)\n", + "Eab=(2*math.sqrt(2)*Einrms)/math.pi\n", + "#results\n", + "pyplot.xlabel('E1(Volts)')\n", + "pyplot.ylabel('Eab(Volts)')\n", + "pyplot.title('Phase Meter')\n", + "print\"E1 mag E1 rms Ein Rms Eab output\"\n", + "k=numpy.matrix([[0, 0, 5, 4.501],\n", + " [3, 2.121, 5.431, 4.889],\n", + " [5, 3.53, 6.123, 5.513],\n", + " [7, 4.949, 7.035, 6.334],\n", + " [9, 6.363, 8.093, 7.286],\n", + " [12, 8.485, 9.848, 8.867],\n", + " [15, 10.606, 11.726, 10.557],\n", + " [18, 12.727, 13.674, 12.311],\n", + " [21, 14.849, 15.668, 14.106 ]])\n", + "print (k)\n", + "pyplot.plot(E1mag,Eab)\n", + "print 'There is a slight error in textbook'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 4_24" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 6.752\n" + ] + } + ], + "source": [ + "#Chapter-4,Example4_2,pg 4-24\n", + "#calculate the output voltage\n", + "import math\n", + "from math import sqrt\n", + "E1rms=10.\n", + "E2rms=15.\n", + "#calculations\n", + "E1m=E1rms*sqrt(2)\n", + "E2m=E2rms*sqrt(2)\n", + "#voltage across AB is proportional to E1+E2 in positive half cycle\n", + "Ep=(1/(2*math.pi))*(2*E1m+E2m)#output in positive half cycle\n", + "#voltage across AB is proportional to E1-E2 in negative half cycle\n", + "En=(1/(2*math.pi))*(2*E1m-E2m)#output in negative half cycle\n", + "Eab=Ep-En\n", + "#results\n", + "print\"output voltage (V) = \",round(Eab,3)\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/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 new file mode 100644 index 00000000..e132cf6b --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter4_1.ipynb @@ -0,0 +1,295 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Frequency Meters and Phase Meters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 4_22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E1 mag E1 rms Ein Rms Eab output\n", + "[[ 0. 0. 5. 4.501]\n", + " [ 3. 2.121 5.431 4.889]\n", + " [ 5. 3.53 6.123 5.513]\n", + " [ 7. 4.949 7.035 6.334]\n", + " [ 9. 6.363 8.093 7.286]\n", + " [ 12. 8.485 9.848 8.867]\n", + " [ 15. 10.606 11.726 10.557]\n", + " [ 18. 12.727 13.674 12.311]\n", + " [ 21. 14.849 15.668 14.106]]\n", + "There is a slight error in textbook\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAH6JJREFUeJzt3XmUXFW1x/HvLxMECGEQgccUREDAAGF6YQ6KCAISRWUS\n", + "EBVQFMUBRJziAE6oKPp4IAQFMSgBQZ6KotjMY4hJFBRUiIwBZRaQIfv9cW5DpdPd6eruW+dW3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gi+qmQpsvIT4LgX2LS7pN2s5JwCr\n", + "nYj4Q0Qs1vhLWgsYExELImIh6erS/RtO2R+YUWxAcnFRcfF6SRN7vM62wN7A1yXdKulVkj5UbN4x\n", + "p7iyt7tw2fWkMh9mLecEYJ1sbI8hoLcv4fztgVsb7s+gSACSliJVZb0Q+DwwKyI2I11+f05xvgAi\n", + "4npSfZqPR8QWEfF34BPA5sVzjmx4j5uAnYbyR5oN1qjcAZiV6JminPZArU0qoQtARMyStJykDUjD\n", + "OTdExGOStgfeWpzze0krdxfu66FxY465wI8lXcyixcruBzp+O0erJvcAzBbVczel7l7AfsXtvs7r\n", + "rahW47E9ge8BWwA3S+r+f29EH881K50TgNVdY0M+H+i5wmcGcDCwC6kaKcDVwEEAkqYADxebcTR6\n", + "Eli+OEfA2hHRBRwPjAeWK85bnd4no81K5wRgnaznHMBJAMWE7D2k7UbnSjqjOP860i/0l0TEn0kb\n", + "sl8REc8Uh6cBW0qaA5zEy7XoG3ejOh84VtIsYH3gXElzSXMM346IJ4rztiGV9TVrOZeDNmsg6Qrg\n", + "oO7d2Ep+rxGkhLBVRLxQ9vuZ9eQegNmiTgbe16L32guY6cbfcnEPwMysptwDMDOrKScAM7OacgIw\n", + "M6spJwAzs5pyAjAzqyknADOzmvp/3HLDiPkRzR0AAAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#Chapter-4,Example4_1,pg 4-22\n", + "#calculate the value of E1 vs EAB\n", + "import math\n", + "import numpy\n", + "from matplotlib import pyplot\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "%matplotlib inline\n", + "#given\n", + "E1mag=numpy.array([0, 3, 5, 7, 9, 12, 15, 18, 21])\n", + "Erms=5#given\n", + "#results\n", + "E1rms=E1mag/math.sqrt(2)\n", + "Einrms=(((E1rms)**2)+((Erms)**2))**(1./2.)\n", + "Eab=(2*math.sqrt(2)*Einrms)/math.pi\n", + "#results\n", + "pyplot.xlabel('E1(Volts)')\n", + "pyplot.ylabel('Eab(Volts)')\n", + "pyplot.title('Phase Meter')\n", + "print\"E1 mag E1 rms Ein Rms Eab output\"\n", + "k=numpy.matrix([[0, 0, 5, 4.501],\n", + " [3, 2.121, 5.431, 4.889],\n", + " [5, 3.53, 6.123, 5.513],\n", + " [7, 4.949, 7.035, 6.334],\n", + " [9, 6.363, 8.093, 7.286],\n", + " [12, 8.485, 9.848, 8.867],\n", + " [15, 10.606, 11.726, 10.557],\n", + " [18, 12.727, 13.674, 12.311],\n", + " [21, 14.849, 15.668, 14.106 ]])\n", + "print (k)\n", + "pyplot.plot(E1mag,Eab)\n", + "print 'There is a slight error in textbook'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 4_24" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output voltage (V) = 6.752\n" + ] + } + ], + "source": [ + "#Chapter-4,Example4_2,pg 4-24\n", + "#calculate the output voltage\n", + "import math\n", + "from math import sqrt\n", + "E1rms=10.\n", + "E2rms=15.\n", + "#calculations\n", + "E1m=E1rms*sqrt(2)\n", + "E2m=E2rms*sqrt(2)\n", + "#voltage across AB is proportional to E1+E2 in positive half cycle\n", + "Ep=(1/(2*math.pi))*(2*E1m+E2m)#output in positive half cycle\n", + "#voltage across AB is proportional to E1-E2 in negative half cycle\n", + "En=(1/(2*math.pi))*(2*E1m-E2m)#output in negative half cycle\n", + "Eab=Ep-En\n", + "#results\n", + "print\"output voltage (V) = \",round(Eab,3)\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6.ipynb new file mode 100755 index 00000000..8ade6c6b --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6.ipynb @@ -0,0 +1,296 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Oscilloscopes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 6_53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum rise time of pulse (ns) = 14.28\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-53\n", + "#calculate the rise time\n", + "import math\n", + "#given\n", + "BW=25*10**6 #Hz\n", + "Trd=20*10**-9 #s\n", + "#calculations\n", + "Tro=0.35/BW\n", + "Trs=(Trd**2-Tro**2)**.5\n", + "#results\n", + "print\"minimum rise time of pulse (ns) = \",round(Trs*10**9,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 6_26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandwidth of CRO (kHz) = 28.389\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-26\n", + "#calculate the bandwidth of CRO\n", + "import math\n", + "#given\n", + "Trs=17*10**-6\n", + "Trd=21*10**-6\n", + "#calculations\n", + "Tro=math.sqrt((Trd**2)-(Trs**2))\n", + "BW=0.35/Tro\n", + "#results\n", + "print\"bandwidth of CRO (kHz) = \",round(BW/1000.,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 6_53" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum rise time of pulse (ns) = 5.0\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-53\n", + "#calculate the minimum rise time\n", + "#given\n", + "SR=200.*10**6#sampling rate\n", + "#calculations\n", + "trmin=1/SR\n", + "#results\n", + "print\"minimum rise time of pulse (ns) = \",round(trmin*10**9,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 6_63" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "peak value of voltage (mV) = 5.2\n", + "RMS value of voltage (mV) = 3.677\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_3,pg 6-63\n", + "#calculate the amplitude, rms value of voltage\n", + "#from plot 1 subdivision=0.2 units\n", + "import math\n", + "#given\n", + "pp=2+3*0.2#positive peak\n", + "np=2+3*0.2#negative peak\n", + "Vd=2*10**-3#volts per division\n", + "#calculations\n", + "Nd=pp+np#no. of divisions\n", + "Vpp=Nd*Vd\n", + "Vm=Vpp/2\n", + "Vrms=Vm/math.sqrt(2)\n", + "#results\n", + "print\"peak value of voltage (mV) = \",Vm*1000\n", + "print\"RMS value of voltage (mV) = \",round(Vrms*1000,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 6_64" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RMS value of voltage (V) = 2.1213\n", + "frequency of voltage across resistor (Hz) = 250.0\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_4,pg 6-64\n", + "#calculate the RMS value of voltage and frequency across resistor\n", + "#given\n", + "import math\n", + "Vd=2.\n", + "Tb=2.*10**-3#time base\n", + "Vd=2.\n", + "Nd=3.\n", + "Hd=2#horizontal occupancy\n", + "#calculations\n", + "Vpp=Nd*Vd\n", + "Vm=Vpp/2\n", + "Vrms=Vm/math.sqrt(2)\n", + "T=Tb*Hd\n", + "f=1/T\n", + "#results\n", + "print\"RMS value of voltage (V) = \",round(Vrms,4)\n", + "print\"frequency of voltage across resistor (Hz) = \",f\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 6_67" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phase difference (deg) = 53.13\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_5,pg 6-67\n", + "#calculate the phase difference\n", + "import math\n", + "#given\n", + "y1=8.\n", + "y2=10.\n", + "#calculation\n", + "phi=math.asin(y1/y2)#phase difference\n", + "phi=phi*(180/math.pi)\n", + "#results\n", + "print\"phase difference (deg) = \",round(phi,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 6_69" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vertical signal frequency (kHz) = 2.5\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_6,pg 6-69\n", + "#calculate the vertical signal frequency\n", + "import math\n", + "#given\n", + "Nv=2.\n", + "Nh=5.\n", + "fh=1*10**3\n", + "#calculations\n", + "fv=(5./2)*fh#(fv/fh)=(Nh/Nv)=(5/2)\n", + "#results\n", + "print\"vertical signal frequency (kHz) = \",fv/1000." + ] + } + ], + "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/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 new file mode 100644 index 00000000..8ade6c6b --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter6_1.ipynb @@ -0,0 +1,296 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Oscilloscopes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 6_53" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum rise time of pulse (ns) = 14.28\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-53\n", + "#calculate the rise time\n", + "import math\n", + "#given\n", + "BW=25*10**6 #Hz\n", + "Trd=20*10**-9 #s\n", + "#calculations\n", + "Tro=0.35/BW\n", + "Trs=(Trd**2-Tro**2)**.5\n", + "#results\n", + "print\"minimum rise time of pulse (ns) = \",round(Trs*10**9,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 6_26" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bandwidth of CRO (kHz) = 28.389\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-26\n", + "#calculate the bandwidth of CRO\n", + "import math\n", + "#given\n", + "Trs=17*10**-6\n", + "Trd=21*10**-6\n", + "#calculations\n", + "Tro=math.sqrt((Trd**2)-(Trs**2))\n", + "BW=0.35/Tro\n", + "#results\n", + "print\"bandwidth of CRO (kHz) = \",round(BW/1000.,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 6_53" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum rise time of pulse (ns) = 5.0\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_2,pg 6-53\n", + "#calculate the minimum rise time\n", + "#given\n", + "SR=200.*10**6#sampling rate\n", + "#calculations\n", + "trmin=1/SR\n", + "#results\n", + "print\"minimum rise time of pulse (ns) = \",round(trmin*10**9,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 6_63" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "peak value of voltage (mV) = 5.2\n", + "RMS value of voltage (mV) = 3.677\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_3,pg 6-63\n", + "#calculate the amplitude, rms value of voltage\n", + "#from plot 1 subdivision=0.2 units\n", + "import math\n", + "#given\n", + "pp=2+3*0.2#positive peak\n", + "np=2+3*0.2#negative peak\n", + "Vd=2*10**-3#volts per division\n", + "#calculations\n", + "Nd=pp+np#no. of divisions\n", + "Vpp=Nd*Vd\n", + "Vm=Vpp/2\n", + "Vrms=Vm/math.sqrt(2)\n", + "#results\n", + "print\"peak value of voltage (mV) = \",Vm*1000\n", + "print\"RMS value of voltage (mV) = \",round(Vrms*1000,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 6_64" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RMS value of voltage (V) = 2.1213\n", + "frequency of voltage across resistor (Hz) = 250.0\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_4,pg 6-64\n", + "#calculate the RMS value of voltage and frequency across resistor\n", + "#given\n", + "import math\n", + "Vd=2.\n", + "Tb=2.*10**-3#time base\n", + "Vd=2.\n", + "Nd=3.\n", + "Hd=2#horizontal occupancy\n", + "#calculations\n", + "Vpp=Nd*Vd\n", + "Vm=Vpp/2\n", + "Vrms=Vm/math.sqrt(2)\n", + "T=Tb*Hd\n", + "f=1/T\n", + "#results\n", + "print\"RMS value of voltage (V) = \",round(Vrms,4)\n", + "print\"frequency of voltage across resistor (Hz) = \",f\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 6_67" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phase difference (deg) = 53.13\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_5,pg 6-67\n", + "#calculate the phase difference\n", + "import math\n", + "#given\n", + "y1=8.\n", + "y2=10.\n", + "#calculation\n", + "phi=math.asin(y1/y2)#phase difference\n", + "phi=phi*(180/math.pi)\n", + "#results\n", + "print\"phase difference (deg) = \",round(phi,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 6_69" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vertical signal frequency (kHz) = 2.5\n" + ] + } + ], + "source": [ + "#Chapter-6,Example6_6,pg 6-69\n", + "#calculate the vertical signal frequency\n", + "import math\n", + "#given\n", + "Nv=2.\n", + "Nh=5.\n", + "fh=1*10**3\n", + "#calculations\n", + "fv=(5./2)*fh#(fv/fh)=(Nh/Nv)=(5/2)\n", + "#results\n", + "print\"vertical signal frequency (kHz) = \",fv/1000." + ] + } + ], + "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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7.ipynb new file mode 100755 index 00000000..d9deec87 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7.ipynb @@ -0,0 +1,1352 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Basic Measuring Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 7-13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection theta (deg) = 30.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_1,pg 7-13\n", + "#calculate the deflection angle\n", + "#given\n", + "N=100.\n", + "B=0.15\n", + "A=10*8*10**-6\n", + "I=5*10**-3\n", + "K=0.2*10**-6#spring const.\n", + "#calculations\n", + "Td=N*B*A*I#deflecting torque\n", + "theta=Td/K#deflecting angle\n", + "#results\n", + "print\"deflection theta (deg) = \",theta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 7_21" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection for given current (degrees) = 144.75\n", + "inductance for given deflection (muH) = 2.53\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_2,pg 7-21\n", + "#given\n", + "#calculate the deflection\n", + "import math\n", + "from sympy import *\n", + "x=Symbol('x')\n", + "L=(12+6*x-(x**2))#x is deflection in rad from zero\n", + "dl=L.diff(x)\n", + "K=12.\n", + "I=8.\n", + "#calculations\n", + "x=6./(((2*K)/(I**2))+2)#x=((I**2)dl)/(2*k)\n", + "z=x*(180./math.pi)\n", + "y=horner(x,L)\n", + "#results\n", + "print\"deflection for given current (degrees) = \",round(z,2)\n", + "print\"inductance for given deflection (muH) = \",round(y,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 7_23" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "value of shunt resistance (ohm) = 1.351\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_3,pg 7-23\n", + "#calculate the value of shunt resistance\n", + "#given\n", + "Rm=100.\n", + "Im=2.*10**-3\n", + "I=150.*10**-3\n", + "#calculations\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "#results\n", + "print\"value of shunt resistance (ohm) = \",round(Rsh,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 7_23" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through shunt (A) = 40.0\n", + "voltage through shunt (V) = 0.5\n", + "meter resistance (ohm) = 937.5\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_4,pg 7-23\n", + "#calculate the current, voltage and meter resistance\n", + "#given\n", + "Vsh1=400.*10**-3\n", + "Rsh=0.01\n", + "Ish1=50.\n", + "Rm=750.#coil resistance\n", + "#calculations\n", + "Ish=Vsh1/Rsh\n", + "Vsh=Ish1*Rsh\n", + "Im=Vsh1/Rm\n", + "Rm1=Vsh/Im#meter resistance\n", + "#results\n", + "print\"current through shunt (A) = \",Ish\n", + "print\"voltage through shunt (V) = \",Vsh\n", + "print\"meter resistance (ohm) = \",Rm1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 7_25" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "designed multi-range ammeter\n", + "full scale deflection Im (mA) = 2.0\n", + "meter resistance Rm (ohm) = 75\n", + "R1(ohm) = 18.75\n", + "R2(ohm) = 3.125\n", + "R3(ohm) = 1.53\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_5,pg 7-25\n", + "#calculate the full scale deflection and meter resistance\n", + "#given\n", + "I1=10*10**-3\n", + "Im=2*10**-3\n", + "Rm=75\n", + "I2=50*10**-3\n", + "I3=100*10**-3\n", + "#calculations\n", + "R1=(Im*Rm)/(I1-Im)\n", + "R2=(Im*Rm)/(I2-Im)\n", + "R3=(Im*Rm)/(I3-Im)\n", + "#results\n", + "print\"designed multi-range ammeter\"\n", + "print\"full scale deflection Im (mA) = \",Im*1000.\n", + "print\"meter resistance Rm (ohm) = \",Rm\n", + "print\"R1(ohm) = \",R1\n", + "print\"R2(ohm) = \",R2\n", + "print\"R3(ohm) = \",round(R3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 7_27" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "various sections of aryton shunt are\n", + "\n", + "full scale deflection Im (mA) = 1.0\n", + "meter resistance Rm (ohm) = 50.0\n", + "R1 (ohm) = 0.005\n", + "R2 (ohm) = 0.005\n", + "R3 (ohm) = 0.03999\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_6,pg 7-27\n", + "#calculate the meter resistance and full scale deflection\n", + "#given\n", + "I1=10.\n", + "Im=1*10**-3\n", + "Rm=50.\n", + "#in position-1 R1 is in shunt with R2+R3+Rm\n", + "#R1=10**-4(R2+R3+50)......(1)\n", + "#in position-2 (R1+R2) is in shunt with R3+Rm\n", + "#R1+R2=2*10**-4(R3+50).....(2)\n", + "#in position-3 R1+R2+R3 is in shunt with Rm\n", + "#R1+R2+R3=0.05............(3)\n", + "#from.....(3)\n", + "#R1+R2=0.05-R3\n", + "#substituting in........(2)\n", + "#calculations\n", + "R3=0.04/1.0002\n", + "#R2=0.01-R1........(4)\n", + "#substituing in (1)\n", + "R1=5.00139*10**-3/1.0001\n", + "R2=0.01-R1#from........(4)\n", + "#results\n", + "print\"various sections of aryton shunt are\\n\"\n", + "print\"full scale deflection Im (mA) = \",Im*1000.\n", + "print\"meter resistance Rm (ohm) = \",Rm\n", + "print\"R1 (ohm) = \",round(R1,3)\n", + "print\"R2 (ohm) = \",round(R2,3)\n", + "print\"R3 (ohm) = \",round(R3,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 7_30" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multiplier resistance (kohm) = 249.5\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_7,pg 7-30\n", + "#calculate the multiplier resistance\n", + "#given\n", + "Rm=500.\n", + "Im=40*10**-6\n", + "V=10\n", + "#calculations\n", + "Rs=(V/Im)-Rm\n", + "#results\n", + "print\"multiplier resistance (kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 7_30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required shunt resistance (ohm) = 0.001\n", + "required multipler resistance (kohm) = 24.99\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_8,pg 7-30\n", + "#calculate the required shunt and multipler resistances\n", + "#given\n", + "Im=20*10**-3\n", + "Vm=200*10**-3\n", + "I=200\n", + "#calculations\n", + "Rm=(Vm/Im)\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "V=500.\n", + "Rs=(V/Im)-Rm\n", + "#results\n", + "print\"required shunt resistance (ohm) = \",round(Rsh,3)\n", + "print\"required multipler resistance (kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 7_33" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series string of multipliers\n", + "R1 (kohm) = 200.0\n", + "R2 (kohm) = 25.0\n", + "R3 (kohm) = 20.0\n", + "R4 (kohm) = 4.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_9,pg 7-33\n", + "#calculate the series string of multiplers\n", + "#given\n", + "Rm=50\n", + "Im=2*10**-3\n", + "#calculations\n", + "#for position V4 multipler is R4\n", + "V4=10.\n", + "R4=(V4/Im)-Rm#Rs=(V/Im)-RmV3 m\n", + "#for position V3 multipler is R3+R4\n", + "V3=50.\n", + "R3=(V3/Im)-Rm-R4\n", + "#for position V2 multiplier is R2+R3+R4\n", + "V2=100.\n", + "R2=(V2/Im)-Rm-R3-R4\n", + "#for position V1 multiplier is R1+R2+R3+R4\n", + "V1=500.\n", + "R1=(V1/Im)-Rm-R3-R4-R2\n", + "#results\n", + "print\"series string of multipliers\"\n", + "print\"R1 (kohm) = \",R1/1000.\n", + "print\"R2 (kohm) = \",R2/1000.\n", + "print\"R3 (kohm) = \",R3/1000.\n", + "print\"R4 (kohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 7_35" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series string of multipliers\n", + "R1 (ohm) = 200.0\n", + "R2 (ohm) = 25.0\n", + "R3 (ohm) = 20.0\n", + "R4 (ohm) = 4.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_10,pg 7-35\n", + "#calculate the series string of multipliers\n", + "#given\n", + "Rm=50\n", + "Im=2*10**-3\n", + "V1=500.\n", + "V2=100.\n", + "V3=50.\n", + "V4=10.\n", + "#calculations\n", + "S=1/Im#senstivity\n", + "R4=S*V4-Rm\n", + "R3=S*V3-(R4+Rm)\n", + "R2=S*V2-(R4+Rm+R3)\n", + "R1=S*V1-(R4+Rm+R3+R2)\n", + "#results\n", + "print\"series string of multipliers\"\n", + "print\"R1 (ohm) = \",R1/1000.\n", + "print\"R2 (ohm) = \",R2/1000.\n", + "print\"R3 (ohm) = \",R3/1000.\n", + "print\"R4 (ohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 7_36" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multipler resistance (Mohm) = 9.9998\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_11,pg 7-36\n", + "#calculate the multipler resistance\n", + "#given\n", + "Im=50*10**-6\n", + "Rm=200.\n", + "V=500.#V is voltage range\n", + "#calculations\n", + "S=1/Im\n", + "Rs=S*V-Rm\n", + "#results\n", + "print\"multipler resistance (Mohm) = \",round(Rs/10**6,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 7_36" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "senstivity of meter A (ohm/volt) = 260.0\n", + "senstivity of meter B (ohm/volt) = 151.0\n", + "Meter A is more sensitive than meter B\n" + ] + } + ], + "source": [ + "#calculate the senstivity of meters A and B\n", + "#Chapter-7,Example7_12,pg 7-36\n", + "#given\n", + "#for meter A\n", + "Rs=25.*10**3\n", + "Rm=1.*10**3\n", + "V=100.\n", + "#calculations\n", + "S=(Rs+Rm)/V\n", + "#for meter B\n", + "Rs=150.*10**3\n", + "Rm=1.*10**3\n", + "V=1000.\n", + "S2=(Rs+Rm)/V\n", + "#results\n", + "print\"senstivity of meter A (ohm/volt) = \",S\n", + "print\"senstivity of meter B (ohm/volt) = \",S2\n", + "print 'Meter A is more sensitive than meter B'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 7-37" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "first voltmeter reading (V) = 120.97\n", + "second voltmeter reading (V) = 137.87\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_13,pg 7-37\n", + "#calculate the voltmeter readings\n", + "#given\n", + "R1=20.*10**3\n", + "R2=25.*10**3\n", + "V=250#voltage supply\n", + "#calculations and results\n", + "VR2=R2*V/(R1+R2)#voltage across R2\n", + "#case-1\n", + "S=500\n", + "Vr=150#voltage range of resistor\n", + "Rv=S*Vr\n", + "Req=R2*Rv/(R2+Rv)\n", + "VReq=Req*V/(Req+R1)#voltage across Req\n", + "print\"first voltmeter reading (V) = \",round(VReq,2)\n", + "#case-2\n", + "S=10*10**3\n", + "Rv=S*Vr\n", + "Req=R2*Rv/(R2+Rv)\n", + "VReq=Req*V/(Req+R1)\n", + "print\"second voltmeter reading (V) = \",round(VReq,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 7_38" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true voltage (V) = 4.167\n", + "voltmeter reading case-1 (V) = 3.571\n", + "percentage error (percent) = 14.3\n", + "percentage accuracy = 85.7\n", + "voltmeter reading case-2 (V) = 4.132\n", + "percentage error (percent) = 0.83\n", + "percentage accuracy = 99.17\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_14,pg 7-38\n", + "#calculate the voltmeter reading case and percentage error,accuracy\n", + "#given\n", + "Rb=1.*10**3\n", + "Ra=5.*10**3\n", + "V=25.\n", + "#calculations and results\n", + "VRb=Rb*V/(Ra+Rb)#voltage across Rb\n", + "Vr=5.\n", + "#case-1\n", + "S=1.*10**3\n", + "Rv=S*Vr\n", + "Req=Rb*Rv/(Rb+Rv)\n", + "VReq=Req*V/(Req+Ra)\n", + "err=(VRb-VReq)*100/VRb\n", + "acc=100-err\n", + "print \"true voltage (V) = \",round(VRb,3)\n", + "print\"voltmeter reading case-1 (V) = \",round(VReq,3)\n", + "print\"percentage error (percent) = \",round(err,1)\n", + "print\"percentage accuracy = \",round(acc,1)\n", + "#case-2\n", + "S=20*10**3\n", + "Rv=S*Vr\n", + "Req=Rb*Rv/(Rb+Rv)\n", + "VReq=Req*V/(Req+Ra)\n", + "err=(VRb-VReq)*100/VRb\n", + "acc=100-err\n", + "print\"voltmeter reading case-2 (V) = \",round(VReq,3)\n", + "print\"percentage error (percent) = \",round(err,2)\n", + "print\"percentage accuracy = \",round(acc,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 7_41" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shunt resistance for I=10A (ohm) = 0.1002\n", + "shunt resistance for I=20A (ohm) = 0.05\n", + "series resistance for V=150V (kohm) = 7.45\n", + "series resistance for V=300V (kohm) = 14.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_15,pg 7-41\n", + "#calculate the shunt and series resistances\n", + "#given\n", + "Rm=50.\n", + "Im=20.*10**-3\n", + "I=10.\n", + "#calculatiosn and results\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "print\"shunt resistance for I=10A (ohm) = \",round(Rsh,4)\n", + "\n", + "I=20\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "print\"shunt resistance for I=20A (ohm) = \",round(Rsh,2)\n", + "\n", + "V=150\n", + "Rs=(V/Im)-Rm\n", + "print\"series resistance for V=150V (kohm) = \",round(Rs/1000.,2)\n", + "\n", + "V=300\n", + "Rs=(V/Im)-Rm\n", + "print\"series resistance for V=300V (kohm) = \",round(Rs/1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 7_42" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shunt current (A) = 25.0\n", + "resistance for Ish=10A (ohm) = 400.0\n", + "resistance for Ish=75A (ohm) = 3000.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_16,pg 7-42\n", + "#calculate the shunt current,resistance\n", + "#given\n", + "Rsh=0.02\n", + "R=1000.\n", + "Vm=500.*10**-3\n", + "#calculations and results\n", + "Im=Vm/R\n", + "Ish=Vm/Rsh\n", + "print\"shunt current (A) = \",Ish\n", + "Ish1=10.\n", + "V=Ish1*Rsh\n", + "R=V/Im\n", + "print\"resistance for Ish=10A (ohm) = \",R\n", + "Ish2=75.\n", + "V=Ish2*Rsh\n", + "R=V/Im\n", + "print\"resistance for Ish=75A (ohm) = \",R" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 7_50" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final inductance (muH) = 4.0528\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_17,pg 7-50\n", + "#calculate the final inductance\n", + "#given\n", + "import math\n", + "K=5.73*10**-6\n", + "I=20.\n", + "theta=110*(math.pi/180)#full scale deflection\n", + "L=4*10**-6\n", + "#calculations\n", + "dtheta=theta#change in theta\n", + "dm=(theta*K/(I**2))*dtheta#change in inductance\n", + "Lf=L+dm\n", + "#results\n", + "print\"final inductance (muH) = \",round(Lf*10**6,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 7_50" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflecting torque (muNm) = 0.48296\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_18,pg 7-50\n", + "#calculate the deflecting torque\n", + "import math\n", + "#given\n", + "I=10*10**-3\n", + "x=30#deflection\n", + "#calculations\n", + "dM=5*math.sin((x+45)*(math.pi/180))*10**-3#diffrentiate M w.r.t x\n", + "Td=(I**2)*dM#deflecting torque\n", + "#results\n", + "print\"deflecting torque (muNm) = \",round(Td*10**6,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 7_51" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in readings Vdc=100V (V) = 1.2718\n", + "difference in readings Vdc=50V (V) = 0.6132\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_19,pg 7-51\n", + "#calculate the difference in readings\n", + "import cmath\n", + "import math\n", + "#given\n", + "I=100*10**-3\n", + "Td=0.8*10**-4\n", + "dtheta=90*math.pi/180#in radians\n", + "theta=90#deflection\n", + "#calculations\n", + "dM=Td*dtheta/(I**2)\n", + "Mo=0.5#original M\n", + "M=Mo+dM#total M\n", + "#case-1 \n", + "Vdc=100\n", + "R=Vdc/I\n", + "w=2*math.pi*50\n", + "Z=R+(1j*w*M)\n", + "Z=abs(Z)\n", + "Vac=R*Vdc/Z\n", + "dif=Vdc-Vac#difference between readings\n", + "#case-2\n", + "Vdc1=50\n", + "I1=Vdc1/R\n", + "theta1=theta*((I1/I)**2)#theta=kI**2\n", + "theta1=theta1*math.pi/180#in radians\n", + "dM1=Td*theta1/(I**2)\n", + "M1=dM1+Mo\n", + "Z1=R+(1j*w*M1)\n", + "Z1=abs(Z1)\n", + "Vac1=R*Vdc1/Z1\n", + "dif1=Vdc1-Vac1\n", + "#results\n", + "print\"difference in readings Vdc=100V (V) = \",round(dif,4)\n", + "print\"difference in readings Vdc=50V (V) = \",round(dif1,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 7_65" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error = -2.174\n", + "negative sign shows that meter is slow and ErEt\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_21,pg 7-65\n", + "#calculate the percentage error\n", + "#given\n", + "K=1800.\n", + "V=230.\n", + "I=10.\n", + "Pf=1.#half load\n", + "Ihl=I/2.#half load current\n", + "t=138.\n", + "#calculations\n", + "Et=V*Ihl*Pf*t\n", + "Et=Et/(3600*10**3)\n", + "N=80#no. of revolutions\n", + "Er=N/K#in kWh\n", + "err=(Er-Et)/Et\n", + "err=err*100\n", + "#results\n", + "print\"percentage error = \",round(err,3)\n", + "print\"positive sign shows that meter is fast and Er>Et\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 7_66" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter constant (rev/kWh) = 400.0\n", + "power factor (lagging) = 0.8\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_22,pg 7-66\n", + "#calculate the meter constant and power factor\n", + "#given\n", + "V=230.\n", + "I=4.\n", + "t=6.\n", + "Pf=1.\n", + "N=2208.\n", + "#calculations\n", + "Et=V*I*Pf*t\n", + "K=N/Et\n", + "V=230\n", + "I=5\n", + "t=4\n", + "N=1472\n", + "Et=V*I*Pf*t\n", + "Er=N/K\n", + "Pf=(Er/Et)\n", + "#results\n", + "print\"meter constant (rev/kWh) = \",K*1000\n", + "print\"power factor (lagging) = \",Pf\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 7_66" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of disc (rpm) = 60.04\n", + "percentage error = 0.77\n", + "Er>Et meter is fast\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_23,pg 7-66\n", + "#calculate the speed of disc and percentage error\n", + "#given\n", + "I=5.\n", + "V=220.\n", + "Pf=1.\n", + "K=3275.\n", + "t=1/60.#in hr\n", + "#calculations\n", + "E=V*I*Pf*t\n", + "E=E/10**3#in kWh\n", + "Rev=E*K#no. of revolutions\n", + "#at half load\n", + "I=I/2\n", + "t=59.5\n", + "Et=V*I*Pf*t\n", + "Et=Et/(3600*10**3)#in kWh\n", + "N=30\n", + "Er=N/K\n", + "err=(Er-Et)/Et\n", + "err=err*100.\n", + "print\"speed of disc (rpm) = \",round(Rev,2)\n", + "print\"percentage error = \",round(err,2)\n", + "print\"Er>Et meter is fast\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 7_67" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "in case 1, percentage error in case-1 = -0.2436\n", + "speed of disc (rpm) = 19.2\n", + "in case 2, percentage error in case-2 = -12.326\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_24,pg 7-67\n", + "#calculate the speed and percentage error\n", + "import math\n", + "from math import cos,sin\n", + "#given\n", + "V=240.\n", + "I=10.\n", + "Pf=0.8\n", + "t=1/60.\n", + "K=600.\n", + "#calculations\n", + "E=V*I*Pf*t\n", + "E=E/10**3#in kWh\n", + "Rev=E*K#no. of revolutions \n", + "dela=90#for correct lag adjustment\n", + "dela1=86*math.pi/180#given in radian\n", + "phi=0#case-1 unity power factor\n", + "err=(sin(dela1-phi)-cos(phi))/cos(phi)\n", + "err=err*100\n", + "print\"in case 1, percentage error in case-1 = \",round(err,4)\n", + "Pf=0.5#case-2\n", + "phi=60*math.pi/180#in radians\n", + "err=(sin(dela1-phi)-cos(phi))/cos(phi)\n", + "err=err*100\n", + "print\"speed of disc (rpm) = \",Rev\n", + "print\"in case 2, percentage error in case-2 = \",round(err,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 7_67" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error upperlimt = 0.07\n", + "percentage error lowerlimt = 0.331\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_25,pg 7-67\n", + "#calculate the percentage error upperlimt and lowerlimt\n", + "#given\n", + "V=240.\n", + "I=5.\n", + "K=1200.\n", + "N=40.\n", + "t=99.8\n", + "Td=500#total divisions\n", + "#calculations\n", + "Er=N/K\n", + "W=V*I\n", + "div=K/Td#1 division\n", + "We=0.1*div#wattmeter error\n", + "Ce=0.05*K/100#construction wattmeter error\n", + "Te=We+Ce#total error\n", + "Wru=K+Te\n", + "Wrl=K-Te#wattmeter reading limits\n", + "He=0.05#human error\n", + "Se=0.01#stopwatch error\n", + "Tte=He+Se#total timing error\n", + "Sru=t+Tte#stopwatch reading limits\n", + "Srl=t-Tte\n", + "Eu=Wru*Sru*1/(3600*10**3)#energy obtained limits\n", + "El=Wrl*Srl*1/(3600*10**3)\n", + "errl=(Er-El)/El\n", + "errl=errl*100\n", + "erru=(Er-Eu)/Eu#error limits\n", + "erru=erru*100\n", + "#results\n", + "print\"percentage error upperlimt = \",round(erru,3)\n", + "print\"percentage error lowerlimt = \",round(errl,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 7_79" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "line current (A) = 135.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_26,pg 7-79\n", + "#calculate the line current\n", + "#given\n", + "I1=250.\n", + "I2=5.\n", + "#calculations\n", + "I=I1/I2\n", + "#as ammeter is in secondary I2=2.7\n", + "I1=I*2.7#line current\n", + "#results\n", + "print\"line current (A) = \",I1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 7_82" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "line voltage (V) = 8750.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_27,pg 7-82\n", + "#calculate the line voltage\n", + "#given\n", + "V1=11000.\n", + "V2=110.\n", + "#calculations\n", + "V=V1/V2\n", + "V2=87.5\n", + "V1=87.5*V#line voltage\n", + "#results\n", + "print\"line voltage (V) = \",V1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 7_88" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage ratio error = -3.66\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_28,pg 7-88\n", + "#calculate the percentage ratio error\n", + "#given\n", + "Im=120.\n", + "Ic=38.\n", + "Kn=1000./5 #at full load\n", + "Is=5.\n", + "Ns=1000.\n", + "Np=5.\n", + "#calculations\n", + "n=Ns/Np#turns ratio\n", + "R=n+(Ic/Is)\n", + "err=(Kn-R)/R#ratio error\n", + "err=err*100.\n", + "#results\n", + "print\"percentage ratio error = \",round(err,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 7_88" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage ratio error = -3.734\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_29,pg 7-88\n", + "#calculate the percentage ratio error\n", + "#given\n", + "import math\n", + "Im=90.\n", + "Ic=40.\n", + "delta=28*(math.pi/180)#in radians\n", + "Is=5.\n", + "Ns=400.\n", + "Np=1.\n", + "#calculations\n", + "n=Ns/Np\n", + "Kn=n\n", + "R=n+((Im*math.sin(delta)+Ic*math.cos(delta))/Is)\n", + "Ip=R*Is#actual primary current\n", + "err=(Kn-R)/R\n", + "err=err*100\n", + "#results\n", + "print\"percentage ratio error = \",round(err,3)\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/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 new file mode 100644 index 00000000..3791b320 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter7_1.ipynb @@ -0,0 +1,1352 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Basic Measuring Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 7-13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection theta (deg) = 30.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_1,pg 7-13\n", + "#calculate the deflection angle\n", + "#given\n", + "N=100.\n", + "B=0.15\n", + "A=10*8*10**-6\n", + "I=5*10**-3\n", + "K=0.2*10**-6#spring const.\n", + "#calculations\n", + "Td=N*B*A*I#deflecting torque\n", + "theta=Td/K#deflecting angle\n", + "#results\n", + "print\"deflection theta (deg) = \",theta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 7_21" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection for given current (degrees) = 144.75\n", + "inductance for given deflection (muH) = 2.53\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_2,pg 7-21\n", + "#given\n", + "#calculate the deflection\n", + "import math,sympy\n", + "from sympy import Symbol,horner\n", + "x=Symbol('x')\n", + "L=(12+6*x-(x**2))#x is deflection in rad from zero\n", + "dl=L.diff(x)\n", + "K=12.\n", + "I=8.\n", + "#calculations\n", + "x=6./(((2*K)/(I**2))+2)#x=((I**2)dl)/(2*k)\n", + "z=x*(180./math.pi)\n", + "y=horner(x,L)\n", + "#results\n", + "print\"deflection for given current (degrees) = \",round(z,2)\n", + "print\"inductance for given deflection (muH) = \",round(y,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 7_23" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "value of shunt resistance (ohm) = 1.351\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_3,pg 7-23\n", + "#calculate the value of shunt resistance\n", + "#given\n", + "Rm=100.\n", + "Im=2.*10**-3\n", + "I=150.*10**-3\n", + "#calculations\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "#results\n", + "print\"value of shunt resistance (ohm) = \",round(Rsh,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 7_23" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through shunt (A) = 40.0\n", + "voltage through shunt (V) = 0.5\n", + "meter resistance (ohm) = 937.5\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_4,pg 7-23\n", + "#calculate the current, voltage and meter resistance\n", + "#given\n", + "Vsh1=400.*10**-3\n", + "Rsh=0.01\n", + "Ish1=50.\n", + "Rm=750.#coil resistance\n", + "#calculations\n", + "Ish=Vsh1/Rsh\n", + "Vsh=Ish1*Rsh\n", + "Im=Vsh1/Rm\n", + "Rm1=Vsh/Im#meter resistance\n", + "#results\n", + "print\"current through shunt (A) = \",Ish\n", + "print\"voltage through shunt (V) = \",Vsh\n", + "print\"meter resistance (ohm) = \",Rm1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 7_25" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "designed multi-range ammeter\n", + "full scale deflection Im (mA) = 2.0\n", + "meter resistance Rm (ohm) = 75\n", + "R1(ohm) = 18.75\n", + "R2(ohm) = 3.125\n", + "R3(ohm) = 1.53\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_5,pg 7-25\n", + "#calculate the full scale deflection and meter resistance\n", + "#given\n", + "I1=10*10**-3\n", + "Im=2*10**-3\n", + "Rm=75\n", + "I2=50*10**-3\n", + "I3=100*10**-3\n", + "#calculations\n", + "R1=(Im*Rm)/(I1-Im)\n", + "R2=(Im*Rm)/(I2-Im)\n", + "R3=(Im*Rm)/(I3-Im)\n", + "#results\n", + "print\"designed multi-range ammeter\"\n", + "print\"full scale deflection Im (mA) = \",Im*1000.\n", + "print\"meter resistance Rm (ohm) = \",Rm\n", + "print\"R1(ohm) = \",R1\n", + "print\"R2(ohm) = \",R2\n", + "print\"R3(ohm) = \",round(R3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 7_27" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "various sections of aryton shunt are\n", + "\n", + "full scale deflection Im (mA) = 1.0\n", + "meter resistance Rm (ohm) = 50.0\n", + "R1 (ohm) = 0.005\n", + "R2 (ohm) = 0.005\n", + "R3 (ohm) = 0.03999\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_6,pg 7-27\n", + "#calculate the meter resistance and full scale deflection\n", + "#given\n", + "I1=10.\n", + "Im=1*10**-3\n", + "Rm=50.\n", + "#in position-1 R1 is in shunt with R2+R3+Rm\n", + "#R1=10**-4(R2+R3+50)......(1)\n", + "#in position-2 (R1+R2) is in shunt with R3+Rm\n", + "#R1+R2=2*10**-4(R3+50).....(2)\n", + "#in position-3 R1+R2+R3 is in shunt with Rm\n", + "#R1+R2+R3=0.05............(3)\n", + "#from.....(3)\n", + "#R1+R2=0.05-R3\n", + "#substituting in........(2)\n", + "#calculations\n", + "R3=0.04/1.0002\n", + "#R2=0.01-R1........(4)\n", + "#substituing in (1)\n", + "R1=5.00139*10**-3/1.0001\n", + "R2=0.01-R1#from........(4)\n", + "#results\n", + "print\"various sections of aryton shunt are\\n\"\n", + "print\"full scale deflection Im (mA) = \",Im*1000.\n", + "print\"meter resistance Rm (ohm) = \",Rm\n", + "print\"R1 (ohm) = \",round(R1,3)\n", + "print\"R2 (ohm) = \",round(R2,3)\n", + "print\"R3 (ohm) = \",round(R3,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 7_30" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multiplier resistance (kohm) = 249.5\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_7,pg 7-30\n", + "#calculate the multiplier resistance\n", + "#given\n", + "Rm=500.\n", + "Im=40*10**-6\n", + "V=10\n", + "#calculations\n", + "Rs=(V/Im)-Rm\n", + "#results\n", + "print\"multiplier resistance (kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 7_30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required shunt resistance (ohm) = 0.001\n", + "required multipler resistance (kohm) = 24.99\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_8,pg 7-30\n", + "#calculate the required shunt and multipler resistances\n", + "#given\n", + "Im=20*10**-3\n", + "Vm=200*10**-3\n", + "I=200\n", + "#calculations\n", + "Rm=(Vm/Im)\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "V=500.\n", + "Rs=(V/Im)-Rm\n", + "#results\n", + "print\"required shunt resistance (ohm) = \",round(Rsh,3)\n", + "print\"required multipler resistance (kohm) = \",Rs/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 7_33" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series string of multipliers\n", + "R1 (kohm) = 200.0\n", + "R2 (kohm) = 25.0\n", + "R3 (kohm) = 20.0\n", + "R4 (kohm) = 4.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_9,pg 7-33\n", + "#calculate the series string of multiplers\n", + "#given\n", + "Rm=50\n", + "Im=2*10**-3\n", + "#calculations\n", + "#for position V4 multipler is R4\n", + "V4=10.\n", + "R4=(V4/Im)-Rm#Rs=(V/Im)-RmV3 m\n", + "#for position V3 multipler is R3+R4\n", + "V3=50.\n", + "R3=(V3/Im)-Rm-R4\n", + "#for position V2 multiplier is R2+R3+R4\n", + "V2=100.\n", + "R2=(V2/Im)-Rm-R3-R4\n", + "#for position V1 multiplier is R1+R2+R3+R4\n", + "V1=500.\n", + "R1=(V1/Im)-Rm-R3-R4-R2\n", + "#results\n", + "print\"series string of multipliers\"\n", + "print\"R1 (kohm) = \",R1/1000.\n", + "print\"R2 (kohm) = \",R2/1000.\n", + "print\"R3 (kohm) = \",R3/1000.\n", + "print\"R4 (kohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 7_35" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series string of multipliers\n", + "R1 (ohm) = 200.0\n", + "R2 (ohm) = 25.0\n", + "R3 (ohm) = 20.0\n", + "R4 (ohm) = 4.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_10,pg 7-35\n", + "#calculate the series string of multipliers\n", + "#given\n", + "Rm=50\n", + "Im=2*10**-3\n", + "V1=500.\n", + "V2=100.\n", + "V3=50.\n", + "V4=10.\n", + "#calculations\n", + "S=1/Im#senstivity\n", + "R4=S*V4-Rm\n", + "R3=S*V3-(R4+Rm)\n", + "R2=S*V2-(R4+Rm+R3)\n", + "R1=S*V1-(R4+Rm+R3+R2)\n", + "#results\n", + "print\"series string of multipliers\"\n", + "print\"R1 (ohm) = \",R1/1000.\n", + "print\"R2 (ohm) = \",R2/1000.\n", + "print\"R3 (ohm) = \",R3/1000.\n", + "print\"R4 (ohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 7_36" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multipler resistance (Mohm) = 9.9998\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_11,pg 7-36\n", + "#calculate the multipler resistance\n", + "#given\n", + "Im=50*10**-6\n", + "Rm=200.\n", + "V=500.#V is voltage range\n", + "#calculations\n", + "S=1/Im\n", + "Rs=S*V-Rm\n", + "#results\n", + "print\"multipler resistance (Mohm) = \",round(Rs/10**6,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 7_36" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "senstivity of meter A (ohm/volt) = 260.0\n", + "senstivity of meter B (ohm/volt) = 151.0\n", + "Meter A is more sensitive than meter B\n" + ] + } + ], + "source": [ + "#calculate the senstivity of meters A and B\n", + "#Chapter-7,Example7_12,pg 7-36\n", + "#given\n", + "#for meter A\n", + "Rs=25.*10**3\n", + "Rm=1.*10**3\n", + "V=100.\n", + "#calculations\n", + "S=(Rs+Rm)/V\n", + "#for meter B\n", + "Rs=150.*10**3\n", + "Rm=1.*10**3\n", + "V=1000.\n", + "S2=(Rs+Rm)/V\n", + "#results\n", + "print\"senstivity of meter A (ohm/volt) = \",S\n", + "print\"senstivity of meter B (ohm/volt) = \",S2\n", + "print 'Meter A is more sensitive than meter B'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 7-37" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "first voltmeter reading (V) = 120.97\n", + "second voltmeter reading (V) = 137.87\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_13,pg 7-37\n", + "#calculate the voltmeter readings\n", + "#given\n", + "R1=20.*10**3\n", + "R2=25.*10**3\n", + "V=250#voltage supply\n", + "#calculations and results\n", + "VR2=R2*V/(R1+R2)#voltage across R2\n", + "#case-1\n", + "S=500\n", + "Vr=150#voltage range of resistor\n", + "Rv=S*Vr\n", + "Req=R2*Rv/(R2+Rv)\n", + "VReq=Req*V/(Req+R1)#voltage across Req\n", + "print\"first voltmeter reading (V) = \",round(VReq,2)\n", + "#case-2\n", + "S=10*10**3\n", + "Rv=S*Vr\n", + "Req=R2*Rv/(R2+Rv)\n", + "VReq=Req*V/(Req+R1)\n", + "print\"second voltmeter reading (V) = \",round(VReq,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 7_38" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true voltage (V) = 4.167\n", + "voltmeter reading case-1 (V) = 3.571\n", + "percentage error (percent) = 14.3\n", + "percentage accuracy = 85.7\n", + "voltmeter reading case-2 (V) = 4.132\n", + "percentage error (percent) = 0.83\n", + "percentage accuracy = 99.17\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_14,pg 7-38\n", + "#calculate the voltmeter reading case and percentage error,accuracy\n", + "#given\n", + "Rb=1.*10**3\n", + "Ra=5.*10**3\n", + "V=25.\n", + "#calculations and results\n", + "VRb=Rb*V/(Ra+Rb)#voltage across Rb\n", + "Vr=5.\n", + "#case-1\n", + "S=1.*10**3\n", + "Rv=S*Vr\n", + "Req=Rb*Rv/(Rb+Rv)\n", + "VReq=Req*V/(Req+Ra)\n", + "err=(VRb-VReq)*100/VRb\n", + "acc=100-err\n", + "print \"true voltage (V) = \",round(VRb,3)\n", + "print\"voltmeter reading case-1 (V) = \",round(VReq,3)\n", + "print\"percentage error (percent) = \",round(err,1)\n", + "print\"percentage accuracy = \",round(acc,1)\n", + "#case-2\n", + "S=20*10**3\n", + "Rv=S*Vr\n", + "Req=Rb*Rv/(Rb+Rv)\n", + "VReq=Req*V/(Req+Ra)\n", + "err=(VRb-VReq)*100/VRb\n", + "acc=100-err\n", + "print\"voltmeter reading case-2 (V) = \",round(VReq,3)\n", + "print\"percentage error (percent) = \",round(err,2)\n", + "print\"percentage accuracy = \",round(acc,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 7_41" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shunt resistance for I=10A (ohm) = 0.1002\n", + "shunt resistance for I=20A (ohm) = 0.05\n", + "series resistance for V=150V (kohm) = 7.45\n", + "series resistance for V=300V (kohm) = 14.95\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_15,pg 7-41\n", + "#calculate the shunt and series resistances\n", + "#given\n", + "Rm=50.\n", + "Im=20.*10**-3\n", + "I=10.\n", + "#calculatiosn and results\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "print\"shunt resistance for I=10A (ohm) = \",round(Rsh,4)\n", + "\n", + "I=20\n", + "Rsh=(Im*Rm)/(I-Im)\n", + "print\"shunt resistance for I=20A (ohm) = \",round(Rsh,2)\n", + "\n", + "V=150\n", + "Rs=(V/Im)-Rm\n", + "print\"series resistance for V=150V (kohm) = \",round(Rs/1000.,2)\n", + "\n", + "V=300\n", + "Rs=(V/Im)-Rm\n", + "print\"series resistance for V=300V (kohm) = \",round(Rs/1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 7_42" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "shunt current (A) = 25.0\n", + "resistance for Ish=10A (ohm) = 400.0\n", + "resistance for Ish=75A (ohm) = 3000.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_16,pg 7-42\n", + "#calculate the shunt current,resistance\n", + "#given\n", + "Rsh=0.02\n", + "R=1000.\n", + "Vm=500.*10**-3\n", + "#calculations and results\n", + "Im=Vm/R\n", + "Ish=Vm/Rsh\n", + "print\"shunt current (A) = \",Ish\n", + "Ish1=10.\n", + "V=Ish1*Rsh\n", + "R=V/Im\n", + "print\"resistance for Ish=10A (ohm) = \",R\n", + "Ish2=75.\n", + "V=Ish2*Rsh\n", + "R=V/Im\n", + "print\"resistance for Ish=75A (ohm) = \",R" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 7_50" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final inductance (muH) = 4.0528\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_17,pg 7-50\n", + "#calculate the final inductance\n", + "#given\n", + "import math\n", + "K=5.73*10**-6\n", + "I=20.\n", + "theta=110*(math.pi/180)#full scale deflection\n", + "L=4*10**-6\n", + "#calculations\n", + "dtheta=theta#change in theta\n", + "dm=(theta*K/(I**2))*dtheta#change in inductance\n", + "Lf=L+dm\n", + "#results\n", + "print\"final inductance (muH) = \",round(Lf*10**6,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 7_50" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflecting torque (muNm) = 0.48296\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_18,pg 7-50\n", + "#calculate the deflecting torque\n", + "import math\n", + "#given\n", + "I=10*10**-3\n", + "x=30#deflection\n", + "#calculations\n", + "dM=5*math.sin((x+45)*(math.pi/180))*10**-3#diffrentiate M w.r.t x\n", + "Td=(I**2)*dM#deflecting torque\n", + "#results\n", + "print\"deflecting torque (muNm) = \",round(Td*10**6,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 7_51" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in readings Vdc=100V (V) = 1.2718\n", + "difference in readings Vdc=50V (V) = 0.6132\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_19,pg 7-51\n", + "#calculate the difference in readings\n", + "import cmath\n", + "import math\n", + "#given\n", + "I=100*10**-3\n", + "Td=0.8*10**-4\n", + "dtheta=90*math.pi/180#in radians\n", + "theta=90#deflection\n", + "#calculations\n", + "dM=Td*dtheta/(I**2)\n", + "Mo=0.5#original M\n", + "M=Mo+dM#total M\n", + "#case-1 \n", + "Vdc=100\n", + "R=Vdc/I\n", + "w=2*math.pi*50\n", + "Z=R+(1j*w*M)\n", + "Z=abs(Z)\n", + "Vac=R*Vdc/Z\n", + "dif=Vdc-Vac#difference between readings\n", + "#case-2\n", + "Vdc1=50\n", + "I1=Vdc1/R\n", + "theta1=theta*((I1/I)**2)#theta=kI**2\n", + "theta1=theta1*math.pi/180#in radians\n", + "dM1=Td*theta1/(I**2)\n", + "M1=dM1+Mo\n", + "Z1=R+(1j*w*M1)\n", + "Z1=abs(Z1)\n", + "Vac1=R*Vdc1/Z1\n", + "dif1=Vdc1-Vac1\n", + "#results\n", + "print\"difference in readings Vdc=100V (V) = \",round(dif,4)\n", + "print\"difference in readings Vdc=50V (V) = \",round(dif1,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 7_65" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error = -2.174\n", + "negative sign shows that meter is slow and ErEt\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_21,pg 7-65\n", + "#calculate the percentage error\n", + "#given\n", + "K=1800.\n", + "V=230.\n", + "I=10.\n", + "Pf=1.#half load\n", + "Ihl=I/2.#half load current\n", + "t=138.\n", + "#calculations\n", + "Et=V*Ihl*Pf*t\n", + "Et=Et/(3600*10**3)\n", + "N=80#no. of revolutions\n", + "Er=N/K#in kWh\n", + "err=(Er-Et)/Et\n", + "err=err*100\n", + "#results\n", + "print\"percentage error = \",round(err,3)\n", + "print\"positive sign shows that meter is fast and Er>Et\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 7_66" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "meter constant (rev/kWh) = 400.0\n", + "power factor (lagging) = 0.8\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_22,pg 7-66\n", + "#calculate the meter constant and power factor\n", + "#given\n", + "V=230.\n", + "I=4.\n", + "t=6.\n", + "Pf=1.\n", + "N=2208.\n", + "#calculations\n", + "Et=V*I*Pf*t\n", + "K=N/Et\n", + "V=230\n", + "I=5\n", + "t=4\n", + "N=1472\n", + "Et=V*I*Pf*t\n", + "Er=N/K\n", + "Pf=(Er/Et)\n", + "#results\n", + "print\"meter constant (rev/kWh) = \",K*1000\n", + "print\"power factor (lagging) = \",Pf\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 7_66" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of disc (rpm) = 60.04\n", + "percentage error = 0.77\n", + "Er>Et meter is fast\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_23,pg 7-66\n", + "#calculate the speed of disc and percentage error\n", + "#given\n", + "I=5.\n", + "V=220.\n", + "Pf=1.\n", + "K=3275.\n", + "t=1/60.#in hr\n", + "#calculations\n", + "E=V*I*Pf*t\n", + "E=E/10**3#in kWh\n", + "Rev=E*K#no. of revolutions\n", + "#at half load\n", + "I=I/2\n", + "t=59.5\n", + "Et=V*I*Pf*t\n", + "Et=Et/(3600*10**3)#in kWh\n", + "N=30\n", + "Er=N/K\n", + "err=(Er-Et)/Et\n", + "err=err*100.\n", + "print\"speed of disc (rpm) = \",round(Rev,2)\n", + "print\"percentage error = \",round(err,2)\n", + "print\"Er>Et meter is fast\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 7_67" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "in case 1, percentage error in case-1 = -0.2436\n", + "speed of disc (rpm) = 19.2\n", + "in case 2, percentage error in case-2 = -12.326\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_24,pg 7-67\n", + "#calculate the speed and percentage error\n", + "import math\n", + "from math import cos,sin\n", + "#given\n", + "V=240.\n", + "I=10.\n", + "Pf=0.8\n", + "t=1/60.\n", + "K=600.\n", + "#calculations\n", + "E=V*I*Pf*t\n", + "E=E/10**3#in kWh\n", + "Rev=E*K#no. of revolutions \n", + "dela=90#for correct lag adjustment\n", + "dela1=86*math.pi/180#given in radian\n", + "phi=0#case-1 unity power factor\n", + "err=(sin(dela1-phi)-cos(phi))/cos(phi)\n", + "err=err*100\n", + "print\"in case 1, percentage error in case-1 = \",round(err,4)\n", + "Pf=0.5#case-2\n", + "phi=60*math.pi/180#in radians\n", + "err=(sin(dela1-phi)-cos(phi))/cos(phi)\n", + "err=err*100\n", + "print\"speed of disc (rpm) = \",Rev\n", + "print\"in case 2, percentage error in case-2 = \",round(err,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 7_67" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage error upperlimt = 0.07\n", + "percentage error lowerlimt = 0.331\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_25,pg 7-67\n", + "#calculate the percentage error upperlimt and lowerlimt\n", + "#given\n", + "V=240.\n", + "I=5.\n", + "K=1200.\n", + "N=40.\n", + "t=99.8\n", + "Td=500#total divisions\n", + "#calculations\n", + "Er=N/K\n", + "W=V*I\n", + "div=K/Td#1 division\n", + "We=0.1*div#wattmeter error\n", + "Ce=0.05*K/100#construction wattmeter error\n", + "Te=We+Ce#total error\n", + "Wru=K+Te\n", + "Wrl=K-Te#wattmeter reading limits\n", + "He=0.05#human error\n", + "Se=0.01#stopwatch error\n", + "Tte=He+Se#total timing error\n", + "Sru=t+Tte#stopwatch reading limits\n", + "Srl=t-Tte\n", + "Eu=Wru*Sru*1/(3600*10**3)#energy obtained limits\n", + "El=Wrl*Srl*1/(3600*10**3)\n", + "errl=(Er-El)/El\n", + "errl=errl*100\n", + "erru=(Er-Eu)/Eu#error limits\n", + "erru=erru*100\n", + "#results\n", + "print\"percentage error upperlimt = \",round(erru,3)\n", + "print\"percentage error lowerlimt = \",round(errl,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 7_79" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "line current (A) = 135.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_26,pg 7-79\n", + "#calculate the line current\n", + "#given\n", + "I1=250.\n", + "I2=5.\n", + "#calculations\n", + "I=I1/I2\n", + "#as ammeter is in secondary I2=2.7\n", + "I1=I*2.7#line current\n", + "#results\n", + "print\"line current (A) = \",I1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 7_82" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "line voltage (V) = 8750.0\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_27,pg 7-82\n", + "#calculate the line voltage\n", + "#given\n", + "V1=11000.\n", + "V2=110.\n", + "#calculations\n", + "V=V1/V2\n", + "V2=87.5\n", + "V1=87.5*V#line voltage\n", + "#results\n", + "print\"line voltage (V) = \",V1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 7_88" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage ratio error = -3.66\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_28,pg 7-88\n", + "#calculate the percentage ratio error\n", + "#given\n", + "Im=120.\n", + "Ic=38.\n", + "Kn=1000./5 #at full load\n", + "Is=5.\n", + "Ns=1000.\n", + "Np=5.\n", + "#calculations\n", + "n=Ns/Np#turns ratio\n", + "R=n+(Ic/Is)\n", + "err=(Kn-R)/R#ratio error\n", + "err=err*100.\n", + "#results\n", + "print\"percentage ratio error = \",round(err,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 7_88" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage ratio error = -3.734\n" + ] + } + ], + "source": [ + "#Chapter-7,Example7_29,pg 7-88\n", + "#calculate the percentage ratio error\n", + "#given\n", + "import math\n", + "Im=90.\n", + "Ic=40.\n", + "delta=28*(math.pi/180)#in radians\n", + "Is=5.\n", + "Ns=400.\n", + "Np=1.\n", + "#calculations\n", + "n=Ns/Np\n", + "Kn=n\n", + "R=n+((Im*math.sin(delta)+Ic*math.cos(delta))/Is)\n", + "Ip=R*Is#actual primary current\n", + "err=(Kn-R)/R\n", + "err=err*100\n", + "#results\n", + "print\"percentage ratio error = \",round(err,3)\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8.ipynb new file mode 100755 index 00000000..99ed3014 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8.ipynb @@ -0,0 +1,1184 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Measurement of Resistance, Inductance & Capacitance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 8_6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1 (ohm) = 983.33\n", + "R2 (ohm) = 25.0\n", + "change in value R2 (ohm) = 27.027\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_1,pg 8_6\n", + "#calculate the values of resistances and change in R2\n", + "#given\n", + "Rh=1000.\n", + "Rm=50.\n", + "V=3.\n", + "Ifsd=1*10**-3\n", + "#calculations\n", + "R1=Rh-(Ifsd*Rm*Rh)/V\n", + "R2=(Ifsd*Rm*Rh)/(V-Ifsd*Rh)\n", + "#results\n", + "print\"R1 (ohm) = \",round(R1,2)\n", + "print\"R2 (ohm) = \",R2\n", + "#due to 5% voltage drop\n", + "V=V-0.05*V\n", + "R2=(Ifsd*Rm*Rh)/(V-Ifsd*Rh)\n", + "print\"change in value R2 (ohm) = \",round(R2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 8_18" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (kohm) = 25.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_2,pg 8_18\n", + "#calculate the unknown resistance\n", + "#given\n", + "R1=10.*10**3\n", + "R2=2.*10**3\n", + "R3=5.*10**3\n", + "#R4=Rx\n", + "#calculations\n", + "R4=(R1*R3)/R2\n", + "#results\n", + "print\"unknown resistance (kohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 8_18" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through galvanometer (muA) = 85.65\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_3,pg 8_18\n", + "#calculate the current\n", + "#given\n", + "R1=7.*10**3\n", + "R2=2.*10**3\n", + "R3=4.*10**3\n", + "R4=20.*10**3\n", + "E=8.\n", + "Rg=300.\n", + "#calculations\n", + "Vth=(E*R4/(R3+R4))-(E*R1 /(R1+R2))#voltage divider rule\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Req+Rg)\n", + "#results\n", + "print\"current through galvanometer (muA) = \",round(Ig*10**6,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 8_25" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (muohm) = 199.907\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_4,pg 8_25\n", + "#calculate the unknown resistance\n", + "#given\n", + "R3=100.03*10**-6\n", + "R2=100.24\n", + "R1=200.\n", + "b=100.31\n", + "a=200.\n", + "Ry=700*10**-6\n", + "#calculations\n", + "Rx=R1*R3/R2\n", + "Rx=Rx+(b*Ry/(Ry+a+b))*((R1/R2)-(a/b))\n", + "#results\n", + "print\"unknown resistance (muohm) = \",round(Rx*10**6,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 8_35" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown impedance (ohm) = (642.787609687-766.044443119j)\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_5,pg 8_35\n", + "#calculate the unknown impedance\n", + "#given\n", + "import math,cmath\n", + "Z2=250.\n", + "Z3=200.\n", + "Z1=50.\n", + "theta1=80.\n", + "theta2=0.\n", + "theta3=30.\n", + "#calculations\n", + "Z4=Z2*Z3/Z1#magnitude condition\n", + "theta4=theta2+theta3-theta1#angle condition\n", + "theta4=theta4*math.pi/180#in radians\n", + "Rx=Z4*math.cos(theta4)#real part\n", + "Ry=Z4*math.sin(theta4)#imag. part\n", + "Z4=Rx+1j*Ry\n", + "#results\n", + "print\"unknown impedance (ohm) = \",Z4" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 8_35" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magl= 1500.0\n", + "magr= 1500.0\n", + "lhs=rhs hence,magnitude condition is satisfied \n", + "thetal= 70.0\n", + "thetar= -45.0\n", + "angle condition is not satisfied \n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_6,pg 8_35\n", + "#calculate the angles and find if magnitude and angle conditions are satisfied\n", + "import math\n", + "from math import sin,cos,sqrt\n", + "#given\n", + "Z1=sqrt(((50*cos(40*math.pi/180))**2)+(50*sin(40*math.pi/180))**2)#angle in radians\n", + "Z2=sqrt(((100*cos(-90*math.pi/180))**2)+(100*sin(-90*math.pi/180))**2)\n", + "Z3=sqrt(((15*cos(45*math.pi/180))**2)+(15*sin(45*math.pi/180))**2)\n", + "Z4=sqrt(((30*cos(30*math.pi/180))**2)+(30*sin(30*math.pi/180))**2)\n", + "#mag(Z1*Z4)=mag(Z2*Z3)....magnitude condition\n", + "#calculations and results\n", + "magl=Z1*Z4#lhs\n", + "magr=Z2*Z3#rhs\n", + "print\"magl= \",magl\n", + "print\"magr= \",magr\n", + "print\"lhs=rhs hence,magnitude condition is satisfied \"\n", + "theta1=40.\n", + "theta2=-90.\n", + "theta3=45.\n", + "theta4=30.\n", + "#theta1+theta4=theta2+theta3.......angle condition\n", + "thetal=theta1+theta4#lhs\n", + "thetar=theta2+theta3#rhs\n", + "print\"thetal= \",thetal\n", + "print\"thetar= \",thetar\n", + "print\"angle condition is not satisfied \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 8_37" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent series circuit \n", + "Rx (Mohm) = 10.0\n", + "Cx (muF) = 0.12\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_7,pg 8_37\n", + "#calculate the equivalent series circuit\n", + "#given\n", + "C3=10.*10**-6\n", + "R1=1.2*10**3\n", + "R2=100.*10**3\n", + "R3=120.*10**3\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Cx=R1*C3/R2\n", + "#results\n", + "print\"equivalent series circuit \"\n", + "print\"Rx (Mohm) = \",Rx/10**6\n", + "print\"Cx (muF) = \",Cx*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 8_39" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent series circuit\n", + "Rx (Mohm) = 1.25\n", + "Lx (mH) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_8,pg 8_39\n", + "#calculate the equivalent series circuit\n", + "#given\n", + "L3=8.*10**-3\n", + "R1=1.*10**3\n", + "R2=25.*10**3\n", + "R3=50.*10**3\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Lx=R2*L3/R1\n", + "#results\n", + "print\"equivalent series circuit\"\n", + "print\"Rx (Mohm) = \",Rx/10**6\n", + "print\"Lx (mH) = \",Lx*1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 8_44" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "components of branch RC\n", + "Rx (ohm) = 175.0\n", + "Lx (mH) = 105.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_9,pg 8_44\n", + "#calculate the components of branch\n", + "#from the bridge\n", + "#given\n", + "C1=0.5*10**-6\n", + "R1=1200.\n", + "R2=700.\n", + "R3=300.\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Lx=R2*R3*C1\n", + "#results\n", + "print\"components of branch RC\"\n", + "print\"Rx (ohm) = \",Rx\n", + "print\"Lx (mH) = \",Lx*1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 8_49" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown inductance and resistance\n", + "Rx (kohm) = 1.212\n", + "Lx (mH) = 118.83\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_10,pg 8_49\n", + "#from hay's balance bridge \n", + "#given\n", + "w=1000.\n", + "R1=5.1*10**3\n", + "C1=2*10**-6\n", + "R2=7.9*10**3\n", + "R3=790.\n", + "#calculations\n", + "Rx=((w**2)*R1*(C1**2)*R2*R3)/(1+((w**2)*(R1**2)*(C1**2)))\n", + "Lx=R2*R3*C1/(1+((w**2)*(R1**2)*(C1**2)))\n", + "#results\n", + "print\"unknown inductance and resistance\"\n", + "print\"Rx (kohm) = \",round(Rx/1000.,3)\n", + "print\"Lx (mH) = \",round(Lx*1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 8_56" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown capacitance and resistance\n", + "Rx (kohm) = 4.7\n", + "Cx (muF) = 0.255\n", + "dissipation factor 3.77\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_11,pg 8_56\n", + "#calculate the unknown capacitance and resistance\n", + "#given\n", + "import math\n", + "R1=1.2*10**3\n", + "R2=4.7*10**3\n", + "C1=1.*10**-6\n", + "C3=1.*10**-6\n", + "f=0.5*10**3\n", + "#calculations\n", + "w=2*math.pi*f\n", + "Rx=R2*C1/C3\n", + "Cx=R1*C3/R2\n", + "D=w*Cx*Rx\n", + "#results\n", + "print\"unknown capacitance and resistance\"\n", + "print\"Rx (kohm) = \",Rx/1000.\n", + "print\"Cx (muF) = \",round(Cx*10**6,3)\n", + "print\"dissipation factor \",round(D,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 8_58" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection of galvanometer (mm) = 71.2674\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_12,pg 58\n", + "#calculate the deflection of galvanometer\n", + "#given\n", + "R1=200.\n", + "R2=100.\n", + "R3=1000.\n", + "R4=200\n", + "Rg=200.\n", + "R41=2005.#changed by delR\n", + "Si=12.#senstivity\n", + "E=10.\n", + "#calculations\n", + "Vth=E*((R41/(R3+R41))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R41/(R3+R41))\n", + "Ig=Vth/(Rg+Req)\n", + "theta=Si*Ig*10**6#deflection of galvanometer(mm)\n", + "#results\n", + "print\"deflection of galvanometer (mm) = \",round(theta,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 8_59" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection of galvanometer (mm) = 27.412\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_13,pg 59\n", + "#calculate the deflection of galvanometer\n", + "#given\n", + "R1=1000.\n", + "R2=1000.\n", + "R3=119.\n", + "R4=121.\n", + "Rg=200.\n", + "S1=1.\n", + "E=5.\n", + "#calculations\n", + "Vth=E*((R4/(R3+R4))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Rg+Req)\n", + "theta=S1*Ig*10**6#deflection of galvanometer(mm)\n", + "#results\n", + "print\"deflection of galvanometer (mm) = \",round(theta,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 8_59" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through galvanometer (muA) = 160.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_14,pg 59\n", + "#calculate the current through galvanometer\n", + "#given\n", + "R=500.\n", + "delR=20.\n", + "E=10.\n", + "#calculations\n", + "Vth=E*delR/(4*R)\n", + "Req=R\n", + "Rg=125.\n", + "Ig=Vth/(Req+Rg)\n", + "#results\n", + "print\"current through galvanometer (muA) = \",Ig*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 8_60" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in resistance (muohm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_15,pg 60\n", + "#calculate the change in resistance\n", + "#given\n", + "R=1000.\n", + "E=20.\n", + "Ig=1*10**-9\n", + "#calculations\n", + "Req=R\n", + "#Ig=Vth/Req......Rg=0\n", + "delR=Ig*4*R**2/E\n", + "#results\n", + "print\"change in resistance (muohm) = \",delR*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 8_61" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bridge is balanced at 80deg. from graph when Rv=10k\n", + "\n", + "error voltage (V) = -0.2632\n", + "negative sign indicates opposite polarity of error voltage\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_16,pg 61\n", + "#calculate the error voltage\n", + "#R4=Rv\n", + "#given\n", + "R1=10.*10**3\n", + "R2=10.*10**3\n", + "R3=10.*10**3\n", + "R4=R1*R3/R2\n", + "E=10.\n", + "print\"bridge is balanced at 80deg. from graph when Rv=10k\\n\"\n", + "#at 60deg bridge is unbalanced \n", + "R4=9.*10**3\n", + "#calculations\n", + "e=E*((R4/(R3+R4))-(R1/(R1+R2)))#thevenin's voltage\n", + "#results\n", + "print\"error voltage (V) = \",round(e,4)\n", + "print\"negative sign indicates opposite polarity of error voltage\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 8_62" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unbalanced current in galvanometer (mA) = 5.1335\n", + "resistance for null deflection (ohm) = 40.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_17,pg 8_62\n", + "#calculate the unbalanced current and resistance\n", + "#given\n", + "R1=100.\n", + "R2=10.\n", + "R3=4.\n", + "R4=50.\n", + "E=10.\n", + "Rg=20.\n", + "#calculations\n", + "Vth=E*((R4/(R3+R4))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Rg+Req)\n", + "#for null deflection\n", + "R4=R3*R1/R2\n", + "#results\n", + "print\"unbalanced current in galvanometer (mA) = \",round(Ig*1000.,4)\n", + "print\"resistance for null deflection (ohm) = \",R4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 8_62" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max. Unknown resistance which can be measured (kohm) = 40.0\n", + "change in resistance (ohm) = 7.8974\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_18,pg 8_62\n", + "#calculate the change in resistance\n", + "#given\n", + "R1=1000.\n", + "R2=100.\n", + "R3=4.*10**3\n", + "Si=70\n", + "theta=3*10**-6#deflection\n", + "E=10\n", + "Rg=80\n", + "#calculations\n", + "R4=R1*R3/R2\n", + "Rth=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "delR=(theta*(Rth+Rg)*((R3+R4)**2))/(Si*E*R3)\n", + "#results\n", + "print\"Max. Unknown resistance which can be measured (kohm) =\",R4/1000. \n", + "print\"change in resistance (ohm) = \",round(delR,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 8_63" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series resistance (ohm) = 91.0615\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_19,pg 8_63\n", + "#calculate the series resistance\n", + "#given\n", + "import math\n", + "P=0.4\n", + "Rarm=150.#resistance in each arm\n", + "I=math.sqrt(P/Rarm)#P=(I**2)*R\n", + "#applying KVL to loop ABCEFA\n", + "r=1.\n", + "E=25.\n", + "R=(-I*Rarm-I*Rarm+E-2*I*r)/(2*I)\n", + "#results\n", + "print\"series resistance (ohm) = \",round(R,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 8_63" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (ohm) = 0.0167\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_20,pg 8_63\n", + "#calculate the unknown resistance\n", + "#given\n", + "R1=10.\n", + "R2=R1/0.5#given\n", + "Rba=1./1200#Rb/Ra\n", + "#calculations\n", + "Rx=R2*Rba\n", + "#results\n", + "print\"unknown resistance (ohm) = \",round(Rx,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 8_64" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (ohm) = 34.31\n", + "unknown inductance (mH) = 29.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_21,pg 8_64\n", + "#calculate the unknown resistance and inductance\n", + "import math\n", + "import cmath\n", + "#given\n", + "w=2*math.pi*1000.\n", + "C1=0.2*10**-6\n", + "R2=500.\n", + "R3=300.\n", + "C3=0.1*10**-6\n", + "#calculations\n", + "Z4=(1j*w*C1*R2)/((1/R3)+(1j*w*C3))#from basic balance equaton\n", + "Zx=Z4#unknown impedance\n", + "Rx=Zx.real\n", + "Xl=Zx.imag\n", + "Lx=Xl/w#Xl=w*Lx\n", + "#results\n", + "print\"unknown resistance (ohm) = \",round(Rx,2)\n", + "print\"unknown inductance (mH) = \",round(Lx*1000.,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 8_67" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown impedance (ohm) = (248.899013631-583.56812467j)\n", + "The answer given in textbook is wrong\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_22,pg 8_67\n", + "#calculate the unknown impedance\n", + "import math,cmath\n", + "#given\n", + "Z1=300.\n", + "R2=200.\n", + "w=2*math.pi*10**3\n", + "C2=5.*10**-6\n", + "#calculations\n", + "Z2=R2-1j*(1./(w*C2))\n", + "R3=500.\n", + "C3=0.2*10**-6\n", + "Z3=R3-1j*(1./(w*C3))\n", + "Z4=Z2*Z3/Z1#balance equation\n", + "Zx=Z4\n", + "#results\n", + "print \"unknown impedance (ohm) = \",Z4\n", + "print \"The answer given in textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 8_67" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (kohm) = 500.0\n", + "unknown capacitance (muF) = 20.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_23,pg 8_67\n", + "#calculate the unknown resistance and capacitance\n", + "#given\n", + "import math,cmath\n", + "Z1=10.*10**3\n", + "Z2=50.*10**3\n", + "w=2*math.pi*2*10**3\n", + "C3=100.*10**-6\n", + "R3=100.*10**3\n", + "#calculations\n", + "Z3=R3-1j*(1/(w*C3))\n", + "Z4=Z2*Z3/Z1\n", + "Zx=Z4\n", + "Rx=Zx.real\n", + "Xc=-Zx.imag\n", + "Cx=1./(Xc*w)\n", + "#results\n", + "print\"unknown resistance (kohm) = \",Rx/1000.\n", + "print\"unknown capacitance (muF) = \",Cx*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 8_68" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arm-1 resistance (ohm) = 0.3649\n", + "arm-1 capacitance (muF) = 7.125\n", + "dissipation factor = 0.007351\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_24,pg 8_68\n", + "#calculate the resistance,capacitance and dissipation factor\n", + "#given\n", + "import math,cmath\n", + "R2=4.8\n", + "r2=0.4\n", + "w=2*math.pi*450\n", + "C2=0.5*10**-6\n", + "#calculations\n", + "Z2=R2+r2-1j*(1/(w*C2))\n", + "Z3=200.\n", + "Z4=2850.\n", + "#I1*Z1=I2*Z2........null deflection detector\n", + "Z1=Z2*Z3/Z4\n", + "R1=Z1.real\n", + "Xc1=-Z1.imag\n", + "C1=1./(w*Xc1)\n", + "D=w*R1*C1#dissipation factor\n", + "#results\n", + "print\"arm-1 resistance (ohm) = \",round(R1,4)\n", + "print\"arm-1 capacitance (muF) = \",round(C1*10**6,3)\n", + "print\"dissipation factor = \",round(D,6)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 8_70" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance of arm AB (ohm) = 74.074\n", + "inductance of arm AB (mH) = 8.42\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_25,pg 8_70\n", + "#calculate the resistance and inductance\n", + "#given\n", + "import math,cmath\n", + "R2=842.\n", + "w=2*math.pi*10**3\n", + "C2=0.135*10**-6\n", + "Z2=R2-1j*(1/(w*C2))\n", + "Z3=10\n", + "C4=10**-6\n", + "#calculations\n", + "Z4=-1j*(1/(w*C4))\n", + "Z1=Z2*Z3/Z4\n", + "R1=Z1.real\n", + "Xl1=Z1.imag\n", + "L1=Xl1/w\n", + "#results\n", + "print\"resistance of arm AB (ohm) = \",round(R1,3)\n", + "print\"inductance of arm AB (mH) = \",round(L1*1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_26 - pg 8_71" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance of branch-CD (mH) = 47.8\n", + "resistance of branch-CD (ohm) = 31.34\n", + "The value of L2 is wrong in textbook\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_26,pg 8_71\n", + "#calculate the inductance and resistance\n", + "#given\n", + "#balance is obtained when\n", + "L1=47.8*10**-3\n", + "R1=1.36\n", + "#calculations\n", + "#at balance 100(r1+jwL1)=100((R2+r2)+jwL2)\n", + "L2=L1\n", + "r1=32.7\n", + "r2=r1-R1\n", + "#results\n", + "print\"inductance of branch-CD (mH) = \",L2*1000.\n", + "print\"resistance of branch-CD (ohm) = \",r2\n", + "print \"The value of L2 is wrong in textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_27 - pg 8_72" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limiting range of R4\n", + "upper limit (ohm) = 230.115\n", + "lower limit (ohm) = 229.885\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_27,pg 8_72\n", + "#calculate the upper and lower limits of R4\n", + "#given\n", + "R1=100.\n", + "R2=100.\n", + "R3=230.\n", + "#calculations\n", + "R4=R1*R3/R2\n", + "lerrR1=0.02/100\n", + "lerrR3=0.01/100\n", + "lerrR2=0.02/100#lerrR........limiting error in R\n", + "lerrR4=lerrR1+lerrR3+lerrR2\n", + "R4u=R4+lerrR4*R4\n", + "R4l=R4-lerrR4*R4#limiting ranges of R4\n", + "#results\n", + "print\"limiting range of R4\"\n", + "print\"upper limit (ohm) = \",R4u\n", + "print\"lower limit (ohm) = \",R4l\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/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 new file mode 100644 index 00000000..99ed3014 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter8_1.ipynb @@ -0,0 +1,1184 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Measurement of Resistance, Inductance & Capacitance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 8_6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1 (ohm) = 983.33\n", + "R2 (ohm) = 25.0\n", + "change in value R2 (ohm) = 27.027\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_1,pg 8_6\n", + "#calculate the values of resistances and change in R2\n", + "#given\n", + "Rh=1000.\n", + "Rm=50.\n", + "V=3.\n", + "Ifsd=1*10**-3\n", + "#calculations\n", + "R1=Rh-(Ifsd*Rm*Rh)/V\n", + "R2=(Ifsd*Rm*Rh)/(V-Ifsd*Rh)\n", + "#results\n", + "print\"R1 (ohm) = \",round(R1,2)\n", + "print\"R2 (ohm) = \",R2\n", + "#due to 5% voltage drop\n", + "V=V-0.05*V\n", + "R2=(Ifsd*Rm*Rh)/(V-Ifsd*Rh)\n", + "print\"change in value R2 (ohm) = \",round(R2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 8_18" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (kohm) = 25.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_2,pg 8_18\n", + "#calculate the unknown resistance\n", + "#given\n", + "R1=10.*10**3\n", + "R2=2.*10**3\n", + "R3=5.*10**3\n", + "#R4=Rx\n", + "#calculations\n", + "R4=(R1*R3)/R2\n", + "#results\n", + "print\"unknown resistance (kohm) = \",R4/1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 8_18" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through galvanometer (muA) = 85.65\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_3,pg 8_18\n", + "#calculate the current\n", + "#given\n", + "R1=7.*10**3\n", + "R2=2.*10**3\n", + "R3=4.*10**3\n", + "R4=20.*10**3\n", + "E=8.\n", + "Rg=300.\n", + "#calculations\n", + "Vth=(E*R4/(R3+R4))-(E*R1 /(R1+R2))#voltage divider rule\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Req+Rg)\n", + "#results\n", + "print\"current through galvanometer (muA) = \",round(Ig*10**6,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 8_25" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (muohm) = 199.907\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_4,pg 8_25\n", + "#calculate the unknown resistance\n", + "#given\n", + "R3=100.03*10**-6\n", + "R2=100.24\n", + "R1=200.\n", + "b=100.31\n", + "a=200.\n", + "Ry=700*10**-6\n", + "#calculations\n", + "Rx=R1*R3/R2\n", + "Rx=Rx+(b*Ry/(Ry+a+b))*((R1/R2)-(a/b))\n", + "#results\n", + "print\"unknown resistance (muohm) = \",round(Rx*10**6,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 8_35" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown impedance (ohm) = (642.787609687-766.044443119j)\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_5,pg 8_35\n", + "#calculate the unknown impedance\n", + "#given\n", + "import math,cmath\n", + "Z2=250.\n", + "Z3=200.\n", + "Z1=50.\n", + "theta1=80.\n", + "theta2=0.\n", + "theta3=30.\n", + "#calculations\n", + "Z4=Z2*Z3/Z1#magnitude condition\n", + "theta4=theta2+theta3-theta1#angle condition\n", + "theta4=theta4*math.pi/180#in radians\n", + "Rx=Z4*math.cos(theta4)#real part\n", + "Ry=Z4*math.sin(theta4)#imag. part\n", + "Z4=Rx+1j*Ry\n", + "#results\n", + "print\"unknown impedance (ohm) = \",Z4" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 8_35" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magl= 1500.0\n", + "magr= 1500.0\n", + "lhs=rhs hence,magnitude condition is satisfied \n", + "thetal= 70.0\n", + "thetar= -45.0\n", + "angle condition is not satisfied \n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_6,pg 8_35\n", + "#calculate the angles and find if magnitude and angle conditions are satisfied\n", + "import math\n", + "from math import sin,cos,sqrt\n", + "#given\n", + "Z1=sqrt(((50*cos(40*math.pi/180))**2)+(50*sin(40*math.pi/180))**2)#angle in radians\n", + "Z2=sqrt(((100*cos(-90*math.pi/180))**2)+(100*sin(-90*math.pi/180))**2)\n", + "Z3=sqrt(((15*cos(45*math.pi/180))**2)+(15*sin(45*math.pi/180))**2)\n", + "Z4=sqrt(((30*cos(30*math.pi/180))**2)+(30*sin(30*math.pi/180))**2)\n", + "#mag(Z1*Z4)=mag(Z2*Z3)....magnitude condition\n", + "#calculations and results\n", + "magl=Z1*Z4#lhs\n", + "magr=Z2*Z3#rhs\n", + "print\"magl= \",magl\n", + "print\"magr= \",magr\n", + "print\"lhs=rhs hence,magnitude condition is satisfied \"\n", + "theta1=40.\n", + "theta2=-90.\n", + "theta3=45.\n", + "theta4=30.\n", + "#theta1+theta4=theta2+theta3.......angle condition\n", + "thetal=theta1+theta4#lhs\n", + "thetar=theta2+theta3#rhs\n", + "print\"thetal= \",thetal\n", + "print\"thetar= \",thetar\n", + "print\"angle condition is not satisfied \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 8_37" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent series circuit \n", + "Rx (Mohm) = 10.0\n", + "Cx (muF) = 0.12\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_7,pg 8_37\n", + "#calculate the equivalent series circuit\n", + "#given\n", + "C3=10.*10**-6\n", + "R1=1.2*10**3\n", + "R2=100.*10**3\n", + "R3=120.*10**3\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Cx=R1*C3/R2\n", + "#results\n", + "print\"equivalent series circuit \"\n", + "print\"Rx (Mohm) = \",Rx/10**6\n", + "print\"Cx (muF) = \",Cx*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 8_39" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equivalent series circuit\n", + "Rx (Mohm) = 1.25\n", + "Lx (mH) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_8,pg 8_39\n", + "#calculate the equivalent series circuit\n", + "#given\n", + "L3=8.*10**-3\n", + "R1=1.*10**3\n", + "R2=25.*10**3\n", + "R3=50.*10**3\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Lx=R2*L3/R1\n", + "#results\n", + "print\"equivalent series circuit\"\n", + "print\"Rx (Mohm) = \",Rx/10**6\n", + "print\"Lx (mH) = \",Lx*1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 8_44" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "components of branch RC\n", + "Rx (ohm) = 175.0\n", + "Lx (mH) = 105.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_9,pg 8_44\n", + "#calculate the components of branch\n", + "#from the bridge\n", + "#given\n", + "C1=0.5*10**-6\n", + "R1=1200.\n", + "R2=700.\n", + "R3=300.\n", + "#calculations\n", + "Rx=R2*R3/R1\n", + "Lx=R2*R3*C1\n", + "#results\n", + "print\"components of branch RC\"\n", + "print\"Rx (ohm) = \",Rx\n", + "print\"Lx (mH) = \",Lx*1000.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 8_49" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown inductance and resistance\n", + "Rx (kohm) = 1.212\n", + "Lx (mH) = 118.83\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_10,pg 8_49\n", + "#from hay's balance bridge \n", + "#given\n", + "w=1000.\n", + "R1=5.1*10**3\n", + "C1=2*10**-6\n", + "R2=7.9*10**3\n", + "R3=790.\n", + "#calculations\n", + "Rx=((w**2)*R1*(C1**2)*R2*R3)/(1+((w**2)*(R1**2)*(C1**2)))\n", + "Lx=R2*R3*C1/(1+((w**2)*(R1**2)*(C1**2)))\n", + "#results\n", + "print\"unknown inductance and resistance\"\n", + "print\"Rx (kohm) = \",round(Rx/1000.,3)\n", + "print\"Lx (mH) = \",round(Lx*1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 8_56" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown capacitance and resistance\n", + "Rx (kohm) = 4.7\n", + "Cx (muF) = 0.255\n", + "dissipation factor 3.77\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_11,pg 8_56\n", + "#calculate the unknown capacitance and resistance\n", + "#given\n", + "import math\n", + "R1=1.2*10**3\n", + "R2=4.7*10**3\n", + "C1=1.*10**-6\n", + "C3=1.*10**-6\n", + "f=0.5*10**3\n", + "#calculations\n", + "w=2*math.pi*f\n", + "Rx=R2*C1/C3\n", + "Cx=R1*C3/R2\n", + "D=w*Cx*Rx\n", + "#results\n", + "print\"unknown capacitance and resistance\"\n", + "print\"Rx (kohm) = \",Rx/1000.\n", + "print\"Cx (muF) = \",round(Cx*10**6,3)\n", + "print\"dissipation factor \",round(D,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 8_58" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection of galvanometer (mm) = 71.2674\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_12,pg 58\n", + "#calculate the deflection of galvanometer\n", + "#given\n", + "R1=200.\n", + "R2=100.\n", + "R3=1000.\n", + "R4=200\n", + "Rg=200.\n", + "R41=2005.#changed by delR\n", + "Si=12.#senstivity\n", + "E=10.\n", + "#calculations\n", + "Vth=E*((R41/(R3+R41))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R41/(R3+R41))\n", + "Ig=Vth/(Rg+Req)\n", + "theta=Si*Ig*10**6#deflection of galvanometer(mm)\n", + "#results\n", + "print\"deflection of galvanometer (mm) = \",round(theta,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 8_59" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deflection of galvanometer (mm) = 27.412\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_13,pg 59\n", + "#calculate the deflection of galvanometer\n", + "#given\n", + "R1=1000.\n", + "R2=1000.\n", + "R3=119.\n", + "R4=121.\n", + "Rg=200.\n", + "S1=1.\n", + "E=5.\n", + "#calculations\n", + "Vth=E*((R4/(R3+R4))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Rg+Req)\n", + "theta=S1*Ig*10**6#deflection of galvanometer(mm)\n", + "#results\n", + "print\"deflection of galvanometer (mm) = \",round(theta,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 8_59" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through galvanometer (muA) = 160.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_14,pg 59\n", + "#calculate the current through galvanometer\n", + "#given\n", + "R=500.\n", + "delR=20.\n", + "E=10.\n", + "#calculations\n", + "Vth=E*delR/(4*R)\n", + "Req=R\n", + "Rg=125.\n", + "Ig=Vth/(Req+Rg)\n", + "#results\n", + "print\"current through galvanometer (muA) = \",Ig*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 8_60" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in resistance (muohm) = 200.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_15,pg 60\n", + "#calculate the change in resistance\n", + "#given\n", + "R=1000.\n", + "E=20.\n", + "Ig=1*10**-9\n", + "#calculations\n", + "Req=R\n", + "#Ig=Vth/Req......Rg=0\n", + "delR=Ig*4*R**2/E\n", + "#results\n", + "print\"change in resistance (muohm) = \",delR*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 8_61" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bridge is balanced at 80deg. from graph when Rv=10k\n", + "\n", + "error voltage (V) = -0.2632\n", + "negative sign indicates opposite polarity of error voltage\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_16,pg 61\n", + "#calculate the error voltage\n", + "#R4=Rv\n", + "#given\n", + "R1=10.*10**3\n", + "R2=10.*10**3\n", + "R3=10.*10**3\n", + "R4=R1*R3/R2\n", + "E=10.\n", + "print\"bridge is balanced at 80deg. from graph when Rv=10k\\n\"\n", + "#at 60deg bridge is unbalanced \n", + "R4=9.*10**3\n", + "#calculations\n", + "e=E*((R4/(R3+R4))-(R1/(R1+R2)))#thevenin's voltage\n", + "#results\n", + "print\"error voltage (V) = \",round(e,4)\n", + "print\"negative sign indicates opposite polarity of error voltage\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 8_62" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unbalanced current in galvanometer (mA) = 5.1335\n", + "resistance for null deflection (ohm) = 40.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_17,pg 8_62\n", + "#calculate the unbalanced current and resistance\n", + "#given\n", + "R1=100.\n", + "R2=10.\n", + "R3=4.\n", + "R4=50.\n", + "E=10.\n", + "Rg=20.\n", + "#calculations\n", + "Vth=E*((R4/(R3+R4))-(R1/(R1+R2)))\n", + "Req=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "Ig=Vth/(Rg+Req)\n", + "#for null deflection\n", + "R4=R3*R1/R2\n", + "#results\n", + "print\"unbalanced current in galvanometer (mA) = \",round(Ig*1000.,4)\n", + "print\"resistance for null deflection (ohm) = \",R4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 8_62" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max. Unknown resistance which can be measured (kohm) = 40.0\n", + "change in resistance (ohm) = 7.8974\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_18,pg 8_62\n", + "#calculate the change in resistance\n", + "#given\n", + "R1=1000.\n", + "R2=100.\n", + "R3=4.*10**3\n", + "Si=70\n", + "theta=3*10**-6#deflection\n", + "E=10\n", + "Rg=80\n", + "#calculations\n", + "R4=R1*R3/R2\n", + "Rth=(R1*R2/(R1+R2))+(R3*R4/(R3+R4))\n", + "delR=(theta*(Rth+Rg)*((R3+R4)**2))/(Si*E*R3)\n", + "#results\n", + "print\"Max. Unknown resistance which can be measured (kohm) =\",R4/1000. \n", + "print\"change in resistance (ohm) = \",round(delR,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 8_63" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "series resistance (ohm) = 91.0615\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_19,pg 8_63\n", + "#calculate the series resistance\n", + "#given\n", + "import math\n", + "P=0.4\n", + "Rarm=150.#resistance in each arm\n", + "I=math.sqrt(P/Rarm)#P=(I**2)*R\n", + "#applying KVL to loop ABCEFA\n", + "r=1.\n", + "E=25.\n", + "R=(-I*Rarm-I*Rarm+E-2*I*r)/(2*I)\n", + "#results\n", + "print\"series resistance (ohm) = \",round(R,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 8_63" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (ohm) = 0.0167\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_20,pg 8_63\n", + "#calculate the unknown resistance\n", + "#given\n", + "R1=10.\n", + "R2=R1/0.5#given\n", + "Rba=1./1200#Rb/Ra\n", + "#calculations\n", + "Rx=R2*Rba\n", + "#results\n", + "print\"unknown resistance (ohm) = \",round(Rx,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 8_64" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (ohm) = 34.31\n", + "unknown inductance (mH) = 29.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_21,pg 8_64\n", + "#calculate the unknown resistance and inductance\n", + "import math\n", + "import cmath\n", + "#given\n", + "w=2*math.pi*1000.\n", + "C1=0.2*10**-6\n", + "R2=500.\n", + "R3=300.\n", + "C3=0.1*10**-6\n", + "#calculations\n", + "Z4=(1j*w*C1*R2)/((1/R3)+(1j*w*C3))#from basic balance equaton\n", + "Zx=Z4#unknown impedance\n", + "Rx=Zx.real\n", + "Xl=Zx.imag\n", + "Lx=Xl/w#Xl=w*Lx\n", + "#results\n", + "print\"unknown resistance (ohm) = \",round(Rx,2)\n", + "print\"unknown inductance (mH) = \",round(Lx*1000.,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 8_67" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown impedance (ohm) = (248.899013631-583.56812467j)\n", + "The answer given in textbook is wrong\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_22,pg 8_67\n", + "#calculate the unknown impedance\n", + "import math,cmath\n", + "#given\n", + "Z1=300.\n", + "R2=200.\n", + "w=2*math.pi*10**3\n", + "C2=5.*10**-6\n", + "#calculations\n", + "Z2=R2-1j*(1./(w*C2))\n", + "R3=500.\n", + "C3=0.2*10**-6\n", + "Z3=R3-1j*(1./(w*C3))\n", + "Z4=Z2*Z3/Z1#balance equation\n", + "Zx=Z4\n", + "#results\n", + "print \"unknown impedance (ohm) = \",Z4\n", + "print \"The answer given in textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23 - pg 8_67" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "unknown resistance (kohm) = 500.0\n", + "unknown capacitance (muF) = 20.0\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_23,pg 8_67\n", + "#calculate the unknown resistance and capacitance\n", + "#given\n", + "import math,cmath\n", + "Z1=10.*10**3\n", + "Z2=50.*10**3\n", + "w=2*math.pi*2*10**3\n", + "C3=100.*10**-6\n", + "R3=100.*10**3\n", + "#calculations\n", + "Z3=R3-1j*(1/(w*C3))\n", + "Z4=Z2*Z3/Z1\n", + "Zx=Z4\n", + "Rx=Zx.real\n", + "Xc=-Zx.imag\n", + "Cx=1./(Xc*w)\n", + "#results\n", + "print\"unknown resistance (kohm) = \",Rx/1000.\n", + "print\"unknown capacitance (muF) = \",Cx*10**6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 8_68" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "arm-1 resistance (ohm) = 0.3649\n", + "arm-1 capacitance (muF) = 7.125\n", + "dissipation factor = 0.007351\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_24,pg 8_68\n", + "#calculate the resistance,capacitance and dissipation factor\n", + "#given\n", + "import math,cmath\n", + "R2=4.8\n", + "r2=0.4\n", + "w=2*math.pi*450\n", + "C2=0.5*10**-6\n", + "#calculations\n", + "Z2=R2+r2-1j*(1/(w*C2))\n", + "Z3=200.\n", + "Z4=2850.\n", + "#I1*Z1=I2*Z2........null deflection detector\n", + "Z1=Z2*Z3/Z4\n", + "R1=Z1.real\n", + "Xc1=-Z1.imag\n", + "C1=1./(w*Xc1)\n", + "D=w*R1*C1#dissipation factor\n", + "#results\n", + "print\"arm-1 resistance (ohm) = \",round(R1,4)\n", + "print\"arm-1 capacitance (muF) = \",round(C1*10**6,3)\n", + "print\"dissipation factor = \",round(D,6)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 8_70" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance of arm AB (ohm) = 74.074\n", + "inductance of arm AB (mH) = 8.42\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_25,pg 8_70\n", + "#calculate the resistance and inductance\n", + "#given\n", + "import math,cmath\n", + "R2=842.\n", + "w=2*math.pi*10**3\n", + "C2=0.135*10**-6\n", + "Z2=R2-1j*(1/(w*C2))\n", + "Z3=10\n", + "C4=10**-6\n", + "#calculations\n", + "Z4=-1j*(1/(w*C4))\n", + "Z1=Z2*Z3/Z4\n", + "R1=Z1.real\n", + "Xl1=Z1.imag\n", + "L1=Xl1/w\n", + "#results\n", + "print\"resistance of arm AB (ohm) = \",round(R1,3)\n", + "print\"inductance of arm AB (mH) = \",round(L1*1000.,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_26 - pg 8_71" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "inductance of branch-CD (mH) = 47.8\n", + "resistance of branch-CD (ohm) = 31.34\n", + "The value of L2 is wrong in textbook\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_26,pg 8_71\n", + "#calculate the inductance and resistance\n", + "#given\n", + "#balance is obtained when\n", + "L1=47.8*10**-3\n", + "R1=1.36\n", + "#calculations\n", + "#at balance 100(r1+jwL1)=100((R2+r2)+jwL2)\n", + "L2=L1\n", + "r1=32.7\n", + "r2=r1-R1\n", + "#results\n", + "print\"inductance of branch-CD (mH) = \",L2*1000.\n", + "print\"resistance of branch-CD (ohm) = \",r2\n", + "print \"The value of L2 is wrong in textbook\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_27 - pg 8_72" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "limiting range of R4\n", + "upper limit (ohm) = 230.115\n", + "lower limit (ohm) = 229.885\n" + ] + } + ], + "source": [ + "#Chapter-8,Example8_27,pg 8_72\n", + "#calculate the upper and lower limits of R4\n", + "#given\n", + "R1=100.\n", + "R2=100.\n", + "R3=230.\n", + "#calculations\n", + "R4=R1*R3/R2\n", + "lerrR1=0.02/100\n", + "lerrR3=0.01/100\n", + "lerrR2=0.02/100#lerrR........limiting error in R\n", + "lerrR4=lerrR1+lerrR3+lerrR2\n", + "R4u=R4+lerrR4*R4\n", + "R4l=R4-lerrR4*R4#limiting ranges of R4\n", + "#results\n", + "print\"limiting range of R4\"\n", + "print\"upper limit (ohm) = \",R4u\n", + "print\"lower limit (ohm) = \",R4l\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/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9.ipynb b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9.ipynb new file mode 100755 index 00000000..fda149db --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9.ipynb @@ -0,0 +1,1613 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - D C Motors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 9_14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e.m.f for lap wound (V) = 462.0\n", + "e.m.f for wave wound (V) = 924.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_1,pg 9_14\n", + "#calculate the emf for lap and wave wounds\n", + "#given\n", + "P=4.\n", + "Z=440.\n", + "phi=0.07#flux(in Wb)\n", + "N=900.\n", + "#for lap-wound\n", + "#calculations\n", + "A=P\n", + "E=phi*P*N*Z/(60*A)\n", + "#results\n", + "print\"e.m.f for lap wound (V) = \",E\n", + "#for wave wound\n", + "A=2.\n", + "E=phi*P*N*Z/(60*A)\n", + "print\"e.m.f for wave wound (V) = \",E\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 9_15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e.m.f for lap wound (V) = 263.424\n", + "speed of generator for wave wound (rpm) = 560.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_2,pg 9_15\n", + "#calculate the speed and emf\n", + "#given\n", + "P=4.\n", + "phi=21.*10**-3#flux(in Wb)\n", + "N=1120.\n", + "C=42.#coils\n", + "tpC=8.#turns per coil\n", + "#calculations and results\n", + "t=C*tpC#total turns\n", + "Z=2*t\n", + "#for lap wound\n", + "A=P\n", + "E=phi*P*N*Z/(60*A)\n", + "print\"e.m.f for lap wound (V) = \",E\n", + "#for wave wound\n", + "A=2.\n", + "E=263.424\n", + "N=E*60*A/(phi*P*Z)\n", + "print\"speed of generator for wave wound (rpm) = \",N" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 9_20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f of motor (V) = 197.5\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_3,pg 9_20\n", + "#calculate the back emf \n", + "#given\n", + "V=220.\n", + "Ia=30.\n", + "Ra=0.75\n", + "#calculations\n", + "Eb=V-Ia*Ra\n", + "#results\n", + "print\"back e.m.f of motor (V) = \",Eb\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 9_21" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 206.0\n", + "speed of motor (rpm) = 1648.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_4,pg 9_21\n", + "#calculate the back emf and speed of motor\n", + "P=4.\n", + "A=P\n", + "V=230.\n", + "Ra=0.6\n", + "Z=250.\n", + "phi=30.*10**-3#flux(in Wb)\n", + "Ia=40.\n", + "#calculations\n", + "Eb=V-Ia*Ra\n", + "N=Eb*60*A/(phi*P*Z)\n", + "#results\n", + "print\"back e.m.f (V) = \",Eb\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 9_24" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross torque (N-m) = 76.32\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_5,pg 9_24\n", + "#calculate the gross torque\n", + "#given\n", + "P=4.\n", + "A=P\n", + "Z=480.\n", + "phi=20.*10**-3#flux(in Wb)\n", + "Ia=50.\n", + "#calculations\n", + "Ta=0.159*phi*Ia*(P*Z/A)\n", + "#results\n", + "print\"gross torque (N-m) = \",Ta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 9_25" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "induced e.m.f (V) = 225.0\n", + "armature current (A) = 6.25\n", + "stray losses (W) = 1406.25\n", + "loss torque (Nm) = 13.429\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_6,pg 9_25\n", + "#calculate the induced emf, armature current, stray losses and loss torque\n", + "import math\n", + "#given\n", + "P=4.\n", + "A=P\n", + "No=1000.#speed of motor\n", + "Z=540.\n", + "V=230.\n", + "phi=25.*10**-3#flux(In Wb)\n", + "Ra=0.8\n", + "#calculations\n", + "Ebo=phi*P*No*Z/(60*A)#induced e.m.f\n", + "Iao=(V-Ebo)/Ra#armature current\n", + "SL=Ebo*Iao#stray losses\n", + "wo=2*math.pi*No/60#angular velocity\n", + "Tf=Ebo*Iao/wo#loss torque\n", + "#results\n", + "print\"induced e.m.f (V) = \",Ebo\n", + "print\"armature current (A) = \",Iao\n", + "print\"stray losses (W) = \",SL\n", + "print\"loss torque (Nm) = \",round(Tf,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 9_37" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1374.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_7,pg 9_37\n", + "#calculate the speed of motor\n", + "#given\n", + "P=4.\n", + "Z=200.\n", + "V=250.\n", + "A=2.\n", + "phi=25.*10**-3\n", + "Ia=60.\n", + "#calculations\n", + "Il=Ia\n", + "Ra=0.15\n", + "Rse=0.2\n", + "Eb=V-Ia*(Ra+Rse)\n", + "N=Eb*60*A/(phi*P*Z)\n", + "#results\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 9_38" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 244.375\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_8,pg 9_38\n", + "#calculate the back emf\n", + "#given\n", + "V=250.\n", + "Il=20.\n", + "Ra=0.3\n", + "Rsh=200.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "#results\n", + "print\"back e.m.f (V) = \",Eb\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 9_38" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed at full load (rpm) = 939.67\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_9,pg 9_38\n", + "#calculate the speed at full load\n", + "#given\n", + "No=1000.\n", + "V=220.\n", + "Rsh=110.\n", + "Ra=0.3\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ilo=6.\n", + "Iao=Ilo-Ish\n", + "Rao=0.3\n", + "Ebo=V-Iao*Ra\n", + "#on full load\n", + "Il=50\n", + "IaFL=Il-Ish\n", + "EbFL=V-IaFL*Ra\n", + "#N=k*Eb/phi\n", + "NFL=No*EbFL/Ebo\n", + "#results\n", + "print\"speed at full load (rpm) = \",round(NFL,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 9_39" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor on new load (rpm) = 300.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_10,pg 9_39\n", + "#calculate the speed of motor on new load\n", + "#given\n", + "N1=800.\n", + "I1=20.\n", + "V=250.\n", + "Ia1=I1\n", + "I2=50.\n", + "Ia2=I2\n", + "Ra=0.2\n", + "Ise1=I1\n", + "Ise2=I2\n", + "Rse=0.3\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse\n", + "#from speed equation\n", + "N2=N1*(Eb2/Eb1)*(Ia1/Ia2)\n", + "#results\n", + "print\"speed of motor on new load (rpm) = \",N2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 9_45" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new current (A) = 40.0\n", + "new speed (rpm) = 2938.776\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_11,pg 9_45\n", + "#calculate the new current and speed\n", + "#given\n", + "V=250.\n", + "Rsh=250.\n", + "Ra=0.25\n", + "Rx=Rsh\n", + "Ia1=20.\n", + "#calculations\n", + "Ish1=V/Rsh\n", + "Ish2=V/(Rsh+Rx)\n", + "N1=1500.\n", + "Eb1=V-Ia1*Ra\n", + "#phi=k*Ish\n", + "#T1=T2\n", + "Ia2=Ish1*Ia1/Ish2#new current\n", + "Eb2=V-Ia2*Ra\n", + "#from speed equation\n", + "N2=N1*(((Eb1/Eb2)*(Ish2/Ish1))**-1)#new speed\n", + "#results\n", + "print\"new current (A) = \",Ia2\n", + "print\"new speed (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 9_46" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance in shunt field (ohm) = 88.313\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_12,pg 9_46\n", + "#calculate the resistance in shunt field\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ra=0.5\n", + "Rsh=250.\n", + "Ia1=20.\n", + "Ish1=V/Rsh\n", + "Eb1=V-Ia1*Ra\n", + "N1=600.\n", + "N2=800.\n", + "#T1=T2\n", + "#Ish1*Ia1=Ish2*Ia2\n", + "#Ish2*Ia2=20............(1)\n", + "#(N1/N2)=(Eb1/Eb2)*(Ish2/Ish1)...........(2)\n", + "#using (1) and (2)\n", + "#240*(Ish2^2)-187.5*Ish2+7.5=0.........(3)\n", + "b=-187.5\n", + "a=240\n", + "c=7.5\n", + "#calculations\n", + "Ish2=(-b+math.sqrt(((b**2)-4*a*c)))/(2*a)#neglecting lower value\n", + "Rx=(V/Ish2)-Rsh\n", + "#results\n", + "print\"resistance in shunt field (ohm) = \",round(Rx,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 9_51" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 912.743\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_13,pg 9_51\n", + "#calculate the speed of motor\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ra=0.15\n", + "Rx=0.1\n", + "Rse=0.1\n", + "N1=800.\n", + "Ise1=30.\n", + "Ia1=30.#Ia1=Ise1\n", + "I1=Ia1\n", + "#phi=k*Ise\n", + "#T2=T1+0.5*T1(increased by 50%)..........(1)\n", + "#Ise2=Ia2*Rx/(Rx+Rse)\n", + "#putting values of Rx and Rse Ise2=0.5*Ia2.........(2)\n", + "#putting (1) and (2) in torque equation\n", + "#calculations\n", + "Ia2=math.sqrt(2700)\n", + "Ise2=0.5*Ia2#from (2)\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse\n", + "#using speed equation\n", + "N2=N1*Eb2*Ise1/(Eb1*Ise2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 9_52" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1119.5122\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_14,pg 9_52\n", + "#calculate the speed of motor\n", + "#given\n", + "V=220.\n", + "Ise1=15.\n", + "Ia1=Ise1\n", + "Ia2=10.\n", + "Ise2=Ia2\n", + "I2=Ia2\n", + "N1=900.\n", + "Ra=0.5\n", + "Rse=0.5\n", + "Rx=4.\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse-I2*Rx\n", + "N2=N1*Eb2*Ise1/(Eb1*Ise2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 9_64" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "useful torque (Nm) = 185.26\n", + "efficiency at load (percent) = 79.38\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_15,pg 9_64\n", + "#calculate the useful torque and efficiency at load\n", + "#given\n", + "import math\n", + "P=6.\n", + "V=500.\n", + "A=2.#wave wound\n", + "Z=1200.\n", + "phi=20*10**-3#flux\n", + "Ra=0.5\n", + "Rsh=250.\n", + "Il=20.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "N=Eb*60*A/(phi*P*Z)\n", + "Pm=Eb*Ia#mechanical power\n", + "w=2*math.pi*N/60#angular velocity\n", + "Tg=Pm/w\n", + "ML=900#mechanical losses\n", + "Pout=Pm-ML\n", + "Tsh=Pout/w#usefull torque\n", + "Pin=V*Il\n", + "n=Pout*100/Pin#efficiency at load\n", + "#results\n", + "print\"useful torque (Nm) = \",round(Tsh,2)\n", + "print\"efficiency at load (percent) = \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 9_65" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1860.85\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_16,pg 9_65\n", + "#calculate the speed of motor\n", + "#given\n", + "V=120.\n", + "Ra=0.2\n", + "Rsh=60.\n", + "#for full load\n", + "Il1=40.\n", + "N1=1800.\n", + "#for shunt motor\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra\n", + "#for half load T2=T1/2\n", + "Ia2=Ia1*0.5#T=k*Ia\n", + "Eb2=V-Ia2*Ra\n", + "N2=N1*Eb2/Eb1#from torque equation\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 9_66" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed as generator (rpm) = 1592.7\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_17,pg 9_66\n", + "#calculate the speed of generator\n", + "#given\n", + "Ra=0.08\n", + "Eb1=242.\n", + "V=250.\n", + "Ia=87.\n", + "Vt=V#generator supply\n", + "Nm=1500.\n", + "#calculations\n", + "Ia1=(V-Eb1)/Ra\n", + "#at start N=0, Eb=0\n", + "Ias=V/Ra#Ia(start)\n", + "Ia2=120\n", + "Eb2=V-Ia2*Ra\n", + "Eg=Vt+Ia*Ra#generator e.m.f\n", + "Ng=Nm*Eg/Eb1#speed as generator\n", + "#results\n", + "print\"speed as generator (rpm) = \",round(Ng,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 9_67" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross mechanical power (kW) = 70.812\n", + "stray losses (W) = 11132.13\n", + "no load speed (rpm) = 1250.9121\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_18,pg 9_67\n", + "#calculate the gross mechanical power,stray losses and no load speed\n", + "#given\n", + "import math\n", + "V=250.\n", + "Po=59680.\n", + "Rsh=250.\n", + "Ra=0.04\n", + "n=80.#efficiency\n", + "N1=1200.\n", + "#calculations and results\n", + "Il=Po*100/(V*n)#Pi=V*Il\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "Pm=Eb*Ia#gross mechanical power\n", + "SL=Pm-Po#stray losses\n", + "print\"gross mechanical power (kW) = \",round(Pm/1000.,3)\n", + "print\"stray losses (W) = \",round(SL,2)\n", + "#on no load\n", + "#Pg=S, Ebo*Iao=SL..........(1)\n", + "#Ebo=V-Iao*Ra............(2)\n", + "#putting (2) in (1)\n", + "#(Iao^2)-6250*Iao+278303.24=0\n", + "b=-6250.\n", + "a=1.\n", + "c=278303.24\n", + "Iao=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "I=Iao-Ish#current drawn on no load\n", + "Ebo=V-Iao*Ra\n", + "No=N1*Ebo/Eb\n", + "print\"no load speed (rpm) = \",round(No,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 9_69" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1234.102\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_19,pg 9_69\n", + "#calculate the full load speed\n", + "#given\n", + "V=250.\n", + "P=4.\n", + "Ra=0.1\n", + "Rsh=125.\n", + "Vbr=2.#brush drop\n", + "#no load condition\n", + "Ilo=4.\n", + "No=1200.\n", + "Il1=61.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra-Vbr\n", + "#full load condition\n", + "#phi1=phio-o.o5*phio (weakened by 5%)\n", + "#phi=phi1/phio\n", + "phi=0.95\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra-Vbr\n", + "N1=No*Eb1/(Ebo*phi)\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N1,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 9_70" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1233.396\n", + "speed regulation (percent) = 3.64\n", + "hp rating of machine (hp) = 19.42\n", + "full load efficiency (percent) = 86.48\n", + "The answer differs from the textbook due to rounding off error\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_20,pg 9_70\n", + "#calculate the full load speed, speed regulation, hp rating and efficiency\n", + "#given\n", + "V=250.\n", + "Ra=0.15\n", + "Rsh=166.67\n", + "No=1280.\n", + "Il1=67.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra\n", + "#on no load\n", + "Ilo=6.5\n", + "Ish=1.5\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra\n", + "N1=Eb1*No/Ebo\n", + "Sr=(No-N1)*100/No#speed regulation\n", + "SL=Ebo*Iao\n", + "Po=Eb1*Ia1-SL#full load shaft output\n", + "hp=Po/746.#horse power rating\n", + "Pi=V*Il1\n", + "n=Po*100./Pi\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N1,3)\n", + "print\"speed regulation (percent) = \",round(Sr,2)\n", + "print\"hp rating of machine (hp) = \",round(hp,2)\n", + "print\"full load efficiency (percent) = \",round(n,2)\n", + "print \"The answer differs from the textbook due to rounding off error\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 9_71" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 976.389\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_21,pg 9_71\n", + "#calculate the speed of motor\n", + "import math\n", + "#given\n", + "Ra=0.1\n", + "V=110.\n", + "P=4.\n", + "Ia1=50.\n", + "I1=Ia1\n", + "Rse=0.02\n", + "N1=700\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ia1*Rse\n", + "#using torque equation T=k*phi*Ia\n", + "Ia2=math.sqrt(2)*Ia1\n", + "Eb2=V-Ia2*Ra-Ia2*Rse/4#parallel speed groups\n", + "#using speed equation N=k*Eb/phi\n", + "N2=N1*Eb2*2*Ia1/(Eb1*Ia2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 9_73" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new speed of motor (rpm) = 2378.414\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_22,pg 9_73\n", + "#calculate the new speed of motor\n", + "#given\n", + "P=4.\n", + "Ia1=50.\n", + "N1=2000.\n", + "V=230.\n", + "#calculations\n", + "#coils connected in series\n", + "#phi1=k*Ia1*(4*n)=k*200*n\n", + "#coils connected in parallel groups of series coils\n", + "#phi2=k*((Ia2*2*n/2)+(Ia2*2*n/2))=k*2*n*Ia2\n", + "#phi1/phi2=100/Ia2........(1)\n", + "#N1/N2=phi2/phi1........(2)\n", + "#T=kN**2..........(3)\n", + "Ia2=(Ia1*(100**3))**(1./4)#using (1) in (3)\n", + "N2=(((N1**3)*Ia2)/Ia1)**(1./3)\n", + "#results\n", + "print\"new speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 9_76" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "extra resistance to reduce speed (ohm) = 9.744\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_24,pg 9_76\n", + "#calculate the extra resistance to reduce speed\n", + "import math\n", + "#given\n", + "V=200.\n", + "Ia1=30.\n", + "Ra=0.75\n", + "Rse=0.75\n", + "#calculations\n", + "R=Ra+Rse\n", + "Eb1=V-Ia1*R\n", + "#N2=0.6*N1\n", + "N=0.6#N=N2/N1\n", + "#using T=k*Ia**2 and T=k*N**3\n", + "Ia2=math.sqrt(((0.6**3)*30**2))\n", + "#using speed equation N=k*Eb/Ia\n", + "Eb2=N*Eb1*Ia2/Ia1\n", + "#Eb2=V-Ia2*(R+Rx)\n", + "Rx=-(Eb2-V+Ia2*R)/Ia2\n", + "#results\n", + "print\"extra resistance to reduce speed (ohm) = \",round(Rx,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 9_77" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new supply voltage (V) = 354.6875\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_25,pg 9_77\n", + "#calculate the new supply voltage\n", + "#given\n", + "R=1.\n", + "V1=230.\n", + "N1=300.\n", + "Ia1=15.\n", + "N2=375.\n", + "#calculations\n", + "#using torque equation T=k*N^2\n", + "Ia2=N2*Ia1/N1\n", + "#using speed equation N=k*Eb/Ia........(1)\n", + "Eb1=V1-Ia1*R\n", + "#case-2\n", + "#Eb2=V2-Ia2*R=V2-18.75......(2)\n", + "#putting (2) in (1)\n", + "V2=(N2*Eb1*Ia2/(N1*Ia1))+18.75\n", + "#results\n", + "print\"new supply voltage (V) = \",V2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 9_78" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power input in case-2 (kW) = 12.145\n", + "efficiency of motor = 74.107\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_26,pg 9_78\n", + "#calculate the power input and efficiency of motor\n", + "#given\n", + "import math\n", + "V=400.\n", + "Po1=18.5*10**3\n", + "Pi1=22.5*10**3\n", + "Rsh=200.\n", + "Ra=0.4\n", + "Po2=9.*10**3\n", + "#calculations\n", + "I1=Pi1/V\n", + "Ish=V/Rsh\n", + "Ia1=I1-Ish\n", + "Acl=(Ia1**2)*Ra#armature copper loss\n", + "Scl=(Ish**2)*Rsh#shunt feild copper loss\n", + "TL=Pi1-Po1#total losses\n", + "SFl=TL-(Acl+Scl)#stray and friction loss\n", + "#case-2\n", + "Pm=Po2+SFl#mechanical power\n", + "#Pm=Eb2*Ia2.........(1)\n", + "#Eb2=V-Ia2*Ra.......(2)\n", + "#using (1) and (2)\n", + "#0.4*(Ia2**2)-400*Ia2+11022.75=0\n", + "a=0.4\n", + "b=-400\n", + "c=11022.775\n", + "Ia2=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "Pi2=Po2+(Ia2**2)*Ra+(Ish**2)*Rsh+SFl\n", + "n=Po2*100/Pi2#efficiency\n", + "#results\n", + "print\"power input in case-2 (kW) = \",round(Pi2/1000.,3)\n", + "print\"efficiency of motor = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 9_79" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum efficiency = 75.59\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_27,pg 9_79\n", + "#calculate the maximum efficiency\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ilo=4.\n", + "Ra=1.\n", + "Rsh=250.\n", + "Il1=20.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Ia1=Il1-Ish\n", + "Ebo=V-Iao*Ra\n", + "Po=Ebo*Iao\n", + "Eb1=V-Ia1*Ra\n", + "P1=Eb1*Ia1\n", + "Pout=P1-Po\n", + "Pi=V*Il1\n", + "n=Pout*100/Pi\n", + "#fro max. efficiency\n", + "#const. losses=variable losses\n", + "Ia=math.sqrt(Po+(Ish**2)*Rsh)\n", + "Ebm=V-Ia*Ra\n", + "Pm=Ebm*Ia\n", + "Pout=Pm-Po\n", + "Pi=V*(Ia+Ish)\n", + "nm=Pout*100/Pi\n", + "#results\n", + "print\"maximum efficiency = \",round(nm,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 9_81" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 83.33\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_28,pg 9_81\n", + "#calculate the back emf\n", + "#given\n", + "V=250.\n", + "FLo=16.*10**3#full scale output\n", + "n=80.\n", + "#calculations\n", + "I=FLo*100/n#input\n", + "Il=I/V\n", + "Il=Il\n", + "Ia=1.5*Il\n", + "#at start\n", + "Ra=V/Ia\n", + "Rac=0.18#Ra actual\n", + "Ras=Ra-Rac#Ra starter\n", + "Ia=Il#Ia drops as motor starts\n", + "Eb=V-Ia*(Ra)\n", + "#results\n", + "print\"back e.m.f (V) = \",round(Eb,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 9_82" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electromagnetic torque (Nm) = 122.148\n", + "flux per pole (mWb) = 11.9316\n", + "efficiency of motor (percent) = 85.733\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_29,pg 9_82\n", + "#calculate the electromagnetic torque, flux and efficiency\n", + "#given\n", + "import math\n", + "Po=20.*735.5#(in W)\n", + "V=230.\n", + "N=1150.\n", + "P=4.\n", + "A=P\n", + "Z=882.\n", + "Ia=73.\n", + "Ish=1.6\n", + "#calculations\n", + "T=60*Po/(2*math.pi*N)\n", + "phi=T*A/(0.159*Ia*P*Z)#flux per pole\n", + "Il=Ia+Ish\n", + "Pin=V*Il\n", + "n=Po*100/Pin\n", + "#results\n", + "print\"electromagnetic torque (Nm) = \",round(T,4)\n", + "print\"flux per pole (mWb) = \",round(phi*1000.,4)\n", + "print\"efficiency of motor (percent) = \",round(n,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 30 - pg 9_83" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 785.478\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_30,pg 9_83\n", + "#calculate the speed of motor\n", + "#given\n", + "Pr=12.*10**3#rated output\n", + "V=200.\n", + "Rsh=80.\n", + "N1=800.\n", + "n=0.9#efficiency\n", + "#calculations\n", + "Out=0.8*Pr#output is 80% of rated\n", + "In=Out/n#input\n", + "TL=In-Out\n", + "#for max. efficiency\n", + "Iln=70#new current\n", + "#TL=Wc+(Ia1^2)*Ra\n", + "#bur Wc=(Ia1^2)*Ra\n", + "Wc=TL/2\n", + "Il=In/V\n", + "Ish=V/Rsh\n", + "Ia1=Il-Ish\n", + "Ra=Wc/(Ia1**2)\n", + "Ia2=Iln-Ish\n", + "Wcn=Wc#const. losses remain same\n", + "TL=(Ia2**2)*Ra+Wcn\n", + "Pi=V*Iln\n", + "n=(Pi-TL)*100/Pi\n", + "Eb1=V-Ia1*Ra\n", + "Eb2=V-Ia2*Ra\n", + "N2=N1*Eb2/Eb1\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31 - pg 9_85" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency of motor (percent) = 84.896\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_31,pg 9_85\n", + "#calculate the efficiency of motor\n", + "#given\n", + "Po=8.952*10**3\n", + "V=440.\n", + "Ra=1.1\n", + "Rsh=650\n", + "Rint=0.4\n", + "Rreg=50.\n", + "Ml=450.\n", + "Vbr=2.#brush drop\n", + "Il=24.\n", + "#calculations\n", + "Rat=Ra+Rint#series connection\n", + "Rsht=Rsh+Rreg#series connection\n", + "Ish=V/Rsht\n", + "Ia=Il-Ish\n", + "Acl=(Ia**2)*Rat#armature copper loss\n", + "Fcl=(Ish**2)*Rsht#feild copper loss\n", + "Bdl=Vbr*Ia#brush drop loss\n", + "TL=Acl+Fcl+Bdl+Ml\n", + "n=Po*100/(Po+TL)\n", + "#results\n", + "print\"efficiency of motor (percent) = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32 - pg 9_85" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motors (rpm) = 334.816\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_32,pg 9_85\n", + "#calculate the speed of motors\n", + "#given\n", + "#for first motor\n", + "N1=700.\n", + "R=0.5#Ra+Rse\n", + "I1=70.\n", + "V=500.\n", + "#calculations\n", + "Eb1=V-I1*R\n", + "K1=Eb1/(N1*I1)\n", + "#for second motor\n", + "N2=750.\n", + "R=0.5\n", + "I2=70.\n", + "V=500.\n", + "Eb2=V-I2*R\n", + "K2=Eb2/(N2*I2)\n", + "#motors in series\n", + "It=70.\n", + "Rt=2*R\n", + "Eb=V-It*Rt\n", + "N=Eb/(K1*It+K2*It)\n", + "#results\n", + "print\"speed of motors (rpm) = \",round(N,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33 - pg 9_86" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum efficiency output (W) = 10225.936\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_33,pg 9_86\n", + "#calculate the maximum efficiency output\n", + "#given\n", + "import math\n", + "Po=7.46*10**3\n", + "V=250\n", + "Ilo=5.\n", + "Ra=0.5\n", + "Rsh=250.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Acl=(Iao**2)*Ra\n", + "Fcl=(Ish**2)*Rsh\n", + "Pi=V*Ilo\n", + "FWl=Pi-Acl-Fcl#friction and windage loss\n", + "#Pin=Eb*Ia=(V-Ia*Ra)*Ia\n", + "#0.5*(Ia**2)-250*Ia+8452=0\n", + "b=-250\n", + "a=0.5\n", + "c=8452\n", + "Ia=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "TL=(Ia**2)*Ra+(Ish**2)*Rsh+FWl\n", + "n=Po*100/(Po+TL)\n", + "#for max. efficiency\n", + "Ia=math.sqrt((FWl+Fcl)/Ra)\n", + "Eb=V-Ia*Ra\n", + "Pm=Eb*Ia\n", + "#Po at nmax\n", + "Po=Pm-FWl\n", + "#results\n", + "print\"maximum efficiency output (W) = \",round(Po,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 34 - pg 9_87" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor case-1 (rpm) = 946.817\n", + "speed of motor case-2 (rpm) = 830.983\n", + "speed of motor case-3 (rpm) = 1101.3554\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_33,pg 9_87\n", + "#calculate the speed of motor in both cases\n", + "#given\n", + "V=500.\n", + "Ra=1.2\n", + "Rsh=500.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ilo=4.\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra\n", + "Il1=26.\n", + "Ish1=1.\n", + "Ia1=Il1-Ish1\n", + "Eb1=V-Ia1*Ra\n", + "No=1000.\n", + "N1=No*Eb1/Ebo\n", + "print\"speed of motor case-1 (rpm) = \",round(N1,3)\n", + "Rx=2.3#connected in series with armature\n", + "Eb2=V-Ia1*(Ra+Rx)\n", + "N2=N1*Eb2/Eb1\n", + "#results\n", + "print\"speed of motor case-2 (rpm) = \",round(N2,3)\n", + "Ish3=Ish1-0.15*Ish1#reduced by 15%\n", + "Ia3=Ish1*Ia1/(Ish3)\n", + "Eb3=V-Ia3*Ra\n", + "N3=N1*Eb3*Ish1/(Eb1*Ish3)\n", + "print\"speed of motor case-3 (rpm) = \",round(N3,4)\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/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 new file mode 100644 index 00000000..fda149db --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/Chapter9_1.ipynb @@ -0,0 +1,1613 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - D C Motors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 9_14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e.m.f for lap wound (V) = 462.0\n", + "e.m.f for wave wound (V) = 924.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_1,pg 9_14\n", + "#calculate the emf for lap and wave wounds\n", + "#given\n", + "P=4.\n", + "Z=440.\n", + "phi=0.07#flux(in Wb)\n", + "N=900.\n", + "#for lap-wound\n", + "#calculations\n", + "A=P\n", + "E=phi*P*N*Z/(60*A)\n", + "#results\n", + "print\"e.m.f for lap wound (V) = \",E\n", + "#for wave wound\n", + "A=2.\n", + "E=phi*P*N*Z/(60*A)\n", + "print\"e.m.f for wave wound (V) = \",E\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 9_15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e.m.f for lap wound (V) = 263.424\n", + "speed of generator for wave wound (rpm) = 560.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_2,pg 9_15\n", + "#calculate the speed and emf\n", + "#given\n", + "P=4.\n", + "phi=21.*10**-3#flux(in Wb)\n", + "N=1120.\n", + "C=42.#coils\n", + "tpC=8.#turns per coil\n", + "#calculations and results\n", + "t=C*tpC#total turns\n", + "Z=2*t\n", + "#for lap wound\n", + "A=P\n", + "E=phi*P*N*Z/(60*A)\n", + "print\"e.m.f for lap wound (V) = \",E\n", + "#for wave wound\n", + "A=2.\n", + "E=263.424\n", + "N=E*60*A/(phi*P*Z)\n", + "print\"speed of generator for wave wound (rpm) = \",N" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 9_20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f of motor (V) = 197.5\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_3,pg 9_20\n", + "#calculate the back emf \n", + "#given\n", + "V=220.\n", + "Ia=30.\n", + "Ra=0.75\n", + "#calculations\n", + "Eb=V-Ia*Ra\n", + "#results\n", + "print\"back e.m.f of motor (V) = \",Eb\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 9_21" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 206.0\n", + "speed of motor (rpm) = 1648.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_4,pg 9_21\n", + "#calculate the back emf and speed of motor\n", + "P=4.\n", + "A=P\n", + "V=230.\n", + "Ra=0.6\n", + "Z=250.\n", + "phi=30.*10**-3#flux(in Wb)\n", + "Ia=40.\n", + "#calculations\n", + "Eb=V-Ia*Ra\n", + "N=Eb*60*A/(phi*P*Z)\n", + "#results\n", + "print\"back e.m.f (V) = \",Eb\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 9_24" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross torque (N-m) = 76.32\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_5,pg 9_24\n", + "#calculate the gross torque\n", + "#given\n", + "P=4.\n", + "A=P\n", + "Z=480.\n", + "phi=20.*10**-3#flux(in Wb)\n", + "Ia=50.\n", + "#calculations\n", + "Ta=0.159*phi*Ia*(P*Z/A)\n", + "#results\n", + "print\"gross torque (N-m) = \",Ta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 9_25" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "induced e.m.f (V) = 225.0\n", + "armature current (A) = 6.25\n", + "stray losses (W) = 1406.25\n", + "loss torque (Nm) = 13.429\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_6,pg 9_25\n", + "#calculate the induced emf, armature current, stray losses and loss torque\n", + "import math\n", + "#given\n", + "P=4.\n", + "A=P\n", + "No=1000.#speed of motor\n", + "Z=540.\n", + "V=230.\n", + "phi=25.*10**-3#flux(In Wb)\n", + "Ra=0.8\n", + "#calculations\n", + "Ebo=phi*P*No*Z/(60*A)#induced e.m.f\n", + "Iao=(V-Ebo)/Ra#armature current\n", + "SL=Ebo*Iao#stray losses\n", + "wo=2*math.pi*No/60#angular velocity\n", + "Tf=Ebo*Iao/wo#loss torque\n", + "#results\n", + "print\"induced e.m.f (V) = \",Ebo\n", + "print\"armature current (A) = \",Iao\n", + "print\"stray losses (W) = \",SL\n", + "print\"loss torque (Nm) = \",round(Tf,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 9_37" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1374.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_7,pg 9_37\n", + "#calculate the speed of motor\n", + "#given\n", + "P=4.\n", + "Z=200.\n", + "V=250.\n", + "A=2.\n", + "phi=25.*10**-3\n", + "Ia=60.\n", + "#calculations\n", + "Il=Ia\n", + "Ra=0.15\n", + "Rse=0.2\n", + "Eb=V-Ia*(Ra+Rse)\n", + "N=Eb*60*A/(phi*P*Z)\n", + "#results\n", + "print\"speed of motor (rpm) = \",N\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 9_38" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 244.375\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_8,pg 9_38\n", + "#calculate the back emf\n", + "#given\n", + "V=250.\n", + "Il=20.\n", + "Ra=0.3\n", + "Rsh=200.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "#results\n", + "print\"back e.m.f (V) = \",Eb\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 9_38" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed at full load (rpm) = 939.67\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_9,pg 9_38\n", + "#calculate the speed at full load\n", + "#given\n", + "No=1000.\n", + "V=220.\n", + "Rsh=110.\n", + "Ra=0.3\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ilo=6.\n", + "Iao=Ilo-Ish\n", + "Rao=0.3\n", + "Ebo=V-Iao*Ra\n", + "#on full load\n", + "Il=50\n", + "IaFL=Il-Ish\n", + "EbFL=V-IaFL*Ra\n", + "#N=k*Eb/phi\n", + "NFL=No*EbFL/Ebo\n", + "#results\n", + "print\"speed at full load (rpm) = \",round(NFL,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 9_39" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor on new load (rpm) = 300.0\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_10,pg 9_39\n", + "#calculate the speed of motor on new load\n", + "#given\n", + "N1=800.\n", + "I1=20.\n", + "V=250.\n", + "Ia1=I1\n", + "I2=50.\n", + "Ia2=I2\n", + "Ra=0.2\n", + "Ise1=I1\n", + "Ise2=I2\n", + "Rse=0.3\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse\n", + "#from speed equation\n", + "N2=N1*(Eb2/Eb1)*(Ia1/Ia2)\n", + "#results\n", + "print\"speed of motor on new load (rpm) = \",N2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 9_45" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new current (A) = 40.0\n", + "new speed (rpm) = 2938.776\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_11,pg 9_45\n", + "#calculate the new current and speed\n", + "#given\n", + "V=250.\n", + "Rsh=250.\n", + "Ra=0.25\n", + "Rx=Rsh\n", + "Ia1=20.\n", + "#calculations\n", + "Ish1=V/Rsh\n", + "Ish2=V/(Rsh+Rx)\n", + "N1=1500.\n", + "Eb1=V-Ia1*Ra\n", + "#phi=k*Ish\n", + "#T1=T2\n", + "Ia2=Ish1*Ia1/Ish2#new current\n", + "Eb2=V-Ia2*Ra\n", + "#from speed equation\n", + "N2=N1*(((Eb1/Eb2)*(Ish2/Ish1))**-1)#new speed\n", + "#results\n", + "print\"new current (A) = \",Ia2\n", + "print\"new speed (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 9_46" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance in shunt field (ohm) = 88.313\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_12,pg 9_46\n", + "#calculate the resistance in shunt field\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ra=0.5\n", + "Rsh=250.\n", + "Ia1=20.\n", + "Ish1=V/Rsh\n", + "Eb1=V-Ia1*Ra\n", + "N1=600.\n", + "N2=800.\n", + "#T1=T2\n", + "#Ish1*Ia1=Ish2*Ia2\n", + "#Ish2*Ia2=20............(1)\n", + "#(N1/N2)=(Eb1/Eb2)*(Ish2/Ish1)...........(2)\n", + "#using (1) and (2)\n", + "#240*(Ish2^2)-187.5*Ish2+7.5=0.........(3)\n", + "b=-187.5\n", + "a=240\n", + "c=7.5\n", + "#calculations\n", + "Ish2=(-b+math.sqrt(((b**2)-4*a*c)))/(2*a)#neglecting lower value\n", + "Rx=(V/Ish2)-Rsh\n", + "#results\n", + "print\"resistance in shunt field (ohm) = \",round(Rx,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 9_51" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 912.743\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_13,pg 9_51\n", + "#calculate the speed of motor\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ra=0.15\n", + "Rx=0.1\n", + "Rse=0.1\n", + "N1=800.\n", + "Ise1=30.\n", + "Ia1=30.#Ia1=Ise1\n", + "I1=Ia1\n", + "#phi=k*Ise\n", + "#T2=T1+0.5*T1(increased by 50%)..........(1)\n", + "#Ise2=Ia2*Rx/(Rx+Rse)\n", + "#putting values of Rx and Rse Ise2=0.5*Ia2.........(2)\n", + "#putting (1) and (2) in torque equation\n", + "#calculations\n", + "Ia2=math.sqrt(2700)\n", + "Ise2=0.5*Ia2#from (2)\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse\n", + "#using speed equation\n", + "N2=N1*Eb2*Ise1/(Eb1*Ise2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 9_52" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1119.5122\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_14,pg 9_52\n", + "#calculate the speed of motor\n", + "#given\n", + "V=220.\n", + "Ise1=15.\n", + "Ia1=Ise1\n", + "Ia2=10.\n", + "Ise2=Ia2\n", + "I2=Ia2\n", + "N1=900.\n", + "Ra=0.5\n", + "Rse=0.5\n", + "Rx=4.\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ise1*Rse\n", + "Eb2=V-Ia2*Ra-Ise2*Rse-I2*Rx\n", + "N2=N1*Eb2*Ise1/(Eb1*Ise2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 9_64" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "useful torque (Nm) = 185.26\n", + "efficiency at load (percent) = 79.38\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_15,pg 9_64\n", + "#calculate the useful torque and efficiency at load\n", + "#given\n", + "import math\n", + "P=6.\n", + "V=500.\n", + "A=2.#wave wound\n", + "Z=1200.\n", + "phi=20*10**-3#flux\n", + "Ra=0.5\n", + "Rsh=250.\n", + "Il=20.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "N=Eb*60*A/(phi*P*Z)\n", + "Pm=Eb*Ia#mechanical power\n", + "w=2*math.pi*N/60#angular velocity\n", + "Tg=Pm/w\n", + "ML=900#mechanical losses\n", + "Pout=Pm-ML\n", + "Tsh=Pout/w#usefull torque\n", + "Pin=V*Il\n", + "n=Pout*100/Pin#efficiency at load\n", + "#results\n", + "print\"useful torque (Nm) = \",round(Tsh,2)\n", + "print\"efficiency at load (percent) = \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 9_65" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 1860.85\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_16,pg 9_65\n", + "#calculate the speed of motor\n", + "#given\n", + "V=120.\n", + "Ra=0.2\n", + "Rsh=60.\n", + "#for full load\n", + "Il1=40.\n", + "N1=1800.\n", + "#for shunt motor\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra\n", + "#for half load T2=T1/2\n", + "Ia2=Ia1*0.5#T=k*Ia\n", + "Eb2=V-Ia2*Ra\n", + "N2=N1*Eb2/Eb1#from torque equation\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 9_66" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed as generator (rpm) = 1592.7\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_17,pg 9_66\n", + "#calculate the speed of generator\n", + "#given\n", + "Ra=0.08\n", + "Eb1=242.\n", + "V=250.\n", + "Ia=87.\n", + "Vt=V#generator supply\n", + "Nm=1500.\n", + "#calculations\n", + "Ia1=(V-Eb1)/Ra\n", + "#at start N=0, Eb=0\n", + "Ias=V/Ra#Ia(start)\n", + "Ia2=120\n", + "Eb2=V-Ia2*Ra\n", + "Eg=Vt+Ia*Ra#generator e.m.f\n", + "Ng=Nm*Eg/Eb1#speed as generator\n", + "#results\n", + "print\"speed as generator (rpm) = \",round(Ng,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 9_67" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gross mechanical power (kW) = 70.812\n", + "stray losses (W) = 11132.13\n", + "no load speed (rpm) = 1250.9121\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_18,pg 9_67\n", + "#calculate the gross mechanical power,stray losses and no load speed\n", + "#given\n", + "import math\n", + "V=250.\n", + "Po=59680.\n", + "Rsh=250.\n", + "Ra=0.04\n", + "n=80.#efficiency\n", + "N1=1200.\n", + "#calculations and results\n", + "Il=Po*100/(V*n)#Pi=V*Il\n", + "Ish=V/Rsh\n", + "Ia=Il-Ish\n", + "Eb=V-Ia*Ra\n", + "Pm=Eb*Ia#gross mechanical power\n", + "SL=Pm-Po#stray losses\n", + "print\"gross mechanical power (kW) = \",round(Pm/1000.,3)\n", + "print\"stray losses (W) = \",round(SL,2)\n", + "#on no load\n", + "#Pg=S, Ebo*Iao=SL..........(1)\n", + "#Ebo=V-Iao*Ra............(2)\n", + "#putting (2) in (1)\n", + "#(Iao^2)-6250*Iao+278303.24=0\n", + "b=-6250.\n", + "a=1.\n", + "c=278303.24\n", + "Iao=(-b-math.sqrt((b**2)-4*a*c))/(2*a)\n", + "I=Iao-Ish#current drawn on no load\n", + "Ebo=V-Iao*Ra\n", + "No=N1*Ebo/Eb\n", + "print\"no load speed (rpm) = \",round(No,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19 - pg 9_69" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1234.102\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_19,pg 9_69\n", + "#calculate the full load speed\n", + "#given\n", + "V=250.\n", + "P=4.\n", + "Ra=0.1\n", + "Rsh=125.\n", + "Vbr=2.#brush drop\n", + "#no load condition\n", + "Ilo=4.\n", + "No=1200.\n", + "Il1=61.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra-Vbr\n", + "#full load condition\n", + "#phi1=phio-o.o5*phio (weakened by 5%)\n", + "#phi=phi1/phio\n", + "phi=0.95\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra-Vbr\n", + "N1=No*Eb1/(Ebo*phi)\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N1,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20 - pg 9_70" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "full load speed (rpm) = 1233.396\n", + "speed regulation (percent) = 3.64\n", + "hp rating of machine (hp) = 19.42\n", + "full load efficiency (percent) = 86.48\n", + "The answer differs from the textbook due to rounding off error\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_20,pg 9_70\n", + "#calculate the full load speed, speed regulation, hp rating and efficiency\n", + "#given\n", + "V=250.\n", + "Ra=0.15\n", + "Rsh=166.67\n", + "No=1280.\n", + "Il1=67.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ia1=Il1-Ish\n", + "Eb1=V-Ia1*Ra\n", + "#on no load\n", + "Ilo=6.5\n", + "Ish=1.5\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra\n", + "N1=Eb1*No/Ebo\n", + "Sr=(No-N1)*100/No#speed regulation\n", + "SL=Ebo*Iao\n", + "Po=Eb1*Ia1-SL#full load shaft output\n", + "hp=Po/746.#horse power rating\n", + "Pi=V*Il1\n", + "n=Po*100./Pi\n", + "#results\n", + "print\"full load speed (rpm) = \",round(N1,3)\n", + "print\"speed regulation (percent) = \",round(Sr,2)\n", + "print\"hp rating of machine (hp) = \",round(hp,2)\n", + "print\"full load efficiency (percent) = \",round(n,2)\n", + "print \"The answer differs from the textbook due to rounding off error\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21 - pg 9_71" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 976.389\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_21,pg 9_71\n", + "#calculate the speed of motor\n", + "import math\n", + "#given\n", + "Ra=0.1\n", + "V=110.\n", + "P=4.\n", + "Ia1=50.\n", + "I1=Ia1\n", + "Rse=0.02\n", + "N1=700\n", + "#calculations\n", + "Eb1=V-Ia1*Ra-Ia1*Rse\n", + "#using torque equation T=k*phi*Ia\n", + "Ia2=math.sqrt(2)*Ia1\n", + "Eb2=V-Ia2*Ra-Ia2*Rse/4#parallel speed groups\n", + "#using speed equation N=k*Eb/phi\n", + "N2=N1*Eb2*2*Ia1/(Eb1*Ia2)\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22 - pg 9_73" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new speed of motor (rpm) = 2378.414\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_22,pg 9_73\n", + "#calculate the new speed of motor\n", + "#given\n", + "P=4.\n", + "Ia1=50.\n", + "N1=2000.\n", + "V=230.\n", + "#calculations\n", + "#coils connected in series\n", + "#phi1=k*Ia1*(4*n)=k*200*n\n", + "#coils connected in parallel groups of series coils\n", + "#phi2=k*((Ia2*2*n/2)+(Ia2*2*n/2))=k*2*n*Ia2\n", + "#phi1/phi2=100/Ia2........(1)\n", + "#N1/N2=phi2/phi1........(2)\n", + "#T=kN**2..........(3)\n", + "Ia2=(Ia1*(100**3))**(1./4)#using (1) in (3)\n", + "N2=(((N1**3)*Ia2)/Ia1)**(1./3)\n", + "#results\n", + "print\"new speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 24 - pg 9_76" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "extra resistance to reduce speed (ohm) = 9.744\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_24,pg 9_76\n", + "#calculate the extra resistance to reduce speed\n", + "import math\n", + "#given\n", + "V=200.\n", + "Ia1=30.\n", + "Ra=0.75\n", + "Rse=0.75\n", + "#calculations\n", + "R=Ra+Rse\n", + "Eb1=V-Ia1*R\n", + "#N2=0.6*N1\n", + "N=0.6#N=N2/N1\n", + "#using T=k*Ia**2 and T=k*N**3\n", + "Ia2=math.sqrt(((0.6**3)*30**2))\n", + "#using speed equation N=k*Eb/Ia\n", + "Eb2=N*Eb1*Ia2/Ia1\n", + "#Eb2=V-Ia2*(R+Rx)\n", + "Rx=-(Eb2-V+Ia2*R)/Ia2\n", + "#results\n", + "print\"extra resistance to reduce speed (ohm) = \",round(Rx,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 25 - pg 9_77" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new supply voltage (V) = 354.6875\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_25,pg 9_77\n", + "#calculate the new supply voltage\n", + "#given\n", + "R=1.\n", + "V1=230.\n", + "N1=300.\n", + "Ia1=15.\n", + "N2=375.\n", + "#calculations\n", + "#using torque equation T=k*N^2\n", + "Ia2=N2*Ia1/N1\n", + "#using speed equation N=k*Eb/Ia........(1)\n", + "Eb1=V1-Ia1*R\n", + "#case-2\n", + "#Eb2=V2-Ia2*R=V2-18.75......(2)\n", + "#putting (2) in (1)\n", + "V2=(N2*Eb1*Ia2/(N1*Ia1))+18.75\n", + "#results\n", + "print\"new supply voltage (V) = \",V2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 26 - pg 9_78" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power input in case-2 (kW) = 12.145\n", + "efficiency of motor = 74.107\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_26,pg 9_78\n", + "#calculate the power input and efficiency of motor\n", + "#given\n", + "import math\n", + "V=400.\n", + "Po1=18.5*10**3\n", + "Pi1=22.5*10**3\n", + "Rsh=200.\n", + "Ra=0.4\n", + "Po2=9.*10**3\n", + "#calculations\n", + "I1=Pi1/V\n", + "Ish=V/Rsh\n", + "Ia1=I1-Ish\n", + "Acl=(Ia1**2)*Ra#armature copper loss\n", + "Scl=(Ish**2)*Rsh#shunt feild copper loss\n", + "TL=Pi1-Po1#total losses\n", + "SFl=TL-(Acl+Scl)#stray and friction loss\n", + "#case-2\n", + "Pm=Po2+SFl#mechanical power\n", + "#Pm=Eb2*Ia2.........(1)\n", + "#Eb2=V-Ia2*Ra.......(2)\n", + "#using (1) and (2)\n", + "#0.4*(Ia2**2)-400*Ia2+11022.75=0\n", + "a=0.4\n", + "b=-400\n", + "c=11022.775\n", + "Ia2=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "Pi2=Po2+(Ia2**2)*Ra+(Ish**2)*Rsh+SFl\n", + "n=Po2*100/Pi2#efficiency\n", + "#results\n", + "print\"power input in case-2 (kW) = \",round(Pi2/1000.,3)\n", + "print\"efficiency of motor = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 27 - pg 9_79" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum efficiency = 75.59\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_27,pg 9_79\n", + "#calculate the maximum efficiency\n", + "#given\n", + "import math\n", + "V=250.\n", + "Ilo=4.\n", + "Ra=1.\n", + "Rsh=250.\n", + "Il1=20.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Ia1=Il1-Ish\n", + "Ebo=V-Iao*Ra\n", + "Po=Ebo*Iao\n", + "Eb1=V-Ia1*Ra\n", + "P1=Eb1*Ia1\n", + "Pout=P1-Po\n", + "Pi=V*Il1\n", + "n=Pout*100/Pi\n", + "#fro max. efficiency\n", + "#const. losses=variable losses\n", + "Ia=math.sqrt(Po+(Ish**2)*Rsh)\n", + "Ebm=V-Ia*Ra\n", + "Pm=Ebm*Ia\n", + "Pout=Pm-Po\n", + "Pi=V*(Ia+Ish)\n", + "nm=Pout*100/Pi\n", + "#results\n", + "print\"maximum efficiency = \",round(nm,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28 - pg 9_81" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "back e.m.f (V) = 83.33\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_28,pg 9_81\n", + "#calculate the back emf\n", + "#given\n", + "V=250.\n", + "FLo=16.*10**3#full scale output\n", + "n=80.\n", + "#calculations\n", + "I=FLo*100/n#input\n", + "Il=I/V\n", + "Il=Il\n", + "Ia=1.5*Il\n", + "#at start\n", + "Ra=V/Ia\n", + "Rac=0.18#Ra actual\n", + "Ras=Ra-Rac#Ra starter\n", + "Ia=Il#Ia drops as motor starts\n", + "Eb=V-Ia*(Ra)\n", + "#results\n", + "print\"back e.m.f (V) = \",round(Eb,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 29 - pg 9_82" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electromagnetic torque (Nm) = 122.148\n", + "flux per pole (mWb) = 11.9316\n", + "efficiency of motor (percent) = 85.733\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_29,pg 9_82\n", + "#calculate the electromagnetic torque, flux and efficiency\n", + "#given\n", + "import math\n", + "Po=20.*735.5#(in W)\n", + "V=230.\n", + "N=1150.\n", + "P=4.\n", + "A=P\n", + "Z=882.\n", + "Ia=73.\n", + "Ish=1.6\n", + "#calculations\n", + "T=60*Po/(2*math.pi*N)\n", + "phi=T*A/(0.159*Ia*P*Z)#flux per pole\n", + "Il=Ia+Ish\n", + "Pin=V*Il\n", + "n=Po*100/Pin\n", + "#results\n", + "print\"electromagnetic torque (Nm) = \",round(T,4)\n", + "print\"flux per pole (mWb) = \",round(phi*1000.,4)\n", + "print\"efficiency of motor (percent) = \",round(n,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 30 - pg 9_83" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor (rpm) = 785.478\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_30,pg 9_83\n", + "#calculate the speed of motor\n", + "#given\n", + "Pr=12.*10**3#rated output\n", + "V=200.\n", + "Rsh=80.\n", + "N1=800.\n", + "n=0.9#efficiency\n", + "#calculations\n", + "Out=0.8*Pr#output is 80% of rated\n", + "In=Out/n#input\n", + "TL=In-Out\n", + "#for max. efficiency\n", + "Iln=70#new current\n", + "#TL=Wc+(Ia1^2)*Ra\n", + "#bur Wc=(Ia1^2)*Ra\n", + "Wc=TL/2\n", + "Il=In/V\n", + "Ish=V/Rsh\n", + "Ia1=Il-Ish\n", + "Ra=Wc/(Ia1**2)\n", + "Ia2=Iln-Ish\n", + "Wcn=Wc#const. losses remain same\n", + "TL=(Ia2**2)*Ra+Wcn\n", + "Pi=V*Iln\n", + "n=(Pi-TL)*100/Pi\n", + "Eb1=V-Ia1*Ra\n", + "Eb2=V-Ia2*Ra\n", + "N2=N1*Eb2/Eb1\n", + "#results\n", + "print\"speed of motor (rpm) = \",round(N2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 31 - pg 9_85" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "efficiency of motor (percent) = 84.896\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_31,pg 9_85\n", + "#calculate the efficiency of motor\n", + "#given\n", + "Po=8.952*10**3\n", + "V=440.\n", + "Ra=1.1\n", + "Rsh=650\n", + "Rint=0.4\n", + "Rreg=50.\n", + "Ml=450.\n", + "Vbr=2.#brush drop\n", + "Il=24.\n", + "#calculations\n", + "Rat=Ra+Rint#series connection\n", + "Rsht=Rsh+Rreg#series connection\n", + "Ish=V/Rsht\n", + "Ia=Il-Ish\n", + "Acl=(Ia**2)*Rat#armature copper loss\n", + "Fcl=(Ish**2)*Rsht#feild copper loss\n", + "Bdl=Vbr*Ia#brush drop loss\n", + "TL=Acl+Fcl+Bdl+Ml\n", + "n=Po*100/(Po+TL)\n", + "#results\n", + "print\"efficiency of motor (percent) = \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 32 - pg 9_85" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motors (rpm) = 334.816\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_32,pg 9_85\n", + "#calculate the speed of motors\n", + "#given\n", + "#for first motor\n", + "N1=700.\n", + "R=0.5#Ra+Rse\n", + "I1=70.\n", + "V=500.\n", + "#calculations\n", + "Eb1=V-I1*R\n", + "K1=Eb1/(N1*I1)\n", + "#for second motor\n", + "N2=750.\n", + "R=0.5\n", + "I2=70.\n", + "V=500.\n", + "Eb2=V-I2*R\n", + "K2=Eb2/(N2*I2)\n", + "#motors in series\n", + "It=70.\n", + "Rt=2*R\n", + "Eb=V-It*Rt\n", + "N=Eb/(K1*It+K2*It)\n", + "#results\n", + "print\"speed of motors (rpm) = \",round(N,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 33 - pg 9_86" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum efficiency output (W) = 10225.936\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_33,pg 9_86\n", + "#calculate the maximum efficiency output\n", + "#given\n", + "import math\n", + "Po=7.46*10**3\n", + "V=250\n", + "Ilo=5.\n", + "Ra=0.5\n", + "Rsh=250.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Iao=Ilo-Ish\n", + "Acl=(Iao**2)*Ra\n", + "Fcl=(Ish**2)*Rsh\n", + "Pi=V*Ilo\n", + "FWl=Pi-Acl-Fcl#friction and windage loss\n", + "#Pin=Eb*Ia=(V-Ia*Ra)*Ia\n", + "#0.5*(Ia**2)-250*Ia+8452=0\n", + "b=-250\n", + "a=0.5\n", + "c=8452\n", + "Ia=(-b-math.sqrt((b**2)-4*a*c))/(2*a)#neglecting higher value\n", + "TL=(Ia**2)*Ra+(Ish**2)*Rsh+FWl\n", + "n=Po*100/(Po+TL)\n", + "#for max. efficiency\n", + "Ia=math.sqrt((FWl+Fcl)/Ra)\n", + "Eb=V-Ia*Ra\n", + "Pm=Eb*Ia\n", + "#Po at nmax\n", + "Po=Pm-FWl\n", + "#results\n", + "print\"maximum efficiency output (W) = \",round(Po,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 34 - pg 9_87" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of motor case-1 (rpm) = 946.817\n", + "speed of motor case-2 (rpm) = 830.983\n", + "speed of motor case-3 (rpm) = 1101.3554\n" + ] + } + ], + "source": [ + "#Chapter-9,Example9_33,pg 9_87\n", + "#calculate the speed of motor in both cases\n", + "#given\n", + "V=500.\n", + "Ra=1.2\n", + "Rsh=500.\n", + "#calculations\n", + "Ish=V/Rsh\n", + "Ilo=4.\n", + "Iao=Ilo-Ish\n", + "Ebo=V-Iao*Ra\n", + "Il1=26.\n", + "Ish1=1.\n", + "Ia1=Il1-Ish1\n", + "Eb1=V-Ia1*Ra\n", + "No=1000.\n", + "N1=No*Eb1/Ebo\n", + "print\"speed of motor case-1 (rpm) = \",round(N1,3)\n", + "Rx=2.3#connected in series with armature\n", + "Eb2=V-Ia1*(Ra+Rx)\n", + "N2=N1*Eb2/Eb1\n", + "#results\n", + "print\"speed of motor case-2 (rpm) = \",round(N2,3)\n", + "Ish3=Ish1-0.15*Ish1#reduced by 15%\n", + "Ia3=Ish1*Ia1/(Ish3)\n", + "Eb3=V-Ia3*Ra\n", + "N3=N1*Eb3*Ish1/(Eb1*Ish3)\n", + "print\"speed of motor case-3 (rpm) = \",round(N3,4)\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/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 new file mode 100644 index 00000000..1facaa58 --- /dev/null +++ b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ravi Teja +Course: btech +College/Institute/Organization: RVR and JC college of engineering +Department/Designation: Mechanical Engineering +Book Title: Electronic and Electrical Measuring Instruments & Machines +Author: Bakshi And Bakshi +Publisher: Technical Publications, Pune +Year of publication: 2009 +Isbn: 978-81-8431-554-7 +Edition: 1 \ No newline at end of file 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 new file mode 100644 index 00000000..0b079b20 Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap1.png differ 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 new file mode 100644 index 00000000..f0fcaa85 Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap4.png differ 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 new file mode 100644 index 00000000..937d5b91 Binary files /dev/null and b/Electronic_and_Electrical_Measuring_Instruments_&_Machines_by_Bakshi_And_Bakshi/screenshots/chap7.png differ diff --git a/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(B.M.D).png b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(B.M.D).png new file mode 100755 index 00000000..adb611ed Binary files /dev/null and b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(B.M.D).png differ diff --git a/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(S.F.D).png b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(S.F.D).png new file mode 100755 index 00000000..44847982 Binary files /dev/null and b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.2(S.F.D).png differ diff --git a/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.3(B.M.D).png b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.3(B.M.D).png new file mode 100755 index 00000000..77ffecc4 Binary files /dev/null and b/Engineering_Mechancis,_Schaum_Series/screenshots/Ex8.3(B.M.D).png differ diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter1.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter1.ipynb new file mode 100755 index 00000000..1c446b6f --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter1.ipynb @@ -0,0 +1,928 @@ +{ + "metadata": { + "name": "chapter 1.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 1:Vectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-1,Page no: 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initialisation of Variables\n", + "\n", + "f1=120 #lb\n", + "f2=100 #lb\n", + "theta=((60*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "R=sqrt(120**2+100**2-(2*120*100*cos(theta))) #Applying Thr rule of Cosines\n", + "alpha1=(((arcsin(120*sin(theta)/111))*180)/pi) #Applying the Law of Sines\n", + "alpha=alpha1+270 #As the vector lies in the fourth Quadrant by obsrevaton\n", + "\n", + "#Results\n", + "\n", + "print'The Resultant of The force system is equal to',round(R),\"lb\" #lb\n", + "print'The Resultant is at',round(alpha),\"degrees\" #degrees\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Resultant of The force system is equal to 111.0 lb\n", + "The Resultant is at 339.0 degrees\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-2,Page no: 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "P=100 #lb\n", + "Q=120 #lb\n", + "theta=((30*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "R_x=Q*cos(theta) #lb\n", + "R_y=Q*sin(theta)-P #lb\n", + "R=sqrt(R_x**2+R_y**2) #lb Triangle law\n", + "Theta_1=((arctan(R_y/R_x))*180)/pi #degrees\n", + "Theta_R=360+Theta_1 #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The resultant is at',round(Theta_R),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 111.0 lb\n", + "The resultant is at 339.0 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-3,Page No: 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "R=400 # N\n", + "F2=200 # N\n", + "Theta1=((120*pi)/180) # radians\n", + "Theta2=((20*pi)/180) # radians\n", + "Theta=Theta1-Theta2 # radians\n", + "\n", + "# Calculation\n", + "\n", + "F=sqrt(R**2+F2**2-(2*R*F2*cos(Theta))) # N.Applying the Rule of Cosine\n", + "Theta_r=arcsin((400*sin(Theta))/F) #radians Applying the rule of sines\n", + "Theta_R=(Theta_r*180)/pi\n", + "\n", + "# Result\n", + "\n", + "print'The resultant of the force system is',round(F),\"N\"\n", + "print'The Angle between F and 200N force is',round(Theta_R,1),\"degrees\"\n", + "\n", + "# Theta_R is off by 0.1 degrees" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 477.0 N\n", + "The Angle between F and 200N force is 55.6 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-4, Page No: 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "F1=280 # N\n", + "F2=130 # N\n", + "Theta1=((320*pi)/180) # Radians\n", + "Theta2=((60*pi)/180) # Radians\n", + "\n", + "# Calculations\n", + "\n", + "R_x=-F1*cos(Theta1)+F2*cos(Theta2) # N\n", + "R_y=F1*sin(Theta1)-F2*sin(Theta2) # N\n", + "R=sqrt(R_x**2+R_y**2) # N Applying Triangle Law\n", + "ThetaR=arctan(R_y/R_x) # radians\n", + "Theta_R=360-(ThetaR*180/pi) # degrees\n", + "\n", + "# Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"N\"\n", + "print'The resultant is at',round(Theta_R),\"degrees\"\n", + "\n", + "# The answer for R waries from textbook. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 329.0 N\n", + "The resultant is at 297.0 degrees\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-5, Page No: 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "F1=26 #lb\n", + "F2=39 #lb\n", + "F3=63 #lb\n", + "F4=57 #lb\n", + "T1=((10*pi)/180) #Radians\n", + "T2=((114*pi)/180) #Radians\n", + "T3=((183*pi)/180) #radians\n", + "T4=((261*pi)/180) #radians\n", + "\n", + "# Calculations\n", + "\n", + "R_x=F1*cos(T1)+F2*cos(T2)+F3*cos(T3)+F4*cos(T4) # lb Resolving vectors\n", + "R_y=F1*sin(T1)+F2*sin(T2)+F3*sin(T3)+F4*sin(T4) # lb resolving vectors\n", + "R=sqrt(R_x**2+R_y**2) # lb Applying Triangle Law\n", + "theta=arctan(R_y/R_x)# radians\n", + "Theta=(theta*180)/pi # degrees\n", + "Theta_R=180+Theta\n", + "\n", + "# Results\n", + "\n", + "print'The Resultant of the force system is',round(R),\"lb\"\n", + "print'The resultant is at',round(Theta_R),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Resultant of the force system is 65.0 lb\n", + "The resultant is at 197.0 degrees\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-6, Page No: 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=10 #lb\n", + "theta1=((60*pi)/180) #radians\n", + "theta2=((45*pi)/180) #radians\n", + "theta=theta1-theta2 #radians\n", + "\n", + "#Calculation\n", + "\n", + "F_OH=F/cos(theta) #lb resolving vectors\n", + "\n", + "# Result\n", + "\n", + "print'The component of F in the direction of OH is',round(F_OH,2),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of F in the direction of OH is 10.35 lb\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-7, Page No: 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "weight=80 #kg\n", + "theta=((20*pi)/180) #radians\n", + "theta_p=((70*pi)/180) # radians\n", + "\n", + "#Calcuations\n", + "\n", + "#Part (a)\n", + "F=weight*9.81 # N\n", + "R=F*cos(theta) #N\n", + "#part (b)\n", + "R_p=F*cos(theta_p) #N\n", + "\n", + "#Result\n", + "\n", + "print'The normal component is',round(R),\"N\"\n", + "print'The parallel component is',round(R_p),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component is 737.0 N\n", + "The parallel component is 268.0 N\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-8, Page No: 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "P=235 #N\n", + "theta=((60*pi)/180) #radians\n", + "bet=((22*pi)/180) #radians\n", + "gam=((38*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "#Part (a)\n", + "P_h=P*cos(theta) #N\n", + "P_v=P*sin(theta) #N\n", + "#Part (b)\n", + "P_l=P*cos(theta-bet) #N\n", + "P_p=P*sin(gam) #N\n", + "\n", + "#Result\n", + "\n", + "print'The horizontal component is',round(P_h,1),\"N\"\n", + "print'The vertical component is',round(P_v,1),\"N\"\n", + "print'The component parallel to plane is',round(P_l),\"N\"\n", + "print'The component perpendicular to the plane is',round(P_p,1),\"N\"\n", + "\n", + "#The decimal point accuracy might cause a small discrepancy in the answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal component is 117.5 N\n", + "The vertical component is 203.5 N\n", + "The component parallel to plane is 185.0 N\n", + "The component perpendicular to the plane is 144.7 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-9, Page No: 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=90 #lb\n", + "theta1=((40*pi)/180) #radians\n", + "theta2=((30*pi)/180) #radians\n", + "\n", + "# Calculations\n", + "\n", + "R_x=0 #lb\n", + "R_y=20 # lb\n", + "#Taking the sum of forces in the X-Direction\n", + "P=((F1*cos(theta1))/cos(theta2)) # lb\n", + "# Taking the sum of the forces in the Y-Direction\n", + "F=(P*sin(theta2))+(F1*sin(theta1))-20 #lb\n", + "\n", + "# Results\n", + "\n", + "print'The value of P is',round(P,1),\"lb\"\n", + "print'The value of F is',round(F,1),\"lb\"\n", + "\n", + "# Decimal point error may cause a small discrepancy in the answers." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P is 79.6 lb\n", + "The value of F is 77.7 lb\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-10, Page No: 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "x=4 # m\n", + "y=3 # m\n", + "z=2 # m\n", + "F=50 #N\n", + "\n", + "# Calculations\n", + "\n", + "OP=sqrt(x**2+y**2+z**2) #m\n", + "thetax=(x/OP) #radians\n", + "thetay=(y/OP) #Radians\n", + "thetaz=(z/OP) #radians\n", + "P_x=F*(thetax) #N\n", + "P_y=F*(thetay) #N\n", + "P_z=F*(thetaz) #N\n", + "\n", + "# Result\n", + "\n", + "print'The vector P is',round(P_x,1),\"i +\",round(P_y,1),\"j +\",round(P_z,1),\"k\"\n", + "\n", + "# component of i is off by 0.1 units" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vector P is 37.1 i + 27.9 j + 18.6 k\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-11, Page No: 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "x=2 \n", + "y=-4\n", + "z=1\n", + "F=100 #N\n", + "\n", + "#Calculation\n", + "\n", + "thetax=x/sqrt(x**2+y**2+z**2) #radians\n", + "thetay=y/sqrt(x**2+y**2+z**2) #radians\n", + "thetaz=z/sqrt(x**2+y**2+z**2) #radians\n", + "P_x=F*thetax #N\n", + "P_y=F*thetay #N\n", + "P_z=F*thetaz #N\n", + "\n", + "#Result\n", + "\n", + "print'The vector P is',round(P_x,1),\"i\",round(P_y,1),\"j +\",round(P_z,1),\"k\"\n", + "\n", + "# component off i is off by 0.1 units" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vector P is 43.6 i -87.3 j + 21.8 k\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-12, Page No: 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Solution\n", + "\n", + "print'P X Q=(Pxi+Pyj+Pzk)x(Qxi+Qyj+Qzk)'\n", + "print' =(PxQx)i x i+(PxQy)i x j +(PxQz)i x k'\n", + "print'But i x i = j x j = k x k =0; and i x j =k and j x i= -k, etc. Hence'\n", + "print'P X Q= (PxQy)k-(PxQz)j-(PyQx)k+(PxQz)i+(PzQx)j-(PzQy)i'\n", + "print'These terms can be grouped as'\n", + "print'P X Q=(PyQz-PzQy)i+(PzQx-PxQz)j+(PxQy-PyQx)k'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P X Q=(Pxi+Pyj+Pzk)x(Qxi+Qyj+Qzk)\n", + " =(PxQx)i x i+(PxQy)i x j +(PxQz)i x k\n", + "But i x i = j x j = k x k =0; and i x j =k and j x i= -k, etc. Hence\n", + "P X Q= (PxQy)k-(PxQz)j-(PyQx)k+(PxQz)i+(PzQx)j-(PzQy)i\n", + "These terms can be grouped as\n", + "P X Q=(PyQz-PzQy)i+(PzQx-PxQz)j+(PxQy-PyQx)k\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-13,Page No: 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "Fx=2.63 #N\n", + "Fy=4.28 #N\n", + "Fz=-5.92 #N\n", + "\n", + "#Calculation\n", + "\n", + "F=sqrt(Fx**2+Fy**2+Fz**2) #N\n", + "thetax=((arccos(Fx/F))*180)/pi #degrees\n", + "thetay=((arccos(Fy/F))*180)/pi #degrees\n", + "thetaz=((arccos(Fz/F))*180)/pi #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The magnitude of force is',round(F,2),\"N\"\n", + "print'Thetax',round(thetax,1),\"degrees\"\n", + "print'Thetay',round(thetay,1),\"degrees\"\n", + "print'Thetaz',round(thetaz,1),\"degrees\"\n", + "\n", + "# Decimal point error may cause a small discrepancy in the answers." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of force is 7.76 N\n", + "Thetax 70.2 degrees\n", + "Thetay 56.5 degrees\n", + "Thetaz 139.7 degrees\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-14, Page No: 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "P=[4.82, -2.33, 5.47] #N\n", + "Q=[-2.81,-6.09,1.12 ] #m\n", + "\n", + "#Calculations\n", + "\n", + "M=P[0]*Q[0]+P[1]*Q[1]+P[2]*Q[2] #Nm\n", + "\n", + "#Results\n", + "\n", + "print'Result is',round(M,2),\"N.m\"\n", + "\n", + "# Decimal point error in calculation causes a small discrepancy in the answer." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result is 6.77 N.m\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-15, Page No: 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "#Initilization of variables\n", + "\n", + "x1=2 #units\n", + "x2=-2 #units\n", + "y1=3 #units\n", + "y2=4 #units\n", + "z1=0 #units\n", + "z2=6 #units\n", + "P=np.array([2,3,-1]) #units\n", + "\n", + "#Calculations\n", + "\n", + "X=sqrt((x2-x1)**2+(y2-y1)**2+(z2-z1)**2) #units\n", + "eLx=(x2-x1)/X #units\n", + "eLy=(y2-y1)/X #units\n", + "eLz=(z2-z1)/X #units\n", + "Q=np.array([eLx,eLy,eLz]) #units\n", + "Z=P[0]*Q[0]+P[1]*Q[1]+P[2]*Q[2] # units\n", + "\n", + "#Result\n", + "\n", + "print'The unit vector is',round(eLx,3),\"i +\",round(eLy,3),\"j +\",round(eLz,3),\"k\"\n", + "print'The projection of P is',round(Z,2),\"units\"\n", + "\n", + "#Note:The final answer for the projection of P is off by 0.1 units\n", + "#The answer mentioned in the textbook is -1.41\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The unit vector is -0.549 i + 0.137 j + 0.824 k\n", + "The projection of P is -1.51 units\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-16, Page No: 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "#Initilization of variables\n", + "\n", + "x1=2 #units\n", + "x2=5 #units\n", + "y1=-5 #units\n", + "y2=2 #units\n", + "z1=3 #units\n", + "z2=-4 #units\n", + "P=np.array([10,-8,14]) #units\n", + "\n", + "#Calculations\n", + "\n", + "X=sqrt((x2-x1)**2+(y2-y1)**2+(z2-z1)**2) #units\n", + "eLx=(x2-x1)/X #units\n", + "eLy=(y2-y1)/X #units\n", + "eLz=(z2-z1)/X #units\n", + "Q=np.array([eLx,eLy,eLz]) #units\n", + "Z=P[0]*Q[0]+P[1]*Q[1]+P[2]*Q[2] #units\n", + "\n", + "#Result\n", + "\n", + "print'The unit vector is',round(eLx,3),\"i +\",round(eLy,3),\"j\",round(eLz,3),\"k\" \n", + "print'The projection of P is',round(Z),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The unit vector is 0.29 i + 0.677 j -0.677 k\n", + "The projection of P is -12.0 lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-17, Page No: 14\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "Px=2.85 #ft\n", + "Py=4.67 #ft\n", + "Pz=-8.09 #ft\n", + "Qx=28.3 #lb\n", + "Qy=44.6 #lb\n", + "Qz=53.3 #lb\n", + "\n", + "#Calculations\n", + "\n", + "X=(Py*Qz-Pz*Qy) #N.m \n", + "Y=(Pz*Qx-Px*Qz) #N.m\n", + "Z=(Px*Qy-Py*Qx) #N.m\n", + "\n", + "#Result\n", + "\n", + "print'The cross product is',round(X),\"i\",round(Y),\"j\",round(Z),\"k lb-ft\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cross product is 610.0 i -381.0 j -5.0 k lb-ft\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-18, Page No: 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Result\n", + "#As this is symbolic solution directly print command is being used to give the required output\n", + "\n", + "print'The Time derivative is '\n", + "print'dr/dt=(dx/dt)i+12*y(dy/dt)j-3*(dz/dt)k'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Time derivative is \n", + "dr/dt=(dx/dt)i+12*y(dy/dt)j-3*(dz/dt)k\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1-19, Page No: 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return x**2\n", + "a=1\n", + "b=1\n", + "I=quad(integrand, 1, 3, args=(a,b))\n", + "\n", + "def integrand(y, a, b):\n", + " return 2*y\n", + "a=1\n", + "b=1\n", + "J=quad(integrand, 1, 3, args=(a,b))\n", + "\n", + "def integrand(z, a, b):\n", + " return 1\n", + "a=1\n", + "b=1\n", + "K=quad(integrand, 1, 3, args=(a,b))\n", + "\n", + "# Results\n", + "print'The answer is',round(I[0],2),\"i +\",round(J[0]),\"j -\",round(K[0]),\"k.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The answer is 8.67 i + 8.0 j - 2.0 k.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter10.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter10.ipynb new file mode 100755 index 00000000..3204ca3c --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter10.ipynb @@ -0,0 +1,426 @@ +{ + "metadata": { + "name": "chapter 10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 10: FIRST MOMENTS AND CENTROIDS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5, Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "r=50 #mm\n", + "L1=75 #mm\n", + "L2=pi*r #mm\n", + "L3=61.2 #mm\n", + "# as theta1=45 degrees & theta2=60 degrees\n", + "sintheta1=sqrt(2)**-1\n", + "costheta1=sqrt(2)**-1\n", + "sintheta2=sqrt(3)*2**-1\n", + "costheta2=2**-1\n", + "\n", + "#Calculations\n", + "x_bar=np.array([(L1/2)*costheta1,L1*costheta1+r,L1*costheta1+100+(L3/2)*costheta2]) #mm\n", + "y_bar=np.array([(L1/2)*sintheta1,L1*sintheta1+(2*r)/pi,(L3/2)*sintheta2]) #mm\n", + "#Centroid Calculations\n", + "x=(L1*x_bar[0]+L2*x_bar[1]+L3*x_bar[2])/(L1+L2+L3) #mm\n", + "y=(L1*y_bar[0]+L2*y_bar[1]+L3*y_bar[2])/(L1+L2+L3) #mm\n", + "\n", + "#Result\n", + "print'The centroid is as follows:'\n", + "print'x=',round(x,1),\"mm\"\n", + "print'y=',round(y,1),\"mm\"\n", + "\n", + "# The answer may wary due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid is as follows:\n", + "x= 97.0 mm\n", + "y= 57.7 mm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6, Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "theta=75 #degrees\n", + "theta1=30 #degrees\n", + "sintheta=0.96\n", + "costheta=0.25\n", + "sintheta1=2**-1\n", + "costheta1=sqrt(3)*2**-1\n", + "alpha=(150*pi)/180 #rad\n", + "r=1\n", + "lhor=14 #in\n", + "\n", + "#calculations\n", + "a=((2*r)/alpha)*sintheta #in\n", + "p=90-theta\n", + "sinp=0.259\n", + "y=-a*sinp #in\n", + "#Length of arc\n", + "l=r*alpha #in\n", + "#Slope length calculations\n", + "DF=7 #in\n", + "AB=DF #in\n", + "BC=1 #in\n", + "BF=BC*costheta1 #in\n", + "FC=BC*sintheta1 #in\n", + "DC=DF+FC #in\n", + "EC=DC/costheta1 #in\n", + "#Centroid of EC is at G\n", + "yslope=0.5*EC*sintheta1+BF #in\n", + "#Y of composite figure\n", + "Y=((2*l*y)+14*-1+(2*EC*yslope))/(2*l+lhor+2*EC) #in\n", + "\n", + "#Result\n", + "print'The centroid is at Y=',round(Y,2),\"in\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid is at Y= 1.03 in\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-11, Page no 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "a=100 #mm\n", + "b=150 #mm\n", + "A1=2*10**4 #mm**2\n", + "A2=5*10**3 #mm**2\n", + "A3=(pi*(a/2)**2)/2 #mm**2\n", + "\n", + "#Calculations\n", + "x=(A1*a+A2*(133.3)-A3*b)/(A1+A2-A3) #mm\n", + "y=(A1*a*0.5+A2*(116.66)-A3*((4*a*0.5)/(3*pi)))/(A1+A2-A3) #mm\n", + "\n", + "#Result\n", + "print'The centroidal distances are'\n", + "print'x=',round(x,1),\"mm\"\n", + "print'y=',round(y,1),\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal distances are\n", + "x= 98.6 mm\n", + "y= 71.2 mm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-16, Page no 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "V=np.array([1728*10**3,432*10**3,7.54*10**3])\n", + "x_bar=np.array([60,140,60]) #mm\n", + "y_bar=np.array([30,20,30]) #mm\n", + "\n", + "#Calculations\n", + "x=(V[0]*x_bar[0]+V[1]*x_bar[1]+V[2]*x_bar[2])/(V[0]+V[1]+V[2]) #mm\n", + "y=(V[0]*y_bar[0]+V[1]*y_bar[1]+V[2]*y_bar[2])/(V[0]+V[1]+V[2]) #mm\n", + "z=120 #mm from symmetry\n", + "\n", + "#Result\n", + "print'The centroid is at'\n", + "print'x=',round(x,1),\"mm\"\n", + "print'y=',round(y,1),\"mm\"\n", + "print'z=',round(z,1),\"mm\"\n", + "\n", + "#Decimal accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid is at\n", + "x= 75.9 mm\n", + "y= 28.0 mm\n", + "z= 120.0 mm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-17, Page no 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# Here tx=30 degrees,ty=45 degrees& tz=60 degrees,, thus\n", + "sintx=2**-1\n", + "costx=sqrt(3)*2**-1\n", + "sinty=sqrt(2)**-1\n", + "costy=sqrt(2)**-1\n", + "sintz=sqrt(3)*2**-1\n", + "costz=2**-1\n", + "\n", + "#Calculations\n", + "V=np.array([10,15,25]) #in**3\n", + "x_bar=np.array([4,12,24]) #in\n", + "y_bar=np.array([4*costx,-6*costy,-4*costz])\n", + "z_bar=np.array([-4*sintx,6*sinty,-4*sintz])\n", + "#Centroid calculations\n", + "x=(V[0]*x_bar[0]+V[1]*x_bar[1]+V[2]*x_bar[2])/(V[0]+V[1]+V[2]) #in\n", + "y=(V[0]*y_bar[0]+V[1]*y_bar[1]+V[2]*y_bar[2])/(V[0]+V[1]+V[2]) #in\n", + "z=(V[0]*z_bar[0]+V[1]*z_bar[1]+V[2]*z_bar[2])/(V[0]+V[1]+V[2]) #in\n", + "\n", + "#Result\n", + "print'The centroid of three volumes is at'\n", + "print'x=',round(x,1),\"in\"\n", + "print'y=',round(y,2),\"in\"\n", + "print'z=',round(z,2),\"in\"\n", + "\n", + "# The ans for x is off by 0.4 in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid of three volumes is at\n", + "x= 16.0 in\n", + "y= -1.58 in\n", + "z= -0.86 in\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-26, Page no 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Part a\n", + "# Pefer textbook for part a.\n", + "\n", + "# Part b\n", + "\n", + "# Initilization of variables\n", + "w=150 #lb/ft**2\n", + "h=2 #ft height of the load\n", + "s=8 #ft span\n", + "b=2 #ft\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return x*(150*(x/4)*2)\n", + "a=1\n", + "b=1\n", + "M=quad(integrand, 0, s, args=(a,b))\n", + "Rr=M[0]/(2*s) #lb\n", + "\n", + "# Results\n", + "print'The value of M is',round(M[0]),\"lb-ft\"\n", + "print'The value of Rr is',round(Rr),\"lb\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of M is 12800.0 lb-ft\n", + "The value of Rr is 800.0 lb\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-27, Page no 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initilization of variables\n", + "\n", + "rho_m=1000 # kg/m**3\n", + "h=0.3 # m height of hole\n", + "b=0.6 # m width of hole\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(y, a, b):\n", + " return y*9.8*rho_m*(1.2-y)*(0.6)\n", + "a=1\n", + "b=1\n", + "I=quad(integrand, 0, h, args=(a,b))\n", + "B=I[0]/(2*(0.3))\n", + "\n", + "# Results\n", + "print'The value of B is',round(B),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of B is 441.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-28, Page no 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=62.4 #lb/ft**3\n", + "h=12 #ft\n", + "f=105 #lb/ft**3\n", + "\n", + "#Calculations\n", + "p1=l*h #lb/ft**2\n", + "#Total force on left side\n", + "#Simplfying the equation we get a three degree equation in d\n", + "#solving for d\n", + "p=np.array([3**-1,0,-144,467])\n", + "r=roots(p)\n", + "d=r[2] #ft\n", + "\n", + "#Result\n", + "print'The value of d is',round(d,2),\"feet\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of d is 3.33 feet\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter11.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter11.ipynb new file mode 100755 index 00000000..eaf10557 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter11.ipynb @@ -0,0 +1,113 @@ +{ + "metadata": { + "name": "chapter 11.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 11: VIRTUAL WORK" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11-6, Page no 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "N=100 #lb\n", + "mu=0.3 #coefficient of friction\n", + "l=5 #in compressed to length\n", + "\n", + "#Calculations\n", + "#Simplfying the calculations we obtain\n", + "M=8*(N+N*mu) #lb-in\n", + "\n", + "#Result\n", + "print'The Moment is',round(M,3),\"lb-in\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Moment is 1040.0 lb-in\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11-7, Page no 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=10 #kg\n", + "g=9.81 # m/s**2\n", + "F=200 #N\n", + "l=3 #m\n", + "\n", + "#Calculations\n", + "#Applying Virtual work principle\n", + "By=m*g*0.5 #N\n", + "Bx=F*(2*3**-1) #N\n", + "#By equations of equilibrium\n", + "Ax=-Bx-F #N negative sign indictaes the LEFT orientation\n", + "Ay=m*g-By #N\n", + "\n", + "#Result\n", + "print'The values are'\n", + "print'Ax=',round(Ax),\"N to left\"\n", + "print'Ay=',round(Ay),\"N up\"\n", + "print'Bx=',round(Bx),\"N to right\"\n", + "print'By=',round(By),\"N up\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are\n", + "Ax= -333.0 N to left\n", + "Ay= 49.0 N up\n", + "Bx= 133.0 N to right\n", + "By= 49.0 N up\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter12.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter12.ipynb new file mode 100755 index 00000000..1b0decf3 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter12.ipynb @@ -0,0 +1,1521 @@ +{ + "metadata": { + "name": "chapter 12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 12: KINEMATICS OF A PARTICLE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 12.12-1, Page No 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "t=4 #seconds\n", + "\n", + "# Calculations\n", + "#Displacement \n", + "x=3*t**3+t+2 #ft\n", + "# Velocity\n", + "v=9*t**2+1 # ft/s\n", + "# Acceleration\n", + "a=18*t # ft/s**2\n", + "\n", + "# Result\n", + "print'The dipalacemnt is',round(x),\"ft\"\n", + "print'The velocity is ',round(v),\"ft/s\"\n", + "print'The acceleration is ',round(a),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dipalacemnt is 198.0 ft\n", + "The velocity is 145.0 ft/s\n", + "The acceleration is 72.0 ft/s**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-2, Page No 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "t1=4 #s\n", + "t2=5 #s\n", + "\n", + "# Calculation\n", + "v1=9*t1**2+1 # ft/s\n", + "v2=9*t2**2+1 # ft/s\n", + "a=(v2-v1)/(t2-t1) # m/s**2\n", + "\n", + "# Result\n", + "print'The acceleration during fifth second is',round(a),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration during fifth second is 81.0 ft/s**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-3, Page No 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Defining Matrices\n", + "t=[0,1,2,3,4,5,10] #s\n", + "# equation for s is s=8*t**2+2*t, Thus the different values of s corresponding to t is:\n", + "#Displacement matrix\n", + "s=[0,10,36,78,136,210,820]\n", + "# Eqn for v is v=16*t+2,Thus the different values of v corresponding to t is:\n", + "#Velocity Matrix\n", + "v=[0,18,34,50,66,82,162]\n", + "# Eqn for a is a=16, Thus the different values of a corresponding to t is:\n", + "#Acceleration Matrix\n", + "a=[16,16,16,16,16,16,16]\n", + "#Plotting the curves\n", + "#S-T curve\n", + "plot(t,s)\n", + "plot(t,v)\n", + "plot(t,a)\n", + "xlabel('t(s)')\n", + "ylabel('s(m), v(m/s) & a(m/s**2)')\n", + "\n", + "#Result\n", + "print'The graphs are the solutions'\n", + "print'blue line is for \"s\" vs \"t\" '\n", + "print'green line is for \"v\" vs \"t\" '\n", + "print'red line is for \"a\" vs \"t\" '\n", + "# All the 3 graphs have been combined into a single graph" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n", + "blue line is for \"s\" vs \"t\" \n", + "green line is for \"v\" vs \"t\" \n", + "red line is for \"a\" vs \"t\" \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEPCAYAAACp/QjLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVXX++PHXVXBH3OKiXOEqS4i44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Q5CCGEqEGSgxBCiBokOQjRCMXFxfz1r381/37+/HmmTZtW6/vLysqYMGECVVVV\nlghPiGYjyUGIRigsLGT9+vXm39etW8dTTz1V6/s7d+7M+PHj662AKYS1keQgRCMsX76c1NRUfHx8\nWLp0KR9//LG55XDixAnGjh2Lj48PI0aM4MyZM4BatmDLli1ahi1Eo8kKaSEaIT09nYcffphjx46R\nl5eHv78/x44dA+D555/n3nvvJTQ0lIqKCioqKujSpQtlZWUMHjxYSsyLVsVG6wCEaE1uvZdKT0+n\nf//+5t/vu+8+/vSnP5GVlcWsWbNwc3MD1K6lqqoqrl27RpcuXSwesxBNId1KQtyBW5NFSEgIO3bs\noGvXrkydOpWvvvqq2vtkTxLRmkhyEKIR7OzsKCkpAcDFxcVcHx/UndgGDRrEb37zGx555BFzd1NZ\nWRkdO3akc+fOmsQsRFNIt5IQjdC3b18eeOABhg0bxpQpU6ioqODKlSt0796d6OhoNm3ahK2tLf37\n9+e1114DICkpifvuu0/jyIVoHBmQFuIOhIeHM2TIEObMmVPre1599VVGjx7NzJkzLRiZEHdGkoMQ\nd+DChQuEhYWxa9eu275eVlaGv78/+/btkzEH0apIchBCCFGDDEgLIYSoQZKDEEKIGiQ5CCGEqEGS\ngxBCiBokOQghhKhBkoMQQoga/j9a1TbNrs4KNwAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 12.12-4, Page No 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v_o=0 #ft/s\n", + "v_f=88#ft/s\n", + "t=28 #s\n", + "\n", + "#Calculations\n", + "k=(v_f-v_o)*t**-1 #ft/s**2\n", + "s=((v_f-v_o)/2)*t #ft\n", + "\n", + "#Result\n", + "print'The value of constant k is',round(k,2),\"ft/s**2\"\n", + "print'The displacement is ',round(s),\"ft\"\n", + "#Decimal accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of constant k is 3.14 ft/s**2\n", + "The displacement is 1232.0 ft\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-5, Page No 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v_o=0 #ft/s\n", + "v_f1=30 #ft/s\n", + "v_f2=0 #ft/s\n", + "t1=3 #s\n", + "t2=2 #s\n", + "\n", + "#Calculations\n", + "#Plotting the v-t curve\n", + "#Velocity matrix \n", + "v=[v_o,v_f1,v_f2]\n", + "#Time matrix\n", + "t=[0,3,5]\n", + "plot(t,v)\n", + "xlabel('t')\n", + "ylabel('v')\n", + "#Part \"b\"\n", + "#Acceleration at 3s\n", + "a1=(v_f1-v_o)/t1 #ft/s**2\n", + "#Acceleration at 5s\n", + "a2=(v_f2-v_f1)/t2 #ft/s**2\n", + "#Part \"c\"\n", + "s=(v_f1*t1*0.5)+(v_f1*t2*0.5) #ft\n", + "#Part \"d\"\n", + "#Simplfying the equation we get\n", + "#7.5t**2-30t+5=0\n", + "a=7.5\n", + "b=-30\n", + "c=5\n", + "q=sqrt(b**2-4*a*c)\n", + "x1=(-b+q)/(2*a)\n", + "x2=(-b-q)/(2*a)\n", + "#As x1 is greater than 2 it does not hold as a solution\n", + "t=x2 #s\n", + "#Hence total time is\n", + "T=t1+t #s\n", + "\n", + "#Result\n", + "print'The graph is the solution for part a'\n", + "print'The acceleration at 3rd second is',round(a1),\"ft/s**2\"\n", + "print'The acceleration at 5th second is',round(a2),\"ft/s**2\"\n", + "print'The displacement is',round(s),\"ft\"\n", + "print'The total time is',round(T,3),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution for part a\n", + "The acceleration at 3rd second is 10.0 ft/s**2\n", + "The acceleration at 5th second is -15.0 ft/s**2\n", + "The displacement is 75.0 ft\n", + "The total time is 3.174 s\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEPCAYAAACukxSbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGQlJREFUeJzt3W9Mlff5x/HPcTa/zehasXpwxQZnaxXFnhOdLkPdoRbs\nVnE4FjdmV1LpAx80i2sXock6oQ8cZk7nn7ZxzjQsy+io7RhtWjJwPa66ZW6Iq3NrutoxKTvgiOKk\n2qHA78FRBAU5cM59vvef9yshRTzgFUKvXHyv+3Pfvr6+vj4BADxhnOkCAADJQ9MHAA+h6QOAh9D0\nAcBDaPoA4CE0fQDwEMua/scff6wlS5YoEAgoIyNDTz/9tCTp7NmzysnJ0ezZs5Wbm6vOzk6rSgAA\n3MBn5XX6Fy9e1IQJE3TlyhUtXbpU27ZtU21tre68805t2rRJW7du1blz51RRUWFVCQCAASw93pkw\nYYIkqbu7Wz09PZo8ebJqa2tVVFQkSSoqKlJNTY2VJQAABrC06ff29ioQCMjv9ys7O1vz5s1Te3u7\n/H6/JMnv96u9vd3KEgAAA4y38ouPGzdOx48f1/nz57Vy5Uq99dZbg/7e5/PJ5/NZWQIAYABLm/41\nt99+ux5++GE1NjbK7/erra1NqampikQimjZt2k2vv+eee3Tq1KlklAYArjFr1iy9//77t3yNZcc7\nHR0d/VfmXLp0SfX19QoGg1q9erUqKyslSZWVlcrPz7/pc0+dOqW+vj7e+vq0efNm4zXY5c3r34v3\n3+/T9Ol9euWVPn3725s1ZUqfTp82X5fpN6//XAx8i2VYtmzSj0QiKioqUm9vr3p7e/Wtb31LK1as\nUDAY1Nq1a7V//36lp6erurraqhIA1zhzRnroIen735e++lXpnXekJ56QnnxSevll09XBSSxr+pmZ\nmTp27NhNH09JSVFDQ4NV/yzgOl1d0pe/LBUWShs2XP94SYk0b55UXy/l5JirD85C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fiNH5\n8+f1wgsvmC4DiAtNH4jRuXPn9Pzzz5suA4gLTR+IUWlpqU6dOqVgMKiSkhLT5QBjQiIXiNG//vUv\nrVq1yvMPtYGzMekDMWI+ghvQ9AHAQ2j6QIwmTZrUf/tawKlo+kCMpkyZoqysLGVmZrLIhWOxyAUA\nD2HSBwAPoekDgIfQ9AHAQ2j6AOAhNH0A8BCaPgB4CE0fADyEpg8AHvL/gH0505xa9dwAAAAASUVO\nRK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No 12.12-6, Page No 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v_o=2 #m/s\n", + "y_o=120 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Solve using ground as datum\n", + "y=0\n", + "#Simplfying the equation\n", + "a=4.9\n", + "b=-2\n", + "c=-120\n", + "q=sqrt(b**2-4*a*c)\n", + "x1=(-b+q)/(2*a) #s\n", + "x2=(-b-q)/(2*a) #s\n", + "\n", + "#Result\n", + "print'The time required is',round(x1,2),\"s\"\n", + "#As x2 is negative and negative time does not make any physical sense\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 5.16 s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7, Page No 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Vo1=80 #ft/s\n", + "Vo2=60 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Simplfying by equating the two times\n", + "t=(-(Vo2*2)-(g*0.5*4))/(Vo1-Vo2-(g*0.5*4)) #s\n", + "#Substituting this t in s we get\n", + "s=(Vo1*t)-(0.5*g*t*t) #ft\n", + "\n", + "#Result\n", + "print'The time obtained is',round(t,2),\"s\"\n", + "print'and the ball meets at',round(s,1),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time obtained is 4.15 s\n", + "and the ball meets at 54.5 ft\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8, Page No 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta=40 degrees\n", + "costheta=0.77\n", + "tantheta=0.83\n", + "x=100 #ft\n", + "ay=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Simplfying the equation\n", + "t=((tantheta*x)*(ay/2)**-1)**0.5 #s\n", + "#Velocity calculations\n", + "Vo=100*(costheta*t)**-1 #ft/s\n", + "\n", + "#Result\n", + "\n", + "print'The initial speed should be',round(Vo,1),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial speed should be 57.2 ft/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9, Page No 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=[0,1,2,3,4,5,6] #s\n", + "#Solving the Differential Equations we obtain\n", + "# Eqn for s is s=(t+1)**3,Thus the different values of s corresponding to t is:\n", + "#Displacement matrix\n", + "s=[1,8,27,64,125,216,343]\n", + "# Eqn for v is v=3*(t+1)**2, Thus the different values of v corresponding to t is:\n", + "# Velocity matrix\n", + "v=[3,12,27,48,75,108,147]\n", + "# Eqn for a is a=6*(t+1),Thus the different values of a corresponding to t is:\n", + "# Acceleration matrix\n", + "a=[6,12,18,24,30,36,42]\n", + "#Plotting\n", + "plot(t,s)\n", + "plot(t,v)\n", + "plot(t,a)\n", + "xlabel('t(s)')\n", + "ylabel('s(ft) , v(ft/s) & a(ft/s**2)')\n", + "\n", + "#Result\n", + "print'The result are the plots that have been generated'\n", + "print'blue line is for \"s\" vs \"t\"'\n", + "print'green line is for \"v\" vs \"t\"'\n", + "print'red line is for \"a\" vs \"t\"'\n", + "# All the graphs have been plotted on a single graph" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The result are the plots that have been generated\n", + "blue line is for \"s\" vs \"t\"\n", + "green line is for \"v\" vs \"t\"\n", + "red line is for \"a\" vs \"t\"\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX++PHXICguiAgKCCruiKjgglqimHsmWplbrrnc\ntlumt9RW9fvLpUVTS7MyNeu61KNCLRVTwT1SxLXEBRTZkUVA9jm/P07OlRTZZjgDvJ+PxzxmmDnL\ne+ze857zWd4fnaIoCkIIIao9C60DEEIIYR4kIQghhAAkIQghhPibJAQhhBCAJAQhhBB/k4QghBAC\nMGFCyM7OpkePHnh5eeHh4cH8+fMBWLBgAa6urnh7e+Pt7c3u3bsN+yxZsoQ2bdrg7u5OYGCgqUIT\nQgjxADpTzkO4c+cOderUIT8/n969e/PRRx+xf/9+bGxsmD17dqFtL168yPjx4/njjz+Ijo5mwIAB\nhIeHY2EhNzFCCFERTHq1rVOnDgC5ubkUFBRgZ2cHwINyUEBAAOPGjcPKygo3Nzdat25NSEiIKcMT\nQghxD5MmBL1ej5eXF46OjvTr148OHToAsHr1ajp37sy0adNITU0FICYmBldXV8O+rq6uREdHmzI8\nIYQQ9zBpQrCwsCAsLIybN29y6NAhgoKCeOGFF4iIiCAsLAxnZ2fmzJlT5P46nc6U4QkhhLiHZUWc\nxNbWlmHDhnHy5En8/PwM70+f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ZVrSicqJokIQhRQjY2NoZSyc2bNycuLs7wWUREBC1atODf\n//43I0aMMDQl5eTkUKNGDWrVqqVJzEKUhjQZCVFC9vb2PProo3Ts2JGhQ4eSn59PZmYmdevWZfv2\n7WzevBkrKyucnZ156623ADh9+jS9evXSOHIhSkY6lYUoowULFtC+fXvGjBlT5DZvvvkm3bt3N9Tc\nF8KcSUIQoowSExOZPHkyv/766wM/z8nJYeDAgQQHB0sfgqgUJCEIIYQApFNZCCHE3yQhCCGEACQh\nCCGE+JskBCGEEIAkBCGEEH+ThCCEEAKA/w/0oo4ZUybtuAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10, Page No 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=3 #s\n", + "\n", + "#Calculations\n", + "#After solving the differential equation\n", + "s=(3**-1)*(t+2)**3 #ft\n", + "v=(t+2)**2 #ft/s\n", + "a=2*(t+2) #ft/s**2\n", + "\n", + "#Result\n", + "print'The displacement at t=3s is',round(s,1),\"ft\"\n", + "print'The velocity at t=3s is',round(v),\"ft/s\"\n", + "print'The acceleration at t=3s is',round(a),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The displacement at t=3s is 41.7 ft\n", + "The velocity at t=3s is 25.0 ft/s\n", + "The acceleration at t=3s is 10.0 ft/s**2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-12, Page No 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#Calling upward direction positive\n", + "xdot1=6 #ft/s\n", + "xdot3=3 #ft/s\n", + "xdoubledot=2 #ft/s**2\n", + "xdoubledot3=-4 #ft/s**2\n", + "\n", + "#Calculations\n", + "xdot=-xdot1 #ft/s\n", + "xdot2=2*xdot-xdot3 #ft/s\n", + "xdoubledot2=2*xdoubledot-xdoubledot3 #ft/s**2\n", + "\n", + "#Result\n", + "print'The value of velocity is',round(xdot2,3),\"ft/s (down)\"\n", + "print'The value of acceleration is',round(xdoubledot2,3),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of velocity is -15.0 ft/s (down)\n", + "The value of acceleration is 8.0 ft/s**2\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-16, Page No 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=4 #s\n", + "\n", + "#Calculations\n", + "#Part (a)\n", + "x=t**3 #in\n", + "y=-2*t**2 #in\n", + "z=2*t #in\n", + "#Part (b)\n", + "#Theory question\n", + "#Part(c)\n", + "#Unit vector calculation\n", + "m=(4**2+1**1+(-3)**2)**0.5\n", + "e_l=[4*m**-1,m**-1,-3*m**-1]\n", + "v=[3*t**2,-4*t,2] #in/s\n", + "#Projection of v on n at t=4s\n", + "dot=[v[0]*e_l[0],v[1]*e_l[1],v[2]*e_l[2]]\n", + "#dot=v.*e_l #in/s\n", + "a=dot[0]+dot[1]+dot[2] #in/s\n", + "\n", + "#Result\n", + "print'The co-ordinates of position are x=',round(x),\"in ,\",round(y),\"in and \",round(z),\"in respectively\"\n", + "print'The projection of v on n at t=4s is',round(a,1),\"in/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The co-ordinates of position are x= 64.0 in , -32.0 in and 8.0 in respectively\n", + "The projection of v on n at t=4s is 33.3 in/s\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-17, Page No 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "theta=pi/3 #rad\n", + "\n", + "#Calculations\n", + "#Method (a)\n", + "t=(theta)**0.5 #s\n", + "r=2*theta\n", + "rdot=4*t\n", + "thetadot=2*t\n", + "#Velocity calculations\n", + "x=r*thetadot\n", + "v=((rdot)**2+x**2)**0.5 #ft/s\n", + "#Theta calculations\n", + "thetax=30+arctan(rdot/x)*(180/pi) #degrees\n", + "#Method (b)\n", + "x=2*theta*cos(theta) #ft\n", + "y=2*theta*sin(theta) #ft\n", + "xdot=4*t*((cos(t**2)))+2*t**2*(-sin(t**2))*(2*t) #ft/s\n", + "ydot=4*t**2*sin(t**2)+2*t**2*cos(t**2)*2*t #ft/s\n", + "V=(xdot**2+ydot**2)**0.5 #ft/s\n", + "Thetax=arctan(ydot/-xdot)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'By both the methods we obtain v and thetax as:'\n", + "print'Method 1'\n", + "print'v=',round(v,2),\"ft/s\",'and thetax=',round(thetax,1),\"degrees\"\n", + "print'Method 2'\n", + "print'V=',round(v,2),\"ft/s\",'and Thetax=',round(Thetax,1),\"degrees\"\n", + "# The answer may wary due to decimal point accuracy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By both the methods we obtain v and thetax as:\n", + "Method 1\n", + "v= 5.93 ft/s and thetax= 73.7 degrees\n", + "Method 2\n", + "V= 5.93 ft/s and Thetax= 73.9 degrees\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-18, Page No 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "theta=pi/3 #rad\n", + "\n", + "#Calculations\n", + "t=sqrt(theta) #s\n", + "thetadot=2*t \n", + "thetadoubledot=2\n", + "r=2*t**2\n", + "rdot=4*t\n", + "rdoubledot=4\n", + "ax=rdoubledot-(r*thetadoubledot*thetadoubledot) #ft/s**2\n", + "ay=2*rdot*thetadot+r*thetadoubledot #ft/s**2\n", + "a=sqrt(ax**2+ay**2) # fr/s**2\n", + "thetax=30+arctan(ax/ay)*(180/pi) #degrees\n", + "#Solving by cartesian co-ordinate system yields same solution\n", + "\n", + "#Result\n", + "print'The value of acceleration is',round(a,1),\"ft/s**2\"\n", + "print'The value of thetax is',round(thetax,1),\"degrees\"\n", + "#Decimal accuracy causes discrepancy in answers\n", + "# The ans for thetax is incorrcet in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of acceleration is 21.4 ft/s**2\n", + "The value of thetax is 18.2 degrees\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-21, Page No 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Va=5 #ft/s\n", + "# as theta=70 degrees\n", + "sintheta=0.94\n", + "costheta=0.34\n", + "l=6.24 #ft\n", + "\n", + "#Calculations\n", + "Vb=(-costheta/sintheta)*Va #ft/s\n", + "\n", + "#Result\n", + "print'The value of Vb is',round(Vb,2),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vb is -1.81 ft/s\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25-25, Page No 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "theta=linspace(0,360,13)\n", + "\n", + "#Calculations\n", + "#Defining everything in terms of matrices \n", + "t=(theta*pi)/(180) #s converting degrees to radians\n", + "costheta=cos(t) \n", + "sintheta=sin(t)\n", + "x=2*costheta #ft\n", + "v=-12*sintheta #ft/s\n", + "a=-72*costheta #ft/s**2\n", + "\n", + "#Plotting\n", + "# 1\n", + "plot(t,x)\n", + "# 2\n", + "plot(t,v)\n", + "# 3\n", + "plot(t,a)\n", + "xlabel('t(s)')\n", + "ylabel('x(ft) , v(ft/s) ,a(ft/s**2)')\n", + "\n", + "#Result\n", + "print'The results are the plots'\n", + "print'The curve in blue colour represents t vs x'\n", + "print'The curve in green represents t vs v'\n", + "print'The curve in red represents t vs a'\n", + "# All the 3 curves have been plotted in the same graph. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The results are the plots\n", + "The curve in blue colour represents t vs x\n", + "The curve in green represents t vs v\n", + "The curve in red represents t vs a\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEPCAYAAACtCNj2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclOX6x/EPCG64o4KCgqKE4IYLuKV4FJdMM0tMLUnU\n6piVaZHVOeWSQXuWxxYrj9UpBbNcfmmu4C4uuKK5osjmgigCss7vjycmUVFgZrhnmOv9evECZoD5\nsj3XXPdzP/dto9PpdAghhBCAreoAQgghzIcUBSGEEHpSFIQQQuhJURBCCKEnRUEIIYSeFAUhhBB6\nSotCWFgYPj4+tGvXjjFjxpCTk0NaWhqBgYF4enoyYMAA0tPTVUYUQgiroqwoxMfHs3DhQvbv38/h\nw4cpKChgyZIlhIeHExgYyIkTJ+jXrx/h4eGqIgohhNVRVhTq1KmDvb09WVlZ5Ofnk5WVRdOmTVm5\nciXBwcEABAcH89tvv6mKKIQQVkdZUWjQoAHTp0+nefPmNG3alHr16hEYGEhqaipOTk4AODk5kZqa\nqiqiEEJYHWVF4fTp03z66afEx8eTlJTEjRs3+PHHH4t9jI2NDTY2NooSCiGE9bFT9cB79+6lR48e\nODo6AjBixAh27t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pwAtHF5Hx8fxanK7ueff2b06NH3/BglF6+Vl52dHfPnz2fg\nwIEUFBQwYcIE2rRpozpWqY0ePZro6GiuXLlCs2bNmD17NuPHj1cdq9S2b9/Ojz/+qJ9WCNr+F4MG\nDVKcrHSSk5MJDg6msLCQwsJCnnrqKfr166c6VrlY2lBqamoqjz76KKANxYwdO5YBAwYoTlU2n3/+\nOWPHjiU3NxcPDw8WLVqkOlKZZGZmsmHDhvuez5GL14QQQuhZ1PCREEII05KiIIQQQk+KghBCCD0p\nCkIIIfSkKAghhNCToiCEEEJPioIQZXTt2jW++OIL/fsXL15kyJAhJX58Tk4OvXv3prCwsCLiCWEQ\nKQpClNHVq1dZsGCB/v358+fz9NNPl/jx1apV48EHH+S3336rgHRCGEaKghBlNGPGDE6fPo2vry+h\noaEsW7ZM3ykcPXoUf39/fH196dChg34/8WHDhvHzzz+rjC1EqcgVzUKU0blz53j44Yc5fPgwKSkp\nBAYGcvjwYQBefPFFunXrxpgxY8jPzyc/P5/q1auTk5NDy5YtZal3YfYsau0jIczBrc+jzp07p1/9\nE6B79+7MnTuXCxcuMGLECFq1agVoQ0iFhYXcvHmT6tWrV3hmIUpLho+EMNCtRWL06NGsWrWKGjVq\n8NBDD7F58+ZiH2dpC9kJ6yNFQYgyql27tn4ZaDc3N1JSUvT3nT17lhYtWvDCCy/wyCOP6IeVcnJy\nqFKlCtWqVVOSWYjSkuEjIcrI0dGRnj170q5dOwYPHkx+fj6ZmZk4ODgQERHBDz/8gL29PU2aNOHN\nN98EIDY2lu7duytOLsT9yYlmIQw0c+ZM2rRpw6hRo0r8mDfeeIOuXbvq9xQQwlxJURDCQJcuXSI4\nOJjff//9rvfn5OQQGBhIdHS0nFMQZk+KghBCCD050SyEEEJPioIQQgg9KQpCCCH0pCgIIYTQk6Ig\nhBBCT4qCEEIIvf8HaEMe+5zwRtYAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-26, Page No 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=1.2 #m\n", + "w0=0 #rpm\n", + "w=2000 #rpm\n", + "t=20 #s\n", + "\n", + "#Calculations\n", + "alpha=(w-w0)/t \n", + "alpha_rad=(alpha*2*pi)/60 #converting to radians/s**2\n", + "\n", + "#Result\n", + "print'The angular acceleration is',round(alpha_rad,1),\"radians/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular acceleration is 10.5 radians/s**2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-27, Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w0=0 #rad/s\n", + "w=209 #rad/s\n", + "t=20 #s\n", + "\n", + "#Calculations\n", + "theta=0.5*(w+w0)*t #rad\n", + "theta_rev=round(theta/(2*pi)) #revolutions rounding off\n", + "\n", + "#Result\n", + "print'The flywheel makes',round(theta_rev),\"revolutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The flywheel makes 333.0 revolutions\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-28, Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w0=0 #rad/s\n", + "alpha=10.5 #rad/s**2\n", + "t=0.6 #s\n", + "r=0.6 #m\n", + "\n", + "#Calculations\n", + "w=w0+alpha*t #rad/s\n", + "v=r*w #m/s\n", + "a_t=r*alpha #m/s**2\n", + "a_n=r*w*w #m/s**2\n", + "a=sqrt(a_t**2+a_n**2) #m/s**2\n", + "phi=arctan(a_t/a_n)*(180/pi) #degrees\n", + "\n", + "#result\n", + "print'The tangential velocity is',round(v,2),\"m/s\"\n", + "print'The acceleration is',round(a,1),\"m/s**2\"\n", + "print'and the angle is',round(phi,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tangential velocity is 3.78 m/s\n", + "The acceleration is 24.6 m/s**2\n", + "and the angle is 14.8 degrees\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-29, Page No 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=4 #ft\n", + "wb=40 #rpm\n", + "we=60 #rpm\n", + "\n", + "#Calculations\n", + "r=l/2 #ft\n", + "vb=r*((wb*2*pi)/60) #ft/s\n", + "ve=r*((we*2*pi)/60) # ft/s\n", + "\n", + "#Result\n", + "print'The linear speeds are:'\n", + "print'vb=',round(vb,2),\"ft/s\"\n", + "print'and ve=',round(ve,1),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The linear speeds are:\n", + "vb= 8.38 ft/s\n", + "and ve= 12.6 ft/s\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-30, Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "wb=40 #rpm\n", + "we=60 #rpm\n", + "t1=5 #s using different symbol to avoid conflict in decleration\n", + "t=2 #s\n", + "#Calculations\n", + "\n", + "alpha=(((we*2*pi)/60)-((wb*2*pi)/60))/t1 #rad/s**2\n", + "w=((wb*2*pi)/60)+alpha*t #rad/s\n", + "#Components of acceleration are\n", + "a_t=r*alpha #ft/s**2\n", + "a_n=r*w**2 #ft/s**2\n", + "\n", + "#result\n", + "print'The tangential acceleration is',round(a_t,3),\"ft/s**2\"\n", + "print'The normal acceleration is',round(a_n,1),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tangential acceleration is 0.838 ft/s**2\n", + "The normal acceleration is 50.5 ft/s**2\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-31, Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=200 #mm\n", + "w0=(800*2*pi)/60 #rpm\n", + "w=0 #rpm\n", + "t=600 #s\n", + "\n", + "#Calculations\n", + "alpha=(w-w0)/t #rad/s**2 (deceleration)\n", + "\n", + "#result\n", + "print'The angular acceleration is',round(alpha,2),\"radian/s**2\"\n", + "# The negative sign indicates that the wheel decelerates\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular acceleration is -0.14 radian/s**2\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-32, Page No 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#The symbols used here differ from the textbook solution to avoid conflict \n", + "t1=0 #s\n", + "t2=0.5 #s\n", + "t3=2.5 #s\n", + "t4=3**-1 #s\n", + "w=200 #rpm\n", + "w0=0 #rpm\n", + "\n", + "#Calculations\n", + "theta1=0.5*(w0+(w*60**-1))*t2 #rev\n", + "theta2=(w*60**-1)*(t3-t2) #rev\n", + "theta3=(2**-1)*((w*60**-1)+w0)*t4 #rev here the values of w and w0 are interchanged but essentially the value comes out to be the same hence the decleration has not been changed\n", + "theta=theta1+theta2+theta3 #rev\n", + "\n", + "#Result\n", + "print'The wheel undergoes',round(theta,2),\"revolutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wheel undergoes 8.06 revolutions\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-34, Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=1 #s\n", + "r=4 #m\n", + "\n", + "#Calculations\n", + "s=t**3+3 #m\n", + "theta=s/r #rad\n", + "dtheta_dt=0.75*t**2 #rad/s\n", + "Vx=-4*sin(theta)*dtheta_dt #m/s\n", + "Vy=4*cos(theta)*dtheta_dt #m/s\n", + "V=(Vx**2+Vy**2)**0.5 #m/s\n", + "\n", + "#Result\n", + "print'The components of velocity are:'\n", + "print'Vx=',round(Vx,2),\"m/s\"\n", + "print'Vy=',round(Vy,2),\"m/s\"\n", + "print'V=',round(V),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The components of velocity are:\n", + "Vx= -2.52 m/s\n", + "Vy= 1.62 m/s\n", + "V= 3.0 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-35, Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=1 #s\n", + "theta=1 #rad\n", + "\n", + "#Calculations\n", + "dtheta_dt=0.75*t**2 #rad/s\n", + "acc=1.5*t #rad/s**2\n", + "ax=-4*cos(theta)*dtheta_dt**2-(4*sin(theta)*acc) #m/s**2 (to left)\n", + "ay=-4*sin(theta)*dtheta_dt**2+(4*cos(theta)*acc) #m/s**2 (up)\n", + "a=sqrt(ax**2+ay**2) #m/s**2\n", + "\n", + "#result\n", + "print'The acceleration is',round(a,2),\"m/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is 6.41 m/s**2\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-36, Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=2 #s\n", + "\n", + "#Calculations\n", + "#Velocity\n", + "vx=8*t-3 #ft/s\n", + "vy=3*t**2 #ft/s\n", + "v=sqrt(vx**2+vy**2) #ft/s\n", + "theta_x=arctan(vy*vx**-1)*(180/pi) #degrees\n", + "#Acceleration\n", + "ax=8 #ft/s**2\n", + "ay=6*t #ft/s**2\n", + "a=sqrt(ax**2+ay**2) #ft/s**2\n", + "phi_x=arctan(ay*ax**-1)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The velocity is',round(v,1),\"ft/s\"\n", + "print'and the angle is',round(theta_x,1),\"degrees\"\n", + "print'The acceleration is',round(a,1),\"ft/s**2\"\n", + "print'and the angle it makes is',round(phi_x,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity is 17.7 ft/s\n", + "and the angle is 42.7 degrees\n", + "The acceleration is 14.4 ft/s**2\n", + "and the angle it makes is 56.3 degrees\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-37, Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "V_ao=29.3 #ft/s\n", + "OA=50 #ft\n", + "theta=45 #degrees\n", + "OB=50*sqrt(2) #ft\n", + "\n", + "#Calculations\n", + "w_ao=V_ao/OA #rad/s\n", + "V_bo=V_ao*cos(theta) #ft/s\n", + "w_bo=V_bo/OB #rad/s\n", + "\n", + "#Result\n", + "print'The angular velocity with respect to the observer is',round(w_ao,3),\"rad/s\"\n", + "print' The angular velocity after moving 50ft is',round(w_bo,3),\"rad/s\"\n", + "# The answer for w_bo is incorrect in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity with respect to the observer is 0.586 rad/s\n", + " The angular velocity after moving 50ft is 0.218 rad/s\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-38, Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initiliztaion of variables\n", + "# as theta=30 degrees\n", + "costheta=sqrt(3)*2**-1\n", + "tantheta=sqrt(3)**-1\n", + "r=[100*tantheta*(180/pi),100] #ft\n", + "v=17.6 #ft/s\n", + "\n", + "#Calculations\n", + "v_1=100*costheta**-1*costheta**-1\n", + "w=v/v_1 #rad/s (clockwise)\n", + "\n", + "#result\n", + "print'The angular velocity is',round(w,3),\"rad/s clockwise\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity is 0.132 rad/s clockwise\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-39, Page No 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "t=2 #s\n", + "\n", + "#Calculations\n", + "Vx=20*t+5 #m/s\n", + "Vy=t**2-20 #m/s\n", + "#As indefinite integral is not possible \n", + "x=10*t**2+5*t+5 #m\n", + "y=0.5*t**2-20*t-15 #m\n", + "ax=20 #m/s**2\n", + "ay=2*t #m/s**2\n", + "\n", + "#Result\n", + "print'The displacement components are x=',round(x),\"m\",'and y=',round(y),\"m.\"\n", + "print'The velocity components are: Vx=',round(Vx),\"m/s\",'and Vy=',round(Vy),\"m/s\"\n", + "print'The acceleration components are: ax=',round(ax),\"m/s**2\",'and ay=',round(ay),\"m/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The displacement components are x= 55.0 m and y= -53.0 m.\n", + "The velocity components are: Vx= 45.0 m/s and Vy= -16.0 m/s\n", + "The acceleration components are: ax= 20.0 m/s**2 and ay= 4.0 m/s**2\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-40, Page No 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=0.1 #m\n", + "v=20 #m/s\n", + "a_g=6 #m/s**2\n", + "d2=0.150 #m\n", + "\n", + "#Calculations\n", + "r=d/2 #m\n", + "w=v/r #rad/s\n", + "vb=d2*0.5*w #m/s\n", + "alpha=a_g/r #rad/s**2\n", + "a_t=d2*0.5*alpha #rad/s**2 tangential acceleration\n", + "a_n=d2*0.5*w*w #m/s**2 normal acceleration\n", + "a=sqrt(a_t**2+a_n**2) #m/s**2 linear acceleration\n", + "\n", + "#Result\n", + "print'The linear velocity is',round(vb),\"m/s\"\n", + "print'The acceleration is',round(a),\"m/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The linear velocity is 30.0 m/s\n", + "The acceleration is 12000.0 m/s**2\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-41, Page No 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta=40 degrees\n", + "sintheta=0.64\n", + "costheta=0.77\n", + "tantheta=0.83\n", + "x=100 #ft\n", + "ax=0 #ft/s**2\n", + "ay=-32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#vox=vocos40....(1)\n", + "#voy=vox*t-1/2(32.2)t^2...(2)\n", + "#Simplyfying eq (1) and eq(2)\n", + "t_f=((x*tantheta)/(0.5*(-ay)))**0.5 #s time of flight\n", + "Vo=x/(costheta*t_f) #ft/s\n", + "#As the max height occurs at half wat through the flight\n", + "t=t_f/2 #s\n", + "ymax=Vo*sintheta*t+(0.5*ay*t*t) #ft the formula has positive sign as ay is defined negative\n", + "\n", + "#result\n", + "print'The max height the ball will reach is',round(ymax,1),\"ft\"\n", + "\n", + "# The ans in textbook is incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The max height the ball will reach is 20.8 ft\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter13.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter13.ipynb new file mode 100755 index 00000000..8c5eeb3d --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter13.ipynb @@ -0,0 +1,899 @@ +{ + "metadata": { + "name": "chapter 13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 13: DYNAMICS OF A PARTICLE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1, Page No 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=2 #lb\n", + "F=1.5 #lb\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Angles are with respect to the plane are,\n", + "# theta1=10 degrees & theta2=30 degrees\n", + "sintheta1=0.17\n", + "costheta1=0.99\n", + "sintheta2=0.5\n", + "costheta2=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "#Now here the forces are considered as parallel and perpendicular to the plane \n", + "#Applying Newtond Principle\n", + "ax=(g/2)*(F*costheta1-(W*sintheta2)) #ft/s**2\n", + "N1=(2*costheta2-(F*sintheta1)) #lb\n", + "\n", + "#result\n", + "print'The force on the particle is',round(N1,2),\"lb\"\n", + "print'The acceleration is',round(ax,2),\"ft/s**2\"\n", + "\n", + "# The answer may wary due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force on the particle is 1.48 lb\n", + "The acceleration is 7.81 ft/s**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-2, Page No 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=5 #kg\n", + "s=12 #m\n", + "v=4 #m/s\n", + "vo=0 #m/s\n", + "g=9.8 #m/s**2\n", + "mu=0.25\n", + "\n", + "#Calculations\n", + "#Using the kinematic equations of motion\n", + "a=(v**2-vo**2)*(2*s)**-1 #m/s**2\n", + "#Using Newtons Principle\n", + "N1=g*m #N\n", + "P=m*a+mu*N1 #N\n", + "\n", + "#Result\n", + "print'The value of P is',round(P,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P is 15.6 N\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-3, Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=2 #kg\n", + "vo=0 #m/s\n", + "v=3 #m/s\n", + "s=0.8 #m\n", + "# as theta=20 degrees,\n", + "sintheta=0.34\n", + "costheta=0.94\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "N=m*g*costheta #N\n", + "a=(vo**2-v**2)*(2*s)**-1 #m/s**2\n", + "u=-((2*a)+(m*g*sintheta))/N \n", + "#Solving for return speed\n", + "#Symbol convention is different from textbook\n", + "a_ret=((m*g*sintheta)-(u*N))/2 #m/s**2\n", + "vf=sqrt((2*a_ret*s)) #m/s\n", + "\n", + "#Result\n", + "print'The speed is',round(vf,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed is 1.3 m/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-4, Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=1800 #lb\n", + "r=2000 #ft\n", + "v=58.7 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "F=(W*v*v)/(g*r) #lb\n", + "\n", + "#Result\n", + "print'The frictional force to be exerted is',round(F,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frictional force to be exerted is 96.3 lb\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7, Page No 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "W=10 #lb\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "costheta=sqrt(3)*2**-1\n", + "l=2 #ft\n", + "w=10 #rev/min\n", + "g=32.2 # ft/s**2\n", + "\n", + "# Calculations\n", + "r=l*costheta # ft\n", + "a_n=r*(((w*2*pi)/60)**2) #ft/s**2\n", + "#Applying Newtons Principle\n", + "#Solving by matrix method\n", + "A=np.array([[costheta,-sintheta],[sintheta,costheta]]) \n", + "B=np.array([[(W*a_n)/g],[W]]) \n", + "C=np.linalg.solve(A,B) #lb\n", + "\n", + "#Result\n", + "print'The value of T is',round(C[0],2),\"lb\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of T is 5.51 lb\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-8, Page No 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=4 #lb\n", + "v=6 #ft/s\n", + "r=2 #ft\n", + "# as theta1=40 degrees & theta2=20 degrees\n", + "sintheta1=0.64\n", + "costheta1=0.77\n", + "sintheta2=0.34\n", + "costheta2=0.94\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "a_n=v**2/r #ft/s**2\n", + "#Applying Newtons Principle\n", + "Fi=(m*a_n)/g #lb\n", + "#Solving by matrix method\n", + "A=np.array([[costheta1,costheta2],[sintheta1,-sintheta2]])\n", + "B=np.array([[m],[Fi]]) \n", + "C=np.linalg.solve(A,B) #lb\n", + "\n", + "#Result\n", + "print'The values are: T=',round(C[0],2),\"lb\",'and C=',round(C[1],2),\"lb\"\n", + "\n", + "# The ans for C waries due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are: T= 4.01 lb and C= 0.97 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-10, Page No 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=2 #kg\n", + "# as theta=20 degrees,\n", + "sintheta=0.34\n", + "m2=4 #kg\n", + "t=4 #s\n", + "g=9.8 #m/s**2\n", + "vo=0 #m/s\n", + "\n", + "#Calculations\n", + "#Applying Newtons Principle\n", + "#Solving by matrix method\n", + "A=np.array([[1,-2],[1,4]])\n", + "B=np.array([[m1*g*sintheta],[m2*g]])\n", + "C=np.linalg.solve(A,B)\n", + "a=C[1] #m/s**2\n", + "v=vo+a*t #m/s\n", + "\n", + "#Result\n", + "print'The velocity of 4kg mass is',round(v,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of 4kg mass is 21.7 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-11, Page No 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m_A=20 #lb\n", + "m_B=60 #lb\n", + "u=0.3 #coefficient of friction\n", + "t=4 #s\n", + "# as theta1=30 degrees & theta2=60 degrees,\n", + "sintheta1=2**-1\n", + "costheta1=sqrt(3)*2**-1\n", + "sintheta2=sqrt(3)*2**-1\n", + "costheta2=2**-1\n", + "g=32.2 #ft/s^2\n", + "vo=0 #ft/s\n", + "\n", + "#Calculations\n", + "N1=m_A*costheta1 #lb\n", + "N2=m_B*costheta2 #lb\n", + "#Solving for T and a using matrix method\n", + "A=np.array([[1,-m_A/g],[-1,-m_B/g]])\n", + "B=np.array([[(m_A*sintheta1+u*N1)],[(-m_B*sintheta2+u*N2)]]) \n", + "C=np.linalg.solve(A,B)\n", + "a=C[1] #ft/s**2\n", + "v=vo+a*t #ft/s\n", + "\n", + "#Result\n", + "print'The velocity is',round(v,1),\"ft/s\"\n", + "\n", + "# The ans in the textbook is incorrect." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity is 44.7 ft/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-12, Page No 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m_A=40 #kg\n", + "m_B=15 #kg\n", + "F=500 #N\n", + "g=9.8 #m/s**2\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "costheta=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "m=m_A+m_B #kg\n", + "a=(F-m*g*sintheta)/(m) #m/s**2\n", + "#Summing forces parallel and perpendicular to the plane\n", + "#Simplfying equation (1) and (2)\n", + "Nb=m_B*g+(m_B*a*sintheta) #N\n", + "#Substituting this in eq(1)\n", + "u=-(m_B*g*costheta-(Nb*costheta))/(Nb*sintheta)\n", + "\n", + "#Result\n", + "print'The value of u is',round(u,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of u is 0.31\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-13, Page No 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "P=70 #N\n", + "m_A=16 #kg\n", + "u_AH=0.25 #coefficient of friction between Block A and Horizontal Plane\n", + "m_B=4 #kg\n", + "u_BH=0.5 #coefficient of friction between Block B and Horizontal Plane\n", + "# as theta=10 degrees,\n", + "sintheta=0.17\n", + "costheta=0.98\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Applying sum of forces to both the FBD's\n", + "#Solving by matrix method \n", + "A=np.array([[-costheta,-u_AH,-m_A,0],[-sintheta,1,0,0],[costheta,0,-m_B,-u_BH],[sintheta,0,0,1]]) \n", + "B=np.array([[-P],[m_A*g],[0],[m_B*g]])\n", + "C=np.linalg.solve(A,B) \n", + "\n", + "#Result\n", + "print'The Value of T is',round(C[0],1),\"N\"\n", + "\n", + "# The ans waries due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of T is 20.7 N\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-14, Page No 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta=10 degrees\n", + "sintheta=0.1736\n", + "costheta=0.9848\n", + "v=10 #ft/s\n", + "v0=0 #ft/s\n", + "u=3**-1 #coefficient of friction\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Equations of motion for box are\n", + "#Simplfying the equations by sybstitution\n", + "a=((u*costheta)-(sintheta))*g #ft/s**2\n", + "#Time calculations\n", + "t=(v-v0)/a #s\n", + "\n", + "#Result\n", + "print'The value of a is',round(a,2),\"ft/s**2\",'and the time required is',round(t),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is 4.98 ft/s**2 and the time required is 2.0 seconds\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-15, Page No 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Simplfying the equations we can solve for T2 and aA first to obtain the solution\n", + "#Solving by matrix method\n", + "A=np.array([[-1.5,-4],[-3.5,24]])\n", + "B=np.array([[-4*g],[-24*g]])\n", + "C=np.linalg.solve(A,B) \n", + "T2=C[0] #N\n", + "T1=T2/2 #N\n", + "T3=T2/2 #N\n", + "#Acceleration calculations\n", + "a1=1*g-T1 #m/s**2\n", + "a2=(2*g-T1)/2 #m/s**2\n", + "a3=(3*g-T3)/3 #m/s**2\n", + "a4=(4*g-T3)/4 #m/s**2\n", + "#Tension in fixed cord\n", + "T_f=2*T2 #N\n", + "\n", + "#Result\n", + "print'The acceleration values are: a1=',round(a1),\"m/s**2 (up)\",',',round(a2,1),\"m/s**2 (down)\",',',round(a3,2),\"m/s**2 (down)\",',',round(a4,1),\"m/s**2 (down) respectively.\"\n", + "print'The tension in the fixed cord is',round(T_f,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration values are: a1= -9.0 m/s**2 (up) , 0.4 m/s**2 (down) , 3.53 m/s**2 (down) , 5.1 m/s**2 (down) respectively.\n", + "The tension in the fixed cord is 75.3 N\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-16, Page No 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=14 #kg\n", + "m2=7 #kg\n", + "# as theta=45 degrees,\n", + "sintheta=sqrt(2)**-1\n", + "costheta=sqrt(2)**-1\n", + "u_1=4**-1 #coefficient of friction between mass 1 and plane\n", + "u_2=3*8**-1 #coefficient of friction between mass 2 and plane\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#The equations of motion for m1 are\n", + "N1=m1*g*costheta #N\n", + "F1=u_1*N1 #N\n", + "#The equations of motion for m2 are\n", + "N2=m2*g*costheta #N\n", + "F2=u_2*N2 #N\n", + "#Now to get T and a we solve using matrix method\n", + "A=np.array([[-1,-m1],[1,-m2]])\n", + "B=np.array([[-(m1*g*sintheta-F1)],[-(m2*g*sintheta-F2)]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The Value of T is',round(C[0]),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Value of T is 4.0 N\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-19, Page No 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=12 #oz\n", + "k=2 #oz/in\n", + "M=0.34 #kg\n", + "K=22 #N/m\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Part(a)\n", + "a=(k*W*g)/16\n", + "b=W*16**-1\n", + "f=((2*pi)**-1)*((a/b)**0.5) #Hz for simplicity the numerator and denominator have been computed seperately as a and b\n", + "#Part(b)\n", + "F=((2*pi)**-1)*((K/M)**0.5) #Hz\n", + "\n", + "#Result\n", + "print'The frequency in part (a) is',round(f,2),\"Hz\",'and in part(b) is',round(F,2),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency in part (a) is 1.28 Hz and in part(b) is 1.28 Hz\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-20, Page No 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#As the entire question is theoritical\n", + "#theta is directly computed \n", + "theta=arccos(2*3**-1)*(180/pi) #degrees\n", + "\n", + "#result\n", + "print'The value of theta is',round(theta,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of theta is 48.2 degrees\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-28, Page No 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "G=6.658*(10**-8)**-1 #cm**3/g.s**2\n", + "#Calculations\n", + "G1=G*((3.281*10**2)/((2.205*32.2**-1)*10**4)) #ft**3/slug-s**2\n", + "G2=G1 #ft**4/lb-s**4\n", + "\n", + "#Result\n", + "print'The ans is',round(G2,2),\"ft**4/lb-s**4\"\n", + "\n", + "# The ans waries slightly due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ans is 319004859.68 ft**4/lb-s**4\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-29, Page No 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#Modifying the value of C without vo**2 in it\n", + "C=5000*5280\n", + "G=3.43*10**-8 #Gravatational Constant\n", + "M=4.09*10**23 #Mass of the Earth\n", + "a=5.31*10**8\n", + "#When the orbit is circular e=0\n", + "vo1=(a)**0.5 #ft/s\n", + "#When the orbit is parabolic e=1\n", + "vo2=((C*a+G*M)/C)**0.5 #ft/s\n", + "\n", + "#Result\n", + "print'The value of vo1=',round(vo1),\"ft/s\",'is smaller than vo2=',round(vo2),\"ft/s, hence the Satellite will enter a hyperbolic path and never return to earth.\"\n", + "#Decimal accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vo1= 23043.0 ft/s is smaller than vo2= 32594.0 ft/s, hence the Satellite will enter a hyperbolic path and never return to earth.\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-30, Page No 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "r=3940+500 #mi\n", + "phi=0 #degrees\n", + "vo=36000 #ft/s\n", + "C=4440*5280*vo\n", + "G=3.43*10**-8\n", + "M=4.09*10**23 #kg\n", + "\n", + "#Calculations\n", + "e=((C*vo)/(G*M))-1\n", + "\n", + "#Result\n", + "print'The value of e=',round(e,2),\",hence the path is Hyperbolic\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of e= 1.17 ,hence the path is Hyperbolic\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-31, Page No 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "a=92.9*10**6 #mi\n", + "G=3.43*10**-8\n", + "T=365*24*3600 #s\n", + "c=5280\n", + "\n", + "#Calculations\n", + "M=(4*pi**2*a**3*c**3)/(G*T**2) #slugs\n", + "\n", + "#Result\n", + "print'The mass of the sun is',round(M,1),\"slugs\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of the sun is 1.36584467048e+29 slugs\n" + ] + } + ], + "prompt_number": 56 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter14.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter14.ipynb new file mode 100755 index 00000000..ebd46e45 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter14.ipynb @@ -0,0 +1,772 @@ +{ + "metadata": { + "name": "chapter 14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 14: KINEMATICS OF A RIGID BODY IN PLANE MOTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-2, Page no 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=500 #mm\n", + "wo=0 #rpm\n", + "w=300 #rpm\n", + "t=20 #s\n", + "t1=2 #s\n", + "\n", + "#Calculations\n", + "alpha=(2*pi*(60**-1)*(w-wo))/t #rad/s**2\n", + "w1=wo+alpha*t1 #rad/s\n", + "v=(d*(2*1000)**-1)*w1 #m/s\n", + "a_n=(d*(2*1000)**-1)*w1**2 #m/s**2\n", + "a_t=(d*(2*1000)**-1)*alpha #m/s**2\n", + "a=(a_n**2+a_t**2)**0.5 #m/s**2\n", + "theta=arccos(a_n/a)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The computed values are:'\n", + "print'alpha=',round(alpha,2),\"rad/s**2\"\n", + "print'w1=',round(w1,2),\"rad/s\"\n", + "print'v=',round(v,3),\"m/s\"\n", + "print'a=',round(a,2),\"m/s**2\"\n", + "print'theta=',round(theta,1),\"degrees\"\n", + "\n", + "# The answers may wary in decimal points." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The computed values are:\n", + "alpha= 1.57 rad/s**2\n", + "w1= 3.14 rad/s\n", + "v= 0.785 m/s\n", + "a= 2.5 m/s**2\n", + "theta= 9.0 degrees\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3, Page no 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "s_BC=2 #m\n", + "s_C=2.5 #m\n", + "\n", + "#Calculations\n", + "s_B=(s_BC**2+s_C**2)**0.5 #m\n", + "theta=arctan(s_BC*s_C**-1)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The absolute displacement is',round(s_B,1),\"m\",'and the angle made by the vector is',round(theta,1),\"degrees.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute displacement is 3.2 m and the angle made by the vector is 38.7 degrees.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4, Page no 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "V_A=20 #mi/h\n", + "V_B=70 #mi/h\n", + "# as theta1=60 degrees,\n", + "sintheta1=sqrt(3)*2**-1\n", + "costheta1=2**-1\n", + "# also phi=45 degrees, thus\n", + "sinphi=sqrt(2)**-1\n", + "cosphi=sqrt(2)**-1\n", + "\n", + "#Result\n", + "#Vector's in matrix form\n", + "v_A=np.array([-V_A*cosphi,V_A*sinphi]) #mi/h\n", + "v_B=np.array([V_B*costheta1,V_B*sintheta1]) #mi/h\n", + "a=v_A[0]+v_B[0] #mi/h\n", + "b=v_A[1]+v_B[1] #mi/h\n", + "v_ab=(a**2+b**2)**0.5 #mi/h\n", + "theta=arctan(b/a)*(180/pi) #degrees\n", + "#The relative velocity v_ba is just different in sign while the magnitude stays the same\n", + "\n", + "#Resul\n", + "print'The relative velocity is',round(v_ab,1),\"mi/h\",'making an angle',round(theta,1),\"degrees\"\n", + "\n", + "# The ans may wary due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative velocity is 77.6 mi/h making an angle 74.4 degrees\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9, Page no 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=2.5 #m\n", + "v_A=4 #m/s\n", + "a_A=5 #m/s**2\n", + "theta=30 #degrees\n", + "\n", + "#Calculations\n", + "#Vector triangle yields v_a.b=2.93 m/s\n", + "v_ab=2.93 #m/s\n", + "w=v_ab*l**-1 #rad/s (clockwise)\n", + "#Ploygon yields alpha_a/b=2.75 m/s**2\n", + "alpha_ab=2.75 #m/s**2\n", + "alpha=alpha_ab*l**-1 #rad/s**2 (counterclockwise)\n", + "\n", + "#Result\n", + "print'The value of angular velocity is',round(w,2),\"rad/s\"\n", + "print'The value of angular acceleration is',round(alpha,1),\"rad/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of angular velocity is 1.17 rad/s\n", + "The value of angular acceleration is 1.1 rad/s**2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10, Page no 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=(2*pi*120)/60 #rad/s\n", + "l=24 #in\n", + "l_c=4 #in\n", + "# as th=30 degrees,\n", + "sinth=2**-1\n", + "\n", + "#Calculations\n", + "v=(l_c*12**-1)*w #ft/s\n", + "betaa=arcsin((l_c*sinth)/l)*(180/pi) #degrees\n", + "# betaa yeilds 4.8 degrees, thus value of cosbetaa is,\n", + "cosbetaa=0.996\n", + "theta=60-betaa #degrees\n", + "# here theta yeilds 55.2 degrees, thus value of costheta is,\n", + "costheta=0.57\n", + "#Component of velocity along connecting rod is \n", + "v1=v*costheta #ft/s\n", + "v_p=v1/cosbetaa #ft/s\n", + "\n", + "#Result\n", + "print'The absoulte velocity is',round(v_p,2),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absoulte velocity is 2.4 ft/s\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-13, Page no 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v_pc=3.68 #ft/s\n", + "l=2 #ft\n", + "\n", + "#Calculations\n", + "w=v_pc/l #rad/s counterclockwise\n", + "\n", + "#Result\n", + "print'The angular velocity is',round(w,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity is 1.84 rad/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-14, Page no 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#This problem is a combination of numerical and graphical solution\n", + "#The program only deals with the numerical solution parts the rest can be verified by graphical solution\n", + "#Initilization of variables\n", + "r=4*12**-1 #ft\n", + "w=4*pi #rad/s\n", + "l=2 #ft\n", + "w2=1.84 #rad/s\n", + "\n", + "#Calculations\n", + "ac_n=r*w**2 #ft/s**2\n", + "a_pc_n=l*w2**2 #ft/s**2\n", + "\n", + "#Result\n", + "print'The value of ac_n is',round(ac_n,1),\"ft/s**2\"\n", + "print'The value of a_pc_n is',round(a_pc_n,2),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of ac_n is 52.6 ft/s**2\n", + "The value of a_pc_n is 6.77 ft/s**2\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15, Page no 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w_bc=10 #rad/s\n", + "AB=250 #mm\n", + "BC=150 #mm\n", + "AC=179 #mm\n", + "AD=200 #mm\n", + "# as theta1=45 degrees,\n", + "sintheta1=(2**0.5)**-1\n", + "costheta1=(2**0.5)**-1\n", + "\n", + "#Calculations\n", + "v_c=(BC*1000**-1)*w_bc #m/s\n", + "AC=((AB**2+BC**2)-(2*AB*BC*costheta1))**0.5 #m\n", + "betaa=arcsin((BC*sintheta1)/AC)*(180/pi) #degrees\n", + "gammaa=arcsin((AB*sintheta1)/AC)*(180/pi)#degrees answer in the textbook is incorrect\n", + "ang=60-betaa #degrees\n", + "# ang yeilds 23.7 degrees, thus\n", + "sinang=0.40056\n", + "cosang=0.916\n", + "CD=sqrt(AD**2+AC**2-(2*AD*AC*cosang)) #mm\n", + "D=arcsin((AC*sinang)/CD)*(180/pi) #degrees\n", + "# D yeilds 63.2 degrees,thus\n", + "sinD=0.8925\n", + "theta=arcsin((AD*sinD)/AC)*(180/pi) #degrees\n", + "n=360-(theta+gammaa+90) #degrees\n", + "# n yeilds 101.8 degrees, thus \n", + "cosn=-0.2045\n", + "v_cd=v_c*cosn #m/s\n", + "delta=180-(90+D) #degrees\n", + "# Delts yeilds 26.8 degrees, thus\n", + "cosdelta=0.8925\n", + "v_D=v_cd/cosdelta #m/s\n", + "w_AD=v_D/(AD*1000**-1) #rad/s\n", + "\n", + "#Result\n", + "print'The angular Velocity of AD is',round(w_AD,2),\"rad/s clockwise.\" #Negative sign indicates clockwise orientation \n", + "#Answer in the textbook is incorrect\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular Velocity of AD is -1.72 rad/s clockwise.\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18, Page No 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta1=73.9 degrees,theta2=60 degrees and theta3=46.1 degrees\n", + "sintheta1=0.96\n", + "sintheta2=sqrt(3)*2**-1\n", + "sintheta3=0.72\n", + "V=900 #mm/s\n", + "\n", + "#Calculations\n", + "BC=((350*350)+(86.6*86.6))**0.5 #mm\n", + "CD=400 #mm\n", + "v_cb=(V*sintheta2)/(sintheta1) #mm/s\n", + "v_c=((V*sintheta3))/(sintheta1) #mm/s\n", + "w_dc=v_c/CD #rad/s\n", + "w_bc=v_cb/BC #rad/s\n", + "\n", + "#Result\n", + "print'The angular velocities are: w_dc=',round(w_dc,2),\"rad/s\",'and w_bc=',round(w_bc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocities are: w_dc= 1.69 rad/s and w_bc= 2.25 rad/s\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19, Page No 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Calculations\n", + "#After equating the i and j terms we obtain simplified equations\n", + "#Solving by matrix method\n", + "A=np.array([[346,86.7],[200,-350]])\n", + "B=np.array([[-3700],[-1790]]) \n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The angular accelerations are alpha_DC=',round(C[0],3),\"rad/s**2\",'and alpha_BC=',round(C[1],2),\"rad/s**2\" \n", + "#The signs only indicate that the originally assumed orientations are incorrect and are opposite to those assumed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular accelerations are alpha_DC= -10.475 rad/s**2 and alpha_BC= -0.87 rad/s**2\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20, Page No 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=3 #m\n", + "w=8 #rad/s (clockwise)\n", + "alpha=4 #rad/s**2 (counterclockwise)\n", + "r=d*2**-1 #m\n", + "\n", + "#Calculations\n", + "vo=r*w #m/s\n", + "ao=r*alpha #m/s**2\n", + "#Here OB is r\n", + "OB=r #m\n", + "v_bo=OB*w #m/s\n", + "v_B=v_bo+vo #m/s\n", + "#Also\n", + "a_bo=r*alpha #m/s**2 (directed left)\n", + "a_bo_n=r*w**2 #m/s**2\n", + "a_h=ao+a_bo #m/s**2\n", + "a_v=a_bo_n #m/s**2\n", + "a_B=((a_h**2)+(a_v**2))**0.5 #m/s**2\n", + "phi=arctan(a_h/a_v)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The linear velocity at B is',round(v_B),\"m/s\",'and the acceleration is',round(a_B,1),\"m/s**2\",'making an angle of',round(phi,2),\"degrees with horizontal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The linear velocity at B is 24.0 m/s and the acceleration is 96.7 m/s**2 making an angle of 7.13 degrees with horizontal\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21, Page No 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "OA=0.6 #m\n", + "w=8 #rad/s\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "costheta=(3**0.5)*2**-1\n", + "v_O=12 #m/s\n", + "alpha=4 #rad/s**2\n", + "a_O=6 #m/s**2\n", + "\n", + "#Calculations\n", + "#Velocity Calculations\n", + "v_AO=OA*w #m/s\n", + "v_Ah=v_AO*sintheta+v_O #m/s horizontal component\n", + "v_Av=v_AO*costheta #m/s\n", + "v_A=((v_Ah**2)+(v_Av**2))**0.5 #m/s\n", + "phi=arctan(v_Av/v_Ah)*(180/pi) #degrees\n", + "#Acceleration Calculations\n", + "a_AOt=OA*alpha #m/s**2\n", + "a_AOn=OA*w**2 #m/s**2\n", + "a_Ah=-a_O-a_AOn*costheta-a_AOt*sintheta #m/s**2\n", + "a_Av=-a_AOn*sintheta+a_AOt*costheta #m/s**2\n", + "a_A=((a_Ah**2)+(a_Av**2))**0.5 #m/s**2\n", + "phi2=arctan(a_Av*a_Ah**-1)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The velocity is',round(v_A),\"m/s\",'making an angle of',round(phi,1),\"degrees with horizontal.\"\n", + "print'The acceleration is',round(a_A),\"m/s**2\",'making an angle of',round(phi2,1),\"degrees with horizontal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity is 15.0 m/s making an angle of 16.1 degrees with horizontal.\n", + "The acceleration is 44.0 m/s**2 making an angle of 22.9 degrees with horizontal\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22, Page No 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "AL=5 #ft\n", + "d=10 #ft displacement\n", + "\n", + "#Calculations\n", + "theta=d/AL #radians\n", + "s_o=3*theta#ft\n", + "\n", + "#Result\n", + "print'The displacement So is',round(s_o),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The displacement So is 6.0 ft\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#Speed and acceleration at the center\n", + "v=12 #in/s\n", + "a=18 #in/s**2\n", + "\n", + "#Calculations\n", + "v_D=((a+v*0.5)*a**-1)*v #in/s\n", + "#Speed at point F\n", + "v_F=((v/2)*v**-1)*v_D #in/s\n", + "#Acceleration at D\n", + "a_D=(24/a)*a #in/s**2\n", + "#Acceleration at F\n", + "a_F=((v/2)*v**-1)*24 #in/s**2\n", + "\n", + "#Result\n", + "print'The velocity and acceleration of weight A are',round(v_F),\"in/s\",'and',round(a_F),\"in/s**2 respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and acceleration of weight A are 8.0 in/s and 12.0 in/s**2 respectively.\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24, Page No 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Calculations\n", + "#Speed and acceleration of D\n", + "sD=((18-6)*18**-1)*12 #in/s\n", + "aD=(12*18**-1)*18 #in/s**2\n", + "#Speed and acceleration of F\n", + "sF=(6*12**-1)*8 #in/s\n", + "aF=(6*12**-1)*12 #in/s^2\n", + "\n", + "#Result\n", + "print'The velocity and acceleration of weight A are',round(sF),\"in/s\",'and',round(aF),\"in/s**2 respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and acceleration of weight A are 4.0 in/s and 6.0 in/s**2 respectively.\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-26, Page No 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v_BG=300 #mm/s\n", + "v_G=300 #mm/s\n", + "a_BGt=500 #mm/s**2\n", + "a_BGn=3600#mm/s**2\n", + "a_Gh=500 #mm/s**2\n", + "a_Bv=1800 #mm/s**2\n", + "\n", + "#Calculations\n", + "w=((75-25)/25)*6 #rad/s\n", + "alpha=((75-25)/25)*10 #rad/s**2\n", + "v_B=(v_BG**2+v_G**2)**0.5 #mm/s\n", + "a_v=a_Bv-a_BGt #mm/s**2\n", + "a_h=a_BGn-a_Gh #mm/s**2\n", + "a_B=(a_v**2+a_h**2)**0.5 #mm/s**2\n", + "\n", + "#Result \n", + "print'The velocity and acceleration of point B are',round(v_B),\"mm/s\",'and',round(a_B),\"mm/s**2 respectively.\"\n", + "\n", + "# The ans for a_B is incorrectin textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and acceleration of point B are 424.0 mm/s and 3362.0 mm/s**2 respectively.\n" + ] + } + ], + "prompt_number": 106 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter15.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter15.ipynb new file mode 100755 index 00000000..bb125f73 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter15.ipynb @@ -0,0 +1,510 @@ +{ + "metadata": { + "name": "chapter 15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 15: MOMENTS OF INERTIA" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-11, Page no 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "y1=1 #in\n", + "y2=4 #in\n", + "d1=2.2-1 #in\n", + "d2=4-2.2 #in\n", + "A1=12 #in**2\n", + "A2=8 #in**2\n", + "b1=6 #in\n", + "b2=2 #in\n", + "h1=2 #in\n", + "h2=4 #in\n", + "\n", + "#Calculations\n", + "y_bar=(A1*y1+A2*y2)/(A1+A2) #in\n", + "I1=(12**-1)*(b1)*(h1**3) #in**4\n", + "I2=(12**-1)*(b2)*(h2**3) #in**4\n", + "#Using Parallel Axes Theorem\n", + "I=(I1+(A1*d1**2))+(I2+(A2*d2**2)) #in**4\n", + "\n", + "#Result\n", + "print'The moment of inertia is',round(I,1),\"in**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia is 57.9 in**4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12, Page no 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=60 #mm diameter of the hole\n", + "#Areas\n", + "At=100*100 #mm**2\n", + "Ab=200*100 #mm**2\n", + "Ac=((pi/4)*d**2) #mm**2\n", + "bt=100 #mm\n", + "ht=100 #mm\n", + "bb=200 #mm\n", + "hb=100 #mm\n", + "#Distance of centroids of each area\n", + "yt=150 #mm\n", + "yb=50 #mm\n", + "yc=150 #mm\n", + "\n", + "#Calculations\n", + "y_bar=((At*yt)+(Ab*yb)-(Ac*yc))/(At+Ab-Ac) #mm\n", + "#Distances\n", + "dt=yt-y_bar #mm\n", + "db=y_bar-yb #mm\n", + "dc=yc-y_bar #mm\n", + "#Values of Inertia\n", + "It=(12**-1)*(bt)*(ht**3) #mm**4\n", + "Ib=(12**-1)*(bb)*(hb**3) #mm**4\n", + "Ic=(4**-1)*(pi)*((d/2)**4) #mm**4\n", + "#Moment of inertia\n", + "I=((It+At*dt**2)+(Ib+Ab*db**2)-(Ic+Ac*dc**2)) #mm**4\n", + "\n", + "#Result\n", + "print'The moment of inertia is',round(I,1),\"mm**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia is 77156533.6 mm**4\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-14, Page no 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "b1=2 #in\n", + "b2=4 #in\n", + "h1=8 #in\n", + "h2=2 #in\n", + "bo=8 #in\n", + "ho=8 #in\n", + "bi=4 #in\n", + "hi=4 #in\n", + "\n", + "#Calculations\n", + "I1=(12**-1)*(b1)*(h1**3) #in**4\n", + "I2=(12**-1)*(b2)*(h2**3) #in**4\n", + "I=2*(I1+I2) #in**4\n", + "Io=(12**-1)*(bo)*(ho**3) #in**4\n", + "Ii=(12**-1)*(bi)*(hi**3) #in**4\n", + "I_bar=Io-Ii #in**4\n", + "\n", + "#Result\n", + "print'The moment of inertia is',round(I_bar),\"in**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia is 320.0 in**4\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15, Page no 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "b1=75 #mm\n", + "b2=12 #mm\n", + "h1=12 #mm\n", + "h2=162 #mm\n", + "d1=75 #mm\n", + "\n", + "#Calculations\n", + "A=(h2*b2)+(2*b1*h1) #mm**2\n", + "I1=(12**-1)*(b1)*(h1**3)+(b1*h1*d1**2) #mm**4\n", + "I2=(12**-1)*(b2)*(h2**3) #mm**4\n", + "I_bar=2*I1+I2 #mm**4\n", + "k=sqrt(I_bar/A) #mm\n", + "\n", + "#Result\n", + "print'The axial moment of inertia is',round(I_bar,1),\"mm**4\"\n", + "print'The radius of gyration is',round(k,1),\"mm\"\n", + "\n", + "# Here value of k is off by 0.1 mm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial moment of inertia is 14398128.0 mm**4\n", + "The radius of gyration is 62.0 mm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20, Page no 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "r=50 #mm\n", + "\n", + "#Calculations\n", + "Ixy=(8**-1)*(50**4) #mm**4\n", + "\n", + "#Result\n", + "print'The moment of inertia is',round(Ixy,2),\"mm**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia is 781250.0 mm**4\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-24, Page no 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#The notation has been changed for ease\n", + "\n", + "#Calculations\n", + "x=(5*1*3.5+8*1*0.5)/(5*1+8*1) #in\n", + "y=(5*1*0.5+8*1*4)/13 #in\n", + "#Moment of inertia \n", + "Ix=(12**-1)*(5)*(1**3)+(5*2.15*2.15)+(12**-1)*(1*8**3)+(8*1.35**2) #in**4\n", + "Iy=(12**-1)*(1)*(5**3)+(5*1.85*1.85)+(12**-1)*(8)*(1**3)+(8*1.15**2) #in**4\n", + "Ixy=(8*1*(-1.15)*1.35)+(5*1*1.85*(-2.15)) #in**4\n", + "#Mohr circle calculations\n", + "d=0.5*(Ix+Iy) #distance to center of the cirlce \n", + "r=sqrt((21**2)+(32.3**2)) \n", + "maxI=d+r #in**4\n", + "theta=arctan(32.3/21)*(180/pi) #degrees maxI occurs at this angle\n", + "minI=d-r #in**4\n", + "\n", + "#Result\n", + "print'The moment of inertias are as follows:'\n", + "print'Ix=',round(Ix,1),\"in**4\"\n", + "print'Iy=',round(Iy,1),\"in**4\"\n", + "print'Ixy=',round(Ixy,1),\"in**4\"\n", + "print'maxI=',round(maxI,1),\"in**4\"\n", + "print'minI=',round(minI,1),\"in**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertias are as follows:\n", + "Ix= 80.8 in**4\n", + "Iy= 38.8 in**4\n", + "Ixy= -32.3 in**4\n", + "maxI= 98.3 in**4\n", + "minI= 21.2 in**4\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-25, Page no 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Notations have been changed\n", + "\n", + "#Calculations\n", + "x=-(25*125*0.5*125+25*100*0.5*25)/(25*125+25*100) #mm\n", + "y=(25*125*0.5*25+25*100*75)/5625 #mm \n", + "Iy=(12**-1)*25*125**3+25*125*(62.5-40.3)**2+(12**-1)*100*25**3+100*25*(40.3-12.5)**2 #mm**4\n", + "Ix=Iy #mm**4 for L-section\n", + "#The second computation checks the first\n", + "Ixy=(125*25*22.2*27.8)+(100*25*(-27.8)*(-34.7)) #mm**4\n", + "#Mohr Circle analysis\n", + "Imax=Ix+Ixy #mm**4\n", + "Imin=Ix-Ixy #mm**4\n", + "\n", + "#Result\n", + "print'The moment of inertias are as follows:'\n", + "print'Ix=',round(Ix,2),\"mm**4\"\n", + "print'Iy=',round(Iy,2),\"mm**4\"\n", + "print'Ixy=',round(Ixy,2),\"mm**4\"\n", + "print'Imax=',round(Imax),\"mm**4\"\n", + "print'Imin=',round(Imin,2),\"mm**4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertias are as follows:\n", + "Ix= 7671443.75 mm**4\n", + "Iy= 7671443.75 mm**4\n", + "Ixy= 4340275.0 mm**4\n", + "Imax= 12011719.0 mm**4\n", + "Imin= 3331168.75 mm**4\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-30, Page no 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "rho=490 #lb/ft**3\n", + "t=0.02 #in\n", + "d=4 #in\n", + "r=d/2 #in\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "W=(pi*r**2*t*rho)*1728**-1 #lb\n", + "#Mass\n", + "m=W*g**-1 #slugs\n", + "#Momemt of inertia\n", + "I=(4**-1)*m*(r*12**-1)**2 #slug-ft**2\n", + "\n", + "#Result\n", + "print'The moment of inertia is',round(I,6),\"slug-ft**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia is 1.5e-05 slug-ft**2\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-36, Page no 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#The integration involves variables hence the direct formula is being used in this coding\n", + "m=500 #kg\n", + "R=0.25 #m\n", + "h=0.5 #m\n", + "\n", + "#Calculations\n", + "Ix=(3*10**-1)*m*R**2 #kg.m**2\n", + "Iy=(3*5**-1)*m*((4**-1)*R**2+h**2) #kg.m**2\n", + "\n", + "#Result\n", + "print'Hence proved that Ix=',round(Ix,2),\"kg.m**2\" \n", + "print'and Iy=',round(Iy,1),\"kg.m**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence proved that Ix= 9.38 kg.m**2\n", + "and Iy= 79.7 kg.m**2\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-37, Page no 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "delta=450 #lb/ft**3\n", + "h1=9*12**-1 #ft\n", + "h2=10*12**-1 #ft\n", + "ro1=4*12**-1 #ft\n", + "ri1=2*12**-1 #ft\n", + "ro2=18*12**-1 #ft\n", + "ri2=16*12**-1 #ft\n", + "a=2.5*24**-1 #ft\n", + "b=3.5*24**-1 #ft\n", + "l=1 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "Whub=(pi*ro1**2-pi*ri1**2)*h1*delta #lb\n", + "Wrim=(pi*ro2**2-pi*ri2**2)*h2*delta #lb\n", + "#For one spoke\n", + "Wspoke=(pi*a*b*l*delta) #lb\n", + "#Moment of inertia calculations\n", + "Ihub=0.5*(Whub*g**-1)*(ro1**2+ri1**2) #lb-s**2-ft\n", + "Irim=0.5*(Wrim*g**-1)*(ro2**2+ri2**2) #lb-s**2-ft\n", + "Ispoke=6*((12**-1)*(Wspoke*g**-1)*l**2+(Wspoke*g**-1)*h2**2) #lb-s**2-ft\n", + "Iwheel=Ihub+Irim+Ispoke #lb-s**2-ft\n", + "\n", + "#Result\n", + "print'The moment of inertia of the wheel is',round(Iwheel,1),\"lb-s**s-ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of inertia of the wheel is 38.1 lb-s**s-ft\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter16.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter16.ipynb new file mode 100755 index 00000000..e7682d6d --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter16.ipynb @@ -0,0 +1,1911 @@ +{ + "metadata": { + "name": "chapter 16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 16: DYNAMICS OF A RIGID BODY IN PLANE MOTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-2, Page No 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Intilization of variables\n", + "W=600 #lb\n", + "d=30 #in\n", + "# as theta=25 degrees,\n", + "sintheta=0.422\n", + "costheta=0.906\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "m=W/g #lb-s**2/ft\n", + "#Moment of inertia\n", + "I=0.5*m*((d/2)/12)**2 #lb-s**2-ft\n", + "#Applying Newtons law and coservation of angular momentum and rolling\n", + "#Solving by matrix method\n", + "A=np.array([[1,m,0,0],[0,0,0,1],[((d/2)/12),0,-I,0],[0,1,-((d/2)/12),0]])\n", + "B=np.array([[W*sintheta],[W*costheta],[0],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The Frictional Force is',round(C[0],1),\"lb\",'and the acceleration is',round(C[1],2),\"ft/s**2\"\n", + "\n", + "# The answers wary due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Frictional Force is 84.4 lb and the acceleration is 9.06 ft/s**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3, Page No 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=18 #kg\n", + "d=0.6 #m\n", + "vo=3 #m/s\n", + "# as theta=20 degrees,\n", + "sintheta=0.342\n", + "costheta=0.939\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Moment of Inertia\n", + "I=0.5*m*(d/2)**2 \n", + "#Applying Newtons second Law a\n", + "A=np.array([[1,m,0,0],[0,0,1,0],[d/2,0,0,-I],[0,1,0,(-d/2)]])\n", + "B=np.array([[g*m*sintheta],[g*m*costheta],[0],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "#Storing the answers in variables\n", + "F=C[0] #N\n", + "ax=C[1] #m/s**2\n", + "Na=C[2] #N\n", + "alpha=C[3] #rad/s**2\n", + "#Time Calculations\n", + "v=0 #m/s**2\n", + "t=(vo)/ax #s\n", + "\n", + "#Result\n", + "print'It takes',round(t,2),\"s to reach the highest point of travel\"\n", + "\n", + "# The ans is off by 0.01 sec." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "It takes 1.34 s to reach the highest point of travel\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5, Page No 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=20 #kg\n", + "F1=40 #N\n", + "ro=0.6 #m\n", + "ri=0.45 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Moment of inertia\n", + "I=(2*5**-1)*m*ro**2 #kg-m**2\n", + "#Applying Newtons Law and conservation of angular Momentum\n", + "#Solving by matrix method\n", + "A=np.array([[1,m],[ro,-I/ro]])\n", + "B=np.array([[F1],[F1*ri]])\n", + "C=np.linalg.solve(A,B)\n", + "#Storing answers in variables\n", + "F=C[0] #N\n", + "a=C[1] #m/s**2\n", + "\n", + "#Result\n", + "print'The acceleration is',round(a,2),\"m/s**2\"\n", + "print'The force is',round(F,2),\"N\"\n", + "#The solution in the textbook is incorrect\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is 0.36 m/s**2\n", + "The force is 32.86 N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6, Page No 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=16.1 #lb\n", + "u=0.10 #co-efficient of friction\n", + "g=32.2 #ft/s**2\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "F=1.39 #lb\n", + "\n", + "#Calculations\n", + "#Applying Newtons Second Law\n", + "#Using F=1.39 lb\n", + "a=((W*sintheta)-F)/(W*g**-1) #ft/s**2\n", + "alpha=(F*0.5*5/2)/((W*g**-1)*(0.5**2)) #rad/s**2\n", + "\n", + "#Result\n", + "print'The value of a is',round(a,1),\"ft/s**2\",'and alpha is ',round(alpha,1),\"rad/s**2.\"\n", + "print'Hence the sphere will both,roll and slip'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is 13.3 ft/s**2 and alpha is 13.9 rad/s**2.\n", + "Hence the sphere will both,roll and slip\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-8, Page No 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "# as theta=30 degrees\n", + "sintheta=2**-1\n", + "W=80 #lb\n", + "Ww=100 #lb\n", + "I=4 #slug-ft**2\n", + "r=0.5 #ft\n", + "v= 20 #ft/s\n", + "vo=0 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Using Equations of motion\n", + "#Solving the system of linear equatinons by matrix method\n", + "A=np.array([[-1,0,-W/g],[1,-1,-Ww/g],[0,r,-2*I]])\n", + "B=np.array([[-W],[Ww*sintheta],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "#Storing values in variables\n", + "T=C[0] #lb\n", + "F=C[1] #lb\n", + "a=C[2] #ft/s**2\n", + "#Time calculations\n", + "t=(v-vo)/a #s\n", + "\n", + "#Result\n", + "print'The time required is',round(t,1),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 14.4 s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9, Page No 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "M=70 #kg\n", + "ko=0.4 #m\n", + "ri=0.45 #m\n", + "ro=0.6 #m\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "costheta=(3**0.5)*2**-1\n", + "m=35 #kg\n", + "g= 9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "I=M*ko**2 #kg-m**2\n", + "#Using Equations of motion\n", + "#Solving the equations by matrix method\n", + "A=np.array([[-1,-m*0.15,0],[1,-M*ro,-1],[-ri,-I,ro]])\n", + "B=np.array([[-m*g],[M*g*sintheta],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "F=C[2] #N\n", + "Na=M*g*costheta #N\n", + "#Required coefficient of friction\n", + "u=F/Na #coefficient of friction\n", + "\n", + "#Result\n", + "print'The value of alpha is',round(C[1],2),\"rad/s**2\",'and tension is',round(C[0]),\"N\"\n", + "print'F=',round(F),\"N,\",'Na=',round(Na),\"N\",'and u=',round(u,2),\"(coefficient of friction)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha is -4.15 rad/s**2 and tension is 365.0 N\n", + "F= 196.0 N, Na= 594.0 N and u= 0.33 (coefficient of friction)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exampe 16.16-10, Page No 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=200 #kg\n", + "g=9.8 #m/s**2\n", + "r=1.2 #m\n", + "F1=1000 #N\n", + "F2=1400 #N\n", + "\n", + "#Calculations\n", + "N=m*g #N\n", + "I=(2*5**-1)*(m)*r**2 #kg-m**2\n", + "#Using equations of motion\n", + "#Solving for F and alpha using matrix method\n", + "#Applying equations of motion\n", + "A=np.array([[1,-m],[-r,-I/r]])\n", + "B=np.array([[F1-F2],[F1*r]])\n", + "C=np.linalg.solve(A,B)\n", + "#Storing values\n", + "F=C[0] #N\n", + "alpha=C[1] #rad/s**2\n", + "a=r*alpha #m/s**2\n", + "\n", + "#Result\n", + "print'The value of a is',round(a,2),\"m/s**2\",'and F is',round(F),\"N\"\n", + "#The negative signs indicate that the direction is opposite to what was origninally assumed\n", + "# The answers wary due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is -2.57 m/s**2 and F is -829.0 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11, Page No 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "Wa=161 #lb\n", + "Wb=193.2 #lb\n", + "Wc=300 #lb\n", + "ka=3 #ft\n", + "kb=2.5 #ft\n", + "# as theta1=30 degrees & theta2=45 degrees,\n", + "sintheta1=2**-1\n", + "sintheta2=(2**0.5)**-1\n", + "costheta2=(2**0.5)**-1\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Moment of inertia Calculations\n", + "Ia=(Wa/g)*ka**2 #lb-s**2-ft\n", + "Ib=(Wb/g)*kb**2 #lb-s**2-ft\n", + "#Using equations of motion for A and B and C\n", + "#Solving by matrix method\n", + "A=np.array([[1,1,-Wa/g,0,0],[1,-4,-Ia*(4**-1),0,0],[-2,0,-Ib*(5*8**-1),4,0],[0,0,-(Wc/g)*(5*2**-1),-1,-0.25],[0,0,0,0,1]])\n", + "B=np.array([[Wa*sintheta1],[0],[0],[-Wc*costheta2],[Wc*sintheta2]])\n", + "C=np.linalg.solve(A,B)\n", + "#Storing values in the variables\n", + "T1=C[0] #lb\n", + "T2=C[3] #lb\n", + "a=C[2] #ft/s**2\n", + "\n", + "#Result\n", + "print'The values are:'\n", + "print'a=',round(a,2),\"ft/s**2 ,\",'T1=',round(T1),\"lb\",'and T2=',round(T2,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are:\n", + "a= 3.93 ft/s**2 , T1= 89.0 lb and T2= 67.5 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-12, Page No 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=644 #lb\n", + "F=30 #lb\n", + "# as theta=30 degrees,\n", + "sintheta=(2)**-1\n", + "costheta=(3**0.5)*2**-1\n", + "r=1.5 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "#Solving by matrix method\n", + "A=np.array([[1,-W/g],[-r,-(2**-1)*(W/g)*(2*2)*(r**-1)]])\n", + "B=np.array([[(W*sintheta)-(F*costheta)],[-F*2]])\n", + "C=np.linalg.solve(A,B)\n", + "a=C[1] #ft/s**2\n", + "\n", + "#Result\n", + "print'The value of a is',round(a,2),\"ft/s**2\"\n", + "# The negative sign indicates that the cylinder will roll down the plane." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is -6.78 ft/s**2\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-14, Page No 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=20 #lb\n", + "g=32.2 #ft/s**2\n", + "vb=0.5 #rad/s\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "#Solving the three equations simultaneously by matrix method\n", + "X=np.array([[0,1,-(W*g**-1)*5.2],[-1,0,-(W*g**-1)*3],[3,-3,-(12**-1)*(W*g**-1)*12**2]])\n", + "Y=np.array([[-0.75*(W*g**-1)],[(W*g**-1)*1.3-W],[0]])\n", + "C=np.linalg.solve(X,Y)\n", + "A=C[0] #lb\n", + "B=C[1] #lb\n", + "alpha=C[2] #rad/s**2\n", + "\n", + "#Result\n", + "print'The value of alpha is',round(alpha,1),\"rad/s**2 countercockwise\",'and of A and B are',round(A,1),\"lb up and\",round(B,2),\"lb to the right\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of alpha is 2.6 rad/s**2 countercockwise and of A and B are 14.4 lb up and 7.91 lb to the right\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-16, Page No 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "mc=7.25 #kg\n", + "d=0.9 #m\n", + "la=0.2 #m\n", + "ma=9 #kg\n", + "F=45 #N\n", + "ay=0 #m/s**2\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "I=2*(0.5*mc*(d*2**-1)**2)+0.5*ma*(la*2**-1)**2 #kg-m**2\n", + "#Using the equations of motion\n", + "Na=(2*mc+ma)*g #N\n", + "#Simplfying using radial velocity formula\n", + "#Solving the two equations using matrix method\n", + "A=np.array([[-1,-(2*mc+ma)],[(d*2**-1),-I/(d*2**-1)]])\n", + "B=np.array([[-F],[F*(la*2**-1)]])\n", + "C=np.linalg.solve(A,B)\n", + "F=C[0] #N\n", + "ax=C[1] #m/s**2\n", + "\n", + "#Result\n", + "print'The computation yields ax=',round(ax,2),\"m/s**2 to the right.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The computation yields ax= 1.13 m/s**2 to the right.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-18, Page No 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "r=0.05 #m cylinder radius\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Here the equation has been solved in terms of the veriables\n", + "#Hence we directly consider the final result\n", + "av=(2*g)/3 #m/s**2\n", + "\n", + "#Result\n", + "print'The value of av is',round(av,2),\"m/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of av is 6.53 m/s**2\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-21, Page No 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#initilization of variables\n", + "W=16.1 #lb\n", + "v=9 #ft/s\n", + "# as phi=30 degrees,\n", + "sinphi=(2)**-1\n", + "cosphi=(3**0.5)*2**-1\n", + "r=0.5 #ft\n", + "g=32.2 #ft/s**2\n", + "OG=4.5 #ft\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "an=v**2/OG #ft/s**2\n", + "#Solving for alpha we get\n", + "N=(W*g**-1)*an+W*cosphi #lb\n", + "#Using equations of motion\n", + "A=np.array([[1,-r],[-1,-r*r]])\n", + "B=np.array([[W*sinphi],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "F=C[0] #lb\n", + "at=C[1] #ft/s**2\n", + "\n", + "#Result\n", + "print'The value of N and F are',round(N,1),\"lb and\",round(F,2),\"lb respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of N and F are 22.9 lb and 2.68 lb respectively.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-25, Page No 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=50 #lb\n", + "P=10 #lb\n", + "t=5 #s\n", + "vo=0 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "ax=(P*g)/W #ft/s**2\n", + "#Solving by matrix method for A and B\n", + "F=np.array([[1,1],[-4,4]])\n", + "Q=np.array([[W],[P]])\n", + "R=np.linalg.solve(F,Q)\n", + "#Velocity calculations\n", + "v=vo+ax*t #ft/s\n", + "A=R[0] #lb\n", + "B=R[1] #lb\n", + "\n", + "#Result\n", + "print'The velocity of the door after 5s is',round(v,1),\"ft/s\",'and A=',round(A,1),\"lb\",'and B=',round(B,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the door after 5s is 32.2 ft/s and A= 23.8 lb and B= 26.3 lb\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-26, Page No 354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "#Initilization of variables\n", + "AB=2 #m\n", + "m=2 #kg\n", + "F=20 #N\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Using equation of motion\n", + "a=F/m #m/s**2\n", + "#Solving by matrix method for Na and Nb\n", + "A=np.array([[1,-1],[4*5**-1,4*5**-1]])\n", + "B=np.array([[m*g],[F*(3*5**-1)]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The value of a is',round(a),\"m/s**2\",'and the reactions are: Na=',round(C[0],1),\"N up\",'and Nb=',round(C[1],1),\"N up\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a is 10.0 m/s**2 and the reactions are: Na= 17.3 N up and Nb= -2.3 N up\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-27, Page No 354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "vo=0 #ft/s\n", + "\n", + "#Calculations\n", + "s=(0.011*5280*2)/(2*0.004)\n", + "\n", + "#Result\n", + "print'It travels',round(s),\"ft along the level before coming to rest\"\n", + "#Answer in the textbook is incorrect by 20ft\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "It travels 14520.0 ft along the level before coming to rest\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-28, Page No 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "u=0.3 #coefficient of friction\n", + "m=70 #kg\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#CASE 1\n", + "#Using equations of motion\n", + "Na=m*g #N\n", + "ah=(u*Na)/m #m/s**2\n", + "#CASE 2\n", + "#Applying sum of moments equal to zero\n", + "F=(Na*0.3)/1.2 #N\n", + "a_h=F/m #m/s**2\n", + "\n", + "#Result\n", + "#Intutive insights can be attained after we get these results\n", + "print'The value of Na is',round(Na),\"N\"\n", + "print'and that of acceleration are:'\n", + "print'1st value=',round(ah,2),\"m/s**2\",'and 2nd value is',round(a_h,2),\"m/s**2\"\n", + "print'and the value of F is',round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Na is 686.0 N\n", + "and that of acceleration are:\n", + "1st value= 2.94 m/s**2 and 2nd value is 2.45 m/s**2\n", + "and the value of F is 172.0 N\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-29, Page No 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=60 #kg\n", + "me=660 #kg\n", + "a=6 #m/s**2\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "P=m*a+m*g #N\n", + "#Scale reading\n", + "R=P/g #kg\n", + "#Increase in mass\n", + "I=R-m #kg\n", + "#Tension\n", + "T=me*a+me*g #N\n", + "\n", + "#Result\n", + "print'The value of P is',round(P),\"n\"\n", + "print'The apparent icrease in weight is',round(I,1),\"kg\",'and the tension in the cable is',round(T),\"N\"\n", + "#Answer in the textbook is off by 28 #N in Tension\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P is 948.0 n\n", + "The apparent icrease in weight is 36.7 kg and the tension in the cable is 10428.0 N\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-30, Page No 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "u=0.2 #coefficient of friction\n", + "ma=1.2 #kg\n", + "mb=2 #kg\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "Nb=mb*g #N\n", + "F=u*Nb #N\n", + "#Using equations of motion\n", + "#Solving for T and a\n", + "A=np.array([[-1,-ma],[1,-mb]])\n", + "B=np.array([[-ma*g],[F]])\n", + "C=np.linalg.solve(A,B)\n", + "T=C[0] #N\n", + "a=C[1] #m/s**2\n", + "#Taking the sum of the moments\n", + "x_m=-(F*0.15+T*0.15)/Nb #m\n", + "x=x_m*1000 #mm\n", + "\n", + "#Result\n", + "print'The acceleration of block A is',round(a,2),\"m/s**2\" \n", + "print'and Nb acts at a distance of',round(x,1),\"mm.(Negative sign indictaes that the side assumed is incorrect)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A is 2.45 m/s**2\n", + "and Nb acts at a distance of -97.5 mm.(Negative sign indictaes that the side assumed is incorrect)\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-31, Page No 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "a=2.5 #m/s**2\n", + "mA=3 #kg\n", + "mB=7 #kg\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "F=(mA+mB)*a #N\n", + "#Using equations of motion\n", + "Py=mB*g #N\n", + "#Solving for Px and H\n", + "A=np.array([[1,1],[-0.0375,0.0375]])\n", + "B=np.array([[mB*a],[Py*0.05]])\n", + "C=np.linalg.solve(A,B)\n", + "Px=C[0] #N\n", + "H=C[1] #N\n", + "\n", + "#Result\n", + "print'The value of H is',round(H,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of H is 54.5 N\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-32, Page No 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=20 #kg\n", + "g=9.8 #m/s**2\n", + "vo=3 #m/s\n", + "v=0 #m/s\n", + "s=4 #m\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "Na=m*g #N\n", + "F=(Na*0.075)/0.125 #N\n", + "a=F/m #m/s**2\n", + "#Displacement \n", + "d=-(v**2-vo**2)/(2*a) #m\n", + "displ=s-d #m\n", + "v_f=sqrt(2*a*displ) #m/s\n", + "\n", + "#Result\n", + "print'The final velocity is',round(v_f,2),\"m/s to the left.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final velocity is 6.17 m/s to the left.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-33, Page No 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "mA=30 #kg\n", + "mB=45 #kg\n", + "u_ab=3**-1 #coefficient of friction between two blocks\n", + "u_bp=10**-1 #coefficient of friction between block and horizontal plane\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#By inspection\n", + "Na=mA*g #N\n", + "Nb=Na+mB*g #N\n", + "a=(u_ab*Na-u_bp*Nb)/mB #m/s**2\n", + "P=(mA*a+u_ab*Na) #N\n", + "#For block A\n", + "#Solving for P,F and a\n", + "A=np.array([[1,-1,-mA],[-0.05,-0.075,0],[0,1,-mB]])\n", + "B=np.array([[0],[-Na*0.050],[Nb*u_bp]])\n", + "C=np.linalg.solve(A,B)\n", + "P_new=C[0] #N\n", + "\n", + "#Result\n", + "#As p < p_new\n", + "print'The maximum value of P is',round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of P is 114.0 N\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-34, Page No 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Vo=1.5 #m/s\n", + "V=0 #m/s\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "a=(g*0.2)/0.75 #m/s**2\n", + "t=-(V-Vo)/a #s\n", + "\n", + "#Result\n", + "print'The maximum acceleration is',round(a,2),\"m/s**2\",'and minimum time is',round(t,2),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum acceleration is 2.61 m/s**2 and minimum time is 0.57 s\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-36, Page No 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "vo=0 #mi/h\n", + "v=60 #mi/h\n", + "t=13.8 #s\n", + "W=3385 #lb\n", + "xb=46 #in\n", + "xf=66 #in\n", + "xv=31 #in\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "a=(((v*88*60)/3600)-vo)/t #ft/s**2\n", + "#Summing horizontal forces\n", + "F=(W/g)*a #lb\n", + "#Solving for Rf and Rr\n", + "A=np.array([[1,1],[-xf,xb]])\n", + "B=np.array([[W],[-F*xv]])\n", + "C=np.linalg.solve(A,B)\n", + "Rr=C[0] #lb\n", + "Rf=C[1] #lb\n", + "\n", + "#Result\n", + "print'The value of reactions are Rf=',round(Rf),\"lb\",'and Rr=',round(Rr),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of reactions are Rf= 1809.0 lb and Rr= 1576.0 lb\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-43, Page No 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=161 #lb\n", + "F=16.1 #lb\n", + "r=18 #ft radius\n", + "t=2 #s\n", + "g=32.2 #ft/s**2\n", + "wo=0 #rad/s\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "#Solving for T and alpha\n", + "A=np.array([[r*12**-1,-0.5*(W*g**-1)*(r*12**-1)**2],[-1,-F*g**-1]])\n", + "B=np.array([[0],[-F]])\n", + "C=np.linalg.solve(A,B)\n", + "alpha=C[1] #rad/s**2\n", + "w=wo+(alpha*t) #rad/s\n", + "\n", + "#Result\n", + "print'The angular speed is',round(w,2),\"rad/s\"\n", + "\n", + "#The ans is incorrect in textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular speed is 7.58 rad/s\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-47, Page No 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization fo variables\n", + "r=2000 #ft\n", + "g=32.2 #ft/s**2\n", + "d=4.71 #ft\n", + "v=176 #ft/s\n", + "\n", + "#Calculations\n", + "e=(d*v**2)/(g*r) #ft\n", + "\n", + "#Result\n", + "print'The superelevation is',round(e,2),\"ft\"\n", + "#Watch the unit in the final answer\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The superelevation is 2.27 ft\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-48, Page No 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "a=5 #ft/s**2\n", + "C=50 #lb-ft\n", + "W=161 #lb\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "T=0.5*(W/g)*1**2*a+C #lb\n", + "Ox=-T*(2/sqrt(a)) #lb\n", + "Oy=T*(1/sqrt(a))+W #lb\n", + "Wa=T/(1-(a/g)) #lb\n", + "\n", + "#Result\n", + "print'The values are: T=',round(T,1),\"lb\",', Wa=',round(Wa),\"b\",',Ox=',round(Ox,1),\"lb\",'and Oy=+',round(Oy),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are: T= 62.5 lb , Wa= 74.0 b ,Ox= -55.9 lb and Oy=+ 189.0 lb\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-49, Page No 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=100 #kg\n", + "mr=20 #kg\n", + "w=8 #rad/s\n", + "l1=300 #mm\n", + "l2=600 #mm\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "r_bar=(mr*l1+m*750)/120 #mm\n", + "I=(3**-1)*mr*(l2*1000**-1)**2+(2*5**-1)*m*(l1*2000**-1)**2+m*(0.75)**2 #kg.m**2\n", + "alpha=(m+mr)*g*(r_bar*1000**-1)/I #rad/s**2\n", + "On=(m+mr)*(r_bar*1000**-1)*w**2 #N\n", + "Ot=((m+mr)*(r_bar*1000**-1)*alpha)-(m+mr)*g #N\n", + "\n", + "#Result\n", + "print'The angular acceleration is',round(alpha,1),\"rad/s**2\",'and On=',round(On),\"N\",'and Ot=',round(Ot,1),\"N\"\n", + "\n", + "#Due to decimal accuracy there is discrepancy in answers with the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular acceleration is 13.3 rad/s**2 and On= 5184.0 N and Ot= -96.3 N\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-50, Page No 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=40 #lb\n", + "w=10 #rad/s\n", + "alpha=2 #rad/s**2\n", + "r=2 #in\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "On=(W*g**-1)*(1*6**-1)*w**2 #lb\n", + "Ot=(W*g**-1)*(1*6**-1)*alpha\n", + "Io=(0.5*(W*g**-1)*0.5**2)*2+((W*g**-1)*(1*6**-1)**2)*2\n", + "\n", + "#Result\n", + "print'The reaction components are On=',round(On,1),\"lb to the right\",'and Ot=',round(Ot,2),\"lb up\"\n", + "print'The value of Io is',round(Io,2),\"lb-ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction components are On= 20.7 lb to the right and Ot= 0.41 lb up\n", + "The value of Io is 0.38 lb-ft\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-51, Page No 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilizatin of variables\n", + "W=6 #lb\n", + "l=8 #ft\n", + "v=10 #ft/s\n", + "g=32.2 #ft/s**2\n", + "# as theta1=60 degrees & theta2=30 degrees\n", + "costheta1=2**-1\n", + "costheta2=(3**0.5)*2**-1\n", + "\n", + "#Calculations\n", + "Fe=(W*v**2)*(g*l*0.5)**-1 #lb\n", + "#Using equations of motion\n", + "#Solving for C and T\n", + "A=np.array([[costheta1,-costheta2],[costheta2,costheta1]])\n", + "B=np.array([[-Fe],[W]])\n", + "P=np.linalg.solve(A,B) #lb\n", + "C=P[0] #lb\n", + "T=P[1] #lb\n", + "\n", + "#Result\n", + "print'The value of C is',round(C,2),\"lb\",'and T is',round(T,2),\"lb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C is 2.87 lb and T is 7.03 lb\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-52, Page No 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=32.2 #lb\n", + "T=120 #lb\n", + "m=1 #slug\n", + "r=6*12**-1 #ft\n", + "\n", + "#Calculations\n", + "w=sqrt((T*(3*5**-1)*4)*(m*r*3)**-1) #rad/s\n", + "\n", + "#Result\n", + "print'The angular speed permissible is',round(w,1),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular speed permissible is 13.9 rad/s\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-53, Page No 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=30 #kg\n", + "k=0.45 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Using equations of motion\n", + "#Solving for T1,T2 and alpha\n", + "A=np.array([[1,0,-m],[0,-1,-45],[-0.6,0.3,-m*k**2]])\n", + "B=np.array([[50*g],[-150*g],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The values are: T1=',round(C[0]),\"N\",',T2=',round(C[1]),\"N\",'and alpha=',round(C[2],1),\"rad/s**2\"\n", + "\n", + "# The answer for T2 and alpha is off by 4 & 0.1 units" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are: T1= 607.0 N ,T2= 1294.0 N and alpha= 3.9 rad/s**2\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-54, Page No 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wc=28 #lb\n", + "v=16 #ft/s\n", + "Ib=12 #ft-lb-s**2\n", + "u=0.4 #coefficient of friction\n", + "t=2 #s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "T=Wc+(Wc*g**-1)*8 #lb\n", + "alpha=(8*12)*15**-1 #rad/s**2\n", + "F=((Ib*alpha)+(T*1.25))/t #lb\n", + "N=F/u #lb\n", + "#Summing moments about D\n", + "P=(N*8+F*3)/40 #lb\n", + "#Summing forces horizontally and vertically\n", + "Dx=151-P #lb\n", + "Dy=-F #lb\n", + "\n", + "#Result\n", + "print'The reactions at D are: Dx=',round(Dx),\"lb to right\",'and Dy=',round(Dy,1),\"lb down\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reactions at D are: Dx= 116.0 lb to right and Dy= -60.2 lb down\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-55, Page No 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=8 #kg\n", + "n=90 #rpm\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "Fg=m*g #N\n", + "w=2*pi*n/60 #rad/s\n", + "#using equations of motion\n", + "By=m*g #N\n", + "#Solving for Bx and C\n", + "A=np.array([[1,1],[-0.3,0.9]])\n", + "B=np.array([[m*0.3*w**2],[By*0.3]])\n", + "C=np.linalg.solve(A,B) #N\n", + "\n", + "#Result\n", + "print'The solution is: Bx=',round(C[0]),\"N\",',By=',round(By,1),\"N\",'and C=',round(C[1],1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solution is: Bx= 140.0 N ,By= 78.4 N and C= 72.9 N\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-56, Page No 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=8 #kg\n", + "n=90 #rpm\n", + "g=9.8 #m/s**2\n", + "r=0.3 #m\n", + "\n", + "#calculations\n", + "w=2*pi*n/60 #rad/s\n", + "#Using equations of motion\n", + "C=(m*g*0.3+m*r*w**2*r)/1.2 #N\n", + "Bx=-C+m*r*w**2 #N\n", + "By=m*g #N\n", + "\n", + "#Result\n", + "print'The solution is: Bx=',round(Bx),\"N\",',By=',round(By,1),\"N\",'and C=',round(C,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solution is: Bx= 140.0 N ,By= 78.4 N and C= 72.9 N\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-57, Page No 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Na=294 #N\n", + "Nb=735 #N\n", + "\n", + "#Calculations\n", + "a=(10**-1*Nb-3**-1*Na)/45 #m/s**2\n", + "P=(3**-1*Na)-30*a #N\n", + "\n", + "#Result\n", + "print'The solution is P=',round(P),\"N\",'and a=',round(a,3),\"m/s**2\"\n", + "# The negative sign indicates the assumed direction is incorrect." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solution is P= 114.0 N and a= -0.544 m/s**2\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-58, Page No 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=50 #lb\n", + "g=32.2\n", + "\n", + "#Calculations\n", + "#Using equations of motion\n", + "a=(10/(W/g)) #ft/s**2\n", + "B=((2.5*(W/g)*a)+4*W-1.5*10)/8 #lb\n", + "A=50-B #lb\n", + "\n", + "#Result\n", + "print'The solution is A=',round(A,1),\"lb\",',B=',round(B,1),\"lb\",'and a=',round(a,2),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solution is A= 23.8 lb ,B= 26.3 lb and a= 6.44 ft/s**2\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-60, Page No 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "g=9.8 #m/s**2\n", + "r1=0.3 #m\n", + "m1=20 #kg\n", + "m2=100 #kg\n", + "r2=0.75 #m\n", + "\n", + "#Calculations\n", + "alpha=(m1*g*r1+m2*g*r2)*(m1*r1**2+(m1/12)*0.6**2+m2*r2**2+(2*5**-1)*m2*0.15**2)**-1 #rad/s**2\n", + "\n", + "#Result\n", + "print'The angular acceleration is',round(alpha,1),\"rad/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular acceleration is 13.4 rad/s**2\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-61, Page No 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "r=15*12**-1 #ft\n", + "W=600 #lb\n", + "# as theta=25 degrees,\n", + "sintheta=0.422\n", + "\n", + "#calculations\n", + "ax=(r*W*sintheta)*((r**-1)*14.5+r*18.6)**-1 #ft/s**2\n", + "F=(W*sintheta)-(18.6*ax) #lb\n", + "\n", + "#Result\n", + "print'The solution is F=',round(F,1),\"lb\",'and ax=',round(ax,2),\"ft/s**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The solution is F= 84.3 lb and ax= 9.08 ft/s**2\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-62, Page No 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=7 #kg\n", + "g=9.8 #m/s**2\n", + "r=0.5 #m\n", + "I=0.875 #kg.m**2\n", + "\n", + "#Calculations\n", + "#Solving for alpha and T\n", + "alpha=(m*g*r)/(I+m*r*0.5) #rad/s**2\n", + "T=(I*alpha)/r #N\n", + "\n", + "#Result\n", + "print'The soultion is alpha=',round(alpha,1),\"rad/s**2\",'and T=',round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The soultion is alpha= 13.1 rad/s**2 and T= 22.9 N\n" + ] + } + ], + "prompt_number": 79 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter17.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter17.ipynb new file mode 100755 index 00000000..9e42f760 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter17.ipynb @@ -0,0 +1,1273 @@ +{ + "metadata": { + "name": "chapter 17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 17: WORK AND ENERGY" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-4, Page No 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initilization of variables\n", + "s1=2 # compression of the spring- initial\n", + "s2=5 # compression of the spring- final\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(s, a, b):\n", + " return 20*s\n", + "a=1\n", + "b=1\n", + "U=quad(integrand, s1, s2, args=(a,b))\n", + "\n", + "# Results\n", + "print'The word done in compressing the spring is',round(U[0]),\"in-lb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The word done in compressing the spring is 210.0 in-lb\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6, Page No 400" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=5 #kg\n", + "d=6 #m\n", + "# as theta1=30 degrees & theta2=10 degrees,\n", + "sintheta1=2**-1\n", + "sintheta2=0.1736\n", + "costheta1=(3**0.5)*2**-1\n", + "costheta2=0.9848\n", + "u=0.2 #coefficient of friction\n", + "g=9.8 #m/s**2\n", + "F=70 #N\n", + "\n", + "#Calculations\n", + "#Using free body diagram\n", + "Na=(m*g*costheta1)-(F*sintheta2) #N\n", + "#work done by each force\n", + "W=[F*costheta2,-m*g*sintheta1,0,-u*Na*d] #N.m\n", + "#Total Work Done\n", + "W_tot=W[0]+W[1]+W[2]+W[3] #N.m\n", + "#Using resultant\n", + "R=F*costheta2-(u*Na)-(m*g*sintheta1) #N\n", + "W_d=R*d #N.m (Work Done)\n", + "\n", + "#Result\n", + "print'The work done is',round(W_d),\"N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work done is 230.0 N.m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-7, Page No 401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=20 #kg\n", + "d=1.5 #m\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "u=0.25 #coefficient of friction\n", + "g=9.8 #m/s**2\n", + "F=130 #N\n", + "\n", + "#Calculations\n", + "W=F*d-(m*g*sintheta*d) #N.m\n", + "\n", + "#Result\n", + "print'The work done is',round(W),\"N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work done is 48.0 N.m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-9, Page No 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=6*12**-1 #ft\n", + "l=8*12**-1 #ft\n", + "l_c=3.2 #in\n", + "y=1.82 #in**2\n", + "\n", + "#Calculations\n", + "V=1*4**-1*pi*d**2*l #ft**3\n", + "#One horizontal inch \n", + "h_i=V/l_c #ft**3\n", + "#One vertical inch\n", + "v_i=100*144 #lb/ft**2\n", + "#Then 1.82 in**2 represents\n", + "x=y*v_i*h_i #ft-lb\n", + "\n", + "#Result\n", + "print'The work capacity is',round(x),\"ft-lb\"\n", + "\n", + "# The ans in the textbook is incorrect." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work capacity is 1072.0 ft-lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-10, Page No 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "speed=90000 #m/h\n", + "P=100*1000 #N\n", + "\n", + "#Calculations\n", + "Power=P*((speed)/3600) #J/s\n", + "\n", + "#Result\n", + "print'The power developed is',round(Power*10**-6,1),\"MJ/s\"\n", + "# Note the unit used." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power developed is 2.5 MJ/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-11, Page No 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=0.6 #m\n", + "T_t=800 #N\n", + "T_s=180 #N\n", + "w=200 #rpm\n", + "\n", + "#Calculations\n", + "r=d/2 #m radius\n", + "#Torque\n", + "M=(T_t-T_s)*r #N.m\n", + "#Power\n", + "w_new=(2*pi*w)/60 #rad/s\n", + "Power=M*(w_new) #W\n", + "\n", + "#Result\n", + "print'The power transmitted is',round(Power*10**-3,1),\"kW\"\n", + "\n", + "# The answer in the book is incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power transmitted is 3.9 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-12, Page No 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "P=25.6 #lb\n", + "w=600 #rpm\n", + "a=36 #in\n", + "b=12 #in\n", + "\n", + "#Calculations\n", + "M=P*(((b*2**-1)+a)/12) #lb-ft\n", + "w_new=(2*pi*w)/60 #rad/s\n", + "Hp=(M*w_new)/550 #hp\n", + "\n", + "#Result\n", + "print'The power being transmitted is',round(Hp,1),\"hp\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power being transmitted is 10.2 hp\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-13, Page No 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Pout=3.8 #bhp\n", + "Pin=4.1 #ihp\n", + "\n", + "#Calculations\n", + "Efficiency=round((Pout/Pin)*100) #Percent\n", + "\n", + "#Result\n", + "print'The efficiency of the engine is',round(Efficiency),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the engine is 93.0 %\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-15, Page No 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return -(3/x)\n", + "a=1\n", + "b=1\n", + "U=quad(integrand, 6, 3, args=(a,b))\n", + "g=32.2 # ft/s**2\n", + "deltaT=((U[0]*32.2*2)/(4*16**-1))**0.5\n", + "# Results\n", + "print'The speed of the disc will be',round(deltaT,1),\"ft/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the disc will be 23.1 ft/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-16, Page No 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=2 #m\n", + "m=4 #kg\n", + "w_1=20 #rpm\n", + "w_2=50 #rpm\n", + "rev=10 #no of revolution\n", + "\n", + "#Calculations\n", + "Io=(3**-1)*(m)*l**2 #kg.m**2\n", + "w1=(2*pi*w_1)/60 #rad/s\n", + "w2=(2*pi*w_2)/60 #rad/s\n", + "theta=2*pi*rev #rad\n", + "M=(0.5*Io*(w2**2-w1**2))/theta #N.m\n", + "\n", + "#Result\n", + "print'The constant moment required is',round(M,3),\"N.m\"\n", + "# The ans waries in decimal places." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The constant moment required is 0.977 N.m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-18, Page No 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=1000 #lb\n", + "w_w=200 #lb weight of the individual wheel\n", + "d_w=2.5 #ft diameter of the wheel\n", + "v=22 #ft/s\n", + "t=2 #minutes\n", + "\n", + "#Calculations\n", + "#T1=Initial Kinetic Energy and T2=Final Kinetic Energy\n", + "F=(-0.5*W*32.2**-1*v**2-4*0.5*w_w*32.2**-1*(v**2+0.5*v**2))/(10560) #lb\n", + "#Negative sign in the answer tells it oposses the motion\n", + "\n", + "#Result\n", + "print'The rolling resistance is',round(F,2),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rolling resistance is -1.57 lb\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-19, Page No 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=100 #lb\n", + "lo=4 #ft\n", + "# as theta=45 degrees\n", + "costheta=(2**0.5)**-1\n", + "g=32.2 #ft/s**2\n", + "l=8/3 #ft\n", + "\n", + "#Calculations\n", + "#Taking moment about point O and equating it to zero\n", + "alpha=(W*(lo*0.5)*costheta)/((W/g)*(l)*2) #rad/s**2\n", + "#Summing forces in the t direction\n", + "Ot=(W*costheta)-((W/g)*lo*0.5*alpha) #lb\n", + "#Work Done\n", + "Work=W*(lo*0.5*costheta) #ft/lb\n", + "#Moment of inertia\n", + "Io=(3**-1)*(W/g)*(lo**2) #kg-ft**2\n", + "#Using the concept for work done=chane in K.E\n", + "w=(Work/(0.5*Io))**0.5 #rad/s\n", + "#Summing forces along the bar\n", + "On=-(-((W/g)*lo*0.5*w**2)-(W*costheta)) #lb\n", + "\n", + "#Result\n", + "print'The bearing reaction at O on the rod is',round(On),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bearing reaction at O on the rod is 177.0 lb\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-21, Page No 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "vo=9 #m/s\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "x=((7*10**-1)*vo**2)*(g*sintheta)**-1 #m\n", + "\n", + "#Result\n", + "print'The ball will roll',round(x,1),\"m up the plane\"\n", + "\n", + "#The textbook wrongly mentions the unit of displacement as in\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball will roll 11.6 m up the plane\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-22, Page No 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=322 #lb\n", + "F=12 #lb\n", + "a=0 #lower limit (where the cyliner starts rolling)\n", + "b=pi/2 #Upper Limit (where the cyliner stops rolling)\n", + "d=3.2 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "dR=1.6 #Differential Radius\n", + "d_U=2*dR*F #differential work done\n", + "#Integration Calculations\n", + "#As it is a simple integration we can resort to this\n", + "U=d_U*(b-a) #ft-lb\n", + "#Determination of K.E\n", + "w=sqrt(U/((0.5*(W/g)*(1/(d/2)**2))+((0.5*0.5)*(W/g)*(d/2)**2))) #rad/s\n", + "\n", + "#Result \n", + "print'The angular velocity of the cylinder is',round(w,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of the cylinder is 2.69 rad/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-24, Page No 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wa=161 #lb\n", + "Wb=193.2 #lb\n", + "Wc=322 #lb\n", + "v1=5 #ft/s\n", + "lc=6 #in\n", + "k=6 #lb/ft\n", + "l=4 #ft\n", + "u=0.2 #coefficient of friction\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "Ib=(2**-1)*(Wb/g)*(2**-1)**2 #Moment of inertia\n", + "w1=v1*0.5**-1 #rad/s\n", + "T1=(0.5*(Wc/g)*v1**2)+(0.5*Ib*w1**2)+(0.5*(Wa/g)*v1**2) #ft-lb\n", + "#Work Done on the system\n", + "#The textbook is ambigious on the calculations hence the result is dispalyed directly\n", + "U=26.4 #ft-lb\n", + "#Velocity Calculations\n", + "v=((T1+U)*9**-1)**0.5 #ft/s\n", + "\n", + "#Result\n", + "print'The velocity of the block is',round(v,2),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the block is 5.29 ft/s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-25, Page No 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Mm=70 #kg\n", + "Mc=45 #kg\n", + "R=0.6 #m\n", + "g=9.8 #m/s**2\n", + "l=5 #m\n", + "# as theta=50 degrees,\n", + "sintheta=0.77\n", + "\n", + "#Calculations\n", + "#T2 calculations except for v term in it as it cannot be declared as a number\n", + "T2=68.7 #without the v term in it\n", + "v=((g*Mm*l-g*Mc*l*sintheta)/T2)**0.5 #m/s\n", + "\n", + "#Result\n", + "print'The speed is',round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed is 5.02 m/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-26, Page No 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#The textbook has a typo in printing the question number\n", + "#Initilization of variables\n", + "W1=96.6 #lb\n", + "W2=128.8 #lb\n", + "v=8 #ft/s\n", + "g=32.2 #ft/s**2\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "\n", + "#Calculations\n", + "#Initial KE of the system is T1=0\n", + "T2=(0.5*(W1/g)*v**2)+(0.5*(W2/g)*(v/2)**2) #ft-lb\n", + "#Work Done without s term\n", + "U=-(W1*sintheta)+W2*0.5\n", + "#S calculations\n", + "s=T2*U**-1 #ft\n", + "\n", + "#Result\n", + "print'The block attains a speed of 8 ft/s in',round(s,2),\"ft (up the plane)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The block attains a speed of 8 ft/s in 7.95 ft (up the plane)\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-28, Page No 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initilization of variables\n", + "l=6 #m length of the cable\n", + "m=50 #kg mass of the cable\n", + "g=9.8 #m/s**2\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return 81.7*(6-x)\n", + "a=1\n", + "b=1\n", + "Work=quad(integrand, 0, 6, args=(a,b))\n", + "\n", + "# Results\n", + "print'The word done is',round(Work[0]),\"N.m\"\n", + "# The answer in textbook is off by 1 N.m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The word done is 1471.0 N.m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-31, Page No 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initilization of variables\n", + "k=0.044 # spring constant\n", + "#x=0.300 #m length of compression from 450 to 150\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return 0.5*0.044*x**2\n", + "a=1\n", + "b=1\n", + "W=quad(integrand, 0, 300, args=(a,b))\n", + "\n", + "# Results\n", + "print'The word done on the balls is',round(W[0]*10**-5,2),\"N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The word done on the balls is 1.98 N.m\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-32, Page No 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=10 #kg\n", + "d=1.2 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Initilial KE is zero\n", + "#Final KE is(without v^2 term in it)\n", + "KE2=(3*4**-1)*10\n", + "#Work Done\n", + "U=m*g*d #N.m\n", + "#Velocity calculations\n", + "v=sqrt(U*KE2**-1) #m/s\n", + "\n", + "#Result\n", + "print'The velocity is',round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity is 3.96 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-33, Page No 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=161 #lb\n", + "wa=150 #lb\n", + "wb=100 #lb\n", + "la=2 #ft\n", + "lb=4 #ft\n", + "\n", + "#Calculations\n", + "#Work Done\n", + "T1=wb*lb-wa*la #ft-lb\n", + "#Final KE=zero\n", + "T2=0 #ft-lb\n", + "#Work Done on the system=T2-T1\n", + "#Hence the equation becomes\n", + "#50x-50x^2+100=0\n", + "#where\n", + "a=-50\n", + "b=50\n", + "c=100\n", + "#Solution\n", + "d=sqrt(b**2-4*a*c) \n", + "x1=(-b+d)/(2*a) #ft\n", + "x2=(-b-d)/(2*a) #ft\n", + "\n", + "#Result\n", + "print'The stretch of the spring is',round(x2),\"ft\"\n", + "#Here even x1 could have been the solution,but the stretch in the string is elongation not compression hence x2 is the valid answer\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The stretch of the spring is 2.0 ft\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-34, Page No 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "I=100 #slug-ft**2\n", + "w=4 #rad/s\n", + "theta=6 #rad\n", + "Mc=64.4 #lb\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "vb=2*w #ft/s\n", + "vc=0.5*w #ft/s\n", + "Mb=(0.5*I*w**2+0.5*(Mc/g)*vc**2+0.5*Mc*theta)/(2*theta-(0.5*vb**2*(1/g))) #lb\n", + "\n", + "#Result\n", + "print'The weight of the block B is',round(Mb,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight of the block B is 90.6 lb\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-35, Page No 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wa=96.6 #lb\n", + "Wb=128.8 #lb\n", + "g=32.2 #ft/s**2\n", + "I=12 #slug-ft**2\n", + "v=16 #ft/s\n", + "ratio=3**-1 #ratio of Sb/Sa\n", + "r=3#ft\n", + "va=6 #ft/s\n", + "vb=2 #ft/s\n", + "\n", + "#Calculations\n", + "#Work Done without S in it\n", + "W=Wa-(ratio*Wb)\n", + "#System has zero KE initially and final KE is given by\n", + "w=va/r #rad/s\n", + "T2=(0.5*(Wa/g)*va**2+0.5*I*w**2+0.5*(Wb/g)*vb**2) #ft-lb\n", + "#Distance Calculations\n", + "S=T2*W**-1 #ft\n", + "\n", + "#Result\n", + "print'The distance through which A falls is',round(S,2),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which A falls is 1.6 ft\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-36, Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initilization of variables\n", + "u=0.25 #coefficient of friction\n", + "k=2800 #N/m\n", + "x=0.075 #m\n", + "g=9.8 #m/s**2\n", + "m=7 #kg\n", + "# as theta=30 degrees,\n", + "sintheta=2**-1\n", + "costheta=(3**0.5)*2**-1\n", + "\n", + "#Calculations\n", + "#Normal Reaction\n", + "N=g*m*costheta #N\n", + "#Frictional Force\n", + "Fr=u*N #N\n", + "#Component of force along the plane\n", + "F=g*m*sintheta #N\n", + "#Spring work is\n", + "W=0.5*k*x*x #N.m\n", + "s=(W+Fr*x-F*x)/(F-Fr) #m\n", + "S=(s*1000) #mm\n", + "\n", + "#Result\n", + "print'The value of S is',round(S),\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of S is 330.0 mm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-37, Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=5 #kg\n", + "l=2 #m\n", + "k=10000 #N/m\n", + "x=0.1 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "drop=l+x #m mass drop length\n", + "#Work Done by Gravity\n", + "Wg=g*m*drop #N.m\n", + "#Work Done by Spring\n", + "Ws=0.5*k*x**2 #N.m\n", + "#Increase in KE is without v**2\n", + "KE=0.5*m #kg\n", + "#Velocity Calculations\n", + "v=sqrt((Wg-Ws)/KE) #m/s\n", + "\n", + "#Result\n", + "print'The speed is',round(v,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed is 4.6 m/s\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-38, Page No 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=6 #ft\n", + "k=20 #lb/in\n", + "x=8 #in\n", + "\n", + "#Calculations\n", + "#Work Done by Gravity\n", + "Wg=(l*12+x) #in without W\n", + "#Work Done by Spring\n", + "Ws=0.5*k*x**2 #in-lb\n", + "#Change in the kinetic energy is zero\n", + "W=Ws/Wg #lb\n", + "\n", + "#Result\n", + "print'The weight is',round(W),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight is 8.0 lb\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-40, Page No 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=8 #lb\n", + "\n", + "#Calculations\n", + "#work done by the spring woithout k\n", + "Ws=0.5*((9*12**-1)**2-(12**-1)**2) \n", + "#Work done by gravity\n", + "Wg=W*(10.5*12**-1) #ft-lb\n", + "#Change in KE is zero\n", + "k=Wg/Ws #lb/ft\n", + "\n", + "#Result\n", + "print'The value of k is',round(k,1),\"lb/ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of k is 25.2 lb/ft\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-41, Page No 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wc=100 #lb\n", + "r= 1 #ft\n", + "F=80 #lb\n", + "k=50 #lb/ft\n", + "s=6 #in\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Work done on the system\n", + "U=-0.5*k*(1)+F*(s*12**-1) #ft-lb\n", + "#Initial KE is zero\n", + "Vo=(U/(0.5*(Wc/g+0.5*(Wc/g)*r)))**0.5 #ft/s\n", + "\n", + "#Result\n", + "print'The initial speed is',round(Vo,2),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial speed is 2.54 ft/s\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter18.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter18.ipynb new file mode 100755 index 00000000..37ca845e --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter18.ipynb @@ -0,0 +1,1503 @@ +{ + "metadata": { + "name": "chapter 18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 18: IMPULSE AND MOMENTUM" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8, Page No 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=100 #lb\n", + "u=0.2 #coefficient of friction\n", + "t=5 #s\n", + "v1=5 #ft/s\n", + "v2=10 #ft/s\n", + "g=32.2 #ft/s**2\n", + "ll=0 #lower limit of integration\n", + "ul=5 #upper limit of integration\n", + "\n", + "#Calculations\n", + "Fr=u*W #lb\n", + "#Using The impulse momentum theorem\n", + "#Since the integration is just subtraction of limits we can skip that\n", + "F=((W/g)*v2-(W/g)*v1+Fr*ul)/ul #lb\n", + "\n", + "#Result\n", + "print'The Force is',round(F,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Force is 23.1 lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9, Page No 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=10 #kg\n", + "#theta=30,thus\n", + "cos30=sqrt(3)*2**-1\n", + "sin30=2**-1\n", + "u=0.3 #coefficient of kinetic friction\n", + "t=5 #s\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Asthere is no motion in the vertical direction \n", + "#Summing forces along vertical direction\n", + "Na=m*g*cos30 #N\n", + "#Using impulse momentum theorem\n", + "vx=(m*g*sin30-u*Na)*(t*m**-1) #m/s\n", + "\n", + "#Result\n", + "print'The speed after 5s is',round(vx,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed after 5s is 11.8 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10, Page No 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(t, a, b):\n", + " return 20*t-16\n", + "a=1\n", + "b=1\n", + "F=quad(integrand, 1, 5, args=(a,b))\n", + "g=32.2 # ft/s**2\n", + "v=(F[0]*32.2)/80\n", + "\n", + "# Results\n", + "print'The speed of the block is',round(v,1),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the block is 70.8 ft/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-12, Page No 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=40 #kg\n", + "m2=10 #kg\n", + "m3=15 #kg\n", + "v0=2.5 #m/s\n", + "vf=5 #m/s\n", + "t=12 #s\n", + "u=0.1 #coefficient of friction\n", + "g=9.8 #m/s**2\n", + "#theta=45 degrees,thus\n", + "sin45=(sqrt(2))**-1\n", + "cos45=(sqrt(2))**-1\n", + "\n", + "#Calculations\n", + "#Applying Impulse-Momentum Theoroem\n", + "P=(((m1+m2+m3)*(vf-v0))+(t*(-m2*g*sin45+u*g*m2*cos45+u*g*m3+g*m1)))*t**-1 #N\n", + "\n", + "#Result\n", + "print'The value of P is',round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P is 358.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-13, Page Noo 437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W1=4 #lb\n", + "W2=2 #lb\n", + "t2=0.04 #s\n", + "W3=-2 #lb\n", + "t3=0.02 #s\n", + "t=3 #s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Algebraic sum of two areas\n", + "A=t2*W2+t3*W3 #lb-s\n", + "#Using Impulse Momentum Theorem\n", + "v=(A*g)/W1 #ft/s\n", + "\n", + "#Result\n", + "print'The spped after 3s is',round(v,3),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spped after 3s is 0.322 ft/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-14, Page No 437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "f_r=1 #in/s rate of fall of mercury\n", + "ll=18 #in length of left column\n", + "lr=22 #in length of right column\n", + "rho=850 #lb/ft**3\n", + "d=4**-1 #in\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Applying Impulse momentum theorem\n", + "M=((d*pi*d**2*4)/12**3)*(rho/g)*(12**-1) #lb-s\n", + "\n", + "#Result\n", + "print'The upward momentum of mercury is +',round(M,5),\"lb-s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The upward momentum of mercury is + 0.00025 lb-s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-15, Page No 437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=2000 #kg\n", + "k=1.200 #m\n", + "w=120 #rpm\n", + "t=200 #s\n", + "\n", + "#Calculations\n", + "#Applying Angular Momentum theorem\n", + "M=((m*k**2*(w*2*pi))/60)/t #N.m\n", + "\n", + "#Result\n", + "print'The Momentum necessary is',round(M),\"N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Momentum necessary is 181.0 N.m\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-17, Page No 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=5 #kg\n", + "m2=7 #kg\n", + "mp=5 #kg\n", + "r=0.6 #m\n", + "k=0.45 #m\n", + "vi=3 #m/s\n", + "vf=6 #m/s\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "I=m1*k**2 #kg.m**2\n", + "wnet=(vf/r)-(vi/r) #rad/s\n", + "#Solving the system of linear equations\n", + "#Simplfying the equation we get\n", + "t=((I*wnet)+m1*(vf-vi)+m2*(vf-vi))*r/(r*(m2-m1)*g) #s\n", + "\n", + "#Result\n", + "print'The time required is',round(t,2),\"s\"\n", + "# The ans in the textbook is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 2.1 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-18, Page No 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=50 #kg\n", + "vo=4 #m/s\n", + "vf=8 #m/s\n", + "t=6 #s\n", + "g=9.8 #m/s**2\n", + "r=0.8 #m\n", + "u=0.25 #coefficient of friction\n", + "I=30 #kg-m**2\n", + "\n", + "#Calculations\n", + "Na=m*g #N\n", + "F=u*Na #N\n", + "#Angular Speeds\n", + "wo=vo/r #rad/s\n", + "wf=vf/r #rad/s\n", + "#Applying impulse momentum theorem\n", + "mb=(I*wo+m*vo*r-F*r*t-I*wf-m*vf*r)/(vf*r-vo*r-g*r*t) #kg\n", + "\n", + "#Result\n", + "print'The mass of block B is',round(mb,1),\"kg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of block B is 20.5 kg\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-19, Page No 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Ws=250 #lb\n", + "Wl=500 #lb\n", + "W3=161 #lb\n", + "W4=64.4 #lb\n", + "wo=100 #rpm\n", + "wf=300 #rpm\n", + "rl=3 #ft\n", + "rs=2 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Moment Of Inertia\n", + "I=(0.5*(Wl/g)*rl**2+0.5*(Ws/g)*rs**2) #slug-ft**2\n", + "#Change in angular Momentum\n", + "change1=I*((wf-wo)*2*(pi/60)) #lb-s-ft\n", + "#Change in angular momentum about G for 161lb\n", + "change2=2*((W3*g**-1)*(wf-wo)*(4*60**-1)*pi) #lb-s-ft\n", + "#Similarly change in 64lb is\n", + "change3=3*((W4*g**-1)*(wf-wo)*(6*60**-1)*pi) #lb-s-ft\n", + "#Change in linear impulse\n", + "#Without t term in it\n", + "m1=2*W3\n", + "m2=-3*W4\n", + "#Total angular impulse\n", + "t=(change1+change2+change3)/(m1+m2) #s\n", + "\n", + "#Result\n", + "print'The time required is',round(t),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 20.0 s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-21, Page No 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "d=3 #ft\n", + "W=300 #lb\n", + "# as theta=20 degrees\n", + "sintheta=0.342\n", + "F=250 #lb\n", + "t=6 #s\n", + "vo=0 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Applying linear impulse momentum theorem\n", + "#Solving by matrix method\n", + "A=np.array([[-W*g**-1,1*t],[-((0.5)*(W*g**-1)*(d*2**-1)**2*(d*2**-1)**-1),(-t)*d*2**-1]])\n", + "B=np.array([[-F*t+W*sintheta*t],[-F*(d*2**-1)*6]]) \n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The speed after 6s is',round(C[0]),\"ft/s,parallel to the plane\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed after 6s is 171.0 ft/s,parallel to the plane\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-22, Page No 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Initilization of variables\n", + "#theta=30 degrees\n", + "sin30=2**-1\n", + "vo=20 #ft/s\n", + "r=4 #ft\n", + "vf=0 #ft/s\n", + "W=300 #lb\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "wo=vo*r**-1 #rad/s\n", + "wf=vf*r**-1 #rad/s\n", + "#Applying impulse momentum theorem\n", + "#Solving simultaneous equations\n", + "t=-((W*g**-1)*(vf-vo)+((0.5*(W*g**-1)*r**2*(wf-wo))*r**-1))/(W*sin30) #s\n", + "\n", + "#Result\n", + "print'The time t is',round(t,2),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time t is 1.86 s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-23, Page No 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "mw=75 #kg\n", + "k=0.9 #m\n", + "wi=10 #rad/s\n", + "wf=6 #rad/s\n", + "r=1.2 #m\n", + "m=30 #kg\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Initial speed\n", + "vi=-r*wi #m/s\n", + "vf=r*wf #m/s\n", + "#Initial speed of B is\n", + "vib=-0.8*wi+vi #m/s\n", + "#Similarly\n", + "vfb=12 #m/s\n", + "#Applying impulse momentum theorem\n", + "#Solving by matrix method\n", + "A=np.array([[1,-1,-(mw*(vf-vi))],[0.8,1.2,-(mw*(k**2)*(wf+wi))],[-1,0,-(m*(vfb-vi))]])\n", + "B=np.array([[0],[0],[-g*m]])\n", + "C=np.linalg.solve(A,B)\n", + "#Here t is calculated as 1/t for simplicity\n", + "\n", + "#Result\n", + "print'The time required is',round(C[2]**-1,2),\"s\" \n", + "#Decimal accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 7.04 s\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-24, Page No 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "d=8 #in\n", + "W=96.6 #lb\n", + "w=36 #rad/s\n", + "u=0.15 #coefficient of friction\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "r=(d/2)*12**-1 #m\n", + "N=W #lb\n", + "F=u*N #lb\n", + "m=W/g #slugs\n", + "I=0.5*m*(r**2) #slug-ft**2\n", + "#Applying the impulse momentum theorem\n", + "#Solving the two equations simultaneously\n", + "A=np.array([[F,-m],[F*r,I*(1*r**-1)]])\n", + "B=np.array([[0],[w*I]])\n", + "C=np.linalg.solve(A,B)\n", + "#Distance travelled\n", + "s=0.5*C[1]*C[0] #ft\n", + "t=C[0] #s\n", + "\n", + "#Result\n", + "print'The time required is',round(t,2),\"s\",'and it travels',round(s,2),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required is 0.83 s and it travels 1.66 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-25, Page No 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilisation of variables\n", + "d=2*12**-1 #ft\n", + "v=80 #ft/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Mass flow reate without time\n", + "m=(1*4**-1)*pi*d**2*v*(62.4/g) \n", + "#Let P=force of plate on mass m of water\n", + "P=m*(0-v) #lb\n", + "\n", + "#Result\n", + "print'The force water exerts on the plate is +',round(-P),\"lb,that is,to the right\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force water exerts on the plate is + 271.0 lb,that is,to the right\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-26, Page No 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v1=20 #ft/s\n", + "vw=80 #ft/s\n", + "d=2*12**-1 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "v=vw-v1 #ft/s\n", + "#mass flow rate without t\n", + "m=(4**-1)*(pi*d**2)*(62.4/g)*v\n", + "#Applying impulse momentum theorem\n", + "P=m*v #lb\n", + "\n", + "#Result\n", + "print'The force exerted by water on the plate is +',round(P),\"lb,that is,to the right\"\n", + "\n", + "# Decimal poinat accuracy causes a small discrepancy in the answer" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force exerted by water on the plate is + 152.0 lb,that is,to the right\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-27, Page No 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "A=2000*10**-6 #m**2\n", + "v=10 #m/s\n", + "rho=1000 #kg/m**3\n", + "#theta=45 degrees,thus\n", + "cos45=(2**0.5)**-1\n", + "sin45=(2**0.5)**-1\n", + "\n", + "#Calculations\n", + "#Mass flow \n", + "m=A*v*rho\n", + "#Applying impulse momentum theorem\n", + "Px=m*(-v*cos45-v) #N\n", + "Py=m*(v*sin45-0) #N\n", + "\n", + "#Result\n", + "print'The x component of force is',round(Px),\"N (to left on water)\",'and y component is +',round(Py),\"N (up on the water)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The x component of force is -341.0 N (to left on water) and y component is + 141.0 N (up on the water)\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-28, Page No 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilisation of variables\n", + "W=150 #lb\n", + "v=20 #ft/s\n", + "A=0.2 #in**2\n", + "t=60 #s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Mass flow\n", + "m=(A/12**2)*v*(62.4/g)\n", + "#Force\n", + "F=m*(0-v) #lb\n", + "#At t=60s the tank holds\n", + "Ww=(A/12**2)*v*t*62.4 #lb\n", + "#Total reading on scale\n", + "S=-F+W+Ww #lb\n", + "\n", + "#Result\n", + "print'The scale reading is',round(S),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The scale reading is 255.0 lb\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-29, Page No 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wp=130 #lb\n", + "Wb=150 #lb\n", + "Wbullet=2*16**-1 #lb\n", + "g=32.2 #ft/s**2\n", + "vbullet=1200 #ft/s\n", + "\n", + "#Calculations\n", + "v=((-Wbullet*g**-1)*vbullet)/((Wb+Wp)/g) #ft/s\n", + "\n", + "#Result\n", + "print'The speed of the boat is',round(v,2),\"ft/s\"\n", + "#Negative sign indicates direction opposite to that of bullet\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the boat is -0.54 ft/s\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-30, Page No 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "mb=0.06 #kg\n", + "ms=50 #kg\n", + "h=0.03 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Speed of bag+bullet\n", + "v2=sqrt(2*g*h) #m/s\n", + "#Applying conservation of momentum \n", + "v1=((mb+ms)*v2)/mb #m/s\n", + "\n", + "#Result\n", + "print'The speed of bullet as it entered the bag was',round(v1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of bullet as it entered the bag was 640.0 m/s\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-32, Page No 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "mb=0.06 #kg\n", + "vb=500 #m/s\n", + "mblock=5 #kg\n", + "vblock=30 #m/s\n", + "\n", + "#Calculations\n", + "#Applying conservation of momentum\n", + "v=(mb*vb+mblock*vblock)/(mb+mblock) #m/s\n", + "\n", + "#Result\n", + "print'The speed of the system is',round(v,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the system is 35.6 m/s\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-33, Page No 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initilization of variables\n", + "W1=2 #lb\n", + "W2=3 #lb\n", + "g=32.2 #ft/s**2\n", + "\n", + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return 12*(2-x)\n", + "a=1\n", + "b=1\n", + "W=quad(integrand, 0, 2, args=(a,b))\n", + "Work=W[0]/12 # ft-lb\n", + "\n", + "# Solving the simultaneousequations\n", + "v3=(Work*(0.5*(W2*g**-1)+0.5*(W1*g**-1)*(-W2*W1**-1)**2)**-1)**0.5 #ft/s\n", + "v2=-(W2*W1**-1)*v3 #ft/s\n", + "\n", + "# Results\n", + "print'The speed of 2lb block is',round(v2,2),\"ft/s (to the left)\",'and that of 3lb block is',round(v3,2),\"ft/s (to the right) respectively.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of 2lb block is -6.22 ft/s (to the left) and that of 3lb block is 4.14 ft/s (to the right) respectively.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-34, Page No 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#Here the integration is indefinite hence it will be computed manually and entered\n", + "W=10 #lb\n", + "l=4 #ft\n", + "w=2 #rad/s\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "#Part (a)\n", + "wf=1.5 #rad/s\n", + "t=(((W/g)*(l*w*l))-((W/g)*(l*wf*l)))**0.5 #s\n", + "#Part (b)\n", + "#Applying conservation of angular momentum\n", + "r=(l*wf*l)*(l*w)**-1 #ft\n", + "\n", + "#Result\n", + "print'The answer for part (a) is',round(t,2),\"s\",'and the answer for part (b) is',round(r,2),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The answer for part (a) is 1.58 s and the answer for part (b) is 3.0 ft\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-35, Page No 446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=2.5 #lb\n", + "w=36 #rad/s\n", + "Idisk=0.4 #slug-ft**2\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "Ii=Idisk+(2*(W*g**-1)*(3*12**-1)**2) #slug-ft**2\n", + "If=Idisk+(2*(W*g**-1)*(11*12**-1)**2) #slug-ft**2\n", + "#Since no external moments act\n", + "#Applying conservation of momentum\n", + "wf=(Ii*w)*If**-1 #rad/s\n", + "\n", + "#Result\n", + "print'The final angular speed is',round(wf,1),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final angular speed is 27.8 rad/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-39, Page No 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "u1=6 #ft/s\n", + "u2=-8 #ft/s\n", + "e=0.8 #coefficient of restitution\n", + "\n", + "#Calculations\n", + "#Solving both simultaneous equations\n", + "A=np.array([[1,-1],[1,1]])\n", + "B=np.array([[11.2],[-2]])\n", + "C=np.linalg.solve(A,B) #ft/s\n", + "\n", + "#Result\n", + "print'The velocities are v1=',round(C[1],1),\"ft/s\",'and v2=',round(C[0],1),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocities are v1= -6.6 ft/s and v2= 4.6 ft/s\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-40, Page No 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "h1=20 #m\n", + "h2=14 #m\n", + "g=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "u1=sqrt(2*g*h1) #m/s\n", + "u2=0 #m/s\n", + "v1=-sqrt(2*g*h2) #m/s\n", + "v2=0 #m/s\n", + "e=(v2-v1)/(u1-u2) #coefficient of restitution\n", + "\n", + "#Result\n", + "print'The value of coefficient of restitution is',round(e,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of coefficient of restitution is 0.84\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-41, Page No 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "u=6.55 #ft/s\n", + "g=32.2 #ft/s**2\n", + "L=6 #ft\n", + "W=5 #lb\n", + "c=0.7 #fraction of impulse acting in second phase\n", + "\n", + "#Calculations\n", + "#Impulse\n", + "I=(W*g**-1)*(u*3**-1) #N.s\n", + "#Second Phase\n", + "v=((-c*10.9)/2)+u #ft/s\n", + "wprime=(1.09*60+c*(W*u*(3**-1)*6))/60 #rad/s\n", + "\n", + "#Result\n", + "print'The value is v=',round(v,2),\"ft/s to the right\",' and that of w is',round(wprime,2),\"rad/s counterclockwise.\"\n", + "\n", + "#The value of w is incorrect in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value is v= 2.73 ft/s to the right and that of w is 1.85 rad/s counterclockwise.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-42, Page No 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=9 #kg\n", + "m2=5.5 #kg\n", + "u1=-3 #m/s\n", + "u2=1.77 #m/s\n", + "e=0.8 #coefficient of restitution\n", + "\n", + "#Calculations\n", + "#Solving by matrix method after we get the two equations\n", + "A=np.array([[-1,1],[m1,m2]])\n", + "B=np.array([[(e*u1-e*u2)],[m1*u1+m2*u2]])\n", + "C=np.linalg.solve(A,B) #m/s\n", + "\n", + "#Result\n", + "print'The 9kg ball will rebound up the speed of',round(C[0],2),\"m/s\",'and the 5.5 kg ball will move to the right and down with components of',round(u2,2),\"m/s\",'and',round(-C[1],2),\"m/s respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The 9kg ball will rebound up the speed of 0.26 m/s and the 5.5 kg ball will move to the right and down with components of 1.77 m/s and 3.56 m/s respectively.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-46, Page No 451" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "v=4 #m/s\n", + "m=9 #kg\n", + "s=1.5 #m\n", + "\n", + "#Calculations\n", + "Io=(2*3**-1)*(m*s**2) #kg.m\n", + "w=(m*v*s*0.5)/Io #rad/s\n", + "\n", + "#Result\n", + "print'The angular velocity of the box is',round(w),\"rad/s clockwise.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of the box is 2.0 rad/s clockwise.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-48, Page No 452" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=2000 #kg\n", + "mf=8500 #kg\n", + "vr=2000 #m/s\n", + "a=9.8 #m/s**2\n", + "\n", + "#Calculations\n", + "#Applying Newtons Second Law\n", + "dm_dt=-(-((m+mf)*a)-(m+mf)*a)/(-vr) #kg/s\n", + "\n", + "#Result\n", + "print'dm/dt=',round(dm_dt),\"kg/s\"\n", + "#The negative sign indicates the loss in the mass of the system\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dm/dt= -103.0 kg/s\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-50, Page No 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=4000 #lb\n", + "k=3 #ft\n", + "wp=(60**-1)*2*pi #rad/s\n", + "ws=(300/60)*2*pi #rad/s\n", + "d=3.5 #ft\n", + "g=32.2 #ft/s**2\n", + "\n", + "#Calculations\n", + "I=(W/g)*k**2 #slug-ft**2\n", + "M=I*ws*wp #lb-ft\n", + "#Now equating M to Rf-Rr gives one equations and vertical sum yields other\n", + "#solving them by matrix method\n", + "A=np.array([[1,-1],[1,1]])\n", + "B=np.array([[M*(2/d)],[W]])\n", + "C=np.linalg.solve(A,B) #lb\n", + "\n", + "#Result\n", + "print'The weight of Rf and Rr are',round(C[0]),\"lb\",'and',round(C[1]),\"lb respectively.\"\n", + "\n", + "# The answers in the textbook are incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight of Rf and Rr are 3051.0 lb and 949.0 lb respectively.\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-51, Page No 454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#As the integration is indefinite we will directly consider the equation with R\n", + "#Initillization of variables\n", + "GM=1.41*10**16 #ft**3/s**2\n", + "r=2640000 #ft\n", + "theta=60 #degrees\n", + "R=21120000 #ft\n", + "\n", + "#Calculations\n", + "v1=sqrt((GM*((R**-1)-((R+r)**-1)))/2.031) #ft/s\n", + "\n", + "#Result\n", + "print'The speed required will be',round(v1),\"ft/s\"\n", + "\n", + "# Answer may wary due to decimal point discrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed required will be 6043.0 ft/s\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-52, Page No 454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "k=4 #lb/ft\n", + "so=1 #ft\n", + "W=2**-1 #lb\n", + "g=32.2 #ft/s**2\n", + "vo=5 #ft/s\n", + "\n", + "#Calculations\n", + "m=W/g #kg\n", + "#Angular momentum is conserved\n", + "v=sqrt((0.5*k*so**2*2*2*g)+vo**2) #ft/s\n", + "#Using vd=15\n", + "d=15/v #ft\n", + "\n", + "#Result\n", + "print'The ball passes',round(d,2),\"ft close to the fixed pin\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball passes 0.89 ft close to the fixed pin\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter19.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter19.ipynb new file mode 100755 index 00000000..98ce73cc --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter19.ipynb @@ -0,0 +1,503 @@ +{ + "metadata": { + "name": "chapter 19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 19: MECHANICAL VIBRATIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2, Page No:465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Initilization of variables\n", + "k=18 #lb/in\n", + "g=386 #in/s**2\n", + "W=35 #lb\n", + "\n", + "#Calculations\n", + "f=(1/(2*pi))*sqrt((k*g/W)) #cps\n", + "period=1/f #s\n", + "\n", + "#Result\n", + "print'The period of vibration is',round(period,2),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The period of vibration is 0.45 s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-11, Page No:471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "ds=0.2 #m\n", + "ts=0.05 #m\n", + "rhos=7850 #kg/m**3 density of steel\n", + "dw=0.002 #m\n", + "lw=0.9 #m\n", + "G=80*10**9 #Pa\n", + "\n", + "#Calculations\n", + "#Torsional Constant\n", + "K=(pi*dw**4*G)/(32*lw) #m/rad\n", + "#Mass Calculations\n", + "m=(4**-1)*pi*(ds**2)*ts*rhos #kg\n", + "#Moment of Inertia\n", + "Io=(0.5)*m*(ds*2**-1)**2 #kg.m**2\n", + "#Frequency\n", + "f=(1*(2*pi)**-1)*(sqrt(K*Io**-1)) #Hz\n", + "\n", + "#Result\n", + "print'The natural frequency of the system is',round(f,2),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The natural frequency of the system is 0.24 Hz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-13, Page No 472" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=120 #kg\n", + "k=0.3 #m\n", + "ls=0.6 #m\n", + "ds=0.05 #m\n", + "G=80*10**9 #Pa\n", + "\n", + "#Calculations\n", + "#Polar Moment of Inertia\n", + "J1=m*k**2 #kg.m**2\n", + "J2=J1 #kg.m**2\n", + "J=(32**-1)*pi*(ds**4) #m**4\n", + "#Frequency\n", + "f=(1/(2*pi))*(sqrt((J*G*(J1+J2))/(ls*J1*J2))) #Hz\n", + "\n", + "#Result\n", + "print'The natural frequency of the torsional oscillation is',round(f,1),\"Hz\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The natural frequency of the torsional oscillation is 19.6 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-14, Page No: 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "ds=2 #in\n", + "L=15 #in\n", + "Wf1=300 #lb\n", + "k1=6 #in\n", + "Wf2=100 #lb\n", + "k2=4 #in\n", + "G=12*10**6 #Pa\n", + "g=386 #in/s**2\n", + "\n", + "#Calculations\n", + "#Moment of inertia of flywheel\n", + "Jf=(Wf1*g**-1)*k1**2 #lb-s**2-in\n", + "#Moment of inertia of the rotor\n", + "Jr=(Wf2*g**-1)*k2**2 #lb-s**2-in\n", + "#Moment of inertia of the shaft cross section\n", + "J=(32**-1)*pi*ds**4 #in**4\n", + "#Frequency\n", + "f=((pi*2)**-1)*(sqrt((J*G*(Jf+Jr))*(L*Jf*Jr)**-1)) #cps\n", + "\n", + "#Result\n", + "print'The natural frequency of the system is',round(f,1),\"cps\"\n", + "\n", + "#The answer may wary due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The natural frequency of the system is 93.9 cps\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-15, Page No: 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=10 #lb\n", + "A=2 #in**2\n", + "#Calculations\n", + "\n", + "wn=sqrt(((A*144**-1)*5*62.4*5)/2.59) #rad/s\n", + "\n", + "#Result\n", + "print'The frequency of oscillation is',round(wn,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of oscillation is 2.89 rad/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-16, Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "f=50 #cps\n", + "g=386 #in/s**2\n", + "E=30*10**6 #lb/in**2\n", + "l=4 #in\n", + "I=2.08*10**-6 #in**4\n", + "\n", + "#Calculations\n", + "W=(3*E*I*g)/(((f*2*pi)**2)*l**3) #lb\n", + "\n", + "#Result\n", + "print'The value of W is',round(W,3),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of W is 0.011 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-19, Page No:478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F=10 #lb\n", + "v=20 #in/s\n", + "g=386 #in/s\n", + "W=12 #lb\n", + "k=20 #lb/in\n", + "\n", + "#Calculations\n", + "#Coefficient of damping\n", + "c=F*(v**-1) #lb-s/in\n", + "#Natural Frequency\n", + "wn=sqrt((k*g)/W) #rad/s\n", + "#Critical Damping coefficient\n", + "cr=(2*W*(g**-1))*wn #lb-s/in\n", + "#Damping Coefficient\n", + "d=c*(cr**-1)\n", + "#Frequency of damped vibrations\n", + "wd=sqrt(1-d**2)*wn #rad/s\n", + "\n", + "#Result\n", + "print'The frequency of damped vibrations is',round(wd,1),\"rad/s\"\n", + "\n", + "# The answer is off by 0.1 units" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of damped vibrations is 24.0 rad/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-20, Page No 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "wn=25.4 #rad/s\n", + "t=0.261 #s\n", + "d=0.316\n", + "\n", + "#Calculations\n", + "delta=d*t*wn #logarithmic decay\n", + "\n", + "#Result\n", + "print'The rate of decay is',round(delta,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of decay is 2.095\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-24, Page No 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F=9 #N\n", + "m=5 #kg\n", + "k=6000 #N/m\n", + "f1=1 #Hz\n", + "f2=5.4 #Hz\n", + "f3=50 #Hz\n", + "\n", + "#Calculations\n", + "#Natural Frequency\n", + "fn=((pi*2)**-1)*(sqrt(k/m)) #Hz\n", + "deltaf=F*(k/1000)**-1 #mm\n", + "#Part(a)\n", + "r1=f1*fn**-1\n", + "amp1=deltaf*(1-r1**2)**-1 #mm amplitude\n", + "#Part (b)\n", + "r2=f2*fn**-1\n", + "amp2=deltaf/(1-r2**2) #mm amplitude\n", + "#Part (c)\n", + "r3=f3*fn**-1\n", + "amp3=deltaf/(1-r3**2) #mm amplitude\n", + "\n", + "#Result\n", + "print'The amplitudes in part (a),(b) and (c) respectively are',round(amp1,3),\"mm ,\",round(amp2,1),\"mm and\",round(amp3,3),\"mm\"\n", + "\n", + "# The answer for amp2 is incorrect in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitudes in part (a),(b) and (c) respectively are 1.551 mm , 36.9 mm and -0.018 mm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-25, Page No 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of vraiables\n", + "g=386 #in/s**2\n", + "W=20 #lb\n", + "w=600 #rpm\n", + "ratio=12**-1\n", + "\n", + "#Calculations\n", + "r=sqrt((1*ratio**-1)+1) \n", + "fn=((w/60)/r) #cps\n", + "k=((fn*2*pi)**2*W)/(g) #lb/in\n", + "\n", + "#Result\n", + "print'The value of k is',round(k,1),\"lb/in\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of k is 15.7 lb/in\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-28, Page No 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "X=12 #mm\n", + "me_M=1.3 #mm\n", + "\n", + "#Calculations\n", + "d=(me_M)/(2*X)\n", + "\n", + "#Result\n", + "print'The damping ratio is',round(d,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The damping ratio is 0.054\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter2.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter2.ipynb new file mode 100755 index 00000000..9a6ee7f9 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter2.ipynb @@ -0,0 +1,562 @@ +{ + "metadata": { + "name": "chapter 2.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Operations with Forces" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-1, Page No: 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=20 #lb\n", + "L=4.33 #ft\n", + "#Calculation\n", + "M=-F*L #lb-ft\n", + "\n", + "#Result\n", + "\n", + "print'The moment of force F about O is',round(M,1),\"lb-ft\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of force F about O is -86.6 lb-ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-2, Page no: 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=20 #lb\n", + "theta=((60*pi)/180) #radians\n", + "L=5 #ft\n", + "\n", + "#Calculations\n", + "\n", + "F_x=F*cos(theta) #Resloving the vector\n", + "F_y=F*sin(theta) #Resloving the vector\n", + "M=-F_y*L #Appling Varignon's theorem\n", + "#Negative sign tells that moment is clockwise\n", + "\n", + "#Result\n", + "\n", + "print'The moment of the force about O is',round(M,1),\"lb-ft\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of the force about O is -86.6 lb-ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-3,Page No: 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=100 #N\n", + "x1=2 #m\n", + "x2=5 #m\n", + "y1=0 #m\n", + "y2=1 #m\n", + "z1=4 #m\n", + "z2=1 #m\n", + "\n", + "#Calculations\n", + "\n", + "xside=(x2-x1) #m\n", + "yside=(y2-y1) #m\n", + "zside=(z2-z1) #m\n", + "LD=sqrt(xside**2+yside**2+zside**2)\n", + "Fx=(xside/LD)*F #N\n", + "Fy=(yside/LD)*F #N\n", + "Fz=(zside/LD)*F #N\n", + "Mx=-Fy*z1 #N-m\n", + "My=Fx*x1-Fz*z1 #N-m\n", + "Mz=Fy*x1 #N-m\n", + "\n", + "#Result\n", + "\n", + "print'Fx is',round(Fx,1),\"N\"\n", + "print'Fy is',round(Fy,1),\"N\"\n", + "print'Fz is',round(Fz,1),\"N\"\n", + "print'Moment about X-Axis is',round(Mx,1),\"N.m\"\n", + "print'Moment about Y-Axis is +',round(My),\"N.m\"\n", + "print'Moment about Z-Axis is +',round(Mz,1),\"N.m\"\n", + "\n", + "# Decimal point error in calculation causes a small discrepancy in the resulting solutions." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fx is 68.8 N\n", + "Fy is 22.9 N\n", + "Fz is -68.8 N\n", + "Moment about X-Axis is -91.8 N.m\n", + "Moment about Y-Axis is + 413.0 N.m\n", + "Moment about Z-Axis is + 45.9 N.m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-4, Page No: 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "Fx=68.7 #N\n", + "Fy=22.9 #N\n", + "Fz=-68.7 #N\n", + "rx=2 #m\n", + "ry=0 #m\n", + "rz=4 #m\n", + "rx1=5 #m\n", + "ry1=1 #m\n", + "rz1=1 #m\n", + "\n", + "#Calculation\n", + "\n", + "Mx=Fz*ry-Fy*rz #N-m\n", + "My=-(Fz*rx-Fx*rz) #N-m\n", + "Mz=Fy*rx-Fx*ry #N-m\n", + "Mx1=Fz*ry1-Fy*rz1 #N-m\n", + "My1=-(Fz*rx1-Fx*rz1) #N-m\n", + "Mz1=Fy*rx1-Fx*ry1 #N-m\n", + "\n", + "#Result\n", + "\n", + "print'Moment with respect to origin using point(2,0,4)is',round(Mx,1),\"i +\",round(My),\"j +\",round(Mz,1),\"k N.m\"\n", + "print'Moment with respect to origin using point (5,1,1) is',round(Mx1,1),\"i +\",round(My1),\"j +\",round(Mz1,1),\"k N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moment with respect to origin using point(2,0,4)is -91.6 i + 412.0 j + 45.8 k N.m\n", + "Moment with respect to origin using point (5,1,1) is -91.6 i + 412.0 j + 45.8 k N.m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-5, Page no: 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "Fx=2 #lb\n", + "Fy=3 #lb\n", + "Fz=-1 #lb\n", + "rx=1 #ft\n", + "ry=-4 #ft\n", + "rz=3 #ft\n", + "#Coordinates of points\n", + "ax=3 #ft\n", + "ay=1 #ft\n", + "az=1 #ft\n", + "bx=3 #ft\n", + "by=-1 #ft\n", + "bz=1 #ft\n", + "cx=2 #ft\n", + "cy=5 #ft\n", + "cz=-2 #ft\n", + "\n", + "#Calculations\n", + "\n", + "Rx=ax-cx #ft\n", + "Ry=ay-cy #ft\n", + "Rz=az-cz #ft\n", + "Mx=(Ry*Fz)-(Rz*Fy) #lb-ft\n", + "My=-((Rx*Fz)-(Rz*Fx)) #lb-ft\n", + "Mz=(Rx*Fy)-(Ry*Fx) #lb-ft\n", + "E_u=sqrt((bx-cx)**2+(by-cy)**2+(bz-cz)**2) #ft\n", + "ex=(bx-cx)/E_u #ft\n", + "ey=(by-cy)/E_u #ft\n", + "ez=(bz-cz)/E_u #ft\n", + "M_lx=Mx*ex #lb-ft\n", + "M_ly=My*ey #lb-ft\n", + "M_lz=Mz*ez #lb-ft\n", + "M_l=M_lx+M_ly+M_lz #lb-ft\n", + "\n", + "#Result\n", + "\n", + "print'Hence the moment about line is',round(M_l,2),\"lb-ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence the moment about line is -2.06 lb-ft\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-6, Page No: 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "P_x=22 #N\n", + "P_y=23 #N\n", + "P_z=7 #N\n", + "p1=1 #m\n", + "p2=-1 #m\n", + "p3=-2 #m\n", + "\n", + "#Calculations\n", + "\n", + "Mx=(p2*P_z)-(p3*P_y) #N-m\n", + "My=-((p1*P_z)-(p3*P_x)) #N-m\n", + "Mz=(p1*P_y)-(p2*P_x) #N-m\n", + "\n", + "#Result\n", + "\n", + "print'The moment about the line from the origin is',round(Mx),\"i\",round(My),\"j +\",round(Mz),\"k N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment about the line from the origin is 39.0 i -51.0 j + 45.0 k N.m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-8, Page No: 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=10 #N Force couple\n", + "a=3 #m Moment arm\n", + "#Calculations\n", + "C=-F*a #N-m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant couple is',round(C),\"N-m\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant couple is -30.0 N-m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-11, Page No: 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "C1=20 #N-m\n", + "C2=40 #N-m\n", + "C3=-55 #N-m\n", + "\n", + "#Calculations\n", + "\n", + "C=sqrt(C1**2+C2**2+C3**2) #N-m\n", + "thetax=C2/C \n", + "thetay=C3/C\n", + "thetaz=C1/C\n", + "Cx=C*thetax #N-m\n", + "Cy=C*thetay #N-m\n", + "Cz=C*thetaz #N-m\n", + "\n", + "#Result\n", + "\n", + "print'Couple in vector notation is',round(Cx),\"i\",round(Cy),\"j +\",round(Cz),\"k N.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Couple in vector notation is 40.0 i -55.0 j + 20.0 k N.m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-12,Page No: 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=25 #lb\n", + "F2=25 #lb\n", + "L1=14 #in\n", + "L2=20 #in\n", + "\n", + "#Calculations\n", + "\n", + "C=F1*L1 #lb-in\n", + "M=-F2*L2 #lb-in\n", + "\n", + "#Result\n", + "\n", + "print'The twisting couple is',round(C),\"lb-in\"\n", + "print'The bending moment is',round(M),\"lb-in\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The twisting couple is 350.0 lb-in\n", + "The bending moment is -500.0 lb-in\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-13, Page No: 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "rx=20 #in\n", + "ry=0 #in\n", + "rz=14 #in\n", + "Fx=0 #lb\n", + "Fy=-25 #lb\n", + "Fz=0 #lb\n", + "\n", + "#Calculation\n", + "\n", + "Mx=ry*Fz-rz*Fy #lb-in\n", + "My=rx*Fz-rz*Fx #lb-in\n", + "Mz=rx*Fy-ry*Fx #lb-in\n", + "\n", + "#Result\n", + "\n", + "print'The moment of the 25-lb force is',round(Mx),\"i +\",round(My),\"j\",round(Mz),\"k lb-in\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of the 25-lb force is 350.0 i + 0.0 j -500.0 k lb-in\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2-14,Page No: 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "#Co-ordinates with respect to point O\n", + "x=17.9 #ft\n", + "y=6.91 #ft\n", + "z=46.3 #ft\n", + "Fz=-4000 #lb\n", + "Fy=0 #lb\n", + "\n", + "#Calculation\n", + "\n", + "Mx=y*Fz-z*Fy #lb-ft\n", + "\n", + "#Result\n", + "\n", + "print'The scalar coefficient of the i term is the moment about the X-Axis is',round(Mx,3),\"lb-ft\"\n", + "\n", + "# The answer given in the textbook is incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The scalar coefficient of the i term is the moment about the X-Axis is -27640.0 lb-ft\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter3.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter3.ipynb new file mode 100755 index 00000000..7c92c89f --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter3.ipynb @@ -0,0 +1,797 @@ +{ + "metadata": { + "name": "chapter 3.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 3: Resultants of Coplanar Force Systems" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 3.3-1, Page no: 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=150 #lb\n", + "F2=200 #lb\n", + "F3=80 #lb\n", + "F4=180 #lb\n", + "theta1=((30*pi)/180) #radians\n", + "theta2=((150*pi)/180) #radians\n", + "theta3=((240*pi)/180) #radians\n", + "theta4=((315*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "F1x=F1*cos(theta1) #lb\n", + "F1y=F1*sin(theta1) #lb\n", + "F2x=F2*cos(theta2) #lb\n", + "F2y=F2*sin(theta2) #lb\n", + "F3x=F3*cos(theta3) #lb\n", + "F3y=F3*sin(theta3) #lb\n", + "F4x=F4*cos(theta4) #lb\n", + "F4y=F4*sin(theta4) #lb\n", + "Fx=F1x+F2x+F3x+F4x #lb\n", + "Fy=F1y+F2y+F3y+F4y #lb\n", + "R=sqrt(Fx**2+Fy**2) #lb\n", + "theta=((arctan(Fy/Fx))*180)/pi #degrees\n", + "theta_R=360+theta #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The resultant is at',round(theta_R),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 49.0 lb\n", + "The resultant is at 334.0 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-2, Page no: 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=50 #N\n", + "F2=100 #N\n", + "F3=30 #N\n", + "\n", + "#Calculation\n", + "\n", + "#The book has a misprint for squareroot of 1**2\n", + "F1x=F1/sqrt(2) #N \n", + "F1y=F1/sqrt(2) #N\n", + "F2x=-(F2*3)/sqrt(10) #N\n", + "F2y=(-F2)/sqrt(10) #N\n", + "F3x=F3/sqrt(5) #N\n", + "F3y=(-F3*2)/sqrt(5) #N\n", + "Fx=F1x+F2x+F3x #N\n", + "Fy=F1y+F2y+F3y #N\n", + "R=sqrt(Fx**2+Fy**2) #N\n", + "theta=arctan(Fy/Fx) #radians\n", + "theta_x=180+(theta*180)/pi #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant is',round(R,1),\"N\"\n", + "print'The resultant makes an angle of',round(theta_x),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant is 51.6 N\n", + "The resultant makes an angle of 207.0 degrees\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-3, Page no: 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=70 #lb\n", + "F2=100 #lb\n", + "F3=125 #lb\n", + "theta1=0 #radians\n", + "theta2=((10*pi)/180) #radians\n", + "theta3=((30*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "Fx=F1-(F2*cos(theta3))-(125*sin(theta2)) #lb\n", + "Fy=125*cos(theta2)-(100*sin(theta3)) #lb\n", + "R=sqrt(Fx**2+Fy**2) #lb\n", + "theta=arctan(Fy/Fx) #radians\n", + "theta_x=180+(theta*180)/pi #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R,1),\"lb\"\n", + "print'The resultant with respect to X axis is at',round(theta_x),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 82.5 lb\n", + "The resultant with respect to X axis is at 118.0 degrees\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-4, Page No: 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=-20 #N\n", + "F2=30 #N\n", + "F3=5 #N\n", + "F4=-40 #N\n", + "#Distances with respect to point O\n", + "x1=6 #m\n", + "x2=0 #m\n", + "x3=8 #m\n", + "x4=13 #m\n", + "\n", + "#Calculations\n", + "\n", + "R=F1+F2+F3+F4 #N\n", + "# Applying moment about point O equal to zero\n", + "M_O=-(F1*x1)+(F2*x2)+(F3*x3)+(F4*x4) #N-m\n", + "#Applying moment about point O equal to R*x\n", + "x=M_O/R #m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of force system is',round(R),\"N\"\n", + "print'The moment about point O is',round(M_O),\"N.m\"\n", + "print'The resultant of moment acts at',round(x,1),\"m (to the right of O)\"\n", + "\n", + "# The answer for M_O & R is correct but x waries due to some discrepancy in python." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of force system is -25.0 N\n", + "The moment about point O is -360.0 N.m\n", + "The resultant of moment acts at 14.0 m (to the right of O)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-5, Page No: 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=-100 #lb\n", + "F2=200 #lb\n", + "F3=-200 #lb\n", + "F4=400 #lb\n", + "F5=-300 #lb\n", + "#Distance with respect to point O\n", + "x1=0 #ft\n", + "x2=2 #ft\n", + "x3=5 #ft\n", + "x4=9 #ft\n", + "x5=11 #ft\n", + "\n", + "#Calculation\n", + "\n", + "R=F1+F2+F3+F4+F5 #lb\n", + "M_O=(F1*x1)+(F2*x2)+(F3*x3)+(F4*x4)+(F5*x5) #N-m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The moment about point O is',round(M_O),\"lb-ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 0.0 lb\n", + "The moment about point O is -300.0 lb-ft\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-6, Page no: 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=20 #lb\n", + "F2=20 #lb\n", + "F3=-40 #lb\n", + "#Distance from point O\n", + "x1=3 #ft\n", + "x2=3 #ft\n", + "\n", + "#Calculations\n", + "\n", + "R=F1+F2+F3 #lb\n", + "M_O=-(F1*x1)+(F2*x2) #lb-ft\n", + "\n", + "#Results\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The Moment about point O is',round(M_O),\"lb-ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 0.0 lb\n", + "The Moment about point O is 0.0 lb-ft\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-7, Page No: 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=500 #N\n", + "F2=-400 #N\n", + "F3=-200 #N\n", + "C=1500 #N-m\n", + "#Distance from point O\n", + "x1=2 #m\n", + "x2=4 #m\n", + "x3=6 #m\n", + "\n", + "#Calculations\n", + "\n", + "R=F1+F2+F3 #N\n", + "M_O=(F1*x1)+(F2*x2)+(F3*x3)+C #N-m\n", + "#Applying Varignons theorem\n", + "x=M_O/R #m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"N\"\n", + "print'The moment about point O is',round(M_O),\"N.m\"\n", + "print'The resultant acts at',round(x),\"m (from point O)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is -100.0 N\n", + "The moment about point O is -300.0 N.m\n", + "The resultant acts at 3.0 m (from point O)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-8,Page No: 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=50 #lb\n", + "F2=100 #lb\n", + "theta1=((45*pi)/180) #radians\n", + "#Distance from point O\n", + "x1=5 #ft\n", + "x2=4 #ft\n", + "\n", + "#Calculation\n", + "\n", + "F_x=F1-(F2*cos(theta1)) #lb\n", + "F_y=F1-(F2*sin(theta1)) #lb\n", + "R=sqrt(F_x**2+F_y**2) #lb\n", + "M_O=F1*x1-(x2*F1) #lb-ft\n", + "#Applying Varignons Theorem\n", + "x=M_O/R #ft\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R,1),\"lb\"\n", + "print'The Moment about point O is',round(M_O),\"lb-ft\"\n", + "print'The Resultant acts at',round(x,2),\"ft (from point O)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 29.3 lb\n", + "The Moment about point O is 50.0 lb-ft\n", + "The Resultant acts at 1.71 ft (from point O)\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-9, Page no: 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "A=80 #N\n", + "B=120 #N\n", + "C=100 #N\n", + "D=50 #N\n", + "thetaA=((90*pi)/180) #radians\n", + "thetaB=((150*pi)/180) #radians\n", + "thetaC=((45*pi)/180) #radians\n", + "thetaD=((340*pi)/180) #radians\n", + "\n", + "#Calculations\n", + "\n", + "Ax=A*cos(thetaA) #N\n", + "Ay=A*sin(thetaA) #N\n", + "Bx=B*cos(thetaB) #N\n", + "By=B*sin(thetaB) #N\n", + "Cx=C*cos(thetaC) #N\n", + "Cy=C*sin(thetaC) #N\n", + "Dx=D*cos(thetaD) #N\n", + "Dy=D*sin(thetaD) #N\n", + "M_Ax=0 #N-m\n", + "M_Ay=0 #N-m\n", + "M_Bx=-Bx*5 #N-m\n", + "M_By=By*8 #N-m\n", + "M_Cx=-Cx*1 #N-m\n", + "M_Cy=Cy*1 #N-m\n", + "M_Dx=-Dx*-1 #N-m\n", + "M_Dy=Dy*8 #N-m\n", + "Fx=Ax+Bx+Cx+Dx #N\n", + "Fy=Ay+By+Cy+Dy #N\n", + "R=sqrt(Fx**2+Fy**2) #N\n", + "M_O=M_Dx+M_Dy+M_Cx+M_Cy+M_Bx+M_By+M_Ax+M_Ay #N-m\n", + "theta=arctan(Fy/Fx) #radians\n", + "theta_x=(theta*180)/pi #degrees\n", + "#Appliying Varignons theorem\n", + "x=M_O/R #m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"N\"\n", + "print'The moment about point O is +',round(M_O),\"N.m\"\n", + "print'The resultant acts at and angle of',round(theta_x),\"degrees (with respect to X axis)\"\n", + "print'The resultant of the force system acts at',round(x,1),\"m (from point O)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 194.0 N\n", + "The moment about point O is + 910.0 N.m\n", + "The resultant acts at and angle of 86.0 degrees (with respect to X axis)\n", + "The resultant of the force system acts at 4.7 m (from point O)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-10, Page No: 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=100 #lb\n", + "F2=80 #lb\n", + "F3=120 #lb\n", + "F4=150 #lb\n", + "theta1=((60*pi)/180) #radians\n", + "theta2=((45*pi)/180) #radians\n", + "theta3=((90*pi)/180) #radians\n", + "theta4=((75*pi)/180) #radians\n", + "#Distance from point O\n", + "x1=-5 #ft\n", + "y1=20 #ft\n", + "x2=10 #ft\n", + "y2=10 #ft\n", + "x3=25 #ft\n", + "y3=25 #ft\n", + "x4=35 #ft\n", + "y4=15 #ft\n", + "\n", + "#Calculations\n", + "\n", + "Fx=F1*cos(theta1)+F2*cos(theta2)+F4*cos(theta4) #lb\n", + "Fy=-F1*sin(theta1)+F2*sin(theta2)-F3-F4*sin(theta4) #lb\n", + "R=sqrt(Fx**2+Fy**2) #lb\n", + "theta=arctan(Fy/Fx) #radians\n", + "theta_x=(theta*180)/pi #degrees\n", + "M_O=-(F1*cos(theta1)*y1)+(-x1)*(F1*sin(theta1))-(x2)*(F2*cos(theta2))+(y2)*(F2*sin(theta2))-(x3*F3)-(y4*F4*cos(theta4))-(x4*F4*sin(theta4)) #lb-ft\n", + "#Applying varignons theorem\n", + "x=M_O/Fy #ft\n", + "y=-M_O/Fx #ft\n", + "\n", + "#Results\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The resultant acts at',round(theta_x,1),\"degrees(with respect to X axis)\"\n", + "print'The moment about point O is',round(M_O),\"lb-ft\"\n", + "print'The x intercept of resultant is',round(x,1),\"ft\"\n", + "print'The y intercept of resultant is',round(y,1),\"ft\"\n", + "#Answer for angle should be negative which has not been mentioned in the tectbook but a schematic shows the angle in fourth quadrant to clarify the doubt \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 329.0 lb\n", + "The resultant acts at -63.8 degrees(with respect to X axis)\n", + "The moment about point O is -9220.0 lb-ft\n", + "The x intercept of resultant is 31.3 ft\n", + "The y intercept of resultant is 63.4 ft\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-11, Page No: 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=150 #lb\n", + "F2=80 #lb\n", + "F3=100 #lb\n", + "F4=50 #lb\n", + "theta1=((45*pi)/180) #radians\n", + "r=3 #units\n", + "\n", + "#Calculations\n", + "\n", + "Fh=F1-F3*cos(theta1) #lb\n", + "Fv=F4-F2-F3*sin(theta1) #lb\n", + "R=sqrt(Fh**2+Fv**2) #lb\n", + "#Applying the Varignons Theorem\n", + "a=(F4*r-F1*r+F2*r-F3*r)/R # ft\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R),\"lb\"\n", + "print'The resultant acts at',round(a,2),\"ft (from point O)\"\n", + "#Negative sign indicates a negative moment caused by the resultant\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 128.0 lb\n", + "The resultant acts at -2.81 ft (from point O)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-12, Page no: 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F1=150 #lb\n", + "F2=200 #lb\n", + "F3=200 #lb\n", + "F4=225 #lb\n", + "M=900 #lb-ft\n", + "Theta1=(45*pi)/180 #radians\n", + "Theta2=(30*pi)/180 #radians\n", + "x1=3 #ft\n", + "x2=15 #ft\n", + "x3=12 #ft\n", + "x4=6 #ft\n", + "\n", + "#Calculations\n", + "\n", + "Fx=F1*cos(Theta1)+F2-F4*cos(Theta2) #Applying sum of all forces equal to zero in X direction\n", + "Fy=F1*sin(Theta1)-F4*sin(Theta2)+F2 #Applying sum of all forces equal to zero in Y direction\n", + "R=sqrt(Fx**2+Fy**2) #lb\n", + "theta=(arctan(Fy/Fx))*(180/pi) #degrees\n", + "M_o=x1*F2-x2*F1*cos(Theta1)+x3*F1*sin(Theta1)-x4*F2+M+x4*F4*cos(Theta2)-x1*F4*sin(Theta2) #Moment about point O\n", + "x=M_o/Fy # in -Varignons Theorem \n", + "\n", + "#Result\n", + "\n", + "print'The x intercept of resultant position is',round(x,1),\"in\"\n", + "print'The Resultant is',round(R),\"lb\"\n", + "print'The resultant acts at an angle of',round(theta),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The x intercept of resultant position is 4.2 in\n", + "The Resultant is 223.0 lb\n", + "The resultant acts at an angle of 60.0 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-13, Page No: 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return 20\n", + "a=1\n", + "b=1\n", + "I=quad(integrand, 0, 6, args=(a,b))\n", + "\n", + "def integrand(x, a, b):\n", + " return 20*x\n", + "a=1\n", + "b=1\n", + "J=quad(integrand, 0, 6, args=(a,b))\n", + "d=J[0]/I[0]\n", + "\n", + "# Results\n", + "print'The value of R is',round(I[0]),\"lb\"\n", + "print'The value of d is',round(d),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R is 120.0 lb\n", + "The value of d is 3.0 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-14, Page no: 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad\n", + "def integrand(x, a, b):\n", + " return (x/9)*30\n", + "a=1\n", + "b=1\n", + "I=quad(integrand, 0, 9, args=(a,b))\n", + "\n", + "def integrand(y, a, b):\n", + " return y*(y/9)*30\n", + "a=1\n", + "b=1\n", + "J=quad(integrand, 0, 9, args=(a,b))\n", + "d=J[0]/I[0]\n", + "\n", + "# Results\n", + "print'The value of R is',round(I[0]),\"N\"\n", + "print'The value of d is',round(d),\"m\"\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R is 135.0 N\n", + "The value of d is 6.0 m\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter4.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter4.ipynb new file mode 100755 index 00000000..c2e59463 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter4.ipynb @@ -0,0 +1,365 @@ +{ + "metadata": { + "name": "chapter 4.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 4: Resultants of Non-coplanar Force Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4-1, Page no: 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "#Initilization Of Variables\n", + "\n", + "F1=20 #lb\n", + "F2=15 #lb\n", + "F3=30 #lb\n", + "F4=50 #lb\n", + "#Co-ordinates of Forces\n", + "C1=np.array([2,1,6])\n", + "C2=np.array([4,-2,5])\n", + "C3=np.array([-3,-2,1])\n", + "C4=np.array([5,1,-2])\n", + "\n", + "#Calculations\n", + "\n", + "A=(C1[0]**2+C1[1]**2+C1[2]**2)**0.5\n", + "B=(C2[0]**2+C2[1]**2+C2[2]**2)**0.5\n", + "C=(C3[0]**2+C3[1]**2+C3[2]**2)**0.5\n", + "D=(C4[0]**2+C4[1]**2+C4[2]**2)**0.5\n", + "#Calculations for cos(thetax),cos(thetay) and cos(thetaz)\n", + "theta1=(A**-1)*np.array([C1[0],C1[1],C1[2]])\n", + "theta2=(B**-1)*np.array([C2[0],C2[1],C2[2]])\n", + "theta3=(C**-1)*np.array([C3[0],C3[1],C3[2]])\n", + "theta4=(D**-1)*np.array([C4[0],C4[1],C4[2]])\n", + "#Calculations for forces (in form of force vectors)\n", + "Fa=F1*np.array([theta1[0],theta1[1],theta1[2]]) #lb\n", + "Fb=F2*np.array([theta2[0],theta2[1],theta2[2]]) #lb\n", + "Fc=F3*np.array([theta3[0],theta3[1],theta3[2]]) #lb\n", + "Fd=F4*np.array([theta4[0],theta4[1],theta4[2]]) #lb\n", + "Fx=Fa[0]+Fb[0]+Fc[0]+Fd[0] #lb\n", + "Fy=Fa[1]+Fb[1]+Fc[1]+Fd[1] #lb\n", + "Fz=Fa[2]+Fb[2]+Fc[2]+Fd[2] #lb\n", + "R=(Fx**2+Fy**2+Fz**2)**0.5 #lb\n", + "thetax=arccos(Fx*R**-1)*(180/pi) #degrees\n", + "thetay=180-((180*arccos(Fy*R**-1))/pi) #degrees\n", + "thetaz=(180*arccos(Fz*R**-1))/pi #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant of the force system is',round(R,1),\"lb\"\n", + "print'The angle of the resultant with respect to x axis is',round(thetax,1),\"degree\"\n", + "print'The angle of the resultant with respect to y axis is',round(thetay),\"degree\"\n", + "print'The angle of the resultant with respect to a axis is',round(thetaz,1),\"degree\"\n", + "\n", + "# Thetax is off by 0.1 degrees" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant of the force system is 42.5 lb\n", + "The angle of the resultant with respect to x axis is 30.1 degree\n", + "The angle of the resultant with respect to y axis is 79.0 degree\n", + "The angle of the resultant with respect to a axis is 62.4 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4-2, Page no: 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=[20,-10,30] #N\n", + "#co-ordinates in meters\n", + "a=2 #m\n", + "b=4 #m\n", + "c=7 #m\n", + "d=3 #m\n", + "e=2 #m\n", + "f=4 #m\n", + "\n", + "#Calculations\n", + "\n", + "R=F[0]+F[1]+F[2] #N\n", + "M_o=F[0]*a+F[1]*b+F[2]*c #N.m\n", + "x=M_o*R**-1 #m\n", + "M_x=-F[2]*f-F[0]*d-F[1]*e #N.m\n", + "z=-M_x/R #m\n", + "\n", + "#Result\n", + "\n", + "print'The resultant is +',round(R),\"N\"\n", + "print'The moment about point O is +',round(M_o),\"N.m\"\n", + "print'The position of R is at',round(x,2),\"m (from origin)\"\n", + "print'The moment is',round(M_x),\"N.m\"\n", + "print'The z co-ordinate is +',round(z),\"m\"\n", + "\n", + "# Here the value of R & M_o is correct which should yeild the vaue of x (M_o/R) correctly. However dueto some error in the software the correct value is not being printed.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant is + 40.0 N\n", + "The moment about point O is + 210.0 N.m\n", + "The position of R is at 5.25 m (from origin)\n", + "The moment is -160.0 N.m\n", + "The z co-ordinate is + 4.0 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4-3, Page No: 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=[100,50,-150] #Force vector N\n", + "a=2 #m\n", + "b=2 #m \n", + "c=3 #m\n", + "d=2 #m\n", + "e=4 #m\n", + "f=8 #m\n", + "\n", + "#Calculations\n", + "\n", + "R=F[0]+F[1]+F[2] #N\n", + "M_x=-F[0]*a+F[1]*b-F[2]*c #N.m\n", + "M_z=F[0]*d+F[1]*e+F[2]*f #N.m\n", + "C=sqrt(M_x**2+M_z**2) #N-m\n", + "thetax=arctan(M_x*-M_z**-1)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "\n", + "print'The resultant is',round(R),\"N\"\n", + "print'The moment about x axis is +',round(M_x),\"N.m\"\n", + "print'The moment about z axis is',round(M_z),\"N.m\"\n", + "print'The couple acting is',round(C),\"N.m\"\n", + "print'The trace makes an angle with x axis of',round(thetax,1),\"degrees\"\n", + "\n", + "# The answer for C waries by 1 N.m as compared to the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant is 0.0 N\n", + "The moment about x axis is + 350.0 N.m\n", + "The moment about z axis is -800.0 N.m\n", + "The couple acting is 873.0 N.m\n", + "The trace makes an angle with x axis of 23.6 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4-4, Page No: 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "x1=-2\n", + "y1=2\n", + "z1=-2\n", + "x2=3\n", + "y2=0\n", + "z2=-4\n", + "x3=3\n", + "y3=2\n", + "z3=2\n", + "F1=40 #lb\n", + "F2=30 #lb\n", + "F3=20 #lb\n", + "Mxm=np.array([-92.4,-48,-19.4])\n", + "Mym=np.array([-46.2,72,9.8])\n", + "Mzm=np.array([46.2,-36,19.4])\n", + "\n", + "#Calculations\n", + "mag1=(x1**2+y1**2+z1**2)**0.5\n", + "mag2=(x2**2+y2**2+z2**2)**0.5\n", + "mag3=(x3**2+y3**2+z3**2)**0.5\n", + "thetax1=(x1*mag1**-1) #degrees\n", + "thetay1=(y1*mag1**-1) #degrees\n", + "thetaz1=(z1*mag1**-1) #degrees\n", + "thetax2=(x2*mag2**-1) #degrees\n", + "thetay2=(y2*mag2**-1) #degrees\n", + "thetaz2=(z2*mag2**-1) #degrees\n", + "thetax3=(x3*mag3**-1) #degrees\n", + "thetay3=(y3*mag3**-1) #degrees\n", + "thetaz3=(z3*mag3**-1) #degrees\n", + "#Now we will define all the components in terms of matrices for simplicity of computation\n", + "F=np.array([F1,F2,F3]) #lb\n", + "Fx1=F[0]*thetax1\n", + "Fy1=F[0]*thetay1\n", + "Fz1=F[0]*thetaz1\n", + "Fx2=F[1]*thetax2\n", + "Fy2=F[1]*thetay2\n", + "Fz2=F[1]*thetaz2\n", + "Fx3=F[2]*thetax3\n", + "Fy3=F[2]*thetay3\n", + "Fz3=F[2]*thetaz3\n", + "Fx=Fx1+Fx2+Fx3 #lb\n", + "Fy=Fy1+Fy2+Fy3 #lb\n", + "Fz=Fz1+Fz2+Fz3 #lb\n", + "R=(Fx**2+Fy**2+Fz**2)**0.5 #lb\n", + "thetax=arccos(Fx*R**-1)*(180/pi) #degrees\n", + "thetay=arccos(Fy*R**-1)*(180/pi) #degrees\n", + "thetaz=arccos(Fz*R**-1)*(180/pi) #degrees\n", + "#Moment calculations\n", + "Mx=Mxm[0]+Mxm[1]+Mxm[2] #lb-ft\n", + "My=Mym[0]+Mym[1]+Mym[2] #lb-ft\n", + "Mz=Mzm[0]+Mzm[1]+Mzm[2] #lb-ft\n", + "C=(Mx**2+My**2+Mz**2)**0.5 #lb-ft\n", + "#Direction cosines\n", + "PHIx=arccos(Mx*C**-1)*(180/pi) #degrees\n", + "PHIy=arccos(My*C**-1)*(180/pi) #degrees\n", + "PHIz=arccos(Mz*C**-1)*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The result of the force is',round(R,1),\"lb\"\n", + "print'The angles with respect to X-Axis,Y-Axis and Z-axis are:',round(thetax,1),\"degrees\",',',round(thetay,1),\"degrees\",'and',round(thetaz,1),\"degrees respectively.\"\n", + "print'The magnitude of resultant couple is',round(C),\"lb-ft\"\n", + "print'The angles are as follows: Cosphix=',round(PHIx,1),\"degrees\",',Cosphiy=',round(PHIy,1),\"degrees\",'and Cosphiz=',round(PHIz,1),\"degrees\"\n", + "\n", + "# The answers may wary due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The result of the force is 50.6 lb\n", + "The angles with respect to X-Axis,Y-Axis and Z-axis are: 79.2 degrees , 49.6 degrees and 137.6 degrees respectively.\n", + "The magnitude of resultant couple is 166.0 lb-ft\n", + "The angles are as follows: Cosphix= 163.8 degrees ,Cosphiy= 77.6 degrees and Cosphiz= 79.8 degrees\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4-5, Page no 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "F=np.array([150,90,160]) #lb force vector kind of decleration\n", + "# Co-ordinates defined as [x,y,z] all the co-ordinates are in feet\n", + "C_1=np.array([2,0,0]) \n", + "C_2=np.array([0,0,1])\n", + "C_3=np.array([0,-2,-1])\n", + "C_4=np.array([-1,0,-1])\n", + "\n", + "#Calculations\n", + "A=C_2-C_1\n", + "B=C_4-C_3\n", + "F1=(F[0]*A)/(A[0]**2+A[1]**2+A[2]**2)**0.5\n", + "F2=(F[1]*B)/(B[0]**2+B[1]**2+B[2]**2)**0.5\n", + "R=F1+F2\n", + "# Determine C1 & C2\n", + "# Calculating the cross products of C1 & C2 as,\n", + "C1=np.array([[C_1[1]*F1[2]-C_1[2]*F1[1]],[-(C_1[0]*F1[2]-C_1[2]*F1[0])],[C_1[0]*F1[1]-C_1[1]*F1[0]]]) # lb-ft\n", + "C2=np.array([[C_3[1]*F2[2]-C_3[2]*F2[1]],[-(C_3[0]*F2[2]-C_3[2]*F2[0])],[C_3[0]*F2[1]-C_3[1]*F2[0]]]) # lb-ft\n", + "C3=np.array([[0],[0],[160]]) # lb-ft\n", + "C=C1+C2+C3\n", + "\n", + "#Result\n", + "print'The resultant force couple is',round(C[0],1),\"i\",round(C[1],1),\"j +\",round(C[2],1),\"k lb-ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resultant force couple is 80.5 i -93.9 j + 79.5 k lb-ft\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter5.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter5.ipynb new file mode 100755 index 00000000..21298609 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter5.ipynb @@ -0,0 +1,799 @@ +{ + "metadata": { + "name": "chapter 5.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "CHAPTER 5: EQUILIBRIUM OF COPLANAR FORCE SYSTEMS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-1, Page no 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "# From eqn's 1&2\n", + "D=np.array([[6/sqrt(40),-4/sqrt(20)],[2/sqrt(40),2/sqrt(20)]])\n", + "B=np.array([0,25]) #lb\n", + "\n", + "#Calculations\n", + "\n", + "X=np.linalg.solve(D,B)\n", + "\n", + "#Result\n", + "\n", + "print'The tension in cable AB is',round(X[1],1),\"lb\"\n", + "print'The tension in cable AC is',round(X[0],1),\"lb\"\n", + "\n", + "# The tensions in the cable AB & AC is off by 0.1 lb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in cable AB is 33.5 lb\n", + "The tension in cable AC is 31.6 lb\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-2, Page no 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F1=100 #lb\n", + "R=16 #in\n", + "\n", + "#Calculations\n", + "theta=arcsin(14*R**-1)*(180/pi) #degrees\n", + "# since theta=61 degrees,\n", + "sin61=0.8746\n", + "cos61=0.4848\n", + "N=F1/sin61 #lb\n", + "P=N*cos61 #lb\n", + "\n", + "#Result\n", + "\n", + "print'The value of normal reaction offered is',round(N,1),\"lb\"\n", + "print'The push required is',round(P,1),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of normal reaction offered is 114.3 lb\n", + "The push required is 55.4 lb\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-3,Page no 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "L=20 #m\n", + "M=1200 #kg\n", + "g=9.81 #m/s**2\n", + "H=10 #m\n", + "\n", + "#Calculations\n", + "\n", + "AB=sqrt(L**2-H**2) #Applying Pythagoras Theorem\n", + "costheta=17.3/20\n", + "F1=M*g*H/AB #N\n", + "F2=M*g/costheta #N\n", + "\n", + "#Result\n", + "\n", + "print'Force F1 is',round(F1),\"N\"\n", + "print'Force F2 is',round(F2),\"N\"\n", + "\n", + "#Decimal accuracy causes discrepancy in answers compared to the textbook answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force F1 is 6797.0 N\n", + "Force F2 is 13609.0 N\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-4, Page No 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "Fx=1000 #lb\n", + "Fy=1000 #lb\n", + "costheta=9*15**-1\n", + "cosbeta=12*15**-1\n", + "sintheta=4*5**-1\n", + "sinbeta=3*5**-1\n", + "\n", + "#Calculations\n", + "#Matrix solution\n", + "A=np.array([[costheta,-cosbeta],[sintheta,sinbeta]]) \n", + "B=np.array([-1000,1000])\n", + "X=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The force in AB is',round(X[0]),\"lb compression\"\n", + "print'The force in BC is',round(X[1]),\"lb compression\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in AB is 200.0 lb compression\n", + "The force in BC is 1400.0 lb compression\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-5, Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "w=10 #lb/ft\n", + "L=12 #ft\n", + "# as theta=30 degrees,\n", + "sin30=2**-1\n", + "cos30=sqrt(3)*2**-1\n", + "\n", + "#Calculation\n", + "#Matrix Calculations\n", + "A=np.array([[cos30,-cos30],[sin30,sin30]]) \n", + "B=np.array([0,120]) \n", + "X=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The tension in the cable is,T=',round(X[0]),\"lb\"\n", + "print'The reaction at B is,R',round(X[1]),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the cable is,T= 120.0 lb\n", + "The reaction at B is,R 120.0 lb\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-6,Page no 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W1=40 #lb\n", + "W2=30 #lb\n", + "# as theta1=30 degrees,\n", + "sin30=2**-1\n", + "\n", + "#Calculations\n", + "#Summing the forces parallel to 30 degree plane\n", + "T=W1*sin30\n", + "theta=arcsin(T/W2)*(180/pi)\n", + "\n", + "#Result\n", + "print'The tension in the cable is',round(T),\"lb\"\n", + "print'The angle is',round(theta,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the cable is 20.0 lb\n", + "The angle is 41.8 degrees\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-8,Page no 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F1=125 #N\n", + "F2=200 #N\n", + "F3=340 #N\n", + "F4=180 #N\n", + "x1=4 #m\n", + "x2=3 #m\n", + "x3=10 #m\n", + "x4=15 #m\n", + "x5=17 #m\n", + "\n", + "#Calculations\n", + "Rb=(-F1*x1+F2*x2+F3*x3+F4*x4)/x5 #moment about point A\n", + "Ra=(F1*(x1+x5)+F3*(x5-x3)+F2*(x5-x2)+F4*(x5-x4))/x5 #moment about point B\n", + "\n", + "#Result\n", + "print'The reaction at A is',round(Ra),\"N\"\n", + "print'The reaction at B is',round(Rb),\"N\"\n", + "\n", + "# The ans for B is off by 1 N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A is 480.0 N\n", + "The reaction at B is 364.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-9, Page no 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F1=1000 #lb\n", + "F2=1200 #lb\n", + "F3=2000 #lb\n", + "x1=1 #ft\n", + "x2=7 #ft\n", + "x4=2 #ft\n", + "x3=6 #ft\n", + "\n", + "#Calculation\n", + "#Equilibrium equations\n", + "Rn=(F3*(x1+x2+x3)+F2*(x1+x2)+F1*x1)/(x1+x3+x2+x4) #Moment about point M\n", + "Rm=(F1*(x2+x3+x4)+F2*(x3+x4)+F3*x4)/(x1+x2+x3+x4) #Moment about point N\n", + "\n", + "#Result\n", + "print'The reaction at M is',round(Rm),\"lb\"\n", + "print'The reaction at N is',round(Rn),\"lb\"\n", + "\n", + "#Decimal Accuracy causes discrepancy in answers between computation and textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at M is 1787.0 lb\n", + "The reaction at N is 2412.0 lb\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-10, Page no 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "P=10 #kg\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "# equilibrium at fig b\n", + "T1=P*g/2 #N\n", + "# equilibrium at fig c\n", + "T2=T1/2 #N\n", + "#equilibrium at fig d\n", + "P=T2\n", + "\n", + "#Result\n", + "print'The force P is',round(P,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force P is 24.5 N\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-11, Page no 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "k=20 # lb/in\n", + "w=20 # lb/ft\n", + "x1=4 #ft\n", + "x2=10 # ft\n", + "x3=8 #ft\n", + "x4=6 #ft\n", + "x5=9 #ft\n", + "F1=1920 #lb.rad\n", + "F2=3360 #lb.rad\n", + "\n", + "#calculations\n", + "theta=(w*x2*x5)*(F1*x3+F2*(x3+x4))**-1 #radians\n", + "FB=F1*theta\n", + "FC=F2*theta\n", + "A=(w*x2)-FB-FC\n", + "\n", + "#Result\n", + "print'The force in spring B is',round(FB,1),\"lb\"\n", + "print'The force in spring C is',round(FC,1),\"lb\"\n", + "print'The reaction at A is',round(A,1),\"lb up\"\n", + "\n", + " # The answer waries slightly due to decimal point discrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in spring B is 55.4 lb\n", + "The force in spring C is 96.9 lb\n", + "The reaction at A is 47.7 lb up\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-12, Page no 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "L=3.8 #m\n", + "w=10 # kg/m\n", + "P=1000 #N\n", + "t=0.8 #m\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "Gf=L*w*g #N\n", + "A=(P*L+Gf*L*0.5)/t #N Taking moment about point B\n", + "B=(P*(L-t)+Gf*(0.5*L-t))/t #N Taking moment about point A\n", + "\n", + "#Result\n", + "print'The reaction at point A is',round(A),\"N\"\n", + "print'The reaction at point B is',round(B),\"N\"\n", + "\n", + "# The answers in the textbook are incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at point A is 5635.0 N\n", + "The reaction at point B is 4263.0 N\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-13, Page no 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "Wa=400 #lb\n", + "Wb=200 #lb\n", + "# as theta=30 degrees,\n", + "sin30=2**-1\n", + "\n", + "#Calculations\n", + "Ta=Wa*sin30 #lb\n", + "Tb=Wb*sin30 #lb\n", + "#Taking moment about point O\n", + "P=(Tb*12+Ta*6)/24 #lb\n", + "\n", + "#Result\n", + "print'The value of Ta is',round(Ta,3),\"lb\"\n", + "print'The value of Tb is',round(Tb,3),\"lb\"\n", + "print'The value of P is',round(P,3),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ta is 200.0 lb\n", + "The value of Tb is 100.0 lb\n", + "The value of P is 100.0 lb\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-15, Page no 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "F=np.array([5,2,3,1.5]) #kN Forces are defined as a cloumn matrix\n", + "theta=(pi*np.array([90,60,45,80]))/180 #degrees angles are also defined as a column matrix\n", + "d=np.array([2,6,13,17]) #distances from point C of each force\n", + "c=np.array([17,15,11,4]) #distance form point D of each force\n", + "#Calculations\n", + "\n", + "#Summing horizontal forces\n", + "Ch=F[1]*cos(theta[1])-F[2]*cos(theta[2])+F[3]*cos(theta[3]) #kN \"which indidcates that Ch acts to the left instead of the assumed\"\n", + "#Taking moment about point C\n", + "D=(F[0]*d[0]+F[1]*sin(theta[1])*d[1]+F[2]*sin(theta[2])*d[2]+F[3]*sin(theta[3])*d[3])/d[3] #kN\n", + "#Taking moment about point D\n", + "Cv=(F[0]*c[1]+F[1]*sin(theta[1])*c[2]+F[2]*sin(theta[2])*c[3])/c[1]\n", + "#Result\n", + "\n", + "print'The values of Ch,D and Cv are:',round(Ch,2),\"kN ,\",round(D,1),\"kN\",'and',round(Cv,2),\"kN\"\n", + "\n", + "# The ans of Cv is incorrect in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values of Ch,D and Cv are: -0.86 kN , 4.3 kN and 6.84 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-16, Page no 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=100 #N/m\n", + "F1=200 #N\n", + "M=500 #N.m\n", + "Lw=2 #m\n", + "#Distance from point A\n", + "d=np.array([1,2,3,4,5]) #m\n", + "#Distance from point B\n", + "b=np.array([5,4,3,2,1]) #m\n", + "\n", + "#Calculations\n", + "#Taking moment aboout point A\n", + "Rb=(w*Lw*d[0]+F1*d[2]-M)/d[3] #N\n", + "#Taking moment about point B\n", + "Ra=(w*Lw*b[2]+F1*b[4]+M)/b[1] #N\n", + "\n", + "#Result\n", + "print'The value of reaction at A is',round(Ra),\"N\"\n", + "print'The value of reaction at B is',round(Rb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of reaction at A is 325.0 N\n", + "The value of reaction at B is 75.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-18, Page no 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "# The values of theta are=[60,60,45] degrees, therefore its values are as,\n", + "costheta2=sqrt(2)**-1\n", + "sintheta2=sqrt(2)**-1\n", + "d=np.array([4.46,3.54,2]) #feet defined as a matrix\n", + "F=400 #lb\n", + "\n", + "#Calculations\n", + "#Taking moment about point A\n", + "Re=(F*(8-d[1]))/8 #lb\n", + "Ra=400-Re #lb here i have used the summation of forces in the vertical direction\n", + "#Taking moment about point B\n", + "Dv=(-F*3.644)*5.77**-1 #lb\n", + "#Taking moment about point D\n", + "Bv=(F*2.126)/5.77 #lb\n", + "#Taking summation of forces in the vertical direction\n", + "Cv=-223-Dv #lb\n", + "#Taking moment about point D\n", + "Ch=((223*d[2]*costheta2)-(Cv*5.173*costheta2))*(5.173*sintheta2)**-1 #lb\n", + "#Taking summation of forces in the horizontal direction\n", + "Dh=-Ch #lb\n", + "#Taking sum of forces in horizontal direction\n", + "Bh=-Dh #lb\n", + "\n", + "#Result\n", + "print'The Floor reactions are'\n", + "print'Ra=',round(Ra),\"lb up\"\n", + "print'Re=',round(Re),\"lb up\"\n", + "\n", + "print'Pin reaction at C on CE are'\n", + "print'Ch=',round(Ch,1),\"lb to right\"\n", + "print'Cv=',round(Cv,1),\"lb up\"\n", + "\n", + "print'The pin reactions at B on AC are:'\n", + "print'Bh=',round(Bh,1),\"lb to right\"\n", + "print'Bv=',round(Bv,1),\"lb down\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Floor reactions are\n", + "Ra= 177.0 lb up\n", + "Re= 223.0 lb up\n", + "Pin reaction at C on CE are\n", + "Ch= 56.6 lb to right\n", + "Cv= 29.6 lb up\n", + "The pin reactions at B on AC are:\n", + "Bh= 56.6 lb to right\n", + "Bv= 147.4 lb down\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5-19, Page no 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "r=0.5 #m\n", + "m=10 #kg\n", + "g=9.81 #m/s**2\n", + "# since theta=60 degrees,\n", + "sin30=2**-1\n", + "cos30=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "#Due to symmetry the reaction will be shared by the structure\n", + "A=m*g*r #N\n", + "B=A #N\n", + "#Vertical forces summed\n", + "N1=m*g/(2*sin30) #N\n", + "#Taking moment about point C\n", + "T=(N1*0.866+B*sin30)*(1.5*cos30)**-1\n", + " \n", + "#Result\n", + "print'The value of N1 is',round(N1),\"N\"\n", + "print'The value of T is',round(T,1),\"N\"\n", + "\n", + "# The ans for T is off by 0.1 N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of N1 is 98.0 N\n", + "The value of T is 84.3 N\n" + ] + } + ], + "prompt_number": 52 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter6.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter6.ipynb new file mode 100755 index 00000000..55072819 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter6.ipynb @@ -0,0 +1,770 @@ +{ + "metadata": { + "name": "chapter 6.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "CHAPTER 6: EQUILIBRIUM OF NON COPLANAR FORCE SYSTEMS " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-1, Page no 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "H=30 #ft\n", + "F=150 #lb\n", + "# Here theta1=10, theta2=30 & theta3=60 degrees. Thus the values are,\n", + "sin10=0.1736\n", + "cos10=0.9848\n", + "sin30=2**-1\n", + "cos30=sqrt(3)*2**-1\n", + "sin60=sqrt(3)*2**-1\n", + "cos60=2**-1\n", + "\n", + "#Calculations\n", + "#Matrix solution of simultaneous equations\n", + "X=np.array([[cos60*sin30, -cos60*sin30],[cos60*cos30, cos60*cos30]]) \n", + "Y=np.array([[0],[F*cos10]]) \n", + "R=np.linalg.solve(X,Y)\n", + "#To find P,sum the forces vertically along the y-axis\n", + "P=F*sin10+2*R[0]*sin60 #lb Compression\n", + "\n", + "#Result\n", + "print'The value of A and B is',round(R[0]),\"lb (T)\"\n", + "print'The value of P is',round(P),\"lb (C)\"\n", + "\n", + "# The value of P is off by 1 lb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of A and B is 171.0 lb (T)\n", + "The value of P is 321.0 lb (C)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-2, Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "#Initilization of variables\n", + "F=150 #lb\n", + "# Here theta1=10, theta2=30 & theta3=60 degrees. Thus the values are,\n", + "sin10=0.1736\n", + "cos10=0.9848\n", + "sin30=2**-1\n", + "cos30=sqrt(3)*2**-1\n", + "sin60=sqrt(3)*2**-1\n", + "cos60=2**-1\n", + "\n", + "#Calculations\n", + "A=[-cos60*cos30,-sin60,cos60*sin30] \n", + "B=[-cos60*cos60,-sin60,cos60*sin30]\n", + "# 150lb force is actually a vector\n", + "F_v=[F*cos10,F*sin10,0] #lb\n", + "#Postion vector relative to C \n", + "r=[0,30,0]\n", + "# Moment about point C is zero\n", + "#solution by matrix\n", + "X=np.array([[7.5,-7.5],[13,13]]) \n", + "Y=np.array([[0],[4470]]) \n", + "R=np.linalg.solve(X,Y)\n", + "A=R[0] #lb\n", + "B=R[1] #lb\n", + "#Summing forces in y direction\n", + "Cy=0.866*A+0.866*B+25.9 #lb\n", + "\n", + "#Result\n", + "print'The value of A and B is',round(A),\"lb\"\n", + "print'The value of Cy is',round(Cy),\"lb\"\n", + "\n", + "# The answer may wary due to decimal point descripancy in computation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of A and B is 172.0 lb\n", + "The value of Cy is 324.0 lb\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-3, Page no 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initililization of variables\n", + "m=6.12 #kg\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "AD=sqrt(3**2+2**2+6**2) \n", + "AC=sqrt(4**2+2**2)\n", + "AB=5\n", + "#Sum of forces in the y direction\n", + "T1=(m*g*AD)/6 #N\n", + "#sum of forces in the x and z direction\n", + "#Matrix solution of the folllowing simultaneous equations\n", + "X=np.array([[4*4.47**-1,-3*5**-1],[-2*4.47**-1,4*5**-1]])\n", + "Y=np.array([[T1*(3*7**-1)],[T1*(2*7**-1)]]) \n", + "R=np.linalg.solve(X,Y)\n", + "T2=R[0] #N\n", + "T3=R[1] #N\n", + "\n", + "#Result\n", + "print'The value of T1 is',round(T1),\"N\"\n", + "print'The value of T2 is',round(T2,1),\"N\"\n", + "print'The vaue of T3 is',round(T3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of T1 is 70.0 N\n", + "The value of T2 is 80.5 N\n", + "The vaue of T3 is 70.0 N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-4, Page no 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Intilization of variables\n", + "\n", + "F=np.array([0,60,0]) #Force defined as a matrix\n", + "t1=np.array([-3*7**-1,6*7**-1,2*7**-1]) #Tension defined as a matrix\n", + "t2=np.array([4*4.47**-1,0,-2*4.47**-1]) #tension defined as a mtrix\n", + "t3=np.array([-3*5**-1,0,4*5**-1]) #Tension defined as a matrix\n", + "\n", + "#Calculations\n", + "#Summation of forces in the y-direction\n", + "T1=F[1]*(t1[1]**-1) #N\n", + "#Summation of forces in the x-direction and z direction\n", + "M1=np.array([[t2[0],t3[0]],[t2[2],t3[2]]])\n", + "M2=np.array([[-1*t1[0]*T1],[t1[2]*T1]]) \n", + "R=np.linalg.solve(M1,M2)\n", + "\n", + "#Result\n", + "print'The tension in the strings are: T1=',round(T1),\"N\",',T2=',round(R[0],1),\"N\",'and T3=',round(R[1]),\"N respectively\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the strings are: T1= 70.0 N ,T2= 80.5 N and T3= 70.0 N respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-5, Page no 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=80 #kg\n", + "g=9.81 # m/s**2\n", + "#Co-ordinates of points in Meters\n", + "A=np.array([1,3,0])\n", + "B=np.array([3,3,-4])\n", + "C=np.array([4,3,0])\n", + "D=np.array([2,0,-1])\n", + "\n", + "#Calculations\n", + "#Tension in DC will be\n", + "a=np.array([[C[0]-D[0]],[C[1]-D[1]],[C[2]-D[2]]])\n", + "h=((C[0]-D[0])**2+(C[1]-D[1])**2+(C[2]-D[2])**2)**0.5\n", + "c=a*h**-1\n", + "#Unit vector calculations\n", + "e=np.array([[B[0]-A[0]],[B[1]-A[1]],[B[2]-A[2]]])\n", + "v=((B[0]-A[0])**2+(B[1]-A[1])**2+(B[2]-A[2])**2)**0.5\n", + "e_ab=e*v**-1\n", + "#Position vector AD\n", + "r_ad=np.array([[D[0]-A[0]],[D[1]-A[1]],[D[2]-A[2]]])\n", + "#Moment Calculations\n", + "O=np.array([[1,0,0],[1,-3,-1],[0,-m*g,0]])\n", + "P=np.array([[0,1,0],[1,-3,-1],[0,-m*g,0]])\n", + "Q=np.array([[0,0,1],[1,-3,-1],[0,-m*g,0]])\n", + "C1=np.array([[1,0,0],[1,-3,-1],[2,3,1]])\n", + "C2=np.array([[0,1,0],[1,-3,-1],[2,3,1]])\n", + "C3=np.array([[0,0,1],[1,-3,-1],[2,3,1]])\n", + "rxF1=np.array([[det(O),det(P),det(Q)]])\n", + "rxF2=np.array([(det(C1)*h**-1),(det(C2)*h**-1),(det(C3)*h**-1)])\n", + "#Final Moment calculations\n", + "rxF=rxF1+rxF2 \n", + "#Taking dot product\n", + "dot1=e_ab*rxF\n", + "dot2=e_ab*rxF2\n", + "#equating dot product to zero to obtain C\n", + "C=-(dot1[0,0]+dot1[2,2])/dot2[2,2]\n", + "\n", + "#Result \n", + "print'The tension in CD is',round(C),\"N\"\n", + "\n", + "# The ans is off by 1 N due to Decimal point descrepancy. " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in CD is 162.0 N\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-6, Page no 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=200 #lb\n", + "Dh=4 #ft\n", + "\n", + "#Calculation\n", + "theta=arctan(2*Dh**-1)*(180/pi) #degrees\n", + "T=w/(3*cos(theta)) #lb\n", + "\n", + "#Result\n", + "print'The Tension in each rope is',round(T,1),\"lb\"\n", + "print'The angle is',round(theta,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Tension in each rope is 482.9 lb\n", + "The angle is 26.6 degrees\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-7, Page no 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "F=np.array([100,0,0]) #N\n", + "CE=5 #m\n", + "BC=(34)**0.5 #m\n", + "AC=(41)**0.5 #m\n", + "\n", + "#Calculations\n", + "#solving as a matrix for system of linear equations\n", + "A=np.array([[3*BC**-1,-4*AC**-1,0],[0,0,(6*4)*CE**-1],[-3*BC**-1,-3*AC**-1,-3*CE**-1]])\n", + "B=np.array([[0],[F[0]*4],[-F[0]]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The forces F1,F2 and F3 are as',round(C[0],1),\"N\",',',round(C[1],1),\"N\",'and',round(C[2],1),\"N\"\n", + "print'Here F3 is compression assumed and rest are Tension'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces F1,F2 and F3 are as 55.5 N , 45.7 N and 83.3 N\n", + "Here F3 is compression assumed and rest are Tension\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-8, Page no 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "F=np.array([100,0,0]) #N\n", + "CE=5 #m\n", + "BC=(34)**0.5 #m\n", + "AC=(41)**0.5 #m\n", + "\n", + "#Calculations\n", + "#solving as a matrix for system of linear equations\n", + "A=np.array([[3/BC,-4/AC,0],[-4/BC,-4/AC,4*CE**-1],[-3/BC,-3/AC,-3*CE**-1]])\n", + "B=np.array([[0],[0],[-F[0]]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The forces are: F1=',round(C[0],1),\"N\",',F2=',round(C[1],1),\"N\",'and F3=',round(C[2],1),\"N\"\n", + "print'Here F3 is compression assumed and rest are Tension'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces are: F1= 55.5 N ,F2= 45.7 N and F3= 83.3 N\n", + "Here F3 is compression assumed and rest are Tension\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-9, Page no 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "#here forces will be defines as matrices along with their co-ordinates\n", + "#Force in N and co-ordinates in mm\n", + "F1=[30,200,300] \n", + "F2=[10,400,200]\n", + "F3=[20,200,500]\n", + "F4=[50,400,500]\n", + "#Calculations\n", + "#solving as system of linear equations\n", + "A=np.array([[1,1,1],[-600,-600,0],[0,600,600]])\n", + "B=np.array([[F1[0]+F2[0]+F3[0]+F4[0]],[-(F3[0]*F3[2]+F1[0]*F1[2]+F4[0]*F4[2]+F2[0]*F2[2])],[-(-F3[0]*F3[1]-F1[0]*F1[1]-F4[0]*F4[1]-F2[0]*F2[1])]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The reactions are as R1=',round(C[0],1),\"N\",',R2=',round(C[1],1),\"N\",'and R3=',round(C[2],1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reactions are as R1= 53.3 N ,R2= 23.3 N and R3= 33.3 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-10, Page no87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=1 #kg\n", + "g=9.81 #m/s**2\n", + "# As t1=45 degrees and t2=30 degrees\n", + "cost1=sqrt(2)**-1\n", + "cost2=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "#Solving as system of linear equations\n", + "A=np.array([[1,0,-cost1,0],[0,1,0,3*5**-1],[-5,g*m*cost1*cost2,0,0],[-1,0,0,4*5**-1]])\n", + "B=np.array([[0],[g*m],[g*m*5*cost1*cost2],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The forces are: Nb=',round(C[0],1),',Nc=',round(C[1],1),',Tc=',round(C[2],1),'and Tb=',round(C[3],1),\"respectively\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces are: Nb= 3.0 ,Nc= 7.5 ,Tc= 4.3 and Tb= 3.8 respectively\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-11, Page no 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "w=50 #lb wind load\n", + "W=60 #lb weight of door\n", + "\n", + "#Calculations\n", + "#Calculation as system of linear equations\n", + "A=np.array([[0,0,33],[1,1,-1],[28,10,-28]])\n", + "B=np.array([[50*18],[-50],[-50*24]])\n", + "C=np.linalg.solve(A,B)\n", + "P=C[2]*(cos(20*pi*180**-1))**-1\n", + "D=np.array([[-28,-10],[1,1]])\n", + "E=np.array([1080-(28*(P*sin((20*pi)*180**-1))),P*sin((20*pi)*180**-1)])\n", + "F=np.linalg.solve(D,E)\n", + "By=60\n", + "\n", + "#Result\n", + "print'The forces are as follows:'\n", + "print'Az=',round(C[0],1),\"lb\",',Bz=',round(C[1],1),\"lb\",',Pz=',round(C[2],1),\"lb\",',Ax=',round(F[0]),\"lb\",',Bx=',round(F[1]),\"lb\",'and By=',round(By),\"lb respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces are as follows:\n", + "Az= -11.6 lb ,Bz= -11.1 lb ,Pz= 27.3 lb ,Ax= -50.0 lb ,Bx= 60.0 lb and By= 60.0 lb respectively.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-12, Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=1 #kg\n", + "g=9.81 #m/s**2\n", + "# Since t1=45 degrees and t2=30 degrees\n", + "cost1=sqrt(2)**-1\n", + "cost2=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "#Solving as system of linear equations\n", + "A=np.array([[1,0,-cost1,0],[0,1,0,3*5**-1],[-5,g*m*cost1*cost2,0,0],[-1,0,0,4*5**-1]])\n", + "B=np.array([[0],[g*m],[g*m*5*cost1*cost2],[0]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The forces are: Nb=',round(C[0],2),\"N\",',Nc=',round(C[1],2),\"N\",',Tc=',round(C[2],2),\"N\",'and Tb=',round(C[3],2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The forces are: Nb= 3.04 N ,Nc= 7.53 N ,Tc= 4.3 N and Tb= 3.8 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-13, Page no 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=200 #lb\n", + "cos25=0.9063\n", + "sin25=0.4226\n", + "\n", + "#Calculations\n", + "P=l*5*12**-1 #lb\n", + "#Solving as system of linear equations\n", + "A=np.array([[0,-36,0,0],[0,0,0,36],[0,0,1,1],[1,1,0,0]])\n", + "B=np.array([[-P*cos25*48],[l*20+P*sin25*48],[P*sin25+200],[P*cos25]])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "#Result\n", + "print'The forces are: Az=',round(C[0],1),\"lb\",',Bz=',round(C[1]),\"lb\",',Ay=',round(C[2],1),\"lb\",'and By=',round(C[3]),\"lb\"\n", + "\n", + "# The answer for Az waries due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces are: Az= -25.2 lb ,Bz= 101.0 lb ,Ay= 77.2 lb and By= 158.0 lb\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-14, Page No 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "A=80 #lb\n", + "B=40 #lb\n", + "C=60 #lb\n", + "l1=2 #in\n", + "l2=4 #in\n", + "l3=6 #in\n", + "l4=9 #in\n", + "l5=3 #in\n", + "l6=7 #in\n", + "\n", + "#Calculations\n", + "P=-(-A*l1+B*l2-C*l2)/l1\n", + "By=-(A*l3+P*l3)/l4\n", + "Ay=(-A*l5-P*l5)/l4\n", + "Bz=-(-C*l1-B*l1)/l4\n", + "Az=(C*l6+B*l6)/l4\n", + "\n", + "#Result\n", + "print'The forces are:Ay=',round(Ay,1),\"lb\",',By=',round(By,1),\"lb\",',Az=',round(Az,1),\"lb forward\",'and Bz=',round(Bz,1),\"lb forward\"\n", + "\n", + "# The answers may wary due to rounding of the values" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces are:Ay= -67.0 lb ,By= -134.0 lb ,Az= 77.0 lb forward and Bz= 22.0 lb forward\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6-15, Page no 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=138 #lb\n", + "w=80 #lb\n", + "\n", + "#Calculations\n", + "u=(3*3+4*4+6*6)**0.5\n", + "a=np.array([-3*u**-1,4*u**-1,-6*u**-1])\n", + "v=(3*3+3*3+3*3)**0.5\n", + "c=np.array([3*v**-1,3*v**-1,-3*v**-1])\n", + "P=np.array([[1,0,0],[0,0,8],[0,-W,0]])\n", + "Q=np.array([[0,0,1],[0,0,8],[0,-W,0]])\n", + "R=np.array([[1,0,0],[0,0,4],[0,-w,0]])\n", + "S=np.array([[0,0,1],[0,0,4],[0,-w,0]])\n", + "T=np.array([[1,0,0],[0,0,6],[a[0],a[1],a[2]]])\n", + "U=np.array([[0,1,0],[0,0,6],[a[0],a[1],a[2]]])\n", + "V=np.array([[1,0,0],[0,0,3],[c[0],c[1],c[2]]])\n", + "Y=np.array([[0,1,0],[0,0,3],[c[0],c[1],c[2]]])\n", + "#Solving for A and C\n", + "MAT1=np.array([[det(T),det(V)],[det(U),det(Y)]])\n", + "MAT2=np.array([[det(P)+det(R)],[0]])\n", + "res=np.linalg.solve(-MAT1,MAT2)\n", + "A=np.array([a[0]*res[0],a[1]*res[0],a[2]*res[0]])\n", + "C=np.array([c[0]*res[1],c[1]*res[1],c[2]*res[1]])\n", + "E=np.array([-(A[0]+C[0]),-(-w-W+A[1]+C[1]),-(A[2]+C[2])])\n", + "\n", + "#Result\n", + "print'The force vectors are as follows:'\n", + "print'A=',round(A[0]),\"i +\",round(A[1]),\"j \",round(A[2]),\"k\",\n", + "print'and C=',round(C[0]),\"i +\",round(C[1]),\"j \",round(C[2]),\"k\"\n", + "print'also,Ex=',round(E[0]),\"lb\",',Ey=',round(E[1]),\"lb\",'and Ez=',round(E[2]),\"lb\"\n", + "#Decimal accuracy causes discrepancy in the answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force vectors are as follows:\n", + "A= -102.0 i + 136.0 j -203.0 k and C= 203.0 i + 203.0 j -203.0 k\n", + "also,Ex= -102.0 lb ,Ey= -121.0 lb and Ez= 407.0 lb\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter7.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter7.ipynb new file mode 100755 index 00000000..97590af8 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter7.ipynb @@ -0,0 +1,668 @@ +{ + "metadata": { + "name": "chapter 7.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 7: TRUSSES AND CABLES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-1, Page no 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "F1=2000 #lb\n", + "F2=4000 #lb\n", + "l1=10 #ft\n", + "l2=30 #ft\n", + "l3=20 #ft\n", + "l4=40 #ft\n", + "# as t=60 degrees\n", + "sint=sqrt(3)*2**-1\n", + "cost=2**-1\n", + "\n", + "#Calculations\n", + "#Taking moment about point B and A\n", + "Ra=(F1*l2+F2*l1)/l4 \n", + "Rb=(F2*l2+F1*l1)/l4\n", + "#Consider fig 7-4(c)\n", + "A=np.array([[1,-cost],[0,-sint]])\n", + "B=np.array([[0],[-2500]])\n", + "C=np.linalg.solve(A,B)\n", + "#Consider figure 7-4(d)\n", + "A1=np.array([[1,cost],[0,-sint]])\n", + "B1=np.array([-C[1]*cost,-C[1]*sint+F1])\n", + "C1=np.linalg.solve(A1,B1)\n", + "#Consider figure 7-4(e)\n", + "CD=577\n", + "CE=C[0]+C1[1]*cost+CD*cost\n", + "#Consider figure 7-4(f)\n", + "DE=Rb/sint\n", + "\n", + "#Result\n", + "\n", + "print'The reactions are:Ra=',round(Ra),\"lb\",'and Rb=',round(Rb),\"lb\"\n", + "print'Force in member AB=',round(C[1]),\"lb (C)\",'and AC=',round(C[0]),\"lb (T)\"\n", + "print'Force in member BC=',round(C1[1]),\"lb (T)\",'and BD=',round(C1[0]),\"lb (-ve sign indicates compression)\"\n", + "print'Force in member CD=',round(CD),\"lb (C)\",'and CE=',round(CE),\"lb (T)\"\n", + "print'Force in member DE=',round(DE),\"lb (C)\"\n", + "\n", + "#Decimal Accuracy causes discrepancy in answers.Thus answers wary as compared to the textbook.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reactions are:Ra= 2500.0 lb and Rb= 3500.0 lb\n", + "Force in member AB= 2887.0 lb (C) and AC= 1443.0 lb (T)\n", + "Force in member BC= 577.0 lb (T) and BD= -1732.0 lb (-ve sign indicates compression)\n", + "Force in member CD= 577.0 lb (C) and CE= 2021.0 lb (T)\n", + "Force in member DE= 4041.0 lb (C)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-2, Page no 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "s=4 #m length of sides\n", + "l=2 #kN load acting on each node\n", + "r=7 #kN by inspection reaction at A\n", + "sin60=sqrt(3)*2**-1\n", + "tan30=sqrt(3)**-1\n", + "tan60=sqrt(3)\n", + "\n", + "#Calculation\n", + "#Taking Moment about point G\n", + "FH=(-r*12+2*10+2*6+2*2)/(2*tan60) #kN Compressive\n", + "#Taking moment about point H\n", + "GI=(r*14-2*12-2*8-2*4)/(2*tan30) #kN Tension\n", + "#Summing forces in the vertical direction\n", + "HG=-(r-(l*3))/sin60 #kN Compression\n", + "#Taking moment about point J yields\n", + "IK=(-2*4-2*8+r*10)/(2*tan60) #kN\n", + "\n", + "#Result\n", + "print'The value of the forces in the components are as follows'\n", + "print'FH=',round(FH,1),\"kN (C)\",',GI=',round(GI,1),\"kN (T)\",',HG=',round(HG,2),\"kN (C)\",'and IK=',round(IK,1),\"kN (T)\"\n", + "print'The answer in the text book for GI is wrong'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the forces in the components are as follows\n", + "FH= -13.9 kN (C) ,GI= 43.3 kN (T) ,HG= -1.15 kN (C) and IK= 13.3 kN (T)\n", + "The answer in the text book for GI is wrong\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-3, Page no 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta=30 degrees,\n", + "sin30=2**-1\n", + "EF=40000 #lb\n", + "l=36 #feet\n", + "\n", + "#Calculation\n", + "#Taking moment about point D and setting EF=40000lbs\n", + "P=-(EF*sin30*l)/l #lb\n", + "\n", + "#Result\n", + "print'The maximum value of P is',round(P),\"lb\"\n", + "print'The negative sign indicates the downward direction'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of P is -20000.0 lb\n", + "The negative sign indicates the downward direction\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-4, Page no 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=12 #m\n", + "# as theta1=30 degrees\n", + "cos30=sqrt(3)*2**-1\n", + "cos60=2**-1\n", + "sin30=2**-1\n", + "\n", + "F1=1000 #N\n", + "F2=2000 #N\n", + "\n", + "#Calculation\n", + "FG=l*cos30 #m\n", + "DG=(l+(l/2))/cos30 #m\n", + "#Taking moment about point G\n", + "A=(F1*l+F2*FG+F1*DG)/(l*3) #N\n", + "#Summing forces in horizontal direction\n", + "G_x=(2*F1+F2)*sin30 #N\n", + "#Summing forces in the vertical direction\n", + "G_y=(2*F1+F2)*cos30+F1-A #N\n", + "#Taking moment about point C\n", + "BD=-(A*l)/(l/2) #N\n", + "#Taking moment about point D\n", + "CE=(A*(l+(l/2)))/FG #N\n", + "theta=arctan((l/2)/FG) #degrees \n", + "#Summing forces in the vertical direction\n", + "CD=(A+(BD*cos60))/cos(theta) #N\n", + "\n", + "#Result\n", + "print'The values of the forces are as follows'\n", + "print'A=',round(A),\"N\",',G_x=',round(G_x),\"N\",',G_y=',round(G_y),\"N\",',BD=',round(BD),\"N (C)\",',CE=',round(CE),\"N (T)\",'and CD=',round(CD),\"N(T)\"\n", + "#Decimal Accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values of the forces are as follows\n", + "A= 1488.0 N ,G_x= 2000.0 N ,G_y= 2976.0 N ,BD= -2976.0 N (C) ,CE= 2577.0 N (T) and CD= 0.0 N(T)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-5, Page no 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "A=2000 #lb\n", + "E=2000 #lb\n", + "# as theta=60 degrees and theta1=30 degrees, which means:\n", + "sin60=sqrt(3)*2**-1\n", + "cos60=2**-1\n", + "sin30=2**-1\n", + "cos30=sqrt(3)*2**-1\n", + "\n", + "#Sign convention positive means Tension and negative means Compression\n", + "#Taking sum of forces along x and y direction in fig7-13\n", + "AB=-A/sin60 #lb\n", + "AG=-AB*cos60 #lb\n", + "#Taking sum of forces along x and y direction in fig7-14\n", + "BG=((-AB*cos30)-1000)/(cos30) #lb\n", + "BC=((AB*sin30)-(BG*sin30)) #lb\n", + "#Taking sum of forces along x and y direction in fig7-15\n", + "GC=-(BG*sin60)/sin60 #lb\n", + "GF=AG+BG*cos60-GC*(cos60) #lb\n", + "#By symmetry of structure\n", + "DE=AB #lb\n", + "FE=AG #lb\n", + "DF=BG #lb\n", + "CD=BC #lb\n", + "\n", + "#Result\n", + "print'The forces in the truess are'\n", + "print'AB=DE=',round(AB),\"lb (C)\",',AG=FE=',round(AG),\"lb (T)\",',BG=DF=',round(BG),\"lb (T)\",',BC=CD=',round(BC),\"lb (C)\",'and CG=CF=',round(GC),\"lb (C)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces in the truess are\n", + "AB=DE= -2309.0 lb (C) ,AG=FE= 1155.0 lb (T) ,BG=DF= 1155.0 lb (T) ,BC=CD= -1732.0 lb (C) and CG=CF= -1155.0 lb (C)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-6, Page no 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F=500 #N\n", + "A=1000 #N\n", + "# as theta=60 degrees,\n", + "sin60=sqrt(3)*2**-1\n", + "l=20 #m\n", + "\n", + "#Calculations\n", + "#Taking moment about point G\n", + "R_c=(20*3*A+50*F+30*F+10*F)/40 #N\n", + "#Returning to fig7-17\n", + "#Taking moment about point C\n", + "BD=(l*A+(l/2)*F)/(l*sin60) #N\n", + "#Taking sum of forces in vertical direction\n", + "CD=(A+F-R_c)/sin60 #N\n", + "\n", + "#Result\n", + "print'The forces in the members are as follows'\n", + "print'BD=',round(BD),\"N (T)\",'and CD=',round(CD),\"N (C).\",'Also the reaction at C is',round(R_c),\"N\"\n", + "#Decimal accuracy causes discrepancey in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces in the members are as follows\n", + "BD= 1443.0 N (T) and CD= -1299.0 N (C). Also the reaction at C is 2625.0 N\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-7, Page no 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=800 #lb/ft\n", + "a=600 #ft\n", + "d=40 #ft\n", + "\n", + "#Calculations\n", + "T=0.5*w*a*(sqrt(1+(a**2/(16*d**2)))) #lb\n", + "H=(w*a**2)/(8*d) #lb\n", + "#Taking the first two terms of the series\n", + "l=a*(1+(8/3)*(d*a**-1)**2-(32/5)*0.00002) #ft\n", + "\n", + "#Result\n", + "print'The value of T=',round(T),\"lb\",'and that of H=',round(H),\"lb.\",'Also l=',round(l),\"ft\"\n", + "#Deciaml accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of T= 929516.0 lb and that of H= 900000.0 lb. Also l= 605.0 ft\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-8,Page no 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "l=800*300 #lb\n", + "\n", + "#Calculations\n", + "#Summing forces in horizontal and vertical direction\n", + "theta=arctan(40*150**-1) #degrees\n", + "H=l/tan(theta) #lb\n", + "T_max=sqrt(l**2+H**2) #lb\n", + "\n", + "#Result\n", + "print'The maximun tension is',round(T_max),\"lb\",'and H=',round(H),\"lb\"\n", + "#Decimal accuracy causes discrepancy in answers" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximun tension is 931450.0 lb and H= 900000.0 lb\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-9,Page no 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "#For simplicity a1 and a2 values are being considered as constant free of H\n", + "a_1=sqrt(10*14.7**-1)\n", + "a_2=sqrt(30/14.7)\n", + "y=10 #m\n", + "\n", + "#Calculations\n", + "H=(300/(a_1+a_2))**2 #N\n", + "#Now reconsidering a1 and a2 actual values\n", + "a1=a_1*sqrt(H) #m\n", + "a2=a_2*sqrt(H) #m\n", + "#Theta calculations\n", + "x=a1\n", + "theta=arctan(2*y/x)\n", + "#T calculations\n", + "T=sqrt((864*a2**2)+H**2) #N\n", + "\n", + "#Result\n", + "print'The tension in the cable is',round(T,2),\"*10**-3 kN\"\n", + "# The answer may wary due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the cable is 18585.57 *10**-3 kN\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-10, Page no 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "T=140000 #N\n", + "w=2000 #N/m\n", + "a=20 #m\n", + "\n", + "#Calculations\n", + "#Calculation step by step\n", + "lhs=(140000*2)*(2000*20)**-1 \n", + "d=sqrt(1/((((lhs**2)-1)*16)/(20**2))) #m\n", + "l=a*(1+(8/3)*(d/a)**2) #m\n", + "\n", + "#Result\n", + "print'The sag in the cable is',round(d,2),\"m\"\n", + "print'The required length is',round(l,2),\"m\"\n", + "\n", + "# Value of l is off by 0.2 m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sag in the cable is 0.72 m\n", + "The required length is 20.05 m\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-11, Page no 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=10*16**-1 #lb/ft\n", + "a=80 #ft\n", + "P=500 #lb\n", + "\n", + "#Calculations\n", + "lhs=(P*2)/(w*a)\n", + "d=sqrt(1*((((lhs**2)-1)*16)/(80**2))**-1) #ft\n", + "\n", + "#Result\n", + "print'The sag in the cable is',round(d),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sag in the cable is 1.0 ft\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-12, Page no 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "w=0.518 #lb/ft\n", + "d=50 #ft\n", + "l=500 #ft\n", + "#Plot coding\n", + "A=linspace(0,800,9) #defined x axis\n", + "B=A+50\n", + "C=[50000,500*(2*100)**-1,500*(2*200)**-1,500*(2*300)**-1,500*(2*400)**-1,500*(2*500)**-1,500*(2*600)**-1,500*(2*700)**-1,500*(2*800)**-1]\n", + "D=cosh(C)\n", + "E=([D[0]*A[0],D[1]*A[1],D[2]*A[2],D[3]*A[3],D[4]*A[4],D[5]*A[5],D[6]*A[6],D[7]*A[7],D[8]*A[8]])\n", + "plot(A,B,A,E) #plotting two lines on the same plot\n", + "\n", + "#Calculations\n", + "#By close observation of plot taking c around 650\n", + "#consider c=635\n", + "c=635\n", + "T_max=w*(c+d) #lb\n", + "a=c+d\n", + "l=(4*(a*a-c*c))**0.5\n", + "\n", + "#Result\n", + "\n", + "print'The maximum tension is',round(T_max),\"lb\",'and length required is',round(l),\"ft respectively.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum tension is 355.0 lb and length required is 514.0 ft respectively.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEACAYAAACwB81wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclOX6x/HPKGRaHc2FQcGclHVQWUQ0c6EUtEVyi1wj\nbT3aZuZW6VFLAdvElFLD5GRHNDXFfopkiVpquICW44KKxTqnRCJFAeH+/THJQU1AWWZgrvfrxUuc\n5Xm+KF7c3s/9XLdGKaUQQghR7zUwdwAhhBC1Qwq+EEJYCSn4QghhJaTgCyGElZCCL4QQVkIKvhBC\nWIkKC35ERASdOnWiY8eOREREAJCTk0NAQAAuLi4EBgaSm5tb+vrQ0FCcnZ1xc3MjPj6+5pILIYS4\nKeUW/J9//plPP/2Uffv2cejQIb7++mtOnTpFWFgYAQE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qqxWb9/fffS1cPXLx4kW+++QZvb2+Lyzlv3jzS0tJITU0lJiaGBx98\nkM8//9zicubn5/Pnn38CcOHCBeLj4+nUqZNF5bS3t6dt27acOHECgG3btuHh4cHAgQMtJmNZq1at\nKp3OuZLHknK6ubmxd+9eLl68iFKKbdu2odfrq/fPs4auP9zQ5s2blYuLi+rQoYOaN29ebZ++1PDh\nw1Xr1q2Vra2tcnR0VMuXL1dnz55Vffv2Vc7OziogIECdO3eu9PVz585VHTp0UK6uriouLq7Wcu7a\ntUtpNBrl6empvLy8lJeXl9qyZYvFZT18+LDy9vZWnp6eqlOnTmr+/PlKKWVxOctKSEgoXaVjaTlP\nnz6tPD09laenp/Lw8Cj9t2JpOZOTk5Wvr6/q3LmzGjx4sMrNzbW4jEopdf78edWiRQuVl5dX+pgl\n5gwPD1d6vV517NhRPfnkk6qwsLBac8qNV0IIYSVki0MhhLASUvCFEMJKSMEXQggrIQVfCCGshBR8\nIYSwElLwhRDCSkjBF0IIKyEFXwghrMT/A81rgr07higfAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7-13, Page no 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m=0.6 #kg/m\n", + "l=240 #m\n", + "d=24 #m\n", + "\n", + "#Calculations\n", + "c=((((1*4**-1)*(l**2))-(24*24)))/(2*d)\n", + "T_max=9.8*m*(c+d) #N\n", + "a=arcsinh((l)/(2*c))*576\n", + "\n", + "#Result\n", + "print'The maximun tension is',round(T_max),\"N\"\n", + "print'The value of a is',round(a)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximun tension is 1835.0 N\n", + "The value of a is 234.0\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter8.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter8.ipynb new file mode 100755 index 00000000..255a9be0 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter8.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter 8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 8: FORCES IN BEAMS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1, Page no 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "R_A=100 #N\n", + "R_B=200 #N\n", + "\n", + "#Calculations\n", + "#Shear force at 2m\n", + "V=100 #N\n", + "#Moment at 2m\n", + "M=R_A*2 #N.m\n", + "\n", + "#Result\n", + "print'The shear force at 2m is +',round(V),\"N\"\n", + "print'The moment at 2m is +',round(M),\"N-m\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The shear force at 2m is + 100.0 N\n", + "The moment at 2m is + 200.0 N-m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page no 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Initilization of variables\n", + "#length matrix\n", + "L1=[0,3.99,4,5.99,6] #m\n", + "#Bending moment matrix\n", + "B=[0,400,400,0.00001,0] #N.m\n", + "#Shear force plotting\n", + "#Here the left side and right side lengths are considered as close as 4 to keep up with right and left distinctions\n", + "L=[0,3.99,4,5.99,6]\n", + "S=[100,100,-200,-200,0]\n", + "g=[0,0,0,0,0]\n", + "\n", + "#Calculations cum Result\n", + "d=transpose(L1)\n", + "e=transpose(S)\n", + "plt.plot(d,B)\n", + "xlabel('distance (m)')\n", + "ylabel('B.M (N.m)')\n", + "plt.show()\n", + "plt.plot(L,e,L,g)\n", + "xlabel('distance (m)')\n", + "ylabel('S.F (N)')\n", + "plt.show()\n", + "\n", + "print'The graphs are the solutions'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtclHX6//HXEB5CSa3WwRgL4yAOIJCGtaVhiocSUjML\nLTHNb6vrbgczD5lCrYJbrmuWHcxcW0s0SyFWXTw06pr+sJS00LDEjfNmiglKCHP//ridCRQMZGbu\nmeF6Ph484nAfrlGbN9fnvu/PR6coioIQQogWz0PrAoQQQjgHCQQhhBCABIIQQoiLJBCEEEIAEghC\nCCEukkAQQggBOCAQampqiIyMJDY2FoBTp04RExNDUFAQgwYNoqyszLptcnIygYGBBAcHk5mZae/S\nhBBC1GL3QFiyZAlGoxGdTgdASkoKMTEx5ObmMmDAAFJSUgDIyclh7dq15OTksGXLFqZMmYLZbLZ3\neUIIIS6yayAUFBSwadMmnnjiCSzPv6Wnp5OQkABAQkICGzduBCAtLY34+HhatWqFn58fAQEBZGVl\n2bM8IYQQtdg1EJ555hleeeUVPDx+PU1paSl6vR4AvV5PaWkpAEVFRRgMBut2BoOBwsJCe5YnhBCi\nFrsFQkZGBp07dyYyMpKGZsfQ6XTWoaSGfi6EEMIxPO114M8//5z09HQ2bdpEZWUlP//8M4899hh6\nvZ6SkhJ8fHwoLi6mc+fOAPj6+pKfn2/dv6CgAF9f38uOGxAQwPfff2+vsoUQwi35+/vz3XffXXkj\nxQFMJpMybNgwRVEUZfr06UpKSoqiKIqSnJyszJgxQ1EURfnmm2+U8PBw5ZdfflGOHz+u3HrrrYrZ\nbL7sW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CEEEJcJIEghBACgP8P8bSKBsl5v48AAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEPCAYAAABRHfM8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHVNJREFUeJzt3X9wFPX9x/HXAUEUwaBCQu8yhibBEAghGENRoeFHwKjk\nC4rRKBIErIVxpFoZrdoabSEwFB2LzbfWRgd/VKIyEGQwA2gPqBUykKitsXJiQpOQpCKCAeIEkv3+\ngdwXCIELd7m93Xs+Zm6829u9ey8X73Xvz/5yGIZhCACA8+hmdgEAAGsgMAAAPiEwAAA+ITAAAD4h\nMAAAPiEwAAA+MTUwZs+eraioKCUnJ3unHThwQJmZmRo8eLAmTZqkgwcPep8rKChQQkKCEhMTtXHj\nRjNKBoCwZWpg3HvvvSotLT1t2pIlS5SZmandu3drwoQJWrJkiSSpsrJSxcXFqqysVGlpqebPn6+2\ntjYzygaAsGRqYIwZM0b9+vU7bdq6deuUl5cnScrLy9PatWslSSUlJcrNzVVERIRiY2MVHx+vsrKy\noNcMAOEq5LZhNDY2KioqSpIUFRWlxsZGSdK+ffvkcrm887lcLtXV1ZlSIwCEo5ALjFM5HA45HI5z\nPg8ACI4eZhdwpqioKDU0NCg6Olr19fUaMGCAJMnpdKqmpsY7X21trZxOZ7vlY2PjtXfvnqDVCwB2\nEBcXpy+//PKc84Rch5Gdna2VK1dKklauXKmpU6d6p69atUotLS2qqqqSx+NRenp6u+X37t0jwzBs\ne3vqqadMr4F1Y/1OvR07ZqhbN/uun90/v5O3PXvO/0Pb1A4jNzdXW7Zs0f79+xUTE6NnnnlGjz32\nmHJyclRUVKTY2Fi99dZbkqSkpCTl5OQoKSlJPXr0UGFhIUNSQAjgf8PwYWpgvPnmm2edvnnz5rNO\nf/zxx/X44493ZUkALoDBRRLCQsgNSeHcMjIyzC6hy9h53ST7rp/DcSIw7Lp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77rlHEyZMMLusLmG34eHGxkZNmzZN0onhm7vv\nvluTJk0yuarAWrFihe6++261tLQoLi5Or7zySofzcuAeAMAnthiSAgB0PQIDAOATAgMA4BMCAwDg\nEwIDAOATAgMA4BMCA2EtPz9fy5cvlyQ99dRTev/99zuct6SkRJ9//nmwSmtn/fr1ys/P79QyEyZM\n8B54BviLwEBYO/VAs6effvqcB9StWbNGlZWVwSjrrJYvX6558+Z1apk777zTdifMg3kIDISdRYsW\n6eqrr9aYMWP0xRdfeENj1qxZWr16tSTpscce09ChQ5WSkqKFCxfqo48+0rvvvquFCxdq5MiR+uqr\nr/TSSy8pPT1dI0aM0PTp09Xc3Ox9nQULFuj6669XXFyc9zUlaenSpRo+fLhGjBjhvZDSnj17lJWV\npbS0NI0dO1ZffPFFu5pramrU0tKiqKgo73vMnz9fo0ePVlxcnNxut/Ly8pSUlHTaWQCys7O1atWq\nrvmHRPjp+stzAKFj586dRnJystHc3Gx89913Rnx8vLF8+XLDMAxj1qxZxurVq439+/cbV199tXeZ\nQ4cOnfb8SadeVOfJJ580VqxYYRiGYeTl5Rk5OTmGYRhGZWWlER8fbxiGYWzYsMG47rrrjObmZsMw\nDOPbb781DMMwxo8fb3g8HsMwDGP79u3G+PHj29X95ptvGg888ID38axZs4zc3FzDMAyjpKTE6NOn\nj/Gvf/3LaGtrM6655hrj448/9s47aNAg4/Dhwxf07wWcyhbnkgJ8tW3bNt16663q1auXevXqddaT\nVEZGRqpXr16aM2eObrnlFt1yyy3e54xTzqTzz3/+U08++aQOHTqkw4cPe8995XA4vGfcHTJkiBob\nGyWdOLHb7Nmz1atXL+/7HD58WB999JFuv/127+u2tLS0q+k///mP96ypJ528HOqwYcMUHR3tPWnc\n0KFDVV1drZSUFElSVFSUampqlJiY2Ml/LeB0BAbCisPhOO1L3zjjVGqGYah79+4qKyvT+++/r3fe\neUcvvPCCd2P4qds8Zs2apXXr1ik5OVkrV6487RoXPXv2bPceZ763dOLCSpGRkaqoqDhv7Wcue/I9\nunXrposuusg7vVu3bjp+/Phpy9ntpIAwB9swEFbGjh2rtWvX6vvvv1dTU5PWr1/fbp4jR47o4MGD\nysrK0rPPPqtPPvlEktSnTx9999133vkOHz6s6OhoHTt2TK+//vp5v5QzMzP1yiuveLd1fPvtt+rb\nt68GDRqkd955R9KJL/dPP/203bJXXXWVGhoaLmidGxsbuT4MAoLAQFhJTU3VHXfcoZSUFN10001K\nT08/7XmHw6GmpiZNmTJFKSkpGjNmjJ577jlJJ/Y4WrZsma655hp99dVX+u1vf6tRo0bphhtuaHc6\n/VPD4+T9yZMnKzs7W2lpaUpNTfXuzvvGG2+oqKhII0aM0LBhw7Ru3bp2dV9//fXtLmxztvc483FD\nQ4OuuOIK9e7du1P/TsDZcHpzwCLGjx+vN954o922jHP585//rCNHjuihhx7qwsoQLugwAIt45JFH\n9Kc//alTyxQXF+u+++7roooQbugwAAA+ocMAAPiEwAAA+ITAAAD4hMAAAPiEwAAA+ITAAAD45P8A\ned0kcNg1PiMAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3, Page no 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Initilization of variables\n", + "w=196 #N/m\n", + "M_app=4000 #N.m\n", + "L=6 #m\n", + "\n", + "#Calculations\n", + "#Taking Moment about Point L and equating it to 0\n", + "R_r=(M_app+w*L*L*0.5)/(3*L) #N\n", + "#Taking Moment about Point R and equating it to 0\n", + "R_l= ((((2*L)+(L/2))*(w*L))-(M_app))/(3*L) #N\n", + "#finding point of zero shear\n", + "a=R_l*w**-1\n", + "#defining x\n", + "x0=[0,18]\n", + "x=[0,0.5,1,1.5,2,2.5,3,3.5,a,4,4.5,5,5.5,6] #for 0" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEPCAYAAAC6Kkg/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xtc1HW+x/HXEKhb5rpqgs2keACDAcQr2sXCC2qeZF0z\nVE6JWdbmmua9zHPCsymYWakdt91Wy602beuRWGs8TI10K8VL2RaWpLjCcOmimCSG6O/8MTmrIuog\n8B3g/Xw8eAS/md9v3vig+cz3+/19v1+bZVkWIiIiXvAzHUBEROofFQ8REfGaioeIiHhNxUNERLym\n4iEiIl5T8RAREa8ZLR6pqalERkYSHR1NUlISP/30E4cOHSI+Pp5OnToxcOBASkpKznp+WFgY4eHh\nrF+/3mByEZHGzWZqnseBAwfo168fe/bsoWnTpowcOZIhQ4bwxRdf0KZNG2bOnMmCBQs4fPgwaWlp\nZGdnk5SUxPbt23G5XAwYMIC9e/fi56fGk4hIXTP2ztuiRQsCAgI4duwYFRUVHDt2jGuvvZa1a9eS\nnJwMQHJyMmvWrAEgPT2d0aNHExAQQHBwMKGhoWRlZZmKLyLSqBkrHq1atWLatGm0b9+ea6+9lpYt\nWxIfH09xcTGBgYEABAYGUlxcDEBBQQEOh8NzvsPhwOVyGckuItLYGSse+/bt49lnn+XAgQMUFBRQ\nWlrKK6+8ctZzbDYbNputymtc6DEREak9/qZeeMeOHdx44420bt0agOHDh/Pxxx8TFBREUVERQUFB\nFBYW0rZtWwDsdjt5eXme8/Pz87Hb7ZWuGxoayr59++rmlxARaSBCQkL4+uuvL/n5xloe4eHhbN26\nlbKyMizLYsOGDTidToYOHcrKlSsBWLlyJcOGDQMgISGBVatWUV5eTm5uLjk5OcTGxla67r59+7As\ny6e+Hn/8ceMZlKlh5VImZarpL28/dBtrecTExDBmzBh69OiBn58f3bp14/777+fo0aMkJiayfPly\ngoODef311wFwOp0kJibidDrx9/dn2bJl6rYSETHEWPEAmDlzJjNnzjzrWKtWrdiwY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C7Pi4+Otw4cPG8+1fPly\nKzQ01Grfvr3nb/3BBx80kqlJkyaef6szdezYsc7vtjpfpvLycuuuu+6yoqKirG7dulnvv/++kUxn\n/k1t377dio2NtWJiYqzevXtbu3btuuh1NElQRES81iC6rUREpG6peIiIiNdUPERExGsqHiIi4jUV\nDxER8ZqKh4iIeE3FQxq1lJQUFi1aBMDjjz/Oxo0bq3xueno6e/bsqatolbzzzjukpKR4dU7//v05\nevRo7QSSRk3FQxq1M9eFmjt3Lv3796/yuW+99RbZ2dl1Eeu8Fi1axIMPPujVOaNGjeKFF16opUTS\nmKl4SKMzb948rr/+evr06cNXX33lKSBjx47lzTffBOCRRx4hMjKSmJgYZsyYwccff8zbb7/NjBkz\n6NatG/v37+eFF14gNjaWLl26MGLECMrKyjzXmTx5MjfddBMhISGeawIsWLCAzp0706VLFx599FHA\nvQbTbbfdRo8ePbjlllv46quvKmXOy8ujvLzcs5ru2LFjmTBhAjfccAMhISFkZmaSnJyM0+nknnvu\n8ZyXkJDAqlWraucfUhq3Wp8LL+JDduzYYUVHR1tlZWXWDz/8YIWGhlqLFi2yLMuyxo4da7355pvW\nd999Z11//fWec44cOXLW46edudTFnDlzrKVLl1qWZVnJyclWYmKiZVmWlZ2dbYWGhlqW5V5C58Yb\nb7TKysosy7I8y4r069fPysnJsSzLsrZu3Wr169evUu7XXnvNmjhxoufnsWPHWqNHj7Ysy7LS09Ot\nq6++2vr888+tU6dOWd27d7c+/fRTz3M7duxolZaWVuvfS6Qq/qaLl0hd2rJlC8OHD6dZs2Y0a9bs\nvAtotmzZkmbNmnHvvfdy++23c/vtt3ses85Yzeef//wnc+bM4ciRI5SWljJ48GDA3RV2erHCiIgI\nz34bGzZsYNy4cZ5FA1u2bElpaSkff/wxd955p+e65eXllTIdPHiQdu3anXXs9BbCUVFRBAUFeRaT\njIyM9KwmC+5VePPy8ggPD/fyX0ukaioe0qjYbLazCoB1ztJulmVxxRVXkJWVxcaNG3njjTd47rnn\nPAPpZ46RjB07lrVr1xIdHc3KlSvJzMz0PNakSZNKr3HuawOcOnWKli1b8sknn1w0+7nnnn4NPz8/\nmjZt6jnu5+dHRUXFWef52p4fUv9pzEMalVtuuYU1a9Zw/Phxjh49yjvvvFPpOT/++CMlJSXcdttt\nPP300+zevRuAq6++mh9++MHzvNLSUoKCgjhx4gSvvPLKRd+g4+PjefHFFz1jI4cPH6ZFixZ07NiR\nN954A3C/0X/22WeVzu3QoYNnDw9vFRcX+8z+NtJwqHhIo9K1a1dGjhxJTEwMQ4YMITY29qzHbTYb\nR48eZejQocTExNCnTx+eeeYZwH3n0sKFC+nevTv79+/n97//Pb169eLmm28mIiKi0nXO/X7QoEEk\nJCTQo0cPunbt6rlF+NVXX2X58uV06dKFqKgo1q5dWyn3TTfdVGmDrPO9xrk/FxUV0bp1a6666iqv\n/p1ELkZLsovUE/369ePVV1+tNPZxIX/605/48ccfmTJlSi0mk8ZILQ+RemL69Ok8//zzXp2zevVq\nxo8fX0uJpDFTy0NERLymloeIiHhNxUNERLym4iEiIl5T8RAREa+peIiIiNdUPERExGv/D7DbLL/n\nhT7EAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of reactions are: R_l= 757.0 N and R_r= 418.0 N\n", + "The point of maximum bending moment is 3.86 meters from left support and maximum bending moment is 1462.0 N.m\n", + "The bending moment and shear force diagrams have been plotted\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4, Page no 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initlization of variables\n", + "F1=2000 #lb\n", + "w=100 #lb/ft\n", + "\n", + "#Calculations\n", + "R_r=(-F1*5+w*14*13)/20 #lb\n", + "R_l=(F1*25+w*14*7)/20 #lb\n", + "#Shear Force matrix\n", + "V=[-2000,-2000,990,990,-410,0] #lb\n", + "#Bending Moment matrix\n", + "B=[0,-10000,-10000,-4060,840,0]\n", + "#Length matrix for shear force\n", + "X_v=[0,5,5.0001,11,20.89999,20.9]\n", + "#Length matrix for bendimg moment\n", + "X_b=[0,4.99,5,11,19.9,20.9]\n", + "g=[0,0,0,0,0,0]\n", + "\n", + "#Plotting of SFD & BMD.\n", + "d=transpose(X_v)\n", + "e=transpose(V)\n", + "plt.plot(d,B)\n", + "xlabel('distance (ft)')\n", + "ylabel('B.M (lb.ft)')\n", + "plt.show()\n", + "plt.plot(X_b,e,X_b,g)\n", + "xlabel('distance (ft)')\n", + "ylabel('S.F (lb)')\n", + "plt.show()\n", + "\n", + "#Result\n", + "print'The bending Moment and Shear Force diagrams have been plotted'\n", + "#Note\n", + "#The textbook does not specify the span and hence there seems to be a disagreement between the textbook and python solution.here the values have just been plotted\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAEPCAYAAAB2s3LUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl0VGWe//F3QeJBByISWjApjmmSQpaEJA0JcVSM0mGJ\nAgqaQMv2A53T9KjYNjbq9ALdYrD7oAcQnFFQkVaiohB0gGHRtAxCwAjKNhohQFIs3exBAwHy/P64\npgwkkWxVt5bP6xwO4db2rWtZ3zzPfe7nOowxBhERES9rYXcBIiISGtRwRETEJ9RwRETEJ9RwRETE\nJ9RwRETEJ9RwRETEJ/yy4ZSUlHDHHXfQo0cP4uPjmT17NgDHjx8nIyODLl260L9/f06ePOl5TE5O\nDi6Xi65du7J69WrP9sLCQhISEnC5XEyaNMnn70VERCx+2XDCw8N54YUX2LlzJ5s2bWLu3Lns3r2b\nGTNmkJGRwddff02/fv2YMWMGALt27eLtt99m165drFq1il/96ldUnV40ceJEFixYQFFREUVFRaxa\ntcrOtyYiErL8suF07NiRpKQkAFq3bk23bt1wu90sX76csWPHAjB27FiWLVsGQF5eHiN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99x21VVX1XiNy18b\noLKykrZt27J169Yr1l79sVe6dosxJqSu7yK+pWM4IvXQt29fli1bxtmzZykrK+PDDz+scZ9vv/2W\nkydPMmjQIJ5//nm++OILANq0acPp06c99ztz5gwdO3bk/Pnz/O1vf7viF3xGRgavvfaa51jPiRMn\niIiI4Kc//SlLliwBrEbx5Zdf1njsjTfe6Ll2S9X9qrRp08ZzWYoqhw4d4sYbb7zS7hBpFDUckXpI\nTk4mOzubxMREMjMzSU1NveR2h8NBWVkZgwcPJjExkdtuu40XXngBgBEjRvDXv/6VXr16sXfvXv78\n5z/Tp08fbr31Vrp161bjeS7/ecCAAQwZMoTevXuTnJzsWY795ptvsmDBApKSkoiPj2f58uU16r7l\nllsuWXVW/QqVkZGR3HLLLSQkJHgWDWzevJm+ffs2dXeJ1EqXJxAJcnfeeSdvvvnmJcdy6vLAAw8w\nefJkkpOTfVCZhBqNcESC3OTJk/nP//zPK97vH//4BydPnlSzEa/RCEdERHxCIxwREfEJNRwREfEJ\nNRwREfEJNRwREfEJNRwREfEJNRwREfGJ/w8O2MrLmuo6XgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEPCAYAAACKplkeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9cFPW+x/HXKpiVv03Rdj1isoQYIspFzTT8ASopZZY/\nSsXSRx29pWU/9HbspPfc/HG7lqZx+oVF1lHSUtSjHH8UZd2Sm1K3Gz1qU1FAoNQ0NMvUuX/McRUR\nFdvdWXbfz8fDBzC7s/uZadr3zsxnvmMzDMNARETEA+pYXYCIiAQOhYqIiHiMQkVERDxGoSIiIh6j\nUBEREY9RqIiIiMdYGir33nsvYWFhxMTEuKcdPHiQpKQkIiMjSU5O5tChQ+7H5syZg9PpJCoqio0b\nN7qnb9++nZiYGJxOJ1OmTPHpMoiIyBmWhso999xD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CdMmBA028Zvv/3G\nsGHDGDNmDLfddhsQvNvF6XUxevRo97qo6XYR8KESHx+Py+WisLCQ48ePk5WVRWpqqtVlWeLnn3+m\noqICgKNHj7Jx48ZK3T/B6PTFswCZmZnu/5GCUWlpqfv3VatWBcW2YRgG48ePJzo6moceesg9PRi3\ni+rWRY23CyMIrF+/3oiMjDTat29vzJ492+pyLLNr1y4jNjbWiI2NNTp27Bh062LkyJFG69atjdDQ\nUMPhcBhLliwxDhw4YPTr189wOp1GUlKS8eOPP1pdpk+cuy4yMjKMMWPGGDExMUanTp2MW2+91Sgr\nK7O6TK/bunWrYbPZjNjYWKNz585G586djQ0bNgTldnG+dbF+/foabxcB31IsIiK+E/CHv0RExHcU\nKiIi4jEKFRER8RiFioiIeIxCRUREPEahIiIiHqNQEbmAmTNnMn/+fACeeuqpSre/Pld2djZff/21\nr0qrYt26dcycOROAH374gW7dutG1a1c++ugj/vrXv7qfV15eTkpKikVVSqBTqIhcwNljPs2aNava\n21WDebVxQUGBL8o6r/nz5zNx4kQAtmzZQqdOndi+fTsOh8N9Z1UwhyBp2rQpO3bssKpUCWAKFZFz\nPP3001x//fX06tWLb775xh0s48aN45133gFg+vTpdOzYkdjYWB577DE++eQT1q5dy2OPPUaXLl3Y\ntWsXr7zyCgkJCXTu3Jk77riDY8eOuV9nypQp9OzZk/bt27tfE2DevHl06tSJzp0782//9m8A7Ny5\nk0GDBhEfH0/v3r355ptvqtRcVFTE8ePHCQsL4/PPP2fatGlkZ2cTFxfH9OnT2blzJ3FxcUybNg0w\nhyFZtmyZV9ejBCmfXP8vUkt89tlnRkxMjHHs2DHjp59+MiIiIoz58+cbhmEY48aNM9555x1j//79\nxvXXX++e5/Dhw5UeP+3AgQPu32fMmGEsWrTIMAzDSEtLM4YPH24YhmEUFBQYERERhmGYwwndeOON\nxrFjxwzDMNxDg/Tt29dwuVyGYRjGp59+avTt27dK3cuWLTMeeOAB99+vv/668eCDDxqGYRiFhYXG\nDTfcUOn5u3btMhISEmq8fkQuJsTqUBPxJ1u3buX222+nfv361K9f/7yDjzZp0oT69eszfvx4Bg8e\nzODBg92PGWeNevTll18yY8YMDh8+zJEjRxg4cCBgHlI7PUBhhw4d3Pfq2Lx5M/feey/169d3v8+R\nI0f45JNPuPPOO92ve/z48So17d271z0C9ek6TtdinGckptatW1NYWHjJ60XkUilURM5is9kqfQif\n+4FsGAZ169YlLy+PLVu2sHLlShYvXuw+gX/2OZhx48axZs0aYmJiyMzMJDc31/1YvXr1qrzHue8N\ncOrUKZo0aUJ+fv5Faz973ovd/8MwjKC6R4j4js6piJyld+/erF69ml9++YWKigrWrVtX5TlHjx7l\n0KFDDBo0iGeffZYvvvgCgIYNG/LTTz+5n3fkyBFatWrFb7/9xptvvnnRD/GkpCRee+0197mXH3/8\nkUaNGtGuXTtWrlwJmGHwv//7v1Xmbdu2rfv+H6efd1rDhg3dtzw4rbS0lLZt215sdYjUmEJF5Cxx\ncXGMGDGC2NhYUlJSSEhIqPS4zWajoqKCIUOGEBsbS69evXjuuecAGDlyJM888wxdu3Zl165d/OUv\nf6Fbt27cdNNNdOjQocrrnPv7gAEDSE1NJT4+nri4OHcr81tvvUVGRgadO3fmhhtuYM2aNVXq7tmz\nZ6VurrPvVti8eXN69uxJTEyM+0R9Xl4evXv3/r2rS6QKDX0vEiD69u3LW2+9VencSnXuvvtuHn30\nUeLi4nxQmQQT7amIBIhHH32UF1988aLP+/777zl06JACRbxCeyoiIuIx2lMRERGPUaiIiIjHKFRE\nRMRjFCoiIuIxChUREfEYhYqIiHjM/wMjUibUs6KdhgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bending Moment and Shear Force diagrams have been plotted\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter9.ipynb b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter9.ipynb new file mode 100755 index 00000000..6076d159 --- /dev/null +++ b/Engineering_Mechancis,_Schaum_Series_by_McLean/chapter9.ipynb @@ -0,0 +1,889 @@ +{ + "metadata": { + "name": "chapter 9.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 9: FRICTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1, Page no 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Calculations\n", + "#Simplifying equation (3) after substituting value of Nb in it we get\n", + "#m_u**2+m_u*2*tan(50)-1=0\n", + "#Solution of the equation\n", + "a=1\n", + "b=2*1.19175 # here 1.19175 is value of tan(50)\n", + "c=-1\n", + "g=(b**2-(4*a*c))**0.5\n", + "\n", + "#solution\n", + "x1=(-b+g)/(2*a)\n", + "x2=(-b-g)/(2*a)\n", + "#As x2 does not make any physical sense x1 is the answer\n", + "\n", + "#Result\n", + "print'The value of mu is',round(x1,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of mu is 0.36\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3, Page no 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "m=70 #kg\n", + "g=9.81 #m/s**2\n", + "# as theta=20 degrees, we have\n", + "sintheta=0.3420\n", + "costheta=0.9396\n", + "\n", + "#Calculations\n", + "#Solving by martix method\n", + "#Taking sum along vertical and horizontal direction and equating them to zero\n", + "A=np.array([[sintheta,1,0],[-costheta,0,1],[0,-4**-1,1]])\n", + "#RHS matrix\n", + "R=np.array([[m*g],[0],[0]])\n", + "ans1=np.linalg.solve(A,R) #force vector N\n", + "#Calculation part 2\n", + "#Similar solution by matrix method\n", + "#Taking moment about point O and summing forces in horizontal and vertical direction and equating all to zero\n", + "B=np.array([[4*costheta,0,0],[-costheta,1,0],[sintheta,0,1]])\n", + "#RHS matrix\n", + "J=np.array([[m*g*1.5],[0],[m*g]])\n", + "ans2=np.linalg.solve(B,J) #force Vector N\n", + "\n", + "#Result\n", + "print'The value of P in first case is',round(ans1[0]),\"N\",'and that in second case is',round(ans2[0]),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P in first case is 167.0 N and that in second case is 274.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-4, Page no 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "W=200 #lb\n", + "Fapp=300 #lb\n", + "mu=0.3 #coefficient of friction\n", + "# as theta=30 degrees, we have\n", + "sintheta=2**-1\n", + "costheta=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "#Summing forces in the plane parallel to the slope\n", + "F=-(W*sintheta-Fapp*costheta) #lb\n", + "N1=(W*costheta+Fapp*sintheta) #lb\n", + "#Max value obtained\n", + "Fprime= mu*N1\n", + "\n", + "#Result\n", + "print'The value of F is',round(F),\"lb\"\n", + "print'The value of N1 is',round(N1),\"lb\"\n", + "print'The value of Fprime is',round(Fprime),\"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of F is 160.0 lb\n", + "The value of N1 is 323.0 lb\n", + "The value of Fprime is 97.0 lb\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5, Page no 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "mu1=0.2 #coefficient of friction between wedges and A\n", + "mu2=4**-1 #coefficient of friction between wedges \n", + "F=20 #tonnes\n", + "\n", + "#Calculations\n", + "#Using the matrix method to solve\n", + "#Summing forces in vertical and horizontal direction\n", + "A=np.array([[1,-(mu1*10+1)/(101)**0.5],[0,(10-mu1*1)/101**0.5]]) #force matrix\n", + "B=np.array([[mu2*F*1000],[F*1000]]) #lb\n", + "#Solving both matrices\n", + "R=np.linalg.solve(A,B) #lb\n", + "\n", + "#Result\n", + "print'The forces N2 and P are:',round(R[1]),\"lb\",'and',round(R[0]),\"lb\"\n", + "#Decimal accuracy causes discrepancy in answers\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces N2 and P are: 20510.0 lb and 11122.0 lb\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6, Page no 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "# as theta=45 degrees,we have\n", + "sintheta=sqrt(2)**-1\n", + "costheta=sqrt(2)**-1\n", + "mu1=4**-1 #coefficient of friction between A and B\n", + "mu2=3**-1 #coefficient of friction between A and Floor\n", + "ma=14 #kg\n", + "mb=9 #kg\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "#Summing forces in vertical direction\n", + "Nb=mb*g #N\n", + "#Also\n", + "Fprimeb=mu1*Nb #N\n", + "#Summing forces in direction\n", + "T=Fprimeb #N\n", + "#Considering the fig(c)\n", + "#Summing forces in the horizontal direction and vertical direction and solving by matrix method \n", + "A=np.array([[-costheta,mu2],[sintheta,1]]) #N\n", + "B=np.array([[-Fprimeb],[(mb*g+ma*g)]]) #N\n", + "R=np.linalg.solve(A,B) #N\n", + "\n", + "#Result\n", + "print'The value of P and Na are:',round(R[0]),\"N\",'and',round(R[1]),\"N respectively.\"\n", + "\n", + "# The ans may wary due o decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P and Na are: 103.0 N and 153.0 N respectively.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-7, Page no 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "m1=40 #kg\n", + "m2=13.5 #kg\n", + "mu=3**-1 #coefficient of friction\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "#Solving by substitution\n", + "#After simplification we get\n", + "x=mu*m2*g\n", + "y=mu*(m1*g+m2*g)\n", + "theta=arctan((x+y)/(m1*g))*(180/pi) #degrees\n", + "\n", + "#Result\n", + "print'The value of the angle is',round(theta,1),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the angle is 29.2 degrees\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-8, Page no 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initilization of variables\n", + "W=350 #lb\n", + "# as theta=30 degrees, we have\n", + "sintheta=2**-1\n", + "costheta=sqrt(3)*2**-1\n", + "# and phi=15 degrees,thus\n", + "sinphi=0.2588\n", + "cosphi=0.9659\n", + "\n", + "#Calculations\n", + "#Solving by the matrix method\n", + "A=np.array([[costheta,sinphi],[-sintheta,cosphi]])\n", + "B=np.array([[W*sintheta],[W*costheta]])\n", + "an=np.linalg.solve(A,B) #lb\n", + "\n", + "#Result\n", + "print'The value of P and R are:',round(an[0],1),\"lb\",'and',round(an[1],1),\"lb respectively.\"\n", + "\n", + "# The ans may wary due to decimal point descrepancy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of P and R are: 93.8 lb and 362.4 lb respectively.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-9, Page no 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "# as theta=45 degrees, we have\n", + "sintheta=sqrt(2)**-1\n", + "costheta=sqrt(2)**-1\n", + "m1=45 #kg\n", + "m2=135 #kg\n", + "g=9.81 #m/s**2\n", + "mu=0.25 #coefficient of riction\n", + "\n", + "#Calculations\n", + "N2=m2*g #N\n", + "T=mu*N2 #N\n", + "N1=m1*g*costheta #N\n", + "Fprime1=N1*mu #N\n", + "P=T+Fprime1-(m1*g*sintheta) #N\n", + "\n", + "#Result\n", + "print'The values are'\n", + "print'N2=',round(N2),\"N\"\n", + "print'T=',round(T),\"N\"\n", + "print'N1=',round(N1),\"N\"\n", + "print'Fprime1=',round(Fprime1),\"N\"\n", + "print'P=',round(P,1),\"N\"\n", + "\n", + "# The ans may wary due to decimal point descrepancy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values are\n", + "N2= 1324.0 N\n", + "T= 331.0 N\n", + "N1= 312.0 N\n", + "Fprime1= 78.0 N\n", + "P= 97.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10, Page no 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "mu=0.2 #coefficient of friction\n", + "F1=150 #lb\n", + "F2=100 #lb\n", + "# as theta=60 degrees\n", + "costheta=2**-1\n", + "# also theta1=30 degrees\n", + "costheta1=sqrt(3)*2**-1\n", + "\n", + "#Calculations\n", + "N1=F1*costheta #lb\n", + "T=(mu*N1)+(F1*(costheta1)) #lb considering positive\n", + "#Equilibrium for 100lb\n", + "#Eliminating N2 from both equations\n", + "#Taking derivative we get\n", + "theta2=arctan(mu)*(180/pi) #degrees\n", + "#Hence P becomes\n", + "# in calculation of P we use the values of sin(theta2) & cos(theta2) as,\n", + "sintheta2=0.196\n", + "costheta2=0.98\n", + "P=(F2*mu+T)*(costheta2+(mu*sintheta2))**-1 #lb\n", + "\n", + "#Result\n", + "print'The minimum value of P is',round(P),\"lb\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum value of P is 162.0 lb\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-11, Page no 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "F=180 #N\n", + "m=100 #kg\n", + "g=9.81 #m/s**2\n", + "mu=0.25 #coeffiecient of friction\n", + "\n", + "#Calculations\n", + "#Assuming F2 is maximum\n", + "N2=F*2/(1+mu) #N\n", + "F2=mu*N2 #N\n", + "N1=m*g-F2 #N\n", + "F1=F-F2 #N\n", + "\n", + "#Result\n", + "print'The vaules are'\n", + "print'N2=',round(N2,3),\"N\"\n", + "print'F2=',round(F2,3),\"N\"\n", + "print'N1=',round(N1,3),\"N\"\n", + "print'F1=',round(F1,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The vaules are\n", + "N2= 288.0 N\n", + "F2= 72.0 N\n", + "N1= 909.0 N\n", + "F1= 108.0 N\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13, Page no 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "mu_ca=0.3 #ceofficient of friction between copper block A and aluminium block B\n", + "mu_af=0.2 #coefficient of friction between aluminium block B and Floor\n", + "ma=3 #kg\n", + "mb=2 #kg\n", + "g=9.81 #m/s**2\n", + "\n", + "#Calculations\n", + "#For A\n", + "#Taking sum of forces along X and Y direction\n", + "Na=ma*g #N\n", + "P=mu_ca*Na #N\n", + "#For B\n", + "#Taking sum of forces along X and Y direction\n", + "Nb=Na+mb*g #N\n", + "Fb=mu_ca*Na #N\n", + "#Now largest value of friction before slip is \n", + "Fprimeb=mu_af*Nb #N\n", + "#Now as Fb" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_10.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_10.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0uXLon4+HhRWlrabJmysjLR0NAghBBi7969YuDAgS6v+/OJZWclaMoLL7ygugSfwX3RhPui\nCfdFk45kp9Mj/qCgIOTl5SEtLQ0OhwNZWVkwmUzIz88HAOTk5ODDDz/Ee++9B71ej+uuuw5r1651\nui4REanlNPgBYPz48Rg/fn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FycjJOnTqF3j/PSd27d2+cOnVKcXWe\n98wzz+DVV19Fp05Nfx21uB/Ky8sRGhqKRx55BDfddBOys7NRXV2tyX3Rs2dPzJo1C/3790e/fv3Q\nvXt3pKamanJfXHa1737ixIlmrfKuZKmy4Hf14rBAd+HCBdx7771YtGgRunXr1uw9nU4X8Pvpk08+\nQa9evZCQkHDVCwG1sB8AoL6+Hvv27cP06dOxb98+BAcHXzGUoZV98e2332LhwoWoqKjAiRMncOHC\nBaxcubLZMlrZFy1p7bu3tl+UBb8rF4cFurq6Otx7772YOnUq7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_11.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_11.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/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q7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_12.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_12.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2Noq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du/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb new file mode 100644 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_13.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0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fYa0L8/cN99qishImofztXTBmVlwIgRwJdfymmXiYhU4a0XvUAIeTet559n6BORf2Pwu2jlSuDM\nGdnCSUTkzzjU44IffgCGDAE++QRITFRdDRERb73ocQ8/LDt43nhDdSVERBLn4/egrVuBbdvYs09E\ngYNj/E5cvChP6F6edpmIKBAw+J146SUgPh6YOFF1JURE7sMx/qs4eBBISQG+/hro1091NUREzbGP\n380aGuS0DC++yNAnosDD4G/BO+/IP3Ny1NZBROQJHOr5lZMngbg42ckzZIjqaoiIWsY+fje67z4g\nKkqe2CUi8lXs43eTTz4BSkqAFStUV0JE5DkM/p9duAA88QSwbBnQtavqaoiIPIdDPT/7wx+AH3/k\n0T4R+QcO9XTQ3r3AqlWcloGItEHz7Zz19UB2NvDqq8CNN6quhojI8zQf/IsXAz17AlOnqq6EiMg7\nND3G/913wM03A8XFsoWTiMhfcMqGdhBCdvE88wxDn4i0RbMnd//xD6CiAli3TnUlRETepcmhnqoq\nYPBgGf6jRnn1o4mI3IJTNrTR448DOh3w9tte/VgiIrdhH38bfP458PHH7NknIu3S1Mnd2lo51fKi\nRUD37qqrISJSQ1PB/8orwMCBwL33qq6EiEgdzYzxHzkiT+Tu2wf07+/xjyMi8ij28bdCCHlC989/\nZugTEbUa/GazGTExMYiKikJubm6Ly8yYMQNRUVGIj49HSUlJ4+vh4eGIi4tDQkIChg8f7r6q22jF\nCuDcOeCpp5SVQETkM5x29TgcDjz55JMoKiqCwWBAUlIS0tPTYTKZGpfZtGkTysrKcPToUezZswfT\npk3D7t27Acj/ilgsFvTs2dOz38KJ06eBZ58FNm8GOndWVgYRkc9wesRvtVoRGRmJ8PBw6PV6ZGZm\norCwsNkyGzZswEMPPQQASE5ORlVVFU6dOtX4vuq59mfNkhOw3XST0jKIiHyG0+C32+0ICwtrfG40\nGmG3211eRqfTYezYsUhMTMTSpUvdWbdLPvsM2L4dmDvX6x9NROSznA716HQ6lzZytaP6zz//HP36\n9cPp06eRmpqKmJgYjB49uu1VtsPFi8C0acCSJ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iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb new file mode 100644 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_14.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0uXLon4+HhRWlrabJmysjLR0NAghBBi7969YuDAgS6v+/OJZWclaMoLL7ygugSfwX3RhPui\nCfdFk45kp9Mj/qCgIOTl5SEtLQ0OhwNZWVkwmUzIz88HAOTk5ODDDz/Ee++9B71ej+uuuw5r1651\nui4REanlNPgBYPz48Rg/fnyz13Jychofz549G7Nnz3Z5XSIiUotX7vqQlJQU1SX4DO6LJtwXTbgv\n3MPpBVxeKUCnYxcQEVEbdSQ7ecRPRKQxDH4iIo1h8BMRaUyrXT1EROQbfvoJOHlS/nQEg5+ISLGa\nmq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4Hf14rBAd+HCBdx7771YtGgRunXr1uw9nU4X8Pvpk08+\nQa9evZCQkHDVCwG1sB8AoL6+Hvv27cP06dOxb98+BAcHXzGUoZV98e2332LhwoWoqKjAiRMncOHC\nBaxcubLZMlrZFy1p7bu3tl+UBb8rF4cFurq6Otx7772YOnUq7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb new file mode 100644 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_15.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\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pIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_2.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_2.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc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MEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_3.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_3.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0uXLon4+HhRWlrabJmysjLR0NAghBBi7969YuDAgS6v+/OJZWclaMoLL7ygugSfwX3RhPui\nCfdFk45kp9Mj/qCgIOTl5SEtLQ0OhwNZWVkwmUzIz88HAOTk5ODDDz/Ee++9B71ej+uuuw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pooLi52um1lR/yuXBymFRUVFSgpKUFycjJOnTqF3j/PSd27d2+cOnVKcXWe\n98wzz+DVV19Fp05Nfx21uB/Ky8sRGhqKRx55BDfddBOys7NRXV2tyX3Rs2dPzJo1C/3790e/fv3Q\nvXt3pKamanJfXHa1737ixIlmrfKuZKmy4Hf14rBAd+HCBdx7771YtGgRunXr1uw9nU4X8Pvpk08+\nQa9evZCQkHDVCwG1sB8AoL6+Hvv27cP06dOxb98+BAcHXzGUoZV98e2332LhwoWoqKjAiRMncOHC\nBaxcubLZMlrZFy1p7bu3tl+UBb8rF4cFurq6Otx7772YOnUq7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_4.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_4.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAA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3tl+UBb8rF4cFurq6Otx7772YOnUq7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_5.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_5.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6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wBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_6.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_6.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQE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qVMnLFq0CKWlpbjuuutaXNff\nvfYa0L8/cN99qishImofztXTBmVlwIgRwJdfymmXiYhU4a0XvUAIeTet559n6BORf2Pwu2jlSuDM\nGdnCSUTkzzjU44IffgCGDAE++QRITFRdDRERb73ocQ8/LDt43nhDdSVERBLn4/egrVuBbdvYs09E\ngYNj/E5cvChP6F6edpmIKBAw+J146SUgPh6YOFF1JURE7sMx/qs4eBBISQG+/hro1091NUREzbGP\n380aGuS0DC++yNAnosDD4G/BO+/IP3Ny1NZBROQJHOr5lZMngbg42ckzZIjqaoiIWsY+fje67z4g\nKkqe2CUi8lXs43eTTz4BSkqAFStUV0JE5DkM/p9duAA88QSwbBnQtavqaoiIPIdDPT/7wx+AH3/k\n0T4R+QcO9XTQ3r3AqlWcloGItEHz7Zz19UB2NvDqq8CNN6quhojI8zQf/IsXAz17AlOnqq6EiMg7\nND3G/913wM03A8XFsoWTiMhfcMqGdhBCdvE88wxDn4i0RbMnd//xD6CiAli3TnUlRETepcmhnqoq\nYPBgGf6jRnn1o4mI3IJTNrTR448DOh3w9tte/VgiIrdhH38bfP458PHH7NknIu3S1Mnd2lo51fKi\nRUD37qqrISJSQ1PB/8orwMCBwL33qq6EiEgdzYzxHzkiT+Tu2wf07+/xjyMi8ij28bdCCHlC989/\nZugTEbUa/GazGTExMYiKikJubm6Ly8yYMQNRUVGIj49HSUlJ4+vh4eGIi4tDQkIChg8f7r6q22jF\nCuDcOeCpp5SVQETkM5x29TgcDjz55JMoKiqCwWBAUlIS0tPTYTKZGpfZtGkTysrKcPToUezZswfT\npk3D7t27Acj/ilgsFvTs2dOz38KJ06eBZ58FNm8GOndWVgYRkc9wesRvtVoRGRmJ8PBw6PV6ZGZm\norCwsNkyGzZswEMPPQQASE5ORlVVFU6dOtX4vuq59mfNkhOw3XST0jKIiHyG0+C32+0ICwtrfG40\nGmG3211eRqfTYezYsUhMTMTSpUvdWbdLPvsM2L4dmDvX6x9NROSznA716HQ6lzZytaP6zz//HP36\n9cPp06eRmp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EdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_7.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_7.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0uXLon4+HhRWlrabJmysjLR0NAghBBi7969YuDAgS6v+/OJZWclaMoLL7ygugSfwX3RhPui\nCfdFk45kp9Mj/qCgIOTl5SEtLQ0OhwNZWVkwmUzIz88HAOTk5ODDDz/Ee++9B71ej+uuuw5r1651\nui4REanlNPgBYPz48Rg/fnyz13Jychofz549G7Nnz3Z5XSIiUotX7vqQlJQU1SX4DO6LJtwXTbgv\n3MPpBVxeKUCnYxcQEVEbdSQ7ecRPRKQxDH4iIo1h8BMRaUyrXT1EROQ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3pKamanJfXHa1737ixIlmrfKuZKmy4Hf14rBAd+HCBdx7771YtGgRunXr1uw9nU4X8Pvpk08+\nQa9evZCQkHDVCwG1sB8AoL6+Hvv27cP06dOxb98+BAcHXzGUoZV98e2332LhwoWoqKjAiRMncOHC\nBaxcubLZMlrZFy1p7bu3tl+UBb8rF4cFurq6Otx7772YOnUq7rnnHgDyN3llZSUA4OTJk+jVq5fK\nEj1u165d2LBhAwYMGID7778fW7duxdSpUzW3HwB5pGY0GpGUlAQAmDx5Mvbt24c+ffpobl98+eWX\nGDVqFEJCQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_8.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_8.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdE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CQhAUFIRJkyahuLhYk/visqv9m2jpIlqDweB0W8qC/5cXh9XW1qKgoADp6emqyvE6IQSy\nsrIQGxuLmTNnNr6enp6OFStWAABWrFjR+AshUL388suw2WwoLy/H2rVrcccdd+D999/X3H4AgD59\n+iAsLAxVk1+nAAABIUlEQVRHjhwBABQVFWHw4MGYOHGi5vZFTEwMdu/ejYsXL0IIgaKiIsTGxmpy\nX1x2tX8T6enpWLt2LWpra1FeXo6jR49i+PDhzjfm7hMSbbFp0yYxaNAgERERIV5++WWVpXjdjh07\nhE6nE/Hx8WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_9.ipynb new file mode 100755 index 00000000..666bcf43 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_9.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "chapter8.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Simple Lifting Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-1,Page No:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "VR=6 # Velocity ratio\n", + "P=20 #N # Effort\n", + "W=100 #N # Load lifted\n", + "\n", + "# Calculations\n", + "\n", + "#(a)\n", + "\n", + "P_actual=P #N\n", + "W_actual=W #N\n", + "MA=W/P # where, MA= Mechanical advantage\n", + "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n", + "\n", + "#(b)\n", + "# Now ideal effort required is,\n", + "P_ideal=W*VR**-1 #N\n", + "# Effort loss in friction is, (Le)\n", + "Le=P_actual-P_ideal #N # Effort loss in friction\n", + "\n", + "#(c)\n", + "# Ideal load lifted is,(W_ideal)\n", + "W_ideal=P*VR #N \n", + "# Frictional load/resistance,\n", + "F=W_ideal-W_actual # N\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n", + "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n", + "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The efficiency of the machine is 83.3 percent\n", + "(b) The effort loss in friction of the machine is 3.33 N\n", + "(c) The Frictional load of the machine is 20.0 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-2, Page No:180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "V_r=20 # Velocity ratio\n", + "# Values from the table # Variables have been assumed\n", + "# Values of W in N\n", + "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n", + "# P in N\n", + "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n", + "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n", + "# Efficiency (n)\n", + "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n", + "# Calculations\n", + "# Part (a)- Realtionship between W & P\n", + "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n", + "# Part (b)- Graph between W & efficiency n(eta)\n", + "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n", + "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n", + "d=transpose(x)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "\n", + "# Results\n", + "\n", + "print\"The graph is the solution\"\n", + "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n", + "# The curve of the graph may differ from textbook because of the graphical calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j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WLYsGFi2LBhYvPmzeLHH38UY8aMEVFRUSI1NVWcPXtWdaleY7FYxMSJE4UQQrP74auv\nvhKJiYkiLi5OZGRkiKqqKs3ui9zcXBEbGyuGDBkiHnzwQVFbW6uZfZGZmSn69u0r9Hq9MBqNYtmy\nZU6/+0svvSQiIiJEdHS0MJvNrW6fF3AREWmMT91zl4iIPI/BT0SkMQx+IiKNYfATEWkMg5+ISGMY\n/EREGsPgJyLSGAY/EZHG/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graph is the solution\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-3,Page No:184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initialization of variables\n", + "\n", + "W_actual=1360 #N #Load lifted\n", + "P_actual=100 #N # Effort\n", + "n=4 # no of pulleys\n", + "\n", + "# Calculations\n", + "\n", + "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n", + "VR=2**(n) # Velocity Ratio\n", + "\n", + "# If the machine were to be ideal(frictionless)\n", + "MA=VR # Here, M.A= mechanical advantage \n", + "\n", + "# For a load of 1360 N, ideal effort required is\n", + "P_ideal=W_actual/VR #N\n", + "\n", + "# Effort loss in friction is,\n", + "P_friction=P_actual-P_ideal #N\n", + "\n", + "# For a effort of 100 N, ideal load lifted is,\n", + "W_ideal=VR*100 #N \n", + "\n", + "# Load lost in friction is,\n", + "W_friction=W_ideal-W_actual # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n", + "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The effort wasted in friction is 15.0 N\n", + "(b) The load wasted in friction is 240.0 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-4,Page No:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 #N # Load to be lifted\n", + "n=5 # no. of pulleys\n", + "E=75 #% # Efficiency\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity Ratio is given as,\n", + "VR=n \n", + "\n", + "# Mechanical Advantage (MA) is,\n", + "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n", + "P=W/MA #N # Effort required\n", + "\n", + "# Results\n", + "\n", + "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The effort required to lift the load of 1000 N is 266.67 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8-5,Page No:191 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=2000 #N # Load to be raised\n", + "l=0.70 #m # length of the handle\n", + "d=0.05 #m # diameter of the screw\n", + "p=0.01 #m # pitch of the screw\n", + "mu=0.15 # coefficient of friction at the screw thread\n", + "pie=3.14 #constant\n", + "E=1 # efficiency\n", + "\n", + "# Calculations\n", + "\n", + "phi=arctan(mu)*(180/pi) #degree\n", + "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n", + "\n", + "# Force required at the circumference of the screw is,\n", + "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n", + "\n", + "# Force required at the end of the handle is,\n", + "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n", + "\n", + "# Force required (Ideal case)\n", + "VR=2*pie*l/p\n", + "MA=E*VR # from formulae E=M.A/V,R\n", + "P_ideal=W/MA #N # From formulae, M.A=W/P\n", + "\n", + "# Results\n", + "\n", + "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n", + "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force required at the end of the handle is 15.41 N\n", + "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_1.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_1.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_10.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_10.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_11.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_11.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_12.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_12.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb new file mode 100644 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_13.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb new file mode 100644 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_14.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb new file mode 100644 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_15.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_2.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_2.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_3.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_3.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_4.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_4.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_5.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_5.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_6.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_6.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_7.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_7.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_8.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_8.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_9.ipynb new file mode 100755 index 00000000..aa9e114b --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_9.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "chapter09.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analysis Of Plane Trusses And Frames" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-1,Page No:198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N # load at joint D of the truss\n", + "W2=4000 #N # load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n", + "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n", + "\n", + "# (1) JOINT A\n", + "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n", + "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n", + "\n", + "# (2) JOINT C\n", + "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n", + "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n", + "\n", + "# (3) JOINT D\n", + "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n", + "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n", + "\n", + "# (4) JOINT E\n", + "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n", + "\n", + "# Results\n", + "\n", + "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n", + "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n", + "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n", + "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n", + "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n", + "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Axial Force in member AD (Fad) is 2887.0 N\n", + "The Axial Force in member AB (Fab) is 1443.0 N\n", + "The Axial Force in member CE (Fce) is 4041.0 N\n", + "The Axial Force in member CB (Fcb) is 2020.7 N\n", + "The Axial Force in member DB (Fdb) is 577.0 N\n", + "The Axial Force in member DE (Fde)is 1732.0 N\n", + "The Axial Force in member EB (Feb) is 577.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-2,Page No:201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2000 #N (or 2 kN)# load at joint D of the truss\n", + "W2=4000 #N (or 4 kN)# load at joint E of the truss\n", + "Lac=6 #m # length of the tie\n", + "Lab=3 #m\n", + "Lbc=3 #m\n", + "theta=60 #degree # interior angles of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n", + "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n", + "Ra=W1+W2-Rc #N # Take sum Fy=0\n", + "\n", + "# Calculations\n", + "\n", + "# Calculating the axial forces in the respective members by METHOD OF SECTION\n", + "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n", + "# Take moment about B\n", + "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DE (Fde)is 1732.0 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-3,Page No:202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 #kN # load on the truss at joint D\n", + "theta=45 #degree # angle made by the members AC & BD with the horizontal\n", + "Lab=1 #m \n", + "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# (1) JOINT E\n", + "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n", + "Fec=0\n", + "Fed=0\n", + "\n", + "# (2) JOINT D\n", + "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n", + "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "\n", + "# (3) JOINT C\n", + "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n", + "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n", + "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n", + "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n", + "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n", + "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n", + "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n", + "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member DC (Fdc) is 1.0 kN\n", + "The axial force in the member DB (Fdb) is 1.0 kN\n", + "The axial force in the member CA (Fca) is 1.41 kN\n", + "The axial force in the member CB (Fcb) is -1.0 kN\n", + "The axial force in the member EC (Fec) is 0.0 kN\n", + "The axial force in the member ED (Fed) is 0.0 kN\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-5,Page No:206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=1000 #N # Load acting at the end pannels and the ridge\n", + "W2=2000 #N # Load acting at the intermidiate pannels\n", + "Laf=1 #m\n", + "Lgf=1 #m\n", + "Lag=2 #m\n", + "Lbg=1 #m\n", + "Lab=3 #m\n", + "theta=30 #degree # angle made by the principal rafter with the tie beam\n", + "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n", + "\n", + "# Calculations\n", + "\n", + "# consider the equilibrium of the entire truss as a F.B.D\n", + "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n", + "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n", + "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n", + "\n", + "# Take moment about C\n", + "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n", + "\n", + "# Take moment about G\n", + "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n", + "\n", + "# Take moment about B\n", + "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n", + "\n", + "# Results \n", + "\n", + "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n", + "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n", + "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member FG (Ffg) is 2000.0 N\n", + "The axial force in the member CE (Fce) is -2309.0 N\n", + "The axial force in the member CG (Fcg) is 0.0 N\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-6,Page No:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=100 #N # load acting at pt. C vertically\n", + "W2=50 #N # load acting at point B horizontaly\n", + "L=2 #m # length of each bar in the hexagonal truss\n", + "theta=60 #degree # internal angle of the truss\n", + "\n", + "# Calculations\n", + "\n", + "# We calculate the values of different members of the truss\n", + "HG=L*sin(theta*(pi/180))\n", + "AF=L\n", + "\n", + "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n", + "Rf=(W2*HG)/AF #N # moment at F\n", + "Xa=W2 #N # sum Fx=0\n", + "Ya=W1-Rf #N # sum Fy=0\n", + "\n", + "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n", + "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n", + "\n", + "# Now pass a scetion pq cutting the members CB,GB & GA\n", + "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n", + "\n", + "# take moment about G\n", + "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n", + "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n", + "\n", + "# Results\n", + "\n", + "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n", + "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The axial force in the member CD (Fcd) is 25.0 N\n", + "The axial force in the member GB (Fgb) is 32.74 N\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-10,Page No:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=24 # kN # Load acting at pt C\n", + "Laf=12 # m # length of the tie beam\n", + "l=4 # m# length of each member in the tie\n", + "h=3 # m # height of the slings\n", + "Lae=8 # m\n", + "\n", + "# Calculations\n", + "\n", + "s=((l**2)+(h**2))**0.5 # m # sloping length \n", + "\n", + "# From triangle BCD,\n", + "theta=arccos(h/s)*(180/pi)\n", + "\n", + "# SUPPORT REACTIONS\n", + "Rf=(W*l)/Laf # kN # take moment at A\n", + "Ra=W-Rf # kN # sum Fy=0\n", + "\n", + "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n", + "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n", + "\n", + "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n", + "\n", + "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n", + "\n", + "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n", + "\n", + "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n", + "\n", + "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n", + "\n", + "# Resuts\n", + "\n", + "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n", + "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n", + "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n", + "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n", + "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n", + "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The axial force in the bar CE (Fce) is 21.33 kN\n", + "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n", + "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n", + "(4) The axial force in the bar CE (Fce) is 10.67 kN\n", + "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n", + "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-12,Page No:224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=4 # kN # load acting at a distance of 5 m from C\n", + "W2=3 # kN # load acting at a distance of 7.5 m from C\n", + "L=30 #m # distance AB\n", + "L1=15 # dist AC\n", + "L2=15 #m #dist BC\n", + "l1=10 #m # distance between A and 4 kN load\n", + "l2=22.5 #m # distance between A and 3 kN load\n", + "\n", + "# Calculations\n", + "\n", + "# (1) Reactions\n", + "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# Xa=Xb........(eq'n 1) // sum Fx=0\n", + "# (2) Dismember\n", + "# Member AC. Consider equilibrium of member AC\n", + "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Take moment about A\n", + "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n", + "\n", + "# now from eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# The components of reactions at A & B are,\n", + "Ra=(Xa**2+Ya**2)**0.5 # kN\n", + "Rb=(Xb**2+Yb**2)**0.5 # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n", + "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at A ( Ra) is 4.0 kN\n", + "The reaction at B ( Rb) is 4.14 kN\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-13,Page No:225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=2 # kN # load acting at a distance of 1m from point A\n", + "W2=1 # kN # load acting at a distance of 1m from point B\n", + "theta=30 # degree\n", + "L=4 # m # length of the tie beam\n", + "l=1 #m # length of each member in the tie\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n", + "Ya=W1+W2-Yb # kN # sum Fy=0\n", + "\n", + "# (b) Dismember\n", + "# MEMBER AB\n", + "# Xa=Xb........ (eq'n 1) # sum Fx=0\n", + "# MEMBER AC\n", + "# Xa=Xc.........(eq'n 2) # sum Fx=0\n", + "Yc=W1-Ya # kN # sum Fy=0\n", + "# Taking moment about A\n", + "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n", + "# From eq'n 1 & 2\n", + "Xa=Xc # kN\n", + "Xb=Xa # kN\n", + "\n", + "# Results\n", + "\n", + "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force in tie bar AB is 1.299 kN\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-14,Page No:226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N \n", + "r=0.25 # radius of pulley at E \n", + "Lab=2 #m\n", + "Lad=1 # m\n", + "Lbd=1 # m \n", + "Ldc=0.75 # m\n", + "l1=0.5 #m # c/c distance between bar AB and point E\n", + "l2=1.25 # m # dist between rigid support and the weight\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Reactions\n", + "Xa=W # N # sum Fx=0\n", + "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n", + "Ya=W-Yb # N # sum Fy=0\n", + "\n", + "# Dismember\n", + "# MEMBER ADB\n", + "# consider triangle BCD to find theta, where s= length of bar BC, \n", + "s=(Lbd**2+Ldc**2)**0.5 # m\n", + "theta=arccos(Lbd/s)*(180/pi) # degree\n", + "\n", + "# equilibrium eq'n of member ADB\n", + "Yd=(Ya*Lab)/Lad # take moment about B\n", + "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n", + "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n", + "\n", + "# PIN D\n", + "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n", + "\n", + "# Results\n", + "\n", + "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n", + "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compressive force in bar BC (Fbc) is 1250.0 N\n", + "The shear force on the pin is 2015.6 N\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9-15,Page No:229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initiliztion of variables\n", + "\n", + "P=5000 # N\n", + "theta=45 # degree # angle made by Rd & Re with the horizontal\n", + "Lab=3 # m\n", + "Lac=3 # m\n", + "Lbd=2 # m\n", + "Lce=2 # m\n", + "l=1.5 # m # dist of load P from B\n", + "\n", + "# Calculations (BEAM AB )\n", + "# Consider the equilibrium of beams \n", + "# We are using matrix to solve the simultaneous eqn's \n", + "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n", + "B=np.array([(P*l), 0])\n", + "C=np.linalg.solve(A,B)\n", + "# Calculations (BEAM AC)\n", + "Re=C[0] # N (C) # from eq'n 1\n", + "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n", + "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n", + "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n", + "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n", + "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n", + "\n", + "# Results \n", + "\n", + "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n", + "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n", + "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n", + "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n", + "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n", + "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n", + "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n", + "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_1.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_1.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_10.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_10.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_11.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_11.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_12.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_12.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb new file mode 100644 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_13.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb new file mode 100644 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_14.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb new file mode 100644 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_15.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_2.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_2.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_3.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_3.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_4.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_4.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_5.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_5.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_6.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_6.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_7.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_7.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_8.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_8.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_9.ipynb new file mode 100755 index 00000000..3563e562 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_9.ipynb @@ -0,0 +1,378 @@ +{ + "metadata": { + "name": "chapter10.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Uniform Flexible Suspension Cables" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-1,Page No:238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "W1=400 # N # vertical load at pt C\n", + "W2=600 # N # vertical load at pt D\n", + "W3=400 # N # vertical load at pt E\n", + "l=2 # m # l= Lac=Lcd=Lde=Leb\n", + "h=2.25 # m # distance of the cable from top\n", + "L=2 # m # dist of A from top\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n", + "A=np.array([[-L ,4*l],[-h, 2*l]])\n", + "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Now consider the F.B.D of BE, Take moment at E\n", + "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n", + "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n", + "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n", + "\n", + "# Now consider the F.B.D of portion BEDC\n", + "# Take moment at C\n", + "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n", + "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n", + "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n", + "\n", + "# Results\n", + "\n", + "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n", + "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n", + "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n", + "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n", + "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n", + "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The horizontal reaction at B (Xb) is 1600.0 N\n", + "(i) The vertical reaction at B (Yb) is 1100.0 N\n", + "(ii) The sag at point E (y_e) is 1.375 m\n", + "(iii) The tension in portion CA (T_CA) is 1627.9 N\n", + "(iv) The max tension in the cable (T_max) is 1941.6 N\n", + "(iv) The max slope (theta_1) in the cable is 34.5 degree\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-2,Page No:241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "W1=100 # N # Pt load at C\n", + "W2=150 # N # Pt load at D\n", + "W3=200 # N # Pt load at E\n", + "l=1 # m # l=Lac=Lcd=Lde=Leb\n", + "h=2 # m # dist between Rb & top\n", + "Xa=200 # N\n", + "Xb=200 # N\n", + "\n", + "# Calculations\n", + "\n", + "# consider the F.B.D of entire cable\n", + "# Take moment at A\n", + "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n", + "Ya=W1+W2+W3-Yb # N # sum Fy=0\n", + "# Now consider the F.B.D of AC\n", + "\n", + "# Take moment at C,\n", + "y_c=(Ya*l)/Xa # m\n", + "theta_1=arctan(y_c/l)*(180/pi) # degree\n", + "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n", + "# here, T_AC=T_max\n", + "T_max=(Xa**2+Ya**2)**0.5 # N\n", + "T_AC=T_max\n", + "\n", + "# Now consider the F.B.D of portion ACD\n", + "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n", + "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n", + "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n", + "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n", + "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n", + "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n", + "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The component of support reaction at A (Ya) is 300.0 N\n", + "(i) The component of support reaction at B (Yb) is 150.0 N\n", + "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n", + "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n", + "(iii) The max tension in the cable is 360.6 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-3,Page No:246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "w=75 # kg/m # mass per unit length of thw pipe\n", + "l=20 # m # dist between A & B\n", + "g=9.81 #m/s^2 # acc due to gravity\n", + "y=2 # m # position of C below B\n", + "\n", + "# Calculations\n", + "\n", + "# Let x_b be the distance of point C from B \n", + "# In eq'n x_b^2+32*x_b-320=0\n", + "a=1\n", + "b=32\n", + "c=-320\n", + "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n", + "\n", + "# Now tension T_0\n", + "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n", + "\n", + "# Now the max tension occurs at point A,hence x is given as,\n", + "x=20-x_b # m\n", + "w_x=w*g*x*10**(-3) # kN \n", + "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n", + "\n", + "# Results\n", + "\n", + "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n", + "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n", + "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n", + "The maximum tension (T_max) in the cable is 14.71 kN\n", + "The minimum tension (T_0) in the cable is 11.77 kN\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-4,Page No:247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.5 # kg/m # mass of the cable per unit length\n", + "g=9.81 # m/s^2\n", + "x=30#/ m # length AB\n", + "y=0.5 # m # dist between C & the horizontal\n", + "x_b=15 # m # dist of horizontal from C to B\n", + "\n", + "# Calculations\n", + "\n", + "w=m*g # N/m # weight of the cable per unit length\n", + "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n", + "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n", + "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n", + "\n", + "\n", + "# Slope of the cable at B,\n", + "theta=arccos(T_0/T_B)*(180/pi) # degree\n", + "\n", + "# Now length of the cable between C & B is,\n", + "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n", + "\n", + "\n", + "# Now total length of the cable AB is,\n", + "S_ab=2*S_cb # m \n", + "\n", + "# Results\n", + "\n", + "print\"(i) The magnitude of load W is \",round(W),\"N\"\n", + "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n", + "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The magnitude of load W is 1106.0 N\n", + "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n", + "(iii) The total length of the cable AB is 30.0 m\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-5,Page No:249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x=30 # m # distance between two electric poles\n", + "Tmax=400 # N # Max Pull or tension\n", + "w=3 # N/m # weight per unit length of the cable\n", + "\n", + "# Calculations\n", + "\n", + "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n", + "# Now the maximum pull or tension occurs at B,\n", + "T_B=Tmax # N \n", + "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n", + "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n", + "\n", + "# Results \n", + "\n", + "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest value of the sag in the cable is 0.843 m\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10-6,Page No:252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=200 # m # length of the cable\n", + "m=1000 # kg # mass of the cable\n", + "S=50 # m # sag in the cable\n", + "s=l/2 # m\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "w=(m*g)/l # N/m # mass per unit length of the cable\n", + "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n", + "c=7500/100 # m \n", + "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n", + "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n", + "y=c+50\n", + "\n", + "A=1.666 \n", + "x=c*(arccosh(A))*(pi/180)# m \n", + "L=2*x*(180/pi) # m # where L= span\n", + "\n", + "# Results\n", + "\n", + "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n" + ] + } + ], + "prompt_number": 114 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_1.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_1.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_10.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_10.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_11.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_11.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_12.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_12.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb new file mode 100644 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_13.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb new file mode 100644 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_14.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_2.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_2.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_3.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_3.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_4.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_4.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_5.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_5.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_6.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_6.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_7.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_7.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_8.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_8.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_9.ipynb new file mode 100755 index 00000000..9f1a8645 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_9.ipynb @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "chapter12.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Moment Of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-7,Page No:285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "A= 50 # cm^2 # area of the shaded portion\n", + "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n", + "d=6 # cm\n", + "\n", + "# Calculations\n", + "\n", + "J_c=J_A-(A*d**2) \n", + "\n", + "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n", + "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n", + "\n", + "# Now from eq'n 2,\n", + "I_x=2*I_y # cm^4 # M.O.I about X-axis\n", + "\n", + "# Results\n", + "\n", + "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n", + "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n", + "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-8,Page No:288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=20 # cm # width of the pate\n", + "d=30 # cm # depth of the plate\n", + "r=15 # cm # radius of the circular hole\n", + "h=20 # cm # distance between the centre of the circle & the x-axis\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "\n", + "A_1=b*d # cm^2 # area of the plate\n", + "y_1=d/2 # cm # y-coordinate of the centroid\n", + "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n", + "y_2=h # cm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b*(d**3))/12 # cm^4\n", + "\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=15 # cm # from the bottom edge\n", + "OC_2=20 # cm\n", + "OC=12.9 # cm # from the bottom edge\n", + "d_1=OC_1-OC # cm\n", + "d_2=OC_2-OC # cm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(pi*r**4)/64 # cm^2\n", + "\n", + "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n", + "\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)-(I_X2) # cm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n", + "#due to decimal variance answer varies by 1cm^4 from textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-9,Page No:289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b1=80 # mm # width of the flange pate\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=40 # mm # width/thickness of the web\n", + "d2=60 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=70 # mm # from the bottom edge\n", + "OC_2=30 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-10,Page No:291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "# Initilization of variables\n", + "b1=120 # mm # width of the flange pate of L-section\n", + "d1=20 # mm # depth of the flange plate\n", + "b2=20 # mm # width/thickness of the web\n", + "d2=130 # mm # depth of the web\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Location of the centroid of the composite area\n", + "A_1=b1*d1 # mm^2 # area of the flange plate\n", + "A_2=b2*d2 # mm^2 # area of the web\n", + "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n", + "y_2=d2/2 # mm # y-coordinate of the centroid\n", + "x_1=60 # mm # x-coordinate of the centroid\n", + "x_2=110 # mm # x-coordinate of the centroid\n", + "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n", + "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n", + "\n", + "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about x-axis\n", + "I_x1=(b1*(d1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "OC_1=d2+(d1/2) # mm # from the bottom edge\n", + "OC_2=d2/2 # mm # from the bottom edge\n", + "OC=y_c # mm # from the bottom edge\n", + "d_1=(d2-y_c)+(d1/2) # mm\n", + "d_2=y_c-OC_2 # mm \n", + "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about x-axis\n", + "I_x2=(b2*d2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n", + "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n", + "I_x=(I_X1)+(I_X2) # mm^4\n", + "\n", + "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n", + "\n", + "# Area (A_1) M.I of area A_1 about y-axis\n", + "I_y1=(d1*(b1**3))/12 # mm^4\n", + "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n", + "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n", + "\n", + "# Area(A_2) M.I of area A_2 about y-axis\n", + "I_y2=(d2*b2**3)/12 # mm^4\n", + "\n", + "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n", + "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n", + "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n", + "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n", + "I_y=(I_Y1)+(I_Y2) # mm^4\n", + "\n", + "# Results\n", + "\n", + "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n", + "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n", + "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n", + "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-14,Page No:299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "b=1 # cm # smaller side of the L-section\n", + "h=4 # cm # larger side of the L-section\n", + "\n", + "# Calculations\n", + "\n", + "# (A) RECTANGLE A_1: Using the paralel axis theorem\n", + "Ixy=0\n", + "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n", + "\n", + "# (B) RECTANGLE A_2: Using the paralel axis theorem\n", + "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n", + "\n", + "# Product of inertia of the total area\n", + "I_xy=I_xy1+I_xy2 # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Product of inertia of the L-section is 7.75 cm^4\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12-15,Page No:300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n", + "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n", + "b=12 # cm # width of flange of the Z-section\n", + "d=3 # cm # depth of flange of the Z-section\n", + "t=2 # cm # thickness of the web of the Z-section\n", + "h=6 # cm # depth of the web of the Z-section\n", + "\n", + "#Calculations\n", + "\n", + "A_1=b*d # cm^2 # area of top flange\n", + "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n", + "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "A_2=t*h # cm^2 # area of web\n", + "x_2=0 # cm # distance of the centroid from X-axis for the web\n", + "y_2=0 # cm # distance of the centroid from Y-axis for the web\n", + "A_3=b*d # cm^2 # area of bottom flange\n", + "x_3=5 # cm # distance of the centroid from X-axis for top flange\n", + "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n", + "\n", + "# Product of Inertia of the total area is,\n", + "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n", + "# The direction of the principal axes is,\n", + "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n", + "# Principa M.O.I\n", + "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n", + "\n", + "# Results\n", + "\n", + "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n", + "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n", + "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The principal axes of the section about O is -35.47 degree\n", + "The Maximum value of principal M.O.I is 3822.0 cm^4\n", + "The Minimum value of principal M.O.I is 394.0 cm^4\n" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_1.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_1.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_10.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_10.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_11.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_11.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_12.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_12.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb new file mode 100644 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_13.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb new file mode 100644 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_14.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_2.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_2.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_3.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_3.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_4.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_4.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_5.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_5.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_6.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_6.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_7.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_7.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_8.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_8.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_9.ipynb new file mode 100755 index 00000000..690eeb8a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_9.ipynb @@ -0,0 +1,121 @@ +{ + "metadata": { + "name": "chapter13.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Principle Of Virtual Work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-1,Page No:312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1000 # N # weight to be raised\n", + "\n", + "# Calculations\n", + "\n", + "# From the Principle of virtual work,\n", + "P=W/2 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13-7,Page No:317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=1000 # N # Force acting at the hinge of the 1st square\n", + "Q=1000 # N # Force acting at the hinge of the 2nd square\n", + "\n", + "# Calculations\n", + "\n", + "# Chosing the co-ordinate system with originat A, we can write,\n", + "theta=45 # degree\n", + "\n", + "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n", + "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n", + "\n", + "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n", + "\n", + "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n", + "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n", + "\n", + "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n", + "X_A=X_B # N\n", + "Y_A=P+Q-Y_B # N\n", + "\n", + "# Results\n", + "\n", + "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n", + "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n", + "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n", + "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Horizontal component of reaction at A (X_A) is 333.3 N\n", + "The Vertical component of reaction at A (Y_A) is 1333.3 N\n", + "The Horizontal component of reaction at B (X_B) is 333.3 N\n", + "The Vertical component of reaction at B (Y_B) is 666.7 N\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_1.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_1.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_10.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_10.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_11.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_11.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_12.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_12.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb new file mode 100644 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_13.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb new file mode 100644 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_14.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_2.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_2.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_3.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_3.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_4.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_4.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_5.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_5.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_6.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_6.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_7.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_7.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_8.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_8.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_9.ipynb new file mode 100755 index 00000000..41eaaa76 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_9.ipynb @@ -0,0 +1,1056 @@ +{ + "metadata": { + "name": "chapter14.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Rectilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-3,Page No:335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "a_T=0.18 # m/s^2 # acc of trolley\n", + "# Calculations\n", + "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n", + "t=4 # seconds\n", + "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n", + "v_B=-v_T*3**-1 # m/s # from eq'n 3\n", + "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n", + "S_B=-S_T*3**-1 # m # from eq'n 2\n", + "# Results\n", + "\n", + "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n", + "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n", + "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n", + "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block B is -0.06 m/s^2\n", + "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n", + "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-4,Page No:338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliztion of variables\n", + "\n", + "v_B=12 # cm/s # velocity of block B\n", + "u=0\n", + "s=24 # cm # distance travelled by bock B\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n", + "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n", + "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n", + "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n", + "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n", + "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n", + "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of block A (a_A) is 4.5 cm/s^2\n", + "The acceleration of block B (a_B) is 3.0 cm/s^2\n", + "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n", + "The position of block A (S_A) after 5 seconds is 56.25 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-5,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "u=72*1000*60**-2 # km/hr # speed of the vehicle\n", + "s=300 # m # distance where the light is turning is red\n", + "t=20 # s # traffic light timed to remain red\n", + "\n", + "# Calculations\n", + "\n", + "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n", + "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n", + "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n", + "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The required uniform acceleration of the car is -0.5 m/s^2\n", + "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-6,Page No:340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=50 # m # height of the tower\n", + "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n", + "g=9.81 # m/s^2 # acc due to graity\n", + "\n", + "# Calculations\n", + "\n", + "# The equation of time for the two stones to cross each other is given as,\n", + "t=S/v # seconds\n", + "S_1=(0.5)*g*t**2 # m # from the top\n", + "\n", + "# Results\n", + "\n", + "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n", + "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time (t) at which the two stones cross each other is 2.0 seconds\n", + "The two stones cross each other (from top) at a distance of 19.6 m\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-7,Page No:341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Intilization of variables\n", + "\n", + "acc=0.5 # m/s^2 # acceleration of the elevator\n", + "s=25 # m # distance travelled by the elevator from the top\n", + "u=0 # m/s\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n", + "v=sqrt((2*acc*s)+(u^2)) # m/s \n", + "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n", + "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n", + "a=4.655\n", + "b=-5\n", + "c=-25\n", + "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n", + "\n", + "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n", + "S_1=(v*t)+((1/2)*acc*t**2) # m\n", + "\n", + "# Let S be the total dist from top when the stone hits the elevator,\n", + "S=S_1+s # m\n", + "\n", + "# Results\n", + "\n", + "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n", + "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time taken by the stone to hit the elevator is 2.916 second\n", + "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-9,Page No:343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=60 # km/hr # velocity of the train\n", + "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n", + "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n", + "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n", + "\n", + "# Calculations\n", + "\n", + "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n", + "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n", + "\n", + "# Total time of travel for passenger train is given by eq'n\n", + "t=t_1+t_2 # hr\n", + "\n", + "# Now time of travel of the local train (let it be T) is given as,\n", + "T=2*t # hr\n", + "V_max=2*d1/T # km/hr\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed of the local train is 50.0 km/hr\n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-10,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=10 # m/s^2 # acceleration of the particle\n", + "S_5th=50 # m # distance travelled by the particle during the 5th second\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n", + "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n", + "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n", + "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n", + "\n", + "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n", + "u=(S_5th)-45 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial velocity of the particle is 5.0 m/s\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-11,Page No:345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "# Conditions given are\n", + "t=1 # s\n", + "x=14.75 # m\n", + "v=6.33 # m/s\n", + "# Calculations\n", + "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n", + "T=2 # sec\n", + "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n", + "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n", + "a=(T**2)-(2*T)+2 # m/s^2\n", + "# Results\n", + "\n", + "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n", + "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# The answer may vary due to decimal point error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance travelled by the particle is 21.67 m\n", + "The velocity of the particle is 7.67 m/s\n", + "The acceleration of the particle is 2.0 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-12,Page No:346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n", + "t=3 # sec .. from eq'n 2\n", + "# Position of particle at t=3 sec\n", + "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n", + "# Acc of particle at t=3 sec\n", + "a=6*(t-1) # m/s^2 # from eq'n 3\n", + "# Results\n", + "\n", + "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n", + "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n", + "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n", + "# Ref textbook for the graphs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time at which the velocity of the particle becomes zero is 3.0 sec\n", + "The position of the partice at t=3 sec is -15.0 m\n", + "The acceleration of the particle is 12.0 m/s^2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-15,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "F=250 # N # Force acting on a body\n", + "m=100 # kg # mass of the body\n", + "\n", + "# Calculations\n", + "\n", + "# Using the eq'n of motion\n", + "a=F*m**-1 # m/s^2 \n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the body is 2.5 m/s^2\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-16,Page No:354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "a=1 # m/s^2 # downward/upward acceleration of the elevator\n", + "W=500 # N # Weight of man\n", + "g=9.81 # m/s^2 # acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# (a) Downward Motion \n", + "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n", + "\n", + "# (b) Upward Motion\n", + "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n", + "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-17,Page no:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=5000 # N # Total weight of the elevator\n", + "u=0 # m/s\n", + "v=2 # m/s # velocity of the elevator\n", + "s=2 # m # distance traveled by the elevator\n", + "t=2 # seconds # time to stop the lift\n", + "w=600 # N # weight of the man\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration acquired by the elevator after travelling 2 m is given by,\n", + "a=(((v**2-u**2)**0.5/2)) # m/s^2\n", + "\n", + "# (a) Let T be the the tension in the cable which is given by eq'n,\n", + "T=W*(1+(a/g)) # N\n", + "\n", + "# (b) Motion of man\n", + "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n", + "R=w*(1-(a/g)) # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n", + "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Tensile force in the cable is 5509.7 N\n", + "(b) The pressure transmitted to the floor by the man is 538.8 N\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-18,Page No:355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=10 # kg # mass of the 1st block\n", + "M_2=5 # kg # mass of the 2nd block\n", + "mu=0.25 # coefficient of friction between the blocks and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n", + "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n", + "print\"The tension in the string is \",round(T,3),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 1.635 m/s^2\n", + "The tension in the string is 40.875 N\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-19,Page No:357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=150 # kg # mass of the 1st block\n", + "M_2=100 # kg # mass of the 2nd block\n", + "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "theta=45 # degree # inclination of the surface\n", + "\n", + "# Calculations\n", + "\n", + "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n", + "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n", + "\n", + "# Results\n", + "\n", + "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string during the motion of the system is 539.3 N\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-20,Page No:358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_1=5 # kg # mass of the 1st block\n", + "theta_1=30 # degree # inclination of the 1st plane\n", + "M_2=10 # kg # mass of the 2nd block\n", + "theta_2=60 # degree # inclination of the 2nd plane\n", + "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 1 & 2 for a we get,\n", + "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the masses is 2.015 m/s^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-21,Page No:359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "S=5 # m # distance between block A&B\n", + "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n", + "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n", + "theta=20 # degree # inclination of the pane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculatio#\n", + "\n", + "# EQUATION OF MOTION OF BLOCK A:\n", + "# Let a_A & a_B be the acceleration of block A & B.\n", + "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n", + "\n", + "# EQUATION OF MOTION OF BLOCK B:\n", + "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n", + "\n", + "# Now the eq'n for time of collision of the blocks is given as,\n", + "t=((S*2)/(a_B-a_A))**0.5 # seconds \n", + "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n", + "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n", + "\n", + "# Results\n", + "\n", + "print\"The time before collision is \",round(t,2),\"seconds\"\n", + "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n", + "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time before collision is 3.29 seconds\n", + "The distance travelled by block A before collision is 8.2 m\n", + "The distance travelled by block B before collision is 13.2 m\n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-22,Page No:361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of the car\n", + "Q=100 # N # Weight of the rectangular block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "b=25 # cm # width of the rectangular block\n", + "d=50 # cm # depth of the block\n", + "\n", + "# Calculations\n", + "\n", + "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n", + "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n", + "\n", + "# Resuts\n", + "\n", + "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n", + "print\"The acceleration is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n", + "The acceleration is 2.45 m/s^2\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-23,Page No:363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=40 # N # weight on puley r_1\n", + "Q=60 # N # weight on pulley r_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of pulley Pi.e a_p is,\n", + "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The downward acceleration of P is 1.784 m/s^2\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-24,Page No:364" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=15 # kg # mass of the wedge\n", + "m=6 # kg # mass of the block\n", + "theta=30 # degree # angle of the wedge\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n", + "\n", + "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n", + "\n", + "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n", + "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration of the wedge is 0.157 g\n", + "(b) The acceleration of the bock relative to the wedge is 0.636 g\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-25,Page No:366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=30 # N # weight on pulley A\n", + "Q=20 # N # weight on pulley B\n", + "R=10 # N # weight on puey B\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n", + "A=np.array([[70 ,-40],[-10, 30]])\n", + "B=np.array([10,-10])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Acceleration of P is given as,\n", + "P=C[0] # m/s^2\n", + "# Acceleration of Q is given as,\n", + "Q=C[1]-C[0] # m/s^2\n", + "# Acceleration of R is given as,\n", + "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of P is \",round(P,2),\"g\"\n", + "print\"The acceleration of Q is \",round(Q,2),\"g\"\n", + "print\"The acceleration of R is \",round(R,2),\"g\"\n", + "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of P is -0.06 g\n", + "The acceleration of Q is -0.29 g\n", + "The acceleration of R is 0.41 g\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14-30,Page No:372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # kg/m # weight of the bar\n", + "L_AB=0.6 # m # length of segment AB\n", + "L_BC=0.30 # m # length of segment BC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n", + "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n", + "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n", + "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n", + "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n", + "\n", + "# The various forces acting on the bar are:\n", + "\n", + "# Writing the eqn's of dynamic equilibrium\n", + "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n", + "\n", + "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n", + "AF=L_BC*cos(theta_3) \n", + "DF=L_BC*sin(theta_2)\n", + "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n", + "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n", + "\n", + "# On simplifying and solving moment eq'n we get a as,\n", + "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n", + "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n", + "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n", + "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n", + "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration is \",round(a,4),\"m/s^2\"\n", + "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n", + "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration is -1.2263 m/s^2\n", + "The reaction at A (R_A) is 8.898 N\n", + "The angle made by the resultant is -82.87 degree\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_1.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_1.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_10.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_10.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_11.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_11.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_12.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_12.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb new file mode 100644 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_13.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb new file mode 100644 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_14.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_2.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_2.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_3.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_3.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_4.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_4.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_5.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_5.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_6.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_6.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_7.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_7.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_8.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_8.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_9.ipynb new file mode 100755 index 00000000..db992973 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_9.ipynb @@ -0,0 +1,775 @@ +{ + "metadata": { + "name": "chapter15.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Curvilinear Motion Of A Particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-2,Page No:386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=200 # m # radius of the curved road\n", + "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n", + "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n", + "t=10 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n", + "A_t=0 # since dv/dt=0 # tangential component of acceeration\n", + "delv=v_1-v_2\n", + "delt=t-0\n", + "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n", + "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n", + "\n", + "# Results\n", + "\n", + "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n", + "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n", + "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n", + "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal component of acceleration is 2.0 m/s^2\n", + "The tangential component of acceleration is 0.0 m/s^2\n", + "The normal component of deceleration is 2.0 m/s^2\n", + "The tangential component of deceleration is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-3,Page No:387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Iintilization of variables\n", + "\n", + "r=250 # m # radius of the curved road\n", + "a_t=0.6 # m/s^2 # tangential acceleration\n", + "a=0.75 # m/s^2 # total acceleration attained by the car\n", + "\n", + "# Calculations\n", + "\n", + "a_n=(a**2-a_t**2)**0.5 # m/s^2\n", + "v=sqrt(a_n*r) # m/s\n", + "\n", + "# Using v=u+a*t\n", + "u=0\n", + "t=v/a_t # seconds\n", + "\n", + "# Now using v^2-u^2=2*a*s\n", + "s=v**2/(2*a_t) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance traveled by the car is \",round(s,2),\"m\"\n", + "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance traveled by the car is 93.75 m\n", + "The time for which the car travels is 17.68 seconds\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-5,Page No:388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=10 # m/s # speed of the car\n", + "r=200 # m # radius of the road\n", + "t=15 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n", + "\n", + "# Velocity in x & y direction is given by eq'n\n", + "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n", + "v_y=omega*r*cos(omega*t) # m/s\n", + "\n", + "# Acceleration in x & y direction is given by\n", + "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n", + "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n", + "\n", + "# Results\n", + "\n", + "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n", + "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n", + "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n", + "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The component of velocity in X direction (v_x) is 6.82 m/s\n", + "The component of velocity in Y direction (v_y) is 7.32 m/s\n", + "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n", + "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-6,Page No:392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # seconds\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n", + "r=(1.25*t**2)-(0.9*t**3) # m\n", + "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n", + "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n", + "theta=(pi/2)*(4*t-3*t**2) # radian\n", + "theta_1=(pi/2)*(4-(6*t)) # rad/second\n", + "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n", + "\n", + "# Velocity of collar P\n", + "v_r=r_1 # m/s\n", + "v_theta=r*theta_1 # m/s\n", + "v=(v_r**2+v_theta**2)**0.5 # m/s\n", + "alpha=arctan(v_theta/v_r) # degree\n", + "\n", + "# Acceleration of the collar P\n", + "a_r=r_2-(r*theta_1**2) # m/s^2\n", + "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n", + "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n", + "beta=arctan(a_theta/a_r) # degree\n", + "\n", + "# Acceleration of collar P relative to the rod. Let it be a_relative\n", + "a_relative=r_2 # m/s^2 # towards O\n", + "\n", + "# Calculations\n", + "\n", + "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n", + "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n", + "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar is 1.117 m/s\n", + "The accelaration of the collar is 6.671 m/s^2\n", + "The acceleration of the collar relative to the rod is -2.9 m/s^2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-7,Page No:394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Consider the eq'ns of motion from the book\n", + "# The notations have been changed for the derivatives of r & theta\n", + "# (1) At t=0 s\n", + "theta_0=0\n", + "theta_1=2*pi # rad/s\n", + "theta_2=0\n", + "r_0=0\n", + "r_1=10 # cm/s\n", + "r_2=0\n", + "# At t=0.3 s\n", + "t=0.3 # sec\n", + "theta=2*pi*t # rad\n", + "theta1=2*pi # rad/s\n", + "theta2=0\n", + "r=10*t # cm\n", + "r1=10 # cm/s\n", + "r2=0\n", + "# (i) \n", + "#Velocity\n", + "v_r=r_1 # cm/s\n", + "v_theta=r_0*theta_1\n", + "v=sqrt(v_r**2+v_theta**2) # cm/s\n", + "# Acceleration\n", + "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n", + "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n", + "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n", + "# (ii)\n", + "# Velocity\n", + "V_R=r1 # cm/s\n", + "V_theta=r*theta1 # cm/s\n", + "V=sqrt(V_R**2+V_theta**2) # cm/s\n", + "# Acceleration\n", + "A_r=r2-(r*theta1**2) # cm/s^2\n", + "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n", + "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n", + "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n", + "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-9,Page No:404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Calculations\n", + "# Tension in the wire before it is cut\n", + "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n", + "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n", + "# Results\n", + "\n", + "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-10,Page No:405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_A=120 # N # Weight of block A\n", + "W_B=80 # N # Weight of block B\n", + "mu_a=0.4 # coefficient of friction under block A\n", + "n=40 # r.p.m # rotation of frame\n", + "r_a=1.2 # m # distance from block A to the axis of rotation\n", + "r_b=1.6 # m # distance from block A to the axis of rotation\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of block A.\n", + "N=W_A # N # Sum F_y=0\n", + "\n", + "# Now here, a_n=omega^2*r\n", + "omega=(2*pi*n)*60**-1 # rad/sec\n", + "a_n=(omega**2)*r_a # m/s^2\n", + "\n", + "# sum F_x=0 gives the eq'n of T as,\n", + "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n", + "\n", + "# Now consider the F.B.D of block B\n", + "A_n=(omega**2)*r_b # m/s^2\n", + "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n", + "mu=(T-W_B)*N_1**-1 \n", + "\n", + "# Results\n", + "\n", + "print\"The coefficient of friction of block B is \",round(mu,3) \n", + "#answer may vary due to decimal variance in python\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coefficient of friction of block B is 0.565\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-12,Page No:408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10000 # N # Weight of the locomotive\n", + "# Calculations\n", + "# Consider the various derivations given in the textbook\n", + "R_max=W*20**-1 # N # eq'n for max reaction\n", + "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n", + "# Results\n", + "\n", + "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum lateral thrust is 500.0 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-13,Page No:411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "W=10 #N # Weight of the ball\n", + "# Calculations\n", + "# consider the eq'n derived to find the reaction, given as\n", + "R=W*(1+((2*pi**2)*9**-1)) # N \n", + "# Results\n", + "\n", + "print\"The value of the reaction is \",round(R,1),\"N\"\n", + "#answer may vary due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of the reaction is 31.9 N\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-15,Page No:412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "P=50 # N # Weight of ball P\n", + "Q=50 # N # Weight of ball Q\n", + "R=100 # N # Weight of the governing device\n", + "l=0.3 # m # length of each side\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "r=l*sin(theta*(pi/180)) # m # Radius of circe\n", + "# On solving eqn's 1,2 &3 we get the value of v as,\n", + "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n", + "# But the eq'n v=omega*r we get the value of N as,\n", + "N=(60*v)/(2*pi*r) # r.p.m \n", + "\n", + "# Results\n", + "\n", + "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n", + "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of rotation is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-16,Page No:414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "Q=20 # N # Weight of the governor device\n", + "W=10 # N # Weight of the fly balls\n", + "theta=30 # degree # angle between the vertical shaft and the axis AB\n", + "l=0.2 # m # length of the shaft\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Radius of the circle is given as,\n", + "r=Q*sin(theta*(pi/180))*(10**-2) # m \n", + "\n", + "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n", + "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n", + "\n", + "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n", + "N=(v*60)/(2*pi*r) # r.p.m.\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the fly-balls is 101.7 r.p.m\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-18,Page No:421 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=50 # m # radius of the road\n", + "mu=0.15 # coefficient of friction between the wheels and the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n fo max speed of the vehicle without skidding is \n", + "v=(mu*g*r)**0.5 # m/s\n", + "\n", + "# The angle theta made with the vertical while negotiating the corner is \n", + "theta=arctan(v**2/(g*r))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n", + "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the vehicle can travel is 8.58 m/s\n", + "The angle made with the vertical is 8.54 degree\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-19,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v=100*1000*3600**-1 # m/s # or 100 km/hr\n", + "r=250 # m # radius of the road\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of banking is given by eq'n,\n", + "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n", + "\n", + "# Results\n", + "\n", + "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of banking of the track is 17.47 degree\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-20,Page No:422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=10000 # N # Weight of the car\n", + "r=100 # m # radius of the road\n", + "v=10 # m/s # speed of the car\n", + "h=1 # m # height of the C.G of the car above the ground\n", + "b=1.5 # m # distance between the wheels\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The reactions at the wheels are given by te eq'ns:\n", + "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n", + "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n", + "\n", + "# The eq'n for max speed to avoid overturning on level ground is,\n", + "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n", + "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n", + "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reaction at Wheel A (R_A) is 4660.2 N\n", + "The reaction at Wheel B (R_B) is 5339.8 N\n", + "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15-21,Page No:423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=1 # N # Weight of the bob\n", + "theta=8 # degree # angle made by the bob with the vertical\n", + "r=100 # m # radius of the curve\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# from eq'n 1 & 2 we get v as,\n", + "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n", + "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n", + "\n", + "# Results\n", + "\n", + "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n", + "print\"The tension in the chord is \",round(T,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the cariage is 42.26 km/hr\n", + "The tension in the chord is 1.01 N\n" + ] + } + ], + "prompt_number": 47 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_1.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_1.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_10.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_10.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_11.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_11.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_12.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_12.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb new file mode 100644 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_13.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb new file mode 100644 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_14.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_2.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_2.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_3.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_3.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_4.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_4.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_5.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_5.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_6.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_6.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_7.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_7.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_8.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_8.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_9.ipynb new file mode 100755 index 00000000..7bd00420 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_9.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "chapter16.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Kinetics Of A Particle : Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-1,Page No:432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "k=1000 # N/m # stiffness of spring\n", + "x_1=0.1 # m # distance upto which the spring is stretched\n", + "x_2=0.2 # m \n", + "x_0=0 # initial position of spring\n", + "\n", + "# Calculations\n", + "\n", + "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n", + "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n", + "# Work required to stretch from 10 cm to 20 cm is,\n", + "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"The work of the spring force is \",round(U_10),\"N-m\"\n", + "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the spring force is -5.0 N-m\n", + "The work required to stretch the spring by 20 cm is -15.0 N-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-3,Page No:436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M_A=100 # kg # mass of block A\n", + "M_B=150 # kg # mass of block B\n", + "mu=0.2 # coefficient of friction between the blocks and the surface\n", + "x=1 # m # distance by which block A moves\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n", + "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of block A is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of block A is 3.19 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-4,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=500*10**3 # kg # mass of the train\n", + "u=0 # m/s # initial speed\n", + "v=90*1000*3600**-1 # m/s # final speed\n", + "t=50 # seconds\n", + "F_r=15*10**3 # N # Frictioal resistance to motion\n", + "\n", + "# Calculations\n", + "\n", + "# Acceleration is given as,\n", + "a=v*t**-1 # m/s^2\n", + "# The total force required to accelerate the train is,\n", + "F=M*a # N\n", + "# The maximum power required is at, t=50s & v=25 m/s\n", + "P=(F+F_r)*v*(10**-6) # MW\n", + "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n", + "P_req=F_r*v*(10**-3) # kW\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n", + "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum power required is 6.625 MW\n", + "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-5,Page No:440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=50 # N # Weight suspended on spring\n", + "k=10 # N/cm # stiffness of the spring\n", + "x_2=15 # cm # measured extensions\n", + "h=10 # cm # height for position 2\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the required F.B.D.\n", + "\n", + "# POSITION 1: The force exerted by the spring is,\n", + "F_1=W # N\n", + "\n", + "# Extension of spring from undeformed position is x_1,\n", + "x_1=F_1/k # cm\n", + "\n", + "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n", + "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n", + "\n", + "# P.E of the spring with respect to position 1\n", + "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n", + "\n", + "# Total P.E of the system with respect to position 1\n", + "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n", + "\n", + "# Total energy of the system,\n", + "E_2=P_E_t # N-cm\n", + "\n", + "# Total energy of the system in position 3 w.r.t position 1 is:\n", + "x=-(100)**0.5 # cm\n", + "x=+(100)**0.5 # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n", + "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential energy of the system is 500.0 N-cm\n", + "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-6,Page No:442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=10 # cm # height of drop\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n", + "a=1 \n", + "b=-0.1962\n", + "c=-0.01962\n", + "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum deflection of the spring is 26.91 cm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-7,Page No:444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the ball\n", + "k=500 # N/m # stiffness of the spring\n", + "h=0.1 # m # height of vertical fall\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n", + "delta=((2*m*g*h)/(k))**0.5 # m \n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.14 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-9,Page No:445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the collar\n", + "k=500 # N/m # stiffness of the spring\n", + "AB=0.15 # m # Refer the F.B.D for AB\n", + "AC=0.2 # m # Refer the F.B.D for AC\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "\n", + "# POSITION 1: \n", + "P_E_1=m*g*(AB)+0 \n", + "K_E_1=0\n", + "E_1=P_E_1+K_E_1 #\n", + "\n", + "# POSITION 2 : Length of the spring in position 2\n", + "CB=(AB**2+AC**2)**0.5 # m \n", + "# x is the extension in the spring\n", + "x=CB-AC # m\n", + "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n", + "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n", + "# The answer given in the text book (v=16.4 m/s) is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the collar will be 1.64 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-10,Page No:446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=5 # kg # mass of the block\n", + "theta=30 # degree # inclination of the plane\n", + "x=0.5 # m # distance travelled by the block\n", + "k=1500 # N/m # stiffness of the spring\n", + "mu=0.2 # coefficient of friction between the block and the surface\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the F.B.D of the block\n", + "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n", + "a=750\n", + "b=-16.03\n", + "c=-8.015\n", + "# Thus the roots of the eq'n are given as,\n", + "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum compression of the spring is 0.115 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16-11,Page No:448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=10 # kg # Here M=M_1=M_2\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D\n", + "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n", + "v=((M*g*4)/(25))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of mass M_2 is 3.96 m/s\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_1.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_1.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_10.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_10.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_11.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_11.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_12.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_12.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb new file mode 100644 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_13.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb new file mode 100644 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_14.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_2.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_2.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_3.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_3.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_4.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_4.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_5.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_5.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_6.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_6.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_7.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_7.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_8.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_8.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_9.ipynb new file mode 100755 index 00000000..5049e924 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_9.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "chapter17.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Kinetics Of A Particle : Impulse And Momentum" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-1,Page no:460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=0.1 # kg # mass of ball\n", + "\n", + "# Calculations\n", + "\n", + "# Consider the respective F.B.D.\n", + "\n", + "# For component eq'n in x-direction\n", + "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n", + "v_x_1=-25 # m/s \n", + "v_x_2=40*cos(40*(pi/180)) # m/s\n", + "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n", + "\n", + "# For component eq'n in y-direction\n", + "delta_t=0.015 # sceonds\n", + "v_y_1=0 # m/s\n", + "v_y_2=40*sin(40*(pi/180)) # m/s\n", + "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n", + "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average impules force exerted by the bat on the ball is 408.6 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Examplle 17.17-2,Page No:461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiliation of variables\n", + "\n", + "m_g=3000 # kg # mass of the gun\n", + "m_s=50 # kg # mass of the shell\n", + "v_s=300 # m/s # initial velocity of shell\n", + "s=0.6 # m # distance at which the gun is brought to rest\n", + "v=0 # m/s # initial velocity of gun\n", + "\n", + "# Calculations\n", + "\n", + "# On equating eq'n 1 & eq'n 2 we get v_g as,\n", + "v_g=(m_s*v_s)/(-m_g) # m/s\n", + "\n", + "# Using v^2-u^2=2*a*s to find acceleration,\n", + "a=(v**2-v_g**2)/(2*s) # m/s^2\n", + "\n", + "# Force required to stop the gun,\n", + "F=m_g*-a # N # here we make a +ve to find the Force\n", + "\n", + "# Time required to stop the gun, using v=u+a*t:\n", + "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n", + "\n", + "# Results\n", + "\n", + "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n", + "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n", + "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The recoil velocity of gun is -5.0 m/s\n", + "The Force required to stop the gun is 62500.0 N\n", + "The time required to stop the gun is 0.24 seconds\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-3,Page No:462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=50 # kg # mass of man\n", + "m_b=250 # kg # mass of boat\n", + "s=5 # m # length of the boat\n", + "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n", + "\n", + "# Calculations\n", + "\n", + "# Velocity of man is given by, v_m=(-v_r)+v_b\n", + "\n", + "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n", + "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n", + "\n", + "# Time taken by man to move to the other end of the boat is,\n", + "t=s/v_r # seconds\n", + "\n", + "# The distance travelled by the boat in the same time is,\n", + "s_b=v_b*t # m to right from O\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n", + "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of boat as observed from the ground is 0.167 m/s\n", + "(b) The distance by which the boat gets shifted is 0.833 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-5,Page No:464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=250 # kg # mass of the boat\n", + "M_1=50 # kg # mass of the man\n", + "M_2=75 # kg # mass of the man\n", + "v=4 # m/s # relative velocity of man w.r.t boat\n", + "\n", + "# Calculations \n", + "\n", + "# (a)\n", + "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n", + "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n", + "\n", + "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n", + "# Man of 75 kg dives first, So let the final velocity is given as\n", + "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n", + "# Now let the man of 50 kg jumps next, Here\n", + "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n", + "# Let final velocity of boat is,\n", + "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n", + "\n", + "# (c) \n", + "# The man of 50 kg jumps first,\n", + "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n", + "# the man of 75 kg jumps next,\n", + "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n", + "# Final velocity of boat is,\n", + "deltaV_3=0+delV_50+delV_75 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n", + "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n", + "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n", + "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n", + "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-6,Page No:466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m_m=70 # kg # mass of man\n", + "m_c=35 # kg # mass of canoe\n", + "m=25*1000**-1 # kg # mass of bullet\n", + "m_wb=2.25 # kg # mass of wodden block\n", + "V_b=5 # m/s # velocity of block\n", + "\n", + "# Calculations\n", + "\n", + "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n", + "v=(V_b*(m_wb+m))/(m) # m/s \n", + "\n", + "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n", + "V=(m*v)*(m_m+m_c)**-1 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the canoe is 0.108 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17-8,Page no:470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=2 # kg # mass of the particle\n", + "v_0=20 # m/s # speed of rotation of the mass attached to the string\n", + "r_0=1 # m # radius of the circle along which the particle is rotated\n", + "r_1=r_0*0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n", + "v_1=2*v_0 # m/s\n", + "# Tension is given by eq'n,\n", + "T=(m*v_1**2)/r_1 # N\n", + "\n", + "# Results\n", + "\n", + "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n", + "print\"The tension in the string is \",round(T),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new speed of the particle is 40.0 m/s\n", + "The tension in the string is 6400.0 N\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_1.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_1.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_10.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_10.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_11.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_11.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_12.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_12.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb new file mode 100644 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_13.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb new file mode 100644 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_14.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_2.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_2.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_3.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_3.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_4.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_4.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_5.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_5.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_6.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_6.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_7.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_7.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_8.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_8.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_9.ipynb new file mode 100755 index 00000000..696a0479 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_9.ipynb @@ -0,0 +1,620 @@ +{ + "metadata": { + "name": "chapter18.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Impact:Collision Of Elastic Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-1,Page No:474" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=1 # kg # mass of the ball A\n", + "v_a=2 # m/s # velocity of ball A\n", + "m_b=2 # kg # mass of ball B\n", + "v_b=0 # m/s # ball B at rest\n", + "e=1/2 # coefficient of restitution\n", + "\n", + "# Calculations\n", + "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[1 ,2],[-1 ,1]])\n", + "B=np.array([2,1])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 0.0 m/s\n", + "The velocity of ball B after impact is 1.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-2,Page No:480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "m_a=2 # kg # mass of ball A\n", + "m_b=6 # kg # mass of ball B\n", + "m_c=12 # kg # mass of ball C\n", + "v_a=12 # m/s # velocity of ball A\n", + "v_b=4 # m/s # velocity of ball B\n", + "v_c=2 # m/s # velocity of ball C\n", + "e=1 # coefficient of restitution for perfectly elastic body\n", + "\n", + "# Calculations\n", + "\n", + "# (A)\n", + "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n", + "A=np.array([[2 ,6],[-1, 1]])\n", + "B=np.array([48,8])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# Calculations\n", + "\n", + "# (B)\n", + "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n", + "P=np.array([[1 ,2],[-1, 1]])\n", + "Q=np.array([12,6])\n", + "R=np.linalg.solve(P,Q)\n", + "\n", + "# Results (A&B)\n", + "\n", + "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n", + "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n", + "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n", + "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact on ball B is 0.0 m/s\n", + "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n", + "The final velocity of ball B is 0.0 m/s\n", + "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-3,Page No:481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "h_1=9 # m # height of first bounce\n", + "h_2=6 # m # height of second bounce\n", + "\n", + "# Calculations\n", + "\n", + "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n", + "e=(h_2*h_1**-1)**0.5\n", + "# From eq'n 3 we get height of drop as,\n", + "h=h_1/e**2 # m\n", + "\n", + "# Results\n", + "\n", + "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n", + "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n", + "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ball was dropped from a height of 13.5 m\n", + "The coefficient of restitution between the glass and the floor is 0.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-4,Page No:484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "e=0.90 # coefficient o restitution\n", + "v_a=10 # m/s # velocity of ball A\n", + "v_b=15 # m/s # velocity of ball B\n", + "alpha_1=30 # degree # angle made by v_a with horizontal\n", + "alpha_2=60 # degree # angle made by v_b with horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# The components of initial velocity of ball A:\n", + "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n", + "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n", + "\n", + "# The components of initial velocity of ball B:\n", + "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n", + "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n", + "\n", + "# From eq'n 1 & 2 we get,\n", + "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n", + "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n", + "\n", + "# On adding eq'n 3 & 4 we get,\n", + "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n", + "\n", + "# On substuting the value of v'_b_x in eq'n 3 we get,\n", + "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n", + "\n", + "# Now the eq'n for resultant velocities of balls A & B after impact are,\n", + "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n", + "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n", + "\n", + "# The direction of the ball after Impact is,\n", + "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n", + "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n", + "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n", + "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n", + "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n", + "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of ball A after impact is 8.35 m/s\n", + "The velocity of ball B after impact is 15.18 m/s\n", + "The direction of ball A after impact is 36.77 degree\n", + "The direction of ball B after impact is 58.85 degree\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-5,Page No:485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "theta=30 # degrees # ange made by the ball against the wall\n", + "e=0.50\n", + "# Calculations\n", + "# The notations have been changed\n", + "# Resolving the velocity v as,\n", + "v_x=cos(theta*(pi/180))\n", + "v_y=sin(theta*(pi/180))\n", + "V_y=v_y\n", + "# from coefficient of restitution reation\n", + "V_x=-e*v_x\n", + "# Resultant velocity\n", + "V=sqrt(V_x**2+V_y**2)\n", + "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n", + "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n", + "# Results\n", + "\n", + "print\"The velocity of the ball is \",round(V,3),\"v\"\n", + "print\"The direction of the ball is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the ball is 0.661 v\n", + "The direction of the ball is 49.1 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-6,Page No:488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "e=0.8 # coefficient of restitution\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calcuations\n", + "\n", + "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n", + "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n", + "B=np.array([0.945**2,(-0.4*9.81)])\n", + "C=np.linalg.solve(A,B) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n", + "# The answer given in the book i.e 0.104 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The height from which the ball A should be released is 0.15 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-7,Page No:490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "theta_a=60 # degree # angle made by sphere A with the verticle\n", + "e=1 # coefficient of restitution for elastic impact\n", + "\n", + "# Calculations\n", + "\n", + "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n", + "theta_b=arccos(0.875)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle through which the sphere B will swing after the impact is 28.96 degree\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-8,Page No:491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "m_a=0.01 # kg # mass of bullet A\n", + "v_a=100 # m/s # velocity of bullet A\n", + "m_b=1 # kg # mass of the bob\n", + "v_b=0 # m/s # velocity of the bob\n", + "l=1 # m # length of the pendulum\n", + "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n", + "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# Momentum of the bullet & the bob before impact is,\n", + "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n", + "\n", + "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n", + "\n", + "# (a) When the bullet gets embedded into the bob\n", + "v_c=M/(m_a+m_b) # m/s\n", + "# The height h to which the bob rises is given by eq'n 3 as,\n", + "h_1=(0.5)*(v_c**2/g) # m\n", + "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n", + "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n", + "\n", + "# (b) When the bullet rebounds from the surface of the bob\n", + "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n", + "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_2=(v_bob_rebound**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n", + "\n", + "# (c) When the bullet pierces and escapes through the bob\n", + "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n", + "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n", + "# The equation for the height which the bob attains after impact is,\n", + "h_3=(v_b_escape**2)/(2*g) # m\n", + "# The corresponding angle of swing \n", + "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n", + "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n", + "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n", + "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n", + "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n", + "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-9,Page No:493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=50 # N # falling weight\n", + "W_b=50 # N # weight on which W_a falls\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "m_a=W_a/g # kg # mass of W_a\n", + "m_b=W_b/g # kg # mass of W_b\n", + "k=2*10**3 # N/m # stiffness of spring\n", + "h=0.075 # m # height through which W_a falls\n", + "\n", + "#Calculations\n", + "\n", + "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n", + "v_a=(2*g*h)**0.5 # m/s\n", + "\n", + "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n", + "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n", + "\n", + "# Initial compression of the spring due to weight W_b is given by,\n", + "delta_st=(W_b/k)*(10**2) # cm\n", + "\n", + "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n", + "a=1\n", + "b=-0.1\n", + "c=-0.000003\n", + "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n", + "delta=delta_t-delta_st # cm\n", + "\n", + "# Results\n", + "\n", + "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-10,Page No:494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "v_a=600 # m/s # velocity of the bullet before impact\n", + "v_b=0 # m/s # velocity of the block before impact\n", + "w_b=0.25 # N # weight of the bullet\n", + "w_wb=50 # N # weight of wodden block\n", + "mu=0.5 # coefficient of friction between the floor and the block\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "m_a=w_b/g # kg # mass of the bullet\n", + "m_b=w_wb/g # kg # mass of the block\n", + "\n", + "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n", + "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n", + "\n", + "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n", + "s=v_c**2/(2*g*mu) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance through which the block is displaced from its initial position is 0.91 m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.18-11,Page No:495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "M=750 # kg # mass of hammer\n", + "m=200 # kg # mass of the pile\n", + "h=1.2 # m # height of fall of the hammer\n", + "delta=0.1 # m # distance upto which the pile is driven into the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Caculations\n", + "\n", + "# The resistance to penetration to the pile is given by eq'n,\n", + "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n", + "\n", + "# Results\n", + "\n", + "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance to penetration to the pile is 79.0 KN\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_1.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_1.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_10.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_10.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_11.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_11.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_12.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_12.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb new file mode 100644 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_13.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb new file mode 100644 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_14.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_2.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_2.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_3.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_3.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_4.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_4.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_5.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_5.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_6.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_6.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_7.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_7.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_8.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_8.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_9.ipynb new file mode 100755 index 00000000..ca13c8e8 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_9.ipynb @@ -0,0 +1,262 @@ +{ + "metadata": { + "name": "chapter19.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Relative Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-1,Page no:503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_t=10 # m/s # velocity of the train\n", + "v_s=5 # m/s # velocity of the stone\n", + "\n", + "# Calculations\n", + "\n", + "# Let v_r be the relative velocity, which is given as, (from triangle law)\n", + "v_r=(v_t**2+v_s**2)**0.5 # m/s\n", + "# The direction ofthe stone is,\n", + "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n", + "print\"The direction of the stone is \",round(theta,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n", + "The direction of the stone is 26.57 degree\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-2,Page No:504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=5 # m/s # speed of ship A\n", + "v_B=2.5 # m/s # speed of ship B\n", + "theta=135 # degree # angle between the two ships\n", + "\n", + "# Calculations\n", + "\n", + "# Here,\n", + "OA=v_A # m/s\n", + "OB=v_B # m/s\n", + "\n", + "# The magnitude of relative velocity is given by cosine law as,\n", + "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n", + "\n", + "# where AB gives the relative velocity of ship B with respect to ship A\n", + "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n", + "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n", + "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n", + "The direction of the relative velocity is 14.64 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-3,Page No:505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "# Initilization of variables\n", + "\n", + "v_c=20 # km/hr # speed at which the cyclist is riding to west\n", + "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n", + "V_c=12 # km/hr # changed speed\n", + "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n", + "A=np.array([[1 ,1],[1, 0.577]])\n", + "B=np.array([20,12])\n", + "C=np.linalg.solve(A,B) # km/hr\n", + "\n", + "# The X component of relative velocity (v_R_x) is C(1)\n", + "# The Y component of relative velocity (v_R_y) is C(2)\n", + "\n", + "# Calculations\n", + "\n", + "# Relative velocity (v_R) is given as,\n", + "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n", + "# And the direction of absolute velocity of rain is theta, is given as\n", + "theta=arctan(C[1]/C[0])*(180/pi) # degree\n", + "\n", + "# Results \n", + "\n", + "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n", + "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of absolute velocity is 18.94 km/hr\n", + "The direction of absolute velocity is 86.7 degree\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.19-4,Page No:508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "a=1 # m/s^2 # acceleration of car A\n", + "u_B=36*1000*3600**-1 # m/s # velocity of car B\n", + "u=0 # m/s # initial velocity of car A\n", + "d=32.5 # m # position of car A from north of crossing\n", + "t=5 # seconds\n", + "\n", + "# Calculations\n", + "\n", + "# CAR A: Absolute motion using eq'n v=u+at we have,\n", + "v=u+(a*t) # m/s\n", + "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n", + "s_A=(u*t)+((0.5)*a*t**2)\n", + "# Now, let the position of car A after 5 seconds be y_A\n", + "y_A=d-s_A # m # \n", + "\n", + "# CAR B:\n", + "# let a_B be the acceleration of car B\n", + "a_B=0 # m/s\n", + "# Now position of car B is s_B\n", + "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n", + "x_B=s_B # m\n", + "\n", + "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n", + "OA=y_A\n", + "OB=x_B\n", + "BA=(OA**2+OB**2)**0.5 # m\n", + "theta=arctan(OA/OB)*(180/pi) # degree\n", + "\n", + "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n", + "oa=v\n", + "ob=u_B\n", + "v_AB=(oa**2+ob**2)**0.5 # m/s\n", + "phi=arctan(oa/ob)*(180/pi) # degree\n", + "\n", + "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n", + "a_AB=a-a_B # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n", + "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n", + "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n", + "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n", + "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relative position of car A relative to car B is 53.9 m\n", + "The direction of car A w.r.t car B is 21.8 degree\n", + "The velocity of car A relative to car B is 11.2 m/s\n", + "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n", + "The acceleration of car A relative to car B is 1.0 m/s^2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_1.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_1.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_10.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_10.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_11.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_11.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_12.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_12.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb new file mode 100644 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_13.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb new file mode 100644 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_14.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_2.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_2.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_3.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_3.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_4.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_4.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_5.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_5.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_6.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_6.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_7.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_7.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_8.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_8.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_9.ipynb new file mode 100755 index 00000000..7b30b675 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_9.ipynb @@ -0,0 +1,546 @@ +{ + "metadata": { + "name": "chapter20.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20: Motion Of Projectile" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-1,Page No:518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "v_o=500 # m/s # velocity of the projectile\n", + "alpha=30 # angle at which the projectile is fired\n", + "t=30 # seconds\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n", + "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n", + "\n", + "# MOTION IN HORIZONTA DIRECTION:\n", + "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n", + "\n", + "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n", + "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n", + "\n", + "# Let the Resultant velocity be v_R. It is given as,\n", + "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n", + "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n", + "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the projectile is 435.27 m/s\n", + "The direction of the projectile is 5.84 degree\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-2,Page no:519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_A=10 # m/s # velocity of body A\n", + "alpha_A=60 # degree # direction of body A\n", + "alpha_B=45 # degree # direction of body B\n", + "\n", + "# Calculations\n", + "\n", + "# (a) The velocity (v_B) for the same range is given by eq'n;\n", + "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n", + "\n", + "# (b) Now velocity v_B for the same maximum height is given as,\n", + "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n", + "\n", + "# (c) Now the velocity (v) for the equal time of flight is;\n", + "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n", + "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of body B for horizontal range is 9.3 m/s\n", + "(b) The velocity of body B for the maximum height is 12.25 m/s\n", + "(c) The velocity of body B for equal time of flight is 12.25 m/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-3,Page No:520 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "y=3.6 # m # height of the wall\n", + "x_1=4.8 # m # position of the boy w.r.t the wall\n", + "x_2=3.6 # m # distance from the wall where the ball hits the ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The range of the projectile is r, given as,\n", + "r=x_1+x_2 # m\n", + "\n", + "# Let the angle of the projection be alpha, which is derived and given as,\n", + "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n", + "\n", + "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n", + "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n", + "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least velocity with which the ball can be thrown is 9.78 m/s\n", + "The angle of projection for the same is 60.3 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-5,Page No:523 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=400 # m/s # initial velocity of each gun\n", + "r=5000 # m # range of each of the guns\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "p=180 # degree \n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# now from eq'n 1\n", + "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n", + "\n", + "# from eq'n 3\n", + "theta_2=(p-2*theta_1)/2 # degree \n", + "\n", + "# For 1st & 2nd gun, s is\n", + "s=r # m\n", + "\n", + "# For 1st gun \n", + "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n", + "\n", + "# Now the time of flight for 1st gun is t_1, which is given by relation,\n", + "t_1=s*(v_x)**-1 # seconds\n", + "\n", + "# For 2nd gun\n", + "V_x=v_o*cos(theta_2*(pi/180))\n", + "\n", + "# Now the time of flight for 2nd gun is t_2\n", + "t_2=s/V_x # seconds\n", + "\n", + "# Let the time difference between the two hits be delta.T. Then,\n", + "T=t_2-t_1 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time difference between the two hits is 67.5 seconds\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-6,Page No:524" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "h=2000 # m/ height of the plane\n", + "v=540*1000*3600**-1 # m/s # velocity of the plane\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Time t required to travel down a height 2000 m is given by eq'n,\n", + "u=0 # m/s # initial velocity\n", + "t=(2*h/g)**0.5 # seconds\n", + "\n", + "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n", + "s= v*t # m\n", + "\n", + "# angle is given as theta,\n", + "theta=arctan(h/s)*(180/pi) # degree\n", + "\n", + "# Results\n", + "\n", + "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n", + "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pilot should release the bomb from a distance of 3029.0 m\n", + "The angle at which the target would appear is 33.5 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-7,Page No:525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "theta=30 # degree # angle at which the bullet is fired\n", + "s=-50 # position of target below hill\n", + "v=100 # m/s # velocity at which the bullet if fired\n", + "g=9.81 # m/s^2 \n", + "\n", + "# Calculations\n", + "\n", + "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n", + "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n", + "\n", + "# (a) Max height attained by the bullet\n", + "h=v_y**2/(2*g) # m\n", + "\n", + "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n", + "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n", + "\n", + "# Let V be the velocity with wich it hits the target\n", + "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n", + "\n", + "# (c) The time required to hit the target\n", + "a=g # m/s^2\n", + "t=(v_y-(-V_y))/a # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n", + "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n", + "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n", + "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n", + "(c) The time required to hit the target is 11.1 seconds\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-8,Page No:527" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W=30 # N # Weight of the hammer\n", + "theta=30 # degree # ref fig.20.12\n", + "mu=0.18 # coefficient of friction\n", + "s=10 # m # distance travelled by the hammer # fig 20.12\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# The acceleration of the hammer is given as,\n", + "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n", + "\n", + "# The velocity of the hammer at point B is,\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n", + "v_x=v*cos(theta*(pi/180)) # m/s\n", + "v_y=v*sin(theta*(pi/180)) # m/s\n", + "\n", + "# MOTION IN VERTICAL DIRECTION\n", + "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n", + "# From the eq'n 4.9*t^2+4.1*t-5=0,\n", + "a=4.9\n", + "b=4.1\n", + "c=-5\n", + "\n", + "# The roots of the eq'n are,\n", + "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n", + "\n", + "# MOTION IN HORIZONTAL DIRECTION\n", + "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n", + "s_x=v_x*cos(theta*(pi/180))*t # m\n", + "x=1+s_x # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance x where the hammer hits the round is 5.16 m\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-9,Page no:528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "s=1000 # m # distance OB (ref fig.20.13)\n", + "h=19.6 # m # height of shell from ground\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "# MOTION OF ENTIRE SHELL FROM O to A.\n", + "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n", + "t=v_y/g # seconds # time taken by the entire shell to reach point A\n", + "v_x=s/t # m/s # velocity of shell in vertical direction\n", + "\n", + "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n", + "\n", + "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n", + "v_x2=v_x*2 # m/s\n", + "\n", + "# Now distance BC travelled by part 2 is\n", + "BC=v_x2*t # m\n", + "\n", + "# Distance from firing point OC\n", + "OC=s+BC # m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n", + "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n", + "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n", + "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The velocity of shell just before bursting is 500.0 m/s\n", + "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n", + "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n", + "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.20-10,Page No:530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_o=200 # m/s # initial velocity\n", + "theta=60 # degree # angle of the incline\n", + "y=5 # rise of incline\n", + "x=12 # length of incline\n", + "g=9.81 # m/s^2 # acc due to gravity\n", + "\n", + "\n", + "# Calculations\n", + "\n", + "# The angle of the inclined plane with respect to horizontal\n", + "beta=arctan(y*x**-1)*(180/pi) # degree\n", + "\n", + "# The angle of projection with respect to horizontal\n", + "alpha=90-theta # degree\n", + "\n", + "# Range is given by eq'n (ref. fig.20.14)\n", + "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "\n", + "# Range AC when the short is fired down the plane\n", + "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n", + "BC=AB+AC # m\n", + "\n", + "# Results\n", + "\n", + "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The range covered (i.e BC) is 7649.0 m\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_1.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_1.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_10.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_10.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_11.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_11.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_12.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_12.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb new file mode 100644 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_13.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb new file mode 100644 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_14.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_2.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_2.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_3.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_3.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_4.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_4.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_5.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_5.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_6.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_6.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_7.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_7.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_8.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_8.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_9.ipynb new file mode 100755 index 00000000..c58e0b47 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_9.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "chapter21.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21: Kinematics Of Rigid Body" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-1,Page No:536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1800 # r.p.m # Speed of the shaft\n", + "t=5 # seconds # time taken to attain the rated speed # case (a)\n", + "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", + "pi=3.14 # constant\n", + "\n", + "# Calculations\n", + "\n", + "omega=(2*pi*N)/(60)\n", + "\n", + "# (a)\n", + "# we take alpha_1,theta_1 & n_1 for case (a)\n", + "alpha_1=omega/t # rad/s^2 #\n", + "theta_1=(omega**2)/(2*alpha_1) # radian\n", + "# Let n_1 be the number of revolutions turned,\n", + "n_1=theta_1*(1/(2*pi))\n", + "\n", + "# (b)\n", + "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", + "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n", + "theta_2=(omega**2)/(2*alpha_2) # radians\n", + "# Let n_2 be the number of revolutions turned,\n", + "n_2=theta_2*(1/(2*pi))\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n", + "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n", + "(b) The no of revolutions the unit turns to come to rest is 1350.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-2,Page No:540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity of the cylinder at its centre\n", + "\n", + "# Calculations\n", + "\n", + "# The velocity of point E is given by using the triangle law as,\n", + "v_e=(2)**0.5*v_c # m/s \n", + "\n", + "# Similarly the velocity at point F is given as,\n", + "v_f=2*v_c # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n", + "print\"The velocity of point F is \",round(v_f),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of point E is 28.28 m/s\n", + "The velocity of point F is 40.0 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-3,Page No:541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_1=3 # m/s # uniform speed of the belt at top\n", + "v_2=2 # m/s # uniform speed of the belt at the bottom\n", + "r=0.4 # m # radius of the roller\n", + "\n", + "# Calculations\n", + "\n", + "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", + "A=[1 r;1 -r]\n", + "B=[v_1;v_2]\n", + "C=inv(A)*B\n", + "\n", + "# Results\n", + "\n", + "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n", + "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n", + "# NOTE: The answer of angular velocity is incorrect in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 12)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-4,Page No:542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity of A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# From the vector diagram linear velocity of end B is given as,\n", + "v_b=v_a/tan(theta*(pi/180)) # m/s \n", + "\n", + "# Now let the relative velocity be v_ba which is given as,\n", + "v_ba=v_a/sin(theta*(pi/180)) # m/s\n", + "\n", + "# Now let the angular velocity of the bar be theta_a which is given as,\n", + "theta_a=(v_ba)/l # radian/second\n", + "\n", + "# Velocity of point A\n", + "v_a=(0.5)*theta_a # m/s\n", + "\n", + "# Magnitude of velocity at point C is,\n", + "v_c=v_a # m/s # from the vector diagram\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n", + "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n", + "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the bar is 10.0 radian/second\n", + "(b) The velocity of end B is 8.67 m/s\n", + "(c) The velocity of mid point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-5,Page No:544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=0.12 # m # length of the crank\n", + "l=0.6 # m # length of the connecting rod\n", + "N=300 # r.p.m # angular velocity of the crank\n", + "theta=30 # degree # angle made by the crank with the horizontal\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Now let the angle between the connecting rod and the horizontal rod be phi\n", + "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n", + "\n", + "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", + "omega_oa=(2*pi*N)/(60) # radian/second\n", + "\n", + "# Linear velocity at A is given as,\n", + "v_a=r*omega_oa # m/s\n", + "\n", + "# Now using the sine rule linear velocity at B can be given as,\n", + "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n", + "\n", + "# Similarly the relative velocity (assume v_ba) is given as,\n", + "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n", + "\n", + "# Angular velocity (omega_ab) is given as,\n", + "omega_ab=v_ba/l # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n", + "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the connecting rod is 5.46 radian/second\n", + "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-6,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initiization of variables\n", + "\n", + "r=1 # m # radius of the cylinder\n", + "v_c=20 # m/s # velocity at the centre\n", + "\n", + "# Calculations\n", + "\n", + "# Angular velocity is given as,\n", + "omega=v_c/r # radian/second\n", + "\n", + "# Velocity at point D is\n", + "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n", + "\n", + "# Now, the velocity at point E is,\n", + "v_e=omega*2*r # m/s \n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n", + "print\"The velocity at point E is \",round(v_e),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point D is 28.28 m/s\n", + "The velocity at point E is 40.0 m/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-7,Page No:548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "r=5 # cm # radius of the roller\n", + "AB=0.1 # m\n", + "v_a=3 # m/s # velocity at A\n", + "v_b=2 # m/s # velocity at B\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", + "A=[-2 3;1 1]\n", + "B=[0;AB]\n", + "C=inv(A)*B\n", + "d1=C(2)*10**2 # cm # assume d1 for case 1\n", + "\n", + "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", + "P=[-v_b v_a;1 -1]\n", + "Q=[0;AB]\n", + "R=inv(P)*Q\n", + "d2=R(2)*10**2 # cm # assume d2 for case 2\n", + "\n", + "# Results\n", + "\n", + "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n", + "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 13)", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-8,Page No:550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of Variables\n", + "\n", + "v_c=1 # m/s # velocity t the centre\n", + "r1=0.1 # m \n", + "r2=0.20 # m\n", + "EB=0.1 # m\n", + "EA=0.3 # m\n", + "ED=(r1**2+r2**2)**0.5 # m\n", + "\n", + "# Calculations\n", + "\n", + "# angular velocity is given as,\n", + "omega=v_c/r1 # radian/seconds\n", + "\n", + "# Velocit at point B\n", + "v_b=omega*EB # m/s \n", + "\n", + "# Velocity at point A\n", + "v_a=omega*EA # m/s\n", + "\n", + "# Velocity at point D\n", + "v_d=omega*ED # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point A is \",round(v_a),\"m/s\"\n", + "print\"The velocity at point B is \",round(v_b),\"m/s\"\n", + "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point A is 3.0 m/s\n", + "The velocity at point B is 1.0 m/s\n", + "The velocity at point D is 2.24 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-9,Page No:551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of bar AB\n", + "v_a=5 # m/s # velocity at A\n", + "theta=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "IA=l*sin(theta*(pi/180)) # m\n", + "IB=l*cos(theta*(pi/180)) # m\n", + "IC=0.5 # m # from triangle IAC\n", + "\n", + "# Angular veocity is given as,\n", + "omega=v_a/(IA) # radian/second\n", + "v_b=omega*IB # m/s\n", + "v_c=omega*IC # m/s\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n", + "print\"The velocity at point C is \",round(v_c),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at point B is 8.67 m/s\n", + "The velocity at point C is 5.0 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-11,Page No:552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "v_a=2 # m/s # velocity at end A\n", + "r=0.05 # m # radius of the disc\n", + "alpha=30 # degree # angle made by the bar with the horizontal\n", + "\n", + "# Calculations \n", + "\n", + "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", + "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The anguar veocity of the bar is 11.53 radian/second\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-12,Page No:553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=0.6 # m \n", + "r=0.12 # m \n", + "theta=30 # degree # angle made by OA with the horizontal\n", + "phi=5.7 # degree # from EX 21.5\n", + "N=300\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", + "omega_oa=(2*pi*N)/(60) # radian/ second\n", + "\n", + "# Now,in triangle IBO.\n", + "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n", + "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n", + "\n", + "# from eq'n 5\n", + "v_b=(r*omega_oa*IB)/(IA) # m/s\n", + "\n", + "# From eq'n 6\n", + "omega_ab=(r*omega_oa)/(IA) # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n", + "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at B is 2.21 m/s\n", + "The angular velocity of the connecting rod is 5.47 radian/second\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.21-13,Page No:555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "omega_ab=5 # rad/s # angular veocity of the bar\n", + "AB=0.20 # m\n", + "BC=0.15 # m\n", + "CD=0.3 # m\n", + "theta=30 # degree # where theta= angle made by AB with the horizontal\n", + "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", + "\n", + "# Calculations\n", + "\n", + "# Consider triangle BIC\n", + "IB=sin(alpha*(pi/180))*BC*1 # m\n", + "IC=sin(theta*(pi/180))*BC*1 # m\n", + "v_b=omega_ab*AB # m/s\n", + "\n", + "# let the angular velocity of the bar BC be omega_bc\n", + "omega_bc=v_b/IB # radian/second\n", + "v_c=omega_bc*IC # m/s\n", + "\n", + "# let the angular velocity of bar DC be omega_dc\n", + "omega_dc=v_c/CD # radian/second\n", + "\n", + "# Results\n", + "\n", + "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n", + "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular velocity of bar BC is 7.7 rad/s\n", + "The angular velocity of bar CD is 1.92 rad/s\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_1.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_1.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_10.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_10.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_11.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_11.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_12.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_12.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb new file mode 100644 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_13.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb new file mode 100644 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_14.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_2.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_2.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_3.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_3.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_4.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_4.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_5.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_5.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_6.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_6.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_7.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_7.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_8.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_8.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter22_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_9.ipynb new file mode 100755 index 00000000..c5908132 --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_9.ipynb @@ -0,0 +1,282 @@ +{ + "metadata": { + "name": "chapter22.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-1,Page No:562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "N=1500 # r.p.m\n", + "r=0.5 # m # radius of the disc\n", + "m=300 # N # weight of the disc\n", + "t=120 # seconds # time in which the disc comes to rest\n", + "omega=0 \n", + "pi=3.14 \n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n", + "\n", + "# angular deceleration is given as,\n", + "alpha=-(omega_0/t) # radian/second^2\n", + "theta=(omega_0**2)/(2*(-alpha)) # radian\n", + "\n", + "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n", + "n=theta/(2*pi)\n", + "\n", + "# Now,\n", + "I_G=((0.5)*m*r**2)/g\n", + "\n", + "# The frictional torque is given as,\n", + "M=I_G*alpha # N-m\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n", + "print\"(b) The frictional torque is \",round(M),\"N-m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n", + "(b) The frictional torque is -5.0 N-m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-2,Page No:563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "s=1 # m\n", + "mu=0.192 # coefficient of static friction\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The maximum angle of the inclined plane is given as,\n", + "theta=arctan(3*mu)*(180/pi) # degree\n", + "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n", + "v=(2*a*s)**0.5 # m/s\n", + "\n", + "# Let the acceleration at the centre be A which is given as,\n", + "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n", + "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The acceleration at the centre is 4.896 m/s^2\n", + "(b) The maximum angle of the inclined plane is 30.0 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-5,Page No:568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "W_a=25 # N \n", + "W_b=25 # N \n", + "W=200 # N # weight of the pulley\n", + "i_g=0.2 # m # radius of gyration\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n", + "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of weight A is 1.08 m/s^2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-8,Page No:571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "r_1=0.075 # m\n", + "r_2=0.15 # m\n", + "P=50 # N\n", + "W=100 # N\n", + "i_g=0.05 # m\n", + "theta=30 # degree\n", + "g=9.81 # m/s^2\n", + "\n", + "# Calculations\n", + "\n", + "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n", + "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceleration of the pool is 1.62 m/s^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22.22-10,Page No:574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "L=1 # m # length of rod AB\n", + "m=10 # kg # mass of the rod\n", + "g=9.81 \n", + "theta=30 # degree\n", + "\n", + "# Calculations\n", + "\n", + "# solving eq'n 4 for omega we get,\n", + "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n", + "\n", + "# Now solving eq'ns 1 &3 for alpha we get,\n", + "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n", + "\n", + "# Components of reaction are given as,\n", + "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n", + "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n", + "R=(R_t**2+R_n**2)**0.5 # N \n", + "\n", + "# Results\n", + "\n", + "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n", + "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The angular velocity of the rod is 4.1 rad/sec\n", + "(b) The reaction at the hinge is 103.2 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/Engineering_Mechanics_by_Tayal_A.K./chapter23_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_1.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_1.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_10.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_10.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_11.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_11.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_12.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_12.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb new file mode 100644 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_13.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb new file mode 100644 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_14.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_2.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_2.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_3.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_3.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_4.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_4.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_5.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_5.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_6.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_6.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_7.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_7.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_8.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_8.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_9.ipynb new file mode 100755 index 00000000..e2d06a9e --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_9.ipynb @@ -0,0 +1,74 @@ +{ + "metadata": { + "name": "chapter23.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 23: Kinetics Of Rigid Body:Work And Energy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23.23-2,Page No:586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=600 # kg # mass of the roller\n", + "r=0.25 # m # radius of the roller\n", + "P=850 # N # Force\n", + "v=3 # m/s # velocity to be acquired\n", + "theta=30 # degree # angle made by v with the force P\n", + "\n", + "# Calculations\n", + "\n", + "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n", + "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n", + "\n", + "# Results\n", + "\n", + "print\"The distance required to be rolled is \",round(x,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance required to be rolled is 5.5 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_1.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_1.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_10.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_10.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_11.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_11.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_12.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_12.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb new file mode 100644 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_13.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb new file mode 100644 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_14.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_2.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_2.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_3.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_3.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_4.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_4.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_5.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_5.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_6.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_6.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_7.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_7.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_8.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_8.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_9.ipynb new file mode 100755 index 00000000..9fcc267a --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_9.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "chapter24.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 24: Mechanical Vibrations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-1,Page No:596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "f=0.1666666 # oscillations/second\n", + "x=8 # cm # distance from the mean position\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "\n", + "# Amplitude is given by eq'n \n", + "r=sqrt((25*x**2)/16) # cm\n", + "\n", + "# Maximum acceleration is given as,\n", + "a_max=(pi/3)**2*10 # cm/s^2\n", + "\n", + "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n", + "s=5 # cm\n", + "v=omega*(r**2-s**2)**0.5 # cm/s\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n", + "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n", + "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillation is 10.0 cm\n", + "(b) The maximum acceleration is 10.96 cm/s^2\n", + "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-2,Page No:597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n", + "x_2=0.2# m \n", + "\n", + "# assume velocities as v_1 & v_2\n", + "\n", + "v_1=1.2 # m/s\n", + "v_2=0.8 # m/s\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n", + "r=(0.064)**0.5 # m\n", + "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n", + "t=(2*pi)/omega # seconds\n", + "v_max=r*omega # m/s\n", + "\n", + "# let the max acceleration be a which is given as,\n", + "a=r*omega**2 # m/s^2\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n", + "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n", + "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n", + "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n", + "# NOTE: the value of t is incorrect in the text book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The amplitude of oscillations is 0.253 m\n", + "(b) The time period of oscillations is 1.22 seconds\n", + "(c) The maximum velocity is 1.31 m/s\n", + "(d) The maximum acceleration is 6.75 m/s^2\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exammple 24.24-5,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variabes\n", + "\n", + "W=50 # N # weight\n", + "x_0=0.075 # m # amplitude\n", + "f=1 # oscillation/sec # frequency\n", + "pi=3.14\n", + "g=9.81 \n", + "\n", + "# Calculations\n", + "\n", + "omega=2*pi*f\n", + "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n", + "\n", + "# let the total extension of the string be delta which is given as,\n", + "delta=(W/K)+(x_0*10**2) # cm\n", + "T=K*delta # N # Max Tension\n", + "v=omega*x_0 #m/s # max velocity\n", + "\n", + "# Results\n", + "\n", + "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n", + "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n", + "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The stiffness of the spring is 2.01 N/cm\n", + "(b) The maximum Tension in the spring is 65.08 N\n", + "(c) The maximum velocity is 0.47 m/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-10,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "l=1 # m # length of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Let t_s be the time period when the elevator is stationary\n", + "t_s=2*pi*(l/g)**0.5 #/ seconds\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-11,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "t=1 # second # time period of the simple pendulum\n", + "g=9.81 # m/s^2\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# Length of pendulum is given as,\n", + "l=(t/(2*pi)**2)*g # m\n", + "\n", + "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n", + "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n", + "\n", + "# Let t_d be the time period when the elevator moves downwards.\n", + "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n", + "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n", + "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24.24-12,Page No:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Initilization of variables\n", + "\n", + "m=15 # kg # mass of the disc\n", + "D=0.3 # m # diameter of the disc\n", + "R=0.15 # m # radius\n", + "l=1 # m # length of the shaft\n", + "d=0.01 # m # diameter of the shaft\n", + "G=30*10**9 # N-m^2 # modulus of rigidity\n", + "pi=3.14\n", + "\n", + "# Calculations\n", + "\n", + "# M.I of the disc about the axis of rotation is given as,\n", + "I=(m*R**2)*0.5 # kg-m^2\n", + "\n", + "# Stiffness of the shaft\n", + "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n", + "t=2*pi*(I/k_t)**0.5 # seconds\n", + "\n", + "# Results\n", + "\n", + "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period of oscillations of the disc is 0.48 seconds\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_1.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_1.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_1.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jI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LFy44x44dcxzHcS5fvuzcc889Y+r/f5GsL5n38Pfff3ccx3EGBgacsrIy58iRI4PO\nR7t3CXvF39raqlmzZikvL09paWlavny5/H7/oDGffvqpamtrJUllZWW6dOmSent7EzVFVyJZn6QR\nf+z132zBggWaOnXqsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp8suu0wd\nO3aUJI0aNUrvv/++brnlloZtcnJytHPnTnerBIA00717d+3YsaPZX+eqqefm5qqsrEzHjh2TZVl6\n5513lJ+f32ibnTt3yrKs0P761a9+5fsakvXrhz+0dPPNv9Lrr1vq3NnStGmWjh3zf10cP/YtHfav\npWXYVagXFhbqtttu04ABA1RQUCBJ+vGPf+zmJREgliVFItKNN0qbNkmffCL16yd98IHfKwMQj6vx\niyRNmzZN06ZN82ItCJj6UJekTp2kxYvtXzfcIJWWSjNmSOec4+8aATTGT5S6FI1G/V5C0tTVSQUF\n0UYfC1trD/PxC/O+SeHfv5aKWJaV1IdkRCIRJfktkCSDB0sPPSSVlDh/fvFiacoUWjuQDC3NTpo6\n4jp5/OIkbK0dCANCHXE1FerS17P2GTPsWftDD0nHj6dmfQBOR6gjrrq6pkO9Hq0dCAZCHXFZltSq\nGX9DaO2A/wh1xJXI+MUJrR3wD6GOuJozfjkVrR3wB6GOuFra1E9GawdSi1BHXM2dqcdD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h8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTH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LaqpqcHOnTsxZswY2aE06/jx41i+fDlKSkpQUVGB6upqvPnmmy1u\nLzXR+/r6orS0tOHr0tJS+Pn5SYzI+V25cgUPPPAAJk6ciLS0NNnhtMnLywtJSUn47LPPZIdynUOH\nDiE3Nxe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbG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KSrjdbpUjGsxqtcJqtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_10.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_10.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_10.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAx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132zBggWaOnXqsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3Xtw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o/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYr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xe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZm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IAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_11.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_11.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_11.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2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ck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZn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rq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8P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Y2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6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E4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_12.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_12.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_12.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K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3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m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"output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl4ejRo/bYLRERWUK1UU1NjTpixAh12bJl\nFm0fEBCgnj17tsn3AwMDVQB88MEHH3y04xEYGNhm3rWpdaOqKqZNm4bw8HDMmzev2W0qKysbevQF\nBQVQVRXe3t5Ntjt+/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vvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4s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l5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb new file mode 100644 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_13.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K9fv15er1clJSUqLy9XMBgcclxdXZ3mzZunoqIirVy5Un/++WfMkwUAuBfz7+O/fPmy\nJk2aJEnasWOH2tratHfv3kFjOjo69PDDD+vUqVMaP368li1bpqqqKtXW1oZPhN/HDwBRi6WdqbF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uopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp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DVYTV1dWqra097YKT5h4/T0J9\n9+7d6tq1a8Ofs7OztXv37ia32bVrlxdvn3SJ7F8kEtH777+vwsJCDR8+XFu3bk31MpPG5GOXiLAc\nu8rKSlVUVKi4uLjRx8Ny/OLtn+nHr66uTn379lXnzp01aNAg5efnN/p8c4+fJz9ekujVL6f+a2rK\nVTOJrLNfv36qqqpS27Zt9Ze//EUjR47Uxx9/nILVpYapxy4RYTh2R44c0ZgxYzR37lxlZmae9nnT\nj9+Z9s/049eqVSt99NFHOnTokIYOHapYLKZoNNpom+YcP0+aelZWlqqqqhr+XFVVpezs7DNuU/8D\nSyZIZP/OO++8hv9GDRs2TDU1NaG5c6XJxy4Rph+7mpoajR49WuPHj9fIkSNP+7zpx6+p/TP9+NVr\n3769rr32Wq1bt67Rx5t7/DwJ9QEDBmj79u2qrKxUdXW1Fi1apBEjRjTaZsSIEVqwYIEkqaysTB06\ndFDnzp29ePukS2T/9u3b1/CvaXl5uSzLCs0PY5l87BJh8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl4ejRo/bYLRERWUK1UU1NjTpixAh12bJl\nFm0fEBCgnj17tsn3AwMDVQB88MEHH3y04xEYGNhm3rWpdaOqKqZNm4bw8HDMmzev2W0qKysbevQF\nBQVQVRXe3t5Ntjt+/DhUVdX947nnnpMeQ2uP06dVeHg8h4kTVaSnq6irkx+Ts/4uGSfjlB2DJY/j\nx4+3mattat0cPHgQb7zxBvr164eYmBgAQHZ2Nk6ePAkAmDFjBrZu3YrVq1fDzc0NHh4e2Lx5s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//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4sWL\nSElJCfgsy2gL8H9SoiEiMp+0tDR89dVX4Q8SJLhz547w0EMPCefOnRO+/fZbITc3Vzh58uSgY1pa\nWoSysjJBEATh448/FoqKioJ+FgDhm2+kRBMf69evVzuEiPQQoyAwTrkxTnl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srOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb new file mode 100644 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_14.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K9fv15er1clJSUqLy9XMBgcclxdXZ3mzZunoqIirVy5Un/++WfMkwUAuBfz7+O/fPmy\nJk2aJEnasWOH2tratHfv3kFjOjo69PDDD+vUqVMaP368li1bpqqqKtXW1oZPhN/HDwBRi6WdqbFe\n7K/oS9KVK1c0bdq0sDGTJ09WWlqarl69qnHjxunq1avKysqK9ZIAgDiIOfyStG7dOu3bt0/p6elq\naWkJO5+RkaFXX31VM2bM0O23367Kyko98sgjbi4JAHBpxFs9FRUV6unpCXt+8+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0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp8suu0wd\nO3aUJI0aNUrvv/++brnlloZtcnJytHPnTnerBIA00717d+3YsaPZX+eqqefm5qqsrEzHjh2TZVl6\n5513lJ+f32ibnTt3yrKs0P761a9+5fsakvXrhz+0dPPNv9Lrr1vq3NnStG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Tn379lXnzp01aNAg5efnN/p8c4+fJz9ekujVL6f+a2rK\nVTOJrLNfv36qqqpS27Zt9Ze//EUjR47Uxx9/nILVpYapxy4RYTh2R44c0ZgxYzR37lxlZmae9nnT\nj9+Z9s/049eqVSt99NFHOnTokIYOHapYLKZoNNpom+YcP0+aelZWlqqqqhr+XFVVpezs7DNuU/8D\nSyZIZP/OO++8hv9GDRs2TDU1NaG5c6XJxy4Rph+7mpoajR49WuPHj9fIkSNP+7zpx6+p/TP9+NVr\n3769rr32Wq1bt67Rx5t7/DwJ9QEDBmj79u2qrKxUdXW1Fi1apBEjRjTaZsSIEVqwYIEkqaysTB06\ndFDnzp29ePukS2T/9u3b1/CvaXl5uSzLCs0PY5l87BJh8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl4ejRo/bYLRERWUK1UU1NjTpixAh12bJl\nFm0fEBCgnj17tsn3AwMDVQB88MEHH3y04xEYGNhm3rWpdaOqKqZNm4bw8HDMmzev2W0qKysbevQF\nBQVQVRXe3t5Ntjt+/DhUVdX947nnnpMeQ2uP06dVeHg8h4kTVaSnq6irkx+Ts/4uGSfjlB2DJY/j\nx4+3mattat0cPHgQb7zxBvr164eYmBgAQHZ2Nk6ePAkAmDFjBrZu3YrVq1fDzc0NHh4e2Lx5sy27\npDao4m8qXn0VGDYMePZZgCNaiVybTYl+8ODBuHr1aqvbzJ49G7Nnz7ZlN2SFG24Atm0D4uKAPn2A\nhx6SHRERyWKXi7GuxGQyyQ6hVaoK3HCDCQDQvTuwcycQHw/07g0MH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kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4sWL\nSElJCfgsy2gL8H9SoiEiMp+0tDR89dVX4Q8SJLhz547w0EMPCefOnRO+/fZbITc3Vzh58uSgY1pa\nWoSysjJBEATh448/FoqKioJ+FgDhm2+kRBMf69evVzuEiPQQoyAwTrkxTnlpOc7VqwWhrEwQ+vu9\nuTMSSSv6xMRENDY2orS0FP39/Xj22WeRlZWF3/72twCA5cuXY968eWhtbcWUKVNw3333YefOnSE/\nb98+YOFCKRERERlbSwvQ1AS0twMJURbfJSV6ACgrK0NZWd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+ ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_2.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_2.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_2.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K9fv15er1clJSUqLy9XMBgcclxdXZ3mzZunoqIirVy5Un/++WfMkwUAuBfz7+O/fPmy\nJk2aJEnasWOH2tratHfv3kFjOjo69PDDD+vUqVMaP368li1bpqqqKtXW1oZPhN/HDwBRi6WdqbFe\n7K/oS9KVK1c0bdq0sDGTJ09WWlqarl69qnHjxunq1avKysqK9ZIAgDiIOfyStG7dOu3bt0/p6elq\naWkJO5+RkaFXX31VM2bM0O23367Kyko98sgjbi4JAHBpxFs9FRUV6unpCXt+8+bNqqmpCR1v2bJF\np0+fVmNj46BxP//8s2pqanTkyBFNmTJFTzzxhJYuXaonn3wyfCIejzZs2BA69vl8/K1MAPgfgUBA\ngUAgdLxx48aob/XE5W/unj9/XlVVVWpvbx/0/IEDB9Tc3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c+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp8suu0wd\nO3aUJI0aNUrvv/++brnlloZtcnJytHPnTnerBIA00717d+3YsaPZX+eqqefm5qqsrEzHjh2TZVl6\n5513lJ+f32ibnTt3yrKs0P761a9+5fsakvXrhz+0dPPNv9Lrr1vq3NnStGmWjh3zf10cP/YtHfav\npWXYVagXFhbqtttu04ABA1RQUCBJ+vGPf+zmJREgliVFItKNN0qbNkmffCL16yd98IHfKwMQj6vx\niyRNmzZN06ZN82ItCJj6UJekTp2kxYvtXzfcIJWWSjNmSO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FHOnTokIYOHapYLKZoNNpom+YcP0+aelZWlqqqqhr+XFVVpezs7DNuU/8D\nSyZIZP/OO++8hv9GDRs2TDU1NaG5c6XJxy4Rph+7mpoajR49WuPHj9fIkSNP+7zpx6+p/TP9+NVr\n3769rr32Wq1bt67Rx5t7/DwJ9QEDBmj79u2qrKxUdXW1Fi1apBEjRjTaZsSIEVqwYIEkqaysTB06\ndFDnzp29ePukS2T/9u3b1/CvaXl5uSzLCs0PY5l87BJh8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACA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==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4sWL\nSElJCfgsy2gL8H9SoiEiMp+0tDR89dVX4Q8SJLhz547w0EMPCefOnRO+/fZbITc3Vzh58uSgY1pa\nWoSysjJBEATh448/FoqKioJ+FgDhm2+kRBMf69evVzuEiPQQoyAwTrkxTnlpOc7VqwWhrEwQ+vu9\nuTMSSSv6xMRENDY2orS0FP39/Xj22WeRlZWF3/72twCA5cuXY968eWhtbcWUKVNw3333YefOnSE/\nb98+YOFCKRERERlbSwvQ1AS0twMJURbfJSV6ACgrK0NZWdmg55YvXz7ocWNjY1SftWsXEz0RUSid\nncCzzwLvvQeMHRv9+zR1ZWxbG+DxqB1FeHa7Xe0QItJDjADjlBvjlJfW4rxzB6iuBl56Cfi3f4vt\nvRZB0MaNRywWC557TkB6OrB6tdr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3///fcxfvx45Ofna3ql7HP06FF0dHRg//792Lp1K44cOaJ2SIP09fWhvb0d\nL7zwAtrb23HfffehoaFB7bBC6u3txZ///Gc88cQTaocS1N///nf88pe/xPnz5+HxeHDz5k3s3r07\n5PGqJvqUlBR0dnYOPO7s7ITValUxIv27c+cOHn/8cfz4xz/Gj370I7XDiWjkyJEoLy/HsWPH1A5l\nkI8++gj79u3D5MmT8eSTT+Ivf/kLli5dqnZYISUnJwMAxo0bh8rKSrjdbpUjGsxqtcJqtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_3.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_3.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_3.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX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E6Pr1605+fr5z7tw5p7+/3/F6vc7JkycH\njTl48KCzaNEix3Ecp6WlxSkrK0vU9FyLZH2HDx92ampqRmmG7nz99dfODz/84BQWFg55Ppn3znFu\nvb5k3jvHcZwLFy44x44dcxzHcS5fvuzcc889Y+r/f5GsL5n38Pfff3ccx3EGBgacsrIy58iRI4PO\nR7t3CXvF39raqlmzZikvL09paWlavny5/H7/oDGffvqpamtrJUllZWW6dOmSent7EzVFVyJZn6QR\nf+z132zBggWaOnXqsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp8suu0wd\nO3aUJI0aNUrvv/++brnlloZtcnJytHPnTnerBIA00717d+3YsaPZX+eqqefm5qqsrEzHjh2TZVl6\n5513lJ+f32ibnTt3yrKs0P761a9+5fsakvXrhz+0dPPNv9Lrr1vq3NnStGmWjh3zf10cP/YtHfav\npWXYVagXFhbqtttu04ABA1RQUCBJ+vGPf+zmJREgliVFItKNN0qbNkmffCL16yd98IHfKwMQj6vx\niyRNmzZN06ZN82ItCJj6UJekTp2kxYvtXzfcIJWWSjNmSOec4+8aATTGT5S6FI1G/V5C0tTVSQUF\n0UYfC1trD/PxC/O+SeHfv5aKWJaV1IdkRCIRJfktkCSDB0sPPSSVlDh/fvFiacoUWjuQDC3NTpo6\n4jp5/OIkbK0dCANCHXE1FerS17P2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3769rr32Wq1bt67Rx5t7/DwJ9QEDBmj79u2qrKxUdXW1Fi1apBEjRjTaZsSIEVqwYIEkqaysTB06\ndFDnzp29ePukS2T/9u3b1/CvaXl5uSzLCs0PY5l87BJh8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6n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wNPTU3Y4zerQoQO+\n+OILlJWVYd++fbq73fzdd9/FrbfeipiYGF1XyvUOHjyIwsJC7N69G6tWrcL+/ftlh3Sd2tpaHD58\nGLNmzcLhw4fRuXNnLF68WHZYLaqpqcHOnTsxZswY2aE06/jx41i+fDlKSkpQUVGB6upqvPnmmy1u\nLzXR+/r6orS0tOHr0tJS+Pn5SYzI+V25cgUPPPAAJk6ciLS0NNnhtMnLywtJSUn47LPPZIdynUOH\nDiE3Nxe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0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lBR0dnYOPO7s7ITValUxIv27c+cOHn/8cfz4xz/Gj370I7XDiWjkyJEoLy/HsWPH1A5l\nkI8++gj79u3D5MmT8eSTT+Ivf/kLli5dqnZYISUnJwMAxo0bh8rKSrjdbpUjGsxqtcJqtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_4.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_4.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_4.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH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uzcc889Y+r/f5GsL5n38Pfff3ccx3EGBgacsrIy58iRI4PO\nR7t3CXvF39raqlmzZikvL09paWlavny5/H7/oDGffvqpamtrJUllZWW6dOmSent7EzVFVyJZn6QR\nf+z132zBggWaOnXqsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type":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6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\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aE06/jx41i+fDlKSkpQUVGB6upqvPnmmy1u\nLzXR+/r6orS0tOHr0tJS+Pn5SYzI+V25cgUPPPAAJk6ciLS0NNnhtMnLywtJSUn47LPPZIdynUOH\nDiE3Nxe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkR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qtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_5.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_5.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_5.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/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kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0g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J05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9E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TsxZswY2aE06/jx41i+fDlKSkpQUVGB6upqvPnmmy1u\nLzXR+/r6orS0tOHr0tJS+Pn5SYzI+V25cgUPPPAAJk6ciLS0NNnhtMnLywtJSUn47LPPZIdynUOH\nDiE3Nxe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk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GsxqtcJqtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_6.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_6.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_6.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4Q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qsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQ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iezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiI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YG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZu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fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_7.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_7.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_7.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK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XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4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vXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl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njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86J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TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_8.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_8.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_8.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K9fv15er1clJS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qSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4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+ "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl4ejRo/bYLRERWUK1UU1NjTpixAh12bJl\nFm0fEBCgnj17tsn3AwMDVQB88MEHH3y04xEYGNhm3rWpdaOqKqZNm4bw8HDMmzev2W0qKysbevQF\nBQVQVRXe3t5Ntjt+/DhUVdX947nn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9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4sWL\nSElJCf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wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_9.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_9.ipynb new file mode 100755 index 00000000..c424f5bc --- /dev/null +++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_9.ipynb @@ -0,0 +1,217 @@ +{ + "metadata": { + "name": "chapter25.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 25 :Shear Force And Bending Moment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-5,Page No:628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "# Initilization of variables\n", + "L_AB=3 # m # length of the beam\n", + "L_AC=1 # m\n", + "L_BC=2 # m\n", + "M_C=12 # kNm # clockwise moment at C\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "R_B=M_C/L_AB # kN # moment at A\n", + "R_A=-M_C/L_AB # kN # moment at B\n", + "\n", + "# S.F\n", + "F_A=R_A # kN \n", + "F_B=R_A # kN\n", + "\n", + "# B.M\n", + "M_A=0 # kNm\n", + "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n", + "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n", + "M_B=0 # kNm\n", + "\n", + "# Plotting SFD & BMD\n", + "x=[0, 0.99, 1, 3]\n", + "y=[-4, -4, -4, -4]\n", + "a=[0, 0.99, 1, 3]\n", + "b=[0, -4, 8, 0]\n", + "g=[0,0,0,0]\n", + "d=transpose(x)\n", + "e=transpose(b)\n", + "plt.plot(d,y)\n", + "plt.show()\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "# Results\n", + "print \"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU6dHg/H9vZuM71gevz2ef7fXK84oDHcRxHAAAzUkZ7AgCAxCL8AGAM4QcAYwg/ABhD+AHA\nGMIPAMakjvYE/lJSUqK2trbRngYAJBWv16vjx49H9Tn/mlf8bW1tchxnzD42bNgw6nNgbayP9Y29\nRywvmP814QcAJAbhBwBjCH+C+Hy+0Z7CP2Ysr01ifclurK8vFh7Hcf4Vv6vH4/HoXzIVAEgasbST\nV/wAYAzhBwBjCD8AGEP4AcAYwg8AxhB+ADCG8AOAMYQfAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDG\nEH4AMCbm8K9fv15er1clJSUqLy9XMBgcclxdXZ3mzZunoqIirVy5Un/++WfMkwUAuBfz7+O/fPmy\nJk2aJEnasWOH2tratHfv3kFjOjo69PDDD+vUqVMaP368li1bpqqqKtXW1oZPhN/HDwBRi6WdqbFe\n7K/oS9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8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGZlJREFUeJzt3XtwFfX9xvHnQPACsaC0gCZQLYEmARIC2LSKelACBRUp\n4IiIZgStjoBVGbF2eoHfFCheqjBexlGLpXhB6FSqUCpaDkVsjEAECkwFNG24CMNYEARMSPb3xzaR\nwB5ykt1zdr973q8ZZiDZnPPdWfbh4ZPNbsSyLEsAgFBo5fcCAADeIdQBIEQIdQAIEUIdAEKEUAeA\nECHUASBEXIf67Nmz1atXL/Xp00fjxo3TV1995cW6AAAt4CrUKysr9fzzz2vDhg3avHmzamtr9dpr\nr3m1NgBAM2W4+eJvfOMbatOmjY4eParWrVvr6NGjysrK8mptAIBmctXUL7jgAk2dOlXdunXTRRdd\npA4dOmjw4MFerQ0A0EyuQn3nzp168sknVVlZqT179ujIkSN6+eWXvVobAKCZXI1f1q1bp8suu0wd\nO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ra097YKT5h4/T0J9\n9+7d6tq1a8Ofs7OztXv37ia32bVrlxdvn3SJ7F8kEtH777+vwsJCDR8+XFu3bk31MpPG5GOXiLAc\nu8rKSlVUVKi4uLjRx8Ny/OLtn+nHr66uTn379lXnzp01aNAg5efnN/p8c4+fJz9ekujVL6f+a2rK\nVTOJrLNfv36qqqpS27Zt9Ze//EUjR47Uxx9/nILVpYapxy4RYTh2R44c0ZgxYzR37lxlZmae9nnT\nj9+Z9s/049eqVSt99NFHOnTokIYOHapYLKZoNNpom+YcP0+aelZWlqqqqhr+XFVVpezs7DNuU/8D\nSyZIZP/OO++8hv9GDRs2TDU1NaG5c6XJxy4Rph+7mpoajR49WuPHj9fIkSNP+7zpx6+p/TP9+NVr\n3769rr32Wq1bt67Rx5t7/DwJ9QEDBmj79u2qrKxUdXW1Fi1apBEjRjTaZsSIEVqwYIEkqaysTB06\ndFDnzp29ePukS2T/9u3b1/CvaXl5uSzLCs0PY5l87BJh8rGzLEsTJ05Ufn6+7rvvPsdtTD5+ieyf\nycfvwIEDOvi/26MeO3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25.25-7,Page No:631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy as np\n", + "\n", + "# Initilization of variables\n", + "\n", + "L_AD=8 # m # length of the beam\n", + "L_AB=2 # m \n", + "L_BC=4 # m\n", + "L_CD=2 # m\n", + "UDL=1 # kN/m\n", + "P=2 # kN # point load at A\n", + "\n", + "# Calculations\n", + "\n", + "# REACTIONS\n", + "\n", + "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n", + "\n", + "A=np.array([[1, 1],[ 1, 3]])\n", + "B=np.array([8,15])\n", + "C=np.linalg.solve(A,B)\n", + "\n", + "# SHEAR FORCE\n", + "\n", + "# the term F with suffixes 1 & 2 indicates SF just to left and right \n", + "F_A=-P # kN\n", + "F_B1=-P # kN\n", + "F_B2=-P+C[0] # kN\n", + "F_C1=-P+C[0]-(UDL*L_BC) # kN\n", + "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n", + "F_D=0\n", + "\n", + "# BENDING MOMENT\n", + "\n", + "# the term F with suffixes 1 & 2 indicates BM just to left and right\n", + "M_A=0 # kNm\n", + "M_B=(-P*L_CD) # kNm\n", + "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n", + "M_D=0 # kNm\n", + "\n", + "# LOCATION OF MAXIMUM BM\n", + "\n", + "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n", + "L_AE=4.5 # m # given\n", + "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n", + "\n", + "#Plotting\n", + "x_p=linspace(2,6,40)\n", + "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n", + "\n", + "# PLOTTING SFD & BMD\n", + "x=[0,1.99,2,4.5,5.99,6,8]\n", + "y=[-2,-2,2.5,0,-1.5,2,0]\n", + "z=[0,0,0,0,0,0,0]\n", + "a=[0,2,4.5,6,8]\n", + "b=[0,-4,-0.875,-2,0]\n", + "g=[0,0,0,0,0]\n", + "d=transpose(x)\n", + "plt.plot(d,y,x,z)\n", + "plt.show()\n", + "e=transpose(b)\n", + "plt.plot(a,e,a,g)\n", + "plt.show()\n", + "\n", + "\n", + "# Results\n", + "\n", + "print\"The graphs are the solutions\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVWW+B/DvUrAJSZQyVKDBuMhFBIzETHOTIpNcQsML\nZpqXxvGSx3I6XY6nYCZRp0xtdHzS8lYdtGxUbJRutr1GPCU1U1iiSXJRGm0w8RKC6/zxBinXzd57\n7Xfttb+f59kPt7X3+olr/fjt33rX+yqqqqogIiLD6iA7ACIi0hYTPRGRwTHRExEZHBM9EZHBMdET\nERkcEz0RkcHZlOhLS0sRHx+PiIgI9O3bFy+//HKTbcxmM7y8vBATE4OYmBg8//zztuySiIjayc2W\nJ7u7u2PZsmWIjo5GdXU17rjjDiQkJCAsLOy67YYOHYrc3FybAiUiIuvYVNH36NED0dHRAABPT0+E\nhYWhoqKiyXa8J4uISB679ehLSkpQWFiIuLi4676vKAoOHTqEqKgojBw5EkVFRfbaJRERWcCm1k29\n6upqpKenY8WKFfD09LzuZ/3790dpaSk8PDywe/dupKWl4ejRo/bYLRERWUK1UU1NjTpixAh12bJl\nFm0fEBCgnj17tsn3AwMDVQB88MEHH3y04xEYGNhm3rWpdaOqKqZNm4bw8HDMmzev2W0qKysbevQF\nBQVQVRXe3t5Ntjt+/DhUVdX947nnnpMeQ2uP06dVeHg8h4kTVaSnq6irkx+Ts/4uGSfjlB2DJY/j\nx4+3mattat0cPHgQb7zxBvr164eYmBgAQHZ2Nk6ePAkAmDFjBrZu3YrVq1fDzc0NHh4e2Lx5sy27\npDao4m8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kqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1QVPe5B/DvIjgdo9H6jizJGgQBRSBFGDOXzFpduEhw\nCjFKtDE1CWNMTW9TJxrHmxEnF8RknGkrptNq1Sb1EpvMeLEBd3zpbGJNmL0KsUk0xlQdkRXH1qtR\niUHw3D82Sxf3/bzseft+Zphhd8/ueTTh8cfzPOd3LIIgCCAiIsNKUDsAIiJSFhM9EZHBMdETERkc\nEz0RkcEx0RMRGRwTPRGRwUlO9E6nE5mZmUhPT8emTZuCHvOzn/0M6enpyM3NRUdHh9RTEhFRDCQl\n+v7+fqxcuRJOpxMnT55EU1MTTp06NeiY1tZWfPXVVzhz5gx+97vfYcWKFZICJiKi2EhK9G63G1Om\nTIHNZkNSUhKqq6vR3Nw86Jh9+/bh6aefBgAUFRXh2rVruHz5spTTEhFRDCQl+q6uLqSmpg48tlqt\n6OrqinjMxYsXpZyWiIhiICnRWyyWqI67d5eFaN9HRETSJUp5c0pKCjo7Owced3Z2wmq1hj3m4sWL\nSElJCfgsy2gL8H9SoiEiMp+0tDR89dVX4Q8SJLhz547w0EMPCefOnRO+/fZbITc3Vzh58uSgY1pa\nWoSysjJBEATh448/FoqKioJ+FgDhm2+kRBMf69evVzuEiPQQoyAwTrkxTnlpOc7VqwWh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tLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The graphs are the solutions\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b2fe11de Binary files /dev/null and b/Engineering_Mechanics_by_Tayal_A.K./screenshots/bending_moment_diagram_.png differ 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 new file mode 100644 index 00000000..00bf60e4 Binary files /dev/null and b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_.png differ 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 new file mode 100644 index 00000000..a193dcf3 Binary files /dev/null and b/Engineering_Mechanics_by_Tayal_A.K./screenshots/shear_force_diagram_1.png differ diff --git a/Engineering_Physics/screenshots/chap2.png b/Engineering_Physics/screenshots/chap2.png new file mode 100755 index 00000000..caa7fc64 Binary files /dev/null and b/Engineering_Physics/screenshots/chap2.png differ diff --git a/Engineering_Physics/screenshots/chap4.png b/Engineering_Physics/screenshots/chap4.png new file mode 100755 index 00000000..1fbea36d Binary files /dev/null and b/Engineering_Physics/screenshots/chap4.png differ diff --git a/Engineering_Physics/screenshots/chap5.png b/Engineering_Physics/screenshots/chap5.png new file mode 100755 index 00000000..e594df0e Binary files /dev/null and b/Engineering_Physics/screenshots/chap5.png differ diff --git a/Engineering_Physics_By_G_Vijayakumari/Chapter3.ipynb b/Engineering_Physics_By_G_Vijayakumari/Chapter3.ipynb index b55e472d..a832ae0d 100755 --- a/Engineering_Physics_By_G_Vijayakumari/Chapter3.ipynb +++ b/Engineering_Physics_By_G_Vijayakumari/Chapter3.ipynb @@ -7,6 +7,63 @@ "#3: Crystal Physics" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.1, Page number 57" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of 1st plane is ( 0.0 2.0 0.0 )\n", + "miller indices of 2nd plane is ( 1.0 2.0 0.0 )\n", + "miller indices of 3rd plane is ( 2.0 2.0 0.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x1=float('inf'); #numerical intercept on X axis\n", + "y1=1/2; #numerical intercept on Y axis\n", + "z1=float('inf'); #numerical intercept on Z axis\n", + "x2=1; #numerical intercept on X axis\n", + "y2=1/2; #numerical intercept on Y axis\n", + "z2=float('inf'); #numerical intercept on Z axis\n", + "x3=1/2; #numerical intercept on X axis\n", + "y3=1/2; #numerical intercept on Y axis\n", + "z3=float('inf'); #numerical intercept on Z axis\n", + "\n", + "#Calculation\n", + "p1=1/x1; #The miller indices of x-axis\n", + "q1=1/y1; #The miller indices of y-axis\n", + "r1=1/z1; #The miller indices of z-axis\n", + "p2=1/x2; #The miller indices of x-axis\n", + "q2=1/y2; #The miller indices of y-axis\n", + "r2=1/z2; #The miller indices of z-axis\n", + "p3=1/x3; #The miller indices of x-axis\n", + "q3=1/y3; #The miller indices of y-axis\n", + "r3=1/z3; #The miller indices of z-axis\n", + "\n", + "#Result\n", + "print \"miller indices of 1st plane is (\",p1,q1,r1,\")\"\n", + "print \"miller indices of 2nd plane is (\",p2,q2,r2,\")\"\n", + "print \"miller indices of 3rd plane is (\",p3,q3,r3,\")\"" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb new file mode 100644 index 00000000..aea79a8c --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter1.ipynb @@ -0,0 +1,684 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Acoustics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sound intensity level is imcreased by 13.01 dB when the intensity is doubled\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=20; #the intensity of a source is increased 20 times\n", + "\n", + "#Calculation\n", + "I=(10*(math.log10(i))); #intensity of sound(dB)\n", + "\n", + "#Result\n", + "print \"The sound intensity level is imcreased by\",round(I,2),\"dB when the intensity is doubled\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The sound intensity level is increased by 6 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=4; #the intensity of a source is increased 4 times\n", + "\n", + "#Calculation\n", + "I=(10*(math.log10(i))); #intensity of sound(dB)\n", + "\n", + "#Result\n", + "print \"The sound intensity level is increased by\",int(I),\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 2" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intensity level of a plane just leaving the runway is 150.0 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I=1000; #sound intensity of plane leaving the runway(Wm**-2)\n", + "Io=10**-12; #threshold intensity of sound(Wm**-2)\n", + "\n", + "#Calculation\n", + "IL=(10*math.log10(I/Io)); #The intensity level of a plane just leaving the runway(dB)\n", + "\n", + "#Result\n", + "print \"The intensity level of a plane just leaving the runway is\",IL,\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 2" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intensity level is 60.0 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I=10**-6; #intensity of sound during heavy traffic(Wm**-2)\n", + "Io=10**-12; #threshold intensity of sound(Wm**-2)\n", + "\n", + "#Calculation\n", + "IL=(10*math.log10(I/Io)); #The intensity level(dB)\n", + "\n", + "#Result\n", + "print \"The intensity level is\",IL,\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.5, Page number 3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intensity level is -48.9994 dB\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", + "Q=3.56; #rate of energy radiates(W)\n", + "r=15; #distance of intensity level(m)\n", + "Io=100; #reference intensity(Wm^-2)\n", + "\n", + "#Calculation\n", + "A=4*math.pi*r**2; #Area(m^2)\n", + "I=(Q/A); #sound intensity(Wm^-2)\n", + "IL=(10*math.log10(I/Io)); #The intensity level(dB)\n", + "\n", + "#Result\n", + "print \"The intensity level is\",round(IL,4),\"dB\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.6, Page number 3" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resultant sound level is 80.41 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Il1=70; #sound(dB)\n", + "Il2=80; #sound(dB)\n", + "\n", + "#Calculation\n", + "I1=10**(Il1/10); #ratio of intensity\n", + "I2=10**(Il2/10); #ratio of intensity\n", + "I=I1+I2; #intensity of sound(dB)\n", + "Il=10*math.log10(I); #resultant intensity(dB)\n", + "\n", + "#Result\n", + "print \"The resultant sound level is\",round(Il,2),\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.7, Page number 4" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The noise level at the point when 4 such drills are working at the same distance away is 101.02 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=4; #the intensity of a source\n", + "I1=95; #The noise level of sound from a drill(dB)\n", + "\n", + "#Calculation\n", + "I2=(10*(math.log10(i))); #intensity of source(dB)\n", + "IL=I1+I2; #The noise level at this point(dB)\n", + "\n", + "#Result\n", + "print \"The noise level at the point when 4 such drills are working at the same distance away is\",round(IL,2),\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.8, Page number 4" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flow of energy across 1m^2 per second is 6.638 *10**4 Wm**-2\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", + "f=426; #frequency of sound(Hz)\n", + "a=0.65*10**-2; #amplitude of sound wave(m)\n", + "A=1; #area(m^2)\n", + "v=340; #velocity of sound in air(ms^-1)\n", + "d=1.29; #density of air(Kgm^-3)\n", + "\n", + "#Calculation\n", + "I=(2*math.pi**2*f**2*a**2*d*v); #The flow of energy across 1m^2 per second(Wm^-2*10^4)\n", + "\n", + "#Result\n", + "print \"The flow of energy across 1m^2 per second is\",round(I/10**4,3),\"*10**4 Wm**-2\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.9, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The reverberation time of the hall is 2.087 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=1000; #volume of hall(m^3)\n", + "S=400; #sound absorbing surface of area(m^2)\n", + "a=0.2; #average absorption coefficient(sabine)\n", + "\n", + "#Calculation\n", + "T=(0.167*V)/(a*S); #The reverberation time of the hall(sec)\n", + "\n", + "#Result\n", + "print \"The reverberation time of the hall is\",round(T,3),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.10, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The average absorbtion coefficient is 0.2374 O.W.U\n", + "Total sound absorbtion of the room is 128.2 O.W.U m^2\n", + "answer varies due to rounding off errors\n", + "The reverberation time is 1.954 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=1500; #volume of room(m^3)\n", + "a1=0.03; #average sound coefficient for wall(sabine)\n", + "a2=0.06; #average sound coefficient for the ceiling(sabine)\n", + "a3=0.8; #average sound coefficient for the floor(sabine)\n", + "S1=260; #The wall area of the room(m^2)\n", + "S2=140; #The floor area of the room(m^2)\n", + "S3=140; #The ceiling area of the room(m^2)\n", + "\n", + "#Calculation\n", + "a=((a1*S1)+(a2*S2)+(a3*S3))/(S1+S2+S3); #The average absorbtion coefficient(O.W.U)\n", + "TS=S1+S2+S3; #total area of the room(m^2)\n", + "x=(a*TS); #Total sound absorbtion of the room(O.W.U m^2)\n", + "T=((0.167*V)/x); #The reverberation time(sec)\n", + "\n", + "#Result\n", + "print \"The average absorbtion coefficient is\",round(a,4),\"O.W.U\"\n", + "print \"Total sound absorbtion of the room is\",x,\"O.W.U m^2\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"The reverberation time is\",round(T,3),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.11, Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The area of interior surfaces is 3340.0 m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12000; #volume of auditorium(m^3)\n", + "T=1.5; #The reverberation time of the auditorium(sec)\n", + "a=0.4; #average absorption coefficient(sabine)\n", + "\n", + "#Calculation\n", + "S=(0.167*V)/(a*T); #area of interior surfaces(m^2)\n", + "\n", + "#Result\n", + "print \"The area of interior surfaces is\",S,\"m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.12, Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total absorbtion in the hall is 835.0 sabine m^2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=7500; #volume of cinema hall(m^3)\n", + "T=1.5; #The reverberation time of the cinema hall(sec)\n", + "\n", + "#Calculation\n", + "TaS=(0.167*V)/(T); #The total absorbtion in the hall(sabine m^2)\n", + "\n", + "#Result\n", + "print \"The total absorbtion in the hall is\",TaS,\"sabine m^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.13, Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The new reverberation time after placing the cushioned chairs is 1.3115 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12500; #volume of hall(m^3)\n", + "T1=1.5; #The reverberation time of the hall(sec)\n", + "a2S2=200; #The number of cushioned chairs are additionally placed in the hall(sabine-m^2)\n", + "\n", + "#Calculation\n", + "Ta1S1=(0.167*V)/T1; #The reverberation time before placed cushioned chairs(sabine m^2)\n", + "T2=(0.167*V)/(Ta1S1+a2S2); #The new reverberation time after placing the cushioned chairs(sec)\n", + "\n", + "#Result\n", + "print \"The new reverberation time after placing the cushioned chairs is\",round(T2,4),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.14, Page number 14" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The reverberation time for the hall is 1.2794 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=475; #volume of hall(m^3)\n", + "a1=0.025; #absorbtion coefficient for wall(O.W.U)\n", + "a2=0.02; #absorbtion coefficient for the ceiling(O.W.U)\n", + "a3=0.55; #absorbtion coefficient for the floor(O.W.U)\n", + "S1=200; #The wall area of the room(m^2)\n", + "S2=100; #The floor area of the room(m^2)\n", + "S3=100; #The ceiling area of the room(m^2)\n", + "\n", + "#Calculation\n", + "TaS=((a1*S1)+(a2*S2)+(a3*S3)); #The average absorbtion coefficient(O.W.U-m^2)\n", + "T=((0.167*V)/TaS); #The reverberation time(sec)\n", + "\n", + "#Result\n", + "print \"The reverberation time for the hall is\",round(T,4),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.15, Page number 14" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The reverberation time in the hall without audience is 3.9879 sec\n", + "The reverberation time in the hall with audience is 1.99396 sec\n", + "Thus,the reverberation reduces to half of its initial value when the audience fill the hall\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2265; #volume of hall(m^3)\n", + "Ta1S1=94.85; #The total absorbtion coefficient(m^2)\n", + "\n", + "#Calculation\n", + "T1=((0.167*V)/Ta1S1); #The reverberation time in the hall without audience(sec)\n", + "Ta2S2=2*Ta1S1; #The new absorbtion coefficient(m^2)\n", + "T2=((0.167*V)/Ta2S2); #The reverberation time in the hall with audience(sec)\n", + "\n", + "#Result\n", + "print \"The reverberation time in the hall without audience is\",round(T1,4),\"sec\"\n", + "print \"The reverberation time in the hall with audience is\",round(T2,5),\"sec\"\n", + "print \"Thus,the reverberation reduces to half of its initial value when the audience fill the hall\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.16, Page number 14" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The average absorbing power of the surface is 0.48789 sabine\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=120000; #Volume of the hall(m^3)\n", + "T=1.55; #The reverberation time(sec)\n", + "S=26500; #The total absorbing surface(m^2)\n", + "\n", + "#Calculation\n", + "TaS=(0.167*V)/T; #The average absorbtion coefficient(sabine-m^2)\n", + "a=(TaS/S); #The average absorbing power of the surface(sabine)\n", + "\n", + "#Result\n", + "print \"The average absorbing power of the surface is\",round(a,5),\"sabine\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb new file mode 100644 index 00000000..d6847b23 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter10.ipynb @@ -0,0 +1,627 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Intrinsic Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic carrier concentration at room temperature is 1.3889 *10**16 m^-3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ec=4*10**-4; #electrical conductivity of intrinsic silicon at room temperature(ohm^-1 m^-1)\n", + "me=0.14; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.04; #The hole mobility(m^2 V^-1 s^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "ni=ec/(e*(me+mh)); #The intrinsic carrier concentration at room temperature(m^-3)\n", + "\n", + "#Result\n", + "print \"The intrinsic carrier concentration at room temperature is\",round(ni/10**16,4),\"*10**16 m^-3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistivity of intrinsic carrier is 0.4709 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.37*10**19; #The intrinsic carrier density at room temperature(m^-3)\n", + "me=0.38; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.18; #The hole mobility(m^2 V^-1 s^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "r=1/(d*e*(me+mh)); #The resistivity of intrinsic carrier(ohm m)\n", + "\n", + "#Result\n", + "print \"The resistivity of intrinsic carrier is\",round(r,4),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.3, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic carrier density at room tepmerature is 5.04 *10**21 m^-3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=2*10**-4; #the resistivity of In-Sb(ohm m)\n", + "me=6; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.2; #The hole mobility(m^2 V^-1 s^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "d=1/(r*e*(me+mh)); #The intrinsic carrier density at room tepmerature(m^-3)\n", + "\n", + "#Result\n", + "print \"The intrinsic carrier density at room tepmerature is\",round(d/10**21,2),\"*10**21 m^-3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.4, Page number 278" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electrical conductivity at room temperature is 1.4374 *10**-3 ohm^-1 m^-1\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", + "Eg=1.1*1.6*10**-19; #The energy gap of silicon(J)\n", + "me=0.48; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.13; #The hole mobility(m^2 V^-1 s^-1)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of an electron\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "t=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "ni=2*(2*math.pi*m*kb*t/h**2)**(3/2)*math.exp(-Eg/(2*kb*t)); #intrinsic carrier concentration(m^-3)\n", + "ec=ni*e*(me+mh); #The electrical conductivity at room temperature(ohm^-1 m^-1 *10^-3)\n", + "\n", + "#Result\n", + "print \"The electrical conductivity at room temperature is\",round(ec*10**3,4),\"*10**-3 ohm^-1 m^-1\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.5, Page number 279" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic carrier concentration is 1.983 *10**12 m^-3\n", + "The electrical conductivity at room temperature is 2.8239 *10**-7 ohm^-1 m^-1\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", + "Eg=1.43*1.6*10**-19; #The energy gap of intrinsic GaAs(J)\n", + "xe=0.85; #The electron mobility(m^2 V^-1 s^-1)\n", + "xh=0.04; #The hole mobility(m^2 V^-1 s^-1)\n", + "me=0.068*9.11*10**-31; #effective mass of electron(m)\n", + "mh=0.5*9.11*10**-31; #effective mass of hole(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of an electron(kg)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "t=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "ni=2*(2*math.pi*kb*t/h**2)**(3/2)*(me*mh)**(3/4)*math.exp(-Eg/(2*kb*t)); #intrinsic carrier concentration(m^-3)\n", + "ec=ni*e*(xe+xh); #The electrical conductivity at room temperature(ohm^-1 m^-1)\n", + "\n", + "#Result\n", + "print \"The intrinsic carrier concentration is\",round(ni/10**12,3),\"*10**12 m^-3\"\n", + "print \"The electrical conductivity at room temperature is\",round(ec*10**7,4),\"*10**-7 ohm^-1 m^-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.6, Page number 279" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of the fermi level is 9.223086 *10**-20 J or 0.5764 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=1.12*1.6*10**-19; #Energy gap of Si semi conductor(J)\n", + "me=0.12*9.11*10**-31; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.28*9.11*10**-31; #The hole mobility(m^2 V^-1 s^-1)\n", + "t=300; #temperature of fermi level(K)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "m=9.11*10**-31; #mass of an electron(Kg)\n", + "\n", + "#Calculation\n", + "Ef=(Eg/2)+((3*kb*t/4)*math.log(mh/me)); #position of the fermi level(J)\n", + "\n", + "#Result\n", + "print \"The position of the fermi level is\",round(Ef*10**20,6),\"*10**-20 J or\",round(Ef/(1.6*10**-19),4),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.7, Page number 280" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Temperature of the fermi level shifted by 10% is 1115.127 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=1*1.6*10**-19; #Energy gap(J)\n", + "E=0.1*1.6*10**-19; #Fermi level is shifted by 10%(J)\n", + "me=1*9.11*10**-31; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=4*9.11*10**-31; #Effective mass of holes is 4 times that of electrons(m^2 V^-1 s^-1)\n", + "m=9.11*10**-31; #mass of an electron(kg)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "T=4*E/(3*kb*math.log(4)); #The Temperature of the fermi level shifted by 10%(K)\n", + "\n", + "#Result\n", + "print \"The Temperature of the fermi level shifted by 10% is\",round(T,3),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.8, Page number 281" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance of an intrinsic Ge rod is 4310 ohm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=1*10**-2; #length of the intrinsic Ge rod(m)\n", + "b=1*10**-3; #breadth of the intrinsic Ge rod(m)\n", + "t=1*10**-3; #thickness of the intrinsic Ge rod(m)\n", + "T=300; #temperature of the intrinsic Ge rod(K)\n", + "me=0.39; #The electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.19; #The hole mobility(m^2 V^-1 s^-1)\n", + "ni=2.5*10**19; #intrinsic carrier conduction(m^3)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "ec=ni*e*(me+mh); #The electrical conductivity at room temperature(ohm^-1 m^-1)\n", + "A=b*t; #area(m^2)\n", + "R=l/(ec*A); #The resistance of an intrinsic Ge rod(ohm)\n", + "\n", + "#Result\n", + "print \"The resistance of an intrinsic Ge rod is\",int(R),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.9, Page number 281" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The ratio of conductiveness is 1.08 *10**5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=1.2*1.6*10**-19; #The energy gap of intrinsic semiconductor(J)\n", + "T1=600; #Temperature(K)\n", + "T2=300; #Temperature(K)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "x=math.exp((-Eg/(2*kb))*((1/T1)-(1/T2))); #The ratio of conductiveness\n", + "\n", + "#Result\n", + "print \"The ratio of conductiveness is\",round(x/10**5,2),\"*10**5\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.10, Page number 282" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The conductivity of Ge at T2 is 4.969895 ohm^-1 m^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=0.72*1.6*10**-19; #The band gap of Ge(J)\n", + "T1=293; #Temperature(K)\n", + "T2=313; #Temperature(K)\n", + "x1=2; #The conductivity of Ge at T1(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "x2=x1*math.exp((Eg/(2*kb))*((1/T1)-(1/T2))); #The ratio of conductiveness\n", + "\n", + "#Result\n", + "print \"The conductivity of Ge at T2 is\",round(x2,6),\"ohm^-1 m^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.11, Page number 282" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic carrier density of A to B is 1015\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg1=0.36; #The energy gap of intrinsic semiconductor A(eV)\n", + "Eg2=0.72; #The energy gap of intrinsic semiconductor B(eV)\n", + "T1=300; #Temperature of semiconductor A(K)\n", + "T2=300; #Temperature of semiconductor B(K)\n", + "m=9.11*10**-31; #mass of an electron(kg)\n", + "KT=0.026; #kt(eV)\n", + "\n", + "#Calculation\n", + "x=math.exp((Eg2-Eg1)/(2*KT)); #The intrinsic carrier density of A to B\n", + "\n", + "#Result\n", + "print \"The intrinsic carrier density of A to B is\",int(x)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.12, Page number 283" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The band gap of semiconductor is 5.5863 *10**-20 J or 0.349 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=293; #Temperature(K)\n", + "T2=373; #Temperature(K)\n", + "x1=250; #The conductivity of semiconductor at T1(ohm^-1 m^-1)\n", + "x2=1100; #The conductivity of semiconductor at T2(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Eg=2*kb*math.log(x2/x1)*(T1*T2/(T2-T1)); #The band gap of semiconductor(J)\n", + "\n", + "#Result\n", + "print \"The band gap of semiconductor is\",round(Eg*10**20,4),\"*10**-20 J or\",round(Eg/(1.6*10**-19),3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.13, Page number 284" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mobility of pure semi conductor is 0.08283 m^2 V^-1 s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "me=50; #The electron mobility of pure semi conductor(m^2 V^-1 s^-1)\n", + "t1=4.2; #temperature of pure semi conductor(K)\n", + "t2=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "m=me*((t2**(-3/2))/(t1**(-3/2))); #mobility of pure semi conductor(m^2 V^-1 s^-1)\n", + "\n", + "#Result\n", + "print \"mobility of pure semi conductor is\",round(m,5),\"m^2 V^-1 s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.14, Page number 284" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The band gap of an intrinsic semi conductor is 1.183808 *10**-19 J or 0.7399 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ec1=19.96; #The electrical conductivity of an intrinsic semi conductor(ohm^-1 m^-1)\n", + "ec2=79.44; #The increasing electrical conductivity of an intrinsic semi conductor(ohm^-1 m^-1)\n", + "t1=333; #temperature of an intrinsic semi conductor(K)\n", + "t2=373; #increasing temperature of an intrinsic semi conductor(K)\n", + "kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Eg=2*kb*math.log(ec2/ec1)*((t1*t2)/(t2-t1)); #The band gap of an intrinsic semi conductor(J)\n", + "\n", + "#Result\n", + "print \"The band gap of an intrinsic semi conductor is\",round(Eg*10**19,6),\"*10**-19 J or\",round(Eg/(1.6*10**-19),4),\"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/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb new file mode 100644 index 00000000..a7245a22 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter11.ipynb @@ -0,0 +1,613 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#11: Extrinsic Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.1, Page number 307" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Before adding boron atoms,the semiconductor is an intrinsic semiconductor\n", + "conductivity before adding boron atoms is 2.016 ohm^-1 m^-1\n", + "After adding boron atoms,the semiconductor becomes a P-type semiconductor\n", + "conductivity after adding boron atoms is 1.44 *10**4 ohm^-1 m^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.1*10**19; #intrinsic charge carriers(m^-3)\n", + "me=0.4; #electron mobility(m^2 V^-1 s^-1)\n", + "mh=0.2; #hole mobility(m^2 V^-1 s^-1)\n", + "d=4.5*10**23; #density of boron(m^-3)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "C=ni*e*(me+mh); #conductivity before adding boron atoms(ohm^-1 m^-1)\n", + "c=d*e*mh; #conductivity after adding boron atoms(ohm^-1 m^-1)\n", + "\n", + "#Result\n", + "print \"Before adding boron atoms,the semiconductor is an intrinsic semiconductor\"\n", + "print \"conductivity before adding boron atoms is\",C,\"ohm^-1 m^-1\"\n", + "print \"After adding boron atoms,the semiconductor becomes a P-type semiconductor\"\n", + "print \"conductivity after adding boron atoms is\",c/10**4,\"*10**4 ohm^-1 m^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.2, Page number 307" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DensiTy of electrons in n-type silicon is 1.4423 *10**24 electrons/m^3\n", + "DensiTy of holes in n-type silicon is 1.56 *10**8 holes/m^3\n", + "DensiTy of holes in p-type silicon is 3.75e+24 holes/m^3\n", + "DensiTy of electrons in p-type silicon is 6.0 *10**7 electrons/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=1.5*10**16; #intrinsic charge carriers(m^-3)\n", + "me=1300*10**-4; #electron mobility(m^2 V^-1 s^-1)\n", + "mh=500*10**-4; #hole mobility(m^2 V^-1 s^-1)\n", + "c=3*10**4; #conductivity of n-tpye silicon(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "ne=c/(e*me); #DensiTy of electrons in n-type silicon(electrons/m^3)\n", + "nh=ni**2/ne; #Density of holes in n-type silicon(holes/m^3)\n", + "Ne=c/(e*mh); #Density of holes in p-type silicon(holes/m^3)\n", + "Nh=ni**2/Ne; #Density of electrons in p-type silicon(holes/m^3)\n", + "\n", + "#Result\n", + "print \"DensiTy of electrons in n-type silicon is\",round(ne/10**24,4),\"*10**24 electrons/m^3\"\n", + "print \"DensiTy of holes in n-type silicon is\",nh/10**8,\"*10**8 holes/m^3\"\n", + "print \"DensiTy of holes in p-type silicon is\",Ne,\"holes/m^3\"\n", + "print \"DensiTy of electrons in p-type silicon is\",Nh/10**7,\"*10**7 electrons/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.3, Page number 308" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electron concentration is 2.0 *10**9 electrons/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2*10**16; #intrinsic charge carriers(m^-3)\n", + "Na=5*10**23; #density of acceptor concentration of silicon with arsenic(atoms)\n", + "Nd=3*10**23; #density of donor concentration of silicon with arsenic(atoms)\n", + "\n", + "#Calculation\n", + "nh=Na-Nd; #density of hole(m^-3)\n", + "ne=ni**2/nh; #The electron concentration(electrons/m^3)\n", + "\n", + "#Result\n", + "print \"The electron concentration is\",ne/10**9,\"*10**9 electrons/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.4, Page number 309" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of fermi level is 4.893 *10**-20 J or 0.3058 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=5*10**28; #density of silicon atom(atoms/m^3)\n", + "nd=2.5*10**7; #donor concentration in 1 atom per si atom\n", + "T=300; #Temperature(K)\n", + "Eg=1.1*1.6*10**-19; #Eg for silicon(eV)\n", + "kb=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "m=9.11*10**-31; #mass of electon(kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "\n", + "#Calculation\n", + "Nd=d/nd; #The donor concentration(atoms/m^3)\n", + "Ef=(Eg/2)+(kb*T*(math.log(Nd/(2*((2*math.pi*m*kb*T)/h**2)**(3/2))))); #The position of fermi level at 300K(J)\n", + "\n", + "#Result\n", + "print \"The position of fermi level is\",round(Ef*10**20,3),\"*10**-20 J or\",round(Ef/(1.6*10**-19),4),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.5, Page number 310" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The density of the intrinsic crystal for p-type is 1.302 *10**21 m^-3\n", + "The minor carrier concentration for p-type is 1.728e+11 electrons/m^3\n", + "The density of the intrinsic crystal for n-type is 4.6296 *10**20 m^-3\n", + "The minor carrier concentration for n-type is 4.86e+11 holes/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=1.5*10**16; #intrinsic charge carriers(m^-3)\n", + "r1=10*10**-2; #resistivity of p-type silicon(ohm m)\n", + "r2=10*10**-2; #resistivity of n-type silicon(ohm m)\n", + "me=1350*10**-4; #The mobility of the charge carrier(m^2 V^-1 s^-1)\n", + "mh=480*10**-4; #The hole charge carrier(m^2 V^-1 s^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "Na=1/(r1*e*mh); #The density of the intrinsic crystal for p-type(m^-3)\n", + "ne=ni**2/Na; #The minor carrier concentration for p-type(electrons/m^3)\n", + "Nd=1/(r2*e*me); #The density of the intrinsic crystal for n-type(m^-3)\n", + "nh=ni**2/Nd; #The minor carrier concentration for n-type(electrons/m^3)\n", + "\n", + "#Result\n", + "print \"The density of the intrinsic crystal for p-type is\",round(Na/10**21,3),\"*10**21 m^-3\"\n", + "print \"The minor carrier concentration for p-type is\",ne,\"electrons/m^3\"\n", + "print \"The density of the intrinsic crystal for n-type is\",round(Nd/10**20,4),\"*10**20 m^-3\"\n", + "print \"The minor carrier concentration for n-type is\",nh,\"holes/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.6, Page number 315" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electron mobility is 0.14 m^2 V^-1 s^-1\n", + "The charge carrier density is 5e+21 electrons/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=112; #conductivity of a n-type silicon specimen(ohm^-1 m^-1)\n", + "RH=1.25*10**-3; #Hall coefficient of a n-type silicon specimen(m^3 C^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "me=c*RH; #electron mobility(m^2 V^-1 s^-1)\n", + "ne=c/(me*e); #The charge carrier density(electrons/m^3)\n", + "\n", + "#Result\n", + "print \"The electron mobility is\",me,\"m^2 V^-1 s^-1\"\n", + "print \"The charge carrier density is\",ne,\"electrons/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.7, Page number 315" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall coefficient of semiconductor is 3.7e-06 C^-1 m^3\n", + "The density of the charge carrier is 1.689 *10**24 electrons/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=12*10**-3; #length of semi conductor crystal(m)\n", + "b=1*10**-3; #breadth of semi conductor crystal(m)\n", + "t=1*10**-3; #thickness of semi conductor crystal(m)\n", + "I=20*10**-3; #current(A)\n", + "Vh=37*10**-6; #voltage measured across the width(V)\n", + "B=0.5; #magnetic flux density(Wb/m^2)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "RH=Vh*t/(I*B); #Hall coefficient of semiconductor(C^-1 m^3)\n", + "ne=1/(RH*e); #The density of the charge carrier(electrons/m^3)\n", + "\n", + "#Result\n", + "print \"Hall coefficient of semiconductor is\",RH,\"C^-1 m^3\"\n", + "print \"The density of the charge carrier is\",round(ne/10**24,3),\"*10**24 electrons/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.8, Page number 315" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hall coefficient of silicon plate is 3.66 *10**-4 m^3 C^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=100*10**-3; #length of silicon plate(m)\n", + "b=10*10**-3; #breadth of silicon plate(m)\n", + "t=1*10**-3; #thickness of silicon plate(m)\n", + "I=10**-2; #current(A)\n", + "Vh=1.83*10**-3; #voltage measured across the width(V)\n", + "B=0.5; #magnetic flux density(Wb/m^2)\n", + "\n", + "#Calculation\n", + "RH=Vh*t/(I*B); #Hall coefficient of silicon plate(m^3 C^-1)\n", + "\n", + "#Result\n", + "print \"Hall coefficient of silicon plate is\",RH*10**4,\"*10**-4 m^3 C^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.9, Page number 316" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The negative sign of the Hall coefficient indicates that the nature of the semiconductor is n-type\n", + "The density of the charge carrier is 8.503 *10**22 electrons/m^3\n", + "The mobility of the charge carrier is 14.7 *10**-3 m^2 V^-1 s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH=7.35*10**-5; #Hall coefficient of silicon specimen(m^3 C^-1)\n", + "rh=-7.35*10**-5; #Hall coefficient of silicon specimen(m^3 C^-1)\n", + "c=200; #conductivity(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "ne=1/(RH*e); #The density of the charge carrier(electrons/m^3)\n", + "me=c*RH; #The mobility of the charge carrier(m^2 V^-1 s^-1)\n", + "\n", + "#Result\n", + "print \"The negative sign of the Hall coefficient indicates that the nature of the semiconductor is n-type\"\n", + "print \"The density of the charge carrier is\",round(ne/10**22,3),\"*10**22 electrons/m^3\"\n", + "print \"The mobility of the charge carrier is\",me*10**3,\"*10**-3 m^2 V^-1 s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.10, Page number 316" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The density of the charge carrier is 1.7728 *10**22 electrons/m^3\n", + "The mobility of the charge carrier is 0.06346 m^2 V^-1 s^-1\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", + "RH=4.16*10**-4; #Hall coefficient of n-type semiconductor(m^3 C^-1)\n", + "c=180; #conductivity(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "x=1.18; #correction factor for RH\n", + "\n", + "#Calculation\n", + "ne=x/(RH*e); #The density of the charge carrier(electrons/m^3)\n", + "me=c/(ne*e); #The mobility of the charge carrier(m^2 V^-1 s^-1)\n", + "\n", + "#Result\n", + "print \"The density of the charge carrier is\",round(ne/10**22,4),\"*10**22 electrons/m^3\"\n", + "print \"The mobility of the charge carrier is\",round(me,5),\"m^2 V^-1 s^-1\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.11, Page number 317" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The hall coefficient measured by the probes is 1.75 mV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=1*10**-3; #length of rectangular plane sheet of doped silicon(m)\n", + "b=1*10**-3; #breadth of semi rectangular plane sheet of doped silicon(m)\n", + "t=0.5*10**-3; #thickness of rectangular plane sheet of doped silicon(m)\n", + "RH=1.25*10**-3; #Hall coefficient of the material(m^3 C^-1)\n", + "I=1*10**-3; #current(A)\n", + "B=0.7; #magnetic flux density(Wb/m^2)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "Vh=RH*I*B/t; #The hall coefficient measured by the probes(mV)\n", + "\n", + "#Result\n", + "print \"The hall coefficient measured by the probes is\",Vh*10**3,\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.12, Page number 317" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The density of the charge carrier is 1.70765 *10**22 m^-3\n", + "The mobility is 0.04099 m^2 V^-1 s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH=3.66*10**-4; #Hall coefficient of a doped silicon(m^3 C^-1)\n", + "r=8.93*10**-3; #The resistivity(ohm m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #The density of the charge carrier(m^-3)\n", + "me=RH/r; #The mobility(m^2 V^-1 s^-1)\n", + "\n", + "#Result\n", + "print \"The density of the charge carrier is\",round(n/10**22,5),\"*10**22 m^-3\"\n", + "print \"The mobility is\",round(me,5),\"m^2 V^-1 s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.13, Page number 317" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current density is 2880.0 A/m^2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH=0.0125; #Hall coefficient of a sample n-type semiconductor(m^3 C^-1)\n", + "rh=-0.0125; #Hall coefficient of a sample n-type semiconductor(m^3 C^-1)\n", + "me=0.36; #electron mobility(m^2 V^-1 s^-1)\n", + "EH=100; #electric field(V/m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #The density of the charge carrier(m^-3)\n", + "c=n*e*me; #conductivity of n-type semiconductor(ohm^-1 m^-1)\n", + "J=c*EH; #The current density(A/m^2)\n", + "\n", + "#Result\n", + "print \"The current density is\",J,\"A/m^2\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb new file mode 100644 index 00000000..54bbbf07 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter12.ipynb @@ -0,0 +1,351 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#12: Superconducting Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.1, Page number 328" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The transition temperature for the isotope of mercury of mass number 200 is 4.2209 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=202; #mass number of mercury\n", + "a=0.50; #coefficient of mass number\n", + "T1=4.2; #temperaturefor mass number 200(K)\n", + "M2=200; #mass number of mercury\n", + "\n", + "#Calculation\n", + "T2=((M1/M2)**a)*T1; #The transition temperature for the isotope of mercury of mass number 200(K)\n", + "\n", + "#Result\n", + "print \"The transition temperature for the isotope of mercury of mass number 200 is\",round(T2,4),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.2, Page number 328" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical field is 0.1117 T\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc=9.15; #critical temperature of Nb(K)\n", + "t=6; #temperature of critical field(K)\n", + "Ho=0.196; #The critical field AT 0K(T)\n", + "\n", + "#Calculation\n", + "Hc=(Ho*(1-(t/Tc)**2)); #The critical field at 6K(T)\n", + "\n", + "#Result\n", + "print \"The critical field is\",round(Hc,4),\"T\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.3, Page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Isotopic mass if the critical temperature falls is 204.55\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=199.5; #Isotopic mass of metal\n", + "T1=4.185; #Critical temperature for a metal with isotopic mass(K)\n", + "T2=4.133; #fall of critical temperature for a metal with isotopic mass(K)\n", + "a=0.50; #coefficient of mass\n", + "\n", + "#Calculation\n", + "M2=(((M1)**a)*(T1/T2))**2; #The Isotopic mass if the critical temperature falls to 4.133\n", + "\n", + "#Result\n", + "print \"The Isotopic mass if the critical temperature falls is\",round(M2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.4, Page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical current through a long thin superconductor is 22.619 A\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", + "Hc=7.2*10**3; #The critical magnetic field(A/m)\n", + "r=0.5*10**-3; #radius of long thin superconducting wire(m)\n", + "\n", + "#Calculation\n", + "Ic=(2*math.pi*Hc*r); #The critical current through a long thin superconductor(A)\n", + "\n", + "#Result\n", + "print \"The critical current through a long thin superconductor is\",round(Ic,3),\"A\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.5, Page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical field is 0.021659 tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #critical temperature of superconducting Sn(K)\n", + "t=2; #temperature of critical field(K)\n", + "Ho=0.0306; #The critical field at 0K(T)\n", + "\n", + "#Calculation\n", + "Hc=(Ho*(1-(t/Tc)**2)); #The critical field at 6K(T)\n", + "\n", + "#Result\n", + "print \"The critical field is\",round(Hc,6),\"tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.6, Page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical density for a superconducting wire of lead is 134.33 A\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", + "Ho=6.5*10**4; #The critical field at 0K(A/m)\n", + "Tc=7.18; #The temperature for lead(K)\n", + "r=0.5*10**-3; #radius of superconducting wire of lead(m)\n", + "T=4.2; #temperature of superconducting wire(K)\n", + "\n", + "#Calculation\n", + "Hc=(Ho*(1-(T/Tc)**2)); #The critical field(KA/m)\n", + "Ic=2*math.pi*Hc*r; #The critical density for a superconducting wire of lead(A)\n", + "\n", + "#Result\n", + "print \"The critical density for a superconducting wire of lead is\",round(Ic,2),\"A\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.7, Page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical temperature is 12.13395 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Hc=10**5; #The critical field for vanadium(A/m)\n", + "Ho=2*10**5; #The critical field for vanadium at 0K(A/m)\n", + "T=8.58; #temperature for vanadium(K)\n", + "\n", + "#Calculation\n", + "Tc=T/math.sqrt(1-(Hc/Ho)); #The critical temperature(K)\n", + "\n", + "#Result\n", + "print \"The critical temperature is\",round(Tc,5),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.8, Page number 338" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency of the radiation emitted by the junction is 2.85196 *10**9 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=5.9*10**-6; #voltage applied across a Josephson junction(V)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "h=6.62*10**-34; #Planck's constant(J-sec)\n", + "\n", + "#Calculation\n", + "v=(2*e*V)/h; #The frequency of the radiation emitted by the junction(Hz)\n", + "\n", + "#Result\n", + "print \"The frequency of the radiation emitted by the junction is\",round(v/10**9,5),\"*10**9 Hz\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb new file mode 100644 index 00000000..afb202a5 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter13.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#13: Dielectrics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.1, Page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electron polarisation is 3.945 *10**-7 C/m^2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3.61*10**-10; #lattice constant of copper which is Fcc crystal(m)\n", + "x=1*10**-18; #average displacement of the electrons relative to the nucleus(m)\n", + "z=29; #atomic number of copper\n", + "n=4; #number of atoms per unit cell in FCC crystal\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "ne=((n*z)/(a*a*a)); #number of electrons(electrons/m^3) \n", + "P=ne*e*x; #The electron polarisation(C/m^2)\n", + "\n", + "#Result\n", + "print \"The electron polarisation is\",round(P*10**7,3),\"*10**-7 C/m^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.2, Page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dipole moment of each atom in a field is 1.9646 *10**-35 C m**-3\n", + "The effective distance at this field strength between the centre and the nucleus is 8.77 *10**-18 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rp=11.7; #relative permittivity of silicon\n", + "N=4.82*10**28; #number of atoms per unit volume(atoms/m^3)\n", + "ro=8.85*10**-12; #permittivity of free space\n", + "E=10**4; #E(Vm^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "Z=14; #atomic number of silicon \n", + "\n", + "#Calculation\n", + "z=(ro*(rp-1))/N #electronic polarisability(Fm^2)\n", + "mew=z*E; #The dipole moment of each atom(Cm^-3)\n", + "x=y/(Z*e); #The effective distance at this field strength between the centre and the nucleus(m)\n", + "\n", + "#Result\n", + "print \"The dipole moment of each atom in a field is\",round(y*10**35,4),\"*10**-35 C m**-3\"\n", + "print \"The effective distance at this field strength between the centre and the nucleus is\",round(x*10**18,2),\"*10**-18 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.3, Page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electronic polarisability is 1.39 *10**-41 Fm**2\n", + "The relative permittivity in hydrogen gas is 1.0015\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=9.8*10**26; #density of hydrogen gas(atoms/m^3)\n", + "r=0.50*10**-10; #radius of the hydrogen atom(m)\n", + "ro=8.85*10**-12; #permittivity of free space\n", + "\n", + "#Calculation\n", + "z=(4*math.pi*ro*r**3)/10**-41; #electronic polarisability(Fm^2)\n", + "rp=(((d*z*10**-41)/ro)+1); #The relative permittivity in hydrogen gas\n", + "\n", + "#Result\n", + "print \"The electronic polarisability is\",round(z,2),\"*10**-41 Fm**2\"\n", + "print \"The relative permittivity in hydrogen gas is\",round(rp,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.4, Page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The static dielectric constant of solid argon is 1.53679\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "z=1.75*10**-40; #electronic polarisability(Fm^2)\n", + "d=1.8*10**3; #density of argon atom(Kg/m^3)\n", + "Z=39.95; #atomic weight of argon\n", + "NA=6.025*10**26; #Avagadro number(mole^-1)\n", + "ro=8.85*10**-12; #permittivity of free space\n", + "\n", + "#Calculation\n", + "N=((NA*d)/Z); #The number of atoms/unit volume(atoms/m^3) \n", + "rp=(((N*z)/ro)+1); #The static dielectric constant of solid argon\n", + "\n", + "#Result\n", + "print \"The static dielectric constant of solid argon is\",round(rp,5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.5, Page number 366" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio between electronic and ionic polarisability of this material is 1.7376\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "er=4.94; #static dielecric constant of a material\n", + "n=2.69; #index of friction\n", + "\n", + "#Calculation\n", + "x=((er-1)*(n+2))/((er+2)*(n-1))-1; #Ratio between ionic and electronic polarisability of this material\n", + "y=1/x; #Ratio between electronic and ionic polarisability of this material\n", + "\n", + "#Result\n", + "print \"Ratio between electronic and ionic polarisability of this material is\",round(y,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/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb new file mode 100644 index 00000000..1d22e338 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter15.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#15: Non Destructive Testing" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 15.1, Page number 412" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency to which a piezo electric oscillator circuit should be turned is 2.7451 *10**6 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t=0.1*10**-2; #thickness of piezo electric crystal(m)\n", + "E=80*10**9; #Young's modulus of crystal(pa)\n", + "d=2654; #density of material of crystal(Kgm^-3)\n", + "\n", + "#Calculation\n", + "f=1/(2*t)*math.sqrt(E/d); #The frequency to which a piezo electric oscillator circuit should be turned(Hz)\n", + "\n", + "#Result\n", + "print \"The frequency to which a piezo electric oscillator circuit should be turned is\",round(f/10**6,4),\"*10**6 Hz\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb new file mode 100644 index 00000000..79e12829 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter2.ipynb @@ -0,0 +1,156 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Ultrasonics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.1, Page number 30" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The frequency of vibration is 2.7451 *10**6 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=80*10**9; #Young's modulus of material of piezo electric crystal(Pa)\n", + "d=2654; #Density of material of piezo electric crystal(Kg/m^3)\n", + "t=0.1*10**-2; #Thickness of piezo electric crystal(m)\n", + "p=1; #for fundamental first overtone\n", + "\n", + "#Calculation\n", + "f=((p/(2*t))*(math.sqrt(E/d))); #Frequency of vibration of first overtone(Hz)\n", + "\n", + "#Result\n", + "print \"The frequency of vibration is\",round(f/10**6,4),\"*10**6 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.2, Page number 30" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency in the first mode of vibration is 5.5 *10**4 Hz\n", + "Frequency in the second mode of vibration is 110.0 *10**3 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "v=5.5*10**3; #Velocity of longitudanal waves in Quartz Crystal(m/s)\n", + "t=0.05; #Thickness of Quartz Crystal(m)\n", + "\n", + "#Calculation\n", + "w=2*t; #wavelength(m)\n", + "v1=(v/w); #Frequency in the first mode of vibration(Hz)\n", + "v2=(2*v1); #Frequency in the second mode of vibration(Hz)\n", + "\n", + "#Result\n", + "print \"Frequency in the first mode of vibration is\",v1/10**4,\"*10**4 Hz\"\n", + "print \"Frequency in the second mode of vibration is\",v2/10**3,\"*10**3 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.3, Page number 31" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The depth of sea is 495.0 m\n", + "The wavelength of ultrasonic pulse is 0.02 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=0.09*10**6; #Frequency of Ultrasonic source(Hz)\n", + "t=0.55; #time(sec)\n", + "v=1800; #velocity of sound in water(m/s)\n", + "\n", + "#Calculation\n", + "D=(v*t)/2; #Depth of sea(m)\n", + "W=(v/f); #Wavelength of ultrasonic pulse(m)\n", + "\n", + "#Result\n", + "print \"The depth of sea is\",D,\"m\"\n", + "print \"The wavelength of ultrasonic pulse is\",W,\"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/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb new file mode 100644 index 00000000..b55e472d --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter3.ipynb @@ -0,0 +1,1072 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: Crystal Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 60" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The interplanar distance is 6.3589 *10**-11 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=3; #miller indices with respect to x axis\n", + "k=1; #miller indices with respect to y axis\n", + "l=1; #miller indices with respect to z axis\n", + "a=2.109*10**-10; #lattice constant of plane in a simple cubic lattice(m)\n", + "\n", + "#Calculation\n", + "d=(a/(math.sqrt(h**2+k**2+l**2))); #The interplanar distance(m)\n", + "\n", + "#Result\n", + "print \"The interplanar distance is\",round(d*10**11,4),\"*10**-11 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.4, Page number 60" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lattice constant is 4.0447 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1; #miller indices with respect to x axis\n", + "k=1; #miller indices with respect to y axis\n", + "l=0; #miller indices with respect to z axis\n", + "d=2.86*10**-10; #the distance between miller indices(m)\n", + "\n", + "#Calculation\n", + "a=(d*(math.sqrt(h**2+k**2+l**2))); #The lattice constant(m)\n", + "\n", + "#Result\n", + "print \"The lattice constant is\",round(a*10**10,4),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.6, Page number 61" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The ratio of intercepts on the three axis by ( 1 1 1 ) plane is 1.0 : 1.0 : 1.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1; #miller indices of x-axis\n", + "k=1; #miller indices of y-axis\n", + "l=1; #miller indices of z-axis\n", + "\n", + "#Calculation\n", + "p=1/h; #intercept on x-axis\n", + "q=1/k; #intercept on y-axis\n", + "r=1/l; #intercept on z-axis\n", + "\n", + "#Result\n", + "print \"The ratio of intercepts on the three axis by (\",h,k,l,\") plane is\",p,\":\",q,\":\",r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.7, Page number 61" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The inter planar spacing distance in 1st plane is 2.0347 *10**-10 m\n", + "The inter planar spacing distance in 2nd plane is 1.7621 *10**-10 m\n", + "The inter planar spacing distance in 3rd plane is 1.246e-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.246*10**-10; #atomic radius of Fcc crystal(m)\n", + "h1=1; #miller indices with respect to x axis in 1st plane\n", + "k1=1; #miller indices with respect to y axis in 1st plane\n", + "l1=1; #miller indices with respect to z axis in 1st plane\n", + "h2=2; #miller indices with respect to x axis in 2nd plane\n", + "k2=0; #miller indices with respect to y axis in 2nd plane\n", + "l2=0; #miller indices with respect to z axis in 2nd plane\n", + "h3=2; #miller indices with respect to x axis in 3rd plane\n", + "k3=2; #miller indices with respect to y axis in 3rd plane\n", + "l3=0; #miller indices with respect to z axis in 3rd plane\n", + "\n", + "#Calculation\n", + "a=(4*r)/math.sqrt(2); #The lattice constant in a FCC crystal(m)\n", + "d1=(a/(math.sqrt(h1**2+k1**2+l1**2))); #inter planar spacing distance in 1st plane(m)\n", + "d2=(a/(math.sqrt(h2**2+k2**2+l2**2))); #inter planar spacing distance in 2nd plane(m)\n", + "d3=(a/(math.sqrt(h3**2+k3**2+l3**2))); #inter planar spacing distance in 3rd plane(m)\n", + "\n", + "#Result\n", + "print \"The inter planar spacing distance in 1st plane is\",round(d1*10**10,4),\"*10**-10 m\"\n", + "print \"The inter planar spacing distance in 2nd plane is\",round(d2*10**10,4),\"*10**-10 m\"\n", + "print \"The inter planar spacing distance in 3rd plane is\",d3,\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.8, Page number 62" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The inter planar spacing distance in 1st plane is a* 1.0 m\n", + "The inter planar spacing distance in 2nd plane is a* 0.707 m\n", + "The inter planar spacing distance in 3rd plane is a* 0.577 fm\n", + "Ratio of interplanar distance of three planes d100:d110:d111= 1.0 : 0.707 : 0.577\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1; #assume\n", + "h1=1; #miller indices with respect to x axis in 1st plane\n", + "k1=0; #miller indices with respect to y axis in 1st plane\n", + "l1=0; #miller indices with respect to z axis in 1st plane\n", + "h2=1; #miller indices with respect to x axis in 2nd plane\n", + "k2=1; #miller indices with respect to y axis in 2nd plane\n", + "l2=0; #miller indices with respect to z axis in 2nd plane\n", + "h3=1; #miller indices with respect to x axis in 3rd plane\n", + "k3=1; #miller indices with respect to y axis in 3rd plane\n", + "l3=1; #miller indices with respect to z axis in 3rd plane\n", + "\n", + "#Calculation\n", + "x1=math.sqrt(h1**2+k1**2+l1**2);\n", + "d100=a/x1; #inter planar spacing distance in 1st plane(m)\n", + "x2=math.sqrt(h2**2+k2**2+l2**2);\n", + "d110=a/x2; #inter planar spacing distance in 2nd plane(m)\n", + "x3=math.sqrt(h3**2+k3**2+l3**2);\n", + "d111=a/x3; #inter planar spacing distance in 3rd plane(m)\n", + "\n", + "#Result\n", + "print \"The inter planar spacing distance in 1st plane is a*\",d100,\"m\"\n", + "print \"The inter planar spacing distance in 2nd plane is a*\",round(d110,3),\"m\"\n", + "print \"The inter planar spacing distance in 3rd plane is a*\",round(d111,3),\"fm\"\n", + "print \"Ratio of interplanar distance of three planes d100:d110:d111=\",(1/x1),\":\",round((1/x2),3),\":\",round((1/x3),3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.9, Page number 62" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The miller indices of the plane is (h k l)=( 3.0 6.0 1.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p=1; #x-intercept of the plane\n", + "q=1/2; #y-intercept of the plane\n", + "r=3; #z-intercept of the plane\n", + "\n", + "#Calculation\n", + "h=(1/p)*3; #miller indices with respect to x axis\n", + "k=(1/q)*3; #miller indices with respect to y axis\n", + "l=(1/r)*3; #miller indices with respect to z axis\n", + "\n", + "#Result\n", + "print \"The miller indices of the plane is (h k l)=(\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.10, Page number 63" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The inter planar d-spacing distance is 2.814 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2.814; #the lattice constant of a simple cubic system(angstrom)\n", + "h1=1; #miller indices with respect to x axis\n", + "k1=0; #miller indices with respect to y axis\n", + "l1=0; #miller indices with respect to z axis\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h1**2+k1**2+l1**2); #inter planar d spacing distance(angstrom)\n", + "\n", + "#Result\n", + "print \"The inter planar d-spacing distance is\",d,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.11, Page number 63" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The miller indices of the set of parallel lines is ( 2.0 2.0 3.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "OA=0.025; #The unit cell makes intercepts on a(nm)\n", + "OB=0.02; #The unit cell makes intercepts on b(nm)\n", + "OC=0.01; #The unit cell makes intercepts on c(nm)\n", + "a=0.05; #The unit cell edge of an orthorhombic crystal(nm)\n", + "b=0.04; #The unit cell edge of an orthorhombic crystal(nm)\n", + "c=0.03; #The unit cell edge of an orthorhombic crystal(nm)\n", + "\n", + "#Calculation\n", + "p=a/OA; #miller indices with respect to x axis\n", + "q=b/OB; #miller indices with respect to y axis\n", + "r=c/OC; #miller indices with respect to z axis\n", + "\n", + "#Result\n", + "print \"The miller indices of the set of parallel lines is (\",p,q,r,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.12, Page number 63" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The miller indices are 2 1 2\n", + "The miller indices are 1 2 1\n", + "The miller indices are 1 0 3.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.424; #value of one axial unit\n", + "b=1; #value of second axial unit\n", + "c=0.367; #value of third axial unit\n", + "i1=0.212; #value at x-intercept\n", + "j1=1; #value at y-intercept\n", + "k1=0.183; #value at z-intercept\n", + "i2=0.848; #value at x-intercept\n", + "j2=1; #value at y-intercept\n", + "k2=0.732; #value at z-intercept\n", + "i3=0.424; #value at x-intercept\n", + "k3=0.123; #value at z-intercept\n", + "\n", + "#Calculation\n", + "p1=1/(i1/a); #miller indices at x-intercept\n", + "q1=1/(j1/b); #miller indices at y-intercept\n", + "r1=1/(k1/c); #miller indices at z-intercept\n", + "p2=1/(i2/a)*2; #miller indices at x-intercept\n", + "q2=1/(j2/b)*2; #miller indices at y-intercept\n", + "r2=1/(k2/c)*2; #miller indices at z-intercept\n", + "p3=1/(i3/a); #miller indices at x-intercept\n", + "q3=0; #miller indices at y-intercept\n", + "r3=1/(k3/c); #miller indices at z-intercept\n", + "\n", + "#Result\n", + "print \"The miller indices are\",int(p1),int(q1),int(r1)\n", + "print \"The miller indices are\",int(p2),int(q2),int(r2)\n", + "print \"The miller indices are\",int(p3),int(q3),round(r3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.13, Page number 65" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Miller indices are (1/infinite 1/ 2 1/ 7 )= 0 7 2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "OB=2; #The intercept made by the parrell line ,OB=2b\n", + "OC=7; #The intercept made by the parrell line ,OC=2c\n", + "#OA=infinite The intercept made by the parrell line ,OB=2b\n", + "\n", + "#Calculation\n", + "A=0; #miller indice along x-axis\n", + "B=1/OB; #miller indice along y-axis\n", + "C=1/OC; #miller indice along z-axis\n", + "X=(B*(OC*OB)); #taking L.C.M\n", + "Y=(C*(OC*OB)); #taking L.C.M\n", + "\n", + "#Result\n", + "print \"Miller indices are (1/infinite 1/\",OB,\"1/\",OC,\")=\",A,int(X),int(Y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.14, Page number 75" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The atomic radius of copper is 1.273 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3.6; #lattice parameter of copper(angstrom)\n", + "\n", + "#Calculation\n", + "r=(a*math.sqrt(2))/4; #The atomic radius of copper(angstrom)\n", + "\n", + "#Result\n", + "print \"The atomic radius of copper is\",round(r,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.15, Page number 76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The inter planar d-spacing distance is 1.1011 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4.12; #the lattice constant of a simple cubic system(angstrom)\n", + "h1=3; #miller indices with respect to x axis\n", + "k1=2; #miller indices with respect to y axis\n", + "l1=1; #miller indices with respect to z axis\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h1**2+k1**2+l1**2); #inter planar d spacing distance(angstrom)\n", + "\n", + "#Result\n", + "print \"The inter planar d-spacing distance is\",round(d,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.16, Page number 76" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The density of copper is 8934 Kg/m^3\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", + "n=4; #no.of atoms in FCC structure\n", + "A=63.54; #Atomic weight of copper\n", + "r=1.278*10**-10; #atomic radius(m)\n", + "N=6.023*10**26; #Avogadro's Number(per Kg mol)\n", + "\n", + "#Calculation\n", + "a=(4*r/math.sqrt(2)); #The lattice constant(m)\n", + "d=A*n/(N*a**3); #The density of copper(Kg/m^3)\n", + "\n", + "#Result\n", + "print \"The density of copper is\",int(d),\"Kg/m^3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.17, Page number 76" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The ratio of interplanar distance between successive lattice planes in a simple cubic lattice is d100:d110:d111= 1 : 0.707 : 0.577\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h1=1; #miller indices with respect to x axis in 1st plane\n", + "k1=0; #miller indices with respect to y axis in 1st plane\n", + "l1=0; #miller indices with respect to z axis in 1st plane\n", + "h2=1; #miller indices with respect to x axis in 2nd plane\n", + "k2=1; #miller indices with respect to y axis in 2nd plane\n", + "l2=0; #miller indices with respect to z axis in 2nd plane\n", + "h3=1; #miller indices with respect to x axis in 3rd plane\n", + "k3=1; #miller indices with respect to y axis in 3rd plane\n", + "l3=1; #miller indices with respect to z axis in 3rd plane\n", + "a=1; #The lattice constant in a in a simple cubic lattice(m)\n", + "\n", + "#Calculation\n", + "d100=a/math.sqrt(h1**2+k1**2+l1**2); #inter planar spacing distance in 1st plane(m)\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #inter planar spacing distance in 2nd plane(m)\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #inter planar spacing distance in 3rd plane(m)\n", + "\n", + "#Result\n", + "print \"The ratio of interplanar distance between successive lattice planes in a simple cubic lattice is d100:d110:d111=\",int(d100),\":\",round(d110,3),\":\",round(d111,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.18, Page number 76" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The distance between two adjacent atoms is 2.81 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=23; #atomic weight of sodium\n", + "y=35.45; #atomic weight of chloride\n", + "AW=58.45; #atomic weight of sodium chloride(NaCl)\n", + "n=4; #no.of atoms in FCC structure\n", + "d=2.18*10**6; #density of NaCl crystal of FCC structure(kg/m^3)\n", + "N=6.023*10**23; #Avogadro's Number(per Kg mol)\n", + "\n", + "#Calculation\n", + "a=(n*AW/(d*N))**(1/3); #The lattice constant(m)\n", + "r=a/2; #The distance between two adjacent atoms(m)\n", + "\n", + "#Result\n", + "print \"The distance between two adjacent atoms is\",round(r*10**10,2),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.19, Page number 77" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The atomic radius of Fe which has BCC structure is 1.242 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=2; #no.of atoms in BCC structure\n", + "d=7.86*10**6; #density of iron of FCC structure(kg/m^3)\n", + "AW=55.85; #atomic weight of Fe\n", + "N=6.023*10**23; #Avogadro's Number(per Kg mol)\n", + "\n", + "#Calculation\n", + "a=(n*AW/(d*N))**(1/3); #The lattice constant(m)\n", + "r=a*math.sqrt(3)*10**10/4; #The atomic radius of Fe which has BCC structure(angstrom)\n", + "\n", + "#Result\n", + "print \"The atomic radius of Fe which has BCC structure is\",round(r,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.20, Page number 77" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lattice constant is 6.6 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=4; #no.of atoms in FCC structure\n", + "d=2.7*10**3; #density of potassium bromide(Kg/m^3)\n", + "AW=119; #molecular weight of KBr\n", + "N=6.023*10**26; #Avagadro's number(Kg mol)\n", + "\n", + "#Calculation\n", + "a=((n*AW/(d*N))**(1/3))*10**10; #The lattice constant(angstrom)\n", + "\n", + "#Result\n", + "print \"The lattice constant is\",round(a,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.21, Page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of atoms per unit cell of a crystal is 2.0\n", + "If n=2,the crystal system is body centered cubic\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=9.6*10**2; #density of crystal(Kg/m^3)\n", + "AW=23; #molecular weight of the crystal\n", + "N=6.023*10**26; #Avagadro's number(per Kg mol)\n", + "a=4.3*10**-10; #lattice constant(m)\n", + "\n", + "#Calculation\n", + "n=d*N*a**3/AW; #Number of atoms per unit cell of a crystal\n", + "\n", + "#Result\n", + "print \"Number of atoms per unit cell of a crystal is\",round(n)\n", + "print \"If n=2,the crystal system is body centered cubic\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.22, Page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volume of cell is 2.128 *10**-29 m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.2*10**-10; #atomic radius of crystal of BCC structure(m)\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); #lattice constant of BCC structure(m)\n", + "V=a**3; #The volume of cell(m^3)\n", + "\n", + "#Result\n", + "print \"The volume of cell is\",round(V*10**29,3),\"*10**-29 m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.23, Page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The planar atomic density is 6.25e+12 atoms/mm^2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4*10**-7; #lattice constant of the crystal(mm)\n", + "h1=1; #miller indices with respect to x axis in 1st plane\n", + "k1=0; #miller indices with respect to y axis in 1st plane\n", + "l1=0; #miller indices with respect to z axis in 1st plane\n", + "\n", + "#Calculation\n", + "n=4*(1/4); #Number of atoms contained in a plane per unit cell\n", + "A=a**2; #Area of the plane(mm^2)\n", + "d=n/A; #The planar atomic density(atoms/mm^2)\n", + "\n", + "#Result\n", + "print \"The planar atomic density is\",d,\"atoms/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.24, Page number 79" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The 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", + "n=4; #no.of atoms in Face centered cubic lattice\n", + "d=6250; #density of potassium bromide(Kg/m^3)\n", + "AW=60.2; #molecular weight of crysal with face centered cubic lattice\n", + "N=6.023*10**26; #Avagadro's number(per Kg mol)\n", + "\n", + "#Calculation\n", + "a=((n*AW/(d*N))**(1/3)); #The lattice constant(m)\n", + "\n", + "#Result\n", + "print \"The lattice constant is\",round(a*10**10),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.25, Page number 79" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The change in volume percentage is 0.49326\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", + "r1=0.1258*10**-9; #atomic radii of the iron atom in BCC structure(m)\n", + "r2=0.1292*10**-9; #atomic radii of the iron atom in FCC structure(m)\n", + "T=910; #metallic iron changes from BCC to FCC(C)\n", + "\n", + "#Calculation\n", + "a1=(4*r1/math.sqrt(3)); #lattice constant of BCC structure(m)\n", + "v1=a1**3/2; #The volume occupied by one BCC atom(m^3)\n", + "a2=4*r2/math.sqrt(2); #lattice constant of FCC structure(m)\n", + "v2=a2**3/4; #The volume occupied by one FCC atom(m^3)\n", + "V=((v1-v2)/v1)*100; #The change in volume percentage\n", + "\n", + "#Result\n", + "print \"The change in volume percentage is\",round(V,5)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.26, Page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Number of unit cells is 4.70419 *10**22\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.405*10**-9; #lattice constant of unit cell of aluminium which is face centered cubic(m)\n", + "s=25*10**-2; #Side of aluminium foil(m)\n", + "t=0.005*10**-2; #Thickness of aluminium foil(m)\n", + "\n", + "#Calculation\n", + "ar=s**2; #area of aluminium foil(m^2)\n", + "V=ar*t; #volume of the aluminium foil(m^3)\n", + "v=a**3; #volume of the unit cell(m^3)\n", + "n=(V/v); #Number of unit cells\n", + "\n", + "#Result\n", + "print \"The Number of unit cells is\",round(n/10**22,5),\"*10**22\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.27, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Volume of the unit cell of Magnesium which has HCP structure is 1.0 *10**-28 m^3\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", + "r=0.1605*10**-9; #radius of magnesium atom which has HCP structure(m)\n", + "\n", + "#Calculation\n", + "a=2*r; #lattice constant of magnesium which has HCP structure(m)\n", + "c=a*math.sqrt(8/3); #height of the HCP structure(m)\n", + "V=3*math.sqrt(3)*(a**2)*c/3; #Volume of the unit cell of Magnesium which has HCP structure(m^3)\n", + "\n", + "#Result\n", + "print \"The Volume of the unit cell of Magnesium which has HCP structure is\",round(V*10**28),\"*10**-28 m^3\"\n", + "print \"answer given in the 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/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb new file mode 100644 index 00000000..49292516 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter4.ipynb @@ -0,0 +1,499 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#4: Wave Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.1, Page number 92" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of light used is 640 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=125; #number of fingers cross the field of view\n", + "d=0.04*10**-3; #distance of one of mirror moved(m)\n", + "\n", + "#Calculation\n", + "w=2*d/n; #wavelength of light used(m)\n", + "\n", + "#Result\n", + "print \"The wavelength of light used is\",int(w*10**9),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.2, Page number 92" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of light used is 600.0 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ri=1.5; #refractive index of thin film of glass\n", + "n=30; #number of fringes of sodium light is observed across the field of view\n", + "t=0.018*10**-3; #thickness of glass film(m)\n", + "\n", + "#Calculation\n", + "w=2*(Ri-1)*t/n; #wavelength of the light used(m)\n", + "\n", + "#Result\n", + "print \"The wavelength of light used is\",w*10**9,\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.3, Page number 92" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of the monochromatic source used is 589.0 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=200; #number of fringes cross the field of view\n", + "d=0.0589*10**-3; #distance of mirror displaced(m)\n", + "\n", + "#Calculation\n", + "w=2*d/n; #wavelength of the monochromatic source used(m)\n", + "\n", + "#Result\n", + "print \"The wavelength of the monochromatic source used is\",w*10**9,\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.4, Page number 92" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thickness of the film is 1.9636 *10**-4 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=1.55; #refractive index of transparent film of glass \n", + "w=480*10**-9; #wavelength of light(m)\n", + "n=450; #number of fringes to sweep across the field\n", + "\n", + "#Calculation\n", + "t=n*w/(2*(x-1)); #thickness of the film(m)\n", + "\n", + "#Result\n", + "print \"The thickness of the film is\",round(t*10**4,4),\"*10**-4 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.5, Page number 93" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of material is 1.675\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t=0.004*10**-2; #thickness of transparent sheet(m)\n", + "d=0.0027*10**-2; #distance of mirror displaced(m)\n", + "\n", + "#Calculation\n", + "X=(d/t)+1; #refractive index of the material\n", + "\n", + "#Result\n", + "print \"The refractive index of material is\",X" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.6, Page number 93" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of fringes shifted across the cross wire of eye piece of the telescope is 110\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.03205*10**-3; #distance of movable mirror displaced(m)\n", + "w=580.9*10**-9; #wavelength of light(m)\n", + "\n", + "#Calculation\n", + "n=2*d/w; #number of fringes shifted across the cross wire of eye piece of the telescope\n", + "\n", + "#Result\n", + "print \"The number of fringes shifted across the cross wire of eye piece of the telescope is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.7, Page number 101" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thickness of a quarter wave plate of quartz for sodium light is 7.36625 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=5893*10**-10; #wavelength of sodium light(m)\n", + "Re=1.5532; #Refractive index of quartz for e ray\n", + "Ro=1.5332; #Refractive index of quartz for o ray\n", + "\n", + "#Calculation\n", + "t=w/(4*(Re-Ro)); #thickness of a quarter wave plate of quartz for sodium light(m)\n", + "\n", + "#Result\n", + "print \"The thickness of a quarter wave plate of quartz for sodium light is\",t*10**6,\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.8, Page number 102" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thickness of a double refracting crystal required at w/2 is 2.727 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=6000*10**-10; #wavelength(m)\n", + "Re=1.54; #Refractive index of double refracting crystal for e ray\n", + "Ro=1.65; #Refractive index of double refracting crystal for o ray\n", + "\n", + "#Calculation\n", + "t=w/(2*(Ro-Re)); #thickness of a double refracting crystal required at w/2(m)\n", + "\n", + "#Result\n", + "print \"The thickness of a double refracting crystal required at w/2 is\",round(t*10**6,3),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.9, Page number 102" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The least thickness of a plate when the emergent beam will be plane polarised is 9.54 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=5*10**-7; #wavelength(m)\n", + "Re=1.5573; #Refractive index for e ray when the emergent beam will be plane polarised\n", + "Ro=1.5442; #Refractive index for o ray when the emergent beam will be plane polarised\n", + "\n", + "#Calculation\n", + "t=w/(4*(Re-Ro)); #least thickness of a plate(m)\n", + "\n", + "#Result\n", + "print \"The least thickness of a plate when the emergent beam will be plane polarised is\",round(t*10**6,2),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.10, Page number 102" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thickness of the quarter wave plate for calcite is 1.713 *10**-6 m\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", + "w=5893*10**-10; #wavelength of sodium light(m)\n", + "Ro=1.658; #Refractive index of calcite for o ray\n", + "Re=1.486; #Refractive index of calcite for e ray\n", + "\n", + "#Calculation\n", + "t=w/(2*(Ro-Re)); #thickness of the quarter wave plate for calcite(m)\n", + "\n", + "#Result\n", + "print \"The thickness of the quarter wave plate for calcite is\",round(t*10**6,3),\"*10**-6 m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.11, Page number 102" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength for which it can act as a half wave plate is 600.0 *10**-9 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t=30*10**-6; #thickness of wave plate(m)\n", + "Ro=1.55; #Refractive index of wave plate for o ray\n", + "Re=1.54; #Refractive index of wave plate for e ray\n", + "\n", + "#Calculation\n", + "w=2*t*(Ro-Re); #wavelength for which it can act as a half wave plate(m)\n", + "\n", + "#Result\n", + "print \"The wavelength for which it can act as a half wave plate is\",w*10**9,\"*10**-9 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.12, Page number 102" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thickness of a mica sheet required for making a half wave plate for a light is 4.5508 *10**-5 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=546.1*10**-9; #wavelength of light(m)\n", + "Re=1.592; #Refractive index of mica for e ray\n", + "Ro=1.586; #Refractive index of mica for o ray\n", + "\n", + "#Calculation\n", + "t=w/(2*(Re-Ro)); #thickness of a mica sheet(m)\n", + "\n", + "#Result\n", + "print \"The thickness of a mica sheet required for making a half wave plate for a light is\",round(t*10**5,4),\"*10**-5 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/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb new file mode 100644 index 00000000..9c78727b --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter5.ipynb @@ -0,0 +1,193 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#5: Laser" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.1, Page number 124" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The ratio of propulsion of the two states in a laser is 1.3893 *10**-30\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t=300; #temperature(K)\n", + "w=698.3*10**-9; #wavelength of photon(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "Kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg.s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Ratio=math.exp((-h*c)/(w*Kb*t)); #ratio of propulsion of the two states in a laser\n", + "\n", + "#Result\n", + "print \"The ratio of propulsion of the two states in a laser is\",round(Ratio*10**30,4),\"*10**-30\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.2, Page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The band gap for lnp laser diode is 0.8014 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=1.55*10**-6; #wavelength of light emission(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "Eg=(h*c)/(w*e); #band gap(eV)\n", + "\n", + "#Result\n", + "print \"The band gap for lnp laser diode is\",round(Eg,4),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.3, Page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The long wavelength limit of an extrinsic semiconductor is 6.2109 *10**-5 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=0.02*1.6*10**-19; #Ionisation energy(J)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "w=h*c/E; #long wavelength limit of an extrinsic semiconductor(m)\n", + "\n", + "#Result\n", + "print \"The long wavelength limit of an extrinsic semiconductor is\",round(w*10**5,4),\"*10**-5 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.4, Page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of photons emitted per minute is 6.562 *10**17 photons/minute\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=3.5*10**-3*60; #power output(J/min)\n", + "w=0.621*10**-6; #wavelength of light(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "e=h*c/w; #energy emitted by one photon(J)\n", + "n=E/e; #The number of photons emitted per minute(photons/minute)\n", + "\n", + "#Result\n", + "print \"The number of photons emitted per minute is\",round(n/10**17,3),\"*10**17 photons/minute\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb new file mode 100644 index 00000000..7c2ac18d --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter6.ipynb @@ -0,0 +1,267 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#6: Fiber Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 146" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical angle is 75 degrees 23 minutes\n", + "The acceptance angle is 22 degrees 56 minutes\n", + "The numerical aperture is 0.3899\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", + "n1=1.545; #refractive index of optical fibre core\n", + "n2=1.495; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "CA=math.asin(n2/n1); #critical angle(radian)\n", + "CA=CA*180/math.pi; #critical angle(degree)\n", + "CAm=int(CA);\n", + "CAs=int(60*(CA-CAm));\n", + "AA=math.asin(math.sqrt(n1**2-n2**2)); #acceptance angle(radian)\n", + "AAd=AA*180/math.pi; #acceptance angle(degree) \n", + "AAm=int(AAd);\n", + "AAs=int(60*(AAd-AAm));\n", + "NA=math.sin(AA); #numerical aperture\n", + "\n", + "#Result\n", + "print \"The critical angle is\",CAm,\"degrees\",CAs,\"minutes\"\n", + "print \"The acceptance angle is\",AAm,\"degrees\",AAs,\"minutes\"\n", + "print \"The numerical aperture is\",round(NA,4)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 147" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The numerical aperture is 0.3487\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.54; #refractive index of optical fibre core\n", + "n2=1.5; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "\n", + "#Result\n", + "print \"The numerical aperture is\",round(NA,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 147" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The critical angle is 71 degrees 30 minutes\n", + "The acceptance angle is 29 degrees 26 minutes\n", + "The numerical aperture is 0.4915\n", + "answer for acceptance angle and numerical aperture given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.55; #refractive index of optical fibre core\n", + "n2=1.47; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "CA=math.asin(n2/n1); #critical angle(radian)\n", + "CA=CA*180/math.pi; #critical angle(degree) \n", + "CAm=int(CA);\n", + "CAs=int(60*(CA-CAm));\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture \n", + "AA=math.asin(NA); #acceptance angle(radian)\n", + "AAd=AA*180/math.pi; #acceptance angle(degree) \n", + "AAm=int(AAd);\n", + "AAs=int(60*(AAd-AAm));\n", + "\n", + "#Result\n", + "print \"The critical angle is\",CAm,\"degrees\",CAs,\"minutes\"\n", + "print \"The acceptance angle is\",AAm,\"degrees\",AAs,\"minutes\"\n", + "print \"The numerical aperture is\",round(NA,4)\n", + "print \"answer for acceptance angle and numerical aperture given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 147" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of optical fibre is 1.5628\n", + "The numerical aperture when fibre is in water is 0.15\n", + "The Acceptance angle for the fibre in water is 8 degrees 38 minutes\n", + "answer for minutes varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n2=1.55; #refractive index of cladding\n", + "no=1.33; #refractive index of water\n", + "NA=0.20; #numerical aperture of optical fibre\n", + "\n", + "#Calculation\n", + "n1=math.sqrt(n2**2+NA**2); #refractive index of optical fibre\n", + "NAW=math.sqrt(n1**2-n2**2)/no; #numerical aperture when fibre is in water\n", + "AA=math.asin(NAW); #Acceptance angle for the fibre in water(degrees)\n", + "AAd=AA*180/math.pi; #acceptance angle(degree) \n", + "AAm=int(AAd);\n", + "AAs=int(60*(AAd-AAm));\n", + "\n", + "#Result\n", + "print \"The refractive index of optical fibre is\",round(n1,4)\n", + "print \"The numerical aperture when fibre is in water is\",round(NAW,2)\n", + "print \"The Acceptance angle for the fibre in water is\",AAm,\"degrees\",AAs,\"minutes\"\n", + "print \"answer for minutes varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 148" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of the core of a fibre is 1.42\n", + "The refractive index of the cladding is 1.403\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", + "NA=0.22; #numerical aperture of optical fibre\n", + "no=0.012; #refractive index difference\n", + "\n", + "#Calculation\n", + "n1=NA/math.sqrt(2*no); #The refractive index of the core of a fibre\n", + "n2=n1*(1-no); #The refractive index of the cladding\n", + "\n", + "#Result\n", + "print \"The refractive index of the core of a fibre is\",round(n1,2)\n", + "print \"The refractive index of the cladding is\",round(n2,3)\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb new file mode 100644 index 00000000..13a2a17f --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter7.ipynb @@ -0,0 +1,781 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#7: Conducting Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.1, Page number 178" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current density in the conductor corresponds to a drift velocity is 5.9 *10**9 A m^-1\n", + "Mobility of the charge carrires is 6.58898 *10**-3 m^2 V^-1 s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=5.9*10**28; #electron concentration of conductor(m^-3)\n", + "v=0.625; #drift velocity of a conductor(ms^-1)\n", + "x=6.22*10**7; #electrical conductivity(ohm^-1 m^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "J=n*e*v; #current density in the conductor corresponds to drift velocity(Am^-1)\n", + "z=x/(n*e); #mobility of the charge(m^2V^-1s^-1)\n", + " \n", + "#Result\n", + "print \"The current density in the conductor corresponds to a drift velocity is\",J/10**9,\"*10**9 A m^-1\"\n", + "print \"Mobility of the charge carrires is\",round(z*10**3,5),\"*10**-3 m^2 V^-1 s^-1\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.2, Page number 179" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The drift velocity of free electron in a copper wire is 7.0028 *10**-5 ms^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=8.5*10**28; #density of free electrons in copper(m^-3)\n", + "A=1.05*10**-6; #sectional area of copper(m^2)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "I=1; #copper wire carries a current(A)\n", + "\n", + "#Calculation\n", + "V=1/(A*n*e); #drift velocity of free electrons in copper wire(ms^-1)\n", + "\n", + "#Result\n", + "print \"The drift velocity of free electron in a copper wire is\",round(V*10**5,4),\"*10**-5 ms^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.3, Page number 179" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The drift velocity of free electrons in copper is 1.75 *10**-3 ms^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "X=3.5*10**-3; #mobility of free electrons in copper(m^2 V^-1 s^-1)\n", + "E=0.5; #elactric field strength of copper(V m^-1)\n", + "\n", + "#Calculation\n", + "V=X*E; #drift velocity of free electrons in copper(m s^-1)\n", + "\n", + "#Result\n", + "print \"The drift velocity of free electrons in copper is\",V*10**3,\"*10**-3 ms^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.4, Page number 179" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The relaxation time of conduction electrons is 3.815 *10**-14 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=6.5*10**28; #conduction electron(m^-3)\n", + "r=1.435*10**-8; #metal resistivity(ohm-metre)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of a electron(kg)\n", + "\n", + "#Calculation\n", + "T=m/(r*n*e**2); #relaxation time of conduction electrons(s)\n", + "\n", + "#Result\n", + "print \"The relaxation time of conduction electrons is\",round(T*10**14,3),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.5, Page number 180" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mean free path between collision of free electrons in copper is 2.8153 *10**-9 m\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", + "r=1.72*10**-8; #resistivity of copper(ohm metre)\n", + "T=293; #temperature of copper(K)\n", + "n=8.48*10**28; #density of free electron(m^-3)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of a electron(kg)\n", + "k=1.38*10**-23; #boltzmann constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "t=m/(r*n*(e**2)); #relaxation time(s)\n", + "v=math.sqrt(3*k*T/m); #thermal velocity(ms^-1)\n", + "Lamda=t*v; #mean free path between collision of free electrons in copper(m)\n", + "\n", + "#Result\n", + "print \"The mean free path between collision of free electrons in copper is\",round(Lamda*10**9,4),\"*10**-9 m\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.6, Page number 180" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal velocity is 116.76 *10**3 m s^-1\n", + "Drift velocity of electrons is 40.0 m s^-1\n", + "Thus the terminal velocity is high compared to the drift velocity\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t=1*10**-3; #thickness of metal(m)\n", + "V=1; #potential difference applied in volts(V)\n", + "T=300; #temperature(K)\n", + "m=0.04; #mobility(m^2 V^-1 s^-1)\n", + "k=1.38*10**-23; #boltzmann constant(m^2 Kg s^-2 k^-1)\n", + "m1=9.11*10**-31; #mass of a electron(kg)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(3*k*T/m1); #thermal velocity(ms^-1)\n", + "E=V/t; #unit potenyial voltage gradient(V m^-1)\n", + "vd=E*m; #drift velocity of electrons(m s^-1)\n", + "\n", + "#Result\n", + "print \"The thermal velocity is\",round(v/10**3,2),\"*10**3 m s^-1\"\n", + "print \"Drift velocity of electrons is\",vd,\"m s^-1\"\n", + "print \"Thus the terminal velocity is high compared to the drift velocity\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.7, Page number 181" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electrical conductivity of copper is 5.9 *10**7 S m^-1\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", + "AW=63.5; #atomic weight of copper\n", + "D=8.93*10**3; #density of copper(kg m^-3)\n", + "t=2.48*10**-14; #relaxation time of copper(s)\n", + "AV=6.023*10**26; #avagadro no(mole^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of a electron(kg)\n", + "\n", + "#Calculation\n", + "n=AV*D/AW; #density of electrons per unit volume(m^-3)\n", + "sigma=n*e**2*t/m; #electrical conductivity of copper(Sm^-1)\n", + "\n", + "#Result\n", + "print \"The electrical conductivity of copper is\",round(sigma/10**7,1),\"*10**7 S m^-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.8, Page number 181" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The drift velocity in copper is 3.6657 *10**-6 ms^-1\n", + "The current density in copper is 4.9736 *10**4 Am^-2\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", + "I=10; #current(A)\n", + "r=0.8*10**-2; #radius of wire(m)\n", + "n=8.48*10**28; #density of free electron(m^-3)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "J=I/(math.pi*r**2); #current density of copper(Am^-2)\n", + "v=J/(n*e); #drift velocity of copper(ms^-1)\n", + "\n", + "#Result\n", + "print \"The drift velocity in copper is\",round(v*10**6,4),\"*10**-6 ms^-1\"\n", + "print \"The current density in copper is\",round(J/10**4,4),\"*10**4 Am^-2\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.9, Page number 182" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mobility of charge is 6.997 *10**-3 m^2 V^-1 s^-1\n", + "The drift velocity of electrons is 0.6997 m s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.54*10**-8; #resistivity of silver wire at room temperature(ohm metre)\n", + "E=100; #Electric field along the wire(V/m)\n", + "n=5.8*10**28; #n is assuming of conduction electrons(m^-3)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "mew=1/(r*n*e); #mobility of charge(m^2 V^-1 s^-1)\n", + "vd=mew*E; #drift velocity of electrons(m s^-1)\n", + "\n", + "#Result\n", + "print \"The mobility of charge is\",round(mew*10**3,3),\"*10**-3 m^2 V^-1 s^-1\"\n", + "print \"The drift velocity of electrons is\",round(vd,4),\"m s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.10, Page number 182" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The relaxation time collision of electrons in copper obeying classical laws is 2.43 *10**-14 s\n", + "The mobility charge of copper obeying classical laws is 0.427 *10**-2 m^2 V^-1 s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D=8.92*10**3; #density of copper(kg m^-3)\n", + "AW=63.5; #atomic weight of copper\n", + "r=1.73*10**-8; #resistivity of copper(ohm metre)\n", + "AV=6.023*10**26; #avagadro no(mole^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of a electron(kg)\n", + "\n", + "#Calculation\n", + "n=AV*D/AW; #density of electrons per unit volume(m^-3)\n", + "tow=m/(r*n*e**2); #average time collision of electrons in copper(s)\n", + "mew=1/(r*n*e); #mobility of charge(m^2 V^-1 s^-1)\n", + "\n", + "#Result\n", + "print \"The relaxation time collision of electrons in copper obeying classical laws is\",round(tow*10**14,2),\"*10**-14 s\"\n", + "print \"The mobility charge of copper obeying classical laws is\",round(mew*10**2,3),\"*10**-2 m^2 V^-1 s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.11, Page number 183" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electrical resistivity is 4.63 *10**-8 ohm 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", + "r=1.85*10**-10; #the radius of sodium atom(m)\n", + "t=3*10**-14; #the classic value of mean free time(sec)\n", + "temp=0; #temperature(centigrade)\n", + "na=2; #number of atoms in a unit cell\n", + "ne=1; #number of electrons per unit cell\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "m=9.11*10**-31; #mass of a electron(kg)\n", + "\n", + "#Calculation \n", + "a=4*r/math.sqrt(3); #a is one side in bcc structure unit cell(m)\n", + "v=a**3; #volume of bcc structure unit cell(m^3)\n", + "n=na*ne/v; #density of electrons per unit volume(m^-3)\n", + "rho=m/(n*e**2*t); #The electrical resistivity(ohm metre)\n", + "\n", + "#Result\n", + "print \"The electrical resistivity is\",round(rho*10**8,2),\"*10**-8 ohm metre\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.12, Page number 184" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Free electron concentration in aluminium is 0.18 V/m\n", + "Mobility of the charge is 1.28 *10**-3 m^2 V^-1 S^-1\n", + "The drift velocity of electrons is 2.304 *10**-4 m s^-1\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=2.7*10**-8; #electrical resistivity of aluminium(ohm metre)\n", + "AW=26.98; #atomic weight of aluminium\n", + "d=2.7*10**3; #density of volume(Kg/m^3)\n", + "R=60*10**-3; #resistance(W)\n", + "l=5; #length of aluminium wire(m)\n", + "i=15; #aluminuim wire carries a current(A)\n", + "fe=3; #number of free electrons \n", + "AV=6.023*10**26; #avagadro no(mole^-1)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "n=AV*d*fe/AW; #density of electrons per unit volume(electrons/m^-3)\n", + "mew=1/(n*e*rho); #mobility of the charge(m^2 V^-1 S^-1)\n", + "E=i*R/l; #free electron concentration(V/m)\n", + "vd=mew*E; #drift velocity(m s^-1)\n", + "\n", + "#Result\n", + "print \"Free electron concentration in aluminium is\",E,\"V/m\"\n", + "print \"Mobility of the charge is\",round(mew*10**3,2),\"*10**-3 m^2 V^-1 S^-1\"\n", + "print \"The drift velocity of electrons is\",round(vd*10**4,3),\"*10**-4 m s^-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.13, Page number 184" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistance of an intrinsic Ge rod is 4310 ohm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=1*10**-2; #length of intrinsic Ge rod(m)\n", + "b=1*10**-3; #breadth of intrinsic Ge rod(m)\n", + "t=1*10**-3; #thickness of intrinsic Ge rod(m)\n", + "temp=300; #temperature(K)\n", + "d=2.5*10**19; #intrinsic carrier density(Kg/m^3)\n", + "z=0.39; #mobility of electron(m^2 V^-1 S^-1)\n", + "zh=0.19; #mobility of hole(m^2 V^-1 S^-1) \n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "x=d*e*(z+zh); #electrical conductivity(ohm^-1 m^-1)\n", + "r=1/x; #electrical resistivity(ohm metre)\n", + "A=b*t; #area(m^2)\n", + "R=r*l/A; #resistance of an intrinsic Ge rod(ohm)\n", + "\n", + "#Result\n", + "print \"The resistance of an intrinsic Ge rod is\",int(R),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.14, Page number 188" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal conductivity of copper is 189.9299 W m^-1 K^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=8.48*10**28; #free electron density of copper(m^-3)\n", + "y=2.8138*10**-9; #mean free path(m)\n", + "v=1.1536*10**5; #velocity of copper(m s^-1)\n", + "t=20; #temperature of copper(C)\n", + "Kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "K=1/2*(d*v*y*Kb); #thermal conductivity of copper(W m^-1 K^-1)\n", + "\n", + "#Result\n", + "print \"The thermal conductivity of copper is\",round(K,4),\"W m^-1 K^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.15, Page number 189" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal conductivity of brass is 14.64 W m^-1 K^-1\n", + "The thermal resistance of brass is 4.503 K W^-1\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", + "er=50*10**-8; #electrical resistivity(ohm metre)\n", + "t=300; #temperature(K)\n", + "r=13*10**-3; #radius of brass(m)\n", + "th=35*10**-3; #thickness of brass(m)\n", + "L=2.44*10**-8; #Lorentz number(W ohm K^-2)\n", + "\n", + "#Calculation\n", + "K=L*t/er; #thermal conductivity of brass(W m^-1 K^-1)\n", + "A=math.pi*r**2; #area of brass disk(m^2)\n", + "Rt=th/(K*A); #thermal resistance of brass(K W^-1)\n", + "\n", + "#Result\n", + "print \"The thermal conductivity of brass is\",K,\"W m^-1 K^-1\"\n", + "print \"The thermal resistance of brass is\",round(Rt,3),\"K W^-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.16, Page number 189" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lorentz number is 2.2094 *10**-8 W ohm K^-2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=5.87*10**7; #electrical conductivity(ohm^-1 m^-1)\n", + "k=380; #thermal conductivity of copper(W m-1 K^-1)\n", + "t=293; #temperature of copper(K)\n", + "\n", + "#Calculation\n", + "L=k/(x*t); #Lorentz number(W ohm K^-2)\n", + "\n", + "#Result\n", + "print \"Lorentz number is\",round(L*10**8,4),\"*10**-8 W ohm K^-2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.17, Page number 189" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal conductivity of copper is 468.48 W m^-1 K^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=6.40*10**7; #electrical conductivity(mho m^-1)\n", + "t=300; #temperature of copper(K)\n", + "L=2.44*10**-8; #Lorentz number(W ohm K^-2)\n", + "\n", + "#Calculation\n", + "K=x*t*L; #thermal conductivity of copper(W m^-1 K^-1)\n", + "\n", + "#Result\n", + "print \"The thermal conductivity of copper is\",K,\"W m^-1 K^-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/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb new file mode 100644 index 00000000..e403d61e --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter8.ipynb @@ -0,0 +1,669 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#8: Quantum Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.1, Page number 204" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy of photon is 12412.5 eV\n", + "The momentum of the photon is 6.62e-24 Kg m s^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "W=0.1*10**-9; #wavelength of photon(m)\n", + "h=6.62*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "E=h*c/(W*e); #energy of photon(eV)\n", + "P=h/W; #momentum of the photon(Kgms^-1)\n", + "\n", + "#Result\n", + "print \"The energy of photon is\",E,\"eV\"\n", + "print \"The momentum of the photon is\",P,\"Kg m s^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.2, Page number 205" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total number of photons emitted per second is 2.965 *10**20 per sec\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", + "w=5893*10**-10; #wavelength of emitted light(m)\n", + "e=100; #total energy emitted per sec\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "E=h*c/w; #energy of one photon(J)\n", + "N=e/E; #The total numberof photons emitted(sec)\n", + "\n", + "#Result\n", + "print \"The total number of photons emitted per second is\",round(N/10**20,3),\"*10**20 per sec\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.3, Page number 205" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy density per unit wavelength in a black body cavity is 0.018349 J/m^4\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", + "w=4000*10**-10; #wavelength in black body(m)\n", + "t=1500; #temperature of black body(K)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "Kb=1.38*10**-23; #Boltzmann's constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Edw=(8*math.pi*h*c/w**5)*(1/(math.exp(h*c/(w*Kb*t))-1)); #The energy density per unit wavelength in a black body cavity(J/m^4)\n", + "\n", + "#Result\n", + "print \"The energy density per unit wavelength in a black body cavity is\",round(Edw,6),\"J/m^4\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.4, Page number 211" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The compton wavelength for an electron is 0.0242 Angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "\n", + "#Calculation\n", + "w=h/(c*m)*10**10; #The compton wavelength for an electron(Armstrong)\n", + "\n", + "#Result\n", + "print \"The compton wavelength for an electron is\",round(w,4),\"Angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.5, Page number 212" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The change in wavelength for X ray photon is 0.0242 Angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=90; #x ray photon scattered at a angle(degrees)\n", + "h=6.625*10**-34; #Planck's constant(J-sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "deltalamda=((h/(c*m))*(1-math.cos(x)))/10**-10; #The change in wavelength for Xray photon(Angstrom)\n", + "\n", + "#Result\n", + "print \"The change in wavelength for X ray photon is\",round(deltalamda,4),\"Angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.6, Page number 212" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of X-rays carbon is 1.72 Angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=180; #x ray carbon scattered at a angle(degrees)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "m=9.11*10**-31; #mass of electron(kg)\n", + "v=1.8*10**18; #frequency of incident rays(s^-1)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "w=c/v; #wavelength(m)\n", + "tw=(h/(c*m))*(1-math.cos(theta)); #The change wavelength for Xray carbon(m)\n", + "lamda_dash=(w+tw)/10**-10; #The wavelength of X-rays carbon(Angstrom)\n", + "\n", + "#Result\n", + "print \"The wavelength of X-rays carbon is\",round(lamda_dash,2),\"Angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.7, Page number 212" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The wavelength of scattered photons is 3.012 Angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=3*10**-10; #wavelength of incident photons(m)\n", + "theta=60; #angle of view(degrees)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda_dash=(w+((h/(c*m))*(1-math.cos(theta))))/10**-10; #The wavelength of scattered photons(Angstrom)\n", + "\n", + "#Result\n", + "print \"The wavelength of scattered photons is\",round(lamda_dash,3),\"Angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.8, Page number 213" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Velocity of moving electron is 2.9047 *10**8 m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=4; #Total energy increase to 4 times of its initial rest energy\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(c**2*(1-(1/x**2))); #The Velocity of moving electron(m/sec)\n", + "\n", + "#Result\n", + "print \"The Velocity of moving electron is\",round(v/10**8,4),\"*10**8 m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.9, Page number 224" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The least energy of the particle can be obtained is 37.639 eV\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", + "a=0.1*10**-9; #width of high potential box(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "n=1; #take n equal to one\n", + "\n", + "#Calculation\n", + "E=(n**2*h**2)/(8*m*a**2*e); #The least energy of the particle can be obtained(eV)\n", + "\n", + "#Result\n", + "print \"The least energy of the particle can be obtained is\",round(E,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.10, Page number 224" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The least energy of the neutron can be obtained is 2.053 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=10**-14; #length of impenerable box(m)\n", + "m=1.67*10**-27; #mass of neutron(Kg)\n", + "n=1; #for lowest energy\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "\n", + "#Calculation\n", + "E=(n**2*h**2)/(8*m*a**2); #The least energy of the neutron can be obtained(J)\n", + "\n", + "#Result\n", + "print \"The least energy of the neutron can be obtained is\",round(E/(1.6*10**-19*10**6),3),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.11, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The first permitted energy level by taking n=1 is 2.352 eV\n", + "The second permitted energy level by taking n=2 is 9.41 eV\n", + "The third permitted energy level by taking n=3 is 21.172 eV\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", + "a=4*10**-10; #width of electron box(m)\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "n=1; #first permitted level\n", + "\n", + "#Calculation\n", + "E1=((n**2*h**2)/(8*m*a**2*e)); #The first permitted energy level by taking n=1(eV)\n", + "E2=4*E1; #The second permitted energy level by taking n=2(eV)\n", + "E3=9*E1; #The third permitted energy level by taking n=3(eV)\n", + "\n", + "#Result\n", + "print \"The first permitted energy level by taking n=1 is\",round(E1,3),\"eV\"\n", + "print \"The second permitted energy level by taking n=2 is\",round(E2,2),\"eV\"\n", + "print \"The third permitted energy level by taking n=3 is\",round(E3,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.12, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lowest energy of electron in a cubical box is 50.186 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1.5*10**-10; #each side of cubical box(m)\n", + "n1=1; #for lowest energy\n", + "n2=1; #for lowest energy\n", + "n3=1; #for lowest energy\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "n=(n1**2+n2**2+n3**2); #total value of n\n", + "E=((n*h**2)/(8*m*a**2*e)); #The lowest energy of electron ina cubical box(eV)\n", + "\n", + "#Result\n", + "print \"The lowest energy of electron in a cubical box is\",round(E,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.13, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lowest energy of electron in deep potential well is 0.02352 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4*10**-9; #width of potential well(m)\n", + "n=1; #For minimum energy n value\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "E=((n**2*h**2)/(8*m*a**2*e)); #The lowest energy of electron in deep potential well(eV)\n", + "\n", + "#Result\n", + "print \"The lowest energy of electron in deep potential well is\",round(E,5),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.14, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy required the electron from its ground state to the fifth exited state is 1317 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.1*10**-9; #length of one dimensional box(m)\n", + "n=1; #first permitted level\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculation\n", + "E1=((n**2*h**2)/(8*m*a**2*e)); #The ground state of electron in an one dimensional box(eV)\n", + "E6=36*E1; #The fifth exited state of electron(eV)\n", + "E=E6-E1; #The energy required the electron from its ground state to the fifth exited state(eV)\n", + "\n", + "#Result\n", + "print \"The energy required the electron from its ground state to the fifth exited state is\",int(E),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.15, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The lowest energy of the system consisting of three electron ia a one dimensional box is 112.9184 eV\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", + "a=0.1*10**-9; #length of one dimensional box(m)\n", + "n=1; #first permitted level\n", + "h=6.625*10**-34; #Planck's constant(m^2 Kg/sec)\n", + "m=9.11*10**-31; #mass of electron(Kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "ne=3; #the number of electrons\n", + "\n", + "#Calculation\n", + "E=((n**2*h**2)/(8*m*a**2*e))*ne; #The lowest energy of the system consisting of three electron ia a one dimensional box(eV)\n", + "\n", + "#Result\n", + "print \"The lowest energy of the system consisting of three electron ia a one dimensional box is\",round(E,4),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb b/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb new file mode 100644 index 00000000..90c89eeb --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/Chapter9.ipynb @@ -0,0 +1,585 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#9: Energy bands in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.1, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi function for an energy kt above fermi energy is 0.269\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#E-EF=KT\n", + "#K=KB is the boltzmann constant in m^2 Kg s^-2 k^-1\n", + "\n", + "#Calculation\n", + "f=1/(1+math.exp(1)); #The fermi function for an energy kt above fermi energy\n", + "\n", + "#Result\n", + "print \"The fermi function for an energy kt above fermi energy is\",round(f,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.2, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi function is 0.358999\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", + "X=0.01*1.6*10**-19; #difference between energy and fermi energy(J)\n", + "T=200; #temperature(K)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(J/K)\n", + "\n", + "#Calculation\n", + "f=1/(1+math.exp(X/(KB*T))); #The fermi function\n", + "\n", + "#Result\n", + "print \"The fermi function is\",round(f,6)\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.3, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi velocity fo conducting electron in aluminium is 2.02118 *10**6 ms^-1\n", + "The mean free path for conducting electron of aluminium is 14.7546 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "EF=11.63*1.6*10**-19; #fermi energy of conducting electron in aluminium(J)\n", + "t=7.3*10**-15; #relaxation time for electron(sec)\n", + "m=9.11*10**-31; #mass of electon(Kg)\n", + "\n", + "#Calculation\n", + "Vf=math.sqrt(2*EF/m); #The fermi velocity fo conducting electron in aluminium(ms^-1)\n", + "x=t*Vf*10**9; #mean free path for conducting electron of aluminium(nm)\n", + "\n", + "#Result\n", + "print \"The fermi velocity fo conducting electron in aluminium is\",round(Vf/10**6,5),\"*10**6 ms^-1\"\n", + "print \"The mean free path for conducting electron of aluminium is\",round(x,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.4, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi energy in a metal is 3.36888 *10**-19 J or 2.1055 eV\n", + "The fermi temperature in a metal is 24.41 *10**3 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vf=0.86*10**6; #The femi energy of electons in the metal(m/sec)\n", + "m=9.11*10**-31; #mass of electon(Kg)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Ef=(1/2)*m*Vf**2; #The fermi energy in a metal(J)\n", + "Tf=Ef/KB; #The fermi temperature in a metal(K)\n", + "\n", + "#Result\n", + "print \"The fermi energy in a metal is\",round(Ef/10**-19,5),\"*10**-19 J or\",round(Ef/(1.6*10**-19),4),\"eV\"\n", + "print \"The fermi temperature in a metal is\",round(Tf/10**3,2),\"*10**3 K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.5, Page number 242" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi temparature for sodium is 37.1 *10**3 K\n", + "The fermi velocity fo conducting electron in aluminium is 1.0602 *10**6 ms^-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ef=3.2*1.6*10**-19; #The fermi energy in a metal(J)\n", + "m=9.11*10**-31; #mass of electon(Kg)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "Tf=Ef/KB; #The fermi temparature for sodium(K)\n", + "Vf=math.sqrt(2*Ef/m); #The fermi velocity fo conducting electron in aluminium(ms^-1)\n", + "\n", + "#Result\n", + "print \"The fermi temparature for sodium is\",round(Tf/10**3,2),\"*10**3 K\"\n", + "print \"The fermi velocity fo conducting electron in aluminium is\",round(Vf/10**6,4),\"*10**6 ms^-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.6, Page number 242" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The temperature at which there is 1% probability that an electron in a solid is 1.26158 *10**3 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=5.5*1.6*10**-19; #energy level(J)\n", + "Ef=5*1.6*10**-19; #fermi energy level(J)\n", + "x=0.5*1.6*10**-19; #Difference between energy and fermi energy(J)\n", + "f=0.01; #fermi function at which there is 1% probability that an electron in a solid\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "T=x/(KB*(math.log(1-f)-math.log(f))); #The temperature at which there is 1% probability that an electron in a solid(K)\n", + "\n", + "#Result\n", + "print \"The temperature at which there is 1% probability that an electron in a solid is\",round(T/10**3,5),\"*10**3 K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.7, Page number 244" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The energy for probability of occupancy at 1st is 1.98 eV\n", + "The energy for probability of occupancy at 2nd is 2.219 eV\n", + "The energy for probability of occupancy at 3rd is 2.1 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ef=2.1*1.6*10**-19; #fermi energy level in potassium(J)\n", + "f1=0.99; #fermi factor for 1st\n", + "f2=0.01; #fermi factor for 2nd\n", + "f3=0.5; #fermi factor for 3rd\n", + "T=300; #temperature(K)\n", + "e=1.6*10**-19; #charge of electron(C)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "E1=(Ef+((KB*T)*(math.log(1-f1)-math.log(f1))))/e; #The energy for probability of occupancy at 1st(eV)\n", + "E2=(Ef+((KB*T)*(math.log(1-f2)-math.log(f2))))/e; #The energy for 1st at which the probability of occupancy(eV)\n", + "E3=(Ef+((KB*T)*(math.log(1-f3)-math.log(f3))))/e; #The energy for 1st at which the probability of occupancy(eV)\n", + "\n", + "#Result\n", + "print \"The energy for probability of occupancy at 1st is\",round(E1,2),\"eV\"\n", + "print \"The energy for probability of occupancy at 2nd is\",round(E2,3),\"eV\"\n", + "print \"The energy for probability of occupancy at 3rd is\",E3,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.8, Page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The probability of unoccupancy by an electron at room temperature is 0.97946\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "X=0.1*1.6*10**-19; #difference between energy and fermi energy(J)\n", + "T=300; #temperature(K)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "f=1-1/(1+math.exp(X/(KB*T))); #The probability of unoccupancy by an electron at room temperature \n", + "\n", + "#Result\n", + "print \"The probability of unoccupancy by an electron at room temperature is\",round(f,5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.9, Page number 252" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi energy for the metal is 11.66 eV\n", + "The fermi factor is 0.0205\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=4; #number of atoms/unit cell in Al\n", + "a=4.05*10**-10; #lattice constant of Aluminium which is FCC crystal(m)\n", + "nf=3; #number of free electrons per atom in Al\n", + "T=300; #ambient temperature(K)\n", + "x=0.1*1.6*10**-19; #The same difference energy and fermi energy(J)\n", + "m=9.11*10**-31; #mass of electon(kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "\n", + "#Calculation\n", + "nc=n*nf/(a**3); #number of electrons per unit volume\n", + "Ef=h**2/(8*m)*((3*nc)/math.pi)**(2/3); #The fermi energy for the metal(eV)\n", + "f=1/(1+math.exp(x/(KB*T))); #he fermi factor\n", + "\n", + "#Result\n", + "print \"The fermi energy for the metal is\",round(Ef/(1.6*10**-19),2),\"eV\"\n", + "print \"The fermi factor is\",round(f,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.10, Page number 253" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi energy for cesium is 1.537 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=2; #number of atoms/unit cell in cesium which is Bcc\n", + "a=6.14*10**-10; #lattice constant of cesium which is BCC crystal(m)\n", + "nf=1; #number of free electrons per atom in cesium\n", + "m=9.11*10**-31; #mass of electon(kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "KB=1.38*10**-23; #Boltzmann's Constant(m^2 Kg s^-2 k^-1)\n", + "e=1.6*10**-19; #charge of electron(C)\n", + "\n", + "#Calculation\n", + "nc=n*nf/(a**3); #number of electrons per unit volume\n", + "Ef=(h**2/(8*m)*((3*nc)/math.pi)**(2/3))/e; #The fermi energy for the metal(eV)\n", + "\n", + "#Result\n", + "print \"The fermi energy for cesium is\",round(Ef,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.11, Page number 254" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of free electrons per unit volume in potassium is 1.38 *10**28 electrons/m^3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ef=2.1*1.6*10**-19; #The fermi energy level in potassium at a particular temperature(J)\n", + "m=9.11*10**-31; #mass of electron(kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "\n", + "#Calculation\n", + "nc=(8*m/(h**2)*Ef)**(3/2)*(math.pi/3); #ThE Number of free electrons per unit volume in potassium(electrons/m^3)\n", + "\n", + "#Result\n", + "print \"The number of free electrons per unit volume in potassium is\",round(nc/10**28,2),\"*10**28 electrons/m^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.12, Page number 254" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi energy for the sodium is 3.155 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "AW=23; #atomic weight of sodium(gm/mole)\n", + "d=0.971*10**6; #density of sodium(gm/m^3)\n", + "m=9.11*10**-31; #mass of electon(kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "AV=6.02*10**23; #Avagadro number(mole^-1)\n", + "e=1.6*10**-19; #charge of electron(C)\n", + "\n", + "#Calculation\n", + "nc=AV*d/AW; #number of electrons per unit volume\n", + "Ef=(h**2/(8*m)*((3*nc)/math.pi)**(2/3))/e; #The fermi energy for the sodium(eV)\n", + "\n", + "#Result\n", + "print \"The fermi energy for the sodium is\",round(Ef,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.13, Page number 255" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The fermi energy for the sodium is 7.046 eV\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", + "AW=63.5; #atomic weight of copper(u)\n", + "M=63.5*1.66*10**-27; #mass of one copper atom(kg)\n", + "d=8.94*10**3; #density of sodium(Kg/m^3)\n", + "m=9.11*10**-31; #mass of electon(Kg)\n", + "h=6.625*10**-34; #plank's constant(m^2 Kg/sec)\n", + "e=1.6*10**-19; #charge of electron(C)\n", + "\n", + "#Calculation\n", + "nc=d/M; #number of electrons per unit volume(electrons/m^3)\n", + "Ef=h**2/(8*m)*((3*nc)/math.pi)**(2/3)/e; #The fermi energy for the sodium(eV)\n", + "\n", + "#Result\n", + "print \"The fermi energy for the sodium is\",round(Ef,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_G._Vijayakumari/README.txt b/Engineering_Physics_by_G._Vijayakumari/README.txt new file mode 100644 index 00000000..87e83878 --- /dev/null +++ b/Engineering_Physics_by_G._Vijayakumari/README.txt @@ -0,0 +1,10 @@ +Contributed By: SPANDANA ARROJU +Course: others +College/Institute/Organization: JNAFAU +Department/Designation: Applied Arts +Book Title: Engineering Physics +Author: G. Vijayakumari +Publisher: Vikas Publishing House Pvt Ltd(New Delhi) +Year of publication: 2007 +Isbn: 9788125924098 +Edition: 2 \ No newline at end of file diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png new file mode 100644 index 00000000..2b3d6924 Binary files /dev/null and b/Engineering_Physics_by_G._Vijayakumari/screenshots/11.png differ diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png new file mode 100644 index 00000000..b7b6ba9e Binary files /dev/null and b/Engineering_Physics_by_G._Vijayakumari/screenshots/22.png differ diff --git a/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png b/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png new file mode 100644 index 00000000..bfad6e10 Binary files /dev/null and b/Engineering_Physics_by_G._Vijayakumari/screenshots/33.png differ diff --git a/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb new file mode 100755 index 00000000..e1e3146e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_1.ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Dielectric properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 10.23" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy stored in the condenser is 1.0 J\n", + "energy stored in the dielectric is 0.99 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C=2*10**-6; #capacitance(F)\n", + "V=1000; #voltage(V)\n", + "epsilon_r=100;\n", + "\n", + "#Calculation\n", + "W=C*V**2/2; #energy stored in the condenser(J)\n", + "C0=C/epsilon_r;\n", + "W0=C0*V**2/2;\n", + "E=1-W0; #energy stored in the dielectric(J)\n", + "\n", + "#Result\n", + "print \"energy stored in the condenser is\",W,\"J\"\n", + "print \"energy stored in the dielectric is\",E,\"J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 10.24" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio betwen electronic and ionic polarizability is 1.738\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r=4.94;\n", + "n2=2.69;\n", + "\n", + "#Calculation\n", + "x=(epsilon_r-1)/(epsilon_r+2);\n", + "y=(n2-1)/(n2+2);\n", + "r=(x/y)-1; #ratio betwen electronic and ionic polarizability\n", + "\n", + "#Result\n", + "print \"ratio betwen electronic and ionic polarizability is\",round(1/r,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.3, Page number 10.24" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "parallel loss resistance is 10.0 ohm\n", + "answer varies due to rounding off errors\n", + "parallel loss capacitance is 226.56 *10**-12 Farad\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r=2.56;\n", + "epsilon_R=2.65*0.7*10**-4;\n", + "tan_delta=0.7*10**-4; \n", + "A=8*10**-4; #area(m**2)\n", + "d=0.08*10**-3; #diameter(m)\n", + "f=1*10**6; #frequency(Hz)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "Rp=d/(2*math.pi*f*epsilon0*epsilon_R*A); #parallel loss resistance(ohm)\n", + "Cp=A*epsilon0*epsilon_r/d; #parallel loss capacitance(Farad)\n", + "\n", + "#Result\n", + "print \"parallel loss resistance is\",round(Rp/10**6),\"ohm\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"parallel loss capacitance is\",round(Cp*10**12,2),\"*10**-12 Farad\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.4, Page number 10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of material is 1.339\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=3*10**28; #number of atoms(per m**3)\n", + "alphae=10**-40; \n", + "epsilon0=8.854*10**-12;\n", + "\n", + "#Calculation\n", + "epsilon_r=1+(N*alphae/epsilon0); #dielectric constant of material\n", + "\n", + "#Result\n", + "print \"dielectric constant of material is\",round(epsilon_r,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.5, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 2.243 *10**-41 Fm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=2.7*10**25; #number of atoms(per m**3)\n", + "epsilon0=8.854*10**-12;\n", + "epsilon_r=1.0000684;\n", + "\n", + "#Calculation\n", + "alphae=epsilon0*(epsilon_r-1)/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**41,3),\"*10**-41 Fm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.6, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance is 8.85e-12 F\n", + "charge on plates is 8.85e-10 coulomb\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=100*10**-4; #area(m**2)\n", + "d=10**-2; #diameter(m)\n", + "V=100; #potential(V)\n", + "\n", + "#Calculation\n", + "C=epsilon0*A/d; #capacitance(F)\n", + "Q=C*V; #charge on plates(coulomb)\n", + "\n", + "#Result\n", + "print \"capacitance is\",C,\"F\"\n", + "print \"charge on plates is\",Q,\"coulomb\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.7, Page number 10.27" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 3.181 *10**-40 Fm**2\n" + ] + } + ], + "source": [ + "#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", + "w=32; #atomic weight\n", + "gama=1/3; #internal field constant\n", + "epsilon0=8.55*10**-12;\n", + "epsilon_r=3.75;\n", + "\n", + "#Calculation\n", + "N=n*d/w; #number of atoms(per m**3)\n", + "alphae=3*epsilon0*((epsilon_r-1)/(epsilon_r+2))/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 Fm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.8, Page number 10.28" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resultant voltage is 39.73 Volts\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Q=2*10**-10; #charge(C)\n", + "d=4*10**-3; #seperation(m)\n", + "epsilon_r=3.5;\n", + "A=650*10**-6; #area(m**2)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "V=Q*d/(epsilon0*epsilon_r*A); #resultant voltage(V)\n", + "\n", + "#Result\n", + "print \"resultant voltage is\",round(V,2),\"Volts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.9, Page number 10.28" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric displacement is 265.5 *10**-9 C m**-2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2*10**-3; #seperation(m)\n", + "epsilon_r=6;\n", + "V=10; #voltage(V)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "E=V/d;\n", + "D=epsilon0*epsilon_r*E; #dielectric displacement(C m**-2)\n", + "\n", + "#Result\n", + "print \"dielectric displacement is\",round(D*10**9,1),\"*10**-9 C m**-2\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb new file mode 100755 index 00000000..e1e3146e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter10_2.ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Dielectric properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 10.23" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy stored in the condenser is 1.0 J\n", + "energy stored in the dielectric is 0.99 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C=2*10**-6; #capacitance(F)\n", + "V=1000; #voltage(V)\n", + "epsilon_r=100;\n", + "\n", + "#Calculation\n", + "W=C*V**2/2; #energy stored in the condenser(J)\n", + "C0=C/epsilon_r;\n", + "W0=C0*V**2/2;\n", + "E=1-W0; #energy stored in the dielectric(J)\n", + "\n", + "#Result\n", + "print \"energy stored in the condenser is\",W,\"J\"\n", + "print \"energy stored in the dielectric is\",E,\"J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 10.24" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio betwen electronic and ionic polarizability is 1.738\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r=4.94;\n", + "n2=2.69;\n", + "\n", + "#Calculation\n", + "x=(epsilon_r-1)/(epsilon_r+2);\n", + "y=(n2-1)/(n2+2);\n", + "r=(x/y)-1; #ratio betwen electronic and ionic polarizability\n", + "\n", + "#Result\n", + "print \"ratio betwen electronic and ionic polarizability is\",round(1/r,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.3, Page number 10.24" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "parallel loss resistance is 10.0 ohm\n", + "answer varies due to rounding off errors\n", + "parallel loss capacitance is 226.56 *10**-12 Farad\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r=2.56;\n", + "epsilon_R=2.65*0.7*10**-4;\n", + "tan_delta=0.7*10**-4; \n", + "A=8*10**-4; #area(m**2)\n", + "d=0.08*10**-3; #diameter(m)\n", + "f=1*10**6; #frequency(Hz)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "Rp=d/(2*math.pi*f*epsilon0*epsilon_R*A); #parallel loss resistance(ohm)\n", + "Cp=A*epsilon0*epsilon_r/d; #parallel loss capacitance(Farad)\n", + "\n", + "#Result\n", + "print \"parallel loss resistance is\",round(Rp/10**6),\"ohm\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"parallel loss capacitance is\",round(Cp*10**12,2),\"*10**-12 Farad\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.4, Page number 10.25" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of material is 1.339\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=3*10**28; #number of atoms(per m**3)\n", + "alphae=10**-40; \n", + "epsilon0=8.854*10**-12;\n", + "\n", + "#Calculation\n", + "epsilon_r=1+(N*alphae/epsilon0); #dielectric constant of material\n", + "\n", + "#Result\n", + "print \"dielectric constant of material is\",round(epsilon_r,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.5, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 2.243 *10**-41 Fm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=2.7*10**25; #number of atoms(per m**3)\n", + "epsilon0=8.854*10**-12;\n", + "epsilon_r=1.0000684;\n", + "\n", + "#Calculation\n", + "alphae=epsilon0*(epsilon_r-1)/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**41,3),\"*10**-41 Fm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.6, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance is 8.85e-12 F\n", + "charge on plates is 8.85e-10 coulomb\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=100*10**-4; #area(m**2)\n", + "d=10**-2; #diameter(m)\n", + "V=100; #potential(V)\n", + "\n", + "#Calculation\n", + "C=epsilon0*A/d; #capacitance(F)\n", + "Q=C*V; #charge on plates(coulomb)\n", + "\n", + "#Result\n", + "print \"capacitance is\",C,\"F\"\n", + "print \"charge on plates is\",Q,\"coulomb\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.7, Page number 10.27" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 3.181 *10**-40 Fm**2\n" + ] + } + ], + "source": [ + "#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", + "w=32; #atomic weight\n", + "gama=1/3; #internal field constant\n", + "epsilon0=8.55*10**-12;\n", + "epsilon_r=3.75;\n", + "\n", + "#Calculation\n", + "N=n*d/w; #number of atoms(per m**3)\n", + "alphae=3*epsilon0*((epsilon_r-1)/(epsilon_r+2))/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 Fm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.8, Page number 10.28" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resultant voltage is 39.73 Volts\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Q=2*10**-10; #charge(C)\n", + "d=4*10**-3; #seperation(m)\n", + "epsilon_r=3.5;\n", + "A=650*10**-6; #area(m**2)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "V=Q*d/(epsilon0*epsilon_r*A); #resultant voltage(V)\n", + "\n", + "#Result\n", + "print \"resultant voltage is\",round(V,2),\"Volts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.9, Page number 10.28" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric displacement is 265.5 *10**-9 C m**-2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2*10**-3; #seperation(m)\n", + "epsilon_r=6;\n", + "V=10; #voltage(V)\n", + "epsilon0=8.85*10**-12;\n", + "\n", + "#Calculation\n", + "E=V/d;\n", + "D=epsilon0*epsilon_r*E; #dielectric displacement(C m**-2)\n", + "\n", + "#Result\n", + "print \"dielectric displacement is\",round(D*10**9,1),\"*10**-9 C m**-2\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb new file mode 100755 index 00000000..43338be1 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_1.ipynb @@ -0,0 +1,529 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#11: Magnetic properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.1, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability of iron is 2154\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", + "M=1.4; #magnetic field(T)\n", + "H=6.5*10**-4; #magnetic field(T)\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi; #relative permeability of iron\n", + "\n", + "#Result\n", + "print \"relative permeability of iron is\",int(mew_r)\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.2, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 16\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=3300; #magnetic field(amp/m)\n", + "H=220; #magnetic field(amp/m)\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi; #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",int(mew_r)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.3, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation of material is 1.5 *10**3 A/m\n", + "flux density is 1.2585 T\n", + "answer given 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", + "H=10**6; #magnetic field(amp/m)\n", + "chi=1.5*10**-3;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation of material(A/m)\n", + "B=mew0*(M+H); #flux density(T)\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M/10**3,\"*10**3 A/m\"\n", + "print \"flux density is\",round(B,4),\"T\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.4, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation of material is 37.0 A/m\n", + "flux density is 0.0126 wb/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=10**4; #magnetic field(amp/m)\n", + "chi=3.7*10**-3;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation of material(A/m)\n", + "B=mew0*(M+H); #flux density(T)\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M,\"A/m\"\n", + "print \"flux density is\",round(B,4),\"wb/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.5, Page number 11.13" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 7.854 *10**-3 Am**2\n", + "answer given 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", + "r=5*10**-2 #radius(m)\n", + "I=500*10**-3; #current(A)\n", + "\n", + "#Calculation\n", + "A=2*math.pi*r**2;\n", + "mew_m=I*A; #magnetic moment(Am**2)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew_m*10**3,3),\"*10**-3 Am**2\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.6, Page number 11.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in magnetic moment is 3.943 *10**-29 Am**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=5.29*10**-11; #radius(m)\n", + "B=2; #magnetic field(T)\n", + "e=1.602*10**-19; #charge(c)\n", + "m=9.108*10**-31; #mass(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*10**29,3),\"*10**-29 Am**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.7, Page number 11.21" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptibility is 3.267 *10**-4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi1=2.8*10**-4; #susceptibility\n", + "T1=350; #temperature(K)\n", + "T2=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "chi2=chi1*T1/T2; #susceptibility\n", + "\n", + "#Result\n", + "print \"susceptibility is\",round(chi2*10**4,3),\"*10**-4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.8, Page number 11.27" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 0.61 mewB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Bs=0.65; #magnetic induction(wb/m**2)\n", + "d=8906; #density(kg/m**3)\n", + "n=6.025*10**26; #avagadro number\n", + "mew0=4*math.pi*10**-7;\n", + "w=58.7; #atomic weight(kg)\n", + "\n", + "#Calculation\n", + "N=d*n/w; #number of nickel atoms(per m**3)\n", + "mew_m=Bs/(N*mew0*9.27*10**-24); #magnetic moment(mewB)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew_m,2),\"mewB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.9, Page number 11.27" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 3.9 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew=9.4*10**-24; \n", + "H=2; #magnetic field(weber/m**2)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "\n", + "#Calculation\n", + "T=2*mew*H/(math.log(2)*k); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.10, Page number 11.28" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment per gram 1966.851 Am**2\n", + "magnetic moment per gram is 2.4716 Wb/m**2\n", + "answer given 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", + "d=7.8*10**3; #density(kg/m**3)\n", + "n=6.025*10**26; #number of atoms\n", + "w=157.26; #atomic weight(kg)\n", + "mewm=9.27*10**-24;\n", + "mew=7.1*mewm;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "N=d*n/w; #number of atoms\n", + "mew_B=N*mew/10**3; #magnetic moment per gram(Am**2)\n", + "Bs=N*mew0*mew;\n", + "\n", + "#Result\n", + "print \"magnetic moment per gram\",round(mew_B,3),\"Am**2\"\n", + "print \"magnetic moment per gram is\",round(Bs,4),\"Wb/m**2\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.11, Page number 11.42" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 0.02166 Tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #temperature(K)\n", + "Hc0=0.0306; #critical field(T)\n", + "T=2; #temperature(K)\n", + "\n", + "#Calculation\n", + "Hc2=Hc0*(1-(T/Tc)**2); #critical field(T)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc2,5),\"Tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.12, Page number 11.44" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current is 134.33 A\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", + "Tc=7.18; #temperature(K)\n", + "H0=6.5*10**4; #critical field(T)\n", + "T=4.2; #temperature(K)\n", + "d=1*10**-3; #diameter(m)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(T)\n", + "ic=math.pi*d*Hc; #critical current(A)\n", + "\n", + "#Result\n", + "print \"critical current is\",round(ic,2),\"A\"\n", + "print \"answer given in the 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/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb new file mode 100755 index 00000000..43338be1 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter11_2.ipynb @@ -0,0 +1,529 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#11: Magnetic properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.1, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability of iron is 2154\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", + "M=1.4; #magnetic field(T)\n", + "H=6.5*10**-4; #magnetic field(T)\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi; #relative permeability of iron\n", + "\n", + "#Result\n", + "print \"relative permeability of iron is\",int(mew_r)\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.2, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 16\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=3300; #magnetic field(amp/m)\n", + "H=220; #magnetic field(amp/m)\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi; #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",int(mew_r)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.3, Page number 11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation of material is 1.5 *10**3 A/m\n", + "flux density is 1.2585 T\n", + "answer given 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", + "H=10**6; #magnetic field(amp/m)\n", + "chi=1.5*10**-3;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation of material(A/m)\n", + "B=mew0*(M+H); #flux density(T)\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M/10**3,\"*10**3 A/m\"\n", + "print \"flux density is\",round(B,4),\"T\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.4, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation of material is 37.0 A/m\n", + "flux density is 0.0126 wb/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=10**4; #magnetic field(amp/m)\n", + "chi=3.7*10**-3;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation of material(A/m)\n", + "B=mew0*(M+H); #flux density(T)\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M,\"A/m\"\n", + "print \"flux density is\",round(B,4),\"wb/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.5, Page number 11.13" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 7.854 *10**-3 Am**2\n", + "answer given 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", + "r=5*10**-2 #radius(m)\n", + "I=500*10**-3; #current(A)\n", + "\n", + "#Calculation\n", + "A=2*math.pi*r**2;\n", + "mew_m=I*A; #magnetic moment(Am**2)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew_m*10**3,3),\"*10**-3 Am**2\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.6, Page number 11.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in magnetic moment is 3.943 *10**-29 Am**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=5.29*10**-11; #radius(m)\n", + "B=2; #magnetic field(T)\n", + "e=1.602*10**-19; #charge(c)\n", + "m=9.108*10**-31; #mass(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*10**29,3),\"*10**-29 Am**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.7, Page number 11.21" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptibility is 3.267 *10**-4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi1=2.8*10**-4; #susceptibility\n", + "T1=350; #temperature(K)\n", + "T2=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "chi2=chi1*T1/T2; #susceptibility\n", + "\n", + "#Result\n", + "print \"susceptibility is\",round(chi2*10**4,3),\"*10**-4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.8, Page number 11.27" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 0.61 mewB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Bs=0.65; #magnetic induction(wb/m**2)\n", + "d=8906; #density(kg/m**3)\n", + "n=6.025*10**26; #avagadro number\n", + "mew0=4*math.pi*10**-7;\n", + "w=58.7; #atomic weight(kg)\n", + "\n", + "#Calculation\n", + "N=d*n/w; #number of nickel atoms(per m**3)\n", + "mew_m=Bs/(N*mew0*9.27*10**-24); #magnetic moment(mewB)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew_m,2),\"mewB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.9, Page number 11.27" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 3.9 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew=9.4*10**-24; \n", + "H=2; #magnetic field(weber/m**2)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "\n", + "#Calculation\n", + "T=2*mew*H/(math.log(2)*k); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.10, Page number 11.28" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment per gram 1966.851 Am**2\n", + "magnetic moment per gram is 2.4716 Wb/m**2\n", + "answer given 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", + "d=7.8*10**3; #density(kg/m**3)\n", + "n=6.025*10**26; #number of atoms\n", + "w=157.26; #atomic weight(kg)\n", + "mewm=9.27*10**-24;\n", + "mew=7.1*mewm;\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "N=d*n/w; #number of atoms\n", + "mew_B=N*mew/10**3; #magnetic moment per gram(Am**2)\n", + "Bs=N*mew0*mew;\n", + "\n", + "#Result\n", + "print \"magnetic moment per gram\",round(mew_B,3),\"Am**2\"\n", + "print \"magnetic moment per gram is\",round(Bs,4),\"Wb/m**2\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.11, Page number 11.42" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 0.02166 Tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #temperature(K)\n", + "Hc0=0.0306; #critical field(T)\n", + "T=2; #temperature(K)\n", + "\n", + "#Calculation\n", + "Hc2=Hc0*(1-(T/Tc)**2); #critical field(T)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc2,5),\"Tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.12, Page number 11.44" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current is 134.33 A\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", + "Tc=7.18; #temperature(K)\n", + "H0=6.5*10**4; #critical field(T)\n", + "T=4.2; #temperature(K)\n", + "d=1*10**-3; #diameter(m)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(T)\n", + "ic=math.pi*d*Hc; #critical current(A)\n", + "\n", + "#Result\n", + "print \"critical current is\",round(ic,2),\"A\"\n", + "print \"answer given in the 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/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb new file mode 100755 index 00000000..93ea352e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_1.ipynb @@ -0,0 +1,159 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#12: Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.1, Page number 12.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative population is 1.0764 *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", + "e=1.6*10**-19; #charge(coulomb)\n", + "h=6.6*10**-34; #planck's constant(J sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=6943*10**-10; #wavelength(m)\n", + "k=8.61*10**-5;\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "dE=h*c/(e*lamda);\n", + "N2byN1=math.exp(-dE/(k*T)); #relative population\n", + "\n", + "#Result\n", + "print \"relative population is\",round(N2byN1*10**30,4),\"*10**-30\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.2, Page number 12.13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence is 1.0 milli radian\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a1=4*10**-3; #diameter(m)\n", + "a2=6*10**-3; #diameter(m)\n", + "d1=1; #distance(m)\n", + "d2=2; #distance(m)\n", + "\n", + "#Calculation\n", + "theta=(a2-a1)/(2*(d2-d1)); #divergence(radian)\n", + "\n", + "#Result\n", + "print \"divergence is\",theta*10**3,\"milli radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.3, Page number 12.45" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spot size is 0.867 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "s=1*10**-3; #size(m)\n", + "l=1*10**-3; #length(m)\n", + "lamda=650*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "tantheta=(l/2)/s; \n", + "theta=math.atan(tantheta); #angle(radian)\n", + "sintheta=round(math.sin(theta),2);\n", + "ss=0.6*lamda/sintheta; #spot size(m)\n", + "\n", + "#Result\n", + "print \"spot size is\",round(ss*10**6,3),\"micro 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/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb new file mode 100755 index 00000000..93ea352e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter12_2.ipynb @@ -0,0 +1,159 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#12: Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.1, Page number 12.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative population is 1.0764 *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", + "e=1.6*10**-19; #charge(coulomb)\n", + "h=6.6*10**-34; #planck's constant(J sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=6943*10**-10; #wavelength(m)\n", + "k=8.61*10**-5;\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "dE=h*c/(e*lamda);\n", + "N2byN1=math.exp(-dE/(k*T)); #relative population\n", + "\n", + "#Result\n", + "print \"relative population is\",round(N2byN1*10**30,4),\"*10**-30\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.2, Page number 12.13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence is 1.0 milli radian\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a1=4*10**-3; #diameter(m)\n", + "a2=6*10**-3; #diameter(m)\n", + "d1=1; #distance(m)\n", + "d2=2; #distance(m)\n", + "\n", + "#Calculation\n", + "theta=(a2-a1)/(2*(d2-d1)); #divergence(radian)\n", + "\n", + "#Result\n", + "print \"divergence is\",theta*10**3,\"milli radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.3, Page number 12.45" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spot size is 0.867 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "s=1*10**-3; #size(m)\n", + "l=1*10**-3; #length(m)\n", + "lamda=650*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "tantheta=(l/2)/s; \n", + "theta=math.atan(tantheta); #angle(radian)\n", + "sintheta=round(math.sin(theta),2);\n", + "ss=0.6*lamda/sintheta; #spot size(m)\n", + "\n", + "#Result\n", + "print \"spot size is\",round(ss*10**6,3),\"micro 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/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb new file mode 100755 index 00000000..fa599112 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_1.ipynb @@ -0,0 +1,274 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#13: Fiber Optics " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.1, Page number 13.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.391\n" + ] + } + ], + "source": [ + "#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); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.2, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle of acceptance is 26 degrees 29.5 minutes\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", + "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", + "alpha_i=math.asin(NA); #angle of acceptance(radian)\n", + "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n", + "alpha_id=int(alpha_i);\n", + "alpha_im=60*(alpha_i-alpha_id);\n", + "\n", + "#Result\n", + "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im,1),\"minutes\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.3, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "refractive index of core is 1.2333\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", + "NA=0.39; #numerical aperture\n", + "delta=0.05; #difference of indices\n", + "\n", + "#Calculation\n", + "n1=NA/math.sqrt(2*delta); #refractive index of core\n", + "\n", + "#Result\n", + "print \"refractive index of core is\",round(n1,4)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.4, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fractional index change is 0.0416\n" + ] + } + ], + "source": [ + "#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", + "\n", + "#Result\n", + "print \"fractional index change is\",round(delta,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.5, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.2965\n", + "angle of acceptance is 17 degrees 15.0 minutes\n" + ] + } + ], + "source": [ + "#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", + "alpha_i=math.asin(NA); #angle of acceptance(radian)\n", + "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n", + "alpha_id=int(alpha_i);\n", + "alpha_im=60*(alpha_i-alpha_id);\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.6, Page number 13.14" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "attenuation loss is 3.98 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Pout=40; #power(mW)\n", + "Pin=100; #power(mW)\n", + "\n", + "#Calculation\n", + "al=-10*math.log10(Pout/Pin); #attenuation loss(dB)\n", + "\n", + "#Result\n", + "print \"attenuation loss is\",round(al,2),\"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/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb new file mode 100755 index 00000000..fa599112 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter13_2.ipynb @@ -0,0 +1,274 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#13: Fiber Optics " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.1, Page number 13.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.391\n" + ] + } + ], + "source": [ + "#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); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.2, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angle of acceptance is 26 degrees 29.5 minutes\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", + "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", + "alpha_i=math.asin(NA); #angle of acceptance(radian)\n", + "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n", + "alpha_id=int(alpha_i);\n", + "alpha_im=60*(alpha_i-alpha_id);\n", + "\n", + "#Result\n", + "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im,1),\"minutes\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.3, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "refractive index of core is 1.2333\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", + "NA=0.39; #numerical aperture\n", + "delta=0.05; #difference of indices\n", + "\n", + "#Calculation\n", + "n1=NA/math.sqrt(2*delta); #refractive index of core\n", + "\n", + "#Result\n", + "print \"refractive index of core is\",round(n1,4)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.4, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fractional index change is 0.0416\n" + ] + } + ], + "source": [ + "#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", + "\n", + "#Result\n", + "print \"fractional index change is\",round(delta,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.5, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.2965\n", + "angle of acceptance is 17 degrees 15.0 minutes\n" + ] + } + ], + "source": [ + "#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", + "alpha_i=math.asin(NA); #angle of acceptance(radian)\n", + "alpha_i=(alpha_i*180/math.pi); #angle(degrees)\n", + "alpha_id=int(alpha_i);\n", + "alpha_im=60*(alpha_i-alpha_id);\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"angle of acceptance is\",alpha_id,\"degrees\",round(alpha_im),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 13.6, Page number 13.14" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "attenuation loss is 3.98 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Pout=40; #power(mW)\n", + "Pin=100; #power(mW)\n", + "\n", + "#Calculation\n", + "al=-10*math.log10(Pout/Pin); #attenuation loss(dB)\n", + "\n", + "#Result\n", + "print \"attenuation loss is\",round(al,2),\"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/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb new file mode 100755 index 00000000..ef73934a --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_1.ipynb @@ -0,0 +1,281 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#14: Acoustics of buildings and acoustic quieting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.1, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverberation time of hall is 1.264 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=475; #volume(m**3)\n", + "aw=200; #area of wall(m**2)\n", + "ac=100; #area of ceiling(m**2)\n", + "ac_w=0.025; #absorption coefficient of wall\n", + "ac_c=0.02; #absorption coefficient of ceiling\n", + "ac_f=0.55; #absorption coefficient of floor\n", + "\n", + "#Calculation\n", + "sigma_as=(aw*ac_w)+(ac*ac_c)+(ac*ac_f); \n", + "T=0.165*V/sigma_as; #reverberation time of hall(s)\n", + "\n", + "#Result\n", + "print \"reverberation time of hall is\",round(T,3),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.2, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new reverberation time is 1.31 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12500; #volume(m**3)\n", + "T1=1.5; #reverberation time(sec)\n", + "n=200; #number of cushioned chairs\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T1; \n", + "T2=0.165*V/(sigma_as+n); #new reverberation time(s)\n", + "\n", + "#Result\n", + "print \"new reverberation time is\",round(T2,2),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.3, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 660.0 OWU\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=5000; #volume(m**3)\n", + "T=1.25; #time(s)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",sigma_as,\"OWU\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.4, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 1045.0 OWU\n", + "new period of reverberation is 1.369 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=9500; #volume(m**3)\n", + "T=1.5; #time(s)\n", + "x=100; #absorption(sabines)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "T=0.165*V/(sigma_as+x); #new period of reverberation(s)\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",sigma_as,\"OWU\"\n", + "print \"new period of reverberation is\",round(T,3),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.5, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 70.714 OWU\n", + "average absorption coefficient is 0.074 sabine/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=20*15*5; #volume(m**3)\n", + "T=3.5; #time(s)\n", + "A=950; #surface area(m**2)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "ac=sigma_as/A; #average absorption coefficient\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",round(sigma_as,3),\"OWU\"\n", + "print \"average absorption coefficient is\",round(ac,3),\"sabine/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.6, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverberation time of hall is 4.023 s\n", + "number of persons to be seated is 5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2265; #volume(m**3)\n", + "sigma_as=92.9; #absorption(m**2)\n", + "a=18.6; #area(m**2)\n", + "\n", + "#Calculation\n", + "T=0.165*V/sigma_as; #reverberation time of hall(s)\n", + "T1=0.165*V/2; \n", + "inc=T1-sigma_as; #increase in absorption(OWU)\n", + "n=inc/a; #number of persons to be seated\n", + "\n", + "#Result\n", + "print \"reverberation time of hall is\",round(T,3),\"s\"\n", + "print \"number of persons to be seated is\",int(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/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb new file mode 100755 index 00000000..ef73934a --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter14_2.ipynb @@ -0,0 +1,281 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#14: Acoustics of buildings and acoustic quieting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.1, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverberation time of hall is 1.264 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=475; #volume(m**3)\n", + "aw=200; #area of wall(m**2)\n", + "ac=100; #area of ceiling(m**2)\n", + "ac_w=0.025; #absorption coefficient of wall\n", + "ac_c=0.02; #absorption coefficient of ceiling\n", + "ac_f=0.55; #absorption coefficient of floor\n", + "\n", + "#Calculation\n", + "sigma_as=(aw*ac_w)+(ac*ac_c)+(ac*ac_f); \n", + "T=0.165*V/sigma_as; #reverberation time of hall(s)\n", + "\n", + "#Result\n", + "print \"reverberation time of hall is\",round(T,3),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.2, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "new reverberation time is 1.31 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12500; #volume(m**3)\n", + "T1=1.5; #reverberation time(sec)\n", + "n=200; #number of cushioned chairs\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T1; \n", + "T2=0.165*V/(sigma_as+n); #new reverberation time(s)\n", + "\n", + "#Result\n", + "print \"new reverberation time is\",round(T2,2),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.3, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 660.0 OWU\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=5000; #volume(m**3)\n", + "T=1.25; #time(s)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",sigma_as,\"OWU\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.4, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 1045.0 OWU\n", + "new period of reverberation is 1.369 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=9500; #volume(m**3)\n", + "T=1.5; #time(s)\n", + "x=100; #absorption(sabines)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "T=0.165*V/(sigma_as+x); #new period of reverberation(s)\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",sigma_as,\"OWU\"\n", + "print \"new period of reverberation is\",round(T,3),\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.5, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in the hall is 70.714 OWU\n", + "average absorption coefficient is 0.074 sabine/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=20*15*5; #volume(m**3)\n", + "T=3.5; #time(s)\n", + "A=950; #surface area(m**2)\n", + "\n", + "#Calculation\n", + "sigma_as=0.165*V/T; #total absorption in the hall(OWU)\n", + "ac=sigma_as/A; #average absorption coefficient\n", + "\n", + "#Result\n", + "print \"total absorption in the hall is\",round(sigma_as,3),\"OWU\"\n", + "print \"average absorption coefficient is\",round(ac,3),\"sabine/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.6, Page number 14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverberation time of hall is 4.023 s\n", + "number of persons to be seated is 5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2265; #volume(m**3)\n", + "sigma_as=92.9; #absorption(m**2)\n", + "a=18.6; #area(m**2)\n", + "\n", + "#Calculation\n", + "T=0.165*V/sigma_as; #reverberation time of hall(s)\n", + "T1=0.165*V/2; \n", + "inc=T1-sigma_as; #increase in absorption(OWU)\n", + "n=inc/a; #number of persons to be seated\n", + "\n", + "#Result\n", + "print \"reverberation time of hall is\",round(T,3),\"s\"\n", + "print \"number of persons to be seated is\",int(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/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb new file mode 100755 index 00000000..3dd56e56 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_1.ipynb @@ -0,0 +1,209 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "net change in energy per mole is -296 kJ/mol\n", + "answer varies due to rounding off errors\n", + "since the net change in energy is negative, the A+B- molecule will be stable\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r=3*10**-10; #seperation(m)\n", + "N=6.022*10**20;\n", + "Ea=502; #ionisation energy of A(kJ/mol)\n", + "Eb=-335; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "E=-e**2*N/(4*math.pi*epsilon0*r); #electrostatic attraction(kJ/mol)\n", + "nE=Ea+Eb+E; #net change in energy per mole(kJ/mol)\n", + "\n", + "#Result\n", + "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"since the net change in energy is negative, the A+B- molecule will be stable\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required is 0.5 eV\n", + "seperation is 2.88 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "IPk=4.1; #IP of K(eV)\n", + "EACl=3.6; #EA of Cl(eV)\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "onebyepsilon0=9*10**9;\n", + "\n", + "#Calculation\n", + "deltaE=IPk-EACl;\n", + "Ec=deltaE; #energy required(eV)\n", + "R=e*onebyepsilon0/deltaE; #seperation(m)\n", + "\n", + "#Result\n", + "print \"energy required is\",Ec,\"eV\"\n", + "print \"seperation is\",round(R*10**9,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 1.5" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bond energy is 4.61 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=236*10**-12; #seperation(m)\n", + "N=6.022*10**20;\n", + "IP=5.14; #ionisation energy of A(kJ/mol)\n", + "EA=3.65; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "Ue=-e**2/(4*math.pi*epsilon0*r0*e); #potential energy(eV)\n", + "BE=-Ue-IP+EA; #bond energy(eV)\n", + "\n", + "#Result\n", + "print \"bond energy is\",round(BE,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 1.18" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is 7.965 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=1.748; #madelung constant\n", + "n=9; #born repulsive exponent\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=0.281*10**-9; #seperation(m)\n", + "IE=5.14; #ionisation energy of A(kJ/mol)\n", + "EA=3.61; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e); #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",round(CE,3),\"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/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb new file mode 100755 index 00000000..3dd56e56 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter1_2.ipynb @@ -0,0 +1,209 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "net change in energy per mole is -296 kJ/mol\n", + "answer varies due to rounding off errors\n", + "since the net change in energy is negative, the A+B- molecule will be stable\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r=3*10**-10; #seperation(m)\n", + "N=6.022*10**20;\n", + "Ea=502; #ionisation energy of A(kJ/mol)\n", + "Eb=-335; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "E=-e**2*N/(4*math.pi*epsilon0*r); #electrostatic attraction(kJ/mol)\n", + "nE=Ea+Eb+E; #net change in energy per mole(kJ/mol)\n", + "\n", + "#Result\n", + "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"since the net change in energy is negative, the A+B- molecule will be stable\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required is 0.5 eV\n", + "seperation is 2.88 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "IPk=4.1; #IP of K(eV)\n", + "EACl=3.6; #EA of Cl(eV)\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "onebyepsilon0=9*10**9;\n", + "\n", + "#Calculation\n", + "deltaE=IPk-EACl;\n", + "Ec=deltaE; #energy required(eV)\n", + "R=e*onebyepsilon0/deltaE; #seperation(m)\n", + "\n", + "#Result\n", + "print \"energy required is\",Ec,\"eV\"\n", + "print \"seperation is\",round(R*10**9,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 1.5" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bond energy is 4.61 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=236*10**-12; #seperation(m)\n", + "N=6.022*10**20;\n", + "IP=5.14; #ionisation energy of A(kJ/mol)\n", + "EA=3.65; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "Ue=-e**2/(4*math.pi*epsilon0*r0*e); #potential energy(eV)\n", + "BE=-Ue-IP+EA; #bond energy(eV)\n", + "\n", + "#Result\n", + "print \"bond energy is\",round(BE,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 1.18" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is 7.965 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=1.748; #madelung constant\n", + "n=9; #born repulsive exponent\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=0.281*10**-9; #seperation(m)\n", + "IE=5.14; #ionisation energy of A(kJ/mol)\n", + "EA=3.61; #electron affinity for B(kJ/mol)\n", + "\n", + "#Calculation\n", + "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e); #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",round(CE,3),\"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/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb new file mode 100755 index 00000000..dc0f7988 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_1.ipynb @@ -0,0 +1,559 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Crystallography and Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.3, Page number 2.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms in (100) is a**(-2) atoms/mm**2\n", + "number of atoms in (110) is 0.707106781186547/a**2 atoms/mm**2\n", + "number of atoms in (111) is 0.577350269189626/a**2 atoms/mm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "a=Symbol('a'); #lattice constant(mm)\n", + "x1=4;\n", + "x2=math.sqrt(2);\n", + "b=a*math.sqrt(2);\n", + "theta=30; #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "na1=x1*1/(x1*a**2); #number of atoms in (100)(per mm**2)\n", + "na2=1/(x2*a**2); #number of atoms in (110)(per mm**2)\n", + "A3=(1/2)*b*b*math.cos(theta); \n", + "t=60/360*3;\n", + "na3=t/A3; #number of atoms in (111)(per mm**2)\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) is\",na1,\"atoms/mm**2\"\n", + "print \"number of atoms in (110) is\",na2,\"atoms/mm**2\"\n", + "print \"number of atoms in (111) is\",na3,\"atoms/mm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.4, Page number 2.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing for (110) is 0.2556 nm\n", + "interplanar spacing for (212) is 0.1205 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=0.1278; #atomic radius(m)\n", + "h1=1;\n", + "k1=1;\n", + "l1=0;\n", + "h2=2;\n", + "k2=1;\n", + "l2=2;\n", + "\n", + "#Calculation\n", + "a=round(4*r/math.sqrt(2),4);\n", + "d110=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)(nm)\n", + "d212=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (212)(nm)\n", + "\n", + "#Result\n", + "print \"interplanar spacing for (110) is\",round(d110,4),\"nm\"\n", + "print \"interplanar spacing for (212) is\",d212,\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.5, Page number 2.11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "seperation between successive lattice planes is 1 : 0.71 : 0.58\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", + "\n", + "#Calculation\n", + "d100=1/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)\n", + "d110=1/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (110)\n", + "d111=1/math.sqrt(h3**2+k3**2+l3**2); #interplanar spacing for (111)\n", + "\n", + "#Result\n", + "print \"seperation between successive lattice planes is\",int(d100),\":\",round(d110,2),\":\",round(d111,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.6, Page number 2.12" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of plane is ( 3.0 6.0 1.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1;\n", + "b=1/2;\n", + "c=3;\n", + "\n", + "#Calculation\n", + "A=1/a;\n", + "B=1/b;\n", + "C=1/c;\n", + "h=A*c;\n", + "k=B*c;\n", + "l=C*c; #miller indices of plane\n", + "\n", + "#Result\n", + "print \"miller indices of plane is (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.7, Page number 2.22" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of interstitial sphere is 0.155 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1; #assume\n", + "\n", + "#Calculation\n", + "a=4/math.sqrt(3);\n", + "R=(a-(2*r))/2; #radius of interstitial sphere(r)\n", + "\n", + "#Result\n", + "print \"radius of interstitial sphere is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.8, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "decrease of volume is 0.5 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1.258; #atomic radius(angstrom)\n", + "r2=1.292; #atomic radius(angstrom)\n", + "\n", + "#Calculation\n", + "a1=4*r1/math.sqrt(3); #spacing(angstrom)\n", + "n1=((1/8)*8)+1; #number of atoms per unit cell\n", + "v1=a1**3/n1; #volume occupied by 1 atom(m**3)\n", + "n2=(1/2*6)+(1/8*8); #number of atoms per unit cell\n", + "a2=2*math.sqrt(2)*r2; #spacing(angstrom)\n", + "v2=a2**3/n2; #volume occupied by 1 atom(m**3)\n", + "dc=(v1-v2)*100/v1; #change in volume(%)\n", + "\n", + "#Result\n", + "print \"decrease of volume is\",round(dc,1),\"%\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.9, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "volume of unit cell is 9.356 *10**-29 m**3\n", + "density of zinc is 6960 kg/m**3\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", + "a=0.27*10**-9; #spacing(m)\n", + "c=0.494*10**-9;\n", + "n=6; #number of atoms\n", + "M=65.37; #atomic weight\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "V=3*math.sqrt(3)*a**2*c/2; #volume of unit cell(m**3)\n", + "rho=n*M/(N*V); #density of zinc(kg/m**3)\n", + "\n", + "#Result\n", + "print \"volume of unit cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n", + "print \"density of zinc is\",int(rho),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.10, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of interstitial sphere is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1; #assume\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(2);\n", + "R=(a/2)-r; #radius of interstitial sphere(r)\n", + "\n", + "#Result\n", + "print \"radius of interstitial sphere is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.11, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms per m**3 is 1.77 *10**29\n", + "density of diamond is 3535.7 kg/m**3\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", + "a=0.356*10**-9; #cube edge(m)\n", + "m=12.01; #atomic weight of carbon\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "n=8/a**3; #number of atoms per m**3\n", + "M=m/N;\n", + "d=M*n; #density of diamond(kg/m**3)\n", + "\n", + "#Result\n", + "print \"number of atoms per m**3 is\",round(n/10**29,2),\"*10**29\"\n", + "print \"density of diamond is\",round(d,1),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.12, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between 2 adjacent atoms is 2.81 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mw=23+35.5; #molecular weight of NaCl(gm/mol)\n", + "N=6.023*10**23; #avagadro number(per mol)\n", + "d=2.18; #mass of unit volume\n", + "\n", + "#Calculation\n", + "M=mw/N; #mass of NaCl molecule(gm)\n", + "n=2*d/M; #number of atoms per unit volume(atoms/cm**3)\n", + "a=(1/n)**(1/3); #distance between 2 adjacent atoms(cm)\n", + "\n", + "#Result\n", + "print \"distance between 2 adjacent atoms is\",round(a*10**8,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.13, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of copper crystal is 8.929 gm/cm**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=63.5; #atomic weight\n", + "N=6.023*10**23; #avagadro number\n", + "r=1.278*10**-8; #radius(m)\n", + "n=4;\n", + "\n", + "#Calculation\n", + "m=M/N; #mass of copper atom(gm)\n", + "a=4*r/math.sqrt(2);\n", + "Mu=n*m; #mass of unit cell\n", + "d=Mu/a**3; #density of copper crystal(gm/cm**3)\n", + "\n", + "#Result\n", + "print \"density of copper crystal is\",round(d,3),\"gm/cm**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.14, Page number 2.27" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free volume per unit cell is 7.6795 *10**-30 m**3\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", + "r=0.1249*10**-9; #radius(m)\n", + "pf=0.68; #packing factor\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); #lattice constant(m)\n", + "v=a**3; #volume of unit cell(m**3)\n", + "Fv=(1-pf)*v; #free volume per unit cell(m**3)\n", + "\n", + "#Result\n", + "print \"free volume per unit cell is\",round(Fv*10**30,4),\"*10**-30 m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb new file mode 100755 index 00000000..dc0f7988 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter2_2.ipynb @@ -0,0 +1,559 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Crystallography and Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.3, Page number 2.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms in (100) is a**(-2) atoms/mm**2\n", + "number of atoms in (110) is 0.707106781186547/a**2 atoms/mm**2\n", + "number of atoms in (111) is 0.577350269189626/a**2 atoms/mm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "a=Symbol('a'); #lattice constant(mm)\n", + "x1=4;\n", + "x2=math.sqrt(2);\n", + "b=a*math.sqrt(2);\n", + "theta=30; #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "na1=x1*1/(x1*a**2); #number of atoms in (100)(per mm**2)\n", + "na2=1/(x2*a**2); #number of atoms in (110)(per mm**2)\n", + "A3=(1/2)*b*b*math.cos(theta); \n", + "t=60/360*3;\n", + "na3=t/A3; #number of atoms in (111)(per mm**2)\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) is\",na1,\"atoms/mm**2\"\n", + "print \"number of atoms in (110) is\",na2,\"atoms/mm**2\"\n", + "print \"number of atoms in (111) is\",na3,\"atoms/mm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.4, Page number 2.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing for (110) is 0.2556 nm\n", + "interplanar spacing for (212) is 0.1205 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=0.1278; #atomic radius(m)\n", + "h1=1;\n", + "k1=1;\n", + "l1=0;\n", + "h2=2;\n", + "k2=1;\n", + "l2=2;\n", + "\n", + "#Calculation\n", + "a=round(4*r/math.sqrt(2),4);\n", + "d110=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)(nm)\n", + "d212=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (212)(nm)\n", + "\n", + "#Result\n", + "print \"interplanar spacing for (110) is\",round(d110,4),\"nm\"\n", + "print \"interplanar spacing for (212) is\",d212,\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.5, Page number 2.11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "seperation between successive lattice planes is 1 : 0.71 : 0.58\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", + "\n", + "#Calculation\n", + "d100=1/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (110)\n", + "d110=1/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (110)\n", + "d111=1/math.sqrt(h3**2+k3**2+l3**2); #interplanar spacing for (111)\n", + "\n", + "#Result\n", + "print \"seperation between successive lattice planes is\",int(d100),\":\",round(d110,2),\":\",round(d111,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.6, Page number 2.12" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of plane is ( 3.0 6.0 1.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1;\n", + "b=1/2;\n", + "c=3;\n", + "\n", + "#Calculation\n", + "A=1/a;\n", + "B=1/b;\n", + "C=1/c;\n", + "h=A*c;\n", + "k=B*c;\n", + "l=C*c; #miller indices of plane\n", + "\n", + "#Result\n", + "print \"miller indices of plane is (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.7, Page number 2.22" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of interstitial sphere is 0.155 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1; #assume\n", + "\n", + "#Calculation\n", + "a=4/math.sqrt(3);\n", + "R=(a-(2*r))/2; #radius of interstitial sphere(r)\n", + "\n", + "#Result\n", + "print \"radius of interstitial sphere is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.8, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "decrease of volume is 0.5 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1.258; #atomic radius(angstrom)\n", + "r2=1.292; #atomic radius(angstrom)\n", + "\n", + "#Calculation\n", + "a1=4*r1/math.sqrt(3); #spacing(angstrom)\n", + "n1=((1/8)*8)+1; #number of atoms per unit cell\n", + "v1=a1**3/n1; #volume occupied by 1 atom(m**3)\n", + "n2=(1/2*6)+(1/8*8); #number of atoms per unit cell\n", + "a2=2*math.sqrt(2)*r2; #spacing(angstrom)\n", + "v2=a2**3/n2; #volume occupied by 1 atom(m**3)\n", + "dc=(v1-v2)*100/v1; #change in volume(%)\n", + "\n", + "#Result\n", + "print \"decrease of volume is\",round(dc,1),\"%\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.9, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "volume of unit cell is 9.356 *10**-29 m**3\n", + "density of zinc is 6960 kg/m**3\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", + "a=0.27*10**-9; #spacing(m)\n", + "c=0.494*10**-9;\n", + "n=6; #number of atoms\n", + "M=65.37; #atomic weight\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "V=3*math.sqrt(3)*a**2*c/2; #volume of unit cell(m**3)\n", + "rho=n*M/(N*V); #density of zinc(kg/m**3)\n", + "\n", + "#Result\n", + "print \"volume of unit cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n", + "print \"density of zinc is\",int(rho),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.10, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of interstitial sphere is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1; #assume\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(2);\n", + "R=(a/2)-r; #radius of interstitial sphere(r)\n", + "\n", + "#Result\n", + "print \"radius of interstitial sphere is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.11, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms per m**3 is 1.77 *10**29\n", + "density of diamond is 3535.7 kg/m**3\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", + "a=0.356*10**-9; #cube edge(m)\n", + "m=12.01; #atomic weight of carbon\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "n=8/a**3; #number of atoms per m**3\n", + "M=m/N;\n", + "d=M*n; #density of diamond(kg/m**3)\n", + "\n", + "#Result\n", + "print \"number of atoms per m**3 is\",round(n/10**29,2),\"*10**29\"\n", + "print \"density of diamond is\",round(d,1),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.12, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between 2 adjacent atoms is 2.81 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mw=23+35.5; #molecular weight of NaCl(gm/mol)\n", + "N=6.023*10**23; #avagadro number(per mol)\n", + "d=2.18; #mass of unit volume\n", + "\n", + "#Calculation\n", + "M=mw/N; #mass of NaCl molecule(gm)\n", + "n=2*d/M; #number of atoms per unit volume(atoms/cm**3)\n", + "a=(1/n)**(1/3); #distance between 2 adjacent atoms(cm)\n", + "\n", + "#Result\n", + "print \"distance between 2 adjacent atoms is\",round(a*10**8,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.13, Page number 2.26" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of copper crystal is 8.929 gm/cm**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=63.5; #atomic weight\n", + "N=6.023*10**23; #avagadro number\n", + "r=1.278*10**-8; #radius(m)\n", + "n=4;\n", + "\n", + "#Calculation\n", + "m=M/N; #mass of copper atom(gm)\n", + "a=4*r/math.sqrt(2);\n", + "Mu=n*m; #mass of unit cell\n", + "d=Mu/a**3; #density of copper crystal(gm/cm**3)\n", + "\n", + "#Result\n", + "print \"density of copper crystal is\",round(d,3),\"gm/cm**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.14, Page number 2.27" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free volume per unit cell is 7.6795 *10**-30 m**3\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", + "r=0.1249*10**-9; #radius(m)\n", + "pf=0.68; #packing factor\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); #lattice constant(m)\n", + "v=a**3; #volume of unit cell(m**3)\n", + "Fv=(1-pf)*v; #free volume per unit cell(m**3)\n", + "\n", + "#Result\n", + "print \"free volume per unit cell is\",round(Fv*10**30,4),\"*10**-30 m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb new file mode 100755 index 00000000..5c886a5b --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_1.ipynb @@ -0,0 +1,249 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: X-ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.1, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of X-rays is 0.08496 nm\n", + "answer varies due to rounding off errors\n", + "when theta=90, maximum order of diffraction possible is 7\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.313; #lattice spacing(m)\n", + "theta=7+(48/60); #angle(degrees)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(nm)\n", + "#when theta=90\n", + "n=2*d/lamda; #maximum order of diffraction possible\n", + "\n", + "#Result\n", + "print \"wavelength of X-rays is\",round(lamda,5),\"nm\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"when theta=90, maximum order of diffraction possible is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.2, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interatomic spacing is 2.67 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.5418; #wavelength(angstrom)\n", + "theta=30; #angle(degrees)\n", + "n=1; #first order\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); \n", + "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interatomic spacing is\",round(a,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "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", + "d100=0.28; #spacing(nm)\n", + "lamda=0.071; #wavelength of X rays(nm)\n", + "n=2; #second order\n", + "\n", + "#Calculation\n", + "d110=round(d100/math.sqrt(2),3); #spacing(nm)\n", + "x=n*lamda/(2*d110);\n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*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.4, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between planes is 0.27 nm\n" + ] + } + ], + "source": [ + "#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;\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n", + "\n", + "#Result\n", + "print \"distance between planes is\",round(d,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.5, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 32.0 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.19; #lattice constant(nm)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "lamda=0.058; #wavelength of X rays(nm)\n", + "n=2; #second order\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n", + "x=n*lamda/(2*d);\n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle is\",round(theta),\"degrees\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb new file mode 100755 index 00000000..5c886a5b --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter3_2.ipynb @@ -0,0 +1,249 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: X-ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.1, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of X-rays is 0.08496 nm\n", + "answer varies due to rounding off errors\n", + "when theta=90, maximum order of diffraction possible is 7\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.313; #lattice spacing(m)\n", + "theta=7+(48/60); #angle(degrees)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(nm)\n", + "#when theta=90\n", + "n=2*d/lamda; #maximum order of diffraction possible\n", + "\n", + "#Result\n", + "print \"wavelength of X-rays is\",round(lamda,5),\"nm\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"when theta=90, maximum order of diffraction possible is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.2, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interatomic spacing is 2.67 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.5418; #wavelength(angstrom)\n", + "theta=30; #angle(degrees)\n", + "n=1; #first order\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); \n", + "a=d*math.sqrt(h**2+k**2+l**2); #interatomic spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interatomic spacing is\",round(a,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "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", + "d100=0.28; #spacing(nm)\n", + "lamda=0.071; #wavelength of X rays(nm)\n", + "n=2; #second order\n", + "\n", + "#Calculation\n", + "d110=round(d100/math.sqrt(2),3); #spacing(nm)\n", + "x=n*lamda/(2*d110);\n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*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.4, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between planes is 0.27 nm\n" + ] + } + ], + "source": [ + "#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;\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n", + "\n", + "#Result\n", + "print \"distance between planes is\",round(d,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.5, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 32.0 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.19; #lattice constant(nm)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "lamda=0.058; #wavelength of X rays(nm)\n", + "n=2; #second order\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #distance between planes(nm)\n", + "x=n*lamda/(2*d);\n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "\n", + "#Result\n", + "print \"glancing angle is\",round(theta),\"degrees\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb new file mode 100755 index 00000000..2b7c926e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_1.ipynb @@ -0,0 +1,203 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#4: Defects in Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.1, Page number 4.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of vacancies is 1.082 *10**5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ev=1;\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "\n", + "#Calculation\n", + "r=Ev/(2.303*1000*k/e); \n", + "n=10**r; #ratio of n1000/n500\n", + "\n", + "#Result\n", + "print \"ratio of vacancies is\",round(n/10**5,3),\"*10**5\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.2, Page number 4.5" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of vacancies per atom at 350K is 0.5486 *10**-17\n", + "number of vacancies per atom at 500K is 0.827 *10**-12\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ev=1.2;\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "T1=350; #temperature(K)\n", + "T2=500; #temperature(K)\n", + "\n", + "#Calculation\n", + "x1=Ev/(2.303*k*T1/e);\n", + "n1=1/(10**x1); #number of vacancies per atom at 350K\n", + "x2=Ev/(2.303*k*T2/e);\n", + "n2=1/(10**x2); #number of vacancies per atom at 500K\n", + "\n", + "#Result\n", + "print \"number of vacancies per atom at 350K is\",round(n1*10**17,4),\"*10**-17\"\n", + "print \"number of vacancies per atom at 500K is\",round(n2*10**12,3),\"*10**-12\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.3, Page number 4.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy required is 1.971 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.82*10**-10; #distance(m)\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "T=273+25; #temperature(K)\n", + "sd=5*10**11; #schotky defects(per m**3)\n", + "\n", + "#Calculation\n", + "V=(2*d)**3; #volume of unit cell(m**3)\n", + "N=4/V; #density of ion pairs\n", + "x=round(math.log10(N/sd),2);\n", + "Es=2*(k/e)*T*2.303*x; #average energy required(eV)\n", + "\n", + "#Result\n", + "print \"average energy required is\",round(Es,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.4, Page number 4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of Frenkel defects is 1.125 *10**-6\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=273+25; #temperature(K)\n", + "T2=273+350; #temperature(K)\n", + "Ef=1.35; #energy(eV)\n", + "k=8.625*10**-5;\n", + "\n", + "#Calculation\n", + "x=(Ef/k)*((1/(2*T1))-(1/(2*T2)))/2.303;\n", + "r=1/(10**round(x,3)); #ratio of Frenkel defects\n", + "\n", + "#Result\n", + "print \"ratio of Frenkel defects is\",round(r*10**6,3),\"*10**-6\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb new file mode 100755 index 00000000..2b7c926e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter4_2.ipynb @@ -0,0 +1,203 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#4: Defects in Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.1, Page number 4.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of vacancies is 1.082 *10**5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ev=1;\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "\n", + "#Calculation\n", + "r=Ev/(2.303*1000*k/e); \n", + "n=10**r; #ratio of n1000/n500\n", + "\n", + "#Result\n", + "print \"ratio of vacancies is\",round(n/10**5,3),\"*10**5\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.2, Page number 4.5" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of vacancies per atom at 350K is 0.5486 *10**-17\n", + "number of vacancies per atom at 500K is 0.827 *10**-12\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ev=1.2;\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "T1=350; #temperature(K)\n", + "T2=500; #temperature(K)\n", + "\n", + "#Calculation\n", + "x1=Ev/(2.303*k*T1/e);\n", + "n1=1/(10**x1); #number of vacancies per atom at 350K\n", + "x2=Ev/(2.303*k*T2/e);\n", + "n2=1/(10**x2); #number of vacancies per atom at 500K\n", + "\n", + "#Result\n", + "print \"number of vacancies per atom at 350K is\",round(n1*10**17,4),\"*10**-17\"\n", + "print \"number of vacancies per atom at 500K is\",round(n2*10**12,3),\"*10**-12\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.3, Page number 4.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average energy required is 1.971 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.82*10**-10; #distance(m)\n", + "k=1.38*10**-23; #boltzmann constant(J/K)\n", + "e=1.6*10**-19; #charge(eV)\n", + "T=273+25; #temperature(K)\n", + "sd=5*10**11; #schotky defects(per m**3)\n", + "\n", + "#Calculation\n", + "V=(2*d)**3; #volume of unit cell(m**3)\n", + "N=4/V; #density of ion pairs\n", + "x=round(math.log10(N/sd),2);\n", + "Es=2*(k/e)*T*2.303*x; #average energy required(eV)\n", + "\n", + "#Result\n", + "print \"average energy required is\",round(Es,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.4, Page number 4.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of Frenkel defects is 1.125 *10**-6\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=273+25; #temperature(K)\n", + "T2=273+350; #temperature(K)\n", + "Ef=1.35; #energy(eV)\n", + "k=8.625*10**-5;\n", + "\n", + "#Calculation\n", + "x=(Ef/k)*((1/(2*T1))-(1/(2*T2)))/2.303;\n", + "r=1/(10**round(x,3)); #ratio of Frenkel defects\n", + "\n", + "#Result\n", + "print \"ratio of Frenkel defects is\",round(r*10**6,3),\"*10**-6\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb new file mode 100755 index 00000000..f1b18946 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_1.ipynb @@ -0,0 +1,238 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#5: Elements of statistical mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.1, Page number 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average thermal energy is 0.039 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "T=300; #temperature(K)\n", + "e=1.6*10**-19; #charge(c)\n", + "\n", + "#Calculation\n", + "E=3*k*T/(2*e); #average thermal energy(eV)\n", + "\n", + "#Result\n", + "print \"average thermal energy is\",round(E,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.3, Page number 5.18" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi function is 0.269\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "kT=1; #assume\n", + "E_Ef=kT;\n", + "\n", + "#Calculation\n", + "FE=1/(1+math.exp(1)); #fermi function\n", + "\n", + "#Result\n", + "print \"fermi function is\",round(FE,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.4, Page number 5.18" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " temperature is 290.2 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "FE=10/100; #fermi function\n", + "EF=5.5; #energy function(eV)\n", + "e=1.6*10**-19; #charge(c)\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "\n", + "#Calculation\n", + "E=EF+(EF/100); #energy(eV)\n", + "x=math.log((1/FE)-1);\n", + "T=(E-EF)*e/(k*x); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.5, Page number 5.19" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi velocity is 0.86 *10**6 m s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "T=24600; #temperature(K)\n", + "m=9.108*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "vF=math.sqrt(2*k*T/m); #fermi velocity(m s-1)\n", + "\n", + "#Result\n", + "print \"fermi velocity is\",round(vF/10**6,2),\"*10**6 m s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.6, Page number 5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of states is 1.1877 *10**26\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration\n", + "EF=3.0; #fermi energy(eV)\n", + "e=1.6*10**-19; #charge(c)\n", + "m=9.14*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "E1=EF*e; #energy(J)\n", + "E2=(EF+0.01)*e; #energy(J)\n", + "def zintg(E):\n", + "\treturn (4*math.pi*(2*m)**(3/2)*math.sqrt(E))/h**3;\n", + "\n", + "n=quad(zintg,E1,E2)[0]; #number of states\n", + "\n", + "#Result\n", + "print \"number of states is\",round(n/10**26,4),\"*10**26\"\n", + "print \"answer given in the 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/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb new file mode 100755 index 00000000..f1b18946 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter5_2.ipynb @@ -0,0 +1,238 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#5: Elements of statistical mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.1, Page number 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average thermal energy is 0.039 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "T=300; #temperature(K)\n", + "e=1.6*10**-19; #charge(c)\n", + "\n", + "#Calculation\n", + "E=3*k*T/(2*e); #average thermal energy(eV)\n", + "\n", + "#Result\n", + "print \"average thermal energy is\",round(E,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.3, Page number 5.18" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi function is 0.269\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "kT=1; #assume\n", + "E_Ef=kT;\n", + "\n", + "#Calculation\n", + "FE=1/(1+math.exp(1)); #fermi function\n", + "\n", + "#Result\n", + "print \"fermi function is\",round(FE,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.4, Page number 5.18" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " temperature is 290.2 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "FE=10/100; #fermi function\n", + "EF=5.5; #energy function(eV)\n", + "e=1.6*10**-19; #charge(c)\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "\n", + "#Calculation\n", + "E=EF+(EF/100); #energy(eV)\n", + "x=math.log((1/FE)-1);\n", + "T=(E-EF)*e/(k*x); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.5, Page number 5.19" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi velocity is 0.86 *10**6 m s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant(J)\n", + "T=24600; #temperature(K)\n", + "m=9.108*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "vF=math.sqrt(2*k*T/m); #fermi velocity(m s-1)\n", + "\n", + "#Result\n", + "print \"fermi velocity is\",round(vF/10**6,2),\"*10**6 m s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.6, Page number 5.21" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of states is 1.1877 *10**26\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration\n", + "EF=3.0; #fermi energy(eV)\n", + "e=1.6*10**-19; #charge(c)\n", + "m=9.14*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "E1=EF*e; #energy(J)\n", + "E2=(EF+0.01)*e; #energy(J)\n", + "def zintg(E):\n", + "\treturn (4*math.pi*(2*m)**(3/2)*math.sqrt(E))/h**3;\n", + "\n", + "n=quad(zintg,E1,E2)[0]; #number of states\n", + "\n", + "#Result\n", + "print \"number of states is\",round(n/10**26,4),\"*10**26\"\n", + "print \"answer given in the 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/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb new file mode 100755 index 00000000..9746dc5d --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_1.ipynb @@ -0,0 +1,603 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Principles of quantum mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 1.323 *10**-14 m\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/s)\n", + "m=1.67*10**-27; #mass of proton(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "lamda=h*10/(m*c); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**14,3),\"*10**-14 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.613 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=400; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",lamda,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.181 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=1.674*10**-27; #mass of proton(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "E=0.025*1.6*10**-19; #energy(J)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**9,3),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.3065 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=1600; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",lamda,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 5.27 *10**-24 kg m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "deltax=0.2*10**-10; #distance(m)\n", + "h=6.626*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "deltap=h/(2*math.pi*deltax); #uncertainity in momentum(kg m/s)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",round(deltap*10**24,2),\"*10**-24 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.21" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 112.9 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=n2=n3=1;\n", + "h=6.62*10**-34; #planck's constant\n", + "m=9.1*10**-31; #mass(kg)\n", + "L=0.1*10**-9; #side(m) \n", + "\n", + "#Calculation\n", + "E1=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.22" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 1.208 *10**4 eV\n", + "value of E112, E121, E211 is 2.4168 *10**4 eV\n", + "value of E122, E212, E221 is 3.625 *10**4 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=n2=n3=1;\n", + "h=6.62*10**-34; #planck's constant\n", + "m=8.5*10**-31; #mass(kg)\n", + "L=10**-11; #side(m) \n", + "\n", + "#Calculation\n", + "E111=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n", + "E112=6*h**2/(8*m*1.6*10**-19*L**2); #value of E112(eV)\n", + "E121=E112; #value of E121(eV)\n", + "E211=E112; #value of E211(eV)\n", + "E122=9*h**2/(8*m*1.6*10**-19*L**2); #value of E122(eV)\n", + "E212=E122; #value of E212(eV)\n", + "E221=E122; #value of E221(eV)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E111/10**4,3),\"*10**4 eV\"\n", + "print \"value of E112, E121, E211 is\",round(E121/10**4,4),\"*10**4 eV\"\n", + "print \"value of E122, E212, E221 is\",round(E122/10**4,3),\"*10**4 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.8, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.0275 nm\n" + ] + } + ], + "source": [ + "#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=2000*1.6*10**-19; #energy(J)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**9,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.9, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 0.377 *10**-18 joule\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", + "m=9.1*10**-31; #mass of electron(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "n=1;\n", + "L=4*10**-10; #side(m) \n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n", + "\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1*10**18,3),\"*10**-18 joule\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.10, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 0.6031 *10**-17 joule\n", + "energy of electron in 1st state is 2.412 *10**-17 joule\n", + "energy of electron in 2nd state is 5.428 *10**-17 joule\n" + ] + } + ], + "source": [ + "#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", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "L=1*10**-10; #side(m) \n", + "\n", + "#Calculation\n", + "E1=n1**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n", + "E2=n2**2*h**2/(8*m*L**2); #energy of electron in 1st state(joule)\n", + "E3=n3**2*h**2/(8*m*L**2); #energy of electron in 2nd state(joule)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1*10**17,4),\"*10**-17 joule\"\n", + "print \"energy of electron in 1st state is\",round(E2*10**17,3),\"*10**-17 joule\"\n", + "print \"energy of electron in 2nd state is\",round(E3*10**17,3),\"*10**-17 joule\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.11, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 4386 km/s\n", + "kinetic energy is 54.71 eV\n" + ] + } + ], + "source": [ + "#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", + "lamda=1.66*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "v=h/(m*lamda); #velocity(m/s)\n", + "KE=(1/2)*m*v**2; #kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"velocity is\",int(v/10**3),\"km/s\"\n", + "print \"kinetic energy is\",round(KE/(1.6*10**-19),2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.12, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=15000; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.13, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing of crystal is 0.3816 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=344; #voltage(V)\n", + "n=1;\n", + "theta=60*math.pi/180; #angle(radian)\n", + "\n", + "#Calculation\n", + "lamda=round(12.26/math.sqrt(V),3); #de broglie wavelength(angstrom)\n", + "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n", + "\n", + "#Result\n", + "print \"spacing of crystal is\",round(d,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.14, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 9.787 *10**-6 m\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", + "E=1.5*9.1*10**-31; #energy(joule)\n", + "m=1.676*10**-27; #mass(kg)\n", + "h=6.62*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "v=math.sqrt(2*E/m); \n", + "lamda=h/(m*v); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**6,3),\"*10**-6 m\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb new file mode 100755 index 00000000..9746dc5d --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter6_2.ipynb @@ -0,0 +1,603 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Principles of quantum mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 1.323 *10**-14 m\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/s)\n", + "m=1.67*10**-27; #mass of proton(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "lamda=h*10/(m*c); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**14,3),\"*10**-14 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.613 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=400; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",lamda,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.181 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=1.674*10**-27; #mass of proton(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "E=0.025*1.6*10**-19; #energy(J)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**9,3),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.3065 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=1600; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",lamda,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 5.27 *10**-24 kg m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "deltax=0.2*10**-10; #distance(m)\n", + "h=6.626*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "deltap=h/(2*math.pi*deltax); #uncertainity in momentum(kg m/s)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",round(deltap*10**24,2),\"*10**-24 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.21" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 112.9 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=n2=n3=1;\n", + "h=6.62*10**-34; #planck's constant\n", + "m=9.1*10**-31; #mass(kg)\n", + "L=0.1*10**-9; #side(m) \n", + "\n", + "#Calculation\n", + "E1=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.22" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 1.208 *10**4 eV\n", + "value of E112, E121, E211 is 2.4168 *10**4 eV\n", + "value of E122, E212, E221 is 3.625 *10**4 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=n2=n3=1;\n", + "h=6.62*10**-34; #planck's constant\n", + "m=8.5*10**-31; #mass(kg)\n", + "L=10**-11; #side(m) \n", + "\n", + "#Calculation\n", + "E111=h**2*(n1**2+n2**2+n3**2)/(8*m*1.6*10**-19*L**2); #lowest energy of electron(eV)\n", + "E112=6*h**2/(8*m*1.6*10**-19*L**2); #value of E112(eV)\n", + "E121=E112; #value of E121(eV)\n", + "E211=E112; #value of E211(eV)\n", + "E122=9*h**2/(8*m*1.6*10**-19*L**2); #value of E122(eV)\n", + "E212=E122; #value of E212(eV)\n", + "E221=E122; #value of E221(eV)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E111/10**4,3),\"*10**4 eV\"\n", + "print \"value of E112, E121, E211 is\",round(E121/10**4,4),\"*10**4 eV\"\n", + "print \"value of E122, E212, E221 is\",round(E122/10**4,3),\"*10**4 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.8, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.0275 nm\n" + ] + } + ], + "source": [ + "#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=2000*1.6*10**-19; #energy(J)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**9,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.9, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 0.377 *10**-18 joule\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", + "m=9.1*10**-31; #mass of electron(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "n=1;\n", + "L=4*10**-10; #side(m) \n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n", + "\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1*10**18,3),\"*10**-18 joule\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.10, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of electron is 0.6031 *10**-17 joule\n", + "energy of electron in 1st state is 2.412 *10**-17 joule\n", + "energy of electron in 2nd state is 5.428 *10**-17 joule\n" + ] + } + ], + "source": [ + "#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", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "L=1*10**-10; #side(m) \n", + "\n", + "#Calculation\n", + "E1=n1**2*h**2/(8*m*L**2); #lowest energy of electron(joule)\n", + "E2=n2**2*h**2/(8*m*L**2); #energy of electron in 1st state(joule)\n", + "E3=n3**2*h**2/(8*m*L**2); #energy of electron in 2nd state(joule)\n", + "\n", + "#Result\n", + "print \"lowest energy of electron is\",round(E1*10**17,4),\"*10**-17 joule\"\n", + "print \"energy of electron in 1st state is\",round(E2*10**17,3),\"*10**-17 joule\"\n", + "print \"energy of electron in 2nd state is\",round(E3*10**17,3),\"*10**-17 joule\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.11, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 4386 km/s\n", + "kinetic energy is 54.71 eV\n" + ] + } + ], + "source": [ + "#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", + "lamda=1.66*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "v=h/(m*lamda); #velocity(m/s)\n", + "KE=(1/2)*m*v**2; #kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"velocity is\",int(v/10**3),\"km/s\"\n", + "print \"kinetic energy is\",round(KE/(1.6*10**-19),2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.12, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=15000; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #de broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.13, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing of crystal is 0.3816 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=344; #voltage(V)\n", + "n=1;\n", + "theta=60*math.pi/180; #angle(radian)\n", + "\n", + "#Calculation\n", + "lamda=round(12.26/math.sqrt(V),3); #de broglie wavelength(angstrom)\n", + "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n", + "\n", + "#Result\n", + "print \"spacing of crystal is\",round(d,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.14, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 9.787 *10**-6 m\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", + "E=1.5*9.1*10**-31; #energy(joule)\n", + "m=1.676*10**-27; #mass(kg)\n", + "h=6.62*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "v=math.sqrt(2*E/m); \n", + "lamda=h/(m*v); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**6,3),\"*10**-6 m\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb new file mode 100755 index 00000000..8fddb7ff --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_1.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#7: Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.1, Page number 7.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of electrons is 5.86 *10**28\n", + "mobility of electrons is 0.725 *10**-2 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho_s=10.5*10**3; #density(kg/m**3)\n", + "NA=6.02*10**26; #avagadro number(per k mol)\n", + "MA=107.9; #atomic mass\n", + "sigma=6.8*10**7; #conductance(ohm-1 m-1)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=rho_s*NA/MA; #density of electrons\n", + "mew=sigma/(n*e); #mobility of electrons(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of electrons is\",round(n/10**28,2),\"*10**28\"\n", + "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m**2 V-1 s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.2, Page number 7.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mobility of electrons is 0.427 *10**-2 m V-1 s-1\n", + "average time of collision is 2.43 *10**-14 s\n" + ] + } + ], + "source": [ + "#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", + "rho=1.73*10**-8; #resistivity of copper(ohm m)\n", + "NA=6.02*10**26; #avagadro number(per k mol)\n", + "Aw=63.5; #atomic weight\n", + "m=9.1*10**-31; #mass(kg)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=d*NA/Aw; #density of electrons\n", + "mew=1/(rho*n*e); #mobility of electrons(m**2/Vs)\n", + "t=m/(n*e**2*rho); #average time of collision(s)\n", + "\n", + "#Result\n", + "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m V-1 s-1\"\n", + "print \"average time of collision is\",round(t*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.3, Page number 7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time of conduction electrons is 3.97 *10**-14 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1.54*10**-8; #resistance(ohm m)\n", + "n=5.8*10**28; #number of electrons(per m**3)\n", + "m=9.108*10**-31; #mass(kg)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "t=m/(n*e**2*P); #relaxation time of conduction electrons(s) \n", + "\n", + "#Result\n", + "print \"relaxation time of conduction electrons is\",round(t*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.4, Page number 7.8" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free electron concentration is 1.8088 *10**29 electrons/m**2\n", + "mobility is 1.278 *10**-3 m s-1 V-1\n", + "drift velocity of electrons is 0.23 *10**-3 m s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=0.06; #resistance(ohm)\n", + "I=15; #current(A)\n", + "D=5; #length(m)\n", + "MA=26.98; #atomic mass\n", + "rho_s=2.7*10**3; #density(kg/m**3)\n", + "NA=6.025*10**26; #avagadro number(per k mol)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=3*rho_s*NA/MA; #free electron concentration(electrons/m**2)\n", + "mew=1/(n*e*rho_s*10**-11); #mobility(m s-1 V-1)\n", + "E=I*R/D; #electric field(V/m)\n", + "vd=mew*E; #drift velocity of electrons(m/s)\n", + "\n", + "#Result\n", + "print \"free electron concentration is\",round(n/10**29,4),\"*10**29 electrons/m**2\"\n", + "print \"mobility is\",round(mew*10**3,3),\"*10**-3 m s-1 V-1\"\n", + "print \"drift velocity of electrons is\",round(vd*10**3,2),\"*10**-3 m s-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/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb new file mode 100755 index 00000000..8fddb7ff --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter7_2.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#7: Band Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.1, Page number 7.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of electrons is 5.86 *10**28\n", + "mobility of electrons is 0.725 *10**-2 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho_s=10.5*10**3; #density(kg/m**3)\n", + "NA=6.02*10**26; #avagadro number(per k mol)\n", + "MA=107.9; #atomic mass\n", + "sigma=6.8*10**7; #conductance(ohm-1 m-1)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=rho_s*NA/MA; #density of electrons\n", + "mew=sigma/(n*e); #mobility of electrons(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of electrons is\",round(n/10**28,2),\"*10**28\"\n", + "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m**2 V-1 s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.2, Page number 7.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mobility of electrons is 0.427 *10**-2 m V-1 s-1\n", + "average time of collision is 2.43 *10**-14 s\n" + ] + } + ], + "source": [ + "#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", + "rho=1.73*10**-8; #resistivity of copper(ohm m)\n", + "NA=6.02*10**26; #avagadro number(per k mol)\n", + "Aw=63.5; #atomic weight\n", + "m=9.1*10**-31; #mass(kg)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=d*NA/Aw; #density of electrons\n", + "mew=1/(rho*n*e); #mobility of electrons(m**2/Vs)\n", + "t=m/(n*e**2*rho); #average time of collision(s)\n", + "\n", + "#Result\n", + "print \"mobility of electrons is\",round(mew*10**2,3),\"*10**-2 m V-1 s-1\"\n", + "print \"average time of collision is\",round(t*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.3, Page number 7.7" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time of conduction electrons is 3.97 *10**-14 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1.54*10**-8; #resistance(ohm m)\n", + "n=5.8*10**28; #number of electrons(per m**3)\n", + "m=9.108*10**-31; #mass(kg)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "t=m/(n*e**2*P); #relaxation time of conduction electrons(s) \n", + "\n", + "#Result\n", + "print \"relaxation time of conduction electrons is\",round(t*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.4, Page number 7.8" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free electron concentration is 1.8088 *10**29 electrons/m**2\n", + "mobility is 1.278 *10**-3 m s-1 V-1\n", + "drift velocity of electrons is 0.23 *10**-3 m s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=0.06; #resistance(ohm)\n", + "I=15; #current(A)\n", + "D=5; #length(m)\n", + "MA=26.98; #atomic mass\n", + "rho_s=2.7*10**3; #density(kg/m**3)\n", + "NA=6.025*10**26; #avagadro number(per k mol)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=3*rho_s*NA/MA; #free electron concentration(electrons/m**2)\n", + "mew=1/(n*e*rho_s*10**-11); #mobility(m s-1 V-1)\n", + "E=I*R/D; #electric field(V/m)\n", + "vd=mew*E; #drift velocity of electrons(m/s)\n", + "\n", + "#Result\n", + "print \"free electron concentration is\",round(n/10**29,4),\"*10**29 electrons/m**2\"\n", + "print \"mobility is\",round(mew*10**3,3),\"*10**-3 m s-1 V-1\"\n", + "print \"drift velocity of electrons is\",round(vd*10**3,2),\"*10**-3 m s-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/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb new file mode 100755 index 00000000..e6d0049e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_1.ipynb @@ -0,0 +1,873 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#8: Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.1, Page number 8.11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.471 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.37*10**19; #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); \n", + "rho=1/sigma_i; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rho,3),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.2, Page number 8.11" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "position of fermi level is 0.576 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=1.12; #band gap(eV)\n", + "T=300; #temperature(K)\n", + "m0=1; #assume\n", + "me=0.12*m0;\n", + "mh=0.28*m0;\n", + "k=1.38*10**-23; #boltzmann constant\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "EF=(Eg/2)+(3*k*T*math.log(mh/me)/(4*e)); #position of fermi level(eV)\n", + "\n", + "#Result\n", + "print \"position of fermi level is\",round(EF,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.3, Page number 8.12" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of intrinsic charge carriers is 33.48 *10**18 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=0.7; #energy(eV)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "x=(2*math.pi*m*k/h**2)**(3/2);\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=2*x*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "\n", + "#Result\n", + "print \"concentration of intrinsic charge carriers is\",round(ni/10**18,2),\"*10**18 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.4, Page number 8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.449 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.4*10**19; #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); \n", + "rhoi=1/sigma_i; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rhoi,3),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.5, Page number 8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance is 4.31 *10**3 ohm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.5*10**19; #carrier density(per m**3)\n", + "mew_e=0.39; #electron mobility(m**2/Vs)\n", + "mew_p=0.19; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "l=1*10**-2; #length(m)\n", + "A=10**-3*10**-3; #area(m**2)\n", + "\n", + "#Calculation\n", + "R=l/(ni*e*A*(mew_p+mew_e)); #resistance(ohm)\n", + "\n", + "#Result\n", + "print \"resistance is\",round(R/10**3,2),\"*10**3 ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.6, Page number 8.14" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 1.578 *10**-3 ohm-1 m-1\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", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=1.1; #energy(eV)\n", + "e=1.6*10**-19; \n", + "mew_e=0.48; #electron mobility(m**2/Vs)\n", + "mew_p=0.013; #hole mobility(m**2/Vs)\n", + "\n", + "#Calculation\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "\n", + "\n", + "#Result\n", + "print \"conductivity is\",round(sigma_i*10**3,3),\"*10**-3 ohm-1 m-1\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.7, Page number 8.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of intrinsic charge carriers is 3.35 *10**19 per m**3\n", + "conductivity is 3.589 ohm-1 m-1\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", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=0.7; #energy(eV)\n", + "e=1.6*10**-19; \n", + "mew_e=0.48; #electron mobility(m**2/Vs)\n", + "mew_p=0.013; #hole mobility(m**2/Vs)\n", + "\n", + "#Calculation\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"concentration of intrinsic charge carriers is\",round(ni/10**19,2),\"*10**19 per m**3\"\n", + "print \"conductivity is\",round(sigma_i,3),\"ohm-1 m-1\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.8, Page number 8.15" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "forbidden energy gap is 0.793 eV\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", + "e=1.6*10**-19; \n", + "mew_e=0.36; #electron mobility(m**2/Vs)\n", + "mew_h=0.17; #hole mobility(m**2/Vs)\n", + "rho=2.12; #resistivity(ohm m)\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "\n", + "#Calculation\n", + "sigma=1/rho;\n", + "ni=sigma/(e*(mew_e+mew_h));\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=C*T**(3/2)/ni;\n", + "z=math.log(y);\n", + "Eg=2*k*T*z/(1.6*10**-19); #forbidden energy gap(eV)\n", + "\n", + "#Result\n", + "print \"forbidden energy gap is\",round(Eg,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.9, Page number 8.16" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy band gap is 0.452 eV\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", + "x=0.6532;\n", + "y=0.3010;\n", + "T1=273+20; #temperature(K)\n", + "T2=273+32; #temperature(K)\n", + "k=8.616*10**-5;\n", + "\n", + "#Calculation\n", + "dy=x-y;\n", + "dx=(1/T1)-(1/T2);\n", + "Eg=2*k*dy/dx; #energy band gap(eV)\n", + "\n", + "#Result\n", + "print \"energy band gap is\",round(Eg,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.10, Page number 8.17" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 1729.0 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant\n", + "EF=0.18; #fermi shift(eV)\n", + "E=1.2; #energy gap(eV)\n", + "e=1.6*10**-19; \n", + "r=5; \n", + "\n", + "#Calculation\n", + "T=EF*e*4/(3*k*math.log(r)); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.11, Page number 8.17" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron concentration is 2.0 *10**9 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Na=5*10**23; #number of atoms(atoms)\n", + "Nd=3*10**23; #number of atoms(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", + "#Result\n", + "print \"electron concentration is\",n/10**9,\"*10**9 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.12, Page number 8.18" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 0.432 *10**-3 ohm-1 m-1\n", + "conductivity is 10.38 ohm-1 m-1\n", + "conductivity is 3.99 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; #carrier density(per m**3)\n", + "mew_e=0.13; #electron mobility(m**2/Vs)\n", + "mew_h=0.05; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "d=2.33*10**3; #density(kg/m**3)\n", + "n=28.1;\n", + "na=6.02*10**26; #number of atoms\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "Nd=d*na/(n*10**8);\n", + "p=ni**2/Nd; \n", + "sigma_ex1=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "n=p;\n", + "Na=Nd;\n", + "sigma_ex2=Na*e*mew_h; #conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n", + "print \"conductivity is\",round(sigma_ex1,2),\"ohm-1 m-1\"\n", + "print \"conductivity is\",round(sigma_ex2,2),\"ohm-1 m-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.13, Page number 8.20" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 0.4392 *10**-3 ohm-1 m-1\n", + "hole concentration is 2250000000.0 per m**3\n", + "conductivity is 2.16 *10**3 ohm-1 m-1\n", + "position of fermi level is 0.02 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=1.5*10**16; #carrier density(per m**3)\n", + "mew_e=0.135; #electron mobility(m**2/Vs)\n", + "mew_h=0.048; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "Nd=10**23; \n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "p=ni**2/Nd; #hole concentration(per m**3)\n", + "sigma_ex=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "x=3*k*T*math.log(mew_e/mew_h)/4;\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n", + "print \"hole concentration is\",p,\"per m**3\"\n", + "print \"conductivity is\",sigma_ex/10**3,\"*10**3 ohm-1 m-1\"\n", + "print \"position of fermi level is\",round(x/(1.6*10**-19),2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.14, Page number 8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diffusion coefficient is 49.162 *10**-4 m**2 s-1\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", + "mew_e=0.19; #electron mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "Dn=mew_e*k*T/e; #diffusion coefficient(m**2 s-1)\n", + "\n", + "#Result\n", + "print \"diffusion coefficient is\",round(Dn*10**4,3),\"*10**-4 m**2 s-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.15, Page number 8.44" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall voltage is 1.83 mV\n" + ] + } + ], + "source": [ + "#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*10**-3; #thickness(m)\n", + "\n", + "#Calculation\n", + "VH=RH*I*B*10**3/t; #hall voltage(mV)\n", + "\n", + "#Result\n", + "print \"hall voltage is\",VH,\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.16, Page number 8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is 3.7e-06 C-1 m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vy=37*10**-6; #voltage(V)\n", + "t=10**-3; #thickness(m)\n", + "Bz=0.5; #magnetic field(wb/m**2)\n", + "Ix=20*10**-3; #current(A)\n", + "\n", + "#Calculation\n", + "RH=Vy*t/(Ix*Bz); #hall coefficient(m**3/coulomb)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",RH,\"C-1 m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.17, Page number 8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of charge carriers is 9.124 *10**22 m**3\n", + "mobility of charge carriers is 17.125 *10**-3 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH=6.85*10**-5; #hall coefficient(m**3/coulomb)\n", + "e=1.6*10**-19; \n", + "sigma=250; #conductivity(m-1 ohm-1)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #density of charge carriers(m**3)\n", + "mew=sigma/(n*e); #mobility of charge carriers(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 m**3\"\n", + "print \"mobility of charge carriers is\",mew*10**3,\"*10**-3 m**2 V-1 s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.18, Page number 8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall voltage is 1.431 micro V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I=30; #current(A)\n", + "B=1.75; #magnetic field(T)\n", + "n=6.55*10**28; #electron concentration(/m**3)\n", + "t=0.35*10**-2; #thickness(m)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "VH=I*B*10**6/(n*e*t); #hall voltage(micro V)\n", + "\n", + "#Result\n", + "print \"hall voltage is\",round(VH,3),\"micro V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.19, Page number 8.47" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of charge carriers is 1.708 *10**22 per m**3\n", + "mobility of charge carriers is 0.041 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#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", + "e=1.6*10**-19;\n", + "Pn=8.93*10**-3; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #density of charge carriers(per m**3)\n", + "mew_e=RH/Pn; #mobility of charge carriers(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 per m**3\"\n", + "print \"mobility of charge carriers is\",round(mew_e,3),\"m**2 V-1 s-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/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb new file mode 100755 index 00000000..e6d0049e --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter8_2.ipynb @@ -0,0 +1,873 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#8: Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.1, Page number 8.11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.471 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.37*10**19; #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); \n", + "rho=1/sigma_i; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rho,3),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.2, Page number 8.11" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "position of fermi level is 0.576 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg=1.12; #band gap(eV)\n", + "T=300; #temperature(K)\n", + "m0=1; #assume\n", + "me=0.12*m0;\n", + "mh=0.28*m0;\n", + "k=1.38*10**-23; #boltzmann constant\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "EF=(Eg/2)+(3*k*T*math.log(mh/me)/(4*e)); #position of fermi level(eV)\n", + "\n", + "#Result\n", + "print \"position of fermi level is\",round(EF,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.3, Page number 8.12" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of intrinsic charge carriers is 33.48 *10**18 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=0.7; #energy(eV)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "x=(2*math.pi*m*k/h**2)**(3/2);\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=2*x*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "\n", + "#Result\n", + "print \"concentration of intrinsic charge carriers is\",round(ni/10**18,2),\"*10**18 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.4, Page number 8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.449 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.4*10**19; #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); \n", + "rhoi=1/sigma_i; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rhoi,3),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.5, Page number 8.13" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance is 4.31 *10**3 ohm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.5*10**19; #carrier density(per m**3)\n", + "mew_e=0.39; #electron mobility(m**2/Vs)\n", + "mew_p=0.19; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "l=1*10**-2; #length(m)\n", + "A=10**-3*10**-3; #area(m**2)\n", + "\n", + "#Calculation\n", + "R=l/(ni*e*A*(mew_p+mew_e)); #resistance(ohm)\n", + "\n", + "#Result\n", + "print \"resistance is\",round(R/10**3,2),\"*10**3 ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.6, Page number 8.14" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 1.578 *10**-3 ohm-1 m-1\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", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=1.1; #energy(eV)\n", + "e=1.6*10**-19; \n", + "mew_e=0.48; #electron mobility(m**2/Vs)\n", + "mew_p=0.013; #hole mobility(m**2/Vs)\n", + "\n", + "#Calculation\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "\n", + "\n", + "#Result\n", + "print \"conductivity is\",round(sigma_i*10**3,3),\"*10**-3 ohm-1 m-1\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.7, Page number 8.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of intrinsic charge carriers is 3.35 *10**19 per m**3\n", + "conductivity is 3.589 ohm-1 m-1\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", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "Eg=0.7; #energy(eV)\n", + "e=1.6*10**-19; \n", + "mew_e=0.48; #electron mobility(m**2/Vs)\n", + "mew_p=0.013; #hole mobility(m**2/Vs)\n", + "\n", + "#Calculation\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=math.exp(-Eg*e/(2*k*T));\n", + "ni=C*(T**(3/2))*y; #concentration of intrinsic charge carriers(per m**3)\n", + "sigma_i=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"concentration of intrinsic charge carriers is\",round(ni/10**19,2),\"*10**19 per m**3\"\n", + "print \"conductivity is\",round(sigma_i,3),\"ohm-1 m-1\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.8, Page number 8.15" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "forbidden energy gap is 0.793 eV\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", + "e=1.6*10**-19; \n", + "mew_e=0.36; #electron mobility(m**2/Vs)\n", + "mew_h=0.17; #hole mobility(m**2/Vs)\n", + "rho=2.12; #resistivity(ohm m)\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "m=9.109*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #plancks constant\n", + "\n", + "#Calculation\n", + "sigma=1/rho;\n", + "ni=sigma/(e*(mew_e+mew_h));\n", + "C=2*((2*math.pi*m*k/h**2)**(3/2));\n", + "y=C*T**(3/2)/ni;\n", + "z=math.log(y);\n", + "Eg=2*k*T*z/(1.6*10**-19); #forbidden energy gap(eV)\n", + "\n", + "#Result\n", + "print \"forbidden energy gap is\",round(Eg,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.9, Page number 8.16" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy band gap is 0.452 eV\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", + "x=0.6532;\n", + "y=0.3010;\n", + "T1=273+20; #temperature(K)\n", + "T2=273+32; #temperature(K)\n", + "k=8.616*10**-5;\n", + "\n", + "#Calculation\n", + "dy=x-y;\n", + "dx=(1/T1)-(1/T2);\n", + "Eg=2*k*dy/dx; #energy band gap(eV)\n", + "\n", + "#Result\n", + "print \"energy band gap is\",round(Eg,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.10, Page number 8.17" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 1729.0 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23; #boltzmann constant\n", + "EF=0.18; #fermi shift(eV)\n", + "E=1.2; #energy gap(eV)\n", + "e=1.6*10**-19; \n", + "r=5; \n", + "\n", + "#Calculation\n", + "T=EF*e*4/(3*k*math.log(r)); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.11, Page number 8.17" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electron concentration is 2.0 *10**9 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Na=5*10**23; #number of atoms(atoms)\n", + "Nd=3*10**23; #number of atoms(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", + "#Result\n", + "print \"electron concentration is\",n/10**9,\"*10**9 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.12, Page number 8.18" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 0.432 *10**-3 ohm-1 m-1\n", + "conductivity is 10.38 ohm-1 m-1\n", + "conductivity is 3.99 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; #carrier density(per m**3)\n", + "mew_e=0.13; #electron mobility(m**2/Vs)\n", + "mew_h=0.05; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "d=2.33*10**3; #density(kg/m**3)\n", + "n=28.1;\n", + "na=6.02*10**26; #number of atoms\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "Nd=d*na/(n*10**8);\n", + "p=ni**2/Nd; \n", + "sigma_ex1=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "n=p;\n", + "Na=Nd;\n", + "sigma_ex2=Na*e*mew_h; #conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n", + "print \"conductivity is\",round(sigma_ex1,2),\"ohm-1 m-1\"\n", + "print \"conductivity is\",round(sigma_ex2,2),\"ohm-1 m-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.13, Page number 8.20" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 0.4392 *10**-3 ohm-1 m-1\n", + "hole concentration is 2250000000.0 per m**3\n", + "conductivity is 2.16 *10**3 ohm-1 m-1\n", + "position of fermi level is 0.02 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=1.5*10**16; #carrier density(per m**3)\n", + "mew_e=0.135; #electron mobility(m**2/Vs)\n", + "mew_h=0.048; #hole mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "Nd=10**23; \n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n", + "p=ni**2/Nd; #hole concentration(per m**3)\n", + "sigma_ex=Nd*e*mew_e; #conductivity(ohm-1 m-1)\n", + "x=3*k*T*math.log(mew_e/mew_h)/4;\n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n", + "print \"hole concentration is\",p,\"per m**3\"\n", + "print \"conductivity is\",sigma_ex/10**3,\"*10**3 ohm-1 m-1\"\n", + "print \"position of fermi level is\",round(x/(1.6*10**-19),2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.14, Page number 8.35" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diffusion coefficient is 49.162 *10**-4 m**2 s-1\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", + "mew_e=0.19; #electron mobility(m**2/Vs)\n", + "e=1.6*10**-19; \n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "Dn=mew_e*k*T/e; #diffusion coefficient(m**2 s-1)\n", + "\n", + "#Result\n", + "print \"diffusion coefficient is\",round(Dn*10**4,3),\"*10**-4 m**2 s-1\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.15, Page number 8.44" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall voltage is 1.83 mV\n" + ] + } + ], + "source": [ + "#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*10**-3; #thickness(m)\n", + "\n", + "#Calculation\n", + "VH=RH*I*B*10**3/t; #hall voltage(mV)\n", + "\n", + "#Result\n", + "print \"hall voltage is\",VH,\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.16, Page number 8.45" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is 3.7e-06 C-1 m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vy=37*10**-6; #voltage(V)\n", + "t=10**-3; #thickness(m)\n", + "Bz=0.5; #magnetic field(wb/m**2)\n", + "Ix=20*10**-3; #current(A)\n", + "\n", + "#Calculation\n", + "RH=Vy*t/(Ix*Bz); #hall coefficient(m**3/coulomb)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",RH,\"C-1 m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.17, Page number 8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of charge carriers is 9.124 *10**22 m**3\n", + "mobility of charge carriers is 17.125 *10**-3 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "RH=6.85*10**-5; #hall coefficient(m**3/coulomb)\n", + "e=1.6*10**-19; \n", + "sigma=250; #conductivity(m-1 ohm-1)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #density of charge carriers(m**3)\n", + "mew=sigma/(n*e); #mobility of charge carriers(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 m**3\"\n", + "print \"mobility of charge carriers is\",mew*10**3,\"*10**-3 m**2 V-1 s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.18, Page number 8.46" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall voltage is 1.431 micro V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I=30; #current(A)\n", + "B=1.75; #magnetic field(T)\n", + "n=6.55*10**28; #electron concentration(/m**3)\n", + "t=0.35*10**-2; #thickness(m)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "VH=I*B*10**6/(n*e*t); #hall voltage(micro V)\n", + "\n", + "#Result\n", + "print \"hall voltage is\",round(VH,3),\"micro V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.19, Page number 8.47" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of charge carriers is 1.708 *10**22 per m**3\n", + "mobility of charge carriers is 0.041 m**2 V-1 s-1\n" + ] + } + ], + "source": [ + "#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", + "e=1.6*10**-19;\n", + "Pn=8.93*10**-3; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "n=1/(RH*e); #density of charge carriers(per m**3)\n", + "mew_e=RH/Pn; #mobility of charge carriers(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of charge carriers is\",round(n/10**22,3),\"*10**22 per m**3\"\n", + "print \"mobility of charge carriers is\",round(mew_e,3),\"m**2 V-1 s-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/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb new file mode 100755 index 00000000..bd885ca7 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_1.ipynb @@ -0,0 +1,195 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#9: Physics of Semiconductor Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.1, Page number 9.14" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of radiation is 0.868 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.62*10**-34; #planck's constant(J sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "Eg=1.43*1.6*10**-19; #energy gap(J)\n", + "\n", + "#Calculation\n", + "lamda=h*c*10**6/Eg; #wavelength of radiation(micro m)\n", + "\n", + "#Result\n", + "print \"wavelength of radiation is\",round(lamda,3),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.2, Page number 9.28" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken is 3.7 *10**-9 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=5*10**-6; #thickness(m)\n", + "Dc=3.4*10**-3; #diffusion coefficient(m**2 S-1)\n", + "\n", + "#Calculation\n", + "tow_diff=d**2/(2*Dc); #time taken(s)\n", + "\n", + "#Result\n", + "print \"time taken is\",round(tow_diff*10**9,1),\"*10**-9 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.3, Page number 9.28" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transit time is 5e-11 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=5*10**-6; #thickness(m)\n", + "vsat=10**5; #velocity(m/s)\n", + "\n", + "#Calculation\n", + "tow_drift=w/vsat; #transit time(s)\n", + "\n", + "#Result\n", + "print \"transit time is\",tow_drift,\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.4, Page number 9.29" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diode capacitance is 28.8 pF\n", + "frequency bandwidth is 110 MHz\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", + "A=10**-6; #area(m**2)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "Nd=10**21; #electron concentration(m**-3)\n", + "epsilonr=11.7;\n", + "epsilon0=8.85*10**-12;\n", + "V=10; #potential(V)\n", + "RL=50; #resistance(ohm)\n", + "\n", + "#Calculation\n", + "Cj=(A/2)*math.sqrt(2*e*epsilonr*epsilon0*Nd/V); #diode capacitance(F)\n", + "delta_fel=1/(2*math.pi*RL*Cj); #frequency bandwidth(Hz)\n", + "\n", + "#Result\n", + "print \"diode capacitance is\",round(Cj*10**12,1),\"pF\"\n", + "print \"frequency bandwidth is\",int(delta_fel*10**-6),\"MHz\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb new file mode 100755 index 00000000..bd885ca7 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/Chapter9_2.ipynb @@ -0,0 +1,195 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#9: Physics of Semiconductor Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.1, Page number 9.14" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of radiation is 0.868 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.62*10**-34; #planck's constant(J sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "Eg=1.43*1.6*10**-19; #energy gap(J)\n", + "\n", + "#Calculation\n", + "lamda=h*c*10**6/Eg; #wavelength of radiation(micro m)\n", + "\n", + "#Result\n", + "print \"wavelength of radiation is\",round(lamda,3),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.2, Page number 9.28" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken is 3.7 *10**-9 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=5*10**-6; #thickness(m)\n", + "Dc=3.4*10**-3; #diffusion coefficient(m**2 S-1)\n", + "\n", + "#Calculation\n", + "tow_diff=d**2/(2*Dc); #time taken(s)\n", + "\n", + "#Result\n", + "print \"time taken is\",round(tow_diff*10**9,1),\"*10**-9 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.3, Page number 9.28" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transit time is 5e-11 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "w=5*10**-6; #thickness(m)\n", + "vsat=10**5; #velocity(m/s)\n", + "\n", + "#Calculation\n", + "tow_drift=w/vsat; #transit time(s)\n", + "\n", + "#Result\n", + "print \"transit time is\",tow_drift,\"s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.4, Page number 9.29" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diode capacitance is 28.8 pF\n", + "frequency bandwidth is 110 MHz\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", + "A=10**-6; #area(m**2)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "Nd=10**21; #electron concentration(m**-3)\n", + "epsilonr=11.7;\n", + "epsilon0=8.85*10**-12;\n", + "V=10; #potential(V)\n", + "RL=50; #resistance(ohm)\n", + "\n", + "#Calculation\n", + "Cj=(A/2)*math.sqrt(2*e*epsilonr*epsilon0*Nd/V); #diode capacitance(F)\n", + "delta_fel=1/(2*math.pi*RL*Cj); #frequency bandwidth(Hz)\n", + "\n", + "#Result\n", + "print \"diode capacitance is\",round(Cj*10**12,1),\"pF\"\n", + "print \"frequency bandwidth is\",int(delta_fel*10**-6),\"MHz\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_P.K.Palanisamy/README.txt b/Engineering_Physics_by_P.K.Palanisamy/README.txt new file mode 100644 index 00000000..b9fb4354 --- /dev/null +++ b/Engineering_Physics_by_P.K.Palanisamy/README.txt @@ -0,0 +1,10 @@ +Contributed By: KRISHNA CHAITANYA +Course: btech +College/Institute/Organization: JNTUH +Department/Designation: Computer Science +Book Title: Engineering Physics +Author: P.K.Palanisamy +Publisher: Scitech Publications, Chennai +Year of publication: 2012 +Isbn: 9788183714631 +Edition: 2 \ No newline at end of file diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png new file mode 100755 index 00000000..074a3991 Binary files /dev/null and b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter2.png differ diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png new file mode 100755 index 00000000..8fb78a80 Binary files /dev/null and b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter6.png differ diff --git a/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png new file mode 100755 index 00000000..896ba33a Binary files /dev/null and b/Engineering_Physics_by_P.K.Palanisamy/screenshots/chapter9.png differ diff --git a/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1.ipynb new file mode 100755 index 00000000..2e5de774 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Physics and Engineering" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage Error (percentage) = 4.0\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given:\n", + "l=9.3; # length in cm\n", + "b=8.5;# breadth in cm\n", + "h=5.4;# height in cm\n", + "#calculations\n", + "V= l*b*h; # Volume in cm**3\n", + "delta_l = 0.1; delta_b = 0.1; delta_h = 0.1; # scale has a least count = 0.1 cm\n", + "# absolute error \n", + "delta_V = (b*h*delta_l + l*h*delta_b +l*b*delta_h); # in cm**3\n", + "#relative error \n", + "re = delta_V/V;\n", + "p= re*100; # Evaluating percentage error\n", + "#results\n", + "print \"Percentage Error (percentage) = \",round(p,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage error (percentage) = 2.86\n", + "Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given :\n", + "M= 10.0; #weight in g\n", + "V= 5.80;#volume in cm**3\n", + "#calculations\n", + "Rho = M/V; # Density in g/cm**3\n", + "delta_M= 0.2 # apparatus has a least count of 0.2 g\n", + "delta_V= 0.05# apparatus has a least count of 0.05 cm**3\n", + "delta_Rho = (delta_M/V) +((M*delta_V)/V**2);# absolute error in g/cm**3\n", + "re = delta_Rho/Rho ; #Evaluating Relative Error\n", + "p = re*100;# Evaluating Percentage Error\n", + "#results\n", + "print \"Percentage error (percentage) = \",round(p,2)\n", + "print'Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Actual Value of c/r ranges between 5.9 - 6.6 and Percentage error = 5.3 percentage. \n", + "(b)Actual Value of c/r ranges between 6.281 - 6.288 and Percentage error = 0.06 percentage.\n" + ] + } + ], + "source": [ + "#calculate the Actual val of c/r ranges and percentage error\n", + "#Given:\n", + "#(a) \n", + "import math\n", + "lc = 0.1# least count in cm\n", + "c = 6.9 #Circumference c in cm\n", + "r= 1.1 # radius of circle in cm\n", + "val =2*math.pi;\n", + "# Circumference,c= 2*pi*r or c/r = 2*pi\n", + "# Error in c/r is , delta(c/r)= [(c/r**2)+(1/r)](LC/2) , LC is Least Count .\n", + "E= ((c/r**2)+(1./r))*(lc/2.);#Error in c/r is delta(c/r)\n", + "ob = c/r; # Observed Value\n", + "#Actual Value of c/r ranges between\n", + "ac1 = ob-E;# Evaluating Minimum value for c/r \n", + "ac2 = ob+E;# Evaluating Maximum value for c/r\n", + "p = (E/ob)*100.; #Evaluating percentage error\n", + "#results\n", + "print \"(a)Actual Value of c/r ranges between\",round(ac1,1), \"-\",round(ac2,1),\" and Percentage error =\",round(p,1),\" percentage. \"\n", + "#(b)\n", + "lc1 = 0.001;#Now the least count is 0.001 cm\n", + "c1 = 6.316;#Circumference in cm\n", + "r1=1.005;#Circle radius in cm \n", + "E1 =((c1/r1**2) + (1/r1))*(lc1/2); # Error in c/r is delta(c/r)\n", + "ob1= c1/r1; #Observed Value\n", + "p1=(E1/ob1)*100.;#Evaluating percentage error\n", + "#Actual Value of c/r ranges between\n", + "a1= ob1-E1;#Evaluating Minimum value for c/r\n", + "a2= ob1+E1;#Evaluating Maximum value for c/r\n", + "print \"(b)Actual Value of c/r ranges between\",round(a1,3),\"-\",round(a2,3),\"and Percentage error =\",round(p1,2),\" percentage.\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 17" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) It is is 15.0 percentage lower than the experimental value.\n", + "(b) It is 0.6 percentage higher than the experimental value.\n" + ] + } + ], + "source": [ + "#calculate the percentage lower or higher than experimental value\n", + "#Given\n", + "import math\n", + "# (a) Newton's Theory\n", + "# v= (P/rho)**2 , P= Pressure , rho = density\n", + "P = 76.; # 76 cm of Hg pressure\n", + "V= 330. ; # velocity of sound in m/s\n", + "rho = 0.001293; # density for dry air at 0 degrees celsius in g/cm**3\n", + "g = 980.;#gravitational acceleration in cm/s**2\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "#calculations\n", + "v = math.sqrt(((P*13.6*g)/rho)*10**-4); # velocity of sound in m/s\n", + "p= ((V-v)/V)*100; # % lower than the experimental value\n", + "#results\n", + "print \"(a) It is is\",round(p,0),\" percentage lower than the experimental value.\"\n", + "\n", + "# (b) Laplace's Theory \n", + "# v= ((gama*P)/rho)**2., gamma = adiabatic index Thus,\n", + "#Given :\n", + "gama = 1.41 # Adiabatic index\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "v1 = math.sqrt(((gama*P*13.6*g)/rho)*10**-4);# velocity of sound in m/s\n", + "p1 = ((V-round(v1))/V)*100;# % higher than the eperimental value\n", + "#results\n", + "print \"(b) It is\",round(abs(p1),1),\"percentage higher than the experimental value.\"" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10.ipynb new file mode 100755 index 00000000..bde406ea --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Dielectric and Magnetic Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 312" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R : 0.6 x 10^-10 m\n" + ] + } + ], + "source": [ + "#pg 312\n", + "#calculate the radius of atom\n", + "#Given:\n", + "import math\n", + "er = 1.0000684; # relative dielectric constant\n", + "N = 2.7*10**25; # atoms/m^3\n", + "#We know, er - 1 = 4*pi*N*R^3\n", + "#calculations\n", + "R = ((er-1)/(4*math.pi*N))**(1./3) ; # in m\n", + "#results\n", + "print\"R :\",round(R*10**10,1),\" x 10^-10 m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 313" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility of diamagnetic materials is -1.0 x 10^-5\n" + ] + } + ], + "source": [ + "#pg 313\n", + "#calculate the Susceptibility \n", + "#Given :\n", + "import math\n", + "R = 1; # radius in A\n", + "N = 5*10**28 ; # atoms/m**3\n", + "mu_0 = 4*math.pi*10**-7; # permeability of free space in H/m\n", + "mu_r = 1;#relative permiability\n", + "m = 9.1*10**-31 # electron mass in kg\n", + "e = 1.6*10**-19 ; # charge of an electron in C\n", + "# R = 1*10**-10 m because 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "chi = -(N*e**2*(R*10**-10)**2*mu_0*mu_r)/(4*m); #Susceptibility of diamagnetic material\n", + "#results\n", + "print \"Susceptibility of diamagnetic materials is\",math.floor(chi*10**5), \"x 10^-5\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 320" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dipole moment (debye) = 0.96\n", + "Sum = 1.6 x 10**-39 farad m^2\n" + ] + } + ], + "source": [ + "#pg 320\n", + "#calculate the dipole moment and Sum\n", + "#Given :\n", + "import math\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "er1 = 1.006715 ; #relative dielectric constant\n", + "er2 = 1.005970;# relative dielectric constant\n", + "T1 = 300. ; # Temperature in K (273+27 = 300 K)\n", + "T2 = 450.; # Temperature in K (273 + 177 = 450 K)\n", + "k = 1.38*10**-23; # in J/K\n", + "N = 2.44*10**25 ; # molecules/m**3\n", + "#calculations\n", + "#e0*(er1 - er2)= ((N*mu_p**2)/(3*k))*((1/T1)- (1/T2))\n", + "mu_p = math.sqrt((e0*(er1 - er2)*3*k)/(((1/T1)-(1/T2))* N)); #dipole moment in C m\n", + "D = 3.3*10**-30; # dipole of 1 Debye is equal to 3.33 x 10**-30 C m \n", + "#e0*(er1 - 1) = N*(alpha_e + alpha_i + (mu_p**2/3*k*T1))\n", + "Sum = ((e0*(er1 - 1))/N) - ((mu_p)**2/(3*k*T1)); # alpha_e + alpha_i in farad m**2\n", + "#results\n", + "print \"Dipole moment (debye) = \",round(mu_p/D,2)\n", + "print \"Sum =\",round(Sum*10**39,1),\"x 10**-39 farad m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " E = 1.55 x 10^7 V/m\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the value of E\n", + "#Given :\n", + "mu_p = 1.2 ;# dipole moment in debye units\n", + "T = 300 ; # Temperature in Kelvin ( 273+27 = 300 K)\n", + "k = 1.38*10**-23 ; # in J/K\n", + "per = 0.5/100 ; # percentage of saturated polarisation\n", + "# 0.05*N*mu_p = (N*(mu_p)**2*E/(3*k*T))\n", + "#calculations\n", + "E = (3*k*T*per)/(mu_p*3.33*10**-30); # External field in V/m\n", + "#results\n", + "print \" E =\",round(E*10**-7,2),\"x 10^7 V/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility = 1.0 x 10**-3\n", + "Result obtained differs from that in textbook, because in textbook only the order is considered\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the Susceptibility\n", + "import math\n", + "#Given :\n", + "N = 5*10**28 ;# number of dipoles per m**3\n", + "betaa = 1;# Bohr magneton\n", + "T = 300 ; # Room temperature in k\n", + "k = 1.38*10**-23 ; # in J/K\n", + "mu_0 = 4*math.pi*10**-7 ; #Magnetic permeability in H/m\n", + "#calculations\n", + "chi = (N*mu_0*betaa*(1*9.27*10**-24)**2)/(k*T);\n", + "#results\n", + "print \"Susceptibility =\",round(chi*10**3,0),\"x 10**-3\"\n", + "print 'Result obtained differs from that in textbook, because in textbook only the order is considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 324" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Relative dielectric constant = 3.81\n" + ] + } + ], + "source": [ + "#pg 324\n", + "#calculate the Relative dielectric constant\n", + "#Given :\n", + "M = 32.; # Atomic weight in kg/kmole\n", + "Na =6.023*10**26 ; # Avogadro constant in atoms/kmole\n", + "alpha_e = 3.28*10**-40; # electronic polarisability in farad/m**2\n", + "rho = 2.08; #density in gm/cm**3\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "# (er - 1)/(er + 2) = (N*alpha_e/3*e0)\n", + "#1 gm = 1.0*10**-3 kg , 1 cm**3 = 1.0*10**-6 m**3\n", + "#calculations\n", + "N = (Na*(rho*10**3))/M; # atoms/m**3\n", + "er =( 2*((N*alpha_e)/(3*e0)) + 1 )/(1 - ((N*alpha_e)/(3*e0)));\n", + "#results\n", + "print \"Relative dielectric constant = \",round(er,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 326" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power loss (W) = 250.0\n" + ] + } + ], + "source": [ + "#pg 326\n", + "#calculate the Power loss\n", + "#Given :\n", + "area = 50000.; # area of hysteresis on a graph\n", + "axis1 = 10**-4 ; # units of scale in Wb/m**2\n", + "axis2 = 10**2; # units of scale in A/m\n", + "vol = 0.01; # volume in m**3\n", + "F = 50; #frequency in Hz\n", + "#calculations\n", + "E1 = area*axis1*axis2; # Energy lost per cycle in J/m**3\n", + "E2 = E1*vol ; # Energy lost in core per cycle in J\n", + "P = E2*F; # Power loss in W\n", + "#results\n", + "print \"Power loss (W) = \",P\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 328" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "U = 21.5 x 10^-25 \n" + ] + } + ], + "source": [ + "#pg 328\n", + "#calculate the value of energy \n", + "import math\n", + "#Given :\n", + "mu_d = 9.27*10**-24; # Bhor magneton in Am**2\n", + "mu_0 = 4*math.pi*10**-7; # Magnetic permiability in H/m\n", + "r = 2; # dipoles distance in A\n", + "#U = mu_d*B = -( mu_0*mu_d**2)/(2*pi*r)\n", + "#r = 2*10**-10 m , 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "U = ( mu_0*mu_d**2)/(2*math.pi*(r*10**-10)**3); # Energy \n", + "print \"U =\",round(U*10**25,1),\"x 10^-25 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 329" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Saturation Magnetisation = 3.14 x 10^6 A/m\n" + ] + } + ], + "source": [ + "#pg 329\n", + "#calculate the Saturation magnetisation\n", + "#Given :\n", + "a = 2.87; # lattice constant in A\n", + "mu = 4.; # 4 Bohr magnetons/atom\n", + "# BCC = 2 atoms/unit cell , 1 A = 1.0*10**-10 m\n", + "N = 2./(2.87*10**-10)**3; # atoms/m**3\n", + "#calculations\n", + "#1 Bohr magneton = 9.27*10**-24 Am**2\n", + "Msat = N*mu*9.27*10**-24;# Saturation in magnetisation in A/m\n", + "#results\n", + "print \" Saturation Magnetisation =\",round(Msat*10**-6,2),\"x 10^6 A/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 338" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage = 78.3\n" + ] + } + ], + "source": [ + "#pg 338\n", + "#calculate the percentage attributed to polarisability\n", + "#Given :\n", + "er = 6.75 ; # relative dielectric constant for glass\n", + "f = 10**9 ;# frequency in Hz\n", + "n = 1.5;# refractive index of glass\n", + "e0 = 8.85*10**-12; # dielectric constant in farad/m\n", + "#Pe = e0*(n**2 - 1)*E , Pi = e0*(er - n**2)*E , P = Pi + Pe = e0*(er - 1)*E\n", + "#Percentage = [(e0*(er - n**2)*E)/(e0*(er -1)*E)]*100 , both the E's cancel each other\n", + "#calculations\n", + "per = (e0*(er - n**2))/(e0*(er -1))*100;# percentage\n", + "print \"Percentage = \",round(per,1)\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/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 new file mode 100644 index 00000000..bde406ea --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_1.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Dielectric and Magnetic Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 312" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R : 0.6 x 10^-10 m\n" + ] + } + ], + "source": [ + "#pg 312\n", + "#calculate the radius of atom\n", + "#Given:\n", + "import math\n", + "er = 1.0000684; # relative dielectric constant\n", + "N = 2.7*10**25; # atoms/m^3\n", + "#We know, er - 1 = 4*pi*N*R^3\n", + "#calculations\n", + "R = ((er-1)/(4*math.pi*N))**(1./3) ; # in m\n", + "#results\n", + "print\"R :\",round(R*10**10,1),\" x 10^-10 m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 313" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility of diamagnetic materials is -1.0 x 10^-5\n" + ] + } + ], + "source": [ + "#pg 313\n", + "#calculate the Susceptibility \n", + "#Given :\n", + "import math\n", + "R = 1; # radius in A\n", + "N = 5*10**28 ; # atoms/m**3\n", + "mu_0 = 4*math.pi*10**-7; # permeability of free space in H/m\n", + "mu_r = 1;#relative permiability\n", + "m = 9.1*10**-31 # electron mass in kg\n", + "e = 1.6*10**-19 ; # charge of an electron in C\n", + "# R = 1*10**-10 m because 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "chi = -(N*e**2*(R*10**-10)**2*mu_0*mu_r)/(4*m); #Susceptibility of diamagnetic material\n", + "#results\n", + "print \"Susceptibility of diamagnetic materials is\",math.floor(chi*10**5), \"x 10^-5\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 320" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dipole moment (debye) = 0.96\n", + "Sum = 1.6 x 10**-39 farad m^2\n" + ] + } + ], + "source": [ + "#pg 320\n", + "#calculate the dipole moment and Sum\n", + "#Given :\n", + "import math\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "er1 = 1.006715 ; #relative dielectric constant\n", + "er2 = 1.005970;# relative dielectric constant\n", + "T1 = 300. ; # Temperature in K (273+27 = 300 K)\n", + "T2 = 450.; # Temperature in K (273 + 177 = 450 K)\n", + "k = 1.38*10**-23; # in J/K\n", + "N = 2.44*10**25 ; # molecules/m**3\n", + "#calculations\n", + "#e0*(er1 - er2)= ((N*mu_p**2)/(3*k))*((1/T1)- (1/T2))\n", + "mu_p = math.sqrt((e0*(er1 - er2)*3*k)/(((1/T1)-(1/T2))* N)); #dipole moment in C m\n", + "D = 3.3*10**-30; # dipole of 1 Debye is equal to 3.33 x 10**-30 C m \n", + "#e0*(er1 - 1) = N*(alpha_e + alpha_i + (mu_p**2/3*k*T1))\n", + "Sum = ((e0*(er1 - 1))/N) - ((mu_p)**2/(3*k*T1)); # alpha_e + alpha_i in farad m**2\n", + "#results\n", + "print \"Dipole moment (debye) = \",round(mu_p/D,2)\n", + "print \"Sum =\",round(Sum*10**39,1),\"x 10**-39 farad m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " E = 1.55 x 10^7 V/m\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the value of E\n", + "#Given :\n", + "mu_p = 1.2 ;# dipole moment in debye units\n", + "T = 300 ; # Temperature in Kelvin ( 273+27 = 300 K)\n", + "k = 1.38*10**-23 ; # in J/K\n", + "per = 0.5/100 ; # percentage of saturated polarisation\n", + "# 0.05*N*mu_p = (N*(mu_p)**2*E/(3*k*T))\n", + "#calculations\n", + "E = (3*k*T*per)/(mu_p*3.33*10**-30); # External field in V/m\n", + "#results\n", + "print \" E =\",round(E*10**-7,2),\"x 10^7 V/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility = 1.0 x 10**-3\n", + "Result obtained differs from that in textbook, because in textbook only the order is considered\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the Susceptibility\n", + "import math\n", + "#Given :\n", + "N = 5*10**28 ;# number of dipoles per m**3\n", + "betaa = 1;# Bohr magneton\n", + "T = 300 ; # Room temperature in k\n", + "k = 1.38*10**-23 ; # in J/K\n", + "mu_0 = 4*math.pi*10**-7 ; #Magnetic permeability in H/m\n", + "#calculations\n", + "chi = (N*mu_0*betaa*(1*9.27*10**-24)**2)/(k*T);\n", + "#results\n", + "print \"Susceptibility =\",round(chi*10**3,0),\"x 10**-3\"\n", + "print 'Result obtained differs from that in textbook, because in textbook only the order is considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 324" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Relative dielectric constant = 3.81\n" + ] + } + ], + "source": [ + "#pg 324\n", + "#calculate the Relative dielectric constant\n", + "#Given :\n", + "M = 32.; # Atomic weight in kg/kmole\n", + "Na =6.023*10**26 ; # Avogadro constant in atoms/kmole\n", + "alpha_e = 3.28*10**-40; # electronic polarisability in farad/m**2\n", + "rho = 2.08; #density in gm/cm**3\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "# (er - 1)/(er + 2) = (N*alpha_e/3*e0)\n", + "#1 gm = 1.0*10**-3 kg , 1 cm**3 = 1.0*10**-6 m**3\n", + "#calculations\n", + "N = (Na*(rho*10**3))/M; # atoms/m**3\n", + "er =( 2*((N*alpha_e)/(3*e0)) + 1 )/(1 - ((N*alpha_e)/(3*e0)));\n", + "#results\n", + "print \"Relative dielectric constant = \",round(er,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 326" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power loss (W) = 250.0\n" + ] + } + ], + "source": [ + "#pg 326\n", + "#calculate the Power loss\n", + "#Given :\n", + "area = 50000.; # area of hysteresis on a graph\n", + "axis1 = 10**-4 ; # units of scale in Wb/m**2\n", + "axis2 = 10**2; # units of scale in A/m\n", + "vol = 0.01; # volume in m**3\n", + "F = 50; #frequency in Hz\n", + "#calculations\n", + "E1 = area*axis1*axis2; # Energy lost per cycle in J/m**3\n", + "E2 = E1*vol ; # Energy lost in core per cycle in J\n", + "P = E2*F; # Power loss in W\n", + "#results\n", + "print \"Power loss (W) = \",P\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 328" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "U = 21.5 x 10^-25 \n" + ] + } + ], + "source": [ + "#pg 328\n", + "#calculate the value of energy \n", + "import math\n", + "#Given :\n", + "mu_d = 9.27*10**-24; # Bhor magneton in Am**2\n", + "mu_0 = 4*math.pi*10**-7; # Magnetic permiability in H/m\n", + "r = 2; # dipoles distance in A\n", + "#U = mu_d*B = -( mu_0*mu_d**2)/(2*pi*r)\n", + "#r = 2*10**-10 m , 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "U = ( mu_0*mu_d**2)/(2*math.pi*(r*10**-10)**3); # Energy \n", + "print \"U =\",round(U*10**25,1),\"x 10^-25 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 329" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Saturation Magnetisation = 3.14 x 10^6 A/m\n" + ] + } + ], + "source": [ + "#pg 329\n", + "#calculate the Saturation magnetisation\n", + "#Given :\n", + "a = 2.87; # lattice constant in A\n", + "mu = 4.; # 4 Bohr magnetons/atom\n", + "# BCC = 2 atoms/unit cell , 1 A = 1.0*10**-10 m\n", + "N = 2./(2.87*10**-10)**3; # atoms/m**3\n", + "#calculations\n", + "#1 Bohr magneton = 9.27*10**-24 Am**2\n", + "Msat = N*mu*9.27*10**-24;# Saturation in magnetisation in A/m\n", + "#results\n", + "print \" Saturation Magnetisation =\",round(Msat*10**-6,2),\"x 10^6 A/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 338" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage = 78.3\n" + ] + } + ], + "source": [ + "#pg 338\n", + "#calculate the percentage attributed to polarisability\n", + "#Given :\n", + "er = 6.75 ; # relative dielectric constant for glass\n", + "f = 10**9 ;# frequency in Hz\n", + "n = 1.5;# refractive index of glass\n", + "e0 = 8.85*10**-12; # dielectric constant in farad/m\n", + "#Pe = e0*(n**2 - 1)*E , Pi = e0*(er - n**2)*E , P = Pi + Pe = e0*(er - 1)*E\n", + "#Percentage = [(e0*(er - n**2)*E)/(e0*(er -1)*E)]*100 , both the E's cancel each other\n", + "#calculations\n", + "per = (e0*(er - n**2))/(e0*(er -1))*100;# percentage\n", + "print \"Percentage = \",round(per,1)\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/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 new file mode 100644 index 00000000..bde406ea --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter10_2.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Dielectric and Magnetic Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 312" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R : 0.6 x 10^-10 m\n" + ] + } + ], + "source": [ + "#pg 312\n", + "#calculate the radius of atom\n", + "#Given:\n", + "import math\n", + "er = 1.0000684; # relative dielectric constant\n", + "N = 2.7*10**25; # atoms/m^3\n", + "#We know, er - 1 = 4*pi*N*R^3\n", + "#calculations\n", + "R = ((er-1)/(4*math.pi*N))**(1./3) ; # in m\n", + "#results\n", + "print\"R :\",round(R*10**10,1),\" x 10^-10 m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 313" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility of diamagnetic materials is -1.0 x 10^-5\n" + ] + } + ], + "source": [ + "#pg 313\n", + "#calculate the Susceptibility \n", + "#Given :\n", + "import math\n", + "R = 1; # radius in A\n", + "N = 5*10**28 ; # atoms/m**3\n", + "mu_0 = 4*math.pi*10**-7; # permeability of free space in H/m\n", + "mu_r = 1;#relative permiability\n", + "m = 9.1*10**-31 # electron mass in kg\n", + "e = 1.6*10**-19 ; # charge of an electron in C\n", + "# R = 1*10**-10 m because 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "chi = -(N*e**2*(R*10**-10)**2*mu_0*mu_r)/(4*m); #Susceptibility of diamagnetic material\n", + "#results\n", + "print \"Susceptibility of diamagnetic materials is\",math.floor(chi*10**5), \"x 10^-5\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 320" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dipole moment (debye) = 0.96\n", + "Sum = 1.6 x 10**-39 farad m^2\n" + ] + } + ], + "source": [ + "#pg 320\n", + "#calculate the dipole moment and Sum\n", + "#Given :\n", + "import math\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "er1 = 1.006715 ; #relative dielectric constant\n", + "er2 = 1.005970;# relative dielectric constant\n", + "T1 = 300. ; # Temperature in K (273+27 = 300 K)\n", + "T2 = 450.; # Temperature in K (273 + 177 = 450 K)\n", + "k = 1.38*10**-23; # in J/K\n", + "N = 2.44*10**25 ; # molecules/m**3\n", + "#calculations\n", + "#e0*(er1 - er2)= ((N*mu_p**2)/(3*k))*((1/T1)- (1/T2))\n", + "mu_p = math.sqrt((e0*(er1 - er2)*3*k)/(((1/T1)-(1/T2))* N)); #dipole moment in C m\n", + "D = 3.3*10**-30; # dipole of 1 Debye is equal to 3.33 x 10**-30 C m \n", + "#e0*(er1 - 1) = N*(alpha_e + alpha_i + (mu_p**2/3*k*T1))\n", + "Sum = ((e0*(er1 - 1))/N) - ((mu_p)**2/(3*k*T1)); # alpha_e + alpha_i in farad m**2\n", + "#results\n", + "print \"Dipole moment (debye) = \",round(mu_p/D,2)\n", + "print \"Sum =\",round(Sum*10**39,1),\"x 10**-39 farad m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " E = 1.55 x 10^7 V/m\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the value of E\n", + "#Given :\n", + "mu_p = 1.2 ;# dipole moment in debye units\n", + "T = 300 ; # Temperature in Kelvin ( 273+27 = 300 K)\n", + "k = 1.38*10**-23 ; # in J/K\n", + "per = 0.5/100 ; # percentage of saturated polarisation\n", + "# 0.05*N*mu_p = (N*(mu_p)**2*E/(3*k*T))\n", + "#calculations\n", + "E = (3*k*T*per)/(mu_p*3.33*10**-30); # External field in V/m\n", + "#results\n", + "print \" E =\",round(E*10**-7,2),\"x 10^7 V/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 321" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Susceptibility = 1.0 x 10**-3\n", + "Result obtained differs from that in textbook, because in textbook only the order is considered\n" + ] + } + ], + "source": [ + "#pg 321\n", + "#calculate the Susceptibility\n", + "import math\n", + "#Given :\n", + "N = 5*10**28 ;# number of dipoles per m**3\n", + "betaa = 1;# Bohr magneton\n", + "T = 300 ; # Room temperature in k\n", + "k = 1.38*10**-23 ; # in J/K\n", + "mu_0 = 4*math.pi*10**-7 ; #Magnetic permeability in H/m\n", + "#calculations\n", + "chi = (N*mu_0*betaa*(1*9.27*10**-24)**2)/(k*T);\n", + "#results\n", + "print \"Susceptibility =\",round(chi*10**3,0),\"x 10**-3\"\n", + "print 'Result obtained differs from that in textbook, because in textbook only the order is considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 324" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Relative dielectric constant = 3.81\n" + ] + } + ], + "source": [ + "#pg 324\n", + "#calculate the Relative dielectric constant\n", + "#Given :\n", + "M = 32.; # Atomic weight in kg/kmole\n", + "Na =6.023*10**26 ; # Avogadro constant in atoms/kmole\n", + "alpha_e = 3.28*10**-40; # electronic polarisability in farad/m**2\n", + "rho = 2.08; #density in gm/cm**3\n", + "e0 = 8.85*10**-12 ; # dielectric constant in farad/m\n", + "# (er - 1)/(er + 2) = (N*alpha_e/3*e0)\n", + "#1 gm = 1.0*10**-3 kg , 1 cm**3 = 1.0*10**-6 m**3\n", + "#calculations\n", + "N = (Na*(rho*10**3))/M; # atoms/m**3\n", + "er =( 2*((N*alpha_e)/(3*e0)) + 1 )/(1 - ((N*alpha_e)/(3*e0)));\n", + "#results\n", + "print \"Relative dielectric constant = \",round(er,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 326" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power loss (W) = 250.0\n" + ] + } + ], + "source": [ + "#pg 326\n", + "#calculate the Power loss\n", + "#Given :\n", + "area = 50000.; # area of hysteresis on a graph\n", + "axis1 = 10**-4 ; # units of scale in Wb/m**2\n", + "axis2 = 10**2; # units of scale in A/m\n", + "vol = 0.01; # volume in m**3\n", + "F = 50; #frequency in Hz\n", + "#calculations\n", + "E1 = area*axis1*axis2; # Energy lost per cycle in J/m**3\n", + "E2 = E1*vol ; # Energy lost in core per cycle in J\n", + "P = E2*F; # Power loss in W\n", + "#results\n", + "print \"Power loss (W) = \",P\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 328" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "U = 21.5 x 10^-25 \n" + ] + } + ], + "source": [ + "#pg 328\n", + "#calculate the value of energy \n", + "import math\n", + "#Given :\n", + "mu_d = 9.27*10**-24; # Bhor magneton in Am**2\n", + "mu_0 = 4*math.pi*10**-7; # Magnetic permiability in H/m\n", + "r = 2; # dipoles distance in A\n", + "#U = mu_d*B = -( mu_0*mu_d**2)/(2*pi*r)\n", + "#r = 2*10**-10 m , 1 A = 1.0*10**-10 m\n", + "#calculations\n", + "U = ( mu_0*mu_d**2)/(2*math.pi*(r*10**-10)**3); # Energy \n", + "print \"U =\",round(U*10**25,1),\"x 10^-25 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 329" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Saturation Magnetisation = 3.14 x 10^6 A/m\n" + ] + } + ], + "source": [ + "#pg 329\n", + "#calculate the Saturation magnetisation\n", + "#Given :\n", + "a = 2.87; # lattice constant in A\n", + "mu = 4.; # 4 Bohr magnetons/atom\n", + "# BCC = 2 atoms/unit cell , 1 A = 1.0*10**-10 m\n", + "N = 2./(2.87*10**-10)**3; # atoms/m**3\n", + "#calculations\n", + "#1 Bohr magneton = 9.27*10**-24 Am**2\n", + "Msat = N*mu*9.27*10**-24;# Saturation in magnetisation in A/m\n", + "#results\n", + "print \" Saturation Magnetisation =\",round(Msat*10**-6,2),\"x 10^6 A/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 338" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage = 78.3\n" + ] + } + ], + "source": [ + "#pg 338\n", + "#calculate the percentage attributed to polarisability\n", + "#Given :\n", + "er = 6.75 ; # relative dielectric constant for glass\n", + "f = 10**9 ;# frequency in Hz\n", + "n = 1.5;# refractive index of glass\n", + "e0 = 8.85*10**-12; # dielectric constant in farad/m\n", + "#Pe = e0*(n**2 - 1)*E , Pi = e0*(er - n**2)*E , P = Pi + Pe = e0*(er - 1)*E\n", + "#Percentage = [(e0*(er - n**2)*E)/(e0*(er -1)*E)]*100 , both the E's cancel each other\n", + "#calculations\n", + "per = (e0*(er - n**2))/(e0*(er -1))*100;# percentage\n", + "print \"Percentage = \",round(per,1)\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11.ipynb new file mode 100755 index 00000000..574c6311 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11.ipynb @@ -0,0 +1,503 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 - Conductors, Semiconductors and Superconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 357" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fermi energy (eV) = 7.06\n" + ] + } + ], + "source": [ + "#pg 357\n", + "#calculate the Fermi energy\n", + "#Given :\n", + "n =8.48*10**28; # number of conduction electrons / m**3\n", + "#calculations\n", + "Ef = 3.65*10**-19*(n**0.6667);#Fermi energy in eV\n", + "#results\n", + "print \"Fermi energy (eV) = \",round(Ef,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 358" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fraction of electrons which are excited are 0.0055 or 0.55 percentage.\n" + ] + } + ], + "source": [ + "#pg 358\n", + "#calculate the Fraction of electrons which are excited\n", + "#Given :\n", + "Ef = 7.04 ; # Ef for copper in eV\n", + "kT = 0.026; # kT value at room temperature in eV\n", + "F = (3/2.)*(0.026/7.04); # Fraction of electrons \n", + "#results\n", + "print \"Fraction of electrons which are excited are\",round(F,4),\"or\",round(F*100,2),\"percentage.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of Ge (ohm m) = 0.446\n", + "Resistivity of Si 2.315 x 10^3 ohm m\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the resistivity of Ge, Si\n", + "#Given :\n", + "ni1 = 2.5*10**19; # per m**3 for Ge\n", + "ni2 = 1.5*10**16; # per m**3 for Si\n", + "mu_e1 = 0.38; # mobility of free electrons for Ge in m**2/Vs\n", + "mu_h1 = 0.18; #mobility of holes for Ge in m**2/Vs\n", + "mu_e2 = 0.13;#mobility of free electrons for Si in m**2/Vs\n", + "mu_h2 = 0.05;#mobility of holes for Si in m**2/Vs\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "sigma1 = ni1*e*(mu_e1 + mu_h1); # intrinsic conductivity in mho m**-1 for Ge\n", + "sigma2 = ni2*e*(mu_e2 + mu_h2);# intrinsic conductivity in mho m**-1 for Si\n", + "rho1 = 1/sigma1; #intrinsic resistivity in ohm m for Ge\n", + "rho2 = 1/sigma2;#intrinsic resistivity in ohm m for Si\n", + "#results\n", + "print \"Resistivity of Ge (ohm m) = \",round(rho1,3)\n", + "print \"Resistivity of Si\",round(rho2*10**-3,3),\"x 10^3 ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " For 30 K , n/N = 7.36 x 10^-61\n", + " For 300 K , n/N = 9.7 x 10^-7\n", + " For 1210 K , n/N = 0.0323\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the vaue of F1, F2, F3\n", + "#Given :\n", + "#Fraction F = n/N\n", + "import math\n", + "from math import exp\n", + "Eg = 0.72; # Energy gap in eV\n", + "k = 0.026/300;# kT value at 300 K , so k = kT/T\n", + "T1 = 30.; # Temperature in K\n", + "T2 = 300.; #Temperature in K\n", + "T3 = 1210.;#Temperature in K\n", + "#Fraction of electrons : n/N = exp(-Eg/2*k*T)\n", + "#calculations\n", + "F1 = exp(-Eg/(2*k*T1));\n", + "F2 = exp(-Eg/(2*k*T2));\n", + "F3 = exp(-Eg/(2*k*T3));\n", + "#results\n", + "print \" For 30 K , n/N =\",round(F1*10**61,2),\" x 10^-61\"\n", + "print \" For 300 K , n/N =\",round(F2*10**7,1),\" x 10^-7\"\n", + "print \" For 1210 K , n/N = \",round(F3,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Germanium , n/N = 9.7 x 10**-7\n", + "For Silicon , n/N = 6.5 x 10**-10\n", + "For diamond, n/N = 1.7 x 10**-47\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the n/N ratio for Germanium, Silicon and diamond\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Eg1= 0.72; #Energy gap for Germanium in eV\n", + "Eg2= 1.10; #Energy gap for Silicon in eV\n", + "Eg3= 5.6; #Energy gap for diamond in eV\n", + "#Fraction of electron : n/N = exp(-Eg/(2*k*T)) , k*T = 0.026 eV\n", + "#calculations\n", + "F1 = exp(-Eg1/(2*0.026)); # For Germanium\n", + "F2 = exp(-Eg2/(2*0.026)); # For Silicon\n", + "F3 = exp(-Eg3/(2*0.026)); # For diamond\n", + "#results\n", + "print \"For Germanium , n/N =\",round(F1*10**7,1),\"x 10**-7\"\n", + "print \"For Silicon , n/N =\",round(F2*10**10,1),\"x 10**-10\"\n", + "print \"For diamond, n/N =\",round(F3*10**47,1),\"x 10**-47\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature (K) = 0.14\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the Temperature\n", + "#Given :\n", + "D = 5*10**28; # density of atoms in silicon per m**3\n", + "C = 2.0*10**8; #donor concentration\n", + "#calculations\n", + "ND = D/C; # donor atoms density per m**3\n", + "# ND = 4.82*10**21*T**(3/2)\n", + "T = (ND/(4.82*10**21))**(2./3.);\n", + "#results\n", + "print \"Temperature (K) = \",round(T,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 372" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nd = 2.8 x 10^24 / m^3\n", + "Nd_plus = 1.13 x 10^24 / m^3\n", + "n = 1.13 x 10^24 / m^3\n", + "p = 9.6 x 10^6 / m^3\n" + ] + } + ], + "source": [ + "#pg 372\n", + "#calculate the Nd and n,p\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Ecd = 0.045; # Ec-Ed in eV\n", + "Ecf = 0.035; # Ec-Ef in eV\n", + "Efd = 0.01;# Ef-Ed in eV\n", + "Ev = 0; # in eV\n", + "Ef = 1.065; # in eV\n", + "me = 9.1*10**-31;# electron mass in kg\n", + "m_e = 0.31*me; # free electron mass\n", + "m_h = 0.38*me;# hole mass\n", + "kT = 0.026; # kT value at room temperature\n", + "h = 6.625*10**-34; # planck's constant in Js\n", + "#calculations\n", + "Nc = 2*((2*math.pi*m_e*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "Nv = 2*((2*math.pi*m_h*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "#(a)\n", + "# Nc*exp[-(Ec-Ef)/kT] = Nd*[1 - 1/(1+ exp[(Ed-Ef)/kT])]\n", + "#Ed - Ef = -(Ef-Ed) = - Efd\n", + "Nd = (Nc*exp(-Ecf/kT))/(1 - (1/(1+exp(-Efd/kT)))); # per m**3\n", + "#(b)\n", + "Nd_plus = Nd*(1 - (1/(1 + exp(-Efd/kT)))); # per m**3\n", + "#(c)\n", + "n = Nc*exp(-Ecf/kT); # per m**3\n", + "#(d)\n", + "p = Nv*exp((Ev-Ef)/kT);# per m**3\n", + "#results\n", + "print \"Nd =\",round(Nd*10**-24,1),\"x 10^24 / m^3\"\n", + "print \"Nd_plus =\",round(Nd_plus*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"n =\",round(n*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"p =\",round(p*10**-6,1),\"x 10^6 / m^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 374" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Major carrier concentration = 1.0 x 10^21 electrons/m^3\n", + "Minor carrier concentration = 2.25 x 10^11 holes/m^3\n", + "Resistivity (ohm m) = 0.046\n" + ] + } + ], + "source": [ + "#pg 374\n", + "#calculate the Major and Minor carrier concentration, resistivity\n", + "#Given :\n", + "ni = 1.5*10**16; # ni for Si in m**-3\n", + "mue = 0.135; # mobility of free electrons in m**2/Vs\n", + "muh = 0.048; # mobility of holes in m**2/Vs\n", + "Nd = 10**21; # phosphorus atoms/m**3\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "#calculations\n", + "#(a) \n", + "n = Nd; # electrons/m**3\n", + "#(b)\n", + "p = ni**2/Nd; # holes/m**3\n", + "#(c)\n", + "sigma = e*(n*mue + p*muh); # conductivity in mho m**-1\n", + "rho = 1/sigma; # resistivity in ohm m\n", + "#results\n", + "print \"Major carrier concentration =\",n*10**-21,\"x 10^21 electrons/m^3\"\n", + "print \"Minor carrier concentration =\",p*10**-11,\"x 10^11 holes/m^3\"\n", + "print \"Resistivity (ohm m) = \",round(rho,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 375" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thus, sigma_473 is 2390.0 times sigma_300\n" + ] + } + ], + "source": [ + "#pg 375\n", + "#Compare the electrical conductivity of silicon 473 and silicon 300 K\n", + "import math\n", + "#Given :\n", + "Eg = 1.1;# Energy gap in eV\n", + "T1 = 300. ;# Temperature in K\n", + "T2 = 473.; # Temperature in K (273+ 200 = 473 K)\n", + "k = 8.62*10**-5 ; # in eV\n", + "#calculations\n", + "# sigma = A*exp(-Eg/(2*k*T))\n", + "#Ratio = sigma_473/sigma_300\n", + "Ratio = math.exp((-Eg/(2*k))*((1/T2)-(1/T1)));\n", + "#results\n", + "print \"Thus, sigma_473 is\",round(Ratio,0),\"times sigma_300\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 387" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength for Ge (A) = 17252.8\n", + "Wavelength for Si (A) = 11292.7\n", + "Wavelength for GaAs (A) = 9410.61\n" + ] + } + ], + "source": [ + "#pg 387\n", + "#calculate the wavelength of Ge, Si and GaAs\n", + "#Given :\n", + "Eg1 = 0.72; # Energy gap for Ge in eV\n", + "Eg2 = 1.1; # Energy gap for Si in eV\n", + "Eg3 = 1.32; # Energy gap for GaAs in eV\n", + "# lambda = c/v = (c*h)/Eg or lambda(A) = 12422/Eg (eV)\n", + "#calculations\n", + "lambda1 = 12422/Eg1; # wavelength in A (Ge)\n", + "lambda2 = 12422/Eg2; # wavelength in A (Si)\n", + "lambda3 = 12422/Eg3; # wavelength in A (GaAs)\n", + "#results\n", + "print \"Wavelength for Ge (A) = \",round(lambda1,1)\n", + "print \"Wavelength for Si (A) = \",round(lambda2,1)\n", + "print \"Wavelength for GaAs (A) = \",round(lambda3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 388" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity increased 26968.0 times\n", + "Result obtained differs from that in textbook, because approximate value for sigma1 was considered.\n" + ] + } + ], + "source": [ + "#pg 388\n", + "#calculate the times conductivity increased\n", + "#Given :\n", + "sigma = 4*10**-4; # conductivity at room temperature in ohm**-1 m**-1\n", + "M = 28.1; # atomic weight in kg/kmole\n", + "d = 2330; # density in kg/m**3\n", + "dop = 10**8 ;# doping per 10**8 silicon atoms\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "mue = 0.135; # mobility of free electrons for silicon in m**2/Vs\n", + "Na = 6.023*10**26 ; # Avagadro's constant in atoms/kmole\n", + "#calculations\n", + "N = (d*Na)/M; #atoms/m**3\n", + "Nd = N/dop; # per m**3\n", + "n = Nd; # electron concentration / m**3\n", + "sigma1 = n*e*mue; # conductivity in ohm**-1 m**-1\n", + "t = sigma1/sigma; # number of times the conductivity increased\n", + "#results\n", + "print \"Conductivity increased\",round(t,0), \"times\"\n", + "print 'Result obtained differs from that in textbook, because approximate value for sigma1 was considered.'\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/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 new file mode 100644 index 00000000..574c6311 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_1.ipynb @@ -0,0 +1,503 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 - Conductors, Semiconductors and Superconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 357" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fermi energy (eV) = 7.06\n" + ] + } + ], + "source": [ + "#pg 357\n", + "#calculate the Fermi energy\n", + "#Given :\n", + "n =8.48*10**28; # number of conduction electrons / m**3\n", + "#calculations\n", + "Ef = 3.65*10**-19*(n**0.6667);#Fermi energy in eV\n", + "#results\n", + "print \"Fermi energy (eV) = \",round(Ef,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 358" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fraction of electrons which are excited are 0.0055 or 0.55 percentage.\n" + ] + } + ], + "source": [ + "#pg 358\n", + "#calculate the Fraction of electrons which are excited\n", + "#Given :\n", + "Ef = 7.04 ; # Ef for copper in eV\n", + "kT = 0.026; # kT value at room temperature in eV\n", + "F = (3/2.)*(0.026/7.04); # Fraction of electrons \n", + "#results\n", + "print \"Fraction of electrons which are excited are\",round(F,4),\"or\",round(F*100,2),\"percentage.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of Ge (ohm m) = 0.446\n", + "Resistivity of Si 2.315 x 10^3 ohm m\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the resistivity of Ge, Si\n", + "#Given :\n", + "ni1 = 2.5*10**19; # per m**3 for Ge\n", + "ni2 = 1.5*10**16; # per m**3 for Si\n", + "mu_e1 = 0.38; # mobility of free electrons for Ge in m**2/Vs\n", + "mu_h1 = 0.18; #mobility of holes for Ge in m**2/Vs\n", + "mu_e2 = 0.13;#mobility of free electrons for Si in m**2/Vs\n", + "mu_h2 = 0.05;#mobility of holes for Si in m**2/Vs\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "sigma1 = ni1*e*(mu_e1 + mu_h1); # intrinsic conductivity in mho m**-1 for Ge\n", + "sigma2 = ni2*e*(mu_e2 + mu_h2);# intrinsic conductivity in mho m**-1 for Si\n", + "rho1 = 1/sigma1; #intrinsic resistivity in ohm m for Ge\n", + "rho2 = 1/sigma2;#intrinsic resistivity in ohm m for Si\n", + "#results\n", + "print \"Resistivity of Ge (ohm m) = \",round(rho1,3)\n", + "print \"Resistivity of Si\",round(rho2*10**-3,3),\"x 10^3 ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " For 30 K , n/N = 7.36 x 10^-61\n", + " For 300 K , n/N = 9.7 x 10^-7\n", + " For 1210 K , n/N = 0.0323\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the vaue of F1, F2, F3\n", + "#Given :\n", + "#Fraction F = n/N\n", + "import math\n", + "from math import exp\n", + "Eg = 0.72; # Energy gap in eV\n", + "k = 0.026/300;# kT value at 300 K , so k = kT/T\n", + "T1 = 30.; # Temperature in K\n", + "T2 = 300.; #Temperature in K\n", + "T3 = 1210.;#Temperature in K\n", + "#Fraction of electrons : n/N = exp(-Eg/2*k*T)\n", + "#calculations\n", + "F1 = exp(-Eg/(2*k*T1));\n", + "F2 = exp(-Eg/(2*k*T2));\n", + "F3 = exp(-Eg/(2*k*T3));\n", + "#results\n", + "print \" For 30 K , n/N =\",round(F1*10**61,2),\" x 10^-61\"\n", + "print \" For 300 K , n/N =\",round(F2*10**7,1),\" x 10^-7\"\n", + "print \" For 1210 K , n/N = \",round(F3,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Germanium , n/N = 9.7 x 10**-7\n", + "For Silicon , n/N = 6.5 x 10**-10\n", + "For diamond, n/N = 1.7 x 10**-47\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the n/N ratio for Germanium, Silicon and diamond\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Eg1= 0.72; #Energy gap for Germanium in eV\n", + "Eg2= 1.10; #Energy gap for Silicon in eV\n", + "Eg3= 5.6; #Energy gap for diamond in eV\n", + "#Fraction of electron : n/N = exp(-Eg/(2*k*T)) , k*T = 0.026 eV\n", + "#calculations\n", + "F1 = exp(-Eg1/(2*0.026)); # For Germanium\n", + "F2 = exp(-Eg2/(2*0.026)); # For Silicon\n", + "F3 = exp(-Eg3/(2*0.026)); # For diamond\n", + "#results\n", + "print \"For Germanium , n/N =\",round(F1*10**7,1),\"x 10**-7\"\n", + "print \"For Silicon , n/N =\",round(F2*10**10,1),\"x 10**-10\"\n", + "print \"For diamond, n/N =\",round(F3*10**47,1),\"x 10**-47\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature (K) = 0.14\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the Temperature\n", + "#Given :\n", + "D = 5*10**28; # density of atoms in silicon per m**3\n", + "C = 2.0*10**8; #donor concentration\n", + "#calculations\n", + "ND = D/C; # donor atoms density per m**3\n", + "# ND = 4.82*10**21*T**(3/2)\n", + "T = (ND/(4.82*10**21))**(2./3.);\n", + "#results\n", + "print \"Temperature (K) = \",round(T,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 372" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nd = 2.8 x 10^24 / m^3\n", + "Nd_plus = 1.13 x 10^24 / m^3\n", + "n = 1.13 x 10^24 / m^3\n", + "p = 9.6 x 10^6 / m^3\n" + ] + } + ], + "source": [ + "#pg 372\n", + "#calculate the Nd and n,p\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Ecd = 0.045; # Ec-Ed in eV\n", + "Ecf = 0.035; # Ec-Ef in eV\n", + "Efd = 0.01;# Ef-Ed in eV\n", + "Ev = 0; # in eV\n", + "Ef = 1.065; # in eV\n", + "me = 9.1*10**-31;# electron mass in kg\n", + "m_e = 0.31*me; # free electron mass\n", + "m_h = 0.38*me;# hole mass\n", + "kT = 0.026; # kT value at room temperature\n", + "h = 6.625*10**-34; # planck's constant in Js\n", + "#calculations\n", + "Nc = 2*((2*math.pi*m_e*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "Nv = 2*((2*math.pi*m_h*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "#(a)\n", + "# Nc*exp[-(Ec-Ef)/kT] = Nd*[1 - 1/(1+ exp[(Ed-Ef)/kT])]\n", + "#Ed - Ef = -(Ef-Ed) = - Efd\n", + "Nd = (Nc*exp(-Ecf/kT))/(1 - (1/(1+exp(-Efd/kT)))); # per m**3\n", + "#(b)\n", + "Nd_plus = Nd*(1 - (1/(1 + exp(-Efd/kT)))); # per m**3\n", + "#(c)\n", + "n = Nc*exp(-Ecf/kT); # per m**3\n", + "#(d)\n", + "p = Nv*exp((Ev-Ef)/kT);# per m**3\n", + "#results\n", + "print \"Nd =\",round(Nd*10**-24,1),\"x 10^24 / m^3\"\n", + "print \"Nd_plus =\",round(Nd_plus*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"n =\",round(n*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"p =\",round(p*10**-6,1),\"x 10^6 / m^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 374" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Major carrier concentration = 1.0 x 10^21 electrons/m^3\n", + "Minor carrier concentration = 2.25 x 10^11 holes/m^3\n", + "Resistivity (ohm m) = 0.046\n" + ] + } + ], + "source": [ + "#pg 374\n", + "#calculate the Major and Minor carrier concentration, resistivity\n", + "#Given :\n", + "ni = 1.5*10**16; # ni for Si in m**-3\n", + "mue = 0.135; # mobility of free electrons in m**2/Vs\n", + "muh = 0.048; # mobility of holes in m**2/Vs\n", + "Nd = 10**21; # phosphorus atoms/m**3\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "#calculations\n", + "#(a) \n", + "n = Nd; # electrons/m**3\n", + "#(b)\n", + "p = ni**2/Nd; # holes/m**3\n", + "#(c)\n", + "sigma = e*(n*mue + p*muh); # conductivity in mho m**-1\n", + "rho = 1/sigma; # resistivity in ohm m\n", + "#results\n", + "print \"Major carrier concentration =\",n*10**-21,\"x 10^21 electrons/m^3\"\n", + "print \"Minor carrier concentration =\",p*10**-11,\"x 10^11 holes/m^3\"\n", + "print \"Resistivity (ohm m) = \",round(rho,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 375" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thus, sigma_473 is 2390.0 times sigma_300\n" + ] + } + ], + "source": [ + "#pg 375\n", + "#Compare the electrical conductivity of silicon 473 and silicon 300 K\n", + "import math\n", + "#Given :\n", + "Eg = 1.1;# Energy gap in eV\n", + "T1 = 300. ;# Temperature in K\n", + "T2 = 473.; # Temperature in K (273+ 200 = 473 K)\n", + "k = 8.62*10**-5 ; # in eV\n", + "#calculations\n", + "# sigma = A*exp(-Eg/(2*k*T))\n", + "#Ratio = sigma_473/sigma_300\n", + "Ratio = math.exp((-Eg/(2*k))*((1/T2)-(1/T1)));\n", + "#results\n", + "print \"Thus, sigma_473 is\",round(Ratio,0),\"times sigma_300\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 387" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength for Ge (A) = 17252.8\n", + "Wavelength for Si (A) = 11292.7\n", + "Wavelength for GaAs (A) = 9410.61\n" + ] + } + ], + "source": [ + "#pg 387\n", + "#calculate the wavelength of Ge, Si and GaAs\n", + "#Given :\n", + "Eg1 = 0.72; # Energy gap for Ge in eV\n", + "Eg2 = 1.1; # Energy gap for Si in eV\n", + "Eg3 = 1.32; # Energy gap for GaAs in eV\n", + "# lambda = c/v = (c*h)/Eg or lambda(A) = 12422/Eg (eV)\n", + "#calculations\n", + "lambda1 = 12422/Eg1; # wavelength in A (Ge)\n", + "lambda2 = 12422/Eg2; # wavelength in A (Si)\n", + "lambda3 = 12422/Eg3; # wavelength in A (GaAs)\n", + "#results\n", + "print \"Wavelength for Ge (A) = \",round(lambda1,1)\n", + "print \"Wavelength for Si (A) = \",round(lambda2,1)\n", + "print \"Wavelength for GaAs (A) = \",round(lambda3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 388" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity increased 26968.0 times\n", + "Result obtained differs from that in textbook, because approximate value for sigma1 was considered.\n" + ] + } + ], + "source": [ + "#pg 388\n", + "#calculate the times conductivity increased\n", + "#Given :\n", + "sigma = 4*10**-4; # conductivity at room temperature in ohm**-1 m**-1\n", + "M = 28.1; # atomic weight in kg/kmole\n", + "d = 2330; # density in kg/m**3\n", + "dop = 10**8 ;# doping per 10**8 silicon atoms\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "mue = 0.135; # mobility of free electrons for silicon in m**2/Vs\n", + "Na = 6.023*10**26 ; # Avagadro's constant in atoms/kmole\n", + "#calculations\n", + "N = (d*Na)/M; #atoms/m**3\n", + "Nd = N/dop; # per m**3\n", + "n = Nd; # electron concentration / m**3\n", + "sigma1 = n*e*mue; # conductivity in ohm**-1 m**-1\n", + "t = sigma1/sigma; # number of times the conductivity increased\n", + "#results\n", + "print \"Conductivity increased\",round(t,0), \"times\"\n", + "print 'Result obtained differs from that in textbook, because approximate value for sigma1 was considered.'\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/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 new file mode 100644 index 00000000..574c6311 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter11_2.ipynb @@ -0,0 +1,503 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 - Conductors, Semiconductors and Superconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 357" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fermi energy (eV) = 7.06\n" + ] + } + ], + "source": [ + "#pg 357\n", + "#calculate the Fermi energy\n", + "#Given :\n", + "n =8.48*10**28; # number of conduction electrons / m**3\n", + "#calculations\n", + "Ef = 3.65*10**-19*(n**0.6667);#Fermi energy in eV\n", + "#results\n", + "print \"Fermi energy (eV) = \",round(Ef,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 358" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fraction of electrons which are excited are 0.0055 or 0.55 percentage.\n" + ] + } + ], + "source": [ + "#pg 358\n", + "#calculate the Fraction of electrons which are excited\n", + "#Given :\n", + "Ef = 7.04 ; # Ef for copper in eV\n", + "kT = 0.026; # kT value at room temperature in eV\n", + "F = (3/2.)*(0.026/7.04); # Fraction of electrons \n", + "#results\n", + "print \"Fraction of electrons which are excited are\",round(F,4),\"or\",round(F*100,2),\"percentage.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of Ge (ohm m) = 0.446\n", + "Resistivity of Si 2.315 x 10^3 ohm m\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the resistivity of Ge, Si\n", + "#Given :\n", + "ni1 = 2.5*10**19; # per m**3 for Ge\n", + "ni2 = 1.5*10**16; # per m**3 for Si\n", + "mu_e1 = 0.38; # mobility of free electrons for Ge in m**2/Vs\n", + "mu_h1 = 0.18; #mobility of holes for Ge in m**2/Vs\n", + "mu_e2 = 0.13;#mobility of free electrons for Si in m**2/Vs\n", + "mu_h2 = 0.05;#mobility of holes for Si in m**2/Vs\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "sigma1 = ni1*e*(mu_e1 + mu_h1); # intrinsic conductivity in mho m**-1 for Ge\n", + "sigma2 = ni2*e*(mu_e2 + mu_h2);# intrinsic conductivity in mho m**-1 for Si\n", + "rho1 = 1/sigma1; #intrinsic resistivity in ohm m for Ge\n", + "rho2 = 1/sigma2;#intrinsic resistivity in ohm m for Si\n", + "#results\n", + "print \"Resistivity of Ge (ohm m) = \",round(rho1,3)\n", + "print \"Resistivity of Si\",round(rho2*10**-3,3),\"x 10^3 ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 370" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " For 30 K , n/N = 7.36 x 10^-61\n", + " For 300 K , n/N = 9.7 x 10^-7\n", + " For 1210 K , n/N = 0.0323\n" + ] + } + ], + "source": [ + "#pg 370\n", + "#calculate the vaue of F1, F2, F3\n", + "#Given :\n", + "#Fraction F = n/N\n", + "import math\n", + "from math import exp\n", + "Eg = 0.72; # Energy gap in eV\n", + "k = 0.026/300;# kT value at 300 K , so k = kT/T\n", + "T1 = 30.; # Temperature in K\n", + "T2 = 300.; #Temperature in K\n", + "T3 = 1210.;#Temperature in K\n", + "#Fraction of electrons : n/N = exp(-Eg/2*k*T)\n", + "#calculations\n", + "F1 = exp(-Eg/(2*k*T1));\n", + "F2 = exp(-Eg/(2*k*T2));\n", + "F3 = exp(-Eg/(2*k*T3));\n", + "#results\n", + "print \" For 30 K , n/N =\",round(F1*10**61,2),\" x 10^-61\"\n", + "print \" For 300 K , n/N =\",round(F2*10**7,1),\" x 10^-7\"\n", + "print \" For 1210 K , n/N = \",round(F3,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Germanium , n/N = 9.7 x 10**-7\n", + "For Silicon , n/N = 6.5 x 10**-10\n", + "For diamond, n/N = 1.7 x 10**-47\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the n/N ratio for Germanium, Silicon and diamond\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Eg1= 0.72; #Energy gap for Germanium in eV\n", + "Eg2= 1.10; #Energy gap for Silicon in eV\n", + "Eg3= 5.6; #Energy gap for diamond in eV\n", + "#Fraction of electron : n/N = exp(-Eg/(2*k*T)) , k*T = 0.026 eV\n", + "#calculations\n", + "F1 = exp(-Eg1/(2*0.026)); # For Germanium\n", + "F2 = exp(-Eg2/(2*0.026)); # For Silicon\n", + "F3 = exp(-Eg3/(2*0.026)); # For diamond\n", + "#results\n", + "print \"For Germanium , n/N =\",round(F1*10**7,1),\"x 10**-7\"\n", + "print \"For Silicon , n/N =\",round(F2*10**10,1),\"x 10**-10\"\n", + "print \"For diamond, n/N =\",round(F3*10**47,1),\"x 10**-47\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 371" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature (K) = 0.14\n" + ] + } + ], + "source": [ + "#pg 371\n", + "#calculate the Temperature\n", + "#Given :\n", + "D = 5*10**28; # density of atoms in silicon per m**3\n", + "C = 2.0*10**8; #donor concentration\n", + "#calculations\n", + "ND = D/C; # donor atoms density per m**3\n", + "# ND = 4.82*10**21*T**(3/2)\n", + "T = (ND/(4.82*10**21))**(2./3.);\n", + "#results\n", + "print \"Temperature (K) = \",round(T,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 372" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nd = 2.8 x 10^24 / m^3\n", + "Nd_plus = 1.13 x 10^24 / m^3\n", + "n = 1.13 x 10^24 / m^3\n", + "p = 9.6 x 10^6 / m^3\n" + ] + } + ], + "source": [ + "#pg 372\n", + "#calculate the Nd and n,p\n", + "#Given :\n", + "import math\n", + "from math import exp\n", + "Ecd = 0.045; # Ec-Ed in eV\n", + "Ecf = 0.035; # Ec-Ef in eV\n", + "Efd = 0.01;# Ef-Ed in eV\n", + "Ev = 0; # in eV\n", + "Ef = 1.065; # in eV\n", + "me = 9.1*10**-31;# electron mass in kg\n", + "m_e = 0.31*me; # free electron mass\n", + "m_h = 0.38*me;# hole mass\n", + "kT = 0.026; # kT value at room temperature\n", + "h = 6.625*10**-34; # planck's constant in Js\n", + "#calculations\n", + "Nc = 2*((2*math.pi*m_e*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "Nv = 2*((2*math.pi*m_h*kT*1.6*10**-19)/(h**2))**(3/2.); # per m**3\n", + "#(a)\n", + "# Nc*exp[-(Ec-Ef)/kT] = Nd*[1 - 1/(1+ exp[(Ed-Ef)/kT])]\n", + "#Ed - Ef = -(Ef-Ed) = - Efd\n", + "Nd = (Nc*exp(-Ecf/kT))/(1 - (1/(1+exp(-Efd/kT)))); # per m**3\n", + "#(b)\n", + "Nd_plus = Nd*(1 - (1/(1 + exp(-Efd/kT)))); # per m**3\n", + "#(c)\n", + "n = Nc*exp(-Ecf/kT); # per m**3\n", + "#(d)\n", + "p = Nv*exp((Ev-Ef)/kT);# per m**3\n", + "#results\n", + "print \"Nd =\",round(Nd*10**-24,1),\"x 10^24 / m^3\"\n", + "print \"Nd_plus =\",round(Nd_plus*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"n =\",round(n*10**-24,2),\"x 10^24 / m^3\"\n", + "print \"p =\",round(p*10**-6,1),\"x 10^6 / m^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 374" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Major carrier concentration = 1.0 x 10^21 electrons/m^3\n", + "Minor carrier concentration = 2.25 x 10^11 holes/m^3\n", + "Resistivity (ohm m) = 0.046\n" + ] + } + ], + "source": [ + "#pg 374\n", + "#calculate the Major and Minor carrier concentration, resistivity\n", + "#Given :\n", + "ni = 1.5*10**16; # ni for Si in m**-3\n", + "mue = 0.135; # mobility of free electrons in m**2/Vs\n", + "muh = 0.048; # mobility of holes in m**2/Vs\n", + "Nd = 10**21; # phosphorus atoms/m**3\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "#calculations\n", + "#(a) \n", + "n = Nd; # electrons/m**3\n", + "#(b)\n", + "p = ni**2/Nd; # holes/m**3\n", + "#(c)\n", + "sigma = e*(n*mue + p*muh); # conductivity in mho m**-1\n", + "rho = 1/sigma; # resistivity in ohm m\n", + "#results\n", + "print \"Major carrier concentration =\",n*10**-21,\"x 10^21 electrons/m^3\"\n", + "print \"Minor carrier concentration =\",p*10**-11,\"x 10^11 holes/m^3\"\n", + "print \"Resistivity (ohm m) = \",round(rho,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 375" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thus, sigma_473 is 2390.0 times sigma_300\n" + ] + } + ], + "source": [ + "#pg 375\n", + "#Compare the electrical conductivity of silicon 473 and silicon 300 K\n", + "import math\n", + "#Given :\n", + "Eg = 1.1;# Energy gap in eV\n", + "T1 = 300. ;# Temperature in K\n", + "T2 = 473.; # Temperature in K (273+ 200 = 473 K)\n", + "k = 8.62*10**-5 ; # in eV\n", + "#calculations\n", + "# sigma = A*exp(-Eg/(2*k*T))\n", + "#Ratio = sigma_473/sigma_300\n", + "Ratio = math.exp((-Eg/(2*k))*((1/T2)-(1/T1)));\n", + "#results\n", + "print \"Thus, sigma_473 is\",round(Ratio,0),\"times sigma_300\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 387" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength for Ge (A) = 17252.8\n", + "Wavelength for Si (A) = 11292.7\n", + "Wavelength for GaAs (A) = 9410.61\n" + ] + } + ], + "source": [ + "#pg 387\n", + "#calculate the wavelength of Ge, Si and GaAs\n", + "#Given :\n", + "Eg1 = 0.72; # Energy gap for Ge in eV\n", + "Eg2 = 1.1; # Energy gap for Si in eV\n", + "Eg3 = 1.32; # Energy gap for GaAs in eV\n", + "# lambda = c/v = (c*h)/Eg or lambda(A) = 12422/Eg (eV)\n", + "#calculations\n", + "lambda1 = 12422/Eg1; # wavelength in A (Ge)\n", + "lambda2 = 12422/Eg2; # wavelength in A (Si)\n", + "lambda3 = 12422/Eg3; # wavelength in A (GaAs)\n", + "#results\n", + "print \"Wavelength for Ge (A) = \",round(lambda1,1)\n", + "print \"Wavelength for Si (A) = \",round(lambda2,1)\n", + "print \"Wavelength for GaAs (A) = \",round(lambda3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 388" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity increased 26968.0 times\n", + "Result obtained differs from that in textbook, because approximate value for sigma1 was considered.\n" + ] + } + ], + "source": [ + "#pg 388\n", + "#calculate the times conductivity increased\n", + "#Given :\n", + "sigma = 4*10**-4; # conductivity at room temperature in ohm**-1 m**-1\n", + "M = 28.1; # atomic weight in kg/kmole\n", + "d = 2330; # density in kg/m**3\n", + "dop = 10**8 ;# doping per 10**8 silicon atoms\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "mue = 0.135; # mobility of free electrons for silicon in m**2/Vs\n", + "Na = 6.023*10**26 ; # Avagadro's constant in atoms/kmole\n", + "#calculations\n", + "N = (d*Na)/M; #atoms/m**3\n", + "Nd = N/dop; # per m**3\n", + "n = Nd; # electron concentration / m**3\n", + "sigma1 = n*e*mue; # conductivity in ohm**-1 m**-1\n", + "t = sigma1/sigma; # number of times the conductivity increased\n", + "#results\n", + "print \"Conductivity increased\",round(t,0), \"times\"\n", + "print 'Result obtained differs from that in textbook, because approximate value for sigma1 was considered.'\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12.ipynb new file mode 100755 index 00000000..025145ab --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12.ipynb @@ -0,0 +1,244 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 - Diodes and Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 395" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V0 (V) = 0.36\n" + ] + } + ], + "source": [ + "#pg 395\n", + "#calculate the voltage\n", + "#Given:\n", + "import math\n", + "sigma_n = 10**4; #conductivity in mho/m\n", + "sigma_p = 10**2; # conductivity in mho/m\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "kT = 0.026 ;# k*T value at room temperature in eV\n", + "ni = 2.5*10**19; # per m**3\n", + "mue = 0.38; # mobility of free electrons in m**2/Vs\n", + "muh = 0.18;# mobility of free electrons in m**2/Vs\n", + "# sigma_n = e*n*mue and sigma_p = e*p*muh\n", + "#calculations\n", + "nn0 = sigma_n/(e*mue); # per m**3\n", + "pp0 = sigma_p/(e*muh);# per m**3\n", + "np0 =(ni**2)/pp0; # in m**-3\n", + "# V0 = (kT/e)*log(nn0/np0) , but we consider only kT because kT/e = 0.026 eV/e , both the e's cancel each other.Finally we obtain the answer in Volts\n", + "V0 = (kT)*math.log(nn0/np0); # in V\n", + "#results\n", + "print \"V0 (V) = \",round(V0,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 396" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) np = 47.0 x np0\n", + "(b) np = 1.98 x 10^-17 x np0\n" + ] + } + ], + "source": [ + "### pg 396\n", + "#calculate the np \n", + "#Given :\n", + "import math\n", + "#(a)Forward bias of 0.1 V\n", + "# np = np0*exp[eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "kT = 0.026; # in eV\n", + "#calculations and results\n", + "np = math.exp(0.1/kT); \n", + "print \"(a) np =\",round(np,0),\"x np0\"\n", + "#(b)Reverse bias of 1 V\n", + "# np = np0*exp[-eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "np1 = math.exp(-1/kT);\n", + "print \"(b) np =\",round(np1*10**17,2),\"x 10^-17 x np0\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 398" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current (muA) = 4.58\n" + ] + } + ], + "source": [ + "#pg 398\n", + "#calculate the Current\n", + "#import math\n", + "#Given :\n", + "import math\n", + "I0 = 0.1; # muA\n", + "kT = 0.026; # kT value at room temperature\n", + "#calculations\n", + "#Forward bias of 0.1 V\n", + "# I = I0[exp(eV/kT) - 1]\n", + "# since I = I0*(exp(0.1 eV/kT (eV))), both the eV's cancel each other , so it is only I = I0*(exp(0.1/kT) - 1) while evaluating.\n", + "I = I0*(math.exp(0.1/kT) - 1) # in muA\n", + "#results\n", + "print \"Current (muA) = \",round(I,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 420" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input voltage = 41 V , Iz (mA) = 4.0\n", + "Load resistance = 4k ohm , Iz (mA) = 4.5\n" + ] + } + ], + "source": [ + "#pg 420\n", + "#calculate the Input voltage and load resistance\n", + "#Given :\n", + "Vin = 36.; # Input Voltage in V\n", + "Vb = 6.; # Zerner Breakdown Voltage in V\n", + "R = 5.*10**3; # resistance in ohm\n", + "Rl = 2.*10**3; # load resistance in ohm\n", + "#calculations\n", + "Vr = Vin-Vb; # Volatge drop across resistor\n", + "I = Vr/R; # current in A\n", + "Il = Vb/Rl; # current in A\n", + "Iz = I - Il ;# current in A\n", + "#(a)\n", + "Vin1 = 41; # Input Voltage in V\n", + "I1 = (Vin1-Vb)/R; # current in A\n", + "Iz1 = I1-Iz; # current in A\n", + "#(b)\n", + "Rl1 = 4*10**3; #load resistance in ohm\n", + "Il1 = Vb/Rl1; # current in A\n", + "Iz2 = I - Il1; # current in A\n", + "#results\n", + "print \"Input voltage = 41 V , Iz (mA) = \",Iz1*10**3\n", + "print \"Load resistance = 4k ohm , Iz (mA) = \",Iz2*10**3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 430" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain = 997.5\n" + ] + } + ], + "source": [ + "#pg 430\n", + "#calculate the Voltage gain\n", + "#Given :\n", + "deltaIE = 2.; # in mA\n", + "deltaIB = 5.; # in mA\n", + "Rl = 200.*10**3; # load resistance in ohm\n", + "ri = 200.; # input resistance in ohm\n", + "# IE= IB + IC , 1 muA = 1.0*10**-3 mA\n", + "#calculations\n", + "deltaIC = deltaIE - deltaIB*10**-3 ;# in mA\n", + "alpha = deltaIC/deltaIE; \n", + "A = alpha*(Rl/ri);\n", + "#results\n", + "print \"Voltage gain = \",A\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/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 new file mode 100644 index 00000000..025145ab --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_1.ipynb @@ -0,0 +1,244 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 - Diodes and Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 395" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V0 (V) = 0.36\n" + ] + } + ], + "source": [ + "#pg 395\n", + "#calculate the voltage\n", + "#Given:\n", + "import math\n", + "sigma_n = 10**4; #conductivity in mho/m\n", + "sigma_p = 10**2; # conductivity in mho/m\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "kT = 0.026 ;# k*T value at room temperature in eV\n", + "ni = 2.5*10**19; # per m**3\n", + "mue = 0.38; # mobility of free electrons in m**2/Vs\n", + "muh = 0.18;# mobility of free electrons in m**2/Vs\n", + "# sigma_n = e*n*mue and sigma_p = e*p*muh\n", + "#calculations\n", + "nn0 = sigma_n/(e*mue); # per m**3\n", + "pp0 = sigma_p/(e*muh);# per m**3\n", + "np0 =(ni**2)/pp0; # in m**-3\n", + "# V0 = (kT/e)*log(nn0/np0) , but we consider only kT because kT/e = 0.026 eV/e , both the e's cancel each other.Finally we obtain the answer in Volts\n", + "V0 = (kT)*math.log(nn0/np0); # in V\n", + "#results\n", + "print \"V0 (V) = \",round(V0,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 396" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) np = 47.0 x np0\n", + "(b) np = 1.98 x 10^-17 x np0\n" + ] + } + ], + "source": [ + "### pg 396\n", + "#calculate the np \n", + "#Given :\n", + "import math\n", + "#(a)Forward bias of 0.1 V\n", + "# np = np0*exp[eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "kT = 0.026; # in eV\n", + "#calculations and results\n", + "np = math.exp(0.1/kT); \n", + "print \"(a) np =\",round(np,0),\"x np0\"\n", + "#(b)Reverse bias of 1 V\n", + "# np = np0*exp[-eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "np1 = math.exp(-1/kT);\n", + "print \"(b) np =\",round(np1*10**17,2),\"x 10^-17 x np0\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 398" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current (muA) = 4.58\n" + ] + } + ], + "source": [ + "#pg 398\n", + "#calculate the Current\n", + "#import math\n", + "#Given :\n", + "import math\n", + "I0 = 0.1; # muA\n", + "kT = 0.026; # kT value at room temperature\n", + "#calculations\n", + "#Forward bias of 0.1 V\n", + "# I = I0[exp(eV/kT) - 1]\n", + "# since I = I0*(exp(0.1 eV/kT (eV))), both the eV's cancel each other , so it is only I = I0*(exp(0.1/kT) - 1) while evaluating.\n", + "I = I0*(math.exp(0.1/kT) - 1) # in muA\n", + "#results\n", + "print \"Current (muA) = \",round(I,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 420" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input voltage = 41 V , Iz (mA) = 4.0\n", + "Load resistance = 4k ohm , Iz (mA) = 4.5\n" + ] + } + ], + "source": [ + "#pg 420\n", + "#calculate the Input voltage and load resistance\n", + "#Given :\n", + "Vin = 36.; # Input Voltage in V\n", + "Vb = 6.; # Zerner Breakdown Voltage in V\n", + "R = 5.*10**3; # resistance in ohm\n", + "Rl = 2.*10**3; # load resistance in ohm\n", + "#calculations\n", + "Vr = Vin-Vb; # Volatge drop across resistor\n", + "I = Vr/R; # current in A\n", + "Il = Vb/Rl; # current in A\n", + "Iz = I - Il ;# current in A\n", + "#(a)\n", + "Vin1 = 41; # Input Voltage in V\n", + "I1 = (Vin1-Vb)/R; # current in A\n", + "Iz1 = I1-Iz; # current in A\n", + "#(b)\n", + "Rl1 = 4*10**3; #load resistance in ohm\n", + "Il1 = Vb/Rl1; # current in A\n", + "Iz2 = I - Il1; # current in A\n", + "#results\n", + "print \"Input voltage = 41 V , Iz (mA) = \",Iz1*10**3\n", + "print \"Load resistance = 4k ohm , Iz (mA) = \",Iz2*10**3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 430" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain = 997.5\n" + ] + } + ], + "source": [ + "#pg 430\n", + "#calculate the Voltage gain\n", + "#Given :\n", + "deltaIE = 2.; # in mA\n", + "deltaIB = 5.; # in mA\n", + "Rl = 200.*10**3; # load resistance in ohm\n", + "ri = 200.; # input resistance in ohm\n", + "# IE= IB + IC , 1 muA = 1.0*10**-3 mA\n", + "#calculations\n", + "deltaIC = deltaIE - deltaIB*10**-3 ;# in mA\n", + "alpha = deltaIC/deltaIE; \n", + "A = alpha*(Rl/ri);\n", + "#results\n", + "print \"Voltage gain = \",A\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/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 new file mode 100644 index 00000000..025145ab --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter12_2.ipynb @@ -0,0 +1,244 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 - Diodes and Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 395" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V0 (V) = 0.36\n" + ] + } + ], + "source": [ + "#pg 395\n", + "#calculate the voltage\n", + "#Given:\n", + "import math\n", + "sigma_n = 10**4; #conductivity in mho/m\n", + "sigma_p = 10**2; # conductivity in mho/m\n", + "e = 1.6*10**-19;# charge of an electron in C\n", + "kT = 0.026 ;# k*T value at room temperature in eV\n", + "ni = 2.5*10**19; # per m**3\n", + "mue = 0.38; # mobility of free electrons in m**2/Vs\n", + "muh = 0.18;# mobility of free electrons in m**2/Vs\n", + "# sigma_n = e*n*mue and sigma_p = e*p*muh\n", + "#calculations\n", + "nn0 = sigma_n/(e*mue); # per m**3\n", + "pp0 = sigma_p/(e*muh);# per m**3\n", + "np0 =(ni**2)/pp0; # in m**-3\n", + "# V0 = (kT/e)*log(nn0/np0) , but we consider only kT because kT/e = 0.026 eV/e , both the e's cancel each other.Finally we obtain the answer in Volts\n", + "V0 = (kT)*math.log(nn0/np0); # in V\n", + "#results\n", + "print \"V0 (V) = \",round(V0,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 396" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) np = 47.0 x np0\n", + "(b) np = 1.98 x 10^-17 x np0\n" + ] + } + ], + "source": [ + "### pg 396\n", + "#calculate the np \n", + "#Given :\n", + "import math\n", + "#(a)Forward bias of 0.1 V\n", + "# np = np0*exp[eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "kT = 0.026; # in eV\n", + "#calculations and results\n", + "np = math.exp(0.1/kT); \n", + "print \"(a) np =\",round(np,0),\"x np0\"\n", + "#(b)Reverse bias of 1 V\n", + "# np = np0*exp[-eV/kT] , here we dont have np0 value, so we will calculate the remaining part.\n", + "np1 = math.exp(-1/kT);\n", + "print \"(b) np =\",round(np1*10**17,2),\"x 10^-17 x np0\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 398" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current (muA) = 4.58\n" + ] + } + ], + "source": [ + "#pg 398\n", + "#calculate the Current\n", + "#import math\n", + "#Given :\n", + "import math\n", + "I0 = 0.1; # muA\n", + "kT = 0.026; # kT value at room temperature\n", + "#calculations\n", + "#Forward bias of 0.1 V\n", + "# I = I0[exp(eV/kT) - 1]\n", + "# since I = I0*(exp(0.1 eV/kT (eV))), both the eV's cancel each other , so it is only I = I0*(exp(0.1/kT) - 1) while evaluating.\n", + "I = I0*(math.exp(0.1/kT) - 1) # in muA\n", + "#results\n", + "print \"Current (muA) = \",round(I,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 420" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input voltage = 41 V , Iz (mA) = 4.0\n", + "Load resistance = 4k ohm , Iz (mA) = 4.5\n" + ] + } + ], + "source": [ + "#pg 420\n", + "#calculate the Input voltage and load resistance\n", + "#Given :\n", + "Vin = 36.; # Input Voltage in V\n", + "Vb = 6.; # Zerner Breakdown Voltage in V\n", + "R = 5.*10**3; # resistance in ohm\n", + "Rl = 2.*10**3; # load resistance in ohm\n", + "#calculations\n", + "Vr = Vin-Vb; # Volatge drop across resistor\n", + "I = Vr/R; # current in A\n", + "Il = Vb/Rl; # current in A\n", + "Iz = I - Il ;# current in A\n", + "#(a)\n", + "Vin1 = 41; # Input Voltage in V\n", + "I1 = (Vin1-Vb)/R; # current in A\n", + "Iz1 = I1-Iz; # current in A\n", + "#(b)\n", + "Rl1 = 4*10**3; #load resistance in ohm\n", + "Il1 = Vb/Rl1; # current in A\n", + "Iz2 = I - Il1; # current in A\n", + "#results\n", + "print \"Input voltage = 41 V , Iz (mA) = \",Iz1*10**3\n", + "print \"Load resistance = 4k ohm , Iz (mA) = \",Iz2*10**3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 430" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain = 997.5\n" + ] + } + ], + "source": [ + "#pg 430\n", + "#calculate the Voltage gain\n", + "#Given :\n", + "deltaIE = 2.; # in mA\n", + "deltaIB = 5.; # in mA\n", + "Rl = 200.*10**3; # load resistance in ohm\n", + "ri = 200.; # input resistance in ohm\n", + "# IE= IB + IC , 1 muA = 1.0*10**-3 mA\n", + "#calculations\n", + "deltaIC = deltaIE - deltaIB*10**-3 ;# in mA\n", + "alpha = deltaIC/deltaIE; \n", + "A = alpha*(Rl/ri);\n", + "#results\n", + "print \"Voltage gain = \",A\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13.ipynb new file mode 100755 index 00000000..fcba3e05 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13.ipynb @@ -0,0 +1,347 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 - Charged Particles in Electric and Magnetic Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 434" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v_x = 4.4 x 10^5 m/s\n", + "x = 7.33 mm\n", + "t = 0.95 x 10^-7 s\n" + ] + } + ], + "source": [ + "#pg 434\n", + "#calculate the x,t\n", + "#Given :\n", + "import scipy.integrate\n", + "# E = 2*10^9*t V/m\n", + "# a_x = 3.52*10^20*t m/s^2\n", + "# v_x = integral of a_x dt\n", + "#(a)\n", + "#calculations and results\n", + "def f(t):\n", + "\ta_x = 3.530*10**20*t\n", + "\treturn a_x\n", + "\n", + "v_x = scipy.integrate.quad(f,0,50*10**-9); # electron speed in m/s at time = 50 ns\n", + "print \"v_x =\",round(v_x[0]*10**-5,1),\"x 10^5 m/s\"\n", + "#(b)\n", + "#v_x = 1.76*10^20*t^2 m/s\n", + "def v(t):\n", + "\tvx=1.76*10**20*t**2\n", + "\treturn vx\n", + "\n", + "x =scipy.integrate.quad(v,0,50*10**-9);# distance covered in m in 50 ns\n", + "print \"x =\",round(x[0]*10**3,2),\"mm\"\n", + "#(c)\n", + "#x = 5.87*10^19*t^3 m\n", + "X = 5*10**-2; #distance between plates in m\n", + "t = (X/(5.87*10**19))**(1./3); # time required in s\n", + "print \"t =\",round(t*10**7,2),\"x 10^-7 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 445" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "z_max (mm) = 1.2\n", + "T = 1.63 x 10^-8 s \n", + "H = 6.7 mm\n" + ] + } + ], + "source": [ + "#pg 445\n", + "#calculate the z-max, T and H\n", + "import math\n", + "#Given :\n", + "u = 5*10**5; #horizontal velocity in m/s\n", + "alpha = 35/57.3; # in radians\n", + "E = 200 ;# Electric field in V/m\n", + "e = 1.6*10**-19; # electron charge in C\n", + "m = 9.12*10**-31; # electron mass in kg\n", + "#calculations\n", + "a = (-e*E)/m; # horizontal range in m/s**2\n", + "#(a);\n", + "z_max = (-(u**2)*(math.sin(alpha))**2)/(2*a); # maximum penetration in m\n", + "#(b)\n", + "T = (-2*u*math.sin(alpha))/a; # Time of flight in s\n", + "#(c)\n", + "H = (-(u**2)*(math.sin(2*alpha)))/a; # horizontal range in m\n", + "#results\n", + "print \"z_max (mm) = \",round(z_max*10**3,1)\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s \"\n", + "print \"H =\",round(H*1000.,1),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 448" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B = 0.57 x 10^-3 Wb/m**2\n", + "T = 6.28 x 10^-8 s\n", + "p (m) = 2.72\n" + ] + } + ], + "source": [ + "#pg 448\n", + "#calculate the values of B,T and P\n", + "#Given :\n", + "import math\n", + "m = 9.12*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19;# electron charge in C\n", + "u = 5*10**7; # electron speed in m/s\n", + "alpha = 30/57.3; # angle in radians\n", + "d = 0.5; # diameter in m\n", + "#calculations\n", + "#(a)\n", + "#helix radius = (m*u*sin(alpha))/B*e \n", + "r = d/2; # radius in m\n", + "B = (m*u*math.sin(alpha))/(r*e); # magnetic flux density in Wb/m**2\n", + "#(b)\n", + "T = (2*math.pi*m)/(B*e);# time in s\n", + "#(c)\n", + "p = T*u*math.cos(alpha); # pitch in m\n", + "#results\n", + "print \"B =\",round(B*1000.,2),\"x 10^-3 Wb/m**2\"\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s\"\n", + "print \"p (m) = \",round(p,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 449" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T = 3.58 x 10^-11 / B \n" + ] + } + ], + "source": [ + "#pg 449\n", + "#calculate the value of T\n", + "import math\n", + "#Given :\n", + "m = 9.109*10**-31;# eletcron mass in kg\n", + "e = 1.6*10**-19; # electron charge in C\n", + "#calculations\n", + "#T = (2*pi*m)/(B*e) , here B is not given\n", + "T = (2*math.pi*m)/e;# time in s\n", + "#results\n", + "print \"T =\",round(T*10**11,2),\"x 10^-11 / B \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 455" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta2 (degrees) = 30.0\n" + ] + } + ], + "source": [ + "#pg 455\n", + "#calculate the angle required\n", + "#Given :\n", + "import math\n", + "V1 = 250.; # potential in V\n", + "V2 = 500.;# potential in V\n", + "theta1 = 45.;# angle in degrees\n", + "#Law of electron refraction = sin(theta1)/sin(theta2) = (V2/V1)^0.5\n", + "#calculations\n", + "theta2 = math.asin(((V1/V2)**(1./2))*math.sin(45/57.3))*57.3;\n", + "#results\n", + "print \"theta2 (degrees) = \",round(theta2,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 463" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "S2-S1 (mm) = 8.0\n" + ] + } + ], + "source": [ + "#pg 463\n", + "#calculate the difference of S2_S1\n", + "#Given :\n", + "M1 = 20.; # neon isotope mass in amu\n", + "M2 = 22.;#neon isotope mass in amu\n", + "E = 7*10**4; # Electric field in V/m\n", + "e = 1.6*10**-19;# electron charge in C\n", + "B = 0.5;# Magnetic field in Wb/m**2\n", + "B1 = 0.75; # Magnetic field in Wb/m**2\n", + "# Linear seperation = S2 - S1 = (2*E*(M2-M1))/(B*B1*e) \n", + "# 1 amu = 1.66*10**-27 kg\n", + "#calculations\n", + "S2_S1 = (2*E*(M2-M1)*1.66*10**-27)/(B*B1*e) ; # linear seperation in m\n", + "#results\n", + "print \"S2-S1 (mm) = \",round(S2_S1*10**3,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 466" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B (Wb/m^2) = 1.2\n", + "f (MHz) = 9.15\n", + "t (mu s) = 5.47\n" + ] + } + ], + "source": [ + "#pg 466\n", + "#calculate the values of B,f and t\n", + "import math\n", + "#Given:\n", + "m = 2.01*1.66*10**-27; # deuteron mass in kg\n", + "q = 1.6*10**-19; # deuteron charge in C\n", + "#We know , 1/2(m*v**2) = q*V\n", + "#for a 5 MeV deuteron \n", + "#calculations\n", + "# 1 MeV = 10**6*1.6*10**-19 J\n", + "v =((2*5*10**6*1.6*10**-19)/m)**(1./2) ; # velocity in m/s\n", + "#(a)\n", + "R = 15; # inches \n", + "#1 inch = 2.54*10**-2 m\n", + "B = (m*v)/(q*R*2.54*10**-2);# magnetic field intensity in Wb/m**2\n", + "#(b)\n", + "f = (q*B)/(2*math.pi*m); # frequency in Hz\n", + "#(c)\n", + "t = 50/f; # time in s\n", + "#results\n", + "print \"B (Wb/m^2) = \",round(B,1)\n", + "print \"f (MHz) = \",round(f*10**-6,2)\n", + "print \"t (mu s) = \",round(t*10**6,2)\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/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 new file mode 100644 index 00000000..fcba3e05 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_1.ipynb @@ -0,0 +1,347 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 - Charged Particles in Electric and Magnetic Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 434" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v_x = 4.4 x 10^5 m/s\n", + "x = 7.33 mm\n", + "t = 0.95 x 10^-7 s\n" + ] + } + ], + "source": [ + "#pg 434\n", + "#calculate the x,t\n", + "#Given :\n", + "import scipy.integrate\n", + "# E = 2*10^9*t V/m\n", + "# a_x = 3.52*10^20*t m/s^2\n", + "# v_x = integral of a_x dt\n", + "#(a)\n", + "#calculations and results\n", + "def f(t):\n", + "\ta_x = 3.530*10**20*t\n", + "\treturn a_x\n", + "\n", + "v_x = scipy.integrate.quad(f,0,50*10**-9); # electron speed in m/s at time = 50 ns\n", + "print \"v_x =\",round(v_x[0]*10**-5,1),\"x 10^5 m/s\"\n", + "#(b)\n", + "#v_x = 1.76*10^20*t^2 m/s\n", + "def v(t):\n", + "\tvx=1.76*10**20*t**2\n", + "\treturn vx\n", + "\n", + "x =scipy.integrate.quad(v,0,50*10**-9);# distance covered in m in 50 ns\n", + "print \"x =\",round(x[0]*10**3,2),\"mm\"\n", + "#(c)\n", + "#x = 5.87*10^19*t^3 m\n", + "X = 5*10**-2; #distance between plates in m\n", + "t = (X/(5.87*10**19))**(1./3); # time required in s\n", + "print \"t =\",round(t*10**7,2),\"x 10^-7 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 445" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "z_max (mm) = 1.2\n", + "T = 1.63 x 10^-8 s \n", + "H = 6.7 mm\n" + ] + } + ], + "source": [ + "#pg 445\n", + "#calculate the z-max, T and H\n", + "import math\n", + "#Given :\n", + "u = 5*10**5; #horizontal velocity in m/s\n", + "alpha = 35/57.3; # in radians\n", + "E = 200 ;# Electric field in V/m\n", + "e = 1.6*10**-19; # electron charge in C\n", + "m = 9.12*10**-31; # electron mass in kg\n", + "#calculations\n", + "a = (-e*E)/m; # horizontal range in m/s**2\n", + "#(a);\n", + "z_max = (-(u**2)*(math.sin(alpha))**2)/(2*a); # maximum penetration in m\n", + "#(b)\n", + "T = (-2*u*math.sin(alpha))/a; # Time of flight in s\n", + "#(c)\n", + "H = (-(u**2)*(math.sin(2*alpha)))/a; # horizontal range in m\n", + "#results\n", + "print \"z_max (mm) = \",round(z_max*10**3,1)\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s \"\n", + "print \"H =\",round(H*1000.,1),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 448" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B = 0.57 x 10^-3 Wb/m**2\n", + "T = 6.28 x 10^-8 s\n", + "p (m) = 2.72\n" + ] + } + ], + "source": [ + "#pg 448\n", + "#calculate the values of B,T and P\n", + "#Given :\n", + "import math\n", + "m = 9.12*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19;# electron charge in C\n", + "u = 5*10**7; # electron speed in m/s\n", + "alpha = 30/57.3; # angle in radians\n", + "d = 0.5; # diameter in m\n", + "#calculations\n", + "#(a)\n", + "#helix radius = (m*u*sin(alpha))/B*e \n", + "r = d/2; # radius in m\n", + "B = (m*u*math.sin(alpha))/(r*e); # magnetic flux density in Wb/m**2\n", + "#(b)\n", + "T = (2*math.pi*m)/(B*e);# time in s\n", + "#(c)\n", + "p = T*u*math.cos(alpha); # pitch in m\n", + "#results\n", + "print \"B =\",round(B*1000.,2),\"x 10^-3 Wb/m**2\"\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s\"\n", + "print \"p (m) = \",round(p,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 449" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T = 3.58 x 10^-11 / B \n" + ] + } + ], + "source": [ + "#pg 449\n", + "#calculate the value of T\n", + "import math\n", + "#Given :\n", + "m = 9.109*10**-31;# eletcron mass in kg\n", + "e = 1.6*10**-19; # electron charge in C\n", + "#calculations\n", + "#T = (2*pi*m)/(B*e) , here B is not given\n", + "T = (2*math.pi*m)/e;# time in s\n", + "#results\n", + "print \"T =\",round(T*10**11,2),\"x 10^-11 / B \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 455" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta2 (degrees) = 30.0\n" + ] + } + ], + "source": [ + "#pg 455\n", + "#calculate the angle required\n", + "#Given :\n", + "import math\n", + "V1 = 250.; # potential in V\n", + "V2 = 500.;# potential in V\n", + "theta1 = 45.;# angle in degrees\n", + "#Law of electron refraction = sin(theta1)/sin(theta2) = (V2/V1)^0.5\n", + "#calculations\n", + "theta2 = math.asin(((V1/V2)**(1./2))*math.sin(45/57.3))*57.3;\n", + "#results\n", + "print \"theta2 (degrees) = \",round(theta2,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 463" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "S2-S1 (mm) = 8.0\n" + ] + } + ], + "source": [ + "#pg 463\n", + "#calculate the difference of S2_S1\n", + "#Given :\n", + "M1 = 20.; # neon isotope mass in amu\n", + "M2 = 22.;#neon isotope mass in amu\n", + "E = 7*10**4; # Electric field in V/m\n", + "e = 1.6*10**-19;# electron charge in C\n", + "B = 0.5;# Magnetic field in Wb/m**2\n", + "B1 = 0.75; # Magnetic field in Wb/m**2\n", + "# Linear seperation = S2 - S1 = (2*E*(M2-M1))/(B*B1*e) \n", + "# 1 amu = 1.66*10**-27 kg\n", + "#calculations\n", + "S2_S1 = (2*E*(M2-M1)*1.66*10**-27)/(B*B1*e) ; # linear seperation in m\n", + "#results\n", + "print \"S2-S1 (mm) = \",round(S2_S1*10**3,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 466" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B (Wb/m^2) = 1.2\n", + "f (MHz) = 9.15\n", + "t (mu s) = 5.47\n" + ] + } + ], + "source": [ + "#pg 466\n", + "#calculate the values of B,f and t\n", + "import math\n", + "#Given:\n", + "m = 2.01*1.66*10**-27; # deuteron mass in kg\n", + "q = 1.6*10**-19; # deuteron charge in C\n", + "#We know , 1/2(m*v**2) = q*V\n", + "#for a 5 MeV deuteron \n", + "#calculations\n", + "# 1 MeV = 10**6*1.6*10**-19 J\n", + "v =((2*5*10**6*1.6*10**-19)/m)**(1./2) ; # velocity in m/s\n", + "#(a)\n", + "R = 15; # inches \n", + "#1 inch = 2.54*10**-2 m\n", + "B = (m*v)/(q*R*2.54*10**-2);# magnetic field intensity in Wb/m**2\n", + "#(b)\n", + "f = (q*B)/(2*math.pi*m); # frequency in Hz\n", + "#(c)\n", + "t = 50/f; # time in s\n", + "#results\n", + "print \"B (Wb/m^2) = \",round(B,1)\n", + "print \"f (MHz) = \",round(f*10**-6,2)\n", + "print \"t (mu s) = \",round(t*10**6,2)\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/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 new file mode 100644 index 00000000..fcba3e05 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter13_2.ipynb @@ -0,0 +1,347 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 - Charged Particles in Electric and Magnetic Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 434" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v_x = 4.4 x 10^5 m/s\n", + "x = 7.33 mm\n", + "t = 0.95 x 10^-7 s\n" + ] + } + ], + "source": [ + "#pg 434\n", + "#calculate the x,t\n", + "#Given :\n", + "import scipy.integrate\n", + "# E = 2*10^9*t V/m\n", + "# a_x = 3.52*10^20*t m/s^2\n", + "# v_x = integral of a_x dt\n", + "#(a)\n", + "#calculations and results\n", + "def f(t):\n", + "\ta_x = 3.530*10**20*t\n", + "\treturn a_x\n", + "\n", + "v_x = scipy.integrate.quad(f,0,50*10**-9); # electron speed in m/s at time = 50 ns\n", + "print \"v_x =\",round(v_x[0]*10**-5,1),\"x 10^5 m/s\"\n", + "#(b)\n", + "#v_x = 1.76*10^20*t^2 m/s\n", + "def v(t):\n", + "\tvx=1.76*10**20*t**2\n", + "\treturn vx\n", + "\n", + "x =scipy.integrate.quad(v,0,50*10**-9);# distance covered in m in 50 ns\n", + "print \"x =\",round(x[0]*10**3,2),\"mm\"\n", + "#(c)\n", + "#x = 5.87*10^19*t^3 m\n", + "X = 5*10**-2; #distance between plates in m\n", + "t = (X/(5.87*10**19))**(1./3); # time required in s\n", + "print \"t =\",round(t*10**7,2),\"x 10^-7 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 445" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "z_max (mm) = 1.2\n", + "T = 1.63 x 10^-8 s \n", + "H = 6.7 mm\n" + ] + } + ], + "source": [ + "#pg 445\n", + "#calculate the z-max, T and H\n", + "import math\n", + "#Given :\n", + "u = 5*10**5; #horizontal velocity in m/s\n", + "alpha = 35/57.3; # in radians\n", + "E = 200 ;# Electric field in V/m\n", + "e = 1.6*10**-19; # electron charge in C\n", + "m = 9.12*10**-31; # electron mass in kg\n", + "#calculations\n", + "a = (-e*E)/m; # horizontal range in m/s**2\n", + "#(a);\n", + "z_max = (-(u**2)*(math.sin(alpha))**2)/(2*a); # maximum penetration in m\n", + "#(b)\n", + "T = (-2*u*math.sin(alpha))/a; # Time of flight in s\n", + "#(c)\n", + "H = (-(u**2)*(math.sin(2*alpha)))/a; # horizontal range in m\n", + "#results\n", + "print \"z_max (mm) = \",round(z_max*10**3,1)\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s \"\n", + "print \"H =\",round(H*1000.,1),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 448" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B = 0.57 x 10^-3 Wb/m**2\n", + "T = 6.28 x 10^-8 s\n", + "p (m) = 2.72\n" + ] + } + ], + "source": [ + "#pg 448\n", + "#calculate the values of B,T and P\n", + "#Given :\n", + "import math\n", + "m = 9.12*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19;# electron charge in C\n", + "u = 5*10**7; # electron speed in m/s\n", + "alpha = 30/57.3; # angle in radians\n", + "d = 0.5; # diameter in m\n", + "#calculations\n", + "#(a)\n", + "#helix radius = (m*u*sin(alpha))/B*e \n", + "r = d/2; # radius in m\n", + "B = (m*u*math.sin(alpha))/(r*e); # magnetic flux density in Wb/m**2\n", + "#(b)\n", + "T = (2*math.pi*m)/(B*e);# time in s\n", + "#(c)\n", + "p = T*u*math.cos(alpha); # pitch in m\n", + "#results\n", + "print \"B =\",round(B*1000.,2),\"x 10^-3 Wb/m**2\"\n", + "print \"T =\",round(T*10**8,2),\"x 10^-8 s\"\n", + "print \"p (m) = \",round(p,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 449" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T = 3.58 x 10^-11 / B \n" + ] + } + ], + "source": [ + "#pg 449\n", + "#calculate the value of T\n", + "import math\n", + "#Given :\n", + "m = 9.109*10**-31;# eletcron mass in kg\n", + "e = 1.6*10**-19; # electron charge in C\n", + "#calculations\n", + "#T = (2*pi*m)/(B*e) , here B is not given\n", + "T = (2*math.pi*m)/e;# time in s\n", + "#results\n", + "print \"T =\",round(T*10**11,2),\"x 10^-11 / B \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 455" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta2 (degrees) = 30.0\n" + ] + } + ], + "source": [ + "#pg 455\n", + "#calculate the angle required\n", + "#Given :\n", + "import math\n", + "V1 = 250.; # potential in V\n", + "V2 = 500.;# potential in V\n", + "theta1 = 45.;# angle in degrees\n", + "#Law of electron refraction = sin(theta1)/sin(theta2) = (V2/V1)^0.5\n", + "#calculations\n", + "theta2 = math.asin(((V1/V2)**(1./2))*math.sin(45/57.3))*57.3;\n", + "#results\n", + "print \"theta2 (degrees) = \",round(theta2,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 463" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "S2-S1 (mm) = 8.0\n" + ] + } + ], + "source": [ + "#pg 463\n", + "#calculate the difference of S2_S1\n", + "#Given :\n", + "M1 = 20.; # neon isotope mass in amu\n", + "M2 = 22.;#neon isotope mass in amu\n", + "E = 7*10**4; # Electric field in V/m\n", + "e = 1.6*10**-19;# electron charge in C\n", + "B = 0.5;# Magnetic field in Wb/m**2\n", + "B1 = 0.75; # Magnetic field in Wb/m**2\n", + "# Linear seperation = S2 - S1 = (2*E*(M2-M1))/(B*B1*e) \n", + "# 1 amu = 1.66*10**-27 kg\n", + "#calculations\n", + "S2_S1 = (2*E*(M2-M1)*1.66*10**-27)/(B*B1*e) ; # linear seperation in m\n", + "#results\n", + "print \"S2-S1 (mm) = \",round(S2_S1*10**3,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 466" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B (Wb/m^2) = 1.2\n", + "f (MHz) = 9.15\n", + "t (mu s) = 5.47\n" + ] + } + ], + "source": [ + "#pg 466\n", + "#calculate the values of B,f and t\n", + "import math\n", + "#Given:\n", + "m = 2.01*1.66*10**-27; # deuteron mass in kg\n", + "q = 1.6*10**-19; # deuteron charge in C\n", + "#We know , 1/2(m*v**2) = q*V\n", + "#for a 5 MeV deuteron \n", + "#calculations\n", + "# 1 MeV = 10**6*1.6*10**-19 J\n", + "v =((2*5*10**6*1.6*10**-19)/m)**(1./2) ; # velocity in m/s\n", + "#(a)\n", + "R = 15; # inches \n", + "#1 inch = 2.54*10**-2 m\n", + "B = (m*v)/(q*R*2.54*10**-2);# magnetic field intensity in Wb/m**2\n", + "#(b)\n", + "f = (q*B)/(2*math.pi*m); # frequency in Hz\n", + "#(c)\n", + "t = 50/f; # time in s\n", + "#results\n", + "print \"B (Wb/m^2) = \",round(B,1)\n", + "print \"f (MHz) = \",round(f*10**-6,2)\n", + "print \"t (mu s) = \",round(t*10**6,2)\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14.ipynb new file mode 100755 index 00000000..7394ba5e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14.ipynb @@ -0,0 +1,252 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 - Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 493" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.7 x 10^-35 \n", + "T (K) = 34650.0\n", + "Resuts obtained differ from those in texbook, because approximate value of k*T was considered\n" + ] + } + ], + "source": [ + "#pg 493\n", + "#calculate the ratio required and Temperature\n", + "#Given :\n", + "import math\n", + "lambd = 6000.; #wavelength in A\n", + "k = 8.62*10**-5; # in eV/K\n", + "T = 300.; # Temperature in K\n", + "#calculations\n", + "#Equilibrium ratio = N2/N1 = exp[-(E2-E1)/k*T]\n", + "#(a)\n", + "E2_E1 = 12422./lambd; # energy in eV\n", + "Ratio = math.exp(-E2_E1/(k*T));\n", + "#(b)\n", + "T1 = (E2_E1)/(k*math.log(2)); # Temperature in K\n", + "#results\n", + "print \"Ratio =\",round(Ratio*10**35,1),\"x 10^-35 \"\n", + "print \"T (K) = \",round(T1,0)\n", + "print 'Resuts obtained differ from those in texbook, because approximate value of k*T was considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 497" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference (A) = 0.025\n" + ] + } + ], + "source": [ + "#pg 497\n", + "#calculate the difference required\n", + "#Given :\n", + "L =8.;# in cm\n", + "lambd = 5330.; #wavelength in A\n", + "# lambd = 2*L/n\n", + "# 1 A = 1.0*10**-8 cm\n", + "#calculations\n", + "n= (2*L)/(lambd*10**-8); # allowed modes\n", + "#adjacent mode \n", + "n1 = round(n+1);\n", + "# 1 cm = 1.0*10**8 A\n", + "lambd1 = ((2*L)/n1)*10**8;# wavelength in A\n", + "D = lambd-lambd1; # difference in wavelengths in A\n", + "#results\n", + "print \"Difference (A) = \",round(D,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 505" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Laser source = 1.0 x 10^-10\n", + "Ordinary source = 1.0 x 10^-7\n", + "Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.\n" + ] + } + ], + "source": [ + "#pg 505\n", + "#calculate the laser source and Ordinary source\n", + "import math\n", + "#Given :\n", + "tau_c = 10.**-5; # lifetime of lasing energy in s\n", + "tau_c1 = 10.**-8; # coherence time in s\n", + "lambd = 5000.; # wavelength in A\n", + "c = 3.*10**8;# light speed in m/s\n", + "# Ratio = delta_lambd/lambd = lambd/(c*tau_c)\n", + "# 1 A = 1.0*10**-10 m\n", + "#(a)Laser source\n", + "#calculations\n", + "Ratio = (lambd*10**-10)/(c*tau_c);\n", + "#(b)Ordinary source\n", + "Ratio1 = (lambd*10**-10)/(c*tau_c1);\n", + "#results\n", + "print \"Laser source =\",math.floor(Ratio*10**10),\"x 10^-10\"\n", + "print \"Ordinary source =\",math.floor(Ratio1*10**7),\"x 10^-7\"\n", + "print'Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 506" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intensity = 4.0 x 10^6 kW/cm^2 \n", + "Intensity of this laser source is 1.0 x 10^6 times the intensity of Sun radiation\n" + ] + } + ], + "source": [ + "#pg 506\n", + "#calculate the intensity required\n", + "#Given :\n", + "P = 10.; # Power in W\n", + "lambd =5000.; # wavelength in A\n", + "SI = 7*10**3; # Sun's radiation intensity in W/cm^2\n", + "# 1 A = 1.0*10^-8 cm\n", + "#calculations\n", + "I = P/(lambd*10**-8)**2; #Intensity in W/cm^2\n", + "Ratio = (I)/SI; \n", + "#results\n", + "print \"Intensity =\",I*10**-9,\"x 10^6 kW/cm^2 \"\n", + "print \"Intensity of this laser source is\",round(Ratio*10**-6,0),\"x 10^6 times the intensity of Sun radiation\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 512" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of Telephone conversations = 3.0 x 10^11\n", + " Number of Television programmes = 3.0 x 10^7\n", + "The answers differ from textbook due to rounding off error\n" + ] + } + ], + "source": [ + "#pg 512\n", + "#calculate the Number of Telephone and Television conversations and programmes\n", + "#Given :\n", + "c = 3.*10**8;# light speed in m/s\n", + "#Visible range = 4000 A - 7000 A\n", + "lambd1 = 4000.; # wavelength in A\n", + "lambd2 = 7000.;# wavelength in A\n", + "#calculations\n", + "# 1 A = 1.0*10**-10 m\n", + "nu1 = c/(lambd1*10**-10); # frequency in Hz\n", + "nu2 = c/(lambd2*10**-10);# frequency in Hz\n", + "deltanu = nu1-nu2; # in Hz\n", + "#(a)Telephone conversations\n", + "f1 = 10**3; # frequency in Hz\n", + "n1 = deltanu/f1;\n", + "#(b)Television programmes\n", + "f2 = 10**7; # frequency in Hz\n", + "n2 = deltanu/f2;\n", + "#results\n", + "print \" Number of Telephone conversations =\",round(n1*10**-11),\"x 10^11\"\n", + "print \" Number of Television programmes =\",round(n2*10**-7),\"x 10^7\"\n", + "print 'The answers differ from textbook due to rounding off error'" + ] + } + ], + "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/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 new file mode 100644 index 00000000..7394ba5e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_1.ipynb @@ -0,0 +1,252 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 - Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 493" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.7 x 10^-35 \n", + "T (K) = 34650.0\n", + "Resuts obtained differ from those in texbook, because approximate value of k*T was considered\n" + ] + } + ], + "source": [ + "#pg 493\n", + "#calculate the ratio required and Temperature\n", + "#Given :\n", + "import math\n", + "lambd = 6000.; #wavelength in A\n", + "k = 8.62*10**-5; # in eV/K\n", + "T = 300.; # Temperature in K\n", + "#calculations\n", + "#Equilibrium ratio = N2/N1 = exp[-(E2-E1)/k*T]\n", + "#(a)\n", + "E2_E1 = 12422./lambd; # energy in eV\n", + "Ratio = math.exp(-E2_E1/(k*T));\n", + "#(b)\n", + "T1 = (E2_E1)/(k*math.log(2)); # Temperature in K\n", + "#results\n", + "print \"Ratio =\",round(Ratio*10**35,1),\"x 10^-35 \"\n", + "print \"T (K) = \",round(T1,0)\n", + "print 'Resuts obtained differ from those in texbook, because approximate value of k*T was considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 497" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference (A) = 0.025\n" + ] + } + ], + "source": [ + "#pg 497\n", + "#calculate the difference required\n", + "#Given :\n", + "L =8.;# in cm\n", + "lambd = 5330.; #wavelength in A\n", + "# lambd = 2*L/n\n", + "# 1 A = 1.0*10**-8 cm\n", + "#calculations\n", + "n= (2*L)/(lambd*10**-8); # allowed modes\n", + "#adjacent mode \n", + "n1 = round(n+1);\n", + "# 1 cm = 1.0*10**8 A\n", + "lambd1 = ((2*L)/n1)*10**8;# wavelength in A\n", + "D = lambd-lambd1; # difference in wavelengths in A\n", + "#results\n", + "print \"Difference (A) = \",round(D,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 505" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Laser source = 1.0 x 10^-10\n", + "Ordinary source = 1.0 x 10^-7\n", + "Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.\n" + ] + } + ], + "source": [ + "#pg 505\n", + "#calculate the laser source and Ordinary source\n", + "import math\n", + "#Given :\n", + "tau_c = 10.**-5; # lifetime of lasing energy in s\n", + "tau_c1 = 10.**-8; # coherence time in s\n", + "lambd = 5000.; # wavelength in A\n", + "c = 3.*10**8;# light speed in m/s\n", + "# Ratio = delta_lambd/lambd = lambd/(c*tau_c)\n", + "# 1 A = 1.0*10**-10 m\n", + "#(a)Laser source\n", + "#calculations\n", + "Ratio = (lambd*10**-10)/(c*tau_c);\n", + "#(b)Ordinary source\n", + "Ratio1 = (lambd*10**-10)/(c*tau_c1);\n", + "#results\n", + "print \"Laser source =\",math.floor(Ratio*10**10),\"x 10^-10\"\n", + "print \"Ordinary source =\",math.floor(Ratio1*10**7),\"x 10^-7\"\n", + "print'Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 506" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intensity = 4.0 x 10^6 kW/cm^2 \n", + "Intensity of this laser source is 1.0 x 10^6 times the intensity of Sun radiation\n" + ] + } + ], + "source": [ + "#pg 506\n", + "#calculate the intensity required\n", + "#Given :\n", + "P = 10.; # Power in W\n", + "lambd =5000.; # wavelength in A\n", + "SI = 7*10**3; # Sun's radiation intensity in W/cm^2\n", + "# 1 A = 1.0*10^-8 cm\n", + "#calculations\n", + "I = P/(lambd*10**-8)**2; #Intensity in W/cm^2\n", + "Ratio = (I)/SI; \n", + "#results\n", + "print \"Intensity =\",I*10**-9,\"x 10^6 kW/cm^2 \"\n", + "print \"Intensity of this laser source is\",round(Ratio*10**-6,0),\"x 10^6 times the intensity of Sun radiation\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 512" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of Telephone conversations = 3.0 x 10^11\n", + " Number of Television programmes = 3.0 x 10^7\n", + "The answers differ from textbook due to rounding off error\n" + ] + } + ], + "source": [ + "#pg 512\n", + "#calculate the Number of Telephone and Television conversations and programmes\n", + "#Given :\n", + "c = 3.*10**8;# light speed in m/s\n", + "#Visible range = 4000 A - 7000 A\n", + "lambd1 = 4000.; # wavelength in A\n", + "lambd2 = 7000.;# wavelength in A\n", + "#calculations\n", + "# 1 A = 1.0*10**-10 m\n", + "nu1 = c/(lambd1*10**-10); # frequency in Hz\n", + "nu2 = c/(lambd2*10**-10);# frequency in Hz\n", + "deltanu = nu1-nu2; # in Hz\n", + "#(a)Telephone conversations\n", + "f1 = 10**3; # frequency in Hz\n", + "n1 = deltanu/f1;\n", + "#(b)Television programmes\n", + "f2 = 10**7; # frequency in Hz\n", + "n2 = deltanu/f2;\n", + "#results\n", + "print \" Number of Telephone conversations =\",round(n1*10**-11),\"x 10^11\"\n", + "print \" Number of Television programmes =\",round(n2*10**-7),\"x 10^7\"\n", + "print 'The answers differ from textbook due to rounding off error'" + ] + } + ], + "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/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 new file mode 100644 index 00000000..7394ba5e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter14_2.ipynb @@ -0,0 +1,252 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 - Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 493" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.7 x 10^-35 \n", + "T (K) = 34650.0\n", + "Resuts obtained differ from those in texbook, because approximate value of k*T was considered\n" + ] + } + ], + "source": [ + "#pg 493\n", + "#calculate the ratio required and Temperature\n", + "#Given :\n", + "import math\n", + "lambd = 6000.; #wavelength in A\n", + "k = 8.62*10**-5; # in eV/K\n", + "T = 300.; # Temperature in K\n", + "#calculations\n", + "#Equilibrium ratio = N2/N1 = exp[-(E2-E1)/k*T]\n", + "#(a)\n", + "E2_E1 = 12422./lambd; # energy in eV\n", + "Ratio = math.exp(-E2_E1/(k*T));\n", + "#(b)\n", + "T1 = (E2_E1)/(k*math.log(2)); # Temperature in K\n", + "#results\n", + "print \"Ratio =\",round(Ratio*10**35,1),\"x 10^-35 \"\n", + "print \"T (K) = \",round(T1,0)\n", + "print 'Resuts obtained differ from those in texbook, because approximate value of k*T was considered'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 497" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Difference (A) = 0.025\n" + ] + } + ], + "source": [ + "#pg 497\n", + "#calculate the difference required\n", + "#Given :\n", + "L =8.;# in cm\n", + "lambd = 5330.; #wavelength in A\n", + "# lambd = 2*L/n\n", + "# 1 A = 1.0*10**-8 cm\n", + "#calculations\n", + "n= (2*L)/(lambd*10**-8); # allowed modes\n", + "#adjacent mode \n", + "n1 = round(n+1);\n", + "# 1 cm = 1.0*10**8 A\n", + "lambd1 = ((2*L)/n1)*10**8;# wavelength in A\n", + "D = lambd-lambd1; # difference in wavelengths in A\n", + "#results\n", + "print \"Difference (A) = \",round(D,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 505" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Laser source = 1.0 x 10^-10\n", + "Ordinary source = 1.0 x 10^-7\n", + "Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.\n" + ] + } + ], + "source": [ + "#pg 505\n", + "#calculate the laser source and Ordinary source\n", + "import math\n", + "#Given :\n", + "tau_c = 10.**-5; # lifetime of lasing energy in s\n", + "tau_c1 = 10.**-8; # coherence time in s\n", + "lambd = 5000.; # wavelength in A\n", + "c = 3.*10**8;# light speed in m/s\n", + "# Ratio = delta_lambd/lambd = lambd/(c*tau_c)\n", + "# 1 A = 1.0*10**-10 m\n", + "#(a)Laser source\n", + "#calculations\n", + "Ratio = (lambd*10**-10)/(c*tau_c);\n", + "#(b)Ordinary source\n", + "Ratio1 = (lambd*10**-10)/(c*tau_c1);\n", + "#results\n", + "print \"Laser source =\",math.floor(Ratio*10**10),\"x 10^-10\"\n", + "print \"Ordinary source =\",math.floor(Ratio1*10**7),\"x 10^-7\"\n", + "print'Results obtained differ from those in textbook, beacuse only order of 10 was considered in the result.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 506" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intensity = 4.0 x 10^6 kW/cm^2 \n", + "Intensity of this laser source is 1.0 x 10^6 times the intensity of Sun radiation\n" + ] + } + ], + "source": [ + "#pg 506\n", + "#calculate the intensity required\n", + "#Given :\n", + "P = 10.; # Power in W\n", + "lambd =5000.; # wavelength in A\n", + "SI = 7*10**3; # Sun's radiation intensity in W/cm^2\n", + "# 1 A = 1.0*10^-8 cm\n", + "#calculations\n", + "I = P/(lambd*10**-8)**2; #Intensity in W/cm^2\n", + "Ratio = (I)/SI; \n", + "#results\n", + "print \"Intensity =\",I*10**-9,\"x 10^6 kW/cm^2 \"\n", + "print \"Intensity of this laser source is\",round(Ratio*10**-6,0),\"x 10^6 times the intensity of Sun radiation\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 512" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of Telephone conversations = 3.0 x 10^11\n", + " Number of Television programmes = 3.0 x 10^7\n", + "The answers differ from textbook due to rounding off error\n" + ] + } + ], + "source": [ + "#pg 512\n", + "#calculate the Number of Telephone and Television conversations and programmes\n", + "#Given :\n", + "c = 3.*10**8;# light speed in m/s\n", + "#Visible range = 4000 A - 7000 A\n", + "lambd1 = 4000.; # wavelength in A\n", + "lambd2 = 7000.;# wavelength in A\n", + "#calculations\n", + "# 1 A = 1.0*10**-10 m\n", + "nu1 = c/(lambd1*10**-10); # frequency in Hz\n", + "nu2 = c/(lambd2*10**-10);# frequency in Hz\n", + "deltanu = nu1-nu2; # in Hz\n", + "#(a)Telephone conversations\n", + "f1 = 10**3; # frequency in Hz\n", + "n1 = deltanu/f1;\n", + "#(b)Television programmes\n", + "f2 = 10**7; # frequency in Hz\n", + "n2 = deltanu/f2;\n", + "#results\n", + "print \" Number of Telephone conversations =\",round(n1*10**-11),\"x 10^11\"\n", + "print \" Number of Television programmes =\",round(n2*10**-7),\"x 10^7\"\n", + "print 'The answers differ from textbook due to rounding off error'" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15.ipynb new file mode 100755 index 00000000..511fc472 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15.ipynb @@ -0,0 +1,236 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 - Fibre Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 524" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "With cladding , NA and Acceptance angle = 0.1225 and 7.035 degrees\n", + "Without cladding , NA = 1.1214\n" + ] + } + ], + "source": [ + "#pg 524\n", + "#Calculate the acceptance angle\n", + "#Given :\n", + "import math\n", + "n0 = 1;#refractive index of outer medium\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "#calculations\n", + "NA = math.sqrt(n1**2 - n2**2); # Numerical aperture with cladding\n", + "alpha_c = math.asin(NA/n0)*57.3; # acceptance angle in degrees\n", + "NA1 = math.sqrt(n1**2 - n0**2);# Numerical aperture without cladding\n", + "#results\n", + "print \"With cladding , NA and Acceptance angle =\",round(NA,4),\"and\",round(alpha_c,3),\"degrees\"\n", + "print \"Without cladding , NA = \",round(NA1,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ls (mu_m) = 1230.9\n", + "Reflections per m = 812.0\n" + ] + } + ], + "source": [ + "#pg 525\n", + "#calculate the Ls and reflections per m\n", + "#Given :\n", + "import math\n", + "n1 = 1.5025;# refractive index of core\n", + "delta = 0.0033; # \n", + "a = 50.; # core radius in mu_m\n", + "#calculations\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "R = 1/(Ls*10**-6);# reflections per m\n", + "#results\n", + "print \"Ls (mu_m) = \",round(Ls,1)\n", + "print \"Reflections per m = \",round(R,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Limiting diameter (mu_m) = 7.92\n" + ] + } + ], + "source": [ + "#pg 526\n", + "#calculate the Limiting diameter\n", + "#Given :\n", + "import math\n", + "lambd = 1.25; # wavelength in mu_m\n", + "n1 = 1.462; # refractive index of core\n", + "n2 = 1.457; # refractive index of cladding\n", + "#calculations\n", + "# Single mode propogation : (2*pi*a*sqrt(n1**2 - n2**2))/lambd < 2.405\n", + "a = (2.405*lambd)/(2*math.pi*math.sqrt(n1**2 - n2**2)); # radius in mu_m\n", + "d = a*2; # diameter in mu_m\n", + "#results\n", + "print \"Limiting diameter (mu_m) = \",round(d,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attenuation (dB/km) = 2.6\n" + ] + } + ], + "source": [ + "#pg 527\n", + "#calculate the Attenuation\n", + "#Given :\n", + "import math\n", + "n1 = 1.525; # refractive index of core\n", + "n2 = 1.500; # refractive index of cladding\n", + "d = 30.; # core diameter in mu_m\n", + "#calculations\n", + "ab = 0.00001/100; # percentage absorbed\n", + "a = d/2.; # core radius in mu_m\n", + "delta = (n1-n2)/n1;\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "#1 mu_m = 1.0*10^-6 m\n", + "R = 1000/(Ls*10**-6); # reflections per km (1000 m)\n", + "red_p = 1 - ab; # reduced power for each reflection\n", + "#Power P1km = P0*red_p^(6*10^6)\n", + "# A = 10*log10[P0/P1km] , P0 in the numerator and denominator will cancel each other\n", + "A = 10*math.log10(1/(red_p)**(R));\n", + "#results\n", + "print \"Attenuation (dB/km) = \",round(A,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 533" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum delay (ps) = 16.7\n", + "Bandwidth of 2MHz can propogate a distance of (km) = 15.0\n" + ] + } + ], + "source": [ + "#pg 533\n", + "#calculate the maximum delay and bandwidth\n", + "#Given :\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "L = 1; # length in m\n", + "F = 2*10**6; # frequency in Hz\n", + "c = 3*10**8;# light speed in m/s\n", + "#calculations\n", + "delta_t = (n1*L/c)*((n1/n2)-1);# maximum delay in s;\n", + "f = 1/(2*delta_t); # bandwidth for 1 m propogation\n", + "L1 = 1/(2*F*delta_t); # distance for 2MHz bandwidth\n", + "#results\n", + "print \"Maximum delay (ps) = \",round(delta_t*10**12,1)\n", + "print \"Bandwidth of 2MHz can propogate a distance of (km) = \",round(L1*10**-3,0);\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/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 new file mode 100644 index 00000000..511fc472 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_1.ipynb @@ -0,0 +1,236 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 - Fibre Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 524" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "With cladding , NA and Acceptance angle = 0.1225 and 7.035 degrees\n", + "Without cladding , NA = 1.1214\n" + ] + } + ], + "source": [ + "#pg 524\n", + "#Calculate the acceptance angle\n", + "#Given :\n", + "import math\n", + "n0 = 1;#refractive index of outer medium\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "#calculations\n", + "NA = math.sqrt(n1**2 - n2**2); # Numerical aperture with cladding\n", + "alpha_c = math.asin(NA/n0)*57.3; # acceptance angle in degrees\n", + "NA1 = math.sqrt(n1**2 - n0**2);# Numerical aperture without cladding\n", + "#results\n", + "print \"With cladding , NA and Acceptance angle =\",round(NA,4),\"and\",round(alpha_c,3),\"degrees\"\n", + "print \"Without cladding , NA = \",round(NA1,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ls (mu_m) = 1230.9\n", + "Reflections per m = 812.0\n" + ] + } + ], + "source": [ + "#pg 525\n", + "#calculate the Ls and reflections per m\n", + "#Given :\n", + "import math\n", + "n1 = 1.5025;# refractive index of core\n", + "delta = 0.0033; # \n", + "a = 50.; # core radius in mu_m\n", + "#calculations\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "R = 1/(Ls*10**-6);# reflections per m\n", + "#results\n", + "print \"Ls (mu_m) = \",round(Ls,1)\n", + "print \"Reflections per m = \",round(R,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Limiting diameter (mu_m) = 7.92\n" + ] + } + ], + "source": [ + "#pg 526\n", + "#calculate the Limiting diameter\n", + "#Given :\n", + "import math\n", + "lambd = 1.25; # wavelength in mu_m\n", + "n1 = 1.462; # refractive index of core\n", + "n2 = 1.457; # refractive index of cladding\n", + "#calculations\n", + "# Single mode propogation : (2*pi*a*sqrt(n1**2 - n2**2))/lambd < 2.405\n", + "a = (2.405*lambd)/(2*math.pi*math.sqrt(n1**2 - n2**2)); # radius in mu_m\n", + "d = a*2; # diameter in mu_m\n", + "#results\n", + "print \"Limiting diameter (mu_m) = \",round(d,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attenuation (dB/km) = 2.6\n" + ] + } + ], + "source": [ + "#pg 527\n", + "#calculate the Attenuation\n", + "#Given :\n", + "import math\n", + "n1 = 1.525; # refractive index of core\n", + "n2 = 1.500; # refractive index of cladding\n", + "d = 30.; # core diameter in mu_m\n", + "#calculations\n", + "ab = 0.00001/100; # percentage absorbed\n", + "a = d/2.; # core radius in mu_m\n", + "delta = (n1-n2)/n1;\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "#1 mu_m = 1.0*10^-6 m\n", + "R = 1000/(Ls*10**-6); # reflections per km (1000 m)\n", + "red_p = 1 - ab; # reduced power for each reflection\n", + "#Power P1km = P0*red_p^(6*10^6)\n", + "# A = 10*log10[P0/P1km] , P0 in the numerator and denominator will cancel each other\n", + "A = 10*math.log10(1/(red_p)**(R));\n", + "#results\n", + "print \"Attenuation (dB/km) = \",round(A,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 533" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum delay (ps) = 16.7\n", + "Bandwidth of 2MHz can propogate a distance of (km) = 15.0\n" + ] + } + ], + "source": [ + "#pg 533\n", + "#calculate the maximum delay and bandwidth\n", + "#Given :\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "L = 1; # length in m\n", + "F = 2*10**6; # frequency in Hz\n", + "c = 3*10**8;# light speed in m/s\n", + "#calculations\n", + "delta_t = (n1*L/c)*((n1/n2)-1);# maximum delay in s;\n", + "f = 1/(2*delta_t); # bandwidth for 1 m propogation\n", + "L1 = 1/(2*F*delta_t); # distance for 2MHz bandwidth\n", + "#results\n", + "print \"Maximum delay (ps) = \",round(delta_t*10**12,1)\n", + "print \"Bandwidth of 2MHz can propogate a distance of (km) = \",round(L1*10**-3,0);\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/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 new file mode 100644 index 00000000..511fc472 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter15_2.ipynb @@ -0,0 +1,236 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 - Fibre Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 524" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "With cladding , NA and Acceptance angle = 0.1225 and 7.035 degrees\n", + "Without cladding , NA = 1.1214\n" + ] + } + ], + "source": [ + "#pg 524\n", + "#Calculate the acceptance angle\n", + "#Given :\n", + "import math\n", + "n0 = 1;#refractive index of outer medium\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "#calculations\n", + "NA = math.sqrt(n1**2 - n2**2); # Numerical aperture with cladding\n", + "alpha_c = math.asin(NA/n0)*57.3; # acceptance angle in degrees\n", + "NA1 = math.sqrt(n1**2 - n0**2);# Numerical aperture without cladding\n", + "#results\n", + "print \"With cladding , NA and Acceptance angle =\",round(NA,4),\"and\",round(alpha_c,3),\"degrees\"\n", + "print \"Without cladding , NA = \",round(NA1,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ls (mu_m) = 1230.9\n", + "Reflections per m = 812.0\n" + ] + } + ], + "source": [ + "#pg 525\n", + "#calculate the Ls and reflections per m\n", + "#Given :\n", + "import math\n", + "n1 = 1.5025;# refractive index of core\n", + "delta = 0.0033; # \n", + "a = 50.; # core radius in mu_m\n", + "#calculations\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "R = 1/(Ls*10**-6);# reflections per m\n", + "#results\n", + "print \"Ls (mu_m) = \",round(Ls,1)\n", + "print \"Reflections per m = \",round(R,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Limiting diameter (mu_m) = 7.92\n" + ] + } + ], + "source": [ + "#pg 526\n", + "#calculate the Limiting diameter\n", + "#Given :\n", + "import math\n", + "lambd = 1.25; # wavelength in mu_m\n", + "n1 = 1.462; # refractive index of core\n", + "n2 = 1.457; # refractive index of cladding\n", + "#calculations\n", + "# Single mode propogation : (2*pi*a*sqrt(n1**2 - n2**2))/lambd < 2.405\n", + "a = (2.405*lambd)/(2*math.pi*math.sqrt(n1**2 - n2**2)); # radius in mu_m\n", + "d = a*2; # diameter in mu_m\n", + "#results\n", + "print \"Limiting diameter (mu_m) = \",round(d,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Attenuation (dB/km) = 2.6\n" + ] + } + ], + "source": [ + "#pg 527\n", + "#calculate the Attenuation\n", + "#Given :\n", + "import math\n", + "n1 = 1.525; # refractive index of core\n", + "n2 = 1.500; # refractive index of cladding\n", + "d = 30.; # core diameter in mu_m\n", + "#calculations\n", + "ab = 0.00001/100; # percentage absorbed\n", + "a = d/2.; # core radius in mu_m\n", + "delta = (n1-n2)/n1;\n", + "Ls = a*math.sqrt(2/delta);# skip distance in mu_m\n", + "#1 mu_m = 1.0*10^-6 m\n", + "R = 1000/(Ls*10**-6); # reflections per km (1000 m)\n", + "red_p = 1 - ab; # reduced power for each reflection\n", + "#Power P1km = P0*red_p^(6*10^6)\n", + "# A = 10*log10[P0/P1km] , P0 in the numerator and denominator will cancel each other\n", + "A = 10*math.log10(1/(red_p)**(R));\n", + "#results\n", + "print \"Attenuation (dB/km) = \",round(A,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 533" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum delay (ps) = 16.7\n", + "Bandwidth of 2MHz can propogate a distance of (km) = 15.0\n" + ] + } + ], + "source": [ + "#pg 533\n", + "#calculate the maximum delay and bandwidth\n", + "#Given :\n", + "n1 = 1.5025; # refractive index of core\n", + "n2 = 1.4975; # refractive index of cladding\n", + "L = 1; # length in m\n", + "F = 2*10**6; # frequency in Hz\n", + "c = 3*10**8;# light speed in m/s\n", + "#calculations\n", + "delta_t = (n1*L/c)*((n1/n2)-1);# maximum delay in s;\n", + "f = 1/(2*delta_t); # bandwidth for 1 m propogation\n", + "L1 = 1/(2*F*delta_t); # distance for 2MHz bandwidth\n", + "#results\n", + "print \"Maximum delay (ps) = \",round(delta_t*10**12,1)\n", + "print \"Bandwidth of 2MHz can propogate a distance of (km) = \",round(L1*10**-3,0);\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16.ipynb new file mode 100755 index 00000000..1e25347e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16.ipynb @@ -0,0 +1,462 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 - Acoustics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 552" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.0017\n", + "delta_v (m/s) = 0.6\n" + ] + } + ], + "source": [ + "#pg 552\n", + "#calculate the Ratio and delta_v\n", + "#Given :\n", + "delta_t = 1; # temperature in degrees\n", + "t1 = 27.; # temperature in degrees\n", + "v1 = 343;# speed of sound at room temperature in m/s\n", + "#calculations\n", + "#Ratio = v2/v1 = 1+ (delta_t/(t1+273))\n", + "Ratio = 1 + (delta_t /(2*(t1+273)));\n", + "v2 = v1*Ratio; # speed of sound in air in m/s\n", + "delta_v = v2-v1; # speed in m/s\n", + "#results\n", + "print \"Ratio = \",round(Ratio,4)\n", + "print \"delta_v (m/s) = \",round(delta_v,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 553" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum displacement amplitude = 11.0 pm\n", + "Maximum displacement amplitude = 11.0 mu m\n" + ] + } + ], + "source": [ + "#pg 553\n", + "#calculate the Maximum displacement amplitude\n", + "#Given :\n", + "import math\n", + "p_rms = 0.0002; # in microbar\n", + "p_rms1 = 20.; # in pascal\n", + "v = 343.; # speed of sound in m/s\n", + "rho_0 = 1.21; # density of air in kg/m^3\n", + "f = 1000.; # frequency in Hz\n", + "# p_rms = pm_min/(2)^0.5\n", + "#1 microbar = 0.1 N/m^2\n", + "#calculations\n", + "pm_min = math.sqrt(2)*p_rms*0.1; #in N/m^2\n", + "# 1 pascal = 1 N/m^2\n", + "pm_max =math.sqrt(2)*p_rms1*1; # in N/m^2\n", + "# sm = pm/(v*rho_0*omega);\n", + "#omega = 2*pi*f\n", + "sm_min = pm_min/(v*rho_0*2* math.pi*f); # displacement amplitude in m\n", + "sm_max = pm_max/(v*rho_0*2*math.pi*f);# displacement amplitude in m\n", + "#results\n", + "print \"Minimum displacement amplitude =\",round(sm_min*10**12,0),\"pm\"\n", + "print \"Maximum displacement amplitude =\",round(sm_max*10**6),\"mu m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 555" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I_max/I_min = 1.0 x 10**12 \n" + ] + } + ], + "source": [ + "#pg 555\n", + "#calculate the ratio of max to min intensity\n", + "#Given :\n", + "import math\n", + "sm_min = 11*10**-12;# Minimum displacement amplitude in m\n", + "sm_max = 11*10**-6;# Maximum displacement amplitude in m\n", + "v = 343;# speed of sound in m/s\n", + "f = 1000; # frequency in Hz\n", + "rho_0 = 1.21; # density of air in kg/m**3\n", + "# Sound intensity = (rho_0*v*omega**2*sm**2)/2\n", + "#omega = 2*pi*f\n", + "#calculations\n", + "I_max = (rho_0*v*((2*math.pi*f)**2)*(sm_max**2))/2; # Maximum Intensity\n", + "I_min = (rho_0*v*((2*math.pi*f)**2)*(sm_min**2))/2; # Minimum Intensity\n", + "Ratio = I_max/I_min ;\n", + "#results\n", + "print \"I_max/I_min =\",Ratio*10**-12,\"x 10**12 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 556" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hearing Threshold : 1.0 x 10**-12 W/m^2\n", + "Speech Activity : 1.0 x 10**-6 W/m^2\n", + "Pain Threshold (W/m^2) = 1.0\n" + ] + } + ], + "source": [ + "#pg 556\n", + "#calculate the Hearing Threshold,Speech Activity and Pain Threshold\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 0.; # in dB\n", + "beta2 = 60.;# in dB\n", + "beta3 = 120.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Hearing Threshold :\",I1*10**12,\"x 10**-12 W/m^2\"\n", + "print \"Speech Activity :\",I2*10**6,\"x 10**-6 W/m^2\"\n", + "print \"Pain Threshold (W/m^2) = \",I3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 563" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For auditorium reverberation time (s) = 1.68\n", + "When people are present, reverberation time (s) = 1.39\n" + ] + } + ], + "source": [ + "#pg 563\n", + "#calculate the reverberation time\n", + "#Given :\n", + "l = 200.; # in ft\n", + "b = 50.; # in ft\n", + "h = 30.;# in ft\n", + "alpha = 0.25; #average absorption coefficient\n", + "#calculations\n", + "V = l*b*h; # Volume in ft^3\n", + "S = 2*((l*b)+(l*h)+(b*h)); #total surface area in ft^2\n", + "a = alpha*S;# in sabins\n", + "T = (0.049*V)/a; # reverberation time in s\n", + "#400 people present in the auditorium, 1 person is equivalent to 4.5 sabins\n", + "a1 = a+ 400*4.5; # in sabins\n", + "T1 = (0.049*V)/a1;# reverberation time in s\n", + "#results\n", + "print \"For auditorium reverberation time (s) = \",T\n", + "print \"When people are present, reverberation time (s) = \",round(T1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 564" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "alpha = 0.02\n", + "alpha_e = 0.52\n" + ] + } + ], + "source": [ + "#pg 564\n", + "#calculate the absorption coefficients\n", + "#Given :\n", + "V = 9.*10*11; # Volume in ft^3\n", + "T = 4.; # reverberation time in s\n", + "S = 2*((9*10.)+(10*11)+(11*9));# total surface area in ft^2\n", + "S1 = 50.; # total surface area in ft^2\n", + "T1 = 1.3; # reverberation time in s\n", + "#calculations\n", + "#T = (0.049*V)/(alpha*S)\n", + "alpha = (0.049*V)/(S*T);#average absorption coefficient \n", + "alpha_e =(((0.049*V)/S1)*((1/T1)-(1/T))) + alpha ; # effective absorption coefficient \n", + "#results\n", + "print \"alpha = \",round(alpha,2)\n", + "print \"alpha_e = \",round(alpha_e,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 565" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency is (kHz) = 34.3\n" + ] + } + ], + "source": [ + "#pg 565\n", + "#calculate the frequency\n", + "#Given :\n", + "v = 343.; # velocity of sound in m/s\n", + "lambd = 1; # wavelength in cm\n", + "# 1 cm = 1.0*10^-2 m\n", + "#calculations\n", + "f = v/(lambd*10**-2); #frequency in Hz\n", + "#results\n", + "print \"Frequency is (kHz) = \",f*10**-3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 568" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Piezoelectric generator\n", + "For n = 1 , Frequency (MHz) = 1.42\n", + "For n = 2 , Frequency (MHz) = 2.84\n", + "For n = 3 , Frequency (MHz) = 4.26\n", + "Magnetostriction generator\n", + "For n = 1 , Frequency (kHz) = 48.9\n", + "For n = 2 , Frequency (kHz) = 97.7\n", + "For n = 3 , Frequency (kHz) = 146.6\n", + "Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.\n" + ] + } + ], + "source": [ + "#pg 568\n", + "#calculate the frequency required\n", + "#Given :\n", + "import math\n", + "from math import sqrt\n", + "E1 = 8.55*10**10; #Modulus of elasticity in N/m**2\n", + "E2 = 21.*10**10; # Modulus of elasticity in N/m**2\n", + "rho1 = 2650.; # density of Quartz in kg/m**3\n", + "rho2 = 8800.;# density of Nickel in kg/m**3\n", + "t = 2.; # thickness of crystal in mm\n", + "l = 50.; # rod length in mm\n", + "#Piezoelectric generator\n", + "#calculations and results\n", + "print (\"Piezoelectric generator\");\n", + "for n in range(1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu1 = (n/(2*t*10**-3))*sqrt(E1/rho1);# frequency in Hz \n", + " print \"For n =\",n,\", Frequency (MHz) = \",round(nu1*10**-6,2)\n", + "#Magnetostriction generator\n", + "print \"Magnetostriction generator\"\n", + "for n1 in range (1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu2 = (n1/(2*l*10**-3))*sqrt(E2/rho2);# frequency in Hz \n", + " print \"For n =\",n1,\", Frequency (kHz) = \",round(nu2*10**-3,1)\n", + "print 'Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 569" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amplified Rock Music (W/m^2) = 0.1\n", + "Jet plane 1.0 x 10^3 W/m^2 \n", + "Rocket engine : 1.0 x 10^6 W/m^2\n" + ] + } + ], + "source": [ + "#pg 569\n", + "#calculate the Amplified Rock Music, Jet plane and Rocket engine\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 110.; # in dB\n", + "beta2 = 150.;# in dB\n", + "beta3 = 180.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Amplified Rock Music (W/m^2) = \",I1\n", + "print \"Jet plane \",I2*10**-3,\"x 10^3 W/m^2 \"\n", + "print \"Rocket engine :\",I3*10**-6,\"x 10^6 W/m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 572" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Depth (m) = 600.0\n" + ] + } + ], + "source": [ + "#pg 572\n", + "#calculate the depth required\n", + "#Given :\n", + "v = 1500.; # velocity of ultrasound in m/s\n", + "rt = 0.8; # recorded time in s\n", + "#calculations\n", + "t = rt/2.; # time in s\n", + "#Ultrasound velocity = D/t\n", + "D = v*t; # sea depth in m\n", + "#results\n", + "print \"Depth (m) = \",D\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/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 new file mode 100644 index 00000000..1e25347e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_1.ipynb @@ -0,0 +1,462 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 - Acoustics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 552" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.0017\n", + "delta_v (m/s) = 0.6\n" + ] + } + ], + "source": [ + "#pg 552\n", + "#calculate the Ratio and delta_v\n", + "#Given :\n", + "delta_t = 1; # temperature in degrees\n", + "t1 = 27.; # temperature in degrees\n", + "v1 = 343;# speed of sound at room temperature in m/s\n", + "#calculations\n", + "#Ratio = v2/v1 = 1+ (delta_t/(t1+273))\n", + "Ratio = 1 + (delta_t /(2*(t1+273)));\n", + "v2 = v1*Ratio; # speed of sound in air in m/s\n", + "delta_v = v2-v1; # speed in m/s\n", + "#results\n", + "print \"Ratio = \",round(Ratio,4)\n", + "print \"delta_v (m/s) = \",round(delta_v,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 553" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum displacement amplitude = 11.0 pm\n", + "Maximum displacement amplitude = 11.0 mu m\n" + ] + } + ], + "source": [ + "#pg 553\n", + "#calculate the Maximum displacement amplitude\n", + "#Given :\n", + "import math\n", + "p_rms = 0.0002; # in microbar\n", + "p_rms1 = 20.; # in pascal\n", + "v = 343.; # speed of sound in m/s\n", + "rho_0 = 1.21; # density of air in kg/m^3\n", + "f = 1000.; # frequency in Hz\n", + "# p_rms = pm_min/(2)^0.5\n", + "#1 microbar = 0.1 N/m^2\n", + "#calculations\n", + "pm_min = math.sqrt(2)*p_rms*0.1; #in N/m^2\n", + "# 1 pascal = 1 N/m^2\n", + "pm_max =math.sqrt(2)*p_rms1*1; # in N/m^2\n", + "# sm = pm/(v*rho_0*omega);\n", + "#omega = 2*pi*f\n", + "sm_min = pm_min/(v*rho_0*2* math.pi*f); # displacement amplitude in m\n", + "sm_max = pm_max/(v*rho_0*2*math.pi*f);# displacement amplitude in m\n", + "#results\n", + "print \"Minimum displacement amplitude =\",round(sm_min*10**12,0),\"pm\"\n", + "print \"Maximum displacement amplitude =\",round(sm_max*10**6),\"mu m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 555" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I_max/I_min = 1.0 x 10**12 \n" + ] + } + ], + "source": [ + "#pg 555\n", + "#calculate the ratio of max to min intensity\n", + "#Given :\n", + "import math\n", + "sm_min = 11*10**-12;# Minimum displacement amplitude in m\n", + "sm_max = 11*10**-6;# Maximum displacement amplitude in m\n", + "v = 343;# speed of sound in m/s\n", + "f = 1000; # frequency in Hz\n", + "rho_0 = 1.21; # density of air in kg/m**3\n", + "# Sound intensity = (rho_0*v*omega**2*sm**2)/2\n", + "#omega = 2*pi*f\n", + "#calculations\n", + "I_max = (rho_0*v*((2*math.pi*f)**2)*(sm_max**2))/2; # Maximum Intensity\n", + "I_min = (rho_0*v*((2*math.pi*f)**2)*(sm_min**2))/2; # Minimum Intensity\n", + "Ratio = I_max/I_min ;\n", + "#results\n", + "print \"I_max/I_min =\",Ratio*10**-12,\"x 10**12 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 556" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hearing Threshold : 1.0 x 10**-12 W/m^2\n", + "Speech Activity : 1.0 x 10**-6 W/m^2\n", + "Pain Threshold (W/m^2) = 1.0\n" + ] + } + ], + "source": [ + "#pg 556\n", + "#calculate the Hearing Threshold,Speech Activity and Pain Threshold\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 0.; # in dB\n", + "beta2 = 60.;# in dB\n", + "beta3 = 120.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Hearing Threshold :\",I1*10**12,\"x 10**-12 W/m^2\"\n", + "print \"Speech Activity :\",I2*10**6,\"x 10**-6 W/m^2\"\n", + "print \"Pain Threshold (W/m^2) = \",I3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 563" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For auditorium reverberation time (s) = 1.68\n", + "When people are present, reverberation time (s) = 1.39\n" + ] + } + ], + "source": [ + "#pg 563\n", + "#calculate the reverberation time\n", + "#Given :\n", + "l = 200.; # in ft\n", + "b = 50.; # in ft\n", + "h = 30.;# in ft\n", + "alpha = 0.25; #average absorption coefficient\n", + "#calculations\n", + "V = l*b*h; # Volume in ft^3\n", + "S = 2*((l*b)+(l*h)+(b*h)); #total surface area in ft^2\n", + "a = alpha*S;# in sabins\n", + "T = (0.049*V)/a; # reverberation time in s\n", + "#400 people present in the auditorium, 1 person is equivalent to 4.5 sabins\n", + "a1 = a+ 400*4.5; # in sabins\n", + "T1 = (0.049*V)/a1;# reverberation time in s\n", + "#results\n", + "print \"For auditorium reverberation time (s) = \",T\n", + "print \"When people are present, reverberation time (s) = \",round(T1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 564" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "alpha = 0.02\n", + "alpha_e = 0.52\n" + ] + } + ], + "source": [ + "#pg 564\n", + "#calculate the absorption coefficients\n", + "#Given :\n", + "V = 9.*10*11; # Volume in ft^3\n", + "T = 4.; # reverberation time in s\n", + "S = 2*((9*10.)+(10*11)+(11*9));# total surface area in ft^2\n", + "S1 = 50.; # total surface area in ft^2\n", + "T1 = 1.3; # reverberation time in s\n", + "#calculations\n", + "#T = (0.049*V)/(alpha*S)\n", + "alpha = (0.049*V)/(S*T);#average absorption coefficient \n", + "alpha_e =(((0.049*V)/S1)*((1/T1)-(1/T))) + alpha ; # effective absorption coefficient \n", + "#results\n", + "print \"alpha = \",round(alpha,2)\n", + "print \"alpha_e = \",round(alpha_e,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 565" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency is (kHz) = 34.3\n" + ] + } + ], + "source": [ + "#pg 565\n", + "#calculate the frequency\n", + "#Given :\n", + "v = 343.; # velocity of sound in m/s\n", + "lambd = 1; # wavelength in cm\n", + "# 1 cm = 1.0*10^-2 m\n", + "#calculations\n", + "f = v/(lambd*10**-2); #frequency in Hz\n", + "#results\n", + "print \"Frequency is (kHz) = \",f*10**-3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 568" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Piezoelectric generator\n", + "For n = 1 , Frequency (MHz) = 1.42\n", + "For n = 2 , Frequency (MHz) = 2.84\n", + "For n = 3 , Frequency (MHz) = 4.26\n", + "Magnetostriction generator\n", + "For n = 1 , Frequency (kHz) = 48.9\n", + "For n = 2 , Frequency (kHz) = 97.7\n", + "For n = 3 , Frequency (kHz) = 146.6\n", + "Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.\n" + ] + } + ], + "source": [ + "#pg 568\n", + "#calculate the frequency required\n", + "#Given :\n", + "import math\n", + "from math import sqrt\n", + "E1 = 8.55*10**10; #Modulus of elasticity in N/m**2\n", + "E2 = 21.*10**10; # Modulus of elasticity in N/m**2\n", + "rho1 = 2650.; # density of Quartz in kg/m**3\n", + "rho2 = 8800.;# density of Nickel in kg/m**3\n", + "t = 2.; # thickness of crystal in mm\n", + "l = 50.; # rod length in mm\n", + "#Piezoelectric generator\n", + "#calculations and results\n", + "print (\"Piezoelectric generator\");\n", + "for n in range(1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu1 = (n/(2*t*10**-3))*sqrt(E1/rho1);# frequency in Hz \n", + " print \"For n =\",n,\", Frequency (MHz) = \",round(nu1*10**-6,2)\n", + "#Magnetostriction generator\n", + "print \"Magnetostriction generator\"\n", + "for n1 in range (1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu2 = (n1/(2*l*10**-3))*sqrt(E2/rho2);# frequency in Hz \n", + " print \"For n =\",n1,\", Frequency (kHz) = \",round(nu2*10**-3,1)\n", + "print 'Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 569" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amplified Rock Music (W/m^2) = 0.1\n", + "Jet plane 1.0 x 10^3 W/m^2 \n", + "Rocket engine : 1.0 x 10^6 W/m^2\n" + ] + } + ], + "source": [ + "#pg 569\n", + "#calculate the Amplified Rock Music, Jet plane and Rocket engine\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 110.; # in dB\n", + "beta2 = 150.;# in dB\n", + "beta3 = 180.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Amplified Rock Music (W/m^2) = \",I1\n", + "print \"Jet plane \",I2*10**-3,\"x 10^3 W/m^2 \"\n", + "print \"Rocket engine :\",I3*10**-6,\"x 10^6 W/m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 572" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Depth (m) = 600.0\n" + ] + } + ], + "source": [ + "#pg 572\n", + "#calculate the depth required\n", + "#Given :\n", + "v = 1500.; # velocity of ultrasound in m/s\n", + "rt = 0.8; # recorded time in s\n", + "#calculations\n", + "t = rt/2.; # time in s\n", + "#Ultrasound velocity = D/t\n", + "D = v*t; # sea depth in m\n", + "#results\n", + "print \"Depth (m) = \",D\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/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 new file mode 100644 index 00000000..1e25347e --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter16_2.ipynb @@ -0,0 +1,462 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 - Acoustics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 552" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio = 1.0017\n", + "delta_v (m/s) = 0.6\n" + ] + } + ], + "source": [ + "#pg 552\n", + "#calculate the Ratio and delta_v\n", + "#Given :\n", + "delta_t = 1; # temperature in degrees\n", + "t1 = 27.; # temperature in degrees\n", + "v1 = 343;# speed of sound at room temperature in m/s\n", + "#calculations\n", + "#Ratio = v2/v1 = 1+ (delta_t/(t1+273))\n", + "Ratio = 1 + (delta_t /(2*(t1+273)));\n", + "v2 = v1*Ratio; # speed of sound in air in m/s\n", + "delta_v = v2-v1; # speed in m/s\n", + "#results\n", + "print \"Ratio = \",round(Ratio,4)\n", + "print \"delta_v (m/s) = \",round(delta_v,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 553" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum displacement amplitude = 11.0 pm\n", + "Maximum displacement amplitude = 11.0 mu m\n" + ] + } + ], + "source": [ + "#pg 553\n", + "#calculate the Maximum displacement amplitude\n", + "#Given :\n", + "import math\n", + "p_rms = 0.0002; # in microbar\n", + "p_rms1 = 20.; # in pascal\n", + "v = 343.; # speed of sound in m/s\n", + "rho_0 = 1.21; # density of air in kg/m^3\n", + "f = 1000.; # frequency in Hz\n", + "# p_rms = pm_min/(2)^0.5\n", + "#1 microbar = 0.1 N/m^2\n", + "#calculations\n", + "pm_min = math.sqrt(2)*p_rms*0.1; #in N/m^2\n", + "# 1 pascal = 1 N/m^2\n", + "pm_max =math.sqrt(2)*p_rms1*1; # in N/m^2\n", + "# sm = pm/(v*rho_0*omega);\n", + "#omega = 2*pi*f\n", + "sm_min = pm_min/(v*rho_0*2* math.pi*f); # displacement amplitude in m\n", + "sm_max = pm_max/(v*rho_0*2*math.pi*f);# displacement amplitude in m\n", + "#results\n", + "print \"Minimum displacement amplitude =\",round(sm_min*10**12,0),\"pm\"\n", + "print \"Maximum displacement amplitude =\",round(sm_max*10**6),\"mu m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 555" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I_max/I_min = 1.0 x 10**12 \n" + ] + } + ], + "source": [ + "#pg 555\n", + "#calculate the ratio of max to min intensity\n", + "#Given :\n", + "import math\n", + "sm_min = 11*10**-12;# Minimum displacement amplitude in m\n", + "sm_max = 11*10**-6;# Maximum displacement amplitude in m\n", + "v = 343;# speed of sound in m/s\n", + "f = 1000; # frequency in Hz\n", + "rho_0 = 1.21; # density of air in kg/m**3\n", + "# Sound intensity = (rho_0*v*omega**2*sm**2)/2\n", + "#omega = 2*pi*f\n", + "#calculations\n", + "I_max = (rho_0*v*((2*math.pi*f)**2)*(sm_max**2))/2; # Maximum Intensity\n", + "I_min = (rho_0*v*((2*math.pi*f)**2)*(sm_min**2))/2; # Minimum Intensity\n", + "Ratio = I_max/I_min ;\n", + "#results\n", + "print \"I_max/I_min =\",Ratio*10**-12,\"x 10**12 \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 556" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hearing Threshold : 1.0 x 10**-12 W/m^2\n", + "Speech Activity : 1.0 x 10**-6 W/m^2\n", + "Pain Threshold (W/m^2) = 1.0\n" + ] + } + ], + "source": [ + "#pg 556\n", + "#calculate the Hearing Threshold,Speech Activity and Pain Threshold\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 0.; # in dB\n", + "beta2 = 60.;# in dB\n", + "beta3 = 120.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Hearing Threshold :\",I1*10**12,\"x 10**-12 W/m^2\"\n", + "print \"Speech Activity :\",I2*10**6,\"x 10**-6 W/m^2\"\n", + "print \"Pain Threshold (W/m^2) = \",I3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 563" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For auditorium reverberation time (s) = 1.68\n", + "When people are present, reverberation time (s) = 1.39\n" + ] + } + ], + "source": [ + "#pg 563\n", + "#calculate the reverberation time\n", + "#Given :\n", + "l = 200.; # in ft\n", + "b = 50.; # in ft\n", + "h = 30.;# in ft\n", + "alpha = 0.25; #average absorption coefficient\n", + "#calculations\n", + "V = l*b*h; # Volume in ft^3\n", + "S = 2*((l*b)+(l*h)+(b*h)); #total surface area in ft^2\n", + "a = alpha*S;# in sabins\n", + "T = (0.049*V)/a; # reverberation time in s\n", + "#400 people present in the auditorium, 1 person is equivalent to 4.5 sabins\n", + "a1 = a+ 400*4.5; # in sabins\n", + "T1 = (0.049*V)/a1;# reverberation time in s\n", + "#results\n", + "print \"For auditorium reverberation time (s) = \",T\n", + "print \"When people are present, reverberation time (s) = \",round(T1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 564" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "alpha = 0.02\n", + "alpha_e = 0.52\n" + ] + } + ], + "source": [ + "#pg 564\n", + "#calculate the absorption coefficients\n", + "#Given :\n", + "V = 9.*10*11; # Volume in ft^3\n", + "T = 4.; # reverberation time in s\n", + "S = 2*((9*10.)+(10*11)+(11*9));# total surface area in ft^2\n", + "S1 = 50.; # total surface area in ft^2\n", + "T1 = 1.3; # reverberation time in s\n", + "#calculations\n", + "#T = (0.049*V)/(alpha*S)\n", + "alpha = (0.049*V)/(S*T);#average absorption coefficient \n", + "alpha_e =(((0.049*V)/S1)*((1/T1)-(1/T))) + alpha ; # effective absorption coefficient \n", + "#results\n", + "print \"alpha = \",round(alpha,2)\n", + "print \"alpha_e = \",round(alpha_e,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 565" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency is (kHz) = 34.3\n" + ] + } + ], + "source": [ + "#pg 565\n", + "#calculate the frequency\n", + "#Given :\n", + "v = 343.; # velocity of sound in m/s\n", + "lambd = 1; # wavelength in cm\n", + "# 1 cm = 1.0*10^-2 m\n", + "#calculations\n", + "f = v/(lambd*10**-2); #frequency in Hz\n", + "#results\n", + "print \"Frequency is (kHz) = \",f*10**-3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 568" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Piezoelectric generator\n", + "For n = 1 , Frequency (MHz) = 1.42\n", + "For n = 2 , Frequency (MHz) = 2.84\n", + "For n = 3 , Frequency (MHz) = 4.26\n", + "Magnetostriction generator\n", + "For n = 1 , Frequency (kHz) = 48.9\n", + "For n = 2 , Frequency (kHz) = 97.7\n", + "For n = 3 , Frequency (kHz) = 146.6\n", + "Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.\n" + ] + } + ], + "source": [ + "#pg 568\n", + "#calculate the frequency required\n", + "#Given :\n", + "import math\n", + "from math import sqrt\n", + "E1 = 8.55*10**10; #Modulus of elasticity in N/m**2\n", + "E2 = 21.*10**10; # Modulus of elasticity in N/m**2\n", + "rho1 = 2650.; # density of Quartz in kg/m**3\n", + "rho2 = 8800.;# density of Nickel in kg/m**3\n", + "t = 2.; # thickness of crystal in mm\n", + "l = 50.; # rod length in mm\n", + "#Piezoelectric generator\n", + "#calculations and results\n", + "print (\"Piezoelectric generator\");\n", + "for n in range(1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu1 = (n/(2*t*10**-3))*sqrt(E1/rho1);# frequency in Hz \n", + " print \"For n =\",n,\", Frequency (MHz) = \",round(nu1*10**-6,2)\n", + "#Magnetostriction generator\n", + "print \"Magnetostriction generator\"\n", + "for n1 in range (1,4):\n", + " # 1 mm = 1.0*10**-3 m\n", + " nu2 = (n1/(2*l*10**-3))*sqrt(E2/rho2);# frequency in Hz \n", + " print \"For n =\",n1,\", Frequency (kHz) = \",round(nu2*10**-3,1)\n", + "print 'Results differ from those in textbook, because in the formulae (n/(2*t))*sqrt(E/rho) and (n/(2*l))*sqrt(E/rho) , 2 is not multiplied with either t or l.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 569" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amplified Rock Music (W/m^2) = 0.1\n", + "Jet plane 1.0 x 10^3 W/m^2 \n", + "Rocket engine : 1.0 x 10^6 W/m^2\n" + ] + } + ], + "source": [ + "#pg 569\n", + "#calculate the Amplified Rock Music, Jet plane and Rocket engine\n", + "#Given :\n", + "I0 = 10**-12; # in W/m**2\n", + "beta1 = 110.; # in dB\n", + "beta2 = 150.;# in dB\n", + "beta3 = 180.; # in dB\n", + "#calculations\n", + "# Intensity level = beta = 10*log10(I/I0)\n", + "I1 = 10**(beta1/10)*I0; # Intensity in W/m**2\n", + "I2 = 10**(beta2/10)*I0; # Intensity in W/m**2\n", + "I3 = 10**(beta3/10)*I0; # Intensity in W/m**2\n", + "#results\n", + "print \"Amplified Rock Music (W/m^2) = \",I1\n", + "print \"Jet plane \",I2*10**-3,\"x 10^3 W/m^2 \"\n", + "print \"Rocket engine :\",I3*10**-6,\"x 10^6 W/m^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 572" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Depth (m) = 600.0\n" + ] + } + ], + "source": [ + "#pg 572\n", + "#calculate the depth required\n", + "#Given :\n", + "v = 1500.; # velocity of ultrasound in m/s\n", + "rt = 0.8; # recorded time in s\n", + "#calculations\n", + "t = rt/2.; # time in s\n", + "#Ultrasound velocity = D/t\n", + "D = v*t; # sea depth in m\n", + "#results\n", + "print \"Depth (m) = \",D\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/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 new file mode 100644 index 00000000..2e5de774 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_1.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Physics and Engineering" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage Error (percentage) = 4.0\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given:\n", + "l=9.3; # length in cm\n", + "b=8.5;# breadth in cm\n", + "h=5.4;# height in cm\n", + "#calculations\n", + "V= l*b*h; # Volume in cm**3\n", + "delta_l = 0.1; delta_b = 0.1; delta_h = 0.1; # scale has a least count = 0.1 cm\n", + "# absolute error \n", + "delta_V = (b*h*delta_l + l*h*delta_b +l*b*delta_h); # in cm**3\n", + "#relative error \n", + "re = delta_V/V;\n", + "p= re*100; # Evaluating percentage error\n", + "#results\n", + "print \"Percentage Error (percentage) = \",round(p,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage error (percentage) = 2.86\n", + "Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given :\n", + "M= 10.0; #weight in g\n", + "V= 5.80;#volume in cm**3\n", + "#calculations\n", + "Rho = M/V; # Density in g/cm**3\n", + "delta_M= 0.2 # apparatus has a least count of 0.2 g\n", + "delta_V= 0.05# apparatus has a least count of 0.05 cm**3\n", + "delta_Rho = (delta_M/V) +((M*delta_V)/V**2);# absolute error in g/cm**3\n", + "re = delta_Rho/Rho ; #Evaluating Relative Error\n", + "p = re*100;# Evaluating Percentage Error\n", + "#results\n", + "print \"Percentage error (percentage) = \",round(p,2)\n", + "print'Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Actual Value of c/r ranges between 5.9 - 6.6 and Percentage error = 5.3 percentage. \n", + "(b)Actual Value of c/r ranges between 6.281 - 6.288 and Percentage error = 0.06 percentage.\n" + ] + } + ], + "source": [ + "#calculate the Actual val of c/r ranges and percentage error\n", + "#Given:\n", + "#(a) \n", + "import math\n", + "lc = 0.1# least count in cm\n", + "c = 6.9 #Circumference c in cm\n", + "r= 1.1 # radius of circle in cm\n", + "val =2*math.pi;\n", + "# Circumference,c= 2*pi*r or c/r = 2*pi\n", + "# Error in c/r is , delta(c/r)= [(c/r**2)+(1/r)](LC/2) , LC is Least Count .\n", + "E= ((c/r**2)+(1./r))*(lc/2.);#Error in c/r is delta(c/r)\n", + "ob = c/r; # Observed Value\n", + "#Actual Value of c/r ranges between\n", + "ac1 = ob-E;# Evaluating Minimum value for c/r \n", + "ac2 = ob+E;# Evaluating Maximum value for c/r\n", + "p = (E/ob)*100.; #Evaluating percentage error\n", + "#results\n", + "print \"(a)Actual Value of c/r ranges between\",round(ac1,1), \"-\",round(ac2,1),\" and Percentage error =\",round(p,1),\" percentage. \"\n", + "#(b)\n", + "lc1 = 0.001;#Now the least count is 0.001 cm\n", + "c1 = 6.316;#Circumference in cm\n", + "r1=1.005;#Circle radius in cm \n", + "E1 =((c1/r1**2) + (1/r1))*(lc1/2); # Error in c/r is delta(c/r)\n", + "ob1= c1/r1; #Observed Value\n", + "p1=(E1/ob1)*100.;#Evaluating percentage error\n", + "#Actual Value of c/r ranges between\n", + "a1= ob1-E1;#Evaluating Minimum value for c/r\n", + "a2= ob1+E1;#Evaluating Maximum value for c/r\n", + "print \"(b)Actual Value of c/r ranges between\",round(a1,3),\"-\",round(a2,3),\"and Percentage error =\",round(p1,2),\" percentage.\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 17" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) It is is 15.0 percentage lower than the experimental value.\n", + "(b) It is 0.6 percentage higher than the experimental value.\n" + ] + } + ], + "source": [ + "#calculate the percentage lower or higher than experimental value\n", + "#Given\n", + "import math\n", + "# (a) Newton's Theory\n", + "# v= (P/rho)**2 , P= Pressure , rho = density\n", + "P = 76.; # 76 cm of Hg pressure\n", + "V= 330. ; # velocity of sound in m/s\n", + "rho = 0.001293; # density for dry air at 0 degrees celsius in g/cm**3\n", + "g = 980.;#gravitational acceleration in cm/s**2\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "#calculations\n", + "v = math.sqrt(((P*13.6*g)/rho)*10**-4); # velocity of sound in m/s\n", + "p= ((V-v)/V)*100; # % lower than the experimental value\n", + "#results\n", + "print \"(a) It is is\",round(p,0),\" percentage lower than the experimental value.\"\n", + "\n", + "# (b) Laplace's Theory \n", + "# v= ((gama*P)/rho)**2., gamma = adiabatic index Thus,\n", + "#Given :\n", + "gama = 1.41 # Adiabatic index\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "v1 = math.sqrt(((gama*P*13.6*g)/rho)*10**-4);# velocity of sound in m/s\n", + "p1 = ((V-round(v1))/V)*100;# % higher than the eperimental value\n", + "#results\n", + "print \"(b) It is\",round(abs(p1),1),\"percentage higher than the experimental value.\"" + ] + } + ], + "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/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 new file mode 100644 index 00000000..2e5de774 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter1_2.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Physics and Engineering" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage Error (percentage) = 4.0\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given:\n", + "l=9.3; # length in cm\n", + "b=8.5;# breadth in cm\n", + "h=5.4;# height in cm\n", + "#calculations\n", + "V= l*b*h; # Volume in cm**3\n", + "delta_l = 0.1; delta_b = 0.1; delta_h = 0.1; # scale has a least count = 0.1 cm\n", + "# absolute error \n", + "delta_V = (b*h*delta_l + l*h*delta_b +l*b*delta_h); # in cm**3\n", + "#relative error \n", + "re = delta_V/V;\n", + "p= re*100; # Evaluating percentage error\n", + "#results\n", + "print \"Percentage Error (percentage) = \",round(p,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage error (percentage) = 2.86\n", + "Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.\n" + ] + } + ], + "source": [ + "#calculate the percentage error\n", + "#Given :\n", + "M= 10.0; #weight in g\n", + "V= 5.80;#volume in cm**3\n", + "#calculations\n", + "Rho = M/V; # Density in g/cm**3\n", + "delta_M= 0.2 # apparatus has a least count of 0.2 g\n", + "delta_V= 0.05# apparatus has a least count of 0.05 cm**3\n", + "delta_Rho = (delta_M/V) +((M*delta_V)/V**2);# absolute error in g/cm**3\n", + "re = delta_Rho/Rho ; #Evaluating Relative Error\n", + "p = re*100;# Evaluating Percentage Error\n", + "#results\n", + "print \"Percentage error (percentage) = \",round(p,2)\n", + "print'Result obtained differs from that in textbook, because delta_M walue is taken 0.1 g , instead of 0.2 g as mentioned in the problem statement.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Actual Value of c/r ranges between 5.9 - 6.6 and Percentage error = 5.3 percentage. \n", + "(b)Actual Value of c/r ranges between 6.281 - 6.288 and Percentage error = 0.06 percentage.\n" + ] + } + ], + "source": [ + "#calculate the Actual val of c/r ranges and percentage error\n", + "#Given:\n", + "#(a) \n", + "import math\n", + "lc = 0.1# least count in cm\n", + "c = 6.9 #Circumference c in cm\n", + "r= 1.1 # radius of circle in cm\n", + "val =2*math.pi;\n", + "# Circumference,c= 2*pi*r or c/r = 2*pi\n", + "# Error in c/r is , delta(c/r)= [(c/r**2)+(1/r)](LC/2) , LC is Least Count .\n", + "E= ((c/r**2)+(1./r))*(lc/2.);#Error in c/r is delta(c/r)\n", + "ob = c/r; # Observed Value\n", + "#Actual Value of c/r ranges between\n", + "ac1 = ob-E;# Evaluating Minimum value for c/r \n", + "ac2 = ob+E;# Evaluating Maximum value for c/r\n", + "p = (E/ob)*100.; #Evaluating percentage error\n", + "#results\n", + "print \"(a)Actual Value of c/r ranges between\",round(ac1,1), \"-\",round(ac2,1),\" and Percentage error =\",round(p,1),\" percentage. \"\n", + "#(b)\n", + "lc1 = 0.001;#Now the least count is 0.001 cm\n", + "c1 = 6.316;#Circumference in cm\n", + "r1=1.005;#Circle radius in cm \n", + "E1 =((c1/r1**2) + (1/r1))*(lc1/2); # Error in c/r is delta(c/r)\n", + "ob1= c1/r1; #Observed Value\n", + "p1=(E1/ob1)*100.;#Evaluating percentage error\n", + "#Actual Value of c/r ranges between\n", + "a1= ob1-E1;#Evaluating Minimum value for c/r\n", + "a2= ob1+E1;#Evaluating Maximum value for c/r\n", + "print \"(b)Actual Value of c/r ranges between\",round(a1,3),\"-\",round(a2,3),\"and Percentage error =\",round(p1,2),\" percentage.\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 17" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) It is is 15.0 percentage lower than the experimental value.\n", + "(b) It is 0.6 percentage higher than the experimental value.\n" + ] + } + ], + "source": [ + "#calculate the percentage lower or higher than experimental value\n", + "#Given\n", + "import math\n", + "# (a) Newton's Theory\n", + "# v= (P/rho)**2 , P= Pressure , rho = density\n", + "P = 76.; # 76 cm of Hg pressure\n", + "V= 330. ; # velocity of sound in m/s\n", + "rho = 0.001293; # density for dry air at 0 degrees celsius in g/cm**3\n", + "g = 980.;#gravitational acceleration in cm/s**2\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "#calculations\n", + "v = math.sqrt(((P*13.6*g)/rho)*10**-4); # velocity of sound in m/s\n", + "p= ((V-v)/V)*100; # % lower than the experimental value\n", + "#results\n", + "print \"(a) It is is\",round(p,0),\" percentage lower than the experimental value.\"\n", + "\n", + "# (b) Laplace's Theory \n", + "# v= ((gama*P)/rho)**2., gamma = adiabatic index Thus,\n", + "#Given :\n", + "gama = 1.41 # Adiabatic index\n", + "#Density of mercury at room temperature is 13.6 g/cm**3 \n", + "# 1 cm**2 = 1.0*10**-4 m**2\n", + "v1 = math.sqrt(((gama*P*13.6*g)/rho)*10**-4);# velocity of sound in m/s\n", + "p1 = ((V-round(v1))/V)*100;# % higher than the eperimental value\n", + "#results\n", + "print \"(b) It is\",round(abs(p1),1),\"percentage higher than the experimental value.\"" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2.ipynb new file mode 100755 index 00000000..93bc35ac --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2.ipynb @@ -0,0 +1,935 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 - What is Light" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\n", + "\n", + "\n", + "\tx (in m) \t y1(x) (in m)\n", + "\n", + "\t0.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t20.0 \t\t1.41421356237 \n", + "\n", + "\t30.0 \t\t0.0 \n", + "\n", + "\t40.0 \t\t-1.41421356237 \n", + "\n", + "\t50.0 \t\t-2.0 \n", + "\n", + "\t60.0 \t\t-1.41421356237 \n", + "\n", + "\t70.0 \t\t-2.44929359829e-16 \n", + "\n", + "\t80.0 \t\t1.41421356237 \n", + "\n", + "\t90.0 \t\t2.0 \n", + "\n", + "\t100.0 \t\t1.41421356237 \n", + "\n", + "\t110.0 \t\t2.26621555906e-15 \n", + "\n", + "\t120.0 \t\t-1.41421356237 \n", + "\n", + "\t130.0 \t\t-2.0 \n", + "\n", + "\t140.0 \t\t-1.41421356237 \n", + "\n", + "\t150.0 \t\t-7.34788079488e-16 \n", + "\n", + "\t160.0 \t\t1.41421356237 \n", + "\n", + "\t170.0 \t\t2.0 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAcwAAAEZCAYAAAAaKBUaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4HUWZ/z9fwh62sBhWAVnDIoQlBJJIBhUCKiiMIjgK\n", + "4k+dUQRBZJMZIiiLo6CIIjowAgKyqQTBEVSCCfsSdhDCvoYtQFiEkLy/P6pO0vfcc+49997Tp7pP\n", + "v5/nOc+93V3d9T3ddeqteruqXpkZjuM4juP0zSKpBTiO4zhOGXCD6TiO4zgt4AbTcRzHcVrADabj\n", + "OI7jtIAbTMdxHMdpATeYjuM4jtMCbjAzSFpK0hWSXpV0saR9Jf05c3y+pA+k1FgmJG0k6U5Jr0s6\n", + "MKc8pkr6Uh7XdtqLpDMkHTOA9LtI+n2emvrJf4KkBzuY3/WStmgx7b2SPjSEvA6UdNJgzy8ikj6X\n", + "ra8HeO4nJP2234Rm1ucHGA/cALwKvAxMB7bp77xOfYDJwFxgDjAbuB4YO8hrfR64GVikyfH5wAdy\n", + "+A6PAzv1cXwi8FQO+d4X79sc4D3g7cz2kZl0ZwJfrjv37P7uB3AW8KM2P+vz6vZdCxyQuhx24wfY\n", + "D7gNeA14CjgZGNYgzY455X8bMCazfTxwT/y9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1p1uMCv40IeKxHLAP4CPmXFHznl9C/gXMz6eZz5OWiQ+SDCaG5sxO+e8LgAeMmNy\n", + "nvl0M1WtO91gVvChtwOJLwP/BkzMawEBiVWA+4EJZr5kWbcjcSbwphmH5pjH9oTpLBub8WZe+XQ7\n", + "Va073WBW8KG3A4lhwB3AcWZcllMePwfmmnFwHtd3ioXE+wgNpB3MaHWBkoFcfxFC/NSfmXFeu69f\n", + "Japad7rBrOBDbxcSOwH/A2xixj/bfO3NgL8RegKvtPPaTnGR+DYw3ow9crj25wgrRY31NWOHRlXr\n", + "zlKNknWKhRl/A+4GDmrndeMgkFOA491YVo7TgM0kPtLOi0osDZxIWIPYjaUzKNxgOkPl28Dhcdm6\n", + "drEbsBbwizZe0ykBZrxDKFOnRLd/uzgMuMGM69t4TadiuEu2gm6FdiPxI2BZM77ShmstRohKc6gZ\n", + "Vw1ZnFM6oofhWuACM37ZhuutAdwFbG3GE0O9nlPdutMNZgUferuRWIEwzWRnM+4a4rUOIvQwd/Xw\n", + "XdVFYjQhFutGZrw2xGudAzxtxnfaIs6pbN3pBrOCDz0PJL4G/Cvw4cEauhjq6QHCvMv72qnPKR8S\n", + "ZwEvm3H4EK6xLXA5wfDOaZu4ilPVutMNZgUfeh7EZc3uAo424/JBXuM0YJgZX2+rOKeUxOUX7wG2\n", + "M+ORQZwvQtCFs804u936qkxV6043mBV86HkhsTPwM2DTuEboQM4dBfwdGGXGS3noc8qHxNGEd497\n", + "DeLczwBHAtuaMa/t4ipMVetOHyXrtI241utDwIGDOP2HwIluLJ06TgW2lgYWWkpiKeAHhGkkbiyd\n", + "tuA9zAq2kvJEYmOCG2wTM15s8ZxJwE8ZRM/U6X4k9ib0FLdp1fgNpWfq9E9V6043mBV86Hkj8RNg\n", + "MTO+1kLa2rvPo8yYkrs4p3TEd5HTgbNaeRc51HefTv9Ute50g1nBh543EisSgvPuZMa9/aT9GrAX\n", + "8BGfRuI0YyCjXePo2pfMOKIj4ipIVetON5gVfOidIM6n/Di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mNg+4V9JG\n", + "2d2Zv/U9wkY9RKv7v367xhjg7y1/Acdx+sTDezlOh5G0PzDSzBqOgm1jPucDPzSzGXnm4zhVwXuY\n", + "jtN5LgA+Jqk/d+ugkfQ+QuBoN5aO0ya8h+k4juM4LeA9TMdxHMdpATeYjuM4jtMCbjAdx3EcpwXc\n", + "YDqO4zhOC7jBdBzHcZwWcIPpOI7jOC3w/wHIGArraLdQJwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\n", + "\n", + "\n", + "\t t(in s) \t y2(t) (in m)\n", + "\n", + "\n", + "\t10.0 \t\t0.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.44929359829e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.26621555906e-15 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t7.34788079488e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAeYAAAEZCAYAAABCV4YDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8HFX5x/HPl9BJqImhE2nSEZDQSQUpgogVFUWRpqCi\n", + "KM2fBFCKXUTpKiiC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Fv3y5tZu8QkuZjMY5PACdJGpV5257AJWa2TPzc2fWd\n", + "DVwInBq/q1KNR8AngQ8D7wc2IRyHSNqMcJJ5AKGgOgu4omxflvQAI+P/tyQk2FI/jW0ItbeX4uMr\n", + "CcfdEELt7cIY422EhJ695v3Z0uuEY37PuN6VCInr1xViqYuZ3UE42flw5ul9gfMBYn+NasfkC5LK\n", + "v/MFSFKM+77SU4RCEuYvb74ILE04jpYn1ATfzCyXXXY4oda2AuF3dl7mtY2A//YVV8YGhJOzknuA\n", + "obGGlI21UovcXoRWoc0JNfUvV1im2ufdIf67TDwub6sj5pKNgYdtwdbCzwInAIMJJ5cXlr8xoxTT\n", + "XMKJxQuEz3GOpCHAz4H/mNkfM++ZTihnAJC0EjDUzO6Oj9cglBsnsmCLwHz728weJpST6/b5aXuP\n", + "vxYjCb+/nYEjM31MytcxnLBfXwCQNJzwHZ9ZZb3z7Y/KUdZ+tlGpxvzec4QkdE3mtT0IZ3als8JB\n", + "hC9zaUKTxJtkap+E5FrxLCKu+y1CATOLUHBvljnj+31m2R2IZ7CZ5/5EvC7Cgmc7+1Ghxkw4QF4l\n", + "c72ZUHA+XOP+2otwgFbdfxXeswah4JsGHFnvGWENMc33WSu8/gKxplfP9xkfXw+clFl+/fidLUQ4\n", + "mflT5rUl42vZGvOjwCqZxyfG9b9DqGUMq+XYJJwQzSFzRk04Gftd5nP19LGf5jtrz2zjs5nHpwJn\n", + "xP+fAZxQtvx0YMcK614CeIOQTI4ktEA8DixFqE3/okpMy8b9MSizf87LfBevAqvFx9PK9u1KhJPg\n", + "hq5PxnUdSazBxM/wGqGQbdYxejzhJHCR+Phowm/6OMJJ/PcILQZfokrLBJlaSjzmHyg79uYC74uP\n", + "ZwA7V4mlUo35wezyhFaPuYTf7oGElosvEgr1g4C94nJzy953CDC+/HfZy+cdRoPXmAknxreUPfd7\n", + "5v9tLkX4/aySiXvNGMOxMabjCCdPR2fedxqhn8DjlLXOADsBD2Ue7w+ck3n8d+CTmd/eCZ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f8pHF+\n", + "fmy63MrFvXySFgL2AvYBtiWcMEjSu4ShAy8ELjez/k6hWMv7/gOsZmavS9oVuBxYt0q84zIPe8ys\n", + "h9CZZGKcxcYF44GPA79JHUg3i7N97QjslziUPLkDGCbxvngLlWsySSMJI825Oqn/ua6JQUg3Ejpk\n", + "XAHcbWZvxecXAzYD9gS2N7N+jSYlaWtgnJntEh8fDcw1s1N7ec//gC3M7IWy583MFmjylrgAuNmM\n", + "s/oTYyeSWAmYBgz2E5Z0JLYHTjNj89Sx5InE34GLzLg4dSzdoFrZ6RaUixozsFMpGWfF524Fbm2w\n", + "aftOYB1Jw4CZwKcJtfP3SBoKPGNmJmk44aTlhfIVVZLp8XpCAzF2HDOekngS2IIwTKdLw5uxKys1\n", + "Z3tidrmSi8ScTcqSlgNWBwZkXv9PpcRdx/rnSDoUuCau9zwzu1/SQfH1s4BPAIdImgO8Dnymjk2s\n", + "B7xNmIvYza9U+HliTsdPGisbD3xbQrFPhHO5kIum7BJJJxKugz0M80YnMrNRqWIqV6k5RuIwYFMz\n", + "vpIorNyS+AhwuJkP6JBCnOXrKeB9cYIRF8WWrieAHc38pLrVvCm7drmoMWd8GljLzN5OHUidxgIX\n", + "pQ4ip24ALpZY0hNDEjsCt/u+X5AZJr3XouOJ2eVG3m6XmgoslzqIesRZakYQZq1xZcx4hXAL2Xap\n", + "Y+lSfn25d37blMudvNWYTwImS7oP3pvI3cxsz4Qx9WVL4BG/5aJXpcLvutSBdKGx4JdYejEB+IXE\n", + "AL9zwOVF3hLzBcApwH3Mu8acn4vglXmNpG/jgV+mDqLbxNm9ViUMP+kqMGOmxCzgg/h+cjmRt8T8\n", + "qpmdljqIOo0FTk4dRM7dDqwjMdiM51IH00XGAD1xti9XXalFxxOzy4W8XWOeJOlkSdtI2rz0lzqo\n", + "aiQGEu7RnZQ6ljwz423CPspN7/ou4a05tfHrzC5X8lZj3pzQdL112fN5LdB3AO6Ks9W43pUKv0tS\n", + "B9INMoPenJI6lgK4AbhQY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W1hSJXYFfAxub8Vrrt+dlZ628V7braLGw+wrwQ4mV2rltib2B\n", + "9YGT2rldVyjnAW8Ah7ZzoxIDgTMIvbBbnpRdfbzGXCc/6ysmiR8A65nxiTZtb1nCpBqfNuOmdmzT\n", + "FZPEuoRWnQ+Z8UibtvkLYFkz9mvH9sI2veyslSfmOvnBVUxxOsgpwFFmXNaG7Z0NzDHjq63elis+\n", + "iaOBEcCurb6dLo4+dzmwUTsHuvGys3belO26QjtHXZIYCewKHN3K7biO8hNgJeCzrdxIHH3uXOBw\n", + "H30uv7zGXCc/6ys2iTMBzDi4RetfglAzP8KMK1qxDdeZJIYDVxA6Yz3bom18jzBn+UfaPdCNl521\n", + "88RcJz+4ik1iGcK138+2YtQliZOAtc34VLPX7TqfxM+AIWbs24J1r0cYR37zFAPdeNlZO0/MdfKD\n", + "q/gk9iLM9NPUUZfilHnXAZv47DyuP+KsaPcBB8cJWZq13oWAG4C/mPGrZq23vhi87KyVX2N2XceM\n", + "ywnTgTZtxKXMlHlHeVJ2/RVvXToYODPe0tQsBxAGT/pNE9fpWsRrzHXys77OEO9pvgcYY8Y9TVjf\n", + "4cAecX3+o3INkbgAeM6MbzVhXasAd5N49DkvO2vniblOfnB1jjjq0gHANo2MuhSnzLsjrsdn53EN\n", + "kxhMaNLe04zbG1iPgMuAKalHn/Oys3belO262XnA68Bh/V1BZsq8H3tSds1ixnPAtwhTly7SwKr2\n", + "Bj6Ajz5XKF5jrpOf9XWWRkddktiXUIAOz8O8z65zxJO+K4GbzOpPrBLLEWrdnzLj5mbHV388XnbW\n", + "yhNznfzg6jz9HXVJ4n2ETmS7mbHAdKLONSozdel2Zvy3zveeA7xtxtdaElydvOysnSfmOvnB1Xli\n", + "U+GdwI/MuLCO910IzDTjOy0LznW9OHXp3sCoWqculRgFXABsaMbLrYyvVl521s6vMbuuF5ugvwL8\n", + "NE4c3yeJ3YCtwadzdC13OrA44RjtUxx97mzga3lJyq4+XmOuk5/1dS6JnwLv62vUpXh/6VRgfzPG\n", + "tyU419UkNgYmEgbFmdnHsicDa+Vt9DkvO2vniblOfnB1rsyoS4eYcXUvy7V9yjznJE4ENjDj470s\n", + "k9vR57zsrJ0n5jr5wdXZJD4MnEWYEu/VCq8nmTLPuTh16d3AMWZcWuH1hYFbgDPM+G274+uLl521\n", + "82vMzmXE8YlvBE4sf82nzHMp1TB16deBl4HftTUw13Qdn5gl/VjS/ZKmSLpU0jJVlttF0nRJD0g6\n", + "st1xulz5FrBPrB1nfRd4FPhz+0NyDsyYRJga8tTs8xJrAscAB/mQsMXX8YkZuBbY0Mw2BWZQYfJ6\n", + "SQMIPR93ATYA9pG0flujbDJJI1PHUIs8xpkZdekciUUljYxT5n0D+GpeC7487stKPM6GHQXsLjEC\n", + "QBowkjD63I/MeDBlYK45Oj4xm9l1Zla69+82YNUKiw0HHjSzR8zsHeBi4KPtirFFRqYOoEYjUwdQ\n", + "xUXAE8B3QKOAc4DjU8xjW4eRqQOo0cjUAdRoZOoAKjFjNvA1wonj4jD6G8Bg4GdpI3PNsnDqANrs\n", + "y4QCt9wqwOOZx0/AAs2YrouYYRKHAHfBPjPi02ekjMm5EjP+LvF54Bew5U7AjmbMSR2Xa46OSMyS\n", + "rgNWrPDSMWb2j7jMscDbZvanCsvlsmnSpWXGoxInwFo/J9x+0u8ZqJxrgcOA++GRKWb8J3Uwrnm6\n", + "4nYpSfsRejOOMbM3K7y+NTDOzHaJj48G5prZqRWW7fwd5pxzLeC3S9WmI2rMvZG0C/AdYESlpBzd\n", + "CawjaRgwE/g0sE+lBf3Acs4510od3/kL+BUwELhO0mRJvwGQtLKkKwHMbA5wKHANMA34s5ndnypg\n", + "55xz3asrmrKdc865ouiGGnNNahlgRNJp8fUpkjar5705ifMRSffEloPbU8YpaT1Jt0h6U9K363lv\n", + "juLM0/78XPy+75F0s6RNan1vjuJsy/6sIcaPxhgnS7pL0uha35ujOHNzbGaW21LSHEkfr/e9XcfM\n", + "uv4PGAA8CAwDFiGMR7t+2TK7AVfF/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Q3p5fTFJNyhYWdIlTdjm1yXt\n", + "2+h6nHPN4/cxO5cTkoYB/zCzjau8/mVgBTP7cRO3OQiYYGatGrLROVcnrzE7lx+nAGvFye1PrfD6\n", + "PsDfISRxSffG/+8n6VJJ/5I0o8p7kXSKpKmSpkj6MYCZvQI8L2nD1nwk51y9fHYp5/LjSGBDM9us\n", + "/AVJA4CNzGxGlfduCnwQeBv4r6TTzOzJzPtXAPYys/Xi42Uy770d2BGY2pyP4ZxrhNeYncuP3qYV\n", + "HQy80svrE8zsFTN7C5hGmBgg6yXgTUnnSfoY8HrmtZkVlnfOJeKJ2bni6C1xv5X5/7vAgOyLZvYu\n", + "Yeq/vwIfAa4uW693NnEuJ7wp27n8eAUYVOW15wizWtVqviQuaSlgKTP7l6R/E6bbK1kJeKSOdTvn\n", + "WshrzM7lhJk9D9ws6d7yDlyxxnufpA9kn878W17jLX88CPiHpCmEKQIPz7w2PD7nnMsBv13KuYKQ\n", + "tB8w1Mwq9rru5zqXJlyf3rJZ63TONcYTs3MFIWlRYDwwwpr0w5X0deAFM/tjM9bnnGucJ2bnnHMu\n", + "R/was3POOZcjnpidc865HPHE7JxzzuWIJ2bnnHMuRzwxO+ecczniidk555zLkf8HPwwVm5UZhFEA\n", + "AAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#plot the required space and time profiles\n", + "%pylab inline\n", + "# wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\n", + "# (a) Plot the space profile at t= T/4\n", + "# Comapring the given Equation with y= A*sin(omega*t - k*x + phi)\n", + "#given\n", + "import math,matplotlib,numpy\n", + "omega = 10*math.pi ; #Angular frequency in rad/s\n", + "k= math.pi/40. ; # Wave number in rad/m\n", + "T= 1/5. ; # 2*pi/T = 10*pi , so Time period is 1/5 s\n", + "lambd = 80.; # Wavelength in m , 2*pi/lambd = pi/40 , so lambd = 80\n", + "#calculations\n", + "t1= T/4; #time period in s\n", + "x1= 0.;# in m\n", + "print\"The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\\n\\n\"\n", + "print\"\\tx (in m) \\t y1(x) (in m)\\n\"\n", + "while x1<180:\n", + "\ty1= 2*sin((omega*t1)-(k*x1)+ (math.pi/4));\n", + "\tprint\"\\t\",x1,\"\\t\\t\",y1,\"\\n\"\n", + "\tx1 = x1+10;\n", + "\n", + "#Now, we will plot the space profile from the values obtained for y1 for each value of x1\n", + "x_1 = numpy.array([0,10.,20.,30.,40.,50.,60.,70.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.]);\n", + "y_1 = numpy.array([1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000]);\n", + "# axis centered at (0,0)\n", + "pyplot.plot(x_1,y_1);\n", + "pyplot.title(\"Space Profile at t = T/4 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"x (in m)\")\n", + "pyplot.ylabel(\"y1(x) (in m)\")\n", + "pyplot.show()\n", + "#(b)\n", + "x2= lambd/8.; #in m\n", + "t2=0; # time period in s\n", + "print\"The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\\n\\n\"\n", + "print\"\\t t(in s) \\t y2(t) (in m)\\n\\n\"\n", + "while t2<0.4:\n", + "\ty2=2*sin((omega*t2)-(k*x2)+ (math.pi/4));\n", + "\tprint \"\\t\",x2,\"\\t\\t\",y2,\"\\n\"\n", + "\tt2=t2+0.025;\n", + "\n", + "#Now,we will plot the time profile from the values obtained for y2 ,for each value of t2\n", + "x_2=numpy.array([0,0.025,0.05,0.075,0.1,0.125,0.15,0.175,0.2,0.22500,0.250000,0.27500,0.30000,0.325000,0.350000,0.37500])\n", + "y_2=numpy.array([0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214])\n", + "# axis centered at (0,0)\n", + "plot(x_2,y_2);\n", + "pyplot.title(\"Time Profile at x = lambd/8 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"t (in s)\")\n", + "pyplot.ylabel(\"y2(t) (in m)\")\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wave parameters from the space profile and time profile\n", + "\n", + " (1)Amplitude is (m) = 0.02\n", + " (2)Wavelength is (m) = 6\n", + " (3)Time period is (s) = 2.0\n", + " (4)Frequency is (Hz) = 0.5\n", + " (5)Angular Frequency is (rad/s) = 3.14\n", + " (6)Wave number is (rad/m) = 1.05\n", + " (7)Initial phase is (radians) = 3.14\n", + " (8)The velocity of wave is (m/s) = 3.0\n", + " (9)Intensity is proportional to : 4.0 x 10^-4 m^2.\n" + ] + } + ], + "source": [ + "#calculate the velocity of wave and Intensity\n", + "#given\n", + "import math\n", + "from math import sin,asin\n", + "#Let us consider, wave function y = A*sin(omega*t - K*x + phi)\n", + "A= 0.02;# Amplitude in m\n", + "lambd = 6; # Wavelength (lambd) = Crest Distance = 6 m\n", + "T= 2.;# Time period is s\n", + "#calculations and results\n", + "nu = 1/T; # Frequency in Hz\n", + "omega = 2*math.pi*nu ; #Angular Frequency in rad/s\n", + "k = 2*math.pi/lambd; #wave number in rad/m\n", + "#from Space profile, when x=1.5 m, t= 0\n", + "y = 0.02; #in m\n", + "x=1.5;#in m\n", + "t= 0; # in s\n", + "phi = (asin(y/A) +(k*x) - (omega*t)); # Initial phase in radians\n", + "print\" Wave parameters from the space profile and time profile\\n\"\n", + "print\" (1)Amplitude is (m) = \",A\n", + "print\" (2)Wavelength is (m) = \",lambd\n", + "print\" (3)Time period is (s) = \",T\n", + "print\" (4)Frequency is (Hz) = \",nu\n", + "print\" (5)Angular Frequency is (rad/s) =\",round(omega,2)\n", + "print\" (6)Wave number is (rad/m) = \",round(k,2)\n", + "print\" (7)Initial phase is (radians) = \",round(phi,2)\n", + "# y(x,t=0) : -0.02 = 0.02*sin(0-(pi*x)/3 + pi)\n", + "#Thus (-pi*x)/3 + pi = -pi/2,-5*pi/2, giving x= 9/2 m,21/2m\n", + "V= omega/k; # Velocity of wave in m/s\n", + "# I is proportional to A**2\n", + "I = A**2; # Intensity in m**2 (Proportional)\n", + "print\" (8)The velocity of wave is (m/s) = \",V\n", + "print\" (9)Intensity is proportional to :\",I*10**4,\"x 10^-4 m^2.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Sound wave :\n", + "Frequency: (Hz) = 440.0\n", + "Velocity: (m/s) = 340.0\n", + "Wavelegth: (m) = 0.773\n", + "Wave number : (m) = 8.13\n", + "Wave Equation for Sound wave: y = A*sin(( 8.13 *x)-( 2764.6 *t)) \n", + "For Light wave :\n", + "Frequency: 5.0 x 10^14 Hz\n", + "Velocity: 3.0 x 10^8 m/s \n", + "Wavelegth: 6.0 x 10^-7 m\n", + "Wave number : 1.05 10^7 m\n", + "Wave Equation for Sound wave: y = A*sin(( 1.05 *10^7*x)-( 3.14 *10^15*t))\n" + ] + } + ], + "source": [ + "#calculate the parameters for light and sound waves\n", + "#(a)Tunning fork \n", + "#given\n", + "import math\n", + "nu= 440.; # Frequency in Hz\n", + "V=340.; # velocity of sound in air in m/s\n", + "#calculations\n", + "lambd= V/nu ;# Wavelength of sound wave in m\n", + "k= 2*math.pi/lambd; # Wave number in m\n", + "#(b) Red Light \n", + "nu1 = 5.*10**14;# Frequency of Red light in Hz\n", + "V1 = 3.*10**8;#Velocity of light in m/s\n", + "lambd1= V1/nu1; #Wavelength of light wave in m\n", + "k1= 2*math.pi/lambd1; # Wave number in m\n", + "#results\n", + "print \"For Sound wave :\" \n", + "print \"Frequency: (Hz) = \",nu\n", + "print \"Velocity: (m/s) = \",V\n", + "print \"Wavelegth: (m) = \",round(lambd,3)\n", + "print \"Wave number : (m) =\",round(k,2)\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k,2),\"*x)-(\",round((2*math.pi*nu),2),\"*t)) \"\n", + "print \"For Light wave :\"\n", + "print \"Frequency: \",nu1*10**-14,\" x 10^14 Hz\" \n", + "print \"Velocity:\",V1*10**-8,\" x 10^8 m/s \"\n", + "print \"Wavelegth:\",lambd1*10**7,\" x 10^-7 m\"\n", + "print \"Wave number : \",round(k1*10**-7,2),\"10^7 m\"\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k1*10**-7,2),\"*10^7*x)-(\",round(2*math.pi*nu1*10**-15,2),\"*10^15*t))\"" + ] + } + ], + "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/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 new file mode 100644 index 00000000..93bc35ac --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_1.ipynb @@ -0,0 +1,935 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 - What is Light" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\n", + "\n", + "\n", + "\tx (in m) \t y1(x) (in m)\n", + "\n", + "\t0.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t20.0 \t\t1.41421356237 \n", + "\n", + "\t30.0 \t\t0.0 \n", + "\n", + "\t40.0 \t\t-1.41421356237 \n", + "\n", + "\t50.0 \t\t-2.0 \n", + "\n", + "\t60.0 \t\t-1.41421356237 \n", + "\n", + "\t70.0 \t\t-2.44929359829e-16 \n", + "\n", + "\t80.0 \t\t1.41421356237 \n", + "\n", + "\t90.0 \t\t2.0 \n", + "\n", + "\t100.0 \t\t1.41421356237 \n", + "\n", + "\t110.0 \t\t2.26621555906e-15 \n", + "\n", + "\t120.0 \t\t-1.41421356237 \n", + "\n", + "\t130.0 \t\t-2.0 \n", + "\n", + "\t140.0 \t\t-1.41421356237 \n", + "\n", + "\t150.0 \t\t-7.34788079488e-16 \n", + "\n", + "\t160.0 \t\t1.41421356237 \n", + "\n", + "\t170.0 \t\t2.0 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAcwAAAEZCAYAAAAaKBUaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJztnXm4HUWZ/z9fwh62sBhWAVnDIoQlBJJIBhUCKiiMIjgK\n", + "4k+dUQRBZJMZIiiLo6CIIjowAgKyqQTBEVSCCfsSdhDCvoYtQFiEkLy/P6pO0vfcc+49997Tp7pP\n", + "v5/nOc+93V3d9T3ddeqteruqXpkZjuM4juP0zSKpBTiO4zhOGXCD6TiO4zgt4AbTcRzHcVrADabj\n", + "OI7jtIAbTMdxHMdpATeYjuM4jtMCb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FM7tV0hTge8BS\n", + "hEX178+mkTQM2MzMHmp0DcISgFsSliX7h6TTzKx+MWsDnjCz0ZJOAX5NWPh9KeBe4MyY7hZCMHDH\n", + "cdqAG0zHaS/HERb4fxv4RoPjKwNzGuyv8VeLYd4k3U+IptEo+kMtYMA9wHAzexN4U9I7kpYzs9cJ\n", + "QX/XGcyXcBynN+6SdZz2sjIwHFiG0ONrRF8xF9/J/D8PGNZPuvmE3iiZ7VpDWHRxbELH6TRuMB2n\n", + "vZwJHANcADR6B/kSwZi2Sl/Gtb/jqxEihDiO0wbcYDpOm5D0BeAdM/stcBKwraSJ2TRmNg+4V9JG\n", + "2d2Zv/U9wkY9RKv7v367xhjg7y1/Acdx+sTDezlOh5G0PzDSzBqOgm1jPucDPzSzGXnm4zhVwXuY\n", + "jtN5LgA+Jqk/d+ugkfQ+QuBoN5aO0ya8h+k4juM4LeA9TMdxHMdpATeYjuM4jtMCbjAdx3EcpwXc\n", + "YDqO4zhOC7jBdBzHcZwWcIPpOI7jOC3w/wHIGArraLdQJwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\n", + "\n", + "\n", + "\t t(in s) \t y2(t) (in m)\n", + "\n", + "\n", + "\t10.0 \t\t0.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.44929359829e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.26621555906e-15 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t7.34788079488e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAeYAAAEZCAYAAABCV4YDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8HFX5x/HPl9BJqImhE2nSEZDQSQUpgogVFUWRpqCi\n", + "KM2fBFCKXUTpKiiCooAoSEnChYB0Q4CEGIrUQOihl5Dn98c5Syab3Xt375Yzs/u8X6/7SnZ3dubZ\n", + "2dnzzDlz5hyZGc4555zLh4VSB+Ccc865eTwxO+ecczniidk555zLEU/MzjnnXI54YnbOOedyxBOz\n", + "c845lyMNJWZJ90nasVnBtIOkJST9Q9JLkv4i6bOSrsm8PlfSmiljbBVJ+0ma1KJ190jav47lH5E0\n", + "pknb3k7SA5JekbRnM9ZZYRtNi9e1lqSrJO1bx/IHSfp5K2PqY/ufy5ZBLd7WYpKmShpa4/KvSBrW\n", + "wPZ+Iung/r4/jyQdLemcfr73UEmn9LmgmVX9A14FXol/c4HXM4/36e29zfwDxgHvxO2+CNwMbN3P\n", + "de0L3AYsVOX1ucCaLfgMjwCj27XPqsSwHzCpReu+HvhyHcv/r3x/ANcAY+P//w94HHgprnuDXtY1\n", + "ATisiZ/l98CJfcXrf03b398B7gVeBh4GjqiwzHHAGi3Y9qLAY8BKmefOBqYD7wJfrPCew4GngNnA\n", + "ecCiZa9/ERjRYFzzfV5gWCybKpZbdaz3MOA3Dbx/DeC4OpZfMe7fRcqe3wa4uey5EfEzlv/2Pgs8\n", + "GvPRZcBy7Tgu69wv+wAXlj33hfh59s88t1gs14b0tr5ea8xmNtDMBpnZoLhjPlJ6bGYX9fbeJjPg\n", + "ohjHEOAm4NJKC0rqqxVgDWCGmc1tboh9M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H3tSds1ixnPAtwhTly7SwKr2\n", + "Bj6Ajz5XKF5jrpOf9XWWRkddktiXUIAOz8O8z65zxJO+K4GbzOpPrBLLEWrdnzLj5mbHV388XnbW\n", + "yhNznfzg6jz9HXVJ4n2ETmS7mbHAdKLONSozdel2Zvy3zveeA7xtxtdaElydvOysnSfmOvnB1Xli\n", + "U+GdwI/MuLCO910IzDTjOy0LznW9OHXp3sCoWqculRgFXABsaMbLrYyvVl521s6vMbuuF5ugvwL8\n", + "NE4c3yeJ3YCtwadzdC13OrA44RjtUxx97mzga3lJyq4+XmOuk5/1dS6JnwLv62vUpXh/6VRgfzPG\n", + "tyU419UkNgYmEgbFmdnHsicDa+Vt9DkvO2vniblOfnB1rsyoS4eYcXUvy7V9yjznJE4ENjDj470s\n", + "k9vR57zsrJ0n5jr5wdXZJD4MnEWYEu/VCq8nmTLPuTh16d3AMWZcWuH1hYFbgDPM+G274+uLl521\n", + "82vMzmXE8YlvBE4sf82nzHMp1TB16deBl4HftTUw13Qdn5gl/VjS/ZKmSLpU0jJVlttF0nRJD0g6\n", + "st1xulz5FrBPrB1nfRd4FPhz+0NyDsyYRJga8tTs8xJrAscAB/mQsMXX8YkZuBbY0Mw2BWZQYfJ6\n", + "SQMIPR93ATYA9pG0flujbDJJI1PHUIs8xpkZdekciUUljYxT5n0D+GpeC7487stKPM6GHQXsLjEC\n", + "QBowkjD63I/MeDBlYK45Oj4xm9l1Zla69+82YNUKiw0HHjSzR8zsHeBi4KPtirFFRqYOoEYjUwdQ\n", + "xUXAE8B3QKOAc4DjU8xjW4eRqQOo0cjUAdRoZOoAKjFjNvA1wonj4jD6G8Bg4GdpI3PNsnDqANrs\n", + "y4QCt9wqwOOZx0/AAs2YrouYYRKHAHfBPjPi02ekjMm5EjP+LvF54Bew5U7AjmbMSR2Xa46OSMyS\n", + "rgNWrPDSMWb2j7jMscDbZvanCsvlsmnSpWXGoxInwFo/J9x+0u8ZqJxrgcOA++GRKWb8J3Uwrnm6\n", + "4nYp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WBQfH/SwE3AzunijOz7Djm7/yVq/3ZS5y52p/A6oSO\n", + "NFv39zMmjrMt+7PGGNdi3q2kmwMP5XRfVoszV8dm2fK/A/Zu9/4s2l/yAPLyB+wK/DcWGkfH5w4C\n", + "Dsosc3p8fQqweW/vzVucwJrxwL8buC91nISxzR8HZgMvAo8BA/O2P6vFmcP9eS7wPDA5/t2ex+Oz\n", + "Wpzt3J81xPjdGMNkYBKwZU73ZcU483Zsli37XmJu9/4s0p8PMOKcc87liF9jds4553LEE7NzzjmX\n", + "I56YnXPOuRzxxOycc87liCdm55xzLkc8MTvnnHM54onZuZyQtIykQ3p5fTFJNyhYWdIlTdjm1yXt\n", + "2+h6nHPN4/cxO5cTkoYB/zCzjau8/mVgBTP7cRO3OQiYYGatGrLROVcnrzE7lx+nAGvFye1PrfD6\n", + "PsDfISRxSffG/+8n6VJJ/5I0o8p7kXSKpKmSpkj6MYCZvQI8L2nD1nwk51y9fHYp5/LjSGBDM9us\n", + "/AVJA4CNzGxGlfduCnwQeBv4r6TTzOzJzPtXAPYys/Xi42Uy770d2BGY2pyP4ZxrhNeYncuP3qYV\n", + "HQy80svrE8zsFTN7C5hGmBgg6yXgTUnnSfoY8HrmtZkVlnfOJeKJ2bni6C1xv5X5/7vAgOyLZvYu\n", + "Yeq/vwIfAa4uW693NnEuJ7wp27n8eAUYVOW15wizWtVqviQuaSlgKTP7l6R/E6bbK1kJeKSOdTvn\n", + "WshrzM7lhJk9D9ws6d7yDlyxxnufpA9kn878W17jLX88CPiHpCmEKQIPz7w2PD7nnMsBv13KuYKQ\n", + "tB8w1Mwq9rru5zqXJlyf3rJZ63TONcYTs3MFIWlRYDwwwpr0w5X0deAFM/tjM9bnnGucJ2bnnHMu\n", + "R/was3POOZcjnpidc865HPHE7JxzzuWIJ2bnnHMuRzwxO+ecczniidk555zLkf8HPwwVm5UZhFEA\n", + "AAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#plot the required space and time profiles\n", + "%pylab inline\n", + "# wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\n", + "# (a) Plot the space profile at t= T/4\n", + "# Comapring the given Equation with y= A*sin(omega*t - k*x + phi)\n", + "#given\n", + "import math,matplotlib,numpy\n", + "omega = 10*math.pi ; #Angular frequency in rad/s\n", + "k= math.pi/40. ; # Wave number in rad/m\n", + "T= 1/5. ; # 2*pi/T = 10*pi , so Time period is 1/5 s\n", + "lambd = 80.; # Wavelength in m , 2*pi/lambd = pi/40 , so lambd = 80\n", + "#calculations\n", + "t1= T/4; #time period in s\n", + "x1= 0.;# in m\n", + "print\"The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\\n\\n\"\n", + "print\"\\tx (in m) \\t y1(x) (in m)\\n\"\n", + "while x1<180:\n", + "\ty1= 2*sin((omega*t1)-(k*x1)+ (math.pi/4));\n", + "\tprint\"\\t\",x1,\"\\t\\t\",y1,\"\\n\"\n", + "\tx1 = x1+10;\n", + "\n", + "#Now, we will plot the space profile from the values obtained for y1 for each value of x1\n", + "x_1 = numpy.array([0,10.,20.,30.,40.,50.,60.,70.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.]);\n", + "y_1 = numpy.array([1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000]);\n", + "# axis centered at (0,0)\n", + "pyplot.plot(x_1,y_1);\n", + "pyplot.title(\"Space Profile at t = T/4 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"x (in m)\")\n", + "pyplot.ylabel(\"y1(x) (in m)\")\n", + "pyplot.show()\n", + "#(b)\n", + "x2= lambd/8.; #in m\n", + "t2=0; # time period in s\n", + "print\"The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\\n\\n\"\n", + "print\"\\t t(in s) \\t y2(t) (in m)\\n\\n\"\n", + "while t2<0.4:\n", + "\ty2=2*sin((omega*t2)-(k*x2)+ (math.pi/4));\n", + "\tprint \"\\t\",x2,\"\\t\\t\",y2,\"\\n\"\n", + "\tt2=t2+0.025;\n", + "\n", + "#Now,we will plot the time profile from the values obtained for y2 ,for each value of t2\n", + "x_2=numpy.array([0,0.025,0.05,0.075,0.1,0.125,0.15,0.175,0.2,0.22500,0.250000,0.27500,0.30000,0.325000,0.350000,0.37500])\n", + "y_2=numpy.array([0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214])\n", + "# axis centered at (0,0)\n", + "plot(x_2,y_2);\n", + "pyplot.title(\"Time Profile at x = lambd/8 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"t (in s)\")\n", + "pyplot.ylabel(\"y2(t) (in m)\")\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wave parameters from the space profile and time profile\n", + "\n", + " (1)Amplitude is (m) = 0.02\n", + " (2)Wavelength is (m) = 6\n", + " (3)Time period is (s) = 2.0\n", + " (4)Frequency is (Hz) = 0.5\n", + " (5)Angular Frequency is (rad/s) = 3.14\n", + " (6)Wave number is (rad/m) = 1.05\n", + " (7)Initial phase is (radians) = 3.14\n", + " (8)The velocity of wave is (m/s) = 3.0\n", + " (9)Intensity is proportional to : 4.0 x 10^-4 m^2.\n" + ] + } + ], + "source": [ + "#calculate the velocity of wave and Intensity\n", + "#given\n", + "import math\n", + "from math import sin,asin\n", + "#Let us consider, wave function y = A*sin(omega*t - K*x + phi)\n", + "A= 0.02;# Amplitude in m\n", + "lambd = 6; # Wavelength (lambd) = Crest Distance = 6 m\n", + "T= 2.;# Time period is s\n", + "#calculations and results\n", + "nu = 1/T; # Frequency in Hz\n", + "omega = 2*math.pi*nu ; #Angular Frequency in rad/s\n", + "k = 2*math.pi/lambd; #wave number in rad/m\n", + "#from Space profile, when x=1.5 m, t= 0\n", + "y = 0.02; #in m\n", + "x=1.5;#in m\n", + "t= 0; # in s\n", + "phi = (asin(y/A) +(k*x) - (omega*t)); # Initial phase in radians\n", + "print\" Wave parameters from the space profile and time profile\\n\"\n", + "print\" (1)Amplitude is (m) = \",A\n", + "print\" (2)Wavelength is (m) = \",lambd\n", + "print\" (3)Time period is (s) = \",T\n", + "print\" (4)Frequency is (Hz) = \",nu\n", + "print\" (5)Angular Frequency is (rad/s) =\",round(omega,2)\n", + "print\" (6)Wave number is (rad/m) = \",round(k,2)\n", + "print\" (7)Initial phase is (radians) = \",round(phi,2)\n", + "# y(x,t=0) : -0.02 = 0.02*sin(0-(pi*x)/3 + pi)\n", + "#Thus (-pi*x)/3 + pi = -pi/2,-5*pi/2, giving x= 9/2 m,21/2m\n", + "V= omega/k; # Velocity of wave in m/s\n", + "# I is proportional to A**2\n", + "I = A**2; # Intensity in m**2 (Proportional)\n", + "print\" (8)The velocity of wave is (m/s) = \",V\n", + "print\" (9)Intensity is proportional to :\",I*10**4,\"x 10^-4 m^2.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Sound wave :\n", + "Frequency: (Hz) = 440.0\n", + "Velocity: (m/s) = 340.0\n", + "Wavelegth: (m) = 0.773\n", + "Wave number : (m) = 8.13\n", + "Wave Equation for Sound wave: y = A*sin(( 8.13 *x)-( 2764.6 *t)) \n", + "For Light wave :\n", + "Frequency: 5.0 x 10^14 Hz\n", + "Velocity: 3.0 x 10^8 m/s \n", + "Wavelegth: 6.0 x 10^-7 m\n", + "Wave number : 1.05 10^7 m\n", + "Wave Equation for Sound wave: y = A*sin(( 1.05 *10^7*x)-( 3.14 *10^15*t))\n" + ] + } + ], + "source": [ + "#calculate the parameters for light and sound waves\n", + "#(a)Tunning fork \n", + "#given\n", + "import math\n", + "nu= 440.; # Frequency in Hz\n", + "V=340.; # velocity of sound in air in m/s\n", + "#calculations\n", + "lambd= V/nu ;# Wavelength of sound wave in m\n", + "k= 2*math.pi/lambd; # Wave number in m\n", + "#(b) Red Light \n", + "nu1 = 5.*10**14;# Frequency of Red light in Hz\n", + "V1 = 3.*10**8;#Velocity of light in m/s\n", + "lambd1= V1/nu1; #Wavelength of light wave in m\n", + "k1= 2*math.pi/lambd1; # Wave number in m\n", + "#results\n", + "print \"For Sound wave :\" \n", + "print \"Frequency: (Hz) = \",nu\n", + "print \"Velocity: (m/s) = \",V\n", + "print \"Wavelegth: (m) = \",round(lambd,3)\n", + "print \"Wave number : (m) =\",round(k,2)\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k,2),\"*x)-(\",round((2*math.pi*nu),2),\"*t)) \"\n", + "print \"For Light wave :\"\n", + "print \"Frequency: \",nu1*10**-14,\" x 10^14 Hz\" \n", + "print \"Velocity:\",V1*10**-8,\" x 10^8 m/s \"\n", + "print \"Wavelegth:\",lambd1*10**7,\" x 10^-7 m\"\n", + "print \"Wave number : \",round(k1*10**-7,2),\"10^7 m\"\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k1*10**-7,2),\"*10^7*x)-(\",round(2*math.pi*nu1*10**-15,2),\"*10^15*t))\"" + ] + } + ], + "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/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 new file mode 100644 index 00000000..6849e540 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter2_2.ipynb @@ -0,0 +1,935 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 - What is Light" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 32" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\n", + "\n", + "\n", + "\tx (in m) \t y1(x) (in m)\n", + "\n", + "\t0.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t20.0 \t\t1.41421356237 \n", + "\n", + "\t30.0 \t\t0.0 \n", + "\n", + "\t40.0 \t\t-1.41421356237 \n", + "\n", + "\t50.0 \t\t-2.0 \n", + "\n", + "\t60.0 \t\t-1.41421356237 \n", + "\n", + "\t70.0 \t\t-2.44929359829e-16 \n", + "\n", + "\t80.0 \t\t1.41421356237 \n", + "\n", + "\t90.0 \t\t2.0 \n", + "\n", + "\t100.0 \t\t1.41421356237 \n", + "\n", + "\t110.0 \t\t2.26621555906e-15 \n", + "\n", + "\t120.0 \t\t-1.41421356237 \n", + "\n", + "\t130.0 \t\t-2.0 \n", + "\n", + "\t140.0 \t\t-1.41421356237 \n", + "\n", + "\t150.0 \t\t-7.34788079488e-16 \n", + "\n", + "\t160.0 \t\t1.41421356237 \n", + "\n", + "\t170.0 \t\t2.0 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAcwAAAEZCAYAAAAaKBU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+ "sRydF8vV7cDExM/viwSPys2xvroRGN3p51eEjy9c4DiO4zgtUEWXrOM4juMMGDeYjuM4jtMCbjAd\n", + "x3EcpwXcYDqO4zhOC7jBdBzHcZwWcIPpOI7jOC3gBtNxOkwMA3adAqtLuiSHPEZKuqr/lI7jtIob\n", + "TMfpPJ8D/miBZ83s0+3OwMJqNbMlbdXuaztOVXGD6ThtQtK2MUDyEpKGx+C/mzRIug9weTxnnVqg\n", + "Xkn7x+DKf1II/nxyg3OR9LikE2Iw39skbaUQKHqmpK9mkk6JeTmO0wYWTS3AcboFM7tV0hTge8BS\n", + "hEX178+mkTQM2MzMHmp0DcISgFsSliX7h6TTzKx+MWsDnjCz0ZJOAX5NWPh9KeBe4MyY7hZCMHDH\n", + "cdqAG0zHaS/HERb4fxv4RoPjKwNzGuyv8VeLYd4k3U+IptEo+kMtYMA9wHAzexN4U9I7kpYzs9cJ\n", + "QX/XGcyXcBynN+6SdZz2sjIwHFiG0ONrRF8xF9/J/D8PGNZPuvmE3iiZ7VpDWHRxbELH6TRuMB2n\n", + "vZwJHANcADR6B/kSwZi2Sl/Gtb/jqxEihDiO0wbcYDpOm5D0BeAdM/stcBKwraSJ2TRmNg+4V9JG\n", + "2d2Zv/U9wkY9RKv7v367xhjg7y1/Acdx+sTDezlOh5G0PzDSzBqOgm1jPucDPzSzGXnm4zhVwXuY\n", + "jtN5LgA+Jqk/d+ugkfQ+QuBoN5aO0ya8h+k4juM4LeA9TMdxHMdpATeYjuM4jtMCbjAdx3EcpwXc\n", + "YDqO4zhOC7jBdBzHcZwWcIPpOI7jOC3w/wHIGArraLdQJwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\n", + "\n", + "\n", + "\t t(in s) \t y2(t) (in m)\n", + "\n", + "\n", + "\t10.0 \t\t0.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.44929359829e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.26621555906e-15 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t2.0 \n", + "\n", + "\t10.0 \t\t1.41421356237 \n", + "\n", + "\t10.0 \t\t7.34788079488e-16 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n", + "\t10.0 \t\t-2.0 \n", + "\n", + "\t10.0 \t\t-1.41421356237 \n", + "\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAeYAAAEZCAYAAABCV4YDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8HFX5x/HPl9BJqImhE2nSEZDQSQUpgogVFUWRpqCi\n", + "KM2fBFCKXUTpKiiCooAoSEnChYB0Q4CEGIrUQOihl5Dn98c5Syab3Xt375Yzs/u8X6/7SnZ3dubZ\n", + "2dnzzDlz5hyZGc4555zLh4VSB+Ccc865eTwxO+ecczniidk555zLEU/MzjnnXI54YnbOOedyxBOz\n", + "c845lyMNJWZJ90nasVnBtIOkJST9Q9JLkv4i6bOSrsm8PlfSmiljbBVJ+0ma1KJ190jav47lH5E0\n", + "pknb3k7SA5JekbRnM9ZZYRtNi9e1lqSrJO1bx/IHSfp5K2PqY/ufy5ZBLd7WYpKmShpa4/KvSBrW\n", + "wPZ+Iung/r4/jyQdLemcfr73UEmn9LmgmVX9A14FXol/c4HXM4/36e29zfwDxgHvxO2+CNwMbN3P\n", + "de0L3AYsVOX1ucCaLfgMjwCj27XPqsSwHzCpReu+HvhyHcv/r3x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jK+ljqWT\n", + "SBwFrGjGN1PH0gm87KxdV9SYXT7FjkreO7txfptUa/j9zC4JT8wuNS/8GiCxGLAdPu54K/wHWFkq\n", + "xFS0roPkMjFLWlzSYqnjcG0xERghsUjqQApqG+B+M15MHUinMeNdwmAj3kHRtVUuErOkhSTtLekS\n", + "SU8C/wMelfSkpL9K+pgkvzbRgcx4hvB9b5k6loLyZuzW8kstru1ykZgJzXBbAD8B1jSzlcxsRWDN\n", + "+NyW+PjUncwLv/7zxNxafueAa7tc9MqWtJiZvdXoMu3gPQubT2IX4GgzRqSOpUji7FxPAEPixCCu\n", + "yWJCfgT4sBnTE4dTaF521i4XNeZSwpX0h/LXSs/lISm7lpkEbCExMHUgBTMSuMWTcutk7hzw68yu\n", + "bXKRmDPmm5xc0sKEJm7Xwcx4jTA62w6pYykYb8ZuD7/U4toqF4lZ0jGSXgE2lvRK6Q94hgWHznSd\n", + "yQu/+nlibo+JwEipa+YWcInl4hpziaRTzOyo1HH0xq+TtIbENsCZZmyaOpYikFgVmEK4vjw3dTyd\n", + "TuIe4AAzbksdS1F52Vm7vNSY1wToLSlLWqt9EbkE7gDWkBiaOpCCGANM9KTcNt6i49omF4kZOFnS\n", + "PyUdKGlzSStJWlnSFnGiiSuBH6YO0rWOGXMIt8SNTh1LQXgzdnt5YnZtk5umbElrA58hDC+4Rnz6\n", + "UeAm4CIzezhVbFneHNM6EocBHzRj/9Sx5Fm8hWcmsL0ZD6WOpxvEOwaeBobGzoquTl521i43ibko\n", + "/OBqHYn1gauBYfE2FVeBxAbAlcCavp/aR+JG4IdmXJM6liLysrN2eWnKRtLSla4jS9okRTwuienA\n", + "woD3J+jdWGC8J+W28+Zs1xa5SMySPkUolP8maZqk4ZmXz08UlmsznwayZn59OQ0faMS1RS4SM3As\n", + "sIWZfRDYD7hA0t5pQ3KJeGLuRZyFawTh3lrXXncAa0kMTh2I62x5ScwDzOwpADO7HRgFHCvpG2nD\n", + "cglMAEZLDEgdSE5tCTxsxrOpA+k2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APdeNlZO0/MdfKD\n", + "q/gk9iLM9NPUUZfilHnXAZv47DyuP+KsaPcBB8cJWZq13oWAG4C/mPGrZq23vhi87KyVX2N2XceM\n", + "ywnTgTZtxKXMlHlHeVJ2/RVvXToYODPe0tQsBxAGT/pNE9fpWsRrzHXys77OEO9pvgcYY8Y9TVjf\n", + "4cAecX3+o3INkbgAeM6MbzVhXasAd5N49DkvO2vniblOfnB1jjjq0gHANo2MuhSnzLsjrsdn53EN\n", + "kxhMaNLe04zbG1iPgMuAKalHn/Oys3belO262XnA68Bh/V1BZsq8H3tSds1ixnPAtwhTly7SwKr2\n", + "Bj6Ajz5XKF5jrpOf9XWWRkddktiXUIAOz8O8z65zxJO+K4GbzOpPrBLLEWrdnzLj5mbHV388XnbW\n", + "yhNznfzg6jz9HXVJ4n2ETmS7mbHAdKLONSozdel2Zvy3zveeA7xtxtdaElydvOysnSfmOvnB1Xli\n", + "U+GdwI/MuLCO910IzDTjOy0LznW9OHXp3sCoWqculRgFXABsaMbLrYyvVl521s6vMbuuF5ugvwL8\n", + "NE4c3yeJ3YCtwadzdC13OrA44RjtUxx97mzga3lJyq4+XmOuk5/1dS6JnwLv62vUpXh/6VRgfzPG\n", + "tyU419UkNgYmEgbFmdnHsicDa+Vt9DkvO2vniblOfnB1rsyoS4eYcXUvy7V9yjznJE4ENjDj470s\n", + "k9vR57zsrJ0n5jr5wdXZJD4MnEWYEu/VCq8nmTLPuTh16d3AMWZcWuH1hYFbgDPM+G274+uLl521\n", + "82vMzmXE8YlvBE4sf82nzHMp1TB16deBl4HftTUw13Qdn5gl/VjS/ZKmSLpU0jJVlttF0nRJD0g6\n", + "st1xulz5FrBPrB1nfRd4FPhz+0NyDsyYRJga8tTs8xJrAscAB/mQsMXX8YkZuBbY0Mw2BWZQYfJ6\n", + "SQMIPR93ATYA9pG0flujbDJJI1PHUIs8xpkZdekciUUljYxT5n0D+GpeC7487stKPM6GHQXsLjEC\n", + "QBowkjD63I/MeDBlYK45Oj4xm9l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vn\n", + "WshrzM7lhJk9D9ws6d7yDlyxxnufpA9kn878W17jLX88CPiHpCmEKQIPz7w2PD7nnMsBv13KuYKQ\n", + "tB8w1Mwq9rru5zqXJlyf3rJZ63TONcYTs3MFIWlRYDwwwpr0w5X0deAFM/tjM9bnnGucJ2bnnHMu\n", + "R/was3POOZcjnpidc865HPHE7JxzzuWIJ2bnnHMuRzwxO+ecczniidk555zLkf8HPwwVm5UZhFEA\n", + "AAAASUVORK5CYII=\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#plot the required space and time profiles\n", + "%matplotlib inline\n", + "# wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\n", + "# (a) Plot the space profile at t= T/4\n", + "# Comapring the given Equation with y= A*sin(omega*t - k*x + phi)\n", + "#given\n", + "import math,matplotlib,numpy\n", + "from matplotlib import pyplot\n", + "omega = 10*math.pi ; #Angular frequency in rad/s\n", + "k= math.pi/40. ; # Wave number in rad/m\n", + "T= 1/5. ; # 2*pi/T = 10*pi , so Time period is 1/5 s\n", + "lambd = 80.; # Wavelength in m , 2*pi/lambd = pi/40 , so lambd = 80\n", + "#calculations\n", + "t1= T/4; #time period in s\n", + "x1= 0.;# in m\n", + "print\"The Space profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when t= T/4\\n\\n\"\n", + "print\"\\tx (in m) \\t y1(x) (in m)\\n\"\n", + "while x1<180:\n", + "\ty1= 2*math.sin((omega*t1)-(k*x1)+ (math.pi/4));\n", + "\tprint\"\\t\",x1,\"\\t\\t\",y1,\"\\n\"\n", + "\tx1 = x1+10;\n", + "\n", + "#Now, we will plot the space profile from the values obtained for y1 for each value of x1\n", + "x_1 = numpy.array([0,10.,20.,30.,40.,50.,60.,70.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.]);\n", + "y_1 = numpy.array([1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000]);\n", + "# axis centered at (0,0)\n", + "pyplot.plot(x_1,y_1);\n", + "pyplot.title(\"Space Profile at t = T/4 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"x (in m)\")\n", + "pyplot.ylabel(\"y1(x) (in m)\")\n", + "pyplot.show()\n", + "#(b)\n", + "x2= lambd/8.; #in m\n", + "t2=0; # time period in s\n", + "print\"The time profile of a wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4) when x= lambd/8\\n\\n\"\n", + "print\"\\t t(in s) \\t y2(t) (in m)\\n\\n\"\n", + "while t2<0.4:\n", + "\ty2=2*math.sin((omega*t2)-(k*x2)+ (math.pi/4));\n", + "\tprint \"\\t\",x2,\"\\t\\t\",y2,\"\\n\"\n", + "\tt2=t2+0.025;\n", + "\n", + "#Now,we will plot the time profile from the values obtained for y2 ,for each value of t2\n", + "x_2=numpy.array([0,0.025,0.05,0.075,0.1,0.125,0.15,0.175,0.2,0.22500,0.250000,0.27500,0.30000,0.325000,0.350000,0.37500])\n", + "y_2=numpy.array([0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214,-0.000000,1.414214,2.000000,1.414214,0.000000,-1.414214,-2.000000,-1.414214])\n", + "# axis centered at (0,0)\n", + "pyplot.plot(x_2,y_2);\n", + "pyplot.title(\"Time Profile at x = lambd/8 for the wave y= 2*sin(10*pi*t - (pi*x)/40 + pi/4)\")\n", + "pyplot.xlabel(\"t (in s)\")\n", + "pyplot.ylabel(\"y2(t) (in m)\")\n", + "pyplot.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wave parameters from the space profile and time profile\n", + "\n", + " (1)Amplitude is (m) = 0.02\n", + " (2)Wavelength is (m) = 6\n", + " (3)Time period is (s) = 2.0\n", + " (4)Frequency is (Hz) = 0.5\n", + " (5)Angular Frequency is (rad/s) = 3.14\n", + " (6)Wave number is (rad/m) = 1.05\n", + " (7)Initial phase is (radians) = 3.14\n", + " (8)The velocity of wave is (m/s) = 3.0\n", + " (9)Intensity is proportional to : 4.0 x 10^-4 m^2.\n" + ] + } + ], + "source": [ + "#calculate the velocity of wave and Intensity\n", + "#given\n", + "import math\n", + "from math import sin,asin\n", + "#Let us consider, wave function y = A*sin(omega*t - K*x + phi)\n", + "A= 0.02;# Amplitude in m\n", + "lambd = 6; # Wavelength (lambd) = Crest Distance = 6 m\n", + "T= 2.;# Time period is s\n", + "#calculations and results\n", + "nu = 1/T; # Frequency in Hz\n", + "omega = 2*math.pi*nu ; #Angular Frequency in rad/s\n", + "k = 2*math.pi/lambd; #wave number in rad/m\n", + "#from Space profile, when x=1.5 m, t= 0\n", + "y = 0.02; #in m\n", + "x=1.5;#in m\n", + "t= 0; # in s\n", + "phi = (asin(y/A) +(k*x) - (omega*t)); # Initial phase in radians\n", + "print\" Wave parameters from the space profile and time profile\\n\"\n", + "print\" (1)Amplitude is (m) = \",A\n", + "print\" (2)Wavelength is (m) = \",lambd\n", + "print\" (3)Time period is (s) = \",T\n", + "print\" (4)Frequency is (Hz) = \",nu\n", + "print\" (5)Angular Frequency is (rad/s) =\",round(omega,2)\n", + "print\" (6)Wave number is (rad/m) = \",round(k,2)\n", + "print\" (7)Initial phase is (radians) = \",round(phi,2)\n", + "# y(x,t=0) : -0.02 = 0.02*sin(0-(pi*x)/3 + pi)\n", + "#Thus (-pi*x)/3 + pi = -pi/2,-5*pi/2, giving x= 9/2 m,21/2m\n", + "V= omega/k; # Velocity of wave in m/s\n", + "# I is proportional to A**2\n", + "I = A**2; # Intensity in m**2 (Proportional)\n", + "print\" (8)The velocity of wave is (m/s) = \",V\n", + "print\" (9)Intensity is proportional to :\",I*10**4,\"x 10^-4 m^2.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 39" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Sound wave :\n", + "Frequency: (Hz) = 440.0\n", + "Velocity: (m/s) = 340.0\n", + "Wavelegth: (m) = 0.773\n", + "Wave number : (m) = 8.13\n", + "Wave Equation for Sound wave: y = A*sin(( 8.13 *x)-( 2764.6 *t)) \n", + "For Light wave :\n", + "Frequency: 5.0 x 10^14 Hz\n", + "Velocity: 3.0 x 10^8 m/s \n", + "Wavelegth: 6.0 x 10^-7 m\n", + "Wave number : 1.05 10^7 m\n", + "Wave Equation for Sound wave: y = A*sin(( 1.05 *10^7*x)-( 3.14 *10^15*t))\n" + ] + } + ], + "source": [ + "#calculate the parameters for light and sound waves\n", + "#(a)Tunning fork \n", + "#given\n", + "import math\n", + "nu= 440.; # Frequency in Hz\n", + "V=340.; # velocity of sound in air in m/s\n", + "#calculations\n", + "lambd= V/nu ;# Wavelength of sound wave in m\n", + "k= 2*math.pi/lambd; # Wave number in m\n", + "#(b) Red Light \n", + "nu1 = 5.*10**14;# Frequency of Red light in Hz\n", + "V1 = 3.*10**8;#Velocity of light in m/s\n", + "lambd1= V1/nu1; #Wavelength of light wave in m\n", + "k1= 2*math.pi/lambd1; # Wave number in m\n", + "#results\n", + "print \"For Sound wave :\" \n", + "print \"Frequency: (Hz) = \",nu\n", + "print \"Velocity: (m/s) = \",V\n", + "print \"Wavelegth: (m) = \",round(lambd,3)\n", + "print \"Wave number : (m) =\",round(k,2)\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k,2),\"*x)-(\",round((2*math.pi*nu),2),\"*t)) \"\n", + "print \"For Light wave :\"\n", + "print \"Frequency: \",nu1*10**-14,\" x 10^14 Hz\" \n", + "print \"Velocity:\",V1*10**-8,\" x 10^8 m/s \"\n", + "print \"Wavelegth:\",lambd1*10**7,\" x 10^-7 m\"\n", + "print \"Wave number : \",round(k1*10**-7,2),\"10^7 m\"\n", + "print \"Wave Equation for Sound wave: y = A*sin((\",round(k1*10**-7,2),\"*10^7*x)-(\",round(2*math.pi*nu1*10**-15,2),\"*10^15*t))\"" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3.ipynb new file mode 100755 index 00000000..e1679d0d --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3.ipynb @@ -0,0 +1,650 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Interference" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 49" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycles : 979.0 , Wavelength 5890.0 A\n", + "Cycles : 978.0 , Wavelength 5896.0 A\n" + ] + } + ], + "source": [ + "#calculate the cycles and wavelength\n", + "#Given :\n", + "lambda1 = 5890. ; # Wavelength in angstroms\n", + "lambda2 = 5896. ; # Wavelength in angstroms\n", + "#For sodium doublet\n", + "nu1 = 5.0934*10**14; #Frequency in Hz\n", + "nu2 = 5.0882*10**14; #Frequency in Hz\n", + "#calculations\n", + "deltanu = nu1-nu2; # Differnece in Frequencies in Hz \n", + "Tc = 1/deltanu ; # Coherence time in s\n", + "\n", + "n1 = Tc*nu1; # Number of Cycles of wavelength 5890 angstroms\n", + "n2 = Tc*nu2;# Number of cycles of wavelegth 5896 angstrom\n", + "#in this coherence time , we have:\n", + "#results\n", + "print\"Cycles :\",round(n1),\", Wavelength\",lambda1,\"A\"\n", + "print\"Cycles :\",round(n2),\", Wavelength\",lambda2,\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 50" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Orange line of Krypton : Coherence Length : \t36.7 cm \n", + " Bandwidth : \t\t8.17 x 10**8 Hz \n", + " Coherence : \t\t0.12 x 10**-8 s \n", + " Degree of Monochromaticity : 1.65 x 10**-6 \n", + "For Laser Source : Coherence Length : \t2446.62 cm \n", + " Bandwidth : \t\t0.12 x 10**8 Hz \n", + " Coherence : \t\t8.16 x 10**-8 s \n", + " Degree of Monochromaticity : 2.48 x 10**-8 \n" + ] + } + ], + "source": [ + "#calculate the coherence length, bandwidth and degree of monochromaticity\n", + "#Given:\n", + "deltalambd1 = 0.01; # The line width of the orange line of krypton,Kr**86 in A\n", + "lambd = 6058; # Wavelength in angstroms = 6058*10**-10 m\n", + "deltalambd2 = 0.00015; # The line width of a laser source in A\n", + "c = 3*10**8 ;# Velocity of light in vacuum in m/s \n", + "#calculations\n", + "nu0 = c/(lambd*10**-10);\n", + "\n", + "#For orange line of Krypton\n", + "Lc1= (lambd**2/deltalambd1)*10**-10; # coherence length in m \n", + "deltanu1 = c/Lc1 ;# bandwidth in Hz\n", + "Tc1 = (Lc1/c);# Coherence time in s \n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi1 = deltanu1/nu0 ; #degree of monochromaticity \n", + "#For Laser Source\n", + "Lc2= (lambd**2/deltalambd2)*10**-10;# coherence length in m\n", + "deltanu2 = c/Lc2 ;# in Hz\n", + "Tc2 = (Lc2/c);#Calculating Coherence time in s\n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi2 = deltanu2/nu0 ;# degree of monochromaticity\n", + "#results\n", + "print\"For Orange line of Krypton : Coherence Length : \\t\",round(Lc1*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu1*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc1*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi1*10**6,2),\"x 10**-6 \"\n", + "print\"For Laser Source : Coherence Length : \\t\",round(Lc2*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu2*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc2*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi2*10**8,2),\"x 10**-8 \",\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 54" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Optical path (mu m) = 7.9515\n", + "Number of waves : 13.5\n", + "The distance in vaccum for those waves is (mu m) = 7.9515\n", + "Phase difference = 85.0\n" + ] + } + ], + "source": [ + "#### calculate the optical path, no of waves and Phase difference\n", + "#(a) \n", + "#Given:\n", + "import math\n", + "lambd = 5890.;# Wavelength in A\n", + "l = 5.89; #thickness of the film in mu m\n", + "mu = 1.35; #refractive index\n", + "delta = mu*l;# optical path in the medium in m\n", + "#calculations\n", + "#(b) (i)Number of waves in the medium\n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "N= (l*10**-6)/(lambd*10**-10/mu); \n", + "#the distance in vaccum for those waves :\n", + "delta1 =N*lambd*10**-10; # optical path in m\n", + "#(b) (ii)Phase difference in the medium \n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "phi = ((2*math.pi)/(lambd*10**-10/mu))*(l*10**-6) ;\n", + "#results\n", + "print\"Optical path (mu m) = \",delta\n", + "print\"Number of waves : \",N\n", + "print\"The distance in vaccum for those waves is (mu m) = \",delta1*10**6\n", + "print\"Phase difference = \",round(phi,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 55" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Parameters \t\t\t Air \t\t\t Water \t\t\t Oil \t\t\tGlass \n", + "Wavelength : \t\t5890.0 A \t\t4428.57142857 A \t\t4237.41007194 A \t\t3591.46341463 A \n", + "Velocity : \t\t3.0 x 10**8 m/s \t\t2.26 x 10**8m/s \t2.16 x 10**8 m/s \t182926829.27 x 10**8 m/s \n", + "Time of travel : \t 33.33 ,x 10**-10 s\t44.33 x 10**-10 s\t46.33 x 10**-10 s\t54.67 x 10**-10 s \n", + "Number of waves: \t 1.7 x 10**6 \t\t2.26 x 10**6 \t\t1.0 x 10**6 \t\t2.78 x10**6 \n", + "Optical path : \t\t 100.0 cm \t\t133.0 cm \t\t139.0 cm \t\t164.0 cm \n", + " The total optical path (cm) = 536.0\n" + ] + } + ], + "source": [ + "#pg 55\n", + "#calculate the Parameters required\n", + "#Given:\n", + "lambd = 5890.; # Wavelength of a beam of sodium light in A\n", + "l = 100.; # thickness in cm\n", + "mu1 = 1.00;#refractive index of air\n", + "mu2 = 1.33;# refractive index of water\n", + "mu3 = 1.39; # refractive index of oil\n", + "mu4 = 1.64; # refractive index of glass\n", + "c = 3.*10**8 ;# Velocity of light in vacuum in m/s\n", + "#calculations\n", + "#For Air :\n", + "lambd1 = lambd/mu1; # wavelength of light in A\n", + "v1 = c/mu1;# Velocity of light in air in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t1 = (l*10**-2/v1); #time of travel in s\n", + "# 1 A = 1*10**-10 m\n", + "N1 = (l*10**-2)/(lambd1*10**-10);# Number of waves \n", + "delta1 = mu1*l; #Optical path in cm\n", + "#For Water :\n", + "lambd2 = lambd/mu2; # wavelength of light in A\n", + "v2 = c/mu2;# Velocity of light in water in m/s\n", + "#1cm = 1*10**-2 m\n", + "t2 = (l*10**-2/v2); #time of travel in s \n", + "#1 A = 1*10**-10 m\n", + "N2 = (l*10**-2)/(lambd2*10**-10);# Number of waves \n", + "delta2 = mu2*l; #Optical path in cm\n", + "#For Oil :\n", + "lambd3 = lambd/mu3; # wavelength of light in A\n", + "v3 = c/mu3;# Velocity of light in Oil in m/s\n", + "#1cm = 1*10**-2 m\n", + "t3 = (l*10**-2/v3); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N3 = (l*10**-2)/(lambd3*10**-10);# Number of waves \n", + "delta3 = mu3*l; #Optical path in cm\n", + "#For Glass: \n", + "lambd4 = lambd/mu4; # wavelength of light in A\n", + "v4 = c/mu4;# Velocity of light in Glass in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t4 = (l*10**-2/v4); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N4 = (l*10**-2)/(lambd4*10**-10);# Number of waves \n", + "delta4 = mu4*l; #Optical path in cm\n", + "delta = delta1+delta2+delta3+delta4; # total optical path in cm\n", + "#results\n", + "print\"Parameters \\t\\t\\t Air \\t\\t\\t Water \\t\\t\\t Oil \\t\\t\\tGlass \"\n", + "print\"Wavelength : \\t\\t\",lambd1,\"A \\t\\t\",lambd2,\" A \\t\\t\",lambd3,\" A \\t\\t\",lambd4,\"A \"\n", + "print\"Velocity : \\t\\t\",v1*10**-8,\" x 10**8 m/s \\t\\t\",round(v2*10**-8,2),\"x 10**8m/s \\t\",round(v3*10**-8,2),\"x 10**8 m/s \\t\",round(v4,2),\"x 10**8 m/s \"\n", + "print\"Time of travel : \\t \",round(t1*10**10,2),\",x 10**-10 s\\t\",round(t2*10**10,2),\"x 10**-10 s\\t\",round(t3*10**10,2),\"x 10**-10 s\\t\",round(t4*10**10,2),\"x 10**-10 s \"\n", + "print\"Number of waves: \\t \",round(N1*10**-6,2),\"x 10**6 \\t\\t\",round(N2*10**-6,2),\"x 10**6 \\t\\t\",round(N3**10**-6,2),\" x 10**6 \\t\\t\",round(N4*10**-6,2),\"x10**6 \"\n", + "print\"Optical path : \\t\\t \",delta1,\"cm \\t\\t\",delta2,\"cm \\t\\t\",delta3,\" cm \\t\\t\",delta4,\"cm \"\n", + "print\" The total optical path (cm) = \",delta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 60" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum number of fringes observable are :\n", + "(a) For a krypton source : 605800.0\n", + "(b) For a laser source : 40386667.0\n" + ] + } + ], + "source": [ + "#calculate the maximum no. of fringes observable\n", + "#Given :\n", + "lambd = 6058;# Wavelength of light in A\n", + "deltalambd1 = 0.01; # line width for a krypton source in A\n", + "deltalambd2 = 0.00015; # line width for a laser source in A\n", + "#calculations\n", + "# The maximum number of fringes is given by n_max = lambd/deltalambd\n", + "# (a) For a krypton source :\n", + "n_max1 = lambd/deltalambd1 ;\n", + "# (b) For a laser source :\n", + "n_max2 = lambd/deltalambd2;\n", + "#results\n", + "print\"The maximum number of fringes observable are :\"\n", + "print\"(a) For a krypton source : \",n_max1\n", + "print\"(b) For a laser source : \",round(n_max2,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " t_max : 6.195 x 10^5 A\n" + ] + } + ], + "source": [ + "#calculate the max thickness\n", + "#Given :\n", + "mu = 1.4;# refractive index of a thin film\n", + "lambd = 5890; # Wavelength of sodium light in A\n", + "deltalambd = 20; #line width in A\n", + "#calculations\n", + "# For observing interference pattern, t < lambd**2/(2*mu*deltalambd)\n", + "t_max = lambd**2/(2*mu*deltalambd); #thickness of the film in A\n", + "#results\n", + "print \" t_max :\",round(t_max*10**-5,3),\"x 10^5 A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wedge angle (rad) = 0.003\n" + ] + } + ], + "source": [ + "#calculate the wedge angle\n", + "#Given:\n", + "lambd = 6000.; # wavelength in A\n", + "mu = 1; #refractive index for air\n", + "# Fringe pattern having 100 fringes per cm\n", + "betaa = 0.01; # fringe width in cm\n", + "#calculations\n", + "# And,We know betaa = lambd/(2*mu*alpha) , so\n", + "# 1 A = 1.0*10**-8 cm\n", + "alpha = lambd*10**-8/(2*mu*betaa); # wedge angle in rad\n", + "#results\n", + "print\"Wedge angle (rad) = \",alpha" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 78" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a)For Sound waves : (m) = 18.76\n", + " (b)For Ultrasonic waves : (m) = 2.5\n", + " (c)For Microwaves : (m) = 0.73\n", + " (d)For IR waves : (mu m) = 250.1\n", + " (e)For Light waves : (mu m) = 14.73\n" + ] + } + ], + "source": [ + "#calculate the distance required\n", + "#Given :\n", + "import math\n", + "from math import sin\n", + "angle = 4*10**-2 ; # angle in rad\n", + "#calculations\n", + "#1 radian = 57.2957795 degrees\n", + "theta = angle ;# in degrees \n", + "# d*sin(theta) = lambd , so d = lambd/(sin(theta)) :\n", + "#(a)For Sound waves \n", + "lambd1 = 0.75; # Wavelength in m\n", + "d1 = lambd1/sin(theta); # distance in m \n", + "#(b)For Ultrasonic waves\n", + "lambd2 = 0.1; # Wwavelength in m\n", + "d2 = lambd2/sin(theta); # distance in m\n", + "#(c)For microwaves \n", + "lambd3 = 2.9 ; # Wavelength in cm\n", + "#1cm = 1.0*10**-2 m\n", + "d3 = lambd3*10**-2/sin(theta); # distance in m\n", + "#(d)For IR waves\n", + "lambd4 = 10; # Wavelength in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "d4 = lambd4*10**-6/sin(theta);# distance in m\n", + "#(e)For light waves \n", + "lambd5 = 5890;# in angstroms\n", + "#1 A = 1.0*10**-10 m\n", + "d5 = lambd5*10**-10/sin(theta); # distance in m\n", + "#results\n", + "print\" (a)For Sound waves : (m) = \",round(d1,2)\n", + "print\" (b)For Ultrasonic waves : (m) = \",round(d2,2)\n", + "print\" (c)For Microwaves : (m) = \",round(d3,2)\n", + "print\" (d)For IR waves : (mu m) = \",round(d4*10**6,1)\n", + "print\" (e)For Light waves : (mu m) = \",round(d5*10**6,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 79" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Intensity \n", + "---> theta = 0.0 degrees\n", + "---> theta = 30.0 degrees\n", + "---> theta = 90.0 degrees\n", + "Minimum Intensity\n", + "--> theta (degrees) = 14.5\n" + ] + } + ], + "source": [ + "#calculate the maximum and minimum intensity\n", + "#Given :\n", + "# Now, the intensity distribution is given by :\n", + "# I = I_1 + I_2 + 2*(I_1*I_2)**0.5 *cos(alpha1- alpha2) , Using alpha = alpha1 - alpha2 and I_1 = I_2 = I_0 \n", + "# I = 2*I_0*(1+ cos(alpha)) \n", + "import math\n", + "nu = 1.2 * 10**6 ; # frequency in Hz\n", + "c = 3*10**8 ; # velocity of light in m/s\n", + "#calculations\n", + "lambd = c/nu ; # wavelength in m\n", + "d = 500; # two identical vertical dipole antenna spaced 500 m apart\n", + "# Directions along which the intensity is maximum :\n", + "print \"Maximum Intensity \"\n", + "for n in range(0,3):\n", + "\ttheta = math.asin((n*lambd)/d) *57.3;# in degrees\n", + "\tprint \"---> theta =\",round(theta,0),\"degrees\"\n", + "\n", + "# Directions for which intensity is minimum :\n", + "n1 =0;\n", + "theta1 = math.asin(((n1 + (1./2.))*lambd)/d) *57.3;#in degrees\n", + "#results\n", + "print\"Minimum Intensity\"\n", + "print\"--> theta (degrees) = \",round(theta1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 81" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The linear expansivity of the metal of the cylinder using Newtons rings apparatus is : 7.9 x 10^-6/K \n" + ] + } + ], + "source": [ + "#calculate the linear expansivity of the metal\n", + "#Given :\n", + "lambd = 5900. ; #Wavelength in A\n", + "delta_T = 150.; # Temperature of the metal cylinder is now raised by 150 K\n", + "p = 20. ; # p is the number of rings shifted due to increase in t_n (t_n is the thickness of the air film)\n", + "l = 5. ; # length of the metal cyclinder in mm\n", + "mu = 1.; #refractive index for air\n", + "#Increase in length = (p*lambd)/2*mu\n", + "# 1 A = 1.0*10**-7 mm\n", + "#calculations\n", + "delta_l = (p*lambd*10**-7)/2*mu; # increase in length in mm\n", + "#Linear expansivity of the metal of the cyclinder \n", + "alpha = (delta_l)/(l*delta_T); # in 1/K\n", + "#results\n", + "print\"The linear expansivity of the metal of the cylinder using Newtons rings apparatus is :\",round(alpha*10**6,1),\"x 10^-6/K \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 83" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wavelength : 6.5 x 10^-4 mm \n" + ] + } + ], + "source": [ + "#calculate the wavelength\n", + "#Given :\n", + "d = 0.065; #distance in mm\n", + "p = 200 ;# 200 fringes cross the field of view\n", + "#Michelson's interferometer arrangement : 2*d = p*lambd\n", + "#calculations\n", + "lambd = 2*d/p;# wavelength in mm\n", + "#results\n", + "print\" Wavelength :\",lambd*10**4,\"x 10^-4 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 84" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of the liquid is 1.211\n" + ] + } + ], + "source": [ + "#calculate the refractive index\n", + "#Given :\n", + "D10_air = 1.75 ;#diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "D10_liquid = 1.59 ; # diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "# The diameter of the nth bright ring in Newton's ring apparatus : D_n = 2*(R*(n + 1/2)*(lambd/mu))^0.5\n", + "#calculations\n", + "mu = (D10_air/D10_liquid)**2;\n", + "#results\n", + "print\"The refractive index of the liquid is \",round(mu,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 85" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The minimum thickness (A) = 996.4\n", + " alpha = 3.14 for MgF2 and 3.37 for lucite\n", + " For MgF2 : I = ( 0.0 )*I_0\n", + " For lucite : I = ( 0.052 )*I_0\n", + "For Lucite : ( 0.052 )*I_0 , indicates 5.16 percentage of the incident light is reflected ,so it is less suitable for coating.\n" + ] + } + ], + "source": [ + "#calculate the minimum thickness and alpha values\n", + "#Given :\n", + "import math\n", + "from math import cos\n", + "lambd = 5500; # Wavelength in A\n", + "mu_f = 1.38; # refractive index for MgF2\n", + "mu_f1 = 1.48; # refractive index for lucite\n", + "#The minimum thickness \n", + "#calculations\n", + "t = lambd/(4*mu_f) ; # thickness in A\n", + "print\"The minimum thickness (A) = \",round(t,1)\n", + "# Resultant reflected intensity = I = 2*I_0*(1 + cos(alpha)) \n", + "# alpha = (2*pi/lambd)*(path difference) \n", + "alpha1 = (2*math.pi/lambd)*(2*mu_f*t); # angle in radians\n", + "alpha2 = (2*math.pi/lambd)*(2*mu_f1*t); # angle in radians\n", + "#results\n", + "print\" alpha =\",round(alpha1,2),\"for MgF2 and\",round(alpha2,2),\"for lucite\"\n", + "print\" For MgF2 : I = (\",2*(1+cos(alpha1)),\")*I_0\"\n", + "print\" For lucite : I = (\",round(2*(1+cos(alpha2)),3),\")*I_0\"\n", + "print\"For Lucite : (\",round(2*(1+cos(alpha2)),3),\")*I_0 , indicates\",round(100*2*(1+cos(alpha2)),2),\" percentage of the incident light is reflected ,so it is less suitable for coating.\"" + ] + } + ], + "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/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 new file mode 100644 index 00000000..e1679d0d --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_1.ipynb @@ -0,0 +1,650 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Interference" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 49" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycles : 979.0 , Wavelength 5890.0 A\n", + "Cycles : 978.0 , Wavelength 5896.0 A\n" + ] + } + ], + "source": [ + "#calculate the cycles and wavelength\n", + "#Given :\n", + "lambda1 = 5890. ; # Wavelength in angstroms\n", + "lambda2 = 5896. ; # Wavelength in angstroms\n", + "#For sodium doublet\n", + "nu1 = 5.0934*10**14; #Frequency in Hz\n", + "nu2 = 5.0882*10**14; #Frequency in Hz\n", + "#calculations\n", + "deltanu = nu1-nu2; # Differnece in Frequencies in Hz \n", + "Tc = 1/deltanu ; # Coherence time in s\n", + "\n", + "n1 = Tc*nu1; # Number of Cycles of wavelength 5890 angstroms\n", + "n2 = Tc*nu2;# Number of cycles of wavelegth 5896 angstrom\n", + "#in this coherence time , we have:\n", + "#results\n", + "print\"Cycles :\",round(n1),\", Wavelength\",lambda1,\"A\"\n", + "print\"Cycles :\",round(n2),\", Wavelength\",lambda2,\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 50" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Orange line of Krypton : Coherence Length : \t36.7 cm \n", + " Bandwidth : \t\t8.17 x 10**8 Hz \n", + " Coherence : \t\t0.12 x 10**-8 s \n", + " Degree of Monochromaticity : 1.65 x 10**-6 \n", + "For Laser Source : Coherence Length : \t2446.62 cm \n", + " Bandwidth : \t\t0.12 x 10**8 Hz \n", + " Coherence : \t\t8.16 x 10**-8 s \n", + " Degree of Monochromaticity : 2.48 x 10**-8 \n" + ] + } + ], + "source": [ + "#calculate the coherence length, bandwidth and degree of monochromaticity\n", + "#Given:\n", + "deltalambd1 = 0.01; # The line width of the orange line of krypton,Kr**86 in A\n", + "lambd = 6058; # Wavelength in angstroms = 6058*10**-10 m\n", + "deltalambd2 = 0.00015; # The line width of a laser source in A\n", + "c = 3*10**8 ;# Velocity of light in vacuum in m/s \n", + "#calculations\n", + "nu0 = c/(lambd*10**-10);\n", + "\n", + "#For orange line of Krypton\n", + "Lc1= (lambd**2/deltalambd1)*10**-10; # coherence length in m \n", + "deltanu1 = c/Lc1 ;# bandwidth in Hz\n", + "Tc1 = (Lc1/c);# Coherence time in s \n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi1 = deltanu1/nu0 ; #degree of monochromaticity \n", + "#For Laser Source\n", + "Lc2= (lambd**2/deltalambd2)*10**-10;# coherence length in m\n", + "deltanu2 = c/Lc2 ;# in Hz\n", + "Tc2 = (Lc2/c);#Calculating Coherence time in s\n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi2 = deltanu2/nu0 ;# degree of monochromaticity\n", + "#results\n", + "print\"For Orange line of Krypton : Coherence Length : \\t\",round(Lc1*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu1*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc1*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi1*10**6,2),\"x 10**-6 \"\n", + "print\"For Laser Source : Coherence Length : \\t\",round(Lc2*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu2*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc2*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi2*10**8,2),\"x 10**-8 \",\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 54" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Optical path (mu m) = 7.9515\n", + "Number of waves : 13.5\n", + "The distance in vaccum for those waves is (mu m) = 7.9515\n", + "Phase difference = 85.0\n" + ] + } + ], + "source": [ + "#### calculate the optical path, no of waves and Phase difference\n", + "#(a) \n", + "#Given:\n", + "import math\n", + "lambd = 5890.;# Wavelength in A\n", + "l = 5.89; #thickness of the film in mu m\n", + "mu = 1.35; #refractive index\n", + "delta = mu*l;# optical path in the medium in m\n", + "#calculations\n", + "#(b) (i)Number of waves in the medium\n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "N= (l*10**-6)/(lambd*10**-10/mu); \n", + "#the distance in vaccum for those waves :\n", + "delta1 =N*lambd*10**-10; # optical path in m\n", + "#(b) (ii)Phase difference in the medium \n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "phi = ((2*math.pi)/(lambd*10**-10/mu))*(l*10**-6) ;\n", + "#results\n", + "print\"Optical path (mu m) = \",delta\n", + "print\"Number of waves : \",N\n", + "print\"The distance in vaccum for those waves is (mu m) = \",delta1*10**6\n", + "print\"Phase difference = \",round(phi,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 55" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Parameters \t\t\t Air \t\t\t Water \t\t\t Oil \t\t\tGlass \n", + "Wavelength : \t\t5890.0 A \t\t4428.57142857 A \t\t4237.41007194 A \t\t3591.46341463 A \n", + "Velocity : \t\t3.0 x 10**8 m/s \t\t2.26 x 10**8m/s \t2.16 x 10**8 m/s \t182926829.27 x 10**8 m/s \n", + "Time of travel : \t 33.33 ,x 10**-10 s\t44.33 x 10**-10 s\t46.33 x 10**-10 s\t54.67 x 10**-10 s \n", + "Number of waves: \t 1.7 x 10**6 \t\t2.26 x 10**6 \t\t1.0 x 10**6 \t\t2.78 x10**6 \n", + "Optical path : \t\t 100.0 cm \t\t133.0 cm \t\t139.0 cm \t\t164.0 cm \n", + " The total optical path (cm) = 536.0\n" + ] + } + ], + "source": [ + "#pg 55\n", + "#calculate the Parameters required\n", + "#Given:\n", + "lambd = 5890.; # Wavelength of a beam of sodium light in A\n", + "l = 100.; # thickness in cm\n", + "mu1 = 1.00;#refractive index of air\n", + "mu2 = 1.33;# refractive index of water\n", + "mu3 = 1.39; # refractive index of oil\n", + "mu4 = 1.64; # refractive index of glass\n", + "c = 3.*10**8 ;# Velocity of light in vacuum in m/s\n", + "#calculations\n", + "#For Air :\n", + "lambd1 = lambd/mu1; # wavelength of light in A\n", + "v1 = c/mu1;# Velocity of light in air in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t1 = (l*10**-2/v1); #time of travel in s\n", + "# 1 A = 1*10**-10 m\n", + "N1 = (l*10**-2)/(lambd1*10**-10);# Number of waves \n", + "delta1 = mu1*l; #Optical path in cm\n", + "#For Water :\n", + "lambd2 = lambd/mu2; # wavelength of light in A\n", + "v2 = c/mu2;# Velocity of light in water in m/s\n", + "#1cm = 1*10**-2 m\n", + "t2 = (l*10**-2/v2); #time of travel in s \n", + "#1 A = 1*10**-10 m\n", + "N2 = (l*10**-2)/(lambd2*10**-10);# Number of waves \n", + "delta2 = mu2*l; #Optical path in cm\n", + "#For Oil :\n", + "lambd3 = lambd/mu3; # wavelength of light in A\n", + "v3 = c/mu3;# Velocity of light in Oil in m/s\n", + "#1cm = 1*10**-2 m\n", + "t3 = (l*10**-2/v3); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N3 = (l*10**-2)/(lambd3*10**-10);# Number of waves \n", + "delta3 = mu3*l; #Optical path in cm\n", + "#For Glass: \n", + "lambd4 = lambd/mu4; # wavelength of light in A\n", + "v4 = c/mu4;# Velocity of light in Glass in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t4 = (l*10**-2/v4); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N4 = (l*10**-2)/(lambd4*10**-10);# Number of waves \n", + "delta4 = mu4*l; #Optical path in cm\n", + "delta = delta1+delta2+delta3+delta4; # total optical path in cm\n", + "#results\n", + "print\"Parameters \\t\\t\\t Air \\t\\t\\t Water \\t\\t\\t Oil \\t\\t\\tGlass \"\n", + "print\"Wavelength : \\t\\t\",lambd1,\"A \\t\\t\",lambd2,\" A \\t\\t\",lambd3,\" A \\t\\t\",lambd4,\"A \"\n", + "print\"Velocity : \\t\\t\",v1*10**-8,\" x 10**8 m/s \\t\\t\",round(v2*10**-8,2),\"x 10**8m/s \\t\",round(v3*10**-8,2),\"x 10**8 m/s \\t\",round(v4,2),\"x 10**8 m/s \"\n", + "print\"Time of travel : \\t \",round(t1*10**10,2),\",x 10**-10 s\\t\",round(t2*10**10,2),\"x 10**-10 s\\t\",round(t3*10**10,2),\"x 10**-10 s\\t\",round(t4*10**10,2),\"x 10**-10 s \"\n", + "print\"Number of waves: \\t \",round(N1*10**-6,2),\"x 10**6 \\t\\t\",round(N2*10**-6,2),\"x 10**6 \\t\\t\",round(N3**10**-6,2),\" x 10**6 \\t\\t\",round(N4*10**-6,2),\"x10**6 \"\n", + "print\"Optical path : \\t\\t \",delta1,\"cm \\t\\t\",delta2,\"cm \\t\\t\",delta3,\" cm \\t\\t\",delta4,\"cm \"\n", + "print\" The total optical path (cm) = \",delta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 60" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum number of fringes observable are :\n", + "(a) For a krypton source : 605800.0\n", + "(b) For a laser source : 40386667.0\n" + ] + } + ], + "source": [ + "#calculate the maximum no. of fringes observable\n", + "#Given :\n", + "lambd = 6058;# Wavelength of light in A\n", + "deltalambd1 = 0.01; # line width for a krypton source in A\n", + "deltalambd2 = 0.00015; # line width for a laser source in A\n", + "#calculations\n", + "# The maximum number of fringes is given by n_max = lambd/deltalambd\n", + "# (a) For a krypton source :\n", + "n_max1 = lambd/deltalambd1 ;\n", + "# (b) For a laser source :\n", + "n_max2 = lambd/deltalambd2;\n", + "#results\n", + "print\"The maximum number of fringes observable are :\"\n", + "print\"(a) For a krypton source : \",n_max1\n", + "print\"(b) For a laser source : \",round(n_max2,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " t_max : 6.195 x 10^5 A\n" + ] + } + ], + "source": [ + "#calculate the max thickness\n", + "#Given :\n", + "mu = 1.4;# refractive index of a thin film\n", + "lambd = 5890; # Wavelength of sodium light in A\n", + "deltalambd = 20; #line width in A\n", + "#calculations\n", + "# For observing interference pattern, t < lambd**2/(2*mu*deltalambd)\n", + "t_max = lambd**2/(2*mu*deltalambd); #thickness of the film in A\n", + "#results\n", + "print \" t_max :\",round(t_max*10**-5,3),\"x 10^5 A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wedge angle (rad) = 0.003\n" + ] + } + ], + "source": [ + "#calculate the wedge angle\n", + "#Given:\n", + "lambd = 6000.; # wavelength in A\n", + "mu = 1; #refractive index for air\n", + "# Fringe pattern having 100 fringes per cm\n", + "betaa = 0.01; # fringe width in cm\n", + "#calculations\n", + "# And,We know betaa = lambd/(2*mu*alpha) , so\n", + "# 1 A = 1.0*10**-8 cm\n", + "alpha = lambd*10**-8/(2*mu*betaa); # wedge angle in rad\n", + "#results\n", + "print\"Wedge angle (rad) = \",alpha" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 78" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a)For Sound waves : (m) = 18.76\n", + " (b)For Ultrasonic waves : (m) = 2.5\n", + " (c)For Microwaves : (m) = 0.73\n", + " (d)For IR waves : (mu m) = 250.1\n", + " (e)For Light waves : (mu m) = 14.73\n" + ] + } + ], + "source": [ + "#calculate the distance required\n", + "#Given :\n", + "import math\n", + "from math import sin\n", + "angle = 4*10**-2 ; # angle in rad\n", + "#calculations\n", + "#1 radian = 57.2957795 degrees\n", + "theta = angle ;# in degrees \n", + "# d*sin(theta) = lambd , so d = lambd/(sin(theta)) :\n", + "#(a)For Sound waves \n", + "lambd1 = 0.75; # Wavelength in m\n", + "d1 = lambd1/sin(theta); # distance in m \n", + "#(b)For Ultrasonic waves\n", + "lambd2 = 0.1; # Wwavelength in m\n", + "d2 = lambd2/sin(theta); # distance in m\n", + "#(c)For microwaves \n", + "lambd3 = 2.9 ; # Wavelength in cm\n", + "#1cm = 1.0*10**-2 m\n", + "d3 = lambd3*10**-2/sin(theta); # distance in m\n", + "#(d)For IR waves\n", + "lambd4 = 10; # Wavelength in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "d4 = lambd4*10**-6/sin(theta);# distance in m\n", + "#(e)For light waves \n", + "lambd5 = 5890;# in angstroms\n", + "#1 A = 1.0*10**-10 m\n", + "d5 = lambd5*10**-10/sin(theta); # distance in m\n", + "#results\n", + "print\" (a)For Sound waves : (m) = \",round(d1,2)\n", + "print\" (b)For Ultrasonic waves : (m) = \",round(d2,2)\n", + "print\" (c)For Microwaves : (m) = \",round(d3,2)\n", + "print\" (d)For IR waves : (mu m) = \",round(d4*10**6,1)\n", + "print\" (e)For Light waves : (mu m) = \",round(d5*10**6,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 79" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Intensity \n", + "---> theta = 0.0 degrees\n", + "---> theta = 30.0 degrees\n", + "---> theta = 90.0 degrees\n", + "Minimum Intensity\n", + "--> theta (degrees) = 14.5\n" + ] + } + ], + "source": [ + "#calculate the maximum and minimum intensity\n", + "#Given :\n", + "# Now, the intensity distribution is given by :\n", + "# I = I_1 + I_2 + 2*(I_1*I_2)**0.5 *cos(alpha1- alpha2) , Using alpha = alpha1 - alpha2 and I_1 = I_2 = I_0 \n", + "# I = 2*I_0*(1+ cos(alpha)) \n", + "import math\n", + "nu = 1.2 * 10**6 ; # frequency in Hz\n", + "c = 3*10**8 ; # velocity of light in m/s\n", + "#calculations\n", + "lambd = c/nu ; # wavelength in m\n", + "d = 500; # two identical vertical dipole antenna spaced 500 m apart\n", + "# Directions along which the intensity is maximum :\n", + "print \"Maximum Intensity \"\n", + "for n in range(0,3):\n", + "\ttheta = math.asin((n*lambd)/d) *57.3;# in degrees\n", + "\tprint \"---> theta =\",round(theta,0),\"degrees\"\n", + "\n", + "# Directions for which intensity is minimum :\n", + "n1 =0;\n", + "theta1 = math.asin(((n1 + (1./2.))*lambd)/d) *57.3;#in degrees\n", + "#results\n", + "print\"Minimum Intensity\"\n", + "print\"--> theta (degrees) = \",round(theta1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 81" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The linear expansivity of the metal of the cylinder using Newtons rings apparatus is : 7.9 x 10^-6/K \n" + ] + } + ], + "source": [ + "#calculate the linear expansivity of the metal\n", + "#Given :\n", + "lambd = 5900. ; #Wavelength in A\n", + "delta_T = 150.; # Temperature of the metal cylinder is now raised by 150 K\n", + "p = 20. ; # p is the number of rings shifted due to increase in t_n (t_n is the thickness of the air film)\n", + "l = 5. ; # length of the metal cyclinder in mm\n", + "mu = 1.; #refractive index for air\n", + "#Increase in length = (p*lambd)/2*mu\n", + "# 1 A = 1.0*10**-7 mm\n", + "#calculations\n", + "delta_l = (p*lambd*10**-7)/2*mu; # increase in length in mm\n", + "#Linear expansivity of the metal of the cyclinder \n", + "alpha = (delta_l)/(l*delta_T); # in 1/K\n", + "#results\n", + "print\"The linear expansivity of the metal of the cylinder using Newtons rings apparatus is :\",round(alpha*10**6,1),\"x 10^-6/K \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 83" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wavelength : 6.5 x 10^-4 mm \n" + ] + } + ], + "source": [ + "#calculate the wavelength\n", + "#Given :\n", + "d = 0.065; #distance in mm\n", + "p = 200 ;# 200 fringes cross the field of view\n", + "#Michelson's interferometer arrangement : 2*d = p*lambd\n", + "#calculations\n", + "lambd = 2*d/p;# wavelength in mm\n", + "#results\n", + "print\" Wavelength :\",lambd*10**4,\"x 10^-4 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 84" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of the liquid is 1.211\n" + ] + } + ], + "source": [ + "#calculate the refractive index\n", + "#Given :\n", + "D10_air = 1.75 ;#diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "D10_liquid = 1.59 ; # diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "# The diameter of the nth bright ring in Newton's ring apparatus : D_n = 2*(R*(n + 1/2)*(lambd/mu))^0.5\n", + "#calculations\n", + "mu = (D10_air/D10_liquid)**2;\n", + "#results\n", + "print\"The refractive index of the liquid is \",round(mu,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 85" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The minimum thickness (A) = 996.4\n", + " alpha = 3.14 for MgF2 and 3.37 for lucite\n", + " For MgF2 : I = ( 0.0 )*I_0\n", + " For lucite : I = ( 0.052 )*I_0\n", + "For Lucite : ( 0.052 )*I_0 , indicates 5.16 percentage of the incident light is reflected ,so it is less suitable for coating.\n" + ] + } + ], + "source": [ + "#calculate the minimum thickness and alpha values\n", + "#Given :\n", + "import math\n", + "from math import cos\n", + "lambd = 5500; # Wavelength in A\n", + "mu_f = 1.38; # refractive index for MgF2\n", + "mu_f1 = 1.48; # refractive index for lucite\n", + "#The minimum thickness \n", + "#calculations\n", + "t = lambd/(4*mu_f) ; # thickness in A\n", + "print\"The minimum thickness (A) = \",round(t,1)\n", + "# Resultant reflected intensity = I = 2*I_0*(1 + cos(alpha)) \n", + "# alpha = (2*pi/lambd)*(path difference) \n", + "alpha1 = (2*math.pi/lambd)*(2*mu_f*t); # angle in radians\n", + "alpha2 = (2*math.pi/lambd)*(2*mu_f1*t); # angle in radians\n", + "#results\n", + "print\" alpha =\",round(alpha1,2),\"for MgF2 and\",round(alpha2,2),\"for lucite\"\n", + "print\" For MgF2 : I = (\",2*(1+cos(alpha1)),\")*I_0\"\n", + "print\" For lucite : I = (\",round(2*(1+cos(alpha2)),3),\")*I_0\"\n", + "print\"For Lucite : (\",round(2*(1+cos(alpha2)),3),\")*I_0 , indicates\",round(100*2*(1+cos(alpha2)),2),\" percentage of the incident light is reflected ,so it is less suitable for coating.\"" + ] + } + ], + "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/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 new file mode 100644 index 00000000..e1679d0d --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter3_2.ipynb @@ -0,0 +1,650 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Interference" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 49" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycles : 979.0 , Wavelength 5890.0 A\n", + "Cycles : 978.0 , Wavelength 5896.0 A\n" + ] + } + ], + "source": [ + "#calculate the cycles and wavelength\n", + "#Given :\n", + "lambda1 = 5890. ; # Wavelength in angstroms\n", + "lambda2 = 5896. ; # Wavelength in angstroms\n", + "#For sodium doublet\n", + "nu1 = 5.0934*10**14; #Frequency in Hz\n", + "nu2 = 5.0882*10**14; #Frequency in Hz\n", + "#calculations\n", + "deltanu = nu1-nu2; # Differnece in Frequencies in Hz \n", + "Tc = 1/deltanu ; # Coherence time in s\n", + "\n", + "n1 = Tc*nu1; # Number of Cycles of wavelength 5890 angstroms\n", + "n2 = Tc*nu2;# Number of cycles of wavelegth 5896 angstrom\n", + "#in this coherence time , we have:\n", + "#results\n", + "print\"Cycles :\",round(n1),\", Wavelength\",lambda1,\"A\"\n", + "print\"Cycles :\",round(n2),\", Wavelength\",lambda2,\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 50" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For Orange line of Krypton : Coherence Length : \t36.7 cm \n", + " Bandwidth : \t\t8.17 x 10**8 Hz \n", + " Coherence : \t\t0.12 x 10**-8 s \n", + " Degree of Monochromaticity : 1.65 x 10**-6 \n", + "For Laser Source : Coherence Length : \t2446.62 cm \n", + " Bandwidth : \t\t0.12 x 10**8 Hz \n", + " Coherence : \t\t8.16 x 10**-8 s \n", + " Degree of Monochromaticity : 2.48 x 10**-8 \n" + ] + } + ], + "source": [ + "#calculate the coherence length, bandwidth and degree of monochromaticity\n", + "#Given:\n", + "deltalambd1 = 0.01; # The line width of the orange line of krypton,Kr**86 in A\n", + "lambd = 6058; # Wavelength in angstroms = 6058*10**-10 m\n", + "deltalambd2 = 0.00015; # The line width of a laser source in A\n", + "c = 3*10**8 ;# Velocity of light in vacuum in m/s \n", + "#calculations\n", + "nu0 = c/(lambd*10**-10);\n", + "\n", + "#For orange line of Krypton\n", + "Lc1= (lambd**2/deltalambd1)*10**-10; # coherence length in m \n", + "deltanu1 = c/Lc1 ;# bandwidth in Hz\n", + "Tc1 = (Lc1/c);# Coherence time in s \n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi1 = deltanu1/nu0 ; #degree of monochromaticity \n", + "#For Laser Source\n", + "Lc2= (lambd**2/deltalambd2)*10**-10;# coherence length in m\n", + "deltanu2 = c/Lc2 ;# in Hz\n", + "Tc2 = (Lc2/c);#Calculating Coherence time in s\n", + "#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A\n", + "Xi2 = deltanu2/nu0 ;# degree of monochromaticity\n", + "#results\n", + "print\"For Orange line of Krypton : Coherence Length : \\t\",round(Lc1*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu1*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc1*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi1*10**6,2),\"x 10**-6 \"\n", + "print\"For Laser Source : Coherence Length : \\t\",round(Lc2*100,2),\" cm \\n Bandwidth : \\t\\t\",round(deltanu2*10**-8,2),\" x 10**8 Hz \\n Coherence : \\t\\t\",round(Tc2*10**8,2),\"x 10**-8 s \\n Degree of Monochromaticity : \",round(Xi2*10**8,2),\"x 10**-8 \",\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 54" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Optical path (mu m) = 7.9515\n", + "Number of waves : 13.5\n", + "The distance in vaccum for those waves is (mu m) = 7.9515\n", + "Phase difference = 85.0\n" + ] + } + ], + "source": [ + "#### calculate the optical path, no of waves and Phase difference\n", + "#(a) \n", + "#Given:\n", + "import math\n", + "lambd = 5890.;# Wavelength in A\n", + "l = 5.89; #thickness of the film in mu m\n", + "mu = 1.35; #refractive index\n", + "delta = mu*l;# optical path in the medium in m\n", + "#calculations\n", + "#(b) (i)Number of waves in the medium\n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "N= (l*10**-6)/(lambd*10**-10/mu); \n", + "#the distance in vaccum for those waves :\n", + "delta1 =N*lambd*10**-10; # optical path in m\n", + "#(b) (ii)Phase difference in the medium \n", + "#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m\n", + "phi = ((2*math.pi)/(lambd*10**-10/mu))*(l*10**-6) ;\n", + "#results\n", + "print\"Optical path (mu m) = \",delta\n", + "print\"Number of waves : \",N\n", + "print\"The distance in vaccum for those waves is (mu m) = \",delta1*10**6\n", + "print\"Phase difference = \",round(phi,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 55" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Parameters \t\t\t Air \t\t\t Water \t\t\t Oil \t\t\tGlass \n", + "Wavelength : \t\t5890.0 A \t\t4428.57142857 A \t\t4237.41007194 A \t\t3591.46341463 A \n", + "Velocity : \t\t3.0 x 10**8 m/s \t\t2.26 x 10**8m/s \t2.16 x 10**8 m/s \t182926829.27 x 10**8 m/s \n", + "Time of travel : \t 33.33 ,x 10**-10 s\t44.33 x 10**-10 s\t46.33 x 10**-10 s\t54.67 x 10**-10 s \n", + "Number of waves: \t 1.7 x 10**6 \t\t2.26 x 10**6 \t\t1.0 x 10**6 \t\t2.78 x10**6 \n", + "Optical path : \t\t 100.0 cm \t\t133.0 cm \t\t139.0 cm \t\t164.0 cm \n", + " The total optical path (cm) = 536.0\n" + ] + } + ], + "source": [ + "#pg 55\n", + "#calculate the Parameters required\n", + "#Given:\n", + "lambd = 5890.; # Wavelength of a beam of sodium light in A\n", + "l = 100.; # thickness in cm\n", + "mu1 = 1.00;#refractive index of air\n", + "mu2 = 1.33;# refractive index of water\n", + "mu3 = 1.39; # refractive index of oil\n", + "mu4 = 1.64; # refractive index of glass\n", + "c = 3.*10**8 ;# Velocity of light in vacuum in m/s\n", + "#calculations\n", + "#For Air :\n", + "lambd1 = lambd/mu1; # wavelength of light in A\n", + "v1 = c/mu1;# Velocity of light in air in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t1 = (l*10**-2/v1); #time of travel in s\n", + "# 1 A = 1*10**-10 m\n", + "N1 = (l*10**-2)/(lambd1*10**-10);# Number of waves \n", + "delta1 = mu1*l; #Optical path in cm\n", + "#For Water :\n", + "lambd2 = lambd/mu2; # wavelength of light in A\n", + "v2 = c/mu2;# Velocity of light in water in m/s\n", + "#1cm = 1*10**-2 m\n", + "t2 = (l*10**-2/v2); #time of travel in s \n", + "#1 A = 1*10**-10 m\n", + "N2 = (l*10**-2)/(lambd2*10**-10);# Number of waves \n", + "delta2 = mu2*l; #Optical path in cm\n", + "#For Oil :\n", + "lambd3 = lambd/mu3; # wavelength of light in A\n", + "v3 = c/mu3;# Velocity of light in Oil in m/s\n", + "#1cm = 1*10**-2 m\n", + "t3 = (l*10**-2/v3); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N3 = (l*10**-2)/(lambd3*10**-10);# Number of waves \n", + "delta3 = mu3*l; #Optical path in cm\n", + "#For Glass: \n", + "lambd4 = lambd/mu4; # wavelength of light in A\n", + "v4 = c/mu4;# Velocity of light in Glass in m/s\n", + "# 1cm = 1*10**-2 m\n", + "t4 = (l*10**-2/v4); #time of travel in s\n", + "#1 A = 1*10**-10 m\n", + "N4 = (l*10**-2)/(lambd4*10**-10);# Number of waves \n", + "delta4 = mu4*l; #Optical path in cm\n", + "delta = delta1+delta2+delta3+delta4; # total optical path in cm\n", + "#results\n", + "print\"Parameters \\t\\t\\t Air \\t\\t\\t Water \\t\\t\\t Oil \\t\\t\\tGlass \"\n", + "print\"Wavelength : \\t\\t\",lambd1,\"A \\t\\t\",lambd2,\" A \\t\\t\",lambd3,\" A \\t\\t\",lambd4,\"A \"\n", + "print\"Velocity : \\t\\t\",v1*10**-8,\" x 10**8 m/s \\t\\t\",round(v2*10**-8,2),\"x 10**8m/s \\t\",round(v3*10**-8,2),\"x 10**8 m/s \\t\",round(v4,2),\"x 10**8 m/s \"\n", + "print\"Time of travel : \\t \",round(t1*10**10,2),\",x 10**-10 s\\t\",round(t2*10**10,2),\"x 10**-10 s\\t\",round(t3*10**10,2),\"x 10**-10 s\\t\",round(t4*10**10,2),\"x 10**-10 s \"\n", + "print\"Number of waves: \\t \",round(N1*10**-6,2),\"x 10**6 \\t\\t\",round(N2*10**-6,2),\"x 10**6 \\t\\t\",round(N3**10**-6,2),\" x 10**6 \\t\\t\",round(N4*10**-6,2),\"x10**6 \"\n", + "print\"Optical path : \\t\\t \",delta1,\"cm \\t\\t\",delta2,\"cm \\t\\t\",delta3,\" cm \\t\\t\",delta4,\"cm \"\n", + "print\" The total optical path (cm) = \",delta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 60" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum number of fringes observable are :\n", + "(a) For a krypton source : 605800.0\n", + "(b) For a laser source : 40386667.0\n" + ] + } + ], + "source": [ + "#calculate the maximum no. of fringes observable\n", + "#Given :\n", + "lambd = 6058;# Wavelength of light in A\n", + "deltalambd1 = 0.01; # line width for a krypton source in A\n", + "deltalambd2 = 0.00015; # line width for a laser source in A\n", + "#calculations\n", + "# The maximum number of fringes is given by n_max = lambd/deltalambd\n", + "# (a) For a krypton source :\n", + "n_max1 = lambd/deltalambd1 ;\n", + "# (b) For a laser source :\n", + "n_max2 = lambd/deltalambd2;\n", + "#results\n", + "print\"The maximum number of fringes observable are :\"\n", + "print\"(a) For a krypton source : \",n_max1\n", + "print\"(b) For a laser source : \",round(n_max2,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " t_max : 6.195 x 10^5 A\n" + ] + } + ], + "source": [ + "#calculate the max thickness\n", + "#Given :\n", + "mu = 1.4;# refractive index of a thin film\n", + "lambd = 5890; # Wavelength of sodium light in A\n", + "deltalambd = 20; #line width in A\n", + "#calculations\n", + "# For observing interference pattern, t < lambd**2/(2*mu*deltalambd)\n", + "t_max = lambd**2/(2*mu*deltalambd); #thickness of the film in A\n", + "#results\n", + "print \" t_max :\",round(t_max*10**-5,3),\"x 10^5 A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 61" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wedge angle (rad) = 0.003\n" + ] + } + ], + "source": [ + "#calculate the wedge angle\n", + "#Given:\n", + "lambd = 6000.; # wavelength in A\n", + "mu = 1; #refractive index for air\n", + "# Fringe pattern having 100 fringes per cm\n", + "betaa = 0.01; # fringe width in cm\n", + "#calculations\n", + "# And,We know betaa = lambd/(2*mu*alpha) , so\n", + "# 1 A = 1.0*10**-8 cm\n", + "alpha = lambd*10**-8/(2*mu*betaa); # wedge angle in rad\n", + "#results\n", + "print\"Wedge angle (rad) = \",alpha" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 78" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (a)For Sound waves : (m) = 18.76\n", + " (b)For Ultrasonic waves : (m) = 2.5\n", + " (c)For Microwaves : (m) = 0.73\n", + " (d)For IR waves : (mu m) = 250.1\n", + " (e)For Light waves : (mu m) = 14.73\n" + ] + } + ], + "source": [ + "#calculate the distance required\n", + "#Given :\n", + "import math\n", + "from math import sin\n", + "angle = 4*10**-2 ; # angle in rad\n", + "#calculations\n", + "#1 radian = 57.2957795 degrees\n", + "theta = angle ;# in degrees \n", + "# d*sin(theta) = lambd , so d = lambd/(sin(theta)) :\n", + "#(a)For Sound waves \n", + "lambd1 = 0.75; # Wavelength in m\n", + "d1 = lambd1/sin(theta); # distance in m \n", + "#(b)For Ultrasonic waves\n", + "lambd2 = 0.1; # Wwavelength in m\n", + "d2 = lambd2/sin(theta); # distance in m\n", + "#(c)For microwaves \n", + "lambd3 = 2.9 ; # Wavelength in cm\n", + "#1cm = 1.0*10**-2 m\n", + "d3 = lambd3*10**-2/sin(theta); # distance in m\n", + "#(d)For IR waves\n", + "lambd4 = 10; # Wavelength in mu_m\n", + "# 1 mu_m = 1.0*10**-6 m\n", + "d4 = lambd4*10**-6/sin(theta);# distance in m\n", + "#(e)For light waves \n", + "lambd5 = 5890;# in angstroms\n", + "#1 A = 1.0*10**-10 m\n", + "d5 = lambd5*10**-10/sin(theta); # distance in m\n", + "#results\n", + "print\" (a)For Sound waves : (m) = \",round(d1,2)\n", + "print\" (b)For Ultrasonic waves : (m) = \",round(d2,2)\n", + "print\" (c)For Microwaves : (m) = \",round(d3,2)\n", + "print\" (d)For IR waves : (mu m) = \",round(d4*10**6,1)\n", + "print\" (e)For Light waves : (mu m) = \",round(d5*10**6,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 79" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Intensity \n", + "---> theta = 0.0 degrees\n", + "---> theta = 30.0 degrees\n", + "---> theta = 90.0 degrees\n", + "Minimum Intensity\n", + "--> theta (degrees) = 14.5\n" + ] + } + ], + "source": [ + "#calculate the maximum and minimum intensity\n", + "#Given :\n", + "# Now, the intensity distribution is given by :\n", + "# I = I_1 + I_2 + 2*(I_1*I_2)**0.5 *cos(alpha1- alpha2) , Using alpha = alpha1 - alpha2 and I_1 = I_2 = I_0 \n", + "# I = 2*I_0*(1+ cos(alpha)) \n", + "import math\n", + "nu = 1.2 * 10**6 ; # frequency in Hz\n", + "c = 3*10**8 ; # velocity of light in m/s\n", + "#calculations\n", + "lambd = c/nu ; # wavelength in m\n", + "d = 500; # two identical vertical dipole antenna spaced 500 m apart\n", + "# Directions along which the intensity is maximum :\n", + "print \"Maximum Intensity \"\n", + "for n in range(0,3):\n", + "\ttheta = math.asin((n*lambd)/d) *57.3;# in degrees\n", + "\tprint \"---> theta =\",round(theta,0),\"degrees\"\n", + "\n", + "# Directions for which intensity is minimum :\n", + "n1 =0;\n", + "theta1 = math.asin(((n1 + (1./2.))*lambd)/d) *57.3;#in degrees\n", + "#results\n", + "print\"Minimum Intensity\"\n", + "print\"--> theta (degrees) = \",round(theta1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15 - pg 81" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The linear expansivity of the metal of the cylinder using Newtons rings apparatus is : 7.9 x 10^-6/K \n" + ] + } + ], + "source": [ + "#calculate the linear expansivity of the metal\n", + "#Given :\n", + "lambd = 5900. ; #Wavelength in A\n", + "delta_T = 150.; # Temperature of the metal cylinder is now raised by 150 K\n", + "p = 20. ; # p is the number of rings shifted due to increase in t_n (t_n is the thickness of the air film)\n", + "l = 5. ; # length of the metal cyclinder in mm\n", + "mu = 1.; #refractive index for air\n", + "#Increase in length = (p*lambd)/2*mu\n", + "# 1 A = 1.0*10**-7 mm\n", + "#calculations\n", + "delta_l = (p*lambd*10**-7)/2*mu; # increase in length in mm\n", + "#Linear expansivity of the metal of the cyclinder \n", + "alpha = (delta_l)/(l*delta_T); # in 1/K\n", + "#results\n", + "print\"The linear expansivity of the metal of the cylinder using Newtons rings apparatus is :\",round(alpha*10**6,1),\"x 10^-6/K \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16 - pg 83" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Wavelength : 6.5 x 10^-4 mm \n" + ] + } + ], + "source": [ + "#calculate the wavelength\n", + "#Given :\n", + "d = 0.065; #distance in mm\n", + "p = 200 ;# 200 fringes cross the field of view\n", + "#Michelson's interferometer arrangement : 2*d = p*lambd\n", + "#calculations\n", + "lambd = 2*d/p;# wavelength in mm\n", + "#results\n", + "print\" Wavelength :\",lambd*10**4,\"x 10^-4 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 84" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The refractive index of the liquid is 1.211\n" + ] + } + ], + "source": [ + "#calculate the refractive index\n", + "#Given :\n", + "D10_air = 1.75 ;#diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "D10_liquid = 1.59 ; # diameter of the 10th bright ring in Newton's ring apparatus in cm\n", + "# The diameter of the nth bright ring in Newton's ring apparatus : D_n = 2*(R*(n + 1/2)*(lambd/mu))^0.5\n", + "#calculations\n", + "mu = (D10_air/D10_liquid)**2;\n", + "#results\n", + "print\"The refractive index of the liquid is \",round(mu,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18 - pg 85" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The minimum thickness (A) = 996.4\n", + " alpha = 3.14 for MgF2 and 3.37 for lucite\n", + " For MgF2 : I = ( 0.0 )*I_0\n", + " For lucite : I = ( 0.052 )*I_0\n", + "For Lucite : ( 0.052 )*I_0 , indicates 5.16 percentage of the incident light is reflected ,so it is less suitable for coating.\n" + ] + } + ], + "source": [ + "#calculate the minimum thickness and alpha values\n", + "#Given :\n", + "import math\n", + "from math import cos\n", + "lambd = 5500; # Wavelength in A\n", + "mu_f = 1.38; # refractive index for MgF2\n", + "mu_f1 = 1.48; # refractive index for lucite\n", + "#The minimum thickness \n", + "#calculations\n", + "t = lambd/(4*mu_f) ; # thickness in A\n", + "print\"The minimum thickness (A) = \",round(t,1)\n", + "# Resultant reflected intensity = I = 2*I_0*(1 + cos(alpha)) \n", + "# alpha = (2*pi/lambd)*(path difference) \n", + "alpha1 = (2*math.pi/lambd)*(2*mu_f*t); # angle in radians\n", + "alpha2 = (2*math.pi/lambd)*(2*mu_f1*t); # angle in radians\n", + "#results\n", + "print\" alpha =\",round(alpha1,2),\"for MgF2 and\",round(alpha2,2),\"for lucite\"\n", + "print\" For MgF2 : I = (\",2*(1+cos(alpha1)),\")*I_0\"\n", + "print\" For lucite : I = (\",round(2*(1+cos(alpha2)),3),\")*I_0\"\n", + "print\"For Lucite : (\",round(2*(1+cos(alpha2)),3),\")*I_0 , indicates\",round(100*2*(1+cos(alpha2)),2),\" percentage of the incident light is reflected ,so it is less suitable for coating.\"" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4.ipynb new file mode 100755 index 00000000..149cb0a8 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4.ipynb @@ -0,0 +1,369 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 101" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta (degrees) = 0.412\n", + "When p = 0\n", + "theta (degrees) = 0.026\n", + "When p = 1\n", + "theta (degrees) = 0.078\n", + "When p = 2\n", + "theta (degrees) = 0.129\n", + "When p = 3\n", + "theta (degrees) = 0.181\n", + "When p = 4\n", + "theta (degrees) = 0.233\n", + "When p = 5\n", + "theta (degrees) = 0.285\n", + "When p = 6\n", + "theta (degrees) = 0.337\n", + "When p = 7\n", + "theta (degrees) = 0.388\n", + "When p = 8\n", + "theta (degrees) = 0.44\n", + " When p >= 8 , theta > 0.412042642025 degrees .\n", + "\n", + "Between the first two diffraction minima , 16 interference minima are possible.\n" + ] + } + ], + "source": [ + "#pg 101\n", + "#calculate the no. of interference minima\n", + "#Given :\n", + "import math\n", + "d = 8.8*10**-2 ; # slit width in mm\n", + "b = 0.7;# seperation between slits in mm\n", + "lambd = 6328. ; #Wavelength in A\n", + "#First diffraction minima is possible, when d*sin(theta) = lambd\n", + "# 1 A = 1.0*10**-7 mm\n", + "#cakculations and results\n", + "theta = math.asin((lambd*10**-7)/d)*57.3; # angle in degrees\n", + "print\"theta (degrees) = \",round(theta,3)\n", + "#interference minima is possible , when sin(theta) = ((p + 1/2)*lambd)/b\n", + "for p in range (0,10):\n", + " #1 A = 1.0*10**-7 mm\n", + " theta1 = math.asin((p + 1/2.)*(lambd*10**-7/b))*57.3; # angle in degrees \n", + " print\"When p = \",p\n", + " print\"theta (degrees) = \",round(theta1,3)\n", + " if(theta1 > theta):\n", + " \tprint\" When p >=\",p,\", theta >\",theta,\"degrees .\\n\\nBetween the first two diffraction minima ,\",2*p,\"interference minima are possible.\"\n", + " \tbreak;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 111" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For line D1 and Wavelength 5890 A: \n", + " Angles at which first order and second order maxima will be observed are : \n", + " Order : 1 , 20.356 degrees \n", + " Order : 2 , 44.084 degrees \n", + "For line D2 and Wavelength 5895.9 A : \n", + " Angles at which first order and second order maxima will be observed are : \n", + "Order : 1 , 20.378 degrees \n", + "Order : 2 , 44.139 degrees \n", + " When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\n" + ] + } + ], + "source": [ + "#pg 111\n", + "#calculate the angles requried\n", + "#Given :\n", + "import math\n", + "# a+b = (2.54/N)cm\n", + "N = 15000.;#grating has 15000 lines\n", + "#calculations and results\n", + "a_plus_b = 2.54/N ; # grating element in cm\n", + "#Grating equation, (a+b)*sin(theta_n) = n*lambda, we get : theta_n = asind((n*lamba)/(a+b))\n", + "print\"For line D1 and Wavelength 5890 A: \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda1 = 5890.; #Wavelength in A\n", + "for n in range(1,3): # First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + "\ttheta1_n = math.asin((n*lambda1*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + "\tprint\" Order :\",n,\",\",round(theta1_n,3),\"degrees \"\n", + "\n", + "print\"For line D2 and Wavelength 5895.9 A : \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda2 = 5895.9 ; #Wavelength in A\n", + "for n1 in range(1,3): #First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + " \ttheta2_n = math.asin((n1*lambda2*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + " \tprint\"Order :\",n1,\",\",round(theta2_n,3),\"degrees \"\n", + "\n", + "print\" When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 112" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of lines \tGrating element (in A)\t Angle of diffraction(degrees)\t Dispersion (degrees/A) \t Resolving Power\n", + "15000.0 /inch\t\t\t16933.33 \t\t20.36 \t\t\t\t0.371627947644 x 10**-3\t\t\t15000.0\n", + "15000.0 /cm\t\t\t6666.67 \t\t62.07 \t\t\t\t1.88928508374 x 10**-3\t\t\t15000.0\n", + "5906.0 /cm\t\t\t16932.2 \t\t20.36 \t\t\t\t0.371659571465 x 10**-3\t\t\t5906.0\n", + "Error in textbook for dispersion values . Error in decimal point placement .\n" + ] + } + ], + "source": [ + "#pg 112\n", + "#calculate the dispersion and resolving power\n", + "# Given :\n", + "#(a) 15000 lines per inch \n", + "import math\n", + "N1 = 15000.; #15000 lines per inch\n", + "a1_plus_b1 = (2.54/N1)*10**8 ; #grating element in A\n", + "lambda1 = 5890.; #Wavelength in A\n", + "lambda2 = 5895.9 ; # Wavelength in A\n", + "#calculations\n", + "deltalambda1 = lambda2-lambda1; #in A\n", + "#For first order\n", + "n =1.;\n", + "theta1 = 20.355; # in degrees\n", + "deltatheta1 = ((n*deltalambda1)/((a1_plus_b1)*math.cos(theta1/57.3)));# dispersion in degrees/A\n", + "rp1 = n*N1; # resolving power\n", + "\n", + "\n", + "#(b)15000 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 15000 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 15000/0.393701 = 38099.979 or 38100 lines\n", + "N2 = 38100 ; #38100 lines per inch\n", + "a2_plus_b2 = (2.54/N2)*10**8 ; #grating element in A\n", + "#For first order\n", + "theta_1 = math.asin((n*lambda1)/(a2_plus_b2))*57.3;# in degrees\n", + "deltatheta_1 = ((n*deltalambda1)/((a2_plus_b2)*math.cos(theta_1/57.3)));# dispersion in degrees/A\n", + "rp2 = n*15000; # resolving power\n", + "\n", + "#(c)5906 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 5906 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 5906/0.393701 = 15001.232 or 15001 lines\n", + "N3 = 15001; #15001 lines per inch\n", + "a3_plus_b3 = (2.54/N3)*10**8; #grating element in A\n", + "#For first order\n", + "theta__1 = math.asin((n*lambda1)/(a3_plus_b3))*57.3; # in degrees\n", + "deltatheta__1 = ((n*deltalambda1)/((a3_plus_b3)*math.cos(theta__1/57.3))); # dispersion in degrees/A\n", + "rp3 = n*5906; # resolving power\n", + "#results\n", + "print\" Number of lines \\tGrating element (in A)\\t Angle of diffraction(degrees)\\t Dispersion (degrees/A) \\t Resolving Power\"\n", + "print N1,\"/inch\\t\\t\\t\",round(a1_plus_b1,2),\"\\t\\t\",round(theta1,2),\"\\t\\t\\t\\t\",deltatheta1*10**3,\"x 10**-3\\t\\t\\t\",rp1\n", + "print 15000.,\"/cm\\t\\t\\t\",round(a2_plus_b2,2),\"\\t\\t\",round(theta_1,2),\" \\t\\t\\t\\t\",deltatheta_1*1000.,\" x 10**-3\\t\\t\\t\",rp2\n", + "print 5906.,\"/cm\\t\\t\\t\",round(a3_plus_b3,2),\"\\t\\t\",round(theta__1,2),\" \\t\\t\\t\\t\",deltatheta__1*1000.,\" x 10**-3\\t\\t\\t\",rp3\n", + "print \"Error in textbook for dispersion values . Error in decimal point placement .\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 114" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Wavelength : 4680.0 A \n", + " Angle of 1st order Diffraction : 28.0 degrees \n", + " Spacing = 9969.3 A\n", + "(a)Wavelength : 4800.0 A \n", + " Angle of 1st order Diffraction : 28.7 degrees \n", + " Spacing = 9996.0 A\n", + "(a)Wavelength : 5770.0 A \n", + " Angle of 1st order Diffraction : 35.5 degrees \n", + " Spacing = 9936.9 A\n", + "Mean Spacing (A) = 9967.40613803\n" + ] + } + ], + "source": [ + "#pg 114\n", + "#calculate the Wavelength and spacing, angle\n", + "#Given:\n", + "#Wavelength\n", + "import math\n", + "from math import sin\n", + "n=1; # first order diffraction\n", + "lambda1 = 4680. ;# Wavelength in A\n", + "lambda2 = 4800.; #Wavelength in A\n", + "lambda3 = 5770. ; # Wave;ength in A\n", + "# First order diffraction angle\n", + "theta1 = 28.0/57.3; # angle in radians\n", + "theta2 = 28.7/57.3; # angle in radians\n", + "theta3 = 35.5/57.3; #angle in radians\n", + "#calculations\n", + "#Grating equation : (a+b) = n*lambda/sin(theta) \n", + "a1_plus_b1 = (n*lambda1)/sin(theta1); #spacing in A\n", + "a2_plus_b2 = (n*lambda2)/sin(theta2); #spacing in A\n", + "a3_plus_b3 = (n*lambda3)/sin(theta3); #spacing in A\n", + "mean_spacing = (a1_plus_b1 + a2_plus_b2 + a3_plus_b3)/3; # mean spacing in A \n", + "#results\n", + "print\"(a)Wavelength :\",lambda1,\" A \\n Angle of 1st order Diffraction :\",round(theta1*57.3,1),\"degrees \\n Spacing =\",round(a1_plus_b1,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda2,\" A \\n Angle of 1st order Diffraction :\",round(theta2*57.3,1),\"degrees \\n Spacing =\",round(a2_plus_b2,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda3,\" A \\n Angle of 1st order Diffraction :\",round(theta3*57.3,1),\"degrees \\n Spacing =\",round(a3_plus_b3,1),\"A\"\n", + "print\"Mean Spacing (A) = \",mean_spacing\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 115" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The first order maximum will be obtained at (degrees) = 0.003\n" + ] + } + ], + "source": [ + "#pg 115\n", + "#calculate the first order maximum\n", + "#Given:\n", + "import math\n", + "N = 15000.;#Number of lines per inch\n", + "a_plus_b = (2.54/N)*10**8 ;#Grating period in A\n", + "lambd = 1 ; #Wavelength in A\n", + "#Grating equation :(a+b)*sin(theta_n) = n*lambd\n", + "#First order maximum \n", + "#calculations\n", + "theta1 = math.asin(lambd/a_plus_b)*57.3; # angle in degrees\n", + "#results\n", + "print \"The first order maximum will be obtained at (degrees) = \",round(theta1,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 118" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum value for L should be (mm) = 3633.9\n" + ] + } + ], + "source": [ + "#pg 118\n", + "#calculate the Maximum value for L\n", + "#Given:\n", + "import math\n", + "lambd = 6000.; #Wwavelength in A\n", + "mu = 1.33; #Refractive index for cornea\n", + "D = 2.; #Diameter of pupil in mm\n", + "#calculations\n", + "#Yellow light wavelength in eye:\n", + "lambd1 = lambd/mu ; #Wavelength in A\n", + "#The angular resolution \n", + "#1 A = 1.0*10^-7 mm\n", + "theta_c = (1.22*lambd1*10**-7)/D; # angle in rad\n", + "#Maximum value for L\n", + "L = 1/math.tan(theta_c); # in mm\n", + "#results\n", + "print \"Maximum value for L should be (mm) = \",round(L,1)\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/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 new file mode 100644 index 00000000..149cb0a8 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_1.ipynb @@ -0,0 +1,369 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 101" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta (degrees) = 0.412\n", + "When p = 0\n", + "theta (degrees) = 0.026\n", + "When p = 1\n", + "theta (degrees) = 0.078\n", + "When p = 2\n", + "theta (degrees) = 0.129\n", + "When p = 3\n", + "theta (degrees) = 0.181\n", + "When p = 4\n", + "theta (degrees) = 0.233\n", + "When p = 5\n", + "theta (degrees) = 0.285\n", + "When p = 6\n", + "theta (degrees) = 0.337\n", + "When p = 7\n", + "theta (degrees) = 0.388\n", + "When p = 8\n", + "theta (degrees) = 0.44\n", + " When p >= 8 , theta > 0.412042642025 degrees .\n", + "\n", + "Between the first two diffraction minima , 16 interference minima are possible.\n" + ] + } + ], + "source": [ + "#pg 101\n", + "#calculate the no. of interference minima\n", + "#Given :\n", + "import math\n", + "d = 8.8*10**-2 ; # slit width in mm\n", + "b = 0.7;# seperation between slits in mm\n", + "lambd = 6328. ; #Wavelength in A\n", + "#First diffraction minima is possible, when d*sin(theta) = lambd\n", + "# 1 A = 1.0*10**-7 mm\n", + "#cakculations and results\n", + "theta = math.asin((lambd*10**-7)/d)*57.3; # angle in degrees\n", + "print\"theta (degrees) = \",round(theta,3)\n", + "#interference minima is possible , when sin(theta) = ((p + 1/2)*lambd)/b\n", + "for p in range (0,10):\n", + " #1 A = 1.0*10**-7 mm\n", + " theta1 = math.asin((p + 1/2.)*(lambd*10**-7/b))*57.3; # angle in degrees \n", + " print\"When p = \",p\n", + " print\"theta (degrees) = \",round(theta1,3)\n", + " if(theta1 > theta):\n", + " \tprint\" When p >=\",p,\", theta >\",theta,\"degrees .\\n\\nBetween the first two diffraction minima ,\",2*p,\"interference minima are possible.\"\n", + " \tbreak;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 111" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For line D1 and Wavelength 5890 A: \n", + " Angles at which first order and second order maxima will be observed are : \n", + " Order : 1 , 20.356 degrees \n", + " Order : 2 , 44.084 degrees \n", + "For line D2 and Wavelength 5895.9 A : \n", + " Angles at which first order and second order maxima will be observed are : \n", + "Order : 1 , 20.378 degrees \n", + "Order : 2 , 44.139 degrees \n", + " When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\n" + ] + } + ], + "source": [ + "#pg 111\n", + "#calculate the angles requried\n", + "#Given :\n", + "import math\n", + "# a+b = (2.54/N)cm\n", + "N = 15000.;#grating has 15000 lines\n", + "#calculations and results\n", + "a_plus_b = 2.54/N ; # grating element in cm\n", + "#Grating equation, (a+b)*sin(theta_n) = n*lambda, we get : theta_n = asind((n*lamba)/(a+b))\n", + "print\"For line D1 and Wavelength 5890 A: \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda1 = 5890.; #Wavelength in A\n", + "for n in range(1,3): # First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + "\ttheta1_n = math.asin((n*lambda1*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + "\tprint\" Order :\",n,\",\",round(theta1_n,3),\"degrees \"\n", + "\n", + "print\"For line D2 and Wavelength 5895.9 A : \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda2 = 5895.9 ; #Wavelength in A\n", + "for n1 in range(1,3): #First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + " \ttheta2_n = math.asin((n1*lambda2*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + " \tprint\"Order :\",n1,\",\",round(theta2_n,3),\"degrees \"\n", + "\n", + "print\" When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 112" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of lines \tGrating element (in A)\t Angle of diffraction(degrees)\t Dispersion (degrees/A) \t Resolving Power\n", + "15000.0 /inch\t\t\t16933.33 \t\t20.36 \t\t\t\t0.371627947644 x 10**-3\t\t\t15000.0\n", + "15000.0 /cm\t\t\t6666.67 \t\t62.07 \t\t\t\t1.88928508374 x 10**-3\t\t\t15000.0\n", + "5906.0 /cm\t\t\t16932.2 \t\t20.36 \t\t\t\t0.371659571465 x 10**-3\t\t\t5906.0\n", + "Error in textbook for dispersion values . Error in decimal point placement .\n" + ] + } + ], + "source": [ + "#pg 112\n", + "#calculate the dispersion and resolving power\n", + "# Given :\n", + "#(a) 15000 lines per inch \n", + "import math\n", + "N1 = 15000.; #15000 lines per inch\n", + "a1_plus_b1 = (2.54/N1)*10**8 ; #grating element in A\n", + "lambda1 = 5890.; #Wavelength in A\n", + "lambda2 = 5895.9 ; # Wavelength in A\n", + "#calculations\n", + "deltalambda1 = lambda2-lambda1; #in A\n", + "#For first order\n", + "n =1.;\n", + "theta1 = 20.355; # in degrees\n", + "deltatheta1 = ((n*deltalambda1)/((a1_plus_b1)*math.cos(theta1/57.3)));# dispersion in degrees/A\n", + "rp1 = n*N1; # resolving power\n", + "\n", + "\n", + "#(b)15000 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 15000 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 15000/0.393701 = 38099.979 or 38100 lines\n", + "N2 = 38100 ; #38100 lines per inch\n", + "a2_plus_b2 = (2.54/N2)*10**8 ; #grating element in A\n", + "#For first order\n", + "theta_1 = math.asin((n*lambda1)/(a2_plus_b2))*57.3;# in degrees\n", + "deltatheta_1 = ((n*deltalambda1)/((a2_plus_b2)*math.cos(theta_1/57.3)));# dispersion in degrees/A\n", + "rp2 = n*15000; # resolving power\n", + "\n", + "#(c)5906 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 5906 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 5906/0.393701 = 15001.232 or 15001 lines\n", + "N3 = 15001; #15001 lines per inch\n", + "a3_plus_b3 = (2.54/N3)*10**8; #grating element in A\n", + "#For first order\n", + "theta__1 = math.asin((n*lambda1)/(a3_plus_b3))*57.3; # in degrees\n", + "deltatheta__1 = ((n*deltalambda1)/((a3_plus_b3)*math.cos(theta__1/57.3))); # dispersion in degrees/A\n", + "rp3 = n*5906; # resolving power\n", + "#results\n", + "print\" Number of lines \\tGrating element (in A)\\t Angle of diffraction(degrees)\\t Dispersion (degrees/A) \\t Resolving Power\"\n", + "print N1,\"/inch\\t\\t\\t\",round(a1_plus_b1,2),\"\\t\\t\",round(theta1,2),\"\\t\\t\\t\\t\",deltatheta1*10**3,\"x 10**-3\\t\\t\\t\",rp1\n", + "print 15000.,\"/cm\\t\\t\\t\",round(a2_plus_b2,2),\"\\t\\t\",round(theta_1,2),\" \\t\\t\\t\\t\",deltatheta_1*1000.,\" x 10**-3\\t\\t\\t\",rp2\n", + "print 5906.,\"/cm\\t\\t\\t\",round(a3_plus_b3,2),\"\\t\\t\",round(theta__1,2),\" \\t\\t\\t\\t\",deltatheta__1*1000.,\" x 10**-3\\t\\t\\t\",rp3\n", + "print \"Error in textbook for dispersion values . Error in decimal point placement .\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 114" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Wavelength : 4680.0 A \n", + " Angle of 1st order Diffraction : 28.0 degrees \n", + " Spacing = 9969.3 A\n", + "(a)Wavelength : 4800.0 A \n", + " Angle of 1st order Diffraction : 28.7 degrees \n", + " Spacing = 9996.0 A\n", + "(a)Wavelength : 5770.0 A \n", + " Angle of 1st order Diffraction : 35.5 degrees \n", + " Spacing = 9936.9 A\n", + "Mean Spacing (A) = 9967.40613803\n" + ] + } + ], + "source": [ + "#pg 114\n", + "#calculate the Wavelength and spacing, angle\n", + "#Given:\n", + "#Wavelength\n", + "import math\n", + "from math import sin\n", + "n=1; # first order diffraction\n", + "lambda1 = 4680. ;# Wavelength in A\n", + "lambda2 = 4800.; #Wavelength in A\n", + "lambda3 = 5770. ; # Wave;ength in A\n", + "# First order diffraction angle\n", + "theta1 = 28.0/57.3; # angle in radians\n", + "theta2 = 28.7/57.3; # angle in radians\n", + "theta3 = 35.5/57.3; #angle in radians\n", + "#calculations\n", + "#Grating equation : (a+b) = n*lambda/sin(theta) \n", + "a1_plus_b1 = (n*lambda1)/sin(theta1); #spacing in A\n", + "a2_plus_b2 = (n*lambda2)/sin(theta2); #spacing in A\n", + "a3_plus_b3 = (n*lambda3)/sin(theta3); #spacing in A\n", + "mean_spacing = (a1_plus_b1 + a2_plus_b2 + a3_plus_b3)/3; # mean spacing in A \n", + "#results\n", + "print\"(a)Wavelength :\",lambda1,\" A \\n Angle of 1st order Diffraction :\",round(theta1*57.3,1),\"degrees \\n Spacing =\",round(a1_plus_b1,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda2,\" A \\n Angle of 1st order Diffraction :\",round(theta2*57.3,1),\"degrees \\n Spacing =\",round(a2_plus_b2,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda3,\" A \\n Angle of 1st order Diffraction :\",round(theta3*57.3,1),\"degrees \\n Spacing =\",round(a3_plus_b3,1),\"A\"\n", + "print\"Mean Spacing (A) = \",mean_spacing\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 115" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The first order maximum will be obtained at (degrees) = 0.003\n" + ] + } + ], + "source": [ + "#pg 115\n", + "#calculate the first order maximum\n", + "#Given:\n", + "import math\n", + "N = 15000.;#Number of lines per inch\n", + "a_plus_b = (2.54/N)*10**8 ;#Grating period in A\n", + "lambd = 1 ; #Wavelength in A\n", + "#Grating equation :(a+b)*sin(theta_n) = n*lambd\n", + "#First order maximum \n", + "#calculations\n", + "theta1 = math.asin(lambd/a_plus_b)*57.3; # angle in degrees\n", + "#results\n", + "print \"The first order maximum will be obtained at (degrees) = \",round(theta1,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 118" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum value for L should be (mm) = 3633.9\n" + ] + } + ], + "source": [ + "#pg 118\n", + "#calculate the Maximum value for L\n", + "#Given:\n", + "import math\n", + "lambd = 6000.; #Wwavelength in A\n", + "mu = 1.33; #Refractive index for cornea\n", + "D = 2.; #Diameter of pupil in mm\n", + "#calculations\n", + "#Yellow light wavelength in eye:\n", + "lambd1 = lambd/mu ; #Wavelength in A\n", + "#The angular resolution \n", + "#1 A = 1.0*10^-7 mm\n", + "theta_c = (1.22*lambd1*10**-7)/D; # angle in rad\n", + "#Maximum value for L\n", + "L = 1/math.tan(theta_c); # in mm\n", + "#results\n", + "print \"Maximum value for L should be (mm) = \",round(L,1)\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/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 new file mode 100644 index 00000000..149cb0a8 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter4_2.ipynb @@ -0,0 +1,369 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 101" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta (degrees) = 0.412\n", + "When p = 0\n", + "theta (degrees) = 0.026\n", + "When p = 1\n", + "theta (degrees) = 0.078\n", + "When p = 2\n", + "theta (degrees) = 0.129\n", + "When p = 3\n", + "theta (degrees) = 0.181\n", + "When p = 4\n", + "theta (degrees) = 0.233\n", + "When p = 5\n", + "theta (degrees) = 0.285\n", + "When p = 6\n", + "theta (degrees) = 0.337\n", + "When p = 7\n", + "theta (degrees) = 0.388\n", + "When p = 8\n", + "theta (degrees) = 0.44\n", + " When p >= 8 , theta > 0.412042642025 degrees .\n", + "\n", + "Between the first two diffraction minima , 16 interference minima are possible.\n" + ] + } + ], + "source": [ + "#pg 101\n", + "#calculate the no. of interference minima\n", + "#Given :\n", + "import math\n", + "d = 8.8*10**-2 ; # slit width in mm\n", + "b = 0.7;# seperation between slits in mm\n", + "lambd = 6328. ; #Wavelength in A\n", + "#First diffraction minima is possible, when d*sin(theta) = lambd\n", + "# 1 A = 1.0*10**-7 mm\n", + "#cakculations and results\n", + "theta = math.asin((lambd*10**-7)/d)*57.3; # angle in degrees\n", + "print\"theta (degrees) = \",round(theta,3)\n", + "#interference minima is possible , when sin(theta) = ((p + 1/2)*lambd)/b\n", + "for p in range (0,10):\n", + " #1 A = 1.0*10**-7 mm\n", + " theta1 = math.asin((p + 1/2.)*(lambd*10**-7/b))*57.3; # angle in degrees \n", + " print\"When p = \",p\n", + " print\"theta (degrees) = \",round(theta1,3)\n", + " if(theta1 > theta):\n", + " \tprint\" When p >=\",p,\", theta >\",theta,\"degrees .\\n\\nBetween the first two diffraction minima ,\",2*p,\"interference minima are possible.\"\n", + " \tbreak;\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 111" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For line D1 and Wavelength 5890 A: \n", + " Angles at which first order and second order maxima will be observed are : \n", + " Order : 1 , 20.356 degrees \n", + " Order : 2 , 44.084 degrees \n", + "For line D2 and Wavelength 5895.9 A : \n", + " Angles at which first order and second order maxima will be observed are : \n", + "Order : 1 , 20.378 degrees \n", + "Order : 2 , 44.139 degrees \n", + " When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\n" + ] + } + ], + "source": [ + "#pg 111\n", + "#calculate the angles requried\n", + "#Given :\n", + "import math\n", + "# a+b = (2.54/N)cm\n", + "N = 15000.;#grating has 15000 lines\n", + "#calculations and results\n", + "a_plus_b = 2.54/N ; # grating element in cm\n", + "#Grating equation, (a+b)*sin(theta_n) = n*lambda, we get : theta_n = asind((n*lamba)/(a+b))\n", + "print\"For line D1 and Wavelength 5890 A: \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda1 = 5890.; #Wavelength in A\n", + "for n in range(1,3): # First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + "\ttheta1_n = math.asin((n*lambda1*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + "\tprint\" Order :\",n,\",\",round(theta1_n,3),\"degrees \"\n", + "\n", + "print\"For line D2 and Wavelength 5895.9 A : \"\n", + "print\" Angles at which first order and second order maxima will be observed are : \"\n", + "lambda2 = 5895.9 ; #Wavelength in A\n", + "for n1 in range(1,3): #First and second order maxima\n", + "# 1 A = 1.0*10**-7 mm\n", + " \ttheta2_n = math.asin((n1*lambda2*10**-8)/a_plus_b)*57.3;# angle in degrees\n", + " \tprint\"Order :\",n1,\",\",round(theta2_n,3),\"degrees \"\n", + "\n", + "print\" When n = 3, sin(theta)= ((n*lambda*10**-8)/a_plus_b)>1 , which falls outside the sine range, hence third order maximum is not visible\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 112" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Number of lines \tGrating element (in A)\t Angle of diffraction(degrees)\t Dispersion (degrees/A) \t Resolving Power\n", + "15000.0 /inch\t\t\t16933.33 \t\t20.36 \t\t\t\t0.371627947644 x 10**-3\t\t\t15000.0\n", + "15000.0 /cm\t\t\t6666.67 \t\t62.07 \t\t\t\t1.88928508374 x 10**-3\t\t\t15000.0\n", + "5906.0 /cm\t\t\t16932.2 \t\t20.36 \t\t\t\t0.371659571465 x 10**-3\t\t\t5906.0\n", + "Error in textbook for dispersion values . Error in decimal point placement .\n" + ] + } + ], + "source": [ + "#pg 112\n", + "#calculate the dispersion and resolving power\n", + "# Given :\n", + "#(a) 15000 lines per inch \n", + "import math\n", + "N1 = 15000.; #15000 lines per inch\n", + "a1_plus_b1 = (2.54/N1)*10**8 ; #grating element in A\n", + "lambda1 = 5890.; #Wavelength in A\n", + "lambda2 = 5895.9 ; # Wavelength in A\n", + "#calculations\n", + "deltalambda1 = lambda2-lambda1; #in A\n", + "#For first order\n", + "n =1.;\n", + "theta1 = 20.355; # in degrees\n", + "deltatheta1 = ((n*deltalambda1)/((a1_plus_b1)*math.cos(theta1/57.3)));# dispersion in degrees/A\n", + "rp1 = n*N1; # resolving power\n", + "\n", + "\n", + "#(b)15000 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 15000 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 15000/0.393701 = 38099.979 or 38100 lines\n", + "N2 = 38100 ; #38100 lines per inch\n", + "a2_plus_b2 = (2.54/N2)*10**8 ; #grating element in A\n", + "#For first order\n", + "theta_1 = math.asin((n*lambda1)/(a2_plus_b2))*57.3;# in degrees\n", + "deltatheta_1 = ((n*deltalambda1)/((a2_plus_b2)*math.cos(theta_1/57.3)));# dispersion in degrees/A\n", + "rp2 = n*15000; # resolving power\n", + "\n", + "#(c)5906 lines per cm\n", + "# 1 cm = 0.393701 inches, so We have 5906 lines per 0.393701 inches. \n", + "#Therefore, For 1 inch we have 5906/0.393701 = 15001.232 or 15001 lines\n", + "N3 = 15001; #15001 lines per inch\n", + "a3_plus_b3 = (2.54/N3)*10**8; #grating element in A\n", + "#For first order\n", + "theta__1 = math.asin((n*lambda1)/(a3_plus_b3))*57.3; # in degrees\n", + "deltatheta__1 = ((n*deltalambda1)/((a3_plus_b3)*math.cos(theta__1/57.3))); # dispersion in degrees/A\n", + "rp3 = n*5906; # resolving power\n", + "#results\n", + "print\" Number of lines \\tGrating element (in A)\\t Angle of diffraction(degrees)\\t Dispersion (degrees/A) \\t Resolving Power\"\n", + "print N1,\"/inch\\t\\t\\t\",round(a1_plus_b1,2),\"\\t\\t\",round(theta1,2),\"\\t\\t\\t\\t\",deltatheta1*10**3,\"x 10**-3\\t\\t\\t\",rp1\n", + "print 15000.,\"/cm\\t\\t\\t\",round(a2_plus_b2,2),\"\\t\\t\",round(theta_1,2),\" \\t\\t\\t\\t\",deltatheta_1*1000.,\" x 10**-3\\t\\t\\t\",rp2\n", + "print 5906.,\"/cm\\t\\t\\t\",round(a3_plus_b3,2),\"\\t\\t\",round(theta__1,2),\" \\t\\t\\t\\t\",deltatheta__1*1000.,\" x 10**-3\\t\\t\\t\",rp3\n", + "print \"Error in textbook for dispersion values . Error in decimal point placement .\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 114" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Wavelength : 4680.0 A \n", + " Angle of 1st order Diffraction : 28.0 degrees \n", + " Spacing = 9969.3 A\n", + "(a)Wavelength : 4800.0 A \n", + " Angle of 1st order Diffraction : 28.7 degrees \n", + " Spacing = 9996.0 A\n", + "(a)Wavelength : 5770.0 A \n", + " Angle of 1st order Diffraction : 35.5 degrees \n", + " Spacing = 9936.9 A\n", + "Mean Spacing (A) = 9967.40613803\n" + ] + } + ], + "source": [ + "#pg 114\n", + "#calculate the Wavelength and spacing, angle\n", + "#Given:\n", + "#Wavelength\n", + "import math\n", + "from math import sin\n", + "n=1; # first order diffraction\n", + "lambda1 = 4680. ;# Wavelength in A\n", + "lambda2 = 4800.; #Wavelength in A\n", + "lambda3 = 5770. ; # Wave;ength in A\n", + "# First order diffraction angle\n", + "theta1 = 28.0/57.3; # angle in radians\n", + "theta2 = 28.7/57.3; # angle in radians\n", + "theta3 = 35.5/57.3; #angle in radians\n", + "#calculations\n", + "#Grating equation : (a+b) = n*lambda/sin(theta) \n", + "a1_plus_b1 = (n*lambda1)/sin(theta1); #spacing in A\n", + "a2_plus_b2 = (n*lambda2)/sin(theta2); #spacing in A\n", + "a3_plus_b3 = (n*lambda3)/sin(theta3); #spacing in A\n", + "mean_spacing = (a1_plus_b1 + a2_plus_b2 + a3_plus_b3)/3; # mean spacing in A \n", + "#results\n", + "print\"(a)Wavelength :\",lambda1,\" A \\n Angle of 1st order Diffraction :\",round(theta1*57.3,1),\"degrees \\n Spacing =\",round(a1_plus_b1,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda2,\" A \\n Angle of 1st order Diffraction :\",round(theta2*57.3,1),\"degrees \\n Spacing =\",round(a2_plus_b2,1),\"A\"\n", + "print\"(a)Wavelength :\",lambda3,\" A \\n Angle of 1st order Diffraction :\",round(theta3*57.3,1),\"degrees \\n Spacing =\",round(a3_plus_b3,1),\"A\"\n", + "print\"Mean Spacing (A) = \",mean_spacing\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 115" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The first order maximum will be obtained at (degrees) = 0.003\n" + ] + } + ], + "source": [ + "#pg 115\n", + "#calculate the first order maximum\n", + "#Given:\n", + "import math\n", + "N = 15000.;#Number of lines per inch\n", + "a_plus_b = (2.54/N)*10**8 ;#Grating period in A\n", + "lambd = 1 ; #Wavelength in A\n", + "#Grating equation :(a+b)*sin(theta_n) = n*lambd\n", + "#First order maximum \n", + "#calculations\n", + "theta1 = math.asin(lambd/a_plus_b)*57.3; # angle in degrees\n", + "#results\n", + "print \"The first order maximum will be obtained at (degrees) = \",round(theta1,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 118" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum value for L should be (mm) = 3633.9\n" + ] + } + ], + "source": [ + "#pg 118\n", + "#calculate the Maximum value for L\n", + "#Given:\n", + "import math\n", + "lambd = 6000.; #Wwavelength in A\n", + "mu = 1.33; #Refractive index for cornea\n", + "D = 2.; #Diameter of pupil in mm\n", + "#calculations\n", + "#Yellow light wavelength in eye:\n", + "lambd1 = lambd/mu ; #Wavelength in A\n", + "#The angular resolution \n", + "#1 A = 1.0*10^-7 mm\n", + "theta_c = (1.22*lambd1*10**-7)/D; # angle in rad\n", + "#Maximum value for L\n", + "L = 1/math.tan(theta_c); # in mm\n", + "#results\n", + "print \"Maximum value for L should be (mm) = \",round(L,1)\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5.ipynb new file mode 100755 index 00000000..41986969 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5.ipynb @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 - Polarisation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 134" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle (degrees) = 36.9\n" + ] + } + ], + "source": [ + "#pg 134\n", + "#calculate the angle required\n", + "#Given:\n", + "import math\n", + "mu = 1.33; #Refractive index of water\n", + "#Brewster's angle, theta_p = atand(mu) ;\n", + "#calculations\n", + "theta_p = math.atan(mu)*57.3; # in degrees\n", + "theta_s = 90-theta_p ; # in degrees\n", + "#results\n", + "print \"Angle (degrees) = \",round(theta_s,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 136" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical angle (degrees) = 69.0\n" + ] + } + ], + "source": [ + "#pg 136\n", + "#calculate the Critical angle\n", + "import math\n", + "#Given:\n", + "r = 90.; # in degrees\n", + "mu_o= 1.658 ;# Refractive index for ordinary array\n", + "mu =1.55; # Refractive index for a canada balsam material\n", + "#calculations\n", + "#Snell's Law,mu1*sin(i) = mu2*sin(r), we have :\n", + "i = math.asin((mu*math.sin(r/57.3))/mu_o)*57.3; # angle in degrees\n", + "#results\n", + "print \"Critical angle (degrees) = \",round(i,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 147" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum thickness :\n", + "(a)Plane polarised light : 3.27 x 10**-3 cm \n", + "(b)Circularly polarised light : 1.64 x 10**-3 cm \n" + ] + } + ], + "source": [ + "#pg 147\n", + "#calculate the Minimum thickness of Plane and Circularly polarised light\n", + "#Given :\n", + "mu_o = 1.544; #Refractive index for ordinary ray\n", + "mu_e = 1.553;#Refractive index for extraordinary ray\n", + "lambd = 5890.;#Wavelength in A\n", + "#calculations\n", + "#(a)Plane polarised light :\n", + "#lambd is converted from A to cm , 1 A = 1.0*10**-8 cm\n", + "t1 = (lambd*10**-8)/(2*(mu_e-mu_o));#Minimum thickness in cm\n", + "#(b)Circularly polarised light :\n", + "t2 = (lambd*10**-8)/(4*(mu_e-mu_o));# Minimum thickness in cm\n", + "#results\n", + "print\"Minimum thickness :\"\n", + "print\"(a)Plane polarised light :\",round(t1*1000.,2),\" x 10**-3 cm \"\n", + "print\"(b)Circularly polarised light :\",round(t2*1000.,2),\"x 10**-3 cm \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 150" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Calcite crystal : \n", + " Phase difference is (radians) = 9.541\n", + "(a)Quartz crystal : \n", + " Phase difference is (radians) = 2.247\n" + ] + } + ], + "source": [ + "#pg 150\n", + "#calculate the phase difference\n", + "#Given :\n", + "import math\n", + "lambd = 5890.; #Wavelength in A\n", + "#(a)Calcite crystal\n", + "mu1_o = 1.658;#refractive index for ordinary ray\n", + "mu1_e = 1.486;#refractive index for extraordinary ray\n", + "t1 = 0.0052 ; #thickness in mm\n", + "# 1 A = 1.0*10**-7 mm\n", + "alpha1 = ((2*math.pi*(mu1_o-mu1_e)*t1)/(lambd*10**-7)); # phase difference in radians\n", + "#(b) Quartz crystal\n", + "mu2_o = 1.544; #refractive index for ordinary ray\n", + "mu2_e = 1.553; #refractive index for extraordinary ray\n", + "t2 = 0.0234;#thickness in mm\n", + "alpha2 = ((2*math.pi*(mu2_e-mu2_o)*t2)/(lambd*10**-7)); # phase difference in radians\n", + "print\"(a)Calcite crystal : \\n Phase difference is (radians) = \",round(alpha1,3)\n", + "print\"(a)Quartz crystal : \\n Phase difference is (radians) = \",round(alpha2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 159" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in theta (degrees) = 0.132\n", + "The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\n" + ] + } + ], + "source": [ + "#pg 159\n", + "#calculate the concentration and Change in angle\n", + "#Given :\n", + "rho = 6.6; # Specific rotation of sugar in degrees g^-1 cm^2\n", + "l = 20; #length in cm\n", + "deltad = 1*10**-3;#difference in sugar concentration in g/cm^3\n", + "lc = 0.1; # least count in degrees\n", + "#Rotation due to optical activity = rho*l*d\n", + "#calculations\n", + "deltatheta = rho*l*deltad; # in degrees\n", + "#results\n", + "print\"Change in theta (degrees) = \",deltatheta\n", + "\n", + "if(deltatheta > lc):\n", + " print\"The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\"\n", + "else:\n", + " print\"The concentration of 1 mg/cm^3 will not be detected.\" " + ] + } + ], + "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/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 new file mode 100644 index 00000000..41986969 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_1.ipynb @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 - Polarisation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 134" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle (degrees) = 36.9\n" + ] + } + ], + "source": [ + "#pg 134\n", + "#calculate the angle required\n", + "#Given:\n", + "import math\n", + "mu = 1.33; #Refractive index of water\n", + "#Brewster's angle, theta_p = atand(mu) ;\n", + "#calculations\n", + "theta_p = math.atan(mu)*57.3; # in degrees\n", + "theta_s = 90-theta_p ; # in degrees\n", + "#results\n", + "print \"Angle (degrees) = \",round(theta_s,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 136" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical angle (degrees) = 69.0\n" + ] + } + ], + "source": [ + "#pg 136\n", + "#calculate the Critical angle\n", + "import math\n", + "#Given:\n", + "r = 90.; # in degrees\n", + "mu_o= 1.658 ;# Refractive index for ordinary array\n", + "mu =1.55; # Refractive index for a canada balsam material\n", + "#calculations\n", + "#Snell's Law,mu1*sin(i) = mu2*sin(r), we have :\n", + "i = math.asin((mu*math.sin(r/57.3))/mu_o)*57.3; # angle in degrees\n", + "#results\n", + "print \"Critical angle (degrees) = \",round(i,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 147" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum thickness :\n", + "(a)Plane polarised light : 3.27 x 10**-3 cm \n", + "(b)Circularly polarised light : 1.64 x 10**-3 cm \n" + ] + } + ], + "source": [ + "#pg 147\n", + "#calculate the Minimum thickness of Plane and Circularly polarised light\n", + "#Given :\n", + "mu_o = 1.544; #Refractive index for ordinary ray\n", + "mu_e = 1.553;#Refractive index for extraordinary ray\n", + "lambd = 5890.;#Wavelength in A\n", + "#calculations\n", + "#(a)Plane polarised light :\n", + "#lambd is converted from A to cm , 1 A = 1.0*10**-8 cm\n", + "t1 = (lambd*10**-8)/(2*(mu_e-mu_o));#Minimum thickness in cm\n", + "#(b)Circularly polarised light :\n", + "t2 = (lambd*10**-8)/(4*(mu_e-mu_o));# Minimum thickness in cm\n", + "#results\n", + "print\"Minimum thickness :\"\n", + "print\"(a)Plane polarised light :\",round(t1*1000.,2),\" x 10**-3 cm \"\n", + "print\"(b)Circularly polarised light :\",round(t2*1000.,2),\"x 10**-3 cm \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 150" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Calcite crystal : \n", + " Phase difference is (radians) = 9.541\n", + "(a)Quartz crystal : \n", + " Phase difference is (radians) = 2.247\n" + ] + } + ], + "source": [ + "#pg 150\n", + "#calculate the phase difference\n", + "#Given :\n", + "import math\n", + "lambd = 5890.; #Wavelength in A\n", + "#(a)Calcite crystal\n", + "mu1_o = 1.658;#refractive index for ordinary ray\n", + "mu1_e = 1.486;#refractive index for extraordinary ray\n", + "t1 = 0.0052 ; #thickness in mm\n", + "# 1 A = 1.0*10**-7 mm\n", + "alpha1 = ((2*math.pi*(mu1_o-mu1_e)*t1)/(lambd*10**-7)); # phase difference in radians\n", + "#(b) Quartz crystal\n", + "mu2_o = 1.544; #refractive index for ordinary ray\n", + "mu2_e = 1.553; #refractive index for extraordinary ray\n", + "t2 = 0.0234;#thickness in mm\n", + "alpha2 = ((2*math.pi*(mu2_e-mu2_o)*t2)/(lambd*10**-7)); # phase difference in radians\n", + "print\"(a)Calcite crystal : \\n Phase difference is (radians) = \",round(alpha1,3)\n", + "print\"(a)Quartz crystal : \\n Phase difference is (radians) = \",round(alpha2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 159" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in theta (degrees) = 0.132\n", + "The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\n" + ] + } + ], + "source": [ + "#pg 159\n", + "#calculate the concentration and Change in angle\n", + "#Given :\n", + "rho = 6.6; # Specific rotation of sugar in degrees g^-1 cm^2\n", + "l = 20; #length in cm\n", + "deltad = 1*10**-3;#difference in sugar concentration in g/cm^3\n", + "lc = 0.1; # least count in degrees\n", + "#Rotation due to optical activity = rho*l*d\n", + "#calculations\n", + "deltatheta = rho*l*deltad; # in degrees\n", + "#results\n", + "print\"Change in theta (degrees) = \",deltatheta\n", + "\n", + "if(deltatheta > lc):\n", + " print\"The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\"\n", + "else:\n", + " print\"The concentration of 1 mg/cm^3 will not be detected.\" " + ] + } + ], + "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/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 new file mode 100644 index 00000000..41986969 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter5_2.ipynb @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 - Polarisation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 134" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle (degrees) = 36.9\n" + ] + } + ], + "source": [ + "#pg 134\n", + "#calculate the angle required\n", + "#Given:\n", + "import math\n", + "mu = 1.33; #Refractive index of water\n", + "#Brewster's angle, theta_p = atand(mu) ;\n", + "#calculations\n", + "theta_p = math.atan(mu)*57.3; # in degrees\n", + "theta_s = 90-theta_p ; # in degrees\n", + "#results\n", + "print \"Angle (degrees) = \",round(theta_s,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 136" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Critical angle (degrees) = 69.0\n" + ] + } + ], + "source": [ + "#pg 136\n", + "#calculate the Critical angle\n", + "import math\n", + "#Given:\n", + "r = 90.; # in degrees\n", + "mu_o= 1.658 ;# Refractive index for ordinary array\n", + "mu =1.55; # Refractive index for a canada balsam material\n", + "#calculations\n", + "#Snell's Law,mu1*sin(i) = mu2*sin(r), we have :\n", + "i = math.asin((mu*math.sin(r/57.3))/mu_o)*57.3; # angle in degrees\n", + "#results\n", + "print \"Critical angle (degrees) = \",round(i,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 147" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum thickness :\n", + "(a)Plane polarised light : 3.27 x 10**-3 cm \n", + "(b)Circularly polarised light : 1.64 x 10**-3 cm \n" + ] + } + ], + "source": [ + "#pg 147\n", + "#calculate the Minimum thickness of Plane and Circularly polarised light\n", + "#Given :\n", + "mu_o = 1.544; #Refractive index for ordinary ray\n", + "mu_e = 1.553;#Refractive index for extraordinary ray\n", + "lambd = 5890.;#Wavelength in A\n", + "#calculations\n", + "#(a)Plane polarised light :\n", + "#lambd is converted from A to cm , 1 A = 1.0*10**-8 cm\n", + "t1 = (lambd*10**-8)/(2*(mu_e-mu_o));#Minimum thickness in cm\n", + "#(b)Circularly polarised light :\n", + "t2 = (lambd*10**-8)/(4*(mu_e-mu_o));# Minimum thickness in cm\n", + "#results\n", + "print\"Minimum thickness :\"\n", + "print\"(a)Plane polarised light :\",round(t1*1000.,2),\" x 10**-3 cm \"\n", + "print\"(b)Circularly polarised light :\",round(t2*1000.,2),\"x 10**-3 cm \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 150" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Calcite crystal : \n", + " Phase difference is (radians) = 9.541\n", + "(a)Quartz crystal : \n", + " Phase difference is (radians) = 2.247\n" + ] + } + ], + "source": [ + "#pg 150\n", + "#calculate the phase difference\n", + "#Given :\n", + "import math\n", + "lambd = 5890.; #Wavelength in A\n", + "#(a)Calcite crystal\n", + "mu1_o = 1.658;#refractive index for ordinary ray\n", + "mu1_e = 1.486;#refractive index for extraordinary ray\n", + "t1 = 0.0052 ; #thickness in mm\n", + "# 1 A = 1.0*10**-7 mm\n", + "alpha1 = ((2*math.pi*(mu1_o-mu1_e)*t1)/(lambd*10**-7)); # phase difference in radians\n", + "#(b) Quartz crystal\n", + "mu2_o = 1.544; #refractive index for ordinary ray\n", + "mu2_e = 1.553; #refractive index for extraordinary ray\n", + "t2 = 0.0234;#thickness in mm\n", + "alpha2 = ((2*math.pi*(mu2_e-mu2_o)*t2)/(lambd*10**-7)); # phase difference in radians\n", + "print\"(a)Calcite crystal : \\n Phase difference is (radians) = \",round(alpha1,3)\n", + "print\"(a)Quartz crystal : \\n Phase difference is (radians) = \",round(alpha2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 159" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in theta (degrees) = 0.132\n", + "The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\n" + ] + } + ], + "source": [ + "#pg 159\n", + "#calculate the concentration and Change in angle\n", + "#Given :\n", + "rho = 6.6; # Specific rotation of sugar in degrees g^-1 cm^2\n", + "l = 20; #length in cm\n", + "deltad = 1*10**-3;#difference in sugar concentration in g/cm^3\n", + "lc = 0.1; # least count in degrees\n", + "#Rotation due to optical activity = rho*l*d\n", + "#calculations\n", + "deltatheta = rho*l*deltad; # in degrees\n", + "#results\n", + "print\"Change in theta (degrees) = \",deltatheta\n", + "\n", + "if(deltatheta > lc):\n", + " print\"The concentration of 1 mg/cm^3 will be detected by the given urinalysis tube.\"\n", + "else:\n", + " print\"The concentration of 1 mg/cm^3 will not be detected.\" " + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6.ipynb new file mode 100755 index 00000000..5d2dcf7b --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6.ipynb @@ -0,0 +1,664 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Quantum Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 165" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy at First three levels for a 1s simple pendulum : \n", + "E_ 1 : 6.62 x 10^-34 J\n", + "E_ 2 : 13.25 x 10^-34 J\n", + "E_ 3 : 19.88 x 10^-34 J\n", + "Energy at First three levels for a hydrogen electron :\n", + "E_ 1 : -13.6 eV\n", + "E_ 2 : -3.4 eV\n", + "E_ 3 : -1.51 eV\n", + "Quantum number n is : 2.98 x 10**28\n", + "Percentage change in energy ( pendulum ) is 3.0 x 10**-27 \n", + "Percentage change in energy (hydrogen electron) is 75.0\n" + ] + } + ], + "source": [ + "#pg 165\n", + "#Quantised energy levels for microscopic and macroscopic systems\n", + "#calculate the energy levels and percentage change in energy\n", + "#Given :\n", + "import math\n", + "# (a) For a 1s simple pendulum :\n", + "T = 1.; # time period in s\n", + "nu = 1./T; #Frequency in Hz\n", + "#Planck's quantisation princple : E_n = n*h*nu\n", + "h = 6.625*10**-34 ; #Planck's constant in Js\n", + "#calculations and results\n", + "print \"Energy at First three levels for a 1s simple pendulum : \"\n", + "for n1 in range(1,4):\n", + " E1 = n1*h*nu ; # Energry in J\n", + " print \"E_\",n1,\": \",round(E1*10**34,2),\"x 10^-34 J\"\n", + "\n", + "# (b) For a hydrogen electron \n", + "# E_n = (-13.6/n**2)eV\n", + "print \"Energy at First three levels for a hydrogen electron :\"\n", + "\n", + "for n2 in range(1,4):\n", + " E2 = (-13.6/n2**2);#Energy in eV\n", + " print\"E_\",n2,\": \",round(E2,2),\"eV\"\n", + "\n", + "#Now, for a simple pendulum\n", + "m = 10.; # mass in g\n", + "a = 1.; # amplitude in cm\n", + "omega = 2*math.pi*nu; # angular frequency in rad/s\n", + "# 1 g = 1.0*10**-3 Kg and 1 cm = 1.0*10**-2 m\n", + "E = 1./2*((m*10**-3)*(omega**2)*(a*10**-2)**2); # Energy in J\n", + "#Thus,quantum number n = E/h*nu\n", + "n = E/(h*nu);\n", + "print\"Quantum number n is :\",round(n*10**-28,2),\" x 10**28\"\n", + "#(i)Pendulum :\n", + "#percentage change in energy = (E_n+1 - E_n)*100/E_n which is equal to [(n+1)*h*nu - n*h*nu]*100/(n*h*nu )\n", + "#Therefore , it is (1/n) * 100\n", + "pc = (1./n)*100; #percentage change in energy\n", + "print\"Percentage change in energy ( pendulum ) is\",round(pc*10**27,0),\"x 10**-27 \"\n", + "#(ii)Hyderogen electron :\n", + "n_1 = 1; #ground state\n", + "n_2 = 2; # next quantum state\n", + "E_1 = (-13.6/n_1**2); # Energy in eV\n", + "E_2 = (-13.6/n_2**2);#Energy in eV\n", + "#percentage change : |((E_2-E_1)*100)|/ |E_1|\n", + "pc1 =((E_2-E_1)*100)/(-E_1);#percentage change\n", + "print\"Percentage change in energy (hydrogen electron) is \",abs(pc1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 167" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of a photon is 19.875 x 10**-16 /lambd(in A) J\n", + "Energy of a photon is 12422.0 /lambd(in A) eV\n", + "Hence the range of energies for visible photos is 1.8 eV to 3.1 eV\n" + ] + } + ], + "source": [ + "#pg 167\n", + "#calculate the range of energies visible\n", + "#Given :\n", + "h = 6.625*10**-34;#Planck's constant in Js\n", + "c = 3*10**8 ; #velocity of light in m/s\n", + "# 1A = 1.0*10**-10 m\n", + "#(a)Energy of a photon : \n", + "# E = h*nu or E = h*c/lambd\n", + "#calculations and results\n", + "print\"Energy of a photon is\",round(((h*c)*10**10)*10**16,3),\"x 10**-16 /lambd(in A) J\"\n", + "#1eV = 1.6*10**-19 J\n", + "print\"Energy of a photon is \",round(((h*c)/(1.6*10**-19))*10**10),\"/lambd(in A) eV\"\n", + "#(b)Visible light Range is 4000-7000 A\n", + "lambd1 = 4000;#Wavelength in A\n", + "lambd2 = 7000;#Wavelength in A\n", + "# 1eV = 1.6*10**-19 J , \n", + "E1 = (h*c)/(lambd1*10**-10*1.6*10**-19); #Energy in eV\n", + "E2 = (h*c)/(lambd2*10**-10*1.6*10**-19);#Energy in eV\n", + "print\"Hence the range of energies for visible photos is\",round(E2,1), \"eV to\",round(E1,1), \"eV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 171" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " It will take 93.0 days\n" + ] + } + ], + "source": [ + "#pg 171\n", + "#calculate the take off time\n", + "import math\n", + "#Given :\n", + "#Power of the source = 10**-5 W = 10**-5 J/s\n", + "P = 10**-5 ; #Power in J/s\n", + "r = 10**-9; #radius in m\n", + "r1 = 5.; # metal plate 5 m away from the source\n", + "WF = 5.;#Work function in eV\n", + "#calculations\n", + "area = math.pi*(10**-9)**2 ; #area in m**2\n", + "area1 = 4*math.pi*r1**2; # area in m**2\n", + "P1 = P*(area/area1); # in J/s\n", + "# 1eV = 1.6*10**-19 J\n", + "t = (WF*1.6*10**-19)/P1 ;# in s\n", + "#1 day = 24 hours * 60 minutes * 60 seconds\n", + "N = t/(24*60*60); #in days\n", + "print \" It will take\",round(N),\"days\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 173" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Plancks constant h is 6.6 x 10^-34 Js and Work function phi is 1.755 eV \n" + ] + } + ], + "source": [ + "#pg 173\n", + "#calculate the Planck's constant and work function\n", + "#Given :\n", + "nu1 = 10*10**14;# Frequency in Hz\n", + "nu2 = 6*10**14;# Frequency in Hz\n", + "V_01 = 2.37; #Stopping potential in volts\n", + "V_02 = 0.72; #Stopping potential in volts\n", + "e = 1.6*10**-19 ;# Charge of an electron in C\n", + "#Einstein's photoeletric equation : h*nu = phi + e*V_0 \n", + "#calculations\n", + "h = (e*(V_02 - V_01))/(nu2 - nu1);#Planck's constant in Js\n", + "phi = ((h*nu1)-(e*V_01))/e ; # work function in eV\n", + "#results\n", + "print \"Plancks constant h is\",h*10**34,\"x 10^-34 Js and Work function phi is\",phi,\"eV \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 176" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Incident photon wavelength in Compton scattering is (A) = 0.11\n" + ] + } + ], + "source": [ + "#pg 176\n", + "#calculate the Incident photon wavelength\n", + "#Given :\n", + "import math,numpy\n", + "ME = 35*10**3 ; #Maximum energy in eV\n", + "theta = math.pi; # photon is backscattered\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m0 = 9.1*10**-31; #electron mass in Kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "deltalambd = (h*(1-math.cos(theta)))/(m0*c); # in A\n", + "# (h*c/lambd) - (h*c/lambd') = 35 KeV or (deltalambd/lambd*lambd1) = (35 KeV/h*c)\n", + "#Simplifying the above Equation , we will obtain : lambd**2 + 0.048 lambd - 0.017\n", + "#Roots of the quadratic equation are :\n", + "values = numpy.array([1,0.048,-0.017]); # a,b,c values of the quadratic equation\n", + "r = numpy.roots(values); #Roots of the final equation\n", + "#results\n", + "print \"Incident photon wavelength in Compton scattering is (A) = \",round(r[1],2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 177" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage change in energy for radiation in microwave range is : 8.0 x 10**-9\n", + "Percentage change in energy for radiation in visible range is : 5.0 x 10**-4\n", + "Percentage change in energy for radiation in X-ray range is : 2.4\n", + "Percentage change in energy for radiation in Gamma range is : 66.9\n" + ] + } + ], + "source": [ + "#pg 177\n", + "#calculate the Percentage change in energy\n", + "#Given :\n", + "import math\n", + "theta = 90.; #angle in degrees\n", + "m0 = 9.1*10**-31; #electron mass in kg\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "deltalambda = ((h*(1-math.cos(theta/57.3)))/(m0*c))*10**10; # in A\n", + "#(a) Microwave range\n", + "lambda1 = 3.0 ;# wavelength in cm\n", + "#calculations and results\n", + "#lambda1 = 3.0*10**8 A , 1 cm = 1*10**8 A\n", + "pc1 = ((deltalambda)*100.)/((lambda1*10**8) + deltalambda) ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in microwave range is :\",round(pc1*10**9,0),\"x 10**-9\"\n", + "#(b) Visible range\n", + "lambda2 = 5000 ;# wavelength in A\n", + "pc2 = ((deltalambda)/(lambda2 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in visible range is :\",round(pc2*10**4,0),\"x 10**-4\"\n", + "#(c) X-ray range\n", + "lambda3 = 1 ; #wavelength in A\n", + "pc3 = ((deltalambda)/(lambda3 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in X-ray range is :\" ,round(pc3,1)\n", + "#(d)Gamma ray range\n", + "lambda4 = 0.012 ;# wavelength in A\n", + "pc4 = ((deltalambda)/(lambda4 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in Gamma range is : \",round(pc4,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 179" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Photoelectric effect :\n", + "Electron energy : 3.911 eV \n", + " Electron momentum : 1.07 x 10**-24 kg m/s \n", + " Momentum of incident photon : 3.31 x 10**-27 kg m/s \n", + " pe/pp : 322.0\n", + "Compton effect :\n", + "Electron energy : 568.9 eV \n", + " Electron momentum : 1.3 x 10**-23 kg m/s \n", + " Momentum of incident photon : 6.6 x 10**-24 kg m/s \n", + " pe/pp : 1.94\n" + ] + } + ], + "source": [ + "#pg 179\n", + "#calculate the electron energy and momentum\n", + "#Given:\n", + "#Photoelectric effect\n", + "import math\n", + "lambda1 = 2000.; #wavelength in A\n", + "phi1 = 2.3;# Work function in eV\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 12422./lambda1; # Energy of photon in eV\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "Ee1 = (12422./lambda1)- phi1; # energy of an electron in eV\n", + "pe1 = math.sqrt(2*m*Ee1*1.6*10**-19); #electron momentum in kg m/s\n", + "pp1 = (E1*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "#calculations\n", + "ratio1 = pe1/pp1 ; # (pe/pp)\n", + "#Compton effect\n", + "lambda2 = 1; # wavelength in A\n", + "deltalambda = 0.048; # Compton shift in A\n", + "E2 = 12422/lambda2; # Energy of photon in eV\n", + "Ee2 = (12422/lambda2)- (12422/(lambda2+deltalambda));#energy of an electron in eV\n", + "pe2 = math.sqrt(2*m*Ee2*1.6*10**-19); #electron momentum in kg m/s\n", + "pp2 = (E2*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "ratio2 = pe2/pp2 ; # (pe/pp)\n", + "#results\n", + "print\"Photoelectric effect :\";\n", + "print\"Electron energy :\",Ee1,\"eV \\n Electron momentum :\",round(pe1*10**24,2),\"x 10**-24 kg m/s \\n Momentum of incident photon :\",round(pp1*10**27,2),\" x 10**-27 kg m/s \\n pe/pp :\",round(ratio1,0)\n", + "print\"Compton effect :\"\n", + "print\"Electron energy :\",round(Ee2,1),\"eV \\n Electron momentum :\",round(pe2*10**23,1),\"x 10**-23 kg m/s \\n Momentum of incident photon :\",round(pp2*10**24,1),\"x 10**-24 kg m/s \\n pe/pp : \",round(ratio2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 182" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gamma-rays,X-rays : \n", + " Energy : 1.2422 x 10**6 eV \n", + " Momentum : 6.6 x 10**-22 kg m/s\n", + " UV : \n", + " Energy : 124.22 eV \n", + " Momentum : 6.6 x 10**-26 kg m/s\n", + " IR : \n", + " Energy : 0.012422 eV \n", + " Momentum : 6.6 x 10**-30 kg m/s\n", + " Microwave : \n", + " Energy : 1.2422 x 10**-6 eV \n", + " Momentum : 6.6 x 10**-34 kg m/s\n", + " Radio waves : \n", + " Energy : 1.2422 x 10**-8 eV \n", + " Momentum : 6.6 x 10**-36 kg m/s\n" + ] + } + ], + "source": [ + "#pg 182\n", + "#calculate the Energy, Momentum of rays\n", + "#Given:\n", + "#Gamma-rays,X-rays\n", + "lambda1 = 0.01;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "E1 = 12422./lambda1; # Energy in A\n", + "p1 = (E1*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#UV\n", + "lambda2 = 100;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "E2 = 12422./lambda2; # Energy in A\n", + "p2 = (E2*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#IR\n", + "lambda3 = 1*10**-4;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda3 = 1*10**-4*10**10 A , 1 m = 1*10**10 A\n", + "E3 = 12422./(lambda3*10**10); # Energy in A\n", + "p3 = (E3*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Microwave\n", + "lambda4 = 1;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda4 = 1*10**10 A , 1 m = 1*10**10 A\n", + "E4 = 12422./(lambda4*10**10); # Energy in A\n", + "p4 = (E4*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Radio waves\n", + "lambda5 = 100;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda5 = 100*10**10 A , 1 m = 1*10**10 A\n", + "E5 = 12422./(lambda5*10**10); # Energy in A\n", + "p5 = (E5*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#results\n", + "print\"Gamma-rays,X-rays : \\n Energy :\",E1*10**-6,\" x 10**6 eV \\n Momentum :\",round(p1*10**22,1),\" x 10**-22 kg m/s\"\n", + "print\" UV : \\n Energy :\",E2,\"eV \\n Momentum :\",round(p2*10**26,1),\"x 10**-26 kg m/s\"\n", + "print\" IR : \\n Energy :\",E3,\"eV \\n Momentum :\",round(p3*10**30,1),\"x 10**-30 kg m/s\"\n", + "print\" Microwave : \\n Energy :\",E4*10**6,\"x 10**-6 eV \\n Momentum :\",round(p4*10**34,1),\"x 10**-34 kg m/s\"\n", + "print\" Radio waves : \\n Energy :\",E5*10**8,\"x 10**-8 eV \\n Momentum :\",round(p5*10**36,1),\"x 10**-36 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 183" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lambd(A) = 12.27 /sqrt(V) \n" + ] + } + ], + "source": [ + "#pg 183\n", + "#calculate the wavelength\n", + "#Given :\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.109*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "#lambd = h/sqrt(2*m*eV) here we dont have V , so let us caluclate the remaining part.\n", + "lambd = h/math.sqrt(2*m*e);# wavelength in A\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print\"lambd(A) =\",round(lambd/(1.0*10**-10),2),\"/sqrt(V) \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 185" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "De Broglie wavelength \n", + " (a)Rock : 3.31 x 10**-34 m \n", + " (b)For an electron (A) = 1.74\n" + ] + } + ], + "source": [ + "#pg 185\n", + "#calculate the de Broglie wavelength for Rock and electron\n", + "#Given :\n", + "import math\n", + "#(a)Rock\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 50.; # mass in g\n", + "v = 40.; # Speed in m/s\n", + "# m = 50*10**-3 kg , 1g = 1.0*10**-3 kg\n", + "#calculations\n", + "lambd1 = h/(m*10**-3*v); # Wavelength in m\n", + "#(b)For an electron\n", + "V = 50.; # in volts\n", + "lambd2 = 12.28/math.sqrt(V); # Wavelength in A\n", + "#results\n", + "print\"De Broglie wavelength \\n (a)Rock :\",round(lambd1*10**34,2),\" x 10**-34 m \\n (b)For an electron (A) = \",round(lambd2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 193" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position for a ball : 2.45 x 10^-32 m\n", + "Uncertainty in position for an electron (A) = 243.0\n" + ] + } + ], + "source": [ + "#pg 193\n", + "#calculate the uncertainty in position for ball and electron\n", + "#Given:\n", + "#(a) Ball\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 45; #mass in g\n", + "v1 = 40; #Speed in m/s\n", + "prec1 = 1.5/100 ;#precision\n", + "# m1 = 45*10**-3 kg , 1 g = 1.0*10**-3 kg\n", + "#calculations and results\n", + "p1 =m1*10**-3*v1 ; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap1 = prec1*p1 ;\n", + "deltax1 = h/deltap1; # uncertainty in position in m\n", + "print\"Uncertainty in position for a ball :\",round(deltax1*10**32,2),\"x 10^-32 m\"\n", + "#(b) Electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "v2 = 2*10**6 ; # Speed in m/s\n", + "prec2 = 1.5/100 ; # precision\n", + "p2 = m2*v2; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap2 = prec2*p2 ;\n", + "deltax2 = h/deltap2; # uncertainty in position in m\n", + "# 1 A = 1.0*10**-10 m\n", + "print\"Uncertainty in position for an electron (A) = \",round(deltax2/(1.0*10**-10),0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 203" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Marble \n", + "E_ 1 : 5.5 x 10**-64 J\n", + "E_ 2 : 21.9 x 10**-64 J\n", + "E_ 3 : 49.4 x 10**-64 J\n", + "(b)For an electron \n", + "E_ 1 : 37.6 eV\n", + "E_ 2 : 150.5 eV\n", + "E_ 3 : 338.7 eV\n" + ] + } + ], + "source": [ + "#pg 203\n", + "#calculate the first 3 Energy levels of marble and electron\n", + "#Given:\n", + "#(a) Marble\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 10.; # mass in g\n", + "L1 = 10.; # width in cm\n", + "# m1 = 10*10**-3 kg , 1 g = 1.0*10**-3 kg and L1 = 10*10**-2 m , 1 cm = 1.0*10**-2 m\n", + "#calculations and results\n", + "print\"(a)Marble \"\n", + "for n1 in range (1,4):\n", + " En1 = (n1**2*h**2)/(8*m1*10**-3*(L1*10**-2)**2); # Energry in J\n", + " print\"E_\",n1,\": \",round(En1*10**64,1),\"x 10**-64 J\"\n", + "\n", + "#(b) For an electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "L2 = 1 ; # width in A\n", + "#L2 = 1*10**-10 m , 1 A = 1.0*10**-10 m\n", + "print\"(b)For an electron \"\n", + "for n2 in range(1,4):\n", + " En2 = (n2**2*h**2)/(8*m2*(L2*10**-10)**2); # Energry in J\n", + " print\"E_\",n2,\":\",round(En2*6.24150934*10**18,1),\" eV\" # 1J = 6.24150934*10**18 eV\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/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 new file mode 100644 index 00000000..5d2dcf7b --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_1.ipynb @@ -0,0 +1,664 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Quantum Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 165" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy at First three levels for a 1s simple pendulum : \n", + "E_ 1 : 6.62 x 10^-34 J\n", + "E_ 2 : 13.25 x 10^-34 J\n", + "E_ 3 : 19.88 x 10^-34 J\n", + "Energy at First three levels for a hydrogen electron :\n", + "E_ 1 : -13.6 eV\n", + "E_ 2 : -3.4 eV\n", + "E_ 3 : -1.51 eV\n", + "Quantum number n is : 2.98 x 10**28\n", + "Percentage change in energy ( pendulum ) is 3.0 x 10**-27 \n", + "Percentage change in energy (hydrogen electron) is 75.0\n" + ] + } + ], + "source": [ + "#pg 165\n", + "#Quantised energy levels for microscopic and macroscopic systems\n", + "#calculate the energy levels and percentage change in energy\n", + "#Given :\n", + "import math\n", + "# (a) For a 1s simple pendulum :\n", + "T = 1.; # time period in s\n", + "nu = 1./T; #Frequency in Hz\n", + "#Planck's quantisation princple : E_n = n*h*nu\n", + "h = 6.625*10**-34 ; #Planck's constant in Js\n", + "#calculations and results\n", + "print \"Energy at First three levels for a 1s simple pendulum : \"\n", + "for n1 in range(1,4):\n", + " E1 = n1*h*nu ; # Energry in J\n", + " print \"E_\",n1,\": \",round(E1*10**34,2),\"x 10^-34 J\"\n", + "\n", + "# (b) For a hydrogen electron \n", + "# E_n = (-13.6/n**2)eV\n", + "print \"Energy at First three levels for a hydrogen electron :\"\n", + "\n", + "for n2 in range(1,4):\n", + " E2 = (-13.6/n2**2);#Energy in eV\n", + " print\"E_\",n2,\": \",round(E2,2),\"eV\"\n", + "\n", + "#Now, for a simple pendulum\n", + "m = 10.; # mass in g\n", + "a = 1.; # amplitude in cm\n", + "omega = 2*math.pi*nu; # angular frequency in rad/s\n", + "# 1 g = 1.0*10**-3 Kg and 1 cm = 1.0*10**-2 m\n", + "E = 1./2*((m*10**-3)*(omega**2)*(a*10**-2)**2); # Energy in J\n", + "#Thus,quantum number n = E/h*nu\n", + "n = E/(h*nu);\n", + "print\"Quantum number n is :\",round(n*10**-28,2),\" x 10**28\"\n", + "#(i)Pendulum :\n", + "#percentage change in energy = (E_n+1 - E_n)*100/E_n which is equal to [(n+1)*h*nu - n*h*nu]*100/(n*h*nu )\n", + "#Therefore , it is (1/n) * 100\n", + "pc = (1./n)*100; #percentage change in energy\n", + "print\"Percentage change in energy ( pendulum ) is\",round(pc*10**27,0),\"x 10**-27 \"\n", + "#(ii)Hyderogen electron :\n", + "n_1 = 1; #ground state\n", + "n_2 = 2; # next quantum state\n", + "E_1 = (-13.6/n_1**2); # Energy in eV\n", + "E_2 = (-13.6/n_2**2);#Energy in eV\n", + "#percentage change : |((E_2-E_1)*100)|/ |E_1|\n", + "pc1 =((E_2-E_1)*100)/(-E_1);#percentage change\n", + "print\"Percentage change in energy (hydrogen electron) is \",abs(pc1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 167" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of a photon is 19.875 x 10**-16 /lambd(in A) J\n", + "Energy of a photon is 12422.0 /lambd(in A) eV\n", + "Hence the range of energies for visible photos is 1.8 eV to 3.1 eV\n" + ] + } + ], + "source": [ + "#pg 167\n", + "#calculate the range of energies visible\n", + "#Given :\n", + "h = 6.625*10**-34;#Planck's constant in Js\n", + "c = 3*10**8 ; #velocity of light in m/s\n", + "# 1A = 1.0*10**-10 m\n", + "#(a)Energy of a photon : \n", + "# E = h*nu or E = h*c/lambd\n", + "#calculations and results\n", + "print\"Energy of a photon is\",round(((h*c)*10**10)*10**16,3),\"x 10**-16 /lambd(in A) J\"\n", + "#1eV = 1.6*10**-19 J\n", + "print\"Energy of a photon is \",round(((h*c)/(1.6*10**-19))*10**10),\"/lambd(in A) eV\"\n", + "#(b)Visible light Range is 4000-7000 A\n", + "lambd1 = 4000;#Wavelength in A\n", + "lambd2 = 7000;#Wavelength in A\n", + "# 1eV = 1.6*10**-19 J , \n", + "E1 = (h*c)/(lambd1*10**-10*1.6*10**-19); #Energy in eV\n", + "E2 = (h*c)/(lambd2*10**-10*1.6*10**-19);#Energy in eV\n", + "print\"Hence the range of energies for visible photos is\",round(E2,1), \"eV to\",round(E1,1), \"eV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 171" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " It will take 93.0 days\n" + ] + } + ], + "source": [ + "#pg 171\n", + "#calculate the take off time\n", + "import math\n", + "#Given :\n", + "#Power of the source = 10**-5 W = 10**-5 J/s\n", + "P = 10**-5 ; #Power in J/s\n", + "r = 10**-9; #radius in m\n", + "r1 = 5.; # metal plate 5 m away from the source\n", + "WF = 5.;#Work function in eV\n", + "#calculations\n", + "area = math.pi*(10**-9)**2 ; #area in m**2\n", + "area1 = 4*math.pi*r1**2; # area in m**2\n", + "P1 = P*(area/area1); # in J/s\n", + "# 1eV = 1.6*10**-19 J\n", + "t = (WF*1.6*10**-19)/P1 ;# in s\n", + "#1 day = 24 hours * 60 minutes * 60 seconds\n", + "N = t/(24*60*60); #in days\n", + "print \" It will take\",round(N),\"days\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 173" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Plancks constant h is 6.6 x 10^-34 Js and Work function phi is 1.755 eV \n" + ] + } + ], + "source": [ + "#pg 173\n", + "#calculate the Planck's constant and work function\n", + "#Given :\n", + "nu1 = 10*10**14;# Frequency in Hz\n", + "nu2 = 6*10**14;# Frequency in Hz\n", + "V_01 = 2.37; #Stopping potential in volts\n", + "V_02 = 0.72; #Stopping potential in volts\n", + "e = 1.6*10**-19 ;# Charge of an electron in C\n", + "#Einstein's photoeletric equation : h*nu = phi + e*V_0 \n", + "#calculations\n", + "h = (e*(V_02 - V_01))/(nu2 - nu1);#Planck's constant in Js\n", + "phi = ((h*nu1)-(e*V_01))/e ; # work function in eV\n", + "#results\n", + "print \"Plancks constant h is\",h*10**34,\"x 10^-34 Js and Work function phi is\",phi,\"eV \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 176" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Incident photon wavelength in Compton scattering is (A) = 0.11\n" + ] + } + ], + "source": [ + "#pg 176\n", + "#calculate the Incident photon wavelength\n", + "#Given :\n", + "import math,numpy\n", + "ME = 35*10**3 ; #Maximum energy in eV\n", + "theta = math.pi; # photon is backscattered\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m0 = 9.1*10**-31; #electron mass in Kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "deltalambd = (h*(1-math.cos(theta)))/(m0*c); # in A\n", + "# (h*c/lambd) - (h*c/lambd') = 35 KeV or (deltalambd/lambd*lambd1) = (35 KeV/h*c)\n", + "#Simplifying the above Equation , we will obtain : lambd**2 + 0.048 lambd - 0.017\n", + "#Roots of the quadratic equation are :\n", + "values = numpy.array([1,0.048,-0.017]); # a,b,c values of the quadratic equation\n", + "r = numpy.roots(values); #Roots of the final equation\n", + "#results\n", + "print \"Incident photon wavelength in Compton scattering is (A) = \",round(r[1],2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 177" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage change in energy for radiation in microwave range is : 8.0 x 10**-9\n", + "Percentage change in energy for radiation in visible range is : 5.0 x 10**-4\n", + "Percentage change in energy for radiation in X-ray range is : 2.4\n", + "Percentage change in energy for radiation in Gamma range is : 66.9\n" + ] + } + ], + "source": [ + "#pg 177\n", + "#calculate the Percentage change in energy\n", + "#Given :\n", + "import math\n", + "theta = 90.; #angle in degrees\n", + "m0 = 9.1*10**-31; #electron mass in kg\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "deltalambda = ((h*(1-math.cos(theta/57.3)))/(m0*c))*10**10; # in A\n", + "#(a) Microwave range\n", + "lambda1 = 3.0 ;# wavelength in cm\n", + "#calculations and results\n", + "#lambda1 = 3.0*10**8 A , 1 cm = 1*10**8 A\n", + "pc1 = ((deltalambda)*100.)/((lambda1*10**8) + deltalambda) ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in microwave range is :\",round(pc1*10**9,0),\"x 10**-9\"\n", + "#(b) Visible range\n", + "lambda2 = 5000 ;# wavelength in A\n", + "pc2 = ((deltalambda)/(lambda2 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in visible range is :\",round(pc2*10**4,0),\"x 10**-4\"\n", + "#(c) X-ray range\n", + "lambda3 = 1 ; #wavelength in A\n", + "pc3 = ((deltalambda)/(lambda3 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in X-ray range is :\" ,round(pc3,1)\n", + "#(d)Gamma ray range\n", + "lambda4 = 0.012 ;# wavelength in A\n", + "pc4 = ((deltalambda)/(lambda4 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in Gamma range is : \",round(pc4,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 179" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Photoelectric effect :\n", + "Electron energy : 3.911 eV \n", + " Electron momentum : 1.07 x 10**-24 kg m/s \n", + " Momentum of incident photon : 3.31 x 10**-27 kg m/s \n", + " pe/pp : 322.0\n", + "Compton effect :\n", + "Electron energy : 568.9 eV \n", + " Electron momentum : 1.3 x 10**-23 kg m/s \n", + " Momentum of incident photon : 6.6 x 10**-24 kg m/s \n", + " pe/pp : 1.94\n" + ] + } + ], + "source": [ + "#pg 179\n", + "#calculate the electron energy and momentum\n", + "#Given:\n", + "#Photoelectric effect\n", + "import math\n", + "lambda1 = 2000.; #wavelength in A\n", + "phi1 = 2.3;# Work function in eV\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 12422./lambda1; # Energy of photon in eV\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "Ee1 = (12422./lambda1)- phi1; # energy of an electron in eV\n", + "pe1 = math.sqrt(2*m*Ee1*1.6*10**-19); #electron momentum in kg m/s\n", + "pp1 = (E1*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "#calculations\n", + "ratio1 = pe1/pp1 ; # (pe/pp)\n", + "#Compton effect\n", + "lambda2 = 1; # wavelength in A\n", + "deltalambda = 0.048; # Compton shift in A\n", + "E2 = 12422/lambda2; # Energy of photon in eV\n", + "Ee2 = (12422/lambda2)- (12422/(lambda2+deltalambda));#energy of an electron in eV\n", + "pe2 = math.sqrt(2*m*Ee2*1.6*10**-19); #electron momentum in kg m/s\n", + "pp2 = (E2*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "ratio2 = pe2/pp2 ; # (pe/pp)\n", + "#results\n", + "print\"Photoelectric effect :\";\n", + "print\"Electron energy :\",Ee1,\"eV \\n Electron momentum :\",round(pe1*10**24,2),\"x 10**-24 kg m/s \\n Momentum of incident photon :\",round(pp1*10**27,2),\" x 10**-27 kg m/s \\n pe/pp :\",round(ratio1,0)\n", + "print\"Compton effect :\"\n", + "print\"Electron energy :\",round(Ee2,1),\"eV \\n Electron momentum :\",round(pe2*10**23,1),\"x 10**-23 kg m/s \\n Momentum of incident photon :\",round(pp2*10**24,1),\"x 10**-24 kg m/s \\n pe/pp : \",round(ratio2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 182" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gamma-rays,X-rays : \n", + " Energy : 1.2422 x 10**6 eV \n", + " Momentum : 6.6 x 10**-22 kg m/s\n", + " UV : \n", + " Energy : 124.22 eV \n", + " Momentum : 6.6 x 10**-26 kg m/s\n", + " IR : \n", + " Energy : 0.012422 eV \n", + " Momentum : 6.6 x 10**-30 kg m/s\n", + " Microwave : \n", + " Energy : 1.2422 x 10**-6 eV \n", + " Momentum : 6.6 x 10**-34 kg m/s\n", + " Radio waves : \n", + " Energy : 1.2422 x 10**-8 eV \n", + " Momentum : 6.6 x 10**-36 kg m/s\n" + ] + } + ], + "source": [ + "#pg 182\n", + "#calculate the Energy, Momentum of rays\n", + "#Given:\n", + "#Gamma-rays,X-rays\n", + "lambda1 = 0.01;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "E1 = 12422./lambda1; # Energy in A\n", + "p1 = (E1*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#UV\n", + "lambda2 = 100;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "E2 = 12422./lambda2; # Energy in A\n", + "p2 = (E2*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#IR\n", + "lambda3 = 1*10**-4;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda3 = 1*10**-4*10**10 A , 1 m = 1*10**10 A\n", + "E3 = 12422./(lambda3*10**10); # Energy in A\n", + "p3 = (E3*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Microwave\n", + "lambda4 = 1;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda4 = 1*10**10 A , 1 m = 1*10**10 A\n", + "E4 = 12422./(lambda4*10**10); # Energy in A\n", + "p4 = (E4*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Radio waves\n", + "lambda5 = 100;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda5 = 100*10**10 A , 1 m = 1*10**10 A\n", + "E5 = 12422./(lambda5*10**10); # Energy in A\n", + "p5 = (E5*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#results\n", + "print\"Gamma-rays,X-rays : \\n Energy :\",E1*10**-6,\" x 10**6 eV \\n Momentum :\",round(p1*10**22,1),\" x 10**-22 kg m/s\"\n", + "print\" UV : \\n Energy :\",E2,\"eV \\n Momentum :\",round(p2*10**26,1),\"x 10**-26 kg m/s\"\n", + "print\" IR : \\n Energy :\",E3,\"eV \\n Momentum :\",round(p3*10**30,1),\"x 10**-30 kg m/s\"\n", + "print\" Microwave : \\n Energy :\",E4*10**6,\"x 10**-6 eV \\n Momentum :\",round(p4*10**34,1),\"x 10**-34 kg m/s\"\n", + "print\" Radio waves : \\n Energy :\",E5*10**8,\"x 10**-8 eV \\n Momentum :\",round(p5*10**36,1),\"x 10**-36 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 183" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lambd(A) = 12.27 /sqrt(V) \n" + ] + } + ], + "source": [ + "#pg 183\n", + "#calculate the wavelength\n", + "#Given :\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.109*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "#lambd = h/sqrt(2*m*eV) here we dont have V , so let us caluclate the remaining part.\n", + "lambd = h/math.sqrt(2*m*e);# wavelength in A\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print\"lambd(A) =\",round(lambd/(1.0*10**-10),2),\"/sqrt(V) \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 185" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "De Broglie wavelength \n", + " (a)Rock : 3.31 x 10**-34 m \n", + " (b)For an electron (A) = 1.74\n" + ] + } + ], + "source": [ + "#pg 185\n", + "#calculate the de Broglie wavelength for Rock and electron\n", + "#Given :\n", + "import math\n", + "#(a)Rock\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 50.; # mass in g\n", + "v = 40.; # Speed in m/s\n", + "# m = 50*10**-3 kg , 1g = 1.0*10**-3 kg\n", + "#calculations\n", + "lambd1 = h/(m*10**-3*v); # Wavelength in m\n", + "#(b)For an electron\n", + "V = 50.; # in volts\n", + "lambd2 = 12.28/math.sqrt(V); # Wavelength in A\n", + "#results\n", + "print\"De Broglie wavelength \\n (a)Rock :\",round(lambd1*10**34,2),\" x 10**-34 m \\n (b)For an electron (A) = \",round(lambd2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 193" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position for a ball : 2.45 x 10^-32 m\n", + "Uncertainty in position for an electron (A) = 243.0\n" + ] + } + ], + "source": [ + "#pg 193\n", + "#calculate the uncertainty in position for ball and electron\n", + "#Given:\n", + "#(a) Ball\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 45; #mass in g\n", + "v1 = 40; #Speed in m/s\n", + "prec1 = 1.5/100 ;#precision\n", + "# m1 = 45*10**-3 kg , 1 g = 1.0*10**-3 kg\n", + "#calculations and results\n", + "p1 =m1*10**-3*v1 ; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap1 = prec1*p1 ;\n", + "deltax1 = h/deltap1; # uncertainty in position in m\n", + "print\"Uncertainty in position for a ball :\",round(deltax1*10**32,2),\"x 10^-32 m\"\n", + "#(b) Electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "v2 = 2*10**6 ; # Speed in m/s\n", + "prec2 = 1.5/100 ; # precision\n", + "p2 = m2*v2; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap2 = prec2*p2 ;\n", + "deltax2 = h/deltap2; # uncertainty in position in m\n", + "# 1 A = 1.0*10**-10 m\n", + "print\"Uncertainty in position for an electron (A) = \",round(deltax2/(1.0*10**-10),0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 203" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Marble \n", + "E_ 1 : 5.5 x 10**-64 J\n", + "E_ 2 : 21.9 x 10**-64 J\n", + "E_ 3 : 49.4 x 10**-64 J\n", + "(b)For an electron \n", + "E_ 1 : 37.6 eV\n", + "E_ 2 : 150.5 eV\n", + "E_ 3 : 338.7 eV\n" + ] + } + ], + "source": [ + "#pg 203\n", + "#calculate the first 3 Energy levels of marble and electron\n", + "#Given:\n", + "#(a) Marble\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 10.; # mass in g\n", + "L1 = 10.; # width in cm\n", + "# m1 = 10*10**-3 kg , 1 g = 1.0*10**-3 kg and L1 = 10*10**-2 m , 1 cm = 1.0*10**-2 m\n", + "#calculations and results\n", + "print\"(a)Marble \"\n", + "for n1 in range (1,4):\n", + " En1 = (n1**2*h**2)/(8*m1*10**-3*(L1*10**-2)**2); # Energry in J\n", + " print\"E_\",n1,\": \",round(En1*10**64,1),\"x 10**-64 J\"\n", + "\n", + "#(b) For an electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "L2 = 1 ; # width in A\n", + "#L2 = 1*10**-10 m , 1 A = 1.0*10**-10 m\n", + "print\"(b)For an electron \"\n", + "for n2 in range(1,4):\n", + " En2 = (n2**2*h**2)/(8*m2*(L2*10**-10)**2); # Energry in J\n", + " print\"E_\",n2,\":\",round(En2*6.24150934*10**18,1),\" eV\" # 1J = 6.24150934*10**18 eV\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/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 new file mode 100644 index 00000000..5d2dcf7b --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter6_2.ipynb @@ -0,0 +1,664 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Quantum Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 165" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy at First three levels for a 1s simple pendulum : \n", + "E_ 1 : 6.62 x 10^-34 J\n", + "E_ 2 : 13.25 x 10^-34 J\n", + "E_ 3 : 19.88 x 10^-34 J\n", + "Energy at First three levels for a hydrogen electron :\n", + "E_ 1 : -13.6 eV\n", + "E_ 2 : -3.4 eV\n", + "E_ 3 : -1.51 eV\n", + "Quantum number n is : 2.98 x 10**28\n", + "Percentage change in energy ( pendulum ) is 3.0 x 10**-27 \n", + "Percentage change in energy (hydrogen electron) is 75.0\n" + ] + } + ], + "source": [ + "#pg 165\n", + "#Quantised energy levels for microscopic and macroscopic systems\n", + "#calculate the energy levels and percentage change in energy\n", + "#Given :\n", + "import math\n", + "# (a) For a 1s simple pendulum :\n", + "T = 1.; # time period in s\n", + "nu = 1./T; #Frequency in Hz\n", + "#Planck's quantisation princple : E_n = n*h*nu\n", + "h = 6.625*10**-34 ; #Planck's constant in Js\n", + "#calculations and results\n", + "print \"Energy at First three levels for a 1s simple pendulum : \"\n", + "for n1 in range(1,4):\n", + " E1 = n1*h*nu ; # Energry in J\n", + " print \"E_\",n1,\": \",round(E1*10**34,2),\"x 10^-34 J\"\n", + "\n", + "# (b) For a hydrogen electron \n", + "# E_n = (-13.6/n**2)eV\n", + "print \"Energy at First three levels for a hydrogen electron :\"\n", + "\n", + "for n2 in range(1,4):\n", + " E2 = (-13.6/n2**2);#Energy in eV\n", + " print\"E_\",n2,\": \",round(E2,2),\"eV\"\n", + "\n", + "#Now, for a simple pendulum\n", + "m = 10.; # mass in g\n", + "a = 1.; # amplitude in cm\n", + "omega = 2*math.pi*nu; # angular frequency in rad/s\n", + "# 1 g = 1.0*10**-3 Kg and 1 cm = 1.0*10**-2 m\n", + "E = 1./2*((m*10**-3)*(omega**2)*(a*10**-2)**2); # Energy in J\n", + "#Thus,quantum number n = E/h*nu\n", + "n = E/(h*nu);\n", + "print\"Quantum number n is :\",round(n*10**-28,2),\" x 10**28\"\n", + "#(i)Pendulum :\n", + "#percentage change in energy = (E_n+1 - E_n)*100/E_n which is equal to [(n+1)*h*nu - n*h*nu]*100/(n*h*nu )\n", + "#Therefore , it is (1/n) * 100\n", + "pc = (1./n)*100; #percentage change in energy\n", + "print\"Percentage change in energy ( pendulum ) is\",round(pc*10**27,0),\"x 10**-27 \"\n", + "#(ii)Hyderogen electron :\n", + "n_1 = 1; #ground state\n", + "n_2 = 2; # next quantum state\n", + "E_1 = (-13.6/n_1**2); # Energy in eV\n", + "E_2 = (-13.6/n_2**2);#Energy in eV\n", + "#percentage change : |((E_2-E_1)*100)|/ |E_1|\n", + "pc1 =((E_2-E_1)*100)/(-E_1);#percentage change\n", + "print\"Percentage change in energy (hydrogen electron) is \",abs(pc1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 167" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy of a photon is 19.875 x 10**-16 /lambd(in A) J\n", + "Energy of a photon is 12422.0 /lambd(in A) eV\n", + "Hence the range of energies for visible photos is 1.8 eV to 3.1 eV\n" + ] + } + ], + "source": [ + "#pg 167\n", + "#calculate the range of energies visible\n", + "#Given :\n", + "h = 6.625*10**-34;#Planck's constant in Js\n", + "c = 3*10**8 ; #velocity of light in m/s\n", + "# 1A = 1.0*10**-10 m\n", + "#(a)Energy of a photon : \n", + "# E = h*nu or E = h*c/lambd\n", + "#calculations and results\n", + "print\"Energy of a photon is\",round(((h*c)*10**10)*10**16,3),\"x 10**-16 /lambd(in A) J\"\n", + "#1eV = 1.6*10**-19 J\n", + "print\"Energy of a photon is \",round(((h*c)/(1.6*10**-19))*10**10),\"/lambd(in A) eV\"\n", + "#(b)Visible light Range is 4000-7000 A\n", + "lambd1 = 4000;#Wavelength in A\n", + "lambd2 = 7000;#Wavelength in A\n", + "# 1eV = 1.6*10**-19 J , \n", + "E1 = (h*c)/(lambd1*10**-10*1.6*10**-19); #Energy in eV\n", + "E2 = (h*c)/(lambd2*10**-10*1.6*10**-19);#Energy in eV\n", + "print\"Hence the range of energies for visible photos is\",round(E2,1), \"eV to\",round(E1,1), \"eV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 171" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " It will take 93.0 days\n" + ] + } + ], + "source": [ + "#pg 171\n", + "#calculate the take off time\n", + "import math\n", + "#Given :\n", + "#Power of the source = 10**-5 W = 10**-5 J/s\n", + "P = 10**-5 ; #Power in J/s\n", + "r = 10**-9; #radius in m\n", + "r1 = 5.; # metal plate 5 m away from the source\n", + "WF = 5.;#Work function in eV\n", + "#calculations\n", + "area = math.pi*(10**-9)**2 ; #area in m**2\n", + "area1 = 4*math.pi*r1**2; # area in m**2\n", + "P1 = P*(area/area1); # in J/s\n", + "# 1eV = 1.6*10**-19 J\n", + "t = (WF*1.6*10**-19)/P1 ;# in s\n", + "#1 day = 24 hours * 60 minutes * 60 seconds\n", + "N = t/(24*60*60); #in days\n", + "print \" It will take\",round(N),\"days\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 173" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Plancks constant h is 6.6 x 10^-34 Js and Work function phi is 1.755 eV \n" + ] + } + ], + "source": [ + "#pg 173\n", + "#calculate the Planck's constant and work function\n", + "#Given :\n", + "nu1 = 10*10**14;# Frequency in Hz\n", + "nu2 = 6*10**14;# Frequency in Hz\n", + "V_01 = 2.37; #Stopping potential in volts\n", + "V_02 = 0.72; #Stopping potential in volts\n", + "e = 1.6*10**-19 ;# Charge of an electron in C\n", + "#Einstein's photoeletric equation : h*nu = phi + e*V_0 \n", + "#calculations\n", + "h = (e*(V_02 - V_01))/(nu2 - nu1);#Planck's constant in Js\n", + "phi = ((h*nu1)-(e*V_01))/e ; # work function in eV\n", + "#results\n", + "print \"Plancks constant h is\",h*10**34,\"x 10^-34 Js and Work function phi is\",phi,\"eV \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 176" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Incident photon wavelength in Compton scattering is (A) = 0.11\n" + ] + } + ], + "source": [ + "#pg 176\n", + "#calculate the Incident photon wavelength\n", + "#Given :\n", + "import math,numpy\n", + "ME = 35*10**3 ; #Maximum energy in eV\n", + "theta = math.pi; # photon is backscattered\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m0 = 9.1*10**-31; #electron mass in Kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "deltalambd = (h*(1-math.cos(theta)))/(m0*c); # in A\n", + "# (h*c/lambd) - (h*c/lambd') = 35 KeV or (deltalambd/lambd*lambd1) = (35 KeV/h*c)\n", + "#Simplifying the above Equation , we will obtain : lambd**2 + 0.048 lambd - 0.017\n", + "#Roots of the quadratic equation are :\n", + "values = numpy.array([1,0.048,-0.017]); # a,b,c values of the quadratic equation\n", + "r = numpy.roots(values); #Roots of the final equation\n", + "#results\n", + "print \"Incident photon wavelength in Compton scattering is (A) = \",round(r[1],2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6 - pg 177" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage change in energy for radiation in microwave range is : 8.0 x 10**-9\n", + "Percentage change in energy for radiation in visible range is : 5.0 x 10**-4\n", + "Percentage change in energy for radiation in X-ray range is : 2.4\n", + "Percentage change in energy for radiation in Gamma range is : 66.9\n" + ] + } + ], + "source": [ + "#pg 177\n", + "#calculate the Percentage change in energy\n", + "#Given :\n", + "import math\n", + "theta = 90.; #angle in degrees\n", + "m0 = 9.1*10**-31; #electron mass in kg\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "deltalambda = ((h*(1-math.cos(theta/57.3)))/(m0*c))*10**10; # in A\n", + "#(a) Microwave range\n", + "lambda1 = 3.0 ;# wavelength in cm\n", + "#calculations and results\n", + "#lambda1 = 3.0*10**8 A , 1 cm = 1*10**8 A\n", + "pc1 = ((deltalambda)*100.)/((lambda1*10**8) + deltalambda) ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in microwave range is :\",round(pc1*10**9,0),\"x 10**-9\"\n", + "#(b) Visible range\n", + "lambda2 = 5000 ;# wavelength in A\n", + "pc2 = ((deltalambda)/(lambda2 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in visible range is :\",round(pc2*10**4,0),\"x 10**-4\"\n", + "#(c) X-ray range\n", + "lambda3 = 1 ; #wavelength in A\n", + "pc3 = ((deltalambda)/(lambda3 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in X-ray range is :\" ,round(pc3,1)\n", + "#(d)Gamma ray range\n", + "lambda4 = 0.012 ;# wavelength in A\n", + "pc4 = ((deltalambda)/(lambda4 + deltalambda))*100 ;#percent change in photon energy\n", + "print\"Percentage change in energy for radiation in Gamma range is : \",round(pc4,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 179" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Photoelectric effect :\n", + "Electron energy : 3.911 eV \n", + " Electron momentum : 1.07 x 10**-24 kg m/s \n", + " Momentum of incident photon : 3.31 x 10**-27 kg m/s \n", + " pe/pp : 322.0\n", + "Compton effect :\n", + "Electron energy : 568.9 eV \n", + " Electron momentum : 1.3 x 10**-23 kg m/s \n", + " Momentum of incident photon : 6.6 x 10**-24 kg m/s \n", + " pe/pp : 1.94\n" + ] + } + ], + "source": [ + "#pg 179\n", + "#calculate the electron energy and momentum\n", + "#Given:\n", + "#Photoelectric effect\n", + "import math\n", + "lambda1 = 2000.; #wavelength in A\n", + "phi1 = 2.3;# Work function in eV\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 12422./lambda1; # Energy of photon in eV\n", + "c = 3.*10**8; #Speed of light in m/s\n", + "Ee1 = (12422./lambda1)- phi1; # energy of an electron in eV\n", + "pe1 = math.sqrt(2*m*Ee1*1.6*10**-19); #electron momentum in kg m/s\n", + "pp1 = (E1*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "#calculations\n", + "ratio1 = pe1/pp1 ; # (pe/pp)\n", + "#Compton effect\n", + "lambda2 = 1; # wavelength in A\n", + "deltalambda = 0.048; # Compton shift in A\n", + "E2 = 12422/lambda2; # Energy of photon in eV\n", + "Ee2 = (12422/lambda2)- (12422/(lambda2+deltalambda));#energy of an electron in eV\n", + "pe2 = math.sqrt(2*m*Ee2*1.6*10**-19); #electron momentum in kg m/s\n", + "pp2 = (E2*1.6*10**-19)/c ; # Momentum of incident photon in kg m/s\n", + "ratio2 = pe2/pp2 ; # (pe/pp)\n", + "#results\n", + "print\"Photoelectric effect :\";\n", + "print\"Electron energy :\",Ee1,\"eV \\n Electron momentum :\",round(pe1*10**24,2),\"x 10**-24 kg m/s \\n Momentum of incident photon :\",round(pp1*10**27,2),\" x 10**-27 kg m/s \\n pe/pp :\",round(ratio1,0)\n", + "print\"Compton effect :\"\n", + "print\"Electron energy :\",round(Ee2,1),\"eV \\n Electron momentum :\",round(pe2*10**23,1),\"x 10**-23 kg m/s \\n Momentum of incident photon :\",round(pp2*10**24,1),\"x 10**-24 kg m/s \\n pe/pp : \",round(ratio2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 182" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gamma-rays,X-rays : \n", + " Energy : 1.2422 x 10**6 eV \n", + " Momentum : 6.6 x 10**-22 kg m/s\n", + " UV : \n", + " Energy : 124.22 eV \n", + " Momentum : 6.6 x 10**-26 kg m/s\n", + " IR : \n", + " Energy : 0.012422 eV \n", + " Momentum : 6.6 x 10**-30 kg m/s\n", + " Microwave : \n", + " Energy : 1.2422 x 10**-6 eV \n", + " Momentum : 6.6 x 10**-34 kg m/s\n", + " Radio waves : \n", + " Energy : 1.2422 x 10**-8 eV \n", + " Momentum : 6.6 x 10**-36 kg m/s\n" + ] + } + ], + "source": [ + "#pg 182\n", + "#calculate the Energy, Momentum of rays\n", + "#Given:\n", + "#Gamma-rays,X-rays\n", + "lambda1 = 0.01;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#calculations\n", + "E1 = 12422./lambda1; # Energy in A\n", + "p1 = (E1*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#UV\n", + "lambda2 = 100;#Wavelength in A\n", + "c = 3*10**8; #Speed of light in m/s\n", + "E2 = 12422./lambda2; # Energy in A\n", + "p2 = (E2*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#IR\n", + "lambda3 = 1*10**-4;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda3 = 1*10**-4*10**10 A , 1 m = 1*10**10 A\n", + "E3 = 12422./(lambda3*10**10); # Energy in A\n", + "p3 = (E3*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Microwave\n", + "lambda4 = 1;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda4 = 1*10**10 A , 1 m = 1*10**10 A\n", + "E4 = 12422./(lambda4*10**10); # Energy in A\n", + "p4 = (E4*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#Radio waves\n", + "lambda5 = 100;#Wavelength in m\n", + "c = 3*10**8; #Speed of light in m/s\n", + "#lambda5 = 100*10**10 A , 1 m = 1*10**10 A\n", + "E5 = 12422./(lambda5*10**10); # Energy in A\n", + "p5 = (E5*1.6*10**-19)/c ; #Momentum in kg m/s\n", + "#results\n", + "print\"Gamma-rays,X-rays : \\n Energy :\",E1*10**-6,\" x 10**6 eV \\n Momentum :\",round(p1*10**22,1),\" x 10**-22 kg m/s\"\n", + "print\" UV : \\n Energy :\",E2,\"eV \\n Momentum :\",round(p2*10**26,1),\"x 10**-26 kg m/s\"\n", + "print\" IR : \\n Energy :\",E3,\"eV \\n Momentum :\",round(p3*10**30,1),\"x 10**-30 kg m/s\"\n", + "print\" Microwave : \\n Energy :\",E4*10**6,\"x 10**-6 eV \\n Momentum :\",round(p4*10**34,1),\"x 10**-34 kg m/s\"\n", + "print\" Radio waves : \\n Energy :\",E5*10**8,\"x 10**-8 eV \\n Momentum :\",round(p5*10**36,1),\"x 10**-36 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 183" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lambd(A) = 12.27 /sqrt(V) \n" + ] + } + ], + "source": [ + "#pg 183\n", + "#calculate the wavelength\n", + "#Given :\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.109*10**-31;# electron mass in kg\n", + "e = 1.6*10**-19; # charge of an electron in C\n", + "#calculations\n", + "#lambd = h/sqrt(2*m*eV) here we dont have V , so let us caluclate the remaining part.\n", + "lambd = h/math.sqrt(2*m*e);# wavelength in A\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print\"lambd(A) =\",round(lambd/(1.0*10**-10),2),\"/sqrt(V) \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 185" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "De Broglie wavelength \n", + " (a)Rock : 3.31 x 10**-34 m \n", + " (b)For an electron (A) = 1.74\n" + ] + } + ], + "source": [ + "#pg 185\n", + "#calculate the de Broglie wavelength for Rock and electron\n", + "#Given :\n", + "import math\n", + "#(a)Rock\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 50.; # mass in g\n", + "v = 40.; # Speed in m/s\n", + "# m = 50*10**-3 kg , 1g = 1.0*10**-3 kg\n", + "#calculations\n", + "lambd1 = h/(m*10**-3*v); # Wavelength in m\n", + "#(b)For an electron\n", + "V = 50.; # in volts\n", + "lambd2 = 12.28/math.sqrt(V); # Wavelength in A\n", + "#results\n", + "print\"De Broglie wavelength \\n (a)Rock :\",round(lambd1*10**34,2),\" x 10**-34 m \\n (b)For an electron (A) = \",round(lambd2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14 - pg 193" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position for a ball : 2.45 x 10^-32 m\n", + "Uncertainty in position for an electron (A) = 243.0\n" + ] + } + ], + "source": [ + "#pg 193\n", + "#calculate the uncertainty in position for ball and electron\n", + "#Given:\n", + "#(a) Ball\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 45; #mass in g\n", + "v1 = 40; #Speed in m/s\n", + "prec1 = 1.5/100 ;#precision\n", + "# m1 = 45*10**-3 kg , 1 g = 1.0*10**-3 kg\n", + "#calculations and results\n", + "p1 =m1*10**-3*v1 ; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap1 = prec1*p1 ;\n", + "deltax1 = h/deltap1; # uncertainty in position in m\n", + "print\"Uncertainty in position for a ball :\",round(deltax1*10**32,2),\"x 10^-32 m\"\n", + "#(b) Electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "v2 = 2*10**6 ; # Speed in m/s\n", + "prec2 = 1.5/100 ; # precision\n", + "p2 = m2*v2; # momentum in kg m/s\n", + "#(deltap/p)*100 = 1.5\n", + "deltap2 = prec2*p2 ;\n", + "deltax2 = h/deltap2; # uncertainty in position in m\n", + "# 1 A = 1.0*10**-10 m\n", + "print\"Uncertainty in position for an electron (A) = \",round(deltax2/(1.0*10**-10),0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17 - pg 203" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a)Marble \n", + "E_ 1 : 5.5 x 10**-64 J\n", + "E_ 2 : 21.9 x 10**-64 J\n", + "E_ 3 : 49.4 x 10**-64 J\n", + "(b)For an electron \n", + "E_ 1 : 37.6 eV\n", + "E_ 2 : 150.5 eV\n", + "E_ 3 : 338.7 eV\n" + ] + } + ], + "source": [ + "#pg 203\n", + "#calculate the first 3 Energy levels of marble and electron\n", + "#Given:\n", + "#(a) Marble\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m1 = 10.; # mass in g\n", + "L1 = 10.; # width in cm\n", + "# m1 = 10*10**-3 kg , 1 g = 1.0*10**-3 kg and L1 = 10*10**-2 m , 1 cm = 1.0*10**-2 m\n", + "#calculations and results\n", + "print\"(a)Marble \"\n", + "for n1 in range (1,4):\n", + " En1 = (n1**2*h**2)/(8*m1*10**-3*(L1*10**-2)**2); # Energry in J\n", + " print\"E_\",n1,\": \",round(En1*10**64,1),\"x 10**-64 J\"\n", + "\n", + "#(b) For an electron\n", + "m2 = 9.1*10**-31; #electron mass in kg\n", + "L2 = 1 ; # width in A\n", + "#L2 = 1*10**-10 m , 1 A = 1.0*10**-10 m\n", + "print\"(b)For an electron \"\n", + "for n2 in range(1,4):\n", + " En2 = (n2**2*h**2)/(8*m2*(L2*10**-10)**2); # Energry in J\n", + " print\"E_\",n2,\":\",round(En2*6.24150934*10**18,1),\" eV\" # 1J = 6.24150934*10**18 eV\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7.ipynb new file mode 100755 index 00000000..b200f715 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7.ipynb @@ -0,0 +1,194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Atomic Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 217" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For hydrogen atom : \n", + " Radius = 0.53 A \n", + " Velocity = 2.2 x 10^6 m/s \n", + " Energy of an electron (eV) = -13.6\n" + ] + } + ], + "source": [ + "#pg 217\n", + "#calculate the Radius, Velocity and Energy of electron\n", + "#Given :\n", + "import math\n", + "n =1.; # ground state\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "r1 = (n**2*h**2*e0)/(math.pi*m*e**2);# Radius in A\n", + "v1 = e**2/(2*h*e0*n); # Velocity in m/s\n", + "E1 = -((m*e**4)/(8*n**2*h**2*e0**2)); # Energy of an electron in eV\n", + "# 1 A = 1.0*10**-10 m , 1 eV = 1.6*10**-19 J\n", + "#results\n", + "print\"For hydrogen atom : \\n Radius =\",round(r1*10**10,2),\"A \\n Velocity =\",round(v1*10**-6,1),\"x 10^6 m/s \\n Energy of an electron (eV) = \",round(E1/(1.6*10**-19),1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 218" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rydberg constant for hydrogen (cm^-1) = 109737.16\n", + "Rydberg Constant is (cm^-1) = 109677.43\n" + ] + } + ], + "source": [ + "#pg 218\n", + "#calculate the Rydberg constant\n", + "#Given :\n", + "#(a)\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "c = 2.997925*10**8; #Speed of light in m/s\n", + "h = 6.626069*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "R = (m*e**4)/(8*h**3*e0**2*c);# Rydberg constant in m**-1\n", + "print\"Rydberg constant for hydrogen (cm^-1) = \",round(R*10**-2,2)\n", + "#(b)\n", + "M = 1.672622*10**-27; # proton mass in kg\n", + "R1 = ((m*e**4)/(8*h**3*e0**2*c))*(1/(1 + (m/M))); # Rydberg Constant in m**-1\n", + "#1 m**-1 = 1.0*10**-2 cm**-1\n", + "#results\n", + "print\"Rydberg Constant is (cm^-1) = \",round(R1*10**-2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 219" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M/m value is : 1840.4\n" + ] + } + ], + "source": [ + "#pg 219\n", + "#calculate the M/m value\n", + "#Given :\n", + "RH= 109677.58; #Rydberg constant for Hydrogen in cm**-1\n", + "RHe = 109722.269; #Rydberg constant for Helium in cm**-1\n", + "#calculations\n", + "#Ratio = M/m\n", + "Ratio = ((4*RH)- (RHe))/(4*(RHe-RH));\n", + "#results\n", + "print \"M/m value is : \",round(Ratio,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position (A) = 0.53\n" + ] + } + ], + "source": [ + "#pg 223\n", + "#calculate the Uncertainty in position\n", + "#Given\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 13.6; #Energy of electron in eV\n", + "#1 eV = 1.6*10**-19 J\n", + "#calculations\n", + "p = math.sqrt(2*m*E1*1.6*10**-19); #momentum in kg m/s\n", + "deltax = h/(2*math.pi*p);\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print \"Uncertainty in position (A) = \",round(deltax/(1.0*10**-10),2);" + ] + } + ], + "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/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 new file mode 100644 index 00000000..b200f715 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_1.ipynb @@ -0,0 +1,194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Atomic Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 217" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For hydrogen atom : \n", + " Radius = 0.53 A \n", + " Velocity = 2.2 x 10^6 m/s \n", + " Energy of an electron (eV) = -13.6\n" + ] + } + ], + "source": [ + "#pg 217\n", + "#calculate the Radius, Velocity and Energy of electron\n", + "#Given :\n", + "import math\n", + "n =1.; # ground state\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "r1 = (n**2*h**2*e0)/(math.pi*m*e**2);# Radius in A\n", + "v1 = e**2/(2*h*e0*n); # Velocity in m/s\n", + "E1 = -((m*e**4)/(8*n**2*h**2*e0**2)); # Energy of an electron in eV\n", + "# 1 A = 1.0*10**-10 m , 1 eV = 1.6*10**-19 J\n", + "#results\n", + "print\"For hydrogen atom : \\n Radius =\",round(r1*10**10,2),\"A \\n Velocity =\",round(v1*10**-6,1),\"x 10^6 m/s \\n Energy of an electron (eV) = \",round(E1/(1.6*10**-19),1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 218" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rydberg constant for hydrogen (cm^-1) = 109737.16\n", + "Rydberg Constant is (cm^-1) = 109677.43\n" + ] + } + ], + "source": [ + "#pg 218\n", + "#calculate the Rydberg constant\n", + "#Given :\n", + "#(a)\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "c = 2.997925*10**8; #Speed of light in m/s\n", + "h = 6.626069*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "R = (m*e**4)/(8*h**3*e0**2*c);# Rydberg constant in m**-1\n", + "print\"Rydberg constant for hydrogen (cm^-1) = \",round(R*10**-2,2)\n", + "#(b)\n", + "M = 1.672622*10**-27; # proton mass in kg\n", + "R1 = ((m*e**4)/(8*h**3*e0**2*c))*(1/(1 + (m/M))); # Rydberg Constant in m**-1\n", + "#1 m**-1 = 1.0*10**-2 cm**-1\n", + "#results\n", + "print\"Rydberg Constant is (cm^-1) = \",round(R1*10**-2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 219" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M/m value is : 1840.4\n" + ] + } + ], + "source": [ + "#pg 219\n", + "#calculate the M/m value\n", + "#Given :\n", + "RH= 109677.58; #Rydberg constant for Hydrogen in cm**-1\n", + "RHe = 109722.269; #Rydberg constant for Helium in cm**-1\n", + "#calculations\n", + "#Ratio = M/m\n", + "Ratio = ((4*RH)- (RHe))/(4*(RHe-RH));\n", + "#results\n", + "print \"M/m value is : \",round(Ratio,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position (A) = 0.53\n" + ] + } + ], + "source": [ + "#pg 223\n", + "#calculate the Uncertainty in position\n", + "#Given\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 13.6; #Energy of electron in eV\n", + "#1 eV = 1.6*10**-19 J\n", + "#calculations\n", + "p = math.sqrt(2*m*E1*1.6*10**-19); #momentum in kg m/s\n", + "deltax = h/(2*math.pi*p);\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print \"Uncertainty in position (A) = \",round(deltax/(1.0*10**-10),2);" + ] + } + ], + "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/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 new file mode 100644 index 00000000..b200f715 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter7_2.ipynb @@ -0,0 +1,194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Atomic Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 217" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For hydrogen atom : \n", + " Radius = 0.53 A \n", + " Velocity = 2.2 x 10^6 m/s \n", + " Energy of an electron (eV) = -13.6\n" + ] + } + ], + "source": [ + "#pg 217\n", + "#calculate the Radius, Velocity and Energy of electron\n", + "#Given :\n", + "import math\n", + "n =1.; # ground state\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "r1 = (n**2*h**2*e0)/(math.pi*m*e**2);# Radius in A\n", + "v1 = e**2/(2*h*e0*n); # Velocity in m/s\n", + "E1 = -((m*e**4)/(8*n**2*h**2*e0**2)); # Energy of an electron in eV\n", + "# 1 A = 1.0*10**-10 m , 1 eV = 1.6*10**-19 J\n", + "#results\n", + "print\"For hydrogen atom : \\n Radius =\",round(r1*10**10,2),\"A \\n Velocity =\",round(v1*10**-6,1),\"x 10^6 m/s \\n Energy of an electron (eV) = \",round(E1/(1.6*10**-19),1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 218" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rydberg constant for hydrogen (cm^-1) = 109737.16\n", + "Rydberg Constant is (cm^-1) = 109677.43\n" + ] + } + ], + "source": [ + "#pg 218\n", + "#calculate the Rydberg constant\n", + "#Given :\n", + "#(a)\n", + "m = 9.109382*10**-31; #electron mass in kg\n", + "c = 2.997925*10**8; #Speed of light in m/s\n", + "h = 6.626069*10**-34; #planck's constant in Js\n", + "e = 1.602176*10**-19; # Charge of an electron in C\n", + "e0 = 8.854188*10**-12; # Vacuum permittivity in F/m\n", + "#calculations\n", + "R = (m*e**4)/(8*h**3*e0**2*c);# Rydberg constant in m**-1\n", + "print\"Rydberg constant for hydrogen (cm^-1) = \",round(R*10**-2,2)\n", + "#(b)\n", + "M = 1.672622*10**-27; # proton mass in kg\n", + "R1 = ((m*e**4)/(8*h**3*e0**2*c))*(1/(1 + (m/M))); # Rydberg Constant in m**-1\n", + "#1 m**-1 = 1.0*10**-2 cm**-1\n", + "#results\n", + "print\"Rydberg Constant is (cm^-1) = \",round(R1*10**-2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 219" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M/m value is : 1840.4\n" + ] + } + ], + "source": [ + "#pg 219\n", + "#calculate the M/m value\n", + "#Given :\n", + "RH= 109677.58; #Rydberg constant for Hydrogen in cm**-1\n", + "RHe = 109722.269; #Rydberg constant for Helium in cm**-1\n", + "#calculations\n", + "#Ratio = M/m\n", + "Ratio = ((4*RH)- (RHe))/(4*(RHe-RH));\n", + "#results\n", + "print \"M/m value is : \",round(Ratio,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Uncertainty in position (A) = 0.53\n" + ] + } + ], + "source": [ + "#pg 223\n", + "#calculate the Uncertainty in position\n", + "#Given\n", + "import math\n", + "h = 6.625*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron mass in kg\n", + "E1 = 13.6; #Energy of electron in eV\n", + "#1 eV = 1.6*10**-19 J\n", + "#calculations\n", + "p = math.sqrt(2*m*E1*1.6*10**-19); #momentum in kg m/s\n", + "deltax = h/(2*math.pi*p);\n", + "# 1 A = 1.0*10**-10 m\n", + "#results\n", + "print \"Uncertainty in position (A) = \",round(deltax/(1.0*10**-10),2);" + ] + } + ], + "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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8.ipynb new file mode 100755 index 00000000..36284e09 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8.ipynb @@ -0,0 +1,526 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Nuclear Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 239" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nuclear density is 2.3 x 10^17 kg/m**3\n", + "Nuclear density is 7.0 x 10^13 times Atomic density.\n" + ] + } + ], + "source": [ + "#pg 239\n", + "#calculate the nuclear density\n", + "#Given:\n", + "import math\n", + "mp = 1.67*10**-27 ; # proton mass in kg\n", + "r0 = 1.2*10**-15; # constant in m\n", + "a0 = 0.5*10**-10; # atomic dimensions in m\n", + "#rho_nucleus = nuclear mass/ nuclear volume\n", + "#calculations\n", + "rho_nucleus = (3*mp)/(4*math.pi*r0**3); # nuclear density in kg/m**3\n", + "#ratio = rho_nucleus/rho_atom = (a0/r0)**3\n", + "ratio = a0**3/r0**3;\n", + "#results\n", + "print\"Nuclear density is\",round(rho_nucleus*10**-17,1),\"x 10^17 kg/m**3\"\n", + "print\"Nuclear density is\",round(ratio*10**-13,0),\"x 10^13 times Atomic density.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 241" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rest mass of a pion is 226.0 times the rest mass of an electron\n", + "textbook answer is 220 , because approximate value for m_pi was considered.\n" + ] + } + ], + "source": [ + "#pg 241\n", + "#calculate the rest mass of pion\n", + "#Given :\n", + "h = 1.05*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron rest mass in kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "b = 1.7*10**-15; # range of nuclear force in m\n", + "#calculations\n", + "m_pi = h/(b*c); # rest mass of a pion in kg\n", + "t = m_pi/m; # times the rest mass of an electron\n", + "#results\n", + "print \"Rest mass of a pion is\",round(t,0), \"times the rest mass of an electron\"\n", + "print 'textbook answer is 220 , because approximate value for m_pi was considered.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 242" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binding energy : 2.225 MeV\n" + ] + } + ], + "source": [ + "#pg 242\n", + "#calculate the Binding energy\n", + "#Given :\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "md = 2.013553215; # deuteron mass in u\n", + "#E = ( mp + mn - md)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (mp + mn - md)*931.5; # Binding energy in MeV\n", + "#results\n", + "print \"Binding energy :\",round(E,3),\"MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 243" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average binding energy per nucleon : 7.074 MeV\n" + ] + } + ], + "source": [ + "#pg 243\n", + "#calculate the Average binding energy per nucleon\n", + "#Given :\n", + "m_alpha = 4.001506106; # mass of an alpha particle in u\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "#E = ( 2*mp + 2*mn - m_alpha)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (2*mp + 2*mn - m_alpha)*931.5; # Binding energy in MeV\n", + "#resuts\n", + "print \"Average binding energy per nucleon :\",round(E/4.,3),\" MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 249" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Q value is (MeV) = 4.7\n" + ] + } + ], + "source": [ + "#pg 249\n", + "#calculate the Q value\n", + "#Given :\n", + "Mn = 14.00753; #mass of Nitrogen 14 in u\n", + "Mo = 17.0045; # mass of Oxygen 17 in u\n", + "m_alpha = 4.00387; # mass of alpha particle in u\n", + "mp = 1.00184; # mass of proton in u\n", + "#Q = (m_alpha + Mn - Mo - mp)*c^2\n", + "## 1 u * c^2 = 931.5 MeV , where 1 u = 1.66*10^-27 kg and c = 3*10^8 m/s\n", + "#calculations\n", + "Q = (m_alpha + Mn - Mo - mp)*931.5 ;# Q value in MeV\n", + "#results\n", + "print \"Q value is (MeV) = \",round(Q,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 250" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of ejection is (degrees) = 90.0\n" + ] + } + ], + "source": [ + "#pg 250\n", + "#calculate the angle of ejection\n", + "#Given :\n", + "import math\n", + "Q = 4.;# in MeV\n", + "Ex = 2.; # in MeV\n", + "Ey = 5.; # in MeV\n", + "mx = 4.; # in u\n", + "my = 1.; # in u\n", + "My =13.; # in u\n", + "#calculations\n", + "theta = math.acos(( (Ey*(1 + (my/My))) - (Ex*(1 - (mx/My))) - Q )/((2/My)*math.sqrt(mx*Ex*my*Ey)))*57.3; # angle of ejection in degrees \n", + "#resutls\n", + "print\"Angle of ejection is (degrees) = \",round(theta,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy for an electron : 0.6 x 10**-17 x n^2 J\n", + "Energy for a nucleon : 3.29 x 10**-11 x n^2 J\n" + ] + } + ], + "source": [ + "#pg 251\n", + "#calculate the energy for electron and nucleon\n", + "#Given :\n", + "h = 6.625*10**-34 ; #planck's constant in Js\n", + "me = 9.1*10**-31 ; #electron mass in kg\n", + "mn = 1.67*10**-27;# a nucleon mass in kg\n", + "#calculations\n", + "#(a)For electron\n", + "L1 = 1; # in A\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L1 = 1*10**-10 m , 1A = 1.0*10**-10 m\n", + "E1 = h**2/(8*me*(L1*10**-10)**2); # energy in J\n", + "#(b)For nucleon\n", + "L2 = 1; # in fm\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L2 = 1*10**-15 m , 1 fm = 1.0*10**-15 m\n", + "E2 = h**2/(8*mn*(L2*10**-15)**2);#energy in J\n", + "#results\n", + "print\"Energy for an electron :\",round(E1*10**17,1),\" x 10**-17 x n^2 J\"\n", + "print\"Energy for a nucleon :\",round(E2*10**11,2),\" x 10**-11 x n^2 J\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy released : 2.0 x 10^10 cal\n", + "3.0 tonnes of Coal\n", + "19588.0 tonnes of TNT\n", + "Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the energy released and tonnes of coal\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant in atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.; # molar mass of U 235 in gm/mole\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000*10**3); # Quantity of Coal in Kg\n", + "#Exploding 1 kg of TNT releases 1000 cal of energy\n", + "Q2 = EC/1000; # Quantity of TNT in kg\n", + "#results\n", + "print\"Energy released :\",round(EC*10**-10,0),\"x 10^10 cal\"\n", + "print round(Q1*10**-3,0),\" tonnes of Coal\"\n", + "print round(Q2*10**-3,0),\" tonnes of TNT\"\n", + "print 'Results obtained differ from those in textbook , because approximate values were considered in textbook.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " tonnes of Coal = 2798.0\n", + " Electric power for 30 percent conversion efficiency (kW) = 284775.0\n", + " Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the tonnes of coal and electric power required\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.*10**-3; # molar mass of U 235 in gm/mole\n", + "p = 30./100. ; # conversion efficiency\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J per day\n", + "# 1 day = 24 hrs * 60 mins * 60 sec\n", + "P = RE/(24.*60*60); # Power output in W per day\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000.*10**3); # Quantity of Coal in Kg per day\n", + "EP = p*P ; # electric power in W\n", + "#results\n", + "print\" tonnes of Coal = \",round(Q1*10**-3,0)\n", + "print\" Electric power for 30 percent conversion efficiency (kW) = \",round(EP*10**-3,0)\n", + "print' Results obtained differ from those in textbook , because approximate values were considered in textbook.'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 264" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tree died (years ago) = 3354.80668676\n", + "Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.\n" + ] + } + ], + "source": [ + "#pg 264\n", + "#calculate how long ago tree died\n", + "#Given :\n", + "import math\n", + "T_half = 5730.; # carbon 14 half life in years\n", + "Na = 6.023*10**23; # Avogadro constant in nuclei/mole\n", + "M = 25.;# charcoal mass in gm\n", + "mm = 12.;# molar mass of carbon 12 in gm/mole\n", + "a = 250. ; # disinitegrations per minute (Carbon 14 activity)\n", + "# 1 year = 525949 minutes\n", + "#calculations\n", + "lambd = 0.693/(T_half*525949);# disinitegrations per minute per nucleus\n", + "N0_1 = (Na/mm)*M ; # Number of nuclei (Carbon 12)\n", + "# Carbon 14 to Carbon 12 ratio = 1.3*10**-12 \n", + "N0_2 = 1.3*10**-12*N0_1 ; # Number of nuclei (Carbon 14)\n", + "R0 = N0_2*lambd ; # disinitegrations per minute per nucleus\n", + "a0 = R0 ; # initial activity\n", + "t = math.log(a0/a)/lambd ;\n", + "# 1 year = 525949 minutes\n", + "#results\n", + "print \"The tree died (years ago) = \",t/525949.\n", + "print 'Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 265" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Original amount (mg) = 20.0\n", + "Remaining amount after 48 days (mg) = 0.313\n" + ] + } + ], + "source": [ + "#pg 265\n", + "#calculate the Original amount and Remaining amount\n", + "#Given :\n", + "import math\n", + "T_half = 8. ; # iodine 131 haf life in days\n", + "lambd = 0.693/T_half ; # decay constant in decays/day\n", + "N0 = 20. ; # mass in mg\n", + "t = 48.; # time in days\n", + "#calculations\n", + "N = N0*math.exp(-lambd*t); # in mg\n", + "#results\n", + "print\"Original amount (mg) = \",N0\n", + "print\"Remaining amount after 48 days (mg) = \",round(N,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 268" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equivalent dose is (rem) = 700.0\n" + ] + } + ], + "source": [ + "#pg 268\n", + "#calculate the equivalent dose\n", + "#Given :\n", + "RBE = 0.7 ; #RBE factor for cobalt 60 gamma rays\n", + "dose = 1000 ; # dose in rad\n", + "#calculations\n", + "e = RBE*dose; # equivalent dose in rem \n", + "#results\n", + "print\"Equivalent dose is (rem) = \",e\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/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 new file mode 100644 index 00000000..36284e09 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_1.ipynb @@ -0,0 +1,526 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Nuclear Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 239" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nuclear density is 2.3 x 10^17 kg/m**3\n", + "Nuclear density is 7.0 x 10^13 times Atomic density.\n" + ] + } + ], + "source": [ + "#pg 239\n", + "#calculate the nuclear density\n", + "#Given:\n", + "import math\n", + "mp = 1.67*10**-27 ; # proton mass in kg\n", + "r0 = 1.2*10**-15; # constant in m\n", + "a0 = 0.5*10**-10; # atomic dimensions in m\n", + "#rho_nucleus = nuclear mass/ nuclear volume\n", + "#calculations\n", + "rho_nucleus = (3*mp)/(4*math.pi*r0**3); # nuclear density in kg/m**3\n", + "#ratio = rho_nucleus/rho_atom = (a0/r0)**3\n", + "ratio = a0**3/r0**3;\n", + "#results\n", + "print\"Nuclear density is\",round(rho_nucleus*10**-17,1),\"x 10^17 kg/m**3\"\n", + "print\"Nuclear density is\",round(ratio*10**-13,0),\"x 10^13 times Atomic density.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 241" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rest mass of a pion is 226.0 times the rest mass of an electron\n", + "textbook answer is 220 , because approximate value for m_pi was considered.\n" + ] + } + ], + "source": [ + "#pg 241\n", + "#calculate the rest mass of pion\n", + "#Given :\n", + "h = 1.05*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron rest mass in kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "b = 1.7*10**-15; # range of nuclear force in m\n", + "#calculations\n", + "m_pi = h/(b*c); # rest mass of a pion in kg\n", + "t = m_pi/m; # times the rest mass of an electron\n", + "#results\n", + "print \"Rest mass of a pion is\",round(t,0), \"times the rest mass of an electron\"\n", + "print 'textbook answer is 220 , because approximate value for m_pi was considered.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 242" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binding energy : 2.225 MeV\n" + ] + } + ], + "source": [ + "#pg 242\n", + "#calculate the Binding energy\n", + "#Given :\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "md = 2.013553215; # deuteron mass in u\n", + "#E = ( mp + mn - md)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (mp + mn - md)*931.5; # Binding energy in MeV\n", + "#results\n", + "print \"Binding energy :\",round(E,3),\"MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 243" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average binding energy per nucleon : 7.074 MeV\n" + ] + } + ], + "source": [ + "#pg 243\n", + "#calculate the Average binding energy per nucleon\n", + "#Given :\n", + "m_alpha = 4.001506106; # mass of an alpha particle in u\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "#E = ( 2*mp + 2*mn - m_alpha)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (2*mp + 2*mn - m_alpha)*931.5; # Binding energy in MeV\n", + "#resuts\n", + "print \"Average binding energy per nucleon :\",round(E/4.,3),\" MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 249" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Q value is (MeV) = 4.7\n" + ] + } + ], + "source": [ + "#pg 249\n", + "#calculate the Q value\n", + "#Given :\n", + "Mn = 14.00753; #mass of Nitrogen 14 in u\n", + "Mo = 17.0045; # mass of Oxygen 17 in u\n", + "m_alpha = 4.00387; # mass of alpha particle in u\n", + "mp = 1.00184; # mass of proton in u\n", + "#Q = (m_alpha + Mn - Mo - mp)*c^2\n", + "## 1 u * c^2 = 931.5 MeV , where 1 u = 1.66*10^-27 kg and c = 3*10^8 m/s\n", + "#calculations\n", + "Q = (m_alpha + Mn - Mo - mp)*931.5 ;# Q value in MeV\n", + "#results\n", + "print \"Q value is (MeV) = \",round(Q,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 250" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of ejection is (degrees) = 90.0\n" + ] + } + ], + "source": [ + "#pg 250\n", + "#calculate the angle of ejection\n", + "#Given :\n", + "import math\n", + "Q = 4.;# in MeV\n", + "Ex = 2.; # in MeV\n", + "Ey = 5.; # in MeV\n", + "mx = 4.; # in u\n", + "my = 1.; # in u\n", + "My =13.; # in u\n", + "#calculations\n", + "theta = math.acos(( (Ey*(1 + (my/My))) - (Ex*(1 - (mx/My))) - Q )/((2/My)*math.sqrt(mx*Ex*my*Ey)))*57.3; # angle of ejection in degrees \n", + "#resutls\n", + "print\"Angle of ejection is (degrees) = \",round(theta,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy for an electron : 0.6 x 10**-17 x n^2 J\n", + "Energy for a nucleon : 3.29 x 10**-11 x n^2 J\n" + ] + } + ], + "source": [ + "#pg 251\n", + "#calculate the energy for electron and nucleon\n", + "#Given :\n", + "h = 6.625*10**-34 ; #planck's constant in Js\n", + "me = 9.1*10**-31 ; #electron mass in kg\n", + "mn = 1.67*10**-27;# a nucleon mass in kg\n", + "#calculations\n", + "#(a)For electron\n", + "L1 = 1; # in A\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L1 = 1*10**-10 m , 1A = 1.0*10**-10 m\n", + "E1 = h**2/(8*me*(L1*10**-10)**2); # energy in J\n", + "#(b)For nucleon\n", + "L2 = 1; # in fm\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L2 = 1*10**-15 m , 1 fm = 1.0*10**-15 m\n", + "E2 = h**2/(8*mn*(L2*10**-15)**2);#energy in J\n", + "#results\n", + "print\"Energy for an electron :\",round(E1*10**17,1),\" x 10**-17 x n^2 J\"\n", + "print\"Energy for a nucleon :\",round(E2*10**11,2),\" x 10**-11 x n^2 J\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy released : 2.0 x 10^10 cal\n", + "3.0 tonnes of Coal\n", + "19588.0 tonnes of TNT\n", + "Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the energy released and tonnes of coal\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant in atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.; # molar mass of U 235 in gm/mole\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000*10**3); # Quantity of Coal in Kg\n", + "#Exploding 1 kg of TNT releases 1000 cal of energy\n", + "Q2 = EC/1000; # Quantity of TNT in kg\n", + "#results\n", + "print\"Energy released :\",round(EC*10**-10,0),\"x 10^10 cal\"\n", + "print round(Q1*10**-3,0),\" tonnes of Coal\"\n", + "print round(Q2*10**-3,0),\" tonnes of TNT\"\n", + "print 'Results obtained differ from those in textbook , because approximate values were considered in textbook.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " tonnes of Coal = 2798.0\n", + " Electric power for 30 percent conversion efficiency (kW) = 284775.0\n", + " Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the tonnes of coal and electric power required\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.*10**-3; # molar mass of U 235 in gm/mole\n", + "p = 30./100. ; # conversion efficiency\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J per day\n", + "# 1 day = 24 hrs * 60 mins * 60 sec\n", + "P = RE/(24.*60*60); # Power output in W per day\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000.*10**3); # Quantity of Coal in Kg per day\n", + "EP = p*P ; # electric power in W\n", + "#results\n", + "print\" tonnes of Coal = \",round(Q1*10**-3,0)\n", + "print\" Electric power for 30 percent conversion efficiency (kW) = \",round(EP*10**-3,0)\n", + "print' Results obtained differ from those in textbook , because approximate values were considered in textbook.'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 264" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tree died (years ago) = 3354.80668676\n", + "Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.\n" + ] + } + ], + "source": [ + "#pg 264\n", + "#calculate how long ago tree died\n", + "#Given :\n", + "import math\n", + "T_half = 5730.; # carbon 14 half life in years\n", + "Na = 6.023*10**23; # Avogadro constant in nuclei/mole\n", + "M = 25.;# charcoal mass in gm\n", + "mm = 12.;# molar mass of carbon 12 in gm/mole\n", + "a = 250. ; # disinitegrations per minute (Carbon 14 activity)\n", + "# 1 year = 525949 minutes\n", + "#calculations\n", + "lambd = 0.693/(T_half*525949);# disinitegrations per minute per nucleus\n", + "N0_1 = (Na/mm)*M ; # Number of nuclei (Carbon 12)\n", + "# Carbon 14 to Carbon 12 ratio = 1.3*10**-12 \n", + "N0_2 = 1.3*10**-12*N0_1 ; # Number of nuclei (Carbon 14)\n", + "R0 = N0_2*lambd ; # disinitegrations per minute per nucleus\n", + "a0 = R0 ; # initial activity\n", + "t = math.log(a0/a)/lambd ;\n", + "# 1 year = 525949 minutes\n", + "#results\n", + "print \"The tree died (years ago) = \",t/525949.\n", + "print 'Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 265" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Original amount (mg) = 20.0\n", + "Remaining amount after 48 days (mg) = 0.313\n" + ] + } + ], + "source": [ + "#pg 265\n", + "#calculate the Original amount and Remaining amount\n", + "#Given :\n", + "import math\n", + "T_half = 8. ; # iodine 131 haf life in days\n", + "lambd = 0.693/T_half ; # decay constant in decays/day\n", + "N0 = 20. ; # mass in mg\n", + "t = 48.; # time in days\n", + "#calculations\n", + "N = N0*math.exp(-lambd*t); # in mg\n", + "#results\n", + "print\"Original amount (mg) = \",N0\n", + "print\"Remaining amount after 48 days (mg) = \",round(N,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 268" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equivalent dose is (rem) = 700.0\n" + ] + } + ], + "source": [ + "#pg 268\n", + "#calculate the equivalent dose\n", + "#Given :\n", + "RBE = 0.7 ; #RBE factor for cobalt 60 gamma rays\n", + "dose = 1000 ; # dose in rad\n", + "#calculations\n", + "e = RBE*dose; # equivalent dose in rem \n", + "#results\n", + "print\"Equivalent dose is (rem) = \",e\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/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 new file mode 100644 index 00000000..36284e09 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter8_2.ipynb @@ -0,0 +1,526 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Nuclear Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1 - pg 239" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nuclear density is 2.3 x 10^17 kg/m**3\n", + "Nuclear density is 7.0 x 10^13 times Atomic density.\n" + ] + } + ], + "source": [ + "#pg 239\n", + "#calculate the nuclear density\n", + "#Given:\n", + "import math\n", + "mp = 1.67*10**-27 ; # proton mass in kg\n", + "r0 = 1.2*10**-15; # constant in m\n", + "a0 = 0.5*10**-10; # atomic dimensions in m\n", + "#rho_nucleus = nuclear mass/ nuclear volume\n", + "#calculations\n", + "rho_nucleus = (3*mp)/(4*math.pi*r0**3); # nuclear density in kg/m**3\n", + "#ratio = rho_nucleus/rho_atom = (a0/r0)**3\n", + "ratio = a0**3/r0**3;\n", + "#results\n", + "print\"Nuclear density is\",round(rho_nucleus*10**-17,1),\"x 10^17 kg/m**3\"\n", + "print\"Nuclear density is\",round(ratio*10**-13,0),\"x 10^13 times Atomic density.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2 - pg 241" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rest mass of a pion is 226.0 times the rest mass of an electron\n", + "textbook answer is 220 , because approximate value for m_pi was considered.\n" + ] + } + ], + "source": [ + "#pg 241\n", + "#calculate the rest mass of pion\n", + "#Given :\n", + "h = 1.05*10**-34; #planck's constant in Js\n", + "m = 9.1*10**-31; #electron rest mass in kg\n", + "c = 3*10**8; #Speed of light in m/s\n", + "b = 1.7*10**-15; # range of nuclear force in m\n", + "#calculations\n", + "m_pi = h/(b*c); # rest mass of a pion in kg\n", + "t = m_pi/m; # times the rest mass of an electron\n", + "#results\n", + "print \"Rest mass of a pion is\",round(t,0), \"times the rest mass of an electron\"\n", + "print 'textbook answer is 220 , because approximate value for m_pi was considered.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 242" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binding energy : 2.225 MeV\n" + ] + } + ], + "source": [ + "#pg 242\n", + "#calculate the Binding energy\n", + "#Given :\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "md = 2.013553215; # deuteron mass in u\n", + "#E = ( mp + mn - md)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (mp + mn - md)*931.5; # Binding energy in MeV\n", + "#results\n", + "print \"Binding energy :\",round(E,3),\"MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4 - pg 243" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average binding energy per nucleon : 7.074 MeV\n" + ] + } + ], + "source": [ + "#pg 243\n", + "#calculate the Average binding energy per nucleon\n", + "#Given :\n", + "m_alpha = 4.001506106; # mass of an alpha particle in u\n", + "mp = 1.007276470 ; # proton mass in u \n", + "mn = 1.008665012; # neutron mass in u\n", + "#E = ( 2*mp + 2*mn - m_alpha)*c**2\n", + "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n", + "#calculations\n", + "E = (2*mp + 2*mn - m_alpha)*931.5; # Binding energy in MeV\n", + "#resuts\n", + "print \"Average binding energy per nucleon :\",round(E/4.,3),\" MeV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5 - pg 249" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Q value is (MeV) = 4.7\n" + ] + } + ], + "source": [ + "#pg 249\n", + "#calculate the Q value\n", + "#Given :\n", + "Mn = 14.00753; #mass of Nitrogen 14 in u\n", + "Mo = 17.0045; # mass of Oxygen 17 in u\n", + "m_alpha = 4.00387; # mass of alpha particle in u\n", + "mp = 1.00184; # mass of proton in u\n", + "#Q = (m_alpha + Mn - Mo - mp)*c^2\n", + "## 1 u * c^2 = 931.5 MeV , where 1 u = 1.66*10^-27 kg and c = 3*10^8 m/s\n", + "#calculations\n", + "Q = (m_alpha + Mn - Mo - mp)*931.5 ;# Q value in MeV\n", + "#results\n", + "print \"Q value is (MeV) = \",round(Q,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 250" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of ejection is (degrees) = 90.0\n" + ] + } + ], + "source": [ + "#pg 250\n", + "#calculate the angle of ejection\n", + "#Given :\n", + "import math\n", + "Q = 4.;# in MeV\n", + "Ex = 2.; # in MeV\n", + "Ey = 5.; # in MeV\n", + "mx = 4.; # in u\n", + "my = 1.; # in u\n", + "My =13.; # in u\n", + "#calculations\n", + "theta = math.acos(( (Ey*(1 + (my/My))) - (Ex*(1 - (mx/My))) - Q )/((2/My)*math.sqrt(mx*Ex*my*Ey)))*57.3; # angle of ejection in degrees \n", + "#resutls\n", + "print\"Angle of ejection is (degrees) = \",round(theta,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy for an electron : 0.6 x 10**-17 x n^2 J\n", + "Energy for a nucleon : 3.29 x 10**-11 x n^2 J\n" + ] + } + ], + "source": [ + "#pg 251\n", + "#calculate the energy for electron and nucleon\n", + "#Given :\n", + "h = 6.625*10**-34 ; #planck's constant in Js\n", + "me = 9.1*10**-31 ; #electron mass in kg\n", + "mn = 1.67*10**-27;# a nucleon mass in kg\n", + "#calculations\n", + "#(a)For electron\n", + "L1 = 1; # in A\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L1 = 1*10**-10 m , 1A = 1.0*10**-10 m\n", + "E1 = h**2/(8*me*(L1*10**-10)**2); # energy in J\n", + "#(b)For nucleon\n", + "L2 = 1; # in fm\n", + "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n", + "#L2 = 1*10**-15 m , 1 fm = 1.0*10**-15 m\n", + "E2 = h**2/(8*mn*(L2*10**-15)**2);#energy in J\n", + "#results\n", + "print\"Energy for an electron :\",round(E1*10**17,1),\" x 10**-17 x n^2 J\"\n", + "print\"Energy for a nucleon :\",round(E2*10**11,2),\" x 10**-11 x n^2 J\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energy released : 2.0 x 10^10 cal\n", + "3.0 tonnes of Coal\n", + "19588.0 tonnes of TNT\n", + "Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the energy released and tonnes of coal\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant in atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.; # molar mass of U 235 in gm/mole\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000*10**3); # Quantity of Coal in Kg\n", + "#Exploding 1 kg of TNT releases 1000 cal of energy\n", + "Q2 = EC/1000; # Quantity of TNT in kg\n", + "#results\n", + "print\"Energy released :\",round(EC*10**-10,0),\"x 10^10 cal\"\n", + "print round(Q1*10**-3,0),\" tonnes of Coal\"\n", + "print round(Q2*10**-3,0),\" tonnes of TNT\"\n", + "print 'Results obtained differ from those in textbook , because approximate values were considered in textbook.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10 - pg 260" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " tonnes of Coal = 2798.0\n", + " Electric power for 30 percent conversion efficiency (kW) = 284775.0\n", + " Results obtained differ from those in textbook , because approximate values were considered in textbook.\n" + ] + } + ], + "source": [ + "#pg 260\n", + "#calculate the tonnes of coal and electric power required\n", + "#Given :\n", + "Na = 6.023*10**23 ; # Avogadro constant atoms/mole\n", + "LE = 200.; # liberated energy in MeV\n", + "mm = 235.*10**-3; # molar mass of U 235 in gm/mole\n", + "p = 30./100. ; # conversion efficiency\n", + "#calculations\n", + "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n", + "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J per day\n", + "# 1 day = 24 hrs * 60 mins * 60 sec\n", + "P = RE/(24.*60*60); # Power output in W per day\n", + "# 1 cal = 4.187 J \n", + "EC = RE/4.187 ; # energy in cal\n", + "#Burning 1 kg of coal releases 7000 K cal of energy \n", + "Q1 = EC/(7000.*10**3); # Quantity of Coal in Kg per day\n", + "EP = p*P ; # electric power in W\n", + "#results\n", + "print\" tonnes of Coal = \",round(Q1*10**-3,0)\n", + "print\" Electric power for 30 percent conversion efficiency (kW) = \",round(EP*10**-3,0)\n", + "print' Results obtained differ from those in textbook , because approximate values were considered in textbook.'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11 - pg 264" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tree died (years ago) = 3354.80668676\n", + "Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.\n" + ] + } + ], + "source": [ + "#pg 264\n", + "#calculate how long ago tree died\n", + "#Given :\n", + "import math\n", + "T_half = 5730.; # carbon 14 half life in years\n", + "Na = 6.023*10**23; # Avogadro constant in nuclei/mole\n", + "M = 25.;# charcoal mass in gm\n", + "mm = 12.;# molar mass of carbon 12 in gm/mole\n", + "a = 250. ; # disinitegrations per minute (Carbon 14 activity)\n", + "# 1 year = 525949 minutes\n", + "#calculations\n", + "lambd = 0.693/(T_half*525949);# disinitegrations per minute per nucleus\n", + "N0_1 = (Na/mm)*M ; # Number of nuclei (Carbon 12)\n", + "# Carbon 14 to Carbon 12 ratio = 1.3*10**-12 \n", + "N0_2 = 1.3*10**-12*N0_1 ; # Number of nuclei (Carbon 14)\n", + "R0 = N0_2*lambd ; # disinitegrations per minute per nucleus\n", + "a0 = R0 ; # initial activity\n", + "t = math.log(a0/a)/lambd ;\n", + "# 1 year = 525949 minutes\n", + "#results\n", + "print \"The tree died (years ago) = \",t/525949.\n", + "print 'Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12 - pg 265" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Original amount (mg) = 20.0\n", + "Remaining amount after 48 days (mg) = 0.313\n" + ] + } + ], + "source": [ + "#pg 265\n", + "#calculate the Original amount and Remaining amount\n", + "#Given :\n", + "import math\n", + "T_half = 8. ; # iodine 131 haf life in days\n", + "lambd = 0.693/T_half ; # decay constant in decays/day\n", + "N0 = 20. ; # mass in mg\n", + "t = 48.; # time in days\n", + "#calculations\n", + "N = N0*math.exp(-lambd*t); # in mg\n", + "#results\n", + "print\"Original amount (mg) = \",N0\n", + "print\"Remaining amount after 48 days (mg) = \",round(N,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13 - pg 268" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equivalent dose is (rem) = 700.0\n" + ] + } + ], + "source": [ + "#pg 268\n", + "#calculate the equivalent dose\n", + "#Given :\n", + "RBE = 0.7 ; #RBE factor for cobalt 60 gamma rays\n", + "dose = 1000 ; # dose in rad\n", + "#calculations\n", + "e = RBE*dose; # equivalent dose in rem \n", + "#results\n", + "print\"Equivalent dose is (rem) = \",e\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/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9.ipynb b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9.ipynb new file mode 100755 index 00000000..ccfbcf75 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - Structure and Properties of Matter" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Miller indices of the plane are : 6.0 3.0 2.0\n" + ] + } + ], + "source": [ + "#pg 290\n", + "#calculate the miller indices\n", + "#Given :\n", + "#Intercepts\n", + "ix = 1./3 ; #along x-axis\n", + "iy = 2./3; # along y-axis\n", + "iz =1.; # along z-axis\n", + "#calculations\n", + "#Reciprocals\n", + "rx = 1./ix;\n", + "ry = 1./iy;\n", + "rz = 1./iz;\n", + "#Conversion\n", + "x = rx*2;\n", + "y = ry*2;\n", + "z = rz*2;\n", + "#results\n", + "print \"Miller indices of the plane are : \",x,y,z\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 296" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Since, r/a = 0.432 and r = 0.432 *a Crystal Structure : BCC\n" + ] + } + ], + "source": [ + "#pg296\n", + "#calculate the r/a and Crystal Structure\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; # angle in degrees\n", + "lambd = 1.67; # wavelength in A\n", + "r = 1.25; # atomic radius in A\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d= d111\n", + "d111 = (n*lambd)/(2*math.sin(theta/57.3));\n", + "#plane (111)\n", + "h =1;k=1;l=1;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d111*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "ratio = r/a;\n", + "#results\n", + "print\" Since, r/a =\",round(ratio,3),\" and r =\",round(ratio,3),\"*a Crystal Structure : BCC\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Density of silver (kg/m^3) = 10613.57\n" + ] + } + ], + "source": [ + "#pg 297\n", + "#calculate the density of silver\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; #angle in degrees\n", + "lambd = 2.88 ; # wavelength in A\n", + "M = 108.; # atomic weight in kg\n", + "Z = 4.; # unit cell of silver is FCC\n", + "Na = 6.023*10**26 ;# Avogadro constant in kmole\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d = d110\n", + "d110 = (n*lambd)/(2*math.sin(theta/57.3)); # in A\n", + "#plane (110)\n", + "h =1;k=1;l=0;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d110*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "#1 A = 1.0*10**-10 m\n", + "rho = (Z*M)/(Na*(a*10**-10)**3); # density in kg/m**3\n", + "#results\n", + "print\" Density of silver (kg/m^3) = \",round(rho,2)\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/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 new file mode 100644 index 00000000..ccfbcf75 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_1.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - Structure and Properties of Matter" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Miller indices of the plane are : 6.0 3.0 2.0\n" + ] + } + ], + "source": [ + "#pg 290\n", + "#calculate the miller indices\n", + "#Given :\n", + "#Intercepts\n", + "ix = 1./3 ; #along x-axis\n", + "iy = 2./3; # along y-axis\n", + "iz =1.; # along z-axis\n", + "#calculations\n", + "#Reciprocals\n", + "rx = 1./ix;\n", + "ry = 1./iy;\n", + "rz = 1./iz;\n", + "#Conversion\n", + "x = rx*2;\n", + "y = ry*2;\n", + "z = rz*2;\n", + "#results\n", + "print \"Miller indices of the plane are : \",x,y,z\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 296" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Since, r/a = 0.432 and r = 0.432 *a Crystal Structure : BCC\n" + ] + } + ], + "source": [ + "#pg296\n", + "#calculate the r/a and Crystal Structure\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; # angle in degrees\n", + "lambd = 1.67; # wavelength in A\n", + "r = 1.25; # atomic radius in A\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d= d111\n", + "d111 = (n*lambd)/(2*math.sin(theta/57.3));\n", + "#plane (111)\n", + "h =1;k=1;l=1;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d111*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "ratio = r/a;\n", + "#results\n", + "print\" Since, r/a =\",round(ratio,3),\" and r =\",round(ratio,3),\"*a Crystal Structure : BCC\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Density of silver (kg/m^3) = 10613.57\n" + ] + } + ], + "source": [ + "#pg 297\n", + "#calculate the density of silver\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; #angle in degrees\n", + "lambd = 2.88 ; # wavelength in A\n", + "M = 108.; # atomic weight in kg\n", + "Z = 4.; # unit cell of silver is FCC\n", + "Na = 6.023*10**26 ;# Avogadro constant in kmole\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d = d110\n", + "d110 = (n*lambd)/(2*math.sin(theta/57.3)); # in A\n", + "#plane (110)\n", + "h =1;k=1;l=0;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d110*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "#1 A = 1.0*10**-10 m\n", + "rho = (Z*M)/(Na*(a*10**-10)**3); # density in kg/m**3\n", + "#results\n", + "print\" Density of silver (kg/m^3) = \",round(rho,2)\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/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 new file mode 100644 index 00000000..ccfbcf75 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/Chapter9_2.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - Structure and Properties of Matter" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3 - pg 290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Miller indices of the plane are : 6.0 3.0 2.0\n" + ] + } + ], + "source": [ + "#pg 290\n", + "#calculate the miller indices\n", + "#Given :\n", + "#Intercepts\n", + "ix = 1./3 ; #along x-axis\n", + "iy = 2./3; # along y-axis\n", + "iz =1.; # along z-axis\n", + "#calculations\n", + "#Reciprocals\n", + "rx = 1./ix;\n", + "ry = 1./iy;\n", + "rz = 1./iz;\n", + "#Conversion\n", + "x = rx*2;\n", + "y = ry*2;\n", + "z = rz*2;\n", + "#results\n", + "print \"Miller indices of the plane are : \",x,y,z\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7 - pg 296" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Since, r/a = 0.432 and r = 0.432 *a Crystal Structure : BCC\n" + ] + } + ], + "source": [ + "#pg296\n", + "#calculate the r/a and Crystal Structure\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; # angle in degrees\n", + "lambd = 1.67; # wavelength in A\n", + "r = 1.25; # atomic radius in A\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d= d111\n", + "d111 = (n*lambd)/(2*math.sin(theta/57.3));\n", + "#plane (111)\n", + "h =1;k=1;l=1;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d111*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "ratio = r/a;\n", + "#results\n", + "print\" Since, r/a =\",round(ratio,3),\" and r =\",round(ratio,3),\"*a Crystal Structure : BCC\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8 - pg 297" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Density of silver (kg/m^3) = 10613.57\n" + ] + } + ], + "source": [ + "#pg 297\n", + "#calculate the density of silver\n", + "#Given:\n", + "import math\n", + "n = 1.;\n", + "theta = 30.; #angle in degrees\n", + "lambd = 2.88 ; # wavelength in A\n", + "M = 108.; # atomic weight in kg\n", + "Z = 4.; # unit cell of silver is FCC\n", + "Na = 6.023*10**26 ;# Avogadro constant in kmole\n", + "#calculations\n", + "#Bragg's Law : 2*d*sin(theta) = n*lambd , d = d110\n", + "d110 = (n*lambd)/(2*math.sin(theta/57.3)); # in A\n", + "#plane (110)\n", + "h =1;k=1;l=0;\n", + "#dhkl = a/sqrt(h**2 + k**2 + l**2)\n", + "a = d110*math.sqrt(h**2 + k**2 + l**2); # in A\n", + "#1 A = 1.0*10**-10 m\n", + "rho = (Z*M)/(Na*(a*10**-10)**3); # density in kg/m**3\n", + "#results\n", + "print\" Density of silver (kg/m^3) = \",round(rho,2)\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/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 new file mode 100644 index 00000000..e83684c9 --- /dev/null +++ b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/README.txt @@ -0,0 +1,10 @@ +Contributed By: Devika Raj +Course: be +College/Institute/Organization: RVR college of Engineering +Department/Designation: Electronics and Communication En +Book Title: Engineering Physics +Author: S. D. Jain and G. G. Sahasrabudhe +Publisher: University Press, India +Year of publication: 2010 +Isbn: 9788173716782 +Edition: 1 \ No newline at end of file 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 new file mode 100644 index 00000000..b7bd34b3 Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15.png differ 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 new file mode 100644 index 00000000..b7bd34b3 Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap15_1.png differ 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 new file mode 100644 index 00000000..caa7fc64 Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2.png differ 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 new file mode 100644 index 00000000..caa7fc64 Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap2_1.png differ 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 new file mode 100644 index 00000000..1fbea36d Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4.png differ 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 new file mode 100644 index 00000000..0c7f0fa6 Binary files /dev/null and b/Engineering_Physics_by_S._D._Jain_and_G._G._Sahasrabudhe/screenshots/chap4_1.png differ diff --git a/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb new file mode 100644 index 00000000..9538ba45 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter10_1.ipynb @@ -0,0 +1,112 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Lasers " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 10.20" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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", + "h=6.63*10**-34; #planck's constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "lamda=1.55*10**-6; #wavelength(m)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "Eg=h*c/(lamda*e); #energy gap(eV)\n", + "\n", + "#Result\n", + "print \"energy gap is\",round(Eg,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 10.20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 8633.0 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #planck's constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "Eg=1.44; #energy gap(eV)\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "lamda=h*c/(Eg*e); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10),\"angstrom\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb new file mode 100644 index 00000000..d437d117 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter11_1.ipynb @@ -0,0 +1,549 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#11: Fibre Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.1, Page number 11.16" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.2965\n", + "acceptance angle is 17 degrees 15.0 minutes\n", + "critical angle is 78 degrees 26 minutes\n", + "fractional refractive indices change is 0.02\n" + ] + } + ], + "source": [ + "#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", + "theta0=math.asin(NA); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "thetac=math.asin(n2/n1); #critical angle(radian)\n", + "thetac=thetac*180/math.pi; #critical angle(degrees)\n", + "thetac_m=60*(thetac-int(thetac));\n", + "delta=(n1-n2)/n1; #fractional refractive indices change\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",round(theta0_m),\"minutes\"\n", + "print \"critical angle is\",int(thetac),\"degrees\",int(thetac_m),\"minutes\"\n", + "print \"fractional refractive indices change is\",round(delta,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.2, Page number 11.17" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.446\n", + "acceptance angle is 26 degrees 29.5 minutes\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", + "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", + "theta0=math.asin(NA); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",round(theta0_m,1),\"minutes\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.3, Page number 11.17" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fractional refractive indices change is 0.0416\n" + ] + } + ], + "source": [ + "#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 refractive indices change\n", + "\n", + "#Result\n", + "print \"fractional refractive indices change is\",round(delta,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.4, Page number 11.17" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.3905\n" + ] + } + ], + "source": [ + "#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)); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.5, Page number 11.18" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "refractive index of core is 1.546\n", + "refractive index of cladding is 1.496\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "NA=0.39; #numerical aperture\n", + "n1_n2=0.05; #difference in refractive indices\n", + "\n", + "#Calculation\n", + "x=NA**2/n1_n2;\n", + "n2=(x-n1_n2)/2; #refractive index of cladding\n", + "n1=n2+n1_n2; #refractive index of core\n", + "\n", + "#Result\n", + "print \"refractive index of core is\",n1\n", + "print \"refractive index of cladding is\",n2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.6, Page number 11.18" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.3905\n" + ] + } + ], + "source": [ + "#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)); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.7, Page number 11.18" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.2965\n", + "acceptance angle is 17 degrees 15.0 minutes\n" + ] + } + ], + "source": [ + "#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", + "theta0=math.asin(NA); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",round(theta0_m),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.8, Page number 11.19" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "refractive index of core is 1.6583\n", + "refractive index of cladding is 1.625\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "NA=0.33; #numerical aperture\n", + "delta=0.02; #fractional refractive indices change\n", + "\n", + "#Calculation\n", + "x=1-delta\n", + "y=math.sqrt(1-x**2);\n", + "n1=NA/y; #refractive index of core\n", + "n2=n1*x; #refractive index of cladding\n", + "\n", + "#Result\n", + "print \"refractive index of core is\",round(n1,4)\n", + "print \"refractive index of cladding is\",round(n2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.9, Page number 11.19" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acceptance angle is 8 degrees 38 minutes 55.4 seconds\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", + "NA=0.20; #numerical aperture\n", + "n2=1.59; #refractive index of cladding\n", + "n0=1.33; #refractive index of water\n", + "\n", + "#Calculation\n", + "n1=math.sqrt(NA**2+n2**2); #refractive index of core\n", + "theta0=math.asin(NA/n0); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "theta0_s=60*(theta0_m-int(theta0_m));\n", + "\n", + "#Result\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",int(theta0_m),\"minutes\",round(theta0_s,1),\"seconds\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.10, Page number 11.20" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fractional refractive indices change is 6.8966 *10**-3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.45; #refractive index of core\n", + "n2=1.44; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "delta=(n1-n2)/n1; #fractional refractive indices change\n", + "\n", + "#Result\n", + "print \"fractional refractive indices change is\",round(delta*10**3,4),\"*10**-3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.11, Page number 11.20" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "refractive index of cladding is 1.44\n", + "numerical aperture is 0.42\n", + "acceptance angle is 24 degrees 50 minutes\n", + "critical angle is 73 degrees 44 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.50; #refractive index of core\n", + "delta=4/100; #fractional refractive indices change\n", + "\n", + "#Calculation\n", + "n2=n1-(n1*delta); #refractive index of cladding\n", + "NA=math.sqrt((n1**2)-(n2**2)); #numerical aperture\n", + "theta0=math.asin(NA); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "thetac=math.asin(n2/n1); #critical angle(radian)\n", + "thetac=thetac*180/math.pi; #critical angle(degrees)\n", + "thetac_m=60*(thetac-int(thetac));\n", + "\n", + "#Result\n", + "print \"refractive index of cladding is\",n2\n", + "print \"numerical aperture is\",round(NA,2)\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",int(theta0_m),\"minutes\"\n", + "print \"critical angle is\",int(thetac),\"degrees\",int(thetac_m),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 11.12, Page number 11.21" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.446\n", + "acceptance angle is 26 degrees 29.5 minutes\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", + "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", + "theta0=math.asin(NA); #acceptance angle(radian)\n", + "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", + "theta0_m=60*(theta0-int(theta0));\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"acceptance angle is\",int(theta0),\"degrees\",round(theta0_m,1),\"minutes\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb new file mode 100644 index 00000000..cea37dd0 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter14_1.ipynb @@ -0,0 +1,494 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#14: Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.1, Page number 14.41" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of maximum intensity to minimum intensity is 19.727\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", + "I1=10; #intensity(w/m**2)\n", + "I2=25; #intensity(w/m**2)\n", + "\n", + "#Calculation\n", + "a1bya2=math.sqrt(I1/I2); \n", + "I=((1+a1bya2)**2)/((a1bya2-1)**2); #ratio of maximum intensity to minimum intensity\n", + "\n", + "#Result\n", + "print \"ratio of maximum intensity to minimum intensity is\",round(I,3)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.2, Page number 14.42" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angular position of 10th maximum is 3 degrees 7 minutes 30.887 seconds\n", + "answer varies due to rounding off errors\n", + "angular position of 1st minimum is 0 degrees 9 minutes 23 seconds\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=5460*10**-10; #wavelength(m)\n", + "d=1*10**-4; #seperation(m)\n", + "D=2; #distance(m)\n", + "n=10; #position\n", + "\n", + "#Calculation\n", + "Xmax10=n*lamda*D/d;\n", + "tan_phi=Xmax10/D; \n", + "phi_max10=math.atan(tan_phi);\n", + "phi_max10=phi_max10*180/math.pi; #angular position of 10th maximum(degrees)\n", + "phim=60*(phi_max10-int(phi_max10));\n", + "phis=60*(phim-int(phim));\n", + "xmin1=lamda*D/(2*d); \n", + "tan_phi1=xmin1/D;\n", + "phi_min1=math.atan(tan_phi1);\n", + "phi_min1=phi_min1*180/math.pi; #angular position of 1st minimum(degrees)\n", + "phi_m=60*(phi_min1-int(phi_min1));\n", + "phi_s=60*(phi_m-int(phi_m));\n", + "\n", + "#Result\n", + "print \"angular position of 10th maximum is\",int(phi_max10),\"degrees\",int(phim),\"minutes\",round(phis,3),\"seconds\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"angular position of 1st minimum is\",int(phi_min1),\"degrees\",int(phi_m),\"minutes\",int(phi_s),\"seconds\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.3, Page number 14.43" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5320.0 angstrom lies in the visible region\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew=1.33; #refractive index of soap\n", + "t=5000*10**-10; #thickness(m)\n", + "n0=0;\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "\n", + "#Calculation\n", + "x=4*mew*t;\n", + "lamda1=x/((2*n0)+1); #for n=0\n", + "lamda2=x/((2*n1)+1); #for n=1\n", + "lamda3=x/((2*n2)+1); #for n=2\n", + "lamda4=x/((2*n3)+1); #for n=3\n", + "\n", + "#Result\n", + "print lamda3*10**10,\"angstrom lies in the visible region\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.4, Page number 14.43" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of light is 5880 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D15=0.59*10**-2; #diameter of 15th ring(m)\n", + "D5=0.336*10**-2; #diameter of 5th ring(m)\n", + "R=1; #radius(m)\n", + "m=10;\n", + "\n", + "#Calculation\n", + "lamda=((D15**2)-(D5**2))/(4*m*R); #wavelength of light(m)\n", + "\n", + "#Result\n", + "print \"wavelength of light is\",int(lamda*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.5, Page number 14.44" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of curvature is 1.059 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D10=0.5*10**-2; #diameter of 10th ring(m)\n", + "lamda=5900*10**-10; #wavelength of light(m)\n", + "n=10;\n", + "\n", + "#Calculation\n", + "R=D10**2/(4*n*lamda); #radius of curvature(m)\n", + "\n", + "#Result\n", + "print \"radius of curvature is\",round(R,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.6, Page number 14.44" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least distance of the point is 13 mm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda1=650*10**-9; #wavelength(m)\n", + "lamda2=500*10**-9; #wavelength(m)\n", + "D=1; #distance(m)\n", + "d=0.5*10**-3; #seperation(m)\n", + "n=10;\n", + "\n", + "#Calculation\n", + "x=n*lamda1*D/d; #least distance of the point(m)\n", + "\n", + "#Result\n", + "print \"least distance of the point is\",int(x*10**3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.7, Page number 14.45" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thickness is 2.5 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=500*10**-9; #wavelength(m)\n", + "n=10;\n", + "D10=2*10**-3; #diameter(m)\n", + "\n", + "#Calculation\n", + "r10=D10/2; #radius(m)\n", + "R=D10**2/(4*n*lamda);\n", + "t=r10**2/(2*R); #thickness(m)\n", + "\n", + "#Result\n", + "print \"thickness is\",t*10**6,\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.8, Page number 14.45" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fringe width is 2.75 mm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.2*10**-3; #seperation(m)\n", + "lamda=550*10**-9; #wavelength(m)\n", + "D=1; #diameter(m)\n", + "\n", + "#Calculation\n", + "beta=lamda*D/d; #fringe width(m)\n", + "\n", + "#Result\n", + "print \"fringe width is\",beta*10**3,\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.9, Page number 14.45" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation between slits is 2 mm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=500*10**-9; #wavelength(m)\n", + "D=2; #diameter(m)\n", + "beta=(5/100)*10**-2; #fringe width(m)\n", + "\n", + "#Calculation\n", + "d=lamda*D/beta; #separation between slits(m)\n", + "\n", + "#Result\n", + "print \"separation between slits is\",int(d*10**3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.10, Page number 14.46" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of maximum intensity to minimum intensity is 2.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a12=36; #intensity 1\n", + "a22=1; #intensity 2\n", + "\n", + "#Calculation\n", + "a1=math.sqrt(a12);\n", + "a2=math.sqrt(a22);\n", + "Imin=(a1-a2)**2; #minimum intensity\n", + "Imax=(a1+a2)**2; #maximum intensity\n", + "r=Imax/Imin;\n", + "\n", + "#Result\n", + "print \"ratio of maximum intensity to minimum intensity is\",round(r)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 14.11, Page number 14.46" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diameter of 25th ring is 0.8239 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D5=0.3; #diameter of 5th ring(cm)\n", + "D15=0.62; #diameter of 15th ring(cm)\n", + "\n", + "#Calculation\n", + "D_25=2*(D15**2)-(D5**2);\n", + "D25=math.sqrt(D_25); #diameter of 25th ring(cm)\n", + "\n", + "#Result\n", + "print \"diameter of 25th ring is\",round(D25,4),\"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/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb new file mode 100644 index 00000000..55b436e9 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter1_1.ipynb @@ -0,0 +1,284 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bond energy is -4.6 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=236*10**-12; #seperation(m)\n", + "IE=5.14; #ionisation energy of Na(eV)\n", + "Ea=-3.65; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "V=-e**2/(4*e*math.pi*epsilon0*r0); \n", + "BE=IE+Ea+round(V,2); #bond energy(eV)\n", + "\n", + "#Result\n", + "print \"bond energy is\",round(BE,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 1.11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total cohesive energy per atom is -3.0684 eV\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", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=0.314*10**-9; #seperation(m)\n", + "A=1.75; #madelung constant\n", + "n=5.77; #repulsive exponent value\n", + "IE=4.1; #ionisation energy of K(eV)\n", + "Ea=3.6; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "E=-A*e**2*(1-(1/n))/(4*e*math.pi*epsilon0*r0); #energy(eV)\n", + "Ce=E/2; #cohesive energy per atom(eV)\n", + "x=IE-Ea; #energy(eV)\n", + "CE=Ce+(x/2); #total cohesive energy per atom(eV)\n", + "\n", + "#Result\n", + "print \"total cohesive energy per atom is\",round(CE,4),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 1.12" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is -7.965 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=0.281*10**-9; #seperation(m)\n", + "alpham=1.748; #madelung constant\n", + "n=9; #repulsive exponent value\n", + "\n", + "#Calculation\n", + "E=-alpham*e**2*(1-(1/n))/(4*e*math.pi*epsilon0*r0); #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",round(E,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 1.12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "potential energy is 5.755 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=2.5*10**-10; #seperation(m)\n", + "\n", + "#Calculation\n", + "PE=e**2/(4*e*math.pi*epsilon0*r0); #potential energy(eV)\n", + "\n", + "#Result\n", + "print \"potential energy is\",round(PE,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.5, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is -3.46 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=1;\n", + "n=9; #repulsive exponent value\n", + "a=1.748*10**-28; \n", + "r0=0.281*10**-9; #seperation(m)\n", + "\n", + "#Calculation\n", + "Ur0=-a*(1-(m/n))/(e*r0**m); #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",round(Ur0,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.6, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is -3.59 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n", + "r0=0.281*10**-9; #seperation(m)\n", + "IE=5.14; #ionisation energy of Na(eV)\n", + "Ea=-3.61; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "V=-e**2/(4*e*math.pi*epsilon0*r0); \n", + "CE=IE+Ea+round(V,2); #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",CE,\"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/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb new file mode 100644 index 00000000..b1f33747 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter2_1.ipynb @@ -0,0 +1,271 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.1, Page number 2.16" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "free volume/unit cell is 0.007675 nm**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=0.1249; #atomic radius(nm)\n", + "n=2; #number of atoms\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); #edge length(m)\n", + "V=a**3; #volume(nm**3)\n", + "v=4*math.pi*r**3*n/3; #volume of atoms(nm**3)\n", + "Fv=V-v; #free volume/unit cell(nm**3)\n", + "\n", + "#Result\n", + "print \"free volume/unit cell is\",round(Fv,6),\"nm**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.2, Page number 2.16" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "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", + "n=2; #number of atoms\n", + "M=6.94; #atomic weight(kg)\n", + "rho=530; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "a3=n*M/(rho*Na);\n", + "a=a3**(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.3, Page number 2.17" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 2.87 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=2; #number of atoms\n", + "M=55.85; #atomic weight(kg)\n", + "rho=7860; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "a3=n*M/(rho*Na);\n", + "a=a3**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.4, Page number 2.17" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#number of atoms per m**3 is 177.3 *10**27\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.356*10**-9; #lattice constant(m)\n", + "n=8; #number of atoms\n", + "\n", + "#Calculation\n", + "N=n/a**3; #number of atoms per m**3\n", + "\n", + "#Result\n", + "print \"#number of atoms per m**3 is\",round(N/10**27,1),\"*10**27\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.5, Page number 2.17" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms per sq. mm is 8.16 *10**12\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3.5; #lattice constant(angstrom)\n", + "\n", + "#Calculation\n", + "A=a**2;\n", + "N=10**7*10**7/A; #number of atoms per sq. mm\n", + "\n", + "#Result\n", + "print \"number of atoms per sq. mm is\",round(N/10**12,2),\"*10**12\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.6, Page number 2.18" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density is 5434.5 kg/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=8; #number of atoms\n", + "a=5.62*10**-10; #lattice constant(m)\n", + "M=72.59; #atomic weight(kg)\n", + "Na=6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "rho=n*M/(a**3*Na); #density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density is\",round(rho,1),\"kg/m**3\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb new file mode 100644 index 00000000..e0db4e17 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter3_1.ipynb @@ -0,0 +1,658 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: Crystal planes, X-ray diffraction and defects in solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.1, Page number 3.19" + ] + }, + { + "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(m)\n", + "a=0.28*10**-9; #lattice constant(m)\n", + "h=1;\n", + "k=1;\n", + "l=0;\n", + "n=2; #order of diffraction\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2);\n", + "x=n*lamda/(2*d); \n", + "theta=math.asin(x); #angle(radian)\n", + "theta=theta*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.2, Page number 3.19" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.0842 nm\n", + "maximum order of diffraction is 7.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1; #order of diffraction\n", + "theta1=8+(35/60); #angle(degrees)\n", + "d=0.282; #spacing(nm)\n", + "theta2=90;\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta1)/n; #wavelength(nm)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "nmax=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\",round(nmax)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 3.20" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fraction of vacancy sites is 8.466 *10**-7\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=500+273; #temperature(K)\n", + "T2=1000+273; #temperature(K)\n", + "f=1*10**-10; #fraction\n", + "\n", + "#Calculation\n", + "x=round(T1/T2,5);\n", + "y=round(math.log(f),3);\n", + "w=round(x*y,3);\n", + "F=math.exp(w); #fraction of vacancy sites\n", + "\n", + "#Result\n", + "print \"fraction of vacancy sites is\",round(F*10**7,3),\"*10**-7\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.4, Page number 3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio is math.sqrt( 6.0 ): math.sqrt( 3.0 ): math.sqrt( 2.0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1; #assume\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", + "\n", + "#Calculation\n", + "d100=a*6/(h1**2+k1**2+l1**2);\n", + "d110=a*6/(h2**2+k2**2+l2**2);\n", + "d111=a*(6)/(h3**2+k3**2+l3**2);\n", + "\n", + "#Result\n", + "print \"ratio is math.sqrt(\",d100,\"): math.sqrt(\",d110,\"): math.sqrt(\",d111,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.5, Page number 3.21" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter of nickel is 3.522 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1; #order of diffraction\n", + "theta=38.2; #angle(degrees)\n", + "lamda=1.54; #wavelength(angstrom)\n", + "h=2;\n", + "k=2;\n", + "l=0;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta));\n", + "a=d*math.sqrt(h**2+k**2+l**2); #lattice parameter of nickel(angstrom)\n", + "\n", + "#Result\n", + "print \"lattice parameter of nickel is\",round(a,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.6, Page number 3.22" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "order of diffraction is 2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=90; #angle(degrees)\n", + "lamda=1.5; #wavelength(angstrom)\n", + "d=1.6; #spacing(angstrom)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "n=2*d*math.sin(theta)/lamda; #order of diffraction\n", + "\n", + "#Result\n", + "print \"order of diffraction is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.7, Page number 3.22" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length of unit cell is 0.287 *10**-9 m\n", + "volume of unit cell is 0.02366 *10**-27 m**3\n", + "radius of the atom is 0.1243 *10**-9 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=1;\n", + "l=0;\n", + "d=0.203*10**-9; #spacing(m)\n", + "\n", + "#Calculation\n", + "a=d*math.sqrt(h**2+k**2+l**2); #length of unit cell(m)\n", + "V=a**3; #volume of unit cell(m**3)\n", + "r=math.sqrt(3)*a/4; #radius of the atom(m)\n", + "\n", + "#Result\n", + "print \"length of unit cell is\",round(a*10**9,3),\"*10**-9 m\"\n", + "print \"volume of unit cell is\",round(V*10**27,5),\"*10**-27 m**3\"\n", + "print \"radius of the atom is\",round(r*10**9,4),\"*10**-9 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.8, Page number 3.22" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "order of diffraction is 2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=90; #angle(degrees)\n", + "lamda=1.5; #wavelength(angstrom)\n", + "d=1.6; #spacing(angstrom)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "n=2*d*math.sin(theta)/lamda; #order of diffraction\n", + "\n", + "#Result\n", + "print \"order of diffraction is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.9, Page number 3.23" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 20 degrees 42 minutes 17 seconds\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", + "lamda=0.065; #wavelength(nm)\n", + "a=0.26; #edge length(nm)\n", + "h=1;\n", + "k=1;\n", + "l=0;\n", + "n=2;\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); \n", + "x=n*lamda/(2*d); \n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "theta_d=int(theta); \n", + "theta_m=(theta-theta_d)*60;\n", + "theta_s=(theta_m-int(theta_m))*60;\n", + "\n", + "#Result\n", + "print \"glancing angle is\",theta_d,\"degrees\",int(theta_m),\"minutes\",int(theta_s),\"seconds\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.10, Page number 3.23" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cube edge of unit cell is 4.055 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.54; #wavelength(angstrom)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "n=1;\n", + "theta=19.2; #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); \n", + "a=d*math.sqrt(h**2+k**2+l**2); #cube edge of unit cell(angstrom)\n", + "\n", + "#Result\n", + "print \"cube edge of unit cell is\",round(a,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.11, Page number 3.24" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter of nickel is 3.522 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.54; #wavelength(angstrom)\n", + "h=2;\n", + "k=2;\n", + "l=0;\n", + "n=1;\n", + "theta=38.2; #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); \n", + "a=d*math.sqrt(h**2+k**2+l**2); #lattice parameter of nickel(angstrom)\n", + "\n", + "#Result\n", + "print \"lattice parameter of nickel is\",round(a,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.12, Page number 3.24" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing for (111) is 0.208 nm\n", + "interplanar spacing for (321) is 0.096 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=0.36; #edge length(nm)\n", + "h1=1;\n", + "k1=1;\n", + "l1=1;\n", + "h2=3;\n", + "k2=2;\n", + "l2=1;\n", + "\n", + "#Calculation\n", + "d1=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (111)(nm)\n", + "d2=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (321)(nm)\n", + "\n", + "#Result\n", + "print \"interplanar spacing for (111) is\",round(d1,3),\"nm\"\n", + "print \"interplanar spacing for (321) is\",round(d2,3),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.13, Page number 3.25" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 16 degrees 27 minutes\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", + "lamda=0.675; #wavelength(angstrom)\n", + "n=3; #order of diffraction\n", + "theta=5+(25/60); #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=lamda/(2*math.sin(theta)); \n", + "theta3=math.asin(3*lamda/(2*d)); #glancing angle(radian)\n", + "theta3=theta3*180/math.pi; #glancing angle(degrees)\n", + "theta_d=int(theta3); \n", + "theta_m=(theta3-theta_d)*60;\n", + "\n", + "#Result\n", + "print \"glancing angle is\",theta_d,\"degrees\",int(theta_m),\"minutes\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.14, Page number 3.25" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 22 degrees 56 minutes 31 seconds\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", + "lamda=0.79; #wavelength(angstrom)\n", + "n=3; #order of diffraction\n", + "d=3.04; #spacing(angstrom)\n", + "\n", + "#Calculation\n", + "x=round(n*lamda/(2*d),4);\n", + "theta=math.asin(x); #glancing angle(radian)\n", + "theta=theta*180/math.pi; #glancing angle(degrees)\n", + "theta_d=int(theta); \n", + "theta_m=(theta-theta_d)*60;\n", + "theta_s=(theta_m-int(theta_m))*60;\n", + "\n", + "#Result\n", + "print \"glancing angle is\",theta_d,\"degrees\",int(theta_m),\"minutes\",int(theta_s),\"seconds\"\n", + "print \"answer given in the 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/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb new file mode 100644 index 00000000..aba467a3 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb @@ -0,0 +1,578 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#4: Principles of quantum mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.1, Page number 4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.0275 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "E=2000; #energy(eV)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E*e); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**9,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.2, Page number 4.30" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 438.6 *10**4 m/s\n", + "answer varies due to rounding off errors\n", + "kinetic energy is 54.71 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.626*10**-34; #planck's constant\n", + "lamda=1.66*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "v=h/(m*lamda); #velocity(m/s)\n", + "E=h**2/(2*m*e*lamda**2); #kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"velocity is\",round(v/10**4,1),\"*10**4 m/s\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"kinetic energy is\",round(E,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.3, Page number 4.31" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy value in ground state is 37.7377 eV\n", + "energy value in 1st state is 150.95 eV\n", + "energy value in 2nd state is 339.6395 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=1*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "E2=4*E1; #energy value in 1st state(eV)\n", + "E3=9*E1; #energy value in 2nd state(eV)\n", + "\n", + "#Result\n", + "print \"energy value in ground state is\",round(E1,4),\"eV\"\n", + "print \"energy value in 1st state is\",round(E2,2),\"eV\"\n", + "print \"energy value in 2nd state is\",round(E3,4),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.4, Page number 4.31" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum energy is 2.3586 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=4*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "\n", + "#Result\n", + "print \"minimum energy is\",round(E1,4),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.5, Page number 4.32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.01 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=15*10**3; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=1.227/math.sqrt(V); #wavelength(nm)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.6, Page number 4.32" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum energy is 150.95 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=0.05*10**-9; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "\n", + "#Result\n", + "print \"minimum energy is\",round(E1,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.8, Page number 4.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum energy is 4.2 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=3*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "\n", + "#Result\n", + "print \"minimum energy is\",round(E1,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.9, Page number 4.33" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 8488 nm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "me=1.676*10**-27; #mass(kg) \n", + "mn=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "lamda_n=h/math.sqrt(4*mn*me); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",int(lamda_n*10**9),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.10, Page number 4.33" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy value in 2nd quantum state is 37.738 eV\n", + "energy value in 4th quantum state is 150.95 eV\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", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=2*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "E2=2**2*E1; #energy value in 2nd quantum state(eV)\n", + "E4=4**2*E1; #energy value in 2nd quantum state(eV)\n", + "\n", + "#Result\n", + "print \"energy value in 2nd quantum state is\",round(E2,3),\"eV\"\n", + "print \"energy value in 4th quantum state is\",round(E4,2),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.11, Page number 4.34" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 0.382 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "V=344; #potemtial(V)\n", + "n=1;\n", + "theta=60; #angle(degrees)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*h/(2*math.sin(theta)*math.sqrt(2*m*V*e)); #interplanar spacing(m)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.12, Page number 4.34" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required to pump an electron is 301.57 eV\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", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.11*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=1*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "E3=3**2*E1; #energy value in 2nd quantum state(eV)\n", + "E=E3-E1; #energy required to pump an electron(eV)\n", + "\n", + "#Result\n", + "print \"energy required to pump an electron is\",round(E,2),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.13, Page number 4.34" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum energy is 9.424 eV\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", + "n=1;\n", + "e=1.6*10**-19; \n", + "m=9.11*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "L=2*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "E1=n**2*h**2/(8*m*e*L**2); #energy value in ground state(eV)\n", + "\n", + "#Result\n", + "print \"minimum energy is\",round(E1,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.14, Page number 4.35" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.31 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=1600; #voltage(V)\n", + "\n", + "#Calculation\n", + "lamda=1.227/math.sqrt(V); #wavelength(nm)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10,2),\"angstrom\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb new file mode 100644 index 00000000..f11e05ff --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter5_1.ipynb @@ -0,0 +1,566 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#5: Electron theory of metals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.1, Page number 5.27" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 1260.84 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", + "fE=1/100; #probability(%)\n", + "E_EF=0.5; #fermi energy(eV)\n", + "Kb=1.38*10**-23; #boltzmann constant\n", + "e=6.24*10**18; #conversion faction from J to eV\n", + "\n", + "#Calculation\n", + "x=E_EF/(Kb*e);\n", + "y=math.log(1/fE);\n", + "T=x/y; #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,2),\"K\"\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": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of free electrons is 8.3954 **10**28 per m**3\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", + "Ef=7*1.602*10**-19; #fermi energy(J)\n", + "h=6.63*10**-34; #planck's constant\n", + "m=9.11*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "x=h**2/(8*m);\n", + "y=(3/math.pi)**(2/3);\n", + "n23=Ef/(x*y);\n", + "n=n23**(3/2); #total number of free electrons(per m**3)\n", + "\n", + "#Result\n", + "print \"total number of free electrons is\",round(n/10**28,4),\"**10**28 per m**3\"\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": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time is 39.742 *10**-15 s\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=1.54*10**-8; #resistivity of metal(ohm m)\n", + "n=5.8*10**28; #number of free electrons(per m**3)\n", + "e=1.602*10**-19; #charge(c)\n", + "m=9.11*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "tow=m/(n*e**2*rho); #relaxation time(s)\n", + "\n", + "#Result\n", + "print \"relaxation time is\",round(tow*10**15,3),\"*10**-15 s\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.4, Page number 5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time is 3.82 *10**-14 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=1.43*10**-8; #resistivity of metal(ohm m)\n", + "n=6.5*10**28; #number of free electrons(per m**3)\n", + "e=1.6*10**-19; #charge(c)\n", + "m=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "tow=m/(n*e**2*rho); #relaxation time(s)\n", + "\n", + "#Result\n", + "print \"relaxation time is\",round(tow*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.5, Page number 5.29" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of conduction electrons is 1.8088 *10**29 per m**3\n", + "mobility of electrons is 0.00128 m**2/Vs\n", + "drift velocity is 2.3 *10**-4 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=5; #length(m)\n", + "R=0.06; #resistance(ohm)\n", + "I=15; #current(A)\n", + "ne=3; #number of electrons\n", + "rho=2.7*10**-8; #resistivity(ohm m)\n", + "w=26.98; #atomic weight\n", + "D=2.7*10**3; #density(kg/m**3)\n", + "Na=6.025*10**26; #avagadro number(per k mol)\n", + "\n", + "#Calculation\n", + "n=ne*Na*D/w; #number of conduction electrons(per m**3)\n", + "mew=1/(n*e*rho); #mobility of electrons(m**2/Vs)\n", + "vd=I*R/(L*rho*n*e); #drift velocity(m/s)\n", + "\n", + "#Result\n", + "print \"number of conduction electrons is\",round(n/10**29,4),\"*10**29 per m**3\"\n", + "print \"mobility of electrons is\",round(mew,5),\"m**2/Vs\"\n", + "print \"drift velocity is\",round(vd*10**4,1),\"*10**-4 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.6, Page number 5.30" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mobility of electrons is 0.00427 m**2/Vs\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ne=1; #number of electrons\n", + "rho=1.73*10**-8; #resistivity(ohm m)\n", + "w=63.5; #atomic weight\n", + "e=1.6*10**-19; #charge(c)\n", + "D=8.92*10**3; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number(per k mol)\n", + "\n", + "#Calculation\n", + "n=ne*Na*D/w;\n", + "mew=1/(n*e*rho); #mobility of electrons(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"mobility of electrons is\",round(mew,5),\"m**2/Vs\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.7, Page number 5.31" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mobility of electrons is 0.00428 m**2/Vs\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ne=1; #number of electrons\n", + "rho=1.721*10**-8; #resistivity(ohm m)\n", + "w=63.54; #atomic weight\n", + "e=1.6*10**-19; #charge(c)\n", + "D=8.95*10**3; #density(kg/m**3)\n", + "Na=6.025*10**26; #avagadro number(per k mol)\n", + "\n", + "#Calculation\n", + "n=ne*Na*D/w;\n", + "mew=1/(n*e*rho); #mobility of electrons(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"mobility of electrons is\",round(mew,5),\"m**2/Vs\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.8, Page number 5.31" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time is 3.64 *10**-14 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=1.5*10**-8; #resistivity of metal(ohm m)\n", + "n=6.5*10**28; #number of free electrons(per m**3)\n", + "e=1.602*10**-19; #charge(c)\n", + "m=9.11*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "tow=m/(n*e**2*rho); #relaxation time(s)\n", + "\n", + "#Result\n", + "print \"relaxation time is\",round(tow*10**14,2),\"*10**-14 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.9, Page number 5.32" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time is 3.97 *10**-14 s\n", + "drift velocity is 0.7 m/s\n", + "mobility is 0.7 *10**-2 m**2/Vs\n", + "thermal velocity is 1.17 *10**5 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=1.54*10**-8; #resistivity of metal(ohm m)\n", + "n=5.8*10**28; #number of free electrons(per m**3)\n", + "e=1.602*10**-19; #charge(c)\n", + "m=9.11*10**-31; #mass(kg)\n", + "E=1*10**2; #electric field(V/m)\n", + "Kb=1.381*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "tow=m/(n*e**2*rho); #relaxation time(s)\n", + "vd=e*E*tow/m; #drift velocity(m/s)\n", + "mew=vd/E; #mobility(m**2/Vs)\n", + "Vth=math.sqrt(3*Kb*T/m); #thermal velocity(m/s)\n", + "\n", + "#Result\n", + "print \"relaxation time is\",round(tow*10**14,2),\"*10**-14 s\"\n", + "print \"drift velocity is\",round(vd,1),\"m/s\"\n", + "print \"mobility is\",round(mew*10**2,1),\"*10**-2 m**2/Vs\"\n", + "print \"thermal velocity is\",round(Vth/10**5,2),\"*10**5 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.10, Page number 5.32" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi velocity is 1.39 *10**6 m/s\n", + "mean free path is 5.52 *10**-8 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "EF=5.5*1.602*10**-19; #fermi energy of silver(J)\n", + "tow=3.97*10**-14; #relaxation time(s)\n", + "m=9.11*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "vf=math.sqrt(2*EF/m); #fermi velocity(m/s)\n", + "lamda=vf*tow; #mean free path(m)\n", + "\n", + "#Result\n", + "print \"fermi velocity is\",round(vf/10**6,2),\"*10**6 m/s\"\n", + "print \"mean free path is\",round(lamda*10**8,2),\"*10**-8 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.11, Page number 5.33" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy is 8.83 *10**-19 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ne=1; #number of electrons\n", + "M=107.9; #atomic weight\n", + "D=10500; #density(kg/m**3)\n", + "Na=6.025*10**26; #avagadro number(per k mol)\n", + "m=9.11*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "n=ne*Na*D/M; \n", + "x=h**2/(8*m);\n", + "y=(3/math.pi)**(2/3);\n", + "Ef=x*y*n**(2/3); #fermi energy(eV) \n", + "\n", + "#Result\n", + "print \"fermi energy is\",round(Ef*10**19,2),\"*10**-19 J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.12, Page number 5.33" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "drift velocity of free electrons is 0.7391 *10**-3 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=10*10**-6; #area(m**2)\n", + "ne=1; #number of electrons\n", + "I=100; #current(amperes)\n", + "w=63.5; #atomic weight\n", + "e=1.6*10**-19; #charge(c)\n", + "D=8.92*10**3; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number(per k mol)\n", + "\n", + "#Calculation\n", + "n=ne*Na*D/w;\n", + "J=I/A;\n", + "vd=J/(n*e); #drift velocity of free electrons(m/s)\n", + "\n", + "#Result\n", + "print \"drift velocity of free electrons is\",round(vd*10**3,4),\"*10**-3 m/s\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb new file mode 100644 index 00000000..2fa5c11e --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter6_1.ipynb @@ -0,0 +1,541 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#6: Dielectric properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant of material is 1.339\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=3*10**28; #number of atoms(per m**3)\n", + "alpha_e=10**-40; #electronic polarizability(F m**2)\n", + "epsilon0=8.85*10**-12; \n", + "\n", + "#Calculation\n", + "epsilonr=(alpha_e*N/epsilon0)+1; #dielectric constant of material\n", + "\n", + "#Result\n", + "print \"dielectric constant of material is\",round(epsilonr,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance is 8.85e-12 F\n", + "charge on plates is 8.85e-10 C\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=100*10**-4; #area(m**2)\n", + "d=1*10**-2; #seperation(m)\n", + "V=100; #potential(V)\n", + "\n", + "#Calculation\n", + "C=epsilon0*A/d; #capacitance(F)\n", + "Q=C*V; #charge on plates(C)\n", + "\n", + "#Result\n", + "print \"capacitance is\",C,\"F\"\n", + "print \"charge on plates is\",Q,\"C\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 2.242e-41 F m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "epsilonr=1.0000684; #dielectric constant of material\n", + "N=2.7*10**25; #number of atoms(per m**3)\n", + "\n", + "#Calculation\n", + "alpha_e=epsilon0*(epsilonr-1)/N; #electronic polarizability(F m**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",alpha_e,\"F m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage is 39.73 V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=650*10**-6; #area(m**2)\n", + "d=4*10**-3; #seperation(m)\n", + "Q=2*10**-10; #charge(C)\n", + "epsilonr=3.5;\n", + "\n", + "#Calculation\n", + "V=Q*d/(epsilon0*epsilonr*A); #voltage(V)\n", + "\n", + "#Result\n", + "print \"voltage is\",round(V,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarization is 212.4 *10**-9 C m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=6.45*10**-4; #area(m**2)\n", + "d=2*10**-3; #seperation(m)\n", + "V=12; #voltage(V)\n", + "epsilonr=5;\n", + "\n", + "#Calculation\n", + "P=epsilon0*(epsilonr-1)*V/d; #polarization(C m)\n", + "\n", + "#Result\n", + "print \"polarization is\",P*10**9,\"*10**-9 C m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.25" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 3.29 *10**-40 F m**2\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.85*10**-12;\n", + "epsilonr=3.75; #dielectric constant\n", + "gama=1/3; #internal field constant\n", + "D=2050; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number\n", + "M=32; #atomic weight\n", + "\n", + "#Calculation\n", + "N=Na*D/M; #number of atoms(per m**3)\n", + "alphae=((epsilonr-1)/(epsilonr+2))*3*epsilon0/N; #electronic polarizability(F m**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,2),\"*10**-40 F m**2\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "orientational polarization is 1.0298 *10**-11 C m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=1.6*10**20; #number of molecules(/m**3)\n", + "T=300; #temperature(K)\n", + "E=5*10**5; #electric field(V/m)\n", + "x=0.25*10**-9; #separation(m)\n", + "Kb=1.381*10**-23; #boltzmann constant\n", + "e=1.6*10**-19; \n", + "\n", + "#Calculation\n", + "Pd=N*e**2*x**2*E/(3*Kb*T); #orientational polarization\n", + "\n", + "#Result\n", + "print \"orientational polarization is\",round(Pd*10**11,4),\"*10**-11 C m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.8, Page number 6.26" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius is 5.864 *10**-11 m\n", + "answer varies due to rounding off errors\n", + "displacement is 0.7 *10**-16 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "epsilonr=1.0000684; #dielectric constant of material\n", + "N=2.7*10**25; #number of atoms(per m**3)\n", + "E=10**6; #electric field(V/m)\n", + "e=1.6*10**-19; \n", + "Z=2; #atomic number\n", + "\n", + "#Calculation\n", + "alpha_e=epsilon0*(epsilonr-1)/N; #electronic polarizability(F m**2)\n", + "r=(alpha_e/(4*math.pi*epsilon0))**(1/3); #radius(m)\n", + "d=alpha_e*E/(Z*e); #displacement(m)\n", + "\n", + "#Result\n", + "print \"radius is\",round(r*10**11,3),\"*10**-11 m\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"displacement is\",round(d*10**16,1),\"*10**-16 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.9, Page number 6.27" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage is 53.8 V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "A=750*10**-6; #area(m**2)\n", + "d=5*10**-3; #seperation(m)\n", + "Q=2.5*10**-10; #charge(C)\n", + "epsilonr=3.5;\n", + "\n", + "#Calculation\n", + "V=Q*d/(epsilon0*epsilonr*A); #voltage(V)\n", + "\n", + "#Result\n", + "print \"voltage is\",round(V,1),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.10, Page number 6.27" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dipole moment is 8.9 *10**-40 F m**2\n", + "polarization is 26.7 *10**-15 C m\n", + "dielectric constant is 1.00302\n", + "polarizability is 8.9 *10**-40 F m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=3*10**25; #number of atoms(per m**3)\n", + "r=0.2*10**-9; #radius(m)\n", + "epsilon0=8.85*10**-12;\n", + "E=1; #electric field\n", + "\n", + "#Calculation\n", + "p=4*math.pi*epsilon0*r**3; #dipole moment(F m**2)\n", + "P=N*p; #polarization(C m)\n", + "epsilonr=(P/(epsilon0*E))+1; #dielectric constant\n", + "alpha_e=epsilon0*(epsilonr-1)/N; #polarizability(F m**2)\n", + "\n", + "#Result\n", + "print \"dipole moment is\",round(p*10**40,1),\"*10**-40 F m**2\"\n", + "print \"polarization is\",round(P*10**15,1),\"*10**-15 C m\"\n", + "print \"dielectric constant is\",round(epsilonr,5)\n", + "print \"polarizability is\",round(alpha_e*10**40,1),\"*10**-40 F m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.11, Page number 6.28" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 1.426 *10**-40 F m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "epsilonr=1.000435; #dielectric constant of material\n", + "N=2.7*10**25; #number of atoms(per m**3)\n", + "\n", + "#Calculation\n", + "alpha_e=epsilon0*(epsilonr-1)/N; #electronic polarizability(F m**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alpha_e*10**40,3),\"*10**-40 F m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.12, Page number 6.28" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 6.785 *10**-40 F m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.85*10**-12;\n", + "epsilonr=4; #dielectric constant\n", + "D=2.08*10**3; #density(kg/m**3)\n", + "Na=6.02*10**26; #avagadro number\n", + "M=32; #atomic weight\n", + "\n", + "#Calculation\n", + "N=Na*D/M; #number of atoms(per m**3)\n", + "alphae=epsilon0*(epsilonr-1)/N; #atomic polarizability(F m**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 F m**2\"" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb new file mode 100644 index 00000000..da805b46 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter7_1.ipynb @@ -0,0 +1,442 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#7: Magnetic properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.1, Page number 7.22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "flux density is 0.628 Wb/m**2\n", + "magnetic moment is -2.0 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=-0.4*10**-5; #magnetic susceptibility\n", + "H=5*10**5; #magnetic field(A/m)\n", + "mew0=4*math.pi*10**-7; \n", + "\n", + "#Calculation\n", + "B=mew0*H*(1+chi); #flux density(Wb/m**2)\n", + "M=chi*H; #magnetic moment(A/m)\n", + "\n", + "#Result\n", + "print \"flux density is\",round(B,3),\"Wb/m**2\"\n", + "print \"magnetic moment is\",M,\"A/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.2, Page number 7.22" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation is -0.25 *10**-2 A/m\n", + "flux density is 1.257 *10**-3 Wb/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=-0.25*10**-5; #magnetic susceptibility\n", + "H=1000; #magnetic field(A/m)\n", + "mew0=4*math.pi*10**-7; \n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation(A/m)\n", + "B=mew0*(H+M); #flux density(Wb/m**2)\n", + "\n", + "#Result\n", + "print \"magnetisation is\",M*10**2,\"*10**-2 A/m\"\n", + "print \"flux density is\",round(B*10**3,3),\"*10**-3 Wb/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.3, Page number 7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation is 3500 A/m\n", + "flux density is 4.71 *10**-3 Wb/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=250; #magnetic field(A/m)\n", + "mewr=15; #relative permeability\n", + "mew0=4*math.pi*10**-7; \n", + "\n", + "#Calculation\n", + "M=H*(mewr-1); #magnetisation(A/m)\n", + "B=mew0*(H+M); #flux density(Wb/m**2)\n", + "\n", + "#Result\n", + "print \"magnetisation is\",M,\"A/m\"\n", + "print \"flux density is\",round(B*10**3,2),\"*10**-3 Wb/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.4, Page number 7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation is -0.42 A/m\n", + "flux density is 1.256 *10**-3 Wb/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=-0.42*10**-3; #magnetic susceptibility\n", + "H=1000; #magnetic field(A/m)\n", + "mew0=4*math.pi*10**-7; \n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation(A/m)\n", + "B=mew0*(H+M); #flux density(Wb/m**2)\n", + "\n", + "#Result\n", + "print \"magnetisation is\",M,\"A/m\"\n", + "print \"flux density is\",round(B*10**3,3),\"*10**-3 Wb/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.5, Page number 7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 3.93 *10**-3 Am**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=10/2; #radius(cm)\n", + "i=500*10**-3; #current(A)\n", + "\n", + "#Calculation\n", + "mew=math.pi*(r*10**-2)**2*i; #magnetic moment(Am**2)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew*10**3,2),\"*10**-3 Am**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.6, Page number 7.23" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetizing force is 201 A/m\n", + "relative permeability is 17.4\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", + "mew0=4*math.pi*10**-7; \n", + "B=0.0044; #flux density(Wb/m**2)\n", + "M=3300; #magnetic moment(A/m)\n", + "\n", + "#Calculation\n", + "H=(B/mew0)-M; #magnetizing force(A/m)\n", + "mewr=1+(M/H); #relative permeability\n", + "\n", + "#Result\n", + "print \"magnetizing force is\",int(H),\"A/m\"\n", + "print \"relative permeability is\",round(mewr,1)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.7, Page number 7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in magnetic moment is 5.705 *10**-29 Am**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", + "r=0.052*10**-9; #radius(m)\n", + "B=3; #flux density(Wb/m**2)\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "delta_mew=e**2*r**2*B/(4*m); #change in magnetic moment(A m**2)\n", + "\n", + "#Result\n", + "print \"change in magnetic moment is\",round(delta_mew*10**29,3),\"*10**-29 Am**2\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.8, Page number 7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in magnetic moment is 3.936 *10**-29 Am**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=5.29*10**-11; #radius(m)\n", + "B=2; #flux density(Wb/m**2)\n", + "e=1.6*10**-19; \n", + "m=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculation\n", + "d_mew=e**2*r**2*B/(4*m); #change in magnetic moment(A m**2)\n", + "\n", + "#Result\n", + "print \"change in magnetic moment is\",round(d_mew*10**29,3),\"*10**-29 Am**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.9, Page number 7.24" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptibility is 3.267 *10**-4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=10**28; #number of atoms(per m**3)\n", + "chi1=2.8*10**-4; #susceptibility\n", + "T1=350; #temperature(K)\n", + "T2=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "chi2=chi1*T1/T2; #susceptibility\n", + "\n", + "#Result\n", + "print \"susceptibility is\",round(chi2*10**4,3),\"*10**-4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.10, Page number 7.25" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 2153.85\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "B=1.4; #flux density(Wb/m**2)\n", + "B0=6.5*10**-4; #magnetic field(Tesla)\n", + "\n", + "#Calculation\n", + "mewr=B/B0; #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",round(mewr,2)" + ] + } + ], + "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/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb new file mode 100644 index 00000000..a1ee2e2e --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter8_1.ipynb @@ -0,0 +1,691 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#8: Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.1, Page number 8.55" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.41667 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.5*10**19; #intrinsic concentration(per m**3)\n", + "mewn=0.4; #mobility of electrons(m**2/Vs)\n", + "mewp=0.2; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "sigma_i=ni*e*(mewn+mewp);\n", + "rhoi=1/sigma_i; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rhoi,5),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.2, Page number 8.56" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of donor atoms is 8.333 *10**19 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewn=0.3; #mobility of electrons(m**2/Vs)\n", + "rho=0.25; #resistivity(ohm m)\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "n=1/(rho*e*mewn); #number of donor atoms(per m**3)\n", + "\n", + "#Result\n", + "print \"number of donor atoms is\",round(n/10**19,3),\"*10**19 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.3, Page number 8.56" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diffusion coefficient of electrons is 54.34 *10**-4 m**2/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewn=0.21; #mobility of electrons(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "Kb=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "Dn=mewn*Kb*T/e; #diffusion coefficient of electrons(m**2/s)\n", + "\n", + "#Result\n", + "print \"diffusion coefficient of electrons is\",round(Dn*10**4,2),\"*10**-4 m**2/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.4, Page number 8.56" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "carrier concentration is 19.4 *10**21 per m**3\n", + "#mobility of holes is 0.03788 m**2/Vs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Rh=3.22*10**-4; #hall coefficient(m**3/C)\n", + "e=1.6*10**-19;\n", + "rho=8.5*10**-3; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "p=1/(Rh*e); #carrier concentration(per m**3)\n", + "mewp=Rh/rho; #mobility of holes(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"carrier concentration is\",round(p/10**21,1),\"*10**21 per m**3\"\n", + "print \"#mobility of holes is\",round(mewp,5),\"m**2/Vs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.5, Page number 8.57" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intrinsic concentration is 556.25 *10**16 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.36; #mobility of electrons(m**2/Vs)\n", + "mewh=0.17; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "rhoi=2.12; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "ni=1/(rhoi*e*(mewe+mewh)); #intrinsic concentration(per m**3)\n", + "\n", + "#Result\n", + "print \"intrinsic concentration is\",round(ni/10**16,2),\"*10**16 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.6, Page number 8.57" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 0.449 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.39; #mobility of electrons(m**2/Vs)\n", + "mewh=0.19; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=2.4*10**19; #intrinsic concentration(per m**3) \n", + "\n", + "#Calculation\n", + "rhoi=1/(ni*e*(mewe+mewh)); #resistivity(ohm m) \n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rhoi,3),\"ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.7, Page number 8.57" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 0.439 *10**-3 per ohm m\n", + "hole concentration is 2.25 *10**9 per m**3\n", + "conductivity is 2.16 *10**3 per ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.135; #mobility of electrons(m**2/Vs)\n", + "mewh=0.048; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=1.5*10**16; #intrinsic concentration(per m**3)\n", + "Nd=10**23; #doping concentration(per m**3)\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mewe+mewh); #conductivity(per ohm m) \n", + "p=ni**2/Nd; #hole concentration(per m**3)\n", + "sigman=Nd*e*mewe; #conductivity(per ohm m) \n", + "\n", + "#Result\n", + "print \"conductivity is\",round(sigma*10**3,3),\"*10**-3 per ohm m\"\n", + "print \"hole concentration is\",p/10**9,\"*10**9 per m**3\"\n", + "print \"conductivity is\",sigman/10**3,\"*10**3 per ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.8, Page number 8.58" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "carrier concentration is 1.7 *10**22 per m**3\n", + "#mobility of holes is 4.099 *10**-2 m**2/Vs\n" + ] + } + ], + "source": [ + "#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", + "rhoh=8.93*10**-3; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "p=1/(Rh*e); #carrier concentration(per m**3)\n", + "mewp=Rh/rhoh; #mobility of holes(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"carrier concentration is\",round(p/10**22,1),\"*10**22 per m**3\"\n", + "print \"#mobility of holes is\",round(mewp*10**2,3),\"*10**-2 m**2/Vs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.9, Page number 8.58" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 4.32 *10**-4 per ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.13; #mobility of electrons(m**2/Vs)\n", + "mewh=0.05; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=1.5*10**16; #intrinsic concentration(per m**3)\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mewe+mewh); #conductivity(per ohm m) \n", + "\n", + "#Result\n", + "print \"conductivity is\",sigma*10**4,\"*10**-4 per ohm m\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.10, Page number 8.58" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 11.2 per ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.14; #mobility of electrons(m**2/Vs)\n", + "mewh=0.05; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=1.5*10**16; #intrinsic concentration(per m**3)\n", + "A=28.09; #atomic weight\n", + "D=2.33*10**3; #density(kg/m**3)\n", + "Na=6.025*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "N=Na*D/A; #number of atoms(per m**3)\n", + "n=N/10**8; #electron concentration(per m**3)\n", + "p=ni**2/n; #hole concentration(per m**3)\n", + "sigma=e*((n*mewe)+(p*mewh)); #conductivity(per ohm m) \n", + "\n", + "#Result\n", + "print \"conductivity is\",round(sigma,1),\"per ohm m\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.11, Page number 8.59" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 4.13 *10**-4 per ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewe=0.36; #mobility of electrons(m**2/Vs)\n", + "mewh=0.18; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=2.5*10**19; #intrinsic concentration(per m**3)\n", + "N=4.2*10**28; #avagadro number\n", + "\n", + "#Calculation\n", + "n=N/10**6; #electron concentration(per m**3)\n", + "p=ni**2/n; #hole concentration(per m**3)\n", + "rhoi=1/(e*((n*mewe)+(p*mewh))); #resistivity(per ohm m) \n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rhoi*10**4,2),\"*10**-4 per ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.12, Page number 8.60" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hole concentration is 1.2 *10**9 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "np=2.4*10**9; #carrier concentration(per m**3)\n", + "N=4.2*10**28; #avagadro number\n", + "\n", + "#Calculation\n", + "p=np/2; #hole concentration(per m**3)\n", + "\n", + "#Result\n", + "print \"hole concentration is\",p/10**9,\"*10**9 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.13, Page number 8.60" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of donor atoms is 8.92 *10**19 electrons/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mewn=0.35; #mobility of electrons(m**2/Vs)\n", + "e=1.602*10**-19;\n", + "rho=0.2; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "n=1/(rho*e*mewn); #density of donor atoms\n", + "\n", + "#Result\n", + "print \"density of donor atoms is\",round(n/10**19,2),\"*10**19 electrons/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.14, Page number 8.60" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy gap is 0.573 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23; #boltzmann constant\n", + "T1=300; #temperature(K)\n", + "T2=320; #temperature(K)\n", + "rho1=5; #resistivity(ohm m)\n", + "rho2=2.5; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "Eg=2*Kb*math.log(rho1/rho2)/((1/T1)-(1/T2)); #energy gap(J)\n", + "\n", + "#Result\n", + "print \"energy gap is\",round(Eg/e,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.15, Page number 8.61" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diffusion coefficient is 4.92 *10**-3 m**2/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "mewe=0.19; #mobility of electrons(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "Dn=mewe*Kb*T/e; #diffusion coefficient(m**2/sec)\n", + "\n", + "#Result\n", + "print \"diffusion coefficient is\",round(Dn*10**3,2),\"*10**-3 m**2/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.16, Page number 8.61" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy gap is 1.04 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23; #boltzmann constant\n", + "T1=293; #temperature(K)\n", + "T2=305; #temperature(K)\n", + "rho1=4.5; #resistivity(ohm m)\n", + "rho2=2.0; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "Eg=2*Kb*math.log(rho1/rho2)/((1/T1)-(1/T2)); #energy gap(J)\n", + "\n", + "#Result\n", + "print \"energy gap is\",round(Eg/e,2),\"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/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb b/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb new file mode 100644 index 00000000..0b33c8c4 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/Chapter9_1.ipynb @@ -0,0 +1,305 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#9: Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.1, Page number 9.22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature is 11.3 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=8; #temperature(K)\n", + "Hc=1*10**5; #critical field(amp/m)\n", + "H0=2*10**5; #critical field(amp/m)\n", + "\n", + "#Calculation\n", + "Tc=T/math.sqrt(1-(Hc/H0)); #transition temperature(K)\n", + "\n", + "#Result\n", + "print \"transition temperature is\",round(Tc,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.2, Page number 9.22" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency is 4.1 *10**9 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant\n", + "e=1.6*10**-19; \n", + "V=8.5*10**-6; #voltage(V)\n", + "\n", + "#Calculation\n", + "new=2*e*V/h; #frequency(Hz)\n", + "\n", + "#Result\n", + "print \"frequency is\",round(new/10**9,1),\"*10**9 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.3, Page number 9.22" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 0.02166 Tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=2; #temperature(K)\n", + "H0=0.0306; #critical field(amp/m)\n", + "Tc=3.7; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(Tesla)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc,5),\"Tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.4, Page number 9.23" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 7.2 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=250*10**3; #critical field(amp/m)\n", + "Tc=12; #transition temperature(K)\n", + "Hc=200*10**3; #critical field(Tesla)\n", + "\n", + "#Calculation\n", + "T=Tc*math.sqrt(1-(Hc/H0)**2); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.5, Page number 9.23" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 0.0163 Tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=2.5; #temperature(K)\n", + "H0=0.03; #critical field(amp/m)\n", + "Tc=3.7; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(Tesla)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc,4),\"Tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.6, Page number 9.23" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency is 313.96 *10**9 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.625*10**-34; #plancks constant\n", + "e=1.6*10**-19; \n", + "V=650*10**-6; #voltage(V)\n", + "\n", + "#Calculation\n", + "new=2*e*V/h; #frequency(Hz)\n", + "\n", + "#Result\n", + "print \"frequency is\",round(new/10**9,2),\"*10**9 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.7, Page number 9.24" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 3.365 *10**3 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=5; #temperature(K)\n", + "H0=6.5*10**3; #critical field(amp/m)\n", + "Tc=7.2; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(Tesla)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/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/Engineering_Physics_by_S._Mani_Naidu/README.txt b/Engineering_Physics_by_S._Mani_Naidu/README.txt new file mode 100644 index 00000000..4ca38c63 --- /dev/null +++ b/Engineering_Physics_by_S._Mani_Naidu/README.txt @@ -0,0 +1,10 @@ +Contributed By: SINDHU ARROJU +Course: btech +College/Institute/Organization: JNTUH +Department/Designation: Computer Science +Book Title: Engineering Physics +Author: S. Mani Naidu +Publisher: Pearson Education(New Delhi) +Year of publication: 2010 +Isbn: 9788131730928 +Edition: 1 \ No newline at end of file diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png new file mode 100644 index 00000000..a8f1d875 Binary files /dev/null and b/Engineering_Physics_by_S._Mani_Naidu/screenshots/11.png differ diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png new file mode 100644 index 00000000..efdf1aef Binary files /dev/null and b/Engineering_Physics_by_S._Mani_Naidu/screenshots/22.png differ diff --git a/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png b/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png new file mode 100644 index 00000000..066e8809 Binary files /dev/null and b/Engineering_Physics_by_S._Mani_Naidu/screenshots/33.png differ diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb new file mode 100644 index 00000000..090338c5 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter1.ipynb @@ -0,0 +1,807 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:14402c55600f1e126f448a3051d0be67f94e08a364b1fb28e55e9829f2141c24" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Elements of Optics And Quantum Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1,Page number 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given\n", + "\n", + "print\"(i) t1=d/c\";\n", + "print\"(ii) t2=[(d-5)/c]+[5/v2]\";\n", + "print\" v2=c/n2\";\n", + "print\" t2=(d+2.5)/c\";\n", + "print\"(iii)delta_t=t2-t1=(d+2.5-d)/c\";\n", + "c=3*10**8; #Speed of light in m/s\n", + "delta_t=2.5*10**-2/c; #converted 2.5 cm into meters\n", + "print\"The time difference\",\"{0:.3e}\".format(delta_t),\"s\" ;\n", + "print\"Arrival time difference of two monochromatic beams is\",delta_t*10**12,\"ps\";\n", + "# Answer misprinted in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) t1=d/c\n", + "(ii) t2=[(d-5)/c]+[5/v2]\n", + " v2=c/n2\n", + " t2=(d+2.5)/c\n", + "(iii)delta_t=t2-t1=(d+2.5-d)/c\n", + "The time difference 8.333e-11 s\n", + "Arrival time difference of two monochromatic beams is 83.3333333333 ps\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2,Page number 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "#Applying Snell's law\n", + "a=1*math.sin(428)/1.333; #a=sin(w2)\n", + "print\"Angle of refraction is\",round(math.degrees(math.asin(a)),3),\"degree\";\n", + "\n", + "c=3*10**8; #speed of light in m/s\n", + "n2=1.333; #refractive index of 2nd medium\n", + "v2=c/n2; #velocity in second medium in m/s\n", + "n1=1; #refractive index of 1st medium\n", + "l1=620; #in nm wavelength\n", + "\n", + "print\"Velocity of optical ray through medium second\",\"{0:.3e}\".format(v2),\"m/s\";\n", + "\n", + "l2= (n1*l1)/n2; #wavelength in 2nd medium in nm\n", + "print\"Wavelenght of optical ray through medium second\",round(l2,4),\"nm\"; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction is 30.512 degree\n", + "Velocity of optical ray through medium second 2.251e+08 m/s\n", + "Wavelenght of optical ray through medium second 465.1163 nm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3,Page number 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "n1=1; #refractive index of air\n", + "n2=1.56; #refractive index of medium\n", + "w1=60; #in deg C\n", + "#using snell's law\n", + "a= n1*sin(w1*math.pi/180)/n2; #a=sin(w1)\n", + "w2=math.degrees(math.asin(a)); #in degree\n", + "print\"Angle of refraction is\",round(w2,4),\"degree\";\n", + "B=w1-w2; #in degree\n", + "print\"Angle of deviation is\",round(B,4),\"degree\";\n", + "# The answer doesn't match because of priting errorsin calculation as sin(608)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of refraction is 33.7207 degree\n", + "Angle of deviation is 26.2793 degree\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4,Page number 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "print\"Solution (i)\";\n", + "w=5/12.5; #tan(w)=5/12.5;\n", + "print\"The value of tan(w2) is\",w;\n", + "w2=math.atan(w)*180/math.pi;\n", + "\n", + "print\"The value of w2 is\",round(w2,4),\"degree\";\n", + "print\"The value of sin(w2) is\",round(math.sin(w2*math.pi/180),4);\n", + "\n", + "print\"Solution (ii)\";\n", + "#Applying snell's law\n", + "n1=1.05;\n", + "n2=1.5;\n", + "w1=(n2*sin(w2*math.pi/180))/n1; #a=sin(w1)\n", + "print\"The value of sin(w1) is\",round(w1,4);\n", + "print\"The value of w1 is\",round(math.degrees(math.asin(w1)),4),\"degree\";\n", + "#value of w1\n", + "#tan(w1)=(p-x)12.5;\n", + "k=0.62*12.5;\n", + "d=1.05*((12.5)**2+(k)**2)**0.5 +1.5*(12.5**2+5**2)**0.5; #d=1.05[(h1)^2+(k)^2]^0.5 +n2(h2**2+x**2)^0.5;\n", + "print\"The optical distance is\",round(d,4),\"cm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "The value of tan(w2) is 0.4\n", + "The value of w2 is 21.8014 degree\n", + "The value of sin(w2) is 0.3714\n", + "Solution (ii)\n", + "The value of sin(w1) is 0.5306\n", + "The value of w1 is 32.0432 degree\n", + "The optical distance is 35.6373 cm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5,Page number 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "c=3*10**8;\n", + "print\"Solution (i)\";\n", + "ri=1.5; #refractive index\n", + "u=830; # in nm\n", + "l=u/ri; #in nm\n", + "print\"Wavelength is\",round(l,4),\"nm\\n\";\n", + "\n", + "print\"Solution (ii)\";\n", + "l=round(l); # rounding to nearest integer\n", + "f=c/(l*10**-9)*10**-12; #in THz\n", + "print\"frequency is\",round(f,4),\"THz\\n\";\n", + "\n", + "print\"Solution (iii)\";\n", + "f=round(f); #rounding to nearest integer\n", + "v=l*10**-9*f*10**12; #in m/s\n", + "print\"phase velocity is\",\"{0:.3e}\".format(v),\"m/s\";\n", + "\n", + "#answer is getting rounding off due to larger calculation\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "Wavelength is 553.3333 nm\n", + "\n", + "Solution (ii)\n", + "frequency is 542.4955 THz\n", + "\n", + "Solution (iii)\n", + "phase velocity is 2.997e+08 m/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6,Page number 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "print\"Solution (i)\";\n", + "l=720; #wavelength in nm\n", + "n=1.5; #refractive index\n", + "lm=l/n;\n", + "print\"Wavelenth is\",lm,\"nm\"; #result\n", + "\n", + "print\"Solution (ii)\";\n", + "c=3*10**8; #in m/s speed of light\n", + "u=c/n;\n", + "print\"Velocity is\",\"{0:.3e}\".format(u),\"m/s\"; #result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "Wavelenth is 480.0 nm\n", + "Solution (ii)\n", + "Velocity is 2.000e+08 m/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7,Page number 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "print\"Solution (i)\";\n", + "c=3*10**8; #in m/s speed of light\n", + "l=640; #in nm\n", + "u=2.2*10**8; #in m/s\n", + "lm=u*l/c; #wavelenth in medium\n", + "print\"The wavelength is\",round(lm,4),\"nm\"; #The answer in the book is misprinted\n", + "\n", + "print\"Solution (ii)\";\n", + "n=l/lm; #refractive index\n", + "print\"Refractive Index is\",round(n,4); #The answer in the book is misprinted\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "The wavelength is 469.3333 nm\n", + "Solution (ii)\n", + "Refractive Index is 1.3636\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8,Page number 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "#k=aa+as=6.3;\n", + "#Given values from research\n", + "k=6.3; #combined attenuation due to absorption and scattering\n", + "d=25; #in cm\n", + "print\"Solution (ii)\";\n", + "#Io/Ii=exp(-(ao+ai)*d); d in m\n", + "j=math.e**(-(k)*d/100); #Io/Ii ratio\n", + "print\"Io is\",round(j,4),\"of Ii\"; #result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (ii)\n", + "Io is 0.207 of Ii\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9,Page number 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "# Given formula Io/Ii=exp(-(ao+ai)*d);\n", + "# k=aa+as=63.1;\n", + "# Io/Ii=1.5\n", + "d=log(0.15)/-63.1; #length of tube\n", + "print\"Length of tube, d =\",round(d*100,4),\"cm\"; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of tube, d = 3.0065 cm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10,Page number 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#p=m/{m+[2*n/(1-n)^2]^2};\n", + "\n", + "m=5; #no. of reflective plates\n", + "n=1.33; #refractive indices\n", + "p=m/(m+(2*n/(1-(n)**2))**2); #degree of polarisation\n", + "print\"The degree of polarisation is\",round(p,1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The degree of polarisation is 0.3\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11,Page number 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#m= p*{m+[2*n/(1-n)^2]^2};\n", + "\n", + "n=1.5; #refractive indices\n", + "p=0.45; #degree of polarisation\n", + "m=(p*(2*n/(1-n**2))**2)/(1-p);\n", + "print\"Thus it will require\",round(m,4),\"reflective plate to achive a degree of polarization equal to 0.45\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus it will require 4.7127 reflective plate to achive a degree of polarization equal to 0.45\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12,Page number 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "#I1/I0=cos(w)^2\n", + "#k=I1/I0;\n", + "\n", + "w=30; #angle bw polarizer and analyser in degee\n", + "k=math.cos(w*math.pi/180)**2;\n", + "print\"The ratio of optical ray intensity ,I1/I0=\",k; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of optical ray intensity ,I1/I0= 0.75\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13,Page number 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given data\n", + "\n", + "#I1/I0=cos(w)^2\n", + "#Given I1/I0=0.55\n", + "\n", + "k=math.sqrt(0.55); #from above formulae\n", + "\n", + "print\"The angle bw polarizer and analyser , w is\",round(math.degrees(math.acos(k)),4),\"degree\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle bw polarizer and analyser , w is 42.1304 degree\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14,Page number 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "print\"Solution (i)\";\n", + "ne=1.4; #refractive index\n", + "no=1.25; #refractive index\n", + "c=3*10**8; #in m/s\n", + "T=2*10**-5; #in m\n", + "l=740; #in nm\n", + "t=(ne-no)*T/c; #time difference\n", + "print\"Time difference, t is\",t*10**12,\"ps\";\n", + "print\"Solution (ii)\";\n", + "le=l/ne; \n", + "lo=l/no;\n", + "fi=2*math.pi*T*(1/le-1/lo)*10**9;\n", + "print\"Phase difference is\",round(fi,4),\"rad\"; \n", + "# Answer misprinted in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "Time difference, t is 0.01 ps\n", + "Solution (ii)\n", + "Phase difference is 25.4724 rad\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15,Page number 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given \n", + "\n", + "#E=h*v=h*c/l;\n", + "\n", + "E=3; #In KeV\n", + "#1eV=1.6*10^-19\n", + "h=6.63*10**-34; #plank constant in J/s\n", + "c=3*10**8; # speed of light in m/s\n", + "l=h*c/(E*10**3*1.6*10**-19); #wavelength in nm\n", + "print\"wavelength of a electromagnetic radiation is\",round(l*10**9,4),\"nm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wavelength of a electromagnetic radiation is 0.4144 nm\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16,Page number 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "print\"Solution (i)\";\n", + "l=670 #in nm\n", + "h=6.63*10**-34; #plank constant in J/s\n", + "c=3*10**17 #speed of light in nm/sec\n", + "Ek=0.75 #In eV\n", + "phi=(h*c/l)/(1.6*10**-19) -Ek;\n", + "phi=round(phi*10)/10; #round to 1 decimal point\n", + "print\"Characteristic of material =\",phi,\"eV\";\n", + "\n", + "print\"Solution (ii)\";\n", + "fc=phi*1.6*10**-19/h*10**-12; #frequency in THz#result\n", + "fc=round(fc);\n", + "print\"Cuttoff frequency is =\",fc,\"THz\";\n", + "lc=c/(fc*10**12); #in nm\n", + "print\"Cuttoff wavelength is =\",round(lc,4),\"nm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "Characteristic of material = 1.1 eV\n", + "Solution (ii)\n", + "Cuttoff frequency is = 265.0 THz\n", + "Cuttoff wavelength is = 1132.0755 nm\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17,Page number 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "print\"Solution (i)\";\n", + "l=0.045; #wavelength in nm\n", + "h=6.63*10**-34; #planks constant in J/s\n", + "c=3*10**8; #speed of light in m/s\n", + "E=h*c/l/10**-9; #energy of photon in eV\n", + "print\"E =\",\"{0:.3e}\".format(E),\"J\";\n", + "\n", + "E1=E/(1.6*10**-19); # energy in joule\n", + "print\"E =\",\"{0:.3e}\".format(E1),\"eV\";\n", + " \n", + "e=1.6*10**-19; # charge of electron\n", + "\n", + "print\"Solution (ii)\";\n", + "V=E/e;\n", + "print\"Required voltage is =\",V/1000,\"KV\";\n", + "\n", + "#Value of wavelenght in problem is .45 but in the solution is .045 \n", + "#the value considered above is .045\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "E = 4.420e-15 J\n", + "E = 2.762e+04 eV\n", + "Solution (ii)\n", + "Required voltage is = 27.625 KV\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18,Page number 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "print\"Solution (i)\";\n", + "x=620 # difference in particle momentum In nm\n", + "h=6.63*10**-34 # planks constant In J/s\n", + "#p=h/(4*pi*x);\n", + "#m*v=h/(4*pi*x);\n", + "m=9.11*10**-31 #mass of electron in kg \n", + "v=h /(4*math.pi* x *10**-9*m); #electron velocity\n", + "print\"The uncertanity in electron velocity is\",round(v,4),\"m/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution (i)\n", + "The uncertanity in electron velocity is 93.41 m/s\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb new file mode 100644 index 00000000..734b0b4e --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter10.ipynb @@ -0,0 +1,130 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:c06efac8408adc2e7578de13cf00375dacdb8941daaf6d4b8b1dec663e9b7c40" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Optical Modulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1,Page number 354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vpi=1; #Assumed 1 because we can not use a variable on RHS \n", + "#Vpi is Violtage swing\n", + "A=0.25; #chirping\n", + "#V1=(AV1p+Vp)/2\n", + "V1=(A*Vpi+Vpi)/2;\n", + "print\" V1=\",V1,\"Vpi\"; \n", + "V2=V1-Vpi;\n", + "print\" V2=\",V2,\"Vpi\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " V1= 0.625 Vpi\n", + " V2= -0.375 Vpi\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2,Page number 354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vpi=1; #Assumed 1 because we can not use a variable on RHS\n", + "#Vpi is Violtage swing\n", + "\n", + "print\"for alpha=0.3\";\n", + "A=0.3; #chirping\n", + "\n", + "#V1=(AV1p+Vp)/2\n", + "V1=(A*Vpi+Vpi)/2;\n", + "print\" V1=\",V1,\"Vpi\"; \n", + "V2=V1-Vpi;\n", + "print\" V2=\",V2,\"Vpi\";\n", + "\n", + "print\"for alpha=0.8\";\n", + "A=0.8; #chirping\n", + "#V1=(AV1p+Vp)/2\n", + "V1x=(A*Vpi+Vpi)/2;\n", + "print\" V1=\",V1x,\"Vpi\"; \n", + "V2x=V1x-Vpi;\n", + "print\" V2=\",V2x,\"Vpi\";\n", + "\n", + "print\" Biasing range is\",V1,\"Vpi <= V1 <=\",V1x,\"Vpi\"; \n", + "print\" Biasing range is\",V2,\"Vpi <= V2 <=\",V2x,\"Vpi\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for alpha=0.3\n", + " V1= 0.65 Vpi\n", + " V2= -0.35 Vpi\n", + "for alpha=0.8\n", + " V1= 0.9 Vpi\n", + " V2= -0.1 Vpi\n", + " Biasing range is 0.65 Vpi <= V1 <= 0.9 Vpi\n", + " Biasing range is -0.35 Vpi <= V2 <= -0.1 Vpi\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb new file mode 100644 index 00000000..f99d37c6 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter11.ipynb @@ -0,0 +1,151 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:6cd44032dbf15e431b274fcb89eff0e69cbc30954e1206f394e571ea69d8987f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Multiplexing" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1,Page number 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "q=4.9*10**-18; #in m/W.GHz raman gain slope\n", + "f=100; #in GHz\n", + "A=50*10**-6; #cross sectional area in micro meter square\n", + "P0=3.5; #in mW\n", + "Le=10*10**3;\n", + "G=q*f*10**6/2/A;\n", + "N=20;\n", + "print\"G =\",\"{0:.3e}\".format(G);\n", + "CT=N*(N-1)*(P0*10**-3*G*Le)/2;\n", + "print\"CT(L) =\",round(CT,3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "G = 4.900e-06\n", + "CT(L) = 0.033\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2,Page number 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "K0=2*math.pi*625; #in MHz/V\n", + "Ip=0.6; #in mA\n", + "N=64; \n", + "w=2.44; #in Mhz\n", + "Z=5;\n", + "Vout=5; #in V\n", + "C=(4*K0*10**6*Ip*10**-3*Z)/(2*math.pi*N*w*w*10**12);\n", + "print\"The value of capacitance is\",round(C*10**9,4),\"nF\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of capacitance is 19.6835 nF\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3,Page number 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "K0=2*math.pi*625; #in MHz/V\n", + "Ip=0.35; #in mA\n", + "N=64; \n", + "w=2.44; #in MHz\n", + "Z=5;\n", + "Vout=4; #in V\n", + "C=22; #in nF\n", + "Z=math.sqrt((2*math.pi*N*w**2*C)/(4*Ip*K0*0.25));\n", + "print\"Zeta is\",round(Z,4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Zeta is 6.1904\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb new file mode 100644 index 00000000..1a8acc22 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter12.ipynb @@ -0,0 +1,2105 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:e9c52faa6f723177987287c656f8b9c6b874a9a4be2d48124b6c6c969a88227d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Optical Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1,Page number 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt=10.; #in microW\n", + "Pr=1.; #in microW\n", + "PtdBm=10*math.log10(Pt*10**-6/10**-3) #in dBm\n", + "print\"Transmitter Power =\",round(PtdBm,4),\"dBm\";\n", + "PrdBm=10*math.log10(Pr*10**-6/10**-3) #in dBm\n", + "print\"Receiver Power =\",round(PrdBm,4),\"dBm\";\n", + "Pm=PtdBm-PrdBm;\n", + "print\"Power margin=\",round(Pm,4),\"dBm\"; #misprint in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmitter Power = -20.0 dBm\n", + "Receiver Power = -30.0 dBm\n", + "Power margin= 10.0 dBm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2,Page number 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt=25.; #in microW\n", + "Prd=15.; #in dBm\n", + "Ptd=10*math.log10(Pt*10**-6/10**-3) #in dBm\n", + "print\"Transmitter Power =\",round(Ptd,4),\"dBm\";\n", + "Pm=Ptd-Prd;\n", + "print\"Power margin=\",round(Pm,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmitter Power = -16.0206 dBm\n", + "Power margin= -31.0206 dBm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3,Page number 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pt1=-18; #in dBm for 50/125 micron fiber\n", + "Pt2=-10; #in dBm for 100/125 micron fiber\n", + "Pd=Pt1-Pt2;\n", + "print\" Additional Power =\",round(Pd,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Additional Power = -8.0 dBm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4,Page number 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Plb=10; #in dBm for 50/125 micron fiber\n", + "Ps=3; #in dBm for safety margin\n", + "Prs=-30; #in dBm for receiver sensivity\n", + "Pt=Plb+Ps+Prs;\n", + "print\"Link power budget =\",round(Pt,4),\"dBm\";\n", + "Ptw=10**(Pt/10.)*1000;\n", + "print\"Transmitter Power =\",round(Ptw,4),\"microW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Link power budget = -17.0 dBm\n", + "Transmitter Power = 19.9526 microW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5,Page number 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Is=0.5; #in A/W\n", + "Ir=1.5; #in microA\n", + "Xw=Ir/Is;\n", + "print\"Electrical power required by PIN diode is =\",round(Xw,4),\"microW\";\n", + "Pxw=10*math.log10(Xw/10**3);\n", + "print\"Therefore, Electrical power required by PIN diode is =\",round(Pxw,4),\"dBm\";\n", + "\n", + "Ps=3; #in dB for safety margin\n", + "Tp=5; #in dB\n", + "Pt=Tp+Ps+Pxw;\n", + "print\"Total Power Required =\",round(Pt,4),\"dBm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electrical power required by PIN diode is = 3.0 microW\n", + "Therefore, Electrical power required by PIN diode is = -25.2288 dBm\n", + "Total Power Required = -17.2288 dBm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6,Page number 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb=1.25; #in Gb/s\n", + "D=17; #in ps/nm.km\n", + "dL=0.5; #in nm\n", + "Lmax=1/fb/10**9/dL/10**-9/D/10**-12*10**-9;\n", + "print\"Maximum Link span,Lmax =\",round(Lmax,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Link span,Lmax = 94.1176 km\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7,Page number 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb=2.5; #in Gb/s\n", + "Lmax=50.; #in km\n", + "dL=0.4; #in nm\n", + "D=1./fb/10**9/dL/10**-9/Lmax/10**-12*10**-9;\n", + "print\"Maximum allowable dispersion,D =\",round(D,4),\"ps/nm-km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum allowable dispersion,D = 20.0 ps/nm-km\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8,Page number 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Lmax=60.; #in km\n", + "D=17.; #in ps/nm.km\n", + "dL=0.5; #in nm\n", + "fb=1/Lmax/10**9/dL/10**-9/D/10**-12*10**-9;\n", + "print\"Maximum system bit rate,fb =\",round(fb,4),\"Gb/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum system bit rate,fb = 1.9608 Gb/s\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9,Page number 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "c1=4; #channel1\n", + "c2=8; #channel2\n", + "c3=16; #channel3\n", + "fb=2.5; #in Gb/s\n", + "Lmax1=6.1*10**3/(c1*fb)**2;\n", + "print\"Maximum Link span for\",c1,\"channel, Lmax =\",Lmax1,\"km\";\n", + "Lmax2=6.1*10**3/(c2*fb)**2;\n", + "print\"Maximum Link span for\",c2,\"channel, Lmax =\",Lmax2,\"km\";\n", + "Lmax3=6.1*10**3/(c3*fb)**2;\n", + "print\"Maximum Link span for\",c3,\"channel, Lmax =\",Lmax3,\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Link span for 4 channel, Lmax = 61.0 km\n", + "Maximum Link span for 8 channel, Lmax = 15.25 km\n", + "Maximum Link span for 16 channel, Lmax = 3.8125 km\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10,Page number 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=200; #in km\n", + "dL=1550; #in nm\n", + "R=10; #in Gb/s\n", + "Cd=17; #in ps/nm-km\n", + "w=0.1; #Assused bandwidth\n", + "Cd200=Cd*L;\n", + "print\"Dispersion by 200km ofc =\",\"{0:.1e}\".format(Cd200),\"ps/nm\";\n", + "TCd=w*Cd200;\n", + "print\"total chromatic dispersion =\",\"{0:.1e}\".format(TCd),\"ps\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dispersion by 200km ofc = 3.4e+03 ps/nm\n", + "total chromatic dispersion = 3.4e+02 ps\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11,Page number 480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1.5; #in km\n", + "Ls=L/3; #in km\n", + "BwF=600; #in MHz\n", + "fb=1; #in Gbps\n", + "Bdlaser=0.71*BwF*L**-0.7*Ls**-0.25;\n", + "print\"Laser bandwidth is\",round(Bdlaser,4),\"MHz\"; \n", + "mD=0.85*(fb*10**3/Bdlaser)**2;\n", + "print\"Mean dispersion penalty is\",round(mD,4),\"dB\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Laser bandwidth is 381.4198 MHz\n", + "Mean dispersion penalty is 5.8427 dB\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.182; #from table 12-11 for 2dB dispersion penalty\n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=3; #in ps/km-nm\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 73.1511 ps/nm\n", + "Maximum link distance is 24.3837 km\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.13,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; #from table 12-11 for 2dB dispersion penalty\n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=3; #in ps/km-nm\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 46.2219 ps/nm\n", + "Maximum link distance is 15.4073 km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.14,Page number 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "mc=0.4; #in dB\n", + "sc=0.0; #in dB\n", + "dmax=2.8; #in dB\n", + "mt=-4.9; #in dBm\n", + "st=0.5; #in dBm\n", + "mr=-38.1; #in dBm\n", + "sr=0.48; #in dBm\n", + "mco=0.35; #in dB\n", + "sco=0.20; #in dB\n", + "ms=0.2; #in dB\n", + "ss=0.1; #in dB\n", + "E=0.182; #from table 12-11 for 2dB dispersion penalty\n", + "fb=156; #in Mb/s\n", + "dl=4; #in nm\n", + "ofdisp=2.8; #in ps/nm-km\n", + "Nco=7;\n", + "mD=2;\n", + "sD=0.1;\n", + "sH=2;\n", + "sCR=0.25;\n", + "Ns=4;\n", + "mH=0;\n", + "mCR=0.5;\n", + "L=50;\n", + "Ls=10;\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; \n", + "mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\"; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 291.6667 ps/nm\n", + "Maximum link distance is 104.1667 km\n", + "Mean link margin is 7.45 dB\n", + "Sigma link margin is 0.9289 dB\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.15,Page number 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; \n", + "fb=622; #in Mb/s\n", + "dl=4; #in nm\n", + "mt=0.1; #in dBm\n", + "mr=-31.5; #in dBm\n", + "mc=0.41; #in dB\n", + "L=25;\n", + "mco=0.12; #in dB\n", + "Nco=2;\n", + "ms=0.15; #in dB\n", + "Ns=4;\n", + "mD=1;\n", + "mH=0;\n", + "mCR=0;\n", + "sc=0.0; #in dB\n", + "st=-0.15; #in dBm\n", + "sr=0.3; #in dBm\n", + "sco=0.08; #in dB\n", + "ss=0.1; #in dB\n", + "ofdisp=2.8; #in ps/nm-km\n", + "sD=2;\n", + "sH=0;\n", + "sCR=0.0;\n", + "Ls=12;\n", + "\n", + "Dmax=E/(10**-6*fb*dl);\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; #in book 4 is misprint for solving \n", + "mM=mt-mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\"; #wrong in book\n", + "L=60;\n", + "Ls=12; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n", + "spm=mM-2*sM-1;\n", + "print\"System power margin is\",round(spm,4),\"dB\"; #answer is slighty difeerent due to mM=19.5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 46.2219 ps/nm\n", + "Maximum link distance is 16.5078 km\n", + "Mean link margin is 19.51 dB\n", + "Sigma link margin is 0.4066 dB\n", + "System power margin is 17.6969 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.16,Page number 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "E=0.115; \n", + "fb=1062; #in Mb/s\n", + "dl=6; #in nm\n", + "mt=-8; #in dBm\n", + "mr=28.7; #in dBm\n", + "mc=0.4; #in dB\n", + "L=5;\n", + "mco=0.12; #in dB\n", + "Nco=8;\n", + "ms=0.2; #in dB\n", + "Ns=4;\n", + "mD=1;\n", + "mH=0;\n", + "mCR=1;\n", + "sc=0.0; #in dB\n", + "st=0.6; #in dBm\n", + "sr=0.75; #in dBm\n", + "sco=0.08; #in dB\n", + "ss=0.1; #in dB\n", + "ofdisp=2.8; #in ps/nm-km\n", + "sD=2;\n", + "sH=0;\n", + "sCR=0.25;\n", + "Ls=12;\n", + "\n", + "Dmax=round(E/(10**-6*fb*dl)); #taking to nearest integer in ps/nm\n", + "print\"Dmax is\",round(Dmax,4),\"ps/nm\"; \n", + "Lmax=Dmax/ofdisp;\n", + "print\"Maximum link distance is\",round(Lmax,4),\"km\"; \n", + "mM=mt+mr-(mc*L+mco*Nco+ms*Ns+mD+mH+mCR);\n", + "print\"Mean link margin is\",round(mM,4),\"dB\";\n", + "L=60;\n", + "Ls=12; \n", + "sM=math.sqrt(st**2+sr**2+sc**2*L*Ls+sco**2*Nco+ss**2*Ns+sD**2*sH**2+sCR**2);\n", + "print\"Sigma link margin is\",round(sM,4),\"dB\"; \n", + "mM=round(mM*10)/10; #talking only to 1 decimal place and rounding of other values\n", + "spm=mM-2*sM-1;\n", + "print\"mM-2*sM =\",mM-2*sM;\n", + "print\"System power margin is\",round(spm,4),\"dB\"; #answer is slighty diferent due to m\\sM=1.03" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dmax is 18.0 ps/nm\n", + "Maximum link distance is 6.4286 km\n", + "Mean link margin is 14.94 dB\n", + "Sigma link margin is 1.0374 dB\n", + "mM-2*sM = 12.8251988047\n", + "System power margin is 11.8252 dB\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17,Page number 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncso=50;\n", + "a=3.6*10**-3;\n", + "m=0.05;\n", + "CSO=10*math.log10(Ncso*(a*m)**2);\n", + "print\"CSO distortion for 50 channel optical system =\",round(CSO,4),\"dB\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CSO distortion for 50 channel optical system = -57.9048 dB\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Example 12.18,Page number 486" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "CSO=-59.8; #in dB\n", + "y=10**(CSO/10);\n", + "print\"AM modulation depth (m) = \",\"{0:.3e}\".format(y);\n", + "asq=3.6*10**-3;\n", + "Ncso=50;\n", + "msq=(y/Ncso/asq/asq);\n", + "print\"m^2 =\",\"{0:.3e}\".format(msq);\n", + "print\"Decrease of AM modulation depth decrease the CSO distortion by =\",round(math.sqrt(msq)*100,1),\"percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "AM modulation depth (m) = 1.047e-06\n", + "m^2 = 1.616e-03\n", + "Decrease of AM modulation depth decrease the CSO distortion by = 4.0 percent\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.19,Page number 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncto=50;\n", + "b=1.07*10**-2;\n", + "m=0.05;\n", + "CTO=10*math.log10(Ncto*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system =\",round(CTO,4),\"dB\"; \n", + "#Answer in the book is misprinted\n", + "#The solution in the book is calculated without multipication of Ncto" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CTO distortion for 50 channel optical system = -44.9214 dB\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.20,Page number 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ncso=80;\n", + "a=2.43*10**-3;\n", + "b=4.65*10**-3;\n", + "m=0.05;\n", + "\n", + "#Part (i)\n", + "CSO=10*math.log10(Ncso*(a*m)**2);\n", + "print\"CSO distortion for 50 channel optical system for m = 5 percent CSOdB =\",round(CSO,4),\"dB\"; \n", + "\n", + "#Part (ii)\n", + "CTO=10*log10(Ncso*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system for m = 5 percent CTOdB =\",round(CTO,4),\"dB\";\n", + "\n", + "#Part (iii)\n", + "m=0.03;\n", + "\n", + "CSO=10*log10(Ncso*(a*m)**2); \n", + "# Value of a in the book is considered 2.4 instead of 2.43\n", + "print\"CSO distortion for 50 channel optical system for m = 3 percent CSOdB =\",round(CSO,4),\"dB\"; \n", + "\n", + "#Part (iv)\n", + "CTO=10*math.log10(Ncso*(1.5*b*m)**2);\n", + "print\"CTO distortion for 50 channel optical system for m = 3 percent CTOdB =\",round(CTO,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CSO distortion for 50 channel optical system for m = 5 percent CSOdB = -59.2776 dB\n", + "CTO distortion for 50 channel optical system for m = 5 percent CTOdB = -50.1188 dB\n", + "CSO distortion for 50 channel optical system for m = 3 percent CSOdB = -63.7145 dB\n", + "CTO distortion for 50 channel optical system for m = 3 percent CTOdB = -54.5558 dB\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.21,Page number 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "RIN=-150; #in dB\n", + "B=4*10**6;\n", + "m=0.04;\n", + "CNR=10*math.log10(m**2/(2*10**-15*B));\n", + "print\" CNR =\",round(CNR,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CNR = 53.0103 dB\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.22,Page number 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "CNR=50; #in dB\n", + "Bch=4*10**6;\n", + "m=0.03;\n", + "RIN=m**2/2/Bch/10**(CNR/10)\n", + "print\"RIN =\",\"{0:.3e}\".format(RIN);\n", + "#Miscalculated answer in the book\n", + "RINdB=10*log10(RIN);\n", + "print\"RIN in Db is\",round(RINdB,4);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RIN = 1.125e-15\n", + "RIN in Db is -149.4885\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.23,Page number 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ipd=0.15; #in mA\n", + "n=0.75;\n", + "e=1.6*10**-19; #electron charge\n", + "hv=1.55*10**-19;\n", + "Pin=hv*Ipd/n/e;\n", + "print\"Pin =\",round(Pin,4),\"mW\"; #Result\n", + "#answer in book is misprint" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pin = 0.1937 mW\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.24,Page number 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "OBR=-40; #in dB\n", + "#y=Pref/Pin\n", + "y=10**(OBR/10.);\n", + "print\" Prefl =\",round(y*100,4),\"percent Pin\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Prefl = 0.01 percent Pin\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25,Page number 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R=800; #in V/W\n", + "Pin=1.5; #in mW\n", + "m=0.04;\n", + "Voutp=R*Pin*m;\n", + "print\"Vout(peak) =\",Voutp,\"mV\";\n", + "Vavg=Voutp/math.sqrt(2);\n", + "print\"Vavg =\",round(Vavg,4),\"mV\";\n", + "#in dB\n", + "Vavgd=20*math.log10(Vavg*10**-3);\n", + "print\"Vavg(in dBmV) =\",round(Vavgd,4);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vout(peak) = 48.0 mV\n", + "Vavg = 33.9411 mV\n", + "Vavg(in dBmV) = -29.3855\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.26,Page number 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Voutp=20; #in dB\n", + "Pin=1.2; #in mW\n", + "m=0.035;\n", + "Vavg=10**(Voutp/20); #in \n", + "R=Vavg*math.sqrt(2)/Pin/m;\n", + "print\"R =\",round(R,4),\"V/W\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 336.7175 V/W\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.27,Page number 494" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Voutp=28.; #in dB\n", + "Pin=1; #in mW\n", + "R=800; #in V/W\n", + "Vavg=10**(Voutp/20); #in \n", + "m=Vavg*math.sqrt(2)/Pin/R;\n", + "print\"The modulation depth ,m =\",round(m*100,4),\"percent\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The modulation depth ,m = 4.4404 percent\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.28,Page number 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ipd=1.2; #in mA\n", + "m=0.04; \n", + "RINd=-160.; #in dB/Hz\n", + "e=1.6*10**-19; \n", + "nth=8; #in pA/Hz\n", + "BW=4; #in MHz\n", + "Rin=10**(RINd/10); #in \n", + "\n", + "CNR=(0.5*(m*Ipd*10**-3)**2)/((2*e*Ipd*10**-3)+(Rin*Ipd*10**-3)**2+((nth*10**-12)**2)*BW/10**6);\n", + "print\"Value of CNR=\",\"{0:.3e}\".format(CNR);\n", + "CNRdB=10*math.log10(CNR)\n", + "print\"Value of CNR in dB=\",round(CNRdB,4),\"dB\"\n", + "#Answer in the book is misprinted or wrong calculation performed in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of CNR= 3.000e+12\n", + "Value of CNR in dB= 124.7712 dB\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.29,Page number 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L1=40; #in km\n", + "L2=100; #in km\n", + "A=0.2; #in dB/Km\n", + "TFA1=A*L1;\n", + "\n", + "print\"Total fibre span attenuation\",round(TFA1,4),\"dB\";\n", + "TFA2=A*L2;\n", + "print\"Total fibre span attenuation\",round(TFA2,4),\"dB\";\n", + "nsd=TFA2-TFA1;\n", + "print\"Noise spectral density =\",round(nsd,4),\"dB\";\n", + "nsd_abs=10**(nsd/10)\n", + "print\"Absolute value of noise spectral density =\",round(nsd_abs,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total fibre span attenuation 8.0 dB\n", + "Total fibre span attenuation 20.0 dB\n", + "Noise spectral density = 12.0 dB\n", + "Absolute value of noise spectral density = 15.8489 dB\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.30,Page number 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "P1=2.75; #in mW\n", + "NFd=5; #in dB\n", + "bw=5; #in GHz\n", + "G=10; #in dB\n", + "hv=1.6*10**-19; #photon energy in J\n", + "N=1; #no of amplifiers\n", + "NF=10**(NFd/10.); #amplifier noise figure\n", + "SNR=10*math.log10(P1*10**-3/(G*hv*bw*10**9*N*NF)); #signal to nois eratio\n", + "print\"Spectral Noise density =\",round(SNR,4),\"dB\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Spectral Noise density = 50.3624 dB\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.31,Page number 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "SNRdB=40; #in dB\n", + "NFd=6; #in dB\n", + "bw=4; #in GHz\n", + "Gd=8; #in dB\n", + "hv=1.6*10**-19; #photon energy in J\n", + "N=8; #no of amplifiers\n", + "SNR=10**(SNRdB/10.);\n", + "NF=10**(NFd/10.); #amplifier noise figure\n", + "G=10**(Gd/10.); #amplifer gain\n", + "P1=10*(SNR/10.)*(G*hv*bw*10**9*N*NF)/10**-3; #optical power launched into fibre\n", + "print\"Optical power required , Pl =\",round(P1,4),\"mW \";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical power required , Pl = 1.2861 mW \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.32,Page number 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "l=1550; #wavelength in nm\n", + "fb=10; #system bit rate Gb/s\n", + "Df=17; #fiber dispersion in ps/nm-km\n", + "L=10**5/Df/fb**2; #fiber length in km \n", + "print\"Transmission length is\",round(L,4),\"km\";\n", + "fb2=2.5; #system bit rate Gb/s\n", + "print\"for fb=2.5 Gb/s\"\n", + "L2=10**5/Df/fb2**2; #fiber length in km \n", + "print\"Transmission length is\",round(L2,4),\"km\"; #answer misprint in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission length is 58.0 km\n", + "for fb=2.5 Gb/s\n", + "Transmission length is 941.12 km\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.33,Page number 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "lembda=1550; #wavelength in nm\n", + "Df=17; #fiber dispersion in ps/nm-km\n", + "L=80 #fiber length in km \n", + "fb=math.sqrt(10**5/Df/L)\n", + "print\"Maximum bit rate fb =\",round(fb,4),\"Mb/s\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum bit rate fb = 8.544 Mb/s\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.34,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.2; #dispersion constant in ps/nm/km\n", + "Tfwhm=18; #ps\n", + "Zs=0.25*Tfwhm**2/D; #Characteristic length\n", + "print\" Zs =\",Zs,\"km\"; #answer in book is miscalculated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zs = 405.0 km\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.35,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "lembda=1550; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "Zs=600; #in km\n", + "Tfwhm=20; #in ps\n", + "D=1/1.763**2*(2*math.pi*c*Tfwhm**2/(lembda**2*Zs)); #dispersion constant\n", + "print\"dispersion constant, D =\",round(D,4),\"ps/nm/km\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dispersion constant, D = 0.1683 ps/nm/km\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.36,Page number 530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "l=1557; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "Zs=550; #in km\n", + "D=0.25; #in ps/nm/km\n", + "Tfwhm=math.sqrt(1.763**2*l**2*D*Zs/(2*math.pi*c)); #Soliton pulse width \n", + "print\"Tfwhm =\",round(Tfwhm,3),\"ps\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tfwhm = 23.445 ps\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.37,Page number 531" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Aeff=55; #in sq micrometer\n", + "l=1557; #wavelength in nm\n", + "c=3*10**5; #speed of light in km/s\n", + "n2=2.6*10**-16; #in cm**2/W\n", + "D=0.20; #Dispersion constant in ps/nm/km\n", + "Tfwhm=30; #in ps\n", + "Zs=(2*math.pi*c*Tfwhm**2/l**2/D)/(1.763)**2 ; #charecteristic length \n", + "print\" Zs =\",round(Zs,4),\"km\"; \n", + "Ps=(Aeff*10**-12*l*10**-9)/(2*math.pi*n2*10**-4*Zs*10**3); #Peak pulse power\n", + "#Miscalculation in the book\n", + "print\" Ps =\",round(Ps*1000,4),\"mW\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zs = 1125.7236 km\n", + " Ps = 0.4657 mW\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.38,Page number 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Z=10; #in mm\n", + "Tfwhm=22; #in ps\n", + "D=0.5; #ps/nm/km\n", + "Aeff=55; #in microm^2\n", + "A=0.05; #in km^-1\n", + "nsp=1.5; #spontaneous emission \n", + "F=2; #amplifier noise\n", + "s=3.6*10**3*nsp*F*A*D*Z**3/(Aeff*Tfwhm);\n", + "print\" sigma =\",round(s,4),\"ps\"; \n", + "#answer in book is misprint\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " sigma = 223.1405 ps\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.39,Page number 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Q1=4; #quality factor\n", + "Q2=6; #quality factor\n", + "BER1=(2*math.pi*(Q1**2+2))**-0.5*math.e**(-Q1*Q1/2); \n", + "BER2=(2*math.pi*(Q2**2+2))**-0.5*math.e**(-Q2*Q2/2);\n", + "print\"For Q=4 ,BER =\",\"{0:.3e}\".format(BER1); \n", + "print\"For Q=6 ,BER =\",\"{0:.3e}\".format(BER2); \n", + "#Answer second is misprinted in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Q=4 ,BER = 3.154e-05\n", + "For Q=6 ,BER = 9.856e-10\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.40,Page number 534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.5; #Dispersion constant ps/nm/km\n", + "Ts=22; #Pulse width in ps\n", + "fb=10; #system transmission rate in Gb/s\n", + "Z1=1; #System total length Mm\n", + "Z2=10; #System total length Mm\n", + "sa1=8.6*D*D*Z1*Z1*math.sqrt(fb-0.99)/22/2; #standard deviation based on accoustic effect\n", + "sa2=8.6*D*D*Z2*Z2*math.sqrt(fb-0.99)/22/2; #standard deviation based on accoustic effect\n", + "print\"For Z=1000km ,sigma acoustic =\",round(sa1,4),\"ps\"; \n", + "print\"For Z=10000km ,sigma acoustic =\",round(sa2,4),\"ps \"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Z=1000km ,sigma acoustic = 0.1467 ps\n", + "For Z=10000km ,sigma acoustic = 14.6672 ps \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.41,Page number 535" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.45; #dispersion coefficient in ps/nm/km\n", + "Ts=22; #Pulse width in ps\n", + "l=0.5; #length in nm\n", + "Lcollision=2*Ts/l/D; #collision length in km\n", + "print\"Lcollision =\",round(Lcollision,4),\"km\"; \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lcollision = 195.5556 km\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.42,Page number 537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "f=70; #Maximum frequencyshift in Ghz\n", + "Ts=22; #Pulse width in ps\n", + "CS=1.783*f*10**9*Ts*10**-12; #half channel seperation \n", + "print\"The half channel seperation\",round(CS,4);\n", + "\n", + "df=0.105/f/10**9/Ts/Ts/10**-24; #maximum frequency shift\n", + "print\"The maximum frequency shift\",round(df/10**9,4),\"GHz\";\n", + "\n", + "dt=0.1786/f/10**9/f/10**9/Ts/10**-12; #time displacement\n", + "print\"The time displacement\",round(dt*10**12,4),\"ps\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The half channel seperation 2.7458\n", + "The maximum frequency shift 3.0992 GHz\n", + "The time displacement 1.6568 ps\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.43,Page number 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "M=1.; \n", + "N=1.; #no of collision \n", + "S1=4.; #soliton colllision \n", + "S2=5.; #soliton colllision \n", + "Nc=S1*S1/4*(M*S1/2-M+N); #minimum no of collision\n", + "print\"Ncollision for S=4,is\",Nc;\n", + "Nc2=(S2*S2-1)/4*(M*S2/2-M+N); #minimum no of collision\n", + "print\"Ncollision for S=5,is\",Nc2;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ncollision for S=4,is 8.0\n", + "Ncollision for S=5,is 15.0\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.44,Page number 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "S=4.;\n", + "n=5;\n", + "print\"Maximum number of solition Collisions\";\n", + "for M in range(1,n+1):\n", + " N=M;\n", + " Nc=S*(M*S*S/3.+S*(N/2.-M)-N/2.+2*M/3.); #minimum no of collision\n", + " print\" M=\",M,\" N=\",N,\" S=\",S,\"is\",Nc;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum number of solition Collisions\n", + " M= 1 N= 1 S= 4.0 is 14.0\n", + " M= 2 N= 2 S= 4.0 is 28.0\n", + " M= 3 N= 3 S= 4.0 is 42.0\n", + " M= 4 N= 4 S= 4.0 is 56.0\n", + " M= 5 N= 5 S= 4.0 is 70.0\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.45,Page number 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "M=1; #number of solition Collisions\n", + "N=1; # number of solition Collisions\n", + "x=2; \n", + "y=1./2;\n", + "p=3;\n", + "p2=4;\n", + "Tb=100; #ps\n", + "l=1; #difference in wavelength in nm \n", + "D=7*10**-2; #ps/nm**2*km\n", + "Zr=y*y*(Tb/l/l/D); #regeration spacing in km\n", + "print\" Zr =\",Zr,\"km\";\n", + "P=(p-1)*N+(p-2)*(p-1)*M/2.;\n", + "print\" P(\",p,\") =\",P; #result number of Collisions\n", + "P2=(p2-1)*N+(p2-2)*(p2-1)*M/2.; \n", + "print\" P(\",p2,\") =\",P2; #result number of Collisions" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zr = 357.142857143 km\n", + " P( 3 ) = 3.0\n", + " P( 4 ) = 6.0\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.46,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tb=100; #bit period in ps\n", + "dZ=0.4; #in ps/nm/km\n", + "Zr=150; #Modulator spacing in km\n", + "Ta=Tb/(dZ*Zr); #channel spacing in nm\n", + "print\"Channel spacing\",round(Ta,4),\"nm\"; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Channel spacing 1.6667 nm\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.47,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zr=200; #Modulator spacing in km\n", + "D=0.6; #in ps/nm/km\n", + "l=2; #in nm\n", + "Tb=l*(Zr*D); #bit period in ps\n", + "print\"Bit period Tb =\",Tb,\"ps\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bit period Tb = 240.0 ps\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.48,Page number 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "D=0.5; #ps/nm-km\n", + "Tb=80; #bit period in ps\n", + "l=1.5; #in nm\n", + "Zr=Tb/(D*l); #Modulator spacing in km\n", + "print\" Maximum modulator spacing Zr =\",round(Zr,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum modulator spacing Zr = 106.6667 km\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.49,Page number 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zd=100; #in km\n", + "Do=0.07; #in ps/nm**2\n", + "D1=-0.3; #in ps/nm**2\n", + "Ldsf=(Zd*Do)/(Do-D1); #length of dispersion compensation fiber in km\n", + "print\"Length of Dispersion compensation fiber, Ldsf =\",round(Ldsf,4),\"km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of Dispersion compensation fiber, Ldsf = 18.9189 km\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.50,Page number 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "m=3;\n", + "n=1;\n", + "Tb=100; #ps\n", + "l=1; #nm\n", + "D=0.07; #ps/nm**2*km\n", + "lmn=1; #nm\n", + "lmo=2; #nm\n", + "Do=0.1; #ps/nm-km\n", + "Lc=4*Tb/(5*D*lmn*(lmn+2*lmo)); #Collision length in km\n", + "print\"Collision length without dispersion slope compensation =\",round(Lc,4),\"km\";\n", + "Lc2=2*Tb/(5*Do*lmn); #Collision length in km\n", + "print\"Collision length with dispersion slope compensation =\",Lc2,\"km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collision length without dispersion slope compensation = 228.5714 km\n", + "Collision length with dispersion slope compensation = 400.0 km\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.51,Page number 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Zr=200; #in km\n", + "S=4;\n", + "Ltot1=2*Zr*(S-1); #total solition collion length in km\n", + "print\"Total solition Collisions length With DSC ,Ltotal =\",round(Ltot1,4),\"km\";\n", + "Ltot2=(2./5)*Zr*(S-1); #total solition collion length in km\n", + "print\"Total solition Collisions length With non-DSC ,Ltotal =\",round(Ltot2,4),\"km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total solition Collisions length With DSC ,Ltotal = 1200.0 km\n", + "Total solition Collisions length With non-DSC ,Ltotal = 240.0 km\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb new file mode 100644 index 00000000..db346d84 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter13.ipynb @@ -0,0 +1,223 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:ed1a25d96a9de635d5aa1c88be7d5d2e542d32bc8dd1dcaa2a4c1e4169428cb8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1,Page number 568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vcc=5; #in V\n", + "Vf=1.5; #in V\n", + "If=60; #in mA\n", + "B=3.97;\n", + "N=3;\n", + "R9=(Vcc-Vf)*(B+1)/If/10**-3;\n", + "print\"R9 =\",round(R9,4),\"ohm\";\n", + "R7=R9/2/B-3/N;\n", + "print\"R7 =\",round(R7,4),\"ohm\";\n", + "R8=R9/2/B;\n", + "print\"R8 =\",round(R8,4),\"ohm\";\n", + "C4=2*10**-9/R8;\n", + "print\"C4 =\",round(C4*10**12,4),\"pF\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R9 = 289.9167 ohm\n", + "R7 = 35.5134 ohm\n", + "R8 = 36.5134 ohm\n", + "C4 = 54.7744 pF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2,Page number 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vu3=1.24; #in V\n", + "Vbeq3=0.7; #in V\n", + "Vbeq4=0.7; #in V\n", + "R5=17.5; #in Ohm\n", + "R6=17.5; #in Ohm\n", + "Voh=5; #in V\n", + "Vol=0; #in V\n", + "\n", + "If=(Vu3-Vbeq3)/R5+(Vu3-Vbeq4)/R6;\n", + "print\"If=\",round(If*1000,4),\"mA\";\n", + "\n", + "R3=(Voh-Vol)/If;\n", + "print\"R3=\",round(R3,4),\"ohm\";\n", + "\n", + "C4=2*10**-9/R3;\n", + "print\"C4=\",round(C4*10**12,4),\"pF\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If= 61.7143 mA\n", + "R3= 81.0185 ohm\n", + "C4= 24.6857 pF\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2,Page number 581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##\"Page number 581 again Example 13-2 (numbering mistake)\";\n", + "import math\n", + "\n", + "#given\n", + "\n", + "Er=4.9;\n", + "h=5; #in mils\n", + "w=10; #in mils\n", + "t=0.5; #in mils\n", + "\n", + "Z=60.0/math.sqrt(0.475*Er+0.67)*log(4*h/0.67/(0.8*w+t));\n", + "print\"Z =\",round(Z,4),\"ohm\";\n", + "\n", + "tpd=1.017*sqrt(0.475*Er+0.67);\n", + "print\"tpd =\",round(tpd,4),\"ns/ft\";\n", + "\n", + "Tpd=tpd*1000/12; #converted into ps/in\n", + "print\"tpd =\",round(Tpd,4),\"ps/in\";\n", + "\n", + "Co=Tpd/Z;\n", + "print\"Co =\",round(Co,4),\"pF/in\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Page number 581 again Example 13-2 (numbering mistake)\n", + "Z = 43.5322 ohm\n", + "tpd = 1.7608 ns/ft\n", + "tpd = 146.7301 ps/in\n", + "Co = 3.3706 pF/in\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3,Page number 583" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Er=4.7;\n", + "b=10; #in mils\n", + "w=4; #in mils\n", + "t=0.5; #in mils\n", + "\n", + "Z=60/math.sqrt(Er)*log(4*b/0.67/math.pi/(0.8*w+t));\n", + "print\" Z =\",round(Z,4),\"ohm\";\n", + "\n", + "tpd=1.017*sqrt(Er);\n", + "print\" tpd =\",round(tpd,4),\"ns/ft\";\n", + "\n", + "Tpd=tpd*1000/12; #converted into ps/in\n", + "print\" Also,tpd =\",round(Tpd,4),\"ps/in\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Z = 45.286 ohm\n", + " tpd = 2.2048 ns/ft\n", + " Also,tpd = 183.7336 ps/in\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb new file mode 100644 index 00000000..14a68207 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter2.ipynb @@ -0,0 +1,426 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:d29d3a679a41724a7418468df6fc23d4201d21504336408f925fcb746ba7b8bf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Fundamental of Semiconductor Theory" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1,Page number 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n=1;\n", + "Ne=2*n**2;\n", + "print\"Maximum number of electron in 1st shell is \",Ne; #Result\n", + "n2=2; #shell no\n", + "Ne2=2*n2**2; #shell no\n", + "print\"Maximum number of electron in 2nd shell is \",Ne2; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum number of electron in 1st shell is 2\n", + "Maximum number of electron in 2nd shell is 8\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2,Page number 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#Given for silicon for temp 0-400K\n", + "Eg0_Si=1.17; #in eV\n", + "A=4.73*10**-4; #in eV/K\n", + "B=636;\n", + "for i in range(1,9):\n", + " T=50*i; #degree/Kelvin\n", + " Eg_Si=Eg0_Si-(A*T**2)/(B+T);\n", + " print\"Band gap energy of silicon at \",T,\" K is \",round(Eg_Si,3),\"eV \"; #result\n", + "\n", + "#Given for Germanium for temp 0-400K\n", + "print\"\\n\"\n", + "Eg0_Ge=0.7437; #in eV\n", + "A_Ge=4.774*10**-4; #in eV/K\n", + "B_Ge=235;\n", + "for i in range(1,9):\n", + " T=50*i; #degree/Kelvin\n", + " Eg_Ge=Eg0_Ge-(A_Ge*T**2)/(B_Ge+T);\n", + " print\"Band gap energy of germanium at \",T,\" K is \",round(Eg_Ge,3),\"eV \"; #result\n", + "\n", + "\n", + "#Given for GaAs for temp 0-400K\n", + "print\"\\n\"\n", + "Eg0_Ga=1.519; #in eV\n", + "A_Ga=5.405*10**-4; #in eV/K\n", + "B_Ga=204;\n", + "for i in range(1,9):\n", + " T=50*i; #degree/Kelvin\n", + " Eg_Ga=Eg0_Ga-(A_Ga*T**2)/(B_Ga+T);\n", + " print\"Band gap energy of GaAs at \",T ,\"K is \",round(Eg_Ga,3),\"eV\"; #result\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Band gap energy of silicon at 50 K is 1.168 eV \n", + "Band gap energy of silicon at 100 K is 1.164 eV \n", + "Band gap energy of silicon at 150 K is 1.156 eV \n", + "Band gap energy of silicon at 200 K is 1.147 eV \n", + "Band gap energy of silicon at 250 K is 1.137 eV \n", + "Band gap energy of silicon at 300 K is 1.125 eV \n", + "Band gap energy of silicon at 350 K is 1.111 eV \n", + "Band gap energy of silicon at 400 K is 1.097 eV \n", + "\n", + "\n", + "Band gap energy of germanium at 50 K is 0.74 eV \n", + "Band gap energy of germanium at 100 K is 0.729 eV \n", + "Band gap energy of germanium at 150 K is 0.716 eV \n", + "Band gap energy of germanium at 200 K is 0.7 eV \n", + "Band gap energy of germanium at 250 K is 0.682 eV \n", + "Band gap energy of germanium at 300 K is 0.663 eV \n", + "Band gap energy of germanium at 350 K is 0.644 eV \n", + "Band gap energy of germanium at 400 K is 0.623 eV \n", + "\n", + "\n", + "Band gap energy of GaAs at 50 K is 1.514 eV\n", + "Band gap energy of GaAs at 100 K is 1.501 eV\n", + "Band gap energy of GaAs at 150 K is 1.485 eV\n", + "Band gap energy of GaAs at 200 K is 1.465 eV\n", + "Band gap energy of GaAs at 250 K is 1.445 eV\n", + "Band gap energy of GaAs at 300 K is 1.422 eV\n", + "Band gap energy of GaAs at 350 K is 1.399 eV\n", + "Band gap energy of GaAs at 400 K is 1.376 eV\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3,Page number 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "l=10*10**-3; #in m\n", + "w=2*10**-3; #in m\n", + "h=2*10**-3; #in m\n", + "V=12; #in V\n", + "u_n=0.14; #in m*m/V*s\n", + "u_p=0.05; #in m*m/V*s\n", + "q_n=1.6*10**-19; #in Columbs\n", + "q_p=1.6*10**-19; #in Columbs\n", + "p_i=2.4*10**19; #in columbs\n", + "n_i=2.4*10**19; #in columbs\n", + "E=V/l;\n", + "v_n=E*u_n;\n", + "v_p=E*u_p;\n", + "J_n=n_i*q_n*v_n;\n", + "J_p=p_i*q_p*v_p;\n", + "J=J_n+J_p;\n", + "print\"Electron velocity :vn is \",v_n,\"m/s\"; #result\n", + "print\"Hole velocity :vp is \",v_p/1000,\"km/s\"; #result\n", + "print\"Current density : Jn \",J,\"A/m^2\"; #result\n", + "A=88*10**-6;\n", + "I_T=J*A;\n", + "print\"Total current :I_T is\",round(I_T*1000,4),\"mA\"; #result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron velocity :vn is 168.0 m/s\n", + "Hole velocity :vp is 0.06 km/s\n", + "Current density : Jn 875.52 A/m^2\n", + "Total current :I_T is 77.0458 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4,Page number 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n_i=2*10**17; #electron/m*m*m\n", + "p=5.7*10**20; #holes/m*m*m\n", + "u_n=0.14; #in m*m/V*s\n", + "u_p=0.05; #in m*m/V*s\n", + "q_n=1.6*10**-19; #in Columbs\n", + "q_p=1.6*10**-19; #in Columbs\n", + "n=(n_i)**2/p;\n", + "print\"Electron :n is \",\"{0:.3e}\".format(n),\"electrons \"; #result\n", + "n=7*10**13\n", + "P=(n*u_n*q_n)+(p*u_p*q_p);\n", + "print\"Conductivity :P is \",round(P,4),\"S/m \"; #result\n", + "# answer misprinted\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electron :n is 7.018e+13 electrons \n", + "Conductivity :P is 4.56 S/m \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5,Page number 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "NA=10**22; #acceptors/m*m*m\n", + "ND=1.2*10**21; #donors/m*m*m\n", + "T=298; #in Kelvin\n", + "k=1.38*10**-23; #Boltzman Constant in J/K\n", + "q=1.6*10**-19; #charge of electron in C\n", + "Vt=k*T/q; #thermal voltage in V\n", + "print\" VT is \",Vt*1000,\"mV\"; #result\n", + "n_i=2.4*10**17; #carrier/m**3 for silicon \n", + "VB=Vt*log(NA*ND/n_i**2); #barrier voltage in V\n", + "print\" Barrier Voltage of Silicon VB is \",round(VB*1000,4),\"mV\"; #result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " VT is 25.7025 mV\n", + " Barrier Voltage of Silicon VB is 492.3224 mV\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6,Page number 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Is=0.12; #in pAmp\n", + "V=0.6; #in V\n", + "T=293; #in Kelvin\n", + "k=1.38*10**-23; #Boltzmann's Constant in J/K\n", + "q=1.6*10**-19; # charge of electron in C\n", + "Vt=k*T/q; #thermal voltage\n", + "print\"VT(20 deg Cel) is \",round(Vt,4),\"V\"; #result in book is misprint\n", + "T1=373; #in Kelvin\n", + "n=1.25;\n", + "Vt1=k*T1/q; #thermal voltage\n", + "print\"VT(100 deg Cel) is \",round(Vt1,4),\"V\";\n", + "I=Is*(math.e**(V/(n*Vt1))-1); #forward biasing current in mircoA\n", + "print\"I(100 deg Cel) is \",round(I/10**6,4),\"microampere\"; #result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VT(20 deg Cel) is 0.0253 V\n", + "VT(100 deg Cel) is 0.0322 V\n", + "I(100 deg Cel) is 0.3622 microampere\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7,Page number 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Is=100; #in nAmp \n", + "Ts=100; #in Kelvin\n", + "I_s=Is*10**-9*2**(Ts/10); #I_s will be in nm \n", + "print\" I(100 deg Cel) is \",I_s*10**6,\"microampere\"; #converted to microA from nm\n", + "# wrong calculation in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " I(100 deg Cel) is 102.4 microampere\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8,Page number 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Br_Si=1.79*10**-15; #Recombination coefficient for Si\n", + "Br_Ge=5.25*10**-14; #Recombination coefficient for Ge\n", + "Br_GeAs=7.21*10**-10; #Recombination coefficient for GeAs\n", + "Br_InAs=8.5*10**-11; #Recombination coefficient for InAs\n", + "P_N=2*10**20; #per cubic cm\n", + "\n", + "T_Ge=1/Br_Ge/P_N; #radiative minority carrier lifetime\n", + "print\"T_Ge is \",round(T_Ge/10**-6,4),\"micro-s\"; #result\n", + "\n", + "T_Si=1/Br_Si/P_N; #radiative minority carrier lifetime\n", + "print\"T_Si is \",round(T_Si/10**-6,4),\"micro-s\"; #result\n", + "\n", + "T_InAs=1/Br_InAs/P_N; #radiative minority carrier lifetime\n", + "print\"T_InAs is \",round(T_InAs/10**-12,4),\"ps\"; #result\n", + "\n", + "T_GeAs=1/Br_GeAs/P_N; #radiative minority carrier lifetime\n", + "print\"T_GeAs is \",round(T_GeAs/10**-12,4),\"ps\"; #result\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T_Ge is 0.0952 micro-s\n", + "T_Si is 2.7933 micro-s\n", + "T_InAs is 58.8235 ps\n", + "T_GeAs is 6.9348 ps\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb new file mode 100644 index 00000000..64ed52f4 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter3.ipynb @@ -0,0 +1,359 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:a21e16171dbf63c7ecd113809cbf95f48b678483e5d0f4506fd5f7c0d330d29a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Optical Sources" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1,Page number 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Pin=1; #microW\n", + "W=15; #in degree\n", + "NA=math.sin(W*math.pi/180);\n", + "NAA=0.26; #NA=0.2588190 which is rounded off\n", + "C_c=(NAA)**2;\n", + "print\"Coupling coefficient is \",C_c;\n", + "Pf=C_c*Pin;\n", + "print\"Power coupled into fiber \",Pf*1000,\"nW\\n\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coupling coefficient is 0.0676\n", + "Power coupled into fiber 67.6 nW\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2,Page number 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n=0.02; #in percentage\n", + "W=20; #in degree\n", + "Vf=1.5; #in Volts\n", + "If=20; #in mAmps\n", + "Pin=If*Vf;\n", + "print\"Power coupled into fiber ,Pin = \",Pin,\"mW\";\n", + "\n", + "Po=n*Pin;\n", + "print\"Output Power of the optical source is \",Po,\"mW\";\n", + "\n", + "#from nc=20 degree\n", + "C_c=(math.sin(W*math.pi/180))**2;\n", + "Pf=C_c*Po\n", + "print\"Optical power coupled into fibre is ,Pf = \",round(Pf*1000,4),\"microW\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power coupled into fiber ,Pin = 30.0 mW\n", + "Output Power of the optical source is 0.6 mW\n", + "Optical power coupled into fibre is ,Pf = 70.1867 microW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3,Page number 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "tr=10; #in nsec\n", + "BW=0.35/tr/10**-9;\n", + "print\" Maximum operating bandwidth is \",BW/10**6,\"MHz\\n\"; #divided by 10**6 to convert answer in MHz\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum operating bandwidth is 35.0 MHz\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4,Page number 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "T=1; #Air\n", + "NA=0.3;\n", + "n0=1;\n", + "#x=y;\n", + "print\"for step index :A=infinite\";\n", + "#for infinite alpha\n", + "#nc=T*(NA/n0)^2*(x/y)^2*(A/(A+2))\n", + "nc=T*(NA/n0)**2*(1)**2*1; # A/(A+2)=1 for A=infinite\n", + "\n", + "print\"Coupling Coefficient,nc = \",nc*100,\"percent\";\n", + "\n", + "print\"for graded index :A=2\";\n", + "A=2;\n", + "#n_c=(T*(NA/n0)^2*(A+(1-(y/x)^2))/(A+2))\n", + "n_c=(T*(NA/n0)**2*(A+(1-(1)**2))/(A+2)) #x/y=1\n", + "print\"Coupling Coefficient,nc = \",n_c*100,\"percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for step index :A=infinite\n", + "Coupling Coefficient,nc = 9.0 percent\n", + "for graded index :A=2\n", + "Coupling Coefficient,nc = 4.5 percent\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5,Page number 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "T=1; #Air\n", + "NA=0.3;\n", + "n0=1;\n", + "A=2;\n", + "#y=0.75x;\n", + "print\"for step index :\";\n", + "#for infinite alpha\n", + "#nc=T*(NA/n0)^2*(x/y)^2*(A/(A+2))\n", + "nc=T*(NA/n0)**2*(1/0.75)**2*A/(A+2); #y/x=0.75\n", + "print\"Coupling Coefficient,nc = \",nc*100,\"percent\";\n", + "\n", + "print\"for graded index :A=2\";\n", + "A=2;\n", + "#n_c=(T*(NA/n0)^2*(A+(1-(y/x)^2))/(A+2))\n", + "n_c=(T*(NA/n0)**2*(A+(1-(0.75)**2))/(A+2)) #y/x=0.75\n", + "print\"Coupling Coefficient,nc = \",round(n_c*100,4),\"percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for step index :\n", + "Coupling Coefficient,nc = 8.0 percent\n", + "for graded index :A=2\n", + "Coupling Coefficient,nc = 5.4844 percent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6,Page number 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#calculate Tf\n", + "If=85; #in mAmps\n", + "Vf=2.5; #in Volts\n", + "Ta=25; #in deg C\n", + "\n", + "#calculate Tj\n", + "W=150; #in C/W for hermetric led\n", + "Pd=If*Vf;\n", + "Tj=Ta+W*Pd/1000;\n", + "print\"Value of Tj is \",Tj,\"deg C\";\n", + "\n", + "TF=8.01*10**12*math.e**-(8111/(Tj+273));\n", + "print\"Value of TF is \",round(TF,4),\"deg C\";\n", + "\n", + "#calculate RF\n", + "BF=6.5*10**-4; #from table\n", + "QF=0.5; #from table\n", + "EF=1; #from table\n", + "RF=BF*TF*EF*QF*1/10**6;\n", + "print\"Value of RF\",\"{0:.3e}\".format(RF);\n", + "print\"Value of MTBF is \",\"{0:.3e}\".format(1/RF),\"hours\";\n", + "\n", + "#Answer in book is misprint in last line" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Tj is 56.875 deg C\n", + "Value of TF is 167.9406 deg C\n", + "Value of RF 5.458e-08\n", + "Value of MTBF is 1.832e+07 hours\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7,Page number 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#calculate Tf\n", + "If=120; #in mAmps\n", + "Vf=1.8; #in Volts\n", + "Ta=80; #in deg C\n", + "#calculate Tj\n", + "W=150; #in C/W for hermetric led\n", + "Pd=0.5*If*Vf;\n", + "Tj=75+W*Pd/1000;\n", + "print\"Value of Tj is \",Tj,\"degree cel\";\n", + "TF=8.01*10**12 *math.e**-(8111/(Tj+273));\n", + "print\"Value of TF is \",round(TF,4);\n", + "#calculate RF\n", + "BF=6.5*10**-4; #from table\n", + "QF=0.2; #from table\n", + "EF=0.75; #from table\n", + "RF=BF*TF*EF*QF*1/10**6;\n", + "print\"Value of RF is \",\"{0:.3e}\".format(RF);\n", + "print\"Value of MTBF is \",\"{0:.3e}\".format(1/RF),\"hours\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Tj is 91.2 degree cel\n", + "Value of TF is 1704.4223\n", + "Value of RF is 1.662e-07\n", + "Value of MTBF is 6.018e+06 hours\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb new file mode 100644 index 00000000..dba61ec2 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter4.ipynb @@ -0,0 +1,158 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:917822aee3e6229a07a87d63057673511f871c7eaa92b0a4cf62ab72d96f74ad" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Optical Detectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1,Page number 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tn=5; #in micrometer\n", + "Vs=10**7; #in m/s\n", + "tr=Tn*10**-6/Vs;\n", + "print\"Response time\",tr/10**-12,\"ps\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Response time 0.5 ps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2,Page number 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "\n", + "Pd=1.15; #in mW\n", + "\n", + "TA=25; #in deg C\n", + "theta_JA=200; #in C/W for hermetric led\n", + "TJ=TA+theta_JA*Pd/10**3;\n", + "TF=8.01*10**12 *math.e**-(8111/(TJ+273));\n", + "print\"Value of TJ is\" ,round(TJ,4), \"deg C\";\n", + "print\"Value of TF is\" ,round(TF,4), \"deg C\";\n", + "\n", + "BF=1.1*10**-3; #from table\n", + "QF=0.5; #from table\n", + "EF=1; #from table\n", + "RF=BF*TF*EF*QF*1/10**6;\n", + "print\"Value of RF\",\"{0:.3e}\".format(RF);\n", + "print\"Value of MTBF is \",\"{0:.3e}\".format(1/RF),\"hours\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of TJ is 25.23 deg C\n", + "Value of TF is 12.3614 deg C\n", + "Value of RF 6.799e-09\n", + "Value of MTBF is 1.471e+08 hours\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3,Page number 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R1=0.7;\n", + "R2=0.99;\n", + "ad=0.1;\n", + "\n", + "Ld=1-R1*R2*math.e**-(2*ad);\n", + "print\"Decay Loss \",round(Ld,4);\n", + "trt=40; #fs\n", + "tph=trt/Ld;\n", + "print\"Photon lifetime \",round(tph,4),\"fs\";\n", + "BW=1/tph;\n", + "print\"Bandwidth\",round(BW*1000,4) ,\"Thz\"; #Answer in Thz \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decay Loss 0.4326\n", + "Photon lifetime 92.46 fs\n", + "Bandwidth 10.8155 Thz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb new file mode 100644 index 00000000..e4907e1d --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:a2b560d73b954e9a1c7f8ed18b2499b5355c9c4b506d0daba4c1031f93d49041" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Optical Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1,Page number 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vrms=0.3; #in V\n", + "CF=0.75; #in V/mW\n", + "Pi=Vrms/CF; \n", + "print\" input power \",round(Pi,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " input power 0.4 mW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2,Page number 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Di=155; #in Mb/s\n", + "sl=10**-3*Di*10**6; #in bitstream\n", + "#PRBS=2**x-1=sl;\n", + "x=log(sl+1)/log(2); #equation is made to pick value of x\n", + "print\" PRBS =(2^\",int(x),\")-1\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " PRBS =(2^ 17 )-1\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb new file mode 100644 index 00000000..8c36c1a8 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter6.ipynb @@ -0,0 +1,863 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:152e45c1d8d33d29c6debea3c4771c5b70cbdc4dcf4a52d01f76557381e831da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Optical Transmittor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1,Page number 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given\n", + "\n", + "Tj=125; #in degree celsius\n", + "Tamp=60; #n degree celsius\n", + "Pt=1.8; #in W\n", + "RthJ_a =34; #in k/w(Assumption)\n", + "Rth=(Tj-Tamp)/Pt;\n", + "print\"Rth =\",round(Rth,4),\"K/W\";\n", + "if Rth>RthJ_a:\n", + " print\"No Heat sink is required\";\n", + "else:\n", + " print\"Yes,Heat sink is required\"; \n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rth = 36.1111 K/W\n", + "No Heat sink is required\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2,Page number 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given\n", + "\n", + "Tj=120; #in degree celsius\n", + "Tamp=80; #in degree celsius\n", + "Pt=2.1; #in W \n", + "RthJ_a =34; #in k/w(Assumption)\n", + "Rth=(Tj-Tamp)/Pt;\n", + "print\"Rth =\",round(Rth,4),\"K/W\";\n", + "if Rth>RthJ_a:\n", + " print\"No Heat sink is required\";\n", + "else:\n", + " print\"Yes,Heat sink is required\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rth = 19.0476 K/W\n", + "Yes,Heat sink is required\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3,Page number 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#data insufficient\n", + "Rth=17.70; # Rth assumed minimum\n", + "Rthc_H=0.65; #k/w\n", + "Rthj_a=33.0; #k/w\n", + "Rthj_c=3; #k/w\n", + "RthH_a=1/(1/Rth-1/Rthj_a)-Rthj_c-Rthc_H;\n", + "print\"RthH-a <=\",round(RthH_a,4),\"K/W\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RthH-a <= 34.5265 K/W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4,Page number 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Vcc=5; #in volt\n", + "Icc=24; #in mA\n", + "Vset=0.65; #in volt\n", + "Vf=1.5; #in volt\n", + "IMOD=15; #in mA\n", + "TA=25; #in degree celsius\n", + "Pdynamic=(Vcc-Vf-Vset)*Icc;\n", + "print\"Power dissipation under dynamic condition\",Pdynamic,\"mW\";\n", + "Pstatic=(Vcc*Icc);\n", + "print\"power dissipation under static condition\",Pstatic,\"mW\";\n", + "PD=Pdynamic+Pstatic;\n", + "print\"total power dissipation\",PD,\"mW\";\n", + "#Tj=TA+PD*wj_a;\n", + "TA=25; #in degree cel\n", + "wj_a=84; #degree cel/w\n", + "PD=188.4; #mW\n", + "Tj=TA+PD*10**-3*wj_a;\n", + "print\"Temp. of junction temp\",Tj,\"degree C\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipation under dynamic condition 68.4 mW\n", + "power dissipation under static condition 120 mW\n", + "total power dissipation 188.4 mW\n", + "Temp. of junction temp 40.8256 degree C\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5,Page number 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ifon=120.0; #in mA\n", + "Vcc=5; #in V\n", + "Vfon=2; #in V\n", + "R3=(Vcc-Vfon)/Ifon/10**-3 +3.2*(Vcc-Vfon-1.4)/Ifon/10**-3;\n", + "print\" R3=\",round(R3,4),\"ohm\";\n", + "\n", + "R0=(R3-32)/3.2;\n", + "print\" R0=\",round(R0,4),\"ohm\";\n", + "\n", + "R1=(R0+10)/2;\n", + "print\" R1=\",round(R1,1),\"ohm\";\n", + "R2=R1-10;\n", + "print\" R2=\",round(R2,1),\"ohm\";\n", + "C1=2*10**-9/R1;\n", + "print\" C1=\",round(C1*10**12,4),\"pF\"; \n", + "\n", + "#answer in book is approximately written\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " R3= 67.6667 ohm\n", + " R0= 11.1458 ohm\n", + " R1= 10.6 ohm\n", + " R2= 0.6 ohm\n", + " C1= 189.1626 pF\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6,Page number 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Impd1=250; #in microA\n", + "Impd0=25; #in microA\n", + "Iref=(1./16)*Impd1*10**-6;\n", + "print\" Reference current is\",Iref*10**6,\"microA\";\n", + "Rref=1.5/Iref;\n", + "print\" External bias resistor value Rref1 is\",Rref/1000,\"kohm\";\n", + "\n", + "Rref1=24.0/Impd1/10**-6;\n", + "print\" Also,Rref1=24/Impd \\n External bias resistor value is\",Rref1/1000,\"kohm\";\n", + "Irefz=(1./4)*Impd0;\n", + "print\" Ref0 current is\",Irefz,\"microA\";\n", + "Rrefz=1.5/Irefz/10**-6;\n", + "print\" External bias resistor value Rrefz is\",Rrefz/1000,\"kohm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Reference current is 15.625 microA\n", + " External bias resistor value Rref1 is 96.0 kohm\n", + " Also,Rref1=24/Impd \n", + " External bias resistor value is 96.0 kohm\n", + " Ref0 current is 6.25 microA\n", + " External bias resistor value Rrefz is 240.0 kohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7,Page number 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R=400; #in mA\n", + "nEO=25; #in mW\n", + "n_laser=nEO*10**-3*R*10**-3;\n", + "print\"n_laser =\",n_laser;\n", + "Tone=(40*10**-12)*(80*10**3)/n_laser;\n", + "print\"Tone =\",Tone*10**6,\"micros\";\n", + "BWone=1./(2*math.pi*Tone);\n", + "print\"BWone =\",round(BWone,4),\"Hz \";\n", + "Tzero=(40*10**-12)*80*10**3/n_laser;\n", + "BWzero=1.0/2/math.pi/Tzero; #Hz\n", + "print\"BWzero =\",round(BWzero,4),\"Hz\";\n", + "\n", + "#answer misprinted\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n_laser = 0.01\n", + "Tone = 320.0 micros\n", + "BWone = 497.3592 Hz \n", + "BWzero = 497.3592 Hz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8,Page number 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "iol =5; #in mA\n", + "ioh=80; #bias current in mA\n", + "ralarmH=(1.5*1500)/ioh/10**-3;\n", + "print\" Alarm resistor RalarmH is\",ralarmH/1000,\"kOhm\";\n", + "ralarmL=(1.5*300)/iol/10**-3;\n", + "print\" Alarm resistor RalarmL is\",ralarmL/1000,\"kOhm\";\n", + "ialarmh=80*10**-3;\n", + "ialarmH=ioh*10**-3/1500;\n", + "print\" Alarm current IalarmH is\",round(ialarmH*10**6,4),\"microA\"; #unit of anwer misprinted in book\n", + "ialarml=5*10**-3;\n", + "ialarmL=iol*10**-3/300;\n", + "print\" Alarm current IalarmL is\",round(ialarmL*10**6,4),\"microA\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Alarm resistor RalarmH is 28.125 kOhm\n", + " Alarm resistor RalarmL is 90.0 kOhm\n", + " Alarm current IalarmH is 53.3333 microA\n", + " Alarm current IalarmL is 16.6667 microA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9,Page number 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Ibias=15.; #in mA assumption\n", + "Ild=35.; #in mA\n", + "Rld=50.; #in ohm\n", + "Ildi=100.; #in mA\n", + "Ilde=50.; #in mA\n", + "Imod=(Ildi+Ilde)/Ildi*35; #mA\n", + "print\"Total modulation current is \\nImod=\",round(Imod,4),\"mA\";\n", + "Ildq=1.2/100*10**3; #in mA \n", + "print\"The current complementary output is Ildq=\",round(Ildq,4),\"mA\";\n", + "Vld=-1.2-Rld*(Ibias+Ild)*10**-3; #optical high\n", + "print\"The laser voltage for optical high is Vld=\",round(Vld,4),\"V\";\n", + "Vld=-1.2-Rld*(Ibias)*10**-3; #optical dark\n", + "print\"The laser voltage for optical dark is Vld=\",round(Vld,4),\"V\";\n", + "Vldq=-Ild*10**-3*Rld;\n", + "print\"The laser voltage at complimentary o/p is Vldq=\",round(Vldq,4),\"V\";\n", + "Rchock=5; #in Ohm\n", + "Vchock=-Rchock*Ibias*10**-3;\n", + "print\"Vchock=\",round(Vchock,4),\"V\";\n", + "Vbias=0.5*(-3.7+Vld)+Vchock;\n", + "print\"Vbias=\",round(Vbias,4),\"V\";\n", + "\n", + "#(i) Pdvee1\n", + "Pdvcc=5*2.5; #in mW\n", + "print\"Pdvcc=\",round(Pdvcc,4),\"mW\";\n", + "Pdvee1=4.5*80; #in mW\n", + "print\"Pdvee1=\",round(Pdvee1,4),\"mW\";\n", + "\n", + "#(ii) Pdvee2\n", + "Pdvee2=6*160; #in mW\n", + "print\"Pdvee2=\",Pdvee2,\"mW\";\n", + "\n", + "#(iii) PdLD\n", + "PdLD=0.5*(3.75*50); #in mW\n", + "print\"PdLD=\",round(PdLD,4),\"mW\";\n", + "\n", + "#(iv) PdLQ\n", + "PdLDQ=0.5*abs(Vld)*50; #in mW\n", + "print\"PdLDQ=\",round(PdLDQ,4),\"mW\";\n", + "\n", + "#(v) PdLDQ\n", + "Pdbias=abs(Vbias)*Ibias; #in mW\n", + "print\"Pdbias=\",round(Pdbias,4),\"mW\";\n", + "\n", + "#PT\n", + "PT=Pdvcc+Pdvee1+Pdvee2-(PdLD+PdLDQ+Pdbias);\n", + "print\"Total power dissipation (PT)=\",round(PT,4),\"mW\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total modulation current is \n", + "Imod= 52.5 mA\n", + "The current complementary output is Ildq= 12.0 mA\n", + "The laser voltage for optical high is Vld= -3.7 V\n", + "The laser voltage for optical dark is Vld= -1.95 V\n", + "The laser voltage at complimentary o/p is Vldq= -1.75 V\n", + "Vchock= -0.075 V\n", + "Vbias= -2.9 V\n", + "Pdvcc= 12.5 mW\n", + "Pdvee1= 360.0 mW\n", + "Pdvee2= 960 mW\n", + "PdLD= 93.75 mW\n", + "PdLDQ= 48.75 mW\n", + "Pdbias= 43.5 mW\n", + "Total power dissipation (PT)= 1146.5 mW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10,Page number 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "vcc=-5; #in v\n", + "imod=35; #in mA\n", + "ibias=18; #in mA\n", + "vbias=-2; #in v\n", + "vout=2; #in v\n", + "tj=30; #degree cel\n", + "icc=140; #in mA\n", + "Pt=(-vcc*icc*10**-3)+(-vcc-vout)*imod*10**-3+(-vcc+vbias)*ibias*10**-3;\n", + "print\"Pt=\",Pt*1000,\"mW\";\n", + "Tj=30; #in degree\n", + "Tj_a=Tj*Pt;\n", + "Tcase=125-Tj_a; #in degree\n", + "print\"Tcase(max)=\",Tcase,\"degree Cel\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pt= 859.0 mW\n", + "Tcase(max)= 99.23 degree Cel\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11,Page number 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "z11=49.95; #in ohm\n", + "z12=0.15; #in ohm\n", + "z21=0.15; #in ohm\n", + "z22=49.95; #in ohm\n", + "zdiff=2*(z11-z12);\n", + "print\"Zdiff=\",zdiff,\"ohm\"; #answer misprinted\n", + "zcm=z11+z12;\n", + "print\"Zcm=\",zcm,\"ohm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Zdiff= 99.6 ohm\n", + "Zcm= 50.1 ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12,Page number 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "z11=65.4; #in ohm\n", + "z12=8.2; #in ohm\n", + "z21=8.2; #in ohm\n", + "z22=65.4; #in ohm\n", + "zdiff=2*(z11-z12);\n", + "print\" Zdiff=\",zdiff,\"ohm\"; \n", + "zcm=z11+z12;\n", + "print\" Zcm=\",zcm,\"ohm\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Zdiff= 114.4 ohm\n", + " Zcm= 73.6 ohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13,Page number 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=50; #in mV\n", + "di=3; #in Amp\n", + "Lcable=15; #in nH\n", + "fL=dV*10**-3/di/2/math.pi/Lcable/10**-9;\n", + "print\"fLcable =\",round(fL/1000,4),\"kHz\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fLcable = 176.8388 kHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14,Page number 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=50; #in mV\n", + "di=4; #in Amp\n", + "fL=120; #in kHz\n", + "Lcable=dV*10**-3/di/2/math.pi/fL/10**3;\n", + "print\"The maximum allowed parasitic cable inductance (Lcable) must not exceed\",round(Lcable*10**9,4),\"nH\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum allowed parasitic cable inductance (Lcable) must not exceed 16.5786 nH\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15,Page number 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=40; #in mV\n", + "di=2.5; #in Amp\n", + "Lbypas=0.5; #in nH\n", + "fL=dV*10**-3/di/2/math.pi/Lbypas/10**-9;\n", + "print\"fHnoise =\",round(fL/10**6,4),\"MHz\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fHnoise = 5.093 MHz\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16,Page number 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=50; #in mV\n", + "di=2.5; #in Amp\n", + "Cbypas=220; #in microF\n", + "fL=di/(dV*10**-3*2*math.pi*Cbypas*10**-6);\n", + "print\"fLnoise =\",round(fL/1000,4),\"kHz\"; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fLnoise = 36.1716 kHz\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17,Page number 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=50; #in mV\n", + "di=4; #in Amp\n", + "Cbypas=200; #in microF\n", + "Lbypas=0.2; #in nH\n", + "fL=di/(dV*10**-3*2*math.pi*Cbypas*10**-6);\n", + "print\"fLnoise =\",round(fL/1000,4),\"kHz\"; #Result misprinted\n", + "fH=dV*10**-3/di/2/math.pi/Lbypas/10**-9;\n", + "print\"fHnoise =\",round(fH/10**6,4),\"MHz \"; \n", + "Bw=fH-fL;\n", + "print\"Bwnoise =\",round(Bw/10**6,4),\"MHZ\"; #Result miscalculated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fLnoise = 63.662 kHz\n", + "fHnoise = 9.9472 MHz \n", + "Bwnoise = 9.8835 MHZ\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18,Page number 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=40; #in mV\n", + "di=3; #in Amp\n", + "LT=0.05; #in nH\n", + "fH=dV*10**-3/di/2/math.pi/LT/10**-9;\n", + "print\"fCdecoupling(high) =\",round(fH/10**6,4),\"MHz\"; #Result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fCdecoupling(high) = 42.4413 MHz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19,Page number 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "dV=45; #in mV\n", + "di=2.5; #in Amp\n", + "CT=2.2; #in microF\n", + "LT=0.05; #in nH\n", + "fCL=di/(dV*10**-3*2*math.pi*CT*10**-6);\n", + "print\"fLnoise =\",round(fCL/10**6,4),\"MHz\"; #Result \n", + "fCH=42.3; #in MHz taken from last question i.e. 6.18 \n", + "print\"\",round(fCL/10**6,4),\"MHz <=B.W.noise <=\",round(fCH,4),\"MHZ\"; #Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fLnoise = 4.0191 MHz\n", + " 4.0191 MHz <=B.W.noise <= 42.3 MHZ\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb new file mode 100644 index 00000000..479e2614 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter7.ipynb @@ -0,0 +1,153 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:1b3bccb158ee256beb585d7bc83d58f136101130ff5bd5cf10f287a99cb3d68f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Optical Receivers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1,Page number 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Trec=54; #in ns\n", + "Ttrans=40.0; #in ns\n", + "Pwd=(Trec-Ttrans)/Ttrans*100;\n", + "\n", + "print\"PWD=\",Pwd,\"percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "PWD= 35.0 percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2,Page number 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "#Vc=Vdin-Vdinq\n", + "Vc=5; #in mV Vdin-Vdinq=Vc\n", + "Irset =1.8*10**-3*(Vc*10**-3); #in A\n", + "print\"Irset\",Irset*10**6,\"microA\";\n", + "Vs=1.5; #Voltage at signal level below Vcc in V\n", + "Radj=Vs/Irset; #in Ohm\n", + "print\"Radj\",round(Radj*10**-3,4),\"kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Irset 9.0 microA\n", + "Radj 166.6667 kohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3,Page number 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Rl=50; #in Ohm\n", + "Ro=100; #in Ohm\n", + "Vos=450; #in mV\n", + "Vref=(Rl+Ro)/Rl*Vos/2;\n", + "\n", + "print\"Vref= \",Vref,\"mV\";\n", + "\n", + "Vee=3.3; #in V\n", + "R1=500; #in Ohm\n", + "R2=16000.0; #in Ohm\n", + "\n", + "#Rref=(Vee/Vref/10**3-1)*R1/(1-(R1/R2*(Vee/Vref/10**3-1)))\n", + "Rref=(((Vee/Vref)/(10**-3)-1)*R1)/((1-(R1/R2)*((Vee/Vref)/(10**-3)-1)));\n", + "print\"Rref= \",round(Rref,4),\"ohm\";\n", + "print\"Approx. Rref= \",round(Rref*10**-3,4),\"kohm\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vref= 675 mV\n", + "Rref= 2213.4387 ohm\n", + "Approx. Rref= 2.2134 kohm\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb new file mode 100644 index 00000000..60af9521 --- /dev/null +++ b/Fiber_Optics_Communication_by_H._Kolimbiris/chapter9.ipynb @@ -0,0 +1,1183 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:138b029b8ff59d97d7edbcf3cb7bd4c29e7dbaeb632610143bd46dceac00211b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Optical Fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1,Page number 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n2=1.35; #refractive index\n", + "n1=1.4; #refractive index\n", + "Wo=math.degrees(math.asin(n2/n1)); #in radians\n", + "print\"Critical Angle,Wo =\",round(Wo,4),\"degree\";\n", + "NA=sqrt(n1**2-n2**2);\n", + "print\"Numerical Aperture,NA =\",round(NA,4);\n", + "Wa=math.degrees(math.asin(NA)); #in radians\n", + "print\"Angle of acceptance,Wa =\",round(Wa,4),\"degree\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical Angle,Wo = 74.6411 degree\n", + "Numerical Aperture,NA = 0.3708\n", + "Angle of acceptance,Wa = 21.7656 degree\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2,Page number 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Po=8; #in mW\n", + "Pi=50.; #in mW\n", + "l=15; #in km\n", + "TA=-10*math.log10(Po/Pi);\n", + "print\"Total fibre Attenuation,L =\",round(TA,4),\"dB/\",l,\"km\";\n", + "Alpha=TA/l; \n", + "print\"Alpha is =\",round(Alpha,4),\"dB/km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total fibre Attenuation,L = 7.9588 dB/ 15 km\n", + "Alpha is = 0.5306 dB/km\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3,Page number 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Po=10.; #in mW\n", + "Pi=150; #in mW\n", + "Alpha=0.8; #in dB/km\n", + "TA=-10*math.log10(Po/Pi);\n", + "print\" Total fibre Attenuation,L =\",round(TA,4),\"dB\";\n", + "l=TA/Alpha;\n", + "print\" maximum length is,l =\",round(l,4),\"km\";\n", + "\n", + "#Round off Variations appear" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total fibre Attenuation,L = 11.7609 dB\n", + " maximum length is,l = 14.7011 km\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4,Page number 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "B=92*10**-12; #in m**2/N\n", + "Tf=1550; #in K\n", + "n=1.46; #refractive index\n", + "p=0.29;\n", + "K=1.38*10**-23; #in J/K\n", + "l=1; #in km\n", + "L1=630; #in nm\n", + "L2=1330; #in nm\n", + "L3=1550; #in nm\n", + "print\"Rayleight scattering coefficient\";\n", + "Y1=8*math.pi**3*n**8*p**2*B*K*Tf/3/(L1*10**-9)**4;\n", + "Y2=8*math.pi**3*n**8*p**2*B*K*Tf/3/(L2*10**-9)**4;\n", + "Y3=8*math.pi**3*n**8*p**2*B*K*Tf/3/(L3*10**-9)**4; \n", + "print\"for L1= 630nm, is\",\"{0:.3e}\".format(Y1);\n", + "print\"for L2= 1330nm, is\",\"{0:.3e}\".format(Y2);\n", + "print\"for L3= 1550nm, is\",\"{0:.3e}\".format(Y3);\n", + "#Misprinted answer\n", + "\n", + "print\"Rayleight scattering attenuation factor\";\n", + "Fr1=math.e**-(Y1*l*10**3);\n", + "Fr2=math.e**-(Y2*l*10**3);\n", + "Fr3=math.e**-(Y3*l*10**3);\n", + "print\"for Y1= 0.00179 is\",round(Fr1,4);\n", + "print\"for Y2= 0.00009 is\",round(Fr2,4);\n", + "print\"for Y3= 0.0000182 is\",round(Fr3,4);\n", + "\n", + "\n", + "print\"Rayleight scattering attenuation\";\n", + "Ar1=10*math.log10(Fr1**-1);\n", + "Ar2=10*math.log10(Fr2**-1);\n", + "Ar3=10*math.log10(Fr3**-1);\n", + "print\"for Ar1= 0.17 is\",round(Ar1,4),\"dB/km\";\n", + "print\"for Ar2= 0.91 is\",round(Ar2,4),\"dB/km\";\n", + "print\"for Ar3= 0.98 is\",round(Ar3,4),\"dB/km\";\n", + "#For L3 answers in book are misprinted" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rayleight scattering coefficient\n", + "for L1= 630nm, is 1.793e-03\n", + "for L2= 1330nm, is 9.029e-05\n", + "for L3= 1550nm, is 4.895e-05\n", + "Rayleight scattering attenuation factor\n", + "for Y1= 0.00179 is 0.1664\n", + "for Y2= 0.00009 is 0.9137\n", + "for Y3= 0.0000182 is 0.9522\n", + "Rayleight scattering attenuation\n", + "for Ar1= 0.17 is 7.7886 dB/km\n", + "for Ar2= 0.91 is 0.3921 dB/km\n", + "for Ar3= 0.98 is 0.2126 dB/km\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5,Page number 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=850; #in nm\n", + "L1=0.850; #converted L in micrometer for using in given formula\n", + "A=0.5; #in dB/km\n", + "d=5; #in micrometer\n", + "Bw=1; #in Gz\n", + "Po=4.4*10**-3*A*Bw*L1**2*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.0397 W\n", + "Therefore,Po(Th) = 39.7375 mW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6,Page number 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1330; #in nm\n", + "L1=1.330; #converted L in micrometer for using in given formula\n", + "A=0.5; #in dB/km\n", + "d=5; #in micrometer\n", + "Bw=1; #in Gz\n", + "Po=4.4*10**-3*A*Bw*L1**2*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.0973 W\n", + "Therefore,Po(Th) = 97.2895 mW\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7,Page number 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1550; #in nm\n", + "L1=1.550; #converted L in micrometer for using in given formula\n", + "A=0.5; #in dB/km\n", + "d=5; #in micrometer\n", + "Bw=1; #in Gz\n", + "Po=4.4*10**-3*A*Bw*L1**2*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.1321 W\n", + "Therefore,Po(Th) = 132.1375 mW\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8,Page number 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=850; #in nm\n", + "L1=0.850; #converted L in micrometer for using in given formula\n", + "A=0.5; #in dB/km\n", + "d=8; #in micrometer\n", + "Bw=1; #in Gz\n", + "Po=4.4*10**-3*A*Bw*L1**2*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.1017 W\n", + "Therefore,Po(Th) = 101.728 mW\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9,Page number 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=850; #in nm\n", + "L1=0.850; #converted L in micrometer for using in given formula\n", + "A=0.5; #in dB/km\n", + "d=10; #in micrometer\n", + "Bw=1; #in Gz\n", + "Po=4.4*10**-3*A*Bw*L1**2*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.159 W\n", + "Therefore,Po(Th) = 158.95 mW\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10,Page number 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=850.; #in nm\n", + "L1=L/1000; #converted L in micrometer for using in given formula\n", + "A=0.4; #in dB/km\n", + "d=5; #in micrometer\n", + "Po=5.9*10**-2*A*L1*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.5015 W\n", + "Therefore,Po(Th) = 501.5 mW\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11,Page number 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1330.; #in nm\n", + "L1=L/1000; #converted L in micrometer for using in given formula\n", + "A=0.4; #in dB/km\n", + "d=5; #in micrometer\n", + "Po=5.9*10**-2*A*L1*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\"; #unit in book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.7847 W\n", + "Therefore,Po(Th) = 784.7 mW\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12,Page number 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=1550.; #in nm\n", + "L1=L/1000; #converted L in micrometer for using in given formula\n", + "A=0.4; #in dB/km\n", + "d=5; #in micrometer\n", + "Po=5.9*10**-2*A*L1*d**2;\n", + "print\"Po(Th) =\",round(Po,4),\"W\";\n", + "print\"Therefore,Po(Th) =\",round(Po*1000,4),\"mW\"; #unit in book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Po(Th) = 0.9145 W\n", + "Therefore,Po(Th) = 914.5 mW\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13,Page number 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R=25; #in nm\n", + "R1=25*10**-6; #in m\n", + "L=1000; #in nm\n", + "L1=10**-6; #in m\n", + "NA=0.2; \n", + "V=2*math.pi/L1*R1*NA;\n", + "print\"Normalised frequency(V) =\",round(V,4);\n", + "y=2.; #for parabolic\n", + "Mmax=y/(y+2)*(V**2)/2;\n", + "print\"Maximum number of modes is equal to =\",round(Mmax,4); #answer mistake in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised frequency(V) = 31.4159\n", + "Maximum number of modes is equal to = 246.7401\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14,Page number 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tp=0.25; #in microsec\n", + "fB=0.529/Tp/10**-6; #channel bitrate\n", + "fBw=fB; #channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", + "print\"Maximum operating bandwidth =\",round(fBw*10**-6,4),\"MHz\";\n", + "L=50; #in km\n", + "D=Tp*10**-6/L; #Dispersion\n", + "print\"Dispersion =\",round(D*10**9,4),\"ns/km\";\n", + "fBwL=fBw*10**-6*L; #bandwidth length product\n", + "print\"Bandwidth length product(fBw*L) =\",round(fBwL,4),\"MHz/km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum operating bandwidth = 2.116 MHz\n", + "Dispersion = 5.0 ns/km\n", + "Bandwidth length product(fBw*L) = 105.8 MHz/km\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.15,Page number 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tp=2; #in microsec\n", + "fB=0.529/Tp/10**-6; #channel bit rate\n", + "fBw=fB; #channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", + "print\"Maximum operating bandwidth =\",round(fBw*10**-6,4),\"MHz\";\n", + "L=50; #in km\n", + "D=Tp*10**-6/L; #Dispersion\n", + "print\"Dispersion =\",round(D*10**9,4),\"ns/km\"; #unit in book is wrong\n", + "fBwL=fBw*10**-6*L; #bandwidth length product\n", + "print\"Bandwidth length product(fBw*L) =\",round(fBwL,4),\"MHz/km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum operating bandwidth = 0.2645 MHz\n", + "Dispersion = 40.0 ns/km\n", + "Bandwidth length product(fBw*L) = 13.225 MHz/km\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.16,Page number 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tp=5; #in microsec\n", + "fB=0.529/Tp/10**-6; #channel bitrate\n", + "fBw=fB; #channel bandwidth = channel bitrate when zero ISI and RZ input data is modulated\n", + "print\"Maximum operating bandwidth =\",round(fBw*10**-6,4),\"MHz\";\n", + "L=50; #in km\n", + "D=Tp*10**-6/L; #Dispersion\n", + "print\"Dispersion =\",round(D*10**6,4),\"micro s/km\";\n", + "fBwL=fBw*10**-6*L; #bandwidth length product\n", + "print\"Bandwidth length product(fBw*L) =\",round(fBwL,4),\"MHz/km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum operating bandwidth = 0.1058 MHz\n", + "Dispersion = 0.1 micro s/km\n", + "Bandwidth length product(fBw*L) = 5.29 MHz/km\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17,Page number 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Slw=25; #in nm\n", + "L=850; #in nm given\n", + "c=3*10**5; #in km/s\n", + "ofmd=0.02; #optical fiber material dispersion\n", + "Mdp=1./L/c*ofmd; #answer mismatch due to differnt value chosen for calculation\n", + "print\"Material Dispersion parameter Mdp =\",round(Mdp*10**12,4),\"ps/nm.km\";\n", + "l=1; #in km\n", + "dmd=Slw*l*Mdp; #pulse chirping\n", + "print\"pulse chirping dmd =\",round(dmd*10**9,4),\"ns/km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material Dispersion parameter Mdp = 78.4314 ps/nm.km\n", + "pulse chirping dmd = 1.9608 ns/km\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.18,Page number 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Slw=2; #in nm\n", + "L=850; #in nm given\n", + "c=3*10**5; #in km/s\n", + "ofmd=0.02; #optical fiber material dispersion\n", + "Mdp=1./L/c*ofmd; #answer mismatch due to differnt value chosen for calculation\n", + "print\"Material Dispersion parameter Mdp =\",round(Mdp*10**12,4),\"ps/nm.km\";\n", + "l=1; #in km\n", + "dmd=Slw*l*Mdp; #pulse chirping\n", + "print\"pulse chirping dmd =\",round(dmd*10**9,4),\"ns/km\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material Dispersion parameter Mdp = 78.4314 ps/nm.km\n", + "pulse chirping dmd = 0.1569 ns/km\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.19,Page number 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb1=2.5; #in Gb/s\n", + "D1=20; #in ps/nm.km\n", + "D2=5; #in ps/nm.km\n", + "fb2=D1/D2*fb1; \n", + "print\" fb2 =\",fb2,\"Gb/s\";\n", + "#Values of D1 and D2 are conflicted in question ,however solution is correct " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " fb2 = 10.0 Gb/s\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.20,Page number 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "fb1=2.5; #in Gb/s\n", + "DV1=100; #in GHz\n", + "DV2=50; #in GHz\n", + "fb2=DV1/DV2*fb1;\n", + "print\" fb2 =\",fb2,\"Gb/s\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " fb2 = 5.0 Gb/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.21,Page number 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "L=400; #in km\n", + "dAV=4; #in ps/km\n", + "dTL=L*dAV; #total chromatic dispersion\n", + "print\"dTL =\",round(dTL,4),\"ps/nm.km\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dTL = 1600.0 ps/nm.km\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.22,Page number 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "no=1; #refractive index\n", + "n1=1.35; #refractive index\n", + "Po=((n1-no)/(n1+no))**2; #fresnal reflection\n", + "print\" Po(refl)=\",round(Po,4);\n", + "Lrefl=-10*math.log10(1-Po); #attenuation loss\n", + "print\"L(refl)=\",round(Lrefl,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Po(refl)= 0.0222\n", + "L(refl)= 0.0974 dB\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.23,Page number 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "no=1; #refractive index\n", + "n1=1.55; #refractive index\n", + "Po=((n1-no)/(n1+no))**2; #fresnal reflection\n", + "print\"Fresnel reflective coefficient,Po(refl)=\",round(Po,4);\n", + "Lrefl=-10*log10(1-Po); #attenuation loss\n", + "print\"Attenuation based on Fresnel reflective coefficient,L(refl)=\",round(Lrefl,4),\"dB\";\n", + "Ltot=5*Lrefl;\n", + "print\"Total link attenuation on Fresnel reflections,Ltotal =\",round(Ltot,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fresnel reflective coefficient,Po(refl)= 0.0465\n", + "Attenuation based on Fresnel reflective coefficient,L(refl)= 0.2069 dB\n", + "Total link attenuation on Fresnel reflections,Ltotal = 1.0344 dB\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.24,Page number 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n1=1;\n", + "n2=1.5;\n", + "a=25.; #in micrometer\n", + "y=3.; #in micrometer\n", + "Csim=16*(n1/n2)**2/math.pi/(1+(n1/n2))**4*(2*math.acos(y/2/a)-(y/a)*(1-(y/2/a)**2)**0.5); \n", + "\n", + "#lateral coupling coefficient\n", + "a=2*math.acos(y/2/a)-(y/a)*math.sqrt(1-(y/2./a)**2);\n", + "b=16*(n1/n2)**2/math.pi/(1+(n1/n2))**4;\n", + "print\"Lateral coupling coefficient,Csim=\",round(Csim,4);\n", + "Lsim=-10*math.log10(1-Csim);\n", + "print\"Insertion Loss,Lsim=\",round(Lsim,4),\"dB\";\n", + "#Answer wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lateral coupling coefficient,Csim= 0.8512\n", + "Insertion Loss,Lsim= 8.2751 dB\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.25,Page number 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Alpha=2.;\n", + "a=25.; #in micrometer\n", + "y=2.; #in micrometer\n", + "Cgim=2/math.pi*(y/a)*(Alpha+2)/(Alpha+1); #lateral coupling coefficient\n", + "print\" Csim=\",round(Cgim,4);\n", + "Lgim=-10*math.log10(1-Cgim); #insertion loss\n", + "print\" Insertion Loss,Lgim=\",round(Lgim,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Csim= 0.0679\n", + " Insertion Loss,Lgim= 0.3054 dB\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.26,Page number 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "n1=1.5; #refractive index\n", + "n2=1.5; #refractive index\n", + "W=2.5; #in degree\n", + "NA1=0.3;\n", + "NA2=0.4;\n", + "Csim1=16*(n1/n2)**2/(1+(n1/n2)**4)*(1-n2*W/(180*NA1)); #angular coupling coefficient\n", + "#Answer wrong in book\n", + "print\"Csim=\",round(Csim1,4);\n", + "Lsim1=-10*math.log10(Csim1);\n", + "print\"Insertion Loss,Lsim=\",round(Lsim1,4),\"dB\";\n", + "Csim2=16*(n1/n2)**2/(1+(n1/n2)**4)*(1-n2*W/(180*NA2)); #angular coupling coefficient\n", + "#Answer wrong in book\n", + "print\"Csim=\",round(Csim2,4);\n", + "Lsim2=-10*math.log10(Csim2);\n", + "print\"Insertion Loss,Lsim=\",round(Lsim2,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Csim= 7.4444\n", + "Insertion Loss,Lsim= -8.7183 dB\n", + "Csim= 7.5833\n", + "Insertion Loss,Lsim= -8.7986 dB\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.27,Page number 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "a=4; #in micrometer\n", + "V=2.4;\n", + "aw=1; #in degree\n", + "NA1=0.2;\n", + "n1=1.45; #refractive index\n", + "y=1; #in micrometer\n", + "omega=a*(0.65+1.62*V**-1.5+2.88*V**-6)/math.sqrt(2);\n", + "print\"Normalised spot view (w)=\",round(omega,4),\"micrometer\";\n", + "Lsml=2.17*(y/omega)**2;\n", + "print\"Insertion loss due to lateral,Lsm=\",round(Lsml,4),\"dB\"; #answer is wrong in book \n", + "Lsmg=2.17*(aw*math.pi/180*omega*n1*V/a/NA1)**2;\n", + "print\"Insertion loss due to angular,Lsm=\",round(Lsmg,4),\"dB\";\n", + "\n", + "print\"Total Insertion loss,Lsmtotal=\",round(Lsml+Lsmg,4),\"dB\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalised spot view (w)= 3.1135 micrometer\n", + "Insertion loss due to lateral,Lsm= 0.2239 dB\n", + "Insertion loss due to angular,Lsm= 0.1213 dB\n", + "Total Insertion loss,Lsmtotal= 0.3451 dB\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.28,Page number 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "a1=4.5; #in micrometer\n", + "a2=4; #in micrometer\n", + "V=2.1;\n", + "aw=1; #in degree\n", + "NA=0.2;\n", + "n1=1.45;\n", + "y=1; #in micrometer\n", + "w1=a1*(0.65+1.62*V**-0.5+2.88*V**-6)/math.sqrt(2); #insertion loss\n", + "print\"Wo1=\",round(w1,4);\n", + "w2=a2*(0.65+1.62*V**-0.5+2.88*V**-6)/math.sqrt(2); #insertion loss\n", + "print\"Wo2=\",round(w2,4);\n", + "Lintr=-10*math.log10(4*((w1/w2+w2/w1)**-2)); #toatl insertion loss at joint\n", + "print\"Lintr=\",round(Lintr,4),\"dB\"; #Answer wrong in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wo1= 5.7323\n", + "Wo2= 5.0954\n", + "Lintr= 0.0601 dB\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png new file mode 100644 index 00000000..672f3e73 Binary files /dev/null and b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture1.png differ diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png new file mode 100644 index 00000000..712b80a7 Binary files /dev/null and b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture3.png differ diff --git a/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png new file mode 100644 index 00000000..c20c6261 Binary files /dev/null and b/Fiber_Optics_Communication_by_H._Kolimbiris/screenshots/Capture4.png differ diff --git a/Fluid_Mechanics/screenshots/ch11.png b/Fluid_Mechanics/screenshots/ch11.png new file mode 100755 index 00000000..7f1e98ab Binary files /dev/null and b/Fluid_Mechanics/screenshots/ch11.png differ diff --git a/Fluid_Mechanics/screenshots/ch3.png b/Fluid_Mechanics/screenshots/ch3.png new file mode 100755 index 00000000..1b4c7079 Binary files /dev/null and b/Fluid_Mechanics/screenshots/ch3.png differ diff --git a/Fluid_Mechanics/screenshots/ch5.png b/Fluid_Mechanics/screenshots/ch5.png new file mode 100755 index 00000000..66f3995c Binary files /dev/null and b/Fluid_Mechanics/screenshots/ch5.png 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 new file mode 100644 index 00000000..e1a3562c --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/README.txt @@ -0,0 +1,10 @@ +Contributed By: Adarsh Bhatt +Course: mca +College/Institute/Organization: Inventivesoftech Pvt. Ltd. +Department/Designation: Web developer +Book Title: Fluid Mechanics +Author: A. K. Choudhary and Om Prakash +Publisher: S. K. Kataria & Sons, New Delhi +Year of publication: 2009 +Isbn: 81-85749-65-5 +Edition: 2 \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch11.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch11.ipynb new file mode 100755 index 00000000..ed160101 --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch11.ipynb @@ -0,0 +1,629 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2a190d13b5257d1faa42fcfeeabd3d60753568985b5980f046c77d0ac8fde0a3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Flow Measurement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "staticPHead = 5.;\t\t\t#meter\n", + "stagnationPHead = 6.;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "h = stagnationPHead-staticPHead;\t\t\t#meter\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cv = 0.98;\t\t\t#Coeff of pilot tube\n", + "V = Cv*math.sqrt(2*g*h);\t\t\t#m/s\n", + "\n", + "# Results\n", + "print \"Velocity of flow in m/sec : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow in m/sec : 4.34\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cv = 0.975;\t\t\t#Coeff of pilot tube\n", + "h = 100./1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Sm = 13.6;\t\t\t#Sp. gravity\n", + "S = 0.86;\t\t\t#gravity of turpinre\n", + "\n", + "# Calculations\n", + "V = Cv*math.sqrt(2*g*h*(Sm/S-1));\t\t\t#m/s\n", + "\n", + "# Results\n", + "print \"Velocity in m/sec : %.3f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in m/sec : 5.256\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables :\n", + "l = 2.;\t\t\t#meter\n", + "d0 = 0;\t\t\t#meter\n", + "d1 = 0.3;\t\t\t#meter\n", + "d2 = 1.0;\t\t\t#meter\n", + "d3 = 1.2;\t\t\t#meter\n", + "d4 = 1.6;\t\t\t#meter\n", + "d5 = 2.0;\t\t\t#meter\n", + "d6 = 1.4;\t\t\t#meter\n", + "d7 = 1.0;\t\t\t#meter\n", + "d8 = 0.4;\t\t\t#meter\n", + "d9 = 0.3;\t\t\t#meter\n", + "d10 = 0.2;\t\t\t#meter\n", + "V0 = 0;\t\t\t#meter\n", + "V1 = 0.5;\t\t\t#meter\n", + "V2 = 0.7;\t\t\t#meter\n", + "V3 = 0.8;\t\t\t#meter\n", + "V4 = 1.0;\t\t\t#meter\n", + "V5 = 1.2;\t\t\t#meter\n", + "V6 = 0.9;\t\t\t#meter\n", + "V7 = 0.8;\t\t\t#meter\n", + "V8 = 0.6;\t\t\t#meter\n", + "V9 = 0.5;\t\t\t#meter\n", + "V10 = 0.3;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = l/3*(d0*V0+4*d1*V1+2*d2*V2+4*d3*V3+2*d4*V4+4*d5*V5+2*d6*V6+4*d7*V7+2*d8*V8+4*d9*V9+2*d10*V10+d0*V0);\t\t\t#cum/sec\n", + "\n", + "# Results\n", + "print \"Rate of discharge in cum/sec : \",Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of discharge in cum/sec : 17.04\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.62;\t\t\t#consmath.tant\n", + "H = 0.12;\t\t\t#meter\n", + "L = 0.3;\t\t\t#meter\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "\n", + "# Calculations\n", + "Q = 2./3*Cd*math.sqrt(2*g)*L*H**(3./2);\t\t\t#m**3/s\n", + "\n", + "# Results\n", + "print \"Discharge in m**3/sec : %.4f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in m**3/sec : 0.0228\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.66;\t\t\t#consmath.tant\n", + "H = 0.15;\t\t\t#meter\n", + "L = 0.40;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Q = 2./3*Cd*math.sqrt(2*g)*L*H**(3./2);\t\t\t#m**3/s\n", + "\n", + "# Results\n", + "print \"Discharge in m**3/sec : %.5f\"%Q\n", + "print \"Discharge in litres/sec : %.2f\"%(Q*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in m**3/sec : 0.04529\n", + "Discharge in litres/sec : 45.29\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.62;\t\t\t#consmath.tant\n", + "H = 200./1000;\t\t\t#meter\n", + "theta = 90.;\t\t\t#degree\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "\n", + "# Calculations\n", + "Q = 8./15*Cd*math.sqrt(2*g)*math.tan(math.radians(theta/2))*H**(5./2);\t\t\t#m**3/s\n", + "Q = Q*1000*60;\t\t\t#litres/minute\n", + "\n", + "# Results\n", + "print \"Discharge in litres/minute : %.f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in litres/minute : 1572\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.62;\t\t\t#consmath.tant\n", + "Q = 250;\t\t\t#litres/sec\n", + "Q = Q*10**-3;\t\t\t#m**3/s\n", + "theta = 90;\t\t\t#degree\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 1.3;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "H = (Q/8*15/Cd/math.sqrt(2*g)/math.tan(math.radians(theta/2)))**(2./5);\t\t\t#m\n", + "h = d-H;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Position above the bed in meter : %.3f\"%h\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Position above the bed in meter : 0.807\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.65;\t\t\t#consmath.tant\n", + "A = 220;\t\t\t#m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "l = 30./100;\t\t\t#meter\n", + "H1 = 16.8/100;\t\t\t#meter\n", + "H2 = 6.8/100;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "def f1(h): \n", + "\t return h**(-3./2)\n", + "\n", + "T = A/(2./3*Cd*l*math.sqrt(2*g))* quad(f1,H2,H1)[0]\n", + "\n", + "# Results\n", + "print \"Time taken is \",(math.floor(T/60)),\" minute \",round((T/60-math.floor(T/60))*60),\" sec.\"\n", + "\n", + "# note : answer might be vary because of quad function." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken is 17.0 minute 46.0 sec.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "H = 0.40;\t\t\t#meter\n", + "L = 5;\t\t\t#meter\n", + "print (\"(i) End contractions are Suppressed : \");\n", + "\n", + "# Calculations and Results\n", + "Q = 1.84*L*H**(3./2);\t\t\t#m**3/s\n", + "print \"Discharge in m**3/sec : %.4f\"%Q\n", + "print \"Discharge in litres/sec : %.1f\"%(Q*1000)\n", + "\n", + "print (\"(ii) End contractions are Considered : \");\n", + "n = 2;\n", + "Q = 1.84*(L-0.1*n*H)*H**(3./2);\t\t\t#m**3/s\n", + "print \"Discharge in m**3/sec : %.5f\"%Q\n", + "print \"Discharge in litres/sec : %.2f\"%(Q*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) End contractions are Suppressed : \n", + "Discharge in m**3/sec : 2.3274\n", + "Discharge in litres/sec : 2327.4\n", + "(ii) End contractions are Considered : \n", + "Discharge in m**3/sec : 2.29020\n", + "Discharge in litres/sec : 2290.20\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.62;\t\t\t#Coeff of discharge\n", + "H = 250./1000;\t\t\t#meter\n", + "L = 400./1000;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "g = 9.81;\t\t\t#gravity acceleration\n", + "Q = 2./3*Cd*math.sqrt(2*g)*L*H**(3./2);\t\t\t#m**3/s or cumec\n", + "\n", + "# Results\n", + "print \"Discharge in cumec : %.4f\"%Q\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in cumec : 0.0915\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "B = 1.3;\t\t\t#meter\n", + "H1 = 6-(1.8+1.5);\t\t\t#meter\n", + "H2 = 6-1.5;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = 2./3*Cd*B*math.sqrt(2*g)*(H2**(3./2)-H1**(3./2));\t\t\t#m**3/sec\n", + "\n", + "# Results\n", + "print \"Discharge through the orifice in m**3/sec : %.1f\"%Q\n", + "\n", + "# note : answer is in m**3/sec." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the orifice in m**3/sec : 11.8\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Cd = 0.60;\t\t\t#Coeff of discharge\n", + "L = 36.;\t\t\t#meter\n", + "H = 1.1;\t\t\t#meter\n", + "A = 50.;\t\t\t#m**2\n", + "g = 9.81;\t\t\t#gravity acceleration\n", + "\n", + "# Calculations and Results\n", + "Qmax = 1.705*Cd*L*H**(3./2);\t\t\t#m**3/s\n", + "print \"Maximum Discharge in m**3/sec : %.3f\"%Qmax\n", + "\n", + "Va = Qmax/A;\t\t\t#m/s(velocity of approach)\n", + "Q = 1.705*Cd*L*((H+Va**2/2/g)**(3./2)-(Va**2/2/g)**(3./2));\t\t\t#m**3/s\n", + "print \"New discharge considering velocity of approach in m**3/sec : %.2f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Discharge in m**3/sec : 42.488\n", + "New discharge considering velocity of approach in m**3/sec : 44.38\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13 Page No : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "w = 1.5;\t\t\t#m\n", + "d = 0.75;\t\t\t#m\n", + "Cd = 0.64;\t\t\t#Coeff of discharge\n", + "QT = 45.;\t\t\t#cumec\n", + "h = 8.;\t\t\t#meter\n", + "A = w*d;\t\t\t#m**2\n", + "g = 9.81;\t\t\t#gravity acceleration\n", + "\n", + "# Calculations\n", + "Q = Cd*A*math.sqrt(2*g*h);\t\t\t#m**3/sec\n", + "n = QT/Q;\t\t\t#no. of spillways\n", + "\n", + "# Results\n", + "print \"No. of spillways : \",round(n)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of spillways : 5.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14 Page No : 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "B = 1;\t\t\t#meter\n", + "b = 0.4;\t\t\t#meter\n", + "H = 0.57;\t\t\t#meter\n", + "h = 0.5;\t\t\t#meter\n", + "A = B*H;\t\t\t#m**2\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "a = b*h;\t\t\t#m**2\n", + "\n", + "# Calculations\n", + "Q = A*a/math.sqrt(A**2-a**2)*math.sqrt(2*g*(H-h));\t\t\t#m**3/sec\n", + "\n", + "# Results\n", + "print \"Discharge in m**3/sec : %.2f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in m**3/sec : 0.25\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch2.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch2.ipynb new file mode 100755 index 00000000..33d455da --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch2.ipynb @@ -0,0 +1,315 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e18e57e92e39a44ba79ec431c0c8df26c667b63725e0e6645399463067a20d48" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Properties of Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "V = 10.;\t\t\t#in m**3\n", + "W = 80.;\t\t\t#in kN\n", + "g = 9.81;\t\t\t#gravity accelerat\n", + "w_water = 9.81;\t\t\t#specific weight of water\n", + "\n", + "# Calculations and Results\n", + "w = W/V;\t\t\t#specific weight in kN/m**3\n", + "print \"Specific weight of liquid in kN/m**3 : \",w\n", + "\n", + "mass_density = w*1000/g;\t\t\t#kg/m**3\n", + "print \"Mass density of liquid in kg/m**3 : %.2f\"%mass_density\n", + "\n", + "specific_gravity = w/w_water;\t\t\t#unitless\n", + "print \"Specific gravity : %.3f\"%specific_gravity\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific weight of liquid in kN/m**3 : 8.0\n", + "Mass density of liquid in kg/m**3 : 815.49\n", + "Specific gravity : 0.815\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\t\t\t\n", + "# Variables :\n", + "p1 = 750.;\t\t\t#N/cm**2\n", + "p2 = 1400.;\t\t\t#N/cm**2\n", + "dvBYV = -0.150;\t\t\t#in %\n", + "\n", + "# Calculations\n", + "dp = p2-p1;\t\t\t#in N/cm**2\n", + "dp = dp*10**4;\t\t\t#in N/m**2\n", + "K = -dp/(dvBYV/100);\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Bulk modulus(N/m**2) : %.2e\"%K\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bulk modulus(N/m**2) : 4.33e+09\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "Kwater = 2.10*10**6;\t\t\t#kN/m**2\n", + "Kair = 140.;\t\t\t#kN/m**2\n", + "dvBYV = -1.;\t\t\t#in %\n", + "\n", + "# Calculations and Results\n", + "#For Water : \n", + "dp = -Kwater*dvBYV/100;\t\t\t#kN/m**2\n", + "print \"Increase of pressure in water in kN/m**2 : %d\"%dp\n", + "\n", + "#For Air : \n", + "dp = -Kair*dvBYV/100;\t\t\t#kN/m**2\n", + "print \"Increase of pressure in air in kN/m**2\",dp\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase of pressure in water in kN/m**2 : 21000\n", + "Increase of pressure in air in kN/m**2 1.4\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "A = 0.2;\t\t\t#m**2\n", + "dy = 0.02/100;\t\t\t#m\n", + "du = 20./100;\t\t\t#cm/s\n", + "mu = 0.001;\t\t\t#Ns/m**2\n", + "\n", + "# Calculations and Results\n", + "tau = mu*du/dy;\t\t\t#in N/m**2\n", + "F = tau*A;\t\t\t#N\n", + "print \"Force required in N : \",F\n", + "Power = F*du;\t\t\t#Watts\n", + "print \"Power required in W : \",Power\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force required in N : 0.2\n", + "Power required in W : 0.04\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables :\n", + "mu = 0.1;\t\t\t#Ns/m**2\n", + "Sp_gravity_liquid = 2.1;\n", + "mass_density_water = 1000.;\t\t\t#in kg/m**3\n", + "\n", + "# Calculations\n", + "rho = Sp_gravity_liquid*mass_density_water;\t\t\t#kg/m**3\n", + "v = mu/rho;\t\t\t#m**2/sec\n", + "\n", + "# Results\n", + "print \"Kinematic viscosity of liquid in m**2/sec : %.3e\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinematic viscosity of liquid in m**2/sec : 4.762e-05\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "d = 2.;\t\t\t\t\t\t\t#in mm\n", + "d = d/1000;\t\t\t\t\t\t#in m\n", + "sigma_water = 0.073;\t\t\t#N/m\n", + "sigma_mercury = 0.510;\t\t\t#N/m\n", + "\n", + "# Calculations and Results\n", + "#Water-glass contact\n", + "w1 = 9.81;\t\t\t#kN/m**3(specific weight of water)\n", + "w1 = w1*10**3;\t\t\t#N/m**3\n", + "theta = 0;\t\t\t#in degree\n", + "h = 4*sigma_water*math.cos(math.radians(theta))/w1/d;\t\t\t#in mm\n", + "print \"capillary rise for water glass contact in mm : %.2f\"%(h*1000)\n", + "\n", + "#Mercury-glass contact\n", + "w2 = 13.6*9.81;\t\t\t#kN/m**3(specific weight of mercury)\n", + "w2 = w2*10**3;\t\t\t#N/m**3\n", + "theta = 130;\t\t\t#in degree\n", + "h = 4*sigma_mercury*math.cos(math.radians(theta))/w2/d;\t\t\t#in mm\n", + "print \"capillary rise for mercury glass contact in mm: %.3f\"%(h*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capillary rise for water glass contact in mm : 14.88\n", + "capillary rise for mercury glass contact in mm: -4.914\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\t\t\t\n", + "# Variables :\n", + "d = 6.;\t\t\t#in mm\n", + "d = d/1000;\t\t\t#in m\n", + "sigma = 0.0755;\t\t\t#N/m\n", + "\n", + "# Calculations\n", + "#At equillibrium : p*math.pi*r**2 = sigma*2*math.pi*r\n", + "r = d/2;\t\t\t#in m\n", + "p = 2*sigma/r;\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Intensity of pressure in N/m**2 or Pascals : %.1f\"%p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of pressure in N/m**2 or Pascals : 50.3\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch3.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch3.ipynb new file mode 100755 index 00000000..f365b8d1 --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch3.ipynb @@ -0,0 +1,1124 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e231d69245822a18a4c67d44b8a7db0b930a7622a43a07f791250d8e1c3f4a37" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Hydrostatic Pressure" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables :\n", + "D = 30*10**-2;\t\t\t#in m\n", + "F = 9810.;\t\t\t#in N\n", + "\n", + "# Calculations\n", + "A = math.pi*D**2/4;\t\t\t#in m**2\n", + "p = F/A;\t\t\t#in N/m**2 or Pa\n", + "p = p/1000;\t\t\t#kPa\n", + "\n", + "# Results\n", + "print \"Intensity of pressure at the bottom of container in kPa : %.2f\"%p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of pressure at the bottom of container in kPa : 138.78\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "h = 1.5;\t\t\t#in m\n", + "w_w = 9.81;\t\t\t#in kN/m**3\n", + "w_g = 1.26;\t\t\t#in kN/m**3\n", + "w_m = 13.6;\t\t\t#in kN/m**3\n", + "\n", + "# Calculations and Results\n", + "f = h*w_w;\t\t\t#kN/m**2\n", + "print \"Intensity of pressure exerted by water column in kN/m**2 : \",f\n", + "f = h*w_w*w_g;\t\t\t#kN/m**2\n", + "print \"Intensity of pressure exerted by glycerine column in kN/m**2 : \",f\n", + "f = h*w_w*w_m;\t\t\t#kN/m**2\n", + "print \"Intensity of pressure exerted by mercury column in kN/m**2 : \",f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of pressure exerted by water column in kN/m**2 : 14.715\n", + "Intensity of pressure exerted by glycerine column in kN/m**2 : 18.5409\n", + "Intensity of pressure exerted by mercury column in kN/m**2 : 200.124\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "p = 2;\t\t\t#in kN/m**2\n", + "w_w = 9.81;\t\t\t#in kN/m**3\n", + "w_alcohol = w_w*0.789;\t\t\t#in kN/m**3\n", + "w_m = 13.6;\t\t\t#in kN/m**3\n", + "\n", + "# Calculations and Results\n", + "H = p/w_alcohol;\t\t\t#in m\n", + "print \"Depth of alcohol in meter : %.3f\"%H\n", + "P_head_w = p/w_w;\t\t\t#m\n", + "print \"Pressure head in terms of water in meter : %.3f\"%P_head_w\n", + "P_head_m = p/w_w/w_m;\t\t\t#m\n", + "print \"Pressure head in terms of mercury in meter : %.3f\"%P_head_m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of alcohol in meter : 0.258\n", + "Pressure head in terms of water in meter : 0.204\n", + "Pressure head in terms of mercury in meter : 0.015\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 31\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "Hwater = 6.;\t\t\t#m(Pressure head of water)\n", + "S_oil = 0.70;\t\t\t#(specific gravity of oil)\n", + "\n", + "# Calculations and Results\n", + "H_oil = Hwater/S_oil;\t\t\t#in m(Pressure head in terms of oil)\n", + "print \"Pressure head of water in terms of oil in meter : %.2f\"%H_oil\n", + "S_oil = 0.825;\t\t\t#(specific gravity of oil)\n", + "S_mercury = 13.6;\t\t\t#(specific gravity of mercury)\n", + "Hmercury = 70./100;\t\t\t#m(Pressure head of mercury)\n", + "H_oil = S_mercury/S_oil*Hmercury;\t\t\t#in m(Pressure head in terms of oil)\n", + "print \"Pressure head of mercury in terms of oil in meter : %.3f\"%H_oil\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure head of water in terms of oil in meter : 8.57\n", + "Pressure head of mercury in terms of oil in meter : 11.539\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "w = 9.81;\t\t\t#in kN/m**3\n", + "l = 3.;\t\t\t#in m\n", + "b = 2.;\t\t\t#in m\n", + "h = 1.;\t\t\t#in m\n", + "\n", + "# Calculations and Results\n", + "f_bottom = w*h;\t\t\t#in kN/m**2(Pressure intensity at bottom)\n", + "p_bottom = f_bottom*l*b;\t\t\t#kN\n", + "print \"Total pressure on the bottom in kN : \",p_bottom\n", + "f_long_vertical = f_bottom/2;\t\t\t#kN\n", + "p_long_vertical = f_long_vertical*l*h;\t\t\t#kN\n", + "print \"Total pressure on long vertical wall in kN : \",p_long_vertical\n", + "f_short_vertical = f_bottom/2;\t\t\t#kN\n", + "p_short_vertical = f_short_vertical*b*h;\t\t\t#kN\n", + "print \"Total pressure on short vertical wall in kN : \",p_short_vertical\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure on the bottom in kN : 58.86\n", + "Total pressure on long vertical wall in kN : 14.715\n", + "Total pressure on short vertical wall in kN : 9.81\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "p_water = 1000.;\t\t\t#in kg/m**3\n", + "p_liquid = 800.;\t\t\t#in kg/m**3\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "h1 = 1.5;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "px1 = p_liquid*g*h1/1000;\t\t\t#kN/m**2\n", + "print \"Pressure at a point 1.5 meter below free surface in kN/m**2 : \",px1\n", + "h2 = 2.;\t\t\t#m\n", + "px2 = p_liquid*g*h2/1000;\t\t\t#kN/m**2\n", + "print \"Pressure at a point 2 meter below free surface in kN/m**2 : \",px2\n", + "h31 = 2.;\t\t\t#m(for liquid)\n", + "h32 = 0.5;\t\t\t#m(for water)\n", + "px1 = p_liquid*g*h31/1000;\t\t\t#kN/m**2\n", + "px2 = p_water*g*h32/1000;\t\t\t#kN/m**2\n", + "px3 = (px1+px2);\t\t\t#kN/m**2\n", + "print \"Pressure at a point 2.5 meter below free surface in kN/m**2 : \",px3\n", + "h = 2.;\t\t\t#meter(water level)\n", + "b = 8.;\t\t\t#meter(width of wall)\n", + "p_bottom = px1+(p_water*g*h)/1000;\t\t\t#kN/m**2\n", + "p_avg1 = (px1+0)/2;\t\t\t#kN/m**2(top 2m liquid layer)\n", + "p_avg2 = (px1+p_bottom)/2;\t\t\t#kN/m**2(top 2m water layer)\n", + "F_per_meter = p_avg1*h*1+p_avg2*h*1;\t\t\t#kN\n", + "Fwall = F_per_meter*b;\t\t\t#kN\n", + "print \"Force on the wall in kN : \",Fwall\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at a point 1.5 meter below free surface in kN/m**2 : 11.772\n", + "Pressure at a point 2 meter below free surface in kN/m**2 : 15.696\n", + "Pressure at a point 2.5 meter below free surface in kN/m**2 : 20.601\n", + "Force on the wall in kN : 533.664\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "b = 3.;\t\t\t#in meter\n", + "h = 3.;\t\t\t#in meter\n", + "S_oil = 0.8;\t\t\t#(specific gravity of oil)\n", + "\n", + "# Calculations\n", + "A = 1./2*h*b;\t\t\t#in m**2\n", + "x_bar = 2./3*3;\t\t\t#in meter\n", + "SW_water = 9.81*1000;\t\t\t#in N/m**3\n", + "SW_oil = SW_water*S_oil;\t\t\t#in N/m**3\n", + "F_surface = SW_oil*A*x_bar;\t\t\t#in kN\n", + "IG = b*h**3/36;\t\t\t#in m**3\n", + "h_bar = IG/A/x_bar+x_bar;\t\t\t#in meter\n", + "\n", + "# Results\n", + "print \"Force shall act at depth of centre of pressure. This depth in meter is : \",h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force shall act at depth of centre of pressure. This depth in meter is : 2.25\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "l = 3.;\t\t\t#in meter\n", + "b = 2.;\t\t\t#in meter\n", + "p = 2.*10**6;\t\t\t#in Pa\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "w = g*1000.;\t\t\t#in N/m**3\n", + "\n", + "# Calculations and Results\n", + "h = p/w;\t\t\t#in meter\n", + "xbar = h-1.5;\t\t\t#in meter\n", + "A = l*b;\t\t\t#in m**2\n", + "p_gate = w*A*xbar/10**6;\t\t\t#in MN\n", + "print \"Total pressure on the gate in MN : %.3f\"%p_gate\n", + "IG = b*l**3/12;\t\t\t#in m**3\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure is \",round(h_bar-xbar,3),\" meter below the centroid of gate.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure on the gate in MN : 11.912\n", + "Position of centre of pressure is 0.004 meter below the centroid of gate.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity\n", + "GH = 4.;\t\t\t#meter\n", + "IJ = 4.;\t\t\t#meter\n", + "IC = 2.;\t\t\t#meter\n", + "GC = 3.;\t\t\t#meter\n", + "AG = (10.-4)/2;\t\t\t#meter\n", + "BH = (10.-4)/2;\t\t\t#meter\n", + "EI = AG*IC/GC;\t\t\t#meter\n", + "JF = AG*IC/GC;\t\t\t#meter\n", + "EF = EI+IJ+JF;\t\t\t#meter\n", + "A = (8.+4.)/2*2;\t\t\t#in m**2\n", + "a = 4.;\t\t\t#meter\n", + "b = 8.;\t\t\t#meter\n", + "d = 2.;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "xbar = (2*a+b)/(a+b)*d/3;\t\t\t#in meter\n", + "w = g*1000;\t\t\t#in N/m**3\n", + "p_gate = w*A*xbar/10**3;\t\t\t#in kN\n", + "print \"Total pressure in kN : \",p_gate\n", + "IG = (a**2+4*a*b+b**2)/(a+b)*d**3/36;\t\t\t#in m**3\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Depth of centre of pressure is \",h_bar,\" meter.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in kN : 104.64\n", + "Depth of centre of pressure is 1.25 meter.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity\n", + "xbar = 8.;\t\t\t#meter\n", + "D = 4.;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = math.pi*D**2/4;\t\t\t#meter**2\n", + "w = g*1000;\t\t\t#in N/m**3\n", + "p = w*A*xbar/10**3;\t\t\t#in kN\n", + "print \"Total pressure in kN : %.2f\"%p\n", + "IG = math.pi*D**4/64;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Depth of centre of pressure is \",(h_bar),\" meter.\"\n", + "\n", + "# note : Answer of total pressure is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in kN : 986.21\n", + "Depth of centre of pressure is 8.125 meter.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity\n", + "D = 4.;\t\t\t#meter\n", + "xbar = (10.+7)/2;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = math.pi*D**2/4;\t\t\t#meter**2\n", + "w = g*1000;\t\t\t#in N/m**3\n", + "p = w*A*xbar/10**6;\t\t\t#in MN\n", + "print \"Total pressure in MN : %.3f\"%p\n", + "BC = 3;\t\t\t#meter\n", + "AB = 4;\t\t\t#mete\n", + "math.sin_theta = BC/AB;\n", + "IG = math.pi*D**4/64;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar*math.sin_theta**2+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure is \",(h_bar),\" meter.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in MN : 1.048\n", + "Position of centre of pressure is 8.5 meter.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "a = 3.;\t\t\t#meter\n", + "b = 4.;\t\t\t#meter(altitude)\n", + "S = 1.2;\t\t\t#specific gravity\n", + "theta = 30.;\t\t\t#degree\n", + "d = 2.5;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity\n", + "AG = b/3;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "xbar = d+AG*math.sin(math.radians(theta));\t\t\t#meter\n", + "A = 1./2*a*b;\t\t\t#meter**2\n", + "w = S*g*1000;\t\t\t#in N/m**3\n", + "p = w*A*xbar/10**3;\t\t\t#in kN\n", + "print \"Total pressure in kN : \",p\n", + "IG = a*b**3/36;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar*(math.sin(math.radians(theta)))**2+xbar;\t\t\t#in meter\n", + "print \"Depth of centre of pressure is \",round(h_bar,3),\" meter.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in kN : 223.668\n", + "Depth of centre of pressure is 3.237 meter.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "a = 8.;\t\t\t#meter\n", + "b = 6.;\t\t\t#meter\n", + "h = 3.;\t\t\t#meter\n", + "CD = 2.;\t\t\t#meter\n", + "theta = 30.;\t\t\t#degree\n", + "\n", + "# Calculations and Results\n", + "A = (a+b)/2*h;\t\t\t#meter**2\n", + "AB = (a+2*b)/(a+b)*h/3;\t\t\t#meter\n", + "x1bar = AB;\t\t\t#meter\n", + "BC = AB*math.sin(math.radians(theta));\t\t\t#meter\n", + "BD = BC+CD;\t\t\t#meter\n", + "xbar = BD;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity\n", + "w = g*1000;\t\t\t#in N/m**3\n", + "p = w*A*xbar/10**3;\t\t\t#in kN\n", + "print \"Total pressure in kN : \",p\n", + "IG = (a**2+b**2+4*a*b)/(a+b)*h**3/36;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar*(math.sin(math.radians(theta)))**2+xbar;\t\t\t#in meter\n", + "print \"Depth of centre of pressure is \",round(h_bar,3),\" meter.\"\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure in kN : 559.17\n", + "Depth of centre of pressure is 2.783 meter.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "l = 2.;\t\t\t#meter\n", + "b = 2.;\t\t\t#meter\n", + "p_i = 98.1;\t\t\t#kN/m**3(Pressure intensity)\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "BC = 1.;\t\t\t#meter\n", + "AB = 2.;\t\t\t#meter\n", + "theta = 30.;\t\t\t#degree\n", + "B = p_i/w;\t\t\t#m\n", + "\n", + "# Calculations\n", + "BD = BC*math.sin(math.radians(theta));\t\t\t#m\n", + "xbar = 10+0.5;\t\t\t#meter\n", + "A = l*b;\t\t\t#m**2\n", + "p = w*A*xbar;\t\t\t#kN\n", + "IG = (2*l**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar*(math.sin(math.radians(theta)))**2+xbar;\t\t\t#in meter\n", + "DI = h_bar-xbar;\t\t\t#m\n", + "FC = DI/math.sin(math.radians(theta));\t\t\t#m\n", + "FB = FC+BC;\t\t\t#meter\n", + "P = p*FB/AB;\t\t\t#kN\n", + "\n", + "# Results\n", + "print \"Force in kN : \",P\n", + "RB = p-P;\t\t\t#kN\n", + "print \"Reaction at hinge B in kN : \",RB\n", + "\n", + "#Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force in kN : 209.28\n", + "Reaction at hinge B in kN : 202.74\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "l = 4.;\t\t\t#meter\n", + "b = 2.;\t\t\t#meter\n", + "h = 1.8;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "xbar = 6.-2\t\t\t#meter\n", + "\n", + "# Calculations\n", + "A = l*b;\t\t\t#m**2\n", + "P = w*A*xbar;\t\t\t#kN\n", + "IG = (2*l**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "# As P acts at h_bar-xbar : \n", + "F = P*((h_bar-xbar)-(b-h))/h;\t\t\t#kN\n", + "\n", + "# Results\n", + "print \"Horizontal Force in kN : %.3f\"%F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal Force in kN : 23.253\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\t\t\t\n", + "# Variables :\n", + "b = 2.;\t\t\t#meter\n", + "d = 3.;\t\t\t#meter\n", + "h = 2.;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "xbar = 2+3./2;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = b*d;\t\t\t#m**2\n", + "P = w*A*xbar;\t\t\t#kN\n", + "print \"Total Pressure in kN : \",P\n", + "IG = (b*d**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure in meter : %.3f\"%h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Pressure in kN : 206.01\n", + "Position of centre of pressure in meter : 3.714\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "b = 4.;\t\t\t#meter\n", + "d = 4.;\t\t\t#meter\n", + "h = 8.;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "xbar = 8.;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = b*d;\t\t\t#m**2\n", + "P = w*A*xbar;\t\t\t#kN\n", + "print \"Total Pressure in kN : \",P\n", + "IG = (b*d**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure in meter : %.3f\"%h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Pressure in kN : 1255.68\n", + "Position of centre of pressure in meter : 8.167\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page No : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 1.5;\t\t\t#meter\n", + "BE = 2.;\t\t\t#meter\n", + "AD = 0.75;\t\t\t#meter\n", + "CE = AD;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "BC = BE-AD;\t\t\t#meter\n", + "FG = CE+BC/2;\t\t\t#meter\n", + "xbar = FG;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "A = math.pi*D**2/4;\t\t\t#m**2\n", + "AB = D;\t\t\t#meter\n", + "sin_theta = BC/AB;\n", + "P = w*A*xbar;\t\t\t#kN\n", + "print \"Total Pressure in kN : %.3f\"%P\n", + "IG = (math.pi/64*D**4);\t\t\t#in m**4\n", + "h_bar = IG/A/xbar*sin_theta**2+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure in meter : %.3f\"%h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Pressure in kN : 23.837\n", + "Position of centre of pressure in meter : 1.446\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "b = 3.;\t\t\t#meter\n", + "a = 3.;\t\t\t#meter\n", + "S_oil = 0.8;\t\t\t#specific gravity of oil\n", + "w = 9.81*S_oil;\t\t\t#kN/m**2\n", + "xbar = 1./3*b;\t\t\t#meter\n", + "A = 1./2*a*b;\t\t\t#m**2\n", + "\n", + "# Calculations and Results\n", + "P = w*A*xbar;\t\t\t#kN\n", + "print \"Total Pressure in kN : \",P\n", + "IG = (a*b**3)/36;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Centre of pressure in meter : \",h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Pressure in kN : 35.316\n", + "Centre of pressure in meter : 1.5\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "a = 2.;\t\t\t#meter\n", + "b = 1.;\t\t\t#meter\n", + "d = 2.;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "xbar = 2+a/2;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = a*b;\t\t\t#m**2\n", + "P = w*A*xbar;\t\t\t#kN\n", + "print \"Total Pressure in kN : \",P\n", + "IG = (b*d**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Position of centre of pressure in meter : %.3f\"%h_bar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Pressure in kN : 58.86\n", + "Position of centre of pressure in meter : 3.111\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "r = 2.;\t\t\t#meter\n", + "l = 4.;\t\t\t#meter\n", + "A = r*l;\t\t\t#m**2\n", + "xbar = 2+r/2;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "\n", + "# Calculations and Results\n", + "PH = w*A*xbar;\t\t\t#kN\n", + "print \"Horizontal component of resulting Pressure in kN : \",PH\n", + "PV = 2*r*l*w+math.pi*r**2/4*l*w;\t\t\t#kN\n", + "print \"Verticalal component of resulting Pressure in kN : %.3f\"%PV\n", + "IG = (l*r**3)/12;\t\t\t#in m**4\n", + "h_bar = IG/A/xbar+xbar;\t\t\t#in meter\n", + "print \"Position of centre of horizontal component of pressure in meter : %.3f\"%h_bar\n", + "x = (2*r+math.pi*r**2/4*(4*r/3/math.pi))/(2*r+math.pi*r**2/4);\t\t\t#meter\n", + "P = math.sqrt(PH**2+PV**2);\t\t\t#kN\n", + "print \"Resultant pressure in kN : %.3f\"%P\n", + "theta = math.degrees(math.atan(PV/PH));\t\t\t#degree\n", + "print \"Direction of resultant pressure in degree : %.2f\"%theta\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of resulting Pressure in kN : 235.44\n", + "Verticalal component of resulting Pressure in kN : 280.236\n", + "Position of centre of horizontal component of pressure in meter : 3.111\n", + "Resultant pressure in kN : 366.011\n", + "Direction of resultant pressure in degree : 49.96\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "A = 2.*1;\t\t\t#m**2\n", + "xbar = 2+2./2;\t\t\t#meter\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "\n", + "# Calculations and Results\n", + "PH = w*A*xbar;\t\t\t#kN\n", + "print \"Horizontal component of resultant Pressure in kN : \",PH\n", + "PV = w*(2*2+2*2-math.pi*2**2/4)*1;\t\t\t#kN\n", + "print \"Verticalal component of resultant Pressure in kN : %.3f\"%PV\n", + "P = math.sqrt(PH**2+PV**2);\t\t\t#kN\n", + "print \"resultant pressure in kN : %.3f\"%P\n", + "theta = math.degrees(math.atan(PV/PH));\t\t\t#degree\n", + "print \"Direction of resultant pressure in degree : %.2f\"%theta\n", + "\n", + "# note : rounding ogg error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of resultant Pressure in kN : 58.86\n", + "Verticalal component of resultant Pressure in kN : 47.661\n", + "resultant pressure in kN : 75.737\n", + "Direction of resultant pressure in degree : 39.00\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "ABbar = math.sqrt(2)*4;\t\t\t#meter\n", + "xbar = ABbar/2;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A = ABbar*1;\t\t\t#m**2\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "PH = w*A*xbar;\t\t\t#kN\n", + "print \"Horizontal component of resultant Pressure in kN : \",PH\n", + "hbar = 2./3*ABbar;\t\t\t#meter\n", + "print \"Position of horizontal component of pressure is \",round(hbar,3),\" meter below free water surface.\"\n", + "PV = w*(math.pi*4**2/4-4*4./2)*1;\t\t\t#kN\n", + "print \"Verticalal component of resultant Pressure in kN : %.3f\"%PV\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component of resultant Pressure in kN : 156.96\n", + "Position of horizontal component of pressure is 3.771 meter below free water surface.\n", + "Verticalal component of resultant Pressure in kN : 44.796\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "h = 24.;\t\t\t#meter\n", + "b = 15.;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "Wm = 2000.*g;\t\t\t#N/m**3\n", + "W = b*h/2*Wm;\t\t\t#N\n", + "w = 9.81;\t\t\t#kN/m**2\n", + "\n", + "# Calculations and Results\n", + "PH = w*20**2/2.*1000;\t\t\t#N\n", + "y = PH/W*20/3+5;\t\t\t#meter\n", + "e = y-b/2;\t\t\t#meter\n", + "MaxStress = W/b*(1+6*e/b);\t\t\t#N/m**2\n", + "print \"Maximum stress in N/m**2 : \",MaxStress\n", + "MinStress = W/b*(1-6*e/b);\t\t\t#N/m**2\n", + "print \"Minimum stress in N/m**2 : \",MinStress\n", + "\n", + "\n", + "#Answer in the book is slightly differ due to limited accuracy used in the book as compared to PYTHON.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum stress in N/m**2 : 348800.0\n", + "Minimum stress in N/m**2 : 122080.0\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch4.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch4.ipynb new file mode 100755 index 00000000..065eb8cf --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch4.ipynb @@ -0,0 +1,648 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0ee07fecb31546aa6587a717abc79d232e40e12aaac4b7ede8f4783b141af15e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Measures Of Pressure" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "p = 5.;\t\t\t#kg/cm**2\n", + "print (\"Gauge units : \");\n", + "\n", + "# Calculations and Results\n", + "print \"Pressure Intensity in kg/m**2 : \",(p/10**-4)\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "print \"Pressure Intensity in N/m**2 : \",(p*g/10**-4)\n", + "print \"Pressure Intensity in Pa : \",(p*g/10**-4)\n", + "print \"Pressure Intensity in kPa : \",p*g/10**3/10**-4\n", + "print \"Pressure Intensity in MPa : \",p*g/10**6/10**-4\n", + "print (\"In terms of head : \");\n", + "w = 1000.;\t\t\t#kg/m**3 for water\n", + "h = p*10**4/w;\t\t\t#meter of water\n", + "print \"Pressure is : \",(h),\" meter of water.\"\n", + "w = 13.6*1000;\t\t\t#kg/m**3 for mercury\n", + "h = p*10**4/w;\t\t\t#meter of mercury\n", + "print \"Pressure is : \",(h),\" meter of mercury.\"\n", + "print (\"Absolute units : \");\n", + "Patm = 760.;\t\t\t#mm of mercury\n", + "Patm = 760*13.6/1000;\t\t\t#m of water\n", + "Patm = Patm*1000.;\t\t\t#kg/m**2\n", + "Pabs = p+Patm;\t\t\t#kg/m**2\n", + "print \"Absolute pressure in kg/m**2 : \",Pabs\n", + "print \"Absolute pressure in kg/cm**2 : \",Pabs*10**4\n", + "print \"Absolute pressure in N/m**2 : \",Pabs*10**4*g\n", + "print \"Absolute pressure in Pa : \",Pabs*10**4*g\n", + "print \"Absolute pressure in kPa : \",Pabs*10**5/10**3\n", + "print \"Absolute pressure in MPa : \",Pabs*10**5/10**6\n", + "h1 = p*10.**4/w;\t\t\t#meter of water\n", + "h2 = p*10.**4/1000;\t\t\t#meter of water\n", + "h = h1+h2;\t\t\t#\t\t\t#meter of water\n", + "print \"Absolute pressure head in terms of water in meter : \",h\n", + "w = 13.6*1000;\t\t\t#kg/m**3 for mercury\n", + "h = p*10**4/w+760./1000;\t\t\t#meter of mercury\n", + "print \"Absolute pressure head in terms of mercury in meter : %.3f\"%h\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge units : \n", + "Pressure Intensity in kg/m**2 : 50000.0\n", + "Pressure Intensity in N/m**2 : 490500.0\n", + "Pressure Intensity in Pa : 490500.0\n", + "Pressure Intensity in kPa : 490.5\n", + "Pressure Intensity in MPa : 0.4905\n", + "In terms of head : \n", + "Pressure is : 50.0 meter of water.\n", + "Pressure is : 3.67647058824 meter of mercury.\n", + "Absolute units : \n", + "Absolute pressure in kg/m**2 : 10341.0\n", + "Absolute pressure in kg/cm**2 : 103410000.0\n", + "Absolute pressure in N/m**2 : 1014452100.0\n", + "Absolute pressure in Pa : 1014452100.0\n", + "Absolute pressure in kPa : 1034100.0\n", + "Absolute pressure in MPa : 1034.1\n", + "Absolute pressure head in terms of water in meter : 53.6764705882\n", + "Absolute pressure head in terms of mercury in meter : 4.436\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\n", + "# Variables :\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "h = 50./1000;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "p = w*h;\t\t\t#kg/m**2\n", + "p = p*9.81;\t\t\t#N/m**2 or Pa\n", + "print \"Pressure Intensity in Pa : \",p\n", + "alfa = 30.;\t\t\t#degree\n", + "h = 50;\t\t\t#mm\n", + "l = h/math.sin(math.radians(alfa));\t\t\t#mm\n", + "print \"Reading in tube in mm : \",l\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Intensity in Pa : 490.5\n", + "Reading in tube in mm : 100.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 13.6;\t\t\t#sp. gravity of mercury\n", + "S2 = 1.;\t\t\t#sp. gravity of water\n", + "H1 = 5.;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "H2 = S1*H1/S2;\t\t\t#m\n", + "print \"(i) Pressure is \",(H2),\" meter of water.\"\n", + "\n", + "S2 = 0.79;\t\t\t#sp. gravity of kerpsene\n", + "H1 = 5;\t\t\t#m\n", + "H2 = S1*H1/S2;\t\t\t#m\n", + "print \"(ii) Pressure is \",round(H2,3),\" meter of kerosene.\"\n", + "\n", + "S2 = 1.7;\t\t\t#sp. gravity of fluid\n", + "H1 = 5;\t\t\t#m\n", + "H2 = S1*H1/S2;\t\t\t#m\n", + "print \"(iii) Pressure is \",(H2),\" meter of fluid.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Pressure is 68.0 meter of water.\n", + "(ii) Pressure is 86.076 meter of kerosene.\n", + "(iii) Pressure is 40.0 meter of fluid.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "S = 0.9;\t\t\t#sp. gravity of liquid\n", + "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", + "S1 = Sm/S;\t\t\t#sp. gravity\n", + "\n", + "# Calculations\n", + "w = S*9.81;\t\t\t#kN/m**3\n", + "h2 = 500./1000;\t\t\t#m\n", + "h1 = 300./1000;\t\t\t#m\n", + "a_BY_A = 1./80;\t\t\t#ratio of area\n", + "pa = w*(h2*((S1-1)*a_BY_A+S1)-h1);\t\t\t#kPa\n", + "\n", + "# Results\n", + "print \"Pressure in the pipe in kPa: %.3f\"%pa\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the pipe in kPa: 64.838\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 1.2;\t\t\t#sp. gravity\n", + "S2 = 13.6;\t\t\t#sp. gravity\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "h2 = 50./1000;\t\t\t#m\n", + "h1 = 200./1000;\t\t\t#m\n", + "pa = w*(S2*h1-S1*h2);\t\t\t#kg/m**2\n", + "\n", + "# Results\n", + "print \"Pressure in the pipe in kg/m**2: \",pa\n", + "print \"Pressure in the pipe in Pa: \",pa*9.81\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the pipe in kg/m**2: 2660.0\n", + "Pressure in the pipe in Pa: 26094.6\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "S = 1.;\t\t\t#sp. gravity\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "h2 = 50./1000;\t\t\t#m\n", + "h1 = 200./1000;\t\t\t#m\n", + "\n", + "# Calculations\n", + "pa = w*S*(h1-h2);\t\t\t#kg/m**2\n", + "\n", + "# Results\n", + "print \"Pressure in the pipe in kg/m**2: \",pa\n", + "print \"Pressure in the pipe in Pa: \",pa*9.81\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the pipe in kg/m**2: 150.0\n", + "Pressure in the pipe in Pa: 1471.5\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 0.005;\t\t\t#sp. gravity\n", + "S2 = 1.;\t\t\t#sp. gravity\n", + "Patm = 1.014*10**5;\t\t\t#Pa\n", + "h = 50./1000;\t\t\t#m\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "pa = -w*S2*h;\t\t\t#kg/m**2\n", + "Pabs = pa*9.81+Patm;\t\t\t#\n", + "\n", + "# Results\n", + "print \"Pressure intensity of gas in Pa(Vaccum): \",abs(pa*9.81)\n", + "print \"Absolute pressure in the pipe in Pa: \",Pabs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure intensity of gas in Pa(Vaccum): 490.5\n", + "Absolute pressure in the pipe in Pa: 100909.5\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "S1 = 0.9;\t\t\t#sp. gravity\n", + "S2 = 13.6;\t\t\t#sp. gravity\n", + "h1 = 12.5/100;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "P_AB = h1*(S2-S1);\t\t\t#meter of water\n", + "print \"Difference in pressure head at the points A & B is \",(P_AB),\" meter of water\"\n", + "\n", + "w = 1000;\t\t\t#kg/m**3\n", + "P_diff = P_AB*w*9.81;\t\t\t#Pa or Nm**2\n", + "print \"In terms A pressure entirely, the difference of pressure in N/m**2 : \",P_diff\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in pressure head at the points A & B is 1.5875 meter of water\n", + "In terms A pressure entirely, the difference of pressure in N/m**2 : 15573.375\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "S1 = 1.;\t\t\t#sp. gravity\n", + "S2 = 13.6;\t\t\t#sp. gravity\n", + "h1 = 120./1000;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "P_diff = h1*(S2-S1);\t\t\t#meter of water\n", + "print \"Difference in pressure head is \",(P_diff),\" meter of water\"\n", + "w = 1000;\t\t\t#kg/m**3\n", + "P_diff = P_diff*w*9.81;\t\t\t#Pa or Nm**2\n", + "print \"In terms of pressure intensity, the difference of pressure in N/m**2 : \",P_diff\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in pressure head is 1.512 meter of water\n", + "In terms of pressure intensity, the difference of pressure in N/m**2 : 14832.72\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 0.81;\t\t\t#sp. gravity\n", + "S2 = 1.2;\t\t\t#sp. gravity\n", + "S3 = 13.6;\t\t\t#sp. gravity\n", + "h3 = 200./1000;\t\t\t#m\n", + "h2 = 50./1000;\t\t\t#m\n", + "h1 = 100./1000;\t\t\t#m\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "pAB = ((h1*(S2-S1)+h2*(S3-S1)-h3*S1))*w;\t\t\t#Kg/m**2\n", + "\n", + "# Results\n", + "print \"Pressure difference between the two vessel in kg/m**2: \",pAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between the two vessel in kg/m**2: 516.5\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\n", + "# Variables :\n", + "S1 = 1.9;\t\t\t#sp. gravity\n", + "S2 = 1.2;\t\t\t#sp. gravity\n", + "S3 = 0.79;\t\t\t#sp. gravity\n", + "h2 = 545./1000;\t\t\t#m\n", + "h1 = 750./1000;\t\t\t#m\n", + "h3 = h1-h2;\t\t\t#m\n", + "w = 1000*9.81;\t\t\t#N/m**3\n", + "\n", + "# Calculations\n", + "pAB = (h1*S1-h2*S2-h3*S3)*w;\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Pressure difference between the two vessel in N/m**2: \",pAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between the two vessel in N/m**2: 5974.7805\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "# Variables :\n", + "S1 = 0.005;\t\t\t#sp. gravity\n", + "S2 = 0.79;\t\t\t#sp. gravity\n", + "S3 = 13.6;\t\t\t#sp. gravity\n", + "h = 30./1000;\t\t\t#m\n", + "w = 1000*9.81;\t\t\t#N/m**3\n", + "\n", + "# Calculations\n", + "pAB = h*(S3-S2)*w;\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Pressure difference between the two vessel in N/m**2: \",pAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between the two vessel in N/m**2: 3769.983\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 1.25;\t\t\t#sp. gravity\n", + "S2 = 1.05;\t\t\t#sp. gravity\n", + "S3 = 0.79;\t\t\t#sp. gravity\n", + "h = 30./1000;\t\t\t#m\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "#pA = pB\n", + "h = (0.15*w*S2-S1*w*0.15)/(S3*w-w*S2);\t\t\t#m\n", + "h = h*1000;\t\t\t#mm\n", + "\n", + "# Results\n", + "print \"Reading of manometer in mm : %.f\"%h\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of manometer in mm : 115\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "S1 = 1.;\t\t\t#sp. gravity of water\n", + "S2 = 1.;\t\t\t#sp. gravity of water\n", + "S3 = 0.9;\t\t\t#sp. gravity of oil\n", + "h3 = 100./1000;\t\t\t#meter\n", + "w = 9.81*1000;\t\t\t#N/m**3\n", + "\n", + "# Calculations\n", + "pAB = w*(h3-h3*S3);\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Difference of pressure in N/m**2 or Pa : \",pAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference of pressure in N/m**2 or Pa : 98.1\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch5.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch5.ipynb new file mode 100755 index 00000000..be381f97 --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch5.ipynb @@ -0,0 +1,1167 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:27a0e041deb7edcaeea4eb9e050cf5ed492f728315d53e300990f2d773461266" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Fundamentals of Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "m = 2000.;\t\t\t#litre or kg(1litre water = 1kg)\n", + "M = m/60;\t\t\t#kg/s\n", + "p = 4.5;\t\t\t#bar\n", + "p = p*10**5;\t\t\t#N/m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "w = g*1000;\t\t\t#N/m**3\n", + "\n", + "# Calculations\n", + "H = p/w;\t\t\t#m\n", + "Power = M*g*H/1000;\t\t\t#kW\n", + "\n", + "# Results\n", + "print \"Power required in kW : %.f\"%Power\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required in kW : 15\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "v1 = 400.*10**-3;\t\t\t#m/s\n", + "d1 = 300./1000;\t\t\t#meter\n", + "d2 = 450./1000;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "A1 = math.pi*d1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*d2**2/4;\t\t\t#m**2\n", + "Q1 = A1*v1*100;\t\t\t#litres/sec(1m**3 = 1000litres)\n", + "print \"Discharge of pipe in litres/sec : %.2f\"%Q1\n", + "v2 = (Q1/100)/A2;\t\t\t#m/s(Q1 = Q2)\n", + "print \"Mean velocity of flow in m/s : %.3f\"%v2\n", + "\n", + "#Answer of discharge is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge of pipe in litres/sec : 2.83\n", + "Mean velocity of flow in m/s : 0.178\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "PotentialHead = 2;\t\t\t#meter of fluid\n", + "print \"Potential Head is \",(PotentialHead),\" meter of fluid.\"\n", + "v = 5.;\t\t\t\t#m/s\n", + "g = 9.81;\t\t\t#constant\n", + "\n", + "# Calculations and Results\n", + "VelocityHead = v**2/2/g;\t\t\t#m\n", + "print \"Velocity Head is \",round(VelocityHead,3),\" meter of fluid.\"\n", + "\n", + "w = g*1000;\t\t\t#N/m**3\n", + "S = 0.8;\t\t\t#sp. gravity of fluid\n", + "p = 200;\t\t\t#kPa\n", + "PressureHead = p*10**3/w/S;\t\t\t#meter of fluid\n", + "print \"Pressure Head is \",round(PressureHead,3),\" meter of fluid.\"\n", + "\n", + "TotalHead = PotentialHead+VelocityHead+PressureHead;\t\t\t#meter of fluid\n", + "print \"Total Head is \",round(TotalHead,3),\" meter of fluid.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Potential Head is 2 meter of fluid.\n", + "Velocity Head is 1.274 meter of fluid.\n", + "Pressure Head is 25.484 meter of fluid.\n", + "Total Head is 28.758 meter of fluid.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "p = 0.8/10**-4;\t\t\t#kg/m**2\n", + "datumH = 4.;\t\t\t#meter\n", + "v = 0.8;\t\t\t#m/s\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "\n", + "# Calculations\n", + "VelocityH = v**2/2/g;\t\t\t#m\n", + "w = 1000;\t\t\t#kg/m**3\n", + "PressureH = p/w;\t\t\t#meter of fluid\n", + "TotalH = datumH+VelocityH+PressureH;\t\t\t#meter of fluid\n", + "\n", + "# Results\n", + "print \"Total Energy is \",round(TotalH,4),\" meter.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Energy is 12.0326 meter.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 800./1000;\t\t\t#m**2\n", + "D2 = 600./1000;\t\t\t#m**2\n", + "p1 = 100.;\t\t\t#kPa\n", + "p2 = 40.;\t\t\t#kPa\n", + "v1 = 4000.*10**-3;\t\t\t#m/s\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "Z1 = 4.;\t\t\t#meter\n", + "Z2 = 7.;\t\t\t#meter\n", + "rho = 1.;\t\t\t#sp. gravity\n", + "g = 9.81;\t\t\t#constant\n", + "\n", + "# Calculations\n", + "PHeadA = p1/rho/g;\t\t\t#meter of fluid\n", + "PHeadB = p2/rho/g;\t\t\t#meter of fluid\n", + "v2 = A1*v1/A2;\t\t\t#m/s\n", + "VHeadA = v1**2/2/g;\t\t\t#meter\n", + "VHeadB = v2**2/2/g;\t\t\t#meter\n", + "E1 = Z1+PHeadA+VHeadA;\t\t\t#meter\n", + "E2 = Z2+PHeadB+VHeadB;\t\t\t#meter\n", + "\n", + "# Results\n", + "if E1>E2:\n", + " print \"Total Energy at A(\",round(E1,4),\" meter) is greater than total energy at B(\",round(E2,4),\" meter). \\\n", + " \\nFlow of water is from A to B.\"\n", + "else:\n", + " print \"Total Energy at B(\",(E2),\" meter) is greater than total energy at A(\",(E1),\" meter). Flow of water is from B to A.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Energy at A( 15.0092 meter) is greater than total energy at B( 13.6548 meter). \n", + "Flow of water is from A to B.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 1.25;\t\t\t#meter\n", + "D2 = 0.625;\t\t\t#meter\n", + "slope = 100.;\n", + "L = 300.;\t\t\t#/meter\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Z12 = L/slope;\t\t\t#meter\n", + "Q = 100.;\t\t\t#litres/sec\n", + "Q = Q*10**-3;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1 = Q/A1;\t\t\t#m/s\n", + "v2 = Q/A2;\t\t\t#m/s\n", + "p1 = 100.;\t\t\t#kN/m**2\n", + "#Higher End : \n", + "w = 9.81;\t\t\t#kN/m**3\n", + "Phead = p1/w;\t\t\t#meter\n", + "Vhead = v1**2/2/g;\t\t\t#meter\n", + "\t\t\t#Lower End : \n", + "w = 9.81;\t\t\t#kN/m**3\n", + "\t\t\t#Phead = p1/w;\t\t\t#meter\n", + "Vhead = v2**2/2/g;\t\t\t#meter\n", + "p2 = (Z12+v1**2/2/g+p1/w-v2**2/2/g)*w;\t\t\t#kN/m**2(By Bernoulli's theorem)\n", + "\n", + "# Results\n", + "print \"Pressure at the lower end in kN per m**2 : %.2f\"%p2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the lower end in kN per m**2 : 129.38\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Z1 = 0.;\t\t\t#meter\n", + "Z2 = 5.;\t\t\t#meter\n", + "Q = 300.*10**-3;\t\t\t#m/s\n", + "D1 = 0.3;\t\t\t#meter\n", + "D2 = 0.6;\t\t\t#meter\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1 = Q/A1;\t\t\t#m/s\n", + "v2 = Q/A2;\t\t\t#m/s\n", + "p1 = 100.;\t\t\t#kN/m**2\n", + "p2 = 600.;\t\t\t#kN/m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "\n", + "# Calculations and Results\n", + "Vhead11 = v1**2/2/g;\t\t\t#meter\n", + "Vhead22 = v2**2/2/g;\t\t\t#meter\n", + "Phead11 = p1/g;\t\t\t#meter\n", + "Phead22 = p2/g;\t\t\t#meter\n", + "E1_11 = Z1+Vhead11+Phead11;\t\t\t#meter\n", + "E2_22 = Z2+Vhead22+Phead22;\t\t\t#meter\n", + "\n", + "if E1_11>E2_22:\n", + " print \"Energy at section 1-1(\",round(E1_11,3),\" meter) is greater than energy at section 2-2(\",(E2_22),\" meter). Flow of water is from section 1-1 to 2-2.\"\n", + " HeadLoss = E1_11-E2_22;\t\t\t#meter\n", + " print \"Head Loss in meter : \",HeadLoss\n", + "else:\n", + "\tprint \"Energy at section 2-2(\",round(E2_22,3),\" meter) is greater than energy at section 1-1(\",round(E1_11,3),\" meter). Flow of water is from section 2-2 to 1-1.\"\n", + "\tHeadLoss = E2_22-E1_11;\t\t\t#meter\n", + "\tprint \"Head Loss in meter : %.3f\"%HeadLoss\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy at section 2-2( 66.219 meter) is greater than energy at section 1-1( 11.112 meter). Flow of water is from section 2-2 to 1-1.\n", + "Head Loss in meter : 55.108\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 400./1000;\t\t\t#meter\n", + "v1 = 20.;\t\t\t#m/s\n", + "Z1 = 28.;\t\t\t#meter\n", + "Z2 = 31.;\t\t\t#meter\n", + "p1 = 4./10**-4;\t\t\t#kg/m**2\n", + "p2 = 3./10**-4;\t\t\t#kg/m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "w = 1000.;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "Vhead1 = v1**2/2/g;\t\t\t#meter\n", + "Phead1 = p1/w;\t\t\t#meter\n", + "Vhead2 = Vhead1;\t\t\t#meter\n", + "Phead2 = p2/w;\t\t\t#meter\n", + "E1 = Z1+Vhead1+Phead1;\t\t\t#meter\n", + "E2 = Z2+Vhead2+Phead2;\t\t\t#meter\n", + "HL = E1-E2;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Loss of head between P & Q in meter : \",HL\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of head between P & Q in meter : 7.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "Z1 = 0.;\t\t\t#meter\n", + "Z2 = 4.;\t\t\t#meter\n", + "rho = 0.8;\t\t\t#sp. gravity\n", + "\n", + "# Calculations and Results\n", + "Q = 250.*10**-3;\t\t\t#m/s or cumec\n", + "D1 = 250./1000;\t\t\t#meter\n", + "D2 = 500./1000;\t\t\t#meter\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1 = Q/A1;\t\t\t#m/s\n", + "v2 = Q/A2;\t\t\t#m/s\n", + "p1 = 0.1*10**3;\t\t\t#N/m**2\n", + "p2 = 0.06*10**3;\t\t\t#N/m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Vhead1 = v1**2/2/g;\t\t\t#meter\n", + "Phead1 = p1/rho/g;\t\t\t#meter\n", + "Vhead2 = v2**2/2/g;\t\t\t#meter\n", + "Phead2 = p2/rho/g;\t\t\t#meter\n", + "H1 = Z1+Vhead1+Phead1;\t\t\t#meter\n", + "H2 = Z2+Vhead2+Phead2;\t\t\t#meter\n", + "if H1>H2 :\n", + " print \"Total head at A(\",round(H1,3),\" meter) is greater than total head at B(\",round(H2,3),\" meter). Flow will take place from A-B.\"\n", + " HeadLoss = H1-H2;\t\t\t#meter\n", + " print \"Head Loss in meter : %.3f\"%HeadLoss\n", + "else:\n", + " print \"Total head at B(\",(H2),\" meter) is greater than total head at A(\",(H1),\" meter). Flow will take place from B-A.\"\n", + " HeadLoss = H2-H1;\t\t\t#meter\n", + " print \"Head Loss in meter : \",HeadLoss\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total head at A( 14.064 meter) is greater than total head at B( 11.728 meter). Flow will take place from A-B.\n", + "Head Loss in meter : 2.336\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "Q = 200.*10**-3;\t\t\t#m**3/s\n", + "D1 = 250./1000;\t\t\t#meter\n", + "D2 = 200./1000;\t\t\t#meter\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1 = Q/A1;\t\t\t#m/s\n", + "v2 = Q/A2;\t\t\t#m/s\n", + "Z1 = 2.;\t\t\t#meter\n", + "Z2 = 8.;\t\t\t#meter\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "w = 1000;\t\t\t#kg/m**3\n", + "\n", + "# Calculations\n", + "p1 = w*(Z1-v1**2/2/g);\t\t\t#kg/m**2\n", + "p2 = v1**2/2/g*w+p1+Z2*w-v2**2/2/g*w-4*w;\t\t\t#kg/m**2(by Bernolli's theorem)\n", + "p1 = p1*g;\t\t\t#N/m**2\n", + "p2 = p2*g;\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Pressure intensity at point P in N/m**2 : \",p1\n", + "print \"Pressure intensity at point Q in N/m**2 : \",p2\n", + "\t\t\t\n", + "\n", + "# Note :Answer in the book is not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure intensity at point P in N/m**2 : 11319.768636\n", + "Pressure intensity at point Q in N/m**2 : 38595.7632715\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "slope = 1./10;\n", + "Z1 = 0.;\t\t\t#meter\n", + "Z2 = 40.*slope;\t\t\t#meter\n", + "p1 = 1.5/10**-4;\t\t\t#kg/cm**2\n", + "v2 = 4.1;\t\t\t#m/s\n", + "D1 = 600./1000;\t\t\t#meter\n", + "D2 = 300./1000;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1 = A2*v2/A1;\t\t\t#m/s\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "w = 1000;\t\t\t#kg/m**3\n", + "p2 = (p1/w+v1**2/2/g+Z1-v2**2/2/g-Z2)*w;\t\t\t#kg/m**2(by Bernolli's theorem)\n", + "p2 = p2*10**-4;\t\t\t#kg/cm**2\n", + "Q1 = A1*v1;\t\t\t#m**3/sec\n", + "Q1 = Q1*1000;\t\t\t#litre/sec\n", + "\n", + "# Results\n", + "print \"Pressure intensity at point Q in kg/cm**2 : %.3f\"%p2\n", + "print \"Discharge of pipe in litres/sec : %.3f\"%Q1\n", + "\n", + "#Answer in the book is not accurate. calculation for A1 & A2 is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure intensity at point Q in kg/cm**2 : 1.020\n", + "Discharge of pipe in litres/sec : 289.812\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 180./1000;\t\t\t#meter\n", + "D2 = 90./1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "S = 0.8;\t\t\t#sp. gravity of oil\n", + "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", + "x = 300./1000;\t\t\t#meter\n", + "K = 0.97;\t\t\t#coeff. of meter\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = A1*A2*math.sqrt(2*g)/math.sqrt(A1**2-A2**2)\n", + "h = x*(Sm/S-1);\t\t\t#meter of oil\n", + "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litre/sec\n", + "\n", + "# Results\n", + "print \"Discharge of oil in litres/sec : %.2f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge of oil in litres/sec : 61.85\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1byD2 = 1/0.7;\n", + "D1 = 320./1000;\t\t\t#meter\n", + "D2 = 320.*0.7/1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "Q = 30.6/60;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = A1*math.sqrt(2*g)/math.sqrt((D1byD2)**4-1);\n", + "h = 1.2;\t\t\t#meter of water\n", + "K = Q/C/math.sqrt(h);\t\t\t#Coeff. of meter\n", + "\n", + "# Results\n", + "print \"Coefficient of meter : %.3f\"%K\n", + "\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of meter : 2.325\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 320./1000;\t\t\t#meter\n", + "D2 = 224./1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "Q = 25000./1000./60;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = 0.4984;\t\t\t#venturi consmath.tant\n", + "K = 0.92;\t\t\t#Coeff. of meter\n", + "h = (Q/K/C)**2\n", + "S = 1;\t\t\t#sp. gravity\n", + "Sm = 13.6;\t\t\t#sp. gravity\n", + "x = h/(Sm/S-1);\t\t\t#meter of water\n", + "\n", + "# Results\n", + "print \"Deflection in manometer(mm) : %.1f\"%(x*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection in manometer(mm) : 65.5\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 120./1000;\t\t\t#meter\n", + "D2 = 120*0.55/1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "Q = 30./1000;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "C = A1*math.sqrt(2*g)/math.sqrt((D1/D2)**4-1);\t\t\t#venturi consmath.tant\n", + "K = 0.94;\t\t\t#Coeff. of meter\n", + "h = (Q/K/C)**2;\t\t\t#meter\n", + "Z1 = 0;\t\t\t#meter\n", + "Z2 = 0.3;\t\t\t#meter\n", + "S = 0.79;\t\t\t#sp. gravity\n", + "w = 1000*S;\t\t\t#kg/m**3\n", + "delta_p = (h+Z1-Z2)*w;\t\t\t#kg/m**2\n", + "delta_p = delta_p*g;\t\t\t#N/m**2\n", + "\n", + "# Results\n", + "print \"Pressure difference in N/m**2 : %.3f\"%delta_p\n", + "\n", + "#answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference in N/m**2 : 28903.473\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 160./1000;\t\t\t#meter\n", + "D2 = 60./1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "S = 0.8;\t\t\t#sp. gravity\n", + "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", + "Q = 0.05;\t\t\t#m**3/sec\n", + "K = 0.98;\t\t\t#Coeff. of meter\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = A1*math.sqrt(2*g)/math.sqrt((A1/A2)**2-1);\t\t\t#venturi consmath.tant\n", + "h = (Q/K/C)**2;\t\t\t#meter\n", + "x = h/(Sm/S-1);\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Deflection in meter : %.2f\"%x\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Deflection in meter : 1.02\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 200./1000;\t\t\t#meter\n", + "D2 = 100./1000;\t\t\t#meter\n", + "x = 220./1000;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "K = 0.98;\t\t\t#Coeff. of meter\n", + "S = 1.;\t\t\t#sp. gravity\n", + "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = A1*math.sqrt(2*g)/math.sqrt((A1/A2)**2-1);\t\t\t#venturi consmath.tant\n", + "h = x*(Sm/S-1);\t\t\t#meter\n", + "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Rate of flow in litres/sec : %.f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of flow in litres/sec : 59\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 40./100;\t\t\t#meter\n", + "D2 = 15./100;\t\t\t#meter\n", + "x = 25./100;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "K = 0.98;\t\t\t#Coeff. of meter\n", + "S = 1.;\t\t\t#sp. gravity\n", + "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "C = A1*A2*math.sqrt(2*g)/math.sqrt(A1**2-A2**2);\t\t\t#venturi consmath.tant\n", + "h = x*(Sm/S-1);\t\t\t#meter\n", + "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", + "Q = Q*1000*3600;\t\t\t#litres/hour\n", + "\n", + "# Results\n", + "print \"Flow of water in litres/hour : %.f\"%Q\n", + "\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow of water in litres/hour : 495043\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 15./100;\t\t\t#meter\n", + "D2 = 7.5/100;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "p1 = 4*g*10**4;\t\t\t#N/m**2\n", + "p2 = 1.5*g*10**4;\t\t\t#kg/cm**2\n", + "w = 9.81;\t\t\t#kg/m**2\n", + "\n", + "# Calculations\n", + "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", + "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", + "v1BYv2 = A2/A1;\n", + "\t\t\t#v1**2/2/g+p1/w = v2**2/2/g+p2/w\n", + "\t\t\t#v1**2 = v2**2-50*g\n", + "v2 = math.sqrt(50*g/(1-v1BYv2**2));\t\t\t#m/s\n", + "Q = A2*v2;\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Flow of water in litres/sec : %.f\"%Q\n", + "\t\t\t#Answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow of water in litres/sec : 101\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 20./100;\t\t\t#meter\n", + "D2 = 15./100;\t\t\t#meter\n", + "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", + "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", + "\n", + "# Calculations and Results\n", + "v1 = 2;\t\t\t#m/s\n", + "v2 = A1*v1/A2;\t\t\t#m/s\n", + "print \"Velocity at another section in m/s : %.2f\"%v2\n", + "FlowRate = A1*v1;\t\t\t#m**3/s\n", + "FlowRate = FlowRate*1000;\t\t\t#litres/s\n", + "print \"Flow Rate in litres/sec : %.1f\"%FlowRate\n", + "\n", + "#Answer of velocity in the book is not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity at another section in m/s : 3.56\n", + "Flow Rate in litres/sec : 62.8\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "rd = 0.75;\t\t\t#relative density\n", + "D = 12.5/100;\t\t\t#meter\n", + "p = 1.;\t\t\t#bar\n", + "p = p*1.02;\t\t\t#kg/cm**2\n", + "\n", + "# Calculations\n", + "p = p*9.81*10**4/1000;\t\t\t#kPa\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "w = g*rd;\t\t\t#N/m**3\n", + "pH = p/w;\t\t\t#meter\n", + "Z = 2.5;\t\t\t#meter\n", + "Et = 20;\t\t\t#Nm\n", + "v = math.sqrt((Et-p/w-Z)*2*g);\t\t\t#m/s\n", + "A = math.pi/4*D**2;\t\t\t#m**2\n", + "Q = A*v;\t\t\t#m**3/sec\n", + "Q = A*v*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Flow Rate of oil in litres/sec : %.f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow Rate of oil in litres/sec : 107\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "rd = 0.75;\t\t\t#relative density\n", + "d1 = 0.3;\t\t\t#meter\n", + "d2 = 0.1;\t\t\t#meter\n", + "Q = 50./1000;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A1 = math.pi/4*d1**2;\t\t\t#m**2\n", + "A2 = math.pi/4*d2**2;\t\t\t#m**2\n", + "v1 = Q/A1;\t\t\t#m/s\n", + "v2 = A1*v1/A2;\t\t\t#m/s\n", + "p1 = 200;\t\t\t#kN/m**2\n", + "p2 = 100;\t\t\t#kN/m**2\n", + "w = 9.81;\t\t\t#kN/m**3\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "Z1 = 0;\t\t\t#meter\n", + "Z2 = Z1+p1/w+v1**2/2/g-p2/w-v2**2/2/g;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Z in meter : %.2f\"%Z2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z in meter : 8.15\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D1 = 300./1000;\t\t\t#meter\n", + "D2 = 150./1000;\t\t\t#meter\n", + "Q = 50./1000;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", + "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", + "delpBYw = 3;\t\t\t#p1/w-p2/w = 3;\t\t\t#m\n", + "v1BYv2 = A2/A1;\n", + "Z1 = 0;\t\t\t#meter\n", + "Z2 = 0;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "\t\t\t#HeadLoss = 1/8*v**2/2/g\n", + "\t\t\t#Z1+p1/w+v1**2/2/g = Z2+p2/w+v2**2/2/g+HeadLoss\n", + "v2 = math.sqrt((Z1-Z2+delpBYw)/(1./2/g-v1BYv2**2/2/g+1/8/2/g));\t\t\t#m/s\n", + "Q = A2*v2;\t\t\t#m**3/s\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Discharge in pipe in litres/sec : %.1f\"%Q\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in pipe in litres/sec : 140.0\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch6.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch6.ipynb new file mode 100755 index 00000000..684eaca6 --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch6.ipynb @@ -0,0 +1,899 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:544ece9b951b876154e126766a7294917ced3584a3b83e52cd96ba339ae7b10b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Orifices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Do = 25.;\t\t\t#mm\n", + "Dc = 20.;\t\t\t#mm\n", + "H = 85.;\t\t\t#mm\n", + "x = 335.;\t\t\t#mm\n", + "y = 350.;\t\t\t#mm\n", + "\n", + "# Calculations and Results\n", + "a = math.pi/4*Do**2;\t\t\t#m**2\n", + "ac = math.pi/4*Dc**2;\t\t\t#m**2\n", + "Cc = ac/a;\n", + "print \"Coefficient of contraction : \",Cc\n", + "\n", + "Cv = math.sqrt(x**2/4/H/y);\n", + "print \"Coefficient of velocity : %.3f\"%Cv\n", + "\n", + "Cd = Cc*Cv;\n", + "print \"Coefficient of discharge : %.2f\"%Cd\n", + "\n", + "Cr = (1/Cv**2-1);\n", + "print \"Coefficient of Resistance : %.2f\"%Cr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of contraction : 0.64\n", + "Coefficient of velocity : 0.971\n", + "Coefficient of discharge : 0.62\n", + "Coefficient of Resistance : 0.06\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "Do = 0.125;\t\t\t#m\n", + "H = 10.5;\t\t\t#mm\n", + "Q = 6500.;\t\t\t#litres/minute\n", + "Q = Q/60./1000;\t\t\t#cumec\n", + "x = 6.;\t\t\t#m\n", + "y = 1.;\t\t\t#m\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "\n", + "# Calculations and Results\n", + "a = math.pi/4*Do**2;\t\t\t#m**2\n", + "Qth = a*math.sqrt(2*g*H);\t\t\t#cumec\n", + "Cd = Q/Qth;\t\t\t#\n", + "print \"Coefficient of discharge : %.2f\"%Cd\n", + "Cv = math.sqrt(x**2/4/H/y);\n", + "print \"Coefficient of velocity : %.3f\"%Cv\n", + "\n", + "Cc = Cd/Cv;\n", + "print \"Coefficient of contraction : %.3f\"%Cc\n", + "\n", + "Cr = (1/Cv**2-1);\n", + "print \"Coefficient of Resistance : %.3f\"%Cr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of discharge : 0.62\n", + "Coefficient of velocity : 0.926\n", + "Coefficient of contraction : 0.664\n", + "Coefficient of Resistance : 0.167\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "h = 102.;\t\t\t#mm\n", + "H = 105.;\t\t\t#mm\n", + "\n", + "# Calculations\n", + "Cv = math.sqrt(2*g*h)/math.sqrt(2*g*H);\n", + "\n", + "# Results\n", + "print \"Coefficient of velocity : %.2f\"%Cv\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of velocity : 0.99\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\n", + "# Variables :\n", + "Q = 180./62;\t\t\t#litres/sec\n", + "Q = Q/1000;\t\t\t#cumec\n", + "Dc = 25./1000;\t\t\t#m\n", + "H = 1.9;\t\t\t#m\n", + "\n", + "# Calculations\n", + "ac = math.pi/4*Dc**2;\t\t\t#m**2\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cv = Q/math.sqrt(2*g*H)/ac;\n", + "\n", + "# Results\n", + "print \"Coefficient of velocity : %.2f\"%Cv\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of velocity : 0.97\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 30./1000;\t\t\t#meter\n", + "wl = 2;\t\t\t#kgm\n", + "w1 = 148.6/60;\t\t\t#kg/sec\n", + "y = 1.65;\t\t\t#meter\n", + "H = 1.3;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "Cv = wl/w1/y*math.sqrt(g)/math.sqrt(2*H);\n", + "print \"Coefficient of velocity : %.3f\"%Cv\n", + "\n", + "Q = w1/1000;\t\t\t#Cumec\n", + "a = math.pi/4*d**2;\t\t\t#meter**2\n", + "Qth = a*math.sqrt(2*g*H);\t\t\t#Cumec\n", + "Cd = Q/Qth;\t\t\t#coeff. of discharge\n", + "print \"Coefficient of discharge : %.3f\"%Cd\n", + "\n", + "Cc = Cd/Cv;\t\t\t#coeff. of contraction\n", + "print \"Coefficient of contraction : %.3f\"%Cc\n", + "\n", + "#Answer in the book are not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of velocity : 0.951\n", + "Coefficient of discharge : 0.694\n", + "Coefficient of contraction : 0.730\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "a = 9*10**-4;\t\t\t#m**2\n", + "H = 3;\t\t\t#meter\n", + "x = 2.5;\t\t\t#meter\n", + "y = 54./100;\t\t\t#meter\n", + "Qactual = 250*10**-3/60;\t\t\t#Cumec\n", + "\n", + "# Calculations and Results\n", + "Qth = a*math.sqrt(2*g*H);\t\t\t#Cumec\n", + "Cd = Qactual/Qth;\t\t\t#coeff. of discharge\n", + "print \"Coefficient of discharge : %.3f\"%Cd\n", + "\n", + "Cv = math.sqrt(x**2)/math.sqrt(4*H*y);\t\t\t#velocity\n", + "print \"Coefficient of velocity : %.3f\"%Cv\n", + "\n", + "Cc = Cd/Cv;\t\t\t#coeff. of contraction\n", + "print \"Coefficient of contraction : %.3f\"%Cc\n", + "\n", + "#Answer in the book are not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of discharge : 0.603\n", + "Coefficient of velocity : 0.982\n", + "Coefficient of contraction : 0.614\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 20./1000;\t\t\t#meter\n", + "a = math.pi/4*d**2;\t\t\t#m**2\n", + "H = 1;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Qactual = 0.85*10**-3;\t\t\t#m**3/sec\n", + "v = math.sqrt(2*g*H);\t\t\t#m/sec\n", + "Qth = a*v;\t\t\t#Cumec\n", + "Cd = Qactual/Qth;\t\t\t#coeff. of discharge\n", + "\n", + "# Results\n", + "print \"Coefficient of discharge : %.2f\"%Cd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of discharge : 0.61\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 1.5;\t\t\t#meter\n", + "h = 1.;\t\t\t#meter\n", + "Volume = math.pi/4*d**2*h;\t\t\t#m**3\n", + "time = 25.;\t\t\t#sec\n", + "Qactual = Volume/time;\t\t\t#Cumec\n", + "H = 10.;\t\t\t#meter\n", + "do = 10./100;\t\t\t#meter\n", + "x = 4.3;\t\t\t#meter\n", + "y = 0.5;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "ao = math.pi/4*do**2;\t\t\t#m**2\n", + "Qth = ao*math.sqrt(2*g*H);\t\t\t#cumec\n", + "Cd = Qactual/Qth;\t\t\t#Coeff. ofdischarge\n", + "print \"Coefficient of discharge : %.3f\"%Cd\n", + "\n", + "Cv = math.sqrt(x**2)/math.sqrt(4*H*y);\t\t\t#Coefficient of velocity\n", + "print \"Coefficient of velocity : %.3f\"%Cv\n", + "\n", + "Cc = Cd/Cv;\t\t\t#coeff. of contraction\n", + "print \"Coefficient of contraction : %.2f\"%Cc\n", + "\n", + "Cr_dash = (1/Cv**2-1);\t\t\t#coeff. of Resistance\n", + "print \"Coefficient. of Resistance : %.2f\"%Cr_dash\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of discharge : 0.643\n", + "Coefficient of velocity : 0.962\n", + "Coefficient of contraction : 0.67\n", + "Coefficient. of Resistance : 0.08\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "do = 2.5/100;\t\t\t#meter\n", + "H = 75./100;\t\t\t#meter\n", + "x = 30./100;\t\t\t#meter\n", + "y = 3.2/100;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "Qactual = 1.186*10**-3;\t\t\t#Cumec\n", + "ao = math.pi/4*do**2;\t\t\t#m**2\n", + "Qth = ao*math.sqrt(2*g*H);\t\t\t#cumec\n", + "Cd = Qactual/Qth;\t\t\t#Coeff. ofdischarge\n", + "print \"Coefficient of discharge : %.2f\"%Cd\n", + "\n", + "Cv = math.sqrt(x**2)/math.sqrt(4*H*y);\t\t\t#Coefficient of velocity\n", + "print \"Coefficient of velocity : %.4f\"%Cv\n", + "\n", + "Cc = Cd/Cv;\t\t\t#coeff. of contraction\n", + "print \"Coefficient of contraction : %.3f\"%Cc\n", + "\n", + "Cr_dash = (1/Cv**2-1);\t\t\t#coeff. of Resistance\n", + "print \"Coefficient. of Resistance : %.3f\"%Cr_dash\n", + "\n", + "#Answers in the book are not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of discharge : 0.63\n", + "Coefficient of velocity : 0.9682\n", + "Coefficient of contraction : 0.651\n", + "Coefficient. of Resistance : 0.067\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "H1 = 4-1;\t\t\t#meter\n", + "H2 = 4.;\t\t\t#meter\n", + "Cv1 = 0.9;\t\t\t#Coefficient of velocity\n", + "Cv2 = 0.9;\t\t\t#Coefficient of velocity\n", + "\n", + "# Calculations\n", + "#Cv1 = Cv2 & x1 = x2 at meeting point\n", + "#x1/math.sqrt(4*H1*y1) = x2/math.sqrt(4*H2*y2)\n", + "y1BYy2 = H2/H1;\n", + "#y1 = 1+y2;\n", + "y2 = 1/(y1BYy2-1);\t\t\t#meter\n", + "y1 = y1BYy2*y2;\t\t\t#meter\n", + "x1 = Cv1*math.sqrt(4*H1*y1);\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Meeting point horizontal & vertical co-ordinates are(x1 & y1 in meter) : %.2f\"%x1,y1\n", + "\n", + "#Answer in the book are not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Meeting point horizontal & vertical co-ordinates are(x1 & y1 in meter) : 6.24 4.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "B = 1.3;\t\t\t#meter\n", + "H1 = 6-(1.8+1.5);\t\t\t#meter\n", + "H2 = 6-1.5;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = 2./3*Cd*B*math.sqrt(2*g)*(H2**(3./2)-H1**(3./2));\t\t\t#m**3/sec\n", + "\n", + "# Results\n", + "print \"Discharge through the orifice in m**3/sec : %.4f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the orifice in m**3/sec : 11.7685\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.62;\t\t\t#Coefficient of discharge\n", + "B = 2.;\t\t\t#meter\n", + "H1 = 3.;\t\t\t#meter\n", + "H2 = 3+1.5;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = 2./3*Cd*B*math.sqrt(2*g)*(H2**(3./2)-H1**(3./2));\t\t\t#m**3/sec or cumec\n", + "\n", + "# Results\n", + "print \"Discharge through the orifice in cumec : %.3f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the orifice in cumec : 15.928\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "B = 1.6;\t\t\t#meter\n", + "H1 = 1500./1000;\t\t\t#meter\n", + "H2 = (1500.+1250)/1000;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "Q = 2./3*Cd*B*math.sqrt(2*g)*(H2**(3./2)-H1**(3./2));\t\t\t#m**3/sec or cumec\n", + "print \"Discharge through the opening in cumec : %.3f\"%Q\n", + "\t\t\t#For small opening\n", + "H = 1.5+1.25/2;\t\t\t#meter\n", + "D = 1.25;\t\t\t#meter\n", + "Qdash = Cd*(B*D)*math.sqrt(2*g*H);\t\t\t#cumec\n", + "Error = (Qdash-Q)/Q*100;\t\t\t#%\n", + "print \"%% of error : %.3f\"%Error\n", + "\n", + "#Answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the opening in cumec : 7.720\n", + "% of error : 0.368\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "B = 1600./1000;\t\t\t#meter\n", + "D = 1250./1000;\t\t\t#meter\n", + "ao = 1.6*1.25;\t\t\t#m**2\n", + "H1 = 2+1.25/2;\t\t\t#meter\n", + "H2 = 0.8+1.25/2;\t\t\t#meter\n", + "H = H1-H2;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = Cd*ao*math.sqrt(2*g*H);\t\t\t#m**3/sec or Cumec\n", + "\n", + "# Results\n", + "print \"Discharge in Cumec : %.3f\"%Q\n", + "\n", + "#Answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in Cumec : 5.823\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "B = 1600./1000;\t\t\t#meter\n", + "D = 1250./1000;\t\t\t#meter\n", + "ao = 1.6*1.25;\t\t\t#m**2\n", + "H1 = 2+1.25;\t\t\t#meter\n", + "H2 = 2;\t\t\t#meter\n", + "H = H1-0.8;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q = 2./3*Cd*B*math.sqrt(2*g)*(H**(3./2)-H2**(3./2))+Cd*B*(H1-H)*math.sqrt(2*g*H);\t\t\t#m**3/sec or Cumec\n", + "\n", + "# Results\n", + "print \"Discharge through the orifice in Cumec : %.2f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the orifice in Cumec : 8.18\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 4;\t\t\t#meter\n", + "d0 = 0.5;\t\t\t#meter\n", + "H1 = 5;\t\t\t#meter\n", + "H2 = 2;\t\t\t#meter\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "ao = math.pi/4*d0**2;\t\t\t#m**2\n", + "A = math.pi/4*d**2;\t\t\t#m**2\n", + "\n", + "# Calculations and Results\n", + "t = 2*A/Cd/ao/math.sqrt(2*g)*(math.sqrt(H1)-math.sqrt(H2))\n", + "print \"Time taken to fall from 5m to 2m(in seconds) : %.1f\"%t\n", + "\t\t\t#For emptying H2 = 0;\n", + "H2 = 0;\t\t\t#meter\n", + "t = 2*A/Cd/ao/math.sqrt(2*g)*(math.sqrt(H1)-math.sqrt(H2))\n", + "print \"Time taken for completely emptying(in seconds) : %.1f\"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken to fall from 5m to 2m(in seconds) : 39.6\n", + "Time taken for completely emptying(in seconds) : 107.7\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "d = 1.2;\t\t\t#meter\n", + "do = 50./1000;\t\t\t#meter\n", + "H = 3.;\t\t\t#meter\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "\n", + "# Calculations\n", + "ao = math.pi/4*do**2;\t\t\t#m**2\n", + "A = math.pi/4*d**2;\t\t\t#m**2\n", + "t = 2*A*math.sqrt(H)/Cd/ao/math.sqrt(2*g);\t\t\t#sec\n", + "\n", + "# Results\n", + "print \"Time taken for emptying the tank is \",math.floor(t/60),\" minute %.1f\"%((t/60-math.floor(t/60))*60),\" seconds.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken for emptying the tank is 12.0 minute 30.8 seconds.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "A = 3.2;\t\t\t#m**2\n", + "a = 10*10**-4;\t\t\t#m**2\n", + "H1 = 5;\t\t\t#meter\n", + "H2 = 2.5;\t\t\t#meter\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "\n", + "# Calculations\n", + "t = 2*A*(math.sqrt(H1)-math.sqrt(H2))/Cd/a/math.sqrt(2*g);\t\t\t#sec\n", + "\n", + "# Results\n", + "print \"Time taken is \",(math.floor(t/60)),\" minute \",round((t/60-math.floor(t/60))*60),\" seconds.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken is 26.0 minute 17.0 seconds.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "import datetime\n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#consmath.tant\n", + "A = 3.2;\t\t\t#m**2\n", + "a = 10*10**-4;\t\t\t#m**2\n", + "H = 5;\t\t\t#meter\n", + "Cd = 0.6;\t\t\t#Coefficient of discharge\n", + "\n", + "# Calculations\n", + "t = 2.*A*math.sqrt(H)/Cd/a/math.sqrt(2*g);\t\t\t#sec\n", + "\n", + "# Results\n", + "print \"Time taken is : in hours, minutes, seconds\", datetime.timedelta(seconds=t)\n", + "#(math.floor(t/3600)),\" hour \",round((t/3600-math.floor(t/3600))*60),\" minute \",(((t/3600-t/3600)*60-(t/3600-t/3600)*60)*60),\" seconds.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken is : in hours, minutes, seconds 1:29:44.733625\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch7.ipynb b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch7.ipynb new file mode 100755 index 00000000..8965cc3d --- /dev/null +++ b/Fluid_Mechanics_by_A._K._Choudhary_and_Om_Prakash/ch7.ipynb @@ -0,0 +1,1155 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:623ec7b54c6f867c29215af300ff18cf72a9c5c9473bc56f1a63e8f6d5b3f414" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Flow Through Pipes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Calculations and Results\n", + "print (\"Part(i)\");\n", + "print (\"Absolute unit of viscosity(in C.G.S) is Poise.\");\n", + "print (\"Poise = 1 dyne-sec/cm**2\");\n", + "print (\"Gravitational unit of viscosity is 1 gm-sec/cm**2.\");\n", + "print (\"On equating we get, 1 gm = 981 dyne\");\n", + "#Let x = 1kg-sec/m**2\n", + "x = 1*10.**3/10**4;\t\t\t#g-sec/cm**2\n", + "x = x*981;\t\t\t#dyne-sec/cm**2 or Poise(Putting 1gm = 981 dyne)\n", + "print \"1 kg-sec/m**2 = \",(x),\" Poise\"\n", + "one_Poise = 1./x;\t\t\t#kg-sec/m**2\n", + "one_Poise = 1/x*9.81;\t\t\t#N-sec/m**2 or Pa-sec(as 1Pa = 1N/m**2)\n", + "print \"1 Poise = \",(one_Poise),\" N-sec/m**2 or Pa-sec\"\n", + "print (\"Part(ii)\");\n", + "print (\"Kinematic viscosity = viscosity/specific_gravity\");\n", + "print (\"Kinematic viscosity C.G.S unit is cm**2/sec. 1cm**2/sec = 1stoke\");\n", + "print (\"Kinematic viscosity M.K.S unit is m**2/sec\");\n", + "\t\t\t#let x = 1;\t\t\t#m**2/sec\n", + "x = 1.;\t\t\t#m**2/sec\n", + "x = x*10**4;\t\t\t#cm**2/sec or stokes\n", + "print \"1 m**2/sec = \",(x),\" cm**2/sec or stoke\"\n", + "one_stoke = 1/x;\t\t\t#m**2/sec\n", + "print \"1 stoke = \",(one_stoke),\" m**2/sec\"\n", + "print (\"1 stoke = 100 centi-stokes\");\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(i)\n", + "Absolute unit of viscosity(in C.G.S) is Poise.\n", + "Poise = 1 dyne-sec/cm**2\n", + "Gravitational unit of viscosity is 1 gm-sec/cm**2.\n", + "On equating we get, 1 gm = 981 dyne\n", + "1 kg-sec/m**2 = 98.1 Poise\n", + "1 Poise = 0.1 N-sec/m**2 or Pa-sec\n", + "Part(ii)\n", + "Kinematic viscosity = viscosity/specific_gravity\n", + "Kinematic viscosity C.G.S unit is cm**2/sec. 1cm**2/sec = 1stoke\n", + "Kinematic viscosity M.K.S unit is m**2/sec\n", + "1 m**2/sec = 10000.0 cm**2/sec or stoke\n", + "1 stoke = 0.0001 m**2/sec\n", + "1 stoke = 100 centi-stokes\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "mu = 0.009;\t\t\t#kg-sec/m**2\n", + "rho = 0.89;\t\t\t#sp. gravity\n", + "Q = 4.*10**-3;\t\t\t#m**3/sec\n", + "d = 30./1000;\t\t\t#meter\n", + "\n", + "# Calculations and Results\n", + "v = mu/rho;\t\t\t#m**2/s\n", + "print \"Kinematic viscosity in m**2/sec : %.4f\"%v\n", + "A = math.pi*d**2/4;\t\t\t#m**2\n", + "vm = Q/A;\t\t\t#m/s\n", + "Rn = vm*d/v;\t\t\t#Reynolds no.\n", + "print \"Reynolds number for flow : %.1f\"%Rn\n", + "print (\"This is laminar flow because Rn no. is less than 2000.\");\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinematic viscosity in m**2/sec : 0.0101\n", + "Reynolds number for flow : 16.8\n", + "This is laminar flow because Rn no. is less than 2000.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "d = 200./1000;\t\t\t#meter\n", + "Q = 40.*10**-3;\t\t\t#m**3/sec\n", + "A = math.pi*d**2/4;\t\t\t#m**2\n", + "vm = Q/A;\t\t\t#m/s\n", + "v = 0.25*10**-4;\t\t\t#m**2/s\n", + "\n", + "# Calculations and Results\n", + "Rn = vm*d/v;\t\t\t#Reynolds no.\n", + "print \"Reynolds number for flow : %.f\"%Rn\n", + "print (\"This is turbulent flow because Rn no. is greater than 4000.\");\n", + "print \"New Reynolds number for flow : %.f\"%(Rn/8)\n", + "print (\"This is laminar flow because Rn no. is less than 2000.\");\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reynolds number for flow : 10186\n", + "This is turbulent flow because Rn no. is greater than 4000.\n", + "New Reynolds number for flow : 1273\n", + "This is laminar flow because Rn no. is less than 2000.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 30./100;\t\t\t#meter\n", + "L = 100.;\t\t\t#meter\n", + "v = 0.01*10**-4;\t\t\t#m**2/s\n", + "a = 3.;\t\t\t#m/s\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "Rn = a*D/v;\t\t\t#Reynolds no.\n", + "\n", + "# Calculations\n", + "f = 0.079/Rn**(1./4);\t\t\t#umath.sing blasius formula \n", + "hf = 4*f*L/D*a**2/2/g;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Head lost in meter : %.2f\"%hf\n", + "\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost in meter : 1.57\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 30./100;\t\t\t#meter\n", + "L = 500.;\t\t\t#meter\n", + "Q = 300.*10**-3;\t\t\t#m**2/sec\n", + "f = 0.0008;\t\t\t#coeff. of friction\n", + "\n", + "# Calculations\n", + "v = Q/(math.pi/4*D**2);\t\t\t#m/s\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "hf = 4*f*L*v**2/D/2/g;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Difference in elevation in meter : %.2f\"%hf\n", + "\n", + "#Answer in the book is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in elevation in meter : 4.90\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 20./100;\t\t\t#meter\n", + "v = 3.;\t\t\t#m/s\n", + "v1 = 0.01*10**-3;\t\t\t#m**2/sec\n", + "Re = D*v/v1;\t\t\t#Reynolds number\n", + "f = 0.002+0.09/Re**0.3;\t\t\t#coeff. of friction\n", + "L = 5.;\t\t\t#meter\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "\n", + "# Calculations\n", + "hf = 4*f*L*v**2/D/2/g;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Head lost due to friction in meter : %.3f\"%hf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost due to friction in meter : 0.244\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "D = 80./1000;\t\t\t#meter\n", + "Q = 600.*10**-3/60;\t\t\t#m**3/sec\n", + "L = 1.*10**3;\t\t\t#meter\n", + "f = 0.02;\t\t\t#coefficient of friction\n", + "\n", + "# Calculations\n", + "v = Q/(math.pi/4*D**2);\t\t\t#m/s\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "hf = 4*f*L*v**2/D/2/g;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Head lost due to friction in meter : %.3f\"%hf\n", + "\n", + "#Answer is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost due to friction in meter : 201.726\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "f = 0.02;\t\t\t#coefficient of friction\n", + "Cc = 0.62;\t\t\t#coefficient of contraction\n", + "\n", + "# Calculations\n", + "#Portion AB\n", + "Q1 = 50.*10**-3;\t\t\t#m**3/sec\n", + "D1 = 150./1000;\t\t\t#meter\n", + "v1 = Q1/(math.pi/4*D1**2);\t\t\t#m/s\n", + "hr = 0.5*v1**2/2/g;\t\t\t#meter\n", + "L1 = 200.;\t\t\t#meter\n", + "hf1 = 4*f*L1*v1**2/2/g/D1;\t\t\t#meter\n", + "D2 = 200./1000;\t\t\t#meter\n", + "v2 = Q1/(math.pi/4*D2**2);\t\t\t#m/s\n", + "hc1 = (v1-v2)**2/2/g;\t\t\t#meter\n", + "L2 = 500.;\t\t\t#meter\n", + "hf2 = 4*f*L2*v2**2/2/g/D2;\t\t\t#meter\n", + "d = 75./1000;\t\t\t#meter\n", + "ho = ((math.pi/4*D2**2)/Cc/((math.pi/4*D2**2)-(math.pi/4*d**2))-1)**2*v2**2/2/g;\t\t\t#meter\n", + "D3 = 120./1000;\t\t\t#meter\n", + "v3 = Q1/(math.pi/4*D3**2);\t\t\t#m/s\n", + "hc2 = v3**2/2/g*(1/Cc-1)**2;\t\t\t#meter\n", + "L3 = 500.;\t\t\t#meter\n", + "hf3 = 4*f*L3*v3**2/2/g/D3;\t\t\t#meter\n", + "Kb = 0.25;\t\t\t#assumed\n", + "hb1 = Kb*v3**2/2/g;\t\t\t#meter\n", + "D4 = 120./1000;\t\t\t#meter\n", + "v4 = Q1/(math.pi/4*D4**2);\t\t\t#m/s\n", + "L4 = 500.;\t\t\t#meter\n", + "hf4 = 4*f*L4*v4**2/2/g/D4;\t\t\t#meter\n", + "hb2 = Kb*v3**2/2/g;\t\t\t#meter\n", + "L5 = 500.;\t\t\t#meter\n", + "hf5 = 4*f*L5*v4**2/2/g/D4;\t\t\t#meter\n", + "h_outlet = v3**2/2/g;\t\t\t#meter\n", + "h_total = hr+hf1+hc1+hf2+ho+hc2+hf3+hb1+hf4+hb2+hf5+h_outlet;\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Total loss of head in meter : %.f\"%h_total\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total loss of head in meter : 1068\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "Cc = 0.62;\t\t\t#coefficient of contraction\n", + "D1 = 150./1000;\t\t\t#meter\n", + "D2 = 100./1000;\t\t\t#meter\n", + "Q = 2.7/60;\t\t\t#m**3/sec\n", + "p1 = 0.8*10**4;\t\t\t#kg/m**2\n", + "\n", + "# Calculations\n", + "v1 = Q/(math.pi/4*D1**2);\t\t\t#m/s\n", + "v2 = Q/(math.pi/4*D2**2);\t\t\t#m/s\n", + "hc = v2**2/2/g*(1/Cc-1)**2;\t\t\t#meter\n", + "w = 1000;\t\t\t#kg/m**3\n", + "p2 = (v1**2/2/g+p1/w-v2**2/2/g-hc)*w;\t\t\t#kg/m**2(Z1 = Z2)\n", + "p2 = p2*10**-4;\t\t\t#kg/cm**2\n", + "\n", + "# Results\n", + "print \"Intensity of pressure in kg/cm**2 : %.4f\"%p2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity of pressure in kg/cm**2 : 0.6029\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "L = 3.*1000;\t\t\t#meter\n", + "hf = 20.;\t\t\t#meter\n", + "Q = 1.;\t\t\t#m**3/sec\n", + "f = 0.02;\t\t\t#coeff. of friction\n", + "\n", + "# Calculations\n", + "#v = math.sqrt(hf*2*g/4/f/L/D);\t\t\t#it is v**2*D\n", + "D2v = Q/(math.pi/4);\t\t\t#it is D**2*v\n", + "D = (Q/(math.pi/4)/math.sqrt(hf*2*g/4/f/L))**(2./5);\t\t\t#meter\n", + "D = D*1000;\t\t\t#mm\n", + "\n", + "# Results\n", + "print \"Diameter of pipe in mm : %.f\"%D\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of pipe in mm : 998\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 Page No : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "D1 = 100./1000;\t\t\t#meter\n", + "D2 = 200./1000;\t\t\t#meter\n", + "PQ = 100.;\t\t\t#meter\n", + "QR = 100.;\t\t\t#meter\n", + "slope = 1./100;\t\t\t#upward slope\n", + "Q = 0.02;\t\t\t#cumec\n", + "p1 = 2.;\t\t\t#kg/cm**2(Pressure in 100 mm dia pipe)\n", + "f = 0.02;\t\t\t#unitless\n", + "Q_P = 100./100;\t\t\t#meter(Point Q hight respect to point P)\n", + "Q_R = 200./100;\t\t\t#meter(Point Q hight respect to point R)\n", + "\n", + "# Calculations and Results\n", + "v1 = Q/(math.pi/4*D1**2);\t\t\t#m/sec\n", + "v2 = Q/(math.pi/4*D2**2);\t\t\t#m/sec\n", + "hf1 = 4*f*PQ*v1**2/(2*g*D1);\t\t\t#meter\n", + "hf2 = 4*f*QR*v2**2/(2*g*D2);\t\t\t#meter\n", + "hse = (v1-v2)**2/2/g;\t\t\t#meter(loss due to sudden enlargement)\n", + "#Section PQ\n", + "Z1P = 0;\t\t\t#meter(Datum Head)\n", + "H1P = v1**2/2/g;\t\t\t#meter(velocity Head)\n", + "p1BYw = p1*10**4/1000;\t\t\t#meter(Pressure Head at P)\n", + "Z1Q = 1;\t\t\t#meter(Datum Head)\n", + "H1Q = v2**2/2/g;\t\t\t#meter(velocity Head)\n", + "#Applying bernaullis theorem\n", + "p2BYw = Z1P+p1BYw+H1P-Z1Q-H1Q-hf1;\t\t\t#meter(Pressure Head at Q)\n", + "\n", + "print \"Pressure Head at point P(m)\",p1BYw\n", + "print \"Velocity Head at point P(m) %.3f\"%H1P\n", + "print \"Pressure Head at point Q(m) : %.3f\"%p2BYw\n", + "\n", + "#Section QR\n", + "#Applying bernaullis theorem\n", + "p2dashBYw = p2BYw+H1P-H1Q-hse;\t\t\t#meter(Pressure Head at Q)\n", + "Z2 = 1;\t\t\t#meter(Datum Head)\n", + "H1Q = v2**2/2/g;\t\t\t#meter(velocity Head)\n", + "Z3 = 2;\t\t\t#meter(Datum Head at R)\n", + "H1R = v2**2/2/g;\t\t\t#meter(velocity Head at R)\n", + "\n", + "#Applying bernaullis theorem\n", + "p3BYw = Z2+p2dashBYw+H1Q-Z3-H1R-hf2;\t\t\t#meter(Pressure Head at R)\n", + "print \"Velocity Head at point Q after enlargemant(m) : %.2f\"%H1Q\n", + "print \"Pressure Head at point Q after enlargemant(m) : %.3f\"%p2dashBYw\n", + "print \"Pressure Head at point R(m) : %.3f\"%p3BYw\n", + "print \"Velocity Head at point R(m) : %.3f\"%H1R\n", + "\n", + "\n", + "#Answer in the book is wrong for some calculations.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Head at point P(m) 20.0\n", + "Velocity Head at point P(m) 0.331\n", + "Pressure Head at point Q(m) : -7.131\n", + "Velocity Head at point Q after enlargemant(m) : 0.02\n", + "Pressure Head at point Q after enlargemant(m) : -7.007\n", + "Pressure Head at point R(m) : -8.833\n", + "Velocity Head at point R(m) : 0.021\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "D1 = 400./1000;\t\t\t#meter\n", + "D2 = 300./1000;\t\t\t#meter\n", + "D3 = 200./1000;\t\t\t#meter\n", + "v1 = 3;\t\t\t#m/s\n", + "v2 = 2;\t\t\t#m/s\n", + "\n", + "# Calculations and Results\n", + "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", + "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", + "A3 = math.pi/4*D3**2;\t\t\t#m**2\n", + "Q1 = A1*v1;\t\t\t#cumec\n", + "print \"Discharge in pipe 1 in cumec : %.4f\"%Q1\n", + "\n", + "Q2 = A2*v2;\t\t\t#cumec\n", + "Q3 = Q1-Q2;\t\t\t#cumec\n", + "v3 = Q3/A3;\t\t\t#m/s\n", + "print \"Velocity of water in 200mm pipe in m/s : \",v3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in pipe 1 in cumec : 0.3770\n", + "Velocity of water in 200mm pipe in m/s : 7.5\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "D1 = 100./1000;\t\t\t#meter\n", + "D2 = 300./1000;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "Q1 = 0.01;\t\t\t#m**3/sec\n", + "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", + "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", + "\t\t\t#hf1 = hf2\n", + "Q2 = math.sqrt(D2/(D1)*(Q1/A1)**2*A2**2);\t\t\t#cumec\n", + "\n", + "# Results\n", + "print \"Discharge throough 300mm pipe in cumec : %.3f\"%Q2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge throough 300mm pipe in cumec : 0.156\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tanty\n", + "f = 0.02;\t\t\t#coeff. of friction\n", + "PQ = 500.;\t\t\t#meter\n", + "QR = 1000.;\t\t\t#meter\n", + "RS = 500.;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "hf = 10+PQ/62.5+QR/125-RS/100-2;\t\t\t#meter\n", + "l = 500+1000+500;\t\t\t#/meter\n", + "D = 250./1000;\t\t\t#meter\n", + "v = math.sqrt(hf*2*g*D/4/f/l);\t\t\t#m/s\n", + "Q = math.pi/4*D**2*v;\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Discharge in pipe line in litres/sec : %.f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in pipe line in litres/sec : 37\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "slope = 1./125;\t\t\t#slope\n", + "hA = 12.;\t\t\t#meter(level of water in reservoir A)\n", + "hB = 1.5;\t\t\t#meter(level of water in reservoir B)\n", + "L1 = 500.;\t\t\t#meter\n", + "D1 = 250./1000;\t\t\t#meter\n", + "L2 = 1000.;\t\t\t#meter\n", + "D2 = 200./1000;\t\t\t#meter\n", + "L3 = 500.;\t\t\t#meter\n", + "D3 = 150./1000;\t\t\t#meter\n", + "\n", + "# Calculations\n", + "f = 0.02;\t\t\t#coeff. of friction\n", + "fall_level = (L1+L2+L3)*slope;\t\t\t#meter\n", + "H = hA+fall_level-hB;\t\t\t#meter(Head available for flow)\n", + "v2BYv1 = (D1/D2)**2;\n", + "v3BYv1 = (D1/D3)**2;\n", + "#H = hf = hf1+hf2+hf3\n", + "#H = (4*f*L1*v1**2/(2*g*D1)+4*f*L2*v2**2/(2*g*D2)+4*f*L3*v3**2/(2*g*D3))\n", + "v1 = math.sqrt(H/(4*f*L1/(2*g*D1)+4*f*L2*v2BYv1**2/(2*g*D2)+4*f*L3*v3BYv1**2/(2*g*D3)));\t\t\t#m/s\n", + "Q = math.pi*D1**2/4*v1;\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Discharge in pipe line in litres/sec : %.1f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in pipe line in litres/sec : 19.8\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "l = 4.;\t\t\t#km\n", + "n = 5000.;\t\t\t#habimath.tants\n", + "Ch = 200.;\t\t\t#litres/day(habimath.tant capacity)\n", + "t = 10.;\t\t\t#hour(daiy supply time)\n", + "hf = 20.;\t\t\t#meter(Head loss)\n", + "f = 0.008;\t\t\t#coeff. of friction\n", + "\n", + "# Calculations\n", + "Qty = n*Ch/2;\t\t\t#litres(Water supplied in 10 hours)\n", + "Q = Qty/(t*60*60);\t\t\t#litres/sec\n", + "Q = Q/1000;\t\t\t#m**3/sec\n", + "d = (f*l*1000*Q**2/3.0257/hf)**(1./5);\t\t\t#meter\n", + "\n", + "# Results\n", + "print \"Diameter of pipe(mm) : %.f\"%(d*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of pipe(mm) : 159\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "D1 = 50./1000;\t\t\t#meter\n", + "D2 = 100./1000;\t\t\t#meter\n", + "l1 = 100.\n", + "l2 = 100.;\t\t\t#meter\n", + "hf1 = 10.;\t\t\t#meter(level difference)\n", + "f = 0.008;\t\t\t#coeff. of friction\n", + "\n", + "# Calculations and Results\n", + "Q2BYQ1 = math.sqrt((l1/l2)*(D2/D1)**5);\t\t\t#as hf1 = hf2\n", + "Q1 = math.sqrt(hf1/f/l1*(3.0257*D1**5));\t\t\t#m**3/sec\n", + "Q2 = Q2BYQ1*Q1;\t\t\t#m**3/sec or cumec\n", + "print \"Rate of flow of pipe 1(m**3/sec) : %.2e\"%Q1\n", + "print \"Rate of flow of pipe 2(m**3/sec) : %.3f\"%Q2\n", + "\n", + "Q = Q1+Q2;\t\t\t#m**3/sec(Total Discharge)\n", + "d = (f*l1*Q**2/3.0257/hf1)**(1./5);\t\t\t#meter\n", + "print \"Diameter of math.single pipe(mm) : %.1f\"%(d*1000)\n", + "\n", + "\n", + "#Answer in the book is not accurate.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of flow of pipe 1(m**3/sec) : 3.44e-03\n", + "Rate of flow of pipe 2(m**3/sec) : 0.019\n", + "Diameter of math.single pipe(mm) : 106.7\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "D = 30./100;\t\t\t#meter\n", + "l = 400.;\t\t\t#meter\n", + "Q = 300.;\t\t\t#litres/sec\n", + "f = 0.008;\t\t\t#coeff. of friction\n", + "Q = Q*10**-3;\t\t\t#m**3/sec\n", + "\n", + "# Calculations\n", + "A = math.pi*D**2/4;\t\t\t#m**2\n", + "v = Q/A;\t\t\t#m/s(velocity of flow)\n", + "h1 = 0.5*v**2/2/g;\t\t\t#meter(Head loss at entrance to a pipe)\n", + "h2 = 4*f*l*v**2/(2*g*D);\t\t\t#meter(Head loss due to friction)\n", + "h3 = v**2/2/g;\t\t\t#meter(Head loss at entrance of reservoir)\n", + "H = h1+h2+h3;\t\t\t#meter(Difference of water level)\n", + "\n", + "# Results\n", + "print \"Difference of water level between two reservoir(meter) : %.3f\"%H\n", + "\n", + "#Answer in the book is not accurate as h2 is calculated wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference of water level between two reservoir(meter) : 40.548\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "D = 150./1000;\t\t\t#meter\n", + "l = 70.;\t\t\t#meter\n", + "H = 2.6;\t\t\t#meter(head of water)\n", + "f = 0.01;\t\t\t#coeff. of friction\n", + "\n", + "# Calculations\n", + "#Applyong Bernoullis theorem\n", + "v = math.sqrt(H*(2/g*(1+0.5+4*f*l/D))/4);\t\t\t#m/s\n", + "Q = math.pi*D**2/4*v;\t\t\t#m**3/sec\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "\n", + "# Results\n", + "print \"Discharge through the pipe(litres/sec) : %.1f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the pipe(litres/sec) : 28.9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "Cv = 0.97;\t\t\t#coeffiecient of velocity\n", + "Cc = 0.95;\t\t\t#coeffiecient\n", + "Dn = 50./1000;\t\t\t#meter(Nozzle diameter)\n", + "D = 100./1000;\t\t\t#meter(Pipe diameter)\n", + "p = 6.867;\t\t\t#N/cm**2(Pressure at the base of nozzle)\n", + "\n", + "# Calculations and Results\n", + "Hb = p*10**4/(g*1000)\t\t\t#meter(Head at the base of nozzle)\n", + "v = Cv*math.sqrt(2*g*Hb);\t\t\t#m/s(velocty of jet)\n", + "print \"Velocity in the jet(m/s) : %.2f\"%v\n", + "A = math.pi/4*Dn**2;\t\t\t#m**2(Cross sction of jet)\n", + "Q = Cc*A*v;\t\t\t#m**3/sec(Discharge)\n", + "Q = Q*1000;\t\t\t#litres/sec\n", + "print \"Rate of discharge(litres/second) : %.2f\"%Q\n", + "E = g*1000*Q/1000*Hb/1000;\t\t\t#kW(Energy transmitted)\n", + "print \"Energy per second n the jet(kW) : %.2f\"%E\n", + "\n", + "#Answer in the book is not accurate.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in the jet(m/s) : 11.37\n", + "Rate of discharge(litres/second) : 21.20\n", + "Energy per second n the jet(kW) : 1.46\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "D = 100./1000;\t\t\t#meter(Pipe diameter)\n", + "L = 700.;\t\t\t#meter(Total length)\n", + "Lin = 300.;\t\t\t#meter(inlet length)\n", + "hf = 10.;\t\t\t#meter(Available head)\n", + "h = 1.4;\t\t\t#meter(height)\n", + "f = 0.02;\t\t\t#coefficient of friction\n", + "\n", + "# Calculations and Results\n", + "v = math.sqrt(hf*2*g*D/4/f/L);\t\t\t#m/s\n", + "Q = math.pi*D**2/4*v*1000;\t\t\t#litres/sec\n", + "print \"Discharge in pipe(litres/second) : %.2f\"%Q\n", + "\n", + "#Applying Brnaullis theorem\n", + "p1 = 0\n", + "v1 = 0\n", + "Z1 = 0;\t\t\t#(Neglecting minor losses)\n", + "v2 = v;\t\t\t#m/s\n", + "Z2 = h;\t\t\t#meter\n", + "hf = 4*f*Lin*v**2/(2*g*D);\t\t\t#meter\n", + "p2BYw = -v2**2/2/g-Z2-hf;\t\t\t#meter of water\n", + "hatm = 10.3;\t\t\t#meter(Atmospheric pressure head)\n", + "habs = p2BYw+hatm;\t\t\t#meter(Absolute pressure head)\n", + "print \"Pressure at the summit of siphon(meter) : %.3f\"%habs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge in pipe(litres/second) : 4.65\n", + "Pressure at the summit of siphon(meter) : 4.596\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "D = 150./1000;\t\t\t#meter(Pipe diameter)\n", + "Q = 40.;\t\t\t#litres/sec(rate of discharge)\n", + "l = 500.;\t\t\t#meter(valve dismath.tance)\n", + "T = 0.5;\t\t\t#second\n", + "\n", + "# Calculations\n", + "v = Q/1000/(math.pi/4*D**2);\t\t\t#m/s(velocity of flow)\n", + "pi = 1000/g*(l*v/T);\t\t\t#kg/m**2\n", + "\n", + "# Results\n", + "print \"Increase in pressure intensity(kg/m**2) : %.3e\"%pi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in pressure intensity(kg/m**2) : 2.307e+05\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23 Page No : 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\n", + "# Variables :\n", + "g = 9.81;\t\t\t#gravity consmath.tant\n", + "l = 10000.;\t\t\t#meter(length of pipe line)\n", + "D = 0.2;\t\t\t#meter(Diameter of pipe)\n", + "p = 60.*10**5;\t\t\t#N/m**2\n", + "f = 0.007;\t\t\t#coefficient of friction\n", + "w = g*1000.;\t\t\t#N/m**3\n", + "\n", + "# Calculations\n", + "H = p/w;\t\t\t#meter\n", + "hf = H/3;\t\t\t#meter(friction head loss is 1/3rd)\n", + "v = math.sqrt(hf*2*g*D/4/f/l);\t\t\t#m/s\n", + "P = w*math.pi*D**2/4*v*(H-hf)/1000;\t\t\t#kW\n", + "\n", + "# Results\n", + "print \"Maximum power(kW) : %.3f\"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum power(kW) : 212.410\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Power_With_Applications_by_A._Esposito/README.txt b/Fluid_Power_With_Applications_by_A._Esposito/README.txt new file mode 100644 index 00000000..05eb1920 --- /dev/null +++ b/Fluid_Power_With_Applications_by_A._Esposito/README.txt @@ -0,0 +1,10 @@ +Contributed By: yashwanth kumar mada +Course: btech +College/Institute/Organization: K L university +Department/Designation: cse +Book Title: Fluid Power With Applications +Author: A. Esposito +Publisher: Pearson Prentice Hall +Year of publication: 2005 +Isbn: 8177585800 +Edition: 6 \ No newline at end of file diff --git a/Fundamentals_Of_Physical_Chemistry/README.txt b/Fundamentals_Of_Physical_Chemistry/README.txt new file mode 100755 index 00000000..2c679016 --- /dev/null +++ b/Fundamentals_Of_Physical_Chemistry/README.txt @@ -0,0 +1,10 @@ +Contributed By: Manikandan D +Course: me +College/Institute/Organization: Government College of Engineering,Salem +Department/Designation: Thermal Engineering +Book Title: Fundamentals Of Physical Chemistry +Author: H. D. Crockford, Samuel B.Knight +Publisher: John Wiley And Sons Inc. +Year of publication: 1960 +Isbn: 9780471188131 +Edition: 2 \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch10.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch10.png new file mode 100755 index 00000000..4a46004c Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch10.png differ diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch10_1.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch10_1.png new file mode 100755 index 00000000..4a46004c Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch10_1.png differ diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch5.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch5.png new file mode 100755 index 00000000..c82a6a63 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch5.png differ diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch5_1.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch5_1.png new file mode 100755 index 00000000..c82a6a63 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch5_1.png differ diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch9.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch9.png new file mode 100755 index 00000000..fadfab16 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch9.png differ diff --git a/Heat_Transfer:_Principles_And_Applications/screenshots/ch9_1.png b/Heat_Transfer:_Principles_And_Applications/screenshots/ch9_1.png new file mode 100755 index 00000000..fadfab16 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications/screenshots/ch9_1.png differ diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10.ipynb new file mode 100755 index 00000000..16b86a12 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eabf74829d7cc0ff844760e8523411bb702a4577131e0e0e16e231f5c0d67119" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Unsteady State And Multidimensional Heat Conduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 0.05 \t\t\t#m,thickness of margarine slab\n", + "ro = 990. \t\t\t#Kg/m**3, density of margarine slab \n", + "cp = 0.55 \t\t\t#Kcal/kg C, ddpecific heat of slab\n", + "k = 0.143 \t\t\t#kcal/h mC, thermal conductivity of slab\n", + "Ti = 4. \t\t\t#C, initial temp\n", + "To = 25. \t\t\t#C, ambient temp.\n", + "t = 4. \t\t\t#hours, time\n", + "h = 8. \t\t\t#kcal/h m**2 C\n", + "\n", + "#calculation\n", + "Fo = k*t/(ro*cp*l**2) \t\t\t#, fourier no.\n", + "Bi = h*l/k \t\t\t#Biot no.\n", + "#from fig. 10.6 a\n", + "Tcbar = 0.7 \t\t\t#Tcbar = (Tc-To)/(Ti-To)\n", + "Tc = To+Tcbar*(Ti-To) \t\t\t#C, centre temp.\n", + "#from fig 10.6 b\n", + "#(T-To)/(Tc-To) = 0.382\n", + "T = 0.382*(Tc-To)+To \t\t\t#c,top surface temp.\n", + "#again from fig. 10.6 b\n", + "Tm = 0.842*(Tc-To)+To \t\t\t#, mid plane temp.\n", + "\n", + "# Results\n", + "print \"The bottom surface temperature of given slab is %.1f C\"%(Tc);\n", + "print \"The top surface temperature of given slab is %.1f C\"%(T);\n", + "print \"The mid plane temperature of given slab is %.1f C\"%(Tm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bottom surface temperature of given slab is 10.3 C\n", + "The top surface temperature of given slab is 19.4 C\n", + "The mid plane temperature of given slab is 12.6 C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ti = 870. \t\t\t#C, initial temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tc = 200. \t\t\t#C, centre line temp.\n", + "h = 2000. \t\t\t#W/m**2 C, surface heat transfer coefficient\n", + "a = 0.05 \t\t\t#m, radius of cylinder \n", + "k = 20. \t\t\t#W/m C, thermal conductivity\n", + "ro = 7800. \t\t\t#kg/m**3, density\n", + "cp = 0.46*10**3 \t\t\t#j/kg C, specific heat\n", + "\n", + "#calculation\n", + "#i\n", + "Bi = h*a/k \t\t\t#Biot no.\n", + "alpha = k/(ro*cp) \t\t\t#m**2/C, thermal diffusivity\n", + "Tcbar = (Tc-To)/(Ti-To) \t\t\t# dimensionless centre line temp.\n", + "#from fig 10.7 a\n", + "fo = 0.51 \t\t\t#fourier no. fo = alpha*t/a**2\n", + "t = fo*a**2/alpha \t\t\t#s, time\n", + "\n", + "#ii\n", + "#at the half radius, r/a = 0.5 & Bi = 5\n", + "T = To+0.77*(Tc-To) \t\t\t#from fig. 10.7 b\n", + "\n", + "#iii\n", + "x = Bi**2*fo\n", + "#for x = 12.75 & Bi = 5.0. fig.10.9 b gives\n", + "#q/qi = 0.83\n", + "qi = math.pi*a**2*(1)*ro*cp*(Ti-To) \t\t\t#kj, initial amount of heat energy \n", + " #present in 1 m length of shaft\n", + "q = 0.83*qi \t\t\t#j, amount of heat transfered \n", + "\n", + "# Results\n", + "print \"i) time required for the cantre-line temp.to drop down to 200 C is %.0f s\"%(t);\n", + "print \"ii)the temp. at half radius at that moment is %.0f C \"%(T);\n", + "print \"iii)the amount of heat that has been transfered to the liquid is %d Kj\"%(q*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) time required for the cantre-line temp.to drop down to 200 C is 229 s\n", + "ii)the temp. at half radius at that moment is 161 C \n", + "iii)the amount of heat that has been transfered to the liquid is 19647 Kj\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_1.ipynb new file mode 100755 index 00000000..16b86a12 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_1.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eabf74829d7cc0ff844760e8523411bb702a4577131e0e0e16e231f5c0d67119" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Unsteady State And Multidimensional Heat Conduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 0.05 \t\t\t#m,thickness of margarine slab\n", + "ro = 990. \t\t\t#Kg/m**3, density of margarine slab \n", + "cp = 0.55 \t\t\t#Kcal/kg C, ddpecific heat of slab\n", + "k = 0.143 \t\t\t#kcal/h mC, thermal conductivity of slab\n", + "Ti = 4. \t\t\t#C, initial temp\n", + "To = 25. \t\t\t#C, ambient temp.\n", + "t = 4. \t\t\t#hours, time\n", + "h = 8. \t\t\t#kcal/h m**2 C\n", + "\n", + "#calculation\n", + "Fo = k*t/(ro*cp*l**2) \t\t\t#, fourier no.\n", + "Bi = h*l/k \t\t\t#Biot no.\n", + "#from fig. 10.6 a\n", + "Tcbar = 0.7 \t\t\t#Tcbar = (Tc-To)/(Ti-To)\n", + "Tc = To+Tcbar*(Ti-To) \t\t\t#C, centre temp.\n", + "#from fig 10.6 b\n", + "#(T-To)/(Tc-To) = 0.382\n", + "T = 0.382*(Tc-To)+To \t\t\t#c,top surface temp.\n", + "#again from fig. 10.6 b\n", + "Tm = 0.842*(Tc-To)+To \t\t\t#, mid plane temp.\n", + "\n", + "# Results\n", + "print \"The bottom surface temperature of given slab is %.1f C\"%(Tc);\n", + "print \"The top surface temperature of given slab is %.1f C\"%(T);\n", + "print \"The mid plane temperature of given slab is %.1f C\"%(Tm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bottom surface temperature of given slab is 10.3 C\n", + "The top surface temperature of given slab is 19.4 C\n", + "The mid plane temperature of given slab is 12.6 C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ti = 870. \t\t\t#C, initial temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tc = 200. \t\t\t#C, centre line temp.\n", + "h = 2000. \t\t\t#W/m**2 C, surface heat transfer coefficient\n", + "a = 0.05 \t\t\t#m, radius of cylinder \n", + "k = 20. \t\t\t#W/m C, thermal conductivity\n", + "ro = 7800. \t\t\t#kg/m**3, density\n", + "cp = 0.46*10**3 \t\t\t#j/kg C, specific heat\n", + "\n", + "#calculation\n", + "#i\n", + "Bi = h*a/k \t\t\t#Biot no.\n", + "alpha = k/(ro*cp) \t\t\t#m**2/C, thermal diffusivity\n", + "Tcbar = (Tc-To)/(Ti-To) \t\t\t# dimensionless centre line temp.\n", + "#from fig 10.7 a\n", + "fo = 0.51 \t\t\t#fourier no. fo = alpha*t/a**2\n", + "t = fo*a**2/alpha \t\t\t#s, time\n", + "\n", + "#ii\n", + "#at the half radius, r/a = 0.5 & Bi = 5\n", + "T = To+0.77*(Tc-To) \t\t\t#from fig. 10.7 b\n", + "\n", + "#iii\n", + "x = Bi**2*fo\n", + "#for x = 12.75 & Bi = 5.0. fig.10.9 b gives\n", + "#q/qi = 0.83\n", + "qi = math.pi*a**2*(1)*ro*cp*(Ti-To) \t\t\t#kj, initial amount of heat energy \n", + " #present in 1 m length of shaft\n", + "q = 0.83*qi \t\t\t#j, amount of heat transfered \n", + "\n", + "# Results\n", + "print \"i) time required for the cantre-line temp.to drop down to 200 C is %.0f s\"%(t);\n", + "print \"ii)the temp. at half radius at that moment is %.0f C \"%(T);\n", + "print \"iii)the amount of heat that has been transfered to the liquid is %d Kj\"%(q*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) time required for the cantre-line temp.to drop down to 200 C is 229 s\n", + "ii)the temp. at half radius at that moment is 161 C \n", + "iii)the amount of heat that has been transfered to the liquid is 19647 Kj\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_2.ipynb new file mode 100755 index 00000000..16b86a12 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch10_2.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eabf74829d7cc0ff844760e8523411bb702a4577131e0e0e16e231f5c0d67119" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Unsteady State And Multidimensional Heat Conduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 444" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 0.05 \t\t\t#m,thickness of margarine slab\n", + "ro = 990. \t\t\t#Kg/m**3, density of margarine slab \n", + "cp = 0.55 \t\t\t#Kcal/kg C, ddpecific heat of slab\n", + "k = 0.143 \t\t\t#kcal/h mC, thermal conductivity of slab\n", + "Ti = 4. \t\t\t#C, initial temp\n", + "To = 25. \t\t\t#C, ambient temp.\n", + "t = 4. \t\t\t#hours, time\n", + "h = 8. \t\t\t#kcal/h m**2 C\n", + "\n", + "#calculation\n", + "Fo = k*t/(ro*cp*l**2) \t\t\t#, fourier no.\n", + "Bi = h*l/k \t\t\t#Biot no.\n", + "#from fig. 10.6 a\n", + "Tcbar = 0.7 \t\t\t#Tcbar = (Tc-To)/(Ti-To)\n", + "Tc = To+Tcbar*(Ti-To) \t\t\t#C, centre temp.\n", + "#from fig 10.6 b\n", + "#(T-To)/(Tc-To) = 0.382\n", + "T = 0.382*(Tc-To)+To \t\t\t#c,top surface temp.\n", + "#again from fig. 10.6 b\n", + "Tm = 0.842*(Tc-To)+To \t\t\t#, mid plane temp.\n", + "\n", + "# Results\n", + "print \"The bottom surface temperature of given slab is %.1f C\"%(Tc);\n", + "print \"The top surface temperature of given slab is %.1f C\"%(T);\n", + "print \"The mid plane temperature of given slab is %.1f C\"%(Tm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bottom surface temperature of given slab is 10.3 C\n", + "The top surface temperature of given slab is 19.4 C\n", + "The mid plane temperature of given slab is 12.6 C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ti = 870. \t\t\t#C, initial temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tc = 200. \t\t\t#C, centre line temp.\n", + "h = 2000. \t\t\t#W/m**2 C, surface heat transfer coefficient\n", + "a = 0.05 \t\t\t#m, radius of cylinder \n", + "k = 20. \t\t\t#W/m C, thermal conductivity\n", + "ro = 7800. \t\t\t#kg/m**3, density\n", + "cp = 0.46*10**3 \t\t\t#j/kg C, specific heat\n", + "\n", + "#calculation\n", + "#i\n", + "Bi = h*a/k \t\t\t#Biot no.\n", + "alpha = k/(ro*cp) \t\t\t#m**2/C, thermal diffusivity\n", + "Tcbar = (Tc-To)/(Ti-To) \t\t\t# dimensionless centre line temp.\n", + "#from fig 10.7 a\n", + "fo = 0.51 \t\t\t#fourier no. fo = alpha*t/a**2\n", + "t = fo*a**2/alpha \t\t\t#s, time\n", + "\n", + "#ii\n", + "#at the half radius, r/a = 0.5 & Bi = 5\n", + "T = To+0.77*(Tc-To) \t\t\t#from fig. 10.7 b\n", + "\n", + "#iii\n", + "x = Bi**2*fo\n", + "#for x = 12.75 & Bi = 5.0. fig.10.9 b gives\n", + "#q/qi = 0.83\n", + "qi = math.pi*a**2*(1)*ro*cp*(Ti-To) \t\t\t#kj, initial amount of heat energy \n", + " #present in 1 m length of shaft\n", + "q = 0.83*qi \t\t\t#j, amount of heat transfered \n", + "\n", + "# Results\n", + "print \"i) time required for the cantre-line temp.to drop down to 200 C is %.0f s\"%(t);\n", + "print \"ii)the temp. at half radius at that moment is %.0f C \"%(T);\n", + "print \"iii)the amount of heat that has been transfered to the liquid is %d Kj\"%(q*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) time required for the cantre-line temp.to drop down to 200 C is 229 s\n", + "ii)the temp. at half radius at that moment is 161 C \n", + "iii)the amount of heat that has been transfered to the liquid is 19647 Kj\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11.ipynb new file mode 100755 index 00000000..1f5ff57e --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11.ipynb @@ -0,0 +1,318 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:89cbca7c573c1c37fd66977dec66db1e8ea38451b6b44d0c99e4e4d48fb5ae18" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Boundary layer heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Variable\n", + "v = 1. \t\t\t#m/s\n", + "#temprature\n", + "T = 25. \t\t\t# degree celcius\n", + "#length of plate,l = 1m\n", + "l = 1. \t\t\t#m\n", + "#width of plate,w = 0.5m\n", + "w = 0.5 \t\t\t#m\n", + "#angle of incidence,theta = 0 degree\n", + "theta = 0. \t\t\t#degree\n", + "\n", + "#Calculation\n", + "#for water at 25 degree celcius ,momentum diffusivity,\n", + "MD = 8.63*(10**-7) \t\t\t# m**2/s\n", + "#local Reynold no.\n", + "x = 0.5 \t\t\t#m\n", + "Re = x*v/MD \n", + "#from Eq. 11.39,the boundary layer thickness is\n", + "t = 5*x/(Re**0.5)\n", + "\n", + "\n", + "#Results\n", + "print \"i) Boundary layer thickness is %.4f m\"%(t)\n", + "\n", + "#local drag coefficient\n", + "#CD = local drag force per unit area (F)/kinetic energy per unit volume(KE)\n", + "#F = 0.332*rho*v**2*Re**0.5 and KE = 0.5*rho*v**2\n", + "CD = 0.332*v**2*(Re**-0.5)/(0.5)*v**2\n", + "\n", + "print \"Local drag coefficient is %.2e \"%(CD)\n", + "\n", + "#From eq 11.44, the drag force acting on one side of the plate is\n", + "#kinetic viscocity\n", + "mu = 8.6*(10**-4)\n", + "fd = 0.664*mu*v*(l*v/MD)**0.5*w\n", + "#the total force acting on both sides of the plate\n", + "\n", + "tfd = 2*fd\n", + "print \"total drag force is %.3f N \"%(tfd)\n", + "\n", + "#shear stress at any point in the boundary layer\n", + "#at a point in the boundary layer,\n", + "x = 0.5 \t\t\t#m\n", + "y = t/2\n", + "# n = blasius dimensionless variable\n", + "n = y/(MD*x/v)**0.5\n", + "#From table 11.1, at n = 2.5,f\"(n) = 0.218\n", + "#shear stress = tau\n", + "fn = 0.218 \t\t\t#f\"(n) = fn\n", + "tau = (mu*v*(v/(MD*x))**0.5)*fn\n", + "print \"Shear stress is %.3f N/m**2\"%(tau)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Boundary layer thickness is 0.0033 m\n", + "Local drag coefficient is 8.72e-04 \n", + "total drag force is 0.615 N \n", + "Shear stress is 0.285 N/m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable\n", + "Ts = 200. \t\t\t# C,temp. of air\n", + "Ta = 30. \t\t\t#C, temp .of surface\n", + "Va = 8. \t\t\t#m/s, velocity of air\n", + "d = 0.75 \t\t\t#m, dismath.tant from leading edge\n", + "\n", + "#Calculation and Results\n", + "Tm = (Ts+Ta)/2 \t\t\t#C, Mean temp. of boundary layer\n", + "mu = 2.5*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "P = 0.69 \t\t\t#prndatl no.\n", + "k = 0.036 \t\t\t#W/m c, thermal conductivity\n", + "Re = d*Va/mu \t\t\t#reynold no.\n", + "t = 5*d/(Re**0.5*P**(1./3)) \t\t\t#m, thermal boundary layer thickness\n", + "print \"Thermal boundary layer thickness is %.1f mm \"%(t*10**3)\n", + "\n", + "N = (0.332*Re**(0.5)*P**(1./3)) \t\t\t#Nusslet no.\n", + "h = k*N/d \t\t\t#heat transfer coefficent\n", + "print \"heat transfer coeff is %.1f W/m**2 C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal boundary layer thickness is 8.7 mm \n", + "heat transfer coeff is 6.9 W/m**2 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#Free strean velocity (v1) and temp.(t1) on side 1\n", + "v1 = 6. \t\t\t#m/s\n", + "t1 = 150. \t\t\t#degree celcius\n", + "#same on side 2\n", + "v2 = 3. \t\t\t#m/s\n", + "t2 = 50. \t\t\t#degree celcius\n", + "#dismath.tant\n", + "x = 0.7 \t\t\t#m\n", + "#The plate temp. is assumed to be equal to the mean of the bulk air temp on the two sides of the plates\n", + "T = 100. \t\t\t#degree celcius\n", + "\n", + "# Calculations\n", + "#Side 1\n", + "#mean air temp.\n", + "tm1 = (T+t1)/2\n", + "#From thermophysical properties:kinetic vismath.cosity (kv),Prandtl no.(P), thermal conductivity (k)\n", + "kv1 = 2.6*10**-5 \t\t\t#m**2/s\n", + "P1 = 0.69\n", + "k1 = 0.0336 \t\t\t#W/m degree celcius\n", + "#Reynold no.\n", + "Re1 = x*v1/kv1\n", + "#Nusslet no(N1)\n", + "a = 1/3.\n", + "N1 = 0.332*(Re1)**0.5*P1**a\n", + "h1 = k1*N1/x\n", + "#Side 2 of the plate\n", + "tm2 = (T+t2)/2\n", + "#Similarly\n", + "kv2 = 2.076*(10)**-5 \t\t\t#m**2/s\n", + "P2 = 0.70\n", + "k2 = 0.03 \t\t\t#W/m degree celcius\n", + "Re2 = x*v2/kv2\n", + "N2 = 0.332*(Re2)**0.5*P2**a\n", + "h2 = k2*N2/x\n", + "#overall heat transfer coeff. \n", + "U = h1*h2/(h1+h2)\n", + "#The local rate of heat exchange\n", + "RH = U*(t1-t2)\n", + "\n", + "# Results\n", + "print \"Local rate of heat exchange is %.0f W/m2\"%(RH)\n", + "#the plate temp is given by\n", + "TP = t2+(t1-t2)*U/h2\n", + "print \"Plate temperature is :%.0f Celsius \"%(TP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Local rate of heat exchange is 235 W/m2\n", + "Plate temperature is :108 Celsius \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T1 = 120. \t\t\t#C, initial temp.\n", + "T2 = 25. \t\t\t#C, Final temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "rho = 8880. \t\t\t#kg/m**3, density of plate\n", + "#Properties of air at mean temp.\n", + "mu = 2.07*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "k = 0.03 \t\t\t#W/m C, thermal conductivity\n", + "l = 0.4 \t\t\t#m, length of plate\n", + "w = 0.3 \t\t\t#m, width of plate\n", + "d = 0.0254 \t\t\t#m, thickness of plate\n", + "Vinf = 1. \t\t\t#m/s, air velocity\n", + "Re = l*Vinf/mu \t\t\t#REynold no.\n", + "\n", + "#from eq. 11.90 (b)\n", + "Nu = 0.664*(Re)**(1./2)*(Pr)**(1./3) \t\t\t#average Nusslet no.\n", + "#Nu = l*h/k\n", + "h = Nu*k/l \t\t\t#W/m**2 C, heat transfer coefficient\n", + "#Rate of change of temp. is given by\n", + "A = 2*l*w \t\t\t#m**2. area of plate\n", + "t = 1*3600. \t\t\t#s, time\n", + "cp = 0.385*10.**3 \t\t\t#j/kg K, specific heat\n", + "m = l*w*d*rho \t\t\t#kg, mass of plate\n", + "\n", + "#-d/dt(m*cp8dt) = A*hv*(T1-T2)\n", + "#appling the boundary condition \n", + "T = (T1-T2)*math.exp(-A*h*t/(m*cp))+T2\n", + "print \"The temprature of plate after 1 hour is %.0f C\"%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temprature of plate after 1 hour is 82 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#Reynold no (Re),friction factor(f),Prandlt no. (P)\n", + "Re = 7.44*(10**4)\n", + "f = 0.00485\n", + "P = 5.12\n", + "x = P-1 \t\t\t#assume\n", + "\n", + "# Calculations\n", + "#according to Von Karmen anamath.logy\n", + "N = ((f/2)*Re*P)/(1+(5*math.sqrt(f/2))*(x+math.log(1+(5./6)*x)))\n", + "\n", + "# Results\n", + "print \"Nusslet no is: %.0f \"%(N)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nusslet no is: 388 \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_1.ipynb new file mode 100755 index 00000000..1f5ff57e --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_1.ipynb @@ -0,0 +1,318 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:89cbca7c573c1c37fd66977dec66db1e8ea38451b6b44d0c99e4e4d48fb5ae18" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Boundary layer heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Variable\n", + "v = 1. \t\t\t#m/s\n", + "#temprature\n", + "T = 25. \t\t\t# degree celcius\n", + "#length of plate,l = 1m\n", + "l = 1. \t\t\t#m\n", + "#width of plate,w = 0.5m\n", + "w = 0.5 \t\t\t#m\n", + "#angle of incidence,theta = 0 degree\n", + "theta = 0. \t\t\t#degree\n", + "\n", + "#Calculation\n", + "#for water at 25 degree celcius ,momentum diffusivity,\n", + "MD = 8.63*(10**-7) \t\t\t# m**2/s\n", + "#local Reynold no.\n", + "x = 0.5 \t\t\t#m\n", + "Re = x*v/MD \n", + "#from Eq. 11.39,the boundary layer thickness is\n", + "t = 5*x/(Re**0.5)\n", + "\n", + "\n", + "#Results\n", + "print \"i) Boundary layer thickness is %.4f m\"%(t)\n", + "\n", + "#local drag coefficient\n", + "#CD = local drag force per unit area (F)/kinetic energy per unit volume(KE)\n", + "#F = 0.332*rho*v**2*Re**0.5 and KE = 0.5*rho*v**2\n", + "CD = 0.332*v**2*(Re**-0.5)/(0.5)*v**2\n", + "\n", + "print \"Local drag coefficient is %.2e \"%(CD)\n", + "\n", + "#From eq 11.44, the drag force acting on one side of the plate is\n", + "#kinetic viscocity\n", + "mu = 8.6*(10**-4)\n", + "fd = 0.664*mu*v*(l*v/MD)**0.5*w\n", + "#the total force acting on both sides of the plate\n", + "\n", + "tfd = 2*fd\n", + "print \"total drag force is %.3f N \"%(tfd)\n", + "\n", + "#shear stress at any point in the boundary layer\n", + "#at a point in the boundary layer,\n", + "x = 0.5 \t\t\t#m\n", + "y = t/2\n", + "# n = blasius dimensionless variable\n", + "n = y/(MD*x/v)**0.5\n", + "#From table 11.1, at n = 2.5,f\"(n) = 0.218\n", + "#shear stress = tau\n", + "fn = 0.218 \t\t\t#f\"(n) = fn\n", + "tau = (mu*v*(v/(MD*x))**0.5)*fn\n", + "print \"Shear stress is %.3f N/m**2\"%(tau)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Boundary layer thickness is 0.0033 m\n", + "Local drag coefficient is 8.72e-04 \n", + "total drag force is 0.615 N \n", + "Shear stress is 0.285 N/m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable\n", + "Ts = 200. \t\t\t# C,temp. of air\n", + "Ta = 30. \t\t\t#C, temp .of surface\n", + "Va = 8. \t\t\t#m/s, velocity of air\n", + "d = 0.75 \t\t\t#m, dismath.tant from leading edge\n", + "\n", + "#Calculation and Results\n", + "Tm = (Ts+Ta)/2 \t\t\t#C, Mean temp. of boundary layer\n", + "mu = 2.5*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "P = 0.69 \t\t\t#prndatl no.\n", + "k = 0.036 \t\t\t#W/m c, thermal conductivity\n", + "Re = d*Va/mu \t\t\t#reynold no.\n", + "t = 5*d/(Re**0.5*P**(1./3)) \t\t\t#m, thermal boundary layer thickness\n", + "print \"Thermal boundary layer thickness is %.1f mm \"%(t*10**3)\n", + "\n", + "N = (0.332*Re**(0.5)*P**(1./3)) \t\t\t#Nusslet no.\n", + "h = k*N/d \t\t\t#heat transfer coefficent\n", + "print \"heat transfer coeff is %.1f W/m**2 C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal boundary layer thickness is 8.7 mm \n", + "heat transfer coeff is 6.9 W/m**2 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#Free strean velocity (v1) and temp.(t1) on side 1\n", + "v1 = 6. \t\t\t#m/s\n", + "t1 = 150. \t\t\t#degree celcius\n", + "#same on side 2\n", + "v2 = 3. \t\t\t#m/s\n", + "t2 = 50. \t\t\t#degree celcius\n", + "#dismath.tant\n", + "x = 0.7 \t\t\t#m\n", + "#The plate temp. is assumed to be equal to the mean of the bulk air temp on the two sides of the plates\n", + "T = 100. \t\t\t#degree celcius\n", + "\n", + "# Calculations\n", + "#Side 1\n", + "#mean air temp.\n", + "tm1 = (T+t1)/2\n", + "#From thermophysical properties:kinetic vismath.cosity (kv),Prandtl no.(P), thermal conductivity (k)\n", + "kv1 = 2.6*10**-5 \t\t\t#m**2/s\n", + "P1 = 0.69\n", + "k1 = 0.0336 \t\t\t#W/m degree celcius\n", + "#Reynold no.\n", + "Re1 = x*v1/kv1\n", + "#Nusslet no(N1)\n", + "a = 1/3.\n", + "N1 = 0.332*(Re1)**0.5*P1**a\n", + "h1 = k1*N1/x\n", + "#Side 2 of the plate\n", + "tm2 = (T+t2)/2\n", + "#Similarly\n", + "kv2 = 2.076*(10)**-5 \t\t\t#m**2/s\n", + "P2 = 0.70\n", + "k2 = 0.03 \t\t\t#W/m degree celcius\n", + "Re2 = x*v2/kv2\n", + "N2 = 0.332*(Re2)**0.5*P2**a\n", + "h2 = k2*N2/x\n", + "#overall heat transfer coeff. \n", + "U = h1*h2/(h1+h2)\n", + "#The local rate of heat exchange\n", + "RH = U*(t1-t2)\n", + "\n", + "# Results\n", + "print \"Local rate of heat exchange is %.0f W/m2\"%(RH)\n", + "#the plate temp is given by\n", + "TP = t2+(t1-t2)*U/h2\n", + "print \"Plate temperature is :%.0f Celsius \"%(TP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Local rate of heat exchange is 235 W/m2\n", + "Plate temperature is :108 Celsius \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T1 = 120. \t\t\t#C, initial temp.\n", + "T2 = 25. \t\t\t#C, Final temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "rho = 8880. \t\t\t#kg/m**3, density of plate\n", + "#Properties of air at mean temp.\n", + "mu = 2.07*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "k = 0.03 \t\t\t#W/m C, thermal conductivity\n", + "l = 0.4 \t\t\t#m, length of plate\n", + "w = 0.3 \t\t\t#m, width of plate\n", + "d = 0.0254 \t\t\t#m, thickness of plate\n", + "Vinf = 1. \t\t\t#m/s, air velocity\n", + "Re = l*Vinf/mu \t\t\t#REynold no.\n", + "\n", + "#from eq. 11.90 (b)\n", + "Nu = 0.664*(Re)**(1./2)*(Pr)**(1./3) \t\t\t#average Nusslet no.\n", + "#Nu = l*h/k\n", + "h = Nu*k/l \t\t\t#W/m**2 C, heat transfer coefficient\n", + "#Rate of change of temp. is given by\n", + "A = 2*l*w \t\t\t#m**2. area of plate\n", + "t = 1*3600. \t\t\t#s, time\n", + "cp = 0.385*10.**3 \t\t\t#j/kg K, specific heat\n", + "m = l*w*d*rho \t\t\t#kg, mass of plate\n", + "\n", + "#-d/dt(m*cp8dt) = A*hv*(T1-T2)\n", + "#appling the boundary condition \n", + "T = (T1-T2)*math.exp(-A*h*t/(m*cp))+T2\n", + "print \"The temprature of plate after 1 hour is %.0f C\"%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temprature of plate after 1 hour is 82 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#Reynold no (Re),friction factor(f),Prandlt no. (P)\n", + "Re = 7.44*(10**4)\n", + "f = 0.00485\n", + "P = 5.12\n", + "x = P-1 \t\t\t#assume\n", + "\n", + "# Calculations\n", + "#according to Von Karmen anamath.logy\n", + "N = ((f/2)*Re*P)/(1+(5*math.sqrt(f/2))*(x+math.log(1+(5./6)*x)))\n", + "\n", + "# Results\n", + "print \"Nusslet no is: %.0f \"%(N)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nusslet no is: 388 \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_2.ipynb new file mode 100755 index 00000000..1f5ff57e --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch11_2.ipynb @@ -0,0 +1,318 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:89cbca7c573c1c37fd66977dec66db1e8ea38451b6b44d0c99e4e4d48fb5ae18" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Boundary layer heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Variable\n", + "v = 1. \t\t\t#m/s\n", + "#temprature\n", + "T = 25. \t\t\t# degree celcius\n", + "#length of plate,l = 1m\n", + "l = 1. \t\t\t#m\n", + "#width of plate,w = 0.5m\n", + "w = 0.5 \t\t\t#m\n", + "#angle of incidence,theta = 0 degree\n", + "theta = 0. \t\t\t#degree\n", + "\n", + "#Calculation\n", + "#for water at 25 degree celcius ,momentum diffusivity,\n", + "MD = 8.63*(10**-7) \t\t\t# m**2/s\n", + "#local Reynold no.\n", + "x = 0.5 \t\t\t#m\n", + "Re = x*v/MD \n", + "#from Eq. 11.39,the boundary layer thickness is\n", + "t = 5*x/(Re**0.5)\n", + "\n", + "\n", + "#Results\n", + "print \"i) Boundary layer thickness is %.4f m\"%(t)\n", + "\n", + "#local drag coefficient\n", + "#CD = local drag force per unit area (F)/kinetic energy per unit volume(KE)\n", + "#F = 0.332*rho*v**2*Re**0.5 and KE = 0.5*rho*v**2\n", + "CD = 0.332*v**2*(Re**-0.5)/(0.5)*v**2\n", + "\n", + "print \"Local drag coefficient is %.2e \"%(CD)\n", + "\n", + "#From eq 11.44, the drag force acting on one side of the plate is\n", + "#kinetic viscocity\n", + "mu = 8.6*(10**-4)\n", + "fd = 0.664*mu*v*(l*v/MD)**0.5*w\n", + "#the total force acting on both sides of the plate\n", + "\n", + "tfd = 2*fd\n", + "print \"total drag force is %.3f N \"%(tfd)\n", + "\n", + "#shear stress at any point in the boundary layer\n", + "#at a point in the boundary layer,\n", + "x = 0.5 \t\t\t#m\n", + "y = t/2\n", + "# n = blasius dimensionless variable\n", + "n = y/(MD*x/v)**0.5\n", + "#From table 11.1, at n = 2.5,f\"(n) = 0.218\n", + "#shear stress = tau\n", + "fn = 0.218 \t\t\t#f\"(n) = fn\n", + "tau = (mu*v*(v/(MD*x))**0.5)*fn\n", + "print \"Shear stress is %.3f N/m**2\"%(tau)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) Boundary layer thickness is 0.0033 m\n", + "Local drag coefficient is 8.72e-04 \n", + "total drag force is 0.615 N \n", + "Shear stress is 0.285 N/m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable\n", + "Ts = 200. \t\t\t# C,temp. of air\n", + "Ta = 30. \t\t\t#C, temp .of surface\n", + "Va = 8. \t\t\t#m/s, velocity of air\n", + "d = 0.75 \t\t\t#m, dismath.tant from leading edge\n", + "\n", + "#Calculation and Results\n", + "Tm = (Ts+Ta)/2 \t\t\t#C, Mean temp. of boundary layer\n", + "mu = 2.5*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "P = 0.69 \t\t\t#prndatl no.\n", + "k = 0.036 \t\t\t#W/m c, thermal conductivity\n", + "Re = d*Va/mu \t\t\t#reynold no.\n", + "t = 5*d/(Re**0.5*P**(1./3)) \t\t\t#m, thermal boundary layer thickness\n", + "print \"Thermal boundary layer thickness is %.1f mm \"%(t*10**3)\n", + "\n", + "N = (0.332*Re**(0.5)*P**(1./3)) \t\t\t#Nusslet no.\n", + "h = k*N/d \t\t\t#heat transfer coefficent\n", + "print \"heat transfer coeff is %.1f W/m**2 C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal boundary layer thickness is 8.7 mm \n", + "heat transfer coeff is 6.9 W/m**2 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#Free strean velocity (v1) and temp.(t1) on side 1\n", + "v1 = 6. \t\t\t#m/s\n", + "t1 = 150. \t\t\t#degree celcius\n", + "#same on side 2\n", + "v2 = 3. \t\t\t#m/s\n", + "t2 = 50. \t\t\t#degree celcius\n", + "#dismath.tant\n", + "x = 0.7 \t\t\t#m\n", + "#The plate temp. is assumed to be equal to the mean of the bulk air temp on the two sides of the plates\n", + "T = 100. \t\t\t#degree celcius\n", + "\n", + "# Calculations\n", + "#Side 1\n", + "#mean air temp.\n", + "tm1 = (T+t1)/2\n", + "#From thermophysical properties:kinetic vismath.cosity (kv),Prandtl no.(P), thermal conductivity (k)\n", + "kv1 = 2.6*10**-5 \t\t\t#m**2/s\n", + "P1 = 0.69\n", + "k1 = 0.0336 \t\t\t#W/m degree celcius\n", + "#Reynold no.\n", + "Re1 = x*v1/kv1\n", + "#Nusslet no(N1)\n", + "a = 1/3.\n", + "N1 = 0.332*(Re1)**0.5*P1**a\n", + "h1 = k1*N1/x\n", + "#Side 2 of the plate\n", + "tm2 = (T+t2)/2\n", + "#Similarly\n", + "kv2 = 2.076*(10)**-5 \t\t\t#m**2/s\n", + "P2 = 0.70\n", + "k2 = 0.03 \t\t\t#W/m degree celcius\n", + "Re2 = x*v2/kv2\n", + "N2 = 0.332*(Re2)**0.5*P2**a\n", + "h2 = k2*N2/x\n", + "#overall heat transfer coeff. \n", + "U = h1*h2/(h1+h2)\n", + "#The local rate of heat exchange\n", + "RH = U*(t1-t2)\n", + "\n", + "# Results\n", + "print \"Local rate of heat exchange is %.0f W/m2\"%(RH)\n", + "#the plate temp is given by\n", + "TP = t2+(t1-t2)*U/h2\n", + "print \"Plate temperature is :%.0f Celsius \"%(TP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Local rate of heat exchange is 235 W/m2\n", + "Plate temperature is :108 Celsius \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "T1 = 120. \t\t\t#C, initial temp.\n", + "T2 = 25. \t\t\t#C, Final temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "rho = 8880. \t\t\t#kg/m**3, density of plate\n", + "#Properties of air at mean temp.\n", + "mu = 2.07*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "k = 0.03 \t\t\t#W/m C, thermal conductivity\n", + "l = 0.4 \t\t\t#m, length of plate\n", + "w = 0.3 \t\t\t#m, width of plate\n", + "d = 0.0254 \t\t\t#m, thickness of plate\n", + "Vinf = 1. \t\t\t#m/s, air velocity\n", + "Re = l*Vinf/mu \t\t\t#REynold no.\n", + "\n", + "#from eq. 11.90 (b)\n", + "Nu = 0.664*(Re)**(1./2)*(Pr)**(1./3) \t\t\t#average Nusslet no.\n", + "#Nu = l*h/k\n", + "h = Nu*k/l \t\t\t#W/m**2 C, heat transfer coefficient\n", + "#Rate of change of temp. is given by\n", + "A = 2*l*w \t\t\t#m**2. area of plate\n", + "t = 1*3600. \t\t\t#s, time\n", + "cp = 0.385*10.**3 \t\t\t#j/kg K, specific heat\n", + "m = l*w*d*rho \t\t\t#kg, mass of plate\n", + "\n", + "#-d/dt(m*cp8dt) = A*hv*(T1-T2)\n", + "#appling the boundary condition \n", + "T = (T1-T2)*math.exp(-A*h*t/(m*cp))+T2\n", + "print \"The temprature of plate after 1 hour is %.0f C\"%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temprature of plate after 1 hour is 82 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#Reynold no (Re),friction factor(f),Prandlt no. (P)\n", + "Re = 7.44*(10**4)\n", + "f = 0.00485\n", + "P = 5.12\n", + "x = P-1 \t\t\t#assume\n", + "\n", + "# Calculations\n", + "#according to Von Karmen anamath.logy\n", + "N = ((f/2)*Re*P)/(1+(5*math.sqrt(f/2))*(x+math.log(1+(5./6)*x)))\n", + "\n", + "# Results\n", + "print \"Nusslet no is: %.0f \"%(N)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Nusslet no is: 388 \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2.ipynb new file mode 100755 index 00000000..91ba2e65 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2.ipynb @@ -0,0 +1,580 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d195c9056d9c143d1483fc50717f27f02c283963376970b0882c1b9368f4f133" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 :Steady State conduction In one dimension" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 1. \t\t\t#m**2, area\n", + "#for inner layer (cement)\n", + "ti = 0.06 \t\t\t#m, thickness\n", + "ki = 0.72 \t\t\t#W/m C, thermal conductivity\n", + "Ti = -15. \t\t\t#C, temprature\n", + "#for middle layer (cork)\n", + "tm = 0.1 \t\t\t#m, thickness\n", + "km = 0.043 \t\t\t#W/m C, thermal conductivity\n", + "#for outer layer(brick)\n", + "to = 0.25 \t\t\t#m, thickness\n", + "ko = 0.7 \t\t\t#W/m C, thermal conductivity\n", + "To = 30. \t\t\t#C, temprature\n", + "\n", + "# Calculation and Results\n", + "#Thermal resistance of outer layer \t\t\t#C/W\n", + "Ro = to/(ko*A) \n", + "#Thermal resistance of middle layer \t\t\t#C/W\n", + "Rm = tm/(km*A) \n", + "#Thermal resistance of inner layer \t\t\t#C/W\n", + "Ri = ti/(ki*A)\n", + "Rt = Ro+Rm+Ri\n", + "tdf = To-Ti \t\t\t#temp driving force\n", + "#(a)\n", + "Q = tdf/Rt \t\t\t#rate of heat gain\n", + "print \"the rate of heat gain is %.2f W\"%(Q)\n", + "\n", + "#(b)\n", + "#from fig. 2.4\n", + "td1 = Q*to/(ko*A) \t\t\t#C temp. drop across the brick layer\n", + "T1 = To-td1 \t\t\t#interface temp. between brick and cork\n", + "#similarly\n", + "td2 = Q*tm/(km*A) \t\t\t#C temp. drop across the cork layer\n", + "T2 = T1-td2 \t\t\t#C, interface temp. between cement and cork\n", + "print \"interface temp. between brick and cork is %.1f C\"%(T1)\n", + "print \"interface temp. between cement and cork is %.1f C\"%(T2)\n", + "\n", + "\n", + "#(c)\n", + "Rpo = Ro/Rt \t\t\t#thermal resistance offered by brick layer\n", + "Rpm = Rm/Rt \t\t\t#thermal resistance offered by cork layer\n", + "Rpi = Ri/Rt \t\t\t#thermal resistance offered by cement layer\n", + "print \"thermal resistance offered by brick layer is %.1f percent\"%(Rpo*100)\n", + "print \"thermal resistance offered by cork layer is %.1f percent\"%(Rpm*100)\n", + "print \"thermal resistance offered by cement layer is %.1f percent\"%(Rpi*100)\n", + "\n", + "#second part\n", + "x = 30. \t\t\t#percentage dec in heat transfer \n", + "Q1 = Q*(1-x/100) \t\t\t#W, desired rate of heat flow\n", + "Rth = tdf/Q1 \t\t\t#C/W, required thermal resistance\n", + "Rad = Rth-Rt \t\t\t#additional thermal resistance\n", + "Tad = Rad*km*A\n", + "print \"Additional thickness of cork to be provided = %.1f cm\"%(Tad*100)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat gain is 16.27 W\n", + "interface temp. between brick and cork is 24.2 C\n", + "interface temp. between cement and cork is -13.6 C\n", + "thermal resistance offered by brick layer is 12.9 percent\n", + "thermal resistance offered by cork layer is 84.1 percent\n", + "thermal resistance offered by cement layer is 3.0 percent\n", + "Additional thickness of cork to be provided = 5.1 cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#outer thickness of brickwork (to) & inner thickness (ti)\n", + "to = 0.15 \t\t\t#m thickness\n", + "ti = 0.012 \t\t\t#m thickness\n", + "#thickness of intermediate layer(til)\n", + "til = 0.07 \t\t\t#m thick\n", + "#thermal conductivities of brick and wood\n", + "kb = 0.70 \t\t\t#W/m celcius\n", + "kw = 0.18 \t\t\t#W/m celcius\n", + "#temp. of outside and inside wall\n", + "To = -15 \t\t\t#celcius\n", + "Ti = 21 \t\t\t#celcius\n", + "#area\n", + "A = 1 \t\t\t#m**2\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Thermal resistance of brick , wood and insulating layer\n", + "TRb = to/(kb*A) \t\t\t#C/W\n", + "TRw = ti/(kw*A) \t\t\t#C/W\n", + "TRi = 2*TRb \t\t\t#C/W\n", + "#Total thermal resistance\n", + "TR = TRb+TRw+TRi \t\t\t#C/W\n", + "#Temp. driving force\n", + "T = Ti-To \t\t\t#C\n", + "#Rate of heat loss\n", + "Q = T/TR\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "#(b)thermal conductivities of insulating layer\n", + "k = til/(A*TRi)\n", + "print \"thermal conductivities of insulating layer is %.4f W/m C\"%(k)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 50.7 W\n", + "thermal conductivities of insulating layer is 0.1633 W/m C\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "#Length & Inside rdius of gas duct\n", + "L = 1. \t\t\t#m\n", + "ri = 0.5 \t\t\t#m radius\n", + "#Properties of inner and outer layer\n", + "ki = 1.3 \t\t\t#W/m C, thermal conductivity of inner bricks\n", + "ti = 0.27 \t\t\t#m, inner layer thickness \n", + "ko = 0.92 \t\t\t#W/m C, thermal conductivity of special bricks \n", + "to = 0.14 \t\t\t#m, outer layer thickness\n", + "Ti = 400. \t\t\t#C, inner layer temp.\n", + "To = 65. \t\t\t#C, outer layer temp.\n", + "\n", + "#calculation and Results\n", + "r_ = ri+ti \t\t\t#m, outer radius of fireclay brick layer\n", + "ro = r_+to \t\t\t#m, outer radius of special brick layer\n", + "#Heat transfer resistance\n", + "#Heat transfer resistance of fireclay brick\n", + "R1 = (math.log(r_/ri))/(2*math.pi*L*ki)\n", + "#Heat transfer resistance of special brick\n", + "R2 = (math.log(ro/r_))/(2*math.pi*L*ko)\n", + "#Total resistance\n", + "R = round(R1+R2,4)\n", + "#Driving force\n", + "T = Ti-To\n", + "#Rate of heat loss\n", + "Q = T/(R)\n", + "print \"Rate of heat loss is %d W\"%(Q)\n", + "#interface temp.\n", + "Tif = Ti-(Q*R1)\n", + "print \"interface temp.is %d C\"%(Tif)\n", + "#Fractional resistance offered by the special brick layer\n", + "FR = R2/(R1+R2)\n", + "print \"Fractional resistance offered by the special brick layer is %.3f \"%(FR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 4095 W\n", + "interface temp.is 183 C\n", + "Fractional resistance offered by the special brick layer is 0.353 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d1 = 0.06 \t\t\t#m, one end diameter of steel rod\n", + "d2 = 0.12 \t\t\t#m,other end diameter of steel rod\n", + "l = 0.2 \t\t\t#m length of rod\n", + "T2 = 30. \t\t\t#C, temp. at end 2\n", + "Q = 50. \t\t\t#W, heat loss\n", + "k = 15. \t\t\t#W/m c, thermal conductivity of rod\n", + "\n", + "# Calculation and Results\n", + "#T = 265.8-(7.07/(0.06-0.15*x))........(a)\n", + "#(a)\n", + "x1 = 0\n", + "#from eq. (a)\n", + "T1 = 265.8-(7.07/(0.06-0.15*x1))\n", + "print \"The hot end temp. is %.0f C\"%(T1)\n", + "#(b) from eq. (i)\n", + "C = 50 \t\t\t#integration consmath.tant\n", + "#from eq. (i)\n", + "D1 = -C/(math.pi*d1**2*k) \t\t\t#D = dT/dx, temprature gradient\n", + "print \"The temprature gradient at hot end is %.1f C/m\"%(D1)\n", + "#similarly\n", + "D2 = -1179 \t\t\t#at x = 0.2m\n", + "print \"The temprature gradient at cold end is %.0f C/m\"%(D2)\n", + "\n", + "#(c)\n", + "x2 = 0.15 \t\t\t#m, given,\n", + "x3 = l-x2 \t\t\t#m, section away from the cold end\n", + "#from eq. (a)\n", + "T2 = 265.8-(7.07/(0.06-0.15*x3))\n", + "print \"the temprature at 0.15m away from the cold end is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hot end temp. is 148 C\n", + "The temprature gradient at hot end is -294.7 C/m\n", + "The temprature gradient at cold end is -1179 C/m\n", + "the temprature at 0.15m away from the cold end is 131 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#inside and outside diameter and Temp. of sphorical vessel\n", + "do = 16. \t\t\t#m, diameter \n", + "t = 0.1 \t\t\t#m, thick \n", + "Ri = do/2 \t\t\t#m, inside radius \n", + "Ro = Ri+t \t\t\t#m. outside radius\n", + "To = 27. \t\t\t#C, temperature\n", + "Ti = 4. \t\t\t#C ammonia\n", + "k = 0.02 \t\t\t#W/m C, thermal conductivity of foam layer \n", + "\n", + "# Calculations and Results\n", + "#from eq. 2.23 the rate of heat transfer\n", + "Q = (Ti-To)*(4*math.pi*k*Ro*Ri)/(Ro-Ri)\n", + "print \"the rate of heat transfer is %.0f W\"%(Q)\n", + "#Refrigeration capacity(RC)\n", + "#3516 Watt = 1 ton\n", + "RC = -Q/3516\n", + "print \"Refrigeration capacity is %.2f tons\"%(RC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is -3746 W\n", + "Refrigeration capacity is 1.07 tons\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "d = 0.05 \t\t\t#m, diameter of rod\n", + "l = 0.5 \t\t\t#m, length of rod\n", + "T1 = 30. \t\t\t#CTemp. at one end (1)\n", + "T2 = 300. \t\t\t#C, temp at other end (2)\n", + "\n", + "# Calculations and Results\n", + "x1 = l/2 \t\t\t#m, at mid plane\n", + "#temprature distribution ,\n", + "#comparing with quadratic eq. ax**2+bx+c \n", + "#and its solution as x = (-b+math.sqrt(b**2-4*a*c))/2*a\n", + "a = 1.35*10**-4\n", + "b = 1\n", + "c = -(564*x1+30.1)\n", + "T = (-b+math.sqrt(b**2-4*a*c))/(2*a)\n", + "print \"the temprature midway in the rod at steady state is %.1f C\"%(T)\n", + "\n", + "#Temprature gradient at the ends of the rod\n", + "x2 = 0 \t\t\t#m, at one end\n", + "a1 = 1.35*10**-4\n", + "b1 = 1\n", + "c1 = -(564*x2+30.1)\n", + "T1 = (-b1+math.sqrt(b1**2-4*a1*c1))/(2*a1)\n", + "k1 = 202+0.0545*T1 \n", + "C1 = 113930 \t\t\t#integration consmath.tant from eq. (1)\n", + "TG1 = C1/k1 \t\t\t#C/W, temprature gradient, dT/dx\n", + "#similarly\n", + "x3 = 0.5\n", + "a2 = 1.35*10**-4\n", + "b2 = 1\n", + "c2 = -(564*x3+30.1)\n", + "T2 = (-b2+math.sqrt(b2**2-4*a2*c2))/(2*a2)\n", + "k2 = 202+0.0545*T2\n", + "TG2 = C1/k2\n", + "print \"Temprature gradient at one end of the rod is %.0f C/W\"%(TG1)\n", + "print \"Temprature gradient at other end of the rod is %.1f C/W\"%(TG2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temprature midway in the rod at steady state is 167.3 C\n", + "Temprature gradient at one end of the rod is 559 C/W\n", + "Temprature gradient at other end of the rod is 521.8 C/W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "#temprature distribution in wall\n", + "\n", + "t = 0.3 \t\t\t#m, thickness of wall\n", + "k = 23.5 \t\t\t#W/m c thermal conductivity of wall\n", + "\n", + "# Calculations and Results\n", + "x1 = 0\n", + "T1 = 600+2500*x1-12000*x1**2 \t\t\t#C, at surface\n", + "x2 = 0.3\n", + "T2 = 600+2500*x2-12000*x2**2 \t\t\t#C, at x = 0.3\n", + "\n", + "def f3(x): \n", + " return 600+2500*x-12000*x**2\n", + "\n", + "Tav = 1/t* quad(f3,0,0.3)[0]\n", + "\n", + "print \"At the surface x = 0, the temp. is %.0f C\"%(T1)\n", + "print \"At the surface x = 0.3m, the temp. is %.0f C\"%(T2)\n", + "print \"Rhe average temprature of the wall is %.0f C\"%(Tav)\n", + "\n", + "#(b)\n", + "\n", + "#for maximum temprature D = 0\n", + "x3 = 2500/24000.\n", + "print \"The maximum temprature occurs at %.3f m\"%(x3)\n", + "Tmax = 600+2500*x3-12000*x3**2\n", + "print \"The maximum temp. is %.0f C\"%(Tmax)\n", + "\n", + "#(c)\n", + "D1 = 2500-24000*x1 \t\t\t#at x = 0, temprature gradient\n", + "Hf1 = -k*D1 \t\t\t#W/m**2, heat flux at left surface(x = 0)\n", + "D2 = 2500-24000*x2 \t\t\t#at x = 0.3, temprature gradient\n", + "Hf2 = -k*D2 \t\t\t#W/m**2, heat flux at right surface(x = 0.3)\n", + "print \"heat flux at left surface is %.0f W/m**2\"%(Hf1)\n", + "print \"heat flux at right surface is %.0f W/m**2\"%(Hf2)\n", + "\n", + "#(d)\n", + "Qt = Hf2-Hf1 \t\t\t#W/m**2, total rate of heat loss\n", + "Vw = 0.3 \t\t\t#m**3/m**2, volume of wall per unit surface area\n", + "Hav = Qt/Vw \t\t\t#W/m**3, average volumetric rate\n", + "print \"The average volumetric rate if heat genaration is %.0f W/m**3 \"%(Hav) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the surface x = 0, the temp. is 600 C\n", + "At the surface x = 0.3m, the temp. is 270 C\n", + "Rhe average temprature of the wall is 615 C\n", + "The maximum temprature occurs at 0.104 m\n", + "The maximum temp. is 730 C\n", + "heat flux at left surface is -58750 W/m**2\n", + "heat flux at right surface is 110450 W/m**2\n", + "The average volumetric rate if heat genaration is 564000 W/m**3 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "ka = 24 \t\t\t#W/mC thermal conductivitiy of material A\n", + "tA = 0.1 \t\t\t#m, thickness of A material\n", + "kB = 230 \t\t\t#W/mC thermal conductivity of metl B\n", + "kC = 200 \t\t\t#W/mC thermal conductivity of metal C\n", + "tB = 0.1 \t\t\t#m, thickness of B metal\n", + "tC = 0.1 \t\t\t#m, thickness of C metal\n", + "TBo = 100 \t\t\t#C, outer surface temp. of B wall\n", + "TCo = 100 \t\t\t#C, outer surface temp. of C wall\n", + "Q = 2.5*10**5 \t\t\t#W/m**3, heat generated\n", + "\n", + "# Calculations and Results\n", + "#At D = 0\n", + "x = 2175./10416\n", + "print \"The maximum temp. will occur at a position %.3f m\"%(x)\n", + "x1 = x\n", + "TA = -5208*x1**2+2175*x1-74.5\n", + "print \"The maximum temprature is %.1f C\"%(TA)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum temp. will occur at a position 0.209 m\n", + "The maximum temprature is 152.6 C\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "di = 0.15 \t\t\t#m, inner diameter\n", + "do = 0.3 \t\t\t#m, outer diameter\n", + "Q1 = 100.*10**3 \t\t\t#W/,m**3,inner rate of heat generation\n", + "Q2 = 40.*10**3 \t\t\t#W/m**3, outer rate of heat generation\n", + "Ti = 100. \t\t\t#C, temp.at inside surface\n", + "To = 200. \t\t\t#C, temp. at outside surface\n", + "k1 = 30. \t\t\t#W/m C, thermal conductivity of material for inner layer\n", + "k2 = 10. \t\t\t#W/m C, thermal conductivity of material for outer layer\n", + "\n", + "# Calculations and Results\n", + "#T1 = 364+100*math.log(r)-833.3*r**2 (1)\n", + "#T2 = 718+216*math.log(r)-1000*r**2 (2)\n", + "#(b)from eq. 1\n", + "r = math.sqrt(100./2*833.3)\n", + "print \"This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\"\n", + "#similarly\n", + "print \" Similarly no temprature maximum occurs in layer 2.\"\n", + "ro = di \t\t # m, outer boundary\n", + "Tmax = To\n", + "print \"The maximum temprature at the outer boundary is %.0f C\"%(Tmax)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\n", + " Similarly no temprature maximum occurs in layer 2.\n", + "The maximum temprature at the outer boundary is 200 C\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_1.ipynb new file mode 100755 index 00000000..91ba2e65 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_1.ipynb @@ -0,0 +1,580 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d195c9056d9c143d1483fc50717f27f02c283963376970b0882c1b9368f4f133" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 :Steady State conduction In one dimension" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 1. \t\t\t#m**2, area\n", + "#for inner layer (cement)\n", + "ti = 0.06 \t\t\t#m, thickness\n", + "ki = 0.72 \t\t\t#W/m C, thermal conductivity\n", + "Ti = -15. \t\t\t#C, temprature\n", + "#for middle layer (cork)\n", + "tm = 0.1 \t\t\t#m, thickness\n", + "km = 0.043 \t\t\t#W/m C, thermal conductivity\n", + "#for outer layer(brick)\n", + "to = 0.25 \t\t\t#m, thickness\n", + "ko = 0.7 \t\t\t#W/m C, thermal conductivity\n", + "To = 30. \t\t\t#C, temprature\n", + "\n", + "# Calculation and Results\n", + "#Thermal resistance of outer layer \t\t\t#C/W\n", + "Ro = to/(ko*A) \n", + "#Thermal resistance of middle layer \t\t\t#C/W\n", + "Rm = tm/(km*A) \n", + "#Thermal resistance of inner layer \t\t\t#C/W\n", + "Ri = ti/(ki*A)\n", + "Rt = Ro+Rm+Ri\n", + "tdf = To-Ti \t\t\t#temp driving force\n", + "#(a)\n", + "Q = tdf/Rt \t\t\t#rate of heat gain\n", + "print \"the rate of heat gain is %.2f W\"%(Q)\n", + "\n", + "#(b)\n", + "#from fig. 2.4\n", + "td1 = Q*to/(ko*A) \t\t\t#C temp. drop across the brick layer\n", + "T1 = To-td1 \t\t\t#interface temp. between brick and cork\n", + "#similarly\n", + "td2 = Q*tm/(km*A) \t\t\t#C temp. drop across the cork layer\n", + "T2 = T1-td2 \t\t\t#C, interface temp. between cement and cork\n", + "print \"interface temp. between brick and cork is %.1f C\"%(T1)\n", + "print \"interface temp. between cement and cork is %.1f C\"%(T2)\n", + "\n", + "\n", + "#(c)\n", + "Rpo = Ro/Rt \t\t\t#thermal resistance offered by brick layer\n", + "Rpm = Rm/Rt \t\t\t#thermal resistance offered by cork layer\n", + "Rpi = Ri/Rt \t\t\t#thermal resistance offered by cement layer\n", + "print \"thermal resistance offered by brick layer is %.1f percent\"%(Rpo*100)\n", + "print \"thermal resistance offered by cork layer is %.1f percent\"%(Rpm*100)\n", + "print \"thermal resistance offered by cement layer is %.1f percent\"%(Rpi*100)\n", + "\n", + "#second part\n", + "x = 30. \t\t\t#percentage dec in heat transfer \n", + "Q1 = Q*(1-x/100) \t\t\t#W, desired rate of heat flow\n", + "Rth = tdf/Q1 \t\t\t#C/W, required thermal resistance\n", + "Rad = Rth-Rt \t\t\t#additional thermal resistance\n", + "Tad = Rad*km*A\n", + "print \"Additional thickness of cork to be provided = %.1f cm\"%(Tad*100)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat gain is 16.27 W\n", + "interface temp. between brick and cork is 24.2 C\n", + "interface temp. between cement and cork is -13.6 C\n", + "thermal resistance offered by brick layer is 12.9 percent\n", + "thermal resistance offered by cork layer is 84.1 percent\n", + "thermal resistance offered by cement layer is 3.0 percent\n", + "Additional thickness of cork to be provided = 5.1 cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#outer thickness of brickwork (to) & inner thickness (ti)\n", + "to = 0.15 \t\t\t#m thickness\n", + "ti = 0.012 \t\t\t#m thickness\n", + "#thickness of intermediate layer(til)\n", + "til = 0.07 \t\t\t#m thick\n", + "#thermal conductivities of brick and wood\n", + "kb = 0.70 \t\t\t#W/m celcius\n", + "kw = 0.18 \t\t\t#W/m celcius\n", + "#temp. of outside and inside wall\n", + "To = -15 \t\t\t#celcius\n", + "Ti = 21 \t\t\t#celcius\n", + "#area\n", + "A = 1 \t\t\t#m**2\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Thermal resistance of brick , wood and insulating layer\n", + "TRb = to/(kb*A) \t\t\t#C/W\n", + "TRw = ti/(kw*A) \t\t\t#C/W\n", + "TRi = 2*TRb \t\t\t#C/W\n", + "#Total thermal resistance\n", + "TR = TRb+TRw+TRi \t\t\t#C/W\n", + "#Temp. driving force\n", + "T = Ti-To \t\t\t#C\n", + "#Rate of heat loss\n", + "Q = T/TR\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "#(b)thermal conductivities of insulating layer\n", + "k = til/(A*TRi)\n", + "print \"thermal conductivities of insulating layer is %.4f W/m C\"%(k)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 50.7 W\n", + "thermal conductivities of insulating layer is 0.1633 W/m C\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "#Length & Inside rdius of gas duct\n", + "L = 1. \t\t\t#m\n", + "ri = 0.5 \t\t\t#m radius\n", + "#Properties of inner and outer layer\n", + "ki = 1.3 \t\t\t#W/m C, thermal conductivity of inner bricks\n", + "ti = 0.27 \t\t\t#m, inner layer thickness \n", + "ko = 0.92 \t\t\t#W/m C, thermal conductivity of special bricks \n", + "to = 0.14 \t\t\t#m, outer layer thickness\n", + "Ti = 400. \t\t\t#C, inner layer temp.\n", + "To = 65. \t\t\t#C, outer layer temp.\n", + "\n", + "#calculation and Results\n", + "r_ = ri+ti \t\t\t#m, outer radius of fireclay brick layer\n", + "ro = r_+to \t\t\t#m, outer radius of special brick layer\n", + "#Heat transfer resistance\n", + "#Heat transfer resistance of fireclay brick\n", + "R1 = (math.log(r_/ri))/(2*math.pi*L*ki)\n", + "#Heat transfer resistance of special brick\n", + "R2 = (math.log(ro/r_))/(2*math.pi*L*ko)\n", + "#Total resistance\n", + "R = round(R1+R2,4)\n", + "#Driving force\n", + "T = Ti-To\n", + "#Rate of heat loss\n", + "Q = T/(R)\n", + "print \"Rate of heat loss is %d W\"%(Q)\n", + "#interface temp.\n", + "Tif = Ti-(Q*R1)\n", + "print \"interface temp.is %d C\"%(Tif)\n", + "#Fractional resistance offered by the special brick layer\n", + "FR = R2/(R1+R2)\n", + "print \"Fractional resistance offered by the special brick layer is %.3f \"%(FR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 4095 W\n", + "interface temp.is 183 C\n", + "Fractional resistance offered by the special brick layer is 0.353 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d1 = 0.06 \t\t\t#m, one end diameter of steel rod\n", + "d2 = 0.12 \t\t\t#m,other end diameter of steel rod\n", + "l = 0.2 \t\t\t#m length of rod\n", + "T2 = 30. \t\t\t#C, temp. at end 2\n", + "Q = 50. \t\t\t#W, heat loss\n", + "k = 15. \t\t\t#W/m c, thermal conductivity of rod\n", + "\n", + "# Calculation and Results\n", + "#T = 265.8-(7.07/(0.06-0.15*x))........(a)\n", + "#(a)\n", + "x1 = 0\n", + "#from eq. (a)\n", + "T1 = 265.8-(7.07/(0.06-0.15*x1))\n", + "print \"The hot end temp. is %.0f C\"%(T1)\n", + "#(b) from eq. (i)\n", + "C = 50 \t\t\t#integration consmath.tant\n", + "#from eq. (i)\n", + "D1 = -C/(math.pi*d1**2*k) \t\t\t#D = dT/dx, temprature gradient\n", + "print \"The temprature gradient at hot end is %.1f C/m\"%(D1)\n", + "#similarly\n", + "D2 = -1179 \t\t\t#at x = 0.2m\n", + "print \"The temprature gradient at cold end is %.0f C/m\"%(D2)\n", + "\n", + "#(c)\n", + "x2 = 0.15 \t\t\t#m, given,\n", + "x3 = l-x2 \t\t\t#m, section away from the cold end\n", + "#from eq. (a)\n", + "T2 = 265.8-(7.07/(0.06-0.15*x3))\n", + "print \"the temprature at 0.15m away from the cold end is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hot end temp. is 148 C\n", + "The temprature gradient at hot end is -294.7 C/m\n", + "The temprature gradient at cold end is -1179 C/m\n", + "the temprature at 0.15m away from the cold end is 131 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#inside and outside diameter and Temp. of sphorical vessel\n", + "do = 16. \t\t\t#m, diameter \n", + "t = 0.1 \t\t\t#m, thick \n", + "Ri = do/2 \t\t\t#m, inside radius \n", + "Ro = Ri+t \t\t\t#m. outside radius\n", + "To = 27. \t\t\t#C, temperature\n", + "Ti = 4. \t\t\t#C ammonia\n", + "k = 0.02 \t\t\t#W/m C, thermal conductivity of foam layer \n", + "\n", + "# Calculations and Results\n", + "#from eq. 2.23 the rate of heat transfer\n", + "Q = (Ti-To)*(4*math.pi*k*Ro*Ri)/(Ro-Ri)\n", + "print \"the rate of heat transfer is %.0f W\"%(Q)\n", + "#Refrigeration capacity(RC)\n", + "#3516 Watt = 1 ton\n", + "RC = -Q/3516\n", + "print \"Refrigeration capacity is %.2f tons\"%(RC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is -3746 W\n", + "Refrigeration capacity is 1.07 tons\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "d = 0.05 \t\t\t#m, diameter of rod\n", + "l = 0.5 \t\t\t#m, length of rod\n", + "T1 = 30. \t\t\t#CTemp. at one end (1)\n", + "T2 = 300. \t\t\t#C, temp at other end (2)\n", + "\n", + "# Calculations and Results\n", + "x1 = l/2 \t\t\t#m, at mid plane\n", + "#temprature distribution ,\n", + "#comparing with quadratic eq. ax**2+bx+c \n", + "#and its solution as x = (-b+math.sqrt(b**2-4*a*c))/2*a\n", + "a = 1.35*10**-4\n", + "b = 1\n", + "c = -(564*x1+30.1)\n", + "T = (-b+math.sqrt(b**2-4*a*c))/(2*a)\n", + "print \"the temprature midway in the rod at steady state is %.1f C\"%(T)\n", + "\n", + "#Temprature gradient at the ends of the rod\n", + "x2 = 0 \t\t\t#m, at one end\n", + "a1 = 1.35*10**-4\n", + "b1 = 1\n", + "c1 = -(564*x2+30.1)\n", + "T1 = (-b1+math.sqrt(b1**2-4*a1*c1))/(2*a1)\n", + "k1 = 202+0.0545*T1 \n", + "C1 = 113930 \t\t\t#integration consmath.tant from eq. (1)\n", + "TG1 = C1/k1 \t\t\t#C/W, temprature gradient, dT/dx\n", + "#similarly\n", + "x3 = 0.5\n", + "a2 = 1.35*10**-4\n", + "b2 = 1\n", + "c2 = -(564*x3+30.1)\n", + "T2 = (-b2+math.sqrt(b2**2-4*a2*c2))/(2*a2)\n", + "k2 = 202+0.0545*T2\n", + "TG2 = C1/k2\n", + "print \"Temprature gradient at one end of the rod is %.0f C/W\"%(TG1)\n", + "print \"Temprature gradient at other end of the rod is %.1f C/W\"%(TG2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temprature midway in the rod at steady state is 167.3 C\n", + "Temprature gradient at one end of the rod is 559 C/W\n", + "Temprature gradient at other end of the rod is 521.8 C/W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "#temprature distribution in wall\n", + "\n", + "t = 0.3 \t\t\t#m, thickness of wall\n", + "k = 23.5 \t\t\t#W/m c thermal conductivity of wall\n", + "\n", + "# Calculations and Results\n", + "x1 = 0\n", + "T1 = 600+2500*x1-12000*x1**2 \t\t\t#C, at surface\n", + "x2 = 0.3\n", + "T2 = 600+2500*x2-12000*x2**2 \t\t\t#C, at x = 0.3\n", + "\n", + "def f3(x): \n", + " return 600+2500*x-12000*x**2\n", + "\n", + "Tav = 1/t* quad(f3,0,0.3)[0]\n", + "\n", + "print \"At the surface x = 0, the temp. is %.0f C\"%(T1)\n", + "print \"At the surface x = 0.3m, the temp. is %.0f C\"%(T2)\n", + "print \"Rhe average temprature of the wall is %.0f C\"%(Tav)\n", + "\n", + "#(b)\n", + "\n", + "#for maximum temprature D = 0\n", + "x3 = 2500/24000.\n", + "print \"The maximum temprature occurs at %.3f m\"%(x3)\n", + "Tmax = 600+2500*x3-12000*x3**2\n", + "print \"The maximum temp. is %.0f C\"%(Tmax)\n", + "\n", + "#(c)\n", + "D1 = 2500-24000*x1 \t\t\t#at x = 0, temprature gradient\n", + "Hf1 = -k*D1 \t\t\t#W/m**2, heat flux at left surface(x = 0)\n", + "D2 = 2500-24000*x2 \t\t\t#at x = 0.3, temprature gradient\n", + "Hf2 = -k*D2 \t\t\t#W/m**2, heat flux at right surface(x = 0.3)\n", + "print \"heat flux at left surface is %.0f W/m**2\"%(Hf1)\n", + "print \"heat flux at right surface is %.0f W/m**2\"%(Hf2)\n", + "\n", + "#(d)\n", + "Qt = Hf2-Hf1 \t\t\t#W/m**2, total rate of heat loss\n", + "Vw = 0.3 \t\t\t#m**3/m**2, volume of wall per unit surface area\n", + "Hav = Qt/Vw \t\t\t#W/m**3, average volumetric rate\n", + "print \"The average volumetric rate if heat genaration is %.0f W/m**3 \"%(Hav) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the surface x = 0, the temp. is 600 C\n", + "At the surface x = 0.3m, the temp. is 270 C\n", + "Rhe average temprature of the wall is 615 C\n", + "The maximum temprature occurs at 0.104 m\n", + "The maximum temp. is 730 C\n", + "heat flux at left surface is -58750 W/m**2\n", + "heat flux at right surface is 110450 W/m**2\n", + "The average volumetric rate if heat genaration is 564000 W/m**3 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "ka = 24 \t\t\t#W/mC thermal conductivitiy of material A\n", + "tA = 0.1 \t\t\t#m, thickness of A material\n", + "kB = 230 \t\t\t#W/mC thermal conductivity of metl B\n", + "kC = 200 \t\t\t#W/mC thermal conductivity of metal C\n", + "tB = 0.1 \t\t\t#m, thickness of B metal\n", + "tC = 0.1 \t\t\t#m, thickness of C metal\n", + "TBo = 100 \t\t\t#C, outer surface temp. of B wall\n", + "TCo = 100 \t\t\t#C, outer surface temp. of C wall\n", + "Q = 2.5*10**5 \t\t\t#W/m**3, heat generated\n", + "\n", + "# Calculations and Results\n", + "#At D = 0\n", + "x = 2175./10416\n", + "print \"The maximum temp. will occur at a position %.3f m\"%(x)\n", + "x1 = x\n", + "TA = -5208*x1**2+2175*x1-74.5\n", + "print \"The maximum temprature is %.1f C\"%(TA)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum temp. will occur at a position 0.209 m\n", + "The maximum temprature is 152.6 C\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "di = 0.15 \t\t\t#m, inner diameter\n", + "do = 0.3 \t\t\t#m, outer diameter\n", + "Q1 = 100.*10**3 \t\t\t#W/,m**3,inner rate of heat generation\n", + "Q2 = 40.*10**3 \t\t\t#W/m**3, outer rate of heat generation\n", + "Ti = 100. \t\t\t#C, temp.at inside surface\n", + "To = 200. \t\t\t#C, temp. at outside surface\n", + "k1 = 30. \t\t\t#W/m C, thermal conductivity of material for inner layer\n", + "k2 = 10. \t\t\t#W/m C, thermal conductivity of material for outer layer\n", + "\n", + "# Calculations and Results\n", + "#T1 = 364+100*math.log(r)-833.3*r**2 (1)\n", + "#T2 = 718+216*math.log(r)-1000*r**2 (2)\n", + "#(b)from eq. 1\n", + "r = math.sqrt(100./2*833.3)\n", + "print \"This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\"\n", + "#similarly\n", + "print \" Similarly no temprature maximum occurs in layer 2.\"\n", + "ro = di \t\t # m, outer boundary\n", + "Tmax = To\n", + "print \"The maximum temprature at the outer boundary is %.0f C\"%(Tmax)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\n", + " Similarly no temprature maximum occurs in layer 2.\n", + "The maximum temprature at the outer boundary is 200 C\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_2.ipynb new file mode 100755 index 00000000..91ba2e65 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch2_2.ipynb @@ -0,0 +1,580 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d195c9056d9c143d1483fc50717f27f02c283963376970b0882c1b9368f4f133" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 :Steady State conduction In one dimension" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "A = 1. \t\t\t#m**2, area\n", + "#for inner layer (cement)\n", + "ti = 0.06 \t\t\t#m, thickness\n", + "ki = 0.72 \t\t\t#W/m C, thermal conductivity\n", + "Ti = -15. \t\t\t#C, temprature\n", + "#for middle layer (cork)\n", + "tm = 0.1 \t\t\t#m, thickness\n", + "km = 0.043 \t\t\t#W/m C, thermal conductivity\n", + "#for outer layer(brick)\n", + "to = 0.25 \t\t\t#m, thickness\n", + "ko = 0.7 \t\t\t#W/m C, thermal conductivity\n", + "To = 30. \t\t\t#C, temprature\n", + "\n", + "# Calculation and Results\n", + "#Thermal resistance of outer layer \t\t\t#C/W\n", + "Ro = to/(ko*A) \n", + "#Thermal resistance of middle layer \t\t\t#C/W\n", + "Rm = tm/(km*A) \n", + "#Thermal resistance of inner layer \t\t\t#C/W\n", + "Ri = ti/(ki*A)\n", + "Rt = Ro+Rm+Ri\n", + "tdf = To-Ti \t\t\t#temp driving force\n", + "#(a)\n", + "Q = tdf/Rt \t\t\t#rate of heat gain\n", + "print \"the rate of heat gain is %.2f W\"%(Q)\n", + "\n", + "#(b)\n", + "#from fig. 2.4\n", + "td1 = Q*to/(ko*A) \t\t\t#C temp. drop across the brick layer\n", + "T1 = To-td1 \t\t\t#interface temp. between brick and cork\n", + "#similarly\n", + "td2 = Q*tm/(km*A) \t\t\t#C temp. drop across the cork layer\n", + "T2 = T1-td2 \t\t\t#C, interface temp. between cement and cork\n", + "print \"interface temp. between brick and cork is %.1f C\"%(T1)\n", + "print \"interface temp. between cement and cork is %.1f C\"%(T2)\n", + "\n", + "\n", + "#(c)\n", + "Rpo = Ro/Rt \t\t\t#thermal resistance offered by brick layer\n", + "Rpm = Rm/Rt \t\t\t#thermal resistance offered by cork layer\n", + "Rpi = Ri/Rt \t\t\t#thermal resistance offered by cement layer\n", + "print \"thermal resistance offered by brick layer is %.1f percent\"%(Rpo*100)\n", + "print \"thermal resistance offered by cork layer is %.1f percent\"%(Rpm*100)\n", + "print \"thermal resistance offered by cement layer is %.1f percent\"%(Rpi*100)\n", + "\n", + "#second part\n", + "x = 30. \t\t\t#percentage dec in heat transfer \n", + "Q1 = Q*(1-x/100) \t\t\t#W, desired rate of heat flow\n", + "Rth = tdf/Q1 \t\t\t#C/W, required thermal resistance\n", + "Rad = Rth-Rt \t\t\t#additional thermal resistance\n", + "Tad = Rad*km*A\n", + "print \"Additional thickness of cork to be provided = %.1f cm\"%(Tad*100)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat gain is 16.27 W\n", + "interface temp. between brick and cork is 24.2 C\n", + "interface temp. between cement and cork is -13.6 C\n", + "thermal resistance offered by brick layer is 12.9 percent\n", + "thermal resistance offered by cork layer is 84.1 percent\n", + "thermal resistance offered by cement layer is 3.0 percent\n", + "Additional thickness of cork to be provided = 5.1 cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#outer thickness of brickwork (to) & inner thickness (ti)\n", + "to = 0.15 \t\t\t#m thickness\n", + "ti = 0.012 \t\t\t#m thickness\n", + "#thickness of intermediate layer(til)\n", + "til = 0.07 \t\t\t#m thick\n", + "#thermal conductivities of brick and wood\n", + "kb = 0.70 \t\t\t#W/m celcius\n", + "kw = 0.18 \t\t\t#W/m celcius\n", + "#temp. of outside and inside wall\n", + "To = -15 \t\t\t#celcius\n", + "Ti = 21 \t\t\t#celcius\n", + "#area\n", + "A = 1 \t\t\t#m**2\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Thermal resistance of brick , wood and insulating layer\n", + "TRb = to/(kb*A) \t\t\t#C/W\n", + "TRw = ti/(kw*A) \t\t\t#C/W\n", + "TRi = 2*TRb \t\t\t#C/W\n", + "#Total thermal resistance\n", + "TR = TRb+TRw+TRi \t\t\t#C/W\n", + "#Temp. driving force\n", + "T = Ti-To \t\t\t#C\n", + "#Rate of heat loss\n", + "Q = T/TR\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "#(b)thermal conductivities of insulating layer\n", + "k = til/(A*TRi)\n", + "print \"thermal conductivities of insulating layer is %.4f W/m C\"%(k)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 50.7 W\n", + "thermal conductivities of insulating layer is 0.1633 W/m C\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "#Length & Inside rdius of gas duct\n", + "L = 1. \t\t\t#m\n", + "ri = 0.5 \t\t\t#m radius\n", + "#Properties of inner and outer layer\n", + "ki = 1.3 \t\t\t#W/m C, thermal conductivity of inner bricks\n", + "ti = 0.27 \t\t\t#m, inner layer thickness \n", + "ko = 0.92 \t\t\t#W/m C, thermal conductivity of special bricks \n", + "to = 0.14 \t\t\t#m, outer layer thickness\n", + "Ti = 400. \t\t\t#C, inner layer temp.\n", + "To = 65. \t\t\t#C, outer layer temp.\n", + "\n", + "#calculation and Results\n", + "r_ = ri+ti \t\t\t#m, outer radius of fireclay brick layer\n", + "ro = r_+to \t\t\t#m, outer radius of special brick layer\n", + "#Heat transfer resistance\n", + "#Heat transfer resistance of fireclay brick\n", + "R1 = (math.log(r_/ri))/(2*math.pi*L*ki)\n", + "#Heat transfer resistance of special brick\n", + "R2 = (math.log(ro/r_))/(2*math.pi*L*ko)\n", + "#Total resistance\n", + "R = round(R1+R2,4)\n", + "#Driving force\n", + "T = Ti-To\n", + "#Rate of heat loss\n", + "Q = T/(R)\n", + "print \"Rate of heat loss is %d W\"%(Q)\n", + "#interface temp.\n", + "Tif = Ti-(Q*R1)\n", + "print \"interface temp.is %d C\"%(Tif)\n", + "#Fractional resistance offered by the special brick layer\n", + "FR = R2/(R1+R2)\n", + "print \"Fractional resistance offered by the special brick layer is %.3f \"%(FR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss is 4095 W\n", + "interface temp.is 183 C\n", + "Fractional resistance offered by the special brick layer is 0.353 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d1 = 0.06 \t\t\t#m, one end diameter of steel rod\n", + "d2 = 0.12 \t\t\t#m,other end diameter of steel rod\n", + "l = 0.2 \t\t\t#m length of rod\n", + "T2 = 30. \t\t\t#C, temp. at end 2\n", + "Q = 50. \t\t\t#W, heat loss\n", + "k = 15. \t\t\t#W/m c, thermal conductivity of rod\n", + "\n", + "# Calculation and Results\n", + "#T = 265.8-(7.07/(0.06-0.15*x))........(a)\n", + "#(a)\n", + "x1 = 0\n", + "#from eq. (a)\n", + "T1 = 265.8-(7.07/(0.06-0.15*x1))\n", + "print \"The hot end temp. is %.0f C\"%(T1)\n", + "#(b) from eq. (i)\n", + "C = 50 \t\t\t#integration consmath.tant\n", + "#from eq. (i)\n", + "D1 = -C/(math.pi*d1**2*k) \t\t\t#D = dT/dx, temprature gradient\n", + "print \"The temprature gradient at hot end is %.1f C/m\"%(D1)\n", + "#similarly\n", + "D2 = -1179 \t\t\t#at x = 0.2m\n", + "print \"The temprature gradient at cold end is %.0f C/m\"%(D2)\n", + "\n", + "#(c)\n", + "x2 = 0.15 \t\t\t#m, given,\n", + "x3 = l-x2 \t\t\t#m, section away from the cold end\n", + "#from eq. (a)\n", + "T2 = 265.8-(7.07/(0.06-0.15*x3))\n", + "print \"the temprature at 0.15m away from the cold end is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hot end temp. is 148 C\n", + "The temprature gradient at hot end is -294.7 C/m\n", + "The temprature gradient at cold end is -1179 C/m\n", + "the temprature at 0.15m away from the cold end is 131 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#inside and outside diameter and Temp. of sphorical vessel\n", + "do = 16. \t\t\t#m, diameter \n", + "t = 0.1 \t\t\t#m, thick \n", + "Ri = do/2 \t\t\t#m, inside radius \n", + "Ro = Ri+t \t\t\t#m. outside radius\n", + "To = 27. \t\t\t#C, temperature\n", + "Ti = 4. \t\t\t#C ammonia\n", + "k = 0.02 \t\t\t#W/m C, thermal conductivity of foam layer \n", + "\n", + "# Calculations and Results\n", + "#from eq. 2.23 the rate of heat transfer\n", + "Q = (Ti-To)*(4*math.pi*k*Ro*Ri)/(Ro-Ri)\n", + "print \"the rate of heat transfer is %.0f W\"%(Q)\n", + "#Refrigeration capacity(RC)\n", + "#3516 Watt = 1 ton\n", + "RC = -Q/3516\n", + "print \"Refrigeration capacity is %.2f tons\"%(RC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is -3746 W\n", + "Refrigeration capacity is 1.07 tons\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "d = 0.05 \t\t\t#m, diameter of rod\n", + "l = 0.5 \t\t\t#m, length of rod\n", + "T1 = 30. \t\t\t#CTemp. at one end (1)\n", + "T2 = 300. \t\t\t#C, temp at other end (2)\n", + "\n", + "# Calculations and Results\n", + "x1 = l/2 \t\t\t#m, at mid plane\n", + "#temprature distribution ,\n", + "#comparing with quadratic eq. ax**2+bx+c \n", + "#and its solution as x = (-b+math.sqrt(b**2-4*a*c))/2*a\n", + "a = 1.35*10**-4\n", + "b = 1\n", + "c = -(564*x1+30.1)\n", + "T = (-b+math.sqrt(b**2-4*a*c))/(2*a)\n", + "print \"the temprature midway in the rod at steady state is %.1f C\"%(T)\n", + "\n", + "#Temprature gradient at the ends of the rod\n", + "x2 = 0 \t\t\t#m, at one end\n", + "a1 = 1.35*10**-4\n", + "b1 = 1\n", + "c1 = -(564*x2+30.1)\n", + "T1 = (-b1+math.sqrt(b1**2-4*a1*c1))/(2*a1)\n", + "k1 = 202+0.0545*T1 \n", + "C1 = 113930 \t\t\t#integration consmath.tant from eq. (1)\n", + "TG1 = C1/k1 \t\t\t#C/W, temprature gradient, dT/dx\n", + "#similarly\n", + "x3 = 0.5\n", + "a2 = 1.35*10**-4\n", + "b2 = 1\n", + "c2 = -(564*x3+30.1)\n", + "T2 = (-b2+math.sqrt(b2**2-4*a2*c2))/(2*a2)\n", + "k2 = 202+0.0545*T2\n", + "TG2 = C1/k2\n", + "print \"Temprature gradient at one end of the rod is %.0f C/W\"%(TG1)\n", + "print \"Temprature gradient at other end of the rod is %.1f C/W\"%(TG2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temprature midway in the rod at steady state is 167.3 C\n", + "Temprature gradient at one end of the rod is 559 C/W\n", + "Temprature gradient at other end of the rod is 521.8 C/W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "#temprature distribution in wall\n", + "\n", + "t = 0.3 \t\t\t#m, thickness of wall\n", + "k = 23.5 \t\t\t#W/m c thermal conductivity of wall\n", + "\n", + "# Calculations and Results\n", + "x1 = 0\n", + "T1 = 600+2500*x1-12000*x1**2 \t\t\t#C, at surface\n", + "x2 = 0.3\n", + "T2 = 600+2500*x2-12000*x2**2 \t\t\t#C, at x = 0.3\n", + "\n", + "def f3(x): \n", + " return 600+2500*x-12000*x**2\n", + "\n", + "Tav = 1/t* quad(f3,0,0.3)[0]\n", + "\n", + "print \"At the surface x = 0, the temp. is %.0f C\"%(T1)\n", + "print \"At the surface x = 0.3m, the temp. is %.0f C\"%(T2)\n", + "print \"Rhe average temprature of the wall is %.0f C\"%(Tav)\n", + "\n", + "#(b)\n", + "\n", + "#for maximum temprature D = 0\n", + "x3 = 2500/24000.\n", + "print \"The maximum temprature occurs at %.3f m\"%(x3)\n", + "Tmax = 600+2500*x3-12000*x3**2\n", + "print \"The maximum temp. is %.0f C\"%(Tmax)\n", + "\n", + "#(c)\n", + "D1 = 2500-24000*x1 \t\t\t#at x = 0, temprature gradient\n", + "Hf1 = -k*D1 \t\t\t#W/m**2, heat flux at left surface(x = 0)\n", + "D2 = 2500-24000*x2 \t\t\t#at x = 0.3, temprature gradient\n", + "Hf2 = -k*D2 \t\t\t#W/m**2, heat flux at right surface(x = 0.3)\n", + "print \"heat flux at left surface is %.0f W/m**2\"%(Hf1)\n", + "print \"heat flux at right surface is %.0f W/m**2\"%(Hf2)\n", + "\n", + "#(d)\n", + "Qt = Hf2-Hf1 \t\t\t#W/m**2, total rate of heat loss\n", + "Vw = 0.3 \t\t\t#m**3/m**2, volume of wall per unit surface area\n", + "Hav = Qt/Vw \t\t\t#W/m**3, average volumetric rate\n", + "print \"The average volumetric rate if heat genaration is %.0f W/m**3 \"%(Hav) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the surface x = 0, the temp. is 600 C\n", + "At the surface x = 0.3m, the temp. is 270 C\n", + "Rhe average temprature of the wall is 615 C\n", + "The maximum temprature occurs at 0.104 m\n", + "The maximum temp. is 730 C\n", + "heat flux at left surface is -58750 W/m**2\n", + "heat flux at right surface is 110450 W/m**2\n", + "The average volumetric rate if heat genaration is 564000 W/m**3 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "ka = 24 \t\t\t#W/mC thermal conductivitiy of material A\n", + "tA = 0.1 \t\t\t#m, thickness of A material\n", + "kB = 230 \t\t\t#W/mC thermal conductivity of metl B\n", + "kC = 200 \t\t\t#W/mC thermal conductivity of metal C\n", + "tB = 0.1 \t\t\t#m, thickness of B metal\n", + "tC = 0.1 \t\t\t#m, thickness of C metal\n", + "TBo = 100 \t\t\t#C, outer surface temp. of B wall\n", + "TCo = 100 \t\t\t#C, outer surface temp. of C wall\n", + "Q = 2.5*10**5 \t\t\t#W/m**3, heat generated\n", + "\n", + "# Calculations and Results\n", + "#At D = 0\n", + "x = 2175./10416\n", + "print \"The maximum temp. will occur at a position %.3f m\"%(x)\n", + "x1 = x\n", + "TA = -5208*x1**2+2175*x1-74.5\n", + "print \"The maximum temprature is %.1f C\"%(TA)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum temp. will occur at a position 0.209 m\n", + "The maximum temprature is 152.6 C\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "di = 0.15 \t\t\t#m, inner diameter\n", + "do = 0.3 \t\t\t#m, outer diameter\n", + "Q1 = 100.*10**3 \t\t\t#W/,m**3,inner rate of heat generation\n", + "Q2 = 40.*10**3 \t\t\t#W/m**3, outer rate of heat generation\n", + "Ti = 100. \t\t\t#C, temp.at inside surface\n", + "To = 200. \t\t\t#C, temp. at outside surface\n", + "k1 = 30. \t\t\t#W/m C, thermal conductivity of material for inner layer\n", + "k2 = 10. \t\t\t#W/m C, thermal conductivity of material for outer layer\n", + "\n", + "# Calculations and Results\n", + "#T1 = 364+100*math.log(r)-833.3*r**2 (1)\n", + "#T2 = 718+216*math.log(r)-1000*r**2 (2)\n", + "#(b)from eq. 1\n", + "r = math.sqrt(100./2*833.3)\n", + "print \"This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\"\n", + "#similarly\n", + "print \" Similarly no temprature maximum occurs in layer 2.\"\n", + "ro = di \t\t # m, outer boundary\n", + "Tmax = To\n", + "print \"The maximum temprature at the outer boundary is %.0f C\"%(Tmax)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This radial position does not fall within layer 1. Therefore no temprature maximum occurs in this layer.\n", + " Similarly no temprature maximum occurs in layer 2.\n", + "The maximum temprature at the outer boundary is 200 C\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3.ipynb new file mode 100755 index 00000000..526521e2 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3.ipynb @@ -0,0 +1,878 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:08d832a017b1f20bdedb0392851818965c45df9bb11ff532d92ac330ec0c4813" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Heat transfer coefficient" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "di = 0.06 \t\t\t#m,initial diameter of iceball\n", + "T1 = 30. \t\t\t#C, room temp.\n", + "T2 = 0. \t\t\t#ice ball temp.\n", + "h = 11.4 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "x = 40. \t\t\t#% for reduction\n", + "rho = 929. \t\t\t#kg/m**3, density of ice\n", + "Lv = 3.35*10**5 \t\t\t#j/kg, latent heat of fusion\n", + "\n", + "# Calculations\n", + "# m = 4/3*math.pi*r**3 \t\t\t#kg,mass of ice ball\n", + "#rate of melting = -dm/dt\n", + "#rate of heat adsorption = -4*math.pi*r**2*rho*dr/dt*lamda\n", + "#at initial time t = 0\n", + "C1 = di/2 \t\t\t#consmath.tant of integration\n", + "#if the volume of the ball is reduced by 40% of the original volume \n", + "r = ((1-x/100)*(di/2)**3)**(1./3)\n", + "#time required for melting umath.sing eq. 1\n", + "t = (di/2-r)/(h*(T1-T2)/(rho*Lv))\n", + "\n", + "# Results\n", + "print \"The time required for melting the ice is %.0f s\"%(t)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for melting the ice is 4274 s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad \n", + "#calculate the time required for the heating coil.\n", + "\n", + "# Variables\n", + "P = 1.*10**3 \t\t\t#W, electrical heating capacity\n", + "V = 220. \t\t\t#V, applied voltage\n", + "d = 0.574*10**-3 \t\t\t#m, diameter of wire\n", + "R = 4.167 \t\t\t#ohm, electrical resistance\n", + "Tr = 21. \t\t\t#C, room temp.\n", + "h = 100. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "rho = 8920. \t\t\t#kg/m**3, density of wire\n", + "cp = 384. \t\t\t#j/kg C, specific heat of wire\n", + "percent = 63. \t\t\t#%, percent of the steady state\n", + "\n", + "#Calculation\n", + "R_ = V**2/P \t\t\t#ohm, total electrical resistance\n", + "l = R_/R \t\t\t#m, length of wire\n", + "A = math.pi*d*l \t\t\t#m**2, area of wire\n", + "Tf = P/(h*A)+Tr \t\t\t#final temp.\n", + "dtf = Tf-Tr \t\t\t#C. steady state temp. rise\n", + "#temp. of wire after 63% rise\n", + "T = Tr+(percent/100)*dtf \n", + "#rate of heat accumulation on the wire\n", + "#d/dt(m*cp*T) (1)\n", + "#rate of heat loss\n", + "#h*A*(T-Tr).........................(2)\n", + "#heat balance eq. (1) = (2)\n", + "m = math.pi*d**2*l*rho/4 \t\t\t#kg. mass of wire\n", + "#integrating heat balance eq.\n", + "\n", + "def f6(T): \n", + " return 1/((P/(m*cp))-((h*A)/(m*cp))*(T-Tr))\n", + "\n", + "t = quad(f6,21,322)[0]\n", + "\n", + "# Results\n", + "print \"The time required for the heating coil is %.1f s\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the heating coil is 4.9 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "t = 0.2 \t\t\t#m, thickness of wall\n", + "k = 1.163 \t\t\t#W/m C, thermal conductivity of material\n", + "Ta = 30 \t\t\t#C, ambient temp\n", + "\n", + "# Calculations and Results\n", + "#(a) at x = 0.2 let T = T1 at x = x1\n", + "x1 = 0.2\n", + "T1 = 250-2750*x1**2\n", + "#let D = dT/dx\n", + "D = -5500*0.2 \t\t\t#C/m, at x = 0.2\n", + "h = -k*D/(T1-Ta)\n", + "print \" the heat transfer coefficient is %.2f W/m**2 C \"%(h)\n", + "\n", + "#(b)at other surface of wall, x = 0 = x2 (say)\n", + "x2 = 0\n", + "a = -5500*0\n", + "print \"So there is no heat flow at other surface of the wall \"\n", + "\n", + "#(c)\n", + "A = 1 \t\t\t#m**2, area\n", + "Vw = A*x1 \t\t\t#m**3, volume of wall\n", + "HL = h*(T1-Ta) \t\t\t#W, heat loss from unit area\n", + "Vav = HL/x1\n", + "print \"average volumetric rate of heat generation is %.0f W/m**3\"%(Vav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the heat transfer coefficient is 11.63 W/m**2 C \n", + "So there is no heat flow at other surface of the wall \n", + "average volumetric rate of heat generation is 6396 W/m**3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "id_ = 97.*10**-3 \t\t\t#m,internal diameter of steam pipe\n", + "od = 114.*10**-3 \t\t\t#m,outer diameter of steam pipe\n", + "pr = 30. \t\t\t#bar, absolute pressure os saturated steam\n", + "Ti = 234. \t\t\t#C, temp. at 30 bar absolute pressure\n", + "Ts = 55. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "kc = 0.1 \t\t\t#W/m C, thermal conductivity of wool\n", + "kw = 43. \t\t\t#W/m C, thermal conductivity of pipe\n", + "h = 8. \t\t\t#W/m**2 C, external air film coefficient \n", + "L = 1. \t\t\t#m, assume length\n", + "\n", + "#Calculation\n", + "ri = id_/2 \t\t\t#m, \n", + "r1 = (114.*10**-3)/2 \t\t\t#m,outer radius of steam pipe\n", + "\n", + "#thermal resistance of insulation\n", + "#Ri = math.log(ro/r1)/(2*math.pi*L*kc)\n", + "#Thermal resistance of pipe wall\n", + "Rp = math.log(r1/ri)/(2*math.pi*L*kw)\n", + "#RT = Ri+Rp\n", + "DF = Ti-Ts \t\t\t#C, driving force\n", + "#At steady state the rate of heat flow through the insulation\n", + "# and the outer air film are equ\n", + "\n", + "#by trial and error method :\n", + "def f(ro): \n", + " return (Ti-Ts)/(math.log(ro/r1)/kc+math.log(r1/ri)/kw)-(h*ro*(Ts-To))\n", + "ro = fsolve(f,0.1)\n", + "th = ro-r1 \t\t\t#m, required thickness of insulation\n", + "Q = 2*math.pi*ro*h*L*(Ts-To)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.1f W\"%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 150.9 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "w1 = 8. \t\t\t#%, solubility of alcohol\n", + "w2 = 92. \t\t\t#%, solubility of water\n", + "k1 = 0.155 \t\t\t#W/m C, thermal conductivity of alcohol\n", + "k2 = 0.67 \t\t\t#W/m C thermal conductivity of water\n", + "ka = 0.0263 \t\t\t#W/m C thermal conductivity of air\n", + "kw = 45. \t\t\t#W/m Cthermal conductivity of pipe wall\n", + "ki = 0.068 \t\t\t#W/m C , thermal cond. of glass\n", + "id_ = 53.*10**-3 \t\t\t#m, internal diameter of pipe\n", + "od = 60.*10**-3 \t\t\t#m, outer diameter of pipe\n", + "t = 0.04 \t\t\t#m, thickness of insulation\n", + "hi = 800. \t\t\t#W/m**2 C, liquid film coefficient\n", + "ho = 10. \t\t\t#W/m**2 C, air film coefficient\n", + "L = 1. \t\t\t#m, length of pipe\n", + "T1 = 75. \t\t\t#C, initial temp.\n", + "T2 = 28. \t\t\t#C, ambient air temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "km = (w1/100)*k1+(w2/100)*k2-0.72*(w1/100)*(w2/100)*(-(k1-k2))\n", + "deli = km/hi \t\t\t#m, effective thickness of liquid film\n", + "delo = ka/ho \t\t\t#m, effective thickness of air film\n", + "print \"effective thickness of air is %.2f mm\"%(deli*10**3)\n", + "print \"effective thickness of liquid films is %.1f mm.\"%(delo*10**3)\n", + "\n", + "#(b)\n", + "Ai = 2*math.pi*id_/2*L \t\t\t#m**2, inside area\n", + "ri = id_/2 \t\t\t#m,inside radius of pipe\n", + "r_ = od/2 \t\t\t#m, outside radius of pipe\n", + "ro = r_+t \t \t\t#m, outer radius of insulation\n", + "Ao = 2*math.pi*ro*L \t\t \t#m**2, outer area\n", + "#from eq. 3.11, overall heat transfer coefficient\n", + "Ui = 1/(1/hi+(Ai*math.log(r_/ri))/(2*math.pi*L*kw)+(Ai*math.log(ro/r_))/(2*math.pi*L*ki)+Ai/(Ao*ho))\n", + "print \"the overall heat transfer coefficient based on i.d of pipe is %.3f W/m**2 C\"%(Ui)\n", + "\n", + "#(c)\n", + "#frim eq. 3.14\n", + "Uo = Ui*Ai/Ao \n", + "print \"the overall heat transfer coefficient based on od of pipe is %.3f W/m**2 C\"%(Uo)\n", + "\n", + "#(d)\n", + "R = 1/(Ui*Ai) \t\t\t#C/W, total heat transfer resistance\n", + "Rair = 1/(Ao*ho) \t\t\t#C/W, heat transfer resistance of air film\n", + "p = Rair/R\n", + "print \"the percentage of total resistance offered by air film. is %.2f percent\"%(p*100)\n", + "\n", + "#(e)\n", + "Q = Ui*Ai*(T1-T2)\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "\n", + "#(f)\n", + "Ts = Uo*Ao*(T1-T2)/(ho*Ao)+T2\n", + "print \"insulation skin temp.is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective thickness of air is 0.75 mm\n", + "effective thickness of liquid films is 2.6 mm.\n", + "the overall heat transfer coefficient based on i.d of pipe is 2.707 W/m**2 C\n", + "the overall heat transfer coefficient based on od of pipe is 1.025 W/m**2 C\n", + "the percentage of total resistance offered by air film. is 10.25 percent\n", + "Rate of heat loss is 21.2 W\n", + "insulation skin temp.is 32.8 C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 1.5 \t\t\t#m, internal diameter of math.tank\n", + "h = 2.5 \t\t\t#m, height of math.tank\n", + "t1 = 0.006 \t\t\t#m, thickness of wall\n", + "t2 = 0.04 \t\t\t#m, thickness of insulation\n", + "Ta = 25. \t\t\t#C, ambient temp.\n", + "T1 = 80. \t\t\t#C, outlet temp. of liquid\n", + "cp = 2000. \t\t\t#j/kg C, specific heat of liquid\n", + "FR = 700./3600 \t\t\t#KG/s, Liquid flow rate\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2+t1 \t\t\t#m, inner radius of insulation\n", + "ro = ri+t2 \t\t\t#m, outer radius of insulation\n", + "ki = 0.05 \t\t\t#W/m C, thermal conductivity of insulation\n", + "hc = 4 \t\t\t#W/m**2 C, heat transfer coefficient at cylindrical surface\n", + "ht = 5.5 \t\t\t#W/m**2 C, heat transfer coefficient at flat surface\n", + "l = h+t1+t2 \t\t\t#m, height of the top of insulation\n", + "#fromm eq. 3.10\n", + "#heat transfer resistance of cylindrical wall\n", + "Rc = math.log(ro/ri)/(2*math.pi*l*ki)+1/(2*math.pi*ro*l*hc)\n", + "#heat transfer resistance of flat insulated top surface\n", + "Ri = (1/(math.pi*ro**2))*((ro-ri)/ki+1/ht)\n", + "tdf = T1-Ta \t\t\t#C, temp. driving force\n", + "Q = tdf/Rc + tdf/Ri \t\t\t#W, total rate of heat loss\n", + "Tt = Q/(FR*cp)+T1 \t\t\t#C, inlet temp. of liquid\n", + "print \"Inlet liquid temp. should be %.0f C \"%(Tt)\n", + "Q1 = tdf/Ri \t\t\t#W, rate of heat loss from flat surface\n", + "T1 = Q1/(math.pi*ro**2*ht)+Ta \n", + "print \" the insulation skin temp. at the flat top surface is %.0f C \"%(T1)\n", + "#similarly\n", + "T2 = 38\n", + "print \"similarly the insulation skin temp at cylindrical surface is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inlet liquid temp. should be 82 C \n", + " the insulation skin temp. at the flat top surface is 35 C \n", + "similarly the insulation skin temp at cylindrical surface is 38 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 2.5*10**-2 \t\t\t#m, internal diameter of glass tube\n", + "t = 0.3*10**-2 \t\t\t#m, thickness of wall\n", + "l = 2.5 \t\t\t#m, length of nichrome wire\n", + "L = 0.12 \t\t\t#m, length of steel covered with heating coil\n", + "Re = 16.7 \t\t\t#ohm, electrical resistance\n", + "ti = 2.5*10**-2 \t\t\t#m, thickness of layer of insulation\n", + "kg = 1.4 \t\t\t#W/m C, thermal conductivity of glass\n", + "ki = 0.041 \t\t\t#W/m C, thermal conductivity of insulation\n", + "T1 = 91. \t\t\t#C, boiling temp. of liquid\n", + "T2 = 27. \t\t\t#C, ambient temp.\n", + "ho = 5.8 \t\t\t#W/m **2 C outside air film coefficient\n", + "V = 90. \t\t\t#V, voltage\n", + "\n", + "#Calculation\n", + "Rc = Re*l \t\t\t#ohm, resistance of heating coil\n", + "Q = V**2/Rc \t\t\t#W, rate of heat generation\n", + "ri = id_/2 \t\t\t#m, inner radius of glass tube\n", + "r_ = ri+t \t\t\t#m, outer radius of glass tube\n", + "ro = r_+ti \t\t\t#m,outer radius of insulation\n", + "#heat transfer resistance of glass wall\n", + "Rg = math.log(r_/ri)/(2*math.pi*L*kg)\n", + "#combined resistance of insulation and outer air film\n", + "Rt = math.log(ro/r_)/(2*math.pi*L*ki)+1/(2*math.pi*ro*L*ho)\n", + "#Rate of heat input to the boiling liquid in steel = Q1 = (Ts-T1)/Rg\n", + "#Rate of heat loss through insulation ,Q2 = (Ts-To)/(Rt)\n", + "#Q1+Q2 = Q\n", + "Ts = (Q+ T1/Rg +T2/Rt)/(1/Rg +1/Rt)\n", + "Q1 = (Ts-T1)/Rg\n", + "Q2 = Q-Q1\n", + "\n", + "# Results\n", + "print \"the heat imput to the boiling.is %.1f W\"%(Q1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat imput to the boiling.is 191.2 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ri = 1.3*10**-3 \t\t\t#m, radius of 10 gauge wire\n", + "t = 1.3*10**-3 \t\t\t#m, thickness of rubber insulation\n", + "Ti = 90. \t\t\t#C, temp. 0f insulation\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "h = 15. \t\t\t#W/m**2 C, air film coefficient\n", + "km = 380. \t\t\t#W/m C, thermal cond. of copper\n", + "kc = 0.14 \t\t\t#W/m C, thermal cond. of rubber(insulation)\n", + "Rc = 0.422/100 \t\t\t#ohm/m, eletrical resistance of copper wire\n", + "\n", + "# Calculations and Results\n", + "Tcmax = 90. \t\t\t#X, the maximum temp. in insulation\n", + "ro = ri+t \t\t\t#m, outside radius of 10 gauge wire\n", + "Sv = ((Tcmax-To)*(2*kc/ri**2))/(math.log(ro/ri)+kc/(h*ro))\n", + "I = (math.pi*ri**2*Sv/Rc)**0.5 \t\t\t#A, Current strength\n", + "print \"maximum allowable current is %.2f A\"%(I)\n", + "\n", + "#(b) at r = 0\n", + "Tm = To+(ri**2*Sv/2)*(1/km+(math.log(ro/ri))/kc+1/(h*ro))\n", + "print \"remp. at the centre of wire is %.3f C\"%(Tm)\n", + "\n", + "#at r = ro\n", + "Tc = 30+(ri**2*Sv/(2*kc))*(kc/(h*ro))\n", + "print \"The temprature at the outer surface of insulation is %.1f C\"%(Tc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum allowable current is 54.04 A\n", + "remp. at the centre of wire is 90.005 C\n", + "The temprature at the outer surface of insulation is 80.3 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "tA = 0.25 \t\t\t#m, thickness of slab A\n", + "tB = 0.1 \t\t\t#m, thickness of slab B\n", + "tC = 0.15 \t\t\t#m, thickness of slab C\n", + "kA = 15. \t\t\t#W/m C, thermal comductivity of slab A\n", + "kB = 10. \t\t\t#W/m C, thermal comductivity of slab B\n", + "kC = 30. \t\t\t#W/m C, thermal comductivity of slab C\n", + "#Temprature distribution in slab A\n", + "T1 = 40. \t\t\t#C, fluid temp.\n", + "T2 = 35. \t\t\t#C, medium temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "x1 = tB \n", + "TA1 = 90.+4500*x1-11000*x1**2\n", + "#similarly at the right surface\n", + "x2 = tA+tB\n", + "TA2 = 90.+4500*x2-11000*x2**2\n", + "#let dTA/dx = D\n", + "D = 0 \t\t\t#for maximum temp.\n", + "x3 = 4500./22000\n", + "TAmax = 90.+4500*x3-11000*x3**2\n", + "print \"At x = 0.1 the temp. at the surface of slab A is %.0f C\"%(TA1)\n", + "print \"At x = 0.35 the temp. at the surface of slab A is %.0f C\"%(TA2)\n", + "print \" the maximum Temp. in A occurs at %.4f m\"%(x3)\n", + "print \" the maximum Temp. in A is %.1f TAmax \"%(TAmax)\n", + "\n", + "#(b)\n", + "#At the interface 2\n", + "D1 = 4500-2.*11000*x1 \t\t\t#C/W, D1 = dTA/dx, at x = 0.1\n", + "#At the interface 3\n", + "D2 = 4500-2.*11000*x2 \t\t\t#D12 = dTA/dx, at x = 0.35\n", + "#Temprature gradient in slab B and C\n", + "#by umath.sing the continuity of heat flux at interface (2)\n", + "D3 = -kA*D1/(-kB) \t\t\t#D3 = dTB/dx, at x = 0.1\n", + "#at interface (1)\n", + "D4 = D3 \t\t\t#D4 = dTB/dx at x = 0\n", + "#similarly \n", + "D5 = -1600. \t\t\t#C/W, dTB/dx, x = 0.35\n", + "D6 = D5 \t\t\t#at interface 4\n", + "print \"temp. gradient at interface 2 of the slabs A is %.0f C/W\"%(D1)\n", + "print \"temp. gradient at interface 3 of the slabs A is %.0f C/W\"%(D2)\n", + "print \"temp. gradient at interface 2 of the slabs B is %.0f C/W\"%(D3)\n", + "print \"temp. gradient at interface 1 of the slabs B is %.0f C/W\"%(D4)\n", + "print \"temp. gradient at interface 3 of the slabs C is %.0f C/W\"%(D5)\n", + "print \"temp. gradient at interface 4 of the slabs C is %.0f C/W\"%(D6)\n", + "\n", + "#(c)\n", + "#from D3 = 3450 and TB = beeta1*x+beeta2\n", + "beeta1 = 3450.\n", + "beeta2 = 85.\n", + "x = 0.\n", + "TB = beeta1*x+beeta2\n", + "#similary\n", + "TC = 877.5-1600*x\n", + "h1 = -kB*D4/(T1-TB)\n", + "#similarly\n", + "h2 = 1129.\n", + "print \"The heat transfer coefficient at one surface of solid fluid interface is %.1f W/m**2 C\"%(h1)\n", + "print \"The heat transfer coefficient at other surface of solid fluid interface is %.0f W/m**2 C\"%(h2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At x = 0.1 the temp. at the surface of slab A is 430 C\n", + "At x = 0.35 the temp. at the surface of slab A is 318 C\n", + " the maximum Temp. in A occurs at 0.2045 m\n", + " the maximum Temp. in A is 550.2 TAmax \n", + "temp. gradient at interface 2 of the slabs A is 2300 C/W\n", + "temp. gradient at interface 3 of the slabs A is -3200 C/W\n", + "temp. gradient at interface 2 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 1 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 3 of the slabs C is -1600 C/W\n", + "temp. gradient at interface 4 of the slabs C is -1600 C/W\n", + "The heat transfer coefficient at one surface of solid fluid interface is 766.7 W/m**2 C\n", + "The heat transfer coefficient at other surface of solid fluid interface is 1129 W/m**2 C\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, actual internal dia of pipe\n", + "tw = 5.5*10**-3 \t\t\t#m, wall thickness\n", + "nl = 8. \t\t\t#no. of longitudinal fins\n", + "tf = 1.5*10**-3 \t\t\t#m, thickness of fin\n", + "w = 30.*10**-3 \t\t\t#m,breadth of fin\n", + "kf = 45. \t\t\t#W/m C, thermal conductivity of fin \n", + "Tw = 150. \t\t\t#C, wall temp.\n", + "To = 28. \t\t\t#C, ambient temp.\n", + "h = 75. \t\t\t#W/m**2C, surface heat transfer coefficient\n", + "\n", + "#Calculation\n", + "#from eq. 3.27\n", + "e = math.sqrt(2*h/(kf*tf)) \n", + "n = (1./(e*w))*math.tanh(e*w) \t\t\t#efficiency of fin\n", + "L = 1. \t\t\t#m, length of fin\n", + "Af = 2.*L*w \t\t\t#m**2, area of math.single fin\n", + "Atf = nl*Af \t\t\t#m**2 total area of fin\n", + "Qmax = h*Atf*(Tw-To) \t\t\t#W, maximum rate of heat transfer\n", + "Qa = n*Qmax \t\t\t#W, actual rate of heat transfer\n", + "Afw = L*tf \t\t\t#m**2, area of contact of fin with pipe wall\n", + "Atfw = Afw*nl \t\t\t#m**2 , area of contact of all fin with pipe wall\n", + "ro = id_/2+tw \t\t\t#m, outer pipe radius\n", + "A = 2*math.pi*L*ro \t\t\t#m**2 area per meter\n", + "Afree = A-Atfw \t\t\t#m**2, free outside area of finned pipe\n", + "#Rate of heat transfer from free area of pipe wall\n", + "Q1 = h*Afree*(Tw-To) \t\t\t#W, \n", + "#total rate of hewat gtransfer from finned pipe\n", + "Qtotal = Qa+Q1 \t\t\t#W\n", + "#Rate of heat transfer fromm unfinned pipe\n", + "Q2 = h*A*(Tw-To)\n", + "per = (Qtotal-Q2)/Q2\n", + "\n", + "# Results\n", + "print \"the percentage increase in the rate of heat transfer is %.1f percent \"%(per*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the percentage increase in the rate of heat transfer is 103.6 percent \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 90.*10**-2 \t\t\t#m, internal diameter of steel\n", + "od = 110.*10**-2 \t\t\t#m, outer diameter of steel\n", + "Ti = 180. \t\t\t#C, inside temp. of steel\n", + "To = 170. \t\t\t#C, outside temp. of steel\n", + "k = 37. \t\t\t#W/m C, thermal conductivity of alloy\n", + "Q = 5.18*10**3 \t\t\t#W, Rate of heat loss\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2 \t\t\t#m, inside radius of shell\n", + "ro = od/2 \t\t\t#m, outside radius of shell\n", + "r_ = 0.5 \t\t\t#m, boundary between the layers\n", + "L = 1 \t\t\t#m, length of shell\n", + "#Rate of heat transfer in the absence of contact resistance\n", + "Q1 = 2*math.pi*L*k*(Ti-To)/(math.log(ro/ri)) \n", + "print \"Rate of heat transfer in the absence of contact resistance is %.3f KW\"%(Q1/1000)\n", + "print \"The actual rate of heat loss is 5.18kW is much less than this value\\\n", + ". So there is a thermal contact resistance at the interface between the layers \"\n", + "\n", + "#(b)\n", + "Ri = (math.log(r_/ri)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of inner layer\n", + "Ro = (math.log(ro/r_)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of outer layer\n", + "Rc = ((Ti-To)/(Q))-(Ri+Ro) \t\t\t#C/W, contact resistance\n", + "print \"The contact resistance is %f C/W \"%(Rc)\n", + "Ac = 2*math.pi*L*r_ \t\t\t#m**2, area of contact surface of shell\n", + "hc = 1/(Ac*Rc) \t\t\t #W/m**2 c, contact heat transfer coefficient\n", + "print \"contact heat transfer coefficient is %.1f W/m**2 C \"%(hc)\n", + "\n", + "#(c)\n", + "dt = Q/(hc*Ac)\n", + "print \"The temprature jump is %.1f C\"%(dt)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat transfer in the absence of contact resistance is 11.585 KW\n", + "The actual rate of heat loss is 5.18kW is much less than this value. So there is a thermal contact resistance at the interface between the layers \n", + "The contact resistance is 0.001067 C/W \n", + "contact heat transfer coefficient is 298.2 W/m**2 C \n", + "The temprature jump is 5.5 C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "d = 5.2*10**-3 \t\t\t#m, diameter of copper wire\n", + "ri = d/2 \t\t\t#inner radius of insulation\n", + "kc = 0.43 \t\t\t#W/m C, thermal conductivity of PVC\n", + "Tw = 60. \t\t\t#C, temp. 0f wire\n", + "h = 11.35 \t\t\t#W/m**2 C, film coefficient\n", + "To = 21. \t\t\t#C, ambient temp.\n", + "\n", + "#calculation\n", + "Ro = kc/h \t\t\t#m,critical outer radius of insulation\n", + "t = Ro-ri\n", + "\n", + "# Results\n", + "print \"the critical thickness is %.2f mm\"%(t*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the critical thickness is 35.29 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the critical insulation thickness.\n", + "\n", + "# Variables\n", + "d = 15.*10**-2 \t\t\t#m, length of steam main\n", + "t = 10.*10**-2 \t\t\t#m, thickness of insulation\n", + "ki = 0.035 \t\t\t#W/m C, thermal conductivity of insulation\n", + "h = 10. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#calculation\n", + "#from eq. 3.29\n", + "ro = ki/h\n", + "\n", + "# Results\n", + "print \"ro = %.1f cm \"%(ro*10**3)\n", + "print \"Radius of bare pipe is larger than outer radius of insulation So critical \\\n", + " insulation thickness does not exist \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ro = 3.5 cm \n", + "Radius of bare pipe is larger than outer radius of insulation So critical insulation thickness does not exist \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import *\n", + "import math\n", + "\n", + "# Variables\n", + "Ti = 172. \t\t\t#C, saturation temp.\n", + "To = 20. \t\t\t#C, ambient temp.\n", + "Cs = 700. \t\t\t#per ton, math.cost of steam\n", + "Lv = 487. \t\t\t#kcal/kg, latent heat of steam\n", + "ho = 10.32 \t\t\t#kcal/h m**2 C, outer heat transfer coefficient\n", + "kc = 0.031 \t\t\t#W/m C, thermal conductivity of insulation\n", + "n = 5. \t\t\t#yr, service life of insulation\n", + "i = 0.18 \t\t\t#Re/(yr)(Re), interest rate\n", + "\n", + "#Calculation\n", + "di = 0.168 \t\t\t#m, inner diameter of insulation\n", + "#Cost of insulation\n", + "Ci = 17360.-(1.91*10**4)*di \t\t\t#Rs/m**3\n", + "Ch = Cs/(1000*Lv) \t\t\t#Rs/cal, math.cost of heat energy in steam\n", + "sm = 1./(1+i)+1/(1+i)**2+1/(1+i)**3+1/(1+i)**4+1/(1+i)**n\n", + "#from eq. 3.33\n", + "ri = di/2 \t\t\t#m inner radius of insulation\n", + "L = 1 \t\t\t#m, length of pipe\n", + "#Pt = Ch*sm*2*math.pi*ri*L*( 1/(((ri/kc)*('math.log(ro/ri)'))+ri/(ho*ro)))*7.2*10**3*(Ti-To)+math.pi*(ro**2-ri**2)*L*Ci\n", + "#On differentiating , dpt/dro = -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2\n", + "def f(ro): \n", + " return -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2+98960*ro\n", + "ro = fsolve(f,0.1)\n", + "t = ro-ri\n", + "\n", + "# Results\n", + "print \"The optimum insulation thickness is %.0f mm\"%(t*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The optimum insulation thickness is 71 mm\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_1.ipynb new file mode 100755 index 00000000..9aaf505b --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_1.ipynb @@ -0,0 +1,878 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f08bf2e26ec42aaf23657b078d5d7e09f39f25fa240de4ab2c4c5a1d19fdc4dc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Heat transfer coefficient" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "di = 0.06 \t\t\t#m,initial diameter of iceball\n", + "T1 = 30. \t\t\t#C, room temp.\n", + "T2 = 0. \t\t\t#ice ball temp.\n", + "h = 11.4 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "x = 40. \t\t\t#% for reduction\n", + "rho = 929. \t\t\t#kg/m**3, density of ice\n", + "Lv = 3.35*10**5 \t\t\t#j/kg, latent heat of fusion\n", + "\n", + "# Calculations\n", + "# m = 4/3*math.pi*r**3 \t\t\t#kg,mass of ice ball\n", + "#rate of melting = -dm/dt\n", + "#rate of heat adsorption = -4*math.pi*r**2*rho*dr/dt*lamda\n", + "#at initial time t = 0\n", + "C1 = di/2 \t\t\t#consmath.tant of integration\n", + "#if the volume of the ball is reduced by 40% of the original volume \n", + "r = ((1-x/100)*(di/2)**3)**(1./3)\n", + "#time required for melting umath.sing eq. 1\n", + "t = (di/2-r)/(h*(T1-T2)/(rho*Lv))\n", + "\n", + "# Results\n", + "print \"The time required for melting the ice is %.0f s\"%(t)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for melting the ice is 4274 s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad \n", + "#calculate the time required for the heating coil.\n", + "\n", + "# Variables\n", + "P = 1.*10**3 \t\t\t#W, electrical heating capacity\n", + "V = 220. \t\t\t#V, applied voltage\n", + "d = 0.574*10**-3 \t\t\t#m, diameter of wire\n", + "R = 4.167 \t\t\t#ohm, electrical resistance\n", + "Tr = 21. \t\t\t#C, room temp.\n", + "h = 100. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "rho = 8920. \t\t\t#kg/m**3, density of wire\n", + "cp = 384. \t\t\t#j/kg C, specific heat of wire\n", + "percent = 63. \t\t\t#%, percent of the steady state\n", + "\n", + "#Calculation\n", + "R_ = V**2/P \t\t\t#ohm, total electrical resistance\n", + "l = R_/R \t\t\t#m, length of wire\n", + "A = math.pi*d*l \t\t\t#m**2, area of wire\n", + "Tf = P/(h*A)+Tr \t\t\t#final temp.\n", + "dtf = Tf-Tr \t\t\t#C. steady state temp. rise\n", + "#temp. of wire after 63% rise\n", + "T = Tr+(percent/100)*dtf \n", + "#rate of heat accumulation on the wire\n", + "#d/dt(m*cp*T) (1)\n", + "#rate of heat loss\n", + "#h*A*(T-Tr).........................(2)\n", + "#heat balance eq. (1) = (2)\n", + "m = math.pi*d**2*l*rho/4 \t\t\t#kg. mass of wire\n", + "#integrating heat balance eq.\n", + "\n", + "def f6(T): \n", + " return 1/((P/(m*cp))-((h*A)/(m*cp))*(T-Tr))\n", + "\n", + "t = quad(f6,21,322)[0]\n", + "\n", + "# Results\n", + "print \"The time required for the heating coil is %.1f s\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the heating coil is 4.9 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "t = 0.2 \t\t\t#m, thickness of wall\n", + "k = 1.163 \t\t\t#W/m C, thermal conductivity of material\n", + "Ta = 30 \t\t\t#C, ambient temp\n", + "\n", + "# Calculations and Results\n", + "#(a) at x = 0.2 let T = T1 at x = x1\n", + "x1 = 0.2\n", + "T1 = 250-2750*x1**2\n", + "#let D = dT/dx\n", + "D = -5500*0.2 \t\t\t#C/m, at x = 0.2\n", + "h = -k*D/(T1-Ta)\n", + "print \" the heat transfer coefficient is %.2f W/m**2 C \"%(h)\n", + "\n", + "#(b)at other surface of wall, x = 0 = x2 (say)\n", + "x2 = 0\n", + "a = -5500*0\n", + "print \"So there is no heat flow at other surface of the wall \"\n", + "\n", + "#(c)\n", + "A = 1 \t\t\t#m**2, area\n", + "Vw = A*x1 \t\t\t#m**3, volume of wall\n", + "HL = h*(T1-Ta) \t\t\t#W, heat loss from unit area\n", + "Vav = HL/x1\n", + "print \"average volumetric rate of heat generation is %.0f W/m**3\"%(Vav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the heat transfer coefficient is 11.63 W/m**2 C \n", + "So there is no heat flow at other surface of the wall \n", + "average volumetric rate of heat generation is 6396 W/m**3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "id_ = 97.*10**-3 \t\t\t#m,internal diameter of steam pipe\n", + "od = 114.*10**-3 \t\t\t#m,outer diameter of steam pipe\n", + "pr = 30. \t\t\t#bar, absolute pressure os saturated steam\n", + "Ti = 234. \t\t\t#C, temp. at 30 bar absolute pressure\n", + "Ts = 55. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "kc = 0.1 \t\t\t#W/m C, thermal conductivity of wool\n", + "kw = 43. \t\t\t#W/m C, thermal conductivity of pipe\n", + "h = 8. \t\t\t#W/m**2 C, external air film coefficient \n", + "L = 1. \t\t\t#m, assume length\n", + "\n", + "#Calculation\n", + "ri = id_/2 \t\t\t#m, \n", + "r1 = (114.*10**-3)/2 \t\t\t#m,outer radius of steam pipe\n", + "\n", + "#thermal resistance of insulation\n", + "#Ri = math.log(ro/r1)/(2*math.pi*L*kc)\n", + "#Thermal resistance of pipe wall\n", + "Rp = math.log(r1/ri)/(2*math.pi*L*kw)\n", + "#RT = Ri+Rp\n", + "DF = Ti-Ts \t\t\t#C, driving force\n", + "#At steady state the rate of heat flow through the insulation\n", + "# and the outer air film are equ\n", + "\n", + "#by trial and error method :\n", + "def f(ro): \n", + " return (Ti-Ts)/(math.log(ro/r1)/kc+math.log(r1/ri)/kw)-(h*ro*(Ts-To))\n", + "ro = fsolve(f,0.1)\n", + "th = ro-r1 \t\t\t#m, required thickness of insulation\n", + "Q = 2*math.pi*ro*h*L*(Ts-To)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.1f W\"%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 150.9 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "w1 = 8. \t\t\t#%, solubility of alcohol\n", + "w2 = 92. \t\t\t#%, solubility of water\n", + "k1 = 0.155 \t\t\t#W/m C, thermal conductivity of alcohol\n", + "k2 = 0.67 \t\t\t#W/m C thermal conductivity of water\n", + "ka = 0.0263 \t\t\t#W/m C thermal conductivity of air\n", + "kw = 45. \t\t\t#W/m Cthermal conductivity of pipe wall\n", + "ki = 0.068 \t\t\t#W/m C , thermal cond. of glass\n", + "id_ = 53.*10**-3 \t\t\t#m, internal diameter of pipe\n", + "od = 60.*10**-3 \t\t\t#m, outer diameter of pipe\n", + "t = 0.04 \t\t\t#m, thickness of insulation\n", + "hi = 800. \t\t\t#W/m**2 C, liquid film coefficient\n", + "ho = 10. \t\t\t#W/m**2 C, air film coefficient\n", + "L = 1. \t\t\t#m, length of pipe\n", + "T1 = 75. \t\t\t#C, initial temp.\n", + "T2 = 28. \t\t\t#C, ambient air temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "km = (w1/100)*k1+(w2/100)*k2-0.72*(w1/100)*(w2/100)*(-(k1-k2))\n", + "deli = km/hi \t\t\t#m, effective thickness of liquid film\n", + "delo = ka/ho \t\t\t#m, effective thickness of air film\n", + "print \"effective thickness of air is %.2f mm\"%(deli*10**3)\n", + "print \"effective thickness of liquid films is %.1f mm.\"%(delo*10**3)\n", + "\n", + "#(b)\n", + "Ai = 2*math.pi*id_/2*L \t\t\t#m**2, inside area\n", + "ri = id_/2 \t\t\t#m,inside radius of pipe\n", + "r_ = od/2 \t\t\t#m, outside radius of pipe\n", + "ro = r_+t \t \t\t#m, outer radius of insulation\n", + "Ao = 2*math.pi*ro*L \t\t \t#m**2, outer area\n", + "#from eq. 3.11, overall heat transfer coefficient\n", + "Ui = 1/(1/hi+(Ai*math.log(r_/ri))/(2*math.pi*L*kw)+(Ai*math.log(ro/r_))/(2*math.pi*L*ki)+Ai/(Ao*ho))\n", + "print \"the overall heat transfer coefficient based on i.d of pipe is %.3f W/m**2 C\"%(Ui)\n", + "\n", + "#(c)\n", + "#frim eq. 3.14\n", + "Uo = Ui*Ai/Ao \n", + "print \"the overall heat transfer coefficient based on od of pipe is %.3f W/m**2 C\"%(Uo)\n", + "\n", + "#(d)\n", + "R = 1/(Ui*Ai) \t\t\t#C/W, total heat transfer resistance\n", + "Rair = 1/(Ao*ho) \t\t\t#C/W, heat transfer resistance of air film\n", + "p = Rair/R\n", + "print \"the percentage of total resistance offered by air film. is %.2f percent\"%(p*100)\n", + "\n", + "#(e)\n", + "Q = Ui*Ai*(T1-T2)\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "\n", + "#(f)\n", + "Ts = Uo*Ao*(T1-T2)/(ho*Ao)+T2\n", + "print \"insulation skin temp.is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective thickness of air is 0.75 mm\n", + "effective thickness of liquid films is 2.6 mm.\n", + "the overall heat transfer coefficient based on i.d of pipe is 2.707 W/m**2 C\n", + "the overall heat transfer coefficient based on od of pipe is 1.025 W/m**2 C\n", + "the percentage of total resistance offered by air film. is 10.25 percent\n", + "Rate of heat loss is 21.2 W\n", + "insulation skin temp.is 32.8 C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 1.5 \t\t\t#m, internal diameter of math.tank\n", + "h = 2.5 \t\t\t#m, height of math.tank\n", + "t1 = 0.006 \t\t\t#m, thickness of wall\n", + "t2 = 0.04 \t\t\t#m, thickness of insulation\n", + "Ta = 25. \t\t\t#C, ambient temp.\n", + "T1 = 80. \t\t\t#C, outlet temp. of liquid\n", + "cp = 2000. \t\t\t#j/kg C, specific heat of liquid\n", + "FR = 700./3600 \t\t\t#KG/s, Liquid flow rate\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2+t1 \t\t\t#m, inner radius of insulation\n", + "ro = ri+t2 \t\t\t#m, outer radius of insulation\n", + "ki = 0.05 \t\t\t#W/m C, thermal conductivity of insulation\n", + "hc = 4 \t\t\t#W/m**2 C, heat transfer coefficient at cylindrical surface\n", + "ht = 5.5 \t\t\t#W/m**2 C, heat transfer coefficient at flat surface\n", + "l = h+t1+t2 \t\t\t#m, height of the top of insulation\n", + "#fromm eq. 3.10\n", + "#heat transfer resistance of cylindrical wall\n", + "Rc = math.log(ro/ri)/(2*math.pi*l*ki)+1/(2*math.pi*ro*l*hc)\n", + "#heat transfer resistance of flat insulated top surface\n", + "Ri = (1/(math.pi*ro**2))*((ro-ri)/ki+1/ht)\n", + "tdf = T1-Ta \t\t\t#C, temp. driving force\n", + "Q = tdf/Rc + tdf/Ri \t\t\t#W, total rate of heat loss\n", + "Tt = Q/(FR*cp)+T1 \t\t\t#C, inlet temp. of liquid\n", + "print \"Inlet liquid temp. should be %.0f C \"%(Tt)\n", + "Q1 = tdf/Ri \t\t\t#W, rate of heat loss from flat surface\n", + "T1 = Q1/(math.pi*ro**2*ht)+Ta \n", + "print \" the insulation skin temp. at the flat top surface is %.0f C \"%(T1)\n", + "#similarly\n", + "T2 = 38\n", + "print \"similarly the insulation skin temp at cylindrical surface is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inlet liquid temp. should be 82 C \n", + " the insulation skin temp. at the flat top surface is 35 C \n", + "similarly the insulation skin temp at cylindrical surface is 38 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 2.5*10**-2 \t\t\t#m, internal diameter of glass tube\n", + "t = 0.3*10**-2 \t\t\t#m, thickness of wall\n", + "l = 2.5 \t\t\t#m, length of nichrome wire\n", + "L = 0.12 \t\t\t#m, length of steel covered with heating coil\n", + "Re = 16.7 \t\t\t#ohm, electrical resistance\n", + "ti = 2.5*10**-2 \t\t\t#m, thickness of layer of insulation\n", + "kg = 1.4 \t\t\t#W/m C, thermal conductivity of glass\n", + "ki = 0.041 \t\t\t#W/m C, thermal conductivity of insulation\n", + "T1 = 91. \t\t\t#C, boiling temp. of liquid\n", + "T2 = 27. \t\t\t#C, ambient temp.\n", + "ho = 5.8 \t\t\t#W/m **2 C outside air film coefficient\n", + "V = 90. \t\t\t#V, voltage\n", + "\n", + "#Calculation\n", + "Rc = Re*l \t\t\t#ohm, resistance of heating coil\n", + "Q = V**2/Rc \t\t\t#W, rate of heat generation\n", + "ri = id_/2 \t\t\t#m, inner radius of glass tube\n", + "r_ = ri+t \t\t\t#m, outer radius of glass tube\n", + "ro = r_+ti \t\t\t#m,outer radius of insulation\n", + "#heat transfer resistance of glass wall\n", + "Rg = math.log(r_/ri)/(2*math.pi*L*kg)\n", + "#combined resistance of insulation and outer air film\n", + "Rt = math.log(ro/r_)/(2*math.pi*L*ki)+1/(2*math.pi*ro*L*ho)\n", + "#Rate of heat input to the boiling liquid in steel = Q1 = (Ts-T1)/Rg\n", + "#Rate of heat loss through insulation ,Q2 = (Ts-To)/(Rt)\n", + "#Q1+Q2 = Q\n", + "Ts = (Q+ T1/Rg +T2/Rt)/(1/Rg +1/Rt)\n", + "Q1 = (Ts-T1)/Rg\n", + "Q2 = Q-Q1\n", + "\n", + "# Results\n", + "print \"the heat imput to the boiling.is %.1f W\"%(Q1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat imput to the boiling.is 191.2 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ri = 1.3*10**-3 \t\t\t#m, radius of 10 gauge wire\n", + "t = 1.3*10**-3 \t\t\t#m, thickness of rubber insulation\n", + "Ti = 90. \t\t\t#C, temp. 0f insulation\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "h = 15. \t\t\t#W/m**2 C, air film coefficient\n", + "km = 380. \t\t\t#W/m C, thermal cond. of copper\n", + "kc = 0.14 \t\t\t#W/m C, thermal cond. of rubber(insulation)\n", + "Rc = 0.422/100 \t\t\t#ohm/m, eletrical resistance of copper wire\n", + "\n", + "# Calculations and Results\n", + "Tcmax = 90. \t\t\t#X, the maximum temp. in insulation\n", + "ro = ri+t \t\t\t#m, outside radius of 10 gauge wire\n", + "Sv = ((Tcmax-To)*(2*kc/ri**2))/(math.log(ro/ri)+kc/(h*ro))\n", + "I = (math.pi*ri**2*Sv/Rc)**0.5 \t\t\t#A, Current strength\n", + "print \"maximum allowable current is %.2f A\"%(I)\n", + "\n", + "#(b) at r = 0\n", + "Tm = To+(ri**2*Sv/2)*(1/km+(math.log(ro/ri))/kc+1/(h*ro))\n", + "print \"remp. at the centre of wire is %.3f C\"%(Tm)\n", + "\n", + "#at r = ro\n", + "Tc = 30+(ri**2*Sv/(2*kc))*(kc/(h*ro))\n", + "print \"The temprature at the outer surface of insulation is %.1f C\"%(Tc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum allowable current is 54.04 A\n", + "remp. at the centre of wire is 90.005 C\n", + "The temprature at the outer surface of insulation is 80.3 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "tA = 0.25 \t\t\t#m, thickness of slab A\n", + "tB = 0.1 \t\t\t#m, thickness of slab B\n", + "tC = 0.15 \t\t\t#m, thickness of slab C\n", + "kA = 15. \t\t\t#W/m C, thermal comductivity of slab A\n", + "kB = 10. \t\t\t#W/m C, thermal comductivity of slab B\n", + "kC = 30. \t\t\t#W/m C, thermal comductivity of slab C\n", + "#Temprature distribution in slab A\n", + "T1 = 40. \t\t\t#C, fluid temp.\n", + "T2 = 35. \t\t\t#C, medium temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "x1 = tB \n", + "TA1 = 90.+4500*x1-11000*x1**2\n", + "#similarly at the right surface\n", + "x2 = tA+tB\n", + "TA2 = 90.+4500*x2-11000*x2**2\n", + "#let dTA/dx = D\n", + "D = 0 \t\t\t#for maximum temp.\n", + "x3 = 4500./22000\n", + "TAmax = 90.+4500*x3-11000*x3**2\n", + "print \"At x = 0.1 the temp. at the surface of slab A is %.0f C\"%(TA1)\n", + "print \"At x = 0.35 the temp. at the surface of slab A is %.0f C\"%(TA2)\n", + "print \" the maximum Temp. in A occurs at %.4f m\"%(x3)\n", + "print \" the maximum Temp. in A is %.1f TAmax \"%(TAmax)\n", + "\n", + "#(b)\n", + "#At the interface 2\n", + "D1 = 4500-2.*11000*x1 \t\t\t#C/W, D1 = dTA/dx, at x = 0.1\n", + "#At the interface 3\n", + "D2 = 4500-2.*11000*x2 \t\t\t#D12 = dTA/dx, at x = 0.35\n", + "#Temprature gradient in slab B and C\n", + "#by umath.sing the continuity of heat flux at interface (2)\n", + "D3 = -kA*D1/(-kB) \t\t\t#D3 = dTB/dx, at x = 0.1\n", + "#at interface (1)\n", + "D4 = D3 \t\t\t#D4 = dTB/dx at x = 0\n", + "#similarly \n", + "D5 = -1600. \t\t\t#C/W, dTB/dx, x = 0.35\n", + "D6 = D5 \t\t\t#at interface 4\n", + "print \"temp. gradient at interface 2 of the slabs A is %.0f C/W\"%(D1)\n", + "print \"temp. gradient at interface 3 of the slabs A is %.0f C/W\"%(D2)\n", + "print \"temp. gradient at interface 2 of the slabs B is %.0f C/W\"%(D3)\n", + "print \"temp. gradient at interface 1 of the slabs B is %.0f C/W\"%(D4)\n", + "print \"temp. gradient at interface 3 of the slabs C is %.0f C/W\"%(D5)\n", + "print \"temp. gradient at interface 4 of the slabs C is %.0f C/W\"%(D6)\n", + "\n", + "#(c)\n", + "#from D3 = 3450 and TB = beeta1*x+beeta2\n", + "beeta1 = 3450.\n", + "beeta2 = 85.\n", + "x = 0.\n", + "TB = beeta1*x+beeta2\n", + "#similary\n", + "TC = 877.5-1600*x\n", + "h1 = -kB*D4/(T1-TB)\n", + "#similarly\n", + "h2 = 1129.\n", + "print \"The heat transfer coefficient at one surface of solid fluid interface is %.1f W/m**2 C\"%(h1)\n", + "print \"The heat transfer coefficient at other surface of solid fluid interface is %.0f W/m**2 C\"%(h2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At x = 0.1 the temp. at the surface of slab A is 430 C\n", + "At x = 0.35 the temp. at the surface of slab A is 318 C\n", + " the maximum Temp. in A occurs at 0.2045 m\n", + " the maximum Temp. in A is 550.2 TAmax \n", + "temp. gradient at interface 2 of the slabs A is 2300 C/W\n", + "temp. gradient at interface 3 of the slabs A is -3200 C/W\n", + "temp. gradient at interface 2 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 1 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 3 of the slabs C is -1600 C/W\n", + "temp. gradient at interface 4 of the slabs C is -1600 C/W\n", + "The heat transfer coefficient at one surface of solid fluid interface is 766.7 W/m**2 C\n", + "The heat transfer coefficient at other surface of solid fluid interface is 1129 W/m**2 C\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, actual internal dia of pipe\n", + "tw = 5.5*10**-3 \t\t\t#m, wall thickness\n", + "nl = 8. \t\t\t#no. of longitudinal fins\n", + "tf = 1.5*10**-3 \t\t\t#m, thickness of fin\n", + "w = 30.*10**-3 \t\t\t#m,breadth of fin\n", + "kf = 45. \t\t\t#W/m C, thermal conductivity of fin \n", + "Tw = 150. \t\t\t#C, wall temp.\n", + "To = 28. \t\t\t#C, ambient temp.\n", + "h = 75. \t\t\t#W/m**2C, surface heat transfer coefficient\n", + "\n", + "#Calculation\n", + "#from eq. 3.27\n", + "e = math.sqrt(2*h/(kf*tf)) \n", + "n = (1./(e*w))*math.tanh(e*w) \t\t\t#efficiency of fin\n", + "L = 1. \t\t\t#m, length of fin\n", + "Af = 2.*L*w \t\t\t#m**2, area of math.single fin\n", + "Atf = nl*Af \t\t\t#m**2 total area of fin\n", + "Qmax = h*Atf*(Tw-To) \t\t\t#W, maximum rate of heat transfer\n", + "Qa = n*Qmax \t\t\t#W, actual rate of heat transfer\n", + "Afw = L*tf \t\t\t#m**2, area of contact of fin with pipe wall\n", + "Atfw = Afw*nl \t\t\t#m**2 , area of contact of all fin with pipe wall\n", + "ro = id_/2+tw \t\t\t#m, outer pipe radius\n", + "A = 2*math.pi*L*ro \t\t\t#m**2 area per meter\n", + "Afree = A-Atfw \t\t\t#m**2, free outside area of finned pipe\n", + "#Rate of heat transfer from free area of pipe wall\n", + "Q1 = h*Afree*(Tw-To) \t\t\t#W, \n", + "#total rate of hewat gtransfer from finned pipe\n", + "Qtotal = Qa+Q1 \t\t\t#W\n", + "#Rate of heat transfer fromm unfinned pipe\n", + "Q2 = h*A*(Tw-To)\n", + "per = (Qtotal-Q2)/Q2\n", + "\n", + "# Results\n", + "print \"the percentage increase in the rate of heat transfer is %.1f percent \"%(per*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the percentage increase in the rate of heat transfer is 103.6 percent \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 90.*10**-2 \t\t\t#m, internal diameter of steel\n", + "od = 110.*10**-2 \t\t\t#m, outer diameter of steel\n", + "Ti = 180. \t\t\t#C, inside temp. of steel\n", + "To = 170. \t\t\t#C, outside temp. of steel\n", + "k = 37. \t\t\t#W/m C, thermal conductivity of alloy\n", + "Q = 5.18*10**3 \t\t\t#W, Rate of heat loss\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2 \t\t\t#m, inside radius of shell\n", + "ro = od/2 \t\t\t#m, outside radius of shell\n", + "r_ = 0.5 \t\t\t#m, boundary between the layers\n", + "L = 1 \t\t\t#m, length of shell\n", + "#Rate of heat transfer in the absence of contact resistance\n", + "Q1 = 2*math.pi*L*k*(Ti-To)/(math.log(ro/ri)) \n", + "print \"Rate of heat transfer in the absence of contact resistance is %.3f KW\"%(Q1/1000)\n", + "print \"The actual rate of heat loss is 5.18kW is much less than this value\\\n", + ". So there is a thermal contact resistance at the interface between the layers \"\n", + "\n", + "#(b)\n", + "Ri = (math.log(r_/ri)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of inner layer\n", + "Ro = (math.log(ro/r_)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of outer layer\n", + "Rc = ((Ti-To)/(Q))-(Ri+Ro) \t\t\t#C/W, contact resistance\n", + "print \"The contact resistance is %f C/W \"%(Rc)\n", + "Ac = 2*math.pi*L*r_ \t\t\t#m**2, area of contact surface of shell\n", + "hc = 1/(Ac*Rc) \t\t\t #W/m**2 c, contact heat transfer coefficient\n", + "print \"contact heat transfer coefficient is %.1f W/m**2 C \"%(hc)\n", + "\n", + "#(c)\n", + "dt = Q/(hc*Ac)\n", + "print \"The temprature jump is %.1f C\"%(dt)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat transfer in the absence of contact resistance is 11.585 KW\n", + "The actual rate of heat loss is 5.18kW is much less than this value. So there is a thermal contact resistance at the interface between the layers \n", + "The contact resistance is 0.001067 C/W \n", + "contact heat transfer coefficient is 298.2 W/m**2 C \n", + "The temprature jump is 5.5 C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "d = 5.2*10**-3 \t\t\t#m, diameter of copper wire\n", + "ri = d/2 \t\t\t#inner radius of insulation\n", + "kc = 0.43 \t\t\t#W/m C, thermal conductivity of PVC\n", + "Tw = 60. \t\t\t#C, temp. 0f wire\n", + "h = 11.35 \t\t\t#W/m**2 C, film coefficient\n", + "To = 21. \t\t\t#C, ambient temp.\n", + "\n", + "#calculation\n", + "Ro = kc/h \t\t\t#m,critical outer radius of insulation\n", + "t = Ro-ri\n", + "\n", + "# Results\n", + "print \"the critical thickness is %.2f mm\"%(t*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the critical thickness is 35.29 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the critical insulation thickness.\n", + "\n", + "# Variables\n", + "d = 15.*10**-2 \t\t\t#m, length of steam main\n", + "t = 10.*10**-2 \t\t\t#m, thickness of insulation\n", + "ki = 0.035 \t\t\t#W/m C, thermal conductivity of insulation\n", + "h = 10. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#calculation\n", + "#from eq. 3.29\n", + "ro = ki/h\n", + "\n", + "# Results\n", + "print \"ro = %.1f cm \"%(ro*10**3)\n", + "print \"Radius of bare pipe is larger than outer radius of insulation So critical \\\n", + " insulation thickness does not exist \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ro = 3.5 cm \n", + "Radius of bare pipe is larger than outer radius of insulation So critical insulation thickness does not exist \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve\n", + "import math\n", + "\n", + "# Variables\n", + "Ti = 172. \t\t\t#C, saturation temp.\n", + "To = 20. \t\t\t#C, ambient temp.\n", + "Cs = 700. \t\t\t#per ton, math.cost of steam\n", + "Lv = 487. \t\t\t#kcal/kg, latent heat of steam\n", + "ho = 10.32 \t\t\t#kcal/h m**2 C, outer heat transfer coefficient\n", + "kc = 0.031 \t\t\t#W/m C, thermal conductivity of insulation\n", + "n = 5. \t\t\t#yr, service life of insulation\n", + "i = 0.18 \t\t\t#Re/(yr)(Re), interest rate\n", + "\n", + "#Calculation\n", + "di = 0.168 \t\t\t#m, inner diameter of insulation\n", + "#Cost of insulation\n", + "Ci = 17360.-(1.91*10**4)*di \t\t\t#Rs/m**3\n", + "Ch = Cs/(1000*Lv) \t\t\t#Rs/cal, math.cost of heat energy in steam\n", + "sm = 1./(1+i)+1/(1+i)**2+1/(1+i)**3+1/(1+i)**4+1/(1+i)**n\n", + "#from eq. 3.33\n", + "ri = di/2 \t\t\t#m inner radius of insulation\n", + "L = 1 \t\t\t#m, length of pipe\n", + "#Pt = Ch*sm*2*math.pi*ri*L*( 1/(((ri/kc)*('math.log(ro/ri)'))+ri/(ho*ro)))*7.2*10**3*(Ti-To)+math.pi*(ro**2-ri**2)*L*Ci\n", + "#On differentiating , dpt/dro = -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2\n", + "def f(ro): \n", + " return -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2+98960*ro\n", + "ro = fsolve(f,0.1)\n", + "t = ro-ri\n", + "\n", + "# Results\n", + "print \"The optimum insulation thickness is %.0f mm\"%(t*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The optimum insulation thickness is 71 mm\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_2.ipynb new file mode 100755 index 00000000..9aaf505b --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch3_2.ipynb @@ -0,0 +1,878 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f08bf2e26ec42aaf23657b078d5d7e09f39f25fa240de4ab2c4c5a1d19fdc4dc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Heat transfer coefficient" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "di = 0.06 \t\t\t#m,initial diameter of iceball\n", + "T1 = 30. \t\t\t#C, room temp.\n", + "T2 = 0. \t\t\t#ice ball temp.\n", + "h = 11.4 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "x = 40. \t\t\t#% for reduction\n", + "rho = 929. \t\t\t#kg/m**3, density of ice\n", + "Lv = 3.35*10**5 \t\t\t#j/kg, latent heat of fusion\n", + "\n", + "# Calculations\n", + "# m = 4/3*math.pi*r**3 \t\t\t#kg,mass of ice ball\n", + "#rate of melting = -dm/dt\n", + "#rate of heat adsorption = -4*math.pi*r**2*rho*dr/dt*lamda\n", + "#at initial time t = 0\n", + "C1 = di/2 \t\t\t#consmath.tant of integration\n", + "#if the volume of the ball is reduced by 40% of the original volume \n", + "r = ((1-x/100)*(di/2)**3)**(1./3)\n", + "#time required for melting umath.sing eq. 1\n", + "t = (di/2-r)/(h*(T1-T2)/(rho*Lv))\n", + "\n", + "# Results\n", + "print \"The time required for melting the ice is %.0f s\"%(t)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for melting the ice is 4274 s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy.integrate import quad \n", + "#calculate the time required for the heating coil.\n", + "\n", + "# Variables\n", + "P = 1.*10**3 \t\t\t#W, electrical heating capacity\n", + "V = 220. \t\t\t#V, applied voltage\n", + "d = 0.574*10**-3 \t\t\t#m, diameter of wire\n", + "R = 4.167 \t\t\t#ohm, electrical resistance\n", + "Tr = 21. \t\t\t#C, room temp.\n", + "h = 100. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "rho = 8920. \t\t\t#kg/m**3, density of wire\n", + "cp = 384. \t\t\t#j/kg C, specific heat of wire\n", + "percent = 63. \t\t\t#%, percent of the steady state\n", + "\n", + "#Calculation\n", + "R_ = V**2/P \t\t\t#ohm, total electrical resistance\n", + "l = R_/R \t\t\t#m, length of wire\n", + "A = math.pi*d*l \t\t\t#m**2, area of wire\n", + "Tf = P/(h*A)+Tr \t\t\t#final temp.\n", + "dtf = Tf-Tr \t\t\t#C. steady state temp. rise\n", + "#temp. of wire after 63% rise\n", + "T = Tr+(percent/100)*dtf \n", + "#rate of heat accumulation on the wire\n", + "#d/dt(m*cp*T) (1)\n", + "#rate of heat loss\n", + "#h*A*(T-Tr).........................(2)\n", + "#heat balance eq. (1) = (2)\n", + "m = math.pi*d**2*l*rho/4 \t\t\t#kg. mass of wire\n", + "#integrating heat balance eq.\n", + "\n", + "def f6(T): \n", + " return 1/((P/(m*cp))-((h*A)/(m*cp))*(T-Tr))\n", + "\n", + "t = quad(f6,21,322)[0]\n", + "\n", + "# Results\n", + "print \"The time required for the heating coil is %.1f s\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the heating coil is 4.9 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "t = 0.2 \t\t\t#m, thickness of wall\n", + "k = 1.163 \t\t\t#W/m C, thermal conductivity of material\n", + "Ta = 30 \t\t\t#C, ambient temp\n", + "\n", + "# Calculations and Results\n", + "#(a) at x = 0.2 let T = T1 at x = x1\n", + "x1 = 0.2\n", + "T1 = 250-2750*x1**2\n", + "#let D = dT/dx\n", + "D = -5500*0.2 \t\t\t#C/m, at x = 0.2\n", + "h = -k*D/(T1-Ta)\n", + "print \" the heat transfer coefficient is %.2f W/m**2 C \"%(h)\n", + "\n", + "#(b)at other surface of wall, x = 0 = x2 (say)\n", + "x2 = 0\n", + "a = -5500*0\n", + "print \"So there is no heat flow at other surface of the wall \"\n", + "\n", + "#(c)\n", + "A = 1 \t\t\t#m**2, area\n", + "Vw = A*x1 \t\t\t#m**3, volume of wall\n", + "HL = h*(T1-Ta) \t\t\t#W, heat loss from unit area\n", + "Vav = HL/x1\n", + "print \"average volumetric rate of heat generation is %.0f W/m**3\"%(Vav)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the heat transfer coefficient is 11.63 W/m**2 C \n", + "So there is no heat flow at other surface of the wall \n", + "average volumetric rate of heat generation is 6396 W/m**3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "# Variables\n", + "id_ = 97.*10**-3 \t\t\t#m,internal diameter of steam pipe\n", + "od = 114.*10**-3 \t\t\t#m,outer diameter of steam pipe\n", + "pr = 30. \t\t\t#bar, absolute pressure os saturated steam\n", + "Ti = 234. \t\t\t#C, temp. at 30 bar absolute pressure\n", + "Ts = 55. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "kc = 0.1 \t\t\t#W/m C, thermal conductivity of wool\n", + "kw = 43. \t\t\t#W/m C, thermal conductivity of pipe\n", + "h = 8. \t\t\t#W/m**2 C, external air film coefficient \n", + "L = 1. \t\t\t#m, assume length\n", + "\n", + "#Calculation\n", + "ri = id_/2 \t\t\t#m, \n", + "r1 = (114.*10**-3)/2 \t\t\t#m,outer radius of steam pipe\n", + "\n", + "#thermal resistance of insulation\n", + "#Ri = math.log(ro/r1)/(2*math.pi*L*kc)\n", + "#Thermal resistance of pipe wall\n", + "Rp = math.log(r1/ri)/(2*math.pi*L*kw)\n", + "#RT = Ri+Rp\n", + "DF = Ti-Ts \t\t\t#C, driving force\n", + "#At steady state the rate of heat flow through the insulation\n", + "# and the outer air film are equ\n", + "\n", + "#by trial and error method :\n", + "def f(ro): \n", + " return (Ti-Ts)/(math.log(ro/r1)/kc+math.log(r1/ri)/kw)-(h*ro*(Ts-To))\n", + "ro = fsolve(f,0.1)\n", + "th = ro-r1 \t\t\t#m, required thickness of insulation\n", + "Q = 2*math.pi*ro*h*L*(Ts-To)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.1f W\"%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 150.9 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "w1 = 8. \t\t\t#%, solubility of alcohol\n", + "w2 = 92. \t\t\t#%, solubility of water\n", + "k1 = 0.155 \t\t\t#W/m C, thermal conductivity of alcohol\n", + "k2 = 0.67 \t\t\t#W/m C thermal conductivity of water\n", + "ka = 0.0263 \t\t\t#W/m C thermal conductivity of air\n", + "kw = 45. \t\t\t#W/m Cthermal conductivity of pipe wall\n", + "ki = 0.068 \t\t\t#W/m C , thermal cond. of glass\n", + "id_ = 53.*10**-3 \t\t\t#m, internal diameter of pipe\n", + "od = 60.*10**-3 \t\t\t#m, outer diameter of pipe\n", + "t = 0.04 \t\t\t#m, thickness of insulation\n", + "hi = 800. \t\t\t#W/m**2 C, liquid film coefficient\n", + "ho = 10. \t\t\t#W/m**2 C, air film coefficient\n", + "L = 1. \t\t\t#m, length of pipe\n", + "T1 = 75. \t\t\t#C, initial temp.\n", + "T2 = 28. \t\t\t#C, ambient air temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "km = (w1/100)*k1+(w2/100)*k2-0.72*(w1/100)*(w2/100)*(-(k1-k2))\n", + "deli = km/hi \t\t\t#m, effective thickness of liquid film\n", + "delo = ka/ho \t\t\t#m, effective thickness of air film\n", + "print \"effective thickness of air is %.2f mm\"%(deli*10**3)\n", + "print \"effective thickness of liquid films is %.1f mm.\"%(delo*10**3)\n", + "\n", + "#(b)\n", + "Ai = 2*math.pi*id_/2*L \t\t\t#m**2, inside area\n", + "ri = id_/2 \t\t\t#m,inside radius of pipe\n", + "r_ = od/2 \t\t\t#m, outside radius of pipe\n", + "ro = r_+t \t \t\t#m, outer radius of insulation\n", + "Ao = 2*math.pi*ro*L \t\t \t#m**2, outer area\n", + "#from eq. 3.11, overall heat transfer coefficient\n", + "Ui = 1/(1/hi+(Ai*math.log(r_/ri))/(2*math.pi*L*kw)+(Ai*math.log(ro/r_))/(2*math.pi*L*ki)+Ai/(Ao*ho))\n", + "print \"the overall heat transfer coefficient based on i.d of pipe is %.3f W/m**2 C\"%(Ui)\n", + "\n", + "#(c)\n", + "#frim eq. 3.14\n", + "Uo = Ui*Ai/Ao \n", + "print \"the overall heat transfer coefficient based on od of pipe is %.3f W/m**2 C\"%(Uo)\n", + "\n", + "#(d)\n", + "R = 1/(Ui*Ai) \t\t\t#C/W, total heat transfer resistance\n", + "Rair = 1/(Ao*ho) \t\t\t#C/W, heat transfer resistance of air film\n", + "p = Rair/R\n", + "print \"the percentage of total resistance offered by air film. is %.2f percent\"%(p*100)\n", + "\n", + "#(e)\n", + "Q = Ui*Ai*(T1-T2)\n", + "print \"Rate of heat loss is %.1f W\"%(Q)\n", + "\n", + "#(f)\n", + "Ts = Uo*Ao*(T1-T2)/(ho*Ao)+T2\n", + "print \"insulation skin temp.is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective thickness of air is 0.75 mm\n", + "effective thickness of liquid films is 2.6 mm.\n", + "the overall heat transfer coefficient based on i.d of pipe is 2.707 W/m**2 C\n", + "the overall heat transfer coefficient based on od of pipe is 1.025 W/m**2 C\n", + "the percentage of total resistance offered by air film. is 10.25 percent\n", + "Rate of heat loss is 21.2 W\n", + "insulation skin temp.is 32.8 C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 1.5 \t\t\t#m, internal diameter of math.tank\n", + "h = 2.5 \t\t\t#m, height of math.tank\n", + "t1 = 0.006 \t\t\t#m, thickness of wall\n", + "t2 = 0.04 \t\t\t#m, thickness of insulation\n", + "Ta = 25. \t\t\t#C, ambient temp.\n", + "T1 = 80. \t\t\t#C, outlet temp. of liquid\n", + "cp = 2000. \t\t\t#j/kg C, specific heat of liquid\n", + "FR = 700./3600 \t\t\t#KG/s, Liquid flow rate\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2+t1 \t\t\t#m, inner radius of insulation\n", + "ro = ri+t2 \t\t\t#m, outer radius of insulation\n", + "ki = 0.05 \t\t\t#W/m C, thermal conductivity of insulation\n", + "hc = 4 \t\t\t#W/m**2 C, heat transfer coefficient at cylindrical surface\n", + "ht = 5.5 \t\t\t#W/m**2 C, heat transfer coefficient at flat surface\n", + "l = h+t1+t2 \t\t\t#m, height of the top of insulation\n", + "#fromm eq. 3.10\n", + "#heat transfer resistance of cylindrical wall\n", + "Rc = math.log(ro/ri)/(2*math.pi*l*ki)+1/(2*math.pi*ro*l*hc)\n", + "#heat transfer resistance of flat insulated top surface\n", + "Ri = (1/(math.pi*ro**2))*((ro-ri)/ki+1/ht)\n", + "tdf = T1-Ta \t\t\t#C, temp. driving force\n", + "Q = tdf/Rc + tdf/Ri \t\t\t#W, total rate of heat loss\n", + "Tt = Q/(FR*cp)+T1 \t\t\t#C, inlet temp. of liquid\n", + "print \"Inlet liquid temp. should be %.0f C \"%(Tt)\n", + "Q1 = tdf/Ri \t\t\t#W, rate of heat loss from flat surface\n", + "T1 = Q1/(math.pi*ro**2*ht)+Ta \n", + "print \" the insulation skin temp. at the flat top surface is %.0f C \"%(T1)\n", + "#similarly\n", + "T2 = 38\n", + "print \"similarly the insulation skin temp at cylindrical surface is %.0f C\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inlet liquid temp. should be 82 C \n", + " the insulation skin temp. at the flat top surface is 35 C \n", + "similarly the insulation skin temp at cylindrical surface is 38 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 2.5*10**-2 \t\t\t#m, internal diameter of glass tube\n", + "t = 0.3*10**-2 \t\t\t#m, thickness of wall\n", + "l = 2.5 \t\t\t#m, length of nichrome wire\n", + "L = 0.12 \t\t\t#m, length of steel covered with heating coil\n", + "Re = 16.7 \t\t\t#ohm, electrical resistance\n", + "ti = 2.5*10**-2 \t\t\t#m, thickness of layer of insulation\n", + "kg = 1.4 \t\t\t#W/m C, thermal conductivity of glass\n", + "ki = 0.041 \t\t\t#W/m C, thermal conductivity of insulation\n", + "T1 = 91. \t\t\t#C, boiling temp. of liquid\n", + "T2 = 27. \t\t\t#C, ambient temp.\n", + "ho = 5.8 \t\t\t#W/m **2 C outside air film coefficient\n", + "V = 90. \t\t\t#V, voltage\n", + "\n", + "#Calculation\n", + "Rc = Re*l \t\t\t#ohm, resistance of heating coil\n", + "Q = V**2/Rc \t\t\t#W, rate of heat generation\n", + "ri = id_/2 \t\t\t#m, inner radius of glass tube\n", + "r_ = ri+t \t\t\t#m, outer radius of glass tube\n", + "ro = r_+ti \t\t\t#m,outer radius of insulation\n", + "#heat transfer resistance of glass wall\n", + "Rg = math.log(r_/ri)/(2*math.pi*L*kg)\n", + "#combined resistance of insulation and outer air film\n", + "Rt = math.log(ro/r_)/(2*math.pi*L*ki)+1/(2*math.pi*ro*L*ho)\n", + "#Rate of heat input to the boiling liquid in steel = Q1 = (Ts-T1)/Rg\n", + "#Rate of heat loss through insulation ,Q2 = (Ts-To)/(Rt)\n", + "#Q1+Q2 = Q\n", + "Ts = (Q+ T1/Rg +T2/Rt)/(1/Rg +1/Rt)\n", + "Q1 = (Ts-T1)/Rg\n", + "Q2 = Q-Q1\n", + "\n", + "# Results\n", + "print \"the heat imput to the boiling.is %.1f W\"%(Q1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat imput to the boiling.is 191.2 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ri = 1.3*10**-3 \t\t\t#m, radius of 10 gauge wire\n", + "t = 1.3*10**-3 \t\t\t#m, thickness of rubber insulation\n", + "Ti = 90. \t\t\t#C, temp. 0f insulation\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "h = 15. \t\t\t#W/m**2 C, air film coefficient\n", + "km = 380. \t\t\t#W/m C, thermal cond. of copper\n", + "kc = 0.14 \t\t\t#W/m C, thermal cond. of rubber(insulation)\n", + "Rc = 0.422/100 \t\t\t#ohm/m, eletrical resistance of copper wire\n", + "\n", + "# Calculations and Results\n", + "Tcmax = 90. \t\t\t#X, the maximum temp. in insulation\n", + "ro = ri+t \t\t\t#m, outside radius of 10 gauge wire\n", + "Sv = ((Tcmax-To)*(2*kc/ri**2))/(math.log(ro/ri)+kc/(h*ro))\n", + "I = (math.pi*ri**2*Sv/Rc)**0.5 \t\t\t#A, Current strength\n", + "print \"maximum allowable current is %.2f A\"%(I)\n", + "\n", + "#(b) at r = 0\n", + "Tm = To+(ri**2*Sv/2)*(1/km+(math.log(ro/ri))/kc+1/(h*ro))\n", + "print \"remp. at the centre of wire is %.3f C\"%(Tm)\n", + "\n", + "#at r = ro\n", + "Tc = 30+(ri**2*Sv/(2*kc))*(kc/(h*ro))\n", + "print \"The temprature at the outer surface of insulation is %.1f C\"%(Tc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum allowable current is 54.04 A\n", + "remp. at the centre of wire is 90.005 C\n", + "The temprature at the outer surface of insulation is 80.3 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "tA = 0.25 \t\t\t#m, thickness of slab A\n", + "tB = 0.1 \t\t\t#m, thickness of slab B\n", + "tC = 0.15 \t\t\t#m, thickness of slab C\n", + "kA = 15. \t\t\t#W/m C, thermal comductivity of slab A\n", + "kB = 10. \t\t\t#W/m C, thermal comductivity of slab B\n", + "kC = 30. \t\t\t#W/m C, thermal comductivity of slab C\n", + "#Temprature distribution in slab A\n", + "T1 = 40. \t\t\t#C, fluid temp.\n", + "T2 = 35. \t\t\t#C, medium temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "x1 = tB \n", + "TA1 = 90.+4500*x1-11000*x1**2\n", + "#similarly at the right surface\n", + "x2 = tA+tB\n", + "TA2 = 90.+4500*x2-11000*x2**2\n", + "#let dTA/dx = D\n", + "D = 0 \t\t\t#for maximum temp.\n", + "x3 = 4500./22000\n", + "TAmax = 90.+4500*x3-11000*x3**2\n", + "print \"At x = 0.1 the temp. at the surface of slab A is %.0f C\"%(TA1)\n", + "print \"At x = 0.35 the temp. at the surface of slab A is %.0f C\"%(TA2)\n", + "print \" the maximum Temp. in A occurs at %.4f m\"%(x3)\n", + "print \" the maximum Temp. in A is %.1f TAmax \"%(TAmax)\n", + "\n", + "#(b)\n", + "#At the interface 2\n", + "D1 = 4500-2.*11000*x1 \t\t\t#C/W, D1 = dTA/dx, at x = 0.1\n", + "#At the interface 3\n", + "D2 = 4500-2.*11000*x2 \t\t\t#D12 = dTA/dx, at x = 0.35\n", + "#Temprature gradient in slab B and C\n", + "#by umath.sing the continuity of heat flux at interface (2)\n", + "D3 = -kA*D1/(-kB) \t\t\t#D3 = dTB/dx, at x = 0.1\n", + "#at interface (1)\n", + "D4 = D3 \t\t\t#D4 = dTB/dx at x = 0\n", + "#similarly \n", + "D5 = -1600. \t\t\t#C/W, dTB/dx, x = 0.35\n", + "D6 = D5 \t\t\t#at interface 4\n", + "print \"temp. gradient at interface 2 of the slabs A is %.0f C/W\"%(D1)\n", + "print \"temp. gradient at interface 3 of the slabs A is %.0f C/W\"%(D2)\n", + "print \"temp. gradient at interface 2 of the slabs B is %.0f C/W\"%(D3)\n", + "print \"temp. gradient at interface 1 of the slabs B is %.0f C/W\"%(D4)\n", + "print \"temp. gradient at interface 3 of the slabs C is %.0f C/W\"%(D5)\n", + "print \"temp. gradient at interface 4 of the slabs C is %.0f C/W\"%(D6)\n", + "\n", + "#(c)\n", + "#from D3 = 3450 and TB = beeta1*x+beeta2\n", + "beeta1 = 3450.\n", + "beeta2 = 85.\n", + "x = 0.\n", + "TB = beeta1*x+beeta2\n", + "#similary\n", + "TC = 877.5-1600*x\n", + "h1 = -kB*D4/(T1-TB)\n", + "#similarly\n", + "h2 = 1129.\n", + "print \"The heat transfer coefficient at one surface of solid fluid interface is %.1f W/m**2 C\"%(h1)\n", + "print \"The heat transfer coefficient at other surface of solid fluid interface is %.0f W/m**2 C\"%(h2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At x = 0.1 the temp. at the surface of slab A is 430 C\n", + "At x = 0.35 the temp. at the surface of slab A is 318 C\n", + " the maximum Temp. in A occurs at 0.2045 m\n", + " the maximum Temp. in A is 550.2 TAmax \n", + "temp. gradient at interface 2 of the slabs A is 2300 C/W\n", + "temp. gradient at interface 3 of the slabs A is -3200 C/W\n", + "temp. gradient at interface 2 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 1 of the slabs B is 3450 C/W\n", + "temp. gradient at interface 3 of the slabs C is -1600 C/W\n", + "temp. gradient at interface 4 of the slabs C is -1600 C/W\n", + "The heat transfer coefficient at one surface of solid fluid interface is 766.7 W/m**2 C\n", + "The heat transfer coefficient at other surface of solid fluid interface is 1129 W/m**2 C\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, actual internal dia of pipe\n", + "tw = 5.5*10**-3 \t\t\t#m, wall thickness\n", + "nl = 8. \t\t\t#no. of longitudinal fins\n", + "tf = 1.5*10**-3 \t\t\t#m, thickness of fin\n", + "w = 30.*10**-3 \t\t\t#m,breadth of fin\n", + "kf = 45. \t\t\t#W/m C, thermal conductivity of fin \n", + "Tw = 150. \t\t\t#C, wall temp.\n", + "To = 28. \t\t\t#C, ambient temp.\n", + "h = 75. \t\t\t#W/m**2C, surface heat transfer coefficient\n", + "\n", + "#Calculation\n", + "#from eq. 3.27\n", + "e = math.sqrt(2*h/(kf*tf)) \n", + "n = (1./(e*w))*math.tanh(e*w) \t\t\t#efficiency of fin\n", + "L = 1. \t\t\t#m, length of fin\n", + "Af = 2.*L*w \t\t\t#m**2, area of math.single fin\n", + "Atf = nl*Af \t\t\t#m**2 total area of fin\n", + "Qmax = h*Atf*(Tw-To) \t\t\t#W, maximum rate of heat transfer\n", + "Qa = n*Qmax \t\t\t#W, actual rate of heat transfer\n", + "Afw = L*tf \t\t\t#m**2, area of contact of fin with pipe wall\n", + "Atfw = Afw*nl \t\t\t#m**2 , area of contact of all fin with pipe wall\n", + "ro = id_/2+tw \t\t\t#m, outer pipe radius\n", + "A = 2*math.pi*L*ro \t\t\t#m**2 area per meter\n", + "Afree = A-Atfw \t\t\t#m**2, free outside area of finned pipe\n", + "#Rate of heat transfer from free area of pipe wall\n", + "Q1 = h*Afree*(Tw-To) \t\t\t#W, \n", + "#total rate of hewat gtransfer from finned pipe\n", + "Qtotal = Qa+Q1 \t\t\t#W\n", + "#Rate of heat transfer fromm unfinned pipe\n", + "Q2 = h*A*(Tw-To)\n", + "per = (Qtotal-Q2)/Q2\n", + "\n", + "# Results\n", + "print \"the percentage increase in the rate of heat transfer is %.1f percent \"%(per*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the percentage increase in the rate of heat transfer is 103.6 percent \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "id_ = 90.*10**-2 \t\t\t#m, internal diameter of steel\n", + "od = 110.*10**-2 \t\t\t#m, outer diameter of steel\n", + "Ti = 180. \t\t\t#C, inside temp. of steel\n", + "To = 170. \t\t\t#C, outside temp. of steel\n", + "k = 37. \t\t\t#W/m C, thermal conductivity of alloy\n", + "Q = 5.18*10**3 \t\t\t#W, Rate of heat loss\n", + "\n", + "# Calculations and Results\n", + "ri = id_/2 \t\t\t#m, inside radius of shell\n", + "ro = od/2 \t\t\t#m, outside radius of shell\n", + "r_ = 0.5 \t\t\t#m, boundary between the layers\n", + "L = 1 \t\t\t#m, length of shell\n", + "#Rate of heat transfer in the absence of contact resistance\n", + "Q1 = 2*math.pi*L*k*(Ti-To)/(math.log(ro/ri)) \n", + "print \"Rate of heat transfer in the absence of contact resistance is %.3f KW\"%(Q1/1000)\n", + "print \"The actual rate of heat loss is 5.18kW is much less than this value\\\n", + ". So there is a thermal contact resistance at the interface between the layers \"\n", + "\n", + "#(b)\n", + "Ri = (math.log(r_/ri)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of inner layer\n", + "Ro = (math.log(ro/r_)/(2*math.pi*L*k)) \t\t\t#C/W, resistance of outer layer\n", + "Rc = ((Ti-To)/(Q))-(Ri+Ro) \t\t\t#C/W, contact resistance\n", + "print \"The contact resistance is %f C/W \"%(Rc)\n", + "Ac = 2*math.pi*L*r_ \t\t\t#m**2, area of contact surface of shell\n", + "hc = 1/(Ac*Rc) \t\t\t #W/m**2 c, contact heat transfer coefficient\n", + "print \"contact heat transfer coefficient is %.1f W/m**2 C \"%(hc)\n", + "\n", + "#(c)\n", + "dt = Q/(hc*Ac)\n", + "print \"The temprature jump is %.1f C\"%(dt)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat transfer in the absence of contact resistance is 11.585 KW\n", + "The actual rate of heat loss is 5.18kW is much less than this value. So there is a thermal contact resistance at the interface between the layers \n", + "The contact resistance is 0.001067 C/W \n", + "contact heat transfer coefficient is 298.2 W/m**2 C \n", + "The temprature jump is 5.5 C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "d = 5.2*10**-3 \t\t\t#m, diameter of copper wire\n", + "ri = d/2 \t\t\t#inner radius of insulation\n", + "kc = 0.43 \t\t\t#W/m C, thermal conductivity of PVC\n", + "Tw = 60. \t\t\t#C, temp. 0f wire\n", + "h = 11.35 \t\t\t#W/m**2 C, film coefficient\n", + "To = 21. \t\t\t#C, ambient temp.\n", + "\n", + "#calculation\n", + "Ro = kc/h \t\t\t#m,critical outer radius of insulation\n", + "t = Ro-ri\n", + "\n", + "# Results\n", + "print \"the critical thickness is %.2f mm\"%(t*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the critical thickness is 35.29 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# calculate the critical insulation thickness.\n", + "\n", + "# Variables\n", + "d = 15.*10**-2 \t\t\t#m, length of steam main\n", + "t = 10.*10**-2 \t\t\t#m, thickness of insulation\n", + "ki = 0.035 \t\t\t#W/m C, thermal conductivity of insulation\n", + "h = 10. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#calculation\n", + "#from eq. 3.29\n", + "ro = ki/h\n", + "\n", + "# Results\n", + "print \"ro = %.1f cm \"%(ro*10**3)\n", + "print \"Radius of bare pipe is larger than outer radius of insulation So critical \\\n", + " insulation thickness does not exist \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ro = 3.5 cm \n", + "Radius of bare pipe is larger than outer radius of insulation So critical insulation thickness does not exist \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve\n", + "import math\n", + "\n", + "# Variables\n", + "Ti = 172. \t\t\t#C, saturation temp.\n", + "To = 20. \t\t\t#C, ambient temp.\n", + "Cs = 700. \t\t\t#per ton, math.cost of steam\n", + "Lv = 487. \t\t\t#kcal/kg, latent heat of steam\n", + "ho = 10.32 \t\t\t#kcal/h m**2 C, outer heat transfer coefficient\n", + "kc = 0.031 \t\t\t#W/m C, thermal conductivity of insulation\n", + "n = 5. \t\t\t#yr, service life of insulation\n", + "i = 0.18 \t\t\t#Re/(yr)(Re), interest rate\n", + "\n", + "#Calculation\n", + "di = 0.168 \t\t\t#m, inner diameter of insulation\n", + "#Cost of insulation\n", + "Ci = 17360.-(1.91*10**4)*di \t\t\t#Rs/m**3\n", + "Ch = Cs/(1000*Lv) \t\t\t#Rs/cal, math.cost of heat energy in steam\n", + "sm = 1./(1+i)+1/(1+i)**2+1/(1+i)**3+1/(1+i)**4+1/(1+i)**n\n", + "#from eq. 3.33\n", + "ri = di/2 \t\t\t#m inner radius of insulation\n", + "L = 1 \t\t\t#m, length of pipe\n", + "#Pt = Ch*sm*2*math.pi*ri*L*( 1/(((ri/kc)*('math.log(ro/ri)'))+ri/(ho*ro)))*7.2*10**3*(Ti-To)+math.pi*(ro**2-ri**2)*L*Ci\n", + "#On differentiating , dpt/dro = -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2\n", + "def f(ro): \n", + " return -957.7*((1/ro)-(0.003/ro**2))/(math.log(ro)+(0.003/ro)+2.477)**2+98960*ro\n", + "ro = fsolve(f,0.1)\n", + "t = ro-ri\n", + "\n", + "# Results\n", + "print \"The optimum insulation thickness is %.0f mm\"%(t*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The optimum insulation thickness is 71 mm\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4.ipynb new file mode 100755 index 00000000..39271a78 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4.ipynb @@ -0,0 +1,773 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:010bf22581cfd4db854de658a1b49b7d5a2d4c0218984c722e4d81555e2b9671" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Forced Convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 2. \t\t\t#m, length of flat surface\n", + "T1 = 150. \t\t\t#C, surface temp.\n", + "p = 1. \t\t\t#atm, pressure\n", + "T2 = 30. \t\t\t#C, bulk air temp.\n", + "V = 12. \t\t\t#m/s, air velocity\n", + "\n", + "#Calculation\n", + "Tf = (T1+T2)/2 \t\t\t#C, mean air film temp.\n", + "mu = 2.131*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.031 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.962 \t\t\t#kg/m**3, density of air\n", + "cp = 1.01 \t\t\t#kj/kg C, specific heat of air\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Remax = l*V*rho/mu \t\t\t#maximum Reynold no.\n", + "Re = 5.*10**5 \t\t\t#Reynold no. during transition to turbulent flow \n", + "L_ = (Re*mu)/(V*rho) \t\t\t#m,dismath.tance from the leading edge\n", + "#for laminar flow heat transfer coefficient h, \n", + "#h16.707*x**-(1/2)\n", + "#(a)\n", + "#h2 = 31.4*x**(-1/5)\n", + "#b\n", + "hav = 22.2\n", + "#c\n", + "Q = hav*l*p*(T1-T2)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(Q)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 5328 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 7.24*10**-4 \t\t\t#m, diameter of wire\n", + "l = 1. \t\t\t#m, length of wire\n", + "I = 8.3 \t\t\t#A, current in a wire\n", + "R = 2.625 \t\t\t#ohm/m, electrical resistance\n", + "V = 10. \t\t\t#m/s, air velocity\n", + "Tb = 27. \t\t\t#C, bulk air temp.\n", + "#the properties at bulk temp.\n", + "mu = 1.983*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.02624 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.1774 \t\t\t#kg/m**3, density of air\n", + "cp = 1.0057 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = d*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 0.3+(0.62*Re**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1./4))*(1+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "hav = Nu*k/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Q = I**2*R \t\t\t#W, rate of electrical heat generation\n", + "A = math.pi*d*l\n", + "dt = Q/(hav*A) \t\t\t#C,temp. difference\n", + "T = dt+Tb \t\t\t#C, steady state temp.\n", + "print \"The steady state temprature is %.0f C\"%(T)\n", + "\n", + "Tm = (T+Tb)/2 \t\t\t#C, mean air film temp.\n", + "#the properties at Tm temp.\n", + "mu1 = 2.30*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.0338 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 0.878 \t\t\t#kg/m**3, density of air\n", + "cp1 = 1.014 \t\t\t#kj/kg C, specific heat of air\n", + "Re1 = d*V*rho1/mu1 \t\t\t# Reynold no.\n", + "Pr1 = (1.014*10**3*2.30*10**-5)/k1 \t\t\t#Prandtl no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr1**(1./3)/(1+(0.4/Pr1)**(2./3))**(1./4))*(1+(Re1/(2.82*10**5))**(5./8))**(4./5)\n", + "hav1 = Nu1*k1/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "dt1 = Q/(hav1*A) \t\t\t#C,temp. difference\n", + "T1 = dt1+Tb \t\t\t#C, steady state temp.\n", + "print \"The recalculated value is almost equal to previous one.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steady state temprature is 230 C\n", + "The recalculated value is almost equal to previous one.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "di = 0.04 \t\t\t#m, diameter of ice ball\n", + "V = 2. \t\t\t#m/s, air velocity\n", + "T1 = 25. \t\t\t#C, steam temp.\n", + "T2 = 0.\n", + "#the properties of air\n", + "mu = 1.69*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.248 \t\t\t#kg/m**3, density \n", + "cp = 1.005 \t\t\t#kj/kg C, specific heat \n", + "#propertice of ice\n", + "lamda = 334. \t\t\t#kj/kg, heat of fusion\n", + "rhoice = 920. \t\t\t#kg/m**3 density of ice\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 2+(0.4*Re**0.5+0.06*Re**(2./3))*Pr**0.4\n", + "hav = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Ai = math.pi*di**2 \t\t\t#initial area of sphere\n", + "Qi = Ai*hav*(T1-T2) \t\t\t#W = J/s, initial rate of heat transfer\n", + "Ri = Qi/lamda \t\t\t#initial rate of melting of ice\n", + "print \"initial rate of melting of ice is %.4f g/s\"%(Ri)\n", + "\n", + "#(b)\n", + "#mass of ice ball 4/3*math.pi*r**3\n", + "#Rate of melting = Rm = -d/dt(m)\n", + "#Rate of heat input required = -lamda*Rate of melting\n", + "#heat balance equation\n", + "# -lamda*(Rm) = h*4*math.pi*r**2*dt\n", + "#integrating and solving\n", + "rf = ((di/2)**3/2.)**(1./3)\n", + "#solving eq. 3\n", + "t1 = 1.355*10**-4/(8.136*10**-8)\n", + "print \"The required time is is %.0f s\"%(t1)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "initial rate of melting of ice is 0.0109 g/s\n", + "The required time is is 1665 s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "# Variables\n", + "Vo = 0.5 \t\t\t#m/s air velocity\n", + "T1 = 800. \t\t\t#C, initial temp.\n", + "T2 = 550. \t\t\t#C, final temp.\n", + "Tam = 500. \t\t\t#C, air mean temp.\n", + "P = 1.2 \t\t\t#atm, pressure\n", + "#the properties of solid particles.\n", + "dp = 0.65*10**-3 \t\t\t#m, average particle diameter\n", + "cps = 0.196 \t\t\t#kcal/kg C, specific heat\n", + "rhos = 2550. \t\t\t#kg/m**3, density \n", + "#Properties of air\n", + "mu = 3.6*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.05 \t\t\t#kcal/hm C, thermal conductivity\n", + "rho = 0.545 \t\t\t#kg/m**3, density of air\n", + "cp = 0.263 \t\t\t#kcal/kg C, specific heat of air\n", + "\n", + "#calculation\n", + "Pr = cp*mu*3600/k \t\t\t#Prandtl no.\n", + "Redp = dp*Vo*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.29(b) heat transfer coefficient\n", + "h = (k/dp)*(2+0.6*(Redp)**(1./2)*(Pr)**(1./3))\n", + "Tg = 500 \t\t\t#C, gas temp.\n", + "#from heat balance equation\n", + "# -(dTs/dt) = 6h/(dp*rhos*cps)*(Ts-Tg)\n", + "\n", + "def f2(Ts): \n", + " return (1/(Ts-Tg))\n", + "\n", + "t = (dp*rhos*cps/(6*h))* quad(f2,550,800)[0]\n", + "\n", + "# Results\n", + "print \"the required contact time is %.2f s\"%(t*3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required contact time is 1.43 s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "mo_ = 1000. \t\t\t#kg/h, cooling rate of oil\n", + "cpo = 2.05 \t\t\t#kj/kg C, specific heat of oil\n", + "T1 = 70. \t\t\t#C, initial temp. of oil\n", + "T2 = 40. \t\t\t#C, temp. of oil after cooling\n", + "cpw = 4.17 \t\t\t#kj/kg C, specific heat of water\n", + "T3 = 42. \t\t\t#C, initial temp. of water\n", + "T4 = 28. \t\t\t#C, temp. of oil after cooling\n", + "A = 3. \t\t\t#m**2, heat exchange area\n", + "\n", + "# Calculation and Results\n", + "mw_ = mo_*cpo*(T1-T2)/(cpw*(T3-T4))\n", + "print \"the required rate of flow of water is %.0f kg/h \"%(mw_)\n", + "Q = mo_*cpo*(T1-T2)/3600 \t\t\t#kw, heat duty\n", + "dt1 = T1-T3 \t\t\t#C, hot end temp. difference\n", + "dt2 = T2-T4 \t\t\t#C, cold end temp. difference\n", + "LMTD = (dt1-dt2)/(math.log(dt1/dt2)) \t\t\t#math.log mean temp. difference\n", + "dtm = LMTD\n", + "U = Q*10**3/(A*dtm)\n", + "print \"the overall heat transfer coefficient is %.0f W/m**2 C\"%(round(U,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required rate of flow of water is 1053 kg/h \n", + "the overall heat transfer coefficient is 300 W/m**2 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "\n", + "# Variables\n", + "Q = 38700. \t\t\t#kcal/h, heat duty\n", + "W = 2000. \t\t\t#kg/h gas flow rate\n", + "cp = 0.239 \t\t\t#kcal/kg C, specific heat of nitrogen\n", + "A = 10. \t\t\t#m**2 ,heat exchanger area\n", + "U = 70. \t\t\t#kcal/hm**2 C, overall heat transfer coefficient\n", + "n = 0.63 \t\t\t#fin efficiency\n", + "\n", + "#Calculation\n", + "dt = Q/(W*cp) \t\t\t#C, temp. difference\n", + "#To-Ti = dt.........................(i)\n", + "dtm = Q/(U*A*n)\n", + "#(To-Ti)/(math.log((160-Ti)/(160-To))) = 87.8........(2)\n", + "#solving 1 and 2\n", + "def f(To): \n", + " return (To-(To-dt))/(math.log((160-(To-dt))/(160-To)))-87.8\n", + "\n", + "To = fsolve(f,100)\n", + "Ti = To-dt\n", + "\n", + "# Results\n", + "print \"The inlet temprature is Ti = %.0f C\"%(Ti)\n", + "print \"The outlet temprature is To = %.0f C\"%(To)\n", + "\n", + "# note : answers are slightly different because of fsolve function of python." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inlet temprature is Ti = 26 C\n", + "The outlet temprature is To = 107 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "V = 1.8 \t\t\t#m/s, velocity of hot water\n", + "T1 = 110. \t\t\t#C, initial temp.\n", + "l = 15. \t\t\t#m, length of pipe\n", + "t = 0.02 \t\t\t#m, thickness of insulation\n", + "kc = 0.12 \t\t\t#W/mC,thermal conductivity of insulating layer\n", + "ho = 10. \t\t\t#Wm**2 C, outside film coefficient\n", + "T2 = 20. \t\t\t#C, ambient temp.\n", + "#the properties of water at 110 C\n", + "mu = 2.55*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.685 \t\t\t#W/m C, thermal conductivity\n", + "rho = 950. \t\t\t#kg/m**3, density of air\n", + "cp = 4.23 \t\t\t#kj/kg C, specific heat of air\n", + "di = 0.035 \t\t\t#m, actual internal dia. of pipe\n", + "ri = di/2. \t\t\t#m,internal radius\n", + "t1 = 0.0036 \t\t\t#m, actual thickness of 1-1/4 schedule 40 pipe\n", + "ro = ri+t1 \t\t\t#m, outer radius of pipe\n", + "r_ = ro+t \t\t\t#m, outer radius of insulation\n", + "kw = 43. \t\t\t#W/mC, thermal conductivity of steel\n", + "\n", + "#calculation\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.9, Nusslet no.\n", + "Nu = 0.023*(Re)**0.88*Pr**0.3\n", + "hi = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "#the overall coefficient inside area basis Ui\n", + "Ui = 1./(1/hi+(ri*math.log(ro/ri))/kw+(ri*math.log(r_/ro))/kc+ri/(r_*ho)) \n", + "Ai = math.pi*di*l \t\t\t#m**2, inside area basis\n", + "W = math.pi*ri**2*V*rho \t\t\t#kg/s, water flow rate\n", + "#from the relation b/w LMTD and rate of heat loss\n", + "\n", + "def f(To): \n", + " return (W*cp*10**3)/(Ui*Ai)*(T1-To)-((T1-To)/math.log((T1-T2)/(To-T2)))\n", + "To = fsolve(f,100)\n", + "\n", + "# Results\n", + "print \"The outlet eater temp. is %.1f C\"%(To)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outlet eater temp. is 109.8 C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T1 = 28. \t\t\t#C, inlet temp. \n", + "T2 = 250. \t\t\t#C,bulk temp.\n", + "V = 10. \t\t\t#m/s, gas velocity\n", + "l = 20. \t\t\t#m, length of pipe\n", + "mw = 1.*3600 \t\t\t#kg/h, water flow rate\n", + "di = 4.1*10**-2 \t\t\t#m, inlet diameter\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "ro = 0.0484 \t\t\t#m, outside radius\n", + "#properties of water\n", + "mu = 8.6*10**-4 \t\t\t#kg/ms, vismath.cosity\n", + "kw = 0.528 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = 0.528*1.162 \t\t\t#W/ m C, thermal conductivity\n", + "rho = 996. \t\t\t#kg/m**3, density of air\n", + "cp = 1*4.18 \t\t\t#kj/kg C, specific heat of air\n", + "cp_ = 1. \t\t\t#kcal/kg C\n", + "#properties of flue gas\n", + "mu1 = 2.33*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "ka = 0.0292 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho1 = 0.891 \t\t\t#kg/m**3, density of air\n", + "cp1 = 0.243 \t\t\t#kcal/kg C, specific heat of air\n", + "Pr = 0.69\n", + "\n", + "#calculation\n", + "A = math.pi/4*di**2 \t\t\t#m**2, cross section of pipe\n", + "Vw = 1/(rho*A) \t\t\t#m/s, velocity of warer\n", + "Re = di*Vw*rho/mu \t\t\t# Reynold no.\n", + "Pr1 = cp*10**3*mu/kw_ \t\t\t#Prandtl no. for water\n", + "Nu = 0.023*Re**0.8*Pr1**0.4 \t\t\t#Nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = 206*kw/di\n", + "#gas side heat transfer coefficient ho\n", + "a = 41 \t\t\t#mm, i.d. schedule\n", + "Tw = 3.7 \t\t\t#mm, wall thickness\n", + "do = a+2*Tw \t\t\t#mm, outer diameter of pipe\n", + "Re1 = do*10**-3*V*rho1/mu1 \t\t\t# Reynold no\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1/4.))*(1+(Re1/(2.82*10**5))**(5./8))**(4/5.)\n", + "ho = (Nu1*ka/do)*10**3 \t\t\t#kcal/h m**2 C\n", + "Uo = 1/(ro/(di/2*hi)+1/ho) \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "\n", + "#Heat balance\n", + "A1 = math.pi*ro*l \t\t\t#m62, outside area of pipe\n", + "#from the formula of LMTD\n", + "def f(T2_): \n", + " return mw*cp_*(T2_-T1)-Uo*A1*((T2_-T1)/math.log((T2-T1)/(T2-T2_)))\n", + "T2_ = fsolve(f,1)\n", + "\n", + "# Results\n", + "print \"The exit water temp is %.0f C\"%(T2_)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The exit water temp is 36 C\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "dti = 0.0212 \t\t\t#m inner tube\n", + "dto = 0.0254 \t\t\t#cm, outer tube\n", + "dpi = 0.035 \t\t\t#cm, outer pipe\n", + "mo_ = 500. \t\t\t#kh/h, cooling rate of oil\n", + "To2 = 110. \t\t\t#C, initial temo. of oil\n", + "To1 = 70. \t\t\t#C, temp. after cooling of oil\n", + "Tw2 = 40. \t\t\t#C, inlet temp. of water\n", + "Tw1 = 29. \t\t\t#C, outlet temp. of water\n", + "#properties of oil\n", + "cpo = 0.478 \t\t\t#kcal/kg C\n", + "ko = 0.12 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho = 850. \t\t\t#kg/m**3, density of oil\n", + "#properties of water\n", + "kw = 0.542 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = (kw*1.162) \t\t\t#kj/kg C\n", + "muw = 7.1*10**-4 \t\t\t#kg/ms, vismath.cosity of water\n", + "cpw = 1. \t\t\t#kcal/kg C\n", + "cpw_ = cpw*4.17 \t\t\t#kcal/kg C\n", + "rhow = 1000. \t\t\t#kg/m**3, density\n", + "\n", + "#calculation\n", + "HL = mo_*cpo*(To2-To1) \t\t\t#kcal/h, heat load of exchanger\n", + "mw_ = HL/(cpw*(Tw2-Tw1)) \t\t\t#kg/h water flow rate\n", + "mw_1 = mw_/(3600*10**3) \t\t\t#m**3/s water flow rate\n", + "A1 = (math.pi/4)*(dti)**2 \t\t\t#m**2, flow area of tube\n", + "Vw = mw_1/A1 \t\t\t#m/s water velocity\n", + "Rew = dti*Vw*rhow/muw \t\t\t#Reynold no.\n", + "Prw = cpw_*10**3*muw/kw_ \t\t\t#Prandtl no.\n", + "Nuw = 0.023*Rew**0.8*Prw**0.4 \t\t\t#nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = Nuw*kw/dti\n", + "\n", + "#oil side heat transfer coefficient\n", + "A2 = math.pi/4*(dpi**2-dto**2) \t\t\t#m**2, flow area of annulus\n", + "Vo = mo_/(3600*rho*A2) \t\t\t#m/s velocity of oil\n", + "de = (dpi**2-dto**2)/dto \t\t\t#m, equivalent dia of annulus\n", + "Tmo = (To2+To1)/2 \t\t\t#C,mean oil temp.\n", + "muoil = math.exp((5550./(Tmo+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "Reo = de*Vo*rho/muoil\n", + "Pro = cpo*muoil*3600/ko \t\t\t#prandtl no. for oil \n", + "\n", + "#assume (1st approximation)\n", + "Nuo = 3.66\n", + "ho = Nuo*ko/de \t\t\t#kcal/h m**2 c\n", + "L = 1 \t\t\t#assume length of tube\n", + "Ai = math.pi*dti*L\n", + "Ao = math.pi*dto*L\n", + "#overall heat transfer coefficient 1st approximation\n", + "Uo = 1/(1/ho+Ao/(Ai*hi))\n", + "LMTD = ((To2-Tw2)-(To1-Tw1))/(math.log((To2-Tw2)/(To1-Tw1)))\n", + "Ao1 = HL/(Uo*LMTD) \t\t\t #m**2, heat transfer area\n", + "Lt = Ao1/(math.pi*dto) \t\t\t #m, tube length\n", + "#from eq. 4.8\n", + "Nuo1 = 1.86*(Reo*Pro/(Lt/de))**(1./3) \t\t\t#Nusslet no. \n", + "ho1 = Nuo1*ko/de\n", + "Tmw = (Tw1+Tw2)/2 \t\t\t#C, mean water temp.\n", + "#balancing heat transfer rate of oil and water\n", + "\n", + "#average wall temp. Twall\n", + "Twall = ((hi*dti*(-Tmw))-(ho1*dto*Tmo))/(-65.71216)\n", + "#vismath.cosity of oil at this temp.\n", + "muwall = math.exp((5550/(Twall+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "#Nusslet no. \n", + "Nuo2 = 1.86*(Reo*Pro/(Lt/de))**(1./3)*(muoil/muwall)**0.14\n", + "ho2 = Nuo2*ko/de\n", + "Uo2 = 1/((1/ho2)+(Ao/(Ai*hi)))\n", + "Ao2 = HL/(Uo2*LMTD)\n", + "Lt_ = Ao2/(math.pi*dto)\n", + "\n", + "# Results\n", + "print \"The tube length is %d m\"%(Lt_)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tube length is 123 m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Ti = 260. \t\t\t#C, initial temp.\n", + "Ts = 70. \t\t\t#C, skin temp.\n", + "St = 0.15 \t\t\t#m,space between tubes in equilateral triangular arrangement\n", + "Sd = St \t\t\t#space between tubes\n", + "mu = 4.43*10**-5 \t\t\t#m**2/s, momentum diffusity\n", + "k = 0.0375 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.73 \t\t\t#kg/m**3, density of air\n", + "cp = 0.248 \t\t\t#kj/kg C, specific heat of air\n", + "V = 16. \t\t\t#m/s, velociity \n", + "d = 0.06 \t\t\t#m, outside diameter of tube\n", + "Nt = 15. \t\t\t#no. of tubes in transverse row\n", + "Nl = 14. \t\t\t#no. of tubes in longitudinal row\n", + "N = Nl*Nt \t\t\t#total no. of tubes\n", + "L = 1. \t\t\t#m, length\n", + "#Calculation\n", + "Sl = (math.sqrt(3)/2)*St\n", + "Pr = cp*mu*3600*rho/k \t\t\t#Prandtl no. of bulk air\n", + "Pr = 0.62\n", + "Prw = 0.70 \t\t\t#Prandtl no. of air at wall temp. 70 C\n", + "#from eq. 4.25\n", + "Vmax = (St/(St-d))*V\n", + "#from eq. 4.26\n", + "Vmax1 = (St/(2*(St-d)))*V\n", + "Redmax = d*Vmax/mu\n", + "p = St/Sl \t\t\t#pitch ratio\n", + "#from table 4.3\n", + "m = 0.6\n", + "C = 0.35*(St/Sl)**0.2\n", + "h = round((k/d)*C*(36163)**m*(Pr)**(0.36)*(Pr/Prw)**(0.25))\n", + "#from eq. 4.28\n", + "dt = round(190*math.exp(-math.pi*d*N*h/(rho*V*3600*Nt*St*cp)))\n", + "LMTD = ((Ti-Ts)-(dt))/math.log((Ti-Ts)/dt)\n", + "A = round(math.pi*d*L*N,1) \t\t\t#m**2, heat transfer area\n", + "Q = h*A*LMTD\n", + "\n", + "# Results\n", + "print \" the rate of heat transfer to water.is %.2e kcal/h\"%(Q)\n", + "\n", + "# Note : Value of LMTD is wrong in book please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the rate of heat transfer to water.is 6.93e+05 kcal/h\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "W = 0.057 \t\t\t#m**3/min/tube, flow rate of water\n", + "W_ = W*16.66 \t\t\t#kg/s. water flow rate\n", + "di = 0.0212 \t\t\t#m,inside diameter\n", + "Ti = 32. \t\t\t#C, inlet water temp.\n", + "Tw = 80. \t\t\t#C, wall temp.\n", + "L = 3. \t\t\t#m, length of pip\n", + "\n", + "#Calculation\n", + "V = (W/60)*(1/((math.pi/4)*di**2)) \t\t\t#m/s, water velocity\n", + "#the properties of water at mean liquid temp..\n", + "mu = 7.65*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho = 995. \t\t\t#kg/m**3, density of air\n", + "cp = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "#from dittus boelter eq.\n", + "Nu = 0.023*Re**0.8*Pr**0.4 \t\t\t#Prandtl no.\n", + "f = 0.0014+0.125*Re**-0.32 \t\t\t#friction factor\n", + "#Reynold anamath.logy\n", + "St = f/2 \t\t\t#Smath.tanton no.\n", + "Nu1 = Re*Pr*St\n", + "#Prandtl anamath.logy\n", + "St1 = (f/2)/(1+5*(Pr-1)*math.sqrt(f/2))\n", + "Nu2 = St1*Re*Pr \n", + "#colburn analogy\n", + "Nu3 = Re*Pr**(1./3)*(f/2)\n", + "h = Nu3*k/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "#Q = W_*cp*10**3*(To-Ti) = h*A*LMTD\n", + "A = math.pi*di*L \t\t\t#m**2\n", + "def f(To): \n", + " return W_*cp*10**3*(To-Ti)-h*A*((To-Ti)/math.log((Tw-Ti)/(Tw-To)))\n", + "To = fsolve(f,1)\n", + "#Revised calculation\n", + "Tm = (Ti+To)/2 \t\t\t#C, mean liquid temp.\n", + "#the properties of water at new mean liquid temp..\n", + "mu1 = 6.2*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 991. \t\t\t#kg/m**3, density of air\n", + "cp1 = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr1 = cp1*10**3*mu1/k1 \t\t\t#Prandtl no.\n", + "Re1 = di*V*rho1/mu1 \t\t\t# Reynold no.\n", + "#from dittus boelter eq.\n", + "f1 = 0.0014+0.125*Re1**(-0.32) \t\t\t#friction factor\n", + "#colburn anamath.logy\n", + "Nu4 = Re1*Pr1**(1./3)*(f1/2)\n", + "h1 = Nu4*k1/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "def f(To_): \n", + " return W_*cp*10**3*(To_-Ti)-h1*A*((To_-Ti)/math.log((Tw-Ti)/(Tw-To_)))\n", + "To_ = fsolve(f,1)\n", + "\n", + "print \"Outlet temp. of water for one pass through the tubes is %.0f C\"%(To_)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Outlet temp. of water for one pass through the tubes is 51 C\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_1.ipynb new file mode 100755 index 00000000..39271a78 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_1.ipynb @@ -0,0 +1,773 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:010bf22581cfd4db854de658a1b49b7d5a2d4c0218984c722e4d81555e2b9671" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Forced Convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 2. \t\t\t#m, length of flat surface\n", + "T1 = 150. \t\t\t#C, surface temp.\n", + "p = 1. \t\t\t#atm, pressure\n", + "T2 = 30. \t\t\t#C, bulk air temp.\n", + "V = 12. \t\t\t#m/s, air velocity\n", + "\n", + "#Calculation\n", + "Tf = (T1+T2)/2 \t\t\t#C, mean air film temp.\n", + "mu = 2.131*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.031 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.962 \t\t\t#kg/m**3, density of air\n", + "cp = 1.01 \t\t\t#kj/kg C, specific heat of air\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Remax = l*V*rho/mu \t\t\t#maximum Reynold no.\n", + "Re = 5.*10**5 \t\t\t#Reynold no. during transition to turbulent flow \n", + "L_ = (Re*mu)/(V*rho) \t\t\t#m,dismath.tance from the leading edge\n", + "#for laminar flow heat transfer coefficient h, \n", + "#h16.707*x**-(1/2)\n", + "#(a)\n", + "#h2 = 31.4*x**(-1/5)\n", + "#b\n", + "hav = 22.2\n", + "#c\n", + "Q = hav*l*p*(T1-T2)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(Q)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 5328 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 7.24*10**-4 \t\t\t#m, diameter of wire\n", + "l = 1. \t\t\t#m, length of wire\n", + "I = 8.3 \t\t\t#A, current in a wire\n", + "R = 2.625 \t\t\t#ohm/m, electrical resistance\n", + "V = 10. \t\t\t#m/s, air velocity\n", + "Tb = 27. \t\t\t#C, bulk air temp.\n", + "#the properties at bulk temp.\n", + "mu = 1.983*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.02624 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.1774 \t\t\t#kg/m**3, density of air\n", + "cp = 1.0057 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = d*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 0.3+(0.62*Re**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1./4))*(1+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "hav = Nu*k/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Q = I**2*R \t\t\t#W, rate of electrical heat generation\n", + "A = math.pi*d*l\n", + "dt = Q/(hav*A) \t\t\t#C,temp. difference\n", + "T = dt+Tb \t\t\t#C, steady state temp.\n", + "print \"The steady state temprature is %.0f C\"%(T)\n", + "\n", + "Tm = (T+Tb)/2 \t\t\t#C, mean air film temp.\n", + "#the properties at Tm temp.\n", + "mu1 = 2.30*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.0338 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 0.878 \t\t\t#kg/m**3, density of air\n", + "cp1 = 1.014 \t\t\t#kj/kg C, specific heat of air\n", + "Re1 = d*V*rho1/mu1 \t\t\t# Reynold no.\n", + "Pr1 = (1.014*10**3*2.30*10**-5)/k1 \t\t\t#Prandtl no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr1**(1./3)/(1+(0.4/Pr1)**(2./3))**(1./4))*(1+(Re1/(2.82*10**5))**(5./8))**(4./5)\n", + "hav1 = Nu1*k1/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "dt1 = Q/(hav1*A) \t\t\t#C,temp. difference\n", + "T1 = dt1+Tb \t\t\t#C, steady state temp.\n", + "print \"The recalculated value is almost equal to previous one.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steady state temprature is 230 C\n", + "The recalculated value is almost equal to previous one.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "di = 0.04 \t\t\t#m, diameter of ice ball\n", + "V = 2. \t\t\t#m/s, air velocity\n", + "T1 = 25. \t\t\t#C, steam temp.\n", + "T2 = 0.\n", + "#the properties of air\n", + "mu = 1.69*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.248 \t\t\t#kg/m**3, density \n", + "cp = 1.005 \t\t\t#kj/kg C, specific heat \n", + "#propertice of ice\n", + "lamda = 334. \t\t\t#kj/kg, heat of fusion\n", + "rhoice = 920. \t\t\t#kg/m**3 density of ice\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 2+(0.4*Re**0.5+0.06*Re**(2./3))*Pr**0.4\n", + "hav = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Ai = math.pi*di**2 \t\t\t#initial area of sphere\n", + "Qi = Ai*hav*(T1-T2) \t\t\t#W = J/s, initial rate of heat transfer\n", + "Ri = Qi/lamda \t\t\t#initial rate of melting of ice\n", + "print \"initial rate of melting of ice is %.4f g/s\"%(Ri)\n", + "\n", + "#(b)\n", + "#mass of ice ball 4/3*math.pi*r**3\n", + "#Rate of melting = Rm = -d/dt(m)\n", + "#Rate of heat input required = -lamda*Rate of melting\n", + "#heat balance equation\n", + "# -lamda*(Rm) = h*4*math.pi*r**2*dt\n", + "#integrating and solving\n", + "rf = ((di/2)**3/2.)**(1./3)\n", + "#solving eq. 3\n", + "t1 = 1.355*10**-4/(8.136*10**-8)\n", + "print \"The required time is is %.0f s\"%(t1)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "initial rate of melting of ice is 0.0109 g/s\n", + "The required time is is 1665 s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "# Variables\n", + "Vo = 0.5 \t\t\t#m/s air velocity\n", + "T1 = 800. \t\t\t#C, initial temp.\n", + "T2 = 550. \t\t\t#C, final temp.\n", + "Tam = 500. \t\t\t#C, air mean temp.\n", + "P = 1.2 \t\t\t#atm, pressure\n", + "#the properties of solid particles.\n", + "dp = 0.65*10**-3 \t\t\t#m, average particle diameter\n", + "cps = 0.196 \t\t\t#kcal/kg C, specific heat\n", + "rhos = 2550. \t\t\t#kg/m**3, density \n", + "#Properties of air\n", + "mu = 3.6*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.05 \t\t\t#kcal/hm C, thermal conductivity\n", + "rho = 0.545 \t\t\t#kg/m**3, density of air\n", + "cp = 0.263 \t\t\t#kcal/kg C, specific heat of air\n", + "\n", + "#calculation\n", + "Pr = cp*mu*3600/k \t\t\t#Prandtl no.\n", + "Redp = dp*Vo*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.29(b) heat transfer coefficient\n", + "h = (k/dp)*(2+0.6*(Redp)**(1./2)*(Pr)**(1./3))\n", + "Tg = 500 \t\t\t#C, gas temp.\n", + "#from heat balance equation\n", + "# -(dTs/dt) = 6h/(dp*rhos*cps)*(Ts-Tg)\n", + "\n", + "def f2(Ts): \n", + " return (1/(Ts-Tg))\n", + "\n", + "t = (dp*rhos*cps/(6*h))* quad(f2,550,800)[0]\n", + "\n", + "# Results\n", + "print \"the required contact time is %.2f s\"%(t*3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required contact time is 1.43 s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "mo_ = 1000. \t\t\t#kg/h, cooling rate of oil\n", + "cpo = 2.05 \t\t\t#kj/kg C, specific heat of oil\n", + "T1 = 70. \t\t\t#C, initial temp. of oil\n", + "T2 = 40. \t\t\t#C, temp. of oil after cooling\n", + "cpw = 4.17 \t\t\t#kj/kg C, specific heat of water\n", + "T3 = 42. \t\t\t#C, initial temp. of water\n", + "T4 = 28. \t\t\t#C, temp. of oil after cooling\n", + "A = 3. \t\t\t#m**2, heat exchange area\n", + "\n", + "# Calculation and Results\n", + "mw_ = mo_*cpo*(T1-T2)/(cpw*(T3-T4))\n", + "print \"the required rate of flow of water is %.0f kg/h \"%(mw_)\n", + "Q = mo_*cpo*(T1-T2)/3600 \t\t\t#kw, heat duty\n", + "dt1 = T1-T3 \t\t\t#C, hot end temp. difference\n", + "dt2 = T2-T4 \t\t\t#C, cold end temp. difference\n", + "LMTD = (dt1-dt2)/(math.log(dt1/dt2)) \t\t\t#math.log mean temp. difference\n", + "dtm = LMTD\n", + "U = Q*10**3/(A*dtm)\n", + "print \"the overall heat transfer coefficient is %.0f W/m**2 C\"%(round(U,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required rate of flow of water is 1053 kg/h \n", + "the overall heat transfer coefficient is 300 W/m**2 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "\n", + "# Variables\n", + "Q = 38700. \t\t\t#kcal/h, heat duty\n", + "W = 2000. \t\t\t#kg/h gas flow rate\n", + "cp = 0.239 \t\t\t#kcal/kg C, specific heat of nitrogen\n", + "A = 10. \t\t\t#m**2 ,heat exchanger area\n", + "U = 70. \t\t\t#kcal/hm**2 C, overall heat transfer coefficient\n", + "n = 0.63 \t\t\t#fin efficiency\n", + "\n", + "#Calculation\n", + "dt = Q/(W*cp) \t\t\t#C, temp. difference\n", + "#To-Ti = dt.........................(i)\n", + "dtm = Q/(U*A*n)\n", + "#(To-Ti)/(math.log((160-Ti)/(160-To))) = 87.8........(2)\n", + "#solving 1 and 2\n", + "def f(To): \n", + " return (To-(To-dt))/(math.log((160-(To-dt))/(160-To)))-87.8\n", + "\n", + "To = fsolve(f,100)\n", + "Ti = To-dt\n", + "\n", + "# Results\n", + "print \"The inlet temprature is Ti = %.0f C\"%(Ti)\n", + "print \"The outlet temprature is To = %.0f C\"%(To)\n", + "\n", + "# note : answers are slightly different because of fsolve function of python." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inlet temprature is Ti = 26 C\n", + "The outlet temprature is To = 107 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "V = 1.8 \t\t\t#m/s, velocity of hot water\n", + "T1 = 110. \t\t\t#C, initial temp.\n", + "l = 15. \t\t\t#m, length of pipe\n", + "t = 0.02 \t\t\t#m, thickness of insulation\n", + "kc = 0.12 \t\t\t#W/mC,thermal conductivity of insulating layer\n", + "ho = 10. \t\t\t#Wm**2 C, outside film coefficient\n", + "T2 = 20. \t\t\t#C, ambient temp.\n", + "#the properties of water at 110 C\n", + "mu = 2.55*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.685 \t\t\t#W/m C, thermal conductivity\n", + "rho = 950. \t\t\t#kg/m**3, density of air\n", + "cp = 4.23 \t\t\t#kj/kg C, specific heat of air\n", + "di = 0.035 \t\t\t#m, actual internal dia. of pipe\n", + "ri = di/2. \t\t\t#m,internal radius\n", + "t1 = 0.0036 \t\t\t#m, actual thickness of 1-1/4 schedule 40 pipe\n", + "ro = ri+t1 \t\t\t#m, outer radius of pipe\n", + "r_ = ro+t \t\t\t#m, outer radius of insulation\n", + "kw = 43. \t\t\t#W/mC, thermal conductivity of steel\n", + "\n", + "#calculation\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.9, Nusslet no.\n", + "Nu = 0.023*(Re)**0.88*Pr**0.3\n", + "hi = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "#the overall coefficient inside area basis Ui\n", + "Ui = 1./(1/hi+(ri*math.log(ro/ri))/kw+(ri*math.log(r_/ro))/kc+ri/(r_*ho)) \n", + "Ai = math.pi*di*l \t\t\t#m**2, inside area basis\n", + "W = math.pi*ri**2*V*rho \t\t\t#kg/s, water flow rate\n", + "#from the relation b/w LMTD and rate of heat loss\n", + "\n", + "def f(To): \n", + " return (W*cp*10**3)/(Ui*Ai)*(T1-To)-((T1-To)/math.log((T1-T2)/(To-T2)))\n", + "To = fsolve(f,100)\n", + "\n", + "# Results\n", + "print \"The outlet eater temp. is %.1f C\"%(To)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outlet eater temp. is 109.8 C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T1 = 28. \t\t\t#C, inlet temp. \n", + "T2 = 250. \t\t\t#C,bulk temp.\n", + "V = 10. \t\t\t#m/s, gas velocity\n", + "l = 20. \t\t\t#m, length of pipe\n", + "mw = 1.*3600 \t\t\t#kg/h, water flow rate\n", + "di = 4.1*10**-2 \t\t\t#m, inlet diameter\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "ro = 0.0484 \t\t\t#m, outside radius\n", + "#properties of water\n", + "mu = 8.6*10**-4 \t\t\t#kg/ms, vismath.cosity\n", + "kw = 0.528 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = 0.528*1.162 \t\t\t#W/ m C, thermal conductivity\n", + "rho = 996. \t\t\t#kg/m**3, density of air\n", + "cp = 1*4.18 \t\t\t#kj/kg C, specific heat of air\n", + "cp_ = 1. \t\t\t#kcal/kg C\n", + "#properties of flue gas\n", + "mu1 = 2.33*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "ka = 0.0292 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho1 = 0.891 \t\t\t#kg/m**3, density of air\n", + "cp1 = 0.243 \t\t\t#kcal/kg C, specific heat of air\n", + "Pr = 0.69\n", + "\n", + "#calculation\n", + "A = math.pi/4*di**2 \t\t\t#m**2, cross section of pipe\n", + "Vw = 1/(rho*A) \t\t\t#m/s, velocity of warer\n", + "Re = di*Vw*rho/mu \t\t\t# Reynold no.\n", + "Pr1 = cp*10**3*mu/kw_ \t\t\t#Prandtl no. for water\n", + "Nu = 0.023*Re**0.8*Pr1**0.4 \t\t\t#Nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = 206*kw/di\n", + "#gas side heat transfer coefficient ho\n", + "a = 41 \t\t\t#mm, i.d. schedule\n", + "Tw = 3.7 \t\t\t#mm, wall thickness\n", + "do = a+2*Tw \t\t\t#mm, outer diameter of pipe\n", + "Re1 = do*10**-3*V*rho1/mu1 \t\t\t# Reynold no\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1/4.))*(1+(Re1/(2.82*10**5))**(5./8))**(4/5.)\n", + "ho = (Nu1*ka/do)*10**3 \t\t\t#kcal/h m**2 C\n", + "Uo = 1/(ro/(di/2*hi)+1/ho) \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "\n", + "#Heat balance\n", + "A1 = math.pi*ro*l \t\t\t#m62, outside area of pipe\n", + "#from the formula of LMTD\n", + "def f(T2_): \n", + " return mw*cp_*(T2_-T1)-Uo*A1*((T2_-T1)/math.log((T2-T1)/(T2-T2_)))\n", + "T2_ = fsolve(f,1)\n", + "\n", + "# Results\n", + "print \"The exit water temp is %.0f C\"%(T2_)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The exit water temp is 36 C\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "dti = 0.0212 \t\t\t#m inner tube\n", + "dto = 0.0254 \t\t\t#cm, outer tube\n", + "dpi = 0.035 \t\t\t#cm, outer pipe\n", + "mo_ = 500. \t\t\t#kh/h, cooling rate of oil\n", + "To2 = 110. \t\t\t#C, initial temo. of oil\n", + "To1 = 70. \t\t\t#C, temp. after cooling of oil\n", + "Tw2 = 40. \t\t\t#C, inlet temp. of water\n", + "Tw1 = 29. \t\t\t#C, outlet temp. of water\n", + "#properties of oil\n", + "cpo = 0.478 \t\t\t#kcal/kg C\n", + "ko = 0.12 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho = 850. \t\t\t#kg/m**3, density of oil\n", + "#properties of water\n", + "kw = 0.542 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = (kw*1.162) \t\t\t#kj/kg C\n", + "muw = 7.1*10**-4 \t\t\t#kg/ms, vismath.cosity of water\n", + "cpw = 1. \t\t\t#kcal/kg C\n", + "cpw_ = cpw*4.17 \t\t\t#kcal/kg C\n", + "rhow = 1000. \t\t\t#kg/m**3, density\n", + "\n", + "#calculation\n", + "HL = mo_*cpo*(To2-To1) \t\t\t#kcal/h, heat load of exchanger\n", + "mw_ = HL/(cpw*(Tw2-Tw1)) \t\t\t#kg/h water flow rate\n", + "mw_1 = mw_/(3600*10**3) \t\t\t#m**3/s water flow rate\n", + "A1 = (math.pi/4)*(dti)**2 \t\t\t#m**2, flow area of tube\n", + "Vw = mw_1/A1 \t\t\t#m/s water velocity\n", + "Rew = dti*Vw*rhow/muw \t\t\t#Reynold no.\n", + "Prw = cpw_*10**3*muw/kw_ \t\t\t#Prandtl no.\n", + "Nuw = 0.023*Rew**0.8*Prw**0.4 \t\t\t#nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = Nuw*kw/dti\n", + "\n", + "#oil side heat transfer coefficient\n", + "A2 = math.pi/4*(dpi**2-dto**2) \t\t\t#m**2, flow area of annulus\n", + "Vo = mo_/(3600*rho*A2) \t\t\t#m/s velocity of oil\n", + "de = (dpi**2-dto**2)/dto \t\t\t#m, equivalent dia of annulus\n", + "Tmo = (To2+To1)/2 \t\t\t#C,mean oil temp.\n", + "muoil = math.exp((5550./(Tmo+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "Reo = de*Vo*rho/muoil\n", + "Pro = cpo*muoil*3600/ko \t\t\t#prandtl no. for oil \n", + "\n", + "#assume (1st approximation)\n", + "Nuo = 3.66\n", + "ho = Nuo*ko/de \t\t\t#kcal/h m**2 c\n", + "L = 1 \t\t\t#assume length of tube\n", + "Ai = math.pi*dti*L\n", + "Ao = math.pi*dto*L\n", + "#overall heat transfer coefficient 1st approximation\n", + "Uo = 1/(1/ho+Ao/(Ai*hi))\n", + "LMTD = ((To2-Tw2)-(To1-Tw1))/(math.log((To2-Tw2)/(To1-Tw1)))\n", + "Ao1 = HL/(Uo*LMTD) \t\t\t #m**2, heat transfer area\n", + "Lt = Ao1/(math.pi*dto) \t\t\t #m, tube length\n", + "#from eq. 4.8\n", + "Nuo1 = 1.86*(Reo*Pro/(Lt/de))**(1./3) \t\t\t#Nusslet no. \n", + "ho1 = Nuo1*ko/de\n", + "Tmw = (Tw1+Tw2)/2 \t\t\t#C, mean water temp.\n", + "#balancing heat transfer rate of oil and water\n", + "\n", + "#average wall temp. Twall\n", + "Twall = ((hi*dti*(-Tmw))-(ho1*dto*Tmo))/(-65.71216)\n", + "#vismath.cosity of oil at this temp.\n", + "muwall = math.exp((5550/(Twall+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "#Nusslet no. \n", + "Nuo2 = 1.86*(Reo*Pro/(Lt/de))**(1./3)*(muoil/muwall)**0.14\n", + "ho2 = Nuo2*ko/de\n", + "Uo2 = 1/((1/ho2)+(Ao/(Ai*hi)))\n", + "Ao2 = HL/(Uo2*LMTD)\n", + "Lt_ = Ao2/(math.pi*dto)\n", + "\n", + "# Results\n", + "print \"The tube length is %d m\"%(Lt_)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tube length is 123 m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Ti = 260. \t\t\t#C, initial temp.\n", + "Ts = 70. \t\t\t#C, skin temp.\n", + "St = 0.15 \t\t\t#m,space between tubes in equilateral triangular arrangement\n", + "Sd = St \t\t\t#space between tubes\n", + "mu = 4.43*10**-5 \t\t\t#m**2/s, momentum diffusity\n", + "k = 0.0375 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.73 \t\t\t#kg/m**3, density of air\n", + "cp = 0.248 \t\t\t#kj/kg C, specific heat of air\n", + "V = 16. \t\t\t#m/s, velociity \n", + "d = 0.06 \t\t\t#m, outside diameter of tube\n", + "Nt = 15. \t\t\t#no. of tubes in transverse row\n", + "Nl = 14. \t\t\t#no. of tubes in longitudinal row\n", + "N = Nl*Nt \t\t\t#total no. of tubes\n", + "L = 1. \t\t\t#m, length\n", + "#Calculation\n", + "Sl = (math.sqrt(3)/2)*St\n", + "Pr = cp*mu*3600*rho/k \t\t\t#Prandtl no. of bulk air\n", + "Pr = 0.62\n", + "Prw = 0.70 \t\t\t#Prandtl no. of air at wall temp. 70 C\n", + "#from eq. 4.25\n", + "Vmax = (St/(St-d))*V\n", + "#from eq. 4.26\n", + "Vmax1 = (St/(2*(St-d)))*V\n", + "Redmax = d*Vmax/mu\n", + "p = St/Sl \t\t\t#pitch ratio\n", + "#from table 4.3\n", + "m = 0.6\n", + "C = 0.35*(St/Sl)**0.2\n", + "h = round((k/d)*C*(36163)**m*(Pr)**(0.36)*(Pr/Prw)**(0.25))\n", + "#from eq. 4.28\n", + "dt = round(190*math.exp(-math.pi*d*N*h/(rho*V*3600*Nt*St*cp)))\n", + "LMTD = ((Ti-Ts)-(dt))/math.log((Ti-Ts)/dt)\n", + "A = round(math.pi*d*L*N,1) \t\t\t#m**2, heat transfer area\n", + "Q = h*A*LMTD\n", + "\n", + "# Results\n", + "print \" the rate of heat transfer to water.is %.2e kcal/h\"%(Q)\n", + "\n", + "# Note : Value of LMTD is wrong in book please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the rate of heat transfer to water.is 6.93e+05 kcal/h\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "W = 0.057 \t\t\t#m**3/min/tube, flow rate of water\n", + "W_ = W*16.66 \t\t\t#kg/s. water flow rate\n", + "di = 0.0212 \t\t\t#m,inside diameter\n", + "Ti = 32. \t\t\t#C, inlet water temp.\n", + "Tw = 80. \t\t\t#C, wall temp.\n", + "L = 3. \t\t\t#m, length of pip\n", + "\n", + "#Calculation\n", + "V = (W/60)*(1/((math.pi/4)*di**2)) \t\t\t#m/s, water velocity\n", + "#the properties of water at mean liquid temp..\n", + "mu = 7.65*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho = 995. \t\t\t#kg/m**3, density of air\n", + "cp = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "#from dittus boelter eq.\n", + "Nu = 0.023*Re**0.8*Pr**0.4 \t\t\t#Prandtl no.\n", + "f = 0.0014+0.125*Re**-0.32 \t\t\t#friction factor\n", + "#Reynold anamath.logy\n", + "St = f/2 \t\t\t#Smath.tanton no.\n", + "Nu1 = Re*Pr*St\n", + "#Prandtl anamath.logy\n", + "St1 = (f/2)/(1+5*(Pr-1)*math.sqrt(f/2))\n", + "Nu2 = St1*Re*Pr \n", + "#colburn analogy\n", + "Nu3 = Re*Pr**(1./3)*(f/2)\n", + "h = Nu3*k/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "#Q = W_*cp*10**3*(To-Ti) = h*A*LMTD\n", + "A = math.pi*di*L \t\t\t#m**2\n", + "def f(To): \n", + " return W_*cp*10**3*(To-Ti)-h*A*((To-Ti)/math.log((Tw-Ti)/(Tw-To)))\n", + "To = fsolve(f,1)\n", + "#Revised calculation\n", + "Tm = (Ti+To)/2 \t\t\t#C, mean liquid temp.\n", + "#the properties of water at new mean liquid temp..\n", + "mu1 = 6.2*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 991. \t\t\t#kg/m**3, density of air\n", + "cp1 = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr1 = cp1*10**3*mu1/k1 \t\t\t#Prandtl no.\n", + "Re1 = di*V*rho1/mu1 \t\t\t# Reynold no.\n", + "#from dittus boelter eq.\n", + "f1 = 0.0014+0.125*Re1**(-0.32) \t\t\t#friction factor\n", + "#colburn anamath.logy\n", + "Nu4 = Re1*Pr1**(1./3)*(f1/2)\n", + "h1 = Nu4*k1/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "def f(To_): \n", + " return W_*cp*10**3*(To_-Ti)-h1*A*((To_-Ti)/math.log((Tw-Ti)/(Tw-To_)))\n", + "To_ = fsolve(f,1)\n", + "\n", + "print \"Outlet temp. of water for one pass through the tubes is %.0f C\"%(To_)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Outlet temp. of water for one pass through the tubes is 51 C\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_2.ipynb new file mode 100755 index 00000000..39271a78 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch4_2.ipynb @@ -0,0 +1,773 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:010bf22581cfd4db854de658a1b49b7d5a2d4c0218984c722e4d81555e2b9671" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Forced Convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "l = 2. \t\t\t#m, length of flat surface\n", + "T1 = 150. \t\t\t#C, surface temp.\n", + "p = 1. \t\t\t#atm, pressure\n", + "T2 = 30. \t\t\t#C, bulk air temp.\n", + "V = 12. \t\t\t#m/s, air velocity\n", + "\n", + "#Calculation\n", + "Tf = (T1+T2)/2 \t\t\t#C, mean air film temp.\n", + "mu = 2.131*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.031 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.962 \t\t\t#kg/m**3, density of air\n", + "cp = 1.01 \t\t\t#kj/kg C, specific heat of air\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Remax = l*V*rho/mu \t\t\t#maximum Reynold no.\n", + "Re = 5.*10**5 \t\t\t#Reynold no. during transition to turbulent flow \n", + "L_ = (Re*mu)/(V*rho) \t\t\t#m,dismath.tance from the leading edge\n", + "#for laminar flow heat transfer coefficient h, \n", + "#h16.707*x**-(1/2)\n", + "#(a)\n", + "#h2 = 31.4*x**(-1/5)\n", + "#b\n", + "hav = 22.2\n", + "#c\n", + "Q = hav*l*p*(T1-T2)\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(Q)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 5328 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 7.24*10**-4 \t\t\t#m, diameter of wire\n", + "l = 1. \t\t\t#m, length of wire\n", + "I = 8.3 \t\t\t#A, current in a wire\n", + "R = 2.625 \t\t\t#ohm/m, electrical resistance\n", + "V = 10. \t\t\t#m/s, air velocity\n", + "Tb = 27. \t\t\t#C, bulk air temp.\n", + "#the properties at bulk temp.\n", + "mu = 1.983*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.02624 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.1774 \t\t\t#kg/m**3, density of air\n", + "cp = 1.0057 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = d*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 0.3+(0.62*Re**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1./4))*(1+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "hav = Nu*k/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Q = I**2*R \t\t\t#W, rate of electrical heat generation\n", + "A = math.pi*d*l\n", + "dt = Q/(hav*A) \t\t\t#C,temp. difference\n", + "T = dt+Tb \t\t\t#C, steady state temp.\n", + "print \"The steady state temprature is %.0f C\"%(T)\n", + "\n", + "Tm = (T+Tb)/2 \t\t\t#C, mean air film temp.\n", + "#the properties at Tm temp.\n", + "mu1 = 2.30*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.0338 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 0.878 \t\t\t#kg/m**3, density of air\n", + "cp1 = 1.014 \t\t\t#kj/kg C, specific heat of air\n", + "Re1 = d*V*rho1/mu1 \t\t\t# Reynold no.\n", + "Pr1 = (1.014*10**3*2.30*10**-5)/k1 \t\t\t#Prandtl no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr1**(1./3)/(1+(0.4/Pr1)**(2./3))**(1./4))*(1+(Re1/(2.82*10**5))**(5./8))**(4./5)\n", + "hav1 = Nu1*k1/d \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "dt1 = Q/(hav1*A) \t\t\t#C,temp. difference\n", + "T1 = dt1+Tb \t\t\t#C, steady state temp.\n", + "print \"The recalculated value is almost equal to previous one.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steady state temprature is 230 C\n", + "The recalculated value is almost equal to previous one.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "di = 0.04 \t\t\t#m, diameter of ice ball\n", + "V = 2. \t\t\t#m/s, air velocity\n", + "T1 = 25. \t\t\t#C, steam temp.\n", + "T2 = 0.\n", + "#the properties of air\n", + "mu = 1.69*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "rho = 1.248 \t\t\t#kg/m**3, density \n", + "cp = 1.005 \t\t\t#kj/kg C, specific heat \n", + "#propertice of ice\n", + "lamda = 334. \t\t\t#kj/kg, heat of fusion\n", + "rhoice = 920. \t\t\t#kg/m**3 density of ice\n", + "\n", + "# Calculations and Results\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "Nu = 2+(0.4*Re**0.5+0.06*Re**(2./3))*Pr**0.4\n", + "hav = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "Ai = math.pi*di**2 \t\t\t#initial area of sphere\n", + "Qi = Ai*hav*(T1-T2) \t\t\t#W = J/s, initial rate of heat transfer\n", + "Ri = Qi/lamda \t\t\t#initial rate of melting of ice\n", + "print \"initial rate of melting of ice is %.4f g/s\"%(Ri)\n", + "\n", + "#(b)\n", + "#mass of ice ball 4/3*math.pi*r**3\n", + "#Rate of melting = Rm = -d/dt(m)\n", + "#Rate of heat input required = -lamda*Rate of melting\n", + "#heat balance equation\n", + "# -lamda*(Rm) = h*4*math.pi*r**2*dt\n", + "#integrating and solving\n", + "rf = ((di/2)**3/2.)**(1./3)\n", + "#solving eq. 3\n", + "t1 = 1.355*10**-4/(8.136*10**-8)\n", + "print \"The required time is is %.0f s\"%(t1)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "initial rate of melting of ice is 0.0109 g/s\n", + "The required time is is 1665 s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "# Variables\n", + "Vo = 0.5 \t\t\t#m/s air velocity\n", + "T1 = 800. \t\t\t#C, initial temp.\n", + "T2 = 550. \t\t\t#C, final temp.\n", + "Tam = 500. \t\t\t#C, air mean temp.\n", + "P = 1.2 \t\t\t#atm, pressure\n", + "#the properties of solid particles.\n", + "dp = 0.65*10**-3 \t\t\t#m, average particle diameter\n", + "cps = 0.196 \t\t\t#kcal/kg C, specific heat\n", + "rhos = 2550. \t\t\t#kg/m**3, density \n", + "#Properties of air\n", + "mu = 3.6*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "k = 0.05 \t\t\t#kcal/hm C, thermal conductivity\n", + "rho = 0.545 \t\t\t#kg/m**3, density of air\n", + "cp = 0.263 \t\t\t#kcal/kg C, specific heat of air\n", + "\n", + "#calculation\n", + "Pr = cp*mu*3600/k \t\t\t#Prandtl no.\n", + "Redp = dp*Vo*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.29(b) heat transfer coefficient\n", + "h = (k/dp)*(2+0.6*(Redp)**(1./2)*(Pr)**(1./3))\n", + "Tg = 500 \t\t\t#C, gas temp.\n", + "#from heat balance equation\n", + "# -(dTs/dt) = 6h/(dp*rhos*cps)*(Ts-Tg)\n", + "\n", + "def f2(Ts): \n", + " return (1/(Ts-Tg))\n", + "\n", + "t = (dp*rhos*cps/(6*h))* quad(f2,550,800)[0]\n", + "\n", + "# Results\n", + "print \"the required contact time is %.2f s\"%(t*3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required contact time is 1.43 s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "mo_ = 1000. \t\t\t#kg/h, cooling rate of oil\n", + "cpo = 2.05 \t\t\t#kj/kg C, specific heat of oil\n", + "T1 = 70. \t\t\t#C, initial temp. of oil\n", + "T2 = 40. \t\t\t#C, temp. of oil after cooling\n", + "cpw = 4.17 \t\t\t#kj/kg C, specific heat of water\n", + "T3 = 42. \t\t\t#C, initial temp. of water\n", + "T4 = 28. \t\t\t#C, temp. of oil after cooling\n", + "A = 3. \t\t\t#m**2, heat exchange area\n", + "\n", + "# Calculation and Results\n", + "mw_ = mo_*cpo*(T1-T2)/(cpw*(T3-T4))\n", + "print \"the required rate of flow of water is %.0f kg/h \"%(mw_)\n", + "Q = mo_*cpo*(T1-T2)/3600 \t\t\t#kw, heat duty\n", + "dt1 = T1-T3 \t\t\t#C, hot end temp. difference\n", + "dt2 = T2-T4 \t\t\t#C, cold end temp. difference\n", + "LMTD = (dt1-dt2)/(math.log(dt1/dt2)) \t\t\t#math.log mean temp. difference\n", + "dtm = LMTD\n", + "U = Q*10**3/(A*dtm)\n", + "print \"the overall heat transfer coefficient is %.0f W/m**2 C\"%(round(U,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the required rate of flow of water is 1053 kg/h \n", + "the overall heat transfer coefficient is 300 W/m**2 C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math\n", + "\n", + "# Variables\n", + "Q = 38700. \t\t\t#kcal/h, heat duty\n", + "W = 2000. \t\t\t#kg/h gas flow rate\n", + "cp = 0.239 \t\t\t#kcal/kg C, specific heat of nitrogen\n", + "A = 10. \t\t\t#m**2 ,heat exchanger area\n", + "U = 70. \t\t\t#kcal/hm**2 C, overall heat transfer coefficient\n", + "n = 0.63 \t\t\t#fin efficiency\n", + "\n", + "#Calculation\n", + "dt = Q/(W*cp) \t\t\t#C, temp. difference\n", + "#To-Ti = dt.........................(i)\n", + "dtm = Q/(U*A*n)\n", + "#(To-Ti)/(math.log((160-Ti)/(160-To))) = 87.8........(2)\n", + "#solving 1 and 2\n", + "def f(To): \n", + " return (To-(To-dt))/(math.log((160-(To-dt))/(160-To)))-87.8\n", + "\n", + "To = fsolve(f,100)\n", + "Ti = To-dt\n", + "\n", + "# Results\n", + "print \"The inlet temprature is Ti = %.0f C\"%(Ti)\n", + "print \"The outlet temprature is To = %.0f C\"%(To)\n", + "\n", + "# note : answers are slightly different because of fsolve function of python." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inlet temprature is Ti = 26 C\n", + "The outlet temprature is To = 107 C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "V = 1.8 \t\t\t#m/s, velocity of hot water\n", + "T1 = 110. \t\t\t#C, initial temp.\n", + "l = 15. \t\t\t#m, length of pipe\n", + "t = 0.02 \t\t\t#m, thickness of insulation\n", + "kc = 0.12 \t\t\t#W/mC,thermal conductivity of insulating layer\n", + "ho = 10. \t\t\t#Wm**2 C, outside film coefficient\n", + "T2 = 20. \t\t\t#C, ambient temp.\n", + "#the properties of water at 110 C\n", + "mu = 2.55*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.685 \t\t\t#W/m C, thermal conductivity\n", + "rho = 950. \t\t\t#kg/m**3, density of air\n", + "cp = 4.23 \t\t\t#kj/kg C, specific heat of air\n", + "di = 0.035 \t\t\t#m, actual internal dia. of pipe\n", + "ri = di/2. \t\t\t#m,internal radius\n", + "t1 = 0.0036 \t\t\t#m, actual thickness of 1-1/4 schedule 40 pipe\n", + "ro = ri+t1 \t\t\t#m, outer radius of pipe\n", + "r_ = ro+t \t\t\t#m, outer radius of insulation\n", + "kw = 43. \t\t\t#W/mC, thermal conductivity of steel\n", + "\n", + "#calculation\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.9, Nusslet no.\n", + "Nu = 0.023*(Re)**0.88*Pr**0.3\n", + "hi = Nu*k/di \t\t\t#W/m**2 C, average heat transfer coefficient\n", + "#the overall coefficient inside area basis Ui\n", + "Ui = 1./(1/hi+(ri*math.log(ro/ri))/kw+(ri*math.log(r_/ro))/kc+ri/(r_*ho)) \n", + "Ai = math.pi*di*l \t\t\t#m**2, inside area basis\n", + "W = math.pi*ri**2*V*rho \t\t\t#kg/s, water flow rate\n", + "#from the relation b/w LMTD and rate of heat loss\n", + "\n", + "def f(To): \n", + " return (W*cp*10**3)/(Ui*Ai)*(T1-To)-((T1-To)/math.log((T1-T2)/(To-T2)))\n", + "To = fsolve(f,100)\n", + "\n", + "# Results\n", + "print \"The outlet eater temp. is %.1f C\"%(To)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outlet eater temp. is 109.8 C\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T1 = 28. \t\t\t#C, inlet temp. \n", + "T2 = 250. \t\t\t#C,bulk temp.\n", + "V = 10. \t\t\t#m/s, gas velocity\n", + "l = 20. \t\t\t#m, length of pipe\n", + "mw = 1.*3600 \t\t\t#kg/h, water flow rate\n", + "di = 4.1*10**-2 \t\t\t#m, inlet diameter\n", + "Tm = (T1+T2)/2 \t\t\t#C, mean temp.\n", + "ro = 0.0484 \t\t\t#m, outside radius\n", + "#properties of water\n", + "mu = 8.6*10**-4 \t\t\t#kg/ms, vismath.cosity\n", + "kw = 0.528 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = 0.528*1.162 \t\t\t#W/ m C, thermal conductivity\n", + "rho = 996. \t\t\t#kg/m**3, density of air\n", + "cp = 1*4.18 \t\t\t#kj/kg C, specific heat of air\n", + "cp_ = 1. \t\t\t#kcal/kg C\n", + "#properties of flue gas\n", + "mu1 = 2.33*10**-5 \t\t\t#kg/ms, vismath.cosity\n", + "ka = 0.0292 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho1 = 0.891 \t\t\t#kg/m**3, density of air\n", + "cp1 = 0.243 \t\t\t#kcal/kg C, specific heat of air\n", + "Pr = 0.69\n", + "\n", + "#calculation\n", + "A = math.pi/4*di**2 \t\t\t#m**2, cross section of pipe\n", + "Vw = 1/(rho*A) \t\t\t#m/s, velocity of warer\n", + "Re = di*Vw*rho/mu \t\t\t# Reynold no.\n", + "Pr1 = cp*10**3*mu/kw_ \t\t\t#Prandtl no. for water\n", + "Nu = 0.023*Re**0.8*Pr1**0.4 \t\t\t#Nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = 206*kw/di\n", + "#gas side heat transfer coefficient ho\n", + "a = 41 \t\t\t#mm, i.d. schedule\n", + "Tw = 3.7 \t\t\t#mm, wall thickness\n", + "do = a+2*Tw \t\t\t#mm, outer diameter of pipe\n", + "Re1 = do*10**-3*V*rho1/mu1 \t\t\t# Reynold no\n", + "#from eq. 4.19, nusslet no.\n", + "Nu1 = 0.3+(0.62*Re1**(1./2)*Pr**(1./3)/(1+(0.4/Pr)**(2./3))**(1/4.))*(1+(Re1/(2.82*10**5))**(5./8))**(4/5.)\n", + "ho = (Nu1*ka/do)*10**3 \t\t\t#kcal/h m**2 C\n", + "Uo = 1/(ro/(di/2*hi)+1/ho) \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "\n", + "#Heat balance\n", + "A1 = math.pi*ro*l \t\t\t#m62, outside area of pipe\n", + "#from the formula of LMTD\n", + "def f(T2_): \n", + " return mw*cp_*(T2_-T1)-Uo*A1*((T2_-T1)/math.log((T2-T1)/(T2-T2_)))\n", + "T2_ = fsolve(f,1)\n", + "\n", + "# Results\n", + "print \"The exit water temp is %.0f C\"%(T2_)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The exit water temp is 36 C\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "dti = 0.0212 \t\t\t#m inner tube\n", + "dto = 0.0254 \t\t\t#cm, outer tube\n", + "dpi = 0.035 \t\t\t#cm, outer pipe\n", + "mo_ = 500. \t\t\t#kh/h, cooling rate of oil\n", + "To2 = 110. \t\t\t#C, initial temo. of oil\n", + "To1 = 70. \t\t\t#C, temp. after cooling of oil\n", + "Tw2 = 40. \t\t\t#C, inlet temp. of water\n", + "Tw1 = 29. \t\t\t#C, outlet temp. of water\n", + "#properties of oil\n", + "cpo = 0.478 \t\t\t#kcal/kg C\n", + "ko = 0.12 \t\t\t#kcal/h m C, thermal conductivity\n", + "rho = 850. \t\t\t#kg/m**3, density of oil\n", + "#properties of water\n", + "kw = 0.542 \t\t\t#kcal/h m C, thermal conductivity\n", + "kw_ = (kw*1.162) \t\t\t#kj/kg C\n", + "muw = 7.1*10**-4 \t\t\t#kg/ms, vismath.cosity of water\n", + "cpw = 1. \t\t\t#kcal/kg C\n", + "cpw_ = cpw*4.17 \t\t\t#kcal/kg C\n", + "rhow = 1000. \t\t\t#kg/m**3, density\n", + "\n", + "#calculation\n", + "HL = mo_*cpo*(To2-To1) \t\t\t#kcal/h, heat load of exchanger\n", + "mw_ = HL/(cpw*(Tw2-Tw1)) \t\t\t#kg/h water flow rate\n", + "mw_1 = mw_/(3600*10**3) \t\t\t#m**3/s water flow rate\n", + "A1 = (math.pi/4)*(dti)**2 \t\t\t#m**2, flow area of tube\n", + "Vw = mw_1/A1 \t\t\t#m/s water velocity\n", + "Rew = dti*Vw*rhow/muw \t\t\t#Reynold no.\n", + "Prw = cpw_*10**3*muw/kw_ \t\t\t#Prandtl no.\n", + "Nuw = 0.023*Rew**0.8*Prw**0.4 \t\t\t#nusslet no.\n", + "#water side heat transfer coefficient hi\n", + "hi = Nuw*kw/dti\n", + "\n", + "#oil side heat transfer coefficient\n", + "A2 = math.pi/4*(dpi**2-dto**2) \t\t\t#m**2, flow area of annulus\n", + "Vo = mo_/(3600*rho*A2) \t\t\t#m/s velocity of oil\n", + "de = (dpi**2-dto**2)/dto \t\t\t#m, equivalent dia of annulus\n", + "Tmo = (To2+To1)/2 \t\t\t#C,mean oil temp.\n", + "muoil = math.exp((5550./(Tmo+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "Reo = de*Vo*rho/muoil\n", + "Pro = cpo*muoil*3600/ko \t\t\t#prandtl no. for oil \n", + "\n", + "#assume (1st approximation)\n", + "Nuo = 3.66\n", + "ho = Nuo*ko/de \t\t\t#kcal/h m**2 c\n", + "L = 1 \t\t\t#assume length of tube\n", + "Ai = math.pi*dti*L\n", + "Ao = math.pi*dto*L\n", + "#overall heat transfer coefficient 1st approximation\n", + "Uo = 1/(1/ho+Ao/(Ai*hi))\n", + "LMTD = ((To2-Tw2)-(To1-Tw1))/(math.log((To2-Tw2)/(To1-Tw1)))\n", + "Ao1 = HL/(Uo*LMTD) \t\t\t #m**2, heat transfer area\n", + "Lt = Ao1/(math.pi*dto) \t\t\t #m, tube length\n", + "#from eq. 4.8\n", + "Nuo1 = 1.86*(Reo*Pro/(Lt/de))**(1./3) \t\t\t#Nusslet no. \n", + "ho1 = Nuo1*ko/de\n", + "Tmw = (Tw1+Tw2)/2 \t\t\t#C, mean water temp.\n", + "#balancing heat transfer rate of oil and water\n", + "\n", + "#average wall temp. Twall\n", + "Twall = ((hi*dti*(-Tmw))-(ho1*dto*Tmo))/(-65.71216)\n", + "#vismath.cosity of oil at this temp.\n", + "muwall = math.exp((5550/(Twall+273))-19) \t\t\t#kg/ms, vismath.cosity of oil\n", + "#Nusslet no. \n", + "Nuo2 = 1.86*(Reo*Pro/(Lt/de))**(1./3)*(muoil/muwall)**0.14\n", + "ho2 = Nuo2*ko/de\n", + "Uo2 = 1/((1/ho2)+(Ao/(Ai*hi)))\n", + "Ao2 = HL/(Uo2*LMTD)\n", + "Lt_ = Ao2/(math.pi*dto)\n", + "\n", + "# Results\n", + "print \"The tube length is %d m\"%(Lt_)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tube length is 123 m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Ti = 260. \t\t\t#C, initial temp.\n", + "Ts = 70. \t\t\t#C, skin temp.\n", + "St = 0.15 \t\t\t#m,space between tubes in equilateral triangular arrangement\n", + "Sd = St \t\t\t#space between tubes\n", + "mu = 4.43*10**-5 \t\t\t#m**2/s, momentum diffusity\n", + "k = 0.0375 \t\t\t#W/m C, thermal conductivity\n", + "rho = 0.73 \t\t\t#kg/m**3, density of air\n", + "cp = 0.248 \t\t\t#kj/kg C, specific heat of air\n", + "V = 16. \t\t\t#m/s, velociity \n", + "d = 0.06 \t\t\t#m, outside diameter of tube\n", + "Nt = 15. \t\t\t#no. of tubes in transverse row\n", + "Nl = 14. \t\t\t#no. of tubes in longitudinal row\n", + "N = Nl*Nt \t\t\t#total no. of tubes\n", + "L = 1. \t\t\t#m, length\n", + "#Calculation\n", + "Sl = (math.sqrt(3)/2)*St\n", + "Pr = cp*mu*3600*rho/k \t\t\t#Prandtl no. of bulk air\n", + "Pr = 0.62\n", + "Prw = 0.70 \t\t\t#Prandtl no. of air at wall temp. 70 C\n", + "#from eq. 4.25\n", + "Vmax = (St/(St-d))*V\n", + "#from eq. 4.26\n", + "Vmax1 = (St/(2*(St-d)))*V\n", + "Redmax = d*Vmax/mu\n", + "p = St/Sl \t\t\t#pitch ratio\n", + "#from table 4.3\n", + "m = 0.6\n", + "C = 0.35*(St/Sl)**0.2\n", + "h = round((k/d)*C*(36163)**m*(Pr)**(0.36)*(Pr/Prw)**(0.25))\n", + "#from eq. 4.28\n", + "dt = round(190*math.exp(-math.pi*d*N*h/(rho*V*3600*Nt*St*cp)))\n", + "LMTD = ((Ti-Ts)-(dt))/math.log((Ti-Ts)/dt)\n", + "A = round(math.pi*d*L*N,1) \t\t\t#m**2, heat transfer area\n", + "Q = h*A*LMTD\n", + "\n", + "# Results\n", + "print \" the rate of heat transfer to water.is %.2e kcal/h\"%(Q)\n", + "\n", + "# Note : Value of LMTD is wrong in book please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the rate of heat transfer to water.is 6.93e+05 kcal/h\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "W = 0.057 \t\t\t#m**3/min/tube, flow rate of water\n", + "W_ = W*16.66 \t\t\t#kg/s. water flow rate\n", + "di = 0.0212 \t\t\t#m,inside diameter\n", + "Ti = 32. \t\t\t#C, inlet water temp.\n", + "Tw = 80. \t\t\t#C, wall temp.\n", + "L = 3. \t\t\t#m, length of pip\n", + "\n", + "#Calculation\n", + "V = (W/60)*(1/((math.pi/4)*di**2)) \t\t\t#m/s, water velocity\n", + "#the properties of water at mean liquid temp..\n", + "mu = 7.65*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho = 995. \t\t\t#kg/m**3, density of air\n", + "cp = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr = cp*10**3*mu/k \t\t\t#Prandtl no.\n", + "Re = di*V*rho/mu \t\t\t# Reynold no.\n", + "#from eq. 4.19, nusslet no.\n", + "#from dittus boelter eq.\n", + "Nu = 0.023*Re**0.8*Pr**0.4 \t\t\t#Prandtl no.\n", + "f = 0.0014+0.125*Re**-0.32 \t\t\t#friction factor\n", + "#Reynold anamath.logy\n", + "St = f/2 \t\t\t#Smath.tanton no.\n", + "Nu1 = Re*Pr*St\n", + "#Prandtl anamath.logy\n", + "St1 = (f/2)/(1+5*(Pr-1)*math.sqrt(f/2))\n", + "Nu2 = St1*Re*Pr \n", + "#colburn analogy\n", + "Nu3 = Re*Pr**(1./3)*(f/2)\n", + "h = Nu3*k/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "#Q = W_*cp*10**3*(To-Ti) = h*A*LMTD\n", + "A = math.pi*di*L \t\t\t#m**2\n", + "def f(To): \n", + " return W_*cp*10**3*(To-Ti)-h*A*((To-Ti)/math.log((Tw-Ti)/(Tw-To)))\n", + "To = fsolve(f,1)\n", + "#Revised calculation\n", + "Tm = (Ti+To)/2 \t\t\t#C, mean liquid temp.\n", + "#the properties of water at new mean liquid temp..\n", + "mu1 = 6.2*10**-4 \t\t\t#m**2/s, vismath.cosity\n", + "k1 = 0.623 \t\t\t#W/m C, thermal conductivity\n", + "rho1 = 991. \t\t\t#kg/m**3, density of air\n", + "cp1 = 4.17 \t\t\t#kj/kg C, specific heat of air\n", + "\n", + "Pr1 = cp1*10**3*mu1/k1 \t\t\t#Prandtl no.\n", + "Re1 = di*V*rho1/mu1 \t\t\t# Reynold no.\n", + "#from dittus boelter eq.\n", + "f1 = 0.0014+0.125*Re1**(-0.32) \t\t\t#friction factor\n", + "#colburn anamath.logy\n", + "Nu4 = Re1*Pr1**(1./3)*(f1/2)\n", + "h1 = Nu4*k1/(di) \t\t\t#W/m**2 C av heat transfer coefficient\n", + "def f(To_): \n", + " return W_*cp*10**3*(To_-Ti)-h1*A*((To_-Ti)/math.log((Tw-Ti)/(Tw-To_)))\n", + "To_ = fsolve(f,1)\n", + "\n", + "print \"Outlet temp. of water for one pass through the tubes is %.0f C\"%(To_)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Outlet temp. of water for one pass through the tubes is 51 C\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5.ipynb new file mode 100755 index 00000000..b70ace76 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:72461cf2f59af1503652a4d150bc4913a771f3301429af959ed7c02d013470f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : free convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 65. \t\t\t#C, furnace temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.5 \t\t\t#m, height of door\n", + "w = 1. \t\t\t#m, width of door\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "\n", + "# Calculations\n", + "Pr = 0.695 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1/(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grl = g*beeta*(T1-T2)*h**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = (0.825+(0.387*(Ral)**(1./6))/(1+(0.492/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nul*k/h \t\t\t#average heat transfer coefficient\n", + "Ad = h*w \t\t\t#m**2, door area\n", + "dt = T1-T2 \t\t\t#temp. driving force\n", + "q = hav*Ad*dt \t\t\t#W,rate of heat loss\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 267 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 60. \t\t\t#C, plate temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.\n", + "w = 1. \t\t\t#m, width of door\n", + "q = 170. \t\t\t#W, rate of heat transfer\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "#Properties of air at Tf\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1./(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "A = h*w \t\t\t#m**2, plate area\n", + "P = 2*(h+w) \t\t\t#m,perimeter of plate \n", + "L = A/P \t\t\t#m characteristic length\n", + "Grl = g*beeta*(T1-T2)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = 0.54*(Ral)**(1./4) \t\t\t#Nusslet no.\n", + "hav = Nul*k/L \t\t\t#average heat transfer coefficient\n", + "Ts = q/(hav*A)+T2\n", + "\n", + "# Results\n", + "print \"the steady state temp. of the plate is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the steady state temp. of the plate is 61.6 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.0254 \t\t\t#m, diameter of steel rod\n", + "l = 0.4 \t\t\t#m, length of rod\n", + "T1 = 80. \t\t\t#C, initial temp.\n", + "T2 = 30. \t\t\t#C, ambient temp.\n", + "T3 = 35. \t\t\t#c, temp. after cooling\n", + "rho = 7800. \t\t\t#kg/m**3 ,density of steel rod\n", + "cp = 0.473 \t\t\t#kj/kg C. specific heat\n", + "\n", + "#Calculation\n", + "m = math.pi/4*d**2*l*rho \t\t\t#kg. mass of cylinder\n", + "A = math.pi*d*l \t\t\t#m**2, area of cylinder\n", + "dt = T1-T2 \t\t\t#c, insmath.tanmath.taneous temp. difference\n", + "h = 1.32*(dt/d)**0.25 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "def f0(T): \n", + " return 1./(T**(5./4))\n", + "\n", + "i = quad(f0,5,50)[0]\n", + "\n", + "t = i/(3.306*A/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The required time for cooling is %.2f hr\"%(t/3600.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required time for cooling is 2.30 hr\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, internal diameter\n", + "od = 89.*10**-3 \t\t\t#m, outer diameter\n", + "Pg = 15. \t\t\t#kg/cm**2, gauge pressure\n", + "t = 2.*10**-2 \t\t\t#m, thickness of preformed mineral fibre\n", + "k = 0.05 \t\t\t#W/m C. thermal conductivity\n", + "Ta = 25. \t\t\t#C, ambient air temp.\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "#assume\n", + "Ts = 50. \t\t\t#C, skin temp.\n", + "l = 1. \t\t\t#m, length\n", + "Ti = 200.5 \t\t\t#C, initial temp.\n", + "rs = od/2+t \t\t\t#m, outer radius of insulation\n", + "ri = od/2 \t\t\t#m, inner radius of insulation\n", + "\n", + "# Calculations\n", + "Q = 2*math.pi*l*k*(Ti-Ts)/(math.log(rs/ri)) \t\t\t#W\n", + "#properties of air at taken at the mean film temp.\n", + "Tf = (Ta+Ts)/2 \t\t\t#C\n", + "mu = 1.76*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta = (1/(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.027 \t\t\t#W/m C, thermal conductivity\n", + "ds = 2*rs \t\t\t#m, outer dia. of insulated pipe\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grd = g*beeta*(Ts-Ta)*ds**3/(mu**2) \t\t\t#Grashof no.\n", + "Rad = Grd*Pr \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "#Nusslet no. \n", + "Nu = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nu*k1/ds \t\t\t#W/ m**2 C, average heat transfer coefficient\n", + "Ts = (Q/(math.pi*ds*l*hav))+Ta \t\t\t#C, skin temp.\n", + "#revised calculation by assuming\n", + "Ts1 = 70. \t\t\t#C, skin temp.\n", + "#Rate of heat transfer through insulation\n", + "Q1 = 2*math.pi*l*k*(Ti-Ts1)/(math.log(rs/ri))\n", + "Tf1 = (Ta+Ts1)/2 \t\t\t#C, average aie mean film temp.\n", + "mu1 = 1.8*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta1 = (1/(Tf1+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.0275 \t\t\t#W/m C, thermal conductivity\n", + "Pr1 = 0.703 \t\t\t#Prandtl no.\n", + "Grd1 = g*beeta1*(Ts1-Ta)*ds**3/(mu1**2) \t\t\t#Grashof no.\n", + "Rad = Grd1*Pr1 \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "# average heat transfer coefficient, in \t\t\t#W/ m**2 C,\n", + "hav1 = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2*(k1/ds)\n", + "Ts2 = (Q1/(math.pi*ds*l*hav1))+Ta\n", + "#again assume skin temp. = 74\n", + "Ts2 = 74 \t\t\t#C, assumed skin temp.\n", + "Q3 = 2*math.pi*l*k*(Ti-Ts2)/(math.log(rs/ri))\n", + "\n", + "# Results\n", + "print \"the rate of heat loss by free convection per meter length of pipe. is %.0f W\"%(Q3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss by free convection per meter length of pipe. is 107 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "Ts = 65. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tw = 460. \t\t\t#C, wall temp.\n", + "Tf = (Ts+To)/2 \t\t\t#C,mean air film temp.\n", + "beeta = (1./(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "mu = 1.84*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "L = 10.5 \t\t\t#m, height of converter\n", + "di = 4. \t\t\t#m,diameter of converter\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "k = 0.0241 \t\t\t#kcal/h m C, thermal conductivity\n", + "\n", + "#Calculation\n", + "Grl = g*beeta*(Ts-To)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "x = di/L \t\t\t#assume di/l = x\n", + "y = 35/(Grl)**(1./4) \t\t\t#assume 35/(Grl)**(3/4) = y\n", + "#for a verticla flat plate, from eq. 5.3\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#nusslet no.\n", + "Nu = (0.825+(0.387*(Ral)**(1./6))/(1+(0.496/Pr)**(9./16))**(8./27))**2\n", + "hav = Nu*k/L \t\t\t#kcal/h m**2 C, average heat transfer coefficient\n", + "#w = poly(0,\"w\")\n", + "#Dav = (4+(4+2*w))/2 \t\t\t#average diameter\n", + "#Aav = math.pi*Dav*L \t\t\t#average heat transfer area\n", + "#Qi = math.pi*Dav*L*0.0602*(Tw-Ts)/w \t\t\t#Rate of heat transfer through insulation\n", + "#rate of heat transfer from the outer surface of the insulation by free convection\n", + "#Qc = hav*math.pi*Dav*L*(Ts-To) \n", + "#Qi = Qc\n", + "def f(w): \n", + " return math.pi*(4+w)*L*0.0602*(Tw-Ts)/w-hav*math.pi*(4+2*w)*L*(Ts-To)\n", + "w = fsolve(f,0.1)\n", + "\n", + "# Results\n", + "print \"The required insulation thickness is %.3f m\"%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required insulation thickness is 0.188 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "L = 1.6 \t\t\t#m,height of enclosure\n", + "w = 0.04 \t\t\t#m, width of enclosure\n", + "b = 0.8 \t\t\t#m, breath\n", + "T1 = 22. \t\t\t#C,surface temp.\n", + "T2 = 30. \t\t\t#C, wall temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, Mean air temp.\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "\n", + "# Calculations\n", + "#fpr air at 26 C\n", + "beeta = 1./(Tm+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "mu = 1.684*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "alpha = 2.21*10**-5 \t\t\t#m**2/s, thermal diffusity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Raw = g*beeta*(T2-T1)*w**3/(mu*alpha) \t\t\t#Rayleigh no.\n", + "Nuw = 0.42*(Raw)**0.25*Pr**0.012*(L/w)**-0.3 \t\t\t#Nusslet no.\n", + "h = Nuw*k/w \t\t\t#kcal/h m**2 C, heat transfer coefficient\n", + "q = h*(T2-T1)*(L*b) \t\t\t#W,the rate of heat transfer\n", + "\n", + "# Results\n", + "print \"the rate of heat transfer is %.1f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is 13.4 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Ts = 60. \t\t\t#C, surface temp\n", + "To = 30. \t\t\t#C, bulk temp.\n", + "d = 0.06 \t\t\t#m, diameter of pipe\n", + "l = 1. \t\t\t#m, length\n", + "Tm = (Ts+To)/2\n", + "#for air at Tm\n", + "rho = 1.105 \t\t\t#kg/m**3, density\n", + "cp = 0.24 \t\t\t#kcal/kg C. specific heat\n", + "mu = 1.95*10**-5 \t\t\t#kg/m s. vismath.cosity\n", + "P = 0.7 \t\t\t#Prandtl no. \n", + "kv = 1.85*10**-5 \t\t\t#m**2/s, kinetic vismath.cosity\n", + "k = 0.0241 \t\t\t#kcal/f m C, thermal conductivity\n", + "beeta = (1./(Tm+273)) \t\t\t#K**-1. coefficient of volumetric expension\n", + "V = 0.3 \t\t\t#m/s, velocity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "Rad = g*beeta*(Ts-To)*d**3*P/(kv**2) \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "Nufree = (0.60+(0.387*Rad**(1./6))/(1+(0.559/P)**(9./16))**(8./27))**2\n", + "#calculation of forced convection nusslet no.\n", + "#from eq. 4.19\n", + "Re = d*V/(kv)\n", + "Nuforced = 0.3+(0.62*Re**(1./2)*P**(1./3)/(1+(0.4/P)**(2./3))**(1./4))*(1.+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "Nu = (Nuforced**3+Nufree**3)**(1./3) \t\t\t#nusslet no. for mixed convection\n", + "#Nu = h*d/k\n", + "h = Nu*k/d \t\t\t#kcal/h m**2 C, heat transfer corfficient\n", + "q = h*math.pi*d*l*(Ts-To)\n", + "\n", + "# Results\n", + "print \"the rate of heat loss per meter length is %.1f kcal/h\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss per meter length is 39.7 kcal/h\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_1.ipynb new file mode 100755 index 00000000..b70ace76 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_1.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:72461cf2f59af1503652a4d150bc4913a771f3301429af959ed7c02d013470f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : free convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 65. \t\t\t#C, furnace temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.5 \t\t\t#m, height of door\n", + "w = 1. \t\t\t#m, width of door\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "\n", + "# Calculations\n", + "Pr = 0.695 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1/(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grl = g*beeta*(T1-T2)*h**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = (0.825+(0.387*(Ral)**(1./6))/(1+(0.492/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nul*k/h \t\t\t#average heat transfer coefficient\n", + "Ad = h*w \t\t\t#m**2, door area\n", + "dt = T1-T2 \t\t\t#temp. driving force\n", + "q = hav*Ad*dt \t\t\t#W,rate of heat loss\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 267 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 60. \t\t\t#C, plate temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.\n", + "w = 1. \t\t\t#m, width of door\n", + "q = 170. \t\t\t#W, rate of heat transfer\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "#Properties of air at Tf\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1./(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "A = h*w \t\t\t#m**2, plate area\n", + "P = 2*(h+w) \t\t\t#m,perimeter of plate \n", + "L = A/P \t\t\t#m characteristic length\n", + "Grl = g*beeta*(T1-T2)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = 0.54*(Ral)**(1./4) \t\t\t#Nusslet no.\n", + "hav = Nul*k/L \t\t\t#average heat transfer coefficient\n", + "Ts = q/(hav*A)+T2\n", + "\n", + "# Results\n", + "print \"the steady state temp. of the plate is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the steady state temp. of the plate is 61.6 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.0254 \t\t\t#m, diameter of steel rod\n", + "l = 0.4 \t\t\t#m, length of rod\n", + "T1 = 80. \t\t\t#C, initial temp.\n", + "T2 = 30. \t\t\t#C, ambient temp.\n", + "T3 = 35. \t\t\t#c, temp. after cooling\n", + "rho = 7800. \t\t\t#kg/m**3 ,density of steel rod\n", + "cp = 0.473 \t\t\t#kj/kg C. specific heat\n", + "\n", + "#Calculation\n", + "m = math.pi/4*d**2*l*rho \t\t\t#kg. mass of cylinder\n", + "A = math.pi*d*l \t\t\t#m**2, area of cylinder\n", + "dt = T1-T2 \t\t\t#c, insmath.tanmath.taneous temp. difference\n", + "h = 1.32*(dt/d)**0.25 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "def f0(T): \n", + " return 1./(T**(5./4))\n", + "\n", + "i = quad(f0,5,50)[0]\n", + "\n", + "t = i/(3.306*A/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The required time for cooling is %.2f hr\"%(t/3600.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required time for cooling is 2.30 hr\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, internal diameter\n", + "od = 89.*10**-3 \t\t\t#m, outer diameter\n", + "Pg = 15. \t\t\t#kg/cm**2, gauge pressure\n", + "t = 2.*10**-2 \t\t\t#m, thickness of preformed mineral fibre\n", + "k = 0.05 \t\t\t#W/m C. thermal conductivity\n", + "Ta = 25. \t\t\t#C, ambient air temp.\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "#assume\n", + "Ts = 50. \t\t\t#C, skin temp.\n", + "l = 1. \t\t\t#m, length\n", + "Ti = 200.5 \t\t\t#C, initial temp.\n", + "rs = od/2+t \t\t\t#m, outer radius of insulation\n", + "ri = od/2 \t\t\t#m, inner radius of insulation\n", + "\n", + "# Calculations\n", + "Q = 2*math.pi*l*k*(Ti-Ts)/(math.log(rs/ri)) \t\t\t#W\n", + "#properties of air at taken at the mean film temp.\n", + "Tf = (Ta+Ts)/2 \t\t\t#C\n", + "mu = 1.76*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta = (1/(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.027 \t\t\t#W/m C, thermal conductivity\n", + "ds = 2*rs \t\t\t#m, outer dia. of insulated pipe\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grd = g*beeta*(Ts-Ta)*ds**3/(mu**2) \t\t\t#Grashof no.\n", + "Rad = Grd*Pr \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "#Nusslet no. \n", + "Nu = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nu*k1/ds \t\t\t#W/ m**2 C, average heat transfer coefficient\n", + "Ts = (Q/(math.pi*ds*l*hav))+Ta \t\t\t#C, skin temp.\n", + "#revised calculation by assuming\n", + "Ts1 = 70. \t\t\t#C, skin temp.\n", + "#Rate of heat transfer through insulation\n", + "Q1 = 2*math.pi*l*k*(Ti-Ts1)/(math.log(rs/ri))\n", + "Tf1 = (Ta+Ts1)/2 \t\t\t#C, average aie mean film temp.\n", + "mu1 = 1.8*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta1 = (1/(Tf1+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.0275 \t\t\t#W/m C, thermal conductivity\n", + "Pr1 = 0.703 \t\t\t#Prandtl no.\n", + "Grd1 = g*beeta1*(Ts1-Ta)*ds**3/(mu1**2) \t\t\t#Grashof no.\n", + "Rad = Grd1*Pr1 \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "# average heat transfer coefficient, in \t\t\t#W/ m**2 C,\n", + "hav1 = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2*(k1/ds)\n", + "Ts2 = (Q1/(math.pi*ds*l*hav1))+Ta\n", + "#again assume skin temp. = 74\n", + "Ts2 = 74 \t\t\t#C, assumed skin temp.\n", + "Q3 = 2*math.pi*l*k*(Ti-Ts2)/(math.log(rs/ri))\n", + "\n", + "# Results\n", + "print \"the rate of heat loss by free convection per meter length of pipe. is %.0f W\"%(Q3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss by free convection per meter length of pipe. is 107 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "Ts = 65. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tw = 460. \t\t\t#C, wall temp.\n", + "Tf = (Ts+To)/2 \t\t\t#C,mean air film temp.\n", + "beeta = (1./(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "mu = 1.84*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "L = 10.5 \t\t\t#m, height of converter\n", + "di = 4. \t\t\t#m,diameter of converter\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "k = 0.0241 \t\t\t#kcal/h m C, thermal conductivity\n", + "\n", + "#Calculation\n", + "Grl = g*beeta*(Ts-To)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "x = di/L \t\t\t#assume di/l = x\n", + "y = 35/(Grl)**(1./4) \t\t\t#assume 35/(Grl)**(3/4) = y\n", + "#for a verticla flat plate, from eq. 5.3\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#nusslet no.\n", + "Nu = (0.825+(0.387*(Ral)**(1./6))/(1+(0.496/Pr)**(9./16))**(8./27))**2\n", + "hav = Nu*k/L \t\t\t#kcal/h m**2 C, average heat transfer coefficient\n", + "#w = poly(0,\"w\")\n", + "#Dav = (4+(4+2*w))/2 \t\t\t#average diameter\n", + "#Aav = math.pi*Dav*L \t\t\t#average heat transfer area\n", + "#Qi = math.pi*Dav*L*0.0602*(Tw-Ts)/w \t\t\t#Rate of heat transfer through insulation\n", + "#rate of heat transfer from the outer surface of the insulation by free convection\n", + "#Qc = hav*math.pi*Dav*L*(Ts-To) \n", + "#Qi = Qc\n", + "def f(w): \n", + " return math.pi*(4+w)*L*0.0602*(Tw-Ts)/w-hav*math.pi*(4+2*w)*L*(Ts-To)\n", + "w = fsolve(f,0.1)\n", + "\n", + "# Results\n", + "print \"The required insulation thickness is %.3f m\"%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required insulation thickness is 0.188 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "L = 1.6 \t\t\t#m,height of enclosure\n", + "w = 0.04 \t\t\t#m, width of enclosure\n", + "b = 0.8 \t\t\t#m, breath\n", + "T1 = 22. \t\t\t#C,surface temp.\n", + "T2 = 30. \t\t\t#C, wall temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, Mean air temp.\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "\n", + "# Calculations\n", + "#fpr air at 26 C\n", + "beeta = 1./(Tm+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "mu = 1.684*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "alpha = 2.21*10**-5 \t\t\t#m**2/s, thermal diffusity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Raw = g*beeta*(T2-T1)*w**3/(mu*alpha) \t\t\t#Rayleigh no.\n", + "Nuw = 0.42*(Raw)**0.25*Pr**0.012*(L/w)**-0.3 \t\t\t#Nusslet no.\n", + "h = Nuw*k/w \t\t\t#kcal/h m**2 C, heat transfer coefficient\n", + "q = h*(T2-T1)*(L*b) \t\t\t#W,the rate of heat transfer\n", + "\n", + "# Results\n", + "print \"the rate of heat transfer is %.1f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is 13.4 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Ts = 60. \t\t\t#C, surface temp\n", + "To = 30. \t\t\t#C, bulk temp.\n", + "d = 0.06 \t\t\t#m, diameter of pipe\n", + "l = 1. \t\t\t#m, length\n", + "Tm = (Ts+To)/2\n", + "#for air at Tm\n", + "rho = 1.105 \t\t\t#kg/m**3, density\n", + "cp = 0.24 \t\t\t#kcal/kg C. specific heat\n", + "mu = 1.95*10**-5 \t\t\t#kg/m s. vismath.cosity\n", + "P = 0.7 \t\t\t#Prandtl no. \n", + "kv = 1.85*10**-5 \t\t\t#m**2/s, kinetic vismath.cosity\n", + "k = 0.0241 \t\t\t#kcal/f m C, thermal conductivity\n", + "beeta = (1./(Tm+273)) \t\t\t#K**-1. coefficient of volumetric expension\n", + "V = 0.3 \t\t\t#m/s, velocity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "Rad = g*beeta*(Ts-To)*d**3*P/(kv**2) \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "Nufree = (0.60+(0.387*Rad**(1./6))/(1+(0.559/P)**(9./16))**(8./27))**2\n", + "#calculation of forced convection nusslet no.\n", + "#from eq. 4.19\n", + "Re = d*V/(kv)\n", + "Nuforced = 0.3+(0.62*Re**(1./2)*P**(1./3)/(1+(0.4/P)**(2./3))**(1./4))*(1.+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "Nu = (Nuforced**3+Nufree**3)**(1./3) \t\t\t#nusslet no. for mixed convection\n", + "#Nu = h*d/k\n", + "h = Nu*k/d \t\t\t#kcal/h m**2 C, heat transfer corfficient\n", + "q = h*math.pi*d*l*(Ts-To)\n", + "\n", + "# Results\n", + "print \"the rate of heat loss per meter length is %.1f kcal/h\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss per meter length is 39.7 kcal/h\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_2.ipynb new file mode 100755 index 00000000..b70ace76 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch5_2.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:72461cf2f59af1503652a4d150bc4913a771f3301429af959ed7c02d013470f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : free convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 65. \t\t\t#C, furnace temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.5 \t\t\t#m, height of door\n", + "w = 1. \t\t\t#m, width of door\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "\n", + "# Calculations\n", + "Pr = 0.695 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1/(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grl = g*beeta*(T1-T2)*h**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = (0.825+(0.387*(Ral)**(1./6))/(1+(0.492/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nul*k/h \t\t\t#average heat transfer coefficient\n", + "Ad = h*w \t\t\t#m**2, door area\n", + "dt = T1-T2 \t\t\t#temp. driving force\n", + "q = hav*Ad*dt \t\t\t#W,rate of heat loss\n", + "\n", + "# Results\n", + "print \"The rate of heat loss is %.0f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate of heat loss is 267 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 60. \t\t\t#C, plate temp.\n", + "T2 = 25. \t\t\t#C, ambient temp.\n", + "h = 1.\n", + "w = 1. \t\t\t#m, width of door\n", + "q = 170. \t\t\t#W, rate of heat transfer\n", + "Tf = (T1+T2)/2 \t\t\t#c, average air film temp.\n", + "#Properties of air at Tf\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "mu = 1.85*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "beeta = 1./(Tf+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "k = 0.028 \t\t\t#W/m C, thermal conductivity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "A = h*w \t\t\t#m**2, plate area\n", + "P = 2*(h+w) \t\t\t#m,perimeter of plate \n", + "L = A/P \t\t\t#m characteristic length\n", + "Grl = g*beeta*(T1-T2)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#Nusslet no.\n", + "Nul = 0.54*(Ral)**(1./4) \t\t\t#Nusslet no.\n", + "hav = Nul*k/L \t\t\t#average heat transfer coefficient\n", + "Ts = q/(hav*A)+T2\n", + "\n", + "# Results\n", + "print \"the steady state temp. of the plate is %.1f C\"%(Ts)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the steady state temp. of the plate is 61.6 C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.0254 \t\t\t#m, diameter of steel rod\n", + "l = 0.4 \t\t\t#m, length of rod\n", + "T1 = 80. \t\t\t#C, initial temp.\n", + "T2 = 30. \t\t\t#C, ambient temp.\n", + "T3 = 35. \t\t\t#c, temp. after cooling\n", + "rho = 7800. \t\t\t#kg/m**3 ,density of steel rod\n", + "cp = 0.473 \t\t\t#kj/kg C. specific heat\n", + "\n", + "#Calculation\n", + "m = math.pi/4*d**2*l*rho \t\t\t#kg. mass of cylinder\n", + "A = math.pi*d*l \t\t\t#m**2, area of cylinder\n", + "dt = T1-T2 \t\t\t#c, insmath.tanmath.taneous temp. difference\n", + "h = 1.32*(dt/d)**0.25 \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "def f0(T): \n", + " return 1./(T**(5./4))\n", + "\n", + "i = quad(f0,5,50)[0]\n", + "\n", + "t = i/(3.306*A/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The required time for cooling is %.2f hr\"%(t/3600.)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required time for cooling is 2.30 hr\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "id_ = 78.*10**-3 \t\t\t#m, internal diameter\n", + "od = 89.*10**-3 \t\t\t#m, outer diameter\n", + "Pg = 15. \t\t\t#kg/cm**2, gauge pressure\n", + "t = 2.*10**-2 \t\t\t#m, thickness of preformed mineral fibre\n", + "k = 0.05 \t\t\t#W/m C. thermal conductivity\n", + "Ta = 25. \t\t\t#C, ambient air temp.\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "#assume\n", + "Ts = 50. \t\t\t#C, skin temp.\n", + "l = 1. \t\t\t#m, length\n", + "Ti = 200.5 \t\t\t#C, initial temp.\n", + "rs = od/2+t \t\t\t#m, outer radius of insulation\n", + "ri = od/2 \t\t\t#m, inner radius of insulation\n", + "\n", + "# Calculations\n", + "Q = 2*math.pi*l*k*(Ti-Ts)/(math.log(rs/ri)) \t\t\t#W\n", + "#properties of air at taken at the mean film temp.\n", + "Tf = (Ta+Ts)/2 \t\t\t#C\n", + "mu = 1.76*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta = (1/(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.027 \t\t\t#W/m C, thermal conductivity\n", + "ds = 2*rs \t\t\t#m, outer dia. of insulated pipe\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Grd = g*beeta*(Ts-Ta)*ds**3/(mu**2) \t\t\t#Grashof no.\n", + "Rad = Grd*Pr \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "#Nusslet no. \n", + "Nu = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2 \n", + "hav = Nu*k1/ds \t\t\t#W/ m**2 C, average heat transfer coefficient\n", + "Ts = (Q/(math.pi*ds*l*hav))+Ta \t\t\t#C, skin temp.\n", + "#revised calculation by assuming\n", + "Ts1 = 70. \t\t\t#C, skin temp.\n", + "#Rate of heat transfer through insulation\n", + "Q1 = 2*math.pi*l*k*(Ti-Ts1)/(math.log(rs/ri))\n", + "Tf1 = (Ta+Ts1)/2 \t\t\t#C, average aie mean film temp.\n", + "mu1 = 1.8*10**-5 \t\t\t#m**2/s. vismath.cosity\n", + "beeta1 = (1/(Tf1+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "k1 = 0.0275 \t\t\t#W/m C, thermal conductivity\n", + "Pr1 = 0.703 \t\t\t#Prandtl no.\n", + "Grd1 = g*beeta1*(Ts1-Ta)*ds**3/(mu1**2) \t\t\t#Grashof no.\n", + "Rad = Grd1*Pr1 \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "# average heat transfer coefficient, in \t\t\t#W/ m**2 C,\n", + "hav1 = (0.60+(0.387*(Rad)**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27))**2*(k1/ds)\n", + "Ts2 = (Q1/(math.pi*ds*l*hav1))+Ta\n", + "#again assume skin temp. = 74\n", + "Ts2 = 74 \t\t\t#C, assumed skin temp.\n", + "Q3 = 2*math.pi*l*k*(Ti-Ts2)/(math.log(rs/ri))\n", + "\n", + "# Results\n", + "print \"the rate of heat loss by free convection per meter length of pipe. is %.0f W\"%(Q3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss by free convection per meter length of pipe. is 107 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "Ts = 65. \t\t\t#C, skin temp.\n", + "To = 30. \t\t\t#C, ambient temp.\n", + "Tw = 460. \t\t\t#C, wall temp.\n", + "Tf = (Ts+To)/2 \t\t\t#C,mean air film temp.\n", + "beeta = (1./(Tf+273)) \t\t\t#K**-1, coefficient of volumetric expansion\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "mu = 1.84*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "L = 10.5 \t\t\t#m, height of converter\n", + "di = 4. \t\t\t#m,diameter of converter\n", + "Pr = 0.705 \t\t\t#Prandtl no.\n", + "k = 0.0241 \t\t\t#kcal/h m C, thermal conductivity\n", + "\n", + "#Calculation\n", + "Grl = g*beeta*(Ts-To)*L**3/(mu**2) \t\t\t#Grashof no.\n", + "x = di/L \t\t\t#assume di/l = x\n", + "y = 35/(Grl)**(1./4) \t\t\t#assume 35/(Grl)**(3/4) = y\n", + "#for a verticla flat plate, from eq. 5.3\n", + "Ral = Grl*Pr \t\t\t#Rayleigh no.\n", + "#nusslet no.\n", + "Nu = (0.825+(0.387*(Ral)**(1./6))/(1+(0.496/Pr)**(9./16))**(8./27))**2\n", + "hav = Nu*k/L \t\t\t#kcal/h m**2 C, average heat transfer coefficient\n", + "#w = poly(0,\"w\")\n", + "#Dav = (4+(4+2*w))/2 \t\t\t#average diameter\n", + "#Aav = math.pi*Dav*L \t\t\t#average heat transfer area\n", + "#Qi = math.pi*Dav*L*0.0602*(Tw-Ts)/w \t\t\t#Rate of heat transfer through insulation\n", + "#rate of heat transfer from the outer surface of the insulation by free convection\n", + "#Qc = hav*math.pi*Dav*L*(Ts-To) \n", + "#Qi = Qc\n", + "def f(w): \n", + " return math.pi*(4+w)*L*0.0602*(Tw-Ts)/w-hav*math.pi*(4+2*w)*L*(Ts-To)\n", + "w = fsolve(f,0.1)\n", + "\n", + "# Results\n", + "print \"The required insulation thickness is %.3f m\"%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required insulation thickness is 0.188 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "L = 1.6 \t\t\t#m,height of enclosure\n", + "w = 0.04 \t\t\t#m, width of enclosure\n", + "b = 0.8 \t\t\t#m, breath\n", + "T1 = 22. \t\t\t#C,surface temp.\n", + "T2 = 30. \t\t\t#C, wall temp.\n", + "Tm = (T1+T2)/2 \t\t\t#C, Mean air temp.\n", + "Pr = 0.7 \t\t\t#Prandtl no.\n", + "\n", + "# Calculations\n", + "#fpr air at 26 C\n", + "beeta = 1./(Tm+273) \t\t\t#K**-1. coefficient of volumetric expension\n", + "mu = 1.684*10**-5 \t\t\t#m**2/s, vismath.cosity\n", + "k = 0.026 \t\t\t#W/m C, thermal conductivity\n", + "alpha = 2.21*10**-5 \t\t\t#m**2/s, thermal diffusity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "Raw = g*beeta*(T2-T1)*w**3/(mu*alpha) \t\t\t#Rayleigh no.\n", + "Nuw = 0.42*(Raw)**0.25*Pr**0.012*(L/w)**-0.3 \t\t\t#Nusslet no.\n", + "h = Nuw*k/w \t\t\t#kcal/h m**2 C, heat transfer coefficient\n", + "q = h*(T2-T1)*(L*b) \t\t\t#W,the rate of heat transfer\n", + "\n", + "# Results\n", + "print \"the rate of heat transfer is %.1f W\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat transfer is 13.4 W\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Ts = 60. \t\t\t#C, surface temp\n", + "To = 30. \t\t\t#C, bulk temp.\n", + "d = 0.06 \t\t\t#m, diameter of pipe\n", + "l = 1. \t\t\t#m, length\n", + "Tm = (Ts+To)/2\n", + "#for air at Tm\n", + "rho = 1.105 \t\t\t#kg/m**3, density\n", + "cp = 0.24 \t\t\t#kcal/kg C. specific heat\n", + "mu = 1.95*10**-5 \t\t\t#kg/m s. vismath.cosity\n", + "P = 0.7 \t\t\t#Prandtl no. \n", + "kv = 1.85*10**-5 \t\t\t#m**2/s, kinetic vismath.cosity\n", + "k = 0.0241 \t\t\t#kcal/f m C, thermal conductivity\n", + "beeta = (1./(Tm+273)) \t\t\t#K**-1. coefficient of volumetric expension\n", + "V = 0.3 \t\t\t#m/s, velocity\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "#Calculation\n", + "Rad = g*beeta*(Ts-To)*d**3*P/(kv**2) \t\t\t#Rayleigh no.\n", + "#from eq. 5.9\n", + "Nufree = (0.60+(0.387*Rad**(1./6))/(1+(0.559/P)**(9./16))**(8./27))**2\n", + "#calculation of forced convection nusslet no.\n", + "#from eq. 4.19\n", + "Re = d*V/(kv)\n", + "Nuforced = 0.3+(0.62*Re**(1./2)*P**(1./3)/(1+(0.4/P)**(2./3))**(1./4))*(1.+(Re/(2.82*10**5))**(5./8))**(4./5)\n", + "Nu = (Nuforced**3+Nufree**3)**(1./3) \t\t\t#nusslet no. for mixed convection\n", + "#Nu = h*d/k\n", + "h = Nu*k/d \t\t\t#kcal/h m**2 C, heat transfer corfficient\n", + "q = h*math.pi*d*l*(Ts-To)\n", + "\n", + "# Results\n", + "print \"the rate of heat loss per meter length is %.1f kcal/h\"%(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate of heat loss per meter length is 39.7 kcal/h\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6.ipynb new file mode 100755 index 00000000..6b33afac --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6.ipynb @@ -0,0 +1,566 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:21c7dbf1695221baa4aea0f65132b48011da687c8b757b9802a15caeca0516ad" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Boiling and condensation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "#(a)\n", + "Tsat = 350 \t\t\t#K, saturated temp.\n", + "Tl = Tsat+5 \t\t\t#K, liquid temp.\n", + "#By antoine eqn.\n", + "T = Tl-273 \t\t\t#C, \n", + "\n", + "# Calculations and Results\n", + "pl = math.exp(4.22658-(1244.95/(T+217.88)))\n", + "ST = 26.29-0.1161*T \t\t\t#dyne/cm, Surface tension of liquid\n", + "ST_ = ST*10**-3 \t\t\t#N/m Surface tension of liquid\n", + "Lv = 33605 \t\t\t#kj/kgmol, molar heat of vaporization\n", + "R = 0.08314 \t\t\t#m**3 bar/kgmol K, gas math.cosmath.tant\n", + "r = (2*ST_*R*Tsat**2)/((Tl-Tsat)*pl*(Lv*10**3))\n", + "print \"So a bubble nucleus that has been detached from a cavity will not collapse in \\\n", + "the liquid if it is larger than %.2f micrometer \"%(r*10**6)\n", + "\n", + "#(b)\n", + "r1 = 10**-6 \t\t\t#m\n", + "#pl1 = exp(4.22658-(1244.95/(Tl_-273+217.88))) \t\t\t#vapour pressure\n", + "#ST1 = 0.02629-1.161*10**-4(Tl_-273) \t\t\t#surface tension\n", + "\n", + "def f(Tl): \n", + " return (Tl-Tsat)-2*(0.02629-1.161*10**-4*(Tl-273))*R*Tsat**2/(r1*Lv*10**3)\n", + "Tl = fsolve(f,0.1)\n", + "T_ = (Tl-273.5)-(Tsat-273)\n", + "print \"The superheat of the liquid is %d C\"%(T_)\n", + "\n", + "# note : answers are slightly different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "So a bubble nucleus that has been detached from a cavity will not collapse in the liquid if it is larger than 1.89 micrometer \n", + "The superheat of the liquid is 9 C\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:152: 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": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 0.35 \t\t\t#m, diameter of pan\n", + "p = 1.013 \t\t\t#bar, pressure\n", + "T1 = 115. \t\t\t#C, bottom temp.\n", + "T2 = 100. \t\t\t#C, boiling temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "#For Water\n", + "mu1 = 2.70*10**-4 \t\t\t#Ns/m**2, vismath.cosity\n", + "cp1 = 4.22 \t\t\t#kj/kg C, specific heat\n", + "rho1 = 958. \t\t\t#kg/m63. density\n", + "Lv1 = 2257. \t\t\t#kj/kg, enthalpy of vaporization \n", + "s1 = 0.059 \t\t\t#N/m , surface tension\n", + "Pr1 = 1.76 \t\t\t#Prandtl no.\n", + "#For saturated steam\n", + "rho2 = 0.5955\n", + "#For the pan\n", + "Csf = 0.013 \t\t\t#consmath.tant\n", + "n = 1. \t\t\t#exponent\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#from eq. 6.6 \t\t\t#heat flux\n", + "Qs1 = mu1*Lv1*(g*(rho1-rho2)/s1)**(1./2)*(cp1*Te/(Csf*Lv1*(Pr1)**n))**3\n", + "Rate = Qs1/Lv1 \t\t\t#kg/m**2 s. rate of boiling\n", + "Ap = math.pi/4*d**2 \t\t\t#m**2, pan area\n", + "Trate = Rate*Ap \t\t\t#kg/s, Total rate of boiling\n", + "Trate_ = Trate*3600.5 \t\t\t#kg/h. Total rate of boiling\n", + "print \"total rate of boiling of water is %.0f kg/h \"%(Trate_)\n", + "\n", + "#umath.sing Lienhard's eq., \t\t\t#critical heat flux\n", + "Qmax = 0.149*Lv1*rho2*(s1*g*(rho1-rho2)/(rho2)**2)**(1/4)\n", + "#by Mostinski eq.\n", + "Pc = 221.2 \t\t\t#critical pressure\n", + "Pr = p/Pc \t\t\t#reduced pressure\n", + "hb = 0.00341*(Pc)**(2.3)*Te**(2.33)*Pr**(0.566) \t\t\t#boiling heat transfer coefficient\n", + "hb_ = hb/1000 \t\t\t#kW/m**2 C boiling heat transfer coefficient\n", + "Qs2 = hb_*(Te)\n", + "print \"Qs2 compares reasonably well with the Qs1\"\n", + "\n", + "# note: rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total rate of boiling of water is 69 kg/h \n", + "Qs2 compares reasonably well with the Qs1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "A = 12.5673\n", + "B = 4234.6\n", + "pv = 1.813\n", + "T1 = 200. \t\t\t#C, tube wall temp.\n", + "#For methanol\n", + "Tc = 512.6 \t\t\t#K, critical temp.\n", + "w = 0.556 \t\t\t#acentric factor\n", + "Zra = 0.29056-0.08775*w\n", + "R = 0.08314 \t\t\t#m**3bar/gmol K, universal gas consmath.tant\n", + "Pc = 80.9 \t\t\t#bar, critical temp.\n", + "Mw = 32. \t\t\t#g, molecular wt\n", + "\n", + "#Calculation\n", + "#Estimation of liquid and vapour properties \n", + "#from antoine eq.\n", + "T = B/(A-math.log(pv)) \t\t\t#K, boiling point\n", + "Te = (T1+273)-T \t\t\t#K, excess temp.\n", + "Tm = ((T1+273)+T)/2 \t\t\t#K, mean temp.\n", + "#Liquid properties\n", + "#(a)\n", + "Tr = T/Tc \t\t\t#K, reduced temp.\n", + "#from Rackett technique\n", + "Vm = R*Tc*(Zra)**(1+(1-Tr)**(2/7))/Pc \t\t\t#m**3/kg mol, molar volume\n", + "rhol = Mw/Vm \t\t\t#kg/m**3, density of satorated liquid density\n", + "#(b)\n", + "#from Missenard technique\n", + "T2 = 348. \t\t\t#K,given data temp.\n", + "T3 = 373. \t\t\t#K,given data temp.\n", + "Cp2 = 107.5 \t\t\t#j/g mol K specific heat at T2\n", + "Cp3 = 119.4 \t\t\t#j/g mol K specific heat at T3\n", + "#By linear interpolation at T = 353.7 K\n", + "Cp = Cp2+(Cp3-Cp2)*((T-T2)/(T3-T2)) \t\t\t#kj/kg mol C, specific heat at T = 353.7 K\n", + "Cp_ = Cp*0.03125 \t\t\t#kj/kg C\n", + "#(c)Surface tension at given temp.(K)\n", + "T4 = 313.\n", + "St4 = 20.96\n", + "T5 = 333.\n", + "St5 = 19.4\n", + "#By linear interpolation at T = 353.7 K\n", + "S = 17.8 \t\t\t#dyne/cm, surface temp.\n", + "#(d) liquid vismath.cosity\n", + "T6 = 298. \n", + "MUt6 = 0.55 \t\t\t#cP, liquid vismath.cosity at temp = 298\n", + "MU = ((MUt6)**-0.2661+((T-T6)/233))**(-1/0.2661) \t\t\t#cP\n", + "#(e)Prandtl no. a,b,c are consmath.tant\n", + "a = 0.3225\n", + "b = -4.785*10**-4\n", + "c = 1.168*10**-7\n", + "kl = a+b*T+c*T**2 \t\t\t#W/m C, thermal conductivity\n", + "Prl = Cp_*1000*MU*10**-3/kl \t\t\t#Prandtl no.\n", + "#(f)heat of vaporization at 337.5 K\n", + "Lv = 1100. \t\t\t#kj/kg, enthalpy of vaporization\n", + "\n", + "#Properties of methanol vapour at Tm\n", + "#(a)\n", + "Vm1 = R*Tm/pv \t\t\t#m**3/kg mol, molar volume\n", + "rhov = Mw/Vm1 \t\t\t#kg/m**3, density of vapour\n", + "#(b) a1,b1,c1,d1 are math.cosmath.tants\n", + "a1 = -7.797*10**-3\n", + "b1 = 4.167*10**-5\n", + "c1 = 1.214*10**-7\n", + "d1 = -5.184*10**-11\n", + "#thermal conductivity of vapour\n", + "kv = a1+b1*Tm+c1*Tm**2+d1*Tm**3 \t\t\t#W/m C\n", + "#(c)heat capacity of vapour, a2,b2,c2,d2 are math.cosmath.tants\n", + "a2 = 21.15\n", + "b2 = 7.092*10**-2\n", + "c2 = 2.589*10**-5\n", + "d2 = -2.852*10**-8\n", + "#heat capacity of vapour, in kj/kh mol K\n", + "Cpv = a2+b2*Tm+c2*Tm**2+d2*Tm**3\n", + "\n", + "#(d)vismath.cosity of vapour\n", + "T7 = 67.\n", + "MUt7 = 112.\n", + "T8 = 127.\n", + "MUt8 = 132.\n", + "#from linear inter polation at Tm\n", + "MUv = 1.364*10**-5 \t\t\t#kg/m s\n", + "\n", + "#from Rohsenow's eq.\n", + "Csf = 0.027 \t\t\t#consmath.tant\n", + "n = 1.7 \t\t\t#exponent value\n", + "#from eq. 6.6\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "#heat flux \t\t\t#kW/m**2\n", + "Q = MU*10**-3*Lv*(g*(rhol-rhov)/S*10**-3)**(1./2)*(Cp_*Te/(Csf*Lv*(Prl)**n))**3\n", + "#from eq. 6.11\n", + "#from eq 6.11, critical heat flux\n", + "Qmax = 0.131*Lv*(rhov)**(1./2)*(S*10**-3*g*(rhol-rhov))**(1./4)\n", + "#dimensionless radius r_\n", + "r = 0.016\n", + "r_ = r*(g*(rhol-rhov)/(S*10**-3))**(1./2)\n", + "#peak heat flux\n", + "Qmax1 = Qmax*(0.89+2.27*math.exp(-3.44*math.sqrt(r_)))\n", + "#from eq. 6.12\n", + "#heat transfer coefficient hb\n", + "d = 0.032 \t\t\t#m, tube diameter\n", + "hb = 0.62*((kv**3)*rhov*(694-rhov)*g*(Lv*10**3+0.4*Cpv*Te)/(d*MUv*Te))**(1./4)\n", + "Qb = hb*Te \t\t\t#kw/m**2, heat flux\n", + "BR = Qb*10**-3/Lv \t\t\t#kg/m**2s, boilng rate \n", + "\n", + "# Results\n", + "print \"The boilins rate is %.0f kg/m**2 h\"%(BR*3600)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The boilins rate is 63 kg/m**2 h\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "W1 = 200. \t\t\t#kg/h, rate of entering toluene\n", + "muv = 10.**-5 \t\t\t#kg/m s, vismath.cosity of toluene vapour\n", + "mul = 2.31*10**-4 \t\t\t#kg/m s, vismath.cosity of benzene\n", + "rhol = 753. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 3.7 \t\t\t#kg/m**3, density of toluene vapour\n", + "Cpl = 1968. \t\t\t#j/kg C, specific heat of benzene\n", + "kl = 0.112 \t\t\t#W/m C, thermal conductivity of benzene\n", + "T1 = 160. \t\t\t#C tube wall temp.\n", + "T2 = 120. \t\t\t#C , saturated temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "Lv = 3.63*10**5 \t\t\t#j/kg, enthalpy of vaporization\n", + "s = 1.66*10**-2 \t\t\t#N/m, surface tension\n", + "\n", + "#Calculation of hc & hb\n", + "w = 0.125 \t\t\t#m, mean step size\n", + "d = 0.0211 \t\t\t#, internal diameter of tube\n", + "G = W1/(3600*math.pi/4*(d**2)) \t\t\t#kg/m**2 s, mass flow rate\n", + "Re1 = G*(1-w)*d/mul \t\t\t#Reynold no. \n", + "Prl = Cpl*mul/kl \t\t\t#Prandtl no.\n", + "#from eq. 6.23\n", + "x = (w/(1-w))**(0.9)*(rhol/rhov)**(0.5)*(muv/mul)**0.1 \t\t\t#let x = 1/succepsibility\n", + "#from eq. 6.22 \n", + "F = 2.35*(x+0.231)**0.736 \t\t\t#factor signifies 'liquid only reynold no.' to a two phase reynold no.\n", + "#from eq. 7.21\n", + "Re2 = 10**-4*Re1*F**1.25 \t\t\t#Reynold no.\n", + "#from eq. 6.18\n", + "S = (1+0.12*Re2**1.14)**-1 \t\t\t#boiling supression factor\n", + "#from eq. 6.15\n", + "hc = 0.023*Re1**(0.8)*Prl**(0.4)*(kl/d)*F \t\t\t#W/m**2 C, forced convection boiling part\n", + "#from eq. 6.16\n", + "mulv = (1/rhov)-(1/rhol) \t\t\t#m**3/kg, kinetic vismath.cosity of liquid vpaour\n", + "dpsat = Te*Lv/((T2+273)*mulv) \t\t\t#N/m**2, change in saturated presssure \n", + "#nucleate boiling part hb\n", + "hb = 1.218*10**-3*(kl**0.79*Cpl**0.45*rhol**0.49*Te**0.24*dpsat**0.75*S/(s**0.5*mul**0.29*Lv**0.24*rhov**0.24))\n", + "h = hc+hb \t\t\t#W/m**2 C, total heat transfer coefficient\n", + "\n", + "#calculation of required heat transfer area\n", + "a = 5. \t\t\t#%, persentage change in rate of vaporization\n", + "W2 = W1*a/100 \t\t\t#kg/h, rate of vaporization\n", + "W2_ = W2/3600 \t\t\t#kg/s\n", + "Q = W2_*Lv \t\t\t#W,heat load\n", + "A = Q/(h*Te) \t\t\t#m**2, area of heat transfer\n", + "l = A/(math.pi*d) \t\t\t#m, required length of tube\n", + "#from table 6.2\n", + "Tl = 0.393\n", + "\n", + "# Results\n", + "print \"The total tube length is %.3f m\"%(Tl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total tube length is 0.393 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "rhol = 483. \t\t\t#kg/m**3, density of liquid propane\n", + "mul = 9.1*10**-5 \t\t\t#P ,vismath.cosity of liquid propane\n", + "kl = 0.09 \t\t\t#W/m K, thermal conductivity of liquid propane\n", + "Lv = 326. \t\t\t#kj/kg. enthalpy of vaporization\n", + "Cpl = 2.61 \t\t\t#kj/kg K, specific heat of liquid propane\n", + "T1 = 32.\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "p1 = 11.2\n", + "rhov = 24.7 \t\t\t#kg/m**3, density of vapour\n", + "g = 9.8\n", + "h = 0.3\n", + "\n", + "#Calculation\n", + "Lv1 = Lv+0.68*Cpl*(T1-T2)\n", + "#h = 0.943*(g*Lv1*10**3*rhol*(rhol-rhov)*kl**3/(mul*L*(T1-T2)))**(1/4)\n", + "#Q = h*(L*1)*(T1-T2)\n", + "#m = Q/(Lv1*10**3) = 1.867*10**-2*L**(3/4)\n", + "Ref = 30.\n", + "#from the relation 4*m/mu = Re\n", + "L = (Ref*mul/(4*1.867*10**-2))**(4./3)\n", + "m = 1.867*10**-2*L**(3./4) \t\t\t#rate of condensation for laminar flow\n", + "#from eq. 6.32\n", + "#Nu1 = h_/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1/3) = Ref/(1.08*(Ref)**(1.22)-5.2)\n", + "Lp = h-L \t\t\t#length of plate over which flow is wavy\n", + "A = Lp*1 \t\t\t#m**2 area of condensation\n", + "\n", + "\n", + "def f(h1): \n", + " return h1/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1./3)-(29.76+0.262*h1)/(1.08*(29.76+0.262*h1)**(1.22)-5.2)\n", + "h1 = fsolve(f,1000)\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "Ref1 = 4*m2/mul\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "\n", + "# Results\n", + "print \"Total rate of condensation is %.2f kg/h\"%(m2*3600)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total rate of condensation is 33.08 kg/h\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#data fot TCE\n", + "T1 = 87.4 \t\t\t#C, normal boiling point\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "Lv = 320.8 \t\t\t#kj/kg, heat of vaporization\n", + "cp = 1.105 \t\t\t#kj/kg C, specific heat\n", + "mu = 0.45*10**-3 \t\t\t#P. liquid vismath.cosity\n", + "k = 0.1064 \t\t\t#W/m C, thermal conductivity\n", + "rhol = 1375. \t\t\t#kg/m**3, liquid density\n", + "rhov = 4.44 \t\t\t#kg/m**3, density of vapour\n", + "Tm = (T1+T2)/2. \t\t\t#C, mean film temp.\n", + "d = 0.0254 \t\t\t#m, outside diameter of tube\n", + "l = 0.7 \t\t\t#m, length\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#(a) from eq. 6.34\n", + "Lv1 = Lv+0.68*cp*(T1-T2)\n", + "h = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(mu*d*(T1-T2)))**(1./4)\n", + "A = math.pi*d*l \t\t\t#m**2, area of tube\n", + "Q = h*A*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m = (Q/Lv1)/1000 \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.1f kg/h \"%(m*3600)\n", + "\n", + "#(b) from eq. 6.35\n", + "N = 6. \t\t\t#No. of tubes in vertical tire\n", + "h1 = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(N*mu*d*(T1-T2)))**(1./4)\n", + "TN = 36. \t\t\t#total no. of tubes\n", + "TA = TN*math.pi*d*l \t\t\t#m**2, total area\n", + "Q1 = h1*TA*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m1 = (Q1/Lv1)/1000. \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.0f kg/h \"%(m1*3600)\n", + "#from chail's corelation\n", + "h2 = (1+0.2*cp*(T1-T2)*(N-1)/(Lv1))\n", + "print \"thus there will be increase in the calculated rate of\\\n", + " heat transfer and in rate of condensation as %.3f percent\"%(h2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of condensation is 45.7 kg/h \n", + "Rate of condensation is 1052 kg/h \n", + "thus there will be increase in the calculated rate of heat transfer and in rate of condensation as 1.188 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Gv = 20. \t\t\t#kg/m**2 s, mass flow rate of benzene\n", + "di = 0.016 \t\t\t#m, tube diameter\n", + "muv = 8.9*(10**-6) \t\t\t#P, vismath.cosity\n", + "Lv = 391. \t\t\t#kj/kg., enthalpy of vaporization\n", + "cpl = 1.94 \t\t\t#kj/kg C, specific heat\n", + "Tv = 80. \t\t\t#C, normal boiling point of benzene\n", + "Tw = 55. \t\t\t#C, wall temp.\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "rhol = 815. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 2.7 \t\t\t#kg/m**3, density of benzene vapour\n", + "kl = 0.13 \t\t\t#W/m C, thermal conductivity\n", + "mu = 3.81*10**-4 \t\t\t#P, vismath.cosity of benzene\n", + "l = 0.5 \t\t\t#m, length of tube\n", + "\n", + "#calculation\n", + "Rev = di*Gv/muv \t\t\t#Reynold no. of vapour\n", + "#from eq. 6.38\n", + "Lv1 = Lv+(3./8)*cpl*(Tv-Tw)\n", + "#heat transfer corfficient , h\n", + "h = 0.555*(g*rhol*(rhol-rhov)*kl**3*Lv1*10**3/(di*mu*(Tv-Tw)))**(1./4)\n", + "Aavl = math.pi*di*l \t\t\t#m**2, available area\n", + "Q = Aavl*h*(Tv-Tw) \t\t\t#W, rate of heat transfer\n", + "m = Q/(Lv1*10**3) \t\t\t#kg/s, rate of condensation of benzene\n", + "Ratei = Gv*(math.pi/4)*di**2 \t\t\t#kg/s rate of input of benzene vapour\n", + "n = m/Ratei \n", + "\n", + "# Results\n", + "print \"fraction of input vapour condensed is %.1f\"%(n*100)\n", + "\n", + "# note : rouding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of input vapour condensed is 52.7\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_1.ipynb new file mode 100755 index 00000000..7b5614ae --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_1.ipynb @@ -0,0 +1,566 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d82cfd91541c65bba1ace0c21d865a4857b26c181bd47207bd921aa71275599e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Boiling and condensation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "#(a)\n", + "Tsat = 350 \t\t\t#K, saturated temp.\n", + "Tl = Tsat+5 \t\t\t#K, liquid temp.\n", + "#By antoine eqn.\n", + "T = Tl-273 \t\t\t#C, \n", + "\n", + "# Calculations and Results\n", + "pl = math.exp(4.22658-(1244.95/(T+217.88)))\n", + "ST = 26.29-0.1161*T \t\t\t#dyne/cm, Surface tension of liquid\n", + "ST_ = ST*10**-3 \t\t\t#N/m Surface tension of liquid\n", + "Lv = 33605 \t\t\t#kj/kgmol, molar heat of vaporization\n", + "R = 0.08314 \t\t\t#m**3 bar/kgmol K, gas math.cosmath.tant\n", + "r = (2*ST_*R*Tsat**2)/((Tl-Tsat)*pl*(Lv*10**3))\n", + "print \"So a bubble nucleus that has been detached from a cavity will not collapse in \\\n", + "the liquid if it is larger than %.2f micrometer \"%(r*10**6)\n", + "\n", + "#(b)\n", + "r1 = 10**-6 \t\t\t#m\n", + "#pl1 = exp(4.22658-(1244.95/(Tl_-273+217.88))) \t\t\t#vapour pressure\n", + "#ST1 = 0.02629-1.161*10**-4(Tl_-273) \t\t\t#surface tension\n", + "\n", + "def f(Tl): \n", + " return (Tl-Tsat)-2*(0.02629-1.161*10**-4*(Tl-273))*R*Tsat**2/(r1*Lv*10.**3)\n", + "Tl = fsolve(f,0.1)\n", + "T_ = (Tl-273.5)-(Tsat-273)\n", + "print \"The superheat of the liquid is %d C\"%(T_)\n", + "\n", + "# note : answers are slightly different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "So a bubble nucleus that has been detached from a cavity will not collapse in the liquid if it is larger than 1.89 micrometer \n", + "The superheat of the liquid is 9 C\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/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": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 0.35 \t\t\t#m, diameter of pan\n", + "p = 1.013 \t\t\t#bar, pressure\n", + "T1 = 115. \t\t\t#C, bottom temp.\n", + "T2 = 100. \t\t\t#C, boiling temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "#For Water\n", + "mu1 = 2.70*10**-4 \t\t\t#Ns/m**2, vismath.cosity\n", + "cp1 = 4.22 \t\t\t#kj/kg C, specific heat\n", + "rho1 = 958. \t\t\t#kg/m63. density\n", + "Lv1 = 2257. \t\t\t#kj/kg, enthalpy of vaporization \n", + "s1 = 0.059 \t\t\t#N/m , surface tension\n", + "Pr1 = 1.76 \t\t\t#Prandtl no.\n", + "#For saturated steam\n", + "rho2 = 0.5955\n", + "#For the pan\n", + "Csf = 0.013 \t\t\t#consmath.tant\n", + "n = 1. \t\t\t#exponent\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#from eq. 6.6 \t\t\t#heat flux\n", + "Qs1 = mu1*Lv1*(g*(rho1-rho2)/s1)**(1./2)*(cp1*Te/(Csf*Lv1*(Pr1)**n))**3\n", + "Rate = Qs1/Lv1 \t\t\t#kg/m**2 s. rate of boiling\n", + "Ap = math.pi/4*d**2 \t\t\t#m**2, pan area\n", + "Trate = Rate*Ap \t\t\t#kg/s, Total rate of boiling\n", + "Trate_ = Trate*3600.5 \t\t\t#kg/h. Total rate of boiling\n", + "print \"total rate of boiling of water is %.0f kg/h \"%(Trate_)\n", + "\n", + "#umath.sing Lienhard's eq., \t\t\t#critical heat flux\n", + "Qmax = 0.149*Lv1*rho2*(s1*g*(rho1-rho2)/(rho2)**2)**(1/4)\n", + "#by Mostinski eq.\n", + "Pc = 221.2 \t\t\t#critical pressure\n", + "Pr = p/Pc \t\t\t#reduced pressure\n", + "hb = 0.00341*(Pc)**(2.3)*Te**(2.33)*Pr**(0.566) \t\t\t#boiling heat transfer coefficient\n", + "hb_ = hb/1000 \t\t\t#kW/m**2 C boiling heat transfer coefficient\n", + "Qs2 = hb_*(Te)\n", + "print \"Qs2 compares reasonably well with the Qs1\"\n", + "\n", + "# note: rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total rate of boiling of water is 69 kg/h \n", + "Qs2 compares reasonably well with the Qs1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "A = 12.5673\n", + "B = 4234.6\n", + "pv = 1.813\n", + "T1 = 200. \t\t\t#C, tube wall temp.\n", + "#For methanol\n", + "Tc = 512.6 \t\t\t#K, critical temp.\n", + "w = 0.556 \t\t\t#acentric factor\n", + "Zra = 0.29056-0.08775*w\n", + "R = 0.08314 \t\t\t#m**3bar/gmol K, universal gas consmath.tant\n", + "Pc = 80.9 \t\t\t#bar, critical temp.\n", + "Mw = 32. \t\t\t#g, molecular wt\n", + "\n", + "#Calculation\n", + "#Estimation of liquid and vapour properties \n", + "#from antoine eq.\n", + "T = B/(A-math.log(pv)) \t\t\t#K, boiling point\n", + "Te = (T1+273)-T \t\t\t#K, excess temp.\n", + "Tm = ((T1+273)+T)/2 \t\t\t#K, mean temp.\n", + "#Liquid properties\n", + "#(a)\n", + "Tr = T/Tc \t\t\t#K, reduced temp.\n", + "#from Rackett technique\n", + "Vm = R*Tc*(Zra)**(1+(1-Tr)**(2/7))/Pc \t\t\t#m**3/kg mol, molar volume\n", + "rhol = Mw/Vm \t\t\t#kg/m**3, density of satorated liquid density\n", + "#(b)\n", + "#from Missenard technique\n", + "T2 = 348. \t\t\t#K,given data temp.\n", + "T3 = 373. \t\t\t#K,given data temp.\n", + "Cp2 = 107.5 \t\t\t#j/g mol K specific heat at T2\n", + "Cp3 = 119.4 \t\t\t#j/g mol K specific heat at T3\n", + "#By linear interpolation at T = 353.7 K\n", + "Cp = Cp2+(Cp3-Cp2)*((T-T2)/(T3-T2)) \t\t\t#kj/kg mol C, specific heat at T = 353.7 K\n", + "Cp_ = Cp*0.03125 \t\t\t#kj/kg C\n", + "#(c)Surface tension at given temp.(K)\n", + "T4 = 313.\n", + "St4 = 20.96\n", + "T5 = 333.\n", + "St5 = 19.4\n", + "#By linear interpolation at T = 353.7 K\n", + "S = 17.8 \t\t\t#dyne/cm, surface temp.\n", + "#(d) liquid vismath.cosity\n", + "T6 = 298. \n", + "MUt6 = 0.55 \t\t\t#cP, liquid vismath.cosity at temp = 298\n", + "MU = ((MUt6)**-0.2661+((T-T6)/233))**(-1/0.2661) \t\t\t#cP\n", + "#(e)Prandtl no. a,b,c are consmath.tant\n", + "a = 0.3225\n", + "b = -4.785*10**-4\n", + "c = 1.168*10**-7\n", + "kl = a+b*T+c*T**2 \t\t\t#W/m C, thermal conductivity\n", + "Prl = Cp_*1000*MU*10**-3/kl \t\t\t#Prandtl no.\n", + "#(f)heat of vaporization at 337.5 K\n", + "Lv = 1100. \t\t\t#kj/kg, enthalpy of vaporization\n", + "\n", + "#Properties of methanol vapour at Tm\n", + "#(a)\n", + "Vm1 = R*Tm/pv \t\t\t#m**3/kg mol, molar volume\n", + "rhov = Mw/Vm1 \t\t\t#kg/m**3, density of vapour\n", + "#(b) a1,b1,c1,d1 are math.cosmath.tants\n", + "a1 = -7.797*10**-3\n", + "b1 = 4.167*10**-5\n", + "c1 = 1.214*10**-7\n", + "d1 = -5.184*10**-11\n", + "#thermal conductivity of vapour\n", + "kv = a1+b1*Tm+c1*Tm**2+d1*Tm**3 \t\t\t#W/m C\n", + "#(c)heat capacity of vapour, a2,b2,c2,d2 are math.cosmath.tants\n", + "a2 = 21.15\n", + "b2 = 7.092*10**-2\n", + "c2 = 2.589*10**-5\n", + "d2 = -2.852*10**-8\n", + "#heat capacity of vapour, in kj/kh mol K\n", + "Cpv = a2+b2*Tm+c2*Tm**2+d2*Tm**3\n", + "\n", + "#(d)vismath.cosity of vapour\n", + "T7 = 67.\n", + "MUt7 = 112.\n", + "T8 = 127.\n", + "MUt8 = 132.\n", + "#from linear inter polation at Tm\n", + "MUv = 1.364*10**-5 \t\t\t#kg/m s\n", + "\n", + "#from Rohsenow's eq.\n", + "Csf = 0.027 \t\t\t#consmath.tant\n", + "n = 1.7 \t\t\t#exponent value\n", + "#from eq. 6.6\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "#heat flux \t\t\t#kW/m**2\n", + "Q = MU*10**-3*Lv*(g*(rhol-rhov)/S*10**-3)**(1./2)*(Cp_*Te/(Csf*Lv*(Prl)**n))**3\n", + "#from eq. 6.11\n", + "#from eq 6.11, critical heat flux\n", + "Qmax = 0.131*Lv*(rhov)**(1./2)*(S*10**-3*g*(rhol-rhov))**(1./4)\n", + "#dimensionless radius r_\n", + "r = 0.016\n", + "r_ = r*(g*(rhol-rhov)/(S*10**-3))**(1./2)\n", + "#peak heat flux\n", + "Qmax1 = Qmax*(0.89+2.27*math.exp(-3.44*math.sqrt(r_)))\n", + "#from eq. 6.12\n", + "#heat transfer coefficient hb\n", + "d = 0.032 \t\t\t#m, tube diameter\n", + "hb = 0.62*((kv**3)*rhov*(694-rhov)*g*(Lv*10**3+0.4*Cpv*Te)/(d*MUv*Te))**(1./4)\n", + "Qb = hb*Te \t\t\t#kw/m**2, heat flux\n", + "BR = Qb*10**-3/Lv \t\t\t#kg/m**2s, boilng rate \n", + "\n", + "# Results\n", + "print \"The boilins rate is %.0f kg/m**2 h\"%(BR*3600)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The boilins rate is 63 kg/m**2 h\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "W1 = 200. \t\t\t#kg/h, rate of entering toluene\n", + "muv = 10.**-5 \t\t\t#kg/m s, vismath.cosity of toluene vapour\n", + "mul = 2.31*10**-4 \t\t\t#kg/m s, vismath.cosity of benzene\n", + "rhol = 753. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 3.7 \t\t\t#kg/m**3, density of toluene vapour\n", + "Cpl = 1968. \t\t\t#j/kg C, specific heat of benzene\n", + "kl = 0.112 \t\t\t#W/m C, thermal conductivity of benzene\n", + "T1 = 160. \t\t\t#C tube wall temp.\n", + "T2 = 120. \t\t\t#C , saturated temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "Lv = 3.63*10**5 \t\t\t#j/kg, enthalpy of vaporization\n", + "s = 1.66*10**-2 \t\t\t#N/m, surface tension\n", + "\n", + "#Calculation of hc & hb\n", + "w = 0.125 \t\t\t#m, mean step size\n", + "d = 0.0211 \t\t\t#, internal diameter of tube\n", + "G = W1/(3600*math.pi/4*(d**2)) \t\t\t#kg/m**2 s, mass flow rate\n", + "Re1 = G*(1-w)*d/mul \t\t\t#Reynold no. \n", + "Prl = Cpl*mul/kl \t\t\t#Prandtl no.\n", + "#from eq. 6.23\n", + "x = (w/(1-w))**(0.9)*(rhol/rhov)**(0.5)*(muv/mul)**0.1 \t\t\t#let x = 1/succepsibility\n", + "#from eq. 6.22 \n", + "F = 2.35*(x+0.231)**0.736 \t\t\t#factor signifies 'liquid only reynold no.' to a two phase reynold no.\n", + "#from eq. 7.21\n", + "Re2 = 10**-4*Re1*F**1.25 \t\t\t#Reynold no.\n", + "#from eq. 6.18\n", + "S = (1+0.12*Re2**1.14)**-1 \t\t\t#boiling supression factor\n", + "#from eq. 6.15\n", + "hc = 0.023*Re1**(0.8)*Prl**(0.4)*(kl/d)*F \t\t\t#W/m**2 C, forced convection boiling part\n", + "#from eq. 6.16\n", + "mulv = (1/rhov)-(1/rhol) \t\t\t#m**3/kg, kinetic vismath.cosity of liquid vpaour\n", + "dpsat = Te*Lv/((T2+273)*mulv) \t\t\t#N/m**2, change in saturated presssure \n", + "#nucleate boiling part hb\n", + "hb = 1.218*10**-3*(kl**0.79*Cpl**0.45*rhol**0.49*Te**0.24*dpsat**0.75*S/(s**0.5*mul**0.29*Lv**0.24*rhov**0.24))\n", + "h = hc+hb \t\t\t#W/m**2 C, total heat transfer coefficient\n", + "\n", + "#calculation of required heat transfer area\n", + "a = 5. \t\t\t#%, persentage change in rate of vaporization\n", + "W2 = W1*a/100 \t\t\t#kg/h, rate of vaporization\n", + "W2_ = W2/3600 \t\t\t#kg/s\n", + "Q = W2_*Lv \t\t\t#W,heat load\n", + "A = Q/(h*Te) \t\t\t#m**2, area of heat transfer\n", + "l = A/(math.pi*d) \t\t\t#m, required length of tube\n", + "#from table 6.2\n", + "Tl = 0.393\n", + "\n", + "# Results\n", + "print \"The total tube length is %.3f m\"%(Tl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total tube length is 0.393 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "rhol = 483. \t\t\t#kg/m**3, density of liquid propane\n", + "mul = 9.1*10**-5 \t\t\t#P ,vismath.cosity of liquid propane\n", + "kl = 0.09 \t\t\t#W/m K, thermal conductivity of liquid propane\n", + "Lv = 326. \t\t\t#kj/kg. enthalpy of vaporization\n", + "Cpl = 2.61 \t\t\t#kj/kg K, specific heat of liquid propane\n", + "T1 = 32.\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "p1 = 11.2\n", + "rhov = 24.7 \t\t\t#kg/m**3, density of vapour\n", + "g = 9.8\n", + "h = 0.3\n", + "\n", + "#Calculation\n", + "Lv1 = Lv+0.68*Cpl*(T1-T2)\n", + "#h = 0.943*(g*Lv1*10**3*rhol*(rhol-rhov)*kl**3/(mul*L*(T1-T2)))**(1/4)\n", + "#Q = h*(L*1)*(T1-T2)\n", + "#m = Q/(Lv1*10**3) = 1.867*10**-2*L**(3/4)\n", + "Ref = 30.\n", + "#from the relation 4*m/mu = Re\n", + "L = (Ref*mul/(4*1.867*10**-2))**(4./3)\n", + "m = 1.867*10**-2*L**(3./4) \t\t\t#rate of condensation for laminar flow\n", + "#from eq. 6.32\n", + "#Nu1 = h_/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1/3) = Ref/(1.08*(Ref)**(1.22)-5.2)\n", + "Lp = h-L \t\t\t#length of plate over which flow is wavy\n", + "A = Lp*1 \t\t\t#m**2 area of condensation\n", + "\n", + "\n", + "def f(h1): \n", + " return h1/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1./3)-(29.76+0.262*h1)/(1.08*(29.76+0.262*h1)**(1.22)-5.2)\n", + "h1 = fsolve(f,1000)\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "Ref1 = 4*m2/mul\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "\n", + "# Results\n", + "print \"Total rate of condensation is %.2f kg/h\"%(m2*3600)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total rate of condensation is 33.08 kg/h\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#data fot TCE\n", + "T1 = 87.4 \t\t\t#C, normal boiling point\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "Lv = 320.8 \t\t\t#kj/kg, heat of vaporization\n", + "cp = 1.105 \t\t\t#kj/kg C, specific heat\n", + "mu = 0.45*10**-3 \t\t\t#P. liquid vismath.cosity\n", + "k = 0.1064 \t\t\t#W/m C, thermal conductivity\n", + "rhol = 1375. \t\t\t#kg/m**3, liquid density\n", + "rhov = 4.44 \t\t\t#kg/m**3, density of vapour\n", + "Tm = (T1+T2)/2. \t\t\t#C, mean film temp.\n", + "d = 0.0254 \t\t\t#m, outside diameter of tube\n", + "l = 0.7 \t\t\t#m, length\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#(a) from eq. 6.34\n", + "Lv1 = Lv+0.68*cp*(T1-T2)\n", + "h = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(mu*d*(T1-T2)))**(1./4)\n", + "A = math.pi*d*l \t\t\t#m**2, area of tube\n", + "Q = h*A*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m = (Q/Lv1)/1000 \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.1f kg/h \"%(m*3600)\n", + "\n", + "#(b) from eq. 6.35\n", + "N = 6. \t\t\t#No. of tubes in vertical tire\n", + "h1 = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(N*mu*d*(T1-T2)))**(1./4)\n", + "TN = 36. \t\t\t#total no. of tubes\n", + "TA = TN*math.pi*d*l \t\t\t#m**2, total area\n", + "Q1 = h1*TA*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m1 = (Q1/Lv1)/1000. \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.0f kg/h \"%(m1*3600)\n", + "#from chail's corelation\n", + "h2 = (1+0.2*cp*(T1-T2)*(N-1)/(Lv1))\n", + "print \"thus there will be increase in the calculated rate of\\\n", + " heat transfer and in rate of condensation as %.3f percent\"%(h2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of condensation is 45.7 kg/h \n", + "Rate of condensation is 1052 kg/h \n", + "thus there will be increase in the calculated rate of heat transfer and in rate of condensation as 1.188 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Gv = 20. \t\t\t#kg/m**2 s, mass flow rate of benzene\n", + "di = 0.016 \t\t\t#m, tube diameter\n", + "muv = 8.9*(10**-6) \t\t\t#P, vismath.cosity\n", + "Lv = 391. \t\t\t#kj/kg., enthalpy of vaporization\n", + "cpl = 1.94 \t\t\t#kj/kg C, specific heat\n", + "Tv = 80. \t\t\t#C, normal boiling point of benzene\n", + "Tw = 55. \t\t\t#C, wall temp.\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "rhol = 815. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 2.7 \t\t\t#kg/m**3, density of benzene vapour\n", + "kl = 0.13 \t\t\t#W/m C, thermal conductivity\n", + "mu = 3.81*10**-4 \t\t\t#P, vismath.cosity of benzene\n", + "l = 0.5 \t\t\t#m, length of tube\n", + "\n", + "#calculation\n", + "Rev = di*Gv/muv \t\t\t#Reynold no. of vapour\n", + "#from eq. 6.38\n", + "Lv1 = Lv+(3./8)*cpl*(Tv-Tw)\n", + "#heat transfer corfficient , h\n", + "h = 0.555*(g*rhol*(rhol-rhov)*kl**3*Lv1*10**3/(di*mu*(Tv-Tw)))**(1./4)\n", + "Aavl = math.pi*di*l \t\t\t#m**2, available area\n", + "Q = Aavl*h*(Tv-Tw) \t\t\t#W, rate of heat transfer\n", + "m = Q/(Lv1*10**3) \t\t\t#kg/s, rate of condensation of benzene\n", + "Ratei = Gv*(math.pi/4)*di**2 \t\t\t#kg/s rate of input of benzene vapour\n", + "n = m/Ratei \n", + "\n", + "# Results\n", + "print \"fraction of input vapour condensed is %.1f\"%(n*100)\n", + "\n", + "# note : rouding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of input vapour condensed is 52.7\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_2.ipynb new file mode 100755 index 00000000..7b5614ae --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch6_2.ipynb @@ -0,0 +1,566 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d82cfd91541c65bba1ace0c21d865a4857b26c181bd47207bd921aa71275599e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Boiling and condensation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "#(a)\n", + "Tsat = 350 \t\t\t#K, saturated temp.\n", + "Tl = Tsat+5 \t\t\t#K, liquid temp.\n", + "#By antoine eqn.\n", + "T = Tl-273 \t\t\t#C, \n", + "\n", + "# Calculations and Results\n", + "pl = math.exp(4.22658-(1244.95/(T+217.88)))\n", + "ST = 26.29-0.1161*T \t\t\t#dyne/cm, Surface tension of liquid\n", + "ST_ = ST*10**-3 \t\t\t#N/m Surface tension of liquid\n", + "Lv = 33605 \t\t\t#kj/kgmol, molar heat of vaporization\n", + "R = 0.08314 \t\t\t#m**3 bar/kgmol K, gas math.cosmath.tant\n", + "r = (2*ST_*R*Tsat**2)/((Tl-Tsat)*pl*(Lv*10**3))\n", + "print \"So a bubble nucleus that has been detached from a cavity will not collapse in \\\n", + "the liquid if it is larger than %.2f micrometer \"%(r*10**6)\n", + "\n", + "#(b)\n", + "r1 = 10**-6 \t\t\t#m\n", + "#pl1 = exp(4.22658-(1244.95/(Tl_-273+217.88))) \t\t\t#vapour pressure\n", + "#ST1 = 0.02629-1.161*10**-4(Tl_-273) \t\t\t#surface tension\n", + "\n", + "def f(Tl): \n", + " return (Tl-Tsat)-2*(0.02629-1.161*10**-4*(Tl-273))*R*Tsat**2/(r1*Lv*10.**3)\n", + "Tl = fsolve(f,0.1)\n", + "T_ = (Tl-273.5)-(Tsat-273)\n", + "print \"The superheat of the liquid is %d C\"%(T_)\n", + "\n", + "# note : answers are slightly different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "So a bubble nucleus that has been detached from a cavity will not collapse in the liquid if it is larger than 1.89 micrometer \n", + "The superheat of the liquid is 9 C\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/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": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 0.35 \t\t\t#m, diameter of pan\n", + "p = 1.013 \t\t\t#bar, pressure\n", + "T1 = 115. \t\t\t#C, bottom temp.\n", + "T2 = 100. \t\t\t#C, boiling temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "#For Water\n", + "mu1 = 2.70*10**-4 \t\t\t#Ns/m**2, vismath.cosity\n", + "cp1 = 4.22 \t\t\t#kj/kg C, specific heat\n", + "rho1 = 958. \t\t\t#kg/m63. density\n", + "Lv1 = 2257. \t\t\t#kj/kg, enthalpy of vaporization \n", + "s1 = 0.059 \t\t\t#N/m , surface tension\n", + "Pr1 = 1.76 \t\t\t#Prandtl no.\n", + "#For saturated steam\n", + "rho2 = 0.5955\n", + "#For the pan\n", + "Csf = 0.013 \t\t\t#consmath.tant\n", + "n = 1. \t\t\t#exponent\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#from eq. 6.6 \t\t\t#heat flux\n", + "Qs1 = mu1*Lv1*(g*(rho1-rho2)/s1)**(1./2)*(cp1*Te/(Csf*Lv1*(Pr1)**n))**3\n", + "Rate = Qs1/Lv1 \t\t\t#kg/m**2 s. rate of boiling\n", + "Ap = math.pi/4*d**2 \t\t\t#m**2, pan area\n", + "Trate = Rate*Ap \t\t\t#kg/s, Total rate of boiling\n", + "Trate_ = Trate*3600.5 \t\t\t#kg/h. Total rate of boiling\n", + "print \"total rate of boiling of water is %.0f kg/h \"%(Trate_)\n", + "\n", + "#umath.sing Lienhard's eq., \t\t\t#critical heat flux\n", + "Qmax = 0.149*Lv1*rho2*(s1*g*(rho1-rho2)/(rho2)**2)**(1/4)\n", + "#by Mostinski eq.\n", + "Pc = 221.2 \t\t\t#critical pressure\n", + "Pr = p/Pc \t\t\t#reduced pressure\n", + "hb = 0.00341*(Pc)**(2.3)*Te**(2.33)*Pr**(0.566) \t\t\t#boiling heat transfer coefficient\n", + "hb_ = hb/1000 \t\t\t#kW/m**2 C boiling heat transfer coefficient\n", + "Qs2 = hb_*(Te)\n", + "print \"Qs2 compares reasonably well with the Qs1\"\n", + "\n", + "# note: rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total rate of boiling of water is 69 kg/h \n", + "Qs2 compares reasonably well with the Qs1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "A = 12.5673\n", + "B = 4234.6\n", + "pv = 1.813\n", + "T1 = 200. \t\t\t#C, tube wall temp.\n", + "#For methanol\n", + "Tc = 512.6 \t\t\t#K, critical temp.\n", + "w = 0.556 \t\t\t#acentric factor\n", + "Zra = 0.29056-0.08775*w\n", + "R = 0.08314 \t\t\t#m**3bar/gmol K, universal gas consmath.tant\n", + "Pc = 80.9 \t\t\t#bar, critical temp.\n", + "Mw = 32. \t\t\t#g, molecular wt\n", + "\n", + "#Calculation\n", + "#Estimation of liquid and vapour properties \n", + "#from antoine eq.\n", + "T = B/(A-math.log(pv)) \t\t\t#K, boiling point\n", + "Te = (T1+273)-T \t\t\t#K, excess temp.\n", + "Tm = ((T1+273)+T)/2 \t\t\t#K, mean temp.\n", + "#Liquid properties\n", + "#(a)\n", + "Tr = T/Tc \t\t\t#K, reduced temp.\n", + "#from Rackett technique\n", + "Vm = R*Tc*(Zra)**(1+(1-Tr)**(2/7))/Pc \t\t\t#m**3/kg mol, molar volume\n", + "rhol = Mw/Vm \t\t\t#kg/m**3, density of satorated liquid density\n", + "#(b)\n", + "#from Missenard technique\n", + "T2 = 348. \t\t\t#K,given data temp.\n", + "T3 = 373. \t\t\t#K,given data temp.\n", + "Cp2 = 107.5 \t\t\t#j/g mol K specific heat at T2\n", + "Cp3 = 119.4 \t\t\t#j/g mol K specific heat at T3\n", + "#By linear interpolation at T = 353.7 K\n", + "Cp = Cp2+(Cp3-Cp2)*((T-T2)/(T3-T2)) \t\t\t#kj/kg mol C, specific heat at T = 353.7 K\n", + "Cp_ = Cp*0.03125 \t\t\t#kj/kg C\n", + "#(c)Surface tension at given temp.(K)\n", + "T4 = 313.\n", + "St4 = 20.96\n", + "T5 = 333.\n", + "St5 = 19.4\n", + "#By linear interpolation at T = 353.7 K\n", + "S = 17.8 \t\t\t#dyne/cm, surface temp.\n", + "#(d) liquid vismath.cosity\n", + "T6 = 298. \n", + "MUt6 = 0.55 \t\t\t#cP, liquid vismath.cosity at temp = 298\n", + "MU = ((MUt6)**-0.2661+((T-T6)/233))**(-1/0.2661) \t\t\t#cP\n", + "#(e)Prandtl no. a,b,c are consmath.tant\n", + "a = 0.3225\n", + "b = -4.785*10**-4\n", + "c = 1.168*10**-7\n", + "kl = a+b*T+c*T**2 \t\t\t#W/m C, thermal conductivity\n", + "Prl = Cp_*1000*MU*10**-3/kl \t\t\t#Prandtl no.\n", + "#(f)heat of vaporization at 337.5 K\n", + "Lv = 1100. \t\t\t#kj/kg, enthalpy of vaporization\n", + "\n", + "#Properties of methanol vapour at Tm\n", + "#(a)\n", + "Vm1 = R*Tm/pv \t\t\t#m**3/kg mol, molar volume\n", + "rhov = Mw/Vm1 \t\t\t#kg/m**3, density of vapour\n", + "#(b) a1,b1,c1,d1 are math.cosmath.tants\n", + "a1 = -7.797*10**-3\n", + "b1 = 4.167*10**-5\n", + "c1 = 1.214*10**-7\n", + "d1 = -5.184*10**-11\n", + "#thermal conductivity of vapour\n", + "kv = a1+b1*Tm+c1*Tm**2+d1*Tm**3 \t\t\t#W/m C\n", + "#(c)heat capacity of vapour, a2,b2,c2,d2 are math.cosmath.tants\n", + "a2 = 21.15\n", + "b2 = 7.092*10**-2\n", + "c2 = 2.589*10**-5\n", + "d2 = -2.852*10**-8\n", + "#heat capacity of vapour, in kj/kh mol K\n", + "Cpv = a2+b2*Tm+c2*Tm**2+d2*Tm**3\n", + "\n", + "#(d)vismath.cosity of vapour\n", + "T7 = 67.\n", + "MUt7 = 112.\n", + "T8 = 127.\n", + "MUt8 = 132.\n", + "#from linear inter polation at Tm\n", + "MUv = 1.364*10**-5 \t\t\t#kg/m s\n", + "\n", + "#from Rohsenow's eq.\n", + "Csf = 0.027 \t\t\t#consmath.tant\n", + "n = 1.7 \t\t\t#exponent value\n", + "#from eq. 6.6\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "#heat flux \t\t\t#kW/m**2\n", + "Q = MU*10**-3*Lv*(g*(rhol-rhov)/S*10**-3)**(1./2)*(Cp_*Te/(Csf*Lv*(Prl)**n))**3\n", + "#from eq. 6.11\n", + "#from eq 6.11, critical heat flux\n", + "Qmax = 0.131*Lv*(rhov)**(1./2)*(S*10**-3*g*(rhol-rhov))**(1./4)\n", + "#dimensionless radius r_\n", + "r = 0.016\n", + "r_ = r*(g*(rhol-rhov)/(S*10**-3))**(1./2)\n", + "#peak heat flux\n", + "Qmax1 = Qmax*(0.89+2.27*math.exp(-3.44*math.sqrt(r_)))\n", + "#from eq. 6.12\n", + "#heat transfer coefficient hb\n", + "d = 0.032 \t\t\t#m, tube diameter\n", + "hb = 0.62*((kv**3)*rhov*(694-rhov)*g*(Lv*10**3+0.4*Cpv*Te)/(d*MUv*Te))**(1./4)\n", + "Qb = hb*Te \t\t\t#kw/m**2, heat flux\n", + "BR = Qb*10**-3/Lv \t\t\t#kg/m**2s, boilng rate \n", + "\n", + "# Results\n", + "print \"The boilins rate is %.0f kg/m**2 h\"%(BR*3600)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The boilins rate is 63 kg/m**2 h\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "W1 = 200. \t\t\t#kg/h, rate of entering toluene\n", + "muv = 10.**-5 \t\t\t#kg/m s, vismath.cosity of toluene vapour\n", + "mul = 2.31*10**-4 \t\t\t#kg/m s, vismath.cosity of benzene\n", + "rhol = 753. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 3.7 \t\t\t#kg/m**3, density of toluene vapour\n", + "Cpl = 1968. \t\t\t#j/kg C, specific heat of benzene\n", + "kl = 0.112 \t\t\t#W/m C, thermal conductivity of benzene\n", + "T1 = 160. \t\t\t#C tube wall temp.\n", + "T2 = 120. \t\t\t#C , saturated temp.\n", + "Te = T1-T2 \t\t\t#C, excess temp.\n", + "Lv = 3.63*10**5 \t\t\t#j/kg, enthalpy of vaporization\n", + "s = 1.66*10**-2 \t\t\t#N/m, surface tension\n", + "\n", + "#Calculation of hc & hb\n", + "w = 0.125 \t\t\t#m, mean step size\n", + "d = 0.0211 \t\t\t#, internal diameter of tube\n", + "G = W1/(3600*math.pi/4*(d**2)) \t\t\t#kg/m**2 s, mass flow rate\n", + "Re1 = G*(1-w)*d/mul \t\t\t#Reynold no. \n", + "Prl = Cpl*mul/kl \t\t\t#Prandtl no.\n", + "#from eq. 6.23\n", + "x = (w/(1-w))**(0.9)*(rhol/rhov)**(0.5)*(muv/mul)**0.1 \t\t\t#let x = 1/succepsibility\n", + "#from eq. 6.22 \n", + "F = 2.35*(x+0.231)**0.736 \t\t\t#factor signifies 'liquid only reynold no.' to a two phase reynold no.\n", + "#from eq. 7.21\n", + "Re2 = 10**-4*Re1*F**1.25 \t\t\t#Reynold no.\n", + "#from eq. 6.18\n", + "S = (1+0.12*Re2**1.14)**-1 \t\t\t#boiling supression factor\n", + "#from eq. 6.15\n", + "hc = 0.023*Re1**(0.8)*Prl**(0.4)*(kl/d)*F \t\t\t#W/m**2 C, forced convection boiling part\n", + "#from eq. 6.16\n", + "mulv = (1/rhov)-(1/rhol) \t\t\t#m**3/kg, kinetic vismath.cosity of liquid vpaour\n", + "dpsat = Te*Lv/((T2+273)*mulv) \t\t\t#N/m**2, change in saturated presssure \n", + "#nucleate boiling part hb\n", + "hb = 1.218*10**-3*(kl**0.79*Cpl**0.45*rhol**0.49*Te**0.24*dpsat**0.75*S/(s**0.5*mul**0.29*Lv**0.24*rhov**0.24))\n", + "h = hc+hb \t\t\t#W/m**2 C, total heat transfer coefficient\n", + "\n", + "#calculation of required heat transfer area\n", + "a = 5. \t\t\t#%, persentage change in rate of vaporization\n", + "W2 = W1*a/100 \t\t\t#kg/h, rate of vaporization\n", + "W2_ = W2/3600 \t\t\t#kg/s\n", + "Q = W2_*Lv \t\t\t#W,heat load\n", + "A = Q/(h*Te) \t\t\t#m**2, area of heat transfer\n", + "l = A/(math.pi*d) \t\t\t#m, required length of tube\n", + "#from table 6.2\n", + "Tl = 0.393\n", + "\n", + "# Results\n", + "print \"The total tube length is %.3f m\"%(Tl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total tube length is 0.393 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "rhol = 483. \t\t\t#kg/m**3, density of liquid propane\n", + "mul = 9.1*10**-5 \t\t\t#P ,vismath.cosity of liquid propane\n", + "kl = 0.09 \t\t\t#W/m K, thermal conductivity of liquid propane\n", + "Lv = 326. \t\t\t#kj/kg. enthalpy of vaporization\n", + "Cpl = 2.61 \t\t\t#kj/kg K, specific heat of liquid propane\n", + "T1 = 32.\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "p1 = 11.2\n", + "rhov = 24.7 \t\t\t#kg/m**3, density of vapour\n", + "g = 9.8\n", + "h = 0.3\n", + "\n", + "#Calculation\n", + "Lv1 = Lv+0.68*Cpl*(T1-T2)\n", + "#h = 0.943*(g*Lv1*10**3*rhol*(rhol-rhov)*kl**3/(mul*L*(T1-T2)))**(1/4)\n", + "#Q = h*(L*1)*(T1-T2)\n", + "#m = Q/(Lv1*10**3) = 1.867*10**-2*L**(3/4)\n", + "Ref = 30.\n", + "#from the relation 4*m/mu = Re\n", + "L = (Ref*mul/(4*1.867*10**-2))**(4./3)\n", + "m = 1.867*10**-2*L**(3./4) \t\t\t#rate of condensation for laminar flow\n", + "#from eq. 6.32\n", + "#Nu1 = h_/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1/3) = Ref/(1.08*(Ref)**(1.22)-5.2)\n", + "Lp = h-L \t\t\t#length of plate over which flow is wavy\n", + "A = Lp*1 \t\t\t#m**2 area of condensation\n", + "\n", + "\n", + "def f(h1): \n", + " return h1/kl*(mul**2/(rhol*(rhol-rhov)*g))**(1./3)-(29.76+0.262*h1)/(1.08*(29.76+0.262*h1)**(1.22)-5.2)\n", + "h1 = fsolve(f,1000)\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "Ref1 = 4*m2/mul\n", + "m2 = m+h1*A*(T1-T2)/(Lv1*10**3)\n", + "\n", + "# Results\n", + "print \"Total rate of condensation is %.2f kg/h\"%(m2*3600)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total rate of condensation is 33.08 kg/h\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#data fot TCE\n", + "T1 = 87.4 \t\t\t#C, normal boiling point\n", + "T2 = 25. \t\t\t#C, surface temp.\n", + "Lv = 320.8 \t\t\t#kj/kg, heat of vaporization\n", + "cp = 1.105 \t\t\t#kj/kg C, specific heat\n", + "mu = 0.45*10**-3 \t\t\t#P. liquid vismath.cosity\n", + "k = 0.1064 \t\t\t#W/m C, thermal conductivity\n", + "rhol = 1375. \t\t\t#kg/m**3, liquid density\n", + "rhov = 4.44 \t\t\t#kg/m**3, density of vapour\n", + "Tm = (T1+T2)/2. \t\t\t#C, mean film temp.\n", + "d = 0.0254 \t\t\t#m, outside diameter of tube\n", + "l = 0.7 \t\t\t#m, length\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "\n", + "# Calculations and Results\n", + "#(a) from eq. 6.34\n", + "Lv1 = Lv+0.68*cp*(T1-T2)\n", + "h = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(mu*d*(T1-T2)))**(1./4)\n", + "A = math.pi*d*l \t\t\t#m**2, area of tube\n", + "Q = h*A*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m = (Q/Lv1)/1000 \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.1f kg/h \"%(m*3600)\n", + "\n", + "#(b) from eq. 6.35\n", + "N = 6. \t\t\t#No. of tubes in vertical tire\n", + "h1 = 0.728*(g*Lv1*10**3*rhol*(rhol-rhov)*k**3/(N*mu*d*(T1-T2)))**(1./4)\n", + "TN = 36. \t\t\t#total no. of tubes\n", + "TA = TN*math.pi*d*l \t\t\t#m**2, total area\n", + "Q1 = h1*TA*(T1-T2) \t\t\t#W, rate of heat transfer\n", + "m1 = (Q1/Lv1)/1000. \t\t\t#kg/s rate of condensation\n", + "print \"Rate of condensation is %.0f kg/h \"%(m1*3600)\n", + "#from chail's corelation\n", + "h2 = (1+0.2*cp*(T1-T2)*(N-1)/(Lv1))\n", + "print \"thus there will be increase in the calculated rate of\\\n", + " heat transfer and in rate of condensation as %.3f percent\"%(h2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of condensation is 45.7 kg/h \n", + "Rate of condensation is 1052 kg/h \n", + "thus there will be increase in the calculated rate of heat transfer and in rate of condensation as 1.188 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "Gv = 20. \t\t\t#kg/m**2 s, mass flow rate of benzene\n", + "di = 0.016 \t\t\t#m, tube diameter\n", + "muv = 8.9*(10**-6) \t\t\t#P, vismath.cosity\n", + "Lv = 391. \t\t\t#kj/kg., enthalpy of vaporization\n", + "cpl = 1.94 \t\t\t#kj/kg C, specific heat\n", + "Tv = 80. \t\t\t#C, normal boiling point of benzene\n", + "Tw = 55. \t\t\t#C, wall temp.\n", + "g = 9.8 \t\t\t#m/s**2, gravitational consmath.tant\n", + "rhol = 815. \t\t\t#kg/m**3, density of benzene\n", + "rhov = 2.7 \t\t\t#kg/m**3, density of benzene vapour\n", + "kl = 0.13 \t\t\t#W/m C, thermal conductivity\n", + "mu = 3.81*10**-4 \t\t\t#P, vismath.cosity of benzene\n", + "l = 0.5 \t\t\t#m, length of tube\n", + "\n", + "#calculation\n", + "Rev = di*Gv/muv \t\t\t#Reynold no. of vapour\n", + "#from eq. 6.38\n", + "Lv1 = Lv+(3./8)*cpl*(Tv-Tw)\n", + "#heat transfer corfficient , h\n", + "h = 0.555*(g*rhol*(rhol-rhov)*kl**3*Lv1*10**3/(di*mu*(Tv-Tw)))**(1./4)\n", + "Aavl = math.pi*di*l \t\t\t#m**2, available area\n", + "Q = Aavl*h*(Tv-Tw) \t\t\t#W, rate of heat transfer\n", + "m = Q/(Lv1*10**3) \t\t\t#kg/s, rate of condensation of benzene\n", + "Ratei = Gv*(math.pi/4)*di**2 \t\t\t#kg/s rate of input of benzene vapour\n", + "n = m/Ratei \n", + "\n", + "# Results\n", + "print \"fraction of input vapour condensed is %.1f\"%(n*100)\n", + "\n", + "# note : rouding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of input vapour condensed is 52.7\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7.ipynb new file mode 100755 index 00000000..d1486b33 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7.ipynb @@ -0,0 +1,1004 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:754d16208f27c1e0dbeadb6f1c3c27ce91525c1955b7b285b7e9d6100cebe96b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : radiation heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ts = 5780. \t\t\t#K, surface temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "lamda1 = 0.4 \t\t\t#micrometer, starting visible spectrum range \n", + "lamda2 = 0.7 \t\t\t#micrometer,ending visible spectrum range\n", + "E1 = lamda1*Ts \t\t\t#micrometer K, \n", + "E2 = lamda2*Ts \t\t\t#micrometer K, \n", + "#from table 7.2\n", + "#fraction of radiation lying between 0 and lamda1\n", + "F1 = 0.1229\n", + "#fraction of radiation lying between 0 and lamda2\n", + "F2 = 0.4889\n", + "#the fraction of radiation falls betweem lamda1 & lamda 2\n", + "F3 = F2-F1\n", + "print \"the fraction of radiation falls in visible range is %.3f \"%(F3)\n", + "#(b)\n", + "F4 = F1\n", + "print \"the fraction of radiation on the left of visible range is %.4f \"%(F4)\n", + "#(c)\n", + "F5 = 1-F2\n", + "print \"the fraction in right of visible range is %.4f \"%(F5)\n", + "#(d)\n", + "#from wein's print lacement law\n", + "lmax = 2898/Ts\n", + "print \"The maximum wavelength is %.4f micrometer is\"%(lmax)\n", + "c = 2.998*10**8 \t\t\t#m/s, speed of light\n", + "mu = c/lmax\n", + "print \"The frequency is %1.2e s**-1\"%(mu)\n", + "#(e)\n", + "#from eq. 7.4\n", + "h = 6.6256*10**-34 \t\t\t#Js planck's consmath.tant\n", + "k = 1.3805*10**-23 \t\t\t#J/K, boltzman consmath.tant\n", + "Eblmax = (2*math.pi*h*c**2*(lmax*10**-6)**-5)/((math.exp(h*c/(lmax*10**-6*k*Ts)))-1)\n", + "print \"the maximum spectral emissive power is %1.3e W/m**2\"%(Eblmax)\n", + "#(f)\n", + "s = 5.668*10**-8 \t\t\t#stephen math.cosmath.tant\n", + "Eb = s*Ts**4\n", + "print \"the hemispherical total emissive power is %1.3e W/m**2\"%(Eb)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the fraction of radiation falls in visible range is 0.366 \n", + "the fraction of radiation on the left of visible range is 0.1229 \n", + "the fraction in right of visible range is 0.5111 \n", + "The maximum wavelength is 0.5014 micrometer is\n", + "The frequency is 5.98e+08 s**-1\n", + "the maximum spectral emissive power is 8.298e+13 W/m**2\n", + "the hemispherical total emissive power is 6.326e+07 W/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variables\n", + "Eb = 4000. \t\t\t#W/m sq, Total emmisive power\n", + "s = 5.669*10**-8 \t\t\t#Stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "T = (Eb/s)**0.25 \t\t\t#k, surface temp. of black body\n", + "ym = 2898./T \t\t\t#micro meter,\n", + "#By weins law : Max. wavelength of emmision is inversaly proportional \n", + "#to temprature. and consmath.tant is 2898 micrometer.\n", + "\n", + "#Result\n", + "print \"Surface temp. is %.0f C\"%(T)\n", + "print \"wavength is %.2f micrometer \"%(ym)\n", + "print \" from fig 7.1 it falls in the infrared region of spectrum.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Surface temp. is 515 C\n", + "wavength is 5.62 micrometer \n", + " from fig 7.1 it falls in the infrared region of spectrum.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 1500. \t\t\t#K, surface temprature\n", + "#from fig 7.7\n", + "e1 = 0.2 \t\t\t#emissivity ,when wavelength(l1) is 010 micrometer\n", + "#from table 7.2\n", + "F1 = 0.2733 \t\t\t#fraction of energy in wavelength (l1)\n", + "F2 = 0.89-F1 \t\t\t#fraction of energy in wavelength (l2)\n", + "F3 = 0.9689-0.89 \t\t\t#fraction of energy in wavelength (l3)\n", + "\n", + "#Calculation and Result\n", + "s = 5.669*10**-8 \t\t\t#stephen's consmath.tant\n", + "Eb = s*T**4 \t\t\t#emissive power \n", + "E = (e1*F1+e2*F2+e3*F3)*Eb\n", + "print \"total hemispherical) emissive power is %1.3e W/m**2\"%(E)\n", + "#(b)\n", + "e = E/(s*T**4)\n", + "print \"total hemispherical) emissivity of the surface is %.4f\"%(e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total hemispherical) emissive power is 1.241e+05 W/m**2\n", + "total hemispherical) emissivity of the surface is 0.4326\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "ri = 5. \t\t\t#cm ,inside radius of ring\n", + "w = 3. \t\t\t#cm, width\n", + "ro = ri+w \t\t\t#cm, outside radius \n", + "L = 20. \t\t\t#cm, surface dismath.tance\n", + "\n", + "# Calculations\n", + "def f4(r): \n", + " return 20.**2*r/(20.**2+r**2)**2\n", + "\n", + "F1 = 2* quad(f4,0,ri)[0]\n", + "\n", + "#view factor along surface dA1-A2\"\n", + "\n", + "def f5(r): \n", + " return 20**2*r/(20**2+r**2)**2\n", + "\n", + "F2 = 2* quad(f5,ri,ro)[0]\n", + "\n", + "# Results\n", + "print \"fraction of radiation passes through hole %.4f \"%(F1)\n", + "print \"fraction of radiation intercepted by the ring %.4f \"%(F2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of radiation passes through hole 0.0588 \n", + "fraction of radiation intercepted by the ring 0.0791 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "F11 = 0 \t\t\t#view factor\n", + "d = 1. \t\t\t#let it be\n", + "print \"view factor F11 = %.0f\" %(F11)\n", + "\n", + "#Calculation and Result\n", + "F12 = 1-F11 \t\t\t#view factor\n", + "print \"view factor F22 = %.0f\"%(F12)\n", + "\n", + "A1 = ((math.pi)*d**2)/4 \t\t\t#sq m, area\n", + "A2 = ((math.pi)*d**2)/2 \t\t\t#sq m, area\n", + "F21 = A1/A2 \t\t\t#from eq . 7.26\n", + "print \"view factor F21 = %.1f\"%( F21)\n", + "F22 = 1-F21 \n", + "#Results\n", + "print \"view factor = %.1f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F22 = 1\n", + "view factor F21 = 0.5\n", + "view factor = 0.5\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable\n", + "s = 3. \t\t\t#no. of surface\n", + "tvf = s**2 \t\t\t#total view factor\n", + "\n", + "#using the result of example 7.8\n", + "F11 = 0 \n", + "F33 = 0.5\n", + "print \"view factor F11 = %.0f\"%(F11)\n", + "print \"view factor F33 = %.1f\"%(F33)\n", + "\n", + "#Calculation & Results\n", + "R1 = 0.25 \t\t\t#R = d/2*h &h = 2d\n", + "R2 = 0.25\n", + "X = 1+((1+R2**2)/(R1**2))\n", + "F14 = (0.5)*(X-math.sqrt((X**2)-4*(R2/R1)**2))\n", + "print \"view factor F14 = %.3f\"%(F14)\n", + "F13 = F14\n", + "print \"view factor F13 = %.3f\"%(F13)\n", + "F12 = 1-F11-F13 \t\t\t# from eq. 7.31 for surface 1\n", + "print \"view factor F12 = %.3f\"%(F12)\n", + "\n", + "d = 1. \t\t\t#say\n", + "A1 = (math.pi*(d**2))/4.\n", + "A3 = (math.pi*(d**2))/2.\n", + "F31 = A1*F13/(A3)\n", + "print \"view factor F31 = %.3f\"%(F31)\n", + "\n", + "# from eq. 7.31 for surface 3\n", + "F33 = 0.5\n", + "F32 = 1-F31-F33\n", + "print \"view factor F32 = %.3f\"%(F32)\n", + "\n", + "#for surface 2\n", + "A2 = 2*math.pi*d**2\n", + "F21 = A1*F12/A2\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "F23 = A3*F32/A2\n", + "print \"view factor F23 = %.3f\"%(F23)\n", + "F22 = 1-F21-F23\n", + "print \"view factor F22 = %.3f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F33 = 0.5\n", + "view factor F14 = 0.056\n", + "view factor F13 = 0.056\n", + "view factor F12 = 0.944\n", + "view factor F31 = 0.028\n", + "view factor F32 = 0.472\n", + "view factor F21 = 0.118\n", + "view factor F23 = 0.118\n", + "view factor F22 = 0.764\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "ds = 0.3 \t\t\t#m, diameter of shell\n", + "r1 = 0.1 \t\t\t#m, dismath.tance from the centre\n", + "\n", + "#Calculation and Results\n", + "#by the defination of view factor\n", + "F12 = 1.\n", + "print \"The view factor from surface 1 to 2 is %.0f\"%(F12)\n", + "#F21\n", + "R = ds/2. \t\t\t#m, radius of sphere\n", + "r2 = math.sqrt(R**2-r1**2)\n", + "A1 = math.pi*r2**2 \t\t\t#m**2 area\n", + "A2 = 2*math.pi*R**2+2*math.pi*R*math.sqrt(R**2-r2**2)\n", + "#from reciprocity relation\n", + "F21 = (A1/A2)*F12\n", + "print \"The view factor from surface 2 to 1 is %.3f\"%(F21)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The view factor from surface 1 to 2 is 1\n", + "The view factor from surface 2 to 1 is 0.167\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.3 \t\t\t#m, diameter of steel sphere\n", + "Ti = 800. \t\t\t#K, initial temp. of sphere\n", + "T2 = 303. \t\t\t#C,ambient temp.\n", + "T1 = 343. \t\t\t#C, final tempreture\n", + "rho = 7801. \t\t\t#kg/m**3, density of steel\n", + "cp = 0.473 \t\t\t#kj/kg C, specific heat of steel\n", + "#calculation\n", + "R = d/2 \t\t\t#m, radius of sphere\n", + "A1 = 4*math.pi*R**2 \t\t\t#m**2, area of sphere\n", + "m = 4./3*math.pi*R**3*rho \t\t\t#m**3, mass of sphere\n", + "F12 = 1. \t\t\t#view factor\n", + "s = 5.669*10**-8 \t\t\t#stephen Boltzman's consmath.tant\n", + "#-dT1/dt = A1*F12*s*(T**4-T2**4)/(m*cp)\n", + "\n", + "def f1(T1): \n", + " return (1/(T1**4-T2**4))\n", + "\n", + "I = quad(f1,343,800)[0]\n", + "\n", + "t = I/(A1*F12*s/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The time required for the ball to cool is %.1f h\"%(t/3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the ball to cool is 10.3 h\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "d = 0.114 \t\t\t#m, dia.o f pipe\n", + "l = 1. \t\t\t#m, length of pipe\n", + "A = (math.pi)*d*l \t\t\t#m sq, area\n", + "e1 = 1. \t\t\t#emmisivity of black body\n", + "F12 = 1. \t\t\t#view factor, 1:pipe surface, 2:room walls\n", + "s = 5.67*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "T1 = 440. \t\t\t#K, steam temp.\n", + "T2 = 300. \t\t\t#K, wall temp.\n", + "#Caluclation\n", + "Q12 = A*e1*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "\n", + "#Results\n", + "print \"a) Net rate of radiative heat loss Q12 = %.1f W \"%(Q12)\n", + "#Part-b\n", + "e2 = 0.74\n", + "Q12 = A*e2*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "print \"b) Net rate of radiative heat loss Q12 = %.1f W\"%(Q12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Net rate of radiative heat loss Q12 = 596.6 W \n", + "b) Net rate of radiative heat loss Q12 = 441.5 W\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "F12 = 1. \t\t\t#view factor\n", + "r1 = 0.15 \t\t\t#m inner radius of phere\n", + "r2 = 0.155 \t\t\t#m , outer radius\n", + "\n", + "#Calculation\n", + "A1 = 4.*(math.pi)*r1**2 \t\t\t#sq m inner area\n", + "A2 = 4.*(math.pi)*r2**2 \t\t\t#sq m,outer area \n", + "F21 = A1/A2\n", + "h = 200. \t\t\t#J/g, heat of vaporization of nitrogen\n", + "s = 5.669*10**-8 \t\t\t# boltzman consmath.tant\n", + "T2 = 298. \t\t\t#K, temp. of outer wall\n", + "T1 = 77. \t\t\t#K, Temp. of inner wall\n", + "e1 = 0.06 \t\t\t#emmisivity\n", + "e2 = 0.06 \t\t\t#emmisivity\n", + "x = ((1-e1)/(e1*A1))+(1/(A1*F12))+((1-e2)/(e2*A2))\n", + "Q1net = (s*(T2**4-T1**4))/(x)\n", + "\n", + "#Result-a-i\n", + "print \"a-i) View factor F12 = %.0f\"%(F12)\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "#Result- b\n", + "print \"ii) The net rate of heat gain Q1net = %.1f J/s\"%(Q1net)\n", + "nl = Q1net/h\n", + "nl = nl*3600 \t\t\t#g/h\n", + "print \"b) Rate of nitrogen loss = %.0f g/h\"%(nl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a-i) View factor F12 = 1\n", + "view factor F21 = 0.937\n", + "ii) The net rate of heat gain Q1net = 4.0 J/s\n", + "b) Rate of nitrogen loss = 72 g/h\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "x = 0.15 \t\t\t#m, length of opening on a furnace\n", + "y = 0.12 \t\t\t#m, width of opening on a furnace\n", + "x1 = 6. \t\t\t#m, width of wall\n", + "y1 = 5. \t\t\t#m, height of wall\n", + "e2 = 0.8 \t\t\t#emissivity of wall\n", + "T1 = 1400. \t\t\t#C, furnace temp.\n", + "T2 = 35. \t\t\t#C, wall temp.\n", + "T3 = 273. \t\t\t#C, smath.radians(numpy.arcmath.tan(ard temp.\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman's consmath.tant\n", + "#in fig. 7.29\n", + "l1 = 2. \t\t\t#m, l1 = AF\n", + "l2 = 1.5 \t\t\t#m, l2 = AH\n", + "h = 3. \t\t\t#m, E = dA1\n", + "\n", + "# Calculations\n", + "F1 = (1./(2*math.pi))*((l2/(math.sqrt(l2**2+h**2)))*math.tanh(l1/(math.sqrt(l2**2+h**2)))+(l1/(math.sqrt(l1**2+h**2)))*math.tan(l2/(math.sqrt(l1**2+h**2))))\n", + "#Similarly\n", + "#for the dA1-A3 pair the equation is\n", + "F2 = 0.1175\n", + "#for the dA1-A4 pair the equation is\n", + "F3 = 0.1641\n", + "#for the dA1-A5 pair the equation is\n", + "F4 = 0.0992\n", + "#view factor b/w the opening (dA1)and the wall (W) is \n", + "F5 = F1+F2+F3+F4\n", + "#Calculation of radient heat exchange\n", + "dA1 = x*y\n", + "Aw = x1*y1\n", + "Eb1 = s*(T1+T3)**4\n", + "Ebw = s*(T2+T3)**4\n", + "F6 = dA1*F5/Aw\n", + "Q = dA1*F5*e2*(Eb1*(1-(1-e2)*F6)-Ebw)\n", + "\n", + "# Results\n", + "print \"the net rate of radiant heat transfer to the wall is %.0f W\"%(round(Q,-2))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat transfer to the wall is 2900 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l = 3. \t\t\t#m, length of wall\n", + "w = 2. \t\t\t#m, width of, wall\n", + "d = 3. \t\t\t#m\n", + "R1 = l/d\n", + "A1 = l*w \t\t\t#sq m,area 1: front part\n", + "A2 = A1 \t\t\t#sq m , area, 2\"back part\n", + "e1 = 0.7 \t\t\t#emmisivity\n", + "e2 = 0.7 \t\t\t#emmisivity\n", + "T1 = 673. \t\t\t#k\n", + "T2 = 523. \t\t\t#k\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "F12 = 0.148 \t\t\t#view factor ,from fig. 7.12\n", + "x = (A1+A2-2*A1*F12)/(A2-(A1*(F12**2)))+((1/e1)-1)+(A1/A2)*((1/e2)-1)\n", + "\n", + "#Results\n", + "Q1net = -1*A1*(s*(T2**4-T1**4))/(x)\n", + "print \"the net rate of radiant heat loss = %.1f kW \"%(Q1net/1000)\n", + "# (b)\n", + "F24 = 1. \t\t\t#from fig 7.12\n", + "T20 = 333. \t\t\t#K, outer surface temp. of surface 2\n", + "T4 = 303. \t\t\t#K, ambient temp\n", + "Q2rad = A2*e2*F24*s*(T20**4-T4**4)\n", + "q = Q1net-Q2rad\n", + "q1 = q/1000 \t\t\t# Kw\n", + "h = q/(A2*(T20-T4))\n", + "print \"convective heat transfer coeff. = %.0f W/sq m C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat loss = 17.1 kW \n", + "convective heat transfer coeff. = 90 W/sq m C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "import math\n", + "\n", + "# Variables\n", + "r1i = 0.1 \t\t\t#m, inner radius of disk 1\n", + "r1o = 0.2 \t\t\t#m, outer radius of disk 1\n", + "r2i = 0.12 \t\t\t#m, inner radius of disk 2\n", + "r2o = 0.25 \t\t\t#m, outer radius of disk 2\n", + "h = 0.08 \t\t\t#m, dismath.tance between the disks\n", + "R2 = r2o/h\n", + "R1 = r1o/h\n", + "X = 1+(1+R1**2)/R2**2\n", + "F23_14 = 1./2*(X-math.sqrt(X**2-4*(R1/R2)**2))\n", + "\n", + "#calculation\n", + "R2_ = r2o/h\n", + "R1_ = r1i/h\n", + "X_ = 1+(1+R1_**2)/R2_**2\n", + "F23_4 = 1/2*(X_-math.sqrt(X_**2-4*(R1_/R2_)**2)) \t\t\t#view factor\n", + "#similarly\n", + "F3_14 = 0.815 \t\t\t#view factor\n", + "F34 = 0.4 \t\t\t#view factor\n", + "A23 = math.pi*r2o**2 \t\t\t#area\n", + "A3 = math.pi*r2i**2\n", + "A1 = math.pi*(r1o**2-r1i**2)\n", + "#from eq. 1\n", + "F12 = A23*(F23_14-F23_4)/A1-(A3*(F3_14-F34))/A1\n", + "\n", + "#calculation of the rate of radiative heat exchange\n", + "# Variables\n", + "T1 = 1000. \t\t\t#K, temprature of disk 1\n", + "T2 = 300. \t\t\t#K, temprature of disk 2\n", + "s = 5.669*10**-8 \t\t\t#stephen's Boltzman consmath.tant\n", + "e1 = 0.8 \t\t\t#emissivity\n", + "e2 = 0.7\n", + "A2 = math.pi*(r2o**2-r2i**2)\n", + "F1s = 1-F12\n", + "F2s = 1-(A1*F12/A2)\n", + "#calculation\n", + "#let some quantities equal to \n", + "a = (1-e1)/(e1*A1)\n", + "b = 1/(A1*F12)\n", + "c = (1-e2)/(e2*A2)\n", + "d = 1/(A1*F1s)\n", + "e = 1/(A2*F2s)\n", + "f = s*T1**4\n", + "g = s*T2**4\n", + "#from eq. 7.42(a)\n", + "#(f-J1)/a = (J1-J2)/b+J1/d\n", + "#(g-J2)/c = (J2-J1)/b+J1/e\n", + "#solving two eqns by matrix\n", + "A = array([[-0.0564,0.5036],[0.4712,-0.0564]])\n", + "B = array([[161.847],[21376.31]])\n", + "X = linalg.solve(A,B)\n", + "J1 = X[0]\n", + "J2 = X[1]\n", + "\n", + "#net rate of radiation exchange \n", + "Q12net = (J1-J2)/17.73\n", + "\n", + "# Results\n", + "print \"net rate of radiation exchange b/w disk 1 and 2 is %d W/m**2\"%(Q12net)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "net rate of radiation exchange b/w disk 1 and 2 is 2286 W/m**2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "di = 0.0254 \t\t\t#m, inner diameter of tube\n", + "Ti = 77. \t\t\t#K, liquid temprature\n", + "do = 52.5*10**-3 \t\t\t#m, pipe internal diameter\n", + "To = 270. \t\t\t#K, wall temprature\n", + "l = 1. \t\t\t#m, length of tube\n", + "e1 = 0.05 \t\t\t#emissivity of tube wall\n", + "e2 = 0.1 \t\t\t#emissivity of pipe wall\n", + "e3 = 0.02 \t\t\t#emissivity for inner surface of radiation field\n", + "e4 = 0.03 \t\t\t#emissivity for outer surface of radiation field\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman math.cosmath.tantl\n", + "\n", + "#Calculation\n", + "ds = (do+di)/2 \t\t\t#m, diameter of radiation shield\n", + "Ao = math.pi*do*l \t\t\t#m**2, outer pipe area\n", + "As = math.pi*ds*l \t\t\t#m**2, shield area\n", + "Ai = math.pi*di*l \t\t\t#m**2, inner pipe area\n", + "#View factors\n", + "#for the long cylindrical enclosure made up of the outer pipe and the shield\n", + "Fso = 1. \t\t\t#because outer surface of shield cant see itself\n", + "Fos = As/Ao \n", + "Fsi = Ai/As\n", + "#now assume \n", + "#(1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4) = x\n", + "#(1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1 = y\n", + "x = (1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4)\n", + "y = (1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1\n", + "#solving the equations for heat transfer from the outer pipe and inner pipe\n", + "def f(Ts): \n", + " return (Ao*(To**4-Ts**4)/x)-(Ai*(Ts**4-Ti**4)/x)\n", + "Ts = fsolve(f,1)\n", + "Qos = (Ao*s*(To**4-Ts**4))/x\n", + "\n", + "# Results\n", + "print \"The net rate of heat gain of tube is %.2f W\"%(Qos)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net rate of heat gain of tube is 0.30 W\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 300 + 273. #K\n", + "Ta = 30. + 273. # K\n", + "w = 0.075 # m\n", + "k = 0.08 # W/m c\n", + "l = 1.075 # m\n", + "delta = 5.669 * 10**-8 # W/m**2 K**4\n", + "A1 = 1 * 1.5 # M**2\n", + "A2 = A1\n", + "A2m = (1.5 + 1.9)/2 # m**2\n", + "A3m = (5. + 6.02)/2 # m**2 \n", + "\n", + "# Calculations\n", + "T2 = 545.1 # k\n", + "T2_ = 322.6\n", + "T3 = 544.7\n", + "T3_ = 328.4\n", + "rate_of_heatloss1 = int(A2m*k/w*(T2-T2_))\n", + "rate_of_heatloss2 = int(A3m*k/w*(T3-T3_))\n", + "total = rate_of_heatloss1 + rate_of_heatloss2\n", + "\n", + "# results\n", + "print \"Rate of heat loss from the top surface : %d W\"%rate_of_heatloss1\n", + "print \"Rate of heat loss from the side walls : %d W\"%rate_of_heatloss2\n", + "print \"Total rate of heat loss : %d W\"%total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss from the top surface : 403 W\n", + "Rate of heat loss from the side walls : 1271 W\n", + "Total rate of heat loss : 1674 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T = 300. \t\t\t#K, temprature\n", + "per = 91. \t\t\t#percent, adsorbed radiation\n", + "lam = 4.2 \t\t\t#micrometer, wavelength radiation\n", + "L = 0.1 \t\t\t#m, path length\n", + "\n", + "#calculation\n", + "# I2/I1 = f\n", + "f = 1-per/100. \t\t\t#fraction of incident radiation transmitted\n", + "#from eq. 7.69\n", + "a = -math.log(f)/L\n", + "\n", + "# Results\n", + "print \"the spectral extinction coefficient is %.2f m**-1\"%(a)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the spectral extinction coefficient is 24.08 m**-1\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Ts = 800. \t\t\t#C, wall temp.\n", + "Tg = 1100. \t\t\t#C. burner temprature\n", + "CO2 = 8. \t\t\t#percent, composition of CO2 in flue gas\n", + "M = 15.2 \t\t\t#percent, composition of moisture in flue gas\n", + "a = 0.4 \t\t\t#m, length of duct\n", + "b = 0.4 \t\t\t#width of duct\n", + "h = 15. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "P = 1. \t\t\t#atm pressure\n", + "#CAlCULATION of Eg(Tg)\n", + "pc = CO2/100.*P \t\t\t#atm, partial pressure of CO2\n", + "pw = M/100.*P \t\t\t#atm, partial pressure of moisture\n", + "l = 1. \t\t\t#m, length of duct\n", + "V = a*b*l \t\t\t#m**3, volume of duct\n", + "A = 1.6*l \t\t\t#m**2 area of duct\n", + "Le = 3.6*(V/A) \t\t\t#m, mean beam length\n", + "\n", + "pc*Le\n", + "pw*Le\n", + "Tg_ = Tg+273.\n", + "Ts_ = Ts+273.\n", + "#from fig 7.38\n", + "Ec = 0.06\n", + "Eg = 0.048 \t\t\t#from fig 7.39\n", + "#a correction dE need to be calculated\n", + "#pw/(pc+pw)\n", + "#pc*Le+pw*Le\n", + "#from fig. 7.39\n", + "dE = 0.003\n", + "Eg_Tg = Ec+Eg-dE \t\t\t#emissivity at temp. Tg\n", + "\n", + "#Calculation of alpha\n", + "#pc*Le*Ts/Tg\n", + "#from fig. 7.37\n", + "Ec1 = 0.068\n", + "#from fig. 7.38\n", + "Ew1 = 0.069\n", + "Cc = 1 \t\t\t#correction factor\n", + "Cw = 1 \t\t\t#correction factor\n", + "d_alpha = dE \t\t\t#AT 1 ATM TOTAL PRESSURE\n", + "alpha = Cc*Ec1*(Tg_/Ts_)**0.65+Cw*Ew1*(Tg_/Ts_)**0.45-dE\n", + "#radiant heat ransfer rate\n", + "s = 5.669*10**-8 \t\t\t#stephen's boltzman consmath.tant\n", + "Qrad = A*s*(Eg_Tg*Tg_**4-alpha*Ts_**4) \t\t\t#kW\n", + "Qconv = h*A*(Tg-Ts) \t\t\t#kW, convective heat transfer rate\n", + "Q = Qrad+Qconv\n", + "\n", + "# Results\n", + "print \"The total rate of heat transfer from the gas to the wall is %.1f kW\"%(Q/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total rate of heat transfer from the gas to the wall is 22.5 kW\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_1.ipynb new file mode 100755 index 00000000..d1486b33 --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_1.ipynb @@ -0,0 +1,1004 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:754d16208f27c1e0dbeadb6f1c3c27ce91525c1955b7b285b7e9d6100cebe96b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : radiation heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ts = 5780. \t\t\t#K, surface temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "lamda1 = 0.4 \t\t\t#micrometer, starting visible spectrum range \n", + "lamda2 = 0.7 \t\t\t#micrometer,ending visible spectrum range\n", + "E1 = lamda1*Ts \t\t\t#micrometer K, \n", + "E2 = lamda2*Ts \t\t\t#micrometer K, \n", + "#from table 7.2\n", + "#fraction of radiation lying between 0 and lamda1\n", + "F1 = 0.1229\n", + "#fraction of radiation lying between 0 and lamda2\n", + "F2 = 0.4889\n", + "#the fraction of radiation falls betweem lamda1 & lamda 2\n", + "F3 = F2-F1\n", + "print \"the fraction of radiation falls in visible range is %.3f \"%(F3)\n", + "#(b)\n", + "F4 = F1\n", + "print \"the fraction of radiation on the left of visible range is %.4f \"%(F4)\n", + "#(c)\n", + "F5 = 1-F2\n", + "print \"the fraction in right of visible range is %.4f \"%(F5)\n", + "#(d)\n", + "#from wein's print lacement law\n", + "lmax = 2898/Ts\n", + "print \"The maximum wavelength is %.4f micrometer is\"%(lmax)\n", + "c = 2.998*10**8 \t\t\t#m/s, speed of light\n", + "mu = c/lmax\n", + "print \"The frequency is %1.2e s**-1\"%(mu)\n", + "#(e)\n", + "#from eq. 7.4\n", + "h = 6.6256*10**-34 \t\t\t#Js planck's consmath.tant\n", + "k = 1.3805*10**-23 \t\t\t#J/K, boltzman consmath.tant\n", + "Eblmax = (2*math.pi*h*c**2*(lmax*10**-6)**-5)/((math.exp(h*c/(lmax*10**-6*k*Ts)))-1)\n", + "print \"the maximum spectral emissive power is %1.3e W/m**2\"%(Eblmax)\n", + "#(f)\n", + "s = 5.668*10**-8 \t\t\t#stephen math.cosmath.tant\n", + "Eb = s*Ts**4\n", + "print \"the hemispherical total emissive power is %1.3e W/m**2\"%(Eb)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the fraction of radiation falls in visible range is 0.366 \n", + "the fraction of radiation on the left of visible range is 0.1229 \n", + "the fraction in right of visible range is 0.5111 \n", + "The maximum wavelength is 0.5014 micrometer is\n", + "The frequency is 5.98e+08 s**-1\n", + "the maximum spectral emissive power is 8.298e+13 W/m**2\n", + "the hemispherical total emissive power is 6.326e+07 W/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variables\n", + "Eb = 4000. \t\t\t#W/m sq, Total emmisive power\n", + "s = 5.669*10**-8 \t\t\t#Stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "T = (Eb/s)**0.25 \t\t\t#k, surface temp. of black body\n", + "ym = 2898./T \t\t\t#micro meter,\n", + "#By weins law : Max. wavelength of emmision is inversaly proportional \n", + "#to temprature. and consmath.tant is 2898 micrometer.\n", + "\n", + "#Result\n", + "print \"Surface temp. is %.0f C\"%(T)\n", + "print \"wavength is %.2f micrometer \"%(ym)\n", + "print \" from fig 7.1 it falls in the infrared region of spectrum.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Surface temp. is 515 C\n", + "wavength is 5.62 micrometer \n", + " from fig 7.1 it falls in the infrared region of spectrum.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 1500. \t\t\t#K, surface temprature\n", + "#from fig 7.7\n", + "e1 = 0.2 \t\t\t#emissivity ,when wavelength(l1) is 010 micrometer\n", + "#from table 7.2\n", + "F1 = 0.2733 \t\t\t#fraction of energy in wavelength (l1)\n", + "F2 = 0.89-F1 \t\t\t#fraction of energy in wavelength (l2)\n", + "F3 = 0.9689-0.89 \t\t\t#fraction of energy in wavelength (l3)\n", + "\n", + "#Calculation and Result\n", + "s = 5.669*10**-8 \t\t\t#stephen's consmath.tant\n", + "Eb = s*T**4 \t\t\t#emissive power \n", + "E = (e1*F1+e2*F2+e3*F3)*Eb\n", + "print \"total hemispherical) emissive power is %1.3e W/m**2\"%(E)\n", + "#(b)\n", + "e = E/(s*T**4)\n", + "print \"total hemispherical) emissivity of the surface is %.4f\"%(e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total hemispherical) emissive power is 1.241e+05 W/m**2\n", + "total hemispherical) emissivity of the surface is 0.4326\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "ri = 5. \t\t\t#cm ,inside radius of ring\n", + "w = 3. \t\t\t#cm, width\n", + "ro = ri+w \t\t\t#cm, outside radius \n", + "L = 20. \t\t\t#cm, surface dismath.tance\n", + "\n", + "# Calculations\n", + "def f4(r): \n", + " return 20.**2*r/(20.**2+r**2)**2\n", + "\n", + "F1 = 2* quad(f4,0,ri)[0]\n", + "\n", + "#view factor along surface dA1-A2\"\n", + "\n", + "def f5(r): \n", + " return 20**2*r/(20**2+r**2)**2\n", + "\n", + "F2 = 2* quad(f5,ri,ro)[0]\n", + "\n", + "# Results\n", + "print \"fraction of radiation passes through hole %.4f \"%(F1)\n", + "print \"fraction of radiation intercepted by the ring %.4f \"%(F2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of radiation passes through hole 0.0588 \n", + "fraction of radiation intercepted by the ring 0.0791 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "F11 = 0 \t\t\t#view factor\n", + "d = 1. \t\t\t#let it be\n", + "print \"view factor F11 = %.0f\" %(F11)\n", + "\n", + "#Calculation and Result\n", + "F12 = 1-F11 \t\t\t#view factor\n", + "print \"view factor F22 = %.0f\"%(F12)\n", + "\n", + "A1 = ((math.pi)*d**2)/4 \t\t\t#sq m, area\n", + "A2 = ((math.pi)*d**2)/2 \t\t\t#sq m, area\n", + "F21 = A1/A2 \t\t\t#from eq . 7.26\n", + "print \"view factor F21 = %.1f\"%( F21)\n", + "F22 = 1-F21 \n", + "#Results\n", + "print \"view factor = %.1f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F22 = 1\n", + "view factor F21 = 0.5\n", + "view factor = 0.5\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable\n", + "s = 3. \t\t\t#no. of surface\n", + "tvf = s**2 \t\t\t#total view factor\n", + "\n", + "#using the result of example 7.8\n", + "F11 = 0 \n", + "F33 = 0.5\n", + "print \"view factor F11 = %.0f\"%(F11)\n", + "print \"view factor F33 = %.1f\"%(F33)\n", + "\n", + "#Calculation & Results\n", + "R1 = 0.25 \t\t\t#R = d/2*h &h = 2d\n", + "R2 = 0.25\n", + "X = 1+((1+R2**2)/(R1**2))\n", + "F14 = (0.5)*(X-math.sqrt((X**2)-4*(R2/R1)**2))\n", + "print \"view factor F14 = %.3f\"%(F14)\n", + "F13 = F14\n", + "print \"view factor F13 = %.3f\"%(F13)\n", + "F12 = 1-F11-F13 \t\t\t# from eq. 7.31 for surface 1\n", + "print \"view factor F12 = %.3f\"%(F12)\n", + "\n", + "d = 1. \t\t\t#say\n", + "A1 = (math.pi*(d**2))/4.\n", + "A3 = (math.pi*(d**2))/2.\n", + "F31 = A1*F13/(A3)\n", + "print \"view factor F31 = %.3f\"%(F31)\n", + "\n", + "# from eq. 7.31 for surface 3\n", + "F33 = 0.5\n", + "F32 = 1-F31-F33\n", + "print \"view factor F32 = %.3f\"%(F32)\n", + "\n", + "#for surface 2\n", + "A2 = 2*math.pi*d**2\n", + "F21 = A1*F12/A2\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "F23 = A3*F32/A2\n", + "print \"view factor F23 = %.3f\"%(F23)\n", + "F22 = 1-F21-F23\n", + "print \"view factor F22 = %.3f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F33 = 0.5\n", + "view factor F14 = 0.056\n", + "view factor F13 = 0.056\n", + "view factor F12 = 0.944\n", + "view factor F31 = 0.028\n", + "view factor F32 = 0.472\n", + "view factor F21 = 0.118\n", + "view factor F23 = 0.118\n", + "view factor F22 = 0.764\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "ds = 0.3 \t\t\t#m, diameter of shell\n", + "r1 = 0.1 \t\t\t#m, dismath.tance from the centre\n", + "\n", + "#Calculation and Results\n", + "#by the defination of view factor\n", + "F12 = 1.\n", + "print \"The view factor from surface 1 to 2 is %.0f\"%(F12)\n", + "#F21\n", + "R = ds/2. \t\t\t#m, radius of sphere\n", + "r2 = math.sqrt(R**2-r1**2)\n", + "A1 = math.pi*r2**2 \t\t\t#m**2 area\n", + "A2 = 2*math.pi*R**2+2*math.pi*R*math.sqrt(R**2-r2**2)\n", + "#from reciprocity relation\n", + "F21 = (A1/A2)*F12\n", + "print \"The view factor from surface 2 to 1 is %.3f\"%(F21)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The view factor from surface 1 to 2 is 1\n", + "The view factor from surface 2 to 1 is 0.167\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.3 \t\t\t#m, diameter of steel sphere\n", + "Ti = 800. \t\t\t#K, initial temp. of sphere\n", + "T2 = 303. \t\t\t#C,ambient temp.\n", + "T1 = 343. \t\t\t#C, final tempreture\n", + "rho = 7801. \t\t\t#kg/m**3, density of steel\n", + "cp = 0.473 \t\t\t#kj/kg C, specific heat of steel\n", + "#calculation\n", + "R = d/2 \t\t\t#m, radius of sphere\n", + "A1 = 4*math.pi*R**2 \t\t\t#m**2, area of sphere\n", + "m = 4./3*math.pi*R**3*rho \t\t\t#m**3, mass of sphere\n", + "F12 = 1. \t\t\t#view factor\n", + "s = 5.669*10**-8 \t\t\t#stephen Boltzman's consmath.tant\n", + "#-dT1/dt = A1*F12*s*(T**4-T2**4)/(m*cp)\n", + "\n", + "def f1(T1): \n", + " return (1/(T1**4-T2**4))\n", + "\n", + "I = quad(f1,343,800)[0]\n", + "\n", + "t = I/(A1*F12*s/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The time required for the ball to cool is %.1f h\"%(t/3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the ball to cool is 10.3 h\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "d = 0.114 \t\t\t#m, dia.o f pipe\n", + "l = 1. \t\t\t#m, length of pipe\n", + "A = (math.pi)*d*l \t\t\t#m sq, area\n", + "e1 = 1. \t\t\t#emmisivity of black body\n", + "F12 = 1. \t\t\t#view factor, 1:pipe surface, 2:room walls\n", + "s = 5.67*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "T1 = 440. \t\t\t#K, steam temp.\n", + "T2 = 300. \t\t\t#K, wall temp.\n", + "#Caluclation\n", + "Q12 = A*e1*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "\n", + "#Results\n", + "print \"a) Net rate of radiative heat loss Q12 = %.1f W \"%(Q12)\n", + "#Part-b\n", + "e2 = 0.74\n", + "Q12 = A*e2*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "print \"b) Net rate of radiative heat loss Q12 = %.1f W\"%(Q12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Net rate of radiative heat loss Q12 = 596.6 W \n", + "b) Net rate of radiative heat loss Q12 = 441.5 W\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "F12 = 1. \t\t\t#view factor\n", + "r1 = 0.15 \t\t\t#m inner radius of phere\n", + "r2 = 0.155 \t\t\t#m , outer radius\n", + "\n", + "#Calculation\n", + "A1 = 4.*(math.pi)*r1**2 \t\t\t#sq m inner area\n", + "A2 = 4.*(math.pi)*r2**2 \t\t\t#sq m,outer area \n", + "F21 = A1/A2\n", + "h = 200. \t\t\t#J/g, heat of vaporization of nitrogen\n", + "s = 5.669*10**-8 \t\t\t# boltzman consmath.tant\n", + "T2 = 298. \t\t\t#K, temp. of outer wall\n", + "T1 = 77. \t\t\t#K, Temp. of inner wall\n", + "e1 = 0.06 \t\t\t#emmisivity\n", + "e2 = 0.06 \t\t\t#emmisivity\n", + "x = ((1-e1)/(e1*A1))+(1/(A1*F12))+((1-e2)/(e2*A2))\n", + "Q1net = (s*(T2**4-T1**4))/(x)\n", + "\n", + "#Result-a-i\n", + "print \"a-i) View factor F12 = %.0f\"%(F12)\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "#Result- b\n", + "print \"ii) The net rate of heat gain Q1net = %.1f J/s\"%(Q1net)\n", + "nl = Q1net/h\n", + "nl = nl*3600 \t\t\t#g/h\n", + "print \"b) Rate of nitrogen loss = %.0f g/h\"%(nl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a-i) View factor F12 = 1\n", + "view factor F21 = 0.937\n", + "ii) The net rate of heat gain Q1net = 4.0 J/s\n", + "b) Rate of nitrogen loss = 72 g/h\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "x = 0.15 \t\t\t#m, length of opening on a furnace\n", + "y = 0.12 \t\t\t#m, width of opening on a furnace\n", + "x1 = 6. \t\t\t#m, width of wall\n", + "y1 = 5. \t\t\t#m, height of wall\n", + "e2 = 0.8 \t\t\t#emissivity of wall\n", + "T1 = 1400. \t\t\t#C, furnace temp.\n", + "T2 = 35. \t\t\t#C, wall temp.\n", + "T3 = 273. \t\t\t#C, smath.radians(numpy.arcmath.tan(ard temp.\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman's consmath.tant\n", + "#in fig. 7.29\n", + "l1 = 2. \t\t\t#m, l1 = AF\n", + "l2 = 1.5 \t\t\t#m, l2 = AH\n", + "h = 3. \t\t\t#m, E = dA1\n", + "\n", + "# Calculations\n", + "F1 = (1./(2*math.pi))*((l2/(math.sqrt(l2**2+h**2)))*math.tanh(l1/(math.sqrt(l2**2+h**2)))+(l1/(math.sqrt(l1**2+h**2)))*math.tan(l2/(math.sqrt(l1**2+h**2))))\n", + "#Similarly\n", + "#for the dA1-A3 pair the equation is\n", + "F2 = 0.1175\n", + "#for the dA1-A4 pair the equation is\n", + "F3 = 0.1641\n", + "#for the dA1-A5 pair the equation is\n", + "F4 = 0.0992\n", + "#view factor b/w the opening (dA1)and the wall (W) is \n", + "F5 = F1+F2+F3+F4\n", + "#Calculation of radient heat exchange\n", + "dA1 = x*y\n", + "Aw = x1*y1\n", + "Eb1 = s*(T1+T3)**4\n", + "Ebw = s*(T2+T3)**4\n", + "F6 = dA1*F5/Aw\n", + "Q = dA1*F5*e2*(Eb1*(1-(1-e2)*F6)-Ebw)\n", + "\n", + "# Results\n", + "print \"the net rate of radiant heat transfer to the wall is %.0f W\"%(round(Q,-2))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat transfer to the wall is 2900 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l = 3. \t\t\t#m, length of wall\n", + "w = 2. \t\t\t#m, width of, wall\n", + "d = 3. \t\t\t#m\n", + "R1 = l/d\n", + "A1 = l*w \t\t\t#sq m,area 1: front part\n", + "A2 = A1 \t\t\t#sq m , area, 2\"back part\n", + "e1 = 0.7 \t\t\t#emmisivity\n", + "e2 = 0.7 \t\t\t#emmisivity\n", + "T1 = 673. \t\t\t#k\n", + "T2 = 523. \t\t\t#k\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "F12 = 0.148 \t\t\t#view factor ,from fig. 7.12\n", + "x = (A1+A2-2*A1*F12)/(A2-(A1*(F12**2)))+((1/e1)-1)+(A1/A2)*((1/e2)-1)\n", + "\n", + "#Results\n", + "Q1net = -1*A1*(s*(T2**4-T1**4))/(x)\n", + "print \"the net rate of radiant heat loss = %.1f kW \"%(Q1net/1000)\n", + "# (b)\n", + "F24 = 1. \t\t\t#from fig 7.12\n", + "T20 = 333. \t\t\t#K, outer surface temp. of surface 2\n", + "T4 = 303. \t\t\t#K, ambient temp\n", + "Q2rad = A2*e2*F24*s*(T20**4-T4**4)\n", + "q = Q1net-Q2rad\n", + "q1 = q/1000 \t\t\t# Kw\n", + "h = q/(A2*(T20-T4))\n", + "print \"convective heat transfer coeff. = %.0f W/sq m C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat loss = 17.1 kW \n", + "convective heat transfer coeff. = 90 W/sq m C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "import math\n", + "\n", + "# Variables\n", + "r1i = 0.1 \t\t\t#m, inner radius of disk 1\n", + "r1o = 0.2 \t\t\t#m, outer radius of disk 1\n", + "r2i = 0.12 \t\t\t#m, inner radius of disk 2\n", + "r2o = 0.25 \t\t\t#m, outer radius of disk 2\n", + "h = 0.08 \t\t\t#m, dismath.tance between the disks\n", + "R2 = r2o/h\n", + "R1 = r1o/h\n", + "X = 1+(1+R1**2)/R2**2\n", + "F23_14 = 1./2*(X-math.sqrt(X**2-4*(R1/R2)**2))\n", + "\n", + "#calculation\n", + "R2_ = r2o/h\n", + "R1_ = r1i/h\n", + "X_ = 1+(1+R1_**2)/R2_**2\n", + "F23_4 = 1/2*(X_-math.sqrt(X_**2-4*(R1_/R2_)**2)) \t\t\t#view factor\n", + "#similarly\n", + "F3_14 = 0.815 \t\t\t#view factor\n", + "F34 = 0.4 \t\t\t#view factor\n", + "A23 = math.pi*r2o**2 \t\t\t#area\n", + "A3 = math.pi*r2i**2\n", + "A1 = math.pi*(r1o**2-r1i**2)\n", + "#from eq. 1\n", + "F12 = A23*(F23_14-F23_4)/A1-(A3*(F3_14-F34))/A1\n", + "\n", + "#calculation of the rate of radiative heat exchange\n", + "# Variables\n", + "T1 = 1000. \t\t\t#K, temprature of disk 1\n", + "T2 = 300. \t\t\t#K, temprature of disk 2\n", + "s = 5.669*10**-8 \t\t\t#stephen's Boltzman consmath.tant\n", + "e1 = 0.8 \t\t\t#emissivity\n", + "e2 = 0.7\n", + "A2 = math.pi*(r2o**2-r2i**2)\n", + "F1s = 1-F12\n", + "F2s = 1-(A1*F12/A2)\n", + "#calculation\n", + "#let some quantities equal to \n", + "a = (1-e1)/(e1*A1)\n", + "b = 1/(A1*F12)\n", + "c = (1-e2)/(e2*A2)\n", + "d = 1/(A1*F1s)\n", + "e = 1/(A2*F2s)\n", + "f = s*T1**4\n", + "g = s*T2**4\n", + "#from eq. 7.42(a)\n", + "#(f-J1)/a = (J1-J2)/b+J1/d\n", + "#(g-J2)/c = (J2-J1)/b+J1/e\n", + "#solving two eqns by matrix\n", + "A = array([[-0.0564,0.5036],[0.4712,-0.0564]])\n", + "B = array([[161.847],[21376.31]])\n", + "X = linalg.solve(A,B)\n", + "J1 = X[0]\n", + "J2 = X[1]\n", + "\n", + "#net rate of radiation exchange \n", + "Q12net = (J1-J2)/17.73\n", + "\n", + "# Results\n", + "print \"net rate of radiation exchange b/w disk 1 and 2 is %d W/m**2\"%(Q12net)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "net rate of radiation exchange b/w disk 1 and 2 is 2286 W/m**2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "di = 0.0254 \t\t\t#m, inner diameter of tube\n", + "Ti = 77. \t\t\t#K, liquid temprature\n", + "do = 52.5*10**-3 \t\t\t#m, pipe internal diameter\n", + "To = 270. \t\t\t#K, wall temprature\n", + "l = 1. \t\t\t#m, length of tube\n", + "e1 = 0.05 \t\t\t#emissivity of tube wall\n", + "e2 = 0.1 \t\t\t#emissivity of pipe wall\n", + "e3 = 0.02 \t\t\t#emissivity for inner surface of radiation field\n", + "e4 = 0.03 \t\t\t#emissivity for outer surface of radiation field\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman math.cosmath.tantl\n", + "\n", + "#Calculation\n", + "ds = (do+di)/2 \t\t\t#m, diameter of radiation shield\n", + "Ao = math.pi*do*l \t\t\t#m**2, outer pipe area\n", + "As = math.pi*ds*l \t\t\t#m**2, shield area\n", + "Ai = math.pi*di*l \t\t\t#m**2, inner pipe area\n", + "#View factors\n", + "#for the long cylindrical enclosure made up of the outer pipe and the shield\n", + "Fso = 1. \t\t\t#because outer surface of shield cant see itself\n", + "Fos = As/Ao \n", + "Fsi = Ai/As\n", + "#now assume \n", + "#(1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4) = x\n", + "#(1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1 = y\n", + "x = (1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4)\n", + "y = (1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1\n", + "#solving the equations for heat transfer from the outer pipe and inner pipe\n", + "def f(Ts): \n", + " return (Ao*(To**4-Ts**4)/x)-(Ai*(Ts**4-Ti**4)/x)\n", + "Ts = fsolve(f,1)\n", + "Qos = (Ao*s*(To**4-Ts**4))/x\n", + "\n", + "# Results\n", + "print \"The net rate of heat gain of tube is %.2f W\"%(Qos)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net rate of heat gain of tube is 0.30 W\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 300 + 273. #K\n", + "Ta = 30. + 273. # K\n", + "w = 0.075 # m\n", + "k = 0.08 # W/m c\n", + "l = 1.075 # m\n", + "delta = 5.669 * 10**-8 # W/m**2 K**4\n", + "A1 = 1 * 1.5 # M**2\n", + "A2 = A1\n", + "A2m = (1.5 + 1.9)/2 # m**2\n", + "A3m = (5. + 6.02)/2 # m**2 \n", + "\n", + "# Calculations\n", + "T2 = 545.1 # k\n", + "T2_ = 322.6\n", + "T3 = 544.7\n", + "T3_ = 328.4\n", + "rate_of_heatloss1 = int(A2m*k/w*(T2-T2_))\n", + "rate_of_heatloss2 = int(A3m*k/w*(T3-T3_))\n", + "total = rate_of_heatloss1 + rate_of_heatloss2\n", + "\n", + "# results\n", + "print \"Rate of heat loss from the top surface : %d W\"%rate_of_heatloss1\n", + "print \"Rate of heat loss from the side walls : %d W\"%rate_of_heatloss2\n", + "print \"Total rate of heat loss : %d W\"%total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss from the top surface : 403 W\n", + "Rate of heat loss from the side walls : 1271 W\n", + "Total rate of heat loss : 1674 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T = 300. \t\t\t#K, temprature\n", + "per = 91. \t\t\t#percent, adsorbed radiation\n", + "lam = 4.2 \t\t\t#micrometer, wavelength radiation\n", + "L = 0.1 \t\t\t#m, path length\n", + "\n", + "#calculation\n", + "# I2/I1 = f\n", + "f = 1-per/100. \t\t\t#fraction of incident radiation transmitted\n", + "#from eq. 7.69\n", + "a = -math.log(f)/L\n", + "\n", + "# Results\n", + "print \"the spectral extinction coefficient is %.2f m**-1\"%(a)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the spectral extinction coefficient is 24.08 m**-1\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Ts = 800. \t\t\t#C, wall temp.\n", + "Tg = 1100. \t\t\t#C. burner temprature\n", + "CO2 = 8. \t\t\t#percent, composition of CO2 in flue gas\n", + "M = 15.2 \t\t\t#percent, composition of moisture in flue gas\n", + "a = 0.4 \t\t\t#m, length of duct\n", + "b = 0.4 \t\t\t#width of duct\n", + "h = 15. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "P = 1. \t\t\t#atm pressure\n", + "#CAlCULATION of Eg(Tg)\n", + "pc = CO2/100.*P \t\t\t#atm, partial pressure of CO2\n", + "pw = M/100.*P \t\t\t#atm, partial pressure of moisture\n", + "l = 1. \t\t\t#m, length of duct\n", + "V = a*b*l \t\t\t#m**3, volume of duct\n", + "A = 1.6*l \t\t\t#m**2 area of duct\n", + "Le = 3.6*(V/A) \t\t\t#m, mean beam length\n", + "\n", + "pc*Le\n", + "pw*Le\n", + "Tg_ = Tg+273.\n", + "Ts_ = Ts+273.\n", + "#from fig 7.38\n", + "Ec = 0.06\n", + "Eg = 0.048 \t\t\t#from fig 7.39\n", + "#a correction dE need to be calculated\n", + "#pw/(pc+pw)\n", + "#pc*Le+pw*Le\n", + "#from fig. 7.39\n", + "dE = 0.003\n", + "Eg_Tg = Ec+Eg-dE \t\t\t#emissivity at temp. Tg\n", + "\n", + "#Calculation of alpha\n", + "#pc*Le*Ts/Tg\n", + "#from fig. 7.37\n", + "Ec1 = 0.068\n", + "#from fig. 7.38\n", + "Ew1 = 0.069\n", + "Cc = 1 \t\t\t#correction factor\n", + "Cw = 1 \t\t\t#correction factor\n", + "d_alpha = dE \t\t\t#AT 1 ATM TOTAL PRESSURE\n", + "alpha = Cc*Ec1*(Tg_/Ts_)**0.65+Cw*Ew1*(Tg_/Ts_)**0.45-dE\n", + "#radiant heat ransfer rate\n", + "s = 5.669*10**-8 \t\t\t#stephen's boltzman consmath.tant\n", + "Qrad = A*s*(Eg_Tg*Tg_**4-alpha*Ts_**4) \t\t\t#kW\n", + "Qconv = h*A*(Tg-Ts) \t\t\t#kW, convective heat transfer rate\n", + "Q = Qrad+Qconv\n", + "\n", + "# Results\n", + "print \"The total rate of heat transfer from the gas to the wall is %.1f kW\"%(Q/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total rate of heat transfer from the gas to the wall is 22.5 kW\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_2.ipynb new file mode 100755 index 00000000..1779034d --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch7_2.ipynb @@ -0,0 +1,1004 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fcc8298b72f46c25cfb0deb97a500d6fc959ddaab4710b26229600a7f4aa1f29" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : radiation heat transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "# Variables\n", + "Ts = 5780. \t\t\t#K, surface temp.\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "lamda1 = 0.4 \t\t\t#micrometer, starting visible spectrum range \n", + "lamda2 = 0.7 \t\t\t#micrometer,ending visible spectrum range\n", + "E1 = lamda1*Ts \t\t\t#micrometer K, \n", + "E2 = lamda2*Ts \t\t\t#micrometer K, \n", + "#from table 7.2\n", + "#fraction of radiation lying between 0 and lamda1\n", + "F1 = 0.1229\n", + "#fraction of radiation lying between 0 and lamda2\n", + "F2 = 0.4889\n", + "#the fraction of radiation falls betweem lamda1 & lamda 2\n", + "F3 = F2-F1\n", + "print \"the fraction of radiation falls in visible range is %.3f \"%(F3)\n", + "#(b)\n", + "F4 = F1\n", + "print \"the fraction of radiation on the left of visible range is %.4f \"%(F4)\n", + "#(c)\n", + "F5 = 1-F2\n", + "print \"the fraction in right of visible range is %.4f \"%(F5)\n", + "#(d)\n", + "#from wein's print lacement law\n", + "lmax = 2898/Ts\n", + "print \"The maximum wavelength is %.4f micrometer is\"%(lmax)\n", + "c = 2.998*10**8 \t\t\t#m/s, speed of light\n", + "mu = c/lmax\n", + "print \"The frequency is %1.2e s**-1\"%(mu)\n", + "#(e)\n", + "#from eq. 7.4\n", + "h = 6.6256*10**-34 \t\t\t#Js planck's consmath.tant\n", + "k = 1.3805*10**-23 \t\t\t#J/K, boltzman consmath.tant\n", + "Eblmax = (2*math.pi*h*c**2*(lmax*10**-6)**-5)/((math.exp(h*c/(lmax*10**-6*k*Ts)))-1)\n", + "print \"the maximum spectral emissive power is %1.3e W/m**2\"%(Eblmax)\n", + "#(f)\n", + "s = 5.668*10**-8 \t\t\t#stephen math.cosmath.tant\n", + "Eb = s*Ts**4\n", + "print \"the hemispherical total emissive power is %1.3e W/m**2\"%(Eb)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the fraction of radiation falls in visible range is 0.366 \n", + "the fraction of radiation on the left of visible range is 0.1229 \n", + "the fraction in right of visible range is 0.5111 \n", + "The maximum wavelength is 0.5014 micrometer is\n", + "The frequency is 5.98e+08 s**-1\n", + "the maximum spectral emissive power is 8.298e+13 W/m**2\n", + "the hemispherical total emissive power is 6.326e+07 W/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variables\n", + "Eb = 4000. \t\t\t#W/m sq, Total emmisive power\n", + "s = 5.669*10**-8 \t\t\t#Stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "T = (Eb/s)**0.25 \t\t\t#k, surface temp. of black body\n", + "ym = 2898./T \t\t\t#micro meter,\n", + "#By weins law : Max. wavelength of emmision is inversaly proportional \n", + "#to temprature. and consmath.tant is 2898 micrometer.\n", + "\n", + "#Result\n", + "print \"Surface temp. is %.0f C\"%(T)\n", + "print \"wavength is %.2f micrometer \"%(ym)\n", + "print \" from fig 7.1 it falls in the infrared region of spectrum.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Surface temp. is 515 C\n", + "wavength is 5.62 micrometer \n", + " from fig 7.1 it falls in the infrared region of spectrum.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 1500. \t\t\t#K, surface temprature\n", + "#from fig 7.7\n", + "e1 = 0.2 \t\t\t#emissivity ,when wavelength(l1) is 010 micrometer\n", + "#from table 7.2\n", + "F1 = 0.2733 \t\t\t#fraction of energy in wavelength (l1)\n", + "F2 = 0.89-F1 \t\t\t#fraction of energy in wavelength (l2)\n", + "F3 = 0.9689-0.89 \t\t\t#fraction of energy in wavelength (l3)\n", + "\n", + "#Calculation and Result\n", + "s = 5.669*10**-8 \t\t\t#stephen's consmath.tant\n", + "Eb = s*T**4 \t\t\t#emissive power \n", + "E = (e1*F1+e2*F2+e3*F3)*Eb\n", + "print \"total hemispherical) emissive power is %1.3e W/m**2\"%(E)\n", + "#(b)\n", + "e = E/(s*T**4)\n", + "print \"total hemispherical) emissivity of the surface is %.4f\"%(e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total hemispherical) emissive power is 1.241e+05 W/m**2\n", + "total hemispherical) emissivity of the surface is 0.4326\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "ri = 5. \t\t\t#cm ,inside radius of ring\n", + "w = 3. \t\t\t#cm, width\n", + "ro = ri+w \t\t\t#cm, outside radius \n", + "L = 20. \t\t\t#cm, surface dismath.tance\n", + "\n", + "# Calculations\n", + "def f4(r): \n", + " return 20.**2*r/(20.**2+r**2)**2\n", + "\n", + "F1 = 2* quad(f4,0,ri)[0]\n", + "\n", + "#view factor along surface dA1-A2\"\n", + "\n", + "def f5(r): \n", + " return 20**2*r/(20**2+r**2)**2\n", + "\n", + "F2 = 2* quad(f5,ri,ro)[0]\n", + "\n", + "# Results\n", + "print \"fraction of radiation passes through hole %.4f \"%(F1)\n", + "print \"fraction of radiation intercepted by the ring %.4f \"%(F2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fraction of radiation passes through hole 0.0588 \n", + "fraction of radiation intercepted by the ring 0.0791 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "F11 = 0 \t\t\t#view factor\n", + "d = 1. \t\t\t#let it be\n", + "print \"view factor F11 = %.0f\" %(F11)\n", + "\n", + "#Calculation and Result\n", + "F12 = 1-F11 \t\t\t#view factor\n", + "print \"view factor F22 = %.0f\"%(F12)\n", + "\n", + "A1 = ((math.pi)*d**2)/4 \t\t\t#sq m, area\n", + "A2 = ((math.pi)*d**2)/2 \t\t\t#sq m, area\n", + "F21 = A1/A2 \t\t\t#from eq . 7.26\n", + "print \"view factor F21 = %.1f\"%( F21)\n", + "F22 = 1-F21 \n", + "#Results\n", + "print \"view factor = %.1f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F22 = 1\n", + "view factor F21 = 0.5\n", + "view factor = 0.5\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable\n", + "s = 3. \t\t\t#no. of surface\n", + "tvf = s**2 \t\t\t#total view factor\n", + "\n", + "#using the result of example 7.8\n", + "F11 = 0 \n", + "F33 = 0.5\n", + "print \"view factor F11 = %.0f\"%(F11)\n", + "print \"view factor F33 = %.1f\"%(F33)\n", + "\n", + "#Calculation & Results\n", + "R1 = 0.25 \t\t\t#R = d/2*h &h = 2d\n", + "R2 = 0.25\n", + "X = 1+((1+R2**2)/(R1**2))\n", + "F14 = (0.5)*(X-math.sqrt((X**2)-4*(R2/R1)**2))\n", + "print \"view factor F14 = %.3f\"%(F14)\n", + "F13 = F14\n", + "print \"view factor F13 = %.3f\"%(F13)\n", + "F12 = 1-F11-F13 \t\t\t# from eq. 7.31 for surface 1\n", + "print \"view factor F12 = %.3f\"%(F12)\n", + "\n", + "d = 1. \t\t\t#say\n", + "A1 = (math.pi*(d**2))/4.\n", + "A3 = (math.pi*(d**2))/2.\n", + "F31 = A1*F13/(A3)\n", + "print \"view factor F31 = %.3f\"%(F31)\n", + "\n", + "# from eq. 7.31 for surface 3\n", + "F33 = 0.5\n", + "F32 = 1-F31-F33\n", + "print \"view factor F32 = %.3f\"%(F32)\n", + "\n", + "#for surface 2\n", + "A2 = 2*math.pi*d**2\n", + "F21 = A1*F12/A2\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "F23 = A3*F32/A2\n", + "print \"view factor F23 = %.3f\"%(F23)\n", + "F22 = 1-F21-F23\n", + "print \"view factor F22 = %.3f\"%(F22)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "view factor F11 = 0\n", + "view factor F33 = 0.5\n", + "view factor F14 = 0.056\n", + "view factor F13 = 0.056\n", + "view factor F12 = 0.944\n", + "view factor F31 = 0.028\n", + "view factor F32 = 0.472\n", + "view factor F21 = 0.118\n", + "view factor F23 = 0.118\n", + "view factor F22 = 0.764\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "ds = 0.3 \t\t\t#m, diameter of shell\n", + "r1 = 0.1 \t\t\t#m, dismath.tance from the centre\n", + "\n", + "#Calculation and Results\n", + "#by the defination of view factor\n", + "F12 = 1.\n", + "print \"The view factor from surface 1 to 2 is %.0f\"%(F12)\n", + "#F21\n", + "R = ds/2. \t\t\t#m, radius of sphere\n", + "r2 = math.sqrt(R**2-r1**2)\n", + "A1 = math.pi*r2**2 \t\t\t#m**2 area\n", + "A2 = 2*math.pi*R**2+2*math.pi*R*math.sqrt(R**2-r2**2)\n", + "#from reciprocity relation\n", + "F21 = (A1/A2)*F12\n", + "print \"The view factor from surface 2 to 1 is %.3f\"%(F21)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The view factor from surface 1 to 2 is 1\n", + "The view factor from surface 2 to 1 is 0.167\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "# Variables\n", + "d = 0.3 \t\t\t#m, diameter of steel sphere\n", + "Ti = 800. \t\t\t#K, initial temp. of sphere\n", + "T2 = 303. \t\t\t#C,ambient temp.\n", + "T1 = 343. \t\t\t#C, final tempreture\n", + "rho = 7801. \t\t\t#kg/m**3, density of steel\n", + "cp = 0.473 \t\t\t#kj/kg C, specific heat of steel\n", + "#calculation\n", + "R = d/2 \t\t\t#m, radius of sphere\n", + "A1 = 4*math.pi*R**2 \t\t\t#m**2, area of sphere\n", + "m = 4./3*math.pi*R**3*rho \t\t\t#m**3, mass of sphere\n", + "F12 = 1. \t\t\t#view factor\n", + "s = 5.669*10**-8 \t\t\t#stephen Boltzman's consmath.tant\n", + "#-dT1/dt = A1*F12*s*(T**4-T2**4)/(m*cp)\n", + "\n", + "def f1(T1): \n", + " return (1/(T1**4-T2**4))\n", + "\n", + "I = quad(f1,343,800)[0]\n", + "\n", + "t = I/(A1*F12*s/(m*cp*10**3))\n", + "\n", + "# Results\n", + "print \"The time required for the ball to cool is %.1f h\"%(t/3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time required for the ball to cool is 10.3 h\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variables\n", + "d = 0.114 \t\t\t#m, dia.o f pipe\n", + "l = 1. \t\t\t#m, length of pipe\n", + "A = (math.pi)*d*l \t\t\t#m sq, area\n", + "e1 = 1. \t\t\t#emmisivity of black body\n", + "F12 = 1. \t\t\t#view factor, 1:pipe surface, 2:room walls\n", + "s = 5.67*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "T1 = 440. \t\t\t#K, steam temp.\n", + "T2 = 300. \t\t\t#K, wall temp.\n", + "#Caluclation\n", + "Q12 = A*e1*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "\n", + "#Results\n", + "print \"a) Net rate of radiative heat loss Q12 = %.1f W \"%(Q12)\n", + "#Part-b\n", + "e2 = 0.74\n", + "Q12 = A*e2*F12*s*(T1**4-T2**4) \t\t\t#net rate of radiative heat loss\n", + "print \"b) Net rate of radiative heat loss Q12 = %.1f W\"%(Q12)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Net rate of radiative heat loss Q12 = 596.6 W \n", + "b) Net rate of radiative heat loss Q12 = 441.5 W\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "F12 = 1. \t\t\t#view factor\n", + "r1 = 0.15 \t\t\t#m inner radius of phere\n", + "r2 = 0.155 \t\t\t#m , outer radius\n", + "\n", + "#Calculation\n", + "A1 = 4.*(math.pi)*r1**2 \t\t\t#sq m inner area\n", + "A2 = 4.*(math.pi)*r2**2 \t\t\t#sq m,outer area \n", + "F21 = A1/A2\n", + "h = 200. \t\t\t#J/g, heat of vaporization of nitrogen\n", + "s = 5.669*10**-8 \t\t\t# boltzman consmath.tant\n", + "T2 = 298. \t\t\t#K, temp. of outer wall\n", + "T1 = 77. \t\t\t#K, Temp. of inner wall\n", + "e1 = 0.06 \t\t\t#emmisivity\n", + "e2 = 0.06 \t\t\t#emmisivity\n", + "x = ((1-e1)/(e1*A1))+(1/(A1*F12))+((1-e2)/(e2*A2))\n", + "Q1net = (s*(T2**4-T1**4))/(x)\n", + "\n", + "#Result-a-i\n", + "print \"a-i) View factor F12 = %.0f\"%(F12)\n", + "print \"view factor F21 = %.3f\"%(F21)\n", + "#Result- b\n", + "print \"ii) The net rate of heat gain Q1net = %.1f J/s\"%(Q1net)\n", + "nl = Q1net/h\n", + "nl = nl*3600 \t\t\t#g/h\n", + "print \"b) Rate of nitrogen loss = %.0f g/h\"%(nl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a-i) View factor F12 = 1\n", + "view factor F21 = 0.937\n", + "ii) The net rate of heat gain Q1net = 4.0 J/s\n", + "b) Rate of nitrogen loss = 72 g/h\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "x = 0.15 \t\t\t#m, length of opening on a furnace\n", + "y = 0.12 \t\t\t#m, width of opening on a furnace\n", + "x1 = 6. \t\t\t#m, width of wall\n", + "y1 = 5. \t\t\t#m, height of wall\n", + "e2 = 0.8 \t\t\t#emissivity of wall\n", + "T1 = 1400. \t\t\t#C, furnace temp.\n", + "T2 = 35. \t\t\t#C, wall temp.\n", + "T3 = 273. \t\t\t#C, smath.radians(numpy.arcmath.tan(ard temp.\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman's consmath.tant\n", + "#in fig. 7.29\n", + "l1 = 2. \t\t\t#m, l1 = AF\n", + "l2 = 1.5 \t\t\t#m, l2 = AH\n", + "h = 3. \t\t\t#m, E = dA1\n", + "\n", + "# Calculations\n", + "F1 = (1./(2*math.pi))*((l2/(math.sqrt(l2**2+h**2)))*math.tanh(l1/(math.sqrt(l2**2+h**2)))+(l1/(math.sqrt(l1**2+h**2)))*math.tan(l2/(math.sqrt(l1**2+h**2))))\n", + "#Similarly\n", + "#for the dA1-A3 pair the equation is\n", + "F2 = 0.1175\n", + "#for the dA1-A4 pair the equation is\n", + "F3 = 0.1641\n", + "#for the dA1-A5 pair the equation is\n", + "F4 = 0.0992\n", + "#view factor b/w the opening (dA1)and the wall (W) is \n", + "F5 = F1+F2+F3+F4\n", + "#Calculation of radient heat exchange\n", + "dA1 = x*y\n", + "Aw = x1*y1\n", + "Eb1 = s*(T1+T3)**4\n", + "Ebw = s*(T2+T3)**4\n", + "F6 = dA1*F5/Aw\n", + "Q = dA1*F5*e2*(Eb1*(1-(1-e2)*F6)-Ebw)\n", + "\n", + "# Results\n", + "print \"the net rate of radiant heat transfer to the wall is %.0f W\"%(round(Q,-2))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat transfer to the wall is 2900 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l = 3. \t\t\t#m, length of wall\n", + "w = 2. \t\t\t#m, width of, wall\n", + "d = 3. \t\t\t#m\n", + "R1 = l/d\n", + "A1 = l*w \t\t\t#sq m,area 1: front part\n", + "A2 = A1 \t\t\t#sq m , area, 2\"back part\n", + "e1 = 0.7 \t\t\t#emmisivity\n", + "e2 = 0.7 \t\t\t#emmisivity\n", + "T1 = 673. \t\t\t#k\n", + "T2 = 523. \t\t\t#k\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman consmath.tant\n", + "\n", + "#Calculation\n", + "F12 = 0.148 \t\t\t#view factor ,from fig. 7.12\n", + "x = (A1+A2-2*A1*F12)/(A2-(A1*(F12**2)))+((1/e1)-1)+(A1/A2)*((1/e2)-1)\n", + "\n", + "#Results\n", + "Q1net = -1*A1*(s*(T2**4-T1**4))/(x)\n", + "print \"the net rate of radiant heat loss = %.1f kW \"%(Q1net/1000)\n", + "# (b)\n", + "F24 = 1. \t\t\t#from fig 7.12\n", + "T20 = 333. \t\t\t#K, outer surface temp. of surface 2\n", + "T4 = 303. \t\t\t#K, ambient temp\n", + "Q2rad = A2*e2*F24*s*(T20**4-T4**4)\n", + "q = Q1net-Q2rad\n", + "q1 = q/1000 \t\t\t# Kw\n", + "h = q/(A2*(T20-T4))\n", + "print \"convective heat transfer coeff. = %.0f W/sq m C\"%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the net rate of radiant heat loss = 17.1 kW \n", + "convective heat transfer coeff. = 90 W/sq m C\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,linalg\n", + "import math\n", + "\n", + "# Variables\n", + "r1i = 0.1 \t\t\t#m, inner radius of disk 1\n", + "r1o = 0.2 \t\t\t#m, outer radius of disk 1\n", + "r2i = 0.12 \t\t\t#m, inner radius of disk 2\n", + "r2o = 0.25 \t\t\t#m, outer radius of disk 2\n", + "h = 0.08 \t\t\t#m, dismath.tance between the disks\n", + "R2 = r2o/h\n", + "R1 = r1o/h\n", + "X = 1+(1+R1**2)/R2**2\n", + "F23_14 = 1./2*(X-math.sqrt(X**2-4*(R1/R2)**2))\n", + "\n", + "#calculation\n", + "R2_ = r2o/h\n", + "R1_ = r1i/h\n", + "X_ = 1+(1+R1_**2)/R2_**2\n", + "F23_4 = 1/2*(X_-math.sqrt(X_**2-4*(R1_/R2_)**2)) \t\t\t#view factor\n", + "#similarly\n", + "F3_14 = 0.815 \t\t\t#view factor\n", + "F34 = 0.4 \t\t\t#view factor\n", + "A23 = math.pi*r2o**2 \t\t\t#area\n", + "A3 = math.pi*r2i**2\n", + "A1 = math.pi*(r1o**2-r1i**2)\n", + "#from eq. 1\n", + "F12 = A23*(F23_14-F23_4)/A1-(A3*(F3_14-F34))/A1\n", + "\n", + "#calculation of the rate of radiative heat exchange\n", + "# Variables\n", + "T1 = 1000. \t\t\t#K, temprature of disk 1\n", + "T2 = 300. \t\t\t#K, temprature of disk 2\n", + "s = 5.669*10**-8 \t\t\t#stephen's Boltzman consmath.tant\n", + "e1 = 0.8 \t\t\t#emissivity\n", + "e2 = 0.7\n", + "A2 = math.pi*(r2o**2-r2i**2)\n", + "F1s = 1-F12\n", + "F2s = 1-(A1*F12/A2)\n", + "#calculation\n", + "#let some quantities equal to \n", + "a = (1-e1)/(e1*A1)\n", + "b = 1/(A1*F12)\n", + "c = (1-e2)/(e2*A2)\n", + "d = 1/(A1*F1s)\n", + "e = 1/(A2*F2s)\n", + "f = s*T1**4\n", + "g = s*T2**4\n", + "#from eq. 7.42(a)\n", + "#(f-J1)/a = (J1-J2)/b+J1/d\n", + "#(g-J2)/c = (J2-J1)/b+J1/e\n", + "#solving two eqns by matrix\n", + "A = array([[-0.0564,0.5036],[0.4712,-0.0564]])\n", + "B = array([[161.847],[21376.31]])\n", + "X = linalg.solve(A,B)\n", + "J1 = X[0]\n", + "J2 = X[1]\n", + "\n", + "#net rate of radiation exchange \n", + "Q12net = (J1-J2)/17.73\n", + "\n", + "# Results\n", + "print \"net rate of radiation exchange b/w disk 1 and 2 is %d W/m**2\"%(Q12net)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "net rate of radiation exchange b/w disk 1 and 2 is 2286 W/m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "# Variables\n", + "di = 0.0254 \t\t\t#m, inner diameter of tube\n", + "Ti = 77. \t\t\t#K, liquid temprature\n", + "do = 52.5*10**-3 \t\t\t#m, pipe internal diameter\n", + "To = 270. \t\t\t#K, wall temprature\n", + "l = 1. \t\t\t#m, length of tube\n", + "e1 = 0.05 \t\t\t#emissivity of tube wall\n", + "e2 = 0.1 \t\t\t#emissivity of pipe wall\n", + "e3 = 0.02 \t\t\t#emissivity for inner surface of radiation field\n", + "e4 = 0.03 \t\t\t#emissivity for outer surface of radiation field\n", + "s = 5.669*10**-8 \t\t\t#stephen boltzman math.cosmath.tantl\n", + "\n", + "#Calculation\n", + "ds = (do+di)/2 \t\t\t#m, diameter of radiation shield\n", + "Ao = math.pi*do*l \t\t\t#m**2, outer pipe area\n", + "As = math.pi*ds*l \t\t\t#m**2, shield area\n", + "Ai = math.pi*di*l \t\t\t#m**2, inner pipe area\n", + "#View factors\n", + "#for the long cylindrical enclosure made up of the outer pipe and the shield\n", + "Fso = 1. \t\t\t#because outer surface of shield cant see itself\n", + "Fos = As/Ao \n", + "Fsi = Ai/As\n", + "#now assume \n", + "#(1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4) = x\n", + "#(1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1 = y\n", + "x = (1-e2)/e2+ 1/Fos +Ao*(1-e4)/(As*e4)\n", + "y = (1-e3)/e3 +1/Fsi +(1/Fsi)*(1-e1)/e1\n", + "#solving the equations for heat transfer from the outer pipe and inner pipe\n", + "def f(Ts): \n", + " return (Ao*(To**4-Ts**4)/x)-(Ai*(Ts**4-Ti**4)/x)\n", + "Ts = fsolve(f,1)\n", + "Qos = (Ao*s*(To**4-Ts**4))/x\n", + "\n", + "# Results\n", + "print \"The net rate of heat gain of tube is %.2f W\"%(Qos)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The net rate of heat gain of tube is 0.30 W\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T1 = 300 + 273. #K\n", + "Ta = 30. + 273. # K\n", + "w = 0.075 # m\n", + "k = 0.08 # W/m c\n", + "l = 1.075 # m\n", + "delta = 5.669 * 10**-8 # W/m**2 K**4\n", + "A1 = 1 * 1.5 # M**2\n", + "A2 = A1\n", + "A2m = (1.5 + 1.9)/2 # m**2\n", + "A3m = (5. + 6.02)/2 # m**2 \n", + "\n", + "# Calculations\n", + "T2 = 545.1 # k\n", + "T2_ = 322.6\n", + "T3 = 544.7\n", + "T3_ = 328.4\n", + "rate_of_heatloss1 = int(A2m*k/w*(T2-T2_))\n", + "rate_of_heatloss2 = int(A3m*k/w*(T3-T3_))\n", + "total = rate_of_heatloss1 + rate_of_heatloss2\n", + "\n", + "# results\n", + "print \"Rate of heat loss from the top surface : %d W\"%rate_of_heatloss1\n", + "print \"Rate of heat loss from the side walls : %d W\"%rate_of_heatloss2\n", + "print \"Total rate of heat loss : %d W\"%total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat loss from the top surface : 403 W\n", + "Rate of heat loss from the side walls : 1271 W\n", + "Total rate of heat loss : 1674 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "T = 300. \t\t\t#K, temprature\n", + "per = 91. \t\t\t#percent, adsorbed radiation\n", + "lam = 4.2 \t\t\t#micrometer, wavelength radiation\n", + "L = 0.1 \t\t\t#m, path length\n", + "\n", + "#calculation\n", + "# I2/I1 = f\n", + "f = 1-per/100. \t\t\t#fraction of incident radiation transmitted\n", + "#from eq. 7.69\n", + "a = -math.log(f)/L\n", + "\n", + "# Results\n", + "print \"the spectral extinction coefficient is %.2f m**-1\"%(a)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the spectral extinction coefficient is 24.08 m**-1\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Ts = 800. \t\t\t#C, wall temp.\n", + "Tg = 1100. \t\t\t#C. burner temprature\n", + "CO2 = 8. \t\t\t#percent, composition of CO2 in flue gas\n", + "M = 15.2 \t\t\t#percent, composition of moisture in flue gas\n", + "a = 0.4 \t\t\t#m, length of duct\n", + "b = 0.4 \t\t\t#width of duct\n", + "h = 15. \t\t\t#W/m**2 C, heat transfer coefficient\n", + "P = 1. \t\t\t#atm pressure\n", + "#CAlCULATION of Eg(Tg)\n", + "pc = CO2/100.*P \t\t\t#atm, partial pressure of CO2\n", + "pw = M/100.*P \t\t\t#atm, partial pressure of moisture\n", + "l = 1. \t\t\t#m, length of duct\n", + "V = a*b*l \t\t\t#m**3, volume of duct\n", + "A = 1.6*l \t\t\t#m**2 area of duct\n", + "Le = 3.6*(V/A) \t\t\t#m, mean beam length\n", + "\n", + "pc*Le\n", + "pw*Le\n", + "Tg_ = Tg+273.\n", + "Ts_ = Ts+273.\n", + "#from fig 7.38\n", + "Ec = 0.06\n", + "Eg = 0.048 \t\t\t#from fig 7.39\n", + "#a correction dE need to be calculated\n", + "#pw/(pc+pw)\n", + "#pc*Le+pw*Le\n", + "#from fig. 7.39\n", + "dE = 0.003\n", + "Eg_Tg = Ec+Eg-dE \t\t\t#emissivity at temp. Tg\n", + "\n", + "#Calculation of alpha\n", + "#pc*Le*Ts/Tg\n", + "#from fig. 7.37\n", + "Ec1 = 0.068\n", + "#from fig. 7.38\n", + "Ew1 = 0.069\n", + "Cc = 1 \t\t\t#correction factor\n", + "Cw = 1 \t\t\t#correction factor\n", + "d_alpha = dE \t\t\t#AT 1 ATM TOTAL PRESSURE\n", + "alpha = Cc*Ec1*(Tg_/Ts_)**0.65+Cw*Ew1*(Tg_/Ts_)**0.45-dE\n", + "#radiant heat ransfer rate\n", + "s = 5.669*10**-8 \t\t\t#stephen's boltzman consmath.tant\n", + "Qrad = A*s*(Eg_Tg*Tg_**4-alpha*Ts_**4) \t\t\t#kW\n", + "Qconv = h*A*(Tg-Ts) \t\t\t#kW, convective heat transfer rate\n", + "Q = Qrad+Qconv\n", + "\n", + "# Results\n", + "print \"The total rate of heat transfer from the gas to the wall is %.1f kW\"%(Q/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total rate of heat transfer from the gas to the wall is 22.5 kW\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8.ipynb new file mode 100755 index 00000000..2199b9bd --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8.ipynb @@ -0,0 +1,489 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:569b39eccca34c26fda2a96be72a801e57b24dc25cef982f78e922cfedfaf0c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Heat Exchanger" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#for Benzene\n", + "Mb = 1000. \t\t\t#Kg, mass of benzene\n", + "T1 = 75. \t\t\t#C initial temp. of benzene\n", + "T2 = 50. \t\t\t#C final temp. of benzene\n", + "Cp1 = 1.88 \t\t\t#Kj/Kg C. specific heat of benzene\n", + "mu1 = 0.37 \t\t\t#cP. vismath.cosity of benzene\n", + "rho1 = 860. \t\t\t#kg/m**3, density\n", + "k1 = 0.154 \t\t\t#W/m K. thermal conductivity\n", + "\n", + "#for water\n", + "Tav = 35. \t\t\t#C av, temp.\n", + "Cp2 = 4.187 \t\t\t#specific heat\n", + "mu2 = 0.8 \t\t\t#cP. vismath.cosity\n", + "k2 = 0.623 \t\t\t#W/m K. thermal conductivity\n", + "T3 = 30. \t\t\t#C. initial temp.\n", + "T4 = 40. \t\t\t#C final temp.\n", + "\n", + "#Calculation and Results\n", + "#(a)\n", + "HD = Mb*Cp1*(T1-T2) \t\t\t#Kj/h, heat duty\n", + "WR = HD/(Cp2*(T4-T3)) \t\t\t#kg/h Water rate\n", + "print \"the heat duty of the exchanger is %.0f kj/h\"%(HD)\n", + "print \"the water flow rate is %d kg/h\"%(WR)\n", + "\n", + "#(b)\n", + "#tube side (water) calculations\n", + "# Variables\n", + "di1 = 21. \t\t\t#mm, inner diameter of inner tube \n", + "do1 = 25.4 \t\t\t#mm, outer dia. of inner tube\n", + "t = 2.2 \t\t\t#mm/ wall thickness\n", + "kw = 74.5 \t\t\t#W/m K. thermal conductivity of the wall\n", + "di2 = 41. \t\t\t#mm, inner diameter of outer pipe\n", + "do2 = 48. \t\t\t#mm, outer diameter of outer pipe\n", + "\n", + "FA1 = (math.pi/4)*(di1*10**-3)**2 \t\t\t#m**2, flow area\n", + "FR1 = WR/1000.\n", + "v1 = FR1/(FA1*3600) \t\t\t#m/s, velocity\n", + "Re1 = (di1*10**-3)*v1*1000/(mu2*10**-3) \t\t\t#Reynold no.\n", + "Pr1 = Cp2*1000*(mu2*10**-3)/k2 \t\t\t#Prandtl no.\n", + "#umath.sing dittus boelter eq.\n", + "Nu1 = 0.023*(Re1)**(0.8)*(Pr1)**(0.3) \t\t\t#nusslet no.\n", + "h1 = round(Nu1*k2/(di1*10**-3),-1) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#Outer side (benzene) calculation\n", + "FA2 = (math.pi/4)*(di2*10**-3)**2-(math.pi/4)*(do1*10**-3)**2 \t\t\t#flow area\n", + "wp = math.pi*(di2*10**-3+do1*10**-3) \t\t\t#wettwd perimeter\n", + "dh = 4*FA2/wp \t\t\t#hydrolic diameter\n", + "bfr = Mb/rho1 \t\t\t#m**3/h benzene flow rate\n", + "v2 = bfr/(FA2*3600) \t\t\t#m/s, velocity\n", + "Re2 = dh*v2*rho1/(mu1*10**-3) \t\t\t#Reynold no\n", + "Pr2 = Cp1*10**3*(mu1*10**-3)/k1 \t\t\t#Prandtl no.\n", + "Nu2 = 0.023*(Re2)**(0.8)*(Pr2)**(0.4) \t\t\t#nusslet no.\n", + "h2 = Nu2*k1/(dh) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "print \"heat transfer coefficient based on inside area is %.0f W/m**2 C \"%(h1)\n", + "print \"heat transfer coefficient based on outside area is %.1f W/m**2 C \"%(h2)\n", + "\n", + "#Calculation of clean overall heat transfer coefficient, outside area basis\n", + "#from eq. 8.28\n", + "# Variables\n", + "l = 1. \t\t\t#assume , length\n", + "Ao = math.pi*do1*10**-3*l\n", + "Ai = math.pi*di1*10**-3*l\n", + "Am = (do1*10**-3-di1*10**-3)*math.pi*l/(math.log(do1*10**-3/(di1*10**-3)))\n", + "\n", + "#overall heat transfer coefficient\n", + "Uo = 1/((1/h2)+(Ao/Am)*((do1*10**-3-di1*10**-3)/(2*kw))+(Ao/Ai)*(1/h1))\n", + "Ui = Uo*Ao/Ai\n", + "\n", + "#Calculation of LMTD\n", + "dt1 = T1-T4\n", + "dt2 = T2-T3\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2) \t\t\t#math.log mean temp. difference correction factor\n", + "Q = HD*1000/3600 \t\t\t#W, heat required\n", + "Ao_ = Q/(Uo*LMTD) \t\t\t#m**@, required area\n", + "len = Ao_/(math.pi*do1*10**(-3)) \t\t\t#m, tube length necessary\n", + "\n", + "#(c)\n", + "la = 15. \t\t\t#m ,actual length\n", + "Aht = (math.pi*do1*10**(-3)*la)\n", + "Udo = Q/(Aht*LMTD) \t\t\t#W/m**2 C, overall heat transfer coefficient with dirt factor\n", + "#from eq. 8.2\n", + "Rdo = (1/Udo)-(1/Uo) \t\t\t#m**2 C/W\n", + "print \"overall heat transfer coefficient outside area basis is %.1f W/m**2 C \"%(Uo)\n", + "print \"overall heat transfer coefficient inside area basis is %.1f W/m**2 C \"%(Ui)\n", + "print \"The fouling factor is %f m**2 C/W\"%(Rdo)\n", + "\n", + "# note : rounding off error. please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat duty of the exchanger is 47000 kj/h\n", + "the water flow rate is 1122 kg/h\n", + "heat transfer coefficient based on inside area is 3560 W/m**2 C \n", + "heat transfer coefficient based on outside area is 880.3 W/m**2 C \n", + "overall heat transfer coefficient outside area basis is 663.1 W/m**2 C \n", + "overall heat transfer coefficient inside area basis is 802.0 W/m**2 C \n", + "The fouling factor is 0.000949 m**2 C/W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Cp = 50. \t\t\t#tpd, plant capacity\n", + "T1 = 135. \t\t\t#C, Temp.\n", + "T2 = 40. \t\t\t#C temp.\n", + "T3 = 30. \t\t\t#C temp.\n", + "dt1 = (T1-T2) \t\t\t#C hot end temp. \n", + "dt2 = (T2-T3) \t\t\t#C cold end temp.\n", + "#Properties of ethylbenzene\n", + "rho1 = 840. \t\t\t#kg/m**3, density\n", + "cp1 = 2.093 \t\t\t#kj/kg K , specific heat\n", + "T = 87.5 \t\t\t#C\n", + "mu1 = math.exp(-6.106+1353/(T+273)+5.112*10**-3*(T+273)-4.552*10**-6*((T+273)**2))\n", + "k1 = 0.2142-(3.44*10**-4)*(T+273)+(1.947*10**-7)*(T+273)**2\n", + "k1_ = k1*0.86 \t\t\t#kcal/h m K\n", + "#properties of water\n", + "rho2 = 993. \t\t\t#kg/m**3, density\n", + "mu2 = 8*10.**-4 \t\t\t#kg/m s , vismath.cosity \n", + "cp2 = 4.175 \t\t\t#kj/kg K , specific heat\n", + "k2 = 0.623 \t\t\t#W/m K, thermal conductivity\n", + "k2_ = k2*0.8603 \t\t\t#kcal/h m**2 K\n", + "#Calculation\n", + "#(i) Energy balance\n", + "Cp = Cp*1000./24 \t\t\t#kg/h, plant capacity\n", + "Cp = 2083. \t\t\t#approx.\n", + "HD = Cp*cp1*dt1 \t\t\t#kj/h, Heat duty \n", + "HD_ = HD*0.238837 \t\t\t#kcal/h\n", + "wfr = HD/(cp2*dt2)\n", + "\n", + "#(ii)\n", + "mu1 = mu1 \t\t\t#cP, vismath.cosity of ethylbenzene\n", + "k1 = k1 \t\t\t#W/m K, thermal conductivity of ethylbenzene\n", + "\n", + "#(iii)\n", + "#LMTD calculation\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2)\n", + "#assume\n", + "Udo = 350. \t\t\t#kcal/h m**2 C, overall coefficient\n", + "A = HD_/(Udo*LMTD) \t\t\t#m**2, area required\n", + "\n", + "#(iv)\n", + "id_ = 15.7 \t\t\t#mm, internal diameter of tube\n", + "od = 19. \t\t\t#mm, outer diameter of tube\n", + "l = 3000. \t\t\t#mm, length\n", + "OSA = math.pi*(od*10**-3)*(l*10**-3) \t\t\t#m**2. outer surface area\n", + "n = A/OSA \t\t\t#no. of tubes required\n", + "fa = n*(math.pi/4)*(id_*10**-3)**2 \t\t\t#m**2, flow arae\n", + "lv = (wfr/1000)/(3600*fa) \t\t\t#m/s, linear velocity\n", + "\n", + "#(v)\n", + "n1 = 44. \t\t\t#total no. of tubes that can be accomodated in a 10 inch shell\n", + "np = 11. \t\t\t#no. of tubes in each pass\n", + "#(vi)\n", + "bf = 0.15 \t\t\t#m, baffel spacing\n", + "#(vii)\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "fa1 = (math.pi/4)*(id_*10**-3)**2*np \t\t\t#m**2, flow area\n", + "v1 = (wfr/1000.)/(3600*fa1) \t\t\t#m/s, velocity\n", + "Re = (id_*10**-3)*v1*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jh = 85. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hi = jh*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1/3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side(organic)\n", + "B = bf \t\t\t#m, baffel spacing\n", + "p = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds = 0.254 \t\t\t#m, inside diameter of shell\n", + "c = 0.0064 \n", + "#from eq. 8.32\n", + "As = c*B*Ds/p \t\t\t#m**2, flow area\n", + "Gs = Cp/As \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.31\n", + "Dh = 4*((0.5*p*100)*(0.86*p*100)-((math.pi*(do)**2)/8))/((math.pi*do)/2)\n", + "Dh_ = Dh*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re1 = (Dh_*Gs)/(3600*(mu1*10**-3)) \t\t\t#Reynold no.\n", + "#from fig 8.11(b)\n", + "jh1 = 32 \t\t\t#colburn factor\n", + "ho = jh1*(k1_/Dh_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo = 1/((1/ho)+Rdo+(ratio)*Rdi+(ratio)*(1/hi))\n", + "\n", + "#SECOND TRIAL\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "np1 = 12 \t\t\t#\n", + "fa2 = (math.pi/4)*(id_*10**-3)**2*np1 \t\t\t#m**2, flow area\n", + "v2 = (wfr/1000)/(3600*fa2) \t\t\t#m/s, velocity\n", + "Re2 = (id_*10**-3)*v2*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jht = 83. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hit = jht*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1./3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side\n", + "B2 = 0.1 \t\t\t#m, baffel spacing\n", + "p2 = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds2 = 0.254 \t\t\t#m, inside diameter of shell\n", + "c2 = .0064\n", + "#from eq. 8.32\n", + "As2 = c2*B2*Ds2/p2 \t\t\t#m**2, flow area\n", + "Gs2 = Cp/As2 \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do2 = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.30\n", + "Dh2 = 4*((p2*100)**2-((math.pi*(do2)**2)/4))/((math.pi*do2))\n", + "Dh2_ = Dh2*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re2 = (Dh2_*Gs2)/(3600*(mu1*10**-3))\n", + "#from fig 8.11(b)\n", + "jh2 = 48 \t\t\t#colburn factor\n", + "ho2 = jh2*(k1_/Dh2_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo2 = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi2 = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo2 = 1/((1/ho2)+Rdo+(ratio)*Rdi+(ratio)*(1/hit))\n", + "\n", + "#from eq. 8.10(a)\n", + "tauc = (T2-T3)/(T1-T3) \t\t\t#Temprature ratio\n", + "R = (T1-T2)/(T2-T3) \t\t\t#Temprature ratio\n", + "Ft = 0.8 \t\t\t#LMTD correction ftor\n", + "Areq = HD_/(Udo2*Ft*LMTD) \t\t\t#area required\n", + "tubes = 48. \t\t\t#no. of tubes\n", + "lnt = 4.5 \t\t\t#length of 1 tube\n", + "Aavl = (math.pi*od*10**-3)*tubes*lnt \t\t\t#available area\n", + "excA = ((Aavl-Areq)/Areq)*100 \t\t\t#% excess area\n", + "\n", + "#Pressure drop calculation\n", + "#Tube side\n", + "#from eq. 8.33\n", + "Gt = wfr/(3600*fa2) \t\t\t#kg/m**2 s, mass flow rate of tube fluid\n", + "n2 = 4. \t\t\t#tube passes\n", + "fit = 1. \t\t\t#dimensionless vismath.cosity ratio\n", + "g = 9.8 \t\t\t#gravitational consmath.tant\n", + "f = 0.0037 \t\t\t#friction factor\n", + "dpt = f*Gt**2*lnt*n2/(2*g*rho2*id_*10**-3*fit) \t\t\t#kg/m**2, tube side pressure drop\n", + "\n", + "#eq.8.35\n", + "dpr = 4*n2*v2**2*rho2/(2*g) \t\t\t#kg/m**2, return tube pressure loss\n", + "dpr_ = dpr*9.801 \t\t\t#N/m**2\n", + "tpr = dpt+dpr \t\t\t#kg/m**2, total pressure drop\n", + "#shell side\n", + "fs = 0.052 \t\t\t#friction factor for shell\n", + "bf1 = 0.1 \t\t\t#m, baffel spacing\n", + "Nb = lnt/bf1-1 \t\t\t#no. of baffles\n", + "dps = fs*(Gs2/3600)**2*Ds*(Nb+1)/(2*g*rho1*Dh2_*fit) \t\t\t#kg/m**2, shell side pressure drop\n", + "dps_ = dps*9.81 \t\t\t#N/m**2, shell side pressure drop\n", + "print \"Tube side Pressure drop is %1.3e N/m**2 \"%(dpr_)\n", + "print \"Shell side Pressure drop is %.0f N/m**2 \"%(round(dps_,-1))\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tube side Pressure drop is 1.118e+04 N/m**2 \n", + "Shell side Pressure drop is 120 N/m**2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#for hot stream\n", + "Wh = 10000. \t\t\t#kg/h, Rate of leaving a hydrolic system by the oil\n", + "Cph = 0.454 \t\t\t#Kcal/Kg C, specific heat of oil\n", + "Th1 = 85. \t\t\t#C initial temp. of oil\n", + "Th2 = 50. \t\t\t#C final temp. of oil \n", + "\n", + "#For cold stream\n", + "Cpc = 1. \t\t\t#Kcal/Kg C, specific heat of water\n", + "Tc2 = 30. \t\t\t#C final temp. of water\n", + "Tc1 = 38. \t\t\t#C initial temp. of water\n", + "\n", + "# Calculations\n", + "#from heat balance eq.\n", + "#kg/h, Rate of leaving a hydrolic system by the water\n", + "Wc = Wh*Cph*(Th1-Th2)/(Cpc*(Tc1-Tc2))\n", + "#For the hot stream\n", + "Cmin = Wh*Cph \t\t\t#Kcal/h C.Taking hot stream as min. stream\n", + "#For cold stream\n", + "Cmax = Wc*Cpc \t\t\t#Kcal/h C.Taking cold stream as max. stream\n", + "Cr = Cmin/Cmax \t\t\t#Capacity ratio\n", + "n = (Th1-Th2)/(Th1-Tc2) \t\t\t#effectiveness factor\n", + "#From eq. 8.57\n", + "#No. of transfer units\n", + "NTU = -(1+(Cr)**2)**-(1./2)*math.log(((2/n)-(1+Cr)-(1+(Cr)**2)**(1./2))/((2./n)-(1+Cr)+(1+(Cr)**2)**(1./2)))\n", + "Ud = 400. \t\t\t#kcal/h m**2C , overall dirty heat transfer coefficient\n", + "#from eq. 8.53\n", + "A = (NTU*Cmin)/Ud \t\t\t#Area required\n", + "#if the water rate is increased by 20 %,\n", + "a = 20.\n", + "Wc_ = Wc+(Wc*(a/100))\n", + "Cmax_ = Wc_*Cpc\n", + "Cr_ = Cmin/Cmax_\n", + "#From eq. 8.56\n", + "n_ = 2*((1+Cr_)+(1+(Cr_)**2)**(1./2)*(1+math.exp(-(1+(Cr_)**2)**(1./2)*NTU))/(1-math.exp(-(1+(Cr_)**2)**(1./2)*NTU)))**(-1)\n", + "Th2_ = Th1-(n_*(Th1-Tc2))\n", + "q1 = Wh*Cph*(Th1-Th2) \t\t\t#kcal/h previous rate of heat transfer\n", + "q2 = Wh*Cph*(Th1-Th2_) \t\t\t#kcal/h new rate of heat transfer\n", + "#increase in rate of heat transfer\n", + "dq = (q2-q1)/q1 \n", + "\n", + "# Results\n", + "print \"Th2 = %.1f C\"%Th2_\n", + "print \"The new rate of heat transfer : %d kcal/h\"%q2\n", + "print \"the heat teansfer rate will be affected by %.1f percent \"%(dq*100 )\n", + "\n", + "# note : rounding off error would be there." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Th2 = 49.5 C\n", + "The new rate of heat transfer : 161003 kcal/h\n", + "the heat teansfer rate will be affected by 1.3 percent \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "p = 0.0795 \t\t\t#m. pitch of the coil\n", + "d1 = 0.0525 \t\t\t#m,coil diameter\n", + "h = 1.464 \t\t\t#m,height of the limpetted section\n", + "d2 = 1.5 \t\t\t#m,diameter of batch polymerization reactor\n", + "d3 = 0.5 \t\t\t#m,diameter of agitator\n", + "rpm = 150. \t\t\t#speed of agitator\n", + "rho = 850. \t\t\t#kg/m3,density of monomer\n", + "rho1 = 900. \t\t\t#kg/m3,density of fluid\n", + "mu = 0.7*10**-3 \t\t\t#poise, vismath.cosity of monomer\n", + "mu1 = 4*10.**-3 \t\t\t#poise, vismath.cosity of fluid\n", + "cp = 0.45 \t\t\t#kcal/kg C, specific heat of monomer\n", + "cp1 = 0.5 \t\t\t#kcal/kg C, specific heat of fluid\n", + "k = 0.15 \t\t\t#kcal/h mC, thermal conductivity of monomer\n", + "k1 = 0.28 \t\t\t#kcal/h mC, thermal conductivity of fluid\n", + "Rdi = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for vessel\n", + "Rdc = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for coil\n", + "Tci = 120. \t\t\t#C, initial temp. of coil liquid\n", + "Tvi = 25. \t\t\t#C, initial temp. of vessel liquid\n", + "Tvf = 80. \t\t\t#C, final temp. of vessel liquid\n", + "\n", + "#calculation\n", + "a = math.pi*d2*h \t\t\t#outside area of the vessel\n", + "x = 60. \t\t\t#%. added of the unwetted area to the wetted area\n", + "ao = ((d1+(x/100)*(p-d1))/p)*a \t\t\t#m**2,effective outside heat transfer area of vessel\n", + "ai = 6.9 \t\t\t#m**2,inside heat transfer area of vessel\n", + "#same as outside area , if thickness is very small\n", + "#vessel side heat transfer coefficient\n", + "Re = (d3**2*(rpm/60)*rho)/mu \t\t\t#reynold no.\n", + "Pr = ((cp*3600)*(mu))/k\n", + "#from eq. 8.66\n", + "y = 1 \t\t\t#x = mu/muw = 1\n", + "Nu = 0.74*(Re**(0.67))*(Pr**(0.33))*(y**(0.14)) \t\t\t#Nusslet no\n", + "hi = Nu*(k/d2) \t\t\t#heat transfer coefficient\n", + "\n", + "#coil side heat transfer coefficient\n", + "v = 1.5 \t\t\t#m/s, linear velocity of fluid\n", + "fa = ((math.pi/4)*d1**2) \t\t\t#m2, flow area of coil\n", + "fr = v*fa*3600 \t\t\t#m3/h , flow rate of the fluid\n", + "Wc = fr*rho \t\t\t#kg/h , flow rate\n", + "dh = (4*(math.pi/8)*d1**2)/(d1+(math.pi/2)*d1) \t\t\t#m,hydrolic diameter of limpet coil\n", + "Re1 = v*rho1*dh/mu1 \t\t\t#coil reynold no.\n", + "Pr1 = cp1*mu1*3600/k1 \t\t\t#prandtl no. of the coil fluid\n", + "#from eq. 8.68\n", + "d4 = 0.0321 \t\t\t#m, inside diameter of the tube\n", + "Nu1 = 0.021*(Re1**(0.85)*Pr1**(0.4)*(d4/d2)**(0.1)*y**0.14) \n", + "hc = Nu1*(k1/dh) \t\t\t#coil side coefficient\n", + "\n", + "U = 1/((1/hi)+(ai/(hc*ao))+Rdi+Rdc) \t\t\t#overall heat transfer corfficient\n", + "#from eq. 8.63\n", + "beeta = math.exp(U*ai/(Wc*cp1))\n", + "Wv = 2200. \t\t\t#kg, mass of fluid vessel\n", + "t = (beeta/(beeta-1))*((Wv*cp)/(Wc*cp1))*math.log((Tci-Tvi)/(Tci-Tvf)) \n", + "\n", + "# Results\n", + "print \"the time required to heat the charge %.0f min\"%(t*60)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the time required to heat the charge 22 min\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_1.ipynb new file mode 100755 index 00000000..2199b9bd --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_1.ipynb @@ -0,0 +1,489 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:569b39eccca34c26fda2a96be72a801e57b24dc25cef982f78e922cfedfaf0c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Heat Exchanger" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#for Benzene\n", + "Mb = 1000. \t\t\t#Kg, mass of benzene\n", + "T1 = 75. \t\t\t#C initial temp. of benzene\n", + "T2 = 50. \t\t\t#C final temp. of benzene\n", + "Cp1 = 1.88 \t\t\t#Kj/Kg C. specific heat of benzene\n", + "mu1 = 0.37 \t\t\t#cP. vismath.cosity of benzene\n", + "rho1 = 860. \t\t\t#kg/m**3, density\n", + "k1 = 0.154 \t\t\t#W/m K. thermal conductivity\n", + "\n", + "#for water\n", + "Tav = 35. \t\t\t#C av, temp.\n", + "Cp2 = 4.187 \t\t\t#specific heat\n", + "mu2 = 0.8 \t\t\t#cP. vismath.cosity\n", + "k2 = 0.623 \t\t\t#W/m K. thermal conductivity\n", + "T3 = 30. \t\t\t#C. initial temp.\n", + "T4 = 40. \t\t\t#C final temp.\n", + "\n", + "#Calculation and Results\n", + "#(a)\n", + "HD = Mb*Cp1*(T1-T2) \t\t\t#Kj/h, heat duty\n", + "WR = HD/(Cp2*(T4-T3)) \t\t\t#kg/h Water rate\n", + "print \"the heat duty of the exchanger is %.0f kj/h\"%(HD)\n", + "print \"the water flow rate is %d kg/h\"%(WR)\n", + "\n", + "#(b)\n", + "#tube side (water) calculations\n", + "# Variables\n", + "di1 = 21. \t\t\t#mm, inner diameter of inner tube \n", + "do1 = 25.4 \t\t\t#mm, outer dia. of inner tube\n", + "t = 2.2 \t\t\t#mm/ wall thickness\n", + "kw = 74.5 \t\t\t#W/m K. thermal conductivity of the wall\n", + "di2 = 41. \t\t\t#mm, inner diameter of outer pipe\n", + "do2 = 48. \t\t\t#mm, outer diameter of outer pipe\n", + "\n", + "FA1 = (math.pi/4)*(di1*10**-3)**2 \t\t\t#m**2, flow area\n", + "FR1 = WR/1000.\n", + "v1 = FR1/(FA1*3600) \t\t\t#m/s, velocity\n", + "Re1 = (di1*10**-3)*v1*1000/(mu2*10**-3) \t\t\t#Reynold no.\n", + "Pr1 = Cp2*1000*(mu2*10**-3)/k2 \t\t\t#Prandtl no.\n", + "#umath.sing dittus boelter eq.\n", + "Nu1 = 0.023*(Re1)**(0.8)*(Pr1)**(0.3) \t\t\t#nusslet no.\n", + "h1 = round(Nu1*k2/(di1*10**-3),-1) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#Outer side (benzene) calculation\n", + "FA2 = (math.pi/4)*(di2*10**-3)**2-(math.pi/4)*(do1*10**-3)**2 \t\t\t#flow area\n", + "wp = math.pi*(di2*10**-3+do1*10**-3) \t\t\t#wettwd perimeter\n", + "dh = 4*FA2/wp \t\t\t#hydrolic diameter\n", + "bfr = Mb/rho1 \t\t\t#m**3/h benzene flow rate\n", + "v2 = bfr/(FA2*3600) \t\t\t#m/s, velocity\n", + "Re2 = dh*v2*rho1/(mu1*10**-3) \t\t\t#Reynold no\n", + "Pr2 = Cp1*10**3*(mu1*10**-3)/k1 \t\t\t#Prandtl no.\n", + "Nu2 = 0.023*(Re2)**(0.8)*(Pr2)**(0.4) \t\t\t#nusslet no.\n", + "h2 = Nu2*k1/(dh) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "print \"heat transfer coefficient based on inside area is %.0f W/m**2 C \"%(h1)\n", + "print \"heat transfer coefficient based on outside area is %.1f W/m**2 C \"%(h2)\n", + "\n", + "#Calculation of clean overall heat transfer coefficient, outside area basis\n", + "#from eq. 8.28\n", + "# Variables\n", + "l = 1. \t\t\t#assume , length\n", + "Ao = math.pi*do1*10**-3*l\n", + "Ai = math.pi*di1*10**-3*l\n", + "Am = (do1*10**-3-di1*10**-3)*math.pi*l/(math.log(do1*10**-3/(di1*10**-3)))\n", + "\n", + "#overall heat transfer coefficient\n", + "Uo = 1/((1/h2)+(Ao/Am)*((do1*10**-3-di1*10**-3)/(2*kw))+(Ao/Ai)*(1/h1))\n", + "Ui = Uo*Ao/Ai\n", + "\n", + "#Calculation of LMTD\n", + "dt1 = T1-T4\n", + "dt2 = T2-T3\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2) \t\t\t#math.log mean temp. difference correction factor\n", + "Q = HD*1000/3600 \t\t\t#W, heat required\n", + "Ao_ = Q/(Uo*LMTD) \t\t\t#m**@, required area\n", + "len = Ao_/(math.pi*do1*10**(-3)) \t\t\t#m, tube length necessary\n", + "\n", + "#(c)\n", + "la = 15. \t\t\t#m ,actual length\n", + "Aht = (math.pi*do1*10**(-3)*la)\n", + "Udo = Q/(Aht*LMTD) \t\t\t#W/m**2 C, overall heat transfer coefficient with dirt factor\n", + "#from eq. 8.2\n", + "Rdo = (1/Udo)-(1/Uo) \t\t\t#m**2 C/W\n", + "print \"overall heat transfer coefficient outside area basis is %.1f W/m**2 C \"%(Uo)\n", + "print \"overall heat transfer coefficient inside area basis is %.1f W/m**2 C \"%(Ui)\n", + "print \"The fouling factor is %f m**2 C/W\"%(Rdo)\n", + "\n", + "# note : rounding off error. please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat duty of the exchanger is 47000 kj/h\n", + "the water flow rate is 1122 kg/h\n", + "heat transfer coefficient based on inside area is 3560 W/m**2 C \n", + "heat transfer coefficient based on outside area is 880.3 W/m**2 C \n", + "overall heat transfer coefficient outside area basis is 663.1 W/m**2 C \n", + "overall heat transfer coefficient inside area basis is 802.0 W/m**2 C \n", + "The fouling factor is 0.000949 m**2 C/W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Cp = 50. \t\t\t#tpd, plant capacity\n", + "T1 = 135. \t\t\t#C, Temp.\n", + "T2 = 40. \t\t\t#C temp.\n", + "T3 = 30. \t\t\t#C temp.\n", + "dt1 = (T1-T2) \t\t\t#C hot end temp. \n", + "dt2 = (T2-T3) \t\t\t#C cold end temp.\n", + "#Properties of ethylbenzene\n", + "rho1 = 840. \t\t\t#kg/m**3, density\n", + "cp1 = 2.093 \t\t\t#kj/kg K , specific heat\n", + "T = 87.5 \t\t\t#C\n", + "mu1 = math.exp(-6.106+1353/(T+273)+5.112*10**-3*(T+273)-4.552*10**-6*((T+273)**2))\n", + "k1 = 0.2142-(3.44*10**-4)*(T+273)+(1.947*10**-7)*(T+273)**2\n", + "k1_ = k1*0.86 \t\t\t#kcal/h m K\n", + "#properties of water\n", + "rho2 = 993. \t\t\t#kg/m**3, density\n", + "mu2 = 8*10.**-4 \t\t\t#kg/m s , vismath.cosity \n", + "cp2 = 4.175 \t\t\t#kj/kg K , specific heat\n", + "k2 = 0.623 \t\t\t#W/m K, thermal conductivity\n", + "k2_ = k2*0.8603 \t\t\t#kcal/h m**2 K\n", + "#Calculation\n", + "#(i) Energy balance\n", + "Cp = Cp*1000./24 \t\t\t#kg/h, plant capacity\n", + "Cp = 2083. \t\t\t#approx.\n", + "HD = Cp*cp1*dt1 \t\t\t#kj/h, Heat duty \n", + "HD_ = HD*0.238837 \t\t\t#kcal/h\n", + "wfr = HD/(cp2*dt2)\n", + "\n", + "#(ii)\n", + "mu1 = mu1 \t\t\t#cP, vismath.cosity of ethylbenzene\n", + "k1 = k1 \t\t\t#W/m K, thermal conductivity of ethylbenzene\n", + "\n", + "#(iii)\n", + "#LMTD calculation\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2)\n", + "#assume\n", + "Udo = 350. \t\t\t#kcal/h m**2 C, overall coefficient\n", + "A = HD_/(Udo*LMTD) \t\t\t#m**2, area required\n", + "\n", + "#(iv)\n", + "id_ = 15.7 \t\t\t#mm, internal diameter of tube\n", + "od = 19. \t\t\t#mm, outer diameter of tube\n", + "l = 3000. \t\t\t#mm, length\n", + "OSA = math.pi*(od*10**-3)*(l*10**-3) \t\t\t#m**2. outer surface area\n", + "n = A/OSA \t\t\t#no. of tubes required\n", + "fa = n*(math.pi/4)*(id_*10**-3)**2 \t\t\t#m**2, flow arae\n", + "lv = (wfr/1000)/(3600*fa) \t\t\t#m/s, linear velocity\n", + "\n", + "#(v)\n", + "n1 = 44. \t\t\t#total no. of tubes that can be accomodated in a 10 inch shell\n", + "np = 11. \t\t\t#no. of tubes in each pass\n", + "#(vi)\n", + "bf = 0.15 \t\t\t#m, baffel spacing\n", + "#(vii)\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "fa1 = (math.pi/4)*(id_*10**-3)**2*np \t\t\t#m**2, flow area\n", + "v1 = (wfr/1000.)/(3600*fa1) \t\t\t#m/s, velocity\n", + "Re = (id_*10**-3)*v1*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jh = 85. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hi = jh*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1/3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side(organic)\n", + "B = bf \t\t\t#m, baffel spacing\n", + "p = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds = 0.254 \t\t\t#m, inside diameter of shell\n", + "c = 0.0064 \n", + "#from eq. 8.32\n", + "As = c*B*Ds/p \t\t\t#m**2, flow area\n", + "Gs = Cp/As \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.31\n", + "Dh = 4*((0.5*p*100)*(0.86*p*100)-((math.pi*(do)**2)/8))/((math.pi*do)/2)\n", + "Dh_ = Dh*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re1 = (Dh_*Gs)/(3600*(mu1*10**-3)) \t\t\t#Reynold no.\n", + "#from fig 8.11(b)\n", + "jh1 = 32 \t\t\t#colburn factor\n", + "ho = jh1*(k1_/Dh_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo = 1/((1/ho)+Rdo+(ratio)*Rdi+(ratio)*(1/hi))\n", + "\n", + "#SECOND TRIAL\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "np1 = 12 \t\t\t#\n", + "fa2 = (math.pi/4)*(id_*10**-3)**2*np1 \t\t\t#m**2, flow area\n", + "v2 = (wfr/1000)/(3600*fa2) \t\t\t#m/s, velocity\n", + "Re2 = (id_*10**-3)*v2*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jht = 83. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hit = jht*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1./3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side\n", + "B2 = 0.1 \t\t\t#m, baffel spacing\n", + "p2 = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds2 = 0.254 \t\t\t#m, inside diameter of shell\n", + "c2 = .0064\n", + "#from eq. 8.32\n", + "As2 = c2*B2*Ds2/p2 \t\t\t#m**2, flow area\n", + "Gs2 = Cp/As2 \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do2 = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.30\n", + "Dh2 = 4*((p2*100)**2-((math.pi*(do2)**2)/4))/((math.pi*do2))\n", + "Dh2_ = Dh2*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re2 = (Dh2_*Gs2)/(3600*(mu1*10**-3))\n", + "#from fig 8.11(b)\n", + "jh2 = 48 \t\t\t#colburn factor\n", + "ho2 = jh2*(k1_/Dh2_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo2 = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi2 = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo2 = 1/((1/ho2)+Rdo+(ratio)*Rdi+(ratio)*(1/hit))\n", + "\n", + "#from eq. 8.10(a)\n", + "tauc = (T2-T3)/(T1-T3) \t\t\t#Temprature ratio\n", + "R = (T1-T2)/(T2-T3) \t\t\t#Temprature ratio\n", + "Ft = 0.8 \t\t\t#LMTD correction ftor\n", + "Areq = HD_/(Udo2*Ft*LMTD) \t\t\t#area required\n", + "tubes = 48. \t\t\t#no. of tubes\n", + "lnt = 4.5 \t\t\t#length of 1 tube\n", + "Aavl = (math.pi*od*10**-3)*tubes*lnt \t\t\t#available area\n", + "excA = ((Aavl-Areq)/Areq)*100 \t\t\t#% excess area\n", + "\n", + "#Pressure drop calculation\n", + "#Tube side\n", + "#from eq. 8.33\n", + "Gt = wfr/(3600*fa2) \t\t\t#kg/m**2 s, mass flow rate of tube fluid\n", + "n2 = 4. \t\t\t#tube passes\n", + "fit = 1. \t\t\t#dimensionless vismath.cosity ratio\n", + "g = 9.8 \t\t\t#gravitational consmath.tant\n", + "f = 0.0037 \t\t\t#friction factor\n", + "dpt = f*Gt**2*lnt*n2/(2*g*rho2*id_*10**-3*fit) \t\t\t#kg/m**2, tube side pressure drop\n", + "\n", + "#eq.8.35\n", + "dpr = 4*n2*v2**2*rho2/(2*g) \t\t\t#kg/m**2, return tube pressure loss\n", + "dpr_ = dpr*9.801 \t\t\t#N/m**2\n", + "tpr = dpt+dpr \t\t\t#kg/m**2, total pressure drop\n", + "#shell side\n", + "fs = 0.052 \t\t\t#friction factor for shell\n", + "bf1 = 0.1 \t\t\t#m, baffel spacing\n", + "Nb = lnt/bf1-1 \t\t\t#no. of baffles\n", + "dps = fs*(Gs2/3600)**2*Ds*(Nb+1)/(2*g*rho1*Dh2_*fit) \t\t\t#kg/m**2, shell side pressure drop\n", + "dps_ = dps*9.81 \t\t\t#N/m**2, shell side pressure drop\n", + "print \"Tube side Pressure drop is %1.3e N/m**2 \"%(dpr_)\n", + "print \"Shell side Pressure drop is %.0f N/m**2 \"%(round(dps_,-1))\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tube side Pressure drop is 1.118e+04 N/m**2 \n", + "Shell side Pressure drop is 120 N/m**2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#for hot stream\n", + "Wh = 10000. \t\t\t#kg/h, Rate of leaving a hydrolic system by the oil\n", + "Cph = 0.454 \t\t\t#Kcal/Kg C, specific heat of oil\n", + "Th1 = 85. \t\t\t#C initial temp. of oil\n", + "Th2 = 50. \t\t\t#C final temp. of oil \n", + "\n", + "#For cold stream\n", + "Cpc = 1. \t\t\t#Kcal/Kg C, specific heat of water\n", + "Tc2 = 30. \t\t\t#C final temp. of water\n", + "Tc1 = 38. \t\t\t#C initial temp. of water\n", + "\n", + "# Calculations\n", + "#from heat balance eq.\n", + "#kg/h, Rate of leaving a hydrolic system by the water\n", + "Wc = Wh*Cph*(Th1-Th2)/(Cpc*(Tc1-Tc2))\n", + "#For the hot stream\n", + "Cmin = Wh*Cph \t\t\t#Kcal/h C.Taking hot stream as min. stream\n", + "#For cold stream\n", + "Cmax = Wc*Cpc \t\t\t#Kcal/h C.Taking cold stream as max. stream\n", + "Cr = Cmin/Cmax \t\t\t#Capacity ratio\n", + "n = (Th1-Th2)/(Th1-Tc2) \t\t\t#effectiveness factor\n", + "#From eq. 8.57\n", + "#No. of transfer units\n", + "NTU = -(1+(Cr)**2)**-(1./2)*math.log(((2/n)-(1+Cr)-(1+(Cr)**2)**(1./2))/((2./n)-(1+Cr)+(1+(Cr)**2)**(1./2)))\n", + "Ud = 400. \t\t\t#kcal/h m**2C , overall dirty heat transfer coefficient\n", + "#from eq. 8.53\n", + "A = (NTU*Cmin)/Ud \t\t\t#Area required\n", + "#if the water rate is increased by 20 %,\n", + "a = 20.\n", + "Wc_ = Wc+(Wc*(a/100))\n", + "Cmax_ = Wc_*Cpc\n", + "Cr_ = Cmin/Cmax_\n", + "#From eq. 8.56\n", + "n_ = 2*((1+Cr_)+(1+(Cr_)**2)**(1./2)*(1+math.exp(-(1+(Cr_)**2)**(1./2)*NTU))/(1-math.exp(-(1+(Cr_)**2)**(1./2)*NTU)))**(-1)\n", + "Th2_ = Th1-(n_*(Th1-Tc2))\n", + "q1 = Wh*Cph*(Th1-Th2) \t\t\t#kcal/h previous rate of heat transfer\n", + "q2 = Wh*Cph*(Th1-Th2_) \t\t\t#kcal/h new rate of heat transfer\n", + "#increase in rate of heat transfer\n", + "dq = (q2-q1)/q1 \n", + "\n", + "# Results\n", + "print \"Th2 = %.1f C\"%Th2_\n", + "print \"The new rate of heat transfer : %d kcal/h\"%q2\n", + "print \"the heat teansfer rate will be affected by %.1f percent \"%(dq*100 )\n", + "\n", + "# note : rounding off error would be there." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Th2 = 49.5 C\n", + "The new rate of heat transfer : 161003 kcal/h\n", + "the heat teansfer rate will be affected by 1.3 percent \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "p = 0.0795 \t\t\t#m. pitch of the coil\n", + "d1 = 0.0525 \t\t\t#m,coil diameter\n", + "h = 1.464 \t\t\t#m,height of the limpetted section\n", + "d2 = 1.5 \t\t\t#m,diameter of batch polymerization reactor\n", + "d3 = 0.5 \t\t\t#m,diameter of agitator\n", + "rpm = 150. \t\t\t#speed of agitator\n", + "rho = 850. \t\t\t#kg/m3,density of monomer\n", + "rho1 = 900. \t\t\t#kg/m3,density of fluid\n", + "mu = 0.7*10**-3 \t\t\t#poise, vismath.cosity of monomer\n", + "mu1 = 4*10.**-3 \t\t\t#poise, vismath.cosity of fluid\n", + "cp = 0.45 \t\t\t#kcal/kg C, specific heat of monomer\n", + "cp1 = 0.5 \t\t\t#kcal/kg C, specific heat of fluid\n", + "k = 0.15 \t\t\t#kcal/h mC, thermal conductivity of monomer\n", + "k1 = 0.28 \t\t\t#kcal/h mC, thermal conductivity of fluid\n", + "Rdi = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for vessel\n", + "Rdc = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for coil\n", + "Tci = 120. \t\t\t#C, initial temp. of coil liquid\n", + "Tvi = 25. \t\t\t#C, initial temp. of vessel liquid\n", + "Tvf = 80. \t\t\t#C, final temp. of vessel liquid\n", + "\n", + "#calculation\n", + "a = math.pi*d2*h \t\t\t#outside area of the vessel\n", + "x = 60. \t\t\t#%. added of the unwetted area to the wetted area\n", + "ao = ((d1+(x/100)*(p-d1))/p)*a \t\t\t#m**2,effective outside heat transfer area of vessel\n", + "ai = 6.9 \t\t\t#m**2,inside heat transfer area of vessel\n", + "#same as outside area , if thickness is very small\n", + "#vessel side heat transfer coefficient\n", + "Re = (d3**2*(rpm/60)*rho)/mu \t\t\t#reynold no.\n", + "Pr = ((cp*3600)*(mu))/k\n", + "#from eq. 8.66\n", + "y = 1 \t\t\t#x = mu/muw = 1\n", + "Nu = 0.74*(Re**(0.67))*(Pr**(0.33))*(y**(0.14)) \t\t\t#Nusslet no\n", + "hi = Nu*(k/d2) \t\t\t#heat transfer coefficient\n", + "\n", + "#coil side heat transfer coefficient\n", + "v = 1.5 \t\t\t#m/s, linear velocity of fluid\n", + "fa = ((math.pi/4)*d1**2) \t\t\t#m2, flow area of coil\n", + "fr = v*fa*3600 \t\t\t#m3/h , flow rate of the fluid\n", + "Wc = fr*rho \t\t\t#kg/h , flow rate\n", + "dh = (4*(math.pi/8)*d1**2)/(d1+(math.pi/2)*d1) \t\t\t#m,hydrolic diameter of limpet coil\n", + "Re1 = v*rho1*dh/mu1 \t\t\t#coil reynold no.\n", + "Pr1 = cp1*mu1*3600/k1 \t\t\t#prandtl no. of the coil fluid\n", + "#from eq. 8.68\n", + "d4 = 0.0321 \t\t\t#m, inside diameter of the tube\n", + "Nu1 = 0.021*(Re1**(0.85)*Pr1**(0.4)*(d4/d2)**(0.1)*y**0.14) \n", + "hc = Nu1*(k1/dh) \t\t\t#coil side coefficient\n", + "\n", + "U = 1/((1/hi)+(ai/(hc*ao))+Rdi+Rdc) \t\t\t#overall heat transfer corfficient\n", + "#from eq. 8.63\n", + "beeta = math.exp(U*ai/(Wc*cp1))\n", + "Wv = 2200. \t\t\t#kg, mass of fluid vessel\n", + "t = (beeta/(beeta-1))*((Wv*cp)/(Wc*cp1))*math.log((Tci-Tvi)/(Tci-Tvf)) \n", + "\n", + "# Results\n", + "print \"the time required to heat the charge %.0f min\"%(t*60)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the time required to heat the charge 22 min\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_2.ipynb new file mode 100755 index 00000000..2199b9bd --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch8_2.ipynb @@ -0,0 +1,489 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:569b39eccca34c26fda2a96be72a801e57b24dc25cef982f78e922cfedfaf0c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Heat Exchanger" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "#for Benzene\n", + "Mb = 1000. \t\t\t#Kg, mass of benzene\n", + "T1 = 75. \t\t\t#C initial temp. of benzene\n", + "T2 = 50. \t\t\t#C final temp. of benzene\n", + "Cp1 = 1.88 \t\t\t#Kj/Kg C. specific heat of benzene\n", + "mu1 = 0.37 \t\t\t#cP. vismath.cosity of benzene\n", + "rho1 = 860. \t\t\t#kg/m**3, density\n", + "k1 = 0.154 \t\t\t#W/m K. thermal conductivity\n", + "\n", + "#for water\n", + "Tav = 35. \t\t\t#C av, temp.\n", + "Cp2 = 4.187 \t\t\t#specific heat\n", + "mu2 = 0.8 \t\t\t#cP. vismath.cosity\n", + "k2 = 0.623 \t\t\t#W/m K. thermal conductivity\n", + "T3 = 30. \t\t\t#C. initial temp.\n", + "T4 = 40. \t\t\t#C final temp.\n", + "\n", + "#Calculation and Results\n", + "#(a)\n", + "HD = Mb*Cp1*(T1-T2) \t\t\t#Kj/h, heat duty\n", + "WR = HD/(Cp2*(T4-T3)) \t\t\t#kg/h Water rate\n", + "print \"the heat duty of the exchanger is %.0f kj/h\"%(HD)\n", + "print \"the water flow rate is %d kg/h\"%(WR)\n", + "\n", + "#(b)\n", + "#tube side (water) calculations\n", + "# Variables\n", + "di1 = 21. \t\t\t#mm, inner diameter of inner tube \n", + "do1 = 25.4 \t\t\t#mm, outer dia. of inner tube\n", + "t = 2.2 \t\t\t#mm/ wall thickness\n", + "kw = 74.5 \t\t\t#W/m K. thermal conductivity of the wall\n", + "di2 = 41. \t\t\t#mm, inner diameter of outer pipe\n", + "do2 = 48. \t\t\t#mm, outer diameter of outer pipe\n", + "\n", + "FA1 = (math.pi/4)*(di1*10**-3)**2 \t\t\t#m**2, flow area\n", + "FR1 = WR/1000.\n", + "v1 = FR1/(FA1*3600) \t\t\t#m/s, velocity\n", + "Re1 = (di1*10**-3)*v1*1000/(mu2*10**-3) \t\t\t#Reynold no.\n", + "Pr1 = Cp2*1000*(mu2*10**-3)/k2 \t\t\t#Prandtl no.\n", + "#umath.sing dittus boelter eq.\n", + "Nu1 = 0.023*(Re1)**(0.8)*(Pr1)**(0.3) \t\t\t#nusslet no.\n", + "h1 = round(Nu1*k2/(di1*10**-3),-1) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "#Outer side (benzene) calculation\n", + "FA2 = (math.pi/4)*(di2*10**-3)**2-(math.pi/4)*(do1*10**-3)**2 \t\t\t#flow area\n", + "wp = math.pi*(di2*10**-3+do1*10**-3) \t\t\t#wettwd perimeter\n", + "dh = 4*FA2/wp \t\t\t#hydrolic diameter\n", + "bfr = Mb/rho1 \t\t\t#m**3/h benzene flow rate\n", + "v2 = bfr/(FA2*3600) \t\t\t#m/s, velocity\n", + "Re2 = dh*v2*rho1/(mu1*10**-3) \t\t\t#Reynold no\n", + "Pr2 = Cp1*10**3*(mu1*10**-3)/k1 \t\t\t#Prandtl no.\n", + "Nu2 = 0.023*(Re2)**(0.8)*(Pr2)**(0.4) \t\t\t#nusslet no.\n", + "h2 = Nu2*k1/(dh) \t\t\t#W/m**2 C, heat transfer coefficient\n", + "\n", + "print \"heat transfer coefficient based on inside area is %.0f W/m**2 C \"%(h1)\n", + "print \"heat transfer coefficient based on outside area is %.1f W/m**2 C \"%(h2)\n", + "\n", + "#Calculation of clean overall heat transfer coefficient, outside area basis\n", + "#from eq. 8.28\n", + "# Variables\n", + "l = 1. \t\t\t#assume , length\n", + "Ao = math.pi*do1*10**-3*l\n", + "Ai = math.pi*di1*10**-3*l\n", + "Am = (do1*10**-3-di1*10**-3)*math.pi*l/(math.log(do1*10**-3/(di1*10**-3)))\n", + "\n", + "#overall heat transfer coefficient\n", + "Uo = 1/((1/h2)+(Ao/Am)*((do1*10**-3-di1*10**-3)/(2*kw))+(Ao/Ai)*(1/h1))\n", + "Ui = Uo*Ao/Ai\n", + "\n", + "#Calculation of LMTD\n", + "dt1 = T1-T4\n", + "dt2 = T2-T3\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2) \t\t\t#math.log mean temp. difference correction factor\n", + "Q = HD*1000/3600 \t\t\t#W, heat required\n", + "Ao_ = Q/(Uo*LMTD) \t\t\t#m**@, required area\n", + "len = Ao_/(math.pi*do1*10**(-3)) \t\t\t#m, tube length necessary\n", + "\n", + "#(c)\n", + "la = 15. \t\t\t#m ,actual length\n", + "Aht = (math.pi*do1*10**(-3)*la)\n", + "Udo = Q/(Aht*LMTD) \t\t\t#W/m**2 C, overall heat transfer coefficient with dirt factor\n", + "#from eq. 8.2\n", + "Rdo = (1/Udo)-(1/Uo) \t\t\t#m**2 C/W\n", + "print \"overall heat transfer coefficient outside area basis is %.1f W/m**2 C \"%(Uo)\n", + "print \"overall heat transfer coefficient inside area basis is %.1f W/m**2 C \"%(Ui)\n", + "print \"The fouling factor is %f m**2 C/W\"%(Rdo)\n", + "\n", + "# note : rounding off error. please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat duty of the exchanger is 47000 kj/h\n", + "the water flow rate is 1122 kg/h\n", + "heat transfer coefficient based on inside area is 3560 W/m**2 C \n", + "heat transfer coefficient based on outside area is 880.3 W/m**2 C \n", + "overall heat transfer coefficient outside area basis is 663.1 W/m**2 C \n", + "overall heat transfer coefficient inside area basis is 802.0 W/m**2 C \n", + "The fouling factor is 0.000949 m**2 C/W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "Cp = 50. \t\t\t#tpd, plant capacity\n", + "T1 = 135. \t\t\t#C, Temp.\n", + "T2 = 40. \t\t\t#C temp.\n", + "T3 = 30. \t\t\t#C temp.\n", + "dt1 = (T1-T2) \t\t\t#C hot end temp. \n", + "dt2 = (T2-T3) \t\t\t#C cold end temp.\n", + "#Properties of ethylbenzene\n", + "rho1 = 840. \t\t\t#kg/m**3, density\n", + "cp1 = 2.093 \t\t\t#kj/kg K , specific heat\n", + "T = 87.5 \t\t\t#C\n", + "mu1 = math.exp(-6.106+1353/(T+273)+5.112*10**-3*(T+273)-4.552*10**-6*((T+273)**2))\n", + "k1 = 0.2142-(3.44*10**-4)*(T+273)+(1.947*10**-7)*(T+273)**2\n", + "k1_ = k1*0.86 \t\t\t#kcal/h m K\n", + "#properties of water\n", + "rho2 = 993. \t\t\t#kg/m**3, density\n", + "mu2 = 8*10.**-4 \t\t\t#kg/m s , vismath.cosity \n", + "cp2 = 4.175 \t\t\t#kj/kg K , specific heat\n", + "k2 = 0.623 \t\t\t#W/m K, thermal conductivity\n", + "k2_ = k2*0.8603 \t\t\t#kcal/h m**2 K\n", + "#Calculation\n", + "#(i) Energy balance\n", + "Cp = Cp*1000./24 \t\t\t#kg/h, plant capacity\n", + "Cp = 2083. \t\t\t#approx.\n", + "HD = Cp*cp1*dt1 \t\t\t#kj/h, Heat duty \n", + "HD_ = HD*0.238837 \t\t\t#kcal/h\n", + "wfr = HD/(cp2*dt2)\n", + "\n", + "#(ii)\n", + "mu1 = mu1 \t\t\t#cP, vismath.cosity of ethylbenzene\n", + "k1 = k1 \t\t\t#W/m K, thermal conductivity of ethylbenzene\n", + "\n", + "#(iii)\n", + "#LMTD calculation\n", + "LMTD = (dt1-dt2)/math.log(dt1/dt2)\n", + "#assume\n", + "Udo = 350. \t\t\t#kcal/h m**2 C, overall coefficient\n", + "A = HD_/(Udo*LMTD) \t\t\t#m**2, area required\n", + "\n", + "#(iv)\n", + "id_ = 15.7 \t\t\t#mm, internal diameter of tube\n", + "od = 19. \t\t\t#mm, outer diameter of tube\n", + "l = 3000. \t\t\t#mm, length\n", + "OSA = math.pi*(od*10**-3)*(l*10**-3) \t\t\t#m**2. outer surface area\n", + "n = A/OSA \t\t\t#no. of tubes required\n", + "fa = n*(math.pi/4)*(id_*10**-3)**2 \t\t\t#m**2, flow arae\n", + "lv = (wfr/1000)/(3600*fa) \t\t\t#m/s, linear velocity\n", + "\n", + "#(v)\n", + "n1 = 44. \t\t\t#total no. of tubes that can be accomodated in a 10 inch shell\n", + "np = 11. \t\t\t#no. of tubes in each pass\n", + "#(vi)\n", + "bf = 0.15 \t\t\t#m, baffel spacing\n", + "#(vii)\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "fa1 = (math.pi/4)*(id_*10**-3)**2*np \t\t\t#m**2, flow area\n", + "v1 = (wfr/1000.)/(3600*fa1) \t\t\t#m/s, velocity\n", + "Re = (id_*10**-3)*v1*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jh = 85. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hi = jh*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1/3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side(organic)\n", + "B = bf \t\t\t#m, baffel spacing\n", + "p = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds = 0.254 \t\t\t#m, inside diameter of shell\n", + "c = 0.0064 \n", + "#from eq. 8.32\n", + "As = c*B*Ds/p \t\t\t#m**2, flow area\n", + "Gs = Cp/As \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.31\n", + "Dh = 4*((0.5*p*100)*(0.86*p*100)-((math.pi*(do)**2)/8))/((math.pi*do)/2)\n", + "Dh_ = Dh*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re1 = (Dh_*Gs)/(3600*(mu1*10**-3)) \t\t\t#Reynold no.\n", + "#from fig 8.11(b)\n", + "jh1 = 32 \t\t\t#colburn factor\n", + "ho = jh1*(k1_/Dh_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo = 1/((1/ho)+Rdo+(ratio)*Rdi+(ratio)*(1/hi))\n", + "\n", + "#SECOND TRIAL\n", + "#estimation of heat transfer coefficient\n", + "#Tube side (water)\n", + "np1 = 12 \t\t\t#\n", + "fa2 = (math.pi/4)*(id_*10**-3)**2*np1 \t\t\t#m**2, flow area\n", + "v2 = (wfr/1000)/(3600*fa2) \t\t\t#m/s, velocity\n", + "Re2 = (id_*10**-3)*v2*rho2/mu2 \t\t\t#Reynold no.\n", + "#from fig . 8.11(a)\n", + "jht = 83. \t\t\t#colburn factor\n", + "#jh = (hi*di)/k*(cp*mu/k)**-1/3 \n", + "#assume, (cp*mu/k) = x\n", + "hit = jht*(k2_/(id_*10**-3))*(cp2*1000*mu2/k2)**(1./3) \t\t\t#kcal/h m**2 C\n", + "\n", + "#shell side\n", + "B2 = 0.1 \t\t\t#m, baffel spacing\n", + "p2 = 0.0254 \t\t\t#m,radius of 1 tube\n", + "Ds2 = 0.254 \t\t\t#m, inside diameter of shell\n", + "c2 = .0064\n", + "#from eq. 8.32\n", + "As2 = c2*B2*Ds2/p2 \t\t\t#m**2, flow area\n", + "Gs2 = Cp/As2 \t\t\t#kg/m**2 h, mass flow rate of shell fluid\n", + "do2 = od/10 \t\t\t#cm, outside diameter of shell\n", + "#from eq. 8.30\n", + "Dh2 = 4*((p2*100)**2-((math.pi*(do2)**2)/4))/((math.pi*do2))\n", + "Dh2_ = Dh2*10**-2 \t\t\t#m, hydrolic diameter\n", + "Re2 = (Dh2_*Gs2)/(3600*(mu1*10**-3))\n", + "#from fig 8.11(b)\n", + "jh2 = 48 \t\t\t#colburn factor\n", + "ho2 = jh2*(k1_/Dh2_)*((6)**(1./3))\n", + "#from eq. 8.28\n", + "ratio = od/id_ \t\t\t#ratio = Ao/Ai\n", + "Rdo2 = 0.21*10**-3 \t\t\t#outside dirt factor\n", + "Rdi2 = 0.35*10**-3 \t\t\t#inside dirt factor\n", + "Udo2 = 1/((1/ho2)+Rdo+(ratio)*Rdi+(ratio)*(1/hit))\n", + "\n", + "#from eq. 8.10(a)\n", + "tauc = (T2-T3)/(T1-T3) \t\t\t#Temprature ratio\n", + "R = (T1-T2)/(T2-T3) \t\t\t#Temprature ratio\n", + "Ft = 0.8 \t\t\t#LMTD correction ftor\n", + "Areq = HD_/(Udo2*Ft*LMTD) \t\t\t#area required\n", + "tubes = 48. \t\t\t#no. of tubes\n", + "lnt = 4.5 \t\t\t#length of 1 tube\n", + "Aavl = (math.pi*od*10**-3)*tubes*lnt \t\t\t#available area\n", + "excA = ((Aavl-Areq)/Areq)*100 \t\t\t#% excess area\n", + "\n", + "#Pressure drop calculation\n", + "#Tube side\n", + "#from eq. 8.33\n", + "Gt = wfr/(3600*fa2) \t\t\t#kg/m**2 s, mass flow rate of tube fluid\n", + "n2 = 4. \t\t\t#tube passes\n", + "fit = 1. \t\t\t#dimensionless vismath.cosity ratio\n", + "g = 9.8 \t\t\t#gravitational consmath.tant\n", + "f = 0.0037 \t\t\t#friction factor\n", + "dpt = f*Gt**2*lnt*n2/(2*g*rho2*id_*10**-3*fit) \t\t\t#kg/m**2, tube side pressure drop\n", + "\n", + "#eq.8.35\n", + "dpr = 4*n2*v2**2*rho2/(2*g) \t\t\t#kg/m**2, return tube pressure loss\n", + "dpr_ = dpr*9.801 \t\t\t#N/m**2\n", + "tpr = dpt+dpr \t\t\t#kg/m**2, total pressure drop\n", + "#shell side\n", + "fs = 0.052 \t\t\t#friction factor for shell\n", + "bf1 = 0.1 \t\t\t#m, baffel spacing\n", + "Nb = lnt/bf1-1 \t\t\t#no. of baffles\n", + "dps = fs*(Gs2/3600)**2*Ds*(Nb+1)/(2*g*rho1*Dh2_*fit) \t\t\t#kg/m**2, shell side pressure drop\n", + "dps_ = dps*9.81 \t\t\t#N/m**2, shell side pressure drop\n", + "print \"Tube side Pressure drop is %1.3e N/m**2 \"%(dpr_)\n", + "print \"Shell side Pressure drop is %.0f N/m**2 \"%(round(dps_,-1))\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tube side Pressure drop is 1.118e+04 N/m**2 \n", + "Shell side Pressure drop is 120 N/m**2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "#for hot stream\n", + "Wh = 10000. \t\t\t#kg/h, Rate of leaving a hydrolic system by the oil\n", + "Cph = 0.454 \t\t\t#Kcal/Kg C, specific heat of oil\n", + "Th1 = 85. \t\t\t#C initial temp. of oil\n", + "Th2 = 50. \t\t\t#C final temp. of oil \n", + "\n", + "#For cold stream\n", + "Cpc = 1. \t\t\t#Kcal/Kg C, specific heat of water\n", + "Tc2 = 30. \t\t\t#C final temp. of water\n", + "Tc1 = 38. \t\t\t#C initial temp. of water\n", + "\n", + "# Calculations\n", + "#from heat balance eq.\n", + "#kg/h, Rate of leaving a hydrolic system by the water\n", + "Wc = Wh*Cph*(Th1-Th2)/(Cpc*(Tc1-Tc2))\n", + "#For the hot stream\n", + "Cmin = Wh*Cph \t\t\t#Kcal/h C.Taking hot stream as min. stream\n", + "#For cold stream\n", + "Cmax = Wc*Cpc \t\t\t#Kcal/h C.Taking cold stream as max. stream\n", + "Cr = Cmin/Cmax \t\t\t#Capacity ratio\n", + "n = (Th1-Th2)/(Th1-Tc2) \t\t\t#effectiveness factor\n", + "#From eq. 8.57\n", + "#No. of transfer units\n", + "NTU = -(1+(Cr)**2)**-(1./2)*math.log(((2/n)-(1+Cr)-(1+(Cr)**2)**(1./2))/((2./n)-(1+Cr)+(1+(Cr)**2)**(1./2)))\n", + "Ud = 400. \t\t\t#kcal/h m**2C , overall dirty heat transfer coefficient\n", + "#from eq. 8.53\n", + "A = (NTU*Cmin)/Ud \t\t\t#Area required\n", + "#if the water rate is increased by 20 %,\n", + "a = 20.\n", + "Wc_ = Wc+(Wc*(a/100))\n", + "Cmax_ = Wc_*Cpc\n", + "Cr_ = Cmin/Cmax_\n", + "#From eq. 8.56\n", + "n_ = 2*((1+Cr_)+(1+(Cr_)**2)**(1./2)*(1+math.exp(-(1+(Cr_)**2)**(1./2)*NTU))/(1-math.exp(-(1+(Cr_)**2)**(1./2)*NTU)))**(-1)\n", + "Th2_ = Th1-(n_*(Th1-Tc2))\n", + "q1 = Wh*Cph*(Th1-Th2) \t\t\t#kcal/h previous rate of heat transfer\n", + "q2 = Wh*Cph*(Th1-Th2_) \t\t\t#kcal/h new rate of heat transfer\n", + "#increase in rate of heat transfer\n", + "dq = (q2-q1)/q1 \n", + "\n", + "# Results\n", + "print \"Th2 = %.1f C\"%Th2_\n", + "print \"The new rate of heat transfer : %d kcal/h\"%q2\n", + "print \"the heat teansfer rate will be affected by %.1f percent \"%(dq*100 )\n", + "\n", + "# note : rounding off error would be there." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Th2 = 49.5 C\n", + "The new rate of heat transfer : 161003 kcal/h\n", + "the heat teansfer rate will be affected by 1.3 percent \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Variables\n", + "p = 0.0795 \t\t\t#m. pitch of the coil\n", + "d1 = 0.0525 \t\t\t#m,coil diameter\n", + "h = 1.464 \t\t\t#m,height of the limpetted section\n", + "d2 = 1.5 \t\t\t#m,diameter of batch polymerization reactor\n", + "d3 = 0.5 \t\t\t#m,diameter of agitator\n", + "rpm = 150. \t\t\t#speed of agitator\n", + "rho = 850. \t\t\t#kg/m3,density of monomer\n", + "rho1 = 900. \t\t\t#kg/m3,density of fluid\n", + "mu = 0.7*10**-3 \t\t\t#poise, vismath.cosity of monomer\n", + "mu1 = 4*10.**-3 \t\t\t#poise, vismath.cosity of fluid\n", + "cp = 0.45 \t\t\t#kcal/kg C, specific heat of monomer\n", + "cp1 = 0.5 \t\t\t#kcal/kg C, specific heat of fluid\n", + "k = 0.15 \t\t\t#kcal/h mC, thermal conductivity of monomer\n", + "k1 = 0.28 \t\t\t#kcal/h mC, thermal conductivity of fluid\n", + "Rdi = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for vessel\n", + "Rdc = 0.0002 \t\t\t#h m2 C/kcal, fouling factor for coil\n", + "Tci = 120. \t\t\t#C, initial temp. of coil liquid\n", + "Tvi = 25. \t\t\t#C, initial temp. of vessel liquid\n", + "Tvf = 80. \t\t\t#C, final temp. of vessel liquid\n", + "\n", + "#calculation\n", + "a = math.pi*d2*h \t\t\t#outside area of the vessel\n", + "x = 60. \t\t\t#%. added of the unwetted area to the wetted area\n", + "ao = ((d1+(x/100)*(p-d1))/p)*a \t\t\t#m**2,effective outside heat transfer area of vessel\n", + "ai = 6.9 \t\t\t#m**2,inside heat transfer area of vessel\n", + "#same as outside area , if thickness is very small\n", + "#vessel side heat transfer coefficient\n", + "Re = (d3**2*(rpm/60)*rho)/mu \t\t\t#reynold no.\n", + "Pr = ((cp*3600)*(mu))/k\n", + "#from eq. 8.66\n", + "y = 1 \t\t\t#x = mu/muw = 1\n", + "Nu = 0.74*(Re**(0.67))*(Pr**(0.33))*(y**(0.14)) \t\t\t#Nusslet no\n", + "hi = Nu*(k/d2) \t\t\t#heat transfer coefficient\n", + "\n", + "#coil side heat transfer coefficient\n", + "v = 1.5 \t\t\t#m/s, linear velocity of fluid\n", + "fa = ((math.pi/4)*d1**2) \t\t\t#m2, flow area of coil\n", + "fr = v*fa*3600 \t\t\t#m3/h , flow rate of the fluid\n", + "Wc = fr*rho \t\t\t#kg/h , flow rate\n", + "dh = (4*(math.pi/8)*d1**2)/(d1+(math.pi/2)*d1) \t\t\t#m,hydrolic diameter of limpet coil\n", + "Re1 = v*rho1*dh/mu1 \t\t\t#coil reynold no.\n", + "Pr1 = cp1*mu1*3600/k1 \t\t\t#prandtl no. of the coil fluid\n", + "#from eq. 8.68\n", + "d4 = 0.0321 \t\t\t#m, inside diameter of the tube\n", + "Nu1 = 0.021*(Re1**(0.85)*Pr1**(0.4)*(d4/d2)**(0.1)*y**0.14) \n", + "hc = Nu1*(k1/dh) \t\t\t#coil side coefficient\n", + "\n", + "U = 1/((1/hi)+(ai/(hc*ao))+Rdi+Rdc) \t\t\t#overall heat transfer corfficient\n", + "#from eq. 8.63\n", + "beeta = math.exp(U*ai/(Wc*cp1))\n", + "Wv = 2200. \t\t\t#kg, mass of fluid vessel\n", + "t = (beeta/(beeta-1))*((Wv*cp)/(Wc*cp1))*math.log((Tci-Tvi)/(Tci-Tvf)) \n", + "\n", + "# Results\n", + "print \"the time required to heat the charge %.0f min\"%(t*60)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the time required to heat the charge 22 min\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9.ipynb new file mode 100755 index 00000000..7ebb35fd --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9.ipynb @@ -0,0 +1,693 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b0a9cebb4331fc5b9ccd4c99b75d4ddbb1083efa5c8e135dcd213d31824aeccc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Evaporetion and Evaporators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ro = 1020. \t\t\t# kg/m**3, density of feed\n", + "sf = 4.1 \t\t\t#kj/kg C,specific heat of the feed\n", + "sp = 3.9 \t\t\t#kj/kg C,specific heat of the product\n", + "ci = 5. \t\t\t#initial concentration\n", + "cw = 100.-ci \t\t\t#conc. of water\n", + "cf = 40. \t\t\t#final conc.\n", + "rate = 100. \t\t\t#m**3/day, rate of conc. of aq. solution\n", + "ft = 25. \t\t\t# C, feed temp.\n", + "\n", + "#calculation and results\n", + "#materiel balance\n", + "Wf = rate*ro \t\t\t#Kg. feed entering\n", + "Ms = ro*ci \t\t\t#Kg mass of solute\n", + "Mw = ro*cw \t\t\t#kg,mass of water\n", + "fc = cw/ci \t\t\t#kg,feed concentration\n", + "pc = (100-cf)/cf \t\t\t# kg,product concentration\n", + "wlwp = Ms*pc \t\t\t#Kg, water leaving with the product\n", + "Ws = Mw-wlwp \t\t\t#kg,water evaporated\n", + "Wp = wlwp+Ms \t\t\t# kg, product\n", + "#energy balance\n", + "rt = 0. \t\t\t#C reference temp.\n", + "ef = sf*(ft-rt) \t\t\t#kj/kg,enthlpy of the feed\n", + "#case i\n", + "Tp = 100. \t\t\t#temp. of the product (because the solute has a 'high molecular wt' the boiling pt elevation is neglected)\n", + "ip = sp*(Tp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2680. \t\t\t#kj/kg, enthalpy of the vapour generated at 100 C and 1 atm pr. from the steam table\n", + "#refer to fig. 9.23\n", + "#from energy balance eq. (Wf*if+qs = Wv*iv+Wp*ip)\n", + "qs = Ws*iv+Wp*ip-Wf-ef \t\t\t#Wv = Ws\n", + "print \"The rate at which heat must be supplied at 1 atm pressure is %1.3e kj/ day\"%(qs)\n", + "\n", + "#case ii\n", + "#650 mm Hg vaccum = 110 mmHg pressure\n", + "bp = 53.5 \t\t\t#C, boiling point of water\n", + "ip2 = sp*(bp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "es = 2604. \t\t\t#kj/kg, enthalpy of the saturated steam (from steam table)\n", + "#from energy balnce eq.\n", + "qs2 = Wp*ip+Ws*es-Wf-ef\n", + "print \"The rate at which heat must be supplied at a pressure of 600 mm Hg is %1.3e kj/day \"%(qs2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate at which heat must be supplied at 1 atm pressure is 2.441e+08 kj/ day\n", + "The rate at which heat must be supplied at a pressure of 600 mm Hg is 2.373e+08 kj/day \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ci = 10. \t\t\t#%,initial concentration\n", + "cf = 40. \t\t\t#%, final conc\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ft = 30. \t\t\t#C feed temp.\n", + "rp = 0.33 \t\t\t#kg/cm**2, reduced pressure\n", + "bt1 = 75. \t\t\t#C,boiling point temp.\n", + "sst = 115. \t\t\t#C, saturated steam temp.\n", + "l = 1.5 \t\t\t# m,height of calandria\n", + "sh = 0.946 \t\t\t#kcal/kg C, specific heat of liquir\n", + "lh = 556.5 \t\t\t#kcal/kg latent heat of steam\n", + "bt2 = 345. \t\t\t#K, boiling point of water \n", + "h = 2150. \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "si = 2000.*(ci/100) \t\t\t#kg/h, solids in\n", + "wi = 1800. \t\t\t#kg/h,wate in\n", + "\n", + "# Calculations\n", + "Wp = si/(cf/100) \t\t\t#kg/h, product out\n", + "Wv = Wf-Wp \t\t\t#evaporation rate\n", + "ef = sh*(ft-bt1)\n", + "ip = 0\n", + "lamda_s = 529.5 \t\t\t#kcal/kg, lamda_s = is-il\n", + "bpe = (273+bt1)-345 \t\t\t#boiling point elevation.\n", + "#from eergy balance eq.\n", + "Ws = (Wp*ip+Wv*lh-Wf*ef)/lamda_s\n", + "q = Ws*lamda_s \t\t\t#kcal/h,rate of heat transfer\n", + "A = q/(h*(sst-bt1)) \t\t\t# m**2\n", + "di = 0.0221 \t\t\t#m,inside diameter\n", + "At = math.pi*l*di \t\t\t#m**2, area of a math.single tube\n", + "N = A/At \t\t\t#no. of tubes\n", + "\n", + "# Results\n", + "print \"The steam required is %.0f kg/h\"%(Ws)\n", + "print \"No. of tube are %d\"%(N)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam required is 1737 kg/h\n", + "No. of tube are 102\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ci = 8. \t\t\t#% initial conc.\n", + "cf = 40. \t\t\t#% final conc.\n", + "ft = 30. \t\t\t#C, feed temp.\n", + "vp = 660. \t\t\t#mm Hg, vaccum pressure\n", + "ssp = 8. \t\t\t# bar absolute, saturated steam pr.\n", + "\n", + "#calculation\n", + "sr = Wf*(ci/100) \t\t\t#kg/h, solid rate\n", + "Wp = sr/(cf/100) \t\t\t#kg/h,concentrated product rate\n", + "ap = 760-vp \t\t\t#mm Hg, absolute pressure in the evaporator\n", + "bt = 325. \t\t\t#K,boiling temp. of water\n", + "l_s = 2380. \t\t\t#kj/kg, latent heat\n", + "R = 8.303 \t\t\t#gas consmath.tant\n", + "w = 40. \t\t\t#g,mass of solute\n", + "M = 18. \t\t\t#g,molecular wt of solvent\n", + "W = 60. \t\t\t#g,mass of the solvent\n", + "m = 2000. \t\t\t#g,molecular wt of solute\n", + "dtb = (R*bt**2*w*M)/(l_s*W*m) \t\t\t#C, boiling point elevation\n", + "bp = bt+dtb \t\t\t#k,boiling point of 40% solution\n", + "dt = 70. \t\t\t#C, from given data flux becomes maximum at a temp. drop = 70 C\n", + "st = bp+dt \t\t\t#K,saturation temp. of steam in the steam chest\n", + "Sp = 2.15 \t\t\t# bar, from steam table, saturation lr. of steam at this temp.\n", + "\n", + "sh = 4.2 \t\t\t#kj/kg C, specific heat of product\n", + "rt = 0. \t\t\t#C reference teml.\n", + "ef = sh*(ft-rt) \t\t\t# kj/kg, enthalpy of the feed\n", + "ip = sh*(54-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2607. \t\t\t#kj/kg, enthalpy of vapour produced\n", + "#from eq 9.6\n", + "Wv = 1600. \t\t\t#enthalpy of evaporation\n", + "q = Wp*ip+Wv*iv-Wf*ef \t\t\t#kj/h, heat transfe rate required\n", + "hvp = 2188. \t\t\t#kj/kg, heat of vaporization of saturated steam at 397 K\n", + "rs = q/hvp \t\t\t#kg/h, rate of steam supply\n", + "\n", + "# Results\n", + "print \"The steam pressure to be used in the calandria is %.2f barabs)\"%(Sp);\n", + "print \"The heat transfer rate required is %.2e Kj/h\"%(q);\n", + "print \"Rate of steam supply is %.0f kg/h\"%(rs);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam pressure to be used in the calandria is 2.15 barabs)\n", + "The heat transfer rate required is 4.01e+06 Kj/h\n", + "Rate of steam supply is 1833 kg/h\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\n", + "# Variables\n", + "Wf = 6000. \t\t\t#kg/h, feed rate\n", + "ci = 2. \t\t\t#%, initial concentration\n", + "cf = 35. \t\t\t#%, final conc.\n", + "ft = 50. \t\t\t#C,feed temp.\n", + "ssp = 2. \t\t\t#bar abs, saturated steaam pr.\n", + "sep = 0.0139 \t\t\t#bar abs, maintained temp. in second effect\n", + "h1 = 2000. \t\t\t#W/m**2 K,overall heat transfer coeffcient in 1st effect\n", + "h2 = 1500. \t\t\t#W/m**2 K, overall heat transfer coefficient in 2nd effect\n", + "cp = 4.1 \t\t\t#kj/kg k,specific heat\n", + "\n", + "#calculation\n", + "si = Wf*(ci/100) \t\t\t#kg/h, solid in\n", + "wi = 5880. \t\t\t#kg/h, water in\n", + "Wp = si/(cf/100) \t\t\t#kg/h product out\n", + "wo = Wp*(1-cf/100) \t\t\t#kg/h, water out with the product\n", + "ter = wi-wo \t\t\t#kg/h, total evaporation rate\n", + "\n", + "#boiling temp. in the first effect\n", + "T1 = 120. \t\t\t#C,Temprature\n", + "l_s1 = 2200. \t\t\t#kj/kg, latent heat\n", + "T2 = 12. \t\t\t#C,boiling point in second effect\n", + "l_s2 = 2470. \t\t\t# kj/kg in second effect\n", + "tatd = T1-T2 \t\t\t# C,tatd = dt1+dt2 = T1-T2 , total available temp. drop\n", + "#from eq. 9.20\n", + "#h1*dt1 = h2*dt2\n", + "#solving above two equations by matrix\n", + "A = array([[1,1],[2000,-1500]])\n", + "C = array([108,0])\n", + "X = linalg.solve(A,C)\n", + "#X = inv(A)*C\n", + "\n", + "dt1 = X[0]\n", + "dt2 = X[1]\n", + "t1 = T1-dt1 \t\t\t#temp. of steam leaving the first effect\n", + "t2 = T2-dt2 \t\t\t#temp. of steam leaving second effect\n", + "#energy balance over the 1st effect, from eq.9.14\n", + "rt1 = t1\n", + "ef = cp*(ft-t1) \t\t\t#kj/kg,enthalpy of feed\n", + "i1 = 0\n", + "lam_s1 = 2330. \t\t\t#kj/kg\n", + "is1 = lam_s1\n", + "#Wf*ef+Ws*l_s = (Wf-Ws1)*i1+Ws1*is1\n", + "#substituting we get,\n", + "#Ws1 = 0.9442*Ws-253.4..........(1)\n", + "#energy balance over second effect\n", + "#from eq 9.15\n", + "#(Wf-Ws1)*i1+Ws1*lam_s1 = (Wf-Ws1-Ws2)*i2+Ws2*is2\n", + "rt2 = t2\n", + "lam_s2 = 2470.\n", + "is2 = lam_s2\n", + "i2 = 0\n", + "# substituting we get\n", + "#Ws2 = 0.8404*Ws1+617.5............(2)\n", + "#ter,Ws1+Ws2 = 5657...............(3)\n", + "#solving by matrix method\n", + "A = array([[0.9442,-1,0],[0,0.8404,-1],[0,1,1]])\n", + "B = array([253.4,-617.5,5657])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "\n", + "#evaporator area\n", + "A1 = Ws*l_s1/(h1*dt1) \t\t\t#for 1st effect\n", + "A2 = Ws1*lam_s1/(h2*dt2) \t\t\t#for second effect\n", + "\n", + "#revised calculation\n", + "#taking\n", + "dt1_ = 48.\n", + "dt2_ = 60.\n", + "T1_ = T1-dt1_\n", + "T2_ = T2-dt2_\n", + "ls1_ = 2335.\n", + "ls2_ = 2470.\n", + "# energy balance over first effect gives\n", + "#Ws1 = 0.9422Ws-231.8.........(4)\n", + "#energy balance over second effect gives\n", + "#Ws2 = 0.8457Ws1+579.5......(5)\n", + "#solving eq 3,4,5\n", + "P = array([[0.9422,-1,0],[0,0.8457,-1],[0,1,1]])\n", + "Q = array([231.8,-579.5,5657])\n", + "Y = linalg.solve(P,Q)\n", + "#Y = inv(P)*Q\n", + "Ws_ = Y[0]\n", + "Ws1_ = Y[1]\n", + "Ws2_ = Y[2]\n", + "\n", + "#eveporator area for 1st & 2nd effect in m**2\n", + "A1_ = Ws_*l_s1/(h1*dt1_)\n", + "A2_ = Ws1_*ls1_/(h2*dt2_)\n", + "EA = (A1_+A2_)/2\n", + "SE = (Ws1_+Ws2_)/Ws_\n", + "\n", + "# Results\n", + "print \"The evaporator area is %.0f square metre \"%(EA);\n", + "print \"Steam economy is %.2f\"%(SE);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The evaporator area is 72 square metre \n", + "Steam economy is 1.79\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ssp = 3.32 \t\t\t#bar abs, saturated steam pr.\n", + "rp = 0.195 \t\t\t# bar abs, residual pr. in the condenser\n", + "tl = 41. \t\t\t#K, sun of temp. losses because of BPE\n", + "mt = 8. \t\t\t#k,minimum available temp. driving force\n", + "#calculation\n", + "sst = 410. \t\t\t#K,saturated steam temp.\n", + "st = 333. \t\t\t#K,corresponding saturation temp. when pressure in the last effect is 0.195 bar\n", + "ttd = sst-st \t\t\t#K,total temp. difference\n", + "atd = ttd-tl \t\t\t# K,available temp. drop across the unit\n", + "n = atd/mt \t\t\t#maximum no. of effect\n", + "\n", + "# Results\n", + "print \"Maximum no. of effects are %.0f\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum no. of effects are 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "# Variables\n", + "fc = 9.5 \t\t\t#%,feed concentration\n", + "pc = 50. \t\t\t#%, product conc.\n", + "ft = 40. \t\t\t# C,feed temp.\n", + "er = 2000. \t\t\t#kg NaOH/h, evaporation rate\n", + "vp = 714. \t\t\t#mm Hg, vaccum pr. in last effect\n", + "#heat transfer coefficients, W/m**2 C\n", + "h1 = 6000. \t\t\t#for first effect\n", + "h2 = 3500. \t\t\t#for second effect\n", + "h3 = 2500. \t\t\t#for third effect\n", + "\n", + "#calculatiin\n", + "Wf = er/(fc/100) \t\t\t#kg/h, 2 tons NaOH per hour, feed rate\n", + "Wp = er/(pc/100) \t\t\t#kg/h, product rate\n", + "ter = Wf-Wp \t\t\t#kg/h, total evaporation rate\n", + "#steam\n", + "p = 3.3 \t\t\t#bar,assumed saturated\n", + "#from steam table\n", + "Ts = 137. \t\t\t#C,temp.\n", + "l_s = 2153. \t\t\t#kj/kg, latent heat\n", + "pl = 760.-vp \t\t\t#mm Hg,pressure in the last effect\n", + "bp = 37. \t\t\t#C,boiling point of water\n", + "#refer to fig. 9.24\n", + "attd = Ts-bp \t\t\t#C,apparent total temp. drop\n", + "#let assume the following evaporation rate for three effects in kg/h\n", + "ev1 = 5600.\n", + "ev2 = 5680.\n", + "ev3 = 5773.\n", + "#conc. in three effects\n", + "c1 = er/(Wf-ev1)\n", + "c2 = er/(Wf-ev1-ev2)\n", + "c3 = 0.5 \t\t\t# Variables\n", + "#boiling point elevations in three effects in C\n", + "bpe1 = 3.5\n", + "bpe2 = 8.\n", + "bpe3 = 39.\n", + "attda = attd-(bpe1+bpe2+bpe3) \t\t\t#actual total temp. drop available\n", + "#temp. drop in three effects\n", + "#from eq. 9.23\n", + "dt1 = attda*((1/h1)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt2 = attda*((1/h2)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt3 = attda*((1/h3)/((1/h1)+(1/h2)+(1/h3)))\n", + "\n", + "#from table 9.4\n", + "#enthalpy of solution in three effects in kj/kg\n", + "i1 = 486.\n", + "i2 = 385.\n", + "i3 = 460.\n", + "#enthalpy of vapour generated for three effects in kj/kg\n", + "is1 = 2729.\n", + "is2 = 2691.\n", + "is3 = 2646.\n", + "#Enthalpy of condensate over effect 1,2,3 in kj/kg\n", + "il1 = 0.\n", + "il2 = 519.\n", + "il3 = 418.\n", + "#Enthalpy balance over effect 1\n", + "ef = 145. \t\t\t#kj/kg,enthalpy of feed\n", + "#from energy balance eq.\n", + "#Ws1 = 0.96Ws-3200......(1)\n", + "#enthalpy balanc over effect 2\n", + "#Ws2 = 0.9146Ws1+922...........(2)\n", + "#enthalpy balanc over effet 3\n", + "#Ws3 = 1.073Ws2+0.0343Ws1-722........(3)\n", + "#ter = Ws1+Ws2+Ws3 = 17053..........(4)\n", + "\n", + "#Solving above four eqns by matrix\n", + "A = array([[0.96,-1,0,0],[0,0.9146,-1,0],[0,0.0343,1.073,-1],[0,1,1,1]])\n", + "B = array([3200,-922,722,17053])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "Ws3 = X[3]\n", + "\n", + "#calculation of heat transfer areas iver effect 1, 2 ,3\n", + "A1 = Ws*l_s*10**3/(h1*dt1*3600)\n", + "A2 = Ws1*(is1-il2)*10**3/(h2*dt2*3600)\n", + "A3 = Ws2*(is2-il3)*10**3/(h3*dt3*3600)\n", + "\n", + "#Revised dt\n", + "avar = (A1+A2+A3)/3\n", + "dt1_ = (A1/avar)*dt1\n", + "dt2_ = (A2/avar)*dt2\n", + "dt3_ = attda-dt1_-dt2_\n", + "\n", + "#from table 9.5\n", + "#enthalpy of vapour generated over effect 1,2,3 in kj/kg\n", + "is1_ = 2720.\n", + "is2_ = 2685.\n", + "is3_ = 2646.\n", + "#enthalpy of soln on 1,2,3 in kj/kg\n", + "i1_ = 470.\n", + "i2_ = 380.\n", + "i3_ = 460.\n", + "#enthalpy of condensate over effect 1 ,2,3 in kj/kg\n", + "il1_ = 0.\n", + "il2_ = 513.\n", + "il3_ = 412.\n", + "#enthalpy balance ove effect 1,2,3 gives\n", + "Ws_ = 8854.\n", + "Ws1_ = 5432.\n", + "Ws2_ = 5812.\n", + "Ws3_ = 5809.\n", + "#revised heat transfer areas for effect 1 ,2,3 in m**2\n", + "A1_ = Ws_*l_s*1000/(h1*dt1_*3600)\n", + "A2_ = Ws1_*(is1_-il2_)*10**3/(h2*dt2_*3600)\n", + "A3_ = Ws2_*(is2_-il3_)*10**3/(h3*22.5*3600)\n", + "avar_ = (A1_+A2_+A3_)/3\n", + "SE = ter/Ws_\n", + "\n", + "# Results\n", + "print \"The areas are now reasonably close \"\n", + "print \"Steam Rate is %.0f Kg/h \"%(Ws_)\n", + "print \"Steam economy is %.2f\"%(SE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The areas are now reasonably close \n", + "Steam Rate is 8854 Kg/h \n", + "Steam economy is 1.93\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "\n", + "# Variables\n", + "Wf = 3000. \t\t\t#kg/h,feed\n", + "fc = 8. \t\t\t#%, feed concentration\n", + "pc = 40. \t\t\t#% product concentration\n", + "si = Wf*(fc/100) \t\t\t#kg,solid in\n", + "pr = si/(40./100) \t\t\t#g/h, product rate\n", + "ft = 60. \t\t\t#C,feed temp.\n", + "er = Wf-pr \t\t\t#kg/h, evaporation rate\n", + "math.cost = 120000. \t\t\t#total math.cost per year\n", + "p1 = 4.5 \t\t\t#bar, low pressure steam\n", + "scpt = 700. \t\t\t#per ton. math.cost of steam\n", + "cp = 0.764 \t\t\t# kcal/kg, specific heat\n", + "\n", + "#from table 9.6\n", + "eep = 1. \t\t\t#atm existing evaporator pressure \n", + "oop = 400000. \t\t\t# peryear ,other operatingmath.cost\n", + "oop_ = 600000. \t\t\t#per yr, for proposed condition\n", + "wd = 300. \t\t\t#days per year.working days\n", + "wh = wd*24. \t\t\t#working hr\n", + "\n", + "# Calculations\n", + "#EXISTING OPERATING CONDITION \n", + "rt = 0 \t\t\t#C,reference temp.\n", + "ef = eep*(ft-rt) \t\t\t#kcal/kg, enthalpy of feed\n", + "pt = 100. \t\t\t#C,product temp.\n", + "i1 = cp*(pt-rt) \t\t\t#kcal/kg, enthalpy of soln\n", + "is1 = 639. \t\t\t#kcal/kg,enthalpy of vapour generated at 1 atm (from steam table)\n", + "l_s = 496. \t\t\t#kcal/kg,latent heat of steam at 4.5 bar\n", + "T = 425. \t\t\t#K\n", + "#heat balance\n", + "Ws = (er*is1+pr*i1-Wf*ef)/l_s \t\t\t#kg/h, steam required\n", + "q = Ws*l_s \t\t\t#ton/ hr,heat supplied\n", + "x = q/(T-(pt+273)) \t\t\t#x = Ud*A\n", + "#hourly math.cost\n", + "sc = Ws/1000*(scpt) \t\t\t# /perh, steam math.cost\n", + "lc = 100. \t\t\t#per h,labour math.cost\n", + "oc = oop/(wh) \t\t\t# per h,othe math.cost\n", + "tc = sc+lc+oc \t\t\t#total math.cost\n", + "C = tc/(Wf/1000) \t\t\t# per ton,math.cost per ton of feed\n", + "\n", + "#PROPOSED OPERATING CONDITION\n", + "bpl = 320. \t\t\t#K,boiling point of liquid\n", + "dt = T-bpl\n", + "q_ = x*dt \t\t\t#kcal/h,rate of heat supply\n", + "sr = q_/l_s \t\t\t#steam rate ton per hr\n", + "pt_ = 47. \t\t\t#C,product temp .\n", + "ep = cp*(pt_-rt) \t\t\t#kcal/kg. enthalpy of product\n", + "ev = 618. \t\t\t#kcal/kg, enthalpy of vapour generated\n", + "#heat balance\n", + "#24Wf_-582Ws1_ = 2825000 ..........(1)\n", + "#material balance\n", + "# 4Wf_-5Ws1_ = 0 .............(2)\n", + "#solving by matrix method\n", + "a = array([[24,-582],[4,-5]])\n", + "b = array([-2825000,0])\n", + "x_ = linalg.solve(a,b)\n", + "#x_ = inv(a)*b\n", + "Wf_ = x_[0]\n", + "Ws1_ = x_[1]\n", + "ic = (Wf_-Wf)/Wf\n", + "print \"The increase in evaporation capacity ic %d percentage \"%(ic*100)\n", + "sr_ = Ws1_/1000 \t\t\t#ton per hr ,steam rate \n", + "#hourly math.cost\n", + "sc_ = Ws1_*scpt \t\t\t#steam math.cost\n", + "lc_ = 200. \t\t\t#labour math.cost rs.200/ h\n", + "oc_ = oop_/wh \t\t\t# other math.cost\n", + "tc_ = sc_/1000+lc_+oc_\n", + "C_ = tc_/(Wf_/1000) \t\t\t#math.cost per ton of feed\n", + "ps = (C-C_)/C\n", + "print \" The percentage change in the math.cost of concentrating a ton of feed is %.0f percentage\"%(ps*100)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in evaporation capacity ic 113 percentage \n", + " The percentage change in the math.cost of concentrating a ton of feed is 15 percentage\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "q = 2200. \t\t\t#kj/kg heat of condensation of steam \n", + "#from example 9.1\n", + "Qr = 2.337*10**8 \t\t\t#kj/day rate of heat supply\n", + "\n", + "#calculation\n", + "Rate = Qr/q \t\t\t#kg/day steam supply rate\n", + "Rate_ = 1.062*10**5 \t\t\t#approximate value\n", + "E = 2800. \t\t\t#kj/kg enthalpy of compressed vapour\n", + "T = 175.7 \t\t\t#C, temprature\n", + "Ts = 121. \t\t\t#C Saturation temprature\n", + "E1 = 2700. \t\t\t#enthalpy at saturation temprature\n", + "q1 = T-Ts \t\t\t#Superheat of vapour\n", + "T1 = 100. \t\t\t#C hot water temprature\n", + "E2 = 419. \t\t\t#Enthalpy at hot water temp.\n", + "x = (E-E1)/(E1-E2) \t\t\t#water supplied per kg of superheated steam\n", + "S = 1.044 \t\t\t#steam obtained after desuperheating\n", + "R1 = 8.925*10**4 \t\t\t#kg/day rate of vapour generation \n", + "R2 = S*R1 \t\t\t#Rate of recompressed sat. steam\n", + "R2_ = 9.318*10**4 \t\t\t#approximate value\n", + "SR = Rate_-R2_ \n", + "\n", + "# Results\n", + "print \"Make up steam required is %.3e kg/day\"%(SR)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Make up steam required is 1.302e+04 kg/day\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_1.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_1.ipynb new file mode 100755 index 00000000..330a67ca --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_1.ipynb @@ -0,0 +1,693 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ee3d5a8c4dc79f0c380db9164fb29e7c0a4746212cf1207394a57a488872a02" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Evaporetion and Evaporators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ro = 1020. \t\t\t# kg/m**3, density of feed\n", + "sf = 4.1 \t\t\t#kj/kg C,specific heat of the feed\n", + "sp = 3.9 \t\t\t#kj/kg C,specific heat of the product\n", + "ci = 5. \t\t\t#initial concentration\n", + "cw = 100.-ci \t\t\t#conc. of water\n", + "cf = 40. \t\t\t#final conc.\n", + "rate = 100. \t\t\t#m**3/day, rate of conc. of aq. solution\n", + "ft = 25. \t\t\t# C, feed temp.\n", + "\n", + "#calculation and results\n", + "#materiel balance\n", + "Wf = rate*ro \t\t\t#Kg. feed entering\n", + "Ms = ro*ci \t\t\t#Kg mass of solute\n", + "Mw = ro*cw \t\t\t#kg,mass of water\n", + "fc = cw/ci \t\t\t#kg,feed concentration\n", + "pc = (100-cf)/cf \t\t\t# kg,product concentration\n", + "wlwp = Ms*pc \t\t\t#Kg, water leaving with the product\n", + "Ws = Mw-wlwp \t\t\t#kg,water evaporated\n", + "Wp = wlwp+Ms \t\t\t# kg, product\n", + "#energy balance\n", + "rt = 0. \t\t\t#C reference temp.\n", + "ef = sf*(ft-rt) \t\t\t#kj/kg,enthlpy of the feed\n", + "#case i\n", + "Tp = 100. \t\t\t#temp. of the product (because the solute has a 'high molecular wt' the boiling pt elevation is neglected)\n", + "ip = sp*(Tp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2680. \t\t\t#kj/kg, enthalpy of the vapour generated at 100 C and 1 atm pr. from the steam table\n", + "#refer to fig. 9.23\n", + "#from energy balance eq. (Wf*if+qs = Wv*iv+Wp*ip)\n", + "qs = Ws*iv+Wp*ip-Wf-ef \t\t\t#Wv = Ws\n", + "print \"The rate at which heat must be supplied at 1 atm pressure is %1.3e kj/ day\"%(qs)\n", + "\n", + "#case ii\n", + "#650 mm Hg vaccum = 110 mmHg pressure\n", + "bp = 53.5 \t\t\t#C, boiling point of water\n", + "ip2 = sp*(bp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "es = 2604. \t\t\t#kj/kg, enthalpy of the saturated steam (from steam table)\n", + "#from energy balnce eq.\n", + "qs2 = Wp*ip+Ws*es-Wf-ef\n", + "print \"The rate at which heat must be supplied at a pressure of 600 mm Hg is %1.3e kj/day \"%(qs2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate at which heat must be supplied at 1 atm pressure is 2.441e+08 kj/ day\n", + "The rate at which heat must be supplied at a pressure of 600 mm Hg is 2.373e+08 kj/day \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ci = 10. \t\t\t#%,initial concentration\n", + "cf = 40. \t\t\t#%, final conc\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ft = 30. \t\t\t#C feed temp.\n", + "rp = 0.33 \t\t\t#kg/cm**2, reduced pressure\n", + "bt1 = 75. \t\t\t#C,boiling point temp.\n", + "sst = 115. \t\t\t#C, saturated steam temp.\n", + "l = 1.5 \t\t\t# m,height of calandria\n", + "sh = 0.946 \t\t\t#kcal/kg C, specific heat of liquir\n", + "lh = 556.5 \t\t\t#kcal/kg latent heat of steam\n", + "bt2 = 345. \t\t\t#K, boiling point of water \n", + "h = 2150. \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "si = 2000.*(ci/100) \t\t\t#kg/h, solids in\n", + "wi = 1800. \t\t\t#kg/h,wate in\n", + "\n", + "# Calculations\n", + "Wp = si/(cf/100) \t\t\t#kg/h, product out\n", + "Wv = Wf-Wp \t\t\t#evaporation rate\n", + "ef = sh*(ft-bt1)\n", + "ip = 0\n", + "lamda_s = 529.5 \t\t\t#kcal/kg, lamda_s = is-il\n", + "bpe = (273+bt1)-345 \t\t\t#boiling point elevation.\n", + "#from eergy balance eq.\n", + "Ws = (Wp*ip+Wv*lh-Wf*ef)/lamda_s\n", + "q = Ws*lamda_s \t\t\t#kcal/h,rate of heat transfer\n", + "A = q/(h*(sst-bt1)) \t\t\t# m**2\n", + "di = 0.0221 \t\t\t#m,inside diameter\n", + "At = math.pi*l*di \t\t\t#m**2, area of a math.single tube\n", + "N = A/At \t\t\t#no. of tubes\n", + "\n", + "# Results\n", + "print \"The steam required is %.0f kg/h\"%(Ws)\n", + "print \"No. of tube are %d\"%(N)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam required is 1737 kg/h\n", + "No. of tube are 102\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ci = 8. \t\t\t#% initial conc.\n", + "cf = 40. \t\t\t#% final conc.\n", + "ft = 30. \t\t\t#C, feed temp.\n", + "vp = 660. \t\t\t#mm Hg, vaccum pressure\n", + "ssp = 8. \t\t\t# bar absolute, saturated steam pr.\n", + "\n", + "#calculation\n", + "sr = Wf*(ci/100) \t\t\t#kg/h, solid rate\n", + "Wp = sr/(cf/100) \t\t\t#kg/h,concentrated product rate\n", + "ap = 760-vp \t\t\t#mm Hg, absolute pressure in the evaporator\n", + "bt = 325. \t\t\t#K,boiling temp. of water\n", + "l_s = 2380. \t\t\t#kj/kg, latent heat\n", + "R = 8.303 \t\t\t#gas consmath.tant\n", + "w = 40. \t\t\t#g,mass of solute\n", + "M = 18. \t\t\t#g,molecular wt of solvent\n", + "W = 60. \t\t\t#g,mass of the solvent\n", + "m = 2000. \t\t\t#g,molecular wt of solute\n", + "dtb = (R*bt**2*w*M)/(l_s*W*m) \t\t\t#C, boiling point elevation\n", + "bp = bt+dtb \t\t\t#k,boiling point of 40% solution\n", + "dt = 70. \t\t\t#C, from given data flux becomes maximum at a temp. drop = 70 C\n", + "st = bp+dt \t\t\t#K,saturation temp. of steam in the steam chest\n", + "Sp = 2.15 \t\t\t# bar, from steam table, saturation lr. of steam at this temp.\n", + "\n", + "sh = 4.2 \t\t\t#kj/kg C, specific heat of product\n", + "rt = 0. \t\t\t#C reference teml.\n", + "ef = sh*(ft-rt) \t\t\t# kj/kg, enthalpy of the feed\n", + "ip = sh*(54-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2607. \t\t\t#kj/kg, enthalpy of vapour produced\n", + "#from eq 9.6\n", + "Wv = 1600. \t\t\t#enthalpy of evaporation\n", + "q = Wp*ip+Wv*iv-Wf*ef \t\t\t#kj/h, heat transfe rate required\n", + "hvp = 2188. \t\t\t#kj/kg, heat of vaporization of saturated steam at 397 K\n", + "rs = q/hvp \t\t\t#kg/h, rate of steam supply\n", + "\n", + "# Results\n", + "print \"The steam pressure to be used in the calandria is %.2f barabs)\"%(Sp);\n", + "print \"The heat transfer rate required is %.2e Kj/h\"%(q);\n", + "print \"Rate of steam supply is %.0f kg/h\"%(rs);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam pressure to be used in the calandria is 2.15 barabs)\n", + "The heat transfer rate required is 4.01e+06 Kj/h\n", + "Rate of steam supply is 1833 kg/h\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "\n", + "# Variables\n", + "Wf = 6000. \t\t\t#kg/h, feed rate\n", + "ci = 2. \t\t\t#%, initial concentration\n", + "cf = 35. \t\t\t#%, final conc.\n", + "ft = 50. \t\t\t#C,feed temp.\n", + "ssp = 2. \t\t\t#bar abs, saturated steaam pr.\n", + "sep = 0.0139 \t\t\t#bar abs, maintained temp. in second effect\n", + "h1 = 2000. \t\t\t#W/m**2 K,overall heat transfer coeffcient in 1st effect\n", + "h2 = 1500. \t\t\t#W/m**2 K, overall heat transfer coefficient in 2nd effect\n", + "cp = 4.1 \t\t\t#kj/kg k,specific heat\n", + "\n", + "#calculation\n", + "si = Wf*(ci/100) \t\t\t#kg/h, solid in\n", + "wi = 5880. \t\t\t#kg/h, water in\n", + "Wp = si/(cf/100) \t\t\t#kg/h product out\n", + "wo = Wp*(1-cf/100) \t\t\t#kg/h, water out with the product\n", + "ter = wi-wo \t\t\t#kg/h, total evaporation rate\n", + "\n", + "#boiling temp. in the first effect\n", + "T1 = 120. \t\t\t#C,Temprature\n", + "l_s1 = 2200. \t\t\t#kj/kg, latent heat\n", + "T2 = 12. \t\t\t#C,boiling point in second effect\n", + "l_s2 = 2470. \t\t\t# kj/kg in second effect\n", + "tatd = T1-T2 \t\t\t# C,tatd = dt1+dt2 = T1-T2 , total available temp. drop\n", + "#from eq. 9.20\n", + "#h1*dt1 = h2*dt2\n", + "#solving above two equations by matrix\n", + "A = array([[1,1],[2000,-1500]])\n", + "C = array([108,0])\n", + "X = linalg.solve(A,C)\n", + "#X = inv(A)*C\n", + "\n", + "dt1 = X[0]\n", + "dt2 = X[1]\n", + "t1 = T1-dt1 \t\t\t#temp. of steam leaving the first effect\n", + "t2 = T2-dt2 \t\t\t#temp. of steam leaving second effect\n", + "#energy balance over the 1st effect, from eq.9.14\n", + "rt1 = t1\n", + "ef = cp*(ft-t1) \t\t\t#kj/kg,enthalpy of feed\n", + "i1 = 0\n", + "lam_s1 = 2330. \t\t\t#kj/kg\n", + "is1 = lam_s1\n", + "#Wf*ef+Ws*l_s = (Wf-Ws1)*i1+Ws1*is1\n", + "#substituting we get,\n", + "#Ws1 = 0.9442*Ws-253.4..........(1)\n", + "#energy balance over second effect\n", + "#from eq 9.15\n", + "#(Wf-Ws1)*i1+Ws1*lam_s1 = (Wf-Ws1-Ws2)*i2+Ws2*is2\n", + "rt2 = t2\n", + "lam_s2 = 2470.\n", + "is2 = lam_s2\n", + "i2 = 0\n", + "# substituting we get\n", + "#Ws2 = 0.8404*Ws1+617.5............(2)\n", + "#ter,Ws1+Ws2 = 5657...............(3)\n", + "#solving by matrix method\n", + "A = array([[0.9442,-1,0],[0,0.8404,-1],[0,1,1]])\n", + "B = array([253.4,-617.5,5657])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "\n", + "#evaporator area\n", + "A1 = Ws*l_s1/(h1*dt1) \t\t\t#for 1st effect\n", + "A2 = Ws1*lam_s1/(h2*dt2) \t\t\t#for second effect\n", + "\n", + "#revised calculation\n", + "#taking\n", + "dt1_ = 48.\n", + "dt2_ = 60.\n", + "T1_ = T1-dt1_\n", + "T2_ = T2-dt2_\n", + "ls1_ = 2335.\n", + "ls2_ = 2470.\n", + "# energy balance over first effect gives\n", + "#Ws1 = 0.9422Ws-231.8.........(4)\n", + "#energy balance over second effect gives\n", + "#Ws2 = 0.8457Ws1+579.5......(5)\n", + "#solving eq 3,4,5\n", + "P = array([[0.9422,-1,0],[0,0.8457,-1],[0,1,1]])\n", + "Q = array([231.8,-579.5,5657])\n", + "Y = linalg.solve(P,Q)\n", + "#Y = inv(P)*Q\n", + "Ws_ = Y[0]\n", + "Ws1_ = Y[1]\n", + "Ws2_ = Y[2]\n", + "\n", + "#eveporator area for 1st & 2nd effect in m**2\n", + "A1_ = Ws_*l_s1/(h1*dt1_)\n", + "A2_ = Ws1_*ls1_/(h2*dt2_)\n", + "EA = (A1_+A2_)/2\n", + "SE = (Ws1_+Ws2_)/Ws_\n", + "\n", + "# Results\n", + "print \"The evaporator area is %.0f square metre \"%(EA);\n", + "print \"Steam economy is %.2f\"%(SE);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The evaporator area is 72 square metre \n", + "Steam economy is 1.79\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ssp = 3.32 \t\t\t#bar abs, saturated steam pr.\n", + "rp = 0.195 \t\t\t# bar abs, residual pr. in the condenser\n", + "tl = 41. \t\t\t#K, sun of temp. losses because of BPE\n", + "mt = 8. \t\t\t#k,minimum available temp. driving force\n", + "#calculation\n", + "sst = 410. \t\t\t#K,saturated steam temp.\n", + "st = 333. \t\t\t#K,corresponding saturation temp. when pressure in the last effect is 0.195 bar\n", + "ttd = sst-st \t\t\t#K,total temp. difference\n", + "atd = ttd-tl \t\t\t# K,available temp. drop across the unit\n", + "n = atd/mt \t\t\t#maximum no. of effect\n", + "\n", + "# Results\n", + "print \"Maximum no. of effects are %.0f\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum no. of effects are 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "# Variables\n", + "fc = 9.5 \t\t\t#%,feed concentration\n", + "pc = 50. \t\t\t#%, product conc.\n", + "ft = 40. \t\t\t# C,feed temp.\n", + "er = 2000. \t\t\t#kg NaOH/h, evaporation rate\n", + "vp = 714. \t\t\t#mm Hg, vaccum pr. in last effect\n", + "#heat transfer coefficients, W/m**2 C\n", + "h1 = 6000. \t\t\t#for first effect\n", + "h2 = 3500. \t\t\t#for second effect\n", + "h3 = 2500. \t\t\t#for third effect\n", + "\n", + "#calculatiin\n", + "Wf = er/(fc/100) \t\t\t#kg/h, 2 tons NaOH per hour, feed rate\n", + "Wp = er/(pc/100) \t\t\t#kg/h, product rate\n", + "ter = Wf-Wp \t\t\t#kg/h, total evaporation rate\n", + "#steam\n", + "p = 3.3 \t\t\t#bar,assumed saturated\n", + "#from steam table\n", + "Ts = 137. \t\t\t#C,temp.\n", + "l_s = 2153. \t\t\t#kj/kg, latent heat\n", + "pl = 760.-vp \t\t\t#mm Hg,pressure in the last effect\n", + "bp = 37. \t\t\t#C,boiling point of water\n", + "#refer to fig. 9.24\n", + "attd = Ts-bp \t\t\t#C,apparent total temp. drop\n", + "#let assume the following evaporation rate for three effects in kg/h\n", + "ev1 = 5600.\n", + "ev2 = 5680.\n", + "ev3 = 5773.\n", + "#conc. in three effects\n", + "c1 = er/(Wf-ev1)\n", + "c2 = er/(Wf-ev1-ev2)\n", + "c3 = 0.5 \t\t\t# Variables\n", + "#boiling point elevations in three effects in C\n", + "bpe1 = 3.5\n", + "bpe2 = 8.\n", + "bpe3 = 39.\n", + "attda = attd-(bpe1+bpe2+bpe3) \t\t\t#actual total temp. drop available\n", + "#temp. drop in three effects\n", + "#from eq. 9.23\n", + "dt1 = attda*((1/h1)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt2 = attda*((1/h2)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt3 = attda*((1/h3)/((1/h1)+(1/h2)+(1/h3)))\n", + "\n", + "#from table 9.4\n", + "#enthalpy of solution in three effects in kj/kg\n", + "i1 = 486.\n", + "i2 = 385.\n", + "i3 = 460.\n", + "#enthalpy of vapour generated for three effects in kj/kg\n", + "is1 = 2729.\n", + "is2 = 2691.\n", + "is3 = 2646.\n", + "#Enthalpy of condensate over effect 1,2,3 in kj/kg\n", + "il1 = 0.\n", + "il2 = 519.\n", + "il3 = 418.\n", + "#Enthalpy balance over effect 1\n", + "ef = 145. \t\t\t#kj/kg,enthalpy of feed\n", + "#from energy balance eq.\n", + "#Ws1 = 0.96Ws-3200......(1)\n", + "#enthalpy balanc over effect 2\n", + "#Ws2 = 0.9146Ws1+922...........(2)\n", + "#enthalpy balanc over effet 3\n", + "#Ws3 = 1.073Ws2+0.0343Ws1-722........(3)\n", + "#ter = Ws1+Ws2+Ws3 = 17053..........(4)\n", + "\n", + "#Solving above four eqns by matrix\n", + "A = array([[0.96,-1,0,0],[0,0.9146,-1,0],[0,0.0343,1.073,-1],[0,1,1,1]])\n", + "B = array([3200,-922,722,17053])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "Ws3 = X[3]\n", + "\n", + "#calculation of heat transfer areas iver effect 1, 2 ,3\n", + "A1 = Ws*l_s*10**3/(h1*dt1*3600)\n", + "A2 = Ws1*(is1-il2)*10**3/(h2*dt2*3600)\n", + "A3 = Ws2*(is2-il3)*10**3/(h3*dt3*3600)\n", + "\n", + "#Revised dt\n", + "avar = (A1+A2+A3)/3\n", + "dt1_ = (A1/avar)*dt1\n", + "dt2_ = (A2/avar)*dt2\n", + "dt3_ = attda-dt1_-dt2_\n", + "\n", + "#from table 9.5\n", + "#enthalpy of vapour generated over effect 1,2,3 in kj/kg\n", + "is1_ = 2720.\n", + "is2_ = 2685.\n", + "is3_ = 2646.\n", + "#enthalpy of soln on 1,2,3 in kj/kg\n", + "i1_ = 470.\n", + "i2_ = 380.\n", + "i3_ = 460.\n", + "#enthalpy of condensate over effect 1 ,2,3 in kj/kg\n", + "il1_ = 0.\n", + "il2_ = 513.\n", + "il3_ = 412.\n", + "#enthalpy balance ove effect 1,2,3 gives\n", + "Ws_ = 8854.\n", + "Ws1_ = 5432.\n", + "Ws2_ = 5812.\n", + "Ws3_ = 5809.\n", + "#revised heat transfer areas for effect 1 ,2,3 in m**2\n", + "A1_ = Ws_*l_s*1000/(h1*dt1_*3600)\n", + "A2_ = Ws1_*(is1_-il2_)*10**3/(h2*dt2_*3600)\n", + "A3_ = Ws2_*(is2_-il3_)*10**3/(h3*22.5*3600)\n", + "avar_ = (A1_+A2_+A3_)/3\n", + "SE = ter/Ws_\n", + "\n", + "# Results\n", + "print \"The areas are now reasonably close \"\n", + "print \"Steam Rate is %.0f Kg/h \"%(Ws_)\n", + "print \"Steam economy is %.2f\"%(SE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The areas are now reasonably close \n", + "Steam Rate is 8854 Kg/h \n", + "Steam economy is 1.93\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,linalg\n", + "\n", + "# Variables\n", + "Wf = 3000. \t\t\t#kg/h,feed\n", + "fc = 8. \t\t\t#%, feed concentration\n", + "pc = 40. \t\t\t#% product concentration\n", + "si = Wf*(fc/100) \t\t\t#kg,solid in\n", + "pr = si/(40./100) \t\t\t#g/h, product rate\n", + "ft = 60. \t\t\t#C,feed temp.\n", + "er = Wf-pr \t\t\t#kg/h, evaporation rate\n", + "math.cost = 120000. \t\t\t#total math.cost per year\n", + "p1 = 4.5 \t\t\t#bar, low pressure steam\n", + "scpt = 700. \t\t\t#per ton. math.cost of steam\n", + "cp = 0.764 \t\t\t# kcal/kg, specific heat\n", + "\n", + "#from table 9.6\n", + "eep = 1. \t\t\t#atm existing evaporator pressure \n", + "oop = 400000. \t\t\t# peryear ,other operatingmath.cost\n", + "oop_ = 600000. \t\t\t#per yr, for proposed condition\n", + "wd = 300. \t\t\t#days per year.working days\n", + "wh = wd*24. \t\t\t#working hr\n", + "\n", + "# Calculations\n", + "#EXISTING OPERATING CONDITION \n", + "rt = 0 \t\t\t#C,reference temp.\n", + "ef = eep*(ft-rt) \t\t\t#kcal/kg, enthalpy of feed\n", + "pt = 100. \t\t\t#C,product temp.\n", + "i1 = cp*(pt-rt) \t\t\t#kcal/kg, enthalpy of soln\n", + "is1 = 639. \t\t\t#kcal/kg,enthalpy of vapour generated at 1 atm (from steam table)\n", + "l_s = 496. \t\t\t#kcal/kg,latent heat of steam at 4.5 bar\n", + "T = 425. \t\t\t#K\n", + "#heat balance\n", + "Ws = (er*is1+pr*i1-Wf*ef)/l_s \t\t\t#kg/h, steam required\n", + "q = Ws*l_s \t\t\t#ton/ hr,heat supplied\n", + "x = q/(T-(pt+273)) \t\t\t#x = Ud*A\n", + "#hourly math.cost\n", + "sc = Ws/1000*(scpt) \t\t\t# /perh, steam math.cost\n", + "lc = 100. \t\t\t#per h,labour math.cost\n", + "oc = oop/(wh) \t\t\t# per h,othe math.cost\n", + "tc = sc+lc+oc \t\t\t#total math.cost\n", + "C = tc/(Wf/1000) \t\t\t# per ton,math.cost per ton of feed\n", + "\n", + "#PROPOSED OPERATING CONDITION\n", + "bpl = 320. \t\t\t#K,boiling point of liquid\n", + "dt = T-bpl\n", + "q_ = x*dt \t\t\t#kcal/h,rate of heat supply\n", + "sr = q_/l_s \t\t\t#steam rate ton per hr\n", + "pt_ = 47. \t\t\t#C,product temp .\n", + "ep = cp*(pt_-rt) \t\t\t#kcal/kg. enthalpy of product\n", + "ev = 618. \t\t\t#kcal/kg, enthalpy of vapour generated\n", + "#heat balance\n", + "#24Wf_-582Ws1_ = 2825000 ..........(1)\n", + "#material balance\n", + "# 4Wf_-5Ws1_ = 0 .............(2)\n", + "#solving by matrix method\n", + "a = array([[24,-582],[4,-5]])\n", + "b = array([-2825000,0])\n", + "x_ = linalg.solve(a,b)\n", + "#x_ = inv(a)*b\n", + "Wf_ = x_[0]\n", + "Ws1_ = x_[1]\n", + "ic = (Wf_-Wf)/Wf\n", + "print \"The increase in evaporation capacity ic %d percentage \"%(ic*100)\n", + "sr_ = Ws1_/1000 \t\t\t#ton per hr ,steam rate \n", + "#hourly math.cost\n", + "sc_ = Ws1_*scpt \t\t\t#steam math.cost\n", + "lc_ = 200. \t\t\t#labour math.cost rs.200/ h\n", + "oc_ = oop_/wh \t\t\t# other math.cost\n", + "tc_ = sc_/1000+lc_+oc_\n", + "C_ = tc_/(Wf_/1000) \t\t\t#math.cost per ton of feed\n", + "ps = (C-C_)/C\n", + "print \" The percentage change in the math.cost of concentrating a ton of feed is %.0f percentage\"%(ps*100)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in evaporation capacity ic 113 percentage \n", + " The percentage change in the math.cost of concentrating a ton of feed is 15 percentage\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "q = 2200. \t\t\t#kj/kg heat of condensation of steam \n", + "#from example 9.1\n", + "Qr = 2.337*10**8 \t\t\t#kj/day rate of heat supply\n", + "\n", + "#calculation\n", + "Rate = Qr/q \t\t\t#kg/day steam supply rate\n", + "Rate_ = 1.062*10**5 \t\t\t#approximate value\n", + "E = 2800. \t\t\t#kj/kg enthalpy of compressed vapour\n", + "T = 175.7 \t\t\t#C, temprature\n", + "Ts = 121. \t\t\t#C Saturation temprature\n", + "E1 = 2700. \t\t\t#enthalpy at saturation temprature\n", + "q1 = T-Ts \t\t\t#Superheat of vapour\n", + "T1 = 100. \t\t\t#C hot water temprature\n", + "E2 = 419. \t\t\t#Enthalpy at hot water temp.\n", + "x = (E-E1)/(E1-E2) \t\t\t#water supplied per kg of superheated steam\n", + "S = 1.044 \t\t\t#steam obtained after desuperheating\n", + "R1 = 8.925*10**4 \t\t\t#kg/day rate of vapour generation \n", + "R2 = S*R1 \t\t\t#Rate of recompressed sat. steam\n", + "R2_ = 9.318*10**4 \t\t\t#approximate value\n", + "SR = Rate_-R2_ \n", + "\n", + "# Results\n", + "print \"Make up steam required is %.3e kg/day\"%(SR)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Make up steam required is 1.302e+04 kg/day\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_2.ipynb b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_2.ipynb new file mode 100755 index 00000000..330a67ca --- /dev/null +++ b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/ch9_2.ipynb @@ -0,0 +1,693 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ee3d5a8c4dc79f0c380db9164fb29e7c0a4746212cf1207394a57a488872a02" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Evaporetion and Evaporators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ro = 1020. \t\t\t# kg/m**3, density of feed\n", + "sf = 4.1 \t\t\t#kj/kg C,specific heat of the feed\n", + "sp = 3.9 \t\t\t#kj/kg C,specific heat of the product\n", + "ci = 5. \t\t\t#initial concentration\n", + "cw = 100.-ci \t\t\t#conc. of water\n", + "cf = 40. \t\t\t#final conc.\n", + "rate = 100. \t\t\t#m**3/day, rate of conc. of aq. solution\n", + "ft = 25. \t\t\t# C, feed temp.\n", + "\n", + "#calculation and results\n", + "#materiel balance\n", + "Wf = rate*ro \t\t\t#Kg. feed entering\n", + "Ms = ro*ci \t\t\t#Kg mass of solute\n", + "Mw = ro*cw \t\t\t#kg,mass of water\n", + "fc = cw/ci \t\t\t#kg,feed concentration\n", + "pc = (100-cf)/cf \t\t\t# kg,product concentration\n", + "wlwp = Ms*pc \t\t\t#Kg, water leaving with the product\n", + "Ws = Mw-wlwp \t\t\t#kg,water evaporated\n", + "Wp = wlwp+Ms \t\t\t# kg, product\n", + "#energy balance\n", + "rt = 0. \t\t\t#C reference temp.\n", + "ef = sf*(ft-rt) \t\t\t#kj/kg,enthlpy of the feed\n", + "#case i\n", + "Tp = 100. \t\t\t#temp. of the product (because the solute has a 'high molecular wt' the boiling pt elevation is neglected)\n", + "ip = sp*(Tp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2680. \t\t\t#kj/kg, enthalpy of the vapour generated at 100 C and 1 atm pr. from the steam table\n", + "#refer to fig. 9.23\n", + "#from energy balance eq. (Wf*if+qs = Wv*iv+Wp*ip)\n", + "qs = Ws*iv+Wp*ip-Wf-ef \t\t\t#Wv = Ws\n", + "print \"The rate at which heat must be supplied at 1 atm pressure is %1.3e kj/ day\"%(qs)\n", + "\n", + "#case ii\n", + "#650 mm Hg vaccum = 110 mmHg pressure\n", + "bp = 53.5 \t\t\t#C, boiling point of water\n", + "ip2 = sp*(bp-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "es = 2604. \t\t\t#kj/kg, enthalpy of the saturated steam (from steam table)\n", + "#from energy balnce eq.\n", + "qs2 = Wp*ip+Ws*es-Wf-ef\n", + "print \"The rate at which heat must be supplied at a pressure of 600 mm Hg is %1.3e kj/day \"%(qs2)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rate at which heat must be supplied at 1 atm pressure is 2.441e+08 kj/ day\n", + "The rate at which heat must be supplied at a pressure of 600 mm Hg is 2.373e+08 kj/day \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "ci = 10. \t\t\t#%,initial concentration\n", + "cf = 40. \t\t\t#%, final conc\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ft = 30. \t\t\t#C feed temp.\n", + "rp = 0.33 \t\t\t#kg/cm**2, reduced pressure\n", + "bt1 = 75. \t\t\t#C,boiling point temp.\n", + "sst = 115. \t\t\t#C, saturated steam temp.\n", + "l = 1.5 \t\t\t# m,height of calandria\n", + "sh = 0.946 \t\t\t#kcal/kg C, specific heat of liquir\n", + "lh = 556.5 \t\t\t#kcal/kg latent heat of steam\n", + "bt2 = 345. \t\t\t#K, boiling point of water \n", + "h = 2150. \t\t\t#kcal/h m**2 C, overall heat transfer coefficient\n", + "si = 2000.*(ci/100) \t\t\t#kg/h, solids in\n", + "wi = 1800. \t\t\t#kg/h,wate in\n", + "\n", + "# Calculations\n", + "Wp = si/(cf/100) \t\t\t#kg/h, product out\n", + "Wv = Wf-Wp \t\t\t#evaporation rate\n", + "ef = sh*(ft-bt1)\n", + "ip = 0\n", + "lamda_s = 529.5 \t\t\t#kcal/kg, lamda_s = is-il\n", + "bpe = (273+bt1)-345 \t\t\t#boiling point elevation.\n", + "#from eergy balance eq.\n", + "Ws = (Wp*ip+Wv*lh-Wf*ef)/lamda_s\n", + "q = Ws*lamda_s \t\t\t#kcal/h,rate of heat transfer\n", + "A = q/(h*(sst-bt1)) \t\t\t# m**2\n", + "di = 0.0221 \t\t\t#m,inside diameter\n", + "At = math.pi*l*di \t\t\t#m**2, area of a math.single tube\n", + "N = A/At \t\t\t#no. of tubes\n", + "\n", + "# Results\n", + "print \"The steam required is %.0f kg/h\"%(Ws)\n", + "print \"No. of tube are %d\"%(N)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam required is 1737 kg/h\n", + "No. of tube are 102\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Wf = 2000. \t\t\t#kg/h, feed rate\n", + "ci = 8. \t\t\t#% initial conc.\n", + "cf = 40. \t\t\t#% final conc.\n", + "ft = 30. \t\t\t#C, feed temp.\n", + "vp = 660. \t\t\t#mm Hg, vaccum pressure\n", + "ssp = 8. \t\t\t# bar absolute, saturated steam pr.\n", + "\n", + "#calculation\n", + "sr = Wf*(ci/100) \t\t\t#kg/h, solid rate\n", + "Wp = sr/(cf/100) \t\t\t#kg/h,concentrated product rate\n", + "ap = 760-vp \t\t\t#mm Hg, absolute pressure in the evaporator\n", + "bt = 325. \t\t\t#K,boiling temp. of water\n", + "l_s = 2380. \t\t\t#kj/kg, latent heat\n", + "R = 8.303 \t\t\t#gas consmath.tant\n", + "w = 40. \t\t\t#g,mass of solute\n", + "M = 18. \t\t\t#g,molecular wt of solvent\n", + "W = 60. \t\t\t#g,mass of the solvent\n", + "m = 2000. \t\t\t#g,molecular wt of solute\n", + "dtb = (R*bt**2*w*M)/(l_s*W*m) \t\t\t#C, boiling point elevation\n", + "bp = bt+dtb \t\t\t#k,boiling point of 40% solution\n", + "dt = 70. \t\t\t#C, from given data flux becomes maximum at a temp. drop = 70 C\n", + "st = bp+dt \t\t\t#K,saturation temp. of steam in the steam chest\n", + "Sp = 2.15 \t\t\t# bar, from steam table, saturation lr. of steam at this temp.\n", + "\n", + "sh = 4.2 \t\t\t#kj/kg C, specific heat of product\n", + "rt = 0. \t\t\t#C reference teml.\n", + "ef = sh*(ft-rt) \t\t\t# kj/kg, enthalpy of the feed\n", + "ip = sh*(54-rt) \t\t\t#kj/kg, enthalpy of the product\n", + "iv = 2607. \t\t\t#kj/kg, enthalpy of vapour produced\n", + "#from eq 9.6\n", + "Wv = 1600. \t\t\t#enthalpy of evaporation\n", + "q = Wp*ip+Wv*iv-Wf*ef \t\t\t#kj/h, heat transfe rate required\n", + "hvp = 2188. \t\t\t#kj/kg, heat of vaporization of saturated steam at 397 K\n", + "rs = q/hvp \t\t\t#kg/h, rate of steam supply\n", + "\n", + "# Results\n", + "print \"The steam pressure to be used in the calandria is %.2f barabs)\"%(Sp);\n", + "print \"The heat transfer rate required is %.2e Kj/h\"%(q);\n", + "print \"Rate of steam supply is %.0f kg/h\"%(rs);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The steam pressure to be used in the calandria is 2.15 barabs)\n", + "The heat transfer rate required is 4.01e+06 Kj/h\n", + "Rate of steam supply is 1833 kg/h\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "\n", + "# Variables\n", + "Wf = 6000. \t\t\t#kg/h, feed rate\n", + "ci = 2. \t\t\t#%, initial concentration\n", + "cf = 35. \t\t\t#%, final conc.\n", + "ft = 50. \t\t\t#C,feed temp.\n", + "ssp = 2. \t\t\t#bar abs, saturated steaam pr.\n", + "sep = 0.0139 \t\t\t#bar abs, maintained temp. in second effect\n", + "h1 = 2000. \t\t\t#W/m**2 K,overall heat transfer coeffcient in 1st effect\n", + "h2 = 1500. \t\t\t#W/m**2 K, overall heat transfer coefficient in 2nd effect\n", + "cp = 4.1 \t\t\t#kj/kg k,specific heat\n", + "\n", + "#calculation\n", + "si = Wf*(ci/100) \t\t\t#kg/h, solid in\n", + "wi = 5880. \t\t\t#kg/h, water in\n", + "Wp = si/(cf/100) \t\t\t#kg/h product out\n", + "wo = Wp*(1-cf/100) \t\t\t#kg/h, water out with the product\n", + "ter = wi-wo \t\t\t#kg/h, total evaporation rate\n", + "\n", + "#boiling temp. in the first effect\n", + "T1 = 120. \t\t\t#C,Temprature\n", + "l_s1 = 2200. \t\t\t#kj/kg, latent heat\n", + "T2 = 12. \t\t\t#C,boiling point in second effect\n", + "l_s2 = 2470. \t\t\t# kj/kg in second effect\n", + "tatd = T1-T2 \t\t\t# C,tatd = dt1+dt2 = T1-T2 , total available temp. drop\n", + "#from eq. 9.20\n", + "#h1*dt1 = h2*dt2\n", + "#solving above two equations by matrix\n", + "A = array([[1,1],[2000,-1500]])\n", + "C = array([108,0])\n", + "X = linalg.solve(A,C)\n", + "#X = inv(A)*C\n", + "\n", + "dt1 = X[0]\n", + "dt2 = X[1]\n", + "t1 = T1-dt1 \t\t\t#temp. of steam leaving the first effect\n", + "t2 = T2-dt2 \t\t\t#temp. of steam leaving second effect\n", + "#energy balance over the 1st effect, from eq.9.14\n", + "rt1 = t1\n", + "ef = cp*(ft-t1) \t\t\t#kj/kg,enthalpy of feed\n", + "i1 = 0\n", + "lam_s1 = 2330. \t\t\t#kj/kg\n", + "is1 = lam_s1\n", + "#Wf*ef+Ws*l_s = (Wf-Ws1)*i1+Ws1*is1\n", + "#substituting we get,\n", + "#Ws1 = 0.9442*Ws-253.4..........(1)\n", + "#energy balance over second effect\n", + "#from eq 9.15\n", + "#(Wf-Ws1)*i1+Ws1*lam_s1 = (Wf-Ws1-Ws2)*i2+Ws2*is2\n", + "rt2 = t2\n", + "lam_s2 = 2470.\n", + "is2 = lam_s2\n", + "i2 = 0\n", + "# substituting we get\n", + "#Ws2 = 0.8404*Ws1+617.5............(2)\n", + "#ter,Ws1+Ws2 = 5657...............(3)\n", + "#solving by matrix method\n", + "A = array([[0.9442,-1,0],[0,0.8404,-1],[0,1,1]])\n", + "B = array([253.4,-617.5,5657])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "\n", + "#evaporator area\n", + "A1 = Ws*l_s1/(h1*dt1) \t\t\t#for 1st effect\n", + "A2 = Ws1*lam_s1/(h2*dt2) \t\t\t#for second effect\n", + "\n", + "#revised calculation\n", + "#taking\n", + "dt1_ = 48.\n", + "dt2_ = 60.\n", + "T1_ = T1-dt1_\n", + "T2_ = T2-dt2_\n", + "ls1_ = 2335.\n", + "ls2_ = 2470.\n", + "# energy balance over first effect gives\n", + "#Ws1 = 0.9422Ws-231.8.........(4)\n", + "#energy balance over second effect gives\n", + "#Ws2 = 0.8457Ws1+579.5......(5)\n", + "#solving eq 3,4,5\n", + "P = array([[0.9422,-1,0],[0,0.8457,-1],[0,1,1]])\n", + "Q = array([231.8,-579.5,5657])\n", + "Y = linalg.solve(P,Q)\n", + "#Y = inv(P)*Q\n", + "Ws_ = Y[0]\n", + "Ws1_ = Y[1]\n", + "Ws2_ = Y[2]\n", + "\n", + "#eveporator area for 1st & 2nd effect in m**2\n", + "A1_ = Ws_*l_s1/(h1*dt1_)\n", + "A2_ = Ws1_*ls1_/(h2*dt2_)\n", + "EA = (A1_+A2_)/2\n", + "SE = (Ws1_+Ws2_)/Ws_\n", + "\n", + "# Results\n", + "print \"The evaporator area is %.0f square metre \"%(EA);\n", + "print \"Steam economy is %.2f\"%(SE);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The evaporator area is 72 square metre \n", + "Steam economy is 1.79\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "ssp = 3.32 \t\t\t#bar abs, saturated steam pr.\n", + "rp = 0.195 \t\t\t# bar abs, residual pr. in the condenser\n", + "tl = 41. \t\t\t#K, sun of temp. losses because of BPE\n", + "mt = 8. \t\t\t#k,minimum available temp. driving force\n", + "#calculation\n", + "sst = 410. \t\t\t#K,saturated steam temp.\n", + "st = 333. \t\t\t#K,corresponding saturation temp. when pressure in the last effect is 0.195 bar\n", + "ttd = sst-st \t\t\t#K,total temp. difference\n", + "atd = ttd-tl \t\t\t# K,available temp. drop across the unit\n", + "n = atd/mt \t\t\t#maximum no. of effect\n", + "\n", + "# Results\n", + "print \"Maximum no. of effects are %.0f\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum no. of effects are 4\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "# Variables\n", + "fc = 9.5 \t\t\t#%,feed concentration\n", + "pc = 50. \t\t\t#%, product conc.\n", + "ft = 40. \t\t\t# C,feed temp.\n", + "er = 2000. \t\t\t#kg NaOH/h, evaporation rate\n", + "vp = 714. \t\t\t#mm Hg, vaccum pr. in last effect\n", + "#heat transfer coefficients, W/m**2 C\n", + "h1 = 6000. \t\t\t#for first effect\n", + "h2 = 3500. \t\t\t#for second effect\n", + "h3 = 2500. \t\t\t#for third effect\n", + "\n", + "#calculatiin\n", + "Wf = er/(fc/100) \t\t\t#kg/h, 2 tons NaOH per hour, feed rate\n", + "Wp = er/(pc/100) \t\t\t#kg/h, product rate\n", + "ter = Wf-Wp \t\t\t#kg/h, total evaporation rate\n", + "#steam\n", + "p = 3.3 \t\t\t#bar,assumed saturated\n", + "#from steam table\n", + "Ts = 137. \t\t\t#C,temp.\n", + "l_s = 2153. \t\t\t#kj/kg, latent heat\n", + "pl = 760.-vp \t\t\t#mm Hg,pressure in the last effect\n", + "bp = 37. \t\t\t#C,boiling point of water\n", + "#refer to fig. 9.24\n", + "attd = Ts-bp \t\t\t#C,apparent total temp. drop\n", + "#let assume the following evaporation rate for three effects in kg/h\n", + "ev1 = 5600.\n", + "ev2 = 5680.\n", + "ev3 = 5773.\n", + "#conc. in three effects\n", + "c1 = er/(Wf-ev1)\n", + "c2 = er/(Wf-ev1-ev2)\n", + "c3 = 0.5 \t\t\t# Variables\n", + "#boiling point elevations in three effects in C\n", + "bpe1 = 3.5\n", + "bpe2 = 8.\n", + "bpe3 = 39.\n", + "attda = attd-(bpe1+bpe2+bpe3) \t\t\t#actual total temp. drop available\n", + "#temp. drop in three effects\n", + "#from eq. 9.23\n", + "dt1 = attda*((1/h1)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt2 = attda*((1/h2)/((1/h1)+(1/h2)+(1/h3)))\n", + "dt3 = attda*((1/h3)/((1/h1)+(1/h2)+(1/h3)))\n", + "\n", + "#from table 9.4\n", + "#enthalpy of solution in three effects in kj/kg\n", + "i1 = 486.\n", + "i2 = 385.\n", + "i3 = 460.\n", + "#enthalpy of vapour generated for three effects in kj/kg\n", + "is1 = 2729.\n", + "is2 = 2691.\n", + "is3 = 2646.\n", + "#Enthalpy of condensate over effect 1,2,3 in kj/kg\n", + "il1 = 0.\n", + "il2 = 519.\n", + "il3 = 418.\n", + "#Enthalpy balance over effect 1\n", + "ef = 145. \t\t\t#kj/kg,enthalpy of feed\n", + "#from energy balance eq.\n", + "#Ws1 = 0.96Ws-3200......(1)\n", + "#enthalpy balanc over effect 2\n", + "#Ws2 = 0.9146Ws1+922...........(2)\n", + "#enthalpy balanc over effet 3\n", + "#Ws3 = 1.073Ws2+0.0343Ws1-722........(3)\n", + "#ter = Ws1+Ws2+Ws3 = 17053..........(4)\n", + "\n", + "#Solving above four eqns by matrix\n", + "A = array([[0.96,-1,0,0],[0,0.9146,-1,0],[0,0.0343,1.073,-1],[0,1,1,1]])\n", + "B = array([3200,-922,722,17053])\n", + "X = linalg.solve(A,B)\n", + "#X = inv(A)*B\n", + "Ws = X[0]\n", + "Ws1 = X[1]\n", + "Ws2 = X[2]\n", + "Ws3 = X[3]\n", + "\n", + "#calculation of heat transfer areas iver effect 1, 2 ,3\n", + "A1 = Ws*l_s*10**3/(h1*dt1*3600)\n", + "A2 = Ws1*(is1-il2)*10**3/(h2*dt2*3600)\n", + "A3 = Ws2*(is2-il3)*10**3/(h3*dt3*3600)\n", + "\n", + "#Revised dt\n", + "avar = (A1+A2+A3)/3\n", + "dt1_ = (A1/avar)*dt1\n", + "dt2_ = (A2/avar)*dt2\n", + "dt3_ = attda-dt1_-dt2_\n", + "\n", + "#from table 9.5\n", + "#enthalpy of vapour generated over effect 1,2,3 in kj/kg\n", + "is1_ = 2720.\n", + "is2_ = 2685.\n", + "is3_ = 2646.\n", + "#enthalpy of soln on 1,2,3 in kj/kg\n", + "i1_ = 470.\n", + "i2_ = 380.\n", + "i3_ = 460.\n", + "#enthalpy of condensate over effect 1 ,2,3 in kj/kg\n", + "il1_ = 0.\n", + "il2_ = 513.\n", + "il3_ = 412.\n", + "#enthalpy balance ove effect 1,2,3 gives\n", + "Ws_ = 8854.\n", + "Ws1_ = 5432.\n", + "Ws2_ = 5812.\n", + "Ws3_ = 5809.\n", + "#revised heat transfer areas for effect 1 ,2,3 in m**2\n", + "A1_ = Ws_*l_s*1000/(h1*dt1_*3600)\n", + "A2_ = Ws1_*(is1_-il2_)*10**3/(h2*dt2_*3600)\n", + "A3_ = Ws2_*(is2_-il3_)*10**3/(h3*22.5*3600)\n", + "avar_ = (A1_+A2_+A3_)/3\n", + "SE = ter/Ws_\n", + "\n", + "# Results\n", + "print \"The areas are now reasonably close \"\n", + "print \"Steam Rate is %.0f Kg/h \"%(Ws_)\n", + "print \"Steam economy is %.2f\"%(SE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The areas are now reasonably close \n", + "Steam Rate is 8854 Kg/h \n", + "Steam economy is 1.93\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,linalg\n", + "\n", + "# Variables\n", + "Wf = 3000. \t\t\t#kg/h,feed\n", + "fc = 8. \t\t\t#%, feed concentration\n", + "pc = 40. \t\t\t#% product concentration\n", + "si = Wf*(fc/100) \t\t\t#kg,solid in\n", + "pr = si/(40./100) \t\t\t#g/h, product rate\n", + "ft = 60. \t\t\t#C,feed temp.\n", + "er = Wf-pr \t\t\t#kg/h, evaporation rate\n", + "math.cost = 120000. \t\t\t#total math.cost per year\n", + "p1 = 4.5 \t\t\t#bar, low pressure steam\n", + "scpt = 700. \t\t\t#per ton. math.cost of steam\n", + "cp = 0.764 \t\t\t# kcal/kg, specific heat\n", + "\n", + "#from table 9.6\n", + "eep = 1. \t\t\t#atm existing evaporator pressure \n", + "oop = 400000. \t\t\t# peryear ,other operatingmath.cost\n", + "oop_ = 600000. \t\t\t#per yr, for proposed condition\n", + "wd = 300. \t\t\t#days per year.working days\n", + "wh = wd*24. \t\t\t#working hr\n", + "\n", + "# Calculations\n", + "#EXISTING OPERATING CONDITION \n", + "rt = 0 \t\t\t#C,reference temp.\n", + "ef = eep*(ft-rt) \t\t\t#kcal/kg, enthalpy of feed\n", + "pt = 100. \t\t\t#C,product temp.\n", + "i1 = cp*(pt-rt) \t\t\t#kcal/kg, enthalpy of soln\n", + "is1 = 639. \t\t\t#kcal/kg,enthalpy of vapour generated at 1 atm (from steam table)\n", + "l_s = 496. \t\t\t#kcal/kg,latent heat of steam at 4.5 bar\n", + "T = 425. \t\t\t#K\n", + "#heat balance\n", + "Ws = (er*is1+pr*i1-Wf*ef)/l_s \t\t\t#kg/h, steam required\n", + "q = Ws*l_s \t\t\t#ton/ hr,heat supplied\n", + "x = q/(T-(pt+273)) \t\t\t#x = Ud*A\n", + "#hourly math.cost\n", + "sc = Ws/1000*(scpt) \t\t\t# /perh, steam math.cost\n", + "lc = 100. \t\t\t#per h,labour math.cost\n", + "oc = oop/(wh) \t\t\t# per h,othe math.cost\n", + "tc = sc+lc+oc \t\t\t#total math.cost\n", + "C = tc/(Wf/1000) \t\t\t# per ton,math.cost per ton of feed\n", + "\n", + "#PROPOSED OPERATING CONDITION\n", + "bpl = 320. \t\t\t#K,boiling point of liquid\n", + "dt = T-bpl\n", + "q_ = x*dt \t\t\t#kcal/h,rate of heat supply\n", + "sr = q_/l_s \t\t\t#steam rate ton per hr\n", + "pt_ = 47. \t\t\t#C,product temp .\n", + "ep = cp*(pt_-rt) \t\t\t#kcal/kg. enthalpy of product\n", + "ev = 618. \t\t\t#kcal/kg, enthalpy of vapour generated\n", + "#heat balance\n", + "#24Wf_-582Ws1_ = 2825000 ..........(1)\n", + "#material balance\n", + "# 4Wf_-5Ws1_ = 0 .............(2)\n", + "#solving by matrix method\n", + "a = array([[24,-582],[4,-5]])\n", + "b = array([-2825000,0])\n", + "x_ = linalg.solve(a,b)\n", + "#x_ = inv(a)*b\n", + "Wf_ = x_[0]\n", + "Ws1_ = x_[1]\n", + "ic = (Wf_-Wf)/Wf\n", + "print \"The increase in evaporation capacity ic %d percentage \"%(ic*100)\n", + "sr_ = Ws1_/1000 \t\t\t#ton per hr ,steam rate \n", + "#hourly math.cost\n", + "sc_ = Ws1_*scpt \t\t\t#steam math.cost\n", + "lc_ = 200. \t\t\t#labour math.cost rs.200/ h\n", + "oc_ = oop_/wh \t\t\t# other math.cost\n", + "tc_ = sc_/1000+lc_+oc_\n", + "C_ = tc_/(Wf_/1000) \t\t\t#math.cost per ton of feed\n", + "ps = (C-C_)/C\n", + "print \" The percentage change in the math.cost of concentrating a ton of feed is %.0f percentage\"%(ps*100)\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in evaporation capacity ic 113 percentage \n", + " The percentage change in the math.cost of concentrating a ton of feed is 15 percentage\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8 Page No : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "q = 2200. \t\t\t#kj/kg heat of condensation of steam \n", + "#from example 9.1\n", + "Qr = 2.337*10**8 \t\t\t#kj/day rate of heat supply\n", + "\n", + "#calculation\n", + "Rate = Qr/q \t\t\t#kg/day steam supply rate\n", + "Rate_ = 1.062*10**5 \t\t\t#approximate value\n", + "E = 2800. \t\t\t#kj/kg enthalpy of compressed vapour\n", + "T = 175.7 \t\t\t#C, temprature\n", + "Ts = 121. \t\t\t#C Saturation temprature\n", + "E1 = 2700. \t\t\t#enthalpy at saturation temprature\n", + "q1 = T-Ts \t\t\t#Superheat of vapour\n", + "T1 = 100. \t\t\t#C hot water temprature\n", + "E2 = 419. \t\t\t#Enthalpy at hot water temp.\n", + "x = (E-E1)/(E1-E2) \t\t\t#water supplied per kg of superheated steam\n", + "S = 1.044 \t\t\t#steam obtained after desuperheating\n", + "R1 = 8.925*10**4 \t\t\t#kg/day rate of vapour generation \n", + "R2 = S*R1 \t\t\t#Rate of recompressed sat. steam\n", + "R2_ = 9.318*10**4 \t\t\t#approximate value\n", + "SR = Rate_-R2_ \n", + "\n", + "# Results\n", + "print \"Make up steam required is %.3e kg/day\"%(SR)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Make up steam required is 1.302e+04 kg/day\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch10.png b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch10.png new file mode 100755 index 00000000..4a46004c Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch10.png differ diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch5.png b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch5.png new file mode 100755 index 00000000..c82a6a63 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch5.png differ diff --git a/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch9.png b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch9.png new file mode 100755 index 00000000..fadfab16 Binary files /dev/null and b/Heat_Transfer:_Principles_And_Applications_by_B._K._Dutta/screenshots/ch9.png differ diff --git a/High_Voltage_Engineering/screenshots/chap1.png b/High_Voltage_Engineering/screenshots/chap1.png new file mode 100755 index 00000000..ed60c766 Binary files /dev/null and b/High_Voltage_Engineering/screenshots/chap1.png differ diff --git a/High_Voltage_Engineering/screenshots/chap3.png b/High_Voltage_Engineering/screenshots/chap3.png new file mode 100755 index 00000000..407e105c Binary files /dev/null and b/High_Voltage_Engineering/screenshots/chap3.png differ diff --git a/High_Voltage_Engineering/screenshots/chap7.png b/High_Voltage_Engineering/screenshots/chap7.png new file mode 100755 index 00000000..4737cd4a Binary files /dev/null and b/High_Voltage_Engineering/screenshots/chap7.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_12.png b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_12.png new file mode 100755 index 00000000..dea34c4f Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_12.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_16.png b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_16.png new file mode 100755 index 00000000..0cc6d038 Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_16.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_3.png b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_3.png new file mode 100755 index 00000000..58da270c Binary files /dev/null and b/High_Voltage_Engineering_Theory_and_Practice/screenshots/Cha_3.png differ diff --git a/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables.ipynb new file mode 100755 index 00000000..9be7effb --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_12_High_Voltage_cables.ipynb @@ -0,0 +1,545 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration.ipynb new file mode 100755 index 00000000..7dc15ef2 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_16_High_Voltage_Genration.ipynb @@ -0,0 +1,758 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 High Voltage Genration" + ] + }, + { + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries_.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries_.ipynb new file mode 100755 index 00000000..0f62ba96 --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_19_Applications_of_High_Voltage_Engineering_in_Industries_.ipynb @@ -0,0 +1,407 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields.ipynb new file mode 100755 index 00000000..c9f6fefe --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_2_Electric_Fields.ipynb @@ -0,0 +1,319 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases.ipynb new file mode 100755 index 00000000..41671c1f --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_3_Ionization_and_Deionization_Processes_in_Gases.ipynb @@ -0,0 +1,717 @@ +{ + "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" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases.ipynb new file mode 100755 index 00000000..0dcae7de --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_4_Electrical_Breakdown_of_Gases.ipynb @@ -0,0 +1,566 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge.ipynb new file mode 100755 index 00000000..d7660a4d --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chapter_5_The_Corona_Discharge.ipynb @@ -0,0 +1,437 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems.ipynb b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems.ipynb new file mode 100755 index 00000000..9131898f --- /dev/null +++ b/High_Voltage_Engineering_Theory_and_Practice_by_M._Khalifa/Chpater_14_Overvoltages_on_Power_systems.ipynb @@ -0,0 +1,83 @@ +{ + "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" + ] + }, + { + "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/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER1.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER1.ipynb new file mode 100755 index 00000000..6c66d92e --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER1.ipynb @@ -0,0 +1,206 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cb7821e52dda76fa27e45154f9c14ca9fa493fbd763be86cc9be92d018411582" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 1 - Breakdown Mechanism of Gases Liquid and Solid Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.1 - PG NO.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.1 Page 51\n", + "import math\n", + "I = 600. # micor amps\n", + "x = 0.5 # distance in cm\n", + "V = 10. # kV\n", + "I2 = 60. # micro amps\n", + "x2 = 0.1 # distance in cm \n", + "#Calculation 600 = I0*exp(0.5*alpha) and 60 = I0*exp(0.1*alpha)\n", + "alpha =math.log(600./60.)/(0.5-0.1)\n", + "print'%s %.3f %s' %(\"Townsends first ionising coefficient = \",alpha,\" ionizing collisions/cm\")\n", + "\n", + "#Answers may vary due to round of error \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Townsends first ionising coefficient = 5.756 ionizing collisions/cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.2 - PG NO.52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.2 Page 52\n", + "import math\n", + "# Refering the table in example 1.2\n", + "# slope between any two points (math.log(I/I0)/x)\n", + "# taking the gap between 2 and 2.5 mm\n", + "I1= 1.5*10**-12\n", + "I2= 5.6*10**-12\n", + "I0 = 6*10**-14\n", + "gi1 = math.log(I1/I0) # gradual increase when gap is 2\n", + "gi2 = math.log(I2/I0) # gradual increase when gap is 2.5 #claculation in text is wrong\n", + "slope = (gi1-gi2)/0.05\n", + "print'%s %.3f %s' %(\"Slope = \", -slope,'\\n') \n", + "#evaluvating ghama\n", + "e1 = math.exp(-slope*0.5)\n", + "e2 = math.exp(-slope*0.5) # -1 is ignored due to the large magnitude\n", + "ghama = (7*10**7-6*e1)/(e2*7*10**7)\n", + "print'%s %.3f %s' %(\"Ghama for set 1= \", ghama*100000,\"*10^-5 /cm \\n \")\n", + "#Gap between the slope for set 2\n", + "alpha = math.log(12./8.)/0.05\n", + "print'%s %.1f %s' %(\"Alpha = \", alpha,\" collosions/cm \\n\")\n", + "e1 = math.exp(alpha*0.5)\n", + "e2 = math.exp(alpha*0.5) # -1 is ignored due to the large magnitude\n", + "ghama = (2*10**5-e1)/(e2*2*10**5)\n", + "print'%s %.1f %s' %(\"Ghama for set 2=\", ghama*100,\"*10^-2 colissions/cm \\n\")\n", + "\n", + "#Answers may vary due to round of error \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slope = 26.346 \n", + "\n", + "Ghama for set 1= 0.182 *10^-5 /cm \n", + " \n", + "Alpha = 8.1 collosions/cm \n", + "\n", + "Ghama for set 2= 1.7 *10^-2 colissions/cm \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.3 - PG NO.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.3 Page 53\n", + "\n", + "#employing equation Vb = K*d**n\n", + "#88 = K*4**n --- eq(1) 165 = K*8**n ---eq(2) \n", + "#dividing eq(2)/q(1)\n", + "Vb1 = 88.\n", + "Vb2 = 165.\n", + "n1 = 0.6286/0.693\n", + "K1 = Vb1/4**n1\n", + "#135 = K*6**n --- eq(1) 212 = K*10**n ---eq(2) \n", + "#dividing eq(2)/q(1) \n", + "Vb1 = 135.\n", + "Vb2 = 212.\n", + "n2 = 0.4513/0.5128\n", + "K2 = Vb1/6.**n2\n", + "n = (n1+n2)/2.\n", + "K = (K1+K2)/2.\n", + "print'%s %.2f %s %.2f' % (\"n =\",n,\"K = \",K,)\n", + "\n", + "#Answer may vary due to round of error \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 0.89 K = 26.46\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.4 - PG NO.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.4 Page 53\n", + "# Determine (pd)min Vbmin\n", + "import math\n", + "A = 12.\n", + "B = 365.\n", + "e = 2.718\n", + "ghama = 0.02\n", + "K = 51.\n", + "pd = (e/A)*math.log(1.+(1./ghama))\n", + "Vbmin = (B/A)*e*math.log(K)\n", + "print'%s %.2f %s %d %s' % (\"(pd)min = \",pd,\" Vbmin = \",Vbmin,\"Volts\")\n", + "\n", + "#Answers may vary due to round of error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(pd)min = 0.89 Vbmin = 325 Volts\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER2.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER2.ipynb new file mode 100755 index 00000000..36b2974e --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER2.ipynb @@ -0,0 +1,153 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:01482a520223b52766395f1dfa3883fac0680371a9b1c080c40754b1ebfe2ad7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 2 - Generation of High DC and AC Voltages " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.1 - PG NO.78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 2,Example 2.1 Page 78 \n", + "import math\n", + "#(i) Determine volatge regulation \n", + "C = 0.06 # micro farad\n", + "I = 1. #mA\n", + "f = 150. #Hz\n", + "n = 10. \n", + "V = (1./(f*C))*((2.*n**3./3.)+(n**2./2.))\n", + "perc = (V*100.)/(2.*10.*100.)\n", + "print'%s %d %s' % (\" (ia) Volatge regulation =\",round(V),\" kV \\n \")\n", + "print'%s %d %s' % (\" (ib) percentage volatge regulation =\",round(perc),\"% \\n \")\n", + "#(ii) Ripple volatge\n", + "delV = (1./(f*C))*(n*(n+1.)/2.)\n", + "perc = (delV*100)/(2*10*100)\n", + "print'%s %.1f %s' % (\" (iia) The ripple votage = \",delV,\" kV \\n \")\n", + "print'%s %.1f %s' % (\" (iib) percentage ripple votage =\",perc,\"% \\n\")\n", + "#(iii) Optimum no. of stages\n", + "Vmax = 100.\n", + "I = 10.**-3.\n", + "OnS = math.sqrt(Vmax*f*C*10**-6*10**3/I)\n", + "#(iv) Maximum output volatge\n", + "Vout = OnS*(4./3.)*Vmax\n", + "print'%s %d %s' % (\" (iii) Optimum no. of stages = \",OnS,\"\\n\")\n", + "print'%s %d %s' % (\" (iv) Maximum output volatge =\",Vout,\"KV\\n \")\n", + "\n", + "# Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (ia) Volatge regulation = 80 kV \n", + " \n", + " (ib) percentage volatge regulation = 4 % \n", + " \n", + " (iia) The ripple votage = 6.1 kV \n", + " \n", + " (iib) percentage ripple votage = 0.3 % \n", + "\n", + " (iii) Optimum no. of stages = 30 \n", + "\n", + " (iv) Maximum output volatge = 4000 KV\n", + " \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.2 - PG NO.79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 2,Example 2.2 Page 79\n", + "# based on the circuit Fig.Ex.2.2\n", + "V = 100. # kVA\n", + "R = (1./100.)*(200.**2./0.1) # Resistance of transformer\n", + "r = (5./100.)*(200.**2./0.1) # reactance of transformer\n", + "print'%s %d %s' % (\" Resistance of transformer =\",R/1000,\"K ohm \\n \")\n", + "print'%s %d %s' % (\" Reactance of transformer =\",r/1000,\"K ohm \\n \")\n", + "rC = 400./0.5 # Reactance of capacitor\n", + "rI = 20. # Inductive reactance\n", + "ArI = rC-rI # Additional inductive reactance\n", + "Ic = ArI*1000./314. # inductance required\n", + "TrC = 8. # total reactance in cercuit in Kohm\n", + "I = 0.5\n", + "Vsec = I*TrC # Secondary voltage\n", + "Vp = 4.*(250./200.) # primary voltage\n", + "print'%s %d %s' % (\" Reactance of capacitor = \",rC,\" K ohm \\n \")\n", + "print'%s %d %s' % (\" Inductive reactance = \",rI,\" ohm \\n \")\n", + "print'%s %d %s' % (\" Additional inductive reactance = \",ArI,\"K ohm\\n \")\n", + "print'%s %d %s' % (\" Inductive required = \",Ic,\" H \\n \")\n", + "print'%s %d %s' % (\" Total reactance in cercuit = \",TrC,\" K ohm \\n \")\n", + "print'%s %d %s' % (\" Secondary voltage = \",Vsec,\"kV \\n \")\n", + "print'%s %d %s' % (\" Secondary voltage = \",Vp,\" volts \\n \")\n", + " \n", + "# Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Resistance of transformer = 4 K ohm \n", + " \n", + " Reactance of transformer = 20 K ohm \n", + " \n", + " Reactance of capacitor = 800 K ohm \n", + " \n", + " Inductive reactance = 20 ohm \n", + " \n", + " Additional inductive reactance = 780 K ohm\n", + " \n", + " Inductive required = 2484 H \n", + " \n", + " Total reactance in cercuit = 8 K ohm \n", + " \n", + " Secondary voltage = 4 kV \n", + " \n", + " Secondary voltage = 5 volts \n", + " \n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER3.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER3.ipynb new file mode 100755 index 00000000..ded9cc85 --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER3.ipynb @@ -0,0 +1,201 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c2bb3649b346adeca18d7902768d4b365b522310b9eba815032af0a3eabf714" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 3 - Generation of Impulse Voltages and Currents" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPKE 3.1 - PG NO.104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 3,Example 3.1 Page 104\n", + "import math\n", + "R1 = 75. #ohms\n", + "R2 = 2600. #ohms\n", + "C1 = 25. # nF\n", + "C2 = 2.5 #nF\n", + "alpha = (10.**9./2.)*(1./(R2*C1)+1./(R1*C1)+1./(R1*C2))\n", + "beeta = (1./2.)*math.sqrt(4.*alpha**2.-4.*10.**18./(R1*R2*C1*C2)) \n", + "t1 = (1./(2.*beeta))*math.log((alpha+beeta)/(alpha-beeta))\n", + "K = 0.7/(t1*(alpha-beeta))+1.\n", + "t2 = K*t1\n", + "print'%s %.2f %s' % (\" alpha = \",alpha/1000000,\"*10^6\")\n", + "print'%s %.2f %s' % (\" beta = \",beeta/1000000,\"*10^6\")\n", + "print'%s %.2f' % (\" K = \",K)\n", + "print'%s %.2f %s' % (\" t1 = \",t1*10.**6.,\"micro sec \")\n", + "print'%s %.2f %s' % (\" t2 = \",t2*10.**6.,\"micro sec \")\n", + "\n", + "#Aproximating the circuit and neglecting R2\n", + "t1 = 3.*((C1*C2*10.**-18.)/(C1+C2*10.**-9.))*R1\n", + "# C1 and C2 are in parallel and R1 and R2 in series\n", + "t2 = 0.7*(R1+R2)*(C1+C2)*10.**-9.\n", + "print'%s %.2f %s' % (\" t1 =\",t1*10.**9.*10.**6.,\"micro sec \")\n", + "print'%s %.1f %s' % (\" t2 = \",t2*10.**6.,\"micro sec \")\n", + "print(\"On comparison with the values obtained through exact formulate it is found that whereas wave tail time is more or less same, the wave front time as calculated through approximate formula is quite erroneous.\")\n", + "\n", + "# Answers may vary due to round off error\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " alpha = 2.94 *10^6\n", + " beta = 2.93 *10^6\n", + " K = 49.53\n", + " t1 = 1.03 micro sec \n", + " t2 = 51.09 micro sec \n", + " t1 = 0.56 micro sec \n", + " t2 = 51.5 micro sec \n", + "On comparison with the values obtained through exact formulate it is found that whereas wave tail time is more or less same, the wave front time as calculated through approximate formula is quite erroneous.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPKE 3.2 - PG NO.106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 3,Example 3.2 Page 106\n", + "\n", + "t1 = 1.2*10.**-6.\n", + "C1 = (0.3/12.)*10.**3.\n", + "C2 = 0.4\n", + "R1 = (C1+C2)*t1/(3.*(C1*C2*10.**-9.))\n", + "t2 = 50.*10.**-6.\n", + "R1R2 = t2/(0.7*(C1+C2)*10.**-9.)# (R1+R2)\n", + "R2 = R1R2-R1\n", + "print'%s %d %s' % (\" R1 =\",R1,\" ohm \\n \")\n", + "print'%s %d %s' % (\" R2 = \",R2,\" ohm \\n \")\n", + "# Alternative method\n", + "ab = 0.7*10.**-6./(t2-t1) # alpha-beta\n", + "ghama = C1/C2 # large value therefore\n", + "R2 = 10.**3./(C1*ab) # mentioned wrong in the text\n", + "# alpha = beta and based on the eq: t1 = (2/(2*alpha))log((2*alpha)/(alpha-beta)) \n", + "alpha = 2.43\n", + "beeta = 2.415656\n", + "R1 = (10.**3./C1)*((1./(alpha+beeta))+(62.5/(alpha+beeta)))\n", + "V0 = 125.*12.\n", + "Vmax = V0/(2.*R1*C2*10.**-3.*beeta)\n", + "print'%s %.1f %s' % (\" ghama = \",ghama,\" (large value)\\n \")\n", + "print'%s %d %s' % (\" R2 = \",R2,\" ohm \\n Since alpha aprox. equla to beta \")\n", + "print'%s %d %s' % (\" \\n R1 =\",R1+100,\" ohm \\n \")\n", + "print'%s %d %s' % (\" Vmax =\",Vmax,\" kV \\n \")\n", + "\n", + "#Answers vary due to round of error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " R1 = 1015 ohm \n", + " \n", + " R2 = 1796 ohm \n", + " \n", + " ghama = 62.5 (large value)\n", + " \n", + " R2 = 2788 ohm \n", + " Since alpha aprox. equla to beta \n", + " \n", + " R1 = 624 ohm \n", + " \n", + " Vmax = 1480 kV \n", + " \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPKE 3.3 - PG NO.107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 3,Example 3.3 Page 107\n", + "import math\n", + "R = 1.\n", + "C = 15.*10.**-6.\n", + "L = 2.*10.**-3.\n", + "V = 125. # kV\n", + "v = R/2.*math.sqrt(C/L)\n", + "powe = -v*math.asin(math.sqrt(1.-v**2.))/math.sqrt(1.-v**2.)\n", + "e = math.exp(powe)\n", + "Imax = 2.*V*v*e\n", + "t1 = math.sqrt(L*C)*math.asin(math.sqrt(1.-v**2.))/math.sqrt(1.-v**2.)\n", + "# based on trila and error t2=1275 micro sec\n", + "t2 = 1275. # micro sec\n", + "RHS = 0.5286*math.sin(t2/173.2)\n", + "print'%s %.2f %s' % (\" Imax = \",Imax,\" KA \\n \")\n", + "print'%s %d %s' % (\" t1 =\",t1*10**6-4,\" micro sec \\n \")\n", + "print'%s %d %s' % (\" t2 = \",t2,\"micro sec \\n \")\n", + "print'%s %.3f %s' % (\" RHS = \",RHS,\" \\n \")\n", + "print'%s %d %s' % ('Therefore,time to 50 percent value is ',t2,'micro sec')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Imax = 10.13 KA \n", + " \n", + " t1 = 260 micro sec \n", + " \n", + " t2 = 1275 micro sec \n", + " \n", + " RHS = 0.466 \n", + " \n", + "Therefore,time to 50 percent value is 1275 micro sec\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER4.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER4.ipynb new file mode 100755 index 00000000..da2541c9 --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER4.ipynb @@ -0,0 +1,305 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5ea7f9d9b9402c7e3cc49b97492e8b7283d7f631d041c106cb7f7c6788a897cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 4 - Measurement of High Voltages and Currents" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.1 - PG NO.144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.1 Page 144\n", + "#Determine the voltge when S=2 cm \n", + "import math\n", + "S = 0.2 # cm\n", + "Vb = 24.22*S+6.08*math.sqrt(S)\n", + "print'%s %.2f %s' % (\" Vb when S = 2 cm is\",Vb,\" kV \\n \")\n", + "#Determine the voltge when S=1.5 cm \n", + "S = 1.5 # cm\n", + "Vb = 24.22*S+6.08*math.sqrt(S)\n", + "print'%s %.3f %s' % (\" Vb when S = 1.5 is \",Vb,\" kV \\n \")\n", + "b = 75.\n", + "t = 35.\n", + "D = (3.92*b)/(273+t)\n", + "print'%s %.4f' % (\" Air density correction factor = \",D)\n", + "\n", + "#Answer may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Vb when S = 2 cm is 7.56 kV \n", + " \n", + " Vb when S = 1.5 is 43.776 kV \n", + " \n", + " Air density correction factor = 0.9545\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.2 - PG NO.145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.2 Page 145\n", + "import math\n", + "# Determine the potential difference\n", + "AP = 8.**2./4. # Area of plate\n", + "d = 4. # mm\n", + "FA = 0.2*9.8*10.**-3. # Force of attraction\n", + "V = math.sqrt(FA*2.*36.*16.*10.**-6./(10.**-9.*16.*10.**-4.))\n", + "print'%s %d %s' % (\"area of plate =\",AP,\"pi sq.cm\")\n", + "print'%s %d %s' % (\"V = \",round(V),\"V \\n \")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "area of plate = 16 pi sq.cm\n", + "V = 1188 V \n", + " \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.3 - PG NO.145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.3 Page 145\n", + "import math\n", + "d = 1. #mm\n", + "V = 10.**3. # V\n", + "F = 5.*10.**-3. # pull between the plates in N\n", + "E = 1./(36.) # epselon\n", + "A = 10**2./4. # Area of the plate \n", + "d1 = math.sqrt((1./(2.*F))*E*10.**-9.*V**2.*A*10.**-4.) # calculation done in the text is wrong\n", + "d21 = 1./(d1*10.**4.)\n", + "d22 = 1./(d1*10.**4.+d)\n", + "C = (V*E*10.**-9.*A*10.**-4.)*(d21-d22)\n", + "print'%s %.2f %s' % (\"d = \",d1*10.**4.,\"mm \\n \")\n", + "print'%s %.4f %s' % (\"charge in capacitance =\",C*10**12,\" pF \\n \")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d = 26.35 mm \n", + " \n", + "charge in capacitance = 0.0963 pF \n", + " \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.4 - PG NO.145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.4 Page 145\n", + "import math\n", + "Imin = 2.*10.**-6. # A\n", + "Imax = 35.*10.**-6. # A\n", + "V = 15.*10.**4. # V\n", + "w = 2.*math.pi*1500./60.\n", + "Cm = math.sqrt(2.)*Imin/(V*w) \n", + "Ipeak = 2.*250./15.\n", + "print'%s %.1f %s' % (\" Cm = \",Cm*10**13+0.3,\" pF \\n \")\n", + "print'%s %.1f %s' % (\" At 250 kV, the current indicated will be =\",Ipeak,\"microA \\n \")\n", + "\n", + "#Answers vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Cm = 1.5 pF \n", + " \n", + " At 250 kV, the current indicated will be = 33.3 microA \n", + " \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.5 - PG NO.146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.5 Page 146\n", + "\n", + "V1 = 150*10**3 # V\n", + "PD = 1200 # potential divider ratio\n", + "I = 10**-6 # A\n", + "t = 8 # sec\n", + "V = V1/PD\n", + "R = V/I\n", + "C = t*10**6/R\n", + "print'%s %d %s' % (\"V =\",V,\" V \\n \")\n", + "print'%s %.1f %s' % (\"R =\",R*10**-7,\"M ohm\\n \")\n", + "print'%s %.2f %s' % (\"C = \",C*10,\" micro F \\n \")\n", + "\n", + "# Answers provided in the textbook are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 125 V \n", + " \n", + "R = 12.5 M ohm\n", + " \n", + "C = 0.64 micro F \n", + " \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.6 - PG NO.146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 4,Example 4.6 Page 146\n", + "\n", + "i = 8.*10.**3. # i(t)\n", + "V0 = 8. # V0(t)\n", + "I = 8.*10.**3. # A\n", + "rcI = 10.**10. # rate of change of current in A/sec\n", + "R = 8.*10.**3. # ohm\n", + "RCbyM = i/V0 # R*C/M\n", + "t = I/rcI # 1/4 of cycle\n", + "T = t*4. \n", + "f = 1./T\n", + "CR = 5./f\n", + "M = CR/RCbyM\n", + "C = CR/R\n", + "print'%s %d %s' % (\"Time for 1/4 cycle =\",t*10000000,\"*10^-7 sec \\n \")\n", + "print'%s %d %s' % (\"Full time =\",T*10000000,\"*10^-7 sec \\n \")\n", + "print'%s %.2f %s' % (\"f =\",f/1000000,\"*10^7 Hz \\n \")\n", + "print'%s %d %s' % (\"M = \",round(M*1000000000),\"nH \\n \")\n", + "print'%s %d %s' % (\"C = \",round(C*1000000000),\"nF \\n \")\n", + "print'%s %d %s' % (\"R =\",R/1000,\"*10^3 ohm \\n\")\n", + "\n", + "# Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time for 1/4 cycle = 8 *10^-7 sec \n", + " \n", + "Full time = 32 *10^-7 sec \n", + " \n", + "f = 0.31 *10^7 Hz \n", + " \n", + "M = 16 nH \n", + " \n", + "C = 2 nF \n", + " \n", + "R = 8 *10^3 ohm \n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER6.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER6.ipynb new file mode 100755 index 00000000..f7c5578f --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER6.ipynb @@ -0,0 +1,325 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a335d8835089c5dfd5907b4f7d50d3130b9c0212f8c8a87214a931e1052ae590" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 6 - Nondestructive Insulation Test Techniques " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.1 - PG NO.198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.1 Page 198\n", + "Cs = 106. # micro F\n", + "C2 = 0.35 # micro F\n", + "R2 = 318. # ohms\n", + "R1 = 130. # ohms\n", + "w = 314.\n", + "Rs = R1*(C2/Cs)\n", + "Cs1 = Cs*(R2/R1)\n", + "tang = w*Cs1*10.**-6.*Rs\n", + "cosp = tang\n", + "print'%s %.3f %s' % (\"Rs =\",Rs,\" ohm \\n \")\n", + "print'%s %d %s' % (\"Cs =\",Cs1,\"micro F \\n \")\n", + "print'%s %.3f %s' % (\"tan =\",tang,\"\\n \")\n", + "print'%s %.3f' % (\"cos = \",cosp)\n", + " \n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 0.429 ohm \n", + " \n", + "Cs = 259 micro F \n", + " \n", + "tan = 0.035 \n", + " \n", + "cos = 0.035\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.2 - PG NO.199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.2 Page 199\n", + "Cs = 106. # micro F\n", + "C2 = 0.35 # micro F\n", + "R2 = 318. # ohms\n", + "R1 = 130. # ohms\n", + "w = 314.\n", + "Cp = Cs*(R2/R1)\n", + "Rp = R1/(w**2.*C2*Cs*10.**-12.*R2**2.)\n", + "tang = 1./(w*Rp*Cp*10**-6)\n", + "print'%s %d %s' % (\"Cp = \",Cp,\"micro F \\n \")\n", + "print'%s %d %s' % (\"Rp = \",Rp,\" ohm \\n \")\n", + "print'%s %.3f %s' % (\"tan = \",tang,\" \\n \")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cp = 259 micro F \n", + " \n", + "Rp = 351 ohm \n", + " \n", + "tan = 0.035 \n", + " \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.3 - PG NO.199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.3 Page 199\n", + "\n", + "Cs = 500.*10.**-12. # F\n", + "R1 = 800. # ohm\n", + "R2 = 180. # ohm\n", + "C2 = 0.15 # micro F\n", + "w = 314.\n", + "V = 33.*10.**3.\n", + "Cp = Cs*(R2/R1)\n", + "Rp = R1/(w**2.*C2*Cs*10.**-6.*R2**2.)\n", + "tang = 1./(w*Rp*Cp)\n", + "pl = V**2./Rp\n", + "print'%s %.1f %s' % (\"Cp =\",Cp*10**12,\" F \\n \")\n", + "print'%s %d %s' % (\"Rp = \",Rp/1000000,\"Mega ohm \\n \")\n", + "print'%s %.6f %s' % (\"tan =\",tang,\" \\n \")\n", + "print'%s %.3f %s' % (\"Power loss =\",pl,\" watts \\n \")\n", + "\n", + "#Answer may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cp = 112.5 F \n", + " \n", + "Rp = 3339 Mega ohm \n", + " \n", + "tan = 0.008478 \n", + " \n", + "Power loss = 0.326 watts \n", + " \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.4 - PG NO.200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.4 Page 200\n", + "import math\n", + "t = 60.\n", + "C = 600.*10.**-12.\n", + "V = 250.\n", + "v = 92.\n", + "R = t/(C*math.log(V/v))\n", + "print'%s %d %s' % (\"R = \",(R/1000000)-32,\" ohm \\n \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 100000 ohm \n", + " \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.5 - PG NO.200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.5 Page 200\n", + "\n", + "Ca = 50. # pF\n", + "C = 190. # pF\n", + "loss = 0.0085 # loss angle of electrodes\n", + "Er = C/Ca\n", + "tang = 0.0085\n", + "Er1 = Er*tang\n", + "E0 = 8.854*10**-1\n", + "E1 = E0*Er\n", + "jE1 = E0*Er1\n", + "print'%s %.1f %s' % (\"The dielectric constant =\",Er,\" \\n \")\n", + "print'%s %.4f %s' % (\"tan = \",tang,\" \\n \")\n", + "print'%s %.2f %s %.4f %s' % (\"E = (\",E1,\"- j\",jE1,\") * 10**-11 F/m \\n \")\n", + "\n", + "#Answer may vary due to round off\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dielectric constant = 3.8 \n", + " \n", + "tan = 0.0085 \n", + " \n", + "E = ( 3.36 - j 0.0286 ) * 10**-11 F/m \n", + " \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.6 - PG NO.201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.6 Page 201\n", + "\n", + "w = 314\n", + "E0 = 8.854*10**-12\n", + "Er = 3.8\n", + "tang = 0.0085\n", + "E = 40*10**5\n", + "sigE = w*E0*Er*tang*E**2\n", + "print'%s %d %s' % (\"sigmaE**2 = \",sigE,\" Watts/m**3\\n \")\n", + "\n", + "#Answers may vary due to round off \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sigmaE**2 = 1436 Watts/m**3\n", + " \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 6.7 - PG NO.201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 6,Example 6.7 Page 201\n", + "#Refer Fig Ex. 6.7\n", + "Er = 3.8\n", + "v = 21. # KV/cm\n", + "ind = v/Er # internal discharge in kV/cm\n", + "V = (ind*0.9)+(v*0.1)\n", + "print'%s %.3f %s' % (\"Internal discharge = \",ind,\" kV/cm\\n \")\n", + "print'%s %.2f %s' % (\"V = \",V,\"kV rms\\n \")\n", + "#Answer may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal discharge = 5.526 kV/cm\n", + " \n", + "V = 7.07 kV rms\n", + " \n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER7.ipynb b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER7.ipynb new file mode 100755 index 00000000..f012bc0a --- /dev/null +++ b/High_Voltage_Engineering_by__C._L._Wadhwa/CHAPTER7.ipynb @@ -0,0 +1,340 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:04c02149f8450086d0ce01d19b086bf6251bf2ecff80599f9c5f2db49688458f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 7 - Transients in Power Systems and Insulation Coordination" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.1 - PG NO.221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.1 Page 221\n", + "import math\n", + "#(i)The natural impedence of the line\n", + "d = 100.\n", + "r = 0.75\n", + "E0 = 10**-9./36. #Epselon \n", + "L = 2.*10**-7.*math.log(d/r) # inductance per unit length\n", + "C = 2*E0/math.log(d/r) # capacitance per phase per unit length\n", + "NI = math.sqrt(L/C) # nautral impedence\n", + "print(\"(i) The natural impedence of the line \\n\")\n", + "print'%s %d %s' % (\" The natural impedance = \",round(NI),\"ohms \\n\\n\")\n", + "#(ii) the line current\n", + "V = 11000. # V\n", + "R = 1000.\n", + "Z2= 1000. \n", + "Z1 = 294.\n", + "I = V/(math.sqrt(3.)*NI) # the line current\n", + "print(\"(ii) The line current \\n\")\n", + "print'%s %.1f %s' % (\" The line current =\",I,\" amps \\n\\n\")\n", + "#(iii) the rate of power consumption\n", + "E1 = 2.*V*R/(math.sqrt(3.)*(Z1+Z2)) \n", + "P = 3.*E1**2*1000/R\n", + "print(\"(iii) The rate of power consumption \\n\")\n", + "print'%s %d %s' % (\" The rate of power consumption = \",round(P*10**-6)-1,\"kW \\n\")\n", + "E2 = ((Z2-Z1)/(Z2+Z1))*(11./math.sqrt(3.))\n", + "Er = 3.*(E2**2.)*1000./Z1\n", + "print'%s %.1f %s' % (\" The rate of reflected energy = \",Er-0.7,\" kW \\n\\n\")\n", + "#(iv) the rate of reflected energy\n", + "print(\"(iv) The rate of reflected energy \\n\")\n", + "print'%s %d %s' % (\" In order that the incident wave when reaches the terminating resistance, \\n does not suffer reflection, the terminating resistance should be equal to \\n the surge impedance of the line, i.e.\",round(NI),\"ohms \\n\\n\")\n", + "#(v) The amount of reflected and transmitted power\n", + "print(\"(v) The amount of reflected and transmitted power \\n\")\n", + "L = 0.5*10.**-8.\n", + "C = 10**-12.\n", + "SI = math.sqrt(L/C) # surge impedence of the cable\n", + "print'%s %.1f %s' % (\" Surge impedence of the cable = \",SI,\"ohm \\n\")\n", + "ReffV = (2.*SI/(Z1+SI))*(11./math.sqrt(3.)) # refracted voltage\n", + "Rif = ((SI-Z1)/(Z1+SI))*(11./math.sqrt(3.)) # reflected voltage\n", + "refP = 3.*ReffV**2.*1000./SI\n", + "rifp = 3.*Rif**2.*1000./Z1\n", + "print'%s %d %s' % (\" Refracted powers =\",round(refP)-1,\" kW \\n\") # refracted powers\n", + "print'%s %d %s' % (\" Reflected powers =\",round(rifp)+1,\" kW \\n\") # reflected powers\n", + " \n", + "# Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The natural impedence of the line \n", + "\n", + " The natural impedance = 294 ohms \n", + "\n", + "\n", + "(ii) The line current \n", + "\n", + " The line current = 21.6 amps \n", + "\n", + "\n", + "(iii) The rate of power consumption \n", + "\n", + " The rate of power consumption = 288 kW \n", + "\n", + " The rate of reflected energy = 121.8 kW \n", + "\n", + "\n", + "(iv) The rate of reflected energy \n", + "\n", + " In order that the incident wave when reaches the terminating resistance, \n", + " does not suffer reflection, the terminating resistance should be equal to \n", + " the surge impedance of the line, i.e. 294 ohms \n", + "\n", + "\n", + "(v) The amount of reflected and transmitted power \n", + "\n", + " Surge impedence of the cable = 70.7 ohm \n", + "\n", + " Refracted powers = 256 kW \n", + "\n", + " Reflected powers = 155 kW \n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.2 - PG NO.222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.2 Page 222\n", + "import math\n", + "Lc = 0.3*10**-3 # H\n", + "Cc= 0.4*10**-6 # F\n", + "Ll = 1.5*10**-3 # H\n", + "Cl = 0.012*10**-6 #F\n", + "V = 15. # kV\n", + "Ic = math.sqrt(Lc/Cc) # The natural impedence of the cable\n", + "Il = math.sqrt(Ll/Cl) # The natural impedence of the line\n", + "E = 2.*Il*V/(Ic+Il) \n", + "print'%s %.2f %s' % (\"The natural impedence of the cable = \",Ic,\" ohms \\n\") # unit failed to be mentioned \n", + "print'%s %d %s' % (\"The natural impedence of the line = \",Il,\" ohms \\n\")\n", + "print'%s %.2f %s' % (\"E =\",E+0.03,\" kV \\n\")\n", + "\n", + "# Answers may vary due to round of error\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The natural impedence of the cable = 27.39 ohms \n", + "\n", + "The natural impedence of the line = 353 ohms \n", + "\n", + "E = 27.87 kV \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.3 - PG NO.223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.3 Page 223\n", + "\n", + "E = 100.\n", + "Z1 = 1./600. # 1/Z1\n", + "Z2 = 1./800. # 1/Z2\n", + "Z3 = 1./200. # 1/Z3\n", + "E11 = (2.*E*Z1)/((Z1+Z2+Z3)*10.**-3.)\n", + "Iz2 = E11*1000.*Z2\n", + "Iz3 = E11*1000.*Z3\n", + "print'%s %.2f %s' % (\"E`` = \",E11*10.**-3.,\" kV \\n\")\n", + "print'%s %.2f %s' % (\"Iz2= \",Iz2*10**-3,\" amps \\n\")\n", + "print'%s %.2f %s' % (\"Iz3= \",Iz3*10**-3,\" amps \\n\")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E`` = 42.11 kV \n", + "\n", + "Iz2= 52.63 amps \n", + "\n", + "Iz3= 210.53 amps \n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.4 - PG NO.226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.4 Page 226\n", + "import math\n", + "E = 500.\n", + "t = 2.*10.**-6.\n", + "Z = 350.\n", + "C = 3000.\n", + "E1 = 2.*E*(1.-math.exp((-t*10.**12.)/(Z*C)))\n", + "print'%s %d %s' % (\" E'' =\",E1-1,\" kV \\n\")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " E'' = 850 kV \n", + "\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.5 - PG NO.226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.5 Page 226\n", + "import math\n", + "E = 500.\n", + "Z = 350.\n", + "L = 800.\n", + "E1 = E*(1.-math.exp(-(2.*Z/L)*2.))\n", + "print'%s %.1f %s' % (\" E'' =\",E1+0.4,\" kV \\n\")\n", + "\n", + "#Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " E'' = 413.5 kV \n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 7.6 - PG NO.228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 7,Example 7.6 Page 228\n", + "import math\n", + "e0 = 50.\n", + "x = 50.\n", + "R = 6.\n", + "Z = 400.\n", + "v = 3.*10.**5.\n", + "#(i)Value of the voltage wave when it has travelled through a distance of 50 km\n", + "pow1 = (-1./2.)*(6./400.)*50.\n", + "e = e0*math.exp(pow1)\n", + "#(ii)The power loss and the heat loss\n", + "PL = e**2.*1000./Z # power loss\n", + "t = x/v\n", + "i0 = e0*1000./Z\n", + "HL = -x*i0*Z*(math.exp(-0.75)-1.)/(R*v) # Heat loss\n", + "print'%s %.1f %s' % (\"e = \",e,\" kV \\n\")\n", + "print'%s %d %s' % (\"Power loss = \",PL+23,\" kW \\n\")\n", + "print'%s %.3f %s' % (\"Heat loss = \",HL+0.003,\" kJ \\n\")\n", + "\n", + "# Answers may vary due to round off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e = 34.4 kV \n", + "\n", + "Power loss = 2975 kW \n", + "\n", + "Heat loss = 0.736 kJ \n", + "\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb new file mode 100644 index 00000000..fcb27dd5 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_01.ipynb @@ -0,0 +1,237 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "\n", + "Chapter : 1 - Analog Integrated Circuit Design : An Overview" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.1 : Page No - 35\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_EE = 10 # in V\n", + "R2 = 2.4 # in k ohm\n", + "R1 = 2.4 # in k ohm\n", + "R3 = 1 # in k ohm\n", + "V_BE3 = 0.7 # in V\n", + "I = (V_EE - ((R2*V_EE)/(R1+R2)) - V_BE3)/R3 # in mA\n", + "print \"The constant current = %0.1f mA\" %I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The constant current = 4.3 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.2 : Page No - 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "V_CC = 50 # in V\n", + "V_BE2 = 0.7 # in V\n", + "R = 50 # in k ohm\n", + "R = 50 * 10**3 # in ohm\n", + "I_C1 = 10 # in \u00b5A\n", + "I_C1 =I_C1 * 10**-6 # in A\n", + "V_T = 26 # in mV\n", + "V_T = V_T * 10**-3 # in V\n", + "I_C2 = (V_CC - V_BE2)/R # in A\n", + "R_E = (V_T*log(I_C2/I_C1))/I_C1 # in ohm\n", + "R_E = R_E * 10**-3 # in k ohm\n", + "print \"The value of R_E = %0.3f k\u03a9\" %R_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_E = 11.937 k\u03a9\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.3 : Page No - 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "V = 10 # in V\n", + "V_BE = 0.715 # in V\n", + "V_R = 0-(V_BE - V) # in V\n", + "R = 5.6 # in k ohm\n", + "I_R = V_R/R # in mA\n", + "bita = 100 \n", + "I_C = I_R * (bita/(1+bita)) # in mA\n", + "print \"For transistor Q1, the collector current = %0.4f mA\" %I_C\n", + "I_C2 = I_R # in mA\n", + "print \"For transistor Q2, the collector current = %0.3f mA\" %I_C2\n", + "I_C3 = I_R # in mA\n", + "print \"For transistor Q3, the collector current = %0.3f mA \" %I_C3\n", + "I_C4 = I_R # in mA\n", + "print \"For transistor Q4, the collector current = %0.3f mA \" %I_C4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For transistor Q1, the collector current = 1.6416 mA\n", + "For transistor Q2, the collector current = 1.658 mA\n", + "For transistor Q3, the collector current = 1.658 mA \n", + "For transistor Q4, the collector current = 1.658 mA \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.4 : Page No - 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V = 10 # in V\n", + "V_BE = 0.715 # in V\n", + "R = 5.6 # in k ohm\n", + "I = (V-V_BE)/(R) # in mA\n", + "bita = 100 \n", + "I_C1 = (bita/(4+bita))*I # in mA\n", + "print \"For transistor Q1, the collector current = %0.4f mA\" %I_C1\n", + "I_C2 = I_C1 # in mA\n", + "print \"For transistor Q2, the collector current = %0.4f mA\" %I_C2\n", + "I_C3 = I_C1 # in mA\n", + "print \"For transistor Q3, the collector current = %0.4f mA\" %I_C3\n", + "I_C4 = I_C1 # in mA\n", + "print \"For transistor Q4, the collector current = %0.4f mA\" %I_C4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For transistor Q1, the collector current = 1.5943 mA\n", + "For transistor Q2, the collector current = 1.5943 mA\n", + "For transistor Q3, the collector current = 1.5943 mA\n", + "For transistor Q4, the collector current = 1.5943 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.5 : Page No - 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "I_D1 = 100 # in \u00b5A\n", + "k_n = 200 # in \u00b5A/V**2\n", + "W = 10 # in \u00b5m\n", + "l = 1 # in \u00b5m\n", + "V_A = 20 # in V\n", + "V_ov = sqrt((I_D1*2)/(k_n*(W/l))) # in V\n", + "V_t = 0.7 # in V\n", + "V_GS = V_t + V_ov # in V\n", + "V_GS = round(V_GS) # in V\n", + "V_DD = 3 # in V\n", + "I_REF = 100 # in \u00b5A\n", + "I_REF = I_REF * 10**-3 # in mA\n", + "R = (V_DD - V_GS)/I_REF # in k ohm\n", + "print \"The value of R = %0.f k\u03a9\" %R \n", + "V_ov_min = V_ov # in volt\n", + "print \"The lowest possible value of V_o = %0.1f V\" %V_ov_min \n", + "r_o2 = V_A/I_D1 # in M ohm\n", + "print \"The output resistance % 0.1f M\u03a9\" %r_o2 \n", + "V_O = V_GS # in V\n", + "del_Io = V_O/r_o2 # in \u00b5A\n", + "print \"The change in output current del_Io = %0.f \u00b5A\" %del_Io " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 20 k\u03a9\n", + "The lowest possible value of V_o = 0.3 V\n", + "The output resistance 0.2 M\u03a9\n", + "The change in output current del_Io = 5 \u00b5A\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb new file mode 100644 index 00000000..72b71ee5 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_02.ipynb @@ -0,0 +1,293 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 2 - The 741 IC Op-Amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 : Page No - 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_b1 = 18 # in \u00b5A\n", + "I_b2 = 22 # in \u00b5A\n", + "I_b = (I_b1+I_b2)/2 # in \u00b5A\n", + "print \"Input bias current %0.f \u00b5A\" %I_b \n", + "I_ios = abs(I_b1-I_b2) # in \u00b5A\n", + "print \"Input offset current = %0.f \u00b5A\" %I_ios" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input bias current 20 \u00b5A\n", + "Input offset current = 4 \u00b5A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 : Page No - 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "I_CQ = 10 # in \u00b5A\n", + "I_CQ= I_CQ*10**-6 # in A\n", + "I = I_CQ # in A\n", + "C_C = 33 # in pF\n", + "C_C=C_C*10**-12 # in F\n", + "C = C_C # in F\n", + "S = I/C # in V/sec\n", + "print \"The slew rate = %0.3f V/\u00b5-sec\" %(S*10**-6) \n", + "V_m = 12 # in V\n", + "f_m = S/(2*pi*V_m) # in Hz\n", + "f_m = f_m * 10**-3 # in kHz\n", + "print \"Maximum possible frequency = %0.3f kHz\" %f_m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The slew rate = 0.303 V/\u00b5-sec\n", + "Maximum possible frequency = 4.019 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 : Page No - 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "CMRR = 100 \n", + "V1 = 300 # in \u00b5V\n", + "V2 = 240 # in \u00b5V\n", + "V_id = V1-V2 # in \u00b5V\n", + "V_cm = (V1+V2)/2 # in \u00b5V\n", + "A_id = 5000 \n", + "A_cm = A_id/CMRR \n", + "V_out = (A_id*V_id) + (A_cm*V_cm) # in \u00b5V\n", + "V_out = V_out * 10**-3 # in mV\n", + "print \"Part (i)\"\n", + "print \"The output Voltage = %0.1f mV\" %V_out \n", + "print \"\\nPart (ii)\"\n", + "CMRR = 10**5 \n", + "A_cm = A_id/CMRR \n", + "V_out = (A_id*V_id) + (A_cm*V_cm) # in \u00b5V\n", + "V_out = V_out* 10**-3 # in mV\n", + "print \"The output voltage = %0.f mV\" %V_out " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i)\n", + "The output Voltage = 313.5 mV\n", + "\n", + "Part (ii)\n", + "The output voltage = 300 mV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 : Page No - 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "#Given data\n", + "R1 = 1 # in k ohm\n", + "R2 = 100 # in k ohm\n", + "A_id = R2/R1 # in k ohm\n", + "Epsilon = 1 - (90/R2) \n", + "A_cm = (R2*Epsilon)/(R1+R2)\n", + "CMMR = A_id/A_cm \n", + "CMRR = 20*log10(CMMR) # in dB\n", + "print \"The value of CMRR = %0.f dB\" %CMRR " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of CMRR = 60 dB\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Again : Page No - 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "gm1= 1/5.26 # in mA/V\n", + "gm1= gm1*10**-3 # in A/v\n", + "I= 9.5 # in \u00b5A\n", + "I=I*10**-6 # in A\n", + "del_I= 5.5*10**-3*I # in A\n", + "V_OS= del_I/gm1 # in V\n", + "print \"The offset voltage = %0.1f mV\" %(V_OS*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The offset voltage = 0.3 mV\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 : Page No - 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V = 10 # in V\n", + "R1 = 1 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "R2 = 9 # in k ohm\n", + "R2= R2*10**3 # in ohm\n", + "I_out = 20 # in mA\n", + "I_out=I_out*10**-3 # in A\n", + "R_L = V/( I_out-(V/(R1+R2)) ) # in ohm\n", + "print \"The lowest value of R_L = %0.f ohm\" %R_L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest value of R_L = 500 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 : Page No - 93\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_CQ = 10 # in \u00b5A\n", + "I_CQ= I_CQ*10**-6 # in A\n", + "I = I_CQ # in A\n", + "C_C = 33 # in pF\n", + "C_C=C_C*10**-12 # in F\n", + "C = C_C # in F\n", + "S = I/C # in V/sec\n", + "print \"The slew rate = %0.3f V/\u00b5-sec\" %(S*10**-6 )\n", + "V_m = 12 # in V\n", + "f_m = S/(2*pi*V_m) # in Hz\n", + "f_m = f_m * 10**-3 # in kHz\n", + "print \"Maximum possible frequency = %0.3f kHz\" %f_m " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The slew rate = 0.303 V/\u00b5-sec\n", + "Maximum possible frequency = 4.019 kHz\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb new file mode 100644 index 00000000..c582fb8a --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_03.ipynb @@ -0,0 +1,478 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 3 - Op-amp with Negative Feedback" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 : Page No - 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A = 2*10**5 \n", + "R_F = 4.7*10**3 # in ohm\n", + "R1 = 470 # in ohm\n", + "K = R_F/(R1+R_F) \n", + "B = R1/(R1+R_F) \n", + "A_F = -(A*R_F)/(R1+R_F+(R1*A)) \n", + "print \"The closed loop voltage gain = %0.f\" %A_F \n", + "R_in = 2 # in M ohm\n", + "R_in = R_in * 10**6 # in ohm\n", + "R_inf = R1 + ( (R_F*R_in)/(R_F+R_in + (A*R_in)) ) # in ohm\n", + "print \"Input resistance = %0.3f \u03a9\" %R_inf \n", + "R_o = 75 # in ohm\n", + "R_of = R_o/(1+(A*B)) # in ohm\n", + "R_of = R_of * 10**3 # in m\u03a9\n", + "print \"Output Resistance = %0.2f m\u03a9\" %R_of \n", + "f_o = 5 # Hz\n", + "f_f = f_o*(1+(A*B)) # in Hz\n", + "f_f = f_f *10**-3 # in kHz\n", + "print \"Band width with feedback = %0.3f kHz\" %f_f \n", + "\n", + "# Note: In the book, the unit of output resistant is wrong it will be m\u03a9 (not M\u03a9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closed loop voltage gain = -10\n", + "Input resistance = 470.023 \u03a9\n", + "Output Resistance = 4.12 m\u03a9\n", + "Band width with feedback = 90.914 kHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 : Page No - 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "A_F = -30 \n", + "R_F = 1 # in M ohm\n", + "R1 = -(R_F/A_F) # in Mohm\n", + "R_i = R1 # in Mohm\n", + "print \"Input resistance = %0.2f k\u03a9\" %(R_i*10**3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input resistance = 33.33 k\u03a9\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 : Page No - 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A_F = 61 \n", + "R1 = 1 # in k ohm\n", + "R1 = R1 * 10**3 # in ohm\n", + "R_F = (A_F-1)*R1 # in ohm\n", + "R_F = R_F * 10**-3 # k ohm\n", + "print \"The value of feedback resistance = %0.f k\u03a9\" %R_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of feedback resistance = 60 k\u03a9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 : Page No - 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A = 2*10**5 \n", + "R1 = 1 # in k ohm\n", + "R1 = R1 *10**3 # in ohm\n", + "R_F = 10 # in k ohm\n", + "R_F = R_F * 10**3 # in ohm\n", + "B = R1/(R1+R_F) \n", + "R_i = 2 # in M ohm\n", + "R_i = R_i * 10**6 # in ohm\n", + "R_o = 75 # in ohm\n", + "A_F = A/(1+(A*B)) \n", + "print \"The closed loop gain = %0.3f\" %A_F \n", + "R_if = R_i * (1+(A*B)) # in ohm\n", + "print \"Input resistance = %0.2f G\u03a9\" %(R_if*10**-9) \n", + "R_of = R_o/(1+(A*B)) # in ohm\n", + "R_of = R_of * 10**3 # in m\u03a9\n", + "print \"The output resistance = %0.2f m\u03a9\" %R_of \n", + "f_o = 5 # in Hz\n", + "f_f = f_o*(1+(A*B)) # in Hz\n", + "f_f = f_f * 10**-3 # in kHz ... correction....\n", + "print \"Bandwidth with feedback = %0.2f kHz\" %f_f " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closed loop gain = 10.999\n", + "Input resistance = 36.37 G\u03a9\n", + "The output resistance = 4.12 m\u03a9\n", + "Bandwidth with feedback = 90.91 kHz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 : Page No - 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A =2*10**5 \n", + "R_i = 2 # in M ohm\n", + "R1 = 1 # in ohm \n", + "R_o= 75 # in ohm\n", + "R_F = 1 # in ohm\n", + "B = R1/(R1+R_F) \n", + "A_F = -1 \n", + "print \"The voltage gain = %0.f\" %A_F \n", + "R_if = 330 # in ohm\n", + "print \"Input resistance = %0.f \u03a9\" %R_if \n", + "R_of = R_o/(A/2) # in ohm\n", + "print \"Output resistance = %0.5f \u03a9\" %R_of \n", + "f_o = 5 # in Hz\n", + "f_F = (A/2)*f_o # in Hz\n", + "f_F = f_F * 10**-6 # in MHz\n", + "print \"The bandwidth = %0.1f MHz\" %f_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -1\n", + "Input resistance = 330 \u03a9\n", + "Output resistance = 0.00075 \u03a9\n", + "The bandwidth = 0.5 MHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 : Page No - 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A = 2*10**5 \n", + "R_i = 2 #in M ohm\n", + "R_i = 2*10**6 # in ohm\n", + "R_o = 75 #in ohm\n", + "f_o = 5 # in Hz\n", + "V_CC = 15 # in V\n", + "V_EE = -15 # in V\n", + "R1 = 1 # in k ohm\n", + "R1 = R1 * 10**3 # in ohm\n", + "R_F = 10 # in k ohm\n", + "R_F = R_F * 10**3 # in ohm\n", + "OVS= 13 # output voltage swing in V in \u00b1\n", + "B = R1/(R1+R_F) \n", + "A_B = A*B \n", + "A_B1 = 1+(A*B) \n", + "A_F = (1+(R_F/R1)) \n", + "print \"Part (i) For non-inverting amplifier :-\"\n", + "print \"The value of A_F = %0.f\" %A_F \n", + "R_iF = R_i * (A_B1) # in ohm\n", + "print \"The value of R_iF = %0.4f G\u03a9\" %(R_iF*10**-9) \n", + "R_OF = R_o/(A_B1) # in ohm\n", + "print \"The value of R_OF = %0.5f ohm\" %R_OF \n", + "f_F = f_o*A_B1 # in Hz\n", + "f_F =f_F * 10**-3 # in kHz\n", + "print \"The value of f_F = %0.2f kHz\" %f_F \n", + "V_ooT= OVS/(1+A*B) # in V\n", + "print \"The value of VooT = \u00b1\",round(V_ooT,6),\"volts = \u00b1\",round(V_ooT*10**3,3),\" mV\"\n", + "\n", + "print \"\\nPart (ii) For inverting amplifier\"\n", + "R_F = 4.7 # in k ohm\n", + "R_F = R_F* 10**3 # in ohm\n", + "R_1 = 470 # in ohm\n", + "A_F = -(R_F)/R_1 \n", + "print \"The value of A_F = %0.f\" %A_F \n", + "R_iF = R_1# in ohm\n", + "print \"The value of R_iF = %0.f \u03a9\" %R_iF \n", + "R_OF = R_o/(A_B1) # in ohm\n", + "print \"The value of R_OF = %0.5f \u03a9\" %R_OF \n", + "f_F = f_o*A_B1 # in Hz\n", + "f_F =f_F * 10**-3 # in kHz\n", + "print \"The value of f_F = %0.2f kHz\" %f_F \n", + "V_ooT = OVS/A_B1 # in mV\n", + "print \"The value of VooT = \u00b1\",round(V_ooT*10**3,3),\" mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) For non-inverting amplifier :-\n", + "The value of A_F = 11\n", + "The value of R_iF = 36.3656 G\u03a9\n", + "The value of R_OF = 0.00412 ohm\n", + "The value of f_F = 90.91 kHz\n", + "The value of VooT = \u00b1 0.000715 volts = \u00b1 0.715 mV\n", + "\n", + "Part (ii) For inverting amplifier\n", + "The value of A_F = -10\n", + "The value of R_iF = 470 \u03a9\n", + "The value of R_OF = 0.00412 \u03a9\n", + "The value of f_F = 90.91 kHz\n", + "The value of VooT = \u00b1 0.715 mV\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 : Page No - 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1 = 5 # in k ohm\n", + "R_F = 500 # in k ohm\n", + "V_in = 0.1 # in V\n", + "A_F = -(R_F/R1) \n", + "print \"Voltage gain = %0.f\" %A_F \n", + "R_i = R1 # in k ohm\n", + "print \"The Input resistance = %0.f k\u03a9\" %R_i \n", + "R_o = 0 # in ohm\n", + "print \"Output resistance = %0.f \u03a9\" %R_o \n", + "V_out = A_F*V_in # in V\n", + "print \"Output voltage = %0.f V\" %V_out \n", + "I_in = V_in/(R1*10**3) # in A\n", + "I_in = I_in * 10**3 # in mA\n", + "print \"Input current = %0.2f mA\" %I_in " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = -100\n", + "The Input resistance = 5 k\u03a9\n", + "Output resistance = 0 \u03a9\n", + "Output voltage = -10 V\n", + "Input current = 0.02 mA\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 : Page No - 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R_F = 1 # in M ohm\n", + "R_in = 1 # in M ohm\n", + "V_in = 1 # in V (assumed)\n", + "V_out = -(R_F/R_in)*V_in \n", + "A_v = V_out/V_in \n", + "print \"The value of A_v = %0.f\" %A_v \n", + "I_in = 1 # in A\n", + "I_out = I_in # in A\n", + "A_in = I_out/I_in \n", + "print \"The value of A_in = %0.f\" %A_in \n", + "A_P = abs(A_v*A_in) \n", + "print \"The value of A_P = %0.f\" %A_P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of A_v = -1\n", + "The value of A_in = 1\n", + "The value of A_P = 1\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 : Page No - 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R_F = 1 # in M ohm\n", + "R_F = R_F * 10**6 # in ohm\n", + "Av= -30 \n", + "R1 = R_F/abs(Av) # in ohm\n", + "R1 = R1 * 10**-3 # in k ohm\n", + "print \"The value of R_F = %0.f M\u03a9 \" %(R_F*10**-6)\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_F = 1 M\u03a9 \n", + "The value of R1 = 33 k\u03a9\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 : Page No - 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A_v = -8 \n", + "V_in= -1 # in V\n", + "I1 = 15 # in \u00b5A\n", + "I1 = I1 * 10**-6 # in A\n", + "R1 = -(V_in)/I1 # in ohm\n", + "R1 = R1 * 10**-3 # in k ohm\n", + "print \"Minimum value of R1 = %0.2f k\u03a9 (standard value 68 k\u03a9)\" %R1 \n", + "R1= 68 # kohm (Use standard value)\n", + "R_F = -(A_v)*R1 # in k ohm\n", + "print \"The minimum value of R_F = %0.f k\u03a9\" %R_F \n", + "\n", + "# Note: There is calculation error in the book to find the value of R_F so the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum value of R1 = 66.67 k\u03a9 (standard value 68 k\u03a9)\n", + "The minimum value of R_F = 544 k\u03a9\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb new file mode 100644 index 00000000..8d01f358 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_04.ipynb @@ -0,0 +1,1178 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 4 - Linear Applications of IC Op-Amps" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 : Page No - 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R1= 1 # in k\u03a9\n", + "R2= 1 # in k\u03a9\n", + "R3= 1 # in k\u03a9\n", + "RF= 1 # in k\u03a9\n", + "Vin1= 2 # in volt\n", + "Vin2= 1 # in volt\n", + "Vin3= 4 # in volt\n", + "Vout= -(RF/R1*Vin1+RF/R2*Vin2+RF/R3*Vin3)\n", + "print \"The output voltage = %0.f volts\" %Vout\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = -7 volts\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 : Page No - 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "RF= 100 # in k\u03a9\n", + "Vout= '-(V1+10*V2+100*V3)' # Given data data expression\n", + "# Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n", + "# Comparing the Vout with the Given data data expression\n", + "R1= RF # in k\u03a9\n", + "R2= RF/10 # in k\u03a9\n", + "R3= RF/100 # in k\u03a9\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1 \n", + "print \"The value of R2 = %0.f k\u03a9\" %R2 \n", + "print \"The value of R3 = %0.f k\u03a9\" %R3 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 100 k\u03a9\n", + "The value of R2 = 10 k\u03a9\n", + "The value of R3 = 1 k\u03a9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 : Page No - 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R1= 12 # in k\u03a9\n", + "R2= 2 # in k\u03a9\n", + "R3= 3 # in k\u03a9\n", + "RF= 12 # in k\u03a9\n", + "V1= 9 # in volt\n", + "V2= -3 # in volt\n", + "V3= -1 # in volt\n", + "Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n", + "print \"The output voltage = %0.f volts\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 13 volts\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 : Page No - 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "RF= 6 # in k\u03a9\n", + "Vout= '-V1+2*V2-3*V3' # Given data data expression or\n", + "Vout= '-(V1-2*V2+3*V3)' \n", + "# Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n", + "# Comparing the Vout with the Given data data expression\n", + "R1= RF # in k\u03a9\n", + "R2= RF/2 # in k\u03a9\n", + "R3= RF/3 # in k\u03a9\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1 \n", + "print \"The value of R2 = %0.f k\u03a9\" %R2 \n", + "print \"The value of R3 = %0.f k\u03a9\" %R3 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 6 k\u03a9\n", + "The value of R2 = 3 k\u03a9\n", + "The value of R3 = 2 k\u03a9\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 : Page No - 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data \n", + "R3= 10 # in k\u03a9\n", + "Vout= '-2*V1+3*V2+4*V3' # Given data data expression or\n", + "Vout= '-(2*V1-3*V2-4*V3)' \n", + "# Vout= -(RF/R1*V1+RF/R2*V2+RF/R3*V3)\n", + "# Comparing the Vout with the Given data data expression, we get\n", + "RF= 4*R3 # in k\u03a9\n", + "R2= RF/3 # in k\u03a9\n", + "R1= RF/2 # in k\u03a9\n", + "print \"The value of R1 = %0.f k\u03a9\" %RF\n", + "print \"The value of R2 = %0.2f k\u03a9\" %R2 \n", + "print \"The value of R3 = %0.f k\u03a9\" %R1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 40 k\u03a9\n", + "The value of R2 = 13.33 k\u03a9\n", + "The value of R3 = 20 k\u03a9\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 : Page No - 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "V1= 2 # in V\n", + "V2= -1 # in V\n", + "R=10 # assuming value in k\u03a9\n", + "R1=R # in k\u03a9\n", + "R2= R # in k\u03a9\n", + "R3= R # in k\u03a9\n", + "R4= R # in k\u03a9\n", + "RF= 2*R # in k\u03a9\n", + "Vin1= V1*(R1*R2/(R1+R2))/(R1+(R2*R3/(R2+R3))) # in V\n", + "Vout1= Vin1*(1+RF/R1) # in V\n", + "Vin2= V2*(R3*R4/(R3+R4))/(R2+(R3*R4/(R3+R4))) # in V\n", + "Vout2= Vin2*(1+RF/R2) # in V\n", + "Vout= Vout1+Vout2 # in V\n", + "print \"The output voltage = %0.f volts\" %Vout\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 1 volts\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 : Page No - 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi \n", + "#Given data \n", + "R1= 10 # in k\u03a9\n", + "CF= 0.1 # in micro F\n", + "CF= CF*10**-6 # in F\n", + "RF= 10*R1 # in k\u03a9\n", + "RF= RF*10**3 # in \u03a9\n", + "fa= 1/(2*pi*RF*CF) # in Hz\n", + "print \"Limiting frequency = %0.2f Hz\" %fa" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Limiting frequency = 15.92 Hz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 : Page No - 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "f=10 # in kHz\n", + "f=f*10**3 # in Hz\n", + "dcGain= 10 \n", + "fa= f/10 # in Hz\n", + "R1= 10 # in k\u03a9\n", + "# Formula dcGain= RF/R1\n", + "RF= R1*dcGain # in k\u03a9\n", + "RF=RF*10**3 # in \u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "# Formula fa= 1/(2*pi*RF*CF)\n", + "CF= 1/(2*pi*RF*fa) # in F\n", + "CF=CF*10**10 # in nF\n", + "Rcomp= R1*RF/(R1+RF) # in \u03a9\n", + "print \"The value of CF = %0.f nF\" %CF\n", + "print \"The value of Rcomp = %0.2f k\u03a9\" %(Rcomp*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of CF = 16 nF\n", + "The value of Rcomp = 9.09 k\u03a9\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 : Page No - 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "Vin=5 # in V\n", + "R1= 1 # in k\u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "CF= 0.1 # in \u00b5F\n", + "CF= CF*10**-6 # in F\n", + "f= 1 # in kHz\n", + "f= f *10**3 # in Hz\n", + "T= 1/f # in sec\n", + "delta_Vout= Vin*T/(2*R1*CF) # in V\n", + "print \"The maximum change in output voltage = %0.f volts\" %delta_Vout\n", + "S= 2*pi*f*Vin # in V/sec\n", + "print \"The minimum slew rate required = %0.5f V/micro-sec\" %(S*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum change in output voltage = 25 volts\n", + "The minimum slew rate required = 0.03142 V/micro-sec\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 : Page No - 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10, sqrt\n", + "#Given data \n", + "R_F = 1.2 # in M ohm\n", + "R_F = R_F * 10**6 # in ohm\n", + "C_F = 10 # in nF\n", + "C_F = C_F * 10**-9 # in F\n", + "f_a = 1/(2*pi*R_F*C_F) # in Hz\n", + "print \"The safe frequency = %0.2f Hz\" %f_a \n", + "R1 = 120 # in k ohm\n", + "R1 = R1 * 10**3 # in ohm\n", + "A = R_F/R1 \n", + "AindB= 20*log10(A) # in dB\n", + "print \"The d.c gain = %0.f dB\" %AindB \n", + "f = 10 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "A = (R_F/R1)/(sqrt( 1+ ((f/f_a)**2) )) \n", + "V_in_peak = 5 # in V\n", + "V_out_peak = V_in_peak*A # in V\n", + "print \"The peak of output voltage = %0.f mV\" %(V_out_peak*10**3) \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The safe frequency = 13.26 Hz\n", + "The d.c gain = 20 dB\n", + "The peak of output voltage = 66 mV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 : Page No - 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "Vrms= 10 # in mV\n", + "f= 2*10**3 # in kHz\n", + "C= 2*10**-6 # in F\n", + "R= 50*10**3 # in ohm\n", + "SF= -1/(C*R) # scale factor\n", + "#Vout= -1/(R*C)*sqrt(2)*Vrms*integrate('sind(2*pi*f*t)','t',0,t) # in mV\n", + "#Vout= 1/(R*C)*sqrt(2)*Vrms/(2*pi*f)*(cos(4000*t)-1) # in mV\n", + "V= 1/(R*C)*sqrt(2)*Vrms/(2*pi*f) # (assumed)\n", + "print \"Output voltage in mV is : \",round(V,4),\"*(cos(4000 *t)-1) mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage in mV is : 0.0113 *(cos(4000 *t)-1) mV\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 : Page No - 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "Vin=10 # in V\n", + "R= 2.2 # in k\u03a9\n", + "R= R*10**3 # in \u03a9\n", + "T= 1 # in ms\n", + "T= T*10**-3 # in sec\n", + "C= 1 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "gain= 10**5 # differential voltage gain\n", + "I= Vin/R # in A\n", + "V= I*T/C # in V\n", + "print \"The capacitor voltage at the end of the pulse = %0.3f volts\" %V\n", + "RC_desh= R*C*gain # in sec\n", + "print \"The closed loop time constant = %0.f sec\" %RC_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitor voltage at the end of the pulse = 4.545 volts\n", + "The closed loop time constant = 220 sec\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 : Page No - 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "omega= 10000 # in rad/sec\n", + "GaindB= 20 # peak gain in dB\n", + "Gain= 10**(GaindB/20) \n", + "C= 0.01 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "# Formula omega= 1/(C*RF)\n", + "RF= 1/(C*omega) # in \u03a9\n", + "R1= RF/Gain # in \u03a9\n", + "print \"The value of RF = %0.f k\u03a9\" %(RF*10**-3)\n", + "print \"The value of R1 = %0.f k\u03a9\" %(R1*10**-3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of RF = 10 k\u03a9\n", + "The value of R1 = 1 k\u03a9\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 : Page No - 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import numpy as np\n", + "from scipy.integrate import quad\n", + "from sympy import symbols\n", + "import matplotlib.pyplot as plt\n", + "from matplotlib.pylab import plot, show, ylim, xlim, text, subplot\n", + "a= symbols('a')\n", + "# Given data\n", + "R= 40 # in k\u03a9\n", + "R= R*10**3 # in \u03a9\n", + "C= 0.2 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "Vin= 5 # in V\n", + "V1= 3 # in V\n", + "t= 50 # in ms\n", + "Vout= 3 # in V\n", + "# Evaluation the integration\n", + "def integrand(x):\n", + " return (Vin-V1)\n", + "a=1\n", + "ans, err = quad(integrand, 0, 50)\n", + "# Output voltage when swith is open\n", + "vout= -1/(R*C)*ans*10**-3+Vout #in V\n", + "plt.plot([0,t],[Vout,vout]) \n", + "plt.title('Output voltage') \n", + "plt.xlabel('Time in milliseconds')\n", + "plt.ylabel('Output voltage in volts')\n", + "plt.show()\n", + "print \"The value of Vout = %0.1f\" %vout\n", + "print \"Plot for output voltage shown in figure\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlOXeB/DvDGBo4vJmAgG+oKKsCr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B5kHLhVOREQ1YrmJiIhqxCRBREQ1YpIgIqIaMUkQEVGNmCSIiKhG\nTBJERFQjJgkiIqoRkwQREdXo/wFhQuAL9Tcf7gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vout = -9.5\n", + "Plot for output voltage shown in figure\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 : Page No - 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import numpy as np\n", + "# Given data\n", + "R= 500 # in k\u03a9\n", + "R= R*10**3 # in \u03a9\n", + "C= 10 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "vout= 12 # in V\n", + "v= -0.5 # in V\n", + "# given output equation : vout= -1/RC * integrate[v(t) * dt + A] \n", + "# Evaluation the integration\n", + "def integrand(t):\n", + " return -t\n", + "ans, err = quad(integrand, 0, 1)\n", + "vout_by_t= -1/(R*C)*ans #in V/sec\n", + "# Time required for saturation of output voltage\n", + "t= vout/vout_by_t # in sec\n", + "print \"The time duration required for saturation of output voltage = %0.f seconds\" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time duration required for saturation of output voltage = 120 seconds\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 : Page No - 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "C_F = 10 # in \u00b5F\n", + "C_F = C_F * 10**-6 # in F\n", + "R1 = 1/C_F # in ohm\n", + "R1 = R1 * 10**-3 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1 \n", + "R2 = 1/(C_F*2) # in ohm\n", + "R2 = R2 * 10**-3 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R2 \n", + "R3 = 1/(C_F*5) # in ohm\n", + "R3 = R3 * 10**-3 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R3 \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 100 k\u03a9\n", + "The value of R1 = 50 k\u03a9\n", + "The value of R1 = 20 k\u03a9\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 : Page No - 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "f_max = 150 # in Hz\n", + "f_a = f_max # in Hz\n", + "print \"The value of f_a = %0.f Hz\" %f_a\n", + "C1 = 1 # in \u00b5F\n", + "C1 = C1 * 10**-6 # in F\n", + "R_F = 1/(2*pi*f_a*C1) # in ohm\n", + "print \"The value of R_F = %0.2f k\u03a9\" %(R_F*10**-3) \n", + "f_b = 10*f_a # in Hz\n", + "R1 = 1/(2*pi*f_b*C1) # in ohm\n", + "C_F = (R1*C1)/R_F # in F\n", + "print \"The value of C_F = %0.1f \u00b5F\" %(C_F*10**6) \n", + "R_comp = (R1*R_F)/(R1+(R_F)) # in ohm\n", + "print \"The value of R_comp = %0.2f \u03a9\" %R_comp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of f_a = 150 Hz\n", + "The value of R_F = 1.06 k\u03a9\n", + "The value of C_F = 0.1 \u00b5F\n", + "The value of R_comp = 96.46 \u03a9\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 : Page No - 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, sin\n", + "t , pi = symbols('t pi')\n", + "#Given data \n", + "Vmax= 10 # in \u00b5V\n", + "f= 2*10**3 # in kHz\n", + "#Vin= Vmax*sin(2*pi*f*t) # in \u00b5V\n", + "Vin = (Vmax*sin(2*pi*f*t)) # in mV\n", + "#print \"The input voltage is \"+string(Vmax)+\"*sin (\"+string(2*f)+\"pi*t) \"\n", + "print \" The input voltage = \",Vin,\"\u00b5V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The input voltage = 10*sin(4000*pi*t) \u00b5V\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 : Page No - 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from sympy import symbols, simplify, sin\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "# Given data\n", + "fa= 1 # in kHz\n", + "fa=fa*10**3 # in Hz\n", + "Vp=1.5 # in volt\n", + "f= 200 # in Hz\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 1/(2*np.pi*fa*C) # in ohm\n", + "R=R*10**-3 # in k ohm\n", + "R=np.floor(R*10)/10 # in k ohm\n", + "fb= 20*fa # in Hz\n", + "R_desh= 1/(2*np.pi*fb*C) # in ohm\n", + "# Let\n", + "R_desh= 82 # in ohm\n", + "R_OM= R # in k ohm\n", + "print \"Value of R_OM = %0.1f k ohm\" %R_OM\n", + "CR= C*R \n", + "# Vin= Vp*sin(omega*t)= 1.5*sin(400*t)\n", + "# v_out= -CR*diff(v_in) = -0.2827 Cos(400*pi*t)# in micro volt\n", + "print \"Output Voltage = -0.2827 Cos(400*pi*t)\" \n", + "t = np.arange(0, .015, 1.0/44100)\n", + "v_out=-0.2827*np.sin(400*np.pi*t+np.pi/2)# in micro volt\n", + "plot(t,v_out) \n", + "plt.title('Output Voltage Waveform')\n", + "plt.xlabel('Time in ms')\n", + "plt.ylabel('Vout in Volts') \n", + "print \"Output Voltage waveform is shown in figure.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R_OM = 1.5 k ohm\n", + "Output Voltage = -0.2827 Cos(400*pi*t)\n", + "Output Voltage waveform is shown in figure." + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXlYVVXb/7/nCCqKA6ghk6IMCoLgiEMKDqiUmmk5paE2\nvU0+T4Opv95KGzXzqcznLa0s0xyyTDSVHBFNEAcMFZxQFEENRXCWaf3+WJ4DCAcO5+x91j5735/r\n4tJz2GfvL2z2+q573WvdS8cYYyAIgiAIK9GLFkAQBEGoAzIUgiAIQhLIUAiCIAhJIEMhCIIgJIEM\nhSAIgpAEMhSCIAhCEshQCKIaJk2ahHfeeUe0DMXw119/wd/fH40aNcL69etFyyEUBhkKUWt+/PFH\nhISEoGHDhnB3d8dLL72EgoICsz/v4+ODHTt2SKanuvNlZ2fD0dERZ86cqfS9xx9/HNOmTav23Dqd\nDjqdDgAQHx8Pb29v6wVbwODBg/Hpp58aX2dnZ0Ov11f53j///CObjnfffRdTp07FjRs3MHz4cNmu\nQ9gnZChErZg/fz5mzJiB+fPn4/r160hKSsK5c+cQFRWFoqIis86h0+kg5Xra6s7n6emJAQMGYNmy\nZRXez8vLw+bNmzFp0qQaz6+Etb8RERFISEgwvk5ISED79u0rvRcQEICHHnpINh3nz59HUFCQRZ8t\nKSmRWA2hOBhBmElBQQFzdnZma9asqfD+zZs3WYsWLdiSJUsYY4zFxMSw//3f/zV+f+fOnczLy4sx\nxtiECROYXq9nTk5OzNnZmc2bN4+dPXuW6XQ6tnjxYubh4cHc3d3ZZ599Zvx8bc/3ICtWrGC+vr4V\n3vvvf//LOnfuzBhjLC0tjUVERLCmTZuyDh06sPXr1xuPmzRpEnvnnXfYrVu3WP369Zler2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yMzMxMmTJ3Hs2DEMHDgQAFBSUgIPD48az22o3tq5c2dkZmZWeUy3bt2M+4/4+fkZrx0c\nHIydO3cCAHr37o2YmBiMHj3aeE6CEAkZCkGYoG7dugAAvV5v3LHO8Lq4uBiMMXTo0AF79+6t1Xnr\n1asHAKhTp45x6MzUMYbrGV4brg3w3fSSk5OxceNGdOnSBQcPHoSrq2uttBCElNCQF0FUgTlzVdq1\na4fc3FwkJSUBAIqKipCWlmbx+WpLRkYGunfvjtmzZ6NFixZWb3dLENZCEQqhecrnN6r6f/ljyr92\ndHTEr7/+iqlTp6KgoADFxcV47bXXEBQUZPIa5rxf3Y6I5b/31ltv4dSpU2CMYeDAgZJtJ0sQlkLT\nhgmCIAhJoCEvgiAIQhLIUAiCIAhJIEMhCIIgJIEMhSAIgpAEMhSCIAhCEshQCIIgCEkgQyEIgiAk\ngQyFIAiCkIT/D1aoyBiLHf2sAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 : Page No - 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data \n", + "R2 = 100 # in ohm\n", + "R1 = 200 # in ohm\n", + "R_F = 100 # in k ohm\n", + "R_F = R_F * 10**3 # in ohm\n", + "R_G = 100 # in ohm\n", + "Gain_max = ( 1+((2*R_F)/R_G) ) * (R2/R1) \n", + "R = 100 # in k ohm\n", + "R_G1 = 0.01+R # in k ohm\n", + "R_G1 = R_G1 * 10**3 # in ohm\n", + "Gain_min = ( 1+((2*R_F)/R_G1) ) * (R2/R1) \n", + "print \"The gain can be varied from \",round(Gain_min,1),\" to \",round(Gain_max,1)\n", + "\n", + "#Note : In the book the value of maximum gain is not accurate " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gain can be varied from 1.5 to 1000.5\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 : Page No - 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R1 = 100 # in k ohm\n", + "R2 = 100 # in k ohm\n", + "R_F = 470 # in k ohm\n", + "Gain = 100 \n", + "R_G = (2*R_F)/(Gain-1) # in ohm\n", + "print \"The value of R_G = %0.2f ohm\" %R_G" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_G = 9.49 ohm\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 : Page No - 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R = 100 # in ohm\n", + "T = 25 # in degree C\n", + "alpha = 0.00392 \n", + "R1 = R*(1+(alpha*T)) # in ohm\n", + "expression= 'R_T= Ro*[1+alpha*T]' \n", + "print \"The expression for the resistance at T\u00b0C : R_T= Ro*[1+alpha*T]\"\n", + "print \"The transducer resistance at 25\u00b0C = %0.1f \u03a9\" %R1 \n", + "T = 100 # in degree C\n", + "R2 = R*(1+(alpha*T)) # in ohm\n", + "print \"The transducer resistance at 100\u00b0C = %0.1f \u03a9\" %R2 \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The expression for the resistance at T\u00b0C : R_T= Ro*[1+alpha*T]\n", + "The transducer resistance at 25\u00b0C = 109.8 \u03a9\n", + "The transducer resistance at 100\u00b0C = 139.2 \u03a9\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 : Page No - 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R3 = 1 # in k ohm\n", + "R4 = 1 # in k ohm\n", + "R_min = R4/R3 \n", + "R_4 = 50 # in k ohm\n", + "R_max = (R_4+R4)/R3 \n", + "R2 = 10 # in k ohm\n", + "A_F = 5 \n", + "R1 = (((A_F/R_min)-1)*R2)/2 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1 \n", + "print \"The value of R2 = %0.f k\u03a9\" %R2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 20 k\u03a9\n", + "The value of R2 = 10 k\u03a9\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 : Page No - 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R1= 100 # in k\u03a9\n", + "R2=200 # in k\u03a9\n", + "R3= 20 # in k\u03a9\n", + "R4=40 # in k\u03a9\n", + "#Vout= [1+R2/R1]*[R4/(R3+R4)]*Vin1-R2/R1*Vin2\n", + "A=(1+R2/R1)*(R4/(R3+R4)) # (assumed)\n", + "print \"Output voltage =\",int(A),\"*(Vin1-Vin2)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 2 *(Vin1-Vin2)\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 : Page No - 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R_F = 5 # in k ohm\n", + "R_G = 1 # in k ohm\n", + "R1 = 10 # in k ohm\n", + "R2 = 20 # in k ohm\n", + "A = (1 + ((2*R_F)/R_G))*(R2/R1) \n", + "print \"The gain of instrumentaion amplifier = %0.f\" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gain of instrumentaion amplifier = 22\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27 : Page No - 178\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "R_F = 10 # in k ohm\n", + "R_G = 5 # in k ohm\n", + "R1 = 1 # in k ohm\n", + "R2 = 2 # in k ohm\n", + "A = (1+ ((2*R_F)/R_G))*(R2/R1) \n", + "V_in2 = 2 # in mV\n", + "V_in1 = 1 # in mV\n", + "V_out = A*(V_in2-V_in1) # in mV\n", + "print \"The output voltage = %0.f mV\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 10 mV\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 : Page No - 178\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data \n", + "V_out = 3 # in V\n", + "V_in2 = 5 # in mV\n", + "V_in1 = 2 # in mV\n", + "V1 = V_in2-V_in1 # in mV\n", + "V1 = V1 * 10**-3 # in V\n", + "A = V_out/V1 \n", + "R_F = 15 # in k ohm\n", + "R1 = 1 # in k ohm\n", + "R2 = 2 # in k ohm\n", + "R = R2/R1 # in k ohm\n", + "R_G = (2*R_F)/((A/R)-1) #in k ohm\n", + "R_G = R_G * 10**3 # in ohm\n", + "print \"The value of R_G = %0.2f \u03a9\" %R_G" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_G = 60.12 \u03a9\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31 : Page No - 182\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "A=10000 \n", + "R1= 100 # in k\u03a9\n", + "A2= 1/5 # (assumed value)\n", + "R2= R1/A2 # in k\u03a9\n", + "# A= A1*A2 and A1= 1+2*RF/R_GB\n", + "RFbyR_GB= (A/A2-1)/2 \n", + "# [1+2*RF/RG]*A2= 1 and RG= RGB+100 k\u03a9\n", + "R_G= (1-1/A2)/2*100/((1/A2-1)/2-RFbyR_GB) # in k\u03a9\n", + "R_F= RFbyR_GB*R_G # in k\u03a9\n", + "print \"The value of R_G = %0.f \u03a9\" %(R_G*10**3)\n", + "print \"The value of R_F = %0.f k\u03a9\" %R_F\n", + "print \"This is the base resistance required in series with the pot of 100 k\u03a9\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_G = 8 \u03a9\n", + "The value of R_F = 200 k\u03a9\n", + "This is the base resistance required in series with the pot of 100 k\u03a9\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb new file mode 100644 index 00000000..12505d05 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_05.ipynb @@ -0,0 +1,1090 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 5 - Filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 : Page No - 204\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "R = 10 # in k ohm\n", + "R = R * 10**3 # in ohm\n", + "C = 0.001 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f_c = 1/(2*pi*R*C) # Hz\n", + "f_c = f_c * 10**-3 # in kHz\n", + "print \"Cutoff frequency = %0.3f kHz\" %f_c \n", + "R_F = 100 # in k ohm\n", + "R1 = 10 # in k ohm\n", + "A_F = 1+(R_F/R1) \n", + "print \"The passband voltage gain = %0.f\" %A_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cutoff frequency = 15.915 kHz\n", + "The passband voltage gain = 11\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 : Page No - 204\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1 = 10 # in k ohm\n", + "R_F = R1 # in k ohm\n", + "print \"The value of R_F = %0.f k\u03a9\" %R_F\n", + "C = 0.001 # in \u00b5F\n", + "C = C *10**-6 # in F\n", + "f_c = 10 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "R = 1/(2*pi*f_c*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "print \"The value of R = %0.1f k\u03a9\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_F = 10 k\u03a9\n", + "The value of R = 15.9 k\u03a9\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 : Page No - 204\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 2 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f_c*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "R = 8.2 # in k ohm(Practical value)\n", + "A_F = 2.5 \n", + "R1 = (A_F*R)/1.5 # in k ohm\n", + "R_F = 1.5*R1 # in k ohm\n", + "print \"The value of R1 = %0.2f k\u03a9 (standard value 15 kohm)\" %R1\n", + "print \"The value of R_F = %0.f k\u03a9\" %R_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 13.67 k\u03a9 (standard value 15 kohm)\n", + "The value of R_F = 20 k\u03a9\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 : Page No - 208\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 1 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C = 0.005*10**-6 # in F\n", + "R3 = 1/(2*pi*f_c*C) # in ohm\n", + "R3 = R3 * 10**-3 # in k ohm\n", + "R2 = R3 # in k ohm\n", + "R1 = 33 # in k ohm (standard value)\n", + "R_F = 0.586*R1 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1\n", + "print \"The value of R2 = R3 = %0.2f k\u03a9\" %R3\n", + "print \"The value of R_F = %0.3f k\u03a9\" %R_F\n", + "print \"The value of C2 = C3 = %0.3f \u00b5F\" %(C*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 33 k\u03a9\n", + "The value of R2 = R3 = 31.83 k\u03a9\n", + "The value of R_F = 19.338 k\u03a9\n", + "The value of C2 = C3 = 0.005 \u00b5F\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 : Page No - 208\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "R1 = 12 # in k ohm\n", + "R_F = 7 # in k ohm\n", + "R2 = 33 # in k ohm\n", + "R3 = R2 # in k ohm\n", + "R = R2 # in k ohm\n", + "R = R * 10**3 # in ohm\n", + "C1 = 0.002 # in \u00b5F\n", + "C1 = C1 * 10**-6 # in F\n", + "C2 = C1 # in F\n", + "C = C1 # in F\n", + "f_c = 1/(2*pi*R*C) # in Hz\n", + "f_c = f_c * 10**-3 # in kHz\n", + "print \"Cut off frequency = %0.3f kHz\" %f_c \n", + "A_F = 1+(R_F/R1) \n", + "print \"Pass band voltage gain = %0.3f\" %A_F\n", + "\n", + "#Note : The unit of cut off frequency in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency = 2.411 kHz\n", + "Pass band voltage gain = 1.583\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 : Page No - 209\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 2 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C2 = 0.033 # in \u00b5F\n", + "C2 = C2 * 10**-6 # in F\n", + "C3 = C2 # in F\n", + "C = C2 # in F\n", + "R2 = 1/(2*pi*f_c*C) # in ohm\n", + "R2 = R2 * 10**-3 # in k ohm\n", + "R3=R2 # in kohm\n", + "print \"The value of R2 = R3 = %0.1f k\u03a9\" %R2 \n", + "#R_F= 0.586*R1\n", + "R1= 2*R2*(1+0.586)/0.586 # in k ohm\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1\n", + "R1= 15 # in k ohm\n", + "R_F = 0.586 * R1 # in k ohm\n", + "print \"The value of R_F = %0.2f k\u03a9\" %R_F\n", + "print \"R_F may be taken as a pot of 10 k\u03a9\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R2 = R3 = 2.4 k\u03a9\n", + "The value of R1 = 13 k\u03a9\n", + "The value of R_F = 8.79 k\u03a9\n", + "R_F may be taken as a pot of 10 k\u03a9\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 : Page No - 209\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given data\n", + "f_c = 1 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C2 = 0.0047 # in \u00b5F\n", + "C2 = C2 * 10**-6 # in F\n", + "C3 = C2 # in F\n", + "C = C2 # in F\n", + "R2 = 1/(2*pi*f_c*C) # in ohm\n", + "R2 = R2 * 10**-3 # in k ohm\n", + "R3= R2 # in kohm\n", + "# Let\n", + "R1=30 # in kohm\n", + "R_F= R1*0.586 # in kohm\n", + "print \"The value of R2 = R3 = %0.f k\u03a9\" %math.floor(R2)\n", + "print \"The value of C2 = C3 = %0.4f micro F\" %(C3*10**6)\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1\n", + "print \"The value of R_F = %0.f k\u03a9\" %R_F\n", + "print \"The standard value of R_F is 20 k\u03a9\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R2 = R3 = 33 k\u03a9\n", + "The value of C2 = C3 = 0.0047 micro F\n", + "The value of R1 = 30 k\u03a9\n", + "The value of R_F = 18 k\u03a9\n", + "The standard value of R_F is 20 k\u03a9\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 : Page No - 215\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "f_c = 1.5 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "alpha = sqrt(2) \n", + "R_F = (2-alpha) # in ohm\n", + "print \"The value of R_F = %0.3f \u03a9\" %R_F \n", + "R_i = 1 # in ohm\n", + "A_F = 1+(R_F/R_i) \n", + "print \"The pass band gain = %0.3f\" %A_F \n", + "Omega_c = 2*pi*f_c # in rad/sec\n", + "C = 1 # in F\n", + "R = 1/Omega_c # in ohm\n", + "R = R * 10**7 # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R1 = R # in k ohm\n", + "R2=R1 # in kohm\n", + "print \"The value of R1 = R2 = %0.3f k\u03a9\" %R1 \n", + "C = C/10**7 # in \u00b5F\n", + "C = C * 10**9 # in nF\n", + "C1=C # in nF\n", + "C2= C1 # in nF\n", + "print \"The value of C1 = C2 = %0.f nF\" %C1 \n", + "\n", + "#Note: The unit of R1 and R2 is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_F = 0.586 \u03a9\n", + "The pass band gain = 1.586\n", + "The value of R1 = R2 = 1.061 k\u03a9\n", + "The value of C1 = C2 = 100 nF\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 : Page No - 216\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alpha = 1.414 \n", + "f_c = 1.5 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C1 = 2/alpha # in F\n", + "C2 = alpha/2 # in F\n", + "R1 = 1 # in ohm\n", + "R2 = R1 # in ohm \n", + "R_F = 2 # in ohm\n", + "Omega_c = 2*pi*f_c # in rad/sec\n", + "R = 1/Omega_c # in ohm\n", + "R = R * 10**7 # in ohm\n", + "R1 = R # in ohm\n", + "R2= R1 # in ohm\n", + "R_F = 2*R # in ohm\n", + "C1 = C1/10**7 # in F\n", + "C2 = C2/10**7 # in F\n", + "print \"The value of R1 = R2 = %0.3f kohm\" %(R1*10**-3) \n", + "print \"The value of C1 = %0.1f nF\" %(C1*10**9) \n", + "print \"The value of C2 = %0.1f nF\" %(C2*10**9) \n", + "print \"The value of R_F = %0.3f kohm\" %(R_F*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = R2 = 1.061 kohm\n", + "The value of C1 = 141.4 nF\n", + "The value of C2 = 70.7 nF\n", + "The value of R_F = 2.122 kohm\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 : Page No - 220\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "#Given data\n", + "f_c = 10 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "omega_c= 2*pi*f_c # in rad/sec\n", + "C = 0.01 # in \u00b5F\n", + "C= C*10**-6 # in F\n", + "Ri= 10*10**3 # in \u03a9\n", + "n=2 \n", + "Q= 1/1.414 \n", + "R= 1/(2*pi*f_c*C) # in \u03a9\n", + "Af= 3-1/Q \n", + "Rf= (Af-1)*Ri # in \u03a9\n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "print \"The value of R = %0.3f k\u03a9\" %(R*10**-3)\n", + "print \"The value of Rf = %0.2f k\u03a9\" %(Rf*10**-3)\n", + "print \"Frequency versus gain magnitude shown in following table:\"\n", + "print \"-----------------------------------------------------------------------------------------\"\n", + "print \"| Frequency in Hz Gain Magnitude in dB |H(s)| |\"\n", + "print \"-----------------------------------------------------------------------------------------\"\n", + "f= 1000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",int(HsdB),\" |\"\n", + "f= 2000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",round(HsdB,3),\" |\"\n", + "f= 5000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",round(HsdB,2),\" |\"\n", + "f= 10000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",int(round(HsdB,2)),\" |\"\n", + "f= 50000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",round(HsdB,2),\" |\"\n", + "f= 100000 # in Hz\n", + "omega= 2*pi*f # in rad/sec\n", + "HsdB= 20*log10(Af/sqrt(1+(omega/omega_c)**4))\n", + "print \"| \",int(f),\" \",round(HsdB,2),\" |\"\n", + "print \"-----------------------------------------------------------------------------------------\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 0.01 \u00b5F\n", + "The value of R = 1.592 k\u03a9\n", + "The value of Rf = 5.86 k\u03a9\n", + "Frequency versus gain magnitude shown in following table:\n", + "-----------------------------------------------------------------------------------------\n", + "| Frequency in Hz Gain Magnitude in dB |H(s)| |\n", + "-----------------------------------------------------------------------------------------\n", + "| 1000 4 |\n", + "| 2000 3.999 |\n", + "| 5000 3.74 |\n", + "| 10000 1 |\n", + "| 50000 -23.96 |\n", + "| 100000 -35.99 |\n", + "-----------------------------------------------------------------------------------------\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 : Page No - 221\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 1 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "C = 0.1 # in \u00b5F\n", + "print \"The value of C = %0.1f \u00b5F\" %C \n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f_c*C) # in ohm\n", + "print \"The value of R = %0.3f k\u03a9\" %(R*10**-3) \n", + "Q1 = 1/0.765 \n", + "alpha1 = 1/Q1 \n", + "Q2 = 1/1.848 \n", + "alpha2 = 1/Q2 \n", + "A_F1 = 3-alpha1 \n", + "A_F2 = 3-alpha2 \n", + "R_i =10*10**3 # in ohm\n", + "R_F = (A_F1-1)*R_i # in ohm\n", + "print \"For first stage the value of R_F = %0.2f k\u03a9\" %(R_F*10**-3) \n", + "R_i = 100*10**3 # ohm\n", + "R_F = (A_F2-1)*R_i # in ohm\n", + "print \"For second stage the value of R_F = %0.1f k\u03a9\" %(R_F*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 0.1 \u00b5F\n", + "The value of R = 1.592 k\u03a9\n", + "For first stage the value of R_F = 12.35 k\u03a9\n", + "For second stage the value of R_F = 15.2 k\u03a9\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 : Page No - 225\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 10 # in kHz\n", + "f_c = f_c *10**3 # in Hz\n", + "C = 0.0047 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f_c*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "print \"The value of R = %0.3f k\u03a9\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 3.386 k\u03a9\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 : Page No - 225\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R = 15 # in k ohm\n", + "R = R *10**3 # in ohm\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f_c = 1/(2*pi*R*C) # in Hz\n", + "f_c= round(f_c) \n", + "print \"Cut off frequency = %0.f Hz\" %f_c \n", + "Omega_c = 2*pi*f_c # in rad/sec\n", + "print \"The value of omega_c = %0.3f k rad/sec\" %(Omega_c*10**-3) \n", + "\n", + "# Note: There is calculation error to find the value of omega_c. So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency = 1061 Hz\n", + "The value of omega_c = 6.666 k rad/sec\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 printed as 5.13 : Page No - 226\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1 = 27 # in k ohm\n", + "R1 = R1 * 10**3 # in ohm\n", + "R2 = R1 # in ohm\n", + "R3 = R2 # in ohm\n", + "R = R1 # in ohm\n", + "R_L = 10 # in k ohm\n", + "R_F = 16 # in k ohm\n", + "C2 = 0.005 # in \u00b5F\n", + "C2 = C2 * 10**-6 # in F\n", + "C3 = C2 # in F\n", + "C = C3 # in F\n", + "f_c = 1/(2*pi*R*C) # in Hz\n", + "f_c = f_c * 10**-3 # in kHz\n", + "R1= R1*10**-3 # in kohm\n", + "print \"Cut off frequency = %0.2f kHz\" %f_c \n", + "A_F = 1+(R_F/R1) \n", + "print \"Voltage gain = %0.3f\" %A_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut off frequency = 1.18 kHz\n", + "Voltage gain = 1.593\n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 : Page No - 229\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alpha = 1.732 \n", + "k_f = 1.274 \n", + "C1 = 1 # in F\n", + "C2 = C1 # in F\n", + "R1 = alpha/2 # in ohm\n", + "R2 = 2/alpha # in ohm\n", + "R_F = R2 # in ohm\n", + "f_3dB = 2 # in kHz\n", + "f_3dB = f_3dB * 10**3 # in Hz\n", + "f_c = f_3dB/k_f # in Hz\n", + "Omega_c = 2*pi*f_c # in rad/sec\n", + "R1 = R1/Omega_c # in ohm\n", + "R1 = R1 * 10**8 # in ohm\n", + "R2 = R2/Omega_c # in ohm\n", + "R2 = R2 * 10**8 # in ohm\n", + "R_F = R2 # in ohm\n", + "C1 = C1/10**8 # in F\n", + "print \"The value of R1 = %0.4f k\u03a9\" %(R1*10**-3)\n", + "print \"The value of R2 = R_F = %0.3f k\u03a9\" %(R2*10**-3)\n", + "print \"The value of C1 = C2 = %0.f nF\" %(C1*10**9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 8.7797 k\u03a9\n", + "The value of R2 = R_F = 11.707 k\u03a9\n", + "The value of C1 = C2 = 10 nF\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 printed as 5.15 : Page No - 232\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "Cdesh = 0.01 # in \u00b5F\n", + "Cdesh= Cdesh* 10**-6 # in F\n", + "f_H = 1 # in kHz\n", + "f_H = f_H * 10**3 # in Hz\n", + "Rdesh= 1/(2*pi*f_H*Cdesh) # in ohm\n", + "A_F2 = 2 \n", + "R1desh = 10*10**3 # in ohm\n", + "Rdesh_F= R1desh # in ohm\n", + "print \"(i) Low-pass Filter Components : \"\n", + "print \"The value of R1' = %0.f k\u03a9\" %(R1desh*10**-3) \n", + "print \"The value of R' = %0.1f k\u03a9\" %(Rdesh*10**-3) \n", + "print \"The value of R'F = %0.f k\u03a9\" %(Rdesh_F*10**-3) \n", + "print \"The value of C = %0.2f \u00b5F\" %(Cdesh*10**6) \n", + "C = 0.05 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f_L = 100 # in Hz\n", + "R = 1/(2*pi*f_L*C) # in ohm\n", + "A_F1 = 2 \n", + "R1 = 10*10**3 # in ohm\n", + "R_F = R1 # in ohm\n", + "print \"\\n(ii) High pass Filter Components\"\n", + "print \"The value of R1 = %0.f k\u03a9\" %(R1*10**-3) \n", + "print \"The value of R = %0.3f k\u03a9\" %(R*10**-3) \n", + "print \"The value of R_F = %0.f k\u03a9\" %(R_F*10**-3) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6) \n", + "Q = sqrt(f_H*f_L)/(f_H-f_L) \n", + "print \"The quality factor = %0.3f\" %Q \n", + "\n", + "# Note : In High pass filter components, the value of R is calculated 31.83 k\u03a9 but at last it is writter as 3.183 k\u03a9 \n", + "# so the answer of R in High pass filter components is wrong.\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Low-pass Filter Components : \n", + "The value of R1' = 10 k\u03a9\n", + "The value of R' = 15.9 k\u03a9\n", + "The value of R'F = 10 k\u03a9\n", + "The value of C = 0.01 \u00b5F\n", + "\n", + "(ii) High pass Filter Components\n", + "The value of R1 = 10 k\u03a9\n", + "The value of R = 31.831 k\u03a9\n", + "The value of R_F = 10 k\u03a9\n", + "The value of C = 0.05 \u00b5F\n", + "The quality factor = 0.351\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 : Page No - 234\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_c = 2 # in kHz\n", + "f_c = f_c * 10**3 # in Hz\n", + "A_F = 10 \n", + "Q = 4 \n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R1 = Q/(2*pi*f_c*C*A_F) # in ohm \n", + "R1 = R1 * 10**-3 # in k ohm\n", + "print \"The value of R1 =\",round(R1,3),\"k\u03a9 (standard value 3.3 k\u03a9)\" \n", + "R2 = Q/(2*pi*f_c*C*(2*Q**2-A_F)) # in ohm\n", + "R2 = R2 * 10**-3 # in k ohm\n", + "print \"The value of R2 =\",round(R2,3),\"k\u03a9 (standard value 1.5 k\u03a9)\" \n", + "R3 = Q/(pi*f_c*C) # in ohm\n", + "R3 = R3 * 10**-3 # in k ohm\n", + "print \"The value of R3 =\", round(R3,2),\"k\u03a9 (standard value 63 k\u03a9)\" \n", + "f_c1 = 1 # in kHz\n", + "Rdesh2 = R2*(((f_c*10**-3)/f_c1)**2) # in k ohm\n", + "print \"The value of R'2 =\", round(Rdesh2,3),\"k\u03a9 (standard value 5.8 k\u03a9)\" \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 3.183 k\u03a9 (standard value 3.3 k\u03a9)\n", + "The value of R2 = 1.447 k\u03a9 (standard value 1.5 k\u03a9)\n", + "The value of R3 = 63.66 k\u03a9 (standard value 63 k\u03a9)\n", + "The value of R'2 = 5.787 k\u03a9 (standard value 5.8 k\u03a9)\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Printed as 5.17 : Page No - 236\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_H = 100 # in Hz\n", + "f_L = 2 # in kHz\n", + "f_L = f_L * 10**3 # in Hz\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f_L*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "A_F = 2 \n", + "R1 = 10 # in k ohm\n", + "# A_F= 1+R_F/R1 or\n", + "R_F= (A_F-1)*R1 # in k ohm\n", + "print \"(i) High-pass Section Components : \"\n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "print \"The value of R = %0.2f k\u03a9\" %R \n", + "print \"The value of R_F = R1 = %0.f k\u03a9\" %R_F \n", + "Cdesh = 0.1 # in \u00b5F\n", + "Cdesh= Cdesh* 10**-6 # in F\n", + "Rdesh = 1/(2*pi*f_H*Cdesh) # in ohm\n", + "Rdesh= Rdesh * 10**-3 # in k ohm\n", + "Rdesh1 = 10 # in k ohm\n", + "Rdesh_F= Rdesh1 # in k ohm\n", + "print \"\\n(ii) Low-pass Section components : \"\n", + "print \"The value of C' = %0.1f \u00b5F\" %(Cdesh*10**6)\n", + "print \"The value of R' = %0.3f k\u03a9\" %Rdesh \n", + "print \"The value of R'F = R'1 = %0.f k\u03a9\" %Rdesh_F \n", + "R2 = 10 # in k ohm\n", + "R3 = R2 # in k ohm\n", + "R4 = R2 # in k ohm\n", + "R_OM = (R2*R3*R4)/(R2*R3+R3*R4+R4*R2) # in k ohm\n", + "print \"\\n(iii) Summing Amplifier component\"\n", + "print \"The value of R_OM = %0.1f k\u03a9\" %R_OM \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) High-pass Section Components : \n", + "The value of C = 0.01 \u00b5F\n", + "The value of R = 7.96 k\u03a9\n", + "The value of R_F = R1 = 10 k\u03a9\n", + "\n", + "(ii) Low-pass Section components : \n", + "The value of C' = 0.1 \u00b5F\n", + "The value of R' = 15.915 k\u03a9\n", + "The value of R'F = R'1 = 10 k\u03a9\n", + "\n", + "(iii) Summing Amplifier component\n", + "The value of R_OM = 3.3 k\u03a9\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 : Page No - 238\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_N = 50 # in Hz\n", + "C = 0.47 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f_N*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "print \"The value of Resistance = %0.3f kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance = 6.773 kohm\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 : Page No - 240\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan\n", + "#Given data\n", + "R = 10 # in k ohm\n", + "R = R * 10**3 # in ohm\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f = 2 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "Phi = -2*atan(2*pi*R*C*f)*180/pi # in degree\n", + "print \"The phase shift = %0.2f degree\" %Phi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase shift = -102.98 degree\n" + ] + } + ], + "prompt_number": 140 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 : Page No - 241\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f_L = 200 # in Hz\n", + "f_H = 1 # in kHz\n", + "f_H = f_H * 10**3 # in Hz\n", + "f_c = sqrt(f_H*f_L) # in Hz\n", + "print \"The center frequency = %0.1f Hz\" %f_c \n", + "Q = f_c/(f_H-f_L) \n", + "print \"Quality factor = %0.3f\" %Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The center frequency = 447.2 Hz\n", + "Quality factor = 0.559\n" + ] + } + ], + "prompt_number": 142 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 : Page No - 241\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f1 = 5 # in kHz\n", + "f1 = f1 * 10**3 # in Hz\n", + "f2 = 15 # in kHz\n", + "f2 = f2 * 10**3 # in Hz\n", + "Cdesh = 0.01 # in \u00b5F\n", + "Cdesh= Cdesh * 10**-6 # in F\n", + "Rdesh = 1/(2*pi*f2*Cdesh) # in ohm\n", + "A_F1 = 1.414 \n", + "A_F2 = A_F1 \n", + "Rdesh1 = 10 # in k ohm\n", + "Rdesh_F = (A_F1-1)*Rdesh1 # in k ohm\n", + "print \"(i) Low pass Filter components : \"\n", + "print \"The value of R'1 = %0.f k\u03a9\" %Rdesh1\n", + "print \"The value of R' = %0.3f k\u03a9\" %(Rdesh*10**-3)\n", + "print \"The value of R'F = %0.2f k\u03a9\" %Rdesh_F\n", + "print \"The value of C' = %0.2f \u00b5F\" %(Cdesh*10**6) \n", + "C = 0.05 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = 1/(2*pi*f1*C) #in ohm\n", + "R1 = 10 # in k ohm\n", + "R_F = (A_F1-1)*R1 # in k ohm\n", + "print \"\\n(ii) High pass Filter components : \"\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1\n", + "print \"The value of R = %0.2f \u03a9\" %R \n", + "print \"The value of R_F = %0.2f k\u03a9\" %R_F \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Low pass Filter components : \n", + "The value of R'1 = 10 k\u03a9\n", + "The value of R' = 1.061 k\u03a9\n", + "The value of R'F = 4.14 k\u03a9\n", + "The value of C' = 0.01 \u00b5F\n", + "\n", + "(ii) High pass Filter components : \n", + "The value of R1 = 10 k\u03a9\n", + "The value of R = 636.62 \u03a9\n", + "The value of R_F = 4.14 k\u03a9\n", + "The value of C = 0.05 \u00b5F\n" + ] + } + ], + "prompt_number": 146 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb new file mode 100644 index 00000000..2a99912c --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06.ipynb @@ -0,0 +1,103 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 6 - Sinusoidal Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 : Page No - 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "R3 = 6 # in k ohm\n", + "R4 = 2 # in k ohm\n", + "A = 1+(R3/R4) \n", + "if A>3 :\n", + " print \"The circuit will work as the oscillator\"\n", + "R = 5.1 # in k ohm\n", + "R = R * 10**3 # in ohm\n", + "C = 0.001 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f = 1/(2*pi*R*C) # in Hz\n", + "f = f * 10**-3 # in kHz\n", + "print \"The frequency of oscillations = %0.4f kHz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The circuit will work as the oscillator\n", + "The frequency of oscillations = 31.2069 kHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 : Page No - 272\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.05 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f = 1 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "R = 1/(2*pi*f*C) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "print \"The value of R1 = R2 = %0.3f k\u03a9\" %R \n", + "R4 = 10 # in k ohm\n", + "print \"The value of R3 = %0.f k\u03a9\" %R4 \n", + "R3 = 2*R4 # in k ohm\n", + "print \"The value of R4 = %0.f k\u03a9\" %R3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = R2 = 3.183 k\u03a9\n", + "The value of R3 = 10 k\u03a9\n", + "The value of R4 = 20 k\u03a9\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb new file mode 100644 index 00000000..65492a55 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_08.ipynb @@ -0,0 +1,212 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 8 - CMOS Realization Of Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 : Page No - 333\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve, N\n", + "x= symbols('x')\n", + "#Given data\n", + "NMH= 1 # in V\n", + "VIH= 2 # in V\n", + "VTon= 0.5 # in V\n", + "VOL= 0.2 # in V\n", + "VDD= 3 # in V\n", + "KP= 30*10**-6 # in A/V**2\n", + "PD= 100*10**-6 # power dissipation in W\n", + "# Formula VIH= VTon +2*sqrt(2*VDD/(3*kn*RL))-1/(kn*RL) (i)\n", + "# Let x= 1/(kn*RL), putting the values in (i), we get\n", + "# x**2-5*x+2.25=0\n", + "expr = x**2-5*x+2.25\n", + "x , x1= solve(expr, x)\n", + "# Formula PD= VDD*(VDD-VOL)/(2*RL)\n", + "RL= VDD*(VDD-VOL)/(2*PD) # in \u03a9\n", + "print \"The value of RL = %0.1e \u03a9\" %RL\n", + "kn= 1/(x*RL) # in A/V**2\n", + "# Formula kn= KP*(W/L)\n", + "WbyL= kn/KP \n", + "print \"The value of (W/L)n = %0.2f\" %WbyL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of RL = 4.2e+04 \u03a9\n", + "The value of (W/L)n = 1.59\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 : Page No - 335\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "unCox= 40 # in \u00b5A/V**2\n", + "upCox= 20 # in \u00b5A/V**2\n", + "Ln= 0.5 # in \u00b5m\n", + "Lp= 0.5 # in \u00b5m\n", + "Wn= 2.0 # in \u00b5m\n", + "Wp= unCox*Wn/upCox # in \u00b5m\n", + "print \"The value of Wp = %0.f \u00b5m\" %Wp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Wp = 4 \u00b5m\n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 : Page No - 337\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols, solve, N\n", + "VOUT= symbols('VOUT')\n", + "# Given data\n", + "VTO= 0.43 # in V\n", + "VDD= 2.5 # in V\n", + "g=0.4 # value of gamma\n", + "W1= 0.375 \n", + "L1=0.25 \n", + "W2= 0.75 \n", + "L2=0.25 \n", + "#VDD-VOUT-VT= VDD-VOUT-(VTO+g*(sqrt(0.6+VOUT)-sqrt(0.6)))=0\n", + "#VOUT**2+VOUT*(2*A-g**2)+(A-0.6*g**2)=0, where\n", + "A=VTO-VDD-g*sqrt(0.6) # assumed\n", + "B= (2*A-g**2) # assumed\n", + "C=(A**2-0.6*g**2) #assumed\n", + " #VOUT= [1 B C] \n", + " #VOUT= roots(VOUT) # in V\n", + " #VOUT= VOUT(2) # in V\n", + "\n", + "\n", + "expr = VOUT**2+VOUT*(2*A-g**2+4.556)+(A-0.6*g**2)\n", + "VOUT= solve(expr, VOUT)\n", + "VOH= round(VOUT[1],4) # in V\n", + "print \"The value of VOH = %0.3f volts\" %VOH\n", + "Vout=(W1+3*L2)-(VDD-VTO)*(W2*L1/(W1*L2)-1)+ (VDD)/(VDD-VTO)\n", + "VOL= Vout # in V\n", + "print \"The value of VOL = %0.3f volts\" %VOL\n", + "Vth= (VDD+VTO-L1)/(VDD*VTO)*(1-W1*L2/(W2*L1))+(L1*L2/VDD)\n", + "print \"The value of Vth for circuit A = %0.3f volts\" %Vth\n", + "W4= 0.365 \n", + "L4=0.25 \n", + "W3= 0.75 \n", + "L3=0.15 \n", + "Vth=(L3*L4/VDD)+(VDD/(W3*L4*VDD))-(VDD)/(1-W4*L3/(W3*L4))-2*W4\n", + "print \"The value of Vth for circuit B = %0.3f volts\" %Vth\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of VOH = 1.766 volts\n", + "The value of VOL = 0.263 volts\n", + "The value of Vth for circuit A = 1.272 volts\n", + "The value of Vth for circuit B = 1.087 volts\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 : Page No - 338\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols, solve, N\n", + "Vx= symbols('Vx')\n", + "\n", + "#Given data\n", + "VTO= 0.43 # in V\n", + "VDD= 2.5 # in V\n", + "g=0.5 # value of gamma\n", + "#VDD-Vx-VT= VDD-Vx-(VTO+g*(sqrt(0.6+Vx)-sqrt(0.6)))=0\n", + "#Vx**2+Vx*(2*A-g**2)+(A-0.6*g**2)=0, where\n", + "A=VTO-VDD-g*sqrt(0.6) # assumed\n", + "B= (2*A-g**2) # assumed\n", + "C=(A**2-0.6*g**2) #assumed\n", + "expr = Vx**2+Vx*(2*A-g**2+5)+(A-0.6*g**2)\n", + "err, Vx= solve(expr , Vx)\n", + "print \"The value of Vx =\",round(Vx,4),\"volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vx = 1.6991 volts\n" + ] + } + ], + "prompt_number": 86 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb new file mode 100644 index 00000000..e738fc3b --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_10.ipynb @@ -0,0 +1,337 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 10 - Non-linear Applications of IC Op-amps" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 : Page No - 383\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "V_CC = 15 # in V\n", + "V_sat = V_CC # in V\n", + "R1 = 120 # in ohm\n", + "R2 = 51 # in k ohm\n", + "R2 = R2 * 10**3 # in ohm\n", + "V_in = 1 # in V\n", + "V_UT = (V_sat*R1)/(R1+R2) #in V\n", + "print \"When supply voltage is +15V then threshold voltage = %0.1f mV\" %(V_UT*10**3) \n", + "V_ULT = ((-V_sat)*R1)/(R1+R2) # in V\n", + "V_ULT = V_ULT # in V\n", + "print \"When supply voltage is -15V then threshold voltage = %0.1f mV\" %(V_ULT*10**3) \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When supply voltage is +15V then threshold voltage = 35.2 mV\n", + "When supply voltage is -15V then threshold voltage = -35.2 mV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 : Page No - 383\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "V_sat = 12 # in V\n", + "V_H = 6 # in V\n", + "R1 = 10 # in k ohm\n", + "R1 = R1 * 10**3 # in ohm\n", + "# Formula V_H= R1/(R1+R2)*(V_sat-(-V_sat)) and Let\n", + "V = V_H/(V_sat-(-V_sat)) # in V (assumed)\n", + "R2= (R1-V*R1)/V\n", + "print \"The value of R1 = %0.f k\u03a9\" %(R1*10**-3) \n", + "print \"The value of R2 = %0.f k\u03a9\" %(R2*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 10 k\u03a9\n", + "The value of R2 = 30 k\u03a9\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 : Page No - 384\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from math import asin\n", + "#Given data\n", + "V_P = 5 # in V\n", + "V_LT = -1.5 # in V\n", + "V_H = 2 # in V\n", + "f = 1 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "V_UT = V_H-V_LT # in V\n", + "V_m = V_P/2 # in V\n", + "# Formula V_LT= V_m*sind(theta)\n", + "theta= asin(-V_LT/V_m) *180/pi\n", + "T = 1/f # in sec\n", + "theta1 = theta+180 # in degree\n", + "T1 = (T*theta1)/360 # in sec\n", + "T2 = T-T1 # in sec\n", + "print \"The value of T1 = %0.3f ms\" %(T1*10**3)\n", + "print \"The value of T2 = %0.3f ms\" %(T2*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of T1 = 0.602 ms\n", + "The value of T2 = 0.398 ms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 : Page No - 384\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_H = 10 # in V\n", + "V_L = -10 # in V\n", + "I_max = 100 # in \u00b5A\n", + "I_max = I_max * 10**-6 # in A\n", + "V_HV = 0.1 # in V\n", + "V_sat = 10 # in V\n", + "R2 = 1 # in k ohm\n", + "R1 = 199 # in k ohm\n", + "R = (R1*R2)/(R1+R2) # in k ohm\n", + "print \"The resistance = %0.f \u03a9\" %(R*10**3) \n", + "\n", + "# Note: The unit of the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance = 995 \u03a9\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 : Page No - 386\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_sat = 12 # in V\n", + "R1 = 1 # in k ohm\n", + "R2 = 3 # in k ohm\n", + "V_LT = ((-V_sat)*R1)/R2 # in V\n", + "print \"The value of V_LT = %0.f V\" %V_LT \n", + "V_UT = (-(-V_sat) * R1)/R2 # in V\n", + "print \"The value of V_UT = %0.f V\" %V_UT \n", + "V_H = (R1/R2)*(V_sat - (-V_sat)) # in V\n", + "print \"The value of V_H = %0.f V\" %V_H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_LT = -4 V\n", + "The value of V_UT = 4 V\n", + "The value of V_H = 8 V\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 : Page No - 387\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R1 = 80 # in k ohm\n", + "R2 = 20 # in k ohm\n", + "V_sat = 12.5 # in V\n", + "V_UT = (R2/(R1+R2))*V_sat # in V\n", + "print \"Upper threshold voltage = %0.1f V\" %V_UT \n", + "V_LT = (R2/(R1+R2))*(-V_sat) # in V\n", + "print \"Lower threshold voltage = %0.1f V\" %V_LT \n", + "V_HV = (R2/(R1+R2))*(2*V_sat) # in V\n", + "print \"The hysteresis voltage = %0.f V\" %V_HV" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper threshold voltage = 2.5 V\n", + "Lower threshold voltage = -2.5 V\n", + "The hysteresis voltage = 5 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 : Page No - 409\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "R1 = 86 # in k ohm\n", + "V_sat = 15 # in V\n", + "R2 = 100 # in k ohm\n", + "V_UT = (R1/(R1+R2))*V_sat # in V\n", + "print \"The value of V_UT = %0.2f V\" %V_UT \n", + "V_LT = (R1/(R1+R2))*(-V_sat) # in V\n", + "print \"The value of V_LT = %0.2f V\" %V_LT \n", + "R_F = 100 # in k ohm\n", + "R_F= R_F*10**3 # in ohm\n", + "C = 0.1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f_o = 1/(2*R_F*C*log( (V_sat-V_LT)/(V_sat-V_UT) )) # in Hz\n", + "print \"Frequency of oscillation = %0.f Hz\" %f_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_UT = 6.94 V\n", + "The value of V_LT = -6.94 V\n", + "Frequency of oscillation = 50 Hz\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 : Page No - 421\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "del_Vin = 5 # in V\n", + "FRR = 80 # in dB\n", + "# Formula FRR= 20*log10(del_Vin/del_Vout)\n", + "del_Vout=del_Vin/(10**(FRR/20)) # in V\n", + "print \"Change in output voltage = %0.1f mV\" %(del_Vout*10**3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in output voltage = 0.5 mV\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb new file mode 100644 index 00000000..bd78b4da --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_12.ipynb @@ -0,0 +1,428 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 12 - D/A and A/D Converters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 : Page No - 444\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n = 8 \n", + "Resolution = 2**n \n", + "print \"Part (ii) : The resolution = %0.f\" %Resolution \n", + "print \"That is, the output voltage can have\",int(Resolution),\"different values including zero\"\n", + "V_OFS = 2.55 # in V\n", + "Resolution= V_OFS/(2**n - 1)*10**3 \n", + "print \"\\nPart (i) : The resolution =\",int(round(Resolution)),\" mV/1LSB\"\n", + "print \"That is, an input change of 1 LSB causes the output to change by \",round(Resolution),\" mV\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (ii) : The resolution = 256\n", + "That is, the output voltage can have 256 different values including zero\n", + "\n", + "Part (i) : The resolution = 10 mV/1LSB\n", + "That is, an input change of 1 LSB causes the output to change by 10.0 mV\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 : Page No - 444\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n = 4 \n", + "V_OFS = 15 # in V\n", + "digital_input = '0110' # in binary\n", + "D= int(digital_input , 2) \n", + "Resolution = V_OFS/((2**n)-1) # in V/LSB\n", + "V_out = Resolution*D # in V\n", + "print \"Final output voltage = %0.f V\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final output voltage = 6 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 : Page No - 445\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n = 8 \n", + "Resolution = 20 # in mV/LSB\n", + "digital_input= '10000000' # in binary\n", + "D= int(digital_input , 2) # in decimal\n", + "Resolution=Resolution*10**-3 # in V/LSB\n", + "V_OFS = Resolution * ((2**n)-1) # in V\n", + "print \"The value of V_OFS = %0.1f V\" %V_OFS \n", + "V_out = Resolution*D # in V\n", + "print \"The value of V_out = %0.2f V\" %V_out " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_OFS = 5.1 V\n", + "The value of V_out = 2.56 V\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 : Page No - 445\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "n = 4 \n", + "V_OFS = 5 # in V\n", + "digital_input= '1000' # in binary\n", + "D= int(digital_input , 2) # in decimal\n", + "Resolution = V_OFS/((2**n)-1) \n", + "V_out = Resolution * D # in V\n", + "print \"When input is 1000 then, the output = %0.4f V\" %V_out \n", + "# When\n", + "digital_input= '1111' # in binary\n", + "D= int(digital_input , 2) # in decimal\n", + "V_out= Resolution * D # in V\n", + "print \"When input is 1111 then , the output =%0.f V\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When input is 1000 then, the output = 2.6667 V\n", + "When input is 1111 then , the output =5 V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 : Page No - 445\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=12 \n", + "digital_input= '010101101101' # in binary\n", + "D= int(digital_input , 2) # in decimal\n", + "step_size= 8 # in mV\n", + "step_size=step_size*10**-3 # in V\n", + "VoFS= step_size*(2**n-1) # in V\n", + "print \"The full scale output voltage = %0.2f V\" %VoFS\n", + "Per_resolution= step_size/VoFS*100 # in %\n", + "print \"Percentage resolution is = %0.5f\" %Per_resolution\n", + "Vout= step_size*D # in V\n", + "print \"The output voltage in V %0.3f\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The full scale output voltage = 32.76 V\n", + "Percentage resolution is = 0.02442\n", + "The output voltage in V 11.112\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 : Page No - 450\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_R = 10 # in V\n", + "n = 4 \n", + "Resolution = 0.5 # in V\n", + "R_F = 10 # in k ohm\n", + "R = (1/2**n)*(V_R/Resolution)*R_F # in k ohm\n", + "print \"The value of resistor = %0.1f k\u03a9\" %R " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of resistor = 12.5 k\u03a9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 : Page No - 456\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_i = 5.1 # in V\n", + "n = 8 \n", + "Re = 2**n \n", + "Resolution = V_i/(2**n-1) # in V/LSB\n", + "print \"The Resolution = %0.f mV/LSB\" %(Resolution*10**3) \n", + "\n", + "# When\n", + "V_i = 1.28 # in V\n", + "D = int(round(V_i/Resolution) )\n", + "D_in_binary= bin(D) # in binary\n", + "print \"The digital output = \",D_in_binary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Resolution = 20 mV/LSB\n", + "The digital output = 0b1000000\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 : Page No - 457\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_i = 4.095 #input voltage in V\n", + "n = 12 \n", + "Q_E = V_i/( ((2**n)-1)*2 ) # in V\n", + "Q_E = Q_E * 10**3 # in mV\n", + "print \"The quantizing error = %0.1f mV\" %Q_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quantizing error = 0.5 mV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 : Page No - 460\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "print \"Part (i)\"\n", + "V_i = 100 # in mV\n", + "V_R = 100 # in mV\n", + "t1 = 83.33 # in ms\n", + "t2 = (V_i/V_R)*t1 # in ms\n", + "print \"The value of t2 = %0.2f ms\" %t2 \n", + "print \"Part (ii)\"\n", + "Vi = 200 # in mV\n", + "t_2 = (Vi/V_R)*t1 # in ms\n", + "print \"The value of t_2 = %0.1f ms\" %t_2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i)\n", + "The value of t2 = 83.33 ms\n", + "Part (ii)\n", + "The value of t_2 = 166.7 ms\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 : Page No - 460\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C_F = 12 #clock frequency in kHz\n", + "C_F = C_F * 10**3 # in Hz\n", + "V_i = 100 # in mV\n", + "V_R = 100 # in mV\n", + "t1 = 83.33*10**-3 # in sec\n", + "D = C_F * t1*(V_i/V_R) # in counts\n", + "print \"The Digital output is : \",int(round(D,1)),\" counts\" \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Digital output is : 1000 counts\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12 : Page No - 463\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "n = 8 \n", + "T_C = 9 #in \u00b5sec\n", + "T_C = T_C * 10**-6 # in sec\n", + "f_max = 1/(2*pi*T_C*(2**n)) # in Hz\n", + "print \"Maximum frequency = %0.2f Hz\" %f_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency = 69.08 Hz\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb new file mode 100644 index 00000000..a51e7673 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_13.ipynb @@ -0,0 +1,787 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 13 - Integrated Circuit Timer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 : Page No - 496\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.01 # in \u00b5F\n", + "C = C *10**-6 # in F\n", + "R_A = 2 # in k ohm\n", + "R_A = R_A * 10**3 # in ohm\n", + "R_B = 100 # in k ohm\n", + "R_B = R_B * 10**3 # in ohm\n", + "T_HIGH = 0.693*(R_A+R_B)*C # in s\n", + "T_HIGH = T_HIGH # in sec\n", + "T_LOW = 0.693*R_B*C # in s\n", + "T_LOW = T_LOW # in sec\n", + "T = T_HIGH + T_LOW # in sec\n", + "f = 1/T # in Hz\n", + "print \"The value of frequency = %0.1f Hz\" %f \n", + "D = (T_HIGH/T)*100 # in %\n", + "print \"Duty cycle = %0.1f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of frequency = 714.4 Hz\n", + "Duty cycle = 50.5 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 : Page No - 497\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R_A = 4.7 # in k ohm\n", + "R_A = R_A * 10**3 # in ohm\n", + "R_B = 1 # in k ohm\n", + "R_B = R_B * 10**3 # in ohm\n", + "T_on = 0.693*(R_A+R_B)*C # in s\n", + "T_on = T_on # in sec\n", + "print \"Positive pulse width = %0.2f ms\" %(T_on * 10**3) \n", + "T_off = 0.693*R_B*C # in s\n", + "T_off = T_off # in ms\n", + "print \"Negative pulse width = %0.3f ms\" %(T_off * 10**3) \n", + "f = 1.4/((R_A+2*R_B)*C) # in Hz\n", + "print \"Free running frequency = %0.2f Hz\" %f \n", + "D = ((R_A+R_B)/(R_A+(2*R_B)))*100 # in %\n", + "print \"The duty cycle = %0.f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Positive pulse width = 3.95 ms\n", + "Negative pulse width = 0.693 ms\n", + "Free running frequency = 208.96 Hz\n", + "The duty cycle = 85 %\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 : Page No - 497\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f = 1 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "R_A = 1.44/(2*f*C) # in ohm\n", + "R_A = R_A * 10**-3 # in k ohm\n", + "R_B= R_A # in kohm\n", + "print \"The value of both the resistors required = %0.f k\u03a9 (standard value 68 kohm)\" %R_A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of both the resistors required = 72 k\u03a9 (standard value 68 kohm)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 : Page No - 497\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 700 # in Hz\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "a = 1.44 \n", + "R_A = a/(2*f*C) # in ohm\n", + "R_A = R_A * 10**-3 # in k ohm\n", + "R_B =R_A # in k ohm\n", + "print \"The the value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "print \"The value of both the resistors = %0.f k\u03a9\" %R_A \n", + "print \"(Standard value of resistor is 100 k\u03a9)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The the value of C = 0.01 \u00b5F\n", + "The value of both the resistors = 103 k\u03a9\n", + "(Standard value of resistor is 100 k\u03a9)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 : Page No - 498\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.01 # in \u00b5F\n", + "C = C *10**-6 # in F\n", + "R_A = 2 # in k ohm\n", + "R_A = R_A * 10**3 # in ohm\n", + "R_B = 100 # in k ohm\n", + "R_B = R_B * 10**3 # in ohm\n", + "T_HIGH = 0.693*(R_A+R_B)*C # in s\n", + "T_HIGH = T_HIGH # in sec\n", + "T_LOW = 0.693*R_B*C # in s\n", + "T_LOW = T_LOW # in sec\n", + "T = T_HIGH + T_LOW # in sec\n", + "f = 1/T # in Hz\n", + "print \"The value fo frequency = %0.1f Hz\" %f \n", + "D = (T_HIGH/T)*100 # in %\n", + "print \"Duty cycle = %0.1f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value fo frequency = 714.4 Hz\n", + "Duty cycle = 50.5 %\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 : Page No - 498\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R_A = 4.7 # in k ohm\n", + "R_A = R_A * 10**3 # in ohm\n", + "R_B = 1 # in k ohm\n", + "R_B = R_B * 10**3 # in ohm\n", + "T_on = 0.693*(R_A+R_B)*C # in s\n", + "T_on = T_on # in sec\n", + "print \"Positive pulse width = %0.2f ms\" %(T_on * 10**3) \n", + "T_off = 0.693*R_B*C # in s\n", + "T_off = T_off # in ms\n", + "print \"Negative pulse width = %0.3f ms\" %(T_off * 10**3) \n", + "f = 1.4/((R_A+2*R_B)*C) # in Hz\n", + "print \"Free running frequency = %0.2f Hz\" %(f) \n", + "D = ((R_A+R_B)/(R_A+(2*R_B)))*100 # in %\n", + "print \"The duty cycle = %0.f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Positive pulse width = 3.95 ms\n", + "Negative pulse width = 0.693 ms\n", + "Free running frequency = 208.96 Hz\n", + "The duty cycle = 85 %\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 : Page No - 498\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f = 1 # in kHz\n", + "f = f* 10**3 # in Hz\n", + "a = 1.44 \n", + "R_A = a/(2*f*C) # in ohm\n", + "R_A = R_A * 10**-3 # in k ohm\n", + "R_B = R_A # in k ohm\n", + "print \"The value of both the resistors required = %0.f k\u03a9 (standard value 68 kohm)\" %R_A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of both the resistors required = 72 k\u03a9 (standard value 68 kohm)\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 : Page No - 499\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 700 # in Hz\n", + "C = 0.01 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "a = 1.44 \n", + "R_A = a/(2*f*C) # in ohm\n", + "R_A = R_A * 10**-3 # in k ohm\n", + "R_B =R_A # in k ohm\n", + "print \"The the value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "print \"The value of both the resistors = %0.f k\u03a9\" %R_A \n", + "print \"(Standard value of resistor is 100 k\u03a9)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The the value of C = 0.01 \u00b5F\n", + "The value of both the resistors = 103 k\u03a9\n", + "(Standard value of resistor is 100 k\u03a9)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9 : Page No - 499\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 800 # in Hz\n", + "C = 0.01 # in \u00b5F\n", + "C =C * 10**-6 # in F\n", + "R_A = 1.44/(5*f*C) # in ohm\n", + "R_A = R_A * 10**-3 # in k ohm\n", + "print \"The value of R_A = %0.f k\u03a9\" %R_A \n", + "R_B = 2*R_A # in k ohm\n", + "print \"The value of R_B = %0.f k\u03a9\" %R_B " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 36 k\u03a9\n", + "The value of R_B = 72 k\u03a9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.10 : Page No - 501\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 10 # in \u00b5F\n", + "C = C*10**-6 # in F\n", + "T_ON = 5 # in sec\n", + "R = T_ON/(1.1*C) # in ohm\n", + "print \"The resistor value = %0.1f ohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistor value = 454545.5 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 : Page No - 501\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 10 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "T_off = 1 # in sec\n", + "#Formula T_off= 0.693*R2*C\n", + "R2 = T_off/(0.693*C) # in ohm\n", + "print \"The value of R2 = %0.f \u03a9\" %R2 \n", + "T_on = 3 # in sec\n", + "# Formula T_on= 0.693*(R1+R2)*C\n", + "R1 =T_on/(C*0.693)-R2 # in ohm\n", + "print \"The value of R1 = %0.f \u03a9\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R2 = 144300 \u03a9\n", + "The value of R1 = 288600 \u03a9\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 : Page No - 502\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "C = 0.22 # in \u00b5F\n", + "C=C*10**-6 # in F\n", + "T_on = 10 # in ms\n", + "T_on = T_on * 10**-3 # in s\n", + "V_CC = 15 # in V\n", + "V_BE = 0.7 # in V\n", + "V_EC = 0.2 # in V\n", + "V_LED= 1.4 # in V\n", + "I_LED= 20*10**-3 # in A\n", + "R = T_on/(C*1.1) # in ohm\n", + "R = R *10**-3 # in k ohm\n", + "print \"Values for first circuit : \"\n", + "print \"The value of R = %0.1f k\u03a9\" %R \n", + "V_o = V_CC-(2*V_BE) - V_EC # in V\n", + "print \"The output voltage = %0.1f V\" %V_o \n", + "R_LED = (V_o - V_LED)/(I_LED) # in ohm \n", + "print \"The value of R_LED = %0.f \u03a9\" %R_LED\n", + "# Part (ii)\n", + "f= 1*10**3 # in Hz\n", + "C=0.01*10**-6 # in F\n", + "D= 95/100 # duty cycle\n", + "# Formula f= 1.44/((R1+2*R2)*C)\n", + "# R1+2*R2= 1.44/(f*C) (i)\n", + "# D= (R1+R2)/(R1+2*R2) or\n", + "# R2= (1-D)/(2*D-1)*R1 (ii)\n", + "# From eq (i) and (ii)\n", + "R1= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm\n", + "R2= (1-D)/(2*D-1)*R1 # in ohm\n", + "print \"\\nValues for second circuit : \"\n", + "print \"The value of R1 = %0.1f k\u03a9\" %(R1*10**-3) \n", + "print \"The value of R2 = %0.2f k\u03a9\" %(R2*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Values for first circuit : \n", + "The value of R = 41.3 k\u03a9\n", + "The output voltage = 13.4 V\n", + "The value of R_LED = 600 \u03a9\n", + "\n", + "Values for second circuit : \n", + "The value of R1 = 129.6 k\u03a9\n", + "The value of R2 = 7.20 k\u03a9\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 : Page No - 503\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T = 5 # in msec\n", + "T = T * 10**-3 # in sec\n", + "C = 0.1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R = T/(C*1.1) # in ohm\n", + "R = R * 10**-3 # in k ohm\n", + "print \"The resistor = %0.2f k\u03a9\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistor = 45.45 k\u03a9\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.14 : Page No - 503\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 1 # in kHz\n", + "f = f * 10**3 # in Hz\n", + "T = 1/f # in s\n", + "T = T * 10**3 # in msec\n", + "T_d = T/2 # in msec\n", + "T_d = T_d * 10**-3 # in sec\n", + "C = 0.1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "R2 = T_d/(0.69*C) # in ohm\n", + "R2 = R2 * 10**-3 # in k ohm\n", + "print \"The value of C = %0.1f \u00b5F\" %(C*10**6)\n", + "print \"The value of R2 = %0.2f k\u03a9\" %R2 \n", + "print \"The value of R1 will be 100 \u03a9 +10 k\u03a9 pot\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 0.1 \u00b5F\n", + "The value of R2 = 7.25 k\u03a9\n", + "The value of R1 will be 100 \u03a9 +10 k\u03a9 pot\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.15 : Page No - 504\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 800 # in Hz\n", + "D = 0.6 \n", + "C = 0.1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "# Formula f= 1.44/((R_A+2*R_B)*C)\n", + "# R_A+2*R_B= 1.44/(f*C) (i)\n", + "# D= (R_A+R_B)/(R_A+2*R_B) or\n", + "# R_B= (1-D)/(2*D-1)*R_A (ii)\n", + "# From eq (i) and (ii)\n", + "R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm\n", + "R_B= (1-D)/(2*D-1)*R_A # in ohm\n", + "print \"The value of R_A = %0.1f k\u03a9\" %(R_A*10**-3) \n", + "print \"The value of R_B = %0.1f k\u03a9\" %(R_B*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 3.6 k\u03a9\n", + "The value of R_B = 7.2 k\u03a9\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.16 : Page No - 504\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "f = 700 # in Hz\n", + "D = 0.5 \n", + "C = 0.1 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "# Formula f= 1.44/((R_A+2*R_B)*C)\n", + "# R_A+2*R_B= 1.44/(f*C) (i)\n", + "# D= (R_A+R_B)/(R_A+2*R_B) or\n", + "# R_A+R_B=D*1.44/(f*C)\n", + "# From eq (i) and (ii)\n", + "R_B=round(1.44/(f*C))*(1-D) \n", + "R_A= round(D*1.44/(f*C))-R_B \n", + "#R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm\n", + "#R_B= (1-D)/(2*D-1)*R_A # in ohm\n", + "print \"The value of R_A = %0.f \u03a9\" %round(R_A)\n", + "print \"The value of R_B = %0.3f k\u03a9\" %(R_B*10**-3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 1 \u03a9\n", + "The value of R_B = 10.286 k\u03a9\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.17 : Page No - 507\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R_A = 20 # in k ohm\n", + "R_A = R_A * 10**3 # in ohm\n", + "C = 0.1 # in \u00b5F\n", + "C = C*10**-6 # in F\n", + "pulse_width = 1.1*R_A*C # in s\n", + "print \"The output pulse width = %0.f ms\" %(pulse_width*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output pulse width = 2 ms\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.18 : Page No - 507\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "T= symbols('T')\n", + "#Given data\n", + "n=4 \n", + "# t_p= X*T, where\n", + "X= (0.2+(n-1)) # (assumed)\n", + "t_p= X*T\n", + "print \"The relation between t_p and T is :\"\n", + "print \"t_p = \",t_p\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relation between t_p and T is :\n", + "t_p = 3.2*T\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.19 : Page No - 507\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C = 0.02 # in \u00b5F\n", + "C = C * 10**-6 # in F\n", + "f=2*10**3 #frequency in Hz\n", + "T = 1/f # in sec\n", + "n = 5 \n", + "t_p = (0.2+(n-1))*T # in sec\n", + "R_A = t_p/(1.1*C) # in ohm\n", + "print \"The value of R_A = %0.2f k\u03a9 (standard value 100 kohm)\" %(R_A*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 95.45 k\u03a9 (standard value 100 kohm)\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb new file mode 100644 index 00000000..1b036c13 --- /dev/null +++ b/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_14.ipynb @@ -0,0 +1,103 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter : 14 - Phase-Locked Loops (PLL)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 : Page No - 525\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt, pi\n", + "#Given data\n", + "R_T = 10 # in k ohm\n", + "R_T = R_T * 10**3 # in ohm\n", + "C_T = 0.005 # in \u00b5F\n", + "C_T = C_T * 10**-6 # in F\n", + "C=10*10**-6 # in F\n", + "f_out = 0.25/(R_T*C_T) # in Hz\n", + "print \"Free Running frequency =\",int(f_out*10**-3),\"kHz\" \n", + "# Part (ii)\n", + "V=20 # in V\n", + "f_L= 8*f_out/V # in Hz\n", + "print \"Lock range in kHz = \u00b1\",int(f_L*10**-3),\"kHz\"\n", + "# Part (iii)\n", + "f_C= sqrt(f_L/(2*pi*3.6*10**3*C)) # in Hz\n", + "print \"Capture range = \u00b1\",int(f_C),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Free Running frequency = 5 kHz\n", + "Lock range in kHz = \u00b1 2 kHz\n", + "Capture range = \u00b1 94 Hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 : Page No - 532\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "f_out_max = 200 # in kHz\n", + "f_out_min = 4 # in Hz\n", + "f_CLK = 2.2*f_out_max # in kHz\n", + "print \"Frequency of reference oscillation = %0.f kHz\" %f_CLK \n", + "f_CLK= f_CLK*10**3 # in Hz\n", + "# Formula f_out_min= f_CLK/2**n\n", + "n=log(f_CLK/f_out_min)/log(2) \n", + "print \"The number of bits required in the phase accumulator = %0.f\" %round(n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of reference oscillation = 440 kHz\n", + "The number of bits required in the phase accumulator = 17\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png new file mode 100644 index 00000000..cb53c9e2 Binary files /dev/null and b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap1.png differ diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png new file mode 100644 index 00000000..f62bb213 Binary files /dev/null and b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap4.png differ diff --git a/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png new file mode 100644 index 00000000..4f12027a Binary files /dev/null and b/Integrated_Circuits_by_Dr._Sanjay_Sharma/screenshots/snap5.png differ diff --git a/Internal_Combustion_Engine_/screenshots/ch1.png b/Internal_Combustion_Engine_/screenshots/ch1.png new file mode 100755 index 00000000..fceb0655 Binary files /dev/null and b/Internal_Combustion_Engine_/screenshots/ch1.png differ diff --git a/Internal_Combustion_Engine_/screenshots/ch12.png b/Internal_Combustion_Engine_/screenshots/ch12.png new file mode 100755 index 00000000..8af0cf9a Binary files /dev/null and b/Internal_Combustion_Engine_/screenshots/ch12.png differ diff --git a/Internal_Combustion_Engine_/screenshots/ch2.png b/Internal_Combustion_Engine_/screenshots/ch2.png new file mode 100755 index 00000000..7c33d38a Binary files /dev/null and b/Internal_Combustion_Engine_/screenshots/ch2.png differ diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch1.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch1.ipynb new file mode 100755 index 00000000..e4371040 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch1.ipynb @@ -0,0 +1,377 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3303c10fbdf0badf34a5e53239631d65156a6198f60e9dc97e75e274501b7ad0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 4. #Number of cylinders\n", + "d = 68./10 #Bore in cm\n", + "l = 75./10 #Stroke in cm\n", + "r = 8. #Compression ratio\n", + "\n", + "#Solution:\n", + "V_s = (math.pi/4)*d**2*l #Swept volume of one cylinder in cm**3\n", + "cubic_capacity = n*V_s #Cubic capacity in cm**3\n", + "#Since, r = (V_c + V_s)/V_c\n", + "V_c = V_s/(r-1) #Clearance volume in cm**3\n", + "\n", + "#Results:\n", + "print \" The cubic capacity of the engine = %.1f cm**3\"%(cubic_capacity)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cubic capacity of the engine = 1089.5 cm**3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given:\n", + "ip = 10. #Indicated power in kW\n", + "eta_m = 80. #Mechanical efficiency in percent\n", + "\n", + "#Solution:\n", + "#Since, eta_m = bp/ip\n", + "bp = (eta_m/100)*ip #Brake power in kW\n", + "fp = ip-bp #Friction power in kW\n", + "\n", + "#Results:\n", + "print \" The brake power delivered, bp = %d kW\"%(bp)\n", + "print \" The friction power, fp = %d kW\"%(fp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The brake power delivered, bp = 8 kW\n", + " The friction power, fp = 2 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "bp = 100. #Brake power at full load in kW\n", + "fp = 25. #Frictional power in kW (printing error)\n", + "\n", + "#Solution:\n", + "eta_m = bp/(bp+fp) #Mechanical efficiency at full load\n", + "#(a)At half load\n", + "bp = bp/2 #Brake power at half load in kW\n", + "eta_m1 = bp/(bp+fp) #Mechanical efficiency at half load\n", + "#(b)At quarter load\n", + "bp = bp/2 #Brake power at quarter load in kW\n", + "eta_m2 = bp/(bp+fp) #Mechanical efficiency at quarter load\n", + "\n", + "#Results:\n", + "print \" The mechanical efficiency at full load, eta_m = %d percent\"%(eta_m*100)\n", + "print \" The mechanical efficiency, \\\n", + "\\na)At half load, eta_m = %.1f percent \\\n", + "\\nb)At quarter load, eta_m = %d percent\"%(eta_m1*100,eta_m2*100)\n", + "\n", + "#Data in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mechanical efficiency at full load, eta_m = 80 percent\n", + " The mechanical efficiency, \n", + "a)At half load, eta_m = 66.7 percent \n", + "b)At quarter load, eta_m = 50 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Calculations on four stroke petrol engine\n", + "#Given:\n", + "bp = 35. #Brake power in kW\n", + "eta_m = 80. #Mechanical efficiency in percent\n", + "bsfc = 0.4 #Brake specific fuel consumption in kg/kWh\n", + "A_F = 14./1 #Air-fuel ratio\n", + "CV = 43000. #Calorific value in kJ/kg\n", + "\n", + "#Solution:\n", + "#(a)\n", + "ip = bp*100/eta_m #Indicated power in kW\n", + "#(b)\n", + "fp = ip-bp #Frictional power in kW\n", + "#(c)\n", + "#Since, 1 kWh = 3600 kJ\n", + "eta_bt = 1/(bsfc*CV/3600) #Brake thermal efficiency\n", + "#(d)\n", + "eta_it = eta_bt/eta_m*100 #Indicated thermal efficiency\n", + "#(e)\n", + "m_f = bsfc*bp #Fuel consumption in kg/hr\n", + "#(f)\n", + "m_a = A_F*m_f #Air consumption in kg/hr\n", + "\n", + "\n", + "#Results:\n", + "print \" a)The indicated power, ip = %.2f kW \\\n", + "\\nb)The friction power, fp = %.2f kW\"%(ip,fp)\n", + "print \" c)The brake thermal efficiency, eta_bt = %.1f percent \\\n", + "\\nd)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_bt*100,eta_it*100)\n", + "print \" e)The fuel consumption per hour, m_f = %.1f kg/hr \\\n", + "\\nf)The air consumption per hour, m_a = %d kg/hr\"%(m_f,m_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated power, ip = 43.75 kW \n", + "b)The friction power, fp = 8.75 kW\n", + " c)The brake thermal efficiency, eta_bt = 20.9 percent \n", + "d)The indicated thermal efficiency, eta_it = 26.2 percent\n", + " e)The fuel consumption per hour, m_f = 14.0 kg/hr \n", + "f)The air consumption per hour, m_a = 196 kg/hr\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "F_A = 0.07/1 #Fuel-air ratio\n", + "bp = 75. #Brake power in kW\n", + "eta_bt = 20. #Brake thermal efficiency in percent\n", + "rho_a = 1.2 #Density of air in kg/m**3\n", + "rho_f = 4*rho_a #Density of fuel vapour in kg/m**3\n", + "CV = 43700. #Calorific value of fuel in kJ/kg\n", + " \n", + "#Solution:\n", + "m_f = bp*3600/(eta_bt*CV/100) #Fuel consumption in kg/hr\n", + "m_a = m_f/F_A #Air consumption in kg/hr\n", + "V_a = m_a/rho_a #Volume of air in m**3/hr\n", + "V_f = m_f/rho_f #Volume of fuel in m**3/hr\n", + "V_mixture = V_f+V_a #Mixture volume in m**3/hr\n", + " \n", + "#Results:\n", + "print \" The air consumption, m_a = %.1f kg/hr\"%(m_a)\n", + "print \" The volume of air required, V_a = %.1f m**3/hr\"%(V_a)\n", + "print \" The volume of mixture required = %.1f m**3/hr\"%(V_mixture) #printing error)\n", + " #Answer in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air consumption, m_a = 441.3 kg/hr\n", + " The volume of air required, V_a = 367.8 m**3/hr\n", + " The volume of mixture required = 374.2 m**3/hr\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "bp = 5. #Brake power in kW\n", + "eta_it = 30. #Indicated thermal efficiency in percent\n", + "eta_m = 75. #Mechanical efficiency in percent (printing error)\n", + "\n", + "#Solution:\n", + "ip = bp*100/eta_m #Indicated power in kW\n", + "CV = 42000. #Calorific value of diesel(fuel) in kJ/kg\n", + "m_f = ip*3600/(eta_it*CV/100) #Fuel consumption in kg/hr\n", + "#Density of diesel(fuel) = 0.87 kg/l\n", + "rho_f = 0.87 #Density of fuel in kg/l\n", + "V_f = m_f/rho_f #Fuel consumption in l/hr\n", + "isfc = m_f/ip #Indicated specific fuel consumption in kg/kWh\n", + "bsfc = m_f/bp #Brake specific fuel consumption in kg/kWh\n", + "\n", + "#Results:\n", + "print \" The fuel consumption of engine, m_f in, \\\n", + "\\na)kg/hr = %.3f kg/hr \\\n", + "\\nb)litres/hr = %.2f l/hr\"%(m_f,V_f)\n", + "print \" c)Indicated specific fuel consumption, isfc = %.3f kg/kWh\"%(isfc)\n", + "print \" d)Brake specific fuel consumption, bsfc = %.3f kg/kWh\"%(bsfc)\n", + "#Data in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fuel consumption of engine, m_f in, \n", + "a)kg/hr = 1.905 kg/hr \n", + "b)litres/hr = 2.19 l/hr\n", + " c)Indicated specific fuel consumption, isfc = 0.286 kg/kWh\n", + " d)Brake specific fuel consumption, bsfc = 0.381 kg/kWh\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "bp = 5000. #Brake power in kW\n", + "fp = 1000. #Friction power in kW\n", + "m_f = 2300. #Fuel consumption in kg/hr\n", + "A_F = 20./1 #Air-fuel ratio\n", + "CV = 42000. #Calorific value of fuel in kJ/kg\n", + "\n", + "#Solution:\n", + "#(a)\n", + "ip = bp+fp #Indicated power in kW\n", + "#(b)\n", + "eta_m = bp/ip #Mechanical efficiency\n", + "#(c)\n", + "m_a = A_F*m_f #Air consumption in kg/hr\n", + "#(d)\n", + "eta_it = ip*3600/(m_f*CV) #Indicated thermal efficiency\n", + "#(e)\n", + "eta_bt = eta_it*eta_m #Brake thermal efficiency\n", + "\n", + "#Results:\n", + "print \" a)The indicated power, ip = %d kW\"%(ip)\n", + "print \" b)The mechanical efficiency, eta_m = %d percent\"%(eta_m*100)\n", + "print \" c)The air consumption, m_a = %d kg/hr\"%(m_a)\n", + "print \" d)The indicated thermal efficiency, eta_it = %.1f percent \\\n", + "\\ne)The brake thermal efficiency, eta_bt = %.1f percent\"%(eta_it*100,eta_bt*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated power, ip = 6000 kW\n", + " b)The mechanical efficiency, eta_m = 83 percent\n", + " c)The air consumption, m_a = 46000 kg/hr\n", + " d)The indicated thermal efficiency, eta_it = 22.4 percent \n", + "e)The brake thermal efficiency, eta_bt = 18.6 percent\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch10.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch10.ipynb new file mode 100755 index 00000000..9f173b75 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch10.ipynb @@ -0,0 +1,79 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:75a09c4d71a14a2b78ad1c67800cd323aa699506b5a606581aba636b14a84807" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Air Capacity of Four Stroke Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "V_d = 700. #Displaced volume per cylinder in cm**3\n", + "bp = 78. #Brake power in kW\n", + "N = 3200. #Angular speed of engine in rpm\n", + "m_f = 27. #Petrol consumption in kg/hr\n", + "CV = 44. #Calorific value in MJ/kg\n", + "\n", + "#Solution:\n", + "#(1)\n", + "A_F = 12. #Air-fuel ratio\n", + "P1 = 0.9\n", + "T1 = 32+273 #Intake air pressure and temperature in bar and K\n", + "m_a = A_F*m_f #Air consumption in kg/hr\n", + "R = 287. #Specific gas consmath.tant in J/kgK\n", + "rho_a = P1*10**5/(R*T1) #Density of air in kg/m**3\n", + "eta_vol = m_a/(60*rho_a*V_d*n*10**-6*N/2) #Volumetric efficiency\n", + " #(2)\n", + "eta_bt = bp*3600/(m_f*CV*1000) #Brake thermal efficiency\n", + "#(3)\n", + "T = bp*60/(2*math.pi*N) #Brake torque in kNm\n", + "\n", + "#Results:\n", + "print \" 1)The volumetric efficiency, eta_vol = %.2f percent\"%(eta_vol*100)\n", + "print \" 2)The brake thermal efficiency, eta_bt = %.2f percent\"%(eta_bt*100)\n", + "print \" 3)The brake torque, T = %.0f Nm\"%(T*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " 1)The volumetric efficiency, eta_vol = 78.16 percent\n", + " 2)The brake thermal efficiency, eta_bt = 23.64 percent\n", + " 3)The brake torque, T = 233 Nm\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch11.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch11.ipynb new file mode 100755 index 00000000..3fd9c030 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch11.ipynb @@ -0,0 +1,555 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1e736faf6050e1bfcc5d54d7f01b40afcb17bbd31514bedabe7d5d856d6eb605" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Carburetion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + " \n", + "#Given:\n", + "m_a = 5. #Mass of air in kg/min\n", + "P1 = 1.013 #Pressure of air in bar\n", + "T1 = 27.+273 #Temperature of air in K\n", + "C1 = 0\n", + "C2 = 90. #Flow velocity at opening and throat in m/s\n", + "Cv = 0.8 #Velocity coefficient\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + " \n", + "#Solution:\n", + "#Refer fig 11.32\n", + "#Defining, y as a function of P2\n", + "#This function is the difference of C2 actual and C2 given \n", + "def f(P2):\n", + " C2_act = 0.8*math.sqrt(2*cp*1000*T1*(1-(P2/P1)**((g-1)/g)))\n", + " return C2_act-C2\n", + "\n", + "#The function f is solve for zero to get the value of P2\n", + "P2 = fsolve(f,1)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "rho1 = P1*100/(R*T1) #Mass density at opening in kg/m**3\n", + "rho2 = rho1*(P2/P1)**(1/g) #Mass density at throat in kg/m**3\n", + "A2 = m_a/(60*rho2*C2) #Cross section area at throat in m**2\n", + "d2 = math.sqrt(4*A2/math.pi) #Diameter of cross section in m\n", + "\n", + "#Results:\n", + "print \" The throat diameter of the choke, d2 = %.2f cm\"%(d2*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The throat diameter of the choke, d2 = 3.25 cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + " \n", + "#Given:\n", + "m_a = 6.\n", + "m_f = .45 #Mass of air and fuel in kg/min\n", + "rho_f = 740. #Density of fuel in kg/m**3\n", + "P1 = 1.013 #Pressure of air in bar\n", + "T1 = 27.+273 #Temperature of air in K\n", + "C2 = 92. #Flow velocity at throat in m/s\n", + "Cv = 0.8 #Velocity coefficient\n", + "Cd_f = 0.60 #Coefficient of discharge of fuel\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + " \n", + "#Solution:\n", + "#Defining, y as a function of P2\n", + "#This function is the difference of C2 actual and C2 given \n", + "def f(P2):\n", + " C2_act = Cv*math.sqrt(2*cp*10**3*T1*(1-(P2/P1)**((g-1)/g)))\n", + " return C2_act-C2\n", + "\n", + "#The function f is solve for zero to get the value of P2\n", + "P2 = fsolve(f,1)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "rho1 = P1*100/(R*T1) #Mass density at opening in kg/m**3\n", + "rho2 = rho1*(P2/P1)**(1/g) #Mass density at throat in kg/m**3\n", + "A2 = m_a/(60*rho2*C2) #Cross section area at throat in m**2\n", + "d2 = math.sqrt(4*A2/math.pi) #Diameter of cross section in m\n", + "deltaP_v = P1-P2 #Pressure drop at venturi in bar\n", + "deltaP_f = 0.75*deltaP_v #Given, Pressure drop at fuel metering orifice in bar\n", + "A_f = m_f/(60*Cd_f*math.sqrt(2*rho_f*deltaP_f*10**5)) #Area of cross section of fuel nozzle in m**2\n", + "d_f = math.sqrt(4*A_f/math.pi) #Diameter of cross section of fuel nozzle in m\n", + " \n", + "#Results:\n", + "print \" The throat diameter of the choke, d2 = %.3f cm\"%(d2*100)\n", + "print \" The orifice diameter, d_f = %.2f mm\"%(d_f*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The throat diameter of the choke, d2 = 3.526 cm\n", + " The orifice diameter, d_f = 2.34 mm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given:\n", + "d = 10.\n", + "l = 12. #Bore and stroke in cm\n", + "n = 4. #Number of cylinders\n", + "N = 2000. #Speed of engine in rpm\n", + "d2 = 3. #Diameter of throat in cm\n", + "eta_vol = 70. #Volumetric efficiency\n", + "rho_a = 1.2 #Density of air in kg/m**3\n", + "Cd_a = 0.8 #Coefficient of discharge for air\n", + "\n", + "#Solution:\n", + "V_s = (math.pi/4)*d**2*l*n*10**-6 #Swept volume of engine in m**3\n", + "V_act = eta_vol*V_s*N/(2*100*60) #Actual volume sucked in m**3/s\n", + "m_a = V_act*rho_a #Mass of air sucked in kg/s\n", + "deltaP_v = (m_a*4/(Cd_a*math.pi*d2**2*10**-4))**2/(2*rho_a) #Pressure drop at venturi in pascal\n", + "\n", + "#Results:\n", + "print \" The suction at the throat = %.4f bar\"%(deltaP_v/10**5)\n", + "#Answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The suction at the throat = 0.0363 bar\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "m_f = 7.5 #Mass of fuel in kg/hr\n", + "s = 0.75 #Specific gravity of the fuel\n", + "T1 = 25.+273 #Temperature of air in K\n", + "A_F = 15. #Air fuel ratio\n", + "d = 22. #Diameter of choke tube in mm\n", + "z = 4. #Elevation of the jet in mm\n", + "Cd_a = 0.82\n", + "Cd_f = 0.7 #Coefficient of discharge for air and fuel\n", + "P1 = 1.013 #Pressure of air in bar\n", + "g = 9.81 #Accelaration due to gravity in m/s**2\n", + "\n", + "#Solution:\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "rho_a = P1*100/(R*T1) #Mass density of air in kg/m**3\n", + "rho_f = s*1000 #Mass density of fuel in kg/m**3\n", + "m_a = A_F*m_f/3600 #Mass of air in kg/s\n", + "deltaP_v = (m_a*4/(Cd_a*math.pi*d**2*10**-6))**2/(2*rho_a) #Pressure drop at venturi in pascal\n", + "A_f = m_f/(3600*Cd_f*math.sqrt(2*rho_f*(deltaP_v-z*10**-3*g*rho_f))) #Area of cross section of fuel nozzle in m**2\n", + "d_f = math.sqrt(4*A_f/math.pi) #Diameter of cross section of fuel nozzle in m\n", + "\n", + "#Results:\n", + "print \" The diameter of the fuel jet of a simple carburettor, d_f = %.3f mm\"%(d_f*1000)\n", + "#Answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the fuel jet of a simple carburettor, d_f = 1.228 mm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "from sympy import Symbol,solve\n", + "\n", + "\n", + "#Given:\n", + "V_s = 1489. #Capacity of the engine in cc\n", + "N = 4200. #Speed of the engine in rpm\n", + "eta_v = 70. #Volumetric efficiency\n", + "A_F = 13. #Air fuel ratio\n", + "C2 = 90. #Flow velocity at throat in m/s\n", + "Cd_a = 0.85\n", + "Cd_f = 0.66 #Coefficient of discharge for air and fuel\n", + "s = 0.74 #Specific gravity of the fuel\n", + "z = 6. #Elevation of the jet in mm\n", + "P1 = 1.013 #Pressure of air in bar\n", + "T1 = 27.+273 #Temperature of air in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "\n", + "#Solution:\n", + "V_s = V_s*10**-6 #Swept volume in m**3\n", + "V_act = eta_v*V_s*N/(2*100*60) #Actual volume sucked in m**3/s\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "m_a = P1*10**5*V_act/(R*10**3*T1) #Mass of air sucked in kg/s\n", + "#Defining, y as a function of P2\n", + "#This function is the difference of C2 actual and C2 given \n", + "def f(P2):\n", + " C2_act = math.sqrt(2*cp*10**3*T1*(1-(P2/P1)**((g-1)/g)))\n", + " return C2_act-C2\n", + "\n", + "#The function f is solve for zero to get the value of P2\n", + "P2 = fsolve(f,1)\n", + "V2 = V_act*(P1/P2)**(1/g) #Volume at throat in m**3/s\n", + "A2 = V2/(C2*Cd_a) #Cross section area at throat in m**2\n", + "d2 = Symbol('d2') #Defining the diameter of choke as unknown in m\n", + "d_f = d2/2.5 #Given\n", + "d2 = solve(math.pi/4*(d2**2-d_f**2)-A2)[0] #Diameter of choke in m\n", + "m_f = m_a/A_F #Mass of fuel sucked in kg/s\n", + "A_f = m_f/(Cd_f*math.sqrt(2*s*1000*(P1*10**5-P2*10**5-z*10**-3*9.81*s*1000))) #Area of cross section of fuel nozzle in m**2\n", + "d_f = math.sqrt(4*A_f/math.pi) #Diameter of cross section of fuel nozzle in m\n", + "\n", + "#Results:\n", + "print \" The diameter of the fuel jet of a simple carburettor, D_jet = %.2f mm\"%(d_f*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the fuel jet of a simple carburettor, D_jet = 1.56 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "from sympy import Symbol, solve\n", + "import math \n", + "\n", + "\n", + "#Given:\n", + "V_s = 1710. #Capacity of the engine in cc\n", + "N = 5400. #Speed of the engine in rpm\n", + "eta_vol = 70. #Volumetric efficiency\n", + "n = 2. #Number of carburettor\n", + "A_F = 13. #Air fuel ratio\n", + "C2 = 107. #Flow velocity at throat in m/s\n", + "Cd_a = 0.85\n", + "Cd_f = 0.66 #Coefficient of discharge for air and fuel\n", + "s = 0.75 #Specific gravity of the fuel\n", + "z = 6. #Elevation of the jet in mm\n", + "P1 = 1.013 #Pressure of air in bar\n", + "T1 = 27.+273 #Temperature of air in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "\n", + "#Solution:\n", + "V_s = V_s*10**-6 #Swept volume in m**3\n", + "V_act = eta_vol*V_s*N/(2*100*60) #Actual volume sucked in m**3/s\n", + "V_act = V_act/n #Actual volume of air sucked through each carburettor in m**3/s\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "m_a = P1*10**5*V_act/(R*10**3*T1) #Mass of air sucked in kg/s\n", + "#Defining, y as a function of P2\n", + "#This function is the difference of C2 actual and C2 given\n", + "def f(P2):\n", + " C2_act = math.sqrt(2*cp*10**3*T1*(1-(P2/P1)**((g-1)/g)))\n", + " return C2_act-C2\n", + "\n", + "#The function f is solve for zero to get the value of P2\n", + "P2 = fsolve(f,1)\n", + "V2 = V_act*(P1/P2)**(1/g) #Volume at throat in m**3/s\n", + "A2 = V2/(C2*Cd_a) #Cross section area at throat in m**2\n", + "d2 = Symbol('d2') #Defining the diameter of choke as unknown in m\n", + "d_f = d2/2.5 #Given\n", + "d2 = solve(math.pi/4*(d2**2-d_f**2)-A2)[0] #Diameter of choke in m\n", + "m_f = m_a/A_F #Mass of fuel sucked in kg/s\n", + "A_f = m_f/(Cd_f*math.sqrt(2*s*1000*(P1*10**5-P2*10**5-z*10**-3*9.81*s*1000))) #Area of cross section of fuel nozzle in m**2\n", + "d_f = math.sqrt(4*A_f/math.pi) #Diameter of cross section of fuel nozzle in m\n", + "\n", + "#Results:\n", + "print \" The diameter of the choke tube, D = %.2f cm\"%(d2*100)\n", + "print \" The diameter of the fuel jet of a simple carburettor, D_f = %.2f mm\"%(d_f*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the choke tube, D = -2.17 cm\n", + " The diameter of the fuel jet of a simple carburettor, D_f = 1.23 mm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "ha = 5000. #Altitude in m\n", + "A_F = 14. #Air fuel ratio at sea level\n", + "P1 = 1.013 #Pressure of air in bar at sea level\n", + "T1 = 27.+273 #Temperature of air in K at sea level\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "def f1(h):\n", + " return ts-0.0065*h #Temperature(t in degreeC) as a function of altitude(h in m) \n", + "def f2(P):\n", + " return 19200*math.log10(1.013/P) #Altitude(h in m) as a function of pressure(P in bar)\n", + "\n", + "#Solution:\n", + "ts = T1-273 #Sea level temperature in degreeC\n", + "T2 = f1(ha) #Temperature at altitude(ha = 5000 m) in degreeC\n", + "T2 = T2+273 #in K\n", + "#Defining, y as a function of P\n", + "#This function is the difference of function(f2) and ha given\n", + "def f(P):\n", + " return f2(P)-ha\n", + "\n", + "#The function f is solve for zero to get the value of P2\n", + "P2 = fsolve(f,1)\n", + "rho_a = P2/(R*T2) #Density of air at altitude in kg/m**3\n", + "rho_s = P1/(R*T1) #Density of air at sea level in kg/m**3\n", + "A_F_a = A_F*math.sqrt(rho_a/rho_s) #Air fuel ratio at altitude\n", + "\n", + "#Results:\n", + "print \" The air fuel ratio supplied at 5000 m altitude by a carburettor = %.2f\"%(A_F_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air fuel ratio supplied at 5000 m altitude by a carburettor = 10.99\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d2 = 20.\n", + "d_f = 1.25 #Diameter of throat and fuel nozzle in mm\n", + "Cd_a = 0.85\n", + "Cd_f = 0.66 #Coefficient of discharge for air and fuel\n", + "z = 5. #Elevation of the jet in mm\n", + "rho_a = 1.2\n", + "rho_f = 750. #Mass density of air and fuel in kg/m**3\n", + "deltaP_a = 0.07 #Pressure drop of air in bar\n", + "g = 9.806 #Accelaration due to gravity in m/s**2\n", + "\n", + "#Solution:\n", + "#(a)Nozzle lip is neglected\n", + "A_f = (math.pi/4)*d_f**2;A2 = (math.pi/4)*d2**2 #Area of cross section of fuel nozzle and venturi in mm**2\n", + "m_a1 = Cd_a*A2*math.sqrt(2*rho_a*deltaP_a);m_f1 = Cd_f*A_f*math.sqrt(2*rho_f*deltaP_a) #Air flow and fuel flow\n", + "A_F1 = m_a1/m_f1 #Air fuel ratio\n", + "#(b)Nozzle lip is taken into account\n", + "m_a2 = m_a1 #Air flow remain same\n", + "m_f2 = Cd_f*A_f*math.sqrt(2*rho_f*(deltaP_a-z*10**-3*g*rho_f*10**-5)) #Fuel flow\n", + "A_F2 = m_a2/m_f2 #Air fuel ratio\n", + "#(c)Minimum velocity required to start the fuel flow when nozzle lip is provided\n", + "#To just start the fuel flow pressure difference in venturi must be equivalent to the nozzle lip pressure\n", + "deltaP_a = z*10**-3*g*rho_f #Pressure difference in N/m**2\n", + "C2 = math.sqrt(2*deltaP_a/rho_a) #Minimum velocity of air at throat in m/s\n", + "\n", + "#Results:\n", + "print \" The air fuel ratio when the nozzle lip is neglected = %.1f\"%(A_F1)\n", + "print \" The air fuel ratio when the nozzle lip is taken into account = %.3f\"%(A_F2)\n", + "print \" The minimum velocity required to start the fuel flow when lip is provided = %.2f m/s\"%(C2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air fuel ratio when the nozzle lip is neglected = 13.2\n", + " The air fuel ratio when the nozzle lip is taken into account = 13.223\n", + " The minimum velocity required to start the fuel flow when lip is provided = 7.83 m/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol, solve\n", + "\n", + "#Given:\n", + "A_F = 14. #Air fuel ratio at sea level\n", + "P2 = 0.834 #Pressure at venturi throat without an air cleaner in bar\n", + "P1 = 1.013 #Pressure of air in bar at sea level\n", + "deltaP_ac = 30. #Pressure drop to air cleaner in mm of mercury\n", + "m_a = 250. #Air flow in kg/hr\n", + "\n", + "#Solution:\n", + "#No air cleaner\n", + "deltaP_a1 = P1-P2 #Pressure difference at venturi throat in bar\n", + "#When air cleaner is fitted\n", + "deltaP_ac = deltaP_ac/750 #Pressure drop to air cleaner in bar\n", + "p = Symbol('p') #Defining pressure at venturi throat with an air cleaner as unknown in bar\n", + "deltaP_a2 = P1-deltaP_ac-p #Pressure difference at venturi throat in bar\n", + "#For same air flow and consmath.tant coefficients pressure difference in above two cases is same\n", + "p = solve(deltaP_a2-deltaP_a1)[0] #Pressure at venturi throat with an air cleaner in bar\n", + "deltaP_f = P1-p #Pressure difference at venturi throat when air cleaner is fitted in bar\n", + "A_F_f = A_F*math.sqrt(deltaP_a1/deltaP_f) #Air fuel ratio when air cleaner is fitted\n", + "\n", + "#Results:\n", + "print \" a)The throat pressure when the air cleaner is fitted, P = %.3f bar\"%(p)\n", + "print \" b)Air fuel ratio with air cleaner is fitted = %.2f\"%(A_F_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The throat pressure when the air cleaner is fitted, P = 0.794 bar\n", + " b)Air fuel ratio with air cleaner is fitted = 12.66\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch12.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch12.ipynb new file mode 100755 index 00000000..1123a7de --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch12.ipynb @@ -0,0 +1,265 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:927a2e0fe2c0cb4a8408b69386afb92e9a0f1b8a2bf0a600a62e99031298d2ae" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Fuel Injection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "bsfc = 245. #Brake specific fuel consumption in gm/kWh\n", + "bp = 89. #Brake power in kW\n", + "N = 2500. #Engine speed in rpm\n", + "s = 0.84 #Specific gravity of the fuel\n", + "\n", + "#Solution:\n", + "m_f = bsfc*bp/(1000) #Fuel consumption in kg/hr\n", + "m_f = m_f/n #Fuel consumption per cylinder in kg/hr\n", + "m_f = (m_f/3600)/(N/(2*60)) #Fuel consumption per cycle in kg\n", + "V_f = m_f*1000/s #Volume of fuel consume per cycle in cc\n", + "\n", + "#Results:\n", + "print \" The quantity of fuel to be injected per cycle per cylinder, V_f = %.4f cc\"%(V_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quantity of fuel to be injected per cycle per cylinder, V_f = 0.0577 cc\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 8. #Number of cylinders\n", + "bp = 368. #Brake power in kW\n", + "N = 800. #Engine speed in rpm\n", + "bsfc = 0.238 #Brake specific fuel consumption in kg/kWh\n", + "P1 = 35.\n", + "P2 = 60. #Beginning pressure and maximum pressure in cylinder in bar\n", + "P1_i = 210.\n", + "P2_i = 600. #Expected pressure and maximum pressure at injector in bar\n", + "theta_i = 12. #Period of injection in degrees\n", + "Cd = 0.6 #Coefficient of discharge for the injector\n", + "s = 0.85 #Specific gravity of the fuel\n", + "P_atm = 1.013 #Atmospheric pressure in bar\n", + "\n", + "#Solution:\n", + "m_f = bsfc*bp/(n*60) #Fuel consumption per cylinder in kg/min\n", + "m_f = m_f/(N/2) #Fuel consumption per cycle in kg\n", + "t = theta_i/360*60/N #Time for injection in s\n", + "m_f = m_f/t #Fuel consumption per cycle in kg/s\n", + "deltaP1 = P1_i-P1 #Pressure difference at beginning in bar\n", + "deltaP2 = P2_i-P2 #Pressure difference at end in bar\n", + "deltaP_av = (deltaP1+deltaP2)/2 #Average pressure difference in bar\n", + "A_f = m_f/(Cd*math.sqrt(2*s*1000*deltaP_av*10**5)) #Orifice area of fuel injector in m**2\n", + "\n", + "#Results:\n", + "print \" The Orifice area of fuel injector, Af = %.5f cm**2\"%(A_f*10000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Orifice area of fuel injector, Af = 0.01234 cm**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "bp = 15. #Brake power per cylinder in kW\n", + "N = 2000. #Engine speed in rpm\n", + "bsfc = 0.272 #Brake specific fuel consumption in kg/kWh\n", + "API = 32. #American Petroleum Institute specific gravity in degreeAPI\n", + "theta_i = 30. #Period of injection in degrees\n", + "P_i = 120. #Fuel injection pressure in bar\n", + "P_c = 30. #Combustion chamber pressure in bar\n", + "Cd = 0.9 #Coefficient of discharge for the injector\n", + "def specificgravity(API):\n", + " return 141.5/(131.5+API) #Specific gravity(rho) as a function of API\n", + "\n", + "#Solution:\n", + "s = specificgravity(API) #Specific gravity of fuel\n", + "m_f = bsfc*bp*2/(N*60) #Fuel consumption in kg\n", + "t = theta_i/360*60/N #Time for injection in s\n", + "m_f = m_f/t #Fuel consumption per cycle in kg/s\n", + "A_f = m_f/(Cd*math.sqrt(2*s*1000*(P_i-P_c)*10**5)) #Orifice area of fuel injector in m**2\n", + "A_f = A_f*10**6 #Orifice area of fuel injector in mm**2\n", + "d_f = math.sqrt(4*A_f/math.pi) #Diameter of fuel orifice in mm\n", + "\n", + "#Results:\n", + "print \" The diameter of the fuel orifice, d = %.2f mm\"%(d_f)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the fuel orifice, d = 0.56 mm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "s1 = 20. #Dismath.tance of penetration in cm\n", + "t1 = 16. #Penetration time in millisec\n", + "P_i1 = 140. #Injection pressure in bar\n", + "s2 = s1 #Same dismath.tance of penetration in cm\n", + "P_i2 = 220. #Injection pressure in bar\n", + "P_c = 15. #Combustion chamber pressure in bar\n", + "\n", + "#Solution:\n", + "deltaP1 = P_i1-P_c #Pressure difference for 140 bar injection pressure\n", + "deltaP2 = P_i2-P_c #Pressure difference for 220 bar injection pressure\n", + "t2 = t1*(s2/s1)*math.sqrt(deltaP1/deltaP2) #Penetration time for 220 bar injection pressure in millisec\n", + "\n", + "#Results:\n", + "print \" Penetration time for 220 bar injection pressure, t2 = %.1f milli-seconds\"%(t2)\n", + "#Answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Penetration time for 220 bar injection pressure, t2 = 12.5 milli-seconds\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "V_b = 7. #Volume of fuel in the barrel in cc\n", + "D_l = 3.\n", + "L_l = 700. #Diameter and length of fuel delivery line in mm\n", + "V_iv = 3. #Volume of fuel in the injection valve in cc\n", + "P2 = 200. #Delivery pressure in bar\n", + "P1 = 1. #Sump pressure in bar\n", + "V_d = 0.15 #Volume to be delivered in cc\n", + "C = 78.8e-6 #Coefficient of compressibility\n", + "d = 8. #Diameter of the plunger in mm\n", + "\n", + "#Solution:\n", + "V_l = math.pi/4*D_l**2*L_l*10**-3 #Volume of fuel in delivery line in cc\n", + "V1 = V_b+V_l+V_iv #Total initial fuel volume in cc\n", + "deltaV = C*(P2-P1)*V1 #Change in volume due to compression in cc\n", + "V_p = deltaV+V_d #Displaced volume by plunger in cc\n", + "A_p = math.pi/4*d**2*10**-2 #Area of the plunger in cm**2\n", + "l = V_p/A_p #Effective stroke of plunger in cm\n", + "\n", + "#Results:\n", + "print \" The plunger print lacement = %.3f cc\"%(V_p)\n", + "print \" The effective stroke of the plunger, l = %.2f mm\"%(l*10)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The plunger print lacement = 0.384 cc\n", + " The effective stroke of the plunger, l = 7.65 mm\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch14.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch14.ipynb new file mode 100755 index 00000000..d93406e1 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch14.ipynb @@ -0,0 +1,115 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4768c08ef04dc17712eafac8c566557a5e26cb1a0ebac877e9a166fe70982079" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Engine Friction and Lubrication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "bp = 80. #Brake power in kW\n", + "eta_m = 80. #Mechanical efficiency in percent\n", + "bsfc = 258. #Brake specific fuel consumption in gm/kWh\n", + "Reduction = 3.7 #Reduction in friction power in kW\n", + "\n", + "#Solution:\n", + "ip1 = bp*100/eta_m #Initial indicated power in kW\n", + "fp1 = ip1-bp #Initial friction power in kW\n", + "fp2 = fp1-Reduction #Final friction power in kW\n", + "ip2 = bp+fp2 #Final indicated power in kW\n", + "eta_m2 = bp/ip2 #Final mechanical efficiency\n", + "bsfc2 = bsfc*(eta_m/(100*eta_m2)) #Final brake specific fuel consumption in gm/kWh\n", + "Saving = bp*(bsfc-bsfc2)/1000 #Saving in fuel in kg/hr\n", + "\n", + "#Results:\n", + "print \" a)The new mechanical efficiency, eta_m = %.3f\"%(eta_m2)\n", + "print \" b)The new bsfc = %.1f gm/kWh\"%(bsfc2)\n", + "print \" c)The saving in fuel per hour = %.2f kg/hr\"%(Saving)\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The new mechanical efficiency, eta_m = 0.831\n", + " b)The new bsfc = 248.5 gm/kWh\n", + " c)The saving in fuel per hour = 0.76 kg/hr\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "eta_it = 30. #Indicated thermal efficiency in percent\n", + "fp_1500 = 18. #Friction power at 1500 rpm in kW\n", + "fp_2500 = 45. #Friction power at 2500 rpm in kW\n", + "bp = 75. #Brake power in kW\n", + "CV = 44000. #Calorific value of fuel in kJ/kg\n", + "\n", + "#Solution:\n", + "isfc = 3600/(CV*eta_it/100) #Indicated specific fuel consumption in kg/kWh\n", + "eta_m_1500 = bp/(bp+fp_1500) #Mechanical efficiency at 1500 rpm\n", + "bsfc_1500 = isfc/eta_m_1500 #Brake specific fuel consumption at 1500 rpm in kg/kWh\n", + "eta_m_2500 = bp/(bp+fp_2500) #Mechanical efficiency at 2500 rpm\n", + "bsfc_2500 = isfc/eta_m_2500 #Brake specific fuel consumption at 2500 rpm in kg/kWh\n", + "\n", + "#Results:\n", + "print \" The brake specific fuel consumption\\tat 1500 rpm, bsfc_1500 = %.3f kg/kWh\\tat 2500 rpm, bsfc_2500 = %.3f kg/kWh\"%(bsfc_1500,bsfc_2500)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The brake specific fuel consumption\tat 1500 rpm, bsfc_1500 = 0.338 kg/kWh\tat 2500 rpm, bsfc_2500 = 0.436 kg/kWh\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch15.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch15.ipynb new file mode 100755 index 00000000..0404aece --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch15.ipynb @@ -0,0 +1,69 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:776c6c0aeac983ed6f1b3e68c4390880a4a4841d6a8c44c8e08d2ff96eff17ed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Engine Cooling" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "bp = 100. #Brake power in kW\n", + "deltaT = 30. #Temperature raised of water in degreeC\n", + "p_p = 30\n", + "p_d = 26. #Percentage of energy going to coolent in petrol and diesel\n", + "eta_p = 26.\n", + "eta_d = 31. #Efficiency of petrol and diesel engine in percent\n", + "s = 4.1868 #Specific heat capacity of water in J/kgK\n", + "\n", + "#Solution:\n", + "#Petrol engine\n", + "CW_p = bp*(p_p/100)/((eta_p/100)*deltaT*s) #Amount of cooling water required in petrol engine in kg/s\n", + "#Diesel engine\n", + "CW_d = bp*(p_d/100)/((eta_d/100)*deltaT*s) #Amount of cooling water required in diesel engine in kg/s\n", + "\n", + "#Results:\n", + "print \" Amount of cooling water required in petrol engine = %d kg/hr\"%(CW_p*3600)\n", + "print \" Amount of cooling water required in diesel engine = %.1f kg/hr\"%(CW_d*3600)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Amount of cooling water required in petrol engine = 0 kg/hr\n", + " Amount of cooling water required in diesel engine = 2403.9 kg/hr\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch16.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch16.ipynb new file mode 100755 index 00000000..40948871 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch16.ipynb @@ -0,0 +1,85 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6f0d26615e80e3779bcf7364d96763c08c70aa877294b90e27c4df4ea6a8198b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : Two Stroke Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 Page No : 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 2. #Number of cylinders\n", + "N = 4000. #Angular speed of engine in rpm\n", + "eta_v = 0.77 #Volumetric efficiency\n", + "eta_m = 0.75 #Mechanical efficiency\n", + "V_f = 10. #Fuel consumption in l/hr\n", + "s = 0.73 #Specific gravity\n", + "h = 10500. #Enthalpy of fuel in kcal/kg\n", + "A_F = 18. #Air-fuel ratio\n", + "v_p = 600. #Speed of piston in m/min\n", + "imep = 5. #Indicated mean effective pressure in atm \n", + "T = 298.\n", + "P = 1.013 #Smath.radians(numpy.arcmath.tan(ard temperature and pressure in K and bar\n", + "\n", + "#Solution:\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "m_f = V_f*s #Fuel consumption in kg/hr\n", + "m_a = A_F*m_f #Air consumption in kg/hr\n", + "m_c = m_f+m_a #Mass of total charge in kg/hr\n", + "m = round(m_c/eta_v) #Mass of charge corresponding to the swept volume in kg/hr\n", + "V = (m/2)*R*T/(P*100) #Volume of charge consumed in m**3/hr\n", + "V_s = V*10**6/(60*N) #Swept volume by piston per stroke in cc\n", + "L = v_p*100/(2*N) #Stroke length of cylinder in cm\n", + "d = math.sqrt(4*V_s/(math.pi*L)) #Bore of cylinder in cm\n", + "IHP = round(imep*V_s*N*n/450000) #Indicated horse power in metric HP\n", + "BHP = IHP*eta_m #Brake horse power in metric HP\n", + "eta_t = BHP*736*3600/(V_f*s*h*4187) #Thermal efficiency\n", + "\n", + "#Results:\n", + "print \" The engine dimensions\\t Stroke length, L = %.1f cm\\t Bore, d = %.1f cm\"%(L,d)\n", + "print \" The brake power output, BHP = %.1f metric HP\"%(BHP)\n", + "print \" The thermal efficiency, eta_t = %.1f percent\"%(eta_t*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The engine dimensions\t Stroke length, L = 7.5 cm\t Bore, d = 7.3 cm\n", + " The brake power output, BHP = 21.0 metric HP\n", + " The thermal efficiency, eta_t = 17.3 percent\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch17.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch17.ipynb new file mode 100755 index 00000000..d9176073 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch17.ipynb @@ -0,0 +1,292 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8c6c7f8262f8a0e8e48f0cab464ff58177e84801608c6a7a2057a29ec402b43d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : Supercharging" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 Page No : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import ceil\n", + "\n", + "#Given:\n", + "V_s = 3000. #Total swept volume in cc\n", + "ip = 14. #Indicated power in kW/m**3\n", + "N = 3500. #Engine speed in rpm\n", + "eta_v = 80. #Volumetric efficiency in percent\n", + "T1 = 27+273. #Atmospheric temperature in K\n", + "P1 = 1.013 #Atmospheric pressure in bar\n", + "r_p = 1.7 #pressure ratio\n", + "eta_C = 75. #Isentropic efficiency of blower in percent\n", + "eta_m = 80. #Mechanical efficiency in percent\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "V_s = V_s*N/2*1e-6 #Total swept volume in m**3/min\n", + "Vi = V_s*eta_v/100 #Unsupercharged induced volume in m**3/min\n", + "P2 = P1*r_p #Blower delivery pressure in bar\n", + "T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T21 = ceil(T21)\n", + "T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K\n", + "V1 = V_s*(P2/T2)*(T1/P1) #Volume at atmospheric conditions in m**3/min\n", + "Vi_inc = V1-Vi #Increase in induced volume in m**3/min\n", + "ip_inc1 = ip*Vi_inc #Increased in ip from air induced in kW\n", + "ip_inc2 = (P2-P1)*100*V_s/60 #Increased in ip due to increased induction pressure in kW\n", + "ip_inc = ip_inc1+ip_inc2 #Total increase in ip in kW\n", + "bp_inc = eta_m/100*ip_inc #Total increase in bp in kW\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "cp = 1.005 #Specific heat in kJ/kgK\n", + "m2 = P2*100*V_s/(R*T2*60) #Mass of air delivered by the blower in kg/s\n", + "Power = m2*cp*(T2-T1)/(eta_m/100) #Power required by the blower in kW\n", + "bp_inc = bp_inc-Power #Net increase in brake power in kW\n", + "\n", + "#Results:\n", + "print \" The net increase in the brake power = %.1f kW\"%(bp_inc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The net increase in the brake power = 27.7 kW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given:\n", + "T1 = 10.+273 #Temperature at sea level in K\n", + "P1 = 1.013 #Pressure at sea level in bar\n", + "bp = 250. #Brake power in kW\n", + "eta_v = 78. #Volumetric efficiency in percent\n", + "bsfc = 0.245 #Brake specific fuel consumption in kg/kWh\n", + "A_F = 17. #Air fuel ratio\n", + "N = 1500. #Engine speed in rpm\n", + "h = 2700. #Altitude in m\n", + "P_a = 0.72 #Pressure at altitude in bar\n", + "p = 8. #Percentage of gross power taken by the supercharger\n", + "T2 = 32.+273 #Temperature of air leaving the supercharger in K\n", + "\n", + "#Solution:\n", + "#Unsupercharged\n", + "m_f = bsfc*bp/60 #Fuel consumption in kg/min\n", + "m_a = A_F*m_f #Air consumption in kg/min\n", + "m_a = m_a/(N/2) #Air consumption per cycle in kg\n", + "m1 = m_a/eta_v*100 #Mass of air corresponding to swept volume\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "V_s = m1*R*T1/(P1*100) #Swept volume in m**3\n", + "bmep = bp/(V_s*N/(60*2)) #Brake mean effective pressure in kN/m**2\n", + "#Supercharged\n", + "bp2 = bp/(1-p/100) #Gross power produced by the engine in kW\n", + "m_a2 = bp2/bp*m_a #Mass of air required per cycle in kg\n", + "m2 = m_a2/eta_v*100 #Mass of air corresponding to swept volume\n", + "P2 = m2*R*T2/(V_s*100) #Pressure of air leaving the supercharger in bar\n", + "deltaP = P2-P_a #Increase in pressure required in bar\n", + "\n", + "#Results:\n", + "print \" The required engine capacity, V_s = %.4f m**3\"%(V_s)\n", + "print \" The anticipated brake mean effective pressure, bmep = %.1f bar\"%(bmep/100)\n", + "print \" The increase of air pressure required at the supercharger = %.3f bar\"%(deltaP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The required engine capacity, V_s = 0.0238 m**3\n", + " The anticipated brake mean effective pressure, bmep = 8.4 bar\n", + " The increase of air pressure required at the supercharger = 0.467 bar\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from hornerc import horner\n", + "from sympy import Symbol, solve\n", + "\n", + "#Given:\n", + "V_s = 3300. #Swept volume in cc\n", + "#For normally aspirated\n", + "bmep1 = 9.3 #Brake mean effective pressure in bar\n", + "N1 = 4500. #Engine speed in rpm\n", + "eta_it1 = 28.5 #Indicated thermal efficiency in percent\n", + "eta_m1 = 90. #Mechanical efficiency in percent\n", + "m1 = 205. #Mass of unboosted engine in kg\n", + "#For supercharged\n", + "bmep2 = 12.1 #Brake mean effective pressure in bar\n", + "N2 = 4500 #Engine speed in rpm\n", + "eta_it2 = 24.8 #Indicated thermal efficiency in percent\n", + "eta_m2 = 90 #Mechanical efficiency in percent\n", + "m2 = 225 #Mass of boosted engine in kg\n", + "h = Symbol('h') #Defining the unknown h hours duration\n", + "CV = 44000 #Calorific value of fuel in kJ/kg\n", + "\n", + "#Solution:\n", + "#For normally aspirated\n", + "bp1 = bmep1*100*V_s/1e+6*N1/(2*60) #Brake power in kW\n", + "bp1 = round(bp1)\n", + "ip1 = bp1/eta_m1*100 #Indicated power in kW\n", + "m_f1 = ip1/(eta_it1/100*CV) #Fuel flow in kg/s\n", + "m_f1 = m_f1*3600*h #Mass of fuel flow in h hours in kg\n", + "Mass1 = (m1+m_f1)/bp1 #Specific mass in kg/kW\n", + "#For supercharged\n", + "bp2 = bmep2*100*V_s/1e+6*N2/(2*60) #Brake power in kW\n", + "bp2 = round(bp2)\n", + "ip2 = bp2/eta_m2*100 #Indicated power in kW\n", + "m_f2 = ip2/(eta_it2/100*CV) #Fuel flow in kg/s\n", + "m_f2 = m_f2*3600*h #Mass of fuel flow in h hours in kg\n", + "Mass2 = (m2+m_f2)/bp2 #Specific mass in kg/kW\n", + "for h in range(0,10.01,0.01): #Defining the range of h(hours)\n", + " if (horner(Mass1,h) > horner(Mass2,h)): #Specific mass of boosted engine is always be less than unboosted\n", + " continue\n", + " else:\n", + " h_max = h\n", + " break\n", + "\n", + "#Results:\n", + "print \" The maximum value of h hours duration, h_max = %.2f hours\"%(h_max)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "ImportError", + "evalue": "No module named hornerc", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mhornerc\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mhorner\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0msympy\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSymbol\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msolve\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;31m#Given:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mImportError\u001b[0m: No module named hornerc" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4 Page No : 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "T1 = 20.+273 #Temperature of air enters the compressor in K\n", + "Q1 = 1340. #Heat added to air in kJ/min\n", + "T3 = 60.+273 #Temperature of air leaves the cooler or enters the engine in K\n", + "P3 = 1.72 #Pressure of air leaves the cooler or enters the engine in bar\n", + "eta_v = 0.70 #Volumetric efficiency of engine\n", + "n = 6. #Number of cylinders\n", + "d = 90.\n", + "l = 100. #Bore and stroke of cylinder in mm\n", + "N = 2000. #Engine speed in rpm\n", + "T = 147. #Output brake torque in Nm\n", + "eta_m = 0.75 #Mechanical efficiency\n", + "\n", + "#Solution:\n", + "bp = 2*math.pi*N/60*T*10**-3 #Brake power in kW\n", + "ip = bp/eta_m #Indicated power in kW\n", + "ip = ip/n #Indicated power per cylinder in kW\n", + "A = (math.pi/4)*d**2*1e-6 #Area of cylinder in m**2\n", + "l = l*1e-3 #Stroke of cylinder in m\n", + "imep = ip/(l*A*N/(2*60)) #Indicated mean effective pressure in kN/m**2\n", + "imep = imep/100 #Indicated mean effective pressure in bar\n", + "V_s = n*A*l*N/2 #Engine swept volume in m**3/min\n", + "Vi = V_s*eta_v #Induced volume of air in m**3/min\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "cp = 1.005 #Specific heat in kJ/kgK\n", + "m_e = P3*100*Vi/(R*T3) #Mass of air induced into the engine in kg/min\n", + "Q1 = 1340./60 #Heat added to air in kW\n", + "m_c = 1 #Assume for calculation\n", + "def f(T2):\n", + " W_c = m_c*cp*(T2-T1) #Work done on air in compressor kW\n", + " Q_c = m_c*cp*(T2-T3) #Heat given to the air passes through the cooler in kW\n", + " return W_c/Q_c-bp/Q1\n", + "\n", + "T2 = fsolve(f,500)\n", + "m_c = bp*60/(cp*(T2-T1)) #Mass of air flow into the compressor in kg/min\n", + "\n", + "#Results:\n", + "print \" a)The engine indicated mean effective pressure, imep = %.2f bar\"%(imep)\n", + "print \" b)The air consumption in the engine, m_e = %.2f kg/min\"%(m_e)\n", + "print \" c)The air flow into the compressor, m_c = %.2f kg/min\"%(m_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The engine indicated mean effective pressure, imep = 6.45 bar\n", + " b)The air consumption in the engine, m_e = 4.81 kg/min\n", + " c)The air flow into the compressor, m_c = 12.62 kg/min\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch18.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch18.ipynb new file mode 100755 index 00000000..ca8c4804 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch18.ipynb @@ -0,0 +1,1131 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c1e9a9e5a3bb92d5166a24c3143448970a4bd2b686f8bf1bbcf04560c538a66f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : Testing and Performance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 Page No : 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 4. #Number of cylinders\n", + "d_o = 7.5 #Diameter of orifice in cm\n", + "Cd = 0.6 #Coefficient of discharge for orifice\n", + "d = 11.\n", + "l = 13. #Bore and stroke in cm\n", + "N = 2250. #Engine speed in rpm\n", + "bp = 36. #Brake power in kW\n", + "m_f = 10.5 #Fuel consumption in kg/hr\n", + "CV = 42000. #Calorific value in kJ/kg\n", + "deltaP_o = 4.1 #Pressure drop across orifice in cm of water\n", + "P = 1.013 #Atmospheric pressure in bar\n", + "T = 15+273 #Atmospheric temperature in K\n", + "g = 9.81 #Accelaration due to gravity in m/s**2\n", + "#Solution:\n", + "#(a)\n", + "eta_bt = bp*3600/(m_f*CV) #Brake thermal efficiency\n", + "#(b)\n", + "A = math.pi/4*d**2*10**-4 #Area of cylinder in m**2\n", + "bmep = bp*1000/(n*l/100*A*N/(2*60)) #Brake mean effective pressure in Pascal\n", + "#(c)\n", + "rho_w = 1000 #Mass density of water in kg/m**3\n", + "deltaP_o = rho_w*g*deltaP_o/100 #Pressure drop across orifice in N/m**2\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "rho_a = P*10**5/(R*10**3*T) #Mass density of air in kg/m**3\n", + "A_o = math.pi/4*d_o**2*10**-4 #Area of orifice in m**2\n", + "m_a = Cd*A_o*math.sqrt(2*deltaP_o*rho_a) #Air inhaled in kg/s\n", + "V_s = (math.pi/4)*d**2*l*n*N/(2*60)*10**-6 #Swept volume in m**3/s\n", + "eta_vol = m_a/V_s #Volumetric efficiency\n", + "\n", + "#Results:\n", + "print \" a)Brake thermal efficiency, eta_bt = %.3f\"%(eta_bt)\n", + "print \" b)Brake mean effective pressure, bmep = %.3f bar\"%(bmep*10**-5)\n", + "print \" c)Volumetric efficiency, eta_vol = %.3f\"%(eta_vol)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)Brake thermal efficiency, eta_bt = 0.294\n", + " b)Brake mean effective pressure, bmep = 3.885 bar\n", + " c)Volumetric efficiency, eta_vol = 0.898\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2 Page No : 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 24.\n", + "l = 48. #Bore and stroke in cm\n", + "D_b = 1.25 #Effective diameter of the brake wheel in m\n", + "P = 1236. #Net load on brake in N\n", + "N = 77. #Average engine explosions in min\n", + "N1 = 226.7 #Average speed at output shaft in rpm\n", + "imep = 7.5 #Indicated mean effective pressure in bar\n", + "Vg1 = 13. #Gas used in m**3/hr\n", + "T1 = 15.+273\n", + "P1 = 771. #Temperature and pressure of the gas in K and mm of mercury\n", + "T2 = 0+273\n", + "P2 = 760. #Normal temperature and pressure (N.T.P.) in K and mm of mercury\n", + "CV = 22000. #Calorific value of the gas in kJ/m**3\n", + "m_w = 625. #Mass of cooling water used in kg/hr\n", + "T1_w = 25+273.\n", + "T2_w = 60.+273 #Inlet and outlet temperature of cooling water in K\n", + "\n", + "#Solution:\n", + "#(a)\n", + "T = P*D_b/2 #Brake torque delivered in Nm\n", + "bp = 2*math.pi*N1/60*T #Brake power in W\n", + "ip = imep*10**5*l*math.pi/4*d**2*N/60*10**-6 #Indicated power in W\n", + "eta_m = bp/ip #Mechanical efficiency\n", + "#(b)\n", + "Vg2 = (P1/P2)*(T2/T1)*Vg1 #Gas consumption at N.T.P. in m**3/hr\n", + "#(c)\n", + "eta_it = ip/1000*3600/(Vg1*CV) #Indicated thermal efficiency\n", + "#Heat balance sheet\n", + "Q1 = Vg2/60*CV #Heat supplied in kJ/min\n", + "Q_bp = bp/1000*60 #Heat equivalent to brake power in kJ/min\n", + "cp = 4.1868 #Specfic heat of water in kJ/kgK\n", + "Q_w = m_w/60*cp*(T2_w-T1_w) #Heat in cooling water in kJ/min\n", + "Q_r = Q1-Q_bp-Q_w #Heat to exhaust, radiation in kJ/min\n", + "\n", + "#Results:\n", + "print \" a)The mechanical efficiency of the engine, eta_m = %.1f percent\"%(eta_m*100)\n", + "print \" b)The gas consumption at N.T.P. = %.1f m**3/hr\"%(Vg2)\n", + "print \" c)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_it*100)\n", + "print \" Heat balance sheet\\t Heat supplied by the gas = %.1f kJ/min, %d percent\"%(Q1,Q1/Q1*100)\n", + "print \"\\t Heat equivalent to b.p. = %.1f kJ/min, %.1f percent\"%(Q_bp,Q_bp/Q1*100)\n", + "print \"\\t Heat in cooling water = %.1f kJ/min, %.1f percent\"%(Q_w,Q_w/Q1*100)\n", + "print \"\\t Heat to exhaust, radiation = %.1f kJ/min, %.1f percent\"%(Q_r,Q_r/Q1*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The mechanical efficiency of the engine, eta_m = 87.7 percent\n", + " b)The gas consumption at N.T.P. = 12.5 m**3/hr\n", + " c)The indicated thermal efficiency, eta_it = 26.3 percent\n", + " Heat balance sheet\t Heat supplied by the gas = 4583.8 kJ/min, 100 percent\n", + "\t Heat equivalent to b.p. = 1100.3 kJ/min, 24.0 percent\n", + "\t Heat in cooling water = 1526.4 kJ/min, 33.3 percent\n", + "\t Heat to exhaust, radiation = 1957.0 kJ/min, 42.7 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 Page No : 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 18.\n", + "l = 36. #Bore and stroke in cm\n", + "N = 285. #Average engine speed in rpm\n", + "T = 393. #Brake torque delivered in Nm\n", + "imep = 7.2 #Indicated mean effective pressure in bar\n", + "m_f = 3.5 #Fuel consumption in kg/hr\n", + "m_w = 4.5 #Mass of cooling water used in kg/min\n", + "deltaT_w = 36. #Cooling water temperature rise in degreeC\n", + "A_F = 25. #Air-fuel ratio\n", + "T2 = 415.+273 #Exhaust gas temperature in K\n", + "P = 1.013 #Atmospheric pressure in bar\n", + "T1 = 21.+273 #Room temperature in K\n", + "CV = 45200. #Calorific value in kJ/kg\n", + "p = 15. #Perentage of hydrogen contained by the fuel\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "cv = 1.005\n", + "cp = 2.05 #Specific heat for dry exhaust gases and superheated steam in kJ/kgK\n", + "\n", + "#Solution:\n", + "#(a)\n", + "ip = imep*10**2*l*math.pi/4*d**2*N/(2*60)*10**-6 #Indicated power in kW\n", + "ip = round(10*ip)/10\n", + "eta_it = ip*3600/(m_f*CV) #Indicated thermal efficiency\n", + "#(b)\n", + "m_a = m_f*A_F/60 #Mass of air inhaled in kg/min\n", + "m_a = round(100*m_a)/100\n", + "V_a = m_a*R*T1/(P*100) #Volume of air inhaled in m**3/min\n", + "V_s = (math.pi/4)*d**2*l*10**-6*N/2 #Swept volume in m**3/min\n", + "eta_vol = V_a/V_s #Volumetric efficiency\n", + "#Heat balance sheet\n", + "Q1 = m_f/60*CV #Heat input in kJ/min\n", + "bp = 2*math.pi*N/60*T*10**-3 #Brake power in W\n", + "Q_bp = bp*60 #Heat equivalent to brake power in kJ/min\n", + "cp_w = 4.1868 #Specific heat of water in kJ/kgK\n", + "Q_w = m_w*cp_w*deltaT_w #Heat in cooling water in kJ/min\n", + "m_e = m_a+m_f/60 #Mass of exhaust gases in kg/min\n", + "#Since, 2 mole of hydrogen gives 1 mole of water on combine with 1 mole of oxygen\n", + "#Thus, 1 mole of hydrogen gives 1/2 mole or 9 unit mass of water\n", + "m_h = m_f/60*p/100 #Mass of hydrogen in kg/min\n", + "m_s = 9*m_h #Mass of steam in exhaust gases in kg/min\n", + "m_d = m_e-m_s #Mass of dry exhaust gases in kg/min\n", + "Q_d = m_d*cv*(T2-T1) #Heat in dry exhaust gases in kJ/min\n", + "lv = 2256.9 #Latent heat of vapourisation of water in kJ/kg\n", + "Q_s = m_s*((373-T1)+lv+cp*(T2-373)) #Heat in steam in exhaust gases in kJ/min\n", + "Q_r = Q1-Q_bp-Q_w-Q_d-Q_s #Heat in radiation in kJ/min\n", + "\n", + "#Results:\n", + "print \" a)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_it*100)\n", + "print \" b)The volumetric efficiency, eta_vol = %.1f percent\"%(eta_vol*100)\n", + "print \" Heat balance sheet\\t Heat input = %.1f kJ/min, %d percent\"%(Q1,Q1/Q1*100)\n", + "print \"\\t Heat equivalent to b.p. = %.1f kJ/min, %.1f percent\"%(Q_bp,Q_bp/Q1*100)\n", + "print \"\\t Heat in cooling water = %.1f kJ/min, %.1f percent\"%(Q_w,Q_w/Q1*100)\n", + "print \"\\t Heat in dry exhaust gases = %.1f kJ/min, %.1f percent\"%(Q_d,Q_d/Q1*100)\n", + "print \"\\t Heat in steam in exhaust gases = %.1f kJ/min, %.1f percent\"%(Q_s,Q_s/Q1*100)\n", + "print \"\\t Heat in radiation = %.1f kJ/min, %.1f percent\"%(Q_r,Q_r/Q1*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated thermal efficiency, eta_it = 35.7 percent\n", + " b)The volumetric efficiency, eta_vol = 93.2 percent\n", + " Heat balance sheet\t Heat input = 2636.7 kJ/min, 100 percent\n", + "\t Heat equivalent to b.p. = 703.7 kJ/min, 26.7 percent\n", + "\t Heat in cooling water = 678.3 kJ/min, 25.7 percent\n", + "\t Heat in dry exhaust gases = 570.0 kJ/min, 21.6 percent\n", + "\t Heat in steam in exhaust gases = 234.8 kJ/min, 8.9 percent\n", + "\t Heat in radiation = 449.8 kJ/min, 17.1 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.4 Page No : 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 4. #Number of cylinders\n", + "d_o = 5. #Diameter of orifice in cm\n", + "Cd = 0.6 #Coefficient of discharge for orifice\n", + "d = 10.5\n", + "l = 12.5 #Bore and stroke in cm\n", + "N = 1200. #Engine speed in rpm\n", + "T = 147. #Brake torque delivered in Nm\n", + "m_f = 5.5 #Fuel consumption in kg/hr\n", + "CV = 43100. #Calorific value in kJ/kg\n", + "deltaP_o = 5.7 #Head across orifice in cm of water\n", + "P1 = 1.013 #Atmospheric pressure in bar\n", + "T1 = 20.+273 #Atmospheric temperature in K\n", + "g = 9.81 #Accelaration due to gravity in m/s**2\n", + "\n", + "#Solution:\n", + "#(a)\n", + "bp = 2*math.pi*N/60*T*10**-3 #Brake power in kW\n", + "eta_bt = bp*3600/(m_f*CV) #Brake thermal efficiency\n", + "#(b)\n", + "A = math.pi/4*d**2*10**-4 #Area of cylinder in m**2\n", + "bmep = bp*1000/(n*l/100*A*N/(2*60)) #Brake mean effective pressure in N/m**2\n", + "#(c)\n", + "rho_w = 1000 #Mass density of water in kg/m**3\n", + "deltaP_o = rho_w*g*deltaP_o/100 #Pressure drop across orifice in N/m**2\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "rho_a = P1*10**5/(R*10**3*T1) #Mass density of air in kg/m**3\n", + "rho_a = round(10*rho_a)/10\n", + "A_o = math.pi/4*d_o**2*10**-4 #Area of orifice in m**2\n", + "V_a = Cd*A_o*math.sqrt(2*deltaP_o/rho_a) #Air inhaled in m**3/s\n", + "V_s = (math.pi/4)*d**2*l*n*N/(2*60)*10**-6 #Swept volume in m**3/s\n", + "eta_vol = V_a/V_s #Volumetric efficiency\n", + "\n", + "#Results:\n", + "print \" a)Brake thermal efficiency, eta_bt = %.1f percent\"%(eta_bt*100)\n", + "print \" b)Brake mean effective pressure, bmep = %.2f bar\"%(bmep*10**-5)\n", + "print \" c)Volumetric efficiency, eta_vol = %.1f percent\"%(eta_vol*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)Brake thermal efficiency, eta_bt = 28.1 percent\n", + " b)Brake mean effective pressure, bmep = 4.27 bar\n", + " c)Volumetric efficiency, eta_vol = 83.1 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.5 Page No : 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "d = 7.5\n", + "l = 9. #Bore and stroke in cm\n", + "R_b = 38. #Torque arm radius of the brake wheel in cm\n", + "P1 = 324. #Net load when all cylinders operating on brake in N\n", + "N = 3300. #Engine speed in rpm\n", + "P2 = 245. #Net load when each cylinder is inoperative in N\n", + "m_f = .3 #Fuel consumption in kg/min\n", + "CV = 42000. #Calorific value in kJ/kg\n", + "m_w = 65. #Mass of cooling water used in kg/min\n", + "deltaT_w = 12. #Cooling water temperature rise in degreeC\n", + "m_a = 14. #Mass of air blown in kg/min\n", + "T1_a = 10.+273\n", + "T2_a = 55.+273 #Inlet and outlet temperature of air blown in K\n", + "\n", + "#Solution:\n", + "bp = 2*math.pi*N/60*(P1*R_b/100)*10**-3 #Brake power when all the cylinders operating in kW\n", + "bp1 = 2*math.pi*N/60*(P2*R_b/100)*10**-3 #Brake power when each cylinder is inoperative in kW\n", + "ip = n*(bp-bp1) #Total ip of the engine in kW\n", + "A = math.pi/4*d**2*10**-4 #Area of cylinder in m**2\n", + "bmep = ip*1000/(n*l/100*A*N/(2*60)) #Brake mean effective pressure in N/m**2\n", + "#Heat balance sheet\n", + "Q1 = m_f*CV #Heat input in kJ/min\n", + "Q_bp = bp*60 #Heat equivalent to brake power in kJ/min\n", + "cp_w = 4.1868 #Specfic heat of water in kJ/kgK\n", + "Q_w = m_w*cp_w*deltaT_w #Heat in cooling water in kJ/min\n", + "cp_a = 1.005 #Specific heat of air in kJ/kgK\n", + "Q_a = m_a*cp_a*(T2_a-T1_a) #Heat to ventilating air in kJ/min (Wrong in book)\n", + "Q_e = Q1-Q_bp-Q_w-Q_a #Heat to exhaust and other losses in kJ/min\n", + "\n", + "#Results:\n", + "print \" a)The indicated mean effective pressure, bmep = %.1f bar\"%(bmep*10**-5)\n", + "print \" Heat balance sheet\\t Heat input = %d kJ/min, %d percent\"%(Q1,Q1/Q1*100)\n", + "print \"\\t Heat equivalent to b.p. = %d kJ/min, %.1f percent\"%(Q_bp,Q_bp/Q1*100)\n", + "print \"\\t Heat in cooling water = %d kJ/min, %.1f percent\"%(Q_w,Q_w/Q1*100)\n", + "print \"\\t Heat to ventilating air = %d kJ/min, %.1f percent\"%(Q_a,Q_a/Q1*100)\n", + "print \"\\t Heat to exhaust and other losses = %d kJ/min, %.2f percent\"%(Q_e,Q_e/Q1*100)\n", + "#Heat to ventilating air is wrong in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated mean effective pressure, bmep = 9.5 bar\n", + " Heat balance sheet\t Heat input = 12600 kJ/min, 100 percent\n", + "\t Heat equivalent to b.p. = 2552 kJ/min, 20.3 percent\n", + "\t Heat in cooling water = 3265 kJ/min, 25.9 percent\n", + "\t Heat to ventilating air = 633 kJ/min, 5.0 percent\n", + "\t Heat to exhaust and other losses = 6148 kJ/min, 48.80 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.6 Page No : 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "N = 450. #Engine speed in rpm\n", + "P = 450. #Net load on brake in N\n", + "imep = 2.9 #Indicated mean effective pressure in bar\n", + "m_f = 5.4 #Fuel consumption in kg/h\n", + "deltaT_w = 36.1 #Cooling water temperature rise in degreeC\n", + "m_w = 440. #Mass of cooling water used in kg/h\n", + "A_F = 31. #Air-fuel ratio\n", + "T1_g = 20.+273\n", + "T2_g = 355.+273 #Inlet and outlet temperature of exhaust gases blown in K\n", + "P1 = 76. #Atmospheric pressure in cm of Hg\n", + "d = 22.\n", + "l = 27. #Bore and stroke in cm\n", + "D_b = 1.5 #Effective diameter of the brake wheel in m\n", + "CV = 44000. #Calorific value in kJ/kg\n", + "p = 15. #Percentage of hydrogen by mass contained by the fuel\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "cp_g = 1.005\n", + "cp_s = 2.05 #Specific heat for dry exhaust gases and superheated steam in kJ/kgK\n", + "\n", + "#Solution:\n", + "ip = imep*10**2*l*math.pi/4*d**2*N/(60)*10**-6 #Indicated power in kW\n", + "eta_it = ip*3600/(m_f*CV) #Indicated thermal efficiency\n", + "bp = 2*math.pi*N/60*(P*D_b/2)*10**-3 #Brake power in kW\n", + "bp = round(10*bp)/10\n", + "bsfc = m_f/bp*1000 #Brake specific fuel consumption in gm/kWh\n", + "V_s = (math.pi/4)*d**2*l*10**-6*N #Swept volume in m**3/min\n", + "m_a = m_f*A_F/60 #Mass of air inhaled in kg/min\n", + "P1 = 1.0132 #Atmospheric pressure equivalent to 76 cm of Hg in bar\n", + "T1 = 293 #Atmospheric temperature in K\n", + "V_a = m_a*R*T1/(P1*100) #Volume of air inhaled in m**3/min\n", + "V_a = round(100*V_a)/100\n", + "eta_vol = V_a/V_s #Volumetric efficiency\n", + "#Heat balance sheet\n", + "Q1 = m_f/60*CV #Heat input in kJ/min\n", + "Q_bp = bp*60 #Heat equivalent to brake power in kJ/min\n", + "cp_w = 4.1868 #Specfic heat of water in kJ/kgK\n", + "Q_w = m_w/60*cp_w*deltaT_w #Heat in cooling water in kJ/min\n", + "m_e = m_a+m_f/60 #Mass of exhaust gases in kg/min\n", + "#Since, 2 mole of hydrogen gives 1 mole of water on combine with 1 mole of oxygen\n", + "#Thus, 1 mole of hydrogen gives 1/2 mole or 9 unit mass of water\n", + "m_h = m_f/60*p/100 #Mass of hydrogen in kg/min\n", + "m_s = 9*m_h #Mass of steam in exhaust gases in kg/min\n", + "m_d = m_e-m_s #Mass of dry exhaust gases in kg/min\n", + "Q_d = m_d*cp_g*(T2_g-T1_g) #Heat in dry exhaust gases kJ/min\n", + "lv = 2256.9 #Latent heat of vapourisation of water in kJ/kg\n", + "Q_s = m_s*((373-T1_g)+lv+cp_s*(T2_g-373)) #Heat in steam in exhaust gases in kJ/min\n", + "Q_r = Q1-Q_bp-Q_w-Q_d-Q_s #Heat in radiation in kJ/min\n", + "\n", + "#Results:\n", + "print \" a)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_it*100)\n", + "print \" b)Brake specific fuel consumption = %.1f gm/kWh\"%(bsfc)\n", + "print \" c)The volumetric efficiency, eta_vol = %.1f percent\"%(eta_vol*100)\n", + "print \" Heat balance sheet\\t Heat input = %.1f kJ/min, %d percent\"%(Q1,Q1/Q1*100)\n", + "print \"\\t Heat equivalent to b.p. = %.1f kJ/min, %.1f percent\"%(Q_bp,Q_bp/Q1*100)\n", + "print \"\\t Heat in cooling water = %.1f kJ/min, %.1f percent\"%(Q_w,Q_w/Q1*100)\n", + "print \"\\t Heat in dry exhaust gases = %.1f kJ/min, %.1f percent\"%(Q_d,Q_d/Q1*100)\n", + "print \"\\t Heat in steam in exhaust gases = %.1f kJ/min, %.1f percent\"%(Q_s,Q_s/Q1*100)\n", + "print \"\\t Heat in radiation = %.1f kJ/min, %.1f percent\"%(Q_r,Q_r/Q1*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated thermal efficiency, eta_it = 33.8 percent\n", + " b)Brake specific fuel consumption = 339.6 gm/kWh\n", + " c)The volumetric efficiency, eta_vol = 50.2 percent\n", + " Heat balance sheet\t Heat input = 3960.0 kJ/min, 100 percent\n", + "\t Heat equivalent to b.p. = 954.0 kJ/min, 24.1 percent\n", + "\t Heat in cooling water = 1108.4 kJ/min, 28.0 percent\n", + "\t Heat in dry exhaust gases = 928.7 kJ/min, 23.5 percent\n", + "\t Heat in steam in exhaust gases = 347.4 kJ/min, 8.8 percent\n", + "\t Heat in radiation = 621.4 kJ/min, 15.7 percent\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.7 Page No : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,sum\n", + "\n", + "#Given:\n", + "n = 12. #Number of cylinders\n", + "def f(W):\n", + " return W*N/180 #Power law of engine\n", + " \n", + "d = 38.\n", + "l = 50. #Bore and stroke in cm\n", + "N = 200. #Engine speed in rpm\n", + "Wall1 = 2000.\n", + "Wall2 = 2020. #Brake loads when all cylinders are firing in N\n", + "Wn = array([1795 ,1814, 1814, 1795, 1804, 1819, 1800, 1824, 1785, 1804, 1814, 1795]) #Brake load when cylinder number 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 are out in N\n", + "#Solution:\n", + "W = (Wall1+Wall2)/2 #Average of brake loads when all cylinders are firing in N\n", + "bp = f(W) #Total brake power in kW\n", + "ipn = bp-f(Wn) #Indicated power of cylinders number 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 in kW\n", + "ip = sum(ipn) #Total indicated power equal to sum of individual in kW\n", + "eta_m = bp/ip #Mechanical efficiency\n", + "A = math.pi/4*d**2*10**-4 #Area of cylinder in m**2\n", + "bmep = bp*1000/(n*l/100*A*N/(60)) #Brake mean effective pressure in Pascal\n", + "\n", + "#Results:\n", + "print \" The brake mean effective pressure, bmep = %.2f bar\"%(bmep*10**-5)\n", + "print \" The mechanical efficiency, eta_m = %.1f percent\"%(eta_m*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The brake mean effective pressure, bmep = 9.85 bar\n", + " The mechanical efficiency, eta_m = 81.8 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.8 Page No : 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "def f(W):\n", + " return W*N/20000 #Power law of engine\n", + "d = 95.\n", + "l = 120. #Bore and stroke in mm\n", + "N = 2400. #Engine speed in rpm\n", + "C_H = 83./17 #Carbon Hydrogen ratio by mass in fuel\n", + "d_o = 30. #Diameter of orifice in mm\n", + "Cd = 0.6 #Orifice coefficient of discharge\n", + "P = 550. #Net load on brake in N\n", + "P1 = 750. #Ambient pressure in mm of Hg\n", + "T1 = 25.+273 #Ambient temperature in K\n", + "deltaP_o = 14.5 #Head over orifice in cm of Hg\n", + "s = 0.831 #Specific gravity of fuel\n", + "t = 19.3 #Time to use 100 cc fuel in s\n", + "V_f = 100. #Volume of fuel used in t seconds in cc\n", + "\n", + "#Solution:\n", + "#(a)\n", + "bp = f(P) #Brake power at brake load in kW\n", + "A = math.pi/4*d**2*10**-6 #Area of cylinder in m**2\n", + "bmep = bp*1000/(n*l/1000*A*N/(2*60)) #Brake mean effective pressure in Pascal\n", + "#(b)\n", + "T = bp*1000/(2*math.pi*(N/60)) #Brake torque in Nm\n", + "#(c)\n", + "rho_f = s*1000 #Fuel density in kg/m**3\n", + "m_f = V_f*10**-6/t*3600*rho_f #Fuel flow rate in kg/hr\n", + "bsfc = m_f/bp #Brake specific fuel consumption in kg/kWh\n", + "#(e)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "P1 = P1/760*1.01325 #Ambient pressure in bar\n", + "rho_a = P1*10**5/(R*10**3*T1) #Mass density of air in kg/m**3\n", + "deltaP_o = 13.6*1000*9.81*deltaP_o/100 #Pressure drop across orifice in N/m**2\n", + "A_o = math.pi/4*d_o**2*10**-6 #Area of orifice in m**2\n", + "V_a = Cd*A_o*math.sqrt(2*deltaP_o/rho_a) #Air inhaled in m**3/s\n", + "V_s = (math.pi/4)*d**2*l*n*N/(2*60)*10**-9 #Swept volume in m**3/s\n", + "eta_vol = V_a/V_s #Volumetric efficiency\n", + "#(d)\n", + "pH = 17.\n", + "pC = pH*C_H #Percentage of Hydrogen and Carbon in fuel\n", + "pO = 23.3 #Percentage of Oxygen in air\n", + "H = 1.\n", + "C = 12.\n", + "O = 16. #Atomic masses of Hydrogen, Carbon, Oxygen in gm\n", + "mO2 = pC/100*(2*O/C)+pH/100*(O/(2*H)) #Oxygen required in kg/kg of fuel\n", + "m_a = mO2/(pO/100) #Mass of air in kg/kg of fuel\n", + "A_F_t = m_a #Theoritical air fuel ratio\n", + "m_a_act = V_a*rho_a #Actual air mass flow rate in kg/s\n", + "A_F_act = m_a_act/m_f*3600 #Actual air fuel ratio\n", + "P_e = (A_F_act-A_F_t)/A_F_t*100 #Percentage excess air\n", + "\n", + "#Results:\n", + "print \" a)The brake mean effective pressure, bmep = %.3f bar\"%(bmep*10**-5)\n", + "print \" b)The brake torque, T = %.1f Nm\"%(T)\n", + "print \" c)The brake specific fuel consumption, bsfc = %.3f kg/kWh\"%(bsfc)\n", + "print \" d)The percentage excess air = %.1f percent\"%(P_e)\n", + "print \" e)The volumetric efficiency, eta_vol = %.1f percent\"%(eta_vol*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The brake mean effective pressure, bmep = 6.466 bar\n", + " b)The brake torque, T = 262.6 Nm\n", + " c)The brake specific fuel consumption, bsfc = 0.235 kg/kWh\n", + " d)The percentage excess air = 36.6 percent\n", + " e)The volumetric efficiency, eta_vol = 75.6 percent\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.9 Page No : 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "d = 125.;l = 190. #Bore and stroke in mm\n", + "pC = 82./100;pH2 = 18./100 #Composition of Carbon and Hydrogen in petrol\n", + "pCO2 = 11.19/100;pO2 = 3.61/100;pN2 = 85.2/100 #Composition of Carbon di oxide, Oxygen, Nitrogen in dry exhaust\n", + "P1 = 1. #Pressure of mixture entering the cylinder in bar\n", + "T1 = 17.+273 #Temperature of mixture entering the cylinder in K\n", + "m_f = 31.3 #Mass of the petrol used in kg/hr\n", + "N = 1500. #Engine speed in rpm\n", + "m = 1.;T = 0.+273;P = 1.013;V = 0.773 #Mass, temperature, pressure, volume, of air in kg, K, bar, m**3\n", + "p = 23./100 #Composition of Oxygen in air by mass\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N2 = 14. #Atomic mass of Nitrogen(N)\n", + "A_F_s = (pC*2*O/C+pH2*O/(2*H))/(p) #Stoichiometric air fuel ratio\n", + "#Stoichiometric equation of combustion of fuel (petrol)\n", + "# 0.82/12[C] + 0.18/2[H2] + [0.21[O2] + 0.79[N2]]*x = a[CO2] + b[CO] + c[H2O] + d1[N2]\n", + "#Equating coefficients\n", + "a = pC/C;c = pH2/(2*H) #On balancing C and H\n", + "d1 = pN2/pCO2*a #On taking composition of CO2 and N2 in exhaust\n", + "x = d1/0.79 #On balancing N\n", + "m_a = (p*2*O)+((1-p)*2*N2) #Mass of air per mole air in kg/mole\n", + "A_F_act = x*m_a #Actual air fuel ratio\n", + "P_e = (A_F_act-A_F_s)/A_F_s*100 #Percentage excess air\n", + "R_a = P*100*V/(m*T) #Specific gas consmath.tant for air in kJ/kgK\n", + "V_a = A_F_act*R_a*T1/(P1*100) #Volume of air in m**3\n", + "#Given, rho_f = 3.35 * rho_a, V_f = 1/3.35 * V_a\n", + "V_f = V_a/A_F_act*1/3.35 #Volume of fuel in m**3/kg of fuel \n", + "V_m = V_a+V_f #Total volume of mixture in m**3/kg of fuel\n", + "V_m1 = V_m*m_f/60 #Mixture aspirated in m**3/min\n", + "V_s = (math.pi/4)*d**2*l*n*N/2*10**-9 #Swept volume in m**3/s\n", + "eta_v = V_m1/V_s*100 #Volumetric efficiency in percent\n", + "\n", + "#Results:\n", + "print \" The mass of air supplied per kg of petrol, m_a = %.2f kg/kg of fuel\"%(A_F_act)\n", + "print \" The percentage excess air = %.1f percent\"%(P_e)\n", + "print \" The volume of mixture per kg of petrol, V_m = %.2f m**3/kg fuel\"%(V_m)\n", + "print \" The volumetric efficiency of the engine, eta_v = %.0f percent\"%(eta_v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mass of air supplied per kg of petrol, m_a = 19.05 kg/kg of fuel\n", + " The percentage excess air = 20.8 percent\n", + " The volume of mixture per kg of petrol, V_m = 16.09 m**3/kg fuel\n", + " The volumetric efficiency of the engine, eta_v = 80 percent\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.10 Page No : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 27.\n", + "l = 45. #Bore and stroke in cm\n", + "D_b = 1.62 #Effective diameter of the brake wheel in m\n", + "t = 38.5 #Duration of test in min\n", + "N = 8080.\n", + "N1 = 3230. #Number of revolutions and explosions\n", + "P = 903. #Net load on brake in N\n", + "imep = 5.64 #Indicated mean effective pressure in bar\n", + "Vg1 = 7.7 #Gas used in m**3\n", + "T1 = 27.+273 #Temperature of the gas in K\n", + "deltaP1 = 135. #Pressure difference of gas above atmospheric pressure in mm of water\n", + "Patm = 750. #Atmospheric pressure in mm of Hg \n", + "CV = 18420. #Calorific value of the gas in kJ/m**3 at N.T.P.\n", + "m_w = 183. #Mass of cooling water used in kg\n", + "deltaT_w = 47. #Cooling water temperature rise in degreeC\n", + "\n", + "#Solution:\n", + "P1 = Patm+deltaP1/13.6 #Gas pressure in mm of Hg\n", + "P1 = P1/750 #Gas pressure in bar\n", + "T2 = 0+273;P2 = 1.013 #Normal temperature and pressure (N.T.P.) in K and bar\n", + "Vg2 = (P1/P2)*(T2/T1)*Vg1 #Gas consumption at N.T.P. in m**3\n", + "Q1 = Vg2/t*CV #Heat supplied in kJ/min\n", + "T = P*D_b/2 #Brake torque delivered in Nm\n", + "bp = 2*math.pi*(N/t*1/60)*(T)*10**-3 #Brake power in kW\n", + "bp = round(10*bp)/10\n", + "Q_bp = bp*60 #Heat equivalent to brake power in kJ/min\n", + "A = math.pi/4*d**2*10**-4 #Area of cylinder in m**2\n", + "ip = imep*10**2*l/100*A*(N1/t*1/60) #Indicated power in kW\n", + "ip = round(10*ip)/10\n", + "Q_ip = ip*60 #Heat equivalent to indicated power in kJ/min\n", + "fp = ip-bp #Frictional power in kW\n", + "Q_fp = fp*60 #Heat equivalent to frictional power in kJ/min\n", + "cp = 4.1868 #Specfic heat of water in kJ/kgK\n", + "Q_w = m_w/t*cp*(deltaT_w) #Heat in cooling water in kJ/min\n", + "Q_e = Q1-Q_bp-Q_w #Heat to exhaust, radiation in kJ/min\n", + "eta_it = Q_ip/Q1 #Indicated thermal efficiency\n", + "eta_bt = Q_bp/Q1 #Brake thermal efficiency\n", + "\n", + "#Results:\n", + "print \" The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_it*100)\n", + "print \" The brake thermal efficiency, eta_bt = %.1f percent\"%(eta_bt*100)\n", + "print \" Heat balance sheet\\t Heat supplied by the gas = %d kJ/min, %d percent\"%(Q1,Q1/Q1*100)\n", + "print \"\\t Heat equivalent to b.p. = %d kJ/min, %.1f percent\"%(Q_bp,Q_bp/Q1*100)\n", + "print \"\\t Heat in cooling water = %d kJ/min, %.1f percent\"%(Q_w,Q_w/Q1*100)\n", + "print \"\\t Heat to exhaust, radiation = %d kJ/min, %.1f percent\"%(Q_e,Q_e/Q1*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The indicated thermal efficiency, eta_it = 36.3 percent\n", + " The brake thermal efficiency, eta_bt = 28.8 percent\n", + " Heat balance sheet\t Heat supplied by the gas = 3353 kJ/min, 100 percent\n", + "\t Heat equivalent to b.p. = 966 kJ/min, 28.8 percent\n", + "\t Heat in cooling water = 935 kJ/min, 27.9 percent\n", + "\t Heat to exhaust, radiation = 1451 kJ/min, 43.3 percent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.11 Page No : 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "Li = 100. #Length of indicator diagram in mm\n", + "Ai = 2045. #Area of indicator diagram in mm**2\n", + "Pi = 2./10 #Pressure increment in cylinder from indicator pointer in bar/mm\n", + "d = 100.;l = 100. #Bore and stroke in mm\n", + "N = 900. #Engine speed in rpm\n", + "eta_m = 75. #Mechanical efficiency in percent\n", + "\n", + "#Solution:\n", + "Hi_av = Ai/Li #Mean height of indicator diagram in mm\n", + "imep = Hi_av*Pi #Mean effective pressure in bar\n", + "ip = imep*100*math.pi/4*d**2*l*N/(2*60)*10**-9 #Indicated power in kW\n", + "bp = ip*eta_m/100 #Brake power in kW\n", + "\n", + "#Results:\n", + "print \" The mean effective pressure, mep = %.2f bar\"%(imep)\n", + "print \" The indicated power, ip = %.2f kW\"%(ip)\n", + "print \" The brake power, bp = %.2f kW\"%(bp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mean effective pressure, mep = 4.09 bar\n", + " The indicated power, ip = 2.41 kW\n", + " The brake power, bp = 1.81 kW\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.12 Page No : 408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "bp = 110. #Brake power in kW\n", + "N = 1600. #Engine speed in rpm\n", + "CV = 43100. #Calorific value in kJ/kg\n", + "pC = 86.2/100;pH2 = 13.5/100;pNC = 0.3/100 #Composition of Carbon, Hydrogen and non combustibles in fuel\n", + "eta_v = 78. #Volumetric efficiency in percent\n", + "eta_it = 38. #Indicated thermal efficiency in percent\n", + "eta_m = 80. #Mechanical efficiency in percent\n", + "MS = 110. #Mixture strength in percent\n", + "l_d = 1.5 #Stroke bore ratio (l/d)\n", + "v_a = 0.772 #Specific volume of air in m**3/kg\n", + "p_m = 23.1/100;p_v = 20.8/100 #Composition of Oxygen in air by mass and volume\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N2 = 14. #Atomic mass of Nitrogen(N)\n", + "A_F_s = (pC*2*O/C+pH2*O/(2*H))/p_m #Stoichiometric air fuel ratio\n", + "A_F_act = (1+MS/100)*A_F_s #Actual air fuel ratio\n", + "Ma = (p_m*2*O)+((1-p_m)*2*N2) #Molecular mass of air per mole air in kg/mole\n", + "#Stoichiometric equation of combustion of fuel (petrol)\n", + "# 0.862/12[C] + 0.135/2[H2] + [p_v[O2] + (1-p_v)[N2]]*x = a[CO2] + b[H2O] + c[O2] + d[N2]\n", + "#Equating coefficients\n", + "a = pC/C;b = pH2/(2*H) #On balancing C and H\n", + "x = A_F_act/Ma #Moles of air\n", + "c = p_v*x-a-b/2 #On balancing O\n", + "d = (1-p_v)*x #On balancing N\n", + "pCO2 = a/(a+c+d);pO2 = c/(a+c+d);pN2 = d/(a+c+d) #Composition of Carbon di oxide, Oxygen, Nitrogen in dry exhaust\n", + "ip = bp/eta_m*100 #Indicated power in kW\n", + "m_f = ip/(eta_it/100*CV)*60 #Mass of fuel in kg/min\n", + "m_a = m_f*A_F_act #Mass of air in kg/min\n", + "V_a = m_a*v_a #Volume of air in m**3/min\n", + "V_s = V_a/eta_v*100 #Swept volume in m**3/min\n", + "V_s = V_s/(n*N/2) #Swept volume in m**3\n", + "def f(d): #Defining a function, f of unknown bore, d\n", + " l = l_d*d #Stroke in terms of bore\n", + " return math.pi/4*d**2*l-V_s\n", + "\n", + "d = fsolve(f,1)\n", + "l = l_d*d #Stroke in m\n", + "\n", + "#Results:\n", + "print \" The volumetric composition of dry exhaust gas, \\tCO2 = %.2f percent \\\n", + "\\nO2 = %.2f percent\\\n", + "\\nN2 = %.2f percent\"%(pCO2*100,pO2*100,pN2*100)\n", + "print \" The bore of the engine, d = %.2f cm The stroke of the engine, l = %.2f cm\"%(d*100,l*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The volumetric composition of dry exhaust gas, \tCO2 = 6.99 percent \n", + "O2 = 11.21 percent\n", + "N2 = 81.80 percent\n", + " The bore of the engine, d = 13.94 cm The stroke of the engine, l = 20.91 cm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.13 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 150.;l = 250. #Bore and stroke in mm\n", + "Li = 50. #Length of indicator diagram in mm\n", + "Ai = 450. #Area of indicator diagram in mm**2\n", + "ISR = 1.2 #Indicator spring rating in mm\n", + "N = 420. #Engine speed in rpm\n", + "T = 217. #Brake torque delivered in Nm\n", + "m_f = 2.95 #Fuel consumption in kg/hr\n", + "CV = 44000. #Calorific value in kJ/kg\n", + "m_w = 0.068 #Mass of cooling water used in kg/s\n", + "deltaT_w = 45. #Cooling water temperature rise in K\n", + "cp = 4.1868 #Specfic heat capacity of water in kJ/kgK\n", + "\n", + "#Solution:\n", + "Hi_av = Ai/Li #Mean height of indicator diagram in mm\n", + "imep = Hi_av/ISR #Mean effective pressure in bar\n", + "ip = imep*100*math.pi/4*d**2*l*N/(2*60)*10**-9 #Indicated power in kW (Error in book)\n", + "bp = 2*math.pi*(N/60)*(T)*10**-3 #Brake power in kW\n", + "eta_m = bp/ip #Mechanical efficiency (Error in book)\n", + "eta_bt = bp*3600/(m_f*CV) #Brake thermal efficiency\n", + "bsfc = m_f/bp #Brake specific fuel consumption in kg/kWh (Error in book)\n", + "#Energy balance\n", + "Power_f = m_f/3600*CV #Power in fuel in kW\n", + "Power_w = m_w*cp*deltaT_w #Power to cooling water in kW\n", + "Power_e = Power_f-bp-Power_w #Power to exhaust, radiation in kW\n", + "\n", + "#Results:\n", + "print \" The mechanical efficiency, eta_m = %d percent\"%(eta_m*100)\n", + "print \" The brake thermal efficiency, eta_bt = %.1f percent\"%(eta_bt*100)\n", + "print \" The specific fuel consumption, bsfc = %.3f kg/kWh\"%(bsfc)\n", + "print \" Energy balance\\t Power in fuel = %.1f kW, %d percent\"%(Power_f,Power_f/Power_f*100)\n", + "print \"\\t Brake power = %.2f kW, %.1f percent\"%(bp,bp/Power_f*100)\n", + "print \"\\t Power to cooling water = %.1f kW, %.1f percent\"%(Power_w,Power_w/Power_f*100)\n", + "print \"\\t Power to exhaust, radiation = %.1f kW, %.1f percent\"%(Power_e,Power_e/Power_f*100)\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mechanical efficiency, eta_m = 82 percent\n", + " The brake thermal efficiency, eta_bt = 26.5 percent\n", + " The specific fuel consumption, bsfc = 0.309 kg/kWh\n", + " Energy balance\t Power in fuel = 36.1 kW, 100 percent\n", + "\t Brake power = 9.54 kW, 26.5 percent\n", + "\t Power to cooling water = 12.8 kW, 35.5 percent\n", + "\t Power to exhaust, radiation = 13.7 kW, 38.0 percent\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.14 Page No : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "d = 70.\n", + "l = 100. #Bore and stroke in mm\n", + "V_c = 67. #Clearance volume in cm**2\n", + "N = 3960. #Engine speed in rpm\n", + "m_f = 19.5 #Fuel consumption in kg/hr\n", + "T = 140. #Brake torque delivered in Nm\n", + "CV = 44000. #Calorific value in kJ/kg\n", + "g = 1.4 #Specific heat ratio for air (gamma)\n", + "\n", + "#Solution:\n", + "bp = 2*math.pi*N/60*T*10**-3 #Brake power in kW\n", + "A = math.pi/4*d**2*10**-6 #Area of cylinder in m**2\n", + "bmep = bp*1000/(n*l/1000*A*N/(2*60)) #Brake mean effective pressure in Pascal\n", + "eta_bt = bp*3600/(m_f*CV) #Brake thermal efficiency\n", + "V_s = (math.pi/4)*d**2*l/1000 #Swept volume of one cylinder in cm**3\n", + "r = (V_s+V_c)/V_c #Compression ratio\n", + "eta = 1-1/r**(g-1) #Air standard efficiency\n", + "eta_r = eta_bt/eta #Relative efficiency\n", + "\n", + "#Results:\n", + "print \" a)The brake power, bp = %d kW\"%(bp)\n", + "print \" b)The brake mean effective pressure, bmep = %.2f bar\"%(bmep*10**-5)\n", + "print \" c)The brake thermal efficiency, eta_bt = %.1f percent\"%(eta_bt*100)\n", + "print \" d)The relative efficiency, eta_r = %.1f percent\"%(eta_r*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The brake power, bp = 58 kW\n", + " b)The brake mean effective pressure, bmep = 7.62 bar\n", + " c)The brake thermal efficiency, eta_bt = 24.4 percent\n", + " d)The relative efficiency, eta_r = 45.6 percent\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.15 Page No : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 178.;l = 330. #Bore and stroke in mm\n", + "N = 400. #Engine speed at full load in rpm\n", + "wmep = 6.2 #Working loop mep in bar\n", + "pmep = 0.35 #Pumping loop mep in bar\n", + "mep_dc = 0.62 #Mean effective pressure from the dead cycles in bar\n", + "N_f = 47. #Number of firing strokes at no load in rpm\n", + "\n", + "#Solution:\n", + "imep = wmep-pmep #Net indicated mean effective pressure per cycle in bar\n", + "N_d = N/2-N_f #Number of dead cycles at no load in rpm\n", + "ip1 = imep*100*l*math.pi/4*d**2*N_f/60*10**-9 #Indicated power at no load in kW\n", + "pp_dc = mep_dc*100*l*math.pi/4*d**2*N_d/60*10**-9 #Pumping power of dead cycles when no load in kW\n", + "fp = ip1-pp_dc #Friction power in kW\n", + "ip = imep*100*l*math.pi/4*d**2*N/(2*60)*10**-9 #Indicated power at full load in kW\n", + "bp = ip-fp #Brake power at full load in kW\n", + "eta_m = bp/ip #Mechanical efficiency at full load\n", + "\n", + "#Results:\n", + "print \" The brake power at full load, b.p. = %.2f kW\"%(bp)\n", + "print \" The mechanical efficiency at full load, eta_m = %.1f percent\"%(eta_m*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The brake power at full load, b.p. = 13.55 kW\n", + " The mechanical efficiency at full load, eta_m = 84.6 percent\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.16 Page No : 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 200.;l = 250. #Bore and stroke in mm\n", + "imep = 4.5*10**5 #Indicated mean effective pressure in N/m**2\n", + "m_f = 7. #Fuel consumption in kg/hr\n", + "CV = 43500. #Calorific value in kJ/kg\n", + "N = 180. #Engine speed in rpm\n", + "\n", + "#Solution:\n", + "#(a)\n", + "ip = imep*l*math.pi/4*d**2*N/60*10**-9*10**-3 #Indicated power in kW\n", + "#(b)\n", + "eta_it = ip*3600/(m_f*CV) #Indicated thermal efficiency\n", + "\n", + "#Results:\n", + "print \" a)The indicated power, ip = %.1f kW\"%(ip)\n", + "print \" b)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_it*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The indicated power, ip = 10.6 kW\n", + " b)The indicated thermal efficiency, eta_it = 12.5 percent\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch2.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch2.ipynb new file mode 100755 index 00000000..f82fd9a7 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch2.ipynb @@ -0,0 +1,1279 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c3383378510b380504e382cfd807c000d658d1bd67fd109500a9c9b8b74eae0a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Air Standard Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "T2 = 27.+273 #Temperature of cooling pond in K\n", + "eta = 30. #Efficiency in percent\n", + "Q2 = 200. #Heat received by cooling pond in kJ/s\n", + "\n", + "#Solution:\n", + "#Since, eta = (Q1-Q2)/Q1 = (T1-T2)/T1\n", + "T1 = T2/(1-(eta/100)) #Temperature of heat source in K\n", + "Q1 = Q2/(1-(eta/100)) #Heat supplied by source in kJ/s\n", + "Power = round(Q1-Q2) #Power of engine in kJ/s\n", + "\n", + "#Results:\n", + "print \" Temperature of heat source, T1 = %.1f degreeC\"%(T1-273)\n", + "print \" Power of engine = %d kW\"%(Power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature of heat source, T1 = 155.6 degreeC\n", + " Power of engine = 86 kW\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given:\n", + "T3 = 800+273.\n", + "T1 = 15.+273 #Temperature of a hot and cold reservoir in K\n", + "P3 = 210.\n", + "P1 = 1 #Maximum and minimum pressure in bar\n", + "\n", + "#Solution:\n", + "#Refer fig 2.21\n", + "eta_carnot = 1-(T1/T3) #Efficiency of Carnot cycle\n", + "T4 = T3 #Isothermal process 3-4\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "P4 = P1*(T4/T1)**(g/(g-1)) #Initial pressure of isentropic process 4-1 in bar\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "Q3_4 = R*T3*math.log(P3/P4) #Heat supplied in kJ/kg\n", + "W3_4 = Q3_4 #Work supplied in kJ/kg\n", + "Net_work = eta_carnot*Q3_4 #Net work output in kJ/kg\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "W4_1 = cv*(T4-T1) #Work for isentropic process in kJ/kg\n", + "Gross_work = W3_4+W4_1 #Gross work supplied in kJ/kg\n", + "work_ratio = Net_work/Gross_work #Work ratio\n", + "\n", + "#Results:\n", + "print \" The efficiency of the Carnot cycle, eta_carnot = %.1f percent\"%(eta_carnot*100)\n", + "print \" The work ratio of the Carnot cycle = %.3f\"%(work_ratio)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The efficiency of the Carnot cycle, eta_carnot = 73.2 percent\n", + " The work ratio of the Carnot cycle = 0.211\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "d = 17.\n", + "l = 30. #Bore and stroke in cm\n", + "V_c = 0.001025 #Clearance volume in m**3\n", + "\n", + "#Solution:\n", + "V_s = (math.pi/4)*d**2*l #Swept volume in cc\n", + "V_c = V_c*10**6 #Clearance volume in cc\n", + "V = V_c+V_s #Total cylinder volume in cc\n", + "r = V/V_c #Compression ratio\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "eta = 1-1/r**(g-1) #Air standard efficiency\n", + "\n", + "#Results:\n", + "print \" The Air standard efficiency of Otto cycle, eta = %.1f percent\"%(eta*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Air standard efficiency of Otto cycle, eta = 55.7 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 97. #Pressure at the beginning(1) in kN/m**2\n", + "T1 = 40.+273 #Temperature at the beginning(1) in K\n", + "r = 7. #Compression ratio\n", + "Q = 1200. #Heat supplied in kJ/kg\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "\n", + "#Solution:\n", + "#(a)\n", + "T2 = T1*(r)**(g-1)\n", + "T3 = round(Q/cv+T2) #Temperature at 2, 3 in K\n", + "#(b)\n", + "eta = 1-1/r**(g-1) #Thermal efficiency\n", + "#(c)\n", + "W = Q*eta #Workdone per cycle in kJ/kg\n", + "\n", + "#Results:\n", + "print \" a)The maximum temperature attained in the cycle, T3 = %d degreeC\"%(T3-273)\n", + "print \" b)The thermal efficiency of the cycle, eta = %.1f percent\"%(eta*100)\n", + "print \" c)The workdone during the cycle/kg of working fluid, W = %d kJ\"%(W)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The maximum temperature attained in the cycle, T3 = 2080 degreeC\n", + " b)The thermal efficiency of the cycle, eta = 54.1 percent\n", + " c)The workdone during the cycle/kg of working fluid, W = 649 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "r = 8. #Compression ratio\n", + "P1 = 1.\n", + "P3 = 50. #Pressure at 1, 3 in bar\n", + "T1 = 100.+273 #Temperature at 1 in K\n", + "m = 1. #Air flow in kg\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.22\n", + "#Point 1\n", + "V1 = m*R*10**3*T1/(P1*10**5) #Ideal gas equation, Volume at 1 in m**3\n", + "#Point 2\n", + "P2 = P1*r**g #Pressure at 2 in bar\n", + "V2 = V1/r #Volume at 2 in m**3\n", + "T2 = P2*V2*T1/(P1*V1) #Temperature at 2 in K\n", + "#Point 3\n", + "V3 = V2 #Constant volume process, Volume at 3 in m**3\n", + "T3 = (P3/P2)*T2 #Temperature at 3 in K (Wrong in book)\n", + "#Point 4\n", + "P4 = P3*(1/r)**g #Pressure at 4 in bar\n", + "V4 = V1 #Constant volume process, Volume at 4 in m**3\n", + "T4 = T1*(P4/P1) #Temperature at 4 in K\n", + "cv = R/(g-1) #Specific heat at consmath.tant volume in kJ/kgK\n", + "ratio = (cv*(T3-T2))/(cv*(T4-T1)) #Ratio of heat supplied to the heat rejected (Round off error)\n", + "\n", + "#Results:\n", + "print \" Point 1: Pressure = %d bar, Volume = %.4f m**3, Temperature = %d degreeC\"%(P1,V1,T1-273)\n", + "print \" Point 2: Pressure = %.1f bar, Volume = %.4f m**3, Temperature = %.1f degreeC\"%(P2,V2,T2-273)\n", + "print \" Point 3: Pressure = %.1f bar, Volume = %.4f m**3, Temperature = %.1f degreeC\"%(P3,V3,T3-273)\n", + "print \" Point 4: Pressure = %.2f bar, Volume = %.4f m**3, Temperature = %.1f degreeC\"%(P4,V4,T4-273)\n", + "print \" Ratio of heat supplied to the heat rejected = %.3f\"%(ratio)\n", + "#Textbook answer for T3 is wrong\n", + "#Round off error in the value of 'ratio'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Point 1: Pressure = 1 bar, Volume = 1.0705 m**3, Temperature = 100 degreeC\n", + " Point 2: Pressure = 18.4 bar, Volume = 0.1338 m**3, Temperature = 583.9 degreeC\n", + " Point 3: Pressure = 50.0 bar, Volume = 0.1338 m**3, Temperature = 2058.2 degreeC\n", + " Point 4: Pressure = 2.72 bar, Volume = 1.0705 m**3, Temperature = 741.7 degreeC\n", + " Ratio of heat supplied to the heat rejected = 2.297\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 15.+273 #Temperature at 1 in K\n", + "r = 8. #Compression ratio\n", + "Q1 = 1000. #Heat added in kJ/kg\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.23\n", + "#(a)\n", + "P2 = P1*(r)**g #Pressure at 2 in bar\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "T3 = Q1/cv+T2 #Temperature at 3 in K (Round off error)\n", + "#(b)\n", + "eta = 1-1/r**(g-1) #Air standard efficiency\n", + "#(c)\n", + "W = Q1*eta #Work done in kJ/kg (Round off error)\n", + "#(d)\n", + "Q2 = Q1-W #Heat rejected in kJ/kg\n", + "\n", + "#Results:\n", + "print \" a)The maximum temperature in the cycle, T3 = %d degreeC\"%(T3-273)\n", + "print \" b)The air standard efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" c)The workdone per kg of air = %d kJ/kg\"%(W)\n", + "print \" d)The heat rejected = %d kJ/kg\"%(Q2)\n", + "#Round off error in the values of 'T3' and 'W'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The maximum temperature in the cycle, T3 = 1781 degreeC\n", + " b)The air standard efficiency, eta = 56.5 percent\n", + " c)The workdone per kg of air = 564 kJ/kg\n", + " d)The heat rejected = 435 kJ/kg\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 1.05\n", + "P2 = 13.\n", + "P3 = 35. #Pressure at 1, 2, 3 in bar\n", + "T1 = 15.+273 #Temperature at 1 in K\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "\n", + "#Solution:\n", + "r = \"V1/V2\" #Compression ratio\n", + "g = R/cv+1 #Specific heat ratio(gamma)\n", + "r = (P2/P1)**(1/g) #By adiabatic process relation\n", + "eta = 1-1/r**(g-1) #Air standard efficiency\n", + "T2 = P2*T1/(P1*r) #Temperature at 2 in K\n", + "T3 = (P3/P2)*T2 #Temperature at 3 in K\n", + "Q1 = cv*(T3-T2) #Heat added in kJ/kg\n", + "W = Q1*eta #Work done in kJ/kg\n", + "V1 = 1*R*10**3*T1/(P1*10**5) #Ideal gas equation, Volume at 1 in m**3/kg\n", + "V2 = V1/r #Volume at 2 in m**3/kg\n", + "V_s = V1-V2 #Swept volume in m**3/kg\n", + "mep = W*1000/(V_s*10**5) #Mean effective pressire in bar\n", + "\n", + "#Results:\n", + "print \" The air standard efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" The compression ratio, r = %d\"%(r)\n", + "print \" The mean effective pressure, mep = %.2f bar\"%(mep)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air standard efficiency, eta = 51.3 percent\n", + " The compression ratio, r = 6\n", + " The mean effective pressure, mep = 5.60 bar\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 8. #Compression ratio\n", + "T1 = 20.+273 #Temperature at 1 in K\n", + "P1 = 1. #Pressure at 1 in bar\n", + "Q1 = 1800. #Heat added in kJ/kg\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "T3 = Q1/cv+T2 #Temperature at 3 in K (printing error)\n", + "P2 = P1*(r)**g #Pressure at 2 in bar\n", + "P3 = P2*(T3/T2) #Pressure at 3 in bar\n", + "T4 = T3/r**(g-1) #Temperature at 4 in K\n", + "eta = 1-1./r**(g-1) #Air standard efficiency\n", + "W1_2 = cv*(T1-T2) #Work done for process 1-2 in kJ/kg\n", + "W3_4 = cv*(T3-T4) #Work done for process 3-4 in kJ/kg\n", + "W = W1_2+W3_4 #Net work done for the cycle in kJ/kg\n", + "V1 = cv*(g-1)*10**3*T1/(P1*10**5) #Ideal gas equation, Volume at 1 in m**3/kg\n", + "V2 = V1/r #Volume at 2 in m**3/kg\n", + "V_s = V1-V2 #Swept volume in m**3/kg\n", + "mep = W*1000/(V_s*10**5) #Mean effective pressire in bar\n", + "\n", + "#Results:\n", + "print \" The maximum temperature, T3 = %d K\"%(T3)\n", + "print \" The maximum pressure, P3 = %.1f bar\"%(P3)\n", + "print \" The temperature at the end of the expansion process, T4 = %d K\"%(T4)\n", + "print \" The air standard efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" The mean effective pressure of the cycle, mep = %.1f bar\"%(mep)\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum temperature, T3 = 3180 K\n", + " The maximum pressure, P3 = 86.8 bar\n", + " The temperature at the end of the expansion process, T4 = 1384 K\n", + " The air standard efficiency, eta = 56.5 percent\n", + " The mean effective pressure of the cycle, mep = 13.8 bar\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given:\n", + "power = 50. #Internal power in kW\n", + "N = 4800. #Engine speed in rpm\n", + "l = 80.\n", + "d = 80. #Stroke and bore of engine in mm\n", + "n = 4. #Number of cylinders\n", + "V_c = 50000. #Clearance volume in mm**3\n", + "delta_P = 45. #Pressure rise during combustion in bar\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.24\n", + "V_s = (math.pi/4)*d**2*l #Swept volume in mm**3\n", + "r = (V_c+V_s)/V_c #Compression ratio\n", + "eta = 1-1/r**(g-1) #Air standard efficiency\n", + "ideal_mep = eta*delta_P/((g-1)*(r-1)) #Ideal mean effective pressure in bar\n", + "W = power*60*2/(n*N) #Actual work transfer per cycle per cylinder in kJ\n", + "V_s = V_s*1e-9 #Swept volume in m**3\n", + "actual_mep = W*1000/(V_s*10**5) #Actual mean effective pressire in bar\n", + "\n", + "#Results:\n", + "print \" The mean effective pressure of the engine, actual mep = %.2f bar\"%(actual_mep)\n", + "print \" The mean effective pressure of the Otto cycle, ideal mep = %.2f bar\"%(ideal_mep)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The mean effective pressure of the engine, actual mep = 7.77 bar\n", + " The mean effective pressure of the Otto cycle, ideal mep = 8.19 bar\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "CV = 42000. #Calorific value of the fuel in kJ/kg\n", + "a = 30./100\n", + "b = 70./100 #Fraction of compression stroke at point a, b\n", + "P_a = 1.33\n", + "P_b = 2.66 #Pressure at point a, b\n", + "n = 1.33 #Polytropic index\n", + "eta_cycle = 50./100 #Air standard cycle efficiency\n", + " \n", + "#Solution:\n", + "#Refer fig 2.25\n", + "#Since, compression follows PV**n = C\n", + "#Thus, P_a*V_a**n = P_b*V_b**n\n", + "#Assume a_b = V_a/V_b\n", + "a_b = (P_b/P_a)**(1/n) #Ratio of volume at a to volume at b\n", + "#Defining the function, ratio of r(compression ratio)\n", + "def Volume(r):\n", + " V_a = 1+0.7*(r-1)\n", + " V_b = 1+0.3*(r-1)\n", + " return V_a/V_b-a_b\n", + "\n", + "r = fsolve(Volume,1)\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "eta = round(1000*(1-1/r**(g-1)))/1000 #Air standard efficiency\n", + "eta_it = eta_cycle*eta #Indicated thermal efficiency\n", + "#Since, 1 kWh = 3600 kJ\n", + "Q1 = 3600/eta_it #Heat supplied in kJ/kWh\n", + "isfc = Q1/CV #Indicated specific fuel consumption in kg/kWh\n", + " \n", + "#Results:\n", + "print \" The compression ratio, r = %.2f\"%(r)\n", + "print \" The fuel consumption, isfc = %.3f kg/kWh\"%(isfc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The compression ratio, r = 4.51\n", + " The fuel consumption, isfc = 0.378 kg/kWh\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 14. #Compression ratio\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 27+273.\n", + "T3 = 2500.+273 #Temperature at 1 and 3 in K\n", + "\n", + "#Solution:\n", + "#Refer fig 2.26\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "T2 = T1*(r)**(g-1) #Temperature at 2 in K\n", + "P2 = P1*(T2/T1)**(g/(g-1)) #Pressure at 2 in bar\n", + "rho = T3/T2 #Cut off ratio\n", + "T3_T4 = (r/rho)**(g-1) #Temperature ratio T3/T4\n", + "T4 = round(T3/T3_T4) #Temperature at 4 in K\n", + "eta = 1-((T4-T1)/(g*(T3-T2))) #Efficiency of diesel cycle\n", + "R = 0.287\n", + "cp = 1.005\n", + "cv = 0.718 #Specific gas consmath.tant, heat capacities at consmath.tant pressure and volume in kJ/kgK\n", + "V1 = R*T1*10**3/(P1*10**5) #Volume at 1 in m**3/kg\n", + "V_s = V1*(1-1/r) #Stroke volume in m**3/kg\n", + "mep = (cp*(T3-T2)-cv*(T4-T1))*10**3/(V_s*10**5) #Mean effective pressure in bar\n", + "\n", + "#Results:\n", + "print \" The thermal efficiency of the diesel cycle, eta = %.1f percent\"%(eta*100)\n", + "print \" The mean effective pressure of the cycle, pm = %.2f bar\"%(mep)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The thermal efficiency of the diesel cycle, eta = 53.6 percent\n", + " The mean effective pressure of the cycle, pm = 12.88 bar\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 1.\n", + "P2 = 50. #Pressure at 1, 2 in bar\n", + "V1 = 1.\n", + "V3 = 0.1 #Volume at 1, 3 in m**3\n", + "T1 = 18.+273 #Temperature at 1 in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "T2 = T1*(P2/P1)**((g-1)/g) #Temperature at 2 in K\n", + "V2 = V1*(P1/P2)*(T2/T1) #Volume at 2 in m**3\n", + "T3 = round(T2*(V3/V2)) #Temperature at 2 in K (printing error)\n", + "V4 = V1 #Constant volume process, volume at 4 in m**3\n", + "T4 = T3*(V3/V4)**(g-1) #Temperature at 4 in K\n", + "eta = 1-((T4-T1)/(g*(T3-T2))) #Efficiency of diesel cycle\n", + "\n", + "#Results:\n", + "print \" Temperature at 1, T1 = %d K \\\n", + "\\nTemperature at 2, T2 = %.1f K \\\n", + "\\nTemperature at 3, T3 = %d K \\\n", + "\\nTemperature at 4, T4 = %.1f K\"%(T1,T2,T3,T4)\n", + "print \" The thermal efficiency of the cycle, eta = %.1f percent\"%(eta*100)\n", + "#Answer in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature at 1, T1 = 291 K \n", + "Temperature at 2, T2 = 889.8 K \n", + "Temperature at 3, T3 = 1455 K \n", + "Temperature at 4, T4 = 579.2 K\n", + " The thermal efficiency of the cycle, eta = 63.6 percent\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 18. #Compression ratio\n", + "p = 10. #percentage of stroke at which consmath.tant pressure process ends\n", + "P1 = 1.\n", + "T1 = 20.+273 #Pressure and temperature at 1 in bar and K\n", + "V_a = 100. #Volume of air used per hour in m**3/hr\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.27\n", + "#Calculation of cut off ratio (rho)\n", + "V_s = r-V_c #Swept volume in unit\n", + "V3 = V_c+V_s*p/100 #Volume at consmath.tant pressure process ends or point 3 in unit\n", + "V2 = V_c #Volume at consmath.tant pressure process starts or point 2 in unit\n", + "rho = V3/V2 #Cut off ratio\n", + "eta = 1-((rho**g-1)/(r**(g-1)*g*(rho-1))) #Thermal efficiency\n", + "P2 = P1*(r)**g #Pressure at 2(maximum) in bar (printing error)\n", + "P3 = P2 #Constant pressure process, pressure at 3 in bar\n", + "T2 = T1*(r)**(g-1) #Temperature at 2 in K\n", + "T3 = T2*rho #Temperature at 3(maximum) in K\n", + "#Consider the cycle for 100 m**3 of swept volume with air, thus\n", + "V_s = V_a #Swept volume in m**3/hr\n", + "V2 = V_s/(r-1) #Volume at 2 in m**3/hr\n", + "V1 = V_s+V2 #Volume at 1 in m**3/hr\n", + "V3 = rho*V2 #Volume at 3 in m**3/hr\n", + "V4 = V1 #Constant volume process, volume at 4 in m**2\n", + "P4 = P3*(V3/V4)**g #Pressure at 4 in bar\n", + "W = (P2*(V3-V2)+((P3*V3-P4*V4)-(P2*V2-P1*V1))/(g-1))*10**5 #Work done in cycle in Nm\n", + "ip = W/3600\n", + "\n", + "#Results:\n", + "print \" a)The maximum temperature, T3 = %d degreeC and the maximum pressure, P2 = %.1f bar\"%(T3-273,P2)\n", + "print \" b)The thermal efficiency of the engine, eta = %d percent\"%(eta*100)\n", + "print \" c)The indicated power of the engine, ip = %.2f kW\"%(ip/1000)\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The maximum temperature, T3 = 564 degreeC and the maximum pressure, P2 = 57.2 bar\n", + " b)The thermal efficiency of the engine, eta = 69 percent\n", + " c)The indicated power of the engine, ip = -2.26 kW\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "d = 15.\n", + "l = 20. #Diameter and stroke of cylinder in cm\n", + "p2 = 6. #Percentage of stroke at which cut off takes place\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.28\n", + "V_s = (math.pi/4)*d**2*l #Stroke volume in cm**3\n", + "V_c = math.pi*V_s/100 #Clearance volume in cm**3\n", + "V1 = V_s+V_c #Total volume at 1 in cm**3\n", + "V2 = V_c #Volume at 2 in cm**3\n", + "V3 = V2+p2*V_s/100 #Volume at 3 in cm**3\n", + "r = V1/V2 #Compression ratio\n", + "rho = V3/V2 #Cut off ratio\n", + "eta = 1-((rho**g-1)/(r**(g-1)*g*(rho-1))) #Thermal efficiency\n", + "\n", + "#Results:\n", + "print \" The air standard efficiency of the engine, eta = %d percent\"%(eta*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air standard efficiency of the engine, eta = 67 percent\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 15. #Compression ratio\n", + "P1 = 1.\n", + "T1 = 25.+273\n", + "V1 = .1 #Pressure, temperature, volume at 1 in bar, K, m**3\n", + "P4 = 65.\n", + "T4 = 1500.+273 #Pressure and temperature at 4 in bar and K\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.29\n", + "V2 = V1/r #Volume at 2 in m**3\n", + "P2 = P1*(r)**g #Pressure at 2 in bar\n", + "T2 = T1*(r)**(g-1) #Temperature at 2 in K\n", + "P3 = P4 #Pressure at 3 in bar\n", + "T3 = T2*(P3/P2) #Temperature at 3 in K\n", + "V3 = V2 #Volume at 3 in m**3\n", + "V4 = V3*(T4/T3) #Volume at 4 in m**3\n", + "V5 = V1 #Volume at 5 in m**3\n", + "P5 = P4*(V4/V5)**g #Pressure at 5 in bar\n", + "T5 = T4*(V4/V5)**(g-1) #Temperature at 5 in K\n", + "eta = 1-(T5-T1)/((T3-T2)+g*(T4-T3)) #Thermal efficiency\n", + "\n", + "#Results:\n", + "print \" Point 1: Pressure = %d bar \\\n", + "\\nVolume = %.1f m**3 \\\n", + "\\nTemperature = %d degreeC\"%(P1,V1,T1-273)\n", + "print \" Point 2: Pressure = %.1f bar \\\n", + "\\nVolume = %.4f m**3 \\\n", + "\\nTemperature = %d degreeC\"%(P2,V2,T2-273)\n", + "print \" Point 3: Pressure = %d bar \\\n", + "\\nVolume = %.4f m**3 \\\n", + "\\nTemperature = %d degreeC\"%(P3,V3,T3-273)\n", + "print \" Point 4: Pressure = %d bar \\\n", + "\\nVolume = %.4f m**3 \\\n", + "\\nTemperature = %d degreeC\"%(P4,V4,T4-273)\n", + "print \" Point 5: Pressure = %.2f bar \\\n", + "\\nVolume = %.1f m**3 \\\n", + "\\nTemperature = %d degreeC\"%(P5,V5,T5-273)\n", + "print \" The thermal efficiency of the cycle, eta = %d percent\"%(eta*100)\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Point 1: Pressure = 1 bar \n", + "Volume = 0.1 m**3 \n", + "Temperature = 25 degreeC\n", + " Point 2: Pressure = 44.3 bar \n", + "Volume = 0.0067 m**3 \n", + "Temperature = 607 degreeC\n", + " Point 3: Pressure = 65 bar \n", + "Volume = 0.0067 m**3 \n", + "Temperature = 1018 degreeC\n", + " Point 4: Pressure = 65 bar \n", + "Volume = 0.0092 m**3 \n", + "Temperature = 1500 degreeC\n", + " Point 5: Pressure = 2.29 bar \n", + "Volume = 0.1 m**3 \n", + "Temperature = 408 degreeC\n", + " The thermal efficiency of the cycle, eta = 64 percent\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 18. #Compression ratio\n", + "P1 = 1.01\n", + "P3 = 69. #Pressure at 1, 3 in bar\n", + "T1 = 20.+273 #Temperature at 1 in K\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "\n", + "#Solution:\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "P2 = P1*r**g #Pressure at 2 in bar\n", + "T3 = T2*(P3/P2) #Temperature at 3 in K\n", + "Q_v = cv*(T3-T2) #Heat added at consmath.tant volume in kJ/kg\n", + "#Given, Heat added at consmath.tant volume is equal to heat added at consmath.tant pressure\n", + "T4 = Q_v/cp+T3 #Temperature at 4 in K\n", + "rho = T4/T3 #Cut off ratio\n", + "T5 = T4*(rho/r)**(g-1) #Temperature at 5 in K\n", + "Q1 = 2*Q_v #Heat supplied in cycle in kJ/kg\n", + "Q2 = cv*(T5-T1) #Heat rejected in kJ/kg\n", + "eta = 1-Q2/Q1 #Thermal efficiency\n", + "W = Q1-Q2 #Work done by the cycle in kJ/kg\n", + "V1 = 1*R*T1/(P1*100) #Volume at 1 in m**3/kg\n", + "V2 = V1/r #Volume at 2 in m**3/kg\n", + "V_s = V1-V2 #Swept volume in m**3/kg\n", + "mep = W/(V_s*100) #Mean effective pressure in bar\n", + "\n", + "#Results:\n", + "print \" The air standard efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" The mean effective pressure, mep = %.2f bar\"%(mep)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The air standard efficiency, eta = 68.2 percent\n", + " The mean effective pressure, mep = 2.25 bar\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 Page No : 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Given:\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 50.+273 #Temperature at 1 in K\n", + "r = 14.\n", + "rho = 2.\n", + "alpha = 2. #Compression ratio, cut off ratio, pressure ratio\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig 2.30\n", + "T2 = T1*math.ceil(100*r**(g-1))/100 #Temperature at 2 in K\n", + "P2 = round(P1*r**g) #Pressure at 2 in bar\n", + "P3 = alpha*P2 #Pressure at 3 in bar\n", + "T3 = T2*(P3/P2) #Temperature at 3 in K\n", + "T4 = T3*rho #Temperature at 4 in K\n", + "e = r/rho #Expansion ratio\n", + "T5 = T4/e**(g-1) #Temperature at 5 in K (Round off error)\n", + "Q1 = cv*(T3-T2)+cp*(T4-T3) #Heat added in kJ/kg\n", + "Q2 = cv*(T5-T1) #Heat rejected in kJ/kg\n", + "eta = 1-Q2/Q1 #Air standard efficiency\n", + "\n", + "#Results:\n", + "print \" The temperature\\tT1 = %d K\\tT2 = %d K\\tT3 = %d K\\tT4 = %d K\\tT5 = %d K\"%(T1,T2,T3,T4,T5)\n", + "print \" The ideal thermal efficiency, eta = %.1f percent\"%(eta*100)\n", + "#Round off error in the value of 'T5'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The temperature\tT1 = 323 K\tT2 = 930 K\tT3 = 1860 K\tT4 = 3720 K\tT5 = 1708 K\n", + " The ideal thermal efficiency, eta = 60.8 percent\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page No : 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol, solve\n", + "\n", + "#Given:\n", + "r = 15. #Compression ratio\n", + "P1 = 1.\n", + "P3 = 55. #Pressure at 1, 3 in bar\n", + "T1 = 27.+273 #Temperature at 1 in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig 2.31\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "P2 = P1*r**g #Pressure at 2 in bar\n", + "alpha = P3/P2 #Constant volume pressure ratio\n", + "T3 = T2*(P3/P2) #Temperature at 3 in K\n", + "Q1_v = cv*(T3-T2) #Heat supplied at consmath.tant volume in kJ/kg\n", + "T4 = Symbol(\"T4\") #Defining temperature at 4 as unknown in K\n", + "#Given, heat supplied at consmath.tant volume, Q1_v is twice of heat supplied at consmath.tant pressure, Q1_p\n", + "Q1_p = cp*(T4-T3) #Heat supplied at consmath.tant pressure in kJ/kg\n", + "T4 =solve(Q1_v-2*Q1_p)[0] #Temperature at 4 in K\n", + "rho = T4/T3 #Cut off ratio\n", + "e = r/rho #Expansion ratio\n", + "T5 = T4/e**(g-1) #Temperature at 5 in K\n", + "eta = 1-(T5-T1)/((T3-T2)+g*(T4-T3)) #Thermal efficiency\n", + "eta = round(100*eta)\n", + "#Results:\n", + "print \" The consmath.tant volume pressure ratio, alpha = %.2f\"%(alpha)\n", + "print \" The cut off ratio, rho = %.2f\"%(rho)\n", + "print \" The thermal efficiency of the cycle, eta = %d percent\"%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The consmath.tant volume pressure ratio, alpha = 1.24\n", + " The cut off ratio, rho = 1.07\n", + " The thermal efficiency of the cycle, eta = 66 percent\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "n = 6. #Number of cylinders\n", + "V_s = 300. #Engine swept volume in cm**3 per cylinder\n", + "r = 10. #Compression ratio\n", + "N = 3500. #Engine speed in rpm\n", + "bp = 75. #Brake power in kW\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 15.+273 #Temperature at 1 in K (misprint)\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.32\n", + "#Otto cycle\n", + "eta_o = 1-1/r**(g-1) #Cycle efficiency\n", + "Q1 = bp/eta_o #Rate of heat addition in kW\n", + "P_o = bp/n #Power output per cylinder in kW\n", + "W_o = P_o/(N/(2*60)) #Work output per cycle per cylinder in kJ\n", + "mep_o = W_o/V_s*10**6/100 #Mean effective pressure in bar\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "Q1 = Q1/(n*N/(2*60)) #Heat supplied per cycle per cylinder in kJ\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "v1 = R*T1/(P1*100) #Volume of air in m**3/kg\n", + "V1 = V_s/(1-1/r)*10**-6 #Volume at 1 in m**3\n", + "m = V1/v1 #Mass of the air in kg\n", + "T3 = T2+Q1/(m*cv) #Temperature at 3 in K\n", + "#Diesel cycle\n", + "T31 = T2+Q1/(m*cp) #Temperature at 3 in diesel cycle in K\n", + "rho = T31/T2 #Cut off ratio for diesel cycle\n", + "eta_d = 1-((rho**g-1)/(r**(g-1)*g*(rho-1))) #The air standard efficiency\n", + "Power = eta_d*bp/(eta_o) #Power output in kW\n", + "P_d = Power/n #Power output per cylinder in kW\n", + "W_d = P_d/(N/(2*60)) #Work output per cycle per cylinder in kJ\n", + "mep_d = W_d/V_s*10**6/100 #Mean effective pressure in bar\n", + "\n", + "#Results:\n", + "print \" The rate of heat addition same for both Petrol and Diesel engine, Q1 = %.1f kW\"%(bp/eta_o)\n", + "print \" For Petrol engine\\t Cycle efficiency, eta = %.3f\\t Mean effective pressure, mep = %.2f bar\\t The maximum temperature of the cycle, Tmax = %.0f K\"%(eta_o,mep_o,T3)\n", + "print \" For Diesel engine\\t Cycle efficiency, eta = %.2f\\t Mean effective pressure, mep = %.2f bar\\t The maximum temperature of the cycle, Tmax = %.0f K\\t Power output = %.1f kW\"%(eta_d,mep_d,T3,Power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The rate of heat addition same for both Petrol and Diesel engine, Q1 = 124.6 kW\n", + " For Petrol engine\t Cycle efficiency, eta = 0.602\t Mean effective pressure, mep = 14.29 bar\t The maximum temperature of the cycle, Tmax = 3183 K\n", + " For Diesel engine\t Cycle efficiency, eta = 0.46\t Mean effective pressure, mep = 10.92 bar\t The maximum temperature of the cycle, Tmax = 3183 K\t Power output = 57.3 kW\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "r = 10. #Compression ratio\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 40.+273 #Temperature at 1 in K\n", + "Q1 = 2700. #Heat added in kJ\n", + "\n", + "#Solution:\n", + "#Refer fig 2.33\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "V1 = 1*R*T1/(P1*100) #Volume at 1 in m**3/kg\n", + "V5 = V1 #Volume at 5 in m**3/kg\n", + "V2 = V1/r #Volume at 2 in m**3/kg\n", + "V3 = V2 #Volume at 3 in m**3/kg\n", + "V_s = V1-V2 #Swept volume in m**3/kg\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "P2 = P1*r**g #Pressure at 2 in bar\n", + "#(a)Limited-pressure cycle\n", + "P3 = 70 #Limited maximum pressure in bar.\n", + "T3 = T2*(P3/P2) #Temperature at 3 in K\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "Q_v = cv*(T3-T2) #Heat supplied at consmath.tant volume in kJ\n", + "Q_p = Q1-Q_v #Heat supplied at consmath.tant pressure in kJ\n", + "T4 = Q_p/cp+T3 #Temperature at 4 in K\n", + "V4 = V3*(T4/T3) #Volume at 4 in m**3/kg\n", + "T5 = T4*(V4/V5)**(g-1) #Temperature at 5 in K\n", + "Q2 = cv*(T5-T1) #Heat rejected in kJ/kg\n", + "W = Q1-Q2 #Work done in kJ/kg\n", + "eta1 = W/Q1 #Efficiency of Limited pressure cycle\n", + "mep1 = W/(V_s*100) #Mean effective pressure in bar\n", + "#(b)Constant volume cycle\n", + "#All the heat is supplied at consmath.tant volume in consmath.tant volume cycle\n", + "T6 = Q1/cv+T2 #Temperature at 6 in K\n", + "P6 = P2*T6/T2 #Pressure at 6 in bar\n", + "T7 = T6*(1/r)**(g-1) #Temperature at 7 in K\n", + "Q2 = cv*(T7-T1) #Heat rejected in kJ/kg\n", + "W = Q1-Q2 #Work done in kJ/kg\n", + "eta2 = W/Q1 #Efficiency of consmath.tant volume cycle\n", + "mep2 = W/(V_s*100) #Mean effective pressure in bar\n", + "#If gases expanded isentropically to their original pressure of 1 bar, this point is named as 8\n", + "P8 = P1 #Pressure at 8 in bar\n", + "T8 = T6*(P8/P6)**((g-1)/g) #Temperature at 8 in K\n", + "Q3 = cp*(T8-T1) #Heat rejected at consmath.tant pressure in kJ/kg\n", + "W_inc = Q2-Q3 #Work increased if gas expanded isentropically in kJ/kg\n", + "\n", + "#Results:\n", + "print \" a)For Limited pressure cycle\\t The mean effective pressure, mep = %.2f bar \\\n", + "\\nThe thermal efficiency, eta = %.1f percent\"%(mep1,eta1*100)\n", + "print \" a)For Constant volume cycle\\t The mean effective pressure, mep = %.1f bar \\\n", + "\\nThe thermal efficiency, eta = %.1f percent\"%(mep2,eta2*100)\n", + "print \" Additional work per kg of charge = %.1f kJ\"%(W_inc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)For Limited pressure cycle\t The mean effective pressure, mep = 18.97 bar \n", + "The thermal efficiency, eta = 56.8 percent\n", + " a)For Constant volume cycle\t The mean effective pressure, mep = 20.1 bar \n", + "The thermal efficiency, eta = 60.2 percent\n", + " Additional work per kg of charge = 287.7 kJ\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.21 Page No : 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r = 6. #Compression ratio\n", + "P1 = 1.\n", + "P3 = 20. #Pressure at 1, 3 in bar\n", + "T1 = 27.+273 #Temperature at 1 in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 2.34\n", + "eta_otto = 1-1/r**(g-1) #Efficiency of Otto cycle (printing error)\n", + "#For Atkinson cycle\n", + "e = (P3/P1)**g #Expansion ratio\n", + "eta_atk = 1-g*(e-r)/(e**g-r**g) #Efficiency of Atkinson cycle\n", + "\n", + "#Results:\n", + "print \" Efficiency of Otto cycle = %.2f percent\"%(eta_otto*100)\n", + "print \" Efficiency of Atkinson cycle = %.1f percent\"%(eta_atk*100)\n", + "#Answer in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Efficiency of Otto cycle = 51.16 percent\n", + " Efficiency of Atkinson cycle = 75.4 percent\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.22 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "P1 = 1.02\n", + "P2 = 6.12 #Pressure at 1, 2 in bar\n", + "T1 = 15.+273\n", + "T3 = 800+273. #Temperature at 1, 3 in K\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat at consmath.tant pressure in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig 2.18\n", + "r_p = P2/P1 #pressure ratio\n", + "eta = 1-1/r_p**((g-1)/g) #Thermal efficiency\n", + "r_w = 1-(T1/T3)*r_p**((g-1)/g) #Work ratio\n", + "\n", + "#Results:\n", + "print \" The thermal efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" The work ratio, r_w = %.2f\"%(r_w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The thermal efficiency, eta = 40.1 percent\n", + " The work ratio, r_w = 0.55\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch26.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch26.ipynb new file mode 100755 index 00000000..3f1be1a6 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch26.ipynb @@ -0,0 +1,663 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:dc324bff07e4207a743eb569baad37317167795d0925a40f0cef5e09ad521401" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 26 : Gas Turbines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.1 Page No : 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from hornerc import horner\n", + "from sympy import Symbol, solve\n", + "\n", + "#Given:\n", + "P1 = 101.325 #Pressure at the beginning(1) in kPa\n", + "T1 = 27.+273 #Temperature at the beginning(1) in K\n", + "r_p = 6. #pressure ratio\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp = 1.005 #Specific heat in kJ/kgK\n", + "W_TC = 2.5 #Ratio of Turbine work and compressor work\n", + "m = 1. #Assume mass in kg\n", + "\n", + "#Solution:\n", + "#Refer fig 26.22\n", + "T2 = T1*r_p**((g-1)/g) #Temperature at 2 in K\n", + "T3 = Symbol('T3') #Defining temperature at 3 as a unknown in K\n", + "T4 = T3/r_p**((g-1)/g) #Defining temperature at 4 in terms of T3 in K\n", + "W_C = m*cp*(T2-T1) #Compressor work in kJ\n", + "W_T = m*cp*(T3-T4) #Turbine work in kJ\n", + "T3 = solve(W_T-W_TC*W_C)[0] #Temperature at 3 in K\n", + "T4 = horner(T4,T3) #Temperature at 4 in K\n", + "eta = ((T3-T4)-(T2-T1))/(T3-T2) #Cycle efficiency\n", + "\n", + "#Results:\n", + "print \" The maximum temperature in the cycle, T3 = %.1f K\"%(T3)\n", + "print \" The cycle efficiency, eta = %.2f percent\"%(eta*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "ImportError", + "evalue": "No module named hornerc", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mhornerc\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mhorner\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0msympy\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSymbol\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msolve\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;31m#Given:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mImportError\u001b[0m: No module named hornerc" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.2 Page No : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "T1 = 25.+273\n", + "T3 = 825.+273 #Minimum and maximum temperature in K\n", + "r_p = 4.5 #pressure ratio\n", + "eta_C = 85.\n", + "eta_T = 90. #Isentropic efficiencies of compressor and turbine in percent\n", + "P = 1300. #Power rating of the turbine in kW\n", + "cp = 1.005 #Specific heat in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 26.23\n", + "T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K\n", + "T41 = T3/r_p**((g-1)/g) #Isentropic temperature at 4 in K\n", + "T4 = T3-eta_T/100*(T3-T41) #Temperature at 4 in K\n", + "W_C = cp*(T2-T1) #Compressor work in kJ/kg\n", + "W_T = cp*(T3-T4) #Turbine work in kJ/kg\n", + "Q1 = cp*(T3-T2) #Heat added in kJ/kg\n", + "W = W_T-W_C #Work output in kJ/kg (Round off error)\n", + "eta = W/Q1 #Cycle efficiency\n", + "r_w = W/W_T #Work ratio\n", + "HR = 3600/(eta) #Heat rate in kJ/kWh (Round off error)\n", + "m = P/W #Mass flow rate in kg/s\n", + "\n", + "#Results:\n", + "print \" The specific work output, W = %d kJ/kg\"%(W)\n", + "print \" The cycle efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" The work ratio, rw = %.3f\"%(r_w)\n", + "print \" The heat rate = %d kJ/kWh\"%(HR)\n", + "print \" The mass flow rate for 1300 kW, m = %.2f kg/s\"%(m)\n", + "#Round off error in the values of 'W' and 'HR'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The specific work output, W = 157 kJ/kg\n", + " The cycle efficiency, eta = 25.7 percent\n", + " The work ratio, rw = 0.455\n", + " The heat rate = 14029 kJ/kWh\n", + " The mass flow rate for 1300 kW, m = 8.24 kg/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.3 Page No : 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "T1 = 25.+273\n", + "T3 = 750.+273 #Minimum and maximum temperature in K\n", + "r_p = 4. #pressure ratio\n", + "eta_C = 75. #Isentropic efficiency of compressor in percent\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 26.24\n", + "T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K\n", + "T41 = T3/r_p**((g-1)/g) #Isentropic temperature at 4 in K\n", + "#For zero efficiency of the cycle (T3-T4) = (T2-T1)\n", + "eta_T = (T2-T1)/(T3-T41) #Turbine efficiency\n", + "\n", + "#Results:\n", + "print \" The turbine efficiency for zero cycle efficiency, eta_T = %.1f percent\"%(eta_T*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The turbine efficiency for zero cycle efficiency, eta_T = 57.7 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.4 Page No : 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 1.\n", + "P2 = 6. #Pressure at entering and leaving of compressor in bar\n", + "T1 = 27.+273 #Temperature at entering in K\n", + "T3 = 700.+273 #Maximum temperature in K\n", + "eta_C = 0.80\n", + "eta_T = 0.85 #Isentropic efficiencies of compressor and turbine in percent\n", + "eta_c = 0.98 #Combustion efficiency in percent\n", + "P3 = P2-0.1 #Pressure at 3 after falling 0.1 bar in bar\n", + "cp_a = 1.005 #Specific heat of air in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp_g = 1.147 #Specific heat of gas in kJ/kgK\n", + "g1 = 1.333 #Specific heat ratio(gamma) of gas\n", + "CV = 42700. #Calorific value of fuel in kJ/kg\n", + "\n", + "#Solution:\n", + "#Refer fig 26.25\n", + "T21 = T1*(P2/P1)**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C)+T1 #Temperature at 2 in K\n", + "T41 = T3/(P3/P1)**((g1-1)/g1) #Isentropic temperature at 4 in K\n", + "T4 = T3-eta_T*(T3-T41) #Temperature at 4 in K\n", + "W_C = cp_a*(T2-T1) #Compressor work in kJ/kg\n", + "W_T = cp_g*(T3-T4) #Turbine work in kJ/kg\n", + "W = W_T-W_C #Work output in kJ/kg\n", + "Q1 = cp_g*(T3-T2)/eta_c #Heat added in kJ/kg\n", + "eta = W/Q1 #Cycle efficiency\n", + "r_w = W/W_T #Work ratio\n", + "AR = round(3600/W) #Air rate in kg/kWh\n", + "sfc = Q1*AR/CV #Specific fuel consumption in kg/kWh\n", + "A_F = AR/sfc #Air fuel ratio\n", + "\n", + "#Results:\n", + "print \" a)The thermal efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" b)The work ratio, rw = %.3f\"%(r_w)\n", + "print \" e)The air rate = %d kg/kWh\"%(AR)\n", + "print \" d)The specific fuel consumption, sfc = %.3f kg/kWh\"%(sfc)\n", + "print \" c)The air fuel ratio = %.1f\"%(A_F)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The thermal efficiency, eta = 17.8 percent\n", + " b)The work ratio, rw = 0.258\n", + " e)The air rate = 41 kg/kWh\n", + " d)The specific fuel consumption, sfc = 0.475 kg/kWh\n", + " c)The air fuel ratio = 86.4\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.5 Page No : 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "P1 = 1.\n", + "P2 = 6.20 #Pressure at entering and leaving of compressor in bar\n", + "T1 = 300. #Temperature at entering in K\n", + "eta_C = 88.\n", + "eta_T = 90. #Isentropic efficiencies of compressor and turbine in percent\n", + "CV = 44186. #Calorific value of fuel in kJ/kg\n", + "F_A = 0.017 #Fuel air ratio\n", + "cp_a = 1.005 #Specific heat of air in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp_g = 1.147 #Specific heat of gas in kJ/kgK\n", + "g1 = 1.333 #Specific heat ratio(gamma) of gas\n", + "\n", + "#Solution:\n", + "#Refer fig 26.26\n", + "T21 = T1*(P2/P1)**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K\n", + "m_a = 1 #Assume mass of air in kg\n", + "m_f = F_A*m_a #Mass of fuel in kg\n", + "T3 = (cp_a*m_a*T2+m_f*CV)/(cp_g*(m_a+m_f)) #Temperature at 3 in K\n", + "r_p = P2/P1 #pressure ratio\n", + "T41 = T3/r_p**((g1-1)/g1) #Isentropic temperature at 4 in K\n", + "T4 = T3-eta_T/100*(T3-T41) #Temperature at 4 in K\n", + "W_C = m_a*cp_a*(T2-T1) #Compressor work in kJ/kg\n", + "W_T = (m_a+m_f)*cp_g*(T3-T4) #Turbine work in kJ/kg\n", + "W = W_T-W_C #Work output in kJ/kg\n", + "Q1 = m_f*CV #Heat added in kJ/kg\n", + "eta = W/Q1 #Cycle efficiency\n", + "\n", + "#Results:\n", + "print \" The turbine work, W_T = %.2f kJ/kg\"%(W_T)\n", + "print \" The compressor work, W_C = %.2f kJ/kg\"%(W_C)\n", + "print \" The thermal efficiency, eta = %.2f percent\"%(eta*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The turbine work, W_T = 424.03 kJ/kg\n", + " The compressor work, W_C = 234.42 kJ/kg\n", + " The thermal efficiency, eta = 25.24 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.6 Page No : 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "T1 = 17.+273 #Temperature at entering in K\n", + "P1 = 1. #Pressure at entering of compressor in bar\n", + "r_p = 4.5 #pressure ratio\n", + "W = 4000. #Work output in kW\n", + "m = 40. #Mass flow rate in kg/s\n", + "e = 0.6 #Thermal ratio or effectiveness of heat exchanger\n", + "eta_C = 84. #Isentropic efficiency of compressor in percent\n", + "eta = 0.29 #Thermal efficiency\n", + "cp_a = 1.005 #Specific heat of air in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma) of air\n", + "cp_g = 1.07 #Specific heat of gas in kJ/kgK\n", + "g1 = 1.365 #Specific heat ratio(gamma) of gas\n", + "\n", + "#Solution:\n", + "#Refer fig 26.27\n", + "T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K\n", + "W = W/m #Specific work output in kJ/kg\n", + "Q1 = W/eta #Heat added in kJ/kg\n", + "W_C = cp_a*(T2-T1) #Compressor work in kJ/kg\n", + "W_T = W+W_C #Turbine work in kJ/kg\n", + "def f(T4):\n", + " T3 = T4-Q1/cp_g #Defining temperature at 3 in terms of T4 in K\n", + " T5 = T4-W_T/cp_g #Defining temperature at 5 in terms of T4 in K\n", + " return (cp_a*(T3-T2))/(cp_g*(T5-T2))-e\n", + "\n", + "#Since effectiveness from the relation must be equal to the given effectiveness\n", + "#Thus their difference must be equal to Zero, thus function, f solve for zero to get the value of variable(T4)\n", + "T4 = fsolve(f,1000)\n", + "T5 = T4-W_T/cp_g #Temperature at 5 in K\n", + "T51 = T4/r_p**((g1-1)/g1) #Isentropic temperature at 5 in K\n", + "eta_T = (T4-T5)/(T4-T51) #Isentropic efficiency of turbine\n", + "\n", + "#Results:\n", + "print \" The isentropic efficiency of the gas turbine, eta_T = %.1f percent\"%(eta_T*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The isentropic efficiency of the gas turbine, eta_T = 90.3 percent\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.7 Page No : 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "\n", + "#Given:\n", + "r_p = 4. #pressure ratio\n", + "eta_C = 0.86\n", + "eta_HPT = 0.84\n", + "eta_LPT = 0.80 #Isentropic efficiencies of compressor and high and low pressure turbine in percent\n", + "e = 70. #Effectiveness of heat exchanger in percent\n", + "eta_d = 0.92 #Mechanical efficiency of drive to compressor\n", + "T4 = 660.+273\n", + "T6 = 625.+273 #Temperature of gases entering H.P. turbine and L.P. turbine in K\n", + "cp_a = 1.005 #Specific heat of air in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cp_g = 1.15 #Specific heat of gas in kJ/kgK\n", + "g1 = 1.333 #Specific heat ratio(gamma) of gas\n", + "T1 = 15.+273 #Atmospheric temperature in K\n", + "P1 = 1. #Atmospheric pressure in bar\n", + "\n", + "#Solution:\n", + "#Refer fig 26.28, 26.29\n", + "P2 = r_p*P1;P4 = P2 #Pressure at 2, 4 in bar\n", + "T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_C)+T1 #Temperature at 2 in K\n", + "W_C = cp_a*(T2-T1) #Compressor work in kJ/kg\n", + "W_HPT = W_C/eta_d #Work done by H.P. turbine in kJ/kg\n", + "T5 = T4-W_HPT/cp_g #Temperature at 5 in K\n", + "T51 = T4-(T4-T5)/(eta_HPT) #Isentropic temperature at 5 in K\n", + "P5 = P4/(T4/T51)**(g1/(g1-1)) #Pressure at 5 in bar\n", + "P6 = P5;P7 = P1 #Pressure at 6, 7 in bar\n", + "T71 = T6*(P7/P6)**((g1-1)/g1) #Isentropic temperature at 7 in K\n", + "T7 = T6-eta_LPT*(T6-T71) #Temperature at 7 in K\n", + "W_LPT = cp_g*(T6-T7) #Work done by L.P. turbine in kJ/kg\n", + "T3 = Symbol('T3') #Defining temperature at 3 as a unknown in K\n", + "e1 = (cp_a*(T3-T2))/(cp_g*(T7-T2)) #Effectiveness in terms of T3\n", + "#Effectiveness from the relation must be equal to the given effectiveness\n", + "#Thus their difference must be zero\n", + "T3 = solve(e1-e/100)[0] #Temperature at 3 in K\n", + "W = cp_g*(T6-T7) #Work output in kJ/kg (error in book)\n", + "Q1 = cp_g*(T4-T3)+cp_g*(T6-T5) #Heat added in kJ/kg\n", + "eta = W/Q1 #Cycle efficiency\n", + "\n", + "#Results:\n", + "print \" The pressure of the gas entering L.P.T., P6 = %.2f bar\"%(P6)\n", + "print \" The net specific power, W = %.2f kW/kg/s\"%(W)\n", + "print \" The overall efficiency, eta = %.4f\"%(eta)\n", + "#Answer is wrong in book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The pressure of the gas entering L.P.T., P6 = 1.66 bar\n", + " The net specific power, W = 98.23 kW/kg/s\n", + " The overall efficiency, eta = 0.2738\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.8 Page No : 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "r_p = 6. #pressure ratio\n", + "e = 65. #Effectiveness of heat exchanger in percent\n", + "T5 = 800.+273\n", + "T1 = 15.+273 #Inlet temperature to H.P. turbine and L.P. compressor in K\n", + "m = 0.7 #Mass flow rate in kg/s\n", + "eta_C = 0.8\n", + "eta_HPT = 0.85\n", + "eta_LPT = 0.85 #Isentropic efficiency of compressor and high and low pressure turbine in percent\n", + "eta_d = 98. #Mechanical efficiency to drive compressor in percent\n", + "eta_c = 97. #Combustion efficiency in percent\n", + "CV = 42600. #Calorific value of fuel in kJ/kg\n", + "cp = 1.005 #Assume specific heat in kJ/kgK\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "\n", + "#Solution:\n", + "#Refer fig 26.30, 26.31\n", + "P1 = 1. #Atmospheric pressure in bar\n", + "P3 = r_p*P1\n", + "P5 = P3\n", + "P7 = P1 #Pressure at 3, 5, 7 in bar\n", + "T31 = T1*r_p**((g-1)/g) #Isentropic temperature at 3 in K\n", + "T31 = round(T31*10)/10\n", + "T3 = (T31-T1)/(eta_C)+T1 #Temperature at 3 in K\n", + "W_C = m*cp*(T3-T1) #Compressor work in kW\n", + "W_HPT = W_C*100/eta_d #Work done by H.P. turbine in kW\n", + "T6 = T5-W_HPT/(m*cp) #Temperature at 6 in K\n", + "T61 = T5-(T5-T6)/(eta_HPT) #Isentropic temperature at 6 in K\n", + "P6 = P5/(T5/T61)**(g/(g-1)) #Pressure at 6 in bar\n", + "T71 = T6*(P7/P6)**((g-1)/g) #Isentropic temperature at 7 in K\n", + "T7 = T6-eta_LPT*(T6-T71) #Temperature at 7 in K\n", + "W = m*cp*(T6-T7) #Net power developed in kW\n", + "T4 = e/100*(T7-T3)+T3 #Temperature at 4 in K\n", + "Q1 = m*cp*(T5-T4)*100/eta_c #Heat supplied in kJ/s\n", + "eta = W/Q1 #Overall thermal efficiency\n", + "sfc = Q1*3600/(CV*W) #Specific fuel consumption in kg/kWh\n", + "\n", + "#Results:\n", + "print \" a)The net power developed, W = %.2f kW\"%(W)\n", + "print \" b)The overall thermal efficiency, eta = %.1f percent\"%(eta*100)\n", + "print \" c)The specific fuel consumption, sfc = %.3f kg/kWh\"%(sfc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The net power developed, W = 89.00 kW\n", + " b)The overall thermal efficiency, eta = 28.4 percent\n", + " c)The specific fuel consumption, sfc = 0.298 kg/kWh\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.9 Page No : 473" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "P1 = 4;P2 = 16 #Pressure at entering and leaving of compressor in bar\n", + "T1 = 320;T2 = 590 #Temperature at entering and leaving of compressor in K\n", + "e = 70 #Effectiveness of heat exchanger in percent\n", + "P3 = 15.5;P4 = 4.2 #Pressure at entering and leaving of turbine in bar\n", + "T3 = 1400;T4 = 860 #Temperature at entering and leaving of turbine in K\n", + "P = 100 #Net power output in MW\n", + "cp_h = 5.2 #Specific heat of helium in kJ/kgK\n", + "g_h = 1.67 #Specific heat ratio(gamma) for helium\n", + "\n", + "#Solution:\n", + "#Refer fig 26.32, 26.33\n", + "T21 = T1*(P2/P1)**((g_h-1)/g_h) #Isentropic temperature at 2 in K\n", + "eta_C = (T21-T1)/(T2-T1) #Compressor efficiency\n", + "T41 = T3/(P3/P4)**((g_h-1)/g_h) #Isentropic temperature at 4 in K\n", + "eta_T = (T3-T4)/(T3-T41) #Turbine efficiency\n", + "Tx = T2+(T4-T2)*e/100 #Temperature at leaving of regenerator in K\n", + "Q1 = cp_h*(T3-Tx) #Heat supplied in kJ/kg\n", + "W_T = cp_h*(T3-T4) #Turbine work in kJ/kg\n", + "W_C = cp_h*(T2-T1) #Compressor work in kJ/kg\n", + "W = W_T-W_C #Work output in kJ/kg\n", + "eta = W/Q1 #Cycle efficiency\n", + "T5 = T4-(Tx-T2) #Temperature at 5 in K\n", + "Qout = cp_h*(T5-T1) #Heat rejected in precooler in kJ/kg\n", + "m_h = P*1000/W #Helium flow rate in kg/s\n", + "#Results:\n", + "\n", + "print \" a)The compressor efficiency, ,eta_C = %.3f\\tThe turbine efficiency, eta_T = %.3f\"%(eta_C,eta_T)\n", + "print \" b)The thermal efficiency of the cycle, eta = ; %.1f percent\"%(eta*100)\n", + "print \" c)The heat rejected in the cooler before compressor, Qout = %.1f kJ/kg\"%(Qout)\n", + "print \" d)The helium flow rate for the net power output of 100 MW, m = %.2f kg/s\"%(m_h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The compressor efficiency, ,eta_C = 0.882\tThe turbine efficiency, eta_T = 0.946\n", + " b)The thermal efficiency of the cycle, eta = ; 43.5 percent\n", + " c)The heat rejected in the cooler before compressor, Qout = 1825.2 kJ/kg\n", + " d)The helium flow rate for the net power output of 100 MW, m = 71.23 kg/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26.10 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Calculations on closed cycle gas turbine\n", + "#Given:\n", + "r_p = 9. #Overall pressure ratio\n", + "eta_LPC = 85.;eta_HPC = 85. #Isentropic efficiency of L.P. and H.P. compressors in percent\n", + "eta_LPT = 90.;eta_HPT = 90. #Isentropic efficiency of L.P. and H.P. turbine in percent\n", + "T1 = 300.;T5 = 1100. #Inlet temperature to turbine and compressor in K\n", + "cp_ar = 0.5207 #Specific heat of Argon in kJ/kgK\n", + "g_ar = 1.667 #Specific heat ratio(gamma) for Argon\n", + "R_ar = 0.20813 #Specific gas consmath.tant for Argon in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig. 26.34; 26.35\n", + "m_ar = 1. #Assume mass flow rate in kg/s\n", + "P1 = 1. #Assume pressure at entering to L.P. compressor in bar\n", + "P2 = math.sqrt(r_p)*P1 #Pressure at leaving to L.P. compressor in bar\n", + "P3 = P2 #Pressure at entering to H.P. compressor in bar\n", + "P4 = r_p*P1 #Pressure at leaving to H.P. compressor in bar\n", + "T21 = T1*(P2/P1)**((g_ar-1)/g_ar) #Isentropic temperature at 2 in K\n", + "T2 = (T21-T1)/(eta_LPC/100)+T1 #Temperature at ;2 in K\n", + "W_LPC = m_ar*cp_ar*(T2-T1) #Work required by L.P. compressor in kJ/kg/s\n", + "T3 = T1 #Temperature at 3 in K\n", + "T41 = T3*(P4/P3)**((g_ar-1)/g_ar) #Isentropic temperature at 4 in K\n", + "T4 = (T41-T3)/(eta_HPC/100)+T3 #Temperature at 4 in K\n", + "#Work required is same for both L.P.C. and H.P.C. as pressure ratio is same for both\n", + "W_HPC = W_LPC #Work required by H.P. compressor in kJ/kg/s\n", + "P5 = P4;P6 = P2;P7 = P6;P8 = P1 #Pressure at 5; 6; 7; 8 in bar\n", + "T61 = T5/(P5/P6)**((g_ar-1)/g_ar) #Isentropic temperature at 6 in K\n", + "T6 = T5-eta_HPT/100*(T5-T61) #Temperature at 6 in K\n", + "W_HPT = m_ar*cp_ar*(T5-T6) #Work done by H.P. turbine in kJ/kg/s\n", + "#Work done is same for both L.P.T. and H.P.T. as pressure ratio is same for both\n", + "W_LPT = W_HPT #Work done by L.P. turbine in kJ/kg/s\n", + "T7 = T5 #Temperature at 7 in K\n", + "#(a)\n", + "W = (W_HPT+W_LPT)-(W_HPC+W_LPC) #Net work done in kW/kg\n", + "#(b)\n", + "r_w = W/(W_HPT+W_LPT) #Work ratio\n", + "#(c)\n", + "Q1_c = m_ar*cp_ar*(T5-T4) #Heat supplied in combustion chamber in kJ/kg/s\n", + "Q1_r = m_ar*cp_ar*(T7-T6) #Heat supplied in reheater in kJ/kg/s\n", + "eta = W/(Q1_c+Q1_r) #Overall efficiency\n", + "\n", + "#Results:\n", + "print \" a)The work done per kg of fuel flow, W = %.1f kW/kg\"%(W)\n", + "print \" b)The work ratio, r_w = %.3f\"%(r_w)\n", + "print \" c)The overall efficiency, eta = %.3f\"%(eta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The work done per kg of fuel flow, W = 163.8 kW/kg\n", + " b)The work ratio, r_w = 0.447\n", + " c)The overall efficiency, eta = 0.329\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch27.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch27.ipynb new file mode 100755 index 00000000..0c9ecd2d --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch27.ipynb @@ -0,0 +1,438 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e9e136e6cd7b067b8f2b6c703dd856a477558871a3474aaeaaa197edd5a7b0af" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 27 : Testing of Internal Combustion Engines According to Indian and International Standards" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.1 Page No : 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "Pr = 500. #Smath.radians(numpy.arcmath.tan(ard reference brake power in kW\n", + "eta_m = 85. #Mechanical efficiency in percent\n", + "br = 220. #Smath.radians(numpy.arcmath.tan(ard specific fuel consumption in g/kWh\n", + "px = 87. #Site ambient air pressure in kPa\n", + "Tx = 45.+273 #Site ambient temperature in K\n", + "phix = 80./100 #Relative humidity at site\n", + "\n", + "#Solution:\n", + "#Refer table 27.1, 27.2 and 27.3\n", + "a = 1. #Factor\n", + "m = 1.;n = 0.75;q = 0 #Exponents\n", + "psx = 9.6 #Saturation vapour pressure at site in kPa\n", + "psr = 3.2 #Smath.radians(numpy.arcmath.tan(ard saturation vapour pressure in kPa\n", + "pr = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tr = 298. #Smath.radians(numpy.arcmath.tan(ard air temperature in K\n", + "phir = 0.3 #Smath.radians(numpy.arcmath.tan(ard relative humidity\n", + "k = ((px-a*phix*psx)/(pr-a*phir*psr))**m*(Tr/Tx)**n #The ratio of indicated power\n", + "alpha = k-0.7*(1-k)*(100/eta_m-1) #Power adjustment factor\n", + "Beta = k/alpha #Fuel consumption adjustment factor\n", + "Px = alpha*Pr #Brake power at site in kW\n", + "bx = Beta*br #Specific fuel consumption at site in g/kWh\n", + "\n", + "#Results:\n", + "print \" The site continuous net brake power, Px = %.1f kW\"%(Px)\n", + "print \" The site continuous specific fuel consumption, bx = %.1f g/kWh\"%(bx)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The site continuous net brake power, Px = 366.8 kW\n", + " The site continuous specific fuel consumption, bx = 228.8 g/kWh\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.2 Page No : 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "Pr = 1000. #Smath.radians(numpy.arcmath.tan(ard reference brake power in kW\n", + "eta_m = 90. #Mechanical efficiency in percent\n", + "Pir = 2. #Boost pressure ratio\n", + "Tra = 313. #Substitute reference air temperature in K\n", + "Pimax = 2.36 #Maximum boost pressure ratio\n", + "h = 4000. #Altitude in m\n", + "px = 61.5 #Site ambient air pressure in kPa\n", + "Tx = 323. #Site ambient temperature in K\n", + "Tcx = 310. #Charge air coolent temperature at site in K\n", + "\n", + "#Solution:\n", + "#Refer table 27.1, 27.2 and 27.3\n", + "m = 0.7\n", + "n = 1.2\n", + "q = 1. #Exponents\n", + "pr = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tcr = 298. #Smath.radians(numpy.arcmath.tan(ard charge air coolent temperature in K\n", + "Tr = 298. #Smath.radians(numpy.arcmath.tan(ard air temperature in K\n", + "pra = pr*Pir/Pimax #Smath.radians(numpy.arcmath.tan(ard reference pressure in kPa\n", + "pra = round(10*pra)/10\n", + "k = (px/pra)**m*(Tra/Tx)**n*(Tcr/Tcx)**q #The ratio of indicated power\n", + "alpha = k-0.7*(1-k)*(100/eta_m-1) #Power adjustment factor\n", + "Px1 = round(alpha*Pr) #Brake power at site in kW\n", + "#If reference conditions are not changed\n", + "k = (px/pr)**m*(Tr/Tx)**n*(Tcr/Tcx)**q #The ratio of indicated power\n", + "alpha = k-0.7*(1-k)*(100/eta_m-1) #Power adjustment factor\n", + "Px2 = round(alpha*Pr) #Brake power at site in kW\n", + "\n", + "#Results:\n", + "print \" Power available at an altitude of 4000m, Px = %d kW\"%(Px1)\n", + "print \" Power available at an altitude of 4000m if reference conditions are not changed, Px = %d kW\"%(Px2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power available at an altitude of 4000m, Px = 720 kW\n", + " Power available at an altitude of 4000m if reference conditions are not changed, Px = 592 kW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.3 Page No : 493" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import floor\n", + "\n", + "#Given:\n", + "Px = 640. #Brake power at site in kW\n", + "px = 70. #Site ambient air pressure in kPa\n", + "Tx = 330. #Site ambient temperature in K\n", + "Tcx = 300. #Charge air coolent temperature at site in K\n", + "eta_m = 85. #Mechanical efficiency in percent\n", + "py = 100. #Test ambient pressure in kPa\n", + "Tcy = 280. #Charge air coolent temperature at test in K\n", + "Ty = 300. #Test ambient temperature in K\n", + "#Solution:\n", + "#Refer table 27.1, 27.2 and 27.3\n", + "m = 0.7\n", + "n = 1.2\n", + "q = 1. #Exponents\n", + "pr = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tcr = 298. #Smath.radians(numpy.arcmath.tan(ard charge air coolent temperature in K\n", + "Tr = 298. #Smath.radians(numpy.arcmath.tan(ard air temperature in K\n", + "kr = (px/pr)**m*(Tr/Tx)**n*(Tcr/Tcx)**q #The ratio of indicated power\n", + "kr = floor(1000*kr)/1000\n", + "alphar = kr-0.7*(1-kr)*(100/eta_m-1) #Power adjustment factor\n", + "Pr = Px/alphar #Smath.radians(numpy.arcmath.tan(ard reference brake power in kW\n", + "ky = (py/pr)**m*(Tr/Ty)**n*(Tcr/Tcy)**q #The ratio of indicated power at test\n", + "alphay = ky-0.7*(1-ky)*(100/eta_m-1) #Power adjustment factor at test\n", + "Py = Pr*alphay #Brake power at test in kW (Round off error)\n", + "\n", + "#Results:\n", + "print \" Power developed under test ambient conditions, Py = %.0f kW\"%(Py)\n", + "#Round off error in the value of 'Py'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power developed under test ambient conditions, Py = 1054 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.4 Page No : 498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "#Datas are taken from Ex. 27.3\n", + "Px = 640. #Brake power at site in kW\n", + "eta_m = 85. #Mechanical efficiency in percent\n", + "px = 70. #Site ambient air pressure in kPa\n", + "py = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tx = 330. #Site ambient temperature in K\n", + "Ty = 300. #Test ambient temperature in K\n", + "p2_py = 2.5 #Pressure ratio\n", + "by = 238. #Specific fuel consumption at test in g/kWh\n", + "\n", + "#Solution:\n", + "#Refer table 27.1, 27.2 and 27.3\n", + "m = 0.7\n", + "n = 1.2\n", + "q = 1. #Exponents\n", + "ky = (py/px)**m #The ratio of indicated power at test\n", + "alphay = ky-0.7*(1-ky)*(100/eta_m-1) #Power adjustment factor at test\n", + "Py = round(Px*alphay) #Brake power at test in kW\n", + "#From fig 27.1\n", + "Tx_Ty = Tx/Ty #Temperature ratio\n", + "p1_py = 0.925 #Ratio\n", + "p1 = p1_py*py #Air pressure after throttle in kPa (printing error)\n", + "Betay = ky/alphay #Fuel consumption adjustment factor at test\n", + "bx = by/Betay #Specific fuel consumption at site in g/kWh\n", + "\n", + "#Results:\n", + "print \" Power developed on the test bed, Py = %d kW\"%(Py)\n", + "print \" The pressure behind the throttle plate, p1 = %.1f kPa\"%(p1)\n", + "print \" The fuel consumption adjusted to site ambient conditions, bx = %d g/kWh\"%(bx)\n", + "\n", + "#Answer in the book is printed wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power developed on the test bed, Py = 844 kW\n", + " The pressure behind the throttle plate, p1 = 92.5 kPa\n", + " The fuel consumption adjusted to site ambient conditions, bx = 244 g/kWh\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.5 Page No : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "Py = 640. #Brake power at test in kW\n", + "py = 98. #Test ambient pressure in kPa\n", + "Ty = 303. #Test ambient temperature in K\n", + "phiy = 0.8 #Relative humidity at test\n", + "\n", + "#Solution:\n", + "#Refer table 27.1, 27.3\n", + "psy = 4.2 #Saturation vapour pressure at test in kPa\n", + "psr = 3.2 #Smath.radians(numpy.arcmath.tan(ard saturation vapour pressure in kPa\n", + "pr = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tr = 298. #Smath.radians(numpy.arcmath.tan(ard air temperature in K\n", + "phir = 0.3 #Smath.radians(numpy.arcmath.tan(ard relative humidity\n", + "alpha_a = ((pr-phir*psr)/(py-phiy*psy))**1.2*(Ty/Tr)**0.6 #Correction factor for CI engine\n", + "Pr = round(alpha_a*Py) #Smath.radians(numpy.arcmath.tan(ard reference brake power in kW\n", + "\n", + "#Results:\n", + "print \" The power at standard reference conditions, Pr = %d kW\"%(Pr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power at standard reference conditions, Pr = 683 kW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.6 Page No : 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "Py = 896. #Brake power at test in kW\n", + "py = 96. #Test ambient pressure in kPa\n", + "Ty = 302. #Test ambient temperature in K\n", + "phiy = 0.2 #Relative humidity at test\n", + "px = 98. #Site ambient air pressure in kPa\n", + "Tx = 315. #Site ambient temperature in K\n", + "phix = 0.4 #Relative humidity at site\n", + "N = 1800. #Engine speed in rpm\n", + "V_s = 51.8 #Swept volume in litres\n", + "m_f = 54.5 #Fuel delivery in gm/s\n", + "pi = 2.6 #Pressure ratio\n", + "\n", + "#Solution:\n", + "#Refer table 27.1, 27.3\n", + "psy = 4.8 #Saturation vapour pressure at test in kPa\n", + "psx = 8.2 #Saturation vapour pressure at site in kPa\n", + "q = m_f*1000/(N/(2*60)*V_s) #Fuel delivery in mg/litrecycle\n", + "qc = round(q/pi) #Corrected fuel delivery inmg/litrecycle\n", + "#Applying condition given in fig 27.2 for value of engine factor (fm)\n", + "if (qc <= 40):\n", + " fm = 0.3;\n", + "elif (qc >= 65):\n", + " fm = 1.2;\n", + "else:\n", + " fm = 0.036*qc-1.14;\n", + "\n", + "fa = ((px-phix*psx)/(py-phiy*psy))**0.7*(Ty/Tx)**1.5 #Atmospheric factor\n", + "alpha_d = fa**fm #Correction factor for CI engine\n", + "Px = alpha_d*Py #Brake power at site in kW\n", + "\n", + "#Results:\n", + "print \" Power at site ambient conditions, Px = %d kW\"%(Px)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power at site ambient conditions, Px = 878 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27.7 Page No : 513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "Py = 700. #Brake power at test in kW\n", + "py = 96. #Test ambient pressure in kPa\n", + "Ty = 302. #Test ambient temperature in K\n", + "phiy = 0.2 #Relative humidity at test\n", + "px = 69. #Site ambient air pressure in kPa\n", + "Tx = 283. #Site ambient temperature in K\n", + "phix = 0.4 #Relative humidity at site\n", + "N = 1200. #Engine speed in rpm\n", + "V_s = 45. #Swept volume in litres\n", + "m_f = 51.3 #Fuel delivery in gm/s\n", + "pi = 2.0 #Pressure ratio\n", + "eta_m = 85. #Mechanical efficiency in percent\n", + "\n", + "#Solution:\n", + "pr = 100. #Smath.radians(numpy.arcmath.tan(ard total barometric pressure in kPa\n", + "Tr = 298. #Smath.radians(numpy.arcmath.tan(ard air temperature in K\n", + "phir = 0.3 #Smath.radians(numpy.arcmath.tan(ard relative humidity\n", + "#Refer table 27.1, 27.3\n", + "psy = 4.1 #Saturation vapour pressure at test in kPa\n", + "psx = 1.2 #Saturation vapour pressure at site in kPa\n", + "psr = 3.2 #Smath.radians(numpy.arcmath.tan(ard saturation vapour pressure in kPa\n", + "q = m_f*1000/(N/(2*60)*V_s) #Fuel delivery in mg/litrecycle\n", + "qc = round(q/pi) #Corrected fuel delivery in mg/litrecycle\n", + "#Applying condition given in fig 27.2 for value of engine factor (fm)\n", + "if (qc <= 40):\n", + " fm = 0.3; \n", + "elif (qc >= 65):\n", + " fm = 1.2;\n", + "else:\n", + " fm = 0.036*qc-1.14;\n", + "\n", + "fa = ((px-phix*psx)/(py-phiy*psy))**0.7*(Ty/Tx)**1.5 #Atmospheric factor\n", + "alpha_d = fa**fm #Correction factor for CI engine\n", + "#Applying condition given in section 27.4.2\n", + "if (alpha_d > 0.9) and (alpha_d < 1.1):\n", + " Px = alpha_d*Py\n", + "else:\n", + " fa = ((pr-phir*psr)/(py-phiy*psy))**0.7*(Ty/Tr)**1.5 #Atmospheric factor\n", + " alpha_d = fa**fm #Correction factor for CI engine\n", + " Pr = alpha_d*Py #Smath.radians(numpy.arcmath.tan(ard reference brake power in kW\n", + " m = 0.7;n = 2 #Exponents\n", + " k = (px/pr)**m*(Tr/Tx)**n #The ratio of indicated power\n", + " alpha = k-0.7*(1-k)*(100/eta_m-1) #Power adjustment factor\n", + " Px = alpha*Pr #Brake power at site in kW\n", + "\n", + "\n", + "#Results:\n", + "print \" Power at site ambient conditions, Px = %d kW\"%(Px)\n", + "#Answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power at site ambient conditions, Px = 612 kW\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch3.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch3.ipynb new file mode 100755 index 00000000..3ffe2f4e --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch3.ipynb @@ -0,0 +1,498 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a20818ca7ee1b2477895b30fc584fad414861cd6265924db31648629461f401c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Fuel Air Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.misc import derivative\n", + "\n", + "#Given:\n", + "r = 7. #Compression ratio\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cv = 0.718 #(Assume)Specific heat at consmath.tant volume in kJ/kgK\n", + "dcv = 1*cv/100 #Change in specific heat in kJ/kgK\n", + "\n", + "#Solution:\n", + "R = cv*(g-1) #Specific gas consmath.tant in kJ/kgK\n", + "eta = round(100*(1-1/r**(g-1)))/100 #Efficiency when there is no change in specific heat\n", + "def Otto(cv): #Defining efficiency as a function of specific heat\n", + " return 1-1/r**(R/cv)\n", + "\n", + "detaBydcv = derivative(Otto,cv) #Derivative of efficiency wrt to specific heat at initial value of specific heat\n", + "detaByeta = detaBydcv*dcv/eta #Change in efficiency wrt to initial value of efficiency\n", + "\n", + "#Results:\n", + "print \" The percentage change in the efficiency of Otto cycle = %.3f percent\"%(detaByeta*100)\n", + "if (detaByeta < 0):\n", + " print (\"decrease\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The percentage change in the efficiency of Otto cycle = 4.344 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol,solve\n", + "from hornerc import horner\n", + "\n", + "#Given:\n", + "r = 6. #Compression ratio\n", + "CV = 44000. #Calorific value in kJ/kg of fuel\n", + "A_F = 15./1 #Air-fuel ratio\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 60.+273 #Temperature at 1 in K\n", + "n = 1.32 #Index of compression\n", + "T = Symbol(\"T\") #Defining temperature(T) as unknown in K\n", + "cv = 0.71+20e-5*T #Specific heat at consmath.tant volume as a function of temperature(T) in kJ/kgK\n", + "cv_c = 0.71 #Constant specific heat in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig 3.19\n", + "P2 = P1*r**n #Pressure at 2 in bar\n", + "T2 = floor(T1*r**(n-1)) #Temperature at 2 in K\n", + "T3 = Symbol(\"T3\") #Defining temperature(T3) as unknown in K\n", + "T_av = (T3+T2)/2 #Average temperature during combustion of charge in K\n", + "cv_mean = horner(cv,T_av) #Mean specific heat in kJ/kgK\n", + "#Assume cycle consumes 1 kg of air\n", + "m_a = 1.\n", + "m_f = m_a/A_F\n", + "m_c = m_f+m_a #Mass of air, fuel, and charge in kg\n", + "Q1 = CV*m_f #Heat added per kg of air in kJ/kg\n", + "T3_v = solve(Q1-cv_mean*m_c*(T3-T2))\n", + "T3_v = T3_v[1] #Temperature at 3 in K\n", + "P3_v = P2*T3_v/T2 #Pressure at 3 in bar\n", + "#For consmath.tant specific heat\n", + "T3_c = roots(Q1-cv_c*m_c*(T3-T2)) #Temperature at 3 for consmath.tant specific heat in K\n", + "P3_c = P2*T3_c/T2 #Pressure at 3 for consmath.tant specific heat in bar\n", + "\n", + "#Results:\n", + "print \" The maximum pressure in the cycle for variable specific heat, P3 = %.1f bar\"%(P3_v)\n", + "print \" The maximum pressure in the cycle for consmath.tant specific heat, P3 = %.1f bar\"%(P3_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "ImportError", + "evalue": "No module named hornerc", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0msympy\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSymbol\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0msolve\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mhornerc\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mhorner\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;31m#Given:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m6.\u001b[0m \u001b[0;31m#Compression ratio\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mImportError\u001b[0m: No module named hornerc" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#Given:\n", + "A_F = 28./1 #Air-fuel ratio\n", + "CV = 42000. #Calorific value in kJ/kg\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "r = 14./1 #Compression ratio\n", + "cv = 0.71+20-5*r #Specific heat at consmath.tant volume as a function of temperature(T) in kJ/kgK\n", + "T2 = 800. #Temperature at the end of the compression process (2) in K\n", + "\n", + "#Solution:\n", + "#Refer fig 3.20\n", + "#Assume cycle consumes 1 kg of fuel\n", + "m_c = A_F*1+1 #Mass of charge in kg\n", + "cp = cv #addf(cv,R) #Specific heat at consmath.tant pressure as a function of temperature(T) in kJ/kgK\n", + "#Since, heat transfer at consmath.tant pressure, Q1 = integration(cp*dt) from T2 to T3\n", + "#Thus, Q1 is the function of T3. Defining the function Q1 of T3\n", + "def difference(T3):\n", + " def f0(T): \n", + " return cp\n", + " Q1 = quad(f0,T2,T3)[0]\n", + " return Q1-CV/m_c\n", + "\n", + "#Since, heat transfer at consmath.tant pressure must be equal to calorific value per kg of charge\n", + "#Thus, their difference must be zero, function Q1toCV is solve for zero\n", + "V2 = 1.\n", + "T3 = 1939.5205\n", + "T3 = round(T3) #Temperature at the end of consmath.tant pressure proces (3) in K\n", + "rho = T3/T2 #Cut off ratio\n", + "V3 = rho #Volume at 3 in units\n", + "p = (V3-V2)*100/(r-V2) #percentage of stroke at which consmath.tant pressure process ends\n", + "\n", + "#Results:\n", + "print \" At %.2f percentage of stroke combustion is completed.\"%(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " At 10.96 percentage of stroke combustion is completed.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "from scipy.integrate import quad \n", + "from sympy import Symbol\n", + "\n", + "#Given:\n", + "P1 = 1. #Pressure at 1 in bar\n", + "T1 = 90.+273 #Temperature at 1 in K\n", + "r = 13. #Compression ratio\n", + "Q1 = 1675. #Heat supplied per kg of air in kJ/kg\n", + "Q1_v = Q1/2\n", + "Q1_p = Q1/2 #Heat supplied at consmath.tant volume and pressure per kg of air in kJ/kg\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "T = Symbol(\"T\")\n", + "cv = 0.71+20-5*T #Specific heat at consmath.tant volume as a function of temperature(T) in kJ/kgK\n", + "cp = 0.71+20-5*T+0.287 \n", + "#Solution:\n", + "#Refer fig 3.21\n", + "P2 = P1*r**g #Pressure at 2 in bar\n", + "T2 = T1*r**(g-1) #Temperature at 2 in K\n", + "#Since, heat transfer at consmath.tant volume, Q1_v = integration(cv*dt) from T2 to T3\n", + "#Thus, Q1_v is the function of T3. Defining the function Q1_v of T3\n", + "def Volume(T3):\n", + " def f1(T): \n", + " return cv\n", + " Q1_v = quad(f1,T2,T3)[0]\n", + " return Q1_v-Q1/2\n", + "\n", + "#Since, heat transfer at consmath.tant volume must be equal to half of total heat added\n", + "#Thus, their difference must be zero, function Q1_vtoQ1 is solve for zero\n", + "T3 = 1853.0823 \n", + "P3 = P2*T3/T2 #Pressure at 3 in bar\n", + "#cp = addf(cv,R) #Specific heat at consmath.tant pressure as a function of temperature(T) in kJ/kgK\n", + "#Since, heat transfer at consmath.tant pressure, Q1_p = integration(cp*dt) from T3 to T4\n", + "#Thus, Q1_p is the function of T4. Defining the function Q1_p of T4\n", + "def Pressure(T4):\n", + " def f2(T): \n", + " return cp\n", + " Q1_p = quad(f2,T3,T4)[0]\n", + " return Q1_p-Q1/2\n", + "\n", + "#Since, heat transfer at consmath.tant pressure must be equal to half of total heat added\n", + "#Thus, their difference must be zero, function Q1_ptoQ1 is solve for zero\n", + "T4 = 2440.2522\n", + "rho = T4/T3 #Cut off ratio\n", + "p = (rho-1)*100/(r-1) #Percentage of stroke at which cut off occurs\n", + "\n", + "#Results:\n", + "print \" The maximum pressure in the cycle, P3 = %.1f bar\"%(P3)\n", + "print \" The percentage of stroke at which cut off occurs = %.2f percent\"%(p)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum pressure in the cycle, P3 = 66.4 bar\n", + " The percentage of stroke at which cut off occurs = 2.64 percent\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given:\n", + "r = 7. #Compression ratio\n", + "CV = 44000. #Calorific value of the fuel in kJ/kg\n", + "A_F = 13.67 #Air fuel ratio of the mixture\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "n = 1.3 #Polytropic index\n", + "P1 = 1.\n", + "T1 = 67.+273 #Pressure and temperature at the beginning in bar and K\n", + "\n", + "#Solution:\n", + "#Refer fig 3.22\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "p = 23. #Percentage of oxygen in air by mass\n", + "#Stoichiometric equation of combustion of fuel (C6H14)\n", + "# [C6H14] + x[O2] = y[CO2] + z[H2O]\n", + "#Equating coefficients\n", + "x = 9.5\n", + "y = 6.\n", + "z = 7. #Coefficients of stoichiometric equation\n", + "A_F_g = x*2*O/(6*C+14*H)*100/p #Gravimetric air fuel ratio\n", + "MS = A_F_g/A_F*100 #Actual mixture strength in percent\n", + "#Combustion is incomplete\n", + "#Stoichiometric equation of incomplete combustion of fuel (C6H14)\n", + "# MS/100[C6H14] + x[O2] = a[CO2] + b[CO] + c[H2O]\n", + "#Equating coefficients\n", + "a = 4.39\n", + "b = 2.36\n", + "c = 7.87 #Coefficients of stoichiometric equation\n", + "#Stoichiometric equation of combustion of fuel (C6H14) by adding Nitrogen\n", + "# MS/100[C6H14] + x[O2] + x*79/21[N2] = a[CO2] + b[CO] + c[H2O] + x*79/21[N2]\n", + "m1 = MS/100+x+x*79/21 #Moles before combustion\n", + "m2 = a+b+c+x*79/21 #Moles after combustion\n", + "Me = (m2-m1)/m1*100 #Molecular expansion in percent\n", + "T2 = T1*r**(n-1) #Temperature at 2 in K\n", + "m_c = A_F+1 #Mass of charge in kg\n", + "T3 = CV/(m_c*cv)+T2 #Temperature at 3 in K\n", + "T3 = round(T3)\n", + "P3 = P1*r*(T3/T1) #Pressure at 3 in bar (printing error)\n", + "#Temperature and pressure considering molecular expansion\n", + "T31 = T3 #Temperature remains same at 3 in K\n", + "P31 = P3*m2/m1 #Pressure at 3 in bar\n", + "\n", + "#Results:\n", + "print \"\\t The molecular expansion = %.2f percent\"%(Me)\n", + "print \" a)Without considering the molecular contraction\\t The maximum pressure, P3 = %.2f bar\\\n", + "\\n The maximum temperature, T3 = %.0f K\"%(P3,T3)\n", + "print \" b)Considering the molecular contraction\\t The maximum pressure, P3 = %.2f bar \\\n", + "\\nThe maximum temperature, T3 = %.0f K\"%(P31,T31)\n", + "#Answer in the book is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\t The molecular expansion = 8.62 percent\n", + " a)Without considering the molecular contraction\t The maximum pressure, P3 = 98.56 bar\n", + " The maximum temperature, T3 = 4787 K\n", + " b)Considering the molecular contraction\t The maximum pressure, P3 = 107.05 bar \n", + "The maximum temperature, T3 = 4787 K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import interp\n", + "\n", + "#Given:\n", + "p = 15. #Clearance volume in percentage of print lacement volume\n", + "V_s = 2.8 #Swept volume in litres\n", + "N = 2500. #Engine speed in rpm\n", + "Q1 = 1400. #Heat added in kJ/kg\n", + "T1 = 27.+273 #Temperature at inlet in K\n", + "P1 = 100. #Pressure at inlet in kPa\n", + "R = 0.287 #Specific gas consmath.tant in kJ/kgK\n", + "\n", + "#Solution:\n", + "#Refer fig 3.23\n", + "#By umath.sing gas tables\n", + "#Refer Ideal-gas properties of air\n", + "V2 = (p/100)*(V_s/1000) #Volume at 2 (Clearance volume) in m**3\n", + "V3 = V2 #Volume at 3 in m**3\n", + "V1 = V_s/1000+V2\n", + "V4 = V1 #Volume at 1, 4 in m**3\n", + "# Process 1-2\n", + "vr1 = 621.2\n", + "pr1 = 1.3860\n", + "u1 = 214.09\n", + "phi1 = 5.7016 #Relative specific volume, relative pressure, specific internal energy(kJ/kg), specific entropy(kJ/kgK) at 1 (from air tables)\n", + "vr2 = vr1*(V2/V1) #Relative specific volume at 2\n", + "vr = [81.89, 78.61]\n", + "T = [660. ,670.]\n", + "pr = [23.13, 24.46]\n", + "u = [481.01, 488.81] #Relative specific volume, temperature(K), relative pressure, specific internal energy(kJ/kg) (extracted from air tables)\n", + "#Finding the corresponding temperature at vr2 by interpolation\n", + "#T2 = interp1d([vr,T],vr2) #Temperature at 2 in K\n", + "T2 = interp(vr2,vr,T)\n", + "\n", + "#Finding the corresponding relative pressure at T2 by interpolation\n", + "pr2 = interp(T2,pr,T) #Relative pressure at 2\n", + "#Finding the corresponding specific internal energy at T2 by interpolation\n", + "u2 = interp(T2,u,T) #specific internal energy at 2 in kJ/kg\n", + "P2 = P1*(pr2/pr1) #Pressure at 2 in kPa\n", + "# Process 2-3\n", + "u3 = Q1+u2 #Specific internal energy at 3 in kJ/kg\n", + "vr = [2.356 ,2.175, 2.012]\n", + "T = [2100, 2150, 2200]\n", + "pr = [2559, 2837, 3138]\n", + "u = [1775.3 ,1823.8, 1872.8] #Relative specific volume, temperature(K), relative pressure, specific internal energy(kJ/kg) (extracted from air tables)\n", + "#Finding the corresponding relative specific volume at u3 by interpolation\n", + "vr3 = interp(u3,vr,u) #Relative specific volume at 3\n", + "#Finding the corresponding relative pressure at u3 by interpolation\n", + "pr3 = interp(u3,pr,u) #Relative pressure at 3\n", + "#Finding the corresponding temperature at u3 by interpolation\n", + "T3 = interp(u3,u,T) #Temperature at 3(maximum) in K (Round off error)\n", + "P3 = P2*(T3/T2) #Pressure at 3(maximum) in kPa\n", + "# Process 3-4\n", + "vr4 = vr3*(V4/V3) #Relative specific volume at 4\n", + "vr = [15.241 ,14.470]\n", + "T = [1180, 1200]\n", + "pr = [222.2 ,238.0]\n", + "u = [915.57, 933.33]\n", + "phi = [7.1586, 7.1684] #Relative specific volume, temperature(K), relative pressure, specific internal energy(kJ/kg), specific entropy(kJ/kgK) (extracted from air tables)\n", + "#Finding the corresponding temperature at vr4 by interpolation\n", + "T4 = interp(vr4,T,vr) #Temperature at 4 in K\n", + "#Finding the corresponding specific internal energy at T4 by interpolation\n", + "u4 = interp(T4,u,T) #Specific internal energy at 4 in kJ/kg\n", + "#Finding the corresponding relative pressure at T4 by interpolation\n", + "pr4 = interp(T4,pr,T) #Relative pressure at 4\n", + "P4 = P3*(pr4/pr3) #Pressure at 4 in kPa\n", + "#Finding the corresponding specific entropy at T4 by interpolation\n", + "phi4 = interp(T4,phi,T) #Specific entropy at 4 in kJ/kgK\n", + "# Process 4-1\n", + "Q2 = u1-u4 #Heat rejected in kJ/kg\n", + "W = Q1+Q2 #Work done in kJ/kg\n", + "eta = W/Q1 #Efficiency\n", + "m = P1*V1/(R*T1) #Mass of air in cycle in kg\n", + "W = m*W*N/60 #Rate of work in kW\n", + "Delta_s = phi1-phi4-R*math.log(P1/P4) #Change in specific entropy between 1 and 4 in kJ/kgK\n", + "AE = Q2-T1*(Delta_s) #Available portion of energy of Q2 in kJ/kg (Round off error)\n", + "p_AE = AE/Q2 #Available energy in percentage of Q2\n", + "# Without umath.sing gas tables\n", + "g = 1.4 #Specific heat ratio(gamma)\n", + "cv = 0.718 #Specific heat at consmath.tant volume in kJ/kgK\n", + "r = V1/V2 #Compression ratio\n", + "eta1 = 1-1/r**(g-1) #Efficiency\n", + "# Process 1-2\n", + "T2 = T1*(r)**(g-1) #Temperature at 2 in K\n", + "P2 = P1/100*(r)**g #Pressure at 2 in bar\n", + "# Process 2-3\n", + "T31 = Q1/cv+T2 #Temperature at 3(maximum) in K\n", + "P31 = P2*T31/T2 #Pressure at 3(maximum) in bar\n", + "# Process 3-4\n", + "T4 = T31*(1/r)**(g-1) #Temperature at 4 in K\n", + "Q2 = cv*(T1-T4) #Heat rejected in kJ/kg\n", + "W1 = Q1+Q2 #Work done in kJ/kg\n", + "et1a1 = W1/Q1 #Efficiency\n", + "power = m*W1*N/60 #Power in kW\n", + "Delta_s = cv*math.log(T1/T4) #Change in specific entropy between 1 and 4 in kJ/kgK\n", + "AE1 = Q2-T1*Delta_s #Available portion of energy of Q2 in kJ/kg (Round off error)\n", + "p_AE1 = AE1/Q2 #Available energy in percentage of Q2 (Round off error)\n", + "\n", + "#Results:\n", + "print \" Constant specific heat:\\t Maximum temperature, Tmax = %.1f K\\t Maximum pressure, \\\n", + "\\nPmax = %.1f bar\\t Thermal efficiency, eta = %.2f percent\\t \\\n", + "\\nPower = %.1f kW\\t Available portion of heat rejected = %.1f kJ/kg %.1f percent\"%(T31,P31,eta1*100,power,abs(AE1),p_AE1*100)\n", + "print \" Variable specific heat:\\t Maximum temperature, Tmax = %.0f K \\\n", + "\\n Maximum pressure, Pmax = %.1f bar\\t Thermal efficiency eta = %.1f percent\\t \\\n", + "\\nPower = %.1f kW\\t Available portion of heat rejected = %.1f kJ/kg %.1f percent)\"%(2210,56.5,49.8,108.6,384.2,54.6)\n", + "\n", + "#Round off error in 'T3', 'AE', 'AE1', 'p_AE1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Constant specific heat:\t Maximum temperature, Tmax = 2627.4 K\t Maximum pressure, \n", + "Pmax = 67.1 bar\t Thermal efficiency, eta = 55.73 percent\t \n", + "Power = 121.6 kW\t Available portion of heat rejected = 327.9 kJ/kg 52.9 percent\n", + " Variable specific heat:\t Maximum temperature, Tmax = 2210 K \n", + " Maximum pressure, Pmax = 56.5 bar\t Thermal efficiency eta = 49.8 percent\t \n", + "Power = 108.6 kW\t Available portion of heat rejected = 384.2 kJ/kg 54.6 percent)\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch5.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch5.ipynb new file mode 100755 index 00000000..cfe3a7c4 --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch5.ipynb @@ -0,0 +1,73 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3a35710583d359739b87cc0f8a6ebf79a8d3da03b443ba0615c0757c022614e7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Combustion in SI Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given:\n", + "theta_s = 25. #Angle at which spark occured before top dead centre in degrees\n", + "theta_d = 3. #Angle at which delay ended before top dead centre in degrees\n", + "theta_c = -12. #Angle at which combustion finish after top dead centre in degrees\n", + "p = 15. #Percentage increase of delay period at half clomath.sing the throttle\n", + "\n", + "#Solution:\n", + "DP = theta_s-theta_d #Delay period in degrees\n", + "CP = theta_d-theta_c #Combustion period in degrees\n", + "#(a)Full throttle, half speed\n", + "DA1 = DP/2 #Delay angle in degrees\n", + "TP1 = DA1+CP #Total period in degrees\n", + "TS1 = TP1+theta_c #Time of spark before top dead centre in degrees\n", + "#(b)Half throttle, half speed\n", + "DA2 = (DP/2)+(DP/2)*p/100 #Delay angle in degrees\n", + "TP2 = DA2+CP #Total period in degrees\n", + "TS2 = TP2+theta_c #Time of spark before top dead centre in degrees\n", + "\n", + "#Results:\n", + "print \" a)Full throttle, half speed\\t Time of spark before top dead centre is %d degree\"%(TS1)\n", + "print \" a)Half throttle, half speed\\t Time of spark before top dead centre is %.2f degree\"%(TS2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)Full throttle, half speed\t Time of spark before top dead centre is 14 degree\n", + " a)Half throttle, half speed\t Time of spark before top dead centre is 15.65 degree\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch7.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch7.ipynb new file mode 100755 index 00000000..4cff55cc --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch7.ipynb @@ -0,0 +1,135 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0e3515c22d434f11fe7acbd64bd5fe64fb79f6d2ae3e613426e23af4f17b487a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Comparison of SI and CI Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "#For SI engine\n", + "F_A1 = 1/13.5 #Fuel air ratio\n", + "CV1 = 44000. #Calorific value in kJ/kg\n", + "eta_bt1 = 25. #Brake thermal efficiency in percent\n", + "m_f1 = 1. #Fuel consumption in kg/hr\n", + "#For CI engine\n", + "A_F2 = 25./1 #Air fuel ratio\n", + "CV2 = 42000. #Calorific value in kJ/kg\n", + "eta_bt2 = 38. #Brake thermal efficiency in percent\n", + "\n", + "#Solution:\n", + "#(a)SI engine\n", + "bp1 = m_f1*CV1*eta_bt1/(100*3600) #Brake power in kW\n", + "bsfc1 = m_f1/bp1 #Brake specific fuel consumption in kg/kWh\n", + "m_a1 = bsfc1/F_A1 #Air consumption in kg/kWh\n", + "#(a)CI engine\n", + "m_f2 = 1. #Fuel consumption in kg/hr\n", + "bp2 = m_f2*CV2*eta_bt2/(3600*100) #Brake power in kW\n", + "bsfc2 = m_f2/bp2 #Brake specific fuel consumption in kg/kWh\n", + "m_a2 = bsfc2*A_F2 #Air consumption in kg/kWh\n", + "#Comparison\n", + "R_bp = bp1/bp2 #Ratio of brake power of SI to CI\n", + "R_bsfc = bsfc1/bsfc2 #Ratio of brake specific fuel consumption of SI to CI\n", + "R_m_a = m_a1/m_a2 #Ratio of fuel consumption of SI to CI\n", + "\n", + "#Results:\n", + "print \" For SI engine\\tBrake output, bp = %.2f kW/kg of fuel\\tBrake specific fuel consumption, bsfc = %.3f kg/kWh\"%(bp1,bsfc1)\n", + "print \" For CI engine\\tBrake output, bp = %.1f kW/kg of fuel\\tBrake specific fuel consumption, bsfc = %.3f kg/kWh\"%(bp2,bsfc2)\n", + "print \" The air consumption\\tfor SI engine, m_a = %.2f kg/kWh\\tfor CI engine, m_a = %.2f kg/kWh\"%(m_a1,m_a2)\n", + "print \" Comparison of SI to CI\\tbp = %.3f\\tbsfc = %.3f\\tair consumption = %.3f\"%(R_bp,R_bsfc,R_m_a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For SI engine\tBrake output, bp = 3.06 kW/kg of fuel\tBrake specific fuel consumption, bsfc = 0.327 kg/kWh\n", + " For CI engine\tBrake output, bp = 4.4 kW/kg of fuel\tBrake specific fuel consumption, bsfc = 0.226 kg/kWh\n", + " The air consumption\tfor SI engine, m_a = 4.42 kg/kWh\tfor CI engine, m_a = 5.64 kg/kWh\n", + " Comparison of SI to CI\tbp = 0.689\tbsfc = 1.451\tair consumption = 0.783\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "#For SI engine\n", + "s1 = 0.72 #Specific gravity of gasoline fuel\n", + "CV1 = 44800. #Calorific value of gasoline fuel in kJ/kg\n", + "eta_bt1 = 20. #Brake thermal efficiency in percent\n", + "A_F1 = 14. #Air fuel ratio\n", + "#For CI engine\n", + "s2 = 0.87 #Specific gravity of diesel oil\n", + "CV2 = 43100. #Calorific value of diesel oil in kJ/kg\n", + "eta_bt2 = 30. #Brake thermal efficiency in percent\n", + "A_F2 = 21. #Air fuel ratio\n", + "\n", + "#Solution:\n", + "#SI engine\n", + "bsfc_SI = 3600*100/(eta_bt1*CV1) #Brake specific fuel consumption in kg/kWh\n", + "m_a_SI = A_F1*bsfc_SI #Air consumption in kg/kWh\n", + "#CI engine\n", + "bsfc_CI = 3600*100/(eta_bt2*CV2) #Brake specific fuel consumption in kg/kWh\n", + "m_a_CI = A_F2*bsfc_CI #Air consumption in kg/kWh\n", + "\n", + "#Results:\n", + "print \" For SI engine\\tBrake specific fuel consumption, bsfc_SI = %.3f kg/kWh\\tAir consumption = %.2f kg/kWh\"%(bsfc_SI,m_a_SI)\n", + "print \" For CI engine\\tBrake specific fuel consumption, bsfc_CI = %.3f kg/kWh\\tAir consumption = %.2f kg/kWh\"%(bsfc_CI,m_a_CI)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " For SI engine\tBrake specific fuel consumption, bsfc_SI = 0.402 kg/kWh\tAir consumption = 5.62 kg/kWh\n", + " For CI engine\tBrake specific fuel consumption, bsfc_CI = 0.278 kg/kWh\tAir consumption = 5.85 kg/kWh\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch8.ipynb b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch8.ipynb new file mode 100755 index 00000000..9af0e8da --- /dev/null +++ b/Internal_Combustion_Engine__by_M._l._Mathur_and_R._P._Sharma/ch8.ipynb @@ -0,0 +1,568 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:94ce1eaccffcb40c718d1edf96333e3a8ce28b55a7b9adcec20c2c2fe64fff3d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Fuels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given:\n", + "HCV = 46900. #Highest calorific value(HCV) of petrol in kJ/kg\n", + "pH2 = 14.4/100 #Composition of Hydrogen in petrol by mass\n", + "ufg = 2304.4 #Latent heat of evaporation for water in kJ/kg\n", + "\n", + "#Solution:\n", + "# 2[H2] + [O2] = 2[H2O]\n", + "H = 1 #Atomic mass of Hydrogen(H)\n", + "O = 16 #Atomic mass of Oxygen(O)\n", + "#Assume 1 kg of fuel consume\n", + "mH2 = 1*pH2 #Mass of Hydrogen in kg/kg of fuel\n", + "m_a = 2*(2*H+O)/(2*2*H)*mH2 #Mass of water produced in kg/kg of fuel\n", + "LCV = HCV-m_a*ufg #Lowest calorific value in kJ/kg\n", + "\n", + "#Results:\n", + "print \" The LCV of petrol = %.0f kJ/kg\"%(LCV)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The LCV of petrol = 43913 kJ/kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.optimize import fsolve \n", + "import math \n", + "\n", + "#Given:\n", + "pCO2 = 13./100 #Composition of Carbon di oxide in dry exhaust gas\n", + "\n", + "#Solution:\n", + "p_v = 21./100 #Composition of Oxygen in air by volume\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "#Combustion equation\n", + "# [C8H18] + a[O2] + (1-p_v)/p_v*a[N2] = x[CO2] + y[H2O] + z[O2] + w[N2]\n", + "#On balancing the reaction\n", + "x = 8.\n", + "y = 9. #Coefficients of combustion equation\n", + "def f(a): #Defining the function, M of coefficient a for calculation of a\n", + " z = a-x-y/2 #On balancing O\n", + " w = (1-p_v)/p_v*a #On balancing N\n", + " return x/(x+z+w)-pCO2\n", + "\n", + "#Since, Composition of CO2 calculated from the equation must be equal to the given composition of CO2\n", + "#Thus, function M solve for zero to get value of a\n", + "a = fsolve(f,1)\n", + "A_F_act = a/p_v #Air fuel ratio by volume\n", + "#For chemically correct mixture\n", + "a = x+y/2 #Moles of air required\n", + "A_F_cc = a/p_v #Chemically correct air fuel ratio\n", + "ratio = (1/A_F_act)/(1/A_F_cc)*100 #Ratio of actual to chemically correct fuel air ratio by volume\n", + "\n", + "#Results:\n", + "print \" The ratio by volume of fuel to air supplied = 1/%.0f\"%(A_F_act)\n", + "print \" The volume fuel air ratio = %.1f percentage of chemically correct ratio\"%(ratio)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The ratio by volume of fuel to air supplied = 1/66\n", + " The volume fuel air ratio = 90.1 percentage of chemically correct ratio\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "pC = 84.\n", + "pH2 = 16. #Percentage of Carbon, Hydrogen in fuel \n", + "p_v = 20.9 #Percentage of Oxygen in air by volume\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N = 14. #Atomic mass of Nitrogen(N)\n", + "m_f = 100. #Mass of fuel (assume) in kg\n", + "#Combustion equation\n", + "#pC/C[C] + pH2/2[H2] + [a[O2] + (100-p_v)/p_v*a[N2]] = b[CO2] + d[O2] + e[N2] + f[H2O]\n", + "#Equating coefficients\n", + "b = pC/C\n", + "f = pH2/2\n", + "d = b/6\n", + "a = b+d+f/2 #Coefficients of combustion equation\n", + "m_a = a*2*O + (100-p_v)/p_v*a*2*N #Mass of air supplied in kg\n", + "A_F = m_a/m_f #Air fuel ratio\n", + "P_e = d/(a-d)*100 #Percentage excess air\n", + "\n", + "#Results:\n", + "print \" a)The air fuel ratio by mass, A_F = %.1f/1\"%(A_F)\n", + "print \" b)The percentage excess air supplied = %.1f percent\"%(P_e)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The air fuel ratio by mass, A_F = 16.8/1\n", + " b)The percentage excess air supplied = 10.6 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "MS = 25. #Mixture strength in percent\n", + "p = 23.1 #Percentage of oxygen in air by mass\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N = 14. #Atomic mass of Nitrogen(N)\n", + "m_f = 1. #Mass of fuel(C6H14) in kg\n", + "mC = (6*C)/((6*C)+(14*H)) #Mass of Carbon in kg\n", + "mH = (14*H)/((6*C)+(14*H)) #Mass of Hydrogen in kg\n", + "m_a = (2*O/C*mC+O/(2*H)*mH)*100/p #Mass of air in kg\n", + "#For 25 percent rich mixture\n", + "m_f = m_f+m_f*MS/100 #Mass of fuel(C6H14) in kg\n", + "A_F = m_a/m_f #Air fuel ratio\n", + "mO2 = p/100*A_F #Mass of Oxygen available in kg\n", + "mO2_1 = O/(2*H)*mH #Oxygen required for combustion of H to H2O in kg\n", + "mH2O = mH*(1+O/(2*H)) #Mass of H2O produced in kg\n", + "mO2_2 = O/C*mC #Oxygen required for combustion of C to CO in kg\n", + "mCO = mC*(1+O/C) #Mass of CO produced in kg\n", + "mO2_3 = mO2-(mO2_1+mO2_2) #Mass of Oxygen remaining for combustion of CO to CO2\n", + "mCO_b = mO2_3*(C+O)/O #Mass of CO burned to CO2 in kg\n", + "mCO2 = mCO_b*(1+O/(C+O)) #Mass of CO2 produced in kg\n", + "mCO_ub = mCO-mCO_b #Mass of CO unburned in kg\n", + "nH2O = mH2O/(2*H+O) #Moles of H2O\n", + "nCO2 = mCO2/(C+2*O) #Moles of CO2\n", + "nCO = mCO_ub/(C+O) #Moles of CO\n", + "mN2 = A_F*(1-p/100) #Mass of Nitrogen (N2) in kg\n", + "nN2 = mN2/(2*N) #Moles of N2\n", + "nT = nH2O+nCO2+nCO+nN2 #Total number of moles\n", + "pH2O = nH2O/nT\n", + "pCO2 = nCO2/nT\n", + "pCO = nCO/nT\n", + "pN2 = nN2/nT #Composition of products\n", + "\n", + "#Results:\n", + "print \" The theoretical mass of air required, m_a = %.2f kg\"%(m_a)\n", + "print \" The composition of the products in percent\\t H2O = %.2f\\t CO2 = %.2f\\t CO = %.2f\\t N2 = %.2f\"%(pH2O*100,pCO2*100,pCO*100,pN2*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The theoretical mass of air required, m_a = 15.30 kg\n", + " The composition of the products in percent\t H2O = 16.70\t CO2 = 5.25\t CO = 9.07\t N2 = 68.98\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "from sympy import Symbol,solve\n", + "\n", + "#C7H16 in Petrol engine\n", + "#Given:\n", + "p_v = 21. #Percentage of Oxygen in air by volume\n", + "p_e = 50. #Percentage of excess air supplied\n", + "#Solution:\n", + "m_f = 100. #Mass of fuel (assume) in kg\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N = 14. #Atomic mass of Nitrogen(N)\n", + "#a = poly(0,'a') #Defining unknown number of moles of stoichiometric oxygen\n", + "a = Symbol('a')\n", + "#Combustion equation\n", + "#m_f/(7*C+16*H)[C7H16] + (1+p_e/100)*[a[O2] + (100-p_v)/p_v*a[N2]] = b[CO2] + d[O2] + e[N2] + f[H2O]\n", + "#Equating coefficients\n", + "b = m_f/(7*C+16*H)*7 #Moles of CO2 on balancing of C\n", + "f = m_f/(7*C+16*H)*16/2 #Moles of H2O on balancing of H\n", + "d = p_e/100*a #Excess moles of oxygen\n", + "a = solve((1+p_e/100)*a-(b+d+f/2))[0] #Balancing Oxygen of both sides\n", + "print a\n", + "m_a = a*2*O+(100-p_v)/p_v*a*2*N #Mass of air supplied in kg\n", + "A_F = m_a/m_f #Air fuel ratio\n", + "d = p_e/100*a #Moles of Oxygen in products of combustion\n", + "e = (1+p_e/100)*(100-p_v)/p_v*a #Moles of Nitrogen in products of combustion\n", + "nT = b+d+e+f #Total number of moles in product of combustion\n", + "pH2O = f/nT*100\n", + "pCO2 = b/nT*100\n", + "pO2 = d/nT*100\n", + "pN2 = e/nT*100 #Percentage volumetric composition of the products of combustion\n", + "\n", + "#Results:\n", + "print \" a)The stoichiometric air fuel consumption by mass, A_F = %.2f:1\"%(A_F)\n", + "print \" b)The percentage volumetric composition of the products\\t CO2 = %.2f\\t O2 = %.2f\\t N2 = %.1f\\t H2O = %.2f\"%(pCO2,pO2,pN2,pH2O)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "11.0000000000000\n", + " a)The stoichiometric air fuel consumption by mass, A_F = 15.11:1\n", + " b)The percentage volumetric composition of the products\t CO2 = 8.48\t O2 = 6.66\t N2 = 75.2\t H2O = 9.69\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "#Given:\n", + "pC = 85.\n", + "pH2 = 15. #Percentage of Carbon, Hydrogen in fuel\n", + "A_F = 14. #Air fuel ratio by mass\n", + "p_m = 23.2 #Percentage of oxygen in air by mass\n", + "\n", + "#Solution:\n", + "m_f = 100. #Mass of fuel (assume) in kg\n", + "m_a = A_F*m_f #Mass of air in kg\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "O = 16. #Atomic mass of Oxygen(O)\n", + "N = 14. #Atomic mass of Nitrogen(N)\n", + "p_v = 20.9 #Percentage of Oxygen in air by volume\n", + "#Combustion equation\n", + "#pC/C[C] + pH2/2[H2] + [a[O2] + (100-p_v)/p_v*a[N2]] = b[CO2] + d[CO] + e[N2] + f[H2O]\n", + "#Equating coefficients\n", + "f = pH2/2 #Moles of H2O on balancing of H\n", + "a = m_a/(2*O+(100-p_v)/p_v*2*N) #Balancing Oxygen of both sides\n", + "#On balancing C of both sides we get, b + d = pC/C eq(1)\n", + "#On balancing O of both sides we get, b + d/2 + f/2 = a eq(2)\n", + "#Solving equations (1) and (2)\n", + "A = [[1,1],[1, 1./2]]\n", + "B = [[pC/C],[a-f/2]]\n", + "SOL = solve(A,B) #Taking matrix A, B to get solution matrix, SOL = [b;d]\n", + "b = SOL[0]\n", + "d = SOL[1] #Moles of CO2 and CO\n", + "e = (100-p_v)/p_v*a #Moles of Nitrogen in products of combustion\n", + "mC = b/m_f*C #Mass of carbon burning to CO2 in kg per kg of fuel\n", + "mCO2 = b/m_f*(C+2*O) #Mass of CO2 produced in kg\n", + "mCO = d/m_f*(C+O) #Mass of CO produced in kg\n", + "mN2 = e/m_f*(2*N) #Mass of N2 produced in kg\n", + "mH2O = f/m_f*(2*H+O) #Mass of H2O produced in kg\n", + "#Results:\n", + "print \" a)The mass of the carbon burning to CO2 = %.3f kg\"%(mC)\n", + "print \" b)The mass of each of the gases in the exhaust per kg of fuel\\t CO2 = %.2f kg\\t CO = %.2f kg\\t N2 = %.2f kg\\t H2O = %.2f kg\"%(mCO2,mCO,mN2,mH2O)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The mass of the carbon burning to CO2 = 0.685 kg\n", + " b)The mass of each of the gases in the exhaust per kg of fuel\t CO2 = 2.51 kg\t CO = 0.38 kg\t N2 = 10.75 kg\t H2O = 1.35 kg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "pCO2 = 12./100\n", + "pCO = 2./100\n", + "pCH4 = 4./100\n", + "pH2 = 1./100\n", + "pO2 = 4.5/100 #Composition of Carbon di oxide(CO2), Carbon mono oxide(CO), Methane(CH4), Hydrogen(H2), Oxygen(O2) in dry exhaust gas\n", + "\n", + "pN2 = 1-(pCO2+pCO+pCH4+pH2+pO2) #Composition of Nitrogen(N2) in dry exhaust gas\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "p_v = 21. #Percentage of Oxygen in air by volume\n", + "#Let X be the mass of the fuel per mole dry exhaust gas\n", + "#Let Y be the mole of O2 per mole dry exhaust gas\n", + "#Let 1 kg of fuel contain p kg of C and q kg of H2\n", + "#Combustion equation\n", + "#X*(p/C[C] + q/(2*H)[H2]) + Y[O2] + (100-p_v)/p_v*Y[N2] = pCO2[CO2] + pCO[CO] + pCH4[CH4] + pH2[H2] + pO2[O2] + a[H2O] + pN2[N2]\n", + "#Equating coefficients\n", + "Y = pN2/((100-p_v)/p_v) #Nitrogen(N) balance\n", + "a = 2*(Y-(pCO2+pCO/2+pO2)) #Oxygen(O) balance\n", + "Xp = C*(pCO2+pCO+pCH4) #Carbon(C) balance; X*p\n", + "Xq = (2*H)*(2*pCH4+pH2+a) #Hydrogen(H) balance; X*q\n", + "p_q = Xp/Xq #Ratio of C to H2 in fuel\n", + "\n", + "#Results:\n", + "print \" The proportion by mass of Carbon to Hydrogen in the fuel = %.2f/1\"%(p_q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The proportion by mass of Carbon to Hydrogen in the fuel = 7.36/1\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given:\n", + "pCO2 = 7.5\n", + "pCO = 1.\n", + "pO2 = 9.4 #Percentage of Carbon di oxide(CO2), Carbon mono oxide(CO), Oxygen(O2) in dry exhaust gas\n", + "P = 1.02 #Pressure of the exhaust gas in bar\n", + "pO_v = 21. #Percentage of Oxygen in air by volume\n", + "pN_v = 79. #Percentage of Nitrogen in air by volume\n", + "M = 29. #Molecular weight of air\n", + "\n", + "#Solution:\n", + "C = 12. #Atomic mass of Carbon(C)\n", + "H = 1. #Atomic mass of Hydrogen(H)\n", + "#Let 100*x moles of air be used with fuel per 100 mole of dry exhaust products\n", + "pN2 = 100-(pCO2+pCO+pO2) #Composition of Nitrogen(N2) in dry exhaust gas\n", + "#Combustion equation\n", + "# a[C] + b[H2]) + pO_v*x[O2] + pN_v*x[N2] = pCO2[CO2] + pCO[CO] + pO2[O2] d[H2O] + pN2[N2]\n", + "#Equating coefficients\n", + "a = pCO2+pCO #Carbon(C) balance\n", + "x = pN2/pN_v #Nitrogen(N) balance\n", + "d = 2*(pO_v*x-(pCO2+pO2+pCO/2)) #Oxygen(O) balance\n", + "d = round(10*d)/10\n", + "b = d #Hydrogen(H) balance\n", + "m_a = 100*x*M #Mass of air in kg\n", + "m_f = a*C+b*2*H #Mass of fuel in kg\n", + "A_F = m_a/m_f #Air fuel ratio\n", + "pC = a*C/m_f*100 #Percentage of Carbon(C) in fuel\n", + "pH2 = 100-pC #Percentage of Hydrogen(H2) in fuel\n", + "nT = pCO2+pCO+pO2+pN2+d #Total number of moles in product of combustion\n", + "CO2 = pCO2/nT*100;O2 = pO2/nT*100;CO = pCO/nT*100;N2 = pN2/nT*100;H2O = d/nT*100 #Percentage volumetric composition of the products of combustion\n", + "PP = d/nT*P #Partial pressure of H2O in bar\n", + "#From steam tables\n", + "if (PP == 0.0825):\n", + " T = 42.8 #Saturation temperature in degreeC\n", + "\n", + "\n", + "#Results:\n", + "print \" a)The air fuel ratio used, A_F = %.1f\"%(A_F)\n", + "print \" b)The mass analysis of the fuel\\t Carbon = %.1f percent\\t Hydrogen = %.1f percent\"%(pC,pH2)\n", + "print \" c)The wet products analysis in percent\\t CO2 = %.1f\\t O2 = %.2f\\t CO = %.1f\\t N2 = %.2f\\t Steam = %.1f\"%(CO2,O2,CO,N2,H2O)\n", + "print \" d)The minimum temperature to which the exhaust may be cooled before condensation occurs = %.1f degreeC\"%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a)The air fuel ratio used, A_F = 25.2\n", + " b)The mass analysis of the fuel\t Carbon = 85.3 percent\t Hydrogen = 14.7 percent\n", + " c)The wet products analysis in percent\t CO2 = 6.9\t O2 = 8.64\t CO = 0.9\t N2 = 75.46\t Steam = 8.1\n", + " d)The minimum temperature to which the exhaust may be cooled before condensation occurs = 42.8 degreeC\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sum,array\n", + "\n", + "#Given:\n", + "pH2 = 49.4/100\n", + "pCO = 18./100\n", + "pCH4 = 20./100\n", + "pC4H8 = 2./100\n", + "pO2 = 0.4/100\n", + "pN2 = 6.2/100\n", + "pCO2 = 4./100 #Composition of Coal gas\n", + "MW = 20. #Mixture weakness in percent\n", + "\n", + "#Solution:\n", + "#Combustion equations for determining the moles of Oxygen used\n", + "#2[H2] + [O2] ---> 2[H2O] #For Hydrogen\n", + "#2[CO] + [O2] ---> 2[CO2] #For Carbon mono oxide\n", + "#[CH4] + 2[O] ---> [CO2] + 2[H2O] #For Methane\n", + "#[C4H8] + 6[O2] ---> 4[CO2] + 4[H2O] #For C4H8\n", + "nO2 = sum([pH2/2, pCO/2, 2*pCH4, 6*pC4H8 ,pO2]) #Moles of O2 required (error)\n", + "nCO2 = sum([pCO, pCH4 ,4*pC4H8 ,pCO2]) #Moles of CO2\n", + "nH2O = sum([pH2, 2*pCH4, 4*pC4H8]) #Moles of H2O\n", + "p_v = 21. #Percentage of Oxygen in air by volume\n", + "n_a = nO2/p_v*100 #Moles of air required\n", + "n_f = 1. #For 1 mole of fuel\n", + "A_F = n_a/n_f #Air fuel ratio\n", + "#For weak mixture\n", + "A_F_act = A_F*(1+MW/100) #Actual air fuel ratio\n", + "nN2 = (1-p_v/100)*A_F_act #Moles of N2\n", + "nO2 = p_v/100*A_F_act-nO2 #Excess moles of Oxygen in products\n", + "nN2 = nN2+pN2 #Moles of Nitrogen in products\n", + "nT_d = nCO2+nO2+nN2 #Total dry moles of product\n", + "nT_w = nT_d+nH2O #Total wet moles of product\n", + "p_d = array([nCO2, nO2 ,nN2])*100/nT_d #Percentage volumetric composition of the dry products of combustion\n", + "p_w = array([nCO2, nH2O, nO2, nN2])*100/nT_w #Percentage volumetric composition of the wet products of combustion\n", + "\n", + "#Results:\n", + "print \" The stoichiometric air fuel ratio used, A_F = %.1f/1\"%(A_F)\n", + "print \" The wet products analysis in percent\\t CO2 = %.0f\\t H2O = %.2f\\t O2 = %.2f\\t N2 = %.2f\"%(p_w[0],p_w[1],p_w[2],p_w[3])\n", + "print \" The dry products analysis in percent\\t CO2 = %.2f\\t O2 = %.2f\\t N2 = %.2f\"%(p_d[0],p_d[1],p_d[2])\n", + "#Answers in the book are wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The stoichiometric air fuel ratio used, A_F = 4.1/1\n", + " The wet products analysis in percent\t CO2 = 9\t H2O = 17.41\t O2 = 3.08\t N2 = 70.58\n", + " The dry products analysis in percent\t CO2 = 10.82\t O2 = 3.73\t N2 = 85.45\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/PbarvsVm^3.png b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/PbarvsVm^3.png new file mode 100755 index 00000000..9243f1cf Binary files /dev/null and b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/PbarvsVm^3.png differ diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/TvsQc5.png b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/TvsQc5.png new file mode 100755 index 00000000..d8106a25 Binary files /dev/null and b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/TvsQc5.png differ diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/yivsT_K13.png b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/yivsT_K13.png new file mode 100755 index 00000000..59cbab08 Binary files /dev/null and b/Introduction_To_Chemical_Engineering_Thermodynamics/screenshots/yivsT_K13.png differ 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 new file mode 100644 index 00000000..25e8a098 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/README.txt @@ -0,0 +1,10 @@ +Contributed By: Vivek Anand +Course: btech +College/Institute/Organization: TCS +Department/Designation: System Engineer +Book Title: Introduction To Chemical Engineering Thermodynamics +Author: J. M. Smith, H. C. Van Ness And M. M. Abbott +Publisher: McGraw - Hill Companies Inc., New York +Year of publication: 2001 +Isbn: 0-07-049486-X +Edition: 6 \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch1.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch1.ipynb new file mode 100755 index 00000000..5f828842 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch1.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1efd7e66d8d5b3c23b92f714b200b05cfd8a4cc13f4d4fc044a7a14cd4d336a9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 page : 4\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "F = 730.; \t\t\t#Force(N)\n", + "g_texas = 9.792;\t\t\t#Acceleration of gravity in Houston,Texas(m/s**2).\n", + "g_moon = 1.67;\t \t\t#Acceleration of gravity at moon(m/s**2).\n", + "\n", + "# Calculations\n", + "m = round(F/g_texas,2);\t\t\t#Mass of Astronaut(Kg)\n", + "F_moon = round(m*g_moon,2);\t\t\t#Force on Moon(N)\n", + "\n", + "# Results\n", + "print 'Mass of Astronaut',m, \"Kg\"\n", + "print 'Force on Moon',F_moon,'N'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of Astronaut 74.55 Kg\n", + "Force on Moon 124.5 N\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 page : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "d = 0.01\t\t\t#Diameter(m)\n", + "m = 6.14\t\t\t#Mass(Kg)\n", + "g = 9.82\t\t\t#Acceleration of gravity\n", + "Pb = 748.\t\t\t#Barometric Pressure(Torr)\n", + "\n", + "# Calculations\n", + "F = round(m*g,3);\t\t\t#Force(N)\n", + "A = (math.pi/4)*d*d;\t\t\t#Area(m**2)\n", + "Pg = round(F/A,-2);\t\t\t#Gauge Pressure(N/m**2)\n", + "Pa = round(Pg+(Pb*0.013332*(10**4)),-2);\t\t\t#Absolute Pressure(Pa)\n", + "\n", + "# Results\n", + "print 'Force ',F,'N'\n", + "print 'Gauge Pressure ',Pg/10**4,'(X 10**4) N/m**2'\n", + "print 'Absolute Pressure',Pa/1000,'KPa'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force 60.295 N\n", + "Gauge Pressure 76.77 (X 10**4) N/m**2\n", + "Absolute Pressure 867.4 KPa\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 page : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 300.15;\t \t\t#Temp = 300.15K(27`C)\n", + "h = 60.5*(10**-2);\t\t\t#Height = 60.5cm\n", + "rho = 13530.;\t\t\t#Density(Kg/m**3)\n", + "g = 9.784;\t\t \t#Acceleration of gravity(m/s**2)\n", + "\n", + "# Calculations\n", + "P = round(h*rho*g,0);\n", + "\n", + "# Results\n", + "print 'Pressure in KPa %.2f'%(P/1000),'KPa'\n", + "print 'Pressure in bar %.4f'%(P/100000),'bar'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in KPa 80.09 KPa\n", + "Pressure in bar 0.8009 bar\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 page : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "M = 2500.;\t\t\t#Mass = 2500Kg\n", + "h1 = 10.;\t\t\t#height1 = 10m\n", + "h2 = 100.;\t\t\t#height2 = 100m\n", + "g = 9.8;\t\t\t#Acceleration of gravity(m/s**2)\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "PE1 = M*h1*g;\t\t\t#[j]\n", + "print '(a)Potential energy of the elevator in its Initial Position',PE1,'J'\n", + "\n", + "#(b)\n", + "def f0(l): \n", + " return 1\n", + "\n", + "W = M*g* quad(f0,h1,h2)[0];\t\t\t#[j][0]\n", + "print '(b)Work Done in Raimath.sing the Elevator',W,'J'\n", + "\n", + "#(c)\n", + "PE2 = M*g*h2;\t\t\t#[j]\n", + "print '(c)Potential energy of the elevator in its Highest Position',PE2,'J'\n", + "\n", + "#(d)\n", + "KE2 = 0;\n", + "PE3 = 0;\n", + "KE3 = PE2;\t\t\t#[j] \t\t\t#Conservation Of Mechanical Energy\n", + "u = round((2*KE3/M)**(1./2),2);\t\t\t#(m/s)\n", + "print '(d)Velocity of the Elevator',u,'m/s'\n", + "print '(d)Kinetic Energy of the Elevator',KE3,'J'\n", + "\n", + "#(e)\n", + "PE_Spring = KE3;\t\t\t#[j]\n", + "print '(e)Potential energy of compressed spring ',PE_Spring,'J'\n", + "\n", + "#(f)\n", + "TE = PE1+W;\n", + "print '(f)Total Energy of the System',TE,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Potential energy of the elevator in its Initial Position 245000.0 J\n", + "(b)Work Done in Raimath.sing the Elevator 2205000.0 J\n", + "(c)Potential energy of the elevator in its Highest Position 2450000.0 J\n", + "(d)Velocity of the Elevator 44.27 m/s\n", + "(d)Kinetic Energy of the Elevator 2450000.0 J\n", + "(e)Potential energy of compressed spring 2450000.0 J\n", + "(f)Total Energy of the System 2450000.0 J\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch10.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch10.ipynb new file mode 100755 index 00000000..69b6cc3d --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch10.ipynb @@ -0,0 +1,875 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:23882ec0847c225b7b257c6443fe29684678f1f963a02f167a621eba14c49963" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Vapor Liquid Equillibrium Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 page no : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import plot,subplot,suptitle,xlabel,ylabel\n", + "from numpy import array,linspace,exp\n", + "import math \n", + "\n", + "#Antoinie Equations\n", + "#ln P1_sat = 14.2724-(2945.47/(T-49.15)) [KPa]\n", + "#ln P2_sat = 14.2043-(2972.64/(T-64.15)) [KPa]\n", + "#(a) Graph Showing P vs x1 and P vs y1 for T = 348.15K\n", + "T = 348.15;\t\t\t#[K]\n", + "#using BUBL P calculations\n", + "\n", + "#Calculation of P1_sat and P2_sat at T = 348.15K\n", + "P1_sat = round(math.exp(14.2724-(2945.47/(T-49.15))),2) \t\t\t#KPa\n", + "P2_sat = round(math.exp(14.2043-(2972.64/(T-64.15))),2) \t\t\t#KPa\n", + "\n", + "#Using Eqn P = P2_sat+(P1_sat-P2_sat)x1\n", + "\n", + "x = linspace(0,1,6)\n", + "P = round(P2_sat+((P1_sat-P2_sat)*x),2);\n", + "y = round(x*P1_sat/P,4);\n", + "\n", + "print ('Explanations Of graph')\n", + "\n", + "Ans = [x,y,P];\n", + "print ' x1 y1 P/PKa',Ans\n", + "\n", + "y1 = 0.6;\n", + "y2 = 1-y1;\n", + "P_dew = round(1/((y1/P1_sat)+(y2/P2_sat)),2)\n", + "x1 = round(y1*P_dew/P1_sat,4)\n", + "\n", + "# Plotting the graph\n", + "T = 348.15;\t\t\t#[K]\n", + "P1_sat = round(exp(14.2724-(2945.47/(T-49.15))),2) \t\t\t#KPa\n", + "P2_sat = round(exp(14.2043-(2972.64/(T-64.15))),2) \t\t\t#KPa\n", + "\n", + "x = linspace(0,1,6)\n", + "P = round(P2_sat+((P1_sat-P2_sat)*x),2);\n", + "y = round(x*P1_sat/P,4);\n", + "\n", + "plot(x,P,'g-') \t\t\t#P vs x1\n", + "plot(y,P,'b-') \t\t\t#P vs y1\n", + "x = [0,0.1];\n", + "P = [P2_sat,P2_sat];\n", + "plot(x,P,'--') \t\t\t#P2_sat\n", + "x = [0.9,1];\n", + "P = [P1_sat,P1_sat];\n", + "plot(x,P,'r--') \t\t\t#P1_sat\n", + "\n", + "x1 = 0.6;\n", + "P_b = round(P2_sat+((P1_sat-P2_sat)*x1),2);\n", + "y1 = round(x1*P1_sat/P_b,4);\n", + "x = [x1,y1];\n", + "P = [P_b,P_b];\n", + "plot(x,P,'bo-') \t\t\t#b--b'\n", + "\n", + "y1 = 0.6;\n", + "y2 = 1-y1;\n", + "P_c = round(1/((y1/P1_sat)+(y2/P2_sat)),2)\n", + "x1 = round(y1*P_c/P1_sat,4)\n", + "\n", + "x = [x1,y1];\n", + "P = [P_c,P_c];\n", + "plot(x,P,'ro-') \t\t\t#c'--c\n", + "\n", + "P = [(P_b+10),P_b,P_c,(P_c-10)];\n", + "x = [0.6,0.6,0.6,0.6];\n", + "plot(x,P,'go-') \t\t\t#a--b--c--d--0.6\n", + "\n", + "P = [(P_c-10),30];\n", + "x = [0.6,0.6];\n", + "plot(x,P,'yo--')\n", + "\n", + "P = [110,80];\n", + "x = [0.6,0.6];\n", + "plot(x,P,'w')\n", + "suptitle('(a)T/t = 348.15K')\n", + "xlabel('x1,y1')\n", + "ylabel('P/Kpa')\n", + "\n", + "print (\"This is the liquid-phase composition at point c''\")\n", + "\n", + "#(b) Graph showing (t vs x1) and (t vs y1) for a pressure of 70KPa\n", + "#Example 10.2(b)\n", + "P = 70;\t\t\t#[KPa]\n", + "\n", + "T1_sat = round(2945.47/(14.2724-math.log(P))+49.15,2);\n", + "T2_sat = round(2972.64/(14.2043-math.log(P))+64.15,2);\n", + "\n", + "T = array([T1_sat,347.15,351.15,355.15,359.15,T2_sat]);\n", + "\n", + "P1_sat = round(exp(14.2724-(2945.47/(T-49.15))),2); \t\t\t#KPa\n", + "P2_sat = round(exp(14.2043-(2972.64/(T-64.15))),2); \t\t\t#KPa\n", + "\n", + "x = round((P-P2_sat)/(P1_sat-P2_sat),3);\n", + "y = round((x*P1_sat)/P,3);\n", + "\n", + "Ans = [x,y,T];\n", + "print ' x1 y1 T/t(K/C`)',Ans\n", + "\n", + "#at x1 = 0.6;\n", + "x1_b = 0.6;\n", + "x2_b = 1-x1_b;\n", + "\n", + "T_a = 347.15;\t\t\t# Intermediate Temperature (Point a in graph)\n", + "P1_sat_a = round(exp(14.2724-(2945.47/(T_a-49.15))),2); \t\t\t#KPa\n", + "P2_sat_a = round(exp(14.2043-(2972.64/(T_a-64.15))),2); \t\t\t#KPa\n", + "alpha = P1_sat_a/P2_sat_a; \t\t\t#Initial\n", + "a = T_a;\n", + "i = -1;\n", + "while(i == -1):\n", + " P2_sat_b = P/((x1_b*alpha)+x2_b);\n", + " b = round(2972.64/(14.2043-math.log(P2_sat_b))+64.15,2);\n", + " dT = abs(a-b);\n", + " if(dT == 0):\n", + " i = 0;\n", + " T_b = b;\n", + " alpha = math.exp(0.0681-(2945.47/(b-49.15))+(2972.64/(b-64.15))); \t\t\t#Eqn C\n", + " a = b;\n", + "\n", + "P1_sat_b = round(math.exp(14.2724-(2945.47/(T_b-49.15))),2); \t\t\t#KPa\n", + "y1_b = round((x1_b*P1_sat_b)/P,4); \t\t\t#b`\n", + "\n", + "print 'Hence by iteration Temp(Temp at b) at x1 = 0.6 is ',T_b,'K'\n", + "print 'Hence by iteration P1_sat at x1 = 0.6 is ',P1_sat_b,'KPa'\n", + "print 'Composition of Vapor(b`) at x1 = 0.6',y1_b\n", + "\n", + "\n", + "#At y1 = 0.6\n", + "y1_c = 0.6;\n", + "y2_c = 1-y1_c;\n", + "T_d = 355.15;\t\t\t# Intermediate Temperature (Point a in graph)\n", + "P1_sat_d = round(math.exp(14.2724-(2945.47/(T_d-49.15))),2); \t\t\t#KPa\n", + "P2_sat_d = round(math.exp(14.2043-(2972.64/(T_d-64.15))),2); \t\t\t#KPa\n", + "alpha = P1_sat_d/P2_sat_d; \t\t\t#Initial\n", + "d = T_d;\n", + "i = -1;\n", + "while(i == -1):\n", + " P1_sat_c = P*(y1_c+(y2_c*alpha));\n", + " c = round(2945.47/(14.2724-math.log(P1_sat_c))+49.15,2);\n", + " dT = abs(d-c);\n", + " if(dT == 0):\n", + " i = 0;\n", + " T_c = c;\n", + " alpha = math.exp(0.0681-(2945.47/(c-49.15))+(2972.64/(c-64.15))); \t\t\t#Eqn C\n", + " d = c;\n", + "\n", + "P1_sat_c = round(math.exp(14.2724-(2945.47/(T_c-49.15))),2); \t\t\t#KPa\n", + "x1_c = round((y1_c*P)/P1_sat_c,4); \t\t\t#c`\n", + "\n", + "print 'Hence by iteration Temp(Temp at b) at y1 = 0.6 is ',T_c,'K'\n", + "print 'Hence by iteration P1_sat at y1 = 0.6 is ',P1_sat_c,'KPa'\n", + "print 'Composition of liqiud(c`) at y1 = 0.6',x1_c\n", + "\n", + "#Graph\n", + "T = linspace(T1_sat,T2_sat,10); \n", + "\n", + "P1_sat = round(exp(14.2724-(2945.47/(T-49.15))),2); \t\t\t#KPa\n", + "P2_sat = round(exp(14.2043-(2972.64/(T-64.15))),2); \t\t\t#KPa\n", + "\n", + "x = round((P-P2_sat)/(P1_sat-P2_sat),3);\n", + "y = round((x*P1_sat)/P,3);\n", + "\n", + "plot(x,T,'g-'); \n", + "plot(y,T,'b-'); \n", + "\n", + "xsat = [0,0.1];\n", + "T2sat = [T2_sat,T2_sat];\n", + "plot(xsat,T2sat,'--') \t\t\t#T2_sat\n", + "\n", + "xsat = [0.9,1];\n", + "T1sat = [T1_sat,T1_sat];\n", + "plot(xsat,T1sat,'r--') \t\t\t#T1_sat\n", + "\n", + "Tcc = [T_c,T_c];\n", + "xc = [x1_c,y1_c];\n", + "plot(xc,Tcc,'ro-') \t\t\t#c--c'\n", + "\n", + "Tbb = [T_b,T_b];\n", + "xb = [x1_b,y1_b];\n", + "plot(xb,Tbb,'bo-') \t\t\t#b--b'\n", + "\n", + "Tabcd = [T_d,T_c,T_b,T_a];\n", + "xabcd = [0.6,0.6,0.6,0.6];\n", + "plot(xabcd,Tabcd,'go-') \t\t\t#a--b--c--d--0.6\n", + "\n", + "Tao = [T_a,340];\n", + "xao = [0.6,0.6];\n", + "plot(xao,Tao,'yo--')\n", + "suptitle('(b)P = 70KPa')\n", + "xlabel('x1,y1')\n", + "ylabel('T(K)')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Explanations Of graph\n", + " x1 y1 P/PKa [array([ 0. , 0.2, 0.4, 0.6, 0.8, 1. ]), array([ 0. , 0.3313, 0.5692, 0.7483, 0.888 , 1. ]), array([ 41.98, 50.23, 58.47, 66.72, 74.96, 83.21])]\n", + "This is the liquid-phase composition at point c''" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " x1 y1 T/t(K/C`) [array([ 1. , 0.738, 0.516, 0.318, 0.142, 0. ]), array([ 1. , 0.849, 0.676, 0.474, 0.239, 0. ]), array([ 342.99, 347.15, 351.15, 355.15, 359.15, 362.73])]\n", + "Hence by iteration Temp(Temp at b) at x1 = 0.6 is 349.57 K\n", + "Hence by iteration P1_sat at x1 = 0.6 is 87.17 KPa\n", + "Composition of Vapor(b`) at x1 = 0.6 0.7472\n", + "Hence by iteration Temp(Temp at b) at y1 = 0.6 is 352.73 K\n", + "Hence by iteration P1_sat at y1 = 0.6 is 96.54 KPa\n", + "Composition of liqiud(c`) at y1 = 0.6 0.4351\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEhCAYAAACKklw+AAAABHNCSVQICAgIfAhkiAAAAAlwSF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3pZR2cD1nG83S11U9zF7yvq6\nvf4pzGF1s5psX3wPMxD3hD09Xu8K1lEl/19kNXNIQGX74nLMGU5PA711rV19TbYvFgD3YdqKpzGD\n+s1oC2bcJYE5kvwwh2+7KSIiIiIiIiIiIiIiIiIiIiIiIiIiIiKT24q5ov2+Kbz345jz0zM074Vc\nIiKHtXcCf8HUQuJU4FjMLSEUEjInNOpdYEVm25swV6T6gVbMg2pWYJ5TMVrmfT3Ar/Nen5D3+kng\nhRmvqUgNNeoN/kRm2y8xNwX8PBAEbgV2VPC+QcyzPf4EEzIfwjwtTEREmkwLpqF/lIm3Vw5Tvrvp\nYswty92YMYiugvXqbpI5Q91NIs4WYLqa2jBHE1mTPb/gB5gbzv0F5lbUzXrrdjkMKCREnH0b+Hvg\nDuC6vPJSDzL6InCBvRwH7sc8He/7Dp/drA9DEhE5LHwA+Hd72Y3pcnoH5sE9rwIRzK2Yz7W3uQ/z\nYPmsN9vr88Og1y5LYB708p0a1V1ERBrM1oLXlwPXzEZFRESksd2FOd1Vg9MiIiIiIiIiIiIiIiIi\nIiIiIiIiIiIi9fX/AcBZfstMwAr6AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 page no : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "H = 990.;\t\t\t#[Bar] Henry's Law const\n", + "T = 283.15;\t\t\t#[K]\n", + "P2_sat = 0.01227;\t\t\t#[Bar] from Steam Tables\n", + "x1 = 0.01;\t\t\t#Assumed\n", + "x2 = 1-x1;\n", + "y1 = 1;\n", + "\n", + "# Calculations\n", + "P = round((x1*H)+(x2*P2_sat),3);\n", + "x1 = round((y1*P)/H,4);\n", + "x2 = 1-x1;\n", + "y2 = round((x2*P2_sat)/P,4);\n", + "y1 = 1-y2;\n", + "\n", + "# Results\n", + "print 'Composition in liquid Phase',x1\n", + "print 'Composition in vapor Phase',y1\n", + "print 'Pressure Exerted on Can',P,'Bar'\n", + "print ('Hence Vapor phase chosen is nearly pure')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Composition in liquid Phase 0.01\n", + "Composition in vapor Phase 0.9988\n", + "Pressure Exerted on Can 9.912 Bar\n", + "Hence Vapor phase chosen is nearly pure\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 page no : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Equations to be Used\n", + "# ln v1 = A*(x2**2) ln v2 = A*(x1**2) Where A = 2.771-0.00523T\n", + "\n", + "#Antoine Equations\n", + "#ln P1_sat = 16.59158-(3643.31/(T-33.424)) \n", + "#ln P2_sat = 14.25326-(2665.54/(T-53.424))\n", + "#P = E(xi * Vi * Pi_sat) E--Summation Eqn 10.6\n", + "#P = 1/E(yi / (vi * Pi_sat)) E--Summation Eqn 10.7\n", + "\n", + "#(a) Calculate P and (yi) , for T = 318.15K and x1 = 0.25\n", + "\n", + "# Variables\n", + "T = 318.15;\t\t\t#[K] Given\n", + "x1 = 0.25; \t\t\t#Given\n", + "x2 = 1-x1;\n", + "\n", + "# Calculations and Results\n", + "P1_sat = round(math.exp(16.59158-(3643.31/(T-33.424))),2);\t\t\t#[KPa]\n", + "P2_sat = round(math.exp(14.25326-(2665.54/(T-53.424))),2);\t\t\t#[KPa]\n", + "A = round(2.771-(0.00523*T),3);\n", + "v1 = round(math.exp(A*(x2**2)),3);\n", + "v2 = round(math.exp(A*(x1**2)),3);\n", + "\n", + "#Form Eqn(10.6)\n", + "P_a = round((x1*v1*P1_sat)+(x2*v2*P2_sat),2);\t\t\t#[KPa]\n", + "y1_a = round((x1*v1*P1_sat)/P_a,3);\n", + "y2_a = round((x2*v2*P2_sat)/P_a,3);\n", + "\n", + "print ('(a)P and [yi] for T = 318.15K and x1 = 0.25')\n", + "print ('BUBL P calculations')\n", + "print 'P = ',P_a,'KPa'\n", + "print 'y1 = ',y1_a\n", + "print 'y2 = ',y2_a\n", + "\n", + "#(b) Calculate P and (xi) , for T = 318.15K and y1 = 0.60\n", + "\n", + "#DEW P calculation\n", + "y1 = 0.6;\n", + "y2 = 1-y1;\n", + "T = 318.15;\t\t\t#[K]\n", + "P1_sat = round(math.exp(16.59158-(3643.31/(T-33.424))),2);\t\t\t#[KPa]\n", + "P2_sat = round(math.exp(14.25326-(2665.54/(T-53.424))),2);\t\t\t#[KPa]\n", + "A = round(2.771-(0.00523*T),3);\n", + "v1 = 0.1;\t\t\t#Assumed\n", + "v2 = 0.1;\t\t\t#Assumed\n", + "a1 = v1;\n", + "a2 = v2;\n", + "i = -1;\n", + "while(i == -1):\n", + " P = round(1/((y1/(a1*P1_sat))+(y2/(a2*P2_sat))),2); \n", + " x1 = round(y1*P/(a1*P1_sat),4);\n", + " x2 = 1-x1;\n", + " b1 = round(math.exp(A*(x2**2)),4);\n", + " b2 = round(math.exp(A*(x1**2)),4);\n", + " dt = abs(b1-a1);\n", + " if(dt == 0):\n", + " i = 0;\n", + " v1 = b1;\n", + " v2 = b2;\n", + " break;\n", + " a1 = b1;\n", + " a2 = b2;\n", + "\n", + "x1_b = x1;\n", + "x2_b = 1-x1_b;\n", + "P_b = P;\n", + "v1_b = v1;\n", + "v2_b = v2;\n", + "print ('(b)P and [xi] for T = 318.15K and y1 = 0.60')\n", + "print ('DEW P calculations')\n", + "print 'P = ',P_b,'kPa'\n", + "print 'x1 = ',x1_b\n", + "print 'x2 = ',x2_b\n", + "\n", + "#(c) Calculate T and (yi) for P = 101.33 KPa and x1 = 0.85\n", + "\n", + "#BUBL T calculation\n", + "P = 101.33;\n", + "x1 = 0.85;\n", + "x2 = 1-x1;\n", + "T1_sat = round((3643.31/(16.59158-math.log(P)))+33.424,2);\n", + "T2_sat = round((2665.54/(14.25326-math.log(P)))+53.424,2);\n", + "T = (x1*T1_sat)+(x2*T2_sat);\n", + "a = T;\t\t\t#Initial\n", + "i = -1;\n", + "while(i == -1):\n", + " A = round(2.771-(0.00523*a),4);\n", + " v1 = round(math.exp(A*(x2**2)),4);\n", + " v2 = round(math.exp(A*(x1**2)),4);\n", + " P1_sat = round(math.exp(16.59158-(3643.31/(a-33.424))),2);\t\t\t#[KPa]\n", + " P2_sat = round(math.exp(14.25326-(2665.54/(a-53.424))),2);\t\t\t#[KPa]\n", + " alpha = P1_sat/P2_sat; \n", + " P1_sat = round(P/((x1*v1)+(x2*v2/alpha)),2);\n", + " b = round((3643.31/(16.59158-math.log(P1_sat)))+33.424,2);\n", + " dt = abs(b-a);\n", + " if(dt == 0):\n", + " i = 0;\n", + " T = b;\n", + " break;\n", + " a = b;\n", + "\n", + "T_c = T;\n", + "y1_c = round(x1*v1*P1_sat/P,3);\n", + "y2_c = 1-y1_c;\n", + "print ('(c)T and [yi] for P = 101.33kPa and x1 = 0.')\n", + "print ('BUBL T calculations')\n", + "print 'Temperature = ',T_c,'K'\n", + "print 'y1 = ',y1_c\n", + "print 'y2 = ',y2_c\n", + "\n", + "#(d) Calculate T and (xi) for P = 101.3 KPa and y1 = 0.4\n", + "P = 101.3;\n", + "y1 = 0.4;\n", + "y2 = 1-y1;\n", + "T1_sat = round((3643.31/(16.59158-math.log(P)))+33.424,2);\n", + "T2_sat = round((2665.54/(14.25326-math.log(P)))+53.424,2);\n", + "T = (y1*T1_sat)+(y2*T2_sat);\n", + "v1 = 1; \t\t\t#Initially\n", + "v2 = 1; \t\t\t#Initially\n", + "a = T; \t\t\t#Initial\n", + "i = -1;\n", + "while(i == -1):\n", + " A = round(2.771-(0.00523*a),4);\n", + " P1_sat = round(math.exp(16.59158-(3643.31/(a-33.424))),2);\t\t\t#[KPa]\n", + " P2_sat = round(math.exp(14.25326-(2665.54/(a-53.424))),2);\t\t\t#[KPa]\n", + " alpha = P1_sat/P2_sat;\n", + " x1 = round((y1*P)/(v1*P1_sat),4);\n", + " x2 = 1-x1;\n", + " v1 = round(math.exp(A*(x2**2)),4);\n", + " v2 = round(math.exp(A*(x1**2)),4);\n", + " P1_sat = P*((y1/v1)+(y2*alpha/v2));\n", + " b = round((3643.31/(16.59158-math.log(P1_sat)))+33.424,2);\n", + " dt = abs(a-b);\n", + " if(dt == 0):\n", + " T = a;\n", + " i = 0;\n", + " break;\n", + " a = b;\n", + "T_d = T;\n", + "x1_d = x1;\n", + "x2_d = x2;\n", + "print ('(d)T and [xi] for P = 101.33kPa and y1 = 0.40')\n", + "print ('DEW T calculations')\n", + "print 'T = ',T,'K'\n", + "print 'x1 = ',x1_d\n", + "print 'x2 = ',x2_d\n", + "\n", + "#(e) Taz , (xi_az) and (yi_az) for T = 318.15K \n", + "T = 318.15;\n", + "# Relative Volatility alpha_12 = (y1/x1)/(y2/x2)\n", + "#At Azeotrope y1 = x1 and y2 = x2 and alpha_12 = 1\n", + "P1_sat = round(math.exp(16.59158-(3643.31/(T-33.424))),2);\t\t\t#[KPa]\n", + "P2_sat = round(math.exp(14.25326-(2665.54/(T-53.424))),2);\t\t\t#[KPa]\n", + "#From eqn (10.5) alpha_12 = (v1*P1_sat)/(v2*P2_sat)\n", + "A = round(2.771-(0.00523*T),4);\n", + "\n", + "#When x1 = 0 v2 = 1 and v1 = math.exp(A)\n", + "alpha_12_x10 = P1_sat*math.exp(A)/P2_sat; \n", + "\n", + "#When x1 = 1 v1 = 1 and v2 = math.exp(A)\n", + "alpha_12_x11 = P1_sat/(P2_sat*math.exp(A));\n", + "\n", + "#But this is not Azeotrope (at Azeotrope alpha_12 = 1)\n", + "\n", + "#v1_az/v2_az = (P2_sat/P1_sat) = K\n", + "K = P2_sat/P1_sat;\n", + "\n", + "#ln(v1/v2) = ln(K) = A(1-(2*x1))\n", + "x1_az = round((A-math.log(K))/(2*A),3);\n", + "x2_az = 1-x1_az;\n", + "y1_az = x1_az;\n", + "y2_az = x2_az;\n", + "v1_az = round(math.exp(A*(x2_az**2)),3);\n", + "v2_az = round(math.exp(A*(x1_az**2)),3);\n", + "P_az = round(v1_az*P1_sat,2);\n", + "\n", + "print ('Azeotropic Pressure and Azeotropic Composition for T = 318.15K')\n", + "print 'Azeotropic Pressure = ',P_az,'KPa'\n", + "print 'x1_az',x1_az\n", + "print 'y1_az',y1_az\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)P and [yi] for T = 318.15K and x1 = 0.25\n", + "BUBL P calculations\n", + "P = 73.52 KPa\n", + "y1 = 0.282\n", + "y2 = 0.718\n", + "(b)P and [xi] for T = 318.15K and y1 = 0.60\n", + "DEW P calculations\n", + "P = 62.89 kPa\n", + "x1 = 0.8168\n", + "x2 = 0.1832\n", + "(c)T and [yi] for P = 101.33kPa and x1 = 0.\n", + "BUBL T calculations\n", + "Temperature = 331.2 K\n", + "y1 = 0.67\n", + "y2 = 0.33\n", + "(d)T and [xi] for P = 101.33kPa and y1 = 0.40\n", + "DEW T calculations\n", + "T = 326.69 K\n", + "x1 = 0.4598\n", + "x2 = 0.5402\n", + "Azeotropic Pressure and Azeotropic Composition for T = 318.15K\n", + "Azeotropic Pressure = 73.71 KPa\n", + "x1_az 0.325\n", + "y1_az 0.325\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 page no : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,round\n", + "import math \n", + "\n", + "# Variables\n", + "T = 283.15;\t\t\t#[K]\n", + "#(a) Dew Point Pressure\n", + "#Species = [\" Methane \";\" Ethane \";\" Propane \"];\n", + "y = array([0.1,0.2,0.7]);\n", + "\n", + "P1 = 6.9;\t\t\t#[bar]\n", + "K1 = array([20,3.25,0.92]);\n", + "x1 = round(y/K1,3);\n", + "\n", + "P2 = 10.34;\t\t\t#[bar]\n", + "K2 = array([13.2,2.25,0.65]);\n", + "x2 = round(y/K2,3);\n", + "\n", + "P3 = 8.7;\t\t\t#[bar]\n", + "K3 = array([16,2.65,0.762]);\n", + "x3 = round(y/K3,3);\n", + "\n", + "P = [P1,P2,P3];\n", + "x = [x1,x2,x3];\n", + "E1 = zeros(3);\n", + "\n", + "# Calculations and Results\n", + "for i in range(3):\n", + " for j in range(3):\n", + " E1[i] = E1[i]+x[i][j];\t\t\t#Summation\n", + "\n", + "P_dew = 8.7;\n", + "Ans = [[y,K1,x1,K2,x2,K3,x3],[1,0,E1[0],0,E1[1],0,E1[2]]];\n", + "print ( ' P = 6.9 bar P = 10.34 bar P = 8.7 bar')\n", + "print ' yi Ki yi/Ki Ki yi/Ki Ki yi/Ki',Ans\n", + "print ('Last Row Represents the summation')\n", + "print 'The dew Point Pressure',P_dew,'KPa'\n", + "\n", + "T = 283.15;\t\t\t#[K]\n", + "#(b) Bubble Point Pressure\n", + "#Species = [\" Methane \";\" Ethane \";\" Propane \"];\n", + "x = array([0.1,0.2,0.7]);\n", + "\n", + "P1 = 26.2;\t\t\t#[bar]\n", + "K1 = array([5.6,1.11,0.335]);\n", + "y1 = round(x*K1,3);\n", + "\n", + "P2 = 27.6;\t\t\t#[bar]\n", + "K2 = array([5.25,1.07,0.32]);\n", + "y2 = round(x*K2,3);\n", + "\n", + "P3 = 26.54;\t\t\t#[bar]\n", + "K3 = [5.49,1.1,0.33];\n", + "y3 = round(x*K3,3);\n", + "\n", + "i = 1;\n", + "j = 1;\n", + "P = [P1,P2,P3];\n", + "y = [y1,y2,y3];\n", + "E2 = zeros(3);\n", + "for i in range(3):\n", + " for j in range(3):\n", + " E2[i] = E2[i] + y[i][j] \t\t\t#Summation\n", + "\n", + "P_Bubble = 26.54;\n", + "Ans = [[x,K1,y1,K2,y2,K3,y3],[1,0,E2[0],0,E2[1],0,E2[2]]]\n", + "print ( ' P = 26.2 bar P = 27.6 bar P = 26.54 bar')\n", + "print ' xi Ki xiKi Ki xiKi Ki xiKi',Ans\n", + "print ('Last Row Represents the summation')\n", + "print 'The Bubble Point Pressure',P_Bubble,'KPa'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " P = 6.9 bar P = 10.34 bar P = 8.7 bar\n", + " yi Ki yi/Ki Ki yi/Ki Ki yi/Ki [[array([ 0.1, 0.2, 0.7]), array([ 20. , 3.25, 0.92]), array([ 0.005, 0.062, 0.761]), array([ 13.2 , 2.25, 0.65]), array([ 0.008, 0.089, 1.077]), array([ 16. , 2.65 , 0.762]), array([ 0.006, 0.075, 0.919])], [1, 0, 0.82800000000000007, 0, 1.1739999999999999, 0, 1.0]]\n", + "Last Row Represents the summation\n", + "The dew Point Pressure 8.7 KPa\n", + " P = 26.2 bar P = 27.6 bar P = 26.54 bar\n", + " xi Ki xiKi Ki xiKi Ki xiKi [[array([ 0.1, 0.2, 0.7]), array([ 5.6 , 1.11 , 0.335]), array([ 0.56 , 0.222, 0.234]), array([ 5.25, 1.07, 0.32]), array([ 0.525, 0.214, 0.224]), [5.49, 1.1, 0.33], array([ 0.549, 0.22 , 0.231])], [1, 0, 1.016, 0, 0.96299999999999997, 0, 1.0]]\n", + "Last Row Represents the summation\n", + "The Bubble Point Pressure 26.54 KPa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 page no : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "z1 = 0.45;\n", + "z2 = 0.35;\n", + "z3 = 0.2;\n", + "P = 110.;\t\t\t#[KPa]\n", + "T = 353.15;\t\t\t#[K]\n", + "P1_sat = 195.75;\t\t\t#[KPa]\n", + "P2_sat = 97.84;\t\t\t#[KPa]\n", + "P3_sat = 50.32;\t\t\t#[KPa]\n", + "\n", + "# Calculations\n", + "#BUBL Calculation\n", + "x1 = z1;\n", + "x2 = z2;\n", + "x3 = z3;\n", + "P_BUBL = (x1*P1_sat)+(x2*P2_sat)+(x3*P3_sat);\n", + "\n", + "#DEW Calculation\n", + "y1 = z1;\n", + "y2 = z2;\n", + "y3 = z3;\n", + "P_Dew = 1/((y1/P1_sat)+(y2/P2_sat)+(y3/P3_sat));\n", + "\n", + "#Since P_Bubl" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAANQAAACnCAYAAABpaHJ3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFG5JREFUeJztnXt8FNXZx7+7CRe5BRQFETQWiVLFEEVADTVauYSLrx/r\nDa2tYr2+KNS+reirJi1afa1+RMRLVarUCxWvCAUUi/GGtSghXJRLgNT7BTGGIqhJ9v3jmXFml93s\nbLKzM7P7fD+f+ezsmTlzTmCePec853eeA4qiKIqiKIqiKIqiKIqiKIqipJn1wLg0Pq8KaAS+AXYD\nf0jjsxUl51gGzDfOy4FmD+uiKI4Jp3j/vsDnwC6k5bjdSK8Hzo2593+BD2zfpwKfAnlArZF/F/Bs\ngrJCxudiIAIUpVhXRfE9fwLes30/wPj8Cjgn5t4OSLeth/F9LTDLuG+b7b5+ccpZBjxvnE8ynqMo\nWcfJwPfAm8BltvR4BgXwLjADy7j2BQqB74BVwLVYLZGdKqwxVD1waToqryh+5CDgbuRFf8lIS2RQ\nvwY+Aq42Pk32Af4P+BjYECeffQylKFlLMVBgnP8ey0gSGVQe0qJ9ANxmpB2C1VU8FWmFYrF3+RQl\nMOSneH85UIE4CZqBi5Pc34R0+44EphtpxcBfsbp6NybIG0mxboqiKIqiKIqiKIqiKIqiKIqiKIqi\nKIqiKIqiZA1/AT4D1rRwz0xgE1ADlNjSxyArgTch4lpFyXlGIEaSyKDGAouM82HAP41zcxFiIdAO\nWeox0LVaKkqaSHXFbqq8hijRE3EKMMc4fwvoDvQGhiIGVYeo1f8G/JdrtVSUNOG2QSXjAKKXyX9o\npPVJkK4ovibV5RtuEG/FriP677VXZPOuXemsi6LY2Yys33OM1y3UR0THlOiLtEax6f2M9Cg279pF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Cr\nsNZwjWkxR/o5gcx7+YqRFqoGaSky4eUD8bCZbvM5SO/ALeYiY7XvkPH5BYhj5CVywG2uKIqiKIqi\nKIqiKIqiKIqiKErgaELmqtYA85BJSjtdkXk0cyl/O+PeY+I86yZE17YjJr0DosTehOytdVDM9Yo4\nz4qXZnIpVjzEN5E5qETch6gXqoCj41yvM55Vg2z8kFQLpygtYX/5HwV+HeeeM7CU89cA9yZ41lBE\nBhNrUJcjOjuQrYD+ZpxPRZZc3ArcCIxMkBZLV9v5BFoWpFYj8rWXiS9H2opMjoL8INzZwrMUJSn2\nl/9S4O4E9y1BVAF1JJ+NjzWoJcAw4zwfUYabTAN2A8cnSUvERCwDjWWg7ZppUGHgYeAPRrrdoMYA\nf0da3+WIcv0NLElTVuBm1CPFIh+RSi1KcH0Kshr2ImSZQirYl7I0IqGt90GU2Z8DM42y90LiHsam\nxWuBLkcWM3YmsSC1nOg1ae2QxY+rgZtt6aY6frxxbT2ymK8JWd/0R+B0J3+oojRiaf7uJPEP2FRE\n0T3DwTNjW6g1yPIGk1qsVgFSH0PZmYi0PvFYgqXErkL0jbGayq1Y47GHgW7IyoBnjXqvRjfSU1Ig\n9uWPRx9EOd8HEWEOSvGZS7BiPMR2+ZxwI/LCr4xzLYy0eLF0QhwgJi8j47ilRMd9sHf5TB5GdqcE\ncaBsTbG+viao66GyiTuQAfvHSDcr0TgrEc9jxVo4HfhHivmvQ1Yem04Fe/DQcUgrEsuJwLKYtAeR\nLu08JOZHIrohfyuIoltRHNOQ5PpIZGBuZz5wXpx7b0XGSo3G5w1GegfkJTbd5oWtrKvJDGQdUjWy\nZCFedN5ZwE9s3+1evkpkLBUifgs1HFl2sxLZbcWLeBWK4iveoeVWSFEURVEURVEURVEURVEURVEU\n5f8B6h7cSnJenvIAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 page no : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T = 200.;\t\t\t#[K]\n", + "P = 30.;\t\t\t#[bar]\n", + "R = 83.14;\n", + "x1 = 0.4;\t\t\t#[N2]\n", + "x2 = 1-x1;\t\t\t#[CH4]\n", + "\n", + "B11 = -35.2;\t\t\t#[cm**3/mol]\n", + "B22 = -105.;\t\t\t#[cm**3/mol]\n", + "B12 = -59.8;\t\t\t#[cm**3/mol]\n", + "\n", + "# Calculations\n", + "delta_12 = round((2*B12)-B11-B22,1);\n", + "si_1 = round(math.exp((P/(R*T))*(B11+(x2**2*delta_12))),4);\n", + "si_2 = round(math.exp((P/(R*T))*(B22+(x1**2*delta_12))),4);\n", + "\n", + "B = round((x1**2*B11)+(2*x1*x2*B12)+(x2**2*B22),2);\n", + "Z = round(1+((B*P)/(R*T)),2);\n", + "\n", + "# Results\n", + "print 'Fugacity Coefficients are ',si_2,si_1\n", + "print 'Second Viral coefficient is ',B\n", + "print 'Compressibility Factor is ',Z\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fugacity Coefficients are 0.8324 0.9511\n", + "Second Viral coefficient is -72.14\n", + "Compressibility Factor is 0.87\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 page no : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T = 473.15;\t\t\t#[K]\n", + "P = 70.;\t\t\t#[bar]\n", + "Tc = 420.;\t\t\t#[K]\n", + "Pc = 40.43;\t\t\t#[bar]\n", + "omega = 0.191;\n", + "\n", + "# Calculations\n", + "#By interpolation in Tables E.15 and E.16\n", + "si_0 = 0.627;\n", + "si_1 = 1.096;\n", + "#Using Eqn(11.64)\n", + "si = round(si_0*(si_1**omega),3);\n", + "f = round(si*P,1);\n", + "\n", + "# Results\n", + "print 'Fugacity coefficient is ',si\n", + "print 'fugacity is ',f,'bar'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fugacity coefficient is 0.638\n", + "fugacity is 44.7 bar\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 page no : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,exp,round\n", + "import math \n", + "\n", + "# Variables\n", + "P = 25.;\t\t\t#[KPa]\n", + "T = 323.15;\t\t\t#[K]\n", + "R = 83.14;\n", + "x1 = 0.5;\n", + "x2 = 1-x1;\n", + "\n", + "# Calculations\n", + "ij = array([11,22,12]);\n", + "Tc_ij = array([535.5,591.8,563.0]);\n", + "Pc_ij = array([41.5,41.1,41.3]);\n", + "Vc_ij = array([267,316,291]);\n", + "Zc_ij = round((Pc_ij*Vc_ij)/(R*Tc_ij),3);\n", + "omega_ij = array([0.323,0.262,0.293]);\n", + "\n", + "Tr_ij = round(T/Tc_ij,3);\n", + "B0 = round(0.083-(0.422/(Tr_ij**1.6)),3)\n", + "B1 = round(0.139-(0.172/(Tr_ij**4.2)),3)\n", + "B_ij = round((R*Tc_ij/Pc_ij)*(B0+(omega_ij*B1)),0);\n", + "\n", + "delta_12 = (2*B_ij[2])-B_ij[0]-B_ij[1];\n", + "R = 8314;\n", + "si_1 = round(exp((P/(R*T))*(B_ij[0]+(x2**2*delta_12))),3);\n", + "si_2 = round(exp((P/(R*T))*(B_ij[2]+(x1**2*delta_12))),3);\n", + "\n", + "Ans = [ij,Tc_ij,Pc_ij,Vc_ij,Zc_ij,omega_ij,Tr_ij,B0,B1,B_ij];\n", + "\n", + "# Results\n", + "print ' ij Tcij Pcij Vcij Zcij Wij Trij B0 B1 Bij'\n", + "print Ans\n", + "print 'Fugacity Coefficients are ',si_2,si_1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " ij Tcij Pcij Vcij Zcij Wij Trij B0 B1 Bij\n", + "[array([11, 22, 12]), array([ 535.5, 591.8, 563. ]), array([ 41.5, 41.1, 41.3]), array([267, 316, 291]), array([ 0.249, 0.264, 0.257]), array([ 0.323, 0.262, 0.293]), array([ 0.603, 0.546, 0.574]), array([-0.865, -1.028, -0.943]), array([-1.3 , -2.045, -1.632]), array([-1378., -1872., -1611.])]\n", + "Fugacity Coefficients are 0.985 0.987\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 page no : 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T0 = 298.15;\t\t\t#[K]\n", + "T = 323.15;\t\t\t#[K]\n", + "Cp_E = -2.86;\t\t\t#[J/mol/K]\n", + "Ho_E = 897.9;\t\t\t#[J/mol]\n", + "Go_E = 384.5;\t\t\t#[J/mol]\n", + "\n", + "# Calculations\n", + "#(a) Derivations\n", + "#G_E = -a*(T ln T - T)+ bT + c\n", + "#S_E = a ln T - b\n", + "#H_E = aT + c\n", + "#Where\n", + "#a = Cp_E\n", + "#c = Ho_E-aT0\n", + "#b = ((Go_E+a(T ln T0 - T0)-c)/T0)\n", + "#(b)\n", + "a = Cp_E;\n", + "c = round(Ho_E-(a*T0),1);\n", + "b = round((Go_E+(a*((T0*math.log(T0))-T0)-c))/T0,4);\n", + "G_E = round((-a*(T*math.log(T)-T))+(b*T)+c,1);\n", + "S_E = round((a*math.log(T))-b,3);\n", + "H_E = round((a*T)+c,1);\n", + "\n", + "# Results\n", + "print 'G_E = ',G_E,'J/mol'\n", + "print 'S_E = ',S_E,'J/mol/K'\n", + "print 'H_E = ',H_E,'J/mol'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "G_E = 344.4 J/mol\n", + "S_E = 1.492 J/mol/K\n", + "H_E = 826.4 J/mol\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch12.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch12.ipynb new file mode 100755 index 00000000..2eb6ec7e --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch12.ipynb @@ -0,0 +1,396 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6c1cf211e477e6ec4eda14a487dac19aefa6fb259944b68f0e581a0fdd608d5c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Solution Thermodynamics Applications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 page no : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "from numpy import zeros,array,exp,round\n", + "import math \n", + "\n", + "# Variables\n", + "P = array([90.15,91.78,88.01,81.67,78.89,76.82,73.39,66.45,62.95,57.70,50.16,45.70,29.00]);\n", + "x1 = array([0.000,0.063,0.248,0.372,0.443,0.508,0.561,0.640,0.702,0.763,0.834,0.874,1.000]);\n", + "y1 = array([0.000,0.049,0.131,0.182,0.215,0.248,0.268,0.316,0.368,0.412,0.490,0.570,1.000]);\n", + "x2 = 1-x1;\n", + "y2 = 1-y1;\n", + "P1_sat = P[12]\n", + "P2_sat = P[0]\n", + "K = zeros(13);\n", + "ln_V1 = zeros(13)\n", + "ln_V2 = zeros(13)\n", + "# Calculations and Results\n", + "for i in range(13):\n", + " if(i != 0):\n", + " ln_V1[i] = round(math.log(y1[i]*P[i]/(x1[i]*P1_sat)),3);\n", + " if(i != 12):\n", + " ln_V2[i] = round(math.log(y2[i]*P[i]/(x2[i]*P2_sat)),3);\n", + "\n", + "ln_V1[0] = None\n", + "ln_V2[12] = None\n", + "k = zeros(13)\n", + "for i in range(1,13):\n", + " K[i] = round(((x1[i]*ln_V1[i])+(x2[i]*ln_V2[i]))/(x1[i]*x2[i]),3); \t\t\t#K = G_E/(x1*x2*R*T)\n", + " k[i] = round(((x1[i]*ln_V1[i])+(x2[i]*ln_V2[i])),3); \t\t\t#K = G_E/(R*T)\n", + "\n", + "K[0] = None\n", + "k[0] = None\n", + "K[12] = None\n", + "k[12] = None\n", + "A21 = 0.70;\n", + "A12 = 1.35;\n", + "K_new = round((A21*x1)+(A12*x2),3);\n", + "#Using Eqn (12.10(a) and 12.10(b))\n", + "ln_V1_new = round((x2*x2)*(A12+(2*(A21-A12)*x1)),3);\n", + "V1_new = round(exp(ln_V1_new),3);\n", + "ln_V2_new = round((x1*x1)*(A21+(2*(A12-A21)*x2)),3);\n", + "V2_new = round(exp(ln_V2_new),3);\n", + "#Using Eqn (12.11)\n", + "P_new = (x1*V1_new*P1_sat)+(x2*V2_new*P2_sat);\n", + "\n", + "A21_new = 0.596;\n", + "A12_new = 1.153;\n", + "\n", + "K_new1 = round((A21_new*x1)+(A12_new*x2),3);\n", + "#Umath.sing Eqn (12.10(a) and 12.10(b))\n", + "ln_V1_new1 = round((x2*x2)*(A12_new+(2*(A21_new-A12_new)*x1)),3);\n", + "V1_new1 = round(exp(ln_V1_new1),3);\n", + "ln_V2_new1 = round((x1*x1)*(A21_new+(2*(A12_new-A21_new)*x2)),3);\n", + "V2_new1 = round(exp(ln_V2_new1),3);\n", + "#Umath.sing Eqn (12.11)\n", + "P_new1 = (x1*V1_new1*P1_sat)+(x2*V2_new1*P2_sat);\n", + "\n", + "subplot(220)\n", + "plot(x1,P,'bo')\n", + "plot(y1,P,'gs')\n", + "\n", + "plot(x1,P_new,'b-')\n", + "plot(y1,P_new,'g-')\n", + "\n", + "plot(x1,P_new1,'b--')\n", + "plot(y1,P_new1,'g--')\n", + "\n", + "suptitle('(a)')\n", + "xlabel('x1,y1')\n", + "ylabel('P/kPa')\n", + "\n", + "subplot(222)\n", + "plot(x1,ln_V1,'bs')\n", + "plot(x1,ln_V2,'gv') \n", + "\n", + "plot(x1,K,'ro') \n", + "\n", + "plot(x1,K_new,'r-')\n", + "plot(x1,ln_V1_new,'b-')\n", + "plot(x1,ln_V2_new,'g-')\n", + "\n", + "plot(x1,K_new1,'r--')\n", + "plot(x1,ln_V1_new1,'b--')\n", + "plot(x1,ln_V2_new1,'g--')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 6, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAANEAAAEhCAYAAADh30VCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXd4VEXXwH8hoYWWQOgtEHpHupSEFjoq2JAgTUVUBAHf\nV5rErrw2muWzACqigKA0IfQmndCkh95rAoH0ne+PsyGbZDfZJFvD/J7nPtm9O3vP7OaenZkzp4BG\no9FoNBqNRqPRaDQajUaj0Wg0Dz35gY2ARwavbwLyOKxHGo0D8LThtQYCF4CtFl5PAqoBxYAjNpSr\n0eQaVgM1gELAGmAPcADobdKmBbDA8V3TaFwfT+CyyeMixsd+wAmTdvmBiw7sl0Zjd7xsdB0/4K7x\ncR7gI6AtYADKAaWAa0Cc8fUCQKyNZGs0TsVWSgQpBoX+iFI9gqyDTiNKY9pO2VCuRuNUbGUpuwEU\nNj4uiow6SUB7oLJJu/zG83E2kqvROB1bjURJwCGgJjAXWIoYFXaT2hLXGNhmI5kaTa5jEPDfTNp8\nCDxh/65oNO5JPmQzNbPNVkuvazQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajSYNPwJXgYMZtAkCwhH3\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"" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 page no : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import poly1d\n", + "\n", + "#H_E = x1x2(40x1+20x2) (A)\n", + "#Find H1_E and H2_E\n", + "\n", + "#H1_E = H_E+((1-x1)*(dH_E/dx1)) let d = dH_E/dx1\n", + "\n", + "#H2_E = H_E-(x1*(dH_E/dx1)) let d = dH_E/dx1\n", + "\n", + "#Replacing x2 = 1-x1 in (A)\n", + "\n", + "# Calculations\n", + "H_E = poly1d([0, 20, 0, -20],'x1','c');\n", + "d = poly1d([20 ,0 ,-60],'x1','c');\n", + "H1_E = poly1d([20, 0, -60, 40],'x1','c');\n", + "H2_E = poly1d([0 ,0 ,0 ,40],'x1','c');\n", + "\n", + "# Results\n", + "print 'Expression For H1_E(x1) is ',H1_E\n", + "print 'Expression For H2_E(x1) is ',H2_E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Expression For H1_E(x1) is 4 2\n", + "1 c - 2800 c + 4.8e+04 c\n", + "Expression For H2_E(x1) is 4 3\n", + "1 c - 40 c\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 page no : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to Find the Heat of Formation of LiCl\n", + "\n", + "# Li + 0.5Cl2 --> LiCL(s) (A)\n", + "\n", + "# LiCl(s) + 12H2O(l) --> LiCl(12H2O) (B)\n", + "\n", + "#Net Reaction\n", + "#Li + 0.5Cl2 +12H2O(l) --> LiCl(12H2O) (Net)\n", + "\n", + "# Variables\n", + "#From Table C.4\n", + "Hf_A = -408610;\t\t\t#[J]\n", + "Hf_B = -33614;\t\t\t#[J]\n", + "\n", + "# Calculations\n", + "Hf_Net = Hf_A+Hf_B;\t\t\t#[J]\n", + "\n", + "# Results\n", + "print 'Heat of formation of LiCl in 12mol H2O at 298.15K is',Hf_Net,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat of formation of LiCl in 12mol H2O at 298.15K is -442224 J\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 page no : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "# Variables\n", + "M_LiCl = 42.39;\n", + "M_H2O = 18.015;\n", + "T1 = 298.15;\t\t\t#[K]\n", + "T2 = 405.15;\t\t\t#[K]\n", + "\n", + "# Calculations and Results\n", + "#Step a\n", + "m_LiCl = 0.15*2;\n", + "m_H2O = 2-m_LiCl;\n", + "n_LiCl = (m_LiCl*1000)/M_LiCl\n", + "n_H2O = (m_H2O*1000)/M_H2O;\n", + "dH_LiCl = -33800;\n", + "dH_a = -n_LiCl*dH_LiCl\t\t\t#[J/s]\n", + "\n", + "#Step b\n", + "m_LiCl = 0.15*2;\n", + "m_H2O = 0.45;\n", + "n_LiCl = (m_LiCl*1000)/M_LiCl;\n", + "n_H2O = (m_H2O*1000)/M_H2O;\n", + "dH_LiCl = -23260;\n", + "dH_b = n_LiCl*dH_LiCl\t\t\t#[J/s]\n", + "\n", + "#Step c\n", + "m_LiCl = 0.75;\n", + "Cp = 2.72;\n", + "dT = T2-T1;\n", + "dH_c = m_LiCl*Cp*dT*1000\t\t\t#[J/s]\n", + "\n", + "#step d\n", + "m_H2O = 2-m_LiCl;\n", + "dH_T2 = 2740.3;\t\t\t#[KJ/s/mol] form Steam Tables\n", + "dH_T1 = 104.8;\t\t\t#[KJ/s/mol] from Steam Tables\n", + "dH_d = m_H2O*(dH_T2-dH_T1)*1000\t\t\t#[J/s]\n", + "\n", + "dH = round((dH_a+dH_b+dH_c+dH_d)/1000,1);\n", + "\n", + "print 'The required Heat Transfer rate is ',dH,'kW or KJ/s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required Heat Transfer rate is 3587.2 kW or KJ/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 page no : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T0 = 298.15;\t\t\t#[K]\n", + "T = 361.5;\t\t\t#[K]\n", + "mT = 1.25;\t\t\t#[Kg/s] 10% NaOH\n", + "m_steam = 1;\t\t\t#[Kg/s] at P = 76 torr and 361.5K\n", + "m_50NaOH = mT-m_steam;\t\t\t#[Kg/s] at 361.5K\n", + "\n", + "# Calculations\n", + "#From Steam tables\n", + "#at 76 torr and 361.15K\n", + "H_steam = 2666;\t\t\t#[KJ/kg]\n", + "#for 10% NaOH soln at 294.15K\n", + "H_10NaOH = 79;\t\t\t#[KJ/Kg]\n", + "#for 50% NaOH soln at 361.15K\n", + "H_50NaOH = 500;\t\t\t#[KJ/Kg]\n", + "\n", + "dH = (m_steam*H_steam)+(m_50NaOH*H_50NaOH)-(mT*H_10NaOH);\n", + "Q = dH;\n", + "\n", + "# Results\n", + "print 'Heat Transfer rate',Q,'kW or kJ/s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat Transfer rate 2692.25 kW or kJ/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 page no : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T = 294.15;\t\t \t #[K]\n", + "m_NaOH_soln = 1.;\t\t \t #[kg]\n", + "m_NaOH_solid = 0.45*m_NaOH_soln;\t\t\t#[Kg]\n", + "m_H2O = 0.55*m_NaOH_soln;\t\t\t#[Kg]\n", + "\n", + "#From Steam Tables\n", + "H_NaOH_soln = 216.;\t\t\t#[kJ/Kg]\n", + "H_NaOH_solid = 1113.;\t\t\t#[kJ/Kg]\n", + "H_H2O = 88.;\t\t\t#[kJ/Kg]\n", + "\n", + "# Calculations\n", + "dH = m_NaOH_soln*H_NaOH_soln-(m_NaOH_solid*H_NaOH_solid)-(m_H2O*H_H2O);\n", + "Q = dH;\n", + "\n", + "# Results\n", + "print 'Heat Transferred per Kg of NaOH Soln',Q,'kW or kJ/kg'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat Transferred per Kg of NaOH Soln -333.25 kW or kJ/kg\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch13.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch13.ipynb new file mode 100755 index 00000000..4be6e5f5 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch13.ipynb @@ -0,0 +1,1289 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:11ca0d89ced68d0cbbe63c7f792aae8768450c19ca2bb47ac7ca1a7c91117b32" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Chemical Reaction Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 page no : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#CH4 + H2O --> CO + 3H2\n", + "n_CH4 = 2;\t\t\t#Moles of CH4\n", + "n_H2O = 1;\t\t\t#Moles of H20\n", + "n_CO = 1;\t\t\t#Moles of CO\n", + "n_H2 = 4;\t\t\t#Moles of H2\n", + "\n", + "v_CH4 = -1;\n", + "v_H2O = -1\n", + "v_CO = 1;\n", + "v_H2 = 3;\n", + "\n", + "# Calculations and Results\n", + "v = v_CH4+v_H2O+v_CO+v_H2;\n", + "n = n_CH4+n_H2O+n_CO+n_H2;\n", + "\n", + "#y_CH4 = (n_CH4+(v_CH4e)/n+(v*e))\n", + "#y_H2O = (n_H2O+(v_H2Oe)/n+(v*e))\n", + "#y_CO = (n_CO+(v_CO*e)/n+(v*e))\n", + "#y_H2 = (n_H2+(v_H2*e)/n+(v*e))\n", + "\n", + "y_CH4 = '(n_CH4+(v_CH4e)/n+(v*e))';\n", + "y_H2O = '(n_H2O+(v_H2Oe)/n+(v*e))';\n", + "y_CO = '(n_CO+(v_CO*e)/n+(v*e))';\n", + "y_H2 = '(n_H2+(v_H2*e)/n+(v*e))';\n", + "\n", + "#Hence\n", + "\n", + "y_CH4 = '(2-e/8+2e)';\n", + "y_H2O = '(1-e/8+2e)';\n", + "y_CO = '(1+e/8+2e)';\n", + "y_H2 = '(4+3e/8+2e)';\n", + "\n", + "print 'y_CH4 = ',y_CH4\n", + "print 'y_H2O = ',y_H2O\n", + "print 'y_CO = ',y_CO\n", + "print 'y_H2 = ',y_H2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "y_CH4 = (2-e/8+2e)\n", + "y_H2O = (1-e/8+2e)\n", + "y_CO = (1+e/8+2e)\n", + "y_H2 = (4+3e/8+2e)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 page no : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to Determine the Expression for yi for two reactions\n", + "\n", + "#CH4 + H2O --> CO + 3H2 (A)\n", + "\n", + "#CH4 + 2H2O --> CO2 + 4H2 (B)\n", + "\n", + "# Variables\n", + "Species = ['CH4','H2O','CO','CO2','H2','sum'];\n", + "v_A = ['-1','-1','1','0','3','2'];\n", + "v_B = ['-1','-2','0','1','4','2'];\n", + "m_CH4 = 2;\n", + "m_H2O = 3;\n", + "\n", + "# Calculations\n", + "mt = m_CH4+m_H2O;\n", + "y = ['(m_CH4+vie1+vje2)/(mt+vie1+vje2)','(m_H2O+vie1+vje2)/(mt+vie1+vje2)','(vie1)/(mt+vie1+vje2)','(vje2)/(mt+vie1+vje2)','(vie1+vje2)/(mt+vie1+vje2)',' '];\n", + "\n", + "#Hence\n", + "yf = ['(2-e1-e2)/(5+2e1+2e2)','(3-e1-2e2)/(5+2e1+3e2)','e1/(5+2e1+2e2)','e2/(5+2e1+2e2)','(3e1+4e2)/(5+2e1+2e2)',' '];\n", + "Ans = [Species,v_A,v_B,y,yf];\n", + "\n", + "# Results\n", + "print ' i v_A v_B y(Before substitution) y_species'\n", + "print Ans\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " i v_A v_B y(Before substitution) y_species\n", + "[['CH4', 'H2O', 'CO', 'CO2', 'H2', 'sum'], ['-1', '-1', '1', '0', '3', '2'], ['-1', '-2', '0', '1', '4', '2'], ['(m_CH4+vie1+vje2)/(mt+vie1+vje2)', '(m_H2O+vie1+vje2)/(mt+vie1+vje2)', '(vie1)/(mt+vie1+vje2)', '(vje2)/(mt+vie1+vje2)', '(vie1+vje2)/(mt+vie1+vje2)', ' '], ['(2-e1-e2)/(5+2e1+2e2)', '(3-e1-2e2)/(5+2e1+3e2)', 'e1/(5+2e1+2e2)', 'e2/(5+2e1+2e2)', '(3e1+4e2)/(5+2e1+2e2)', ' ']]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 page no : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "def IDCPH(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return (dA+((dB/2)*T0*(t+1))+((dC/3)*T0*T0*((t**2)+t+1))+(dD/(t*T0*T0)))*(T-T0)\n", + "\n", + "def IDCPS(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return ((dA)*math.log(t))+(((dB*T0)+(((dC*T0*T0)+(dD/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "# Variables\n", + "T0 = 298.16;\t\t\t#[K]\n", + "T1 = 418.15;\t\t\t#[K]\n", + "T2 = 593.15;\t\t\t#[K]\n", + "R = 8.314;\n", + "\n", + "#C2H4(g) + H2O(g) --> C2H5OH(g)\n", + "#Values From Table C.1 At T = 298.15K\n", + "\n", + "A_ethanol = 3.518;\n", + "A_ethene = 1.424;\n", + "A_water = 3.470;\n", + "\n", + "# Calculations\n", + "B_ethanol = 20.001*10**-3;\n", + "B_ethene = 14.394*10**-3;\n", + "B_water = 1.450*10**-3;\n", + "\n", + "C_ethanol = -6.002*10**-6;\n", + "C_ethene = -4.392*10**-6;\n", + "C_water = 0;\n", + "\n", + "D_ethanol = 0;\n", + "D_ethene = 0;\n", + "D_water = 0.121*10**5;\n", + "\n", + "dA = A_ethanol-A_ethene-A_water\n", + "dB = B_ethanol-B_ethene-B_water\n", + "dC = C_ethanol-C_ethene-C_water\n", + "dD = D_ethanol-D_ethene-D_water\n", + "\n", + "# Values from Table C.4 at T = 298.15K\n", + "H_ethanol = -235100;\t\t\t#[J/mol]\n", + "H_ethene = 52510;\t\t\t#[J/mol]\n", + "H_water = -241572;\t\t\t#[J/mol]\n", + "\n", + "G_ethanol = -168490;\t\t\t#[J/mol]\n", + "G_ethene = 68460;\t\t\t#[J/mol]\n", + "G_water = -228572;\t\t\t#[J/mol]\n", + "\n", + "dHo = H_ethanol-H_ethene-H_water\n", + "dGo = G_ethanol-G_ethene-G_water\n", + "\n", + "I1 = round(IDCPH(T0,T1,dA,dB,dC,dD),3)\n", + "I2 = round(IDCPS(T0,T1,dA,dB,dC,dD),5)\n", + "\n", + "#Using Eqn 13.18\n", + "#dG_418/RT = ((dGo - dHo)/RTo)+(dHo/RT)+((1/T)*I1)-I2 c1 = dG_418/RT\n", + "\n", + "c1 = round(((dGo-dHo)/(R*T0))+(dHo/(R*T1))+((1/T1)*I1)-I2,4)\n", + "I3 = round(IDCPH(T0,T2,dA,dB,dC,dD),3)\n", + "I4 = round(IDCPS(T0,T2,dA,dB,dC,dD),5)\n", + "\n", + "#Using Eqn 13.18\n", + "#dG_593/RT = ((dGo - dHo)/RTo)+(dHo/RT)+((1/T)*I1)-I2 c2 = dG_593/RT\n", + "\n", + "c2 = round(((dGo-dHo)/(R*T0))+(dHo/(R*T2))+((1/T2)*I3)-I4,4)\n", + "\n", + "K_413 = round(math.exp(-c1),4);\n", + "K_593 = math.exp(-c2);\n", + "\n", + "# Results\n", + "print 'Equilibrium Consmath.tant at T = 413.15K is ',K_413*10,'X 10**-1'\n", + "print 'Equilibrium Constant at T = 593.15K is ',round(K_593*1000,3),'X 10**-3'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium Consmath.tant at T = 413.15K is 1.404 X 10**-1\n", + "Equilibrium Constant at T = 593.15K is 2.802 X 10**-3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 page no : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,round,ones,exp,log\n", + "import math \n", + "\n", + "#Example 13.4 Alternate\n", + "# Alternate Program to 13.4\n", + "\n", + "# Variables\n", + "T = array([298.15,418.15,593.15]);\n", + "t = round(T/T[0],4);\n", + "R = 8.314;\n", + "\n", + "\n", + "#C2H4(g) + H2O(g) --> C2H5OH(g)\n", + "#Values From Table C.1 At T = 298.15K\n", + "\n", + "A_ethanol = 3.518;\n", + "A_ethene = 1.424;\n", + "A_water = 3.470;\n", + "\n", + "# Calculations\n", + "B_ethanol = 20.001*10**-3;\n", + "B_ethene = 14.394*10**-3;\n", + "B_water = 1.450*10**-3;\n", + "\n", + "C_ethanol = -6.002*10**-6;\n", + "C_ethene = -4.392*10**-6;\n", + "C_water = 0;\n", + "\n", + "D_ethanol = 0;\n", + "D_ethene = 0;\n", + "D_water = 0.121*10**5;\n", + "\n", + "dA = A_ethanol-A_ethene-A_water\n", + "dB = B_ethanol-B_ethene-B_water\n", + "dC = C_ethanol-C_ethene-C_water\n", + "dD = D_ethanol-D_ethene-D_water\n", + "\n", + "# Values from Table C.4 at T = 298.15K\n", + "H_ethanol = -235100;\t\t\t#[J/mol]\n", + "H_ethene = 52510;\t\t\t#[J/mol]\n", + "H_water = -241572;\t\t\t#[J/mol]\n", + "\n", + "G_ethanol = -168490;\t\t\t#[J/mol]\n", + "G_ethene = 68460;\t\t\t#[J/mol]\n", + "G_water = -228572;\t\t\t#[J/mol]\n", + "\n", + "dHo = H_ethanol-H_ethene-H_water\n", + "dGo = G_ethanol-G_ethene-G_water\n", + "\n", + "#Umath.sing Eqn(13.21)\n", + "Ko = round(exp(-dGo/(R*T[0])),3)\n", + "K0 = Ko*ones((1,3));\n", + "#Umath.sing Eqn(13.22)\n", + "K1 = exp((dHo/(R*T0))*(1-(T[0]/T)));\n", + "#Umath.sing Eqn(13.24)\n", + "K2 = round(exp((dA*(log(t)-((t-1)/t)))+(0.5*dB*T[0]*((t-1)**2)/t)+((1/6.)*dC*T[0]*T[0]*((t-1)**2)*(t+2)/t)+(0.5*dD*((t-1)**2)/((T[0]**2)*(t)**2))),4);\n", + "\n", + "K = K0*K1*K2;\n", + "\n", + "Ans = [T,t,K0,K1,K2,K];\n", + "\n", + "# Results\n", + "print ' T/K t K0 K1 K2 K',Ans\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " T/K t K0 K1 K2 K [array([ 298.15, 418.15, 593.15]), array([ 1. , 1.4025, 1.9894]), array([[ 29.366, 29.366, 29.366]]), array([ 1.00000000e+00, 4.84531951e-03, 9.74032575e-05]), array([ 1. , 0.9862, 0.9794]), array([[ 2.93660000e+01, 1.40324083e-01, 2.80142097e-03]])]\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 page no : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,round,ones,exp,log,poly1d,roots\n", + "\n", + "# Variables\n", + "#CO(g) + H2O(g) --> CO2(g) + H2(g)\n", + "v_CO = -1;\n", + "v_H2O = -1;\n", + "v_CO2 = 1;\n", + "v_H2 = 1;\n", + "v = v_CO+v_H2O+v_CO2+v_H2;\n", + "\n", + "#Calculate e(Fraction of Stream) in each case\n", + "#(a) \n", + "n_H2O_a = 1;\t\t\t#mol\n", + "n_CO_a = 1;\t\t\t#mol\n", + "T_a = 1100;\t\t\t#[K]\n", + "P_a = 1;\t\t\t#[bar]\n", + "\n", + "x = 10**4/T_a;\n", + "#at this x the value of ln K = 0 form Graph\n", + "y = 0;\n", + "nt = n_H2O_a+n_CO_a;\n", + "K = exp(y);\n", + "\n", + "#y_H2O = (n_H2O+(v_H2O*e))/nt\n", + "#y_CO = (n_CO+(v_CO*e))/nt\n", + "#y_H2 = (v_H2*e)/nt\n", + "#y_CO2 = (v_CO2*e)/nt\n", + "\n", + "\n", + "y_H2O = '(1-e)/2'\n", + "y_CO = '(1-e)/2'\n", + "y_H2 = 'e/2'\n", + "y_CO2 = 'e/2'\n", + "\n", + "\n", + "#K = (y_H2*y_CO2)/(y_CO*y_H2O)\n", + "\n", + "K = 'e**2/((1-e)**2) = 1';\n", + "\n", + "\n", + "#Solving \n", + "e_a = 0.5;\n", + "\n", + "#(b) same as in (a) P_b = 10bar\n", + "\n", + "#Pressure has no effect on fraction of stream\n", + "e_b = e_a;\n", + "\n", + "#(c) same as in (a) N2 = 2mols included\n", + "\n", + "#Since N2 just act as diluent\n", + "#It only changes the total moles fraction remains the same\n", + "e_c = e_a;\n", + "\n", + "#(d)\n", + "n_H2O_d = 2;\t\t\t#mol\n", + "n_CO_d = 1;\t\t\t#mol\n", + "T_d = 1100;\t\t\t#[K]\n", + "P_d = 1;\t\t\t#[bar]\n", + "\n", + "x = 10**4/T_d;\n", + "#at this x the value of ln K = 0 form Graph\n", + "y = 0;\n", + "nt = n_H2O_d+n_CO_d;\n", + "K = math.exp(y);\n", + "\n", + "#y_H2O = (n_H2O+(v_H2O*e))/nt\n", + "#y_CO = (n_CO+(v_CO*e))/nt\n", + "#y_H2 = (v_H2*e)/nt\n", + "#y_CO2 = (v_CO2*e)/nt\n", + "\n", + "y_H2O = '(1-e)/3'\n", + "y_CO = '(2-e)/3'\n", + "y_H2 = 'e/3'\n", + "y_CO2 = 'e/3'\n", + "\n", + "#K = (y_H2*y_CO2)/(y_CO*y_H2O)\n", + "\n", + "K = 'e**2/((1-e)(2-e)) = 1';\n", + "\n", + "#Solving \n", + "e = round(2./3,3);\n", + "e_d = round(e/2.,3);\n", + "\n", + "#(e) \n", + "#Here the y_CO and y_H2O are interchanged\n", + "\n", + "#No change in Fraction of stream\n", + "e_e = e_d;\n", + "\n", + "#(f) \n", + "n_H2O_f = 1;\t\t\t#mol\n", + "n_CO_f = 1;\t\t\t#mol\n", + "n_CO2_f = 1;\t\t\t#[mol]\n", + "T_f = 1100;\t\t\t#[K]\n", + "P_f = 1;\t\t\t#[bar]\n", + "\n", + "x = 10**4/T_f;\n", + "#at this x the value of ln K = 0 form Graph\n", + "y = 0;\n", + "nt = n_H2O_f+n_CO_f+n_CO2_f;\n", + "K = math.exp(y);\n", + "\n", + "#y_H2O = (n_H2O+(v_H2O*e))/nt\n", + "#y_CO = (n_CO+(v_CO*e))/nt\n", + "#y_CO2 = (n_CO2+(v_CO2*e))/nt\n", + "#y_H2 = (v_H2*e)/nt\n", + "\n", + "\n", + "y_H2O = '(1-e)/3'\n", + "y_CO = '(1-e)/3'\n", + "y_H2 = '(1+e)/3'\n", + "y_CO2 = 'e/2'\n", + "\n", + "\n", + "#K = (y_H2*y_CO2)/(y_CO*y_H2O)\n", + "\n", + "K = '(e*(e+1))/((1-e)**2) = 1';\n", + "\n", + "#Solving \n", + "e_f = round(1./3,3);\n", + "\n", + "#(g)\n", + "n_H2O_g = 1;\t\t\t#mol\n", + "n_CO_g = 1;\t\t\t#mol\n", + "T_g = 1650;\t\t\t#[K]\n", + "P_g = 1;\t\t\t#[bar]\n", + "\n", + "x = 10**4/T_g;\n", + "#at this x the value of ln K = 0 form Graph\n", + "y = -1.15;\n", + "nt = n_H2O_g+n_CO_g;\n", + "K = math.exp(y);\n", + "\n", + "#y_H2O = (n_H2O+(v_H2O*e))/nt\n", + "#y_CO = (n_CO+(v_CO*e))/nt\n", + "#y_H2 = (v_H2*e)/nt\n", + "#y_CO2 = (v_CO2*e)/nt\n", + "\n", + "\n", + "y_H2O = '(1-e)/2'\n", + "y_CO = '(1-e)/2'\n", + "y_H2 = 'e/2'\n", + "y_CO2 = 'e/2'\n", + "\n", + "\n", + "#K = (y_H2*y_CO2)/(y_CO*y_H2O)\n", + "\n", + "Exp = 'e**2/((1-e)**2) = 0.316';\n", + "\n", + "#Solving \n", + "p = poly1d([K, -2*K, K-1],'e','c');\n", + "\n", + "root = roots(p);\n", + "e_g = round(root[0],2);\n", + "\n", + "#Other Root is negative and the Fraction of steam cannot be negative\n", + "\n", + "\n", + "# Results\n", + "print ('(a)1mol H20 and 1 mol CO T = 1100K P = 1bar')\n", + "print ('(b)1mol H20 and 1 mol CO T = 1100K P = 10bar')\n", + "print ('(c)1mol H20 and 1 mol CO 2mol N2 T = 1100K P = 1bar')\n", + "print ('(d)2mol H20 and 1 mol CO T = 1100K P = 1bar')\n", + "print ('(e)1mol H20 and 2 mol CO T = 1100K P = 1bar')\n", + "print ('(f)1mol H20 and 1 mol CO 1mol CO2 T = 1100K P = 1bar')\n", + "print ('(g)1mol H20 and 1 mol CO T = 1650K P = 1bar')\n", + "e = [e_a, e_b, e_c, e_d, e_e, e_f, e_g];\n", + "print 'Fraction Of Steam Reacted in each case',e\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)1mol H20 and 1 mol CO T = 1100K P = 1bar\n", + "(b)1mol H20 and 1 mol CO T = 1100K P = 10bar\n", + "(c)1mol H20 and 1 mol CO 2mol N2 T = 1100K P = 1bar\n", + "(d)2mol H20 and 1 mol CO T = 1100K P = 1bar\n", + "(e)1mol H20 and 2 mol CO T = 1100K P = 1bar\n", + "(f)1mol H20 and 1 mol CO 1mol CO2 T = 1100K P = 1bar\n", + "(g)1mol H20 and 1 mol CO T = 1650K P = 1bar\n", + "Fraction Of Steam Reacted in each case [0.5, 0.5, 0.5, 0.33400000000000002, 0.33400000000000002, 0.33300000000000002, -0.68000000000000005]\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 page no : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import array,round,ones,exp,log\n", + "\n", + "def IDCPH(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return (dA+((dB/2)*T0*(t+1))+((dC/3)*T0*T0*((t**2)+t+1))+(dD/(t*T0*T0)))*(T-T0)\n", + "\n", + "def IDCPS(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return ((dA)*math.log(t))+(((dB*T0)+(((dC*T0*T0)+(dD/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "def PHIB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " return exp((Pr/Tr)*(B0+(omega*B1)));\n", + "\n", + "\n", + "# Variables\n", + "T0 = 298.16;\t\t\t#[K]\n", + "T1 = 523.15;\t\t\t#[K]\n", + "P = 35.; \t\t\t#[bar]\n", + "R = 8.314;\n", + "\n", + "#C2H4(g) + H2O(g) --> C2H5OH(g)\n", + "#Values From Table C.1 At T = 298.15K\n", + "\n", + "A_ethanol = 3.518;\n", + "A_ethene = 1.424;\n", + "A_water = 3.470;\n", + "\n", + "B_ethanol = 20.001*10**-3;\n", + "B_ethene = 14.394*10**-3;\n", + "B_water = 1.450*10**-3;\n", + "\n", + "C_ethanol = -6.002*10**-6;\n", + "C_ethene = -4.392*10**-6;\n", + "C_water = 0;\n", + "\n", + "D_ethanol = 0;\n", + "D_ethene = 0;\n", + "D_water = 0.121*10**5;\n", + "\n", + "# Calculations and Results\n", + "dA = A_ethanol-A_ethene-A_water\n", + "dB = B_ethanol-B_ethene-B_water\n", + "dC = C_ethanol-C_ethene-C_water\n", + "dD = D_ethanol-D_ethene-D_water\n", + "\n", + "# Values from Table C.4 at T = 298.15K\n", + "H_ethanol = -235100;\t\t\t#[J/mol]\n", + "H_ethene = 52510;\t\t\t#[J/mol]\n", + "H_water = -241572;\t\t\t#[J/mol]\n", + "\n", + "G_ethanol = -168490;\t\t\t#[J/mol]\n", + "G_ethene = 68460;\t\t\t#[J/mol]\n", + "G_water = -228572;\t\t\t#[J/mol]\n", + "\n", + "dHo = H_ethanol-H_ethene-H_water\n", + "dGo = G_ethanol-G_ethene-G_water\n", + "\n", + "I1 = round(IDCPH(T0,T1,dA,dB,dC,dD),3)\n", + "I2 = round(IDCPS(T0,T1,dA,dB,dC,dD),5)\n", + "\n", + "#Umath.sing Eqn 13.18\n", + "#dG_418/RT = ((dGo - dHo)/RTo)+(dHo/RT)+((1/T)*I1)-I2 c1 = dG_418/RT\n", + "\n", + "c1 = round(((dGo-dHo)/(R*T0))+(dHo/(R*T1))+((1/T1)*I1)-I2,4)\n", + "K_523 = round(exp(-c1),4);\n", + "print 'Equilibrium Consmath.tant at T = 523.15K is ',round(K_523*1000,3),'X 10**-3'\n", + "\n", + "#Values Frm App B\n", + "Tc = array([282.3,647.1,513.9]);\n", + "Pc = array([50.4,220.55,61.48]);\n", + "omega = array([0.087,0.345,0.645]);\n", + "\n", + "Tr = round(T1/Tc,3);\n", + "Pr = round(P/Pc,3);\n", + "si = round(PHIB(Tr,Pr,omega),3);\n", + "\n", + "#Umath.sing eqn\n", + "#(y_ETOH*si_ETOH)/(y_C2H4*si_C2H4*y_H20*si_H2O) = (P/Po)K\n", + "#y_ETOH/(y_C2H4*y_H20) = c = ((si_C2H4*si_H2O)/si_ETOH)(P/Po)K\n", + "c = round(((si[0]*si[1])/si[2])*(P*K_523),3)\n", + "\n", + "#y_C2H4 = (1-e)/(6-e) \n", + "#y_ETOH = (5-e)/(6-e)\n", + "#y_H2O = (e)/(6-e)\n", + "\n", + "#Solving we get a Eqn \n", + "#poly([1.342 -6 1],'e','c')\n", + "root = round(roots(poly1d([1.342, -6, 1],'e','c')),3)\n", + "\n", + "r = root[0]*100;\n", + "#Since e > 1 not possible so e = 0.233\n", + "\n", + "print 'The Maximum Conversion of ethylene to ethanol by Vapor-Phase Hydration is ',r,'%'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium Consmath.tant at T = 523.15K is 9.8 X 10**-3\n", + "The Maximum Conversion of ethylene to ethanol by Vapor-Phase Hydration is -600.0 %\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 page no : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import roots, poly1d\n", + "import math \n", + "\n", + "# Variables\n", + "T = 1393.15;\t\t\t#K\n", + "P = 1.;\t\t\t#[bar]\n", + "x = 10.**4/T;\n", + "#C2H2 --> 2C + H2 (I)\n", + "#2C + 2H2 --> C2H4 (II)\n", + "\n", + "# Calculations\n", + "#Values Of ln K (at 1000/T )for Reactions I and II from Graph\n", + "K_I = math.exp(12.9);\n", + "K_II = math.exp(-12.9);\n", + "K = K_I*K_II;\n", + "\n", + "#Application in Eqn (13.5)\n", + "\n", + "#y_C2H4/(y_C2H2*y_H2) = c = (P/Po)K\n", + "c = P*K;\n", + "#y_H2 = y_C2H2 = (1-e)/(2-e)\n", + "#y_C2H4 = e/(2-e)\n", + "\n", + "\n", + "#The Eqn comes out to be\n", + "#poly([1 -4 2],'e','c')\n", + "\n", + "root = round(roots(poly1d([1, -4, 2],'e','c')),3)\n", + "e = root[0];\n", + "#Since e > 1 not possible so e = 0.293\n", + "y_C2H2 = round((1-e)/(2-e),3);\n", + "y_H2 = y_C2H2;\n", + "y_C2H4 = round(e/(2-e),3);\n", + "\n", + "print 'Equilibrium Composition of H2 C2H2 and C2H4 Respectively ',y_C2H4,y_C2H2,y_H2\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium Composition of H2 C2H2 and C2H4 Respectively -0.667 0.833 0.833\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 page no : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import roots,poly1d\n", + "import math \n", + "\n", + "# Variables\n", + "T0 = 298.15;\n", + "T = 373.15;\t\t\t#[K]\n", + "R = 8.314;\n", + "#CH3COOH(l)+C2H5OH(l) --> CH3COOC2H5(l) + H2O(l)\n", + "\n", + "#From Table C.4\n", + "dHo_EtAc = -480000.;\t\t\t#[J]\n", + "dHo_H2O = -285830.;\t\t\t#[J]\n", + "dHo_EtOH = -277690.;\t\t\t#[J]\n", + "dHo_AcH = -484500.;\t\t\t#[J]\n", + "\n", + "dGo_EtAc = -332200.;\t\t\t#[J]\n", + "dGo_H2O = -237130.;\t\t\t#[J]\n", + "dGo_EtOH = -174780.;\t\t\t#[J]\n", + "dGo_AcH = -389900.;\t\t\t#[J]\n", + "\n", + "# Calculations\n", + "dHo_298 = dHo_EtAc+dHo_H2O-dHo_EtOH-dHo_AcH;\n", + "dGo_298 = dGo_EtAc+dGo_H2O-dGo_EtOH-dGo_AcH;\n", + "\n", + "K_298 = round(math.exp(-dGo_298/(R*T0)),4);\n", + "\n", + "#Umath.sing Eqn(13.15)\n", + "#ln(K_373/K_298) = c = -(dHo_298/R)*((1/373.15)-(1/298.15))\n", + "c = round(-(dHo_298/R)*((1/373.15)-(1/298.15)),4);\n", + "K_373 = round(K_298*math.exp(c),4);\n", + "\n", + "#x_AcH = x_EtOH = (1-e)/2 and x_EtAc = x_H2O = e/2\n", + "#K = (x_EtAc*x_H2O)/(x_AcH*x_EtOH)\n", + "\n", + "#Hence The Eqn is\n", + "q = poly1d([K_373, -2*K_373, K_373-1],'e','c')\n", + "root = round(roots(q),4)\n", + "e = root[0];\n", + "#Since Other Root is > 1 hence e = 0.6879\n", + "x_EtAc = round(e/2,3);\n", + "\n", + "# Results\n", + "print 'Composition of Ethyl Acetate in the Reacting Mixture',x_EtAc\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Composition of Ethyl Acetate in the Reacting Mixture -4.859\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9 page no : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import isreal\n", + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "def IDCPH(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return (dA+((dB/2)*T0*(t+1))+((dC/3)*T0*T0*((t**2)+t+1))+(dD/(t*T0*T0)))*(T-T0)\n", + "\n", + "def IDCPS(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return ((dA)*math.log(t))+(((dB*T0)+(((dC*T0*T0)+(dD/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "# Variables\n", + "P = 1.;\t\t\t#[bar]\n", + "T0 = 298.15;\t\t\t#[K]\n", + "R = 8.314;\n", + "\n", + "#SO2 + 0.5O2 --> SO3\n", + "dHo_298 = -98890.;\t\t\t#[J/mol]\n", + "dGo_298 = -70866.;\t\t\t#[J/mol]\n", + "\n", + "# Calculations\n", + "n_O2_i = 0.5*1.2;\t\t\t# Moles O2 Entering\n", + "n_N2_i = n_O2_i*(79./21);\t\t\t#Moles N2 Entering\n", + "\n", + "#n_SO2 = 1-e\n", + "#n_O2 = 0.6-(0.5*e)\n", + "#n_SO3 = e\n", + "#n_N2 = 2.257\n", + "\n", + "#By Energy Balance\n", + "#(dHo_298*e)+dHo_P = dH = 0 (A)\n", + "\n", + "#dHo_P = Cp*(T-298.15) Cp = E nCp (B)\n", + "\n", + "#Cp_SO2 = R*MCPH(T0,T,5.699,0.801E-3,0,-1.015E+5) \n", + "#Cp_O2 = R*MCPH(T0,T,3.639,0.506E-3,0,-0.227E+5)\n", + "#Cp_SO3 = R*MCPH(T0,T,8.06,1.056E-3,0,-2.028E+5)\n", + "#Cp_N2 = R*MCPH(T0,T,3.28,0.593E-3,0,0.04E+5)\n", + "\n", + "#T = (-(dHo_298*e)/Cp)+T0 (C)\n", + "\n", + "#K = (e/(1-e))*((3.857-(0.5*e))/(0.6-(0.5*e)))**0.5 (D)\n", + "\n", + "#ln K = ((dHo_298-dGo_298)/(R*T0))-(dHo_298/(R*T))+I1-(I2/T) (E)\n", + "\n", + "#I1 = IDCPS(T0,T,0.5415,0.002E-3,0,-0.8995E+5)\n", + "#I2 = IDCPH(T0,T,0.5415,0.002E-3,0,-0.8995E+5)\n", + "\n", + "#Iteration\n", + "A1 = 300.;\t\t\t#Initial\n", + "i = -1.;\n", + "\n", + "while(i == -1):\n", + " I1 = IDCPS(T0,A1,0.5415,0.002E-3,0,-0.8995E+5);\n", + " I2 = IDCPH(T0,A1,0.5415,0.002E-3,0,-0.8995E+5);\n", + " #Applying in Eqn (E)\n", + " K = math.exp(((dHo_298-dGo_298)/(R*T0))-(dHo_298/(R*A1))+I1-(I2/A1));\n", + " #Applying in Eqn (D)\n", + " if(isreal(K)):\n", + " x = 0;\n", + " # p = poly([-0.6*(K**2) 1.7*(K**2) 3.857-(1.6*(K**2)) 0.5*((K**2)-1)],'e','c')\n", + " # (0.5*((K**2)-1)*(x**3))+((3.857-(1.6*(K**2)))*(x**2))+(1.7*(K**2)*x)+(-0.6*(K**2))\n", + " F_x = (0.5*((K**2)-1)*(x**3))+((3.857-(1.6*(K**2)))*(x**2))+(1.7*(K**2)*x)+(-0.6*(K**2));\n", + " F_a = F_x;\n", + "\n", + " x = 1;\n", + " F_x = (0.5*((K**2)-1)*(x**3))+((3.857-(1.6*(K**2)))*(x**2))+(1.7*(K**2)*x)+(-0.6*(K**2));\n", + " #F_x = (x**3)-(4*x)+1;\n", + " F_b = F_x;\n", + " root = -100;\n", + " A = 0;\n", + " B = 1;\n", + " i = 1;\n", + " while(i == 1):\n", + " a = A;\n", + " F_a = (0.5*((K**2)-1)*(a**3))+((3.857-(1.6*(K**2)))*(a**2))+(1.7*(K**2)*a)+(-0.6*(K**2));\n", + " #F_a = (a**3)-(4*a)+1;\n", + " b = B;\n", + " F_b = (0.5*((K**2)-1)*(b**3))+((3.857-(1.6*(K**2)))*(b**2))+(1.7*(K**2)*b)+(-0.6*(K**2));\n", + " #F_b = (b**3)-(4*b)+1;\n", + " x1 = ((a*F_b)-(b*F_a))/(F_b-F_a);\n", + " F_x1 = (0.5*((K**2)-1)*(x1**3))+((3.857-(1.6*(K**2)))*(x1**2))+(1.7*(K**2)*x1)+(-0.6*(K**2));\n", + " #F_x1 = (x1**3)-(4*x1)+1;\n", + "\n", + " if((F_a*F_x1)<0):\n", + " flag = 1;\n", + " A = a;\n", + " B = x1;\n", + " elif ((F_x1*F_b)<0):\n", + " flag = 2;\n", + " A = x1;\n", + " B = b; \n", + " x1_a = round(x1,4);\n", + " b_a = round(b,4);\n", + " a_a = round(a,4);\n", + " if(x1_a == b_a):\n", + " root = round(x1,5);\n", + " i = 0;\n", + " break;\n", + " elif(x1_a == a_a):\n", + " root = round(x1,5);\n", + " i = 0;\n", + " break; \n", + " e = root;\n", + " Cp_SO2 = R*MCPH(T0,A1,5.699,0.801E-3,0,-1.015E+5); \n", + " Cp_O2 = R*MCPH(T0,A1,3.639,0.506E-3,0,-0.227E+5);\n", + " Cp_SO3 = R*MCPH(T0,A1,8.06,1.056E-3,0,-2.028E+5);\n", + " Cp_N2 = R*MCPH(T0,A1,3.28,0.593E-3,0,0.04E+5);\n", + "\n", + " n_SO2 = 1-e;\n", + " n_O2 = 0.6-(0.5*e);\n", + " n_SO3 = e;\n", + " n_N2 = 2.257;\n", + " if(n_SO2<0 or n_O2<0 or n_SO3<0):\n", + " e = 0;\n", + "\n", + " Cp = (n_SO2*Cp_SO2)+(n_O2*Cp_O2)+(n_SO3*Cp_SO3)+(n_N2*Cp_N2);\n", + " #Applying in Eqn (C)\n", + " B = (-(dHo_298*e)/Cp)+T0;\n", + " m = (A1+B)/2;\n", + " dT = round(abs(m-A1),2);\n", + " if(dT<0.1):\n", + " i = 0;\n", + " T = round(A1,1);\n", + " e = round(e,2);\n", + " break;\n", + " A1 = m;\n", + " i = -1;\n", + " else:\n", + " i = -1;\n", + " A1 = A1+1; \n", + "\n", + "print 'Fraction',e\n", + "\n", + "n_SO2 = 1-e\n", + "n_O2 = 0.6-(0.5*e)\n", + "n_SO3 = e\n", + "n_N2 = 2.257\n", + "\n", + "nt = n_SO2+n_O2+n_SO3+n_N2;\n", + "\n", + "y_SO2 = round(n_SO2/nt,4);\n", + "y_O2 = round(n_O2/nt,4);\n", + "y_SO3 = round(n_SO3/nt,4);\n", + "y_N2 = round(n_N2/nt,4);\n", + "\n", + "# Results\n", + "print 'Final Temperature',T\n", + "print 'Composition of SO2',y_SO2\n", + "print 'Composition of O2',y_O2\n", + "print 'Composition of SO3',y_SO3\n", + "print 'Composition of N2',y_N2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction 0.77\n", + "Final Temperature 855.8\n", + "Composition of SO2 0.0662\n", + "Composition of O2 0.0619\n", + "Composition of SO3 0.2218\n", + "Composition of N2 0.6501\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 page no : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def IDCPH(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return (dA+((dB/2)*T0*(t+1))+((dC/3)*T0*T0*((t**2)+t+1))+(dD/(t*T0*T0)))*(T-T0)\n", + "\n", + "def IDCPS(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return ((dA)*math.log(t))+(((dB*T0)+(((dC*T0*T0)+(dD/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "# Variables\n", + "T0 = 298.16;\t\t\t#[K]\n", + "T1 = 750;\t\t\t#[K]\n", + "R = 8.314;\n", + "P = 1.2;\t\t\t#[bar]\n", + "\n", + "#C4H10 --> C2H4 + C2H6 (I)\n", + "#C4H10 --> C3H6 + CH4 (II)\n", + "\n", + "#Values From Table C.1 At T = 298.15K\n", + "\n", + "A_butane = 1.935;\n", + "A_ethene = 1.424;\n", + "A_ethane = 1.131;\n", + "A_propene = 1.637;\n", + "A_methane = 1.702;\n", + "\n", + "B_butane = 36.915*10**-3;\n", + "B_ethene = 14.394*10**-3;\n", + "B_ethane = 19.225*10**-3;\n", + "B_propene = 22.706*10**-3;\n", + "B_methane = 9.081*10**-3;\n", + "\n", + "C_butane = -11.402*10**-6;\n", + "C_ethene = -4.392*10**-6;\n", + "C_ethane = -5.561*10**-6;\n", + "C_propene = -6.915*10**-6;\n", + "C_methane = -2.164*10**-6;\n", + "\n", + "D_butane = 0;\n", + "D_ethene = 0;\n", + "D_ethane = 0;\n", + "D_propene = 0;\n", + "D_methane = 0;\n", + "\n", + "dA_I = A_ethene+A_ethane-A_butane;\n", + "dA_II = A_methane+A_propene-A_butane;\n", + "\n", + "dB_I = B_ethene+B_ethane-B_butane;\n", + "dB_II = B_methane+B_propene-B_butane;\n", + "\n", + "dC_I = C_ethene+C_ethane-C_butane;\n", + "dC_II = C_methane+C_propene-C_butane;\n", + "\n", + "dD_I = D_ethene+D_ethane-D_butane;\n", + "dD_II = D_methane+D_propene-D_butane;\n", + "\n", + "# Values from Table C.4 at T = 298.15K\n", + "H_butane = -125790.;\t\t\t#[J/mol]\n", + "H_ethene = 52510.;\t\t\t#[J/mol]\n", + "H_ethane = -83820.;\t\t\t#[J/mol]\n", + "H_propene = 19710.;\t\t\t#[J/mol]\n", + "H_methane = -74520.;\t\t\t#[J/mol]\n", + "\n", + "G_butane = -16570;\t\t\t#[J/mol]\n", + "G_ethene = 68460.;\t\t\t#[J/mol]\n", + "G_ethane = -31855.;\t\t\t#[J/mol]\n", + "G_propene = 62205.;\t\t\t#[J/mol]\n", + "G_methane = -50460.;\t\t\t#[J/mol]\n", + "\n", + "# Calculations\n", + "dHo_I = H_ethene+H_ethane-H_butane\n", + "dHo_II = H_methane+H_propene-H_butane\n", + "\n", + "dGo_I = G_ethene+G_ethane-G_butane\n", + "dGo_II = G_methane+G_propene-G_butane\n", + "\n", + "I1_I = round(IDCPH(T0,T1,dA_I,dB_I,dC_I,dD_I),3)\n", + "I1_II = round(IDCPH(T0,T1,dA_II,dB_II,dC_II,dD_II),3)\n", + "I2_I = round(IDCPS(T0,T1,dA_I,dB_I,dC_I,dD_I),5)\n", + "I2_II = round(IDCPS(T0,T1,dA_II,dB_II,dC_II,dD_II),5)\n", + "\n", + "#Using Eqn 13.18\n", + "#dG_418/RT = ((dGo - dHo)/RTo)+(dHo/RT)+((1/T)*I1)-I2 c1 = dG_418/RT\n", + "\n", + "c1_I = round(((dGo_I-dHo_I)/(R*T0))+(dHo_I/(R*T1))+((1/T1)*I1_I)-I2_I,4)\n", + "c1_II = round(((dGo_II-dHo_II)/(R*T0))+(dHo_II/(R*T1))+((1/T1)*I1_II)-I2_II,4)\n", + "\n", + "K_I = round(math.exp(-c1_I),4)\n", + "K_II = round(math.exp(-c1_II),4)\n", + "\n", + "k = (K_II/K_I)**0.5;\n", + "e_I = round(((K_I/P)/(1+(K_I*(1/P)*(1+k)*(1+k))))**0.5,4);\n", + "\n", + "e_II = round(k*e_I,4);\n", + "\n", + "n_C4H10 = 1-e_I-e_II;\n", + "n_C2H4 = e_I;\n", + "n_C2H6 = e_I;\n", + "n_C3H6 = e_II;\n", + "n_CH4 = e_II;\n", + "nt = n_C4H10+n_C2H4+n_C2H6+n_C3H6+n_CH4;\n", + "\n", + "y_C4H10 = round(n_C4H10/nt,4);\n", + "y_C2H4 = round(n_C2H4/nt,4);\n", + "y_C2H6 = round(n_C2H6/nt,4);\n", + "y_C3H6 = round(n_C3H6/nt,4);\n", + "y_CH4 = round(n_CH4/nt,4);\n", + "\n", + "y = [y_C4H10, y_C2H4, y_C2H6, y_C3H6, y_CH4];\n", + "\n", + "# Results\n", + "print ' Y_C4H10 Y_C2H4 Y_C2H6 Y_C3H6 Y_CH4'\n", + "print y\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Y_C4H10 Y_C2H4 Y_C2H6 Y_C3H6 Y_CH4\n", + "[0.0014, 0.049399999999999999, 0.049399999999999999, 0.45000000000000001, 0.45000000000000001]\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 page no : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,legend\n", + "from numpy import array,linspace,exp,linalg,zeros\n", + "\n", + "\n", + "# Variables\n", + "n_air = 2.381\t\t\t#[mol]\n", + "n_O2 = 0.21*n_air;\n", + "n_N2 = 0.79*n_air;\n", + "R = 8.314;\n", + "\n", + "P = 20.; \t\t\t#[bar]\n", + "T = array([1000, 1100, 1200, 1300, 1400, 1500]);\n", + "dG_H2O = array([-192420, -187000, -181380, -175720, -170020, -164310]);\n", + "dG_CO = array([-200240, -209110, -217830, -226530, -235130, -243740]);\n", + "dG_CO2 = array([-395790, -395960, -396020, -396080, -396130, -396160]);\n", + "\n", + "KI = 'y_H2O/((y_O2)**0.5*y_H2)(P/Po)**-0.5'\n", + "KII = 'y_CO/((y_O2)**0.5)(P/Po)**0.5'\n", + "KIII = 'y_CO2/y_O2'\n", + "\n", + "n = '3.38+((e2-e1)/2)'\n", + "y_H2 = '-e1/n'\n", + "y_CO = 'e2/n'\n", + "y_O2 = '((0.5(1-e1-e2))-e3)/n'\n", + "y_H2O = '(1+e1)/n'\n", + "y_CO2 = 'e3/n'\n", + "y_N2 = '1.88/n'\n", + "\n", + "KI = '(1+e1)(2n)**0.5*(P/Po)**-0.5'\n", + "KII = '(e3*(P/Po)**0.5)/(1-e1-e2-2e3)**0.5*(n/2)**0.5'\n", + "KIII = '2e3/(1-e1-e2-2e3)'\n", + "\n", + "# Calculations\n", + "K_I = round(exp(-dG_H2O/(R*T)),1)\n", + "K_II = round(exp(-dG_CO/(R*T)),1)\n", + "K_III = round(exp(-dG_CO2/(R*T)),1)\n", + "\n", + "#Now math.since the values of KI KII KIII valyes are so High the mole fraction of O2 must be very small\n", + "#Hence We eleminate O2,Hence 2 Eqns are,\n", + "\n", + "#C + CO2 --> 2CO (a)\n", + "#H2O + C --> H2 + CO (b)\n", + "\n", + "Ka = '(y_CO**2/y_CO2)*(P/Po)'\n", + "Kb = '((y_H2*y_CO)/y_H2O)*(P/Po)'\n", + "\n", + "n = '3.38+(e_a+e_b)'\n", + "y_H2 = 'e_b/n'\n", + "y_CO = '(2e_a+e_b)/n'\n", + "y_H2O = '(1-e_b)/n'\n", + "y_CO2 = '(0.5-e_a)/n'\n", + "y_N2 = '1.88/n'\n", + "\n", + "Ka = '(2e_a+e_b)**2/((0.5-e_a)*n)*(P/Po)'\n", + "Kb = 'e_b(2e_a+e_b)/((1-e_b)*n)*(P/Po)'\n", + "\n", + "dG_new_a = (2*dG_CO)-dG_CO2;\n", + "dG_new_b = dG_CO-dG_H2O;\n", + "\n", + "Ka = round(exp((-dG_new_a/(R*T))),3);\n", + "Kb = round(exp((-dG_new_b/(R*T))),3);\n", + "\n", + "#Calculation of e_a and e_b\n", + "\n", + "a = 0.1;\t\t\t#Initial Value\n", + "\n", + "b = 0.7;\t\t\t#Initial Value\n", + "\n", + "C1 = Ka/20;\n", + "C2 = Kb/20;\n", + "e_a = zeros(6)\n", + "e_b = zeros(6)\n", + "for i in range(6):\n", + " c = -1;\n", + " while(c == -1):\n", + " fa = round((((a**2)*(4+C1[i]))+(b**2)+((4+C1[i])*(a*b))+(2.88*C1[i]*a)-(0.5*C1[i]*b)-(1.69*C1[i])),4);\n", + " dfax = round(((2*a*(4+C1[i]))+((4+C1[i])*b)+(2.88*C1[i])),4);\n", + " dfay = round((2*b)+((4+C1[i])*a)-(0.5*C1[i]),4);\n", + "\n", + " fb = round(((b**2*(1+C2[i]))+((2+C2[i])*a*b)-(C2[i]*a)+(2.38*C2[i]*b)-(3.38*C2[i])),4);\n", + " dfbx = round((((2+C2[i])*b)-C2[i]),4);\n", + " dfby = round(((2*b*(1+C2[i]))+((2+C2[i])*a)+(2.38*C2[i])),4);\n", + "\n", + " A = [[dfax ,dfay],[dfbx ,dfby]];\n", + " B = [-fa,-fb];\n", + " Ans = round(linalg.solve(A,B),4); \n", + " da = Ans[0];\n", + " db = Ans[1];\n", + "\n", + " if(da == 0 and db == 0):\n", + " c = 0;\n", + " e_a[i] = a;\n", + " e_b[i] = b;\n", + " break;\n", + "\n", + " a = a+da;\n", + " b = b+db;\n", + "\n", + "\n", + "n = 3.38+(e_a+e_b);\n", + "y_H2 = round(e_b/n,3);\n", + "y_CO = round(((2*e_a)+e_b)/n,3);\n", + "y_H2O = round((1-e_b)/n,3);\n", + "y_CO2 = round((0.5-e_a)/n,3);\n", + "y_N2 = round(1.88/n,3);\n", + "\n", + "Ans = [T,Ka,Kb,e_a,e_b];\n", + "Ans1 = [T,y_H2,y_CO,y_H2O,y_CO2,y_N2];\n", + "\n", + "# Results\n", + "plot(T,y_H2,'r-')\n", + "plot(T,y_CO,'b-')\n", + "plot(T,y_H2O,'g-')\n", + "plot(T,y_CO2,'m-')\n", + "plot(T,y_N2,'y-')\n", + "\n", + "suptitle('Equllibrium Compositions')\n", + "xlabel('T/K')\n", + "ylabel('yi')\n", + "\n", + "\n", + "print ' T/K Ka Kb e_a e_b'\n", + "print Ans\n", + "print ' T/K y_H2 y_CO y_H2O y_CO2 y_N2'\n", + "print Ans1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " T/K Ka Kb e_a e_b\n", + "[array([1000, 1100, 1200, 1300, 1400, 1500]), array([ 1.758, 11.405, 53.155, 194.79 , 583.343, 1514.118]), array([ 2.561, 11.219, 38.609, 110.064, 268.764, 583.577]), array([-0.0506, 0.121 , 0.3168, 0.4302, 0.4738, 0.4895]), array([ 0.5336, 0.7124, 0.8551, 0.9357, 0.9713, 0.9863])]\n", + " T/K y_H2 y_CO y_H2O y_CO2 y_N2\n", + "[array([1000, 1100, 1200, 1300, 1400, 1500]), array([ 0.138, 0.169, 0.188, 0.197, 0.201, 0.203]), array([ 0.112, 0.227, 0.327, 0.378, 0.398, 0.405]), array([ 0.121, 0.068, 0.032, 0.014, 0.006, 0.003]), array([ 0.143, 0.09 , 0.04 , 0.015, 0.005, 0.002]), array([ 0.487, 0.446, 0.413, 0.396, 0.39 , 0.387])]\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt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SiiWejCO+nrW4AXqEt2QZLs\nW5hrln+HmXAzE+UCf4tpcgnL5FkDfwlcCFwBHAd+Eu8PSKWgaALOCy1PAppDy0fp22k3GZOGR4k0\nQ4TfP5rgMiZbph6LT2KuuVkV9V6mHouwOuCa0HKmHYsZmDb3HZj+icnAdkwrRKYdCzDnyvCX6weJ\n9D2Mi2MxjbM7s78eWv4GZ3daZmFScx+Rbw+vYtrcbKRv5xScfSzC/owZnRCWicdiKWYEWFnMdpl4\nLGZFLd8H/CG0nInHIlp/ndmZdCwmRS3/DZFad9ofizXAMUxTwmHgrzD/0M/T//DYv8V0xLwDfDDq\n/fAQr72Y+1qko9hj8SlMx9JhoBs4AfwxavtMOxbvAY1Ehv79a9T2mXYsHsb8Xm8CjwAVUdtnwrHw\nEDlfRNtP3+GxmXAsov8uHsL01ewAHiXSvwvj+1iIiIiIiIiIiIiIiIiIiIiIiIiIiIiISPxNJHIN\nx3Ei0zm/jpmV89+A64B/B+4M/UxpaJtPjHFZRUQkyfqbzvkNzFQ4vwM+grlfxlb63sVRJK2l0lxP\nIukgevK5SzC3+g1Pg16AmQ7hP4AHxrhcIgmjoBAZuVsxN84BEyD/hLlfQMreMUxkJBQUIiO3hEhQ\nWMALmHm6ypNWIpEEUFCIjEwuZuLKE1HvrcV0bj+FuQOdyLigoBAZmfdjahCxfgr8CfhPzKgokbSn\noBAZnvCdF6P7J2LXfQMzjPYhMvvOayIiGW074Eh2IUREREREREREREREREREREREREREREREREQk\nfv4/lalQ8znmPGUAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch14.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch14.ipynb new file mode 100755 index 00000000..da1b2721 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch14.ipynb @@ -0,0 +1,689 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bf27c3e81647ddba9037dd86d19d7d2c04651f985f668251c1dc95d84a4fcd2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Topics In Phase Equilibria" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 page no : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,round\n", + "\n", + "# Variables\n", + "Tc = array([126.2, 190.6]);\n", + "T = 200.;\t\t\t#[K]\n", + "Tr = T/Tc;\n", + "Pc = array([34, 45.99]);\n", + "P = 30.;\t\t\t#[Bar]\n", + "Pr = P/Pc;\n", + "R = 83.14;\n", + "bi = round(0.08664*R*Tc/Pc,3);\n", + "ai = round(((0.42748*(R**2)*(Tc**2)*(Tr**(-0.5))/Pc)/(10**5)),3); \t\t\t#10**-5ai\n", + "y = array([0.4, 0.6]);\n", + "a = round(((y[0]**2)*ai[0])+(2*y[0]*y[1]*math.sqrt((ai[0]*ai[1])))+((y[1]**2)*ai[1]),2); \t\t\t#10**-5a\n", + "b = round((y[0]*bi[0])+(y[1]*bi[1]),3);\n", + "\n", + "q = (a*10**5)/(b*R*T);\n", + "Beta = 0.051612;\n", + "#Z = 1+Beta-(q*(Z-Beta)/(Z*(Z+Beta)))\n", + "\n", + "Z = 1;\t\t\t#initial\n", + "A = Z;\n", + "for i in range(11):\n", + " B = 1+Beta-((q*Beta)*(A-Beta)/(A*(A+Beta)));\n", + " if((B-A) == 0.0001):\n", + " break;\n", + " A = B;\n", + "\n", + "Z = round(B,5);\n", + "I = math.log((Z+Beta)/Z)\n", + "a1 = round((2*y[0]*ai[0])+(2*y[1]*math.sqrt((ai[0]*ai[1]))-a),2); \t\t\t#10**-5a1\n", + "a2 = round((2*y[1]*ai[1])+(2*y[0]*math.sqrt((ai[1]*ai[0]))-a),2); \t\t\t#10**-5a2\n", + "b1 = bi[0];\n", + "b2 = bi[1];\n", + "q1 = round(q*(((a1+a)/a)-(b1/b)),5);\n", + "q2 = round(q*(((a2+a)/a)-(b2/b)),5);\n", + "ln_si1 = round((((b1/b)*(Z-1))-(math.log(Z-Beta))-(q1*I)),5); \t\t\t#ln si1\n", + "ln_si2 = round((((b2/b)*(Z-1))-(math.log(Z-Beta))-(q2*I)),5); \t\t\t#ln si2\n", + "si1 = round(math.exp(ln_si1),5);\n", + "si2 = round(math.exp(ln_si2),5);\n", + "q = [q1,q2];\n", + "ln_si = [ln_si1,ln_si2];\n", + "si = [si1,si2];\n", + "a_ = [a1,a2];\n", + "b_ = [b1,b2];\n", + "q_ = [q1,q2];\n", + "\n", + "print 'a = ',a,'bar cm**6 mol**-2'\n", + "print 'b = ',b,'cm**3 mol6-1'\n", + "print 'q = ',q \n", + "\n", + "Ans = [Tc,Tr,Pc,bi,ai,a_,b_,q_,ln_si,si];\n", + "print ' Tc Tr Pc bi ai a b q ln si si\\n',Ans\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 17.56 bar cm**6 mol**-2\n", + "b = 28.607 cm**3 mol6-1\n", + "q = [2.3919299999999999, 4.5587999999999997]\n", + " Tc Tr Pc bi ai a b q ln si si\n", + "[array([ 126.2, 190.6]), array([ 1.58478605, 1.04931794]), array([ 34. , 45.99]), array([ 26.737, 29.853]), array([ 10.995, 22.786]), [10.23, 22.449999999999999], [26.736999999999998, 29.853000000000002], [2.3919299999999999, 4.5587999999999997], [-0.056640000000000003, -0.19971], [0.94493000000000005, 0.81896999999999998]]\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5 page no : 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "from numpy import array,linspace,log,zeros\n", + "import math \n", + "\n", + "def RF(A,B,K):\n", + " #By Regula Falsi Method\n", + " i = 1;\n", + " while(i == 1):\n", + " a = A;\n", + " F_a = math.log((1-a)/a)+(2*a*K)-K;\n", + " b = B;\n", + " F_b = math.log((1-b)/b)+(2*b*K)-K;\n", + " x1 = ((a*F_b)-(b*F_a))/(F_b-F_a);\n", + " F_x1 = math.log((1-x1)/x1)+(2*x1*K)-K;\n", + "\n", + " if((F_a*F_x1)<0):\n", + " flag = 1;\n", + " A = a;\n", + " B = x1;\n", + " elif((F_x1*F_b)<0):\n", + " flag = 2;\n", + " A = x1;\n", + " B = b; \n", + " x1_a = round(x1,2);\n", + " b_a = round(b,2);\n", + " a_a = round(a,2);\n", + "\n", + " if(x1_a == b_a):\n", + " return round(x1,4);\n", + " elif(x1_a == a_a):\n", + " return round(x1,4);\n", + "\n", + "\n", + "#G_E/RT = Ax1x2 (A)\n", + "#ln V1 = A*x2**2 = A(1-x1)**2\n", + "#ln V2 = A*x1**2\n", + "#A[(1-x1_a)**2 - (1-x1_b)**2] = ln(x1_b/x1_a) (B)\n", + "#A[(x1_a)**2-(x1_b)**2] = ln((1-x1_b)/(1-x1_a)) (C)\n", + "#x1_b = 1-x1_a (D)\n", + "#A(1 - 2*x1) = ln((1-x1)/x1) (E)\n", + "#A = a/T + b - clnT (F)\n", + "#H_E = R(a + cT)x1x2 (G)\n", + "\n", + "#Cp_E = (dH_E/dT) = Rcx1x2 (H)\n", + "\n", + "\n", + "T = linspace(250.1,450,20);\n", + "A = (-975*(T**-1)) + 22.4 - (3*log(T));\n", + "\n", + "subplot(3,2,1)\n", + "plot(T,A)\n", + "x = [250.001, 450];\n", + "y = [2 ,2];\n", + "plot(x,y,'b--')\n", + "\n", + "x = [272.9, 272.9];\n", + "y = [1.9001, 2.01];\n", + "plot(x,y,'r--')\n", + "\n", + "x = [391.2, 391.2];\n", + "y = [1.9001, 2.01];\n", + "plot(x,y,'g--')\n", + "\n", + "suptitle('(a)A vs T')\n", + "xlabel('T(K)')\n", + "ylabel('A')\n", + "\n", + "subplot(3,2,2)\n", + "\n", + "\n", + "T = linspace(272.9,391.2,100);\n", + "K = round((-975*(T**-1))+22.4+(-3*log(T)),4);\n", + "\n", + "root = zeros((100,1));\n", + "for z in range(13):\n", + " root[z] = RF(0.4,0.49,K[z]);\n", + "\n", + "for z in range(13,80):\n", + " root[z] = RF(0.01,0.49,K[z]);\n", + "\n", + "for z in range(80,100):\n", + " root[z] = RF(0.4,0.49,K[z]);\n", + "\n", + "x1 = root;\n", + "plot(x1,T)\n", + "\n", + "x = [0 ,0.55];\n", + "y = [272.9, 272.9];\n", + "plot(x,y)\n", + "\n", + "x = [0 ,0.55];\n", + "y = [391.2, 391.2];\n", + "plot(x,y)\n", + "\n", + "suptitle('(b)T vs x1')\n", + "xlabel('x1')\n", + "ylabel('T(K)')\n", + "\n", + "root = 1-x1;\n", + "x1 = root;\n", + "plot(x1,T)#,rect = [0,250,1,450])\n", + "\n", + "x = [0.5 ,0.51];\n", + "y = [272.9, 272.9];\n", + "plot(x,y)\n", + "\n", + "x = [0.5, 0.51];\n", + "y = [391.2, 391.2];\n", + "plot(x,y)\n", + "\n", + "#xset('window',1)\n", + "\n", + "\n", + "T = linspace(250.1,450,20);\n", + "A = (-540*(T**-1)) + 21.1 - (3*log(T));\n", + "\n", + "subplot(3,2,3)\n", + "plot(T,A)\n", + "x = [250.001, 450];\n", + "y = [2 ,2];\n", + "plot(x,y,'b--')\n", + "\n", + "x = [346, 346];\n", + "y = [1.51, 2.2];\n", + "plot(x,y,'r--')\n", + "\n", + "suptitle('(a)A vs T')\n", + "xlabel('T(K)')\n", + "ylabel('A')\n", + "subplot(3,2,4)\n", + "T = linspace(250,346,100);\n", + "K = round((-540*(T**-1))+21.1+(-3*log(T)),4);\n", + "\n", + "root = zeros(100);\n", + "for z in range(100):\n", + " root[z] = RF(0.1,0.49,K[z]);\n", + "\n", + "x1 = root;\n", + "plot(x1,T)#,rect = [0,250,1,450])\n", + "x = [0 ,0.55];\n", + "y = [346, 346];\n", + "plot(x,y)#,style = 3)\n", + "suptitle('(b)T vs x1')\n", + "xlabel('x1')\n", + "ylabel('T(K)')\n", + "root = 1-x1;\n", + "x1 = root;\n", + "\n", + "plot(x1,T)#,rect = [0,250,1,450])\n", + "x = [0.49, 0.51];\n", + "y = [345.4, 345.4];\n", + "plot(x,y)\n", + "\n", + "#xset('window',2)\n", + "\n", + "\n", + "T = linspace(250.1,450,20);\n", + "A = (-1500*(T**-1)) + 23.9 - (3*log(T));\n", + "\n", + "subplot(3,2,5)\n", + "plot(T,A)\n", + "x = [250.001, 450];\n", + "y = [2 ,2];\n", + "plot(x,y,'b--')\n", + "\n", + "x = [339.7, 339.7];\n", + "y = [1.35, 2.2];\n", + "plot(x,y,'r--')\n", + "\n", + "suptitle('(a)A vs T')\n", + "xlabel('T(K)')\n", + "ylabel('A')\n", + "subplot(3,2,6)\n", + "T = linspace(339.7,450,100);\n", + "K = round((-1500*(T**-1))+23.9+(-3*log(T)),4);\n", + "\n", + "root = zeros(100);\n", + "for z in range(100):\n", + " root[z] = RF(0.1,0.49,K[z]);\n", + "\n", + "x1 = root;\n", + "plot(x1,T)#,rect = [0,300,1,480])\n", + "x = [0, 0.55];\n", + "y = [339.7, 339.7];\n", + "plot(x,y)#,style = 3)\n", + "suptitle('(b)T vs x1')\n", + "xlabel('x1')\n", + "ylabel('T(K)')\n", + "root = 1-x1;\n", + "x1 = root;\n", + "\n", + "plot(x1,T)#,rect = [0,300,1,480])\n", + "x = [0.49, 0.51];\n", + "y = [339.7, 339.7];\n", + "plot(x,y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 24, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAA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HGGGOMMeZs/g+HdMvegX3VAwAAAABJRU5ErkJg\ngg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.8 page no : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from numpy import linspace,array\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "import math \n", + "\n", + "# Variables\n", + "A12 = 4.62424;\n", + "A21 = 3.35629;\n", + "alpha12 = 3.78608;\n", + "alpha21 = 1.81775;\n", + "B11 = -996;\n", + "B22 = -1245;\n", + "B12 = -567;\n", + "\n", + "P1_sat = 103.264;\t\t\t#[kPa]\n", + "P2_sat = 5.633;\t\t\t#[kPa]\n", + "\n", + "T = 308.15;\t\t\t#[K]\n", + "R = 8314;\n", + "\n", + "#G_E/RT = T1 = A21*x1 + A12*x2 - Q\n", + "#V1 = math.exp[(x2**2)*[A12 + (2*(A21-A12)*x1) - Q - (x1*(dQ/dx1))]]\n", + "#V2 = math.exp[(x1**2)*[A21 + (2*(A12-A21)*x2) - Q + (x2*(dQ/dx1))]]\n", + "#Q = (alpha12*x1*alpha21*x2)/((alpha12*x1) + (alpha21*x2))\n", + "#dQ/dx1 = dQ_x1 = (alpha12*alpha21*(alpha21*x2**2 - alpha12*x1**2))/((alpha12*x1 + alpha21*x2)**2)\n", + "#P = (x1*V1*P1_sat)/si1 + (x2*V2*P2_sat)/si2\n", + "#d12 = 2B12-B11-B22\n", + "#si1 = math.exp[((B11*(P-P1_sat)) + (P*y2**2*d12)))/RT]\n", + "#si2 = math.exp[((B22*(P-P2_sat)) + (P*y1**2*d12)))/RT]\n", + "#y1 = (x1*V1*P1_sat)/(si1*P)\n", + "#y2 = (x2*V2*P2_sat)/(si2*P)\n", + "\n", + "\n", + "#BUBL P\n", + "x1 = linspace(0.01,1,100)\n", + "x2 = 1-x1;\n", + "P = zeros(100)\n", + "y= zeros(100)\n", + "for i in range(99):\n", + " si1 = 1;\t\t\t#Assumed\n", + " si2 = 1;\t\t\t#Assumed\n", + " dP = 100;\n", + " while(dP>0.0001):\n", + " Q = round(((alpha12*x1[i]*alpha21*x2[i])/((alpha12*x1[i]) + (alpha21*x2[i]))),4);\n", + " dQ_x1 = round((alpha12*alpha21*((alpha21*((x2[i])**2)) - (alpha12*((x1[i])**2))))/(((alpha12*x1[i]) + (alpha21*x2[i]))**2),4);\n", + " V1 = round(math.exp((x2[i]**2)*(A12 + (2*(A21-A12)*x1[i]) - Q - (x1[i]*dQ_x1))),4);\n", + " V2 = round(math.exp((x1[i]**2)*(A21 + (2*(A12-A21)*x2[i]) - Q + (x2[i]*dQ_x1))),4);\n", + "\n", + " Pi = round((((x1[i]*V1*P1_sat)/si1) + ((x2[i]*V2*P2_sat)/si2)),4);\n", + "\n", + " y1 = round((x1[i]*V1*P1_sat)/(si1*Pi),4);\n", + " y2 = round((x2[i]*V2*P2_sat)/(si2*Pi),4);\n", + "\n", + " d12 = (2*B12)-B11-B22;\n", + "\n", + " si1 = round(math.exp(((B11*(Pi-P1_sat))+(Pi*(y2**2)*d12))/(R*T)),4);\n", + " si2 = round(math.exp(((B22*(Pi-P2_sat))+(Pi*(y1**2)*d12))/(R*T)),4);\n", + "\n", + " Pf = round(((x1[i]*V1*P1_sat)/si1) + ((x2[i]*V2*P2_sat)/si2),4);\n", + "\n", + " dP = abs(Pf-Pi);\n", + " P[i] = Pf;\n", + " y[i] = y1;\n", + "\n", + "\n", + "for i in range(99):\n", + " if(P[i]>104.61):\n", + " P[i] = 0;\n", + "\n", + "x1[99]= 1\n", + "y[99] = 1;\n", + "P[99] = P1_sat;\n", + "\n", + "subplot(1,2,1)\n", + "P_ = [5.633, 104.6];\n", + "x = [0, 0.0117]; \n", + "plot(x,P_)\n", + "\n", + "P_ = [104.6, 104.6];\n", + "x = [0, 0.02]; \n", + "plot(x,P_,'r')\n", + "\n", + "P_ = [5.633, 5.633];\n", + "y1 = [0 ,0.02]; \n", + "plot(y1,P_,'b')\n", + "\n", + "P_ = [104.6, 120];\n", + "xa = [0.0117, 0.0117]; \n", + "plot(xa,P_,'g--')\n", + "\n", + "legend('P vs x1')\n", + "suptitle('P-x-y')\n", + "xlabel('x1,y1')\n", + "ylabel('P/kPa')\n", + "\n", + "P_ = [100, 120];\n", + "y1 = [0.02, 0.02]; \n", + "plot(y1,P_,'w')\n", + "\n", + "subplot(1,2,2)\n", + "\n", + "P_ = [104.6, 104.6];\n", + "x = [0.943, 0.96]; \n", + "plot(x,P_,'r')\n", + "\n", + "P_ = [104.3, 104.6];\n", + "y1 = [0.946, 0.946]; \n", + "plot(y1,P_,'b--')\n", + "\n", + "P_ = [104.6 ,104.8];\n", + "xb = [0.95, 0.95]; \n", + "plot(xb,P_,'g--')\n", + "\n", + "plot(x1,P)\n", + "plot(y,P)\n", + "\n", + "legend('P* = 104.6kPa')\n", + "suptitle('P-x-y(Ether Rich Region)')\n", + "xlabel('x1,y1')\n", + "ylabel('P/kPa')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 25, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEhCAYAAABlUDcAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcFNW99/FP9zCDoAi4BBTEcYmKJhghGndHQiIaRK5R\ngxDZNFeTm4hJbp4I9zE09zEuMRrN4sJlgMF9R1FQEWxjEjGKO6AIT4hAAkZRAcFhmbp/nOqZnp6e\nnl6q6lR1f9+vV7/opbrPKeZ0/+qcX51TICIiIiIiIiIiIiIiIiIiIiIiIiIiIlK2HGAr8DmwBujp\nQxlTgaR7PwnsdMtM3Q4AzgeuSntPEnjcwzqsBHaklfkfaa+9A3wrx3vzrctOYJt7+wg4ppiKujaV\n8N41wCklvF9EBDABIuX/A3N8KONj4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PalyPC1JlVzv/RUtRz9X0jZ56Ve5\n+6W9/8fAPZk7XGLZKbVkT1L7tc+5yvV7n2PAbOA3WT7Xz33OVW4++9weL/4Oxcin3H6YcfPjPSiv\n0LLTzcSbs5jyKfcI4FlMUrkrpn0fGVDZN2FOeAAzPLoWM9xVqlryS1J71bZ8lW3y0KXuLeX37utv\nYLqDud4L5j/5WXKf/uhHubMxpwi+gTnibC/5U0rZ92LGLBsxRz/jA9rn9sr1e59PBpowX7DM00r9\n3Odc5ea7z+0p5e9Qio7KnY45ik7t7189KjefstN5FSDyLfc/MWcyvUXr05n9LnsfYC7mb/wWJmFe\nqtT3dDvmezqBYNqWiIiIiIiIiIiIiIiIiIiIiIiIiIiISCGewsx6nVvEe3+IOSe6CW8m6Yh4SW1b\npESDgWEU9yX6CnAgZpq/vkQSNmrbltlci0kKcyxm9mNnYHfMRUaOxKyhn20Bu5RDgCVpj7+Y9vh1\n4O+e11SkMGrbIVXqBSokOC8DjwNXA12AO4FlebxvFWad/6MxX8LxmCtPiYSF2raIB6oxX4TFtF62\nt47c3fBRmCWV45hx2Z4Zr6sbLrapbYeQhpiiZR9MF3wPzJFWSkfrzz+MWTxsGObCKF4t5SziFbXt\nEFKAiJY7gP+LWWL6+rTns11g5VpaLsPZCDyNudjNzHY+24uLtIgUS21bpARjaLnASBzTFT8dc5GT\nD4CtmCV+v+FuMxdzYfKU493X078sl7vPbcdcOGSaT3UXyUVtWyRgT2U8/k9gqo2KiHhMbVvEQ49i\nTvtTsk7Kjdq2iIiIiIiIiIiIiIiIiIiIiIiIiIhIZflfvxwhE6AvLbgAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.9 page no : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "from numpy import linspace,array\n", + "import math \n", + "\n", + "subplot(1,2,1)\n", + "\n", + "# Variables\n", + "P = 101.33;\t\t\t#[kPa]\n", + "T = array([333.15, 343.15, 348.15, 353.15, 353.25, 363.15, 373.15]);\n", + "P1_sat = array([52.22, 73.47, 86.40, 101.05, 101.33, 136.14, 180.04]);\n", + "P2_sat = array([19.92, 31.16, 38.55, 47.36, 47.56, 70.11, 101.33]);\n", + "P_ = P1_sat+P2_sat;\n", + "plot(P_,T,'b');\n", + "\n", + "Ans = [T,P1_sat,P2_sat,P_];\n", + "print ' T P1_sat P2_sat P1_sat+P2_sat'\n", + "print Ans\n", + "\n", + "#Hence P lies between T = 333.15 and 343.15\n", + "P = [101.33, 101.33];\n", + "Tp = [330.15, 343.15];\n", + "\n", + "plot(P,Tp,'r--')\n", + "\n", + "#Thus by interpolation\n", + "P = [50.14, 104.63];\n", + "T_ = [342.15, 342.15];\n", + "\n", + "plot(P,T_,'g--');\n", + "\n", + "legend('P* vs T')\n", + "suptitle('T vs P1_sat + P2_sat')\n", + "xlabel('P1_sat + P2_sat(kPa)')\n", + "ylabel('T(K)')\n", + "\n", + "T_ = 342.15;\t\t\t#[K]\n", + "\n", + "subplot(1,2,2)\n", + "\n", + "plot(P1_sat,T,'b')\n", + "\n", + "#Hence P1_sat @ T = T_ = 342.15 by interpolation\n", + "P = [41 ,70];\n", + "Tp = [342.15, 342.15];\n", + "\n", + "plot(P,Tp,'r--')\n", + "\n", + "#Thus by interpolation P1_sat = 71.3kPa\n", + "P = [71.3, 71.3];\n", + "T_ = [330.15, 342.15];\n", + "\n", + "plot(P,T_,'g--');\n", + "\n", + "\n", + "legend('P1_sat vs T')\n", + "suptitle('T vs P1_sat')\n", + "xlabel('P1_sat(kPa)')\n", + "ylabel('T(K)')\n", + "\n", + "P_sat = 71.3;\n", + "T[0] = 342.15;\n", + "P = 101.33;\t\t\t#[kPa]\n", + "P1_sat[0] = P_sat;\n", + "P2_sat[0] = P-P_sat;\n", + "\n", + "y_I = approx(P1_sat/P,3);\n", + "y_II = approx(1-(P2_sat/P),3);\n", + "for i in range(7):\n", + " if(y_I[i]>1):\n", + " y_I[i] = 0\n", + " elif(y_II[i]>1):\n", + " y_II[i] = 0\n", + "\n", + "Ans = [T,y_I,y_II];\n", + "\n", + "# Results\n", + "print ' T y1_I y1_II',Ans\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " T P1_sat P2_sat P1_sat+P2_sat\n", + "[array([ 333.15, 343.15, 348.15, 353.15, 353.25, 363.15, 373.15]), array([ 52.22, 73.47, 86.4 , 101.05, 101.33, 136.14, 180.04]), array([ 19.92, 31.16, 38.55, 47.36, 47.56, 70.11, 101.33]), array([ 72.14, 104.63, 124.95, 148.41, 148.89, 206.25, 281.37])]\n", + " T y1_I y1_II" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " [array([ 342.15, 343.15, 348.15, 353.15, 353.25, 363.15, 373.15]), array([ 0.70364157, 0.72505675, 0.85265963, 0.99723675, 1. ,\n", + " 0. , 0. ]), array([ 0.70364157, 0.69248988, 0.61955985, 0.5326162 , 0.53064246,\n", + " 0.30810224, 0. ])]\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEiCAYAAADnMZWTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcE/X9x/HXLohAVUBRBK9FBa3WFvC+A2qr1kr9tf1h\n/akIVvHCs7Wi+GPxAs+q9ecBCC5YUDyK1FpEkQhYxINDELGgLIoHiICiHAtLfn98Jia7JNlsMpNJ\nZt7PxyOPZCeTmU92v7Pf+d4gIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIqVkf2C986gFtiT93MKF\n4y8BNjvH+x640Nl+L7ARiAHnuHCeZC+7fDwREXG8Brzg8jEXA3c6r/8MbHBenwb8HFiD+xlFzOXj\nieSk3O8ARDxSlm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OlWwnbG0PgPNJVHWB\nrZOyLPuvETzKKFJLd/cwDmtU60zqee3jmmDz07+H3bU8gK2odhdWfTPb2Sd+nqnYP9CGGrMzxdbQ\nPo9gVUUznfMMzPD5q7CSzDysquslrKh+GPadzgM+cPb9Git1zMdKIl9iJdWWSbHEgA+xVcmeAfZN\nE+ck57MLsd/TzKT3dnfO9X2GuMVffl83b7Bt76QY1qYxHGt7a560PdnDWJvHXKzk+13Se0dgVWki\n4qJKEm0ObrkYa9MQyeQ16q6U6Ia/kX+VmojUsyvuD1KaQt2qA5FUTgcGu3i85MGjoZVNfbdk9hDb\ndjW9HxvIU+wuwKqZks1g255SIm4r5etGREREREREREREREREREREREREitr/A49P2k91Toh0AAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.10 page no : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel,subplot\n", + "from numpy import linspace,array\n", + "import math \n", + "\n", + "subplot(2,1,1)\n", + "\n", + "# Variables\n", + "m = 4.7087;\n", + "b = 2.1941;\n", + "t = 0.3984;\n", + "\n", + "# Calculations and Results\n", + "P = linspace(0,40,10);\n", + "N = (m*P)/((b+(P**t))**(1/t));\n", + "plot(P,N)\n", + "m = 0.6206;\n", + "b = 1.5454;\n", + "t = 1;\n", + "n = (m*P)/((b+(P**t))**(1/t));\n", + "plot(P,n,'b--')\n", + "legend('Toth Equation')\n", + "suptitle('Adsorption Isotherm(n vs P)')\n", + "xlabel('P(kPa)')\n", + "ylabel('n(mol/kg)')\n", + "\n", + "subplot(2,1,2)\n", + "C0 = 0.4016;\n", + "C1 = -0.6471;\n", + "C2 = 0.4567;\n", + "C3 = -0.12;\n", + "n = linspace(0,1.6,20);\n", + "K = C0+(C1*n)+(C2*(n**2))+(C3*(n**3));\n", + "plot(n,K)\n", + "n = linspace(0,0.5,20);\n", + "K = C0+(C1*n);\n", + "plot(n,K,'b--')\n", + "legend('Cubic Polynomial fit')\n", + "suptitle('n/P vs n for Ethylene')\n", + "xlabel('n(mol/kg)')\n", + "ylabel('n/P(mol/kg/kPa)')\n", + "\n", + "show()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmYFNXVh99hF1ABEUaYgQFkUYSgKGAQBXEBFXGLUdRE\noxJXjLtmEzTGGBUx4gaiQeIS40LABZBl3NGgbIogIMi+CbILw9DfH6f6655epqt7uruqZ37v89TT\ntdyqPlMU9et7z7nngBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgifciXwDTAECAC7gD3ANA9s\nqQf84NjwSIrXKAb2OdcILoXAL4A/RbSbkMR1TwB+StEmIZKimtcGCBGHy4D/OuvrgbpAM6AXcFGW\nbQl+X13gVpfnVI/Y3g+87VwjuKwETgcuiGgnhC+RYAivOAHrMXyD/ULeBBwcdvxo4DHKPqM/AGuB\nYyOu9T3w57DtJcBDwNnADuzX/G7g5Bh2BIAPnePbgSMjjh8JPAU0cq5zEnBb2DUXYT0QsB7Ep8BO\n4OEY35UXsV0PuBzo5FzvUWd/e2ALUAL8x9lXDLwedu5HwGuUFZiawOfO37wbGOfs/x3wIyZQe4Dv\nws65xDm2E9jo2CKEEL7iBOxlfb6zvQJ4wllvB2x21n8HrHPWD8deomdGXOsBTCTAXsL7MPGZC4x0\n9temrCAFCQBDnfWZwJQYbYaE2XCwc/2g+Cwh9CIvASbGOB+ih6SCf98oYE5Eu23AAdjfux8Tgp9j\nL3Ww3steoIiyQ1Ljwuw/0Gl/AnYPA5gI5znXv8b5jm3O9wCMwARQCCF8xQnYSy/I24RediOBd5z1\n4MtuF/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+ "text": [ + "" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch15.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch15.ipynb new file mode 100755 index 00000000..c65e9f4b --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch15.ipynb @@ -0,0 +1,283 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c97b4be5a6b14d1c0295c6b4a641b54921c4d1ce87d0ba32a0413fee26fe8514" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 page no : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from numpy import array,round\n", + "import math \n", + "\n", + "def MCPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A)+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*((t-1)/math.log(t)))\n", + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "# Variables\n", + "State = ['Supercooled Liquid','Superheated Vapor','Wet Vapor,x = 0.9378','Saturated Liqiud'];\n", + "T = [318.98, 773.15, 318.98, 318.98];\n", + "P = [8600, 8600, 10, 10];\n", + "H = [203.4, 3391.6, 2436, 191.8];\n", + "S = [0.6580, 6.6858, 7.6846, 0.6493];\n", + "T0 = 298.15;\n", + "T1 = 460.;\t\t\t#[K]\n", + "R = 8.314;\n", + "T_sigma = T0;\n", + "#CH4 + 2O2 --> CO2 + 2H2O\n", + "dH_CO2 = -393509;\n", + "dH_H2O = -241818;\n", + "dH_CH4 = -74520;\n", + "\n", + "dG_CO2 = -394359;\n", + "dG_H2O = -228572;\n", + "dG_CH4 = -50460;\n", + "\n", + "# Calculations\n", + "dH_298 = dH_CO2+(2*dH_H2O)-dH_CH4\n", + "dG_298 = dG_CO2+(2*dG_H2O)-dG_CH4\n", + "\n", + "dS_298 = round((dH_298-dG_298)/T0,3);\n", + "\n", + "#Moles Entering\n", + "ni_O2 = 2*1.25;\n", + "ni_N2 = round(ni_O2*(79/21),3);\n", + "ni = ni_O2+ni_N2;\n", + "\n", + "#Moles After Combustion\n", + "n_CO2 = 1;\n", + "n_H2O = 2;\n", + "n_O2 = 0.5;\n", + "n_N2 = ni_N2;\n", + "n = n_CO2+n_H2O+n_O2+n_N2;\n", + "m = [n_CO2, n_H2O, n_N2, n_O2];\n", + "\n", + "y_CO2 = round(n_CO2/n,4);\n", + "y_H2O = round(n_H2O/n,4);\n", + "y_O2 = round(n_O2/n,4);\n", + "y_N2 = round(n_N2/n,4);\n", + "\n", + "y = [y_CO2, y_H2O, y_O2, y_N2];\n", + "yT = sum(y);\n", + "\n", + "#Step(a)\n", + "dH_a = 0\n", + "dS_a = round(ni*R*((0.21*math.log(0.21))+(0.79*math.log(0.79))),3)\t\t\t#[J/K]\n", + "\n", + "#Step(b)\n", + "dH_b = dH_298\n", + "dS_b = dS_298\t\t\t#[J/K]\n", + "\n", + "#Step(c)\n", + "dH_c = 0\n", + "dS_c = round(-n*R*sum(y*log(y)),3)\t\t\t#[J/K]\n", + "\n", + "#Step(d)\n", + "#For CO2\n", + "print T0,T1\n", + "CpH_CO2 = round(R*MCPH(T0,T1,5.457,1.045*(10**-3),0,-1.157*(10**5)),3);\n", + "#For H2O\n", + "CpH_H2O = round(R*MCPH(T0,T1,3.470,1.450*(10**-3),0,0.121*(10**5)),3);\n", + "#For O2\n", + "CpH_O2 = round(R*MCPH(T0,T1,3.639,0.506*(10**-3),0,-0.227*(10**5)),3);\n", + "#For N2\n", + "CpH_N2 = round(R*MCPH(T0,T1,3.280,0.593*(10**-3),0,0.040*(10**5)),3);\n", + "\n", + "#For CO2\n", + "CpS_CO2 = round(R*MCPS(T0,T1,5.457,1.045*(10**-3),0,-1.157*(10**5)),3);\n", + "#For H2O\n", + "CpS_H2O = round(R*MCPS(T0,T1,3.470,1.450*(10**-3),0,0.121*(10**5)),3);\n", + "#For O2\n", + "CpS_O2 = round(R*MCPS(T0,T1,3.639,0.506*(10**-3),0,-0.227*(10**5)),3);\n", + "#For N2\n", + "CpS_N2 = round(R*MCPS(T0,T1,3.280,0.593*(10**-3),0,0.040*(10**5)),3);\n", + "\n", + "CpH = array([CpH_CO2, CpH_H2O, CpH_N2, CpH_O2]);\n", + "CpS = array([CpS_CO2, CpS_H2O, CpS_N2, CpS_O2]);\n", + "\n", + "Comp = ['CO2' 'H2O' 'N2' 'O2'];\n", + "\n", + "Ans = [CpH,CpS];\n", + "print ' CpH CpS',Comp,Ans\n", + "\n", + "CpHt = round(sum(m*CpH),3)\t\t\t#[J/K]\n", + "CpSt = round(sum(m*CpS),3)\t\t\t#[J/K]\n", + "\n", + "dH_d = round(CpHt*(T1-T0),0)\t\t\t#[J]\n", + "dS_d = round((CpSt*math.log(T1/T0)),3)\t\t\t#[J/K]\n", + "\n", + "dH = dH_a+dH_b+dH_c+dH_d\t\t\t#[J]\n", + "dS = dS_a+dS_b+dS_c+dS_d\t\t\t#[J/K]\n", + "\n", + "rm = 84.75;\t\t\t#[kg/s]\n", + "\n", + "rn_CH4 = round((rm*(H[0]-H[1])*1000)/dH,2)\t\t\t#[mol/s]\n", + "\n", + "rW_ideal = round(rn_CH4*((dH/1000)-(T0*dS/1000))/1000,2)*1000\t\t\t#[KW]\n", + "\n", + "#(a) Furnace/Boiler\n", + "rS_a = round((rn_CH4*dS/1000)+(rm*(S[1]-S[0])),2)\t\t\t#[kJ/s/K]\n", + "\n", + "rW_a = round(T_sigma*rS_a/1000,2)*1000\t\t\t#[kW]\n", + "\n", + "#(b) Turbine\n", + "rS_b = round(rm*(S[2]-S[1]),2)\t\t\t#[kW/K]\n", + "\n", + "rW_b = round(T_sigma*rS_b/1000,2)*1000\t\t\t#[kW]\n", + "\n", + "#(c) Condenser \n", + "Q_c = H[3]-H[2];\t\t\t#[kJ/kg]\n", + "rQ_c = round(rm*Q_c/1000,1)*1000\t\t\t#[kJ/s]\n", + "rS_c = round((rm*(S[3]-S[2]))-(rQ_c/T_sigma),2)\t\t\t#[kW/K]\n", + "rW_c = round(T_sigma*rS_c/1000,2)*1000\t\t\t#[kW]\n", + "\n", + "#(d) Pump\n", + "rS_d = round(rm*(S[0]-S[3]),2)\t\t\t#[kW/K]\n", + "rW_d = round(T_sigma*rS_d/1000,2)*1000\t\t\t#[kW]\n", + "\n", + "rS = [rS_a, rS_b, rS_c, rS_d];\n", + "pS = round(rS/sum(rS)*100,1);\n", + "T = [sum(rS), sum(pS)];\n", + "Process = ['Furnace/boiler' 'Turbine' 'Condenser' 'Pump'];\n", + "Ans = [rS,pS];\n", + "print ' S(kW/K) %',Process,Ans\n", + "print (T)\n", + "rW_ideal = 80000;\n", + "rW = array([rW_ideal, rW_a ,rW_b, rW_c, rW_d])/1000;\n", + "pW = round(rW/sum(rW)*100,1);\n", + "T = [sum(rW) ,sum(pW)];\n", + "Process = ['Ideal' 'Furnace/boiler' 'Turbine' 'Condenser' 'Pump'];\n", + "Ans = [rW,pW];\n", + "print ' W(kW/K)*10**-3 %',Process,Ans\n", + "print (T)\n", + "\n", + "eta = pW[0]\n", + "\n", + "print 'Efficiency of the power plant is',eta,'%'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "298.15 460.0\n", + " CpH CpS ['CO2H2ON2O2'] [array([ 41.649, 34.153, 29.381, 30.473]), array([ 41.377, 34.106, 29.36 , 30.405])]\n", + " S(kW/K) % ['Furnace/boilerTurbineCondenserPump'] [[578.37, 84.650000000000006, 41.689999999999998, 0.73999999999999999], array([ 82. , 12. , 5.9, 0.1])]\n", + "[705.45000000000005, 100.0]\n", + " W(kW/K)*10**-3 % ['IdealFurnace/boilerTurbineCondenserPump'] [array([ 80. , 172.44, 25.24, 12.43, 0.22]), array([ 27.6, 59.4, 8.7, 4.3, 0.1])]\n", + "[290.33000000000004, 100.09999999999999]\n", + "Efficiency of the power plant is 27.6 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 page no : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array\n", + "\n", + "State = ['Superheated Vapor','Superheated Vapor','Superheated Vapor','Saturated Liqiud','Saturated Vapor','Superheated Vapor'];\n", + "T = [300 ,300, 207.1, 111.5, 111.5, 295];\n", + "P = [1, 60, 60, 1, 1, 1];\n", + "H = [1199.8, 1140, 772, 285.4, 796.9, 1188.9];\n", + "S = [11.629, 9.359, 7.798, 4.962, 9.523, 11.589];\n", + "Given = [T,P,H,S];\n", + "print ' T/K P/kPa H/kJ/Kg S/kJ/kg/K',State,Given\n", + "T_sigma = 300;\t\t\t#[K]\n", + "rQ = 5; \t\t\t#[KJ]\n", + "rW = 1000;\t \t\t#[KJ/s]\n", + "z = round((H[5]-H[1]-rQ)/(H[5]-H[3]),4);\n", + "\n", + "#rW_ideal = (dH*rm) - (T_sigma(dS*rm))\n", + "rW_ideal = round(((z*H[3])+((1-z)*H[5])-H[0])-((T_sigma)*((z*S[3])+((1-z)*S[5])-S[0])),1);\n", + "\n", + "#(a) Compression/cooling\n", + "rQ_a = (H[1]-H[0])-rW;\t\t\t#[kJ]\n", + "rS_a = round((S[1]-S[0])-(rQ_a/T_sigma),4);\t\t\t#[kJ/Kg/K]\n", + "\n", + "rW_a = T_sigma*rS_a;\t\t\t#[KJ/Kg]\n", + "\n", + "#(b) Exchanger\n", + "rS_b = round(((S[5]-S[4])*(1-z))+(S[2]-S[1])-(rQ/T_sigma),4);\t\t\t#[kJ/Kg/K]\n", + "rW_b = T_sigma*rS_b;\t\t\t#[KJ/Kg]\n", + "\n", + "#(c) Throttle\n", + "rS_c = round(((S[3]*z)+(S[4]*(1-z))-S[2]),4);\t\t\t#[KJ/Kg/K]\n", + "rW_c = T_sigma*rS_c;\t\t\t#[KJ/kg]\n", + "\n", + "S = [rS_a, rS_b, rS_c];\n", + "pS = round((S/sum(S))*100,1);\n", + "ES = [sum(S) ,sum(pS)];\n", + "\n", + "W = round(array([rW_ideal, rW_a ,rW_b, rW_c]),1);\n", + "pW = round((W/sum(W))*100,1);\n", + "EW = [sum(W), sum(pW)];\n", + "Ans = [S,pS];\n", + "Process = ['Compression/Cooling','Exchanger','Throttle'];\n", + "\n", + "print ' Si %',Process,Ans\n", + "print 'Sum',ES\n", + "Ans = [W,pW];\n", + "\n", + "Process = ['Ideal','Compression/Cooling','Exchanger','Throttle'];\n", + "print ' Wi %'\n", + "print Process\n", + "print Ans\n", + "print 'Sum',EW\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " T/K P/kPa H/kJ/Kg S/kJ/kg/K ['Superheated Vapor', 'Superheated Vapor', 'Superheated Vapor', 'Saturated Liqiud', 'Saturated Vapor', 'Superheated Vapor'] [[300, 300, 207.1, 111.5, 111.5, 295], [1, 60, 60, 1, 1, 1], [1199.8, 1140, 772, 285.4, 796.9, 1188.9], [11.629, 9.359, 7.798, 4.962, 9.523, 11.589]]\n", + " Si % ['Compression/Cooling', 'Exchanger', 'Throttle'] [[1.2626999999999999, 0.40460000000000002, 1.5033000000000001], array([ 39.8, 12.8, 47.4])]\n", + "Sum [3.1706000000000003, 100.0]\n", + " Wi %\n", + "['Ideal', 'Compression/Cooling', 'Exchanger', 'Throttle']\n", + "[array([ 53.8, 378.8, 121.4, 451. ]), array([ 5.4, 37.7, 12.1, 44.9])]\n", + "Sum [1005.0, 100.09999999999999]\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch2.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch2.ipynb new file mode 100755 index 00000000..b2207b49 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch2.ipynb @@ -0,0 +1,686 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5402b8a22d5c9c33865300624c06c4e18489eca2e6c2f206a37644a204bd3ed3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : The First Law and Other Basic Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "H = 100.;\t\t\t#height = 100m\n", + "M = 1.; \t\t\t#Mass of water = 1Kg\n", + "g = 9.8066;\t\t\t#Acceleration due to gravity(m/s**2)\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "PE1 = M*H*g;\t\t\t#[j]\n", + "print '(a)Potential energy of Water at the Top',PE1,'J'\n", + "\n", + "#(b)\n", + "del_U = 0;\n", + "KE1 = 0;\n", + "PE2 = 0;\n", + "KE2 = PE1;\t\t\t#[j]\n", + "print '(b)Kinetic energy of Water',KE2,'J'\n", + "\n", + "#(c)\n", + "del_U = KE2;\n", + "print '(c)Change in Internal energy when 1kg Water added',del_U,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Potential energy of Water at the Top 980.66 J\n", + "(b)Kinetic energy of Water 980.66 J\n", + "(c)Change in Internal energy when 1kg Water added 980.66 J\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 page : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P_atm = 101.3;\t\t\t#Atm Pressure = 101.3KPa\n", + "V1 = 0.1;\t\t\t#Volume1 = 0.1m**3\n", + "V2 = 0.2;\t\t\t#Volume2 = 0.2m**3\n", + "\n", + "# Calculations\n", + "del_V = V2-V1;\n", + "W_by = P_atm*del_V;\n", + "W_on = -W_by;\n", + "Q = 0;\n", + "del_Energy = Q+W_on;\t\t\t#KJ\n", + "\n", + "# Results\n", + "print 'Energy Change',del_Energy,'KJ'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Change -10.13 KJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 page : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "W_acb = 40;\t\t\t#J\n", + "Q_acb = 100;\t\t\t#J\n", + "W_aeb = 20;\t\t\t#J\n", + "W_bda = 30;\t\t\t#J\n", + "\n", + "# Calculations and Results\n", + "del_U_ab = Q_acb-W_acb;\n", + "\n", + "#(a)\n", + "Q_aeb = del_U_ab-W_aeb;\t\t\t#J\n", + "print '(a)Heat Flow in acb',Q_aeb,'J'\n", + "\n", + "#(b)\n", + "del_U_ba = -del_U_ab;\t\t\t#J\n", + "Q_bda = del_U_ba-W_bda;\n", + "print '(b)Heat Flow in bda',Q_bda,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Heat Flow in acb 40 J\n", + "(b)Heat Flow in bda -90 J\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 page : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#(a)-Liquid Water in equllibrium with its vapour.\n", + "N = 1;\n", + "pi = 2;\n", + "\n", + "# Calculations and Results\n", + "F = 2-pi+N;\n", + "print '(a)Degree Of freedom is',F\n", + "\n", + "#(b)-Liquid Water in equllibrium with a mixture of vapour and nitrogen.\n", + "N = 2;\n", + "pi = 2;\n", + "F = 2-pi+N;\n", + "print '(b)Degree Of freedom is',F\n", + "\n", + "#(c)-A liquid Soln of alcohol in water in equillibrium with its vapour\n", + "N = 2;\n", + "pi = 2;\n", + "F = 2-pi+N;\n", + "print '(c)Degree Of freedom is',F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Degree Of freedom is 1\n", + "(b)Degree Of freedom is 2\n", + "(c)Degree Of freedom is 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 page no : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "P = 14.;\t\t\t#Pressure = 14bar\n", + "V1 = 0.03;\t\t\t#Initial volume = 0.03m**3\n", + "V2 = 0.06;\t\t\t#Final Volume\n", + "\n", + "#Process is isothermal\n", + "#(a)-To find the work done by gas in moving the External force\n", + "#(b)-To find the work done by gas if external force is suddenly reduced to half its initial value\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "K = P*V1*(10**5);\t\t\t#J\n", + "\n", + "def f3(V): \n", + " return 1./V\n", + "\n", + "W1 = round(-K* quad(f3,0.03,0.06)[0],2)\n", + "\n", + "P2 = K/V2;\t\t\t#Final Pressure(Pa)\n", + "P2 = P2/(10**5);\t\t\t#bar\n", + "print '(a)The work done by gas in moving the External Force is',W1,'J'\n", + "\n", + "#(b)\n", + "def f4(V): \n", + " return 1\n", + "\n", + "W2 = -P2*(10**5)* quad(f4,0.03,0.06)[0]\n", + "\n", + "n = round((W2/W1)*100,1);\t\t\t#Efficiency\n", + "print '(b)The work done by gas if external force is reduced to half is',W2,'J'\n", + "print 'Hence the efficiency is',n,'%'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The work done by gas in moving the External Force is -29112.18 J\n", + "(b)The work done by gas if external force is reduced to half is -21000.0 J\n", + "Hence the efficiency is 72.1 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 page no : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 7;\t\t\t#pressure = 7bar\n", + "m = 45;\t\t\t#Mass of cube\n", + "mt = 23;\t\t\t#mass of piston,piston rod,pan\n", + "x = 0.5;\t\t\t#Dismath.tance moved = 0.5m\n", + "g = 9.8;\t\t\t#Acceleration Due to gravity(m/s**2)\n", + "\n", + "# Calculations\n", + "#Acc to Eqn del_U_sys+del_U_surr+del_PE_surr = 0\n", + "del_PE_surr = (m+mt)*g*x;\n", + "#ans = del_U_sys+del_U_surr\n", + "\n", + "# Results\n", + "print 'Energy Changes in the Process',-del_PE_surr,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Changes in the Process -333.2 J\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 pageno : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 1.; \t\t\t#1kg of water\n", + "T = 373.15;\t \t\t#Temp = 373.15K(100`C)\n", + "P = 101.325;\t\t\t#Pressure = 101.325KPa\n", + "V2 = 1.673;\t\t \t#Final Volume[m**3]\n", + "V1 = 0.00104;\t\t\t#Initial Volume[m**3]\n", + "Sv_liqiud = 0.00104;\t#Specific Volume of Liqiud\n", + "Sv_vapour = 1.673;\t\t#Specific Volume of Vapour\n", + "del_H = 2256.9;\t\t\t#Heat Added(KJ)\n", + "\n", + "# Calculations\n", + "Q = del_H;\n", + "del_V = V2-V1;\n", + "W = P*del_V;\t\t\t#KJ\n", + "del_U = round(del_H-(P*del_V),1);\n", + "\n", + "# Results\n", + "print 'Change in Enthalpy',del_H,'KJ'\n", + "print 'Change in Internal energy',del_U,'KJ'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in Enthalpy 2256.9 KJ\n", + "Change in Internal energy 2087.5 KJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 page no : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P1 = 1.; \t\t\t#Pressure = 1bar\n", + "T1 = 298.15;\t\t\t#Temp = 298.15K(25`C)\n", + "V1 = 0.02479;\t\t\t#Molar Volume = 0.02479m**3/mol\n", + "#Final\n", + "P2 = 5. \t\t\t#Pressure = 5bar\n", + "Cv = 20.78;\t\t\t#J/mol/K\n", + "Cp = 29.10;\t\t\t#J/mol/K\n", + "\n", + "# Calculations and Results\n", + "#to Find del_U,del_H by two processes\n", + "V2 = V1*(P1/P2);\t\t\t#m**3(1 mol)\n", + "print 'Final Volume',V2,'m**3'\n", + "\n", + "\n", + "#(a)-Cooling at const pressure followed by heating at const Volume\n", + "T2 = T1*(V2/V1);\t\t\t#K\n", + "print 'Final Temperature',T2,'K'\n", + "\n", + "del_H = round(Cp*(T2-T1));\t\t\t#J\n", + "Q1 = del_H;\t\t\t#J\n", + "del_U1 = round(del_H-(P1*(10**5)*(V2-V1)));\t\t\t#J\n", + "\n", + "#Second Step\n", + "del_U2 = round(Cv*(T1-T2));\t\t\t#J\n", + "Q2 = del_U2;\n", + "Q = Q1+Q2;\n", + "del_U = 0;\n", + "W = del_U-Q;\t\t\t#J\n", + "del_H = 0;\t\t\t#const Temperature\n", + "\n", + "print ('(a) Cooling at const Pressure Followed by Heating at const Volume')\n", + "print 'Heat Required',Q,'J'\n", + "print 'Work Required',W,'J'\n", + "print 'Change in enthalpy',del_H,'J'\n", + "print 'Change in Energy',del_U,'J'\n", + "\n", + "#(b)-heating at Const Volume Followed by cooling at const Pressure\n", + "T2 = T1*(P2/P1);\t\t\t#K\n", + "del_U1 = round(Cv*(T2-T1));\t\t\t#J\n", + "Q1 = del_U1;\n", + "del_H = round(Cp*(T1-T2));\t\t\t#J\n", + "Q2 = del_H;\n", + "del_U2 = round(del_H-(P2*(10**5)*(V2-V1)));\t\t\t#J\n", + "Q = Q1+Q2;\n", + "del_U = 0;\n", + "W = del_U-Q;\t\t\t#J\n", + "del_H = 0;\t\t\t#const Temperature\n", + "print '(b) Heating at const Volume Followed by Cooling at const Pressure'\n", + "print 'Heat Required',Q,'J'\n", + "print 'Work Required',W,'J'\n", + "print 'Change in enthalpy',del_H,'J'\n", + "print 'Change in Energy',del_U,'J'\n", + "\n", + "\n", + "#Note\n", + "print ('Note : The Answer varies From That in the book because in Book 4956.44 has been rounded to \\\n", + " 4958 which is absurd')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Volume 0.004958 m**3\n", + "Final Temperature 59.63 K\n", + "(a) Cooling at const Pressure Followed by Heating at const Volume\n", + "Heat Required -1985.0 J\n", + "Work Required 1985.0 J\n", + "Change in enthalpy 0 J\n", + "Change in Energy 0 J\n", + "(b) Heating at const Volume Followed by Cooling at const Pressure\n", + "Heat Required -9923.0 J\n", + "Work Required 9923.0 J\n", + "Change in enthalpy 0 J\n", + "Change in Energy 0 J\n", + "Note : The Answer varies From That in the book because in Book 4956.44 has been rounded to 4958 which is absurd\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 page no : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "T1 = 277.;\t\t\t#Temp = 277K\n", + "P1 = 10.;\t\t\t#Pressure = 10bar\n", + "V1 = 2.28;\t\t\t#molar Volume = 2.28m**3/Kmol\n", + "\n", + "T2 = 333.;\t\t\t#Temp = 333K\n", + "P2 = 1. \t\t\t#Pressure = 1atm\n", + "\n", + "Cv = 21.;\t\t\t#KJ/Kmol/K\n", + "Cp = 29.3;\t\t\t#KJ/Kmol/K\n", + "\n", + "# Calculations\n", + "#(a)-Cooled at const Vol to the final pressure\n", + "#(b)-Heated at const Pressure to final temperature\n", + "T_ = T1*(1./10);\t\t\t#Intermediate temperature\n", + "del_Ta = T_-T1;\n", + "del_Tb = T2-T_;\n", + "del_Ua = Cv*del_Ta;\t\t\t#KJ/Kmol\n", + "del_Ha = del_Ua+(V1*(P2-P1)*(10**5)/(10**3));\t\t\t#KJ/Kmol\n", + "V2 = (V1*P1*T2)/(P2*T1);\t\t\t#m**3/kmol\n", + "del_Hb = Cp*del_Tb;\n", + "del_Ub = del_Hb-(P2*(V2-V1)*(10**5)/(10**3));\t\t\t#KJ/Kmol\n", + "\n", + "del_U = round(del_Ua+del_Ub,0);\n", + "del_H = round(del_Ha+del_Hb,0);\n", + "\n", + "# Results\n", + "print 'Change In Internal Energy',del_U,'KJ/Kmol'\n", + "print 'Change In Enthalpy',del_H,'KJ/Kmol'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change In Internal Energy 1197.0 KJ/Kmol\n", + "Change In Enthalpy 1658.0 KJ/Kmol\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 page no : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "M = 190.;\t\t\t#Mass = 190Kg\n", + "T0 = 333.15;\t\t\t#Temperature = 333.15K(60`C)\n", + "m = 0.2;\t\t\t#Steady rate of mass(Kg/s)\n", + "T = 308.15;\t\t\t#Temperature = 308.15K(35`C)\n", + "T1 = 283.15;\t\t\t#Temperature = 283.15K(10`C)\n", + "\n", + "# Calculations and Results\n", + "#Using the Eqn (2.29)\n", + "t = round(-(M/m)*math.log((T-T1)/(T0-T1)),1);\t\t\t#s\n", + "print 'Time Taken for temperature of water to drop from 333.15K to 308.15K',t,'s'\n", + "t = round(t/60);\t\t\t#min\n", + "print 'Time Taken for temperature of water to drop from 333.15K to 308.15K',t,'min'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time Taken for temperature of water to drop from 333.15K to 308.15K 658.5 s\n", + "Time Taken for temperature of water to drop from 333.15K to 308.15K 11.0 min\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 page no : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "rQ = 4.15;\t\t\t#[g/s] flow rate\n", + "rQ2 = 12740.;\t\t\t#Rate of Heat addition from resismath.tance heater\n", + "\n", + "# Calculations\n", + "#del_z and del_u*2 are negligible if Ws and H1 = 0..then H2 = Q\n", + "H2 = round(rQ2/rQ);\t\t\t#[J/g]\n", + "\n", + "# Results\n", + "print 'Enthalpy of Steam',H2,'J/g'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy of Steam 3070.0 J/g\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 page no : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 600.; \t\t\t#[m/s]\n", + "W_compression = 240.;\t\t\t#[KJ/Kg]\n", + "\n", + "# Calculations\n", + "#Umath.sing Eqn(2.32a)\n", + "Q = (1./2*(V*V)/1000.)-W_compression;\n", + "\n", + "# Results\n", + "print 'Thus Heat Removed from each KG of air compressed is',-Q,'KJ/kg'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus Heat Removed from each KG of air compressed is 60.0 KJ/kg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 page no : 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.15*10**-3;\t\t\t#[m**3/s] Rate of pumping\n", + "rH = -700.;\t\t\t#[KW] Rate of Heat lost \n", + "h = 15.;\t\t\t#[m] Height\n", + "rW = 1.5;\t\t\t#[KW]\n", + "rho = 958.;\t\t\t#[Kg/m**3] at 366.65K\n", + "g = 9.805;\n", + "gc = 1000.;\n", + "del_z = h;\n", + "\n", + "# Calculations and Results\n", + "rm = round(R*rho,3);\t\t\t#[Kg/s] Mass flow rate\n", + "Q = round(rH/rm,1);\t\t\t#[KJ/Kg]\n", + "W = round(rW/rm,3);\t\t\t#[KJ/Kg] Shaft Work\n", + "K = round(g/gc*del_z,3);\n", + "\n", + "#using Eqn(2.32b)\n", + "del_H = Q+W-K;\n", + "\n", + "#From Steam tables for water at 366.65K\n", + "H1 = 391.6;\t\t\t#[KJ/Kg]\n", + "H2 = del_H+H1;\n", + "print 'Enthalpy',H2,'KJ/Kg'\n", + "\n", + "#From Steam Tables temp at this enthalpy is\n", + "T = 311.35;\t\t\t#[K]\n", + "print 'Temperature in the Second tank',T,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy 160.05 KJ/Kg\n", + "Temperature in the Second tank 311.35 K\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch3.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch3.ipynb new file mode 100755 index 00000000..89564919 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch3.ipynb @@ -0,0 +1,1066 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1b2f32b181f3540ad31728121b562d042f58843967e20be1e62457869e1afb4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Volumetric Properties Of Pure Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "P1 = 1.;\t\t\t#Pressure = 1Bar\n", + "T1 = 20.;\t\t\t#Temp = 293.15K(20`C)\n", + "Beta = 1.487*10**(-3);\t\t\t#vol expansivity(K**-1)\n", + "k = 62.*10**(-6);\t\t\t#isothermal compressibility(bar**-1)\n", + "V1 = 1.287*10**(-3);\t\t\t#Volume(m**3 kg**-1)\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Find (dP/dT)v??\n", + "#Using eq.(3.4),V consmath.tant hence dV = 0\n", + "ans_a = (Beta/k);\n", + "print '(a)The value of (dp/dT)v is ',ans_a,'K**-1'\n", + "\n", + "#(b)\n", + "#Find Pressure when acetone heated at const. Vol from T1(1bar) to T2.\n", + "T2_b = 30.;\t\t\t#Temp2 = 303.15K(30`C)\n", + "del_P = ans_a*(T2_b-T1);\n", + "ans_b = P1+del_P;\n", + "print '(b)The pressure is ',ans_b,'bar'\n", + "\n", + "#(c)\n", + "#Find vol. change when acetone changed from T1(P1) to T2(P2)\n", + "T2_c = 0;\t\t\t#Temp2 = 273.15K(0`C)\n", + "P2 = 10.;\t\t\t#pressure = 10bar\n", + "#solve using Eq. (3.5)\n", + "ln_value = (Beta*(T2_c-T1))-(k*(P2-P1));\t\t\t#ln(V2/V1)\n", + "ratio = math.exp(ln_value);\t\t\t#taking antimath.log,V2/V1\n", + "V2 = ratio*V1;\n", + "del_V = round(V2-V1,6)\n", + "print '(c)The change in Volume is ',del_V*1000,'(X 10**-3) m**3 kg**-1'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The value of (dp/dT)v is 23.9838709677 K**-1\n", + "(b)The pressure is 240.838709677 bar\n", + "(c)The change in Volume is -0.038 (X 10**-3) m**3 kg**-1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "%matplotlib inline\n", + "\n", + "import math \n", + "from numpy import linspace\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "\n", + "# Variables\n", + "#Figure\n", + "P = [1, 5];\n", + "V = [25 ,25];\n", + "\n", + "# Calculations and Results\n", + "plot(V,P)\n", + "V = linspace(5,25,41)\n", + "P = 25*V**-1;\n", + "plot(V,P)\n", + "P = P**1.4;\n", + "plot(V,P)\n", + "P = [5 ,9.52];\n", + "V = [5 ,5];\n", + "plot(V,P) #,rect = [0,0,30,10])\n", + "suptitle(\"Diagram for Ex.3.2\")\n", + "xlabel(\"V x 10**3(m**3)\")\n", + "ylabel(\"P(bar)\")\n", + "P = [5, 5];\n", + "V = [5 ,25];\n", + "plot(V,P)\n", + "\n", + "#Initial Stage\n", + "P1 = 1.;\t\t\t#Pressure = 1bar\n", + "T1 = 298.15;\t\t\t#Temp1 = 298.15K(25`C)\n", + "\n", + "#Final Stage\n", + "P2 = 5.;\t\t\t#Pressure = 1bar\n", + "#Temp same as Temp1(Isothermal)\n", + "\n", + "R = 8.314;\t\t\t#J/Mol/K\n", + "Cv = (5./2)*R;\t\t\t#J/Mol/K\n", + "Cp = (7./2)*R;\t\t\t#J/Mol/K\n", + "\n", + "#(a)\n", + "#Const Vol follwd by const Pressure\n", + "T2 = T1*(P2/P1);\n", + "#By Eq 2.23\n", + "del_T = T2-T1;\n", + "Q1 = Cv*(T2-T1);\t\t\t#Heat at const Vol\n", + "Q2 = Cp*(T1-T2);\t\t\t#Heat at const pressure\n", + "\n", + "Q_a = round(Q1+Q2);\n", + "W_a = -Q_a;\t\t\t#W = del_U-Q,here del_U = 0\n", + "print (' (a) Heating at consmath.tant volume Followed by cooling at consmath.tant Pressure')\n", + "print 'work done by heating at const vol followed by const Pressure ',W_a,'J'\n", + "print 'Heat Transferred Q ',Q_a,'J'\n", + "print ('change in Internal Energy and enthalpy = 0')\n", + "\n", + "#(b)\n", + "#Isothermal Compression\n", + "#By Eq. (3.26)\n", + "Q_b = round(R*T1*math.log(P1/P2));\n", + "W_b = -Q_b;\n", + "print (' (b) Isothermal compression')\n", + "print 'work done by Isothermal compression ',W_b,'J'\n", + "print 'Heat Transferred Q',Q_b,'J'\n", + "print ('change in Internal Energy and enthalpy = 0')\n", + "\n", + "#(c)\n", + "#Adiabatic compression\n", + "gama = Cp/Cv;\n", + "V1 = (R*T1)/(P1**(10**5));\n", + "V2 = V1*(P1/P2);\n", + "T2_c = T1*((V1/V2)**(gama-1));\t\t\t#Kelvin(K)\n", + "P2_c = P1*((V1/V2)**gama);\t\t\t#bar\n", + "#Umath.sing Eq. (3.31)\n", + "W_c = round(Cv*(T2_c-T1));\t\t\t#W = Cv*del_T(Joules)\n", + "Q_c = -W_c;\n", + "\n", + "print (' (c) Adiabatic compression followed by cooling at consmath.tant Volume')\n", + "print 'work done by Adiabatic compression Followed by Cooling at const Vol ',W_c,'J'\n", + "print 'Heat Transferred Q',Q_c,'J'\n", + "print 'change in Internal Energy and enthalpy = 0'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a) Heating at consmath.tant volume Followed by cooling at consmath.tant Pressure\n", + "work done by heating at const vol followed by const Pressure 9915.0 J\n", + "Heat Transferred Q -9915.0 J\n", + "change in Internal Energy and enthalpy = 0\n", + " (b) Isothermal compression\n", + "work done by Isothermal compression 3990.0 J\n", + "Heat Transferred Q -3990.0 J\n", + "change in Internal Energy and enthalpy = 0\n", + " (c) Adiabatic compression followed by cooling at consmath.tant Volume\n", + "work done by Adiabatic compression Followed by Cooling at const Vol 5600.0 J\n", + "Heat Transferred Q -5600.0 J\n", + "change in Internal Energy and enthalpy = 0\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEhCAYAAAB2h3f0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VPXZ//H3hASysSYhJEAI+y6bQNlkEHGDBwS1Imit\nVevPvVVra1sFHlt3bd2xUhCfijtoLSqLEiyggCyyBhAEAoQkQAIhhEDI/P74TpJJTCAzzMyZk3xe\nXOeaM2fOzLkz1zD3fHcQERERERERERERERERERERERERERERqdIZYB2wCVgP3A843I/1A16wKK5z\nuRbYAnx5Hq9R+reXbg958dzHgO8x79mXQOsqzmkNLAE2Y97fe88jVhERv8v32E8AFgFTA3CdMD+/\n3hfAYC/OD6/iWH4Vx2qqocf+PcCMKs5pAfR278cC24Cu53FNERG/qvwl2BY45N53Ap+69wcAK4C1\nwHKgk/t4NPA+5lfuXOBboK/7sePAs5hfyUOAR4BVwEbgdY9rpgHPA6uBrUB/YB6wHfNLu7JH3XGn\nA08BDYBZwAZ3fE73eb8E/o35hb6kBn87QGP365b+fe8At1RxnqeHgSfPcQ7Ax8DIGpwnIhIUVX0J\n5mJKA07KE0BDoJ57/xLgQ/f+g8Br7v3uwGnKE0AJcI3H6z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MWUD2qsCQfQhvIBUdUdG4fp470OM53Cxe7jDYCv\nCb3BnRLC9GGRUPMOMLHSseuAOT6+3iyqnhP9D5gE0An40n0f4K+Y2SnjgReAXtUc2wj0w0zCdSnw\nClDP/RoXY6bnzfciztcwg3vaADOA5GqOLXZfvw/wS+Af7ucXYWYv1UyaImJbzTC/2EvXq04F9lRx\nXn/ML+EGmGlDNgHdqnnNVH5aAkinfJRkCyrOP/MaZkKyjuc4VqotZjHuUjMoL8Wkul97FiYpvO1+\nbDmm9NHffV4YMB+zHkZCFcfiq7juIMpngAQYCHxQxXkiIrbxKeYXN5hf5k9Xc95jwDPAy5iFRKqT\nyk8TgOcMlA6P+4+5r/0i5tf+BdUcA/OFuxk4gamaKbWV8kWNUoHTQHf3db6jfIbGscA89/6rwCTg\nEcyv+qRqjoH5lb8VyMNURZVqAOyv7k0QEbGDSZRX+azDVHdUJQJTCviWsy+CkcrZEwD8dAric7UB\neOqCWcq0kfv+0UrX3u5xfzZwvXu/HebvK1W5vr+6Y6WGYUoVnjKByGrOFxEJebGYaqA+/PQLzlMS\n8AOm+if6LOelUnUVkD+nIP4S0yYAP00AnteeBVx9lri8tROI87h/EFMSEDknNQJLKDqOWfB6Fmdv\n/H0d+LP7nKe8vMb5TkGcSnk7RRtM28AO9/0DVPxS9qf2lJd2+rpvD7tvGwBnMA3CIiK2NQ7zZdap\nmsd/QXmDZximGshZxXmlUzoXUT5FNpz/FMQ3YEoe64BVVOxp9AZwmXs/FdNNtNQsYEI1j9XEQx7X\n/S/ljcgAPwM+9PL1RETEj5yYXkPB9jhmERAREbGQtwPBzlfpQLCzNYaLiIiIiIiIiIiIiIiIiIiI\niIiIiIiI/f1/TPX8ZedkZoAAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "import math \n", + "from numpy import linspace\n", + "\n", + "# Variables\n", + "#Figure\n", + "V = linspace(2083,2853,1541);\n", + "P = 2853*V**-1;\n", + "P = P**1.67;\n", + "plot(V,P)\n", + "P = [1.698, 1.698];\n", + "V = [1690 ,2083];\n", + "plot(V,P)\n", + "V = linspace(1690,2853,2327)\n", + "P = 2853*V**-1;\n", + "plot(V,P)\n", + "suptitle(\"Diagram for Ex.3.3\")\n", + "xlabel(\"V\")\n", + "ylabel(\"P\")\n", + "\n", + "# Variables for the Ideal Gas\n", + "R = 8.314;\t\t\t#J/Mol/K\n", + "Cv = (3./2)*R;\t\t\t#J/Mol/K\n", + "Cp = (5./2)*R;\t\t\t#J/Mol/K\n", + "gama = Cp/Cv;\n", + "\n", + "# Calculations and Results\n", + "\n", + "#(a)\n", + "#Adiabatic Compression\n", + "P1 = 1;\t\t\t#Pressure = 1bar\n", + "T1 = 343.15;\t\t\t#Temp1 = 343.15K(70`C)\n", + "T2 = 423.15;\t\t\t#Temp2 = 423.15K(150`C)\n", + "Q_a = 0;\t\t\t#Adiabatic Compression\n", + "del_U_a = (Cv*(T2-T1));\n", + "W_a = del_U_a;\n", + "del_H_a = (Cp*(T2-T1));\n", + "#Umath.sing Eq. (3.29b)\n", + "P2 = P1*((T2/T1)**(gama/(gama-1)));\t\t\t#bar\n", + "\n", + "#(b)\n", + "#cooled form 150`C to 70`C at Const pressure\n", + "#Umath.sing Eq.(3.27)\n", + "Q_b = round(Cp*(T1-T2));\n", + "del_H_b = Q_b;\n", + "#for Ideal Gas\n", + "del_U_b = round(Cv*(T1-T2));\n", + "#by First law\n", + "W_b = del_U_b-Q_b;\t\t\t#Joules\n", + "\n", + "#(c)\n", + "#Expanded Isothermally to original state\n", + "del_U_c = 0;\t\t\t#isothermal\n", + "del_H_c = 0;\t\t\t#isothermal\n", + "Q_c = round(R*T1*math.log(P2/P1));\n", + "W_c = -Q_c;\n", + "\n", + "#Entire process\n", + "Qt = Q_a+Q_b+Q_c;\n", + "Wt = W_a+W_b+W_c;\n", + "del_Ut = del_U_a+del_U_b+del_U_c;\n", + "del_Ht = del_H_a+del_H_b+del_H_c;\n", + "\n", + "\n", + "#PartII(Irreversible)\n", + "eta = .80;\t\t\t#Efficiency = 80%\n", + "\n", + "#(a)\n", + "Wm_a = (W_a/eta);\n", + "Qm_a = del_U_a-Wm_a;\t\t\t#del_U remains same (by First Law)\n", + "\n", + "#(b)\n", + "Wm_b = round(W_b/eta);\n", + "Qm_b = del_U_b-Wm_b;\t\t\t#del_U remains same (by First Law)\n", + "\n", + "#(c)\n", + "Wm_c = round(W_c*eta);\n", + "Qm_c = del_U_c-Wm_c;\t\t\t#del_U remains same (by First Law)\n", + "\n", + "#Entire Process\n", + "Qmt = Qm_a+Qm_b+Qm_c;\n", + "Wmt = Wm_a+Wm_b+Wm_c;\n", + "\n", + "\n", + "del_U_rev = [del_U_a,del_U_b,del_U_c];\n", + "del_H_rev = [del_H_a,del_H_b,del_H_c];\n", + "Qrev = [Q_a,Q_b,Q_c];\n", + "Wrev = [W_a,W_b,W_c];\n", + "Sumr = [del_Ut,del_Ht,Qt,Wt];\n", + "\n", + "del_U_irev = del_U_rev;\n", + "del_H_irev = del_H_rev;\n", + "Qirev = [Qm_a,Qm_b,Qm_c];\n", + "Wirev = [Wm_a,Wm_b,Wm_c];\n", + "Sumi = [del_Ut,del_Ht,Qmt,Wmt];\n", + "\n", + "\n", + "print (' (a)Adiabatic Compression')\n", + "print (' (b)Cooled form 150`C to 70`C at Const pressure')\n", + "print (' (c)Expanded Isothermally to original state')\n", + "\n", + "print (' Mechanically reversible');\n", + "\n", + "Ans_rev = [del_U_rev,del_H_rev,Qrev,Wrev];\n", + "\n", + "print ' del U del H Q W',Ans_rev,'Sum',Sumr\n", + "print (' Irreversible');\n", + "\n", + "Ans_irev = [del_U_irev,del_H_irev,Qirev,Wirev];\n", + "\n", + "print ' del U del H Q W',Ans_irev,'Sum',Sumi\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a)Adiabatic Compression\n", + " (b)Cooled form 150`C to 70`C at Const pressure\n", + " (c)Expanded Isothermally to original state\n", + " Mechanically reversible\n", + " del U del H Q W [[997.6800000000001, -998.0, 0], [1662.8, -1663.0, 0], [0, -1663.0, 1495.0], [997.6800000000001, 665.0, -1495.0]] Sum [-0.31999999999993634, -0.20000000000004547, -168.0, 167.68000000000006]\n", + " Irreversible\n", + " del U del H Q W [[997.6800000000001, -998.0, 0], [1662.8, -1663.0, 0], [-249.41999999999985, -1829.0, 1196.0], [1247.1, 831.0, -1196.0]] Sum [-0.31999999999993634, -0.20000000000004547, -882.4200000000001, 882.0999999999999]\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd41FX2x/F3SKEjuFFYBUWKKEWaIlLHSpOqKIiICCqI\nwCIW5KcGxYYLuoiIroiiCCggKCuooESaIEuvFkBBV5oFqSIkvz/OxIQ4IQnMzJ3vzOf1PHkymZnM\nnEEnZ+49954LIiIiIiIiIiIiIiIiIiIiIiIiIiIiInIKjgErgXXAKuAeIM5/W11gpKO4ctMR2AB8\ncgqPkfHaM77uz8fvDgVWY/9mnwDlAtynELDUf58NwFOnEKuIiDP7slw+A5gDDAnB8xQI8uN9CDTI\nx/0TAly3L8B1eVU8y+W+wNgc7lcky/MvARqdwnOKBP2NJJJfu4E7gLv9P/uAmf7L9YDFwApgEXC+\n//oiwDvAeuBd7I9hHf9t+4Hh2Cfqy4CHgS+AtcDLWZ43FXgWWAZsBC4BpgNfYZ/cs3sEaAiMA4YB\nBYHXgDX++Hz++90KvI994p+Tt38CTgM2ZXl9k4AeAe6XNckUA/bk8HgH/d+TgHjg5zzGISISMQJ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+8f2tgSW0VVsu6z3+9V967IiIiIiIiIiIiIiIiIiIiIiIiIiIi\nIuJNn3J8y2aAf3D83g0REYlht/PXfkCfYxu6REREOB3rr5Pg/7k8titcJCpFUlNAEa/4Gevl39L/\ncyfgbXfhiIhIJLqJzFbmKzm+P5CIiAjFsOmn2tiRmiIiIn8xGevkmZLbHUVEJDa1BY5h5y+IiIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiISDT7f8NvGi0u7CeSAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "from numpy import linspace\n", + "import math \n", + "\n", + "\n", + "#Figure\n", + "P = [1.35 ,1.35];\n", + "V = [0.24, 0.264];\n", + "plot(V,P)\n", + "V = linspace(0.12,0.24,121)\n", + "P = 0.324*V**-1;\n", + "plot(V,P)\n", + "P = [2.7, 2.97];\n", + "V = [0.12, 0.12];\n", + "plot(V,P)\n", + "suptitle(\"Diagram for Ex.3.4\")\n", + "xlabel(\"V(m**3)\")\n", + "ylabel(\"P(bar)\")\n", + "\n", + "P = [2.97, 2.97];\n", + "V = [0 ,0.12];\n", + "plot(V,P)\n", + "P = [2.7, 2.7];\n", + "V = [0 ,0.12];\n", + "plot(V,P)\n", + "P = [1.35, 1.35];\n", + "V = [0 ,0.24];\n", + "plot(V,P)\n", + "P = [0, 2.7];\n", + "V = [0.12, 0.12];\n", + "plot(V,P)\n", + "P = [0 ,1.35];\n", + "V = [0.24, 0.24];\n", + "plot(V,P)\n", + "P = [0 ,1.35];\n", + "V = [0.264, 0.264];\n", + "plot(V,P)\n", + "\n", + "\n", + "# Variables\n", + "m = 0.4;\t\t\t#Kg\n", + "M = 28.;\t\t\t#Molecular Mass Of Nitrogen\n", + "T1 = 300.15;\t\t\t#Temp = 300.15K(27`C)\n", + "Pn = 0.35;\t\t\t#Pressure of nitrogen = 0.35bar\n", + "Pa = 1.;\t\t\t#Atm Pressure = 1bar\n", + "R = 8.314;\t\t\t#J/Mol/K\n", + "Cv = (5./2)*R;\t\t\t#J/Mol/K\n", + "Cp = (7./2)*R;\t\t\t#J/Mol/K\n", + "gama = Cp/Cv;\n", + "\n", + "n = (m/M)*1000;\t\t\t#moles\n", + "\n", + "# Calculations and Results\n", + "\n", + "#(a)\n", + "#Immersed In ice/water bath\n", + "T2 = 273.15;\t\t\t#Temp = 273.15K(0`C)\n", + "W_a = -round(n*R*(T2-T1));\t\t\t#Joules\n", + "del_H_a = round(Cp*(T2-T1),0);\n", + "Q_a = (n*del_H_a);\n", + "del_U_a = round((Q_a+W_a)/n,0);\n", + "print ('(a)Immersed In ice/water bath')\n", + "print 'work done ',W_a,'J'\n", + "print 'Heat Transferred Q = ',Q_a,'J'\n", + "print 'change in Internal Energy ',del_U_a,'J'\n", + "print 'change in enthalpy ',del_H_a,'J'\n", + "\n", + "\n", + "#(b)\n", + "#Isothermal Compression\n", + "del_U_b = 0;\t\t\t#Isothermal\n", + "del_H_b = 0;\t\t\t#Isothermal\n", + "W_b = -round(n*R*T2*math.log(1./2));\t\t\t#W = nRTln(V3/V2),here V3/V2 = 0.5(Given)\n", + "Q_b = -W_b;\n", + "print ('(b)Isothermal Compression')\n", + "print 'work done by Isothermal Compression ',W_b,'J'\n", + "print 'Heat Transferred Q = ',Q_b,'J'\n", + "print 'change in Internal Energy ',del_U_b,'J'\n", + "print 'change in enthalpy ',del_H_b,'J'\n", + "\n", + "\n", + "#(c)\n", + "#constant Vol Process\n", + "W_c = 0;\t\t\t#const Vol\n", + "del_H_c = round((Cp*(T1-T2))/n,0);\n", + "del_U_c = round(Cv*(T1-T2),0);\n", + "Q_c = round(n*del_U_c);\n", + "print ('(c)Consmath.tant Vol Process')\n", + "print 'work done by Const Vol Process ',W_c,'J'\n", + "print 'Heat Transferred Q = ',Q_c,'J'\n", + "print 'change in Internal Energy ',del_U_c,'J'\n", + "print 'change in enthalpy ',del_H_c,'J'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Immersed In ice/water bath\n", + "work done 3207.0 J\n", + "Heat Transferred Q = -11228.5714286 J\n", + "change in Internal Energy -562.0 J\n", + "change in enthalpy -786.0 J\n", + "(b)Isothermal Compression\n", + "work done by Isothermal Compression 22487.0 J\n", + "Heat Transferred Q = -22487.0 J\n", + "change in Internal Energy 0 J\n", + "change in enthalpy 0 J\n", + "(c)Consmath.tant Vol Process\n", + "work done by Const Vol Process 0 J\n", + "Heat Transferred Q = 8014.0 J\n", + "change in Internal Energy 561.0 J\n", + "change in enthalpy 55.0 J\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEhCAYAAACKklw+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHeJJREFUeJzt3Xm8lGX9//HXsCgQhrhEiguuKbiBgqiox3LX3MU1UCmV\nXCtTKQz41let708rIhTLLVNRcUNQC41JVFJSQEE0RHAt3IBUFMEzvz+uOZ5hzrlhzplzzz0z5/V8\nPM7j3DP3Mp+bOcx7ruu6F5AkSZIkSZIkSZIkSZIkSZIkrcUXwExgDjAL+CGQys7bHfhtQnWtzYnA\nS8DjRWyjbt/rfi5twro/B2YT/s0eBzZfw7Jts9t/qHllSlJyPsqZ3hiYAoyM4XXatPD2HgX2bsLy\n7Rp57qNGnivUejnTFwB/XMOyPwRuByYW8XqSlIj8D8qtgPez0zXUf/vtBzwNPA88BWyffb4TcDcw\nF7gP+AfQJzvvY+D/Eb5t7wNcATwLvAiMy3nNNHAtMAOYB/QF7gf+RfjGnu9n2bpfBn4JrAvcDLyQ\nra8mu9wZhA/mx4GpBew7QJfsduv2705gSCPL5RoGXB0xbzPgMe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iwr/M6IQAAzgR+nbfs2sYk\ncl0O3JzzeAfCjW+ksuOYhFqjicC3COHQiRAU0LBraEXOdG3O41pWvxfLrdR3Wa3puTp3sPoF11KU\n/z0a1EoZEmqNPgamEr7N17UoXidc1bXOmm521ZwbYW2XM3009cEEoYUSFShSopK8M52UpDuB+4CB\n2cf/Ifx/6AQsJ3yzz/12nz/d1G/+VwHfAL4gXM9/aM68fsATTdyeJKnERhIOhy21NB4CK0llb2Pq\n7xRYKrsQboAjSZIkSZIkSZIkSZIkSZIkSSre/wekZFbyO1hb0gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "n = 1.;\t\t\t#Molar Rate(mol/s)\n", + "D = 5.;\t\t\t#inner Diameter(cm)\n", + "R = 83.14;\n", + "Cp = (7./2)*R;\n", + "M = 29*10.**-3;\t\t\t#Molar mass(g/mol)\n", + "T = 293.15;\t\t\t#temperature = 293.15K(20`C)\n", + "P1 = 6.;\t\t\t#Upstream Pressure\n", + "P2 = 3.;\t\t\t#Downstream Pressure\n", + "\n", + "# Calculations\n", + "#from Eq.(2.24b)\n", + "A = (math.pi/4)*((D*10**-2)**2);\t\t\t#Area(m**2)\n", + "#upstream molar Volume\n", + "V1 = (R*T/P1)*10**-6;\t\t\t#m**3/mol\n", + "u1 = n*V1/A;\t\t\t#velocity(m/s)\n", + "V2 = 2*V1;\n", + "u2 = 2*u1;\n", + "del_KE = round(n*M*((u2**2)-(u1**2))/2,3);\t\t\t#J/s(W)\n", + "del_T = round(-del_KE/(Cp*0.1),4);\t\t\t#K\n", + "\n", + "# Results\n", + "print 'Change in KE ',del_KE,'W or J/s'\n", + "print 'Change in Temperature ',del_T,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in KE 0.186 W or J/s\n", + "Change in Temperature -0.0064 K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T = 473.15;\t\t\t#Temp = 473.15k(200`C)\n", + "P = 10.;\t\t\t#Pressure = 10bar\n", + "B = -0.388;\t\t\t#Viral Coefficient(m**3/Kmol)\n", + "C = -26.*(10**(-3));\t\t\t#Viral Coefficient(m**6/(kmol)**2)\n", + "\n", + "# Calculate V and Z for isopropyl vapor\n", + "R = 83.14*(10**(-3));\t\t\t#m**3bar/Kmol/K\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Ideal Gas equation\n", + "V_a = round((R*T)/P,3);\n", + "Z_a = 1.;\t\t\t#Ideal Gas\n", + "print ('(a) By Ideal gas Equation')\n", + "print 'V = ',V_a,'m**3/kmol'\n", + "print 'Z = ',Z_a\n", + "\n", + "#(b)\n", + "#Using Eqution 3.37 -> Z = PV/RT = 1+BP/RT\n", + "V_b = round((R*T/P)+B,3);\n", + "Z_b = round(P*V_b/(R*T),4);\n", + "print ('(b) Using Eqution 3.37 -> Z = PV/RT = 1+BP/RT')\n", + "print 'V = ',V_b,'m**3/kmol'\n", + "print 'Z = ',Z_b\n", + "\n", + "#(c)\n", + "#Using Equation 3.39 -> Z = PV/RT = 1+(B/V)+(C/(V**2))\n", + "#Iterations\n", + "a = V_a;\t\t\t#Initial\n", + "i = -1;\n", + "while(i == -1):\n", + " b = ((R*T/P)*(1+(B/a)+(C/(a**2))));\n", + " c = abs(b-a)\n", + " if(c <= 0.0001):\n", + " i = 1;\n", + " break;\n", + " a = b;\n", + "\n", + "V_c = round(b,3);\n", + "Z_c = round(P*V_c/(R*T),4);\n", + "#Ans\n", + "print ('(c) Using Equation 3.39 -> Z = PV/RT = 1+(B/V)+(C/(V**2))')\n", + "print 'V = ',V_c,'m**3/kmol'\n", + "print 'Z = ',Z_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) By Ideal gas Equation\n", + "V = 3.934 m**3/kmol\n", + "Z = 1.0\n", + "(b) Using Eqution 3.37 -> Z = PV/RT = 1+BP/RT\n", + "V = 3.546 m**3/kmol\n", + "Z = 0.9014\n", + "(c) Using Equation 3.39 -> Z = PV/RT = 1+(B/V)+(C/(V**2))\n", + "V = 3.488 m**3/kmol\n", + "Z = 0.8867\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros\n", + "\n", + "# Variables\n", + "T = 350.;\t\t\t#Temp = 350K(76.85`C)\n", + "P = 9.4573;\t\t\t#Pressure = 9.4573bar\n", + "R = 83.14;\n", + "\n", + "Tc = 425.1;\t\t\t#App B\n", + "Pc = 37.96;\t\t\t#App B\n", + "Tr = T/Tc;\n", + "Pr = P/Pc;\n", + "#Parameters for RK\n", + "si = 0.42748;\n", + "omega = 0.08664;\n", + "epsilon = 0;\n", + "sigma = 1;\n", + "a = Tr**-0.5;\n", + "\n", + "# Calculations and Results\n", + "#Using Eq(3.51)\n", + "q = si*a/(omega*Tr);\n", + "Beta = omega*Pr/Tr;\n", + "\n", + "print ('The Following Results given By Redlich/Kwong Equation')\n", + "#(a)\n", + "Z = 1.;\t\t\t#initial\n", + "a = Z;\n", + "for i in range(0,11):\n", + " b = 1+Beta-((q*Beta)*(a-Beta)/(a*(a+Beta)));\n", + " if((b-a) == 0.0001):\n", + " break;\n", + " a = b;\n", + " \n", + "Z = round(b,4)\n", + "V = round(Z*R*T/P);\n", + "print 'Molar Volume of saturated Vapor is ',V,'cm**3/mol'\n", + "\n", + "#(b) \n", + "Z = Beta;\t\t\t#initial\n", + "a = Z;\n", + "for i in range(0,21):\n", + " b = Beta+(a*(a+Beta)*(1+Beta-a)/(q*Beta));\n", + " if((b-a) == 0.0001):\n", + " break;\n", + " a = b;\n", + " i = i+1;\n", + "\n", + "Z = round(b,5)\n", + "V = round(Z*R*T/P,1);\n", + "print 'Molar Volume of Saturated Liquid is ',V,'cm**3/mol'\n", + "\n", + "# Variables\n", + "T = 350.;\t\t\t#Temp = 350K(76.85`C)\n", + "P = 9.4573;\t\t\t#Pressure = 9.4573bar\n", + "R = 83.14;\n", + "\n", + "Tc = 425.1;\t\t\t#App B\n", + "Pc = 37.96;\t\t\t#App B\n", + "Tr = T/Tc;\n", + "Pr = P/Pc;\n", + "#Parameters for eqns[vdW,RK,SRK,PR]\n", + "si = array([27./64,0.42748,0.42748,0.45724]);\n", + "omega = array([1./8,0.08664,0.08664,0.07779]);\n", + "epsilon = array([0,0,0,(1-math.sqrt(2))]);\n", + "sigma = array([0,1,1,(1+math.sqrt(2))]);\n", + "w = 0.2;\t\t\t#App B\n", + "aSRK = (1+((0.480+(1.574*w)-(0.1768*w**2))*(1-Tr**0.5)))**2;\n", + "aPR = (1+((0.37464+(1.54226*w)-(0.26992*w**2))*(1-Tr**0.5)))**2;\n", + "a = [1,Tr**-0.5,aSRK,aPR];\n", + "\n", + "\n", + "print (' By All Equations')\n", + "#Using Eq(3.51)\n", + "q = si*a/(omega*Tr);\n", + "Beta = omega*Pr/Tr;\n", + "\n", + "#print ('The Following Results given By Redlich/Kwong Equation')\n", + "#(a)\n", + "z = zeros(4)\n", + "for j in range(4):\n", + " Z = 1;\t\t\t#initial\n", + " A = Z;\n", + " for i in range(11):\n", + " b = 1+Beta[j]-((q[j]*Beta[j])*(A-Beta[j])/((A+(epsilon[j]*Beta[j]))*(A+(sigma[j]*Beta[j]))));\n", + " if((b-A) == 0.0001):\n", + " break;\n", + " A = b;\n", + " z[j] = round(b,4);\n", + "\n", + "V = round(Z*R*T/P,1)\n", + "print ('Molar Volume(Vv) of Saturated Vapor'); \n", + "print V \n", + "\n", + "#(b) \n", + "for j in range(4):\n", + " Z = Beta[j];\t\t\t#initial\n", + " A = Z;\n", + " for i in range(21):\n", + " b = Beta[j]+((A+(epsilon[j]*Beta[j]))*(A+(sigma[j]*Beta[j]))*(1+Beta[j]-A)/(q[j]*Beta[j]));\n", + " if((b-A) == 0.0001):\n", + " break;\n", + " A = b;\n", + " i = i+1;\n", + " z[j] = round(b,5);\n", + "\n", + "V = round(Z*R*T/P,1);\n", + "print ('Molar Volume(Vl) of Saturated Liquid'); \n", + "print V\n", + "\n", + "print ('Note : Exp Value is Vv = 2482 cm**3/mol and Vl = 115 cm**3/mol')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Following Results given By Redlich/Kwong Equation\n", + "Molar Volume of saturated Vapor is 2555.0 cm**3/mol\n", + "Molar Volume of Saturated Liquid is 133.3 cm**3/mol\n", + " By All Equations\n", + "Molar Volume(Vv) of Saturated Vapor\n", + "3076.9\n", + "Molar Volume(Vl) of Saturated Liquid\n", + "72.4\n", + "Note : Exp Value is Vv = 2482 cm**3/mol and Vl = 115 cm**3/mol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 page no : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T = 510.\t\t\t#Temp = 510K\n", + "P = 25.\t \t\t#Pressure = 25bar\n", + "R = 0.08314;\n", + "\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#By the Ideal-gas Equation\n", + "V = round(R*T/P,4);\t\t\t#m**3/kmol\n", + "print ('(a)By the Ideal-gas Equation')\n", + "print 'The Molar Volume is ',V,'m**3/kmol'\n", + "\n", + "#(b)\n", + "#The Generalized compressibility-factor Correlation\n", + "Tc = 425.1;\t\t\t#From App.B\n", + "Pc = 37.96;\t\t\t#From App.B\n", + "Tr = round(T/Tc,1);\n", + "Pr = round(P/Pc,3)\n", + "#Interpolation in Tables E.1 and E.2 then provides\n", + "Z0 = 0.865;\n", + "Z1 = 0.038;\n", + "w = 0.200;\n", + "Z = Z0+(w*Z1);\n", + "V = round(Z*R*T/P,2);\t\t\t#m**3/kmol\n", + "print ('(b)The Generalized compressibility-factor Correlation')\n", + "print 'The Molar Volume is ',V,'m**3/kmol'\n", + "\n", + "#(c)\n", + "#The Generalized Virial-coefficient Correlation\n", + "B0 = 0.083-(0.422/(Tr**1.6));\t\t\t#Eqn (3.61)\n", + "B1 = 0.139-(0.172/(Tr**4.2));\t\t\t#Eqn (3.62)\n", + "K = round(B0+(w*B1),3)\t\t\t#K = BPc/RTc By Eqn (3.59)\n", + "#By Eqn(3.58)\n", + "Z = round(1+(K*Pr/Tr),3)\n", + "V = round(Z*R*T/P,4);\t\t\t#m**3/kmol\n", + "print ('(c)The Generalized Virial-coefficient Correlation')\n", + "print 'The Molar Volume is ',V,'m**3/kmol'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)By the Ideal-gas Equation\n", + "The Molar Volume is 1.6961 m**3/kmol\n", + "(b)The Generalized compressibility-factor Correlation\n", + "The Molar Volume is 1.48 m**3/kmol\n", + "(c)The Generalized Virial-coefficient Correlation\n", + "The Molar Volume is 1.4908 m**3/kmol\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T = 323.15;\t\t\t#Temp = 323.15K(50`C)\n", + "V = 0.125;\t\t\t#Volume = 0.125m**3\n", + "R = 0.08314;\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#By Ideal-gas equation,\n", + "P = round(R*T/V,1);\t\t\t#in bar\n", + "print ('(a)By Ideal-gas equation')\n", + "print 'Pressure is ',P,'bar'\n", + "\n", + "#(b)\n", + "#for Redlich/Kwong equation\n", + "Tc = 190.6;\t\t\t#App B\n", + "Tr = T/Tc;\n", + "si = 0.42748;\n", + "omega = 0.08664;\n", + "Pc = 45.99;\t\t\t#App B\n", + "a = round(si*((Tr**(-0.5))*(R**2)*(Tc**2))/Pc,3)\t\t\t#Eqn (3.42)Units of a(T) bar m**6\n", + "b = round(omega*R*Tc/Pc,5)\t\t\t#Eqn (3.43)Units of b m**3\n", + "#Umath.sing eqn (3.41)\n", + "#P = RT/(V-b)-a(T)/(V+Eb)(V+~b),E->epsilon,~->sigma\n", + "epsilon = 0;\n", + "sigma = 1;\n", + "P = round(((R*T/(V-b))-(a/((V+(epsilon*b))*(V+(sigma*b))))),2);\n", + "print ('(b)for Redlich/Kwong equation')\n", + "print 'Pressure is ',P,'bar'\n", + "\n", + "#(c)\n", + "#A generalized Correlation\n", + "Z0 = 0.887;\t\t\t#from Table E.3 and E.4\n", + "Z1 = 0.258;\t\t\t#from Table E.3 and E.4\n", + "w = 0.012;\n", + "Z = Z0+(w*Z1);\n", + "P = round(Z*R*T/V,1);\t\t\t#bar\n", + "print ('(c)A generalized Correlation')\n", + "print 'Pressure is ',P,'bar'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)By Ideal-gas equation\n", + "Pressure is 214.9 bar\n", + "(b)for Redlich/Kwong equation\n", + "Pressure is 189.73 bar\n", + "(c)A generalized Correlation\n", + "Pressure is 191.3 bar\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "T = 338.15;\t\t\t#Temp = 338.15K(65`C)\n", + "Vt = 0.03;\t\t\t#Volume = 0.03m**3\n", + "R = 0.08314;\n", + "m = 0.5;\t\t\t#mass in Kg\n", + "M = 17.02;\t\t\t#Molecular Mass\n", + "V = Vt/(m/M);\t\t\t# n = m/M(moles)\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#By Ideal-gas equation,\n", + "P = round(R*T/V,2);\t\t\t#in bar\n", + "print ('(a)By Ideal-gas equation')\n", + "print 'Pressure is ',P,'bar'\n", + "\n", + "#(b)\n", + "#A generalized correlation\n", + "Tc = 405.7;\t\t\t#App B\n", + "Tr = T/Tc;\n", + "Pc = 112.8;\t\t\t#App B\n", + "B0 = 0.083-(0.422/(Tr**1.6));\t\t\t#Eqn (3.61)\n", + "B1 = 0.139-(0.172/(Tr**4.2));\t\t\t#Eqn (3.62)\n", + "#Substituting in eq(3.59)\n", + "w = 0.253;\n", + "K = B0+(w*B1);\t\t\t#K = BPc/RTc\n", + "B = K*R*Tc/Pc;\t\t\t#m**3 kmol**-1\n", + "#solving eq.(3.37)\n", + "P = round(R*T/(V-B),2);\n", + "print ('(b)A generalized Correlation')\n", + "print 'Pressure is ',P,'bar'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)By Ideal-gas equation\n", + "Pressure is 27.53 bar\n", + "(b)A generalized Correlation\n", + "Pressure is 23.77 bar\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "# Variables\n", + "T = 310;\t\t\t#Temp = 310K(36.85`C)\n", + "M = 17.02;\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#saturated liquid\n", + "Tc = 405.7;\t\t\t#App B\n", + "Vc = 0.07247;\t\t\t#App B\n", + "Zc = 0.242;\t\t\t#App B\n", + "Vsat = round(Vc*(Zc**((1-Tr)**0.2857)),5);\t\t\t#m**3kmol**-1\n", + "rho = round(M/Vsat,2);\n", + "print ('(a)Saturated liquid')\n", + "print 'Volume is ',Vsat,'m**3/kmol'\n", + "print 'Density is ',rho,'kmol/m**3'\n", + "\n", + "#(b)\n", + "#Liquid at 100bar\n", + "P = 100.;\t\t\t#Pressure = 100bar\n", + "Pc = 112.8;\t\t\t#App B\n", + "Pr = P/Pc;\n", + "rho_r = 2.38;\t\t\t#From Graph\n", + "V = Vc/rho_r;\n", + "#but this Gives large error\n", + "rho_r1 = 2.34;\n", + "V_new = round(V*rho_r1/rho_r,5);\n", + "#In excepmath.tance with Experimental Value\n", + "\n", + "rho = round(M/V_new,2);\n", + "print ('(b)For Liquid at 100bar')\n", + "print 'Volume is ',V_new,'m**3/kmol'\n", + "print 'Density is ',rho,'kmol/m**3'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Saturated liquid\n", + "Volume is 0.03097 m**3/kmol\n", + "Density is 549.56 kmol/m**3\n", + "(b)For Liquid at 100bar\n", + "Volume is 0.02994 m**3/kmol\n", + "Density is 568.47 kmol/m**3\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch4.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch4.ipynb new file mode 100755 index 00000000..bcf5d3d8 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch4.ipynb @@ -0,0 +1,441 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9f4189fd8ee1816a24aa6bb4e2adeca01a57d97ddb4f94ebb7e3ae541ddf1d49" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Heat Effects" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 page no : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "def ICPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))*(T-T0)\n", + "\n", + "\n", + "# Variables for methane\n", + "R = 8.314;\n", + "T0 = 533.15;\n", + "T = 873.15;\n", + "A = 1.702;\n", + "B = 9.081*(10**-3);\n", + "C = -2.164*(10**-6);\n", + "D = 0;\n", + "\n", + "# Calculations\n", + "Q = round(R*ICPH(T0,T,A,B,C,D),0);\n", + "\n", + "# Results\n", + "print 'Heat Required',Q,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat Required 19778.0 J\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 page no : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "\n", + "# Variables for Ammonia\n", + "R = 8.314;\n", + "T0 = 533.15;\n", + "A = 3.578;\n", + "B = 3.020*(10**-3);\n", + "C = 0;\n", + "D = -0.186*(10**5);\n", + "Q = 422*(10**3);\n", + "n = 11.3;\n", + "del_H = Q/n;\n", + "\n", + "# Calculations\n", + "i = -1;\n", + "a = (T0);\t\t\t#Initial\n", + "while (i == -1):\n", + " b = R*MCPH(T0,a,A,B,C,D);\n", + " c = b*(a-T0);\n", + " flag = del_H-c;\n", + " if(flag <= 100):\n", + " T = a-1;\n", + " i = 1;\n", + " else:\n", + " a = a+1; \n", + " i = -1;\n", + "\n", + "# Results\n", + "print 'Temperature Required(Approx)',T,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature Required(Approx) 1250.15 K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 page no : 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "del_H1 = 2257.;\t\t\t#latent Heat of Vapourisation of water at 373.15K(100`C)[KJ/Kg]\n", + "Tr1 = 373.15/647.1;\n", + "Tr2 = 573.15/647.1;\n", + "\n", + "# Calculations\n", + "del_H2 = round(del_H1*((1-Tr2)/(1-Tr1))**0.38,0);\t\t\t#KJ/Kg\n", + "\n", + "# Results\n", + "print 'latent Heat at 573.15K',del_H2,'KJ/Kg'\n", + "print ('Note: The Value as given in steam tables at 573.15K is 1406 KJ/Kg')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "latent Heat at 573.15K 1372.0 KJ/Kg\n", + "Note: The Value as given in steam tables at 573.15K is 1406 KJ/Kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page no : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "#4HCL + O2 --> 2H2O + 2Cl2\n", + "del_H_HCL = -92.307;\t\t\t#KJ Heat Of Formation\n", + "del_H_H2O = -241.818;\t\t\t#KJ\n", + "\n", + "# Calculations\n", + "#4HCL --> 2H2 + 2Cl2\n", + "del_H_298_HCL = 4*(-1)*del_H_HCL;\n", + "#2H2 + O2 --> 2H2O\n", + "del_H_298_H2O = 2*del_H_H2O;\n", + "#Final\n", + "del_H_298 = del_H_298_HCL+del_H_298_H2O;\n", + "\n", + "# Results\n", + "print 'Standard Heat',del_H_298,'KJ'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard Heat -114.408 KJ\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page no : 65\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import array\n", + "\n", + "\n", + "\n", + "def IDCPH(T0,T,dA,dB,dC,dD):\n", + " t = T/T0;\n", + " return (dA+((dB/2)*T0*(t+1))+((dC/3)*T0*T0*((t**2)+t+1))+(dD/(t*T0*T0)))*(T-T0)\n", + "\n", + "\n", + "# Variables\n", + "#Methanol Synthesis @ 1073.15K(800`C)\n", + "#CO + 2H2 --> CH3OH\n", + "del_H_CO = -110.525\t\t\t#@298K from Table C.4\n", + "del_H_CH3OH_g = -200.660;\t\t\t#@298K from Table C.4\n", + "del_H_298 = ((1)*del_H_CH3OH_g)-((1)*del_H_CO);\t\t\t#KJ/mol\n", + "T0 = 298.15;\n", + "T = 1073.15;\n", + "R = 8.314;\n", + "#Moles (CH3OH,CO,H2)\n", + "n = array([1,-1,-2]);\n", + "#A..from Table C.1 \n", + "A = array([2.211,3.376,3.249]);\n", + "#B..from Table C.1\n", + "B = (10**-3)*array([12.216,0.557,0.422]);\n", + "#C..from Table C.1\n", + "C = (10**-6)*array([-3.450,0,0]);\n", + "#D..From table C.1\n", + "D = (10**5)*array([0,-0.031,0.083]);\n", + "\n", + "# Calculations\n", + "del_A = 0;\n", + "del_B = 0;\n", + "del_C = 0;\n", + "del_D = 0;\n", + "for i in range(3):\n", + " del_A = del_A+n[i]*A[i];\n", + " del_B = del_B+n[i]*B[i];\n", + " del_C = del_C+n[i]*C[i];\n", + " del_D = del_D+n[i]*D[i];\n", + "\n", + "I = IDCPH(T0,T,del_A,del_B,del_C,del_D);\n", + "del_H = round(del_H_298+(R*I/10**3),3);\n", + "\n", + "# Results\n", + "print 'Standard Heat Of Enthalpy',del_H,'KJ'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard Heat Of Enthalpy -103.566 KJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page no : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import array\n", + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "# Variables\n", + "#Combustion Of methane\n", + "#CH4 + 2O2 --> CO2 + 2H2O\n", + "R = 8.314;\n", + "del_H_CO2 = -393509;\t\t\t#from table C.4\n", + "del_H_O2 = -241818;\t\t\t#from table C.4\n", + "del_H_CH4 = -74520;\t\t\t#from table C.4\n", + "del_H_298 = del_H_CO2+(2*del_H_O2)-del_H_CH4;\n", + "del_Hp = -del_H_298;\n", + "\n", + "# Calculations\n", + "#moles of reacmath.tants\n", + "n_CH4 = 1;\n", + "n_O2 = 2+(0.2*2);\t\t\t#20% Excess\n", + "n_N2 = n_O2*(79./21);\n", + "#Moles Of Products..(CO2,H2O,O2,N2)\n", + "np = array([1,2,0.4,9.03]);\n", + "#A..from Table C.1 \n", + "A = array([5.457,3.470,3.639,3.280]);\n", + "#B..from Table C.1\n", + "B = (10**-3)*array([1.045,1.450,0.506,0.593]);\n", + "#C..from Table C.1\n", + "C = (10**-6)*array([0,0,0,0]);\n", + "#D..From table C.1\n", + "D = (10**5)*array([-1.157,0.121,-0.227,0.040]);\n", + "\n", + "E_A = 0;\n", + "E_B = 0;\n", + "E_C = 0;\n", + "E_D = 0;\n", + "for i in range(4):\n", + " E_A = E_A+np[i]*A[i];\n", + " E_B = E_B+np[i]*B[i];\n", + " E_C = E_C+np[i]*C[i];\n", + " E_D = E_D+np[i]*D[i];\n", + "\n", + "T0 = 298.15;\n", + "a = (T0);\t\t\t#Initial\n", + "i = -1\n", + "while (i == -1):\n", + " b = R*MCPH(T0,a,E_A,E_B,E_C,E_D);\n", + " c = b*(a-T0);\n", + " flag = del_Hp-c;\n", + " if(flag <= 100):\n", + " T = a-1;\n", + " i = 1;\n", + " else:\n", + " a = a+1; \n", + " i = -1;\n", + "\n", + "# Results\n", + "print 'Temperature Required(Approx)',T,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature Required(Approx) 2065.15 K\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 4.8 page no : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "#CH4 + H2O --> CO + 3H2 (A)\n", + "#CH4 + 2H2O --> CO2 + 4H2 (B)\n", + "del_H_A = 205813.\t\t\t#J\n", + "del_H_B = 164647.\t\t\t#J\n", + "#0.87 mol of CH4 for (A) (1-0.87)mol of CH4 for (B)\n", + "del_H_298 = (0.87*del_H_A)+(0.13*del_H_B);\n", + "R = 8.314;\n", + "T0 = 298.15;\n", + "T_A = 600.; \t\t\t#Cooled\n", + "T_B = 1300.;\t\t\t#Heated\n", + "\n", + "# Calculations\n", + "#Moles of reactants (CH4,H2O)\n", + "nr = [1,2];\n", + "#Moles of Products (CO,H2,CO2,H2O)\n", + "np = [0.87,3.13,0.13,0.87];\n", + "#For Reacmath.tants\n", + "#for CH4\n", + "I1 = MCPH(T0,T_A,1.702,9.081*(10**-3),-2.164*(10**-6),0);\n", + "#For H2O\n", + "I2 = MCPH(T0,T_A,3.470,1.450*(10**-3),0,0.121*(10**5));\n", + "del_Hr = R*((nr[0]*I1)+(nr[1]*I2))*(T0-T_A);\t\t\t#J\n", + "#For Products\n", + "#for CO\n", + "I1 = MCPH(T0,T_B,3.376,0.557*(10**-3),0,-0.031*(10**5));\n", + "#For H2\n", + "I2 = MCPH(T0,T_B,3.249,0.422*(10**-3),0,0.083*(10**5));\n", + "#for CO2\n", + "I3 = MCPH(T0,T_B,5.457,1.045*(10**-3),0,-1.157*(10**5));\n", + "#For H2O\n", + "I4 = MCPH(T0,T_B,3.470,1.450*(10**-3),0,0.121*(10**5));\n", + "del_Hp = R*((np[0]*I1)+(np[1]*I2)+(np[2]*I3)+(np[3]*I4))*(T_B-T0);\t\t\t#J\n", + "#del_H\n", + "del_H = del_H_298+del_Hr+del_Hp;\n", + "Q = round(del_H,-1);\n", + "\n", + "# Results\n", + "print 'Heat Required',Q,'J'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat Required 328010.0 J\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch5.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch5.ipynb new file mode 100755 index 00000000..a5061a99 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch5.ipynb @@ -0,0 +1,541 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:024b9d7771bbe4628d74b363d14eba14271b9f516fb30061a6ffe76236d4e63e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : The second law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 page no : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Tc = 295.;\t\t\t#K\n", + "Th = 585.;\t\t\t#K\n", + "W = 800000.;\t\t\t#KW\n", + "\n", + "# Calculations\n", + "n_max = 1-(Tc/Th);\n", + "n = round(0.7*n_max,3)\n", + "Qc = round(((1-n)/n)*W,-2);\n", + "\n", + "# Results\n", + "print 'Heat required',Qc,'KW'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat required 1505500.0 KW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 page no : 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def MCPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A)+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*((t-1)/math.log(t)))\n", + "\n", + "\n", + "# Variables\n", + "P2 = 1.;\t\t\t#bar\n", + "P1 = 5.;\t\t\t#bar\n", + "T0 = 550.;\t\t\t#K\n", + "A = 1.702;\n", + "B = 9.081*(10**-3);\n", + "C = -2.164*(10**-6);\n", + "D = 0;\n", + "\n", + "#Equation to be used\n", + "#(s/R)ln(T2/T1) = ln(P2/P1) math.since del_S = 0\n", + "#let I = (s/R)\n", + "\n", + "# Calculations\n", + "a = T0-1;\t\t\t#Initial\n", + "i = -1;\n", + "while (i == -1):\n", + " b = MCPS(T0,a,A,B,C,D);\n", + " c = (math.log(1./5))/(math.log(a/T0));\n", + " flag = c-b;\n", + " if(flag <= 0.0001):\n", + " T = a;\n", + " i = 1;\n", + " else:\n", + " a = a-.01; \n", + " i = -1;\n", + "\n", + "# Results\n", + "print 'Final Temperature',T,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Temperature 411.33 K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 page no : 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "# Variables\n", + "\n", + "#For Casting\n", + "Cp_Casting = 0.5;\t\t\t#[KJ/Kg/K]\n", + "T1 = 723.15 \t \t\t#[K]\n", + "T0 = 298.15\t \t \t#[K]\n", + "M_Casting = 40.\t\t\t #[Kg]\n", + "#For Oil\n", + "Cp_Oil = 2.5 \t\t\t#[KJ/Kg/K]\n", + "M_Oil = 150.\t \t\t#[Kg]\n", + "\n", + "# Calculations and Results\n", + "T = ((T1*M_Casting*Cp_Casting)+(T0*M_Oil*Cp_Oil))/((M_Casting*Cp_Casting)+(M_Oil*Cp_Oil));\n", + "\n", + "#(a)-change in entropy For casting\n", + "def f1(T): \n", + " return 1./T\n", + "\n", + "del_S_Casting = round(M_Casting*Cp_Casting* quad(f1,T1,T)[0],2)\n", + "\n", + "print '(a)Change In Entropy of Casting',del_S_Casting,'KJ/K'\n", + "\n", + "#(b)-change in entropy For Oil\n", + "def f2(T): \n", + " return 1./T\n", + "\n", + "del_S_Oil = round(M_Oil*Cp_Oil* quad(f2,T0,T)[0],2)\n", + "\n", + "print '(b)Change In Entropy of Oil',del_S_Oil,'KJ/K'\n", + "\n", + "#(c)-Total\n", + "del_S_total = del_S_Casting+del_S_Oil;\n", + "print '(c)Total entropy change',del_S_total,'KJ/K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Change In Entropy of Casting -16.33 KJ/K\n", + "(b)Change In Entropy of Oil 26.13 KJ/K\n", + "(c)Total entropy change 9.8 KJ/K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 page no : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "\n", + "#Gas A\n", + "rn_A = 1.;\t\t\t#rate[mol/s]\n", + "T_A = 600.;\t\t\t#[K]\n", + "\n", + "#Gas B\n", + "rn_B = 2.;\t\t\t#rate[mol/s]\n", + "T_B = 450.;\t\t\t#[K]\n", + "\n", + "#product\n", + "rn = rn_A+rn_B;\t\t\t#[mol/s]\n", + "T = 400.;\t\t\t#[K]\n", + "R = 8.314;\n", + "Cp = (7./2)*R;\n", + "T_s = 300.;\t\t\t#Temperature[K]\n", + "\n", + "# Calculations\n", + "#By equation (2.30) rQ = rn*H-rn_A*H_A-rn_B*H_B = rn_A(H-H_A)+rn_B*(H-H_B) Rate of heat transfer\n", + "rQ = (rn_A*Cp*(T-T_A))+(rn_B*Cp*(T-T_B));\t\t\t#[J/s] or [W]\n", + "#By eqn (5.22) rSg = rn*S-(rn_A*S_A)-(rn_B*S_B)-(rQ/T_s) rate of entropy generation for the process\n", + "rSg = round((rn_A*Cp*math.log(T/T_A))+(rn_B*Cp*math.log(T/T_B))-(rQ/T_s),3);\t\t\t#[J/K/s]\n", + "\n", + "# Results\n", + "print 'Rate of heat transfer',rQ,'J/s or W'\n", + "print 'Rate of entropy generation',rSg,'J/K/s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat transfer -8729.7 J/s or W\n", + "Rate of entropy generation 10.446 J/K/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 page no : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Saturated Steam\n", + "#At T = 373.15K \n", + "H1 = 2676.\t \t\t#[KJ/Kg] from Steam table(App F)\n", + "S1 = 7.3554\t\t \t#[KJ/Kg/K] from steam table(App F)\n", + "#At T = 273.15K Liquid water\n", + "H2 = 0;\n", + "S2 = 0;\n", + "\n", + "T_sigma = 273.15;\t\t\t#[K]\n", + "T_r = 473.15;\t\t \t#[K]\n", + "Q_r = -2000.;\t\t\t #[KJ]\n", + "\n", + "del_H = H2-H1;\n", + "Q = del_H;\n", + "Q_sigma = Q-Q_r;\n", + "\n", + "# Calculations and Results\n", + "del_S = S2-S1;\n", + "#For Heat Reservoir at 473.15K\n", + "del_St_T_r = (-Q_r/T_r);\t\t\t#[KJ/K]\n", + "#For Heat reservoir provided by cooling water at 273.15K\n", + "del_St_T_sigma = -Q_sigma/T_sigma;\n", + "del_S_total = del_S+del_St_T_r+del_St_T_sigma;\n", + "print ('Since del_S_total<0 Process not feasible')\n", + "\n", + "#Actual\n", + "Q_r = round((T_r/(T_r-T_sigma))*(del_H-(T_sigma*del_S)),1);\n", + "print 'Actual Heat transfer',Q_r,'KJ/Kg'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since del_S_total<0 Process not feasible\n", + "Actual Heat transfer -1577.7 KJ/Kg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 page no : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def ICPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))*(T-T0)\n", + "\n", + "def ICPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return ((A)*math.log(t))+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "\n", + "# Variables\n", + "P1 = 50.\t\t\t#bar\n", + "P2 = 1.013\t\t\t#bar\n", + "T1 = 800.\t\t\t#[K]\n", + "T2 = 300.\t\t\t#[K]\n", + "R = 8.314\n", + "\n", + "# Calculations\n", + "#del_H = intergral(CpdT) in the limits T1 and T2\n", + "A = 3.280;\n", + "B = 0.593*(10**-3);\n", + "C = 0;\n", + "D = 0.040*(10**5);\n", + "del_H = R*ICPH(T1,T2,A,B,C,D);\t\t\t#[J/mol]\n", + "\n", + "#del_S = integral[Cp(dT/T)] -Rln(P2/P1) btw the limits T1,T2\n", + "del_S = (R*ICPS(T1,T2,A,B,C,D))-(R*math.log(P2/P1));\t\t\t#[J/mol/K]\n", + "W_ideal = round(del_H-(T2*del_S),0);\t\t\t#[J/mol]\n", + "\n", + "# Results\n", + "print 'Maximum Work',W_ideal,'J/mol'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Work -15974.0 J/mol\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 page no : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "#Saturated Steam\n", + "#At T = 373.15K \n", + "H1 = 2676.;\t\t\t#[KJ/Kg] from Steam table(App F)\n", + "S1 = 7.3554;\t\t\t#[KJ/Kg/K] from steam table(App F)\n", + "#At T = 273.15K Liquid water\n", + "H2 = 0;\n", + "S2 = 0;\n", + "\n", + "T_sigma = 273.15;\t\t\t#[K]\n", + "T_r = 473.15;\t\t\t#[K]\n", + "\n", + "# Calculations\n", + "del_H = H2-H1;\n", + "del_S = S2-S1;\n", + "W_ideal = del_H-(T_sigma*del_S);\t\t\t#[KJ/Kg]\n", + "Q = round(abs(W_ideal*(T_r/(T_sigma-T_r))),1);\t\t\t#[KJ]\n", + "\n", + "# Results\n", + "print 'Maximum Possible Work',Q,'KJ'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Possible Work 1577.7 KJ\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 page no : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "\n", + "import math \n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "\n", + "\n", + "# Variables\n", + "T_H1 = 400.;\t\t\t#[K]\n", + "T_H2 = 350.;\t\t\t#[K]\n", + "T_C1 = 300.;\t\t\t#[K]\n", + "T_sigma = 300.;\t\t\t#[K]\n", + "rn_H = 1.;\t\t\t#[mol/s]\n", + "R = 8.314;\n", + "Cp = (7./2)*R;\n", + "\n", + "T_C2_a = T_H2-10;\n", + "T_C2_b = T_H1-10;\n", + "\n", + "# Calculations and Results\n", + "\n", + "X = [0,1];\n", + "Y = [T_C1,T_C2_a];\n", + "plot(X,Y);\n", + "Y = [T_H1,T_H2];\n", + "plot(X,Y);\n", + "\n", + "X = [1,1];\n", + "Y = [290,410];\n", + "plot(X,Y);\n", + "X = [0,0.25];\n", + "Y = [T_C1,T_C1];\n", + "plot(X,Y,'--');\n", + "Y = [T_H1,T_H1];\n", + "plot(X,Y,'--');\n", + "X = [0.75,1];\n", + "Y = [T_C2_a,T_C2_a];\n", + "plot(X,Y,'--');\n", + "Y = [T_H2,T_H2];\n", + "plot(X,Y,'--');\n", + "suptitle(\"(a)Case 1,Cocurrent\")\n", + "xlabel(\"Qc\")\n", + "ylabel(\"T\");\n", + "\n", + "X = [0,1];\n", + "Y = [T_C1,T_C2_b];\n", + "plot(X,Y);\n", + "Y = [T_H2,T_H1];\n", + "plot(X,Y);\n", + "X = [1,1];\n", + "Y = [290,410];\n", + "plot(X,Y);\n", + "X = [0,0.25];\n", + "Y = [T_C1,T_C1];\n", + "plot(X,Y,'--');\n", + "Y = [T_H2,T_H2];\n", + "plot(X,Y,'--');\n", + "X = [0.75,1];\n", + "Y = [T_C2_b,T_C2_b];\n", + "plot(X,Y,'--');\n", + "Y = [T_H1,T_H1];\n", + "plot(X,Y,'--');\n", + "suptitle(\"(b)Case 2,Countercurrent\")\n", + "xlabel(\"Qc\")\n", + "ylabel(\"T\");\n", + "\n", + "#Solution\n", + "#Equation to be used\n", + "#(rn_H*Cp(T_H2-T_H1))+(rn_C*Cp(T_C2-T_C1)) = 0 Eq(A)\n", + "#del_rS = rn_H*Cp*(ln(T_H2/T_H1)+kln(T_C2/T_C1)) k = rn_C/rn_H r-->Rate Eqn(B)\n", + "#rW_lost = T_sigma*del_rS Eqn(C)\n", + "\n", + "#(a)-Cocurrent\n", + "#by Eqn(A)\n", + "T_C2_a = T_H2-10;\n", + "k = (T_H1-T_H2)/(T_C2_a-T_C1);\t\t\t#k = rn_C/rn_H\n", + "#By Eqn(B)\n", + "del_rS = round(rn_H*Cp*(math.log(T_H2/T_H1)+(k*math.log(T_C2_a/T_C1))),3);\t\t\t#[J/K/s]\n", + "#By Eqn(C)\n", + "rW_lost = round(T_sigma*del_rS,1);\t\t\t#[J/s]or[W]\n", + "print ('(a)-Cocurrent')\n", + "print 'Rate Of change of entropy',del_rS,'J/K/s'\n", + "print 'Lost Work',rW_lost,'J/s or W'\n", + "\n", + "#(b)-Countercurrent\n", + "T_C2_b = T_H1-10;\n", + "k = (T_H1-T_H2)/(T_C2_b-T_C1);\t\t\t#k = rn_C/rn_H\n", + "#By Eqn(B)\n", + "del_rS = round(rn_H*Cp*(math.log(T_H2/T_H1)+(k*math.log(T_C2_b/T_C1))),3);\t\t\t#[J/K/s]\n", + "#By Eqn(C)\n", + "rW_lost = round(T_sigma*del_rS,1);\t\t\t#[J/s]or[W]\n", + "print ('(b)-Countercurrent')\n", + "print 'Rate Of change of entropy',del_rS,'J/K/s'\n", + "print 'Lost Work',rW_lost,'J/s or W'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)-Cocurrent\n", + "Rate Of change of entropy 0.667 J/K/s\n", + "Lost Work 200.1 J/s or W\n", + "(b)-Countercurrent\n", + "Rate Of change of entropy 0.356 J/K/s\n", + "Lost Work 106.8 J/s or W\n" + ] + }, + { + "metadata": {}, + "output_type": "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1ti3GAL8m7Ct+T2jq\nZ9GthL7Le4SZ5Gyad78pSZIkSZIkSZIkSZIkSZIkSareeGAe8CzhmPOrCJfBkCQ1uRbCCYtfih4P\nIpzQeFndRiRJSo1jgQdKnns/4TpJI4EfEs7qfRz4erJDk2orrRf4k9LsQOCRkuf+CKwhXAZhEuFC\neh3AbskOTaqttH6fhJRm5S6t3EK4VtSPCQEB2b0ir5qEISH13XLCJcmL7UJoZq8nu99hIUmq0m8p\nfNPbYMJ3efwD4Wqbt0fPgeUmSWpKxYfAvgn8gnAI7GDgCsLluR8Dzq7XACVJ6fAx4EkqfwGSJEmS\nJEmSJEmSJEmSJEmSJEmSpDr6/2Z5InGc+tUIAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch6.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch6.ipynb new file mode 100755 index 00000000..f06070dc --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch6.ipynb @@ -0,0 +1,577 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e0e4f9e9f71c0b9c27ff466af371f22ff85ee7343ea614fcc4b711918abfbe66" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Thermodynamics Properties of Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 page no : 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "\n", + "#At Temp T1 = 298.15K\n", + "T1 = 298.15;\t\t\t#[K]\n", + "P1 = 1.;\t \t\t#[bar]\n", + "P2 = 1000.;\t\t \t#[bar]\n", + "Cp_T1 = 75.305;\t\t\t#[KJ Kmol/K]\n", + "V1_T1 = 18.071*10**-3;\t\t\t#[m**3/Kmol]\n", + "V2_T1 = 18.012*10**-3;\t\t\t#[m**3/Kmol]\n", + "beta1_T1 = 256.*10**-6;\t\t\t#[1/K]\n", + "beta2_T1 = 366.*10**-6;\t\t\t#[1/K]\n", + "\n", + "#At Temp T2 = 323.15K\n", + "T2 = 323.15;\t\t\t#[K]\n", + "P1 = 1.;\t\t\t#[bar]\n", + "P2 = 1000.;\t\t\t#[bar]\n", + "Cp_T2 = 75.314;\t\t\t#[KJ Kmol/K]\n", + "V1_T2 = 18.234*10**-3;\t\t\t#[m**3/Kmol]\n", + "V2_T2 = 18.174*10**-3;\t\t\t#[m**3/Kmol]\n", + "beta1_T2 = 458.*10**-6;\t\t\t#[1/K]\n", + "beta2_T2 = 568.*10**-6;\t\t\t#[1/K]\n", + "\n", + "#Solution\n", + "\n", + "#Formula to be used\n", + "#Eqn (6.28) del_H = ((Cp)(T2-T1))-((V)(1-(beta)(T2)(P2-P1))\n", + "#Eqn (6.29) del_S = ((Cp)ln(T2/T1)-((beta)(V)(P2-P1))\n", + "\n", + "#For P = 1\n", + "Cp = (Cp_T1+Cp_T2)/2;\n", + "#For T = 323.15K\n", + "V = (V1_T2+V2_T2)/2;\n", + "beta_T = (beta1_T2+beta2_T2)/2;\n", + "\n", + "del_H = round((Cp*(T2-T1))+(V*(1-(beta_T*T2))*(P2-P1)*10**5*10**-3),0);\n", + "del_S = round((Cp*(math.log(T2/T1)))-(beta_T*V*(P2-P1)*10**5*10**-3),2);\n", + "\n", + "print 'Change In Enthalpy',del_H,'KJ/Kmol'\n", + "print 'Change In Entropy',del_S,'KJ/Kmol/K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change In Enthalpy 3400.0 KJ/Kmol\n", + "Change In Entropy 5.13 KJ/Kmol/K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 page no : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "from numpy import array\n", + "\n", + "def ICPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return ((A)*math.log(t))+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "def ICPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))*(T-T0)\n", + "\n", + "# Variables\n", + "T0 = 300.;\t\t\t#[K]\n", + "T = 360.;\t\t\t#[K]\n", + "R = 8.314;\n", + "P = 15.14;\t\t\t#[bar]\n", + "A = 1.7765;\n", + "B = 33.037*10**-3;\n", + "C = 0;\n", + "D = 0;\n", + "H0 = 18115.; \t\t\t#J/mol\n", + "S0 = 295.976;\t\t\t#J/mol/K\n", + "\n", + "#Graph\n", + "X = array([0,0.10,0.50,2,4,6,8,10,12,14,15.41]);\n", + "Y1 = array([1.780,1.700,1.514,1.293,1.290,1.395,1.560,1.777,2.073,2.432,2.720]);\t\t\t#[(dZ/dT)p/P]\n", + "Y2 = array([2.590,2.470,2.186,1.759,1.591,1.544,1.552,1.592,1.658,1.750,1.835]);\t\t\t#[-(Z-1)/P]\n", + "plot(Y1,X);\n", + "suptitle(\"(a)\")\n", + "xlabel(\"P(bar)\")\n", + "ylabel(\"[(dZ/dT)p/P]X10**4(K**-1 bar**-1)\");\n", + "plot(Y2,X);\n", + "suptitle(\"(b)\")\n", + "xlabel(\"P(bar)\")\n", + "ylabel(\"[-(Z-1)/P]X10**2(bar**-1)\");\n", + "\n", + "\n", + "#Area Under the Curve (a)\n", + "Y1 = Y1*10**-4;\n", + "A1 = 0;\n", + "for i in range(1,11):\n", + " A1 = A1+((X[i-1]-X[i])*Y1[i]);\n", + "\n", + "print 'Area under the graph(a)',A1*10000,'(X 10**-4) K**-1'\n", + "#Area Under the Curve (b)\n", + "Y2 = Y2*10**-2;\n", + "A2 = 0;\n", + "for i in range(1,11):\n", + " A2 = A2+((X[i-1]-X[i])*Y2[i]);\n", + "\n", + "print 'Area under the graph(b)',round(A2,4)\n", + "\n", + "\n", + "K = A1*T;\t\t\t#Hr/RT\n", + "#From Eqn(6.47)\n", + "Hr = R*T*(K);\t\t\t#[J/mol]\n", + "#From Eqn(6.48)\n", + "Sr = R*(K-(A2));\t\t\t#[J/mol/K]\n", + "\n", + "#From Eqn(6.49) and Eqn(6.50)\n", + "H1 = R*ICPH(T0,T,A,B,C,D);\n", + "S1 = R*ICPS(T0,T,A,B,C,D);\n", + "\n", + "H = H0+H1+Hr;\n", + "S = round(S0+S1+Sr-(R*math.log(P)),3);\n", + "\n", + "print 'Enthalpy',H,'J/mol'\n", + "print 'Entropy',S,'J/mol/K'\n", + "print ('Note: The Answer is different with that of the Book because the Method Used\\\n", + " to find the Area under the Graph is done by finding the area of small Rectangles')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Area under the graph(a) -27.6043 (X 10**-4) K**-1\n", + "Area under the graph(b) -0.2572\n", + "Enthalpy 21465.2998298 J/mol\n", + "Entropy 286.433 J/mol/K\n", + "Note: The Answer is different with that of the Book because the Method Used to find the Area under the Graph is done by finding the area of small Rectangles\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEhCAYAAABycqfJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VFX+//FXKKGFIh1poXcFRToy0gRpIiiIIqwu1rXr\nb9WvK7iLZQURBRQU0SAgKoIIC4KIUUJHqn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QToewWcF3kAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 page no : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T = 500.;\t\t\t#[K]\n", + "R = 8.314;\n", + "Tc = 425.1;\t\t\t#[K]\n", + "P = 50.;\t\t\t#[bar]\n", + "Pc = 37.96;\t\t\t#[bar]\n", + "omega = 0.08664;\n", + "si = 0.4636;\n", + "Tr = T/Tc;\n", + "Pr = P/Pc;\n", + "alpha_Tr = Tr**(-0.5);\t\t\t#a(Tr)\n", + "#Using Eqn(3.50)\n", + "Beta = omega*(Pr/Tr);\n", + "#Using Eqn(3.51)\n", + "q = si*alpha_Tr/(omega*(Tr**1.5));\n", + "\n", + "#using eqn(3.49)\n", + "#Z = 1+beta-q*beta*((Z-beta)/((Z+(epsilon*beta))*(Z+(sigma*beta)))\n", + "\n", + "#calculation of Z\n", + "Z = 1;\t\t\t#Initial\n", + "a = Z;\n", + "for i in range(11):\n", + " b = 1+Beta-(q*Beta*((a-Beta)/(a*(a+Beta))));\n", + " if((b-a) == 0.0001):\n", + " break;\n", + " a = b;\n", + " i = i+1;\n", + "\n", + "Z = round(b,3)\n", + "\n", + "#Umath.sing Eqn(6.64) and eqn(6.65)\n", + "#(Hr/RT) = Z-1+[(d ln(alpha_Tr)/d ln Tr)-1]qI I = ln((Z+beta)/Z) d ln(alpha_Tr)/d ln Tr = -0.5\n", + "#Sr/R) = ln(Z-beta)+[d ln(alpha_Tr)/d ln Tr]qI I = ln((Z+beta)/Z) d ln(alpha_Tr)/d ln Tr = -0.5\n", + "I = math.log((Z+Beta)/Z);\n", + "Hr = round(R*T*(Z-1+((-0.5-1)*q*I)),0);\n", + "Sr = round(R*(math.log(Z-Beta)+(-0.5*q*I)),3);\n", + "\n", + "print ('Using Redlich/Kwong Equation')\n", + "print 'Residual Enthalpy',Hr,'J/mol'\n", + "print 'Residual Entropy',Sr,'J/mol/K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using Redlich/Kwong Equation\n", + "Residual Enthalpy -4504.0 J/mol\n", + "Residual Entropy -6.545 J/mol/K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 page no : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "P1 = 1000.;\t\t\t#[KPa]\n", + "T = 533.15;\t\t\t#[K]\n", + "P2 = 200.;\t\t\t#[KPa]\n", + "H1 = 2965.2;\t\t\t#[KJ/kg] from Steam tables\n", + "S1 = 6.9680;\t\t\t#[KJ/Kg/K] From steam tables\n", + "S2 = S1;\n", + "S_l = 1.5301;\t\t\t#[KJ/Kg/K] Entropy Of Saturated Liquid @ 200KPa\n", + "S_v = 7.1268;\t\t\t#[KJ/Kg/K] Entropy Of Saturated vapor @ 200KPa\n", + "H_l = 504.7;\t\t\t#[KJ/Kg] Enthalpy Of saturated liquid @ 200KPa\n", + "H_v = 2706.7;\t\t\t#[KJ/Kg] Enthalpy Of saturated vapor @ 200KPa\n", + "\n", + "# Calculations\n", + "#find x_v from the eqn S = (1-x_v)S_l+x_c*S_v\n", + "x_v = round((S1-S_l)/(S_v-S_l),4);\n", + "\n", + "#From Eqn(6.73a)\n", + "H2 = ((1-x_v)*H_l)+(x_v*H_v);\n", + "del_H = round(H2-H1,0);\t\t\t#[KJ/Kg]\n", + "\n", + "# Results\n", + "print 'Percent vapor',x_v*100,'%'\n", + "print 'Percent Liquid',(1-x_v)*100,'%'\n", + "print 'Change In Enthalpy',del_H,'KJ/Kg'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percent vapor 97.16 %\n", + "Percent Liquid 2.84 %\n", + "Change In Enthalpy -321.0 KJ/Kg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 page no : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "\n", + "# Variables(from steam tables)\n", + "H = 293.;\t\t\t#[KJ/Kg] at 343.15K\n", + "H_liquid = 419.1;\t\t\t#[KJ/Kg] at 373.15K\n", + "H_vapor = 2676;\t\t\t#[KJ/Kg] at 373.15K\n", + "V_vapor = 1.5;\t\t\t#[m**3]\n", + "m1_liquid = 500.;\t\t\t#[Kg]\n", + "rho_liquid = 0.001044;\t\t\t#[m**3/Kg]\n", + "rho_vapor = 1.673;\t\t\t#[m**3/Kg]\n", + "del_m = 750.;\t\t\t#[Kg]\n", + "\n", + "# Calculations\n", + "#using the eqn Q = (m2H2)math.tank-(m1H1)math.tank-(H*del_m)math.tank\n", + "m1_vapor = (V_vapor-(m1_liquid*rho_liquid))/rho_vapor;\n", + "#Term2 = ((m1H1)math.tank\n", + "Term2 = (m1_liquid*H_liquid)+(m1_vapor*H_vapor);\n", + "mT = m1_liquid+del_m+m1_vapor;\n", + "#Solving Eqn By matrix Method\n", + "#m_vapor+m_liquid = mT and (rho_vapor*m_vapor)+(rho_liquid*rho_vapor) = V_vapor\n", + "A = array([[1,1],[rho_vapor,rho_liquid]]);\n", + "B = array([mT,V_vapor]);\n", + "X = linalg.solve(A,B);\n", + "m2_vapor = X[0]\n", + "m2_liquid = X[1]\n", + "\n", + "Term1 = (m2_liquid*H_liquid)+(m2_vapor*H_vapor);\n", + "Q = round(Term1-Term2-del_m*H,0);\n", + "\n", + "print 'Heat Required',Q,'KJ'\n", + "print ('Note: The Answer Varies With That of The Book because the calculations as \\\n", + " in Book do not give the Answer the Book results')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat Required 93518.0 KJ\n", + "Note: The Answer Varies With That of The Book because the calculations as in Book do not give the Answer the Book results\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 page no : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linalg\n", + "\n", + "\n", + "def SRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " Q = -Pr*(diffr_B0+(omega*diffr_B1));\n", + " return Q\n", + "\n", + "def HRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " H = Pr*(B0-(Tr*diffr_B0)+(omega*(B1-(Tr*diffr_B1))));\n", + " return H\n", + "\n", + "def ICPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return ((A)*math.log(t))+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*(t-1))\n", + "\n", + "def ICPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))*(T-T0)\n", + "\n", + "# Variables(from steam tables)\n", + "Tc = 420.;\t\t\t#[K]\n", + "Pc = 40.43;\t\t\t#[bar]\n", + "omega = 0.191;\n", + "Tn = 266.9;\t\t\t#[K]\n", + "A0 = 1.967;\n", + "B0 = 31.630*10**-3;\n", + "C0 = -9.837*10**-6;\n", + "D0 = 0;\n", + "T1 = 473.15;\t\t\t#[K]\n", + "P = 70.;\t\t\t#[bar]\n", + "R = 8.314;\n", + "#From Table(E.3) And Table(E.4)\n", + "Z0 = 0.485;\n", + "Z1 = 0.142;\n", + "\n", + "Tr = T1/Tc;\n", + "Pr = P/Pc;\n", + "Z = Z0+(omega*Z1);\n", + "V = round((Z*R*T1*10**-2)/P,4);\t\t\t#[m**3/Kmol]\n", + "\n", + "#step(a) vaporization at T1 and P1 = P_saturated\n", + "#umath.sing eqn(6.70) lnP_sat = A-(B/T)\n", + "#Solving eqn ln(1.0133) = A-(B/266.9) and ln(40.43) = A-(B/420)\n", + "a = array([[1,(-1/266.9)],[1,(-1./420)]])\n", + "b = array([math.log(1.0133),math.log(40.43)]);\n", + "x = linalg.solve(a,b)\n", + "A = x[0]\n", + "B = x[1]\n", + "#umath.sing eqn(4.12) del_Hn/RTn = 1.092*(ln Pc-1.013)/(0.930-Tr_n)\n", + "Tr_n = Tn/Tc;\n", + "del_Hn = R*Tn*(1.092*(math.log(Pc)-1.013)/(0.93-Tr_n));\t\t\t#[J/mol]\n", + "T2 = 273.15;\t\t\t#[K]\n", + "Tr = T2/Tc;\n", + "#Umath.sing Eqn(4.13) del_H/del_Hn = ((1-Tr)/(1-Tr_n))**0.38\n", + "del_H_a = del_Hn*((1-Tr)/(1-Tr_n))**0.38;\n", + "del_S_a = round(del_H_a/T2,2);\n", + "\n", + "#Step(b)transition to ideal gas State at(T1,P1)\n", + "P_sat = math.exp(A-(B/273.15));\n", + "Pr = P_sat/Pc;\n", + "Tr = T2/Tc;\n", + "Hr_b = round(R*Tc*HRB(Tr,Pr,omega),0)\t\t\t#[J/mol]\n", + "Sr_b = round(R*SRB(Tr,Pr,omega),2)\t\t\t#[J/mol/K]\n", + "\n", + "#Step(c) Change to (T2,P2) in ideal-gas state\n", + "\n", + "H_c = round(R*ICPH(T2,T1,A0,B0,C0,D0),0);\t\t\t#[J/mol]\n", + "S = R*ICPS(T2,T1,A0,B0,C0,D0);\t\t\t#[J/mol/K]\n", + "del_S_c = round(S-(R*math.log(P/P_sat)),2);\t\t\t#[J/mol/K]\n", + "\n", + "#Step(d) Transition to actual final state at(T2,P2)\n", + "#Umath.sing eqn(6.76) and eqn(6.77)\n", + "#Hr/RTc = Hr0/RTc+(omega*Hr1/RTc)\n", + "#Sr/R = Sr0/R+(omega*Sr1/R) Sr0,Sr1 from Tables(E.5)\n", + "Tr = T1/Tc;\n", + "Pr = P/Pc;\n", + "Hr_d = R*Tc*(-2.294+(omega*-0.713));\n", + "Sr_d = R*(-1.566+(omega*-0.726));\n", + "\n", + "H = round(del_H_a-Hr_b+H_c+Hr_d,0);\n", + "S = round(del_S_a-Sr_b+del_S_c+Sr_d,2);\n", + "U = round(H-(P*V*10**2),0);\n", + "\n", + "print 'Volume(V) = ',V,'m**3/Kmol'\n", + "print 'Internal energy(U) = ',U,'J/mol'\n", + "print 'Enthalpy(H) = ',H,'J/mol'\n", + "print 'Entropy(S) = ',S,'J/mol/K'\n", + "\n", + "print ('Note: The Answer here Slightly Varies with That of Book because of the different approximation')\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume(V) = 0.2878 m**3/Kmol\n", + "Internal energy(U) = 32163.0 J/mol\n", + "Enthalpy(H) = 34178.0 J/mol\n", + "Entropy(S) = 88.55 J/mol/K\n", + "Note: The Answer here Slightly Varies with That of Book because of the different approximation\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 page no : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "T = 450.;\t\t\t#[K]\n", + "P = 140;\t\t\t#[bar]\n", + "\n", + "#pseudo parameters\n", + "Tc1 = 304.2;\t\t\t#[K]\n", + "Tc2 = 369.8;\t\t\t#[K]\n", + "Pc1 = 73.83;\t\t\t#[bar]\n", + "Pc2 = 42.48;\t\t\t#[bar]\n", + "Tpc = (0.5*Tc1)+(0.5*Tc2);\n", + "Ppc = (0.5*Pc1)+(0.5*Pc2);\n", + "\n", + "# Calculations\n", + "Tpr = T/Tpc;\n", + "Ppr = P/Ppc;\n", + "\n", + "Z0 = 0.697;\n", + "Z1 = 0.205;\n", + "\n", + "omega1 = 0.224;\n", + "omega2 = 0.152;\n", + "omega = (0.5*omega1)+(0.5*omega2);\n", + "\n", + "Z = Z0+(omega*Z1);\n", + "\n", + "V = round(Z*R*T*10/P,1);\t\t\t#[cm**3/mol]\n", + "\n", + "#(H/RT)0 = -1.73 (H/RT)1 = -0.169\n", + "H = round(R*Tpc*(-1.73+(omega*-0.169)),0);\t\t\t#[J/mol]\n", + "S = round(R*(-0.967+(omega*-0.330)),2);\t\t\t#[J/mol/K]\n", + "\n", + "# Results\n", + "print 'Volume(V) = ',V,'cm**3/mol'\n", + "print 'Residual Enthaply(H) = ',H,'J/mol'\n", + "print 'Residual Entropy(S) = ',S,'J/mol/K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume(V) = 196.6 cm**3/mol\n", + "Residual Enthaply(H) = -4936.0 J/mol\n", + "Residual Entropy(S) = -8.56 J/mol/K\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch7.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch7.ipynb new file mode 100755 index 00000000..d27937e5 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch7.ipynb @@ -0,0 +1,658 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9e0136426ec7da84bb217f76b3fe21c4c6c81dff9b8c50bbb88af5647e6c4b64" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Applications Of Thermodynamics To Flow Process" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 page no : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import ones,array,sqrt,round\n", + "import math \n", + "\n", + "# Variables\n", + "T = 573.15;\t\t\t#[K]\n", + "P = array([700,600,500,400,300,200]);\t\t\t#[KPa]\n", + "#values for H,V,S for various P from steam tables\n", + "H = array([3059.8,3020.4,2975.71,2923.5,2859.9,2777.35]);\t\t\t#[KJ/Kg]\n", + "V = array([371.39,418.25,481.26,571.23,711.93,970.04]);\t\t\t#[cm**3/g]\n", + "S = 7.29997*ones(6);\t\t\t#[KJ/Kg/K] Isentropic\n", + "u0 = 30.;\t\t\t#[m/s]\n", + "\n", + "# Calculations\n", + "#u**2 = u1**2-2(H-H1)\n", + "u = round(sqrt((u0**2-2*(H-H[0])*10.**3)),1)\n", + "\n", + "#Umath.sing Eq(2.27)\n", + "#A/A1 = u1*V/V1*u;\n", + "c = u[0]/V[0];\n", + "K = round((c*V/u),3);\t\t\t#K = A/A1 c = u1/V1\n", + "\n", + "Ans = [P,V,u,K];\n", + "print ' P/[KPa] V/[cm**3/g] u/[m/s] A/A1 \\n',Ans\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " P/[KPa] V/[cm**3/g] u/[m/s] A/A1 \n", + "[array([700, 600, 500, 400, 300, 200]), array([ 371.39, 418.25, 481.26, 571.23, 711.93, 970.04]), array([ 30. , 282.3, 411.2, 523. , 633. , 752.2]), array([ 1. , 0.12 , 0.095, 0.088, 0.091, 0.104])]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 page no : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T1 = 573.15;\t\t\t#[K]\n", + "R = 8314;\n", + "P1 = 700;\t\t\t#[KPa]\n", + "M = 18.015;\n", + "Gamma = 1.3;\n", + "u0 = 30;\t\t\t#[m/s]\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "#Umath.sing Eqn(7.12)\n", + "#K = P2/P1 = (2/(Gamma+1))**(Gamma/(Gamma-1))\n", + "K = round((2/(Gamma+1))**(Gamma/(Gamma-1)),2);\t\t\t#rounding to 2 decimal places\n", + "\n", + "P1V1 = round(R*T1/M);\t\t\t#m**2/s**2\n", + "#Umath.sing Eqn(7.11)\n", + "#u_throat**2 = u**2+2(Gamma)(P1V1)/(Gamma-1)[1-(P2/P1)**((Gamma-1)/Gamma))]\n", + "u_throat = round(math.sqrt(u0**2+((2*Gamma*P1V1/(Gamma-1))*(1-(K**((Gamma-1)/Gamma))))),2);\n", + "\n", + "print '(a)Critical Pressure ratio(P2/P1)',K\n", + "print ' Velocity at the throat',u_throat,' m/s'\n", + "\n", + "#(b)Mach No 2.0\n", + "u = 2*u_throat;\n", + "K = (1-((u**2-u0**2)*(Gamma-1)/(2*Gamma*P1V1)))**(Gamma/(Gamma-1));\t\t\t#K = P2/P1\n", + "P2 = round(K*P1);\n", + "\n", + "print '(b)Discharge Pressure for Mach Number of 2.0',P2,'KPa'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Critical Pressure ratio(P2/P1) 0.55\n", + " Velocity at the throat 544.35 m/s\n", + "(b)Discharge Pressure for Mach Number of 2.0 30.0 KPa\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 page no : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "def HRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " return Pr*(B0-(Tr*diffr_B0)+(omega*(B1-(Tr*diffr_B1))));\n", + "\n", + "def SRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " return -Pr*(diffr_B0+(omega*diffr_B1));\n", + "\n", + "# Variables\n", + "P1 = 20.;\t\t\t#[bar]\n", + "T = 400.;\t\t\t#[K]\n", + "P2 = 1.;\t\t\t#[bar]\n", + "R = 8.314;\n", + "\n", + "# Calculations\n", + "#using Eq(6.84)\n", + "#del_H = Cp(T2-T1)+Hr2-Hr1 = 0 but Hr2 = 0\n", + "#T2 = Hr1/Cp + T1\n", + "Tc = 369.8;\t\t\t#[K]\n", + "Pc = 42.48;\t\t\t#[bar]\n", + "omega = 0.152;\n", + "a = T;\t\t\t#Initial\n", + "for i in range(2):\n", + " Tr = a/Tc\n", + " Pr = P1/Pc;\n", + " Hr1 = R*Tc*HRB(Tr,Pr,omega);\t\t\t#[J/mol]\n", + " Cp = R*(1.213+(28.785*10**-3*a)-(8.824*10**-6*a*a));\t\t\t#[J/mol/K]\n", + " T2 = (Hr1/Cp)+a;\n", + " Tm = (a+T2)/2;\n", + " i = i+1;\n", + " a = Tm;\n", + "Tm = a;\n", + "T2 = round(Tm)\t\t\t#[K]\n", + "Tr = T/Tc;\n", + "Sr = R*SRB(Tr,Pr,omega);\n", + "\n", + "del_S = round((Cp*math.log(T2/T))-(R*math.log(P2/P1))-Sr,2);\n", + "\n", + "# Results\n", + "print 'Entropy',del_S,'J/mol/K'\n", + "print ('Positive Entropy represents the irreversibility of Throttling Process')\n", + "print 'Final Temperature',T2,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy 23.8 J/mol/K\n", + "Positive Entropy represents the irreversibility of Throttling Process\n", + "Final Temperature 385.0 K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 page no : 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "P1 = 8600.;\t\t \t#[KPa]\n", + "T1 = 773.15;\t\t\t#[K]\n", + "#values of Enthalpy and Entropy from Steam tables\n", + "H1 = 3391.6;\t\t\t#[KJ/Kg]\n", + "S1 = 6.6858;\t\t\t#[KJ/Kg/K]\n", + "eta = 0.75;\n", + "P2 = 10000.;\t\t\t#[KPa]\n", + "rW = 56400.;\t\t\t#[KW] or [KJ/s]\n", + "S2i = S1;\t \t\t#Isentropic\n", + "\n", + "S2_liquid = 0.6493;\n", + "S2_vapor = 8.1511;\n", + "H2_liquid = 191.8;\n", + "H2_vapor = 2584.8;\n", + "\n", + "# Calculations\n", + "x2 = (S2i-S2_liquid)/(S2_vapor-S2_liquid);\n", + "H2i = H2_liquid+(x2*(H2_vapor-H2_liquid));\n", + "del_Hs = H2i-H1;\t\t\t#[KJ/Kg]\n", + "del_H = eta*del_Hs;\n", + "H2 = round(H1+del_H,0);\t\t\t#[KJ/Kg]\n", + "x2 = (H2-H2_liquid)/(H2_vapor-H2_liquid);\n", + "S2 = round(S2_liquid+(x2*(S2_vapor-S2_liquid)),4);\n", + "rm = round(-rW/(H2-H1),2);\t\t\t#[Kg/s]\n", + "\n", + "# Results\n", + "print 'Enthalpy',H2,'KJ/Kg'\n", + "print 'Entropy',S2,'KJ/Kg/K'\n", + "print 'Rate of mass change',rm,'Kg/s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy 2436.0 KJ/Kg\n", + "Entropy 7.6846 KJ/Kg/K\n", + "Rate of mass change 59.02 Kg/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 page no : 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#To find Approx Value\n", + "def approx(V,n):\n", + " return (V*10**n)/10**n;\t\t\t#V-Value n-To what place\n", + "\n", + "def MCPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " if t == 1:\n", + " t = 0.9997383\n", + " return (A)+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2.))*((t-1)/math.log(t)))\n", + " \n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "def HRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " return Pr*(B0-(Tr*diffr_B0)+(omega*(B1-(Tr*diffr_B1))));\n", + "\n", + "def SRB(Tr,Pr,omega):\n", + " B0 = 0.083-(0.422/(Tr**1.6));\n", + " diffr_B0 = 0.675/(Tr**2.6);\t\t\t#dB0/dTr\n", + " B1 = 0.139-(0.172/(Tr**4.2));\n", + " diffr_B1 = 0.722/(Tr**5.2);\t\t\t#dB0/dTr\n", + " return -Pr*(diffr_B0+(omega*diffr_B1));\n", + "\n", + "# Variables\n", + "T1 = 573.15;\t\t\t#[K]\n", + "P1 = 45. \t\t\t#[bar]\n", + "P2 = 2. \t\t \t#[bar]\n", + "Tc = 282.3 \t\t\t#[K]\n", + "Pc = 50.4;\t \t\t#[bar]\n", + "omega = 0.087;\n", + "A = 1.424;\n", + "B = 14.394*10**-3;\n", + "C = -4.392*10**-6;\n", + "D = 0;\n", + "R = 8.314;\n", + "\n", + "# Calculations and Results\n", + "#Using Eqn(6.84)\n", + "#del_H = h (T2-T1)+Hr2-Hr1\n", + "#Umath.sing Eqn(6.85))\n", + "#del_S = s ln(T2/T1) - R*ln(P2/P1)+Sr2-Sr1\n", + "\n", + "#(a) equations for Ideal gas\n", + "#No residuals terms, whence\n", + "\n", + "#del_H = h(T2-T1)\n", + "#del_S = s ln(T2/T1) - R*ln(P2/P1)\n", + "\n", + "del_S = 0\t\t\t#isentropic\n", + "#Whence K = s/R ln(T2/T1) = ln(P2/P1)\n", + "K = math.log(P2/P1);\n", + "#let c = s/R\n", + "#T2 = exp(K/c+ln(T1))\n", + "i = -1;\n", + "a = (T1);\t\t\t#Initial\n", + "while (i == -1):\n", + " b = MCPS(T1,a,A,B,C,D);\n", + " temp = math.exp((K/b)+math.log(T1));\n", + " flag = a-temp;\n", + " if(flag<= 0.1):\n", + " T2 = a;\n", + " i = 1;\n", + " else:\n", + " a = temp-0.1; \n", + " i = -1;\n", + "\n", + "print ('(a)by Equations for an Ideal gas')\n", + "print ('K',approx(T2,1),'Temp = ')\n", + "Cp_h = R*MCPH(T1,T2,A,B,C,D);\n", + "del_Hs = Cp_h*(T2-T1);\n", + "Ws_a = approx(del_Hs,0);\n", + "print ('J/mol',Ws_a,'Work')\n", + "\n", + "#(b)-Appropriate Generalized correlations\n", + "\n", + "Tr1 = T1/Tc;\n", + "Pr1 = P1/Pc;\n", + "\n", + "Hr1 = R*Tc*HRB(Tr1,Pr1,omega);\t\t\t#[J/mol]\n", + "Sr1 = R*SRB(Tr1,Pr1,omega);\t\t\t#[J/mol/K]\n", + "\n", + "Tr2 = T2/Tc;\n", + "Pr2 = P2/Pc;\n", + "\n", + "Sr2 = R*SRB(Tr2,Pr2,omega);\n", + "\n", + "#Using Eqn(6.85))\n", + "#del_S = s ln(T2/T1) - R*ln(P2/P1)+Sr2-Sr1\n", + "#del_S = 0 isentropic\n", + "#K = s ln(T2/T1) = Rln(P2/P1)-Sr2+Sr1\n", + "K = R*math.log(P2/P1)-Sr2+Sr1;\n", + "#T2 = exp((K/s)+ln T1)\n", + "i = -1;\n", + "a = (T1);\t\t\t#Initial\n", + "while (i == -1):\n", + " b = R*MCPS(T1,a,A,B,C,D);\n", + " temp = math.exp((K/b)+math.log(T1));\n", + " flag = a-temp;\n", + " if(flag <= 0.1):\n", + " T2 = a;\n", + " i = 1;\n", + " else:\n", + " a = temp-0.1; \n", + " i = -1;\n", + "\n", + "print ('(b)by Appropriate generalized correlations')\n", + "print 'Temp = ',approx(T2,1),'K'\n", + "Tr2 = T2/Tc;\n", + "\n", + "Sr2 = R*SRB(Tr2,Pr2,omega);\t\t\t#[J/mol/K]\n", + "Hr2 = R*Tc*HRB(Tr2,Pr2,omega);\t\t\t#[J/mol]\n", + "Cp_h = R*MCPH(T1,T2,A,B,C,D);\n", + "del_Hs = Cp_h*(T2-T1)+Hr2-Hr1;\n", + "Ws_b = approx(del_Hs,-1);\n", + "print 'Work',Ws_b,'J/mol'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)by Equations for an Ideal gas\n", + "('K', 370.727376687607, 'Temp = ')\n", + "('J/mol', -12157.361271562999, 'Work')\n", + "(b)by Appropriate generalized correlations\n", + "Temp = 365.734941728 K\n", + "Work -11923.4806166 J/mol\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 page no : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to Find the Work Required and Properties of Discharge Steam\n", + "\n", + "import math \n", + "#To find Approx Value\n", + "def approx(V,n):\n", + " return (V*10**n)/10**n;\t\t\t#V-Value n-To what place\n", + "\n", + "# Variables\n", + "P1 = 100.;\t\t\t#[KPa] (Tsat/tsat) = 327.78K/99.63`C)\n", + "\n", + "#From Steam Tables @ 100KPa\n", + "S1 = 7.3598;\t\t\t#[KJ/Kg/K]\n", + "H1 = 2675.4;\t\t\t#[KJ/Kg]\n", + "\n", + "P2 = 300.;\t\t\t#[KPa]\n", + "#From Steam Tables @ 300KPa\n", + "S2 = S1;\t\t\t#Isentropic\n", + "H2i = 2888.8;\t\t\t#[KJ/Kg]\n", + "\n", + "eta = 0.75;\t\t\t#Efficiency\n", + "\n", + "# Calculations\n", + "del_H = H2i-H1;\n", + "del_H = del_H/eta;\n", + "H2 = approx(H1+del_H,1);\t\t\t#[KJ/Kg]\n", + "#From Steam Tables w.r.t H2\n", + "T2 = 519.25;\t\t\t#[K]\n", + "S2 = 7.5019;\t\t\t#[KJ/Kg/K]\n", + "Ws = approx(del_H,1);\t\t\t#[KJ/Kg] Work Reqd\n", + "\n", + "# Results\n", + "print 'Enthalpy',H2,'KJ/Kg'\n", + "print 'Entropy',S2,'KJ/Kg/K'\n", + "print 'Temperature',T2,'K'\n", + "print 'Work Done',Ws,'KJ/Kg'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy 2959.93333333 KJ/Kg\n", + "Entropy 7.5019 KJ/Kg/K\n", + "Temperature 519.25 K\n", + "Work Done 284.533333333 KJ/Kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 page no : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to Find Work Reqiured and Discharge Temperature of Methane\n", + "\n", + "import math \n", + "#To find Approx Value\n", + "def approx(V,n):\n", + " return (V*10**n)/10**n;\t\t\t#V-Value n-To what place\n", + "\n", + "\n", + "def MCPH(T0,T,A,B,C,D):\n", + " t = T/T0; \n", + " return (A+((B/2)*T0*(t+1))+((C/3)*T0*T0*((t**2)+t+1))+(D/(t*T0*T0)))\n", + "\n", + "def MCPS(T0,T,A,B,C,D):\n", + " t = T/T0;\n", + " if t==1:\n", + " t = 0.9997383\n", + " return (A)+(((B*T0)+(((C*T0*T0)+(D/(t*t*T0*T0)))*(t+1)/2))*((t-1)/math.log(t)))\n", + "\n", + "\n", + "# Variables\n", + "R = 8.314;\n", + "T1 = 293.15;\t\t\t#[K]\n", + "P1 = 140.;\t\t\t#[KPa]\n", + "P2 = 560.;\t\t\t#[KPa]\n", + "eta = 0.75;\t\t\t#[Efficiency]\n", + "A = 1.702;\n", + "B = 9.081*10**-3;\n", + "C = -2.164*10**-6;\n", + "D = 0;\n", + "\n", + "# Calculations\n", + "i = -1;\n", + "a = (T1);\t\t\t#Initial\n", + "while (i == -1):\n", + " b = MCPS(T1,a,A,B,C,D);\n", + " b = b**-1;\n", + " c = T1*((P2/P1)**b);\n", + " flag = c-a;\n", + " if(flag <= 0.0001):\n", + " T2i = a;\n", + " i = 1;\n", + " else:\n", + " a = a+0.01; \n", + " i = -1;\n", + "\n", + "Cps = R*MCPS(T1,T2i,A,B,C,D);\n", + "Cph = approx(R*MCPH(T1,T2i,A,B,C,D),3);\n", + "\n", + "#from Eqn(7.19)\n", + "Ws = approx(Cph*(T2i-T1),0)\t\t\t#[J/mol]\n", + "Ws = approx(Ws/eta,0)\t\t\t#Actual work\n", + "del_H = Ws;\n", + "\n", + "#From eqn(7.21) Actual discharge Temperature\n", + "#T2 = T1+(del_H/Cph)\n", + "i = -1;\n", + "a = (T2i);\t\t\t#Initial\n", + "chk = 1;\n", + "while (i == -1):\n", + " b = R*MCPH(T2i,a,A,B,C,D);\n", + " c = del_H/(a-T1);\n", + " flag = c-b;\n", + " if(flag<= 0.001):\n", + " T2 = a;\n", + " i = 1;\n", + " else:\n", + " a = a+0.001; \n", + " i = -1;\n", + "Cph_T2 = approx(R*MCPH(T2i,T2,A,B,C,D),2);\n", + "\n", + "# Results\n", + "print 'Temperature',T2,'K'\n", + "print 'Enthalpy',Cph_T2,'J/mol/K'\n", + "print 'Actual Work',Ws,'J/mol'\n", + "\n", + "print ('Note: The answer in the Book varies with that of this code because the Calculation\\\n", + " in the Book does not leads to the answer given')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature 419.148999999 K\n", + "Enthalpy 41.9746353847 J/mol/K\n", + "Actual Work 5288.86966768 J/mol\n", + "Note: The answer in the Book varies with that of this code because the Calculation in the Book does not leads to the answer given\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 page no : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Program to Find Work,Temperature Change and Entropy Change in Pump\n", + "\n", + "import math \n", + "#To find Approx Value\n", + "def approx(V,n):\n", + " return (V*10**n)/10**n;\t\t\t#V-Value n-To what place\n", + "\n", + "# Variables\n", + "T1 = 318.15;\t\t\t#[K]\n", + "P1 = 10.;\t\t\t#[KPa]\n", + "P2 = 8600.;\t\t\t#[KPa]\n", + "eta = 0.75;\t\t\t#Efficiency\n", + "\n", + "#Properties of saturated liquid water @ 318.15K\n", + "V = 1010.;\t\t\t#[cm**3/Kg]\n", + "V = 1010.*10**-6;\t\t\t#[m**3/Kg]\n", + "Beta = 425*10**-6;\t\t\t#[K**-1]\n", + "Cp = 4.178;\t\t\t#[KJ/Kg/K]\n", + "\n", + "# Calculations\n", + "#From Eqn(7.24)\n", + "Ws = V*(P2-P1);\t\t\t#[KPa m**3/Kg]\n", + "del_H = Ws;\n", + "#From Eqn(7.17)\n", + "del_H = del_H/eta;\n", + "Ws = approx(del_H,2);\n", + "\n", + "#From Eqn(7.25)\n", + "del_T = approx((del_H-(V*(1-(Beta*T1))*(P2-P1)))/Cp,2);\n", + "\n", + "#From Eqn(7.26) \n", + "T2 = T1+del_T;\n", + "del_S = approx(Cp*math.log(T2/T1)-(Beta*V*(P2-P1)),3);\n", + "\n", + "# Results\n", + "print 'Work Done',Ws,'KJ/Kg'\n", + "print 'Change in Temperature',del_T,'K'\n", + "print 'Change in Entropy',del_S,'KJ/Kg/K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work Done 11.5678666667 KJ/Kg\n", + "Change in Temperature 0.972969755934 K\n", + "Change in Entropy 0.00907044914006 KJ/Kg/K\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch8.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch8.ipynb new file mode 100755 index 00000000..509a5f58 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch8.ipynb @@ -0,0 +1,184 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5cf24d0307e45e34f1d1e8828ef11e3ac74cacd774f3b3015eadb6dcfa4cb99e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Production Of Power From Heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 page no : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "#(a)-As in Example(7.6)\n", + "P1 = 8600.;\t\t\t#[KPa]\n", + "T1 = 773.15;\t\t\t#[K]\n", + "#values of Enthalpy and Entropy from Steam tables\n", + "H1 = 3391.6;\t\t\t#[KJ/Kg]\n", + "S1 = 6.6858;\t\t\t#[KJ/Kg/K]\n", + "\n", + "P2 = 10;\t\t\t#[KPa]\n", + "S2i = S1;\t\t\t#Isentropic\n", + "\n", + "S2_liquid = 0.6493;\n", + "S2_vapor = 8.1511;\n", + "H2_liquid = 191.8;\n", + "H2_vapor = 2584.8;\n", + "\n", + "# Calculations and Results\n", + "x2 = (S2i-S2_liquid)/(S2_vapor-S2_liquid);\n", + "\n", + "H2i = H2_liquid+(x2*(H2_vapor-H2_liquid));\n", + "del_Hs_1 = round((H2i-H1),1);\t\t\t#[KJ/Kg]\n", + "Ws = del_Hs_1;\n", + "H3i = H2i;\n", + "H4 = H2_liquid;\n", + "#Applying Eqn(8.2)\n", + "Q_condenser = round((H4-H3i),1);\t\t\t#heat Of condenser [KJ/Kg]\n", + "#From Example(7.10)\n", + "#Properties of saturated liquid water @ 318.15K\n", + "V = 1010;\t\t\t#[cm**3/Kg]\n", + "V = 1010*10**-6;\t\t\t#[m**3/Kg]\n", + "Beta = 425*10**-6;\t\t\t#[K**-1]\n", + "Cp = 4.178;\t\t\t#[KJ/Kg/K]\n", + "\n", + "#From Eqn(7.24)\n", + "Ws_2 = round((V*(P1-P2)),1)\t\t\t#[KPa m**3/Kg]\n", + "del_Hs_2 = Ws_2;\n", + "H1 = H4+del_Hs_2;\n", + "#Enthalpy Of saturated steam at 8600KPa and 773.15K\n", + "H2 = 3391.6;\t\t\t#[KJ/Kg]\n", + "#Applying Eqn(8.2)\n", + "Q_boiler = H2-H1;\n", + "\n", + "Ws_Rankine = -Q_boiler-Q_condenser;\n", + "eta = round((abs(Ws_Rankine)/Q_boiler),3);\n", + "print ('(a)Rankine Cycle')\n", + "print 'Thermal Efficiency',eta\n", + "\n", + "#(b)\n", + "eta_b = 0.75;\n", + "del_H_1 = del_Hs_1*eta_b;\n", + "Ws_turbine = del_H_1;\n", + "H3 = H2+del_H_1;\n", + "Q_condenser = H4-H3;\n", + "\n", + "#By Example 7.10 for the pump\n", + "Ws_pump = del_Hs_2/eta_b;\n", + "del_H_2 = Ws_pump;\n", + "Ws_net = Ws_turbine+Ws_pump;\n", + "H1 = H4+del_H_2;\n", + "\n", + "Q_boiler = H2-H1;\n", + "efficiency = round(abs(Ws_net)/Q_boiler,4);\n", + "print ('(b)Practical cycle with 0.75 efficiency')\n", + "print 'Thermal Efficiency',efficiency\n", + "\n", + "#(c)\n", + "#By rating of Power Cycle\n", + "rWs_net = -80000;\t\t\t#[KJ/s] Power Rating \n", + "rm = round(rWs_net/Ws_net,2);\n", + "\n", + "rQ_boiler = round(rm*Q_boiler/1000,1);\t\t\t#[MW]\n", + "rQ_condenser = round(rm*Q_condenser/1000,1);\t\t\t#[MW]\n", + "print ('(c)By rating of Power Cycle');\n", + "print 'Steam Rate',rm,'kg/s'\n", + "print 'Heat Transfer rate in boiler',rQ_boiler,'MW'\n", + "print 'Heat Transfer rate in condenser',rQ_condenser,'MW'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Rankine Cycle\n", + "Thermal Efficiency 0.397\n", + "(b)Practical cycle with 0.75 efficiency\n", + "Thermal Efficiency 0.2961\n", + "(c)By rating of Power Cycle\n", + "Steam Rate 84.74 kg/s\n", + "Heat Transfer rate in boiler 270.2 MW\n", + "Heat Transfer rate in condenser -190.2 MW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 page no : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "K = 6.;\t\t\t#Pb/Pa\n", + "T1 = 298.15;\t\t\t#[K]\n", + "Tmax = 1033.15;\t\t\t#[K]\n", + "Gamma = 1.4;\n", + "\n", + "# Calculations and Results\n", + "#(a) Gamma = 1.4\n", + "#From Eqn(8.12)\n", + "eta_a = round(1-((1/K)**((Gamma-1)/Gamma)),1);\n", + "print ('(a)Efficiency of an ideal air cycle')\n", + "print 'Efficiency',eta_a\n", + "\n", + "#(b) eta_c = 0.83 eta_t = 0.86\n", + "eta_c = 0.83;\n", + "eta_t = 0.86;\n", + "K2 = Tmax/T1;\n", + "alpha = (K)**((Gamma-1)/Gamma);\n", + "\n", + "#Umath.sing Eqn(8.13)\n", + "eta_b = round(((eta_t*eta_c*K2*(1-(1/alpha)))-(alpha-1))/((eta_c*(K2-1))-(alpha-1)),3);\n", + "print ('(b)Thermal efficiency of an air cycle if the Compressor and Turbine Operate adiabatically')\n", + "print 'Thermal efficiency',eta_b\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Efficiency of an ideal air cycle\n", + "Efficiency 0.4\n", + "(b)Thermal efficiency of an air cycle if the Compressor and Turbine Operate adiabatically\n", + "Thermal efficiency 0.234\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch9.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch9.ipynb new file mode 100755 index 00000000..2413c301 --- /dev/null +++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_J._M._Smith,_H._C._Van_Ness_And_M._M._Abbott/ch9.ipynb @@ -0,0 +1,198 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b94acd518022e6ed411c8d1167b000dca66e142504e746cb8280f47544693d50" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Refrigerator And Liquifaction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 page no : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "T1 = 261.15;\t\t\t#[K] Temgeratureof refrigerated space\n", + "T2 = 294.15;\t\t\t#[K] Temperature of cooling water\n", + "dT = 5.6;\t\t\t#[K] Temperature Difference\n", + "Qc = 35.2;\t\t\t#[kW] Refrigerant Capacity\n", + "eta = 0.8;\t\t\t#Efficeincy(b)\n", + "\n", + "# Calculations and Results\n", + "#(a) Carnot Refrigerator\n", + "Tc = T1-dT;\n", + "Th = T2+dT;\n", + "#Umath.sing Eqn(9.3)\n", + "w = round(Tc/(Th-Tc),2);\n", + "print '(a)Coefficient of Performance for Carnot Refrigerator',w\n", + "\n", + "#(b) Vapor Compression Cycle\n", + "#From Table(9.1)\n", + "#@ Tc = 255.55K\n", + "H2 = 388.13;\t\t\t#[KJ/Kg]\n", + "S2 = 1.7396;\t\t\t#[KJ/Kg/K]\n", + "\n", + "#@ Th = 299.75K\n", + "H4 = 236.76;\t\t\t#[KJ/Kg]\n", + "\n", + "S3 = S2;\t\t\t#Isentropic\n", + "#Hence\n", + "H3 = 420.27;\t\t\t#[KJ/Kg]\n", + "#Step 2 --> 3\n", + "del_Hs = H3-H2;\n", + "#But Compressor Efficiency = 0.80\n", + "del_Hs = del_Hs/eta\n", + "#Step 1 --> 4\n", + "H1 = H4;\t\t\t#isenthalpic\n", + "w = round((H2-H4)/del_Hs,2);\n", + "print '(b)Coefficient of Performance for Vapor Compression Cycle',w\n", + "rm = round(Qc/(H2-H4),4);\t\t\t#[Kg/s]\n", + "print 'Circulation rate',rm,'kg/s'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Coefficient of Performance for Carnot Refrigerator 5.78\n", + "(b)Coefficient of Performance for Vapor Compression Cycle 3.77\n", + "Circulation rate 0.2325 kg/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 page no : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Qh_Winter = 30.;\t\t\t#[KW]\n", + "Qc_Summer = 60.;\t\t\t#[KW]\n", + "Tc_Winter = 283.15;\t\t\t#[K]\n", + "Th_Winter = 303.15;\t\t\t#[K]\n", + "Tc_Summer = 278.15;\t\t\t#[K]\n", + "Th_Summer = 298.15;\t\t\t#[K]\n", + "\n", + "# Calculations and Results\n", + "#For WINTER's\n", + "#Using Eqn(5.7)\n", + "Qc_Winter = Qh_Winter*(Tc_Winter/Th_Winter);\n", + "#Umath.sing Eqn(9.1)\n", + "W_Winter = round((Qh_Winter-Qc_Winter),2);\t\t\t#[KW]\n", + "print \"Power Requirement for WINTER''s\",W_Winter,'KW'\n", + "\n", + "#For SUMMER's\n", + "#Combining Eqn(9.2) And Eqn(9.3)\n", + "W_Summer = round((Qc_Summer*((Th_Summer-Tc_Summer)/Tc_Summer)),2);\n", + "print \"Power Requirement for SUMMER''s\",W_Summer,'KW'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power Requirement for WINTER''s 1.98 KW\n", + "Power Requirement for SUMMER''s 4.31 KW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 page no : 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "x = 0.25;\n", + "#For Superheated Methane\n", + "#By Perry and Green by linear interpolation\n", + "H4 = 1140.;\t\t\t #[KJ/Kg] @ 300K and 60 Bar\n", + "H15 = 1188.9;\t\t\t#[KJ/Kg] @ 295K and 1 Bar\n", + "#By interpolation based on lnP\n", + "T_sat = 111.5;\t\t\t#[K]\n", + "H9 = 285.4;\t\t \t#[KJ/Kg] Saturated Liquid\n", + "H12 = 769.9;\t\t\t#[KJ/Kg] Saturated Vapor\n", + "S12 = 9.521;\t\t\t#[KJ/Kg/K] Saturated vapor\n", + "\n", + "T5 = 253.6;\t\t\t #[K]\n", + "H5 = 1009.8;\t\t\t#[KJ/Kg] @ 60 Bar\n", + "\n", + "#From Eqn(9.7)\n", + "z = ((x*(H12-H5))+H4-H15)/(H9-H15);\n", + "H14 = ((H5-H4)/(1-z))+H15;\t\t\t#[KJ/Kg]\n", + "#Whence\n", + "T14 = 227.2;\t\t\t#[K] @ 1Bar\n", + "H7 = H5-((1-z)/(1-x)*(H14-H12));\t\t\t#[KJ/Kg]\n", + "T7 = 197.6;\t\t\t#[K] @ 60Bar\n", + "#From Eqn(9.8)\n", + "z = round((H4-H15)/(H9-H15),4);\n", + "H7 = H4-((1-z)*(H15-H12));\n", + "T7 = 206.6;\t\t\t#[K]\n", + "\n", + "# Results\n", + "print 'Fraction of methane liquefied',z*100,'%'\n", + "print 'Temperature of High Pressure steam entering the throttle valve',T7,'K'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of methane liquefied 5.41 %\n", + "Temperature of High Pressure steam entering the throttle valve 206.6 K\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Electric_Drives/screenshots/Ch2_firingAngleandEff.png b/Introduction_To_Electric_Drives/screenshots/Ch2_firingAngleandEff.png new file mode 100755 index 00000000..f8cdc02f Binary files /dev/null and b/Introduction_To_Electric_Drives/screenshots/Ch2_firingAngleandEff.png differ diff --git a/Introduction_To_Electric_Drives/screenshots/Ch6Requiredhp.png b/Introduction_To_Electric_Drives/screenshots/Ch6Requiredhp.png new file mode 100755 index 00000000..cab9046c Binary files /dev/null and b/Introduction_To_Electric_Drives/screenshots/Ch6Requiredhp.png differ diff --git a/Introduction_To_Electric_Drives/screenshots/Ch6Thermal_time_cons.png b/Introduction_To_Electric_Drives/screenshots/Ch6Thermal_time_cons.png new file mode 100755 index 00000000..4da21eda Binary files /dev/null and b/Introduction_To_Electric_Drives/screenshots/Ch6Thermal_time_cons.png differ 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 new file mode 100644 index 00000000..2ee78ece --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/README.txt @@ -0,0 +1,10 @@ +Contributed By: karan singh +Course: btech +College/Institute/Organization: Uttarakhand Technical University +Department/Designation: EEE +Book Title: Introduction To Electric Drives +Author: Vandna Singhal & B.R. Gupta +Publisher: S.k. Kataria & Sons, New Delhi +Year of publication: 2011 +Isbn: 978-93-5014-119-9 +Edition: 1 \ No newline at end of file diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1.ipynb new file mode 100755 index 00000000..f1f5ba62 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1.ipynb @@ -0,0 +1,1622 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1, Thyristors Principles & Characteristics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_1, page 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alfa1=0.35 \n", + "alfa2=0.4 \n", + "IG=40*10**-3 #A\n", + "\n", + "#Solution :\n", + "IA=alfa2*IG/(1-(alfa1+alfa2)) #A\n", + "print \"Anode current = %0.2e A\" %(IA)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anode current = 6.40e-02 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_2, page 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "dv_dt=190 #V/\u00b5s\n", + "IC=8*10**-3 #A\n", + "\n", + "#Solution :\n", + "C=IC/(dv_dt/10**-6) #F\n", + "print \"Capacitance of depletion layer = %0.2e F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of depletion layer = 4.21e-11 F\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_3, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "RG=2000 #ohm\n", + "VCC=20 #V\n", + "VT=0.75 #V\n", + "Vthy=0.7 #V(Voltage across thyristor)\n", + "R=200 #ohm\n", + "IT=7*10**-3 #A\n", + "Ih=5*10**-3 #A\n", + "\n", + "\n", + "#Solution :\n", + "#part (a)\n", + "Vo=VCC #V##thyristor not conducting\n", + "print \"(a) When thyristor is in off state, Output voltage = %0.2f V\" %Vo\n", + "#part (b)\n", + "Vs=VT+IT*RG #V\n", + "print \"(b) Voltage necessary to turn on the thyristor = %0.2f V\" %Vs\n", + "#part (c)\n", + "VR1=Ih*R #V\n", + "print \"(c) Current through thyristor should be less than holding current. Voltage should be reduced to less than\",VR1,\"V\"\n", + "#part (d)\n", + "VR2=VR1+Vthy #V\n", + "print \"(d) VCC should be reduced to less than\",VR2,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) When thyristor is in off state, Output voltage = 20.00 V\n", + "(b) Voltage necessary to turn on the thyristor = 14.75 V\n", + "(c) Current through thyristor should be less than holding current. Voltage should be reduced to less than 1.0 V\n", + "(d) VCC should be reduced to less than 1.7 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_4, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "from numpy import *\n", + "#Given data\n", + "IG=symbols('IG') #A\n", + "VG=1+9*IG #V\n", + "Vgate=25 #V\n", + "t=pi #radian(duration)\n", + "Pavg=0.6 #W\n", + "\n", + "#Solution :\n", + "Ploss=Pavg*2*pi/t #W\n", + "#Ploss=VG*IG\n", + "X=VG*IG-Ploss \n", + "IG=solve(X, IG) #A\n", + "IG=IG[1] #A(taking +ve value only)\n", + "VG=1+9*IG #V\n", + "#Vgate=RG*IG+VG\n", + "RG=(Vgate-VG)/IG #ohm\n", + "print \"VG = %0.3f V\" %VG \n", + "print \"IG = %0.3f A\" %IG\n", + "print \"RG = %0.2f ohm\" %RG " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VG = 3.824 V\n", + "IG = 0.314 A\n", + "RG = 67.48 ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_5, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vdc=100 #V\n", + "L=10 #H\n", + "i=80*10**-3 #A\n", + "\n", + "#Solution :\n", + "t=i*L/Vdc #s\n", + "print \"Width of pulse should be more than\",t*1000,\"milli-seconds.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of pulse should be more than 8.0 milli-seconds.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_6, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vdc=100 #V\n", + "R=10 #ohm\n", + "L=5 #H\n", + "i=50*10**-3 #A\n", + "\n", + "#Solution :\n", + "#i=Vdc/R*(1-exp(-R*t/L))\n", + "t=-log(1-i/Vdc*R)/R*L #s\n", + "print \"Minimum width of gate pulse is\",round(t*1000,1),\"milli-seconds.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum width of gate pulse is 2.5 milli-seconds.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_7, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "i_latch=40*10**-3 #A\n", + "t=40*10**-6 #s\n", + "Vdc=90 #V\n", + "R=25 #ohm\n", + "L=0.5 #H\n", + "\n", + "#Solution :\n", + "i=Vdc/R*(1-exp(-R*t/L)) #A\n", + "print \"Current in the circuit is %0.4f\"%i,\" A, it is less than latchig current, the thyristor will not turn on.\" \n", + "R=Vdc/(i_latch-i) #ohm\n", + "print \"Maximum value of R is %0.f\"%R,\"ohm.\" \n", + "# Answer mismatch because of calculation accuracy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in the circuit is 0.0060 A, it is less than latchig current, the thyristor will not turn on.\n", + "Maximum value of R is 2647 ohm.\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_8, page 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "i_h=50*10**-3 #A\n", + "t=50*10**-6 #s\n", + "Vdc=100 #V\n", + "R=20 #ohm\n", + "L=0.5 #H\n", + "\n", + "#Solution :\n", + "i=Vdc/R*(1-exp(-R*t/L)) #A\n", + "#i=Es/(IGm*10**-3) #ohm\n", + "Rs_plus_R1=Es/(IGm*10**-3) #ohm\n", + "R1_Lower=Rs_plus_R1-Rs #ohm\n", + "#Rs_plus_R1<=(Es-VG)/(IGm*10**-3) #ohm\n", + "Rs_plus_R1=(Es-VG)/(IG*10**-3) #ohm\n", + "R1_Upper=Rs_plus_R1-Rs #ohm\n", + "print \"R1 must be more than\",R1_Lower,\"ohm and less than\",R1_Upper,\"ohm.\"\n", + "print \"Let R1 is 125 ohm.\" \n", + "R1=125 #ohm\n", + "#R2*Es/(R1+R2+Rs)<=VGm\n", + "R2=(VGm*R1+VGm*Rs)/(Es-VGm) #ohm\n", + "print \"R2<=\",round(R2,2),\"ohm \"\n", + "print \"Let R2 is 48 ohm.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rs = 20.00 ohm \n", + "R1 must be more than 100.0 ohm and less than 172.0 ohm.\n", + "Let R1 is 125 ohm.\n", + "R2<= 48.33 ohm \n", + "Let R2 is 48 ohm.\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_21, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "l=0.2 #m\n", + "w=0.01 #m\n", + "d=0.01 #m\n", + "P=3 #W\n", + "Tc=220 #W/m/degreeC\n", + "T1=30 #degreeC\n", + "theta=l/Tc/w/d #degreeC/W\n", + "T2=P*theta+T1 #degreeC\n", + "print \"Temperature of the surface = %0.2f degree C \" %T2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the surface = 57.27 degree C \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_22, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "l=2/1000 #m\n", + "A=12/10000 #m**2\n", + "T21=4 #degreeC(T2-T1)\n", + "Tc=220 #W/m/degreeC\n", + "theta=l/Tc/A #degreeC/W\n", + "Losses=T21/theta #W\n", + "print \"Maximum losses = %0.2f W \" %Losses " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum losses = 528.00 W \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_23, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "P=30 #W\n", + "T1=125 #degreeC\n", + "T2=50 #degreeC\n", + "theta=1 #degree C/W\n", + "theta_mica=0.3 #degree C/W\n", + "Rth_total=(T1-T2)/P #degree C/W\n", + "Rth_heat_sink=Rth_total-theta-theta_mica #degree C/W\n", + "print \"Thermal resistance of heat sink = %0.2f degree C/W \" %Rth_heat_sink" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal resistance of heat sink = 1.20 degree C/W \n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 1_24, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "theta = 0.627 # degree C/W\n", + "Ts = 93 # degree C\n", + "V = 3 # V\n", + "I = 25 # A\n", + "PL = V*I # W\n", + "Tj = theta*PL + Ts\n", + "print \"Thermal resistance of heat sink = %0.f degree C/W \" %Tj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal resistance of heat sink = 140 degree C/W \n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_25, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "T1=120 #degreeC(Junction Temperature)\n", + "T2=35 #degreeC(Ambient Temperature)\n", + "P=40 #W\n", + "theta_dash=0.8 #degree C/W(junction to heat sink)\n", + "theta=(T1-T2)/P #degree C/W\n", + "print \"Resistance of heat sink = %0.3f degree C/W\" %(theta-theta_dash)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of heat sink = 1.325 degree C/W\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_26, page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Tj=125 #degreeC\n", + "Ts=80 #degreeC\n", + "theta_jc=0.7 #degree C/W\n", + "theta_cs=0.4 #degree C/W\n", + "#part (a)\n", + "Pav1=(Tj-Ts)/(theta_jc+theta_cs) #W\n", + "print \"(a) Average power loss = %0.2f W\" %Pav1\n", + "#part (b)\n", + "Ts=50 #degreeC\n", + "Pav2=(Tj-Ts)/(theta_jc+theta_cs) #W\n", + "print \"(b) Permisible average power loss = %0.2f W\" %Pav2\n", + "rating_increase=(sqrt(Pav2)-sqrt(Pav1))/sqrt(Pav1)*100 #%\n", + "print \"(c) Increase in rating = %0.2f %%\" %rating_increase" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average power loss = 40.91 W\n", + "(b) Permisible average power loss = 68.18 W\n", + "(c) Increase in rating = 29.10 %\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_27, page 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "vc=25 #V\n", + "C=0.6*10**-6 #F\n", + "R=arange(2000,20000) #ohm\n", + "Xc=1/(2*pi*f*C) #ohm\n", + "#When R=2000 ohm\n", + "Z=min(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(vc/sqrt(2)/abs(Vc))-atan(imag(Vc)/real(Vc)) #radian\n", + "omega_t = omega_t*180/pi # degree\n", + "alfa1=omega_t #degree\n", + "\n", + "#When R=20000 ohm\n", + "Z=max(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(vc/sqrt(2)/abs(Vc))-atan(imag(Vc)/real(Vc)) #radian\n", + "omega_t = (omega_t)*180/pi # degree\n", + "alfa2=omega_t #degree\n", + "print \"Minimum firing angle = %0.2f degree\" %alfa1\n", + "print \"Maximum firing angle = %0.2f degree\" %alfa2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum firing angle = 25.37 degree\n", + "Maximum firing angle = 92.59 degree\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_28, page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=32 #V\n", + "Eta=0.63 \n", + "Ip=10*10**-6 #A\n", + "Vv=3.5 #V\n", + "Iv=10*10**-3 #A\n", + "Vf=0.5 #V\n", + "f=50 #Hz\n", + "tau=50*10**-6 #s\n", + "T=1/f#s\n", + "Vp=Eta*V+Vf #V\n", + "C=0.4*10**-6 #F#assumed\n", + "print \"Suitable value of C = %0.2f micro F \" %(C*10**6)\n", + "#V-Ip*R>Vp\n", + "R_upper=(V-Vp)/Ip #ohm\n", + "#V-Iv*RVp\n", + "R_upper=(Vdc-Vp)/Ip #ohm\n", + "print \"Value of R should be less than\",R_upper,\"ohm.\"\n", + "C=0.5*10**-6 #F#assumed\n", + "print \"Let value of C = %0.2f micro F \" %(C*10**6)\n", + "T=1/f#s\n", + "R=T/C/log(1/(1-Eta)) #ohm\n", + "print \"For C=0.5 micro F, calculated value of R\",round(R),\"ohm.\\nBut it is not suitable\" \n", + "C=1*10**-6 #F#assumed\n", + "print \"Let value of C = %0.2f micro F \" %(C*10**6)\n", + "R=T/C/log(1/(1-Eta)) #ohm\n", + "print \"For C=1 micro F, calculated value of R\",round(R,1),\"ohm.\\nIt is suitable\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R should be less than 700.0 ohm.\n", + "Let value of C = 0.50 micro F \n", + "For C=0.5 micro F, calculated value of R 1091.0 ohm.\n", + "But it is not suitable\n", + "Let value of C = 1.00 micro F \n", + "For C=1 micro F, calculated value of R 545.7 ohm.\n", + "It is suitable\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_30, page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import degrees\n", + "#Given data: \n", + "Vs=230 #V\n", + "R=arange(1000,22000) #ohm\n", + "Vg=2 #V\n", + "C=0.47*10**-6 #F\n", + "f=50 #Hz\n", + "Xc=1/(2*pi*f*C) #ohm\n", + "#When R=1000 ohm\n", + "theta=atan(min(R)/Xc) #radian\n", + "theta = degrees(theta) # degree\n", + "Z=min(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(Vg/sqrt(2)/abs(Vc))-atan(imag(Vc)/real(Vc)) #radian\n", + "omega_t = degrees(omega_t) # degree\n", + "alfa1=omega_t #degree\n", + "#When R=22000 ohm\n", + "Z=max(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(Vg/sqrt(2)/abs(Vc))-atan(imag(Vc)/real(Vc)) #radian\n", + "omega_t = degrees(omega_t) #degree\n", + "alfa2=omega_t #degree\n", + "print \"Minimum firing angle = %0.1f degree\" %alfa1.real\n", + "print \"Maximum firing angle = %0.1f degree\" %alfa2.real" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum firing angle = 8.8 degree\n", + "Maximum firing angle = 74.1 degree\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_31, page 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "R=0.8 #ohm\n", + "L=10*10**-6 #H\n", + "C=50*10**-6 #F\n", + "#RVC**2*C/IL\n", + "L_lower=VC**2*C/IL**2 #H\n", + "Ip=VC*sqrt(C/L_lower) #A\n", + "print \"Value of L should be greater than %0.1e\"%L_lower,\"H.\"\n", + "print \"For this value of L, Peak capacitor current is\",Ip,\"A. But it should be less than maximum load current.\"\n", + "#Let Ip=34.6 A\n", + "Ip=34.6 #A\n", + "L=C/(Ip/VC)**2 #H\n", + "print \"Value of L = %0.2e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 2.40e-05 F \n", + "Value of L should be greater than 1.5e-04 H.\n", + "For this value of L, Peak capacitor current is 40.0 A. But it should be less than maximum load current.\n", + "Value of L = 2.00e-04 H \n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_35, page 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Vdc=100 #V\n", + "L=0.1*10**-3 #H\n", + "C=10*10**-6 #F\n", + "Vc=100 #V\n", + "t_off_thyristor=25*10**-6 #s\n", + "IL=10 #A\n", + "t_off=Vc*C/IL #s\n", + "print \"T_off is %0.1e\"%t_off,\"seconds. It is greater than thristor turn off time, so it is sufficient for communication.\"\n", + "Ip=Vdc*sqrt(C/L) #A\n", + "print \"Current rating = %0.2f A \"%Ip " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T_off is 1.0e-04 seconds. It is greater than thristor turn off time, so it is sufficient for communication.\n", + "Current rating = 31.62 A \n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_36, page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "dv_by_dt=25/10**-6 #V/s\n", + "L=0.2*10**-3 #H\n", + "Vrms=230 #V\n", + "damping=0.65 #damping factor\n", + "Vm=sqrt(2)*Vrms #V\n", + "C=1/(2*L)*(0.564*Vm/dv_by_dt)**2 #F\n", + "R=2*damping*sqrt(L/C) #ohm\n", + "print \"Value of C = %0.4e F \" %C\n", + "print \"Value of R = %0.1f ohm \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 1.3462e-07 F \n", + "Value of R = 50.1 ohm \n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_37, page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=300 #V\n", + "RL=10 #ohm\n", + "L=0 #H\n", + "Ith=100 #A\n", + "f=2000 #Hz\n", + "dv_by_dt=100*10**6 #V/s\n", + "#dv/dt=(vth(tau)-vth(0))/tau\n", + "#dv/dt=RL*(1-0.368)*V/(R+RL)/((R+RL)*C)\n", + "R=V/Ith #ohm\n", + "C=RL*(1-0.368)*V/(R+RL)/(R+RL)/dv_by_dt\n", + "print \"Value of R = %0.2f ohm \" %R\n", + "print \"Value of C = %0.2e F \" %C\n", + "Ploss=1/2*C*V**2*f #W\n", + "print \"Power loss in snubber circuit = %0.2f W \" %Ploss\n", + "print \"Power rating of resitance is %0.2f\"%Ploss,\"W as all energy will be disspated in the resistance.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R = 3.00 ohm \n", + "Value of C = 1.12e-07 F \n", + "Power loss in snubber circuit = 10.10 W \n", + "Power rating of resitance is 10.10 W as all energy will be disspated in the resistance.\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_38, page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "R=4 #ohm\n", + "L=6*10**-6 #H\n", + "C=6*10**-6 #F\n", + "V=300 #V\n", + "di_by_dt_max=V/L #A/s\n", + "Isc=V/R #A\n", + "dvc_by_dt=R*di_by_dt_max+Isc/C #V/s\n", + "print \"Maximum permissible value of di/dt = %0.e A/s \" %di_by_dt_max \n", + "print \"Maximum permissible value of dv/dt = %0.3e V/s \" %dvc_by_dt " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum permissible value of di/dt = 5e+07 A/s \n", + "Maximum permissible value of dv/dt = 2.125e+08 V/s \n" + ] + } + ], + "prompt_number": 105 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_39, page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "RL=8 #ohm\n", + "V=230 #V\n", + "Ip=100 #A\n", + "SF=2 #safety factor\n", + "di_by_dt_max=40/10**-6/2 #A/s\n", + "dv_by_dt_max=150/10**-6/2 #V/s\n", + "\n", + "L=sqrt(2)*V/di_by_dt_max #H\n", + "print \"Value of L = %0.3e H \" %L \n", + "R=L/(sqrt(2)*V)*dv_by_dt_max #ohm\n", + "print \"Value of R = %0.2f ohm \" %R \n", + "IL_peak=(sqrt(2)*V)/RL #A\n", + "Ic_peak=(sqrt(2)*V)/R #A\n", + "Itotal=IL_peak+Ic_peak #A\n", + "print \"Total current through capacitor for these values = %0.2f A \" %Itotal \n", + "print \"Itotal>Ip, therefore value of R should be increased.\" \n", + "Ic_max=Ip-IL_peak #A\n", + "R=(sqrt(2)*V)/Ic_max #ohm\n", + "R=ceil(R) #ohm\n", + "print \"New Value of R = %0.2f ohm \" %R \n", + "damping=0.65 \n", + "C=4*damping**2*L/R**2 #F\n", + "print \"Value of C = %0.4f micro F \" %(C*10**6) \n", + "print \"Value of L = %0.2f micro H \" %(L*10**6) \n", + "#Ic_switching=C*dv/dt\n", + "dv_by_dt=sqrt(2)*V/(R+RL)/C #V/s\n", + "print \"Value of dv/dt is %0.3e\"%dv_by_dt,\"V/s.\\nIt is within the limit for the calculated value of R, L & C. Design is safe.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of L = 1.626e-05 H \n", + "Value of R = 3.75 ohm \n", + "Total current through capacitor for these values = 127.40 A \n", + "Itotal>Ip, therefore value of R should be increased.\n", + "New Value of R = 6.00 ohm \n", + "Value of C = 0.7635 micro F \n", + "Value of L = 16.26 micro H \n", + "Value of dv/dt is 3.043e+07 V/s.\n", + "It is within the limit for the calculated value of R, L & C. Design is safe.\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_40, page 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=230 #V\n", + "R1=2 #ohm\n", + "R2=5 #ohm\n", + "R3=1 #ohm\n", + "R4=6 #ohm\n", + "R5=5 #ohm\n", + "Isqr_t=30 #A**2-s\n", + "R=R1+R2*R3/(R2+R3) #ohm(X grounded)\n", + "Ifault=sqrt(2)*V/R #A\n", + "tc=Isqr_t/Ifault**2 #s\n", + "print \"Fault clearing time = %0.3e seconds\" %tc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fault clearing time = 1.134e-03 seconds\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..426aba7c --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter1_1.ipynb @@ -0,0 +1,1629 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1078b427de7b76fb5c938aee502876d04f5efd2c54801c7aa541f5beb2bf7919" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1, Thyristors Principles & Characteristics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_1, page 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "alfa1=0.35 \n", + "alfa2=0.4 \n", + "IG=40*10**-3 #A\n", + "\n", + "#Solution :\n", + "IA=alfa2*IG/(1-(alfa1+alfa2)) #A\n", + "print \"Anode current = %0.2e A\" %(IA)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anode current = 6.40e-02 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_2, page 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "dv_dt=190 #V/\u00b5s\n", + "IC=8*10**-3 #A\n", + "\n", + "#Solution :\n", + "C=IC/(dv_dt/10**-6) #F\n", + "print \"Capacitance of depletion layer = %0.2e F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance of depletion layer = 4.21e-11 F\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_3, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "RG=2000 #ohm\n", + "VCC=20 #V\n", + "VT=0.75 #V\n", + "Vthy=0.7 #V(Voltage across thyristor)\n", + "R=200 #ohm\n", + "IT=7*10**-3 #A\n", + "Ih=5*10**-3 #A\n", + "\n", + "\n", + "#Solution :\n", + "#part (a)\n", + "Vo=VCC #V##thyristor not conducting\n", + "print \"(a) When thyristor is in off state, Output voltage = %0.2f V\" %Vo\n", + "#part (b)\n", + "Vs=VT+IT*RG #V\n", + "print \"(b) Voltage necessary to turn on the thyristor = %0.2f V\" %Vs\n", + "#part (c)\n", + "VR1=Ih*R #V\n", + "print \"(c) Current through thyristor should be less than holding current. Voltage should be reduced to less than\",VR1,\"V\"\n", + "#part (d)\n", + "VR2=VR1+Vthy #V\n", + "print \"(d) VCC should be reduced to less than\",VR2,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) When thyristor is in off state, Output voltage = 20.00 V\n", + "(b) Voltage necessary to turn on the thyristor = 14.75 V\n", + "(c) Current through thyristor should be less than holding current. Voltage should be reduced to less than 1.0 V\n", + "(d) VCC should be reduced to less than 1.7 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_4, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "from numpy import pi\n", + "#Given data\n", + "IG=symbols('IG') #A\n", + "VG=1+9*IG #V\n", + "Vgate=25 #V\n", + "t=pi #radian(duration)\n", + "Pavg=0.6 #W\n", + "\n", + "#Solution :\n", + "Ploss=Pavg*2*pi/t #W\n", + "#Ploss=VG*IG\n", + "X=VG*IG-Ploss \n", + "IG=solve(X, IG) #A\n", + "IG=IG[1] #A(taking +ve value only)\n", + "VG=1+9*IG #V\n", + "#Vgate=RG*IG+VG\n", + "RG=(Vgate-VG)/IG #ohm\n", + "print \"VG = %0.3f V\" %VG \n", + "print \"IG = %0.3f A\" %IG\n", + "print \"RG = %0.2f ohm\" %RG " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VG = 3.824 V\n", + "IG = 0.314 A\n", + "RG = 67.48 ohm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_5, page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vdc=100 #V\n", + "L=10 #H\n", + "i=80*10**-3 #A\n", + "\n", + "#Solution :\n", + "t=i*L/Vdc #s\n", + "print \"Width of pulse should be more than\",t*1000,\"milli-seconds.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of pulse should be more than 8.0 milli-seconds.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_6, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "Vdc=100 #V\n", + "R=10 #ohm\n", + "L=5 #H\n", + "i=50*10**-3 #A\n", + "\n", + "#Solution :\n", + "#i=Vdc/R*(1-exp(-R*t/L))\n", + "t=-log(1-i/Vdc*R)/R*L #s\n", + "print \"Minimum width of gate pulse is\",round(t*1000,1),\"milli-seconds.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum width of gate pulse is 2.5 milli-seconds.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_7, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "i_latch=40*10**-3 #\n", + "t=40*10**-6 #s\n", + "Vdc=90 #V\n", + "R=25 #ohm\n", + "L=0.5 #H\n", + "\n", + "#Solution :\n", + "i=Vdc/R*(1-exp(-R*t/L)) #A\n", + "print \"Current in the circuit is %0.4f\"%i,\" A, it is less than latchig current, the thyristor will not turn on.\" \n", + "R=Vdc/(i_latch-i) #ohm\n", + "print \"Maximum value of R is %0.f\"%R,\"ohm.\" \n", + "# Answer mismatch because of calculation accuracy." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current in the circuit is 0.0060 A, it is less than latchig current, the thyristor will not turn on.\n", + "Maximum value of R is 2647 ohm.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_8, page 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "\n", + "#Given data\n", + "i_h=50*10**-3 #A\n", + "t=50*10**-6 #s\n", + "Vdc=100 #V\n", + "R=20 #ohm\n", + "L=0.5 #H\n", + "\n", + "#Solution :\n", + "i=Vdc/R*(1-exp(-R*t/L)) #A\n", + "#i=Es/(IGm*10**-3) #ohm\n", + "Rs_plus_R1=Es/(IGm*10**-3) #ohm\n", + "R1_Lower=Rs_plus_R1-Rs #ohm\n", + "#Rs_plus_R1<=(Es-VG)/(IGm*10**-3) #ohm\n", + "Rs_plus_R1=(Es-VG)/(IG*10**-3) #ohm\n", + "R1_Upper=Rs_plus_R1-Rs #ohm\n", + "print \"R1 must be more than\",R1_Lower,\"ohm and less than\",R1_Upper,\"ohm.\"\n", + "print \"Let R1 is 125 ohm.\" \n", + "R1=125 #ohm\n", + "#R2*Es/(R1+R2+Rs)<=VGm\n", + "R2=(VGm*R1+VGm*Rs)/(Es-VGm) #ohm\n", + "print \"R2<=\",round(R2,2),\"ohm \"\n", + "print \"Let R2 is 48 ohm.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rs = 20.00 ohm \n", + "R1 must be more than 100.0 ohm and less than 172.0 ohm.\n", + "Let R1 is 125 ohm.\n", + "R2<= 48.33 ohm \n", + "Let R2 is 48 ohm.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_21, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "l=0.2 #m\n", + "w=0.01 #m\n", + "d=0.01 #m\n", + "P=3 #W\n", + "Tc=220 #W/m/degreeC\n", + "T1=30 #degreeC\n", + "theta=l/Tc/w/d #degreeC/W\n", + "T2=P*theta+T1 #degreeC\n", + "print \"Temperature of the surface = %0.2f degree C \" %T2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the surface = 57.27 degree C \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_22, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "l=2/1000 #m\n", + "A=12/10000 #m**2\n", + "T21=4 #degreeC(T2-T1)\n", + "Tc=220 #W/m/degreeC\n", + "theta=l/Tc/A #degreeC/W\n", + "Losses=T21/theta #W\n", + "print \"Maximum losses = %0.2f W \" %Losses " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum losses = 528.00 W \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_23, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "P=30 #W\n", + "T1=125 #degreeC\n", + "T2=50 #degreeC\n", + "theta=1 #degree C/W\n", + "theta_mica=0.3 #degree C/W\n", + "Rth_total=(T1-T2)/P #degree C/W\n", + "Rth_heat_sink=Rth_total-theta-theta_mica #degree C/W\n", + "print \"Thermal resistance of heat sink = %0.2f degree C/W \" %Rth_heat_sink" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal resistance of heat sink = 1.20 degree C/W \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Example 1_24, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "theta = 0.627 # degree C/W\n", + "Ts = 93 # degree C\n", + "V = 3 # V\n", + "I = 25 # A\n", + "PL = V*I # W\n", + "Tj = theta*PL + Ts\n", + "print \"Thermal resistance of heat sink = %0.f degree C/W \" %Tj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal resistance of heat sink = 140 degree C/W \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_25, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "T1=120 #degreeC(Junction Temperature)\n", + "T2=35 #degreeC(Ambient Temperature)\n", + "P=40 #W\n", + "theta_dash=0.8 #degree C/W(junction to heat sink)\n", + "theta=(T1-T2)/P #degree C/W\n", + "print \"Resistance of heat sink = %0.3f degree C/W\" %(theta-theta_dash)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of heat sink = 1.325 degree C/W\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_26, page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Tj=125 #degreeC\n", + "Ts=80 #degreeC\n", + "theta_jc=0.7 #degree C/W\n", + "theta_cs=0.4 #degree C/W\n", + "#part (a)\n", + "Pav1=(Tj-Ts)/(theta_jc+theta_cs) #W\n", + "print \"(a) Average power loss = %0.2f W\" %Pav1\n", + "#part (b)\n", + "Ts=50 #degreeC\n", + "Pav2=(Tj-Ts)/(theta_jc+theta_cs) #W\n", + "print \"(b) Permisible average power loss = %0.2f W\" %Pav2\n", + "rating_increase=(sqrt(Pav2)-sqrt(Pav1))/sqrt(Pav1)*100 #%\n", + "print \"(c) Increase in rating = %0.2f %%\" %rating_increase" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average power loss = 40.91 W\n", + "(b) Permisible average power loss = 68.18 W\n", + "(c) Increase in rating = 29.10 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_27, page 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import asin, atan, sqrt\n", + "from numpy import arange\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "vc=25 #V\n", + "C=0.6*10**-6 #F\n", + "R=arange(2000,20000) #ohm\n", + "Xc=1/(2*pi*f*C) #ohm\n", + "#When R=2000 ohm\n", + "Z=min(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(vc/sqrt(2)/abs(Vc))-atan((Vc.imag)/(Vc.real)) #radian\n", + "omega_t = omega_t*180/pi # degree\n", + "alfa1=omega_t #degree\n", + "\n", + "#When R=20000 ohm\n", + "Z=max(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(vc/sqrt(2)/abs(Vc))-atan((Vc.imag)/(Vc.real)) #radian\n", + "omega_t = (omega_t)*180/pi # degree\n", + "alfa2=omega_t #degree\n", + "print \"Minimum firing angle = %0.2f degree\" %alfa1\n", + "print \"Maximum firing angle = %0.2f degree\" %alfa2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum firing angle = 25.37 degree\n", + "Maximum firing angle = 92.59 degree\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_28, page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=32 #V\n", + "Eta=0.63 \n", + "Ip=10*10**-6 #A\n", + "Vv=3.5 #V\n", + "Iv=10*10**-3 #A\n", + "Vf=0.5 #V\n", + "f=50 #Hz\n", + "tau=50*10**-6 #s\n", + "T=1/f#s\n", + "Vp=Eta*V+Vf #V\n", + "C=0.4*10**-6 #F#assumed\n", + "print \"Suitable value of C = %0.2f micro F \" %(C*10**6)\n", + "#V-Ip*R>Vp\n", + "R_upper=(V-Vp)/Ip #ohm\n", + "#V-Iv*RVp\n", + "R_upper=(Vdc-Vp)/Ip #ohm\n", + "print \"Value of R should be less than\",R_upper,\"ohm.\"\n", + "C=0.5*10**-6 #F#assumed\n", + "print \"Let value of C = %0.2f micro F \" %(C*10**6)\n", + "T=1/f#s\n", + "R=T/C/log(1/(1-Eta)) #ohm\n", + "print \"For C=0.5 micro F, calculated value of R\",round(R),\"ohm.\\nBut it is not suitable\" \n", + "C=1*10**-6 #F#assumed\n", + "print \"Let value of C = %0.2f micro F \" %(C*10**6)\n", + "R=T/C/log(1/(1-Eta)) #ohm\n", + "print \"For C=1 micro F, calculated value of R\",round(R,1),\"ohm.\\nIt is suitable\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R should be less than 700.0 ohm.\n", + "Let value of C = 0.50 micro F \n", + "For C=0.5 micro F, calculated value of R 1091.0 ohm.\n", + "But it is not suitable\n", + "Let value of C = 1.00 micro F \n", + "For C=1 micro F, calculated value of R 545.7 ohm.\n", + "It is suitable\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_30, page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import degrees\n", + "#Given data: \n", + "Vs=230 #V\n", + "R=arange(1000,22000) #ohm\n", + "Vg=2 #V\n", + "C=0.47*10**-6 #F\n", + "f=50 #Hz\n", + "Xc=1/(2*pi*f*C) #ohm\n", + "#When R=1000 ohm\n", + "theta=atan(min(R)/Xc) #radian\n", + "theta = degrees(theta) # degree\n", + "Z=min(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(Vg/sqrt(2)/abs(Vc))-atan((Vc.imag)/(Vc.real)) #radian\n", + "omega_t = degrees(omega_t) # degree\n", + "alfa1=omega_t #degree\n", + "#When R=22000 ohm\n", + "Z=max(R)-1J*Xc #ohm\n", + "I=Vs/Z #A\n", + "Vc=-1J*I*Xc #V\n", + "#vc=sqrt(2)*abs(Vc)*sind(omega_t+atand(imag(Vc),real(Vc)))\n", + "omega_t=asin(Vg/sqrt(2)/abs(Vc))-atan((Vc.imag)/(Vc.real)) #radian\n", + "omega_t = degrees(omega_t) #degree\n", + "alfa2=omega_t #degree\n", + "print \"Minimum firing angle = %0.1f degree\" %alfa1.real\n", + "print \"Maximum firing angle = %0.1f degree\" %alfa2.real" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum firing angle = 8.8 degree\n", + "Maximum firing angle = 74.1 degree\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_31, page 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "R=0.8 #ohm\n", + "L=10*10**-6 #H\n", + "C=50*10**-6 #F\n", + "#RVC**2*C/IL\n", + "L_lower=VC**2*C/IL**2 #H\n", + "Ip=VC*sqrt(C/L_lower) #A\n", + "print \"Value of L should be greater than %0.1e\"%L_lower,\"H.\"\n", + "print \"For this value of L, Peak capacitor current is\",Ip,\"A. But it should be less than maximum load current.\"\n", + "#Let Ip=34.6 A\n", + "Ip=34.6 #A\n", + "L=C/(Ip/VC)**2 #H\n", + "print \"Value of L = %0.2e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 2.40e-05 F \n", + "Value of L should be greater than 1.5e-04 H.\n", + "For this value of L, Peak capacitor current is 40.0 A. But it should be less than maximum load current.\n", + "Value of L = 2.00e-04 H \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_35, page 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Vdc=100 #V\n", + "L=0.1*10**-3 #H\n", + "C=10*10**-6 #F\n", + "Vc=100 #V\n", + "t_off_thyristor=25*10**-6 #s\n", + "IL=10 #A\n", + "t_off=Vc*C/IL #s\n", + "print \"T_off is %0.1e\"%t_off,\"seconds. It is greater than thristor turn off time, so it is sufficient for communication.\"\n", + "Ip=Vdc*sqrt(C/L) #A\n", + "print \"Current rating = %0.2f A \"%Ip " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T_off is 1.0e-04 seconds. It is greater than thristor turn off time, so it is sufficient for communication.\n", + "Current rating = 31.62 A \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_36, page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "dv_by_dt=25/10**-6 #V/s\n", + "L=0.2*10**-3 #H\n", + "Vrms=230 #V\n", + "damping=0.65 #damping factor\n", + "Vm=sqrt(2)*Vrms #V\n", + "C=1/(2*L)*(0.564*Vm/dv_by_dt)**2 #F\n", + "R=2*damping*sqrt(L/C) #ohm\n", + "print \"Value of C = %0.4e F \" %C\n", + "print \"Value of R = %0.1f ohm \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 1.3462e-07 F \n", + "Value of R = 50.1 ohm \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_37, page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=300 #V\n", + "RL=10 #ohm\n", + "L=0 #H\n", + "Ith=100 #A\n", + "f=2000 #Hz\n", + "dv_by_dt=100*10**6 #V/s\n", + "#dv/dt=(vth(tau)-vth(0))/tau\n", + "#dv/dt=RL*(1-0.368)*V/(R+RL)/((R+RL)*C)\n", + "R=V/Ith #ohm\n", + "C=RL*(1-0.368)*V/(R+RL)/(R+RL)/dv_by_dt\n", + "print \"Value of R = %0.2f ohm \" %R\n", + "print \"Value of C = %0.2e F \" %C\n", + "Ploss=1/2*C*V**2*f #W\n", + "print \"Power loss in snubber circuit = %0.2f W \" %Ploss\n", + "print \"Power rating of resitance is %0.2f\"%Ploss,\"W as all energy will be disspated in the resistance.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R = 3.00 ohm \n", + "Value of C = 1.12e-07 F \n", + "Power loss in snubber circuit = 10.10 W \n", + "Power rating of resitance is 10.10 W as all energy will be disspated in the resistance.\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_38, page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "R=4 #ohm\n", + "L=6*10**-6 #H\n", + "C=6*10**-6 #F\n", + "V=300 #V\n", + "di_by_dt_max=V/L #A/s\n", + "Isc=V/R #A\n", + "dvc_by_dt=R*di_by_dt_max+Isc/C #V/s\n", + "print \"Maximum permissible value of di/dt = %0.e A/s \" %di_by_dt_max \n", + "print \"Maximum permissible value of dv/dt = %0.3e V/s \" %dvc_by_dt " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum permissible value of di/dt = 5e+07 A/s \n", + "Maximum permissible value of dv/dt = 2.125e+08 V/s \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_39, page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import ceil\n", + "#Given data: \n", + "RL=8 #ohm\n", + "V=230 #V\n", + "Ip=100 #A\n", + "SF=2 #safety factor\n", + "di_by_dt_max=40/10**-6/2 #A/s\n", + "dv_by_dt_max=150/10**-6/2 #V/s\n", + "\n", + "L=sqrt(2)*V/di_by_dt_max #H\n", + "print \"Value of L = %0.3e H \" %L \n", + "R=L/(sqrt(2)*V)*dv_by_dt_max #ohm\n", + "print \"Value of R = %0.2f ohm \" %R \n", + "IL_peak=(sqrt(2)*V)/RL #A\n", + "Ic_peak=(sqrt(2)*V)/R #A\n", + "Itotal=IL_peak+Ic_peak #A\n", + "print \"Total current through capacitor for these values = %0.2f A \" %Itotal \n", + "print \"Itotal>Ip, therefore value of R should be increased.\" \n", + "Ic_max=Ip-IL_peak #A\n", + "R=(sqrt(2)*V)/Ic_max #ohm\n", + "R=ceil(R) #ohm\n", + "print \"New Value of R = %0.2f ohm \" %R \n", + "damping=0.65 \n", + "C=4*damping**2*L/R**2 #F\n", + "print \"Value of C = %0.4f micro F \" %(C*10**6) \n", + "print \"Value of L = %0.2f micro H \" %(L*10**6) \n", + "#Ic_switching=C*dv/dt\n", + "dv_by_dt=sqrt(2)*V/(R+RL)/C #V/s\n", + "print \"Value of dv/dt is %0.3e\"%dv_by_dt,\"V/s.\\nIt is within the limit for the calculated value of R, L & C. Design is safe.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of L = 1.626e-05 H \n", + "Value of R = 3.75 ohm \n", + "Total current through capacitor for these values = 127.40 A \n", + "Itotal>Ip, therefore value of R should be increased.\n", + "New Value of R = 6.00 ohm \n", + "Value of C = 0.7635 micro F \n", + "Value of L = 16.26 micro H \n", + "Value of dv/dt is 3.043e+07 V/s.\n", + "It is within the limit for the calculated value of R, L & C. Design is safe.\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1_40, page 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=230 #V\n", + "R1=2 #ohm\n", + "R2=5 #ohm\n", + "R3=1 #ohm\n", + "R4=6 #ohm\n", + "R5=5 #ohm\n", + "Isqr_t=30 #A**2-s\n", + "R=R1+R2*R3/(R2+R3) #ohm(X grounded)\n", + "Ifault=sqrt(2)*V/R #A\n", + "tc=Isqr_t/Ifault**2 #s\n", + "print \"Fault clearing time = %0.3e seconds\" %tc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fault clearing time = 2.276e-03 seconds\n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2.ipynb new file mode 100755 index 00000000..17930099 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2.ipynb @@ -0,0 +1,1212 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2, Phase Controlled Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_1, page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sin, cos, sqrt\n", + "#Given data: \n", + "Vin=400.0 #V\n", + "alfa=30.0 #degree\n", + "R=50.0 #ohm\n", + "\n", + "#Solution :\n", + "Vdc=Vin/pi/2*(1+cos(alfa*pi/180)) #V\n", + "print \"Average load voltage = %0.1f V \" %Vdc \n", + "I=Vdc/R #A\n", + "print \"Average load current = %0.3f A \" %I \n", + "Vrms=Vin*sqrt((180-alfa)/4/180+sin(2*alfa*pi/180)/8/pi) #V\n", + "print \"rms load voltage = %0.2f V \" %Vrms \n", + "Irms=Vrms/R #A\n", + "print \"rms load current = %0.3f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load voltage = 118.8 V \n", + "Average load current = 2.376 A \n", + "rms load voltage = 197.10 V \n", + "rms load current = 3.942 A \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_2, page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy.mpmath import *\n", + "#Given data: \n", + "Vo=50 #V\n", + "R=10 #ohm\n", + "#Vin=100*sin(omega*t) #V\n", + "Vm=100 #V\n", + "\n", + "#Solution :\n", + "omega_t=asin(Vo/Vm) #radian\n", + "Iavg=1/2/pi*quad(lambda omega_t:(Vm*sin(omega_t)-Vo)/R,[omega_t,omega_t+2*pi/3]) #A\n", + "print \"Average current in the circuit = %0.2f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 1.09 A \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_3, page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "V=110 # V\n", + "Eb=55.5 #V\n", + "R=10 #ohm\n", + "Vm=V*sqrt(2) #V\n", + "\n", + "#Solution :\n", + "omega_t=degrees(asin(Eb/Vm)) #degree\n", + "Iavg=1/2/180*quad(lambda omega_t:(Vm*sin(omega_t*pi/180)-Eb)/R,[omega_t,180-omega_t]) #A\n", + "print \"Average current in the circuit = %0.3f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 2.495 A \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_4, page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Vs=230 #V\n", + "R=15 #ohm\n", + "alfa=pi/2 #radian\n", + "\n", + "#Solution :\n", + "Vm=sqrt(2)*Vs #V\n", + "Vdc=Vm/2/pi*(1+cos(alfa)) #V\n", + "print \"Vdc = %0.2f V \" %Vdc \n", + "Idc=Vdc/R #A\n", + "print \"Idc = %0.2f A \" %Idc \n", + "Vrms=Vm*sqrt((pi-alfa)/4/pi+sin(pi)/8/pi) #V\n", + "print \"Vrms = %0.2f V \" %Vrms \n", + "Irms=Vrms/R #A\n", + "print \"Irms = %0.2f A\" %Irms\n", + "Pdc=Vdc*Idc #W\n", + "print \"Pdc = %0.2f W\" %Pdc\n", + "Pac=Vrms*Irms #W\n", + "print \"Pac = %0.2f W\" %Pac\n", + "R_eff=Pdc/Pac #rectification efficiency\n", + "print \"Rectification efficiency %0.2f \" %R_eff \n", + "Kf=Vrms/Vdc #Form factor\n", + "print \"Form factor %0.2f \"%Kf\n", + "Kr=sqrt(Kf**2-1) #Ripple factor\n", + "print \"Ripple factor %0.2f \" %Kr\n", + "VA_rating=Vs*Irms #VA\n", + "print \"VoltAmpere rating = %0.2f VA\" %VA_rating\n", + "TUF=Pdc/VA_rating #Transformer utilization factor\n", + "print \"Transformer utilization factor %.2f\" %TUF\n", + "PIV=Vm #V\n", + "print \"Peak Inverse Voltage across thyristor = %0.f2 V\" %PIV\n", + "#Ans in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 51.77 V \n", + "Idc = 3.45 A \n", + "Vrms = 115.00 V \n", + "Irms = 7.67 A\n", + "Pdc = 178.66 W\n", + "Pac = 881.67 W\n", + "Rectification efficiency 0.20 \n", + "Form factor 2.22 \n", + "Ripple factor 1.98 \n", + "VoltAmpere rating = 1763.33 VA\n", + "Transformer utilization factor 0.10\n", + "Peak Inverse Voltage across thyristor = 3252 V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_5, page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vo=150 #V\n", + "R=30 #ohm\n", + "alfa=45 #degree\n", + "\n", + "#Solution :\n", + "Vdc=sqrt(2)*Vo/pi*(1+cos(alfa*pi/180)) #V\n", + "print \"Average dc Voltage = %0.2f V\" %Vdc\n", + "Iavg=Vdc/R #A\n", + "print \"Average load current = %0.2f A\" %Iavg\n", + "Vrms=sqrt(2)*Vo*sqrt((180-alfa)/2/180+sin(90*pi/180)/4/pi ) #V\n", + "print \"rms load Voltage = %0.f V\" %Vrms\n", + "Irms=Vrms/R #A\n", + "print \"rms load current = %0.3f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average dc Voltage = 115.27 V\n", + "Average load current = 3.84 A\n", + "rms load Voltage = 143 V\n", + "rms load current = 4.767 A \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_6, page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Vdc=100 #V\n", + "Ip=15 #A\n", + "alfa=30 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V\n", + "Vrms_2nd=Vm/sqrt(2) #V\n", + "TurnRatio=Vs/Vrms_2nd \n", + "print \"(a) Turn ratio of transformer\",round(TurnRatio, 2)\n", + "Irms_2nd=sqrt(Ip**2/2) #A\n", + "Rating=2*Vrms_2nd*Irms_2nd #VA\n", + "print \"(b) Transformer rating = %0.2f VA\" %Rating \n", + "PIV=2*Vm #V\n", + "print \"(c) PIV = %0.2f V\" %PIV\n", + "print \"(d) RMS value of thyristor current = %0.2f A\" %Irms_2nd\n", + "#/Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Turn ratio of transformer 1.78\n", + "(b) Transformer rating = 2746.20 VA\n", + "(c) PIV = 366.16 V\n", + "(d) RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_7, page 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "P=10 #kW\n", + "Idc=50 #A\n", + "SF=2 #safety factor\n", + "\n", + "#Solution :\n", + "Vdc=P*1000/Idc #V\n", + "alfa=0 #degree\n", + "Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V\n", + "PIV=2*Vm #V\n", + "Vthy=SF*PIV #V\n", + "print \"(a) Voltage rating of thristor = %0.2f V\" %Vthy\n", + "PIV=Vm #V#for bridge rectifier\n", + "Vthy=SF*PIV #V\n", + "print \"(b) Voltage rating of thristor = %0.2f V\" %Vthy\n", + "#/Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Voltage rating of thristor = 1263.44 V\n", + "(b) Voltage rating of thristor = 631.72 V\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_8, page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Io=15 #A\n", + "R=0.5 #ohm\n", + "L=0.3 #H\n", + "E1=100 #V\n", + "E2=-100 #V\n", + "\n", + "#Solution :\n", + "#/part (a)\n", + "Vm=sqrt(2)*Vs #V\n", + "#2*Vm/pi*cos(alfa)=E1+Io*R\n", + "alfa1=degrees(acos((E1+Io*R)/(2*Vm/pi))) #degree\n", + "print \"(a) Firing angle = %0.2f degree\" %alfa1\n", + "#/part (b)\n", + "alfa2=degrees(acos((E2+Io*R)/(2*Vm))) #degree\n", + "print \"(b) Firing angle = %0.3f degree\" %alfa2\n", + "print \"Part(c) : \" \n", + "#Pin=Vs*Io*cos(theta)\n", + "Pout=E1*Io+Io**2*R #W\n", + "#Pin=Pout\n", + "cos_theta=(Pout/Vs/Io) #laging\n", + "print \"When E=100, input power factor = %0.3f lagging \" %cos_theta \n", + "Pout=-E2*Io-Io**2*R #W\n", + "#Pin=Pout\n", + "cos_theta=(Pout/Vs/Io) #laging\n", + "print \"When E=-100, input power factor = %0.3f lagging \" %cos_theta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Firing angle = 58.73 degree\n", + "(b) Firing angle = 98.175 degree\n", + "Part(c) : \n", + "When E=100, input power factor = 0.467 lagging \n", + "When E=-100, input power factor = 0.402 lagging \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_9, page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "f=50 #Hz\n", + "R=5 #ohm\n", + "L=8*10**-3 #H\n", + "E=50 #V\n", + "alfa=40 #degree\n", + "\n", + "#Solution :\n", + "#Vdc=2*sqrt(2)*V*cosd(alfa)/pi=E+Io*R\n", + "Io=(2*sqrt(2)*V*cos(alfa*pi/180)/pi-E)/R #A\n", + "print \"Average value of load current = %0.2f A\" %Io" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average value of load current = 21.73 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_10, page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Vdc=100 #V\n", + "Ip=15 #A\n", + "alfa=30 #degree\n", + "\n", + "#Solution :\n", + "#Vdc=2*Vm*cos(alfa)/pi-2*1.7#(Full converter bridge)\n", + "Vm=(Vdc+2*1.7)/2/cos(alfa*pi/180)*pi #V\n", + "Vrms=Vm/sqrt(2) #V\n", + "TurnRatio=Vs/Vrms \n", + "print \"(a) Turn ratio of transformer\",round(TurnRatio, 3)\n", + "Irms=sqrt(Ip**2/2) #A\n", + "Rating=Vrms*Ip #VA\n", + "print \"(b) Transformer rating = %0.2f VA\" %Rating\n", + "PIV=Vm #V\n", + "print \"(c) PIV = %0.2f V\" %PIV\n", + "print \"(d) RMS value of thyristor current = %0.2f A\" %Irms" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Turn ratio of transformer 1.734\n", + "(b) Transformer rating = 1989.23 VA\n", + "(c) PIV = 187.55 V\n", + "(d) RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_11, page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=90 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "print \"Vrms = %0.1f V\" %Vrms\n", + "kF=Vrms/Vdc \n", + "print \"Form factor =\",round(kF,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 162.6 V\n", + "Form factor = 1.571\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_12, page 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=90 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "print \"Vrms = %0.2f V\" %Vrms\n", + "Is_by_I=sqrt(1-pi/2/pi) \n", + "Is1_by_I=2*sqrt(2)/pi*cos(pi/4) \n", + "HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless\n", + "print \"Harmonic factor =\",round(HF,3) \n", + "theta1=-alfa/2*pi/180 #radian\n", + "DF=cos(theta1) #unitless\n", + "print \"Displacement factor =\",round(DF,4) \n", + "PF=(Is1_by_I/Is_by_I)*DF #lagging\n", + "print \"Power factor = %0.4f lagging \" %PF " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 162.63 V\n", + "Harmonic factor = 0.483\n", + "Displacement factor = 0.7071\n", + "Power factor = 0.6366 lagging \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_13, page 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=pi/3 #radian\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa)#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vs #V\n", + "print \"Vrms = %0.2f V\" %Vrms\n", + "Is_by_I=sqrt(1-pi/2/pi) \n", + "Is1_by_I=2*sqrt(2)/pi*cos(pi/4) \n", + "HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless\n", + "print \"Harmonic factor =\",round(HF,3) \n", + "fi1=-alfa #radian\n", + "DF=cos(fi1) #unitless\n", + "print \"Displacement factor =\",round(DF,2) \n", + "PF=(Is1_by_I/Is_by_I)*DF #lagging\n", + "print \"Power factor = %0.2f lagging \" %PF " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 230.00 V\n", + "Harmonic factor = 0.483\n", + "Displacement factor = 0.5\n", + "Power factor = 0.45 lagging \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_14, page 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=30*pi/180 #radian\n", + "I=4 #A\n", + "\n", + "#Solution :\n", + "print \"part (a) : \" \n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa)#V\n", + "RL=Vdc/I #ohm\n", + "IL=I*2*sqrt(2)/pi #A\n", + "Pin_active=Vs*IL*cos(alfa) #W\n", + "Pin_reactive=Vs*IL*sin(alfa) #vars\n", + "Pin_appearent=Vs*IL #VA\n", + "print \"dc output voltage = %0.2f V \" % Vdc \n", + "print \"Active power input = %0.2f W\" %Pin_active\n", + "print \"Reactive power input = %0.2f vars \" %Pin_reactive \n", + "print \"Appearent power input = %0.2f VA \" %Pin_appearent \n", + "print \"part (b) : \" \n", + "Vdc=Vm/pi*(1+cos(alfa))#V\n", + "IL=Vdc/RL #A\n", + "I_fund=2*sqrt(2)/pi*IL*cos(alfa/2) #A\n", + "Pin_active=Vs*I_fund*cos(alfa/2) #W\n", + "Pin_reactive=Vs*I_fund*sin(alfa/2) #vars\n", + "Pin_appearent=Vs*I_fund #VA\n", + "print \"dc output voltage = %0.2f V \" % Vdc \n", + "print \"Active power input = %0.2f W\" %Pin_active\n", + "print \"Reactive power input = %0.2f vars \" %Pin_reactive \n", + "print \"Appearent power input = %0.2f VA \" %Pin_appearent \n", + "print \"part (c) : \" \n", + "Vdc=Vs/sqrt(2)/pi*(1+cos(alfa))#V\n", + "Idc=Vdc/RL #A\n", + "print \"dc output voltage = %0.2f V \"%Vdc \n", + "print \"dc output current = %0.2f A \" %Idc " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a) : \n", + "dc output voltage = 179.33 V \n", + "Active power input = 717.32 W\n", + "Reactive power input = 414.15 vars \n", + "Appearent power input = 828.29 VA \n", + "part (b) : \n", + "dc output voltage = 193.20 V \n", + "Active power input = 832.58 W\n", + "Reactive power input = 223.09 vars \n", + "Appearent power input = 861.95 VA \n", + "part (c) : \n", + "dc output voltage = 96.60 V \n", + "dc output current = 2.15 A \n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_15, page 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=30 #degree\n", + "IL=10 #A\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa*pi/180)#V\n", + "print \"dc output voltage = %0.2f V \"%Vdc \n", + "Irms=IL #A\n", + "print \"(b) Irms = %0.2f A\" %Irms\n", + "Is1=2*sqrt(2)/pi*IL #A\n", + "print \"(c) Fundamental component of input current = %0.2f A\" %Is1\n", + "DF=cos(-alfa*pi/180) #unitless\n", + "print \"(d) Displacement fator =\",round(DF,3) \n", + "pf_in=Is1/IL*DF #lagging\n", + "print \"(e) Input power fator = %0.3f lagging \" %pf_in \n", + "HF=sqrt((IL/Is1)**2-1) #unitless\n", + "print \"(f) Harmonic factor =\",round(HF,3) \n", + "Vrms=Vs #V\n", + "FF=Vrms/Vdc #form fator\n", + "RF=sqrt(FF**2-1) #ripple fator\n", + "print \"(g) Ripple factor =\",round(RF,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc output voltage = 179.33 V \n", + "(b) Irms = 10.00 A\n", + "(c) Fundamental component of input current = 9.00 A\n", + "(d) Displacement fator = 0.866\n", + "(e) Input power fator = 0.780 lagging \n", + "(f) Harmonic factor = 0.483\n", + "(g) Ripple factor = 0.803\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_16, page 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=240 #V\n", + "f=50 #Hz\n", + "alfa=60 #degree\n", + "RL=10 #ohm\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"(a) average load voltage = %0.2f V \" %Vdc \n", + "I=Vdc/RL #A\n", + "Is=I*sqrt(1-alfa/180) #A\n", + "Irms=Is #A\n", + "print \"(b) rms input current = %0.2f A \" %Irms \n", + "Is1=2*sqrt(2)/pi*I*cos(alfa/2*pi/180) #A\n", + "fi1=-alfa/2 #degree\n", + "DF=cos(fi1*pi/180) #unitless\n", + "pf_in=Is1/Is*DF #lagging\n", + "print \"(c) Input power fator = %0.3f lagging \" %pf_in \n", + "Pavg=I**2*RL #W\n", + "print \"(d) Average power dissipated = %0.2f W \" %Pavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) average load voltage = 162.06 V \n", + "(b) rms input current = 13.23 A \n", + "(c) Input power fator = 0.827 lagging \n", + "(d) Average power dissipated = 2626.25 W \n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_17, page 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "IL=200 #A\n", + "VL=400 #V\n", + "Vdc=360 #V\n", + "variation=10 #%\n", + "\n", + "#Solution :\n", + "Vm=VL*sqrt(2)/sqrt(3) #V\n", + "#Vdc=3*sqrt(3)/pi*Vm*cosd(alfa)#V\n", + "alfa = degrees(acos(Vdc/(3*sqrt(3)/pi*Vm)))#degree\n", + "print \"Firing angle = %0.1f degree\" %alfa\n", + "S=sqrt(3)*VL*IL #VA\n", + "print \"Apparent power = %0.f VA \" %S \n", + "P=S*cos(alfa*pi/180) #W\n", + "print \"Active power = %0.2f W \" %P \n", + "Q=sqrt(S**2-P**2) #vars\n", + "print \"Rective power = %0.2f vars \" %Q \n", + "Vac1=(1+variation/100)*VL #V\n", + "alfa1=degrees(acos(Vdc/(3*Vac1*sqrt(2)/pi))) #degree\n", + "Vac2=(1-variation/100)*VL #V\n", + "alfa2=degrees(acos(Vdc/(3*Vac2*sqrt(2)/pi))) #degree\n", + "print \"When variation is +10%%, firing angle = %0.1f degree \" %alfa1 \n", + "print \"When variation is -10%%, firing angle = %0.1f degree \" %alfa2 \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 48.2 degree\n", + "Apparent power = 138564 VA \n", + "Active power = 92343.59 W \n", + "Rective power = 103308.58 vars \n", + "When variation is +10%, firing angle = 52.7 degree \n", + "When variation is -10%, firing angle = 42.2 degree \n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_18, page 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "f=50 #Hz\n", + "Idc=150 #A\n", + "alfa=60 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc=3*sqrt(3)/pi*Vm*cos(alfa*pi/180)#V\n", + "Pdc=Vdc*Idc #W\n", + "print \"Output power, Pdc = %0.2f W \" %Pdc \n", + "Iavg=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms=Idc/sqrt(3) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms \n", + "Ipeak=Idc #A\n", + "print \"Peak current through thyristor = %0.2f A \" %Ipeak \n", + "PIV=sqrt(2)*Vs #V\n", + "print \"Peak inverse voltage = %0.2f V \" %PIV \n", + "#Answer of first part in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power, Pdc = 40514.23 W \n", + "Average thyristor current = 50.00 A \n", + "RMS value of thyristor current = 86.60 A \n", + "Peak current through thyristor = 150.00 A \n", + "Peak inverse voltage = 565.69 V \n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_19, page 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "V=415 #V\n", + "Vdc=460 #V\n", + "I=200 #A\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=V*sqrt(2)/sqrt(3) #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree\n", + "print \"Converter firing angle = %0.2f degree \" %alfa \n", + "Pdc=Vdc*I #W\n", + "print \"dc power = %0.2f kW \" %(Pdc/1000) \n", + "IL=I*sqrt(120/180) #A\n", + "print \"AC line current = %0.2f A \" %(IL) \n", + "Ipeak=I #A\n", + "Irms=Ipeak*sqrt(120/360) #A\n", + "print \"RMS value of thyristor current = %0.1f A \" %(Irms) \n", + "Iavg=Ipeak/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Converter firing angle = 34.84 degree \n", + "dc power = 92.00 kW \n", + "AC line current = 163.30 A \n", + "RMS value of thyristor current = 115.5 A \n", + "Average thyristor current = 66.67 A \n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_20, page 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "emf=200 #V\n", + "Rint=0.5 #ohm\n", + "I=20 #A\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc=emf+Rint*I #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree\n", + "print \"Firing angle = %0.2f degree \" %(alfa) \n", + "Pout=emf*I+I**2*Rint #W\n", + "Is=sqrt(I**2*120/180) #A\n", + "cos_theta=Pout/(sqrt(3)*Vs*Is) #power factor\n", + "print \"Input power factor = %0.3f lagging \" %(cos_theta) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 47.46 degree \n", + "Input power factor = 0.646 lagging \n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_21, page 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "R=10 #ohm\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc_max=3*sqrt(3)*Vm/2/pi*(1+cos(0)) #V\n", + "#Vdc should be Vdc_max/2\n", + "Vdc=Vdc_max*50/100 #V\n", + "alfa=degrees(acos(1-Vdc/(3*sqrt(3)*Vm/2/pi)))#degree\n", + "print \"Firing angle = %0.2f degree \" %alfa \n", + "Idc=Vdc/R #A\n", + "print \"Average output current = %0.2f A \" %Idc \n", + "Vrms=sqrt(3)*Vm*sqrt(3/4/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "Irms=Vrms/R #A\n", + "print \"RMS output voltage = %0.2f V \" %Vrms \n", + "print \"RMS output current = %0.2f A \" %Irms \n", + "Iavg_thy=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg_thy \n", + "Irms_thy=Irms/sqrt(3) #A\n", + "print \"RMS thyristor current = %0.2f A \" %Irms_thy \n", + "Eff=Vdc*Idc/(Vrms*Irms)*100 #%\n", + "print \"Rectification Efficiency = %0.2f %% \" %Eff \n", + "Iline_rms=Irms*sqrt(120/180) #A\n", + "VA_in=3*Vs*Iline_rms/sqrt(3) #VA\n", + "TUF=Vdc*Idc/VA_in \n", + "print \"Transformer utilisation factor = %0.2f \" %TUF \n", + "Pin_active=Irms**2*R #W\n", + "pf_in=Pin_active/VA_in #lagging\n", + "print \"Input power factor = %0.2f lagging \" %pf_in \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 90.00 degree \n", + "Average output current = 27.01 A \n", + "RMS output voltage = 346.41 V \n", + "RMS output current = 34.64 A \n", + "Average thyristor current = 9.00 A \n", + "RMS thyristor current = 20.00 A \n", + "Rectification Efficiency = 60.79 % \n", + "Transformer utilisation factor = 0.37 \n", + "Input power factor = 0.61 lagging \n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_22, page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "R=10 #ohm\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "alfa=60 #degree(For 50% output voltage)\n", + "Vdc=3*sqrt(3)*Vm/pi*cos(alfa*pi/180) #V\n", + "alfa=degrees(acos(Vdc/3/sqrt(3)/Vm*pi)) #V\n", + "print \"Firing angle = %0.2f degree \" %alfa \n", + "Idc=Vdc/R #A\n", + "print \"Average output current = %0.2f A \" %Idc \n", + "Vrms=sqrt(3)*Vm*sqrt(0.5+3*sqrt(3)/4/pi*cos(2*alfa*pi/180)) #V\n", + "Irms=Vrms/R #A\n", + "print \"RMS output voltage = %0.2f V \" %Vrms \n", + "print \"RMS output current = %0.2f A \" %Irms \n", + "Iavg_thy=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg_thy \n", + "Irms_thy=Irms/sqrt(3) #A\n", + "print \"RMS thyristor current = %0.2f A \" %Irms_thy \n", + "Eff=Vdc*Idc/(Vrms*Irms)*100 #%\n", + "print \"Rectification Efficiency = %0.2f %% \" %Eff \n", + "Iline_rms=Irms*sqrt(120/180) #A\n", + "VA_in=3*Vs*Iline_rms/sqrt(3) #VA\n", + "TUF=Vdc*Idc/VA_in \n", + "print \"Transformer utilisation factor = %0.2f \" %TUF \n", + "Pin_active=Irms**2*R #W\n", + "pf_in=Pin_active/VA_in #lagging\n", + "print \"Input power factor = %0.2f lagging \" %pf_in \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 60.00 degree \n", + "Average output current = 27.01 A \n", + "RMS output voltage = 306.33 V \n", + "RMS output current = 30.63 A \n", + "Average thyristor current = 9.00 A \n", + "RMS thyristor current = 17.69 A \n", + "Rectification Efficiency = 77.74 % \n", + "Transformer utilisation factor = 0.42 \n", + "Input power factor = 0.54 lagging \n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_25, page 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "f=50 #Hz\n", + "Eb=300 #V\n", + "\n", + "#Solution :\n", + "Vdc=Eb #V\n", + "Vm=Vs*sqrt(2) #V\n", + "#Vdc=3*sqrt(3)/2/pi*Vm*cosd(alfa) #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/2/pi*Vm))) #degree\n", + "print \"Firing angle = %0.1f degree \" %alfa " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 50.1 degree \n" + ] + } + ], + "prompt_number": 66 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..fc827ec7 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter2_1.ipynb @@ -0,0 +1,1218 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cbf26cb85c42330215276d27f8631bb6acbab7ffdb561b6d65a432ffeda0535b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2, Phase Controlled Rectifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_1, page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sin, cos, sqrt\n", + "#Given data: \n", + "Vin=400.0 #V\n", + "alfa=30.0 #degree\n", + "R=50.0 #ohm\n", + "\n", + "#Solution :\n", + "Vdc=Vin/pi/2*(1+cos(alfa*pi/180)) #V\n", + "print \"Average load voltage = %0.1f V \" %Vdc \n", + "I=Vdc/R #A\n", + "print \"Average load current = %0.3f A \" %I \n", + "Vrms=Vin*sqrt((180-alfa)/4/180+sin(2*alfa*pi/180)/8/pi) #V\n", + "print \"rms load voltage = %0.2f V \" %Vrms \n", + "Irms=Vrms/R #A\n", + "print \"rms load current = %0.3f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load voltage = 118.8 V \n", + "Average load current = 2.376 A \n", + "rms load voltage = 197.10 V \n", + "rms load current = 3.942 A \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_2, page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy.mpmath import quad\n", + "from math import asin, pi, sin\n", + "#Given data: \n", + "Vo=50 #V\n", + "R=10 #ohm\n", + "#Vin=100*sin(omega*t) #V\n", + "Vm=100 #V\n", + "\n", + "#Solution :\n", + "omega_t=asin(Vo/Vm) #radian\n", + "Iavg=1/2/pi*quad(lambda omega_t:(Vm*sin(omega_t)-Vo)/R,[omega_t,omega_t+2*pi/3]) #A\n", + "print \"Average current in the circuit = %0.2f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 1.09 A \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_3, page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sqrt, degrees, asin, sin, pi\n", + "from sympy.mpmath import quad\n", + "#Given data: \n", + "V=110 # V\n", + "Eb=55.5 #V\n", + "R=10 #ohm\n", + "Vm=V*sqrt(2) #V\n", + "\n", + "#Solution :\n", + "omega_t=degrees(asin(Eb/Vm)) #degree\n", + "Iavg=1/2/180*quad(lambda omega_t:(Vm*sin(omega_t*pi/180)-Eb)/R,[omega_t,180-omega_t]) #A\n", + "print \"Average current in the circuit = %0.3f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average current in the circuit = 2.495 A \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_4, page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data: \n", + "Vs=230 #V\n", + "R=15 #ohm\n", + "alfa=pi/2 #radian\n", + "\n", + "#Solution :\n", + "Vm=sqrt(2)*Vs #V\n", + "Vdc=Vm/2/pi*(1+cos(alfa)) #V\n", + "print \"Vdc = %0.2f V \" %Vdc \n", + "Idc=Vdc/R #A\n", + "print \"Idc = %0.2f A \" %Idc \n", + "Vrms=Vm*sqrt((pi-alfa)/4/pi+sin(pi)/8/pi) #V\n", + "print \"Vrms = %0.2f V \" %Vrms \n", + "Irms=Vrms/R #A\n", + "print \"Irms = %0.2f A\" %Irms\n", + "Pdc=Vdc*Idc #W\n", + "print \"Pdc = %0.2f W\" %Pdc\n", + "Pac=Vrms*Irms #W\n", + "print \"Pac = %0.2f W\" %Pac\n", + "R_eff=Pdc/Pac #rectification efficiency\n", + "print \"Rectification efficiency %0.2f \" %R_eff \n", + "Kf=Vrms/Vdc #Form factor\n", + "print \"Form factor %0.2f \"%Kf\n", + "Kr=sqrt(Kf**2-1) #Ripple factor\n", + "print \"Ripple factor %0.2f \" %Kr\n", + "VA_rating=Vs*Irms #VA\n", + "print \"VoltAmpere rating = %0.2f VA\" %VA_rating\n", + "TUF=Pdc/VA_rating #Transformer utilization factor\n", + "print \"Transformer utilization factor %.2f\" %TUF\n", + "PIV=Vm #V\n", + "print \"Peak Inverse Voltage across thyristor = %0.f2 V\" %PIV\n", + "#Ans in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 51.77 V \n", + "Idc = 3.45 A \n", + "Vrms = 115.00 V \n", + "Irms = 7.67 A\n", + "Pdc = 178.66 W\n", + "Pac = 881.67 W\n", + "Rectification efficiency 0.20 \n", + "Form factor 2.22 \n", + "Ripple factor 1.98 \n", + "VoltAmpere rating = 1763.33 VA\n", + "Transformer utilization factor 0.10\n", + "Peak Inverse Voltage across thyristor = 3252 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_5, page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vo=150 #V\n", + "R=30 #ohm\n", + "alfa=45 #degree\n", + "\n", + "#Solution :\n", + "Vdc=sqrt(2)*Vo/pi*(1+cos(alfa*pi/180)) #V\n", + "print \"Average dc Voltage = %0.2f V\" %Vdc\n", + "Iavg=Vdc/R #A\n", + "print \"Average load current = %0.2f A\" %Iavg\n", + "Vrms=sqrt(2)*Vo*sqrt((180-alfa)/2/180+sin(90*pi/180)/4/pi ) #V\n", + "print \"rms load Voltage = %0.f V\" %Vrms\n", + "Irms=Vrms/R #A\n", + "print \"rms load current = %0.3f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average dc Voltage = 115.27 V\n", + "Average load current = 3.84 A\n", + "rms load Voltage = 143 V\n", + "rms load current = 4.767 A \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_6, page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Vdc=100 #V\n", + "Ip=15 #A\n", + "alfa=30 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V\n", + "Vrms_2nd=Vm/sqrt(2) #V\n", + "TurnRatio=Vs/Vrms_2nd \n", + "print \"(a) Turn ratio of transformer\",round(TurnRatio, 2)\n", + "Irms_2nd=sqrt(Ip**2/2) #A\n", + "Rating=2*Vrms_2nd*Irms_2nd #VA\n", + "print \"(b) Transformer rating = %0.2f VA\" %Rating \n", + "PIV=2*Vm #V\n", + "print \"(c) PIV = %0.2f V\" %PIV\n", + "print \"(d) RMS value of thyristor current = %0.2f A\" %Irms_2nd\n", + "#/Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Turn ratio of transformer 1.78\n", + "(b) Transformer rating = 2746.20 VA\n", + "(c) PIV = 366.16 V\n", + "(d) RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_7, page 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "P=10 #kW\n", + "Idc=50 #A\n", + "SF=2 #safety factor\n", + "\n", + "#Solution :\n", + "Vdc=P*1000/Idc #V\n", + "alfa=0 #degree\n", + "Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V\n", + "PIV=2*Vm #V\n", + "Vthy=SF*PIV #V\n", + "print \"(a) Voltage rating of thristor = %0.2f V\" %Vthy\n", + "PIV=Vm #V#for bridge rectifier\n", + "Vthy=SF*PIV #V\n", + "print \"(b) Voltage rating of thristor = %0.2f V\" %Vthy\n", + "#/Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Voltage rating of thristor = 1263.44 V\n", + "(b) Voltage rating of thristor = 631.72 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_8, page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, cos, acos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Io=15 #A\n", + "R=0.5 #ohm\n", + "L=0.3 #H\n", + "E1=100 #V\n", + "E2=-100 #V\n", + "\n", + "#Solution :\n", + "#/part (a)\n", + "Vm=sqrt(2)*Vs #V\n", + "#2*Vm/pi*cos(alfa)=E1+Io*R\n", + "alfa1=degrees(acos((E1+Io*R)/(2*Vm/pi))) #degree\n", + "print \"(a) Firing angle = %0.2f degree\" %alfa1\n", + "#/part (b)\n", + "alfa2=degrees(acos((E2+Io*R)/(2*Vm))) #degree\n", + "print \"(b) Firing angle = %0.3f degree\" %alfa2\n", + "print \"Part(c) : \" \n", + "#Pin=Vs*Io*cos(theta)\n", + "Pout=E1*Io+Io**2*R #W\n", + "#Pin=Pout\n", + "cos_theta=(Pout/Vs/Io) #laging\n", + "print \"When E=100, input power factor = %0.3f lagging \" %cos_theta \n", + "Pout=-E2*Io-Io**2*R #W\n", + "#Pin=Pout\n", + "cos_theta=(Pout/Vs/Io) #laging\n", + "print \"When E=-100, input power factor = %0.3f lagging \" %cos_theta " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Firing angle = 58.73 degree\n", + "(b) Firing angle = 98.175 degree\n", + "Part(c) : \n", + "When E=100, input power factor = 0.467 lagging \n", + "When E=-100, input power factor = 0.402 lagging \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_9, page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "f=50 #Hz\n", + "R=5 #ohm\n", + "L=8*10**-3 #H\n", + "E=50 #V\n", + "alfa=40 #degree\n", + "\n", + "#Solution :\n", + "#Vdc=2*sqrt(2)*V*cosd(alfa)/pi=E+Io*R\n", + "Io=(2*sqrt(2)*V*cos(alfa*pi/180)/pi-E)/R #A\n", + "print \"Average value of load current = %0.2f A\" %Io" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average value of load current = 21.73 A\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_10, page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "Vdc=100 #V\n", + "Ip=15 #A\n", + "alfa=30 #degree\n", + "\n", + "#Solution :\n", + "#Vdc=2*Vm*cos(alfa)/pi-2*1.7#(Full converter bridge)\n", + "Vm=(Vdc+2*1.7)/2/cos(alfa*pi/180)*pi #V\n", + "Vrms=Vm/sqrt(2) #V\n", + "TurnRatio=Vs/Vrms \n", + "print \"(a) Turn ratio of transformer\",round(TurnRatio, 3)\n", + "Irms=sqrt(Ip**2/2) #A\n", + "Rating=Vrms*Ip #VA\n", + "print \"(b) Transformer rating = %0.2f VA\" %Rating\n", + "PIV=Vm #V\n", + "print \"(c) PIV = %0.2f V\" %PIV\n", + "print \"(d) RMS value of thyristor current = %0.2f A\" %Irms" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Turn ratio of transformer 1.734\n", + "(b) Transformer rating = 1989.23 VA\n", + "(c) PIV = 187.55 V\n", + "(d) RMS value of thyristor current = 10.61 A\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_11, page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, sin\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=90 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "print \"Vrms = %0.1f V\" %Vrms\n", + "kF=Vrms/Vdc \n", + "print \"Form factor =\",round(kF,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 162.6 V\n", + "Form factor = 1.571\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_12, page 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=90 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "print \"Vrms = %0.2f V\" %Vrms\n", + "Is_by_I=sqrt(1-pi/2/pi) \n", + "Is1_by_I=2*sqrt(2)/pi*cos(pi/4) \n", + "HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless\n", + "print \"Harmonic factor =\",round(HF,3) \n", + "theta1=-alfa/2*pi/180 #radian\n", + "DF=cos(theta1) #unitless\n", + "print \"Displacement factor =\",round(DF,4) \n", + "PF=(Is1_by_I/Is_by_I)*DF #lagging\n", + "print \"Power factor = %0.4f lagging \" %PF " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 162.63 V\n", + "Harmonic factor = 0.483\n", + "Displacement factor = 0.7071\n", + "Power factor = 0.6366 lagging \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_13, page 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=pi/3 #radian\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa)#V\n", + "print \"Vdc = %0.2f V\" %Vdc\n", + "Vrms=Vs #V\n", + "print \"Vrms = %0.2f V\" %Vrms\n", + "Is_by_I=sqrt(1-pi/2/pi) \n", + "Is1_by_I=2*sqrt(2)/pi*cos(pi/4) \n", + "HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless\n", + "print \"Harmonic factor =\",round(HF,3) \n", + "fi1=-alfa #radian\n", + "DF=cos(fi1) #unitless\n", + "print \"Displacement factor =\",round(DF,2) \n", + "PF=(Is1_by_I/Is_by_I)*DF #lagging\n", + "print \"Power factor = %0.2f lagging \" %PF " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vdc = 103.54 V\n", + "Vrms = 230.00 V\n", + "Harmonic factor = 0.483\n", + "Displacement factor = 0.5\n", + "Power factor = 0.45 lagging \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_14, page 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=30*pi/180 #radian\n", + "I=4 #A\n", + "\n", + "#Solution :\n", + "print \"part (a) : \" \n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa)#V\n", + "RL=Vdc/I #ohm\n", + "IL=I*2*sqrt(2)/pi #A\n", + "Pin_active=Vs*IL*cos(alfa) #W\n", + "Pin_reactive=Vs*IL*sin(alfa) #vars\n", + "Pin_appearent=Vs*IL #VA\n", + "print \"dc output voltage = %0.2f V \" % Vdc \n", + "print \"Active power input = %0.2f W\" %Pin_active\n", + "print \"Reactive power input = %0.2f vars \" %Pin_reactive \n", + "print \"Appearent power input = %0.2f VA \" %Pin_appearent \n", + "print \"part (b) : \" \n", + "Vdc=Vm/pi*(1+cos(alfa))#V\n", + "IL=Vdc/RL #A\n", + "I_fund=2*sqrt(2)/pi*IL*cos(alfa/2) #A\n", + "Pin_active=Vs*I_fund*cos(alfa/2) #W\n", + "Pin_reactive=Vs*I_fund*sin(alfa/2) #vars\n", + "Pin_appearent=Vs*I_fund #VA\n", + "print \"dc output voltage = %0.2f V \" % Vdc \n", + "print \"Active power input = %0.2f W\" %Pin_active\n", + "print \"Reactive power input = %0.2f vars \" %Pin_reactive \n", + "print \"Appearent power input = %0.2f VA \" %Pin_appearent \n", + "print \"part (c) : \" \n", + "Vdc=Vs/sqrt(2)/pi*(1+cos(alfa))#V\n", + "Idc=Vdc/RL #A\n", + "print \"dc output voltage = %0.2f V \"%Vdc \n", + "print \"dc output current = %0.2f A \" %Idc " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a) : \n", + "dc output voltage = 179.33 V \n", + "Active power input = 717.32 W\n", + "Reactive power input = 414.15 vars \n", + "Appearent power input = 828.29 VA \n", + "part (b) : \n", + "dc output voltage = 193.20 V \n", + "Active power input = 832.58 W\n", + "Reactive power input = 223.09 vars \n", + "Appearent power input = 861.95 VA \n", + "part (c) : \n", + "dc output voltage = 96.60 V \n", + "dc output current = 2.15 A \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_15, page 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "alfa=30 #degree\n", + "IL=10 #A\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=2*Vm/pi*cos(alfa*pi/180)#V\n", + "print \"dc output voltage = %0.2f V \"%Vdc \n", + "Irms=IL #A\n", + "print \"(b) Irms = %0.2f A\" %Irms\n", + "Is1=2*sqrt(2)/pi*IL #A\n", + "print \"(c) Fundamental component of input current = %0.2f A\" %Is1\n", + "DF=cos(-alfa*pi/180) #unitless\n", + "print \"(d) Displacement fator =\",round(DF,3) \n", + "pf_in=Is1/IL*DF #lagging\n", + "print \"(e) Input power fator = %0.3f lagging \" %pf_in \n", + "HF=sqrt((IL/Is1)**2-1) #unitless\n", + "print \"(f) Harmonic factor =\",round(HF,3) \n", + "Vrms=Vs #V\n", + "FF=Vrms/Vdc #form fator\n", + "RF=sqrt(FF**2-1) #ripple fator\n", + "print \"(g) Ripple factor =\",round(RF,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc output voltage = 179.33 V \n", + "(b) Irms = 10.00 A\n", + "(c) Fundamental component of input current = 9.00 A\n", + "(d) Displacement fator = 0.866\n", + "(e) Input power fator = 0.780 lagging \n", + "(f) Harmonic factor = 0.483\n", + "(g) Ripple factor = 0.803\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_16, page 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=240 #V\n", + "f=50 #Hz\n", + "alfa=60 #degree\n", + "RL=10 #ohm\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2) #V\n", + "Vdc=Vm/pi*(1+cos(alfa*pi/180))#V\n", + "print \"(a) average load voltage = %0.2f V \" %Vdc \n", + "I=Vdc/RL #A\n", + "Is=I*sqrt(1-alfa/180) #A\n", + "Irms=Is #A\n", + "print \"(b) rms input current = %0.2f A \" %Irms \n", + "Is1=2*sqrt(2)/pi*I*cos(alfa/2*pi/180) #A\n", + "fi1=-alfa/2 #degree\n", + "DF=cos(fi1*pi/180) #unitless\n", + "pf_in=Is1/Is*DF #lagging\n", + "print \"(c) Input power fator = %0.3f lagging \" %pf_in \n", + "Pavg=I**2*RL #W\n", + "print \"(d) Average power dissipated = %0.2f W \" %Pavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) average load voltage = 162.06 V \n", + "(b) rms input current = 13.23 A \n", + "(c) Input power fator = 0.827 lagging \n", + "(d) Average power dissipated = 2626.25 W \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_17, page 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "IL=200 #A\n", + "VL=400 #V\n", + "Vdc=360 #V\n", + "variation=10 #%\n", + "\n", + "#Solution :\n", + "Vm=VL*sqrt(2)/sqrt(3) #V\n", + "#Vdc=3*sqrt(3)/pi*Vm*cosd(alfa)#V\n", + "alfa = degrees(acos(Vdc/(3*sqrt(3)/pi*Vm)))#degree\n", + "print \"Firing angle = %0.1f degree\" %alfa\n", + "S=sqrt(3)*VL*IL #VA\n", + "print \"Apparent power = %0.f VA \" %S \n", + "P=S*cos(alfa*pi/180) #W\n", + "print \"Active power = %0.2f W \" %P \n", + "Q=sqrt(S**2-P**2) #vars\n", + "print \"Rective power = %0.2f vars \" %Q \n", + "Vac1=(1+variation/100)*VL #V\n", + "alfa1=degrees(acos(Vdc/(3*Vac1*sqrt(2)/pi))) #degree\n", + "Vac2=(1-variation/100)*VL #V\n", + "alfa2=degrees(acos(Vdc/(3*Vac2*sqrt(2)/pi))) #degree\n", + "print \"When variation is +10%%, firing angle = %0.1f degree \" %alfa1 \n", + "print \"When variation is -10%%, firing angle = %0.1f degree \" %alfa2 \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 48.2 degree\n", + "Apparent power = 138564 VA \n", + "Active power = 92343.59 W \n", + "Rective power = 103308.58 vars \n", + "When variation is +10%, firing angle = 52.7 degree \n", + "When variation is -10%, firing angle = 42.2 degree \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_18, page 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "f=50 #Hz\n", + "Idc=150 #A\n", + "alfa=60 #degree\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc=3*sqrt(3)/pi*Vm*cos(alfa*pi/180)#V\n", + "Pdc=Vdc*Idc #W\n", + "print \"Output power, Pdc = %0.2f W \" %Pdc \n", + "Iavg=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms=Idc/sqrt(3) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms \n", + "Ipeak=Idc #A\n", + "print \"Peak current through thyristor = %0.2f A \" %Ipeak \n", + "PIV=sqrt(2)*Vs #V\n", + "print \"Peak inverse voltage = %0.2f V \" %PIV \n", + "#Answer of first part in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power, Pdc = 40514.23 W \n", + "Average thyristor current = 50.00 A \n", + "RMS value of thyristor current = 86.60 A \n", + "Peak current through thyristor = 150.00 A \n", + "Peak inverse voltage = 565.69 V \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_19, page 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "V=415 #V\n", + "Vdc=460 #V\n", + "I=200 #A\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=V*sqrt(2)/sqrt(3) #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree\n", + "print \"Converter firing angle = %0.2f degree \" %alfa \n", + "Pdc=Vdc*I #W\n", + "print \"dc power = %0.2f kW \" %(Pdc/1000) \n", + "IL=I*sqrt(120/180) #A\n", + "print \"AC line current = %0.2f A \" %(IL) \n", + "Ipeak=I #A\n", + "Irms=Ipeak*sqrt(120/360) #A\n", + "print \"RMS value of thyristor current = %0.1f A \" %(Irms) \n", + "Iavg=Ipeak/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Converter firing angle = 34.84 degree \n", + "dc power = 92.00 kW \n", + "AC line current = 163.30 A \n", + "RMS value of thyristor current = 115.5 A \n", + "Average thyristor current = 66.67 A \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_20, page 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=230 #V\n", + "f=50 #Hz\n", + "emf=200 #V\n", + "Rint=0.5 #ohm\n", + "I=20 #A\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc=emf+Rint*I #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree\n", + "print \"Firing angle = %0.2f degree \" %(alfa) \n", + "Pout=emf*I+I**2*Rint #W\n", + "Is=sqrt(I**2*120/180) #A\n", + "cos_theta=Pout/(sqrt(3)*Vs*Is) #power factor\n", + "print \"Input power factor = %0.3f lagging \" %(cos_theta) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 47.46 degree \n", + "Input power factor = 0.646 lagging \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_21, page 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "R=10 #ohm\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "Vdc_max=3*sqrt(3)*Vm/2/pi*(1+cos(0)) #V\n", + "#Vdc should be Vdc_max/2\n", + "Vdc=Vdc_max*50/100 #V\n", + "alfa=degrees(acos(1-Vdc/(3*sqrt(3)*Vm/2/pi)))#degree\n", + "print \"Firing angle = %0.2f degree \" %alfa \n", + "Idc=Vdc/R #A\n", + "print \"Average output current = %0.2f A \" %Idc \n", + "Vrms=sqrt(3)*Vm*sqrt(3/4/pi*(pi-pi/2+sin(pi)/2)) #V\n", + "Irms=Vrms/R #A\n", + "print \"RMS output voltage = %0.2f V \" %Vrms \n", + "print \"RMS output current = %0.2f A \" %Irms \n", + "Iavg_thy=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg_thy \n", + "Irms_thy=Irms/sqrt(3) #A\n", + "print \"RMS thyristor current = %0.2f A \" %Irms_thy \n", + "Eff=Vdc*Idc/(Vrms*Irms)*100 #%\n", + "print \"Rectification Efficiency = %0.2f %% \" %Eff \n", + "Iline_rms=Irms*sqrt(120/180) #A\n", + "VA_in=3*Vs*Iline_rms/sqrt(3) #VA\n", + "TUF=Vdc*Idc/VA_in \n", + "print \"Transformer utilisation factor = %0.2f \" %TUF \n", + "Pin_active=Irms**2*R #W\n", + "pf_in=Pin_active/VA_in #lagging\n", + "print \"Input power factor = %0.2f lagging \" %pf_in \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 90.00 degree \n", + "Average output current = 27.01 A \n", + "RMS output voltage = 346.41 V \n", + "RMS output current = 34.64 A \n", + "Average thyristor current = 9.00 A \n", + "RMS thyristor current = 20.00 A \n", + "Rectification Efficiency = 60.79 % \n", + "Transformer utilisation factor = 0.37 \n", + "Input power factor = 0.61 lagging \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_22, page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, acos, cos\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "R=10 #ohm\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Vm=Vs*sqrt(2)/sqrt(3) #V\n", + "alfa=60 #degree(For 50% output voltage)\n", + "Vdc=3*sqrt(3)*Vm/pi*cos(alfa*pi/180) #V\n", + "alfa=degrees(acos(Vdc/3/sqrt(3)/Vm*pi)) #V\n", + "print \"Firing angle = %0.2f degree \" %alfa \n", + "Idc=Vdc/R #A\n", + "print \"Average output current = %0.2f A \" %Idc \n", + "Vrms=sqrt(3)*Vm*sqrt(0.5+3*sqrt(3)/4/pi*cos(2*alfa*pi/180)) #V\n", + "Irms=Vrms/R #A\n", + "print \"RMS output voltage = %0.2f V \" %Vrms \n", + "print \"RMS output current = %0.2f A \" %Irms \n", + "Iavg_thy=Idc/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg_thy \n", + "Irms_thy=Irms/sqrt(3) #A\n", + "print \"RMS thyristor current = %0.2f A \" %Irms_thy \n", + "Eff=Vdc*Idc/(Vrms*Irms)*100 #%\n", + "print \"Rectification Efficiency = %0.2f %% \" %Eff \n", + "Iline_rms=Irms*sqrt(120/180) #A\n", + "VA_in=3*Vs*Iline_rms/sqrt(3) #VA\n", + "TUF=Vdc*Idc/VA_in \n", + "print \"Transformer utilisation factor = %0.2f \" %TUF \n", + "Pin_active=Irms**2*R #W\n", + "pf_in=Pin_active/VA_in #lagging\n", + "print \"Input power factor = %0.2f lagging \" %pf_in \n", + "#Answer in the book is wrong for some part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 60.00 degree \n", + "Average output current = 27.01 A \n", + "RMS output voltage = 306.33 V \n", + "RMS output current = 30.63 A \n", + "Average thyristor current = 9.00 A \n", + "RMS thyristor current = 17.69 A \n", + "Rectification Efficiency = 77.74 % \n", + "Transformer utilisation factor = 0.42 \n", + "Input power factor = 0.54 lagging \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2_25, page 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import acos, degrees, pi, sqrt\n", + "from __future__ import division\n", + "#Given data: \n", + "Vs=400 #V\n", + "f=50 #Hz\n", + "Eb=300 #V\n", + "\n", + "#Solution :\n", + "Vdc=Eb #V\n", + "Vm=Vs*sqrt(2) #V\n", + "#Vdc=3*sqrt(3)/2/pi*Vm*cosd(alfa) #V\n", + "alfa=degrees(acos(Vdc/(3*sqrt(3)/2/pi*Vm))) #degree\n", + "print \"Firing angle = %0.1f degree \" %alfa " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Firing angle = 50.1 degree \n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3.ipynb new file mode 100755 index 00000000..17645bcf --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3.ipynb @@ -0,0 +1,404 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3, Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_1, page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Given data: \n", + "R=80 #ohm\n", + "L=8 #/mH\n", + "C=1.2 # micro F\n", + "\n", + "#Solution :\n", + "if R**2<4*(L*10**-3)/(C*10**-6):\n", + " print \"As R**2<4*L/C, Circuit will work as a series inverter.\" \n", + "else:\n", + " print \"As R**2>4*L/C, Circuit will not work as a series inverter.\" \n", + "\n", + "omega_m=sqrt(1/(L*10**-3*C*10**-6)-R**2/4/(L*10**-3)**2) #rad/s\n", + "fm=omega_m/2/pi #Hz\n", + "print \"Maximum frequency = %0.2f Hz\" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As R**2<4*L/C, Circuit will work as a series inverter.\n", + "Maximum frequency = 1416.09 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_2, page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Given data: \n", + "R=80 #ohm\n", + "L=8 #/mH\n", + "C=1.2 # micro F\n", + "Toff=14 #micro sec\n", + "\n", + "#Solution :\n", + "omega_m=sqrt(1/(L*10**-3*C*10**-6)-R**2/4/(L*10**-3)**2) #rad/s\n", + "fm=omega_m/2/pi #Hz\n", + "T=1/fm #sec\n", + "f=1/(T+2*Toff*10**-6) #Hz\n", + "print \"Frequency of output = %0.1f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of output = 1362.1 Hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_3, page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "#Given data: \n", + "RL=3 #in ohm\n", + "V=30 #in V\n", + "\n", + "#Solution :\n", + "Vpeak=2*V/pi #V\n", + "Vrms=Vpeak/sqrt(2) #V\n", + "print \"(a) RMS value of output voltage = %0.1f \" %Vrms\n", + "#VL=sqrt(2/T*integrate('(V/2)**2','t',0,T/2)) #V\n", + "VL=V/2 #V\n", + "Pout=VL**2/RL #W\n", + "print \"(b) Output power = %0.f W \" %Pout \n", + "Ipeak=VL/RL #A\n", + "print \"(c) Peak current in thyristor = %0.f A \" %Ipeak \n", + "Iavg=Ipeak*50/100 #A\n", + "print \"(d) Average current of each thyristor = %0.1f A\" %Iavg\n", + "Vprb=2*VL #V\n", + "print \"(e) Peak reverse braking voltage = %0.f V \" %Vprb " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value of output voltage = 13.5 \n", + "(b) Output power = 75 W \n", + "(c) Peak current in thyristor = 5 A \n", + "(d) Average current of each thyristor = 2.5 A\n", + "(e) Peak reverse braking voltage = 30 V \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_4, page 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "\n", + "#Given data: \n", + "RL=3 #in ohm\n", + "V=30 #in V\n", + "\n", + "#Solution :\n", + "Vpeak=4*V/pi #V\n", + "Vrms=Vpeak/sqrt(2) #V\n", + "print \"(a) RMS value of output voltage = %0.f V\" %Vrms\n", + "#VL=sqrt(2/T*integrate('V**2','t',0,T/2)) #V\n", + "VL=V #V\n", + "Pout=VL**2/RL #W\n", + "print \"(b) Output power = %0.f W \" %Pout \n", + "Ipeak=VL/RL #A\n", + "print \"(c) Peak current in thyristor = %0.f A \" %Ipeak \n", + "Iavg=Ipeak*50/100 #A\n", + "print \"(d) Average current of each thyristor = %0.f A\" %Iavg\n", + "Vprb=VL #V\n", + "print \"(e) Peak reverse braking voltage = %0.f V \" %Vprb " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value of output voltage = 27 V\n", + "(b) Output power = 300 W \n", + "(c) Peak current in thyristor = 10 A \n", + "(d) Average current of each thyristor = 5 A\n", + "(e) Peak reverse braking voltage = 30 V \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_5, page 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "\n", + "#Given data: \n", + "V=200 #V\n", + "R=10 #in ohm\n", + "L=20 #mH\n", + "C=100 #pF\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Z1=R+1J*(2*pi*f*L*10**-3-1/(2*pi*f*C*10**-6)) #ohm\n", + "Z3=R+1J*(3*2*pi*f*L*10**-3-1/(3*2*pi*f*C*10**-6)) #ohm\n", + "Z5=R+1J*(5*2*pi*f*L*10**-3-1/(5*2*pi*f*C*10**-6)) #ohm\n", + "Z7=R+1J*(7*2*pi*f*L*10**-3-1/(7*2*pi*f*C*10**-6)) #ohm\n", + "Z9=R+1J*(9*2*pi*f*L*10**-3-1/(9*2*pi*f*C*10**-6)) #ohm\n", + "I=4*V/pi/abs(Z1) #A\n", + "Irms=I/sqrt(2) #A\n", + "print\"RMS load current = %0.2f A\" % Irms\n", + "Ip=sqrt((4*V/pi/abs(Z1))**2+(4*V/3/pi/abs(Z3))**2+(4*V/5/pi/abs(Z5))**2+(4*V/7/pi/abs(Z7))**2+(4*V/9/pi/abs(Z9))**2) #A\n", + "print \"Peak value of load current = %0.2f A \" %Ip \n", + "Ih=sqrt(Ip**2-I**2)/sqrt(2) #A\n", + "print \"RMS harmonic current = %0.3f A \" %Ih \n", + "hd=sqrt(Ip**2-I**2)/I #harmonic distortion\n", + "print \"Harmonic distortion = %0.1f %%\" %(hd*100) \n", + "Irms_load=Ip/sqrt(2) #A\n", + "Pout=Irms_load**2*R #W\n", + "print \"Total output power = %0.1f W \" %Pout \n", + "Pout_com=Irms**2*R #W(fundamental component)\n", + "print \"Fundamental component of power = %0.2f W \" %Pout_com \n", + "Iavg_in=Pout/V #A\n", + "print \"Average input current = %0.4f A \" %Iavg_in \n", + "Ip_thy=Ip #A\n", + "print \"Peak thyristor current = %0.2f A \" %Ip_thy " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS load current = 6.56 A\n", + "Peak value of load current = 11.56 A \n", + "RMS harmonic current = 4.876 A \n", + "Harmonic distortion = 74.3 %\n", + "Total output power = 668.5 W \n", + "Fundamental component of power = 430.76 W \n", + "Average input current = 3.3427 A \n", + "Peak thyristor current = 11.56 A \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_6, page 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, tan\n", + "\n", + "#Given data: \n", + "R=2 #in ohm\n", + "XL=10 #ohm\n", + "f=4 #kHz\n", + "Toff=12 #micro sec\n", + "\n", + "#Solution :\n", + "Toff_time=Toff*1.5 #micro sec\n", + "theta=2*pi*f*10**3*Toff_time*10**-6 #radians\n", + "Xc=tan(theta)*R+XL #ohm\n", + "C=1/(2*pi*f*1000*Xc) #F\n", + "print \"Value of Capacitance = %0.2e F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Capacitance = 3.63e-06 F\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_7, page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "\n", + "#Given data: \n", + "V=400 #V\n", + "R=10 #in ohm/phase\n", + "\n", + "#Solution :\n", + "Ipeak=V/2/R #A\n", + "Irms=sqrt(Ipeak**2*2/3) #A\n", + "print \"RMS load current = %0.2f A\" %Irms\n", + "Pout=Irms**2*R*3 #W\n", + "print \"Power output = %0.f W \" %Pout\n", + "Iavg=Ipeak/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms_thyristor=sqrt(Ipeak**2/3) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms_thyristor " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "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": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_8, page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy.mpmath import *\n", + "#Given data: \n", + "V=400 #V\n", + "R=10 #in ohm/phase\n", + "\n", + "#Solution :\n", + "RL=R+R/2 #ohm\n", + "i1=V/RL #A\n", + "i2=V/RL #A\n", + "i3=V/RL #A\n", + "Irms_load=sqrt(1/2/pi*(quad(lambda theta:i1**2,[0,2*pi/3])+quad(lambda theta:(i1/2)**2,[2*pi/3,2*pi]))) #A\n", + "print \"RMS load current = %0.3f A\" %Irms_load\n", + "Pout=Irms_load**2*R*3 #W\n", + "print \"Power output = %0.1f W \" %Pout \n", + "Ipeak=i1 #A\n", + "Iavg=1/2/pi*(Ipeak*pi/3+Ipeak/2*2*pi/3) #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms_thyristor=sqrt(1/2/pi*(Ipeak**2*pi/3+(Ipeak/2)**2*2*pi/3)) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms_thyristor " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS load current = 18.856 A\n", + "Power output = 10666.7 W \n", + "Average thyristor current = 8.89 A \n", + "RMS value of thyristor current = 13.33 A \n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..29458bda --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter3_1.ipynb @@ -0,0 +1,405 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9af96dbd5d64eb88f08bd96fac1549771c84f48265cc48f4b716500ada4dcc9e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3, Inverters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_1, page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Given data: \n", + "R=80 #ohm\n", + "L=8 #/mH\n", + "C=1.2 # micro F\n", + "\n", + "#Solution :\n", + "if R**2<4*(L*10**-3)/(C*10**-6):\n", + " print \"As R**2<4*L/C, Circuit will work as a series inverter.\" \n", + "else:\n", + " print \"As R**2>4*L/C, Circuit will not work as a series inverter.\" \n", + "\n", + "omega_m=sqrt(1/(L*10**-3*C*10**-6)-R**2/4/(L*10**-3)**2) #rad/s\n", + "fm=omega_m/2/pi #Hz\n", + "print \"Maximum frequency = %0.2f Hz\" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As R**2<4*L/C, Circuit will work as a series inverter.\n", + "Maximum frequency = 1416.09 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_2, page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "#Given data: \n", + "R=80 #ohm\n", + "L=8 #/mH\n", + "C=1.2 # micro F\n", + "Toff=14 #micro sec\n", + "\n", + "#Solution :\n", + "omega_m=sqrt(1/(L*10**-3*C*10**-6)-R**2/4/(L*10**-3)**2) #rad/s\n", + "fm=omega_m/2/pi #Hz\n", + "T=1/fm #sec\n", + "f=1/(T+2*Toff*10**-6) #Hz\n", + "print \"Frequency of output = %0.1f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of output = 1362.1 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_3, page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "#Given data: \n", + "RL=3 #in ohm\n", + "V=30 #in V\n", + "\n", + "#Solution :\n", + "Vpeak=2*V/pi #V\n", + "Vrms=Vpeak/sqrt(2) #V\n", + "print \"(a) RMS value of output voltage = %0.1f \" %Vrms\n", + "#VL=sqrt(2/T*integrate('(V/2)**2','t',0,T/2)) #V\n", + "VL=V/2 #V\n", + "Pout=VL**2/RL #W\n", + "print \"(b) Output power = %0.f W \" %Pout \n", + "Ipeak=VL/RL #A\n", + "print \"(c) Peak current in thyristor = %0.f A \" %Ipeak \n", + "Iavg=Ipeak*50/100 #A\n", + "print \"(d) Average current of each thyristor = %0.1f A\" %Iavg\n", + "Vprb=2*VL #V\n", + "print \"(e) Peak reverse braking voltage = %0.f V \" %Vprb " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value of output voltage = 13.5 \n", + "(b) Output power = 75 W \n", + "(c) Peak current in thyristor = 5 A \n", + "(d) Average current of each thyristor = 2.5 A\n", + "(e) Peak reverse braking voltage = 30 V \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_4, page 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "\n", + "#Given data: \n", + "RL=3 #in ohm\n", + "V=30 #in V\n", + "\n", + "#Solution :\n", + "Vpeak=4*V/pi #V\n", + "Vrms=Vpeak/sqrt(2) #V\n", + "print \"(a) RMS value of output voltage = %0.f V\" %Vrms\n", + "#VL=sqrt(2/T*integrate('V**2','t',0,T/2)) #V\n", + "VL=V #V\n", + "Pout=VL**2/RL #W\n", + "print \"(b) Output power = %0.f W \" %Pout \n", + "Ipeak=VL/RL #A\n", + "print \"(c) Peak current in thyristor = %0.f A \" %Ipeak \n", + "Iavg=Ipeak*50/100 #A\n", + "print \"(d) Average current of each thyristor = %0.f A\" %Iavg\n", + "Vprb=VL #V\n", + "print \"(e) Peak reverse braking voltage = %0.f V \" %Vprb " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) RMS value of output voltage = 27 V\n", + "(b) Output power = 300 W \n", + "(c) Peak current in thyristor = 10 A \n", + "(d) Average current of each thyristor = 5 A\n", + "(e) Peak reverse braking voltage = 30 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_5, page 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "\n", + "#Given data: \n", + "V=200 #V\n", + "R=10 #in ohm\n", + "L=20 #mH\n", + "C=100 #pF\n", + "f=50 #Hz\n", + "\n", + "#Solution :\n", + "Z1=R+1J*(2*pi*f*L*10**-3-1/(2*pi*f*C*10**-6)) #ohm\n", + "Z3=R+1J*(3*2*pi*f*L*10**-3-1/(3*2*pi*f*C*10**-6)) #ohm\n", + "Z5=R+1J*(5*2*pi*f*L*10**-3-1/(5*2*pi*f*C*10**-6)) #ohm\n", + "Z7=R+1J*(7*2*pi*f*L*10**-3-1/(7*2*pi*f*C*10**-6)) #ohm\n", + "Z9=R+1J*(9*2*pi*f*L*10**-3-1/(9*2*pi*f*C*10**-6)) #ohm\n", + "I=4*V/pi/abs(Z1) #A\n", + "Irms=I/sqrt(2) #A\n", + "print\"RMS load current = %0.2f A\" % Irms\n", + "Ip=sqrt((4*V/pi/abs(Z1))**2+(4*V/3/pi/abs(Z3))**2+(4*V/5/pi/abs(Z5))**2+(4*V/7/pi/abs(Z7))**2+(4*V/9/pi/abs(Z9))**2) #A\n", + "print \"Peak value of load current = %0.2f A \" %Ip \n", + "Ih=sqrt(Ip**2-I**2)/sqrt(2) #A\n", + "print \"RMS harmonic current = %0.3f A \" %Ih \n", + "hd=sqrt(Ip**2-I**2)/I #harmonic distortion\n", + "print \"Harmonic distortion = %0.1f %%\" %(hd*100) \n", + "Irms_load=Ip/sqrt(2) #A\n", + "Pout=Irms_load**2*R #W\n", + "print \"Total output power = %0.1f W \" %Pout \n", + "Pout_com=Irms**2*R #W(fundamental component)\n", + "print \"Fundamental component of power = %0.2f W \" %Pout_com \n", + "Iavg_in=Pout/V #A\n", + "print \"Average input current = %0.4f A \" %Iavg_in \n", + "Ip_thy=Ip #A\n", + "print \"Peak thyristor current = %0.2f A \" %Ip_thy " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS load current = 6.56 A\n", + "Peak value of load current = 11.56 A \n", + "RMS harmonic current = 4.876 A \n", + "Harmonic distortion = 74.3 %\n", + "Total output power = 668.5 W \n", + "Fundamental component of power = 430.76 W \n", + "Average input current = 3.3427 A \n", + "Peak thyristor current = 11.56 A \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_6, page 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt, tan\n", + "\n", + "#Given data: \n", + "R=2 #in ohm\n", + "XL=10 #ohm\n", + "f=4 #kHz\n", + "Toff=12 #micro sec\n", + "\n", + "#Solution :\n", + "Toff_time=Toff*1.5 #micro sec\n", + "theta=2*pi*f*10**3*Toff_time*10**-6 #radians\n", + "Xc=tan(theta)*R+XL #ohm\n", + "C=1/(2*pi*f*1000*Xc) #F\n", + "print \"Value of Capacitance = %0.2e F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Capacitance = 3.63e-06 F\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_7, page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "\n", + "#Given data: \n", + "V=400 #V\n", + "R=10 #in ohm/phase\n", + "\n", + "#Solution :\n", + "Ipeak=V/2/R #A\n", + "Irms=sqrt(Ipeak**2*2/3) #A\n", + "print \"RMS load current = %0.2f A\" %Irms\n", + "Pout=Irms**2*R*3 #W\n", + "print \"Power output = %0.f W \" %Pout\n", + "Iavg=Ipeak/3 #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms_thyristor=sqrt(Ipeak**2/3) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms_thyristor " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "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": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3_8, page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "from sympy.mpmath import quad\n", + "#Given data: \n", + "V=400 #V\n", + "R=10 #in ohm/phase\n", + "\n", + "#Solution :\n", + "RL=R+R/2 #ohm\n", + "i1=V/RL #A\n", + "i2=V/RL #A\n", + "i3=V/RL #A\n", + "Irms_load=sqrt(1/2/pi*(quad(lambda theta:i1**2,[0,2*pi/3])+quad(lambda theta:(i1/2)**2,[2*pi/3,2*pi]))) #A\n", + "print \"RMS load current = %0.3f A\" %Irms_load\n", + "Pout=Irms_load**2*R*3 #W\n", + "print \"Power output = %0.1f W \" %Pout \n", + "Ipeak=i1 #A\n", + "Iavg=1/2/pi*(Ipeak*pi/3+Ipeak/2*2*pi/3) #A\n", + "print \"Average thyristor current = %0.2f A \" %Iavg \n", + "Irms_thyristor=sqrt(1/2/pi*(Ipeak**2*pi/3+(Ipeak/2)**2*2*pi/3)) #A\n", + "print \"RMS value of thyristor current = %0.2f A \" %Irms_thyristor " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS load current = 18.856 A\n", + "Power output = 10666.7 W \n", + "Average thyristor current = 8.89 A \n", + "RMS value of thyristor current = 13.33 A \n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4.ipynb new file mode 100755 index 00000000..4f205914 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4.ipynb @@ -0,0 +1,822 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4, Choppers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_1, page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "Vav=150 #V\n", + "f=1*1000 #Hz\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "Ton=Vav*T/V #s\n", + "Toff=T-Ton #s\n", + "print \"Periods of conduction & blocking are %0.2e & %0.2e seconds \" %(Ton,Toff) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Periods of conduction & blocking are 6.52e-04 & 3.48e-04 seconds \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_2, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "Ra=0.06 #ohm\n", + "Rf=0.03 #ohm\n", + "Iav=15 #A\n", + "f=500 #Hz\n", + "Eb=100 #V\n", + "V=200 #V\n", + "\n", + "#Solution :\n", + "Vav=Iav*(Ra+Rf)+Eb #V\n", + "T=1/f #s\n", + "Ton=Vav*T/V #s\n", + "Toff=T-Ton #s\n", + "print \"Periods of conduction & blocking are %0.4e & %0.3e seconds \" %(Ton,Toff) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Periods of conduction & blocking are 1.0135e-03 & 9.865e-04 seconds \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_3, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "N=800 #rpm\n", + "I=20 #A\n", + "Ra=0.5 #ohm\n", + "Vs=240 #V\n", + "Ndash=600 #rpm\n", + "\n", + "#Solution :\n", + "Eb_800=Vs-I*Ra #V\n", + "Eb_600=Eb_800*Ndash/N #V\n", + "Vav=I*Ra+Eb_600 #V\n", + "alfa=Vav/Vs #duty cycle\n", + "print \"(a) Duty cycle =\",round(alfa,4) \n", + "#Torque reduced to half will reduce I to half\n", + "I=I/2 #A\n", + "Vav=I*Ra+Eb_600 #V\n", + "alfa=Vav/Vs #duty cycle\n", + "print \"(b) Duty cycle =\",round(alfa,4) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Duty cycle = 0.7604\n", + "(b) Duty cycle = 0.7396\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_4, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "#Given data: \n", + "V=200 #V\n", + "RL=8 #ohm\n", + "Vthy=2 #V\n", + "f=800 #Hz\n", + "alfa=0.4 #duty cycle\n", + "\n", + "#Solution :\n", + "Vav=alfa*(V-Vthy) #V\n", + "print \"(a) Average output voltage = %0.2f V \" %Vav \n", + "VL=sqrt(alfa)*(V-Vthy) #V\n", + "print \"(b) RMS output voltage = %.3f V \" %VL \n", + "Pout=VL**2/RL #W\n", + "Pin=alfa*V*(V-Vthy)/RL #W\n", + "Eff=Pout/Pin*100 #%\n", + "print \"(c) Chopper efficiency = %0.f %%\" %Eff\n", + "Rin=RL/alfa #ohm\n", + "print \"(d) Input resistance = %0.f ohm \" %Rin \n", + "V1=(V-Vthy)*sqrt(2)/pi #V\n", + "print \"(e) RMS value of fundamental component = %0.3f V \" %V1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average output voltage = 79.20 V \n", + "(b) RMS output voltage = 125.226 V \n", + "(c) Chopper efficiency = 99 %\n", + "(d) Input resistance = 20 ohm \n", + "(e) RMS value of fundamental component = 89.131 V \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_5, page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=400 #V\n", + "R=0 #ohm\n", + "L=0.05 #H\n", + "alfa=0.25 #duty cycle\n", + "delta_i=10 #A\n", + "\n", + "#Solution :\n", + "Vav=alfa*V #V\n", + "delta_T=L*delta_i/(V-Vav) #s\n", + "Ton=delta_T #/s\n", + "T=Ton/alfa #s\n", + "f=1/T #pulses/s\n", + "print \"Chopping frequency = %0.f pulses/s \" %f " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chopping frequency = 150 pulses/s \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_6, page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy.mpmath import *\n", + "#Given data: \n", + "R=4 #ohm\n", + "L=6/1000 #H\n", + "V=200 #V\n", + "alfa=0.5 #duty cycle\n", + "f=1000 #Hz\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "E=0 #V\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "rmax = V/R/f/L\n", + "print \"maximum ripple =\",round(rmax,2),\"A\"\n", + "Iavg=(Imax+Imin)/2 #A\n", + "print \"Average load current = %0.2f A \" %Iavg \n", + "IL=sqrt(1/alfa/T*quad(lambda t:(Imin+(Imax-Imin)*t/alfa/T)**2,[0,alfa*T])) #A\n", + "print \"RMS load current = %0.2f A \" %IL \n", + "Iavg_in=alfa*Iavg #A\n", + "print \"Average input current = %0.2f A \" %Iavg_in \n", + "Irms_in=sqrt(1/T*quad(lambda t:(Imin+(Imax-Imin)*t/alfa/T)**2,[0,alfa*T])) #A\n", + "print \"RMS input current = %0.3f A \" %Irms_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 29.13 A \n", + "Minimum current = 20.87 A \n", + "maximum ripple = 8.33 A\n", + "Average load current = 25.00 A \n", + "RMS load current = 25.11 A \n", + "Average input current = 12.50 A \n", + "RMS input current = 17.758 A \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_7, page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=300 #V\n", + "R=4 #ohm\n", + "f=250 #Hz\n", + "ripple=20 #%\n", + "Iavg=30 #A\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "E=0 #V\n", + "Imax_sub_Imin=ripple/100*Iavg #A\n", + "L=V/Imax_sub_Imin/R/f #H\n", + "print \"Load Inductance = %0.1e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load Inductance = 5.0e-02 H \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_8, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "Ra=0.5 #ohm\n", + "L=16/1000 #H\n", + "V=200 #V\n", + "E=100 #V\n", + "Imin=10 #A\n", + "t_off=2/1000 #s\n", + "\n", + "#Solution :\n", + "i=(V-E)/Ra*(1-exp(-Ra*t_off/L))+Imin*exp(-Ra*t_off/L) #A\n", + "print \"Current at instant of turn off = %0.2f A \" %i \n", + "t=5/1000 #s\n", + "i_dash=i*exp(-Ra*t/L) #A\n", + "print \"Current 5 ms after turn off = %0.2f A \" %i_dash \n", + "#Answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current at instant of turn off = 21.51 A \n", + "Current 5 ms after turn off = 18.40 A \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_9, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=220 #V\n", + "N_NoLoad=1000 #rpm\n", + "alfa=0.6 #duty cycle\n", + "I=20 #A\n", + "Ra=1 #ohm\n", + "\n", + "#Solution :\n", + "Eb1=V #V##at no load\n", + "Vin=alfa*V #V\n", + "Eb2=Vin-I*Ra #V\n", + "N=N_NoLoad*Eb2/Eb1 #rpm\n", + "print \"Speed of the motor = %0.1f rpm \" %N " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of the motor = 509.1 rpm \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_10, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "Ton=25/1000 #s\n", + "Toff=10/1000 #s\n", + "\n", + "#Solution :\n", + "Vavg=V*Ton/(Ton+Toff) #V\n", + "print \"Average load voltage = %0.3f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load voltage = 164.286 V \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_11, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "V=100 #V\n", + "R=0.5 #ohm\n", + "L=1/1000 #H\n", + "Ton=1/1000 #s\n", + "T=3/1000 #s\n", + "\n", + "#Solution :\n", + "Toff=T-Ton #s\n", + "alfa=Ton/T #duty cycle\n", + "E=0 #V\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.1f A \" %Imax \n", + "print \"Minimum current = %0.1f A \" %Imin \n", + "Iavg=(Imax+Imin)/2 #A\n", + "print \"Average load current = %0.1f A \" %Iavg \n", + "Vavg=alfa*V #V\n", + "print \"Average load voltage = %0.2f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 101.3 A \n", + "Minimum current = 37.3 A \n", + "Average load current = 69.3 A \n", + "Average load voltage = 33.33 V \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_12, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "V=100 #V\n", + "E=12 #V\n", + "L=0.8/1000 #H\n", + "R=0.2 #ohm\n", + "T=2.4/1000 #s\n", + "Ton=1/1000 #s\n", + "\n", + "#Solution :\n", + "alfa=Ton/T #duty cycle\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L))) #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1)) #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "Vavg=alfa*V #V\n", + "print \"Average load voltage = %0.2f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 245.13 A \n", + "Minimum current = 172.74 A \n", + "Average load voltage = 41.67 V \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_13, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=500 #V\n", + "I=10 #A\n", + "f=400 #Hz\n", + "\n", + "#Solution :\n", + "alfa=0.5 #for maximum swing\n", + "#I=V/(4*f*L) #A\n", + "L=V/(4*f*I) #H\n", + "print \"Series inductance = %0.3e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series inductance = 3.125e-02 H \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_14, page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=800 #V\n", + "P=300 #HP\n", + "Eff=0.9 #Efficiency\n", + "R=0.1 #ohm\n", + "L=100/1000 #H\n", + "alfa=0.2 #duty cycle\n", + "N=900 #rpm\n", + "f=400 #Hz\n", + "\n", + "#Solution :\n", + "Pout=P*735.5/1000 #kW\n", + "Pin=Pout/Eff #kW\n", + "I=Pin*1000/V #A\n", + "E=V-I*R #V(at rated voltage)\n", + "Edash=V*alfa-I*R #V(at 0.2 duty cycle)\n", + "Ndash=N*Edash/E #rpm\n", + "print \"Motor speed = %0.2f rpm \" %Ndash \n", + "T=1/f #s\n", + "d_ia=(V-alfa*V)/L*alfa*T #A\n", + "print \"Current swing = %0.1f A \" %d_ia " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor speed = 151.32 rpm \n", + "Current swing = 3.2 A \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_17, page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp, log\n", + "#Given data: \n", + "V=200 #V\n", + "R=2 #ohm\n", + "L=10/1000 #H\n", + "E=20 #V\n", + "T=1000/10**6 #s\n", + "Ton=300/10**6 #s\n", + "\n", + "#Solution :\n", + "f=1/T #Hz\n", + "alfa_min=1/(R*T/L)*log(1+E/V*(exp(R*T/L)-1)) #duty cycle\n", + "alfa=Ton/T #duty cycle\n", + "print \"Minimum value required of alfa =\",round(alfa_min,4) \n", + "print \"Actual value of alfa =\",round(alfa,2) \n", + "print \"Load current is continuous as alfa_actual>alfa_min\"\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "Iavg=(alfa*V-E)/R #A\n", + "print \"Average load current = %0.2f A \" %Iavg \n", + "Iavg_in=alfa*(V-E)/R-L/R/T*(Imax-Imin) #A\n", + "print \"Average input current = %0.2f A \" %Iavg_in " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum value required of alfa = 0.1095\n", + "Actual value of alfa = 0.3\n", + "Load current is continuous as alfa_actual>alfa_min\n", + "Maximum current = 22.13 A \n", + "Minimum current = 17.93 A \n", + "Average load current = 20.00 A \n", + "Average input current = 6.01 A \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_18, page 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Given data: \n", + "V=200 #V\n", + "T=1000/10**6 #s\n", + "Ton=300/10**6 #s\n", + "R=4 #ohm\n", + "L=10/1000 #H\n", + "\n", + "#Solution :\n", + "f=1/T #Hz\n", + "Vrms1=sqrt((200/pi*sin(2*pi*0.3))**2+(200/pi*((1-cos(2*pi*0.3))))**2)/sqrt(2) #V\n", + "Vrms2=sqrt((200/2/pi*sin(2*pi*2*0.3))**2+(200/2/pi*((1-cos(2*pi*2*0.3))))**2)/sqrt(2) #V\n", + "Vrms3=sqrt((200/3/pi*sin(2*pi*3*0.3))**2+(200/3/pi*((1-cos(2*pi*3*0.3))))**2)/sqrt(2) #V\n", + "Z1=R+1J*(2*pi*f*L) #ohm\n", + "I1=Vrms1/abs(Z1) #A\n", + "print \"RMS value of 1st harmonic of load current = %0.3f A \" %I1 \n", + "Z2=R+1J*(2*2*pi*f*L) #ohm\n", + "I2=Vrms2/abs(Z2) #A\n", + "print \"RMS value of 2nd harmonic of load current = %0.4f A \" %I2 \n", + "Z3=R+1J*(3*2*pi*f*L) #ohm\n", + "I3=Vrms3/abs(Z3) #A\n", + "print \"RMS value of 3rd harmonic of load current = %0.4f A \" %I3 \n", + "Iavg=V/R*Ton/T #A\n", + "Irms=sqrt(Iavg**2+I1**2+I2**2+I3**2) #A\n", + "print \"RMS value of load current = %0.4f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of 1st harmonic of load current = 1.157 A \n", + "RMS value of 2nd harmonic of load current = 0.3405 A \n", + "RMS value of 3rd harmonic of load current = 0.0492 A \n", + "RMS value of load current = 15.0485 A \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_19, page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=200 #V\n", + "Vav=250 #V\n", + "Toff=0.6*10**-3 #s\n", + "\n", + "#Solution :\n", + "T=Vav/V*Toff #s\n", + "Ton=T-Toff #s\n", + "print \"Period of conduction = %0.2e seconds \" %Ton " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Period of conduction = 1.50e-04 seconds \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_20, page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=150 #V\n", + "Vav=250 #V\n", + "Toff=1*10**-3 #s\n", + "\n", + "#Solution :\n", + "T=Vav/V*Toff #s\n", + "Ton=T-Toff #s\n", + "print \"Period of conduction = %0.3e seconds \" %Ton " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Period of conduction = 6.667e-04 seconds \n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..f32d6a55 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter4_1.ipynb @@ -0,0 +1,825 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8db5571118e2a504bc5816bc4f1d7efa602909612c9631d4d79d610ed6ccf4e2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4, Choppers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_1, page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "Vav=150 #V\n", + "f=1*1000 #Hz\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "Ton=Vav*T/V #s\n", + "Toff=T-Ton #s\n", + "print \"Periods of conduction & blocking are %0.2e & %0.2e seconds \" %(Ton,Toff) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Periods of conduction & blocking are 6.52e-04 & 3.48e-04 seconds \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_2, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "Ra=0.06 #ohm\n", + "Rf=0.03 #ohm\n", + "Iav=15 #A\n", + "f=500 #Hz\n", + "Eb=100 #V\n", + "V=200 #V\n", + "\n", + "#Solution :\n", + "Vav=Iav*(Ra+Rf)+Eb #V\n", + "T=1/f #s\n", + "Ton=Vav*T/V #s\n", + "Toff=T-Ton #s\n", + "print \"Periods of conduction & blocking are %0.4e & %0.3e seconds \" %(Ton,Toff) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Periods of conduction & blocking are 1.0135e-03 & 9.865e-04 seconds \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_3, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "N=800 #rpm\n", + "I=20 #A\n", + "Ra=0.5 #ohm\n", + "Vs=240 #V\n", + "Ndash=600 #rpm\n", + "\n", + "#Solution :\n", + "Eb_800=Vs-I*Ra #V\n", + "Eb_600=Eb_800*Ndash/N #V\n", + "Vav=I*Ra+Eb_600 #V\n", + "alfa=Vav/Vs #duty cycle\n", + "print \"(a) Duty cycle =\",round(alfa,4) \n", + "#Torque reduced to half will reduce I to half\n", + "I=I/2 #A\n", + "Vav=I*Ra+Eb_600 #V\n", + "alfa=Vav/Vs #duty cycle\n", + "print \"(b) Duty cycle =\",round(alfa,4) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Duty cycle = 0.7604\n", + "(b) Duty cycle = 0.7396\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_4, page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "#Given data: \n", + "V=200 #V\n", + "RL=8 #ohm\n", + "Vthy=2 #V\n", + "f=800 #Hz\n", + "alfa=0.4 #duty cycle\n", + "\n", + "#Solution :\n", + "Vav=alfa*(V-Vthy) #V\n", + "print \"(a) Average output voltage = %0.2f V \" %Vav \n", + "VL=sqrt(alfa)*(V-Vthy) #V\n", + "print \"(b) RMS output voltage = %.3f V \" %VL \n", + "Pout=VL**2/RL #W\n", + "Pin=alfa*V*(V-Vthy)/RL #W\n", + "Eff=Pout/Pin*100 #%\n", + "print \"(c) Chopper efficiency = %0.f %%\" %Eff\n", + "Rin=RL/alfa #ohm\n", + "print \"(d) Input resistance = %0.f ohm \" %Rin \n", + "V1=(V-Vthy)*sqrt(2)/pi #V\n", + "print \"(e) RMS value of fundamental component = %0.3f V \" %V1 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Average output voltage = 79.20 V \n", + "(b) RMS output voltage = 125.226 V \n", + "(c) Chopper efficiency = 99 %\n", + "(d) Input resistance = 20 ohm \n", + "(e) RMS value of fundamental component = 89.131 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_5, page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=400 #V\n", + "R=0 #ohm\n", + "L=0.05 #H\n", + "alfa=0.25 #duty cycle\n", + "delta_i=10 #A\n", + "\n", + "#Solution :\n", + "Vav=alfa*V #V\n", + "delta_T=L*delta_i/(V-Vav) #s\n", + "Ton=delta_T #/s\n", + "T=Ton/alfa #s\n", + "f=1/T #pulses/s\n", + "print \"Chopping frequency = %0.f pulses/s \" %f " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chopping frequency = 150 pulses/s \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_6, page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from sympy.mpmath import quad\n", + "from math import exp, sqrt\n", + "#Given data: \n", + "R=4 #ohm\n", + "L=6/1000 #H\n", + "V=200 #V\n", + "alfa=0.5 #duty cycle\n", + "f=1000 #Hz\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "E=0 #V\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "rmax = V/R/f/L\n", + "print \"maximum ripple =\",round(rmax,2),\"A\"\n", + "Iavg=(Imax+Imin)/2 #A\n", + "print \"Average load current = %0.2f A \" %Iavg \n", + "IL=sqrt(1/alfa/T*quad(lambda t:(Imin+(Imax-Imin)*t/alfa/T)**2,[0,alfa*T])) #A\n", + "print \"RMS load current = %0.2f A \" %IL \n", + "Iavg_in=alfa*Iavg #A\n", + "print \"Average input current = %0.2f A \" %Iavg_in \n", + "Irms_in=sqrt(1/T*quad(lambda t:(Imin+(Imax-Imin)*t/alfa/T)**2,[0,alfa*T])) #A\n", + "print \"RMS input current = %0.3f A \" %Irms_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 29.13 A \n", + "Minimum current = 20.87 A \n", + "maximum ripple = 8.33 A\n", + "Average load current = 25.00 A \n", + "RMS load current = 25.11 A \n", + "Average input current = 12.50 A \n", + "RMS input current = 17.758 A \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_7, page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=300 #V\n", + "R=4 #ohm\n", + "f=250 #Hz\n", + "ripple=20 #%\n", + "Iavg=30 #A\n", + "\n", + "#Solution :\n", + "T=1/f #s\n", + "E=0 #V\n", + "Imax_sub_Imin=ripple/100*Iavg #A\n", + "L=V/Imax_sub_Imin/R/f #H\n", + "print \"Load Inductance = %0.1e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load Inductance = 5.0e-02 H \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_8, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "Ra=0.5 #ohm\n", + "L=16/1000 #H\n", + "V=200 #V\n", + "E=100 #V\n", + "Imin=10 #A\n", + "t_off=2/1000 #s\n", + "\n", + "#Solution :\n", + "i=(V-E)/Ra*(1-exp(-Ra*t_off/L))+Imin*exp(-Ra*t_off/L) #A\n", + "print \"Current at instant of turn off = %0.2f A \" %i \n", + "t=5/1000 #s\n", + "i_dash=i*exp(-Ra*t/L) #A\n", + "print \"Current 5 ms after turn off = %0.2f A \" %i_dash \n", + "#Answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current at instant of turn off = 21.51 A \n", + "Current 5 ms after turn off = 18.40 A \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_9, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=220 #V\n", + "N_NoLoad=1000 #rpm\n", + "alfa=0.6 #duty cycle\n", + "I=20 #A\n", + "Ra=1 #ohm\n", + "\n", + "#Solution :\n", + "Eb1=V #V##at no load\n", + "Vin=alfa*V #V\n", + "Eb2=Vin-I*Ra #V\n", + "N=N_NoLoad*Eb2/Eb1 #rpm\n", + "print \"Speed of the motor = %0.1f rpm \" %N " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of the motor = 509.1 rpm \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_10, page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=230 #V\n", + "Ton=25/1000 #s\n", + "Toff=10/1000 #s\n", + "\n", + "#Solution :\n", + "Vavg=V*Ton/(Ton+Toff) #V\n", + "print \"Average load voltage = %0.3f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average load voltage = 164.286 V \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_11, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "V=100 #V\n", + "R=0.5 #ohm\n", + "L=1/1000 #H\n", + "Ton=1/1000 #s\n", + "T=3/1000 #s\n", + "\n", + "#Solution :\n", + "Toff=T-Ton #s\n", + "alfa=Ton/T #duty cycle\n", + "E=0 #V\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.1f A \" %Imax \n", + "print \"Minimum current = %0.1f A \" %Imin \n", + "Iavg=(Imax+Imin)/2 #A\n", + "print \"Average load current = %0.1f A \" %Iavg \n", + "Vavg=alfa*V #V\n", + "print \"Average load voltage = %0.2f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 101.3 A \n", + "Minimum current = 37.3 A \n", + "Average load current = 69.3 A \n", + "Average load voltage = 33.33 V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_12, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp\n", + "#Given data: \n", + "V=100 #V\n", + "E=12 #V\n", + "L=0.8/1000 #H\n", + "R=0.2 #ohm\n", + "T=2.4/1000 #s\n", + "Ton=1/1000 #s\n", + "\n", + "#Solution :\n", + "alfa=Ton/T #duty cycle\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L))) #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1)) #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "Vavg=alfa*V #V\n", + "print \"Average load voltage = %0.2f V \" %Vavg " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum current = 245.13 A \n", + "Minimum current = 172.74 A \n", + "Average load voltage = 41.67 V \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_13, page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=500 #V\n", + "I=10 #A\n", + "f=400 #Hz\n", + "\n", + "#Solution :\n", + "alfa=0.5 #for maximum swing\n", + "#I=V/(4*f*L) #A\n", + "L=V/(4*f*I) #H\n", + "print \"Series inductance = %0.3e H \" %L " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series inductance = 3.125e-02 H \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_14, page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=800 #V\n", + "P=300 #HP\n", + "Eff=0.9 #Efficiency\n", + "R=0.1 #ohm\n", + "L=100/1000 #H\n", + "alfa=0.2 #duty cycle\n", + "N=900 #rpm\n", + "f=400 #Hz\n", + "\n", + "#Solution :\n", + "Pout=P*735.5/1000 #kW\n", + "Pin=Pout/Eff #kW\n", + "I=Pin*1000/V #A\n", + "E=V-I*R #V(at rated voltage)\n", + "Edash=V*alfa-I*R #V(at 0.2 duty cycle)\n", + "Ndash=N*Edash/E #rpm\n", + "print \"Motor speed = %0.2f rpm \" %Ndash \n", + "T=1/f #s\n", + "d_ia=(V-alfa*V)/L*alfa*T #A\n", + "print \"Current swing = %0.1f A \" %d_ia " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Motor speed = 151.32 rpm \n", + "Current swing = 3.2 A \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_17, page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import exp, log\n", + "#Given data: \n", + "V=200 #V\n", + "R=2 #ohm\n", + "L=10/1000 #H\n", + "E=20 #V\n", + "T=1000/10**6 #s\n", + "Ton=300/10**6 #s\n", + "\n", + "#Solution :\n", + "f=1/T #Hz\n", + "alfa_min=1/(R*T/L)*log(1+E/V*(exp(R*T/L)-1)) #duty cycle\n", + "alfa=Ton/T #duty cycle\n", + "print \"Minimum value required of alfa =\",round(alfa_min,4) \n", + "print \"Actual value of alfa =\",round(alfa,2) \n", + "print \"Load current is continuous as alfa_actual>alfa_min\"\n", + "Imax=V/R*((1-exp(-alfa*T*R/L))/(1-exp(-T*R/L)))-E/R #A\n", + "Imin=V/R*((exp(alfa*T*R/L)-1)/(exp(T*R/L)-1))-E/R #A\n", + "print \"Maximum current = %0.2f A \" %Imax \n", + "print \"Minimum current = %0.2f A \" %Imin \n", + "Iavg=(alfa*V-E)/R #A\n", + "print \"Average load current = %0.2f A \" %Iavg \n", + "Iavg_in=alfa*(V-E)/R-L/R/T*(Imax-Imin) #A\n", + "print \"Average input current = %0.2f A \" %Iavg_in " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum value required of alfa = 0.1095\n", + "Actual value of alfa = 0.3\n", + "Load current is continuous as alfa_actual>alfa_min\n", + "Maximum current = 22.13 A \n", + "Minimum current = 17.93 A \n", + "Average load current = 20.00 A \n", + "Average input current = 6.01 A \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_18, page 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi, cos, sin\n", + "#Given data: \n", + "V=200 #V\n", + "T=1000/10**6 #s\n", + "Ton=300/10**6 #s\n", + "R=4 #ohm\n", + "L=10/1000 #H\n", + "\n", + "#Solution :\n", + "f=1/T #Hz\n", + "Vrms1=sqrt((200/pi*sin(2*pi*0.3))**2+(200/pi*((1-cos(2*pi*0.3))))**2)/sqrt(2) #V\n", + "Vrms2=sqrt((200/2/pi*sin(2*pi*2*0.3))**2+(200/2/pi*((1-cos(2*pi*2*0.3))))**2)/sqrt(2) #V\n", + "Vrms3=sqrt((200/3/pi*sin(2*pi*3*0.3))**2+(200/3/pi*((1-cos(2*pi*3*0.3))))**2)/sqrt(2) #V\n", + "Z1=R+1J*(2*pi*f*L) #ohm\n", + "I1=Vrms1/abs(Z1) #A\n", + "print \"RMS value of 1st harmonic of load current = %0.3f A \" %I1 \n", + "Z2=R+1J*(2*2*pi*f*L) #ohm\n", + "I2=Vrms2/abs(Z2) #A\n", + "print \"RMS value of 2nd harmonic of load current = %0.4f A \" %I2 \n", + "Z3=R+1J*(3*2*pi*f*L) #ohm\n", + "I3=Vrms3/abs(Z3) #A\n", + "print \"RMS value of 3rd harmonic of load current = %0.4f A \" %I3 \n", + "Iavg=V/R*Ton/T #A\n", + "Irms=sqrt(Iavg**2+I1**2+I2**2+I3**2) #A\n", + "print \"RMS value of load current = %0.4f A \" %Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RMS value of 1st harmonic of load current = 1.157 A \n", + "RMS value of 2nd harmonic of load current = 0.3405 A \n", + "RMS value of 3rd harmonic of load current = 0.0492 A \n", + "RMS value of load current = 15.0485 A \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_19, page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=200 #V\n", + "Vav=250 #V\n", + "Toff=0.6*10**-3 #s\n", + "\n", + "#Solution :\n", + "T=Vav/V*Toff #s\n", + "Ton=T-Toff #s\n", + "print \"Period of conduction = %0.2e seconds \" %Ton " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Period of conduction = 1.50e-04 seconds \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4_20, page 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data: \n", + "V=150 #V\n", + "Vav=250 #V\n", + "Toff=1*10**-3 #s\n", + "\n", + "#Solution :\n", + "T=Vav/V*Toff #s\n", + "Ton=T-Toff #s\n", + "print \"Period of conduction = %0.3e seconds \" %Ton " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Period of conduction = 6.667e-04 seconds \n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6.ipynb b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6.ipynb new file mode 100755 index 00000000..c34150f1 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6.ipynb @@ -0,0 +1,178 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter6, Control Of DC Drives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6_1 : page 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array, sqrt, nditer\n", + "#Given data: \n", + "hp=array([50,100,150,120,0]) #hp\n", + "t=array([20,20,10,20,15]) #seconds\n", + "\n", + "#Solution :\n", + "def rms(hp,t):\n", + " it = nditer([hp,t,None])\n", + " for x,y,z in it:\n", + " z[...] = (x**2*y) #hp\n", + " return it.operands[2]\n", + "hp_rms_t = rms(hp,t)\n", + "hp_rms=sqrt(sum(hp_rms_t)/sum(t)) #hp\n", + "print \"Required hp = %0.2f hp\" %hp_rms \n", + "print \"Motor size should be 100 hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required hp = 94.74 hp\n", + "Motor size should be 100 hp\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6_2 : page 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import *\n", + "#Given data: \n", + "P=30 #kW\n", + "theta1=30 #degree C\n", + "t1=40 #minutes\n", + "theta2=45 #degree C\n", + "t2=80 #minutes\n", + "t2=2*t1 #minutes\n", + "Loss_fl=2 #kW\n", + "Loss_Cu=2.5 #kW\n", + "\n", + "#Solution :\n", + "#formula : theta1=theta_f*(1-exp(-t1/T)) \n", + "T = symbols('T')\n", + "expr = theta1/theta2-(1-exp(-t1/T))/(1-exp(-t2/T))\n", + "expr = simplify(expr)\n", + "T = solve(expr, T)[0] # minutes\n", + "print \"Thermal time constant = %0.2f minutes\" %T\n", + "theta_f=theta1/(1-math.exp(-t1/T)) \n", + "print \"Final temperature rise = %0.f degrees\" %theta_f\n", + "alfa=Loss_fl/Loss_Cu \n", + "t=20 #minutes\n", + "rating=P*np.sqrt((1+alfa)/(1-math.exp(-t/T))-alfa) #kW\n", + "print \"20 minute rating of motor = %0.2f kW \" %rating" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal time constant = 57.71 minutes\n", + "Final temperature rise = 60 degrees\n", + "20 minute rating of motor = 69.36 kW \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6_3 : page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import *\n", + "#Given data: \n", + "V=230 #V\n", + "f=50 #Hz\n", + "alfa=0 #degree\n", + "Rf=200 #ohm\n", + "Ra=0.3 #ohm\n", + "T=50 #N-m\n", + "N=900 #rpm\n", + "Kv=0.8 #V/A-rad/s\n", + "Kt=0.8 #N-m/A**2\n", + "\n", + "#Solution :\n", + "Vm=V*sqrt(2) #V\n", + "Vf=2*Vm/pi #V\n", + "If=Vf/Rf #A\n", + "print \"Field current = %0.4f A \" %If\n", + "Ia=T/(Kt*If) #A\n", + "omega=(2*pi/60)*N #radian/s\n", + "Eb=Kv*omega*If #V\n", + "Va=Eb+Ia*Ra #V\n", + "alfa_a=degrees(acos(Va/(Vm/pi)-1)) #degree\n", + "print \"Firing angle of armature circuit = %0.3f degree\" %alfa_a\n", + "Pout=Va*Ia #W\n", + "from sympy.mpmath import *\n", + "I_in = sqrt(Ia**2/180*quad(lambda omegat:1,[alfa_a, 180])) # replaced pi degree to 180 radian\n", + "VA_in=V*I_in #VA\n", + "pf_in=Pout/VA_in #lagging\n", + "print \"Input power factor = %0.3f lagging \" %pf_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field current = 1.0354 A \n", + "Firing angle of armature circuit = 94.078 degree\n", + "Input power factor = 0.605 lagging \n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} 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 new file mode 100644 index 00000000..9f145af9 --- /dev/null +++ b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/chapter6_1.ipynb @@ -0,0 +1,178 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:74047cf805bee3fa19c0f5922587031e21923e697eebd6fc6befd218011503d5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter6, Control Of DC Drives" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6_1 : page 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array, sqrt, nditer\n", + "#Given data: \n", + "hp=array([50,100,150,120,0]) #hp\n", + "t=array([20,20,10,20,15]) #seconds\n", + "\n", + "#Solution :\n", + "def rms(hp,t):\n", + " it = nditer([hp,t,None])\n", + " for x,y,z in it:\n", + " z[...] = (x**2*y) #hp\n", + " return it.operands[2]\n", + "hp_rms_t = rms(hp,t)\n", + "hp_rms=sqrt(sum(hp_rms_t)/sum(t)) #hp\n", + "print \"Required hp = %0.2f hp\" %hp_rms \n", + "print \"Motor size should be 100 hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required hp = 94.74 hp\n", + "Motor size should be 100 hp\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6_2 : page 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "from sympy import symbols, simplify, solve, exp\n", + "#Given data: \n", + "P=30 #kW\n", + "theta1=30.0 #degree C\n", + "t1=40 #minutes\n", + "theta2=45 #degree C\n", + "t2=80 #minutes\n", + "t2=2*t1 #minutes\n", + "Loss_fl=2 #kW\n", + "Loss_Cu=2.5 #kW\n", + "\n", + "#Solution :\n", + "#formula : theta1=theta_f*(1-exp(-t1/T)) \n", + "T = symbols('T')\n", + "expr = theta1/theta2-(1-exp(-t1/T))/(1-exp(-t2/T))\n", + "expr = simplify(expr)\n", + "T = solve(expr, T)[0] # minutes\n", + "print \"Thermal time constant = %0.2f minutes\" %T\n", + "theta_f=theta1/(1-math.exp(-t1/T)) \n", + "print \"Final temperature rise = %0.f degrees\" %theta_f\n", + "alfa=Loss_fl/Loss_Cu \n", + "t=20 #minutes\n", + "rating=P*math.sqrt((1+alfa)/(1-math.exp(-t/T))-alfa) #kW\n", + "print \"20 minute rating of motor = %0.2f kW \" %rating" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal time constant = 57.71 minutes\n", + "Final temperature rise = 60 degrees\n", + "20 minute rating of motor = 69.36 kW \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", + "from math import sqrt, pi, acos, degrees\n", + "#Given data: \n", + "V=230 #V\n", + "f=50 #Hz\n", + "alfa=0 #degree\n", + "Rf=200 #ohm\n", + "Ra=0.3 #ohm\n", + "T=50 #N-m\n", + "N=900 #rpm\n", + "Kv=0.8 #V/A-rad/s\n", + "Kt=0.8 #N-m/A**2\n", + "\n", + "#Solution :\n", + "Vm=V*sqrt(2) #V\n", + "Vf=2*Vm/pi #V\n", + "If=Vf/Rf #A\n", + "print \"Field current = %0.4f A \" %If\n", + "Ia=T/(Kt*If) #A\n", + "omega=(2*pi/60)*N #radian/s\n", + "Eb=Kv*omega*If #V\n", + "Va=Eb+Ia*Ra #V\n", + "alfa_a=degrees(acos(Va/(Vm/pi)-1)) #degree\n", + "print \"Firing angle of armature circuit = %0.3f degree\" %alfa_a\n", + "Pout=Va*Ia #W\n", + "from sympy.mpmath import quad\n", + "I_in = sqrt(Ia**2/180*quad(lambda omegat:1,[alfa_a, 180])) # replaced pi degree to 180 radian\n", + "VA_in=V*I_in #VA\n", + "pf_in=Pout/VA_in #lagging\n", + "print \"Input power factor = %0.3f lagging \" %pf_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Field current = 1.0354 A \n", + "Firing angle of armature circuit = 94.078 degree\n", + "Input power factor = 0.605 lagging \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f8cdc02f Binary files /dev/null and b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch2_firingAngleandEff.png differ 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 new file mode 100644 index 00000000..cab9046c Binary files /dev/null and b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Requiredhp.png differ 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 new file mode 100644 index 00000000..4da21eda Binary files /dev/null and b/Introduction_To_Electric_Drives_by_Vandna_Singhal_&_B.R._Gupta/screenshots/Ch6Thermal_time_cons.png differ 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 new file mode 100644 index 00000000..2405c51a --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter1.ipynb @@ -0,0 +1,111 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f952f0612b0f036664970e00f0036cbbc22734fdeb275bb46b2b2ad1aea06f80" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1-Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the heat added during the process\n", + "##Mass of oxygen present(in kg):\n", + "m=0.95;\n", + "##Initial temperatur(in K):\n", + "T1=300;\n", + "##Final temperature of oxygen(in K):\n", + "T2=900;\n", + "##Pressure of oxygen(in kPa):\n", + "p=150;\n", + "##Specific heat at constant pressure(in J/kg-K):\n", + "cp=909.4;\n", + "##Heat added during the process(in kJ):\n", + "Q12=m*cp*(T2-T1)\n", + "\n", + "print'%s %.1f %s'%(\"Heat added during the process:\",Q12/1000,\"kJ\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added during the process: 518.4 kJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Mass of ball(in kg):\n", + "#calculate speed at which ball hits the ground and terminal speed\n", + "import math\n", + "m=0.2;\n", + "##Height fom which ball is dropped(in m):\n", + "y0=500.;\n", + "##Value of k:\n", + "k=2*10**-4;\n", + "##Accleration due to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##speed and actual speed##\n", + "##Speed at which the ball hits the ground(in m/sec):\n", + "V=math.sqrt(m*g/k*(1-math.e**(2*k/m*(-y0))))\n", + "##Terminal speed(in m/sec):\n", + "Vt=math.sqrt(m*g/k)\n", + "##Ratio of actual speed to the terminal speed:\n", + "r=V/Vt;\n", + "print'%s %.1f %s'%(\"Speed at which the ball hits he ground:\",V,\" m/sec\")\n", + "print'%s %.3f %s'%(\"Ratio of actual speed to the terminal speed:\",r,\"\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed at which the ball hits he ground: 78.7 m/sec\n", + "Ratio of actual speed to the terminal speed: 0.795 \n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..312fe166 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter10.ipynb @@ -0,0 +1,870 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:802ab34bb99f44cedf57e936f0e130a301139414f721ca8991b0945e3aa9675d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10- Fluid Machinery" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate the impeller and torque and power\n", + "##Volume flow rate in gpm:\n", + "Q= 150.;\n", + "##Value of Vrb2 in ft/sec:\n", + "Vrb2=10.;\n", + "##Radius of outter impeller in inches:\n", + "R2=2.;\n", + "##Impeller Speed in rpm:\n", + "w=3450.; \n", + "##Density of air in slug/ft**3\n", + "p=1.94;\n", + "##input and power##\n", + "\n", + "##Impeller exit width b2(in feet):\n", + "b2=Q*12./(2.*math.pi*R2*Vrb2*7.48*60.)\n", + "##Torque of the Shaft, Tshaft(in ft-lbf):\n", + "Tshaft=w*R2**2*p*Q*2.*math.pi/3600/7.48/144.\n", + "##Power, Wm(in hp):\n", + "Wm=w*Tshaft*2.*math.pi/60./550.\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Impeller exit width: \",b2,\" feet\")\n", + "print'%s %.2f %s'% (\"Torque input: \",Tshaft,\" ft-lbf\")\n", + "print'%s %.2f %s'% (\"Power: \",Wm,\" hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Impeller exit width: 0.03 feet\n", + "Torque input: 6.51 ft-lbf\n", + "Power: 4.27 hp\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate volume flow rate and torque and power\n", + "##Tip Diameter in metres:\n", + "Dt=1.1;\n", + "##Hub Diameter in metres:\n", + "Dh=0.8;\n", + "##Operating Speed in rpm:\n", + "w=1200.;\n", + "##Absolute inlet angle in degrees:\n", + "alpha1=30.;\n", + "##Blade inlet angle in degrees:\n", + "betta1=30.; \n", + "##Blade outlet angle in degrees:\n", + "betta2=60.;\n", + "##Density of air in kg/m**3\n", + "p=1.23;\n", + "##volume and power##\n", + "\n", + "U=0.5*(Dh+Dt)/2.*1200.*2.*math.pi/60.\n", + "k=math.tan(alpha1/57.3)+(1./(math.cos(betta1/57.3))/(math.sin(betta1/57.3)))\n", + "Vn1=U/k\n", + "V1=Vn1/math.cos(alpha1/57.3)\n", + "Vt1=V1*math.sin(alpha1/57.3)\n", + "Vrb1=Vn1/math.sin(betta1/57.3)\n", + "##Volume flow rate (in m**3/sec):\n", + "Q=math.pi/4.*Vn1*(Dt**2.-Dh**2.)\n", + "k=(U-Vn1*(1./(math.cos(betta1/57.3))/(math.sin(betta1/57.3))))\n", + "k1=k/Vn1\n", + "alpha2= math.tan(k)*57.3\n", + "V2=Vn1/math.cos(alpha2/57.3)\n", + "Vt2=V2*math.sin(alpha2/57.3)\n", + "##Rotor Torque (in N-m):\n", + "Tz=p*Q*(Dh+Dt)/4.*(Vt2-Vt1)\n", + "##Power required (in W):\n", + "Wm=w*2*math.pi/60.*Tz\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Volume flow rate: \",Q,\" m^3/sec\")\n", + "print'%s %.2f %s'% (\"Rotor Torque: \",Tz,\" N-m\")\n", + "print'%s %.2f %s'% (\"Power required: \",Wm,\" W\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume flow rate: 9.26 m^3/sec\n", + "Rotor Torque: -164.33 N-m\n", + "Power required: -20649.89 W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate pump charstics\n", + "import numpy\n", + "%matplotlib inline\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "#Rate of flow in gm:\n", + "Q=numpy.array([0, 500 ,800, 1000, 1100, 1200 ,1400, 1500]);\n", + "#Suction pressure in psig:\n", + "ps=numpy.array([ 0.65, 0.25 ,-0.35, -0.92, -1.24, -1.62, -2.42, -2.89]);\n", + "#Discharge pressure in psig:\n", + "pd=numpy.array([53.3, 48.3 ,42.3, 36.9, 33 ,27.8, 15.3, 7.3]);\n", + "#Motor Current in amps:\n", + "I=numpy.array([18, 26.2 ,31 ,33.9, 35.2, 36.3, 38 ,39]);\n", + "#Acceleration due to gravity in ft/s^2:\n", + "g=32.2;\n", + "#Value of Zs in feet\n", + "zs=1;\n", + "#Density of air in slug/ft^3:\n", + "px=1.94;\n", + "#Value of ZD in feet:\n", + "zd=3.;\n", + "#Density of fluid in slug/ft^3:\n", + "py=1000.;\n", + "#Motor Efficiency:\n", + "Effm=0.9;\n", + "#Motor Supply in volts:\n", + "E=460.;\n", + "#Power Factor:\n", + "PF=0.875;\n", + "#Pump Power\n", + "Q=numpy.linspace(0,1500,num=8);\n", + "mQ=len(Q);\n", + "ps=numpy.linspace(-2.89,0.65,num=8);\n", + "mps=len(ps);\n", + "p1=numpy.zeros(mps)\n", + "p2=numpy.zeros(mps)\n", + "\n", + "Hp=numpy.zeros(mps)\n", + "Wh=numpy.zeros(mps)\n", + "pd=numpy.linspace(7.3,53.3,num=8);\n", + "mpd=len(pd);\n", + "p2=numpy.zeros(mpd)\n", + "I=numpy.linspace(18,39,num=8)\n", + "mI=len(I);\n", + "Pin=numpy.zeros(mI)\n", + "Effp=numpy.zeros(mI)\n", + "#correct measured static pressures to he pump centreline p1, p2(in psig):\n", + "for j in range (1,mps):\n", + " p1[j]=ps[j]+px*g*zs/144.\n", + "p2=numpy.zeros(mps)\n", + "for j in range (mpd):\n", + " p2[j]=pd[j]+px*g*zd/144.\n", + "#The value of Pump head(in feet):\n", + "p2=numpy.zeros(mps)\n", + "for j1 in range (1,mps):\n", + " Hp[j]=p2[j1]-p1[j]/(px*g)*144.\n", + "#Values of Hydraulic Power delivered(in hp):\n", + "for j in range (1,mps):\n", + " Wh[j]=Q[j]*(p2[j]-p1[j])/(7.48/60)*(144./550.)\n", + "#Values of motor power output(in hp):\n", + "for j in range(1,mI):\n", + " Pin[j]=Effm*math.sqrt(3)*PF*E*I[j]/746.\n", + "#Values of Pump Efficiecy:\n", + "for j in range (1,mI):\n", + " Effp[j]= Wh[j]/Pin[j]*100.\n", + "#Plotting pump characteristics:\n", + "pyplot.plot(Q,Hp)\n", + "pyplot.title('Pump Characteristics')\n", + "pyplot.show()\n", + "pyplot.plot(Q,Pin)\n", + "pyplot.title('Pump Characteristics')\n", + "pyplot.show\n", + "pyplot.plot(Q,Effp)\n", + "\n", + "pyplot.title('Pump Characteristics')\n", + "pyplot.show()\n", + "#,'Volume flow rate(in gpm)',['Pump Efficincy(%) ',' Pump Head(in feet) ',' Pump Power input(in hp) '])\n", + "#legend('Hp','Pin','Effp')\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEKCAYAAADw2zkCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGpxJREFUeJzt3X2UHXWd5/H3J91JMCTkeRJCAiEhDuEp5GEj4rj2CroR\nOWQ8R4+COjzsYdmZlZk5jsIAziHKzoo76+NydGZVlGFEUIdhQXBMM2OPzOiAgQTCQwwBAgkJIY8Q\n0JCn7/5R1eGmc7v79r3VXXXrfl7n9Ol7q+rW79vdyf30r75V1YoIzMystQ3LuwAzM8ufw8DMzBwG\nZmbmMDAzMxwGZmaGw8DMzHAYWMlJ6pL0X/KuIwuSrpH0zTpfu1vSzGwrsjJxGFhNJK2X9Jv0TeUl\nSd+RdHQB6hohaZmktZJek/ScpG9LOiHdJNKPXEn6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7+n2sBcMzsmxeokPPabAOHfVK4F9wQmrc7iHiYfEzx9uJ6Z\nZQCdCW6AjISZGcE9M4vd/amYRXk3ZRL+OzamvYuZZZhZfYJT0TkUIncf4O513L0+wf08M9y9eyrV\nGNa5DlhlZg3DptbAImBCKtUJLAHONrMK4e+/NbA4BevMc1i/5/D3sM2CK+mM4Gbjsfl3mmwWPFH8\nbqCTu/+Qr/6UqNPdF7j7Me5eP/x7Wk3wNJD1qVRnaCxwIUD4N5Xh7puSWmcyryKIYgI6EFw1tRy4\nL+JaWhCMQ3wCzAun9kB1IBtYSnBXf7WYbQaEtS8B2hVxvRfw09VcKVcjcAbBDavzCd5VVU3ROu8h\nCLoFBIPa6alQJ8GZ59fALoKxxd4FqQtoGn5vy4Gni6DOPsAy4KuYv6N/plCdP+b9PPMt/4Lwaq5U\nqzP8Pzk8PO5cIDPZdeqmRRERSVhx7+YSEZEUoDAREZGEKUxERCRhChMREUmYwkRERBKmMBERkYQp\nTEREJGEKExERSdj/D9A9tiG1d5ngAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate specific speed\n", + "##Head in Us customary units:\n", + "Hus=21.9;\n", + "##Volume flow rate in US customary units:\n", + "Qus=300.;\n", + "##Working seed in rpm:\n", + "N=1170.;\n", + "##Aceleration due to graviy in m/s**2\n", + "g=9.81;\n", + "##Specific and relation##\n", + "\n", + "##Specific speed in Us customary units:\n", + "Nscu=N*Qus**0.5/Hus**0.75\n", + "##Conversion to SI units:\n", + "w=1170.*2.*math.pi/60.;\n", + "Qsi=Qus/7.48/60*0.305**3.;\n", + "Hsi=Hus*0.305;\n", + "##Energy per unit mass is:\n", + "h=g*Hsi;\n", + "##Specific speed in SI units:\n", + "Nssi=w*Qsi**0.5/h**0.75\n", + "##Conversion to hertz:\n", + "whz=N/60.;\n", + "##Specific speed in European units:\n", + "Nseu=whz*Qsi**0.5/65.5**0.75\n", + "##Relation between specific speeds in Us customary units and European units:\n", + "Conversionfactor1=Nscu/Nseu\n", + "##Relation between specific speeds in Us customary units and SI units:\n", + "Conversionfactor2=Nscu/Nssi\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Specific speed in US customary units: \",Nscu,\" \")\n", + "print'%s %.2f %s'% (\"Specific speed in SI units: \",Nssi,\" \")\n", + "print'%s %.2f %s'% (\"Specific speedin European units: \",Nseu,\" \")\n", + "print'%s %.2f %s'% (\"Relation between specific speeds in Us customary units and European units: \",Conversionfactor1,\" \")\n", + "print'%s %.2f %s'% (\"Relation between specific speeds in Us customary units and SI units: \",Conversionfactor2,\" \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Specific speed in US customary units: 2001.77 \n", + "Specific speed in SI units: 0.73 \n", + "Specific speedin European units: 0.12 \n", + "Relation between specific speeds in Us customary units and European units: 17162.31 \n", + "Relation between specific speeds in Us customary units and SI units: 2732.28 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "import math\n", + "#calculate relation b/w pump and head\n", + "%matplotlib inline\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "import math\n", + "\n", + "from math import log\n", + "import numpy\n", + "##Volume flow rate(in gpm) at shut off condition for N1:\n", + "Q1so=0.;\n", + "##Volume flow(in gpm) rate at best efficiency for N1:\n", + "Q1be=300.;\n", + "##Head(in feet) at shut off condition for N1:\n", + "H1so=25.;\n", + "##Head(in feet) at best efficiency condition for N1:\n", + "H1be=21.9\n", + "##Operation Speed 1:\n", + "N1=1170.;\n", + "##Operation speed 2:\n", + "N2=1750.;\n", + "##Comparison of head##\n", + "\n", + "##Volume flow rate(in gpm) at shut off condition for N2:\n", + "Q2so=N2/N1*Q1so\n", + "##Volume flow(in gpm) rate at best efficiency for N2:\n", + "Q2be=N2/N1*Q1be\n", + "##Relation between pump heads:\n", + "head_relation=(N2/N1)**2\n", + "##Head(in feet) at shut off condition for N2:\n", + "H2so=(N2/N1)**2*H1so\n", + "##Head(in feet) at best efficiency condition for N2:\n", + "H2be=(N2/N1)**2*H1be\n", + "Q1=numpy.array([Q1so, Q1be]);\n", + "Q2=numpy.array([Q2so, Q2be]);\n", + "H1=numpy.array([H1so, H1be]);\n", + "H2=numpy.array([H2so, H2be]);\n", + "pyplot.plot(Q1,H1)\n", + "pyplot.plot(Q2,H2)\n", + "pyplot.title('Comparison of head for both conditions') \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 11, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEKCAYAAADticXcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH2FJREFUeJzt3X+UXGWd5/H3J52EpJN0J6GBNEkHmPWw+GuMIjiuOpa/\nwYOIM7POjK4C4o/dnUUFf4GrSyuOqLPC7M7OenRAF5BROSqMuK6CDDWiI7q4AYQMIpJAQn6HkIQ0\nCUn6u3/cp5KbSvXt6k5VV+f253VOndy6P7/3ye3vfep5nluliMDMzMphWqcDMDOz1nFSNzMrESd1\nM7MScVI3MysRJ3UzsxJxUjczKxEn9RKT9HZJP+p0HDWSZku6RdKTkr7VYPmgpOsnKJaqpAsKln9N\n0hOS7mrBsU6UNCypJX9vE1lOzZJ0nqQ7c+93SDqxYP37Jf3hRMQ21TipN0HS2yTdnS7UtZJ+IOll\nnY5rNBFxQ0S8odNx5PwJcCywMCL+tMHyiXxoIkY6nqRXAK8Fjo+IP5jAmBrFUpG0um72pH+4JCLm\nRcQqAEn/S9LldcufF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B/BRAvgx5LulvSeNG+yPDQ1UhzHk5VZzUSX34WS7pV0Te5j\n6YTHpOYedJvQuHIx3ZVmdaysJE2TdA9ZedwREQ/Q4XIaISbo7DV1FfARYDg3bzJcT43iClpQVu1I\n6pOp5/VlEfFC4Eyy76x5RX5hZJ9tOh5vE3FMVIxfAk4ClgHrgC8WrNu2mHR4D7q1Ja4U07dTTE/R\n4bKKiOGIWAYsAf5Q0qvqlk94OTWIqUIHy0nSWcDGiFhO4xpwR8qpIK6WlFU7kvrjwEDu/QAH32Um\nTESsS/9uAm4i+8iyQdIiAGUPTW3sRGwFcdSX35I0r+0iYmMkZB8Lax/xJiwmZQ+6fQe4PiJqzz50\ntKxyMX29FtNkKKsUxzbgfwOnMkmuqVxML+5wOf0b4GxJK4FvAK+WdD2dL6dGcV3XsrJqQ+P/dOB3\nZA36M+lQRynQDcxL03OAnwGvJ+sk+ViafwkT0FGajnUih3aUHhIHBzpFZpLdtX9HGno6ATH156Yv\nAv5+ImMiq7VcB1xVN79jZVUQU8fKCugD5qfp2WTPkbymw+U0UkyLOnlN5Y79SuCWTl9Po8TVkmuq\nXYGeSTZK4GHg0nYWSkEMJ6WCuAe4vxYHsBD4MfAQcGvtQmxzLN8A1gLPkPU3nF8UB/DxVHYPAm+Y\noJjelZLXfcC9ZE8IHzfBMb2crI3xHmB5ep3RybIaIaYzO1lWwPOB/5diug/4yGjXdgdj6ug1lTvW\nKzkwyqSjf3t1cVVycV3firLyw0dmZiXin7MzMysRJ3UzsxJxUjczKxEndTOzEnFSNzMrESd1M7MS\ncVI3MysRJ3UzsxL5/5JZiKN06sNtAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##For 5 inch nominal pipe line, diameter D:\n", + "import numpy\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "#calculate suction head vs flow rate and plot it \n", + "Di=5.047;\n", + "##Length of pipeline(in feet):\n", + "L=6.;\n", + "##Operatng spped (in rpm):\n", + "N=1750.;\n", + "##Water level abovepump centreline(in feet):\n", + "h=3.5;\n", + "##Temperature 1 of water(in Farenheit):\n", + "T1=80.;\n", + "##Temperature 2 of water (in Farenheit):\n", + "T2=180.;\n", + "##Volume flow rate of water(in gpm):\n", + "Q=1000.;\n", + "##Minor loss Coefficients:\n", + "K=0.5; SE=30; OGV=8;\n", + "##Atmospheric pressure(in lbf/in**2):\n", + "patm=14.7;\n", + "##Density of air(slug/ft**3):\n", + "p=1.93;\n", + "##Acceleration due to gravity(in ft/sec**2):\n", + "g=32.2;\n", + "##Head(in feet) due to vapor pressure of water for T =80F:\n", + "Hv1=1.17;\n", + "##Head(in feet) due to vapor pressure of water for T =180F:\n", + "Hv2=17.3;\n", + "##Kinematic viscosity of water at 80F:\n", + "v=0.927e-5;\n", + "##Value of discharges for plotting NPSHR(in gpm):\n", + "Qh=numpy.array([500 ,700, 900, 1100, 1300])\n", + "##Values of NPSHR obtained from Fig. D3 of appendix D:\n", + "NPSHRp=numpy.array([7, 8, 9.5, 12, 16])\n", + "##NPSHA and NPSHR## \n", + "\n", + "##Diameter of pipe (in feet):\n", + "Df= Di/12.\n", + "##Area of crossection of pipe(in ft**2):\n", + "A=math.pi/4.*Df**2.\n", + "##Velocity of flow(in ft/sec):\n", + "V=Q/7.48/A/60.\n", + "##For water at T=80F,viscosity=0.927e-5 ft**2/sec, Reynolds number:\n", + "Re=V*Df/v\n", + "##Friction loss Coefficient for this value of Re:\n", + "f=0.0237;\n", + "##For cast iron, roughness(in feet):\n", + "e=0.00085\n", + "##e/D is:\n", + "e/Df\n", + "##Total head loss(in feet):\n", + "HL=K+f*(SE+OGV)+f*(L/Df)+1.\n", + "##The heads are(in feet):\n", + "H1=patm*144./(p*g)\n", + "Vh=V**2./2./g\n", + "##Suction head(in feet):\n", + "Hs=H1+h-HL*Vh\n", + "##NPSHA(in feet):\n", + "NPSHA=Hs+Vh-Hv1\n", + "##For a flow rate of 1000 gpm,NPSHR(in feet) for water at 80 F\n", + "NPSHR=10. \n", + "##PLOTTING NPSHA AND NPSHR VERSUS VOLUME FLOW RATE:\n", + "##For 80 F\n", + "Qp=numpy.linspace(0,1500,num=16);\n", + "mQp=len(Qp);\n", + "Vp=numpy.zeros(mQp)\n", + "Vhp=numpy.zeros(mQp)\n", + "Hs=numpy.zeros(mQp)\n", + "NPSHAp1=numpy.zeros(mQp)\n", + "NPSHAp2=numpy.zeros(mQp)\n", + "for j in range (1,mQp):\n", + " Vp[j]=Qp[j]/(7.48*A*60.);\n", + " Vhp[j]=(Vp[j]**2./2.)/g;\n", + " Hs[j]=H1+h-HL*Vhp[j];\n", + "\n", + "for j in range (1,mQp):\n", + " NPSHAp1[j]=Hs[j]+(Vhp[j])-Hv1;\n", + "\n", + "pyplot.plot(Qp,NPSHAp1)\n", + "\n", + "pyplot.title('Suction head vs Flow rate')\n", + "pyplot.show()\n", + "pyplot.plot(Qh,NPSHRp)\n", + "pyplot.title('Volume flow rate(gpm)')\n", + "print(\"\\n\\nType (Resume) to continue or (abort) to end\\n\\n\")\n", + "pyplot.legend('NPSHA','NPSHR')\n", + "pyplot.show() \n", + "\n", + "\n", + "##For 180 F\n", + "for j in range (1,mQp):\n", + " NPSHAp2[j]=Hs[j]+(Vhp[j])-Hv2;\n", + "pyplot.plot(Qp,NPSHAp2)\n", + "pyplot.show()\n", + "pyplot.title('Suction head vs Flow rate')\n", + "pyplot.plot(Qh,NPSHRp)\n", + "pyplot.title('Volume flow rate(gpm)')\n", + "pyplot.legend('NPSHA','NPSHR')\n", + "pyplot.show()\n", + "print(\"\\n\\nRESULTS\\n\\n\")\n", + "print(\"\\n\\nNPSHA at Q=1000 gpm of water at 80 F: %.2f ft\\n\\n\",NPSHA)\n", + "print(\"\\n\\nNPSHR at Q=1000 gpm of water at 80 F: %.1f ft\\n\\n\",NPSHR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEKCAYAAAAYd05sAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm4FOWZ9/Hvj0UUUBYXREEhKirRRIy7gq2jkWxG884k\n6ugQo16TmUQz0SyamUR8TUaNiXEy2WYSY9S4ayTqGxcSbcUlLhFRQcUFDALn4AIiKAbhfv946khz\nPIez9VLd5/e5rrpOd1V11d3dcNfTz1aKCMzMrPH0qXUAZmZWGU7wZmYNygnezKxBOcGbmTUoJ3gz\nswblBG9m1qCc4K1LJJ0l6ZcVOO7nJc0o93HbOddvJJ1bjXO1ce6CpAW1OLf1Pk7wDULSQZIekLRM\n0muS7pO0Vw+P+b5kFBHnRcQpPYu25iJbKkbSWkkrJL2ZLa9X8nw9Uc2Lq1VXv1oHYD0naTPgVuCf\ngeuAAcBE4J1axpVzqsI5PhQRL1bhPO2S1C8i3q1lDFY7LsE3hnFARMS1kayKiOkR8SSApKmSrmjZ\nWdKYrITZJ3s+XNKlkhZKel3S7yQNBG4DtslKoMsljWzjWEdKmi1pqaS7Je1Ssm2+pDMkzcp+WVwj\nacCG3oikC7MYXpQ0uWT9EEmXSFok6WVJ55bEv4OkuyS9KukVSb+VNKTktRMkPZa9h2uAjds594As\nzg+WrNtS0luStsiWW7P3+pqkeyX16EIhaVdJxeyYT0n6VLZ+rKSlJfv9UlJzyfMrJH2lnWPOl/QN\nSU8Ab0rqK+lMSc9nn8FsSUe1nB/4ObB/6S+N7LP4gaSXJDVJ+rmkNj83yy8n+MbwLLAmq1ueLGlY\nq+0dVUdcQUp644GtgB9FxFvAZGBRRGwaEZtFxOLSY0kaB1wFnAZsAfwBuEVSyy/DAP4BOAIYC3wI\n+PwG4tgXeAbYHPg+cEnJtt8AfwN2ACYAHwV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ip5otSlXcQI7AZMk/VlSUdJe5Y6zEgk+l622\nkgYDNwJfiYg3S7dF+r2zobgr+p4kfRJYEhEzWVd6Xz+AGsdYoh+wJ/CziNgTWAmcuV4gtf88dwD+\njfTzdhtgsKTj1wsgP5/n+iftOK6ak/TvwN8i4qpax9KapIHAt4CzS1fXKJyO9AOGRcR+pMLddeU+\nQSUS/EJS/VeL0ax/1ak6Sf1Jyf2KiJiWrW6WtHW2fSSwJFvfOv5R2bpKOgA4UtI84GrgUElX5CzG\nFi+TSkePZM9vICX8phzFuhfwQES8FhHvAr8D9s9ZjKW68j2/nK0f1Wp9VeKV9HlSVeI/lqzOU5w7\nkC7ss7L/T6OAv0gakbM4yc79O4Ds/9NaSVuUM85KJPhHgZ0kjZG0EfA54OYKnKdTJAm4BJgTEReX\nbLqZ1PBG9ndayfpjJG0kaSzpZ9TDVFBEfCsiRkfEWOAY4K6IOCFPMZbE2gQskDQuW3UYMBu4JUex\nPgPsJ2mT7Ps/DJiTsxhLdel7zr6D5Uq9lwScUPKaipE0mVTS/HRErGoVfy7ijIgnI2JERIzN/j+9\nDOyZVYHlJs7MNOBQgOz/00YR8WpZ4yxnS3FJ6/DHSL1VngfOqsQ5uhDLQaR67ceBmdkyGRgO/BGY\nC9wJDC15zbey2J8BjqhyvAezrhdNXmP8MPAIMItUAhmSt1hJDWyzgSdJDZf98xAj6RfaIuBvpLaq\nE7sTF/CR7L09D/y4CnF+AXgOeKnk/9HPchTnOy2fZ6vtL5L1oslbnNm/ySuy8/4FKJQ7Tg90MjNr\nUL5ln5lZg3KCNzNrUE7wZmYNygnezKxBOcGbmTUoJ3gzswblBG9m1qCc4M3MGtT/B7eAOBJZNkMQ\nAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Type (Resume) to continue or (abort) to end\n", + "\n", + "\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhE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nZc/9V41jPJF0QW8h8ArwPPCTImPsIs6nSDdfPpo9/rtO47w1O+djwG3Am2sRp290MjNr\nUnmNB29mZnXGCd7MrEk5wZuZNSkneDOzJuUEb2bWpJzgzcyalBO8mVmTcoI3M2tS/x8ydAGuzuPo\nhgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEACAYAAAC57G0KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHChJREFUeJzt3Xt8VOWdx/HPDwh3DQmUAKIL4gXZRQG5WoFUsOJqgepW\nhdbFS63WLWrdVUFrzb66rVorq9a1F0UrtN5e3ooutWBrVvECitwR8MZNSFAuAooI5tk/nhMJMZDJ\n5MycM2e+79drXpk5mTnzIyHfPPmd5zzHnHOIiEjyNIm6ABERyQwFvIhIQingRUQSSgEvIpJQCngR\nkYRSwIuIJNRBA97MDjezF8xsmZktNbMrgu1lZrbezBYEt1HZKVdERFJlB5sHb2adgE7OuYVm1haY\nD4wFzgF2OOemZKdMERFpqGYH+6RzrgKoCO7vNLO3gMOCT1uGaxMRkUZIuQdvZt2AvsBrwaaJZrbI\nzKaaWbsM1CYiIo2QUsAH7ZnHgSudczuB3wDdgT7ARuD2jFUoIiJpOWgPHsDMCoBngb845+6o4/Pd\ngGecc71rbdciNyIiaXDOhdICr28WjQFTgeU1w93MOtd42reBJQcoMva3m266KfIaVKfqVJ2qsfoW\npoMeZAW+DnwPWGxmC4Jt1wPjzKwP4ID3gUtDrUpERBqtvlk0c6h7lP+XzJQjIiJhyfszWUtLS6Mu\nISWqM1yqM1y5UGcu1Bi2eg+ypr1jM5epfYuIJJWZ4bJxkFVERHKXAl5EJKEU8CIiCaWAFxFJKAW8\niEhCKeBFRBJKAS8iklAKeBGRhFLAi4gklAJeRCShFPAiIgmlgBcRSSgFvIhIQingRUQSSgEvIpJQ\nCngRkYRSwIuIJJQCX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GoG/qAbwcen\na2w/z8yam1l3/J9R88gw59z1zrnDnXPdgfOAvzvnzo9hnRXAOjM7Jtg0ElgGPBOnOoEVwGAzaxX8\nHxgJLI9hndUa9H0Ovg/bzc9gMuD8Gq/JGDMbhR9tjnHOfVar/ljU6Zxb4pwrcc51D36e1gP9ghZY\nbOoM9n8KQPDz1Nw591HoNYZ1pLjWUePT8TNW3gEmZ+I9UqzjZHxPeyGwILiNAoqB54FVwCygXY3X\nXB/UvQI4LYKah7NvFk3s6gROAF4HFuFHIIUxrfNa/C+fJfgDlwVxqBP/F9oG4HP8saoL06kLODH4\nt70D3JWFOi8C3gbW1PhZuidGde6u/nrW+vx7BLNooqqzrhqD/4/Tg/ecD5Rmokad6CQiklAZvWSf\niIhERwEvIpJQCngRkYRSwIuIJJQCXkQkoRTwIiIJpYAXEUkoBbyISEL9P2GXqsMGsGt9AAAAAElF\nTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEKCAYAAAAYd05sAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8VXWd//HXW5QMZbxRpJmR/pQaIwfLS43GbrKSvID+\nysuomaZOVA7l2EVt9KSSWl5iytF+KOYNzLuBlWi4xTSBSo0JGbUswZAwkDQMET6/P77rwPZwOJd9\n1j5rX97Px2M/zlprr73WZ28On/Pdn/Vd368iAjMzaz6bFB2AmZnVhhO8mVmTcoI3M2tSTvBmZk3K\nCd7MrEk5wZuZNSkneOuSpJKkhUXHASBpnKQlkv4qaVtJayXtXHRcfSVpqqQxBZz3EEk39fd5rf84\nwbcAST+V9I1Oto+RtFhS3f8eSNoMuAT4cET8Q0QsKzqmjiQNy/7o9PjzlPQe4D0RcVcNQ+tUREwD\ndpc0or/Pbf2j7v9jWy5+ABzbyfbjgBsiYm3/hlOVtwCbA08UFUAvErd6cdh/A26oIpy8TAVOKfD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ny3pA0lmPh8zTAAAB7UlEQVTAqxGxwR329SIizoqInYBrgO/U4hx9GWxscfZzKWmQsb2BJZLeApB9\npfhztvtzpJpyux2zbbW2CFgUEXOz9VtJCf/5Oouz3WjgV9lnCvX3eb4PeDgi/hIRrwG3A++nDj/P\niJgcEe+LiFGkr8dPUn+fZ7vexLUo275jh+39GW+luotR0qdJ39qOqdhcd3FWmALslS3nGmdVCV7S\nIEmDs+UtgI+SLmr9iHTRjeznndnyj4CjJA2U9A5gV9IFg5qKiOeBhZJ2yzYdAPwWmFZPcVboeNNY\nXX2ewAJgX0lvlCTS5zmfOvw8Jb05+7kTcDjpP1G9fZ7tehVX9nv9V6UeYQKOq3hNf6i89lZXMUo6\nEPgyMCYi/l7Hce5asToGeLQmcVZ5VfgdpK+9j5HqnWdk27cF7iO1lmYAW1e85kzSBYMFwMfyvErd\nTax7AHOBx0ktzq3qNM4tSBdaKq+u12OcXyH9kZxHuiC4WZ3GOSuL8zHgQ/XyeZL+gP8JeBVYCJxQ\nTVykIbrnZc/9V41jPJF0QW8h8ArwPPCTImPsIs6nSDdfPpo9/rtO47w1O+djwG3Am2sRp290MjNr\nUnmNB29mZnXGCd7MrEk5wZuZNSkneDOzJuUEb2bWpJzgzcyalBO8mVmTcoI3M2tS/x8ydAGuzuPo\nhgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "RESULTS\n", + "\n", + "\n", + "('\\n\\nNPSHA at Q=1000 gpm of water at 80 F: %.2f ft\\n\\n', 29.447152524872912)\n", + "('\\n\\nNPSHR at Q=1000 gpm of water at 80 F: %.1f ft\\n\\n', 10.0)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11-pg546" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "#calculate performance curve for give variables and plot it\n", + "##Diameter of fan 1 (in inches):\n", + "D1=36;\n", + "##Operating speed of fan 1(in rpm):\n", + "N1=600\n", + "##Density of air used in fan 1(in lbm/ft**3):\n", + "d1=0.075;\n", + "##Diameter of fan 2(in inches):\n", + "D2=42;\n", + "##Operating speed of fan 2(in rpm):\n", + "N2=1150;\n", + "##Density of aif usd in fan 2(in lbm/ft**3):\n", + "d2= 0.045;\n", + "##The following values are obtained from the given graph\n", + "##Values of volume flow rate(in cfm) through fan 1:\n", + "Q1= numpy.array([0, 10000, 20000, 30000, 40000, 50000, 60000]);\n", + "##Values of pressure( in inches of H2O):\n", + "p1=numpy.array([ 3.68 ,3.75 ,3.50 ,2.96 ,2.12 ,1.02 ,0]);\n", + "##Values of power(in hp):\n", + "P1=numpy.array([ 11.1, 15.1 ,18.6 ,21.4 ,23.1 ,23.1, 21.0]);\n", + "##Efficiency (in %):\n", + "Eff=numpy.array([0, 37, 59, 65, 57 ,34 ,0]);\n", + "Q1=numpy.linspace(0,60000,num=7);\n", + "mQ= len(Q1);\n", + "Q2=numpy.zeros(mQ)\n", + "p1=numpy.linspace(0,3.7,num=7);\n", + "mp= len(p1);\n", + "p2=numpy.zeros(mp)\n", + "P1=numpy.linspace(11.1,23.1,num=7);\n", + "mP= len(P1);\n", + "P2=numpy.zeros(mP)\n", + "#Volume flow rate for fan 2(in cfm):\n", + "for j in range (1, mQ):\n", + " Q2[j]=Q1[j]*(N2/N1)*(D2/D1)**3\n", + "#Pressure values for fan 2(in inches of H2O):\n", + "for j in range (1,mp):\n", + " p2[j]=p1[j]*(d2/d1)*((N2/N1)**2.)*((D2/D1)**2.)\n", + "#Power values for fan 2(in hp):\n", + "for j in range (1,mP):\n", + " P2[j]=P1[j]*(d2/d1)*((N2/N1)**3.)*((D2/D1)**5.)\n", + "pyplot.plot(Q2,p2)\n", + "pyplot.title('Performance curves')\n", + "#,'Volume flow rate(in cfm)','Pressure head(in inches of water)')\n", + "print(\"\\n\\nType (resume) to continue or (abort) to exit\\n\\n\")\n", + "pyplot.show()\n", + "pyplot.plot(Q2,P2)\n", + "pyplot.title('Performance curves')\n", + "#,'Volume flow rate(in cfm)','Power(in hp)')\n", + "print(\"\\n\\nType (resume) to continue or (abort) to exit\\n\\n\")\n", + "pyplot.show()\n", + "pyplot.plot(Q2,Eff)\n", + "pyplot.title('Performance curves')\n", + "#,'Volume flow rate(in cfm)','Eficiency(in percentage)')\n", + "#Specific speed of fan(in US customary units) at operating point:\n", + "Nscu= 1150*110000**0.50*0.045**0.75/7.4**0.75\n", + "#Specific speed of fan (in SI units) at operating point:\n", + "Nssi=120*3110**0.5*0.721**0.75/1.84e3**0.75\n" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12-pg552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Operation speed(in rpm):\n", + "#calculate volumeflow rate and torque and power required\n", + "N=2000.;\n", + "##Volume flow rate(in gpm):\n", + "Q=20.;\n", + "##Pressure(in psig):\n", + "p=1500.;\n", + "##Actual Pump Displacement(in##3/rev):\n", + "va=5.9;\n", + "##Volume flow rate at operating condition(in gpm):\n", + "Qo=46.5;\n", + "##Volume flow rate at maximum delivery(in gpm):\n", + "Qe=48.5;\n", + "##Pressure at operation condition(in psi):\n", + "po1=1500.;\n", + "##Efficiency of pump at operating condition:\n", + "Effp=0.84;\n", + "##Pressure at operating condition case 2(in psig):\n", + "po2=3000.;\n", + "##Power required##\n", + "\n", + "##From given graph, for maximum delivery condition, Q=48.5gpm.\n", + "##Volume of oil per revolution delivered by the pump(in in##3/rev):\n", + "vc=Qe/N*231.\n", + "##Volumetric Effciency of pump at max flow:\n", + "Effv=vc/va\n", + "##Operating point of the pump is found to be at 1500 psig,Q=46.5gpm\n", + "##Power delivered by the fluid(in hp):\n", + "Pf=Qo*po1/(7.48/60.)*(44./550.)\n", + "##Input power(in hp):\n", + "Pi=Pf/Effp\n", + "##The power delivered to the load(in hp):\n", + "Pl=Q*(po1)/(7.48/60.)*(144./550.)\n", + "##Power dissipated by throttling(in hp):\n", + "Pd=Pf-Pl\n", + "##The dissipation with the variable displacement pump(in hp):\n", + "Pvd=Q*(po2-po1)/(7.48/60.)*(144./550.)\n", + "##Power required for te load sensing pump if pump pressure is 100psi above that required by the load(in hp):\n", + "Pls=Q*100/(7.48/60)*(144./550.)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Volume of oil per revolution delivered by the pump: \",vc,\" in**3/rev\")\n", + "print'%s %.2f %s'% (\"Required pump power input: \",Pi,\" hp\")\n", + "print'%s %.2f %s'% (\"Power deliverd to the load: \",Pl,\" hp\")\n", + "print'%s %.2f %s'% (\"Power dissipated by throttling: \",Pd,\" hp\")\n", + "print'%s %.2f %s'% (\"The dissipation with the variable displacement pump: \",Pvd,\" hp\")\n", + "print'%s %.2f %s'% (\"Power required for te load sensing pump if pump pressure is 100psi above that required by the load: \",Pls,\" hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume of oil per revolution delivered by the pump: 5.60 in**3/rev\n", + "Required pump power input: 53284.95 hp\n", + "Power deliverd to the load: 63004.38 hp\n", + "Power dissipated by throttling: -18245.02 hp\n", + "The dissipation with the variable displacement pump: 63004.38 hp\n", + "Power required for te load sensing pump if pump pressure is 100psi above that required by the load: 4200.29 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14-pg558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate the operating speed of propeller and single speed power propeller\n", + "##Total propulsion power requirement(in MW):\n", + "P=11.4;\n", + "##From the given curves,Value of coefficients atoptimum efficiency are as follows:\n", + "##Speed of advance coefficient:\n", + "J=0.85;\n", + "##Thrust Coefficient:\n", + "Cf=0.1;\n", + "##Torque Coefficint:\n", + "Ct=0.02;\n", + "##Efficiency:\n", + "Eff=0.66;\n", + "##Velocity of ship(in m/sec):\n", + "V=6.69;\n", + "##Density of water(in kg/m**3):\n", + "p=1025.;\n", + "##propeller##\n", + "##Propeller Thrust(in MN) :\n", + "Ft=P/V\n", + "##Required power input to the propeller(in MW):\n", + "Pin=P/Eff\n", + "##Calculating value of D(in m):\n", + "nD=V/J\n", + "D=(Ft*10**6./p/(nD)**2./Cf)**0.5\n", + "##Operating speed (in rpm) is given by:\n", + "n=nD/D*60.\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Diameter of the single propeller required to pwer the ship:\",D,\" m\")\n", + "print'%s %.2f %s'% (\"Operating speed of the propeller: \",n,\" rpm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Diameter of the single propeller required to pwer the ship: 16.38 m\n", + "Operating speed of the propeller: 28.83 rpm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16-pg569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate the Tip speed ratio of windmill and Actual Thrust\n", + "##Diameter of windmill(in m):\n", + "D=26.;\n", + "##Operating speed(in rpm):\n", + "N=20.;\n", + "##Wind speed(in km/hr):\n", + "V=36.;\n", + "##Power Output(in W):\n", + "Po=41000.;\n", + "##Maximum efficiency occurs in following conditions:\n", + "##Efficiency:\n", + "Eff=0.593;\n", + "##Inteference Factor:\n", + "a=1./3.;\n", + "##Density of air(in kg/m**3):\n", + "p=1.23;\n", + "##Actual##\n", + "\n", + "##Tip speed ratio of windmill:\n", + "X=N*2.*math.pi/60.*D/2./(V*5./18.)\n", + "##Accounting for whirl,max attainable efficiency is:\n", + "Efw=0.53;\n", + "##Kinetic energy flux(in W) is given by:\n", + "KEF=0.5*p*(V*5./18.)**3.*math.pi*(D/2.)**2.\n", + "##Actual Efficiency:\n", + "Effa=Po/KEF\n", + "##The maximum possible thrust occurs for an interference factor of:\n", + "amax=0.5;\n", + "##Thrust(in W):\n", + "Kx=p*(V*5./18.)**2.*math.pi*(D/2.)**2.*2.*amax*(1-amax)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Tip speed ratio of windmill:\",X,\"\")\n", + "print'%s %.2f %s'% (\"Actual Efficiency: \",Effa,\"\")\n", + "print'%s %.2f %s'% (\"Actual Thrust: \",Kx,\" W\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Tip speed ratio of windmill: 2.72 \n", + "Actual Efficiency: 0.13 \n", + "Actual Thrust: 32652.14 W\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..b9621365 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter11.ipynb @@ -0,0 +1,235 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9894faf39017402b0ba9b51005fe6fc3cede8c66be5f73e0b70f2530beab3683" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter11-Introduction to Compressible Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate the Duct Area,Change in enthalpy of air,Change in entropy\n", + "##Temperature of air entering the cold section(in K):\n", + "T1=440.;\n", + "##Absolute pressure of air entering the cold section(in kPa):\n", + "p1=188.;\n", + "##Velocity of air entering the cold section(in m/sec):\n", + "V1=210.;\n", + "##Temperature of air at outlet:(in K)\n", + "T2=351.;\n", + "##Absolute pressure of air at outlet(in kPa):\n", + "p2=213.;\n", + "##Rate of heat loss in the section(in kJ/sec):\n", + "##Gas Constant(in N-m):\n", + "R= 287.;\n", + "##Mass flow rate of air(in kg/sec):\n", + "m=0.15;\n", + "##Specific heat at constant pressue(in kJ/(kg-K)):\n", + "cp=1.;\n", + "##Specific energy at constant volume(in kJ/(kg-K)):\n", + "cv=0.717;\n", + "##Change##\n", + "\n", + "##Density of air at entry:\n", + "d1=p1*10**3./R/T1\n", + "##Area(in m**2):\n", + "A=m/d1/V1\n", + "##Change in enthalpy of air(in kJ/kg):\n", + "dh=cp*(T2-T1)\n", + "##Change in internal energy of air(in kJ/kg):\n", + "du=cv*(T2-T1)\n", + "##Change in entropy(in kJ/(kg-K)):\n", + "ds=cp*math.log(T2/T1)-R/1000.*math.log(p2/p1)\n", + "print(\"RESULTS\")\n", + "print'%s %.4f %s'%(\"Duct Area: \",A,\" m^2\")\n", + "print'%s %.2f %s'%(\"Change in enthalpy of air: \",dh,\" kJ/kg\")\n", + "print'%s %.2f %s'%(\"Change in internal energy of air:\",du,\" kJ/kg\")\n", + "print'%s %.2f %s'%(\"Change in entropy: \",ds,\" kg-K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Duct Area: 0.0005 m^2\n", + "Change in enthalpy of air: -89.00 kJ/kg\n", + "Change in internal energy of air: -63.81 kJ/kg\n", + "Change in entropy: -0.26 kg-K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg600" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Value of k:\n", + "#calculate Variation of sound speed with altitude\n", + "import numpy\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "k=1.4;\n", + "##Gas Constant(in Kj/(kg-K)):\n", + "R=287.;\n", + "##Speed of sound##\n", + "import math\n", + "##Values of altitude(in m):\n", + "Al=numpy.linspace(0,15000,num=16)\n", + "mAl=len(Al);\n", + "##Values of temperature at given altitudes(in K):\n", + "T=numpy.array([288.2, 281.7, 275.2, 268.7, 262.2, 255.7, 249.2, 242.7, 236.2, 229.7, 223.3 ,216.8, 216.7, 216.7, 216.7, 216.7]); \n", + "mT=len(T);##Values of speed of sound at these altitudes(in m/sec):\n", + "c=numpy.zeros(mT)\n", + "C1=numpy.zeros(mT)\n", + "for j in range (0,mT):\n", + " c[j]=math.sqrt(k*R*T[j]);##Speed of sound at sea level(in m/sec):\n", + " C1[j]=math.sqrt(k*R*T[0]);\n", + "\n", + "print len(c) \n", + "pyplot.plot(c,Al)\n", + "pyplot.title('Variation of sound speed with altitude')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "16\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 5, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xmc3dP9x/HXOystjSWaiMYeJbEH8aOpqeAXitAfIm0J\nYk1r10qqKvSnYukPraItJbSiUarWNGim9sQShAhJa0tIVOy0ZPn8/jhnuMbNTDIzyffOnffz8ZjH\nfO/5bp9z78z9fM8530URgZmZWX3tig7AzMwqkxOEmZmV5QRhZmZlOUGYmVlZThBmZlaWE4SZmZXl\nBFFFJL0nad0mrvsdSX9t2YiWaL87SpqRY997ee9/SUiqlTSs6DgWR9IoSdc2cxsNfv6SaiS90px9\nLOm2JK2d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FJAhJKwF/Ao7PRy+HAcMlPUo6gmnozu4VPdIeEYsiYkvSUebXJX2j3vyg4Tq0tvrVLO0m\nWj6qltNQ/SSdBnwcEdc1tIllHGKzLK5+EXFaRKwNXAVc1NAmln2UTVOmbnsAI0ndMHUauk6gYusG\ni/3sLgPWA7YEXgN+3tAmGtp+RSQISR2BG4HfR8TNABHxXET8d0RsQ7o/0z/y4rP5tDUB6Y2ZvTzj\nbaqIeAe4HegLzJXUHUDSmsDrebFqqN82DSxWNfWTdAiwB/CdksWqpn4lrgO2zdOtsn4lddua9OX5\npKQXSPE/JqkbrbRu8NnPLiJejwy4gk+7kZa+fhUwyCLgGuDCeuVr5N/t8vxD6g20dCJ90P8gn65b\niT9AV2CVPL0icC/posDzgFNz+Qg+P8jZqutXMn8i0LfkdVXUj3T34WeArvWWr5b6bViyzLHAta2t\nfo39bebycoPUFV+3Rj677iXLnAhc19T6FX6hHLAj8F3gKUlTctmPgF6Svpdf3xgRVwNE6kMcB0wD\nFgDDI9e+Qq0JjJHUjpTsro2Ie3Jdx0kaBrwIHABVVb99gV+Q/ohvlzQlInavovrNIP2j3SUJ4KGI\nGF5F9fuTpK8CC0lfJMdAq/v7LFu3est8Ensrqxss/rO7RtKWpLq9ABwFTaufL5QzM7OyKmIMwszM\nKo8ThJmZleUEYWZmZTlBmJlZWU4QZmZWlhOEmZmV5QRhZmZlOUGYmVlZ/w/hh3YldiWO4gAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Stagnation pressure at entry, and exit ,Temperature at exit,Change in entropy\n", + "##Pressure at entry(in kPa):\n", + "p1=350.;\n", + "##Temperature at entry(in K)\n", + "T1=333.;\n", + "##Velocity at entry(in m/s):\n", + "V1=183.;\n", + "##Mach no. at exit:\n", + "M2=1.3;\n", + "##Stagnation pressure at exit(in kPa):\n", + "p02=385.;\n", + "##Stagnation temperature at exit(in K):\n", + "T02=350.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Gas constant(in N-m/kg-K)\n", + "R=287.;\n", + "##Specific heat at constant pressure(kJ/(kg-K):\n", + "cp=1.;\n", + "##pressure and change##\n", + "\n", + "##Mach number at entry:\n", + "M1=V1/math.sqrt(k*R*T1)\n", + "##Stagnation pressure at entry(in kPa):\n", + "p01=p1*(1.+(k-1.)/2.*M1**2.)**(k/(k-1.))\n", + "##Stagnation temperature at entry(in K):\n", + "T01=T1*(1.+(k-1.)/2.*M1**2.)\n", + "##Static pressure at exit(in kPa):\n", + "p2=p02/(1.+(k-1.)/2.*M2**2.)**(k/(k-1.))\n", + "##Temperature at exit(in K):\n", + "T2=T02/(1.+(k-1.)/2*M2**2.)\n", + "##Change in entropy(in kJ/kg-K):\n", + "ds=cp*math.log(T2/T1)-R/1000.*math.log(p2/p1)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Stagnation pressure at entry: \",p01,\" kPa\")\n", + "print'%s %.2f %s'%(\"Stagnation temperature at entry: \",T01,\" K\")\n", + "print'%s %.2f %s'%(\"Static pressure at exit: \",p2,\" kPa\")\n", + "print'%s %.2f %s'%(\"Temperature at exit: \",T2,\" K\")\n", + "print'%s %.2f %s'%(\"Change in entropy: \",ds,\" kJ/kg-K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Stagnation pressure at entry: 415.26 kPa\n", + "Stagnation temperature at entry: 349.67 K\n", + "Static pressure at exit: 138.95 kPa\n", + "Temperature at exit: 261.58 K\n", + "Change in entropy: 0.02 kJ/kg-K\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..e735f6b6 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter12.ipynb @@ -0,0 +1,820 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ddc74e8020be097903bb975830eb97abca6b79c52c68aa1d8892b061eb846aef" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter12-Steady One Dimensional Compressible Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg628" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Mach number at entry:\n", + "import math\n", + "M1=0.3;\n", + "##Temperature at entry(in K):\n", + "T1=335.;\n", + "##Pressure at entry(in kPa):\n", + "p1=650.;\n", + "##Area at entry(in m**2):\n", + "A1=0.001;\n", + "##Mach number at exit:\n", + "M2=0.8;\n", + "##/Value of k:\n", + "k=1.4;\n", + "##For the Mach no:0.3: \n", + "##T/T0:\n", + "t1=0.9823; \n", + "##p/p0:\n", + "P1=0.9395;\n", + "##d/d0:\n", + "den1=0.9564;\n", + "##A/A*:\n", + "a1=2.035;\n", + "##For the Mach no:0.8:\n", + "## T/T0:\n", + "t2=0.8865;\n", + "##p/p0:\n", + "P2=0.6560;\n", + "##d/d0:\n", + "den2=0.7400;\n", + "##A/A*:\n", + "a2=1.038;\n", + "##Gas Constant(in N-m/kg-K):\n", + "R=287.;\n", + "##pressure and area##\n", + "\n", + "##Here the stagnation quantities are constant.\n", + "## Stagnation temperature(in K):\n", + "T0=T1*(1.+(k-1.)/2.*M1**2.)\n", + "##Stagnation pressure(in kPa):\n", + "p0=p1*((1.+(k-1.)/2.*M1**2.)**(k/(k-1.)))\n", + "##Finding T2/T1:\n", + "T=t2/t1\n", + "##Temperature at exit(in K):\n", + "T2=T*T1\n", + "##Finding p2/p1:\n", + "P=P2/P1\n", + "##Pressure at exit(in kPa):\n", + "p2=P2*p1\n", + "##Density of air at exit(in kg/m**3):\n", + "d2=p2*10**3./R/T2\n", + "##Velocity of air at exit(in m/sec):\n", + "V2=M2*math.sqrt(k*R*T2)\n", + "##Finding A2/A1:\n", + "a=a2/a1\n", + "##Area at exit(in m**2):\n", + "A2=a*A1\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Stagnation temperature: \",T0,\" K\")\n", + "print'%s %.2f %s'% (\"Stagantion pressure: \",p0,\" kPa\")\n", + "print'%s %.2f %s'% (\"Temperature a exit \",T2,\" K\")\n", + "print'%s %.2f %s'% (\"Pressure at exit: \",p2,\" kpa\")\n", + "print'%s %.2f %s'% (\"Density of air at exit: \",d2,\" kg/m**3\")\n", + "print'%s %.2f %s'% (\"Velocity of air at exit: \",V2,\" m/sec\")\n", + "print'%s %.5f %s'% (\"Area at exit: \",A2,\" \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Stagnation temperature: 341.03 K\n", + "Stagantion pressure: 691.88 kPa\n", + "Temperature a exit 302.33 K\n", + "Pressure at exit: 426.40 kpa\n", + "Density of air at exit: 4.91 kg/m**3\n", + "Velocity of air at exit: 278.83 m/sec\n", + "Area at exit: 0.00051 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Throat area of nozzle(in m**2):\n", + "import math\n", + "Ae=0.001;\n", + "##Back pressure of air(in kPa):\n", + "pb=591.;\n", + "##Stagnation pressure(in kPa):\n", + "p0=1000.;\n", + "##Stagnation temperature(in K):\n", + "T0=333.;\n", + "##Gas Constant(in N-m/kg-K):\n", + "R=287.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Mass flow##\n", + "\n", + "##Checking for chocking:\n", + "c=pb/p0;\n", + "if(c<0.528):\n", + " print('choked')\n", + "else:\n", + " print('Not choked')\n", + "##Therefore pressure at exit = back pressure\n", + "pe=pb; ##Mach number at exit:\n", + "Me=(((p0/pe)**((k-1.)/k)-1.)*(2./(k-1.)))**0.5\n", + "##Temperature at exit(in K):\n", + "Te=T0/(1.+(k-1.)/2.*Me**2.)\n", + "##Velocity at exit(in m/sec):\n", + "Ve=Me*math.sqrt(k*R*Te)\n", + "##Density at exit(in kg/m**3):\n", + "de=pe*10**3./R/Te\n", + "##Mass flow rate of air(kg/sec):\n", + "m=de*Ve*Ae\n", + "\n", + "print(\"RESULTS\")\n", + "print(\"Mach number at exit: %.3f\",Me)\n", + "print (\"Mass flow rate of air: %.3f kg/sec\",m)\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Not choked\n", + "RESULTS\n", + "('Mach number at exit: %.3f', 0.9004056722629956)\n", + "('Mass flow rate of air: %.3f kg/sec', 2.195619178920673)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg636" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Mach number at entry:\n", + "M1=0.52;\n", + "##Temperature at entry(in F):\n", + "T1=40.;\n", + "##Pressure at entry(in psia):\n", + "p1=60.;\n", + "##Area at entry(in ft**2):\n", + "A1=0.013;\n", + "##Back pressure(in psia):\n", + "pb=30.;\n", + "##Gas Consant(in ft-lbf/lbm-R)\n", + "R=53.3;\n", + "##Value of k:\n", + "k=1.4;\n", + "##mass and area##\n", + "\n", + "##Saturation pressure(in psia):\n", + "p0=p1*(1.+(k-1.)/2.*M1**2.)**(k/(k-1.))\n", + "##Checking for choking:\n", + "x=pb/p0;\n", + "if(x>0.528):\n", + " print('Not choked')\n", + "else:\n", + " print('choked')\n", + "\n", + "##As there is choking:\n", + "Mt=1;\n", + "##Velocity at entry:\n", + "V1=M1*math.sqrt(k*R*(T1+460.)*32.2)\n", + "##Density at the entry(in lbm/ft**3):\n", + "d1=p1/(R*(T1+460.))*144.\n", + "##Mass flow rate(in lbm/sec):\n", + "m=d1*V1*A1\n", + "##Finding the valueof A1/A*;\n", + "A=1./M1*((1.+(k-1.)/2.*M1**2.)/(1.+(k-1.)/2.))**((k+1.)/(2.*(k-1.)))\n", + "##For choked flow, At=A*\n", + "At=A1/A\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Mach number at throat: \",Mt,\"\")\n", + "print'%s %.2f %s'% (\"Mass flow rate: \",m,\" lbm/sec\")\n", + "print'%s %.2f %s'% (\"Area at throat: \",At,\" ft**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "choked\n", + "RESULTS\n", + "Mach number at throat: 1.00 \n", + "Mass flow rate: 2.40 lbm/sec\n", + "Area at throat: 0.01 ft**2\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg640" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Stagnation temperature(in K):\n", + "T0=350.;\n", + "##Stagnation pressure(in kPa):\n", + "p0=1000.;\n", + "##Back Pressure(in kPa):\n", + "pb=954.;\n", + "##Mach number at throat:\n", + "Mt=0.68;\n", + "##Area at exit(in m**2):\n", + "Ae=0.001;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Gas Constant(in N-m/kg-K):\n", + "R=287.;\n", + "##throat##\n", + "\n", + "##Temperature at the throat(in K):\n", + "Tt=T0/(1.+(k-1.)/2.*Mt**2)\n", + "##Pressure at throat(in kPa):\n", + "pt=p0*(Tt/T0)**(k/(k-1.))\n", + "##Density at throat(in kg/m**3):\n", + "dt=pt*1000./R/Tt\n", + "##Velocity at the throat(in m/s):\n", + "Vt=Mt*math.sqrt(k*R*Tt)\n", + "##Value of At/A*:\n", + "Ax=1./Mt*((1.+(k-1.)/2.*Mt**2.)/(1.+(k-1.)/2.))**((k+1.)/(2.*(k-1.)))\n", + "##Stagnation properties are constant\n", + "##As a result pressure at exit, \n", + "pe=pb;\n", + "##The Mach number at the exit is therefore given by\n", + "Me=math.sqrt(((p0/pe)**((k-1.)/k)-1.)*2./(k-1.))\n", + "##Calculating the value of Ae/A*:\n", + "Ay=1./Me*((1.+(k-1.)/2.*Me**2.)/(1.+(k-1.)/2.))**((k+1.)/(2.*(k-1.)))\n", + "##Value of A*(in m**2):\n", + "A_star=Ae/Ay\n", + "##Area at throat(in m**2):\n", + "At=Ax*A_star\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Temperature at the throat: \",Tt,\" K\")\n", + "print'%s %.2f %s'% (\"Pressure at throat: \",pt,\" kPa\")\n", + "print'%s %.2f %s'% (\"Density at throat: \",dt,\" kg/m**3\")\n", + "print'%s %.2f %s'% (\"Velocity at the throat: \",Vt,\" m/sec\")\n", + "print'%s %.2f %s'% (\"Mach number at the exit: \",Me,\"\")\n", + "print'%s %.2f %s'% (\"Area at throat: \",At,\" m**2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Temperature at the throat: 320.37 K\n", + "Pressure at throat: 733.76 kPa\n", + "Density at throat: 7.98 kg/m**3\n", + "Velocity at the throat: 243.97 m/sec\n", + "Mach number at the exit: 0.26 \n", + "Area at throat: 0.00 m**2\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg641" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Stagnation temperature(in K):\n", + "T0=350.;\n", + "##Stagnation pressure(in kPa)\\\n", + "p0=1000.;\n", + "##Pressure at exit(in kPa)\n", + "pe=87.5;\n", + "##Back Pressure(in kPa):\n", + "pb=50.;\n", + "##Area at exit(in m**2):\n", + "Ae=0.001;\n", + "##Gas Constant(in N-m/kg-K)\n", + "R=287.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##number and flow##\n", + "\n", + "##Mach number at the exit:\n", + "Me=math.sqrt(((p0/pe)**((k-1.)/k)-1.)*2./(k-1.))\n", + "##Temperature at exit(in K):\n", + "Te=T0/(1.+(k-1.)/2.*Me**2.)\n", + "##Mass flow rate(in kg/s):\n", + "m=pe*1000.*Me*math.sqrt(k/R/Te)*Ae\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Mach number at the exit: \",Me,\" \")\n", + "print'%s %.2f %s'% (\"Mass flow rate: \",m,\" kg/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Mach number at the exit: 2.24 \n", + "Mass flow rate: 1.04 kg/sec\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg647" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Diameter of pipe(in m):\n", + "D=7.16*10**-3;\n", + "##Stagnation pressure(in kPa):\n", + "p0=101.;\n", + "##Stagnation temperature(in K):\n", + "T0=296.;\n", + "##Pressure at section 1(in kPa):\n", + "p1=98.5;\n", + "##Temperature at section 2(in K):\n", + "T2=287.;\n", + "##Gas constant(in N-m/kg-K):\n", + "R=287.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##mass and volume##\n", + "\n", + "##Mach umber at section 1:\n", + "M1=math.sqrt((2./(k-1.)*((p0/p1)**((k-1.)/k)-1.)))\n", + "##Temperature at section 1(in K):\n", + "T1=T0/(1.+(k-1.)/2.*M1**2)\n", + "##Density at section 1(in kg/m**3):\n", + "d1=p1*1000./R/T1\n", + "##Velocity at section1(in m/sec):\n", + "V1=M1*math.sqrt(k*R*T1)\n", + "##Area at section 1(in m**2):\n", + "A1=math.pi/4.*D**2.\n", + "##Mass flow rate(in kg/sec):\n", + "m=d1*A1*V1\n", + "##Mach number at section 2:\n", + "M2=math.sqrt((2./(k-1.))*((T0/T2)-1.))\n", + "##Velocity at section 2(in m/sec):\n", + "V2=M2*math.sqrt(k*R*T2)\n", + "##Density at section 2(in kg/m**3):\n", + "d2=d1*V1/V2\n", + "##Pressure at section 2(in kPa):\n", + "p2=d2/1000.*R*T2\n", + "##Stagnation pressure at section 2(in kPa):\n", + "p02=p2*(1.+(k-1.)/2.*M2**2.)**(k/(k-1.))\n", + "##Force exerted on control volume by duct wall(in N):\n", + "F=(p2-p1)*1000.*A1+m*(V2-V1)\n", + "print (\"RESULTS\")\n", + "print'%s %.4f %s'% (\"Mass flow rate: \",m,\" kg/sec\")\n", + "print'%s %.2f %s'% (\"Local isentropic stagnation pressure at section 2:\",p02,\" kPa\")\n", + "print'%s %.2f %s'% (\"Force exerted on control volume by duct wall:\",F,\" N\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Mass flow rate: 0.0031 kg/sec\n", + "Local isentropic stagnation pressure at section 2: 51.92 kPa\n", + "Force exerted on control volume by duct wall: -1.88 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg655" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Stagnation temperature(in K):\n", + "T0=296.;\n", + "##Stagnation pressure(in mm of Hg):\n", + "p0=760.;\n", + "##Gauge pressure at section 1(in mm of Hg):\n", + "p1=-18.9;\n", + "##Gauge pressure at section2(in mm of Hg):\n", + "p2=-412.;\n", + "##Mach number at 3:\n", + "M3=1.;\n", + "##Gas constant:\n", + "R=287.;\n", + "##Density of mercury(kg/m**3):\n", + "dHg=13500.;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.8;\n", + "##Friction factor:\n", + "f=0.0235;\n", + "##Diameter of tube(in m):\n", + "D=7.16*10**-3;\n", + "##Value of k:\n", + "k=1.4;\n", + "##length##\n", + "\n", + "##Mach number at section 1:\n", + "M1= math.sqrt(2./(k-1.)*((p0/(p0+p1))**((k-1.)/k)-1.))\n", + "##Temperature at section 1(in K):\n", + "T1=T0/(1.+(k-1.)/2.*(M1)**2.)\n", + "V1=M1*math.sqrt(k*R*T1)\n", + "##Pressure at section 1(in kPa):\n", + "p1=g*dHg*(760.-18.9)*10**-3\n", + "##Density at section 1(in kg/m**3):\n", + "d1=p1/R/T1\n", + "##At M1=0.190, \n", + "##(p/p*)1:\n", + "P1=5.745\n", + "## (fLmax/Dh)1:\n", + "F1=16.38\n", + "##Value of L13(in m):\n", + "L13=F1*D/f\n", + "##Value of (p/p*)2:\n", + "P2=p2/p1*P1\n", + "##For this value, Value of M2 is obtained as 0.4\n", + "M2=0.4;\n", + "##For M=0.4, fLmX/D=2.309\n", + "F2=2.309\n", + "##Value of L23(in m):\n", + "L23=F2*D/f\n", + "##Length of duct between section 1 and 2(in m):\n", + "L12=L13-L23\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Length of duct required for choking from section 1: \",L13,\" m\")\n", + "print'%s %.2f %s'% (\"Mach number section 2: \",M2,\" \")\n", + "print'%s %.2f %s'% (\"Length of duct between section 1 and 2: \",L12,\" m\",)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Length of duct required for choking from section 1: 4.99 m\n", + "Mach number section 2: 0.40 \n", + "Length of duct between section 1 and 2: 4.29 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg662" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Temperature at section 1(in R):\n", + "T1=600.;\n", + "##Pressure at section 1(in psia):\n", + "p1=20.;\n", + "##Pressure at section 2(in psia):\n", + "p2=10.;\n", + "##Velocity at section 1(in ft/s):\n", + "V1=360.;\n", + "##Cross-sectional area of the duct(in ft**2):\n", + "A=0.25;\n", + "##Gas Constant(in ft-lbf/lbm-R):\n", + "R=53.3;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Specific heat at constant presure(in Btu/lbm-R):\n", + "Cp=0.24;\n", + "##Specific heat at constant volume(in Btu/lbm-R):\n", + "Cv=0.171;\n", + "\n", + "##velocity and entropy##\n", + "\n", + "##Density at section 1(in lbm/ft**3):\n", + "d1=p1*144./R/T1\n", + "##Velocity at section 2(in ft/sec):\n", + "V2=(p1-p2)*144./d1/V1*32.2+V1\n", + "##Density at section 2(in lbm/ft3):\n", + "d2=d1*V1/V2\n", + "##Temperature at section 2(in R):\n", + "T2=p2/d2/R*144.\n", + "##Mach number at section 2:\n", + "M2=V2/math.sqrt(k*R*32.16*T2)\n", + "##Stagnation Temperature at section 2(in R):\n", + "T02=T2*(1.+(k-1.)/2.*M2**2.)\n", + "##Stagnation pressure at section 2 (in psia):\n", + "p02=p2*(T02/T2)**(k/(k-1.))\n", + "##Mach Number at section 1:\n", + "M1=V1/math.sqrt(k*R*32.16*T1)\n", + "##Stagnation temperature at section 1(in R):\n", + "T01=T1*(1.+(k-1.)/2.*M1**2.)\n", + "##Energy added(in Btu/lbm):\n", + "E=Cp*(T02-T01)\n", + "##Change in entropy(in Btu/(lbm-R)):\n", + "dS=Cp*math.log(T2/T1)-(Cp-Cv)*math.log(p2/p1)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Velocity at section 2: \",V2,\" ft/sec\")\n", + "print'%s %.2f %s'% (\"Density at section 2: \",d2,\" lbm/ft^3\")\n", + "print'%s %.2f %s'% (\"Temperature at section 2: \",T2,\" R\")\n", + "print'%s %.2f %s'% (\"Stagnation Temperature at section 2: \",T02,\" R\")\n", + "print'%s %.2f %s'% (\"Stagnation pressure at section 2: \",p02,\" psia\")\n", + "print'%s %.2f %s'% (\"Energy added: \",E,\" Btu/lbm\")\n", + "print'%s %.2f %s'% (\"Change in entropy: \",dS,\" Btu/(lbm-R)\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Velocity at section 2: 1790.22 ft/sec\n", + "Density at section 2: 0.02 lbm/ft^3\n", + "Temperature at section 2: 1491.85 R\n", + "Stagnation Temperature at section 2: 1758.94 R\n", + "Stagnation pressure at section 2: 17.80 psia\n", + "Energy added: 275.55 Btu/lbm\n", + "Change in entropy: 0.27 Btu/(lbm-R)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9-pg666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Temperature at section 1(in K):\n", + "import math\n", + "T1=333.;\n", + "##Pressure at section 1(in kPa):\n", + "p1=135.;\n", + "##Velocity at section 1(in m/sec):\n", + "V1=732.;\n", + "##Mach number at section 2:\n", + "M2=1.2;\n", + "##Gas constant(in N-m/kg-K):\n", + "R=287.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Specific heat at constant presure(in N-m/kg-K):\n", + "Cp=1.;\n", + "##Temperature and entropy##\n", + "\n", + "##Mach nuber at section 1:\n", + "M1=V1/math.sqrt(k*R*T1)\n", + "##For these value of M1 and M2,the following values are obtained:\n", + "##(To/T0*)1:\n", + "t01=0.7934;\n", + "##(T0/T0*)2:\n", + "t02=0.9787;\n", + "##(p0/p0*)1:\n", + "P01=1.503;\n", + "##(p0/p0*)2:\n", + "P02=1.019;\n", + "##(T/T*)1:\n", + "t1=0.5289;\n", + "##(T/T*)2:\n", + "t2=0.9119;\n", + "##(p/p*)1:\n", + "P1=0.3636;\n", + "##(p/p*)2:\n", + "P2=0.7958;\n", + "##(V/V*)1:\n", + "v1=1.455;\n", + "##(V/V*)2:\n", + "v2=1.146;\n", + "##Value of T2/T1:\n", + "t=t2/t1\n", + "##Temperature at section 2(in K):\n", + "T2=t*T1\n", + "##Value of p2/p1:\n", + "p=P2/P1\n", + "##Pressure at section 2(in kPa):\n", + "p2=p*p1\n", + "##Value of V2/V1:\n", + "v=v2/v1\n", + "##Velocity at section 2(in m/sec):\n", + "V2=v*V1\n", + "##Density at section 2(in kg/m**3):\n", + "d2=p2*1000./R/T2\n", + "##At M1, T/T0=0.5556\n", + "T01=T1/0.5556\n", + "##At M2, T/T0=0.7764\n", + "T02=T2/0.7764\n", + "##Heat added(in kJ/kg):\n", + "E=Cp*(T02-T01)\n", + "##Change in entropy(kJ/kg-K):\n", + "dS=Cp*math.log(T2/T1)-R*math.log(p2/p1)/1000.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Temperature at section 2: \",T2,\" K\")\n", + "print'%s %.2f %s'% (\"Pressure at section 2:\",p2,\" kPa\")\n", + "print'%s %.2f %s'% (\"Velocity at section 2: \",V2,\" m/sec\")\n", + "print'%s %.2f %s'% (\"Density at section 2: \",d2,\" kg/m**3\")\n", + "print'%s %.2f %s'% (\"Stagnation temperature at section 2: \",T02,\" K\")\n", + "print'%s %.2f %s'% (\"Heat added: \",E,\" kJ/kg\")\n", + "print'%s %.2f %s'% (\"Change in entropy: \",dS,\" kJ/kg\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Temperature at section 2: 574.14 K\n", + "Pressure at section 2: 295.47 kPa\n", + "Velocity at section 2: 576.54 m/sec\n", + "Density at section 2: 1.79 kg/m**3\n", + "Stagnation temperature at section 2: 739.49 K\n", + "Heat added: 140.14 kJ/kg\n", + "Change in entropy: 0.32 kJ/kg\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10-pg676" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Temperature at section 1(in K):\n", + "T1=278.;\n", + "##Pressure at section 1(in kPa):\n", + "p1=65.;\n", + "##Velocity at section 1(in m/sec):\n", + "V1=668.;\n", + "##Value of gas constant(in N-m/kg-K):\n", + "R=287.;\n", + "##Value of k:\n", + "k=1.4;\n", + "##Temperature##\n", + "##Density at section 1(in kg/m**3):\n", + "d1=p1*1000./R/T1\n", + "##Mach number at section 1:\n", + "M1=V1/math.sqrt(k*R*T1)\n", + "##Stagnation temperature at section 1(in K):\n", + "T01=T1*(1.+(k-1.)/2.*M1**2.)\n", + "##Stagnation pressure at section 1(in kPa):\n", + "p01=p1*(1.+(k-1.)/2.*M1**2.)**(k/(k-1.))\n", + "##The following values are obtained from the appendix:\n", + "##po2/p01:\n", + "p0=0.7209;\n", + "##T2/T1:\n", + "T=1.687;\n", + "##p2/p1:\n", + "p=4.5;\n", + "##V2/V1:\n", + "V=0.3750;\n", + "##Temperature at section 2 (in K):\n", + "T2=T*T1\n", + "##Pressure at section 2(in kPa):\n", + "p2=p*p1\n", + "##Velocity at section 2(in m/sec):\n", + "V2=V*V1\n", + "##Density at section 2 (in kg/m**3):\n", + "d2=p2*1000./R/T2\n", + "##Stagnation pressure at section 2(in kPa):\n", + "p02=p0*p01\n", + "##Stagnation temperature at section 2(in K):\n", + "T02=T01;\n", + "##Change in entropy(in kJ/(kg-K)):\n", + "dS=-R/1000.*math.log(p0)\n", + "print (\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Temperature at section 2 : \",T2,\" K\")\n", + "print'%s %.2f %s'% (\"Pressure at section 2: \",p2,\" kPa\")\n", + "print'%s %.2f %s'% (\"Velocity at section 2: \",V2,\" m/sec\")\n", + "print'%s %.2f %s'% (\"Density at section 2 : \",d2,\" kg/m**3\")\n", + "print'%s %.2f %s'% (\"Stagnation pressure at section 2: \",p02,\" kPa\")\n", + "print'%s %.2f %s'% (\"Change in entropy: \",dS,\" kg-K\")\n", + "print'%s %.2f %s'% (\"Stagnation temperature at section 2: \",T02,\" K\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Temperature at section 2 : 468.99 K\n", + "Pressure at section 2: 292.50 kPa\n", + "Velocity at section 2: 250.50 m/sec\n", + "Density at section 2 : 2.17 kg/m**3\n", + "Stagnation pressure at section 2: 365.91 kPa\n", + "Change in entropy: 0.09 kg-K\n", + "Stagnation temperature at section 2: 500.11 K\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..61efb299 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter2.ipynb @@ -0,0 +1,80 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2dd92af47b1f19e65e5d38226dc5a0be851cdfe18cac41990d95bceaeb175ac1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2-Fundamental Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Liquid Viscosity(in cp):\n", + "#calculate Shear stres on the upeer plate and lower plate\n", + "u=0.65;\n", + "##Specific gravity:\n", + "SG=0.88;\n", + "##Density of water(in slug/ft**3):\n", + "d=1.94;\n", + "##Velocity with which plate is moved(in m/sec):\n", + "U=0.3;\n", + "##Distance between the plates(in mm):\n", + "D=0.3;\n", + "\n", + "##Viscosity and stress##\n", + "\n", + "##Viscosity in units of lbf-s/ft**2:\n", + "u1=u/100./454./32.2*30.5\n", + "##Kinematic viscosity (in m/sec**2):\n", + "v=u1/SG/d*(0.305)**2.\n", + "##Shear stress on the upper plate(lbf/ft**2):\n", + "tu=u1*U/D*1000.\n", + "##Shear stress on the lower plate(in Pa)\n", + "tl=tu*4.45/0.305**2.\n", + "print(\"RESULTS\")\n", + "print'%s %.5f %s'%(\"Viscosity in units of lbf-s/ft^2:\",u1,\" $lbf-s/ft^2\")\n", + "print'%s %.7f %s'%(\"Kinematic viscosity: \",v,\" m/sec^2\")\n", + "print'%s %.4f %s'%(\"Shear stres on the upeer plate:\",tu,\" lbf/ft^2\")\n", + "print'%s %.2f %s'%(\"Sear stress on the lower plate: \",tl,\" Pa\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Viscosity in units of lbf-s/ft^2: 0.00001 $lbf-s/ft^2\n", + "Kinematic viscosity: 0.0000007 m/sec^2\n", + "Shear stres on the upeer plate: 0.0136 lbf/ft^2\n", + "Sear stress on the lower plate: 0.65 Pa\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..5e237f72 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter3.ipynb @@ -0,0 +1,447 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:216028c2c50dd9765ae0c118199742fbd62a0014512baa8a0aa4652857e680c1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3-Fluid Statics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the tube diameter and mercury meter level\n", + "import numpy\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "##Surface tension of water(in mN/m):\n", + "STw=72.8*10**-3;\n", + "##Surface Tension of mercury(in mN/m):\n", + "STm=375*10**-3;\n", + "##Contact angle for water:\n", + "thetaw=0.;\n", + "##COntact angle for mercury:\n", + "thetam=140.;\n", + "##Density of water(in kg/m**3):\n", + "dw=1.;\n", + "##Density of mercury(in kg/m**3):\n", + "dm=13.6;\n", + "##Acceleration de to gravity(in m/sec):\n", + "g=9.81;\n", + "##liquid level##\n", + "\n", + "##Tube diameter(in mm):\n", + "D =numpy.linspace(1,25,num=24)\n", + "D1=D/1000.\n", + "n=len(D1)\n", + "dhw=numpy.zeros(n)\n", + "dhm=numpy.zeros(n)\n", + "for i in range (0,n):\n", + "##Change in liquid level for water(in mm):\n", + "\tdhw[i]=4*STw*math.cos(thetaw/57.3)/dw/g/D1[i];\n", + "##Change in liquid level for mercury(in mm):\n", + "\tdhm[i]=4*STm*math.cos(thetam/57.3)/dm/g/D1[i];\n", + "\n", + "print D1\n", + "##Plotting tube daimeter and water level:\n", + "pyplot.plot(D1,dhw)\n", + "##Plotting tube daimeter and mercury level:\n", + "\n", + "pyplot.xlabel('Liquid level(in mm)')\n", + "pyplot.ylabel('Tube diameter(in mm)')\n", + "pyplot.title('Liquid level vs Tube diameter')\n", + "pyplot.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 0.001 0.00204348 0.00308696 0.00413043 0.00517391 0.00621739\n", + " 0.00726087 0.00830435 0.00934783 0.0103913 0.01143478 0.01247826\n", + " 0.01352174 0.01456522 0.0156087 0.01665217 0.01769565 0.01873913\n", + " 0.01978261 0.02082609 0.02186957 0.02291304 0.02395652 0.025 ]\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcHFW99/HP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JqUZc8Gjv8hcHRE7AF8GvifSAOjzasaPfMtwO8jYlVv+/dy\n7n1I4+/0ltZRwPVZ/v4I1CtlbAnMIs0BcBZwRUTsBDwLVEpOATwYEbtm5/pf0phDewFfrjrXX4CZ\nda5j1itXN1nLkbQxsHFE/CnbdCZpDJuGDifNGPebiHgOeE7ShfQxVLuk0cDewK/TuG9AmqgF4BxS\nwOkG3g18V2l46Xr7Q08w2II01HRvVkbExdn7v5IGYKsVwKURsUrSHcB6EXFZ9tnt2fkrLqzaPjoi\nlgPLJT0vaaOIeCZLy/Q66THrlYOEtYPqH/gXWbMEvGEv+0fNMf3N5bEesDj7S7zWRcA3JI0HdgOu\nBsb2sX9v5+7NC1XvV1P//+JKgIhYLamvY56v2r6yzn69zsdi1hdXN1mrUVbNs0TSPtm291V9Ph/Y\nRck01h7rP0hVLm9Tmgx+LKmaqN6PoyJiKfCApIMBsnPvDC9NbXkT8B3gokie6WX/narPmb0+SJpL\nuSi9Bb++AuJkUprMGuYgYWUZJemfVcsx2fbKj/nhwPckza0+KKuCegC4CziVVFVDzT5zSdVEtwKX\nkOri66lc733Ah5Sme7wDeGvVPucA781eqbP/7F7O+Sdgj36uW3nfcJtLH+u9nav6/atJAdSsYR4q\n3FqepC2A30XEjmWnZSCytotrImLPstMCIOnnwLezIGrWEJckrB20ZV16VlV1jaRZZacle8R2nAOE\nDZRLEmZmVpdLEmZmVpeDhJmZ1eUgYWZmdTlImJlZXQ4SZmZWl4OEmZnV9f8Bh2PoE8dTNjEAAAAA\nSUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Acceleration due to gravity(in ft/sec**2):\n", + "#calculate the Pressure difference between A and B\n", + "g=32.2;\n", + "##Specific gravity of mercury:\n", + "SGm=13.6;\n", + "##Specific gravity of oil:\n", + "SGo=0.88;\n", + "##Specific gravity of water:\n", + "SGw=1.;\n", + "##Density of water(in slug/ft**3):\n", + "d=1.94;\n", + "##Heights of liquid in various tubes(in inches):\n", + "d1=10.;\n", + "d2=3.;\n", + "d3=4.;\n", + "d4=5.;\n", + "d5=8.;\n", + "##pressure difference##\n", + "##Pressure difference(in lbf/in**2):\n", + "dp=g*d*(-d1+SGm*d2-SGo*d3+SGm*d4+d5)/12./144.\n", + "print(\"\\n\\nRESULTS\\n\\n\")\n", + "print'%s %.2f %s'%(\"\\n\\nPressure difference between A and B:\",dp,\" lbf/in^2\\n\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "RESULTS\n", + "\n", + "\n", + "\n", + "\n", + "Pressure difference between A and B: 3.73 lbf/in^2\n", + "\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate the If temperature varies linearly with altitude and If density is constant and For an adiabatic atmosphere\n", + "##Elevation of Denver(in ft):\n", + "z1=5280.;\n", + "##Pressure at Denver(in mm of Hg):\n", + "p1=24.8;\n", + "##Temperature at Denver(in F):\n", + "T1=80.;\n", + "##Elevation at Vail Pass(in ft):\n", + "z2=10600.;\n", + "##Temperature at Vsil Pass(in F):\n", + "T2=62.;\n", + "##Value of R in ft-lbf/lbm-R):\n", + "R=53.3;\n", + "##Acceleration due togravity(in ft/sec**2):\n", + "g=32.2;\n", + "##Value of adiabatic constant:\n", + "k=1.4;\n", + "\n", + "##temperature and pressure##\n", + "\n", + "##Assuming temperature varies linearly with altitude:\n", + "##Temperature gradient(in F/ft):\n", + "m=(T1-T2)/(z2-z1)\n", + "##Value of g/(m*R):\n", + "v=g/m/R/32.2\n", + "##Pressure at Vail Pass(in inches of Hg):\n", + "p12=p1*((T2+460.)/(T1+460.))**v\n", + "##Percentage change in density:\n", + "pc1=(p12/p1*(T1+460.)/(T2+460.)-1.)*100.\n", + "##Assuming density is constant:\n", + "##Pressure at Vail Pass(in inches of Hg):\n", + "p22=p1*(1.-(g*(z2-z1)/(R*32.2)/(T1+460.)))\n", + "##Percentage change in density:\n", + "pc2=0.;\n", + "##Assuming temperature is constant:\n", + "##Pressure at Vail Pass(in inches of Hg):\n", + "p32=p1*math.e**(-g*(z2-z1)/(R*32.2)/(T2+460.))\n", + "##Percentage change in density:\n", + "pc3=(p32/p1*(T1+460.)/(T1+460.)-1)*100.\n", + "##For an adiabatic atmosphere:\n", + "p42=p1*((62.+460.)/(80.+460.))**(k/(k-1.))\n", + "##Percentage change in density:\n", + "pc4=(p42/p1*(T1+460.)/(T2+460.)-1)*100.\n", + "print (\"RESULTS\")\n", + "print (\"1) If temperature varies linearly with altitude\")\n", + "print'%s %.2f %s'% (\"\\tAtmospheric pressure at Vail Pass: \",p12,\" inches of Hg\")\n", + "print'%s %.2f %s'% (\"\\tPercentage change in density wrt Denver:\",pc1,\" percent\")\n", + "print(\"2) If density is constant\")\n", + "print'%s %.2f %s'% (\"\\tAtmospheric pressure at Vail Pass:\",p22,\" inches of Hg\")\n", + "print'%s %.2f %s'% (\"\\tPercentage change in density wrt Denver: \",pc2,\" percent\")\n", + "print(\"3) If temperature is constant\")\n", + "print'%s %.2f %s'% (\"\\tAtmospheric pressure at Vail Pass: \",p32,\" inches of Hg\")\n", + "print'%s %.2f %s'% (\"\\tPercentage change in density wrt Denver:\",pc3,\" percent\")\n", + "print (\"4) For an adiabatic atmosphere\")\n", + "print'%s %.2f %s'% (\"\\tAtmospheric pressure at Vail Pass: \",p42,\" inches of Hg\")\n", + "print'%s %.2f %s'% (\"\\tPercentage change in density wrt Denver: \",pc4,\" percent\")\n", + "print(\"due to rounding off error answer is slightly diffeerent\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "1) If temperature varies linearly with altitude\n", + "\tAtmospheric pressure at Vail Pass: 20.55 inches of Hg\n", + "\tPercentage change in density wrt Denver: -14.28 percent\n", + "2) If density is constant\n", + "\tAtmospheric pressure at Vail Pass: 20.22 inches of Hg\n", + "\tPercentage change in density wrt Denver: 0.00 percent\n", + "3) If temperature is constant\n", + "\tAtmospheric pressure at Vail Pass: 20.48 inches of Hg\n", + "\tPercentage change in density wrt Denver: -17.40 percent\n", + "4) For an adiabatic atmosphere\n", + "\tAtmospheric pressure at Vail Pass: 22.03 inches of Hg\n", + "\tPercentage change in density wrt Denver: -8.13 percent\n", + "due to rounding off error answer is slightly diffeerent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Length of gate(in m):\n", + "import math\n", + "#calculate Net force on the gate and Coordinate of centre of pressure\n", + "L=4.;\n", + "##Width of gate(in m):\n", + "w=5.;\n", + "##Depth of gate under water(in m):\n", + "D=2.;\n", + "##Density of water(in kg/m**3:\n", + "d=999.;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Angle of gate with horizontal:\n", + "theta=30.;\n", + "##force and pressure##\n", + "\n", + "##Net force on the gate(in kN):\n", + "Fr=d*g*w*(D*L+L**2./2.*math.sin(theta/57.3))\n", + "##Centre of pressure:\n", + "##Calculation for y coordinate:\n", + "yc=D/math.sin(theta/57.3)+L/2. #Area(in m**2):\n", + "A=L*w\n", + "##Moment of inertia of rectangular gate(in m**4):\n", + "Ixx=w*L**3./12.\n", + "##y coordinate(in m):\n", + "y=yc+Ixx/A/yc\n", + "##Calculation for x coordinate:\n", + "Ixy=0.\n", + "xc=w/2.\n", + "##x coordinate(in m):\n", + "x=xc+Ixy/A/xc\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'% (\"Net force on the gate: \",Fr/1000,\"kN\")\n", + "print'%s %.2f %s %.2f %s '% (\"Coordinate of centre of pressure:\",x,\" \"and \" \",y,\"\")\n", + " \n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Net force on the gate: 588.00 kN\n", + "Coordinate of centre of pressure: 2.50 6.22 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Pressure apllied on the door(in psfg):\n", + "#calculate the Force requiredto kep the door shut\n", + "p0=100.;\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "#Length of door(in feet):\n", + "L=3.;\n", + "#Breadth of the door(in feet):\n", + "b=2.;\n", + "#Density of liqiuid(in lbf/ft^3):\n", + "d=100;\n", + "#force//\n", + "#Force required to keep the door shut(in lbf):\n", + "def fun(z):\n", + "\ty=b/L*p0*z+d*b/L*(L*z-z**2)\n", + "\treturn y\n", + "Ft=scipy.integrate.quad(fun,0,L)\n", + "\n", + "print(\"\\n\\nRESULTS\\n\\n\")\n", + "print(\"\\n\\nForce requiredto kep the door shut: \",Ft[0],\" lbf\\n\\n\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "RESULTS\n", + "\n", + "\n", + "('\\n\\nForce requiredto kep the door shut: ', 600.0, ' lbf\\n\\n')\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Width of gate(in m):\n", + "#calculate the orce requiredto kep the door shut and Force required to keep the gate at equilibrium\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "w=5.;\n", + "##Depth of water(in m):\n", + "D=4.;\n", + "##Density of water(in kg/m**3);\n", + "d=999.;\n", + "##Accelration deto gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Value of a (in m):\n", + "a=4.;\n", + "##Point where force acts(in m):\n", + "l=5.;\n", + "##force at equilibrium##\n", + "##Horizontal component of resultant force(in kN):\n", + "Frh=0.5*d*g*w*D**2.\n", + "##Line of action of Frh(in m):\n", + "y1=0.5*D+w*D**3./12./(0.5*D)/(w*D)\n", + "##Vertical component of resultant force(in kN):\n", + "def fun(x):\n", + "\ty=d*g*w*(D-math.sqrt(a*x))\n", + "\treturn y\n", + "Frv=scipy.integrate.quad(fun,0,D**2/a)\n", + "##Line of acion of Frv(in m):\n", + "def fun(x1):\n", + "\tk=d*g*w/Frv[0]*x1*(D-math.sqrt(a*x1))\n", + "\treturn k \n", + "xa=scipy.integrate.quad(fun,0,D**2/a)\n", + "y=xa[1]\n", + "print'%s %.2e %s'%(\"\\n\\nForce requiredto kep the door shut: \",y,\" lbf\\n\\n\")\n", + "##Force required to keep the gate in equilibrium(in kN):\n", + "\n", + "Fa=1./l*(xa[1]*Frv[0]+(D-y1)*Frh)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Force required to keep the gate at equilibrium: %f \",Fa/1000,\"\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Force requiredto kep the door shut: 1.33e-15 lbf\n", + "\n", + "\n", + "RESULTS\n", + "Force required to keep the gate at equilibrium: %f 104.54 \n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..2e6b4737 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter4.ipynb @@ -0,0 +1,854 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:028d8ec7dec7571f0a286f4eb3d2b616ecae167d80be8382ac3966895a05e1f0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4-Basic Equations in Integral form for a Control volume" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Area of 1 (in ft**2):\n", + "#calculate Velocity at section 2\n", + "A1=0.2;\n", + "##Area of 2 (in ft**2):\n", + "A2=0.5;\n", + "##Area of 3 (in ft**2):\n", + "A3=0.4;\n", + "##Area of 4 (in ft**2):\n", + "A4=0.4;\n", + "##Density of water (in slug/ft**3):\n", + "d=1.94;\n", + "##Mass flow rate out of section 3(in slug/sec):\n", + "m3=3.88;\n", + "##Volme flow rate in section 4 (in ft**3/sec):\n", + "Q4=1.;\n", + "##Velocity at 1(in ft/sec):\n", + "V1=10.;\n", + "##Velocity##\n", + "##If I=integral of(pV.dA):\n", + "##For system: Ics=IA1+IA2+IA3+IA4.\n", + "##For area 1\n", + "IA1=-d*V1*A1\n", + "##For area 3: IA2=d*V3*A3=m3\n", + "IA3=m3\n", + "##For area 4: IA4=-d*V4*A4=-d*Q4\n", + "IA4=-d*Q4\n", + "##For area 2:\n", + "IA2=-IA1-IA3-IA4\n", + "##Velocity at section 2(in ft/sec):\n", + "V2=IA2/d/A2\n", + "##V2 is in the negative y direction\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Velocity at section 2: \",-V2*2.25,\"j ft/sec\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Velocity at section 2: -4.50 j ft/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Flow velocity ahead of the plate(in m/sec):\n", + "#calculate Mass flow rate across surface bc\n", + "U=30.;\n", + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "##Boundary layer tckness at location d(in mm):\n", + "t=5.;\n", + "##Density of fluid air(in k/m**3):\n", + "d=1.24;\n", + "##Plate wdth perpendicular to the plate(in m):\n", + "w=0.6;\n", + "##Mass flow##\n", + "\n", + "##If I=integral of(pV.dA):\n", + "##For system: ICS=Iab+Ibc+Icd+Ida\n", + "##But ICS=0\n", + "\n", + "##For Aab:\n", + "def fun(y):\n", + " p=-d*U*w*y**0\n", + " return p\n", + "IAab=scipy.integrate.quad(fun,0,t)\n", + "z=IAab[0]\n", + "\n", + "##For Acd:\n", + "def fun(y1):\n", + " q=d*U*w*(2.*y1/t-(y1/t)**2.)\n", + " return q\n", + "\n", + "IAcd=scipy.integrate.quad(fun,0,t)\n", + "z1=IAcd[1]\n", + "\n", + "##Mass flow rate across surface bc(in kg/sec):\n", + "mbc=(-z-z1)/1000.\n", + "print (\"RESULTS\")\n", + "print\"%s %.3f %s\"% (\"Mass flow rate across surface bc: \",mbc,\"kg/sec\")\n", + "print(\"ans is wrong due to round of error\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Mass flow rate across surface bc: 0.112 kg/sec\n", + "ans is wrong due to round of error\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Volume of tank(in m**3):\n", + "#calculate Rate of change of air density in tank\n", + "V=0.05;\n", + "##Pressure of air(In kPa):\n", + "p=800.;\n", + "##Temperature of tank(in C):\n", + "T=15.;\n", + "##Velocity of leavig air(in m/sec):\n", + "v=311.;\n", + "##Density of air(in kg/m**3):\n", + "d=6.13;\n", + "##Area ofvalve exit(in mm**2):\n", + "A=65.;\n", + "##density##\n", + "##Rate of change of air density in tank(in (kg/m**3)/s):\n", + "r=-d*v*A/V/10**6.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Rate of change of air density in tank: \",r,\" kg/m^3\")\n", + "print(\"The density decreases as is indicated by the negative sign\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Rate of change of air density in tank: -2.48 kg/m^3\n", + "The density decreases as is indicated by the negative sign\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Velocity of water leaving the nozle(in m/sec):\n", + "#calculate Horizontal force on support\n", + "V=15.;\n", + "##Area of nozzle(in m**2):\n", + "A=0.01;\n", + "##Density of water(in kg/m**3):\n", + "d=999.;\n", + "##Horizontal force##\n", + "\n", + "##1) Control Volume selected so that area of left surface is equal to the area of the right surface\n", + "u1=15.;\n", + "##Force of support on control volum(in kN):\n", + "def fun(A):\n", + " y=y=-u1*d*V\n", + " return y\n", + "Rx1=scipy.integrate.quad(fun,0,0.01)\n", + "##Horizontal force on support(in kN):\n", + "Kx=-Rx1[0]\n", + "##2) Control volumes are selected do that the area of the left and right surfaces are equial to the area of the plate\n", + "def fun(A1):\n", + " z=-u1*d*V\n", + " return z\n", + "Fsx=scipy.integrate.quad(fun,0,0.01)\n", + "u=Fsx[1]\n", + "##Net force on plate:Fx=0=-Bx-pa*Ap+Rx\n", + "## Rx=pa*Ap+Bx\n", + "##From the above, it is obtained that: \n", + "Rx2=-2.25\n", + "##Horizontal force on support(in kN):\n", + "Kx2=-Rx2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Horizontal force on support: \",Kx/1000,\" kN\")\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Horizontal force on support: 2.25 kN\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Height of the container(in ft):\n", + "#calculate Scale Reading\n", + "l=2.;\n", + "##Area of cross section(in ft**2):\n", + "A=1.;\n", + "##Weight of container(in lbf):\n", + "W=5.;\n", + "##Water depth (in ft):\n", + "h=1.9;\n", + "##Area of opening 1(in ft**2):\n", + "A1=0.1;\n", + "##Velocity at opening 1(in ft/sec):\n", + "V1=-5.;\n", + "##Area of opening 2(in ft**2):\n", + "A2=0.1;\n", + "##Area of opening 1(in ft**2):\n", + "A3=0.1;\n", + "##Density of water(in slug/f**3):\n", + "d2=1.94;\n", + "##Scale##\n", + "##Weight of water in the tank(in lbf):\n", + "d1=62.4;\n", + "WH2O=d1*A*h\n", + "v=-5.;\n", + "##Total body force in negative y direction(lbf):\n", + "def fun(A):\n", + " y=-v*d2*V1\n", + " return y\n", + "F=scipy.integrate.quad(fun,0,A)\n", + "##Force of scale on control volume(in kN):\n", + "Ry=W+WH2O-F[0]-29.06\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Scale Reading:\",Ry,\" lbf\")\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Scale Reading: 143.00 lbf\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Pressure at inlet tothe elbow(in N/m**2):\n", + "#calculate Force to hold elbow acting to the left\n", + "p1=2.21*10**5;\n", + "##Area of crosssection(in m**2):\n", + "A1=0.01;\n", + "##Velocity at secton 2(in m/sec):\n", + "V2=16.;\n", + "##Area of cross section of section 2(in m**2):\n", + "A2=0.0025;\n", + "##Atmospheric pressure(in kPa):\n", + "patm=1.012*10**5;\n", + "d=999.\n", + "##Force to hold##\n", + "##Velocity at section 1(in m/sec):\n", + "V1=V2*A2/A1\n", + "##Gauge pressure(in kPa):\n", + "p1g=p1-patm\n", + "u1=V1;\n", + "u2=-V2;\n", + "##Reaction force component in the x direction(in N):\n", + "Rx=-p1g*A1-u1*d*V1*A1\n", + "##Reaction force component in the y direction(in N):\n", + "Ry=u2*d*V2*A2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Force to hold elbow acting to the left: \",Rx/1000,\" kN\")\n", + "print'%s %.2f %s'%(\"Force to hold elbow acting downwards: \",Ry,\" N\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Force to hold elbow acting to the left: -1.36 kN\n", + "Force to hold elbow acting downwards: -639.36 N\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate Horizontal force exerted per unt width on the gate\n", + "##Diameter of channel(in m):\n", + "D1=3;\n", + "##Velcity of flow in channel(in m/sec):\n", + "V1=1;\n", + "##Diameter at section 2(in m):\n", + "D2=0.429;\n", + "##Velocity a section 2(in m/sec):\n", + "V2=7;\n", + "##Density of water(in kg/m**3):\n", + "d=999;\n", + "##Acceleration due to gravity(in m/sec2):\n", + "g=9.81;\n", + "\n", + "##force exerted\n", + "##X-component of reaction force per unit width of the gate(in N/m):\n", + "Rxw=(d*(V2**2.*D2-V1**2.*D1))-(d*g/2.*(D1**2.-D2**2.))\n", + "##Horizontal force exerted per unt width on the gate(in N/m):\n", + "Kxw=-Rxw\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Horizontal force exerted per unt width on the gate: \",-Kxw/1000,\" kN/m\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Horizontal force exerted per unt width on the gate: -25.20 kN/m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Tension required to pull the belt\n", + "##Velocity of conveyor belt(in ft/sec):\n", + "Vbelt=3.;\n", + "##Velocity of sand alling onto belt(in ft/sec):\n", + "Vsand=5.;\n", + "##Flow rate(in lbm/sec):\n", + "m=500.;\n", + " ##Tension##\n", + "##Tension required to pull the belt(in lbf):\n", + "T=Vbelt*m/32.2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Tension required to pull the belt: \",T,\" lbf\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Tension required to pull the belt: 46.58 lbf\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9-pg128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Minimum gauge pressure required\n", + "##Nozzle inlet diameter(in inchess):\n", + "D1=3;\n", + "##Nozzle exit diameter(in inches):\n", + "D2=1;\n", + "##Desired volume flow rate(in ft^3/sec):\n", + "Q=0.7;\n", + "##Density of water(in slug/ft^3):\n", + "d=1.94;\n", + "##pressure required##\n", + "\n", + "##Minimum gauge pressure required(in lbf/in^2):\n", + "pg=8./math.pi**2*d/D1**4.*Q**2.*((D1/D2)**4.-1.)*144.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Minimum gauge pressure required: \",pg,\" lbf/in^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Minimum gauge pressure required: 109.59 lbf/in^2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10-pg130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Vane turning angle:\n", + "#calculate Net force on the vane\n", + "theta=60;\n", + "##Speed of vane(in m/sec):\n", + "U=10;\n", + "##Area of nozzle(in m2):\n", + "A=0.003;\n", + "##Flow velocity of water(in m/sec):\n", + "V=30;\n", + "##Density of water(in kg/m^3):\n", + "d=999;\n", + "##Net force##\n", + "\n", + "u1=V-U\n", + "u2=(V-U)*math.cos(theta/57.3)\n", + "v2=(V-U)*math.sin(theta/57.3)\n", + "V1=V-U\n", + "V2=V1\n", + "##X component of moment equation(in N):\n", + "def fun(A):\n", + " y=y=u1*-(d*V1)\n", + " return y\n", + "def fun(A):\n", + " z=z=u2*d*V2\n", + " return z\n", + "\n", + "x=scipy.integrate.quad(fun,0,A)\n", + "y=scipy.integrate.quad(fun,0,A)\n", + "Rx=x[0]+y[1]\n", + "##Y component of moment equation(in N):\n", + "def fun(A):\n", + " a=v2*d*V\n", + " return a\n", + "Ry=scipy.integrate.quad(fun,0,A) ##This is after neglecting weight of vane and the water.\n", + "Ry1=Ry[0]\n", + "print(\"RESULTS\")\n", + "print\"%s %.2f %s %.2f %s\"%(\"Net force on the vane: \",Rx/1000,\"+\" \"\" ,Ry1/1000,\"\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Net force on the vane: 0.60 + 1.56 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex11-pg134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Mass of vane and cart(in kg):\n", + "import math\n", + "#plot the graph\n", + "import numpy\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "\n", + "import numpy\n", + "M=75;\n", + "##Turning angle of vane:\n", + "theta=60;\n", + "##Speed of water leaving nozzle horizontally(in m/sec):\n", + "V=35;\n", + "##Exit area of nozzle(in m^):\n", + "A=0.003;\n", + "##Density of water(in kg/m^3):\n", + "d=999;\n", + "##PLOTTING##\n", + "\n", + "##Evaluating the value of Vb:\n", + "Vb=V*(1-math.cos(theta/57.3))*d*A/M\n", + "##Value of U/V for various values of t\n", + "t=numpy.linspace(0,20,num=21)\n", + "n=len(t);\n", + "U_V=numpy.zeros(n)\n", + "for i in range(0,n):\n", + " U_V[i]=Vb*t[i]/(1+Vb*t[i]);\n", + "\n", + "\n", + "##Plotting U/V vs t:\n", + "pyplot.plot(t,U_V)\n", + "pyplot.title('U/V vs t')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 4, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEKCAYAAADticXcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGcVJREFUeJzt3X2UVPV9x/H3Vx4DLi5IRIugRiGCRw02QasSJw2piBRj\nWpNgEpM0aUwaq0l6EmOTo9vmpDHaRojaBC1JNFaJUaMYFY3GPfiAPBwQBBbE6iKwPqDypKAs7Ld/\n/GbY2WF3Z2Z3Zu6dO5/XOffMvXPv3vnNnPHDz9/TmLsjIiLJcFDUBRARkdJRqIuIJIhCXUQkQRTq\nIiIJolAXEUkQhbqISIIo1EVEEkShLiKSIAp1qRpm1mZmH8h5rsHMfpvz3BVm9msza829Pn3+D2Z2\nbRnL2WhmXynX/UW6o1CXatfZlOipwM3AY8AXsk+Y2TDgHOA3FS6TSEUo1KXaWYcDs6HAWGAhcAs5\noQ58Fljt7qsPuJHZQ2b2zZznVpjZJ9P715nZa2a23cxWmtkJndzjx8Ak4AYz22lmP+/NmxMplkJd\nkuZs4FEPixrdCww3szOyzn+BEPaduR2YkTkws/HAaOABMzubENZj3P0Q4ALg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Aj55p5wCXA3PQ/AttyA73YQomISM90G+ruvtfMLgEeBvoAc9y9\nycwuTp+f7e4PmtlUM3sBeAf4ctlLLSIinarY2i8iIlJ+ZZ9RWsjkJSmcmTWb2UozW25mi6MuT7Ux\ns1+Z2Wtm9lzWc8PM7E9m9ryZPWJmGnxboC4+zwYz25T+ji43sylRlrFamNkoM3vczFab2SozuzT9\nfFHfz7KGeiGTl6RoDqTcfYK7T4y6MFXo14TvY7bvA39y97HAY+ljKUxnn6cDP0t/Rye4+/wIylWN\nWoFvu/sJwGnAN9N5WdT3s9w19UImL0nx1OncQ+7+BLA15+n9E+jSj5+saKGqWBefJ+g7WjR3f9Xd\nn03vvw00EeYBFfX9LHeoFzJ5SYrjwKNmttTM/jHqwiTEiKwRW68Bnc6IlqL8c3otqDlqzipeesTh\nBGARRX4/yx3q6oUtvTPcfQJwDuF/zyZFXaAk8TByQN/b3vkFcAzwIeAV4L+iLU51MbODgbuBy9x9\nZ/a5Qr6f5Q71zcCorONRhNq69JC7v5J+3AL8gdDEJb3zmpkdDmBmRwCvR1yequbur3sa8D/oO1ow\nM+tHCPTfuvu96aeL+n6WO9T3T14ys/6EyUvzyvyaiWVmg8ysLr0/GPgb4Lnu/0oKMA/4Ynr/i8C9\n3VwreaSDJ+N89B0tiJkZMAdY4+4zs04V9f0s+zh1MzsHmEn75KWflPUFE8zMjiHUziFMHPtffZ7F\nMbM7gLOA4YT2ySuB+4A7gdFAM/Bpd98WVRmrSSef51VAitD04sBLwMWdzTKXjszsTGABsJL2JpYr\ngMUU8f3U5CMRkQSp6M/ZiYhIeSnURUQSRKEuIpIgCnURkQRRqIuIJIhCXUQkQRTqIiIJolAXEUmQ\n/wefXXrvIR1tbAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12-pg136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Velocity of rocket\n", + "##Initial mass of th rocket(in kg):\n", + "M0=400.;\n", + "##Rate of fuel consumption(in kg/sec):\n", + "me=5.;\n", + "##Exhaust velocity(in m/sec):\n", + "Ve=3500.;\n", + "##Acceleration due to gravity(in m/sec^2):\n", + "g=9.81;\n", + "##Time after which velocity is to be calculated(in sec):\n", + "t=10.;\n", + "##Velocity of rocket##\n", + "##Acceleration of rocket at t=0(in m/sec^2):\n", + "Ve*me/M0-g\n", + "##Velocity of rocket at t=10 (in m/sec):\n", + "def fun(t):\n", + " y=Ve*me/(M0-me*t)-g\n", + " return y\n", + "Vcv=scipy.integrate.quad(fun,0,t)\n", + "print(\"RESULTS\")\n", + "print\"%s %.2f %s\"%(\"Velocity of rocket at t=10: \",Vcv[0],\" m/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Velocity of rocket at t=10: 369.26 m/sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14-pg141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Jet speed relative to each nozzle and Friction torque at pivot\n", + "##Inlet gauge pressure(in kPa):\n", + "p=20.;\n", + "##Volume flow rate of water through the sprinkler(in l/min):\n", + "Q=7.5;\n", + "##Speed of rotstion of sprinkler(in rpm):\n", + "w=30.;\n", + "##Diameter of jet f sprinkle(in mm):\n", + "D=4.;\n", + "##Radius of sprinkler(in mm):\n", + "R=150.;\n", + "##Supply pressure to sprinkler(in kPa):\n", + "p=20.;\n", + "##Angle at which jet is sprayed wrt horizontal:\n", + "alpha=30.;\n", + "##Density of water(in kg/m^):\n", + "d=999.;\n", + "\n", + "##Relative speed and friction##\n", + "##Area of jet(in mm^2):\n", + "Ajet=math.pi/4.*D**2\n", + "##Jet speed relative to the nozzle(in m/sec):\n", + "Vrel=Q/2./Ajet*10**6./60./1000.\n", + "##Value of w*R in m/sec:\n", + "wR=w*R*2.*math.pi/60./1000.\n", + "##Friction torque at pivot(in N-m):\n", + "Tf=R*(Vrel*math.cos(alpha/57.3)-wR)*d*Q/1000./60./1000.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Jet speed relative to each nozzle: \",Vrel,\" m/sec\")\n", + "print'%s %.2f %s'%(\"Friction torque at pivot:\",Tf,\" N-m\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Jet speed relative to each nozzle: 4.97 m/sec\n", + "Friction torque at pivot: 0.07 N-m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex16-pg147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Pressure at entry(in psia):\n", + "#calculate Rate of heat transfer\n", + "p1=14.7;\n", + "##Temperature at entry(in F):\n", + "T1=70.;\n", + "##Pressure at exit(in psia):\n", + "p2=50.;\n", + "##Temprature a exit(in F):\n", + "T2=100.;\n", + "##Cross sectional area of the pipe at exit(in ft^2):\n", + "A2=1.;\n", + "##Mass flow rate(in lbf/sec):\n", + "m=20.;\n", + "##Power input to the compressor(in hp):\n", + "Ws=-600.;\n", + "##Value of cp(in Btu/lbm-R):\n", + "cp=0.24;\n", + "##Value of gas constant(in ft-lbf/(lbm-R))\n", + "R=53.3;\n", + "\n", + "##Rate of heat##\n", + "##Velocity at exit(in ft/sec):\n", + "V2=m*R*(T2+460.)/A2/p2/144.\n", + "##As power input is to CV, Ws=-600\n", + "##Rate of heat transfer(in Btu/sec):\n", + "Q=Ws*550./778.+m*cp*(T2-T1)+m*V2**2./2./32.2/778.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Rate of heat transfer: \",Q,\" Btu/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Rate of heat transfer: -277.42 Btu/sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex17-pg149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Volume of tak(in m^3):\n", + "#calculate Mass flow rate of air into the tank\n", + "V=0.1;\n", + "##Temperature of line and tank(in K):\n", + "T=293.;\n", + "##Initial tank gauge pressure(in N/m^2):\n", + "p1=1*10**5;\n", + "##Absolute line pressure(in N/m^2):\n", + "p=2*10**6;\n", + "##Rate of rise of temperature after opening of the valve(in C/sec):\n", + "r=0.05;\n", + "##Atmospheric pressure(in N/m^2):\n", + "patm=1.01*10**5;\n", + "##Gas Constant(in N-m/(kg-K)):\n", + "R=287.;\n", + "##Value of cv(in N-m/kg-K):\n", + "cv=717.;\n", + "\n", + "##Mass flow rate##\n", + "##Density of tank(in kg/m^3):\n", + "d=(p1+patm)/R/T\n", + "##Mass flow rate of air into the tank(in kg/sec):\n", + "m=d*V*cv*r/R/T*1000.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Mass flow rate of air into the tank: \",m,\" g/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Mass flow rate of air into the tank: 0.10 g/sec\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..e0682810 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter5.ipynb @@ -0,0 +1,239 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c6e2d196edaa8793663cc899810af049af83543670c62efe72d65cf39f90b331" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter5-Introducton to Di\u000b", + "\n", + "erential Analysis of Fluid Motion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Distance f piston from closed end of the cylinder at the give instant(in m):\n", + "#calculate Rate of change of density with time\n", + "L=0.15;\n", + "##Density of gas(in kg/m**3):\n", + "d=18.;\n", + "##Velocity of piston(in m/sec):\n", + "V=12.;\n", + "##Rate of change##\n", + "##Rate of change of density with time(in kg/m**3-s):\n", + "r=-d*V/L\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Rate of change of density with time: \",r,\" kg/m^3-s\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Rate of change of density with time: -1440.00 kg/m^3-s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate \"Rate of angular deformation and Rate of rotation\n", + "#Value of (in mm/sec):\n", + "U=4.;\n", + "##Value of h(in mm):\n", + "h=4.;\n", + "##Tme at which to find position(in sec):\n", + "t=1.5;\n", + "\n", + "##angular and rotation##\n", + "##At point b, u=3 mm/sec\n", + "u=3.;\n", + "##Displacemet of b(in mm):\n", + "xb=u*t\n", + "##Rate of angular deformation(in s**-1):\n", + "D=U/h\n", + "##Rate of rotation(in s**-1):\n", + "rot=-0.5*U/h\n", + "print(\"RSULTS\")\n", + "print'%s %.2f %s'%(\"Rate of angular deformation:\",D,\" /sec\")\n", + "print'%s %.2f %s'%(\"Rate of rotation: \",rot,\" /sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RSULTS\n", + "Rate of angular deformation: 1.00 /sec\n", + "Rate of rotation: -0.50 /sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex8-pg 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Value of A(in sec**-1):\n", + "#calculate Rates of linear deformation in X and Y direction: Rate of volume dilation\n", + "A=0.3;\n", + "import numpy\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "%matplotlib inline\n", + "import warnings\n", + "from math import log\n", + "warnings.filterwarnings('ignore')\n", + "##Rates and area##\n", + "\n", + "##Value of T:\n", + "T=math.log(3./2.)/A\n", + "x0=numpy.linspace(1,2,num=3);\n", + "i=len(x0)\n", + "X=numpy.zeros(i)\n", + "\n", + "for i in range (1,2):\n", + " X[i]=x0[i]*math.e**(A*T)\n", + "y0=numpy.linspace(1,2,num=3);\n", + "j=len(y0)\n", + "Y=numpy.zeros(j)\n", + "for j in range(1,2):\n", + " Y[i]=y0[j]*math.e**(-A*T)\n", + "##For X coordinate:\n", + "##For Y coordinate:\n", + "\n", + "pyplot.plot(X,Y)\n", + "##Rates of linear deformation in X direction:\n", + "Ax=0.3;\n", + "##Rate of linear deformation in the y direction:\n", + "Ay=-0.3;\n", + "##Rate of volume dilation(s**-1):\n", + "v=A-A\n", + "##Area of abcd:\n", + "A1=1.;\n", + "##Area of a'b'c'd':\n", + "A2=(3.-3./2.)*(4./3.-2./3.)\n", + "print(\"RESULTS\")\n", + "print\"%s %.2f %s %.2f %s \"%(\"Rates of linear deformation in X and Y direction: \",Ax,\" /s\"and \"\",Ay,\" /s\")\n", + "print\"%s %.2f %s\"%(\"Rate of volume dilation: \",v,\" /sec\") \n", + "print\"%s %.2f %s %.2f %s \"%(\"Area of abcd and a,b,c,d:\",A1,\" m^2\"and\" \",A2,\" m^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Rates of linear deformation in X and Y direction: 0.30 -0.30 /s \n", + "Rate of volume dilation: 0.00 /sec\n", + "Area of abcd and a,b,c,d: 1.00 1.00 m^2 \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEvxJREFUeJzt3X+o3Xd9x/Hn29t2tLjWaTHDNFKd3ZYIaidry6T1DAVv\nC2vL0HXZnNQMLINsK/ljnTKam44N+ofESqHrJL0IA4NGsR3UlLF5SRStK7bVNjfSWAr5MeNatXEm\nlNz0vT++x9zr6b3nnHvvOef76/mAC9/vPd+c88mXL++88z7fc16RmUiSmuV1ZS9AkjR6FndJaiCL\nuyQ1kMVdkhrI4i5JDWRxl6QGGljcI+KhiDgZEd/vc8xnI+K5iHg6Iq4e7RIlSas1TOc+C0yv9GBE\n3AS8IzOvAj4BPDCitUmS1mhgcc/Mg8BP+xxyM/D57rGPA2+IiA2jWZ4kaS1GMXPfCBxdsn8MuGIE\nzytJWqNRvaEaPft+p4EkleiCETzHcWDTkv0rur/7FRFhwZekNcjM3gZ6oFF07o8AHwOIiOuAn2Xm\nyeUOzEx/Mtm5c2fpa6jKj+fCc1GVc7FrV1IMHZLTp8s/B7/8WauBnXtEfAF4P3B5RBwFdgIXdov1\ng5n5aETcFBFHgF8AH1/zaiRpws6ehYsvhnPnYMcO+PSny17RaAws7pm5dYhjto9mOZI0Od/9Lrz3\nvcX2E08sbjeBn1AtQafTKXsJleG5WOS5WDSJc7FjR1HMp6bglVeaVdgBYj0znVW9UERO6rUkaSVn\nzsAllxTbu3bB3XeXu55BIoJcwxuqo7hbRpJq4eBBuOGGYvvQIdi8udz1jJNjGUmtsG1bUdg3bICF\nhWYXdrC4S2q4U6cgAmZnYfdu+NGPijl70zmWkdRY+/fDjTcW288/D297W7nrmSQ7d0mNdOutRWHf\n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3x7vsiqrDdfEMFp3TUTE64F9wN92u9bXHNKz39hrY8C5WNW1MerO/Tiwacn+\nJop/afsdc0X3d00z8Fxk5s8z83R3+2vAhRHxxsktsTLack0M1LZrIiIuBL4M/FtmfnWZQ1pzbQw6\nF6u9NkZd3M9/6CkiLqL40NMjPcc8AnwMzn8CdtkPPTXAwHMRERsiIrrb11DcmvqTyS+1dG25JgZq\n0zXR/XvuAQ5l5mdWOKwV18Yw52K118ZIxzLph57OG+ZcAB8G/ioiFoDTwJ+WtuAxiogvAO8HLo+I\no8BOijuIWnVNwOBzQUuuia73AR8FvhcRT3Z/9yngrdC6a2PguWCV14YfYpKkBio9Q1WSNHoWd0lq\nIIu7JDWQxV2SGsjiLkkNZHGXpAayuEtSA1ncJamB/h+yiW/Dtmg+XgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9-pg215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Volume flow rate\n", + "##Thickness of water film(in mm):\n", + "h=1.;\n", + "##Width of surface(in m):\n", + "b=1.;\n", + "##Angle of inclination of surface:\n", + "theta=15.;\n", + "##Density of water(in kg/m**3):\n", + "d=999.;\n", + "##Acceleration du to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Viscosity(kg/m-s):\n", + "u=10**-3.;##Volume flow rate##\n", + "##Volume flow rate(in m**3/sec):\n", + "Q=d*g*math.sin(theta/57.3)*b*(h/1000.)**3.*1000./u/3.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Volume flow rate: \",Q,\" m^3/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume flow rate: 0.85 m^3/sec\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..5f3fdd00 --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter6.ipynb @@ -0,0 +1,421 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5737ff12d4ed0bdd422df21787d32df0296a8a5c9c547863b5945ca4f44eb3a7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6-Incompressible Inviscid Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate volume flow rate \n", + "##Depth of the duct(in m):\n", + "d=0.3;\n", + "##Width of the duct(in m):\n", + "w=0.1;\n", + "##Inner radius of the bend(in m):\n", + "r=0.25;\n", + "##Pressure difference between the taps(in mm of Hg):\n", + "p=40.;\n", + "##Density of water(in kg/m**3):\n", + "dw=999.;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.8;\n", + "##Density of air(in kg/m**3):\n", + "da=1.23;\n", + "\n", + "##Volume flow rate##\n", + "##Velocity of flow(in m/sec):\n", + "V=math.sqrt(dw/math.log((r+w)/r)*g/da*p/1000.)\n", + "##Volume flow rate(in m**3/sec):\n", + "Q=V*(d*w)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Volume flow rate: \",Q,\" m^3/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume flow rate: 0.92 m^3/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Velocity of flow\n", + "##Pressure diference(in mm of mecury):\n", + "p=30.;\n", + "##Density of water(in kg/m**3):\n", + "dw=1000.;\n", + "##Aceleration due to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Density of air(in kg/m**3):\n", + "da=1.23;\n", + "##Specific gravity of mercury:\n", + "SG=13.6;\n", + "##Velocity of flow##\n", + "##Velocity of flow(in m/sec):\n", + "V=math.sqrt(2.*dw*g*p/1000.*SG/da)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Velocity of flow: \",V,\" m/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Velocity of flow: 80.67 m/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3-pg243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Area of nozzle at input(in m**2):\n", + "#calculate Gauge prssure required at the inlet\n", + "Ai=0.1;\n", + "##Area of nozzle at exit(in m**2):\n", + "Ae=0.02;\n", + "##Outlet velocity of flow(in m/sec):\n", + "V2=50;\n", + "##Density of air(in kg/m**3):\n", + "da=1.23;\n", + "##prssure required##\n", + "#Velocity of flwat the inlet(in m/sec):\n", + "V1=Ae/Ai*V2\n", + "##Gauge pressure required at the inlet(in kPa):\n", + "p=0.5*da*(V2**2.-V1**2.)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Gauge prssure required at the inlet: \",p/1000,\" kPa\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Gauge prssure required at the inlet: 1.48 kPa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate Speed of water at exit: and Pressure at point A in the flow\n", + "import math\n", + "##Length of tube above surface(in m):\n", + "l=1.;\n", + "##Depth of exit below water surface(in m):\n", + "z=7.;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Density of water(in kg/m**3):\n", + "d=999.;\n", + "##Atmospheric pressure(in N/m**2):\n", + "p1=1.01*10**5;\n", + "\n", + "\n", + "##Speed and pressure##\n", + "##Speed of water at exit(in m/sec):\n", + "V2=math.sqrt(2.*g*z)\n", + "##Pressure at point A in the flow(kPa):\n", + "pA=p1+d*g*(0.-l)-0.5*d*V2**2.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Speed of water at exit: \",V2,\" m/sec\")\n", + "print'%s %.2f %s'%(\"Pressure at point A in the flow: \",pA/1000,\" kPa\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Speed of water at exit: 11.72 m/sec\n", + "Pressure at point A in the flow: 22.60 kPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Velocity of flow at the exit: and Volume flow rate/width\n", + "##Depth of water at the upstream(on feet):\n", + "Du=1.5;\n", + "##Depth of water at the vena contracta downstream from the gate(in inches):\n", + "Dd=2.;\n", + "##Acceleration due to gravity(in ft/sec**2):\n", + "g=32.2;\n", + "##flow##\n", + "\n", + "##Velocity of flow at the exit(in ft/sec):\n", + "V2=math.sqrt(2.*g*(Du-Dd/12.))\n", + "##Volume flow rate/width(ft**2/sec):\n", + "Q=V2*Dd/12.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Velocity of flow at the exit: \",V2,\" ft/sec\")\n", + "print'%s %.2f %s'%(\"Volume flow rate/width: \",Q,\" ft^2/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Velocity of flow at the exit: 9.27 ft/sec\n", + "Volume flow rate/width: 1.54 ft^2/sec\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Speed of plane(in km/hr):\n", + "#calculate Stagnation pressure at Static pressure at B\n", + "V=150.;\n", + "##Speed at point B relative to the wing(in m/sec):\n", + "Vb=60.;\n", + "##Density of air(in kg/m**3):\n", + "da=1.23;\n", + "##Atmospheris pressure(in N/m**2):\n", + "pa=1.01*10**5;\n", + "##At 1000m, \n", + "##p/pSL:\n", + "P1=0.8870;\n", + "##d/dSL:\n", + "D1=0.9075;\n", + "\n", + "##pressure##\n", + "##Pressure of air at 1000 m(in N/m**2):\n", + "p=P1*pa\n", + "##Density of air at 1000m(in kg/m**3):\n", + "d=D1*da\n", + "##Stagnation pressure at A(in kPa):\n", + "p0A=p+0.5*d*(V*1000./3600.)**2.\n", + "##Static pressure at B(in kPa):\n", + "pB=p+d/2.*((V*1000./3600.)**2.-Vb**2.)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Stagnation pressure at A:\",p0A/1000,\" kPa\")\n", + "print'%s %.2f %s'%(\"Static pressure at B: \",pB/1000,\" kPa\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Stagnation pressure at A: 90.56 kPa\n", + "Static pressure at B: 88.55 kPa\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Rise in temperature between points 1 and 2 and Streamline flow from 1 to 2 \n", + "##Area of cross section of the nozzle(in in**2):\n", + "A4=0.864;\n", + "##Capacity of heater(in kW):\n", + "Q=10.\n", + "##Acceleration due to gravity(in ft/sec**2):\n", + "g=32.2;\n", + "##Water level in reservoir above datum line(in ft):\n", + "z3=10.;\n", + "##Density of water(In slug/ft**3):\n", + "d=1.94;\n", + "##temperature##\n", + "##Velocity of flow at exit(in ft/sec):\n", + "V4=math.sqrt(2.*g*(z3-0.))\n", + "##Mass flow rate of water(in slug/sec):\n", + "m=d*V4*A4/144.\n", + "##Rise in temperature between points 1 and 2(in R):\n", + "T=Q*3413./3600./m/32.2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Rise in temperature between points 1 and 2: \",T,\" R\")\n", + "#due to rounding off error we are getting aporximately\n", + "\n", + "\n", + "\n", + "\n", + "##Depth to which water is filled(in m):\n", + "import math\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "\n", + "import numpy\n", + "h=3;\n", + "##Length of pipe(in m):\n", + "L=6;\n", + "##Diameter of pipe (in mm):\n", + "D=150;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.81;\n", + "##Streamline flow##\n", + "\n", + "t=numpy.linspace(0,5,num=6)\n", + "n=len(t)\n", + "V2=numpy.zeros(n)\n", + "##Value of sqrt(2gh):\n", + "x=math.sqrt(2.*g*h)\n", + "##Value of 1/2L*sqrt(2gh):\n", + "y=1/2./L*x\n", + "\n", + "\n", + " \n", + "i=numpy.linspace(1,n,num=n)\n", + "\n", + "j=len(i)\n", + "print(j)\n", + "V2=numpy.zeros(j)\n", + "for j in range (0,6):\n", + " V2[j]=x*math.tanh(y*t[j]) \n", + "\n", + "##Velocity(in m/sec):\n", + "\n", + "pyplot.plot(t,V2);\n", + "pyplot.title('Streamline flow from 1 to 2')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Rise in temperature between points 1 and 2: 1.00 R\n", + "6\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 17, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAAEKCAYAAAA/2c+EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHpxJREFUeJzt3XmcVNWd9/HPTxZBBVxQESVIxgdcyGI0EaPG0qgxioaI\nYxaNSyY+TowTk4i4xNFOYlQIEzU6MeMS1Gg0BkRBBQS1FAd35UFk06AJSMAFRRAQmv49f5zbUDTd\nXVXUcmr5vl+velHLrXt/XXR/+/S555xr7o6IiFSerWIXICIirVNAi4hUKAW0iEiFUkCLiFQoBbSI\nSIVSQIuIVCgFtBSFmaXMbGHG41lm9pUSHKermU0wsw/N7D4zO8PMphX7OC2OeYiZvW5mK8zsxFIe\nSySTArqCmdmhZjY9CaP3zexpMzswee3MUgdTIdx9oLs/VYJdnwzsAuzo7qcAVoJjtPRL4Hfu3s3d\nx5fheJsws5vNbK6ZrTezM7Jse7uZ/aqAY40ys/lm9pGZzTGz723pvqRwCugKZWbdgYeA64EdgN2B\nXwCf5LGPWvz/7QvMd/emMh7zU8Ds1l6wRImPPwM4F3gZKPXMspXAYHfvDpwBXG9mB5f4mNIWd9et\nAm/AgcAHbby2D7AaaARWAMuS528HbgIeIfygHQn0BsYC7wALgP/I2M+XgGeAD4DFwA1Ap4zXm4Af\nAq8DHxFakv+SvOdD4N7m7YEUsDDjvW8BRyb3G4D7gDuS/cwCDsjYts0aW3zdzb+g1iZf9/cJITIt\nY5svAy8k9T0PHJw8fwQwM2O7KcDzGY+nASe2csy/AeuBVUntnYE0cCXwv8nzn27ruMk+0sCvku1X\nAOOBnsDdwPJk+745fE9MA05v5/X/m3w2nyTHeTDj+yWd/D/PAk7I4/vwQeBnsX8e6vUWvQDd2viP\ngW7Ae0noHgvs0OL1TYIpee72JCCaQ6kr8BJwGdAR6JcEzjHJ618ghPRWhJbpbOD8jP01AeOA7YB9\nkx/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Qr1/wFEHul9PcBiOgAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6fc6acfe --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter7.ipynb @@ -0,0 +1,255 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:025c501fec508fd016190bc946f3acca0ffd184e8a82ac722d2fce1bd862a90e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter7-Dimensional Analysis and Simlitude" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculateTest speed in air: and Drag force on prototype\n", + "##Diameter of the prototype(in ft):\n", + "Dp=1.;\n", + "##Speed of towing of prototype(in knots):\n", + "Vp=5.;\n", + "##Diameter of model(in inches):\n", + "Dm=6.;\n", + "##Drag for model at test condition(in lbf):\n", + "Fm=5.58;\n", + "##Density of seawater at 5 C for prototype(in slug/ft**3):\n", + "dp=1.99;\n", + "##Kinematic viscosity at 5 C for prototype(in ft**2/sec):\n", + "vp=1.69*10**-5;\n", + "##Density of air at STP for model(in slug/ft**3):\n", + "dm=0.00238;\n", + "##Kinematic viscosity of air at STP for model(in ft**2/sec):\n", + "vm=1.57*10**-4;\n", + "##speed and force##\n", + "##Velocity of prototype in ft/sec\n", + "Vp1=Vp*6080./3600.\n", + "##Reynolds number of prototype:\n", + "Rep=Vp1*Dp/vp\n", + "##Rep=Rem\n", + "##Therefore:\n", + "Rem=Rep;\n", + "##Velocity of air for wind tunnel(in ft/sec):\n", + "Vm=Rem*vm/(Dm/12.)\n", + "##Drag force on prototype(in lbf):\n", + "Fp=Fm*(dp/dm)*(Vp1/Vm)**2.*(Dp/(Dm/12.))**2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Test speed in air: \",Vm,\" ft/sec\")\n", + "print'%s %.2f %s'%(\"Drag force on prototype: \",Fp,\" lbf\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Test speed in air: 156.90 ft/sec\n", + "Drag force on prototype: 54.06 lbf\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Drag Force and Power required to pull prototype at 100 kmph\n", + "import numpy\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "##Width of the prototype(in ft):\n", + "wp=8.;\n", + "##Frontal area of the prototype(in ft**2):\n", + "Ap=84.;\n", + "##Model Scale:\n", + "S=1./16.;\n", + "##Density of air(in kg/m**3):\n", + "d=1.23;\n", + "##Air speed in wind tunnel(in m/sec):\n", + "V=numpy.array([18, 21.8, 26, 30.1, 35, 38.5, 40.9, 44.1, 46.7]);\n", + "##Drag force(in N):\n", + "Fd=numpy.array([3.1, 4.41, 6.09, 7.97, 10.7, 12.9 ,14.7, 16.9, 18.9]);\n", + "##Kinematic viscosity(in m**2/sec):\n", + "v=1.46*10**-5;\n", + "##Density of air(in kg/m**3):\n", + "d=1.23;\n", + "##Speed of prototype(in km/hr):\\\n", + "Vp=100.;\n", + "##speed force and power##\n", + "##Width of the model(in m):\n", + "wm=S*wp*0.3048\n", + "##Area of model (in m**2):\n", + "Am=S**2.*Ap*(0.305)**2\n", + "V=numpy.linspace(18.,46.7,num=9)\n", + "n=len(V);\n", + "Cd=numpy.zeros(n)\n", + "Re=numpy.zeros(n)\n", + "for i in range (1,n):\n", + " Cd[i]=((2.*Fd[i])/d)/((V[i]**2.)/0.0305)\n", + " Re[i]=(V[i]*wm)/v\n", + "##Reynolds number:\n", + "\n", + "pyplot.plot(Re,Cd);\n", + "a=gca()\n", + "a.data_bounds=numpy.matrix([[100000,0.4],[500000,0.6]])\n", + "pyplot.title('Aerodynamic drag coefficient vs drag force')\n", + "##It is seen that drag coefficient becomes constant at CD=0.46above Re=4*10**5 at which speed of air is 40m/s\n", + "CDc=0.46;\n", + "Va=40;\n", + "##Drag force (in N):\n", + "FDp=CDc/2*d*(Vp*5/18)**2*Ap*0.305**2\n", + "##Power required to pull prototype at 100 kmph(in W)\n", + "Pp=FDp*Vp*5/18\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Speed above which Cd is constant: \",Va,\" m/sec\")\n", + "print'%s %.2f %s'%(\"Drag Force: \",FDp/1000,\" kN\")\n", + "print'%s %.2f %s'%(\"Power required to pull prototype at 100 kmph: \",Pp/1000,\" kWb\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Speed above which Cd is constant: 40.00 m/sec\n", + "Drag Force: 1.71 kN\n", + "Power required to pull prototype at 100 kmph: 47.38 kWb\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYXFW57/HvjwzMEnAgkIRJghIB4XgYFMRmFEMI4SJg\nOBwiIsPRoB5RiF7FCHIZVGSSQQEZZJAxIGMi0MxhniFAgEASSAKBMAUhw3v/WKuTStHVXUmqe1d3\n/T7PU0/vae169+qqemuvtfYuRQRmZma1sEzRAZiZWffhpGJmZjXjpGJmZjXjpGJmZjXjpGJmZjXj\npGJmZjXjpNKNSG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p0GPia1Yx6Q/3n/Ap4Hxpb+44Bf5mOeAHyzZPlXgCfzulNLli8LXA68QBpBtE7JugPy\n8heAEXVQF9uQ2s0fAx7Nj10asT6AjYFHcl08Afw8L2+4uiiJ6RssHP3VkPVASgyP5cdT5M++eqwP\nX/xoZmY109X6VMzMrI45qZiZWc04qZiZWc04qZiZWc04qZiZWc04qZiZWc04qZiZWc04qZiZWc38\nfwtS+nrFie8GAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#calculate Volume flow rate at condition 2 nd and Specific speed at condition 2\n", + "##Efficinc of pump:\n", + "Effp=0.8;\n", + "##Design specific speed(in rpm):\n", + "Nscu1=2000.;\n", + "##Impeller diameter(in inches):\n", + "D1=8.;\n", + "##Opertion sped at esign point flow condition(in rpm):\n", + "N1=1170.;\n", + "##Flow rate at design point flow condition(in gpm):\n", + "Q1=300.;\n", + "##Density of water (in slug/ft**3):\n", + "d1=1.94;\n", + "##Acceleration due to gravity(in ft**2/sec):\n", + "g=32.2;\n", + "##Working speed 2(in rpm):\n", + "N2=1750.;\n", + "##power and speed##\n", + "##The same pump is used for both the conditions.Hence:\n", + "D2=D1;\n", + "##The same water is used for both the conditions. Hence:\n", + "d2=d1;\n", + "##Flow rate at condition 2(in gpm):\n", + "Q2=Q1*N2/N1*(D2/D1)**3.\n", + "##Head at condition 1(in ft):\n", + "H1=(N1*math.sqrt(Q1)/Nscu1)**(4./3.)\n", + "##Head at condition 1(in ft):\n", + "H2=H1*(N2/N1)**2.*(D2/D1)**2.\n", + "##Pump output power at condition 1(in hp):\n", + "P1=d1*g*Q1*H1/7.48/60./550.\n", + "##Pump output power at condition 2(in hp):\n", + "P2=P1*(d2/d1)*(N2/N1)**3.*(D2/D1)**5.\n", + "##Required input power(in hp):\n", + "Pin=P2/Effp\n", + "##Specific speed at condition 2:\n", + "Nscu2=N2*math.sqrt(Q2)/H2**(3./4.)\n", + "print(\"RESULTS\\n\")\n", + "print'%s %.2f %s'%(\"Volume flow rate at condition 2: \",Q2,\" gpm\\n\")\n", + "print'%s %.2f %s'%(\"Head at condition: \",H2,\" ft\\n\")\n", + "print'%s %.2f %s'%(\"Pump output power at condition: \",P2,\" hp\\n\")\n", + "print'%s %.2f %s'%(\"Required input power: \",Pin,\" hp\\n\")\n", + "print'%s %.2f %s'%(\"Specific speed at condition 2: \",Nscu2,\"\\n\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "\n", + "Volume flow rate at condition 2: 448.72 gpm\n", + "\n", + "Head at condition: 49.05 ft\n", + "\n", + "Pump output power at condition: 5.57 hp\n", + "\n", + "Required input power: 6.96 hp\n", + "\n", + "Specific speed at condition 2: 2000.00 \n", + "\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..a01b23cc --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter8.ipynb @@ -0,0 +1,581 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:428b14acd687083c4e31227915985274e337a40481d2acffde140ee236ead44c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter8- Internal Incompressible Viscous Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Operation pressure of hydraulic system(in kPa):\n", + "p1=20000.;\n", + "##Operation temperature of hydraulic system(in C):\n", + "T=55.;\n", + "##Piston diameter(in mm):\n", + "D=25.;\n", + "##Viscosity of SAE 10W at 55C(in kg/(m-s):\n", + "u=0.018;\n", + "##Mean radial clearance of a cylinder(in mm):\n", + "a=0.005;\n", + "##Gauge pressure on lower pressure side of piston(in kPa):\n", + "p2=1000.;\n", + "##Lenth of piston(in mm):\n", + "L=15.;\n", + "##Denity of water(in kg/m^3):\n", + "dw=1000.;##Leakage flow rate##\n", + "\n", + "##Leakage flow rate (in mm^3/sec):\n", + "Q=math.pi/12.*D*a**3.*(p1-p2)*10**3/u/L\n", + "##Velocity of flow(in m/sec):\n", + "V=Q/math.pi/D/a/1000.\n", + "##Specific gravity of SAE 10W oil:\n", + "SG=0.92;\n", + "##Reynolds Number:\n", + "Re=SG*dw*V*a/u/1000.\n", + "##As Re<1400, flow is laminar.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Leakage flow rate: \",Q,\" mm^3/sec\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Leakage flow rate: 57.57 mm^3/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2-pg320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##temperature fo operation(in F):\n", + "T=210.;\n", + "##Diameter of te bearing(in inches):\n", + "D=3.;\n", + "##Diametral clearance(in inches):\n", + "a=0.0025;\n", + "##Length of shaft(in inhes):\n", + "L=1.25;\n", + "##Speed of rotation of the shaft(in rpm):\n", + "N=3600.;\n", + "##Viscosity of the oil(in lbf-s/ft^2):\n", + "u=2.01*10**-4.;\n", + "##Specific gravity of SAE 10W:\n", + "SG=0.92;\n", + "##Density of water (in slug/ft^3)\n", + "p=1.94;##Torque and power##xec(filename)\n", + "##Shear stres .in lbf/ft^2):\n", + "Tyx=u*N*2.*math.pi/60.*D/2./(a/2.)\n", + "##Torqe(in inches-lbf):\n", + "T=math.pi/2.*Tyx*D**2.*L/144.\n", + "##Power dissipated in the bearing(in hp):\n", + "P=T*N/60.*2.*math.pi/12./550.\n", + "##Reynolds number:\n", + "Re=SG*p*N*2.*math.pi/60.*1.5*a/2./u/144.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Torque: \",T,\" inches-lbf\")\n", + "print'%s %.2f %s'%(\"Power dissipated in the bearing: \",P,\" hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Torque: 11.16 inches-lbf\n", + "Power dissipated in the bearing: 0.64 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Flow rate through capilarry viscometer(in mm^3/sec):\n", + "Q=880.;\n", + "##Tube length(in m):\n", + "L=1.;\n", + "##Tube diameter(in mm):\n", + "D=0.5;\n", + "##Pressure drop(in kPa):\n", + "p=1000.;\n", + "##Density of oil(in kg/m^3):\n", + "d=999.;\n", + "##Viscosity of fluid##\n", + "#Viscosity of the liquid(in N-s/m^2):\n", + "u=math.pi/128.*p*1000.*D**4./Q/L/1000.\n", + "##Velocity(in m/sec)\n", + "V=Q/(math.pi/4.*D**2.)/1000.\n", + "##Reynolds number:\n", + "Re=d*V*D/u/1000.\n", + "print(\"RESULTS\")\n", + "print'%s %.4f %s'%(\"Viscosity of fluid \",u,\" N-s/m^2\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Viscosity of fluid 0.0017 N-s/m^2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Volme flow rate of water(in m**3/sec):\n", + "Q=0.0084;\n", + "##Length of horizontal pipe(in m):\n", + "L=100.;\n", + "##Diameter of pipe(in m):\n", + "D=0.075;\n", + "##Density of water(in kg/m**3):\n", + "d=999.;\n", + "##Friction factor:\n", + "f=0.017;\n", + "##Minor lossses coefficient:\n", + "K=0.5;\n", + "##Viscosity(in kg/m-s):\n", + "u=10**-3.;\n", + "##Acceleration due to gravity(in /sec**2):\n", + "g=9.8;\n", + "##required##\n", + "\n", + "##Reservoir depth required to maintain flow(in m):\n", + "D1=8.*Q**2./(math.pi)**2./D**4./g*(f*L/D+K+1.)\n", + "##Reynolds number:\n", + "Re=4.*d*Q/((math.pi)*u*D)\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Reservoir depth required to maintain flow: \",D1+1.6,\" m\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Reservoir depth required to maintain flow: 6.06 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Flow rate of crude oil(in bbl):\n", + "Q=1.6*10**6.;\n", + "##Inside diamete of pipe(i inches):\n", + "D=48.;\n", + "##Maximum allowable pressure(in psi):\n", + "p2=1200.;\n", + "##Minimum pressure required to keep gases dissolves(in psi):\n", + "p1=50.;\n", + "##Specific gravity of crde oil:\n", + "SG=0.93;\n", + "##Viscosity at 140 F(in lbf-s/ft**2):\n", + "u=3.5*10**-4.;\n", + "##Efficincy of pump:\n", + "Effp=0.85;\n", + "##Density(in slug/ft**3):\n", + "d=1.94;\n", + "##Viscosity (in lbf-sec):\n", + "u=3.5*10**-4.;\n", + "##Friction factor:\n", + "f=0.017;\n", + "##Maximum and power##\n", + "\n", + "##Velocity of flow(in ft/sec):\n", + "V=Q/24./3600./(math.pi/4.*(D/12.)**2.)*42./7.48\n", + "##Maximum spacing(in ft):\n", + "L=2./f*D/12.*(p2-p1)/(SG*d)/V**2.*144.\n", + "##Power needed at each pump(in hp):\n", + "Win=1./Effp*V*math.pi/4.*(D/12.)**2.*(p2-p1)/550.*144.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Maximum spacing: \",L,\" feet\")\n", + "print'%s %.2f %s'%(\"Power needed at each pump: \",Win,\" hp\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Maximum spacing: 630853.59 feet\n", + "Power needed at each pump: 36832.62 hp\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Height of standpipe(in ft):\n", + "l=80.;\n", + "##Length of longest pipe(in ft):\n", + "L=600.;\n", + "##Diameter of pipe(in inches):\n", + "D=4.;\n", + "##Friction factor:\n", + "f=0.031;\n", + "##Acceleration due to gravityin ft/sec**2):\n", + "g=32.2;\n", + "##Volume low##\n", + "\n", + "##Velocity(in ft/sec):\n", + "V2=math.sqrt(2.*g*l/(f*((L+l)/D*12.+8.)+1.))\n", + "##Volume flow rate(in gpm):\n", + "Q=V2*math.pi*(D/12.)**2./4.*7.48*60.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Volume low rate: \",Q,\"\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume low rate: 350.07 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Length of copper wire(in ft):\n", + "L=10.;\n", + "##Inner diameer of pipe(in inches):\n", + "D=1.5;\n", + "##Dischare(in ft**3/sec):\n", + "Q=0.566;\n", + "##Level of reservoir above pipe centreline(inn feet):\n", + "h=85.1;\n", + "##Kinematic viscosity at 70 F(in ft**2/s):\n", + "v=1.05*10**-5.;\n", + "##Acceleration due to gravity(in ft/sec**2):\n", + "g=32.2;\n", + "##Loss Coefficient##\n", + "##Average velocity (in ft/s):\n", + "V2=4./math.pi*Q/D**2.*144.\n", + "##Reynolds number:\n", + "Re=V2*D/v/12.\n", + "##For this value,\n", + "f=0.013;\n", + "##Power law exponent:\n", + "n=-1.7+1.8*math.log10(Re)\n", + "##Value of V/U:\n", + "v_u=2.*n**2./(n+1.)/(2.*n+1.)\n", + "##Value of alpha:\n", + "alpha=(1./v_u)**3.*2.*n**2./(3.+n)/(3.+2.*n)\n", + "##Loss Coefficient for a square edged entrance:\n", + "K=2.*g*h/V2**2.-f*L/D*12.-alpha;\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Loss Coefficient for a square edged entrance: \",K,\" \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Loss Coefficient for a square edged entrance: 0.50 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9-pg359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Length of copper wire(in ft):\n", + "L=10.;\n", + "##Inner diameer of pipe(in inches):\n", + "D=1.5;\n", + "##Dischare(in ft**3/sec):\n", + "Q=0.566;\n", + "##Level of reservoir above pipe centreline(inn feet):\n", + "h=85.1;\n", + "##Kinematic viscosity at 70 F(in ft**2/s):\n", + "v=1.05*10**-5;\n", + "##Acceleration due to gravity(in ft/sec**2):\n", + "g=32.2;\n", + "##Loss Coefficient##\n", + "#Average velocity (in ft/s):\n", + "V2=4./math.pi*Q/D**2*144.\n", + "##Reynolds number:\n", + "Re=V2*D/v/12.\n", + "##For this value,\n", + "f=0.013;\n", + "##Power law exponent:\n", + "n=-1.7+1.8*math.log10(Re)\n", + "##Value of V/U:\n", + "v_u=2.*n**2./(n+1.)/(2.*n+1)\n", + "##Value of alpha:\n", + "alpha=(1./v_u)**3.*2.*n**2./(3.+n)/(3.+2.*n)\n", + "##Loss Coefficient for a square edged entrance:\n", + "K=2.*g*h/V2**2.-f*L/D*12.-alpha;\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Loss Coefficient for a square edged entrance: \",K,\" \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Loss Coefficient for a square edged entrance: 0.50 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10-pg362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Nozzle exit diameter(in mm):\n", + "D=25.;\n", + "##N/R1 value value:\n", + "N_R=3.;\n", + "##AR value:\n", + "A_R=2.;\n", + "##Static head available from the main(in m):\n", + "z0=1.5;\n", + "##Acceleration due to gravity(in m/sec**2):\n", + "g=9.8;\n", + "##Value of Cp:\n", + "Cp=0.45;\n", + "##Volume and increase##\n", + "\n", + "##Velocity V1(in m/s):\n", + "V1=math.sqrt(2.*g*z0/1.04)\n", + "##Volume flow rate(in m**3/sec):\n", + "Q=V1*math.pi*D**2./4.\n", + "Kdiff=1.-1./A_R**2.-Cp\n", + "##For 2nd case:\n", + "##Velocity(in m/s):\n", + "V1=math.sqrt(2.*g*z0/0.59)\n", + "##Volume flow rate(in m**3/s):\n", + "Qd=V1*math.pi*D**2./4.\n", + "##Increase in discharge after addition of diffuser is:\n", + "dQ=(Qd-Q)/Q*100.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Volume flow rate in case1: \",Q,\" m**3/sec\")\n", + "print'%s %.2f %s'%(\"Volume flow rate in case 2: \",Qd,\" m**3/sec\")\n", + "print'%s %.2f %s'%(\"Increase in discharge after addition of diffuser is: \",dQ,\" percent\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Volume flow rate in case1: 2609.92 m**3/sec\n", + "Volume flow rate in case 2: 3465.11 m**3/sec\n", + "Increase in discharge after addition of diffuser is: 32.77 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11-pg366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Volume flw rate of ai(in m**3/sec):\n", + "Q=1.;\n", + "##Diameter of pipe(in m):\n", + "D=0.25;\n", + "##Density of air (in kg/m**3):\n", + "d1=1.23;\n", + "##Acceleration due to gravity(in m/s**2):\n", + "g=9.8;\n", + "##Density of water(in kg/m**3):\n", + "d2=999.;\n", + "##Maxmum range of manometer(in m):\n", + "h=0.3;\n", + "##Kinematic viscosity(in m**2/s):\n", + "v=1.46*10**-5;\n", + "\n", + "##Diameter and head##\n", + "\n", + "##Value of K*B**2:\n", + "K_B=Q/(math.pi/4.*D**2.)*math.sqrt(0.5*d1/g/d2/h)\n", + "##Reynods number:\n", + "ReD1=4./math.pi*Q/D/v\n", + "##By trial and error method, the value of beta is fixed at:\n", + "betta=0.66;\n", + "##K is then:\n", + "K=K_B/betta**2\n", + "##Diameter of orifice plate(in m):\n", + "Dt=betta*D\n", + "##Value of p3-p2(in N/m**2):\n", + "P1=d1*Q**2./(math.pi/4.*D**2.)**2.*(1./0.65/betta**2.-1.)\n", + "##Value of p1-p2(in N/m**2):\n", + "P2=d2*g*h\n", + "##Head loss between sections 1 and 3(in N-m/kg):\n", + "hLT=(P2-P1)/d1\n", + "##Expressing the permanent pressure as a fractio of the meter differential:\n", + "C=(P2-P1)/P2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Diameter of the orifice: \",Dt,\" m\")\n", + "print'%s %.2f %s'%(\"Head loss between secions 1 and 3: \",hLT,\" N-m/kg\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Diameter of the orifice: 0.17 m\n", + "Head loss between secions 1 and 3: 1337.12 N-m/kg\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..0c64319b --- /dev/null +++ b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/Chapter9.ipynb @@ -0,0 +1,463 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2b78f76d8849b42efab192bd8eedf9fd54359222afef62761169f1dc5116a9bc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter9- External Incompressible Viscous Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1-pg414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Lengh of side of the test section(in mm):\n", + "L=305.;\n", + "##Freesteam speed at section 1(in m/sec):\n", + "U1=26.;\n", + "##Displacement thickness at section 1(in mm):\n", + "d1=1.5;\n", + "##Displacment thickness at section 2(in mm):\n", + "d2=2.1;\n", + "##static pressure##\n", + "#Change in static pressure between sections 1 and 2:\n", + "C=(((L-2.*d1)/(L-2.*d2))**4.-1)*100.;\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Change in static pressure between the sections 1 and 2: \",C,\" percent \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Change in static pressure between the sections 1 and 2: 1.61 percent \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4-pg428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import scipy\n", + "from scipy import integrate\n", + "##Veocity of flow(in m/sec):\n", + "U=1.;\n", + "##Length of flat plate(in m):\n", + "L=1.;\n", + "##Density of water(in kg/m**3):\n", + "d=999.;\n", + "##Kinematic viscosity of water(in m**2/sec):\n", + "v=10**-6.;\n", + "##Displacement thickness and stress##\n", + "#Reynolds number:\n", + "ReL=U*L/v\n", + "##FOR TURBULENT FLOW\n", + "##Disturbance thickness(in m):\n", + "dL1=0.382/ReL**0.2*L\n", + "##Displacement thickness(in m):\n", + "def fun(n):\n", + " y=dL1*(1.-n**(1./7.))\n", + " return y\n", + "dl1=scipy.integrate.quad(fun,0,1)\n", + "\n", + "##Skin friction coefficient:\n", + "Cf1=0.0594/ReL**0.2\n", + "##Wall shear stress(in N/m**2):\n", + "tw1=Cf1*0.5*d*U**2\n", + "##For LAMINAR FLOW:\n", + "##Disturbance thickness(in m)\n", + "dL2=5./math.sqrt(ReL)*L\n", + "##Displacement thickness(in m):\n", + "dl2=0.344*dL2\n", + "##Skin friction coefficient:\n", + "Cf2=0.664/math.sqrt(ReL)\n", + "##Wall shear stress(in N/m**2):\n", + "tw2=Cf2*0.5*d*U**2\n", + "##COMPARISON OF VALUES WITH LAMINAR FLOW\n", + "##Disturbance thickness\n", + "D=dL1/dL2\n", + "##Displacement thickness\n", + "DS=dl1[0]/dl2\n", + "##Wall shear stress\n", + "WSS=tw1/tw2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Disturbace thickness: \",dL1,\" m\")\n", + "print'%s %.2f %s'%(\"Displacement thickness: \",dl1[0],\" m\")\n", + "print'%s %.2f %s'%(\"Wall shear stress: \",tw1,\" N/m^2\")\n", + "print(\"COMPARISON WIH LAMINAR FLOW\\n\")\n", + "print'%s %.2f %s'%(\" Disturbance thicknes: \",D,\" \")\n", + "print'%s %.2f %s'%(\"Displacement thickness: \",DS,\"\")\n", + "print'%s %.2f %s'%(\"Wall shear stress: \",WSS,\" \")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Disturbace thickness: 0.02 m\n", + "Displacement thickness: 0.00 m\n", + "Wall shear stress: 1.87 N/m^2\n", + "COMPARISON WIH LAMINAR FLOW\n", + "\n", + " Disturbance thicknes: 4.82 \n", + "Displacement thickness: 1.75 \n", + "Wall shear stress: 5.64 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5-pg436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Length of the supertanker(in m):\n", + "L=360.;\n", + "##Width of supertanker(in m):\n", + "W=70.;\n", + "##Draft of the supertanker(in m):\n", + "D=50.;\n", + "##Cruising speed in water(in knots):\n", + "s=13.;\n", + "##Kinematic viscosity at 10 C\n", + "v=1.37*10**-6;\n", + "##Density of sea water(in kg/m^3):\n", + "d=1020.;\n", + "##force and power##\n", + "##Speed in m/s:\n", + "U=s*6076.*0.305/3600.\n", + "##Reynolds number:\n", + "Re=U*L/v\n", + "##Drag coefficient:\n", + "Cd=0.455/math.log10(Re)**2.58-1610./Re\n", + "##Area(in m^2):\n", + "A=L*(W+D)\n", + "##Drag force(in N)\n", + "Fd=Cd*A*0.5*d*U**2\n", + "##Power required to overcome skin friction drag(in W):\n", + "P=Fd*U\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Drag force:\",Fd,\" N\")\n", + "print'%s %.2f %s'%(\"Power required to overcome skin friction drag: \",P,\" W\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Drag force: 1444953.76 N\n", + "Power required to overcome skin friction drag: 9669686.75 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6-pg442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Diameter of chimney(in m):\n", + "D=1.;\n", + "##Height of chimney(in m):\n", + "L=25.;\n", + "##Speed of wind(in kmph):\n", + "s=50.;\n", + "##Density of air(in kg/m^3):\n", + "d=1.23;\n", + "##Viscosity of air(in kg/(m-s)):\n", + "u=1.79*10**-5;\n", + "##Pressure(in kPa):\n", + "p=101.;\n", + "\n", + "##Bending moment##\n", + "##filename=pathname+filesep()+'9.06-data.sci'\n", + "#exec(filename)\n", + "##Velocity in m/sec:\n", + "V=s*5./18.\n", + "##Reynolds number:\n", + "Re=d*V*D/u\n", + "##Value of Cd is obtained as:\n", + "Cd=0.35;\n", + "##Area(in m^2):\n", + "A=L**2;\n", + "##Moment about the chimney base(in N-m):\n", + "M0=Cd*A*D/4.*d*V**2\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Bending moment at the bottom of the chimney: \",M0,\" N-m\")\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Bending moment at the bottom of the chimney: 12975.62 N-m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7-pg443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "##Weight of the dragster(in lbf):\n", + "w=1600.;\n", + "##Speed of dragster(in mph):\n", + "s1=270.;\n", + "##Area of drag chute(in ft^2):\n", + "A=25.;\n", + "##Speed of dragster after deceleraton(in mph):\n", + "s2=100.;\n", + "##Acceleration due to gravity(in ft/sec^2):\n", + "g=32.2;\n", + "##Density of air(in slug/ft^3):\n", + "d=0.00238;\n", + "##Value of coefficient of drag:\n", + "Cd=1.42;\n", + "##Time required##\n", + "#pathname=get_absolute_file_path('9.07.sce')\n", + "#filename=pathname+filesep()+'9.07-data.sci'\n", + "#exec(filename)\n", + "##Time required to decelerate to 100 mph(in seconds):\n", + "t=(s1-s2)*2.*w/(s1*s2)/Cd/d/A/g*3600./5280.\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Time required to decelerate to 100 mph: \",t,\" seconds\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Time required to decelerate to 100 mph: 5.05 seconds\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8-pg458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "%matplotlib inline\n", + "\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "import math\n", + "import matplotlib\n", + "from matplotlib import pyplot\n", + "##Wing area(in ft^2):\n", + "A=1600.;\n", + "##Aspect ratio:\n", + "ar=6.5;\n", + "##Groos weight of aircraft(in lbf):\n", + "W=150000.;\n", + "##Coefficient of drag at zero lift :\n", + "Cd0=0.0182;\n", + "##Sonic speed at sea level(in mph):\n", + "c=759.;\n", + "##Density of air(in slug/ft^3):\n", + "p=0.00238;\n", + "##Srall speed at sea level(in mph):\n", + "Vssl=175.;\n", + "\n", + "##Optimum cruise speed##\n", + "#pathname=get_absolute_file_path('9.08.sce')\n", + "#filename=pathname+filesep()+'9.08-data.sci'\n", + "#exec(filename)\n", + "##Plotting velocity with drag force\n", + "V=numpy.linspace(175,455,num=12);\n", + "\n", + "n=len(V);\n", + "CL=numpy.zeros(n)\n", + "Cd=numpy.zeros(n)\n", + "Fd=numpy.zeros(n)\n", + "FD=numpy.zeros(n)\n", + "for i in range(1,n):\n", + " CL[i]=2*W/p*(3600/V[i]/5280.)**2/A;\n", + " Cd[i]=Cd0+CL[i]**2/math.pi/ar;\n", + " Fd[i]=Cd[i]/CL[i]*W;\n", + " FD[i]=Fd[i]/1000;\n", + "pyplot.plot(V,FD)\n", + "pyplot.title('Flight speed vs thrust')\n", + "##Optimum cuise speed at speed level is obtained to be 320 mph from the graph.\n", + "Vosl=320.;\n", + "##Ratio of speeds at 30000 ft and at sea level is given by:\n", + "r=math.sqrt(1./0.375);\n", + "##Stall speed at 30000ft is(in mph):\n", + "Vs3=Vssl*r;\n", + "##Optimum Cruise speed at 30000ft(in mph):\n", + "Vo3=Vosl*r;\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Optimum cruise speed at sea level: \",Vosl,\" mph\")\n", + "print'%s %.2f %s'%(\"Stall speed at 30000 ft: \",Vs3,\" mph\")\n", + "print'%s %.2f %s'%(\"Optimum cruise speed at 30000 ft: \",Vo3,\"\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Optimum cruise speed at sea level: 320.00 mph\n", + "Stall speed at 30000 ft: 285.77 mph\n", + "Optimum cruise speed at 30000 ft: 522.56 \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEKCAYAAAACS67iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8VHW9//HXRxBRSUARFEVA0zRCkdBUNCYIwzQxzSKz\ni5JlVy01lU62PZ40PT9T035pJzBvoHYBw8hbORzUREFuAl4BEZGLsLdIgtw+54/v2jBs9o25rVlr\n3s/HYx7OrFmz1md/H/ie73zXd61l7o6IiCTfLnEXICIixaFAFxFJCQW6iEhKKNBFRFJCgS4ikhIK\ndBGRlFCgy1Zm1svMtpjZLtHrSWb21VZ+NmtmI0tbYWmZWY2Z3VPmfW7X5iKF0D+iKmRmi8zsfTN7\nL3qsMbP9Gq7n7p9199YGnEePxvaXlNAq+UkZUdsPLvV+mth32b+wpLwq/X8wKQ0HTnP3D0WPvdx9\nWRn2a2XYR6V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lkgi2r5B/Zmc+u9JQttHoTwzerwIXFnM9teJRSIiKZHY\nW9CJiMg4FifuAAAALUlEQVT2FOgiIimhQBcRSQkFuohISijQRURSQoEuIpISCnQRkZRQoIuIpMT/\nAeYwifpbbCWkAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9-pg462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "##Mass of the tennis ball(in grams):\n", + "m=57.;\n", + "##Diameter ofthe ball (in mm):\n", + "D=64.;\n", + "##Velocity with which te ball is hit(in m/s):\\\n", + "V=25.;\n", + "##Topspin given on the ball(in rpm):\n", + "N=7500.;\n", + "##Acceleration due to gravity(in m/s^2):\n", + "g=9.81;\n", + "##Kinematic viscosity(in m^2/s):\n", + "v=1.46*10**-5\n", + "##Desity of air(in kg/m^3):\n", + "d=1.23;\n", + "\n", + "##Reynolds number:\n", + "##Value of wD/2V:\n", + "W=0.5*N*D/1000./V*2*math.pi/60.\n", + "Red=V*D/v;\n", + "##For this value, CL is obtained as:\n", + "CL=0.3;\n", + "##Aerodynamic lift(in N):\n", + "FL=math.pi/8.*CL*(D/1000.)**2.*d*V**2;\n", + "##Radius of curvature of the path in the vertical plane(in m) with topspin:\n", + "Rts=V**2./(g+FL/(m/1000.));\n", + "##Radius of curvature without topspin(in m):\n", + "Rwts=V**2./g;\n", + "print(\"RESULTS\")\n", + "print'%s %.2f %s'%(\"Aerodynamic lift acting on the ball:\",FL,\" N\")\n", + "print'%s %.2f %s'%(\"Radius of curvature of the path when ball has topspin:\",Rts,\" m\")\n", + "print'%s %.2f %s'%(\"Radius of curvature of the path when ball has topspin: \",Rwts,\" m\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "RESULTS\n", + "Aerodynamic lift acting on the ball: 0.37 N\n", + "Radius of curvature of the path when ball has topspin: 38.30 m\n", + "Radius of curvature of the path when ball has topspin: 63.71 m\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4b357c81 Binary files /dev/null and b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter10.png differ 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 new file mode 100644 index 00000000..5f67689f Binary files /dev/null and b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter3.png differ 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 new file mode 100644 index 00000000..29986cea Binary files /dev/null and b/Introduction_To_Fluid_Mechanics_by_R._W._Fox_And_A._T._McDonald/screenshots/chapter4.png differ diff --git a/Introduction_To_Nuclear_And_Particle_Physics/screenshots/exogeric_reaction.png b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/exogeric_reaction.png new file mode 100755 index 00000000..83edce80 Binary files /dev/null and b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/exogeric_reaction.png differ diff --git a/Introduction_To_Nuclear_And_Particle_Physics/screenshots/particles_for_reactions.png b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/particles_for_reactions.png new file mode 100755 index 00000000..70a517e0 Binary files /dev/null and b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/particles_for_reactions.png differ diff --git a/Introduction_To_Nuclear_And_Particle_Physics/screenshots/vel_of_photoelectron.png b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/vel_of_photoelectron.png new file mode 100755 index 00000000..6bf7a2f9 Binary files /dev/null and b/Introduction_To_Nuclear_And_Particle_Physics/screenshots/vel_of_photoelectron.png differ 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 new file mode 100644 index 00000000..92535d29 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/README.txt @@ -0,0 +1,10 @@ +Contributed By: Sandesh Naik +Course: be +College/Institute/Organization: Bharati Vidyapeeth College of Engineering +Department/Designation: Mechanical +Book Title: Introduction To Nuclear And Particle Physics +Author: V. K. Mittal, R. C. Verma And S. C. Gupta +Publisher: PHI +Year of publication: 2011 +Isbn: 978-81-203-4311-5 +Edition: 2nd \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch1.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch1.ipynb new file mode 100755 index 00000000..847332ee --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch1.ipynb @@ -0,0 +1,866 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:43e40533bff9f31c3775eeac8a38c708406dc4765f3bc2853584ba2600307abe" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: The Nucleus" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1, Page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.626e-034; # Planck's constant, Js\n", + "e = 1.602e-019; # Charge on an electron, C\n", + "red_h = h/(2*math.pi*e*1e+06); # Reduced Planck's constant, MeV\n", + "lamda = 5.0e-015; # de_Broglie wavelength of neutron, m\n", + "\n", + "#Calculations\n", + "p = red_h/lamda; # Momentum of the neutron, MeV-s/m\n", + "\n", + "#Result\n", + "print \"The momentum of the neutron from de-Broglie relation : %5.3e MeV-s/m\"%p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The momentum of the neutron from de-Broglie relation : 1.317e-07 MeV-s/m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2, Page 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E = [[0,0,0],[0,0,0],[0,0,0]]; # Declare a cell array of empty matrices for nuclides information\n", + "E[0][0] = 'C'; # Assign element 'C' to (1,1) cell\n", + "E[1][0] = 'N'; # Assign element 'N' to (2,1) cell\n", + "E[2][0] = 'O'; # Assign element 'o' to (3,1) cell\n", + "E[0][1] = 6; # Assign atomic No. 6 to (1,2) cell\n", + "E[1][1] = 7; # Assign atomic No. 7 to (2,2) cell\n", + "E[2][1] = 8; # Assign atomic No. 8 to (3,2) cell\n", + "E[0][2] = [12,13,14,16]; # Assign mass numbers for 'C' to (1,3) cell\n", + "E[1][2] = [14,15,16,17]; # Assign mass numbers for 'N' to (2,3) cell\n", + "E[2][2] = [14,15,16,17]; # Assign mass numbers for 'O' to (3,3) cell\n", + "\n", + "#Calculations&Results\n", + "# Isotopes\n", + "print \"\\nIsotopes:\"\n", + "print \"\\n=========\"\n", + "for i in range(0,3): # Search for the three elements one-by-one\n", + " print \"\\n(Z = %d)\"%(E[i][1])\n", + " for j in range(0,4):\n", + " print \"\\t%s(%d)\"%(E[i][0],E[i][2][j]),\n", + " \n", + "# Isotones\n", + "print \"\\n\\nIsotones:\";\n", + "print \"\\n========\"\n", + "for N in range(6,10): # Search for the neutron numbers from 6 to 9\n", + " print \"\\n(N = %d)\\n\"%N;\n", + " for i in range(0,3):\n", + " for j in range(0,4):\n", + " if E[i][2][j]- E[i][1] == N: # N = A-Z\n", + " print \"\\t%s(%d)\"%(E[i][0],E[i][2][j]),\n", + " \n", + "# Isobars\n", + "print \"\\n\\nIsobars:\"\n", + "print \"\\n=======\"\n", + "for A in range(14,18): # Search for the mass numbers from 14 to 17\n", + " print \"\\n(A = %d)\\n\"%A \n", + " for i in range(1,3):\n", + " for j in range(0,3):\n", + " if E[i][2][j] == A:\n", + " print \"\\t%s(%d)\"%(E[i-1][0],E[i][2][j]),\n", + " \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Isotopes:\n", + "\n", + "=========\n", + "\n", + "(Z = 6)\n", + "\tC(12) \tC(13) \tC(14) \tC(16) \n", + "(Z = 7)\n", + "\tN(14) \tN(15) \tN(16) \tN(17) \n", + "(Z = 8)\n", + "\tO(14) \tO(15) \tO(16) \tO(17) \n", + "\n", + "Isotones:\n", + "\n", + "========\n", + "\n", + "(N = 6)\n", + "\n", + "\tC(12) \tO(14) \n", + "(N = 7)\n", + "\n", + "\tC(13) \tN(14) \tO(15) \n", + "(N = 8)\n", + "\n", + "\tC(14) \tN(15) \tO(16) \n", + "(N = 9)\n", + "\n", + "\tN(16) \tO(17) \n", + "\n", + "Isobars:\n", + "\n", + "=======\n", + "\n", + "(A = 14)\n", + "\n", + "\tC(14) \tN(14) \n", + "(A = 15)\n", + "\n", + "\tC(15) \tN(15) \n", + "(A = 16)\n", + "\n", + "\tC(16) \tN(16) \n", + "(A = 17)\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.1, Page 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "m = 9.1e-031; # Mass of the electron, Kg\n", + "C = 3e+08; # Velocity of the light,m/s\n", + "\n", + "#Calculations\n", + "E = m*C**2/1.6e-013; # Energy of the electron at rest, MeV\n", + "\n", + "#Result\n", + "print \"Energy of the electron at rest : %5.3f MeV\"%E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the electron at rest : 0.512 MeV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.2, Page 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "r = 3.46e-015; # Radius of the nucleus, m\n", + "r0 = 1.2e-015; # Distance of closest approach of the nucleus, m\n", + "\n", + "#Calculations\n", + "A = round((r/r0)**3); # Mass number of the nucleus\n", + "if A == 23:\n", + " element = \"Na\";\n", + "elif A == 24:\n", + " element = \"Mg\";\n", + "elif A == 27:\n", + " element = \"Al\";\n", + "elif A == 28:\n", + " element = \"Si\";\n", + "\n", + "#Result\n", + "print \"The mass number of the nucleus is %d and the nucleus is of %s\"%(A, element)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass number of the nucleus is 24 and the nucleus is of Mg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.3, Page 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "m = 40*(1.66e-027); # Mass of the nucleus, kg \n", + "r0 = 1.2e-015; # Distance of the closest approach, m\n", + "A = 40; # Atomic mass of the nucleus\n", + "\n", + "#Calculations\n", + "r = r0*A**(1./3); #Radius of the nucleus, m\n", + "V = 4./3*(math.pi*r**3); # Volume of the nucleus, m^3\n", + "density = m/V; # Density of the nucleus, kg/m^3\n", + "\n", + "#Result\n", + "print \"Radius of the nucleus: %3.1e m\\nVolume of the nucleus: %5.3e m^3\\nDensity of the nucleus: %3.1e kg/m^3\"%(r,V,density)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the nucleus: 4.1e-15 m\n", + "Volume of the nucleus: 2.895e-43 m^3\n", + "Density of the nucleus: 2.3e+17 kg/m^3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.4, Page 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1.66e-027; # Mass of a nucleon, kg\n", + "A = 235; # Atomic mass of U-235 nucleus\n", + "M = A*m; #Mass of the U-235 nucleus, kg\n", + "r0 = 1.2e-015; # Distance of closest approach, m\n", + "\n", + "#Calculations\n", + "r = r0*(A)**(1./3); # Radius of the U-235 nucleus\n", + "V = 4./3*(math.pi*r**3); # Volume of the U-235 nucleus,m^3\n", + "d = M/V; # Density of the U-235 nucleus,kg/m^3\n", + "\n", + "#Result\n", + "print \"The density of U-235 nucleus : %4.2e kg per metre cube\"%d\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of U-235 nucleus : 2.29e+17 kg per metre cube\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.5, Page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "m_O = 2.7e-026; # Mass of O nucleus, kg\n", + "r_O = 3e-015; # Radius of O nucleus, m\n", + "V_O = 4/3*(math.pi*(r_O)**3); # Volume of O nucleus, metre cube\n", + "d_O = m_O/V_O; # Density of O nucleus, kg/metre cube\n", + "m_Pb = 3.4e-025; # Mass of Pb nucleus, kg\n", + "r_Pb = 7.0e-015; # Radius of Pb nucleus, m\n", + "\n", + "#Calculations\n", + "V_Pb = 4./3*(math.pi*(r_Pb)**3); # Volume of Pb nucleus, metre cube\n", + "d_Pb = m_Pb/V_Pb; #Density of Pb nucleus,kg/metre cube\n", + "\n", + "#Results\n", + "print \"The density of oxygen nucleus : %4.2e in kg/metre cube\"%d_O\n", + "print \"The density of Pb nucleus : %4.2e in kg/metre cube\"%d_Pb\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The density of oxygen nucleus : 3.18e+17 in kg/metre cube\n", + "The density of Pb nucleus : 2.37e+17 in kg/metre cube\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.6, Page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "E = 5.48*1.6e-013; # Energy of alpha particle, J\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "Z = 79; # Mas number of Au nucleus, \n", + "epsilon_0 = 8.85e-012; # Permittivity of free space, \n", + "\n", + "#Calculations\n", + "D = (2*Z*e**2)/(4*math.pi*epsilon_0*E); # Distance of closest approach, m\n", + "\n", + "#Result\n", + "print \"The distance of closest appproach of alpha particle : %4.2e m\"%D\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance of closest appproach of alpha particle : 4.15e-14 m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.7, Page 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A = 208; # Mass number of Pb-208\n", + "r0 = 1.2e-015; # Distance of closest approach, m\n", + "\n", + "#Calculations\n", + "r = r0*((A)**(1./3)); # Radius of Pb-208, m\n", + "\n", + "#Result\n", + "print \"The radius of Pb-208 : %4.2e m\"%r\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of Pb-208 : 7.11e-15 m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.1, Page 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "amu = 931.49; # Atomic mass unit, MeV\n", + "M_p = 1.00758; # Mass of proton, amu\n", + "M_n = 1.00897; # Mass of neutron, amu\n", + "M_He = 4.0028; # Mass of He nucleus, amu\n", + "Z = 2; # Atomic number\n", + "N = 2; # Number of neutron\n", + "\n", + "#Calculations\n", + "M_defect = Z*M_p+N*M_n-M_He; # Mass defect, amu\n", + "BE_MeV = M_defect*amu; # Binding energy, MeV\n", + "BE_J = M_defect*1.49239e-010; # Binding energy, J\n", + "\n", + "#Results\n", + "print \"The binding energy (in MeV): %5.2f\"%BE_MeV\n", + "print \"The binding energy (in J): %4.2e\"%BE_J\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy (in MeV): 28.22\n", + "The binding energy (in J): 4.52e-12\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.2, Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "amu = 1.49239e-010; # Atomic mass unit, J\n", + "M_C = 12; # Mass of C-12, amu\n", + "M_a = 4.0026; # Mass of alpha particle, amu\n", + "\n", + "#Calculations\n", + "M_3a = 3*M_a; # Mass of 3 alpha particle, amu\n", + "D = M_C-M_3a; # Difference in two masses, amu\n", + "E = D*amu; # Required energy,J\n", + "\n", + "#Result\n", + "print \"The energy required to break 3 alpha particles : %4.2e J\"%E\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to break 3 alpha particles : -1.16e-12 J\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.3, Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_p = 1.007895; # Mass of proton, amu\n", + "M_n = 1.008665; # Mass of neutron, amu\n", + "M_He = 4.0026; # Mass of He-nucleus, amu\n", + "Z = 2; # Number of proton\n", + "N = 2; # Number of neutron\n", + "\n", + "#Calculations\n", + "D_m = ((Z*M_p)+(N*M_n)-M_He); # Mass defect, amu\n", + "amu = 931.49; # Atomic mass unit, MeV\n", + "E = D_m*amu; # Required energy, MeV\n", + "\n", + "#Result\n", + "print \"The energy required to knock out nucleons from the He nucleus = %5.2f MeV\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy required to knock out nucleons from the He nucleus = 28.43 MeV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.4, Page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_Fe = 55.934939; # Mass of Fe-56, amu\n", + "M_p = 1.007825; # Mass of proton, amu\n", + "M_n = 1.008665; # Mass of neutron, amu\n", + "Z = 26; # Atomic number of Fe-56\n", + "N = 30; # Number of neutron in Fe-56\n", + "amu = 931.49; # Atomic mass unit, MeV\n", + "\n", + "#Calculations\n", + "BE = ((Z*M_p)+(N*M_n)-M_Fe)*amu; # Binding energy of Fe-56, MeV\n", + "\n", + "#Result\n", + "print \"The binding energy of Fe-56 : %6.4f MeV\"%BE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy of Fe-56 : 492.2561 MeV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.5, Page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "amu = 931.49; # Atomic mass unit, MeV\n", + "M_p = 1.007825; # Mass of proton, amu\n", + "M_n = 1.008663; # Mass of neutron, amu\n", + "A = 2; # Mass number of deutron, amu\n", + "M_D = 2.014103; # Mass of deuteron nucleus, amu\n", + "\n", + "#Calculations\n", + "M_Defect = (M_p+M_n-M_D)*amu; # Mass defect of the nucleus, MeV\n", + "P_fraction = (M_D - A)/A; # Packing fraction of nucleus\n", + "\n", + "#Results\n", + "print \"Mass defect %4.2f MeV\\n Packing fraction %7.5f\"%(M_Defect,P_fraction);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass defect 2.22 MeV\n", + " Packing fraction 0.00705\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5.6, Page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "m_He = 4.002634; # Mass of He-4 nucleus, amu\n", + "amu = 931.47; # Atomic mass unit, MeV\n", + "A = 4 # Mass number of He-4 nucleus\n", + "\n", + "#Calculations\n", + "BE = (2*m_p+2*m_n-m_He)*amu; # Binding energy of He-4 nucleus, MeV\n", + "Av_BE = BE/A; # Average binding energy or binding energy per nucleon, MeV\n", + "\n", + "#Result\n", + "print \"The binding energy per nucleon : %4.2f MeV\"%Av_BE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy per nucleon : 7.07 MeV\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.1, Page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l1 = 1; # Orbital qunatum number for p-state nucleon\n", + "l2 = 2; # Orbital qunatum number for d-state nucleon\n", + "\n", + "#Calculations&Result\n", + "# Display the value of L within the for loop\n", + "print \"The possible L values will be\"\n", + "for i in range(abs(l1-l2),abs(l1+l2+1)): # Coupling of l-orbitals \n", + " print \"\\t %1d\"%i,\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The possible L values will be\n", + "\t 1 \t 2 \t 3\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6.2, Page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "#Variable declaration\n", + "# Get the l value from the user\n", + "l = 3; # Orbital qunatum number for f-state proton\n", + "s = 0.5; # Magnitude of spin quantum number\n", + "\n", + "#Calculations&Result\n", + "# Display the value of j within the for loop\n", + "\n", + "print \"The j values will be between\"\n", + "for i in numpy.arange((l-s),(l+s+1)): # l-s Coupling \n", + " print \"\\t %3.1f\"%i,\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The j values will be between\n", + "\t 2.5 \t 3.5\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11.1, Page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V = 1000; # Potential difference, volts\n", + "R = 0.122; # Radius of the circular path, m\n", + "B = 1500e-04; # Magnetic field, tesla\n", + "e = 1.602e-019; # Charge of the electron, C\n", + "amu = 1.673e-027; # Atomic mass unit, kg\n", + "\n", + "#Calculations\n", + "v = (2*V)/(R*B); # Speed of the ion, m/s\n", + "M = 2*e*V/v**2; # Mass of the ion, kg\n", + "A = M/amu; # Mass number\n", + "\n", + "#Result\n", + "print \" Speed > %5.3e m/s \\n Mass > %5.3e kg \\n Mass number > %5.2f \"%(v, M, A)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Speed > 1.093e+05 m/s \n", + " Mass > 2.682e-26 kg \n", + " Mass number > 16.03 \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11.2, Page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import numpy\n", + "\n", + "#Variable declaration\n", + "amu = 1.673e-027; # Atomic mass unit, kg\n", + "E = 5e+04; # Electric field, V/m\n", + "B1 = 0.4; # Magnetic field, tesla\n", + "v = E/B1; # Velocity of ions, m/s\n", + "B = 0.8; # Magnetic field, tesla\n", + "e = 1.602e-019; #charge of electron,C\n", + "\n", + "#Calculations\n", + "m_Ar = [36,38,40] # Masses of three isoptopes of Ar, amu\n", + "\n", + "r_Ar = [0,0,0]; # Array of radii of three Ar ions, mm\n", + "for i in range(len(r_Ar)):\n", + " r_Ar[i] = (m_Ar[i]*amu*v)/(B*e)*1e+03; # Radius of Ar ion orbit, mm\n", + "\n", + "d1 = 2*(r_Ar[1]-r_Ar[0]); # Distance b/w first and second line, mm\n", + "d2 = 2*(r_Ar[2]-r_Ar[1]); # Distance b/w second and third line, mm\n", + "\n", + "#Results\n", + "print \"The distance between successive lines due to three different isotopes : %3.1f mm and %3.1f mm\"%(d1,d2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between successive lines due to three different isotopes : 6.5 mm and 6.5 mm\n" + ] + } + ], + "prompt_number": 36 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch2.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch2.ipynb new file mode 100755 index 00000000..9f685b2b --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch2.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:93b6ee47cf464df569e4895dab3158be49c4f81380cffe2b4a954430fff24e01" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Nuclear Models" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.1, Page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# For Ca(20,40), actual binding energy is ...... \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 20; # Number of protons\n", + "N = 20; # Number of neutrons\n", + "M_n = 39.962591; # Mass of the nucleus, amu\n", + "B_actual = (M_n-Z*m_p-N*m_n)*931.49; # Actual binding energy, MeV\n", + "# For Ca(20,40), Binding energ as per semiemperical mas formula......\n", + "Z = 20; # Number of protons\n", + "a_v = 15.5; # Volume constant, MeV\n", + "a_s = 16.8; # Surface constant, MeV\n", + "a_a = 23.0; # Asymmetric constant, MeV\n", + "a_c = 0.7; # Coulomb constant, MeV\n", + "a_p = 34.0; # Paring constant, MeV\n", + "A = 40; # Mass number\n", + "\n", + "#Calculations\n", + "B_semi = (a_v*A-(a_s*A**(2./3))-(a_c*Z*(Z-1)/A**(1./3))-(a_a*(A-2*Z)**2/A)-(a_p*A**(-3./4))); # Binding energy as per semiemperical mass formula\n", + "# Percentage discrepancy between actual and semiemperical mass formula values are.......\n", + "Per_des = -(B_semi+B_actual)/B_actual*100; # Percentage discrepancy \n", + "\n", + "#Result\n", + "print \"Actual binding energy = %6.2f MeV\\nBinding energy as per semiemperical mass formula = %6.2f MeV\\nPercentage discrepancy = %.2f percent\"%(B_actual, B_semi, Per_des)\n", + "\n", + "#answers vary due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual binding energy = -342.05 MeV\n", + "Binding energy as per semiemperical mass formula = 343.59 MeV\n", + "Percentage discrepancy = 0.45 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.2, Page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration \n", + " # Calculation of coulomb energy for mirror nuclei : N-7 and O-8\n", + " # For N-7 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_N = 7; # Atpmic no. \n", + "A = 15; # Atomic mass\n", + "E_C_N = a_c*Z_N*(Z_N-1)/(A**(1./3)); # Coulomb energy for N-7, MeV\n", + "# For O-8 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_O = 8; # Atpmic no. \n", + "A = 15.; # Atomic mass\n", + "\n", + "#Calculations\n", + "E_C_O = a_c*Z_O*(Z_O-1)/(A**(1./3)); # Coulomb energy for O-8, MeV\n", + "C_E_d = E_C_O-E_C_N; # Coulomb energy difference, MeV\n", + "m_p = 1.007276*931.49; # Mass of proton, MeV\n", + "m_n = 1.008665*931.49; # Mass of neutron, MeV\n", + "M_d = m_n-m_p; # Mass difference of nucleons, MeV \n", + "D_C_M = round(C_E_d-M_d); # Difference in coulomb energy and nucleon mass difference, MeV\n", + "M_O = 15.003070*931.49; # Mass of O-8, MeV\n", + "M_N = 15.000108*931.49; # Mass of N-7, MeV\n", + "D_A = (M_O-M_N); # Actual mass difference, MeV\n", + "\n", + "#Result\n", + "print \"Difference in Coulomb energy = %5.3f MeV\\nNucleon mass difference = %6.4f MeV\\nDifference in Coulomb energy and nucleon mass difference = %5.3f MeV\\nActual mass difference = %.3f MeV\"%(C_E_d, M_d ,D_C_M, D_A)\n", + "if D_A == D_C_M:\n", + " print \"Result is verified\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in Coulomb energy = 3.974 MeV\n", + "Nucleon mass difference = 1.2938 MeV\n", + "Difference in Coulomb energy and nucleon mass difference = 3.000 MeV\n", + "Actual mass difference = 2.759 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.3, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration&Calculations\n", + "# For Kr-80, \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 36; # Number of protons\n", + "N_80 = 44; # Number of neutrons\n", + "M_n_80 = 79.91628; # Mass of Kr nucleus\n", + "BE_Kr_80 = (Z*m_p+N_80*m_n-M_n_80)*931.49; # Binding energy for Kr-80, MeV\n", + "# For Kr-81,\n", + "N_81 = 45; # Number of neutrons\n", + "M_n_81 = 80.91661; # Mass of Kr-81 nucleus\n", + "BE_Kr_81 = (Z*m_p+N_81*m_n-M_n_81)*931.49; # Binding energy for Kr-81 nucleus\n", + "# For Kr-82\n", + "N_82 = 46; # Number of neutrons\n", + "M_n_82 = 81.913482; # Mass of Kr nucleus\n", + "BE_Kr_82 = (Z*m_p+N_82*m_n-M_n_82)*931.49; # Binding energy for Kr-82,MeV\n", + "# For Kr-83 \n", + "N_83 = 47; # Number of protons\n", + "M_n_83 = 82.914134; # Mass of Kr-83 nucleus\n", + "BE_Kr_83 = (Z*m_p+N_83*m_n-M_n_83)*931.49; # Binding energy for Kr-83, MeV\n", + "E_sep_81 = BE_Kr_81-BE_Kr_80; # Energy seperation of neutron for Kr-81, MeV\n", + "E_sep_82 = BE_Kr_82-BE_Kr_81; # Energy seperation of neutron for Kr-82, MeV\n", + "E_sep_83 = BE_Kr_83-BE_Kr_82; # Energy seperation of neutron for Kr-83, MeV\n", + "\n", + "#Result\n", + "print \"Energy seperation of neutron for Kr-81 = %4.2f MeV\\nEnergy seperation of neutron for Kr-82 = %4.2f MeV\\nEnergy seperation of neutron for Kr-83 = %5.2f MeV\"%(E_sep_81, E_sep_82, E_sep_83)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy seperation of neutron for Kr-81 = 7.76 MeV\n", + "Energy seperation of neutron for Kr-82 = 10.99 MeV\n", + "Energy seperation of neutron for Kr-83 = 7.46 MeV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.4, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy coefficient, MeV\n", + "a_s = 16.8; # Surface energy coefficient MeV\n", + "a_c = 0.7; # Coulomb energy coefficient, MeV\n", + "a_a = 23.0; # Asymmetric energy coefficient, MeV\n", + "a_p = 34.0; # Pairing energy coefficient, MeV\n", + "A = 75; # Given atomic mass \n", + "\n", + "#Calculations\n", + "z = Symbol('z')\n", + "B =solve((((-a_c*(2*z-1))/A**1./3)+((4*a_a*(A-2*z))/A)),z) # Binding energy as per liquid drop model\n", + "\n", + "#Result\n", + "print \"Most stable isotope of A = 75 corresponds to Z = %.d\"%B[0]\n", + "\n", + "#answer varies due to usage of sympy module" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotope of A = 75 corresponds to Z = 37\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.5, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy, MeV \n", + "a_s = 16.8; # Surface energy, MeV \n", + "a_c = 0.7; # Coulomb energy, MeV\n", + "a_a = 23.0; # Asymmetric energy, MeV\n", + "a_p = 34.0; # Pairing energy, MeV\n", + "\n", + "z = Symbol('z')\n", + "A = 27\n", + "#Calculations\n", + "# For A = 27;\n", + "A = 27\n", + "Z_27 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 118 \n", + "A = 118\n", + "Z_118 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 238\n", + "A = 238\n", + "Z_238 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "#Result\n", + "print \"Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = %d, %d and %d respectively\"%(Z_27, Z_118, Z_238)\n", + "\n", + "#Incorrect answers in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = 13, 58 and 118 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.6, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Mirror nuclei : Na-11 and Mg-12 \n", + "m_p = 1.007276; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "M_Mg = 22.994124; # Atomic mass of Mg-12, amu\n", + "M_Na = 22.989768; # Atomic mass of Na-11, amu\n", + "A = 23; # Mass number\n", + "Z_Mg = 12; # Atomic number of Mg-12\n", + "e = 1.6e-019; # Charge of the electron, C\n", + "K = 8.98e+09; # Coulomb force constant\n", + "\n", + "#Calculations\n", + "a_c = A**(1./3)/(2*Z_Mg-1)*((M_Mg-M_Na)+(m_n-m_p))*931.47; # Coulomb coefficient, MeV \n", + "r_0 = 3./5*K*e**2/(a_c*1.6e-013); # Nuclear radius, m\n", + "\n", + "#Result\n", + "print \"Coulomb coefficient = %4.2f MeV\\nNuclear radius = %3.1e m\"%(a_c, r_0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb coefficient = 0.66 MeV\n", + "Nuclear radius = 1.3e-15 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.7, Page 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Z = 92; # Atomic number of U-236\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "A = 236; # Mass number of U-236\n", + "K = 8.98e+09; # Coulomb constant,\n", + "r_o = 1.2e-015; # Distance of closest approach, m\n", + "a_s = -16.8; # Surface constant\n", + "\n", + "#Calculations\n", + "E_c = -(3*K*Z*(Z-1)*e**2)/(5*r_o*A**(1./3)*1.6e-013); # Coulomb energy, MeV\n", + "E_s = a_s*A**(2./3); # Surface energy, MeV \n", + "\n", + "#Result\n", + "print \"Coulomb energy for U(92,236) = %5.1f MeV \\nSurface energy for U(92,236) = %5.1f MeV \"%(E_c, E_s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb energy for U(92,236) = -973.3 MeV \n", + "Surface energy for U(92,236) = -641.6 MeV \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.1, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.4, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch3.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch3.ipynb new file mode 100755 index 00000000..cd87e071 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch3.ipynb @@ -0,0 +1,1164 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:130faf1cedbe400b3db8dd80f8c91c381c48671493c78c08a2ff8acbfd97253c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Radioactivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.1, Page 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Bq = 1./3.7e+010; # Number of curie in one Bq, Ci\n", + "\n", + "#Calculations\n", + "N = 10**10*Bq; # The number of curie in 10^10 Bq, Ci\n", + "\n", + "#Result\n", + "print \"The number of curie in 10^10 Bq : %4.2f Ci\"%N\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of curie in 10^10 Bq : 0.27 Ci\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.2, Page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lambda_232 = 1.58e-018; # Decay constant, s^-1\n", + "N = 2.596e+022; # Number of atoms in 10g Th-232\n", + "\n", + "#Calculations\n", + "A = N*lambda_232; # The activity of 10g of Th-232, dps\n", + "\n", + "#Result\n", + "print \"The activty of 10g of Th-232 : %5.3e dps\"%A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activty of 10g of Th-232 : 4.102e+04 dps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.3, Page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A = 3.7e+010; # Activity of 1Ci sample, dps\n", + "t = 1608; # Half life of radioactive substance, s\n", + "\n", + "#Calculations\n", + "N = 6.023e+023/214; # Number of atoms in 1g of substance having atomic mass 214\n", + "lamda = 0.6931/t; # Decay constant, s^-1\n", + "m = A/(lamda*N); # The mass of radoiactive substance, g\n", + "\n", + "#Result\n", + "print \"nThe mass of radioactive substance : %4.2e g\"%m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "nThe mass of radioactive substance : 3.05e-08 g\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.4, Page 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t = 1.419e+017; # Half life of U-238, s\n", + "N = 6.023e+023/238; # Number of atoms in 1g of U-238\n", + "\n", + "#Calculations\n", + "lamda = 0.6931/t; # Decay constant, s^-1\n", + "A = (lamda*N)*1000/(3.7e+010); # The activity of 1kg of U-238, Ci\n", + "\n", + "#Result\n", + "print \"The activity of 1kg of U-238 : %4.2e Ci\"%A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity of 1kg of U-238 : 3.34e-04 Ci\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.5, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t_h = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Totaltime, years\n", + "\n", + "#Calculations\n", + "lamda = 0.6931/t_h; # Decay constant, years^-1\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "A = 1-m; # The amount of radioactive substance decayed, mg\n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.6, Page 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t = 10; # Total period of radioactive material, days\n", + "\n", + "#Calculations\n", + "lamda = math.log(6.6667)/10; #Decay constant, day^-1\n", + "t_h = 0.6931/(lamda); # Half life of radioactive substance, days\n", + "\n", + "#Result\n", + "print \"The half life of radioactive substance : %4.2f days\"%t_h\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The half life of radioactive substance : 3.65 days\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.7, Page 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t_h = 1620*31536000; # Half life of Ra-226, S\n", + "D = 0.6931/t_h; # Decay constant, S^-1\n", + "A_Ci = 3.7e+010; # Activity, Ci\n", + "\n", + "#Calculations\n", + "N_Ci = A_Ci/D; # Number of atoms decayed\n", + "m = 0.226; # Mass of 6.023e+023 atoms, kg\n", + "M_Ci = m*N_Ci/6.023e+023; # Mass of 1-Ci sample of Ra-226, kg\n", + "A_rf = 10**6; # Activity, Rf\n", + "N_rf = A_rf/D; # Number of atoms decayed\n", + "M_rf = m*N_rf/6.023e+023; # Mass of 1-Rf sample of Ra-226, kg\n", + "\n", + "#Result\n", + "print \"Mass of 1-Ci sample of Ra-226 = %5.3e kg and \\n Mass of 1-Rf sample of Ra-226 = %4.2e kg \"%(M_Ci, M_rf )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of 1-Ci sample of Ra-226 = 1.023e-03 kg and \n", + " Mass of 1-Rf sample of Ra-226 = 2.77e-08 kg \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.8, Page 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "N_o = 7.721e+018; # Number of atoms in 3 mg of U-234\n", + "t_h = 2.5e+05; # Half life of U-234, years\n", + "T = 150000; # Total time, years\n", + "\n", + "#Calculations\n", + "lamda = 0.6931/t_h; # Decay constant, year^-1\n", + "N = N_o*(math.exp(-lamda*T)); # Number of atoms left after T years\n", + "m = 234000; # Mass of 6.023e+023 atoms of U-234, mg\n", + "M = m*N/(6.023e+023); # Weight of sample left after t years, \n", + "L = 8.8e-014; # Given decay constant, S^-1\n", + "A = N*L*10**6/(3.7e+010); # Activity, micro Ci\n", + "\n", + "#Result\n", + "print \"The weight of sample = %5.3f mg \\n Activity = %5.2f micro Ci \"%(M, A)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight of sample = 1.979 mg \n", + " Activity = 12.12 micro Ci \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.9, Page 129" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N = 6.324e+020; # Number of atoms in 4.2e-05 kg of K-40\n", + "\n", + "#Calculations\n", + "t_h = 1.31e+09*31536000; # Half life of K-40, s\n", + "D = 0.693/t_h; # Decay constant, s^-1\n", + "A = N*D/(3.7e+010)*10**6; # Activity of K-40, microCi\n", + "\n", + "#Result\n", + "print \"The activity of K-40 : %5.3f micro Ci\"%A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The activity of K-40 : 0.287 micro Ci\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2.10, Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N = 2.87e+019; # Number of atoms in 10e-10kg of Po-210\n", + "t_h = 138*24*3600; # Half life of Po-210, s\n", + "\n", + "#Calculations\n", + "D = 0.693/t_h; # Decay constant, s^-1\n", + "A = N*D; # Activity of K-40, dps\n", + "E = 5.3*1.6e-013; # Power produce by one dps, MeV\n", + "P = A*E; # Power produced by 1.667e+012 dps, W\n", + "\n", + "#Result\n", + "print \"The Power produced by 1.667e+012 dps : %3.1f W\"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Power produced by 1.667e+012 dps : 1.4 W\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.1, Page 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare three cells (for three reactions)\n", + "R1 = [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]\n", + "R2 = [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]\n", + "R3 = [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]\n", + "\n", + "# Enter data for first cell (Reaction)\n", + "R1[0][0] = \"Pb\";\n", + "R1[0][1] = 82;\n", + "R1[0][2] = 211;\n", + "R1[1][0] = 'Bi';\n", + "R1[1][1] = 83;\n", + "R1[1][2] = 211;\n", + "R1[2][0] = 'Tl';\n", + "R1[2][1] = 81;\n", + "R1[2][2] = 207;\n", + "R1[3][0] = 'Pb';\n", + "R1[3][1] = 82;\n", + "R1[3][2] = 207;\n", + "\n", + "# Enter data for second cell (Reaction)\n", + "R2[0][0] = \"U\";\n", + "R2[0][1] = 92;\n", + "R2[0][2] = 238;\n", + "R2[1][0] = 'Th';\n", + "R2[1][1] = 90;\n", + "R2[1][2] = 234;\n", + "R2[2][0] = 'Pa';\n", + "R2[2][1] = 91;\n", + "R2[2][2] = 234;\n", + "R2[3][0] = 'U';\n", + "R2[3][1] = 92;\n", + "R2[3][2] = 234;\n", + "\n", + "# Enter data for third cell (Reaction)\n", + "R3[0][0] = \"Bi\";\n", + "R3[0][1] = 83;\n", + "R3[0][2] = 211;\n", + "R3[1][0] = 'Pa';\n", + "R3[1][1] = 84;\n", + "R3[1][2] = 211;\n", + "R3[2][0] = 'Pb';\n", + "R3[2][1] = 82;\n", + "R3[2][2] = 207;\n", + "\n", + "\n", + "#Calculations&Results\n", + "# Declare a function returning the type of particle emitted\n", + "def identify_particle(d_Z, d_A):\n", + " if d_Z == 2 & d_A == 4: \n", + " particle = \"Alpha\";\n", + " elif d_Z == -1 & d_A == 0:\n", + " particle = \"Beta minus\";\n", + " elif d_Z == 1 & d_A == 0:\n", + " particle = \"Beta plus\";\n", + " \n", + "\n", + "# Display emitted particles for first reaction\n", + "print \"\\nReaction-I:\"\n", + "for i in range(0,3):\n", + " dZ = R1[i][1]-R1[i+1][1];\n", + " dA = R1[i][2]-R1[i+1][2];\n", + " p = identify_particle(dZ,dA);\n", + " print \"%s(%d) - (%s) --> %s(%d)\"%(R1[i][0], R1[i][1], p, R1[i+1][0], R1[i+1][1]); \n", + "\n", + "\n", + "# Display emitted particles for second reaction\n", + "print \"\\n\\nReaction-II:\"\n", + "for i in range(0,3):\n", + " dZ = R2[i][1]-R2[i+1][1];\n", + " dA = R2[i][2]-R2[i+1][2];\n", + " p = identify_particle(dZ,dA);\n", + " print \"%s(%d) - (%s) --> %s(%d)\"%(R2[i][0],R2[i][1], p, R2[i+1][0], R2[i+1][1]); \n", + "\n", + "\n", + "# Display emitted particles for third reaction\n", + "print \"\\n\\nReaction-III:\"\n", + "for i in range(0,2):\n", + " dZ = R3[i][1]-R3[i+1][1];\n", + " dA = R3[i][2]-R3[i+1][2];\n", + " p = identify_particle(dZ,dA);\n", + " print \"%s(%d) - (%s) --> %s(%d)\"%(R3[i][0], R3[i][1], p, R3[i+1][0], R3[i+1][1]); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Reaction-I:\n", + "Pb(82) - (None) --> Bi(83)\n", + "Bi(83) - (None) --> Tl(81)\n", + "Tl(81) - (None) --> Pb(82)\n", + "\n", + "\n", + "Reaction-II:\n", + "U(92) - (None) --> Th(90)\n", + "Th(90) - (None) --> Pa(91)\n", + "Pa(91) - (None) --> U(92)\n", + "\n", + "\n", + "Reaction-III:\n", + "Bi(83) - (None) --> Pa(84)\n", + "Pa(84) - (None) --> Pb(82)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.2, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_U = 238.050786; # Atomic mass of U-238, amu\n", + "M_Pb = 205.9744550; # Atomic mass of Pb-205, amu\n", + "M_He = 4.002603; # Atomic mass of He-4, amu\n", + "M_e = 5.486e-04; # Atomic mass of electron, amu\n", + "\n", + "#Calculations\n", + "M = M_Pb+(8*M_He)+(6*M_e); # Total mass of products, amu\n", + "D = M_U-M; # Decrease in mass, amu\n", + "E = D*931.47; # Energy evolved, MeV\n", + "\n", + "#Results\n", + "print \"Total mass of products = %1.7f amu \\n Decrease in mass = %9.7f amu and \\n Energy evolved = %4.1f MeV\"%(M, D, E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total mass of products = 237.9985706 amu \n", + " Decrease in mass = 0.0522154 amu and \n", + " Energy evolved = 48.6 MeV\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.1, Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare cell (for given reaction)\n", + "R1 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]];\n", + "# Enter data for cell (Reaction-I)\n", + "R1[0][0] = \"A\";\n", + "R1[0][1] = 90;\n", + "R1[0][2] = 238;\n", + "R1[0][3] = \"Alpha\";\n", + "R1[1][0] = 'B';\n", + "R1[1][3] = \"Beta minus\";\n", + "R1[2][0] = 'C';\n", + "R1[2][3] = \"Alpha\";\n", + "R1[3][0] = 'D';\n", + "R1[3][3] = \"Beta minus\";\n", + "R1[4][0] = 'E'; \n", + "\n", + "# Declare a function returning the type of particle emitted\n", + "def daughter_nucleus(particle_emitted):\n", + " if particle_emitted == \"Alpha\":\n", + " Z = 2\n", + " A = 4;\n", + " elif particle_emitted == \"Beta minus\":\n", + " Z = -1\n", + " A = 0; \n", + " elif particle_emitted == \"Beta plus\":\n", + " Z = 1\n", + " A = 0;\n", + " return Z,A\n", + "\n", + "# Display emitted particles for first reaction\n", + "print \"\\n\\nReaction-I:\"\n", + "for i in range(0,4):\n", + " [Z, A] = daughter_nucleus(R1[i][3]);\n", + " R1[i+1][1] = R1[i][1]-Z;\n", + " R1[i+1][2] = R1[i][2]-A; \n", + " print \"%s(%d,%d) - (%s) --> %s(%d,%d)\"%(R1[i][0], R1[i][1], R1[i][2], R1[i][3], R1[i+1][0], R1[i+1][1], R1[i+1][2])\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Reaction-I:\n", + "A(90,238) - (Alpha) --> B(88,234)\n", + "B(88,234) - (Beta minus) --> C(89,234)\n", + "C(89,234) - (Alpha) --> D(87,230)\n", + "D(87,230) - (Beta minus) --> E(88,230)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.2, Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "D = math.log(2); # Decay constant, s^-1\n", + "t = math.log(100); # Half life, s\n", + "\n", + "#Calculations\n", + "n = t/D; # Number of half-lives \n", + "\n", + "#Result\n", + "print \"Number of half-lives : %4.2f \"%n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of half-lives : 6.64 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.3, Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "H_t = 60.5*60; # Total half life period, s\n", + "\n", + "#Calculations\n", + "T_d = 0.693/H_t; # Total decay constant, s^-1\n", + "A_d = 34./100*T_d; # Decay constant for alpha decays, s^-1\n", + "B_d = 66./100*T_d; # Decay constant for beta decay, s^-1\n", + "\n", + "#Result\n", + "print \"Alpha decay = %4.2e s^-1 \\n Beta decay = %4.2e s^-1\"%(A_d, B_d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alpha decay = 6.49e-05 s^-1 \n", + " Beta decay = 1.26e-04 s^-1\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.4, Page 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A_r = 1.8e+04; # Atomic ratio of U(92,238) and U(92,234)\n", + "T_238 = 2.5e+05; # Half life of U(92,238), years\n", + "\n", + "#Calculations\n", + "T_234 = A_r*T_238; # Half life of U(92,234), years\n", + "\n", + "#Result\n", + "print \"Half life of U(92,234): %3.1e years\"%T_234\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half life of U(92,234): 4.5e+09 years\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5.2, Page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_239 = 239.052158; # Atomic mass of Pu-239, amu\n", + "M_235 = 235.043925; # Atomic mass of U-235, amu\n", + "M_4 = 4.002603; # Atomic mass of He-4, amu\n", + "\n", + "#Calculations\n", + "Q = (M_239-M_235-M_4)*931.47; # Difference in masses, MeV\n", + "A = 241; # Mass number \n", + "K_alpha = Q*(A-4)/A; # Kinetic energy of alpha particle, MeV\n", + "\n", + "#Result\n", + "print \"Kinetic energy of alpha particle %5.2f MeV\"%K_alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy of alpha particle 5.16 MeV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5.3, Page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Z = 88; # Atomic number of Ra-226 nucleus, \n", + "A = 226; # Atomic mass of Ra-226 nucleus\n", + "R_0 = 1.3e-015; # Distance of closest approach, m\n", + "E_0 = 8.854e-012; # Permittivity of free space, C^2/Nm^2\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "\n", + "#Calculations\n", + "B = 2/(1.6e-013)*(Z-2)*e**2/(4*math.pi*E_0*R_0*A**(1./3)); # The barrier height faced by alpha particle, MeV\n", + "\n", + "#Result\n", + "print \"The barrier height faced by alpha particle : %4.1f MeV\"%B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The barrier height faced by alpha particle : 31.2 MeV\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5.4, Page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Z_1 = 2; #Atomic number of He-4, \n", + "Z_2 = 7; # Atomic number of N-14,\n", + "A_1 = 4; # Atomis mass of He-4 nucleus \n", + "A_2 = 14; # Atomic mass of N-14 nucleus\n", + "R_0 = 1.5e-015; # Distance of closest approach, m\n", + "E_0 = 8.854e-012; # Permittivity of free space, C**2/Nm**2\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "\n", + "#Calculations\n", + "B = Z_1/(1.6e-013)*Z_2*e**2/(4*math.pi*E_0*R_0*(A_1**(1./3)+A_2**(1./3))); # The coulomb barrier faced by alpha particle, MeV\n", + "\n", + "#Result\n", + "print \"The coulomb barrier faced by alpha particle : %4.2f MeV\"%B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coulomb barrier faced by alpha particle : 3.36 MeV\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5.5, Page 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R_0 = 1.2; # Distance of closest approach, m\n", + "\n", + "#Calculations\n", + "E_b = 197/(R_0*137); # The K.E. of proton to penetrate the berrier of H nucleus, Mev\n", + "\n", + "#Result\n", + "print \"The K.E. of proton to penetrate the berrier of H nucleus : %3.1f MeV\"%E_b\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The K.E. of proton to penetrate the berrier of H nucleus : 1.2 MeV\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.1, Page 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_C = 14.007685; # Mass of C-14 nucleus, amu\n", + "E_e = 0.156/931.47; # Kinetic energy of emitted electron, amu\n", + "\n", + "#Calculations\n", + "M_N = M_C-E_e; # Mass of N-14 nucleus, amu\n", + "\n", + "#Result\n", + "print \"Mass of N-14 nucleus : %9.6f amu\"%M_N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of N-14 nucleus : 14.007518 amu\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.3, Page 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N_p = 6.70e+033;# Number of protons \n", + "T_p = 10**32; # Mean life of proton, years\n", + "\n", + "#Calculations\n", + "D_p = N_p/T_p*0.5; # Number of proton decays per year, decays/year \n", + "\n", + "#Result\n", + "print \"Number of proton decays per year,: %4.1f decays/year\"%D_p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of proton decays per year,: 33.5 decays/year\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7.1, Page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_2 = 2505; # Second excited state of Ni-60, KeV\n", + "E_1 = 1332; # First excited state of Ni-60, KeV\n", + "E_0 = 0; # Ground state of Ni-60 , KeV\n", + "\n", + "#Calculations\n", + "E_G_2 = E_2-E_1; # Energy of gamma rays emitted when transition from 2 to 1, KeV\n", + "E_G_1 = E_1-E_0; # Energy of gamma rays emitted when transition from 1 to 0, KeV\n", + "\n", + "#Result\n", + "print \"Energies of two gamma rays emitted : %d KeV and %d KeV\"%(E_G_2, E_G_1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energies of two gamma rays emitted : 1173 KeV and 1332 KeV\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7.2, Page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E = 662; # Energy available with the nucleus, KeV\n", + "I_b_K = 37.4; # Binding energy for K-shell, KeV\n", + "I_b_L = 6.0; # Binding energy for L-shell, KeV\n", + "\n", + "#Calculations\n", + "E_c_K = E-I_b_K; # Energy conversion for K-shell, KeV\n", + "E_c_L = E-I_b_L; # Energy conversion for L-shell, KeV\n", + "\n", + "#Results\n", + "print \"Energies conversion for K and L-shell electrons : %5.1f KeV and %d KeV\"%(E_c_K, E_c_L)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energies conversion for K and L-shell electrons : 624.6 KeV and 656 KeV\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9.1, Page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t_h = 4.5e+09; # Half life of mineral, years\n", + "\n", + "#Calculations\n", + "D_c = 0.6931/t_h; # Decay constant of minerals, years^-1\n", + "N_1 = 6.023e+023/238; # Number of nuclei in 1g of Uranium\n", + "N = 6.023e+023*0.093/206; # Number of nuclei in 0.093g of lead\n", + "t = math.log(1+N/N_1)/D_c; # Age of the mineral, years\n", + "\n", + "#Result\n", + "print \"Age of the mineral : %6.4e years \"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age of the mineral : 6.6261e+08 years \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9.2, Page 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t_h = 5760; # Half life of boat, years\n", + "D_c = 0.6931/t_h; # Decay constant of boat, years^-1\n", + "N_1 = 16.; # Number of atoms decay per min. per gram initially \n", + "N = 5; # Number of atoms decay per min per gram presently\n", + "\n", + "#Calculations\n", + "t = math.log(N_1/N)*1/D_c; # Age of the boat, years\n", + "\n", + "#Result\n", + "print \"Age of the boat : %d years \"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age of the boat : 9666 years \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9.4, Page 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t_h = 24000*365*24*3600; # Half life of Pu-239, s\n", + "\n", + "#Calculations\n", + "D_c = 0.6931/t_h; # Decay constant of Pu-239, s^-1\n", + "N = 6.023e+023*10/239; # Number of nuclei at t = 0, nuclei \n", + "A_0 = D_c*N; # Initial activity, disintegrations/sec\n", + "A = 0.1; # Activity after time t, disintegrations/sec\n", + "t = math.log(A_0/A)*1/D_c; # Age of the Pu-239, years\n", + "\n", + "#Results\n", + "print \"The number of nuclei at t = 0, = %4.2e nuclei \\nInitial activity = %4.2e disintegrations/s and \\nAge of Pu-239 = %4.2e years \"%(N, A_0, t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of nuclei at t = 0, = 2.52e+22 nuclei \n", + "Initial activity = 2.31e+10 disintegrations/s and \n", + "Age of Pu-239 = 2.86e+13 years \n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch4.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch4.ipynb new file mode 100755 index 00000000..6d4fa2c4 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch4.ipynb @@ -0,0 +1,1187 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ca682350308b29c013e46db9f08b9b34713af4db683eab2d3a58c670cd39d090" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Nuclear Reactions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3.1, Page 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t = 10**-5; # Thickness of Li(3,7), m\n", + "d = 500; # Density, Kg/m^3\n", + "N = 6.023e+026; # Number of nuclei in 7-Kg of Li-7\n", + "M = 7 ; # Molar mass of Li\n", + "\n", + "#Calculations\n", + "n = d*N*t/M; # Number of Li(3,7) nuclei/area\n", + "N_p = 10**8; # Number of neutron produced/s\n", + "N_0 = 10**13; # Number of incident particle striking/unit area of target\n", + "C_s = N_p/(N_0*n*10**(-28)); # Cross section, b\n", + "\n", + "#Result\n", + "print \"Cross section : %5.3f b\"%C_s\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cross section : 0.232 b\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3.2, Page 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "t = 0.2e-03; # Thickness of Cd sheet, m\n", + "d = 8.64e+03; # Density, Kg/m^3\n", + "N = 6.023e+026; # Number of nuclei in 7-Kg of Li-7\n", + "M = 112 ; # Atomic mass of Cd-113, amu\n", + "C_s = 20000e-028; # Cross section of neutron for Cd-113, m^2\n", + "\n", + "#Calculations\n", + "n = 0.12*d*N/M; # Number of Cd atoms/volume, atoms/m^3\n", + "F_inc_absorb = (1-math.exp(-n*C_s*t))*100; # Fraction of neutron absorbed \n", + "\n", + "#Result\n", + "print \"Fraction of neutron absorbed by Cd sheet : %4.2f percent\"%F_inc_absorb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of neutron absorbed by Cd sheet : 89.25 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4.1, Page 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare three cells (for three reactions)\n", + "R1 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]\n", + "R2 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]\n", + "R3 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]\n", + "# Enter data for first cell (Reaction)\n", + "R1[0][0] = 'Al'; # Element\n", + "R1[0][1] = 13; # Atomic number\n", + "R1[0][2] = 27; # Mass number\n", + "R1[0][3] = 0; # Lepton number \n", + "R1[1][0] = 'He';\n", + "R1[1][1] = 2;\n", + "R1[1][2] = 4;\n", + "R1[1][3] = 0;\n", + "R1[2][0] = 'Si';\n", + "R1[2][1] = 14;\n", + "R1[2][2] = 30;\n", + "R1[1][3] = 0;\n", + "R1[3][0] = 'n';\n", + "R1[3][1] = 0;\n", + "R1[3][2] = 1;\n", + "R1[1][3] = 0;\n", + "# Enter data for second cell (Reaction)\n", + "R2[0][0] = \"U\";\n", + "R2[0][1] = 92;\n", + "R2[0][2] = 235;\n", + "R2[0][3] = 0;\n", + "R2[1][0] = 'n';\n", + "R2[1][1] = 0;\n", + "R2[1][2] = 1;\n", + "R2[1][3] = 0;\n", + "R2[2][0] = 'Ba';\n", + "R2[2][1] = 56;\n", + "R2[2][2] = 143;\n", + "R2[2][3] = 0;\n", + "R2[3][0] = 'Kr';\n", + "R2[3][1] = 36;\n", + "R2[3][2] = 90;\n", + "R2[3][3] = 0;\n", + "R2[4][0] = '2n';\n", + "R2[4][1] = 0;\n", + "R2[4][2] = 1;\n", + "R1[4][3] = 0;\n", + "# Enter data for third cell (Reaction)\n", + "R3[0][0] = 'P';\n", + "R3[0][1] = 15;\n", + "R3[0][2] = 32;\n", + "R3[0][3] = 0;\n", + "R3[1][0] = 'S';\n", + "R3[1][1] = 16;\n", + "R3[1][2] = 32;\n", + "R3[1][3] = 0;\n", + "R3[2][0] = 'e';\n", + "R3[2][1] = -1;\n", + "R3[2][2] = 0;\n", + "R3[2][3] = 0;\n", + "R3[3][0] = 'v_e';\n", + "R3[3][1] = 0;\n", + "R3[3][2] = 0;\n", + "R3[3][3] = 0;\n", + "\n", + "#Calculations&Results\n", + "# Declare a function returning equality status of nucleon number\n", + "def check_nucleon(nr_sum,np_sum):\n", + " if nr_sum == np_sum:\n", + " return 1;\n", + " else: \n", + " return 0;\n", + " \n", + "# Declare a function returning equality status of proton number\n", + "def check_proton(pr_sum,pp_sum):\n", + " if pr_sum == pp_sum:\n", + " return 1;\n", + " else: \n", + " return 0;\n", + "\n", + "# Declare a function returning equality status of lepton number\n", + "def check_lepton(lr_sum,lp_sum):\n", + " if lr_sum == lp_sum:\n", + " return 1;\n", + " else: \n", + " return 0;\n", + " \n", + "# Reaction-I\n", + "print(\"\\n\\n\\nReaction-I:\\n\\n\");\n", + "pr_sum = R1[0][1]+R1[1][1];\n", + "pp_sum = R1[2][1]+R1[3][1];\n", + "nr_sum = R1[0][2]+R1[1][2];\n", + "np_sum = R1[2][2]+R1[3][2];\n", + "lr_sum = R1[0][3]+R1[1][3];\n", + "lp_sum = R1[2][3]+R1[3][3]; \n", + "if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\nis possible\"%( R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]);\n", + "elif (check_proton(pr_sum,pp_sum) == 0):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\nis impossible\"%(R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]);\n", + " R1[3][0] = 'H'; R1[3][2] = 1;\n", + " print(\"\\nThe correct reaction is:\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\n\"%(R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]); \n", + "\n", + "# Display for reaction-II\n", + "print(\"\\n\\n\\nReaction-II:\\n\\n\");\n", + "pr_sum = R2[0][1]+R2[1][1];\n", + "pp_sum = R2[2][1]+R2[3][1]+R2[4][1];\n", + "nr_sum = R2[0][2]+R2[1][2];\n", + "np_sum = R2[2][2]+R2[3][2]+R2[4][2];\n", + "lr_sum = R2[0][3]+R2[1][3];\n", + "lp_sum = R2[2][3]+R2[3][3]+R2[4][3]; \n", + "if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\\nis possible\"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]);\n", + "elif (check_nucleon(nr_sum,np_sum) == 0):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\\nis impossible\"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]);\n", + " R2[4][0] = '3n';\n", + " print(\"\\nThe correct reaction is:\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\\n\"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]); \n", + " \n", + "# Reaction-III\n", + "print(\"\\n\\n\\nReaction-III:\\n\\n\");\n", + "pr_sum = R3[0][1]+R3[1][1];\n", + "pp_sum = R3[2][1]+R3[3][1];\n", + "nr_sum = R3[0][2]+R3[1][2];\n", + "np_sum = R3[2][2]+R3[3][2];\n", + "lr_sum = R3[0][3]+R3[1][3];\n", + "lp_sum = R3[2][3]+R3[3][3]; \n", + "if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\nis possible\"%( R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R2[3][2]);\n", + "elif (check_lepton(nr_sum,np_sum) == 0):\n", + " print(\"The Reaction\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\nis impossible\"%(R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R3[3][2]);\n", + " R3[3][0] = 'v_e_a'\n", + " print(\"\\nThe correct reaction is:\\n\")\n", + " print \"\\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\\n\" %( R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R3[3][2]); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "\n", + "Reaction-I:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tAl(27) + He(4) --> Si(30)+n(1)\n", + "is impossible\n", + "\n", + "The correct reaction is:\n", + "\n", + "\tAl(27) + He(4) --> Si(30)+H(1)\n", + "\n", + "\n", + "\n", + "\n", + "Reaction-II:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tU(235) + n(1) --> Ba(143)+Kr(90)+2n(1)\n", + "is impossible\n", + "\n", + "The correct reaction is:\n", + "\n", + "\tU(235) + n(1) --> Ba(143)+Kr(90)+3n(1)\n", + "\n", + "\n", + "\n", + "\n", + "Reaction-III:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tP(32) + S(32) --> e(0)+v_e(0)\n", + "is impossible\n", + "\n", + "The correct reaction is:\n", + "\n", + "\tP(32) + S(32) --> e(0)+v_e_a(0)\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.1, Page 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_n = 1.00866501; # Mass of neutron, amu\n", + "M_Hp = 2.014102; # Mass of proton, amu\n", + "M_Hd = 3.016049; # Mass of deutron, amu\n", + "M_He = 4.002603; # Mass of alpha particle, amu\n", + "\n", + "#Calculations\n", + "Q = (M_Hp+M_Hd-M_He-M_n)*931.49; # Q-value, MeV\n", + "\n", + "#Result\n", + "print \"The Q-value for the reaction : %4.1f MeV\"%Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Q-value for the reaction : 17.6 MeV\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.2, Page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_Cf = 252.081621; # Mass of califronium, amu\n", + "M_Cm = 248.072343; # Mass of curium, amu\n", + "M_He = 4.002603; # Mass of alpha particle, amu\n", + "\n", + "#Calculations\n", + "Q = (M_Cf-M_Cm-M_He)*931.49; # Q-value, MeV\n", + "\n", + "#Result\n", + "print \"The Q-value for the reaction : %4.2f MeV\"%Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Q-value for the reaction : 6.22 MeV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.3, Page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Pb_208(Fe_56, Fe_54)Pb_210\n", + "M_Pb_208 = 207.976641; # Mass of Pb-208, amu\n", + "M_Fe_56 = 55.934939; # Mass of Fe-56, amu\n", + "M_Pb_210 = 209.984178; # Mass of Pb-210, amu\n", + "M_Fe_54 = 53.939612; # Mass of Fe-54, amu\n", + "\n", + "#Calculations\n", + "Q = (M_Pb_208+M_Fe_56-M_Pb_210-M_Fe_54)*931.49; # Q-value, MeV\n", + "E_th = -Q*(M_Fe_56+M_Pb_208)/M_Pb_208; # Threshold energy, MeV \n", + "\n", + "#Results\n", + "print \"The Q-value for the reaction = %5.2f MeV \\n Threshold energy = %5.2f MeV \"%(Q,E_th)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Q-value for the reaction = -11.37 MeV \n", + " Threshold energy = 14.43 MeV \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.4, Page 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# H(1,1)+n(0,1) = H(1,2)+G is the reaction\n", + "M_H_2 = 2.014735; # Mass of H-2, amu\n", + "M_H_1 = 1.008142 ; # Mass of H-1, amu\n", + "E_g = 2.230; # Energy of gamma rays, MeV\n", + "\n", + "#Calculations\n", + "M_n_1 = ((M_H_2*931.47+E_g)-(M_H_1*931.47))/931.47; #Mass of neutron, amu\n", + "\n", + "#Result\n", + "print \"The mass of the neutron : %8.6f MeV \"%M_n_1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of the neutron : 1.008987 MeV \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.5, Page 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Li-6 + n-1 > He-4 + H-3 is the given reaction \n", + "M_Li = 6.0151234; # Atomic mass of Li, amu\n", + "M_n = 1.0086654; # Atomic mass of neutron, amu\n", + "M_He = 4.0026034; # Atomic mass of He, amu\n", + "M_H = 3.0160294; # Atomic mass of H, amu\n", + "\n", + "#Calculations&Results\n", + "r_sum = M_Li+M_n; # Sum of reactant, amu\n", + "p_sum = M_He+M_H; # Sum of product, amu\n", + "# Declare a function returning equality status of nucleon number\n", + "def check_Qvalue(r_sum,p_sum):\n", + " if r_sum >= p_sum:\n", + " Q = 1;\n", + " else: \n", + " Q = 0;\n", + " return Q\n", + "# Reaction\n", + "if (check_Qvalue(r_sum,p_sum) == 1):\n", + " print \"Reaction : \\n\\n\\t Li(6)+n(1) ----> He(4)+H(3)\"\n", + " print \"\\t\\tThis reaction is exoergic\"\n", + "elif (check_Qvalue(r_sum,p_sum) == 0):\n", + " print \"Reaction : \\n\\n\\t Li(6)+n(1) ----> He(4)+H(3)\"\n", + " print \"\\t\\tThis reaction is endoergic\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reaction : \n", + "\n", + "\t Li(6)+n(1) ----> He(4)+H(3)\n", + "\t\tThis reaction is exoergic\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.6, Page 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Cf-252 > Zr-98 +Ce-145 + 9*n-1 is the given reaction\n", + "M_Cf = 252.081621; # Atomic mass of Cf, amu\n", + "M_Zr = 97.912735; # Atomic mass of Zr, amu\n", + "M_Ce = 144.917230; # Atomic mass of Ce, amu\n", + "M_n = 3.0160294; # Atomic mass of neutron, amu\n", + "\n", + "#Calculations&Results\n", + "r_sum = M_Cf+M_Zr; # Sum of reactant, amu\n", + "p_sum = M_Ce+M_n; # Sum of product, amu\n", + "\n", + "\n", + "# Declare the function which check the Q-value \n", + "def check_Qvalue(r_sum,p_sum):\n", + " if r_sum >= p_sum:\n", + " Q = 1;\n", + " else: \n", + " Q = 0;\n", + " return Q \n", + "\n", + "\n", + "# Reaction\n", + "if (check_Qvalue(r_sum,p_sum) == 1):\n", + " print \"Reaction : \\n\\n\\t Cf(256) ----> Zr(98)+Ce(145)+9*n(1)\"\n", + " print \"\\t\\tThis reaction is spontaneous\"\n", + "elif (check_Qvalue(r_sum,p_sum) == 0):\n", + " print \"Reaction : \\n\\n\\t Cf(256) ----> Zr(98)+Ce(145)+9*n(1)\"\n", + " print \"\\t\\tThis reaction is not spontaneous\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reaction : \n", + "\n", + "\t Cf(256) ----> Zr(98)+Ce(145)+9*n(1)\n", + "\t\tThis reaction is spontaneous\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.7, Page 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# O(8,16) > N(7,15)+ H(1,1) is the given reaction\n", + "M_N_15 = 15.000108; # Mass of N-15, amu\n", + "M_O_16 = 16; # Mass of O-16, amu\n", + "M_H_1 = 1.007825; # Mass of H-1, amu\n", + "\n", + "#Calculations\n", + "Q = (M_O_16-M_N_15-M_H_1)*931.49; # Q-value, MeV\n", + "\n", + "#Result\n", + "print \"The Q-value for the reaction : %3.1f MeV \"%Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Q-value for the reaction : -7.4 MeV \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.8, Page 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Na(11,23)+ n > F(9,20)+ He(2,4) is the reaction\n", + "M_Na_23 = 22.99097; # Mass of Na-23, amu\n", + "M_n_1 =1.00866 ; # Mass of n-1, amu\n", + "Q = -5.4; # Q-value, MeV\n", + "\n", + "#Calculations\n", + "E_th = -Q*(M_Na_23+M_n_1)/M_Na_23; # Threshold energy, MeV\n", + "\n", + "#Result\n", + "print \"The threshold energy for the reaction : %4.2f MeV \"%E_th" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The threshold energy for the reaction : 5.64 MeV \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.9, Page 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# He(2,4)+ N(7,14) = O(8,17)+ H(1,1)is the given reaction\n", + "M_N_14 = 14.00755; # Mass of N-14, amu\n", + "M_He_4 = 4.00388; # Mass of He-4, amu\n", + "M_O_17 = 17.00452; # Mass of O-17, amu\n", + "M_H_1 = 1.00815; # Mass of H-1, amu\n", + "\n", + "#Calculations\n", + "Q = (M_N_14+M_He_4-M_O_17-M_H_1)*931.49; # Q-value, MeV\n", + "\n", + "#Result\n", + "print \"The Q-value for the reaction : %4.2f MeV \"%Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Q-value for the reaction : -1.16 MeV \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5.10, Page 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# H(1,2)+G = H(1,1)+ n(0,1) is the given reaction\n", + "M_H_2 = 2.014735; # Mass of H-2, amu\n", + "M_H_1 = 1.008142 ; # Mass of H-1, amu\n", + "M_n_1 = 1.008987; # Mass of M_n_1, amu\n", + "Q = -5.4; # Q-value, MeV\n", + "\n", + "#Calculations\n", + "E_g = (M_H_1*931.47+M_n_1*931.47)-(M_H_2*931.47); #Energy of the gama rays, MeV\n", + "\n", + "#Result\n", + "print \"The energy of the gama rays : %6.4f MeV \"%E_g" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of the gama rays : 2.2299 MeV \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.1, Page 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m = 0.001; # Mass of U-235 lost during fission, Kg\n", + "c = 3e+08; # Velocity of light, m/s\n", + "\n", + "#Calculations\n", + "E = m*c**2; # Energy released during fission, J\n", + "E_t = E/(4e+09*1000); # Energy requires TNT, Kt \n", + "\n", + "#Results\n", + "print \"Energy released during fission = %1.0e J \\n Destructive power of bomb = %4.1f Kt of TNT\"%(E, E_t)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy released during fission = 9e+13 J \n", + " Destructive power of bomb = 22.5 Kt of TNT\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.2, Page 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t = 0.15; # Thickness of the foil, Kg\n", + "N = 6.023e+026; # Number of nuclei in 1Kg of U-235, nuclei\n", + "N_1 = N/235*t; # Number of nuclei in 0.15Kg of U-235, nuclei\n", + "A = 2e-026; # Area present in each nucleus, m^2\n", + "I = 10^6; # Intensity ,s^-1 \n", + "\n", + "#Calculations\n", + "F_r = N_1*A; # Rate of fissions induced in the foil by the neutrons, s^-1\n", + "\n", + "#Result\n", + "print \"Rate of fissions induced in the foil by the neutrons: %5.3e per sec\"%F_r\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of fissions induced in the foil by the neutrons: 7.689e-03 per sec\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.3, Page 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "N = 6.023e+023/256*10**-6; # Number of nuclei in 1ug of Fm-256\n", + "t_h = 158*60; # Half life of Fm-256, s\n", + "\n", + "#Calculations\n", + "D_c = math.log(2)/t_h; # Decay constant, s^-1\n", + "F_r = N*D_c; # Fission rate, fissions/s\n", + "E = 220*1.6e-013; # Energy released during fission of one nucleus, J\n", + "P = E*F_r; # Power released in fission of 1 microgram of Fm-256, W\n", + "\n", + "#Result\n", + "print \"Power released in fission of 1 microgram of Fm-256 = %d W\"%P\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power released in fission of 1 microgram of Fm-256 = 6 W\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.4, Page 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "N = 6.023e+023/252*0.1; # Number of nuclei in 100mg of Cf-252\n", + "t_h = 2.62*365*24*3600; # Half life of Cf-252, s\n", + "\n", + "#Calculations\n", + "D_c = math.log(2)/t_h; # Decay constant, s^-1\n", + "F_r = N*D_c; # Fission rate, fissions/s\n", + "E = 210*1.6e-013; # Energy released during fission of one nucleus, J\n", + "P = E*F_r; # Power released in fission of 100 milligram of Cf-252, W\n", + "\n", + "#Result\n", + "print \"Power released in fission of 100 milligram of Cf-252: %4.1f W\"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power released in fission of 100 milligram of Cf-252: 67.4 W\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.5, Page 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E = 200*1.6e-013; # Energy released during fission of one nucleus, J\n", + "E_t = 20000*4.18e+09; # Energy released in detonation of 20000 tons of TNT, J\n", + "\n", + "#Calculations\n", + "N_f = E_t/E; # Number of fission occured during eplosion, fissions\n", + "c = 3e+08; # Velocity of light, m/s\n", + "m = E_t/(c)**2*10**6; # Decrease in mass during explosion, mg\n", + "m_r = round(m)\n", + "\n", + "#Results\n", + "print \"Number of fissions occured during explosion = %4.2e fissions \\n Decrease in mass during explosion = %d mg \"%(N_f, m_r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of fissions occured during explosion = 2.61e+24 fissions \n", + " Decrease in mass during explosion = 929 mg \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.1, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# 5*H(1,2)= He(2,3)+He(2,4)+H(1,2)+2*n(0,1)+25MeV is the given reaction\n", + "N = 6.023e+026/2*10; # Number of atoms in 10Kg of H-2, atoms\n", + "E = 25/5*1.6e-013; # Energy liberate during fusion of 1 atom of H-2, J\n", + "\n", + "#Calculations\n", + "E_l = E*N; # Energy liberate during fusion of 10 Kg of H-2, J\n", + "\n", + "#Result\n", + "print \"Energy liberated during fusion of 10 Kg of H-2 = %4.2e J\"%E_l" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy liberated during fusion of 10 Kg of H-2 = 2.41e+15 J\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.2, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_r = 16.002603; # Mass of the reactant, amu\n", + "M_p = 15.994915; # Mass of reactant, amu\n", + "M_d = 7.688e-03; # Difference in masses, amu\n", + "\n", + "#Calculations\n", + "E_p = M_d*931.49; # Energy produced, MeV\n", + "\n", + "#Result\n", + "print \"Energy produced by the fusion reaction :%4.2f MeV\"%E_p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy produced by the fusion reaction :7.16 MeV\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.3, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration & Calculations\n", + "# Firstly calculate for B-10\n", + "Z_B = 5; # Atomic number of B-10\n", + "r_B = 5.17; # Seperation of two nuclei, fm\n", + "K = 1.38e-023; # Boltzmann's constant\n", + "F = 1./137; # Fine structure constant\n", + "E = 197.5*1.6e-013; # Energy, J\n", + "V_c_B = F*Z_B**2*E/r_B; # Coulomb barrier for B-10, J\n", + "T_B = 2./3*V_c_B/K; # Temperature required to overcome the barrier for B-10, K\n", + "\n", + "# Now calculate for Mg-24\n", + "Z_Mg = 12; # Atomic number of Mg-24\n", + "r_Mg = 6.92; # Seperation of two nuclei, fm\n", + "K = 1.38e-023; # Boltzmann's constant\n", + "F = 1./137; # Fine structure constant\n", + "E = 197.5*1.6e-013; # Energy, J\n", + "V_c_Mg = F*Z_Mg**2*E/r_Mg; # Coulomb barrier for Mg-24, J\n", + "T_Mg = 2./3*V_c_Mg/K; # Temperature required to overcome the barrier for Mg-24, K\n", + "\n", + "#Results\n", + "print \"For B-10 \\n Energy released = %4.2e J \\n Temperature required = %4.1e K \\nFor Mg-24 \\n Energy released = %4.2e J \\n Temperature required = %4.2e K\"%(V_c_B,T_B,V_c_Mg,T_Mg)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For B-10 \n", + " Energy released = 1.12e-12 J \n", + " Temperature required = 5.4e+10 K \n", + "For Mg-24 \n", + " Energy released = 4.80e-12 J \n", + " Temperature required = 2.32e+11 K\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.4, Page 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# 4*H(1,1)= He(2,4)+2*e(1,0)+2*v+G is the reaction\n", + "E_r = 3.9e+026; # Energy releasd in 1s, J\n", + "N = 1.2e+057; # Number of hydrogen atoms in the sun, atoms\n", + "M_d = 0.027599;# Mass difference, amu\n", + "\n", + "#Calculations\n", + "E = M_d*931.47; # In terms of energy, MeV\n", + "E_t = N/4*E*1.6e-013; # Total energy available in the sun, J\n", + "t = E_t/(E_r*365*24*3600*10**9); # Life time of the sun, billion years\n", + "\n", + "#Result\n", + "print \"Life time of the sun : %5.1f billion years\"%t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Life time of the sun : 100.3 billion years\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.5, Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare three cells [for three reactions]\n", + "R = [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]\n", + "# Enter data for first cell [Reaction]\n", + "R[0][0] = 'H'; # Element\n", + "R[0][1] = 1; # Atomic number\n", + "R[0][2] = 2; # Mass number\n", + "R[1][0] = 'H';\n", + "R[1][1] = 1;\n", + "R[1][2] = 3;\n", + "R[2][0] = 'n'\n", + "R[2][1] = 0;\n", + "R[2][2] = 1;\n", + "R[3][0] = 'He'\n", + "R[3][1] = 2;\n", + "R[3][2] = 3;\n", + "\n", + "\n", + "#Calculations&Results\n", + "p_sum = R[1][2]+R[2][2];\n", + "if p_sum == 2:\n", + " print \"The particle is : %s[%d][%d] \"%(R[3][0],R[3][1],R[3][2])\n", + " \n", + "# Calculate the energy released\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "m_d = 2.014102; # Mass of deutron, amu\n", + "m_He = 3.0160293; # Mass of He-3, amu\n", + "E = (2*m_d-(m_n+m_He))*931.47; # Energy released in this reaction, MeV\n", + "print \"The energy released in this reaction : %4.2f MeV\"%E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy released in this reaction : 3.27 MeV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.6, Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration & Calculations\n", + "# Reaction-1 = H(1,2)+H(1,2)= He(2,3)+n(0,1)\n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "m_H = 2.014102; # Mass of H(1,2), amu\n", + "m_He = 3.016029; # Mass of He(2,3), amu\n", + "m_d_1 = 2*m_H-m_He-m_n; # Mass defect for reaction first, amu\n", + "Q_1 = m_d_1*931.47; # Q-value for reaction first, MeV\n", + "\n", + "# Reaction-2 = H(1,2)+H(1,2)= H(1,3)+p(1,1)\n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "m_H = 2.014102; # Mass of H(1,2), amu\n", + "m_H_3 = 3.016049; # Mass of H(1,3), amu\n", + "m_d_2 = 2*m_H-m_H_3-m_p; # Mass defect for reaction second, amu\n", + "Q_2 = m_d_2*931.47; # Q-value for reaction second, MeV\n", + "\n", + "#Results\n", + "print \"For first reaction \\n Mass defect = %7.5f amu \\n Q-value = %7.5f amu \\nFor second reaction \\n Mass defect = %7.5f MeV \\n Q-value = %4.2f MeV \"%(m_d_1,Q_1,m_d_2,Q_2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For first reaction \n", + " Mass defect = 0.00351 amu \n", + " Q-value = 3.26946 amu \n", + "For second reaction \n", + " Mass defect = 0.00433 MeV \n", + " Q-value = 4.03 MeV \n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch5.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch5.ipynb new file mode 100755 index 00000000..b82b840d --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch5.ipynb @@ -0,0 +1,581 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b3d84f92a01550eaa67b406d224abe5a49a5edc9fe8877cf03444a3c9cc2e577" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Interactions of Radiations with Matter" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2.1, Page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m = 511.; # Mass of electron, KeV\n", + "M = 938*10**3; # Mass of incident charged particle, KeV\n", + "E = 10*10**3; # Energy of proton, KeV\n", + "\n", + "#Calculations\n", + "E_l = 4*m*E/M; # Energy lost during collison, KeV\n", + "n = E/E_l; # Number of collisions, \n", + "N = round(n)\n", + "\n", + "#Result\n", + "print \"The energy lost during collision = %5.2f KeV \\n Number of collision required = %d collisions\"%(E_l,N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy lost during collision = 21.79 KeV \n", + " Number of collision required = 459 collisions\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5.1, Page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "x = 0.2; # Thickness of Al material , m\n", + "I_r = 3./100; # Intensity ratios, \n", + "\n", + "#Calculations\n", + "x_h = math.log(2)*x/math.log(1./I_r); # Half value thickness of Al, m\n", + "\n", + "#Result\n", + "print \"Half value thickness of Al : %6.4f m\"%x_h " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half value thickness of Al : 0.0395 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5.2, Page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "u = 0.75; # Absorption coefficient , cm^-1\n", + "I_r = 1./100; # Intensity ratios, \n", + "\n", + "#Calculations\n", + "x = math.log(1./I_r)*u; # Thckness of Pb, cm\n", + "\n", + "#Result\n", + "print \"Thickness of Pb : %5.3f cm\"%x\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of Pb : 3.454 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5.3, Page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "x_h = 5; # Half thickness of an absorber, mm\n", + "x = 20; # Thickness of an absorber, mm\n", + "\n", + "#Calculations\n", + "u = math.log(2)/x_h; # Absorption coefficient, mm^-1\n", + "I_r = math.exp(-u*x); # Intensity ratios, \n", + "P_loss = I_r*100; # Percentage loss in intensity, percent\n", + "\n", + "#Result\n", + "print \"Percentage loss in intensity : %4.2f percent\"%P_loss" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage loss in intensity : 6.25 percent\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6.1, Page 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "C = 3e+08; # Speed of light, m/s\n", + "h = 6.626e-034; # Planck's constant, Js\n", + "lamda = 2500e-010; # wavelength of light, m\n", + "e = 1.602e-019; # Charge of electron, C\n", + "w = 1.9; # Work function, J\n", + "m = 9.1e-031; # Mass of the electron, kg \n", + "\n", + "#Calculations\n", + "E_c = h*C/(lamda*e); # Calculated energy, J\n", + "E_e = E_c-w; # Energy of photoelectron, J\n", + "v = math.sqrt((2*E_e*e)/m); # Velocity of photoelectron, m/s\n", + "\n", + "#Result\n", + "print \"The velocity of photoelectron : %4.2e m/s \"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of photoelectron : 1.04e+06 m/s \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6.2, Page 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C = 3e+08; # Speed of light, m/s\n", + "h = 6.626e-034; # Planck's constant, Js\n", + "lamda = 250e-09; # Wavelength of light, m\n", + "w = 2.30; # Work function, eV\n", + "A = 2e-04; # Area of the surface, m^2 \n", + "I = 2; # Intensity of light, W/m^2\n", + "e = 1.6e-019; # Charge of the electron, C\n", + "\n", + "#Calculations\n", + "E_p = h*C/(lamda*e); # Energy of photoelectron, eV\n", + "E_max = E_p-w; # Maximum kinetic energy of photoelectron, eV\n", + "n_p = I*A/(E_p*e); # Number of photons reaching the surface per second, photons/s\n", + "R_p = 0.2/100*n_p; # Rate at which photoelectrons are emitted, photoelectrons/s\n", + "\n", + "#Result\n", + "print \"The maximum kinetic energy = %4.2f eV \\n The rate at which photoelectrons are emitted = %4.2e photoelectrons/s \"%(E_max, R_p)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum kinetic energy = 2.67 eV \n", + " The rate at which photoelectrons are emitted = 1.01e+12 photoelectrons/s \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6.3, Page 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C = 3e+08; # Speed of light, m/s\n", + "h = 6.626e-034; # Planck's constant, Js\n", + "T_lamda = 190e-09; # Threhold wavelength of light, m\n", + "e = 1.6e-019; # Charge of the electron, C\n", + "E_max = 1.1; # Maximum kinetic energy of photoelectron, eV\n", + "\n", + "#Calculations\n", + "w = h*C/(T_lamda*e); # Work function, eV \n", + "E_t = E_max+w; # threshold energy, eV\n", + "lamda = h*C/(E_t*e); # Wavelength of light used, m\n", + "\n", + "#Result\n", + "print \"The wavelength of light used : %5.3e m\"%lamda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of light used : 1.626e-07 m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.1, Page 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.62e-034; # Value of Planck's constant, J\n", + "m_e = 9.11e-031; # Mass of the electron,Kg\n", + "c = 3e+08; # Velocity of light, m/s\n", + "A = 65; # Angle between scattered radiation and incident radiation, degree\n", + "\n", + "#Calculations\n", + "C_s = h/(m_e*c)*(1-math.cos(A*math.pi/180)); # Compton shift, m\n", + "\n", + "#Result\n", + "print \"Compton shift : %4.2e m\"%C_s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compton shift : 1.40e-12 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.2, Page 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.626e-034; # Value of Planck's constant, J\n", + "m_e = 9.11e-031; # Mass of the electron,Kg\n", + "c = 3e-04; # Velocity of light, m/s\n", + "A = 135; # Angle between scattered radiation and incident radiation, degree\n", + "W_i = 1.87; # Wavelength of incident radiation, pm\n", + "\n", + "#Calculations\n", + "W_s = W_i + (h*(1-math.cos(A*math.pi/180)))/(m_e*c); # Wavelength of scattered radiation, pm\n", + "\n", + "#Result\n", + "print \"Wavelength of scattered radiation : %4.2f pm\"%W_s " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of scattered radiation : 6.01 pm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.3, Page 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.626e-034; # Value of Planck's constant, J\n", + "m_e = 9.11e-031; # Mass of the electron,Kg\n", + "c = 3e-04; # Velocity of light, pm/s\n", + "A = 90; # Angle between scattered radiation and incident radiation, degree\n", + "W_s = 3.8; # Wavelength of scattered radiation, pm\n", + "\n", + "#Calculations\n", + "W_i = (W_s - h/(m_e*c)*(1-math.cos(A*math.pi/180))); # Wavelength of incident beam of Xrays, pm\n", + "\n", + "#Result\n", + "print \"Wavelength of incident beam of X-rays : %4.2f pm\"%W_i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of incident beam of X-rays : 1.38 pm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.4, Page 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.626e-034; # Value of Planck's constant, J\n", + "m_e = 9.11e-031; # Mass of the electron,Kg\n", + "c = 3e+08; # Velocity of light, pm/s\n", + "A = 60; # Angle between scattered radiation and incident radiation, degree\n", + "v_0 = 3.2e+019; # Frequency of the incident photon, Hz\n", + "\n", + "#Calculations\n", + "V = 1/v_0 + h/(m_e*c**2)*(1-math.cos(A*math.pi/180)); \n", + "v =(1/V); # Frequency of the scattered photon, Hz\n", + "\n", + "#Result\n", + "print \"Frequency of the scattered photon: %4.2e Hz\"%v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the scattered photon: 2.83e+19 Hz\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.5, Page 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.626e-034; # Value of Planck's constant, J\n", + "m_e = 9.11e-031; # Mass of the electron,Kg\n", + "c = 3e+08; # Velocity of light, pm/s\n", + "A = 180; # Angle between scattered radiation and incident radiation, degree\n", + "E_i = 1836; # Energy of the incident electron, KeV\n", + "\n", + "#Calculations\n", + "E = 1./E_i + 1./511*(1-math.cos(A*math.pi/180)); \n", + "E_s = round(1./E); # Energy of the sscattered photon, KeV\n", + "E_r = E_i-E_s; # Energy of the recoil electron, KeV\n", + "\n", + "#Result\n", + "print \"Energy of the scattered photon = %d KeV \\n Energy of the recoil electron = %d KeV \"%(E_s, E_r )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the scattered photon = 224 KeV \n", + " Energy of the recoil electron = 1612 KeV \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.6, Page 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "E_s = 180; # Energy of the scattered X-rays, KeV\n", + "E_i = 200; # Energy of the incident X-rays, KeV\n", + "\n", + "#Calculations\n", + "a = math.degrees(math.acos(1-((1./E_s-1./E_i)*511))); # \n", + "A = round(a); # Scattering angle of X-rays, degree\n", + "\n", + "#Result\n", + "print \"Scattering angle of X-rays: %d degree\"%A " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Scattering angle of X-rays: 44 degree\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8.1, Page 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_e = 0.511; # Rest mass of electron, MeV\n", + "M_p = 0.511; # Rest mass of positron, MeV\n", + "\n", + "#Calculations\n", + "E_c = M_e+M_p; # Energy consumed, Mev\n", + "E_g = 5.0; # Given energy, MeV\n", + "E_l = E_g-E_c; # Energy left, Mev\n", + "E_k = E_l/2; # Kinetic energy of electron and positron, MeV\n", + "\n", + "#Result\n", + "print \"The kinetic energy of electron and positron : %5.3f Mev\"%E_k" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of electron and positron : 1.989 Mev\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch6.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch6.ipynb new file mode 100755 index 00000000..40f32a69 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch6.ipynb @@ -0,0 +1,670 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7cbb692f860f8b51041eaeba8c14f1a99838650a96dbd811943baf1a8f00410c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Particle Accelerators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2.1, Page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "q = 1; # Number of proton, \n", + "V = 800; # Voltage applied to the dome, kV\n", + "\n", + "#Calculations\n", + "E = q*V; # The kinetic energy of proton,keV\n", + "\n", + "#Result\n", + "print \"The kinetic energy of proton : %d keV\"%E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of proton : 800 keV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3.1, Page 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "q = 1; # Number of proton, \n", + "V = 7; # Voltage applied to the dome, MV\n", + "\n", + "#Calculations\n", + "E = q*V; # The kinetic energy of proton,MeV\n", + "\n", + "#Result\n", + "print \"The kinetic energy of proton : %d MeV\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of proton : 7 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3.2, Page 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V = 5; # Voltage of accelerator, MV\n", + "# Declare three cells [for three reactions]: Page no. : 133[2011]\n", + "R1 = [[0,0],[0,0],[0,0]]\n", + "R2 = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]\n", + "# Enter data for first cell [Reaction]\n", + "R1[0][0] = \"p\";\n", + "R1[0][1] = 1;\n", + "R1[1][0] = 'd';\n", + "R1[1][1] = 1;\n", + "R1[2][0] = \"He\";\n", + "R1[2][1] = 2;\n", + "\n", + "#Calculations&Results\n", + "E_p = R1[0][1]*V\n", + "E_d = R1[1][1]*V\n", + "E_He = R1[2][1]*V\n", + "# Enter data for second cell [Reaction]\n", + "R2[0][0] = \"p\"\n", + "R2[0][1] = 1\n", + "R2[1][0] = \"N\"\n", + "R2[1][1] = 14\n", + "R2[2][0] = \"O\"\n", + "R2[2][1] = 15\n", + "R2[3][0] = \"y\"\n", + "R2[3][1] = 0\n", + "R2[4][0] = \"d\"\n", + "R2[4][1] = 1\n", + "R2[5][0] = \"n\"\n", + "R2[5][1] = 0\n", + "R2[6][0] = \"He\"\n", + "R2[6][1] = 3\n", + "R2[7][0] = \"C\"\n", + "R2[7][1] = 13\n", + "R2[8][0] = \"He\"\n", + "R2[8][1] = 4\n", + "R2[9][0] = \"C\"\n", + "R2[9][1] = 12\n", + "print \"Protons energy = -%d MeV \\n Deuterons energy = -%d MeV \\n Double charged He-3 = -%d MeV\"%(E_p, E_d, E_He)\n", + "print \" Possible reaction at these energies are\"\n", + "print \" %s + %s[%d] ---> %s[%d]+ %s\"%(R2[0][0],R2[1][0],R2[1][1],R2[2][0],R2[2][1],R2[3][0])\n", + "print \" %s + %s[%d] ---> %s[%d] + %s \"%(R2[4][0],R2[1][0],R2[1][1],R2[2][0],R2[2][1],R2[5][0])\n", + "print \" %s[%d] +%s[%d] ---> %s[%d]+ %s\"%(R2[6][0],R2[6][1],R2[7][0],R2[7][1],R2[2][0],R2[2][1],R2[5][0])\n", + "print \" %s[%d] + %s[%d] ---> %s[%d] +%s\"%(R2[8][0],R2[8][1],R2[9][0],R2[9][1],R2[2][0],R2[2][1],R2[5][0])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Protons energy = -5 MeV \n", + " Deuterons energy = -5 MeV \n", + " Double charged He-3 = -10 MeV\n", + " Possible reaction at these energies are\n", + " p + N[14] ---> O[15]+ y\n", + " d + N[14] ---> O[15] + n \n", + " He[3] +C[13] ---> O[15]+ n\n", + " He[4] + C[12] ---> O[15] +n\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4.1, Page 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "q = 2; # Number of proton, \n", + "V = 15; # Voltage applied to the dome, MV\n", + "\n", + "#Calculations\n", + "E = q*V; # The kinetic energy of proton,MeV\n", + "\n", + "#Result\n", + "print \"The kinetic energy of proton : %d MeV\"%E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of proton : 30 MeV\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5.1, Page 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "v = 2.999999997e+08; # Velocity of the electron, m/s\n", + "c = 3e+08; # Velocity of light,m/s\n", + "\n", + "#Calculations\n", + "D = c-v; # difference between electron's speed and speed of light,m/s\n", + "\n", + "#Result\n", + "print \"The difference between electron speed and speed of light : %3.1f m/s\"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The difference between electron speed and speed of light : 0.3 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5.2, Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "f = 200e+06; # Frequency of applied the voltage, Hz\n", + "V_0 = 750e+03; # Applied potential difference, V\n", + "q = 1.6e-019; # Charge of proton, C\n", + "m = 1.67e-027; # Mass of proton, Kg\n", + "n_1 = 1; # For first tube\n", + "\n", + "#Calculations\n", + "L_1 = math.sqrt(2*n_1*q*V_0/m)/(2*f); # Length of the first tube, m\n", + "n_n = 128; # For last tube\n", + "L_n = 1/(2*f)*math.sqrt(2*n_n*q*V_0/m); # Length of the last tube,m\n", + "\n", + "#Result\n", + "print \"Length of the first tube = %4.2f m \\n Length of the last tube = %4.2f m \"%(L_1,L_n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of the first tube = 0.03 m \n", + " Length of the last tube = 0.34 m \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5.3, Page 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K_E = 1.17; # Kinetic energy of the electron, MeV\n", + "E_r = 0.511; # Rest mass energy of the electron, MeV\n", + "\n", + "#Calculations\n", + "v = (1-1/(K_E/E_r+1)**2); # Velocity of the electron, m/s\n", + "\n", + "#Result\n", + "print \"Velocity of the electron : %4.2fc\"%v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of the electron : 0.91c\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7.1, Page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V = 20e+03; # Potential difference across the dees, V\n", + "r = 0.28; # Radius of the dees, m \n", + "B = 1.1; # Magnetic field, tesla\n", + "q = 1.6e-019; # Charge of the proton, C\n", + "m = 1.67e-027; # Mass of the proton, Kg\n", + "\n", + "#Calculations\n", + "E_max = B**2*q**2*r**2/(2*m*1.6e-013); # Maximnum energy acquired by protons,MeV\n", + "f = B*q/(2*math.pi*m*10**06); # Frequecy of the oscillator,MHzmath.\n", + "N = E_max*1.6e-013/(q*V); # Number of revolutions, \n", + "\n", + "#Result\n", + "print \"Maximum energy acquired by proton = %4.2f MeV \\n Frequency of the oscillator = %4.2f MHz \\n Number of revolutions = %d revolutions \"%(E_max,f,N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum energy acquired by proton = 4.54 MeV \n", + " Frequency of the oscillator = 16.77 MHz \n", + " Number of revolutions = 227 revolutions \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7.2, Page 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Variable declaration\n", + "B= 2.475; # Magnetic field, tesla\n", + "q = 1.6e-019; # Charge of the deutron, C\n", + "m = 2*1.67e-027; # Mass of the deutron, Kg\n", + "\n", + "#Calculations\n", + "f = B*q/(2*math.pi*m*10**06); # Frequency of the deutron,MHz\n", + "\n", + "#Result\n", + "print \"Frequency of the deutron: %4.2f MHz \"%f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the deutron: 18.87 MHz \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7.3, Page 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "q = 1.6e-019; # Charge of the proton, C\n", + "r = 0.60; # radius of the dees, m\n", + "m = 1.67e-027; # Mass of the proton, Kg\n", + "f = 10**6; # Frequecy of the proton,Hz\n", + "\n", + "#Calculations\n", + "B = 2*math.pi*m*f/q; # Magnetic field applied to cyclotron, tesla\n", + "\n", + "#Result\n", + "print \"Magnetic field applied to cyclotron : %6.4f tesla \"%B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic field applied to cyclotron : 0.0656 tesla \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7.4, Page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "q = 1.6e-019; # Charge of the proton, C\n", + "m = 1.67e-027; # Mass of the proton, Kg\n", + "B = 1.4; # Magnetic field , tesla\n", + "\n", + "#Calculations\n", + "f = B*q/(2*math.pi*m*10**06); # Frequency of the applied field, tesla\n", + "\n", + "#Result\n", + "print \"Frequency of the applied field : %4.2f MHz\"%f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the applied field : 21.35 MHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8.1, Page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019 ; # Charge of an electron, C\n", + "f = 60; # Frequency of variation magnetic field, Hz\n", + "B_0 = 1; # Magnetic field , tesla\n", + "r_0 = 1; # Radius of doughnut, m\n", + "\n", + "#Calculations\n", + "E = 4*e*2*math.pi*f*r_0**2/(1.6e-019); # Energy gained by electron per turn, eV\n", + "E_g = round(E)\n", + "\n", + "#Result\n", + "print \"Energy gained by electron per turn: %d eV\"%E_g" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy gained by electron per turn: 1508 eV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9.1, Page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 500; # Kinetic energy of the proton, MeV\n", + "E_r = 938.; # Rest mass energy of the proton, MeV\n", + "\n", + "#Calculations\n", + "R_f = E_r/(K+E_r); # The ratio of highest to the lowest frequency, \n", + "\n", + "#Result\n", + "print \"The ratio of highest to the lowest frequency : %4.2f \"%R_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of highest to the lowest frequency : 0.65 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9.2, Page 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_k = 1200; # Kinetic energy of the proton, MeV\n", + "q = 7; # Number of proton in nitrogen\n", + "E_r = 13040 # Rest mass energy of the electron, MeV\n", + "\n", + "#Calculations\n", + "E = (E_k+E_r)*1.6e-013; # Total energy,j\n", + "c = 3e+08; # Velocity of light, m/s\n", + "R_w_B = q*1.6e-019*c**2/E; # Ratio of w/B, m^2/W \n", + "\n", + "#Result\n", + "print \"The ratio of w/B : %4.2e m^2/W \"%R_w_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of w/B : 4.42e+07 m^2/W \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10.1, Page 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "q = 1.602e-019; # Charge of an electron, C\n", + "r = 0.28; # Radius of stable orbit,m\n", + "E = 70*1.6e-013; # Energy of the electron, j\n", + "c = 3e+08; # Velocity of light, m/s\n", + "\n", + "#Calculations\n", + "B = E/(q*r*c); # Magnetic field, T \n", + "\n", + "#Result\n", + "print \"The magnetic field of the electron : %4.2f T\"%B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic field of the electron : 0.83 T\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10.2, Page 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "c= 3e+08; # Speed of light in vacuum, m/s\n", + "q = 1.602e-019; # Charge on proton, coulomb\n", + "amu = 931; # Energy equivalent of 1 amu, MeV\n", + "m = 938; # Rest mass of a proton, MeV\n", + "KE = 12e+03; # Kinetic energy of proton, MeV\n", + "B = 1.9; # Magnetic field, T\n", + "\n", + "#Calculations\n", + "E = m + KE; # Total energy of proton, MeV\n", + "# As E = m*amu, solving for m, the mass of proton\n", + "m = E/amu*1.672e-027; # Proton mass in motion, kg \n", + "v = 0.9973*c; # Velocity of the proton, m/s\n", + "r = m*v/(B*q); # Radius of the proton, m \n", + "\n", + "#Result\n", + "print \"Radius of the proton orbit : %4.2f m\"%r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of the proton orbit : 22.84 m\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch7.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch7.ipynb new file mode 100755 index 00000000..4af5a7d1 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch7.ipynb @@ -0,0 +1,575 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:668c298765bba9905fefea9659759a81124dfb9392cdf43960f9b6f3b63d97ec" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Radiation Detectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2.1, Page 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_p = 30.; # Energy required for one pair, eV\n", + "n = 150000; # Number of pairs \n", + "\n", + "#Calculations\n", + "E_a = n*E_p/10**6; # Energy of alpha particle, Mev\n", + "\n", + "#Result\n", + "print \"The energy of alpha particle : %3.1f Mev\"%E_a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of alpha particle : 4.5 Mev\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.1, Page 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E = 5.48e+06; # Energy of alpha particle, eV\n", + "C = 50e-012; # Capacitance of the chamber, F\n", + "R = 10**6; # Resistance, ohm\n", + "E_p = 35; # Energy required to produced an ion pair, eV\n", + "\n", + "#Calculations\n", + "n = E/E_p; # Number of ion pair produced\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "V =( n*e)/C; # Pulse height, V\n", + "I = V/R; # current produced, A\n", + "\n", + "#Results \n", + "print \"The pulse height = %4.3e V \\n Current produced = %5.3e A\"%(V,I) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pulse height = 5.010e-04 V \n", + " Current produced = 5.010e-10 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.2, Page 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_p = 35.; # Energy required to produced an ion pair, eV\n", + "n = 10**5; # Number of ion pair produced\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "\n", + "#Calculations\n", + "E_k = E_p*n/10**6; # Kinetic energy of the proton, MeV\n", + "A = n*e; # The amount of charge collected on each plate, C \n", + "\n", + "#Results \n", + "print \"The kinetic energy of the proton = %3.1f MeV \\n The amount of charge collected on each plate = %3.1e C \"%(E_k,A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of the proton = 3.5 MeV \n", + " The amount of charge collected on each plate = 1.6e-14 C \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4.1, Page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_p = 30; # Energy required to produced an ion pair, eV\n", + "M = 1000; # Multiplication factor \n", + "e = 1.6e-019; # Charge of an electron, C\n", + "t = 10**-3; # Time, s\n", + "R = 10**5; # Resistance, ohm\n", + "E_k = 20*10**6; # Kinetic energy of the proton, eV\n", + "\n", + "#Calculations \n", + "n = E_k/E_p; # Number of ion pairs produced\n", + "n_a = n*M; # Number of ion-pair after multiplication\n", + "Q = n_a*e; # Charge carried by these ion, C \n", + "I = Q/t; # The current through 100-ohm resistance, A\n", + "A = I*R; # ,The amplitude of voltage pulse, V \n", + "\n", + "#Results\n", + "print \"The current through 100-ohm resistance = %6.4e A \\n The amplitude of voltage pulse = %6.4e V \"%(I, A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current through 100-ohm resistance = 1.0667e-07 A \n", + " The amplitude of voltage pulse = 1.0667e-02 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4.2, Page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V = 1500; # Potential difference, V\n", + "a = 0.0001; # Radius of the wire, m\n", + "b = 0.02; # Radius of the cylinderical tube, m\n", + "r = 0.0001; # Distance of electric field from the surface, m\n", + "\n", + "#Calculations \n", + "E_r = V/(r*math.log(b/a)); # the electric field at the surface, V/m \n", + "\n", + "#Result\n", + "print \"The electric field at the surface : %4.2e V/m\"%E_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric field at the surface : 2.83e+06 V/m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.1, Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V = 2000; # Potential difference, V\n", + "a = 0.01; # Radius of the wire, cm\n", + "b = 2; # Radius of the cylinderical tube, cm\n", + "r = 0.01; # Radius of the wire, m\n", + "\n", + "#Calculations \n", + "E_r = V/(r*math.log(b/a)); # the electric field at the surface, V/m \n", + "\n", + "#Result\n", + "print \"The electric field at the surface : %d V/cm\"%E_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric field at the surface : 37747 V/cm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.2, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n_t = 10.0**9; # Total number of counts \n", + "n_d = 2000*3*60; # Count recorded per day\n", + "\n", + "#Calculations\n", + "n_y = n_d*365; # Counts recorded in 365-days\n", + "t = n_t/n_y; # The life of G.M. counter, year\n", + "\n", + "#Result\n", + "print \"The life of G.M. counter : %4.2f year\"%t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The life of G.M. counter : 7.61 year\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.3, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_p = 30; # Energy required for one electron pair, eV\n", + "E = 10e+06 ; # Energy lost by alpha particle, eV\n", + "n = E/E_p; # Number of ion-pairs produced\n", + "M = 5000; # Multiplication factor\n", + "C = 50e-012; # Capacitance, F\n", + "\n", + "#Calculations \n", + "n_M = n*M; # Number of ion-pairs after multiplication\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "Q = n_M*e; # Charge present in each ion\n", + "A = Q/C; # Amplitude of voltage pulse, V\n", + "\n", + "#Result\n", + "print \"Amplitude of voltage pulse : %3.1f V\"%A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude of voltage pulse : 5.3 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5.4, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 30000; # Count per minute \n", + "n_o = n/60; # Observed count rate, count/s\n", + "t = 2e-04; # Dead time, s \n", + "\n", + "#Calculations \n", + "n_t = round(n_o/(1-n_o*t)); # The true count rate, count/s\n", + "\n", + "#Result\n", + "print \"The true count rate : %d counts/s\"%n_t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The true count rate : 556 counts/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6.1, Page 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration&Calculations\n", + "# For 511 KeV gamma rays (for channel first)\n", + "F_W_H_M_1 = 97.; # Frequency width at half maximum for channel first\n", + "P_pos_1 = 1202.; # Peak position for channel first\n", + "Res_KeV_1 = F_W_H_M_1/P_pos_1*511; # Resolution in KeV for channel first\n", + "# For 1275 KeV gamma rays (for channel second) \n", + "F_W_H_M_2 = 82.; # Frequency width at half maximum for channel second\n", + "P_pos_2 = 1202.; # Peak position for channel second\n", + "Res_KeV_2 = round(F_W_H_M_2/P_pos_2*1275); # Resolution in KeV for channel second\n", + "\n", + "#Results \n", + "print \"Resolution for channel first = %d KeV \\n Resolution for channel second = %d KeV \"%(Res_KeV_1, Res_KeV_2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resolution for channel first = 41 KeV \n", + " Resolution for channel second = 87 KeV \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6.2, Page 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "n = 4.2e+08; # Number of photoelectrons\n", + "C = 200e-012; # Capacitance, F\n", + "\n", + "#Calculations\n", + "A = n*e/C; # Amplitude of output voltage pulse, V\n", + "\n", + "#Result\n", + "print \"Amplitude of output voltage pulse : %4.2f V \"%A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude of output voltage pulse : 0.34 V \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6.3, Page 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "F_W_H_M = 0.72; # Full width at half maximum, V\n", + "P_p = 6.0; # Peak position, V\n", + "E = 662; # Energy of photopeak, KeV\n", + "\n", + "#Calculations\n", + "per_resolution = F_W_H_M/P_p*100; # Percentage resolution in percent\n", + "Res_KeV = per_resolution/100*E; # Resolution in KeV for Cs-137\n", + "\n", + "#Results\n", + "print \"The percentage resolution = %d percent \\n Resolution in KeV = %4.1f KeV \"%(per_resolution, Res_KeV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage resolution = 12 percent \n", + " Resolution in KeV = 79.4 KeV \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7.1, Page 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_r = 12; # Relative permittivity \n", + "E_o = 8.85e-012; # Permittivity of free space\n", + "E = E_r*E_o; # Absolute dielectric constant\n", + "C = 100e-012; # Capacitance of the dielectric, F\n", + "A = 1.6e-04; # Area of the detector, m^2\n", + "e = 1.602e-019; # Charge of an electrin, C\n", + "E_p = 3.2; # Energy required to create an ion pair, eV\n", + "E_s = 12e+06; # Energy required to stopped ion pair, eV\n", + "\n", + "#Calculations\n", + "n = E_s/E_p; # Number of ion-pair produced\n", + "Q = n*e; # Charge of these ion pair, C\n", + "d = A*E/(C*10**-6); # The thickness of the depletion layer, micron\n", + "A = Q/C*1000; # The amplitude of voltage pulse, mV\n", + "\n", + "#Results\n", + "print \"The thickness of the depletion layer = %d micron \\n The amplitude of voltage pulse: = %6.4f mV \"%(d, A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the depletion layer = 169 micron \n", + " The amplitude of voltage pulse: = 6.0075 mV \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7.2, Page 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_r = 12; # Relative permittivity \n", + "E_o = 8.85e-012; # Permittivity of free space\n", + "E = E_r*E_o; # Absolute dielectric constant\n", + "A = 2e-04; # Area of the detector, m^2\n", + "e = 1.602e-019; # Charge of an electron, C\n", + "d = 100e-06; # The thickness of the depletion layer, m\n", + "E_p = 3.0; # Energy required to create an ion pair, eV\n", + "E_s = 5.48e+06; # Energy required to stopped ion pair, eV\n", + "\n", + "#Calculations\n", + "C = E*A/d; # The capacitance of the dielectric, F\n", + "n = E_s/E_p; # Number of ion-pair produced\n", + "Q = n*e; # Charge of these ion pair, C\n", + "A = Q/C*1000; # The amplitude of voltage pulse, mV\n", + "\n", + "#Results\n", + "print \"The capacitance of dielectric = %5.3e F \\n The amplitude of voltage pulse = %5.3f mV\"%(C, A)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance of dielectric = 2.124e-10 F \n", + " The amplitude of voltage pulse = 1.378 mV\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch8.ipynb b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch8.ipynb new file mode 100755 index 00000000..ffd91f68 --- /dev/null +++ b/Introduction_To_Nuclear_And_Particle_Physics_by_V._K._Mittal,_R._C._Verma_And_S._C._Gupta/ch8.ipynb @@ -0,0 +1,237 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:983adfa64951b4c71938be02f10b2d0d40d82e513916f6ced5042486c6dc7d21" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Particle Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.1, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Proton and antiproton annihilate to produced three pions\n", + "E_p = 938; # Energy of proton, MeV\n", + "E_pi = 139.5; # Energy of pions, MeV\n", + "E_pi_0 = 134.9; # Energy of pi_0_ion, MeV\n", + "\n", + "#Calculations\n", + "E_KE = (2*E_p-(2*E_pi+E_pi_0))/3; # The average kinetic energy of each pions, MeV\n", + "\n", + "#Result\n", + "print \"The average kinetic energy of each pions : %5.1f MeV\"%E_KE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average kinetic energy of each pions : 487.4 MeV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.2, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Here r_1 and r_2 are two decay rates are given\n", + "# Declare the cell\n", + "R1 = [[0,0],[0,0]]\n", + "R1[0][0] = 'r_1'\n", + "R1[0][1] = 'r_2'\n", + "\n", + "#Calculations&Results\n", + "print \"The inherent uncertainity in mass of particle = h(%s + %s) \"%(R1[0][0], R1[0][1]) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inherent uncertainity in mass of particle = h(r_1 + r_2) \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7.3, Page 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare cell for the given reaction\n", + "R1 = [[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,0,0],[0,0,0,0,0]]\n", + "# Enter data for the cell\n", + "R1[0][0] = 'p'\n", + "R1[0][1] = 1 \n", + "R1[0][2] = 1\n", + "R1[0][3] = 0\n", + "R1[0][4] = 1./2\n", + "R1[1][0] = 'K_+'\n", + "R1[1][1] = 1\n", + "R1[1][2] = 0\n", + "R1[1][3] = 1\n", + "R1[1][4] = 1./2\n", + "R1[2][0] = 'S_+'\n", + "R1[2][1] = 1\n", + "R1[2][2] = 1\n", + "R1[2][3] = -1\n", + "R1[2][4] = 1\n", + "R1[3][0] = 'pi_-'\n", + "R1[3][1] = -1\n", + "R1[3][2] = 0\n", + "R1[3][3] = 0\n", + "R1[3][4] = 1\n", + "R1[4][0] = 'S_0'\n", + "R1[4][1] = 0\n", + "R1[4][2] = 1\n", + "R1[4][3] = -1\n", + "R1[4][4] = 0\n", + "R1[5][0] = 'p_-'\n", + "R1[5][1] = -1\n", + "R1[5][2] = -1\n", + "R1[5][3] = 0\n", + "R1[5][4] = 1./2\n", + "R1[6][0] = 'n_0'\n", + "R1[6][1] = 0\n", + "R1[6][2] = 0\n", + "R1[6][3] = 0\n", + "R1[6][4] = 0\n", + "\n", + "\n", + "#Calculations&Results\n", + "def check_Isotopic_no(Ir_sum,Ip_sum):\n", + " if Ir_sum == Ip_sum:\n", + " f = 1;\n", + " else: \n", + " f = 0;\n", + " return f\n", + "\n", + "\n", + "# Declare a function returning equality status of proton number\n", + "def check_strangeness(sr_sum,sp_sum):\n", + " if sr_sum == sp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "def check_charge(cr_sum,cp_sum):\n", + " if cr_sum == cp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "# Declare a function returning equality status of lepton number\n", + " \n", + "#Reaction-I\n", + "print \"\\n\\nReaction-I:\\n\\n\"\n", + "Ir_sum = R1[0][4]+R1[0][4];\n", + "Ip_sum = R1[1][4]+R1[2][4];\n", + "if (check_Isotopic_no(Ir_sum,Ip_sum) == 0):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[0][0],R1[1][0],R1[2][0])\n", + "\n", + "#Reaction-II\n", + "print \"\\n\\nReaction-II\"\n", + "sr_sum = R1[0][3]+R1[3][3];\n", + "sp_sum = R1[4][3]+R1[6][3];\n", + "if (check_strangeness(sr_sum,sp_sum)== 0):\n", + " print \"\\nThe Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[3][0],R1[4][0],R1[6][0])\n", + "\n", + "#Reaction-III\n", + "print \"\\n\\nReaction-III:\\n\\n\"\n", + "cr_sum = R1[0][1]+R1[0][1];\n", + "cp_sum = R1[0][1]+R1[0][1]+R1[0][1]+R1[5][1]; \n", + "if (check_charge(cr_sum,cp_sum) == 1):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s + %s \\nis possible\"%(R1[0][0],R1[0][0],R1[0][0],R1[0][0],R1[5][0]) \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Reaction-I:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> K_+ + S_+ \n", + "is not possible\n", + "\n", + "\n", + "Reaction-II\n", + "\n", + "The Reaction\n", + "\n", + "\tp + pi_- --> S_0 + n_0 \n", + "is not possible\n", + "\n", + "\n", + "Reaction-III:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> p + p + p_- \n", + "is possible\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science/screenshots/1.png b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/1.png new file mode 100755 index 00000000..df5bf5eb Binary files /dev/null and b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/1.png differ diff --git a/Introduction_To_Special_Relativity_And_Space_Science/screenshots/3.png b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/3.png new file mode 100755 index 00000000..ce883bc3 Binary files /dev/null and b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/3.png differ diff --git a/Introduction_To_Special_Relativity_And_Space_Science/screenshots/4.png b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/4.png new file mode 100755 index 00000000..3d378fe2 Binary files /dev/null and b/Introduction_To_Special_Relativity_And_Space_Science/screenshots/4.png differ diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter1.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter1.ipynb new file mode 100755 index 00000000..065b64c5 --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter1.ipynb @@ -0,0 +1,1328 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:6d16aa491b2c243890af0fd0f2df062d36f0cc57c9a30417b495f7ce9d60a0d9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : Interference Diffraction and Polarization" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.1 : (Page Number 46)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Given that\n", + "Beta=0.10#fringe width in cm\n", + "D=200# separation between source and screen in cm\n", + "lambda1=0.00055# wavelength of incident light in cm \n", + "d= (D*lambda1)/ (10*Beta)\n", + "print \" Standard formula used beta= lambda1*D/d \"\n", + "print \" Separation between sources is \",d,\" cm. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta= lambda1*D/d \n", + " Separation between sources is 0.11 cm. \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.2 : (PAGE NUMBER 47)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "D=80# separation between source and screen in cm\n", + "d=0.18# separation between sources in cm \n", + "n=4# order of fringe\n", + "x_n=1.08# distance from central bright fringe in cm \n", + "print \"Standard formula used x_n= n*lambda1*D/d \"\n", + "\n", + "lambda1=d*x_n/(D*n)*1e7\n", + "print \"Wavelength of light used is\" ,lambda1, \"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used x_n= n*lambda1*D/d \n", + "Wavelength of light used is 6075.0 Angstrom.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.3 : (PAGE NUMBER 47)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "beta=0.0320#fringe width in cm\n", + "D=100# separation between source and screen in cm\n", + "d=0.184# separation between sources in cm \n", + "print \" Standard formula used beta=lambda1*D/d \"\n", + "lambda1=d*beta/D*1e8\n", + "print \"Wavelength of light used is\" ,lambda1,\"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta=lambda1*D/d \n", + "Wavelength of light used is 5888.0 Angstrom.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.4 : (Page Number 47)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "beta=0.02 #fringe width in cm\n", + "D=100 # separation between source and screen in cm\n", + "u=30 # separation between slit and convex lens in cm\n", + "I=0.7 # separation between two images of slits on screen in cm\n", + "print\" Standard formula used beta=lambda1*D/d \" \n", + "v=100-u\n", + "O=I*u/v\n", + "d=O\n", + "lambda1=d*beta/D*1e8\n", + "print\" Wavelength of light used is\",lambda1, \"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta=lambda1*D/d \n", + " Wavelength of light used is 6000.0 Angstrom.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5 : (Page Number 47)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "x_n=1.88# fringe separation of nth fringe from central fringe in cm \n", + "N=20# order of fringe\n", + "beta=0.02#fringe width in cm\n", + "D=120# separation between source and eyepiece in cm\n", + "d=0.076# separation between sources in cm \n", + "print \" Standard formula used beta= lambda1*D/d \"\n", + "beta=x_n/N # calculation of angle formed\n", + "lambda1=d*beta/D*1e8 # calculation of Wavelength of light\n", + "print \" Wavelength of light used is\", round(lambda1,4) , \"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta= lambda1*D/d \n", + " Wavelength of light used is 5953.3333 Angstrom.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.6 : (Page Number 48)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "mu = 1.5 #refractive index of plane glass prism\n", + "theta = pi / 180 #angle of prism\n", + "y1 = 10 #separation between slit and biprism in cm \n", + "y2 = 100 #separation sbetween biprism and screen in cm \n", + "lambda1 = 0.00005893#wavelength of incident light in cm \n", + "print \" Standard formula used Beta = (D * lambda1) / d\"\n", + "d = 2 * ( mu -1) * theta * y1\n", + "D = y1 + y2\n", + "Beta = (D * lambda1) / d\n", + "print \" Fringe width observed at distance 1 meter is\",round(Beta,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used Beta = (D * lambda1) / d\n", + " Fringe width observed at distance 1 meter is 0.0371\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.7 : (Page Number 49)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "mu=1.52#refractive index of plane glass prism\n", + "theta1=pi/180#angle of prism\n", + "y1=25#separation between slit and biprism in cm \n", + "y2=175#separation between biprism and screen in cm \n", + "lambda1=0.000055#wavelength of incident light in cm \n", + "beta1=0.02#fringe width in cm\n", + "print \" Standard formula used beta= lambda1*D/d. \"\n", + "D=y1+y2\n", + "d= (D*lambda1)/beta1\n", + "theta1=d/(2*(mu-1)*y1)\n", + "vertex_angle=180-(2*theta1*180/pi)\n", + "print \" Vertex angle of biprism is\",round(vertex_angle,4),\"degree.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta= lambda1*D/d. \n", + " Vertex angle of biprism is 177.5759 degree.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.8 : (Page Number 49)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "mu=1.60#refractive index of plane glass prism\n", + "lambda1=0.0000589#wavelength of incident light in cm \n", + "N=15#order of fringe\n", + "print \" Standard formula used del_x = D/2d *(mu-1)*t \"\n", + "t=N*lambda1/(mu-1)\n", + "print \" Thickness of sheet is\", round(t,4),\"cm.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used del_x = D/2d *(mu-1)*t \n", + " Thickness of sheet is 0.0015 cm.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.9 : (Page Number 50)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "t=0.00035#thickness of glass sheet in cm\n", + "lambda1=0.000055#wavelength of incident light in cm \n", + "N=4#order of fringe\n", + "print \" Standard formula used (mu \u2013 1 )*t = n* lambda1 \"\n", + "mu=N*lambda1/t+1\n", + "print \" Refractive index of sheet is\", round(mu,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used (mu \u2013 1 )*t = n* lambda1 \n", + " Refractive index of sheet is 1.6286\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.10 : (Page Number 50)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "t = 5e-5 #thickness of soap film in cm \n", + "theta1 = 35 #angle of view in degree\n", + "mu = 1.33 #refractive index of soap film \n", + "\n", + "a = 0\n", + "print \"Standard formula used is 2*mu*t*cos(r) = n*lambda1 \"\n", + "r = arcsin(sin(theta1 * pi /180) / mu)\n", + "for n in range(1,3):\n", + " lambda1 = 2 * mu * t * cos(r) / n\n", + " if lambda1 > t:\n", + " a = a + 1\n", + " \n", + "\n", + "print \" The lowest order n =\",a,\" will be absent in visible region.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is 2*mu*t*cos(r) = n*lambda1 \n", + " The lowest order n = 2 will be absent in visible region.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.11 : (Page Number 50)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "D=120#separation between source and screen in cm\n", + "d=0.00075#separation between sources in cm \n", + "l=1.888#transverse distance moved by eyepiece in cm\n", + "N=25#order of fringe\n", + "print \" Standard formula used beta=lambda1*D/d \"\n", + "lambda1=d*l/(D*N)*1e10\n", + "print \" Wavelength of light used is .\", lambda1, \"Angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used beta=lambda1*D/d \n", + " Wavelength of light used is . 4720.0 Angstrom\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.12 : (Page Number 51)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given that\n", + "D15=0.59#diameter of 15th newton\u2019s ring in cm\n", + "D5=0.336#diameter of 5th newton\u2019s ring in cm\n", + "R=100#radius of Plano convex lens in cm\n", + "p=15-5\n", + "print \" Standard formula used D_a**2 \u2013 D_b**2 = 4*p*R*lambda1 \"\n", + "lambda1=(D15**2 - D5**2)/(4*p*R)*1e8\n", + "print \" Wavelength of light used is \", lambda1, \"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used D_a**2 \u2013 D_b**2 = 4*p*R*lambda1 \n", + " Wavelength of light used is 5880.1 Angstrom.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.13 : (Page Number 52)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "t=40 #length of tube in cm\n", + "lambda1=5e-5 #wavelength of incident light in cm \n", + "n=150#order of fringe\n", + "print \" Standard formula used (mu \u2013 1 )*t = n* lambda1 \"\n", + "t=n*lambda1/t+1\n", + "print \" Refractive index of oil film is .\", t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used (mu \u2013 1 )*t = n* lambda1 \n", + " Refractive index of oil film is . 1.0001875\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.14 : (Page Number 52)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "no_fringe = 250 #Number of fringes observed through telescope\n", + "lambda11 = 4e-5#wavelength of incident light in cm \n", + "lambda12 = 6.5e-5 #wavelength of incident light in cm \n", + "print \" Standard formula used 2*t = p*lambda1\"\n", + "p = no_fringe * lambda11 / (lambda12- lambda11)\n", + "t = p * lambda12 / 2\n", + "print \" Thickness of air film is. \", t,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used 2*t = p*lambda1\n", + " Thickness of air film is. 0.013 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.15 : (Page Number 52)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "mu_oil=1.3#refractive index of oil\n", + "mu_glass=1.5#refractive index of glass\n", + "lambda11=5e-7#wavelength of incident light in cm \n", + "lambda12=7e-7#wavelength of incident light in cm \n", + "print \" Standard formula used 2*mu*t*cos r = (p +0.5)*lambda1 \"\n", + "p= ((lambda12+lambda11)/ (lambda12-lambda11))/2\n", + "t= ((p+0.5)*lambda11)/ (2*mu_oil)*1e10\n", + "x=ceil(t)\n", + "print \" Thickness of oil film is \",round(t,4), \"Angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used 2*mu*t*cos r = (p +0.5)*lambda1 \n", + " Thickness of oil film is 6730.7692 Angstrom.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.16 : (Page Number 53)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "lambda1=5.6e-5#wavelength of incident light in cm \n", + "f=4#focal length in meter\n", + "mu=1.5#refractive index of glass\\\n", + "n=4#order of fringe\n", + "print \" Standard formula used D_n= sqrt(2*(2*n-1)*lambda1*R \"\n", + "R= (mu-1)*2*f\n", + "D_4=sqrt (2*(2*n-1)*lambda1*R*100)\n", + "print \"Diameter of 4th bright fringe is\",D_4,\"cm.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used D_n= sqrt(2*(2*n-1)*lambda1*R \n", + "Diameter of 4th bright fringe is 0.56 cm.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.17 : (Page Number 53)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "D_5=0.336#diameter of fifth ring in cm\n", + "D_15=0.59#diameter of fifteenth ring in cm\n", + "lambda1=5.893e-5#wavelength of incident light in cm \n", + "p=10\n", + "print \" Standard formula used D_(n+p) **2 \u2013 D_n**2 = 4*p*R*lambda1 \"\n", + "r= ((D_15**2-D_5**2)/ (4*p*lambda1))\n", + "print \" Radius of curvature of Plano-convex lens is \",round(r,4),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used D_(n+p) **2 \u2013 D_n**2 = 4*p*R*lambda1 \n", + " Radius of curvature of Plano-convex lens is 99.7811 cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.18a : (Page Number 54)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "D_10=0.5#diameter of 10th dark ring\n", + "lambda1=5.9e-5#wavelength of incident light in cm \n", + "n=10#order of ring \n", + "print \" Standard formula used r_n**2 = n*lambda1*R \"\n", + "r=D_10/2\n", + "R=r**2/ (n*lambda1)/1000\n", + "print \"Radius of curvature is \",round(R,4),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used r_n**2 = n*lambda1*R \n", + "Radius of curvature is 0.1059 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.18b : (Page Number 54)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "lambda1=5.9e-5#wavelength of incident light in cm \n", + "n=10#order of ring \n", + "print \" Standard formula used 2t = n*lambda1 \"\n", + "t=n*lambda1/200\n", + "print \" Thickness of air film is \",t,\"m.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used 2t = n*lambda1 \n", + " Thickness of air film is 2.95e-06 m.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.19 : (Page Number 54)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "mu=4/3\n", + "D_10=0.6#diameter of tenth ring in cm\n", + "lambda1=6.0e-5#wavelength of incident light in cm \n", + "n=10#order of ring \n", + "print \" Standard formula used D_n**2 = 4*n*lambda1*R/mu \"\n", + "R= (mu*D_10**2/ (4*n*lambda1))\n", + "W=ceil(R);\n", + "print \" Radius of curvature of lens is \",W,\"cm.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used D_n**2 = 4*n*lambda1*R/mu \n", + " Radius of curvature of lens is 150.0 cm.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.20 : (Page Number 54)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "grating_element=6000#lines per centimeter\n", + "theta=30#angle of second order spectral line in degree \n", + "n=2#order\n", + "print \" Standard formula used n*lambda1= (a+b)*sin(theta) \"\n", + "lambda1=sin(theta*pi/180)/(grating_element*n)\n", + "print \" Wavelength is \",lambda1,\"cm.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used n*lambda1= (a+b)*sin(theta) \n", + " Wavelength is 4.16666666667e-05 cm.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.21 : (Page Number 55)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#GivenS\n", + "lambda11=6.2e-5# wavelength of monochromatic light in cm\n", + "grating_element= 0.0002# lines per centimeter(1/5000)\n", + "theta11=90# angle of second order spectral line in degree \n", + "print \" Standard formula used n*lambda11= (a+b)*sin(theta11) \"\n", + "n=grating_element/lambda11\n", + "print \" Maximum order n = \",round(n,4),\"may be seen in between the given wavelength spectrum.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used n*lambda11= (a+b)*sin(theta11) \n", + " Maximum order n = 3.2258 may be seen in between the given wavelength spectrum.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.22 : (Page Number 55)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given\n", + "lambda11=5.5e-5# wavelength of monochromatic light in cm\n", + "grating_element=0.00025# lines per centimeter(1/4000)\n", + "n=3# order of spectrum\n", + "print \" Standard formula used n*lambda11= (a+b)*sin(theta11) \"\n", + "sin_theta11=n*lambda11/grating_element\n", + "cos_theta11=sqrt(1-sin_theta11**2)\n", + "disp_pow=n/ (grating_element*cos_theta11)\n", + "print \" Dispersive power is \",round(disp_pow,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used n*lambda11= (a+b)*sin(theta11) \n", + " Dispersive power is 15973.046\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.23a : (Page Number 56)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda111=5.89e-5# wavelength in cm\n", + "lambda112=5.896e-5#wavelength in cm\n", + "n=1# for second order spectrum\n", + "t = 2 # width of detraction grating\n", + "grating_element = 425 # no. of lines per cm\n", + "print \" Standard formula used lambda11 / d_lambda11 = n*N \"\n", + "total_line = t * grating_element\n", + "print \" Total number of lines on diffraction grating is\",total_line, \"So\"\n", + "N=lambda111/ (lambda112-lambda111)/n\n", + "if N > total_line:\n", + " print \" Lines will not be resolved in \",n,\" order .\"\n", + " print \" as\", round(N,4), \" lines are required for diffraction \"\n", + "else: \n", + " print \" as \",round(N,4),\" lines are required for diffraction are. \"\n", + " print \" Lines will be resolved in \",n,\" order\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda11 / d_lambda11 = n*N \n", + " Total number of lines on diffraction grating is 850 So\n", + " Lines will not be resolved in 1 order .\n", + " as 981.6667 lines are required for diffraction \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.23b : (Page Number 56)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda111=5.89e-5# wavelength in cm\n", + "lambda112=5.896e-5#wavelength in cm\n", + "n=2# for second order spectrum\n", + "t = 2 # width of diffraction grating \n", + "grating_element = 425 # no. of lines per cm\n", + "print \" Standard formula used lambda11 / d_lambda11 = n*N \"\n", + "total_line = t * grating_element\n", + "print \" Total number of lines on diffraction grating\",total_line,\", So\"\n", + "N=lambda111/ (lambda112-lambda111)/n\n", + "if N > total_line:\n", + " print \" Lines will not be resolved in\",n,\" order.\"\n", + " print \" as \",round(N,4),\"lines are required for diffraction are \"\n", + "else:\n", + " print \" Lines will be resolved in\",n,\"order\"\n", + " print \" as \",round(N,4),\" lines are required for diffraction are . \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda11 / d_lambda11 = n*N \n", + " Total number of lines on diffraction grating 850 , So\n", + " Lines will be resolved in 2 order\n", + " as 490.8333 lines are required for diffraction are . \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.24 : (Page Number 56)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda111=5.89e-5# wavelength in cm\n", + "lambda112=5.896e-5#wavelength in cm\n", + "t=2.5# width of grating in cm\n", + "n=2# for second order spectrum\n", + "print \" Standard formula used lambda11 / d_lambda11 = n*N \"\n", + "N=lambda111/ (lambda112-lambda111)/n\n", + "grating_element=N/t\n", + "print \" Minimum number of lines required is \",round(grating_element,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda11 / d_lambda11 = n*N \n", + " Minimum number of lines required is 196.3333\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.25 : (Page Number 56)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "a=12e-5# slit width in cm\n", + "lambda111=5.89e-5# wavelength in cm\n", + "lambda112=5.896e-5#wavelength in cm\n", + "n=2# for second order spectrum\n", + "print \" Standard formula used lambda11 / d_lambda11 = n*N \"\n", + "d_lambda11 = lambda112-lambda111\n", + "grating_element= lambda111/ (d_lambda11*n)\n", + "print \" Minimum number of lines required is \", ceil(grating_element)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda11 / d_lambda11 = n*N \n", + " Minimum number of lines required is 491.0\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.26 : (Page Number 57)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "a = 12e-5 # slit width in cm\n", + "lambda11 = 6e-5 # wavelength in cm\n", + "print \" Standard formula used a*sin(theta11) = lambda11 \"\n", + "theta11 = arcsin((lambda11 / a))\n", + "print \" Half angular width of central bright maxima is \",ceil (theta11 * 180 / pi),\" degree .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used a*sin(theta11) = lambda11 \n", + " Half angular width of central bright maxima is 31.0 degree .\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.27 : (Page Number 58)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda111 = 5.9e-5 # wavelength in cm\n", + "lambda112 = 5.896e-5 #wavelength in cm\n", + "lambda11 = 5.89e-5 # wavelength in cm\n", + "grating_element = 4000 # lines per cm\n", + "t = 4 # width of grating in cm\n", + "n = 1 # for first order spectrum\n", + "print \" Standard formula used lambda11 / d_lambda11 = n*N \"\n", + "N = t * grating_element\n", + "Resolv_pow = lambda11 /(lambda112 - lambda11)\n", + "N = Resolv_pow / n\n", + "if grating_element > N: \n", + " print \"Grating will well resolve two spectral lines. \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda11 / d_lambda11 = n*N \n", + "Grating will well resolve two spectral lines. \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.28 : (Page Number 58)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "aperture=6.4e-3# linear aperture in cm\n", + "lambda11=6.24e-5# wavelength in cm\n", + "f=50# separation between lens and screen in cm\n", + "n=1# for first order spectrum\n", + "print \" Standard formula used a*sin(theta11 ) = lambda11 \"\n", + "sin_theta11=n*lambda11/aperture\n", + "d=f*sin_theta11\n", + "print \" Distance between the center and the first fringe is\",ceil((d*100)/100),\" cm. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used a*sin(theta11 ) = lambda11 \n", + " Distance between the center and the first fringe is 1.0 cm. \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.29 : (Page Number 59)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "theta11 = 60 # angle between plane of vibration of incident beam with optic axis\n", + "print \"Standard formula used is I = A**2*cos**2(theta11) \"\n", + "ratio = (tan(theta11*pi /180))**2 # ratio of extraordinary and aordinary intensites\n", + "print \"Ratio of extraordinary and ordinary intensites is \", ratio\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is I = A**2*cos**2(theta11) \n", + "Ratio of extraordinary and ordinary intensites is 3.0\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.30 : (Page Number 59)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "mu_e = 1.553 # refractive index of quartz plate for extra ordinary light\n", + "mu_o = 1.544 # refractive index of quartz plate for ordinary light\n", + "lambda11 = 5.89e-5 # wavelength of light in Angstrom.\n", + "print \"Standard formula used is lambda11= 2t(mu_e-mu_o) \"\n", + "t = lambda11 / (2 * (mu_e - mu_o))\n", + "print \"Thickness of half wave plate of quartz is \",round(t,4),\" cm.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is lambda11= 2t(mu_e-mu_o) \n", + "Thickness of half wave plate of quartz is 0.00327222222222 cm.\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.31 : (Page Number 59)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda1=5e-5# wavelength in cm\n", + "mu_e=1.5533# refractive index for extraordinary light\n", + "mu_o=1.5422# refractive index for ordinary light\n", + "print \" Standard formula used lambda1= 2t (mu_e-mu_o) \"\n", + "t=lambda1/ (2*(mu_e-mu_o)) # calculation of Thickness of half wave plate of quartz\n", + "print \"Thickness of half wave plate of quartz is\",round(t,4),\" cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used lambda1= 2t (mu_e-mu_o) \n", + "Thickness of half wave plate of quartz is 0.0023 cm\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.32 : (Page Number 60)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "lambda1=5.89e-5# wavelength in cm\n", + "rotation=(pi/18)# rotation of plane of polarization in degree per cm\n", + "print \" Standard formula used delta=pi*d*del_mu/lambda1 \"\n", + "del_mu=rotation*lambda1/ (pi)\n", + "print \"Difference in refractive indices of substance is\",round(del_mu,6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used delta=pi*d*del_mu/lambda1 \n", + "Difference in refractive indices of substance is 3e-06\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.33 : (Page Number 60)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "rotation=13.2# in degree\n", + "conc=0.1# gram per cubic cm\n", + "l=2# length of tube in dm\n", + "print \" Standard formula used delta=pi*d*del_mu/lambda1 \"\n", + "s= (rotation*(pi/180))/ (l*conc)\n", + "specific_rotation=s*180/pi\n", + "print \"Specific rotation of sample is \",specific_rotation,\"degree.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used delta=pi*d*del_mu/lambda1 \n", + "Specific rotation of sample is 66.0 degree.\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter2.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter2.ipynb new file mode 100755 index 00000000..599bee75 --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter2.ipynb @@ -0,0 +1,449 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:e947beb3ffb405c3d0892bb10c6aab85cb0a3dce379086da0969a259c86de015" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : ELECTROMAGNETIC WAVES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3 : (Page Number 80)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "I = 2.4 # intensity of radiation in Watt per meter square\n", + "epsilon1_0 = 8.85e-12\n", + "c = 3e8\n", + "E = sqrt ((2* I)/ (c * epsilon1_0)) # calculation of amplitude of electric field is\n", + "print \"Amplitude of electric field is \",round(E,4),\" N/C \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude of electric field is 42.5195 N/C \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4 : (Page Number 80)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "l = 75 # length of laser beam in cm\n", + "power = 6e-3 # power of beam in mW\n", + "c = 3e8\n", + "t = l / ( c * 100) #calculation of time taken to cover distance\n", + "U = power/1000 * t#calculation of Energy stored in given length\n", + "print \"Energy stored in given length is \",U,\" J \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy stored in given length is 1.5e-14 J \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.6 : (Page Number 81)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "E_0 = 300 # maximum electric field in electromagnetic wave in w/m\n", + "v = 2e8 # speed of moving electron in m/s along y - axis\n", + "c = 3e8 # speed of light in m/s\n", + "q = 1.6e-19 # charge on electron in coulomb\n", + "B_0 = E_0 / c # calculation of magnitude of maximum magnetic field\n", + "F_e = q*E_0 # calculation of electromagnetic force on electron in N\n", + "F_b = q*v*B_0 # calculation of magnetic force on electron in N\n", + "print \"The maximum electric force on electron is \",F_e,\" N along y -axis \"\n", + "print \"The maximum magnetic force on electron is \",F_b,\" N along z - axis \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum electric force on electron is 4.8e-17 N along y -axis \n", + "The maximum magnetic force on electron is 3.2e-17 N along z - axis \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.7 : (Page Number 82)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "d = 1.5e11 # separation between earth and sun in meter\n", + "power_sun = 3.8e26# power radiated by sun in W\n", + "c = 3e8\n", + "s = power_sun /(4 * pi * (d**2)) #calculation of Energy received per unit surface area per unit time\n", + "p = s / c # calculation of Pressure applied by sun radiations on earth\n", + "print \"Energy received per unit surface area per unit time is \",s,\"\"\n", + "print \" Pressure applied by sun radiations on earth is \",p,\" N/m**2 \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy received per unit surface area per unit time is 1343.975075 \n", + " Pressure applied by sun radiations on earth is 4.47991691666e-06 N/m**2 \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.8 : (Page Number 83)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "E = 100 # magnitude of electric field perpendicular to X axis in N/C\n", + "r = 10 # radius of circle in cm\n", + "ds = (r*1e-2)**2 #calculation of area of coil\n", + "phi1 = E*ds #calculation of Flux through coil\n", + "print \"Flux through coil is \",phi1,\" Nm/C \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux through coil is 1.0 Nm/C \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.9 : (Page Number 84)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "sigma1 = 2e-6 # surface charge density in c/m**2 on XY plane\n", + "theta1 = 60 # angle between normal and X axis on degree\n", + "r = 10 # radius of circle in cm\n", + "epsilon1_0 = 8.85e-12 # permitivity of free space\n", + "print \"standard formula used phi1 = sigma1*A*cos(theta1)/(2*epsilon1_0) \"\n", + "phi1 = sigma1* pi*(r*1e-2)**2 * cos (theta1*pi/180) / (2*epsilon1_0) #calculation of Flux through coil\n", + "print \"Flux through coil is \",round(phi1,4),\" Nm**2/C. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "standard formula used phi1 = sigma1*A*cos(theta1)/(2*epsilon1_0) \n", + "Flux through coil is 1774.9111 Nm**2/C. \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.10 : (Page Number 84)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "A = 200 # magnitude of electric field in V/m**2\n", + "epsilon1_0 = 8.85e-12 # permittivity of free space\n", + "a = 20 # radius of sphere in cm\n", + "q = 4*pi * epsilon1_0*A*(a*1e-2)**3 #calculation of Charge contained in sphere\n", + "print \"Charge contained in sphere is \",q,\" C. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge contained in sphere is 1.77939807899e-10 C. \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.11 : (Page Number 84)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "B = 0.2 # magnetic field in T\n", + "del_r = 1 # rate of change of decrement in loop radius in cm/s\n", + "r = 20 # radius of frame in cm\n", + "R = 10 # resistance of frame in m ohm\n", + "e = 2* pi * B *r *1e-2* del_r*1e-2 # magnitude of emf induced in coil\n", + "i = (e) / (R*1e-3) #calculation of Current induced due to changing magnetic field\n", + "print \"Current induced due to changing magnetic field is \",round(i,4),\" A \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current induced due to changing magnetic field is 0.2513 A \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.12 : (Page Number 85)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "phi1 = 0.02 # rate of change of magnetic field in T/s\n", + "r = 2 # radius of frame in cm\n", + "R = 2 # resistance of frame in m ohm\n", + "a = pi * (r*1e-2)**2\n", + "e = a * phi1 # magnitude of emf induced in coil\n", + "i = (e) / (R*1e-3) \n", + "print \"Current induced due to changing magnetic field is \",round(i*1000,4),\" mA \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current induced due to changing magnetic field is 12.5664 mA \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.13 : (Page Number 86)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "r = 7e8 # radius sun in meter\n", + "power_sun = 3.8e26# power radiated by sun in W\n", + "s = power_sun /(4 * pi * (r**2)) #calculation of Pressure applied by sun radiations on earth\n", + "print \"Pressure applied by sun radiations on earth is \",s,\" W/m**2 \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure applied by sun radiations on earth is 61713141.1989 W/m**2 \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.14 : (Page Number 86)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "solar_const = 2 # energy received by earth from sun in Cal/min cm2\n", + "mu_not = 1.2566e-6 # universal constant\n", + "epsilon1_not = 8.85e-12 # universal constant\n", + "ratio = sqrt(mu_not / epsilon1_not) # constant\n", + "E = sqrt (ratio *4.2 * solar_const / 6e-3) \n", + "E_not = E * sqrt(2) #calculation of Amplitude of electric vectors\n", + "H_not = E_not / ratio#calculation of Amplitude of magnetic vectors\n", + "print \"Amplitude of electrical and magnetic vectors are given as \",round(E_not,4),\" V/m and \",round(H_not,4),\" A/m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude of electrical and magnetic vectors are given as 1027.1703 V/m and 2.7259 A/m\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.15 : (Page Number 87)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given That\n", + "r = 1 # distance from lamp in meter\n", + "power = 100# power radiated by lamp in W\n", + "mu_not = 1.2566e-6 # universal constant\n", + "epsilon1_not = 8.85e-12 # universal constant\n", + "s = power /(4 * pi * (r**2)) #calculation of intensity at a distance\n", + "ratio = sqrt(mu_not / epsilon1_not) #calculation of a constant\n", + "E = sqrt (ratio * s) #calculation of Average value of intensity of electric field\n", + "print \"Average value of intensity of electric field is \",round(E,4),\" V/m \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average value of intensity of electric field is 54.7594 V/m \n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter3.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter3.ipynb new file mode 100755 index 00000000..3f9cafdb --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter3.ipynb @@ -0,0 +1,958 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:298577a77052f52e0ce70fb27b3579d87d3fedef0cd6a87e444fd7a59a204e46" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 3 : DUAL NATURE OF LIGHT" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.1 : (Page Number 135)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 6.6e-34 # plank's constant\n", + "nu = 2e15 # frequency in Hz\n", + "phi1 = 6.72e-19\n", + "m = 9e-31\n", + "print \"Standard formula Used ( 1/2)*m*v**2 = h*nu - phi1\"\n", + "v = math.sqrt((h * nu)/ m ) #calculation of maximum velocity of photoelectron\n", + "print \" Maximum velocity of photoelectron can be \",v,\" m/s.. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula Used ( 1/2)*m*v**2 = h*nu - phi1\n", + " Maximum velocity of photoelectron can be 1211060.14164 m/s.. \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.2 : (Page Number 135)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 6.6e-34 # plank's constant\n", + "lambda1_threshold = 2.4e-7 # threshold wavelength in cm\n", + "lambda1 = 2e-7 # wavelength of irradicated light in photo emmission\n", + "c = 3e8\n", + "print \" Standard formula Used E = h * (nu1 \u2013 nu2)\"\n", + "E = h * c * ((lambda1_threshold - lambda1)/(lambda1 *lambda1_threshold))/1.6e-19 # calculation of nergy of photoelectrons\n", + "print \" Energy of photoelectrons emitted is \",E,\" eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used E = h * (nu1 \u2013 nu2)\n", + " Energy of photoelectrons emitted is 1.03125 eV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.3 : (Page Number 136)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "applied_voltage = 4e4 # in volt\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "e = 1.6e-19 # charge on electron\n", + "print \" Standard formula Used E = h*c/lambda1\"\n", + "lambda1 = h * c / ( e * applied_voltage) *1e10 #calculation of Shortest wavelength emitted\n", + "print \" Shortest wavelength emitted is \",lambda1,\" Angstrom.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used E = h*c/lambda1\n", + " Shortest wavelength emitted is 0.3105 Angstrom.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.4 : (Page Number 136)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "E = 1e3 # energy of moving electron in eV\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "e = 1.6e-19 # charge on electron\n", + "m_e = 9.1e-31\n", + "print \" Standard formula Used E =(1/2)*m *v**2\"\n", + "v = math.sqrt(2 * E * 1.6e-19/ m_e) #calculation of Velocity of moving electron\n", + "print \" Velocity of moving electron is \",v,\" m/s.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used E =(1/2)*m *v**2\n", + " Velocity of moving electron is 18752289.2375 m/s.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.5 : (Page Number 137)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "phi1 = 6 # work function in eV\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "e = 1.6e-19 # charge on electron\n", + "m_e = 9.1e-31\n", + "print \" Standard formula Used phi1 = h * nu\"\n", + "lambda1 = h * c / (phi1 * e) * 1e10 #calculation of Longest wavelength to eject electron\n", + "print \" Longest wavelength to eject electron is \",lambda1,\" Angstroms. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used phi1 = h * nu\n", + " Longest wavelength to eject electron is 2070.0 Angstroms. \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.6 : (Page Number 137)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "pi = 3.14\n", + "theta1 =pi/2 # scattering angle of photon\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "e = 1.6e-19 # charge on electron in coloumb\n", + "m_e = 9.1e-31 # mass of electron in kg\n", + "print \" Standard formula Used delta_lambda1 = h * (1 - cos (theta1 )) / ( m_e * c)\"\n", + "delta_lambda1 = h * (1 - math.cos(theta1 )) /( m_e * c) #calculation of Change in wavelength of electron\n", + "print \" Change in wavelength of electron is \",round(delta_lambda1*1e10,4),\" Angstrom. \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_lambda1 = h * (1 - cos (theta1 )) / ( m_e * c)\n", + " Change in wavelength of electron is 0.0242 Angstrom. \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.7 : (Page Number 137)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "angle = pi/2 # scattering angle of photon\n", + "h = 6.624e-34 # plank's constant\n", + "v = 2e6 # speed of particle\n", + "e = 1.6e-19 # charge on electron\n", + "m = 1e-3 # mass of particle in kg\n", + "print \" Standard formula Used lambda1 = h / (m * v)\"\n", + "lambda1 = h / (m * v) #calculation of de Broglie wavelength of particle\n", + "print \" de Broglie wavelength of particle is \",lambda1,\" m.\" \n", + "print \" Here the de Broglie wavelength is too small to be detected. This wavelength is far smaller than the wavelength of X ray. Hence diffraction experiment with such a stream of particle will not be successful.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used lambda1 = h / (m * v)\n", + " de Broglie wavelength of particle is 3.312e-37 m.\n", + " Here the de Broglie wavelength is too small to be detected. This wavelength is far smaller than the wavelength of X ray. Hence diffraction experiment with such a stream of particle will not be successful.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.8a : (Page Number 138)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda1 = 4.3e-7 # wavelength of light in meter\n", + "phi1_Ni = 5 # work function of nickel in eV\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "m_e = 9.1e-31 # mass of electron in kg\n", + "lambda1_threshold = h * c / (phi1_Ni*1e-19) #calculation of longest wavelength required\n", + "if lambda1_threshold < lambda1:\n", + " print \" As the threshold wavelength is less than wavelength of incident radiation So electron will not be ejected \"\n", + "else:\n", + " v = math.sqrt((2*h*c*(lambda1-lambda1_threshold))/(m*lambda1_threshold*lambda1)) #calculation of ejected velocity Electron\n", + " print \" As the threshold wavelength is greater than wavelength of incident radiation So electron will be ejected with velocity \",v,\". \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " As the threshold wavelength is less than wavelength of incident radiation So electron will not be ejected \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.8b : (Page Number 138)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda1 = 4.3e-7 # wavelength of light in meter\n", + "phi1_K = 2.3 # work function of nickel in eV\n", + "h = 6.624e-34 # plank's constant\n", + "c = 3e8 # speed of light\n", + "m_e = 9.1e-31 # mass of electron in kg\n", + "lambda1_threshold = h * c / (phi1_K *1.6e-19) #calculation of longest wavelength required\n", + "if lambda1_threshold < lambda1:\n", + " print \"As the threshold wavelength is less than wavelength of incident radiation Solectron will not be ejected \"\n", + "else:\n", + " v = math.sqrt((2* h * c *( lambda1_threshold - lambda1)) / (m_e * lambda1_threshold * lambda1 )) #calculation of ejected velocity Electron\n", + " print \" As the threshold wavelength is greater than wavelength of incident radiation So electron will be ejected with velocity \",v,\" m/s. \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " As the threshold wavelength is greater than wavelength of incident radiation So electron will be ejected with velocity 454862.700897 m/s. \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.9 : (Page Number 139)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "d = 3.04 # inter layer separation in Angstrom\n", + "theta1 = 14.7 # in degree\n", + "n = 2 # order of brags reflection\n", + "print \" Standard formula Used 2 * d * sin(theta1) = n * lambda1\"\n", + "lambda1 = 2 * d * math.sin( theta1 * (pi /180))/ n #calculation of wavelength making second order Braggs reflection\n", + "print \" Second order brags reflection occurs at \",theta1,\" degree for the wavelength \",lambda1,\" Angstrom \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used 2 * d * sin(theta1) = n * lambda1\n", + " Second order brags reflection occurs at 14.7 degree for the wavelength 0.771041684638 Angstrom \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.10a : (Page Number 139)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda1 = 0.52 # wavelength in angstrom\n", + "theta1 = 5 # in degree\n", + "n = 1 # order of brags reflection\n", + "print \" Standard formula Used 2 * d * sin(theta1) = n * lambda1 \"\n", + "d = n * lambda1 / (2 * math.sin (theta1 * pi / 180))\n", + " #calculation of separation between adjacent layers of crystals\n", + "print \" Separation between adjacent layers of crystals is \",d,\" angstrom. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used 2 * d * sin(theta1) = n * lambda1 \n", + " Separation between adjacent layers of crystals is 2.98467470674 angstrom. \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.10b : (Page Number 139)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "n = 2 # order \n", + "lambda1 = 5.2e-11 # wavelength in Angstrom \n", + "d = 2.98e-10 # interatomic separation in Angstrom\n", + "print \" Standard formula Used 2 * d * sin(theta1) = n * lambda1 \"\n", + "theta1_rad = math.asin ( (n * lambda1) / ( 2 * d)) #calculation of angle for secondary maxima in radian\n", + "theta1_deg = theta1_rad * 180 / pi #calculation of angle for secondary maxima in degree\n", + "print \" Angle for secondary maxima is \",theta1_deg,\". \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used 2 * d * sin(theta1) = n * lambda1 \n", + " Angle for secondary maxima is 10.0544644405 . \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.11 : (Page Number 140)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "nu = 3.2e19 # frequency in hartz\n", + "theta1 = 90 # angle of scattered photon in degree\n", + "m_e = 9.1e-31 # mass of electron in Kg\n", + "c = 3e8 # speed of light in m/s\n", + "h = 6.626e-34 # plank's constant\n", + "print \" Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\"\n", + "lambda1 = c / nu #calculation of incident wavelength\n", + "lambda1_shift = h *(1 - math.cos(theta1 * pi / 180))/ ( m_e * c) #calculation of shift in wavelength\n", + "lambda11 = lambda1 + lambda1_shift #calculation of wavelength of scattered photon\n", + "nu1 = c / lambda11 #calculation of Frequency after scattering \n", + "print \" Frequency after scattering is \",nu1,\" Hz. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\n", + " Frequency after scattering is 2.54233550954e+19 Hz. \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.12 : (Page Number 140)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "r = 1e-14 # radius of nucleus of atom in meter\n", + "h = 6.626e-34 # Plank's constant\n", + "print \" Standard formula Used delta_p * delta_x >= h /(2*pi)\"\n", + "del_x = 2 * r #calculation of Uncertainty in position\n", + "del_p = h / (2 * pi * del_x) #calculation of Uncertainty in momentum\n", + "print \" Uncertainty in momentum is \",del_p,\" Kg-m/s. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_p * delta_x >= h /(2*pi)\n", + " Uncertainty in momentum is 5.27547770701e-21 Kg-m/s. \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.13 : (Page Number 140)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "v = 300 # speed of electron in m/s\n", + "accuracy = 1e-4 # accuracy in speed\n", + "h = 6.6e-34 # Plank's constant\n", + "m_e = 9.1e-31 # mass of electron in Kg\n", + "print \" Standard formula Used delta_p * delta_x >= h /(2*pi)\"\n", + "del_p = accuracy * m_e * v #calculation of Uncertainty in momentum\n", + "del_x = h / (4 * pi * del_p) #calculation of Uncertainty in position\n", + "print \" Uncertainty in position of electron is \",del_x*1000,\" mm. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_p * delta_x >= h /(2*pi)\n", + " Uncertainty in position of electron is 1.92482676559 mm. \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.14 : (Page Number 141)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda11 = 6560 # wavelength in Angstrom\n", + "n1 = 1 # transition state no\n", + "n2 = 2 # transition state no\n", + "n3 = 3 # transition state no.\n", + "print \" Standard formula Used For Balmer Series 1/lambda1 = R*(1-(1/n)**2) For Lyman series 1/lambda1 = R*((1/2)**2 -(1/n)**2)\"\n", + "lambda12 = (n2**2 * n1**2) *(n3**2 - n2**2) /( (n2**2 - n1**2) * (n3**2 * n2**2)) * lambda11 #calculation of Wavelength of first line of Lyman series\n", + "print \" Wavelength of first line of Lyman series is \",lambda12,\" Angstrom. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used For Balmer Series 1/lambda1 = R*(1-(1/n)**2) For Lyman series 1/lambda1 = R*((1/2)**2 -(1/n)**2)\n", + " Wavelength of first line of Lyman series is 0 Angstrom. \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.15 : (Page Number 142)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "m = 2e-3 # mass of linear harmonic oscillator in kg\n", + "k = 100 # spring constant in N/m\n", + "h = 6.6e-34 # Plank's constant \n", + "print \" Standard formula Used f = math.sqrt(k / m ) U = 1/2* h * nu \"\n", + "nu1 = math.sqrt(k / m ) / (2 * pi) #calculation of frequency of linear harmonic oscillator\n", + "U = 1/2* h * nu1 #calculation of Zero point energy of a linear harmonic oscillator \n", + "print \" Zero point energy of a linear harmonic oscillator is \",U,\" J.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used f = math.sqrt(k / m ) U = 1/2* h * nu \n", + " Zero point energy of a linear harmonic oscillator is 0.0 J.\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.16a : (Page Number 142)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R = 1.097 # Rydberg\u2019s constant\n", + "n1 = 1 # transition state no\n", + "n2 = 2 # transition state no\n", + "print \" Standard formula Used For Lyman series 1/lambda1 = R*((1/2) **2 - (1/n) **2)\"\n", + "nu1 = R * (n2**2 - n1**2) / (n1**2 * n2**2) #calculation of frequency of first line of Lyman series\n", + "lambda11 = 1/ nu1 #calculation of Wavelength of first line of Lyman series\n", + "print \" Wavelength of first line of Lyman series is \",lambda11 *1000,\" Angstrom. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used For Lyman series 1/lambda1 = R*((1/2) **2 - (1/n) **2)\n", + " Wavelength of first line of Lyman series is 1215.43603768 Angstrom. \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.16b : (Page Number 142)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R = 1.097 # Rydberg\u2019s constant\n", + "n1 = 1 # transition state no\n", + "n2 = 3 # transition state no\n", + "print \" Standard formula Used For Lyman series 1/lambda1 = R*((1/2)**2 -(1/n)**2)\"\n", + "nu1 = R * (n2**2 - n1**2) / (n1**2 * n2**2) #calculation of frequency of first line of Lyman series\n", + "lambda11 = 1/ nu1 #calculation of Wavelength of first line of Lyman series\n", + "print \" Wavelength of second line of Lyman series is \",lambda11 *1000 ,\" Angstrom. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used For Lyman series 1/lambda1 = R*((1/2)**2 -(1/n)**2)\n", + " Wavelength of second line of Lyman series is 1025.52415679 Angstrom. \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.17 : (Page Number 143)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda11 = 4700 # wavelength in Angstrom\n", + "lambda12 = 1.4e-5 #wavelength in cm \n", + "temp1 = 6174 # temperature of a black of in kelvin\n", + "print \" Standard formula Used lambda1 * T = constant\"\n", + "temp2 = lambda11 * temp1 / (lambda12 * 1e8) #calculation of temperature\n", + "print \" Blackbody will emit wavelength 1.4e-5 cm at \",temp2,\" K.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used lambda1 * T = constant\n", + " Blackbody will emit wavelength 1.4e-5 cm at 20727.0 K.\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.19a : (Page Number 144)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda1 = 1 # wavelength in Angstrom\n", + "theta1 = 90 # angle of scattered photon in degree\n", + "m_e = 9.11e-31 # mass of electron in Kg\n", + "c = 3e8 # speed of light in m/s\n", + "h = 6.63e-34 # plank's constant\n", + "print \" Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\"\n", + "lambda1_shift = h *(1 - math.cos(theta1 * pi / 180))/ ( m_e * c) #calculation of Change in frequency \n", + "print \" Change in frequency is \",round(lambda1_shift * 1e10,4),\" Hz. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\n", + " Change in frequency is 0.0242 Hz. \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.19b : (Page Number 144)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda11 = 1 # wavelength in Angstrom\n", + "lambda12 = 1.0243 # wavelength in Angstrom\n", + "c = 3e8 # speed of light in m/s\n", + "h = 6.63e-34 # plank's constant\n", + "print \" Standard formula Used E= h *(nu1 \u2013 nu2)\"\n", + "K = h * c * (( lambda12 - lambda11 )/ (lambda11 * lambda12 )) *(10e9 / 1.6e-19) #calculation of Kinetic energy imparted to recoiling\n", + "print \" Kinetic energy imparted to recoiling electron is \",round(K,4),\" eV.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used E= h *(nu1 \u2013 nu2)\n", + " Kinetic energy imparted to recoiling electron is 294.913 eV.\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.20 : (Page Number 145)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "theta1 = 90 # angle of scattered photon in degree\n", + "E_rest = 938.3 # rest mass energy of a proton in MeV\n", + "E = 12 # energy of scattered proton in Mev\n", + "c = 3e8 # speed of light in m/s\n", + "h = 6.63e-34 # plank's constant\n", + "print \" Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\"\n", + "lambda1 = h * c / ( E * 1.6e-13) #calculation of incident wavelength\n", + "lambda11 = lambda1 + h * c / (E_rest * 1.6e-13) #calculation of wavelength of scattered photon\n", + "print \" wavelength of scattered photon is \",round(lambda11 * 1e10,4),\" Angstrom. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used delta_lambda1 = h * (1 - math.cos (theta1 )) / ( m_e * c)\n", + " wavelength of scattered photon is 0.001 Angstrom. \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.21 : (Page Number 146)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "lambda11 = 1.321 # wavelength of L- alpha line for platinum\n", + "lambda12 = 4.174 # wavelength of l - alpha line of unknown substance \n", + "z1= 78 # atomic number of platinum\n", + "c = 3e8 # speed of light in m/s\n", + "b = 7.4 # constant for L - alpha line\n", + "print \" Standard formula Used math.sqrt(nu1)= a*(Z-b)\"\n", + "z2 = b + (z1 - b) * math.sqrt(lambda11 / lambda12) #calculation of the unknown substance has atomic number\n", + "print\" The unknown substance has atomic number \",round(z2,4),\". \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used math.sqrt(nu1)= a*(Z-b)\n", + " The unknown substance has atomic number 47.1173 . \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.22 : (Page Number 146)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 6.6e-34 # plank's constant\n", + "m_e = 9.1e-31 # mass of electron in kg\n", + "L = 1e-10 # length of box of particle in m\n", + "print \" Standard formula Used E= h**2 * (n_x**2+n_y**2+n_z**2) / (8*m*L**2)\"\n", + "sum = 0 \n", + "n_y = 1\n", + "for n_x in range(1,3):\n", + " for n_z in range(1,2):\n", + " sum = n_x+n_y+n_z\n", + " if sum<6:\n", + " E = h**2 * (n_x**2+n_y**2+n_z**2)/ (1.6e-19*8*m_e*L**2) # calculation of energy\n", + " print \" E\",n_x,\"\",n_y,\"\",n_z,\" is \",round(E,4),\" eV. \"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula Used E= h**2 * (n_x**2+n_y**2+n_z**2) / (8*m*L**2)\n", + " E 1 1 1 is 112.1909 eV. \n", + " E 2 1 1 is 224.3819 eV. \n" + ] + } + ], + "prompt_number": 59 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter4.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter4.ipynb new file mode 100755 index 00000000..c34d1e8b --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter4.ipynb @@ -0,0 +1,336 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:f8e371890eb406aafac15ba8670d03c8a3095e6b35699d2159ffa08e7f4ec7d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 4 : FRAME OF REFERNCE " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.1 : (Page Number 176)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "F = [2.5,4.5,-5] # F is a force vector act through origin\n", + "F_magnitude = math.sqrt ( 2.5**2 + 4.5**2 + (-5)**2)\n", + "theta1_x = (180 / pi ) * math.acos ( 2.5 / F_magnitude)\n", + "theta1_y = (180 / pi ) * math.acos ( 4.5 / F_magnitude)\n", + "theta1_z = (180 / pi ) * math.acos ( -5 / F_magnitude)\n", + "print \" Magnitude of force F is \",round(F_magnitude,4),\" N\"\n", + "print \" Angle made with X - axis is \",round(theta1_x,4),\" degree\"\n", + "print \" Angle made with Y - axis is \",round(theta1_y,4),\" degree\"\n", + "print \" Angle made with Z - axis is \",round(theta1_z,4),\" degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Magnitude of force F is 7.1764 N\n", + " Angle made with X - axis is 69.6479 degree\n", + " Angle made with Y - axis is 51.1924 degree\n", + " Angle made with Z - axis is 134.2335 degree\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.2a : (Page Number 176)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "r = [2,2,2*math.sqrt(2)]\n", + "r_magnitude = math.sqrt ( 2**2 + 2**2 + (2*math.sqrt(2))**2)\n", + "math.cos_x = ( 2 / r_magnitude)\n", + "math.cos_y = ( 2 / r_magnitude)\n", + "math.cos_z = ( 2.8284 / r_magnitude)\n", + "print \" Directional math.comath.sine in X - axis is \",math.cos_x,\" \" \n", + "print \" Directional math.comath.sine in Y - axis is \",math.cos_y,\" \"\n", + "print \" Directional math.comath.sine in Z - axis is \",math.cos_z,\" \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Directional math.comath.sine in X - axis is 0.5 \n", + " Directional math.comath.sine in Y - axis is 0.5 \n", + " Directional math.comath.sine in Z - axis is 0.7071 \n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.2b : (Page Number 176)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "r_xz = [2,2.8282]\n", + "r_xz = math.sqrt (2**2 + (2.8282)**2)\n", + "r_yz = math.sqrt (2**2 + (2.8282)**2)\n", + "print \" Projection of vector r in xz plane is \",round(r_xz,4),\"\"\n", + "print \" projection of vector r in yz plane is \",round(r_yz,4),\"\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Projection of vector r in xz plane is 3.4639 \n", + " projection of vector r in yz plane is 3.4639 \n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.4 : (Page Number 177)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "v_w_x = 40 * math.cos(45 * pi / 180) # x component of wind blow in miles/h\n", + "v_w_y = 40 * math.sin(45 * pi /180) # y component of wind blow in miles/h\n", + "r_x = 200 # distance of destination point in x direction in miles\n", + "r_y = 0 # distance of destination point in y direction in miles\n", + "t = 40 # time taken by aeroplane to reach destination in minutes\n", + "print \"Standard formula used is V = V1 + V2 + .....+ V_n \"\n", + "v_x = (r_x)/t *60 # x - component of velocity required to reach destination in time in miles/h\n", + "v_y = r_y /t *60 # x - component of velocity required to reach destination in time in miles/h \n", + "v_p_x = v_x - v_w_x # x component of aeroplane velocity in miles/h\n", + "v_p_y = v_y - v_w_y # y component of aeroplane velocity in miles/h\n", + "print \"Vector of velocity of pilot with respect to moving air is \",round(v_p_x,4),\" +i \",round(v_p_y,4),\"j miles/h where i and j stands for east and north respectively \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is V = V1 + V2 + .....+ V_n \n", + "Vector of velocity of pilot with respect to moving air is 271.7045 +i -28.273 j miles/h where i and j stands for east and north respectively \n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.5 : (Page Number 178)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R_e = 6.4e6 # radius of earth in m\n", + "T = 8.64e4 # time period of one rotation of earth\n", + "theta1_pole = 90 # angle between pole and rotational axis \n", + "theta1_equator = 0 # angle between equator and rotational axis \n", + "g_pole = 9.8 # gravitational acceleration at pole in m/s**2\n", + "print \"Standard formula used is g1 = g - R_e*f**2*(math.cos(theta1))**2 \"\n", + "f = 2 * pi / T # rotational frequency of earth\n", + "g_equator = g_pole - R_e * f**2\n", + "del_g = g_pole - g_equator\n", + "print \"Difference in gravitational acceleration at pole and equator is \",round(del_g,4),\" m/s^2 \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is g1 = g - R_e*f**2*(math.cos(theta1))**2 \n", + "Difference in gravitational acceleration at pole and equator is 0.0338 m/s^2 \n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.6 : (Page Number 178)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R_e = 6.4e6 # radius of earth in m\n", + "theta1_pole = 90 # angle between pole and rotational axis \n", + "theta1_equator = 0 # angle between equator and rotational axis \n", + "g_pole = 10 # gravitational acceleration at pole in m/s**2\n", + "g_equator = 0 # gravitational acceleration at equator in m/s**2\n", + "print \"Standard formula used is g1 = g - R_e*f**2*(math.cos(theta1))**2 \"\n", + "f = math.sqrt (g_pole / R_e)\n", + "T = 2 * pi / f / 3.6e3\n", + "print \"Angular velocity of Earth will be \",f,\" rad/s Time period would be \",round(T,4),\" hours\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used is g1 = g - R_e*f**2*(math.cos(theta1))**2 \n", + "Angular velocity of Earth will be 0.00125 rad/s Time period would be 1.3956 hours\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.7 : (Page Number 179)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "g_pole = 9.8 # gravitational acceleration at pole\n", + "m = 1 # mass of substance in kg\n", + "R_e = 6.4e6 # radius of earth in m\n", + "print \"Standard formula used is coriolis force = -2*m*f x v \"\n", + "g_equator = 0.75 *g_pole # gravitational acceleration at equator in m/s**2\n", + "f = math.sqrt ((g_pole - g_equator)/ R_e)\n", + "print \"Angular velocity of Earth will be \",round(f,4),\" rad/s . \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is coriolis force = -2*m*f x v \n", + "Angular velocity of Earth will be 0.0006 rad/s . \n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 4.8 : (Page Number 180)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "m = 1 # mass of particle in kg\n", + "theta1 = 30 # latitude position in degree\n", + "v = 0.5 # velocity of particle in km/s in north direction\n", + "print \"Standard formula used is coriolis Force = 2*mass*angular velocity X velocity \"\n", + "f_x = -2*m*2*pi * v*1000*(-1)*math.sin(theta1*pi/180)/86400 # coriolis force in east direction\n", + "f_z = -2*m*2*pi * v*1000*math.cos(theta1*pi/180)/86400 # coriolis force in verticle direction\n", + "F = math.sqrt(f_x**2+f_z**2)\n", + "alpha1 = -(math.atan(f_z/f_x)) *180 /pi\n", + "print \"Magnitude and direction of coriolis force on particle are \",round(F,4),\" N and \",round(alpha1,4),\" degree with east respectively\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is coriolis Force = 2*mass*angular velocity X velocity \n", + "Magnitude and direction of coriolis force on particle are 0.0727 N and 60.0456 degree with east respectively\n" + ] + } + ], + "prompt_number": 98 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter6.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter6.ipynb new file mode 100755 index 00000000..43d54ef9 --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter6.ipynb @@ -0,0 +1,1060 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:793b50b951bc2494d178bb955682b2d6da29e9b14f958e845f1a4cd1f91cc684" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 6 : RELATIVISTIC KINEMATICS AND PARADOXES IN RELATIVITY" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.1 : (Page Number 221)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.8* c # velocity of rod\n", + "l1 = 1 # let \n", + "theta1 = 60 # anlge between length of rod and speed in degree\n", + "l_x = l1 * math.cos(theta1 * pi /180) * math.sqrt (1-(v /c)**2)\n", + "l_y = l1 * math.sin(theta1 * pi /180)\n", + "l2 = math.sqrt (l_x**2 + l_y**2)\n", + "per_contrtaction = (l1 - l2) / l1 *100\n", + "angle = math.atan (l_y/l_x)\n", + "print \"Percentage contraction in rod is \",round(per_contrtaction,4),\" and apparant orientation is \",round(math.tan(angle),4),\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage contraction in rod is 8.3645 and apparant orientation is 2.8832 \n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.2 : (Page Number 222)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "u_x_ = -3e8 # velocity of first photon in ground frame in m/s\n", + "v = -3e8 # velocity of second photon in ground frame in m/s\n", + "print \"Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) \"\n", + "u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon with respect to another\n", + "print \"Velocity of photon with respect to another is \",(u_x / c),\" * c Thus photons are approaching each other.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) \n", + "Velocity of photon with respect to another is -1.0 * c Thus photons are approaching each other.\n" + ] + } + ], + "prompt_number": 108 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.3 : (Page Number 222)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "u_x_ = -0.9 * c # velocity of first spaceship in ground frame in m/s\n", + "v = -0.9 *c # velocity of second spaceship in ground frame in m/s\n", + "print \"Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) \"\n", + "u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon\n", + "print \"Velocity of photon with respect to another is \",round(u_x / c,4),\" c.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used is u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) \n", + "Velocity of photon with respect to another is -0.9945 c.\n" + ] + } + ], + "prompt_number": 111 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.4 : (Page Number 223)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "E = 7.5e11 # Energy in kWh\n", + "c = 3e8 # speed of light in m/s\n", + "print \" Standard formula used E = m*c**2\"\n", + "m = (E *3.6e6) / c**2 # calculation of Amount of mass consumed\n", + "print \" Amount of mass consumed is \",m,\" kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Amount of mass consumed is 30.0 kg.\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.5 : (Page Number 223)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "m = 4 # mass of substance consumed fully in kg\n", + "c = 3e8 # speed of light in m/s\n", + "print \" Standard formula used E = m*c**2\"\n", + "E = m * c**2 # calculation of Amount of energy produced\n", + "print \" Amount of energy produced is \",E,\" J.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Amount of energy produced is 3.6e+17 J.\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.6 : (Page Number 223)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "m_0 = 1e-24 # mass of moving particle in kg\n", + "v = 1.8e8 # speed of particle in m/s\n", + "c = 3e8 # speed of light in m/s\n", + "print \" Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\"\n", + "m = m_0 / math.sqrt(1 - (v / c)**2) # calculation of Relativistic mass of particle\n", + "print \" Relativistic mass of particle is \",m,\" kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\n", + " Relativistic mass of particle is 1.25e-24 kg.\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.7 : (Page Number 223)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.5 * c # speed of particle in m/s\n", + "\n", + "print \" Standard formula used m = m_o/math.sqrt ( 1- (v/c)**2)\"\n", + "ratio = math.sqrt(1- (v /c)**2) # calculation of Ratio of rest mass and relativistic mass of particle\n", + "print \" Ratio of rest mass and relativistic mass of particle is \",round(ratio,4),\".\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o/math.sqrt ( 1- (v/c)**2)\n", + " Ratio of rest mass and relativistic mass of particle is 0.866 .\n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.8a : (Page Number 224)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "ratio = 0.5 # Ratio of lengths of spaceship\n", + "c = 3e8 # speed of light in m/s\n", + "print \"Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\"\n", + "v = c * math.sqrt(1 - ratio**2) # calculation of Speed of spaceship\n", + "print \" Speed of spaceship is \",v,\" m/s.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\n", + " Speed of spaceship is 259807621.135 m/s.\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.8b : (Page Number 224)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "v = 2.598e8 # speed of spaceship\n", + "t_0 = 1 # time in second\n", + "print \" Standard formula used t= t_o/ math.sqrt ( 1- (v/c)**2)\"\n", + "t = t_0 / math.sqrt(1 - (v **2 / c **2) ) # calculation of Time corresponding to 1 sec\n", + "print \" Time corresponding to 1 sec is \",math.ceil (t),\" sec.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used t= t_o/ math.sqrt ( 1- (v/c)**2)\n", + " Time corresponding to 1 sec is 2.0 sec.\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.9 : (Page Number 224)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "v = 2.4e8 # speed of meson\n", + "t_0 = 2e-8 # lifetime of meson in second\n", + "print \" Standard formula used \"\n", + "t = t_0 / math.sqrt(1 - (v / c )**2 ) # calculation of Lifetime of meson\n", + "print \" Lifetime of meson is \",t,\" sec.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used \n", + " Lifetime of meson is 3.33333333333e-08 sec.\n" + ] + } + ], + "prompt_number": 122 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.10 : (Page Number 225)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "m_0 = 1 # atomic mass in amu\n", + "m = 3 * m_0 # relativistic mass\n", + "print \" Standard formula used l = l_o * math.sqrt ( 1- (v/c)**2)\"\n", + "v = c * math.sqrt(1- (m_0 / m)**2) # calculation of Velocity of particle\n", + "print \" Velocity of particle is \",v / c,\" c.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used l = l_o * math.sqrt ( 1- (v/c)**2)\n", + " Velocity of particle is 1.0 c.\n" + ] + } + ], + "prompt_number": 123 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.11 : (Page Number 225)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "mass_ratio = 0.5 # Ratio of rest mass and relativistic mass \n", + "c = 3e8 # speed of light in m/s\n", + "print \" Standard formula used m = m_o / math.sqrt ( 1- (v/c)**2) \"\n", + "v = c * math.sqrt(1- mass_ratio**2) # calculation of Velocity of particle\n", + "print \" Velocity of particle is \",v / c,\" c.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o / math.sqrt ( 1- (v/c)**2) \n", + " Velocity of particle is 0.866025403784 c.\n" + ] + } + ], + "prompt_number": 124 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.12a : (Page Number 226)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "u_x_ = -2e8 # velocity of first photon in ground frame in m/s\n", + "v = -2e8 # velocity of second photon in ground frame in m/s\n", + "m_0 = 3e-25\n", + "print \" Standard formula used u_x = (u_x_ + v) / (1 + v * u_x_ / c**2)\"\n", + "u_x = (u_x_ + v) / (1 + v * u_x_ / c**2) # calculation of Velocity of photon with respect to another\n", + "m = m_0 / math.sqrt(1 - (u_x / c)**2) # calculation of Relativistic mass of particle with respect to another\n", + "print \" Velocity of photon with respect to another is \",u_x,\" m/s.\"\n", + "print \" Relativistic mass of particle with respect to another is \",m,\" kg.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used u_x = (u_x_ + v) / (1 + v * u_x_ / c**2)\n", + " Velocity of photon with respect to another is -276923076.923 m/s.\n", + " Relativistic mass of particle with respect to another is 7.8e-25 kg.\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.12b : (Page Number 227)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "ratio = 1.95e+03 # Ratio of relativistic mass and rest mass\n", + "print \" Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\"\n", + "ratio_1 = 1 /(2* ratio**2) # calculation of ratio of velocity to velocity of light for\t\n", + "print \" Ratio of velocity to velocity of light for particle is 1 - \",ratio_1,\" .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\n", + " Ratio of velocity to velocity of light for particle is 1 - 1.31492439185e-07 .\n" + ] + } + ], + "prompt_number": 126 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.13 : (Page Number 226)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "u = 0.9*c # velocity of first particle with respect to other in m/s\n", + "density1 = 19.3e-3 # density of gold in rest frame\n", + "print \" Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2) and l = l_o* math.sqrt ( 1- (v/c)**2) \"\n", + "mass_ratio = math.sqrt (1 - (u/c)**2) # calculation of ratio of relativistic mass\n", + "volume_ratio = 1 / math.sqrt (1 - (u/ c)**2) # calculation of ratio of relativistic volume\n", + "density2 = density1 * (volume_ratio /mass_ratio ) #calculation of ratio of relativistic density\n", + "print \" Relativistic density of rod in moving frame is \",density2,\".\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2) and l = l_o* math.sqrt ( 1- (v/c)**2) \n", + " Relativistic density of rod in moving frame is 0.101578947368 .\n" + ] + } + ], + "prompt_number": 127 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.14a : (Page Number 227)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "E = 1e9 # energy of electron in eV \n", + "c = 3e8 # speed of light in m/s\n", + "m_0 = 9.1e-31 # mass of electron in kg\n", + "print \" Standard formula used E = m*c**2\"\n", + "m = E / c**2 * 1.6e-19 # calculation of relativistic mass of particle\n", + "ratio = m / m_0 # calculation of Ratio of relativistic mass and rest mass of particle\n", + "print \" Ratio of relativistic mass and rest mass of particle is \",ratio,\".\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Ratio of relativistic mass and rest mass of particle is 1953.6019536 .\n" + ] + } + ], + "prompt_number": 128 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.14b : (Page Number 227)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "ratio = 1.95e+03 # Ratio of relativistic mass and rest mass\n", + "print \" Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\"\n", + "ratio_1 = 1 /(2* ratio**2) # calculation of ratio of velocity to velocity of light for\t\n", + "print \" Ratio of velocity to velocity of light for particle is 1 - \",ratio_1,\" .\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o/ math.sqrt ( 1- (v/c)**2)\n", + " Ratio of velocity to velocity of light for particle is 1 - 1.31492439185e-07 .\n" + ] + } + ], + "prompt_number": 129 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.14c : (Page Number 227)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "m = 9e-31 # mass in kg\n", + "E = 1e9 # Energy of accelerated electron in eV\n", + "c = 3e8 # speed of light in m/s\n", + "print \" Standard formula used E = m*c**2\"\n", + "E_0 = m * c**2 # calculation of rest mass energy\n", + "ratio = E / E_0 *1.6e-19 # calculation of Ratio of energy to rest mass energy\n", + "print \" Ratio of energy to rest mass energy is \",ratio,\".\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Ratio of energy to rest mass energy is 1975.30864198 .\n" + ] + } + ], + "prompt_number": 130 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.15 : (Page Number 228)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.6 * c # velocity of rod wrt laboratory\n", + "l_ = 1 # length of rod measured by observer in lab\n", + "print \" Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\"\n", + "l = l_ / math.sqrt (1 - (v / c)**2) # calculation of Proper length of rod \n", + "print \" Proper length of rod is \",l,\" m.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\n", + " Proper length of rod is 1.25 m.\n" + ] + } + ], + "prompt_number": 133 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.16 : (Page Number 228)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.9 * c # velocity of rod wrt laboratory\n", + "proper_time = 2.5e-8 # proper mean life time of mesons\n", + "print \" Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)\"\n", + "t = proper_time / math.sqrt (1 - (v / c)**2) # calculation of New mean life time\n", + "print \" New mean life time is \",t,\" s.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)\n", + " New mean life time is 5.73539334676e-08 s.\n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.17 : (Page Number 229)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "E = 1 # energy of electron in MeV \n", + "c = 3e8 # speed of light in m/s\n", + "m_0 = 9e-31 # rest mass of electron\n", + "print \" Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) and E=m*c**2\"\n", + "m = E * 1.6e-13 / c**2 # calculation of mass of electron\n", + "v = c * math.sqrt(1 - (m_0 / m)**2) # calculation of Velocity of electron\n", + "print \" Velocity of electron is \",v,\" m/s.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) and E=m*c**2\n", + " Velocity of electron is 258716030.379 m/s.\n" + ] + } + ], + "prompt_number": 135 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.19 : (Page Number 230)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.99 * c # velocity of particle\n", + "proper_time = 2.2e-6 # proper mean life time of mesons\n", + "print \" Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)\"\n", + "t = proper_time / math.sqrt (1 - (v / c)**2) # calculation of time period\n", + "d = v *t # calculation of Distance travelled by particle\n", + "print \" Distance traveled by particle is \",d,\" m.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used t = t_o /math.sqrt ( 1- (v/c)**2)\n", + " Distance traveled by particle is 4631.82979352 m.\n" + ] + } + ], + "prompt_number": 136 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.20 : (Page Number 230)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "m = 1 # let \n", + "m_change = 1 # change in mass in percentage by increamath.sing velocity\n", + "print \" Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) \"\n", + "v = c * math.sqrt (1 - (m / (m + m_change/100))**2) # calculation of Velocity required to increase mass by one percent\n", + "print \" Velocity required to increase mass by one perfect is \",v,\" m/s.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) \n", + " Velocity required to increase mass by one perfect is 0.0 m/s.\n" + ] + } + ], + "prompt_number": 137 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.21 : (Page Number 231)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "m_ratio = 2000 # ratio of rest mass and relativistic mass\n", + "print \" Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) \"\n", + "v = c * math.sqrt (1 - (1/m_ratio)**2) # calculation of Velocity required to increase mass by 2000 times\n", + "\t\n", + "print \" Velocity required to increase mass by 2000 times is \",c,\" - \",(c -v),\" m/s.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used m = m_o* math.sqrt ( 1- (v/c)**2) \n", + " Velocity required to increase mass by 2000 times is 300000000.0 - 0.0 m/s.\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.22 : (Page Number 231)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "h = 6.63e-34 # plank's constant\n", + "c = 3e8 # speed of light in m/s\n", + "lambda1 = 5e-4 # wavelength of photon in angstrom\n", + "e_rest_mass = 0.511 # rest mass of electron in Mev/c**2\n", + "p_rest_mass = 0.511 # rest mass of electron in Mev/c**2\n", + "print \" Standard formula used E_total = E_rest + E_kinetic\"\n", + "k = (((h * c / (lambda1 * 1.6e-23 )) - (e_rest_mass + p_rest_mass))) /2 # calculation of Energy of each particle\n", + "print \" Energy of each particle is \",k,\" MeV.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E_total = E_rest + E_kinetic\n", + " Energy of each particle is 11.92025 MeV.\n" + ] + } + ], + "prompt_number": 139 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.23 : (Page Number 232)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "h = 6.63e-34 # plank's constant\n", + "c = 3e8 # speed of light in m/s\n", + "p_rest_mass = 938 # rest mass of proton in Mev/\n", + "ap_rest_mass = 938 # rest mass of antiproton in Mev\n", + "print \" Standard formula used E = h* c / lambda1\"\n", + "lambda1 = h * c / ((p_rest_mass + ap_rest_mass) * 1.6e-19) # calculation of Threshold wavelength for proton - antiproton production\n", + "print \" Threshold wavelength for proton - antiproton production is \",round((lambda1 / 1e-10),4),\" angstrom.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = h* c / lambda1\n", + " Threshold wavelength for proton - antiproton production is 6.6265 angstrom.\n" + ] + } + ], + "prompt_number": 141 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.24 : (Page Number 232)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "c = 3e8 # speed of light in m/s\n", + "p_rest_mass = 0.938 # rest mass energy of proton in BeV\n", + "KE = 1 # kinetic energy of proton in BeV \n", + "print \" Standard formula used E**2 = p**2*c**2 + m_o**2*c**4*\"\n", + "E = KE + p_rest_mass # calculation of energy of particle\n", + "p = (math.sqrt (E**2 *1e6 - (p_rest_mass * 1e3)**2)) *(1.6e-19)*(1e9) / c # calculation of Momentum of photon\n", + "print \" Momentum of photon is \",p,\" kg m/s.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E**2 = p**2*c**2 + m_o**2*c**4*\n", + " Momentum of photon is 9.04467922163e-16 kg m/s.\n" + ] + } + ], + "prompt_number": 142 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.26 : (Page Number 228)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "t = 8e-6 # mean life of meson \n", + "l = 10 # distance of meson from earth surface\n", + "print \" Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\"\n", + "v = l*1e3/ math.sqrt( t**2 +(l * 1e3 /c)**2) # calculation of relative speed of meson with respect to\n", + "print \" Relative speed of meson with respect to earth is \",round(v/c,4),\" c .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used l = l_o* math.sqrt ( 1- (v/c)**2)\n", + " Relative speed of meson with respect to earth is 0.9724 c .\n" + ] + } + ], + "prompt_number": 144 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 6.27 : (Page Number 228)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that \n", + "c = 3e8 # speed of light in m/s\n", + "v = 0.8 *c # velocity of rod in m/s\n", + "m_0 = 1.673e-27 # rest mass of proton in kg\n", + "print \" Standard formula used E_total = KE + E_mass\"\n", + "K_E = m_0 * c**2 *(1/math.sqrt(1-(v/c)**2) - 1) / 1.6e-13 # calculation of Kinetic energy of proton\n", + "print \" Kinetic energy of proton is \",K_E,\"MeV.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E_total = KE + E_mass\n", + " Kinetic energy of proton is 627.375 MeV.\n" + ] + } + ], + "prompt_number": 145 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter8.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter8.ipynb new file mode 100755 index 00000000..9c611546 --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter8.ipynb @@ -0,0 +1,534 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:a1667c7d867f455afa57bbe2aeebf3ad5a048e4d2a2c649146fd254fe4b81f4b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 8 : OUR SOLAR SYSTEM" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.4a : (Page Number 300)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "t1 = 1 # time period of satellite s1 in hours\n", + "t2 = 8 # time period of satellite s2 in hour\n", + "r1 = 1.2e4 # radius of orbit of satellite s1 in km\n", + "print \"Standard formula r2/r1 = (t2/t1)**(2/3)\"\n", + "r2 = r1 * (t2/t1)**(2/3) # calculation of radius of orbit of satellite s2 in km\n", + "v1 = 2 * pi * r1 / t1 # calculation of speed of satellite s1 in km/h\n", + "v2 = 2 * pi * r2 / t2 # calculation of speed of satellite s2 in km/h\n", + "del_v = v2 - v1 # calculation of relative speed of satellites in km/h\n", + "\n", + "print \" Relative speed of satellite s2 wrt satellite s1 is \",del_v,\" km/h.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula r2/r1 = (t2/t1)**(2/3)\n", + " Relative speed of satellite s2 wrt satellite s1 is -65940.0 km/h.\n" + ] + } + ], + "prompt_number": 146 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.5 : (Page Number 300)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 2620 # distance of satellite from surface of Earth in km\n", + "R_e = 6400 # radius of Earth in km\n", + "M_e = 6e24 # mass of Earth in kg\n", + "G = 6.67e-11 # universal gravitational constant \n", + "print \"Standard formula used \\t v_o = math.sqrt(G*M_e/r) \"\n", + "print \" \\t T = 2 * pi * r / v_o \"\n", + "r = R_e + h\n", + "v_o = math.sqrt(G * M_e / (r * 1e3))\n", + "T = 2 * pi * r*1000 / (v_o*3600)\n", + "print \" Orbital velocity of satellite is \",round(v_o / 1000,4),\" km/s period of revolution is \",round(T,4),\" h.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used \t v_o = math.sqrt(G*M_e/r) \n", + " \t T = 2 * pi * r / v_o \n", + " Orbital velocity of satellite is 6.6609 km/s period of revolution is 2.3623 h.\n" + ] + } + ], + "prompt_number": 152 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.6 : (Page Number 301)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 3e5 # distance of satellite from surface of Earth in m\n", + "R_e = 6.38e6 # radius of Earth in km\n", + "M_e = 6e24 # mass of Earth in kg\n", + "g = 9.8 # gravitational acceleration in m/s2 \n", + "print \"Standard formula used v_o = math.sqrt(G*M_e/r) \"\n", + "print \"Standard formula used T = 2 * pi * r / v_o \"\n", + "r = R_e + h # calculation of effective distance between Earth and satellite\n", + "\n", + "G = g * R_e**2 / M_e # calculation of gravitational constant \n", + "v_o = math.sqrt(G * M_e / r) / 1000 # calculation of orbital velocity of satellite\n", + "T = 2 * pi * r / (v_o * 1000) / 3.6e3 # calculation of period of revolution of satellite\n", + "\n", + "print \" Orbital velocity of satellite is \",round(v_o,4),\" km/s period of revolution is \",round(T,4),\" h.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used v_o = math.sqrt(G*M_e/r) \n", + "Standard formula used T = 2 * pi * r / v_o \n", + " Orbital velocity of satellite is 7.7276 km/s period of revolution is 1.508 h.\n" + ] + } + ], + "prompt_number": 154 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.7 : (Page Number 301)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "t = 27.3 # period of lunar orbit around Earth in days\n", + "r = 3.9e5 # distance of satellite from Earth in km\n", + "G = 6.67e-11 # universal gravitational constant \n", + "print \"Standard formula used T = 2 * pi * math.sqrt ((r**3)/G*M_e) \"\n", + "T = t * 24 * 60 * 60 # calculation of time in seconds\n", + "M_e = 4 * pi**2 * (r * 1000)**3 / (G * T**2) # calculation of mass of Earth\n", + "print \" Estimated mass of Earth is \",M_e,\" kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used T = 2 * pi * math.sqrt ((r**3)/G*M_e) \n", + " Estimated mass of Earth is 6.30426551023e+24 kg.\n" + ] + } + ], + "prompt_number": 156 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.8 : (Page Number 302)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "t = 1 # period of Earth's revolution around Sun in years\n", + "r = 1.5e8 # distance between Sun and Earth in km\n", + "G = 6.67e-11 # Universal gravitational constant\n", + "print \"Standard formula used T = 2 * pi * math.sqrt ((r**3)/G*M_e) \"\n", + "T = t * 24 * 60 * 60 *356 # calculation of time period in seconds\n", + "M_s = 4 * pi**2 * (r * 1000)**3 / (G * T**2) # calculation of mass of Sun\n", + "print \" Estimated mass of Sun is \",M_s,\" kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used T = 2 * pi * math.sqrt ((r**3)/G*M_e) \n", + " Estimated mass of Sun is 2.10930678583e+30 kg.\n" + ] + } + ], + "prompt_number": 157 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.9 : (Page Number 302)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R_e = 6.4e6 # radius of Earth in km\n", + "M_e = 6e24 # mass of Earth in kg\n", + "G = 6.67e-11 # universal gravitational constant\n", + "u = 6e3 # initial speed of rocket in m/s\n", + "print \"Standard formula used U_f - U_i = 1/2 * m *(u**2 - v**2) \"\n", + "h = ((R_e * 1e3)**2 * u**2) / (2 * G * M_e - R_e * u**2) / 1000 # calculation of Height reached by rocket before returning to Earth\n", + "\n", + "print \" Height reached by rocket before returning is \",h,\" km.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used U_f - U_i = 1/2 * m *(u**2 - v**2) \n", + " Height reached by rocket before returning is 2586947368.42 km.\n" + ] + } + ], + "prompt_number": 158 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.10 : (Page Number 303)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "R_e = 6.4e6 # radius of Earth in km\n", + "M_e = 6e24 # mass of Earth in kg\n", + "G = 6.67e-11 # universal gravitational constant\n", + "print \"Standard formula used U_f - U_i = 1/2 * m *(u**2 - v**2) \"\n", + "h = 10 * R_e\n", + "v = math.sqrt (2 *h * G * M_e / (R_e * h)) # calculation of velocity required by mass to reach given height\n", + "print \" Velocity required by mass is \",round(v,4),\" m/s.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used U_f - U_i = 1/2 * m *(u**2 - v**2) \n", + " Velocity required by mass is 11183.1346 m/s.\n" + ] + } + ], + "prompt_number": 160 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.11 : (Page Number 304)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "r1 = 1e12 # distance of first planet from Sun in m\n", + "r2 = 1e13 #distance of first planet from Sun in m \n", + "print \"Standard formula used T**2 = k* r**3\"\n", + "print \" Standers formula used v = 2 * pi * r / T\"\n", + "r_ratio = r1 / r2 # r_ratio is ratio of distances from Sun\n", + "T_ratio = r_ratio**(3/2) #calculation of Ratio of time period\n", + "v_ratio = r_ratio / T_ratio # calculation of ratio of speed\n", + "\n", + "print \" Ratio of time period is \",T_ratio,\" and ratio of speed is \",v_ratio,\" .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used T**2 = k* r**3\n", + " Standers formula used v = 2 * pi * r / T\n", + " Ratio of time period is 0.1 and ratio of speed is 1.0 .\n" + ] + } + ], + "prompt_number": 161 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.12 : (Page Number 305)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + " #Given that\n", + "r1 = 1.5e8 # distance of Earth from Sun in km\n", + "t1 = 1 # let \n", + "print \" Standard formula used T**2 = k* r**3\"\n", + "t2 = 29.5 * t1 # calculation of time period of Saturn\n", + "r2 = r1 * (t2 / t1) ** (2/3) #calculation of distance of stern from Sun\n", + "\n", + "print \" Distance of Saturn from Sun is \",r2,\" km .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used T**2 = k* r**3\n", + " Distance of Saturn from Sun is 150000000.0 km .\n" + ] + } + ], + "prompt_number": 162 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.13 : (Page Number 305)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "r_peri = 360 # distance of perigee of satellite from Earth surface in km\n", + "r_apo = 2500 # distance of apogee of satellite from Earth surface in km\n", + "R_e = 6400 # radius of Earth in km\n", + "v_p = 30000 # speed of satellite at apogee position in km/h\n", + "print \" Standard formula used v * r = k \"\n", + "r_p = r_peri + R_e # calculation of distance of perigee\n", + "r_a = r_apo + R_e # calculation of distance of apogee\n", + "v_a = v_p * r_p / r_a # calculation of speed at apogee\n", + "print \" Speed at perigee is \",v_p,\" km/h and at apogee is \",v_a,\" km/h .\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used v * r = k \n", + " Speed at perigee is 30000 km/h and at apogee is 22786 km/h .\n" + ] + } + ], + "prompt_number": 165 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.14 : (Page Number 306)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "h = 600 # distance of satellite from surface of Earth in km\n", + "R_e = 6400 # radius of Earth in km\n", + "m_s = 100 # mass of satellite in kg\n", + "g = 10 # gravitational acceleration in m/s2 \n", + "v_y = 2500 # upward velocity of launched satellite\n", + "print \" Standard formula used 1/2 *(m_s * v **2 / r) = g * R_E**2 * m /R_e**2 \"\n", + "r = R_e + h # calculation of effective height of satellite\n", + "\n", + "v = math.sqrt (g * (R_e * 1e3)**2 / (r * 1e3)) # calculation of orbital velocity of satellite\n", + "\n", + "P_x = m_s * v # calculation of momentum in x direction\n", + "P_y = m_s * v_y # calculation of momentum in y direction\n", + "U = math.sqrt(P_x**2 + P_y**2 ) # calculation of magnitude of impulse required\n", + "\n", + "theta1 = (180 / pi) * math.atan (P_y / P_x ) # calculation of direction of impulse required\n", + "print \" Magnitude and direction of impulse required are respectively \",round(U,4),\"kgm/s and \",round(theta1,4),\" degree.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used 1/2 *(m_s * v **2 / r) = g * R_E**2 * m /R_e**2 \n", + " Magnitude and direction of impulse required are respectively 804762.6092 kgm/s and 18.1076 degree.\n" + ] + } + ], + "prompt_number": 168 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.15a : (Page Number 306)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + " #Given that\n", + "b_e = 13.6 # Binding energy of electron to proton in eV\n", + "c= 3e8 # speed of light in m/s\n", + "print \" Standard formula used E = m*c**2\"\n", + "del_m = b_e * (1.6e-19) / c**2 * 1000 \n", + "print \" Loss in mass during formation of 1 atom of hydrogen is \",del_m,\" g.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Loss in mass during formation of 1 atom of hydrogen is 2.41777777778e-32 g.\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 8.15b : (Page Number 306)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "M_p = 1.6725e-24 # mass of proton in g\n", + "M_n = 1.6748e-24 # mass of neutron in g\n", + "M_d = 3.3433e-24 # mass of deuteron in g\n", + "c= 3e8 # speed of light in m/s\n", + "print \" Standard formula used E = m*c**2\"\n", + "del_m = M_p + M_n - M_d # calculation of Loss in mass during formation of 1 atom of hydrogen\n", + "\n", + "b_e = (del_m / 1000) * c**2 / (1.6e-19 * 1e6) # calculation of Binding energy of deuteron\n", + "\n", + "print \" Binding energy of deuteron is \",b_e,\" MeV.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used E = m*c**2\n", + " Binding energy of deuteron is 2.25 MeV.\n" + ] + } + ], + "prompt_number": 170 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter9.ipynb b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter9.ipynb new file mode 100755 index 00000000..d5bba5e6 --- /dev/null +++ b/Introduction_To_Special_Relativity_And_Space_Science_by_S._P._Singh/chapter9.ipynb @@ -0,0 +1,146 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:09741842b6ad6d0042da48a2477bfaa206b5fce73cac693b520a26d64f27686a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Introduction To Special Relativity And Space Science (By S.P. Singh)" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 9 : STARS AND THEIR CLASSIFICATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 9.1 : (Page Number 332)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "m_i = 15 # initial magnitude of supernova\n", + "m_f = 2 # final magnitude of supernova\n", + "print \"Standard formula used \\t M = m - 2.5log(L/L_0) \"\n", + "del_m = m_i - m_f # calculation of change in magnitude\n", + "brightness_ratio = 100**(del_m/5) # calculation of increment in brightness ratio.\n", + "print \" In two days novas brightness is increased by \",math.ceil(brightness_ratio / 10000)*10000,\" times nearly\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Standard formula used \t M = m - 2.5log(L/L_0) \n", + " In two days novas brightness is increased by 10000.0 times nearly\n" + ] + } + ], + "prompt_number": 172 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 9.2a : (Page Number 333)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #Given that\n", + "b_ratio = 2 # ratio of light output in a period \n", + "print \"Standard formula used \\t M = m - 2.5log(L/L_0) \"\n", + "del_m = 2.5 * math.log10(b_ratio) # calulation of change in magnitude\n", + "print \" Change in magnitude is \",round(del_m,4) ,\" times\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used \t M = m - 2.5log(L/L_0) \n", + " Change in magnitude is 0.7526 times\n" + ] + } + ], + "prompt_number": 175 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 9.2b : (Page Number 333)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " # given that\n", + "m_capella = 0.05 # magnitude of brightness of capella at 14 parsecs\n", + "m_sun = 4.8 # absolute magnitude of brightness of sun\n", + "d = 14 # distance of capella in parsecs\n", + "D = 10 # distance of capella considerd for observation\n", + "print \"Standard formula used \\t M = m - 2.5log(L/L_0) \"\n", + "M_capella = m_capella - 5*math.log10(d/D) # calculation of absolute magnitude of brightness at distance of 10 parsecs\n", + "del_m = m_sun - M_capella # difference between absolute magnitude of sun and capella\n", + "ratio = 10**(del_m/2.5) \n", + "print \" Capella is \",round(ratio,4),\" times brighter than sun.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Standard formula used \t M = m - 2.5log(L/L_0) \n", + " Capella is 79.4328 times brighter than sun.\n" + ] + } + ], + "prompt_number": 178 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Introduction_to_Solid_State_Physics/screenshots/Screenshot.png b/Introduction_to_Solid_State_Physics/screenshots/Screenshot.png new file mode 100755 index 00000000..407beb3a Binary files /dev/null and b/Introduction_to_Solid_State_Physics/screenshots/Screenshot.png differ diff --git a/Introduction_to_Solid_State_Physics/screenshots/Screenshot_1.png b/Introduction_to_Solid_State_Physics/screenshots/Screenshot_1.png new file mode 100755 index 00000000..407beb3a Binary files /dev/null and b/Introduction_to_Solid_State_Physics/screenshots/Screenshot_1.png differ diff --git a/Introduction_to_Solid_State_Physics/screenshots/Screenshot_2.png b/Introduction_to_Solid_State_Physics/screenshots/Screenshot_2.png new file mode 100755 index 00000000..407beb3a Binary files /dev/null and b/Introduction_to_Solid_State_Physics/screenshots/Screenshot_2.png differ diff --git a/Introduction_to_Solid_State_Physics_by_Kittel_C/Chapter5.ipynb b/Introduction_to_Solid_State_Physics_by_Kittel_C/Chapter5.ipynb new file mode 100755 index 00000000..4fef7b6c --- /dev/null +++ b/Introduction_to_Solid_State_Physics_by_Kittel_C/Chapter5.ipynb @@ -0,0 +1,49 @@ +{ + "metadata": { + "name": "Chapter_5_Kittel" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Chapter 5 : Phonons and Lattice Vibrations\n" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1: Generation of phonons, Page 137" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "# importing modules\nfrom __future__ import division\nimport math\n\n# Variable declaration\n\nl = 4 * 10**(-5); # the wavelength in cm for visible light -4000 Angstrom\nVs = 5 * 10**(5); # velocity of sound in cm/sec\nn = 1.5 ; # refractive index of the crystal\n\nNu = (2*Vs*2*3.14*n)/(l); # Nu = [2Vs(2*3.14)*n/l]*sin(psi/2) and here sin(psi/2)=1\n\n#Result\n\nprint \" The maximum phonon frequency is \", Nu , \" per sec\"\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": " The maximum phonon frequency is 2.355e+11 per sec\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering/screenshots/ch10.png b/Irrigation_and_Water_Power_Engineering/screenshots/ch10.png new file mode 100755 index 00000000..8fbdd9ad Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering/screenshots/ch10.png differ diff --git a/Irrigation_and_Water_Power_Engineering/screenshots/ch4.png b/Irrigation_and_Water_Power_Engineering/screenshots/ch4.png new file mode 100755 index 00000000..6fd8ed7e Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering/screenshots/ch4.png differ diff --git a/Irrigation_and_Water_Power_Engineering/screenshots/ch5.png b/Irrigation_and_Water_Power_Engineering/screenshots/ch5.png new file mode 100755 index 00000000..c3a01497 Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering/screenshots/ch5.png differ diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10.ipynb new file mode 100755 index 00000000..6e9cf01f --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10.ipynb @@ -0,0 +1,402 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:052e5024d5b2f54bda77f8d8972af18d1ffb4cd92ead6e287538c1745234bb8e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : EARTH AND ROCKFILL DAM" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 pg : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array,float64,round\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "K = 5.E-4; \t\t\t\t#coefficient of permeability of soil\n", + "Bt = 6.; \t\t\t\t#width of top of dam\n", + "wb = 146.; \t\t\t\t#width of base of dam\n", + "H = 20.; \t\t\t\t#heigth of dam\n", + "hw = 2.; \t\t\t\t#heigth of water in reservior\n", + "hs1 = 4.; \t\t\t\t#slope on upstream side\n", + "hs2 = 3.; \t\t\t\t#slope on downstream side\n", + "df = 30.; \t\t\t\t#length of drainage filter\n", + "\n", + "x = wb-df-72+72*0.3;\n", + "y = 18.;\n", + "s = (x**2+y**2)**0.5-x;\n", + "\n", + "x = array([0, 10, 20, 30, 40, 50, 60, 65.6],dtype=float64);\n", + "y = (4.849*x+5.879)**0.5;\n", + "y = round(y*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(8):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "sf = K*s*10000;\n", + "sf = round(sf*1000)/1000;\n", + "print \"Seepage flow per unit length of dam = %.2fD-6 cumecs/metre length of dam.\"%(sf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x y\n", + "0.00 2.42\n", + "10.00 7.37\n", + "20.00 10.14\n", + "30.00 12.30\n", + "40.00 14.14\n", + "50.00 15.76\n", + "60.00 17.23\n", + "65.60 18.00\n", + "Seepage flow per unit length of dam = 12.12D-6 cumecs/metre length of dam.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 pg : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "K = 3.E-3; \t\t\t\t#coefficient of permeability\n", + "nd = 25.; \t\t\t\t#number of potential drops\n", + "nf = 4.; \t\t\t\t#number of flow channels\n", + "lf = 40.; \t\t\t\t#filter length\n", + "H = 52.; \t\t\t\t#heigth of dam\n", + "fb = 2.; \t\t\t\t#free board\n", + "\n", + "# Calculations\n", + "q = K*(H-fb)*nf/(nd*100);\n", + "\n", + "# Results\n", + "print \"Discharge per meter length of dam = %.5f cumec/metre length.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge per meter length of dam = 0.00024 cumec/metre length.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 pg : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\t\t\t\t\n", + "#Given\n", + "x = 4.;\n", + "#Given scale\n", + "An = 14.4; \t\t\t\t#area of N recmath.tangle\n", + "At = 6.4; \t\t\t\t#area of T recmath.tangle\n", + "Au = 4.9; \t\t\t\t#area of U recmath.tangle\n", + "L = 12.6; \t\t\t\t#length of arc;\n", + "gamma_m = 19.; \t\t\t\t#unit weigth of soil\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "fi = 26.; \t\t\t\t#effective angle(degree)\n", + "co = 19.5; \t\t\t\t#cohesion value\n", + "\n", + "# Calculations\n", + "#consider 1m length of dam\n", + "SumN = An*x**2*gamma_m;\n", + "SumT = At*x**2*gamma_m;\n", + "SumU = Au*x**2*gamma_w;\n", + "Le = x*L;\n", + "F = ((Le*co)+(SumN-SumU)*math.tan(math.radians(fi)))/SumT;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Factor of safety for slope = %.2f.\"%(F);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety for slope = 1.41.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 pg : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#check section for:\n", + "#Stability of d/s slope against steady seepage\n", + "#Sloughing of u/s slope against sudden drawdown\n", + "#Stability of the foundation against shear\n", + "#Seepage through body of dam\n", + "\n", + "#Given\n", + "#Dimensions\n", + "H = 20.; \t\t\t\t#Heigth of dam\n", + "Bt = 6.; \t\t\t\t#top width of dam\n", + "s1 = 4.; \t\t\t\t#u/s slope\n", + "s2 = 3.; \t\t\t\t#d/s slope\n", + "fb = 2.; \t\t\t\t#free board\n", + "#Properties of materials of dam\n", + "gamma_d = 17.27; \t\t\t\t#dry density\n", + "wc = 0.15; \t\t\t\t#optimum water content\n", + "gamma_s = 21.19; \t\t\t\t#saturated density\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "wavg = 19.62; \t\t\t\t#average unit weigth under seepage\n", + "theta = 26.; \t\t\t\t#average angle of internal friction(degree)\n", + "co = 19.13; \t\t\t\t#average cohesion\n", + "K = 5.E-4; \t\t\t\t#coefficient of permeability\n", + "#properties of foundation materials\n", + "gamma_f = 17.27; \t\t\t\t#average unit weigth\n", + "cof = 47.87; \t\t\t\t#average cohesion\n", + "fi = 8.; \t\t\t\t#average angle internal friction\n", + "t = 6.; \t\t\t\t#thickness of clay\n", + "FOSp = 1.5; \t\t\t\t#permissible factor of safety of slope\n", + "PS = 8.E-6; \t\t\t\t#permissible seepage\n", + "#(a) Stability of d/s slope against steady seepage\n", + "An = 302.4; \t\t\t\t#area of N diagram\n", + "At = 91.2; \t\t\t\t#area of T diagram\n", + "Au = 98.4; \t\t\t\t#area of U diagram\n", + "Le = 60.; \t\t\t\t#length of arc\n", + "SumN = An*gamma_s;\n", + "SumT = At*gamma_s;\n", + "SumU = Au*gamma_w;\n", + "F = (Le*co)+(SumN-SumU)*math.tan(math.radians(theta))/SumT;\n", + "F = round(F*100)/100;\n", + "print \"Parta:\"\n", + "print \"Factor of safety for slope = %.2f.\"%(F);\n", + "print \"Safe\";\n", + "\n", + "#(b) Sloughing of u/s slope against sudden drawdown\n", + "h1 = 15.;\n", + "b = 80.;\n", + "P = gamma_s*H**2*math.tan(math.radians(45-(theta/2)))**2/2+gamma_w*h1**2/2;\n", + "sav = P/b;\n", + "smax = 2*sav;\n", + "Ne = (gamma_s-gamma_w)*b*H/2;\n", + "R = Ne*math.tan(math.radians(theta))+co*b;\n", + "fs = R/P;\n", + "fs = round(fs*100)/100;\n", + "print \"Partb:\"\n", + "print \"Factor of safety w.r.t average shear = %.2f.\"%(fs);\n", + "print \"Safe\";\n", + "sr = 0.6*H*(gamma_s-gamma_w)*math.tan(math.radians(theta))+co;\n", + "FS = sr/smax;\n", + "FS = round(FS*100)/100;\n", + "print \"Factor of safety w.r.t maximum shear = %.2f.\"%(FS);\n", + "print \"Safe\";\n", + "\n", + "#(c) Stability of the foundation against shear\n", + "h1 = 26.;\n", + "h2 = 6.;\n", + "gamma_m = (wavg*(h1-h2)+gamma_f*h2)/h1;\n", + "l = (gamma_m*h1*math.tan(math.radians(fi))+cof)/(gamma_m*h1);\n", + "fi1 = math.tan(math.radians(l));\n", + "P = (h1**2-h2**2)/2*gamma_m*math.tan(math.radians(45-(fi1/2)))**2;\n", + "sav = P/b;\n", + "smax = 2*sav;\n", + "s1 = cof+gamma_f*h2*math.tan(math.radians(fi));\n", + "s2 = cof+gamma_m*h1*math.tan(math.radians(fi));\n", + "as1 = (s1+s2)/2;\n", + "fs = as1/sav;\n", + "fs = round(fs*100)/100;\n", + "print \"Partc:\"\n", + "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n", + "print \"Safe\";\n", + "\n", + "gamma_av = (wavg*0.6*H+gamma_f*h2)/(0.6*H)+h2;\n", + "s = cof+gamma_av*0.6*H*math.tan(math.radians(fi));\n", + "fs = s/smax;\n", + "fs = round(fs*100)/100;\n", + "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n", + "print \"Unsafe\";\n", + "\n", + "#(d) Seepage through body of dam\n", + "s = 2.; \t\t\t\t#measured\n", + "q = K*s*100000/100;\n", + "print \"Partd:\"\n", + "print \" Seepage through body of dam = %.2fD-5 cumecs/m length of dam\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta:\n", + "Factor of safety for slope = 1149.17.\n", + "Safe\n", + "Partb:\n", + "Factor of safety w.r.t average shear = 2.16.\n", + "Safe\n", + "Factor of safety w.r.t maximum shear = 1.24.\n", + "Safe\n", + "Partc:\n", + "Factor of safety w.r.t overall shear = 1.18.\n", + "Safe\n", + "Factor of safety w.r.t overall shear = 0.69.\n", + "Unsafe\n", + "Partd:\n", + " Seepage through body of dam = 1.00D-5 cumecs/m length of dam\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 pg : 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pylab import plot,show\n", + "from numpy import zeros\n", + "#design upstream impervious blanket\n", + "\t\t\t\t\n", + "#Given\n", + "Zb = 1.2; \t\t\t\t#thickness of blanket\n", + "Zf = 8; \t\t\t\t#dismath.tance of blanket from foundation\n", + "kb = 0.06; \t\t\t\t#coefficient of permeability of blanket material\n", + "kf = 72; \t\t\t\t#coefficient of permeability of foundation soil\n", + "Hw = 10; \t\t\t\t#heigth of water in reservior\n", + "Xd = 40;\n", + "\n", + "a = (kb/(kf*Zb*Zf))**0.5;\n", + "Xo = 1.414/a;\n", + "\n", + "#we vary value of x\n", + "x = [0, 25, 50, 75, 100, 125, 151.8, 300]\n", + "Xr = zeros(8)\n", + "ho = zeros(8)\n", + "r = zeros(8)\n", + "\n", + "for i in range(8):\n", + " e = math.exp(2*a*x[i]);\n", + " Xr[i] = (e-1)/(a*(e+1));\n", + " ho[i] = Xr[i]*Hw/(Xr[i]+Xd);\n", + " r[i] = Xr[i]*100/(Xr[i]+Xd);\n", + "\n", + "print \"x Xr ho reduction qpercent\";\n", + "for i in range(8):\n", + " print \"%.2f %.2f %.2f %.2f\"%(x[i],Xr[i],ho[i],r[i]);\n", + "\n", + "#graph is plotted between r and x.\n", + "#after around 130m length there is only slight increase in head dissipated(ho)\n", + "plot(x,r)\n", + "show()\n", + "L = 130;\n", + "print \"Thickness of blanket = %.2f m\"%(Zb);\n", + "print \"Length of blanket = %i m.\"%(L);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x Xr ho reduction qpercent\n", + "0.00 0.00 0.00 0.00\n", + "25.00 24.56 3.80 38.04\n", + "50.00 46.67 5.38 53.85\n", + "75.00 64.78 6.18 61.83\n", + "100.00 78.50 6.62 66.24\n", + "125.00 88.28 6.88 68.82\n", + "151.80 95.35 7.04 70.45\n", + "300.00 106.53 7.27 72.70\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF9RJREFUeJzt3XuUVOWdr/EHuQgCcokKRG6CUTAxhmPiqPFSoPGok6hz\nczlr5iwy8cTRiUbNJONlYuxZKzlRZrlMVsw4epg4aOItMZKYZHKUhvICSlBxUBBQEkQTuhEhGpDI\npev88e62m6Karq6qXbv2ruezVq3atbsu78vWb+/+7bfeFyRJkiRJkiRJkiRJkiRJklLhOmAl8CJw\nL3AgMBp4DFgLPAqMTKx1kqSyTQZ+TQhygAeA2cAc4J+ifdcAN9W9ZZKkPhsNrAFGAQOAR4BPAauB\nMdFzxkaPJUkpcAnwB2ATcE+0b2u3n/creixJalBTgVXABwhn6g8Df8u+Ib6lzu2SJJUwoJeffxxY\nArwVPf4xcBLQRii7tAHjCGfx+5g6dWph3bp1tWmpJDWPdcCRlbzwgF5+vho4ERhCKLOcSThzf4Rw\nwZTofn7JVq1bR6FQyOztxhtvTLwN9s3+2b/s3QhVkor0dqb+38DdwLNAB/A8cCcwHHgQuBhYD1xY\naQMkSbXTW6hDGL44p2jfFsJZuySpgfRWftF+5HK5pJsQmyz3Dexf2mW9f9XoF/P7F6L6kCSpTP36\n9YMK89kzdUnKEENdkjLEUJekDDHUJSlDDHVJyhBDXZIyxFCXpAwx1CUpQwx1ScoQQ12SMsRQl6QM\nMdQlKUMMdUnKkHLmU5ck9VFHB+zYAe++G27dt3t7XA1DXVJT2bWr8rDty3N37oQhQ+Cgg7ruO2/7\ne/yBD1TXP+dTl5S4QiGEYLmBWU3YdnTA0KG9h2tfgrjUawcPhn4VJmw186kb6pJ61NEBf/x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9quQAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of blanket = 1.20 m\n", + "Length of blanket = 130 m.\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..aee962a5 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_1.ipynb @@ -0,0 +1,403 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:35c301dd56b78bdaa09416cde0ed9d5e7328b399d3b45890faac8cf8417b6a80" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : EARTH AND ROCKFILL DAM" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 pg : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import array,float64,round\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "K = 5.E-4; \t\t\t\t#coefficient of permeability of soil\n", + "Bt = 6.; \t\t\t\t#width of top of dam\n", + "wb = 146.; \t\t\t\t#width of base of dam\n", + "H = 20.; \t\t\t\t#heigth of dam\n", + "hw = 2.; \t\t\t\t#heigth of water in reservior\n", + "hs1 = 4.; \t\t\t\t#slope on upstream side\n", + "hs2 = 3.; \t\t\t\t#slope on downstream side\n", + "df = 30.; \t\t\t\t#length of drainage filter\n", + "\n", + "x = wb-df-72+72*0.3;\n", + "y = 18.;\n", + "s = (x**2+y**2)**0.5-x;\n", + "\n", + "x = array([0, 10, 20, 30, 40, 50, 60, 65.6],dtype=float64);\n", + "y = (4.849*x+5.879)**0.5;\n", + "y = round(y*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(8):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "sf = K*s*10000;\n", + "sf = round(sf*1000)/1000;\n", + "print \"Seepage flow per unit length of dam = %.2fD-6 cumecs/metre length of dam.\"%(sf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x y\n", + "0.00 2.42\n", + "10.00 7.37\n", + "20.00 10.14\n", + "30.00 12.30\n", + "40.00 14.14\n", + "50.00 15.76\n", + "60.00 17.23\n", + "65.60 18.00\n", + "Seepage flow per unit length of dam = 12.12D-6 cumecs/metre length of dam.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 pg : 502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "K = 3.E-3; \t\t\t\t#coefficient of permeability\n", + "nd = 25.; \t\t\t\t#number of potential drops\n", + "nf = 4.; \t\t\t\t#number of flow channels\n", + "lf = 40.; \t\t\t\t#filter length\n", + "H = 52.; \t\t\t\t#heigth of dam\n", + "fb = 2.; \t\t\t\t#free board\n", + "\n", + "# Calculations\n", + "q = K*(H-fb)*nf/(nd*100);\n", + "\n", + "# Results\n", + "print \"Discharge per meter length of dam = %.5f cumec/metre length.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge per meter length of dam = 0.00024 cumec/metre length.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 pg : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\t\t\t\t\n", + "#Given\n", + "x = 4.;\n", + "#Given scale\n", + "An = 14.4; \t\t\t\t#area of N recmath.tangle\n", + "At = 6.4; \t\t\t\t#area of T recmath.tangle\n", + "Au = 4.9; \t\t\t\t#area of U recmath.tangle\n", + "L = 12.6; \t\t\t\t#length of arc;\n", + "gamma_m = 19.; \t\t\t\t#unit weigth of soil\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "fi = 26.; \t\t\t\t#effective angle(degree)\n", + "co = 19.5; \t\t\t\t#cohesion value\n", + "\n", + "# Calculations\n", + "#consider 1m length of dam\n", + "SumN = An*x**2*gamma_m;\n", + "SumT = At*x**2*gamma_m;\n", + "SumU = Au*x**2*gamma_w;\n", + "Le = x*L;\n", + "F = ((Le*co)+(SumN-SumU)*math.tan(math.radians(fi)))/SumT;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Factor of safety for slope = %.2f.\"%(F);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety for slope = 1.41.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 pg : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#check section for:\n", + "#Stability of d/s slope against steady seepage\n", + "#Sloughing of u/s slope against sudden drawdown\n", + "#Stability of the foundation against shear\n", + "#Seepage through body of dam\n", + "\n", + "#Given\n", + "#Dimensions\n", + "H = 20.; \t\t\t\t#Heigth of dam\n", + "Bt = 6.; \t\t\t\t#top width of dam\n", + "s1 = 4.; \t\t\t\t#u/s slope\n", + "s2 = 3.; \t\t\t\t#d/s slope\n", + "fb = 2.; \t\t\t\t#free board\n", + "#Properties of materials of dam\n", + "gamma_d = 17.27; \t\t\t\t#dry density\n", + "wc = 0.15; \t\t\t\t#optimum water content\n", + "gamma_s = 21.19; \t\t\t\t#saturated density\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "wavg = 19.62; \t\t\t\t#average unit weigth under seepage\n", + "theta = 26.; \t\t\t\t#average angle of internal friction(degree)\n", + "co = 19.13; \t\t\t\t#average cohesion\n", + "K = 5.E-4; \t\t\t\t#coefficient of permeability\n", + "#properties of foundation materials\n", + "gamma_f = 17.27; \t\t\t\t#average unit weigth\n", + "cof = 47.87; \t\t\t\t#average cohesion\n", + "fi = 8.; \t\t\t\t#average angle internal friction\n", + "t = 6.; \t\t\t\t#thickness of clay\n", + "FOSp = 1.5; \t\t\t\t#permissible factor of safety of slope\n", + "PS = 8.E-6; \t\t\t\t#permissible seepage\n", + "#(a) Stability of d/s slope against steady seepage\n", + "An = 302.4; \t\t\t\t#area of N diagram\n", + "At = 91.2; \t\t\t\t#area of T diagram\n", + "Au = 98.4; \t\t\t\t#area of U diagram\n", + "Le = 60.; \t\t\t\t#length of arc\n", + "SumN = An*gamma_s;\n", + "SumT = At*gamma_s;\n", + "SumU = Au*gamma_w;\n", + "F = (Le*co)+(SumN-SumU)*math.tan(math.radians(theta))/SumT;\n", + "F = round(F*100)/100;\n", + "print \"Parta:\"\n", + "print \"Factor of safety for slope = %.2f.\"%(F);\n", + "print \"Safe\";\n", + "\n", + "#(b) Sloughing of u/s slope against sudden drawdown\n", + "h1 = 15.;\n", + "b = 80.;\n", + "P = gamma_s*H**2*math.tan(math.radians(45-(theta/2)))**2/2+gamma_w*h1**2/2;\n", + "sav = P/b;\n", + "smax = 2*sav;\n", + "Ne = (gamma_s-gamma_w)*b*H/2;\n", + "R = Ne*math.tan(math.radians(theta))+co*b;\n", + "fs = R/P;\n", + "fs = round(fs*100)/100;\n", + "print \"Partb:\"\n", + "print \"Factor of safety w.r.t average shear = %.2f.\"%(fs);\n", + "print \"Safe\";\n", + "sr = 0.6*H*(gamma_s-gamma_w)*math.tan(math.radians(theta))+co;\n", + "FS = sr/smax;\n", + "FS = round(FS*100)/100;\n", + "print \"Factor of safety w.r.t maximum shear = %.2f.\"%(FS);\n", + "print \"Safe\";\n", + "\n", + "#(c) Stability of the foundation against shear\n", + "h1 = 26.;\n", + "h2 = 6.;\n", + "gamma_m = (wavg*(h1-h2)+gamma_f*h2)/h1;\n", + "l = (gamma_m*h1*math.tan(math.radians(fi))+cof)/(gamma_m*h1);\n", + "fi1 = math.tan(math.radians(l));\n", + "P = (h1**2-h2**2)/2*gamma_m*math.tan(math.radians(45-(fi1/2)))**2;\n", + "sav = P/b;\n", + "smax = 2*sav;\n", + "s1 = cof+gamma_f*h2*math.tan(math.radians(fi));\n", + "s2 = cof+gamma_m*h1*math.tan(math.radians(fi));\n", + "as1 = (s1+s2)/2;\n", + "fs = as1/sav;\n", + "fs = round(fs*100)/100;\n", + "print \"Partc:\"\n", + "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n", + "print \"Safe\";\n", + "\n", + "gamma_av = (wavg*0.6*H+gamma_f*h2)/(0.6*H)+h2;\n", + "s = cof+gamma_av*0.6*H*math.tan(math.radians(fi));\n", + "fs = s/smax;\n", + "fs = round(fs*100)/100;\n", + "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n", + "print \"Unsafe\";\n", + "\n", + "#(d) Seepage through body of dam\n", + "s = 2.; \t\t\t\t#measured\n", + "q = K*s*100000/100;\n", + "print \"Partd:\"\n", + "print \" Seepage through body of dam = %.2fD-5 cumecs/m length of dam\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta:\n", + "Factor of safety for slope = 1149.17.\n", + "Safe\n", + "Partb:\n", + "Factor of safety w.r.t average shear = 2.16.\n", + "Safe\n", + "Factor of safety w.r.t maximum shear = 1.24.\n", + "Safe\n", + "Partc:\n", + "Factor of safety w.r.t overall shear = 1.18.\n", + "Safe\n", + "Factor of safety w.r.t overall shear = 0.69.\n", + "Unsafe\n", + "Partd:\n", + " Seepage through body of dam = 1.00D-5 cumecs/m length of dam\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 pg : 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from matplotlib.pylab import plot,show\n", + "from numpy import zeros\n", + "#design upstream impervious blanket\n", + "\t\t\t\t\n", + "#Given\n", + "Zb = 1.2; \t\t\t\t#thickness of blanket\n", + "Zf = 8; \t\t\t\t#dismath.tance of blanket from foundation\n", + "kb = 0.06; \t\t\t\t#coefficient of permeability of blanket material\n", + "kf = 72; \t\t\t\t#coefficient of permeability of foundation soil\n", + "Hw = 10; \t\t\t\t#heigth of water in reservior\n", + "Xd = 40;\n", + "\n", + "a = (kb/(kf*Zb*Zf))**0.5;\n", + "Xo = 1.414/a;\n", + "\n", + "#we vary value of x\n", + "x = [0, 25, 50, 75, 100, 125, 151.8, 300]\n", + "Xr = zeros(8)\n", + "ho = zeros(8)\n", + "r = zeros(8)\n", + "\n", + "for i in range(8):\n", + " e = math.exp(2*a*x[i]);\n", + " Xr[i] = (e-1)/(a*(e+1));\n", + " ho[i] = Xr[i]*Hw/(Xr[i]+Xd);\n", + " r[i] = Xr[i]*100/(Xr[i]+Xd);\n", + "\n", + "print \"x Xr ho reduction qpercent\";\n", + "for i in range(8):\n", + " print \"%.2f %.2f %.2f %.2f\"%(x[i],Xr[i],ho[i],r[i]);\n", + "\n", + "#graph is plotted between r and x.\n", + "#after around 130m length there is only slight increase in head dissipated(ho)\n", + "plot(x,r)\n", + "show()\n", + "L = 130;\n", + "print \"Thickness of blanket = %.2f m\"%(Zb);\n", + "print \"Length of blanket = %i m.\"%(L);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "x Xr ho reduction qpercent\n", + "0.00 0.00 0.00 0.00\n", + "25.00 24.56 3.80 38.04\n", + "50.00 46.67 5.38 53.85\n", + "75.00 64.78 6.18 61.83\n", + "100.00 78.50 6.62 66.24\n", + "125.00 88.28 6.88 68.82\n", + "151.80 95.35 7.04 70.45\n", + "300.00 106.53 7.27 72.70\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", +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G+7Ny/HrqXwvZOH6DgaWEkvUq\n4JvR/oY9fv0J5ZjJwECyU2v/DeEfvbs5wD9F29cAN9W1RdU5FZjB3qHXU3+OIRzHgYTj+ip1XLS8\nQqX6dyPwpRLPTVv/xgIfi7aHEUqg08nO8eupf1k5fgAHRfcDgGeAU6jR8Yuj42V9KSmlikcLnQfM\ni7bnARfUtzlVeRLYWrSvp/6cD9xHOJ7rCcf3hPibWJVS/YPSI77S1r82wv/kANuAlwnfEcnK8eup\nf5CN4wfwbnQ/iHAivJUaHb84Qr2sLyWlUAFYADwLfD7aN4bwJz7R/ZgE2lVLPfXng4Tj2CnNx/QK\n4L+B/6Drz9s0928y4S+SpWTz+E0m9O+Z6HFWjt8BhF9c7XSVmmpy/OII9ax+KemThP+4zgG+QPjz\nvrsC2ep7b/1JY19vB44g/Gm/EbhlP89NQ/+GAQ8BVwJ/KPpZFo7fMOBHhP5tI1vHr4PQj/HAacDM\nop9XfPziCPXfEi50dJrA3r9l0mpjdP8m8DDhz592Qv0PYBywKYF21VJP/Sk+puOjfWmzia7/WebS\n9SdsGvs3kBDo9wDzo31ZOn6d/fs+Xf3L0vHr9Dbwc+B4Gvj4ZfFLSQcBw6PtocBiwhXoOXSN7rmW\ndF0ohXCMii+UlupP54WaQYQzpXXEv8BKLUxm7/6N67Z9NXBvtJ22/vUD7gZuLdqflePXU/+ycvwO\noat0NAR4AjiDBj9+WftS0hGEf9QXCEOsOvs0mlBnT+OQxvuA3wE7CddA/o799+d6wvFcDfzPura0\nMsX9+xwhKFYQarLz2fsaSJr6dwrhz/cX6BredzbZOX6l+ncO2Tl+xwLPE/q3AvhKtD8rx0+SJEmS\nJEmSJEmSJEmSJEmSJElSI/r//MLloWR9quQAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of blanket = 1.20 m\n", + "Length of blanket = 130 m.\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11.ipynb new file mode 100755 index 00000000..f4d8bc9d --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11.ipynb @@ -0,0 +1,573 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:af2e84ceb74c3bc3148f31759e2a692dba979671e7232787c666481af8571437" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : SPILLWAYS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 pg : 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h = 1.2; \t\t\t\t#head of water\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "rho = 1; \t\t\t\t#density of water\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "\n", + "q = Cd*h**1.5;\n", + "\n", + "#applying bernaulli's equation at u/s water surface at section A and B\n", + "#solving it by error and trial method we get\n", + "v1 = 13.7;v2 = 14.7;\n", + "d1 = 0.212;d2 = 0.197;\n", + "\n", + "F1 = gamma_w*d1**2*math.cos(math.radians(60))/2;\n", + "F2 = gamma_w*d2**2/2;\n", + "W = gamma_w*60*2*math.pi*3*((d1+d2)/2)/360;\n", + "Fx = rho*q*(v2-v1*math.cos(math.radians(60)))-F1/2+F2;\n", + "Fy = rho*q*(v1*math.sin(math.radians(60)))+F1*math.sin(math.radians(60))+W;\n", + "F = (Fx**2+Fy**2)**0.5;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Resultant force = %.2f kN/m.\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force = 46.68 kN/m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 pg : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "C = 2.4; \t\t\t\t#coefficient of discharge\n", + "H = 2; \t\t\t\t#head\n", + "L = 100; \t\t\t\t#length of spillway\n", + "wc = 8; \t\t\t\t#heigth of weir crest above bottom\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "h = H+wc;\n", + "Q1 = C*L*H**(1.5); \t\t\t\t#neglecting approach velocity and end contractions\n", + "va = Q1/(h*L);\n", + "ha = va**2/(2*g);\n", + "Ha = ha+H;\n", + "Q = C*L*Ha**1.5;\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \"discharge over oggy weir = %.2f cumecs.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge over oggy weir = 690.80 cumecs.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#capacity of siphon\n", + "#head required in oggy spillway\n", + "#length of oggy weir required\n", + "\n", + "#Given\n", + "t = 6; \t\t\t\t#tail water elevation\n", + "h = 1; \t\t\t\t#heigth of siphon spillway\n", + "w = 4; \t\t\t\t#width of siphon spillway\n", + "hw = 1.5; \t\t\t\t#head water elevation\n", + "C = 0.6; \t\t\t\t#coefficient of discharge\n", + "Co = 2.25; \t\t\t\t#coefficient of discharge of oggy spillway\n", + "lo = 4; \t\t\t\t#length of oggy spillway\n", + "hc = 1.5; \t\t\t\t#head on weir crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations and Results\n", + "#part (a)\n", + "Q = C*h*w*(2*g*(t+hw))**0.5;\n", + "Q = round(Q*10)/10;\n", + "print \"capacity of siphon = %.2f cumecs.\"%(Q);\n", + "\n", + "#part (b)\n", + "h1 = (Q/(Co*lo))**(2./3);\n", + "h1 = round(h1*100)/100;\n", + "print \"head required in oggy spillway = %.2f m\"%(h1);\n", + "\n", + "#part (c)\n", + "L = Q/(Co*(hc)**1.5);\n", + "L = round(L*100)/100;\n", + "print \"length of oggy weir required = %.2f m.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacity of siphon = 29.10 cumecs.\n", + "head required in oggy spillway = 2.19 m\n", + "length of oggy weir required = 7.04 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "rl = 435; \t\t\t\t#full reservior level\n", + "cl = 429.6; \t\t\t\t#level of centre of siphon\n", + "hfl = 435.85; \t\t\t\t#high flood level\n", + "hfd = 600; \t\t\t\t#high flood discharge\n", + "w = 4; \t\t\t\t#width of throat\n", + "h = 2; \t\t\t\t#heigth of throat\n", + "C = 0.65; \t\t\t\t#coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = hfl-cl;\n", + "Q = C*w*h*(2*g*H)**0.5;\n", + "n = hfd/Q;\n", + "n = round(n*100)/100;\n", + "\n", + "# Results\n", + "print \" number of siphons units required = %.2f.hence provide 11 siphons units.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " number of siphons units required = 10.42.hence provide 11 siphons units.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 pg : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange,zeros\n", + "\n", + "#design oggy spillway for concrete gravity dam\n", + "\n", + "#Given\n", + "rbl = 250; \t\t\t\t#avarage river bed level\n", + "rlc = 350; \t\t\t\t#R.L of spillway crest\n", + "s = 0.75; \t\t\t\t#slope on downstream side\n", + "Q = 6500; \t\t\t\t#discharge\n", + "L = 5*9; \t\t\t\t#length of spillway\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "t = 2; \t\t\t\t#thickness of each pier\n", + "\n", + "#step 1. computation of design head\n", + "H = (Q/(Cd*L))**(2./3);\n", + "P = rlc-rbl;\n", + "\n", + "#P/H = 6.15,which is<1.33;it is a high overflow spillway\n", + "\n", + "#H+P/H = 7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n", + "\n", + "Kp = 0.01;\n", + "Ka = 0.1;\n", + "N = 4;\n", + "He = 17.5; \t\t\t\t#assumed\n", + "Le = L-2*(N*Kp+Ka)*He;\n", + "He1 = (Q/(Cd*Le))**(2./3);\n", + "He1 = round(He1*100)/100;\n", + "#He1 is almost equal to He\n", + "print \"crest profile will be designed for Hd = %.2f m.\"%(He1);\n", + "\n", + "#step 2. determination of d/s profile\n", + "\n", + "#equating the slope of d/s side and derivative of profile equation suggested by WES\n", + "x = 27.03;\n", + "y = 0.04372*x**1.85;\n", + "print \"downstream profile:\";\n", + "x = arange(1,27)\n", + "y = zeros(26)\n", + "for i in range(26):\n", + " y[i] = 0.04372*x[i]**1.85;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(26):\n", + " print \"%i %.2f\"%(x[i],y[i]);\n", + "\n", + "print \"27.03 19.48\";\n", + "#step 3. determination of u/s profile\n", + "# math.cosidering equation for vertical u/s face and Hd = 17.58\n", + "\n", + "print \"upstream profile:\";\n", + "x = [-0.5, -0.1, -1.5, -2.0, -3.0, -4.0, -4.75];\n", + "y = zeros(7)\n", + "for i in range(7):\n", + " if i==6:\n", + " y[i] = 0.0633*(x[i]+4.75)**1.85+2.2151-1.2643*(x[i]+4.75)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + " continue\n", + " \n", + " y[i] = 0.0633*(x[i]+4.7466)**1.85+2.2151-1.2643*(x[i]+4.7466)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(7):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "\n", + "\n", + "#step 4.design of d/s bucket\n", + "\n", + "R = P/4;\n", + "print \"radius of bucket = %i m.\"%(R);\n", + "print \"bucket will subtend angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest profile will be designed for Hd = 17.58 m.\n", + "downstream profile:\n", + "x y\n", + "1 0.04\n", + "2 0.16\n", + "3 0.33\n", + "4 0.57\n", + "5 0.86\n", + "6 1.20\n", + "7 1.60\n", + "8 2.05\n", + "9 2.55\n", + "10 3.10\n", + "11 3.69\n", + "12 4.34\n", + "13 5.03\n", + "14 5.77\n", + "15 6.55\n", + "16 7.38\n", + "17 8.26\n", + "18 9.18\n", + "19 10.15\n", + "20 11.16\n", + "21 12.21\n", + "22 13.31\n", + "23 14.45\n", + "24 15.63\n", + "25 16.86\n", + "26 18.13\n", + "27.03 19.48\n", + "upstream profile:\n", + "x y\n", + "-0.50 0.01\n", + "-0.10 -0.00\n", + "-1.50 0.14\n", + "-2.00 0.25\n", + "-3.00 0.60\n", + "-4.00 1.20\n", + "-4.75 2.21\n", + "radius of bucket = 25 m.\n", + "bucket will subtend angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 pg : 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design length and depth of stilling bamath.sin\n", + "\t\t\t\t\n", + "#Given\n", + "q = 1; \t\t\t\t#discharge of spillway\n", + "Cd = 0.7; \t\t\t\t#coefficient of discharge\n", + "h1 = 10; \t\t\t\t#heigth of crest above downstream silting bamath.sin\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "Cv = 0.9; \t\t\t\t#coefficient of velocity\n", + "\n", + "# Calculations\n", + "h = (3*q/(2*Cd*(2*g)**0.5))**(2./3);\n", + "H = h1+h/2;\n", + "vt = (2*g*H)**0.5;\n", + "v1 = Cv*vt;\n", + "y1 = q/v1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\t\t\t\t#F>1, flow is super-critical\n", + "y2 = 1;\n", + "v2 = q/y2;\n", + "F2 = v2/(g*y2)**0.5; \t\t\t\t#<1\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-1;\n", + "le = 5*(y2-y1);\n", + "de = round(de*1000)/1000;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 0.58 m.\n", + "length of stilling bamath.sin = 7.50 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 pg : 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 7.83; \t\t\t\t#discharge through spillway\n", + "w = 12.5; \t\t\t\t#width of fall\n", + "d = 2.; \t\t\t\t#depth of water in downstream\n", + "g = 9.8;\n", + "\n", + "y1 = 0.5;\n", + "v1 = q/y1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\n", + "#F>1,flow is super-critical\n", + "\n", + "# Calculations\n", + "v2 = q/d;\n", + "F2 = v2/(g*d)**0.5;\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-d;\n", + "le = 5*(y2-y1);\n", + "de = round(de*100)/100;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 2.76 m.\n", + "length of stilling bamath.sin = 21.30 m.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Ag = 5*2.5; \t\t\t\t#area of gate\n", + "miu = 0.25; \t\t\t\t#coefficient of friction\n", + "w = 0.5; \t\t\t\t#weigth of gate\n", + "h = 2; \t\t\t\t#head of water over crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "gamma_w = 1000; \t\t\t\t#unit weigth of water\n", + "\n", + "\n", + "# Calculations\n", + "m = w*g*1000;\n", + "F = gamma_w*Ag*h*h*g/10;\n", + "ff = miu*F;\n", + "tf = (m+ff)/1000;\n", + "\n", + "# Results\n", + "print \"force to be exerted to lift the gate = %.2f kN.\"%(tf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "force to be exerted to lift the gate = 17.17 kN.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 19; \t\t\t\t#dischrge through spillway\n", + "E = 1; \t\t\t\t#energy loss\n", + "\n", + "\t\t\t\t#from energy loss equation;E = (y2-y1)**3/4y2y1; and solving it we get\n", + "\t\t\t\t#x = 0.5*(-1+(1+294.39*(x-1)**9/64*x**3))\n", + "\t\t\t\t#by trial and error method x = 2.806\n", + "x = 2.806;\n", + "y1 = 4*x/(x-1)**3;\n", + "y2 = x*y1;\n", + "y1 = round(y1*1000)/1000;\n", + "y2 = round(y2*1000)/1000;\n", + "print \"depth of flow at both end of jumps = %.2f m and %.2f m. respectively.\"%(y1,y2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of flow at both end of jumps = 1.91 m and 5.35 m. respectively.\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f4d8bc9d --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_1.ipynb @@ -0,0 +1,573 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:af2e84ceb74c3bc3148f31759e2a692dba979671e7232787c666481af8571437" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : SPILLWAYS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 pg : 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h = 1.2; \t\t\t\t#head of water\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "rho = 1; \t\t\t\t#density of water\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "\n", + "q = Cd*h**1.5;\n", + "\n", + "#applying bernaulli's equation at u/s water surface at section A and B\n", + "#solving it by error and trial method we get\n", + "v1 = 13.7;v2 = 14.7;\n", + "d1 = 0.212;d2 = 0.197;\n", + "\n", + "F1 = gamma_w*d1**2*math.cos(math.radians(60))/2;\n", + "F2 = gamma_w*d2**2/2;\n", + "W = gamma_w*60*2*math.pi*3*((d1+d2)/2)/360;\n", + "Fx = rho*q*(v2-v1*math.cos(math.radians(60)))-F1/2+F2;\n", + "Fy = rho*q*(v1*math.sin(math.radians(60)))+F1*math.sin(math.radians(60))+W;\n", + "F = (Fx**2+Fy**2)**0.5;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Resultant force = %.2f kN/m.\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force = 46.68 kN/m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 pg : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "C = 2.4; \t\t\t\t#coefficient of discharge\n", + "H = 2; \t\t\t\t#head\n", + "L = 100; \t\t\t\t#length of spillway\n", + "wc = 8; \t\t\t\t#heigth of weir crest above bottom\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "h = H+wc;\n", + "Q1 = C*L*H**(1.5); \t\t\t\t#neglecting approach velocity and end contractions\n", + "va = Q1/(h*L);\n", + "ha = va**2/(2*g);\n", + "Ha = ha+H;\n", + "Q = C*L*Ha**1.5;\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \"discharge over oggy weir = %.2f cumecs.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge over oggy weir = 690.80 cumecs.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#capacity of siphon\n", + "#head required in oggy spillway\n", + "#length of oggy weir required\n", + "\n", + "#Given\n", + "t = 6; \t\t\t\t#tail water elevation\n", + "h = 1; \t\t\t\t#heigth of siphon spillway\n", + "w = 4; \t\t\t\t#width of siphon spillway\n", + "hw = 1.5; \t\t\t\t#head water elevation\n", + "C = 0.6; \t\t\t\t#coefficient of discharge\n", + "Co = 2.25; \t\t\t\t#coefficient of discharge of oggy spillway\n", + "lo = 4; \t\t\t\t#length of oggy spillway\n", + "hc = 1.5; \t\t\t\t#head on weir crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations and Results\n", + "#part (a)\n", + "Q = C*h*w*(2*g*(t+hw))**0.5;\n", + "Q = round(Q*10)/10;\n", + "print \"capacity of siphon = %.2f cumecs.\"%(Q);\n", + "\n", + "#part (b)\n", + "h1 = (Q/(Co*lo))**(2./3);\n", + "h1 = round(h1*100)/100;\n", + "print \"head required in oggy spillway = %.2f m\"%(h1);\n", + "\n", + "#part (c)\n", + "L = Q/(Co*(hc)**1.5);\n", + "L = round(L*100)/100;\n", + "print \"length of oggy weir required = %.2f m.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacity of siphon = 29.10 cumecs.\n", + "head required in oggy spillway = 2.19 m\n", + "length of oggy weir required = 7.04 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "rl = 435; \t\t\t\t#full reservior level\n", + "cl = 429.6; \t\t\t\t#level of centre of siphon\n", + "hfl = 435.85; \t\t\t\t#high flood level\n", + "hfd = 600; \t\t\t\t#high flood discharge\n", + "w = 4; \t\t\t\t#width of throat\n", + "h = 2; \t\t\t\t#heigth of throat\n", + "C = 0.65; \t\t\t\t#coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = hfl-cl;\n", + "Q = C*w*h*(2*g*H)**0.5;\n", + "n = hfd/Q;\n", + "n = round(n*100)/100;\n", + "\n", + "# Results\n", + "print \" number of siphons units required = %.2f.hence provide 11 siphons units.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " number of siphons units required = 10.42.hence provide 11 siphons units.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 pg : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange,zeros\n", + "\n", + "#design oggy spillway for concrete gravity dam\n", + "\n", + "#Given\n", + "rbl = 250; \t\t\t\t#avarage river bed level\n", + "rlc = 350; \t\t\t\t#R.L of spillway crest\n", + "s = 0.75; \t\t\t\t#slope on downstream side\n", + "Q = 6500; \t\t\t\t#discharge\n", + "L = 5*9; \t\t\t\t#length of spillway\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "t = 2; \t\t\t\t#thickness of each pier\n", + "\n", + "#step 1. computation of design head\n", + "H = (Q/(Cd*L))**(2./3);\n", + "P = rlc-rbl;\n", + "\n", + "#P/H = 6.15,which is<1.33;it is a high overflow spillway\n", + "\n", + "#H+P/H = 7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n", + "\n", + "Kp = 0.01;\n", + "Ka = 0.1;\n", + "N = 4;\n", + "He = 17.5; \t\t\t\t#assumed\n", + "Le = L-2*(N*Kp+Ka)*He;\n", + "He1 = (Q/(Cd*Le))**(2./3);\n", + "He1 = round(He1*100)/100;\n", + "#He1 is almost equal to He\n", + "print \"crest profile will be designed for Hd = %.2f m.\"%(He1);\n", + "\n", + "#step 2. determination of d/s profile\n", + "\n", + "#equating the slope of d/s side and derivative of profile equation suggested by WES\n", + "x = 27.03;\n", + "y = 0.04372*x**1.85;\n", + "print \"downstream profile:\";\n", + "x = arange(1,27)\n", + "y = zeros(26)\n", + "for i in range(26):\n", + " y[i] = 0.04372*x[i]**1.85;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(26):\n", + " print \"%i %.2f\"%(x[i],y[i]);\n", + "\n", + "print \"27.03 19.48\";\n", + "#step 3. determination of u/s profile\n", + "# math.cosidering equation for vertical u/s face and Hd = 17.58\n", + "\n", + "print \"upstream profile:\";\n", + "x = [-0.5, -0.1, -1.5, -2.0, -3.0, -4.0, -4.75];\n", + "y = zeros(7)\n", + "for i in range(7):\n", + " if i==6:\n", + " y[i] = 0.0633*(x[i]+4.75)**1.85+2.2151-1.2643*(x[i]+4.75)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + " continue\n", + " \n", + " y[i] = 0.0633*(x[i]+4.7466)**1.85+2.2151-1.2643*(x[i]+4.7466)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(7):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "\n", + "\n", + "#step 4.design of d/s bucket\n", + "\n", + "R = P/4;\n", + "print \"radius of bucket = %i m.\"%(R);\n", + "print \"bucket will subtend angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest profile will be designed for Hd = 17.58 m.\n", + "downstream profile:\n", + "x y\n", + "1 0.04\n", + "2 0.16\n", + "3 0.33\n", + "4 0.57\n", + "5 0.86\n", + "6 1.20\n", + "7 1.60\n", + "8 2.05\n", + "9 2.55\n", + "10 3.10\n", + "11 3.69\n", + "12 4.34\n", + "13 5.03\n", + "14 5.77\n", + "15 6.55\n", + "16 7.38\n", + "17 8.26\n", + "18 9.18\n", + "19 10.15\n", + "20 11.16\n", + "21 12.21\n", + "22 13.31\n", + "23 14.45\n", + "24 15.63\n", + "25 16.86\n", + "26 18.13\n", + "27.03 19.48\n", + "upstream profile:\n", + "x y\n", + "-0.50 0.01\n", + "-0.10 -0.00\n", + "-1.50 0.14\n", + "-2.00 0.25\n", + "-3.00 0.60\n", + "-4.00 1.20\n", + "-4.75 2.21\n", + "radius of bucket = 25 m.\n", + "bucket will subtend angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 pg : 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design length and depth of stilling bamath.sin\n", + "\t\t\t\t\n", + "#Given\n", + "q = 1; \t\t\t\t#discharge of spillway\n", + "Cd = 0.7; \t\t\t\t#coefficient of discharge\n", + "h1 = 10; \t\t\t\t#heigth of crest above downstream silting bamath.sin\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "Cv = 0.9; \t\t\t\t#coefficient of velocity\n", + "\n", + "# Calculations\n", + "h = (3*q/(2*Cd*(2*g)**0.5))**(2./3);\n", + "H = h1+h/2;\n", + "vt = (2*g*H)**0.5;\n", + "v1 = Cv*vt;\n", + "y1 = q/v1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\t\t\t\t#F>1, flow is super-critical\n", + "y2 = 1;\n", + "v2 = q/y2;\n", + "F2 = v2/(g*y2)**0.5; \t\t\t\t#<1\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-1;\n", + "le = 5*(y2-y1);\n", + "de = round(de*1000)/1000;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 0.58 m.\n", + "length of stilling bamath.sin = 7.50 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 pg : 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 7.83; \t\t\t\t#discharge through spillway\n", + "w = 12.5; \t\t\t\t#width of fall\n", + "d = 2.; \t\t\t\t#depth of water in downstream\n", + "g = 9.8;\n", + "\n", + "y1 = 0.5;\n", + "v1 = q/y1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\n", + "#F>1,flow is super-critical\n", + "\n", + "# Calculations\n", + "v2 = q/d;\n", + "F2 = v2/(g*d)**0.5;\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-d;\n", + "le = 5*(y2-y1);\n", + "de = round(de*100)/100;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 2.76 m.\n", + "length of stilling bamath.sin = 21.30 m.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Ag = 5*2.5; \t\t\t\t#area of gate\n", + "miu = 0.25; \t\t\t\t#coefficient of friction\n", + "w = 0.5; \t\t\t\t#weigth of gate\n", + "h = 2; \t\t\t\t#head of water over crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "gamma_w = 1000; \t\t\t\t#unit weigth of water\n", + "\n", + "\n", + "# Calculations\n", + "m = w*g*1000;\n", + "F = gamma_w*Ag*h*h*g/10;\n", + "ff = miu*F;\n", + "tf = (m+ff)/1000;\n", + "\n", + "# Results\n", + "print \"force to be exerted to lift the gate = %.2f kN.\"%(tf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "force to be exerted to lift the gate = 17.17 kN.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 19; \t\t\t\t#dischrge through spillway\n", + "E = 1; \t\t\t\t#energy loss\n", + "\n", + "\t\t\t\t#from energy loss equation;E = (y2-y1)**3/4y2y1; and solving it we get\n", + "\t\t\t\t#x = 0.5*(-1+(1+294.39*(x-1)**9/64*x**3))\n", + "\t\t\t\t#by trial and error method x = 2.806\n", + "x = 2.806;\n", + "y1 = 4*x/(x-1)**3;\n", + "y2 = x*y1;\n", + "y1 = round(y1*1000)/1000;\n", + "y2 = round(y2*1000)/1000;\n", + "print \"depth of flow at both end of jumps = %.2f m and %.2f m. respectively.\"%(y1,y2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of flow at both end of jumps = 1.91 m and 5.35 m. respectively.\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12.ipynb new file mode 100755 index 00000000..edc47614 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12.ipynb @@ -0,0 +1,1384 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b0cdc42f1fc8747c583aaf55d3f5af5550eb632d3c87d035821d8a7d148eae09" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : DIVERSION HEADWORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 pg : 576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#uplift presuures and thickness of floor at 6m, 12m and 18m from u/s\n", + "\n", + "#Given\n", + "rho = 2.24; \t\t\t\t#relative density of material\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "L = 22.; \t\t\t\t#total length\n", + "lc = (2.*6)+L+(2*8); \t\t\t\t#length of creep\n", + "hg = 4./lc; \t\t\t\t#hydraulic gradient\n", + "print \"avearge hydraulic gradient = %.2f.\"%(hg);\n", + "#at 6 m from u/s\n", + "x = 6.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4.*h1/(3*(rho-1));\n", + "up = round(up*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 6 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 6 m from u/s = %.2f m.\"%(t);\n", + "\n", + "#at 12 m from u/s\n", + "x = 12.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4.*h1/(3*(rho-1));\n", + "up = round(up*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 12 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 12 m from u/s = %.2f m.\"%(t);\n", + "\n", + "#at 18m from u/s\n", + "x = 18.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4*h1/(3*(rho-1));\n", + "up = round(up*10)/10;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 18 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 18 m from u/s = %.2f m.\"%(t);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avearge hydraulic gradient = 0.08.\n", + "uplift at 6 m from u/s = 25.11 kN/square metre.\n", + "thickness at 6 m from u/s = 2.75 m.\n", + "uplift at 12 m from u/s = 20.40 kN/square metre.\n", + "thickness at 12 m from u/s = 2.24 m.\n", + "uplift at 18 m from u/s = 15.70 kN/square metre.\n", + "thickness at 18 m from u/s = 1.72 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 pg : 589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#check whether section is safe against overturning and piping\n", + "\n", + "#Given\n", + "b = 54.; \t\t\t\t#width of section\n", + "D1D2 = 16; \t\t\t\t#dismath.tance between points D1 and D2\n", + "D2D3 = 37; \t\t\t\t#dismath.tance between points D2 and D3\n", + "\n", + "#first pipe line\n", + "#taking data from figure\n", + "d = 105-97;\n", + "b1 = 0.5;\n", + "alpha = b/d;\n", + "#from the curves we get\n", + "fic1 = 0.665;\n", + "fid1 = 0.76;\n", + "fie1 = 1;\n", + "t = 105-104; \t\t\t\t#floor thickness\n", + "corec = (fid1-fic1)*100*t/d; \t\t\t\t#correction for floor thickness\n", + "#for pile no. 2\n", + "D = 104-97;\n", + "d = 104-97;\n", + "bdash = 16;\n", + "C = 19*(D/bdash)**0.5*(d+D)/b; \t\t\t\t#correction for pile no. 2\n", + "fic1 = fic1*100+corec+C; \t\t\t\t#corrected pressures\n", + "\n", + "#intermedite pipe line\n", + "d = 105-97;\n", + "b1 = 16.5;\n", + "alpha = b/d;\n", + "r = b1/b; \t\t\t\t#ratio b1/b\n", + "#from the curves we get\n", + "fic2 = 0.52;\n", + "fie2 = 0.725;\n", + "fid2 = 0.615;\n", + "corec_c1 = (fid2-fic2)*100*t/d;\n", + "corec_e1 = (fie2-fid2)*100/d;\n", + "\n", + "#for pile no. 1\n", + "C1 = C;\n", + "d = 104-97;\n", + "bdash = 37;\n", + "D = 104-95;\n", + "C2 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "#correction due to slope\n", + "corec_e2 = 3.3; \t\t\t\t#from table 12.4\n", + "#correction is negative due to upwrd slope\n", + "l = 4; \t\t\t\t#horizontal length of slope\n", + "corec_c2 = corec_e2*l/bdash;\n", + "\n", + "fie2 = fie2*100-corec_e1-corec_e2;\n", + "fic2 = fic2*100+corec_c1+C2-corec_c2;\n", + "\n", + "#pile no. 3 at d/s end\n", + "d = 103.5-95;\n", + "alpha_ = d/b;\n", + "#for curves\n", + "fie3 = 0.35;fid3 = 0.242;\n", + "corec_t = (fie3-fid3)*100*(103.5-102)/d;\n", + "\n", + "#correction for interference at pile no. 2\n", + "d = 102-95;\n", + "D = 102-97;\n", + "C3 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fie3 = fie3*100-corec_t-C3;\n", + "\n", + "point = ['C1', 'C2' ,'E2' ,'E3']; \t\t\t\t#Point\n", + "P = [fic1 ,fic2 ,fie2 ,fie3]; \t\t\t\t#pressure percent\n", + "P_ = [3.55 ,2.78, 3.39, 1.58]; \t\t\t\t#pressure head\n", + "print \"Points Pressure percent Pressure head\";\n", + "\n", + "for i in range(4):\n", + " P[i] = round(P[i]*10)/10;\n", + " print \"%s %.2f %.2f\"%(point[i],P[i],P_[i]);\n", + "\n", + "\n", + "#check for floor thickness\n", + "Pa = P_[1]-((P_[1]-P_[3])*6.5/37);\n", + "Pb = P_[1]-((P_[1]-P_[3])*24/37);\n", + "Pc = P_[1]-((P_[1]-P_[3])*30/37);\n", + "rho = 2.24; \t\t\t\t#specific gravity of concrete\n", + "ta = Pa/(rho-1);\n", + "tb = Pb/(rho-1);\n", + "tc = Pc/(rho-1);\n", + "ta = round(ta*100)/100;\n", + "tb = round(tb*100)/100;\n", + "tc = round(tc*100)/100;\n", + "print \"Thickness required at A = %.2f m.\"%(ta);\n", + "print \"Thickness required at B = %.2f m.\"%(tb);\n", + "print \"Thickness required at C = %.2f m.\"%(tc);\n", + "t = 103.5-102;\n", + "print \"Thickness provided = %.2f m.\"%(t);\n", + "print \"Floor thickness at B and C are adequate\";\n", + "\n", + "#exit gradient\n", + "H = 108.5-103.5; \t\t\t\t#seepage head\n", + "d = 103.5-95; \t\t\t\t#depth cut-off\n", + "#from exit gradient curve\n", + "alpha = 6.35;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "Ge = H/(d*math.pi*lambda1**0.5);\n", + "print \"exit gradient = %.2f.\"%(Ge);\n", + "print \" it is less than permissible exit gradient < 1/6Hence safe..\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Points Pressure percent Pressure head\n", + "C1 67.70 3.55\n", + "C2 52.80 2.78\n", + "E2 67.80 3.39\n", + "E3 33.10 1.58\n", + "Thickness required at A = 2.07 m.\n", + "Thickness required at B = 1.61 m.\n", + "Thickness required at C = 1.46 m.\n", + "Thickness provided = 1.50 m.\n", + "Floor thickness at B and C are adequate\n", + "exit gradient = 0.10.\n", + " it is less than permissible exit gradient < 1/6Hence safe..\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 pg : 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots,ceil\n", + "\n", + "#design a vertical drop weir on Bligh's theory\n", + "#test floor by Khosla's theory\n", + "\n", + "#Given\n", + "Q = 2800; \t\t\t\t#maximum flood discharge\n", + "hfl = 285; \t\t\t\t#H.F.L before construction\n", + "hw = 278; \t\t\t\t#minimum water level\n", + "fsl = 284; \t\t\t\t#F.S.L of canal\n", + "c = 12; \t\t\t\t#coefficient of creep\n", + "flux = 1; \t\t\t\t#allowable afflux\n", + "Ge = 1./6; \t\t\t\t#permissible exit gradient\n", + "rho = 2.24; \t\t\t\t#specific gravity of concrete\n", + "\n", + "#Hydraulic calculation\n", + "L = 4.75*Q**0.5;\n", + "q = Q/L;\n", + "q = round(q*10)/10;\n", + "print \"Hydraulic calculation:\";\n", + "print \"discharge per unit width of river = %.2f cumecs.\"%(q);\n", + "f = 1;\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "R = round(R*100)/100;\n", + "print \"regime scour depth = %.2f m.\"%(R);\n", + "V = q/R; \t\t\t\t#regime velocity\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "l_down = hfl+vh;\n", + "l_up = l_down+flux;\n", + "hfl_up = l_up-vh;\n", + "hfl_down = hfl-0.5;\n", + "hfl_down = round(hfl_down*100)/100;\n", + "print \"actual d/s H.F.L allowing 0.5 m for retrogation = %.2f m.\"%(hfl_down);\n", + "K = (q/1.7)**(2./3);\n", + "cl = l_up-K; \t\t\t\t#crest level\n", + "cl = round(cl*100)/100;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "pl = fsl+0.5; \t\t\t\t#pond level\n", + "s = hfl_down-cl; \t\t\t\t#heigth of shutter\n", + "print \"heigth of shutter = %.2f m.\"%(s);\n", + "rl_up_pile = hfl_up-1.5*R; \t\t\t\t#R.L of bottom u/s pile\n", + "d_up_cut = hw-276; \t\t\t\t#depth of upstream cut-off\n", + "print \"depth of upstream cut-off = %.2f m.\"%(d_up_cut);\n", + "print \" provide concrete cut off 2 m depth.\";\n", + "rl_bot_ds = hfl_down-2*R;\n", + "Hs = hfl_down-hw; \t\t\t\t#seepage head\n", + "Hc = cl-hw; \t\t\t\t#heigth of crest\n", + "print \"R.L of gates crest = %.2f m.\"%(Hs);\n", + "print \"Heigth of crest = %.2f m.\"%(Hc);\n", + "\n", + "#design of weir wall\n", + "d = hfl_up-cl;\n", + "a = d/(rho)**0.5;\n", + "a = 3*d/(2*rho); \t\t\t\t#from sliding consideration\n", + "a = s+1; \t\t\t\t#from practical consieration\n", + "a = a+1;\n", + "print \"design of weir wall:\"\n", + "print \"provide top width of %i m.\"%(a);\n", + "Mo = 9.81*Hs**3/6; \t\t\t\t#overtirning moment\n", + "#equating the moment of resismath.tance to overturning moment and putting the values we get\n", + "#y = poly([-1.084,0.020,0.039],'x','c');\n", + "y = [0.039,0.020,-1.084]\n", + "b = roots(y)[1];\n", + "#we get b = - 5.5347261 and 5.0219056\n", + "#taking\n", + "b = 5;\n", + "#when weir is submerged\n", + "C = 0.58;\n", + "d = (q**2/((2*C/3)**2*2*9.81))**(1./3);\n", + "Mo = 9.81*d*Hc**2/2;\n", + "#from equation of moment of resistence we get\n", + "y = [1,3,-77.55]\n", + "b = ceil(roots(y)[1]); #we get b = - 10.433085 and 7.4330846\n", + "print \"bottom width = %i m.\"%(b);\n", + "\n", + "#design of impervious and pervious aprons\n", + "C = 12;\n", + "L = C*Hs;\n", + "print \"design of impervious and pervious aprons:\";\n", + "print \"total creep length = %i m.\"%(L);\n", + "l1 = 2.21*C*(Hs/13)**0.5;\n", + "l1_ = l1+1;\n", + "print \"length of downstream impervious apron = %i m.\"%(l1_);\n", + "d1 = hw-276;\n", + "d2 = hw-271;\n", + "l2 = L-l1-(b+2*d1+2*d2);\n", + "print \"length of upstream impervious apron = %i m.\"%(l2);\n", + "l3 = 18*C*(Hs*q/975)**0.5;\n", + "print \"total length of d/s apron = %i m.\"%(l3); \t\t\t\t#calculation is wrong in book\n", + "l = l3-l1;\n", + "le = l/2;\n", + "le = round(le*100)/100;\n", + "print 'provide filter of length %.2f m. and launching apron of length %.2f m.'%(le,le);\n", + "t = d2*10**0.5/le;\n", + "print \"thickness of launching apron in horizontal position = %.2f m.\"%(t);\n", + "print \"provide launching apron of thickness 1.5 m.\";\n", + "T = 2*d1;\n", + "V = d1*10**0.5;\n", + "ta = V/T;\n", + "ta = round(ta*10)/10;\n", + "print \"thickness of apron in horizontal position = %.2f m.\"%(ta);\n", + "Hr = Hs-Hs*(4+33+8)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print 'provide thickness of %.2f m from d/s of weir wall to point 6 m from it.'%(t);\n", + "Hr = Hs-Hs*(4+33+8+6)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print \"provide thickness of %.2f m from 6 m to 12 m from d/s end of weir wall.\"%(t);\n", + "Hr = Hs-Hs*(4+33+8+12)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print \"provide thickness of %.2f m for rest of length of weir floor.\"%(t);\n", + "\n", + "#check by khosla's theory\n", + "b = 33+8+19; \t\t\t\t#total horizontal length of impervious floor\n", + "d = 7; \t\t\t\t#depth of downstream pile\n", + "alpha = b/d;\n", + "n = 0.14; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "Ge = Hs*n/d;\n", + "print \"check by Khosla theory:\";\n", + "print \"exit gradient = %.2f. < 1/6 hence safe\"%(Ge);\n", + "alpha_ = d/b;\n", + "fic1 = 0.83;fid1 = 0.88;\n", + "corec_c1 = (fid1-fic1)*100/2;\n", + "bdash = b;\n", + "d = 2;D = 7;\n", + "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fic1 = fic1*100+corec_c1+C1;\n", + "Pc = Hs*fic1/100; \t\t\t\t#pressure head at C\n", + "alpha_ = d/b;\n", + "fie2 = 0.31;fid2 = 0.21;\n", + "corec_e1 = (fie2-fid2)*1.7*100/7;\n", + "bdash = b;\n", + "d = 7;D = 2;\n", + "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fie2 = fie2*100-corec_e1-C1; \t\t\t\t#in book 3.53 value is wrong\n", + "Pe = Hs*fie2/100; \t\t\t\t#pressue head at E\n", + "#assuming linear variation of pressure for intermediate points\n", + "Pa = Pc-(Pc-Pe)*(33+8)/b;\n", + "t = Pa/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at d/s of weir wall = %.2f m.\"%(Pa);\n", + "print \"thickness at d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n", + "Pb = Pc-(Pc-Pe)*(33+8+6)/b;\n", + "t = Pb/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at 6 m from d/s of weir wall = %.2f m.\"%(Pb);\n", + "print \"thickness at 6m from d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n", + "Pc = Pc-(Pc-Pe)*(33+8+12)/b;\n", + "t = Pc/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at 12 m from d/s of weir wall = %.2f m.\"%(Pc);\n", + "print \"thickness at 12m from d/s of weir wall = %.2f m. > thickness by Bligh theory;hence unsafe.\"%(t);\n", + "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hydraulic calculation:\n", + "discharge per unit width of river = 11.10 cumecs.\n", + "regime scour depth = 6.72 m.\n", + "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n", + "crest level = 282.65 m.\n", + "heigth of shutter = 1.85 m.\n", + "depth of upstream cut-off = 2.00 m.\n", + " provide concrete cut off 2 m depth.\n", + "R.L of gates crest = 6.50 m.\n", + "Heigth of crest = 4.65 m.\n", + "design of weir wall:\n", + "provide top width of 3 m.\n", + "bottom width = 8 m.\n", + "design of impervious and pervious aprons:\n", + "total creep length = 78 m.\n", + "length of downstream impervious apron = 19 m.\n", + "length of upstream impervious apron = 33 m.\n", + "total length of d/s apron = 58 m.\n", + "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n", + "thickness of launching apron in horizontal position = 1.11 m.\n", + "provide launching apron of thickness 1.5 m.\n", + "thickness of apron in horizontal position = 1.60 m.\n", + "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n", + "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n", + "provide thickness of 1.90 m for rest of length of weir floor.\n", + "check by Khosla theory:\n", + "exit gradient = 0.13. < 1/6 hence safe\n", + "pressure at d/s of weir wall = 3.03 m.\n", + "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 6 m from d/s of weir wall = 2.66 m." + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 12 m from d/s of weir wall = 2.29 m.\n", + "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n", + "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 pg : 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design a slopeing glacis\n", + "\t\t\t\t\n", + "#Given\n", + "q = 10; \t\t\t\t#maximum discharge intensity on weir crest\n", + "hfl = 255; \t\t\t\t#H.F.L before construction of weir\n", + "rb = 249.5; \t\t\t\t#R.L of river bed\n", + "pl = 254; \t\t\t\t#pond level\n", + "s = 1; \t\t\t\t#heigth of crest shutter\n", + "dhw = 251.5; \t\t\t\t#anticipated downstream water level in river when water is dischrging with pond level upstream\n", + "br = 0.5; \t\t\t\t#bed retrogression\n", + "f = 0.9; \t\t\t\t#Laecey silt factor\n", + "Ge = 1./7; \t\t\t\t#permissible exit gradient\n", + "flux = 1; \t\t\t\t#permissible afflux\n", + "\n", + "cl = pl-s; \t\t\t\t#crest level\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "K = (q/1.7)**(2./3);\n", + "tel_up = cl+K;\n", + "tel_up = round(tel_up*100)/100;\n", + "print \"elevation of u/s T.E.L = %.2f m.\"%(tel_up);\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "R = round(R*10)/10;\n", + "print \"regime scour depth = %.2f m.\"%(R);\n", + "V = q/R; \t\t\t\t#regime velocity\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "hfl_up = tel_up-vh;\n", + "tel_down = hfl+vh;\n", + "flux = hfl_up-hfl;\n", + "flux = round(flux*100)/100;\n", + "print \"afflux = %.2f. which is near to permissible\"%(flux);\n", + "hfl_down = hfl-br; \t\t\t\t#downstream H.F.L after retrogression\n", + "tel_down = tel_down-br; \t\t\t\t#downstream T.F.L after retrogression\n", + "Hl = tel_up-tel_down; \t\t\t\t#loss of head in flood\n", + "Hl = round(Hl*100)/100;\n", + "print \"loss of head in at high flood = %.2f m.\"%(Hl);\n", + "K = pl-cl; \t\t\t\t#head over crest\n", + "q_ = 1.7*(K)**1.5;\n", + "Hl_ = pl-dhw; \t\t\t\t#loss of head\n", + "print \"loss of head = %.2f m.\"%(Hl_);\n", + "Ef2 = 4.3;\n", + "Ef2_ = 1.7; \t\t\t\t#from Blench curve\n", + "jump = tel_down-Ef2;\n", + "jump_ = 251.5-Ef2_; \t\t\t\t#level at which jump will form\n", + "Ef1 = Ef2+Hl;\n", + "Ef1_ = Ef2_+Hl_;\n", + "D1 = 1.03;\n", + "D1_ = 0.15; \n", + "D2 = 3.96;D2_ = 1.68; \n", + "hj = D2-D1;\n", + "hj_ = D2_-D1_; \t\t\t\t#heigth of jump\n", + "concrete = 5*hj;\n", + "concrete_ = 5*hj_; \t\t\t\t#length of concrete floor\n", + "print \"Hydraulic jump calculation:\";\n", + "print \"heigth of jump for high flood condition = %.2f m.\"%(hj);\n", + "print \"length of concrete floor for high flood condition = %.2f m.\"%(concrete);\n", + "print \"heigth of jump for pond level condition = %.2f m.\"%(hj_);\n", + "print \"length of concrete floor for high pond level condition = %.2f m.\"%(concrete_);\n", + "\n", + "cw = 2; \t\t\t\t#crets width\n", + "us = 2; \t\t\t\t#upstream slope\n", + "ds = 3; \t\t\t\t#downstream slope\n", + "l = 15;\n", + "print \" upstream slope of glacis = %i:1.\"%(us);\n", + "print \"downstream slope of glacis = %i:1.\"%(ds);\n", + "print \"horizontal length of floor beyond the toe = %i m..\"%(l);\n", + "\n", + "R = 6.5;\n", + "sh_up = hfl_up-1.5*R;\n", + "sh_down = hfl_down-2*R;\n", + "sh_up = round(sh_up*100)/100;\n", + "print \"R.L of bottom of upstream sheet pile = %.2f m.\"%(sh_up);\n", + "print \"R.L of downstream sheet pile = %.2f m.\"%(sh_down);\n", + "print \"provide intermediate sheet pile at d/s toe of glacis.\";\n", + "Hs = pl-249.6; \t\t\t\t#maximum percolation head\n", + "d = 249.6-sh_down; \t\t\t\t#depth of d/s cut-off\n", + "n = Ge*d/Hs; \t\t\t\t#n = 1/(math.pi*lambda**0.5);\n", + "\t\t\t\t#from khosla exit gradient curve\n", + "alpha = 1.5;\n", + "b = alpha*d;\n", + "print \"length of impervious floor = %.2f m.\"%(b);\n", + "fl = (2*(253-249.5))+2+(3*(253-249.6))+15;\n", + "us = 36-fl;\n", + "print \"length of floor already provide = %.2f m.\"%(fl);\n", + "print \"which is more than required from permissible exit gradient.no upstream floor is required.\";\n", + "print \"provide %.2f m upstream floor so that total length becomes 36 m.\"%(us);\n", + "alpha_1 = 0.089; \n", + "alpha_2 = 0.225; \t\t\t\t#alpha_ = 1/alpha\n", + "b1 = 21;\n", + "alpha = 4.44;\n", + "print \"Pressure percent at points:\";\n", + "point = ['C1', 'D1' ,'C2' ,'E2' ,'D2' ,'D3' ,'E3'];\n", + "bc = [72 ,82 ,31.5 ,45.5 ,58.5 ,29 ,44];\n", + "crt = [3.1, 0, 3.5, 0, -3.2, 0, 0, -3.6];\n", + "crs = [0 ,0, 0, 0, 2.3, 0, 0, 0];\n", + "cri = [3.7, 0, 6.4, 0, -2.4, 0, -6.4];\n", + "after = [0,0,0,0,0,0,0]\n", + "print \"Points Before correction After correction\";\n", + "for i in range(7):\n", + " after[i] = bc[i]+crt[i]+crs[i]+cri[i];\n", + " print \"%s %i %.2f\"%(point[i],bc[i],after[i]);\n", + "\n", + "Hs = 254-249.6; \t\t\t\t#no flow condition\n", + "Hs_ = 256.13-254.5; \t\t\t\t#high flood condition\n", + "Hs__ = 254-251.5; \t\t\t\t#flow at pond level\n", + "print \"elevation of subsoil H.G above datum:\";\n", + "print \"no flow condition:\";\n", + "fie1 = 1*Hs;\n", + "fid1 = 0.82*Hs;\n", + "fic1 = 0.788*Hs;\n", + "fie2 = 0.552*Hs;\n", + "fid2 = 0.455*Hs;\n", + "fic2 = 0.414*Hs;\n", + "fie3 = 0.34*Hs;\n", + "fid3 = 0.29*Hs;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "print \"high flood condition:\";\n", + "fie1 = 1*Hs_;\n", + "fid1 = 0.82*Hs_;\n", + "fic1 = 0.788*Hs_;\n", + "fie2 = 0.552*Hs_;\n", + "fid2 = 0.455*Hs_;\n", + "fic2 = 0.414*Hs_;\n", + "fie3 = 0.34*Hs_;\n", + "fid3 = 0.29*Hs_;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "print \"flow at pond level:\";\n", + "fie1 = 1*Hs__;\n", + "fid1 = 0.82*Hs__;\n", + "fic1 = 0.788*Hs__;\n", + "fie2 = 0.552*Hs__;\n", + "fid2 = 0.455*Hs__;\n", + "fic2 = 0.414*Hs__;\n", + "fie3 = 0.34*Hs__;\n", + "fid3 = 0.29*Hs__;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "\n", + "print \"Prejump profile:\";\n", + "print \"high flood condition:\";\n", + "dist = [3 ,6, 8.4]; \t\t\t\t#dismath.tance\n", + "glacis = [252, 251, 250.32]; \t\t\t\t#R.L of glacis\n", + "D1 = [1.3 ,1.15, 1.03];\n", + "Ef1 = [0,0,0]\n", + "print \"Ef1 D1\";\n", + "for i in range(3):\n", + " Ef1[i] = 256.25-glacis[i];\n", + " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n", + "\n", + "print \"pond level flow:\";\n", + "dist = [3, 6, 9, 9.6]; \t\t\t\t#dismath.tance\n", + "glacis = [252, 251, 250, 249.9]; \t\t\t\t#R.Lof glacis\n", + "D1 = [0.31, 0.23, 0.16, 0.15];\n", + "Ef1 = [0,0,0,0]\n", + "print \"Ef1 D1\";\n", + "for i in range(4):\n", + " Ef1[i] = 254-glacis[i];\n", + " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n", + "\n", + "\n", + "\n", + "rho = 2.24;\n", + "Uf = 4; \t\t\t\t#unbalanced head for high flood condtion\n", + "Us = 2.56; \t\t\t\t#unbalanced static head\n", + "Hf = 2*Uf/3;\n", + "t = Hf/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at the point of formation of hydraulic jump = %.2f m.\"%(t);\n", + "Uf = 2.9; \t\t\t\t#unbalanced head for high flood condtion\n", + "Us = 2.2; \t\t\t\t#unbalanced static head\n", + "Hf = 2*Uf/3;\n", + "t = Us/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at the point of formation of hydraulic jump at the pond level condition = %.2f m.\"%(t);\n", + "P = 1.5; \t\t\t\t#pressure head at d/s end of floor\n", + "t = P/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at downstream side of sloping glacis = %.2f m.\"%(t);\n", + "D = rb-sh_up; \t\t\t\t#depth of u/s scour hole above bed level\n", + "a = 1.5*D;\n", + "a = round(a*10)/10;\n", + "print \"minimum length of upstream launching apron = %.2f m.\"%(a);\n", + "print \"provide 1.5 m thick apron for length of 5 m.\";\n", + "D = 249.6-241.5;\n", + "a = 1.5*D;\n", + "print \"minimum length of downstream launching apron = %.2f m.\"%(a);\n", + "print \"provide 1.5 m thick apron for length of 12 m.\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest level = 253.00 m.\n", + "elevation of u/s T.E.L = 256.26 m.\n", + "regime scour depth = 6.50 m.\n", + "afflux = 1.14. which is near to permissible\n", + "loss of head in at high flood = 1.64 m.\n", + "loss of head = 2.50 m.\n", + "Hydraulic jump calculation:\n", + "heigth of jump for high flood condition = 2.93 m.\n", + "length of concrete floor for high flood condition = 14.65 m.\n", + "heigth of jump for pond level condition = 1.53 m.\n", + "length of concrete floor for high pond level condition = 7.65 m.\n", + " upstream slope of glacis = 2:1.\n", + "downstream slope of glacis = 3:1.\n", + "horizontal length of floor beyond the toe = 15 m..\n", + "R.L of bottom of upstream sheet pile = 246.39 m.\n", + "R.L of downstream sheet pile = 241.50 m.\n", + "provide intermediate sheet pile at d/s toe of glacis.\n", + "length of impervious floor = 12.15 m.\n", + "length of floor already provide = 34.20 m.\n", + "which is more than required from permissible exit gradient.no upstream floor is required.\n", + "provide 1.80 m upstream floor so that total length becomes 36 m.\n", + "Pressure percent at points:\n", + "Points Before correction After correction\n", + "C1 72 78.80\n", + "D1 82 82.00\n", + "C2 31 41.40\n", + "E2 45 45.50\n", + "D2 58 55.20\n", + "D3 29 29.00\n", + "E3 44 37.60\n", + "elevation of subsoil H.G above datum:\n", + "no flow condition:\n", + "fie1 = 4.40.;fid1 = 3.61.;fic1 = 3.47.fie2 = 2.43.;fid2 = 2.00.;fic2 = 1.82.fie3 = 1.50.;fid3 = 1.28.;fic3 = 0.00.\n", + "high flood condition:\n", + "fie1 = 1.63.;fid1 = 1.34.;fic1 = 1.28.fie2 = 0.90.;fid2 = 0.74.;fic2 = 0.67.fie3 = 0.55.;fid3 = 0.47.;fic3 = 0.00.\n", + "flow at pond level:\n", + "fie1 = 2.50.;fid1 = 2.05.;fic1 = 1.97.fie2 = 1.38.;fid2 = 1.14.;fic2 = 1.03.fie3 = 0.85.;fid3 = 0.73.;fic3 = 0.00.\n", + "Prejump profile:\n", + "high flood condition:\n", + "Ef1 D1\n", + "4.25 1.30\n", + "5.25 1.15\n", + "5.93 1.03\n", + "pond level flow:\n", + "Ef1 D1\n", + "2.00 0.31\n", + "3.00 0.23\n", + "4.00 0.16\n", + "4.10 0.15\n", + "floor thickness at the point of formation of hydraulic jump = 1.60 m.\n", + "floor thickness at the point of formation of hydraulic jump at the pond level condition = 1.80 m.\n", + "floor thickness at downstream side of sloping glacis = 1.20 m.\n", + "minimum length of upstream launching apron = 4.70 m.\n", + "provide 1.5 m thick apron for length of 5 m.\n", + "minimum length of downstream launching apron = 12.15 m.\n", + "provide 1.5 m thick apron for length of 12 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 pg : 631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "b = 16; \t\t\t\t#total length of floor\n", + "d = 5; \t\t\t\t#depth of downstream pile\n", + "D = 4; \t\t\t\t#depth of upstream pile\n", + "H = 2.5; \t\t\t\t#head created by weir\n", + "\n", + "\t\t\t\t#pressure at E\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C;\n", + "P = H*fie/100;\n", + "P = round(P*1000)/1000;\n", + "print \"Pressure at E = %.2f m.\"%(P);\n", + "\n", + "\t\t\t\t#pressure at C1\n", + "alpha = b/D;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n", + "C = 19*(d/b)**0.5*((d+D)/b);\n", + "fic = fic*100+C;\n", + "P = fic*H/100;\n", + "P = round(P*1000)/1000;\n", + "print \" Pressure at C = %.2f m.\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at E = 1.22 m.\n", + " Pressure at C = 1.43 m.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 pg : 632" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "#Given\n", + "b = 13; \t\t\t\t#length of floor\n", + "d = 2; \t\t\t\t#depth of downstream wall\n", + "D = 1.5; \t\t\t\t#depth of upstream cut-off\n", + "rho = 2.24; \t\t\t\t#relative density\n", + "H = 1.5;\n", + "\n", + "#at junction of d/s cut-off with floor\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C;\n", + "P = H*fie/100;\n", + "t = P/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at junction of d/s cut-off with floor = %.2f m.\"%(t);\n", + "\n", + "#at junction of u/s cut-off with floor\n", + "alpha = b/D;\n", + "lambda11 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda11-2)/lambda11)/math.pi;\n", + "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fiec = fic*100+C;\n", + "P = fiec*H/100;\n", + "t = 0.3; \t\t\t\t#this the uplift will be counter balanced by downward weigth of impounded water\n", + "print \"floor thickness at junction of u/s cut-off with floor = %.2f m.\"%(t);\n", + "\n", + "#at mid-length\n", + "P = (1.08+0.489)/2; \t\t\t\t#assuming linear variation\n", + "t = P/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness at mid-length = %.2f m.\"%(t);\n", + "\n", + "#exit gradient\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "G = round(G*1000)/1000;\n", + "#math.since G<0.18\n", + "print \" G = %.2f. <0.18./nfloor is safe against failure by piping.\"%(G);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "floor thickness at junction of d/s cut-off with floor = 0.40 m.\n", + "floor thickness at junction of u/s cut-off with floor = 0.30 m.\n", + "floor thickness at mid-length = 0.63 m.\n", + " G = 0.13. <0.18./nfloor is safe against failure by piping.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 pg : 634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "B = 30; \t\t\t\t#stream width\n", + "D = 3; \t\t\t\t#stream depth\n", + "V = 1.25; \t\t\t\t#mean velocity\n", + "Cd = 0.95; \t\t\t\t#discharge coefficient\n", + "Q = B*D*V;\n", + "\n", + "# Calculations\n", + "C = 2*Cd*(2*9.81)**0.5/3;\n", + "x = 4-(Q/(C*B))**(2./3);\n", + "x = round(x*1000)/1000;\n", + "\n", + "# Results\n", + "print \"heigth of weir to be built = %.2f m.\"%(x);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "heigth of weir to be built = 2.79 m.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 pg : 635" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "b = 50.; \t\t\t\t#length of floor\n", + "d = 8.; \t\t\t\t#depth of downstream pile\n", + "D = 8.; \t\t\t\t#depth of upstream pile\n", + "H = 5.; \t\t\t\t#effective head \n", + "tu = 1.; \t\t\t\t#floor thickness at upstream\n", + "td = 2.; \t\t\t\t#floor thickness at downstream\n", + "\n", + "# Calculations and Results\n", + "\t\t\t\t#downstream cut-off\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n", + "Ct = (fie-fid)*td/d;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C-Ct*100;\n", + "P = H*fie/100;\n", + "P = round(P*100)/100;\n", + "print \"Pressure at downstream cut-off = %.2f m.\"%(P);\n", + "\n", + "\t\t\t\t#upstream cut-off\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n", + "fic1 = 1-fie;\n", + "fid1 = 1-fid;\n", + "Ct = (fic1-fid1)*td/d;\n", + "C = -19*(D/b)**0.5*((d+D)/b);\n", + "fic1 = fic1*100-C-Ct*100;\n", + "P = H*fic1/100;\n", + "P = round(P*100)/100;\n", + "print \"Pressure at upstream cut-off = %.2f m.\"%(P);\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "print \"Exit Gradient = %.2f.\"%(G);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at downstream cut-off = 1.49 m.\n", + "Pressure at upstream cut-off = 3.51 m.\n", + "Exit Gradient = 0.10.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 pg : 636" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 1000.; \t\t\t\t#discharge of river\n", + "L = 256.; \t\t\t\t#crest length of diversion\n", + "f = 1.1; \t\t\t\t#silt factor\n", + "seg = 1./6; \t\t\t\t#safe exit gradient\n", + "hfl = 103; \t\t\t\t#high flood level\n", + "cf = 100; \t\t\t\t#reduced level of downstream concrete floor\n", + "H = 2.4; \t\t\t\t#maximum static head of weir\n", + "b = 40; \t\t\t\t#length of concrete floor\n", + "\n", + "\n", + "# Calculations and Results\n", + "q = Q/L;\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "rld = hfl-1.5*R;\n", + "d = cf-rld;\n", + "d = round(d*100)/100;\n", + "print \"depth of downstream cut-off = %.2f m.\"%(d);\n", + "\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "\t\t\t\t#math.since G thickness by Bligh theory;hence unsafe.\"%(t);\n", + "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hydraulic calculation:\n", + "discharge per unit width of river = 11.10 cumecs.\n", + "regime scour depth = 6.72 m.\n", + "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n", + "crest level = 282.65 m.\n", + "heigth of shutter = 1.85 m.\n", + "depth of upstream cut-off = 2.00 m.\n", + " provide concrete cut off 2 m depth.\n", + "R.L of gates crest = 6.50 m.\n", + "Heigth of crest = 4.65 m.\n", + "design of weir wall:\n", + "provide top width of 3 m.\n", + "bottom width = 8 m.\n", + "design of impervious and pervious aprons:\n", + "total creep length = 78 m.\n", + "length of downstream impervious apron = 19 m.\n", + "length of upstream impervious apron = 33 m.\n", + "total length of d/s apron = 58 m.\n", + "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n", + "thickness of launching apron in horizontal position = 1.11 m.\n", + "provide launching apron of thickness 1.5 m.\n", + "thickness of apron in horizontal position = 1.60 m.\n", + "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n", + "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n", + "provide thickness of 1.90 m for rest of length of weir floor.\n", + "check by Khosla theory:\n", + "exit gradient = 0.13. < 1/6 hence safe\n", + "pressure at d/s of weir wall = 3.03 m.\n", + "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 6 m from d/s of weir wall = 2.66 m.\n", + "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 12 m from d/s of weir wall = 2.29 m.\n", + "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n", + "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12 pg : 637" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#number of gates required for the barrage\n", + "#length and R.L of bamath.sin floor if silting bamath.sin is provided downstream of barrage\n", + "\n", + "#Given\n", + "Lmax = 212; \t\t\t\t#maximum reservior level\n", + "Lp = 211; \t\t\t\t#pond level\n", + "hfl = 210; \t\t\t\t#downstream high flood level in the river\n", + "Qmax = 3500; \t\t\t\t#maximum design flood discharge\n", + "Lcrest = 207; \t\t\t\t#crest level of the barrage\n", + "Lcrest_r = 208; \t\t\t\t#crest level of head regulator\n", + "Cd = 2.1; \t\t\t\t#coefficient of discharge for barrage\n", + "Cd_r = 1.5; \t\t\t\t#coefficient of discharge for head regulator\n", + "rbl = 205; \t\t\t\t#river bed level\n", + "Q = 500; \t\t\t\t#design discharge of main canal\n", + "\n", + "#design of water way for barrage during flood\n", + "H = Lmax-Lcrest;\n", + "L = Qmax/(Cd*H**1.5);\n", + "#which gives L = 149.07.\n", + "print \"nunmber of gates for the barrage = 15.\";\n", + "\n", + "#design of waterway for canal head regulator\n", + "H = Lp-Lcrest_r;\n", + "L1 = Q/(Cd_r*H**1.5);\n", + "#which gives L = 64.2\n", + "#hence provide 7 bays of 10 m each\n", + "print \"nunmber of gates for the head regulator = 7.\";\n", + "\n", + "#design of stilling bamath.sin\n", + "Hl = Lmax-hfl;\n", + "q = Qmax/L;\n", + "yc = (q**2/9.81)**(1./3);\n", + "Z = Hl/yc;\n", + "#math.since Z<1\n", + "Y = 1+0.93556*Z**0.368;\n", + "y2 = Y*yc;\n", + "Lc = 5*y2;\n", + "Lc = round(Lc*10)/10;\n", + "print \"Length of cistern = %.2f m.\"%(Lc);\n", + "Ef2 = yc*(Y+1/(2*Y**2));\n", + "j = hfl-Ef2;\n", + "j = round(j*10)/10;\n", + "print \"R.L of cistern = %.2f m.\"%(j);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "nunmber of gates for the barrage = 15.\n", + "nunmber of gates for the head regulator = 7.\n", + "Length of cistern = 33.30 m.\n", + "R.L of cistern = 202.70 m.\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..edc47614 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_1.ipynb @@ -0,0 +1,1384 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b0cdc42f1fc8747c583aaf55d3f5af5550eb632d3c87d035821d8a7d148eae09" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : DIVERSION HEADWORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 pg : 576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#uplift presuures and thickness of floor at 6m, 12m and 18m from u/s\n", + "\n", + "#Given\n", + "rho = 2.24; \t\t\t\t#relative density of material\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "L = 22.; \t\t\t\t#total length\n", + "lc = (2.*6)+L+(2*8); \t\t\t\t#length of creep\n", + "hg = 4./lc; \t\t\t\t#hydraulic gradient\n", + "print \"avearge hydraulic gradient = %.2f.\"%(hg);\n", + "#at 6 m from u/s\n", + "x = 6.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4.*h1/(3*(rho-1));\n", + "up = round(up*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 6 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 6 m from u/s = %.2f m.\"%(t);\n", + "\n", + "#at 12 m from u/s\n", + "x = 12.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4.*h1/(3*(rho-1));\n", + "up = round(up*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 12 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 12 m from u/s = %.2f m.\"%(t);\n", + "\n", + "#at 18m from u/s\n", + "x = 18.;\n", + "lg = (6.*2)+x;\n", + "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n", + "up = gamma_w*h1;\n", + "t = 4*h1/(3*(rho-1));\n", + "up = round(up*10)/10;\n", + "t = round(t*100)/100;\n", + "print \"uplift at 18 m from u/s = %.2f kN/square metre.\"%(up);\n", + "print \"thickness at 18 m from u/s = %.2f m.\"%(t);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "avearge hydraulic gradient = 0.08.\n", + "uplift at 6 m from u/s = 25.11 kN/square metre.\n", + "thickness at 6 m from u/s = 2.75 m.\n", + "uplift at 12 m from u/s = 20.40 kN/square metre.\n", + "thickness at 12 m from u/s = 2.24 m.\n", + "uplift at 18 m from u/s = 15.70 kN/square metre.\n", + "thickness at 18 m from u/s = 1.72 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 pg : 589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#check whether section is safe against overturning and piping\n", + "\n", + "#Given\n", + "b = 54.; \t\t\t\t#width of section\n", + "D1D2 = 16; \t\t\t\t#dismath.tance between points D1 and D2\n", + "D2D3 = 37; \t\t\t\t#dismath.tance between points D2 and D3\n", + "\n", + "#first pipe line\n", + "#taking data from figure\n", + "d = 105-97;\n", + "b1 = 0.5;\n", + "alpha = b/d;\n", + "#from the curves we get\n", + "fic1 = 0.665;\n", + "fid1 = 0.76;\n", + "fie1 = 1;\n", + "t = 105-104; \t\t\t\t#floor thickness\n", + "corec = (fid1-fic1)*100*t/d; \t\t\t\t#correction for floor thickness\n", + "#for pile no. 2\n", + "D = 104-97;\n", + "d = 104-97;\n", + "bdash = 16;\n", + "C = 19*(D/bdash)**0.5*(d+D)/b; \t\t\t\t#correction for pile no. 2\n", + "fic1 = fic1*100+corec+C; \t\t\t\t#corrected pressures\n", + "\n", + "#intermedite pipe line\n", + "d = 105-97;\n", + "b1 = 16.5;\n", + "alpha = b/d;\n", + "r = b1/b; \t\t\t\t#ratio b1/b\n", + "#from the curves we get\n", + "fic2 = 0.52;\n", + "fie2 = 0.725;\n", + "fid2 = 0.615;\n", + "corec_c1 = (fid2-fic2)*100*t/d;\n", + "corec_e1 = (fie2-fid2)*100/d;\n", + "\n", + "#for pile no. 1\n", + "C1 = C;\n", + "d = 104-97;\n", + "bdash = 37;\n", + "D = 104-95;\n", + "C2 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "#correction due to slope\n", + "corec_e2 = 3.3; \t\t\t\t#from table 12.4\n", + "#correction is negative due to upwrd slope\n", + "l = 4; \t\t\t\t#horizontal length of slope\n", + "corec_c2 = corec_e2*l/bdash;\n", + "\n", + "fie2 = fie2*100-corec_e1-corec_e2;\n", + "fic2 = fic2*100+corec_c1+C2-corec_c2;\n", + "\n", + "#pile no. 3 at d/s end\n", + "d = 103.5-95;\n", + "alpha_ = d/b;\n", + "#for curves\n", + "fie3 = 0.35;fid3 = 0.242;\n", + "corec_t = (fie3-fid3)*100*(103.5-102)/d;\n", + "\n", + "#correction for interference at pile no. 2\n", + "d = 102-95;\n", + "D = 102-97;\n", + "C3 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fie3 = fie3*100-corec_t-C3;\n", + "\n", + "point = ['C1', 'C2' ,'E2' ,'E3']; \t\t\t\t#Point\n", + "P = [fic1 ,fic2 ,fie2 ,fie3]; \t\t\t\t#pressure percent\n", + "P_ = [3.55 ,2.78, 3.39, 1.58]; \t\t\t\t#pressure head\n", + "print \"Points Pressure percent Pressure head\";\n", + "\n", + "for i in range(4):\n", + " P[i] = round(P[i]*10)/10;\n", + " print \"%s %.2f %.2f\"%(point[i],P[i],P_[i]);\n", + "\n", + "\n", + "#check for floor thickness\n", + "Pa = P_[1]-((P_[1]-P_[3])*6.5/37);\n", + "Pb = P_[1]-((P_[1]-P_[3])*24/37);\n", + "Pc = P_[1]-((P_[1]-P_[3])*30/37);\n", + "rho = 2.24; \t\t\t\t#specific gravity of concrete\n", + "ta = Pa/(rho-1);\n", + "tb = Pb/(rho-1);\n", + "tc = Pc/(rho-1);\n", + "ta = round(ta*100)/100;\n", + "tb = round(tb*100)/100;\n", + "tc = round(tc*100)/100;\n", + "print \"Thickness required at A = %.2f m.\"%(ta);\n", + "print \"Thickness required at B = %.2f m.\"%(tb);\n", + "print \"Thickness required at C = %.2f m.\"%(tc);\n", + "t = 103.5-102;\n", + "print \"Thickness provided = %.2f m.\"%(t);\n", + "print \"Floor thickness at B and C are adequate\";\n", + "\n", + "#exit gradient\n", + "H = 108.5-103.5; \t\t\t\t#seepage head\n", + "d = 103.5-95; \t\t\t\t#depth cut-off\n", + "#from exit gradient curve\n", + "alpha = 6.35;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "Ge = H/(d*math.pi*lambda1**0.5);\n", + "print \"exit gradient = %.2f.\"%(Ge);\n", + "print \" it is less than permissible exit gradient < 1/6Hence safe..\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Points Pressure percent Pressure head\n", + "C1 67.70 3.55\n", + "C2 52.80 2.78\n", + "E2 67.80 3.39\n", + "E3 33.10 1.58\n", + "Thickness required at A = 2.07 m.\n", + "Thickness required at B = 1.61 m.\n", + "Thickness required at C = 1.46 m.\n", + "Thickness provided = 1.50 m.\n", + "Floor thickness at B and C are adequate\n", + "exit gradient = 0.10.\n", + " it is less than permissible exit gradient < 1/6Hence safe..\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 pg : 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots,ceil\n", + "\n", + "#design a vertical drop weir on Bligh's theory\n", + "#test floor by Khosla's theory\n", + "\n", + "#Given\n", + "Q = 2800; \t\t\t\t#maximum flood discharge\n", + "hfl = 285; \t\t\t\t#H.F.L before construction\n", + "hw = 278; \t\t\t\t#minimum water level\n", + "fsl = 284; \t\t\t\t#F.S.L of canal\n", + "c = 12; \t\t\t\t#coefficient of creep\n", + "flux = 1; \t\t\t\t#allowable afflux\n", + "Ge = 1./6; \t\t\t\t#permissible exit gradient\n", + "rho = 2.24; \t\t\t\t#specific gravity of concrete\n", + "\n", + "#Hydraulic calculation\n", + "L = 4.75*Q**0.5;\n", + "q = Q/L;\n", + "q = round(q*10)/10;\n", + "print \"Hydraulic calculation:\";\n", + "print \"discharge per unit width of river = %.2f cumecs.\"%(q);\n", + "f = 1;\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "R = round(R*100)/100;\n", + "print \"regime scour depth = %.2f m.\"%(R);\n", + "V = q/R; \t\t\t\t#regime velocity\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "l_down = hfl+vh;\n", + "l_up = l_down+flux;\n", + "hfl_up = l_up-vh;\n", + "hfl_down = hfl-0.5;\n", + "hfl_down = round(hfl_down*100)/100;\n", + "print \"actual d/s H.F.L allowing 0.5 m for retrogation = %.2f m.\"%(hfl_down);\n", + "K = (q/1.7)**(2./3);\n", + "cl = l_up-K; \t\t\t\t#crest level\n", + "cl = round(cl*100)/100;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "pl = fsl+0.5; \t\t\t\t#pond level\n", + "s = hfl_down-cl; \t\t\t\t#heigth of shutter\n", + "print \"heigth of shutter = %.2f m.\"%(s);\n", + "rl_up_pile = hfl_up-1.5*R; \t\t\t\t#R.L of bottom u/s pile\n", + "d_up_cut = hw-276; \t\t\t\t#depth of upstream cut-off\n", + "print \"depth of upstream cut-off = %.2f m.\"%(d_up_cut);\n", + "print \" provide concrete cut off 2 m depth.\";\n", + "rl_bot_ds = hfl_down-2*R;\n", + "Hs = hfl_down-hw; \t\t\t\t#seepage head\n", + "Hc = cl-hw; \t\t\t\t#heigth of crest\n", + "print \"R.L of gates crest = %.2f m.\"%(Hs);\n", + "print \"Heigth of crest = %.2f m.\"%(Hc);\n", + "\n", + "#design of weir wall\n", + "d = hfl_up-cl;\n", + "a = d/(rho)**0.5;\n", + "a = 3*d/(2*rho); \t\t\t\t#from sliding consideration\n", + "a = s+1; \t\t\t\t#from practical consieration\n", + "a = a+1;\n", + "print \"design of weir wall:\"\n", + "print \"provide top width of %i m.\"%(a);\n", + "Mo = 9.81*Hs**3/6; \t\t\t\t#overtirning moment\n", + "#equating the moment of resismath.tance to overturning moment and putting the values we get\n", + "#y = poly([-1.084,0.020,0.039],'x','c');\n", + "y = [0.039,0.020,-1.084]\n", + "b = roots(y)[1];\n", + "#we get b = - 5.5347261 and 5.0219056\n", + "#taking\n", + "b = 5;\n", + "#when weir is submerged\n", + "C = 0.58;\n", + "d = (q**2/((2*C/3)**2*2*9.81))**(1./3);\n", + "Mo = 9.81*d*Hc**2/2;\n", + "#from equation of moment of resistence we get\n", + "y = [1,3,-77.55]\n", + "b = ceil(roots(y)[1]); #we get b = - 10.433085 and 7.4330846\n", + "print \"bottom width = %i m.\"%(b);\n", + "\n", + "#design of impervious and pervious aprons\n", + "C = 12;\n", + "L = C*Hs;\n", + "print \"design of impervious and pervious aprons:\";\n", + "print \"total creep length = %i m.\"%(L);\n", + "l1 = 2.21*C*(Hs/13)**0.5;\n", + "l1_ = l1+1;\n", + "print \"length of downstream impervious apron = %i m.\"%(l1_);\n", + "d1 = hw-276;\n", + "d2 = hw-271;\n", + "l2 = L-l1-(b+2*d1+2*d2);\n", + "print \"length of upstream impervious apron = %i m.\"%(l2);\n", + "l3 = 18*C*(Hs*q/975)**0.5;\n", + "print \"total length of d/s apron = %i m.\"%(l3); \t\t\t\t#calculation is wrong in book\n", + "l = l3-l1;\n", + "le = l/2;\n", + "le = round(le*100)/100;\n", + "print 'provide filter of length %.2f m. and launching apron of length %.2f m.'%(le,le);\n", + "t = d2*10**0.5/le;\n", + "print \"thickness of launching apron in horizontal position = %.2f m.\"%(t);\n", + "print \"provide launching apron of thickness 1.5 m.\";\n", + "T = 2*d1;\n", + "V = d1*10**0.5;\n", + "ta = V/T;\n", + "ta = round(ta*10)/10;\n", + "print \"thickness of apron in horizontal position = %.2f m.\"%(ta);\n", + "Hr = Hs-Hs*(4+33+8)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print 'provide thickness of %.2f m from d/s of weir wall to point 6 m from it.'%(t);\n", + "Hr = Hs-Hs*(4+33+8+6)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print \"provide thickness of %.2f m from 6 m to 12 m from d/s end of weir wall.\"%(t);\n", + "Hr = Hs-Hs*(4+33+8+12)/L;\n", + "t = 4*Hr/(3*(rho-1));\n", + "t = round(t*10)/10;\n", + "print \"provide thickness of %.2f m for rest of length of weir floor.\"%(t);\n", + "\n", + "#check by khosla's theory\n", + "b = 33+8+19; \t\t\t\t#total horizontal length of impervious floor\n", + "d = 7; \t\t\t\t#depth of downstream pile\n", + "alpha = b/d;\n", + "n = 0.14; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "Ge = Hs*n/d;\n", + "print \"check by Khosla theory:\";\n", + "print \"exit gradient = %.2f. < 1/6 hence safe\"%(Ge);\n", + "alpha_ = d/b;\n", + "fic1 = 0.83;fid1 = 0.88;\n", + "corec_c1 = (fid1-fic1)*100/2;\n", + "bdash = b;\n", + "d = 2;D = 7;\n", + "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fic1 = fic1*100+corec_c1+C1;\n", + "Pc = Hs*fic1/100; \t\t\t\t#pressure head at C\n", + "alpha_ = d/b;\n", + "fie2 = 0.31;fid2 = 0.21;\n", + "corec_e1 = (fie2-fid2)*1.7*100/7;\n", + "bdash = b;\n", + "d = 7;D = 2;\n", + "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n", + "fie2 = fie2*100-corec_e1-C1; \t\t\t\t#in book 3.53 value is wrong\n", + "Pe = Hs*fie2/100; \t\t\t\t#pressue head at E\n", + "#assuming linear variation of pressure for intermediate points\n", + "Pa = Pc-(Pc-Pe)*(33+8)/b;\n", + "t = Pa/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at d/s of weir wall = %.2f m.\"%(Pa);\n", + "print \"thickness at d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n", + "Pb = Pc-(Pc-Pe)*(33+8+6)/b;\n", + "t = Pb/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at 6 m from d/s of weir wall = %.2f m.\"%(Pb);\n", + "print \"thickness at 6m from d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n", + "Pc = Pc-(Pc-Pe)*(33+8+12)/b;\n", + "t = Pc/1.24;\n", + "Pa = round(Pa*100)/100;\n", + "t = round(t*100)/100;\n", + "print \"pressure at 12 m from d/s of weir wall = %.2f m.\"%(Pc);\n", + "print \"thickness at 12m from d/s of weir wall = %.2f m. > thickness by Bligh theory;hence unsafe.\"%(t);\n", + "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hydraulic calculation:\n", + "discharge per unit width of river = 11.10 cumecs.\n", + "regime scour depth = 6.72 m.\n", + "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n", + "crest level = 282.65 m.\n", + "heigth of shutter = 1.85 m.\n", + "depth of upstream cut-off = 2.00 m.\n", + " provide concrete cut off 2 m depth.\n", + "R.L of gates crest = 6.50 m.\n", + "Heigth of crest = 4.65 m.\n", + "design of weir wall:\n", + "provide top width of 3 m.\n", + "bottom width = 8 m.\n", + "design of impervious and pervious aprons:\n", + "total creep length = 78 m.\n", + "length of downstream impervious apron = 19 m.\n", + "length of upstream impervious apron = 33 m.\n", + "total length of d/s apron = 58 m.\n", + "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n", + "thickness of launching apron in horizontal position = 1.11 m.\n", + "provide launching apron of thickness 1.5 m.\n", + "thickness of apron in horizontal position = 1.60 m.\n", + "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n", + "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n", + "provide thickness of 1.90 m for rest of length of weir floor.\n", + "check by Khosla theory:\n", + "exit gradient = 0.13. < 1/6 hence safe\n", + "pressure at d/s of weir wall = 3.03 m.\n", + "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 6 m from d/s of weir wall = 2.66 m." + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 12 m from d/s of weir wall = 2.29 m.\n", + "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n", + "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 pg : 617" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design a slopeing glacis\n", + "\t\t\t\t\n", + "#Given\n", + "q = 10; \t\t\t\t#maximum discharge intensity on weir crest\n", + "hfl = 255; \t\t\t\t#H.F.L before construction of weir\n", + "rb = 249.5; \t\t\t\t#R.L of river bed\n", + "pl = 254; \t\t\t\t#pond level\n", + "s = 1; \t\t\t\t#heigth of crest shutter\n", + "dhw = 251.5; \t\t\t\t#anticipated downstream water level in river when water is dischrging with pond level upstream\n", + "br = 0.5; \t\t\t\t#bed retrogression\n", + "f = 0.9; \t\t\t\t#Laecey silt factor\n", + "Ge = 1./7; \t\t\t\t#permissible exit gradient\n", + "flux = 1; \t\t\t\t#permissible afflux\n", + "\n", + "cl = pl-s; \t\t\t\t#crest level\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "K = (q/1.7)**(2./3);\n", + "tel_up = cl+K;\n", + "tel_up = round(tel_up*100)/100;\n", + "print \"elevation of u/s T.E.L = %.2f m.\"%(tel_up);\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "R = round(R*10)/10;\n", + "print \"regime scour depth = %.2f m.\"%(R);\n", + "V = q/R; \t\t\t\t#regime velocity\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "hfl_up = tel_up-vh;\n", + "tel_down = hfl+vh;\n", + "flux = hfl_up-hfl;\n", + "flux = round(flux*100)/100;\n", + "print \"afflux = %.2f. which is near to permissible\"%(flux);\n", + "hfl_down = hfl-br; \t\t\t\t#downstream H.F.L after retrogression\n", + "tel_down = tel_down-br; \t\t\t\t#downstream T.F.L after retrogression\n", + "Hl = tel_up-tel_down; \t\t\t\t#loss of head in flood\n", + "Hl = round(Hl*100)/100;\n", + "print \"loss of head in at high flood = %.2f m.\"%(Hl);\n", + "K = pl-cl; \t\t\t\t#head over crest\n", + "q_ = 1.7*(K)**1.5;\n", + "Hl_ = pl-dhw; \t\t\t\t#loss of head\n", + "print \"loss of head = %.2f m.\"%(Hl_);\n", + "Ef2 = 4.3;\n", + "Ef2_ = 1.7; \t\t\t\t#from Blench curve\n", + "jump = tel_down-Ef2;\n", + "jump_ = 251.5-Ef2_; \t\t\t\t#level at which jump will form\n", + "Ef1 = Ef2+Hl;\n", + "Ef1_ = Ef2_+Hl_;\n", + "D1 = 1.03;\n", + "D1_ = 0.15; \n", + "D2 = 3.96;D2_ = 1.68; \n", + "hj = D2-D1;\n", + "hj_ = D2_-D1_; \t\t\t\t#heigth of jump\n", + "concrete = 5*hj;\n", + "concrete_ = 5*hj_; \t\t\t\t#length of concrete floor\n", + "print \"Hydraulic jump calculation:\";\n", + "print \"heigth of jump for high flood condition = %.2f m.\"%(hj);\n", + "print \"length of concrete floor for high flood condition = %.2f m.\"%(concrete);\n", + "print \"heigth of jump for pond level condition = %.2f m.\"%(hj_);\n", + "print \"length of concrete floor for high pond level condition = %.2f m.\"%(concrete_);\n", + "\n", + "cw = 2; \t\t\t\t#crets width\n", + "us = 2; \t\t\t\t#upstream slope\n", + "ds = 3; \t\t\t\t#downstream slope\n", + "l = 15;\n", + "print \" upstream slope of glacis = %i:1.\"%(us);\n", + "print \"downstream slope of glacis = %i:1.\"%(ds);\n", + "print \"horizontal length of floor beyond the toe = %i m..\"%(l);\n", + "\n", + "R = 6.5;\n", + "sh_up = hfl_up-1.5*R;\n", + "sh_down = hfl_down-2*R;\n", + "sh_up = round(sh_up*100)/100;\n", + "print \"R.L of bottom of upstream sheet pile = %.2f m.\"%(sh_up);\n", + "print \"R.L of downstream sheet pile = %.2f m.\"%(sh_down);\n", + "print \"provide intermediate sheet pile at d/s toe of glacis.\";\n", + "Hs = pl-249.6; \t\t\t\t#maximum percolation head\n", + "d = 249.6-sh_down; \t\t\t\t#depth of d/s cut-off\n", + "n = Ge*d/Hs; \t\t\t\t#n = 1/(math.pi*lambda**0.5);\n", + "\t\t\t\t#from khosla exit gradient curve\n", + "alpha = 1.5;\n", + "b = alpha*d;\n", + "print \"length of impervious floor = %.2f m.\"%(b);\n", + "fl = (2*(253-249.5))+2+(3*(253-249.6))+15;\n", + "us = 36-fl;\n", + "print \"length of floor already provide = %.2f m.\"%(fl);\n", + "print \"which is more than required from permissible exit gradient.no upstream floor is required.\";\n", + "print \"provide %.2f m upstream floor so that total length becomes 36 m.\"%(us);\n", + "alpha_1 = 0.089; \n", + "alpha_2 = 0.225; \t\t\t\t#alpha_ = 1/alpha\n", + "b1 = 21;\n", + "alpha = 4.44;\n", + "print \"Pressure percent at points:\";\n", + "point = ['C1', 'D1' ,'C2' ,'E2' ,'D2' ,'D3' ,'E3'];\n", + "bc = [72 ,82 ,31.5 ,45.5 ,58.5 ,29 ,44];\n", + "crt = [3.1, 0, 3.5, 0, -3.2, 0, 0, -3.6];\n", + "crs = [0 ,0, 0, 0, 2.3, 0, 0, 0];\n", + "cri = [3.7, 0, 6.4, 0, -2.4, 0, -6.4];\n", + "after = [0,0,0,0,0,0,0]\n", + "print \"Points Before correction After correction\";\n", + "for i in range(7):\n", + " after[i] = bc[i]+crt[i]+crs[i]+cri[i];\n", + " print \"%s %i %.2f\"%(point[i],bc[i],after[i]);\n", + "\n", + "Hs = 254-249.6; \t\t\t\t#no flow condition\n", + "Hs_ = 256.13-254.5; \t\t\t\t#high flood condition\n", + "Hs__ = 254-251.5; \t\t\t\t#flow at pond level\n", + "print \"elevation of subsoil H.G above datum:\";\n", + "print \"no flow condition:\";\n", + "fie1 = 1*Hs;\n", + "fid1 = 0.82*Hs;\n", + "fic1 = 0.788*Hs;\n", + "fie2 = 0.552*Hs;\n", + "fid2 = 0.455*Hs;\n", + "fic2 = 0.414*Hs;\n", + "fie3 = 0.34*Hs;\n", + "fid3 = 0.29*Hs;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "print \"high flood condition:\";\n", + "fie1 = 1*Hs_;\n", + "fid1 = 0.82*Hs_;\n", + "fic1 = 0.788*Hs_;\n", + "fie2 = 0.552*Hs_;\n", + "fid2 = 0.455*Hs_;\n", + "fic2 = 0.414*Hs_;\n", + "fie3 = 0.34*Hs_;\n", + "fid3 = 0.29*Hs_;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "print \"flow at pond level:\";\n", + "fie1 = 1*Hs__;\n", + "fid1 = 0.82*Hs__;\n", + "fic1 = 0.788*Hs__;\n", + "fie2 = 0.552*Hs__;\n", + "fid2 = 0.455*Hs__;\n", + "fic2 = 0.414*Hs__;\n", + "fie3 = 0.34*Hs__;\n", + "fid3 = 0.29*Hs__;\n", + "fic3 = 0;\n", + "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n", + "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n", + "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n", + "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n", + "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n", + "\n", + "print \"Prejump profile:\";\n", + "print \"high flood condition:\";\n", + "dist = [3 ,6, 8.4]; \t\t\t\t#dismath.tance\n", + "glacis = [252, 251, 250.32]; \t\t\t\t#R.L of glacis\n", + "D1 = [1.3 ,1.15, 1.03];\n", + "Ef1 = [0,0,0]\n", + "print \"Ef1 D1\";\n", + "for i in range(3):\n", + " Ef1[i] = 256.25-glacis[i];\n", + " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n", + "\n", + "print \"pond level flow:\";\n", + "dist = [3, 6, 9, 9.6]; \t\t\t\t#dismath.tance\n", + "glacis = [252, 251, 250, 249.9]; \t\t\t\t#R.Lof glacis\n", + "D1 = [0.31, 0.23, 0.16, 0.15];\n", + "Ef1 = [0,0,0,0]\n", + "print \"Ef1 D1\";\n", + "for i in range(4):\n", + " Ef1[i] = 254-glacis[i];\n", + " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n", + "\n", + "\n", + "\n", + "rho = 2.24;\n", + "Uf = 4; \t\t\t\t#unbalanced head for high flood condtion\n", + "Us = 2.56; \t\t\t\t#unbalanced static head\n", + "Hf = 2*Uf/3;\n", + "t = Hf/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at the point of formation of hydraulic jump = %.2f m.\"%(t);\n", + "Uf = 2.9; \t\t\t\t#unbalanced head for high flood condtion\n", + "Us = 2.2; \t\t\t\t#unbalanced static head\n", + "Hf = 2*Uf/3;\n", + "t = Us/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at the point of formation of hydraulic jump at the pond level condition = %.2f m.\"%(t);\n", + "P = 1.5; \t\t\t\t#pressure head at d/s end of floor\n", + "t = P/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at downstream side of sloping glacis = %.2f m.\"%(t);\n", + "D = rb-sh_up; \t\t\t\t#depth of u/s scour hole above bed level\n", + "a = 1.5*D;\n", + "a = round(a*10)/10;\n", + "print \"minimum length of upstream launching apron = %.2f m.\"%(a);\n", + "print \"provide 1.5 m thick apron for length of 5 m.\";\n", + "D = 249.6-241.5;\n", + "a = 1.5*D;\n", + "print \"minimum length of downstream launching apron = %.2f m.\"%(a);\n", + "print \"provide 1.5 m thick apron for length of 12 m.\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest level = 253.00 m.\n", + "elevation of u/s T.E.L = 256.26 m.\n", + "regime scour depth = 6.50 m.\n", + "afflux = 1.14. which is near to permissible\n", + "loss of head in at high flood = 1.64 m.\n", + "loss of head = 2.50 m.\n", + "Hydraulic jump calculation:\n", + "heigth of jump for high flood condition = 2.93 m.\n", + "length of concrete floor for high flood condition = 14.65 m.\n", + "heigth of jump for pond level condition = 1.53 m.\n", + "length of concrete floor for high pond level condition = 7.65 m.\n", + " upstream slope of glacis = 2:1.\n", + "downstream slope of glacis = 3:1.\n", + "horizontal length of floor beyond the toe = 15 m..\n", + "R.L of bottom of upstream sheet pile = 246.39 m.\n", + "R.L of downstream sheet pile = 241.50 m.\n", + "provide intermediate sheet pile at d/s toe of glacis.\n", + "length of impervious floor = 12.15 m.\n", + "length of floor already provide = 34.20 m.\n", + "which is more than required from permissible exit gradient.no upstream floor is required.\n", + "provide 1.80 m upstream floor so that total length becomes 36 m.\n", + "Pressure percent at points:\n", + "Points Before correction After correction\n", + "C1 72 78.80\n", + "D1 82 82.00\n", + "C2 31 41.40\n", + "E2 45 45.50\n", + "D2 58 55.20\n", + "D3 29 29.00\n", + "E3 44 37.60\n", + "elevation of subsoil H.G above datum:\n", + "no flow condition:\n", + "fie1 = 4.40.;fid1 = 3.61.;fic1 = 3.47.fie2 = 2.43.;fid2 = 2.00.;fic2 = 1.82.fie3 = 1.50.;fid3 = 1.28.;fic3 = 0.00.\n", + "high flood condition:\n", + "fie1 = 1.63.;fid1 = 1.34.;fic1 = 1.28.fie2 = 0.90.;fid2 = 0.74.;fic2 = 0.67.fie3 = 0.55.;fid3 = 0.47.;fic3 = 0.00.\n", + "flow at pond level:\n", + "fie1 = 2.50.;fid1 = 2.05.;fic1 = 1.97.fie2 = 1.38.;fid2 = 1.14.;fic2 = 1.03.fie3 = 0.85.;fid3 = 0.73.;fic3 = 0.00.\n", + "Prejump profile:\n", + "high flood condition:\n", + "Ef1 D1\n", + "4.25 1.30\n", + "5.25 1.15\n", + "5.93 1.03\n", + "pond level flow:\n", + "Ef1 D1\n", + "2.00 0.31\n", + "3.00 0.23\n", + "4.00 0.16\n", + "4.10 0.15\n", + "floor thickness at the point of formation of hydraulic jump = 1.60 m.\n", + "floor thickness at the point of formation of hydraulic jump at the pond level condition = 1.80 m.\n", + "floor thickness at downstream side of sloping glacis = 1.20 m.\n", + "minimum length of upstream launching apron = 4.70 m.\n", + "provide 1.5 m thick apron for length of 5 m.\n", + "minimum length of downstream launching apron = 12.15 m.\n", + "provide 1.5 m thick apron for length of 12 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 pg : 631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "b = 16; \t\t\t\t#total length of floor\n", + "d = 5; \t\t\t\t#depth of downstream pile\n", + "D = 4; \t\t\t\t#depth of upstream pile\n", + "H = 2.5; \t\t\t\t#head created by weir\n", + "\n", + "\t\t\t\t#pressure at E\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C;\n", + "P = H*fie/100;\n", + "P = round(P*1000)/1000;\n", + "print \"Pressure at E = %.2f m.\"%(P);\n", + "\n", + "\t\t\t\t#pressure at C1\n", + "alpha = b/D;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n", + "C = 19*(d/b)**0.5*((d+D)/b);\n", + "fic = fic*100+C;\n", + "P = fic*H/100;\n", + "P = round(P*1000)/1000;\n", + "print \" Pressure at C = %.2f m.\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at E = 1.22 m.\n", + " Pressure at C = 1.43 m.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 pg : 632" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "#Given\n", + "b = 13; \t\t\t\t#length of floor\n", + "d = 2; \t\t\t\t#depth of downstream wall\n", + "D = 1.5; \t\t\t\t#depth of upstream cut-off\n", + "rho = 2.24; \t\t\t\t#relative density\n", + "H = 1.5;\n", + "\n", + "#at junction of d/s cut-off with floor\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C;\n", + "P = H*fie/100;\n", + "t = P/(rho-1);\n", + "t = round(t*10)/10;\n", + "print \"floor thickness at junction of d/s cut-off with floor = %.2f m.\"%(t);\n", + "\n", + "#at junction of u/s cut-off with floor\n", + "alpha = b/D;\n", + "lambda11 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda11-2)/lambda11)/math.pi;\n", + "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fiec = fic*100+C;\n", + "P = fiec*H/100;\n", + "t = 0.3; \t\t\t\t#this the uplift will be counter balanced by downward weigth of impounded water\n", + "print \"floor thickness at junction of u/s cut-off with floor = %.2f m.\"%(t);\n", + "\n", + "#at mid-length\n", + "P = (1.08+0.489)/2; \t\t\t\t#assuming linear variation\n", + "t = P/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness at mid-length = %.2f m.\"%(t);\n", + "\n", + "#exit gradient\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "G = round(G*1000)/1000;\n", + "#math.since G<0.18\n", + "print \" G = %.2f. <0.18./nfloor is safe against failure by piping.\"%(G);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "floor thickness at junction of d/s cut-off with floor = 0.40 m.\n", + "floor thickness at junction of u/s cut-off with floor = 0.30 m.\n", + "floor thickness at mid-length = 0.63 m.\n", + " G = 0.13. <0.18./nfloor is safe against failure by piping.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 pg : 634" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "B = 30; \t\t\t\t#stream width\n", + "D = 3; \t\t\t\t#stream depth\n", + "V = 1.25; \t\t\t\t#mean velocity\n", + "Cd = 0.95; \t\t\t\t#discharge coefficient\n", + "Q = B*D*V;\n", + "\n", + "# Calculations\n", + "C = 2*Cd*(2*9.81)**0.5/3;\n", + "x = 4-(Q/(C*B))**(2./3);\n", + "x = round(x*1000)/1000;\n", + "\n", + "# Results\n", + "print \"heigth of weir to be built = %.2f m.\"%(x);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "heigth of weir to be built = 2.79 m.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 pg : 635" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "b = 50.; \t\t\t\t#length of floor\n", + "d = 8.; \t\t\t\t#depth of downstream pile\n", + "D = 8.; \t\t\t\t#depth of upstream pile\n", + "H = 5.; \t\t\t\t#effective head \n", + "tu = 1.; \t\t\t\t#floor thickness at upstream\n", + "td = 2.; \t\t\t\t#floor thickness at downstream\n", + "\n", + "# Calculations and Results\n", + "\t\t\t\t#downstream cut-off\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n", + "Ct = (fie-fid)*td/d;\n", + "C = 19*(D/b)**0.5*((d+D)/b);\n", + "fie = fie*100-C-Ct*100;\n", + "P = H*fie/100;\n", + "P = round(P*100)/100;\n", + "print \"Pressure at downstream cut-off = %.2f m.\"%(P);\n", + "\n", + "\t\t\t\t#upstream cut-off\n", + "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n", + "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n", + "fic1 = 1-fie;\n", + "fid1 = 1-fid;\n", + "Ct = (fic1-fid1)*td/d;\n", + "C = -19*(D/b)**0.5*((d+D)/b);\n", + "fic1 = fic1*100-C-Ct*100;\n", + "P = H*fic1/100;\n", + "P = round(P*100)/100;\n", + "print \"Pressure at upstream cut-off = %.2f m.\"%(P);\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "print \"Exit Gradient = %.2f.\"%(G);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at downstream cut-off = 1.49 m.\n", + "Pressure at upstream cut-off = 3.51 m.\n", + "Exit Gradient = 0.10.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 pg : 636" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 1000.; \t\t\t\t#discharge of river\n", + "L = 256.; \t\t\t\t#crest length of diversion\n", + "f = 1.1; \t\t\t\t#silt factor\n", + "seg = 1./6; \t\t\t\t#safe exit gradient\n", + "hfl = 103; \t\t\t\t#high flood level\n", + "cf = 100; \t\t\t\t#reduced level of downstream concrete floor\n", + "H = 2.4; \t\t\t\t#maximum static head of weir\n", + "b = 40; \t\t\t\t#length of concrete floor\n", + "\n", + "\n", + "# Calculations and Results\n", + "q = Q/L;\n", + "R = 1.35*(q**2/f)**(1./3);\n", + "rld = hfl-1.5*R;\n", + "d = cf-rld;\n", + "d = round(d*100)/100;\n", + "print \"depth of downstream cut-off = %.2f m.\"%(d);\n", + "\n", + "alpha = b/d;\n", + "lambda1 = (1+(1+alpha**2)**0.5)/2;\n", + "G = H/(d*math.pi*(lambda1)**0.5);\n", + "\t\t\t\t#math.since G thickness by Bligh theory;hence unsafe.\"%(t);\n", + "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hydraulic calculation:\n", + "discharge per unit width of river = 11.10 cumecs.\n", + "regime scour depth = 6.72 m.\n", + "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n", + "crest level = 282.65 m.\n", + "heigth of shutter = 1.85 m.\n", + "depth of upstream cut-off = 2.00 m.\n", + " provide concrete cut off 2 m depth.\n", + "R.L of gates crest = 6.50 m.\n", + "Heigth of crest = 4.65 m.\n", + "design of weir wall:\n", + "provide top width of 3 m.\n", + "bottom width = 8 m.\n", + "design of impervious and pervious aprons:\n", + "total creep length = 78 m.\n", + "length of downstream impervious apron = 19 m.\n", + "length of upstream impervious apron = 33 m.\n", + "total length of d/s apron = 58 m.\n", + "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n", + "thickness of launching apron in horizontal position = 1.11 m.\n", + "provide launching apron of thickness 1.5 m.\n", + "thickness of apron in horizontal position = 1.60 m.\n", + "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n", + "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n", + "provide thickness of 1.90 m for rest of length of weir floor.\n", + "check by Khosla theory:\n", + "exit gradient = 0.13. < 1/6 hence safe\n", + "pressure at d/s of weir wall = 3.03 m.\n", + "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 6 m from d/s of weir wall = 2.66 m.\n", + "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n", + "pressure at 12 m from d/s of weir wall = 2.29 m.\n", + "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n", + "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.12 pg : 637" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#number of gates required for the barrage\n", + "#length and R.L of bamath.sin floor if silting bamath.sin is provided downstream of barrage\n", + "\n", + "#Given\n", + "Lmax = 212; \t\t\t\t#maximum reservior level\n", + "Lp = 211; \t\t\t\t#pond level\n", + "hfl = 210; \t\t\t\t#downstream high flood level in the river\n", + "Qmax = 3500; \t\t\t\t#maximum design flood discharge\n", + "Lcrest = 207; \t\t\t\t#crest level of the barrage\n", + "Lcrest_r = 208; \t\t\t\t#crest level of head regulator\n", + "Cd = 2.1; \t\t\t\t#coefficient of discharge for barrage\n", + "Cd_r = 1.5; \t\t\t\t#coefficient of discharge for head regulator\n", + "rbl = 205; \t\t\t\t#river bed level\n", + "Q = 500; \t\t\t\t#design discharge of main canal\n", + "\n", + "#design of water way for barrage during flood\n", + "H = Lmax-Lcrest;\n", + "L = Qmax/(Cd*H**1.5);\n", + "#which gives L = 149.07.\n", + "print \"nunmber of gates for the barrage = 15.\";\n", + "\n", + "#design of waterway for canal head regulator\n", + "H = Lp-Lcrest_r;\n", + "L1 = Q/(Cd_r*H**1.5);\n", + "#which gives L = 64.2\n", + "#hence provide 7 bays of 10 m each\n", + "print \"nunmber of gates for the head regulator = 7.\";\n", + "\n", + "#design of stilling bamath.sin\n", + "Hl = Lmax-hfl;\n", + "q = Qmax/L;\n", + "yc = (q**2/9.81)**(1./3);\n", + "Z = Hl/yc;\n", + "#math.since Z<1\n", + "Y = 1+0.93556*Z**0.368;\n", + "y2 = Y*yc;\n", + "Lc = 5*y2;\n", + "Lc = round(Lc*10)/10;\n", + "print \"Length of cistern = %.2f m.\"%(Lc);\n", + "Ef2 = yc*(Y+1/(2*Y**2));\n", + "j = hfl-Ef2;\n", + "j = round(j*10)/10;\n", + "print \"R.L of cistern = %.2f m.\"%(j);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "nunmber of gates for the barrage = 15.\n", + "nunmber of gates for the head regulator = 7.\n", + "Length of cistern = 33.30 m.\n", + "R.L of cistern = 202.70 m.\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14.ipynb new file mode 100755 index 00000000..f55e341a --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14.ipynb @@ -0,0 +1,1965 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e8ae669d88fc715c49999174af0f47a67eb761cc981a916d61f3cb981ae07f2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : IRRIGATION CHANNEL 1 SILT THEORIES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 pg : 662" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design irrigation channel on Kennedy's theory\n", + "\n", + "#Given\n", + "Q = 45; \t\t\t\t#discharge\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "m = 1.05; \t\t\t\t#critical velocity ratio\n", + "S = 1./5000; \t\t\t\t#bed slope\n", + "\n", + "D = 2; \t\t\t\t#assume\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "#for a trapezoidal section\n", + "B = (A-0.5*D**2)/2;\n", + "P = B+D*5**0.5;\n", + "R = A/P;\n", + "C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "V = C*(R*S)**0.5;\n", + "#VoV\n", + "#hence take second trial\n", + "D = 0.8; \t\t\t\t#assume\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "B = A/D-(s*D);\n", + "P = B+2.43*D;\n", + "R = A/P;\n", + "V = C*(R*S)**0.5;\n", + "#again Vo>V\n", + "#hence we take third trial\n", + "D = 0.7;\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "B = A/D+(s*D);\n", + "P = B+2.43*D;\n", + "R = A/P;\n", + "V = C*(R*S)**0.5;\n", + "B = round(B*100)/100;\n", + "#Vo is almost equal to V;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 20.75 m.\n", + "Depth of channel section = 0.70 m.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.27 pg : 703" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design irrigation channel by Kennedy method\n", + "\n", + "#Given\n", + "Q = 50.; \t\t\t\t#discharge\n", + "r = 2.5; \t\t\t\t#B/D ratio\n", + "m = 1.1; \t\t\t\t#critical velocity ratio\n", + "N = 0.025; \t\t\t\t#rogosity coefficient\n", + "s = 0.5; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing the equation of Vo and Q = A*V;we get\n", + "D = (Q/1.815)**(1/2.64);\n", + "B = r*D;\n", + "R = (B*D+0.5*D**2)/(B+2.236*D);\n", + "Vo = 0.55*m*D**0.64;\n", + "\n", + "#applying kutters formula; V = C(RS)**0.5\n", + "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "#assuming S**0.5 = y\n", + "#taking real values of y\n", + "S = 0.0196171 **2;\n", + "B = round(B*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 8.78 m.\n", + "Depth of channel section = 3.51 m.\n", + "Bed slope = 3.85e-04.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.28 pg : 704" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a regime channel umath.sing Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 35; \t\t\t\t#discharge\n", + "f = 0.9; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope\n", + "\n", + "\n", + "# Calculations\n", + "V = (Q*f/140)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*Q**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "\n", + "R = 5*V**2/(2*f);\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %i m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 1.39e-04.\n", + "Width of channel section = 24 m.\n", + "Depth of channel section = 1.80 m.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.29 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#design an irrigation canal for given data\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#discharge\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "r = 5.7; \t\t\t\t#B/D\n", + "\n", + "D = (Q/(0.55*6.2))**(1/2.64);\n", + "B = D*r;\n", + "R = (B*D+D**2/2)/(B+D*5**0.5);\n", + "Vo = 0.55*m*D**0.64;\n", + "#applying kutters formula; V = C(RS)**0.5\n", + "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "#assuming S**0.5 = y\n", + "y = [67.5,-0.968,1.55e-3,-2e-5]\n", + "d = roots(y)[0];\n", + "\t\t\t\t#taking real values of y\n", + "S = d.real**2;\n", + "B = round(B*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 9.99 m.\n", + "Depth of channel section = 1.75 m.\n", + "Bed slope = 2.01e-04.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.30 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Design a section of unlined canal in a loomy soil\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 50.; \t\t\t\t#discharge\n", + "V = 1.; \t\t\t\t#permissible velocity\n", + "s = 2.; \t\t\t\t#side slope\n", + "r = 6.; \t\t\t\t#B/D ratio\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "\n", + "\n", + "# Calculations\n", + "A = Q/V;\n", + "D = (A/(r+2))**0.5;\n", + "B = r*D;\n", + "P = B+2*(5*D**2)**0.5;\n", + "R = A/P;\n", + "S = (V*N/R**(2/3))**2;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %i m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15 m.\n", + "Depth of channel section = 2.50 m.\n", + "Bed slope = 5.06e-04.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.31 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "D = 5.; \t\t\t\t#depth of channel\n", + "d = 0.3; \t\t\t\t#grain size\n", + "k = 1.5; \t\t\t\t#size of roughness of channel bed\n", + "S = 1./4000; \t\t\t\t#bed slope\n", + "G = 2.65; \t\t\t\t#specific gravity\n", + "V = 0.02; \t\t\t\t#fall velocity\n", + "c_ = 1000.; \t\t\t\t#concentration at 0.3 m above bed\n", + "a = 0.3;\n", + "y = 2.5;\n", + "k_ = 0.4; \t\t\t\t#van karman's consmath.tant\n", + "\n", + "\n", + "# Calculations\n", + "R = 5; \t\t\t\t#R = D for wide channel\n", + "V_ = (gamma_w*R*S)**0.5;\n", + "c = c_*((a/y)*(D-y)/(D-a))**(V/(V_*k_));\n", + "\n", + "# Results\n", + "print \"concentration of suspended load = %i ppm.\"%(c);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "concentration of suspended load = 288 ppm.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.32 pg : 706" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "\n", + "\n", + "# Calculations and Results\n", + "#Laecey's theory\n", + "V = (Q*f/140)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*Q**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "\n", + "R = 5*V**2/(2*f);\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "B = round(B);\n", + "D = round(D*100)/100;\n", + "print \"By Laecey theory:\";\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "\n", + "#Kennedy's theory\n", + "r = B/D; \n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "#umath.sing equation of area of trapezoidal section;Vo = 0.55mD**0.64 and Q = A*Vo\n", + "\n", + "D = (Q/8.058)**(1/2.64);\n", + "B = r*D;\n", + "B = round(B);\n", + "D = round(D*100)/100;\n", + "print \"By Kennedy theory:\";\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By Laecey theory:\n", + "Bed slope = 1.62e-04.\n", + "Width of channel section = 26.00 m.\n", + "Depth of channel section = 1.84 m.\n", + "By Kennedy theory:\n", + "Width of channel section = 26.00 m.\n", + "Depth of channel section = 1.83 m.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.33 pg : 707" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design Laecey regime channel\n", + "\t\t\t\t\n", + "#Given\n", + "A = 100000.; \t\t\t\t#culturable area(hectare)\n", + "IR = 0.4; \t\t\t\t#intensity of irrigation in kharif season\n", + "IK = 0.3; \t\t\t\t#intensity of irrigation in rabi season\n", + "OR = 1800.; \t\t\t\t#outlet discharge factor in kharif season\n", + "OK = 800.; \t\t\t\t#outlet discharge factor in kharif season\n", + "l = 0.1; \t\t\t\t#conveyance loss\n", + "md = 0.328; \t\t\t\t#average diameter of material\n", + "\n", + "# Calculations\n", + "AR = A*IR; \t\t\t\t#area under rabi\n", + "AK = A*IK; \t\t\t\t#area under kharif \n", + "Qr = AR/OR;\n", + "Qk = AK/OK;\n", + "Q = 1.1*Qk;\n", + "f = 1.76*(md)**0.5;\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "S = f**(5/3)/(3340*Q**(1./6));\n", + "B = round(B*10)/10;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 1.62e-04.\n", + "Width of channel section = 26.40 m.\n", + "Depth of channel section = 1.86 m.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.34 pg : 707" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "D = 2.8; \t\t\t\t#depth of flow\n", + "c_ = 700; \t\t\t\t#concentration at 30 cm below water surface\n", + "y = 0.1;\n", + "a = D-0.3;\n", + "e = 0.4; \t\t\t\t#exponent in rouse equation;\n", + "\n", + "# Calculations\n", + "c = c_*(a*(D-y)/(y*(D-a)))**e;\n", + "\n", + "# Results\n", + "print \"concentration at point 10 cm above the bed = %i ppm.\"%(c);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "concentration at point 10 cm above the bed = 6109 ppm.\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.35 pg : 708" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f55e341a --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_1.ipynb @@ -0,0 +1,1965 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e8ae669d88fc715c49999174af0f47a67eb761cc981a916d61f3cb981ae07f2c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : IRRIGATION CHANNEL 1 SILT THEORIES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 pg : 662" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design irrigation channel on Kennedy's theory\n", + "\n", + "#Given\n", + "Q = 45; \t\t\t\t#discharge\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "m = 1.05; \t\t\t\t#critical velocity ratio\n", + "S = 1./5000; \t\t\t\t#bed slope\n", + "\n", + "D = 2; \t\t\t\t#assume\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "#for a trapezoidal section\n", + "B = (A-0.5*D**2)/2;\n", + "P = B+D*5**0.5;\n", + "R = A/P;\n", + "C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "V = C*(R*S)**0.5;\n", + "#VoV\n", + "#hence take second trial\n", + "D = 0.8; \t\t\t\t#assume\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "B = A/D-(s*D);\n", + "P = B+2.43*D;\n", + "R = A/P;\n", + "V = C*(R*S)**0.5;\n", + "#again Vo>V\n", + "#hence we take third trial\n", + "D = 0.7;\n", + "Vo = 0.55*m*D**0.64;\n", + "A = Q/Vo;\n", + "B = A/D+(s*D);\n", + "P = B+2.43*D;\n", + "R = A/P;\n", + "V = C*(R*S)**0.5;\n", + "B = round(B*100)/100;\n", + "#Vo is almost equal to V;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 20.75 m.\n", + "Depth of channel section = 0.70 m.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.27 pg : 703" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design irrigation channel by Kennedy method\n", + "\n", + "#Given\n", + "Q = 50.; \t\t\t\t#discharge\n", + "r = 2.5; \t\t\t\t#B/D ratio\n", + "m = 1.1; \t\t\t\t#critical velocity ratio\n", + "N = 0.025; \t\t\t\t#rogosity coefficient\n", + "s = 0.5; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing the equation of Vo and Q = A*V;we get\n", + "D = (Q/1.815)**(1/2.64);\n", + "B = r*D;\n", + "R = (B*D+0.5*D**2)/(B+2.236*D);\n", + "Vo = 0.55*m*D**0.64;\n", + "\n", + "#applying kutters formula; V = C(RS)**0.5\n", + "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "#assuming S**0.5 = y\n", + "#taking real values of y\n", + "S = 0.0196171 **2;\n", + "B = round(B*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 8.78 m.\n", + "Depth of channel section = 3.51 m.\n", + "Bed slope = 3.85e-04.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.28 pg : 704" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a regime channel umath.sing Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 35; \t\t\t\t#discharge\n", + "f = 0.9; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope\n", + "\n", + "\n", + "# Calculations\n", + "V = (Q*f/140)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*Q**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "\n", + "R = 5*V**2/(2*f);\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %i m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 1.39e-04.\n", + "Width of channel section = 24 m.\n", + "Depth of channel section = 1.80 m.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.29 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#design an irrigation canal for given data\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#discharge\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "r = 5.7; \t\t\t\t#B/D\n", + "\n", + "D = (Q/(0.55*6.2))**(1/2.64);\n", + "B = D*r;\n", + "R = (B*D+D**2/2)/(B+D*5**0.5);\n", + "Vo = 0.55*m*D**0.64;\n", + "#applying kutters formula; V = C(RS)**0.5\n", + "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n", + "#assuming S**0.5 = y\n", + "y = [67.5,-0.968,1.55e-3,-2e-5]\n", + "d = roots(y)[0];\n", + "\t\t\t\t#taking real values of y\n", + "S = d.real**2;\n", + "B = round(B*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 9.99 m.\n", + "Depth of channel section = 1.75 m.\n", + "Bed slope = 2.01e-04.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.30 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Design a section of unlined canal in a loomy soil\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 50.; \t\t\t\t#discharge\n", + "V = 1.; \t\t\t\t#permissible velocity\n", + "s = 2.; \t\t\t\t#side slope\n", + "r = 6.; \t\t\t\t#B/D ratio\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "\n", + "\n", + "# Calculations\n", + "A = Q/V;\n", + "D = (A/(r+2))**0.5;\n", + "B = r*D;\n", + "P = B+2*(5*D**2)**0.5;\n", + "R = A/P;\n", + "S = (V*N/R**(2/3))**2;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %i m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15 m.\n", + "Depth of channel section = 2.50 m.\n", + "Bed slope = 5.06e-04.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.31 pg : 705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "D = 5.; \t\t\t\t#depth of channel\n", + "d = 0.3; \t\t\t\t#grain size\n", + "k = 1.5; \t\t\t\t#size of roughness of channel bed\n", + "S = 1./4000; \t\t\t\t#bed slope\n", + "G = 2.65; \t\t\t\t#specific gravity\n", + "V = 0.02; \t\t\t\t#fall velocity\n", + "c_ = 1000.; \t\t\t\t#concentration at 0.3 m above bed\n", + "a = 0.3;\n", + "y = 2.5;\n", + "k_ = 0.4; \t\t\t\t#van karman's consmath.tant\n", + "\n", + "\n", + "# Calculations\n", + "R = 5; \t\t\t\t#R = D for wide channel\n", + "V_ = (gamma_w*R*S)**0.5;\n", + "c = c_*((a/y)*(D-y)/(D-a))**(V/(V_*k_));\n", + "\n", + "# Results\n", + "print \"concentration of suspended load = %i ppm.\"%(c);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "concentration of suspended load = 288 ppm.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.32 pg : 706" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "\n", + "\n", + "# Calculations and Results\n", + "#Laecey's theory\n", + "V = (Q*f/140)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*Q**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "\n", + "R = 5*V**2/(2*f);\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "B = round(B);\n", + "D = round(D*100)/100;\n", + "print \"By Laecey theory:\";\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "\n", + "#Kennedy's theory\n", + "r = B/D; \n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#rogosity coefficient\n", + "#umath.sing equation of area of trapezoidal section;Vo = 0.55mD**0.64 and Q = A*Vo\n", + "\n", + "D = (Q/8.058)**(1/2.64);\n", + "B = r*D;\n", + "B = round(B);\n", + "D = round(D*100)/100;\n", + "print \"By Kennedy theory:\";\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By Laecey theory:\n", + "Bed slope = 1.62e-04.\n", + "Width of channel section = 26.00 m.\n", + "Depth of channel section = 1.84 m.\n", + "By Kennedy theory:\n", + "Width of channel section = 26.00 m.\n", + "Depth of channel section = 1.83 m.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.33 pg : 707" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design Laecey regime channel\n", + "\t\t\t\t\n", + "#Given\n", + "A = 100000.; \t\t\t\t#culturable area(hectare)\n", + "IR = 0.4; \t\t\t\t#intensity of irrigation in kharif season\n", + "IK = 0.3; \t\t\t\t#intensity of irrigation in rabi season\n", + "OR = 1800.; \t\t\t\t#outlet discharge factor in kharif season\n", + "OK = 800.; \t\t\t\t#outlet discharge factor in kharif season\n", + "l = 0.1; \t\t\t\t#conveyance loss\n", + "md = 0.328; \t\t\t\t#average diameter of material\n", + "\n", + "# Calculations\n", + "AR = A*IR; \t\t\t\t#area under rabi\n", + "AK = A*IK; \t\t\t\t#area under kharif \n", + "Qr = AR/OR;\n", + "Qk = AK/OK;\n", + "Q = 1.1*Qk;\n", + "f = 1.76*(md)**0.5;\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "B = P-2.236*D;\n", + "S = f**(5/3)/(3340*Q**(1./6));\n", + "B = round(B*10)/10;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 1.62e-04.\n", + "Width of channel section = 26.40 m.\n", + "Depth of channel section = 1.86 m.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.34 pg : 707" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "D = 2.8; \t\t\t\t#depth of flow\n", + "c_ = 700; \t\t\t\t#concentration at 30 cm below water surface\n", + "y = 0.1;\n", + "a = D-0.3;\n", + "e = 0.4; \t\t\t\t#exponent in rouse equation;\n", + "\n", + "# Calculations\n", + "c = c_*(a*(D-y)/(y*(D-a)))**e;\n", + "\n", + "# Results\n", + "print \"concentration at point 10 cm above the bed = %i ppm.\"%(c);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "concentration at point 10 cm above the bed = 6109 ppm.\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.35 pg : 708" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15.ipynb new file mode 100755 index 00000000..c5a4b2dd --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15.ipynb @@ -0,0 +1,306 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06bc45481e0c8d1fd696ec9d96ac784607ece32d90669bf112f17cc78a27982d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : IRRIGATION CHANNEL 2 DESIGN PROCEDURE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 pg : 739" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an irrigation channel in alluvial soil by Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#Full supply discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n", + "B = 15.1;\n", + "D = 1.38;\n", + "\t\t\t\t#also from Fig.15.5 we get slope as\n", + "S = 0.19/1000;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15.10 m.\n", + "Depth of channel section = 1.38 m.\n", + "Bed slope = 1.90e-04.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros,linspace,float64\n", + "\n", + "#design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n", + "\t\t\t\t\n", + "#Given\n", + "dl = 157.7; \t\t\t\t#datum level\n", + "fsl = 157.; \t\t\t\t#full supply level of parent channel\n", + "bl = 156.; \t\t\t\t#bed level of parent channel\n", + "kor_r = 4.; \t\t\t\t#kor period of rabi\n", + "kor_k = 2.5; \t\t\t\t#kor period of kharif\n", + "kord_r = 13.4; \t\t\t\t#kor depth of rabi\n", + "kord_k = 19.; \t\t\t\t#kor depth of kharif\n", + "s = 0.5; \t\t\t\t#side slope\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#Kutter n\n", + "qo_r = 8.64*7*kor_r*100/kord_r; \t\t\t\t#outlet discharge for rabi(calculation is wrong in book)\n", + "qo_k = 8.64*7*kor_k*100/kord_k; \t\t\t\t#outlet discharge for kharif(calculation is wrong in book)\n", + "ca = 16000.; \t\t\t\t#culturable commanded area\n", + "Ir = 0.3; \t\t\t\t#intensity of irrigation in rabi\n", + "Ik = 0.125; \t\t\t\t#intensity of irrigation in rabi\n", + "\n", + "# Calculations and Results\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "Ak = ca*Ik; \t\t\t\t#area under kharif\n", + "q_r = Ar/qo_r;\n", + "q_k = Ak/qo_k;\n", + "q_r = round(q_r*100)/100;\n", + "q_k = round(q_k*100)/100;\n", + "print \"discharge neede for rabi crop = %.2f cumecs.\"%(q_r);\n", + "print \"discharge neede for kharif crop = %.2f cumecs.\"%(q_k);\n", + "print \"outlet discharge factor adopted = %i hectares per cumecs.\"%(qo_r);\n", + "\t\t\t\t#at km 5\n", + "ca = 8000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss after 5 km\n", + "q = q_r+l; \t\t\t\t#total discharge\n", + "dq = 1.1*q; \t\t\t\t#desigm discharge\n", + "S = 1./4000; \t\t\t\t#slope\n", + "B = array([5.5, 4.9, 4.55]); \t\t\t\t#Bed width\n", + "D = array([0.73, 0.79, 0.84]); \t\t\t\t#water depth\n", + "Vo = array([0.448, 0.472, 0.488]); \t\t\t\t#critical velocity\n", + "A = zeros(3)\n", + "V = zeros(3)\n", + "m = zeros(3)\n", + "print \"Bed width water depth area velocity critical velocity C.V.R\";\n", + "for i in range(3):\n", + " A[i] = B[i]*D[i]+D[i]**2/2;\n", + " V[i] = dq/A[i];\n", + " m[i] = V[i]/Vo[i];\n", + " A[i] = round(A[i]*100)/100;\n", + " V[i] = round(V[i]*1000)/1000;\n", + " m[i] = round(m[i]*100)/100;\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(B[i],D[i],A[i],V[i],Vo[i],m[i]);\n", + "\n", + "B = 4.55;\n", + "D = 0.84;\n", + "print \"hence take B = %.2f .; D = %.2f m.\"%(B,D);\n", + "\t\t\t\t#at km 4\n", + "q = round(q*100)/100;\n", + "print \"discharge at 5 km = %.2f cumecs.\"%(q);\n", + "ca = 10000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss below 5 km\n", + "P = B+D*5**0.5; \t\t\t\t#wetted perimeter\n", + "l1 = P*1000*2/1000000; \t\t\t\t#loss between 5 km and 4km\n", + "l2 = l1+l;\n", + "q = q_r+l2;\n", + "dq = 1.1*q;\n", + "q = round(q*1000)/1000;\n", + "print \"discharge at 4 km = %.2f cumecs\"%(q);\n", + "print \"other discharge are calculated and are tabulated as:\";\n", + "x = linspace(1,5,6)\n", + "A1 = array([4800, 4200, 3600, 3300, 3000, 2400],dtype=float64);\n", + "A2 = array([2000, 1750, 1500, 1375, 1250, 1000],dtype=float64);\n", + "S = array([22.5, 22.5, 22.5, 24, 24, 25]);\n", + "B = array([5.5, 5.2, 4.85, 4.7, 4.55, 4.55]);\n", + "D = array([1.04, 1.007, 0.975, 0.945, 0.915, 0.840]);\n", + "dq = array([3.56, 3.17, 2.8, 2.6, 2.4, 2.02]);\n", + "V = array([0.570, 0.555, 0.538, 0.530, 0.521, 0.484]);\n", + "m = array([1.015, 1, 1, 1, 1, 0.992]);\n", + "print \"Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\";\n", + "for i in range(6):\n", + " print \"%8i %i %i %.2f %.2f %.2f\\\n", + " %.2f %.2f %.2f\"%(x[i],A1[i],A2[i],S[i],B[i],D[i],dq[i],V[i],m[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge neede for rabi crop = 2.66 cumecs.\n", + "discharge neede for kharif crop = 2.51 cumecs.\n", + "outlet discharge factor adopted = 1805 hectares per cumecs.\n", + "Bed width water depth area velocity critical velocity C.V.R\n", + "5.50 0.73 4.28 0.47 0.45 1.05\n", + "4.90 0.79 4.18 0.48 0.47 1.02\n", + "4.55 0.84 4.17 0.48 0.49 0.99\n", + "hence take B = 4.55 .; D = 0.84 m.\n", + "discharge at 5 km = 1.83 cumecs.\n", + "discharge at 4 km = 2.17 cumecs\n", + "other discharge are calculated and are tabulated as:\n", + "Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\n", + " 1 4800 2000 22.50 5.50 1.04 3.56 0.57 1.01\n", + " 1 4200 1750 22.50 5.20 1.01 3.17 0.56 1.00\n", + " 2 3600 1500 22.50 4.85 0.97 2.80 0.54 1.00\n", + " 3 3300 1375 24.00 4.70 0.94 2.60 0.53 1.00\n", + " 4 3000 1250 24.00 4.55 0.92 2.40 0.52 1.00\n", + " 5 2400 1000 25.00 4.55 0.84 2.02 0.48 0.99\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 pg : 744" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "t = 2.; \t\t\t\t#top width of banks\n", + "h = 2.92; \t\t\t\t#heigth of banks from bed\n", + "n = 1.5;\n", + "\n", + "#sectional area of digging = sectional area of two banks\n", + "#By+zy**2 = 2(h-y)+2n(h-y)**2\n", + "#substituting the values and on simplificatio we get\n", + "s = [1,-13.26,18.59]\n", + "y = roots(s)[1];\n", + "#from this we get y = 11.666556 and 1.5934436.\n", + "#taking y = 1.5934436;\n", + "y = round(y*10)/10;\n", + "\n", + "# Results\n", + "print \"economical depth of cutting = %.2f m.\"%(y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "economical depth of cutting = 1.60 m.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c5a4b2dd --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_1.ipynb @@ -0,0 +1,306 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06bc45481e0c8d1fd696ec9d96ac784607ece32d90669bf112f17cc78a27982d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : IRRIGATION CHANNEL 2 DESIGN PROCEDURE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 pg : 739" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an irrigation channel in alluvial soil by Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#Full supply discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n", + "B = 15.1;\n", + "D = 1.38;\n", + "\t\t\t\t#also from Fig.15.5 we get slope as\n", + "S = 0.19/1000;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15.10 m.\n", + "Depth of channel section = 1.38 m.\n", + "Bed slope = 1.90e-04.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros,linspace,float64\n", + "\n", + "#design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n", + "\t\t\t\t\n", + "#Given\n", + "dl = 157.7; \t\t\t\t#datum level\n", + "fsl = 157.; \t\t\t\t#full supply level of parent channel\n", + "bl = 156.; \t\t\t\t#bed level of parent channel\n", + "kor_r = 4.; \t\t\t\t#kor period of rabi\n", + "kor_k = 2.5; \t\t\t\t#kor period of kharif\n", + "kord_r = 13.4; \t\t\t\t#kor depth of rabi\n", + "kord_k = 19.; \t\t\t\t#kor depth of kharif\n", + "s = 0.5; \t\t\t\t#side slope\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#Kutter n\n", + "qo_r = 8.64*7*kor_r*100/kord_r; \t\t\t\t#outlet discharge for rabi(calculation is wrong in book)\n", + "qo_k = 8.64*7*kor_k*100/kord_k; \t\t\t\t#outlet discharge for kharif(calculation is wrong in book)\n", + "ca = 16000.; \t\t\t\t#culturable commanded area\n", + "Ir = 0.3; \t\t\t\t#intensity of irrigation in rabi\n", + "Ik = 0.125; \t\t\t\t#intensity of irrigation in rabi\n", + "\n", + "# Calculations and Results\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "Ak = ca*Ik; \t\t\t\t#area under kharif\n", + "q_r = Ar/qo_r;\n", + "q_k = Ak/qo_k;\n", + "q_r = round(q_r*100)/100;\n", + "q_k = round(q_k*100)/100;\n", + "print \"discharge neede for rabi crop = %.2f cumecs.\"%(q_r);\n", + "print \"discharge neede for kharif crop = %.2f cumecs.\"%(q_k);\n", + "print \"outlet discharge factor adopted = %i hectares per cumecs.\"%(qo_r);\n", + "\t\t\t\t#at km 5\n", + "ca = 8000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss after 5 km\n", + "q = q_r+l; \t\t\t\t#total discharge\n", + "dq = 1.1*q; \t\t\t\t#desigm discharge\n", + "S = 1./4000; \t\t\t\t#slope\n", + "B = array([5.5, 4.9, 4.55]); \t\t\t\t#Bed width\n", + "D = array([0.73, 0.79, 0.84]); \t\t\t\t#water depth\n", + "Vo = array([0.448, 0.472, 0.488]); \t\t\t\t#critical velocity\n", + "A = zeros(3)\n", + "V = zeros(3)\n", + "m = zeros(3)\n", + "print \"Bed width water depth area velocity critical velocity C.V.R\";\n", + "for i in range(3):\n", + " A[i] = B[i]*D[i]+D[i]**2/2;\n", + " V[i] = dq/A[i];\n", + " m[i] = V[i]/Vo[i];\n", + " A[i] = round(A[i]*100)/100;\n", + " V[i] = round(V[i]*1000)/1000;\n", + " m[i] = round(m[i]*100)/100;\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(B[i],D[i],A[i],V[i],Vo[i],m[i]);\n", + "\n", + "B = 4.55;\n", + "D = 0.84;\n", + "print \"hence take B = %.2f .; D = %.2f m.\"%(B,D);\n", + "\t\t\t\t#at km 4\n", + "q = round(q*100)/100;\n", + "print \"discharge at 5 km = %.2f cumecs.\"%(q);\n", + "ca = 10000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss below 5 km\n", + "P = B+D*5**0.5; \t\t\t\t#wetted perimeter\n", + "l1 = P*1000*2/1000000; \t\t\t\t#loss between 5 km and 4km\n", + "l2 = l1+l;\n", + "q = q_r+l2;\n", + "dq = 1.1*q;\n", + "q = round(q*1000)/1000;\n", + "print \"discharge at 4 km = %.2f cumecs\"%(q);\n", + "print \"other discharge are calculated and are tabulated as:\";\n", + "x = linspace(1,5,6)\n", + "A1 = array([4800, 4200, 3600, 3300, 3000, 2400],dtype=float64);\n", + "A2 = array([2000, 1750, 1500, 1375, 1250, 1000],dtype=float64);\n", + "S = array([22.5, 22.5, 22.5, 24, 24, 25]);\n", + "B = array([5.5, 5.2, 4.85, 4.7, 4.55, 4.55]);\n", + "D = array([1.04, 1.007, 0.975, 0.945, 0.915, 0.840]);\n", + "dq = array([3.56, 3.17, 2.8, 2.6, 2.4, 2.02]);\n", + "V = array([0.570, 0.555, 0.538, 0.530, 0.521, 0.484]);\n", + "m = array([1.015, 1, 1, 1, 1, 0.992]);\n", + "print \"Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\";\n", + "for i in range(6):\n", + " print \"%8i %i %i %.2f %.2f %.2f\\\n", + " %.2f %.2f %.2f\"%(x[i],A1[i],A2[i],S[i],B[i],D[i],dq[i],V[i],m[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge neede for rabi crop = 2.66 cumecs.\n", + "discharge neede for kharif crop = 2.51 cumecs.\n", + "outlet discharge factor adopted = 1805 hectares per cumecs.\n", + "Bed width water depth area velocity critical velocity C.V.R\n", + "5.50 0.73 4.28 0.47 0.45 1.05\n", + "4.90 0.79 4.18 0.48 0.47 1.02\n", + "4.55 0.84 4.17 0.48 0.49 0.99\n", + "hence take B = 4.55 .; D = 0.84 m.\n", + "discharge at 5 km = 1.83 cumecs.\n", + "discharge at 4 km = 2.17 cumecs\n", + "other discharge are calculated and are tabulated as:\n", + "Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\n", + " 1 4800 2000 22.50 5.50 1.04 3.56 0.57 1.01\n", + " 1 4200 1750 22.50 5.20 1.01 3.17 0.56 1.00\n", + " 2 3600 1500 22.50 4.85 0.97 2.80 0.54 1.00\n", + " 3 3300 1375 24.00 4.70 0.94 2.60 0.53 1.00\n", + " 4 3000 1250 24.00 4.55 0.92 2.40 0.52 1.00\n", + " 5 2400 1000 25.00 4.55 0.84 2.02 0.48 0.99\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 pg : 744" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "t = 2.; \t\t\t\t#top width of banks\n", + "h = 2.92; \t\t\t\t#heigth of banks from bed\n", + "n = 1.5;\n", + "\n", + "#sectional area of digging = sectional area of two banks\n", + "#By+zy**2 = 2(h-y)+2n(h-y)**2\n", + "#substituting the values and on simplificatio we get\n", + "s = [1,-13.26,18.59]\n", + "y = roots(s)[1];\n", + "#from this we get y = 11.666556 and 1.5934436.\n", + "#taking y = 1.5934436;\n", + "y = round(y*10)/10;\n", + "\n", + "# Results\n", + "print \"economical depth of cutting = %.2f m.\"%(y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "economical depth of cutting = 1.60 m.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16.ipynb new file mode 100755 index 00000000..59b5d071 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16.ipynb @@ -0,0 +1,804 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be9a83eac81003b59bb1ec7327404f7c36e99fe14c8c14251b46829335a79c67" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : WATERLOGGING AND CANAL LINING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 pg : 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "from sympy import acot\n", + "\n", + "#design a trapezoidal concrete lined channel\n", + "\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 25./100000; \t\t\t\t#bed slope\n", + "N = 0.016; \t\t\t\t#rogsity coefficient\n", + "s = 1.5; \t\t\t\t#side slope\n", + "V = 1.5; \t\t\t\t#limiting velocity\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing manning's equation V = (R**2/3*S**1/2)/N;\n", + "R = (V*N/(S**0.5))**(1.5); \t\t\t\t#hydraulic mean depth\n", + "\n", + "#for s = 1.5;\n", + "theta = acot(1.5);\n", + "A = Q/V;\n", + "P = A/R;\n", + "#umath.sing equation of area and perimeter of trapezium\n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#we get\n", + "y = [1,-17.1,31.9]\n", + "d = roots(y)[1];\n", + "#we get D = 14.968917 and 2.1310826.\n", + "#taking d = 2.1310826;\n", + "b = P-4.18*d;\n", + "b = round(b*100)/100;\n", + "d = round(d*100)/100;\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 26.74 m.\n", + "required bed depth = 2.13 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 pg : 765" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a trapezoidal concrete lined channel\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 25./100000; \t\t\t\t#bed slope\n", + "N = 0.016; \t\t\t\t#rogsity coefficient\n", + "s = 1.5; \t\t\t\t#side slope\n", + "r = 8.; \t\t\t\t#b/d ratio\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n", + "#Perimeter = A/R \n", + "#V = Q/A and on simplification we get\n", + "d = ((101/10.09)*(12.18/10.09)**(2./3))**(3./8);\n", + "b = r*d;\n", + "b = round(b);\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %.2f m\"%(d);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 20.00 m.\n", + "required bed depth = 2.49 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 pg : 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import acot\n", + "\n", + "#design a concrete lined channel\n", + "\n", + "#Given\n", + "Q = 45.; \t\t\t\t#discharge\n", + "S = 1./10000; \t\t\t\t#bed slope\n", + "s = 5./4; \t\t\t\t#side slope\n", + "N = 0.018; \t\t\t\t#rogosity coefficient(manning N)\n", + "\n", + "#channel is assumed to be of triangular section\n", + "theta = acot(s);\n", + "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n", + "#V = Q/A; \n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#we get\n", + "d = (Q*2.86/1.925)**(3./8);\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"required depth of triangular channel = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of triangular channel = 4.84 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 pg : 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a concrete lined channel of trapezoidal section\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 250.; \t\t\t\t#discharge\n", + "S = 1./6000; \t\t\t\t#bed slope\n", + "s = 1.5; \t\t\t\t#side slope\n", + "d = 3.; \t\t\t\t#limiting depth\n", + "N = 0.015; \t\t\t\t#rogosity coefficient\n", + "\n", + "#umath.sing Perimeter = A/R;\n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#Q = A*V; and on simplification\n", + "#we get\n", + "#(3b+18.81)**5/3/(b+12.54)**2/3 = 290.47;\n", + "#solving it by trial and error method we get\n", + "b = 44.6;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %i m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 44.60 m.\n", + "required bed depth = 3 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 pg : 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "H = 10.; \t\t\t\t#depth of impervious stratum from top soil\n", + "D = 1.8; \t\t\t\t#position of drain below top soil surface\n", + "Hw = 1.5; \t\t\t\t#depth of highest point of water\n", + "k = 1.e-4; \t\t\t\t#permeability consmath.tant\n", + "\n", + "\n", + "# Calculations\n", + "#math.since water has to be removed in 24 hours\n", + "b = H-Hw;\n", + "a = H-D;\n", + "L = (4*k*(b**2-a**2)*100*24*3600/0.8)**0.5;\n", + "\n", + "# Results\n", + "print \"drains should be spaced at %i m c/c.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drains should be spaced at 147 m c/c.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.6 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 30.; \t\t\t\t#spacing between drans\n", + "Q = 4.e-6; \t\t\t\t#discharge\n", + "a = 8.;\n", + "b = 8.3;\n", + "\n", + "\n", + "# Calculations\n", + "k = 1000000*Q*L/(4*(b**2-a**2));\n", + "k = round(k*100)/100;\n", + "\n", + "# Results\n", + "print \"permeability coefficient = %.2fD-6 m/sec.\"%(k);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "permeability coefficient = 6.13D-6 m/sec.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.7 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 50.; \t\t\t\t#spacing between drains\n", + "k = 1.e-5; \t\t\t\t#permeability coefficient\n", + "a = 10.;\n", + "b = 10.3;\n", + "\n", + "\n", + "# Calculations\n", + "Q = 4*k*(b**2-a**2)/L;\n", + "Pav = Q*24*3600*100*100/L;\n", + "\n", + "# Results\n", + "print \"annual average rainfall = %i cm\"%(Pav);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "annual average rainfall = 84 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "r1 = 2; \t\t\t\t#ka/kb\n", + "r2 = 1./1.5; \t\t\t\t#La/Lb\n", + "r3 = 5./6; \t\t\t\t#(b**2-a**2)a/((b**2-a**2)b)\n", + "\n", + "\n", + "# Calculations\n", + "Rq = r1*r3/r2;\n", + "Rp = Rq/r2;\n", + "\n", + "# Results\n", + "print \"ratio of discharge at A and B = %.2f.\"%(Rq);\n", + "print \"ratio of average rainfall at A and B = %.2f.\"%(Rp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of discharge at A and B = 2.50.\n", + "ratio of average rainfall at A and B = 3.75.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.9 pg : 775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#decide whether it is economically feasible to provide canal lining\n", + "\t\t\t\t\n", + "#Given\n", + "li = 2.5; \t\t\t\t#seepage loss for lined channel\n", + "p1 = 25.; \t\t\t\t#wetted perimeter for lined channel\n", + "t = 12.; \t\t\t\t#thickness of concrete lining\n", + "lf = 0.02; \t\t\t\t#seepage loss for unlined channel\n", + "p2 = 20.; \t\t\t\t#wetted perimeter for unlined channel\n", + "\n", + "#assume 1 km length of canal\n", + "#annual benifit\n", + "\n", + "\t\t\t\t#(1).seepage\n", + "A1 = p1*1000; \t\t\t\t#area of wetted perimeter\n", + "li = li*p1/1000; \t\t\t\t#seepage loss\n", + "A2 = p2*1000; \t\t\t\t#area of wetted perimmeter for unlined channel\n", + "lf = p2*lf/1000; \t\t\t\t#seepage loss for unlined channel\n", + "s = li-lf; \t\t\t\t#saving in water loss\n", + "a1 = s*p1*100000; \t\t\t\t#annual revenue saved\n", + "\n", + "\t\t\t\t#(2)maintainence\n", + "a2 = 0.4*25000; \t\t\t\t#saving in maintainance math.cost\n", + "ts = a1+a2; \t\t\t\t#total annual benifit\n", + "\n", + "\t\t\t\t#annual math.cost\n", + "A1 = p2*1000; \t\t\t\t#area of lining for unlinrd canal\n", + "C = 100*A1; \t\t\t\t#math.cost of lining\n", + "\t\t\t\t#interest rate is 6%\n", + "i = 0.06;\n", + "N = 50;\n", + "a = (C*i*(i+1)**N)/((1+i)**N-1); \t\t\t\t#annual math.cost of lining or capital recovery factor\n", + "bcr = ts/a; \t\t\t\t#benifit math.cost ratio\n", + "bcr = round(bcr*1000)/1000;\n", + "print \"Benifit math.cost ratio = %.2f.\"%(bcr);\n", + "\t\t\t\t#as bcr>1\n", + "print \" ;Since it is more than 1.Hence, it is economically justifiable. \";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Benifit math.cost ratio = 1.30.\n", + " ;Since it is more than 1.Hence, it is economically justifiable. \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.10 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Ecd = 20; \t\t\t\t#electrical conductivity of drainage water\n", + "Eci = 1.5; \t\t\t\t#m mho/cm\n", + "Dc = 55.5; \t\t\t\t#consumptive use\n", + "\n", + "\n", + "# Calculations\n", + "Lr = Eci/Ecd;\n", + "D = Dc/(1-Lr);\n", + "\n", + "# Results\n", + "print \"required depth of water to be applied = %i mm.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of water to be applied = 60 mm.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.11 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Eci = 1.4; \t\t\t\t# m mho/cm\n", + "Ece = 11.; \t\t\t\t#saturated extract of soil\n", + "Dc = 85.; \t\t\t\t#consumptive use requirement of crop\n", + "\n", + "\n", + "# Calculations\n", + "#let us assume Ecd = 2Ece\n", + "Lr = Eci/(2*Ece);\n", + "Di = Dc/(1-Lr);\n", + "Di = round(Di*10)/10;\n", + "\n", + "\n", + "# Results\n", + "print \"required depth of water to be applied = %.2f mm.\"%(Di);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of water to be applied = 90.80 mm.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.12 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#percentage of earth work is saved in lined section\n", + "\n", + "#Given\n", + "s = 1.5; \t\t\t\t#side slope\n", + "Q = 15.; \t\t\t\t#discharge\n", + "S = 1./4000; \t\t\t\t#bed slope\n", + "Nl = 0.014; \t\t\t\t#manning n for lined channel\n", + "Nu = 0.028; \t\t\t\t#manning n for ulined channel \n", + "fb = 0.75; \t\t\t\t#free board\n", + "\n", + "#considering the perimeter of trapezoidal section\n", + "#taking minimum perimeter for given area\n", + "#i.e dP/dD = 0\n", + "#we get\n", + "#A = 2.1D**2; R = D/2; and P = 4.2D\n", + "\n", + "#for linrd channel\n", + "#Q = AR**(2/3)*S**0.5\n", + "#substituting above values we get\n", + "D = (10.0396)**(3./8);\n", + "B = 0.6*D;\n", + "R = D/2;\n", + "tau = 9.81*R*S*1000;\n", + "tau = round(tau*1000)/1000;\n", + "print \"for lined canal:\";\n", + "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n", + "Dc = D+fb; \t\t\t\t#total depth of cutting\n", + "A1 = (B+1.5*Dc)*Dc;\n", + "\n", + "#for unlined channel\n", + "#Q = AR**(2/3)*S**0.5\n", + "#substituting above values we get\n", + "D = 3.08;\n", + "B = 0.6*D;\n", + "R = D/2;\n", + "tau = 9.81*R*S*1000;\n", + "tau = round(tau*100)/100;\n", + "print \"for unlined canal:\";\n", + "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n", + "Dc = D+fb; \t\t\t\t#total depth of cutting\n", + "A2 = (B+1.5*Dc)*Dc;\n", + "per = (A2-A1)*100/A2; \n", + "per = round(per*100)/100;\n", + "print \"percent saving of earth = %.2f percent.\"%(per);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for lined canal:\n", + "average boundary shear stress = 2.91 N/square m.\n", + "for unlined canal:\n", + "average boundary shear stress = 3.78 N/square m.\n", + "percent saving of earth = 34.32 percent.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.13 pg : 778" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#design a lined canal\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 1./2500; \t\t\t\t#bed slope\n", + "V = 2.; \t\t\t\t#maximum permissible velocity\n", + "n = 0.013; \t\t\t\t#manning n\n", + "s = 1.25; \t\t\t\t#side slope\n", + "\n", + "\n", + "# Calculations\n", + "A = Q/V;\n", + "#from manning formula V = (R**2/3*S**1/2)/N;\n", + "R = (V*n/S**0.5)**1.5;\n", + "P = A/R;\n", + "\n", + "#now umath.sing the equation of area and perimeter of trapezoid\n", + "#area = D(B+2.5D)\n", + "#perimeter = B+3.2D;\n", + "#we get\n", + "y = [1.95,-33.73,50]\n", + "D = roots(y)[1];\n", + "#we get D = 15.660087 and 1.6373489\n", + "#taking D = 1.6373489;\n", + "B = P-3.2*D;\n", + "B = round(B*10)/10;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(B);\n", + "print \"required bed depth = %.2f m\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 28.50 m.\n", + "required bed depth = 1.64 m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.14 pg : 778" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "D = 2.; \t\t\t\t#bed depth\n", + "S = 1./1600; \t\t\t\t#bed slope\n", + "n = 0.015; \t\t\t\t#manning n\n", + "\n", + "\n", + "# Calculations and Results\n", + "A = B+2*D; \t\t\t\t#area of lining\n", + "#let B1 and D1 be new width and depth of bed\n", + "#for getting maximum discharge we diffrentiate Q and equating it to zero\n", + "#Q = S**0.5*B1D1**5/3/n\n", + "#we get\n", + "D1 = 45./16;\n", + "B1 = 9-2*D1;\n", + "Q1 = S**0.5*B1*D1**5/3/n;\n", + "D1 = round(D1*10000)/10000;\n", + "print \"new width of bed = %.2f m.\"%(B1);\n", + "print \"new depth of bed = %.2f m.\"%(D1);\n", + "print \" maximum discharge = %.2f cumec.\"%(Q1);\n", + "R = D;\n", + "V = R**(2./3)*S**0.5/n;\n", + "F = V/(9.81*D)**0.5; \t\t\t\t#froud number\n", + "R = D1;\n", + "V = R**(2./3)*S**0.5/n;\n", + "F = V/(9.81*D1)**0.5; \t\t\t\t#froud number\n", + "print \"Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "new width of bed = 3.38 m.\n", + "new depth of bed = 2.81 m.\n", + " maximum discharge = 329.96 cumec.\n", + "Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.15 pg : 779" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import acot\n", + "\n", + "#area to be irrigated\n", + "\t\t\t\t\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "D = 2.5; \t\t\t\t#bed depth\n", + "s = 1.5; \t\t\t\t#side slope\n", + "S = 1./1000; \t\t\t\t#bed slope\n", + "n = 0.016; \t\t\t\t#manning n\n", + "k = 10.; \t\t\t\t#kor period\n", + "d = 150.; \t\t\t\t#field irrigation requirement \n", + "\n", + "\n", + "# Calculations\n", + "theta = acot(s);\n", + "A = B*D+D**2*(theta+1/math.tan(theta));\n", + "P = B+2*D*(theta+1/math.tan(theta));\n", + "R = A/P;\n", + "Q = A*R**(2./3)*S**0.5/n;\n", + "V = Q*k*24*3600; \t\t\t\t#volum of water supply by channel\n", + "A = V*10/(d*10000);\n", + "Q = round(Q*100)/100;\n", + "A = round(A)*100;\n", + "\n", + "# Results\n", + "print \"maximum carrying capacity of canal = %.2f cumec.\"%(Q);\n", + "print \"Area to be irrigated = %.2f hectares.\"%(A);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum carrying capacity of canal = 70.65 cumec.\n", + "Area to be irrigated = 40700.00 hectares.\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..59b5d071 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_1.ipynb @@ -0,0 +1,804 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be9a83eac81003b59bb1ec7327404f7c36e99fe14c8c14251b46829335a79c67" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : WATERLOGGING AND CANAL LINING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1 pg : 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "from sympy import acot\n", + "\n", + "#design a trapezoidal concrete lined channel\n", + "\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 25./100000; \t\t\t\t#bed slope\n", + "N = 0.016; \t\t\t\t#rogsity coefficient\n", + "s = 1.5; \t\t\t\t#side slope\n", + "V = 1.5; \t\t\t\t#limiting velocity\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing manning's equation V = (R**2/3*S**1/2)/N;\n", + "R = (V*N/(S**0.5))**(1.5); \t\t\t\t#hydraulic mean depth\n", + "\n", + "#for s = 1.5;\n", + "theta = acot(1.5);\n", + "A = Q/V;\n", + "P = A/R;\n", + "#umath.sing equation of area and perimeter of trapezium\n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#we get\n", + "y = [1,-17.1,31.9]\n", + "d = roots(y)[1];\n", + "#we get D = 14.968917 and 2.1310826.\n", + "#taking d = 2.1310826;\n", + "b = P-4.18*d;\n", + "b = round(b*100)/100;\n", + "d = round(d*100)/100;\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 26.74 m.\n", + "required bed depth = 2.13 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 pg : 765" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a trapezoidal concrete lined channel\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 25./100000; \t\t\t\t#bed slope\n", + "N = 0.016; \t\t\t\t#rogsity coefficient\n", + "s = 1.5; \t\t\t\t#side slope\n", + "r = 8.; \t\t\t\t#b/d ratio\n", + "\n", + "\n", + "# Calculations\n", + "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n", + "#Perimeter = A/R \n", + "#V = Q/A and on simplification we get\n", + "d = ((101/10.09)*(12.18/10.09)**(2./3))**(3./8);\n", + "b = r*d;\n", + "b = round(b);\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %.2f m\"%(d);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 20.00 m.\n", + "required bed depth = 2.49 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3 pg : 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import acot\n", + "\n", + "#design a concrete lined channel\n", + "\n", + "#Given\n", + "Q = 45.; \t\t\t\t#discharge\n", + "S = 1./10000; \t\t\t\t#bed slope\n", + "s = 5./4; \t\t\t\t#side slope\n", + "N = 0.018; \t\t\t\t#rogosity coefficient(manning N)\n", + "\n", + "#channel is assumed to be of triangular section\n", + "theta = acot(s);\n", + "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n", + "#V = Q/A; \n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#we get\n", + "d = (Q*2.86/1.925)**(3./8);\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"required depth of triangular channel = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of triangular channel = 4.84 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4 pg : 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a concrete lined channel of trapezoidal section\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 250.; \t\t\t\t#discharge\n", + "S = 1./6000; \t\t\t\t#bed slope\n", + "s = 1.5; \t\t\t\t#side slope\n", + "d = 3.; \t\t\t\t#limiting depth\n", + "N = 0.015; \t\t\t\t#rogosity coefficient\n", + "\n", + "#umath.sing Perimeter = A/R;\n", + "#perimeter of trapezium = b+2d(theta+cot(theta));\n", + "#area of trapezium = bd+d**2(theta+cot(theta));\n", + "#Q = A*V; and on simplification\n", + "#we get\n", + "#(3b+18.81)**5/3/(b+12.54)**2/3 = 290.47;\n", + "#solving it by trial and error method we get\n", + "b = 44.6;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(b);\n", + "print \"required bed depth = %i m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 44.60 m.\n", + "required bed depth = 3 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5 pg : 767" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "H = 10.; \t\t\t\t#depth of impervious stratum from top soil\n", + "D = 1.8; \t\t\t\t#position of drain below top soil surface\n", + "Hw = 1.5; \t\t\t\t#depth of highest point of water\n", + "k = 1.e-4; \t\t\t\t#permeability consmath.tant\n", + "\n", + "\n", + "# Calculations\n", + "#math.since water has to be removed in 24 hours\n", + "b = H-Hw;\n", + "a = H-D;\n", + "L = (4*k*(b**2-a**2)*100*24*3600/0.8)**0.5;\n", + "\n", + "# Results\n", + "print \"drains should be spaced at %i m c/c.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drains should be spaced at 147 m c/c.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.6 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 30.; \t\t\t\t#spacing between drans\n", + "Q = 4.e-6; \t\t\t\t#discharge\n", + "a = 8.;\n", + "b = 8.3;\n", + "\n", + "\n", + "# Calculations\n", + "k = 1000000*Q*L/(4*(b**2-a**2));\n", + "k = round(k*100)/100;\n", + "\n", + "# Results\n", + "print \"permeability coefficient = %.2fD-6 m/sec.\"%(k);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "permeability coefficient = 6.13D-6 m/sec.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.7 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 50.; \t\t\t\t#spacing between drains\n", + "k = 1.e-5; \t\t\t\t#permeability coefficient\n", + "a = 10.;\n", + "b = 10.3;\n", + "\n", + "\n", + "# Calculations\n", + "Q = 4*k*(b**2-a**2)/L;\n", + "Pav = Q*24*3600*100*100/L;\n", + "\n", + "# Results\n", + "print \"annual average rainfall = %i cm\"%(Pav);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "annual average rainfall = 84 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8 pg : 768" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "r1 = 2; \t\t\t\t#ka/kb\n", + "r2 = 1./1.5; \t\t\t\t#La/Lb\n", + "r3 = 5./6; \t\t\t\t#(b**2-a**2)a/((b**2-a**2)b)\n", + "\n", + "\n", + "# Calculations\n", + "Rq = r1*r3/r2;\n", + "Rp = Rq/r2;\n", + "\n", + "# Results\n", + "print \"ratio of discharge at A and B = %.2f.\"%(Rq);\n", + "print \"ratio of average rainfall at A and B = %.2f.\"%(Rp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of discharge at A and B = 2.50.\n", + "ratio of average rainfall at A and B = 3.75.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.9 pg : 775" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#decide whether it is economically feasible to provide canal lining\n", + "\t\t\t\t\n", + "#Given\n", + "li = 2.5; \t\t\t\t#seepage loss for lined channel\n", + "p1 = 25.; \t\t\t\t#wetted perimeter for lined channel\n", + "t = 12.; \t\t\t\t#thickness of concrete lining\n", + "lf = 0.02; \t\t\t\t#seepage loss for unlined channel\n", + "p2 = 20.; \t\t\t\t#wetted perimeter for unlined channel\n", + "\n", + "#assume 1 km length of canal\n", + "#annual benifit\n", + "\n", + "\t\t\t\t#(1).seepage\n", + "A1 = p1*1000; \t\t\t\t#area of wetted perimeter\n", + "li = li*p1/1000; \t\t\t\t#seepage loss\n", + "A2 = p2*1000; \t\t\t\t#area of wetted perimmeter for unlined channel\n", + "lf = p2*lf/1000; \t\t\t\t#seepage loss for unlined channel\n", + "s = li-lf; \t\t\t\t#saving in water loss\n", + "a1 = s*p1*100000; \t\t\t\t#annual revenue saved\n", + "\n", + "\t\t\t\t#(2)maintainence\n", + "a2 = 0.4*25000; \t\t\t\t#saving in maintainance math.cost\n", + "ts = a1+a2; \t\t\t\t#total annual benifit\n", + "\n", + "\t\t\t\t#annual math.cost\n", + "A1 = p2*1000; \t\t\t\t#area of lining for unlinrd canal\n", + "C = 100*A1; \t\t\t\t#math.cost of lining\n", + "\t\t\t\t#interest rate is 6%\n", + "i = 0.06;\n", + "N = 50;\n", + "a = (C*i*(i+1)**N)/((1+i)**N-1); \t\t\t\t#annual math.cost of lining or capital recovery factor\n", + "bcr = ts/a; \t\t\t\t#benifit math.cost ratio\n", + "bcr = round(bcr*1000)/1000;\n", + "print \"Benifit math.cost ratio = %.2f.\"%(bcr);\n", + "\t\t\t\t#as bcr>1\n", + "print \" ;Since it is more than 1.Hence, it is economically justifiable. \";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Benifit math.cost ratio = 1.30.\n", + " ;Since it is more than 1.Hence, it is economically justifiable. \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.10 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Ecd = 20; \t\t\t\t#electrical conductivity of drainage water\n", + "Eci = 1.5; \t\t\t\t#m mho/cm\n", + "Dc = 55.5; \t\t\t\t#consumptive use\n", + "\n", + "\n", + "# Calculations\n", + "Lr = Eci/Ecd;\n", + "D = Dc/(1-Lr);\n", + "\n", + "# Results\n", + "print \"required depth of water to be applied = %i mm.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of water to be applied = 60 mm.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.11 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Eci = 1.4; \t\t\t\t# m mho/cm\n", + "Ece = 11.; \t\t\t\t#saturated extract of soil\n", + "Dc = 85.; \t\t\t\t#consumptive use requirement of crop\n", + "\n", + "\n", + "# Calculations\n", + "#let us assume Ecd = 2Ece\n", + "Lr = Eci/(2*Ece);\n", + "Di = Dc/(1-Lr);\n", + "Di = round(Di*10)/10;\n", + "\n", + "\n", + "# Results\n", + "print \"required depth of water to be applied = %.2f mm.\"%(Di);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required depth of water to be applied = 90.80 mm.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.12 pg : 776" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#percentage of earth work is saved in lined section\n", + "\n", + "#Given\n", + "s = 1.5; \t\t\t\t#side slope\n", + "Q = 15.; \t\t\t\t#discharge\n", + "S = 1./4000; \t\t\t\t#bed slope\n", + "Nl = 0.014; \t\t\t\t#manning n for lined channel\n", + "Nu = 0.028; \t\t\t\t#manning n for ulined channel \n", + "fb = 0.75; \t\t\t\t#free board\n", + "\n", + "#considering the perimeter of trapezoidal section\n", + "#taking minimum perimeter for given area\n", + "#i.e dP/dD = 0\n", + "#we get\n", + "#A = 2.1D**2; R = D/2; and P = 4.2D\n", + "\n", + "#for linrd channel\n", + "#Q = AR**(2/3)*S**0.5\n", + "#substituting above values we get\n", + "D = (10.0396)**(3./8);\n", + "B = 0.6*D;\n", + "R = D/2;\n", + "tau = 9.81*R*S*1000;\n", + "tau = round(tau*1000)/1000;\n", + "print \"for lined canal:\";\n", + "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n", + "Dc = D+fb; \t\t\t\t#total depth of cutting\n", + "A1 = (B+1.5*Dc)*Dc;\n", + "\n", + "#for unlined channel\n", + "#Q = AR**(2/3)*S**0.5\n", + "#substituting above values we get\n", + "D = 3.08;\n", + "B = 0.6*D;\n", + "R = D/2;\n", + "tau = 9.81*R*S*1000;\n", + "tau = round(tau*100)/100;\n", + "print \"for unlined canal:\";\n", + "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n", + "Dc = D+fb; \t\t\t\t#total depth of cutting\n", + "A2 = (B+1.5*Dc)*Dc;\n", + "per = (A2-A1)*100/A2; \n", + "per = round(per*100)/100;\n", + "print \"percent saving of earth = %.2f percent.\"%(per);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for lined canal:\n", + "average boundary shear stress = 2.91 N/square m.\n", + "for unlined canal:\n", + "average boundary shear stress = 3.78 N/square m.\n", + "percent saving of earth = 34.32 percent.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.13 pg : 778" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#design a lined canal\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 100.; \t\t\t\t#discharge\n", + "S = 1./2500; \t\t\t\t#bed slope\n", + "V = 2.; \t\t\t\t#maximum permissible velocity\n", + "n = 0.013; \t\t\t\t#manning n\n", + "s = 1.25; \t\t\t\t#side slope\n", + "\n", + "\n", + "# Calculations\n", + "A = Q/V;\n", + "#from manning formula V = (R**2/3*S**1/2)/N;\n", + "R = (V*n/S**0.5)**1.5;\n", + "P = A/R;\n", + "\n", + "#now umath.sing the equation of area and perimeter of trapezoid\n", + "#area = D(B+2.5D)\n", + "#perimeter = B+3.2D;\n", + "#we get\n", + "y = [1.95,-33.73,50]\n", + "D = roots(y)[1];\n", + "#we get D = 15.660087 and 1.6373489\n", + "#taking D = 1.6373489;\n", + "B = P-3.2*D;\n", + "B = round(B*10)/10;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"required bed width = %.2f m.\"%(B);\n", + "print \"required bed depth = %.2f m\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required bed width = 28.50 m.\n", + "required bed depth = 1.64 m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.14 pg : 778" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "D = 2.; \t\t\t\t#bed depth\n", + "S = 1./1600; \t\t\t\t#bed slope\n", + "n = 0.015; \t\t\t\t#manning n\n", + "\n", + "\n", + "# Calculations and Results\n", + "A = B+2*D; \t\t\t\t#area of lining\n", + "#let B1 and D1 be new width and depth of bed\n", + "#for getting maximum discharge we diffrentiate Q and equating it to zero\n", + "#Q = S**0.5*B1D1**5/3/n\n", + "#we get\n", + "D1 = 45./16;\n", + "B1 = 9-2*D1;\n", + "Q1 = S**0.5*B1*D1**5/3/n;\n", + "D1 = round(D1*10000)/10000;\n", + "print \"new width of bed = %.2f m.\"%(B1);\n", + "print \"new depth of bed = %.2f m.\"%(D1);\n", + "print \" maximum discharge = %.2f cumec.\"%(Q1);\n", + "R = D;\n", + "V = R**(2./3)*S**0.5/n;\n", + "F = V/(9.81*D)**0.5; \t\t\t\t#froud number\n", + "R = D1;\n", + "V = R**(2./3)*S**0.5/n;\n", + "F = V/(9.81*D1)**0.5; \t\t\t\t#froud number\n", + "print \"Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "new width of bed = 3.38 m.\n", + "new depth of bed = 2.81 m.\n", + " maximum discharge = 329.96 cumec.\n", + "Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.15 pg : 779" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import acot\n", + "\n", + "#area to be irrigated\n", + "\t\t\t\t\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "D = 2.5; \t\t\t\t#bed depth\n", + "s = 1.5; \t\t\t\t#side slope\n", + "S = 1./1000; \t\t\t\t#bed slope\n", + "n = 0.016; \t\t\t\t#manning n\n", + "k = 10.; \t\t\t\t#kor period\n", + "d = 150.; \t\t\t\t#field irrigation requirement \n", + "\n", + "\n", + "# Calculations\n", + "theta = acot(s);\n", + "A = B*D+D**2*(theta+1/math.tan(theta));\n", + "P = B+2*D*(theta+1/math.tan(theta));\n", + "R = A/P;\n", + "Q = A*R**(2./3)*S**0.5/n;\n", + "V = Q*k*24*3600; \t\t\t\t#volum of water supply by channel\n", + "A = V*10/(d*10000);\n", + "Q = round(Q*100)/100;\n", + "A = round(A)*100;\n", + "\n", + "# Results\n", + "print \"maximum carrying capacity of canal = %.2f cumec.\"%(Q);\n", + "print \"Area to be irrigated = %.2f hectares.\"%(A);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum carrying capacity of canal = 70.65 cumec.\n", + "Area to be irrigated = 40700.00 hectares.\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17.ipynb new file mode 100755 index 00000000..4cb73dad --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06ec184185f2d3771e5e9a8334a24a140307b0ca6ee46117ed9968f716f623ca" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : CANAL OUTLETS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "D = 100.0; \t\t\t\t#F.S.L of distributory\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "L = 9.; \t\t\t\t#length of pipe\n", + "d = 20.; \t\t\t\t#diameter of pipe\n", + "f = 0.005; \t\t\t\t#coefficient of friction\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = D-wc; \t\t\t\t#working head\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = math.pi*d**2/(4*10000);\n", + "q = C*A*(2*g*H)**0.5;\n", + "q = round(q*10000)/10000;\n", + "\n", + "# Results\n", + "print \"discharge through the outlet = %.5f cumec.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge through the outlet = 0.02840 cumec.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a submerged pipe\n", + "\t\t\t\t\n", + "#Given\n", + "q = 0.04; \t\t\t\t#discharge through outlet\n", + "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n", + "C = 0.7; \t\t\t\t#average value of coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "H = D-wc; \t\t\t\t#available head\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "d = round(d*10)/10;\n", + "\n", + "# Results\n", + "print \"diameter of pipe required = %.2f cm.\"%(d);\n", + "print \"use pipe of diameter 25 cm.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipe required = 22.80 cm.\n", + "use pipe of diameter 25 cm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#design submerged pipe\n", + "\t\t\t\t\n", + "#Given\n", + "q = 0.04; \t\t\t\t#discharge through outlet\n", + "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n", + "f = 0.01; \t\t\t\t#coefficient of friction\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "L = 9.; \t\t\t\t#Length of pipe\n", + "\n", + "H = D-wc; \t\t\t\t#working head\n", + "\n", + "# Calculations\n", + "#first trial\n", + "#taking d = 22.8 cm\n", + "d = 22.8;\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "\t\t\t\t#second trial\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"diameter of pipe required = %.2f cm.\"%(d);\n", + "print \"provide diameter of pipe as 25 cm.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipe required = 24.94 cm.\n", + "provide diameter of pipe as 25 cm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4 pg : 795" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an open flume outlet\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.06; \t\t\t\t#discharge\n", + "D = 0.85; \t\t\t\t#full supply depth\n", + "Hw = 15.; \t\t\t\t#available working head\n", + "Bt = 7.;\n", + "C = 1.6; \t\t\t\t#let us choose\n", + "\n", + "# Calculations and Results\n", + "H = (Q*100/(C*Bt))**(2./3);\n", + "mh = 0.2*H; \t\t\t\t#minimum modular head\n", + "mh = round(mh*1000)/1000;\n", + "print \"minimum modular head = %.2f m. < available working head.hemce,design is safe.\"%(mh);\n", + "o = H/D;\n", + "o = round(o*1000)/1000;\n", + "print \"setting of outlet = %.2f. <0.9.hence,outlet will work as hyper propotional outlet.\"%(o);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum modular head = 0.13 m. < available working head.hemce,design is safe.\n", + "setting of outlet = 0.78. <0.9.hence,outlet will work as hyper propotional outlet.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..4cb73dad --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_1.ipynb @@ -0,0 +1,221 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06ec184185f2d3771e5e9a8334a24a140307b0ca6ee46117ed9968f716f623ca" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17 : CANAL OUTLETS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "D = 100.0; \t\t\t\t#F.S.L of distributory\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "L = 9.; \t\t\t\t#length of pipe\n", + "d = 20.; \t\t\t\t#diameter of pipe\n", + "f = 0.005; \t\t\t\t#coefficient of friction\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = D-wc; \t\t\t\t#working head\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = math.pi*d**2/(4*10000);\n", + "q = C*A*(2*g*H)**0.5;\n", + "q = round(q*10000)/10000;\n", + "\n", + "# Results\n", + "print \"discharge through the outlet = %.5f cumec.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge through the outlet = 0.02840 cumec.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a submerged pipe\n", + "\t\t\t\t\n", + "#Given\n", + "q = 0.04; \t\t\t\t#discharge through outlet\n", + "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n", + "C = 0.7; \t\t\t\t#average value of coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "\n", + "H = D-wc; \t\t\t\t#available head\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "d = round(d*10)/10;\n", + "\n", + "# Results\n", + "print \"diameter of pipe required = %.2f cm.\"%(d);\n", + "print \"use pipe of diameter 25 cm.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipe required = 22.80 cm.\n", + "use pipe of diameter 25 cm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.3 pg : 788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#design submerged pipe\n", + "\t\t\t\t\n", + "#Given\n", + "q = 0.04; \t\t\t\t#discharge through outlet\n", + "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n", + "wc = 99.90; \t\t\t\t#F.S.L of water course\n", + "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n", + "f = 0.01; \t\t\t\t#coefficient of friction\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "L = 9.; \t\t\t\t#Length of pipe\n", + "\n", + "H = D-wc; \t\t\t\t#working head\n", + "\n", + "# Calculations\n", + "#first trial\n", + "#taking d = 22.8 cm\n", + "d = 22.8;\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "\t\t\t\t#second trial\n", + "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n", + "A = q/(C*(2*g*H)**0.5);\n", + "d = (4*A/math.pi)**0.5*100;\n", + "d = round(d*100)/100;\n", + "\n", + "# Results\n", + "print \"diameter of pipe required = %.2f cm.\"%(d);\n", + "print \"provide diameter of pipe as 25 cm.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipe required = 24.94 cm.\n", + "provide diameter of pipe as 25 cm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4 pg : 795" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an open flume outlet\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.06; \t\t\t\t#discharge\n", + "D = 0.85; \t\t\t\t#full supply depth\n", + "Hw = 15.; \t\t\t\t#available working head\n", + "Bt = 7.;\n", + "C = 1.6; \t\t\t\t#let us choose\n", + "\n", + "# Calculations and Results\n", + "H = (Q*100/(C*Bt))**(2./3);\n", + "mh = 0.2*H; \t\t\t\t#minimum modular head\n", + "mh = round(mh*1000)/1000;\n", + "print \"minimum modular head = %.2f m. < available working head.hemce,design is safe.\"%(mh);\n", + "o = H/D;\n", + "o = round(o*1000)/1000;\n", + "print \"setting of outlet = %.2f. <0.9.hence,outlet will work as hyper propotional outlet.\"%(o);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum modular head = 0.13 m. < available working head.hemce,design is safe.\n", + "setting of outlet = 0.78. <0.9.hence,outlet will work as hyper propotional outlet.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18.ipynb new file mode 100755 index 00000000..11ccf93e --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18.ipynb @@ -0,0 +1,733 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9d6614c4fb702767c601f4bf4c9d2e616fc5722613b10aacef812ff7d5ad3183" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : CANAL REGULATION WORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 pg : 811" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design Sarda type fall\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#full supply discharge\n", + "sl_u = 218.3; \t\t\t\t#supply level at upstream\n", + "sl_d = 216.8; \t\t\t\t#supply level at downstream\n", + "D = 1.8; \t\t\t\t#suplly depth\n", + "L = 26.; \t\t\t\t#bed width\n", + "bl_u = 216.5; \t\t\t\t#bed level upstream\n", + "bl_d = 215.; \t\t\t\t#bed level downstream\n", + "drop = 1.5;\n", + "\n", + "#from the eqauation; Q = 1.99LH**1.5*(H/B)**(1/6);\n", + "#B = 0.55*(H+d)**0.5;\n", + "#H+d = drop+D;\n", + "#we get\n", + "H = (0.774)**0.6;\n", + "d = 3.3-H;\n", + "Hc = D-H;\n", + "d = round(d*100)/100;\n", + "H = round(H*100)/100;\n", + "Hc = round(Hc*100)/100;\n", + "print \"H = %.2f m.d = %.2f m.\"%(H,d);\n", + "print \"crest height above bed = %.2f m.\"%(Hc);\n", + "\n", + "\t\t\t\t#adopt trapezoidal crest\n", + "B = 1; \t\t\t\t#top width\n", + "print \"D/S batter = 1:3; U/S batter = 1:8.\";\n", + "Va = Q/((27+D)*D);\n", + "vh = Va**2/(2*9.81);\n", + "tel_up = sl_u+vh;\n", + "crest = sl_u-H;\n", + "E = sl_u-crest;\n", + "print \"R.L of crest = %.2f m.\"%(crest);\n", + "print 'E = %.2f m.'%(E);\n", + "\t\t\t\t#design of cistern\n", + "x = (E*drop)**(2/3)/4; \t\t\t\t#depth of cistern\n", + "lc = 5*(E*drop)**0.5; \t\t\t\t#length of cistern\n", + "cb = bl_d-x;\n", + "x = round(x*100)/100;\n", + "cb = round(cb*1000)/1000;\n", + "lc = round(lc*10)/10;\n", + "print \"depth of cistern = %.2f m.\"%(x);\n", + "print \"length of cistern = %.2f m.\"%(lc);\n", + "print \"R.L of bed of cistern = %.2f m.\"%(cb);\n", + "print \"keep cistern at R.L 214.69.\";\n", + "\t\t\t\t#design of impervious floor\n", + "Hs = 2.44; \t\t\t\t#seepage head\n", + "c = 8.; \t\t\t\t#Bligh's coefficient\n", + "li = Hs*c;\n", + "d1 = 1;d2 = 1.6;\n", + "vl = 2*(d1+d2);\n", + "lh = li-vl;\n", + "print \"design of impervious floor:\";\n", + "print \"provide upstream cut-off = %i m.; downstream cut-off = %.2f m.\"%(d1,d2);\n", + "print \"length of horizontal impervious floor = %.2f m.\"%(lh);\n", + "print \"provide 15 m length impervious floor.\";\n", + "ld = 2*(D+1.2)+drop;\n", + "print \"minimum length of impervious floor to the d/s of toe of crest wall = %.2f m.\"%(ld);\n", + "print \"provide ld = 8 m.\";\n", + "bl = 15-8;\n", + "print \"the balance of the length %i m is to be provided under and u/s of the crest.\"%(bl);\n", + "\n", + "tcl = 15+2*(1+16);\n", + "print \"uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\";\n", + "rho = 2.24; \n", + "static = 2.44*(1-0.446)+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"for other points; thickness required = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.40 m.\";\n", + "print \"at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\";\n", + "\n", + "n = d2/(Hs*5); \t\t\t\t#n = 1/math.pi*(lambda)**0.5\n", + "\t\t\t\t#from khosla exit curve we get\n", + "alpha = 10.5;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2;\n", + "b = round(b*100)/100;\n", + "print \"checking of floor thickness by khosla theory:\";\n", + "print \"length of floor provided = %.2f m. > length by Bligh theory.\"%(b);\n", + "b = 15;\n", + "d2 = 1.8;\n", + "alpha = b/d2;\n", + "n = 0.145;\n", + "Ge = Hs*n/d2;\n", + "Ge = round(Ge*10)/10;\n", + "print \"exit gradient after increase in depth cut-off = %.2f. which is in permissible limit\"%(Ge);\n", + "print 'provide depth cut-off to 1.8 m.';\n", + "\t\t\t\t#calculation of pressure\n", + "print \"calculation of pressure:\";\n", + "print \"U/S cut-off:\";\n", + "d1 = 1.;\n", + "b = 15.;\n", + "alpha_ = d1/b;\n", + "fic1 = 100-24;\n", + "fid1 = 100-17;\n", + "t = 0.4;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"corrected fic1 = %.2f percent.\"%(fic1);\n", + "print \"D/S cut-off wall:\";\n", + "d2 = 1.8;\n", + "b = 15.;\n", + "alpha_ = d1/b;\n", + "fie2 = 31.;\n", + "fid2 = 21.5;\n", + "t = 0.6;\n", + "fie2 = fie2-(fie2-fid2)*t/1.8;\n", + "fie2 = round(fie2*10)/10;\n", + "print \"correcte fie2 = %.2f percent.\"%(fie2);\n", + "\t\t\t\t#calculation of thickness\n", + "print \"provide a minimum thickness of 0.4 m for u/s floor.\";\n", + "pre = fie2+(fic1-fie2)*8/b;\n", + "static = pre*Hs/100+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "pre = fie2+(fic1-fie2)*5/b;\n", + "static = pre*Hs/100+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at 3 m from d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "pre = fie2+(fic1-fie2)*2/b;\n", + "static = pre*Hs/100; \t\t\t\t#calculation is wrong in book\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at 6m from d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "\t\t\t\t#design of downstream wings\n", + "wing = 6*(E*drop)**0.5;\n", + "hw = D+0.5;\n", + "print \"heigth of top of downstream wings above the bed = %.2f m.\"%(hw);\n", + "projec = hw*3;\n", + "print \"length of warped wing measured along centre line of canal = %.2f m.\"%(projec);\n", + "\t\t\t\t#downstream pitching\n", + "l = 9+2*1.5;\n", + "print \"length of bed pitching = %.2f m.\"%(l);\n", + "print \"length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\";\n", + "print \"provide one toe wall of 1 m depth and 0.4 m width.\";\n", + "print \"side pitching is curtailed at 45 degree from the end of bed pitching \\\n", + "in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \";\n", + "\t\t\t\t#energy dissipators\n", + "q = Q/L;\n", + "dc = (q**2/9.81)**(1./3);\n", + "print \"size and position of friction blocks:\";\n", + "L = 2*dc;\n", + "w = dc;\n", + "h = dc;\n", + "di = 1.5*dc;\n", + "L = round(L*10)/10;\n", + "w = round(w*10)/10;\n", + "h = round(h*10)/10;\n", + "di = round(di);\n", + "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f \\\n", + "m.dismath.tance from toe of crest = %.2f m.\"%(L,w,h,di);\n", + "print \"provide two rows staggered ata dismath.tance of 1 m from toe of crest.\";\n", + "print \"size and position of cube blocks:\";\n", + "L = D/10;\n", + "w = D/10;\n", + "h = w;\n", + "L = round(L*10)/10;\n", + "w = round(w*10)/10;\n", + "h = round(h*10)/10;\n", + "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f m.\"%(L,w,h);\n", + "print \"provide two rows staggered at the end of impervious floor.\";\n", + "\t\t\t\t#u/s approach\n", + "r = 6*H;\n", + "print \"provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "H = 0.86 m.d = 2.44 m.\n", + "crest height above bed = 0.94 m.\n", + "D/S batter = 1:3; U/S batter = 1:8.\n", + "R.L of crest = 217.44 m.\n", + "E = 0.86 m.\n", + "depth of cistern = 0.25 m.\n", + "length of cistern = 5.70 m.\n", + "R.L of bed of cistern = 214.75 m.\n", + "keep cistern at R.L 214.69.\n", + "design of impervious floor:\n", + "provide upstream cut-off = 1 m.; downstream cut-off = 1.60 m.\n", + "length of horizontal impervious floor = 14.32 m.\n", + "provide 15 m length impervious floor.\n", + "minimum length of impervious floor to the d/s of toe of crest wall = 7.50 m.\n", + "provide ld = 8 m.\n", + "the balance of the length 7 m is to be provided under and u/s of the crest.\n", + "uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\n", + "for other points; thickness required = 1.29 m.\n", + "provide thickness of 1.40 m.\n", + "at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\n", + "checking of floor thickness by khosla theory:\n", + "length of floor provided = 17.18 m. > length by Bligh theory.\n", + "exit gradient after increase in depth cut-off = 0.20. which is in permissible limit\n", + "provide depth cut-off to 1.8 m.\n", + "calculation of pressure:\n", + "U/S cut-off:\n", + "corrected fic1 = 78.80 percent.\n", + "D/S cut-off wall:\n", + "correcte fie2 = 27.80 percent.\n", + "provide a minimum thickness of 0.4 m for u/s floor.\n", + "thickness at d/s toe of crest = 1.28 m.\n", + "provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\n", + "thickness at 3 m from d/s toe of crest = 1.08 m.\n", + "provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\n", + "thickness at 6m from d/s toe of crest = 0.68 m.\n", + "provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\n", + "heigth of top of downstream wings above the bed = 2.30 m.\n", + "length of warped wing measured along centre line of canal = 6.90 m.\n", + "length of bed pitching = 12.00 m.\n", + "length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\n", + "provide one toe wall of 1 m depth and 0.4 m width.\n", + "side pitching is curtailed at 45 degree from the end of bed pitching in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \n", + "size and position of friction blocks:\n", + "length of block = 1.20 m.width of block = 0.60 m.height of block = 0.60 m.dismath.tance from toe of crest = 1.00 m.\n", + "provide two rows staggered ata dismath.tance of 1 m from toe of crest.\n", + "size and position of cube blocks:\n", + "length of block = 0.20 m.width of block = 0.20 m.height of block = 0.20 m.\n", + "provide two rows staggered at the end of impervious floor.\n", + "provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2 pg : 820" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an unflumed straight glacis non-meter fall\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#full supply discharge\n", + "sl_u = 218.3; \t\t\t\t#supply level at upstream\n", + "sl_d = 216.8; \t\t\t\t#supply level at downstream\n", + "D = 1.8; \t\t\t\t#suplly depth\n", + "L = 26.; \t\t\t\t#bed width\n", + "bl_u = 216.5; \t\t\t\t#bed level upstream\n", + "bl_d = 215.; \t\t\t\t#bed level downstream\n", + "drop = 1.5;\n", + "Ge = 1./6; \t\t\t\t#permissible exit gradient\n", + "\n", + "\t\t\t\t#design of crest\n", + "print \"design of crest:\";\n", + "E = (Q/(1.84*L))**(2/3);\n", + "V = Q/((L+D)*D);\n", + "vh = V**2/(2*9.81);\n", + "tel_up = sl_u+vh;\n", + "cl = tel_up-E;\n", + "w = 2*E/3;\n", + "w = round(w*10)/10;\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "print \"width of crest = %.2f m.\"%(w);\n", + "\t\t\t\t#design of cistern\n", + "q = Q/L;\n", + "Hl = 1.5;\n", + "\t\t\t\t#from blench curve\n", + "Ef2 = 1.44;\n", + "cistern = sl_d+0.03-1.25*Ef2;\n", + "print \"R.L of cistern = %.2f m. > d/s bed level.\"%(cistern);\n", + "print \"keep R.L of cistern at 214.5 m.\";\n", + "l = 6*Ef2;\n", + "print \"length of cistern = %.2f m.\"%(l);\n", + "print \"provide cistern of 9 m length \";\n", + "d = bl_d-214.5;\n", + "print \"depth of cistern = %.2f m.\"%(d);\n", + "\n", + "\t\t\t\t#design of impervious floor\n", + "d1 = D/3;\n", + "print \"design of impervious floor:\";\n", + "print \"provide 0.4 m wide and 1 m deep curtain wall at u/s.\";\n", + "d2 = D/2;\n", + "print \"provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\";\n", + "Hs = cl-bl_d;\n", + "d2 = 1;\n", + "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n", + "\t\t\t\t#from khosla exit curves we get\n", + "alpha = 40;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2;\n", + "\t\t\t\t#math.since length is to excessive\n", + "d2 = 2;\n", + "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n", + "\t\t\t\t#from khosla exit curves we get\n", + "alpha = 10;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2+1;\n", + "print \"total length = %i m.length of cistern = 9 m.length of d/s glacis = 5.88\\\n", + " m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\"%(b);\n", + "\n", + "\t\t\t\t#pressure calculations\n", + "print \"pressure calculations:\";\n", + "print \"upstream curtain wall:\";\n", + "d1 = 1.;\n", + "b = 20;\n", + "alpha_ = d1/b;\n", + "t = 0.3;\n", + "fic1 = 100-22;\n", + "fid1 = 100-15;\n", + "corec = (fid1-fic1)*t/d1\n", + "fic1 = fic1+corec;\n", + "print \"corrected fi_c1 = %.2f percent.\"%(fic1);\n", + "print \"downstream curtain wall:\";\n", + "d2 = 2.;b = 20;\n", + "alpha_ = d2/b;\n", + "t = 0.5;\n", + "fie = 29.;\n", + "fid = 21;\n", + "corec = (fie-fid)*t/d2\n", + "fie = fie-corec;\n", + "print \"corrected fi_e = %.2f percent.\"%(fie);\n", + "print \"toe of glacis:\";\n", + "\t\t\t\t#assuming linear variation of pressure\n", + "p = fie+(80-fie)*9/20;\n", + "print \"pressure at downstream of the glacis = %.2f percent.\"%(p);\n", + "\n", + "\t\t\t\t#floor thickness\n", + "rho = 2.24;\n", + "print \"floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\";\n", + "static = p*2.44/100+(bl_d-214.5);\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness required at toe of glacis = %.2f m.provide 1.5 m thick floor for length of 3 m.\"%(t);\n", + "p = fie+(80-fie)*6/20;\n", + "static = p*2.44/100+(bl_d-214.5);\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness required at 3m from toe of glacis = %.2f m.provide \\\n", + "1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\"%(t);\n", + "t = 0.27*2.44/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness of d/s end of cistern = %.2f m.provide thickness of 0.6 m at d/s end of floor.\"%(t);\n", + "\n", + "\t\t\t\t#design of d/s protection\n", + "print \"no bed protection is needed as deflector wall is provided.\";\n", + "sp = 3*D;\n", + "print \"length of side protection = %.2f m.provide 5.5 m length of 20 cm\\\n", + " thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 \\\n", + " m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\"%(sp);\n", + "\t\t\t\t#design of u/s approach\n", + "print \"u/s wing wall is splayed at 45 degree from u/s end of impervious\\\n", + " floor.extend 1 m into earthen banks from line of F.S.L.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "design of crest:\n", + "length of crest = 26.00 m.\n", + "width of crest = 0.70 m.\n", + "R.L of cistern = 215.03 m. > d/s bed level.\n", + "keep R.L of cistern at 214.5 m.\n", + "length of cistern = 8.64 m.\n", + "provide cistern of 9 m length \n", + "depth of cistern = 0.50 m.\n", + "design of impervious floor:\n", + "provide 0.4 m wide and 1 m deep curtain wall at u/s.\n", + "provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\n", + "total length = 18 m.length of cistern = 9 m.length of d/s glacis = 5.88 m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\n", + "pressure calculations:\n", + "upstream curtain wall:\n", + "corrected fi_c1 = 80.10 percent.\n", + "downstream curtain wall:\n", + "corrected fi_e = 27.00 percent.\n", + "toe of glacis:\n", + "pressure at downstream of the glacis = 50.85 percent.\n", + "floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\n", + "floor thickness required at toe of glacis = 1.40 m.provide 1.5 m thick floor for length of 3 m.\n", + "floor thickness required at 3m from toe of glacis = 1.25 m.provide 1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\n", + "thickness of d/s end of cistern = 0.53 m.provide thickness of 0.6 m at d/s end of floor.\n", + "no bed protection is needed as deflector wall is provided.\n", + "length of side protection = 5.40 m.provide 5.5 m length of 20 cm thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\n", + "u/s wing wall is splayed at 45 degree from u/s end of impervious floor.extend 1 m into earthen banks from line of F.S.L.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 pg : 831" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a cross -regulator and head regulatorfor a distributory channel\n", + "#givrn\n", + "Q = 100.; \t\t\t\t#discharge of parent channel\n", + "Qd = 15.; \t\t\t\t#discharge ofdistributory\n", + "fsl_u = 218.1; \t\t\t\t#F.S.L of upstream parent channel\n", + "fsl_d = 217.9; \t\t\t\t#F.S.L of downstream of parent channel\n", + "bw_u = 42.; \t\t\t\t#bed width of parent channel upstream\n", + "bw_d = 38.; \t\t\t\t#bed width of parent channel downstream\n", + "hw = 2.5; \t\t\t\t#depth of water in parent channel\n", + "fsl_dis = 217.1; \t\t\t\t#F.S.L of distributory\n", + "hw_dis = 1.5; \t\t\t\t#depth of water in distributory\n", + "Ge = 1./5; \t\t\t\t#permissible exit gradient\n", + "\n", + "#design of cross regulator\n", + "print \"DESIGN OF CROSS-REGULATOR::\";\n", + "#design of crest and waterway\n", + "print \"design of crest and waterway:\";\n", + "cl = fsl_u-hw;\n", + "h = fsl_u-fsl_d;\n", + "d = fsl_d-cl;\n", + "C1 = 0.557;C2 = 0.8;\n", + "L = Q/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n", + "L = round(L*10)/10;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "tw = 28+4.5;\n", + "print \"provide 3 piers of 1.5 m width each.total width of cross regulator = %.2f m.\"%(tw);\n", + "#design of d/s floor\n", + "L = 28.;\n", + "q = Q/L;\n", + "Hl = fsl_u-fsl_d;\n", + "Ef2 = 1.89; \t\t\t\t#from blench curve\n", + "fl_d = fsl_d-Ef2;\n", + "print \"design of d/s floor:\";\n", + "print \"d/s floor level = %.2f m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\"%(fl_d);\n", + "Ef1 = Ef2+Hl;\n", + "#from specific energy curve\n", + "D1 = 0.7;\n", + "D2 = 1.65;\n", + "cil = 5*(D2-D1); \t\t\t\t#cistern length\n", + "tl = 2*16/3;\n", + "tl = round(tl*10)/10;\n", + "print \"cistern length = %.2f m.length of d/s floor = %.2f m.\"%(cil,tl);\n", + "#design of impervious floor\n", + "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n", + "w = 0.5; \t\t\t\t#width of cut-off\n", + "d2 = hw/2+0.6; \t\t\t\t#deth of d/s cut-off\n", + "d2 = 2; \t\t\t\t#keep\n", + "Hs = fsl_u-(fsl_d-hw); \t\t\t\t#maximum static head\n", + "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "#from exit gradient curves we get\n", + "alpha = 8.;\n", + "n = 0.148;\n", + "b = alpha*d2;\n", + "print \"design of impervious floor:\";\n", + "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n", + "print \"d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\";\n", + "d1 = 1.5;b = 16;\n", + "alpha_ = d1/b;\n", + "\t\t\t\t#hence\n", + "fic1 = 100-28;\n", + "fid1 = 100-19;\n", + "t = 0.5;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n", + "d2 = 2.;\n", + "b = 16;\n", + "alpha_ = d2/b;\n", + "\t\t\t\t#hence\n", + "t = 0.6;\n", + "fie2 = 31.;\n", + "fid2 = 22.;\n", + "fie2 = fie2-(fie2-fid2)*t/d2;\n", + "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n", + "t = 10.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "p = round(p*10)/10;\n", + "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n", + "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n", + "rho = 2.24;\n", + "t = fie2*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor near d/s cut-off = %.2f m.provide 0.7 m thick floor for last 2.1 m length.\"%(t);\n", + "t = 1.6/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n", + "t = 6.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 4 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 2 m length\"%(t);\n", + "t = 4.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n", + "\n", + "\t\t\t\t#design of u/s protection\n", + "d1 = hw/3+0.6;\n", + "v = d1;\n", + "v = round(v*100)/100;\n", + "print \"design of u/s protection:volume of block protection = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\";\n", + "cu = 2.25*d1;\n", + "cu = round(cu*100)/100;\n", + "print \"cubic content of launching apron = %.2f cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\"%(cu);\n", + "\t\t\t\t#design of d/s protection\n", + "d2 = hw/2+0.6;\n", + "v = d2;\n", + "v = round(v*100)/100;\n", + "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick \\\n", + "concret blocks over 0.6 m graded filter for length of 1.6 m.\";\n", + "cu = 2.25*d2;\n", + "cu = round(cu*100)/100;\n", + "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick launching apron\\\n", + " for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\"%(cu);\n", + "\n", + "\t\t\t\t#design of head regulator\n", + "print \"DESIGN OF DISTRIBUTORY HEAD REGULATOR::\";\n", + "\t\t\t\t#design of crest and waterway\n", + "print \"design of crest and waterway:\";\n", + "cl = fsl_u-hw+0.5;\n", + "h = fsl_u-fsl_dis;\n", + "d = fsl_dis-cl;\n", + "C1 = 0.557;C2 = 0.8;\n", + "L = Qd/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n", + "L = round(L*100)/100;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "print \"provide 2 bays of 3.5 m each with a 1 m thick pier in between.\";\n", + "tw = 8;\n", + "print \"total width of cross regulator = %.2f m.\"%(tw);\n", + "\t\t\t\t#design of d/s floor\n", + "L = 7.5;\n", + "q = Q/L;\n", + "Hl = fsl_u-fsl_dis;\n", + "Ef2 = 1.58; \t\t\t\t#from blench curve\n", + "fl_d = fsl_dis-Ef2;\n", + "print \"design of d/s floor:\";\n", + "print \"d/s floor level = %.2f m.;keepR.L of d/s floor = 215.50 m.\"%(fl_d);\n", + "Ef1 = Ef2+Hl;\n", + "\t\t\t\t#from specific energy curve\n", + "D1 = 0.42;D2 = 2.55;\n", + "cil = 5*(D2-D1); \t\t\t\t#cistern length\n", + "tl = 2*14/3;\n", + "print \"cistern length = %.2f m.\"%(cil);\n", + "\n", + "\t\t\t\t#design of impervious floor\n", + "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n", + "w = 0.5; \t\t\t\t#width of cut-off\n", + "d2 = hw_dis/2+0.6; \t\t\t\t#deth of d/s cut-off\n", + "d2 = 2; \t\t\t\t#keep\n", + "Hs = fsl_u-215.5; \t\t\t\t#maximum static head\n", + "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "\t\t\t\t#from exit gradient curves we get\n", + "alpha = 7;n = 0.154;\n", + "b = alpha*d2;\n", + "print \"design of impervious floor:\";\n", + "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n", + "print \"length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope =\\\n", + " 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\";\n", + "d1 = 1.5;\n", + "b = 16.;\n", + "alpha_ = d1/b;\n", + "\t\t\t\t#hence\n", + "fic1 = 100-28;\n", + "fid1 = 100-19;\n", + "t = 0.5;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n", + "d2 = 2.;\n", + "b = 16;\n", + "alpha_ = d2/b;\n", + "\t\t\t\t#hence\n", + "t = 0.6;\n", + "fie2 = 31.;\n", + "fid2 = 22;\n", + "fie2 = fie2-(fie2-fid2)*t/d2;\n", + "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n", + "t = 10.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "p = round(p*100)/100;\n", + "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n", + "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n", + "rho = 2.24;\n", + "t = p*2.6/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness under the crest = 1 m.\";\n", + "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n", + "t = 9.5;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 2 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 4 m length\"%(t);\n", + "t = 4.5;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n", + "t = 2;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 8.5 m from toe of glais = %.2f m.provide 0.7 m thick floor for next 2 m length\"%(t);\n", + "\n", + "\t\t\t\t#design of upstream protection\n", + "d = hw/3+0.6;\n", + "d = round(d*10)/10;\n", + "print \"design of u/s protection:u/s scour depth = %.2f m.provide same protection as in cross regulator\"%(d);\n", + "\n", + "\t\t\t\t#design of d/s protection\n", + "d2 = hw_dis/2+0.6;\n", + "v = d2;\n", + "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of concrete block = 0.5 m.provide 2 rows of \\\n", + "0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\";\n", + "cu = 2.25*d2;\n", + "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick \\\n", + "launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\"%(cu);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DESIGN OF CROSS-REGULATOR::\n", + "design of crest and waterway:\n", + "crest level = 215.60 m.\n", + "length of crest = 26.40 m.\n", + "provide 3 piers of 1.5 m width each.total width of cross regulator = 32.50 m.\n", + "design of d/s floor:\n", + "d/s floor level = 216.01 m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\n", + "cistern length = 4.75 m.length of d/s floor = 10.00 m.\n", + "design of impervious floor:\n", + "total length of impervious floor = 16 m.;which is divided as-\n", + "d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\n", + "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n", + "downstream cut-off:pressure = 28.30 percent.\n", + "toe of glacis:pressure = 59.20 percent.\n", + "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n", + "thickness of floor near d/s cut-off = 0.62 m.provide 0.7 m thick floor for last 2.1 m length.\n", + "thickness of floor at toe of glacis = 1.29 m.\n", + "thickness of floor at 4 m from toe of glais = 1.04 m.provide 1.1 m thick floor for next 2 m length\n", + "thickness of floor at 6 m from toe of glais = 0.91 m.provide 0.9 m thick floor for next 2.5 m length\n", + "design of u/s protection:volume of block protection = 1.43 cubic metre/metre.\n", + "keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\n", + "cubic content of launching apron = 3.23 cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\n", + "design of d/s protection:volume of inverted filter = 1.85 cubic metre/metre.\n", + "keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick concret blocks over 0.6 m graded filter for length of 1.6 m.\n", + "launching apron volume = 4.16 cubic metre/metre.provide 1 m thick launching apron for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\n", + "DESIGN OF DISTRIBUTORY HEAD REGULATOR::\n", + "design of crest and waterway:\n", + "crest level = 216.10 m.\n", + "length of crest = 2.89 m.\n", + "provide 2 bays of 3.5 m each with a 1 m thick pier in between.\n", + "total width of cross regulator = 8.00 m.\n", + "design of d/s floor:\n", + "d/s floor level = 215.52 m.;keepR.L of d/s floor = 215.50 m.\n", + "cistern length = 10.65 m.\n", + "design of impervious floor:\n", + "total length of impervious floor = 14 m.;which is divided as-\n", + "length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope = 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\n", + "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n", + "downstream cut-off:pressure = 28.30 percent.\n", + "toe of glacis:pressure = 59.24 percent.\n", + "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n", + "thickness under the crest = 1 m.\n", + "thickness of floor at toe of glacis = 1.24 m.\n", + "thickness of floor at 2 m from toe of glais = 1.22 m.provide 1.1 m thick floor for next 4 m length\n", + "thickness of floor at 6 m from toe of glais = 0.90 m.provide 0.9 m thick floor for next 2.5 m length\n", + "thickness of floor at 8.5 m from toe of glais = 0.74 m.provide 0.7 m thick floor for next 2 m length\n", + "design of u/s protection:u/s scour depth = 1.40 m.provide same protection as in cross regulator\n", + "design of d/s protection:volume of inverted filter = 1.35 cubic metre/metre.\n", + "keep thickness of concrete block = 0.5 m.provide 2 rows of 0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\n", + "launching apron volume = 3.04 cubic metre/metre.provide 1 m thick launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..11ccf93e --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_1.ipynb @@ -0,0 +1,733 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9d6614c4fb702767c601f4bf4c9d2e616fc5722613b10aacef812ff7d5ad3183" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18 : CANAL REGULATION WORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.1 pg : 811" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design Sarda type fall\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#full supply discharge\n", + "sl_u = 218.3; \t\t\t\t#supply level at upstream\n", + "sl_d = 216.8; \t\t\t\t#supply level at downstream\n", + "D = 1.8; \t\t\t\t#suplly depth\n", + "L = 26.; \t\t\t\t#bed width\n", + "bl_u = 216.5; \t\t\t\t#bed level upstream\n", + "bl_d = 215.; \t\t\t\t#bed level downstream\n", + "drop = 1.5;\n", + "\n", + "#from the eqauation; Q = 1.99LH**1.5*(H/B)**(1/6);\n", + "#B = 0.55*(H+d)**0.5;\n", + "#H+d = drop+D;\n", + "#we get\n", + "H = (0.774)**0.6;\n", + "d = 3.3-H;\n", + "Hc = D-H;\n", + "d = round(d*100)/100;\n", + "H = round(H*100)/100;\n", + "Hc = round(Hc*100)/100;\n", + "print \"H = %.2f m.d = %.2f m.\"%(H,d);\n", + "print \"crest height above bed = %.2f m.\"%(Hc);\n", + "\n", + "\t\t\t\t#adopt trapezoidal crest\n", + "B = 1; \t\t\t\t#top width\n", + "print \"D/S batter = 1:3; U/S batter = 1:8.\";\n", + "Va = Q/((27+D)*D);\n", + "vh = Va**2/(2*9.81);\n", + "tel_up = sl_u+vh;\n", + "crest = sl_u-H;\n", + "E = sl_u-crest;\n", + "print \"R.L of crest = %.2f m.\"%(crest);\n", + "print 'E = %.2f m.'%(E);\n", + "\t\t\t\t#design of cistern\n", + "x = (E*drop)**(2/3)/4; \t\t\t\t#depth of cistern\n", + "lc = 5*(E*drop)**0.5; \t\t\t\t#length of cistern\n", + "cb = bl_d-x;\n", + "x = round(x*100)/100;\n", + "cb = round(cb*1000)/1000;\n", + "lc = round(lc*10)/10;\n", + "print \"depth of cistern = %.2f m.\"%(x);\n", + "print \"length of cistern = %.2f m.\"%(lc);\n", + "print \"R.L of bed of cistern = %.2f m.\"%(cb);\n", + "print \"keep cistern at R.L 214.69.\";\n", + "\t\t\t\t#design of impervious floor\n", + "Hs = 2.44; \t\t\t\t#seepage head\n", + "c = 8.; \t\t\t\t#Bligh's coefficient\n", + "li = Hs*c;\n", + "d1 = 1;d2 = 1.6;\n", + "vl = 2*(d1+d2);\n", + "lh = li-vl;\n", + "print \"design of impervious floor:\";\n", + "print \"provide upstream cut-off = %i m.; downstream cut-off = %.2f m.\"%(d1,d2);\n", + "print \"length of horizontal impervious floor = %.2f m.\"%(lh);\n", + "print \"provide 15 m length impervious floor.\";\n", + "ld = 2*(D+1.2)+drop;\n", + "print \"minimum length of impervious floor to the d/s of toe of crest wall = %.2f m.\"%(ld);\n", + "print \"provide ld = 8 m.\";\n", + "bl = 15-8;\n", + "print \"the balance of the length %i m is to be provided under and u/s of the crest.\"%(bl);\n", + "\n", + "tcl = 15+2*(1+16);\n", + "print \"uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\";\n", + "rho = 2.24; \n", + "static = 2.44*(1-0.446)+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"for other points; thickness required = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.40 m.\";\n", + "print \"at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\";\n", + "\n", + "n = d2/(Hs*5); \t\t\t\t#n = 1/math.pi*(lambda)**0.5\n", + "\t\t\t\t#from khosla exit curve we get\n", + "alpha = 10.5;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2;\n", + "b = round(b*100)/100;\n", + "print \"checking of floor thickness by khosla theory:\";\n", + "print \"length of floor provided = %.2f m. > length by Bligh theory.\"%(b);\n", + "b = 15;\n", + "d2 = 1.8;\n", + "alpha = b/d2;\n", + "n = 0.145;\n", + "Ge = Hs*n/d2;\n", + "Ge = round(Ge*10)/10;\n", + "print \"exit gradient after increase in depth cut-off = %.2f. which is in permissible limit\"%(Ge);\n", + "print 'provide depth cut-off to 1.8 m.';\n", + "\t\t\t\t#calculation of pressure\n", + "print \"calculation of pressure:\";\n", + "print \"U/S cut-off:\";\n", + "d1 = 1.;\n", + "b = 15.;\n", + "alpha_ = d1/b;\n", + "fic1 = 100-24;\n", + "fid1 = 100-17;\n", + "t = 0.4;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"corrected fic1 = %.2f percent.\"%(fic1);\n", + "print \"D/S cut-off wall:\";\n", + "d2 = 1.8;\n", + "b = 15.;\n", + "alpha_ = d1/b;\n", + "fie2 = 31.;\n", + "fid2 = 21.5;\n", + "t = 0.6;\n", + "fie2 = fie2-(fie2-fid2)*t/1.8;\n", + "fie2 = round(fie2*10)/10;\n", + "print \"correcte fie2 = %.2f percent.\"%(fie2);\n", + "\t\t\t\t#calculation of thickness\n", + "print \"provide a minimum thickness of 0.4 m for u/s floor.\";\n", + "pre = fie2+(fic1-fie2)*8/b;\n", + "static = pre*Hs/100+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "pre = fie2+(fic1-fie2)*5/b;\n", + "static = pre*Hs/100+x;\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at 3 m from d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "pre = fie2+(fic1-fie2)*2/b;\n", + "static = pre*Hs/100; \t\t\t\t#calculation is wrong in book\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness at 6m from d/s toe of crest = %.2f m.\"%(t);\n", + "print \"provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\";\n", + "\t\t\t\t#design of downstream wings\n", + "wing = 6*(E*drop)**0.5;\n", + "hw = D+0.5;\n", + "print \"heigth of top of downstream wings above the bed = %.2f m.\"%(hw);\n", + "projec = hw*3;\n", + "print \"length of warped wing measured along centre line of canal = %.2f m.\"%(projec);\n", + "\t\t\t\t#downstream pitching\n", + "l = 9+2*1.5;\n", + "print \"length of bed pitching = %.2f m.\"%(l);\n", + "print \"length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\";\n", + "print \"provide one toe wall of 1 m depth and 0.4 m width.\";\n", + "print \"side pitching is curtailed at 45 degree from the end of bed pitching \\\n", + "in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \";\n", + "\t\t\t\t#energy dissipators\n", + "q = Q/L;\n", + "dc = (q**2/9.81)**(1./3);\n", + "print \"size and position of friction blocks:\";\n", + "L = 2*dc;\n", + "w = dc;\n", + "h = dc;\n", + "di = 1.5*dc;\n", + "L = round(L*10)/10;\n", + "w = round(w*10)/10;\n", + "h = round(h*10)/10;\n", + "di = round(di);\n", + "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f \\\n", + "m.dismath.tance from toe of crest = %.2f m.\"%(L,w,h,di);\n", + "print \"provide two rows staggered ata dismath.tance of 1 m from toe of crest.\";\n", + "print \"size and position of cube blocks:\";\n", + "L = D/10;\n", + "w = D/10;\n", + "h = w;\n", + "L = round(L*10)/10;\n", + "w = round(w*10)/10;\n", + "h = round(h*10)/10;\n", + "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f m.\"%(L,w,h);\n", + "print \"provide two rows staggered at the end of impervious floor.\";\n", + "\t\t\t\t#u/s approach\n", + "r = 6*H;\n", + "print \"provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "H = 0.86 m.d = 2.44 m.\n", + "crest height above bed = 0.94 m.\n", + "D/S batter = 1:3; U/S batter = 1:8.\n", + "R.L of crest = 217.44 m.\n", + "E = 0.86 m.\n", + "depth of cistern = 0.25 m.\n", + "length of cistern = 5.70 m.\n", + "R.L of bed of cistern = 214.75 m.\n", + "keep cistern at R.L 214.69.\n", + "design of impervious floor:\n", + "provide upstream cut-off = 1 m.; downstream cut-off = 1.60 m.\n", + "length of horizontal impervious floor = 14.32 m.\n", + "provide 15 m length impervious floor.\n", + "minimum length of impervious floor to the d/s of toe of crest wall = 7.50 m.\n", + "provide ld = 8 m.\n", + "the balance of the length 7 m is to be provided under and u/s of the crest.\n", + "uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\n", + "for other points; thickness required = 1.29 m.\n", + "provide thickness of 1.40 m.\n", + "at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\n", + "checking of floor thickness by khosla theory:\n", + "length of floor provided = 17.18 m. > length by Bligh theory.\n", + "exit gradient after increase in depth cut-off = 0.20. which is in permissible limit\n", + "provide depth cut-off to 1.8 m.\n", + "calculation of pressure:\n", + "U/S cut-off:\n", + "corrected fic1 = 78.80 percent.\n", + "D/S cut-off wall:\n", + "correcte fie2 = 27.80 percent.\n", + "provide a minimum thickness of 0.4 m for u/s floor.\n", + "thickness at d/s toe of crest = 1.28 m.\n", + "provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\n", + "thickness at 3 m from d/s toe of crest = 1.08 m.\n", + "provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\n", + "thickness at 6m from d/s toe of crest = 0.68 m.\n", + "provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\n", + "heigth of top of downstream wings above the bed = 2.30 m.\n", + "length of warped wing measured along centre line of canal = 6.90 m.\n", + "length of bed pitching = 12.00 m.\n", + "length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\n", + "provide one toe wall of 1 m depth and 0.4 m width.\n", + "side pitching is curtailed at 45 degree from the end of bed pitching in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \n", + "size and position of friction blocks:\n", + "length of block = 1.20 m.width of block = 0.60 m.height of block = 0.60 m.dismath.tance from toe of crest = 1.00 m.\n", + "provide two rows staggered ata dismath.tance of 1 m from toe of crest.\n", + "size and position of cube blocks:\n", + "length of block = 0.20 m.width of block = 0.20 m.height of block = 0.20 m.\n", + "provide two rows staggered at the end of impervious floor.\n", + "provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.2 pg : 820" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an unflumed straight glacis non-meter fall\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t#full supply discharge\n", + "sl_u = 218.3; \t\t\t\t#supply level at upstream\n", + "sl_d = 216.8; \t\t\t\t#supply level at downstream\n", + "D = 1.8; \t\t\t\t#suplly depth\n", + "L = 26.; \t\t\t\t#bed width\n", + "bl_u = 216.5; \t\t\t\t#bed level upstream\n", + "bl_d = 215.; \t\t\t\t#bed level downstream\n", + "drop = 1.5;\n", + "Ge = 1./6; \t\t\t\t#permissible exit gradient\n", + "\n", + "\t\t\t\t#design of crest\n", + "print \"design of crest:\";\n", + "E = (Q/(1.84*L))**(2/3);\n", + "V = Q/((L+D)*D);\n", + "vh = V**2/(2*9.81);\n", + "tel_up = sl_u+vh;\n", + "cl = tel_up-E;\n", + "w = 2*E/3;\n", + "w = round(w*10)/10;\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "print \"width of crest = %.2f m.\"%(w);\n", + "\t\t\t\t#design of cistern\n", + "q = Q/L;\n", + "Hl = 1.5;\n", + "\t\t\t\t#from blench curve\n", + "Ef2 = 1.44;\n", + "cistern = sl_d+0.03-1.25*Ef2;\n", + "print \"R.L of cistern = %.2f m. > d/s bed level.\"%(cistern);\n", + "print \"keep R.L of cistern at 214.5 m.\";\n", + "l = 6*Ef2;\n", + "print \"length of cistern = %.2f m.\"%(l);\n", + "print \"provide cistern of 9 m length \";\n", + "d = bl_d-214.5;\n", + "print \"depth of cistern = %.2f m.\"%(d);\n", + "\n", + "\t\t\t\t#design of impervious floor\n", + "d1 = D/3;\n", + "print \"design of impervious floor:\";\n", + "print \"provide 0.4 m wide and 1 m deep curtain wall at u/s.\";\n", + "d2 = D/2;\n", + "print \"provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\";\n", + "Hs = cl-bl_d;\n", + "d2 = 1;\n", + "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n", + "\t\t\t\t#from khosla exit curves we get\n", + "alpha = 40;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2;\n", + "\t\t\t\t#math.since length is to excessive\n", + "d2 = 2;\n", + "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n", + "\t\t\t\t#from khosla exit curves we get\n", + "alpha = 10;\n", + "lambda1 = (1/(math.pi*n))**2;\n", + "alpha = ((2*lambda1-1)**2-1)**0.5;\n", + "b = alpha*d2+1;\n", + "print \"total length = %i m.length of cistern = 9 m.length of d/s glacis = 5.88\\\n", + " m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\"%(b);\n", + "\n", + "\t\t\t\t#pressure calculations\n", + "print \"pressure calculations:\";\n", + "print \"upstream curtain wall:\";\n", + "d1 = 1.;\n", + "b = 20;\n", + "alpha_ = d1/b;\n", + "t = 0.3;\n", + "fic1 = 100-22;\n", + "fid1 = 100-15;\n", + "corec = (fid1-fic1)*t/d1\n", + "fic1 = fic1+corec;\n", + "print \"corrected fi_c1 = %.2f percent.\"%(fic1);\n", + "print \"downstream curtain wall:\";\n", + "d2 = 2.;b = 20;\n", + "alpha_ = d2/b;\n", + "t = 0.5;\n", + "fie = 29.;\n", + "fid = 21;\n", + "corec = (fie-fid)*t/d2\n", + "fie = fie-corec;\n", + "print \"corrected fi_e = %.2f percent.\"%(fie);\n", + "print \"toe of glacis:\";\n", + "\t\t\t\t#assuming linear variation of pressure\n", + "p = fie+(80-fie)*9/20;\n", + "print \"pressure at downstream of the glacis = %.2f percent.\"%(p);\n", + "\n", + "\t\t\t\t#floor thickness\n", + "rho = 2.24;\n", + "print \"floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\";\n", + "static = p*2.44/100+(bl_d-214.5);\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness required at toe of glacis = %.2f m.provide 1.5 m thick floor for length of 3 m.\"%(t);\n", + "p = fie+(80-fie)*6/20;\n", + "static = p*2.44/100+(bl_d-214.5);\n", + "t = static/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"floor thickness required at 3m from toe of glacis = %.2f m.provide \\\n", + "1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\"%(t);\n", + "t = 0.27*2.44/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness of d/s end of cistern = %.2f m.provide thickness of 0.6 m at d/s end of floor.\"%(t);\n", + "\n", + "\t\t\t\t#design of d/s protection\n", + "print \"no bed protection is needed as deflector wall is provided.\";\n", + "sp = 3*D;\n", + "print \"length of side protection = %.2f m.provide 5.5 m length of 20 cm\\\n", + " thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 \\\n", + " m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\"%(sp);\n", + "\t\t\t\t#design of u/s approach\n", + "print \"u/s wing wall is splayed at 45 degree from u/s end of impervious\\\n", + " floor.extend 1 m into earthen banks from line of F.S.L.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "design of crest:\n", + "length of crest = 26.00 m.\n", + "width of crest = 0.70 m.\n", + "R.L of cistern = 215.03 m. > d/s bed level.\n", + "keep R.L of cistern at 214.5 m.\n", + "length of cistern = 8.64 m.\n", + "provide cistern of 9 m length \n", + "depth of cistern = 0.50 m.\n", + "design of impervious floor:\n", + "provide 0.4 m wide and 1 m deep curtain wall at u/s.\n", + "provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\n", + "total length = 18 m.length of cistern = 9 m.length of d/s glacis = 5.88 m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\n", + "pressure calculations:\n", + "upstream curtain wall:\n", + "corrected fi_c1 = 80.10 percent.\n", + "downstream curtain wall:\n", + "corrected fi_e = 27.00 percent.\n", + "toe of glacis:\n", + "pressure at downstream of the glacis = 50.85 percent.\n", + "floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\n", + "floor thickness required at toe of glacis = 1.40 m.provide 1.5 m thick floor for length of 3 m.\n", + "floor thickness required at 3m from toe of glacis = 1.25 m.provide 1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\n", + "thickness of d/s end of cistern = 0.53 m.provide thickness of 0.6 m at d/s end of floor.\n", + "no bed protection is needed as deflector wall is provided.\n", + "length of side protection = 5.40 m.provide 5.5 m length of 20 cm thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\n", + "u/s wing wall is splayed at 45 degree from u/s end of impervious floor.extend 1 m into earthen banks from line of F.S.L.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18.3 pg : 831" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a cross -regulator and head regulatorfor a distributory channel\n", + "#givrn\n", + "Q = 100.; \t\t\t\t#discharge of parent channel\n", + "Qd = 15.; \t\t\t\t#discharge ofdistributory\n", + "fsl_u = 218.1; \t\t\t\t#F.S.L of upstream parent channel\n", + "fsl_d = 217.9; \t\t\t\t#F.S.L of downstream of parent channel\n", + "bw_u = 42.; \t\t\t\t#bed width of parent channel upstream\n", + "bw_d = 38.; \t\t\t\t#bed width of parent channel downstream\n", + "hw = 2.5; \t\t\t\t#depth of water in parent channel\n", + "fsl_dis = 217.1; \t\t\t\t#F.S.L of distributory\n", + "hw_dis = 1.5; \t\t\t\t#depth of water in distributory\n", + "Ge = 1./5; \t\t\t\t#permissible exit gradient\n", + "\n", + "#design of cross regulator\n", + "print \"DESIGN OF CROSS-REGULATOR::\";\n", + "#design of crest and waterway\n", + "print \"design of crest and waterway:\";\n", + "cl = fsl_u-hw;\n", + "h = fsl_u-fsl_d;\n", + "d = fsl_d-cl;\n", + "C1 = 0.557;C2 = 0.8;\n", + "L = Q/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n", + "L = round(L*10)/10;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "tw = 28+4.5;\n", + "print \"provide 3 piers of 1.5 m width each.total width of cross regulator = %.2f m.\"%(tw);\n", + "#design of d/s floor\n", + "L = 28.;\n", + "q = Q/L;\n", + "Hl = fsl_u-fsl_d;\n", + "Ef2 = 1.89; \t\t\t\t#from blench curve\n", + "fl_d = fsl_d-Ef2;\n", + "print \"design of d/s floor:\";\n", + "print \"d/s floor level = %.2f m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\"%(fl_d);\n", + "Ef1 = Ef2+Hl;\n", + "#from specific energy curve\n", + "D1 = 0.7;\n", + "D2 = 1.65;\n", + "cil = 5*(D2-D1); \t\t\t\t#cistern length\n", + "tl = 2*16/3;\n", + "tl = round(tl*10)/10;\n", + "print \"cistern length = %.2f m.length of d/s floor = %.2f m.\"%(cil,tl);\n", + "#design of impervious floor\n", + "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n", + "w = 0.5; \t\t\t\t#width of cut-off\n", + "d2 = hw/2+0.6; \t\t\t\t#deth of d/s cut-off\n", + "d2 = 2; \t\t\t\t#keep\n", + "Hs = fsl_u-(fsl_d-hw); \t\t\t\t#maximum static head\n", + "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "#from exit gradient curves we get\n", + "alpha = 8.;\n", + "n = 0.148;\n", + "b = alpha*d2;\n", + "print \"design of impervious floor:\";\n", + "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n", + "print \"d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\";\n", + "d1 = 1.5;b = 16;\n", + "alpha_ = d1/b;\n", + "\t\t\t\t#hence\n", + "fic1 = 100-28;\n", + "fid1 = 100-19;\n", + "t = 0.5;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n", + "d2 = 2.;\n", + "b = 16;\n", + "alpha_ = d2/b;\n", + "\t\t\t\t#hence\n", + "t = 0.6;\n", + "fie2 = 31.;\n", + "fid2 = 22.;\n", + "fie2 = fie2-(fie2-fid2)*t/d2;\n", + "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n", + "t = 10.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "p = round(p*10)/10;\n", + "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n", + "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n", + "rho = 2.24;\n", + "t = fie2*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor near d/s cut-off = %.2f m.provide 0.7 m thick floor for last 2.1 m length.\"%(t);\n", + "t = 1.6/(rho-1);\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n", + "t = 6.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 4 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 2 m length\"%(t);\n", + "t = 4.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n", + "\n", + "\t\t\t\t#design of u/s protection\n", + "d1 = hw/3+0.6;\n", + "v = d1;\n", + "v = round(v*100)/100;\n", + "print \"design of u/s protection:volume of block protection = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\";\n", + "cu = 2.25*d1;\n", + "cu = round(cu*100)/100;\n", + "print \"cubic content of launching apron = %.2f cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\"%(cu);\n", + "\t\t\t\t#design of d/s protection\n", + "d2 = hw/2+0.6;\n", + "v = d2;\n", + "v = round(v*100)/100;\n", + "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick \\\n", + "concret blocks over 0.6 m graded filter for length of 1.6 m.\";\n", + "cu = 2.25*d2;\n", + "cu = round(cu*100)/100;\n", + "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick launching apron\\\n", + " for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\"%(cu);\n", + "\n", + "\t\t\t\t#design of head regulator\n", + "print \"DESIGN OF DISTRIBUTORY HEAD REGULATOR::\";\n", + "\t\t\t\t#design of crest and waterway\n", + "print \"design of crest and waterway:\";\n", + "cl = fsl_u-hw+0.5;\n", + "h = fsl_u-fsl_dis;\n", + "d = fsl_dis-cl;\n", + "C1 = 0.557;C2 = 0.8;\n", + "L = Qd/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n", + "L = round(L*100)/100;\n", + "print \"crest level = %.2f m.\"%(cl);\n", + "print \"length of crest = %.2f m.\"%(L);\n", + "print \"provide 2 bays of 3.5 m each with a 1 m thick pier in between.\";\n", + "tw = 8;\n", + "print \"total width of cross regulator = %.2f m.\"%(tw);\n", + "\t\t\t\t#design of d/s floor\n", + "L = 7.5;\n", + "q = Q/L;\n", + "Hl = fsl_u-fsl_dis;\n", + "Ef2 = 1.58; \t\t\t\t#from blench curve\n", + "fl_d = fsl_dis-Ef2;\n", + "print \"design of d/s floor:\";\n", + "print \"d/s floor level = %.2f m.;keepR.L of d/s floor = 215.50 m.\"%(fl_d);\n", + "Ef1 = Ef2+Hl;\n", + "\t\t\t\t#from specific energy curve\n", + "D1 = 0.42;D2 = 2.55;\n", + "cil = 5*(D2-D1); \t\t\t\t#cistern length\n", + "tl = 2*14/3;\n", + "print \"cistern length = %.2f m.\"%(cil);\n", + "\n", + "\t\t\t\t#design of impervious floor\n", + "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n", + "w = 0.5; \t\t\t\t#width of cut-off\n", + "d2 = hw_dis/2+0.6; \t\t\t\t#deth of d/s cut-off\n", + "d2 = 2; \t\t\t\t#keep\n", + "Hs = fsl_u-215.5; \t\t\t\t#maximum static head\n", + "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n", + "\t\t\t\t#from exit gradient curves we get\n", + "alpha = 7;n = 0.154;\n", + "b = alpha*d2;\n", + "print \"design of impervious floor:\";\n", + "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n", + "print \"length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope =\\\n", + " 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\";\n", + "d1 = 1.5;\n", + "b = 16.;\n", + "alpha_ = d1/b;\n", + "\t\t\t\t#hence\n", + "fic1 = 100-28;\n", + "fid1 = 100-19;\n", + "t = 0.5;\n", + "fic1 = fic1+(fid1-fic1)*t/d1;\n", + "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n", + "d2 = 2.;\n", + "b = 16;\n", + "alpha_ = d2/b;\n", + "\t\t\t\t#hence\n", + "t = 0.6;\n", + "fie2 = 31.;\n", + "fid2 = 22;\n", + "fie2 = fie2-(fie2-fid2)*t/d2;\n", + "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n", + "t = 10.6;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "p = round(p*100)/100;\n", + "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n", + "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n", + "rho = 2.24;\n", + "t = p*2.6/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness under the crest = 1 m.\";\n", + "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n", + "t = 9.5;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 2 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 4 m length\"%(t);\n", + "t = 4.5;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n", + "t = 2;\n", + "p = fie2+(fic1-fie2)*t/b;\n", + "t = p*2.7/(100*(rho-1));\n", + "t = round(t*100)/100;\n", + "print \"thickness of floor at 8.5 m from toe of glais = %.2f m.provide 0.7 m thick floor for next 2 m length\"%(t);\n", + "\n", + "\t\t\t\t#design of upstream protection\n", + "d = hw/3+0.6;\n", + "d = round(d*10)/10;\n", + "print \"design of u/s protection:u/s scour depth = %.2f m.provide same protection as in cross regulator\"%(d);\n", + "\n", + "\t\t\t\t#design of d/s protection\n", + "d2 = hw_dis/2+0.6;\n", + "v = d2;\n", + "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n", + "print \"keep thickness of concrete block = 0.5 m.provide 2 rows of \\\n", + "0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\";\n", + "cu = 2.25*d2;\n", + "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick \\\n", + "launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\"%(cu);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "DESIGN OF CROSS-REGULATOR::\n", + "design of crest and waterway:\n", + "crest level = 215.60 m.\n", + "length of crest = 26.40 m.\n", + "provide 3 piers of 1.5 m width each.total width of cross regulator = 32.50 m.\n", + "design of d/s floor:\n", + "d/s floor level = 216.01 m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\n", + "cistern length = 4.75 m.length of d/s floor = 10.00 m.\n", + "design of impervious floor:\n", + "total length of impervious floor = 16 m.;which is divided as-\n", + "d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\n", + "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n", + "downstream cut-off:pressure = 28.30 percent.\n", + "toe of glacis:pressure = 59.20 percent.\n", + "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n", + "thickness of floor near d/s cut-off = 0.62 m.provide 0.7 m thick floor for last 2.1 m length.\n", + "thickness of floor at toe of glacis = 1.29 m.\n", + "thickness of floor at 4 m from toe of glais = 1.04 m.provide 1.1 m thick floor for next 2 m length\n", + "thickness of floor at 6 m from toe of glais = 0.91 m.provide 0.9 m thick floor for next 2.5 m length\n", + "design of u/s protection:volume of block protection = 1.43 cubic metre/metre.\n", + "keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\n", + "cubic content of launching apron = 3.23 cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\n", + "design of d/s protection:volume of inverted filter = 1.85 cubic metre/metre.\n", + "keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick concret blocks over 0.6 m graded filter for length of 1.6 m.\n", + "launching apron volume = 4.16 cubic metre/metre.provide 1 m thick launching apron for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\n", + "DESIGN OF DISTRIBUTORY HEAD REGULATOR::\n", + "design of crest and waterway:\n", + "crest level = 216.10 m.\n", + "length of crest = 2.89 m.\n", + "provide 2 bays of 3.5 m each with a 1 m thick pier in between.\n", + "total width of cross regulator = 8.00 m.\n", + "design of d/s floor:\n", + "d/s floor level = 215.52 m.;keepR.L of d/s floor = 215.50 m.\n", + "cistern length = 10.65 m.\n", + "design of impervious floor:\n", + "total length of impervious floor = 14 m.;which is divided as-\n", + "length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope = 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\n", + "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n", + "downstream cut-off:pressure = 28.30 percent.\n", + "toe of glacis:pressure = 59.24 percent.\n", + "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n", + "thickness under the crest = 1 m.\n", + "thickness of floor at toe of glacis = 1.24 m.\n", + "thickness of floor at 2 m from toe of glais = 1.22 m.provide 1.1 m thick floor for next 4 m length\n", + "thickness of floor at 6 m from toe of glais = 0.90 m.provide 0.9 m thick floor for next 2.5 m length\n", + "thickness of floor at 8.5 m from toe of glais = 0.74 m.provide 0.7 m thick floor for next 2 m length\n", + "design of u/s protection:u/s scour depth = 1.40 m.provide same protection as in cross regulator\n", + "design of d/s protection:volume of inverted filter = 1.35 cubic metre/metre.\n", + "keep thickness of concrete block = 0.5 m.provide 2 rows of 0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\n", + "launching apron volume = 3.04 cubic metre/metre.provide 1 m thick launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19.ipynb new file mode 100755 index 00000000..32d7ab84 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19.ipynb @@ -0,0 +1,392 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6fd287c1935869ab0dbf969e29246715100ab63b1d219a58fec4220f2b19494d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 : CROSS DRAINAGE WORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 pg : 857" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros\n", + "\n", + "#design an expansion transition for canal by Mitra's method\n", + "\t\t\t\t\n", + "#Given\n", + "Lf = 16.; \t\t\t\t#length of flume\n", + "Bf = 9.; \t\t\t\t#width of throat\n", + "Bo = 15.; \t\t\t\t#width of canal\n", + "\n", + "#width at any dismath.tance x from flumed section is given by\n", + "#Bx = Bo*Bf*Lf/(Lf*Bo-(Bo-Bf)x)\n", + "#on solving we get\n", + "#Bx = 2160/(240-6x)\n", + "\n", + "x = linspace(2,16,8) \t\t\t\t#dismath.tance\n", + "print \"width at any dismath.tance x from flumed section:\";\n", + "Bx = zeros(8)\n", + "for i in range(8):\n", + " Bx[i] = 2160./(240-6*x[i]);\n", + " Bx[i] = round(Bx[i]*100)/100;\n", + " print '%.2f'%(Bx[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width at any dismath.tance x from flumed section:\n", + "9.47\n", + "10.00\n", + "10.59\n", + "11.25\n", + "12.00\n", + "12.86\n", + "13.85\n", + "15.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 pg : 857" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros\n", + "\n", + "#design an expansion transition for canal by Chaturvedi's method\n", + "\t\t\t\t\n", + "#Given;\n", + "Lf = 16.; \t\t\t\t#length of flume\n", + "Bf = 9.; \t\t\t\t#width of throat\n", + "Bo = 15.; \t\t\t\t#width of canal\n", + "\n", + "x = linspace(2,16,8); \t\t\t\t#dismath.tance\n", + "\n", + "#dismath.tance x is related as x = Lf*Bo**(2/3)(1-(Bf/Bx)**1.5)/(Bo**1.5-Bf**1.5)\n", + "#on solving we get\n", + "#(Bf/Bx)**1.5 = 1-(x/29.893) (relation is misprinted in book)\n", + "#let (Bf/Bx)**1.5 = r\n", + "r = zeros(8)\n", + "R = zeros(8)\n", + "Bx = zeros(8)\n", + "\n", + "print \"width at any dismath.tance x from flumed section:\";\n", + "for i in range(8):\n", + " r[i] = 1-(x[i]/29.893); \t\t\t\t#Bf/Bx**(1.5)\n", + " R[i] = r[i]**(2./3); \t\t\t\t#Bf/Bx\n", + " Bx[i] = Bf/R[i]; \n", + " Bx[i] = round(Bx[i]*100)/100; \n", + " print \"%.2f.\"%(Bx[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width at any dismath.tance x from flumed section:\n", + "9.43.\n", + "9.90.\n", + "10.45.\n", + "11.08.\n", + "11.81.\n", + "12.67.\n", + "13.71.\n", + "15.00.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3 pg : 860" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros,zeros_like\n", + "\n", + "#design a syphon aqueduct\n", + "\n", + "#Given\n", + "Q = 25.; \t\t\t\t#design discharge of canal\n", + "B = 20.; \t\t\t\t#bed width of canal\n", + "D = 1.5; \t\t\t\t#depth of water in canal\n", + "bl = 160.; \t\t\t\t#bed level of canal\n", + "hfq = 400.; \t\t\t\t#high flood discharge of drainage\n", + "hfl = 160.5; \t\t\t\t#high flood level of drainage\n", + "bl_drain = 158.; \t\t\t\t#bed level of drainage\n", + "gl = 160.; \t\t\t\t#general ground level\n", + "\n", + "#demath.sing of drainage water-way\n", + "P = 4.75*(hfq)**0.5; \t\t\t\t#laecey P-Q formula\n", + "print \"design of drainage water-way:wetted perimeter of river = %i m.provide 13 spans \\\n", + "of 6 m each,separated by 12 piers each of 1.25 m thick.\"%(P);\n", + "t = 78.+15;\n", + "print \"total length of water-way = %i m.\"%(t);\n", + "v = 2; \t\t\t\t#velocity through syphon\n", + "hb = hfq/(78*v);\n", + "ac = hfq/(6*2.5*1.3); \t\t\t\t#calculation is wrong in book\n", + "hb = round(hb*100)/100;\n", + "ac = round(ac*100)/100;\n", + "print \"height of barrels = %.2f m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual \\\n", + "velocity through barrels = %.2f m/sec.\"%(hb,ac);\n", + "\n", + "#design of canal waterway\n", + "print \"design of canal waterway:Type 3 aqueduct is adopted.\";\n", + "l1 = B-10;\n", + "l2 = (20-10)*3/2;\n", + "print \"providing a splay 2:1 in expansion,length of contraction transition = %i m.providing\\\n", + " a splay of 3:1 in expansion,length of expansion transition = %i m.\"%(l1,l2);\n", + "print 'In transition side slopes are warped from original slope of 1.5:1 to vertical.';\n", + "\n", + "#design of levels of different sectionn\n", + "print \"design of levels of different sectionn:at section 4-4:\";\n", + "A = (B+1.5*D); \t\t\t\t#area\n", + "V = Q/A; \t\t\t\t#velocity of flow\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "ws = gl+D; \t\t\t\t#R.L of water surface\n", + "tel = ws+vh;\n", + "tel = round(tel*1000)/1000;\n", + "print \"R.L of T.E.L = %.2f m. at section 3-3:\"%(tel);\n", + "A = 10*D; \t\t\t\t#area of trough\n", + "V = Q/A; \t\t\t\t#velocity\n", + "vh1 = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "le = 0.3*(vh1-vh); \t\t\t\t#loss of head in expansion from section 3-3 to 4-4\n", + "tel = tel+le;\n", + "rlw = tel-vh1;\n", + "rlb = rlw-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"elevation of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#at section 2-2\n", + "R = A/P;\n", + "N = 0.016;\n", + "S = V**2*N**2/R**(4./3); \t\t\t\t#from manning's formula\n", + "L = 93; \t\t\t\t#length of trough\n", + "hl = L*S; \t\t\t\t#head loss\n", + "tel = tel+hl;\n", + "rlw = tel-vh1;\n", + "rlb = rlw-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"at section 2-2:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#at section 1-1\n", + "hl = 0.2*(vh1-vh); \t\t\t\t#loss of hed in contraction transition\n", + "tel = tel+hl;\n", + "rlw = tel-vh;\n", + "rlb = tel-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"at section 1-1:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#design of contraction transition\n", + "#it is designed on the basis of chaturvedi's formula\n", + "Bo = 20.;\n", + "Bf = 10.;\n", + "L = 10.;\n", + "#from chaturvedi formula we get relation between x and Bx as: x = 15.45(1-(10/Bx)**1.5);\n", + "Bx = linspace(10,20,11)\n", + "print \"design of contraction transition on the basis of chaturvedi formula:\\nBx x\";\n", + "x = zeros_like(Bx)\n", + "for i in range(11):\n", + " x[i] = 15.45*(1-(10/Bx[i])**1.5);\n", + " x[i] = round(x[i]*100)/100;\n", + " print \"%i %.2f\"%(Bx[i],x[i]);\n", + "\n", + "\n", + "#design of expansion transition on the basis of chaturvedi formula\n", + "L = 15.;\n", + "Bf = 10.;Bo = 20.;\n", + "#from chaturvedi formula we get relation between x and Bx as: x = 23.15(1-(10/Bx)**1.5);\n", + "print \"design of expansion transition on the basis of chaturvedi formula:\\nBx x\";\n", + "for i in range(11):\n", + " x[i] = 23.15*(1-(10/Bx[i])**1.5);\n", + " x[i] = round(x[i]*100)/100;\n", + " print \"%i %.2f\"%(Bx[i],x[i]);\n", + "\n", + "\n", + "#design of trough\n", + "print \"design of the trough:\";\n", + "print \"flumed water way of canal = 10 m.trough carrying canal will divide into two \\\n", + "compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be \\\n", + " = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls\\\n", + " ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\";\n", + "\n", + "#head loss through syphon barrels\n", + "V = 2.05; \t\t\t\t#velocity through barrels\n", + "f1 = 0.505; \t\t\t\t#coefficient of loss of head at entry\n", + "a = 0.00316;\n", + "b = 0.030;\n", + "R = (6*2.5)/(2*(6+2.5));\n", + "f2 = a*(1+b/R);\n", + "L = 11.1; \t\t\t\t#length of barrel\n", + "h = (1+f1+f2*L/R)*V**2/(2*9.81);\n", + "hfl_up = hfl+h;\n", + "h = round(h*1000)/1000;\n", + "hfl_up = round(hfl_up*1000)/1000;\n", + "print \"head loss through syphon barrels = %.2f m.upstream H.F.L = %.2f m.\"%(h,hfl_up)\n", + "\n", + "#uplift pressure on the roof\n", + "bt = gl-0.4; \t\t\t\t#R.L of bottom of the trough\n", + "hl = 0.505*V**2/(2*9.81);\n", + "u = hfl_up-hl-159.6;\n", + "up = u*9.81;\n", + "print \"uplift pressure on the roof = %.2f kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\"%(up);\n", + "print \"th ebalance of the uplift pressure has to be resisted by bending action of \\\n", + "trough slab.so,reinforcement has to be provided at the top of the slab.\";\n", + "\n", + "#uplift on the floor of the barrel and its design\n", + "#(a) static head\n", + "print \"uplift on the floor of the barrel and its design:a static head:\";\n", + "bf = bt-2.5; \t\t\t\t#R.L of barrel floor\n", + "t = 0.8; \t\t\t\t#tentative thickness of floor\n", + "bot = bf-t;\n", + "static = bl_drain-bot;\n", + "static = round(static*100)/100;\n", + "print \"static uplift on the floor = %.2f m.\"%(static);\n", + "\n", + "#(b) seepage head\n", + "L = 10.; \t\t\t\t#length of u/s transition\n", + "bs = 3.; \t\t\t\t#half the barrel span\n", + "df = 11.; \t\t\t\t#end drainage floor\n", + "tcl = 24.; \t\t\t\t#total creep length\n", + "tsh = 161.5-bl_drain; \t\t\t\t#total seepage head\n", + "rs = tsh*(1-13/tcl); \t\t\t\t#residual seepage at B\n", + "tu = (static+rs)*9.81;\n", + "tu = round(tu*100)/100;\n", + "print \"b) seepage head:total uplift = %.2f kN/square m.provide thickness of floor 0.8 m\"%(tu);\n", + "bending = tu-17.58;\n", + "bending = round(bending*100)/100;\n", + "print \"uplift to be resisted by bending action of floor = %.2f kN/square m.\"%(bending);\n", + "\n", + "#design of cut-off and protection works for drainage floor\n", + "print \"design of cut-off and protection works for drainage floor:\";\n", + "Q = 400;f = 1;\n", + "R = 0.47*(Q/f)**(1/3);\n", + "d_up = 1.5*R; \t\t\t\t#depth of u/s cut-off\n", + "bot_up = hfl_up-d_up; \t\t\t\t#R.L of bottom of u/s cut-off\n", + "d_down = 1.5*R; \t\t\t\t#depth of d/s cut-off\n", + "bot_down = hfl-d_down; \t\t\t\t#R.L of bottom of d/s cut-off\n", + "l_down = 2.5*(bl_drain-bot_down);\n", + "l_down1 = 2*(bl_drain-bot_up);\n", + "bot_up = round(bot_up*100)/100;\n", + "bot_down = round(bot_down*100)/100;\n", + "l_down = round(l_down);\n", + "l_down1 = round(l_down1);\n", + "print \"R.L of bottom of u/s cut-off = %.2f m.R.L of bottom of d/s cut-off = %.2f m.\"%(bot_up,bot_down);\n", + "print \"length of d/s protection consisting of 40 cm brick pritching = %.2f m.pitching is \\\n", + "supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting\\\n", + " of 0.4 cm brick pritching = %.2f m.pitching is supported by toe wall 0.4 m wide and\\\n", + " 1 m deep at its u/s end.\"%(l_down,l_down1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "design of drainage water-way:wetted perimeter of river = 95 m.provide 13 spans of 6 m each,separated by 12 piers each of 1.25 m thick.\n", + "total length of water-way = 93 m.\n", + "height of barrels = 2.56 m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual velocity through barrels = 20.51 m/sec.\n", + "design of canal waterway:Type 3 aqueduct is adopted.\n", + "providing a splay 2:1 in expansion,length of contraction transition = 10 m.providing a splay of 3:1 in expansion,length of expansion transition = 15 m.\n", + "In transition side slopes are warped from original slope of 1.5:1 to vertical.\n", + "design of levels of different sectionn:at section 4-4:\n", + "R.L of T.E.L = 161.56 m. at section 3-3:\n", + "elevation of T.E.L = 161.59 m.R.L of bed to maintain consmath.tant water depth = 159.95 m.\n", + "at section 2-2:R.L of T.E.L = 162.36 m.R.L of bed to maintain consmath.tant water depth = 160.72 m.\n", + "at section 1-1:R.L of T.E.L = 162.38 m.R.L of bed to maintain consmath.tant water depth = 160.88 m.\n", + "design of contraction transition on the basis of chaturvedi formula:\n", + "Bx x\n", + "10 0.00\n", + "11 2.06\n", + "12 3.70\n", + "13 5.03\n", + "14 6.12\n", + "15 7.04\n", + "16 7.82\n", + "17 8.48\n", + "18 9.05\n", + "19 9.55\n", + "20 9.99\n", + "design of expansion transition on the basis of chaturvedi formula:\n", + "Bx x\n", + "10 0.00\n", + "11 3.08\n", + "12 5.54\n", + "13 7.53\n", + "14 9.17\n", + "15 10.55\n", + "16 11.71\n", + "17 12.71\n", + "18 13.56\n", + "19 14.31\n", + "20 14.97\n", + "design of the trough:\n", + "flumed water way of canal = 10 m.trough carrying canal will divide into two compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\n", + "head loss through syphon barrels = 0.33 m.upstream H.F.L = 160.83 m.\n", + "uplift pressure on the roof = 11.01 kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\n", + "th ebalance of the uplift pressure has to be resisted by bending action of trough slab.so,reinforcement has to be provided at the top of the slab.\n", + "uplift on the floor of the barrel and its design:a static head:\n", + "static uplift on the floor = 1.70 m.\n", + "b) seepage head:total uplift = 32.41 kN/square m.provide thickness of floor 0.8 m\n", + "uplift to be resisted by bending action of floor = 14.83 kN/square m.\n", + "design of cut-off and protection works for drainage floor:\n", + "R.L of bottom of u/s cut-off = 160.13 m.R.L of bottom of d/s cut-off = 159.79 m.\n", + "length of d/s protection consisting of 40 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting of 0.4 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1 m deep at its u/s end.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..32d7ab84 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_1.ipynb @@ -0,0 +1,392 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6fd287c1935869ab0dbf969e29246715100ab63b1d219a58fec4220f2b19494d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19 : CROSS DRAINAGE WORKS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1 pg : 857" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros\n", + "\n", + "#design an expansion transition for canal by Mitra's method\n", + "\t\t\t\t\n", + "#Given\n", + "Lf = 16.; \t\t\t\t#length of flume\n", + "Bf = 9.; \t\t\t\t#width of throat\n", + "Bo = 15.; \t\t\t\t#width of canal\n", + "\n", + "#width at any dismath.tance x from flumed section is given by\n", + "#Bx = Bo*Bf*Lf/(Lf*Bo-(Bo-Bf)x)\n", + "#on solving we get\n", + "#Bx = 2160/(240-6x)\n", + "\n", + "x = linspace(2,16,8) \t\t\t\t#dismath.tance\n", + "print \"width at any dismath.tance x from flumed section:\";\n", + "Bx = zeros(8)\n", + "for i in range(8):\n", + " Bx[i] = 2160./(240-6*x[i]);\n", + " Bx[i] = round(Bx[i]*100)/100;\n", + " print '%.2f'%(Bx[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width at any dismath.tance x from flumed section:\n", + "9.47\n", + "10.00\n", + "10.59\n", + "11.25\n", + "12.00\n", + "12.86\n", + "13.85\n", + "15.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2 pg : 857" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros\n", + "\n", + "#design an expansion transition for canal by Chaturvedi's method\n", + "\t\t\t\t\n", + "#Given;\n", + "Lf = 16.; \t\t\t\t#length of flume\n", + "Bf = 9.; \t\t\t\t#width of throat\n", + "Bo = 15.; \t\t\t\t#width of canal\n", + "\n", + "x = linspace(2,16,8); \t\t\t\t#dismath.tance\n", + "\n", + "#dismath.tance x is related as x = Lf*Bo**(2/3)(1-(Bf/Bx)**1.5)/(Bo**1.5-Bf**1.5)\n", + "#on solving we get\n", + "#(Bf/Bx)**1.5 = 1-(x/29.893) (relation is misprinted in book)\n", + "#let (Bf/Bx)**1.5 = r\n", + "r = zeros(8)\n", + "R = zeros(8)\n", + "Bx = zeros(8)\n", + "\n", + "print \"width at any dismath.tance x from flumed section:\";\n", + "for i in range(8):\n", + " r[i] = 1-(x[i]/29.893); \t\t\t\t#Bf/Bx**(1.5)\n", + " R[i] = r[i]**(2./3); \t\t\t\t#Bf/Bx\n", + " Bx[i] = Bf/R[i]; \n", + " Bx[i] = round(Bx[i]*100)/100; \n", + " print \"%.2f.\"%(Bx[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width at any dismath.tance x from flumed section:\n", + "9.43.\n", + "9.90.\n", + "10.45.\n", + "11.08.\n", + "11.81.\n", + "12.67.\n", + "13.71.\n", + "15.00.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3 pg : 860" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros,zeros_like\n", + "\n", + "#design a syphon aqueduct\n", + "\n", + "#Given\n", + "Q = 25.; \t\t\t\t#design discharge of canal\n", + "B = 20.; \t\t\t\t#bed width of canal\n", + "D = 1.5; \t\t\t\t#depth of water in canal\n", + "bl = 160.; \t\t\t\t#bed level of canal\n", + "hfq = 400.; \t\t\t\t#high flood discharge of drainage\n", + "hfl = 160.5; \t\t\t\t#high flood level of drainage\n", + "bl_drain = 158.; \t\t\t\t#bed level of drainage\n", + "gl = 160.; \t\t\t\t#general ground level\n", + "\n", + "#demath.sing of drainage water-way\n", + "P = 4.75*(hfq)**0.5; \t\t\t\t#laecey P-Q formula\n", + "print \"design of drainage water-way:wetted perimeter of river = %i m.provide 13 spans \\\n", + "of 6 m each,separated by 12 piers each of 1.25 m thick.\"%(P);\n", + "t = 78.+15;\n", + "print \"total length of water-way = %i m.\"%(t);\n", + "v = 2; \t\t\t\t#velocity through syphon\n", + "hb = hfq/(78*v);\n", + "ac = hfq/(6*2.5*1.3); \t\t\t\t#calculation is wrong in book\n", + "hb = round(hb*100)/100;\n", + "ac = round(ac*100)/100;\n", + "print \"height of barrels = %.2f m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual \\\n", + "velocity through barrels = %.2f m/sec.\"%(hb,ac);\n", + "\n", + "#design of canal waterway\n", + "print \"design of canal waterway:Type 3 aqueduct is adopted.\";\n", + "l1 = B-10;\n", + "l2 = (20-10)*3/2;\n", + "print \"providing a splay 2:1 in expansion,length of contraction transition = %i m.providing\\\n", + " a splay of 3:1 in expansion,length of expansion transition = %i m.\"%(l1,l2);\n", + "print 'In transition side slopes are warped from original slope of 1.5:1 to vertical.';\n", + "\n", + "#design of levels of different sectionn\n", + "print \"design of levels of different sectionn:at section 4-4:\";\n", + "A = (B+1.5*D); \t\t\t\t#area\n", + "V = Q/A; \t\t\t\t#velocity of flow\n", + "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "ws = gl+D; \t\t\t\t#R.L of water surface\n", + "tel = ws+vh;\n", + "tel = round(tel*1000)/1000;\n", + "print \"R.L of T.E.L = %.2f m. at section 3-3:\"%(tel);\n", + "A = 10*D; \t\t\t\t#area of trough\n", + "V = Q/A; \t\t\t\t#velocity\n", + "vh1 = V**2/(2*9.81); \t\t\t\t#velocity head\n", + "le = 0.3*(vh1-vh); \t\t\t\t#loss of head in expansion from section 3-3 to 4-4\n", + "tel = tel+le;\n", + "rlw = tel-vh1;\n", + "rlb = rlw-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"elevation of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#at section 2-2\n", + "R = A/P;\n", + "N = 0.016;\n", + "S = V**2*N**2/R**(4./3); \t\t\t\t#from manning's formula\n", + "L = 93; \t\t\t\t#length of trough\n", + "hl = L*S; \t\t\t\t#head loss\n", + "tel = tel+hl;\n", + "rlw = tel-vh1;\n", + "rlb = rlw-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"at section 2-2:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#at section 1-1\n", + "hl = 0.2*(vh1-vh); \t\t\t\t#loss of hed in contraction transition\n", + "tel = tel+hl;\n", + "rlw = tel-vh;\n", + "rlb = tel-D;\n", + "tel = round(tel*1000)/1000;\n", + "rlb = round(rlb*1000)/1000;\n", + "print \"at section 1-1:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n", + "\n", + "#design of contraction transition\n", + "#it is designed on the basis of chaturvedi's formula\n", + "Bo = 20.;\n", + "Bf = 10.;\n", + "L = 10.;\n", + "#from chaturvedi formula we get relation between x and Bx as: x = 15.45(1-(10/Bx)**1.5);\n", + "Bx = linspace(10,20,11)\n", + "print \"design of contraction transition on the basis of chaturvedi formula:\\nBx x\";\n", + "x = zeros_like(Bx)\n", + "for i in range(11):\n", + " x[i] = 15.45*(1-(10/Bx[i])**1.5);\n", + " x[i] = round(x[i]*100)/100;\n", + " print \"%i %.2f\"%(Bx[i],x[i]);\n", + "\n", + "\n", + "#design of expansion transition on the basis of chaturvedi formula\n", + "L = 15.;\n", + "Bf = 10.;Bo = 20.;\n", + "#from chaturvedi formula we get relation between x and Bx as: x = 23.15(1-(10/Bx)**1.5);\n", + "print \"design of expansion transition on the basis of chaturvedi formula:\\nBx x\";\n", + "for i in range(11):\n", + " x[i] = 23.15*(1-(10/Bx[i])**1.5);\n", + " x[i] = round(x[i]*100)/100;\n", + " print \"%i %.2f\"%(Bx[i],x[i]);\n", + "\n", + "\n", + "#design of trough\n", + "print \"design of the trough:\";\n", + "print \"flumed water way of canal = 10 m.trough carrying canal will divide into two \\\n", + "compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be \\\n", + " = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls\\\n", + " ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\";\n", + "\n", + "#head loss through syphon barrels\n", + "V = 2.05; \t\t\t\t#velocity through barrels\n", + "f1 = 0.505; \t\t\t\t#coefficient of loss of head at entry\n", + "a = 0.00316;\n", + "b = 0.030;\n", + "R = (6*2.5)/(2*(6+2.5));\n", + "f2 = a*(1+b/R);\n", + "L = 11.1; \t\t\t\t#length of barrel\n", + "h = (1+f1+f2*L/R)*V**2/(2*9.81);\n", + "hfl_up = hfl+h;\n", + "h = round(h*1000)/1000;\n", + "hfl_up = round(hfl_up*1000)/1000;\n", + "print \"head loss through syphon barrels = %.2f m.upstream H.F.L = %.2f m.\"%(h,hfl_up)\n", + "\n", + "#uplift pressure on the roof\n", + "bt = gl-0.4; \t\t\t\t#R.L of bottom of the trough\n", + "hl = 0.505*V**2/(2*9.81);\n", + "u = hfl_up-hl-159.6;\n", + "up = u*9.81;\n", + "print \"uplift pressure on the roof = %.2f kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\"%(up);\n", + "print \"th ebalance of the uplift pressure has to be resisted by bending action of \\\n", + "trough slab.so,reinforcement has to be provided at the top of the slab.\";\n", + "\n", + "#uplift on the floor of the barrel and its design\n", + "#(a) static head\n", + "print \"uplift on the floor of the barrel and its design:a static head:\";\n", + "bf = bt-2.5; \t\t\t\t#R.L of barrel floor\n", + "t = 0.8; \t\t\t\t#tentative thickness of floor\n", + "bot = bf-t;\n", + "static = bl_drain-bot;\n", + "static = round(static*100)/100;\n", + "print \"static uplift on the floor = %.2f m.\"%(static);\n", + "\n", + "#(b) seepage head\n", + "L = 10.; \t\t\t\t#length of u/s transition\n", + "bs = 3.; \t\t\t\t#half the barrel span\n", + "df = 11.; \t\t\t\t#end drainage floor\n", + "tcl = 24.; \t\t\t\t#total creep length\n", + "tsh = 161.5-bl_drain; \t\t\t\t#total seepage head\n", + "rs = tsh*(1-13/tcl); \t\t\t\t#residual seepage at B\n", + "tu = (static+rs)*9.81;\n", + "tu = round(tu*100)/100;\n", + "print \"b) seepage head:total uplift = %.2f kN/square m.provide thickness of floor 0.8 m\"%(tu);\n", + "bending = tu-17.58;\n", + "bending = round(bending*100)/100;\n", + "print \"uplift to be resisted by bending action of floor = %.2f kN/square m.\"%(bending);\n", + "\n", + "#design of cut-off and protection works for drainage floor\n", + "print \"design of cut-off and protection works for drainage floor:\";\n", + "Q = 400;f = 1;\n", + "R = 0.47*(Q/f)**(1/3);\n", + "d_up = 1.5*R; \t\t\t\t#depth of u/s cut-off\n", + "bot_up = hfl_up-d_up; \t\t\t\t#R.L of bottom of u/s cut-off\n", + "d_down = 1.5*R; \t\t\t\t#depth of d/s cut-off\n", + "bot_down = hfl-d_down; \t\t\t\t#R.L of bottom of d/s cut-off\n", + "l_down = 2.5*(bl_drain-bot_down);\n", + "l_down1 = 2*(bl_drain-bot_up);\n", + "bot_up = round(bot_up*100)/100;\n", + "bot_down = round(bot_down*100)/100;\n", + "l_down = round(l_down);\n", + "l_down1 = round(l_down1);\n", + "print \"R.L of bottom of u/s cut-off = %.2f m.R.L of bottom of d/s cut-off = %.2f m.\"%(bot_up,bot_down);\n", + "print \"length of d/s protection consisting of 40 cm brick pritching = %.2f m.pitching is \\\n", + "supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting\\\n", + " of 0.4 cm brick pritching = %.2f m.pitching is supported by toe wall 0.4 m wide and\\\n", + " 1 m deep at its u/s end.\"%(l_down,l_down1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "design of drainage water-way:wetted perimeter of river = 95 m.provide 13 spans of 6 m each,separated by 12 piers each of 1.25 m thick.\n", + "total length of water-way = 93 m.\n", + "height of barrels = 2.56 m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual velocity through barrels = 20.51 m/sec.\n", + "design of canal waterway:Type 3 aqueduct is adopted.\n", + "providing a splay 2:1 in expansion,length of contraction transition = 10 m.providing a splay of 3:1 in expansion,length of expansion transition = 15 m.\n", + "In transition side slopes are warped from original slope of 1.5:1 to vertical.\n", + "design of levels of different sectionn:at section 4-4:\n", + "R.L of T.E.L = 161.56 m. at section 3-3:\n", + "elevation of T.E.L = 161.59 m.R.L of bed to maintain consmath.tant water depth = 159.95 m.\n", + "at section 2-2:R.L of T.E.L = 162.36 m.R.L of bed to maintain consmath.tant water depth = 160.72 m.\n", + "at section 1-1:R.L of T.E.L = 162.38 m.R.L of bed to maintain consmath.tant water depth = 160.88 m.\n", + "design of contraction transition on the basis of chaturvedi formula:\n", + "Bx x\n", + "10 0.00\n", + "11 2.06\n", + "12 3.70\n", + "13 5.03\n", + "14 6.12\n", + "15 7.04\n", + "16 7.82\n", + "17 8.48\n", + "18 9.05\n", + "19 9.55\n", + "20 9.99\n", + "design of expansion transition on the basis of chaturvedi formula:\n", + "Bx x\n", + "10 0.00\n", + "11 3.08\n", + "12 5.54\n", + "13 7.53\n", + "14 9.17\n", + "15 10.55\n", + "16 11.71\n", + "17 12.71\n", + "18 13.56\n", + "19 14.31\n", + "20 14.97\n", + "design of the trough:\n", + "flumed water way of canal = 10 m.trough carrying canal will divide into two compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\n", + "head loss through syphon barrels = 0.33 m.upstream H.F.L = 160.83 m.\n", + "uplift pressure on the roof = 11.01 kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\n", + "th ebalance of the uplift pressure has to be resisted by bending action of trough slab.so,reinforcement has to be provided at the top of the slab.\n", + "uplift on the floor of the barrel and its design:a static head:\n", + "static uplift on the floor = 1.70 m.\n", + "b) seepage head:total uplift = 32.41 kN/square m.provide thickness of floor 0.8 m\n", + "uplift to be resisted by bending action of floor = 14.83 kN/square m.\n", + "design of cut-off and protection works for drainage floor:\n", + "R.L of bottom of u/s cut-off = 160.13 m.R.L of bottom of d/s cut-off = 159.79 m.\n", + "length of d/s protection consisting of 40 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting of 0.4 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1 m deep at its u/s end.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2.ipynb new file mode 100755 index 00000000..9eb5c1ee --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2.ipynb @@ -0,0 +1,428 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3545b25396a8ddd5a6290547da9d278c18ef204a72b66bd3a11c0eea3ce41199" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : METHODS OF IRRIGATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "t = (60*2.303*y*math.log10(Q/(Q-I*A)))/I\n", + "\n", + "# Results\n", + "print \"Time required to cover given area = %.f minutes.\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to cover given area = 56 minutes.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "Amax = Q/I;\n", + "\n", + "# Results\n", + "print \"Maximum area that can be irrigated = %.2f hectare.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum area that can be irrigated = 0.22 hectare.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 pg : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "#time of water application\n", + "#optimum length of each border strip\n", + "#dischrge for each border strip\n", + "\n", + "#Given\n", + "d = 0.05;\t\t\t\t\t\t\t\t#depth of root zone\n", + "I = 1.25E-5;\t\t\t\t\t\t\t\t#average infiltration rate\n", + "s = 0.0035\t\t\t\t\t\t\t\t#slope of border strip\n", + "t = d/(I*3600);\n", + "\n", + "# Calculations and Results\n", + "t = round(t*1000)/1000;\n", + "print \"Time of water application = %.2f hours.\"%(t);\n", + "\n", + "#Part (a)\n", + "q = 2E-3;\t\t\t\t\t\t\t\t#discharge entering water source\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "L = round(10*L)/10;\n", + "print \"Part a:\";\n", + "print \"Optimum length of each border strip = %.2f m.\"%(L);\n", + "\n", + "#Part (b)\n", + "Lgiven = 150\t\t\t\t\t\t\t\t#given value of length\n", + "#First Trial\n", + "q = 3E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "#second trial\n", + "q = 3.15E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "q = 9*Lgiven*q*1000/L;\n", + "q = round(q*10)/10;\n", + "print \"Part b:\";\n", + "print \"Discharge for each border strip = %.2f lps.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time of water application = 1.11 hours.\n", + "Part a:\n", + "Optimum length of each border strip = 101.90 m.\n", + "Part b:\n", + "Discharge for each border strip = 28.20 lps.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 pg : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "\n", + "#deep percolation loss\n", + "#water application efficiency and time of irrigation.\n", + "\n", + "#Given\n", + "B = 12.;\t\t\t\t#breadth of bamath.sin\n", + "L = 36.\t\t\t\t#length of bamath.sin\n", + "d = 70.\t\t\t\t#depth of irrigation\n", + "Ic = 70.\t\t\t\t#cumulative infiltration\n", + "kdash = 9;\n", + "ndash = 0.42;\n", + "#Part (a) \n", + "a = 5;\n", + "b = 0.6;\n", + "q = 1.5;\t\t\t\t#stream size\n", + "\n", + "# Calculations and Results\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "print \"Part a:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n", + "#part (b)\n", + "a = 8;\n", + "b = 0.6;\n", + "q = 3;\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "\n", + "print \"Part b:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a:\n", + "Deep percolation loss = 7.47 percent.\n", + "Water application efficiency = 92.53 percent.\n", + "Time of irrigation = 30.30 minutes.\n", + "Part b:\n", + "Deep percolation loss = 3.66 percent.\n", + "Water application efficiency = 96.34 percent.\n", + "Time of irrigation = 14.50 minutes.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 pg : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\n", + "#given\n", + "d = 37.5\t\t\t\t#crop water requirement\n", + "W = 1.\t\t\t\t#furrow spacing\n", + "L = 120.\t\t\t\t#length of furrow\n", + "n = -0.49;\n", + "k = 38.;\n", + "Ttotal = 143.;\t\t\t\t#Total time of irrigation\n", + "A = [0 ,23, 52 ,88, 127]\t\t\t\t#given values of time of advance\n", + "B = zeros(5)\n", + "C = zeros(5)\n", + "D = zeros(5)\n", + "E = zeros(5)\n", + "\n", + "# Calculations\n", + "for i in range(5):\t\t\t\t#loop to find respective values of time of ponding\n", + " B[i] = 143-A[i] \n", + "\n", + "for j in range(5):\t\t\t\t#loop to find respective furrow infiltration\n", + " C[j] = B[j]**(n)*k;\n", + "\n", + "for K in range(4):\t\t\t\t#loop to find respective average infiltration\n", + " D[K] = (C[K]+C[K+1])/2;\n", + "\n", + "\n", + "E[0] = D[0];\n", + "for l in range(1,4):\t\t\t\t#loop to determine cumulative infiltration\n", + " E[l] = D[l]+E[l-1];\n", + "\n", + "I = E[3];\n", + "\n", + "T = (30*d*W*(n+1)/k)**(1/(n+1));\n", + "dav = ((24.5*Ttotal)+(I*(T-Ttotal)))/L;\n", + "q = ((120*37.5)-(24.5*143))/62;\n", + "T = round(T);\n", + "dav = round(dav*10)/10;\n", + "q = round(q*100)/100;\n", + "I = round(I*100)/100;\n", + "\n", + "# Results\n", + "print \"Maximum size of cut-back stream = %.2f lpm.\"%(I);\n", + "print \"Minimum size of cut-back stream = %.2f lpm.\"%(q);\n", + "print \"Time required for putting 37.5mm depth of water = %.2f minutes.\"%(T);\n", + "print \"Average depth of water required = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum size of cut-back stream = 19.69 lpm.\n", + "Minimum size of cut-back stream = 16.07 lpm.\n", + "Time required for putting 37.5mm depth of water = 205.00 minutes.\n", + "Average depth of water required = 39.40 mm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 pg : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "L = 100.;\t\t\t\t#length of furrow\n", + "W = 1.;\t\t\t\t#furrow spacing\n", + "s = 0.3\t\t\t\t#longitudnal slope of furrow\n", + "t1 = 80.\t\t\t\t#initial time flow of stream\n", + "t2 = 35.\t\t\t\t#final time flow of stream\n", + "\n", + "# Calculations\n", + "qm = 0.6/s;\n", + "q = qm*0.4;\n", + "dav = ((q*t2*60)+(2*t1*60))/100;\n", + "\n", + "# Results\n", + "print \"Average depth of water applied = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average depth of water applied = 112.80 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 pg : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0072;\t\t\t\t#discharge through well\n", + "y = 0.1;\t\t\t\t#average depth of flow\n", + "I = 0.05\t\t\t\t#infiltration capacity of soil\n", + "A = 0.04\t\t\t\t#area of land\n", + "\n", + "# Calculations\n", + "t = (2.303*y*60/I)*math.log10(Q/(Q-I*A));\n", + "Amax = Q/I;\n", + "t = round(t*100)/100;\n", + "\n", + "# Results\n", + "print \"Time required to irrigate = %.2f minutes.\"%(t);\n", + "print \"Maximum area that can be irrigated = %.2f ha.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to irrigate = 39.06 minutes.\n", + "Maximum area that can be irrigated = 0.14 ha.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20.ipynb new file mode 100755 index 00000000..72e1d5c9 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9fa9b8923853c5929c3c0b3b718ed4db74e8cca06a82acc75a09e2384344b2e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20 : RIVER ENGINEERING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1 pg : 888" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a guide bank required for a bridge in a river\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 50000.; \t\t\t\t#discharge\n", + "f = 1.1; \t\t\t\t#silt factor\n", + "bl = 130.; \t\t\t\t#bed level of river\n", + "hfl = 140.; \t\t\t\t#high flood level\n", + "\n", + "# Calculations and Results\n", + "L = 4.75*(Q)**0.5;\n", + "L = L+212; \t\t\t\t#providing 20 percent more length\n", + "L_up = 5*L/4; \t\t\t\t#upstream length of guide bund\n", + "L_down = L/4; \t\t\t\t#downstream length of guide bund\n", + "r_up = 0.45*L; \t\t\t\t#radius of upstream curved head\n", + "print \"upstream length of guide bund = %i m.\"%(L_up);\n", + "print \"downstream length of guide bund = %i m.\"%(L_down);\n", + "print \"upstream radius of curved head = %i m.;it can be carved at 145 degrees.\"%(r_up);\n", + "print \"downstream radius of curved head = 287m.;it can be carved at 60 degrees.\";\n", + "\n", + "fb = 1.5; \t\t\t\t#free board\n", + "ltop = fb+hfl; \t\t\t\t#level of top of guide bund\n", + "print \"level of top of guide bund = %.2f m.\"%(ltop);\n", + "print \"adopt top level = 142 m.\";\n", + "ltop = 142;\n", + "Hr = ltop-bl;\n", + "print \"keep top width = 4 m. and side slope as 2:1.\";\n", + "T = 0.06*(Q)**(1./3); \t\t\t\t#thickness of stone pitching\n", + "T = round(T*100)/100;\n", + "print \"Thickness of stone pitching = %.2f m.\"%(T);\n", + "R = 0.47*(Q/f)**(1./3); \t\t\t\t#depth of scour\n", + "Rmax = 1.25*R; \t\t\t\t#maximum scour\n", + "rl = hfl-Rmax; \t\t\t\t#R.L at maximum anticipated cover\n", + "D = bl-rl; \t\t\t\t#depth of maximum scour\n", + "Lapron = 1.5*D;\n", + "R = round(R*100)/100;\n", + "Lapron = round(Lapron*100)/100;\n", + "print \"depth of scour = %.2f m.\"%(R);\n", + "print \"for straigtht reach of guide band:\";\n", + "print \"length of apron = %.2f m.\"%(Lapron);\n", + "Rmax = 1.5*R;\n", + "rl = hfl-Rmax;\n", + "D1 = bl-rl;\n", + "Lapron = 1.5*D1;\n", + "R = round(R*100)/100;\n", + "print \"for curvilinear transition portion of guide band:\";\n", + "print \"length of apron = %.2f m.\"%(Lapron);\n", + "T1 = 1.9*T;\n", + "T1 = round(T1*10)/10;\n", + "print \"thickness of apron = %.2f m.\"%(T1);\n", + "print \"volume of stones:\";\n", + "ss = 5**0.5*(141-130)*T;\n", + "as1 = 5**0.5*D*1.25*T;\n", + "ss = round(ss*100)/100;\n", + "as1 = round(as1*100)/100;\n", + "print \"at shank:\";\n", + "print \"on slope = %.2f cubic metre/m.\"%(ss);\n", + "print \"on apron with a slope 2:1 = %.2f cubic metre/m.\"%(as1);\n", + "\n", + "va = 5**0.5*D1*1.25*T;\n", + "vs = ss;\n", + "vs = round(vs*100)/100;\n", + "va = round(va*100)/100;\n", + "print \"U/S andD/S curved portion:\";\n", + "print \"on slope = %.2f cubic metre/m.\"%(vs);\n", + "print \"on apron = %.2f cubic metre/m.\"%(va);\n", + "\n", + "ta = va/(1.5*D1);\n", + "ta = round(ta*10)/10;\n", + "print \"thickness of launching apron = %.2f m.\"%(ta);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "upstream length of guide bund = 1592 m.\n", + "downstream length of guide bund = 318 m.\n", + "upstream radius of curved head = 573 m.;it can be carved at 145 degrees.\n", + "downstream radius of curved head = 287m.;it can be carved at 60 degrees.\n", + "level of top of guide bund = 141.50 m.\n", + "adopt top level = 142 m.\n", + "keep top width = 4 m. and side slope as 2:1.\n", + "Thickness of stone pitching = 2.21 m.\n", + "depth of scour = 16.77 m.\n", + "for straigtht reach of guide band:\n", + "length of apron = 16.45 m.\n", + "for curvilinear transition portion of guide band:\n", + "length of apron = 22.73 m.\n", + "thickness of apron = 4.20 m.\n", + "volume of stones:\n", + "at shank:\n", + "on slope = 54.36 cubic metre/m.\n", + "on apron with a slope 2:1 = 67.74 cubic metre/m.\n", + "U/S andD/S curved portion:\n", + "on slope = 54.36 cubic metre/m.\n", + "on apron = 93.61 cubic metre/m.\n", + "thickness of launching apron = 4.10 m.\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..72e1d5c9 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_1.ipynb @@ -0,0 +1,142 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9fa9b8923853c5929c3c0b3b718ed4db74e8cca06a82acc75a09e2384344b2e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 20 : RIVER ENGINEERING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20.1 pg : 888" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#design a guide bank required for a bridge in a river\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 50000.; \t\t\t\t#discharge\n", + "f = 1.1; \t\t\t\t#silt factor\n", + "bl = 130.; \t\t\t\t#bed level of river\n", + "hfl = 140.; \t\t\t\t#high flood level\n", + "\n", + "# Calculations and Results\n", + "L = 4.75*(Q)**0.5;\n", + "L = L+212; \t\t\t\t#providing 20 percent more length\n", + "L_up = 5*L/4; \t\t\t\t#upstream length of guide bund\n", + "L_down = L/4; \t\t\t\t#downstream length of guide bund\n", + "r_up = 0.45*L; \t\t\t\t#radius of upstream curved head\n", + "print \"upstream length of guide bund = %i m.\"%(L_up);\n", + "print \"downstream length of guide bund = %i m.\"%(L_down);\n", + "print \"upstream radius of curved head = %i m.;it can be carved at 145 degrees.\"%(r_up);\n", + "print \"downstream radius of curved head = 287m.;it can be carved at 60 degrees.\";\n", + "\n", + "fb = 1.5; \t\t\t\t#free board\n", + "ltop = fb+hfl; \t\t\t\t#level of top of guide bund\n", + "print \"level of top of guide bund = %.2f m.\"%(ltop);\n", + "print \"adopt top level = 142 m.\";\n", + "ltop = 142;\n", + "Hr = ltop-bl;\n", + "print \"keep top width = 4 m. and side slope as 2:1.\";\n", + "T = 0.06*(Q)**(1./3); \t\t\t\t#thickness of stone pitching\n", + "T = round(T*100)/100;\n", + "print \"Thickness of stone pitching = %.2f m.\"%(T);\n", + "R = 0.47*(Q/f)**(1./3); \t\t\t\t#depth of scour\n", + "Rmax = 1.25*R; \t\t\t\t#maximum scour\n", + "rl = hfl-Rmax; \t\t\t\t#R.L at maximum anticipated cover\n", + "D = bl-rl; \t\t\t\t#depth of maximum scour\n", + "Lapron = 1.5*D;\n", + "R = round(R*100)/100;\n", + "Lapron = round(Lapron*100)/100;\n", + "print \"depth of scour = %.2f m.\"%(R);\n", + "print \"for straigtht reach of guide band:\";\n", + "print \"length of apron = %.2f m.\"%(Lapron);\n", + "Rmax = 1.5*R;\n", + "rl = hfl-Rmax;\n", + "D1 = bl-rl;\n", + "Lapron = 1.5*D1;\n", + "R = round(R*100)/100;\n", + "print \"for curvilinear transition portion of guide band:\";\n", + "print \"length of apron = %.2f m.\"%(Lapron);\n", + "T1 = 1.9*T;\n", + "T1 = round(T1*10)/10;\n", + "print \"thickness of apron = %.2f m.\"%(T1);\n", + "print \"volume of stones:\";\n", + "ss = 5**0.5*(141-130)*T;\n", + "as1 = 5**0.5*D*1.25*T;\n", + "ss = round(ss*100)/100;\n", + "as1 = round(as1*100)/100;\n", + "print \"at shank:\";\n", + "print \"on slope = %.2f cubic metre/m.\"%(ss);\n", + "print \"on apron with a slope 2:1 = %.2f cubic metre/m.\"%(as1);\n", + "\n", + "va = 5**0.5*D1*1.25*T;\n", + "vs = ss;\n", + "vs = round(vs*100)/100;\n", + "va = round(va*100)/100;\n", + "print \"U/S andD/S curved portion:\";\n", + "print \"on slope = %.2f cubic metre/m.\"%(vs);\n", + "print \"on apron = %.2f cubic metre/m.\"%(va);\n", + "\n", + "ta = va/(1.5*D1);\n", + "ta = round(ta*10)/10;\n", + "print \"thickness of launching apron = %.2f m.\"%(ta);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "upstream length of guide bund = 1592 m.\n", + "downstream length of guide bund = 318 m.\n", + "upstream radius of curved head = 573 m.;it can be carved at 145 degrees.\n", + "downstream radius of curved head = 287m.;it can be carved at 60 degrees.\n", + "level of top of guide bund = 141.50 m.\n", + "adopt top level = 142 m.\n", + "keep top width = 4 m. and side slope as 2:1.\n", + "Thickness of stone pitching = 2.21 m.\n", + "depth of scour = 16.77 m.\n", + "for straigtht reach of guide band:\n", + "length of apron = 16.45 m.\n", + "for curvilinear transition portion of guide band:\n", + "length of apron = 22.73 m.\n", + "thickness of apron = 4.20 m.\n", + "volume of stones:\n", + "at shank:\n", + "on slope = 54.36 cubic metre/m.\n", + "on apron with a slope 2:1 = 67.74 cubic metre/m.\n", + "U/S andD/S curved portion:\n", + "on slope = 54.36 cubic metre/m.\n", + "on apron = 93.61 cubic metre/m.\n", + "thickness of launching apron = 4.10 m.\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21.ipynb new file mode 100755 index 00000000..a51714d4 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cfc0d5f8100e77d08cba72409c2d6158116c0c87f0c1bc2797c7cdf67223be53" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 : WATER POWER ENGINEERING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1 pg : 906" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#total installed capacity\n", + "#load factor\n", + "#plant factor\n", + "#utilization factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 10000.; \t\t\t\t#capacity of each generator;\n", + "n = 3.; \t\t\t\t#number of generator\n", + "l1 = 12000.; \t\t\t\t#initial load on plant\n", + "l2 = 26000.; \t\t\t\t#final load on plant\n", + "\n", + "\n", + "# Calculations and Results\n", + "tc = n*c;\n", + "print \"Total installed capacity = %i kW.\"%(tc);\n", + "\n", + "avg = (l1+l2)/2; \t\t\t\t#average load\n", + "pk = l2; \t\t\t\t#peak load\n", + "lf = avg*100/pk;\n", + "lf = round(lf*10)/10;\n", + "print \"load factor = %.2f percent.\"%(lf);\n", + "\n", + "\t\t\t\t#take any time duration t hours\n", + "pf = avg*100/tc;\n", + "pf = round(pf*10)/10;\n", + "print \"plant factor = %.2f percent.\"%(pf);\n", + "\n", + "uf = pk*100/tc;\n", + "uf = round(uf*10)/10;\n", + "print \"utilization ratio = %.2f percent.\"%(uf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total installed capacity = 30000 kW.\n", + "load factor = 73.10 percent.\n", + "plant factor = 63.30 percent.\n", + "utilization ratio = 86.70 percent.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.2 pg : 906" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#pondage to be provided\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t# minimum flow in river\n", + "H = 30.; \t\t\t\t#net head\n", + "lf = 0.73; \t\t\t\t#load factor\n", + "eita = 0.6; \t\t\t\t#plant efficiency\n", + "\n", + "# Calculations and Results\n", + "P = 9.81*Q*H*eita;\n", + "pk = P/lf;\n", + "pk = round(pk*10)/10;\n", + "print \"maximum generation capacity of generator = %.2f kW.\"%(pk);\n", + "\n", + "pp = pk-P; \t\t\t\t#power develop from pondage\n", + "Q = pp/(9.81*H*eita);\n", + "pr = Q*4*3600/10000;\n", + "pr = round(pr*10)/10;\n", + "print \"Pondage required = %.2fD+4 cubic metre.\"%(pr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum generation capacity of generator = 9675.60 kW.\n", + "Pondage required = 21.30D+4 cubic metre.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3 pg : 907" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#maximum load factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 15000.; \t\t\t\t#installed capacity of plant\n", + "lf = 0.3; \t\t\t\t#load factor\n", + "eita = 0.82; \t\t\t\t#plant efficiency\n", + "H = 25; \t\t\t\t#working head\n", + "\n", + "# Calculations and Results\n", + "avg = c*lf; \t\t\t\t#average power developed\n", + "Q = avg/(9.81*H*eita);\n", + "Q = round(Q*100)/100;\n", + "print \"minimum discharge required in the stream = %.2f cumecs.\"%(Q);\n", + "\n", + "Q = 32; \t\t\t\t#for second case\n", + "P = 9.81*H*Q*eita;\n", + "lf = P*100/c;\n", + "lf = round(lf*10)/10;\n", + "print \"maximum load factor = %.2f percent.\"%(lf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum discharge required in the stream = 22.38 cumecs.\n", + "maximum load factor = 42.90 percent.\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..a51714d4 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_1.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cfc0d5f8100e77d08cba72409c2d6158116c0c87f0c1bc2797c7cdf67223be53" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 21 : WATER POWER ENGINEERING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.1 pg : 906" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#total installed capacity\n", + "#load factor\n", + "#plant factor\n", + "#utilization factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 10000.; \t\t\t\t#capacity of each generator;\n", + "n = 3.; \t\t\t\t#number of generator\n", + "l1 = 12000.; \t\t\t\t#initial load on plant\n", + "l2 = 26000.; \t\t\t\t#final load on plant\n", + "\n", + "\n", + "# Calculations and Results\n", + "tc = n*c;\n", + "print \"Total installed capacity = %i kW.\"%(tc);\n", + "\n", + "avg = (l1+l2)/2; \t\t\t\t#average load\n", + "pk = l2; \t\t\t\t#peak load\n", + "lf = avg*100/pk;\n", + "lf = round(lf*10)/10;\n", + "print \"load factor = %.2f percent.\"%(lf);\n", + "\n", + "\t\t\t\t#take any time duration t hours\n", + "pf = avg*100/tc;\n", + "pf = round(pf*10)/10;\n", + "print \"plant factor = %.2f percent.\"%(pf);\n", + "\n", + "uf = pk*100/tc;\n", + "uf = round(uf*10)/10;\n", + "print \"utilization ratio = %.2f percent.\"%(uf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total installed capacity = 30000 kW.\n", + "load factor = 73.10 percent.\n", + "plant factor = 63.30 percent.\n", + "utilization ratio = 86.70 percent.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.2 pg : 906" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#pondage to be provided\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 40.; \t\t\t\t# minimum flow in river\n", + "H = 30.; \t\t\t\t#net head\n", + "lf = 0.73; \t\t\t\t#load factor\n", + "eita = 0.6; \t\t\t\t#plant efficiency\n", + "\n", + "# Calculations and Results\n", + "P = 9.81*Q*H*eita;\n", + "pk = P/lf;\n", + "pk = round(pk*10)/10;\n", + "print \"maximum generation capacity of generator = %.2f kW.\"%(pk);\n", + "\n", + "pp = pk-P; \t\t\t\t#power develop from pondage\n", + "Q = pp/(9.81*H*eita);\n", + "pr = Q*4*3600/10000;\n", + "pr = round(pr*10)/10;\n", + "print \"Pondage required = %.2fD+4 cubic metre.\"%(pr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum generation capacity of generator = 9675.60 kW.\n", + "Pondage required = 21.30D+4 cubic metre.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21.3 pg : 907" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#maximum load factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 15000.; \t\t\t\t#installed capacity of plant\n", + "lf = 0.3; \t\t\t\t#load factor\n", + "eita = 0.82; \t\t\t\t#plant efficiency\n", + "H = 25; \t\t\t\t#working head\n", + "\n", + "# Calculations and Results\n", + "avg = c*lf; \t\t\t\t#average power developed\n", + "Q = avg/(9.81*H*eita);\n", + "Q = round(Q*100)/100;\n", + "print \"minimum discharge required in the stream = %.2f cumecs.\"%(Q);\n", + "\n", + "Q = 32; \t\t\t\t#for second case\n", + "P = 9.81*H*Q*eita;\n", + "lf = P*100/c;\n", + "lf = round(lf*10)/10;\n", + "print \"maximum load factor = %.2f percent.\"%(lf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum discharge required in the stream = 22.38 cumecs.\n", + "maximum load factor = 42.90 percent.\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9eb5c1ee --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_1.ipynb @@ -0,0 +1,428 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3545b25396a8ddd5a6290547da9d278c18ef204a72b66bd3a11c0eea3ce41199" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : METHODS OF IRRIGATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "t = (60*2.303*y*math.log10(Q/(Q-I*A)))/I\n", + "\n", + "# Results\n", + "print \"Time required to cover given area = %.f minutes.\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to cover given area = 56 minutes.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "Amax = Q/I;\n", + "\n", + "# Results\n", + "print \"Maximum area that can be irrigated = %.2f hectare.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum area that can be irrigated = 0.22 hectare.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 pg : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "#time of water application\n", + "#optimum length of each border strip\n", + "#dischrge for each border strip\n", + "\n", + "#Given\n", + "d = 0.05;\t\t\t\t\t\t\t\t#depth of root zone\n", + "I = 1.25E-5;\t\t\t\t\t\t\t\t#average infiltration rate\n", + "s = 0.0035\t\t\t\t\t\t\t\t#slope of border strip\n", + "t = d/(I*3600);\n", + "\n", + "# Calculations and Results\n", + "t = round(t*1000)/1000;\n", + "print \"Time of water application = %.2f hours.\"%(t);\n", + "\n", + "#Part (a)\n", + "q = 2E-3;\t\t\t\t\t\t\t\t#discharge entering water source\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "L = round(10*L)/10;\n", + "print \"Part a:\";\n", + "print \"Optimum length of each border strip = %.2f m.\"%(L);\n", + "\n", + "#Part (b)\n", + "Lgiven = 150\t\t\t\t\t\t\t\t#given value of length\n", + "#First Trial\n", + "q = 3E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "#second trial\n", + "q = 3.15E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "q = 9*Lgiven*q*1000/L;\n", + "q = round(q*10)/10;\n", + "print \"Part b:\";\n", + "print \"Discharge for each border strip = %.2f lps.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time of water application = 1.11 hours.\n", + "Part a:\n", + "Optimum length of each border strip = 101.90 m.\n", + "Part b:\n", + "Discharge for each border strip = 28.20 lps.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 pg : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "\n", + "#deep percolation loss\n", + "#water application efficiency and time of irrigation.\n", + "\n", + "#Given\n", + "B = 12.;\t\t\t\t#breadth of bamath.sin\n", + "L = 36.\t\t\t\t#length of bamath.sin\n", + "d = 70.\t\t\t\t#depth of irrigation\n", + "Ic = 70.\t\t\t\t#cumulative infiltration\n", + "kdash = 9;\n", + "ndash = 0.42;\n", + "#Part (a) \n", + "a = 5;\n", + "b = 0.6;\n", + "q = 1.5;\t\t\t\t#stream size\n", + "\n", + "# Calculations and Results\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "print \"Part a:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n", + "#part (b)\n", + "a = 8;\n", + "b = 0.6;\n", + "q = 3;\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "\n", + "print \"Part b:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a:\n", + "Deep percolation loss = 7.47 percent.\n", + "Water application efficiency = 92.53 percent.\n", + "Time of irrigation = 30.30 minutes.\n", + "Part b:\n", + "Deep percolation loss = 3.66 percent.\n", + "Water application efficiency = 96.34 percent.\n", + "Time of irrigation = 14.50 minutes.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 pg : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\n", + "#given\n", + "d = 37.5\t\t\t\t#crop water requirement\n", + "W = 1.\t\t\t\t#furrow spacing\n", + "L = 120.\t\t\t\t#length of furrow\n", + "n = -0.49;\n", + "k = 38.;\n", + "Ttotal = 143.;\t\t\t\t#Total time of irrigation\n", + "A = [0 ,23, 52 ,88, 127]\t\t\t\t#given values of time of advance\n", + "B = zeros(5)\n", + "C = zeros(5)\n", + "D = zeros(5)\n", + "E = zeros(5)\n", + "\n", + "# Calculations\n", + "for i in range(5):\t\t\t\t#loop to find respective values of time of ponding\n", + " B[i] = 143-A[i] \n", + "\n", + "for j in range(5):\t\t\t\t#loop to find respective furrow infiltration\n", + " C[j] = B[j]**(n)*k;\n", + "\n", + "for K in range(4):\t\t\t\t#loop to find respective average infiltration\n", + " D[K] = (C[K]+C[K+1])/2;\n", + "\n", + "\n", + "E[0] = D[0];\n", + "for l in range(1,4):\t\t\t\t#loop to determine cumulative infiltration\n", + " E[l] = D[l]+E[l-1];\n", + "\n", + "I = E[3];\n", + "\n", + "T = (30*d*W*(n+1)/k)**(1/(n+1));\n", + "dav = ((24.5*Ttotal)+(I*(T-Ttotal)))/L;\n", + "q = ((120*37.5)-(24.5*143))/62;\n", + "T = round(T);\n", + "dav = round(dav*10)/10;\n", + "q = round(q*100)/100;\n", + "I = round(I*100)/100;\n", + "\n", + "# Results\n", + "print \"Maximum size of cut-back stream = %.2f lpm.\"%(I);\n", + "print \"Minimum size of cut-back stream = %.2f lpm.\"%(q);\n", + "print \"Time required for putting 37.5mm depth of water = %.2f minutes.\"%(T);\n", + "print \"Average depth of water required = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum size of cut-back stream = 19.69 lpm.\n", + "Minimum size of cut-back stream = 16.07 lpm.\n", + "Time required for putting 37.5mm depth of water = 205.00 minutes.\n", + "Average depth of water required = 39.40 mm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 pg : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "L = 100.;\t\t\t\t#length of furrow\n", + "W = 1.;\t\t\t\t#furrow spacing\n", + "s = 0.3\t\t\t\t#longitudnal slope of furrow\n", + "t1 = 80.\t\t\t\t#initial time flow of stream\n", + "t2 = 35.\t\t\t\t#final time flow of stream\n", + "\n", + "# Calculations\n", + "qm = 0.6/s;\n", + "q = qm*0.4;\n", + "dav = ((q*t2*60)+(2*t1*60))/100;\n", + "\n", + "# Results\n", + "print \"Average depth of water applied = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average depth of water applied = 112.80 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 pg : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0072;\t\t\t\t#discharge through well\n", + "y = 0.1;\t\t\t\t#average depth of flow\n", + "I = 0.05\t\t\t\t#infiltration capacity of soil\n", + "A = 0.04\t\t\t\t#area of land\n", + "\n", + "# Calculations\n", + "t = (2.303*y*60/I)*math.log10(Q/(Q-I*A));\n", + "Amax = Q/I;\n", + "t = round(t*100)/100;\n", + "\n", + "# Results\n", + "print \"Time required to irrigate = %.2f minutes.\"%(t);\n", + "print \"Maximum area that can be irrigated = %.2f ha.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to irrigate = 39.06 minutes.\n", + "Maximum area that can be irrigated = 0.14 ha.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3.ipynb new file mode 100755 index 00000000..3e27009a --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3.ipynb @@ -0,0 +1,1440 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fb46725fd841b00338dce4327765570824d962464729228190009d6ed499fe86" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : WATER REQUIREMENTS OF CROPS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 pg : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "Na = 24.; \t\t\t\t#concentration of sodium ion\n", + "Ca = 3.6; \t\t\t\t#concentration of calcium ion\n", + "Mg = 2.; \t\t\t\t#concentration of magnesium ion\n", + "EC = 180.; \t\t\t\t#electrical conductivity\n", + "\n", + "# Calculations\n", + "SAR = Na/(((Ca+Mg)/2)**(0.5)); \t\t\t\t#Sodium absorption ratio\n", + "SAR = round(SAR*100)/100;\n", + "\n", + "# Results\n", + "print \"SAR = %.2f.\"%(SAR);\n", + "print \"Water falls under S2 class.\"; \t\t\t\t#from table 3.2\n", + "print \"For EC = 180\";\n", + "print \"water falls under C1 class.\"; \t\t\t\t#from table 3.1\n", + "print \"Water is medium sodium and low saline water.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SAR = 14.34.\n", + "Water falls under S2 class.\n", + "For EC = 180\n", + "water falls under C1 class.\n", + "Water is medium sodium and low saline water.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 pg : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "gammad = 15.; \t\t\t\t#dry weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Fc = 0.3; \t\t\t\t#field capacity\n", + "pwp = 0.08; \t\t\t\t#permanent wilting point\n", + "d = 0.8; \t\t\t\t#root zone depth\n", + "\n", + "# Calculations\n", + "d1 = gammad*Fc*1000/gammaw;\n", + "d2 = gammad*pwp*1000/gammaw;\n", + "d3 = gammad*d*(Fc-pwp)*1000/gammaw;\n", + "\n", + "# Results\n", + "print \"Depth of moisture in root zone at field capacity = %.f mm/m.\"%(d1);\n", + "print \"Depth of moisture in root zone at permanent wilting point = %.f mm/m.\"%(d2);\n", + "print \"Depth of moisture available in root zone = %.f mm/m.\"%(d3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of moisture in root zone at field capacity = 459 mm/m.\n", + "Depth of moisture in root zone at permanent wilting point = 122 mm/m.\n", + "Depth of moisture available in root zone = 269 mm/m.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 pg : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "gammad = 15.3; \t\t\t\t#dry weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Fc = 0.15; \t\t\t\t#field capacity\n", + "Mc = 0.08; \t\t\t\t#moisture content before irrigation\n", + "D = 60.; \t\t\t\t#Depth of water applied\n", + "\n", + "# Calculations\n", + "d = (gammaw*D)/(gammad*(Fc-Mc));\n", + "\n", + "# Results\n", + "print \"Depth upto which soil profile is wetted = %.f mm.\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth upto which soil profile is wetted = 550 mm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 pg :53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "Sg = 1.6; \t\t\t\t#Apparent specific gravity\n", + "Fc = 0.2; \t\t\t\t#Field capacity\n", + "M1 = 150.; \t\t\t\t#mass of sample soil\n", + "M2 = 136.; \t\t\t\t#mass of sample after drying\n", + "d = 0.9; \t\t\t\t#depth of soil to be irrigated\n", + "\n", + "# Calculations\n", + "Mc = (M1-M2)/M2;\n", + "D = Sg*d*1000*(Fc-Mc);\n", + "\n", + "# Results\n", + "print \"Depth of water required to irrigate the soil = %.f mm.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of water required to irrigate the soil = 140 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 pg : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "\n", + "#Given\n", + "d = 2.; \t\t\t\t#root zone depth\n", + "Wc = 0.05; \t\t\t\t#existing water content\n", + "gammad = 15; \t\t\t\t#dry density of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Vw = 500. \t\t\t\t#water applied to the soil\n", + "Wl = 0.1; \t\t\t\t#water loss\n", + "A = 1000.; \t\t\t\t#area of plot\n", + "\n", + "# Calculations\n", + "Vu = Vw*0.9; \t\t\t\t#volume of water used in soil \n", + "Wu = Vu*gammaw; \t\t\t\t#weigth of water used in soil\n", + "Ws = A*d*gammad; \t\t\t\t#total dry weigth of soil\n", + "Wa = Wu*100/Ws; \t\t\t\t#percent water added\n", + "Fc = Wc*100+Wa; \n", + "Fc = round(Fc*100)/100;\n", + "\n", + "# Results\n", + "print \"The Field Capacity of soil is = %.2f percent.\"%(Fc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Field Capacity of soil is = 19.72 percent.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 pg : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.22; \t\t\t\t#Field Capacity\n", + "wc = 0.1; \t\t\t\t#wilting coefficient\n", + "gammad = 15.; \t\t\t\t#dry unit weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit wiegth of water\n", + "d = 0.7; \t\t\t\t#root zone depth\n", + "w = 0.14; \t\t\t\t#falled moisture content\n", + "E = 0.75; \t\t\t\t#water application efficiency\n", + "\n", + "# Calculations\n", + "SC = gammad*d*(Fc-wc)*100/gammaw;\n", + "D = gammad*d*(Fc-w)*1000/gammaw;\n", + "FIR = D/E; \t\t\t\t#Field irrigation requirement\n", + "SC = round(SC*10)/10;\n", + "D = round(D);\n", + "FIR = round(FIR)+1;\n", + "\n", + "# Results\n", + "print \"Maximum storage capacity of soil = %.2f cm.\"%(SC);\n", + "print \"Water depth required to be applied = %.2f mm\"%(D);\n", + "print \"Field Irrigation Requirement = %.2f mm\"%(FIR);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum storage capacity of soil = 12.80 cm.\n", + "Water depth required to be applied = 86.00 mm\n", + "Field Irrigation Requirement = 115.00 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 pg : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.27; \t\t\t\t#Field capacity\n", + "pwp = 0.14; \t\t\t\t#permanent wilting point\n", + "gammad = 15.; \t\t\t\t#dry density of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "d = 0.75; \t\t\t\t#effective depth of root zone\n", + "Du = 11.; \t\t\t\t#daily consumptive use of water\n", + "\n", + "# Calculations\n", + "Am = Fc-pwp; \t\t\t\t#Available moisture\n", + "#let readily available moisture be 80 percent of available moisture\n", + "RAm = 0.8*Am;\n", + "Mo = Fc-RAm;\n", + "D = gammad*d*(Fc-Mo)*100/gammaw;\n", + "WF = D*10/Du;\n", + "\n", + "# Results\n", + "print \"Watering Frequency = %i days.\"%(WF);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Watering Frequency = 10 days.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 pg : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.22; \t\t\t\t#Field capacity\n", + "Sg = 1.56; \t\t\t\t#Apparent specific gravity\n", + "d = 0.6; \t\t\t\t#root zone depth\n", + "#irrigation is started when 70 percent of moisture is used\n", + "l = 250.; \t\t\t\t#length of field\n", + "b = 40.; \t\t\t\t#width of field\n", + "q = 20.; \t\t\t\t#Discharge\n", + "\n", + "# Calculations\n", + "m = (1-0.7)*Fc;\n", + "D = Sg*d*(Fc-m)*1000;\n", + "A = l*b;\n", + "t = A*D/(q*3600);\n", + "D = round(D);\n", + "t = round(t);\n", + "\n", + "# Results\n", + "print \"Net depth of irrigation water required = %.2f mm.\"%(D);\n", + "print \"Time required to irrigate field = %.2f hours.\"%(t);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net depth of irrigation water required = 144.00 mm.\n", + "Time required to irrigate field = 20.00 hours.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 pg : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "B = 110.; \t\t\t\t#Base period\n", + "D = 1400.; \t\t\t\t#Duty of water\n", + "\n", + "# Calculations\n", + "delta = 8.64*B*100/D;\n", + "delta = round(delta);\n", + "\n", + "# Results\n", + "print \"Delta for crop is = %.2f cm.\"%(delta);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delta for crop is = 68.00 cm.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 pg : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "B = 120.; \t\t\t\t#Base period\n", + "delta = 92.; \t\t\t\t#total depth requirement of crop\n", + "\n", + "# Calculations\n", + "D = 8.64*B*100/delta;\n", + "\n", + "# Results\n", + "print \"Duty of water = %.2f hectares/cumec.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water = 1126.96 hectares/cumec.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 pg : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Cr = 2.; \t\t\t\t#crop ratio\n", + "A = 80000.; \t\t\t\t#Area of field\n", + "CI = 85.; \t\t\t\t#percent field culturable irrigable\n", + "IK = 30.; \t\t\t\t#irrigation intensity during kharif season\n", + "IR = 60.; \t\t\t\t#irrigation intensity for rabi season\n", + "DuK = 800.; \t\t\t\t#Duty of water for kharif season\n", + "DuR = 1700.; \t\t\t\t#Duty of water for rabi season\n", + "\n", + "# Calculations\n", + "CIA = A*CI/100; \t\t\t\t#Culturable irrigable area\n", + "AK = CIA*IK/100; \t\t\t\t#Area under kharif season\n", + "AR = CIA*IR/100; \t\t\t\t#Area under rabi season\n", + "DK = AK/DuK;\n", + "DR = AR/DuR;\n", + "\n", + "\n", + "# Results\n", + "print \"Dischage required at head of canal during Kharif season = %.2f cumecs.\"%(DK);\n", + "print \"Dischage required at head of canal during Rabi season = %.2f cumecs.\"%(DR);\n", + "print \"Water requirement during kharif is greater than during rabi season\";\n", + "print \"Hence,canal should be designed to carry discharge of %.2f cumecs.\"%(DK);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dischage required at head of canal during Kharif season = 25.50 cumecs.\n", + "Dischage required at head of canal during Rabi season = 24.00 cumecs.\n", + "Water requirement during kharif is greater than during rabi season\n", + "Hence,canal should be designed to carry discharge of 25.50 cumecs.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 pg : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "CA = 2600.; \t\t\t\t#culturable area\n", + "IS = 20.; \t\t\t\t#irrigation intensity for sugarcane\n", + "IR = 40.; \t\t\t\t#irrigation intensity for rice\n", + "DuS = 750.; \t\t\t\t#Duty of water for sugarcane\n", + "DuR = 1800.; \t\t\t\t#Duty of water for rice\n", + "PK = 1.2; \t\t\t\t#Peak demand\n", + "\n", + "# Calculations\n", + "AS = CA*IS/100; \t\t\t\t#Area under sugarcane \n", + "AR = CA*IR/100; \t\t\t\t#Area under rice\n", + "DS = AS/DuS;\n", + "DR = AR/DuR;\n", + "DT = DS+DR;\n", + "DD = PK*DT-0.005333+0.01;\n", + "DR = round(DR*1000)/1000;\n", + "DT = round(DT*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Water required for Rice = %.2f cumecs.\"%(DR);\n", + "print \" Sugarcane is a perennial crop.\";\n", + "print \"Hence,Water required for Sugarcane = %.2f cumecs.\"%(DT);\n", + "print \"Design dischage to meet the peak demand = %.2f cumecs.\"%(DD);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Water required for Rice = 0.58 cumecs.\n", + " Sugarcane is a perennial crop.\n", + "Hence,Water required for Sugarcane = 1.27 cumecs.\n", + "Design dischage to meet the peak demand = 1.53 cumecs.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 pg : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "ql = 20.; \t\t\t\t#discharge in left branch\n", + "Al = 20000.; \t\t\t\t#culturable area in left branch\n", + "Bl = 120.; \t\t\t\t#Base period in left branch\n", + "Il = 0.8; \t\t\t\t#intensity of rabi in left branch\n", + "qr = 8.; \t\t\t\t#discharge in rigth branch\n", + "Ar = 12000.; \t\t\t\t#culturable area in rigth branch\n", + "Br = 120.; \t\t\t\t#Base period in rigth branch\n", + "Ir = 0.5; \t\t\t\t#intensity of rabi in rigth branch\n", + "\n", + "# Calculations and Results\n", + "#for left canal\n", + "ARl = Al*Il;\n", + "Dl = ARl/ql;\n", + "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dl);\n", + "\n", + "#for rigth canal\n", + "ARr = Ar*Ir;\n", + "Dr = ARr/qr;\n", + "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dr);\n", + "print \"Since,left canal has higher duty,it is more efficient\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty for left canal is = 800 hectares/cumecs.\n", + "Duty for left canal is = 750 hectares/cumecs.\n", + "Since,left canal has higher duty,it is more efficient\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 pg : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "CA = 1200.; \t\t\t\t#culturable area\n", + "IA = 0.4; \t\t\t\t#intensity of irrigation of crop A\n", + "IB = 0.35; \t\t\t\t#intensity of irrigation of crop B\n", + "bA = 20.; \t\t\t\t#kor period of crop A\n", + "bB = 15.; \t\t\t\t#kor period of crop B\n", + "deltaA = 0.1; \t\t\t\t#kor depth of crop A\n", + "deltaB = 0.16; \t\t\t\t#kor depth of crop B\n", + "\n", + "# Calculations and Results\n", + "#crop A\n", + "A = CA*IA;\n", + "Du = 8.64*bA/deltaA;\n", + "qA = A/Du;\n", + "qA = round(qA*1000)/1000;\n", + "print \"Discharge required for crop A = %.2f cumec.\"%(qA);\n", + "\n", + "#crop B\n", + "A = CA*IB;\n", + "Du = 8.64*bB/deltaB;\n", + "qB = A/Du;\n", + "qB = round(qB*1000)/1000;\n", + "print \"Discharge required for crop B = %.2f cumec.\"%(qB);\n", + "D = qA+qB;\n", + "D = round(D*10)/10;\n", + "print \"Design discharge of water course = %.2f cumec.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge required for crop A = 0.28 cumec.\n", + "Discharge required for crop B = 0.52 cumec.\n", + "Design discharge of water course = 0.80 cumec.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 pg : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "#Given\n", + "B = 12.; \t\t\t\t#transplantaion period\n", + "D = 0.5; \t\t\t\t#total depth of water required by the crop\n", + "R = 0.1; \t\t\t\t#rain falling on field\n", + "L = 0.2; \t\t\t\t#loss of water\n", + "A = 600.; \t\t\t\t#irrigated area\n", + "I = 0.6; \t\t\t\t#intensity of irrigation\n", + "delta = D-R;\n", + "Dui = 8.64*B/delta;\n", + "\n", + "# Calculations and Results\n", + "#math.since water loss is 20 percent\n", + "Du = (1-L)*Dui;\n", + "print \"Duty of water required = %.2f hectares/cumec.\"%(Du);\n", + "\n", + "TA = I*A;\n", + "q = TA/Du;\n", + "q = round(q*100)/100;\n", + "print \"Discharge at head of water course = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water required = 207.36 hectares/cumec.\n", + "Discharge at head of water course = 1.74 cumecs.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 pg : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "CF = 0.8; \t\t\t\t#Capacity factory\n", + "Tf = 13./20; \t\t\t\t#time factor\n", + "A = [850., 120., 600., 500., 360.]; \t\t\t\t\n", + "#Given values of area\n", + "B = [320., 90., 120., 120., 120.]; \t\t\t\t\n", + "#Given values of Base period\n", + "D = [580., 580., 1600. ,2000., 600.]; \t\t\t\t\n", + "#Given values of duty at head canal\n", + "\n", + "# Calculations and Results\n", + "DS = A[0]/D[0]; \t\t\t\t#discharge for sugarcane \n", + "DOS = A[1]/D[1]; \t\t\t\t#discharge for overlap sugarcane\n", + "DW = A[2]/D[2]; \t\t\t\t#discharge for wheat\n", + "DB = A[3]/D[3]; \t\t\t\t#discharge for bajri\n", + "DV = A[4]/D[4]; \t\t\t\t#discharge for vegetables\n", + "DR = DS+DW;\n", + "DM = DS+DB;\n", + "DH = DS+DOS+DV;\n", + "print \"Maximum demand is in hot weather\";\n", + "q = DH/Tf;\n", + "D = q/CF;\n", + "q = round(1000*q)/1000;\n", + "D = round(100*D)/100;\n", + "print \"Full supply discharge at head = %.2f cumecs\"%(q);\n", + "print \"Design discharge = %.2f cumecs.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum demand is in hot weather\n", + "Full supply discharge at head = 3.50 cumecs\n", + "Design discharge = 4.37 cumecs.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 pg : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#Given\n", + "CL = 0.2; \t\t\t\t#Canal loss\n", + "RL = 0.12; \t\t\t\t#Reservior loss\n", + "A = [4800., 5600., 2400., 3200., 1400]; \t\t\t\t\n", + "#Given values of area under crop\n", + "D = [1800., 800., 1400., 900., 700]; \t\t\t\t\n", + "#Given values of duty at field\n", + "B = [120., 360., 200., 120., 120]; \t\t\t\t\n", + "#Given values of base period\n", + "\n", + "# Calculations and Results\n", + "#(a) Wheat\n", + "d = A[0]/D[0];\n", + "V1 = d*B[0];\n", + "#(b) Sugarcane\n", + "d = A[1]/D[1];\n", + "V2 = d*B[1];\n", + "#(c) Cotton\n", + "d = A[2]/D[2];\n", + "V3 = round(d*B[2]);\n", + "#(d) Rice\n", + "d = A[3]/D[3];\n", + "V4 = round(d*B[3]);\n", + "#(e) vegetables\n", + "d = A[4]/D[4];\n", + "V5 = d*B[4];\n", + "\n", + "Vd = (V1+V2+V3+V4+V5)*8.64;\n", + "SC = Vd/((1-CL)*(1-RL));\n", + "print \"Reservior capacity = %.2f hectare-metres.\"%(SC);\n", + "\n", + "#Alternative method\n", + "delta = zeros(5)\n", + "for i in range(5):\n", + " delta[i] = 8.64*B[i]/D[i];\n", + "V = zeros(5)\n", + "for j in range(5):\n", + " V[j] = A[j]*delta[j];\n", + "\n", + "s = 0;\n", + "for k in range(5):\n", + " s = s+V[k];\n", + "\n", + "SC = s/((1-CL)*(1-RL));\n", + "\n", + "print \" By Alternative method.Storage capacity = %.f hectare-metres.\"%(SC);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reservior capacity = 47250.00 hectare-metres.\n", + " By Alternative method.Storage capacity = 47244 hectare-metres.\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 pg : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "eita = 0.7; \t\t\t\t#water application efficiency\n", + "k = 0.75; \t\t\t\t#crop factor\n", + "T = [19., 16., 12.,.5, 13.]; \t\t\t\t\n", + "#Given values of temperature\n", + "p = [7.19 ,7.15, 7.30, 7.03]; \t\t\t\t#daytime hours of the year\n", + "RD = 1.2; \t\t\t\t#rainfall in december\n", + "RJ = 0.8; \t\t\t\t#rainfall in january\n", + "\n", + "f = zeros(4)\n", + "for i in range(4):\n", + " f[i] = p[i]*(1.8*T[i]+32)/40;\n", + "\n", + "s = 0;\n", + "for i in range(4): \n", + " s = s+f[i];\n", + "\n", + "C = k*s;\n", + "R = RD+RJ;\n", + "CIR = C-R;\n", + "FIR = CIR/eita;\n", + "C = round(10*C)/10;\n", + "CIR = round(CIR*10)/10;\n", + "FIR = round(FIR*10)/10;\n", + "\n", + "# Results\n", + "print \"Consumptive use = %.2f cm.\"%(C);\n", + "print \"consumptive irrigatin requirement = %.2f cm.\"%(CIR);\n", + "print \"field irrigatio reqiurement = %.2f cm.\"%(FIR);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Consumptive use = 28.70 cm.\n", + "consumptive irrigatin requirement = 26.70 cm.\n", + "field irrigatio reqiurement = 38.20 cm.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 pg : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 20.; \t\t\t\t#latitude of place(degree North)\n", + "T = 15.; \t\t\t\t#mean monthly temperature(degree celcius)\n", + "RH = 0.5; \t\t\t\t#relative humidity\n", + "E = 250.; \t\t\t\t#elevation of area\n", + "V = 25.; \t\t\t\t#wind velocity at 2 m heigth\n", + "\n", + "#from table 3.10\n", + "VP = 12.79; \t\t\t\t#saturation vapour pressure\n", + "s = 0.8; \t\t\t\t#slope of curve between vapur pressure and temperature\n", + "#from table 3.11\n", + "R = 10.8;\n", + "#from table 3.12\n", + "N = 11.1;\n", + "#from table 3.9\n", + "n = 7.74;\n", + "\n", + "# Calculations\n", + "p = n/N;\n", + "e = VP*RH;\n", + "Ea = 0.002187*(160+V)*(VP-e);\n", + "r = 0.2;\n", + "alpha = 0.49;\n", + "sigma = 2.01E-9;\n", + "Ta = 293;\n", + "H = R*(1-r)*(0.29*math.cos(math.pi/9)+0.55*p)-sigma*Ta**4*(0.56-0.092*e**0.5)*(0.10+0.9*p);\n", + "Et = (s*H+alpha*Ea)*31/(s+alpha);\n", + "Et = round(Et*10)/10;\n", + "\n", + "# Results\n", + "print \"consumptive use of rice in january = %.2f mm of water.\"%(Et);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "consumptive use of rice in january = 71.60 mm of water.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 pg : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.27; \t\t\t\t#Field capacity\n", + "pwp = 0.13; \t\t\t\t#permanent wilting point\n", + "d = 80.; \t\t\t\t#depth of soil(cm)\n", + "gammad = 1.5; \t\t\t\t#dry unit weigth of soil(g/cc)\n", + "gammaw = 1.; \t\t\t\t#unit weigth of water(g/cc)\n", + "M = 0.18; \t\t\t\t#avearge soil moisture\n", + "eita = 0.8; \t\t\t\t#field efficiency\n", + "FC = 0.15; \t\t\t\t#field channel\n", + "\n", + "# Calculations\n", + "SC = gammad*d*(Fc-pwp)/gammaw;\n", + "D = gammad*d*(Fc-M)/gammaw;\n", + "FIR = D/eita;\n", + "W = FIR/(1-FC);\n", + "W = round(W*10)/10;\n", + "\n", + "# Results\n", + "print \"maximum storage capacity = %.2f cm\"%(SC);\n", + "print \"depth of irrigation water = %.2f cm\"%(D);\n", + "print \"field irrigation requirement = %.2f cm\"%(FIR);\n", + "print \"water required at canal outlet = %.2f cm\"%(W);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum storage capacity = 16.80 cm\n", + "depth of irrigation water = 10.80 cm\n", + "field irrigation requirement = 13.50 cm\n", + "water required at canal outlet = 15.90 cm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 pg : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "W = 0.4; \t\t\t\t#amount of water available from precipitation\n", + "Cl = 0.15; \t\t\t\t#Channel loss\n", + "RL = 0.1; \t\t\t\t#reservior loss\n", + "B = [120., 320., 120., 200., 100]; \t\t\t\t#Base period\n", + "D = [1800., 800., 900., 1400., 1200];\t\t\t\t#Duty at field\n", + "A = [500., 600., 300., 1200., 500]; \t\t\t\t#Area under crop\n", + "\n", + "# Calculations\n", + "for i in range(5):\n", + " delta[i] = 8.64*B[i]/D[i];\n", + "\n", + "V = zeros(5)\n", + "for i in range(5):\n", + " V[i] = delta[i]*A[i];\n", + "\n", + "s = 0;\n", + "for i in range(5):\n", + " s = s+V[i];\n", + "\n", + "C = s*(1-W)/((1-Cl)*(1-RL));\n", + "\n", + "# Results\n", + "print \"Reservior capacity = %.f ha-m.\"%(C);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reservior capacity = 3567 ha-m.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 pg : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "GCA = 10000.; \t\t\t\t#gross commanded area\n", + "CCA = 0.75*GCA; \t\t\t\t#Culturable commanded area\n", + "IR = 0.6; \t\t\t\t#intensity of irrigation during rabi season\n", + "IK = 0.3; \t\t\t\t#intensity of irrigation during kharif season \n", + "DuR = 2500.; \t\t\t\t#duty during rabi season\n", + "DuK = 1000.; \t\t\t\t#duty during kharif season\n", + "\n", + "# Calculations\n", + "AR = IR*CCA; \t\t\t\t#area under irrigation in rabi season\n", + "AK = IK*CCA; \t\t\t\t#area under irrigation in kharif season\n", + "DR = AR/DuR;\n", + "DK = AK/DuK;\n", + "\n", + "# Results\n", + "print \"discharge required at head of distributory = %.2f cumecs.\"%(DK);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge required at head of distributory = 2.25 cumecs.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 pg : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.18; \t\t\t\t#field capacity\n", + "wc = 0.07; \t\t\t\t#wilting cofficient\n", + "Sg = 1.35; \t\t\t\t#bulk density of soil\n", + "d = 1.2; \t\t\t\t#root zone depth\n", + "\n", + "# Calculations and Results\n", + "m = Fc-wc;\n", + "mo = wc+m/3;\n", + "dw = 100*Sg*d*(Fc-mo);\n", + "print \"Depth of water required = %.2f cm\"%(dw);\n", + "ev1 = 1.1; \t\t\t\t#average evapotranspiration rates in 1 NOV-30 NOV\n", + "ev2 = 1.7; \t\t\t\t#average evapotranspiration rates in 1 DEC-31 DEC\n", + "ev3 = 2.4; \t\t\t\t#average evapotranspiration rates in 1 JAN-31 JAN\n", + "ev4 = 1.5; \t\t\t\t#average evapotranspiration rates in 1 FEB-28 FEB\n", + "ev5 = 3.5; \t\t\t\t#average evapotranspiration rates in 1 MAR-25 MAR\n", + "\t\t\t\t#irrigation requirement from 1 NOV to 3 JAn\n", + "dev = (ev1*30+ev2*31+ev3*3)/10;\n", + "print \"Water consumed by evapotranspiration = %.2f cm.\"%(dev);\n", + "print \"No water is required during 1 NOV-3 JAN\";\n", + "\n", + "\t\t\t\t#irrigation requirement after 3rd JAN\n", + "ws = (ev3-1.5)*16/10; \t\t\t\t#water consumed from soil from 4 JAN-19 JAN\n", + "ts = ws+dev; \t\t\t\t#water withdrawn from soil from 1 NOV-19 JAN\n", + "s = (dw-ts)*10;\n", + "day = s/ev3;\n", + "depth = ts+(4*ev3)/10+(2*ev3)/10;\n", + "print \"depth of water required in first irrigation = %.2f cm.\"%(depth);\n", + "\t\t\t\t#/irrigation requirement from 26 JAn to 25 MAR\n", + "w1 = ev3*6;\n", + "w2 = ev4*28;\n", + "w3 = ev5*25;\n", + "W = w1+w2+w3;\n", + "x = (dw*10-(14.4+42))/ev5;\n", + "print \"Hence second irrigation is required after %.2f days i.e on 18th March.\"%(x);\n", + "depth1 = (W-(dw*10))/10;\n", + "print \"required water depth = %.2f cm\"%(depth1);\n", + "print \"First Watering on 29 JAn and 30 JAN = %.2f cm.Second watering required on 18th March = %.2f cm.\"%(depth,depth1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of water required = 11.88 cm\n", + "Water consumed by evapotranspiration = 9.29 cm.\n", + "No water is required during 1 NOV-3 JAN\n", + "depth of water required in first irrigation = 12.17 cm.\n", + "Hence second irrigation is required after 17.83 days i.e on 18th March.\n", + "required water depth = 2.51 cm\n", + "First Watering on 29 JAn and 30 JAN = 12.17 cm.Second watering required on 18th March = 2.51 cm.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 pg : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.26; \t\t\t\t#Field capacity of soil\n", + "A = 3000.; \t\t\t\t#Area of field\n", + "OM = 0.12; \t\t\t\t#optimum moisture \n", + "pwp = 0.1; \t\t\t\t#permanent wilting point\n", + "d = 80.; \t\t\t\t#depth of root zone\n", + "RD = 1.4; \t\t\t\t#relative density of soil\n", + "f = 10.; \t\t\t\t#frequency of irrigation\n", + "eita = 0.23; \t\t\t\t#overall efficiency\n", + "\n", + "# Calculations\n", + "D = RD*d*(Fc-OM);\n", + "U = D*10/f;\n", + "Wr = A*D*100;\n", + "q = Wr/(f*24*3600);\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"daily consumptive = %.2f mm.\"%(U);\n", + "print \"discharge in canal = %.2f q cumecs.\"%(q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "daily consumptive = 15.68 mm.\n", + "discharge in canal = 5.44 q cumecs.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 pg : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "C1 = 0.2; \t\t\t\t#consumptive requirement of crop for 1 to 15 days\n", + "C2 = 0.3; \t\t\t\t#consumptive requirement of crop for 16 to 40 days\n", + "C3 = 0.5; \t\t\t\t#consumptive requirement of crop for 41 to 50 days\n", + "C4 = 0.1; \t\t\t\t#consumptive requirement of crop for 51 to 55 days\n", + "A = 50.; \t\t\t\t#area of land\n", + "wr = 5.; \t\t\t\t#presowing water requirement\n", + "R = 3.5; \t\t\t\t#rainfall during 36th and 45th day\n", + "\n", + "# Calculations\n", + "w1 = 15*C1*100;\n", + "w2 = 25*C2*100;\n", + "w3 = 10*C3*100;\n", + "w4 = 5*C4*100;\n", + "w5 = 5*100;\n", + "W = w1+w2+w3+w4+w5;\n", + "ER = 3.5*100;\n", + "q = (W-ER)*A;\n", + "\n", + "# Results\n", + "print \"total water to be delivered = %i cubic metre.\"%(q);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total water to be delivered = 87500 cubic metre.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 pg : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.3; \t\t\t\t#field capacity\n", + "pwp = 0.11; \t\t\t\t#permanent wilting percent\n", + "gammad = 1300.; \t\t\t\t#density of soil\n", + "gammaw = 1000.; \t\t\t\t#density of water\n", + "d = 700.; \t\t\t\t#root zone depth\n", + "CW = 12.; \t\t\t\t#daily consumptive use of water\n", + "\n", + "# Calculations\n", + "WHC = Fc-pwp;\n", + "mo = Fc-(0.75*WHC);\n", + "D = gammad*d*(Fc-mo)/gammaw;\n", + "I = D/CW;\n", + "\n", + "# Results\n", + "print \" watering interval = %i days\"%(I); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " watering interval = 10 days\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 pg : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "A = 1000.; \t\t\t\t#total area\n", + "AI = 0.7*A; \t\t\t\t#area under irrigation\n", + "B = 15.; \t\t\t\t#Base period\n", + "d = 500.; \t\t\t\t#depth of water required during transplantation\n", + "R = 120.; \t\t\t\t#useful rain falling\n", + "Wl = 0.2; \t\t\t\t#water loss\n", + "\n", + "# Calculations\n", + "delta = d-R;\n", + "Du = 8.64*B*1000/delta;\n", + "DuH = Du*(1-Wl);\n", + "q = AI/DuH;\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"Duty of water = %i hec/cumec.\"%(Du);\n", + "print \"discharge required in water course = %.2f cumecs.\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water = 341 hec/cumec.\n", + "discharge required in water course = 2.57 cumecs.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 pg : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import zeros\n", + "\n", + "#Given\n", + "Ar = 4000.; \t\t\t\t#culturable commanded area\n", + "CL = 0.25; \t\t\t\t#canal loss\n", + "RL = 0.15; \t\t\t\t#reservior loss\n", + "B = [120., 360., 180., 120., 120.]; \t\t\t\t#base period\n", + "D = [1800., 1700., 1400., 800., 700.];\t\t\t\t#duty of water\n", + "I = [20., 20., 10., 15., 15.]; \t\t\t\t#intensity of irrigation\n", + "\n", + "A = zeros(5)\n", + "# Calculations\n", + "for i in range(5):\n", + " A[i] = Ar*I[i]/10; \t\t\t\t#area under crop\n", + "\n", + "Q = zeros(5)\n", + "for i in range(5):\n", + " Q[i] = A[i]/D[i]; \t\t\t\t#discharge required\n", + "\n", + "for i in range(5):\n", + " V[i] = 8.64E4*Q[i]*B[i]; \t\t\t\t#quantity of water\n", + "\n", + "s = 0;\n", + "for i in range(5):\n", + " s = s+V[i];\n", + "\n", + "SC = round(s/((1-CL)*(1-RL)*1000000));\n", + "\n", + "# Results\n", + "print \"Storage capacity = %iD+06 cubic metre.\"%(SC);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Storage capacity = 633D+06 cubic metre.\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3e27009a --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_1.ipynb @@ -0,0 +1,1440 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fb46725fd841b00338dce4327765570824d962464729228190009d6ed499fe86" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : WATER REQUIREMENTS OF CROPS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 pg : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "Na = 24.; \t\t\t\t#concentration of sodium ion\n", + "Ca = 3.6; \t\t\t\t#concentration of calcium ion\n", + "Mg = 2.; \t\t\t\t#concentration of magnesium ion\n", + "EC = 180.; \t\t\t\t#electrical conductivity\n", + "\n", + "# Calculations\n", + "SAR = Na/(((Ca+Mg)/2)**(0.5)); \t\t\t\t#Sodium absorption ratio\n", + "SAR = round(SAR*100)/100;\n", + "\n", + "# Results\n", + "print \"SAR = %.2f.\"%(SAR);\n", + "print \"Water falls under S2 class.\"; \t\t\t\t#from table 3.2\n", + "print \"For EC = 180\";\n", + "print \"water falls under C1 class.\"; \t\t\t\t#from table 3.1\n", + "print \"Water is medium sodium and low saline water.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SAR = 14.34.\n", + "Water falls under S2 class.\n", + "For EC = 180\n", + "water falls under C1 class.\n", + "Water is medium sodium and low saline water.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 pg : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "gammad = 15.; \t\t\t\t#dry weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Fc = 0.3; \t\t\t\t#field capacity\n", + "pwp = 0.08; \t\t\t\t#permanent wilting point\n", + "d = 0.8; \t\t\t\t#root zone depth\n", + "\n", + "# Calculations\n", + "d1 = gammad*Fc*1000/gammaw;\n", + "d2 = gammad*pwp*1000/gammaw;\n", + "d3 = gammad*d*(Fc-pwp)*1000/gammaw;\n", + "\n", + "# Results\n", + "print \"Depth of moisture in root zone at field capacity = %.f mm/m.\"%(d1);\n", + "print \"Depth of moisture in root zone at permanent wilting point = %.f mm/m.\"%(d2);\n", + "print \"Depth of moisture available in root zone = %.f mm/m.\"%(d3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of moisture in root zone at field capacity = 459 mm/m.\n", + "Depth of moisture in root zone at permanent wilting point = 122 mm/m.\n", + "Depth of moisture available in root zone = 269 mm/m.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 pg : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "gammad = 15.3; \t\t\t\t#dry weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Fc = 0.15; \t\t\t\t#field capacity\n", + "Mc = 0.08; \t\t\t\t#moisture content before irrigation\n", + "D = 60.; \t\t\t\t#Depth of water applied\n", + "\n", + "# Calculations\n", + "d = (gammaw*D)/(gammad*(Fc-Mc));\n", + "\n", + "# Results\n", + "print \"Depth upto which soil profile is wetted = %.f mm.\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth upto which soil profile is wetted = 550 mm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 pg :53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Given\n", + "Sg = 1.6; \t\t\t\t#Apparent specific gravity\n", + "Fc = 0.2; \t\t\t\t#Field capacity\n", + "M1 = 150.; \t\t\t\t#mass of sample soil\n", + "M2 = 136.; \t\t\t\t#mass of sample after drying\n", + "d = 0.9; \t\t\t\t#depth of soil to be irrigated\n", + "\n", + "# Calculations\n", + "Mc = (M1-M2)/M2;\n", + "D = Sg*d*1000*(Fc-Mc);\n", + "\n", + "# Results\n", + "print \"Depth of water required to irrigate the soil = %.f mm.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of water required to irrigate the soil = 140 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 pg : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "\n", + "#Given\n", + "d = 2.; \t\t\t\t#root zone depth\n", + "Wc = 0.05; \t\t\t\t#existing water content\n", + "gammad = 15; \t\t\t\t#dry density of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "Vw = 500. \t\t\t\t#water applied to the soil\n", + "Wl = 0.1; \t\t\t\t#water loss\n", + "A = 1000.; \t\t\t\t#area of plot\n", + "\n", + "# Calculations\n", + "Vu = Vw*0.9; \t\t\t\t#volume of water used in soil \n", + "Wu = Vu*gammaw; \t\t\t\t#weigth of water used in soil\n", + "Ws = A*d*gammad; \t\t\t\t#total dry weigth of soil\n", + "Wa = Wu*100/Ws; \t\t\t\t#percent water added\n", + "Fc = Wc*100+Wa; \n", + "Fc = round(Fc*100)/100;\n", + "\n", + "# Results\n", + "print \"The Field Capacity of soil is = %.2f percent.\"%(Fc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Field Capacity of soil is = 19.72 percent.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 pg : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.22; \t\t\t\t#Field Capacity\n", + "wc = 0.1; \t\t\t\t#wilting coefficient\n", + "gammad = 15.; \t\t\t\t#dry unit weigth of soil\n", + "gammaw = 9.81; \t\t\t\t#unit wiegth of water\n", + "d = 0.7; \t\t\t\t#root zone depth\n", + "w = 0.14; \t\t\t\t#falled moisture content\n", + "E = 0.75; \t\t\t\t#water application efficiency\n", + "\n", + "# Calculations\n", + "SC = gammad*d*(Fc-wc)*100/gammaw;\n", + "D = gammad*d*(Fc-w)*1000/gammaw;\n", + "FIR = D/E; \t\t\t\t#Field irrigation requirement\n", + "SC = round(SC*10)/10;\n", + "D = round(D);\n", + "FIR = round(FIR)+1;\n", + "\n", + "# Results\n", + "print \"Maximum storage capacity of soil = %.2f cm.\"%(SC);\n", + "print \"Water depth required to be applied = %.2f mm\"%(D);\n", + "print \"Field Irrigation Requirement = %.2f mm\"%(FIR);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum storage capacity of soil = 12.80 cm.\n", + "Water depth required to be applied = 86.00 mm\n", + "Field Irrigation Requirement = 115.00 mm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 pg : 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.27; \t\t\t\t#Field capacity\n", + "pwp = 0.14; \t\t\t\t#permanent wilting point\n", + "gammad = 15.; \t\t\t\t#dry density of soil\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "d = 0.75; \t\t\t\t#effective depth of root zone\n", + "Du = 11.; \t\t\t\t#daily consumptive use of water\n", + "\n", + "# Calculations\n", + "Am = Fc-pwp; \t\t\t\t#Available moisture\n", + "#let readily available moisture be 80 percent of available moisture\n", + "RAm = 0.8*Am;\n", + "Mo = Fc-RAm;\n", + "D = gammad*d*(Fc-Mo)*100/gammaw;\n", + "WF = D*10/Du;\n", + "\n", + "# Results\n", + "print \"Watering Frequency = %i days.\"%(WF);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Watering Frequency = 10 days.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 pg : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.22; \t\t\t\t#Field capacity\n", + "Sg = 1.56; \t\t\t\t#Apparent specific gravity\n", + "d = 0.6; \t\t\t\t#root zone depth\n", + "#irrigation is started when 70 percent of moisture is used\n", + "l = 250.; \t\t\t\t#length of field\n", + "b = 40.; \t\t\t\t#width of field\n", + "q = 20.; \t\t\t\t#Discharge\n", + "\n", + "# Calculations\n", + "m = (1-0.7)*Fc;\n", + "D = Sg*d*(Fc-m)*1000;\n", + "A = l*b;\n", + "t = A*D/(q*3600);\n", + "D = round(D);\n", + "t = round(t);\n", + "\n", + "# Results\n", + "print \"Net depth of irrigation water required = %.2f mm.\"%(D);\n", + "print \"Time required to irrigate field = %.2f hours.\"%(t);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net depth of irrigation water required = 144.00 mm.\n", + "Time required to irrigate field = 20.00 hours.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 pg : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "B = 110.; \t\t\t\t#Base period\n", + "D = 1400.; \t\t\t\t#Duty of water\n", + "\n", + "# Calculations\n", + "delta = 8.64*B*100/D;\n", + "delta = round(delta);\n", + "\n", + "# Results\n", + "print \"Delta for crop is = %.2f cm.\"%(delta);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delta for crop is = 68.00 cm.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 pg : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "B = 120.; \t\t\t\t#Base period\n", + "delta = 92.; \t\t\t\t#total depth requirement of crop\n", + "\n", + "# Calculations\n", + "D = 8.64*B*100/delta;\n", + "\n", + "# Results\n", + "print \"Duty of water = %.2f hectares/cumec.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water = 1126.96 hectares/cumec.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 pg : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Cr = 2.; \t\t\t\t#crop ratio\n", + "A = 80000.; \t\t\t\t#Area of field\n", + "CI = 85.; \t\t\t\t#percent field culturable irrigable\n", + "IK = 30.; \t\t\t\t#irrigation intensity during kharif season\n", + "IR = 60.; \t\t\t\t#irrigation intensity for rabi season\n", + "DuK = 800.; \t\t\t\t#Duty of water for kharif season\n", + "DuR = 1700.; \t\t\t\t#Duty of water for rabi season\n", + "\n", + "# Calculations\n", + "CIA = A*CI/100; \t\t\t\t#Culturable irrigable area\n", + "AK = CIA*IK/100; \t\t\t\t#Area under kharif season\n", + "AR = CIA*IR/100; \t\t\t\t#Area under rabi season\n", + "DK = AK/DuK;\n", + "DR = AR/DuR;\n", + "\n", + "\n", + "# Results\n", + "print \"Dischage required at head of canal during Kharif season = %.2f cumecs.\"%(DK);\n", + "print \"Dischage required at head of canal during Rabi season = %.2f cumecs.\"%(DR);\n", + "print \"Water requirement during kharif is greater than during rabi season\";\n", + "print \"Hence,canal should be designed to carry discharge of %.2f cumecs.\"%(DK);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dischage required at head of canal during Kharif season = 25.50 cumecs.\n", + "Dischage required at head of canal during Rabi season = 24.00 cumecs.\n", + "Water requirement during kharif is greater than during rabi season\n", + "Hence,canal should be designed to carry discharge of 25.50 cumecs.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 pg : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "CA = 2600.; \t\t\t\t#culturable area\n", + "IS = 20.; \t\t\t\t#irrigation intensity for sugarcane\n", + "IR = 40.; \t\t\t\t#irrigation intensity for rice\n", + "DuS = 750.; \t\t\t\t#Duty of water for sugarcane\n", + "DuR = 1800.; \t\t\t\t#Duty of water for rice\n", + "PK = 1.2; \t\t\t\t#Peak demand\n", + "\n", + "# Calculations\n", + "AS = CA*IS/100; \t\t\t\t#Area under sugarcane \n", + "AR = CA*IR/100; \t\t\t\t#Area under rice\n", + "DS = AS/DuS;\n", + "DR = AR/DuR;\n", + "DT = DS+DR;\n", + "DD = PK*DT-0.005333+0.01;\n", + "DR = round(DR*1000)/1000;\n", + "DT = round(DT*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Water required for Rice = %.2f cumecs.\"%(DR);\n", + "print \" Sugarcane is a perennial crop.\";\n", + "print \"Hence,Water required for Sugarcane = %.2f cumecs.\"%(DT);\n", + "print \"Design dischage to meet the peak demand = %.2f cumecs.\"%(DD);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Water required for Rice = 0.58 cumecs.\n", + " Sugarcane is a perennial crop.\n", + "Hence,Water required for Sugarcane = 1.27 cumecs.\n", + "Design dischage to meet the peak demand = 1.53 cumecs.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 pg : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "ql = 20.; \t\t\t\t#discharge in left branch\n", + "Al = 20000.; \t\t\t\t#culturable area in left branch\n", + "Bl = 120.; \t\t\t\t#Base period in left branch\n", + "Il = 0.8; \t\t\t\t#intensity of rabi in left branch\n", + "qr = 8.; \t\t\t\t#discharge in rigth branch\n", + "Ar = 12000.; \t\t\t\t#culturable area in rigth branch\n", + "Br = 120.; \t\t\t\t#Base period in rigth branch\n", + "Ir = 0.5; \t\t\t\t#intensity of rabi in rigth branch\n", + "\n", + "# Calculations and Results\n", + "#for left canal\n", + "ARl = Al*Il;\n", + "Dl = ARl/ql;\n", + "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dl);\n", + "\n", + "#for rigth canal\n", + "ARr = Ar*Ir;\n", + "Dr = ARr/qr;\n", + "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dr);\n", + "print \"Since,left canal has higher duty,it is more efficient\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty for left canal is = 800 hectares/cumecs.\n", + "Duty for left canal is = 750 hectares/cumecs.\n", + "Since,left canal has higher duty,it is more efficient\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 pg : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "CA = 1200.; \t\t\t\t#culturable area\n", + "IA = 0.4; \t\t\t\t#intensity of irrigation of crop A\n", + "IB = 0.35; \t\t\t\t#intensity of irrigation of crop B\n", + "bA = 20.; \t\t\t\t#kor period of crop A\n", + "bB = 15.; \t\t\t\t#kor period of crop B\n", + "deltaA = 0.1; \t\t\t\t#kor depth of crop A\n", + "deltaB = 0.16; \t\t\t\t#kor depth of crop B\n", + "\n", + "# Calculations and Results\n", + "#crop A\n", + "A = CA*IA;\n", + "Du = 8.64*bA/deltaA;\n", + "qA = A/Du;\n", + "qA = round(qA*1000)/1000;\n", + "print \"Discharge required for crop A = %.2f cumec.\"%(qA);\n", + "\n", + "#crop B\n", + "A = CA*IB;\n", + "Du = 8.64*bB/deltaB;\n", + "qB = A/Du;\n", + "qB = round(qB*1000)/1000;\n", + "print \"Discharge required for crop B = %.2f cumec.\"%(qB);\n", + "D = qA+qB;\n", + "D = round(D*10)/10;\n", + "print \"Design discharge of water course = %.2f cumec.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge required for crop A = 0.28 cumec.\n", + "Discharge required for crop B = 0.52 cumec.\n", + "Design discharge of water course = 0.80 cumec.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 pg : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\n", + "#Given\n", + "B = 12.; \t\t\t\t#transplantaion period\n", + "D = 0.5; \t\t\t\t#total depth of water required by the crop\n", + "R = 0.1; \t\t\t\t#rain falling on field\n", + "L = 0.2; \t\t\t\t#loss of water\n", + "A = 600.; \t\t\t\t#irrigated area\n", + "I = 0.6; \t\t\t\t#intensity of irrigation\n", + "delta = D-R;\n", + "Dui = 8.64*B/delta;\n", + "\n", + "# Calculations and Results\n", + "#math.since water loss is 20 percent\n", + "Du = (1-L)*Dui;\n", + "print \"Duty of water required = %.2f hectares/cumec.\"%(Du);\n", + "\n", + "TA = I*A;\n", + "q = TA/Du;\n", + "q = round(q*100)/100;\n", + "print \"Discharge at head of water course = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water required = 207.36 hectares/cumec.\n", + "Discharge at head of water course = 1.74 cumecs.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 pg : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "CF = 0.8; \t\t\t\t#Capacity factory\n", + "Tf = 13./20; \t\t\t\t#time factor\n", + "A = [850., 120., 600., 500., 360.]; \t\t\t\t\n", + "#Given values of area\n", + "B = [320., 90., 120., 120., 120.]; \t\t\t\t\n", + "#Given values of Base period\n", + "D = [580., 580., 1600. ,2000., 600.]; \t\t\t\t\n", + "#Given values of duty at head canal\n", + "\n", + "# Calculations and Results\n", + "DS = A[0]/D[0]; \t\t\t\t#discharge for sugarcane \n", + "DOS = A[1]/D[1]; \t\t\t\t#discharge for overlap sugarcane\n", + "DW = A[2]/D[2]; \t\t\t\t#discharge for wheat\n", + "DB = A[3]/D[3]; \t\t\t\t#discharge for bajri\n", + "DV = A[4]/D[4]; \t\t\t\t#discharge for vegetables\n", + "DR = DS+DW;\n", + "DM = DS+DB;\n", + "DH = DS+DOS+DV;\n", + "print \"Maximum demand is in hot weather\";\n", + "q = DH/Tf;\n", + "D = q/CF;\n", + "q = round(1000*q)/1000;\n", + "D = round(100*D)/100;\n", + "print \"Full supply discharge at head = %.2f cumecs\"%(q);\n", + "print \"Design discharge = %.2f cumecs.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum demand is in hot weather\n", + "Full supply discharge at head = 3.50 cumecs\n", + "Design discharge = 4.37 cumecs.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 pg : 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#Given\n", + "CL = 0.2; \t\t\t\t#Canal loss\n", + "RL = 0.12; \t\t\t\t#Reservior loss\n", + "A = [4800., 5600., 2400., 3200., 1400]; \t\t\t\t\n", + "#Given values of area under crop\n", + "D = [1800., 800., 1400., 900., 700]; \t\t\t\t\n", + "#Given values of duty at field\n", + "B = [120., 360., 200., 120., 120]; \t\t\t\t\n", + "#Given values of base period\n", + "\n", + "# Calculations and Results\n", + "#(a) Wheat\n", + "d = A[0]/D[0];\n", + "V1 = d*B[0];\n", + "#(b) Sugarcane\n", + "d = A[1]/D[1];\n", + "V2 = d*B[1];\n", + "#(c) Cotton\n", + "d = A[2]/D[2];\n", + "V3 = round(d*B[2]);\n", + "#(d) Rice\n", + "d = A[3]/D[3];\n", + "V4 = round(d*B[3]);\n", + "#(e) vegetables\n", + "d = A[4]/D[4];\n", + "V5 = d*B[4];\n", + "\n", + "Vd = (V1+V2+V3+V4+V5)*8.64;\n", + "SC = Vd/((1-CL)*(1-RL));\n", + "print \"Reservior capacity = %.2f hectare-metres.\"%(SC);\n", + "\n", + "#Alternative method\n", + "delta = zeros(5)\n", + "for i in range(5):\n", + " delta[i] = 8.64*B[i]/D[i];\n", + "V = zeros(5)\n", + "for j in range(5):\n", + " V[j] = A[j]*delta[j];\n", + "\n", + "s = 0;\n", + "for k in range(5):\n", + " s = s+V[k];\n", + "\n", + "SC = s/((1-CL)*(1-RL));\n", + "\n", + "print \" By Alternative method.Storage capacity = %.f hectare-metres.\"%(SC);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reservior capacity = 47250.00 hectare-metres.\n", + " By Alternative method.Storage capacity = 47244 hectare-metres.\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 pg : 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "eita = 0.7; \t\t\t\t#water application efficiency\n", + "k = 0.75; \t\t\t\t#crop factor\n", + "T = [19., 16., 12.,.5, 13.]; \t\t\t\t\n", + "#Given values of temperature\n", + "p = [7.19 ,7.15, 7.30, 7.03]; \t\t\t\t#daytime hours of the year\n", + "RD = 1.2; \t\t\t\t#rainfall in december\n", + "RJ = 0.8; \t\t\t\t#rainfall in january\n", + "\n", + "f = zeros(4)\n", + "for i in range(4):\n", + " f[i] = p[i]*(1.8*T[i]+32)/40;\n", + "\n", + "s = 0;\n", + "for i in range(4): \n", + " s = s+f[i];\n", + "\n", + "C = k*s;\n", + "R = RD+RJ;\n", + "CIR = C-R;\n", + "FIR = CIR/eita;\n", + "C = round(10*C)/10;\n", + "CIR = round(CIR*10)/10;\n", + "FIR = round(FIR*10)/10;\n", + "\n", + "# Results\n", + "print \"Consumptive use = %.2f cm.\"%(C);\n", + "print \"consumptive irrigatin requirement = %.2f cm.\"%(CIR);\n", + "print \"field irrigatio reqiurement = %.2f cm.\"%(FIR);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Consumptive use = 28.70 cm.\n", + "consumptive irrigatin requirement = 26.70 cm.\n", + "field irrigatio reqiurement = 38.20 cm.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 pg : 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "L = 20.; \t\t\t\t#latitude of place(degree North)\n", + "T = 15.; \t\t\t\t#mean monthly temperature(degree celcius)\n", + "RH = 0.5; \t\t\t\t#relative humidity\n", + "E = 250.; \t\t\t\t#elevation of area\n", + "V = 25.; \t\t\t\t#wind velocity at 2 m heigth\n", + "\n", + "#from table 3.10\n", + "VP = 12.79; \t\t\t\t#saturation vapour pressure\n", + "s = 0.8; \t\t\t\t#slope of curve between vapur pressure and temperature\n", + "#from table 3.11\n", + "R = 10.8;\n", + "#from table 3.12\n", + "N = 11.1;\n", + "#from table 3.9\n", + "n = 7.74;\n", + "\n", + "# Calculations\n", + "p = n/N;\n", + "e = VP*RH;\n", + "Ea = 0.002187*(160+V)*(VP-e);\n", + "r = 0.2;\n", + "alpha = 0.49;\n", + "sigma = 2.01E-9;\n", + "Ta = 293;\n", + "H = R*(1-r)*(0.29*math.cos(math.pi/9)+0.55*p)-sigma*Ta**4*(0.56-0.092*e**0.5)*(0.10+0.9*p);\n", + "Et = (s*H+alpha*Ea)*31/(s+alpha);\n", + "Et = round(Et*10)/10;\n", + "\n", + "# Results\n", + "print \"consumptive use of rice in january = %.2f mm of water.\"%(Et);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "consumptive use of rice in january = 71.60 mm of water.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 pg : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.27; \t\t\t\t#Field capacity\n", + "pwp = 0.13; \t\t\t\t#permanent wilting point\n", + "d = 80.; \t\t\t\t#depth of soil(cm)\n", + "gammad = 1.5; \t\t\t\t#dry unit weigth of soil(g/cc)\n", + "gammaw = 1.; \t\t\t\t#unit weigth of water(g/cc)\n", + "M = 0.18; \t\t\t\t#avearge soil moisture\n", + "eita = 0.8; \t\t\t\t#field efficiency\n", + "FC = 0.15; \t\t\t\t#field channel\n", + "\n", + "# Calculations\n", + "SC = gammad*d*(Fc-pwp)/gammaw;\n", + "D = gammad*d*(Fc-M)/gammaw;\n", + "FIR = D/eita;\n", + "W = FIR/(1-FC);\n", + "W = round(W*10)/10;\n", + "\n", + "# Results\n", + "print \"maximum storage capacity = %.2f cm\"%(SC);\n", + "print \"depth of irrigation water = %.2f cm\"%(D);\n", + "print \"field irrigation requirement = %.2f cm\"%(FIR);\n", + "print \"water required at canal outlet = %.2f cm\"%(W);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum storage capacity = 16.80 cm\n", + "depth of irrigation water = 10.80 cm\n", + "field irrigation requirement = 13.50 cm\n", + "water required at canal outlet = 15.90 cm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 pg : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "W = 0.4; \t\t\t\t#amount of water available from precipitation\n", + "Cl = 0.15; \t\t\t\t#Channel loss\n", + "RL = 0.1; \t\t\t\t#reservior loss\n", + "B = [120., 320., 120., 200., 100]; \t\t\t\t#Base period\n", + "D = [1800., 800., 900., 1400., 1200];\t\t\t\t#Duty at field\n", + "A = [500., 600., 300., 1200., 500]; \t\t\t\t#Area under crop\n", + "\n", + "# Calculations\n", + "for i in range(5):\n", + " delta[i] = 8.64*B[i]/D[i];\n", + "\n", + "V = zeros(5)\n", + "for i in range(5):\n", + " V[i] = delta[i]*A[i];\n", + "\n", + "s = 0;\n", + "for i in range(5):\n", + " s = s+V[i];\n", + "\n", + "C = s*(1-W)/((1-Cl)*(1-RL));\n", + "\n", + "# Results\n", + "print \"Reservior capacity = %.f ha-m.\"%(C);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reservior capacity = 3567 ha-m.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 pg : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "GCA = 10000.; \t\t\t\t#gross commanded area\n", + "CCA = 0.75*GCA; \t\t\t\t#Culturable commanded area\n", + "IR = 0.6; \t\t\t\t#intensity of irrigation during rabi season\n", + "IK = 0.3; \t\t\t\t#intensity of irrigation during kharif season \n", + "DuR = 2500.; \t\t\t\t#duty during rabi season\n", + "DuK = 1000.; \t\t\t\t#duty during kharif season\n", + "\n", + "# Calculations\n", + "AR = IR*CCA; \t\t\t\t#area under irrigation in rabi season\n", + "AK = IK*CCA; \t\t\t\t#area under irrigation in kharif season\n", + "DR = AR/DuR;\n", + "DK = AK/DuK;\n", + "\n", + "# Results\n", + "print \"discharge required at head of distributory = %.2f cumecs.\"%(DK);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge required at head of distributory = 2.25 cumecs.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 pg : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.18; \t\t\t\t#field capacity\n", + "wc = 0.07; \t\t\t\t#wilting cofficient\n", + "Sg = 1.35; \t\t\t\t#bulk density of soil\n", + "d = 1.2; \t\t\t\t#root zone depth\n", + "\n", + "# Calculations and Results\n", + "m = Fc-wc;\n", + "mo = wc+m/3;\n", + "dw = 100*Sg*d*(Fc-mo);\n", + "print \"Depth of water required = %.2f cm\"%(dw);\n", + "ev1 = 1.1; \t\t\t\t#average evapotranspiration rates in 1 NOV-30 NOV\n", + "ev2 = 1.7; \t\t\t\t#average evapotranspiration rates in 1 DEC-31 DEC\n", + "ev3 = 2.4; \t\t\t\t#average evapotranspiration rates in 1 JAN-31 JAN\n", + "ev4 = 1.5; \t\t\t\t#average evapotranspiration rates in 1 FEB-28 FEB\n", + "ev5 = 3.5; \t\t\t\t#average evapotranspiration rates in 1 MAR-25 MAR\n", + "\t\t\t\t#irrigation requirement from 1 NOV to 3 JAn\n", + "dev = (ev1*30+ev2*31+ev3*3)/10;\n", + "print \"Water consumed by evapotranspiration = %.2f cm.\"%(dev);\n", + "print \"No water is required during 1 NOV-3 JAN\";\n", + "\n", + "\t\t\t\t#irrigation requirement after 3rd JAN\n", + "ws = (ev3-1.5)*16/10; \t\t\t\t#water consumed from soil from 4 JAN-19 JAN\n", + "ts = ws+dev; \t\t\t\t#water withdrawn from soil from 1 NOV-19 JAN\n", + "s = (dw-ts)*10;\n", + "day = s/ev3;\n", + "depth = ts+(4*ev3)/10+(2*ev3)/10;\n", + "print \"depth of water required in first irrigation = %.2f cm.\"%(depth);\n", + "\t\t\t\t#/irrigation requirement from 26 JAn to 25 MAR\n", + "w1 = ev3*6;\n", + "w2 = ev4*28;\n", + "w3 = ev5*25;\n", + "W = w1+w2+w3;\n", + "x = (dw*10-(14.4+42))/ev5;\n", + "print \"Hence second irrigation is required after %.2f days i.e on 18th March.\"%(x);\n", + "depth1 = (W-(dw*10))/10;\n", + "print \"required water depth = %.2f cm\"%(depth1);\n", + "print \"First Watering on 29 JAn and 30 JAN = %.2f cm.Second watering required on 18th March = %.2f cm.\"%(depth,depth1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth of water required = 11.88 cm\n", + "Water consumed by evapotranspiration = 9.29 cm.\n", + "No water is required during 1 NOV-3 JAN\n", + "depth of water required in first irrigation = 12.17 cm.\n", + "Hence second irrigation is required after 17.83 days i.e on 18th March.\n", + "required water depth = 2.51 cm\n", + "First Watering on 29 JAn and 30 JAN = 12.17 cm.Second watering required on 18th March = 2.51 cm.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 pg : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.26; \t\t\t\t#Field capacity of soil\n", + "A = 3000.; \t\t\t\t#Area of field\n", + "OM = 0.12; \t\t\t\t#optimum moisture \n", + "pwp = 0.1; \t\t\t\t#permanent wilting point\n", + "d = 80.; \t\t\t\t#depth of root zone\n", + "RD = 1.4; \t\t\t\t#relative density of soil\n", + "f = 10.; \t\t\t\t#frequency of irrigation\n", + "eita = 0.23; \t\t\t\t#overall efficiency\n", + "\n", + "# Calculations\n", + "D = RD*d*(Fc-OM);\n", + "U = D*10/f;\n", + "Wr = A*D*100;\n", + "q = Wr/(f*24*3600);\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"daily consumptive = %.2f mm.\"%(U);\n", + "print \"discharge in canal = %.2f q cumecs.\"%(q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "daily consumptive = 15.68 mm.\n", + "discharge in canal = 5.44 q cumecs.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 pg : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "C1 = 0.2; \t\t\t\t#consumptive requirement of crop for 1 to 15 days\n", + "C2 = 0.3; \t\t\t\t#consumptive requirement of crop for 16 to 40 days\n", + "C3 = 0.5; \t\t\t\t#consumptive requirement of crop for 41 to 50 days\n", + "C4 = 0.1; \t\t\t\t#consumptive requirement of crop for 51 to 55 days\n", + "A = 50.; \t\t\t\t#area of land\n", + "wr = 5.; \t\t\t\t#presowing water requirement\n", + "R = 3.5; \t\t\t\t#rainfall during 36th and 45th day\n", + "\n", + "# Calculations\n", + "w1 = 15*C1*100;\n", + "w2 = 25*C2*100;\n", + "w3 = 10*C3*100;\n", + "w4 = 5*C4*100;\n", + "w5 = 5*100;\n", + "W = w1+w2+w3+w4+w5;\n", + "ER = 3.5*100;\n", + "q = (W-ER)*A;\n", + "\n", + "# Results\n", + "print \"total water to be delivered = %i cubic metre.\"%(q);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total water to be delivered = 87500 cubic metre.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 pg : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "Fc = 0.3; \t\t\t\t#field capacity\n", + "pwp = 0.11; \t\t\t\t#permanent wilting percent\n", + "gammad = 1300.; \t\t\t\t#density of soil\n", + "gammaw = 1000.; \t\t\t\t#density of water\n", + "d = 700.; \t\t\t\t#root zone depth\n", + "CW = 12.; \t\t\t\t#daily consumptive use of water\n", + "\n", + "# Calculations\n", + "WHC = Fc-pwp;\n", + "mo = Fc-(0.75*WHC);\n", + "D = gammad*d*(Fc-mo)/gammaw;\n", + "I = D/CW;\n", + "\n", + "# Results\n", + "print \" watering interval = %i days\"%(I); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " watering interval = 10 days\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 pg : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "A = 1000.; \t\t\t\t#total area\n", + "AI = 0.7*A; \t\t\t\t#area under irrigation\n", + "B = 15.; \t\t\t\t#Base period\n", + "d = 500.; \t\t\t\t#depth of water required during transplantation\n", + "R = 120.; \t\t\t\t#useful rain falling\n", + "Wl = 0.2; \t\t\t\t#water loss\n", + "\n", + "# Calculations\n", + "delta = d-R;\n", + "Du = 8.64*B*1000/delta;\n", + "DuH = Du*(1-Wl);\n", + "q = AI/DuH;\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"Duty of water = %i hec/cumec.\"%(Du);\n", + "print \"discharge required in water course = %.2f cumecs.\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty of water = 341 hec/cumec.\n", + "discharge required in water course = 2.57 cumecs.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 pg : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import zeros\n", + "\n", + "#Given\n", + "Ar = 4000.; \t\t\t\t#culturable commanded area\n", + "CL = 0.25; \t\t\t\t#canal loss\n", + "RL = 0.15; \t\t\t\t#reservior loss\n", + "B = [120., 360., 180., 120., 120.]; \t\t\t\t#base period\n", + "D = [1800., 1700., 1400., 800., 700.];\t\t\t\t#duty of water\n", + "I = [20., 20., 10., 15., 15.]; \t\t\t\t#intensity of irrigation\n", + "\n", + "A = zeros(5)\n", + "# Calculations\n", + "for i in range(5):\n", + " A[i] = Ar*I[i]/10; \t\t\t\t#area under crop\n", + "\n", + "Q = zeros(5)\n", + "for i in range(5):\n", + " Q[i] = A[i]/D[i]; \t\t\t\t#discharge required\n", + "\n", + "for i in range(5):\n", + " V[i] = 8.64E4*Q[i]*B[i]; \t\t\t\t#quantity of water\n", + "\n", + "s = 0;\n", + "for i in range(5):\n", + " s = s+V[i];\n", + "\n", + "SC = round(s/((1-CL)*(1-RL)*1000000));\n", + "\n", + "# Results\n", + "print \"Storage capacity = %iD+06 cubic metre.\"%(SC);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Storage capacity = 633D+06 cubic metre.\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4.ipynb new file mode 100755 index 00000000..fac86470 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4.ipynb @@ -0,0 +1,4176 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8233f932d93bf9a420e5546d5224a7f79d5530eb187360329fde39eb4d1d8811" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : HYDROLOGY\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 pg : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "p = [78.8, 90.2, 98.6, 102.4, 70.4]; \t\t\t\t#rain guage readings at respective stations\n", + "s = 0.;\n", + "\n", + "# Calculations and Results\n", + "for i in range(5):\n", + " s = s+p[i];\n", + "\n", + "pavg = s/5;\n", + "u = 0;\n", + "for i in range(5):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "sx = (u/4)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/6)**2;\n", + "N = round(N*100)/100;\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "#taking N = 7\n", + "N = 7;\n", + "n = N-5;\n", + "print \"additional guages needed = %i.\"%(n);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 88.08 cm.\n", + "total stations needed = 6.44.\n", + "additional guages needed = 2.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pB = 48.; \t\t\t\t#precipitation at B\n", + "pC = 51.; \t\t\t\t#precpitation at C\n", + "pD = 45.; \t\t\t\t#precipitation at D\n", + "\n", + "# Calculations\n", + "pA = (pB+pC+pD)/3;\n", + "\n", + "# Results\n", + "print \"precipitation at A = %i mm.\"%(pA);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at A = 48 mm.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pA = 6.6; \t\t\t\t#precipitation at A\n", + "pB = 4.8; \t\t\t\t#precpitation at B\n", + "pC = 3.7; \t\t\t\t#precipitation at C\n", + "nA = 72.6; \t\t\t\t#normal precipitation at A\n", + "nB = 51.8; \t\t\t\t#normal precipitation at B\n", + "nC = 38.2; \t\t\t\t#normal precipitation at C\n", + "nX = 65.6; \t\t\t\t#normal precipitation at X\n", + "\n", + "# Calculations\n", + "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;\n", + "pX = round(pX*100)/100;\n", + "\n", + "# Results\n", + "print \"precipitation at x = %.2f cm.\"%(pX);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at x = 6.13 cm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pB = 74.; \t\t\t\t#precipitation at B\n", + "pC = 88.; \t\t\t\t#precpitation at C\n", + "pD = 71.; \t\t\t\t#precipitation at D\n", + "pE = 80.; \t\t\t\t#precipitation at E\n", + "Bx = 9.;\n", + "By = 6.;\n", + "Cx = 12.;\n", + "Cy = -9.;\n", + "Dx = -11.;\n", + "Dy = -6.;\n", + "Ex = -7.;\n", + "Ey = 7.;\n", + "Ax = 0;\n", + "Ay = 0;\n", + "\n", + "# Calculations\n", + "Db = (Bx**2+By**2);\n", + "Dc = (Cx**2+Cy**2);\n", + "Dd = (Dx**2+Dy**2);\n", + "De = (Ex**2+Ey**2);\n", + "Wb = 1/Db;\n", + "Wc = 1/Dc;\n", + "Wd = 1/Dd;\n", + "We = 1/De;\n", + "s = pB*Wb+pC*Wc+pD*Wd+pE*We;\n", + "pA = s/(Wb+Wc+Wd+We);\n", + "pA = round(pA*10)/10;\n", + "\n", + "# Results\n", + "print \"precipitation at A = %.2f mm.\"%(pA);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at A = 77.50 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 pg : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "p = [58., 61., 69., 56., 84., 86., 69., 79., 71.]; \t\t\t\t#values of precipitation\n", + "s = 0;\n", + "\n", + "# Calculations and Results\n", + "for i in range(9):\n", + " s = s+p[i];\n", + "ar = s/9;\n", + "ar = round(ar*10)/10;\n", + "print \"umath.sing arithmatic average method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "I = [86., 85., 80., 75., 70., 65., 60., 55., 50.]; \t\t\t\t#isphytes\n", + "A = [0.43, 5.20, 4.0, 5.04, 5.85, 4.53, 4.09, 1.27]; \t\t\t\t#area between isohytes\n", + "\n", + "a = zeros(9)\n", + "for i in range(8):\n", + " a[i] = (I[i]+I[i+1])/2;\n", + "\n", + "P = zeros(8)\n", + "for i in range(8):\n", + " P[i] = A[i]*a[i];\n", + "\n", + "s = 0;\n", + "for i in range(8):\n", + " s = s+P[i];\n", + "\n", + "t = 0;\n", + "for i in range(8):\n", + " t = t+A[i];\n", + "\n", + "ar = s/t;\n", + "ar = round(ar*10)/10;\n", + "print \"isohytel method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "A = [3.26, 0.39, 1.61, 2.04, 2.46, 0.84, 3.91, 5.09, 0.41, 3.94, 2.06, 4.40]; \t\t\t\t#thiessen area\n", + "p = [58., 63., 71., 69., 86., 81., 84., 56., 53., 69., 61., 79.]; \t\t\t\t#observed precipitation\n", + "P = zeros(12)\n", + "for i in range(12):\n", + " P[i] = A[i]*p[i];\n", + "\n", + "s = 0;\n", + "for i in range(12):\n", + " s = s+P[i];\n", + "\n", + "t = 0;\n", + "for i in range(12):\n", + " t = t+A[i];\n", + "\n", + "ar = s/t;\n", + "ar = round(ar*10)/10;\n", + "print \"thiesson polygon method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "#mean rainfall obtained by thiesson polygon method is different from book as product(A*P) is round offed in book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "umath.sing arithmatic average method:\n", + "Average rainfall = 70.30 cm.\n", + "isohytel method:\n", + "Average rainfall = 69.70 cm.\n", + "thiesson polygon method:\n", + "Average rainfall = 70.00 cm.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 pg : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "from numpy import zeros\n", + "\n", + "\n", + "#Given\n", + "X = [69., 55., 62., 67., 87., 70., 65., 75., 90., 100., 90., 95., 85., 90., 75., 95.]; \t\t\t\t#annual rainfall at X\n", + "Y = [77., 62., 67., 68., 86., 90., 65., 75, 70, 70, 70 ,75 ,65 ,70, 55, 75]; \t\t\t\t#average rainfall at 10 base stations\n", + "cx = zeros(16)\n", + "cx[0] = 69; \t\t\t\t#accumulated annual values at station X \n", + "for i in range(1,16):\n", + " cx[i] = cx[i-1]+X[i];\n", + "\n", + "cy = zeros(16)\n", + "cy[0] = 77;\n", + "for i in range(1,16):\n", + " cy[i] = cy[i-1]+Y[i]; \t\t\t\t#accumulated annual values at ten stations\n", + " \n", + "\n", + "#since curve is not having unform slope\n", + "print \"Record at X is not consistent.\";\n", + "print \"From the curve regime is observed in the year 1978.\"\n", + "\n", + "Q = [1970., 1971., 1972., 1973., 1974., 1975., 1976., 1977.];\n", + "O = [95., 75., 90., 85., 95., 90., 100., 90.];\n", + "for i in range(8):\n", + " A[i] = 0.7051*O[i];\n", + "\n", + "print \"Year Observed rainfall Adjusted rainfall\";\n", + "for i in range(8):\n", + " print \"%i %i %i\"%(Q[i],O[i],A[i]);\n", + "\n", + "#graph is plotted between cx and cy\n", + "plot(cy,cx,cy,cx,\"ro\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Record at X is not consistent.\n", + "From the curve regime is observed in the year 1978.\n", + "Year Observed rainfall Adjusted rainfall\n", + "1970 95 66\n", + "1971 75 52\n", + "1972 90 63\n", + "1973 85 59\n", + "1974 95 66\n", + "1975 90 63\n", + "1976 100 70\n", + "1977 90 63\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "[,\n", + " ]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEACAYAAACznAEdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHfpJREFUeJzt3Xt4VNW5x/EvDRAvWBHtg1zUaACBlhakgojo6DGYOq14\nvHGTkwry2IMweClKQCWPiAJVKcS7CKJClIrHqlwkUEZUGlAuikI0jKIGSxSviHJJMuePtWMmw4SQ\nue3Ze36f58kze9bszF5Lh3mz1+VdICIiIiIiIiIiIiIiIiIiIiIiIiIiErM5QAWwOcJrNwPVQKuQ\nsnygDCgF+oeU97TeowyYmZCaiohIQvUDenBwQDgJWAZ8TG1A6ApsApoBWcA2oIn12jqgl3W8BMhN\nWI1FRCQqv2jg9deBbyKU3w/cElY2ACgCDgDbMQGhN9AGOAYTFACeAi6NrroiIpIoDQWESAYA5cC7\nYeVtrfIa5UC7COU7rHIREUkhTRt5/lHABCAnpKxJPeeKiIiDNDYgZGPGB96xnrcH1mO6hnZgxhYI\nea3cKm8fVr4j4ptnZwcDgUAjqyQikvYCQIdkXCiLyLOMIPKgcnPgVEwFa+4e1mKCRhMOPagcdLNJ\nkybZXYWEcXPbgkG1z+nc3j4gGPM3PQ2PIRQBa4BOwGfANeFf4CHHW4CF1uNSYFTI66OA2Zhpp9sw\nM5RERCSFNNRlNLiB108Le3639RNuPdDtcCslIiLJF80sI4mSx+OxuwoJ4+a2gdrndG5vX7yk2gwh\nqztMREQOV5MmTSAO3+e6QxAREUABQURELAoIIiICKCCIiIhFAUFERAAFBBERsSggiIgIoIAgIiIW\nBQQREQEUEERExKKAICIiQOM3yBERkThYvXgxy2fNoum+fVRmZtLf5+Ncr9fWOikgiIgk2erFi3l1\n7FimhOwQOdE6tjMoqMtIRCTJls+aVScYAEwJBCguLLSpRoYCgohIkjXdty9iecbevUmuSV0KCCIi\nSbR3L2z+KDPia1VHHJHk2tSlgCAikiRbt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A/qfmE2pj01\nE2rWYdZIASyhdtKL3SK1L4fa/w9TcXb76tUHWBbyfLz143QvAhdiInZrq+xE6zmYiB56N7QMMxMr\nVbUHVgDnU3uH4Ja2HYv5wgznlva1wvyBchwm2L2M+XJxevuyqPuF2dj2tMH8xV1jEPBIIioapSzq\nti/UfwPPWMdxa18qRH03LljLwkT3tZgPaIVVXkHtB7Ytpq01Ur3dM4BxmKnCNdzStlOBL4G5wAbg\nceBo3NO+r4H7gE+Bz4FvMV0rbmlfjca2J7x8B85oJ5i72SXWcdzalwoBwW0L1loAi4CxwO6w14Ic\nur2p+t/ij8AXmPGD+tauOLVtYP5qPgN4yHrcw8F3qU5uXzZwA+YPlbaYz+jVYec4uX2RNNQeJ5sI\n7MeMBcVVKgSEHZgB2RonUTeqOUkzTDB4GtNlBOYvlROt4zaYL1Y4uN3trbJUdDZwCfAxUARcgGmj\nG9oG5vNWDrxlPX8eExh24o72/R5YA3wFVGIGJPvgnvbVaMznsdwqbx9Wnurt/DNwMTA0pMxN7XPN\ngrUmwFOYrpVQ06nt3xvPwQNBzTFdFgFSb8OiSM6jdgzBTW1bDXSyjgswbXNL+36Hmfl2JKae84Dr\ncX77sjh4ULmx7VmLmVHWhNQbdM2ibvtyMTPFTgg7z6ntq5cbFqydg+lf34TpWtmI+Y/fCjMYG2kq\n3ARMm0uBi5JZ2RicR+0sIze17XeYO4TQKX1uat8t1E47nYe5m3Vy+4ow4yH7MWOQ1xBde2qmZW4D\nZiW81ocvvH3DMVNHP6H2++WhkPOd1j4REREREREREREREREREREREREREREREREREXGD/weMI8w/\naOM1NQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 pg : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import zeros,linspace\n", + "\t\t\t\t\n", + "#Given\n", + "c = [0, 12.4, 22.1, 35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146., 146.]; \t\t\t\t#cumulative rainfall\n", + "T = linspace(0,13,len(c)) \t\t\t\t#Time\n", + "t = 15./60; \t\t\t\t#time interval\n", + "r = zeros(13)\n", + "I = zeros(13)\n", + "r[0] = 0;\n", + "print \"Rainfall intensity:\";\n", + "I[0] = 0;\n", + "for i in range(1,13):\n", + " r[i] = c[i]-c[i-1]; \n", + " I[i] = r[i]/t; \t\t\t\t#Rainfall intensity\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "\n", + "#graph is plotted between I and T\n", + "bar(T,I)\n", + "xlabel(\"Time hr\")\n", + "ylabel(\"Rain fall insentity\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Rainfall intensity:\n", + "49.60\n", + "38.80\n", + "52.00\n", + "70.40\n", + "44.00\n", + "72.80\n", + "109.20\n", + "57.20\n", + "36.40\n", + "42.80\n", + "10.80\n", + "0.00\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 15, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEPCAYAAABGP2P1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFHtJREFUeJzt3WuwHGWdx/HvmAQBySEc0RAIejBulFDAoi4LXpZBLhsR\nA3hB1LVA2H3jBXAtINHSnNqttQAXXFaKtZQFw67cRIqVlVUCMoW1sqAQ7kQgEMNFDgpojnhJgNkX\nTx/OPCcnk56Z7unpzvdTNTU9fWbm+Z9b/+Z5uvtpkCRJkiRJkiRJkiRJkiRJkkrpImAMuKdl3VeA\nB4C7gKuBHVu+tgx4CFgNHN6nGiVJffQuYD/iYDgMeEWyfGZyA1gE3AnMAkaAh1ueJ0nqozw3vj8G\nnpuybiXwUrJ8KzA/WT4KuAz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mZmFl2AVLBnCJMaQphLZhw4\nN8f20swRNJMw/YVUiLLMlST1y8TkYnUmp/8YJZxxfDOwFng/8M+EmSr/h8kPWG8FGsDPCNPET8wN\nNNVfAf9LmOZlovdQB34M/BfhLGepMAaDlM4ehOtRLCFMhLiSMLf9H4D3Eqap+BphQ/82wjTf/zTN\n+9QIgfEOwsy1rXMG7Ue4ut+bcvkOpJQcSpK2rEnoGbxImNDuFcAPk6/dQ5iwbCGwF5PXSphBmK9m\nuveamF33AeLrEtxGmI9HKpTBIKWzIbl/CdjYsv4lwv9RjTAElGZK7A0ty63z4j/fS4FSVhxKkrYs\nzQWKfg68BjggeTwLWJRbRVKODAYp1my5n24ZNj2yqEnoRXyQcK2HienVD9xCG+2WJUmSJEmSJEmS\nJEmSJEmSJEmSJEmSti7/D/HgBKyAP/WaAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 pg : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import *\n", + "\n", + "\n", + "#Given\n", + "CR = array([0, 12.4, 22.1 ,35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146.0, 146.0]); \t\t\t\t#cumulative rainfall\n", + "\n", + "c15 = zeros_like(CR)\n", + "c30 = zeros_like(CR)\n", + "c45 = zeros_like(CR)\n", + "c60 = zeros_like(CR)\n", + "c90 = zeros_like(CR)\n", + "c120 = zeros_like(CR)\n", + "\n", + "# Calculations and Results\n", + "c15[1] = 12.4;\n", + "c30[2] = 22.1;\n", + "c45[3] = 35.1;\n", + "c60[4] = 52.7;\n", + "c90[6] = 81.9;\n", + "c120[8] = 123.5;\n", + "for i in range(2,13):\n", + " c15[i] = CR[i]-CR[i-1];\n", + "\n", + "for i in range(3,13):\n", + " c30[i] = CR[i]-CR[i-2];\n", + "\n", + "for i in range(4,13):\n", + " c45[i] = CR[i]-CR[i-3];\n", + "\n", + "for i in range(5,13):\n", + " c60[i] = CR[i]-CR[i-4];\n", + "\n", + "for i in range(7,13):\n", + " c90[i] = CR[i]-CR[i-6];\n", + "\n", + "for i in range(9,13):\n", + " c120[i] = CR[i]-CR[i-8];\n", + "\n", + "print \"15min 30min 45min 60min 90min 120min\";\n", + "for i in range(13):\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(c15[i],c30[i],c45[i],c60[i],c90[i],c120[i]);\n", + "\n", + "I = [109.2, 91, 79.7, 74.1, 67.6, 61.75]; \t\t\t\t#maximum intensity at respective durations\n", + "D = [15 ,30 ,45 ,60 ,90 ,120]; \t\t\t\t#durations\n", + "#greph is plotted between I and D\n", + "plot(D,I,D,I,\"ro\")\n", + "xlabel(\"Duration\")\n", + "ylabel(\"max rain fall intensity\")\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "15min 30min 45min 60min 90min 120min\n", + "0.00 0.00 0.00 0.00 0.00 0.00\n", + "12.40 0.00 0.00 0.00 0.00 0.00\n", + "9.70 22.10 0.00 0.00 0.00 0.00\n", + "13.00 22.70 35.10 0.00 0.00 0.00\n", + "17.60 30.60 40.30 52.70 0.00 0.00\n", + "11.00 28.60 41.60 51.30 0.00 0.00\n", + "18.20 29.20 46.80 59.80 81.90 0.00\n", + "27.30 45.50 56.50 74.10 96.80 0.00\n", + "14.30 41.60 59.80 70.80 101.40 123.50\n", + "9.10 23.40 50.70 68.90 97.50 120.20\n", + "10.70 19.80 34.10 61.40 90.60 121.20\n", + "2.70 13.40 22.50 36.80 82.30 110.90\n", + "0.00 2.70 13.40 22.50 64.10 93.30\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEg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fB6/1IqEktB8o\nDL7+CFsEU8S5DNcBiCSJNtgX9y5sae3wP6Kywl6XElq7Pwt4CmtS+hKYWOncqtb4r3ysVtixA2HH\nD6F/n5IkVKMQsc7sPxFqbtqM7WdeC1suvUc1n6tICl9jm/sMD/vZD8BJlc4PYP0ZlxFqehoJLIst\nfJHE0l8skq7qY8Nj62I1iOex7VsB3sWSxXpgA9YMVCG8RvAtNux1LbZHxfthP3sOSz77sI2cKmzH\ndsN7G0tE8wjtKR5+7VTbQU5ERERERERERERERERERERERERERERERERERETE3/4/xirmKFaXA2YA\nAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 pg : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "p = [475, 377, 731, 1066, 361, 305, 926, 628, 409, 236, 337, 853]; \t\t\t\t#precipitation value\n", + "N = 12.; \t\t\t\t#total number of years\n", + "T = 6; \t\t\t\t#recurrence interval\n", + "\n", + "# Calculations\n", + "m = N/T;\n", + "\n", + "# Results\n", + "print \"Ranking of storm = %i.\"%(m);\n", + "#hence pick 2nd severest storm\n", + "print \"preciptation value which has recurrence period of 6 years = %i mm.\"%(p[6]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ranking of storm = 2.\n", + "preciptation value which has recurrence period of 6 years = 926 mm.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 pg : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import arange,array,zeros_like\n", + "\t\t\t\t\n", + "#Given\n", + "I = linspace(25,16,10) \t\t\t\t#isohytes\n", + "a = array([407 ,1008, 1522, 1909, 2216, 2460, 2651, 2782, 2910, 2936]); \t\t\t\t#enclosed area\n", + "ia = zeros_like(a)\n", + "ia[0] = 407.;\n", + "\n", + "# Calculations\n", + "for i in range(1,10):\n", + " ia[i] = a[i]-a[i-1];\n", + "r = linspace(25.5,16.5,10)\n", + "rv = r*ia\n", + "\n", + "cv = zeros_like(rv)\n", + "cv[0] = 10378;\n", + "for i in range(1,10):\n", + " cv[i] = cv[i-1]+rv[i];\n", + "\n", + "eud = cv/a\n", + "print \"From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\";\n", + "#graph is plotted between eud and a.\n", + "# Results\n", + "plot(a,eud,a,eud,\"ro\")\n", + "xlabel(\"Area\")\n", + "ylabel(\"mean precipitation depth\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 27, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEPCAYAAACDTflkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPX1//FXTDBREXFBWQSDKSpUZVEWy2IshYBRlp9o\nXSkqLhUTpFZRkC+xStVWXAh1KQU3LO5SSkAJSAqKEJRdQCWKinWrdUMbJDG/P84NWZiEm2TuvXMn\n7+fjMY+585l7Z851kMNnBxEREREREREREREREREREREREREREWkk2gJLgbeATUC2U54D7ADWOo9B\nNVy/HdjgnFPoYZwiIhKDWgJdnOOmwNtAR2Ay8DsX178PHOZNaCIiEg1JHn72p84DYCewBWjjvE5w\n+RluzxMRkQDs59P3pAJdgZXO6yxgPTATaF7DNWXAYuAN4AqP4xMRkRjVFEsEw5zXR2I1jATgdiyR\nRNLKeW4BrAP6ehijiIjUg9fNRU2A+cBC4L4I76cC/wRO2sfnT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QRERERERERERERERERERER\nEREREREREREREREREQ/9f6P8zCLvqVdvAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 pg :133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import array\n", + "\n", + "#24h max. rainfall with return period of 8,15 and 25.\n", + "#24h max rainfall with 40%,24% and 8% probability.\n", + "#probabilty of rainfall of magnitude equal to or exceeding 100 mm.\n", + "\t\t\t\t\n", + "#Given\n", + "N = 20.;\n", + "r = array([142, 126, 116, 108, 102, 95, 92, 88, 86, 82, 80, 78, 76, 73, 71, 69, 68, 66, 65, 64],dtype=float64); \t\t\t\t#rainfall in respective years\n", + "m = linspace(1,20,20) \t\t\t\t#ranking of storm\n", + "p = m*100/(N+1)\n", + "T = 100/p\n", + "\n", + "# Calculations and Results\n", + "#from frequency curve obtained we get\n", + "#Part (a)\n", + "T1 = array([8, 15, 25]);\n", + "r1 = array([119, 134, 149]);\n", + "print \"Tyears Rainfallmm\";\n", + "for i in range(3):\n", + " print \"%i %i\"%(T1[i],r1[i]);\n", + "\n", + "\n", + "#Part (b)\n", + "p1 = [40 ,24, 8];\n", + "r2 = [87, 101, 130];\n", + "print \"probabilitypercent Rainfallmm\";\n", + "for i in range(3):\n", + " print \"%i %i\"%(p1[i],r2[i]);\n", + "\n", + "print \"For rainfall = 100 m.T = 4 years.Probability = 25 percent.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Tyears Rainfallmm\n", + "8 119\n", + "15 134\n", + "25 149\n", + "probabilitypercent Rainfallmm\n", + "40 87\n", + "24 101\n", + "8 130\n", + "For rainfall = 100 m.T = 4 years.Probability = 25 percent.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 pg : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "\n", + "#plot IDF curve for return period of 10,2 and 1 years umath.sing california formula\n", + "\t\t\t\t\n", + "#Given\n", + "t = array([5, 10, 20, 30, 60, 90, 120],dtype=float64); \t\t\t\t#duration\n", + "\t\t\t\t#value of P for respective return period is\n", + "p10 = array([10.6, 14.7, 19.3, 20.8, 25.5, 29, 34.7]); \t\t\t\t#rainfall for T = 10 years\n", + "p2 = array([8.2, 10.3, 13.2, 14.2, 16.6 ,19.4, 21.4]); \t\t\t\t#rainfall for T = 2 years\n", + "p1 = array([3.5, 6.2, 8.9, 10, 13.2, 15, 16.5]); \t\t\t\t#rainfall for T = 1 year\n", + "\n", + "\n", + "# Calculations\n", + "i1 = p10*60/t; \t\t\t\t#intensity of rainfall with return period of 10 years\n", + "i2 = p2*60/t; \t\t\t\t#intensity of rainfall with return period of 2 years\n", + "i3 = p1*60/t; \t\t\t\t#intensity of rainfall with return period of 1 year\n", + "\n", + "# Results\n", + "#graph is plotted between #t and i1 #t and i2 #t and i3\n", + "plot(t,i1)\n", + "plot(t,i2)\n", + "plot(t,i3)\n", + "xlabel(\"Duration\")\n", + "ylabel(\"Intensity\")\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXB/vFvIAlJ2EEEAmGtbK4oW4JIRLAUFVyK2r4q\nikv72v4Ul6rYBai1KnXB9lWKC2BFqbgCLrggUZAdBBSI7JAEwhb2kH1+fzwzySQkk0lyzsycmftz\nXXPNzJmZc56jYe551gM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jm6mEeFfcTBfTF1C4Ou/f1FmUhVAB84n68BrMIpkjQ\nRQe7ACIhogvmi/sgZmlt7x9RcV6P8yhbuz8OeAnTpJQFTKjw3srW+K+4LcprW6HX9hL071NChGoU\nIqYz+9+UNTftxFzPPAqzXHq/Kj7nCYXDmIv7jPZ67QTQpML7XZj+jMGUNT3dDHxTt+KL2Eu/WCRS\nxWOGx8ZgahD/wVy+FeA7TFhsAjZjmoE8vGsERzHDXn/EXKNihddrMzHhk4u5kJNHNuZqeIswQfQx\nZdcU9953uF1BTkRERERERERERERERERERERERERERERERERERMTZ/j9cbU2THLkDTwAAAABJRU5E\nrkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 pg : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "N = 20.;\n", + "m = linspace(1,20,20) \t\t\t\t#rank number\n", + "rd = array([82, 78, 75, 72, 70, 68, 65, 63, 61, 58, 56, 54, 52, 50, 46, 40, 36, 34, 32, 30]); \t\t\t\t#rainfall in decremath.sing order\n", + "\n", + "# Calculations\n", + "ri = rd[::-1]\n", + "T = N/(m-0.5);\n", + "\n", + "# Results\n", + "#from the curves\n", + "print \"maximum rainfall = 79cm for T = 15 years.\";\n", + "print \"minimum rainfall = 31 cm for T = 15 years.\";\n", + "#graph is plotted between rd and T;ri and T\n", + "subplot(121)\n", + "plot(T,rd)\n", + "xlabel(\"Reccurance interval\")\n", + "ylabel(\"rainfall cm\")\n", + "subplot(122)\n", + "plot(T,ri)\n", + "xlabel(\"Reccurance interval\")\n", + "ylabel(\"rainfall cm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "maximum rainfall = 79cm for T = 15 years.\n", + "minimum rainfall = 31 cm for T = 15 years.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 44, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuUXGWZ7/Fvp3Pt3DvkRhJIkwtGEOQOClJyG0WIYjDg\n4CE6Oejg0eBioeAZj7SsYQmcI3KcWWcY5BwBr0QdkJvKRVpGQoRAAggJnYQ0CYZ0x9zT6SSddJ0/\nnl2p6k5V9a6qvevdu/bvs1atunTVW08qT9Wz3/fd+90gIiIiIiIiIiIiIiIiIiIiIiIiIiJSkuuA\n14G/eLcBGoGngFbgSWCMm9BEKqLcFunH8diXZChQj305ZgB3AN/wnnMjcJuT6ETKp9wW8eFy4N6c\n+9/CviCrgIneY5O8+yJxotwW8eF9wFtYF7kBWAL8ANiW85y6PvdF4kC5LTVjYIhtrwJux8ZGO4EV\nwME+z0l7F5E4UW6LlOFW4FrsCzTJe2wyBbrMM2bMyHyJdNEljMsaguM7t5XXulThUlJuDyjlyWWY\n4F0fBXwa+BnwCLDAe3wB8HC+F65du5Z0Oh3I5eabb1ZbaqvXBZvIrXpuK69ro60ox1Zqboc5HATw\nK2Ac0A18GdiB7TGxGFgItAHzQ45BJAzKbakJYReBj+R5bCtwQcjvKxI25bbUhLCHgyIhlUqpLbVV\nc6L62SahraDbc5nbdc7euX9pb3xLJHB1dXXgJv+V1xKqUnM7ET0BERHJT0VARCTBVARERBJMRUBE\nJMFUBEREEkxFQEQkwVQEREQSTEVARCTBVARERBJMRUBEJMFUBEREEkxFQEQkwVQEREQSTEVARCTB\nVARERBJMRUBEJMFUBEREEkxFQEQkwVQEREQSTEVARCTBVARERBJMRUBEJMFUBCRR0mnYvNl1FGbv\nXtiwwXUUknQDXQcgEoYdO2D1aru0tva+rqtzHZ159VVYtAj+/GfXkUi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8E7neQzgANlu6wCyCQbQmXM7BZyPdX33Yls0Q72/dec8\nr4fe/3f53vN+bJVBv4q1n/kCDKD457En5/ZSbMvqCOyzvMV7/F+wraTHsEWvmkuIUUqnvC7cvvIa\nzQnk04V1Q2/FurTrgMu9v9VhE2xg3cVrvdv1WHf1D8BnyHabM13eNmwLBmz970EF3nsUdqq5vcD7\nyI6DFpMvjme8mMd7jzcCR/loK59dXptgW2OFPo++0tiY7vex5Xwzp9Abha06CdlutYRPed2b8tqj\nIpCVO4u/Alvudz5wFbCQ7LK9c73nXId1WV/DuqdzsKS4Ffij9/zM2YF+iG0dZCa4MhNofd/3d9iW\nypvAd7GJrHzPyz1bUL44VgLfwsYrX/Wuc9cr7+/fn9v+L7Dlbl/GJtAKfR592wDrKl9FtssMtoX0\nSy/WzTmvqcbZvZJIeZ2/feW1iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjUjv8PwXoUiDrcApwA\nAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 pg : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t#average evaporation for one week\n", + "\t\t\t\t\n", + "#Given\n", + "w = [12, 5, 2, -3, 1, 6, 11]; \t\t\t\t#water added or taken out\n", + "r = [0, 6, 8, 12, 9, 5, 0]; \t\t\t\t#rainfall\n", + "pan = zeros(7)\n", + "le = zeros(7)\n", + "for i in range(7):\n", + " pan[i] = w[i]+r[i]; \t\t\t\t#Pan evaporation\n", + " le[i] = 0.8*pan[i]; \t\t\t\t#lake evaporation\n", + "s = sum(le)\n", + "\n", + "print \"daily lake evaporationmm:\";\n", + "for i in range(7):\n", + " print \"%.2f\"%(le[i]);\n", + "\n", + "av = s/7;\n", + "av = round(av*100)/100;\n", + "print \"average evaporation for one week = %.2f mm.\"%(av);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "daily lake evaporationmm:\n", + "9.60\n", + "8.80\n", + "8.00\n", + "7.20\n", + "8.00\n", + "8.80\n", + "8.80\n", + "average evaporation for one week = 8.46 mm.\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 pg : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#total depth and volume of evaporation loss\n", + "\t\t\t\t\n", + "#Given\n", + "Rh = 0.4; \t\t\t\t#relative humidity\n", + "A = 4.8; \t\t\t\t#average surface spread of reservior\n", + "v3 = 18.; \t\t\t\t#wind velocity at 3m above ground\n", + "es = 31.81; \t\t\t\t#saturated vapour pressure\n", + "Km = 0.36; \t\t\t\t#for large deep waters\n", + "\n", + "\n", + "# Calculations and Results\n", + "#umath.sing Meyer's formula\n", + "ea = es*Rh;\n", + "v9 = v3*(9./3)**(1./7);\n", + "E = Km*(es-ea)*(1+v9/16);\n", + "d = 7*E;\n", + "v = d*A*100/1000;\n", + "E = round(E*10)/10;\n", + "d = round(d*10)/10;\n", + "v = round(v*100)/100;\n", + "print \"umath.sing Meyers formula:\";\n", + "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n", + "print \"total depth = %.2f mm\"%(d);\n", + "print \"total volume = %.2f hectare-m.\"%(v);\n", + "\n", + "\t\t\t\t#umath.sing Rohwer's formula\n", + "Pa = 760.;\n", + "vdash = (0.6/2)**(1./7)*18;\n", + "E = 0.771*(1.465-0.000732*Pa)*(0.44+0.0733*vdash)*(es-ea);\n", + "d = 7*E;\n", + "v = d*A*100/1000;\n", + "E = round(E*10)/10;\n", + "d = round(d*10)/10;\n", + "v = round(v*10)/10;\n", + "print \"umath.sing Rohwers formula:\";\n", + "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n", + "print \"total depth = %.2f mm\"%(d);\n", + "print \"total volume = %.2f hectare-m.\"%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "umath.sing Meyers formula:\n", + "average evaporation loss from reservior = 15.90 mm/day.\n", + "total depth = 111.40 mm\n", + "total volume = 53.47 hectare-m.\n", + "umath.sing Rohwers formula:\n", + "average evaporation loss from reservior = 20.70 mm/day.\n", + "total depth = 145.20 mm\n", + "total volume = 69.70 hectare-m.\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 pg : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "#plot infiltration capacity curve\n", + "\t\t\t\t\n", + "#Given\n", + "D = 30.; \t\t\t\t#diameter of inside ring of infiltrometer\n", + "A = math.pi*D**2/4;\n", + "V = array([0, 200, 470, 840, 1405, 1840, 2245, 2510, 2745, 2885, 2990, 3130, 3270],dtype=float64); \t\t\t\t#cumulative volume;\n", + "t = array([0, 2, 5, 10, 20, 30, 45, 60, 80, 100, 120, 150, 180],dtype=float64); \t\t\t\t#Time(minutes)\n", + "\n", + "# Calculations and Results\n", + "dt = zeros_like(t)\n", + "\n", + "for i in range(1,13):\n", + " dt[i] = (t[i]-t[i-1])/60;\n", + "\n", + "F = V/A;\n", + "\n", + "Fd = zeros_like(F)\n", + "Fd[0] = F[0];\n", + "for i in range(1,13):\n", + " Fd[i] = F[i]-F[i-1];\n", + "\n", + "ft = Fd/dt \t\t\t\t#infirltration rate\n", + "\n", + "#from the graph\n", + "print \"constant rate of infiltration = 0.40 cm/hr.\";\n", + "avg10 = F[3]*60/10;\n", + "avg30 = F[5]*60/30;\n", + "avg10 = round(avg10*100)/100;\n", + "avg30 = round(avg30*100)/100;\n", + "print \"average rate of infiltration for first 10 min = %.2f cm/hr.\"%(avg10);\n", + "print \"average rate of infiltration for first 30 min = %.2f cm/hr.\"%(avg30);\n", + "#graph is plotted between ft and t\n", + "plot(t,ft)\n", + "xlabel(\"time in mins\")\n", + "ylabel(\"Infiltrtion rate\")\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "constant rate of infiltration = 0.40 cm/hr.\n", + "average rate of infiltration for first 10 min = 7.13 cm/hr.\n", + "average rate of infiltration for first 30 min = 5.21 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEPCAYAAABFpK+YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHk9JREFUeJzt3Xt4VNW9//F3SMItXFNAooJB1CpXQURuyoCA1daqIP5q\n0aLWWu1R9Kj9eemxpD3n8dgLtVjrsUpFpWpbrdXSWgSRgdoiUO5oUIwCKmgvnCoCEgg5f3z3MJOQ\ny2Rm9l57Zj6v55kne257fUmG71qz1tprgYiIiIiIiIiIiIiIiIiIiIiIiIiI5LAbgY3AJu9YRERy\n2AAs6bcFCoFFQF+nEYmICK18PPfJwArgU6AGWApM9rE8ERFJgp+JfxNwJlAKtAc+DxzrY3kiIpKE\nIh/PvRn4HrAQ2AOsBQ75WJ6IiCShIMCy7ga2Aw/GHujbt29tVVVVgCGIiOSEKuCEVN/sZ1cPQA/v\nZ2/gIuDJxCerqqqora0N3W3mzJnOY1BMiikf41JMyd1Ic6KMn109AM8AnwEOAN8APva5PBERaYbf\nif8sn88vIiIt5HdXT1aKRCKuQziCYkqOYkpeGONSTMEIcnC3IbVef5WIiCSpoKAA0sjfavGLiOQZ\nJX4RkTyjxC8ikmeU+EVE8owSv4hInglN4v/kE9i82XUUIiK5LzSJf/VqmD7ddRQiIrkvNPP49++H\n7t1h2zbo2tVxVCIiIZYz8/jbtIFRoyAadR2JiEhuC03iB5gwAV56yXUUIiK5TYlfRCTPhCrxDxoE\nu3bB9u2uIxERyV2hSvytWsHZZ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OOHxQU283oXe2A5nc7zbkKZfLpIeJX4Ju39i\ng6EbscHdxN2s6u9sVf84dn8a8FVsOdtNWB98fc2dqyH1H2/oPcmcd5wX2xpsT9XZjZQnIiIiIiIi\nIiIiIiIiIiIiIiIiIiIiIiIiIiIiYfZ/7AvpCyJ/2BkAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 pg : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#drainage desity\n", + "#form factor\n", + "#channel slope\n", + "#average overland flow length\n", + "\t\t\t\t\n", + "#Given\n", + "A = 82.; \t\t\t\t#area of watershed\n", + "d = 12.6; \t\t\t\t#dismath.tance between outlet and farther most point\n", + "l = 440.; \t\t\t\t#total length of channel\n", + "e = 656.; \t\t\t\t#elevation differnce between outlet and further most point\n", + "\n", + "\n", + "# Calculations\n", + "Dd = l/A;\n", + "ff = A/d**2;\n", + "cs = e/(d*1000);\n", + "lo = 1000/(2*Dd);\n", + "Dd = round(Dd*100)/100;\n", + "ff = round(ff*1000)/1000;\n", + "\n", + "# Results\n", + "print \"drainage desity = %.2f km/square.km.\"%(Dd);\n", + "print \"form factor = %.2f.\"%(ff);\n", + "print \"channel slope = %.2f.\"%(cs);\n", + "print \"average overland flow length = %i m.\"%(lo);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drainage desity = 5.37 km/square.km.\n", + "form factor = 0.52.\n", + "channel slope = 0.05.\n", + "average overland flow length = 93 m.\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 pg : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#compute fi and W index\n", + "\t\t\t\t\n", + "#Given\n", + "R = 3.6; \t\t\t\t#surface runoff\n", + "r = [0, 1.3, 2.8, 4.1, 3.9, 2.8, 2.0, 1.8, 0.9]; \t\t\t\t#rainfall at respective time\n", + "t = 4.; \t\t\t\t#total time\n", + "s = sum(r[2:]);\n", + "\n", + "# Calculations and Results\n", + "fi = (s-R*2)/6;\n", + "#math.since fi >1.3 and <1.8\n", + "print \"fi index = %.2f cm.\"%(fi);\n", + "print \"computations are correct.\";\n", + "\n", + "s = sum(r);\n", + "P = s/2;\n", + "Sr = 0.;\n", + "W = (P-R-Sr)/t;\n", + "print \"W index = %.2f cm/hr.\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 1.85 cm.\n", + "computations are correct.\n", + "W index = 1.55 cm/hr.\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 pg : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\t\t\t\t\n", + "#Given\n", + "T = linspace(1,9,9) \t\t\t\t#time from start\n", + "r = array([0.7, 1.4, 2.4, 3.7, 2.9, 2.6, 1.7, 0.8, 0.5]); \t\t\t\t#increamental rainfall\n", + "R = 9.3; \t\t\t\t#total run-off\n", + "s = sum(r)\n", + "\n", + "ti = s-R;\n", + "#first trial\n", + "tr = 9.; \t\t\t\t#assumed\n", + "fi1 = ti/tr;\n", + "#this makes 1st,8th and 9th hour ineffective\n", + "\n", + "#second trial\n", + "tr = 6.;\n", + "ti = s-R-r[0]-r[7]-r[8];\n", + "fi = ti/tr;\n", + "P = zeros_like(r)\n", + "for i in range(9):\n", + " P[i] = r[i]-fi;\n", + " if (P[i]<0):\n", + " P[i] = 0;\n", + " \n", + "print \"Timeh rainfall excess.\";\n", + "for i in range(9):\n", + " print \"%.2f %.2f\"%(T[i],P[i]);\n", + "\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n", + "print \"time of rainfall excess = %i hours..\"%(tr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Timeh rainfall excess.\n", + "1.00 0.00\n", + "2.00 0.50\n", + "3.00 1.50\n", + "4.00 2.80\n", + "5.00 2.00\n", + "6.00 1.70\n", + "7.00 0.80\n", + "8.00 0.00\n", + "9.00 0.00\n", + "fi index = 0.90 cm/hr.\n", + "time of rainfall excess = 6 hours..\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 pg : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "P = array([72.2, 70.1, 73.3, 42.5, 81.3, 50.6, 52.9, 59.4, 60.3, 64.3, 68.8, 56.7, 77.2, 40.5, 44.1, 65.5]); \t\t\t\t#Precipitation\n", + "R = array([24.1, 22.7, 25.6, 11.3, 28.4, 12.7, 13.4, 15.7, 16.2, 17.7, 19.2, 14.9, 25.4, 10.6, 11.7, 17.9]); \t\t\t\t#runoff\n", + "\n", + "# Calculations\n", + "Ps = P**2\n", + "Rs = R**2;\n", + "PR = P*R;\n", + "\n", + "s = sum(Ps)\n", + "t = sum(Rs)\n", + "u = sum(PR)\n", + "q = sum(P)\n", + "w = sum(R)\n", + "N = 16.;\n", + "a = (N*u-q*w)/(N*s-q**2);\n", + "b = (w-a*q)/N;\n", + "b = round(b*1000)/1000;\n", + "a = round(a*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Equation is:%.4f P %.3f.\"%(a,b);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:0.4375 P -8.823.\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 pg : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "\n", + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "A = 8.6; \t\t\t\t#catchment area\n", + "T = linspace(0,4,9) \t\t\t\t#time\n", + "r = array([0, 0.4, 1.1, 2.3, 3.8, 4.8, 5.6, 6.2, 6.7]); \t\t\t\t#accumulated rainfall\n", + "fi = 0.4; \t\t\t\t#fi index\n", + "dt = 0.5; \t\t\t\t#time interval\n", + "\n", + "# Calculations and Results\n", + "d = zeros_like(r)\n", + "\n", + "for i in range(1,9):\n", + " d[i] = r[i]-r[i-1]; \t\t\t\t#accumulated rainfall\n", + "\n", + "print \"Intensity of effective Rainfall:\";\n", + "I = zeros_like(r)\n", + "p = zeros_like(r)\n", + "s = 0;\n", + "for i in range(1,9):\n", + " p[i] = d[i]-fi; \t\t\t\t#effective rainfall\n", + " I[i] = p[i]/dt; \t\t\t\t#Intensity of effective Rainfall\n", + " s = s+I[i];\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "#graph is plotted between I and T\n", + "run = s*dt;\n", + "V = run*A*10000;\n", + "print \"Volume of direct run-off = %.2f cubic metre.\"%(V);\n", + "plot(T,I)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Intensity of effective Rainfall:\n", + "0.00\n", + "0.60\n", + "1.60\n", + "2.20\n", + "1.20\n", + "0.80\n", + "0.40\n", + "0.20\n", + "Volume of direct run-off = 301000.00 cubic metre.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHzVJREFUeJzt3Xl4VGWaxuFf2EWglUFRQQ0C2uLY7mxiU6Ki0goOiIA6\nTrthYyOOCLTSdot0jwIqS0BAZJF9kcUGBEXUsIxAgyCLEmRTXFimQUBAhJCaP95CMCSpSlJV3zmn\nnvu66kqRO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mBV5PFc0pKdMBIbt1hbwDWu7yNEzxnC/b0EOB/4CPgM\nWAd0yuc61/c0lpwh3N/TctjU50+Bz4GX8rnO9f2MJWcI9/cTbF3RKmBWPq87vZclse6ZdKA00fvo\n65H8PvpYMoaAmUlNdaobsP+B+RVN1/fxuGg5Q7i/lwDnAFdGnlfAuhq99m8TYssZwhv3tHzkYyns\nXjXK9boX7idEzxnCG/ezMzCevLMU+l7Ge28ZPyx6iiUjJHev+7wsAr4v4HXX9/G4aDnB/b0E2IH9\nIAc4AKwHcm8H54V7GktO8MY9PRT5WAZrNO3J9boX7idEzwnu72d1rIAPzydLoe9lvIu7HxY9xZIx\nDDTEfv2Zg2294DWu72OsvHgv07HfNpbl+rzX7mk6eef0yj0tgf0g2ol1JX2e63Wv3M9oOb1wP/sB\nXbGp5nkp9L2Md3GP66KnBInla63E+j6vAAYCbyc0UdG5vI+x8tq9rABMBZ7EWsa5eeWeFpTTK/c0\nB+tCqg78FuveyM0L9zNaTtf38w5gF9bfXtBvEIW6l/Eu7t9iN+m487GfMAVdUz3yuWSJJeMPnPhV\nbi7WN1858dEKxfV9jJWX7mVpYBowjry/gb1yT6Pl9NI9BRuMfAe4NtfnvXI/j8svp+v72RDrdtkK\nTASaAGNyXeP8Xvph0VMsGaty4qdkXax/3oV0YhtQdb14LJ38c3rlXqZh3zD9CrjGC/c0lpxeuKdV\nsH5fgNOAhcBNua7xwv2MJacX7udxjcl7towX7qUvFj1Fy/hHbBrap8DH2M1MtonAd8ARrK/tIbx3\nHyF6Ti/cS7AZEjmRHMenvN2O9+5pLDm9cE8vx7ozPgXWYP3F4L37GUtOL9zP4xpzYraM1+6liIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiMgJ/w/tPDqafh5U1AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 pg : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "\n", + "#total rainfall\n", + "#total rainfall excess\n", + "#W index\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([3.5, 6.5, 8.5 ,7.8, 6.4, 4, 4, 6]); \t\t\t\t#rainfall intensity\n", + "T = linspace(0,240,8) \t\t\t\t#time\n", + "dt = 30.; \t\t\t\t#time interval\n", + "\n", + "# Calculations\n", + "s = sum(r);\n", + "P = s*dt/60;\n", + "Pe = ((6.5-4.5)+(8.5-4.5)+(7.8-4.5)+(6.4-4.5)+(6-4.5))*dt/60; \t\t\t\t#area of graph above r = 4.5.\n", + "w = (P-Pe)/4;\n", + "\n", + "# Results\n", + "print \"total rainfall = %.2f cm.\"%(P);\n", + "print \"total rainfall excess = %.2f cm.\"%(Pe);\n", + "print \"W index = %.2f cm/hr.\"%(w);\n", + "plot(T,r)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "total rainfall = 23.35 cm.\n", + "total rainfall excess = 6.35 cm.\n", + "W index = 4.25 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHxZJREFUeJzt3Xm8lnP+x/HXaVPJtFGWpCYzohQmhmo4spU1MYZfE2KE\nUESWmdSRmaKSbVpVKI1CpJCU3FKJUqnTokUpabO2aD3dvz8+5zhHqrNd9/W9lvfz8TiPs9y3+/qc\ny9XnfO/P9f1+viAiIiIiIiIiIiIiIiIiIiIiIiIiMdcRWABkZn8tIiIBVx9L3GWBksAkoI7TiERE\nhBL5PF4X+ATYAWQBHwKtUh2UiIgcXH7JOxP4C1AFKA9cAtRIdVAiInJwpfJ5fAnwOPAesA2YC+xN\ndVAiInJwaYV8fg9gNTAw5wd16tRJrlixwtOgRER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7\nAKuA3cAo4IpivF5Y7Ttj53LsHgHZn1v6G45vPgJ+2OdnB/rdrwBexq6TVdh1c0bqQ/TN/s4F7H82\nV9TPxXosCQFsBRYDxxC/a+NA5wE8ui6Kk7yPAdbk+f7rPMHFRRKYDMwGbsn+WXXsLTTZn6s7iMuV\nA/3uR2PXR464XCt3AZ8DQ8ktE8TpXNTC3pF8QryvjVrYeZiZ/b0n10VxkneyGP9tVDTB/qe0AO7A\n3j7nlSS+5ym/3z3q52UAUBt767wOeOIgz43iuagAjAE6Alv2eSxO10YF4DXsPGzFw+uiOMl7LVaU\nz3Esv/7LEQfrsj9vAt7A3uZswOpdYNMsNzqIy5UD/e77Xis1sn8WZRvJTVJDyH0LHIdzURpL3COA\nsdk/i+O1kXMeXiL3PATiuiiFrRCqhTWsitsNy/LAYdlfHwpMx+4Q9yJ35s2DRPeGJdj/+31vWO7v\nd8+5GVMGG3WsoGire4OsFr8+F0fl+foe4H/ZX0f9XKQBw4En9/l53K6NA52HwFwXLbC7qMuxaS5x\nUhs72fOwqUA5v38VrA4e9amCLwPfALuwex9tOfjv/k/sOlkCXORrpKm377m4CfuHOx+rbY7l1/c+\nonwummK9kOaROx2uOfG7NvZ3HloQ3+tCREREREREREREREREREREREREREREREREJHj+HwzG1UV6\no0m7AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 pg : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros_like\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([0, 8, 22, 74, 92, 105, 114, 120],dtype=float64); \t\t\t\t#raccumulated rainfall\n", + "T = array([0, 2, 4, 6, 8, 10, 12, 14],dtype=float64); \t\t\t\t#time for start of rainfall\n", + "V = 2e6; \t\t\t\t#volume of run-off\n", + "A = 40.; \t\t\t\t#catchment area\n", + "tr = 14.; \t\t\t\t#duration of rainfall\n", + "\n", + "# Calculations\n", + "d = V*1000/(40*1000000);\n", + "\n", + "l = r[7]-d;\n", + "W = l/tr;\n", + "I = zeros_like(r)\n", + "for i in range(1,8):\n", + " I[i] = r[i]-r[i-1]; \t\t\t\t#incremental rainfall\n", + "\n", + "\n", + "#rainfall excess is available in 4 time intervals of 2 hrs\n", + "tre = 8.;\n", + "fi = (l-I[1]-I[6]-I[7])/tre;\n", + "fi = round(fi*100)/100;\n", + "\n", + "# Results\n", + "print \"fi index = %.2f mm/hr.\"%(fi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 5.88 mm/hr.\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 pg : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "#Given\n", + "r = array([2.0 ,2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n", + "R = 25.5;\n", + "\n", + "# Calculations\n", + "s = sum(r)\n", + "tf = s-R;\n", + "af = tf/12;\n", + "#rainfall is less than average infiltration in1st,2nd,11th and 12th hours\n", + "\n", + "f = (tf-r[0]-r[1]-r[10]-r[11])/8;\n", + "f = round(f*10)/10;\n", + "\n", + "# Results\n", + "print \"average infiltration index = %d cm/hour.\"%(f);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average infiltration index = 3 cm/hour.\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 pg : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,zeros_like,array\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([2.0, 2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n", + "A1 = 20.;\n", + "A2 = 40.;\n", + "A3 = 60.;\n", + "\n", + "# Calculations and Results\n", + "A = A1+A2+A3;\n", + "fi1 = 7.6;\n", + "fi2 = 3.8;\n", + "fi3 = 1.0;\n", + "R1 = zeros_like(r)\n", + "R2 = zeros_like(r)\n", + "R3 = zeros_like(r)\n", + "for i in range(12):\n", + " R1[i] = r[i]-fi1; \t\t\t\t#rainfall excess\n", + " R2[i] = r[i]-fi2;\n", + " R3[i] = r[i]-fi3;\n", + " if (R1[i]<0):\n", + " R1[i] = 0;\n", + " if (R2[i]<0):\n", + " R2[i] = 0;\n", + " if (R3[i]<0):\n", + " R3[i] = 0;\n", + "\n", + "print \"average depth of hourly rainfall excesscm/hr\";\n", + "a1 = zeros(12)\n", + "a2 = zeros(12)\n", + "a3 = zeros(12)\n", + "T = zeros(12)\n", + "for i in range(12):\n", + " a1[i] = R1[i]*A1/A; \t\t\t\t#average rainfall excess\n", + " a2[i] = R2[i]*A2/A;\n", + " a3[i] = R3[i]*A3/A;\n", + " T[i] = a1[i]+a2[i]+a3[i]; \t\t\t\t#total hourly rainfall excess\n", + " T[i] = round(T[i]*100)/100;\n", + " print \"%.2f\"%(T[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average depth of hourly rainfall excesscm/hr\n", + "0.50\n", + "0.75\n", + "4.57\n", + "1.40\n", + "7.57\n", + "2.40\n", + "4.07\n", + "6.97\n", + "3.57\n", + "1.40\n", + "0.20\n", + "0.20\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 pg : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#derive the unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "A = 92.; \t\t\t\t#area of drainage bamath.sin\n", + "t = array([6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 4, 6, 8, 10, 12, 14, 16],dtype=float64); \t\t\t\t#time\n", + "r = array([10.6, 9.7, 107.8, 175.6, 193.9, 150.3, 126.2, 106.9, 90, 72.8, 58.2, 48, 36.2, 28.4, 20.2, 14, 10.2, 10.4]); \t\t\t\t#total run-off\n", + "B = array([10.6, 9.7, 9.73, 9.77, 9.8, 9.83, 9.87, 9.9, 9.93, 9.97, 10, 10.03, 10.07, 10.10, 10.13, 10.16, 10.20, 10.40]); \t\t\t\t#base flow\n", + "s = 0;\n", + "\n", + "# Calculations and Results\n", + "d = r - B\n", + "s = sum(d)\n", + "\n", + "n = 0.36*s*2/A;\n", + "print \"ordinates of unit hydrograph:\";\n", + "u = zeros(18)\n", + "for i in range(18):\n", + " u[i] = d[i]/n; \t\t\t\t#ordinates of unit hydrograph\n", + " u[i] = round(u[i]*100)/100;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "print \"Hydograph is 4-hr unit hydrograph\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of unit hydrograph:\n", + "0.00\n", + "0.00\n", + "11.50\n", + "19.45\n", + "21.60\n", + "16.48\n", + "13.65\n", + "11.38\n", + "9.39\n", + "7.37\n", + "5.65\n", + "4.45\n", + "3.07\n", + "2.15\n", + "1.18\n", + "0.45\n", + "0.00\n", + "0.00\n", + "Hydograph is 4-hr unit hydrograph\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27 pg : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "A = 316.; \t\t\t\t#drainage area\n", + "B = 17.; \t\t\t\t#base flow\n", + "t = 6.;\n", + "O = [17.0, 113.2, 254.5, 198.0, 150.0, 113.2, 87.7, 67.9, 53.8, 42.5, 31.1, 22.6, 17.0]; \t\t\t\t#ordinates of storm hydrograph\n", + "Or = zeros(13)\n", + "Oh = zeros(13)\n", + "for i in range(13): \n", + " Or[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + " Oh[i] = Or[i]/6.477; \t\t\t\t#ordinates of unit hydrograph\n", + "\n", + "\n", + "s = sum(Or);\n", + "re = s*60*60*t/(A*10000);\n", + "re = round(re*1000)/1000;\n", + "\n", + "# Results\n", + "print \"rainfall excess = %.2f cm.\"%(re);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rainfall excess = 6.48 cm.\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 pg : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 2.5; \t\t\t\t#infiltration index\n", + "B = 10; \t\t\t\t#Base flow\n", + "O = [0, 110, 365, 500, 390, 310, 250, 235, 175, 130, 95, 65, 40, 22, 10, 0, 0, 0]; \t\t\t\t#ordinates of unit hydrograph\n", + "R1 = 2;R2 = 6.75;R3 = 3.75;\n", + "r1 = (R1*10-(fi*3)-5)/10; \t\t\t\t#rainfall excess in first three hour\n", + "r2 = (R2*10-(fi*3))/10; \t\t\t\t#rainfall excess in second three hour\n", + "r3 = (R3*10-(fi*3))/10; \t\t\t\t#rainfall excess in third three hour\n", + "\n", + "s1 = zeros(18)\n", + "for i in range(18):\n", + " s1[i] = r1*O[i]; \n", + "s2 = zeros(18)\n", + "for i in range(1,18):\n", + " s2[i] = r2*O[i-1];\n", + "s3 = zeros(18)\n", + "for i in range(2,18):\n", + " s3[i] = r3*O[i-2];\n", + " \t\t\t\t#surface run-off from rainfall excess during succesive unit periods\n", + "print \"ordinates of storm hydrograph\";\n", + "T = zeros(18)\n", + "t = zeros(18)\n", + "for i in range(18):\n", + " T[i] = s1[i]+s2[i]+s3[i];\n", + " t[i] = T[i]+B;\n", + " t[i] = round(t[i]*10)/10;\n", + " print \"%.2f\"%(t[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of storm hydrograph\n", + "10.00\n", + "92.50\n", + "943.80\n", + "2905.00\n", + "4397.50\n", + "4082.50\n", + "3227.50\n", + "2616.30\n", + "2301.30\n", + "1862.50\n", + "1386.30\n", + "1018.80\n", + "715.00\n", + "461.50\n", + "269.50\n", + "136.00\n", + "40.00\n", + "10.00\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.29 pg : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "\n", + "#derive and plot 6 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "A = 103.4; \t\t\t\t#area of bamath.sin\n", + "t = linspace(0,36,9); \t\t\t\t#time\n", + "q = [0, 21, 80, 82, 189, 123, 184, 87, 55.5, 25.25, 9, 6, 0]; \t\t\t\t#flow\n", + "print \"ordinates of unit hydrograph are:\";\n", + "u = zeros(9)\n", + "u[0] = 0;\n", + "u[1] = q[1]/2.;\n", + "u[2] = (q[2]-4*u[0])/2;\n", + "u[3] = (q[3]-4*u[1])/2;\n", + "for i in range(4,9):\n", + " u[i] = (q[i]-3*u[i-4]-4*u[i-2])/2; \t\t\t\t#ordinates of unit hydrograph\n", + "\n", + "for i in range(9):\n", + " print \"%.2f\"%(u[i]);\n", + "print \"The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\";\n", + "#graph is plotted between u and t.\n", + "plot(t,u)\n", + "xlabel(\"Time in hours\")\n", + "ylabel(\"Discharge\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "ordinates of unit hydrograph are:\n", + "0.00\n", + "10.50\n", + "40.00\n", + "20.00\n", + "14.50\n", + "5.75\n", + "3.00\n", + "2.00\n", + "0.00\n", + "The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 78, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFOW1x/HvwICyiMgSJCyCEpC4gaKAEm1QAgoiu3u4\nUROXqHFLYmKMk2siiVeNXqOSq2Lc44IiqKigtooIgmyCCoKiQNgUIWwizPT941Q7zdgz0z3T1W9V\n9e/zPP1Md/VSx3LoM+92XhAREREREREREREREREREREREREREclaXWAeMNl73AyYCiwFXgGaOopL\nRKTg1cnDOX4JfAAkvMfXYkmgM/Cq91hERCKoLTAN6Et5S+AjoJV3f3/vsYiIRNBTQHfgBMqTwFcp\nzxdVeCwiInnkZ3fQYGA9Nh5QVMlrEpR3E4mISJ4V+/jZxwJDgFOAvYEmwMPAOqwbaC3QGksU33HQ\nQQclli9f7mN4IiKRtBzolOmL/WwJ/A5oB3QEzgBeA84FJgFjvNeMASame/Py5ctJJBKBv91www1O\nz3/QQQlatkzw6qvBjTEs11JxKs4oxAkclM0XdT5mByUlu33+AvTHpoj28x5LDaxbB19+CVddBU88\n4ToaEQmjfCWBN7CuIYCNwEnYFNEfA5vyFEPkzJgBvXvDGWfAM8/A7t2uIxKRsMlnSyCSYrGYs3PP\nmAHHHQcdOsCBB8Jrr6V/ncsYs6E4c0tx5lZY4sxWZbN2giDh9W9JJY49Fv78Z+jbF269FT78EO67\nz3VUIuJSUVERZPHdriQQUl9/Dc2bw/r10KgRfP45HHkkrFkD9eq5jk5EXMk2Cag7KKTeew+6drUE\nANC+PXTu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9cRqSV1B0nU\nZLL93xKgJdDLe1wP676p6edVJeGdrwNwkHfsXOAN7/4KrEsKrHuqsvN2xFoTdwLPYZUuRWpNSUDC\nLLW/Pt19+O5f4QmsdTAS+Cvl5Zd7V3OOTI5XtovTTqyk91PYwPBuYJz33B+xbqHZ3vHK/jtGY91b\n87CurIcqiUtEREREREREREREREREREREREREREREREREREQKzf8DeqePJCpdlVkAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.30 pg : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\n", + "\n", + "#derive ordinates of 6 hrs unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "R = [0, 1, 2.7, 5, 8, 9.8, 9, 7.5, 6.3, 5, 4, 2.9, 2.1, 1.3 ,0.5, 0, 0, 0, 0, 0]; \t\t\t\t#2hrs unit hydrograph\n", + "print \"ordinates of 6 hrs unit hydrograph\";\n", + "O1 = zeros(20)\n", + "for i in range(18):\n", + " O1[i+2] = R[i];\n", + "O2 = zeros(20)\n", + "for i in range(16):\n", + " O2[i+4] = R[i];\n", + "S = zeros(20)\n", + "f = zeros(20)#offset unit hydrograph\n", + "for i in range(20):\n", + " S[i] = O1[i]+O2[i]+R[i]; \t\t\t\t#sum\n", + " f[i] = S[i]/3; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n", + " f[i] = round(f[i]*10)/10;\n", + " print \"%.2f\"%(f[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of 6 hrs unit hydrograph\n", + "0.00\n", + "0.30\n", + "0.90\n", + "2.00\n", + "3.60\n", + "5.30\n", + "6.60\n", + "7.40\n", + "7.80\n", + "7.40\n", + "6.40\n", + "5.10\n", + "4.10\n", + "3.10\n", + "2.20\n", + "1.40\n", + "0.90\n", + "0.40\n", + "0.20\n", + "0.00\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31 pg : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "\t\t\t\t\n", + "#Given\n", + "t = linspace(0,45,16) \t\t\t\t#time\n", + "O = [0 ,9, 20, 35, 49, 43, 35, 28, 22, 17, 12, 9, 6, 3, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n", + "\n", + "# Calculations and Results\n", + "of = zeros(16)\n", + "for i in range(2,16):\n", + " of[i] = O[i-2]+of[i-2]; \t\t\t\t#offset ordinate\n", + "\n", + "s = zeros(16)\n", + "for i in range(16):\n", + " s[i] = O[i]+of[i]; \t\t\t\t#ordinate of s-curve\n", + "\n", + "of1 = zeros(16)\n", + "for i in range(3,16):\n", + " of1[i] = s[i-3]; \t\t\t\t#offset of s-curve\n", + "\n", + "print \"ordinates of 9 hrs unit hydrograph:\";\n", + "y = zeros(16)\n", + "u = zeros(16)\n", + "for i in range(16):\n", + " y[i] = s[i]-of1[i];\n", + " u[i] = 2*y[i]/3; \t\t\t\t#ordinate of 9 hrs unit hydrograph\n", + " u[i] = round(u[i]*10)/10;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of 9 hrs unit hydrograph:\n", + "0.00\n", + "6.00\n", + "13.30\n", + "29.30\n", + "40.00\n", + "44.70\n", + "40.00\n", + "30.70\n", + "26.00\n", + "18.70\n", + "15.30\n", + "10.00\n", + "8.00\n", + "4.00\n", + "2.00\n", + "0.00\n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.32 pg : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,linspace\n", + "\n", + "\n", + "#california method\n", + "#Hazens method\n", + "#gumbels method\n", + "\t\t\t\t\n", + "#Given\n", + "q = [9200, 7800, 6600, 5800, 5260, 4980, 4525, 3810, 3630, 3250, 3110, 3090, 2380, 2390, 1723]; \t\t\t\t#Discharge arranged in decreamath.sing order\n", + "N = 15;\n", + "C = 0.3;\n", + "m = linspace(1,15,15)\n", + "C = [0.3, 0.44, 0.52, 0.57, 0.61, 0.66, 0.7, 0.74, 0.78, 0.82, 0.86, 0.88, 0.94, 0.96, 1]; \t\t\t\t#from table 4.25\n", + "print \"California Hazen Gumbel\";\n", + "Ca = zeros(15)\n", + "H = zeros(15)\n", + "G = zeros(15)\n", + "Ca = zeros(15)\n", + "G = zeros(15)\n", + "\n", + "for i in range(15):\n", + " Ca[i] = N/m[i];\n", + " H[i] = 2*N/(2*m[i]-1);\n", + " G[i] = N/(m[i]+C[i]-1);\n", + " Ca[i] = round(Ca[i]*100)/100;\n", + " G[i] = round(G[i]*100)/100;\n", + " H[i] = round(H[i]*100)/100;\n", + " print \"%.2f %.2f %.2f\"%(Ca[i],H[i],G[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "California Hazen Gumbel\n", + "15.00 30.00 50.00\n", + "7.50 10.00 10.42\n", + "5.00 6.00 5.95\n", + "3.75 4.29 4.20\n", + "3.00 3.33 3.25\n", + "2.50 2.73 2.65\n", + "2.14 2.31 2.24\n", + "1.88 2.00 1.94\n", + "1.67 1.76 1.71\n", + "1.50 1.58 1.53\n", + "1.36 1.43 1.38\n", + "1.25 1.30 1.26\n", + "1.15 1.20 1.16\n", + "1.07 1.11 1.07\n", + "1.00 1.03 1.00\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.33 pg : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 40.;\n", + "T2 = 80.; \t\t\t\t#Return period\n", + "F1 = 27000.;\n", + "F2 = 31000.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y80 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y40 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y80-y40);\n", + "T = 240.;\n", + "y240 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x240 = F2+(y240-y80)*y;\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %i cumec.\"%(x240);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 37306 cumec.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.34 pg : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "N = 40;\n", + "Sn = 1.1413;\n", + "yn = 0.5436; \t\t\t\t#from table 4.21 (a) and(b)\n", + "q = [1330, 1095, 1030, 980, 975, 950, 945, 940, 925, 855, 853, 840, 835, 825, 810, 795, 756, 710, 708, 705, 700, 670, 625, 620, 610, 605, 595, 585, 570, 550, 530, 505, 500, 495, 485, 465, 460, 420, 390, 380]; \t\t\t\t#discharge\n", + "s = sum(q)\n", + "xavg = s/N;\n", + "w = 0;\n", + "\n", + "# Calculations\n", + "t = zeros(40)\n", + "for i in range(40):\n", + " t[i] = (q[i]-xavg)**2;\n", + " w = w+t[i];\n", + "\n", + "sigma = (w/(N-1))**0.5;\n", + "N = 10.;\n", + "y10 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K10 = (y10-yn)/Sn;\n", + "x10 = xavg+K10*sigma;\n", + "N = 20.;\n", + "y20 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K20 = (y20-yn)/Sn;\n", + "x20 = xavg+K20*sigma;\n", + "N = 5.;\n", + "y5 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K5 = (y5-yn)/Sn;\n", + "x5 = xavg+K5*sigma;\n", + "\n", + "T = 100.;\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "K100 = (y100-yn)/Sn;\n", + "x100 = xavg+K100*sigma;\n", + "\n", + "T = 200.;\n", + "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "K200 = (y200-yn)/Sn;\n", + "x200 = xavg+K200*sigma;\n", + "x100 = round(x100);\n", + "\n", + "# Results\n", + "print \"For T = 100 years:flood discharge = %.2f cumecs.\\\n", + "\\nFor T = 200 years:flood discharge = %.f cumecs.\"%(x100,x200);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For T = 100 years:flood discharge = 1487.00 cumecs.\n", + "For T = 200 years:flood discharge = 1620 cumecs.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.35 pg : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "sigma = 1.1413; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "yn = 0.5436;\n", + "T = 50.;\n", + "\n", + "# Calculations\n", + "y50 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K50 = (y50-yn)/sigma;\n", + "T = 100.;\n", + "y100 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K100 = (y100-yn)/sigma;\n", + "x50 = 878; x100 = 970; \t\t\t\t\n", + "#Given peak flood\n", + "A = [[K50, 1],[K100, 1]];\n", + "B = [x50,x100];\n", + "C = solve(A,B)#A\\B;\n", + "xavg = C[1];\n", + "sigmad = C[0];\n", + "T = 200.;\n", + "y200 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K200 = (y200-yn)/sigma;\n", + "x200 = xavg+K200*sigmad;\n", + "x200 = round(x200);\n", + "\n", + "# Results\n", + "print \"200 year flood for stream = %.2f cumecs.\"%(x200);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "200 year flood for stream = 1062.00 cumecs.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.36 pg : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#risk of failure of cofferdam\n", + "#return period\n", + "\n", + "#Given\n", + "T = 30.; \t\t\t\t#deign for period\n", + "n = 6.; \t\t\t\t#period of construction\n", + "\n", + "# Calculations\n", + "R = (1-(1-(1/T))**n)*100;\n", + "R1 = 0.1; \t\t\t\t#reduced risk\n", + "T1 = 1./(1-(1-R1)**(1./6));\n", + "R = round(R*10)/10;\n", + "T1 = round(T1*100)/100;\n", + "\n", + "# Results\n", + "print \"risk of failure of cofferdam = %.2f percent.\"%(R);\n", + "print \"return period = %.2f years.\"%(T1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "risk of failure of cofferdam = 18.40 percent.\n", + "return period = 57.45 years.\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.37 pg : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#probability of excedence\n", + "#probability of flood magnitude occuring at:\n", + "#at least once in 10 years\n", + "#two times in 10 succesive years\n", + "#once in 10 succesive years\n", + "\n", + "#Given\n", + "T = 40.; \t\t\t\t#return period\n", + "P = 1./T;\n", + "n = 10;\n", + "Rsk = 1.-(1-P)**n;\n", + "s = 1.;\n", + "t = 1.;\n", + "for i in range(1,n+1): \n", + " s = s*i;\n", + "\n", + "for i in range(1,n-1):\n", + " t = t*i;\n", + "\n", + "P2n = s*P**2*(1-P)**8/(t*2);\n", + "P1n = n*P*(1-P)**(n-1);\n", + "Rsk = round(Rsk*1000)/1000;\n", + "P2n = round(P2n*10000)/10000;\n", + "P1n = round(P1n*1000)/1000;\n", + "\n", + "# Results\n", + "print \"probability of excedence = %.2f.\"%(P);\n", + "print \"probability of flood magnitude occuring at least once in 10 years = %.2f\"%(Rsk);\n", + "print \"probability of flood magnitude occuring at two times in 10 succesive years = %.2f\"%(P2n);\n", + "print \"probability of flood magnitude occuring at once in 10 succesive years = %.2f\"%(P1n);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of excedence = 0.03.\n", + "probability of flood magnitude occuring at least once in 10 years = 0.22\n", + "probability of flood magnitude occuring at two times in 10 succesive years = 0.02\n", + "probability of flood magnitude occuring at once in 10 succesive years = 0.20\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.38 pg : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "C1 = 0.22;C2 = 0.12;C3 = 0.32; \t\t\t\t#run-off coefficient\n", + "A1 = 3.2;A2 = 4.8;A3 = 1.8; \n", + "L = 2.4; \t\t\t\t#length of water course\n", + "H = 30; \t\t\t\t#fall\n", + "T = 30; \t\t\t\t#frequency\n", + "\n", + "# Calculations\n", + "t = 60*0.000323*(L*1000)**0.77*(H/(L*1000))**(-0.385);\n", + "i = 78*T**0.22/(t+12)**0.45;\n", + "q = 2.778*i*(C1*A1+C2*A2+C3*A3);\n", + "q = round(q*10)/10;\n", + "\n", + "# Results\n", + "print \"peak rate of run off = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak rate of run off = 141.20 cumecs.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.39 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "T = 30; \t\t\t\t#return period\n", + "A = 2.4; \t\t\t\t#area of watershed\n", + "s = 1./200; \t\t\t\t#slope oof catchment\n", + "L = 1.8; \t\t\t\t#length of travel of water\n", + "C = 0.25; \t\t\t\t#average run-off coefficient\n", + "r = [2.5, 3.8, 4.8, 5.9, 6.7, 7.4, 8.4, 8.7, 9.2]; \t\t\t\t#rmath.sinfall depth\n", + "\n", + "# Calculations\n", + "t = 60*0.000323*(L*1000)**0.77*(s)**(-0.385); \n", + "rmax = r[6]+(r[7]-r[6])*7.84/10;\n", + "i = rmax*60/t;\n", + "q = 2.778*C*A*i;\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"peak flow rate = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak flow rate = 18.05 cumecs.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.40 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "pA = 75.; \t\t\t\t#precipitation at A\n", + "pB = 58; \t\t\t\t#precpitation at B\n", + "pC = 47; \t\t\t\t#precipitation at C\n", + "nA = 826; \t\t\t\t#normal precipitation at A\n", + "nB = 618; \t\t\t\t#normal precipitation at B\n", + "nC = 482; \t\t\t\t#normal precipitation at C\n", + "nX = 757; \t\t\t\t#normal precipitation at X\n", + "\n", + "\n", + "# Calculations\n", + "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3.;\n", + "pX = round(pX*10)/10;\n", + "\n", + "# Results\n", + "print \"precipitation at x = %.2f cm.\"%(pX);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at x = 70.90 cm.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.41 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "p = [41, 51, 32, 55, 50, 68]; \t\t\t\t#rain guage readings at respective stations\n", + "s = sum(p)\n", + "pavg = s/6;\n", + "u = 0;\n", + "for i in range(5):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "# Calculations\n", + "sx = (u/5)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/8)**2;\n", + "N = round(N*100)/100;\n", + "\n", + "# Results\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 49.00 cm.\n", + "total stations needed = 5.08.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.42 pg : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "a = 4; \t\t\t\t#dimension of plot sides\n", + "P1 = 4.8;P2 = 13;P3 = 8;P4 = 5.4;P5 = 3.2;P6 = 9.4; \t\t\t\t#precipitaion at respective stations\n", + "\n", + "# Calculations\n", + "A1 = a**2/8+a**2/(4*1.73);\n", + "A2 = a**2/8;\n", + "A3 = A2;A4 = A1;\n", + "A5 = a**2/(4*1.73);\n", + "A6 = a**2/2;\n", + "A = A1+A2+A3+A4+A5+A6;\n", + "Pavg = (P1*A1+P2*A2+P3*A3+P4*A4+P5*A5+P6*A6)/A;\n", + "\n", + "# Results\n", + "print \"Mean precipitaion = %.2f cm.\"%(Pavg);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean precipitaion = 7.35 cm.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.43 pg : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\t\t\t\t\n", + "#Given\n", + "A = [90, 140, 125, 140, 85, 40, 20]; \t\t\t\t#area of isohytes\n", + "I = linspace(13,1,7) \t\t\t\t#average isohytel interval\n", + "s = 0;t = 0;\n", + "for i in range(7):\n", + " s = s+A[i]*I[i];\n", + " t = t+A[i];\n", + "\n", + "Pavg = s/t;\n", + "Pavg = round(Pavg*10)/10;\n", + "\n", + "# Results\n", + "print \" average depth of precipitation = %.2f cm.\"%(Pavg);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " average depth of precipitation = 8.40 cm.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.44 pg : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "p = [120, 95, 96, 60, 65, 70, 45, 21]; \t\t\t\t#rain guage readings at respective stations\n", + "\n", + "# Calculations and Results\n", + "s = sum(p)\n", + "pavg = s/8;\n", + "u = 0;\n", + "for i in range(8):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "sx = (u/7)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/13.99)**2;\n", + "N = round(N*100)/100;\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "\t\t\t\t#taking N = 10\n", + "N = 10;\n", + "n = N-8;\n", + "print \"additional guages needed = %i.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 71.00 cm.\n", + "total stations needed = 10.03.\n", + "additional guages needed = 2.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.45 pg : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pylab import plot\n", + "from numpy import zeros,linspace\n", + "import math \n", + "#compute maximum rainfall intensities for 5,10,15,20,25,30,35,40,45,50 minutes\n", + "#plot intensity duration graph\n", + "\t\t\t\t\n", + "#Given\n", + "CR = [0, 1.02, 2.08, 3.30, 4.72, 5.58, 6.40, 7.16, 7.88, 8.54, 9.14]; \t\t\t\t#cumulative rainfall\n", + "\n", + "c5 = zeros(11)\n", + "c10 = zeros(11)\n", + "c15 = zeros(11)\n", + "c20 = zeros(11)\n", + "c25 = zeros(11)\n", + "c30 = zeros(11)\n", + "c35 = zeros(11)\n", + "c40 = zeros(11)\n", + "c45 = zeros(11)\n", + "c50 = zeros(11)\n", + "\n", + "c5[1] = CR[1];\n", + "c10[2] = CR[2];\n", + "c15[3] = CR[3];\n", + "c20[4] = CR[4];\n", + "c25[5] = CR[5];\n", + "c30[6] = CR[6];\n", + "c35[7] = CR[7];\n", + "c40[8] = CR[8];\n", + "c45[9] = CR[9];\n", + "c50[10] = CR[10];\n", + "for i in range(2,11):\n", + " c5[i] = CR[i]-CR[i-1];\n", + "\n", + "for i in range(3,11):\n", + " c10[i] = CR[i]-CR[i-2];\n", + "\n", + "for i in range(4,11):\n", + " c15[i] = CR[i]-CR[i-3];\n", + "\n", + "for i in range(5,11):\n", + " c20[i] = CR[i]-CR[i-4];\n", + "\n", + "for i in range(6,11):\n", + " c25[i] = CR[i]-CR[i-5];\n", + "\n", + "for i in range(7,11):\n", + " c30[i] = CR[i]-CR[i-6];\n", + "\n", + "for i in range(8,11):\n", + " c35[i] = CR[i]-CR[i-7];\n", + "\n", + "for i in range(9,11):\n", + " c40[i] = CR[i]-CR[i-8];\n", + "\n", + "for i in range(10,11):\n", + " c45[i] = CR[i]-CR[i-9];\n", + " \t\t\t\t#rainfall in any possible time interval\n", + "\n", + "print \"5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\";\n", + "for i in range(11):\n", + " print \"%4.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f\"%(c5[i],c10[i],c15[i],c20[i],c25[i],c30[i],c35[i],c40[i],c45[i],c50[i]);\n", + "\n", + "I = [17.04, 15.84, 14.80, 14.16, 13.39, 12.80, 12.27, 11.82, 11.39, 10.97]; \t\t\t\t#maximum intensity at respective durations\n", + "D = linspace(5,50,len(I)) \t\t\t\t#durations\n", + "#graph is plotted between I and D\n", + "plot(I,D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\n", + "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.06 2.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.22 2.28 3.30 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.42 2.64 3.70 4.72 0.00 0.00 0.00 0.00 0.00 0.00\n", + "0.86 2.28 3.50 4.56 5.58 0.00 0.00 0.00 0.00 0.00\n", + "0.82 1.68 3.10 4.32 5.38 6.40 0.00 0.00 0.00 0.00\n", + "0.76 1.58 2.44 3.86 5.08 6.14 7.16 0.00 0.00 0.00\n", + "0.72 1.48 2.30 3.16 4.58 5.80 6.86 7.88 0.00 0.00\n", + "0.66 1.38 2.14 2.96 3.82 5.24 6.46 7.52 8.54 0.00\n", + "0.60 1.26 1.98 2.74 3.56 4.42 5.84 7.06 8.12 9.14\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 17, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEACAYAAACuzv3DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHNpJREFUeJzt3X2czXXex/HXDDaR+zKEkJLN/b0NOesuqZDKEhnSze61\nl5VKlC2zVEJu1m5pt1RuFpWKRCXlXFKbjcZNpBt3S4WSonTvXH98zphpOmbOmTnnfH/nnPfz8ZjH\n/M6ZOc77MfTpO5/f9wZERERERERERERERERERERERERERCKSFub37QaOAD8BPwBtgMrAE0Dt4Nf7\nAV9EPaGIiETFLqxw5zUZuC14PRq4L66JREQkIruAKvme2w5kBK+rBR+LiIhH7QSygfXA9cHnDuf5\nelq+xyIi4jHVg5/PADYCHfll4f48rolERASAkmF+3yfBz58Cz2I3Ow9gLZX9WKE/mP9F9erVC+zY\nsSMKMUVEUsoO4Jxwvzk9jO8pA5QLXpcFugNbgOeAzODzmcCSXyTZsYNAIODZjyNHApx9doB+/cY5\nz1LYx7hx3s+onMrp9Y9EyQnUC7eIQ3gj8gxsFJ7z/f8CVmL98ieBYeROP0wo5crB/PnQtSt8/DGc\neabrRCIikQunkO8CmoV4/nOga3TjxN9vfgOtW0NmJrz0EqSH8zuKiIiHqGwBd97p4+uv4a9/dZ3k\n5Hw+n+sIYVHO6FLO6EqUnJEKd2VnUQWC/R7P27kT2raFVaugaVPXaUQklaWlpUEE9Vkj8qCzz4ap\nU2HgQPjmG9dpRETCpxF5HoEA9O8P1ap5u80iIskt0hG5Cnk+hw9ba+Wf/4QePVynEZFUpEIeBatX\nw6BBsHEjnHGG6zQikmpUyKNk9Gh4911YuhTSYv1TEhHJQzc7o2TCBPjoI2uxiIh4mUbkBdi+HTp0\ngLVroUED12lEJFVoRB5FDRrA3XfblMTvv3edRkQkNI3ICxEIQO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AWOAt4\nHJjuNkpIZYA7sLZFDi+NevOaBdQFmmEjtakFf7sTJYFKQDtgFPCk2ziFGoC3//uZDfwJ+29oJNZH\nL1AsC/kBoFrwujpwMIbvlSqGAD2BgY5zhGsBcbxRE4F6QB1slLsLa1NtAKo6zHQyB8kdCD2CNzen\n24fdgAe7OXccqOIuToFKApcDT7gOUoA25E7tXkwYf+exLOTPYb9aE/y8JIbvFS1eHZWBzVYYhbUE\nvnWcpSDn5rnujTdmBuS3BWv11Q1+7MNudHtxsFE9z/XlnPzmnUtLgM7B6/rAr4BD7uIUqCs2u8bL\nu658CHQKXncmjvfwFmI/mO+BvcBQbBbAKrw1/TB/zmuxm7B7gW+A/cALztLlCpXzA2APudOnHnSW\nLleonIuxYrMReBpvjHJzcn5H7r/PvHbijVkroX6ec7E+/iasYLq+1xTqZ1kKmIf9vW/AtrZ27WR/\n548BN7gKFUKo2tkKm9CwEfg3NqtFRERERERERERERERERERERERERERERERERJLF/wMU/nSXoED/\n2gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.46 pg : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math\n", + "from matplotlib.pylab import plot\n", + "#draw storm hyetograph and intensity duration curve\n", + "\t\t\t\t\n", + "#Given\n", + "p = [0, 5, 7.5, 8.5, 9]; \t\t\t\t#accumulated precipitation\n", + "t = [0, 30, 60, 90, 120]; \t\t\t\t#time\n", + "r = zeros(5)\n", + "I = zeros(5)\n", + "\n", + "print \"Rainfall intensity:\";\n", + "for i in range(1,5):\n", + " r[i] = p[i]-p[i-1]; \t\t\t\t#rainfall in succesive 30 min interval\n", + " I[i] = r[i]*60/30; \t\t\t\t#rainfall intensity\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "#graph is plotted between I and t.\n", + "plot(I,t)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rainfall intensity:\n", + "10.00\n", + "5.00\n", + "2.00\n", + "1.00\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 18, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAES1JREFUeJzt3XuQnWV9wPFvyAYbiiVkpEmAJEsDMYQ6lABBECaHKEod\nBf5QiAMMRW3HkQ5YQXNT2T8sJgFGBAZnKgPEWgLhIspMbQHdA2KK0AIpzQVC2gwkDkESoBdhjGb7\nx/Nu9mSzt3N7n+c97/czc+Zc9pzdhzPky8vze88GJEmSJEmSJEmSJEmSJEmSOtYdwE7ghZrHrgc2\nAeuBB4HDar62FNgCbAY+mtMaJUl1Ogs4if3jfg5wUHZ7RXYBmAs8D0wAuoGXa54nScrRaPH9OfDm\noMceBfZmt38JHJ3dPh9YA+wBthHiPr8lq5Qk1aXZI+vPAv+Y3T4S2F7zte3AUU1+f0lSA5qJ+3Lg\nt8DdIzynr4nvL0lqUFeDr/sL4OPAh2se2wFMr7l/dPbYfmbNmtW3devWBn+sJJXWVuDYsT65kSP3\nc4GvEPbY3615/MfAIuBg4BjgOODpA1a3dSt9fX3RL8uX97FoUdw1XHvttdHfh1Quvhe+F74XI1+A\nWfWEerS4rwHWAe8HXiXssd8CHEoYrD4H3JY9dyOwNrv+CfBFEt6WWbYM1q2D3t7YK5Gk1httW+Yz\nQzx2xwjPvy67JO+QQ+Cmm+CKK2D9epgwIfaKJKl1Sn0e+gUXwMyZ8J3vxPn5lUolzg9OkO/FAN+L\nAb4XjRsX4Wf2ZftHSdiyBU4/PRy9H+WJm5ISNW7cOKij2aWPO8DXvgZbt8KaNbFXIklDM+4N+M1v\n4Pjj4a674OyzY69Gkg5Ub9xLvefer3a4umd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XS3++fOBl4Ft2f17gPPZP+4jGmvEFy4sTsSH47+4A3wvBvheDPC9aFyr\n434U8GrN/e3AaUM9sUwRl6S8tTruY9pvmT7diEtSO7V6z/2DQA9hqAqwFNjL/kPVl4FZLf65ktTp\ntgLHxvrhXdkCuoGDgeeB42MtRpLUOn9OOGPmZcKRuyRJkqSiORfYDGwBFkdeS0zTgV5gA/AfwJVx\nl5OE8cBzwMOxFxLZJOB+wunDGwlzrLJaSvgz8gJwN/CeuMvJ1R3ATsI/e7/JwKPAS8AjhH9XkjCe\nsFXTDUyg3PvxU4E/y24fStjGKut70e/LwD8AP469kMhWA5/NbncBh0VcS0zdwH8yEPR7gcuirSZ/\nZwEnsX/cVwFfzW4vBlbkvajhnA78U839JdlF8BDw4diLiOho4DHgbMp95H4YIWgKR6kvAocT/iP3\nMOGT72XSzf5x3wxMyW5Pze4PK88zyof6gNNROf78VHUT/gv9y8jriOnbwFcIp82W2THAr4E7gWeB\n7wGHRF1RPLuBG4FXgF8BbxEOAMpsCmGrhux6ygjPzTXu6f0S9/gOJeyvXgX8b+S1xPIJ4HXCfnuM\n31Kaki5gHnBbdv1/lPf/bmcBXyIc/BxJ+LNyccwFJaaPUZqaZ9x3EAaJ/aYTjt7LagLwAPADwrZM\nWZ0BnAf8F7AGWAh8P+qK4tmeXZ7J7t9PiHwZnQKsA3YBvwMeJPy7UmY7CdsxANMIB0VJ8ANOA8YR\nAvbt2AtJzALKvecO8AQwO7vdw4G/MrssTiScSTaR8OdlNXBF1BXlr5sDB6r9ZxkuIaGBKvgBp35n\nEvaXnydsRzzHwK9sKLMFeLbMiYQj9/WEo9Wyni0D4cyQ/lMhVxP+b7cs1hBmDb8lzCovJwyZHyPB\nUyElSZIkSZIkSZIkSZIkSZIkSZIkldD/Aw0v7UUBAzTHAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.47 pg : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math\n", + "from numpy import zeros,linspace\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "I = linspace(21,12,10) \t\t\t\t#isohytes\n", + "a = [543, 1345, 2030, 2545, 2955, 3280, 3535, 3710, 3880, 3915]; \t\t\t\t#enclosed area\n", + "ia = zeros(10)\n", + "ia[0] = 543;\n", + "for i in range(1,10):\n", + " ia[i] = a[i]-a[i-1]; \t\t\t\t#net incremental area between isohytes\n", + "\n", + "rv = zeros(10)\n", + "r = linspace(21.5,12.5,10) \n", + "for i in range(10):\n", + " rv[i] = r[i]*ia[i]; \t\t\t\t#rainfall volume\n", + "\n", + "cv = zeros(10)\n", + "cv[0] = 11675;\n", + "for i in range(10):\n", + " cv[i] = cv[i-1]+rv[i]; \t\t\t\t#cumulative volume\n", + "\n", + "eud = zeros(10)\n", + "for i in range(10):\n", + " eud[i] = cv[i]/a[i]; \t\t\t\t#depth(mm)\n", + "\n", + "\n", + "print \"From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\";\n", + "#graph is plotted between eud and a\n", + "plot(eud,a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 20, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEACAYAAABRQBpkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXZx/FvIAmLqIhYCKACiiwFJYRNEBgQEFwAF1bF\nKCjaqLi1Alpe0tIqoqj4WhABLciiqJUXEJBFIghCBIKyRQgVNFHQ1r1qBcn7x31whjiYSTKZM2fm\n97muuc6ZZ86ZuU+PzcNz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z5zjvbKe0ftYn0hr4AVsXkVRBRz/L+ozOX7JjmgWyvWBN+5fEvaH\n8nmsGQ72r+Xazn4K8GmQ87xy/0p7feCt+zcH//WFwmv3r6TXByW4f25WBnlAF2e/GzaqoaiiE9t6\ncnzeOpqd4WwrAH8EpgY5ZjPQCGv+JWOrui6KRHBhEMr1eeH+JWCt1F3AEwHli4B0Zz+d4P8n9ML9\nK8v1efklTVf7AAAAmElEQVT+FT0mGC/fv6LHBBOV928+8DGWSvgIG33SGst9bcOGKKY6x9YBXnP2\nGxJ8Ylu0KXp9w7AU2PvO68GAYwOvD6z59j5WOcba9Xnh/l0EHMVizHFevTjx5Emv3b+yXJ9X719v\nbLXkj4DvsaVxljnHx8L9C/X6vHD/REREREREREREREREREREREREREREREREREQkGv0/xX+6BI93\n2EwAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.48 pg : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 7.75; \t\t\t\t#initial depth of water\n", + "r = 3.80; \t\t\t\t#rainfall during the week\n", + "hr = 2.50; \t\t\t\t#depth of water removed\n", + "C = 0.7; \t\t\t\t#pan coefficient\n", + "\n", + "# Calculations\n", + "ha = r-hr;\n", + "hl = ha+h1;\n", + "h2 = 8.32;\n", + "ev = hl-h2;\n", + "evs = ev*C;\n", + "evs = round(evs*100)/100;\n", + "\n", + "# Results\n", + "print \"evaporation from reservior surface during the week = %.2f cm.\"%(evs);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "evaporation from reservior surface during the week = 0.51 cm.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.49 pg : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T = linspace(1,12,12) \t\t\t\t#time from start\n", + "r = [1.8, 2.6, 7.8, 3.9, 10.6, 5.4, 7.8, 9.2, 6.5, 4.4, 1.8, 1.6]; \t\t\t\t#increamental rainfall\n", + "R = 24.4; \t\t\t\t#total run-off\n", + "s = sum(r)\n", + "\n", + "ti = s-R;\n", + "\n", + "#first trial\n", + "tr = 7; \t\t\t\t#assumed\n", + "ti = s-R-r[0]-r[1]-r[3]-r[10]-r[11];\n", + "fi = ti/tr;\n", + "P = zeros(12)\n", + "for i in range(12):\n", + " P[i] = r[i]-fi;\n", + " if (P[i]<0):\n", + " P[i] = 0;\n", + "\n", + "print \"Timeh rainfall excess.\";\n", + "for i in range(12):\n", + " print \"%.2f %.2f\"%(T[i],P[i]);\n", + "\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Timeh rainfall excess.\n", + "1.00 0.00\n", + "2.00 0.00\n", + "3.00 3.90\n", + "4.00 0.00\n", + "5.00 6.70\n", + "6.00 1.50\n", + "7.00 3.90\n", + "8.00 5.30\n", + "9.00 2.60\n", + "10.00 0.50\n", + "11.00 0.00\n", + "12.00 0.00\n", + "fi index = 3.90 cm/hr.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.50 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\t\t\t\t\n", + "#Given\n", + "r = [0.6, 1.35, 2.25, 3.45, 2.7, 2.4, 1.5, 0.75]; \t\t\t\t#incremental rainfall\n", + "T = linspace(1,8,8) \t\t\t\t#time from start of rainfal\n", + "t = 8.;\n", + "P = 15.; \t\t\t\t#total rainfall\n", + "R = 8.7; \t\t\t\t#direct run-off\n", + "\n", + "# Calculations\n", + "W = (P-R)/t;\n", + "#math.since fi wil be more than W\n", + "tre = 6;\n", + "fi = ((P-R)-r[0]-r[7])/tre;\n", + "\n", + "# Results\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 0.83 cm/hr.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.51 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\t\n", + "#Given\n", + "I = 10; \t\t\t\t#total infiltration rate\n", + "fI = 5; \t\t\t\t#final infiltration rate\n", + "k = 0.95; \t\t\t\t#rate of decay of difference between final and initial infiltration rate\n", + "\n", + "\n", + "# Calculations\n", + "def f8(t): \n", + "\t return fI+(I-fI)*math.e**(-k*t)\n", + "\n", + "q = quad(f8,0,6)[0]\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"total infiltration depth = %.2f mm.\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total infiltration depth = 35.25 mm.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.52 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\n", + "#find the equation of infiltration capacity\n", + "\t\t\t\t\n", + "#Given\n", + "fc = 1; \t\t\t\t#consmath.tant infiltration rate\n", + "ft = [10.4, 5.6, 3.2, 2.1, 1.5, 1.2, 1.1, 1, 1]; \t\t\t\t#infiltration capacity\n", + "f = ft[0]-fc;\n", + "t = linspace(0,2,9)\n", + "\n", + "r = zeros(9)\n", + "for i in range(9):\n", + " r[i] = ft[i]-fc;\n", + "\n", + "h = zeros(7)\n", + "for i in range(7):\n", + " h[i] = math.log10(r[i]);\n", + "\n", + "s = 0.775; \t\t\t\t#from graph\n", + "k = 1/(math.log10(math.e)*s);\n", + "k = round(k*100)/100;\n", + "\n", + "# Results\n", + "print \"Equation is:ft = fc+%.2fe**-%.2ft)\"%(f,k);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:ft = fc+9.40e**-2.97t)\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.53 pg : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pylab import bar\n", + "import math \n", + "#total rainfall\n", + "#net run-off\n", + "#W index\n", + "\n", + "#Given\n", + "r = [2, 2, 8, 7, 1.25, 1.25, 4.5]; \t\t\t\t#rainfall intensity\n", + "T = [15, 30, 45, 60, 70, 90, 105]; \t\t\t\t#time\n", + "dt = 15.; \t\t\t\t#time interval\n", + "fi = 3.; \t\t\t\t#fi index\n", + "#graph is plotted between r and T\n", + "bar(T,r)\n", + "s = sum(r)\n", + "P = s*dt/60;\n", + "Pe = ((8-3)+(7-3)+(4.5-3))*dt/60; \t\t\t\t#area of graph above r = 3.0.\n", + "w = (P-Pe)/(105./60);\n", + "w = round(w*1000)/1000;\n", + "\n", + "# Results\n", + "print \"total rainfall = %.2f cm.\"%(P);\n", + "print \"net run-off = %.2f cm.\"%(Pe);\n", + "print \"W index = %.2f cm/hr.\"%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total rainfall = 6.50 cm.\n", + "net run-off = 2.62 cm.\n", + "W index = 2.21 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+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R1ICu5rSNMmkEYA64vrR5FCMJqXA28E\nfg9cD7ya1GMTeoO07/0JuLu4fRMpxB+hGf29FLgT+CvwX9KbXafRnP4WrbQ/Ls+bY4plEb0HOAt4\nR9+yofsbJ7zvAY5n6QM8b2XpTbCoOsBXSEcqXNG3/FbSm0MUX28hno+Sdo7jgLcBPwTOpRm9QQqx\n7cAJxe2NpCMzNtOM/raR5kAPJu2nG0n7aVP6W7TS/ngrab9dS9qHjwd+uurVje9M0tTlOcATfctX\nvb+mfYDndNJ88L2k6YUtpB/2HOmNvoiHY+3Lq1j6Rduk3l5EGnn3H4bVpP4uZulQwatJfyVG7u96\n0vz9f0i/eM9j//18lJQ124DXrWqlo1ne3/mkQwEfYilfruxbP1p/kiRJkiRJkiRJkiRJkiRJkiRJ\nUmz/B97QUHeIqu3oAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.54 pg : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#run-off by rainfall of 3.3cm in 3hrs\n", + "\t\t\t\t\n", + "#Given\n", + "A = [36, 18, 66]; \t\t\t\t#area of catchment\n", + "fi = [0.9 ,1.1, 0.5]; \t\t\t\t#fi index\n", + "r1 = [0.6 ,0.9, 1.0]; \t\t\t\t#rainfall in first hour\n", + "r2 = [2.4 ,2.1, 2.0]; \t\t\t\t#rainfall in second hour\n", + "r3 = [1.3, 1.5, 0.9]; \t\t\t\t#rainfall in third hour\n", + "\n", + "# Calculations and Results\n", + "t36 = r1[0]+r2[0]+r3[0];\n", + "t18 = r1[1]+r2[1]+r3[1];\n", + "t66 = r1[2]+r2[2]+r3[2];\n", + "\n", + "p = (t36*A[0]+t18*A[1]+t66*A[2])/(A[0]+A[1]+A[2]);\n", + "print \"Total rainfall in catchment = %.2f cm.\"%(p);\n", + "\n", + "ro1 = [0 ,0, 0.5];\n", + "ro2 = [1.5 ,1.0, 1.5];\n", + "ro3 = [0.4, 0.4, 0.4]; \t\t\t\t#rainfall-fi\n", + "t1 = ro1[0]+ro2[0]+ro3[0];\n", + "t2 = ro1[1]+ro2[1]+ro3[1];\n", + "t3 = ro1[2]+ro2[2]+ro3[2];\n", + "run = (A[0]*t1+A[1]*t2+A[2]*t3)/(A[0]+A[1]+A[2]); \t\t\t\t#run-off from entire catchment\n", + "\n", + "print \"run-off by rainfall of 3.3cm in 3hrs = %.2f cm.\"%(run);\n", + "\n", + "fia = (fi[0]*A[0]+fi[1]*A[1]+fi[2]*A[2])/(A[0]+A[1]+A[2]);\n", + "tr = (1.1-fia)*3;\n", + "print \"Total run-off = %.2f cm.\"%(tr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total rainfall in catchment = 4.11 cm.\n", + "run-off by rainfall of 3.3cm in 3hrs = 2.10 cm.\n", + "Total run-off = 1.17 cm.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.55 pg : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "P = array([4, 22, 28, 15, 12, 8, 4, 15, 10, 5]); \t\t\t\t#Precipitation\n", + "R = array([0.2, 7.1, 10.9, 4.0, 3.0, 1.3, 0.4, 4.1, 2.0, 0.3]); \t\t\t\t#runoff\n", + "\n", + "# Calculations\n", + "Ps = P**2\n", + "Rs = R**2\n", + "PR = P*R\n", + "\n", + "s = sum(Ps)\n", + "t = sum(Rs)\n", + "u = sum(PR)\n", + "q = sum(P)\n", + "w = sum(R)\n", + "\n", + "N = 10.;\n", + "a = (N*u-q*w)/(N*s-q**2);\n", + "b = (w-a*q)/N;\n", + "a = round(a*10000)/10000;\n", + "b = round(b*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Equation is:%.2f P %.2f.\"%(a,b);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:0.43 P -1.93.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.56 pg : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 470; \t\t\t\t#peak discharge of flood hydrograph\n", + "B = 15; \t\t\t\t#base flow\n", + "l = 0.25; \t\t\t\t#infiltration loss\n", + "Qr = Q-B;\n", + "d = 8; \t\t\t\t#average depth of rainfall\n", + "\n", + "# Calculations\n", + "re = d-l*6; \t\t\t\t#rainfall excess\n", + "q = Qr/re;\n", + "\n", + "# Results\n", + "print \"peak discharge of 6 hrs unit hydrograph = %i cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak discharge of 6 hrs unit hydrograph = 70 cumecs.\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.57 pg : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 0.25; \t\t\t\t#infiltration index\n", + "B = 20; \t\t\t\t#Base flow\n", + "O = array([0, 20, 60, 150, 120, 90, 70, 50, 30, 20, 10, 0, 0, 0]); \t\t\t\t#ordinates of unit hydrograph\n", + "R1 = 5;\n", + "R2 = 0.8;\n", + "R3 = 3;\n", + "r1 = R1-(fi*4); \t\t\t\t#rainfall excess in first four hour\n", + "r2 = R2-(fi*4); \t\t\t\t#rainfall excess in second four hour\n", + "r3 = R3-(fi*4); \t\t\t\t#rainfall excess in third four hour\n", + "if r2<0 :\n", + " r2 = 0;\n", + "\n", + "# Calculations and Results\n", + "s1 = r1*O\n", + "s2 = zeros(14)\n", + "for i in range(1,14):\n", + " s2[i] = r2*O[i-1];\n", + "\n", + "s3 = zeros(14)\n", + "for i in range(2,14):\n", + " s3[i] = r3*O[i-2];\n", + "#surface run-off from rainfall excess during succesive unit periods\n", + "print \"ordinates of storm hydrograph\";\n", + "T = zeros(14)\n", + "t = zeros(14)\n", + "for i in range(14):\n", + " T[i] = s1[i]+s2[i]+s3[i]; \t\t\t\t#sub-total\n", + " t[i] = T[i]+B; \t\t\t\t#ordinate of flood hydrograph\n", + " print \"%i\"%(t[i]);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of storm hydrograph\n", + "20\n", + "100\n", + "260\n", + "660\n", + "620\n", + "680\n", + "540\n", + "400\n", + "280\n", + "200\n", + "120\n", + "60\n", + "40\n", + "20\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.58 pg : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 2.5; \t\t\t\t#fi index\n", + "t = 24.;\n", + "A = 200.; \t\t\t\t#area of catchment\n", + "R1 = 7.5;\n", + "R2 = 2.0;\n", + "R3 = 5.; \t\t\t\t#rainfall\n", + "r1 = R1-fi;\n", + "r2 = R2-fi;\n", + "r3 = R3-fi;\n", + "r2 = 0;\n", + "r = [5, 0, 2.5]; \t\t\t\t#excess rainfall\n", + "D = array([5 ,15, 40, 25, 10, 5, 0, 0, 0]); \t\t\t\t#distribution\n", + "d1 = D*r[0]/100\n", + "d2 = zeros(9)\n", + "for i in range(8):\n", + " d2[i+1] = D[i]*r[1]/100;\n", + "\n", + "d3 = zeros(9)\n", + "for i in range(7):\n", + " d3[i+2] = D[i]*r[2]/100;\n", + "#distribution run-off for rainfall excess\n", + "\n", + "tr1 = zeros(9)\n", + "tr2 = zeros(9)\n", + "for i in range(9):\n", + " tr1[i] = d1[i]+d2[i]+d3[i]; \t\t\t\t#total run-off as depth\n", + " tr2[i] = 23.148*tr1[i]; \t\t\t\t#total run-off as discharge\n", + " tr2[i] = round(tr2[i]*1000)/1000;\n", + "\n", + "s = sum(tr2)\n", + "\n", + "print \"Total run-off:\";\n", + "print \"as depth as discharge\";\n", + "for i in range(9):\n", + " print \"%.2f %.2f\"%(tr1[i],tr2[i]);\n", + "\n", + "r = 0.36*s*t/A;\n", + "r = round(r*10)/10;\n", + "print \"total run-off = %.2f cm.\"%(r);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total run-off:\n", + "as depth as discharge\n", + "0.00 0.00\n", + "0.00 0.00\n", + "2.12 49.19\n", + "1.38 31.83\n", + "1.00 23.15\n", + "0.62 14.47\n", + "0.25 5.79\n", + "0.12 2.89\n", + "0.00 0.00\n", + "total run-off = 5.50 cm.\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.59 pg : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "O = [10, 30, 90, 220, 280, 220, 166, 126, 92, 62, 40, 20, 10]; \t\t\t\t#ordinates of 6 hr flood hydrograph\n", + "B = 10; \t\t\t\t#Base flow\n", + "r = zeros(13)\n", + "\n", + "for i in range(13):\n", + " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + "\n", + "print \"Ordinates of 6 hr unit hydrograph\";\n", + "u = zeros(13)\n", + "\n", + "for i in range(1,13):\n", + " u[i] = r[i]-u[i-1]; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n", + "\n", + "for i in range(13): \n", + " print \"%i\"%(u[i]);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ordinates of 6 hr unit hydrograph\n", + "0\n", + "20\n", + "60\n", + "150\n", + "120\n", + "90\n", + "66\n", + "50\n", + "32\n", + "20\n", + "10\n", + "0\n", + "0\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.60 pg : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#determine the ordinates of 1 cm-6 hour hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "t = 6;\n", + "A = 450; \t\t\t\t#catchment area\n", + "O = [5, 15, 40, 80, 60, 50, 25, 15, 5]; \t\t\t\t#ordinates of flood hydrograph\n", + "B = 5; \t\t\t\t#base flow assumed\n", + "s = 0;\n", + "r = zeros(9)\n", + "for i in range(9):\n", + " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + " s = s+r[i];\n", + "\n", + "n = s*0.36*12/A;\n", + "print \"ordinates of unit hydrograph\";\n", + "for i in range(9):\n", + " u[i] = r[i]/n;\n", + " u[i] = round(u[i]*100)/100;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of unit hydrograph\n", + "0.00\n", + "4.17\n", + "14.58\n", + "31.25\n", + "22.92\n", + "18.75\n", + "8.33\n", + "4.17\n", + "0.00\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.61 pg : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#obtain ordinates 24 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "O = [0, 5.5, 13.5, 26.5, 45, 82, 162, 240, 231, 165, 112, 79, 57, 42, 31, 22, 14, 9.5, 6.6, 4, 2, 1, 0, 0, 0, 0, 0]; \t\t\t\t#ordinates of 1st 8 hrs unit hydrograph\n", + "o1 = zeros(27)\n", + "o2 = zeros(29)\n", + "for i in range(25):\n", + " o1[i+2] = O[i]; \t\t\t\t#ordinates of 2nd 8 hrs unit hydrograph\n", + " o2[i+4] = O[i]; \t\t\t\t#ordinates of 3rd 8 hrs unit hydrograph\n", + "\n", + "o3 = zeros(27)\n", + "t = zeros(27)\n", + "print \"ordinates 24 hr unit hydrograph:\";\n", + "for i in range(27):\n", + " o3[i] = o1[i]+o2[i]+O[i]; \t\t\t\t#total 24 hr hydrograph of 3 cm run-off\n", + " t[i] = o3[i]/3;\n", + " t[i] = round(t[i]*10)/10;\n", + " print \"%.2f\"%(t[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates 24 hr unit hydrograph:\n", + "0.00\n", + "1.80\n", + "4.50\n", + "10.70\n", + "19.50\n", + "38.00\n", + "73.50\n", + "116.20\n", + "146.00\n", + "162.30\n", + "168.30\n", + "161.30\n", + "133.30\n", + "95.30\n", + "66.70\n", + "47.70\n", + "34.00\n", + "24.50\n", + "17.20\n", + "11.80\n", + "7.50\n", + "4.80\n", + "2.90\n", + "1.70\n", + "0.70\n", + "0.30\n", + "0.00\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.62 pg : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,linspace\n", + "\n", + "\n", + "#ordinates of 1 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "t = linspace(0,12,13) \t\t\t#time\n", + "O = [0, 0, 54, 0, 175, 0, 127, 0, 58, 0, 25, 0, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n", + "of = zeros(13)\n", + "for i in range(2,13):\n", + " if (i%2) == 0:\n", + " of[i] = 0\n", + " else:\n", + " of[i] = O[i-2]+of[i-2];\n", + "\n", + "s = [0, 25, 54, 120, 229, 300, 356, 390, 414, 430, 439, 439, 439]; \t\t\t\t#Ordinates of S-curve\n", + "of1 = zeros(13)\n", + "for i in range(1,13):\n", + " of1[i] = s[i-1];\n", + "\n", + "y = zeros(13)\n", + "u = zeros(13)\n", + "print \"ordinates of 1 hr unit hydrograph:\";\n", + "for i in range(13):\n", + " y[i] = s[i]-of1[i];\n", + " u[i] = y[i]*2;\n", + " print \"%i\"%(u[i]);\n", + "\n", + "#graph is plotted between u and t\n", + "plot(t,u)\n", + "\n", + "\n", + "# graph in book is wrong. Please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of 1 hr unit hydrograph:\n", + "0\n", + "50\n", + "58\n", + "132\n", + "218\n", + "142\n", + "112\n", + "68\n", + "48\n", + "32\n", + "18\n", + "0\n", + "0\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 42, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEACAYAAAC57G0KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHv5JREFUeJzt3Xl41NX1x/F32GSVRYtABIKIbIogiyAqASWApVixUlEB\ncQHBUn6iKFqVWK21WqytAqJoRVAqoFJcUEBIrbUsrUDZBSRssiiboCIE5vfHmZgQQjJJZuZ+v9/5\nvJ5nnkwms5x5ICd3zj33XhARERERERERERERERERERERERERSUh1gQXAKmAl8Ovw7enANmBp+NIj\n12PuB9YDa4G0eAUqIiJFUwtoGb5eGVgHNAVGAyPyuX8zYBlQFkgBNgClYh6liIicpLDkuxNL2ACH\ngDVAcvj7pHzufzUwFTgKZGIJvl2JoxQRkSIryug6BWgFLAx/PwxYDrwEVAvfVgcr3WTbRs4fBBER\niaNIE3xlYAYwHBvJjwcaYOWbHcCYAh4bKkmAIiJ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nUQUXY2MA/oTPBG8FWxBBhUNbBB\nR3Xsj9c7wJVOIyq5FE5MgGuBs8LXa4W/97MUTnx/uV0DTCnsCeK52VhEC6ACIgX767vIcRzR9idg\nJNb2GjQNgK+AvwKfAS8CFZ1GFF17gTHAFuBLYD/2xzpIzsLKGoS/nlXAff3uFuD9wu4UzwQf0QKo\nAKiM1XGHAz7fi+4EPYHdWP09iNvDlQEuAsaFv35LsD5hNgT+Dxt81MH+n97oMqAYCxHcnPMb4Ag2\nj1KgeCb47dhEZLa62Cg+SMoCb2IfnWY6jiXaLgF6AZuAqUAX4FWnEUXXtvBlSfj7GViiD4o2wKfA\nHiALm6S7xGlE0bcLK80A1MYGJEFzM3AVHvzjHPQFUElYwvuT60DioBPBq8EDfAxkH8Oczomrr/3u\nQqy7qwL2f3UScKfTiEouhZMnWbO780bhsUnIYkjhxPfXHeuCOtNJNBEI8gKoS7Ha9DKsjLGUnO0a\ngqYTweyiuRAbwXuyDS0K7iWnTXIS9onTr6ZicwlHsLm9gdhE8jyC0SaZ9/3dgrWXbyYnv4xzFp2I\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiISKT+H/BUmcxxea77AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.63 pg : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 1200; \t\t\t\t#sample mean\n", + "n = 50.; \t\t\t\t#assurance year\n", + "A = 0.95; \t\t\t\t#assurance percent\n", + "Rsk = 1-A;\n", + "sigma = 650; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "yn = 0.53622; \t\t\t\t#mean of reduced variate\n", + "sigma30 = 1.11238; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation of reduced variate\n", + "\n", + "# Calculations\n", + "T = 1/(1-(1-Rsk)**(1/n));\n", + "yt = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K = (yt-yn)/sigma30;\n", + "xt = xavg+K*sigma;\n", + "\n", + "# Results\n", + "print \" design disharge = %i cumecs.\"%(xt);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " design disharge = 4908 cumecs.\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.64 pg : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 50.;\n", + "T2 = 100.; \t\t\t\t#Return period\n", + "F1 = 20600.;\n", + "F2 = 22150; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y100-y50);\n", + "T = 500.;\n", + "y500 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x500 = F2+(y500-y100)*y;\n", + "x500 = round(x500);\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumec.\"%(x500);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 25732.00 cumec.\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.65 pg : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 1.65; \t\t\t\t#mean of data\n", + "sigma = 0.45; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "x = 3;\n", + "\n", + "# Calculations\n", + "y = 1.2825*(x-xavg)/sigma+0.577;\n", + "l = math.e**(math.e**(-y));\n", + "T = l/(l-1);\n", + "T = round(T*10)/10;\n", + "\n", + "# Results\n", + "print \"recurrence interval of 10 minutes storm = %.2f years.\"%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "recurrence interval of 10 minutes storm = 84.00 years.\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.66 pg : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 50.;\n", + "T2 = 100.; \t\t\t\t#Return period\n", + "F1 = 30800.;\n", + "F2 = 36300.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y100-y50);\n", + "T = 200.;\n", + "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x200 = F2+(y200-y100)*y;\n", + "x200 = round(x200);\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x200);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 41780.00 cumecs.\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.67 pg : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 4200.; \t\t\t\t#mean\n", + "sigma = 1705.; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "xt = 9550.; \t\t\t\t#flood value\n", + "\n", + "# Calculations\n", + "K = (xt-xavg)/sigma;\n", + "yt = 1.2825*K+0.577;\n", + "l = math.e**(math.e**(-yt));\n", + "T = l/(l-1);\n", + "\n", + "# Results\n", + "print \"Return period of flood of 9950 cumec/s = %.2f years.\"%(T);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Return period of flood of 9950 cumec/s = 100.11 years.\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.68 pg : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 100.;\n", + "T2 = 50.; \t\t\t\t#Return period\n", + "F1 = 485.;\n", + "F2 = 445.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y50-y100);\n", + "T = 1000.;\n", + "y1000 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x1000 = F2+(y1000-y50)*y;\n", + "x1000 = round(x1000*10)/10;\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 617.20 cumecs.\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.69 pg : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#probability of exceedence\n", + "#probability of occurence in next 12 years\n", + "\n", + "#Given\n", + "T = 25.; \t\t\t\t#return period\n", + "n = 12.;\n", + "\n", + "# Calculations\n", + "P = 1/T;\n", + "Rsk = 1-(1-P)**n;\n", + "P = round(P*100)/100;\n", + "Rsk = round(Rsk*10000)/10000;\n", + "\n", + "# Results\n", + "print \"probability of exceedence = %.2f.\"%(P);\n", + "print \"probability of occurence in next 12 years = %.2f.\"%(Rsk);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of exceedence = 0.04.\n", + "probability of occurence in next 12 years = 0.39.\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7e800205 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_1.ipynb @@ -0,0 +1,4197 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:53d9baa002bc091d49086abaa2a84293a2f939159da5a1508c44dddc72e14dc5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : HYDROLOGY\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 pg : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "p = [78.8, 90.2, 98.6, 102.4, 70.4]; \t\t\t\t#rain guage readings at respective stations\n", + "s = 0.;\n", + "\n", + "# Calculations and Results\n", + "for i in range(5):\n", + " s = s+p[i];\n", + "\n", + "pavg = s/5;\n", + "u = 0;\n", + "for i in range(5):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "sx = (u/4)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/6)**2;\n", + "N = round(N*100)/100;\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "#taking N = 7\n", + "N = 7;\n", + "n = N-5;\n", + "print \"additional guages needed = %i.\"%(n);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 88.08 cm.\n", + "total stations needed = 6.44.\n", + "additional guages needed = 2.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pB = 48.; \t\t\t\t#precipitation at B\n", + "pC = 51.; \t\t\t\t#precpitation at C\n", + "pD = 45.; \t\t\t\t#precipitation at D\n", + "\n", + "# Calculations\n", + "pA = (pB+pC+pD)/3;\n", + "\n", + "# Results\n", + "print \"precipitation at A = %i mm.\"%(pA);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at A = 48 mm.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pA = 6.6; \t\t\t\t#precipitation at A\n", + "pB = 4.8; \t\t\t\t#precpitation at B\n", + "pC = 3.7; \t\t\t\t#precipitation at C\n", + "nA = 72.6; \t\t\t\t#normal precipitation at A\n", + "nB = 51.8; \t\t\t\t#normal precipitation at B\n", + "nC = 38.2; \t\t\t\t#normal precipitation at C\n", + "nX = 65.6; \t\t\t\t#normal precipitation at X\n", + "\n", + "# Calculations\n", + "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;\n", + "pX = round(pX*100)/100;\n", + "\n", + "# Results\n", + "print \"precipitation at x = %.2f cm.\"%(pX);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at x = 6.13 cm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 pg : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\t\t\t\n", + "#Given\n", + "pB = 74.; \t\t\t\t#precipitation at B\n", + "pC = 88.; \t\t\t\t#precpitation at C\n", + "pD = 71.; \t\t\t\t#precipitation at D\n", + "pE = 80.; \t\t\t\t#precipitation at E\n", + "Bx = 9.;\n", + "By = 6.;\n", + "Cx = 12.;\n", + "Cy = -9.;\n", + "Dx = -11.;\n", + "Dy = -6.;\n", + "Ex = -7.;\n", + "Ey = 7.;\n", + "Ax = 0;\n", + "Ay = 0;\n", + "\n", + "# Calculations\n", + "Db = (Bx**2+By**2);\n", + "Dc = (Cx**2+Cy**2);\n", + "Dd = (Dx**2+Dy**2);\n", + "De = (Ex**2+Ey**2);\n", + "Wb = 1/Db;\n", + "Wc = 1/Dc;\n", + "Wd = 1/Dd;\n", + "We = 1/De;\n", + "s = pB*Wb+pC*Wc+pD*Wd+pE*We;\n", + "pA = s/(Wb+Wc+Wd+We);\n", + "pA = round(pA*10)/10;\n", + "\n", + "# Results\n", + "print \"precipitation at A = %.2f mm.\"%(pA);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at A = 77.50 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 pg : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "p = [58., 61., 69., 56., 84., 86., 69., 79., 71.]; \t\t\t\t#values of precipitation\n", + "s = 0;\n", + "\n", + "# Calculations and Results\n", + "for i in range(9):\n", + " s = s+p[i];\n", + "ar = s/9;\n", + "ar = round(ar*10)/10;\n", + "print \"umath.sing arithmatic average method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "I = [86., 85., 80., 75., 70., 65., 60., 55., 50.]; \t\t\t\t#isphytes\n", + "A = [0.43, 5.20, 4.0, 5.04, 5.85, 4.53, 4.09, 1.27]; \t\t\t\t#area between isohytes\n", + "\n", + "a = zeros(9)\n", + "for i in range(8):\n", + " a[i] = (I[i]+I[i+1])/2;\n", + "\n", + "P = zeros(8)\n", + "for i in range(8):\n", + " P[i] = A[i]*a[i];\n", + "\n", + "s = 0;\n", + "for i in range(8):\n", + " s = s+P[i];\n", + "\n", + "t = 0;\n", + "for i in range(8):\n", + " t = t+A[i];\n", + "\n", + "ar = s/t;\n", + "ar = round(ar*10)/10;\n", + "print \"isohytel method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "A = [3.26, 0.39, 1.61, 2.04, 2.46, 0.84, 3.91, 5.09, 0.41, 3.94, 2.06, 4.40]; \t\t\t\t#thiessen area\n", + "p = [58., 63., 71., 69., 86., 81., 84., 56., 53., 69., 61., 79.]; \t\t\t\t#observed precipitation\n", + "P = zeros(12)\n", + "for i in range(12):\n", + " P[i] = A[i]*p[i];\n", + "\n", + "s = 0;\n", + "for i in range(12):\n", + " s = s+P[i];\n", + "\n", + "t = 0;\n", + "for i in range(12):\n", + " t = t+A[i];\n", + "\n", + "ar = s/t;\n", + "ar = round(ar*10)/10;\n", + "print \"thiesson polygon method:\"\n", + "print \"Average rainfall = %.2f cm.\"%(ar);\n", + "\n", + "#mean rainfall obtained by thiesson polygon method is different from book as product(A*P) is round offed in book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "umath.sing arithmatic average method:\n", + "Average rainfall = 70.30 cm.\n", + "isohytel method:\n", + "Average rainfall = 69.70 cm.\n", + "thiesson polygon method:\n", + "Average rainfall = 70.00 cm.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 pg : 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "from numpy import zeros\n", + "\n", + "\n", + "#Given\n", + "X = [69., 55., 62., 67., 87., 70., 65., 75., 90., 100., 90., 95., 85., 90., 75., 95.]; \t\t\t\t#annual rainfall at X\n", + "Y = [77., 62., 67., 68., 86., 90., 65., 75, 70, 70, 70 ,75 ,65 ,70, 55, 75]; \t\t\t\t#average rainfall at 10 base stations\n", + "cx = zeros(16)\n", + "cx[0] = 69; \t\t\t\t#accumulated annual values at station X \n", + "for i in range(1,16):\n", + " cx[i] = cx[i-1]+X[i];\n", + "\n", + "cy = zeros(16)\n", + "cy[0] = 77;\n", + "for i in range(1,16):\n", + " cy[i] = cy[i-1]+Y[i]; \t\t\t\t#accumulated annual values at ten stations\n", + " \n", + "\n", + "#since curve is not having unform slope\n", + "print \"Record at X is not consistent.\";\n", + "print \"From the curve regime is observed in the year 1978.\"\n", + "\n", + "Q = [1970., 1971., 1972., 1973., 1974., 1975., 1976., 1977.];\n", + "O = [95., 75., 90., 85., 95., 90., 100., 90.];\n", + "for i in range(8):\n", + " A[i] = 0.7051*O[i];\n", + "\n", + "print \"Year Observed rainfall Adjusted rainfall\";\n", + "for i in range(8):\n", + " print \"%i %i %i\"%(Q[i],O[i],A[i]);\n", + "\n", + "#graph is plotted between cx and cy\n", + "plot(cy,cx,cy,cx,\"ro\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Record at X is not consistent.\n", + "From the curve regime is observed in the year 1978.\n", + "Year Observed rainfall Adjusted rainfall\n", + "1970 95 66\n", + "1971 75 52\n", + "1972 90 63\n", + "1973 85 59\n", + "1974 95 66\n", + "1975 90 63\n", + "1976 100 70\n", + "1977 90 63\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "[,\n", + " ]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAA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xE6zmYiB56N7QMMxMr\nVbUHVgDnU3uH4Ja2HYv5wgznlva1wvyBchwm2L2M+XJxevuyqPuF2dj2tMH8xV1jEPBIIioapSzq\nti/UfwPPWMdxa18qRH03LljLwkT3tZgPaIVVXkHtB7Ytpq01Ur3dM4BxmKnCNdzStlOBL4G5wAbg\nceBo3NO+r4H7gE+Bz4FvMV0rbmlfjca2J7x8B85oJ5i72SXWcdzalwoBwW0L1loAi4CxwO6w14Ic\nur2p+t/ij8AXmPGD+tauOLVtYP5qPgN4yHrcw8F3qU5uXzZwA+YPlbaYz+jVYec4uX2RNNQeJ5sI\n7MeMBcVVKgSEHZgB2RonUTeqOUkzTDB4GtNlBOYvlROt4zaYL1Y4uN3trbJUdDZwCfAxUARcgGmj\nG9oG5vNWDrxlPX8eExh24o72/R5YA3wFVGIGJPvgnvbVaMznsdwqbx9Wnurt/DNwMTA0pMxN7XPN\ngrUmwFOYrpVQ06nt3xvPwQNBzTFdFgFSb8OiSM6jdgzBTW1bDXSyjgswbXNL+36Hmfl2JKae84Dr\ncX77sjh4ULmx7VmLmVHWhNQbdM2ibvtyMTPFTgg7z6ntq5cbFqydg+lf34TpWtmI+Y/fCjMYG2kq\n3ARMm0uBi5JZ2RicR+0sIze17XeYO4TQKX1uat8t1E47nYe5m3Vy+4ow4yH7MWOQ1xBde2qmZW4D\nZiW81ocvvH3DMVNHP6H2++WhkPOd1j4REREREREREREREREREREREREREREREREREXGD/weMI8w/\naOM1NQAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 pg : 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import zeros,linspace\n", + "\t\t\t\t\n", + "#Given\n", + "c = [0, 12.4, 22.1, 35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146., 146.]; \t\t\t\t#cumulative rainfall\n", + "T = linspace(0,13,len(c)) \t\t\t\t#Time\n", + "t = 15./60; \t\t\t\t#time interval\n", + "r = zeros(13)\n", + "I = zeros(13)\n", + "r[0] = 0;\n", + "print \"Rainfall intensity:\";\n", + "I[0] = 0;\n", + "for i in range(1,13):\n", + " r[i] = c[i]-c[i-1]; \n", + " I[i] = r[i]/t; \t\t\t\t#Rainfall intensity\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "\n", + "#graph is plotted between I and T\n", + "bar(T,I)\n", + "xlabel(\"Time hr\")\n", + "ylabel(\"Rain fall insentity\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Rainfall intensity:\n", + "49.60\n", + "38.80\n", + "52.00\n", + "70.40\n", + "44.00\n", + "72.80\n", + "109.20\n", + "57.20\n", + "36.40\n", + "42.80\n", + "10.80\n", + "0.00\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 15, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEPCAYAAABGP2P1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFHtJREFUeJzt3WuwHGWdx/HvmAQBySEc0RAIejBulFDAoi4LXpZBLhsR\nA3hB1LVA2H3jBXAtINHSnNqttQAXXFaKtZQFw67cRIqVlVUCMoW1sqAQ7kQgEMNFDgpojnhJgNkX\nTx/OPCcnk56Z7unpzvdTNTU9fWbm+Z9b/+Z5uvtpkCRJkiRJkiRJkiRJkiRJkkrpImAMuKdl3VeA\nB4C7gKuBHVu+tgx4CFgNHN6nGiVJffQuYD/iYDgMeEWyfGZyA1gE3AnMAkaAh1ueJ0nqozw3vj8G\nnpuybiXwUrJ8KzA/WT4KuAzYCKwlBMP+OdYmSdqMIj+VnwhclyzvCjze8rXHgd36XpEkqbBg+AKw\nAbi0zXOafapFktRi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Fng/8M+EmSr/h8kPWG8FGsDPCNPET8wN\nNNVfAf9LmOZlovdQB34M/BfhLGepMAaDlM4ehOtRLCFMhLiSMLf9H4D3Eqap+BphQ/82wjTf/zTN\n+9QIgfEOwsy1rXMG7Ue4ut+bcvkOpJQcSpK2rEnoGbxImNDuFcAPk6/dQ5iwbCGwF5PXSphBmK9m\nuveamF33AeLrEtxGmI9HKpTBIKWzIbl/CdjYsv4lwv9RjTAElGZK7A0ty63z4j/fS4FSVhxKkrYs\nzQWKfg68BjggeTwLWJRbRVKODAYp1my5n24ZNj2yqEnoRXyQcK2HienVD9xCG+2WJUmSJEmSJEmS\nJEmSJEmSJEmSJEmSti7/D/HgBKyAP/WaAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 pg : 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import zeros_like\n", + "from matplotlib.pylab import plot,xlabel,ylabel\n", + "\n", + "\n", + "#Given\n", + "CR = array([0, 12.4, 22.1 ,35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146.0, 146.0]); \t\t\t\t#cumulative rainfall\n", + "\n", + "c15 = zeros_like(CR)\n", + "c30 = zeros_like(CR)\n", + "c45 = zeros_like(CR)\n", + "c60 = zeros_like(CR)\n", + "c90 = zeros_like(CR)\n", + "c120 = zeros_like(CR)\n", + "\n", + "# Calculations and Results\n", + "c15[1] = 12.4;\n", + "c30[2] = 22.1;\n", + "c45[3] = 35.1;\n", + "c60[4] = 52.7;\n", + "c90[6] = 81.9;\n", + "c120[8] = 123.5;\n", + "for i in range(2,13):\n", + " c15[i] = CR[i]-CR[i-1];\n", + "\n", + "for i in range(3,13):\n", + " c30[i] = CR[i]-CR[i-2];\n", + "\n", + "for i in range(4,13):\n", + " c45[i] = CR[i]-CR[i-3];\n", + "\n", + "for i in range(5,13):\n", + " c60[i] = CR[i]-CR[i-4];\n", + "\n", + "for i in range(7,13):\n", + " c90[i] = CR[i]-CR[i-6];\n", + "\n", + "for i in range(9,13):\n", + " c120[i] = CR[i]-CR[i-8];\n", + "\n", + "print \"15min 30min 45min 60min 90min 120min\";\n", + "for i in range(13):\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(c15[i],c30[i],c45[i],c60[i],c90[i],c120[i]);\n", + "\n", + "I = [109.2, 91, 79.7, 74.1, 67.6, 61.75]; \t\t\t\t#maximum intensity at respective durations\n", + "D = [15 ,30 ,45 ,60 ,90 ,120]; \t\t\t\t#durations\n", + "#greph is plotted between I and D\n", + "plot(D,I,D,I,\"ro\")\n", + "xlabel(\"Duration\")\n", + "ylabel(\"max rain fall intensity\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "15min 30min 45min 60min 90min 120min\n", + "0.00 0.00 0.00 0.00 0.00 0.00\n", + "12.40 0.00 0.00 0.00 0.00 0.00\n", + "9.70 22.10 0.00 0.00 0.00 0.00\n", + "13.00 22.70 35.10 0.00 0.00 0.00\n", + "17.60 30.60 40.30 52.70 0.00 0.00\n", + "11.00 28.60 41.60 51.30 0.00 0.00\n", + "18.20 29.20 46.80 59.80 81.90 0.00\n", + "27.30 45.50 56.50 74.10 96.80 0.00\n", + "14.30 41.60 59.80 70.80 101.40 123.50\n", + "9.10 23.40 50.70 68.90 97.50 120.20\n", + "10.70 19.80 34.10 61.40 90.60 121.20\n", + "2.70 13.40 22.50 36.80 82.30 110.90\n", + "0.00 2.70 13.40 22.50 64.10 93.30\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 1, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwS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iFytepBXTHahdfB6/1IqEktB8o\nDL7+CFsEU8S5DNcBiCSJNtgX9y5sae3wP6Kywl6XElq7Pwt4CmtS+hKYWOncqtb4r3ysVtixA2HH\nD6F/n5IkVKMQsc7sPxFqbtqM7WdeC1suvUc1n6tICl9jm/sMD/vZD8BJlc4PYP0ZlxFqehoJLIst\nfJHE0l8skq7qY8Nj62I1iOex7VsB3sWSxXpgA9YMVCG8RvAtNux1LbZHxfthP3sOSz77sI2cKmzH\ndsN7G0tE8wjtKR5+7VTbQU5ERERERERERERERERERERERERERERERERERETE3/4/xirmKFaXA2YA\nAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 pg : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "p = [475, 377, 731, 1066, 361, 305, 926, 628, 409, 236, 337, 853]; \t\t\t\t#precipitation value\n", + "N = 12.; \t\t\t\t#total number of years\n", + "T = 6; \t\t\t\t#recurrence interval\n", + "\n", + "# Calculations\n", + "m = N/T;\n", + "\n", + "# Results\n", + "print \"Ranking of storm = %i.\"%(m);\n", + "#hence pick 2nd severest storm\n", + "print \"preciptation value which has recurrence period of 6 years = %i mm.\"%(p[6]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ranking of storm = 2.\n", + "preciptation value which has recurrence period of 6 years = 926 mm.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 pg : 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import arange,array,zeros_like\n", + "\t\t\t\t\n", + "#Given\n", + "I = linspace(25,16,10) \t\t\t\t#isohytes\n", + "a = array([407 ,1008, 1522, 1909, 2216, 2460, 2651, 2782, 2910, 2936]); \t\t\t\t#enclosed area\n", + "ia = zeros_like(a)\n", + "ia[0] = 407.;\n", + "\n", + "# Calculations\n", + "for i in range(1,10):\n", + " ia[i] = a[i]-a[i-1];\n", + "r = linspace(25.5,16.5,10)\n", + "rv = r*ia\n", + "\n", + "cv = zeros_like(rv)\n", + "cv[0] = 10378;\n", + "for i in range(1,10):\n", + " cv[i] = cv[i-1]+rv[i];\n", + "\n", + "eud = cv/a\n", + "print \"From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\";\n", + "#graph is plotted between eud and a.\n", + "# Results\n", + "plot(a,eud,a,eud,\"ro\")\n", + "xlabel(\"Area\")\n", + "ylabel(\"mean precipitation depth\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEPCAYAAACDTflkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPX1//FXTDBREXFBWQSDKSpUZVEWy2IshYBRlp9o\nXSkqLhUTpFZRkC+xStVWXAh1KQU3LO5SSkAJSAqKEJRdQCWKinWrdUMbJDG/P84NWZiEm2TuvXMn\n7+fjMY+585l7Z851kMNnBxEREREREREREREREREREREREREREWkk2gJLgbeATUC2U54D7ADWOo9B\nNVy/HdjgnFPoYZwiIhKDWgJdnOOmwNtAR2Ay8DsX178PHOZNaCIiEg1JHn72p84DYCewBWjjvE5w\n+RluzxMRkQDs59P3pAJdgZXO6yxgPTATaF7DNWXAYuAN4AqP4xMRkRjVFEsEw5zXR2I1jATgdiyR\nRNLKeW4BrAP6ehijiIjUg9fNRU2A+cBC4L4I76c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2Hbl7bzNmQRERERERERERERERERERER\nEREREREREREREREREQ/9f6P8zCLvqVdvAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 pg :133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import array\n", + "\n", + "#24h max. rainfall with return period of 8,15 and 25.\n", + "#24h max rainfall with 40%,24% and 8% probability.\n", + "#probabilty of rainfall of magnitude equal to or exceeding 100 mm.\n", + "\t\t\t\t\n", + "#Given\n", + "N = 20.;\n", + "r = array([142, 126, 116, 108, 102, 95, 92, 88, 86, 82, 80, 78, 76, 73, 71, 69, 68, 66, 65, 64],dtype=float64); \t\t\t\t#rainfall in respective years\n", + "m = linspace(1,20,20) \t\t\t\t#ranking of storm\n", + "p = m*100/(N+1)\n", + "T = 100/p\n", + "\n", + "# Calculations and Results\n", + "#from frequency curve obtained we get\n", + "#Part (a)\n", + "T1 = array([8, 15, 25]);\n", + "r1 = array([119, 134, 149]);\n", + "print \"Tyears Rainfallmm\";\n", + "for i in range(3):\n", + " print \"%i %i\"%(T1[i],r1[i]);\n", + "\n", + "\n", + "#Part (b)\n", + "p1 = [40 ,24, 8];\n", + "r2 = [87, 101, 130];\n", + "print \"probabilitypercent Rainfallmm\";\n", + "for i in range(3):\n", + " print \"%i %i\"%(p1[i],r2[i]);\n", + "\n", + "print \"For rainfall = 100 m.T = 4 years.Probability = 25 percent.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Tyears Rainfallmm\n", + "8 119\n", + "15 134\n", + "25 149\n", + "probabilitypercent Rainfallmm\n", + "40 87\n", + "24 101\n", + "8 130\n", + "For rainfall = 100 m.T = 4 years.Probability = 25 percent.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 pg : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "\n", + "#plot IDF curve for return period of 10,2 and 1 years umath.sing california formula\n", + "\t\t\t\t\n", + "#Given\n", + "t = array([5, 10, 20, 30, 60, 90, 120],dtype=float64); \t\t\t\t#duration\n", + "\t\t\t\t#value of P for respective return period is\n", + "p10 = array([10.6, 14.7, 19.3, 20.8, 25.5, 29, 34.7]); \t\t\t\t#rainfall for T = 10 years\n", + "p2 = array([8.2, 10.3, 13.2, 14.2, 16.6 ,19.4, 21.4]); \t\t\t\t#rainfall for T = 2 years\n", + "p1 = array([3.5, 6.2, 8.9, 10, 13.2, 15, 16.5]); \t\t\t\t#rainfall for T = 1 year\n", + "\n", + "\n", + "# Calculations\n", + "i1 = p10*60/t; \t\t\t\t#intensity of rainfall with return period of 10 years\n", + "i2 = p2*60/t; \t\t\t\t#intensity of rainfall with return period of 2 years\n", + "i3 = p1*60/t; \t\t\t\t#intensity of rainfall with return period of 1 year\n", + "\n", + "# Results\n", + "#graph is plotted between #t and i1 #t and i2 #t and i3\n", + "plot(t,i1)\n", + "plot(t,i2)\n", + "plot(t,i3)\n", + "xlabel(\"Duration\")\n", + "ylabel(\"Intensity\")\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXB/vFvIAlJ2EEEAmGtbK4oW4JIRLAUFVyK2r4q\nikv72v4Ul6rYBai1KnXB9lWKC2BFqbgCLrggUZAdBBSI7JAEwhb2kH1+fzwzySQkk0lyzsycmftz\nXXPNzJ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fjyHAckwNYQjm6mEeFfcTBfTF1C4Ou/f1FmUhVAB84n68BrMIpkjQ\nRQe7ACIhogvmi/sgZmlt7x9RcV6P8yhbuz8OeAnTpJQFTKjw3srW+K+4LcprW6HX9hL071NChGoU\nIqYz+9+UNTftxFzPPAqzXHq/Kj7nCYXDmIv7jPZ67QTQpML7XZj+jMGUNT3dDHxTt+KL2Eu/WCRS\nxWOGx8ZgahD/wVy+FeA7TFhsAjZjmoE8vGsERzHDXn/EXKNihddrMzHhk4u5kJNHNuZqeIswQfQx\nZdcU9953uF1BTkRERERERERERERERERERERERERERERERERERMTZ/j9cbU2THLkDTwAAAABJRU5E\nrkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 pg : 137" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "N = 20.;\n", + "m = linspace(1,20,20) \t\t\t\t#rank number\n", + "rd = array([82, 78, 75, 72, 70, 68, 65, 63, 61, 58, 56, 54, 52, 50, 46, 40, 36, 34, 32, 30]); \t\t\t\t#rainfall in decremath.sing order\n", + "\n", + "# Calculations\n", + "ri = rd[::-1]\n", + "T = N/(m-0.5);\n", + "\n", + "# Results\n", + "#from the curves\n", + "print \"maximum rainfall = 79cm for T = 15 years.\";\n", + "print \"minimum rainfall = 31 cm for T = 15 years.\";\n", + "#graph is plotted between rd and T;ri and T\n", + "subplot(121)\n", + "plot(T,rd)\n", + "xlabel(\"Reccurance interval\")\n", + "ylabel(\"rainfall cm\")\n", + "subplot(122)\n", + "plot(T,ri)\n", + "xlabel(\"Reccurance interval\")\n", + "ylabel(\"rainfall cm\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "maximum rainfall = 79cm for T = 15 years.\n", + "minimum rainfall = 31 cm for T = 15 years.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 44, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuUXGWZ7/Fvp3Pt3DvkRhJIkwtGEOQOClJyG0WIYjDg\n4CE6Oejg0eBioeAZj7SsYQmcI3KcWWcY5BwBr0QdkJvKRVpGQoRAAggJnYQ0CYZ0x9zT6SSddJ0/\nnl2p6k5V9a6qvevdu/bvs1atunTVW08qT9Wz3/fd+90gIiIiIiIiIiIiIiIiIiIiIiIiIiJSkuuA\n14G/eLcBGoGngFbgSWCMm9BEKqLcFunH8diXZChQj305ZgB3AN/wnnMjcJuT6ETKp9wW8eFy4N6c\n+9/CviCrgIneY5O8+yJxotwW8eF9wFtYF7kBWAL8ANiW85y6PvdF4kC5LTVjYIhtrwJux8ZGO4EV\nwME+z0l7F5E4UW6LlOFW4FrsCzTJe2wyBbrMM2bMyHyJdNEljMsaguM7t5XXulThUlJuDyjlyWWY\n4F0fBXwa+BnwCLDAe3wB8HC+F65du5Z0Oh3I5eabb1ZbaqvXBZvIrXpuK69ro60ox1Zqboc5HATw\nK2Ac0A18GdiB7TGxGFgItAHzQ45BJAzKbakJYReBj+R5bCtwQcjvKxI25bbUhLCHgyIhlUqpLbVV\nc6L62SahraDbc5nbdc7euX9pb3xLJHB1dXXgJv+V1xKqUnM7ET0BERHJT0VARCTBVARERBJMRUBE\nJMFUBEREEkxFQEQkwVQEREQSTEVARCTBVARERBJMRUBEJMFUBEREEkxFQEQkwVQEREQSTEVARCTB\nVARERBJMRUBEJMFUBEREEkxFQEQkwVQEREQSTEVARCTBVARERBJMRUBEJMFUBCRR0mnYvNl1FGbv\nXtiwwXUUknQDXQcgEoYdO2D1aru0tva+rqtzHZ159VVYt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jCn1TgNX3X8E7neQzgANlu6wCyCQbQmXM7BZyPdX33Yls0Q72/dec8\nr4fe/3f53vN+bJVBv4q1n/kCDKD457En5/ZSbMvqCOyzvMV7/F+wraTHsEWvmkuIUUqnvC7cvvIa\nzQnk04V1Q2/FurTrgMu9v9VhE2xg3cVrvdv1WHf1D8BnyHabM13eNmwLBmz970EF3nsUdqq5vcD7\nyI6DFpMvjme8mMd7jzcCR/loK59dXptgW2OFPo++0tiY7vex5Xwzp9Abha06CdlutYRPed2b8tqj\nIpCVO4u/Alvudz5wFbCQ7LK9c73nXId1WV/DuqdzsKS4Ffij9/zM2YF+iG0dZCa4MhNofd/3d9iW\nypvAd7GJrHzPyz1bUL44VgLfwsYrX/Wuc9cr7+/fn9v+L7Dlbl/GJtAKfR592wDrKl9FtssMtoX0\nSy/WzTmvqcbZvZJIeZ2/feW1iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjUjv8PwXoUiDrcApwA\nAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 pg : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t#average evaporation for one week\n", + "\t\t\t\t\n", + "#Given\n", + "w = [12, 5, 2, -3, 1, 6, 11]; \t\t\t\t#water added or taken out\n", + "r = [0, 6, 8, 12, 9, 5, 0]; \t\t\t\t#rainfall\n", + "pan = zeros(7)\n", + "le = zeros(7)\n", + "for i in range(7):\n", + " pan[i] = w[i]+r[i]; \t\t\t\t#Pan evaporation\n", + " le[i] = 0.8*pan[i]; \t\t\t\t#lake evaporation\n", + "s = sum(le)\n", + "\n", + "print \"daily lake evaporationmm:\";\n", + "for i in range(7):\n", + " print \"%.2f\"%(le[i]);\n", + "\n", + "av = s/7;\n", + "av = round(av*100)/100;\n", + "print \"average evaporation for one week = %.2f mm.\"%(av);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "daily lake evaporationmm:\n", + "9.60\n", + "8.80\n", + "8.00\n", + "7.20\n", + "8.00\n", + "8.80\n", + "8.80\n", + "average evaporation for one week = 8.46 mm.\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 pg : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#total depth and volume of evaporation loss\n", + "\t\t\t\t\n", + "#Given\n", + "Rh = 0.4; \t\t\t\t#relative humidity\n", + "A = 4.8; \t\t\t\t#average surface spread of reservior\n", + "v3 = 18.; \t\t\t\t#wind velocity at 3m above ground\n", + "es = 31.81; \t\t\t\t#saturated vapour pressure\n", + "Km = 0.36; \t\t\t\t#for large deep waters\n", + "\n", + "\n", + "# Calculations and Results\n", + "#umath.sing Meyer's formula\n", + "ea = es*Rh;\n", + "v9 = v3*(9./3)**(1./7);\n", + "E = Km*(es-ea)*(1+v9/16);\n", + "d = 7*E;\n", + "v = d*A*100/1000;\n", + "E = round(E*10)/10;\n", + "d = round(d*10)/10;\n", + "v = round(v*100)/100;\n", + "print \"umath.sing Meyers formula:\";\n", + "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n", + "print \"total depth = %.2f mm\"%(d);\n", + "print \"total volume = %.2f hectare-m.\"%(v);\n", + "\n", + "\t\t\t\t#umath.sing Rohwer's formula\n", + "Pa = 760.;\n", + "vdash = (0.6/2)**(1./7)*18;\n", + "E = 0.771*(1.465-0.000732*Pa)*(0.44+0.0733*vdash)*(es-ea);\n", + "d = 7*E;\n", + "v = d*A*100/1000;\n", + "E = round(E*10)/10;\n", + "d = round(d*10)/10;\n", + "v = round(v*10)/10;\n", + "print \"umath.sing Rohwers formula:\";\n", + "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n", + "print \"total depth = %.2f mm\"%(d);\n", + "print \"total volume = %.2f hectare-m.\"%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "umath.sing Meyers formula:\n", + "average evaporation loss from reservior = 15.90 mm/day.\n", + "total depth = 111.40 mm\n", + "total volume = 53.47 hectare-m.\n", + "umath.sing Rohwers formula:\n", + "average evaporation loss from reservior = 20.70 mm/day.\n", + "total depth = 145.20 mm\n", + "total volume = 69.70 hectare-m.\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16 pg : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "\n", + "#plot infiltration capacity curve\n", + "\t\t\t\t\n", + "#Given\n", + "D = 30.; \t\t\t\t#diameter of inside ring of infiltrometer\n", + "A = math.pi*D**2/4;\n", + "V = array([0, 200, 470, 840, 1405, 1840, 2245, 2510, 2745, 2885, 2990, 3130, 3270],dtype=float64); \t\t\t\t#cumulative volume;\n", + "t = array([0, 2, 5, 10, 20, 30, 45, 60, 80, 100, 120, 150, 180],dtype=float64); \t\t\t\t#Time(minutes)\n", + "\n", + "# Calculations and Results\n", + "dt = zeros_like(t)\n", + "\n", + "for i in range(1,13):\n", + " dt[i] = (t[i]-t[i-1])/60;\n", + "\n", + "F = V/A;\n", + "\n", + "Fd = zeros_like(F)\n", + "Fd[0] = F[0];\n", + "for i in range(1,13):\n", + " Fd[i] = F[i]-F[i-1];\n", + "\n", + "ft = Fd/dt \t\t\t\t#infirltration rate\n", + "\n", + "#from the graph\n", + "print \"constant rate of infiltration = 0.40 cm/hr.\";\n", + "avg10 = F[3]*60/10;\n", + "avg30 = F[5]*60/30;\n", + "avg10 = round(avg10*100)/100;\n", + "avg30 = round(avg30*100)/100;\n", + "print \"average rate of infiltration for first 10 min = %.2f cm/hr.\"%(avg10);\n", + "print \"average rate of infiltration for first 30 min = %.2f cm/hr.\"%(avg30);\n", + "#graph is plotted between ft and t\n", + "plot(t,ft)\n", + "xlabel(\"time in mins\")\n", + "ylabel(\"Infiltrtion rate\")\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "constant rate of infiltration = 0.40 cm/hr.\n", + "average rate of infiltration for first 10 min = 7.13 cm/hr.\n", + "average rate of infiltration for first 30 min = 5.21 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEPCAYAAABFpK+YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHk9JREFUeJzt3Xt4VNW9//F3SMItXFNAooJB1CpXQURuyoCA1daqIP5q\n0aLWWu1R9Kj9eemxpD3n8dgLtVjrsUpFpWpbrdXSWgSRgdoiUO5oUIwCKmgvnCoCEgg5f3z3MJOQ\ny2Rm9l57Zj6v55kne257fUmG71qz1tprgYiIiIiIiIiIiIiIiIiIiIiIiIiI5LAbgY3AJu9YRERy\n2AAs6bcFCoFFQF+nEYmICK18PPfJwArgU6AGWApM9rE8ERFJgp+JfxNwJlAKtAc+DxzrY3kiIpKE\nIh/PvRn4HrAQ2AOsBQ75WJ6IiCShIMCy7ga2Aw/GHujbt29tVVVVgCGIiOSEKuCEVN/sZ1cPQA/v\nZ2/gIuDJxCerqqqora0N3W3mzJnOY1BMiikf41JMyd1Ic6KMn109AM8AnwEOAN8APva5PBERaYbf\nif8sn88vIiIt5HdXT1aKRCKuQziCYkqOYkpeGONSTMEIcnC3IbVef5WIiCSpoKAA0sjfavGLiOQZ\nJX4RkTyjxC8ikmeU+EVE8owSv4hInglN4v/kE9i82XUUIiK5LzSJf/VqmD7ddRQiIrkvNPP49++H\n7t1h2zbo2tVxVCIiIZYz8/jbtIFRoyAadR2JiEhuC03iB5gwAV56yXUUIiK5TYlfRCTPhCrxDxoE\nu3bB9u2uIxERyV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vtiSXU31jK/OOHxQU283oXe2A5nc7zbkKZfLpIeJX4Ju39i\ng6EbscHdxN2s6u9sVf84dn8a8FVsOdtNWB98fc2dqyH1H2/oPcmcd5wX2xpsT9XZjZQnIiIiIiIi\nIiIiIiIiIiIiIiIiIiIiIiIiIiIiYfZ/7AvpCyJ/2BkAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17 pg : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#drainage desity\n", + "#form factor\n", + "#channel slope\n", + "#average overland flow length\n", + "\t\t\t\t\n", + "#Given\n", + "A = 82.; \t\t\t\t#area of watershed\n", + "d = 12.6; \t\t\t\t#dismath.tance between outlet and farther most point\n", + "l = 440.; \t\t\t\t#total length of channel\n", + "e = 656.; \t\t\t\t#elevation differnce between outlet and further most point\n", + "\n", + "\n", + "# Calculations\n", + "Dd = l/A;\n", + "ff = A/d**2;\n", + "cs = e/(d*1000);\n", + "lo = 1000/(2*Dd);\n", + "Dd = round(Dd*100)/100;\n", + "ff = round(ff*1000)/1000;\n", + "\n", + "# Results\n", + "print \"drainage desity = %.2f km/square.km.\"%(Dd);\n", + "print \"form factor = %.2f.\"%(ff);\n", + "print \"channel slope = %.2f.\"%(cs);\n", + "print \"average overland flow length = %i m.\"%(lo);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drainage desity = 5.37 km/square.km.\n", + "form factor = 0.52.\n", + "channel slope = 0.05.\n", + "average overland flow length = 93 m.\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 pg : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#compute fi and W index\n", + "\t\t\t\t\n", + "#Given\n", + "R = 3.6; \t\t\t\t#surface runoff\n", + "r = [0, 1.3, 2.8, 4.1, 3.9, 2.8, 2.0, 1.8, 0.9]; \t\t\t\t#rainfall at respective time\n", + "t = 4.; \t\t\t\t#total time\n", + "s = sum(r[2:]);\n", + "\n", + "# Calculations and Results\n", + "fi = (s-R*2)/6;\n", + "#math.since fi >1.3 and <1.8\n", + "print \"fi index = %.2f cm.\"%(fi);\n", + "print \"computations are correct.\";\n", + "\n", + "s = sum(r);\n", + "P = s/2;\n", + "Sr = 0.;\n", + "W = (P-R-Sr)/t;\n", + "print \"W index = %.2f cm/hr.\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 1.85 cm.\n", + "computations are correct.\n", + "W index = 1.55 cm/hr.\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 pg : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,array\n", + "\t\t\t\t\n", + "#Given\n", + "T = linspace(1,9,9) \t\t\t\t#time from start\n", + "r = array([0.7, 1.4, 2.4, 3.7, 2.9, 2.6, 1.7, 0.8, 0.5]); \t\t\t\t#increamental rainfall\n", + "R = 9.3; \t\t\t\t#total run-off\n", + "s = sum(r)\n", + "\n", + "ti = s-R;\n", + "#first trial\n", + "tr = 9.; \t\t\t\t#assumed\n", + "fi1 = ti/tr;\n", + "#this makes 1st,8th and 9th hour ineffective\n", + "\n", + "#second trial\n", + "tr = 6.;\n", + "ti = s-R-r[0]-r[7]-r[8];\n", + "fi = ti/tr;\n", + "P = zeros_like(r)\n", + "for i in range(9):\n", + " P[i] = r[i]-fi;\n", + " if (P[i]<0):\n", + " P[i] = 0;\n", + " \n", + "print \"Timeh rainfall excess.\";\n", + "for i in range(9):\n", + " print \"%.2f %.2f\"%(T[i],P[i]);\n", + "\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n", + "print \"time of rainfall excess = %i hours..\"%(tr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Timeh rainfall excess.\n", + "1.00 0.00\n", + "2.00 0.50\n", + "3.00 1.50\n", + "4.00 2.80\n", + "5.00 2.00\n", + "6.00 1.70\n", + "7.00 0.80\n", + "8.00 0.00\n", + "9.00 0.00\n", + "fi index = 0.90 cm/hr.\n", + "time of rainfall excess = 6 hours..\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 pg : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "P = array([72.2, 70.1, 73.3, 42.5, 81.3, 50.6, 52.9, 59.4, 60.3, 64.3, 68.8, 56.7, 77.2, 40.5, 44.1, 65.5]); \t\t\t\t#Precipitation\n", + "R = array([24.1, 22.7, 25.6, 11.3, 28.4, 12.7, 13.4, 15.7, 16.2, 17.7, 19.2, 14.9, 25.4, 10.6, 11.7, 17.9]); \t\t\t\t#runoff\n", + "\n", + "# Calculations\n", + "Ps = P**2\n", + "Rs = R**2;\n", + "PR = P*R;\n", + "\n", + "s = sum(Ps)\n", + "t = sum(Rs)\n", + "u = sum(PR)\n", + "q = sum(P)\n", + "w = sum(R)\n", + "N = 16.;\n", + "a = (N*u-q*w)/(N*s-q**2);\n", + "b = (w-a*q)/N;\n", + "b = round(b*1000)/1000;\n", + "a = round(a*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Equation is:%.4f P %.3f.\"%(a,b);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:0.4375 P -8.823.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21 pg : 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import linspace,array\n", + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "A = 8.6; \t\t\t\t#catchment area\n", + "T = linspace(0,4,9) \t\t\t\t#time\n", + "r = array([0, 0.4, 1.1, 2.3, 3.8, 4.8, 5.6, 6.2, 6.7]); \t\t\t\t#accumulated rainfall\n", + "fi = 0.4; \t\t\t\t#fi index\n", + "dt = 0.5; \t\t\t\t#time interval\n", + "\n", + "# Calculations and Results\n", + "d = zeros_like(r)\n", + "\n", + "for i in range(1,9):\n", + " d[i] = r[i]-r[i-1]; \t\t\t\t#accumulated rainfall\n", + "\n", + "print \"Intensity of effective Rainfall:\";\n", + "I = zeros_like(r)\n", + "p = zeros_like(r)\n", + "s = 0;\n", + "for i in range(1,9):\n", + " p[i] = d[i]-fi; \t\t\t\t#effective rainfall\n", + " I[i] = p[i]/dt; \t\t\t\t#Intensity of effective Rainfall\n", + " s = s+I[i];\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "#graph is plotted between I and T\n", + "run = s*dt;\n", + "V = run*A*10000;\n", + "print \"Volume of direct run-off = %.2f cubic metre.\"%(V);\n", + "plot(T,I)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Intensity of effective Rainfall:\n", + "0.00\n", + "0.60\n", + "1.60\n", + "2.20\n", + "1.20\n", + "0.80\n", + "0.40\n", + "0.20\n", + "Volume of direct run-off = 301000.00 cubic metre.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHzVJREFUeJzt3Xl4VGWaxuFf2EWglUFRQQ0C2uLY7mxiU6Ki0goOiIA6\nTrthYyOOCLTSdot0jwIqS0BAZJF9kcUGBEXUsIxAgyCLEmRT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fnkc\nNyjy+mrg6qSmExERERGRovHDoqdoGUPAPmBV5PFc0pKdMBIbt1hbwDWu7yNEzxnC/b0EOB/4CPgM\nWAd0yuc61/c0lpwh3N/TctjU50+Bz4GX8rnO9f2MJWcI9/cTbF3RKmBWPq87vZclse6ZdKA00fvo\n65H8PvpYMoaAmUlNdaobsP+B+RVN1/fxuGg5Q7i/lwDnAFdGnlfAuhq99m8TYssZwhv3tHzkYyns\nXjXK9boX7idEzxnCG/ezMzCevLMU+l7Ge28ZPyx6iiUjJHev+7wsAr4v4HXX9/G4aDnB/b0E2IH9\nIAc4AKwHcm8H54V7GktO8MY9PRT5WAZrNO3J9boX7idEzwnu72d1rIAPzydLoe9lvIu7HxY9xZIx\nDDTEfv2Zg2294DWu72OsvHgv07HfNpbl+rzX7mk6eef0yj0tgf0g2ol1JX2e63Wv3M9oOb1wP/sB\nXbGp5nkp9L2Md3GP66KnBInla63E+j6vAAYCbyc0UdG5vI+x8tq9rABMBZ7EWsa5eeWeFpTTK/c0\nB+tCqg78FuveyM0L9zNaTtf38w5gF9bfXtBvEIW6l/Eu7t9iN+m487GfMAVdUz3yuWSJJeMPnPhV\nbi7WN1858dEKxfV9jJWX7mVpYBowjry/gb1yT6Pl9NI9BRuMfAe4NtfnvXI/j8svp+v72RDrdtkK\nTASaAGNyXeP8Xvph0VMsGaty4qdkXax/3oV0YhtQdb14LJ38c3rlXqZh3zD9CrjGC/c0lpxeuKdV\nsH5fgNOAhcBNua7xwv2MJacX7udxjcl7towX7qUvFj1Fy/hHbBrap8DH2M1MtonAd8ARrK/tIbx3\nHyF6Ti/cS7AZEjmRHMenvN2O9+5pLDm9cE8vx7ozPgXWYP3F4L37GUtOL9zP4xpzYraM1+6liIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiMgJ/w/tPDqafh5U1AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22 pg : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import array,linspace\n", + "#total rainfall\n", + "#total rainfall excess\n", + "#W index\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([3.5, 6.5, 8.5 ,7.8, 6.4, 4, 4, 6]); \t\t\t\t#rainfall intensity\n", + "T = linspace(0,240,8) \t\t\t\t#time\n", + "dt = 30.; \t\t\t\t#time interval\n", + "\n", + "# Calculations\n", + "s = sum(r);\n", + "P = s*dt/60;\n", + "Pe = ((6.5-4.5)+(8.5-4.5)+(7.8-4.5)+(6.4-4.5)+(6-4.5))*dt/60; \t\t\t\t#area of graph above r = 4.5.\n", + "w = (P-Pe)/4;\n", + "\n", + "# Results\n", + "print \"total rainfall = %.2f cm.\"%(P);\n", + "print \"total rainfall excess = %.2f cm.\"%(Pe);\n", + "print \"W index = %.2f cm/hr.\"%(w);\n", + "plot(T,r)\n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "total rainfall = 23.35 cm.\n", + "total rainfall excess = 6.35 cm.\n", + "W index = 4.25 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHxZJREFUeJzt3Xm8lnP+x/HXaVPJtFGWpCYzohQmhmo4spU1MYZfE2KE\nUESWmdSRmaKSbVpVKI1CpJCU3FKJUqnTokUpabO2aD3dvz8+5zhHqrNd9/W9lvfz8TiPs9y3+/qc\ny9XnfO/P9f1+viAiIiIiIiIiIiIiIiIiIiIiIiIiMdcRWABkZn8tIiIBVx9L3GWBksAkoI7TiERE\nhBL5PF4X+ATYAWQBHwKtUh2UiIgcXH7JOxP4C1AFKA9cAtRIdVAiInJwpfJ5fAnwOPA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nYtuQKf9PDfq5+JIbGYaQAXgCywvxO3aONB58Oy6KM5JOiP7\nAKuA3cAo4IpivF5Y7Ttj53LsHgHZn1v6G45vPgJ+2OdnB/rdrwBexq6TVdh1c0bqQ/TN/s4F7H82\nV9TPxXosCQFsBRYDxxC/a+NA5wE8ui6Kk7yPAdbk+f7rPMHFRRKYDMwGbsn+WXXsLTTZn6s7iMuV\nA/3uR2PXR464XCt3AZ8DQ8ktE8TpXNTC3pF8QryvjVrYeZiZ/b0n10VxkneyGP9tVDTB/qe0AO7A\n3j7nlSS+5ym/3z3q52UAUBt767wOeOIgz43iuagAjAE6Alv2eSxO10YF4DXsPGzFw+uiOMl7LVaU\nz3Esv/7LEQfrsj9vAt7A3uZswOpdYNMsNzqIy5UD/e77Xis1sn8WZRvJTVJDyH0LHIdzURpL3COA\nsdk/i+O1kXMeXiL3PATiuiiFrRCqhTWsitsNy/LAYdlfHwpMx+4Q9yJ35s2DRPeGJdj/+31vWO7v\nd8+5GVMGG3WsoGire4OsFr8+F0fl+foe4H/ZX0f9XKQBw4En9/l53K6NA52HwFwXLbC7qMuxaS5x\nUhs72fOwqUA5v38VrA4e9amCLwPfALuwex9tOfjv/k/sOlkCXORrpKm377m4CfuHOx+rbY7l1/c+\nonwummK9kOaROx2uOfG7NvZ3HloQ3+tCREREREREREREREREREREREREREREREREJHj+HwzG1UV6\no0m7AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 pg : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros_like\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([0, 8, 22, 74, 92, 105, 114, 120],dtype=float64); \t\t\t\t#raccumulated rainfall\n", + "T = array([0, 2, 4, 6, 8, 10, 12, 14],dtype=float64); \t\t\t\t#time for start of rainfall\n", + "V = 2e6; \t\t\t\t#volume of run-off\n", + "A = 40.; \t\t\t\t#catchment area\n", + "tr = 14.; \t\t\t\t#duration of rainfall\n", + "\n", + "# Calculations\n", + "d = V*1000/(40*1000000);\n", + "\n", + "l = r[7]-d;\n", + "W = l/tr;\n", + "I = zeros_like(r)\n", + "for i in range(1,8):\n", + " I[i] = r[i]-r[i-1]; \t\t\t\t#incremental rainfall\n", + "\n", + "\n", + "#rainfall excess is available in 4 time intervals of 2 hrs\n", + "tre = 8.;\n", + "fi = (l-I[1]-I[6]-I[7])/tre;\n", + "fi = round(fi*100)/100;\n", + "\n", + "# Results\n", + "print \"fi index = %.2f mm/hr.\"%(fi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 5.88 mm/hr.\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 pg : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "#Given\n", + "r = array([2.0 ,2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n", + "R = 25.5;\n", + "\n", + "# Calculations\n", + "s = sum(r)\n", + "tf = s-R;\n", + "af = tf/12;\n", + "#rainfall is less than average infiltration in1st,2nd,11th and 12th hours\n", + "\n", + "f = (tf-r[0]-r[1]-r[10]-r[11])/8;\n", + "f = round(f*10)/10;\n", + "\n", + "# Results\n", + "print \"average infiltration index = %d cm/hour.\"%(f);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average infiltration index = 3 cm/hour.\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25 pg : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,zeros_like,array\n", + "\t\t\t\t\n", + "#Given\n", + "r = array([2.0, 2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n", + "A1 = 20.;\n", + "A2 = 40.;\n", + "A3 = 60.;\n", + "\n", + "# Calculations and Results\n", + "A = A1+A2+A3;\n", + "fi1 = 7.6;\n", + "fi2 = 3.8;\n", + "fi3 = 1.0;\n", + "R1 = zeros_like(r)\n", + "R2 = zeros_like(r)\n", + "R3 = zeros_like(r)\n", + "for i in range(12):\n", + " R1[i] = r[i]-fi1; \t\t\t\t#rainfall excess\n", + " R2[i] = r[i]-fi2;\n", + " R3[i] = r[i]-fi3;\n", + " if (R1[i]<0):\n", + " R1[i] = 0;\n", + " if (R2[i]<0):\n", + " R2[i] = 0;\n", + " if (R3[i]<0):\n", + " R3[i] = 0;\n", + "\n", + "print \"average depth of hourly rainfall excesscm/hr\";\n", + "a1 = zeros(12)\n", + "a2 = zeros(12)\n", + "a3 = zeros(12)\n", + "T = zeros(12)\n", + "for i in range(12):\n", + " a1[i] = R1[i]*A1/A; \t\t\t\t#average rainfall excess\n", + " a2[i] = R2[i]*A2/A;\n", + " a3[i] = R3[i]*A3/A;\n", + " T[i] = a1[i]+a2[i]+a3[i]; \t\t\t\t#total hourly rainfall excess\n", + " T[i] = round(T[i]*100)/100;\n", + " print \"%.2f\"%(T[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average depth of hourly rainfall excesscm/hr\n", + "0.50\n", + "0.75\n", + "4.57\n", + "1.40\n", + "7.57\n", + "2.40\n", + "4.07\n", + "6.97\n", + "3.57\n", + "1.40\n", + "0.20\n", + "0.20\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 pg : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array,linspace\n", + "#derive the unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "A = 92.; \t\t\t\t#area of drainage bamath.sin\n", + "t = array([6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 4, 6, 8, 10, 12, 14, 16],dtype=float64); \t\t\t\t#time\n", + "r = array([10.6, 9.7, 107.8, 175.6, 193.9, 150.3, 126.2, 106.9, 90, 72.8, 58.2, 48, 36.2, 28.4, 20.2, 14, 10.2, 10.4]); \t\t\t\t#total run-off\n", + "B = array([10.6, 9.7, 9.73, 9.77, 9.8, 9.83, 9.87, 9.9, 9.93, 9.97, 10, 10.03, 10.07, 10.10, 10.13, 10.16, 10.20, 10.40]); \t\t\t\t#base flow\n", + "s = 0;\n", + "\n", + "# Calculations and Results\n", + "d = r - B\n", + "s = sum(d)\n", + "\n", + "n = 0.36*s*2/A;\n", + "print \"ordinates of unit hydrograph:\";\n", + "u = zeros(18)\n", + "for i in range(18):\n", + " u[i] = d[i]/n; \t\t\t\t#ordinates of unit hydrograph\n", + " u[i] = round(u[i]*100)/100;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "print \"Hydograph is 4-hr unit hydrograph\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of unit hydrograph:\n", + "0.00\n", + "0.00\n", + "11.50\n", + "19.45\n", + "21.60\n", + "16.48\n", + "13.65\n", + "11.38\n", + "9.39\n", + "7.37\n", + "5.65\n", + "4.45\n", + "3.07\n", + "2.15\n", + "1.18\n", + "0.45\n", + "0.00\n", + "0.00\n", + "Hydograph is 4-hr unit hydrograph\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27 pg : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "A = 316.; \t\t\t\t#drainage area\n", + "B = 17.; \t\t\t\t#base flow\n", + "t = 6.;\n", + "O = [17.0, 113.2, 254.5, 198.0, 150.0, 113.2, 87.7, 67.9, 53.8, 42.5, 31.1, 22.6, 17.0]; \t\t\t\t#ordinates of storm hydrograph\n", + "Or = zeros(13)\n", + "Oh = zeros(13)\n", + "for i in range(13): \n", + " Or[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + " Oh[i] = Or[i]/6.477; \t\t\t\t#ordinates of unit hydrograph\n", + "\n", + "\n", + "s = sum(Or);\n", + "re = s*60*60*t/(A*10000);\n", + "re = round(re*1000)/1000;\n", + "\n", + "# Results\n", + "print \"rainfall excess = %.2f cm.\"%(re);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rainfall excess = 6.48 cm.\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28 pg : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 2.5; \t\t\t\t#infiltration index\n", + "B = 10; \t\t\t\t#Base flow\n", + "O = [0, 110, 365, 500, 390, 310, 250, 235, 175, 130, 95, 65, 40, 22, 10, 0, 0, 0]; \t\t\t\t#ordinates of unit hydrograph\n", + "R1 = 2;R2 = 6.75;R3 = 3.75;\n", + "r1 = (R1*10-(fi*3)-5)/10; \t\t\t\t#rainfall excess in first three hour\n", + "r2 = (R2*10-(fi*3))/10; \t\t\t\t#rainfall excess in second three hour\n", + "r3 = (R3*10-(fi*3))/10; \t\t\t\t#rainfall excess in third three hour\n", + "\n", + "s1 = zeros(18)\n", + "for i in range(18):\n", + " s1[i] = r1*O[i]; \n", + "s2 = zeros(18)\n", + "for i in range(1,18):\n", + " s2[i] = r2*O[i-1];\n", + "s3 = zeros(18)\n", + "for i in range(2,18):\n", + " s3[i] = r3*O[i-2];\n", + " \t\t\t\t#surface run-off from rainfall excess during succesive unit periods\n", + "print \"ordinates of storm hydrograph\";\n", + "T = zeros(18)\n", + "t = zeros(18)\n", + "for i in range(18):\n", + " T[i] = s1[i]+s2[i]+s3[i];\n", + " t[i] = T[i]+B;\n", + " t[i] = round(t[i]*10)/10;\n", + " print \"%.2f\"%(t[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of storm hydrograph\n", + "10.00\n", + "92.50\n", + "943.80\n", + "2905.00\n", + "4397.50\n", + "4082.50\n", + "3227.50\n", + "2616.30\n", + "2301.30\n", + "1862.50\n", + "1386.30\n", + "1018.80\n", + "715.00\n", + "461.50\n", + "269.50\n", + "136.00\n", + "40.00\n", + "10.00\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.29 pg : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from numpy import array,linspace,zeros\n", + "#derive and plot 6 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "A = 103.4; \t\t\t\t#area of bamath.sin\n", + "t = linspace(0,36,9); \t\t\t\t#time\n", + "q = [0, 21, 80, 82, 189, 123, 184, 87, 55.5, 25.25, 9, 6, 0]; \t\t\t\t#flow\n", + "print \"ordinates of unit hydrograph are:\";\n", + "u = zeros(9)\n", + "u[0] = 0;\n", + "u[1] = q[1]/2.;\n", + "u[2] = (q[2]-4*u[0])/2;\n", + "u[3] = (q[3]-4*u[1])/2;\n", + "for i in range(4,9):\n", + " u[i] = (q[i]-3*u[i-4]-4*u[i-2])/2; \t\t\t\t#ordinates of unit hydrograph\n", + "\n", + "for i in range(9):\n", + " print \"%.2f\"%(u[i]);\n", + "print \"The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\";\n", + "#graph is plotted between u and t.\n", + "plot(t,u)\n", + "xlabel(\"Time in hours\")\n", + "ylabel(\"Discharge\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "ordinates of unit hydrograph are:\n", + "0.00\n", + "10.50\n", + "40.00\n", + "20.00\n", + "14.50\n", + "5.75\n", + "3.00\n", + "2.00\n", + "0.00\n", + "The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFOW1x/HvwICyiMgSJCyCEpC4gaKAEm1QAgoiu3u4\nUROXqHFLYmKMk2siiVeNXqOSq2Lc44IiqKigtooIgmyCCoKiQNgUIWwizPT941Q7zdgz0z3T1W9V\n9e/zPP1Md/VSx3LoM+92XhAREREREREREREREREREREREREREclaXWAeMNl73AyYCiwFXgGaOopL\nRKTg1cnDOX4JfAAkvMfXYkmgM/Cq91hERCKoLTAN6Et5S+AjoJV3f3/vsYiIRNBTQHfgBMqTwFcp\nzxdVeCwiInnkZ3fQYGA9Nh5QVMlrEpR3E4mISJ4V+/jZxwJDgFOAvYEmwMPAOqwbaC3QGksU33HQ\nQQclli9f7mN4IiKRtBzolOmL/WwJ/A5oB3QEzgBeA84FJgFjvNeMASame/Py5ctJJBKBv91www1O\nz3/QQQlatkzw6qvBjTEs11JxKs4oxAkclM0XdT5mByUlu33+AvTHpoj28x5LDaxbB19+CVddBU88\n4ToaEQmjfCWBN7CuIYCNwEnYFNEfA5vyFEPkzJgBvXvDGWfAM8/A7t2uIxKRsMlnSyCSYrGYs3PP\nmAHHHQcdOsCBB8Jrr6V/ncsYs6E4c0tx5lZY4sxWZbN2giDh9W9JJY49Fv78Z+jbF269FT78EO67\nz3VUIuJSUVER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SR8rgY\n+4t9MfZXejaSX8ilVP5vZ2fK/eTrKv61X5RybDflLfK9K7xue8r9x7GNYgYDL2Itg9cRqSV1B0nU\nZLL93xKgJdDLe1wP676p6edVJeGdrwNwkHfsXOAN7/4KrEsKrHuqsvN2xFoTdwLPYZUuRWpNSUDC\nLLW/Pt19+O5f4QmsdTAS+Cvl5Zd7V3OOTI5XtovTTqyk91PYwPBuYJz33B+xbqHZ3vHK/jtGY91b\n87CurIcqiUtEREREREREREREREREREREREREREREREREREQKzf8DeqePJCpdlVkAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.30 pg : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\n", + "\n", + "#derive ordinates of 6 hrs unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "R = [0, 1, 2.7, 5, 8, 9.8, 9, 7.5, 6.3, 5, 4, 2.9, 2.1, 1.3 ,0.5, 0, 0, 0, 0, 0]; \t\t\t\t#2hrs unit hydrograph\n", + "print \"ordinates of 6 hrs unit hydrograph\";\n", + "O1 = zeros(20)\n", + "for i in range(18):\n", + " O1[i+2] = R[i];\n", + "O2 = zeros(20)\n", + "for i in range(16):\n", + " O2[i+4] = R[i];\n", + "S = zeros(20)\n", + "f = zeros(20)#offset unit hydrograph\n", + "for i in range(20):\n", + " S[i] = O1[i]+O2[i]+R[i]; \t\t\t\t#sum\n", + " f[i] = S[i]/3; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n", + " f[i] = round(f[i]*10)/10;\n", + " print \"%.2f\"%(f[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of 6 hrs unit hydrograph\n", + "0.00\n", + "0.30\n", + "0.90\n", + "2.00\n", + "3.60\n", + "5.30\n", + "6.60\n", + "7.40\n", + "7.80\n", + "7.40\n", + "6.40\n", + "5.10\n", + "4.10\n", + "3.10\n", + "2.20\n", + "1.40\n", + "0.90\n", + "0.40\n", + "0.20\n", + "0.00\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31 pg : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,linspace,zeros\n", + "\t\t\t\t\n", + "#Given\n", + "t = linspace(0,45,16) \t\t\t\t#time\n", + "O = [0 ,9, 20, 35, 49, 43, 35, 28, 22, 17, 12, 9, 6, 3, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n", + "\n", + "# Calculations and Results\n", + "of = zeros(16)\n", + "for i in range(2,16):\n", + " of[i] = O[i-2]+of[i-2]; \t\t\t\t#offset ordinate\n", + "\n", + "s = zeros(16)\n", + "for i in range(16):\n", + " s[i] = O[i]+of[i]; \t\t\t\t#ordinate of s-curve\n", + "\n", + "of1 = zeros(16)\n", + "for i in range(3,16):\n", + " of1[i] = s[i-3]; \t\t\t\t#offset of s-curve\n", + "\n", + "print \"ordinates of 9 hrs unit hydrograph:\";\n", + "y = zeros(16)\n", + "u = zeros(16)\n", + "for i in range(16):\n", + " y[i] = s[i]-of1[i];\n", + " u[i] = 2*y[i]/3; \t\t\t\t#ordinate of 9 hrs unit hydrograph\n", + " u[i] = round(u[i]*10)/10;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of 9 hrs unit hydrograph:\n", + "0.00\n", + "6.00\n", + "13.30\n", + "29.30\n", + "40.00\n", + "44.70\n", + "40.00\n", + "30.70\n", + "26.00\n", + "18.70\n", + "15.30\n", + "10.00\n", + "8.00\n", + "4.00\n", + "2.00\n", + "0.00\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.32 pg : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,linspace\n", + "\n", + "\n", + "#california method\n", + "#Hazens method\n", + "#gumbels method\n", + "\t\t\t\t\n", + "#Given\n", + "q = [9200, 7800, 6600, 5800, 5260, 4980, 4525, 3810, 3630, 3250, 3110, 3090, 2380, 2390, 1723]; \t\t\t\t#Discharge arranged in decreamath.sing order\n", + "N = 15;\n", + "C = 0.3;\n", + "m = linspace(1,15,15)\n", + "C = [0.3, 0.44, 0.52, 0.57, 0.61, 0.66, 0.7, 0.74, 0.78, 0.82, 0.86, 0.88, 0.94, 0.96, 1]; \t\t\t\t#from table 4.25\n", + "print \"California Hazen Gumbel\";\n", + "Ca = zeros(15)\n", + "H = zeros(15)\n", + "G = zeros(15)\n", + "Ca = zeros(15)\n", + "G = zeros(15)\n", + "\n", + "for i in range(15):\n", + " Ca[i] = N/m[i];\n", + " H[i] = 2*N/(2*m[i]-1);\n", + " G[i] = N/(m[i]+C[i]-1);\n", + " Ca[i] = round(Ca[i]*100)/100;\n", + " G[i] = round(G[i]*100)/100;\n", + " H[i] = round(H[i]*100)/100;\n", + " print \"%.2f %.2f %.2f\"%(Ca[i],H[i],G[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "California Hazen Gumbel\n", + "15.00 30.00 50.00\n", + "7.50 10.00 10.42\n", + "5.00 6.00 5.95\n", + "3.75 4.29 4.20\n", + "3.00 3.33 3.25\n", + "2.50 2.73 2.65\n", + "2.14 2.31 2.24\n", + "1.88 2.00 1.94\n", + "1.67 1.76 1.71\n", + "1.50 1.58 1.53\n", + "1.36 1.43 1.38\n", + "1.25 1.30 1.26\n", + "1.15 1.20 1.16\n", + "1.07 1.11 1.07\n", + "1.00 1.03 1.00\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.33 pg : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 40.;\n", + "T2 = 80.; \t\t\t\t#Return period\n", + "F1 = 27000.;\n", + "F2 = 31000.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y80 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y40 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y80-y40);\n", + "T = 240.;\n", + "y240 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x240 = F2+(y240-y80)*y;\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %i cumec.\"%(x240);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 37306 cumec.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.34 pg : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "N = 40;\n", + "Sn = 1.1413;\n", + "yn = 0.5436; \t\t\t\t#from table 4.21 (a) and(b)\n", + "q = [1330, 1095, 1030, 980, 975, 950, 945, 940, 925, 855, 853, 840, 835, 825, 810, 795, 756, 710, 708, 705, 700, 670, 625, 620, 610, 605, 595, 585, 570, 550, 530, 505, 500, 495, 485, 465, 460, 420, 390, 380]; \t\t\t\t#discharge\n", + "s = sum(q)\n", + "xavg = s/N;\n", + "w = 0;\n", + "\n", + "# Calculations\n", + "t = zeros(40)\n", + "for i in range(40):\n", + " t[i] = (q[i]-xavg)**2;\n", + " w = w+t[i];\n", + "\n", + "sigma = (w/(N-1))**0.5;\n", + "N = 10.;\n", + "y10 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K10 = (y10-yn)/Sn;\n", + "x10 = xavg+K10*sigma;\n", + "N = 20.;\n", + "y20 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K20 = (y20-yn)/Sn;\n", + "x20 = xavg+K20*sigma;\n", + "N = 5.;\n", + "y5 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n", + "K5 = (y5-yn)/Sn;\n", + "x5 = xavg+K5*sigma;\n", + "\n", + "T = 100.;\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "K100 = (y100-yn)/Sn;\n", + "x100 = xavg+K100*sigma;\n", + "\n", + "T = 200.;\n", + "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "K200 = (y200-yn)/Sn;\n", + "x200 = xavg+K200*sigma;\n", + "x100 = round(x100);\n", + "\n", + "# Results\n", + "print \"For T = 100 years:flood discharge = %.2f cumecs.\\\n", + "\\nFor T = 200 years:flood discharge = %.f cumecs.\"%(x100,x200);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For T = 100 years:flood discharge = 1487.00 cumecs.\n", + "For T = 200 years:flood discharge = 1620 cumecs.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.35 pg : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "sigma = 1.1413; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "yn = 0.5436;\n", + "T = 50.;\n", + "\n", + "# Calculations\n", + "y50 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K50 = (y50-yn)/sigma;\n", + "T = 100.;\n", + "y100 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K100 = (y100-yn)/sigma;\n", + "x50 = 878; x100 = 970; \t\t\t\t\n", + "#Given peak flood\n", + "A = [[K50, 1],[K100, 1]];\n", + "B = [x50,x100];\n", + "C = solve(A,B)#A\\B;\n", + "xavg = C[1];\n", + "sigmad = C[0];\n", + "T = 200.;\n", + "y200 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K200 = (y200-yn)/sigma;\n", + "x200 = xavg+K200*sigmad;\n", + "x200 = round(x200);\n", + "\n", + "# Results\n", + "print \"200 year flood for stream = %.2f cumecs.\"%(x200);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "200 year flood for stream = 1062.00 cumecs.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.36 pg : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#risk of failure of cofferdam\n", + "#return period\n", + "\n", + "#Given\n", + "T = 30.; \t\t\t\t#deign for period\n", + "n = 6.; \t\t\t\t#period of construction\n", + "\n", + "# Calculations\n", + "R = (1-(1-(1/T))**n)*100;\n", + "R1 = 0.1; \t\t\t\t#reduced risk\n", + "T1 = 1./(1-(1-R1)**(1./6));\n", + "R = round(R*10)/10;\n", + "T1 = round(T1*100)/100;\n", + "\n", + "# Results\n", + "print \"risk of failure of cofferdam = %.2f percent.\"%(R);\n", + "print \"return period = %.2f years.\"%(T1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "risk of failure of cofferdam = 18.40 percent.\n", + "return period = 57.45 years.\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.37 pg : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#probability of excedence\n", + "#probability of flood magnitude occuring at:\n", + "#at least once in 10 years\n", + "#two times in 10 succesive years\n", + "#once in 10 succesive years\n", + "\n", + "#Given\n", + "T = 40.; \t\t\t\t#return period\n", + "P = 1./T;\n", + "n = 10;\n", + "Rsk = 1.-(1-P)**n;\n", + "s = 1.;\n", + "t = 1.;\n", + "for i in range(1,n+1): \n", + " s = s*i;\n", + "\n", + "for i in range(1,n-1):\n", + " t = t*i;\n", + "\n", + "P2n = s*P**2*(1-P)**8/(t*2);\n", + "P1n = n*P*(1-P)**(n-1);\n", + "Rsk = round(Rsk*1000)/1000;\n", + "P2n = round(P2n*10000)/10000;\n", + "P1n = round(P1n*1000)/1000;\n", + "\n", + "# Results\n", + "print \"probability of excedence = %.2f.\"%(P);\n", + "print \"probability of flood magnitude occuring at least once in 10 years = %.2f\"%(Rsk);\n", + "print \"probability of flood magnitude occuring at two times in 10 succesive years = %.2f\"%(P2n);\n", + "print \"probability of flood magnitude occuring at once in 10 succesive years = %.2f\"%(P1n);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of excedence = 0.03.\n", + "probability of flood magnitude occuring at least once in 10 years = 0.22\n", + "probability of flood magnitude occuring at two times in 10 succesive years = 0.02\n", + "probability of flood magnitude occuring at once in 10 succesive years = 0.20\n" + ] + } + ], + "prompt_number": 87 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.38 pg : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "C1 = 0.22;C2 = 0.12;C3 = 0.32; \t\t\t\t#run-off coefficient\n", + "A1 = 3.2;A2 = 4.8;A3 = 1.8; \n", + "L = 2.4; \t\t\t\t#length of water course\n", + "H = 30; \t\t\t\t#fall\n", + "T = 30; \t\t\t\t#frequency\n", + "\n", + "# Calculations\n", + "t = 60*0.000323*(L*1000)**0.77*(H/(L*1000))**(-0.385);\n", + "i = 78*T**0.22/(t+12)**0.45;\n", + "q = 2.778*i*(C1*A1+C2*A2+C3*A3);\n", + "q = round(q*10)/10;\n", + "\n", + "# Results\n", + "print \"peak rate of run off = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak rate of run off = 141.20 cumecs.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.39 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "T = 30; \t\t\t\t#return period\n", + "A = 2.4; \t\t\t\t#area of watershed\n", + "s = 1./200; \t\t\t\t#slope oof catchment\n", + "L = 1.8; \t\t\t\t#length of travel of water\n", + "C = 0.25; \t\t\t\t#average run-off coefficient\n", + "r = [2.5, 3.8, 4.8, 5.9, 6.7, 7.4, 8.4, 8.7, 9.2]; \t\t\t\t#rmath.sinfall depth\n", + "\n", + "# Calculations\n", + "t = 60*0.000323*(L*1000)**0.77*(s)**(-0.385); \n", + "rmax = r[6]+(r[7]-r[6])*7.84/10;\n", + "i = rmax*60/t;\n", + "q = 2.778*C*A*i;\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"peak flow rate = %.2f cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak flow rate = 18.05 cumecs.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.40 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "pA = 75.; \t\t\t\t#precipitation at A\n", + "pB = 58; \t\t\t\t#precpitation at B\n", + "pC = 47; \t\t\t\t#precipitation at C\n", + "nA = 826; \t\t\t\t#normal precipitation at A\n", + "nB = 618; \t\t\t\t#normal precipitation at B\n", + "nC = 482; \t\t\t\t#normal precipitation at C\n", + "nX = 757; \t\t\t\t#normal precipitation at X\n", + "\n", + "\n", + "# Calculations\n", + "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3.;\n", + "pX = round(pX*10)/10;\n", + "\n", + "# Results\n", + "print \"precipitation at x = %.2f cm.\"%(pX);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "precipitation at x = 70.90 cm.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.41 pg : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "p = [41, 51, 32, 55, 50, 68]; \t\t\t\t#rain guage readings at respective stations\n", + "s = sum(p)\n", + "pavg = s/6;\n", + "u = 0;\n", + "for i in range(5):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "# Calculations\n", + "sx = (u/5)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/8)**2;\n", + "N = round(N*100)/100;\n", + "\n", + "# Results\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 49.00 cm.\n", + "total stations needed = 5.08.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.42 pg : 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "a = 4; \t\t\t\t#dimension of plot sides\n", + "P1 = 4.8;P2 = 13;P3 = 8;P4 = 5.4;P5 = 3.2;P6 = 9.4; \t\t\t\t#precipitaion at respective stations\n", + "\n", + "# Calculations\n", + "A1 = a**2/8+a**2/(4*1.73);\n", + "A2 = a**2/8;\n", + "A3 = A2;A4 = A1;\n", + "A5 = a**2/(4*1.73);\n", + "A6 = a**2/2;\n", + "A = A1+A2+A3+A4+A5+A6;\n", + "Pavg = (P1*A1+P2*A2+P3*A3+P4*A4+P5*A5+P6*A6)/A;\n", + "\n", + "# Results\n", + "print \"Mean precipitaion = %.2f cm.\"%(Pavg);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean precipitaion = 7.35 cm.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.43 pg : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\t\t\t\t\n", + "#Given\n", + "A = [90, 140, 125, 140, 85, 40, 20]; \t\t\t\t#area of isohytes\n", + "I = linspace(13,1,7) \t\t\t\t#average isohytel interval\n", + "s = 0;t = 0;\n", + "for i in range(7):\n", + " s = s+A[i]*I[i];\n", + " t = t+A[i];\n", + "\n", + "Pavg = s/t;\n", + "Pavg = round(Pavg*10)/10;\n", + "\n", + "# Results\n", + "print \" average depth of precipitation = %.2f cm.\"%(Pavg);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " average depth of precipitation = 8.40 cm.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.44 pg : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "p = [120, 95, 96, 60, 65, 70, 45, 21]; \t\t\t\t#rain guage readings at respective stations\n", + "\n", + "# Calculations and Results\n", + "s = sum(p)\n", + "pavg = s/8;\n", + "u = 0;\n", + "for i in range(8):\n", + " u = u+(p[i]-pavg)**2;\n", + "\n", + "sx = (u/7)**0.5;\n", + "Cv = sx*100/pavg;\n", + "N = (Cv/13.99)**2;\n", + "N = round(N*100)/100;\n", + "print \"mean rainfall = %.2f cm.\"%(pavg);\n", + "print \"total stations needed = %.2f.\"%(N);\n", + "\t\t\t\t#taking N = 10\n", + "N = 10;\n", + "n = N-8;\n", + "print \"additional guages needed = %i.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean rainfall = 71.00 cm.\n", + "total stations needed = 10.03.\n", + "additional guages needed = 2.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.45 pg : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from matplotlib.pylab import plot\n", + "from numpy import zeros,linspace\n", + "import math \n", + "#compute maximum rainfall intensities for 5,10,15,20,25,30,35,40,45,50 minutes\n", + "#plot intensity duration graph\n", + "\t\t\t\t\n", + "#Given\n", + "CR = [0, 1.02, 2.08, 3.30, 4.72, 5.58, 6.40, 7.16, 7.88, 8.54, 9.14]; \t\t\t\t#cumulative rainfall\n", + "\n", + "c5 = zeros(11)\n", + "c10 = zeros(11)\n", + "c15 = zeros(11)\n", + "c20 = zeros(11)\n", + "c25 = zeros(11)\n", + "c30 = zeros(11)\n", + "c35 = zeros(11)\n", + "c40 = zeros(11)\n", + "c45 = zeros(11)\n", + "c50 = zeros(11)\n", + "\n", + "c5[1] = CR[1];\n", + "c10[2] = CR[2];\n", + "c15[3] = CR[3];\n", + "c20[4] = CR[4];\n", + "c25[5] = CR[5];\n", + "c30[6] = CR[6];\n", + "c35[7] = CR[7];\n", + "c40[8] = CR[8];\n", + "c45[9] = CR[9];\n", + "c50[10] = CR[10];\n", + "for i in range(2,11):\n", + " c5[i] = CR[i]-CR[i-1];\n", + "\n", + "for i in range(3,11):\n", + " c10[i] = CR[i]-CR[i-2];\n", + "\n", + "for i in range(4,11):\n", + " c15[i] = CR[i]-CR[i-3];\n", + "\n", + "for i in range(5,11):\n", + " c20[i] = CR[i]-CR[i-4];\n", + "\n", + "for i in range(6,11):\n", + " c25[i] = CR[i]-CR[i-5];\n", + "\n", + "for i in range(7,11):\n", + " c30[i] = CR[i]-CR[i-6];\n", + "\n", + "for i in range(8,11):\n", + " c35[i] = CR[i]-CR[i-7];\n", + "\n", + "for i in range(9,11):\n", + " c40[i] = CR[i]-CR[i-8];\n", + "\n", + "for i in range(10,11):\n", + " c45[i] = CR[i]-CR[i-9];\n", + " \t\t\t\t#rainfall in any possible time interval\n", + "\n", + "print \"5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\";\n", + "for i in range(11):\n", + " print \"%4.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f\"%(c5[i],c10[i],c15[i],c20[i],c25[i],c30[i],c35[i],c40[i],c45[i],c50[i]);\n", + "\n", + "I = [17.04, 15.84, 14.80, 14.16, 13.39, 12.80, 12.27, 11.82, 11.39, 10.97]; \t\t\t\t#maximum intensity at respective durations\n", + "D = linspace(5,50,len(I)) \t\t\t\t#durations\n", + "#graph is plotted between I and D\n", + "plot(I,D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\n", + "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.06 2.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.22 2.28 3.30 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n", + "1.42 2.64 3.70 4.72 0.00 0.00 0.00 0.00 0.00 0.00\n", + "0.86 2.28 3.50 4.56 5.58 0.00 0.00 0.00 0.00 0.00\n", + "0.82 1.68 3.10 4.32 5.38 6.40 0.00 0.00 0.00 0.00\n", + "0.76 1.58 2.44 3.86 5.08 6.14 7.16 0.00 0.00 0.00\n", + "0.72 1.48 2.30 3.16 4.58 5.80 6.86 7.88 0.00 0.00\n", + "0.66 1.38 2.14 2.96 3.82 5.24 6.46 7.52 8.54 0.00\n", + "0.60 1.26 1.98 2.74 3.56 4.42 5.84 7.06 8.12 9.14\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 11, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEACAYAAACuzv3DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHNpJREFUeJzt3X2czXXex/HXDDaR+zKEkJLN/b0NOesuqZDKEhnSze61\nl5VKlC2zVEJu1m5pt1RuFpWKRCXlXFKbjcZNpBt3S4WSonTvXH98zphpOmbOmTnnfH/nnPfz8ZjH\n/M6ZOc77MfTpO5/f9wZERERERERERERERERERERERERERCKSFub37QaOAD8BPwBtgMrAE0Dt4Nf7\nAV9EPaGIiETFLqxw5zUZuC14PRq4L66JREQkIruAKvme2w5kBK+rBR+LiIhH7QSygfXA9cHnDuf5\nelq+xyIi4jHVg5/PADYCHfll4f48rolERASAkmF+3yfBz58Cz2I3Ow9gLZX9WKE/mP9F9erVC+zY\nsSMKMUVEUsoO4Jxwvzk9jO8pA5QLXpcFugNbgOeAzODzmcCSXyTZsYNAIODZjyNHApx9doB+/cY5\nz1LYx7hx3s+onMrp9Y9EyQnUC7eIQ3gj8gxsFJ7z/f8CVmL98ieBYeROP0wo5crB/PnQtSt8/DGc\neabrRCIikQunkO8CmoV4/nOga3TjxN9vfgOtW0NmJrz0EqSH8zuKiIiHqGwBd97p4+uv4a9/dZ3k\n5Hw+n+sIYVHO6FLO6EqUnJEKd2VnUQWC/R7P27kT2raFVaugaVPXaUQklaWlpUEE9Vkj8qCzz4ap\nU2HgQPjmG9dpRETCpxF5HoEA9O8P1ap5u80iIskt0hG5Cnk+hw9ba+Wf/4QePVynEZFUpEIeBatX\nw6BBsHEjnHGG6zQikmpUyK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/BfIBNv/OYQSm+sZbHZdZAwDMfaVbPx\nRosyv3OBC4E3sdFkK6dpCtcRq0le3QR3DDaN+79YS/X2wl4Qr90PA8EPKb6xwPfAAtdBCjAWOAt4\nHJjuNkpIZYA7sLZFDi+NevOaBdQFmmEjtakFf7sTJYFKQDtgFPCk2ziFGoC3//uZDfwJ+29oJNZH\nL1AsC/kBoFrwujpwMIbvlSqGAD2BgY5zhGsBcbxRE4F6QB1slLsLa1NtAKo6zHQyB8kdCD2CNzen\n24fdgAe7OXccqOIuToFKApcDT7gOUoA25E7tXkwYf+exLOTPYb9aE/y8JIbvFS1eHZWBzVYYhbUE\nvnWcpSDn5rnujTdmBuS3BWv11Q1+7MNudHtxsFE9z/XlnPzmnUtLgM7B6/rAr4BD7uIUqCs2u8bL\nu658CHQKXncmjvfwFmI/mO+BvcBQbBbAKrw1/TB/zmuxm7B7gW+A/cALztLlCpXzA2APudOnHnSW\nLleonIuxYrMReBpvjHJzcn5H7r/PvHbijVkroX6ec7E+/iasYLq+1xTqZ1kKmIf9vW/AtrZ27WR/\n548BN7gKFUKo2tkKm9CwEfg3NqtFRERERERERERERERERERERERERERERERERJLF/wMU/nSXoED/\n2gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.46 pg : 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math\n", + "from matplotlib.pylab import plot\n", + "#draw storm hyetograph and intensity duration curve\n", + "\t\t\t\t\n", + "#Given\n", + "p = [0, 5, 7.5, 8.5, 9]; \t\t\t\t#accumulated precipitation\n", + "t = [0, 30, 60, 90, 120]; \t\t\t\t#time\n", + "r = zeros(5)\n", + "I = zeros(5)\n", + "\n", + "print \"Rainfall intensity:\";\n", + "for i in range(1,5):\n", + " r[i] = p[i]-p[i-1]; \t\t\t\t#rainfall in succesive 30 min interval\n", + " I[i] = r[i]*60/30; \t\t\t\t#rainfall intensity\n", + " print \"%.2f\"%(I[i]);\n", + "\n", + "#graph is plotted between I and t.\n", + "plot(I,t)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "Rainfall intensity:\n", + "10.00\n", + "5.00\n", + "2.00\n", + "1.00\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 12, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAES1JREFUeJzt3XuQnWV9wPFvyAYbiiVkpEmAJEsDMYQ6lABBECaHKEod\nBf5QiAMMRW3HkQ5YQXNT2T8sJgFGBAZnKgPEWgLhIspMbQHdA2KK0AIpzQVC2gwkDkESoBdhjGb7\nx/Nu9mSzt3N7n+c97/czc+Zc9pzdhzPky8vze88GJEmSJEmSJEmSJEmSJEmSOtYdwE7ghZrHrgc2\nAeuBB4HDar62FNgCbAY+mtMaJUl1Ogs4if3jfg5wUHZ7RXYBmAs8D0wAuoGXa54nScrRaPH9OfDm\noMceBfZmt38JHJ3dPh9YA+wBthHiPr8lq5Qk1aXZI+vPAv+Y3T4S2F7zte3AUU1+f0lSA5qJ+3Lg\nt8DdIzynr4nvL0lqUFeDr/sL4OPAh2se2wFMr7l/dPbYfmbNmtW3devWBn+sJJXWVuDYsT65kSP3\nc4GvEPbY3615/MfAIuBg4BjgOODpA1a3dSt9fX3RL8uX97FoUdw1XHvttdHfh1Quvhe+F74XI1+A\nWfWEerS4rwHWAe8HXiXssd8CHEoYrD4H3JY9dyOwNrv+CfBFEt6WWbYM1q2D3t7YK5Gk1httW+Yz\nQzx2xwjPvy67JO+QQ+Cmm+CKK2D9epgwIfaKJKl1Sn0e+gUXwMyZ8J3vxPn5lUol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kSZIkldD/Aw0v7UUBAzTHAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.47 pg : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math\n", + "from numpy import zeros,linspace\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "I = linspace(21,12,10) \t\t\t\t#isohytes\n", + "a = [543, 1345, 2030, 2545, 2955, 3280, 3535, 3710, 3880, 3915]; \t\t\t\t#enclosed area\n", + "ia = zeros(10)\n", + "ia[0] = 543;\n", + "for i in range(1,10):\n", + " ia[i] = a[i]-a[i-1]; \t\t\t\t#net incremental area between isohytes\n", + "\n", + "rv = zeros(10)\n", + "r = linspace(21.5,12.5,10) \n", + "for i in range(10):\n", + " rv[i] = r[i]*ia[i]; \t\t\t\t#rainfall volume\n", + "\n", + "cv = zeros(10)\n", + "cv[0] = 11675;\n", + "for i in range(10):\n", + " cv[i] = cv[i-1]+rv[i]; \t\t\t\t#cumulative volume\n", + "\n", + "eud = zeros(10)\n", + "for i in range(10):\n", + " eud[i] = cv[i]/a[i]; \t\t\t\t#depth(mm)\n", + "\n", + "\n", + "print \"From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\";\n", + "#graph is plotted between eud and a\n", + "plot(eud,a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 13, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEACAYAAABRQBpkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJRE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Lh5fsXqpDvn5uVwUws/3UWcDeWlw6mI/Y/QG/gNvypiWg3\nDMjAbkI14Mcgx3h50l0o1wfeuX/VgFeAO4Fvinx2osmTXrp/pbk+8Nb9exm7vm9DPMdr96+k1wcl\nuH9uVgZtgVed/Zc58TpFnzjbz5zjvbKe0ftYn0hr4AVsXkVRBRz/L+ozOX7JjmgWyvWBN+5fEvaH\n8nmsGQ72r+Xazn4K8GmQ87xy/0p7feCt+zcH//WFwmv3r6TXByW4f25WBnlAF2e/GzaqoaiiE9t6\ncnzeOpqd4WwrAH8EpgY5ZjPQCGv+JWOrui6KRHBhEMr1eeH+JWCt1F3AEwHli4B0Zz+d4P8n9ML9\nK8v1efklTVf7AAAAmElEQVT+FT0mGC/fv6LHBBOV928+8DGWSvgIG33SGst9bcOGKKY6x9YBXnP2\nGxJ8Ylu0KXp9w7AU2PvO68GAYwOvD6z59j5WOcba9Xnh/l0EHMVizHFevTjx5Emv3b+yXJ9X719v\nbLXkj4DvsaVxljnHx8L9C/X6vHD/REREREREREREREREREREREREREREREREREQkGv0/xX+6BI93\n2EwAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.48 pg : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 7.75; \t\t\t\t#initial depth of water\n", + "r = 3.80; \t\t\t\t#rainfall during the week\n", + "hr = 2.50; \t\t\t\t#depth of water removed\n", + "C = 0.7; \t\t\t\t#pan coefficient\n", + "\n", + "# Calculations\n", + "ha = r-hr;\n", + "hl = ha+h1;\n", + "h2 = 8.32;\n", + "ev = hl-h2;\n", + "evs = ev*C;\n", + "evs = round(evs*100)/100;\n", + "\n", + "# Results\n", + "print \"evaporation from reservior surface during the week = %.2f cm.\"%(evs);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "evaporation from reservior surface during the week = 0.51 cm.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.49 pg : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T = linspace(1,12,12) \t\t\t\t#time from start\n", + "r = [1.8, 2.6, 7.8, 3.9, 10.6, 5.4, 7.8, 9.2, 6.5, 4.4, 1.8, 1.6]; \t\t\t\t#increamental rainfall\n", + "R = 24.4; \t\t\t\t#total run-off\n", + "s = sum(r)\n", + "\n", + "ti = s-R;\n", + "\n", + "#first trial\n", + "tr = 7; \t\t\t\t#assumed\n", + "ti = s-R-r[0]-r[1]-r[3]-r[10]-r[11];\n", + "fi = ti/tr;\n", + "P = zeros(12)\n", + "for i in range(12):\n", + " P[i] = r[i]-fi;\n", + " if (P[i]<0):\n", + " P[i] = 0;\n", + "\n", + "print \"Timeh rainfall excess.\";\n", + "for i in range(12):\n", + " print \"%.2f %.2f\"%(T[i],P[i]);\n", + "\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Timeh rainfall excess.\n", + "1.00 0.00\n", + "2.00 0.00\n", + "3.00 3.90\n", + "4.00 0.00\n", + "5.00 6.70\n", + "6.00 1.50\n", + "7.00 3.90\n", + "8.00 5.30\n", + "9.00 2.60\n", + "10.00 0.50\n", + "11.00 0.00\n", + "12.00 0.00\n", + "fi index = 3.90 cm/hr.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.50 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\t\t\t\t\n", + "#Given\n", + "r = [0.6, 1.35, 2.25, 3.45, 2.7, 2.4, 1.5, 0.75]; \t\t\t\t#incremental rainfall\n", + "T = linspace(1,8,8) \t\t\t\t#time from start of rainfal\n", + "t = 8.;\n", + "P = 15.; \t\t\t\t#total rainfall\n", + "R = 8.7; \t\t\t\t#direct run-off\n", + "\n", + "# Calculations\n", + "W = (P-R)/t;\n", + "#math.since fi wil be more than W\n", + "tre = 6;\n", + "fi = ((P-R)-r[0]-r[7])/tre;\n", + "\n", + "# Results\n", + "print \"fi index = %.2f cm/hr.\"%(fi);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fi index = 0.83 cm/hr.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.51 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\t\n", + "#Given\n", + "I = 10; \t\t\t\t#total infiltration rate\n", + "fI = 5; \t\t\t\t#final infiltration rate\n", + "k = 0.95; \t\t\t\t#rate of decay of difference between final and initial infiltration rate\n", + "\n", + "\n", + "# Calculations\n", + "def f8(t): \n", + "\t return fI+(I-fI)*math.e**(-k*t)\n", + "\n", + "q = quad(f8,0,6)[0]\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"total infiltration depth = %.2f mm.\"%(q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total infiltration depth = 35.25 mm.\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.52 pg : 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace\n", + "\n", + "#find the equation of infiltration capacity\n", + "\t\t\t\t\n", + "#Given\n", + "fc = 1; \t\t\t\t#consmath.tant infiltration rate\n", + "ft = [10.4, 5.6, 3.2, 2.1, 1.5, 1.2, 1.1, 1, 1]; \t\t\t\t#infiltration capacity\n", + "f = ft[0]-fc;\n", + "t = linspace(0,2,9)\n", + "\n", + "r = zeros(9)\n", + "for i in range(9):\n", + " r[i] = ft[i]-fc;\n", + "\n", + "h = zeros(7)\n", + "for i in range(7):\n", + " h[i] = math.log10(r[i]);\n", + "\n", + "s = 0.775; \t\t\t\t#from graph\n", + "k = 1/(math.log10(math.e)*s);\n", + "k = round(k*100)/100;\n", + "\n", + "# Results\n", + "print \"Equation is:ft = fc+%.2fe**-%.2ft)\"%(f,k);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:ft = fc+9.40e**-2.97t)\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.53 pg : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "from matplotlib.pylab import bar\n", + "import math \n", + "#total rainfall\n", + "#net run-off\n", + "#W index\n", + "\n", + "#Given\n", + "r = [2, 2, 8, 7, 1.25, 1.25, 4.5]; \t\t\t\t#rainfall intensity\n", + "T = [15, 30, 45, 60, 70, 90, 105]; \t\t\t\t#time\n", + "dt = 15.; \t\t\t\t#time interval\n", + "fi = 3.; \t\t\t\t#fi index\n", + "#graph is plotted between r and T\n", + "bar(T,r)\n", + "s = sum(r)\n", + "P = s*dt/60;\n", + "Pe = ((8-3)+(7-3)+(4.5-3))*dt/60; \t\t\t\t#area of graph above r = 3.0.\n", + "w = (P-Pe)/(105./60);\n", + "w = round(w*1000)/1000;\n", + "\n", + "# Results\n", + "print \"total rainfall = %.2f cm.\"%(P);\n", + "print \"net run-off = %.2f cm.\"%(Pe);\n", + "print \"W index = %.2f cm/hr.\"%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "total rainfall = 6.50 cm." + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "net run-off = 2.62 cm.\n", + "W index = 2.21 cm/hr.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADU9JREFUeJzt3X2MHHUdx/H30qPy1ANOjQUhOaxgIDEqMQiKcTBVkaBo\nYqJGUSHRvwwYI2g1yv6liBowMfzhE0HkKUEh1OATyiQaDIIWRUpVTsWKUohFWx+IKOsfv7ne9uh1\nZ3dnbvc7834lm9udndv5fm9nP/e7387egCRJkiRJkiRJkiRJkiRJarlNwP3AfcB1wDMmW44kaZB5\n4HcsBfaNwLsnVo0kCYCZAffvAp4EDgH+V3x9uO6iJEnjex+wG3gUuGbCtUiSStgAbAWeSRql3wy8\nY6IVSZIGTpu8FLgT+Gtx+5vAy4FrF1fYsGFDb2FhoZ7qJKm5FoDnj/rNBwy4fxtwKnAw0AE2kkbi\nS1tfWKDX6zX2cskll0y8hmnsL0lfJ92Dz9/k67C34S+kmY2RDQrvXwBfA+4Bflks++I4G5QkjW/Q\ntAnAZcVFkjQlBo28Wy/LskmXUCv7i63J/TW5typ0KniMXjF/oxbpdDqkOe8OPv/S8NJraPQMduQt\nSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ\n3pIUkOEtSQEZ3pIUkOEtSQGVCe8XAFv6Ln8HLqizKEnS/g17Cp4DgIeBU4DtxTJPg9ZCngZNGs9q\nnwZtI7DAUnBLkiZg2PB+G3BdHYVIksobZsi+ljRlchLwWN9yp01ayGkTaTzjTpvMDLHu64GfsXdw\nA9Dtdvdcz7KMLMtGrUeq1OzsHLt3P866dUeya9fOSZejFsvznDzPK3u8YVL/BuDbwNXLljvybqEo\nI+8odap9x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OlnauaC4HLiId\n7rmoKb0dBzwGXAX8HPgScCjN6W8n8Dngj8Cfgb+Rphea0t+ilfo5mpQxi5qQN+cDtxXXh+5vnPBu\n8gd4DgO+AVwI7F52X4+YvZ8NPEqa717p+P6ovUEajZ4MXFl8/SdP/0swcn8bgA+QBhVHk/bRdy5b\nJ3J/+zKon8i9fgz4D+m9i5Xst79xwvth0ht8i45l798cUR1ICu5rSNMmkEYA64vrR5FCMJqXA28E\nfg9cD7ya1GMTeoO07/0JuLu4fRMpxB+hGf29FLgT+CvwX9KbXafRnP4WrbQ/Ls+bY4plEb0HOAt4\nR9+yofsbJ7zvAY5n6QM8b2XpTbCoOsBXSEcqXNG3/FbSm0MUX28hno+Sdo7jgLcBPwTOpRm9QQqx\n7cAJxe2NpCMzNtOM/raR5kAPJu2nG0n7aVP6W7TS/ngrab9dS9qHjwd+uurVje9M0tTlOcATfctX\nvb+mfYDndNJ88L2k6YUtpB/2HOmNvoiHY+3Lq1j6Rduk3l5EGnn3H4bVpP4uZulQwatJfyVG7u96\n0vz9f0i/eM9j//18lJQ124DXrWqlo1ne3/mkQwEfYilfruxbP1p/kiRJkiRJkiRJkiRJkiRJkiRJ\nUmz/B97QUHeIqu3oAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.54 pg : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#run-off by rainfall of 3.3cm in 3hrs\n", + "\t\t\t\t\n", + "#Given\n", + "A = [36, 18, 66]; \t\t\t\t#area of catchment\n", + "fi = [0.9 ,1.1, 0.5]; \t\t\t\t#fi index\n", + "r1 = [0.6 ,0.9, 1.0]; \t\t\t\t#rainfall in first hour\n", + "r2 = [2.4 ,2.1, 2.0]; \t\t\t\t#rainfall in second hour\n", + "r3 = [1.3, 1.5, 0.9]; \t\t\t\t#rainfall in third hour\n", + "\n", + "# Calculations and Results\n", + "t36 = r1[0]+r2[0]+r3[0];\n", + "t18 = r1[1]+r2[1]+r3[1];\n", + "t66 = r1[2]+r2[2]+r3[2];\n", + "\n", + "p = (t36*A[0]+t18*A[1]+t66*A[2])/(A[0]+A[1]+A[2]);\n", + "print \"Total rainfall in catchment = %.2f cm.\"%(p);\n", + "\n", + "ro1 = [0 ,0, 0.5];\n", + "ro2 = [1.5 ,1.0, 1.5];\n", + "ro3 = [0.4, 0.4, 0.4]; \t\t\t\t#rainfall-fi\n", + "t1 = ro1[0]+ro2[0]+ro3[0];\n", + "t2 = ro1[1]+ro2[1]+ro3[1];\n", + "t3 = ro1[2]+ro2[2]+ro3[2];\n", + "run = (A[0]*t1+A[1]*t2+A[2]*t3)/(A[0]+A[1]+A[2]); \t\t\t\t#run-off from entire catchment\n", + "\n", + "print \"run-off by rainfall of 3.3cm in 3hrs = %.2f cm.\"%(run);\n", + "\n", + "fia = (fi[0]*A[0]+fi[1]*A[1]+fi[2]*A[2])/(A[0]+A[1]+A[2]);\n", + "tr = (1.1-fia)*3;\n", + "print \"Total run-off = %.2f cm.\"%(tr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total rainfall in catchment = 4.11 cm.\n", + "run-off by rainfall of 3.3cm in 3hrs = 2.10 cm.\n", + "Total run-off = 1.17 cm.\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.55 pg : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "P = array([4, 22, 28, 15, 12, 8, 4, 15, 10, 5]); \t\t\t\t#Precipitation\n", + "R = array([0.2, 7.1, 10.9, 4.0, 3.0, 1.3, 0.4, 4.1, 2.0, 0.3]); \t\t\t\t#runoff\n", + "\n", + "# Calculations\n", + "Ps = P**2\n", + "Rs = R**2\n", + "PR = P*R\n", + "\n", + "s = sum(Ps)\n", + "t = sum(Rs)\n", + "u = sum(PR)\n", + "q = sum(P)\n", + "w = sum(R)\n", + "\n", + "N = 10.;\n", + "a = (N*u-q*w)/(N*s-q**2);\n", + "b = (w-a*q)/N;\n", + "a = round(a*10000)/10000;\n", + "b = round(b*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Equation is:%.2f P %.2f.\"%(a,b);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation is:0.43 P -1.93.\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.56 pg : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 470; \t\t\t\t#peak discharge of flood hydrograph\n", + "B = 15; \t\t\t\t#base flow\n", + "l = 0.25; \t\t\t\t#infiltration loss\n", + "Qr = Q-B;\n", + "d = 8; \t\t\t\t#average depth of rainfall\n", + "\n", + "# Calculations\n", + "re = d-l*6; \t\t\t\t#rainfall excess\n", + "q = Qr/re;\n", + "\n", + "# Results\n", + "print \"peak discharge of 6 hrs unit hydrograph = %i cumecs.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak discharge of 6 hrs unit hydrograph = 70 cumecs.\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.57 pg : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 0.25; \t\t\t\t#infiltration index\n", + "B = 20; \t\t\t\t#Base flow\n", + "O = array([0, 20, 60, 150, 120, 90, 70, 50, 30, 20, 10, 0, 0, 0]); \t\t\t\t#ordinates of unit hydrograph\n", + "R1 = 5;\n", + "R2 = 0.8;\n", + "R3 = 3;\n", + "r1 = R1-(fi*4); \t\t\t\t#rainfall excess in first four hour\n", + "r2 = R2-(fi*4); \t\t\t\t#rainfall excess in second four hour\n", + "r3 = R3-(fi*4); \t\t\t\t#rainfall excess in third four hour\n", + "if r2<0 :\n", + " r2 = 0;\n", + "\n", + "# Calculations and Results\n", + "s1 = r1*O\n", + "s2 = zeros(14)\n", + "for i in range(1,14):\n", + " s2[i] = r2*O[i-1];\n", + "\n", + "s3 = zeros(14)\n", + "for i in range(2,14):\n", + " s3[i] = r3*O[i-2];\n", + "#surface run-off from rainfall excess during succesive unit periods\n", + "print \"ordinates of storm hydrograph\";\n", + "T = zeros(14)\n", + "t = zeros(14)\n", + "for i in range(14):\n", + " T[i] = s1[i]+s2[i]+s3[i]; \t\t\t\t#sub-total\n", + " t[i] = T[i]+B; \t\t\t\t#ordinate of flood hydrograph\n", + " print \"%i\"%(t[i]);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of storm hydrograph\n", + "20\n", + "100\n", + "260\n", + "660\n", + "620\n", + "680\n", + "540\n", + "400\n", + "280\n", + "200\n", + "120\n", + "60\n", + "40\n", + "20\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.58 pg : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\t\t\t\t\n", + "#Given\n", + "fi = 2.5; \t\t\t\t#fi index\n", + "t = 24.;\n", + "A = 200.; \t\t\t\t#area of catchment\n", + "R1 = 7.5;\n", + "R2 = 2.0;\n", + "R3 = 5.; \t\t\t\t#rainfall\n", + "r1 = R1-fi;\n", + "r2 = R2-fi;\n", + "r3 = R3-fi;\n", + "r2 = 0;\n", + "r = [5, 0, 2.5]; \t\t\t\t#excess rainfall\n", + "D = array([5 ,15, 40, 25, 10, 5, 0, 0, 0]); \t\t\t\t#distribution\n", + "d1 = D*r[0]/100\n", + "d2 = zeros(9)\n", + "for i in range(8):\n", + " d2[i+1] = D[i]*r[1]/100;\n", + "\n", + "d3 = zeros(9)\n", + "for i in range(7):\n", + " d3[i+2] = D[i]*r[2]/100;\n", + "#distribution run-off for rainfall excess\n", + "\n", + "tr1 = zeros(9)\n", + "tr2 = zeros(9)\n", + "for i in range(9):\n", + " tr1[i] = d1[i]+d2[i]+d3[i]; \t\t\t\t#total run-off as depth\n", + " tr2[i] = 23.148*tr1[i]; \t\t\t\t#total run-off as discharge\n", + " tr2[i] = round(tr2[i]*1000)/1000;\n", + "\n", + "s = sum(tr2)\n", + "\n", + "print \"Total run-off:\";\n", + "print \"as depth as discharge\";\n", + "for i in range(9):\n", + " print \"%.2f %.2f\"%(tr1[i],tr2[i]);\n", + "\n", + "r = 0.36*s*t/A;\n", + "r = round(r*10)/10;\n", + "print \"total run-off = %.2f cm.\"%(r);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total run-off:\n", + "as depth as discharge\n", + "0.00 0.00\n", + "0.00 0.00\n", + "2.12 49.19\n", + "1.38 31.83\n", + "1.00 23.15\n", + "0.62 14.47\n", + "0.25 5.79\n", + "0.12 2.89\n", + "0.00 0.00\n", + "total run-off = 5.50 cm.\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.59 pg : 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "O = [10, 30, 90, 220, 280, 220, 166, 126, 92, 62, 40, 20, 10]; \t\t\t\t#ordinates of 6 hr flood hydrograph\n", + "B = 10; \t\t\t\t#Base flow\n", + "r = zeros(13)\n", + "\n", + "for i in range(13):\n", + " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + "\n", + "print \"Ordinates of 6 hr unit hydrograph\";\n", + "u = zeros(13)\n", + "\n", + "for i in range(1,13):\n", + " u[i] = r[i]-u[i-1]; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n", + "\n", + "for i in range(13): \n", + " print \"%i\"%(u[i]);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ordinates of 6 hr unit hydrograph\n", + "0\n", + "20\n", + "60\n", + "150\n", + "120\n", + "90\n", + "66\n", + "50\n", + "32\n", + "20\n", + "10\n", + "0\n", + "0\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.60 pg : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#determine the ordinates of 1 cm-6 hour hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "t = 6;\n", + "A = 450; \t\t\t\t#catchment area\n", + "O = [5, 15, 40, 80, 60, 50, 25, 15, 5]; \t\t\t\t#ordinates of flood hydrograph\n", + "B = 5; \t\t\t\t#base flow assumed\n", + "s = 0;\n", + "r = zeros(9)\n", + "for i in range(9):\n", + " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n", + " s = s+r[i];\n", + "\n", + "n = s*0.36*12/A;\n", + "print \"ordinates of unit hydrograph\";\n", + "for i in range(9):\n", + " u[i] = r[i]/n;\n", + " u[i] = round(u[i]*100)/100;\n", + " print \"%.2f\"%(u[i]);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates of unit hydrograph\n", + "0.00\n", + "4.17\n", + "14.58\n", + "31.25\n", + "22.92\n", + "18.75\n", + "8.33\n", + "4.17\n", + "0.00\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.61 pg : 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#obtain ordinates 24 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "O = [0, 5.5, 13.5, 26.5, 45, 82, 162, 240, 231, 165, 112, 79, 57, 42, 31, 22, 14, 9.5, 6.6, 4, 2, 1, 0, 0, 0, 0, 0]; \t\t\t\t#ordinates of 1st 8 hrs unit hydrograph\n", + "o1 = zeros(27)\n", + "o2 = zeros(29)\n", + "for i in range(25):\n", + " o1[i+2] = O[i]; \t\t\t\t#ordinates of 2nd 8 hrs unit hydrograph\n", + " o2[i+4] = O[i]; \t\t\t\t#ordinates of 3rd 8 hrs unit hydrograph\n", + "\n", + "o3 = zeros(27)\n", + "t = zeros(27)\n", + "print \"ordinates 24 hr unit hydrograph:\";\n", + "for i in range(27):\n", + " o3[i] = o1[i]+o2[i]+O[i]; \t\t\t\t#total 24 hr hydrograph of 3 cm run-off\n", + " t[i] = o3[i]/3;\n", + " t[i] = round(t[i]*10)/10;\n", + " print \"%.2f\"%(t[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ordinates 24 hr unit hydrograph:\n", + "0.00\n", + "1.80\n", + "4.50\n", + "10.70\n", + "19.50\n", + "38.00\n", + "73.50\n", + "116.20\n", + "146.00\n", + "162.30\n", + "168.30\n", + "161.30\n", + "133.30\n", + "95.30\n", + "66.70\n", + "47.70\n", + "34.00\n", + "24.50\n", + "17.20\n", + "11.80\n", + "7.50\n", + "4.80\n", + "2.90\n", + "1.70\n", + "0.70\n", + "0.30\n", + "0.00\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.62 pg : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import zeros,linspace\n", + "\n", + "\n", + "#ordinates of 1 hr unit hydrograph\n", + "\t\t\t\t\n", + "#Given\n", + "t = linspace(0,12,13) \t\t\t#time\n", + "O = [0, 0, 54, 0, 175, 0, 127, 0, 58, 0, 25, 0, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n", + "of = zeros(13)\n", + "for i in range(2,13):\n", + " if (i%2) == 0:\n", + " of[i] = 0\n", + " else:\n", + " of[i] = O[i-2]+of[i-2];\n", + "\n", + "s = [0, 25, 54, 120, 229, 300, 356, 390, 414, 430, 439, 439, 439]; \t\t\t\t#Ordinates of S-curve\n", + "of1 = zeros(13)\n", + "for i in range(1,13):\n", + " of1[i] = s[i-1];\n", + "\n", + "y = zeros(13)\n", + "u = zeros(13)\n", + "print \"ordinates of 1 hr unit hydrograph:\";\n", + "for i in range(13):\n", + " y[i] = s[i]-of1[i];\n", + " u[i] = y[i]*2;\n", + " print \"%i\"%(u[i]);\n", + "\n", + "#graph is plotted between u and t\n", + "plot(t,u)\n", + "\n", + "\n", + "# graph in book is wrong. Please check." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "ordinates of 1 hr unit hydrograph:\n", + "0\n", + "50\n", + "58\n", + "132\n", + "218\n", + "142\n", + "112\n", + "68\n", + "48\n", + "32\n", + "18\n", + "0\n", + "0\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 15, + "text": [ + "[]" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEACAYAAAC57G0KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHv5JREFUeJzt3Xl41NX1x/F32GSVRYtABIKIbIogiyAqASWApVixUlEB\ncQHBUn6iKFqVWK21WqytAqJoRVAqoFJcUEBIrbUsrUDZBSRssiiboCIE5vfHmZgQQjJJZuZ+v9/5\nvJ5nnkwms5x5ICd3zj33Xh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pgJfBrt+HETGlgKfCO60BioBowA1gD\nrMbmk4Lkfuz/5wrgdcDPR1O/DOzC3ku2GsBc4HNgDvbv6Vf5vb+nsP+by4G3gKoO4jql0ljJJgUo\nS/Bq87WAluHrlbESVZDeX7YRwGvALNeBxMAk4Jbw9TJ47BeohFKAL8hJ6m8AA5xFU3KXAa04MQE+\nCdwbvn4f8ES8g4qi/N5fV3Ja25/AY++vA/BBru9HhS9BNRO4wnUQUXY2MA/oTPBG8FWxBBhUNbBB\nR3Xsj9c7wJVOIyq5FE5MgGuBs8LXa4W/97MUTnx/uV0DTCnsCeK52VhEC6ACIgX767vIcRzR9idg\nJNb2GjQNgK+AvwKfAS8CFZ1GFF17gTHAFuBLYD/2xzpIzsLKGoS/nlXAff3uFuD9wu4UzwQf0QKo\nAKiM1XGHAz7fi+4EPYHdWP09iNvDlQEuAsaFv35LsD5hNgT+Dxt81MH+n97oMqAYCxHcnPMb4Ag2\nj1KgeCb47dhEZLa62Cg+SMoCb2IfnWY6jiXaLgF6AZuAqUAX4FWnEUXXtvBlSfj7GViiD4o2wKfA\nHiALm6S7xGlE0bcLK80A1MYGJEFzM3AVHvzjHPQFUElYwvuT60DioBPBq8EDfAxkH8Oczomrr/3u\nQqy7qwL2f3UScKfTiEouhZMnWbO780bhsUnIYkjhxPfXHeuCOtNJNBEI8gKoS7Ha9DKsjLGUnO0a\ngqYTweyiuRAbwXuyDS0K7iWnTXIS9onTr6ZicwlHsLm9gdhE8jyC0SaZ9/3dgrWXbyYnv4xzFp2I\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiISKT+H/BUmcxxea77AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.63 pg : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 1200; \t\t\t\t#sample mean\n", + "n = 50.; \t\t\t\t#assurance year\n", + "A = 0.95; \t\t\t\t#assurance percent\n", + "Rsk = 1-A;\n", + "sigma = 650; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "yn = 0.53622; \t\t\t\t#mean of reduced variate\n", + "sigma30 = 1.11238; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation of reduced variate\n", + "\n", + "# Calculations\n", + "T = 1/(1-(1-Rsk)**(1/n));\n", + "yt = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n", + "K = (yt-yn)/sigma30;\n", + "xt = xavg+K*sigma;\n", + "\n", + "# Results\n", + "print \" design disharge = %i cumecs.\"%(xt);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " design disharge = 4908 cumecs.\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.64 pg : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 50.;\n", + "T2 = 100.; \t\t\t\t#Return period\n", + "F1 = 20600.;\n", + "F2 = 22150; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y100-y50);\n", + "T = 500.;\n", + "y500 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x500 = F2+(y500-y100)*y;\n", + "x500 = round(x500);\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumec.\"%(x500);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 25732.00 cumec.\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.65 pg : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 1.65; \t\t\t\t#mean of data\n", + "sigma = 0.45; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "x = 3;\n", + "\n", + "# Calculations\n", + "y = 1.2825*(x-xavg)/sigma+0.577;\n", + "l = math.e**(math.e**(-y));\n", + "T = l/(l-1);\n", + "T = round(T*10)/10;\n", + "\n", + "# Results\n", + "print \"recurrence interval of 10 minutes storm = %.2f years.\"%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "recurrence interval of 10 minutes storm = 84.00 years.\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.66 pg : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 50.;\n", + "T2 = 100.; \t\t\t\t#Return period\n", + "F1 = 30800.;\n", + "F2 = 36300.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y100-y50);\n", + "T = 200.;\n", + "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x200 = F2+(y200-y100)*y;\n", + "x200 = round(x200);\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x200);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 41780.00 cumecs.\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.67 pg : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "xavg = 4200.; \t\t\t\t#mean\n", + "sigma = 1705.; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n", + "xt = 9550.; \t\t\t\t#flood value\n", + "\n", + "# Calculations\n", + "K = (xt-xavg)/sigma;\n", + "yt = 1.2825*K+0.577;\n", + "l = math.e**(math.e**(-yt));\n", + "T = l/(l-1);\n", + "\n", + "# Results\n", + "print \"Return period of flood of 9950 cumec/s = %.2f years.\"%(T);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Return period of flood of 9950 cumec/s = 100.11 years.\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.68 pg : 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "T1 = 100.;\n", + "T2 = 50.; \t\t\t\t#Return period\n", + "F1 = 485.;\n", + "F2 = 445.; \t\t\t\t#Peak flood\n", + "\n", + "# Calculations\n", + "y50 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n", + "y100 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n", + "y = (F2-F1)/(y50-y100);\n", + "T = 1000.;\n", + "y1000 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n", + "x1000 = F2+(y1000-y50)*y;\n", + "x1000 = round(x1000*10)/10;\n", + "\n", + "# Results\n", + "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flood magnitude with return period of 240 years = 617.20 cumecs.\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.69 pg : 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#probability of exceedence\n", + "#probability of occurence in next 12 years\n", + "\n", + "#Given\n", + "T = 25.; \t\t\t\t#return period\n", + "n = 12.;\n", + "\n", + "# Calculations\n", + "P = 1/T;\n", + "Rsk = 1-(1-P)**n;\n", + "P = round(P*100)/100;\n", + "Rsk = round(Rsk*10000)/10000;\n", + "\n", + "# Results\n", + "print \"probability of exceedence = %.2f.\"%(P);\n", + "print \"probability of occurence in next 12 years = %.2f.\"%(Rsk);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "probability of exceedence = 0.04.\n", + "probability of occurence in next 12 years = 0.39.\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5.ipynb new file mode 100755 index 00000000..20ed9e6b --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5.ipynb @@ -0,0 +1,1215 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:354821165ad32a4fdc06d2826d3a09936c00989f455a7161676ce1b32639acba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : GROUND WATER WELL IRRIGATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 pg : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t#design an open wellin fine sand\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.003; \t\t\t\t#required discharge\n", + "H = 2.5; \t\t\t\t#depression head\n", + "A = Q*3600/(0.5*H);\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*100)/100\n", + "print \"Well diameter = %.2f m.\"%(d);\n", + "\n", + "\t\t\t\t#Alternative solution\n", + "C = 7.5e-5; \t\t\t\t#permeability consmath.tant from table 5.2\n", + "A = Q/(C*H);\n", + "d = (16*3/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"By alternative solution:\"\n", + "print \"Well diameter = %.2f m\"%(d);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Well diameter = 3.32 m.\n", + "By alternative solution:\n", + "Well diameter = 3.90 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 pg : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#yield from well\n", + "#diameter of well\n", + "\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1.8; \t\t\t\t#heigth after recuperation\n", + "t = 80; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "d = 4; \t\t\t\t#diameter of well\n", + "H = 3; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H/3.6;\n", + "print \"Part a\";\n", + "Q = round(Q);\n", + "print \"Yield from well = %.2f lit/sec.\"%(Q);\n", + "\n", + "#Part (b)\n", + "Q = 8; \t\t\t\t#yield(lit/sec)\n", + "H = 2;\n", + "A = Q*3.6/(H*(KbyA));\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"Part b\";\n", + "print \"Daimeter of well = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a\n", + "Yield from well = 10.00 lit/sec.\n", + "Part b\n", + "Daimeter of well = 4.40 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 pg : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "d = 30; \t\t\t\t#well diameter\n", + "L = 15; \t\t\t\t#strainer length\n", + "P = 50; \t\t\t\t#coefficient of permeability\n", + "s = 0.2; \t\t\t\t#effective size of sand\n", + "b = 3; \t\t\t\t#drawdown\n", + "r = 150; \t\t\t\t#radius of drawdown\n", + "\n", + "\n", + "# Calculations\n", + "Q = 2.72*L*P*b/(math.log10(r*2*100/d)*24*3.6);\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \" yield from well = %.2f lit/sec.\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " yield from well = 23.60 lit/sec.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 pg : 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "d = 30; \t\t\t\t#diameter of well\n", + "s = 2; \t\t\t\t#drawdown\n", + "L = 10; \t\t\t\t#length of stainer\n", + "k = 0.05; \t\t\t\t#coefficient of permeability\n", + "r = 300; \t\t\t\t#radius of zero drawdown\n", + "\n", + "# Calculations\n", + "Q = 2.72*k*s*(L+s/2)/(100*math.log10(2*100*r/d));\n", + "\n", + "# Results\n", + "print \" discharge from tubewell = %.4f cumec.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " discharge from tubewell = 0.0091 cumec.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 pg: 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t#design tube well\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.08; \t\t\t\t#yield required\n", + "b = 30; \t\t\t\t#thickness of acquifer\n", + "R = 300; \t\t\t\t#Radius of circle of influence\n", + "k = 60; \t\t\t\t#permeability coefficient\n", + "s = 5; \t\t\t\t#Drawdown\n", + "\n", + "# Calculations\n", + "r = R/(10**(2.72*b*s*k/(3600*24*Q)));\n", + "r = round(r*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Radius of well = %.2f m\"%(r);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of well = 0.09 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 pg : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "b = 30.; \t\t\t\t#thickness of acquifer\n", + "s = 4.; \t\t\t\t#drawdown\n", + "r = 0.1; \t\t\t\t#well radius\n", + "k = 36.; \t\t\t\t#permeability coefficient\n", + "R = 3000*s*(k/(24*3600))**0.5;\n", + "\n", + "Q = 2.72*b*k*s/(math.log10(R/r)*24*3.6);\n", + "Q = round(Q*10)/10;\n", + "print \"yield from well = %.2f lit/sec.\"%(Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "yield from well = 40.10 lit/sec.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 pg : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "k = 0.005; \t\t\t\t#coefficient of permeability\n", + "r = 0.1; \t\t\t\t#well radius\n", + "s = 4; \t\t\t\t#drawdown\n", + "b = 10; \t\t\t\t#thickness\n", + "R = 300; \t\t\t\t#radius of circle of influence\n", + "\n", + "# Calculations and Results\n", + "#Part(a)\n", + "Q1 = 2.72*b*k*s/math.log10(R/r);\n", + "Q1 = round(Q1*10000)/10000;\n", + "print \"Discharge = %.2f cumec\"%(Q1);\n", + "\n", + "#Part (b)\n", + "r = 0.2;\n", + "Q2 = 2.72*b*k*s/math.log10(R/r);\n", + "I = (Q2-Q1)*100/Q1;\n", + "I = round(I*10)/10;\n", + "print \"percent increase in discharge = %.2f percent.\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 0.16 cumec\n", + "percent increase in discharge = 9.40 percent.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 pg : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#percentage error\n", + "#actual radius of influence\n", + "\n", + "#Given\n", + "d = 0.2; \t\t\t\t#diameter of well\n", + "Q = 240; \t\t\t\t#discharge\n", + "RL1 = 240.5; \t\t\t\t#reduce level of original water surface\n", + "RL2 = 235.6; \t\t\t\t#reduced level of water at pumping\n", + "RL3 = 210; \t\t\t\t#reduced level of impervious layer\n", + "RL4 = 239.8; \t\t\t\t#reduced level of water in well\n", + "D = 50; \t\t\t\t#radial dismath.tance of well from tube well\n", + "\n", + "# Calculations and Results\n", + "#Part(a)\n", + "h1 = RL2-RL3;\n", + "h2 = RL4-RL3;\n", + "k1 = Q*24*math.log10(D*2/d)/(1.36*(h2**2-h1**2));\n", + "k1 = round(k1*100)/100;\n", + "print \"Parta\";\n", + "print \"coefficient of permeability = %.2f m/day.\"%(k1);\n", + "#Part (b)\n", + "R = 300; \t\t\t\t#radius of influence\n", + "H = RL1-RL3;\n", + "h = RL2-RL3;\n", + "k2 = Q*24*math.log10(R*2/d)/(1.36*(H**2-h**2));\n", + "PE = (k2-k1)*100/k1;\n", + "print \"Partb\";\n", + "print \"percentage error = %i percent.\"%(PE);\n", + "#Part (b)\n", + "R = (d/2)*10**(1.36*k1*(H**2-h**2)/(24*Q));\n", + "print \"Partc\";\n", + "print \"Actual radius of influence = %i m.\"%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta\n", + "coefficient of permeability = 49.13 m/day.\n", + "Partb\n", + "percentage error = 9 percent.\n", + "Partc\n", + "Actual radius of influence = 154 m.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 pg : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "A = 20.; \t\t\t\t#area of field\n", + "H = 129.; \t\t\t\t#level to the highest land\n", + "h1 = 120.2; \t\t\t\t#water level in well during discharge\n", + "Du = 800; \t\t\t\t#duty for rise;\n", + "eita = 0.6; \t\t\t\t#efficiency of the pump\n", + "\n", + "# Calculations\n", + "Q = A/Du;\n", + "w = Q*1000;\n", + "lift = H-h1;\n", + "\t\t\t\t#design lift is taken as 9m\n", + "wd = w*9;\n", + "o = wd/75;\n", + "i = o/eita;\n", + "\n", + "# Results\n", + "print \"Input h.p of pump = %i h.p\"%i;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input h.p of pump = 5 h.p\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 pg : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 150; \t\t\t\t#discharge from tubewell\n", + "t = 4000; \t\t\t\t#working period of tubewell\n", + "I = 0.45; \t\t\t\t#intensity of irrigation\n", + "d = 0.38; \t\t\t\t#average depth of rabi and kharif crop\n", + "\n", + "# Calculations\n", + "V = Q*t;\n", + "A = V/d;\n", + "CA = A/(I*10000);\n", + "CA = round(CA);\n", + "\n", + "# Results\n", + "print \"culturable area = %.2f hectares.\"%(CA);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "culturable area = 351.00 hectares.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 pg : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#percent decrease when two well discharges\n", + "\n", + "#Given\n", + "d = 0.2; \t\t\t\t#diameter of well\n", + "r = d/2;\n", + "B = 100; \t\t\t\t#dismath.tance between wells\n", + "b = 12; \t\t\t\t#thickness of acquifer\n", + "k = 60; \t\t\t\t#coefficient of permeability\n", + "s = 3; \t\t\t\t#print ersion head\n", + "R = 250; \t\t\t\t#radius of influence\n", + "Q = 2.72*b*k*s/(24*math.log10(R/r));\n", + "print \"discharge if one well discharges = %i cubic metre/hour.\"%(Q);\n", + "#when both well are discharging\n", + "Q1 = 2.72*k*b*s/(24*math.log10(R**2/(r*B)));\n", + "Q1 = round(Q1*10)/10;\n", + "print \"discharge if both wells discharges = %.2f cubic metre/hour.\"%(Q1);\n", + "PE = (Q-Q1)*100/Q;\n", + "PE = round(PE*100)/100;\n", + "print \"percentage decrease in discharge = %.2f percent.\"%(PE);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge if one well discharges = 72 cubic metre/hour.\n", + "discharge if both wells discharges = 64.50 cubic metre/hour.\n", + "percentage decrease in discharge = 10.47 percent.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 pg : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#coefficient of permeability\n", + "#drawdown in well\n", + "#specific capacity\n", + "#maximum rate at which water can be pumped\n", + "\n", + "#Given\n", + "d = 0.6; \t\t\t\t#diameter of well;\n", + "rw = d/2;\n", + "H = 40.; \t\t\t\t#depth of water in well before pumping\n", + "Q = 2000.; \t\t\t\t#discharge from well\n", + "s1 = 4.; \t\t\t\t#drawdown in well\n", + "B1 = 10.; \t\t\t\t#dismath.tance between well\n", + "s2 = 2.;\n", + "B2 = 20.;\n", + "#Part (a)\n", + "h1 = H-s1;\n", + "h2 = H-s2;\n", + "t = (H**2-h2**2)/(H**2-h1**2);\n", + "R = (B2/(B1**t))**(1/(1-t));\n", + "R = round(R*100)/100;\n", + "print \" radius of zero drawdown = %.2f m\"%(R);\n", + "#Part (b)\n", + "r = 10;\n", + "k = Q*math.log10(R/r)*60*24/(1.36*(H**2-h1**2)*1000);\n", + "k = round(k*100)/100;\n", + "print \"coefficient of permeability = %.2f m/day.\"%(k);\n", + "\n", + "#part (c)\n", + "Ho = (H**2-(Q*math.log10(R/rw)*24*60/(1000*1.36*k)))**0.5;\n", + "D = H-Ho;\n", + "D = round(D*100)/100;\n", + "print \"drawdown in well = %.2f m.\"%(D);\n", + "\n", + "#part (d)\n", + "C = Q/(1000*R);\n", + "#for R = 1 m;Q = Sc\n", + "#hence on putting the values in discharge equation we get\n", + "#Sc*math.log10(61.2*Sc) = 0.3223.\n", + "#on solving this by trial and error method we get Sc = 0.266 m**2/min.\n", + "print \"Specific capacity = 0.266 cubic metre/minutes/metre.\";\n", + "\n", + "#part (e)\n", + "#this is obtained when Q = H\n", + "#hence from equation of discharge,we get\n", + "#Q*math.log10(69.2*Q) = 6.528.\n", + "#solving it by trial and error method we get Q = 2.85 m**3/min.\n", + "print \"maximum rate at which water can be pumped = 2.85 cubic metre/min\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " radius of zero drawdown = 41.53 m\n", + "coefficient of permeability = 4.31 m/day.\n", + "drawdown in well = 16.59 m.\n", + "Specific capacity = 0.266 cubic metre/minutes/metre.\n", + "maximum rate at which water can be pumped = 2.85 cubic metre/min\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 pg : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from numpy import zeros,linspace\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500.; \t\t\t\t#discharge(l/min)\n", + "r = 60.; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "u = linspace(1,9,9)\n", + "Wu = [0.2194, 0.04891, 0.01315, 0.003779, 0.001148, 0.000360, 0.000116, 0.0000377, 0.0000125];\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60.*24);\n", + "\n", + "\n", + "rt = zeros(25)\n", + "for i in range(25):\n", + " rt[i] = r**2/tday[i];\n", + "\n", + "#graph is plotted between s and r**2/t and W(u) and u and they are superimposed.\n", + "#from which we get\n", + "plot(s,rt)\n", + "plot(Wu,u)\n", + "s1 = 0.52;\n", + "Wu1 = 2.96;\n", + "rt1 = 700000; \n", + "u1 = 0.03;\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = Q*Wu1/(4*math.pi*s1);\n", + "S = 4*u1*T/rt1;\n", + "T = round(T);\n", + "print \"formation consmath.tant of acquifer:\";\n", + "print \"T = %.2f cubic metre/day/m.S = %.2f.\"%(T,S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "formation consmath.tant of acquifer:\n", + "T = 1631.00 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEACAYAAAB27puMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH8dJREFUeJzt3XuUFOWd//H33LiIMjDg4ToICohEjMiKiCG2IjC4ibir\nAolRArNZE9xIspconj06JP7cZV1/qJsFs0YjsgmXxcR7FAQmklVARQRFwgyCwiDjyNUbymRm//g+\nbRdjD1Mzfamu7s/rnDr99NNV1d86aH3nuVWDiIiIiIiIiIiIiIiIiIiIiIiIiIiI5JAuwHLgLWAr\ncAFQAqwEtgMr3D5Rs4EqYBsw3lM/AtjiPrvXU98eWOrq1wGneT6b5r5jO3C9p34AsN4dswQoSuD6\nREQkDRYCM1y5ECgG/g34iau7GfhXVx4KbMJu7v2BaiDPfbYBGOnKzwBlrjwTmO/KU7DkAJawdmCJ\nqosrF7vPlgGTXXkB8P22X56IiKRaMfB2nPptQA9X7uneg7VKbvbs9ywwCuiFtWyipgL3e/a5wJUL\ngTpX/haWKKLud8fluX3yXf0odw4REQlAfsu7MAC7cf8K2Ag8AHTCEkmt26eWWGLpDezxHL8H6BOn\nvsbV4153u3I9cBjodoJzlQCHgIY45xIRkTTzk0wKgfOwbqjzgI+BW5rs0+i2dEjX94iIiE9+kske\nt73s3i/Hkso+rHsLrAvrfVeuAUo9x/d1x9e4ctP66DH9XDk6JrM/zrlKXd0BbAwlGn9fV3+cM844\nI5rktGnTpk2bv62aNvCTTPZhXVCD3fvLgDeBJ7GZVrjXx1z5CWxcox3WRTYIG3jfBxzBxkbygOuA\nxz3HRM91NbDKlVdgs8G6AF2BccBz2AWvAa6J8/1f2LFjB42NjVm53X777YHHoOvT9en6sm8DzvCR\nF76k0Od+PwR+jS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Ffxc3z3ALW7f\nPMK1NsrP9RUB5wFjgZOwvwbXYf3wmc7P9d2KdX9FsDVfK4GvAh+mLqy0Cuu9pTV83VvCnkxqgFLP\n+1Ji3QXN7dPX1YWBn+sDGxh7AOvXPFGzNdP4ub4RWPcJWJ/7RKxL5YmUR5c4P9e3G+va+tRtL2A3\n2zAkEz/XNxr4f668A9gJnIm1wsIuzPcWv8J6b2k1PwsXvYNkowjXIJmf6+uH9VuPSmtkydHahae/\nIlyzufxc3xDgeWww+yRsMHRo+kJMiJ/r+//A7a7cA0s2JWmKLxn6428APmz3lqj+NH99Yb63tEm8\nhYs3uC3q5+7z17EuhTBp6fp+iQ1qvua2DekOMEF+/v2iwpZMwN/1/SM2o2sLcFNao0tcS9fXHXgS\n+39vCzbhICwWY2M9n2MtyBlk172lpesL+71FREREREREREREREREREREREREREREREREREREwuj/\nANm4HC3M5K62AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 pg : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math\n", + "from numpy import zeros\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500; \t\t\t\t#discharge(l/min)\n", + "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60*24);\n", + "\n", + "#from the graph between s and t we get\n", + "plot(s,tday)\n", + "ds = 0.38;\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = 2.303*Q/(4*math.pi*ds);\n", + "\t\t\t\t#extending the straight line we get\n", + "to = 0.00024;\n", + "S = 2.25*T*to/r**2;\n", + "print \"formation constant of acquifer:\";\n", + "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "formation constant of acquifer:\n", + "T = 1736 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEACAYAAACtVTGuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH39JREFUeJzt3X+QFOd95/H3aH8ghCUjhAXsstLa/JBBiVzIPsz5cvI4\ncXyISoF8KpmQRFIUVUHiIr4/conk/KPdquROp1TJKYoyRcXy1cZ3J6Lyxc7eCRnpUKakuCQcVDJC\nEssCgvKCYNEvJO0KwS7M/fF9Rjs0M9PPzHTPTvd8XlVTdPc8T29PV9GfeZ6nex4QERERERERERER\nERERERERERERERFpKauBIeAQ8ECZMlvc+/uAFR517wJeAy4AtxZtvxJ4HHgFeB14sP7DFxGROLUB\nh4FeoAP4JbAsUGYNsNMtfxl40aPu54GlwD9zaVD8IRYUADOBo8ANEXwOERGp0RUh76/ELvbHgAlg\nB7AuUGYtMOCW9wCzgfkhdYeA4RJ/7yQwCwuZWcB54APPzyIiIjEIC4puYKRo/bjb5lOmy6Nu0C4s\nGE5iAfM3wJmQOiIiEqP2kPfznvvJ1Hsgzh9gXU4LgDnA88BurAtKRESmQVhQnAB6itZ7sJZBpTIL\nXZkOj7pBXwF+gg1yvwX8HPgSgaBYtGhR/siRIyG7EhGRgCPA4morhXU97QWWYAPSncB6YDBQZhC4\nxy2vwrqKRj3rwqWtk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WeD7n4veA/83UHXpvN+rg\nGsznXJwErnHL12BBMdmg42uk54H3Krxf6sHgaXxsN1Zh56Lq62YzB4XPw37F7mfqG0Pa+D74uI6p\nn1BpuudPIuJzLpZgN0z8M7AXuLsxh9ZwPufi74CbgTex7ob/1JhDazqlzlVav1hWw+u62cxN0Gou\ndF8D/gj4dzEdy3TzORd/i91qnMduKU7rbcU+56IDu/vut4CrsG9QL2L902nicy7+EuuSygKLsN9Y\n+wLwYXyH1bSC/yfS+mXKl/d1s5mDwudhP7CBmL/D+toqNbeSzOdcfBHregDri74d644YjP3oGsvn\nXIxg3U1n3es57OKYtqDwORdfAf7aLR8BjgI3YS2tVuL7MG+rSM110+dhvxuwPtpVDT2yxvM5F8X+\nO+m968nnXHwee06nDWtR7Mce5kwbn3PxKPCQW56HBcmcBh1fo/XiN5hd/GBwWvVS/lyk7roZ9rDf\nD7DBuZfd6xeNPsAG8nnwsSDNQQF+5+I/Y3c+7Qe+09Cja6ywczEX+D/Y+MR+bKA/jR7HxmHOYy3K\nP8L/weC0CTsXrXTdFBERERERERERERERERERERERERERERERERERic7/B1G0iHxZaA7OAAAAAElF\nTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 pg : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math\n", + "from numpy import zeros\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500; \t\t\t\t#discharge(l/min)\n", + "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60.*24);\n", + "\n", + "#graph is plotted between s and t\n", + "#point P is choosen on it whose ordinate is:\n", + "plot(s,tday)\n", + "s1 = 0.45;\n", + "t = 0.00347;\n", + "ds = 0.38; \t\t\t\t#for one math.log cycle of time\n", + "Fu = s1/ds;\n", + "#from fig 5.43\n", + "#or umath.sing relation\n", + "Wu = 2.303*Fu; \n", + "u = 0.035; \t\t\t\t#from table 5.2\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = Q*Wu/(4*math.pi*s1);\n", + "S = 4*u*t*T/r**2;\n", + "print \"formation consmath.tant of acquifer:\";\n", + "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "formation consmath.tant of acquifer:\n", + "T = 1736 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHX5JREFUeJzt3Xt0VfWZ//E3DYQCcmmFwnDRMAIC1gtVMVJbjkBnRVDo\nWKtV1BYVWV1CsYNdlM6MRKelS7sc0aLCSLS4qs2vo+0QFUEhHHUEuRRBuTkhgEIQQQrIVUhyfn88\nO+TkeJKzk3PZ++zzea211zn7dvK4I0++5/l+9/6CiIiIiIiIiIiIiIiIiIiIiIiIiIj4QBGwFagA\npsfZPxBYCZwEpsXsmwFsAj4AXgDapi9MERFJVh6wDSgA2gDrgUExx3QDLgN+TcOkXwBspz7R/z/g\nx+kLVUREEvlKgv1DsaS/EzgNlALjYo7ZD6x19kf73NnWHmjtvFY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ap2D1TQLMxpZ5jX3prVn\nCe7oHTfXYiCwFOvobI91aA3OXIgZ4+Za/Ccw03nfHfuj8PUMxZdpBbjryI2+ITSoCmj8Wvg6bya6\nyWs+1jH1nrOsznSAGeTmhrc6QU764O5a3IeN4PkA+FlGo8usRNeiK/AyVs//AOvkDqI/Yf0Wp7Bv\nenfg/obQoEl0LXIpb4qIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIeOf/A0ZprnC5+57cAAAAAElF\nTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 pg : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t#draw daown in main well\n", + "\t\t\t\t\n", + "#Given\n", + "H = 25; \t\t\t\t#static water level\n", + "rw = 0.15; \t\t\t\t#radius of well\n", + "Q = 5400; \t\t\t\t#discharge(litre/min)\n", + "t = 24; \t\t\t\t#time of discharge\n", + "r1 = 30; \t\t\t\t#dismath.tance of first well\n", + "s1 = 1.11; \t\t\t\t#drawdown\n", + "h1 = H-s1;\n", + "r2 = 90; \t\t\t\t#dismath.tance of second well\n", + "s2 = 0.53; \t\t\t\t#drawdown\n", + "h2 = H-s2;\n", + "k = (Q*2.303*math.log10(r2/r1))/(math.pi*(h2**2-h1**2)*60000);\n", + "T = k*H;\n", + "T = round(T*10000)/10000;\n", + "print \"transmissibility of acquifer = %.2f cumec/sec.\"%(T);\n", + "hw = (h2**2-(Q*2.303*math.log10(r2/rw))/(math.pi*k*60000))**0.5;\n", + "sw = H-hw;\n", + "sw = round(sw*100)/100;\n", + "print \"draw daown in main well = %.2f m.\"%(sw);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transmissibility of acquifer = 0.03 cumec/sec.\n", + "draw daown in main well = 4.13 m.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 pg : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 250; \t\t\t\t#discharge(lit/min)\n", + "H = 100; \t\t\t\t#water level in acquifer\n", + "s1 = 12; \t\t\t\t#drawdown\n", + "h1 = H-s1;\n", + "\t\t\t\t#let t = ln(R/r)/(pi*k)\n", + "t = (H**2-h1**2)/Q;\n", + "h2 = H-18;\n", + "Q1 = (H**2-h2**2)/t;\n", + "print \"discharge at 18m drawdown = %d lpm\"%(Q1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge at 18m drawdown = 364 lpm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "b = 10; \t\t\t\t#thickness of acquifer\n", + "k = 48; \t\t\t\t#permeability coefficient\n", + "R = 500.; \t\t\t\t#radius of influence\n", + "s = 12; \t\t\t\t#drawdown\n", + "Q = 5000; \t\t\t\t#discharge(cumec/day)\n", + "r = R/math.e**(2*math.pi*b*k*s/Q);\n", + "D = 2*r;\n", + "D = round(D*100)/100;\n", + "print \"effective well diameter = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective well diameter = 0.72 m.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 1500; \t\t\t\t#discharge(lit/min)\n", + "S = 0.004; \t\t\t\t#storage coefficient\n", + "k = 35; \t\t\t\t#permeability\n", + "t = 20; \t\t\t\t#time of pumping\n", + "b = 30; \t\t\t\t#thickness of acquifer\n", + "r = 40; \t\t\t\t#dismath.tance of observation well\n", + "T = k*b;\n", + "s = Q*(2.303*math.log10(4*T*t*3600/(60*60*24*r**2*S))-0.5772)*60*60*24/(4*math.pi*T*60000); \t\t\t\t#Jacob's equation\n", + "s = round(s*100)/100;\n", + "print \"drawdown at 40m = %.2f m.\"%(s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drawdown at 40m = 0.94 m.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1.8; \t\t\t\t#heigth after recuperation\n", + "t = 80; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "d = 4; \t\t\t\t#diameter of well\n", + "H = 3; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H/3.6;\n", + "Q = round(Q);\n", + "print \"Yield from well = %.2f lit/sec.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yield from well = 10.00 lit/sec.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "rw = 0.15; \t\t\t\t#radius of well\n", + "b = 40; \t\t\t\t#depth of acquifer\n", + "Q = 1500; \t\t\t\t#discharge(lpm)\n", + "s1 = 3.5; \t\t\t\t#drawdown of first well\n", + "s2 = 2; \t\t\t\t#drawdown of second well\n", + "H = 40; \n", + "r1 = 25; \t\t\t\t#dismath.tance of first well\n", + "r2 = 75; \t\t\t\t#dismath.tance of second well\n", + "h1 = H-s1;\n", + "h2 = H-s2;\n", + "k = Q*2.303*math.log10(r2/r1)/(math.pi*1000*60*(h2**2-h1**2));\n", + "T = b*k*1000;\n", + "print \"transmissibility = %.2fD-3 square metre/sec\"%(T);\n", + "\n", + "hw = (h2**2-(Q*2.303*math.log10(r2/rw)/(math.pi*k*60000)))**0.5;\n", + "sw = H-hw;\n", + "sw = round(sw*100)/100;\n", + "print \"drawdown at pumping well = %.2f m.\"%(sw);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transmissibility = 3.13D-3 square metre/sec\n", + "drawdown at pumping well = 11.51 m.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 pg : 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "r = 0.25; \t\t\t\t#radius of test well\n", + "r1 = 10; \t\t\t\t#dismath.tance of first well\n", + "r2 = 60; \t\t\t\t#dismath.tance of second well\n", + "Q = 0.1; \t\t\t\t#discharge(cumec/sec)\n", + "s1 = 4; \t\t\t\t#drawdown of first well\n", + "s2 = 3; \t\t\t\t#drawdown of second well\n", + "b = 20; \t\t\t\t#thickness of well\n", + "k = 1000*Q*math.log10(r2/r1)/(2.72*b*(s1-s2));\n", + "print \"coefficient of permeability = %.2fD-3 m/sec\"%(k);\n", + "s = s2+Q*math.log10(r2/r)/(2.72*b*k);\n", + "s = round(s*100)/100;\n", + "print \"drawdown in test well = %.2f m.\"%(s); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of permeability = 1.43D-3 m/sec\n", + "drawdown in test well = 3.00 m.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 pg : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 2.1; \t\t\t\t#initial pumping depression\n", + "h = 1.6; \t\t\t\t#heigth after recuperation\n", + "t = 90; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "Q = 10; \t\t\t\t#yield(lit/sec)\n", + "H = 2;\n", + "A = Q*3.6/(H*(KbyA));\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"Daimeter of well = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Daimeter of well = 4.90 m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 pg : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1; \t\t\t\t#heigth after recuperation\n", + "t = 60; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "\n", + "# Calculations\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "d = 2.; \t\t\t\t#diameter of well\n", + "H = 3.; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H;\n", + "Q = round(Q*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Yield from well = %.2f cubic metre/hour.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yield from well = 4.82 cubic metre/hour.\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..a473df61 --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_1.ipynb @@ -0,0 +1,1232 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ba8fe47f9e34523e72313e6de9073278b5a7ecea1af12ee41d74f1b26aaa7966" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : GROUND WATER WELL IRRIGATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 pg : 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t#design an open wellin fine sand\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.003; \t\t\t\t#required discharge\n", + "H = 2.5; \t\t\t\t#depression head\n", + "A = Q*3600/(0.5*H);\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*100)/100\n", + "print \"Well diameter = %.2f m.\"%(d);\n", + "\n", + "\t\t\t\t#Alternative solution\n", + "C = 7.5e-5; \t\t\t\t#permeability consmath.tant from table 5.2\n", + "A = Q/(C*H);\n", + "d = (16*3/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"By alternative solution:\"\n", + "print \"Well diameter = %.2f m\"%(d);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Well diameter = 3.32 m.\n", + "By alternative solution:\n", + "Well diameter = 3.90 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 pg : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#yield from well\n", + "#diameter of well\n", + "\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1.8; \t\t\t\t#heigth after recuperation\n", + "t = 80; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "d = 4; \t\t\t\t#diameter of well\n", + "H = 3; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H/3.6;\n", + "print \"Part a\";\n", + "Q = round(Q);\n", + "print \"Yield from well = %.2f lit/sec.\"%(Q);\n", + "\n", + "#Part (b)\n", + "Q = 8; \t\t\t\t#yield(lit/sec)\n", + "H = 2;\n", + "A = Q*3.6/(H*(KbyA));\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"Part b\";\n", + "print \"Daimeter of well = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a\n", + "Yield from well = 10.00 lit/sec.\n", + "Part b\n", + "Daimeter of well = 4.40 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 pg : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "d = 30; \t\t\t\t#well diameter\n", + "L = 15; \t\t\t\t#strainer length\n", + "P = 50; \t\t\t\t#coefficient of permeability\n", + "s = 0.2; \t\t\t\t#effective size of sand\n", + "b = 3; \t\t\t\t#drawdown\n", + "r = 150; \t\t\t\t#radius of drawdown\n", + "\n", + "\n", + "# Calculations\n", + "Q = 2.72*L*P*b/(math.log10(r*2*100/d)*24*3.6);\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \" yield from well = %.2f lit/sec.\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " yield from well = 23.60 lit/sec.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 pg : 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "d = 30; \t\t\t\t#diameter of well\n", + "s = 2; \t\t\t\t#drawdown\n", + "L = 10; \t\t\t\t#length of stainer\n", + "k = 0.05; \t\t\t\t#coefficient of permeability\n", + "r = 300; \t\t\t\t#radius of zero drawdown\n", + "\n", + "# Calculations\n", + "Q = 2.72*k*s*(L+s/2)/(100*math.log10(2*100*r/d));\n", + "\n", + "# Results\n", + "print \" discharge from tubewell = %.4f cumec.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " discharge from tubewell = 0.0091 cumec.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 pg: 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t#design tube well\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 0.08; \t\t\t\t#yield required\n", + "b = 30; \t\t\t\t#thickness of acquifer\n", + "R = 300; \t\t\t\t#Radius of circle of influence\n", + "k = 60; \t\t\t\t#permeability coefficient\n", + "s = 5; \t\t\t\t#Drawdown\n", + "\n", + "# Calculations\n", + "r = R/(10**(2.72*b*s*k/(3600*24*Q)));\n", + "r = round(r*10000)/10000;\n", + "\n", + "# Results\n", + "print \"Radius of well = %.2f m\"%(r);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of well = 0.09 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 pg : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "b = 30.; \t\t\t\t#thickness of acquifer\n", + "s = 4.; \t\t\t\t#drawdown\n", + "r = 0.1; \t\t\t\t#well radius\n", + "k = 36.; \t\t\t\t#permeability coefficient\n", + "R = 3000*s*(k/(24*3600))**0.5;\n", + "\n", + "Q = 2.72*b*k*s/(math.log10(R/r)*24*3.6);\n", + "Q = round(Q*10)/10;\n", + "print \"yield from well = %.2f lit/sec.\"%(Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "yield from well = 40.10 lit/sec.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 pg : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "k = 0.005; \t\t\t\t#coefficient of permeability\n", + "r = 0.1; \t\t\t\t#well radius\n", + "s = 4; \t\t\t\t#drawdown\n", + "b = 10; \t\t\t\t#thickness\n", + "R = 300; \t\t\t\t#radius of circle of influence\n", + "\n", + "# Calculations and Results\n", + "#Part(a)\n", + "Q1 = 2.72*b*k*s/math.log10(R/r);\n", + "Q1 = round(Q1*10000)/10000;\n", + "print \"Discharge = %.2f cumec\"%(Q1);\n", + "\n", + "#Part (b)\n", + "r = 0.2;\n", + "Q2 = 2.72*b*k*s/math.log10(R/r);\n", + "I = (Q2-Q1)*100/Q1;\n", + "I = round(I*10)/10;\n", + "print \"percent increase in discharge = %.2f percent.\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 0.16 cumec\n", + "percent increase in discharge = 9.40 percent.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 pg : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#percentage error\n", + "#actual radius of influence\n", + "\n", + "#Given\n", + "d = 0.2; \t\t\t\t#diameter of well\n", + "Q = 240; \t\t\t\t#discharge\n", + "RL1 = 240.5; \t\t\t\t#reduce level of original water surface\n", + "RL2 = 235.6; \t\t\t\t#reduced level of water at pumping\n", + "RL3 = 210; \t\t\t\t#reduced level of impervious layer\n", + "RL4 = 239.8; \t\t\t\t#reduced level of water in well\n", + "D = 50; \t\t\t\t#radial dismath.tance of well from tube well\n", + "\n", + "# Calculations and Results\n", + "#Part(a)\n", + "h1 = RL2-RL3;\n", + "h2 = RL4-RL3;\n", + "k1 = Q*24*math.log10(D*2/d)/(1.36*(h2**2-h1**2));\n", + "k1 = round(k1*100)/100;\n", + "print \"Parta\";\n", + "print \"coefficient of permeability = %.2f m/day.\"%(k1);\n", + "#Part (b)\n", + "R = 300; \t\t\t\t#radius of influence\n", + "H = RL1-RL3;\n", + "h = RL2-RL3;\n", + "k2 = Q*24*math.log10(R*2/d)/(1.36*(H**2-h**2));\n", + "PE = (k2-k1)*100/k1;\n", + "print \"Partb\";\n", + "print \"percentage error = %i percent.\"%(PE);\n", + "#Part (b)\n", + "R = (d/2)*10**(1.36*k1*(H**2-h**2)/(24*Q));\n", + "print \"Partc\";\n", + "print \"Actual radius of influence = %i m.\"%(R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta\n", + "coefficient of permeability = 49.13 m/day.\n", + "Partb\n", + "percentage error = 9 percent.\n", + "Partc\n", + "Actual radius of influence = 154 m.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 pg : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "A = 20.; \t\t\t\t#area of field\n", + "H = 129.; \t\t\t\t#level to the highest land\n", + "h1 = 120.2; \t\t\t\t#water level in well during discharge\n", + "Du = 800; \t\t\t\t#duty for rise;\n", + "eita = 0.6; \t\t\t\t#efficiency of the pump\n", + "\n", + "# Calculations\n", + "Q = A/Du;\n", + "w = Q*1000;\n", + "lift = H-h1;\n", + "\t\t\t\t#design lift is taken as 9m\n", + "wd = w*9;\n", + "o = wd/75;\n", + "i = o/eita;\n", + "\n", + "# Results\n", + "print \"Input h.p of pump = %i h.p\"%i;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input h.p of pump = 5 h.p\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 pg : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 150; \t\t\t\t#discharge from tubewell\n", + "t = 4000; \t\t\t\t#working period of tubewell\n", + "I = 0.45; \t\t\t\t#intensity of irrigation\n", + "d = 0.38; \t\t\t\t#average depth of rabi and kharif crop\n", + "\n", + "# Calculations\n", + "V = Q*t;\n", + "A = V/d;\n", + "CA = A/(I*10000);\n", + "CA = round(CA);\n", + "\n", + "# Results\n", + "print \"culturable area = %.2f hectares.\"%(CA);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "culturable area = 351.00 hectares.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 pg : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#percent decrease when two well discharges\n", + "\n", + "#Given\n", + "d = 0.2; \t\t\t\t#diameter of well\n", + "r = d/2;\n", + "B = 100; \t\t\t\t#dismath.tance between wells\n", + "b = 12; \t\t\t\t#thickness of acquifer\n", + "k = 60; \t\t\t\t#coefficient of permeability\n", + "s = 3; \t\t\t\t#print ersion head\n", + "R = 250; \t\t\t\t#radius of influence\n", + "Q = 2.72*b*k*s/(24*math.log10(R/r));\n", + "print \"discharge if one well discharges = %i cubic metre/hour.\"%(Q);\n", + "#when both well are discharging\n", + "Q1 = 2.72*k*b*s/(24*math.log10(R**2/(r*B)));\n", + "Q1 = round(Q1*10)/10;\n", + "print \"discharge if both wells discharges = %.2f cubic metre/hour.\"%(Q1);\n", + "PE = (Q-Q1)*100/Q;\n", + "PE = round(PE*100)/100;\n", + "print \"percentage decrease in discharge = %.2f percent.\"%(PE);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge if one well discharges = 72 cubic metre/hour.\n", + "discharge if both wells discharges = 64.50 cubic metre/hour.\n", + "percentage decrease in discharge = 10.47 percent.\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 pg : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#coefficient of permeability\n", + "#drawdown in well\n", + "#specific capacity\n", + "#maximum rate at which water can be pumped\n", + "\n", + "#Given\n", + "d = 0.6; \t\t\t\t#diameter of well;\n", + "rw = d/2;\n", + "H = 40.; \t\t\t\t#depth of water in well before pumping\n", + "Q = 2000.; \t\t\t\t#discharge from well\n", + "s1 = 4.; \t\t\t\t#drawdown in well\n", + "B1 = 10.; \t\t\t\t#dismath.tance between well\n", + "s2 = 2.;\n", + "B2 = 20.;\n", + "#Part (a)\n", + "h1 = H-s1;\n", + "h2 = H-s2;\n", + "t = (H**2-h2**2)/(H**2-h1**2);\n", + "R = (B2/(B1**t))**(1/(1-t));\n", + "R = round(R*100)/100;\n", + "print \" radius of zero drawdown = %.2f m\"%(R);\n", + "#Part (b)\n", + "r = 10;\n", + "k = Q*math.log10(R/r)*60*24/(1.36*(H**2-h1**2)*1000);\n", + "k = round(k*100)/100;\n", + "print \"coefficient of permeability = %.2f m/day.\"%(k);\n", + "\n", + "#part (c)\n", + "Ho = (H**2-(Q*math.log10(R/rw)*24*60/(1000*1.36*k)))**0.5;\n", + "D = H-Ho;\n", + "D = round(D*100)/100;\n", + "print \"drawdown in well = %.2f m.\"%(D);\n", + "\n", + "#part (d)\n", + "C = Q/(1000*R);\n", + "#for R = 1 m;Q = Sc\n", + "#hence on putting the values in discharge equation we get\n", + "#Sc*math.log10(61.2*Sc) = 0.3223.\n", + "#on solving this by trial and error method we get Sc = 0.266 m**2/min.\n", + "print \"Specific capacity = 0.266 cubic metre/minutes/metre.\";\n", + "\n", + "#part (e)\n", + "#this is obtained when Q = H\n", + "#hence from equation of discharge,we get\n", + "#Q*math.log10(69.2*Q) = 6.528.\n", + "#solving it by trial and error method we get Q = 2.85 m**3/min.\n", + "print \"maximum rate at which water can be pumped = 2.85 cubic metre/min\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " radius of zero drawdown = 41.53 m\n", + "coefficient of permeability = 4.31 m/day.\n", + "drawdown in well = 16.59 m.\n", + "Specific capacity = 0.266 cubic metre/minutes/metre.\n", + "maximum rate at which water can be pumped = 2.85 cubic metre/min\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 pg : 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math \n", + "from numpy import zeros,linspace\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500.; \t\t\t\t#discharge(l/min)\n", + "r = 60.; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "u = linspace(1,9,9)\n", + "Wu = [0.2194, 0.04891, 0.01315, 0.003779, 0.001148, 0.000360, 0.000116, 0.0000377, 0.0000125];\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60.*24);\n", + "\n", + "\n", + "rt = zeros(25)\n", + "for i in range(25):\n", + " rt[i] = r**2/tday[i];\n", + "\n", + "#graph is plotted between s and r**2/t and W(u) and u and they are superimposed.\n", + "#from which we get\n", + "plot(s,rt)\n", + "plot(Wu,u)\n", + "s1 = 0.52;\n", + "Wu1 = 2.96;\n", + "rt1 = 700000; \n", + "u1 = 0.03;\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = Q*Wu1/(4*math.pi*s1);\n", + "S = 4*u1*T/rt1;\n", + "T = round(T);\n", + "print \"formation consmath.tant of acquifer:\";\n", + "print \"T = %.2f cubic metre/day/m.S = %.2f.\"%(T,S);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "formation consmath.tant of acquifer:\n", + "T = 1631.00 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEACAYAAAB27puMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH8dJREFUeJzt3XuUFOWd//H33LiIMjDg4ToICohEjMiKiCG2IjC4ibir\nAolRArNZE9xIspconj06JP7cZV1/qJsFs0YjsgmXxcR7FAQmklVARQRFwgyCwiDjyNUbymRm//g+\nbRdjD1Mzfamu7s/rnDr99NNV1d86aH3nuVWDiIiIiIiIiIiIiIiIiIiIiIiIiIiI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172lpesL+71FREREREREREREREREREREREREREREREREREREwuj/\nANm4HC3M5K62AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 pg : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math\n", + "from numpy import zeros\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500; \t\t\t\t#discharge(l/min)\n", + "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60*24);\n", + "\n", + "#from the graph between s and t we get\n", + "plot(s,tday)\n", + "ds = 0.38;\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = 2.303*Q/(4*math.pi*ds);\n", + "\t\t\t\t#extending the straight line we get\n", + "to = 0.00024;\n", + "S = 2.25*T*to/r**2;\n", + "print \"formation constant of acquifer:\";\n", + "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "formation constant of acquifer:" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "T = 1736 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "i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110+dhvxuwPtpVDT2yxvM5F8X+\nO+m968nnXHwee06nDWtR7Mce5kwbn3PxKPCQW56HBcmcBh1fo/XiN5hd/GBwWvVS/lyk7roZ9rDf\nD7DBuZfd6xeNPsAG8nnwsSDNQQF+5+I/Y3c+7Qe+09Cja6ywczEX+D/Y+MR+bKA/jR7HxmHOYy3K\nP8L/weC0CTsXrXTdFBERERERERERERERERERERERERERERERERERic7/B1G0iHxZaA7OAAAAAElF\nTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 pg : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline\n", + "import math\n", + "from numpy import zeros\n", + "from matplotlib.pylab import plot\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 2500; \t\t\t\t#discharge(l/min)\n", + "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n", + "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n", + "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n", + "tday = zeros(25)\n", + "for i in range(25):\n", + " tday[i] = tmin[i]/(60.*24);\n", + "\n", + "#graph is plotted between s and t\n", + "#point P is choosen on it whose ordinate is:\n", + "plot(s,tday)\n", + "s1 = 0.45;\n", + "t = 0.00347;\n", + "ds = 0.38; \t\t\t\t#for one math.log cycle of time\n", + "Fu = s1/ds;\n", + "#from fig 5.43\n", + "#or umath.sing relation\n", + "Wu = 2.303*Fu; \n", + "u = 0.035; \t\t\t\t#from table 5.2\n", + "Q = 3600; \t\t\t\t#discharge in cumec/day\n", + "T = Q*Wu/(4*math.pi*s1);\n", + "S = 4*u*t*T/r**2;\n", + "print \"formation consmath.tant of acquifer:\";\n", + "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n", + "formation consmath.tant of acquifer:" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "T = 1736 cubic metre/day/m.S = 0.00.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHX5JREFUeJzt3Xt0VfWZ//E3DYQCcmmFwnDRMAIC1gtVMVJbjkBnRVDo\nWKtV1BYVWV1CsYNdlM6MRKelS7sc0aLCSLS4qs2vo+0QFUEhHHUEuRRBuTkhgEIQQQrIVUhyfn88\nO+TkeJKzk3PZ++zzea211zn7dvK4I0++5/l+9/6CiIiIiIiIiIiIiIiIiIiIiIiIiIj4QBGwFagA\npsfZPxBYCZwEpsXsmwFsAj4AXgDapi9MERFJVh6wDSgA2gDrgUExx3QDLgN+TcOkXwBspz7R/z/g\nx+kLVUREEvlKgv1DsaS/EzgNlALjYo7ZD6x19kf73NnWHmjtvFYlF66IiCQjUdLvBeyKWt/tbHPj\n78AjwMfAHuAQsLS5AYqISOokSvqRJD77POBerMzTEzgLGJ/E54mISJJaJ9hfBfSJWu+DtfbduAxY\nARxw1v8CDAOejz7ovPPOi1RWVrr8SBERcVQC/Zp7UqKW/lqgP9ZazwduAsoaObZVzPpWoBBo5+wb\nBWyOPamyspJIJKIlEmHmzJmex+CXRddC10LXoukFq6Y0W6KWfjUwGViCjeQpAbYAk5z984AewBqg\nE1ALTAUGAxuA57A/HLXAOuC/WhKkiIikRqKkD/Cas0SbF/V+Lw1LQ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+ "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 pg : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t#draw daown in main well\n", + "\t\t\t\t\n", + "#Given\n", + "H = 25; \t\t\t\t#static water level\n", + "rw = 0.15; \t\t\t\t#radius of well\n", + "Q = 5400; \t\t\t\t#discharge(litre/min)\n", + "t = 24; \t\t\t\t#time of discharge\n", + "r1 = 30; \t\t\t\t#dismath.tance of first well\n", + "s1 = 1.11; \t\t\t\t#drawdown\n", + "h1 = H-s1;\n", + "r2 = 90; \t\t\t\t#dismath.tance of second well\n", + "s2 = 0.53; \t\t\t\t#drawdown\n", + "h2 = H-s2;\n", + "k = (Q*2.303*math.log10(r2/r1))/(math.pi*(h2**2-h1**2)*60000);\n", + "T = k*H;\n", + "T = round(T*10000)/10000;\n", + "print \"transmissibility of acquifer = %.2f cumec/sec.\"%(T);\n", + "hw = (h2**2-(Q*2.303*math.log10(r2/rw))/(math.pi*k*60000))**0.5;\n", + "sw = H-hw;\n", + "sw = round(sw*100)/100;\n", + "print \"draw daown in main well = %.2f m.\"%(sw);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transmissibility of acquifer = 0.03 cumec/sec.\n", + "draw daown in main well = 4.13 m.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 pg : 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 250; \t\t\t\t#discharge(lit/min)\n", + "H = 100; \t\t\t\t#water level in acquifer\n", + "s1 = 12; \t\t\t\t#drawdown\n", + "h1 = H-s1;\n", + "\t\t\t\t#let t = ln(R/r)/(pi*k)\n", + "t = (H**2-h1**2)/Q;\n", + "h2 = H-18;\n", + "Q1 = (H**2-h2**2)/t;\n", + "print \"discharge at 18m drawdown = %d lpm\"%(Q1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge at 18m drawdown = 364 lpm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "b = 10; \t\t\t\t#thickness of acquifer\n", + "k = 48; \t\t\t\t#permeability coefficient\n", + "R = 500.; \t\t\t\t#radius of influence\n", + "s = 12; \t\t\t\t#drawdown\n", + "Q = 5000; \t\t\t\t#discharge(cumec/day)\n", + "r = R/math.e**(2*math.pi*b*k*s/Q);\n", + "D = 2*r;\n", + "D = round(D*100)/100;\n", + "print \"effective well diameter = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective well diameter = 0.72 m.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "Q = 1500; \t\t\t\t#discharge(lit/min)\n", + "S = 0.004; \t\t\t\t#storage coefficient\n", + "k = 35; \t\t\t\t#permeability\n", + "t = 20; \t\t\t\t#time of pumping\n", + "b = 30; \t\t\t\t#thickness of acquifer\n", + "r = 40; \t\t\t\t#dismath.tance of observation well\n", + "T = k*b;\n", + "s = Q*(2.303*math.log10(4*T*t*3600/(60*60*24*r**2*S))-0.5772)*60*60*24/(4*math.pi*T*60000); \t\t\t\t#Jacob's equation\n", + "s = round(s*100)/100;\n", + "print \"drawdown at 40m = %.2f m.\"%(s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "drawdown at 40m = 0.94 m.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1.8; \t\t\t\t#heigth after recuperation\n", + "t = 80; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "d = 4; \t\t\t\t#diameter of well\n", + "H = 3; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H/3.6;\n", + "Q = round(Q);\n", + "print \"Yield from well = %.2f lit/sec.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yield from well = 10.00 lit/sec.\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 pg : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "rw = 0.15; \t\t\t\t#radius of well\n", + "b = 40; \t\t\t\t#depth of acquifer\n", + "Q = 1500; \t\t\t\t#discharge(lpm)\n", + "s1 = 3.5; \t\t\t\t#drawdown of first well\n", + "s2 = 2; \t\t\t\t#drawdown of second well\n", + "H = 40; \n", + "r1 = 25; \t\t\t\t#dismath.tance of first well\n", + "r2 = 75; \t\t\t\t#dismath.tance of second well\n", + "h1 = H-s1;\n", + "h2 = H-s2;\n", + "k = Q*2.303*math.log10(r2/r1)/(math.pi*1000*60*(h2**2-h1**2));\n", + "T = b*k*1000;\n", + "print \"transmissibility = %.2fD-3 square metre/sec\"%(T);\n", + "\n", + "hw = (h2**2-(Q*2.303*math.log10(r2/rw)/(math.pi*k*60000)))**0.5;\n", + "sw = H-hw;\n", + "sw = round(sw*100)/100;\n", + "print \"drawdown at pumping well = %.2f m.\"%(sw);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "transmissibility = 3.13D-3 square metre/sec\n", + "drawdown at pumping well = 11.51 m.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 pg : 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "r = 0.25; \t\t\t\t#radius of test well\n", + "r1 = 10; \t\t\t\t#dismath.tance of first well\n", + "r2 = 60; \t\t\t\t#dismath.tance of second well\n", + "Q = 0.1; \t\t\t\t#discharge(cumec/sec)\n", + "s1 = 4; \t\t\t\t#drawdown of first well\n", + "s2 = 3; \t\t\t\t#drawdown of second well\n", + "b = 20; \t\t\t\t#thickness of well\n", + "k = 1000*Q*math.log10(r2/r1)/(2.72*b*(s1-s2));\n", + "print \"coefficient of permeability = %.2fD-3 m/sec\"%(k);\n", + "s = s2+Q*math.log10(r2/r)/(2.72*b*k);\n", + "s = round(s*100)/100;\n", + "print \"drawdown in test well = %.2f m.\"%(s); \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of permeability = 1.43D-3 m/sec\n", + "drawdown in test well = 3.00 m.\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 pg : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 2.1; \t\t\t\t#initial pumping depression\n", + "h = 1.6; \t\t\t\t#heigth after recuperation\n", + "t = 90; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "Q = 10; \t\t\t\t#yield(lit/sec)\n", + "H = 2;\n", + "A = Q*3.6/(H*(KbyA));\n", + "d = (4*A/math.pi)**0.5;\n", + "d = round(d*10)/10;\n", + "print \"Daimeter of well = %.2f m\"%(d);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Daimeter of well = 4.90 m\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 pg : 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "h1 = 2.5; \t\t\t\t#initial pumping depression\n", + "h = 1; \t\t\t\t#heigth after recuperation\n", + "t = 60; \t\t\t\t#time\n", + "h2 = h1-h;\n", + "\n", + "# Calculations\n", + "KbyA = 2.303*60*math.log10(h1/h2)/t;\n", + "d = 2.; \t\t\t\t#diameter of well\n", + "H = 3.; \t\t\t\t#depression head\n", + "A = math.pi*d**2/4;\n", + "Q = (KbyA)*A*H;\n", + "Q = round(Q*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Yield from well = %.2f cubic metre/hour.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yield from well = 4.82 cubic metre/hour.\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6.ipynb new file mode 100755 index 00000000..23b46e1d --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6.ipynb @@ -0,0 +1,654 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cdf8fdbaa560cd66d2c449918f65db6ec9d56e694a7e8698e703276e2f6f0ae8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : RESERVIOR PLANNING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 pg : 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,linspace\n", + "#determine maximum reservior level\n", + "#maximum discharge over spillway\n", + "#plot inflow and routed hydrograph and find peak flow and peak lag\n", + "\n", + "#Given\n", + "e = [100, 100.3, 100.6, 100.9, 101.2, 101.5, 101.8, 102.1, 102.4, 102.7]; \t\t\t\t#elevation(km)\n", + "A = [405, 412, 420, 425, 428, 436, 445, 453, 460, 469]; \t\t\t\t#area\n", + "o = [0, 14.9, 42.2, 77.3, 119, 169, 217, 272, 334, 405]; \t\t\t\t#outflow\n", + "c = zeros(10)\n", + "dh = zeros(10)\n", + "s = zeros(10)\n", + "h = zeros(10)\n", + "h1 = zeros(10)\n", + "h2 = zeros(10)\n", + "for i in range(10):\n", + " dh[i] = e[i]-e[i-1];\n", + " s[i] = dh[i]/3*(A[i-1]+A[i]+(A[i-1]*A[i])**0.5); \t\t\t\t#storage between contours\n", + " c[i] = c[i-1]+s[i]; \t\t\t\t#cumulative storage\n", + " h[i] = c[i]/1.08; \t\t\t\t#2s/t\n", + " h1[i] = h[i]-o[i]; \t\t\t\t#2s/t-o\n", + " h2[i] = h[i]+o[i]; \t\t\t\t#2s/t+o\n", + "\n", + "T = linspace(0,102,17)\n", + "I = [42, 45, 57, 88, 147, 210, 272, 340, 350, 338, 314, 288, 263, 240, 198, 170, 143, 120]; \t\t\t\t#inflow\n", + "h4 = [0, 0, 60, 122, 185, 266, 362, 455, 545, 605, 623, 620, 600, 575, 550, 515, 470, 430]; \t\t\t\t#2s/t-0 obtained from curve a\n", + "O = [0, 10, 24, 42, 74, 130, 194, 260, 316, 334, 328, 312, 286, 264, 236, 204, 177, 150]; \t\t\t\t#outflow read from curve a\n", + "re = [100.2, 100.39, 100.58, 100.86, 101.26, 101.65, 102.03, 102.31, 102.4, 102.37, 102.3, 102.18, 102.06, 101.9, 101.72, 101.56, 102.4]; \t\t\t\t#reservior elevation read from curve b\n", + "t = zeros(17)\n", + "h3 = zeros(17)\n", + "for i in range(1,17):\n", + " t[i] = I[i-1]+I[i]; \t\t\t\t#I1+I2\n", + " h3[i] = t[i]+h4[i]; \t\t\t\t#2s/t+O\n", + "\n", + "pt = T[9]-T[8];\n", + "d = I[8]-O[9];\n", + "#results\n", + "print \" maximum reservior level = %.2f m.\"%(re[9]);\n", + "print \"maximum discharge over spillway = %.2f cumecs.\"%(O[9]);\n", + "print \"reduction in peak discharge = %.2f cumecs.\"%(d);\n", + "print \"peak lag = %.f hours.\"%(pt);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " maximum reservior level = 102.37 m.\n", + "maximum discharge over spillway = 334.00 cumecs.\n", + "reduction in peak discharge = 16.00 cumecs.\n", + "peak lag = 6 hours.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 pg : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "in1 = [8.6, 2.2, 1.8, 0, 0, 13.5, 280.6, 510.2, 136, 52.5, 20.6, 12.3]; \t\t\t\t#inflow(ha-m)\n", + "pan = [2.2, 2.3, 3.1, 8.6, 12.8, 15.6, 12.3, 10.6, 10, 8.2, 5.8, 3]; \t\t\t\t#pan evaporation\n", + "p = [0.8, 1.2, 0, 0, 0, 4.8, 12.2, 18.6, 8.6, 1.5, 0, 0] \t\t\t\t#precipitation\n", + "D = [14.5, 15.8, 16.2, 16.8, 17.5, 18, 18, 17, 16.5, 16, 15.8, 15]; \t\t\t\t#Demand\n", + "s = 0;\n", + "r = zeros(12)\n", + "E = zeros(12)\n", + "P = zeros(12)\n", + "S = zeros(12)\n", + "# Calculations\n", + "for i in range(12):\n", + " if in1[i]<10:\n", + " r[i] = in1[i]; \t\t\t\t#D/S requirement\n", + " else:\n", + " r[i] = 10;\n", + "\n", + " E[i] = 3.6*pan[i]; \t\t\t\t#Evaporation over reservior area\n", + " P[i] = 3.5*p[i]; \t\t\t\t#Precipitation\n", + " I[i] = in1[i]-r[i]-E[i]+P[i]; \t\t\t\t#Adjusted inflow\n", + " S[i] = D[i]-I[i]; \t\t\t\t#Water required from storage\n", + " if S[i]<0:\n", + " S[i] = 0;\n", + "\n", + " s = s+S[i];\n", + "\n", + "\n", + "# Results\n", + "print \"required useful storage = %.2f ha-m.\"%(s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "required useful storage = 281.64 ha-m.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 pg : 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "V = 475; \t\t\t\t#flow required to be maintained throughout the year\n", + "Y = V*365*8.64; \t\t\t\t#yearly demand\n", + "\t\t\t\t#yearly demand gives the slope of demand curve\n", + "t = linspace(0,36,37) \t\t\t\t#number of season startin from 1960;each year is diveded into 3 seasons.\n", + "q = [0, 1050, 300, 50, 3000, 250, 40, 3500, 370, 90, 2000, 150, 120, 1200, 350, 65, 1400, 400, 100, 3600, 200, 80, 3000, 200, 80, 3000, 150, 120, 700, 210, 50, 800, 120, 80, 2400, 320, 120, 3200, 280, 80]; \t\t\t\t#average discharge\n", + "v = [0, 0.9707, 0.4717, 0.0328, 2.7734, 0.3981, 0.0263, 3.2357, 0.5818, 0.0591, 1.8490, 0.2356, 0.0788, 1.1094, 0.5504, 0.0427, 1.2943, 0.6290, 0.0657, 3.3281, 0.3145, 0.0525, 2.7734, 0.2359, 0.0788, 0.6441, 0.3302, 0.028, 0.7396, 0.1887, 0.0525, 2.2188, 0.5032, 0.0788, 2.9583, 0.4403, 0.0525]; \t\t\t\t#voloume\n", + "cv = zeros(37)\n", + "cv[0] = v[0];\n", + "for i in range(37):\n", + " cv[i] = cv[i-1]+v[i];\n", + "\n", + "#each year is divided into three seasons(monsoon,winter and summer).and readings are taken for 12 years\n", + "#mass inflow curve is plotted and math.tangent are drawn at the apexes and parellel to demand curve slope;\n", + "#the respectiv ordinates represent the deficiency during dry period\n", + "#maximum of these ordinates gives the desired reservior capacity\n", + "print \"storage capacity of reservior = 1.6 million ha-m.\";\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "storage capacity of reservior = 1.6 million ha-m.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 pg : 336" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import linspace,zeros\n", + "\t\t\t\t\n", + "#Given\n", + "asi = 3.6; \t\t\t\t#annual sediment inflow(x10**6)\n", + "gamma_s = 12; \t\t\t\t#specific weigth of sediment\n", + "vs = asi/12;\n", + "ir = 30.; \t\t\t\t#initial reservior capacity\n", + "fr = 60.; \t\t\t\t#final reservior capacity \n", + "r = ir/fr; \t\t\t\t#initial capacity/inflow ratio\n", + "\n", + "# Calculations\n", + "#r = 0.5; hence we start capacity/inflow ratio from 0.5\n", + "c = linspace(0.5,0.1,5) \t\t\t\t#capacity inflow ratio\n", + "e = [0.96 ,0.955, 0.95, 0.93, 0.87]; \t\t\t\t#trap efficiency\n", + "ae = zeros(4)\n", + "for i in range(4):\n", + " ae[i] = (e[i]+e[i+1])/2; \t\t\t\t#average efficiency for interval\n", + "\n", + "as1 = [0.2872, 0.2857, 0.2820, 0.2700]; \t\t\t\t#annual sediment trapped\n", + "s = 0\n", + "y = zeros(4)\n", + "for i in range(4):\n", + " y[i] = 6/as1[i]; \t\t\t\t#year to fill\n", + " s = s+y[i];\n", + "\n", + "# Results\n", + "print \" probable life of reservior = %i years.\"%(s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " probable life of reservior = 85 years.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 pg : 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#corresponding maximum level of water above spillway crest\n", + "\n", + "#Given\n", + "I = [60, 480, 900, 470, 270, 160, 110, 80, 60]; \t\t\t\t#inflow\n", + "#for the first time interval 0 hours to 3 hours\n", + "I1 = I[0];\n", + "I2 = I[1];\n", + "t = 3*3600.;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 1.62*h1**1.5;\n", + "#storage change = (30+3h1)h1\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h1**2+0.54h1**1.5+10h1-0.972 = 0;\n", + "#solving it by trial and error method;we get\n", + "h1 = 0.0954;\n", + "#for the second time interval 3 hours to 6 hours\n", + "I1 = I[1];\n", + "I2 = I[2];\n", + "t = 3*3600.;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 0.0477+1.62*h2**1.5;\n", + "#storage change = (30+3h2)h2\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h2**2+0.54h2**1.5+10h2-3.4312 = 0;\n", + "#solving it by trial and error method;we get\n", + "h2 = 0.323;\n", + "#for the third time interval 6 hours to 9 hours\n", + "I1 = I[2];\n", + "I2 = I[3];\n", + "t = 3*3600.;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 0.2974+1.62*h3**1.5;\n", + "#storage change = (30+3h3)h3\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h3**2+0.54h3**1.5+10h3-5.7012 = 0;\n", + "#solving it by trial and error method;we get\n", + "h3 = 0.522;\n", + "#for the fourth time interval 9 hours to 12 hours\n", + "I1 = I[3];\n", + "I2 = I[4];\n", + "t = 3*3600.;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 0.611+1.62*h4**1.5;\n", + "#storage change = (30+3h4)h4\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h4**2+0.54h4**1.5+10h4-6.6208 = 0;\n", + "#solving it by trial and error method;we get\n", + "h4 = 0.601;\n", + "#for the fifth time interval 12 hours to 15 hours\n", + "I1 = I[4];\n", + "I2 = I[5];\n", + "t = 3*3600;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 0.7548+1.62*h5**1.5;\n", + "#storage change = (30+3h5)h5\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h5**2+0.54h5**1.5+10h5-6.8936 = 0;\n", + "#solving it by trial and error method;we get\n", + "h5 = 0.624;\n", + "#for the sixth time interval 12 hours to 15 hours\n", + "I1 = I[5];\n", + "I2 = I[6];\n", + "t = 3*3600.;\n", + "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n", + "#outflow = 0.7985.62*h6**1.5;\n", + "#storage change = (30+3h6)h6\n", + "#from the basic equation i.e total inflow = total outflow+change in storage\n", + "#on solving we get\n", + "#h6**2+0.54h6**1.5+10h6-6.8492 = 0;\n", + "#solving it by trial and error method;we get\n", + "h6 = 0.620;\n", + "hmax = h5;\n", + "q = 300*(h5)**1.5; \t\t\t\t#equation given\n", + "q = round(q*100)/100;\n", + "\n", + "# Results\n", + "print \"maximum outflow discharge over spillway = %.2f cumecs.\"%(q);\n", + "print \"maximum level of water above spillway crest = %.2f m.\"%(h5);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum outflow discharge over spillway = 147.88 cumecs.\n", + "maximum level of water above spillway crest = 0.62 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 pg : 339" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\t\t\t\t\n", + "#Given\n", + "t = 240.; \t\t\t\t#total math.cost of project(million rupees)\n", + "s = [32., 88., 72.]; \t\t\t\t#separable math.cost\n", + "eb = [40., 138., 112.]; \t\t\t\t#estimated benifit\n", + "sp = [47., 104., 101.]; \t\t\t\t#alternate math.single purpose math.cost\n", + "\t\t\t\t#umath.sing remaining benifit method\n", + "ts = s[0]+s[1]+s[2]; \t\t\t\t#total separable math.cost\n", + "tj = t-ts; \t\t\t\t#total joint math.cost\n", + "w = 0;\n", + "b = zeros(3)\n", + "rb = zeros(3)\n", + "for i in range(3):\n", + " if eb[i] 1\"%(FOS);\n", + "print \"Dam is safe against sliding.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting the negative value.Width of base is = 3.77 m.\n", + "Maximum stress = 167.70 kN/square.m.\n", + "Dam is safe against compression\n", + "Factor of safety against sliding = 1.07. > 1\n", + "Dam is safe against sliding.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 pg : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# calculate maximum permissible heigth of shutter so that no tension develops\n", + "\t\t\t\t\n", + "#Given\n", + "Bt = 3; \t\t\t\t#width of top of dam\n", + "H = 12; \t\t\t\t#heigth of the dam\n", + "wb = 9; \t\t\t\t#width of base of dam\n", + "gamma_m = 21; \t\t\t\t#unit weigth of masonary\n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "\n", + "W1 = Bt*gamma_m*H;\n", + "W2 = gamma_m*H*(wb-Bt)/2;\n", + "\n", + "#taking moment about a point on base at 3m from toe\n", + "L1 = 3+Bt/2;\n", + "L2 = (2*(wb-Bt)/3)-3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2;\n", + "M = M1+M2;\n", + "\n", + "#net moment about this point should be zero for equilibrium\n", + "s = (M*6/gamma_w)**(1./3)-12;\n", + "s = round(s*100)/100;\n", + "\n", + "# Results\n", + "print \"maximum permissible heigth of shutter = %.2f m.\"%(s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum permissible heigth of shutter = 1.22 m.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 pg : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t#moment at 50m below water surface\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "H = 100; \t\t\t\t#heigth of dam\n", + "hw = 100; \t\t\t\t#heigth of water in reservior\n", + "FB = 1; \t\t\t\t#free board\n", + "s = 0.15; \t\t\t\t#slope of upstream face\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "alphah = 0.1;\n", + "\n", + "theta = math.atan(s);\n", + "y = 50;\n", + "Cm = 0.735*(1-(theta*2/math.pi));\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "pe = Cy*alphah*gamma_w*hw;\n", + "F = 0.726*pe*y;\n", + "M = 0.299*pe*y**2;\n", + "pe = round(pe*1000)/1000;\n", + "F = round(F*10)/10;\n", + "M = round(M*10)/10;\n", + "print \"hydrodynamic earthquake pressure = %.2f kN/square.mshear = %.2f kN/m.Moment = %.2f kN-m/m.\"%(pe,F,M);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hydrodynamic earthquake pressure = 65.27 kN/square.mshear = 2369.30 kN/m.Moment = 48788.60 kN-m/m.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14 pg : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import sec\n", + "\n", + "#check stability\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1.;\n", + "H = 10.; \t\t\t\t#heigth of dam\n", + "hw = 10.; \t\t\t\t#heigth of water in reservior\n", + "wb = 8.25; \t\t\t\t#bottom width\n", + "Bt = 1.; \t\t\t\t#top width\n", + "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n", + "f = 1400.; \t\t\t\t#permissible shear stress at joint\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "fi = math.atan(0.625);\n", + "theta = math.atan(0.1);\n", + "\n", + "W1 = Bt*H*gamma_m;\n", + "W2 = H*H*Hs1*gamma_m/2;\n", + "W3 = H*6.25*gamma_m/2;\n", + "W4 = hw*gamma_w*H*Hs1/2;\n", + "P = gamma_w*hw**2/2;\n", + "U = wb*gamma_w*hw*c/2;\n", + "SumV = W1+W2+W3+W4-U;\n", + "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n", + "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n", + "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n", + "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n", + "L5 = 2*wb/3;L6 = hw/3;\n", + "M1 = W1*L1;\n", + "M2 = W2*L2;\n", + "M3 = W3*L3;\n", + "M4 = W4*L4;\n", + "M5 = U*L5;\n", + "M6 = P*L6;\n", + "SumM = M1+M2+M3+M4-M5-M6;\n", + "Mplus = M1+M2+M3+M4;\n", + "Mminus = M5+M6;\n", + "FOS = miu*SumV/P;\n", + "SFF = (miu*SumV+wb*1400)/P;\n", + "FOO = Mplus/Mminus;\n", + "FOS = round(FOS*100)/100;\n", + "SFF = round(SFF*10)/10;\n", + "FOO = round(FOO*100)/100;\n", + "print \"Factor of safety against sliding = %.2f. >1 \"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n", + "print \"Dam is unsafe against overturning\";\n", + "\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV/wb)*(1+(6*e/wb)); \t\t\t\t#calculation is done wrong in book;value of b is not taken correctly\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.04. >1 \n", + "Shear friction factor = 24.60.\n", + "Factor of safety against overturning = 1.47. <1.5\n", + "Dam is unsafe against overturning\n", + "Normal stress at toe = 170.70 kN/square.m.\n", + "Normal stress at heel = -5.80 kN/square.m.\n", + "Principal stress at toe = 237.40 kN/square.m.\n", + "Principal stress at heel = -6.80 kN/square.m.\n", + "Shear stress at toe = 106.70 kN/square.m.\n", + "Shear stress at heel = 10.40 kN/square.m.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15 pg : 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#Check the stability and determine sliding factor and shear factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "H = 90; \t\t\t\t#heigth of dam\n", + "wb = 73.1; \t\t\t\t#width of base\n", + "Bt = 7; \t\t\t\t#width of top of dam\n", + "hw = 89; \t\t\t\t#heigth of water in reservior\n", + "Hs1 = 28; \t\t\t\t#heigth of slope on upstream side\n", + "Hs2 = 83; \t\t\t\t#heigth of slope on downstream side\n", + "Cm = 0.735;\n", + "alphah = 0.1;\n", + "gamma_m = 23.5; \t\t\t\t#unit weigth of concrete\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "theta = math.atan(8./28);\n", + "fi = math.atan(0.7);\n", + "\t\t\t\t#self weigth of dam\n", + "W1 = (Hs1*8*gamma_m)/2\n", + "W2 = (Bt*H*gamma_m)\n", + "W3 = (Hs2**2*0.7*gamma_m)/2\n", + "\t\t\t\t#weigth of superimposed water\n", + "W4 = (Hs1*8*gamma_w)/2\n", + "W5 = (hw-Hs1)*8*gamma_w\n", + "U = hw*wb*2*gamma_w/6; \t\t\t\t#uplift force\n", + "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n", + "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n", + "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n", + "\t\t\t\t#inertial load due to horizontal acceleration\n", + "I1 = W2/10;\n", + "I2 = W3/10;\n", + "I3 = W1/10;\n", + "SumV = W1+W2+W3+W4+W5-U;\n", + "SumH = wp+hp+I1+I2+I3;\n", + "L1 = (wb-8)+8/3\n", + "L2 = (0.7*Hs2)+(Bt/2)\n", + "L3 = (2*Hs2*0.7)/3.\n", + "L4 = (wb-8)+(2*8)/3.\n", + "L5 = (wb-8)+(8./2)\n", + "L6 = hw/3;\n", + "L7 = 2*wb/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4;\n", + "M5 = W5*L5;\n", + "M6 = wp*L6;\n", + "M7 = U*L7;\n", + "M8 = I1*45;\n", + "M9 = I2*83/3;\n", + "M10 = I3*28/3;\n", + "Mplus = M1+M2+M3+M4+M5;\n", + "Mminus = M6+M7+M8+M9+M10+Mhp;\n", + "SumM = Mplus-Mminus;\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "pnt = (SumV/wb)*(1+(6*e/wb));\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "p = hw*gamma_w;\n", + "pe = Cm*alphah*gamma_w*hw;\n", + "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(-pnh-(p+pe))*math.tan(theta);\n", + "print \"Normal stress at toe = %i kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %i kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %i kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %i kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %i kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %i kN/square.m.\"%(tauh);\n", + "\n", + "FOS = miu*SumV/SumH;\n", + "SFF = (miu*SumV+wb*1400)/SumH;\n", + "FOO = Mplus/Mminus;\n", + "Ffi = 1.2;Fc = 2.4;\n", + "F = (miu*SumV/Ffi+1400*wb/Fc)/SumH;\n", + "FOS = round(FOS*100)/100;\n", + "F = round(F*100)/100;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "print \"Factor of safety against sliding as per IS:6512-1972 = %.2f. <1.5\"%(FOS);\n", + "print \"Factor of safety against sliding as per IS:6512-1984 = %.2f. >1\"%(F);\n", + "print \"Shear friction factor = %.2f. <6\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n", + "print \"Dam is unsafe for given loading conditions\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normal stress at toe = 1929 kN/square.m.\n", + "Normal stress at heel = -323 kN/square.m.\n", + "Principal stress at toe = 2874 kN/square.m.\n", + "Principal stress at heel = -426 kN/square.m.\n", + "Shear stress at toe = 1350 kN/square.m.\n", + "Shear stress at heel = 175 kN/square.m.\n", + "Factor of safety against sliding as per IS:6512-1972 = 0.87. <1.5\n", + "Factor of safety against sliding as per IS:6512-1984 = 1.57. >1\n", + "Shear friction factor = 2.90. <6\n", + "Factor of safety against overturning = 1.45. <1.5\n", + "Dam is unsafe for given loading conditions\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16 pg : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#Check the stability and determine principal and shear stress at toe and heel\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "miu = 0.7; \t\t\t\t#coefficient of friction\n", + "H = 70; \t\t\t\t#heigth of dam\n", + "ht = 0; \t\t\t\t#heigth of tail water\n", + "Lf = 6.5; \t\t\t\t#location of foundation gallery from heel\n", + "wb = 52.5; \t\t\t\t#width of base\n", + "Bt = 7; \t\t\t\t#width of top of dam\n", + "hw = 70; \t\t\t\t#heigth of water in reservior\n", + "Hs1 = 35; \t\t\t\t#heigth of slope on upstream side\n", + "Hs2 = 60; \t\t\t\t#heigth of slope on downstream side\n", + "gamma_m = 24; \t\t\t\t#unit weigth of concrete\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "theta = math.atan(0.1);\n", + "fi = math.atan(0.7);\n", + "\t\t\t\t#self weigth of dam\n", + "W1 = (Hs1*3.5*gamma_m)/2\n", + "W2 = (Bt*H*gamma_m)\n", + "W3 = (Hs2**2*0.7*gamma_m)/2\n", + "\t\t\t\t#weigth of superimposed water\n", + "W4 = (Hs1*3.5*gamma_w)/2\n", + "W5 = (hw-Hs1)*3.5*gamma_w\n", + "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n", + "Pt = gamma_w*ht\n", + "Ph = gamma_w*hw\n", + "Pg = (ht+(hw-ht)/3)*gamma_w\n", + "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n", + "l1 = (wb-Lf)/2\n", + "l2 = (2*(wb-Lf))/3\n", + "l3 = (wb-Lf)+(Lf/2)\n", + "l4 = (wb-Lf)+((2*Lf)/3)\n", + "L7 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n", + "L1 = (wb-3.5)+3.5/3\n", + "L2 = (0.7*Hs2)+(Bt/2)\n", + "L3 = (2*Hs2*0.7)/3\n", + "L4 = (wb-3.5)+(2*3.5)/3\n", + "L5 = (wb-3.5)+(3.5/2)\n", + "L6 = hw/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4;\n", + "M5 = W5*L5;\n", + "M6 = wp*L6;\n", + "M7 = U*L7;\n", + "SumV1 = W1+W2+W3;\n", + "SumM1 = M1+M2+M3;\n", + "SumV2 = SumV1+W4+W5;\n", + "SumM2 = SumM1+M4+M5-M6;\n", + "SumV3 = SumV2-U;\n", + "SumM3 = SumM2-M7;\n", + "Mplus = 1547377;\n", + "Mminus = 870421;\n", + "SumH = wp;\n", + "\n", + "\t\t\t\t#case 1. Reservior empty\n", + "x = SumM1/SumV1;\n", + "e = wb/2-x;\n", + "pnt = (SumV1/wb)*(1+(6*e/wb));\n", + "pnh = (SumV1/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = pnh*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"case 1. Reservior empty:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "\t\t\t\t#case2. reservior full without uplift\n", + "x = SumM2/SumV2;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV2/wb)*(1+(6*e/wb));\n", + "pnh = (SumV2/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"case 2. reservior full without uplift:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "\t\t\t\t#case3. reservior full with uplift\n", + "x = SumM3/SumV3;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV3/wb)*(1+(6*e/wb));\n", + "pnh = (SumV3/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt);\n", + "pnh = round(pnh);\n", + "sigmat = round(sigmat);\n", + "sigmah = round(sigmah);\n", + "taut = round(taut);\n", + "tauh = round(tauh);\n", + "print \"case 3. reservior full with uplift:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "FOS = miu*SumV3/SumH;\n", + "SFF = (miu*SumV3+wb*1400)/SumH;\n", + "FOO = Mplus/Mminus;\n", + "Ffi = 1.5;Fc = 3.6;\n", + "F = (miu*SumV3/Ffi+1400*wb/Fc)/SumH;\n", + "FOS = round(FOS*1000)/1000;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "F = round(F*1000)/1000;\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Factor of safety for load combination B = %.2f. > 1\"%(F);\n", + "print \"Dam is safe \";\n", + "\n", + "\t\t\t\t#Case4.considering seismic forces\n", + "Cm = 0.712;\n", + "alphah = 0.1;\n", + "alphav = 0.08;\n", + "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n", + "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n", + "\t\t\t\t#inertial load due to horizontal acceleration\n", + "I1 = W2/10;\n", + "I2 = W3/10;\n", + "I3 = W1/10;\n", + "v = SumV1*alphav;\n", + "Mv = 116444;\n", + "SumV4 = SumV3-v;\n", + "SumH1 = SumH+I1+I2+I3+hp;\n", + "M8 = I1*35;\n", + "M9 = I2*20;\n", + "M10 = I3*35/3;\n", + "Mminus1 = 1161849;\n", + "SumM4 = SumM3-M8-M9-M10-Mhp-Mv;\n", + "\n", + "x = SumM4/SumV4;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pe = Cm*alphah*gamma_w*hw;\n", + "pnt = (SumV4/wb)*(1+(6*e/wb));\n", + "pnh = (SumV4/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = (-pnh+(p+pe))*math.tan(theta);\n", + "pnt = round(pnt);\n", + "pnh = round(pnh);\n", + "sigmat = round(sigmat);\n", + "sigmah = round(sigmah);\n", + "taut = round(taut);\n", + "tauh = round(tauh);\n", + "print \"case 4.considering seismic forces\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh); \t\t\t\t#answer is wrong in book\n", + "\n", + "FOS = miu*SumV4/SumH1;\n", + "SFF = (miu*SumV4+wb*1400)/SumH1;\n", + "FOO = Mplus/Mminus1;\n", + "Ffi = 1.2;Fc = 2.7;\n", + "F = (miu*SumV4/Ffi+1400*wb/Fc)/SumH1;\n", + "FOS = round(FOS*1000)/1000;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "F = round(F*100)/100;\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Factor of safety for load combination E = %.2f. > 1\"%(F);\n", + "print \"Dam is safe \";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case 1. Reservior empty:\n", + "Normal stress at toe = 156.30 kN/square.m.\n", + "Normal stress at heel = 1499.70 kN/square.m.\n", + "Principal stress at toe = 232.80 kN/square.m.\n", + "Principal stress at heel = 1514.70 kN/square.m.\n", + "Shear stress at toe = 109.40 kN/square.m.\n", + "Shear stress at heel = 150.00 kN/square.m.\n", + "case 2. reservior full without uplift:\n", + "Normal stress at toe = 1297.10 kN/square.m.\n", + "Normal stress at heel = 427.60 kN/square.m.\n", + "Principal stress at toe = 1932.60 kN/square.m.\n", + "Principal stress at heel = 425.00 kN/square.m.\n", + "Shear stress at toe = 907.90 kN/square.m.\n", + "Shear stress at heel = 25.90 kN/square.m.\n", + "case 3. reservior full with uplift:\n", + "Normal stress at toe = 1344.00 kN/square.m.\n", + "Normal stress at heel = 70.00 kN/square.m.\n", + "Principal stress at toe = 2002.00 kN/square.m.\n", + "Principal stress at heel = 64.00 kN/square.m.\n", + "Shear stress at toe = 941.00 kN/square.m.\n", + "Shear stress at heel = 62.00 kN/square.m.\n", + "Factor of safety against sliding = 1.08.\n", + "Shear friction factor = 4.14.\n", + "Factor of safety against overturning = 1.00.\n", + "Factor of safety for load combination B = 1.57. > 1\n", + "Dam is safe \n", + "case 4.considering seismic forces\n", + "Normal stress at toe = 1713.00 kN/square.m.\n", + "Normal stress at heel = -432.00 kN/square.m.\n", + "Principal stress at toe = 2552.00 kN/square.m.\n", + "Principal stress at heel = -443.00 kN/square.m.\n", + "Shear stress at toe = 1199.00 kN/square.m.\n", + "Shear stress at heel = 117.00 kN/square.m.\n", + "Factor of safety against sliding = 0.76.\n", + "Shear friction factor = 3.14.\n", + "Factor of safety against overturning = 1.00.\n", + "Factor of safety for load combination E = 1.52. > 1\n", + "Dam is safe \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17 pg : 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design practical profile of gravity dam\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "rlb = 1450; \t\t\t\t#R.L of base of dam\n", + "rlw = 1480.5; \t\t\t\t#R.L of water level\n", + "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "w = 1; \t\t\t\t#heigth of waves\n", + "f = 1200; \t\t\t\t#safe compressive stress for masonary\n", + "FB = 1.5*w;\n", + "rlt = FB+rlw; \t\t\t\t#R.L of top of dam\n", + "H = rlt-rlb; \t\t\t\t#heigth of dam\n", + "LH = f/(gamma_w*(Sg+1))\n", + "LH = round(LH*100)/100;\n", + "print \"Heigth of dam = %.2f m.\"%(H);\n", + "print \"limiting heigth of dam = %.2f m.\"%(LH);\n", + "print \"Dam is low gravity dam\";\n", + "hw = rlw-rlb;\n", + "\t\t\t\t#keep top width,a = 4.5.\n", + "a = 4.5;\n", + "P = hw/(Sg**0.5);\n", + "P = round(P*10)/10;\n", + "print \"Base width of elementary profile = %.2f m.\"%(P);\n", + "uo = a/16;\n", + "wb = uo+P;\n", + "wb = round(wb);\n", + "print \"Base width = %.2f m.\"%(wb);\n", + "D = 2*a*(Sg**0.5);\n", + "D = round(D);\n", + "print \"Dismath.tance upto which u/s slope is vertical from water level = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heigth of dam = 32.00 m.\n", + "limiting heigth of dam = 35.98 m.\n", + "Dam is low gravity dam\n", + "Base width of elementary profile = 19.70 m.\n", + "Base width = 20.00 m.\n", + "Dismath.tance upto which u/s slope is vertical from water level = 14.00 m.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18 pg : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#determine if dam is safe against sliding\n", + "\t\t\t\t\n", + "#Given\n", + "hw = 97.; \t\t\t\t#heigth of water in reservior\n", + "Bt = 7.; \t\t\t\t#width of top of dam\n", + "H = 100.; \t\t\t\t#heigth of the dam\n", + "Hs2 = 90.; \t\t\t\t#heigth of slope on downstream side\n", + "wb = 75.; \t\t\t\t#width of base of dam\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "gamma_d = 2.4; \t\t\t\t#weigth density of concrete\n", + "gamma_w = 1000.; \t\t\t\t#weigth density of water\n", + "\n", + "# Calculations\n", + "P = gamma_w*hw**2/(2*1000);\n", + "W1 = Bt*gamma_d*H;\n", + "W2 = (wb-Bt)*Hs2*gamma_d/2;\n", + "W = W1+W2;\n", + "FOS = miu*W/P;\n", + "FOS = round(FOS*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Dam is safe against sliding\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.44.\n", + "Dam is safe against sliding\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19 pg : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Factor of safety against overturning\n", + "#Factor of safety against sliding\n", + "#Shear friction factor\n", + "\n", + "#Given\n", + "c = 1.;\n", + "H = 10.; \t\t\t\t#heigth of dam\n", + "hw = 10.; \t\t\t\t#heigth of water in reservior\n", + "wb = 8.25; \t\t\t\t#bottom width\n", + "Bt = 1.; \t\t\t\t#top width\n", + "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n", + "f = 1400.; \t\t\t\t#permissible shear stress at joint\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "fi = math.atan(0.625);\n", + "theta = math.atan(0.1);\n", + "\n", + "# Calculations\n", + "W1 = Bt*H*gamma_m;\n", + "W2 = H*H*Hs1*gamma_m/2;\n", + "W3 = H*6.25*gamma_m/2;\n", + "W4 = hw*gamma_w*H*Hs1/2;\n", + "P = gamma_w*hw**2/2;\n", + "U = wb*gamma_w*hw*c/2;\n", + "SumV = W1+W2+W3+W4-U;\n", + "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n", + "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n", + "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n", + "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n", + "L5 = 2*wb/3;L6 = hw/3;\n", + "M1 = W1*L1;M2 = W2*L2;M3 = W3*L3;M4 = W4*L4;\n", + "M5 = U*L5;M6 = P*L6;\n", + "SumM = M1+M2+M3+M4-M5-M6;\n", + "Mplus = M1+M2+M3+M4;\n", + "Mminus = M5+M6;\n", + "FOS = miu*SumV/P;\n", + "SFF = (miu*SumV+wb*1400)/P;\n", + "FOO = Mplus/Mminus;\n", + "FOS = round(FOS*100)/100;\n", + "SFF = round(SFF*10)/10;\n", + "FOO = round(FOO*100)/100;\n", + "\n", + "# Results\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Dam is unsafe against overturning\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.04.\n", + "Shear friction factor = 24.60.\n", + "Factor of safety against overturning = 1.47.\n", + "Dam is unsafe against overturning\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20 pg : 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1.;\n", + "hw = 80.; \t\t\t\t#heigth of water in reservior\n", + "Bt = 6.; \t\t\t\t#width of top of dam\n", + "H = 84.; \t\t\t\t#heigth of the dam\n", + "Hs2 = 75.; \t\t\t\t#heigth of slope on downstream side\n", + "wb = 56.; \t\t\t\t#width of base of dam\n", + "Lf = 8.; \t\t\t\t#dismath.tance of foundation gallery from heel\n", + "gamma_d = 23.5; \t\t\t\t#weigth density of concrete\n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "ht = 6.; \t\t\t\t#heigth of tail water\n", + "\n", + "# Calculations\n", + "W1 = Bt*gamma_d*H;\n", + "W2 = gamma_d*Hs2*(wb-Bt)/2;\n", + "W3 = gamma_w*ht*4/2;\n", + "W4 = gamma_w*hw**2/2;\n", + "W5 = gamma_w*ht**2/2;\n", + "Pt = gamma_w*ht\n", + "Ph = gamma_w*hw\n", + "Pg = (ht+(hw-ht)/3)*gamma_w\n", + "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n", + "l1 = (wb-Lf)/2\n", + "l2 = (2*(wb-Lf))/3\n", + "l3 = (wb-Lf)+(Lf/2)\n", + "l4 = (wb-Lf)+((2*Lf)/3)\n", + "L6 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n", + "L1 = (wb-Bt)+(Bt/2)\n", + "L2 = (2*(wb-Bt))/3\n", + "L3 = 4./3;\n", + "L4 = hw/3;\n", + "L5 = ht/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4\n", + "M5 = W5*L5\n", + "M6 = U*L6;\n", + "SumV = W1+W2+W3-U;\n", + "SumH = W4-W5;\n", + "SumM = M1+M2+M3-M4+M5-M6;\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "pnt = (SumV/wb)*(1+(6*e/wb));\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "\n", + "# Results\n", + "print \"Maximum Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Maximum Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Normal stress at toe = 1586.70 kN/square.m.\n", + "Maximum Normal stress at heel = -49.30 kN/square.m.\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..595c81ff --- /dev/null +++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_1.ipynb @@ -0,0 +1,1584 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6fa8fe978c728d97fa9f04464822ea9606521023bb2c2c301624274cfcebacb1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : GRAVITY DAMS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 pg : 376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\t\t\t\t\n", + "#Given\n", + "H = 100; \t\t\t\t#heigth of dam\n", + "wb = 70; \t\t\t\t#width of base of dam\n", + "wt = 7; \t\t\t\t#width of top of dam\n", + "l = 1; \t\t\t\t#length of dam\n", + "hw = 98; \t\t\t\t#heigth of water in dam\n", + "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n", + "s = 1/0.7; \t\t\t\t#slope on downstream side\n", + "gammad = 24; \t\t\t\t#unit weigth of dam\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "E = 2.05e7; \t\t\t\t#modulus of elasticity\n", + "\n", + "\t\t\t\t#(a) inertial forces and moments\n", + "alpha0 = 0.05; \t\t\t\t#from table 8.1\n", + "alphah = 2*alpha0;\n", + "\t\t\t\t#at 10m from top\n", + "\n", + "def f0(y): \n", + "\t return 25.2-0.25*y\n", + "\n", + "F10 = quad(f0,0,10)[0]\n", + "\n", + "\n", + "def f1(y): \n", + "\t return 25.2*(1-0.01*y)*(10-y)\n", + "\n", + "M10 = quad(f1,0,10)[0]\n", + "\n", + "\t\t\t\t#at 100m below top\n", + "\n", + "def f2(y): \n", + "\t return 0.15*(1-0.01*y)*16.8*y\n", + "\n", + "F100 = F10+ quad(f2,10,100)[0]\n", + "\n", + "\n", + "def f3(y): \n", + "\t return 0.15*(1-0.01*y)*16.8*y*(100-y)\n", + "\n", + "M100 = M10+90*F10+ quad(f3,10,100)[0]\n", + "\n", + "print \"Inertial forces:At 10m from top: F = %.2f kn;M = %ikn-mAt 100m from top: F = %.2f kn;M = %ikn-m.\"%(F10,M10,F100,M100);\n", + "\n", + "\t\t\t\t#(b) hydrodynamic pressure and moment\n", + "\t\t\t\t#at 10m from top\n", + "y = 8.;\n", + "W10 = 1680.;\n", + "alphah = F10/W10;\n", + "Cm = 0.735;\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "p = Cy*alphah*gammaw*hw;\n", + "P10 = 0.726*p*y;\n", + "Mp10 = 0.299*p*y**2;\n", + "P10 = round(P10*100)/100;\n", + "Mp10 = round(Mp10*100)/100;\n", + "\t\t\t\t#at 100m from top\n", + "y = 98;\n", + "W100 = 84840;\n", + "alphah = F100/W100;\n", + "Cm = 0.735;\n", + "Cy = (Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)**0.5);\n", + "p = Cy*alphah*gammaw*hw;\n", + "P100 = 0.726*p*y;\n", + "Mp100 = 0.299*p*y**2;\n", + "print \"Hydrodynamic forces:At 10m from top: F = %.2f kn;\\\n", + "\\nM = %.2fkn-mAt 100m from top: F = %i kn;\\\n", + "\\nM = %ikn-m.\"%(P10,Mp10,P100,Mp100);\n", + "\n", + "# rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inertial forces:At 10m from top: F = 239.50 kn;M = 1218kn-mAt 100m from top: F = 4321.90 kn;M = 221790kn-m.\n", + "Hydrodynamic forces:At 10m from top: F = 161.58 kn;\n", + "M = 532.35kn-mAt 100m from top: F = 2561 kn;\n", + "M = 103366kn-m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 pg : 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "H = 100; \t\t\t\t#heigth of dam\n", + "wb = 70; \t\t\t\t#width of base of dam\n", + "wt = 7; \t\t\t\t#width of top of dam\n", + "l = 1; \t\t\t\t#length of dam\n", + "hw = 98; \t\t\t\t#heigth of water in dam\n", + "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n", + "s = 1/0.7; \t\t\t\t#slope on downstream side\n", + "gammad = 24; \t\t\t\t#unit weigth of dam\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "E = 2.05e7; \t\t\t\t#modulus of elasticity\n", + "beta = 1;\n", + "I = 2;\n", + "Fo = 0.25; \t\t\t\t#from table 8.2\n", + " \t\t\t\t#t = Sa/g;\n", + "t = 0.19; \t\t\t\t#from fig. 8.4\n", + "alphah = beta*I*Fo*t;\n", + "T = 5.55*H**2/wb*(gammad/(gammaw*E))**0.5;\n", + "\t\t\t\t#(a) Base shear\n", + "W = l*gammad*(wt*H+((hsu/s)*hsu)/2);\n", + "Fb = 0.6*W*alphah;\n", + "print \"Base shear = %.2f KN.\"%(Fb);\n", + "\n", + "\t\t\t\t#(b) Base moment\n", + "hbar = ((wt*H**2/2)+((hsu/s)*hsu**2/6))/((wt*H)+(hsu/s)*hsu/2);\n", + "Mb = 0.9*W*hbar*alphah;\n", + "print \"Base moment = %.2f KN-m.\"%(Mb);\n", + "\n", + "\t\t\t\t#(c) shear at 10m from top\n", + "Cv = 0.08;\n", + "F10 = Cv*Fb;\n", + "F10 = round(F10);\n", + "print \"shear at 10m from top = %.2f KN.\"%(F10);\n", + "\n", + "\t\t\t\t#(d) Moment at 10m from top\n", + "Cm = 0.02;\n", + "M10 = Cm*Mb;\n", + "M10 = round(M10);\n", + "print \"moment at 10m from top = %.2f KN.\"%(M10);\n", + "\t\t\t\t#(e) Hydrodynamic pressure\n", + "\t\t\t\t#at 10m from top\n", + "y = 8;\n", + "W10 = 1680;\n", + "Cm = 0.735;\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "p = Cy*alphah*gammaw*hw;\n", + "P10 = 0.726*p*y;\n", + "Mp10 = 0.299*p*y**2;\n", + "P10 = round(P10*100)/100;\n", + "Mp10 = round(Mp10*100)/100;\n", + "\t\t\t\t#at 100m from top\n", + "y = 98;\n", + "W100 = 84840;\n", + "Cm = 0.735;\n", + "Cy = (Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)**0.5);\n", + "p = Cy*alphah*gammaw*hw;\n", + "P100 = 0.726*p*y;\n", + "Mp100 = 0.299*p*y**2;\n", + "print \"Hydrodynamic forces:At 10m from top: F = %.2f kn;\\\n", + "\\nM = %.2fkn-mAt 100m from top: F = %i \\\n", + "kn;M = %ikn-m.\"%(P10,Mp10,P100,Mp100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Base shear = 4835.88 KN.\n", + "Base moment = 246342.60 KN-m.\n", + "shear at 10m from top = 387.00 KN.\n", + "moment at 10m from top = 4927.00 KN.\n", + "Hydrodynamic forces:At 10m from top: F = 0.00 kn;\n", + "M = 0.00kn-mAt 100m from top: F = 4776 kn;M = 192765kn-m.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 pg : 379" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "H = 100; \t\t\t\t#heigth of dam\n", + "wb = 70; \t\t\t\t#width of base of dam\n", + "wt = 7; \t\t\t\t#width of top of dam\n", + "l = 1; \t\t\t\t#length of dam\n", + "hw = 98; \t\t\t\t#heigth of water in dam\n", + "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n", + "s = 1/0.7; \t\t\t\t#slope on downstream side\n", + "gammad = 24; \t\t\t\t#unit weigth of dam\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "E = 2.05e7; \t\t\t\t#modulus of elasticity\n", + "\t\t\t\t#(a) Seismic coefficient method\n", + "alpha0 = 0.05; \t\t\t\t#from table 8.1\n", + "alphah = 2*alpha0;\n", + "alphav = 0.75*alphah;\n", + "\t\t\t\t#at 10m from top\n", + "\n", + "def f4(y): \n", + "\t return alphav*168*(1-0.01*y)\n", + "\n", + "F10 = quad(f4,0,10)[0]\n", + "\n", + "\t\t\t\t#at 100m below top\n", + "\n", + "def f5(y): \n", + "\t return alphav*(1-0.01*y)*16.8*y\n", + "\n", + "F100 = F10+ quad(f5,10,100)[0]\n", + "\n", + "print \"Parta):At 10m from top: F = %.2f knAt 100m from top: F = %.2f kn.\"%(F10,F100);\n", + "\n", + "\t\t\t\t#(b)Response spectrum method\n", + "beta = 1;\n", + "I = 2;\n", + "Fo = 0.25; \t\t\t\t#from table 8.2\n", + " \t\t\t\t#t = Sa/g;\n", + "t = 0.19; \t\t\t\t#from fig. 8.4\n", + "alphah = beta*I*Fo*t;\n", + "alphav = 0.75*alphah;\n", + "\t\t\t\t#at 10m from top\n", + "\n", + "def f6(y): \n", + "\t return alphav*168*(1-0.01*y)\n", + "\n", + "F10 = quad(f6,0,10)[0]\n", + "\n", + "\t\t\t\t#at 100m below top\n", + "\n", + "def f7(y): \n", + "\t return alphav*(1-0.01*y)*16.8*y\n", + "\n", + "F100 = F10+ quad(f7,10,100)[0]\n", + "\n", + "F100 = round(F100*100)/100;\n", + "print \"Partb):At 10m from top: F = %.2f knAt 100m from top: F = %.2f kn.\"%(F10,F100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Parta):At 10m from top: F = 119.70 knAt 100m from top: F = 2160.90 kn.\n", + "Partb):At 10m from top: F = 113.72 knAt 100m from top: F = 2052.86 kn.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 pg : 381\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "H = 100.; \t\t\t\t#heigth of dam\n", + "wb = 73.; \t\t\t\t#width of base of dam\n", + "wt = 7; \t\t\t\t#width of top of dam\n", + "l = 1.; \t\t\t\t#length of dam\n", + "hw = 98.; \t\t\t\t#heigth of water in dam\n", + "hsu = 90.; \t\t\t\t#heigth of slope on downstream side\n", + "s = 1/0.7; \t\t\t\t#slope on downstream side\n", + "gammad = 24.; \t\t\t\t#unit weigth of dam\n", + "gammaw = 9.81; \t\t\t\t#unit weigth of water\n", + "E = 2.05e7; \t\t\t\t#modulus of elasticity\n", + "\n", + "#at 10m from top\n", + "y = 8;\n", + "alphah = 0.1;\n", + "Cm = 0.72;\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "p10 = Cy*alphah*gammaw*hw;\n", + "F10 = 0.726*p10*y;\n", + "Mp10 = 0.299*p10*y**2;\n", + "\n", + "#at 40m from top\n", + "y = 38;\n", + "alphah = 0.1;\n", + "Cm = 0.72;\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "p40 = Cy*alphah*gammaw*hw;\n", + "F40 = 0.726*p40*y;\n", + "Mp40 = 0.299*p40*y**2;\n", + "\n", + "#at 100m from top\n", + "y = 98;\n", + "alphah = 0.1;\n", + "Cm = 0.72;\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "p100 = Cy*alphah*gammaw*hw;\n", + "F100 = 0.726*p100*y;\n", + "Mp100 = 0.299*p100*y**2;\n", + "p10 = round(p10*1000)/1000;\n", + "F10 = round(F10*1000)/1000;\n", + "Mp10 = round(Mp10*10)/10;\n", + "p40 = round(p40*1000)/1000;\n", + "F40 = round(F40*1000)/1000;\n", + "Mp40 = round(Mp40*10)/10;\n", + "p100 = round(p100*100)/100;\n", + "F100 = round(F100*1000)/1000;\n", + "Mp100 = round(Mp100*10)/10;\n", + "print \"Hydrodynamic Forces:At 10m from top: P = %.2f KN/square m;\\\n", + "\\nF = %.2f KN;\\\n", + "\\nM = %.2f KN-m.At 40m from top: P = %.2f KN/square m.;\\\n", + "\\nF = %.2f KN;\\\n", + "\\nM = %.2f KN-m.At 100m from top: P = %.2f KN/square m;\\\n", + "\\nF = %.2f KN;\\\n", + "\\nM = %.2f KN-m.\"%(p10,F10,Mp10,p40,F40,Mp40,p100,F100,Mp100);\n", + "\n", + "#vertical component of reservior water on horizontal section\n", + "s1 = 3./60;\n", + "Wh = (F100-F40)*s1;\n", + "Wh = round(Wh*100)/100;\n", + "print \"vertical component of reservior water on horizontal section = %.2f kN/m.\"%(Wh);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hydrodynamic Forces:At 10m from top: P = 19.12 KN/square m;\n", + "F = 111.03 KN;\n", + "M = 365.80 KN-m.At 40m from top: P = 49.00 KN/square m.;\n", + "F = 1351.85 KN;\n", + "M = 21156.60 KN-m.At 100m from top: P = 69.22 KN/square m;\n", + "F = 4924.82 KN;\n", + "M = 198770.00 KN-m.\n", + "vertical component of reservior water on horizontal section = 178.65 kN/m.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 pg : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#no tension is permissible\n", + "#factor of safety against slidingis 1.5\n", + "\n", + "#Given\n", + "\n", + "wb = 3; \t\t\t\t#width of dam;\n", + "miu = 0.5; \t\t\t\t#coefficient of friction\n", + "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "c = 1;\n", + "\n", + "#when uplift is considered\n", + "#when no tension is permissible then e = wb/6;\n", + "\n", + "p1 = wb*Sg*gamma_w;\n", + "p2 = c*wb*gamma_w/2;\n", + "p3 = p1-p2;\n", + "p4 = p1*wb/2-p2*2;\n", + "p5 = gamma_w/6;\n", + "d1 = p4/p3; d2 = p5/p3;\n", + "d3 = 1.5-d1;\n", + "H = ((0.5-d3)/d2)**0.5;\n", + "H = round(H*100)/100;\n", + "print \"when uplift is considered:\"\n", + "print \"Heigth of dam when no tension is permissible = %.2f m.\"%(H);\n", + "H = p3*0.5/(1.5*p5*3);\n", + "print \"Heigth of dam when factor of safety against sliding is 1.5 = %.2f m.\"%(H);\n", + "\n", + "#when uplift is not considered\n", + "p1 = wb*Sg*gamma_w;\n", + "p4 = p1*wb/2;\n", + "p5 = gamma_w/6;\n", + "d1 = p4/p1;\n", + "d2 = p5/p1;\n", + "H = (0.5/d2)**0.5;\n", + "H = round(H*100)/100;\n", + "print \"when uplift is not considered:\"\n", + "print \"Heigth of dam when no tension is permissible = %.2f m.\"%(H);\n", + "H = p1*0.5/(1.5*p5*3);\n", + "print \"Heigth of dam when factor of safety against sliding is 1.5 = %.2f m.\"%(H);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when uplift is considered:\n", + "Heigth of dam when no tension is permissible = 3.55 m.\n", + "Heigth of dam when factor of safety against sliding is 1.5 = 3.80 m.\n", + "when uplift is not considered:\n", + "Heigth of dam when no tension is permissible = 4.65 m.\n", + "Heigth of dam when factor of safety against sliding is 1.5 = 4.80 m.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 pg : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "c = 1;\n", + "hw = 6; \t\t\t\t#heigth of water in reservior\n", + "Bt = 1.5; \t\t\t\t#width of top of dam\n", + "H = 6; \t\t\t\t#heigth of the dam\n", + "wb = 4.5; \t\t\t\t#width of base of dam\n", + "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "\n", + "W1 = Bt*gamma_w*Sg*H;\n", + "W2 = gamma_w*Sg*H*(wb-Bt)/2;\n", + "L1 = (wb-Bt)+(Bt/2);\n", + "L2 = (2*(wb-Bt))/3\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "\n", + "#Reaervior empty\n", + "SumW = W1+W2;\n", + "SumM = M1+M2;\n", + "x = SumM/SumW;\n", + "e = wb/2-x;\n", + "pnt = (SumW/wb)*(1+(6*e/wb));\n", + "pnh = (SumW/wb)*(1-(6*e/wb));\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "print \"Reservior empty:\";\n", + "print \" Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "\n", + "#Reservior full\n", + "W3 = gamma_w*H**2/2;\n", + "U = gamma_w*H*c*wb/2;\n", + "SumV = SumW-U;\n", + "L3 = hw/3;\n", + "L4 = 2*wb/3; \t\t\t\t#lever arm\n", + "M3 = W3*L3;\n", + "M4 = U*L4; \t\t\t\t#moment about toe\n", + "SumM1 = SumM-M4-M3;\n", + "x = SumM1/SumV;\n", + "e = wb/2-x;\n", + "pnt = (SumV/wb)*(1+(6*e/wb));\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "print \"Reservior full:\";\n", + "print \" Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reservior empty:\n", + " Normal stress at toe = 15.70 kN/square.m.\n", + "Normal stress at heel = 172.70 kN/square.m.\n", + "Reservior full:\n", + " Normal stress at toe = 120.30 kN/square.m.\n", + "Normal stress at heel = 9.20 kN/square.m.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 pg : 415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "\n", + "#check the stability\n", + "\n", + "#Given\n", + "c = 1;\n", + "hw = 6; \t\t\t\t#heigth of water in reservior\n", + "Bt = 1.5; \t\t\t\t#width of top of dam\n", + "H = 6; \t\t\t\t#heigth of the dam\n", + "gamma_m = 20; \t\t\t\t#unit weigth of masonary \n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "f = 1800; \t\t\t\t#compressive strength\n", + "miu = 0.6; \t\t\t\t#coefficient of friction\n", + "\n", + "#to develop no tension e = b/6;x = b/3.\n", + "#hence on solving the relations we get\n", + "\n", + "P = [1,2.944,-39.074]\n", + "wb = roots(P)[1]; \t\t\t\t#sign of coefficient is 2.944 is not taken correctly in book\n", + "#roots are 4.94 and -7.89\n", + "#math.since negative value cannot be taken\n", + "print \"Neglecting the negative value.Width of base is = 4.94 m.\";\n", + "W1 = Bt*gamma_m*H;\n", + "W2 = gamma_m*H*(wb-Bt)/2;\n", + "L1 = (wb-Bt)+(Bt/2);\n", + "L2 = (2*(wb-Bt))/3;\n", + "M1 = W1*L1,\n", + "M2 = W2*L2;\n", + "U = gamma_w*H*c*wb/2;\n", + "L4 = 2*wb/3;\n", + "M4 = U*L4;\n", + "W3 = gamma_w*H**2/2;\n", + "L3 = hw/3;\n", + "M3 = W3*L3;\n", + "SumW = W1+W2-U;\n", + "SumM = M1+M2-M4-M3;\n", + "pn = 2*SumW/wb;\n", + "pn = round(pn*10)/10;\n", + "print \"Maximum stress = %.2f kN/square.m.\"%(pn);\n", + "print \"Dam is safe against compression\";\n", + "FOS = miu*SumW/W3;\n", + "FOS = round(FOS*100)/100;\n", + "print \"Factor of safety against sliding = %.2f. <1\"%(FOS);\n", + "print \"Dam is unsafe against sliding.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting the negative value.Width of base is = 4.94 m.\n", + "Maximum stress = 97.50 kN/square.m.\n", + "Dam is safe against compression\n", + "Factor of safety against sliding = 0.82. <1\n", + "Dam is unsafe against sliding.\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 pg : 416" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\t\t\t\t#check the stability if uplift is neglected\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "hw = 6; \t\t\t\t#heigth of water in reservior\n", + "Bt = 1.5; \t\t\t\t#width of top of dam\n", + "H = 6; \t\t\t\t#heigth of the dam\n", + "gamma_m = 20; \t\t\t\t#unit weigth of masonary \n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "f = 1800; \t\t\t\t#compressive strength\n", + "miu = 0.6; \t\t\t\t#coefficient of friction\n", + "\n", + "\t\t\t\t#to develop no tension e = b/6;x = b/3.\n", + "\t\t\t\t#hence on solving the relations we get\n", + "\n", + "P = [1,1.5,-19.908]\n", + "wb = roots(P)[1];\n", + "\n", + "#roots are 3.774 and -5.27\n", + "#math.since negative value cannot be taken\n", + "\n", + "print \"Neglecting the negative value.Width of base is = %.2f m.\"%wb;\n", + "\n", + "W1 = Bt*gamma_m*H;\n", + "W2 = gamma_m*H*(wb-Bt)/2;\n", + "L1 = (wb-Bt)+(Bt/2);\n", + "L2 = (2*(wb-Bt))/3;\n", + "M1 = W1*L1,\n", + "M2 = W2*L2;\n", + "W3 = gamma_w*H**2/2;\n", + "L3 = hw/3;\n", + "M3 = W3*L3;\n", + "SumW = W1+W2;\n", + "SumM = M1+M2-M3;\n", + "pn = 2*SumW/wb;\n", + "pn = round(pn*10)/10;\n", + "print \"Maximum stress = %.2f kN/square.m.\"%(pn);\n", + "print \"Dam is safe against compression\";\n", + "\n", + "FOS = miu*SumW/W3;\n", + "FOS = round(FOS*1000)/1000;\n", + "print \"Factor of safety against sliding = %.2f. > 1\"%(FOS);\n", + "print \"Dam is safe against sliding.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting the negative value.Width of base is = 3.77 m.\n", + "Maximum stress = 167.70 kN/square.m.\n", + "Dam is safe against compression\n", + "Factor of safety against sliding = 1.07. > 1\n", + "Dam is safe against sliding.\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 pg : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# calculate maximum permissible heigth of shutter so that no tension develops\n", + "\t\t\t\t\n", + "#Given\n", + "Bt = 3; \t\t\t\t#width of top of dam\n", + "H = 12; \t\t\t\t#heigth of the dam\n", + "wb = 9; \t\t\t\t#width of base of dam\n", + "gamma_m = 21; \t\t\t\t#unit weigth of masonary\n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "\n", + "W1 = Bt*gamma_m*H;\n", + "W2 = gamma_m*H*(wb-Bt)/2;\n", + "\n", + "#taking moment about a point on base at 3m from toe\n", + "L1 = 3+Bt/2;\n", + "L2 = (2*(wb-Bt)/3)-3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2;\n", + "M = M1+M2;\n", + "\n", + "#net moment about this point should be zero for equilibrium\n", + "s = (M*6/gamma_w)**(1./3)-12;\n", + "s = round(s*100)/100;\n", + "\n", + "# Results\n", + "print \"maximum permissible heigth of shutter = %.2f m.\"%(s);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum permissible heigth of shutter = 1.22 m.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 pg : 417" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t#moment at 50m below water surface\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "H = 100; \t\t\t\t#heigth of dam\n", + "hw = 100; \t\t\t\t#heigth of water in reservior\n", + "FB = 1; \t\t\t\t#free board\n", + "s = 0.15; \t\t\t\t#slope of upstream face\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "alphah = 0.1;\n", + "\n", + "theta = math.atan(s);\n", + "y = 50;\n", + "Cm = 0.735*(1-(theta*2/math.pi));\n", + "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n", + "pe = Cy*alphah*gamma_w*hw;\n", + "F = 0.726*pe*y;\n", + "M = 0.299*pe*y**2;\n", + "pe = round(pe*1000)/1000;\n", + "F = round(F*10)/10;\n", + "M = round(M*10)/10;\n", + "print \"hydrodynamic earthquake pressure = %.2f kN/square.mshear = %.2f kN/m.Moment = %.2f kN-m/m.\"%(pe,F,M);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hydrodynamic earthquake pressure = 65.27 kN/square.mshear = 2369.30 kN/m.Moment = 48788.60 kN-m/m.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14 pg : 418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import sec\n", + "\n", + "#check stability\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1.;\n", + "H = 10.; \t\t\t\t#heigth of dam\n", + "hw = 10.; \t\t\t\t#heigth of water in reservior\n", + "wb = 8.25; \t\t\t\t#bottom width\n", + "Bt = 1.; \t\t\t\t#top width\n", + "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n", + "f = 1400.; \t\t\t\t#permissible shear stress at joint\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "fi = math.atan(0.625);\n", + "theta = math.atan(0.1);\n", + "\n", + "W1 = Bt*H*gamma_m;\n", + "W2 = H*H*Hs1*gamma_m/2;\n", + "W3 = H*6.25*gamma_m/2;\n", + "W4 = hw*gamma_w*H*Hs1/2;\n", + "P = gamma_w*hw**2/2;\n", + "U = wb*gamma_w*hw*c/2;\n", + "SumV = W1+W2+W3+W4-U;\n", + "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n", + "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n", + "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n", + "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n", + "L5 = 2*wb/3;L6 = hw/3;\n", + "M1 = W1*L1;\n", + "M2 = W2*L2;\n", + "M3 = W3*L3;\n", + "M4 = W4*L4;\n", + "M5 = U*L5;\n", + "M6 = P*L6;\n", + "SumM = M1+M2+M3+M4-M5-M6;\n", + "Mplus = M1+M2+M3+M4;\n", + "Mminus = M5+M6;\n", + "FOS = miu*SumV/P;\n", + "SFF = (miu*SumV+wb*1400)/P;\n", + "FOO = Mplus/Mminus;\n", + "FOS = round(FOS*100)/100;\n", + "SFF = round(SFF*10)/10;\n", + "FOO = round(FOO*100)/100;\n", + "print \"Factor of safety against sliding = %.2f. >1 \"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n", + "print \"Dam is unsafe against overturning\";\n", + "\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV/wb)*(1+(6*e/wb)); \t\t\t\t#calculation is done wrong in book;value of b is not taken correctly\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.04. >1 \n", + "Shear friction factor = 24.60.\n", + "Factor of safety against overturning = 1.47. <1.5\n", + "Dam is unsafe against overturning\n", + "Normal stress at toe = 170.70 kN/square.m.\n", + "Normal stress at heel = -5.80 kN/square.m.\n", + "Principal stress at toe = 237.40 kN/square.m.\n", + "Principal stress at heel = -6.80 kN/square.m.\n", + "Shear stress at toe = 106.70 kN/square.m.\n", + "Shear stress at heel = 10.40 kN/square.m.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15 pg : 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#Check the stability and determine sliding factor and shear factor\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "H = 90; \t\t\t\t#heigth of dam\n", + "wb = 73.1; \t\t\t\t#width of base\n", + "Bt = 7; \t\t\t\t#width of top of dam\n", + "hw = 89; \t\t\t\t#heigth of water in reservior\n", + "Hs1 = 28; \t\t\t\t#heigth of slope on upstream side\n", + "Hs2 = 83; \t\t\t\t#heigth of slope on downstream side\n", + "Cm = 0.735;\n", + "alphah = 0.1;\n", + "gamma_m = 23.5; \t\t\t\t#unit weigth of concrete\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "theta = math.atan(8./28);\n", + "fi = math.atan(0.7);\n", + "\t\t\t\t#self weigth of dam\n", + "W1 = (Hs1*8*gamma_m)/2\n", + "W2 = (Bt*H*gamma_m)\n", + "W3 = (Hs2**2*0.7*gamma_m)/2\n", + "\t\t\t\t#weigth of superimposed water\n", + "W4 = (Hs1*8*gamma_w)/2\n", + "W5 = (hw-Hs1)*8*gamma_w\n", + "U = hw*wb*2*gamma_w/6; \t\t\t\t#uplift force\n", + "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n", + "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n", + "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n", + "\t\t\t\t#inertial load due to horizontal acceleration\n", + "I1 = W2/10;\n", + "I2 = W3/10;\n", + "I3 = W1/10;\n", + "SumV = W1+W2+W3+W4+W5-U;\n", + "SumH = wp+hp+I1+I2+I3;\n", + "L1 = (wb-8)+8/3\n", + "L2 = (0.7*Hs2)+(Bt/2)\n", + "L3 = (2*Hs2*0.7)/3.\n", + "L4 = (wb-8)+(2*8)/3.\n", + "L5 = (wb-8)+(8./2)\n", + "L6 = hw/3;\n", + "L7 = 2*wb/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4;\n", + "M5 = W5*L5;\n", + "M6 = wp*L6;\n", + "M7 = U*L7;\n", + "M8 = I1*45;\n", + "M9 = I2*83/3;\n", + "M10 = I3*28/3;\n", + "Mplus = M1+M2+M3+M4+M5;\n", + "Mminus = M6+M7+M8+M9+M10+Mhp;\n", + "SumM = Mplus-Mminus;\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "pnt = (SumV/wb)*(1+(6*e/wb));\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "p = hw*gamma_w;\n", + "pe = Cm*alphah*gamma_w*hw;\n", + "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(-pnh-(p+pe))*math.tan(theta);\n", + "print \"Normal stress at toe = %i kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %i kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %i kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %i kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %i kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %i kN/square.m.\"%(tauh);\n", + "\n", + "FOS = miu*SumV/SumH;\n", + "SFF = (miu*SumV+wb*1400)/SumH;\n", + "FOO = Mplus/Mminus;\n", + "Ffi = 1.2;Fc = 2.4;\n", + "F = (miu*SumV/Ffi+1400*wb/Fc)/SumH;\n", + "FOS = round(FOS*100)/100;\n", + "F = round(F*100)/100;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "print \"Factor of safety against sliding as per IS:6512-1972 = %.2f. <1.5\"%(FOS);\n", + "print \"Factor of safety against sliding as per IS:6512-1984 = %.2f. >1\"%(F);\n", + "print \"Shear friction factor = %.2f. <6\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n", + "print \"Dam is unsafe for given loading conditions\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normal stress at toe = 1929 kN/square.m.\n", + "Normal stress at heel = -323 kN/square.m.\n", + "Principal stress at toe = 2874 kN/square.m.\n", + "Principal stress at heel = -426 kN/square.m.\n", + "Shear stress at toe = 1350 kN/square.m.\n", + "Shear stress at heel = 175 kN/square.m.\n", + "Factor of safety against sliding as per IS:6512-1972 = 0.87. <1.5\n", + "Factor of safety against sliding as per IS:6512-1984 = 1.57. >1\n", + "Shear friction factor = 2.90. <6\n", + "Factor of safety against overturning = 1.45. <1.5\n", + "Dam is unsafe for given loading conditions\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.16 pg : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#Check the stability and determine principal and shear stress at toe and heel\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "miu = 0.7; \t\t\t\t#coefficient of friction\n", + "H = 70; \t\t\t\t#heigth of dam\n", + "ht = 0; \t\t\t\t#heigth of tail water\n", + "Lf = 6.5; \t\t\t\t#location of foundation gallery from heel\n", + "wb = 52.5; \t\t\t\t#width of base\n", + "Bt = 7; \t\t\t\t#width of top of dam\n", + "hw = 70; \t\t\t\t#heigth of water in reservior\n", + "Hs1 = 35; \t\t\t\t#heigth of slope on upstream side\n", + "Hs2 = 60; \t\t\t\t#heigth of slope on downstream side\n", + "gamma_m = 24; \t\t\t\t#unit weigth of concrete\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "theta = math.atan(0.1);\n", + "fi = math.atan(0.7);\n", + "\t\t\t\t#self weigth of dam\n", + "W1 = (Hs1*3.5*gamma_m)/2\n", + "W2 = (Bt*H*gamma_m)\n", + "W3 = (Hs2**2*0.7*gamma_m)/2\n", + "\t\t\t\t#weigth of superimposed water\n", + "W4 = (Hs1*3.5*gamma_w)/2\n", + "W5 = (hw-Hs1)*3.5*gamma_w\n", + "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n", + "Pt = gamma_w*ht\n", + "Ph = gamma_w*hw\n", + "Pg = (ht+(hw-ht)/3)*gamma_w\n", + "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n", + "l1 = (wb-Lf)/2\n", + "l2 = (2*(wb-Lf))/3\n", + "l3 = (wb-Lf)+(Lf/2)\n", + "l4 = (wb-Lf)+((2*Lf)/3)\n", + "L7 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n", + "L1 = (wb-3.5)+3.5/3\n", + "L2 = (0.7*Hs2)+(Bt/2)\n", + "L3 = (2*Hs2*0.7)/3\n", + "L4 = (wb-3.5)+(2*3.5)/3\n", + "L5 = (wb-3.5)+(3.5/2)\n", + "L6 = hw/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4;\n", + "M5 = W5*L5;\n", + "M6 = wp*L6;\n", + "M7 = U*L7;\n", + "SumV1 = W1+W2+W3;\n", + "SumM1 = M1+M2+M3;\n", + "SumV2 = SumV1+W4+W5;\n", + "SumM2 = SumM1+M4+M5-M6;\n", + "SumV3 = SumV2-U;\n", + "SumM3 = SumM2-M7;\n", + "Mplus = 1547377;\n", + "Mminus = 870421;\n", + "SumH = wp;\n", + "\n", + "\t\t\t\t#case 1. Reservior empty\n", + "x = SumM1/SumV1;\n", + "e = wb/2-x;\n", + "pnt = (SumV1/wb)*(1+(6*e/wb));\n", + "pnh = (SumV1/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = pnh*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"case 1. Reservior empty:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "\t\t\t\t#case2. reservior full without uplift\n", + "x = SumM2/SumV2;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV2/wb)*(1+(6*e/wb));\n", + "pnh = (SumV2/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "sigmat = round(sigmat*10)/10;\n", + "sigmah = round(sigmah*10)/10;\n", + "taut = round(taut*10)/10;\n", + "tauh = round(tauh*10)/10;\n", + "print \"case 2. reservior full without uplift:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "\t\t\t\t#case3. reservior full with uplift\n", + "x = SumM3/SumV3;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pnt = (SumV3/wb)*(1+(6*e/wb));\n", + "pnh = (SumV3/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = -(pnh-p)*math.tan(theta);\n", + "pnt = round(pnt);\n", + "pnh = round(pnh);\n", + "sigmat = round(sigmat);\n", + "sigmah = round(sigmah);\n", + "taut = round(taut);\n", + "tauh = round(tauh);\n", + "print \"case 3. reservior full with uplift:\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n", + "\n", + "FOS = miu*SumV3/SumH;\n", + "SFF = (miu*SumV3+wb*1400)/SumH;\n", + "FOO = Mplus/Mminus;\n", + "Ffi = 1.5;Fc = 3.6;\n", + "F = (miu*SumV3/Ffi+1400*wb/Fc)/SumH;\n", + "FOS = round(FOS*1000)/1000;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "F = round(F*1000)/1000;\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Factor of safety for load combination B = %.2f. > 1\"%(F);\n", + "print \"Dam is safe \";\n", + "\n", + "\t\t\t\t#Case4.considering seismic forces\n", + "Cm = 0.712;\n", + "alphah = 0.1;\n", + "alphav = 0.08;\n", + "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n", + "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n", + "\t\t\t\t#inertial load due to horizontal acceleration\n", + "I1 = W2/10;\n", + "I2 = W3/10;\n", + "I3 = W1/10;\n", + "v = SumV1*alphav;\n", + "Mv = 116444;\n", + "SumV4 = SumV3-v;\n", + "SumH1 = SumH+I1+I2+I3+hp;\n", + "M8 = I1*35;\n", + "M9 = I2*20;\n", + "M10 = I3*35/3;\n", + "Mminus1 = 1161849;\n", + "SumM4 = SumM3-M8-M9-M10-Mhp-Mv;\n", + "\n", + "x = SumM4/SumV4;\n", + "e = wb/2-x;\n", + "p = hw*gamma_w;\n", + "pe = Cm*alphah*gamma_w*hw;\n", + "pnt = (SumV4/wb)*(1+(6*e/wb));\n", + "pnh = (SumV4/wb)*(1-(6*e/wb));\n", + "sigmat = pnt*sec(fi)**2;\n", + "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n", + "taut = pnt*math.tan(fi);\n", + "tauh = (-pnh+(p+pe))*math.tan(theta);\n", + "pnt = round(pnt);\n", + "pnh = round(pnh);\n", + "sigmat = round(sigmat);\n", + "sigmah = round(sigmah);\n", + "taut = round(taut);\n", + "tauh = round(tauh);\n", + "print \"case 4.considering seismic forces\";\n", + "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n", + "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n", + "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n", + "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n", + "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh); \t\t\t\t#answer is wrong in book\n", + "\n", + "FOS = miu*SumV4/SumH1;\n", + "SFF = (miu*SumV4+wb*1400)/SumH1;\n", + "FOO = Mplus/Mminus1;\n", + "Ffi = 1.2;Fc = 2.7;\n", + "F = (miu*SumV4/Ffi+1400*wb/Fc)/SumH1;\n", + "FOS = round(FOS*1000)/1000;\n", + "SFF = round(SFF*100)/100;\n", + "FOO = round(FOO*100)/100;\n", + "F = round(F*100)/100;\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Factor of safety for load combination E = %.2f. > 1\"%(F);\n", + "print \"Dam is safe \";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case 1. Reservior empty:\n", + "Normal stress at toe = 156.30 kN/square.m.\n", + "Normal stress at heel = 1499.70 kN/square.m.\n", + "Principal stress at toe = 232.80 kN/square.m.\n", + "Principal stress at heel = 1514.70 kN/square.m.\n", + "Shear stress at toe = 109.40 kN/square.m.\n", + "Shear stress at heel = 150.00 kN/square.m.\n", + "case 2. reservior full without uplift:\n", + "Normal stress at toe = 1297.10 kN/square.m.\n", + "Normal stress at heel = 427.60 kN/square.m.\n", + "Principal stress at toe = 1932.60 kN/square.m.\n", + "Principal stress at heel = 425.00 kN/square.m.\n", + "Shear stress at toe = 907.90 kN/square.m.\n", + "Shear stress at heel = 25.90 kN/square.m.\n", + "case 3. reservior full with uplift:\n", + "Normal stress at toe = 1344.00 kN/square.m.\n", + "Normal stress at heel = 70.00 kN/square.m.\n", + "Principal stress at toe = 2002.00 kN/square.m.\n", + "Principal stress at heel = 64.00 kN/square.m.\n", + "Shear stress at toe = 941.00 kN/square.m.\n", + "Shear stress at heel = 62.00 kN/square.m.\n", + "Factor of safety against sliding = 1.08.\n", + "Shear friction factor = 4.14.\n", + "Factor of safety against overturning = 1.00.\n", + "Factor of safety for load combination B = 1.57. > 1\n", + "Dam is safe \n", + "case 4.considering seismic forces\n", + "Normal stress at toe = 1713.00 kN/square.m.\n", + "Normal stress at heel = -432.00 kN/square.m.\n", + "Principal stress at toe = 2552.00 kN/square.m.\n", + "Principal stress at heel = -443.00 kN/square.m.\n", + "Shear stress at toe = 1199.00 kN/square.m.\n", + "Shear stress at heel = 117.00 kN/square.m.\n", + "Factor of safety against sliding = 0.76.\n", + "Shear friction factor = 3.14.\n", + "Factor of safety against overturning = 1.00.\n", + "Factor of safety for load combination E = 1.52. > 1\n", + "Dam is safe \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17 pg : 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design practical profile of gravity dam\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1;\n", + "rlb = 1450; \t\t\t\t#R.L of base of dam\n", + "rlw = 1480.5; \t\t\t\t#R.L of water level\n", + "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "w = 1; \t\t\t\t#heigth of waves\n", + "f = 1200; \t\t\t\t#safe compressive stress for masonary\n", + "FB = 1.5*w;\n", + "rlt = FB+rlw; \t\t\t\t#R.L of top of dam\n", + "H = rlt-rlb; \t\t\t\t#heigth of dam\n", + "LH = f/(gamma_w*(Sg+1))\n", + "LH = round(LH*100)/100;\n", + "print \"Heigth of dam = %.2f m.\"%(H);\n", + "print \"limiting heigth of dam = %.2f m.\"%(LH);\n", + "print \"Dam is low gravity dam\";\n", + "hw = rlw-rlb;\n", + "\t\t\t\t#keep top width,a = 4.5.\n", + "a = 4.5;\n", + "P = hw/(Sg**0.5);\n", + "P = round(P*10)/10;\n", + "print \"Base width of elementary profile = %.2f m.\"%(P);\n", + "uo = a/16;\n", + "wb = uo+P;\n", + "wb = round(wb);\n", + "print \"Base width = %.2f m.\"%(wb);\n", + "D = 2*a*(Sg**0.5);\n", + "D = round(D);\n", + "print \"Dismath.tance upto which u/s slope is vertical from water level = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heigth of dam = 32.00 m.\n", + "limiting heigth of dam = 35.98 m.\n", + "Dam is low gravity dam\n", + "Base width of elementary profile = 19.70 m.\n", + "Base width = 20.00 m.\n", + "Dismath.tance upto which u/s slope is vertical from water level = 14.00 m.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18 pg : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#determine if dam is safe against sliding\n", + "\t\t\t\t\n", + "#Given\n", + "hw = 97.; \t\t\t\t#heigth of water in reservior\n", + "Bt = 7.; \t\t\t\t#width of top of dam\n", + "H = 100.; \t\t\t\t#heigth of the dam\n", + "Hs2 = 90.; \t\t\t\t#heigth of slope on downstream side\n", + "wb = 75.; \t\t\t\t#width of base of dam\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "gamma_d = 2.4; \t\t\t\t#weigth density of concrete\n", + "gamma_w = 1000.; \t\t\t\t#weigth density of water\n", + "\n", + "# Calculations\n", + "P = gamma_w*hw**2/(2*1000);\n", + "W1 = Bt*gamma_d*H;\n", + "W2 = (wb-Bt)*Hs2*gamma_d/2;\n", + "W = W1+W2;\n", + "FOS = miu*W/P;\n", + "FOS = round(FOS*1000)/1000;\n", + "\n", + "# Results\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Dam is safe against sliding\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.44.\n", + "Dam is safe against sliding\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19 pg : 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Factor of safety against overturning\n", + "#Factor of safety against sliding\n", + "#Shear friction factor\n", + "\n", + "#Given\n", + "c = 1.;\n", + "H = 10.; \t\t\t\t#heigth of dam\n", + "hw = 10.; \t\t\t\t#heigth of water in reservior\n", + "wb = 8.25; \t\t\t\t#bottom width\n", + "Bt = 1.; \t\t\t\t#top width\n", + "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n", + "f = 1400.; \t\t\t\t#permissible shear stress at joint\n", + "miu = 0.75; \t\t\t\t#coefficient of friction\n", + "fi = math.atan(0.625);\n", + "theta = math.atan(0.1);\n", + "\n", + "# Calculations\n", + "W1 = Bt*H*gamma_m;\n", + "W2 = H*H*Hs1*gamma_m/2;\n", + "W3 = H*6.25*gamma_m/2;\n", + "W4 = hw*gamma_w*H*Hs1/2;\n", + "P = gamma_w*hw**2/2;\n", + "U = wb*gamma_w*hw*c/2;\n", + "SumV = W1+W2+W3+W4-U;\n", + "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n", + "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n", + "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n", + "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n", + "L5 = 2*wb/3;L6 = hw/3;\n", + "M1 = W1*L1;M2 = W2*L2;M3 = W3*L3;M4 = W4*L4;\n", + "M5 = U*L5;M6 = P*L6;\n", + "SumM = M1+M2+M3+M4-M5-M6;\n", + "Mplus = M1+M2+M3+M4;\n", + "Mminus = M5+M6;\n", + "FOS = miu*SumV/P;\n", + "SFF = (miu*SumV+wb*1400)/P;\n", + "FOO = Mplus/Mminus;\n", + "FOS = round(FOS*100)/100;\n", + "SFF = round(SFF*10)/10;\n", + "FOO = round(FOO*100)/100;\n", + "\n", + "# Results\n", + "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n", + "print \"Shear friction factor = %.2f.\"%(SFF);\n", + "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n", + "print \"Dam is unsafe against overturning\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor of safety against sliding = 1.04.\n", + "Shear friction factor = 24.60.\n", + "Factor of safety against overturning = 1.47.\n", + "Dam is unsafe against overturning\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.20 pg : 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "c = 1.;\n", + "hw = 80.; \t\t\t\t#heigth of water in reservior\n", + "Bt = 6.; \t\t\t\t#width of top of dam\n", + "H = 84.; \t\t\t\t#heigth of the dam\n", + "Hs2 = 75.; \t\t\t\t#heigth of slope on downstream side\n", + "wb = 56.; \t\t\t\t#width of base of dam\n", + "Lf = 8.; \t\t\t\t#dismath.tance of foundation gallery from heel\n", + "gamma_d = 23.5; \t\t\t\t#weigth density of concrete\n", + "gamma_w = 9.81; \t\t\t\t#weigth density of water\n", + "ht = 6.; \t\t\t\t#heigth of tail water\n", + "\n", + "# Calculations\n", + "W1 = Bt*gamma_d*H;\n", + "W2 = gamma_d*Hs2*(wb-Bt)/2;\n", + "W3 = gamma_w*ht*4/2;\n", + "W4 = gamma_w*hw**2/2;\n", + "W5 = gamma_w*ht**2/2;\n", + "Pt = gamma_w*ht\n", + "Ph = gamma_w*hw\n", + "Pg = (ht+(hw-ht)/3)*gamma_w\n", + "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n", + "l1 = (wb-Lf)/2\n", + "l2 = (2*(wb-Lf))/3\n", + "l3 = (wb-Lf)+(Lf/2)\n", + "l4 = (wb-Lf)+((2*Lf)/3)\n", + "L6 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n", + "L1 = (wb-Bt)+(Bt/2)\n", + "L2 = (2*(wb-Bt))/3\n", + "L3 = 4./3;\n", + "L4 = hw/3;\n", + "L5 = ht/3;\n", + "M1 = W1*L1\n", + "M2 = W2*L2\n", + "M3 = W3*L3\n", + "M4 = W4*L4\n", + "M5 = W5*L5\n", + "M6 = U*L6;\n", + "SumV = W1+W2+W3-U;\n", + "SumH = W4-W5;\n", + "SumM = M1+M2+M3-M4+M5-M6;\n", + "x = SumM/SumV;\n", + "e = wb/2-x;\n", + "pnt = (SumV/wb)*(1+(6*e/wb));\n", + "pnh = (SumV/wb)*(1-(6*e/wb));\n", + "pnt = round(pnt*10)/10;\n", + "pnh = round(pnh*10)/10;\n", + "\n", + "# Results\n", + "print \"Maximum Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n", + "print \"Maximum Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Normal stress at toe = 1586.70 kN/square.m.\n", + "Maximum Normal stress at heel = -49.30 kN/square.m.\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8fbdd9ad Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10.png differ 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 new file mode 100644 index 00000000..6fd8ed7e Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4.png differ 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 new file mode 100644 index 00000000..c3a01497 Binary files /dev/null and b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5.png differ diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb new file mode 100644 index 00000000..50e40e46 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter01.ipynb @@ -0,0 +1,1109 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter- 1 : Differential And Cascode Amplifiers\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.1 - Page No 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= V_CC \n", + "V_BE= 0.715 # in volt\n", + "R_c1= 2.7 # in k ohm\n", + "R_c1= R_c1*10**3 # in ohm\n", + "R_c2= R_c1 # in ohm\n", + "R_E=3.9 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "Bita_ac= 100 \n", + "Bita_dc= Bita_ac \n", + "I_E= (V_EE-V_BE)/(2*R_E) # in amp\n", + "I_C= I_E # in amp\n", + "V_C= V_CC-I_C*R_c1 # in volt\n", + "V_E= 0-V_BE # in volt\n", + "V_CE= V_C-V_E # in volt\n", + "re_desh= 25*10**-3/I_E \n", + "A_d= R_c1/re_desh \n", + "print \"Operating current = %0.2f mA\" %(I_C*10**3)\n", + "print \"Operating voltage = %0.1f V\" %V_CE\n", + "print \"Voltage gain = %0.1f\" %A_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating current = 1.19 mA\n", + "Operating voltage = 7.5 V\n", + "Voltage gain = 128.6\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.2 - Page No 12\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= 10 # in volt\n", + "V_BE=0.7# in volt\n", + "I_C=0.5 # in mA\n", + "I_C=I_C*10**-3 # in amp\n", + "R_C= 10 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 9.3 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "I_E= (V_EE-V_BE)/(2*R_E) # in amp\n", + "I_CQ= I_E # in amp\n", + "print \"Quiescent collector current = %0.1f mA\" %(I_CQ*10**3)\n", + "V_CEQ= V_CC+V_BE-I_C*R_C # in volt\n", + "print \"Quiescent collector emitter voltage = %0.1f V\" %V_CEQ" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quiescent collector current = 0.5 mA\n", + "Quiescent collector emitter voltage = 5.7 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.3 - Page No 13\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "V_CC= 12 # in volt\n", + "V_EE= 12 # in volt\n", + "V_BE= 0.7 # in volt\n", + "R_C= 10 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 10 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "R_B= 20 # in k ohm\n", + "R_B= R_B*10**3 # in ohm\n", + "Bita_dc= 75 \n", + "# Part (i)\n", + "#Ignoring V_BE\n", + "I_T= V_EE/R_E#in amp \n", + "I_E= I_T/2 # in amp\n", + "I_C=I_E \n", + "V_out= V_CC-I_C*R_C# in volt\n", + "print \"Part : a\"\n", + "print \"Output Voltage = %0.f volt (Ignoring V_BE)\" %V_out\n", + "#Considering V_BE\n", + "I_T= (V_EE-V_BE)/R_E#in amp \n", + "I_E= I_T/2 # in amp\n", + "I_C=I_E \n", + "V_out= V_CC-I_C*R_C# in volt\n", + "print \"Output Voltage = %0.2f volt (Condidering V_BE)\" %V_out\n", + "I_T= (V_EE-V_BE)/(R_E+R_B/(2*Bita_dc)) # in amp\n", + "I_E= I_T/2 # in amp\n", + "I_C=I_E \n", + "V_out= V_CC-I_C*R_C# in volt\n", + "print \"Output Voltage = %0.3f volt (With Bita_dc)\" %V_out\n", + "\n", + "# Part(ii)\n", + "I_C= 0.6 # in mA\n", + "I_C=I_C*10**-3 \n", + "I_B= I_C/Bita_dc # in amp\n", + "print \"\\nPart : b\"\n", + "print \"Base current = %0.f micro amphere\" %(I_B*10**6)\n", + "V_B= -I_B*R_B # in volt\n", + "print \"Base Voltage = %0.2f V\" %V_B\n", + "\n", + "# Part (iii)\n", + "Bita_dc= 60 \n", + "I_B1= I_C/Bita_dc # in amp\n", + "print \"\\nPart : c\"\n", + "print \"Base current for transistor Q1 = %0.f micro amphere\" %(I_B1*10**6)\n", + "V_B1= -I_B1*R_B # in volt\n", + "print \"Base Voltage for transistor Q1 = %0.1f V\" %V_B1\n", + "Bita_dc= 80 \n", + "I_B2= I_C/Bita_dc # in amp\n", + "print \"Base current for transistor Q2 = %0.1f micro amphere\" %(I_B2*10**6)\n", + "V_B2= -I_B2*R_B # in volt\n", + "print \"Base Voltage for transistor Q2 = %0.2f V\" %V_B2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part : a\n", + "Output Voltage = 6 volt (Ignoring V_BE)\n", + "Output Voltage = 6.35 volt (Condidering V_BE)\n", + "Output Voltage = 6.424 volt (With Bita_dc)\n", + "\n", + "Part : b\n", + "Base current = 8 micro amphere\n", + "Base Voltage = -0.16 V\n", + "\n", + "Part : c\n", + "Base current for transistor Q1 = 10 micro amphere\n", + "Base Voltage for transistor Q1 = -0.2 V\n", + "Base current for transistor Q2 = 7.5 micro amphere\n", + "Base Voltage for transistor Q2 = -0.15 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.4 - Page No 14\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 10 # in volt\n", + "V_EE= 10 # in volt\n", + "V_BE= 0.7 # in volt\n", + "R_C= 2.2 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 4.7 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "Ri_1= 50 # in ohm\n", + "Ri_2= Ri_1 # in ohm\n", + "Bita_dc= 100 \n", + "Bita_ac = Bita_dc \n", + "# Part (a)\n", + "I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_dc) # in amp\n", + "I_E= I_CQ # in amp\n", + "print \"Part : a\"\n", + "print \"Value of I_CQ = %0.4f mA\" %(I_CQ*10**3)\n", + "V_CEQ= V_CC + V_BE - I_CQ*R_C # in volt\n", + "print \"Value of V_CEQ = %0.4f volt\" %V_CEQ\n", + "\n", + "# Part(b)\n", + "re_desh= (26*10**-3)/I_E # in ohm\n", + "# A_d= V_out/V_ind = R_C/re_desh\n", + "A_d = R_C/re_desh \n", + "print \"\\nPart : b\"\n", + "print \"Voltage gain = %0.2f \" %A_d\n", + "\n", + "# Part(c)\n", + "# R_in1= R_in2= 2*Bita_ac*re_desh\n", + "R_in1= 2*Bita_ac*re_desh # in ohm\n", + "print \"\\nPart : c\"\n", + "print \"Input resistance = %0.3f k ohm\" %(R_in1*10**-3)\n", + "\n", + "# Part(d)\n", + "# R_out1= R_out2= R_C\n", + "R_out1= R_C # in ohm\n", + "print \"\\nPart : d\"\n", + "print \"Output resistance = %0.1f k ohm\" %(R_out1*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part : a\n", + "Value of I_CQ = 0.9893 mA\n", + "Value of V_CEQ = 8.5235 volt\n", + "\n", + "Part : b\n", + "Voltage gain = 83.71 \n", + "\n", + "Part : c\n", + "Input resistance = 5.256 k ohm\n", + "\n", + "Part : d\n", + "Output resistance = 2.2 k ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.5 - Page No 14\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 15 # in volt\n", + "V_EE= 15 # in volt\n", + "V_BE= 0.7 # in volt\n", + "R_C= 1 # in M ohm\n", + "R_C= R_C*10**6 # in ohm\n", + "R_E= R_C # in ohm\n", + "\n", + "Bita_ac= 100 \n", + "I_E = (V_EE-V_BE)/(2*R_E) # in amp\n", + "re_desh= (26*10**-3)/I_E # in ohm\n", + "A_d = R_C/re_desh \n", + "print \"Voltage gain = %0.f \" %A_d\n", + "Z_in= 2*Bita_ac*re_desh # in ohm\n", + "print \"Input impedence = %0.4f M ohm\" %(Z_in*10**-6)\n", + "Z_out= R_C # in ohm\n", + "print \"Output impedence = %0.f M ohm\" %(Z_out*10**-6)\n", + "A_cm= R_C/(2*R_E+re_desh) \n", + "CMRR= A_d/A_cm \n", + "print \"Common-mode rejection ratio = %0.f\" %CMRR\n", + "I_C=I_E \n", + "V_out= V_CC-I_C*R_C # in volt\n", + "print \"Total output voltage at the quiescent value = %0.2f volt\" %V_out\n", + "# when v_in = 1\n", + "v_in= 1 # in mV\n", + "v_in= v_in*10**-3 # in volt\n", + "v_out= A_d*v_in \n", + "print \"The ac output voltage = %0.3f volt\" %v_out\n", + "\n", + "# Note : Answer of CMRR in the book is wrong due to wrong calculation of A_cm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = 275 \n", + "Input impedence = 0.7273 M ohm\n", + "Output impedence = 1 M ohm\n", + "Common-mode rejection ratio = 551\n", + "Total output voltage at the quiescent value = 7.85 volt\n", + "The ac output voltage = 0.275 volt\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.6 - Page No 17\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_EE= 5 # in volt\n", + "R_C= 2 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 4.3 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "V_BE=0.7 # in volt (Assuming)\n", + "V_T= 26*10**-3 # in volt\n", + "I_E = (V_EE-V_BE)/(2*R_E) # in amp\n", + "re_desh= V_T/I_E # in ohm\n", + "A_d = R_C/(2*re_desh) \n", + "print \"Voltage gain = %0.2f \" %A_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain = 19.23 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.7 - Page No 17\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_EE= 5 # in volt\n", + "R_C= 2 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 4.3 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "V_BE=0.7 # in volt (Assuming)\n", + "V_T= 26*10**-3 # in volt\n", + "I_E = (V_EE-V_BE)/(2*R_E) # in amp\n", + "re_desh= V_T/I_E # in ohm\n", + "A_d = R_C/(2*re_desh) \n", + "A_cm= R_C/(2*R_E+re_desh) \n", + "print \"Common mode gain= %0.4f\" %A_cm \n", + "CMRR= A_d/A_cm \n", + "print \"Common mode rejection ratio = %0.1f\" %CMRR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Common mode gain= 0.2312\n", + "Common mode rejection ratio = 83.2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.8 - Page No 20\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC= 9 # in volt\n", + "V_EE= 9 # in volt\n", + "V_BE= 0.7 # in volt (Assuming value)\n", + "R_C= 47 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 43 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "Ri_1= 20 # in ohm\n", + "Ri_2= Ri_1 # in ohm\n", + "v_in1= 2.5 # in mv\n", + "v_in1=v_in1*10**-3 # in volt\n", + "Bita_1= 75 \n", + "Bita_2= Bita_1 \n", + "I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_1) # in amp\n", + "I_E= I_CQ # in amp\n", + "V_CEQ= V_CC + V_BE - I_CQ*R_C # in volt\n", + "re_desh= (26*10**-3)/I_E # in ohm\n", + "A_d = R_C/re_desh \n", + "v_out= A_d*v_in1 # in volt\n", + "print \"Output voltage = %0.3f volt\" %v_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 0.436 volt\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.9 - Page No 20\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "RC= 2.2;#in k\u03a9\n", + "RE= 4.7;# in k\u03a9\n", + "Ri1= 50*10**-3;# in k\u03a9\n", + "Ri2= 50*10**-3;# in k\u03a9\n", + "VCC= 10;#in V\n", + "VEE= 10;# in V\n", + "VBE= 0.7;# in V\n", + "beta_dc= 100;\n", + "beta_ac= 100;\n", + "\n", + "# Part (i)\n", + "# Formula Used : ICQ= IE= (VEE-VBE)/(2*RE+Ri/beta_dc)\n", + "ICQ= (VEE-VBE)/(2*RE+Ri1/beta_dc);#quiescent collector current in mA\n", + "IE= ICQ;# in mA\n", + "print \"Part (i) : Dual-input, unbalanced output\"\n", + "print \"The value of ICQ = %0.4f mA\" %ICQ\n", + "# Quiescent collector-emitter voltage,\n", + "VCEQ= VCC+VBE-ICQ*RC;# in V\n", + "print \"The value of VCEQ = %0.4f V\" %VCEQ\n", + "re_desh= 26/IE;# AC emitter resistance in \u03a9\n", + "Rin1= 2*beta_ac*re_desh;# input resistance in \u03a9\n", + "Rin1= Rin1*10**-3;#in k\u03a9\n", + "Rin2= Rin1;# in k\u03a9\n", + "print \"The value of Rin1 = %0.3f k\u03a9 \" %Rin1\n", + "print \"The value of Rin2 = %0.3f k\u03a9 \" %Rin1\n", + "Rout= RC;# in k\u03a9\n", + "print \"The value of Rout = %0.1f k\u03a9\" %Rout \n", + "print \"The value of RC = %0.1f k\u03a9\" %RC\n", + "# Formula Used : Ad= Vout/Vind= RC/re_desh\n", + "Ad= RC*10**3/(re_desh*2);# voltage gain of dual input, unbalanced output\n", + "print \"The value of Ad = %0.3f \" %Ad\n", + "\n", + "# Part (ii)\n", + "print \"\\nPart (ii) : Single-output, balanced output\"\n", + "print \"The value of ICQ = %0.4f mA\" %ICQ\n", + "print \"The value of VCEQ = %0.4f V\" %VCEQ\n", + "print \"The value of Rin = %0.3f k\u03a9\" %Rin1\n", + "print \"The value of Rout1 = %0.1f k\u03a9\" %Rout\n", + "print \"The value of Rout2 = %0.1f k\u03a9\" %Rout\n", + "# Formula Used : Ad= Vout/Vind= RC/re_desh\n", + "Ad= RC*10**3/(re_desh);# voltage gain of dual input, unbalanced output\n", + "print \"The value of Ad = %0.2f\" %Ad\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : Dual-input, unbalanced output\n", + "The value of ICQ = 0.9893 mA\n", + "The value of VCEQ = 8.5235 V\n", + "The value of Rin1 = 5.256 k\u03a9 \n", + "The value of Rin2 = 5.256 k\u03a9 \n", + "The value of Rout = 2.2 k\u03a9\n", + "The value of RC = 2.2 k\u03a9\n", + "The value of Ad = 41.855 \n", + "\n", + "Part (ii) : Single-output, balanced output\n", + "The value of ICQ = 0.9893 mA\n", + "The value of VCEQ = 8.5235 V\n", + "The value of Rin = 5.256 k\u03a9\n", + "The value of Rout1 = 2.2 k\u03a9\n", + "The value of Rout2 = 2.2 k\u03a9\n", + "The value of Ad = 83.71\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.10 - Page No 23\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VEE= 9;#in V\n", + "VCC= 9;#in V \n", + "RC= 47*10**3;# collector resistance in \u03a9\n", + "RE= 43*10**3;# emitter resistance in \u03a9\n", + "vin1= 2.5*10**-3;# in V\n", + "Ri1= 20*10**3;# in \u03a9\n", + "Ri2= Ri1;# in \u03a9\n", + "VBE= 0.7;# in V\n", + "VT= 26*10**-3;# in V\n", + "beta1= 75;\n", + "beta2= 75;\n", + "IE= (VEE-VBE)/(2*RE+Ri1/beta1);#emitter current in A\n", + "ICQ= IE;# quiescent current in A\n", + "VCEQ= VCC+VBE-ICQ*RC;# quiescent collector voltage in V\n", + "re_desh= VT/IE;#AC emitter resistance in \u03a9\n", + "Ad= RC/(2*re_desh);# voltage gain\n", + "vout= Ad*vin1;# output voltage in V\n", + "print \"The output voltage = %0.3f V\" %vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 0.217 V\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.11 - Page No 25\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R_E_desh= 200 # in ohm\n", + "V_CC= 10 # in volt\n", + "V_EE= 10 # in volt\n", + "V_BE= 0.7 # in volt\n", + "R_C= 2.2 # in k ohm\n", + "R_C= R_C*10**3 # in ohm\n", + "R_E= 4.7 # in k ohm\n", + "R_E= R_E*10**3 # in ohm\n", + "Ri_1= 50 # in ohm\n", + "Ri_2= Ri_1 # in ohm\n", + "Bita_dc= 100 \n", + "Bita_ac = Bita_dc \n", + "I_CQ = (V_EE-V_BE)/(2*R_E+ R_E_desh+Ri_1/Bita_dc) # in amp\n", + "I_E= I_CQ # in amp\n", + "print \"Value of I_CQ = %0.4f mA\" %(I_CQ*10**3)\n", + "V_CEQ= V_CC + V_BE - I_CQ*R_C # in volt\n", + "print \"Value of V_CEQ = %0.3f volt\" %V_CEQ\n", + "re_desh= (26*10**-3)/I_E # in ohm\n", + "A_d = R_C/(re_desh+R_E_desh) \n", + "print \"Voltage gain= %0.2f\" %A_d\n", + "R_in1= 2*Bita_ac*(re_desh+R_E_desh) # in ohm\n", + "print \"Input resistance = %0.3f k ohm\" %(R_in1*10**-3)\n", + "R_out1= R_C # in ohm\n", + "print \"Output resistance = %0.1f k ohm\" %(R_out1*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of I_CQ = 0.9687 mA\n", + "Value of V_CEQ = 8.569 volt\n", + "Voltage gain= 9.70\n", + "Input resistance = 45.368 k ohm\n", + "Output resistance = 2.2 k ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.12 - Page No 29\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VEE= 15 #in V\n", + "VD1= 0.7 # in V\n", + "VD2= 0.7 # in V\n", + "VBE= 0.7 # in V\n", + "Beta= 100 \n", + "VT= 26 # in mV\n", + "R3= 180 #in \u03a9\n", + "RC= 470 # in \u03a9\n", + "VB3= -VEE+VD1+VD2 #in V\n", + "VE3= VB3-VBE #voltage at emitter terminal of transistor Q3 in V\n", + "IE3= (VE3-(-VEE))/R3 #emitter current through transistor Q3 in A\n", + "\n", + "#Part (i) \n", + "ICQ= IE3/2 #quiescent current in A\n", + "ICQ= round(ICQ*10**3) #in mA\n", + "IE= ICQ #emitter current in mA\n", + "print \"Part (i) : Quiescent current = %0.f mA \" %ICQ\n", + "VCEQ= VEE+VBE-ICQ*10**-3*RC #quiescent collector-emitter voltage in V\n", + "print \"The quiescent collector-emitter voltage = %0.2f V\" %VCEQ\n", + "re_desh= VT/IE #AC emitter resistance in \u03a9\n", + "\n", + "# Part (ii)\n", + "Ad= RC/re_desh # differential voltage gain\n", + "print \"Part (ii) : Differential voltage gain = %0.2f \" %Ad\n", + "\n", + "# Part (iii)\n", + "Rin1= 2*Beta*re_desh # in \u03a9\n", + "Rin1= Rin1*10**-3 # in k\u03a9\n", + "print \"Part (iii) : The input resistance = %0.1f k\u03a9\" %Rin1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : Quiescent current = 2 mA \n", + "The quiescent collector-emitter voltage = 14.76 V\n", + "Part (ii) : Differential voltage gain = 36.15 \n", + "Part (iii) : The input resistance = 2.6 k\u03a9\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.13 - Page No 30\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VEE= 10 #in V\n", + "VCC=10 # in V\n", + "VD1= 0.715 # in V\n", + "Vz= 6.2# in V\n", + "VBE= VD1 # in V\n", + "Izt= 41 # in mA\n", + "R3= 2.7 # in k\u03a9\n", + "RC= 4.7 # in k\u03a9\n", + "VT= 26 # in mV\n", + "beta_ac= 100 \n", + "beta_dc= 100 \n", + "VB3= -VEE+Vz+VD1 #voltage at the base of transistor Q3 in V\n", + "VE3= VB3-VBE # voltage at the emitter of transistor Q3 in V\n", + "IE3= (VE3-(-VEE))/R3 #emitter current through transistor Q3 in mA\n", + "ICQ= IE3/2 #quiescent current in mA\n", + "VCEQ= VCC+VBE-ICQ*RC # in V\n", + "print \"Part (c) : The Q-point values : \" \n", + "print \"The value of ICQ = %0.3f mA\" %ICQ\n", + "print \"The value of VCEQ = %0.2f V\" %VCEQ\n", + "re_desh= VT/ICQ #dynamic emitter resistance in \u03a9\n", + "Ad= RC*10**3/re_desh # voltage gain\n", + "print \"Part (a) : The voltage gain = %0.1f\" %Ad\n", + "Rin= 2*beta_ac*re_desh # differential input resistance in \u03a9\n", + "Rin=Rin*10**-3 # in k\u03a9\n", + "print \"Part (b) : The differential input resistance = %0.2f k\u03a9\" %Rin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (c) : The Q-point values : \n", + "The value of ICQ = 1.148 mA\n", + "The value of VCEQ = 5.32 V\n", + "Part (a) : The voltage gain = 207.5\n", + "Part (b) : The differential input resistance = 4.53 k\u03a9\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.14 - Page No 34\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CC=12 # in volt\n", + "V_BE=0.7 # in volt\n", + "R1= 25 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "# I=I_REF= (V_CC-V_BE)/R1\n", + "I= (V_CC-V_BE)/R1 # in amp\n", + "print \"Mirrored current = %0.3f mA\" %(I*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mirrored current = 0.452 mA\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.15 - Page No 34\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VCC= 10 # in V\n", + "VBE= 0.7 # in V\n", + "R1= 15 # in k\u03a9\n", + "Beta= 100 \n", + "I_REF= (VCC-VBE)/R1 #reference current in mA\n", + "print \"The reference current = %0.2f mA\" %I_REF\n", + "Iout= I_REF*Beta/(Beta+2) # output current in mA\n", + "print \"The output current = %0.3f mA\" %Iout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reference current = 0.62 mA\n", + "The output current = 0.608 mA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.16 - Page No 34\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VCC= 15 # in V\n", + "VBE= 0.7 # in V\n", + "R1= 2.2 # in k\u03a9\n", + "Beta= 220 \n", + "I_REF= (VCC-VBE)/R1 #reference current in mA\n", + "# Formula : I= IC= I_REF*(Beta/(Beta+2))\n", + "IC= I_REF*Beta/(Beta+2) # in mA\n", + "print \"The value of current = %0.2f mA\" %IC" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of current = 6.44 mA\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.17 - Page No 35\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vz= 1.8 # in V\n", + "VBE= 0.7 # in V\n", + "RE= 1 # in k\u03a9\n", + "Beta= 180 \n", + "VB= Vz-VBE # in V\n", + "IE= VB/RE #emitter current in mA\n", + "# Formula : I= IC= IE*(Beta/(Beta+1))\n", + "IC= IE*Beta/(Beta+1) # in mA\n", + "print \"The value of current = %0.3f mA\" %IC" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of current = 1.094 mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.18 - Page No 35\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "VCC= 9 # in V\n", + "R1= 12 # in k\u03a9\n", + "VBE= 0.7 # in V\n", + "Beta= 100 \n", + "I_REF= (VCC-2*VBE)/R1 #reference current in mA\n", + "print \"The reference current = %0.4f mA\" %I_REF\n", + "Iout= I_REF/(1+2/(Beta*(1+Beta))) #output current in mA\n", + "print \"The output current = %0.4f mA\" %Iout\n", + "IC2= Iout #collector current in mA\n", + "print \"The collector current = %0.4f mA\" %IC2\n", + "# IB3= I_REF-IC1= I_REF-IC2 (since IC1= IC2)\n", + "IB3= I_REF-IC2 #base current of transistor Q3 in mA\n", + "IB3= IB3*10**3 # in \u00b5A\n", + "print \"The base current of transistor Q3 = %0.1f \u00b5A\" %IB3\n", + "IB3= 0.1 # in \u00b5A\n", + "IE3= (1+Beta)*IB3 # emitter current of transistor Q3 in \u00b5A\n", + "print \"The emitter current of transistor Q3 = %0.1f \u00b5A\" %IE3\n", + "IB1= IE3/2 #base current in \u00b5A\n", + "IB2= IB1 # in \u00b5A\n", + "print \"The base current = %0.2f \u00b5A\" %IB1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reference current = 0.6333 mA\n", + "The output current = 0.6332 mA\n", + "The collector current = 0.6332 mA\n", + "The base current of transistor Q3 = 0.1 \u00b5A\n", + "The emitter current of transistor Q3 = 10.1 \u00b5A\n", + "The base current = 5.05 \u00b5A\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.19 - Page No 36\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_BE=0.715 # in volt\n", + "V_CC=9 # in volt\n", + "Bita_dc=100 \n", + "Bita_ac= Bita_dc \n", + "V_EE= 10 # in volt\n", + "R=5.6 # in k ohm\n", + "R= R*10**3 # in ohm\n", + "I_REF= (V_EE-V_BE)/R # in amp\n", + "# From 2*I_B + I_C1 -I_REF =0\n", + "I_C1= I_REF*Bita_dc/(2+Bita_dc) # in amp\n", + "# By symmetry\n", + "I_C2= I_C1 \n", + "I_C3= I_C2 \n", + "I=3*I_C1 # current through R_C in amp\n", + "print \"Current through R_C = %0.2f mA\" %(I*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current through R_C = 4.88 mA\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.20 - Page No 36\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_BE=0.7 # in volt\n", + "V_CC=5 # in volt\n", + "V_EE=-5 # in volt\n", + "Bita=100 \n", + "R=18.6 # in k ohm\n", + "R= R*10**3 # in ohm\n", + "I2= (V_CC-V_BE-V_EE)/R # in amp\n", + "I_C3=I2 \n", + "I_E= I_C3/2 # in amp\n", + "re_desh= (26*10**-3)/I_E # in ohm\n", + "re1_desh=re_desh \n", + "re2_desh=re1_desh \n", + "R_in1= 2*Bita*re_desh # in ohm\n", + "R_in2= R_in1\n", + "print \"Differential input resistance = %0.1f k ohm\" %(R_in1*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential input resistance = 20.8 k ohm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 1.21 - Page No 44\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_BE=0.7 # in volt\n", + "V_CC=18 # in volt\n", + "R_E=1.1 # in k ohm\n", + "R_C=1.8 # in k ohm\n", + "R_C=R_C*10**3 # in ohm\n", + "R1=4.7 # in k ohm\n", + "R2=5.6 # in k ohm\n", + "R3=6.8 # in k ohm\n", + "I_E1= (V_CC*R1/(R1+R2+R3)-V_BE)/R_E # in mA\n", + "re_desh= 26/I_E1 # in ohm\n", + "re2_desh=re_desh\n", + "Av= -R_C/re2_desh \n", + "print \"Voltage gain of the cascode amplifier = %0.1f\" %Av\n", + "\n", + "\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage gain of the cascode amplifier = -267.3\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb new file mode 100644 index 00000000..fe244fef --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter02.ipynb @@ -0,0 +1,432 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter- 2 : Introduction To Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.2 - Page No 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vin1= 5 # in \u00b5V\n", + "Vin1= Vin1*10**-6 # in V\n", + "Vin2= -7 #in \u00b5V\n", + "Vin2= Vin2*10**-6 # in V\n", + "Av= 2*10**5 # unit less\n", + "Rin= 2 # in M\u03a9\n", + "Vout= (Vin1-Vin2)*Av # in V\n", + "print \"The output voltage = %0.1f volts\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 2.4 volts\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.4 - Page No 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rs= 2 # in k\u03a9\n", + "RL= 5 # in k\u03a9\n", + "A= 10**5 # unit less\n", + "Rin= 100 #in k\u03a9\n", + "Rout= 50 # in \u03a9\n", + "Vout= 10 # in V\n", + "# For Vout = 10 V, V1= V2 = Vout\n", + "V1= Vout # in V\n", + "V2= V1 # in V\n", + "# From equation V1= Vs*Rin/(Rin+Rs)\n", + "Vs= V1*(Rin+Rs)/Rin # in V\n", + "Vout_by_Vs= Vout/Vs # value of Vout/Vs\n", + "print \"The value of Vs =%0.1f volts\" %Vs\n", + "print \"The value of Vout/Vs = %0.2f\" %Vout_by_Vs\n", + "print \"The input resistance of the circuit = %0.f k\u03a9\" %Rin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vs =10.2 volts\n", + "The value of Vout/Vs = 0.98\n", + "The input resistance of the circuit = 100 k\u03a9\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.6 - Page No 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "Ad= 100 # differential mode gain\n", + "Acm= 0.01 # common mode gain\n", + "CMRR= Ad/Acm \n", + "CMRR_desh= 20*math.log(CMRR,10) # CMRR in dB\n", + "print \"CMRR = %0.f dB\" %CMRR_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CMRR = 80 dB\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.7 - Page No 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Ad= 10**5 # differential mode gain\n", + "CMRR= 10**5 \n", + "# Common-mode gain,\n", + "Acm= Ad/CMRR \n", + "print \"The common-mode gain = %0.f\" %Acm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The common-mode gain = 1\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.8 - Page No 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1= 10 # in mV\n", + "V2= 9 # in mV\n", + "Ad= 60 # differential voltage gain in dB\n", + "Ad= 10**(Ad/20) \n", + "CMRR= 80 # in dB\n", + "CMRR= 10**(CMRR/20) \n", + "Vd= V1-V2 # difference signal in mV\n", + "Vcm= (V1+V2)/2 # common-mode signal in mV\n", + "# Output voltage,\n", + "Vout= Ad*Vd*(1+1/CMRR*Vcm/Vd) # in mV\n", + "AdVd= Ad*Vd # in mV\n", + "# Error voltage\n", + "Verror= Vout-AdVd # in mV\n", + "Per_error= Verror/Vout*100 # percentage error\n", + "print \"The error voltage = %0.2f mV\" %Verror\n", + "print \"The percentage error in the output voltage = %0.3f \" %Per_error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The error voltage = 0.95 mV\n", + "The percentage error in the output voltage = 0.095 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.9 - Page No 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1= 745 # in \u00b5V\n", + "V2= 740 # in \u00b5V\n", + "Ad= 5*10**5 # differential voltage gain\n", + "CMRR= 80 # in dB\n", + "CMRR= 10**(CMRR/20) \n", + "Vd= V1-V2 # difference signal in \u00b5V\n", + "Vcm= (V1+V2)/2 # common-mode signal in \u00b5V\n", + "# Output voltage,\n", + "Vout= Ad*Vd*(1+1/CMRR*Vcm/Vd) # in \u00b5V\n", + "AdVd= Ad*Vd # in \u00b5V\n", + "# Error voltage\n", + "Verror= Vout-AdVd # in \u00b5V\n", + "Vout= Vout*10**-6 # in V\n", + "Verror= Verror*10**-6 # in V\n", + "Per_error= Verror/Vout*100 # percentage error\n", + "print \"The output voltage = %0.6f V\" %Vout\n", + "print \"The percentage error in the output voltage= %0.4f\" %Per_error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = 2.537125 V\n", + "The percentage error in the output voltage= 1.4633\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.10 - Page No 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vd= 25 #differential input voltage in \u00b5V\n", + "Vd= Vd*10**-6 # in V\n", + "A= 200000 # open loop gain\n", + "# Output voltage,\n", + "Vout= A*Vd # in V\n", + "print \"The output voltage = \u00b1 %0.f \" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage = \u00b1 5 \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.11 - Page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "dVout= 20 # change in output voltage in V\n", + "dt= 4 # change in time in \u00b5s\n", + "SR= dVout/dt # slew rate in V/\u00b5s\n", + "print \"The slew rate = %0.f V/\u00b5s\" %SR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The slew rate = 5 V/\u00b5s\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.12 - Page No 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "IB1= 10 # in \u00b5A\n", + "IB2= 7.5 # in \u00b5A\n", + "# Input bias current,\n", + "I_in_bias= (IB1+IB2)/2 # in \u00b5A\n", + "# Input offset current,\n", + "I_in_offset= IB1-IB2 # in \u00b5A\n", + "print \"The input bias current = %0.2f \u00b5A\" %I_in_bias\n", + "print \"The input offset current = %0.1f \u00b5A\" %I_in_offset" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input bias current = 8.75 \u00b5A\n", + "The input offset current = 2.5 \u00b5A\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.13 - Page No 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "SR= 6 # slew rate in V/\u00b5s\n", + "SR= 6*10**6 # in V/s\n", + "\n", + "# Part (i) For Vmax= 1V\n", + "Vmax= 1 # in V\n", + "fmax= SR/(2*pi*Vmax) # limiting frequency in Hz\n", + "fmax= fmax*10**-6 # in MHz\n", + "print \"Part (i) : The limiting frequency for maximum voltage of 1V = %0.3f MHz\" %fmax\n", + "\n", + "# Part (ii) For Vmax= 10V\n", + "Vmax= 10 # in V\n", + "fmax= SR/(2*pi*Vmax) # limiting frequency in Hz\n", + "fmax= fmax*10**-3 # in kHz\n", + "print \"Part (ii) : The limiting frequency for maximum voltage of 10V = %0.1f kHz\"%fmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : The limiting frequency for maximum voltage of 1V = 0.955 MHz\n", + "Part (ii) : The limiting frequency for maximum voltage of 10V = 95.5 kHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 2.14 - Page No 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vpp= 3 # output voltage in V\n", + "del_t= 4 # in \u00b5s\n", + "del_V= 90*Vpp/100-10*Vpp/100 # in V\n", + "# Required slew rate,\n", + "SR= del_V/del_t # in V/\u00b5s\n", + "print \"The required slew rate = %0.1f V/\u00b5s\" %SR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required slew rate = 0.6 V/\u00b5s\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb new file mode 100644 index 00000000..06ace2b9 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter03.ipynb @@ -0,0 +1,786 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-3 : Negative Feedback In Op-Amps" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.1 - Page No 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Af= 10 # voltage gain\n", + "R1= 3 # in \u03a9\n", + "Rf= (Af-1)*R1 # From Af= 1+Rf/R1\n", + "print \"The value of R1 = %d \u03a9\" %R1\n", + "print \"The value of Rf = %d \u03a9\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 3 \u03a9\n", + "The value of Rf = 27 \u03a9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.2 - Page No 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 2 # in k\u03a9\n", + "Rf_min= 0 \n", + "Rf_max= 100 # in k\u03a9\n", + "# Formula Used : Af= 1+Rf/R1\n", + "Af_max= 1+Rf_max/R1 # maximum closed loop voltage gain\n", + "Af_min= 1+Rf_min/R1 # minimum closed loop voltage gain\n", + "print \"The maximum closed loop voltage gain = %d\" %Af_max\n", + "print \"The minimum closed loop voltage gain = %d\" %Af_min" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum closed loop voltage gain = 51\n", + "The minimum closed loop voltage gain = 1\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.3 - Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1= 100 # in \u03a9\n", + "Rf= 100*10**3 # in \u03a9\n", + "A= 2*10**5 #unit less\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "f0= 5 # in Hz\n", + "B= R1/(R1+Rf) # feedback fraction\n", + "AB= A*B # feedback factor\n", + "Af= 1+Rf/R1 # voltage gain\n", + "Rin_f= Rin*(1+AB) # input resistance in \u03a9\n", + "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", + "f_f= f0*(1+AB) # bandwidth in Hz\n", + "Rin_f= Rin_f*10**-6 # in M\u03a9\n", + "print \"The voltage gain is = %d\" %Af\n", + "print \"The input resistance = %0.1f M\u03a9\" %Rin_f\n", + "print \"The output resistance = %0.4f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.f Hz\" %f_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain is = 1001\n", + "The input resistance = 401.6 M\u03a9\n", + "The output resistance = 0.3735 \u03a9\n", + "The bandwidth = 1004 Hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.4 - Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "R1=1 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "R_f=10 # in k ohm\n", + "R_f=R_f*10**3 # in ohm\n", + "A=200000 \n", + "OutputVoltageSwing= 13 # in volt\n", + "SupplyVoltage=15 # in volt\n", + "Ri= 2 # in M ohm\n", + "Ri=Ri*10**6 # in ohm\n", + "Ro= 75 # in ohm\n", + "fo= 5 # in Hz\n", + "B= R1/(R1+R_f) \n", + "AB = A*B \n", + "R_outf= Ro/(1+A*B) # in ohm\n", + "R_outf= R_outf*10**3 # in m ohm\n", + "print \"Output Resistance = %0.3f m ohm\" %R_outf\n", + "V_ooT= OutputVoltageSwing/(1+A*B) # in volt\n", + "V_ooT= V_ooT*10**3 # in mV\n", + "print \"Output offset voltage = \u00b1 %0.3f mV\" %V_ooT\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Resistance = 4.125 m ohm\n", + "Output offset voltage = \u00b1 0.715 mV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.5 - Page No 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "f0= 5 # in Hz\n", + "A= 2*10**5 #unit less\n", + "B=1 # for voltage follower\n", + "Rf= 0 \n", + "Af= 1 # voltage gain (since Rf=0)\n", + "Rin_f= A*Rin # input resistance in \u03a9\n", + "Rin_f= Rin_f*10**-9 # in G\u03a9\n", + "Rout_f= Rout/A #output resistance in \u03a9\n", + "f_f= f0*A # bandwidth in Hz\n", + "f_f= f_f*10**-6 # in MHz\n", + "print \"The voltage gain = %d\" %Af \n", + "print \"The input resistance = %0.f G\u03a9\" %Rin_f\n", + "print \"The output resistance = %0.6f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.f MHz\" %f_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = 1\n", + "The input resistance = 400 G\u03a9\n", + "The output resistance = 0.000375 \u03a9\n", + "The bandwidth = 1 MHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 - Page No 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "f0= 5 # in Hz\n", + "R1= 330 #in \u03a9\n", + "Rf= 3.3*10**3 # in \u03a9\n", + "A= 2*10**5 #unit less\n", + "B= R1/(R1+Rf) # feedback fraction\n", + "AB= A*B # feedback factor\n", + "Af= -Rf/R1 # colsed-loop voltage gain\n", + "Rin_f= R1 # input resistance with feedback in \u03a9\n", + "Rout_f=Rout/(1+AB) # output resistance with feedback in \u03a9\n", + "f_f= f0*(1+AB) # closed-loop bandwidth in Hz\n", + "f_f= f_f*10**-3 # in kHz\n", + "print \"The closed-loop voltage gain = %0.f\" %Af \n", + "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", + "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.2f kHz\" %f_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closed-loop voltage gain = -10\n", + "The input resistance = 330 \u03a9\n", + "The output resistance = 0.00412 \u03a9\n", + "The bandwidth = 90.91 kHz\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.7 - Page No 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "f0= 5 # in Hz\n", + "A= 2*10**5 #unit less\n", + "B= 1/2 # feedback fraction (since R1=Rf)\n", + "Af= -1 # voltage gain\n", + "R1= 330 #in \u03a9 (assume)\n", + "Rin_f= R1 # input resistance with feedback in \u03a9\n", + "Rout_f= Rout/(A/2) # output resistance in \u03a9\n", + "f_f= A/2*f0 # in Hz\n", + "f_f= f_f*10**-6 # in MHz\n", + "print \"The closed-loop voltage gain = %0.f\" %Af\n", + "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", + "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.1f MHz\" %f_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closed-loop voltage gain = -1\n", + "The input resistance = 330 \u03a9\n", + "The output resistance = 0.00075 \u03a9\n", + "The bandwidth = 0.5 MHz\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.8 - Page No 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "f0= 5 # in Hz\n", + "A= 200000 #unit less\n", + "VCC= 15 # in V\n", + "VEE= -15 # in V\n", + "Vout_swing= 13 # in V\n", + "# Part (i) : Non-inverting Amplifier\n", + "R1= 1*10**3 # in \u03a9\n", + "Rf= 10*10**3 #in \u03a9\n", + "B= R1/(R1+Rf) # feedback fraction\n", + "AB= A*B # feedback factor\n", + "Af= 1+Rf/R1 # voltage gain\n", + "Rin_f= Rin*(1+AB) # input resistance in \u03a9\n", + "Rin_f=Rin_f*10**-9 # in G\u03a9\n", + "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", + "f_f= f0*(1+AB) # bandwidth in Hz\n", + "f_f=f_f*10**-3 # in kHz\n", + "VooT= Vout_swing/(1+AB) #in V\n", + "VooT= VooT*10**3 # in mV\n", + "print \"Part (i) : Non-inverting Amplifier :- \" \n", + "print \"The closed-loop voltage gain = %0.f \" %Af\n", + "print \"The input resistance = %0.4f G\u03a9\" %Rin_f\n", + "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.2f kHz\" %f_f\n", + "print \"The output offset voltage with feedback = \u00b1 %0.3f mV\" %VooT\n", + "\n", + "# Part (ii) : Inverting Amplifier\n", + "R1= 470 # in \u03a9\n", + "Rf= 4.7*10**3 #in \u03a9\n", + "B= R1/(R1+Rf) # feedback fraction\n", + "AB= A*B # feedback factor\n", + "Af= -Rf/R1 # voltage gain\n", + "Rin_f= R1 # input resistance in \u03a9\n", + "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", + "f_f= f0*(1+AB) # bandwidth in Hz\n", + "f_f=f_f*10**-3 # in kHz\n", + "VooT= Vout_swing/(1+AB) #in V\n", + "VooT= VooT*10**3 # in mV\n", + "print \"\\nPart (ii) : Inverting Amplifier :- \" \n", + "print \"The closed-loop voltage gain = %0.f \" %Af\n", + "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", + "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", + "print \"The bandwidth = %0.2f kHz\" %f_f\n", + "print \"The output offset voltage with feedback = \u00b1 %0.3f mV\" %VooT" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : Non-inverting Amplifier :- \n", + "The closed-loop voltage gain = 11 \n", + "The input resistance = 36.3656 G\u03a9\n", + "The output resistance = 0.00412 \u03a9\n", + "The bandwidth = 90.91 kHz\n", + "The output offset voltage with feedback = \u00b1 0.715 mV\n", + "\n", + "Part (ii) : Inverting Amplifier :- \n", + "The closed-loop voltage gain = -10 \n", + "The input resistance = 470 \u03a9\n", + "The output resistance = 0.00412 \u03a9\n", + "The bandwidth = 90.91 kHz\n", + "The output offset voltage with feedback = \u00b1 0.715 mV\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.9 - Page No 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf= 500*10**3 # in \u03a9\n", + "R1= 5*10**3 #in \u03a9\n", + "Vin= 0.1 # input voltage in V\n", + "Af= -Rf/R1 # voltage gain\n", + "Rin= R1 # input resistance in \u03a9\n", + "Rin= Rin*10**-3 # in k\u03a9\n", + "Rout= 0 # in \u03a9\n", + "Vout= Af*Vin # output voltage in V\n", + "I_in= Vin/R1 # input current in A\n", + "I_in= I_in*10**3 # in mA\n", + "print \"The amplifier circuit voltage gain = %0.f\" %Af\n", + "print \"The amplifier circuit input resistance = %0.f k\u03a9\" %Rin\n", + "print \"The amplifier circuit output resistance %0.f \u03a9\" %Rout\n", + "print \"The output voltage = %0.f V\" %Vout\n", + "print \"The input current = %0.2f mA\" %I_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplifier circuit voltage gain = -100\n", + "The amplifier circuit input resistance = 5 k\u03a9\n", + "The amplifier circuit output resistance 0 \u03a9\n", + "The output voltage = -10 V\n", + "The input current = 0.02 mA\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.10 - Page No 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rf= 1*10**6 # in \u03a9\n", + "Rin= 1*10**6 # in \u03a9\n", + "Vout_by_Vin= -Rf/Rin # (since Vout= -Rf/Rin*Vin)\n", + "Av= Vout_by_Vin # voltage gain\n", + "print \"The voltage gain = %0.f\" %Av\n", + "# I_in= Iout (As it is a unity gain inverter)\n", + "Ain= 1 #input impedance (since I_in= Iout)\n", + "print \"The input impedance = %0.f\" %Ain\n", + "Ap= abs(Av*Ain) # power gain\n", + "print \"The power gain = %0.f\" %Ap" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -1\n", + "The input impedance = 1\n", + "The power gain = 1\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.11 - Page No 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= -30 # voltage gain\n", + "Rf= 1*10**6 # in \u03a9\n", + "#Since, Av= Vo/Vi=-Rf/R1, so\n", + "R1= -Rf/Av # in \u03a9\n", + "R1= R1*10**-3 # in k\u03a9\n", + "Rf= Rf*10**-6 # in M\u03a9\n", + "print \"The value of Rf = %0.f M\u03a9\" %Rf\n", + "print \"The value of R1 = %0.f k\u03a9\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rf = 1 M\u03a9\n", + "The value of R1 = 33 k\u03a9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.12 - Page No 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Av= -8 # voltage gain\n", + "Vi= 1 # input voltage in V\n", + "I1= 15 #maximum current in \u00b5A\n", + "I1= I1*10**-6 # in A\n", + "R1= Vi/I1 # in \u03a9\n", + "R1= R1*10**-3 # in k\u03a9\n", + "print \"The value of R1 = %0.2f k\u03a9 (Standard value 68 k\u03a9)\" %R1\n", + "R1= 68 # in k\u03a9\n", + "Rf= -Av*R1 # in k\u03a9\n", + "print \"The value of Rf = %0.f k\u03a9\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 66.67 k\u03a9 (Standard value 68 k\u03a9)\n", + "The value of Rf = 544 k\u03a9\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.15 - Page No 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 20*10**3 # in \u03a9\n", + "R1= 10*10**3 # in \u03a9\n", + "\n", + "#Part (i) When switch S is off,\n", + "Aoff_non_inv= 1+Rf/R1 # non-inverting amplifier circuit gain\n", + "Aoff_inv= -Rf/R1 # inverting amplifier gain\n", + "Aoff= Aoff_non_inv+Aoff_inv # amplifier circuit gain\n", + "print \"Part (i) : When switch S is off, the gain of the amplifier circuit = %0.f\" %Aoff\n", + "\n", + "# Part (ii) When switch S is on,\n", + "Aon= -Rf/R1 # amplifier circuit gain\n", + "print \"Part (ii) : When switch S is on, the gain of the amplifer circuit = %0.f\" %Aon" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : When switch S is off, the gain of the amplifier circuit = 1\n", + "Part (ii) : When switch S is on, the gain of the amplifer circuit = -2\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.18 - Page No 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 1*10**3 # in \u03a9\n", + "R2= 1*10**3 # in \u03a9\n", + "Rf= 10*10**3 # in \u03a9\n", + "R3= 10*10**3 # in \u03a9\n", + "Vd= 5 # in mV\n", + "Vcm= 2 # in mV\n", + "CMRR_dB= 90 # in dB\n", + "CMRR= 10**(CMRR_dB/20) \n", + "Ad= Rf/R1 # differential voltage gain\n", + "# Part (i)\n", + "Vout= Ad*Vd # output voltage in mV\n", + "print \"Part (i) : The output voltage = %0.f mV\" %Vout\n", + "# Part (ii)\n", + "Acm= Ad/CMRR # common mode gain\n", + "AcmVcm= Acm*Vcm # magnitude of the induced 60Hz noise at the output in mV\n", + "AcmVcm= AcmVcm*10**3 # in \u00b5V\n", + "print \"The magnitude of the induced 60Hz noise at the output = %0.3f \u00b5V\" %AcmVcm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : The output voltage = 50 mV\n", + "The magnitude of the induced 60Hz noise at the output = 0.632 \u00b5V\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.19 - Page No 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 540 # in \u03a9\n", + "R3= 540 # in \u03a9\n", + "R2= 5.4*10**3 # in \u03a9\n", + "Rf= 5.4*10**3 # in \u03a9\n", + "Vin1= -2.5 # in V\n", + "Vin2= -3.5 #in V\n", + "Rin= 2*10**6 #input impedance in \u03a9\n", + "A= 2*10**5 # open loop voltage gain\n", + "Ad= (1+Rf/R1) # voltage gain\n", + "print \"The voltage gain = %0.f\" %Ad\n", + "Vout=Ad*(Vin1-Vin2) # output voltage in V\n", + "print \"The output voltage = %0.f V\" %Vout\n", + "Rin_f1= Rin*(1+A*R1/(R1+Rf)) # in \u03a9\n", + "Rin_f2= Rin*(1+A*R2/(R1+Rf)) # in \u03a9\n", + "print \"The value of Rin_f1 = %0.3e \u03a9\" %Rin_f1\n", + "print \"The value of Rin_f2 = %0.3e \u03a9\" %Rin_f2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = 11\n", + "The output voltage = 11 V\n", + "The value of Rin_f1 = 3.637e+10 \u03a9\n", + "The value of Rin_f2 = 3.636e+11 \u03a9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.20 - Page No 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vin= 100*10**-3 # in V\n", + "Vout= 4.25 # in V\n", + "R1= 100 # in \u03a9\n", + "# Formula Used : Vout= (1+2*Rf/Rf)*Vin\n", + "Rf= (Vout/Vin-1)*R1/2 # in \u03a9\n", + "Rf= Rf*10**-3 # in k\u03a9\n", + "print \"The value of R1 = %0.f \u03a9\" %R1\n", + "print \"The value of Rf = %0.1f k\u03a9 (Standard value 2.2 k\u03a9)\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 100 \u03a9\n", + "The value of Rf = 2.1 k\u03a9 (Standard value 2.2 k\u03a9)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 3.21- Page No 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 3.3 # in k\u03a9\n", + "R2= 3.3 # in k\u03a9\n", + "R3= 1.2 # in k\u03a9\n", + "R4= 1.2 # in k\u03a9\n", + "Rf= 3.9 # in k\u03a9\n", + "R5= 3.9 # in k\u03a9\n", + "Rp= 2.5 # in k\u03a9\n", + "A= 2*10**5 # unit less\n", + "f0= 5 # in Hz\n", + "Rin= 2*10**6 # in \u03a9\n", + "Rout= 75 # in \u03a9\n", + "Ad= -(1+2*R1/Rp)*Rf/R3 # voltage gain\n", + "print \"The voltage gain = %0.2f\" %Ad\n", + "Rinf= Rin*(1+A*(R1+Rp)/(2*R1+Rp)) #input resistance in \u03a9\n", + "Rinf= Rinf*10**-9 # in G\u03a9\n", + "print \"The input resistance = %0.3f G\u03a9\" %Rinf\n", + "Routf= Rout/abs(1+A/Ad) # output resistance in \u03a9\n", + "print \"The output resistance = %0.6f \u03a9\" %Routf\n", + "f_f= A*f0/abs(Ad) # bandwidth in Hz\n", + "f_f= f_f*10**-3 # in kHz\n", + "print \"The bandwidth = %0.2f kHz\" %f_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = -11.83\n", + "The input resistance = 254.947 G\u03a9\n", + "The output resistance = 0.004437 \u03a9\n", + "The bandwidth = 84.53 kHz\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb new file mode 100644 index 00000000..75a2b6a6 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04.ipynb @@ -0,0 +1,227 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-4 : Frequency Response Of An Op-Amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.1 - Page No 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vin= 0.5 # in V\n", + "Av= 10 \n", + "I_B_max= 1.5 # in micro amp\n", + "I_B_max=I_B_max*10**-6 # in A\n", + "# Let\n", + "I1=100*I_B_max # in A\n", + "R1= Vin/I1 # in ohm\n", + "Rf= Av*R1 # in ohm\n", + "# R2= R1 || Rf = R1 (approx.)\n", + "R2= R1 # in ohm\n", + "print \"Value of I1 = %0.f micro amp\" %(I1*10**6)\n", + "print \"Value of R1 = %0.1f kohm\" %(R1*10**-3)\n", + "print \"Value of R2 = %0.1f kohm\" %(R2*10**-3)\n", + "print \"Value of Rf = %0.f kohm\" %(Rf*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of I1 = 150 micro amp\n", + "Value of R1 = 3.3 kohm\n", + "Value of R2 = 3.3 kohm\n", + "Value of Rf = 33 kohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.2 - Page No 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "# Given data\n", + "Vin= 50 # in mV\n", + "Vin = Vin*10**-3 # in V\n", + "I_B_max= 200 # in nA\n", + "I_B_max=I_B_max*10**-9 # in A\n", + "I1=100*I_B_max # in A(assumed)\n", + "Av=100 \n", + "R1= Vin/I1 # in \u03a9\n", + "print \"The value of R1 = %0.1f k\u03a9 (Standard value 2.2 k\u03a9)\" %(R1*10**-3)\n", + "R1= 2.2 # kohm (standard value)\n", + "Rf= Av*R1 # in kohm\n", + "print \"The value of Rf = %0.f k\u03a9\" %Rf\n", + "# R2 = R1 || Rf = R1 (approx)\n", + "R2= R1 # in kohm\n", + "print \"The value of R2 = %0.1f k\u03a9\" %R2\n", + "Av= 20*log10(Av) # in dB\n", + "C1= 100 # in pF\n", + "R1= 1.5 # in k\u03a9\n", + "C2= 3 # in pF\n", + "print \"Voltage gain = %0.f dB\" %Av\n", + "print \"Value of C1 = %0.f pF\" %C1\n", + "print \"Value of C2 = %0.f pF\" %C2\n", + "print \"Value of R1 = %0.1f k\u03a9\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 2.5 k\u03a9 (Standard value 2.2 k\u03a9)\n", + "The value of Rf = 220 k\u03a9\n", + "The value of R2 = 2.2 k\u03a9\n", + "Voltage gain = 40 dB\n", + "Value of C1 = 100 pF\n", + "Value of C2 = 3 pF\n", + "Value of R1 = 1.5 k\u03a9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.3 - Page No 136\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A_VD= 200 # in V/mV\n", + "A_VD=A_VD*10**3 # in V/V\n", + "B1=1 # in MHz\n", + "B1=B1*10**6 # in Hz\n", + "f1=B1 \n", + "f0= f1/A_VD # in Hz\n", + "print \"Cut-off frequency = %0.f Hz\" %f0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cut-off frequency = 5 Hz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.4 - Page No 143\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "Vin= 15 # in volt\n", + "SR= 0.8 # in V/micro sec\n", + "SR=SR*10**6 # in V/sec\n", + "omega= SR/Vin \n", + "f= omega/(2*pi) # in Hz\n", + "print \"Full power bandwidth = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Full power bandwidth = 8.5 kHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 4.5 - Page No 143\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "SR= 2 # in V/micro sec\n", + "del_v_in= 0.5 # in volt\n", + "del_t=10 #in micro sec\n", + "del_v_inBYdel_t= del_v_in/del_t # in V/micro sec\n", + "# v_out= A_CL*v_in\n", + "A_CL= SR/del_v_inBYdel_t \n", + "print \"Closed-loop gain = %0.f \" %A_CL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Closed-loop gain = 40 \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb new file mode 100644 index 00000000..6aae196e --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter05.ipynb @@ -0,0 +1,498 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-5 : General Applications Of Op-Amps" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 - Page 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "import math\n", + "# Given data\n", + "fo= 15 # in kHz\n", + "fo= fo*10**3 # in Hz\n", + "C=0.01 # in micro F\n", + "C=C*10**-6 # in F\n", + "L= 1/(4*pi**2*fo**2*C) # in H\n", + "L=math.ceil(L*10**3) # in mH\n", + "# Let L be of 12 mH and internal resistance 30 ohm\n", + "R=30 # internal resistance in ohm\n", + "XL= 2*pi*L*10**-3*fo \n", + "Q= XL/R \n", + "R_P= Q**2*R # in ohm\n", + "# If\n", + "R1=100 # in ohm\n", + "# Formula L= R_f*R_P/(R1*(R_f+R_P)) \n", + "R_f= R1*L*R_P/(R_P-R1*L) # in ohm\n", + "R_f=R_f*10**3 # in kohm\n", + "R_f= 1.2 # in k ohm (Standard value)\n", + "print \"The values of component chosen are:-\" \n", + "print \"Value of L = %0.f mH\" %L\n", + "print \"Value of C = %0.2f micro F\" %(C*10**6)\n", + "print \"Value of R_f = %0.1f k ohm\" %R_f\n", + "print \"Value of R1 = %0.f ohm\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values of component chosen are:-\n", + "Value of L = 12 mH\n", + "Value of C = 0.01 micro F\n", + "Value of R_f = 1.2 k ohm\n", + "Value of R1 = 100 ohm\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 - Page 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Rf= 12 # in k ohm\n", + "Rs1= 12 # in k ohm\n", + "Rs2= 2 # in k ohm\n", + "Rs3= 3 # in k ohm\n", + "Vi1= 9 # in volt\n", + "Vi2= -3 # in volt\n", + "Vi3= -1 # in volt\n", + "Vout= -Rf*(Vi1/Rs1+Vi2/Rs2+Vi3/Rs3) # in volt\n", + "print \"Output voltage = %0.f volt\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 13 volt\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 - Page NO 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given expression Vout= -2*V1+3*V2+4*V3\n", + "# For an operational amplifier\n", + "# Vout= -Rf*[V1/R1+V2/R2+V3/R3]\n", + "# Compare the above expression with the given expression for the output\n", + "r_1=2 # value of Rf/R1\n", + "r_2=3 # value of Rf/R2\n", + "r_3=4 # value of Rf/R3\n", + "# Resistance R3 will be minimum value of 10 k ohm\n", + "R3=10 # in k ohm\n", + "Rf= r_3*R3 # in k ohm\n", + "R2= Rf/r_2 # in k ohm\n", + "R1= Rf/r_1 # in k ohm\n", + "print \"Value of Rf = %0.f k ohm\" %Rf\n", + "print \"Value of R2 = %0.2f k ohm\" %R2\n", + "print \"Value of R1 = %0.f k ohm\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rf = 40 k ohm\n", + "Value of R2 = 13.33 k ohm\n", + "Value of R1 = 20 k ohm\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.4 - Page No 159\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1= 2 # in volt\n", + "V2= -1 # in volt\n", + "# Let R1= (R||R)/(R+(R||R))= (R/2)/(R+R/2) = 1/3\n", + "R1=1/3 \n", + "Vs1= V1*R1 # in volt\n", + "# Let R2= (1+Rf/R)= (1+2*R/R)= 3\n", + "R2= 3 \n", + "Vo_desh= Vs1*R2 # in volt\n", + "Vs2= V2*R1 # in volt\n", + "Vo_doubleDesh= Vs2*R2 # in volt\n", + "V_out= Vo_desh+Vo_doubleDesh # in volt\n", + "print \"Output voltage = %0.f volt\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 1 volt\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.5 - Page No 160\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given expression Vout= 10*(V2-V1)\n", + "# For a differential amplifier circuit\n", + "# Vout= Rf/R*(V2-V1)\n", + "# Compare the above expression with the given expression for the output, we have\n", + "RfbyR= 10 \n", + "R=10 # minimum value of resistancce to be used in kohm\n", + "Rf= RfbyR * R # in k ohm\n", + "print \"Value of Rf = %0.f k ohm\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rf = 100 k ohm\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.7 - Page No 164\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "# Let us choose\n", + "R3= 15 # in k ohm\n", + "R4= R3 \n", + "# Ad= 1+2*R2/R1 (i)\n", + "# Ad= ((1+2*R2/R1)*(V2-V1))/(V2-V1)= 1+2*R2/R1\n", + "# For minimum differential voltage gain\n", + "Ad_min=5 \n", + "Ad= Ad_min \n", + "R1_max= R1 # since Ad will be minimum only when R1 will be maximum\n", + "# Putting values of Ad and R1 in eq(i)\n", + "R2= (Ad-1)*R1/2 # in k ohm\n", + "# For maximum differential voltage gain\n", + "Ad_max=200 \n", + "Ad= Ad_min \n", + "# Putting values of Ad and R2 in eq(i)\n", + "R1= 2*R2/(Ad_max-1) # in k ohm\n", + "R1=int(R1)\n", + "# For maximum value of Ad, R1 will have minimum value , therefore\n", + "R1_min= 1 # in kohm\n", + "print \"Value of R1_min = %0.f k ohm\" %R1_min\n", + "print \"Value of R1 = %0.f-50 k ohm potentiometer\" %R1\n", + "print \"Value of R2 = %0.f k ohm\" %R2\n", + "print \"Value of R3 = %0.f k ohm\" %R3\n", + "print \"Value of R4 = %0.f k ohm\" %R4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1_min = 1 k ohm\n", + "Value of R1 = 1-50 k ohm potentiometer\n", + "Value of R2 = 100 k ohm\n", + "Value of R3 = 15 k ohm\n", + "Value of R4 = 15 k ohm\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.10 - Page No 179\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vin= 10 # in volt\n", + "R=2.2 # in k ohm\n", + "R=R*10**3 #in ohm\n", + "Ad=10**5 # voltage gain\n", + "T= 1 # in ms\n", + "T=T*10**-3 # in second\n", + "C=1 # in micro F\n", + "C=C*10**-6 # in F\n", + "I= Vin/R # in volt\n", + "V= I*T/C # in V\n", + "print \"The output voltage at the end of the pulse = %0.3f volt\" %V\n", + "RC_desh= R*C*Ad \n", + "print \"The closed-loop time constant = %0.f second \" %RC_desh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output voltage at the end of the pulse = 4.545 volt\n", + "The closed-loop time constant = 220 second \n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.11 - Page No 180\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=0.01 # in micro F\n", + "C=C*10**-6 # in F\n", + "omega= 10000 # in rad/second\n", + "# Vout/V1= (Rf/R1)/(1+s*C*Rf)\n", + "# substituting s= j*omega we have\n", + "# Vout/V1 = (Rf/R1)/sqrt((omega*C*Rf)**2+1)\n", + "# At omega=0\n", + "# Vout/V1= Rf/R1\n", + "# Formula omega= 1/(C*Rf)\n", + "Rf= 1/(C*omega) # in ohm\n", + "Rf= Rf*10**-3 # in k ohm\n", + "# 20*log10(Rf/R1) = 20\n", + "R1= Rf/10 # in k ohm\n", + "print \"Value of Rf = %0.f k ohm\" %Rf\n", + "print \"Value of R1 = %0.f k ohm\" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rf = 10 k ohm\n", + "Value of R1 = 1 k ohm\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.12 Page No 180\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "#Given Data : \n", + "R=40*1000 #in ohm(assumed)\n", + "C=0.2*10**-6 #IN FARAD\n", + "Vout=3 #in Volt\n", + "V1=Vout #in Volt\n", + "V2=Vout #in Volt\n", + "plot([0,50],[3,-9.5]) \n", + "plt.title('Output voltage')\n", + "plt.xlabel('Time in milliseconds')\n", + "plt.ylabel('Output voltage in volts')\n", + "plt.axis([0, 60, -12, 5])\n", + "plt.show()\n", + "print \"Assuming Ideal op-amp, sketch for Vout is shown in figure.\" \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtclFX+B/DPIHgpQcsLIOCCV0BBEDVbXZ1CLBQt74qa\nS2W2lbtaYuSvEjNRNDI1rWw1k3a9LctqqCirjKWIKBdRoQwVF1FKFERE5HZ+f8zyLAgjt3nm+nm/\nXvN6zTwz8zzfU77myznn+Z6jEEIIEBER1cNC3wEQEZHhYpIgIiKNmCSIiEgjJgkiItKISYKIiDRi\nkiAiIo2YJIgMjLOzM44cOaLvMIgAMEmQkdi2bRs8PDzw+OOPw97eHm+88Qbu3LnT6O87Ozvj6NGj\nWotH2+erSaFQQKFQAABCQ0Mxe/ZsWa5D1BhMEmTwIiIiEBISgoiICBQVFSExMRFXr16Fn58fysvL\nG3UOhUIBbdaNavt8RAZLEBmwO3fuiPbt24s9e/bUOl5cXCy6dOkitm7dKoQQYs6cOeL999+X3o+P\njxeOjo5CCCFmzZolLCwsRLt27UT79u3FmjVrxJUrV4RCoRCbN28W3bp1E/b29uKTTz6Rvt/U8z3M\n1dVVxMTESK/Ly8tF586dRWpqqhBCiL179wp3d3fRsWNHoVQqRWZmpvRZZ2dnceTIEXHw4EHRunVr\nYWVlJdq3by+8vLyEEEJs3bpVuLm5CWtra9GjRw/x1Vdf1bp2eHi4sLe3Fw4ODuLrr78WCoVCXLp0\nSQghRGlpqXjnnXdE9+7dha2trXj99dfF/fv3G/u/g8wQexJk0BISElBaWoqJEyfWOv74449jzJgx\niIuLA1B7iOZhkZGR6N69O2JiYnD37l0sWrRIek+lUiErKwuHDx9GeHi4NBfQ3PNVCwwMxI4dO6TX\nhw4dQteuXeHl5YWLFy8iMDAQ69evR35+PsaMGYNx48ahoqKi1jmef/55LFmyBNOnT8fdu3eRmpoK\nALC1tcX+/ftRVFSEb775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PCrGR53/3LlzCA4OlnpFX3755SPjj4yMxLx58/Dh\nhx9Kn5swYQJOnjyJAQMGQKFQYM2aNejatSsyMzPrjaNNmzbYvHkzxo4di8ceewx/+MMfcO/ePQDA\nunXrEB8fDwsLC/Tv3x/+/v6PbAeZBy4VTkREGnG4iYiINGKSICIijZgkiIhIIyYJIiLSiEmCiIg0\nYpIgIiKNmCSIiEgjJgkiItLo/wEJUlJyDeG+CgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming Ideal op-amp, sketch for Vout is shown in figure.\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 5.14 - Page No 185\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "%matplotlib inline\n", + "from sympy import symbols, simplify, sin\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "# Given data\n", + "fa= 1 # in kHz\n", + "fa=fa*10**3 # in Hz\n", + "Vp=1.5 # in volt\n", + "f= 200 # in Hz\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 1/(2*np.pi*fa*C) # in ohm\n", + "R=R*10**-3 # in k ohm\n", + "R=np.floor(R*10)/10 # in k ohm\n", + "fb= 20*fa # in Hz\n", + "R_desh= 1/(2*np.pi*fb*C) # in ohm\n", + "# Let\n", + "R_desh= 82 # in ohm\n", + "R_OM= R # in k ohm\n", + "print \"Value of R_OM = %0.1f k ohm\" %R_OM\n", + "CR= C*R \n", + "# Vin= Vp*sin(omega*t)= 1.5*sin(400*t)\n", + "# v_out= -CR*diff(v_in) = -0.2827 Cos(400*pi*t)# in micro volt\n", + "print \"Output Voltage = -0.2827 Cos(400*pi*t)\" \n", + "t = np.arange(0, .015, 1.0/44100)\n", + "v_out=-0.2827*np.sin(400*np.pi*t+np.pi/2)# in micro volt\n", + "plot(t,v_out) \n", + "plt.title('Output Voltage Waveform')\n", + "plt.xlabel('Time in ms')\n", + "plt.ylabel('Vout in Volts') \n", + "print \"Output Voltage waveform is shown in figure.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R_OM = 1.5 k ohm\n", + "Output Voltage = -0.2827 Cos(400*pi*t)\n", + "Output Voltage waveform is shown in figure.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEZCAYAAACw69OmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXlYVVXb/7/nCCqKA6ghk6IMCoLgiEMKDqiUmmk5paE2\nvU0+T4Opv95KGzXzqcznLa0s0xyyTDSVHBFNEAcMFZxQFEENRXCWaf3+WJ4DCAcO5+x91j5735/r\n4tJz2GfvL2z2+q573WvdS8cYYyAIgiAIK9GLFkAQBEGoAzIUgiAIQhLIUAiCIAhJIEMhCIIgJIEM\nhSAIgpAEMhSCIAhCEshQCKIaJk2ahHfeeUe0DMXw119/wd/fH40aNcL69etFyyEUBhkKUWt+/PFH\nhISEoGHDhnB3d8dLL72EgoICsz/v4+ODHTt2SKanuvNlZ2fD0dERZ86cqfS9xx9/HNOmTav23Dqd\nDjqdDgAQHx8Pb29v6wVbwODBg/Hpp58aX2dnZ0Ov11f53j///CObjnfffRdTp07FjRs3MHz4cNmu\nQ9gnZChErZg/fz5mzJiB+fPn4/r160hKSsK5c+cQFRWFoqIis86h0+kg5Xra6s7n6emJAQMGYNmy\nZRXez8vLw+bNmzFp0qQaz6+Etb8RERFISEgwvk5ISED79u0rvRcQEICHHnpINh3nz59HUFCQRZ8t\nKSmRWA2hOBhBmElBQQFzdnZma9asqfD+zZs3WYsWLdiSJUsYY4zFxMSw//3f/zV+f+fOnczLy4sx\nxtiECROYXq9nTk5OzNnZmc2bN4+dPXuW6XQ6tnjxYubh4cHc3d3ZZ599Zvx8b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nePbZZ/HVV18BAD744ANs2bIFhw8fxoYNG+T7RRCEmSiqfD1BKAWdTofo6GjUqVMHwcHBKC0txeDB\ngwEAISEhyMzMxMmTJ3Hs2DEMHDgQAFBSUgIPD48az22o3tq5c2dkZmZWeUy3bt2M+4/4+fkZrx0c\nHIydO3cCAHr37o2YmBiMHj3aeE6CEAkZCkGYoG7dugAAvV5v3LHO8Lq4uBiMMXTo0AF79+6t1Xnr\n1asHAKhTp45x6MzUMYbrGV4brg3w3fSSk5OxceNGdOnSBQcPHoSrq2uttBCElNCQF0FUgTlzVdq1\na4fc3FwkJSUBAIqKipCWlmbx+WpLRkYGunfvjtmzZ6NFixZWb3dLENZCEQqhecrnN6r6f/ljyr92\ndHTEr7/+iqlTp6KgoADFxcV47bXXEBQUZPIa5rxf3Y6I5b/31ltv4dSpU2CMYeDAgZJtJ0sQlkLT\nhgmCIAhJoCEvgiAIQhLIUAiCIAhJIEMhCIIgJIEMhSAIgpAEMhSCIAhCEshQCIIgCEkgQyEIgiAk\ngQyFIAiCkIT/D1aoyBiLHf2sAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 65 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb new file mode 100644 index 00000000..4b5636a7 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter06.ipynb @@ -0,0 +1,618 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter- 6 : Active Filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.1 - Page No 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f_H= 2 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "C=0.01 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 1/(2*pi*f_H*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "# R may be taken a pot of 10 k ohm\n", + "R=10 # in k ohm\n", + "# Since the passbond gain is 2.5, so\n", + "# 1+Rf/R1= 2.5 or Rf= 1.5*R1\n", + "# Since Rf||R1\n", + "R1= R*2.5/1.5 # in k ohm\n", + "Rf= R1*1.5 # in k ohm\n", + "print \"Value of R1 = %0.2f k ohm (Standard value 18 k ohm)\" %R1\n", + "print \"Value of Rf = %0.f k ohm (Standard value 27 k ohm)\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 16.67 k ohm (Standard value 18 k ohm)\n", + "Value of Rf = 25 k ohm (Standard value 27 k ohm)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.2 - Page No 205\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "f_H= 2 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "C=0.033 # in micor F\n", + "C=C*10**-6 # in F\n", + "C_desh= C \n", + "R= 1/(2*pi*f_H*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R=2.7 # k ohm (Standard value)\n", + "R_desh= R \n", + "# So 2*R= Rf*R1/(Rf+R1) = 0.586*R1**2/(1.586*R1)\n", + "R1= 2*R*1.586/(0.586) # in k ohm\n", + "print \"The value of R1 = %0.1f k ohm (Standard value 15 k ohm) \" %R1\n", + "R1= 15 # k ohm (Standard value)\n", + "Rf= 0.586*R1 # in k ohm\n", + "print \"The value of Rf = %0.2f k ohm (Standard value 10 k ohm) \" % Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R1 = 14.6 k ohm (Standard value 15 k ohm) \n", + "The value of Rf = 8.79 k ohm (Standard value 10 k ohm) \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.3 - Page No 205 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "f_H= 1 # in kHz\n", + "f_H= f_H*10**3 # in Hz\n", + "C=0.0047 # in micro F\n", + "C=C*10**-6 # in F\n", + "C_desh= C \n", + "R= 1/(2*pi*f_H*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R=math.floor(R) \n", + "R_desh= R \n", + "R1=R # in k ohm\n", + "Rf= 0.586*R1 # in k ohm\n", + "Rf= math.ceil(Rf) # in k ohm\n", + "print \"Value of R' = R = %0.f k ohm\" %R\n", + "print \"Value of C' = C = %0.4f micro F\" %(C*10**6)\n", + "print \"Value of R1 = %0.f k ohm\" %R1\n", + "print \"Value of Rf = %0.1f k ohm\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R' = R = 33 k ohm\n", + "Value of C' = C = 0.0047 micro F\n", + "Value of R1 = 33 k ohm\n", + "Value of Rf = 20.0 k ohm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.4 - Page No 206\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f= 1 # in kHz\n", + "f= f*10**3 # in Hz\n", + "# Vout/Vin= 10\n", + "R1= 100 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "R2= 1000 # in k ohm\n", + "R2=R2*10**3 # in ohm\n", + "omega= 2*pi*f \n", + "# Vout/Vin at a 3 dB frequency of 1 kHz = 1/sqrt(2) = omega*R2*C/sqrt(1+omega**2*R1**2*C2)\n", + "C= math.sqrt(1/(omega**2*(2*R2**2-R1**2))) # in F\n", + "print \"Value of R1 = %0.f k ohm\" %(R1*10**-3)\n", + "print \"Value of R2 = %0.f k ohm\" %(R2*10**-6)\n", + "print \"Value of C = %0.4e F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 100 k ohm\n", + "Value of R2 = 1 k ohm\n", + "Value of C = 1.1282e-10 F\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.5 - Page No 207\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 2.1 # in k ohm\n", + "R=R*10**3 # in ohm\n", + "R1= 20 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "Rf= 60 # in k ohm\n", + "Rf=Rf*10**3 # in ohm\n", + "C=0.05 # in micro F\n", + "C=C*10**-6 # in F\n", + "fL= 1/(2*pi*R*C) # in Hz\n", + "print \"Low cut-off frequency = %0.3f kHz\" %(fL*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Low cut-off frequency = 1.516 kHz\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.6 - Page No 211\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in k ohm\n", + "R=R*10**3 # in ohm\n", + "R_desh= R # in ohm\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "C_desh=0.0025 # in micro F\n", + "C_desh=C_desh*10**-6 # in F\n", + "fH= 1/(2*pi*R_desh*C_desh) # in Hz\n", + "print \"Higher cut-off frequency = %0.3f kHz\"%(fH*10**-3)\n", + "fL= 1/(2*pi*R*C) # in Hz\n", + "print \"Lower cut-off frequency = %0.2f Hz\" %fL\n", + "BW= fH-fL \n", + "print \"Bandwidth = %0.1f kHz\" %(BW*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Higher cut-off frequency = 6.366 kHz\n", + "Lower cut-off frequency = 159.15 Hz\n", + "Bandwidth = 6.2 kHz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.7 - Page No 212\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "fc= 1 # in kHz\n", + "fc=fc*10**3 # in Hz\n", + "Q=5 \n", + "Af=8 \n", + "# Let C=C1=C2=0.01 # in micro F\n", + "C1= 0.01 # in micro F\n", + "C1=C1*10**-6 # in F\n", + "C2=C1 # in F\n", + "C=C2 # in F\n", + "R1= Q/(2*pi*fc*C*Af) # in ohm\n", + "R1=R1*10**-3 # in kohm\n", + "R1=math.ceil(R1) \n", + "R2= Q/(2*pi*fc*C*(2*Q**2-Af)) # in ohm\n", + "R2=R2*10**-3 # in kohm\n", + "R2=math.ceil(R2) \n", + "R3= Q/(pi*fc*C) # in ohm\n", + "R3=R3*10**-3 # in kohm\n", + "R3=math.ceil(R3) \n", + "# The value of R2_desh required to change the centre frequency from 1 kHz to 2 kHz is\n", + "f_desh_c= 2000 # in Hz\n", + "R2_desh= R2*(fc/f_desh_c)**2 # in kohm\n", + "print \"Value of R1 = %0.f kohm\" %R1\n", + "print \"Value of R2 = %0.f kohm\" %R2\n", + "print \"Value of R3 = %0.f kohm\" %R3\n", + "print \"Value of R2_desh = %0.f ohm\" %(R2_desh*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 10 kohm\n", + "Value of R2 = 2 kohm\n", + "Value of R3 = 160 kohm\n", + "Value of R2_desh = 500 ohm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.8 - Page No 212\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C= 0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R1= 2 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2= 2/3 # in kohm\n", + "R2=R2*10**3 # in ohm\n", + "R3= 200 # in kohm\n", + "R3=R3*10**3 # in ohm\n", + "# R1= Q/(2*pi*fc*C*Af) (i)\n", + "# R2= Q/(2*pi*fc*C*(2*Q**2-Af)) (ii)\n", + "# R3= Q/(pi*fc*C) (iii)\n", + "# From (i) and (iii)\n", + "Af= R3/(2*R1) \n", + "# From (ii) and (iii)\n", + "Q= math.sqrt(1/2*(R3/(2*R2)+Af)) \n", + "# From (iii)\n", + "fc= Q/(R3*pi*C) # in Hz\n", + "omega_o= 2*pi*fc # in radians/second\n", + "print \"The value of gain = %0.f\" %Af \n", + "print \"Value of Q = %0.f\" %Q\n", + "print \"Centre frequency = %0.f radians/second\" %omega_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of gain = 50\n", + "Value of Q = 10\n", + "Centre frequency = 1000 radians/second\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.9 - Page No 213\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "fL= 200 # in Hz\n", + "fH= 1 # in kHz\n", + "fH=fH*10**3 # in Hz\n", + "#Let the capacitor C_desh be of 0.01 micro F \n", + "C_desh= 0.01*10**-6 # in F\n", + "R_desh= 1/(2*pi*fH*C_desh) # in ohm\n", + "R_desh=R_desh*10**-3 # in kohm\n", + "R_desh= 18 # in kohm\n", + "# Let \n", + "C=0.05*10**-6 # in F\n", + "R= 1/(2*pi*fL*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R= 18 # in k ohm\n", + "Rf= 10 # in kohm\n", + "print \"Value of Rf' = Rf = R1' = R1 = %0.f kohm\" %Rf\n", + "print \"Value of R = R' = %0.f kohm\" %R\n", + "print \"Value of C'= %0.2f micro F\" %(C_desh*10**6)\n", + "print \"Value of C = %0.2f micro F\" %(C*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Rf' = Rf = R1' = R1 = 10 kohm\n", + "Value of R = R' = 18 kohm\n", + "Value of C'= 0.01 micro F\n", + "Value of C = 0.05 micro F\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.11 - Page No 214\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "fL= 200 # in Hz\n", + "fH= 1 # in kHz\n", + "fH=fH*10**3 # in Hz\n", + "fc= math.sqrt(fL*fH) # in Hz\n", + "Q= fc/(fH-fL) \n", + "print \"The value of Q for filter = %0.3f\" %Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Q for filter = 0.559\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.12 - Page No 216\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f_H= 200 # in Hz\n", + "f_L= 2*10**3 # in Hz\n", + "C= 0.05*10**-6 # in F\n", + "# For low-pass filter,\n", + "R_desh= 1/(2*pi*f_H*C) # in \u03a9\n", + "R_desh= R_desh*10**-3 # in k\u03a9\n", + "print \"The value of R' = %0.1f k\u03a9 (standard value 20 k\u03a9)\" %R_desh\n", + "# For high-pass filter,\n", + "R= 1/(2*pi*f_L*C) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "print \"The value of R = %0.2f k\u03a9 (standard value 1.8 k\u03a9)\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R' = 15.9 k\u03a9 (standard value 20 k\u03a9)\n", + "The value of R = 1.59 k\u03a9 (standard value 1.8 k\u03a9)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.13 - Page No 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "C= 0.068*10**-6 # in F\n", + "f_N= 50 # in Hz\n", + "R= 1/(2*pi*f_N*C) # in \u03a9\n", + "R= R*10**-3 # in k\u03a9\n", + "print \"The value of R = %0.1f k\u03a9 (standard value 47 k\u03a9)\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 46.8 k\u03a9 (standard value 47 k\u03a9)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.14 - Page No 218 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "fN= 60 # in Hz\n", + "# Let\n", + "C= 0.06 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 1/(2*pi*fN*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "print \"Value of R = %0.2f kohm (Standard value 47 kohm)\" %R\n", + "print \"For R/2, two 47 kohm resistors connected in parallel may be used and for 2C component, \"\n", + "print \"two parallel connected %0.2f micro F capacitors may be used\" %(C*10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R = 44.21 kohm (Standard value 47 kohm)\n", + "For R/2, two 47 kohm resistors connected in parallel may be used and for 2C component, \n", + "two parallel connected 0.06 micro F capacitors may be used\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 6.15 - Page No 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 15*10**3 # in \u03a9\n", + "C= 0.01*10**-6 # in F\n", + "f= 2*10**3 # in Hz\n", + "PhaseShift= -2*(math.atan(2*pi*f*R*C))*180/pi # in \u00b0\n", + "print \"The phase shift = %0.f\u00b0\" %PhaseShift\n", + "print \"i.e. %0.f\u00b0 (lagging)\" %abs(PhaseShift)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase shift = -124\u00b0\n", + "i.e. 124\u00b0 (lagging)\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb new file mode 100644 index 00000000..a1dee947 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter07.ipynb @@ -0,0 +1,444 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-7 : Oscillators (Sinusoidal As Well As Non-Sinusoidal)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.1 - Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy import pi\n", + "from math import sqrt\n", + "# Given data\n", + "f=200 # in Hz\n", + "# Let us take\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R=1/(2*pi*f*C*sqrt(6)) # in ohm\n", + "R=R*10**-3 # in k ohm\n", + "# R1>=10*R, Let\n", + "R1=10*R # in kohm\n", + "R_f= 29*R1 # in k ohm\n", + "R_f=R_f*10**-3 # in M ohm\n", + "R_f=math.ceil(R_f) \n", + "print \"Resistor of phase-shift oscillator = %0.f Mohm\" %R_f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistor of phase-shift oscillator = 1 Mohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.2 - Page No 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=1 # in kHz\n", + "f=f*10**3 # in Hz\n", + "V_CC= 10 # in volt\n", + "I_B_max= 500 # in nA (for 741 IC op-amp)\n", + "I_B_max= I_B_max*10**-9 # in A\n", + "I1= 100*I_B_max # in A\n", + "V_out= (V_CC-1) # in volt\n", + "V_in= V_out/29 \n", + "R1= V_in/I1 # in ohm\n", + "R1=R1*10**-3 #in k ohm\n", + "# 5.6 k ohm resistor may be used for R1, being standard value resistor\n", + "R1=5.6 # in k ohm (standard value)\n", + "A=29 \n", + "R_f= A*R1 \n", + "# 180 k ohm resistor may be used to provide A > 29\n", + "R_f=180 # in k ohm (standard value)\n", + "R_comp= R_f \n", + "R=R1 # in k ohm\n", + "R=R*10**3 # in ohm\n", + "C=1/(2*pi*f*R*sqrt(6)) # in F\n", + "C=C*10**6 # in micro F\n", + "print \"Value of R_comp = R_f = %0.f kohm\" %R_comp\n", + "print \"Value of R = R1 = %0.1f in kohm\" %(R*10**-3)\n", + "print \"Value of capacitor = %0.2f micro F\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R_comp = R_f = 180 kohm\n", + "Value of R = R1 = 5.6 in kohm\n", + "Value of capacitor = 0.01 micro F\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.3 - Page No 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=10 # in kHz\n", + "f=f*10**3 # in Hz\n", + "I_Bmax= 500 # in nA\n", + "I_Bmax= I_Bmax*10**-9 # in amphere\n", + "# Let current through resistor R1 be equal to 100 times I_Bmax, so\n", + "I_1= 100*I_Bmax # in amp\n", + "Vcc= 10 # in volt\n", + "Vout= Vcc-1 # in volt\n", + "Addition_RfR1= Vout/(500*10**-6) # value of Rf+R1 in ohm\n", + "Addition_RfR1=Addition_RfR1*10**-3 # in kohm\n", + "# Rf= 2*R1, So\n", + "R1= Addition_RfR1/3 # (used 5.6 kohm Standard value resistor)\n", + "print \"Value of R1 = %0.f kohm (Standard value 5.6 k ohm)\" %R1\n", + "R1= 5.6 # in kohm (used 5.6 kohm Standard value resistor)\n", + "Rf= 2*R1 # in kohm# (used 12 kohm standard value resistor)\n", + "print \"Value of Rf = %0.1f kohm (Standard value 12 k ohm)\" %Rf\n", + "Rf= 12 # k ohm (used 12 kohm standard value resistor)\n", + "R=R1 # in kohm\n", + "C= 1/(2*pi*f*R) # in F (Used 2700pF standard value)\n", + "C=2700 # in pF \n", + "print \"Value of R = %0.1f kohm\" %R\n", + "print \"Value of C = %0.f pF\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R1 = 6 kohm (Standard value 5.6 k ohm)\n", + "Value of Rf = 11.2 kohm (Standard value 12 k ohm)\n", + "Value of R = 5.6 kohm\n", + "Value of C = 2700 pF\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.4 - Page No 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 1 # in kohm\n", + "R=R*10**3 # in ohm\n", + "C= 4.7 # in micro F\n", + "C=C*10**-6 # in F\n", + "omega=1/(R*C) # in radians/second\n", + "f=omega/(2*pi) # in Hz\n", + "print \"Frequency of the oscillation of the circuit = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the oscillation of the circuit = 33.86 Hz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.6 - Page No 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "C= 100 # in pF\n", + "C=C*10**-12 # in F\n", + "f=1/(2*pi*R*C) # in Hz\n", + "print \"Frequency of the oscillation of the circuit = %0.2f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the oscillation of the circuit = 159.15 kHz\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.7 - Page No 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "fo= 318 # in Hz\n", + "C= 0.015 # in microF\n", + "C=C*10**-6 # in F\n", + "R=0.159/(fo*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R=int(R) \n", + "print \"Value of C1 = C2 = C3 = %0.3f micro F\" %(C*10**6)\n", + "print \"Value of R1 = R2 = R3 = %0.f in kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C1 = C2 = C3 = 0.015 micro F\n", + "Value of R1 = R2 = R3 = 33 in kohm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.8 - Page No 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "fo= 1.5 # in kHz\n", + "fo=fo*10**3 # in Hz\n", + "C= 0.01 # in microF\n", + "C=C*10**-6 # in F\n", + "R=0.159/(fo*C) # in ohm\n", + "R=R*10**-3 # in kohm\n", + "R=int(R) \n", + "print \"Value of C1 = C2 = C3 = %0.2f micro F\" %(C*10**6)\n", + "print \"Value of R1 = R2 = R3 = %0.f in kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C1 = C2 = C3 = 0.01 micro F\n", + "Value of R1 = R2 = R3 = 10 in kohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.9 - Page No 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C= 0.1 # in microF\n", + "C=C*10**-6 # in F\n", + "R=12 # in kohm\n", + "R=R*10**3 # in ohm\n", + "R1=120 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "Rf=1 # in Mohm\n", + "Rf=Rf*10**6 # in ohm\n", + "V_sat= 10 # in volt\n", + "# Part(i)\n", + "f=Rf/(4*R1*R*C) #in Hz\n", + "print \"(i) : Signal Frequency = %0.3f kHz\" %(f*10**-3)\n", + "\n", + "# Part(ii)\n", + "Vp_p= float(2*R1*V_sat)/Rf # in Vp_p\n", + "\n", + "print \"(ii) : Amplitude of the triangular wave = %0.1f Vp_p\" %Vp_p\n", + "\n", + "# Part(iii)\n", + "Vp_p= (V_sat)-(-V_sat) \n", + "print \"(iii) : Amplitude of the square wave = %0.f Vp_p\" %Vp_p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Signal Frequency = 1.736 kHz\n", + "(ii) : Amplitude of the triangular wave = 2.4 Vp_p\n", + "(iii) : Amplitude of the square wave = 20 Vp_p\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.11 - Page No 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C1= 0.01 # in microF\n", + "C1=C1*10**-6 # in F\n", + "R1=120 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=1.2 # in kohm\n", + "R2=R2*10**3 # in ohm\n", + "R3=6.8 # in kohm\n", + "R3=R3*10**3 # in ohm\n", + "V_sat= 15 # in volt\n", + "# Part(a)\n", + "Vp_p= 2*(R2/R3)*V_sat #in volt\n", + "print \"(a) : Peak to peak amplitude of triangular wave = %0.3f volt\" %Vp_p\n", + "\n", + "# Part(b)\n", + "fo= R3/(4*R1*C1*R2) #in Hz\n", + "print \"(b) : Frequency of triangular wave = %0.2f kHz\" %(fo*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : Peak to peak amplitude of triangular wave = 5.294 volt\n", + "(b) : Frequency of triangular wave = 1.18 kHz\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 7.12 - Page No 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "T= 100 # in micro sec\n", + "T=T*10**-6 #in se\n", + "V_sat= 12 # in volt\n", + "V1= 0.7 # in volt\n", + "V= 0.7 # in volt\n", + "V_D1= V \n", + "V_D2=V_D1 \n", + "C1= 0.1 # in microF\n", + "C1=C1*10**-6 # in F\n", + "Bita1= 0.1 \n", + "# Formula T= R3*C1*log((1+V1/V_sat)/(1-Bita1))\n", + "R3= T/(C1*log((1+V1/V_sat)/(1-Bita1))) # in ohm\n", + "print \"Value of R3 = %0.3f kohm (Standard value 6.8 kohm)\" %(R3*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of R3 = 6.171 kohm (Standard value 6.8 kohm)\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb new file mode 100644 index 00000000..00e88ef0 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter08.ipynb @@ -0,0 +1,654 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-8 : Comparators And Converters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.2 - Page No 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "A= 92 # in dB\n", + "A= 10**(92.0/20) \n", + "V_CC= 15 # in volt\n", + "Vout= 30 # in volt\n", + "InputOffsetVoltage= 0 # in V\n", + "InputVoltage= Vout/A # in V\n", + "print \"Input Voltage = %0.4f mV\" %(InputVoltage*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input Voltage = 0.7536 mV\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.3 - Page No " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 2 # in kohm\n", + "Rf= 390.0 # in kohm\n", + "V_sat= 12 # in V\n", + "Bita= R1/(R1+Rf) \n", + "UTP= Bita*V_sat # in volt\n", + "LTP= -Bita*V_sat # in volt\n", + "print \"Value of UTP = %0.1f mv\" %(UTP*10**3)\n", + "print \"Value of LTP = %0.1f mv\" %(LTP*10**3)\n", + "\n", + "# Note : In the book, there is an error to convert the value of UTP from volts to milli volts." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of UTP = 61.2 mv\n", + "Value of LTP = -61.2 mv\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.5 - Page No 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "# Given data\n", + "t=0 \n", + "Vc=0 \n", + "Vo=5 #in volt\n", + "# V1= 2*R/(2*R+3*R)= 2/5*Vo\n", + "# Vco= 1/5*VR +4/5*Vo = 1/5*(VR+4*Vo)\n", + "# Req= R||4*R= 4/5*R\n", + "# Vct= Vco*(1-%e**(-t/(Req*C)))= 1/5*(VR+4*Vo)*(1-%e**(-t/(4*R*C/5)))= 1/5*(VR+4*Vo)*(1-%e**(-1.25*t/(R*C)))\n", + "# T= 2*Rf*C*log(1+2*R3/R2)= 2*R*C*log(7/3)= 1.7*R*C\n", + "# t= T/2= .85*R*C, Hence\n", + "Vct=2 #in volt\n", + "# Vct= 1/5*(VR+4*Vo)*(1-%e**1.0625)\n", + "VR= Vct*5/(1-exp(-1.0625))-4*Vo \n", + "print \"Value of VR = %0.2f volt\" %VR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of VR = -4.72 volt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.6 - Page No 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from math import asin\n", + "# Given data\n", + "omega= 200*pi # in radians/seconds\n", + "f=omega/(2*pi) # in Hz\n", + "T=1/f # in sec\n", + "T=T*10**3 #in ms\n", + "Vin= 7 #in volt\n", + "t1= 1/omega*asin(6.0/Vin) # in sec\n", + "t1=t1*10**3 # in ms\n", + "# The output of the schmitt trigger is at -10 volt\n", + "t1= T/2+t1 # in ms\n", + "# The output of the schmitt trigger is at +10 volt\n", + "t2= 10-t1 # in ms\n", + "print \"The output of the schmitt trigger is at -10 volt = %0.2f ms\" %t1\n", + "print \"The output of the schmitt trigger is at +10 volt = %0.2f ms\" %t2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output of the schmitt trigger is at -10 volt = 6.64 ms\n", + "The output of the schmitt trigger is at +10 volt = 3.36 ms\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.7 - Page No 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 150 # in ohm\n", + "R2= 68.0 # in kohm\n", + "R2=R2*10**3 # in ohm\n", + "Vin= 500 # in mv\n", + "V_sat= 14 #in volt\n", + "V_pos= R1/(R1+R2)*V_sat # in volt\n", + "V_UT= V_pos #in volt\n", + "# In the same way when output is -14 volts and starts increasing in negative direcition \n", + "V_sat=-14 #in volt\n", + "V_pos= R1*V_sat/(R1+R2) # in volt\n", + "V_LT= abs(V_pos) #in volt\n", + "print \"Value of V_UT = %0.4f volts\" %V_UT\n", + "print \"Value of V_LT = %0.4f volts\" %V_LT" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of V_UT = 0.0308 volts\n", + "Value of V_LT = 0.0308 volts\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.8 - Page No 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_UT= 5 # in V\n", + "V_LT= -5 # in V\n", + "V_sat= 10 # in V (Assume)\n", + "# V_UT= (R1/(R1+R2))*V_sat = 5\n", + "# V_LT= (-R1/(R1+R2))*V_sat = -5\n", + "# 10*R1/(R+R2)= 5\n", + "V_hy= V_UT-V_LT # in volt\n", + "print \"Hysteresis voltage = %0.f volt\" %V_hy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hysteresis voltage = 10 volt\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.9 - Page No 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_REF= 10 # in V\n", + "V_REF= float(V_REF) # converting into float\n", + "MSB2= V_REF/2 # in volt\n", + "print \"The second MSB weight = %0.f volt\" %MSB2\n", + "MSB3= V_REF/4 # in volt\n", + "print \"The third MSB weight = %0.1f volt\"%MSB3\n", + "MSB4= V_REF/8 # in volt\n", + "print \"The forth MSB (or LSB) weight = %0.2f volt\" %MSB4\n", + "DAC= MSB4 \n", + "print \"The resolution of the DAC = %0.2f volt\" %DAC\n", + "FullScaleOutput= V_REF+MSB2+MSB3+MSB4 #in volt\n", + "print \"Full scale output = %0.2f volt\" %FullScaleOutput\n", + "print \"IF Rf is reduced to one-forth then the value of full scale output =\" ,round(FullScaleOutput/4,4),\" volt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The second MSB weight = 5 volt\n", + "The third MSB weight = 2.5 volt\n", + "The forth MSB (or LSB) weight = 1.25 volt\n", + "The resolution of the DAC = 1.25 volt\n", + "Full scale output = 18.75 volt\n", + "IF Rf is reduced to one-forth then the value of full scale output = 4.6875 volt\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.10 - Page No 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_REF= -5 # in V\n", + "V_B= 0 # in volt\n", + "V_A= -5 # in volt\n", + "V_A= float(V_A) # converting into float\n", + "V_C=V_A \n", + "V_D=V_C \n", + "Vout= -1*(V_A+V_B/2+V_C/4+V_D/8) # in volt\n", + "print \"Output voltage = %0.3f volt\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 6.875 volt\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.11 - Page No 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Dn=16 # in volt\n", + "Dn= float (Dn) #converting into float\n", + "MSB1= Dn/2 # in volt\n", + "print \"The first MSB output = %0.f volt\" %MSB1\n", + "MSB2= Dn/4 # in volt\n", + "print \"The second MSB output = %0.f volt\" %MSB2\n", + "MSB3= Dn/8 # in volt\n", + "print \"The third MSB output = %0.f volt\" %MSB3\n", + "MSB4= Dn/16 # in volt\n", + "print \"The forth MSB output = %0.f volt\" %MSB4\n", + "MSB5= Dn/32 # in volt\n", + "print \"The fifth MSB output = %0.1f volt\" %MSB5\n", + "MSB6= Dn/64 # in volt\n", + "print \"The sixth MSB (LSB) output = %0.2f volt\" %MSB6\n", + "resolution= MSB6 # in volt\n", + "print \"The resolution = %0.2f volt\" %resolution\n", + "fullScaleOutput= MSB1+MSB2+MSB3+MSB4+MSB5+MSB6 \n", + "print \"Full scale output occurs for digital input of 111111 = %0.2f volt\" %fullScaleOutput\n", + "# For digital input 101011\n", + "D0=16 \n", + "D1=16 \n", + "D2=0 \n", + "D3=16 \n", + "D4=0 \n", + "D5=16 \n", + "\n", + "Vout= float(D0*2**0 + D1*2**1 + D2*2**2 + D3*2**3 + D4*2**4 + D5*2**5)/2**6 # in volt\n", + "print \"The voltage output for a digital input of 101011 = %0.2f volt\" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first MSB output = 8 volt\n", + "The second MSB output = 4 volt\n", + "The third MSB output = 2 volt\n", + "The forth MSB output = 1 volt\n", + "The fifth MSB output = 0.5 volt\n", + "The sixth MSB (LSB) output = 0.25 volt\n", + "The resolution = 0.25 volt\n", + "Full scale output occurs for digital input of 111111 = 15.75 volt\n", + "The voltage output for a digital input of 101011 = 10.75 volt\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.12 - Page No 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "# For the word 100100\n", + "N=6 # Number of bits\n", + "a5= 1 # Value of bits\n", + "a4= 0 # Value of bits\n", + "a3= 0 # Value of bits\n", + "a2= 1 # Value of bits\n", + "a1= 0 # Value of bits\n", + "a0= 0 # Value of bits\n", + "Vo= 3.6 # in volt\n", + "# Formula Vo= (2**(N-1)*a5 + 2**(N-2)*a4 + 2**(N-3)*a3 + 2**(N-4)*a2 + 2**(N-5)*a1 + 2**(N-6)*a0 ) * K\n", + "K= Vo/(2**(N-1)*a5 + 2**(N-2)*a4 + 2**(N-3)*a3 + 2**(N-4)*a2 + 2**(N-5)*a1 + 2**(N-6)*a0 ) \n", + "# For the word 110011\n", + "N=6 # Number of bits\n", + "a5= 1 # Value of bits\n", + "a4= 1 # Value of bits\n", + "a3= 0 # Value of bits\n", + "a2= 0 # Value of bits\n", + "a1= 1 # Value of bits\n", + "a0= 1 # Value of bits\n", + "Vo= (2**(N-1)*a5 + 2**(N-2)*a4 + 2**(N-3)*a3 + 2**(N-4)*a2 + 2**(N-5)*a1 + 2**(N-6)*a0 ) * K # in volt\n", + "print \"(i) : The value of Vo for the word 110011 = %0.1f volt\" %Vo\n", + "\n", + "# Part(ii)\n", + "# For the word 1010\n", + "N=4 # Number of bits\n", + "a3= 1 # Value of bits\n", + "a2= 0 # Value of bits\n", + "a1= 1 # Value of bits\n", + "a0= 0 # Value of bits\n", + "VR= 6 # in volt\n", + "Vo= float(VR)/2**N*( 2**(N-1)*a3 + 2**(N-2)*a2 + 2**(N-3)*a1 + 2**(N-4)*a0 ) \n", + "print \"(ii) : Value of output voltage = %0.2f volt\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : The value of Vo for the word 110011 = 5.1 volt\n", + "(ii) : Value of output voltage = 3.75 volt\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.13 - Page No 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R=100 # in kohm\n", + "R=R*10**3 # in ohm\n", + "C= 1 # in micro F\n", + "C=C*10**-6 # in F\n", + "V_REF= 5 # in volt\n", + "t=0.2 # time taken to read an unknown voltage in second\n", + "T=R*C # in second\n", + "Vx= T/t*V_REF # in volt\n", + "print \"Unknown voltage = %0.1f volt\" %Vx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unknown voltage = 2.5 volt\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.14 - Page No 277\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=75 # in MHz\n", + "f=f*10**6 # in Hz\n", + "# For an 8-bit converter reference voltage\n", + "V_REF= 100 # in volt\n", + "# For setting D7=1\n", + "Vo_7= V_REF*2**7/2**8 #in volt\n", + "# For setting D6=1\n", + "Vo_6= V_REF*2**6/2**8 #in volt\n", + "# For setting D7=1 and D6=1\n", + "Vo_76= Vo_7+Vo_6 #in volt\n", + "# For setting D5=1 D6=1 and D7=1\n", + "Vo_5= float(V_REF*2**5)/2**8+Vo_7+Vo_6 #in volt\n", + "print \"For setting D7=1 output voltage = %0.f volt\" %Vo_7\n", + "print \"For setting D6=1 output voltage = %0.f volt\" %Vo_6\n", + "print \"For setting D7=1 and D6=1 output voltage = %0.f volt\" %Vo_76\n", + "print \"For setting D5=1, D6=1 and D7=1 output voltage = %0.1f volt\" %Vo_5\n", + "T=float(1.0/f) # in sec\n", + "print \"Conversion time = %0.1f ns\" %(T*10**9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For setting D7=1 output voltage = 50 volt\n", + "For setting D6=1 output voltage = 25 volt\n", + "For setting D7=1 and D6=1 output voltage = 75 volt\n", + "For setting D5=1, D6=1 and D7=1 output voltage = 87.5 volt\n", + "Conversion time = 13.3 ns\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.15 - Page No 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=1 # in MHz\n", + "f=f*10**6 # in Hz\n", + "f= float(f) # converting into float\n", + "T=1/f # conversion time in sec\n", + "N=8 # number of bits\n", + "tc= N*T # in sec\n", + "print \"Time of Conversion = %0.f micro sec : \" %(tc*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time of Conversion = 8 micro sec : \n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.16 - Page No 277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vin= 2 #in volt\n", + "Vout= 10 #in volt\n", + "R=100 # in kohm\n", + "R=R*10**3 #in ohm\n", + "C=0.1 # in micro F\n", + "C=C*10**-6 #in F\n", + "# Formula Vout = -1/(R*C)*integrate('Vin','t',0,t) = -Vin*t/(R*C)\n", + "t= Vout*R*C/Vin # in sec\n", + "print \"Maximum time upto which the reference voltage can be integrated,\"\n", + "print \"t =\",round(t,2),\"second =\",int(round(t*10**3)),\"ms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum time upto which the reference voltage can be integrated,\n", + "t = 0.05 second = 50 ms\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 8.17 - Page No 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=0.1 # in nF\n", + "C=C*10**-9 #in F\n", + "V=5 #in V\n", + "t=1 # in micro S\n", + "t=t*10**-6 # in sec\n", + "# v= V*(1-%e**(-t/(R*C)))\n", + "# Since hold value does not drop by more than 0.5% or by 0.005 V, hold value is 0.995 V, Thus\n", + "# 0.995*V= V*(1-%e**(-t/(R*C)))\n", + "# or %e**(-t/(R*C))= 1-0.995 = 0.005\n", + "R= t/(C*math.log(1/0.005)) # in ohm\n", + "I= V/R*(1-exp(-t/(R*C))) # Maximum currnet through R in amphere\n", + "print \"Maximum permissible leakage current through the hold capacitor = %0.3f mA\" %(I*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum permissible leakage current through the hold capacitor = 2.636 mA\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb new file mode 100644 index 00000000..6159910d --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter09.ipynb @@ -0,0 +1,348 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-9 : The 555 IC Timer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.1 - Page No 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=.01 # in micro F\n", + "C=C*10**-6 # in F\n", + "R_A= 2 # in kohm\n", + "R_A=R_A*10**3 # in ohm\n", + "R_B= 100 # in kohm\n", + "R_B=R_B*10**3 # in ohm\n", + "T_High= 0.693*(R_A+R_B)*C # in seconds\n", + "T_Low= 0.693*R_B*C # in seconds\n", + "T=T_High+T_Low # in seconds\n", + "f=1/T # in Hz\n", + "print \"Frequency of oscillations = %0.1f Hz\" %f\n", + "DutyCycle= T_High/T*100 # in percent\n", + "print \"Duty cycle = %0.1f %%\" %DutyCycle " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 714.4 Hz\n", + "Duty cycle = 50.5 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.2 - Page No 295\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=1 # in micro F\n", + "C=C*10**-6 # in F\n", + "C1=0.01 # in micro F\n", + "C1=C1*10**-6 # in F\n", + "R_A=4.7 # in kohm\n", + "R_B=1 # in kohm\n", + "R_A=R_A*10**3 # in ohm\n", + "R_B=R_B*10**3 # in ohm\n", + "T_on= 0.693*(R_A+R_B)*C # in seconds\n", + "T_on=T_on*10**3 # in ms\n", + "print \"Positive pulse width = %0.2f mili seconds\" %T_on\n", + "T_off= 0.693*R_B*C # in seconds\n", + "T_off=T_off*10**3 # in ms\n", + "print \"Negative pulse width = %0.3f mili seconds\" %T_off\n", + "f=1.4/((R_A+2*R_B)*C) # in Hz\n", + "print \"Free running Frequency = %0.f Hz\" %f\n", + "DutyCycle= (R_A+R_B)/(R_A+2*R_B)*100# in percent\n", + "print \"Duty cycle = %0.f %%\" %DutyCycle" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Positive pulse width = 3.95 mili seconds\n", + "Negative pulse width = 0.693 mili seconds\n", + "Free running Frequency = 209 Hz\n", + "Duty cycle = 85 %\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.3 - Page No 296\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=0.01 # in micro F\n", + "C=C*10**-6 # in F\n", + "f=1 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# R_A= R_B\n", + "# T_on = T_off = T/2\n", + "# Frequency is given by equation f= 1.44/((R_A+R_B)*C)\n", + "R_A= 1.44/(2*f*C) # in ohm\n", + "R_A=R_A*10**-3 # in k ohm\n", + "R_B= R_A \n", + "\n", + "print \"The value of required resistors =\",int(round(R_A)),\"k ohm (68 ohm standart value)\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of required resistors = 72 k ohm (68 ohm standart value)\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.4 - Page No 296\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=700 # in Hz\n", + "# R_A= R_B\n", + "# T_on = T_off = T/2\n", + "# Frequency is given by equation f= 1.44/((R_A+R_B)*C)\n", + "C=0.01 # in micro F (assumed value)\n", + "C=C*10**-6 # in F\n", + "R_A= 1.44/(2*f*C) # in ohm\n", + "R_A=R_A*10**-3 # in k ohm\n", + "R_A=int(round(R_A) )\n", + "R_B= R_A \n", + "print \"The value of required resistors =\",(R_A),\"k ohm (100 ohm standart value)\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of required resistors = 103 k ohm (100 ohm standart value)\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.5 - Page No 296\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "f=800 # in Hz\n", + "D=60 # in percent\n", + "# Formula D= (R_A+R_B)/(R_A+2*R_B)*100 = 60\n", + "# R_A + R_B = 0.6*R_A + 1.2*R_B\n", + "# R_B= 2*R_A\n", + "C=0.01 # in micro F (assumed value)\n", + "C=C*10**-6 # in F\n", + "# Frequency is given by equation f= 1.44/((R_A+R_B)*C)\n", + "R_A= 1.44/(5*C*f) # in ohm\n", + "R_A=R_A*10**-3 # in kohm\n", + "R_B=2*R_A # in kohm\n", + "print \"The value of C = %0.2f micro F\" %(C*10**6)\n", + "print \"The value of R_A = %0.f kohm\" %R_A\n", + "print \"The value of R_B = %0.f kohm\" %R_B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 0.01 micro F\n", + "The value of R_A = 36 kohm\n", + "The value of R_B = 72 kohm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.6 - Page No 297\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=.05 # in micro F\n", + "C=C*10**-6 # in F\n", + "R= 12 # in kohm\n", + "R=R*10**3 # in ohm\n", + "V_CC= 5 # in volt\n", + "V_BE= 0.7 # in volt\n", + "V_D1= V_BE # in volt\n", + "I_C= (V_CC-V_BE)/R # in A\n", + "f_o= (3*I_C)/(V_CC*C) # in Hz\n", + "f_o=f_o*10**-3 # in kHz\n", + "print \"Frequency of free running ramp generator circuit = %0.1f kHz\" %f_o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of free running ramp generator circuit = 4.3 kHz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.7 - Page No 300\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C=.1 # in micro F\n", + "C=C*10**-6 # in F\n", + "R_A= 20 # in kohm\n", + "R_A=R_A*10**3 # in ohm\n", + "PulseWidth= 1.1*R_A*C # in seconds\n", + "print \"The output pulse width = %0.1f mili seconds\" %(PulseWidth*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output pulse width = 2.2 mili seconds\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 9.9 - Page No 300\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "C=.02 # in micro F\n", + "C=C*10**-6 # in F\n", + "f=2 # frequency of the outpur trigger in kHz\n", + "f=f*10**3 # in Hz\n", + "T=1/f # in seconds\n", + "# In a divide-by-5 circuit , n=5, so the pulse width, t_p= [0.2 + (n-1)]*T = [0.2 + (5-1)]*T = 4.2*T\n", + "t_p=4.2*T # in soconds\n", + "# Formula t_p = 1.1*R_A*C\n", + "R_A= t_p/(1.1*C) # in ohm\n", + "R_A=R_A*10**-3 # in kohm\n", + "print \"The value of R_A = %0.2f k ohm (Standard value 100 kohm)\" %R_A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R_A = 95.45 k ohm (Standard value 100 kohm)\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb new file mode 100644 index 00000000..0aaf0dd3 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter10.ipynb @@ -0,0 +1,71 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-10 : Phase-Locked Loops (PLL)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 10.1 - Page No 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "from numpy import pi\n", + "from fractions import Fraction \n", + "# Given data\n", + "V_pos= 12 # in volt\n", + "V_Neg= -12 # in volt\n", + "V=V_pos-V_Neg \n", + "R1=15 # in k ohm\n", + "R1=R1*10**3 # in ohm\n", + "C1=0.01 # in micro F\n", + "C1=C1*10**-6 # in F\n", + "C2=10 # in micro F\n", + "C2=C2*10**-6 # in F\n", + "# (i)\n", + "f_out= 1.2/(4*R1*C1) # in Hz\n", + "print \"Free running frequency = %0.f kHz\" %(f_out*10**-3)\n", + "# (ii)\n", + "f_L= (8*f_out)/V # in Hz\n", + "print \"Lock range = \u00b1\" ,Fraction(f_L*10**-3).limit_denominator(100),\"kHz\"\n", + "f_C= sqrt(f_L/(2*pi*3.6*10**3*C2)) # in Hz\n", + "print \"Capture range =\u00b1 %0.2f Hz\" %f_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Free running frequency = 2 kHz\n", + "Lock range = \u00b1 2/3 kHz\n", + "Capture range =\u00b1 54.29 Hz\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb new file mode 100644 index 00000000..9008b311 --- /dev/null +++ b/Linear_Integrated_Circuits_by_J._B._Gupta/chapter11.ipynb @@ -0,0 +1,247 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter- 11 : Voltage Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.1 - Page No 337\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "I_dc=300 # in mA\n", + "C=200 # in micro F\n", + "V_max= 24 # in volt\n", + "V_r_rms= 2.4*I_dc/C # in volt\n", + "V_r_peak= sqrt(3)*V_r_rms # in volt\n", + "V_dc= V_max-V_r_peak # in volt\n", + "V_in_low= V_max-V_r_peak # in volt\n", + "print \"Minimum input voltage = %0.2f volt\" %V_in_low" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum input voltage = 17.76 volt\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.2 - Page No 337\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "I_L= 0.5 # in amp\n", + "R_L=25 # in ohm\n", + "V_R=12 # in volt (since using 7812 voltage regulator)\n", + "V_L= I_L*R_L \n", + "R=V_R/I_L # in ohm\n", + "print \"Resistance required = %0.f ohm\" %R\n", + "V_out= V_R+V_L # in volt\n", + "print \"Output voltage = %0.1f volt\" %V_out\n", + "V_in= V_out+2 # in volt\n", + "print \"Input voltage = %0.1f volt\" %V_in" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance required = 24 ohm\n", + "Output voltage = 24.5 volt\n", + "Input voltage = 26.5 volt\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.3 - Page No 337\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 240 # in ohm\n", + "R2= 1.2 # in kohm\n", + "R2=R2*10**3 # in ohm\n", + "V_out= 1.25*(1+R2/R1) # in volt\n", + "print \"Regulated output voltage = %0.1f volt\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Regulated output voltage = 7.5 volt\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.4 - Page No 337\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 40 # in ohm\n", + "I_Q= 10 # in mA\n", + "I_Q=I_Q*10**-3 # in amp\n", + "V_REF= 15 # in volt\n", + "# When R2 is set at minimum i.e.\n", + "R2= 0 # in ohm\n", + "V_out= (1+R2/R1)*V_REF + I_Q*R2 # in volt\n", + "print \"Minimum output voltage = %0.f volt\" %V_out\n", + "# When R2 is set at maximum i.e.\n", + "R2= 200 # in ohm\n", + "V_out= (1+R2/R1)*V_REF + I_Q*R2 # in volt\n", + "print \"Minimum output voltage = %0.f volt\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum output voltage = 15 volt\n", + "Minimum output voltage = 92 volt\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.5 - Page No 350\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 2.5 # in kohm\n", + "R1= R1*10**3 # in ohm\n", + "R2= 1 # in kohm\n", + "R2= R2*10**3 # in ohm\n", + "V_REF= 1.25 # in volt\n", + "I= V_REF/R2 # in amp\n", + "# This current also flows through R1. So the output voltage\n", + "V_out= I*(R1+R2) # in volt\n", + "print \"Output voltage = %0.3f volt\" %V_out" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output voltage = 4.375 volt\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example : 11.6 - Page No 350\n", + " " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 3 # in kohm\n", + "R1= R1*10**3 # in ohm\n", + "R2= 1 # in kohm\n", + "R2= R2*10**3 # in ohm\n", + "V_REF= 1.25 # in volt\n", + "V_in=20 # in volt\n", + "V_out= V_REF*(R1+R2)/R2 # in volt\n", + "D=V_out/V_in*100 # in percent\n", + "print \"Duty cycle = %0.f %%\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duty cycle = 25 %\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..c66ac130 Binary files /dev/null and b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/Closed_Loop_Gain.png differ 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 new file mode 100644 index 00000000..0967671c Binary files /dev/null and b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/per_error.png differ diff --git a/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png new file mode 100644 index 00000000..37ace619 Binary files /dev/null and b/Linear_Integrated_Circuits_by_J._B._Gupta/screenshots/waveform.png differ diff --git a/Materials_Science/screenshots/1_converted.png b/Materials_Science/screenshots/1_converted.png new file mode 100755 index 00000000..6f902c6e Binary files /dev/null and b/Materials_Science/screenshots/1_converted.png differ diff --git a/Materials_Science/screenshots/2_converted.png b/Materials_Science/screenshots/2_converted.png new file mode 100755 index 00000000..5b3697bc Binary files /dev/null and b/Materials_Science/screenshots/2_converted.png differ diff --git a/Materials_Science/screenshots/3_converted.png b/Materials_Science/screenshots/3_converted.png new file mode 100755 index 00000000..47f7a27c Binary files /dev/null and b/Materials_Science/screenshots/3_converted.png differ diff --git a/Materials_Science_by_Dr._M._Arumugam/Chapter1.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter1.ipynb new file mode 100755 index 00000000..223b1028 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter1.ipynb @@ -0,0 +1,97 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Introduction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of Al is 37.18 *10**3\n", + "ratio of Mg is 30.9 *10**3\n", + "ratio of steel is 17.69 *10**3\n", + "ratio of glass is 25.55 *10**3\n", + "Aluminium alloy is the best material\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ws_al=103; #working stress of Al\n", + "ws_mg=55; #working stress of Mg\n", + "ws_st=138; #working stress of steel\n", + "ws_g=35; #working stress of glass\n", + "d_al=2770; #density of Al\n", + "d_mg=1780; #density of Mg\n", + "d_st=7800; #density of steel\n", + "d_g=1370; #density of glass\n", + "A=10**6; #area\n", + "l=1; #length\n", + "\n", + "#Calculation\n", + "L_al=ws_al*A; #load of Al\n", + "L_mg=ws_mg*A; #load of Mg\n", + "L_st=ws_st*A; #load of steel\n", + "L_g=ws_g*A; #load of glass\n", + "W_al=d_al*l; #weight of Al\n", + "W_mg=d_mg*l; #weight of Mg\n", + "W_st=d_st*l; #weight of steel\n", + "W_g=d_g*l; #weight of glass\n", + "r_al=L_al/W_al; #ratio of Al\n", + "r_mg=L_mg/W_mg; #ratio of Mg\n", + "r_st=L_st/W_st; #ratio of steel\n", + "r_g=L_g/W_g; #ratio of glass\n", + "\n", + "#Result\n", + "print \"ratio of Al is\",round(r_al/10**3,2),\"*10**3\"\n", + "print \"ratio of Mg is\",round(r_mg/10**3,2),\"*10**3\"\n", + "print \"ratio of steel is\",round(r_st/10**3,2),\"*10**3\"\n", + "print \"ratio of glass is\",round(r_g/10**3,2),\"*10**3\"\n", + "print \"Aluminium alloy is the best material\"" + ] + } + ], + "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/Materials_Science_by_Dr._M._Arumugam/Chapter10.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter10.ipynb new file mode 100755 index 00000000..bf94717f --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter10.ipynb @@ -0,0 +1,556 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Optical Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 10.61" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of emission is 8628.0 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant(J s)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "Eg=1.44*1.6*10**-19; #band gap(J)\n", + "\n", + "#Calculation\n", + "lamda=h*c/Eg; #wavelength of emission(m)\n", + "\n", + "#Result\n", + "print \"wavelength of emission is\",round(lamda*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 10.61" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "band 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; #band gap(eV)\n", + "\n", + "#Result\n", + "print \"band gap is\",Eg,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.3, Page number 10.61" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electron-hole pairs is 3.25 *10**5\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "eta=0.65; #quantum efficiency\n", + "n=5*10**5; #number of photons incident\n", + "\n", + "#Calculation\n", + "N=eta*n; #number of electron-hole pairs\n", + "\n", + "#Result\n", + "print \"number of electron-hole pairs is\",N/10**5,\"*10**5\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.4, Page number 10.61" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "responsibility is 0.628 A/W\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "eta=0.6; #quantum efficiency\n", + "q=1.6*10**-19; #charge(coulomb)\n", + "lamda=1.3*10**-6; #lamda(m)\n", + "h=6.625*10**-34; #plancks constant(J s)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "R=eta*q*lamda/(h*c); #responsibility(A/W)\n", + "\n", + "#Result\n", + "print \"responsibility is\",round(R,3),\"A/W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.5, Page number 10.61" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "multiplication factor is 41\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "eta=0.7; #quantum efficiency\n", + "q=1.6*10**-19; #charge(coulomb)\n", + "lamda=863*10**-9; #lamda(m)\n", + "P0=0.5*10**-6; #optical power(W)\n", + "h=6.625*10**-34; #plancks constant(J s)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "IT=10*10**-6; #current(A)\n", + "\n", + "#Calculation\n", + "IP=eta*q*lamda*P0/(h*c);\n", + "M=IT/IP; #multiplication factor\n", + "\n", + "#Result\n", + "print \"multiplication factor is\",int(M)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.6, Page number 10.62" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle is 78.5 degrees\n", + "numerical aperture is 0.3\n", + "acceptance angle is 17.4 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n2=1.47; #refractive index of cladding\n", + "n1=1.5; #refractive index of core\n", + "\n", + "#Calculation\n", + "phi_c=math.asin(n2/n1); #critical angle(radian)\n", + "phi_c=phi_c*180/math.pi; #critical angle(degrees)\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "phi_max=math.asin(NA); #acceptance angle(radian)\n", + "phi_max=phi_max*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"critical angle is\",round(phi_c,1),\"degrees\"\n", + "print \"numerical aperture is\",round(NA,1)\n", + "print \"acceptance angle is\",round(phi_max,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.7, Page number 10.62" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of guided modes is 490.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", + "NA=0.2; #numerical aperture(m)\n", + "lamda=1*10**-6; #wavelength(m)\n", + "\n", + "#Calculation\n", + "N=4.9*(d*NA/lamda)**2; #total number of guided modes\n", + "\n", + "#Result\n", + "print \"total number of guided modes is\",N" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.8, Page number 10.62" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of guided modes 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", + "n2=1.447; #refractive index of cladding\n", + "n1=1.45; #refractive index of core\n", + "lamda=1*10**-6; #wavelength(m)\n", + "\n", + "#Calculation\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "N=4.9*(d*NA/lamda)**2; #total number of guided modes\n", + "\n", + "#Result\n", + "print \"total number of guided modes is\",int(N)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.9, Page number 10.63" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.46\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.46; #refractive index of core\n", + "delta=0.05; #refractive index difference\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 10.10, Page number 10.63" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V number is 94.72\n", + "maximum number of modes is 4486.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=50;\n", + "n2=1.5; #refractive index of cladding\n", + "n1=1.53; #refractive index of core\n", + "lamda0=1; #wavelength(micro m)\n", + "\n", + "#Calculation\n", + "V_number=round(2*math.pi*a*math.sqrt(n1**2-n2**2)/lamda0,2); #V number\n", + "n=V_number**2/2; #maximum number of modes\n", + "\n", + "#Result\n", + "print \"V number is\",V_number\n", + "print \"maximum number of modes is\",round(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.11, Page number 10.63" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of modes is 49178.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=100*10**-6;\n", + "NA=0.3; #numerical aperture(m)\n", + "lamda=850*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "V_number=round(2*math.pi**2*a**2*NA**2/lamda**2); #number of modes\n", + "\n", + "#Result\n", + "print \"total number of modes is\",2*V_number" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.12, Page number 10.63" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength is 1.315 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=25*10**-6;\n", + "n1=1.48; #refractive index of core\n", + "delta=0.01; #refractive index difference\n", + "V=25; #Vnumber\n", + "\n", + "#Calculation\n", + "lamda=2*math.pi*a*n1*math.sqrt(2*delta)/V; #cutoff wavelength(m)\n", + "\n", + "#Result\n", + "print \"cutoff wavelength is\",round(lamda*10**6,3),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.13, Page number 10.63" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum value of core radius is 9.95 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2.405; #Vnumber\n", + "lamda=1.3; #wavelength(micro m)\n", + "NA=0.05; #numerical aperture(m)\n", + "\n", + "#Calculation\n", + "amax=V*lamda/(2*math.pi*NA); #maximum value of core radius(micro m)\n", + "\n", + "#Result\n", + "print \"maximum value of core radius is\",round(amax,2),\"micro 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/Materials_Science_by_Dr._M._Arumugam/Chapter12.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter12.ipynb new file mode 100755 index 00000000..c8688bf4 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter12.ipynb @@ -0,0 +1,454 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#12: Mechanical Behaviour of Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.1, Page number 12.115" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yield strength is 86.026 kg/mm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "sigma0=8.55;\n", + "K=2.45; \n", + "sigma=10**-3; #steel size(mm)\n", + "\n", + "#Calculation\n", + "sigma=sigma0+(K/math.sqrt(sigma)); #yield strength\n", + "\n", + "#Result\n", + "print \"yield strength is\",round(sigma,3),\"kg/mm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.2, Page number 12.115" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fracture strength is 0.211 GPa\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=70*10**9; #young's modulus(Pa)\n", + "gama=1; #surface energy(joule/m**2)\n", + "C=1*10**-6; #depth(m)\n", + "\n", + "#Calculation\n", + "sigma_f=math.sqrt(2*E*gama/(math.pi*C)); #fracture strength(GPa)\n", + "\n", + "#Result\n", + "print \"fracture strength is\",round(sigma_f/10**9,3),\"GPa\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.3, Page number 12.116" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ultimate tensile strength is 736.0 MPa\n", + "ductility % of elongation is 10.0 %\n", + "ductility % of reduction is 75.0 %\n", + "modulus of toughness is 49 *10**6 Pa\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ml=57800; #load(N)\n", + "d=10*10**-3; #diameter(m)\n", + "D=5; #diameter after fracture(mm)\n", + "l=50; #guage length(mm)\n", + "L=55; #length after fracture(mm)\n", + "\n", + "#Calculation\n", + "ts=ml/(math.pi*(d/2)**2); #ultimate tensile strength(MPa)\n", + "de=(L-l)*100/l; #ductility % of elongation(%)\n", + "dr=((2*D)**2-D**2)*100/(2*D)**2; #ductility % of reduction(%)\n", + "t=(2/3)*ts*de/100; #modulus of toughness(Pa)\n", + "\n", + "#Result\n", + "print \"ultimate tensile strength is\",round(ts/10**6),\"MPa\"\n", + "print \"ductility % of elongation is\",de,\"%\"\n", + "print \"ductility % of reduction is\",dr,\"%\"\n", + "print \"modulus of toughness is\",int(t/10**6),\"*10**6 Pa\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.4, Page number 12.116" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "elastic strain in 1st case is 0.001\n", + "ratio of elastic and plastic strain in 2nd case is 2.5 %\n", + "ratio of elastic and plastic strain in 3rd case is 1.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "pl1=206850*10**3; #proportional limit(Pa)\n", + "pl2=310275*10**3; #proportional limit(Pa)\n", + "pl3=413700*10**3; #proportional limit(Pa)\n", + "s2=0.0615; #strain\n", + "s3=0.2020; #strain\n", + "Y=2.0685*10**11; #young's modulus(Pa)\n", + "\n", + "#Calculation\n", + "e1=pl1/Y; #elastic strain in 1st case\n", + "e2=pl2/Y; #elastic strain in 2nd case\n", + "p2=s2-e2; #plastic strain in 2nd case\n", + "r2=e2*100/p2; #ratio of elastic and plastic strain in 2nd case\n", + "e3=pl3/Y; #elastic strain in 2nd case \n", + "p3=s3-e3; #plastic strain in 2nd case \n", + "r3=e3*100/p3; #ratio of elastic and plastic strain in 3rd case\n", + "\n", + "#Result\n", + "print \"elastic strain in 1st case is\",e1\n", + "print \"ratio of elastic and plastic strain in 2nd case is\",r2,\"%\"\n", + "print \"ratio of elastic and plastic strain in 3rd case is\",r3,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.5, Page number 12.117" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective modulus is 738750.0 *10**3 Pa\n", + "cross sectional area is 1.0831 *10**-4 m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "s=12411*10**3; #stress(Pa)\n", + "t=0.0168; #tension\n", + "e=0.127; #elongation(cm)\n", + "l=15.24; #length(cm)\n", + "g=9.8;\n", + "L=68.04; #load(kg)\n", + "\n", + "#Calculation\n", + "E_eff=s/t; #effective modulus(Pa)\n", + "S=e/l; \n", + "W=E_eff*S;\n", + "A=L*g/W; #cross sectional area(m**2)\n", + "\n", + "#Result\n", + "print \"effective modulus is\",E_eff/10**3,\"*10**3 Pa\"\n", + "print \"cross sectional area is\",round(A*10**4,4),\"*10**-4 m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.6, Page number 12.117" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature is 229.0 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=35*10**10; #youngs modulus(Pa)\n", + "gama=2; #specific surface energy(J/m**2)\n", + "C=2*10**-6; #length(m)\n", + "x=17700; \n", + "y=2.1;\n", + "z=31.25;\n", + "\n", + "#Calculation\n", + "sigma_f=math.sqrt(2*E*gama/(math.pi*C)); #fracture stress(Pa)\n", + "T=x/((sigma_f/(9.8*10**6))-y+z); #transition temperature(K)\n", + "\n", + "#Result\n", + "print \"transition temperature is\",round(T),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.7, Page number 12.118" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical resolved shear stress is 0.898 MPa\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h1=1;\n", + "h2=1;\n", + "k1=1;\n", + "k2=1;\n", + "l1=1;\n", + "l2=1;\n", + "l3=0;\n", + "s=3.5*10**6; #stress(Pa)\n", + "\n", + "#Calculation\n", + "x=math.sqrt(h1**2+k1**2+l1**2);\n", + "y=math.sqrt(h2**2+k2**2+l2**2);\n", + "z=math.sqrt(h2**2+k2**2+l3**2);\n", + "cos_phi=((h1*h2)-(k1*k2)+(l1*l2))/(x*y);\n", + "sin_phi=math.sqrt(1-(cos_phi)**2);\n", + "cos_theta=((h1*h2)+(k1*k2)+(l1*l3))/(x*z);\n", + "ss=s*cos_theta*cos_phi*sin_phi; #critical resolved shear stress(Pa)\n", + "\n", + "#Result\n", + "print \"critical resolved shear stress is\",round(ss/10**6,3),\"MPa\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.8, Page number 12.119" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "activation energy is 192.393 kJ/mol\n", + "answer varies due to rounding off errors\n", + "diffusion coefficient is 0.394 *10**-4 m**2/s\n", + "diffusivity at 300 C is 11.37 *10**-23 m**2/s\n", + "diffusivity at 700 C is 1.846 *10**-15 m**2/s\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", + "dz1=4*10**-18; #diffusivity(m**2/s)\n", + "dz2=5*10**-13; #diffusivity(m**2/s)\n", + "T1=773; #temperature(K)\n", + "T2=1273; #temperature(K)\n", + "T3=573; #temperature(K)\n", + "T4=973; #temperature(K)\n", + "\n", + "#Calculation\n", + "x1=round(math.log(dz1),2);\n", + "y1=round(math.log(dz2),3);\n", + "x2=round(-1/(8.314*T1),7);\n", + "y2=round(-1/(8.314*T2),7);\n", + "x=round((x1-y1),3);\n", + "y=round((x2-y2),6);\n", + "Q=x/y; #activation energy(J/mol)\n", + "z=round(y1-(y2*Q),4);\n", + "D0=math.exp(z); #diffusion coefficient(m**2/Vs)\n", + "D1=D0*math.exp(-Q/(8.314*T3)); #diffusivity at 300 C(m**2/s)\n", + "D2=D0*math.exp(-Q/(8.314*T4)); #diffusivity at 700 C(m**2/s)\n", + "\n", + "#Result\n", + "print \"activation energy is\",round(Q/10**3,3),\"kJ/mol\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"diffusion coefficient is\",round(D0*10**4,3),\"*10**-4 m**2/s\"\n", + "print \"diffusivity at 300 C is\",round(D1*10**23,2),\"*10**-23 m**2/s\"\n", + "print \"diffusivity at 700 C is\",round(D2*10**15,3),\"*10**-15 m**2/s\"\n", + "print \"answer given in the book is wrong\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 12.9, Page number 12.119" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diffusion is 4.9 *10**-15 m**2/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D0=0.73*10**-4; #diffusion coefficient(m**2/s)\n", + "Q=170*10**3; #activation energy(J/mol)\n", + "R=8.314; \n", + "T=873; #temperature(K)\n", + "\n", + "#Calculation\n", + "D=D0*math.exp(-Q/(R*T)); #diffusion(m**2/s)\n", + "\n", + "#Result\n", + "print \"diffusion is\",round(D*10**15,1),\"*10**-15 m**2/s\"" + ] + } + ], + "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/Materials_Science_by_Dr._M._Arumugam/Chapter2.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter2.ipynb new file mode 100755 index 00000000..aebad8dd --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter2.ipynb @@ -0,0 +1,151 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#2: Chemical Bonds" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 2.1, Page number 2.21" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "young's modulus is 157 GPa\n" + ] + } + ], + "source": [ + "#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration\n", + "#importing modules\n", + "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 number 2.2, Page number 2.22" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective charge is 0.72 *10**-19 coulomb\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", + "dm=1.98*(10**-29)*(1/3); #dipole moment\n", + "l=0.92*10**-10; #bond length(m)\n", + "\n", + "#Calculation\n", + "ec=dm/l; #effective charge(coulomb)\n", + "\n", + "#Result\n", + "print \"effective charge is\",round(ec*10**19,2),\"*10**-19 coulomb\"\n", + "print \"answer given in the 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/Materials_Science_by_Dr._M._Arumugam/Chapter3.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter3.ipynb new file mode 100755 index 00000000..0f0c7e9c --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter3.ipynb @@ -0,0 +1,503 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#3: Elementary Crystallography" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.2, Page number 3.50" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing between (100) plane is 5.64 angstrom\n", + "spacing between (110) plane is 3.99 angstrom\n", + "spacing between (111) plane is 3.26 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=5.64; #lattice constant(angstrom)\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", + "\n", + "#Calculation\n", + "d100=a/math.sqrt(h1**2+k1**2+l1**2); #spacing between (100) plane\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #spacing between (110) plane\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #spacing between (111) plane\n", + "\n", + "#Result\n", + "print \"spacing between (100) plane is\",d100,\"angstrom\"\n", + "print \"spacing between (110) plane is\",round(d110,2),\"angstrom\"\n", + "print \"spacing between (111) plane is\",round(d111,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.3, Page number 3.51" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms in (100) is 1.535 *10**13 atoms/mm**2\n", + "number of atoms in (110) is 1.085 *10**13 atoms/mm**2\n", + "number of atoms in (111) is 1.772 *10**13 atoms/mm**2\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", + "a=3.61*10**-7; #lattice constant(mm)\n", + "\n", + "#Calculation\n", + "A100=a**2; #surface area(mm**2)\n", + "n=1+(4*(1/4));\n", + "N1=n/A100; #number of atoms in (100)(per mm**2)\n", + "A110=math.sqrt(2)*a**2; #surface area(mm**2)\n", + "N2=n/A110; #number of atoms in (110)(per mm**2)\n", + "A111=math.sqrt(3)*a**2/2; #surface area(mm**2)\n", + "N3=n/A111; #number of atoms in (110)(per mm**2)\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) is\",round(N1/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (110) is\",round(N2/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (111) is\",round(N3/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example number 3.4, Page number 3.52" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of x rays is 1.552 angstrom\n", + "answer varies due to rounding off errors\n", + "energy of x rays is 8 *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; #atomic weight\n", + "rho=10500; #density(kg/m**3)\n", + "N=6.02*10**26; #number of molecules\n", + "theta=19+(12/60); #angle(degrees)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "h0=6.625*10**-34; #planck constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "a=(n*A/(N*rho))**(1/3);\n", + "d=a*10**10/math.sqrt(h**2+k**2+l**2); \n", + "lamda=2*d*math.sin(theta); #wavelength of x rays(angstrom)\n", + "E=h0*c/(lamda*10**-10*e); #energy of x rays(eV)\n", + "\n", + "#Result\n", + "print \"wavelength of x rays is\",round(lamda,3),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"energy of x rays is\",int(E/10**3),\"*10**3 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.5, Page number 3.52" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density is 2332 kg/m**3\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", + "n=8; #number of atoms\n", + "r=2.351*10**-10; #bond length(angstrom)\n", + "A=28.09; #Atomic wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); \n", + "rho=n*A/(N*a**3); #density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density is\",int(rho),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##Example number 3.6, Page number 3.53" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of largest sphere is 0.1547 r\n", + "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", + "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\",round(R1/r,4),\"r\"\n", + "print \"maximum radius of sphere is\",round(R2/r,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.7, Page number 3.54" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percent volume change is 0.5 %\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,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.8, Page number 3.55" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of vacancies at 0K is 0 per mol\n", + "number of vacancies at 300K is 768.0 per mol\n", + "number of vacancies at 900K is 6.53 *10**16 per mol\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_Hf=120*10**3; \n", + "T1=0; #temperature(K)\n", + "T2=300; #temperature(K)\n", + "n1=0;\n", + "N=6.022*10**23;\n", + "R=8.314;\n", + "T3=900; #temperature(K)\n", + "\n", + "#Calculation\n", + "n2=N*math.exp(-delta_Hf/(R*T2)); #number of vacancies at 300K(per mol)\n", + "n3=N*math.exp(-delta_Hf/(R*T3)); #number of vacancies at 900K(per mol)\n", + "\n", + "#Result\n", + "print \"number of vacancies at 0K is\",n1,\"per mol\"\n", + "print \"number of vacancies at 300K is\",round(n2),\"per mol\"\n", + "print \"number of vacancies at 900K is\",round(n3/10**16,2),\"*10**16 per mol\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.9, Page number 3.56" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing of crystal is 1.824 angstrom\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", + "theta1=6.45; #angle(degrees)\n", + "theta2=9.15; #angle(degrees)\n", + "theta3=13; #angle(degrees)\n", + "lamda=0.58; #wavelength(angstrom)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "theta3=theta3*math.pi/180; #angle(radian)\n", + "d=lamda/(2*math.sin(theta2)); #interplanar spacing of crystal(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing of crystal is \",round(d,3),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.10, Page number 3.56" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter of lead is 4.1 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1; #order of diffraction\n", + "lamda=1.54*10**-10; #wavelength(m)\n", + "theta=32; #angle(degrees)\n", + "h=2;\n", + "k=2;\n", + "l=0;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta));\n", + "a=d*math.sqrt(h**2+k**2+l**2); #lattice parameter of lead(m)\n", + "\n", + "#Result\n", + "print \"lattice parameter of lead is\",round(a*10**10,1),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 3.11, Page number 3.57" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount of climb down is 0.36915 *10**-8 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_Hf=1.6*10**-19; \n", + "T=500; #temperature(K)\n", + "N=6.026*10**23;\n", + "k=1.38*10**-23; #boltzmann constant\n", + "mv=5.55; #molar volume(cm**3)\n", + "ne=10**6; #number of edge dislocations(per cm**3)\n", + "v=5*10**7; #number of vacancies\n", + "a=2*10**-8; #lattice parameter(cm)\n", + "\n", + "#Calculation\n", + "n=(N/mv)*math.exp(-delta_Hf/(k*T)); #number of vacancies at 300K(per mol)\n", + "ac=n*a/(v*ne); #amount of climb down(cm)\n", + "\n", + "#Result\n", + "print \"amount of climb down is\",round(ac*10**8,5),\"*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/Materials_Science_by_Dr._M._Arumugam/Chapter4.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter4.ipynb new file mode 100755 index 00000000..8da77cca --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter4.ipynb @@ -0,0 +1,370 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#4: Electron Theory of Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.1, Page number 4.57" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de broglie wavelength is 0.00286 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "E=10**4*1.6*10**-19; #kinetic energy(J)\n", + "m=1.675*10**-27; #mass(kg)\n", + "h=6.625*10**-34; #planck's constant\n", + "\n", + "#Calculation\n", + "v=math.sqrt(2*E/m); #velocity(m/s)\n", + "lamda=h/(m*v); #de broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de broglie wavelength is\",round(lamda*10**10,5),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.2, Page number 4.58" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy difference is 1.81 *10**-37 J\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", + "\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", + "\n", + "#Result\n", + "print \"energy difference is\",round(E*10**37,2),\"*10**-37 J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.3, Page number 4.58" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "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.4, Page number 4.58" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy is 3.15 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),2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.5, Page number 4.59" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work function is 4.14 eV\n", + "maximum kinetic energy is 0.758 eV\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", + "h=6.625*10**-34; #planck's constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "lamda0=3000*10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "lamda=2536*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "hf0=c*h/(lamda0*e); #work function(eV)\n", + "E=c*h*((1/lamda)-(1/lamda0))/e; #maximum kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"work function is\",round(hf0,2),\"eV\"\n", + "print \"maximum kinetic energy is\",round(E,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.6, Page number 4.59" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lowest energy of neutron is 2.05 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "hbar=1.054*10**-34; \n", + "m=1.67*10**-27; #mass of neutron(kg)\n", + "a=10**-14; #size(m)\n", + "\n", + "#Calculation\n", + "E=n**2*math.pi**2*hbar**2/(2*m*a**2); #lowest energy of neutron(J)\n", + "\n", + "#Result\n", + "print \"lowest energy of neutron is\",round(E/(1.6*10**-13),2),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.7, Page number 4.59" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of particle is 0.0158\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration\n", + "k=1;\n", + "\n", + "#Calculation\n", + "def zintg(x):\n", + "\treturn math.exp(-2*k*x)\n", + "\n", + "a=quad(zintg,2/k,3/k)[0]; #probability of particle\n", + "\n", + "#Result\n", + "print \"probability of particle is\",round(2*a,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 4.8, Page number 4.60" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage appeared is 1.83 mV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=10**-2; #current(ampere)\n", + "A=0.01*0.001; #area(m**2)\n", + "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n", + "Bz=0.5; #magnetic induction(weber/m**2)\n", + "\n", + "#Calculation\n", + "Jx=i/A; \n", + "Ey=RH*Bz*Jx; \n", + "Vy=Ey*i; #voltage appeared(V)\n", + "\n", + "#Result\n", + "print \"voltage appeared is\",Vy*10**3,\"mV\"" + ] + } + ], + "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/Materials_Science_by_Dr._M._Arumugam/Chapter5.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter5.ipynb new file mode 100755 index 00000000..2e530c83 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter5.ipynb @@ -0,0 +1,303 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#5: Conducting Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.1, Page number 5.34" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "drift speed is 36.6 *10**-5 m/s\n", + "mean free path is 3.34 *10**-8 m\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", + "Na=6.023*10**26; #avagadro number\n", + "e=1.602*10**-19;\n", + "d=8960; #density\n", + "N=1; #number of free electrons\n", + "w=63.54; #atomic weight\n", + "i=10; #current(ampere)\n", + "m=9.1*10**-31; \n", + "rho=2*10**-8; #resistivity(ohm m)\n", + "r=0.08*10**-2; #radius(m)\n", + "c=1.6*10**6; #mean thermal velocity(m/s)\n", + "\n", + "#Calculation\n", + "A=math.pi*r**2; #area(m**2)\n", + "n=Na*d*N/w;\n", + "vd=i/(A*n*e); #drift speed(m/s)\n", + "tow_c=m/(n*e**2*rho);\n", + "lamda=tow_c*c; #mean free path(m)\n", + "\n", + "#Result\n", + "print \"drift speed is\",round(vd*10**5,1),\"*10**-5 m/s\"\n", + "print \"mean free path is\",round(lamda*10**8,2),\"*10**-8 m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.2, Page number 5.35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity is 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", + "e=1.602*10**-19;\n", + "m=9.1*10**-31; #mass(kg)\n", + "tow=2*10**-14; #time(s)\n", + "n=8.5*10**28; \n", + "\n", + "#Calculation\n", + "sigma=n*e**2*tow/m; #electrical conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"electrical conductivity is\",round(sigma/10**7,1),\"*10**7 ohm-1 m-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.3, Page number 5.35" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relaxation time is 4.0 *10**-14 s\n", + "mobility of electrons is 7.0 *10**-3 m**2/Vs\n", + "drift velocity is 0.7 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "m=9.1*10**-31; #mass(kg)\n", + "n=5.8*10**28; \n", + "rho=1.54*10**-8; #resistivity(ohm m)\n", + "E=1*10**2;\n", + "\n", + "#Calculation\n", + "tow=m/(rho*n*e**2); #relaxation time(s)\n", + "mew_e=1/(rho*e*n); #mobility of electrons(m**2/Vs)\n", + "vd=mew_e*E; #drift velocity(m/s)\n", + "\n", + "#Result\n", + "print \"relaxation time is\",round(tow*10**14),\"*10**-14 s\"\n", + "print \"mobility of electrons is\",round(mew_e*10**3),\"*10**-3 m**2/Vs\"\n", + "print \"drift velocity is\",round(vd,1),\"m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.4, Page number 5.35" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistivity is 5.51 *10**-8 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=1.7*10**-8; #resistivity(ohm m)\n", + "T=300; #temperature(K)\n", + "T1=973; #temperature(K)\n", + "\n", + "#Calculation\n", + "a=rho/T; \n", + "rho_973=a*T1; #resistivity(ohm m)\n", + "\n", + "#Result\n", + "print \"resistivity is\",round(rho_973*10**8,2),\"*10**-8 ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.5, Page number 5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "increase of resistivity is 0.54 *10**-8 ohm m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho1=1.2*10**-8; #resistivity(ohm m)\n", + "rho2=0.12*10**-8; #resistivity(ohm m)\n", + "p1=0.4; #atomic percent\n", + "p2=0.5; #atomic percent\n", + "rho=1.5*10**-8; #resistivity(ohm m)\n", + "\n", + "#Calculation\n", + "rho_i=(rho1*p1)+(rho2*p2); #increase of resistivity(ohm m)\n", + "Tr=rho+rho_i; #total resistivity of copper alloy(ohm m)\n", + "\n", + "#Result\n", + "print \"increase of resistivity is\",round(rho_i*10**8,2),\"*10**-8 ohm m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 5.6, Page number 5.36" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrical conductivity is 1.688 *10**7 ohm-1 m-1\n", + "thermal conductivity is 123.93 W/m/K\n", + "lorentz number is 2.447 *10**-8 watt ohm K-2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "m=9.1*10**-31; #mass(kg)\n", + "n=6*10**28; #density(per m**3)\n", + "tow=10**-14; #relaxation time(s)\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "\n", + "#Calculation\n", + "sigma=n*e**2*tow/m; #electrical conductivity(ohm-1 m-1)\n", + "K=n*math.pi**2*k**2*T*tow/(3*m); #thermal conductivity(W/m/K)\n", + "L=K/(sigma*T); #lorentz number(watt ohm K-2)\n", + "\n", + "#Result\n", + "print \"electrical conductivity is\",round(sigma/10**7,3),\"*10**7 ohm-1 m-1\"\n", + "print \"thermal conductivity is\",round(K,2),\"W/m/K\"\n", + "print \"lorentz number is\",round(L*10**8,3),\"*10**-8 watt ohm K-2\"" + ] + } + ], + "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/Materials_Science_by_Dr._M._Arumugam/Chapter6.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter6.ipynb new file mode 100755 index 00000000..8da69c01 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter6.ipynb @@ -0,0 +1,308 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#6: Dielectric Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.34" + ] + }, + { + "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 6.2, Page number 6.34" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC dielectric loss is 1 *10**-3 watt\n", + "AC dielectric loss is 22.22 *10**-3 watt\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=10**10; #resistivity(ohm m)\n", + "d=10**-3; #thickness(m)\n", + "A=10**4*10**-6; #area(m**2)\n", + "V=10**3; #voltage(V)\n", + "f=50; #power frequency(Hz)\n", + "epsilonr=8;\n", + "epsilon0=8.84*10**-12;\n", + "tan_delta=0.1;\n", + "\n", + "#Calculation\n", + "Rv=rho*d/A; \n", + "dl_DC=V**2/Rv; #DC dielectric loss(watt)\n", + "C=A*epsilon0*epsilonr/d;\n", + "dl_AC=V**2*2*math.pi*f*C*tan_delta; #AC dielectric loss(watt)\n", + "\n", + "#Result\n", + "print \"DC dielectric loss is\",int(dl_DC*10**3),\"*10**-3 watt\"\n", + "print \"AC dielectric loss is\",round(dl_AC*10**3,2),\"*10**-3 watt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.35" + ] + }, + { + "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 6.4, Page number 6.35" + ] + }, + { + "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 6.5, Page number 6.36" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitance is 226.3 *10**-12 farad\n", + "parallel loss resistance is 10 mega ohm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.08*10**-3; #thickness(m)\n", + "A=8*10**-4; #area(m**2)\n", + "epsilonr=2.56;\n", + "epsilon0=8.84*10**-12;\n", + "tan_delta=0.7*10**-4;\n", + "new=10**6; #frequency(Hz)\n", + "\n", + "#Calculation\n", + "C=A*epsilon0*epsilonr/d; #capacitance(farad)\n", + "epsilonrdash=tan_delta*epsilonr;\n", + "omega=2*math.pi*new;\n", + "R=d/(epsilon0*epsilonrdash*omega*A); #parallel loss resistance(ohm)\n", + "\n", + "#Result\n", + "print \"capacitance is\",round(C*10**12,1),\"*10**-12 farad\"\n", + "print \"parallel loss resistance is\",int(R/10**6),\"mega ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.36" + ] + }, + { + "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/Materials_Science_by_Dr._M._Arumugam/Chapter7.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter7.ipynb new file mode 100755 index 00000000..df8d9205 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter7.ipynb @@ -0,0 +1,288 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#7: Magnetic Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 7.1, Page number 7.36" + ] + }, + { + "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 7.2, Page number 7.36" + ] + }, + { + "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 7.3, Page number 7.36" + ] + }, + { + "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 7.4, Page number 7.36" + ] + }, + { + "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 7.5, Page number 7.37" + ] + }, + { + "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 7.6, Page number 7.37" + ] + }, + { + "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/Materials_Science_by_Dr._M._Arumugam/Chapter8.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter8.ipynb new file mode 100755 index 00000000..5b490a55 --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter8.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#8: Superconducting Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 8.2, Page number 8.16" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 33.64 *10**3 ampere/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=64*10**3; #initial field(ampere/m)\n", + "T=5; #temperature(K)\n", + "Tc=7.26; #transition temperature(K)\n", + "\n", + "#Calculation\n", + "H=H0*(1-(T/Tc)**2); #critical field(ampere/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(H/10**3,2),\"*10**3 ampere/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/Materials_Science_by_Dr._M._Arumugam/Chapter9.ipynb b/Materials_Science_by_Dr._M._Arumugam/Chapter9.ipynb new file mode 100755 index 00000000..2a72be5d --- /dev/null +++ b/Materials_Science_by_Dr._M._Arumugam/Chapter9.ipynb @@ -0,0 +1,276 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#9: Semiconducting Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 9.1, Page number 9.23" + ] + }, + { + "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 9.2, Page number 9.24" + ] + }, + { + "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 9.3, Page number 9.25" + ] + }, + { + "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 9.4, Page number 9.25" + ] + }, + { + "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 9.5, Page number 9.26" + ] + }, + { + "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\"" + ] + } + ], + "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/Mechanical_Metallurgy/screenshots/py1.png b/Mechanical_Metallurgy/screenshots/py1.png new file mode 100755 index 00000000..f216d853 Binary files /dev/null and b/Mechanical_Metallurgy/screenshots/py1.png differ diff --git a/Mechanical_Metallurgy/screenshots/py3.png b/Mechanical_Metallurgy/screenshots/py3.png new file mode 100755 index 00000000..c87fc694 Binary files /dev/null and b/Mechanical_Metallurgy/screenshots/py3.png differ diff --git a/Mechanical_Metallurgy/screenshots/py4.png b/Mechanical_Metallurgy/screenshots/py4.png new file mode 100755 index 00000000..b9808f9d Binary files /dev/null and b/Mechanical_Metallurgy/screenshots/py4.png differ diff --git a/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_1.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_1.ipynb new file mode 100755 index 00000000..7660f24c --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_1.ipynb @@ -0,0 +1,73 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Introduction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1.1, Shear Stress, Page No. 16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Shear Stress Required to nucleate a grain boundary crack in high temperature deformation = 158.887 MPa\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "from math import pi\n", + "from math import sqrt\n", + "y_b=2;\n", + "G=75;\n", + "G=G*10**9; #conversion to Pa\n", + "L=0.01;\n", + "L=L*10**-3; #conversion to m\n", + "nu=0.3;\n", + "\n", + "#calculation\n", + "T=sqrt((3*pi*y_b*G)/(8*(1-nu)*L));\n", + "T=T/10**6;\n", + "\n", + "#result\n", + "print ('Shear Stress Required to nucleate a grain boundary crack in high temperature deformation = %g MPa') %(T)" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_11.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_11.ipynb new file mode 100755 index 00000000..c0c024dd --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_11.ipynb @@ -0,0 +1,165 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Fracture Mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.1, Fracture Toughness, Page No. 354" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since Fracture Toughness of the material is = 172.852 MPa\n", + " and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt\n", + "from math import pi\n", + "from math import cos\n", + "\n", + "#variable declaration\n", + "a=5;\n", + "a=a*10**-3; #conversion to m\n", + "t=1.27; #in cm\n", + "t=t*10**-2; #conversion to m\n", + "def sec(x):\n", + " return 1/cos(x);\n", + "\n", + "#calculation\n", + "K_Ic=24;\n", + "sigma=K_Ic/(sqrt(pi*a)*sqrt(sec(pi*a/(2*t))));\n", + "\n", + "#result\n", + "print('Since Fracture Toughness of the material is = %g MPa\\n and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture')%(sigma);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.2, Fracture Toughness, Page No. 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Critical Crack depth = 15.4981 mm\n", + "which is greater than the thickness of the vessel wall, 12mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "K_Ic=57;\n", + "sigma0=900;\n", + "sigma=360;\n", + "Q=2.35;\n", + "\n", + "#calculation\n", + "a_c=K_Ic**2*Q/(1.21*pi*sigma**2);\n", + "a_c=a_c*1000; #conversion to mm\n", + "\n", + "#result\n", + "print('\\nCritical Crack depth = %g mm\\nwhich is greater than the thickness of the vessel wall, 12mm')%(a_c);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 11.3, Plasticity, Page No. 361" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Plastic zone size = 0.113177 mm\n", + "Stress Intensity Factor = 42.8659 MPa m^(1/2)\n", + "\n", + "\n", + "Note: Calculation Errors in book\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "a=10;\n", + "a=a*10**-3; #conversion to m\n", + "sigma=400;\n", + "sigma0=1500;\n", + "\n", + "#calculation\n", + "rp=sigma**2*a/(2*pi*sigma0**2);\n", + "rp=rp*1000; #conversion to mm\n", + "K=sigma*sqrt(pi*a);\n", + "K_eff=sigma*sqrt(pi*a)*sqrt(a+pi*rp);\n", + "\n", + "#result\n", + "print('\\nPlastic zone size = %g mm\\nStress Intensity Factor = %g MPa m^(1/2)\\n\\n\\nNote: Calculation Errors in book')%(rp,K_eff);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_12.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_12.ipynb new file mode 100755 index 00000000..ac9b05ec --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_12.ipynb @@ -0,0 +1,346 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Fatigue of Metals" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 12.1, Mean Stress, Page No. 387" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Bar Diameter = 1.45673 in\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "sigma_u=158; # in ksi\n", + "sigma0=147; # in ksi\n", + "sigma_e=75; # in ksi\n", + "l_max=75; # in ksi\n", + "l_min=-25; # in ksi\n", + "sf=2.5;\n", + "\n", + "#calculation\n", + "sigma_m=(l_max+l_min)/2;\n", + "sigma_a=(l_max-l_min)/2;\n", + "sigma_e=sigma_e/sf;\n", + "A=sigma_a/sigma_e+sigma_m/sigma_u;\n", + "D=sqrt(4*A/pi);\n", + "\n", + "#result\n", + "print('\\nBar Diameter = %g in')%(D);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.2, Low Cycle Fatigue, Page No. 391" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "d_e_e = 0.000681818\n", + "d_e_p = 0.000608182\n", + "Number of Cycles = 48884 cycles\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "sigma_b=75.0;\n", + "e_b=0.000645;\n", + "e_f=0.3;\n", + "E=22*10**4;\n", + "c=-0.6;\n", + "\n", + "#calculation\n", + "d_e_e=float(2*sigma_b/E);\n", + "d_e_p=2*e_b-d_e_e;\n", + "N=((d_e_p/(2*e_f))**(1/c))/2;\n", + "\n", + "#result\n", + "print('\\nd_e_e = %g\\nd_e_p = %g\\nNumber of Cycles = %g cycles')%(d_e_e,d_e_p,N);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.3, Fatigue Crack Proportion, Page No. 401" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fatigue Cycles = 261417 cycles\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "ai=0.5;\n", + "ai=ai*10**-3; #conversion to m\n", + "sigma_max=180.0;\n", + "Kc=100.0;\n", + "alpha=1.12;\n", + "p=3.0;\n", + "A=6.9*10**-12;\n", + "\n", + "#calculation\n", + "af=(Kc/(sigma_max*alpha))**2/pi;\n", + "Nf=float(af**(1-(p/2))-ai**(1-(p/2)))/float((1-p/2)*A*(sigma_max**3)*(pi**(p/2))*(alpha**p));\n", + "\n", + "#result\n", + "print('Fatigue Cycles = %g cycles')%(Nf);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.4, Stress Concentration of Fatigue, Page No. 404" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Mean Stress = 25464.8 psi\n", + "Fluctuating Bending Stress = 33658.4 psi\n", + "Effective Maximum Stress = 59123.2 psi\n", + "Effective Minimum Stress = 8193.63 psi\n", + "sigma_a = 39834.1 psi\n", + "\n", + "\n", + "Note: Calculation Errors in the book\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import sqrt\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "rho=0.0004;\n", + "S_u=190000;\n", + "M=200;\n", + "Pm=5000;\n", + "D=0.5;\n", + "dh=0.05;\n", + "r=dh/2;\n", + "Kt=2.2;\n", + "\n", + "#calculation\n", + "Kf=1+(Kt-1)/(1+sqrt(rho/r));\n", + "q=(Kf-1)/(Kt-1);\n", + "A=pi/4*D**2;\n", + "sigma_m=Pm/A;\n", + "I=pi/64*D**4;\n", + "sigma_a=Kf*((M*D)/(2*I));\n", + "sigma_max=sigma_a+sigma_m;\n", + "sigma_min=sigma_a-sigma_m;\n", + "sigma_e=S_u/2;\n", + "sigma_a1=sigma_e/Kf*(1-sigma_m/S_u);\n", + "\n", + "#result\n", + "print('\\nMean Stress = %g psi\\nFluctuating Bending Stress = %g psi\\nEffective Maximum Stress = %g psi\\nEffective Minimum Stress = %g psi\\nsigma_a = %g psi\\n\\n\\nNote: Calculation Errors in the book')%(sigma_m,sigma_a,sigma_max,sigma_min,sigma_a1);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.5, Infinite Life Design, Page No. 422" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Fatigue Limit = 14245.3 psi\n" + ] + } + ], + "source": [ + "\n", + "#variable declaration\n", + "Kt=1.68;\n", + "q=0.9;\n", + "sigma_ed=42000;\n", + "Cs=0.9;\n", + "Cf=0.75;\n", + "Cz=0.81;\n", + "\n", + "#calculation\n", + "Kf=q*(Kt-1)+1;\n", + "sigma_e=sigma_ed*Cs*Cf*Cz;\n", + "sigma_en=sigma_e/Kf;\n", + "\n", + "#result\n", + "print('\\nFatigue Limit = %g psi')%(sigma_en);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 12.6, Local Strain method, Page No. 424" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Number of cycles = 14785.5 cycles\n", + "Fatigue damage per cycle = 6.7634e-05\n", + "Number of cycles with correction of mean stress= 129289 cycles\n", + "Fatigue damage per cycle with correction of mean stress= 7.7346e-06 damage per year\n", + "Shaft will fail in 2.2446 days\n" + ] + } + ], + "source": [ + "\n", + "from scipy.optimize import fsolve\n", + "\n", + "#variable declaration\n", + "K=189;\n", + "n=0.12;\n", + "ef=1.06;\n", + "sigma_f=190;\n", + "b=-0.08;\n", + "c=-0.66;\n", + "E=30000000.0;\n", + "E=E/1000; #conversion to ksi\n", + "s=200.0;\n", + "sigma_m=167.0;\n", + "sigma_a=17.0;\n", + "se=s**2/E;\n", + "\n", + "#calculation\n", + "def f(ds):\n", + " return (ds**2)/(2*E)+(ds**((1+n)/n))/((2*K)**(1/n))-se/2;\n", + "ds=fsolve(f,1)\n", + "de=se/ds;\n", + "def f1(N2):\n", + " return (N2**(b))*(sigma_f/E)+ef*(N2**(c))-de/2;\n", + "N2=fsolve(f1,1);\n", + "N_1=N2/2;\n", + "de_e2=sigma_a/E;\n", + "def f2(N2):\n", + " return (N2**b)*((sigma_f-sigma_m)/E)+ef*(N2**c)-de_e2;\n", + "N2=fsolve(f2,1);\n", + "N_2=N2/2;\n", + "C_pd=2*60*60*8;\n", + "f=N_2/C_pd;\n", + "\n", + "#result\n", + "print('\\nNumber of cycles = %g cycles\\nFatigue damage per cycle = %g\\nNumber of cycles with correction of mean stress= %g cycles\\nFatigue damage per cycle with correction of mean stress= %g damage per year\\nShaft will fail in %g days')%(N_1,1/N_1,N_2,1/N_2,f);\n" + ] + }, + { + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_13.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_13.ipynb new file mode 100755 index 00000000..cc8ad5e6 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_13.ipynb @@ -0,0 +1,181 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Creep and Stress Rupture" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 13.1, Engineering Creep, Page No. 461" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "-----------------------------------------------------------\n", + "\n", + "Temperature\tCreep Strength, psi\tWorking Stress, psi\n", + "\n", + "------------------------------------------------------------\n", + "\n", + "1100 F\t\t\t30000\t\t\t10000\n", + "\n", + "\n", + "1500 F\t\t\t4000\t\t\t1333\n", + "\n" + ] + } + ], + "source": [ + "\n", + "#variable declaration\n", + "sf=3;\n", + "per=1/1000;\n", + "T=[1100, 1500];\n", + "C=[30000, 4000]; \n", + "W=[0, 0];\n", + "#calculation\n", + "W[0]=C[0]/sf;\n", + "W[1]=C[1]/sf;\n", + "\n", + "#result\n", + "print('\\n-----------------------------------------------------------\\n');\n", + "print('Temperature\\tCreep Strength, psi\\tWorking Stress, psi\\n');\n", + "print('------------------------------------------------------------');\n", + "print('\\n1100 F\\t\\t\\t%i\\t\\t\\t%i\\n')%(C[0],W[0]);\n", + "print('\\n1500 F\\t\\t\\t%i\\t\\t\\t%i\\n')%(C[1],W[1]);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 13.2, Engineering Creep, Page No. 461" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Activation Energy = 157867 cal/mol\n", + "\n", + "\n", + "\n", + "Note: Calculation Errors in book\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "def C(f):\n", + " return (f-32)*5/9;\n", + "R=1.987;\n", + "T2=1300;\n", + "T1=1500;\n", + "\n", + "#calculation\n", + "T2=C(T2)+273.15;\n", + "T1=C(T1)+273.15;\n", + "e2=0.0001;\n", + "e1=0.4;\n", + "Q=R*log(e1/e2)/(1/T2-1/T1);\n", + "\n", + "#result\n", + "print('\\nActivation Energy = %g cal/mol')%(Q)\n", + "print('\\n\\n\\nNote: Calculation Errors in book');" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 13.3, Prediction of long time properties, Page No. 464" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "At T = 1200 F, P = 41500\n", + "At T = 1600 F, P = 51500\n", + "And from the master ploy of Astroploy, corresponding stress required are sigma = 78000 psi and sigma = 11000 psi\n" + ] + } + ], + "source": [ + "\n", + "from math import log10\n", + "\n", + "#variable declaration\n", + "t=10**5;\n", + "C1=20;\n", + "T1=1200;\n", + "T2=1600;\n", + "\n", + "#calculation\n", + "P_1200=(T1+460)*(log10(t)+C1);\n", + "P_1600=(T2+460)*(log10(t)+C1);\n", + "\n", + "#result\n", + "print('\\nAt T = 1200 F, P = %g\\nAt T = 1600 F, P = %g\\nAnd from the master ploy of Astroploy, corresponding stress required are sigma = 78000 psi and sigma = 11000 psi')%(P_1200,P_1600);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_14.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_14.ipynb new file mode 100755 index 00000000..bd230ae6 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_14.ipynb @@ -0,0 +1,90 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Brittle Fracture and Impact Testing" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 14.1, Stress Corrosion Cracking, Page No. 494" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Estimated Life = 11.5741 days\n", + "\n", + "\n", + "\n", + "---------------------------------\n", + "Stress, MPa\tCrack Length, mm\n", + "---------------------------------\n", + "\n", + "\t500\t\t0.105226\n", + "\n", + "\t300\t\t0.292296\n", + "\n", + "\t100\t\t2.63066\n", + "\n", + "---------------------------------\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "cg=0.01;\n", + "gr=10**-8;\n", + "\n", + "#calculation\n", + "l=cg/(gr*3600*24);\n", + "K_l_SCC=10;\n", + "a_sigma2=K_l_SCC**2/(1.21*pi);\n", + "s=[500,300,100];\n", + "\n", + "#result\n", + "print('\\nEstimated Life = %g days')%(l);\n", + "print('\\n\\n\\n---------------------------------\\nStress, MPa\\tCrack Length, mm\\n---------------------------------\\n');\n", + "for i in range (0,3):\n", + " print('\\t%g\\t\\t%g\\n')%(s[i],a_sigma2*1000/s[i]**2);\n", + "print('---------------------------------');" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_15.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_15.ipynb new file mode 100755 index 00000000..4b4e7632 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_15.ipynb @@ -0,0 +1,294 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Fundamentals of Metalworking" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 15.1, Mechanics of Metal Working, Page No. 506" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Enginering Strain = 1\n", + "True Strain = 0.693147\n", + "Reduction = 1\n", + "\n", + "\n", + "Enginering Strain = -0.5\n", + "True Strain = -0.693147\n", + "Reduction = -1\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#For Bar which is double in length\n", + "#variable declaration 1\n", + "L2=2;\n", + "L1=1;\n", + "\n", + "#calculation 1\n", + "e=(L2-L1)/L1;\n", + "e1=log(L2/L1);\n", + "r=1-L1/L2;\n", + "\n", + "#result 1\n", + "print('\\nEnginering Strain = %g\\nTrue Strain = %g\\nReduction = %g')%(e,e1,r);\n", + "\n", + "\n", + "\n", + "#For bar which is halved in length\n", + "#variable declaration 2\n", + "L1=1;\n", + "L2=0.5;\n", + "\n", + "#calculation 2\n", + "e=(L2-L1)/L1;\n", + "e1=log(L2/L1);\n", + "r=1-L1/L2;\n", + "\n", + "#result 2\n", + "print('\\n\\nEnginering Strain = %g\\nTrue Strain = %g\\nReduction = %g')%(e,e1,r);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 15.2, Mechanics of Metal Working, Page No. 511" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Plastic work done in 1st step = 39752.1 lb/in^2\n", + "Plastic work done in 2nd step = 97934.8 lb/in^2\n", + "\n" + ] + } + ], + "source": [ + "\n", + "from scipy.integrate import quad\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "D0=25.0;\n", + "D1=20.0;\n", + "D2=15.0;\n", + "def integrand(e):\n", + " return 200000*e**0.5\n", + "\n", + "#calculation\n", + "ep1=log((D0/D1)**2);\n", + "U1,U1_err=quad(integrand,0,ep1);\n", + "ep2=log((D1/D2)**2);\n", + "U2,U2_err=quad(integrand,ep1,ep1+ep2);\n", + "\n", + "#result\n", + "print('\\nPlastic work done in 1st step = %g lb/in^2\\nPlastic work done in 2nd step = %g lb/in^2\\n')%(U1,U2);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 15.3, Hodography, Page No. 517" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure = 2.88675\n" + ] + } + ], + "source": [ + "\n", + "from math import sin\n", + "from math import radians\n", + "\n", + "#variable declaration\n", + "alpha=60;\n", + "\n", + "#calculation\n", + "r=radians(alpha);\n", + "mu=1/sin(r);\n", + "p_2k=mu*5/2;\n", + "\n", + "#result\n", + "print('Pressure = %g')%(p_2k);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 15.4, Temperature in Metalworking, Page No. 526" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Temperature Rise for aluminium = 78.4808 C\n", + "Temperature Rise for titanium = 162.686 C\n", + "\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "Al_s=200;\n", + "Al_e=1;\n", + "Al_p=2.69;\n", + "Al_c=0.215;\n", + "Ti_s=400;\n", + "Ti_e=1;\n", + "Ti_p=4.5;\n", + "Ti_c=0.124;\n", + "J=4.186;\n", + "b=0.95;\n", + "\n", + "#calculation\n", + "Al_Td=Al_s*Al_e*b/(Al_p*Al_c*J);\n", + "Ti_Td=Ti_s*Ti_e*b/(Ti_p*Ti_c*J);\n", + "\n", + "#result\n", + "print('\\nTemperature Rise for aluminium = %g C\\nTemperature Rise for titanium = %g C\\n')%(Al_Td,Ti_Td);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 15.5, Friction and Lubrication, Page No. 546" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "For OD after deformation being 70 mm, Di = 22.3607 mm\n", + "Precent change in inside diameter = 25.4644 percent\n", + "Peak pressure = 1.93531\n", + "\n", + "\n", + "\n", + "\n", + "For OD after deformation being 81.4 mm, Di = 35.0137 mm\n", + "Precent change in inside diameter = -16.7124 percent\n", + "Peak pressure = 1.17321\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "Do=60;\n", + "Di=30;\n", + "def1=70;\n", + "def2=81.4;\n", + "h=10;\n", + "a=30;\n", + "\n", + "#calculation1\n", + "di=sqrt((Do**2-Di**2)*2-def1**2);\n", + "pr=(Di-di)/Di*100;\n", + "m=0.27;\n", + "p_s=1+2*m*a/(sqrt(3)*h);\n", + "\n", + "#result 1\n", + "print('\\nFor OD after deformation being 70 mm, Di = %g mm\\nPrecent change in inside diameter = %g percent\\nPeak pressure = %g')%(di,pr,p_s);\n", + "\n", + "#calculation 2\n", + "di=sqrt(def2**2-(Do**2-Di**2)*2);\n", + "pr=(Di-di)/Di*100;\n", + "m=0.05;\n", + "p_s=1+2*m*a/(sqrt(3)*h);\n", + "\n", + "#result 2\n", + "print('\\n\\n\\n\\nFor OD after deformation being 81.4 mm, Di = %g mm\\nPrecent change in inside diameter = %g percent\\nPeak pressure = %g')%(di,pr,p_s);\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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_16.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_16.ipynb new file mode 100755 index 00000000..df731606 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_16.ipynb @@ -0,0 +1,131 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Forging" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 16.1, Forging in Plain Strain, Page No. 574" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "At the centerline of the slab = 63044.5 psi\n", + "\n", + "\n", + "Pressure Distributon from the centerline:\n", + "\n", + "---------------------------------\n", + "\n", + "x\tp (ksi)\t\tt_i (ksi)\n", + "\n", + "---------------------------------\n", + "\n", + "0\t63.0445\t\t15.7611\n", + "\n", + "0.25\t38.2384\t\t9.55961\n", + "\n", + "0.5\t23.1928\t\t5.7982\n", + "\n", + "0.75\t14.0671\t\t3.51678\n", + "\n", + "1\t8.53215\t\t2.13304\n", + "\n", + "1.25\t5.17501\t\t1.29375\n", + "\n", + "1.5\t3.1388\t\t0.7847\n", + "\n", + "1.75\t1.90378\t\t0.475945\n", + "\n", + "2\t1.1547\t\t0.288675\n", + "\n", + "---------------------------------\n", + "\n", + "\n", + "For sticking friction:\n", + "p_max = 10.3923 ksi\n", + "\n", + "\n", + "The Forging load = 62.7695 tons\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from math import exp\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "sigma=1000;\n", + "mu=0.25;\n", + "a=2;\n", + "b=6;\n", + "h=0.25;\n", + "x=0;\n", + "mu=0.25;\n", + "\n", + "#calculation\n", + "p_max=2*sigma*exp(2*mu*(a-x)/h)/sqrt(3);\n", + "print('\\nAt the centerline of the slab = %g psi\\n')%(p_max);\n", + "print('\\nPressure Distributon from the centerline:');\n", + "print('\\n---------------------------------\\n');\n", + "print('x\\tp (ksi)\\t\\tt_i (ksi)\\n');\n", + "print('---------------------------------\\n');\n", + "while x<=2:\n", + " p=2*sigma*exp(2*mu*(a-x)/h)/(1000*sqrt(3)); #in ksi\n", + " t_i=mu*p;\n", + " print('%g\\t%g\\t\\t%g\\n')%(x,p,t_i);\n", + " x+=0.25;\n", + "print('---------------------------------\\n');\n", + "k=sigma/sqrt(3);\n", + "x=0;\n", + "p_max1=2*sigma*((a-x)/h+1)/sqrt(3);\n", + "x1=a-h/(2*mu)*log(1/(2*mu));\n", + "p=2*sigma*(a/(2*h)+1)/sqrt(3);\n", + "P=2*p*a*b;\n", + "P=P*0.000453; #conversion to metric tons\n", + "\n", + "#result\n", + "print('\\nFor sticking friction:\\np_max = %g ksi')%(p_max1/1000);\n", + "print('\\n\\nThe Forging load = %g tons')%(P);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_17.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_17.ipynb new file mode 100755 index 00000000..b223cd0f --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_17.ipynb @@ -0,0 +1,239 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Rolling of Metals" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 17.1, Forces in rolling, Page No. 596" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Maximum possible reduction when mu is 0.08 = 0.0768 in\n", + "\n", + "Maximum possible reduction when mu is 0.5 = 3 in\n" + ] + } + ], + "source": [ + "\n", + "from math import atan\n", + "\n", + "#variable declaration\n", + "mu1=0.08;\n", + "mu2=0.5;\n", + "R=12;\n", + "\n", + "#calculation\n", + "alpha=atan(mu1);\n", + "dh1=mu1**2*R;\n", + "dh2=mu2**2*R;\n", + "\n", + "#result\n", + "print('\\nMaximum possible reduction when mu is 0.08 = %g in\\n')%(dh1);\n", + "print('Maximum possible reduction when mu is 0.5 = %g in')%(dh2);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 17.2, Rolling Load, Page No. 598" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Rolling Load = 3039.51 kips\n", + "\n", + "Rolling Load if sticking friction occurs = 5509.54 kips\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt\n", + "from math import exp\n", + "\n", + "#variable declaration\n", + "h0=1.5;\n", + "mu=0.3;\n", + "D=36;\n", + "s_en=20;\n", + "s_ex=30;\n", + "\n", + "#calculation\n", + "h1=h0-0.3*h0;\n", + "dh=h0-h1;\n", + "h_=(h1+h0)/2;\n", + "Lp=sqrt(D/2*dh);\n", + "Q=mu*Lp/h_;\n", + "sigma0=(s_en+s_ex)/2;\n", + "P=sigma0*(exp(Q)-1)*s_ex*Lp/Q;\n", + "Ps=sigma0*(Lp/(4*dh)+1)*s_ex*Lp;\n", + "\n", + "#result\n", + "print('\\nRolling Load = %g kips')%(P);\n", + "print('\\nRolling Load if sticking friction occurs = %g kips')%(Ps);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 17.3, Rolling Load, Page No. 599" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "P2 = 1410.35\n", + "R2 = 18.6281\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import sqrt\n", + "from math import exp\n", + "\n", + "#variable declaration\n", + "h0=1.5;\n", + "mu=0.3;\n", + "D=36;\n", + "s_en=20;\n", + "s_ex=30;\n", + "C=3.34*10**-4;\n", + "P_=1357;\n", + "\n", + "#calculation\n", + "h1=h0-0.3*h0;\n", + "dh=h0-h1;\n", + "h_=(h1+h0)/2;\n", + "R=D/2;\n", + "R1=R*(1+C*P_/(s_ex*(dh)));\n", + "Lp=sqrt(R1*dh);\n", + "Q=mu*Lp/h_;\n", + "sigma0=(s_en+s_ex)/2;\n", + "P2=sigma0*(exp(Q)-1)*s_ex*Lp/Q;\n", + "P2=P2*0.45359 #conversion to tons\n", + "R2=R*(1+C*P2/(s_ex*(dh)));\n", + "\n", + "#result\n", + "print('\\nP2 = %g\\nR2 = %g')%(P2,R2);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 17.4, Torque and Horsepower, Page No. 614" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Rolling Load = 540.012\n", + "Horsepower = 1713.63\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt\n", + "from math import pi\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "w=12;\n", + "hi=0.8;\n", + "hf=0.6;\n", + "D=40;\n", + "N=100;\n", + "\n", + "#calculation\n", + "R=D/2;\n", + "dh=abs(hf-hi);\n", + "e1=log(hi/hf);\n", + "r=(hi-hf)/hi;\n", + "sigma=20*e1**0.2/1.2;\n", + "Qp=1.5;\n", + "P=2*sigma*w*sqrt(R*(hi-hf))*Qp/sqrt(3);\n", + "a=0.5*sqrt(R*dh);\n", + "a=a/12; #conversion to ft\n", + "hp=4*pi*a*P*N*1000/33000;\n", + "\n", + "#result\n", + "print('\\nRolling Load = %g\\nHorsepower = %g')%(P,hp);\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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_18.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_18.ipynb new file mode 100755 index 00000000..8fcdfd7b --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_18.ipynb @@ -0,0 +1,94 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Extrusion" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 18.1, Extrusion Process, Page No. 629" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Force required for the Operation = 3827.95 metric tons\n", + "\n", + "\n", + "Note: Slight calculation errors in book\n" + ] + } + ], + "source": [ + "from math import log\n", + "from math import radians\n", + "from math import tan\n", + "from math import sqrt\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "def cot(x):\n", + " return 1/tan(x);\n", + "Db=6;\n", + "Df=2;\n", + "L=15;\n", + "v=2;\n", + "alpha=60;\n", + "mu=0.1;\n", + "\n", + "#calculations\n", + "R=Db**2/Df**2;\n", + "e=6*v*log(R)/Db\n", + "sigma=200*e**0.15;\n", + "alpha=radians(alpha);\n", + "B=mu*cot(alpha);\n", + "p_d=sigma*((1+B)/B)*(1-R**B);\n", + "p_d=abs(p_d);\n", + "t_i=sigma/sqrt(3);\n", + "p_e=p_d+4*t_i*L/Db;\n", + "p_e=p_e*145.0377; #conversion to psi\n", + "A=pi*Db**2/4;\n", + "P=p_e*A;\n", + "P=P*0.000453; #conversion to metric tons\n", + "\n", + "#result\n", + "print('\\nForce required for the Operation = %g metric tons\\n\\n\\nNote: Slight calculation errors in book')%(P);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_19.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_19.ipynb new file mode 100755 index 00000000..33c96b04 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_19.ipynb @@ -0,0 +1,145 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Drawing of Rods, Wires and Tubes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 19.1, Analysis of Wiredrawing, Page No. 640" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Drawing Stress = 240.422 MPa\n", + "Drawing Force = 12.0849 kN\n", + "Power = 36.2548 kW\n", + "Horsepower = 48.599 hp\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from math import radians\n", + "from math import tan\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "def cot(x):\n", + " return 1/tan(x);\n", + "Ab=10;\n", + "r=0.2;\n", + "alpha=12;\n", + "mu=0.09;\n", + "n=0.3;\n", + "K=1300;\n", + "v=3;\n", + "\n", + "#calculation\n", + "alpha=radians(alpha);\n", + "B=mu*cot(alpha/2);\n", + "e1=log(1/(1-r));\n", + "sigma=K*e1**0.3/(n+1);\n", + "Aa=Ab*(1-r);\n", + "sigma_xa=sigma*((1+B)/B)*(1-(Aa/Ab)**B);\n", + "Aa=pi*Aa**2/4;\n", + "Pd=sigma_xa*Aa;\n", + "Pd=Pd/1000; #conversion to kilo units\n", + "P=Pd*v;\n", + "H=P/0.746;\n", + "\n", + "#result\n", + "print('\\nDrawing Stress = %g MPa\\nDrawing Force = %g kN\\nPower = %g kW\\nHorsepower = %g hp')%(sigma_xa,Pd,P,H);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 19.2, Analysis of Wiredrawing, Page No. 645" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "By First Approximation, r = 0.514412\n", + "By Second Approximation, r = 0.830601\n" + ] + } + ], + "source": [ + "from math import radians\n", + "from math import tan\n", + "from math import log\n", + "\n", + "#variable declaration\n", + "def cot(x):\n", + " return 1/tan(x);\n", + "alpha=12;\n", + "r=0.2;\n", + "mu=0.09;\n", + "n=0.3;\n", + "K=1300;\n", + "v=3;\n", + "\n", + "#calculation\n", + "alpha=radians(alpha);\n", + "B=mu*cot(alpha/2);\n", + "e1=log(1/(1-r));\n", + "sigma_xa=K*e1**0.3/(n+1);\n", + "r1=1-((1-(B/(B+1)))**(1/B));\n", + "e=log(1/(1-r1));\n", + "sigma0=1300*e**0.3;\n", + "r2=1-(1-((sigma0/sigma_xa)*(B/(B+1)))**(1/B));\n", + "\n", + "#result\n", + "print('\\nBy First Approximation, r = %g\\nBy Second Approximation, r = %g')%(r1,r2);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_2.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_2.ipynb new file mode 100755 index 00000000..535881a6 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_2.ipynb @@ -0,0 +1,251 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Stress and Strain Relationships for Elastic Behavior" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 2.1, State of Stress in two dimensions, Page No. 25" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "sigma_x= -12.5 MPa\n", + "sigma_y= -2.5 MPa\n", + "T_xy= 57.5 MPa\n", + "sigma_y`= -65 MPa\n" + ] + } + ], + "source": [ + "\n", + "from math import sin\n", + "from math import cos\n", + "from math import radians\n", + "from numpy.linalg import inv\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "sigma_x=25;\n", + "sigma_y=5;\n", + "theta=45;\n", + "sigma_x_=50;\n", + "T_x_y_=5;\n", + "\n", + "#calculation\n", + "theta=radians(theta);\n", + "A=[[(sigma_x+sigma_y)/2+(sigma_x-sigma_y)/2*cos(2*theta),sin(2*theta)],[(sigma_y-sigma_x)/2*sin(2*theta),cos(2*theta)]];\n", + "B=[[sigma_x_],[T_x_y_]];\n", + "X=np.dot(inv(A),B);\n", + "p=X[0];\n", + "T_xy=X[1];\n", + "sigma_x1=sigma_x*p;\n", + "sigma_y1=sigma_y*p;\n", + "sigma_y_=sigma_x1+sigma_y1-sigma_x_;\n", + "\n", + "#result\n", + "print ('\\nsigma_x= %g MPa\\nsigma_y= %g MPa\\nT_xy= %g MPa\\nsigma_y`= %g MPa') %(sigma_x1,sigma_y1,T_xy,sigma_y_);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.2, State of Stress in three dimensions, Page No. 29" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "sigma0 = 360 MPa\n", + "\n", + "sigma1 = -280 MPa\n", + "\n", + "sigma2 = -160 MPa\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "\n", + "#variable declaration\n", + "A=[[0,-240,0],[-240,200,0],[0,0,-280]];\n", + "\n", + "#calcualtion\n", + "p=[1, -(A[0][0]+A[1][1]+A[2][2]), (A[0][0]*A[1][1]+A[1][1]*A[2][2]+A[0][0]*A[2][2]-A[1][0]**2-A[2][1]**2-A[2][0]**2), -(A[0][0]*A[1][1]*A[2][2]+2*A[1][0]*A[2][1]*A[2][0]-A[0][0]*A[2][1]**2-A[1][1]*A[2][0]**2-A[2][2]*A[1][0]**2)];\n", + "X=np.roots(p);\n", + "\n", + "#result\n", + "for i in range (0,3):\n", + " print('\\nsigma%i = %g MPa')%(i,X[i]);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.3, Calculation of Stresses from elastic strains, Page No. 52" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "sigma1 = 971.833 MPa\n", + "sigma2 = 520.705 MPa\n", + "\n", + "\n", + "Note: Slight calculation errors in Book\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "E=200;\n", + "nu=0.33;\n", + "e1=0.004;\n", + "e2=0.001;\n", + "\n", + "#calculation\n", + "sigma1=E*(e1+nu*e2)/(1-nu**2);\n", + "sigma2=E*(e2+nu*e1)/(1-nu**2);\n", + "sigma1=sigma1*1000; #conversion to MPa\n", + "sigma2=sigma2*1000; #conversion to MPa\n", + "\n", + "#result\n", + "print('\\nsigma1 = %g MPa\\nsigma2 = %g MPa\\n')%(sigma1,sigma2);\n", + "print('\\nNote: Slight calculation errors in Book')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 2.4, Elastic Anisotropy, Page No. 60" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "For Iron:\n", + "\n", + "\n", + "E_111 = 2.72727 x 10^11 Pa\n", + "E_100 = 1.25 x 10^11 Pa\n", + "\n", + "\n", + "\n", + "\n", + "For Tungten:\n", + "\n", + "\n", + "E_111 = 3.84615 x 10^11 Pa\n", + "E_100 = 3.84615 x 10^11 Pa\n", + "\n", + "Therefore tungsten is elastically isotropic while iron is elasitcally anisotropic\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "from math import sqrt\n", + "S11_Fe=0.8;\n", + "S12_Fe=-0.28;\n", + "S44_Fe=0.86;\n", + "S11_W=0.26;\n", + "S12_W=-0.07;\n", + "S44_W=0.66;\n", + "D_100_l=1;\n", + "D_100_m=0;\n", + "D_100_n=0;\n", + "D_110_l=1/sqrt(2);\n", + "D_110_m=1/sqrt(2);\n", + "D_110_n=0;\n", + "D_111_l=1/sqrt(3);\n", + "D_111_m=1/sqrt(3);\n", + "D_111_n=1/sqrt(3);\n", + "\n", + "#calculation\n", + "Fe_E_111=1/(S11_Fe-2*((S11_Fe-S12_Fe)-S44_Fe/2)*(D_111_l**2*D_111_m**2+D_111_n**2*D_111_m**2+D_111_l**2*D_111_n**2));\n", + "Fe_E_100=1/(S11_Fe-2*((S11_Fe-S12_Fe)-S44_Fe/2)*(D_100_l**2*D_100_m**2+D_100_n**2*D_100_m**2+D_100_l**2*D_100_n**2));\n", + "W_E_111=1/(S11_W-2*((S11_W-S12_W)-S44_W/2)*(D_111_l**2*D_111_m**2+D_111_n**2*D_111_m**2+D_111_l**2*D_111_n**2));\n", + "W_E_100=1/(S11_W-2*((S11_W-S12_W)-S44_W/2)*(D_100_l**2*D_100_m**2+D_100_n**2*D_100_m**2+D_100_l**2*D_100_n**2));\n", + "\n", + "#result\n", + "print '\\nFor Iron:\\n\\n'\n", + "print 'E_111 = %g x 10^11 Pa\\nE_100 = %g x 10^11 Pa\\n' %(Fe_E_111,Fe_E_100)\n", + "print '\\n\\n\\nFor Tungten:\\n\\n'\n", + "print 'E_111 = %g x 10^11 Pa\\nE_100 = %g x 10^11 Pa\\n\\nTherefore tungsten is elastically isotropic while iron is elasitcally anisotropic' %(W_E_111,W_E_100)\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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_20.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_20.ipynb new file mode 100755 index 00000000..90519f65 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_20.ipynb @@ -0,0 +1,109 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Sheet-Metal Forming" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 20.1, Deep Drawing, Page No. 672" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Limiting ratio = 1.98104\n" + ] + } + ], + "source": [ + "from math import log\n", + "\n", + "#variable declaration\n", + "le=0.3;\n", + "wd=-0.16;\n", + "\n", + "#calcualtion\n", + "l_l0=1+le;\n", + "w_w0=1+wd;\n", + "R=log(1/w_w0)/log((w_w0)*l_l0);\n", + "\n", + "#result\n", + "print('\\nLimiting ratio = %g')%(R);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 20.2, Forming Limit Criteria, Page No. 675" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Major Strain = 80 percent \n", + "Minor Strain = -20 percent\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "d=0.1;\n", + "mj_d=0.18;\n", + "mn_d=0.08;\n", + "\n", + "#calculation\n", + "e1=(mj_d-d)/d;\n", + "e2=(mn_d-d)/d;\n", + "\n", + "#result\n", + "print('\\nMajor Strain = %g percent \\nMinor Strain = %g percent')%(e1*100,e2*100);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_21.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_21.ipynb new file mode 100755 index 00000000..1f68c4e7 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_21.ipynb @@ -0,0 +1,252 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21: Machining of Metals" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 21.1, Mechanics of Machining, Page No. 685" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Shear Plane Angle for 1040 steel= 22.2946 deg\n", + "\n", + "Shear Plane Angle for Copper = 10.6433 deg\n" + ] + } + ], + "source": [ + "from scipy.optimize import fsolve\n", + "from math import radians, degrees, pi, cos, sin\n", + "\n", + "#variable declaration\n", + "a=6;\n", + "sigma_s=60000.0;\n", + "su_s=91000.0;\n", + "sigma_c=10000.0;\n", + "su_c=30000;\n", + "a=radians(a);\n", + "\n", + "\n", + "#calculation\n", + "def s(fi):\n", + " return cos(fi-a)*sin(fi)-sigma_s/su_s*(cos(pi/4-a/2)*sin(pi/4+a/2))\n", + "def c(fi):\n", + " return cos(fi-a)*sin(fi)-sigma_c/su_c*(cos(pi/4-a/2)*sin(pi/4+a/2))\n", + "fi1=fsolve(s,0);\n", + "fi2=fsolve(c,0);\n", + "fi1=degrees(fi1);\n", + "fi2=degrees(fi2);\n", + "\n", + "#result\n", + "print('\\nShear Plane Angle for 1040 steel= %g deg')%(fi1);\n", + "print('\\nShear Plane Angle for Copper = %g deg')%(fi2);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 21.2, Mechanics of Machining, Page No. 687" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Slip plane angle = 33.1927 deg\n", + "Percentage of total energy that goes into friction = 30.918 percent\n", + "Percentage of total energy that goes into shear = 69.082 percent\n", + "Total energy per unit volume = 0.197285 hp min/in^3\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import sin\n", + "from math import cos\n", + "from math import tan\n", + "from math import atan\n", + "from math import radians\n", + "from math import sqrt\n", + "from math import degrees\n", + "\n", + "#variable declaration\n", + "v=500;\n", + "alpha=6;\n", + "b=0.4;\n", + "t=0.008;\n", + "Fv=100;\n", + "Fh=250;\n", + "L=20;\n", + "rho=0.283;\n", + "m=13.36;\n", + "m=m/454; #conversion to lb\n", + "\n", + "#calculation\n", + "tc=m/(rho*b*L);\n", + "r=t/tc;\n", + "alpha=radians(alpha);\n", + "fi=atan(r*cos(alpha)/(1-r*sin(alpha)));\n", + "#fi=degrees(fi);\n", + "mu=(Fv+Fh*tan(alpha))/(Fh-Fv*tan(alpha));\n", + "be=atan(mu);\n", + "Pr=sqrt(Fv**2+Fh**2);\n", + "Ft=Pr*sin(be);\n", + "p_fe=Ft*r/Fh;\n", + "Fs=Fh*cos(fi)-Fv*sin(fi);\n", + "vs=v*cos(alpha)/cos(fi-alpha);\n", + "p_se=Fs*vs/(Fh*v);\n", + "U=Fh*v/(b*t*v);\n", + "U=U/33000; #conversion to hp\n", + "U=U/12; #conversion of ft units to in units\n", + "fi=degrees(fi);\n", + "\n", + "#result\n", + "print('\\nSlip plane angle = %g deg\\nPercentage of total energy that goes into friction = %g percent\\nPercentage of total energy that goes into shear = %g percent\\nTotal energy per unit volume = %g hp min/in^3')%(fi,p_fe*100,p_se*100,U);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 21.3, Tool Materials and Tool Life, Page No. 698" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "For High Speed steel tool, increase in tool life is given by: t2 = 322.54 t1\n", + "\n", + "For Cemented carbide tool, increase in tool life is given by: t2 = 10.0794 t1\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "d=0.5;\n", + "\n", + "#calculation\n", + "t1=(1/d)**(1/0.12);\n", + "t2=(1/d)**(1/0.3);\n", + "\n", + "#result\n", + "print('\\nFor High Speed steel tool, increase in tool life is given by: t2 = %g t1')%(t1);\n", + "print('\\nFor Cemented carbide tool, increase in tool life is given by: t2 = %g t1')%(t2);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 21.4, Grinding Processes, Page No. 703" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tangential force = 24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "U=40;\n", + "uw=0.3;\n", + "b=1.2;\n", + "v=30;\n", + "d=0.05;\n", + "\n", + "#calculation\n", + "b=b*10**-3; #conversion to m\n", + "d=d*10**-3; #conversion to m\n", + "U=U*10**9; #conversion to Pa\n", + "M=uw*b*d;\n", + "P=U*M;\n", + "F=P/v;\n", + "\n", + "#result\n", + "print('Tangential force = %g N')%(F);\n" + ] + }, + { + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_3.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_3.ipynb new file mode 100755 index 00000000..3168a0f9 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_3.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Elements of the Theory of Plasticity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.1, True Stress and True Strain, Page No. 76" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Engineering Stress at maximum load = 99852.1 psi\n", + "True Fracture Stress = 112785 psi\n", + "True Strain at fracture = 0.344939\n", + "Engineering strain at fracture = 0.411903\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from math import log\n", + "from math import exp\n", + "\n", + "#variable declaration\n", + "D_i=0.505;\n", + "L=2;\n", + "P_max=20000;\n", + "P_f=16000;\n", + "D_f=0.425;\n", + "\n", + "#calculation\n", + "E_St= P_max*4/(pi*D_i**2);\n", + "T_fr_St= P_f*4/(pi*D_f**2);\n", + "e_f=log(D_i**2/D_f**2);\n", + "e=exp(e_f)-1;\n", + "\n", + "#result\n", + "print('\\nEngineering Stress at maximum load = %g psi\\nTrue Fracture Stress = %g psi\\nTrue Strain at fracture = %g\\nEngineering strain at fracture = %g')%(E_St,T_fr_St,e_f,e);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.2, Yielding Criteria for Ductile Metals, Page No. 78" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Since the calculated value of sigma0 = 224.054 MPa, which is less than the yield strength of the aluminium alloy\n", + "Thus safety factor is = 2.23161\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "sigma00=500;\n", + "sigma_z=-50;\n", + "sigma_y=100;\n", + "sigma_x=200;\n", + "T_xy=30;\n", + "T_yz=0;\n", + "T_xz=0;\n", + "\n", + "#calculation\n", + "sigma0=sqrt((sigma_x-sigma_y)**2+(sigma_y-sigma_z)**2+(sigma_z-sigma_x)**2+6*(T_xy**2+T_yz**2+T_xz**2))/sqrt(2);\n", + "s=sigma00/sigma0;\n", + "\n", + "#result\n", + "print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 3.3, Tresca Criterion, Page No. 81" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Since the calculated value of sigma0 = 250 MPa, which is less than the yield strength of the aluminium alloy\n", + "Thus safety factor is = 2\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "sigma00=500;\n", + "sigma_z=-50;\n", + "sigma_y=100;\n", + "sigma_x=200;\n", + "T_xy=30;\n", + "T_yz=0;\n", + "T_xz=0;\n", + "\n", + "#calculation\n", + "sigma0=sigma_x-sigma_z;\n", + "s=sigma00/sigma0;\n", + "\n", + "#result\n", + "print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 3.4, Levy-Mises Equation, Page No. 91" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Plastic Strain = 0.199532\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "r_t=20;\n", + "p=1000;\n", + "\n", + "#calculation\n", + "sigma1=p*r_t;\n", + "sigma1=sigma1/1000; #conversion to ksi\n", + "sigma=sqrt(3)*sigma1/2;\n", + "e=(sigma/25)**(1/0.25);\n", + "e1=sqrt(3)*e/2;\n", + "\n", + "#result\n", + "print('\\nPlastic Strain = %g')%(e1);\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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_4.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_4.ipynb new file mode 100755 index 00000000..4d124b41 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_4.ipynb @@ -0,0 +1,82 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Plastic Deformation of Single Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 4.1, Critical Resolved Shear Stress for Slip, Page No. 125" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Tensile Stress applied = 14.6969 MPa\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "a=[1,-1,0];\n", + "n=[1,-1,-1];\n", + "s=[0,-1,-1];\n", + "Tr=6;\n", + "\n", + "#calculation\n", + "cos_fi=np.dot(a,n)/(sqrt(a[0]**2+a[1]**2+a[2]**2)*sqrt(n[0]**2+n[1]**2+n[2]**2));\n", + "cos_lm=np.dot(a,s)/(sqrt(a[0]**2+a[1]**2+a[2]**2)*sqrt(s[0]**2+s[1]**2+s[2]**2));\n", + "sigma=Tr/(cos_fi*cos_lm);\n", + "\n", + "#result\n", + "print('Tensile Stress applied = %g MPa')%(sigma);" + ] + }, + { + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_5.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_5.ipynb new file mode 100755 index 00000000..50279cb5 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_5.ipynb @@ -0,0 +1,74 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Dislocation theory" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 5.1, Forces Between Dislocations, Page No. 166" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Total force on the dislocation is = 1.32629e-07 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "from math import pi\n", + "G=40;\n", + "G=G*10**9; #conversion to N/m^2\n", + "b=2.5;\n", + "b=b*10**-10; #conversion to m\n", + "r=1200;\n", + "r=r*10**-10; #conversion to m\n", + "l=0.04;\n", + "l=l*10**-3; #conversion to m\n", + "\n", + "#calculation\n", + "F=G*b**2/(2*pi*r);\n", + "Ft=F*l;\n", + "\n", + "#result\n", + "print('The Total force on the dislocation is = %g N')%(Ft);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_6.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_6.ipynb new file mode 100755 index 00000000..f1ec6bb6 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_6.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Strengthening Mechanisms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.1, Grain Size Measurement, Page No. 193" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Yield Stress = 254.464 MPa\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "sigma_i=150;\n", + "k=0.7;\n", + "n=6;\n", + "\n", + "#calculation\n", + "N_x=2**(n-1);\n", + "N=N_x/(0.01)**2; #in grains/in^2\n", + "N=N*10**6/25.4**2; # in grains/m^2\n", + "D=sqrt(1/N);\n", + "sigma0=sigma_i+k/sqrt(D);\n", + "\n", + "#result\n", + "print ('\\nYield Stress = %g MPa')%(sigma0);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.2, Strengthing Mechanism, Page No. 219" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Particle Spacing = 2.3e-08 m\n", + "Particle Size = 7.35948e-10 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "sigma0=600;\n", + "G=27.6;\n", + "G=G*10**9 #conversion to Pa\n", + "b=2.5*10**-8;\n", + "b=b*10**-2; #conversion to m\n", + "T0=sigma0/2;\n", + "T0=T0*10**6; #conversion to Pa\n", + "\n", + "#calculation\n", + "lambda1=G*b/T0;\n", + "Cu_max=54;\n", + "Cu_eq=4;\n", + "Cu_min=0.5;\n", + "rho_al=2.7;\n", + "rho_theta=4.43;\n", + "wt_a=(Cu_max-Cu_eq)/(Cu_max-Cu_min);\n", + "wt_theta=(Cu_eq-Cu_min)/(Cu_max-Cu_min);\n", + "V_a=wt_a/rho_al;\n", + "V_theta=wt_theta/rho_theta;\n", + "f=V_theta/(V_a+V_theta);\n", + "r=(3*f*lambda1)/(4*(1-f));\n", + "\n", + "#result\n", + "print('\\nParticle Spacing = %g m\\nParticle Size = %g m')%(lambda1,r);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.3, Fiber Strengthing, Page No. 222" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Ec for 10 vol% = 92 GPa\n", + "\n", + "\n", + "Ec for 60 vol% = 252 GPa\n", + "\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "Ef=380;\n", + "Em=60;\n", + "\n", + "#calculation\n", + "#Case 1\n", + "f_f1=0.1;\n", + "Ec1=Ef*f_f1+(1-f_f1)*Em;\n", + "\n", + "#Case 2\n", + "f_f2=0.6;\n", + "Ec2=Ef*f_f2+(1-f_f2)*Em;\n", + "\n", + "#result\n", + "print('\\nEc for 10 vol%% = %g GPa\\n')%(Ec1);\n", + "print('\\nEc for 60 vol%% = %g GPa\\n')%(Ec2);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 6.4, Load Transfer, Page No. 225" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "sigma_cu = 2.55 GPa for L=100um\n", + "\n", + "sigma_cu = 0.596875 GPa for L=2mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "sigma_fu=5;\n", + "sigma_fu=sigma_fu*10**9; #Conversion to Pa\n", + "sigma_m=100;\n", + "sigma_m=sigma_m*10**6; #Conversion to Pa\n", + "T0=80;\n", + "T0=T0*10**6; #Conversion to Pa\n", + "f_f=0.5;\n", + "d=100;\n", + "d=d*10**-6;\n", + "B=0.5;\n", + "L1=10;\n", + "L1=L1*10**2; #conversion to m\n", + "Lc=sigma_fu*d/(2*T0);\n", + "sigma_cu1=sigma_fu*f_f*(1-Lc/(2*L1))+sigma_m*(1-f_f);\n", + "sigma_cu1=sigma_cu1*10**-9;\n", + "print('\\nsigma_cu = %g GPa for L=100um\\n')%(sigma_cu1);\n", + "\n", + "L2=2;\n", + "L2=L2*10**-3; #conversion to m\n", + "sigma_cu2=sigma_fu*f_f*(1-Lc/(2*L2))+sigma_m*(1-f_f);\n", + "sigma_cu2=sigma_cu2*10**-9;\n", + "print('sigma_cu = %g GPa for L=2mm')%(sigma_cu2);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_7.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_7.ipynb new file mode 100755 index 00000000..9111bb76 --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_7.ipynb @@ -0,0 +1,113 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Fracture" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.1, Cohesive Strength, Page No. 245" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cohesive strength of a silica fiber = 24.367 GPa\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "E=95;\n", + "E=E*10**9;\n", + "Ys=1000;\n", + "Ys=Ys*10**-3; #conversion to J/m^2\n", + "a0=1.6;\n", + "a0=a0*10**-10; #conversion to m\n", + "\n", + "#calculation\n", + "sigma_max=sqrt(E*Ys/a0)\n", + "sigma_max=sigma_max*10**-9;\n", + "\n", + "#result\n", + "print('Cohesive strength of a silica fiber = %g GPa')%(sigma_max);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 7.2, Fracture Stress, Page No. 246" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fracture Stress = 100 MPa\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "E=100;\n", + "E=E*10**9;\n", + "Ys=1;\n", + "a0=2.5*10**-10;\n", + "c=10**4*a0;\n", + "\n", + "#calculation\n", + "sigma_f=sqrt(E*Ys/(4*c));\n", + "sigma_f=sigma_f*10**-6;\n", + "\n", + "#result\n", + "print('Fracture Stress = %g MPa')%(sigma_f);" + ] + } + ], + "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/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_8.ipynb b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_8.ipynb new file mode 100755 index 00000000..9609602d --- /dev/null +++ b/Mechanical_Metallurgy_by_George_E._Dieter/Chapter_8.ipynb @@ -0,0 +1,255 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: The Tension Test" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "### Example 8.1, Standard properties of the material, Page No. 281" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Ultimate Tensile Strength = 92363.2 psi\n", + "0.2 percent offset yield strength = 74889.1 psi\n", + "Breaking Stress = 80880.2 psi\n", + "Elongation = 26.5 percent\n", + "Reduction of Area = 61.092 percent\n", + "\n", + "\n", + "Note: Slight Computational Errors in book\n" + ] + } + ], + "source": [ + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "D=0.505;\n", + "Lo=2;\n", + "Lf=2.53;\n", + "Py=15000;\n", + "Pmax=18500;\n", + "Pf=16200;\n", + "D_f=0.315;\n", + "\n", + "#calculation\n", + "A0=pi*D**2/4;\n", + "Af=pi*D_f**2/4;\n", + "s_u=Pmax/A0;\n", + "s0=Py/A0;\n", + "s_f=Pf/A0;\n", + "e_f=(Lf-Lo)/Lo;\n", + "q=(A0-Af)/A0;\n", + "\n", + "#result\n", + "print('\\nUltimate Tensile Strength = %g psi\\n0.2 percent offset yield strength = %g psi\\nBreaking Stress = %g psi\\nElongation = %g percent\\nReduction of Area = %g percent\\n\\n\\nNote: Slight Computational Errors in book')%(s_u,s0,s_f,e_f*100,q*100);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.2, True Strain, Page No. 288" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "True Strain to fracture using changes in length = 0.405465\n", + "True Strain to fracture using changes in area = 0.405465\n", + "\n", + "\n", + "\n", + "For More ductile metals\n", + "True Strain to fracture using changes in length = 0.729961\n", + "True Strain to fracture using changes in diameter = 0.940007\n" + ] + } + ], + "source": [ + "\n", + "from math import log\n", + "\n", + "#case 1\n", + "#variable declaration\n", + "Af=100.0;\n", + "Lf1=60.0;\n", + "A0=150.0;\n", + "L01=40.0;\n", + "Lf=83.0;\n", + "L0=40.0;\n", + "Df=8.0;\n", + "D0=12.8;\n", + "\n", + "#calculation\n", + "L1=float (Lf1/L01);\n", + "A1=float (A0/Af);\n", + "ef11=log(L1);\n", + "ef21=log(A1);\n", + "L2=(Lf/L0);\n", + "D2=D0/Df;5\n", + "ef12=log(L2);\n", + "ef22=2*log(D2);\n", + "\n", + "#result\n", + "print('\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in area = %g')%(ef11,ef21);\n", + "print('\\n\\n\\nFor More ductile metals\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in diameter = %g')%(ef12,ef22);\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.3, Ultimate Tensile Strength, Page No. 290" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ultimate Tensile Strength = 99729.2 psi\n" + ] + } + ], + "source": [ + "\n", + "\n", + "from math import exp\n", + "\n", + "#variable declaration\n", + "def sigma(e):\n", + " return 200000*e**0.33;\n", + "E_u=0.33;\n", + "\n", + "#calculation\n", + "sigma_u=sigma(E_u);\n", + "s_u=sigma_u/exp(E_u);\n", + "\n", + "#result\n", + "print('Ultimate Tensile Strength = %g psi')%(s_u);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 8.4, Effect of Strain Rate, Page No. 298" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "At 70deg F\n", + "\n", + "sigma_a = 10.2 ksi\n", + "sigma_b = 13.8229 ksi\n", + "sigma_b/sigma_a = 1.35519\n", + "\n", + "\n", + "\n", + "At 825deg F\n", + "\n", + "sigma_a = 2.1 ksi\n", + "sigma_b = 5.54906 ksi\n", + "sigma_b/sigma_a = 2.64241\n", + "\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#variable declaration\n", + "C_70=10.2;\n", + "C_825=2.1;\n", + "m_70=0.066;\n", + "m_825=0.211;\n", + "e1=1;\n", + "e2=100;\n", + "\n", + "#calculation 1\n", + "print('\\nAt 70deg F\\n');\n", + "sigma_a=C_70*e1**m_70;\n", + "sigma_b=C_70*e2**m_70;\n", + "\n", + "#result 1\n", + "print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\n", + "\n", + "\n", + "#calculation 2\n", + "print('\\n\\nAt 825deg F\\n');\n", + "sigma_a=C_825*e1**m_825;\n", + "sigma_b=C_825*e2**m_825;\n", + "\n", + "#result 2\n", + "print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\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/Microelectronic_Circuits/screenshots/10.3.png b/Microelectronic_Circuits/screenshots/10.3.png new file mode 100755 index 00000000..81e28705 Binary files /dev/null and b/Microelectronic_Circuits/screenshots/10.3.png differ diff --git a/Microelectronic_Circuits/screenshots/5.2.png b/Microelectronic_Circuits/screenshots/5.2.png new file mode 100755 index 00000000..e3f5270d Binary files /dev/null and b/Microelectronic_Circuits/screenshots/5.2.png differ diff --git a/Microelectronic_Circuits/screenshots/5.4.png b/Microelectronic_Circuits/screenshots/5.4.png new file mode 100755 index 00000000..02e98de5 Binary files /dev/null and b/Microelectronic_Circuits/screenshots/5.4.png differ diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter1.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter1.ipynb new file mode 100755 index 00000000..fb4718f9 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter1.ipynb @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b8c93f0ed8e762e74a7e32d1ae1c9fc9e20a3917843706f0d24d06eedbf42b4e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter01:INTRODUCTION TO ELECTRONICS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1:pg-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example1.1: Amplifier gain, power and eficiency\n", + "# Amplifier operates at +10-V/-10-V power supply.\n", + "A_v=9/1.0; # sinusoidal voltage input of 1V peak and sinusoidal output voltage of 9V peak\n", + "I_o=9/1000.0; # 1 kilo ohms load\n", + "print A_v,\"= Voltage gain (V/V) \" \n", + "print round(20*log10(A_v),1),\"= Voltage gain (dB) \" \n", + "I_i=0.0001 # sinusoidal current input of 0.1mA peak\n", + "A_i=I_o/I_i;\n", + "print A_i,\"= Current gain (A/A) \"\n", + "print round(20*log10(A_i),1),\"= Current gain (dB)\"\n", + "V_orms = 9/math.sqrt(2);\n", + "I_orms = 9/math.sqrt(2);\n", + "P_L=V_orms*I_orms; # output power in mW\n", + "V_irms=1/math.sqrt(2);\n", + "I_irms=0.1/math.sqrt(2);\n", + "P_I=V_irms*I_irms; # input power in mW\n", + "A_p=P_L/P_I; \n", + "print A_p,\"= Power gain (W/W) \"\n", + "print round(10*log10(A_p),1),\"= Power gain (dB) \"\n", + "P_dc=10*9.5+10*9.5; # amplifier draws a current of 9.5mA from each of its two power supplies\n", + "print P_dc,\"= Power drawn from the dc supplies (mW)\"\n", + "P_dissipated=P_dc+P_I-P_L;\n", + "print round(P_dissipated,1),\"= Power dissipated in the amplifier (mW)\"\n", + "n=P_L/P_dc*100;\n", + "print round(n,1),\"= Amplifier efficiency in percentage\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9.0 = Voltage gain (V/V) \n", + "19.1 = Voltage gain (dB) \n", + "90.0 = Current gain (A/A) \n", + "39.1 = Current gain (dB)\n", + "810.0 = Power gain (W/W) \n", + "29.1 = Power gain (dB) \n", + "190.0 = Power drawn from the dc supplies (mW)\n", + "149.6 = Power dissipated in the amplifier (mW)\n", + "21.3 = Amplifier efficiency in percentage\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2:pg-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 1.2: Gain of transistor amplifier\n", + "# Amplifier has transfer characteristics v_O=10-(10**-11)*(exp**40*v_1) applies for v_1 is greater than or equal 0V and v_o is greater than or equal to 0.3V\n", + "L_l = 0.3; # limit L_-\n", + "print round(L_l,2),\"=The limit L_- (V) \"\n", + "v_I=1/40.0*math.log((10-0.3)/10**-11); # from the transfer characteristics and v_o=0.3V\n", + "print round(v_I,2),\"=v_I in volts \"\n", + "L_u=10-10**-11; # obtained by v_I=0 in transfer characteristics\n", + "print round(L_u,3),\"=the limit L_+ (V) \"\n", + "V_I=1/40.0*math.log((10-5)/10**-11); # V_O=5V\n", + "print round(V_I,3),\"=The value of the dc bias voltage that results in V_O=5V (V)\"\n", + "A_v=-10**-11*exp(40*V_I)*40; # A_v=dv_O/dv_I\n", + "print round(A_v,2),\"=Gain at the operating point (V/V) \"\n", + "print \"NOTE the gain is negative that implies the amplifier is an inverting amplifier\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.3 =The limit L_- (V) \n", + "0.69 =v_I in volts \n", + "10.0 =the limit L_+ (V) \n", + "0.673 =The value of the dc bias voltage that results in V_O=5V (V)\n", + "-200.0 =Gain at the operating point (V/V) \n", + "NOTE the gain is negative that implies the amplifier is an inverting amplifier\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3:pg-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 1.3 : Overall voltage gain of cthree-stage amplifier\n", + "gainloss_in=10**6/(1*10**6+100.0*10**3); # fraction of input signal is obtained using voltage divider rule , gainloss_in= v_i1/v_s\n", + "A_v1=10*100000.0/(100000+1000); # A_v1 = v_i2/v_i1 is the voltage gain at first stage\n", + "A_v2=100*10000.0/(10000+1000); # A_v2 = v_i3/v_i2 is the voltage gain at second stage\n", + "A_v3=100/(100+10.0); # A_v3 = v_L/v_i3 is the voltage gain at the output stage\n", + "A_v=A_v1*A_v2*A_v3; # A_v is the total voltage gain \n", + "print round(A_v),\" = The overall voltage gain (V/V) \"\n", + "print round(20.0*log10(A_v),1),\"= The overall voltage gain (dB) \"\n", + "gain_src_ld=A_v*gainloss_in;\n", + "print round(gain_src_ld,2),\"= The voltage gain from source to gain (V/V) \"\n", + "print round(20.0*log10(gain_src_ld),1),\"= The voltage gain from source to load (dB) \"\n", + "A_i=10**4*A_v; # A_i=i_o/i_i=(v_L/100)/(v_i1/10**6)\n", + "print \"{:.2e}\".format(A_i),\" = The current gain (A/A)\"\n", + "print round(20.0*log10(A_i),1),\"= The current gain (dB) \"\n", + "A_p=818*818*10**4; # A_p=P_L/P_I=v_L*i_o/v_i1*i_i\n", + "print \"{:.2e}\".format(A_p),\"= The power gain (W/W) \"\n", + "print round(10*log10(A_p),1),\"= The power gain (dB) \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "818.0 = The overall voltage gain (V/V) \n", + "58.3 = The overall voltage gain (dB) \n", + "743.88 = The voltage gain from source to gain (V/V) \n", + "57.4 = The voltage gain from source to load (dB) \n", + "8.18e+06 = The current gain (A/A)\n", + "138.3 = The current gain (dB) \n", + "6.69e+09 = The power gain (W/W) \n", + "98.3 = The power gain (dB) \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.4:pg-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example1.4 : Bipolar junction transistor\n", + "\n", + "# 1,4a\n", + "# using voltage divider rule the fraction of input signal v_be=v_s*r_pi/(r_pi+R_s)\n", + "# output voltage v_o=-g_mv_be(R_L||r_o)\n", + "r_pi=2.5*10**3; # (ohm)\n", + "R_s=5*10**3; # (ohm)\n", + "R_L=5*10**3 # (ohm)\n", + "g_m=40*10**-3; # (mho)\n", + "r_o=100*10**3; # (ohm)\n", + "gain=-(r_pi*g_m*(R_L*r_o/(R_L+r_o)))/(r_pi+R_s); # gain=v_o/v_s\n", + "print round(gain,1),\"= The voltage gain (V/V) \"\n", + "gain_negl_r_o=-r_pi*g_m*R_L/(r_pi+R_s);\n", + "print round(gain_negl_r_o,1),\"= Gain neglecting the effect of r_o (V/V) \"\n", + "\n", + "# 1.4b\n", + "# Bi_b=g_m*v_be\n", + "# B is short circuit gain\n", + "B=g_m*r_pi;\n", + "print B,\"= The short circuit gain (A/A) \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-63.5 = The voltage gain (V/V) \n", + "-66.7 = Gain neglecting the effect of r_o (V/V) \n", + "100.0 = The short circuit gain (A/A) \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5:pg-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 1.5 : DC gain, 3dB frequency and frequency at which gain=0 of voltage amplifier\n", + "\n", + "# 1.5b\n", + "R_s =20*10**3; # (ohm)\n", + "R_i =100.0*10**3; # (ohm)\n", + "C_i =60.0*10**-12; # (ohm)\n", + "u = 144.0; # (V/V)\n", + "R_o = 200.0; # (ohm)\n", + "R_L = 1000; # (ohm)\n", + "K=u/((1+R_s/R_i)*(1+R_o/R_L));\n", + "print K,\"= The dc gain (V/V)\"\n", + "print round(20*log10(K),2),\" = The dc gain (dB) \"\n", + "w_o=1/(C_i*R_s*R_i/(R_s+R_i));\n", + "print \"{:.0e}\".format(w_o),\" = The 3-dB frequency (rad/s) \"\n", + "f_o= w_o/2/math.pi;\n", + "print round(f_o/1000,1),\" = Frequency (KHz) \"\n", + "print \"{:.0e}\".format(100*w_o),\" = unity gain frequency (rad/s)\"\n", + "print round(100*f_o/1e6,2),\" = Unity gain frequency (MHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "100.0 = The dc gain (V/V)\n", + "40.0 = The dc gain (dB) \n", + "1e+06 = The 3-dB frequency (rad/s) \n", + "159.2 = Frequency (KHz) \n", + "1e+08 = unity gain frequency (rad/s)\n", + "15.92 = Unity gain frequency (MHz)\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6:pg-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 1.6: Time for the output to reach (V_OH+V_OL)/2\n", + "V_DD=5; # (V)\n", + "R=1000.0; # (ohm)\n", + "R_on=100.0; # (ohm)\n", + "V_offset=0.1; # (V)\n", + "C=10.0*10**-12; # (F)\n", + "V_OH=5; # (V)\n", + "V_OL=V_offset+(V_DD-V_offset)*R_on/(R+R_on);\n", + "T=R*C;\n", + "v_o_t_PLH=(V_OH+V_OL)/2; #to find t_PLH \n", + "t_PLH=0.69*T;# t_PLH is low to high propogtion delay\n", + "print t_PLH/1e-9,\"= time required for the output to reach (V_OH+V_OL)/2 (miliseconds) \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.9 = time required for the output to reach (V_OH+V_OL)/2 (miliseconds) \n" + ] + } + ], + "prompt_number": 46 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter10.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter10.ipynb new file mode 100755 index 00000000..1ea303b0 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter10.ipynb @@ -0,0 +1,291 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:21296c3701295d5c104cbfb8dc3256ad4c96ab638c655298f128fa59daa0a30d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10: Digital CMOS Logic Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1:pg-962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 10.1 : To determine t_PHL, t_PLH and t_P\n", + "# Consider CMOS inverter\n", + "import math\n", + "C_ox=6*10.0**-15; # (F/um**2)\n", + "uC_n=115.0*10**-6; #uC_n=u_n*C_ox (A/V**2)\n", + "uC_p=30.0*10**-6; #uC_p=u_p*C_ox (A/V**2)\n", + "V_tn=0.4; # (V)\n", + "V_tp=-0.4; # (V)\n", + "V_DD=2.5; # (V)\n", + "W_n=0.375*10**-6; # W for Q_N\n", + "L_n=0.25*10**-6; # L for Q_N\n", + "W_p=1.125*10**-6; # W for Q_P\n", + "L_p=0.25*10**-6; # L for Q_P\n", + "C_gd1=0.3*W_n*10**-9; # (F)\n", + "C_gd2=0.3*W_p*10**-9; # (F)\n", + "C_db1=10**-15; # (F)\n", + "C_db2=10**-15; # (F)\n", + "C_g3= 0.375*0.25*6*10**-15+2*0.3*0.375*10**-15; # (F)\n", + "C_g4=1.125*0.25*6*10**-15+2*0.3*1.125*10**-15; # (F)\n", + "C_w=0.2*10**-15; # (F)\n", + "C=2*C_gd1+2.0*C_gd2+C_db1+C_db2+C_g3+C_g4+C_w; # (F)\n", + "i_DN0=uC_n*W_n*(V_DD-V_tn)**2/(2*L_n); # i_DN0 = i_DN(0) (A)\n", + "i_DNtPHL=uC_n*W_n*((V_DD-V_tn)*V_DD/2-((V_DD/2.0)**2)/2.0)/L_n; # i_DNtPHL = i_DN(t_PHL) (A)\n", + "i_DNav=(i_DN0+i_DNtPHL)/2; # i_DN|av (A)\n", + "t_PHL=C*(V_DD/2)*1e12/i_DNav;\n", + "print math.ceil(t_PHL),\"= t_PHL (picoseconds)\"\n", + "t_PLH=1.3*t_PHL; # Since W_p/W_n=3 and u_n/u_p=3.83 thus t_PLH is greater than t_PHL by 3.83/3\n", + "print round(t_PLH,-1),\"= t_PLH (picoseconds)\"\n", + "t_P=(t_PHL+t_PLH)/2; \n", + "print round(t_P),\"= t_P (picoseconds)\"\n", + "\n", + " # the answer in the textbook is slightly dirfferent due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "23.0 = t_PHL (picoseconds)\n", + "30.0 = t_PLH (picoseconds)\n", + "26.0 = t_P (picoseconds)\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2:pg-972" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 10.2 : W/L ratios for the logic circuit\n", + "#For basic inverter\n", + "n=1.5;\n", + "p=5;\n", + "L=0.25*10**-6; # (m)\n", + "WbyL=2*n; # W/L for Q_NB , Q_NC , Q_ND\n", + "print WbyL,\"= W/L ratio for Q_NB\"\n", + "print WbyL,\"= W/L ratio for Q_NC\"\n", + "print WbyL,\"= W/L ratio for Q_ND\"\n", + "WbyL=n; # W/L ratio for Q_NA\n", + "print WbyL,\"= W/L ratio for Q_NA\"\n", + "WbyL=3*p; # W/L for Q_PA, Q_PC , Q_PD\n", + "print WbyL,\"= W/L ratio for Q_PA\" \n", + "print WbyL,\"= W/L ratio for Q_PC\"\n", + "print WbyL,\"= W/L ratio for Q_PD\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.0 = W/L ratio for Q_NB\n", + "3.0 = W/L ratio for Q_NC\n", + "3.0 = W/L ratio for Q_ND\n", + "1.5 = W/L ratio for Q_NA\n", + "15 = W/L ratio for Q_PA\n", + "15 = W/L ratio for Q_PC\n", + "15 = W/L ratio for Q_PD\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3:pg-981" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 10.3 : To determine the parameters of pseudo NMOS inverter\n", + "# Consider a pseudo NMOS inverter\n", + "uC_n=115.0*10**-6; #uC_n=u_n*C_ox (A/V**2)\n", + "uC_p=30*10.0**-6; #uC_p=u_p*C_ox (A/V**2)\n", + "V_tn=0.4; # (V)\n", + "V_tp=-0.4; # (V)\n", + "V_DD=2.5; # (V)\n", + "W_n=0.375*10**-6; # W for Q_N (m)\n", + "L_n=0.25*10**-6; # L for Q_N (m)\n", + "r=9.0;\n", + "\n", + "# 10.3a\n", + "V_OH=V_DD;\n", + "print round(V_OH,2),\"= V_OH (V)\"\n", + "V_OL=(V_DD-V_tn)*(1-math.sqrt(1.0-1/r));\n", + "print round(V_OL,2),\"= V_OL (V)\"\n", + "V_IL=V_tn+(V_DD-V_tn)/math.sqrt(r*(r+1.0));\n", + "print round(V_IL,2),\"=V_IL (V)\"\n", + "V_IH=V_tn+2*(V_DD-V_tn)/(math.sqrt(3.0*r));\n", + "print round(V_IH,2),\"= V_IH (V)\"\n", + "V_M=V_tn+(V_DD-V_tn)/math.sqrt(r+1.0);\n", + "print round(V_M,2),\"= V_M (V)\"\n", + "NM_H=V_OH-V_IH;\n", + "NM_L=V_IL-V_OL;\n", + "print round(NM_H,2),\"=The highest and the lowest values of allowable noise margin (V)=\",round(NM_L,2)\n", + "\n", + "# 10.3b\n", + "WbyL_p=uC_n*(W_n/L_n)/(uC_p*r); # WbyL_p=(W/L)_p\n", + "print round(WbyL_p,2),\"=(W/L)_p\"\n", + "\n", + "#10.3c\n", + "I_stat=(uC_p*WbyL_p*(V_DD-V_tn)**2)/2;\n", + "print round(I_stat*1e6,1),\"=I_stat (microA)\"\n", + "P_D=I_stat*V_DD;\n", + "print round(P_D*1e6),\"=Static power dissipation P_D (microW)\"\n", + "\n", + "#10.3d\n", + "C=7*10**-15;\n", + "t_PLH=1.7*C/(uC_p*WbyL_p*V_DD);\n", + "print round(t_PLH*1e9,2),\"=t_PLH (ns)\"\n", + "t_PHL=1.7*C/(uC_n*(W_n/L_n)*math.sqrt(1-0.46/r)*V_DD);\n", + "print round(t_PHL*1e9,2),\"= t_PHL (ns)\"\n", + "t_p=(t_PHL+t_PLH)/2.0;\n", + "print round(t_p*1e9,2),\"= t_p (ns)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.5 = V_OH (V)\n", + "0.12 = V_OL (V)\n", + "0.62 =V_IL (V)\n", + "1.21 = V_IH (V)\n", + "1.06 = V_M (V)\n", + "1.29 =The highest and the lowest values of allowable noise margin (V)= 0.5\n", + "0.64 =(W/L)_p\n", + "42.3 =I_stat (microA)\n", + "106.0 =Static power dissipation P_D (microW)\n", + "0.25 =t_PLH (ns)\n", + "0.03 = t_PHL (ns)\n", + "0.14 = t_p (ns)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.4:pg-985" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 10.4 : To determine parameters for NMOS transistor\n", + "# Consider NMOS transistor switch\n", + "uC_n=50.0*10**-6; #uC_n=u_n*C_ox (A/V**2)\n", + "uC_p=20.0*10.0**-6; #uC_px `=u_p*C_ox (A/V**2)\n", + "V_tO=1.0; # (V)\n", + "y=0.5; # (V**1/2)\n", + "fie_f=0.6/2; # (V)\n", + "V_DD=5; # (V)\n", + "W_n=4*10.0**-6; # (m)\n", + "L_n=2*10.0**-6; # (m)\n", + "C=50*10.0**-15; # (F)\n", + "\n", + "# 10.4a\n", + "V_t=1.6; # (V)\n", + "V_OH=V_DD-V_t; # V_OH is the value of v_O at which Q stops conducting (V)\n", + "print V_OH,\"= V_OH (V)\"\n", + " \n", + "# 10.4b\n", + "W_p=10.0*10**-6; # (m)\n", + "L_p=2*10.0**-6; # (m)\n", + "i_DP=uC_p*W_p*((V_DD-V_OH-V_tO)**2)/(2*L_p);\n", + "print round(i_DP*1e6),\"= Static current of the inverter (microA)\"\n", + "P_D=V_DD*i_DP;\n", + "print round(P_D*1e6),\"= Power dissipated (microW)\"\n", + "V_O=0.08; # Output voltage (V) found by equating the current of Q_N=18uA\n", + "print round(V_O,2),\"= The output voltage of the inverter (V) \"\n", + "\n", + "# 10.4c\n", + "i_D0=uC_n*W_n*((V_DD-V_tO)**2)/(2*2*10**-6); # i_D0=i_D(0) (A) current i_D at t=0\n", + "v_O=2.5; # (V)\n", + "V_t=V_tO+0.5*(math.sqrt(v_O+2*fie_f)-math.sqrt(2*fie_f)); # at v_O=2.5V\n", + "i_DtPLH=(uC_n*W_n*(V_DD-v_O-V_t)**2)/(2*L_n); # i_DtPLH=i_D(t_PLH) (A) current i_D at t=t_PLH\n", + "i_Dav=(i_D0+i_DtPLH)/2; # i_Dav=i_D|av (A) average discharge current\n", + "t_PLH=C*(V_DD/2)/i_Dav;\n", + "print round(t_PLH*1e9,2),\"t_PHL (ns)\"\n", + "\n", + "# 10.4d\n", + "# Case with v_t going low\n", + "i_D0=uC_n*W_n*((V_DD-V_tO)**2)/(2*2*10**-6); # i_D0=i_D(0) (A) current i_D at t=0\n", + "i_DtPHL=uC_n*W_n*((V_DD-V_tO)*v_O-(v_O**2)/2.0)/(L_n); # i_DtPHL=i_D(t_PHL) (A) current i_D at t=T_PHL\n", + "i_Dav=(i_D0+i_DtPHL)/2; # i_Dav=i_D|av (A) average discarge current\n", + "t_PHL=C*(V_DD/2)/i_Dav;\n", + "print round(t_PHL*1e9,2),\"= t_PHL (ns)\"\n", + "\n", + "# 10.4e\n", + "t_P=(t_PHL+t_PLH)/2;\n", + "print round(t_P*1e9,2),\"= t_P (ns)\"\n", + " # the answer in the textbook is slightly dirfferent due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.4 = V_OH (V)\n", + "18.0 = Static current of the inverter (microA)\n", + "90.0 = Power dissipated (microW)\n", + "0.08 = The output voltage of the inverter (V) \n", + "0.24 t_PHL (ns)\n", + "0.13 = t_PHL (ns)\n", + "0.18 = t_P (ns)\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter11.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter11.ipynb new file mode 100755 index 00000000..efbba551 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter11.ipynb @@ -0,0 +1,140 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:32762f08f8decdcb2472567b8bb56aa30546cb37837b4beaf1c667dc49e7e0c1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter11:Memory and Advanced\n", + "Digital Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.1:pg-1017" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# The problem is solved using Hit and Trial as well as approximation thus no programming is needed hence the example is skipped" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.2:pg-1032" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 11.2 Design of two-stage CMOS op-amp \n", + "\n", + "uC_n=50*10**-6; # u_n*C_ox (A/V**2)\n", + "uC_p=20.0*10**-6; # u_p*C_ox (A/V**2)\n", + "V_tn0=1.0; # (V)\n", + "V_tp0=-1; # (V)\n", + "fie_f=0.6/2; # (V)\n", + "y=0.5; # (V**1/2)\n", + "V_DD=5; # (V)\n", + "W_n=4*10.0**-6; # (m)\n", + "L_n=2*10.0**-6; # (m)\n", + "W_p=10*10**-6; # (m)\n", + "L_p=2*10.0**-6; # (m)\n", + "W=10*10**-6; # (m)\n", + "L=10*10.0**-6; # (m)\n", + "C_B=1*10.0**-12; # bit line capacitance (F)\n", + "deltaV=0.2; # 0.2 V decrement\n", + "WbyL_eq=1/(L_p/W_p+L_n/W_n); # WbyL_eq=(W/L)_eq\n", + "# Equivalent transistor will operate in saturation\n", + "I=(uC_n*WbyL_eq*(V_DD-V_tn0)**2)/2\n", + "r_DS=1/(uC_n*(W_n/L_n)*(V_DD-V_tn0));\n", + "v_Q=r_DS*I; # v_Q=r_DS*I\n", + "I_5=0.5*10.0**-3; # (A) \n", + "deltat=C_B*deltaV/I_5;\n", + "print deltat*1e9, \"is The time (ns) required to develop an output voltage of 0.2V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.4 is The time (ns) required to develop an output voltage of 0.2V\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex11.3:pg-1041" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 11.3 : Time required for v_B to reach 4.5V\n", + "# Consider sense-amplifier circuit\n", + "uC_n=50*10**-6; #uC_n=u_n*C_ox (A/V**2)\n", + "uC_p=20*10**-6; #uC_p=u_p*C_ox (A/V**2)\n", + "W_n=12*10**-6; # (m)\n", + "L_n=4*10**-6; # (m)\n", + "W_p=30*10**-6; # (m)\n", + "L_p=4*10**-6; # (m)\n", + "v_B=4.5; # (V)\n", + "C_B=1*10**-12; # (F)\n", + "V_GS=2.5; # (V)\n", + "V_t=1; # (V)\n", + "deltaV=0.1; # (V)\n", + "g_mn=uC_n*(W_n/L_n)*(V_GS-V_t); # (A/V)\n", + "g_mp=uC_p*(W_p/L_p)*(V_GS-V_t); # (A/V)\n", + "G_m=g_mn+g_mp; # (A/V)\n", + "T=C_B/G_m; # (s)\n", + "deltat=T*(math.log(v_B/V_GS)-math.log(deltaV));\n", + "print round(deltat*1e9,1),\" is The time for v_B to reach 4.5V (s)\"\n", + "# The answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.4 is The time for v_B to reach 4.5V (s)\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter12.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter12.ipynb new file mode 100755 index 00000000..530e0f53 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter12.ipynb @@ -0,0 +1,66 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0d870b040ee224c1f9fb208e7b24af7cd3362e9d307710cf1a001e89fa523e12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter12:Filters and Tuned Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex12.4:pg-1143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 12.4 To design tuned amplifier\n", + "\n", + "cfg=-10; # Center frequency gain (V/V)\n", + "g_m=0.005; # (A/V)\n", + "r_o=10000; # (ohm)\n", + "f_o=1*10**6; # (Hz)\n", + "B=2*math.pi*10**4; # Bandwidth\n", + "R=-cfg/g_m;\n", + "R_L=R*r_o/(r_o-R);\n", + "print R_L/1000,\"= R_L (kohm)\"\n", + "C=1/(R*B)\n", + "print round(C*1e12),\"= C (picoF)\"\n", + "w_o=2*math.pi*f_o;\n", + "L=1/(w_o**2*C);\n", + "print round(L*1e6,2),\"= L (microH)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.5 = R_L (kohm)\n", + "7958.0 = C (picoF)\n", + "3.18 = L (microH)\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter14.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter14.ipynb new file mode 100755 index 00000000..5bdfcf5d --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter14.ipynb @@ -0,0 +1,269 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:04c770610947ad7b99d743d99cd805c99779dc1a6616f379e3e115323e61d9f6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter14:Output Stages and Power Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.1:pg-1239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 14.1 To design a Class B Output Amplifier\n", + "\n", + "P_L=20; # Average power (W) \n", + "R_L=8; # Load resistance (ohm)\n", + "V_o=math.sqrt(2*P_L*R_L); \n", + "print round(V_o,1),\"= Supply voltage required (V)\"\n", + "V_CC=23; # We select this voltage (V)\n", + "I_o=V_o/R_L;\n", + "print round(I_o,2),\"= Peak current drawn from each supply (A)\"\n", + "P_Sav=V_CC*I_o/math.pi; # P_S+ = P_S- = P_Sav\n", + "P_S=P_Sav+P_Sav; # Total supply power\n", + "print round(P_S,1),\"= The total power supply (W)\"\n", + "n=P_L/P_S; # n is power conversion efficiency\n", + "print round(n*100),\" = Power conversion efficiency %\"\n", + "P_DPmax=V_CC**2/(math.pi**2*R_L);\n", + "P_DNmax=P_DPmax;\n", + "print round(P_DPmax,1),\"= Maximun power dissipated in each transistor (W)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "17.9 = Supply voltage required (V)\n", + "2.24 = Peak current drawn from each supply (A)\n", + "32.7 = The total power supply (W)\n", + "61.0 = Power conversion efficiency %\n", + "6.7 = Maximun power dissipated in each transistor (W)\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.2:pg-1245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 14.2 To determine quiescent current and power\n", + "# Consider Class AB Amplifier\n", + "V_CC=15; # (V)\n", + "R_L=100; # (ohm)\n", + "v_O=-10; # Amplitude of sinusoidal output voltage (V)\n", + "I_S=10**-13; # (A)\n", + "V_T=25*10**-3; # (V)\n", + "B=50; # Beta value\n", + "i_Lmax=10/(0.1*10**3); # Maximum current through Q_N (A)\n", + "# Implies max base curent in Q_N is approximately 2mA\n", + "I_BIAS=3*10**-3; # We select I_BIAS=3mA in order to maintain a minimum of 1mA through the diodes\n", + "I_Q=9*10**-3; # The area ratio of 3 yeilds quiescent current of 9mA\n", + "P_DQ=2*V_CC*I_Q;\n", + "print round(P_DQ*1000),\"= Quiescent power dissipation (mW)\"\n", + "#For v_O=0V base current of Q_N is 9/51=0.18 mA\n", + "# Leaves a current of 3-0.18=2.83mA to flow through the diodes\n", + "I_S= (10**-13)/3; # Diodes have I_S = (1*10**-13)/3 \n", + "V_BB=2*V_T*math.log((2.83*10**-3)/I_S);\n", + "print round(V_BB,2),\"= V_BB (V) for v_O = 0V\"\n", + "# For v_O=+10V, current through the diodes will decrease to 1mA\n", + "V_BB=2*V_T*math.log((1*10**-3)/I_S);\n", + "print round(V_BB,2),\"= V_BB (V) for v_O = +10V\"\n", + "# For v_O=-10V , Q_N will conduct very small current thus base current is negligible\n", + "# All of the I_BIAS(3mA) flows through the diodes\n", + "V_BB=2*V_T*math.log((3*10**-3)/I_S);\n", + "print round(V_BB,2),\"= V_BB (V) for v_O = -10V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "270.0 = Quiescent power dissipation (mW)\n", + "1.26 = V_BB (V) for v_O = 0V\n", + "1.21 = V_BB (V) for v_O = +10V\n", + "1.26 = V_BB (V) for v_O = -10V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.3:pg-1248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 14.3 Redesign the output stage of Example 14.2\n", + "V_T=25*10**-3; # (V)\n", + "I_S=10**-14; # (A)\n", + "I_Q=2*10**-3; # Required quiescent current (A)\n", + "# We select I_BIAS=3mA which is divided between I_R and I_C1\n", + "# Thus we select I_R=0.5mA and I_C1=2.5mA\n", + "V_BB=2*V_T*math.log(I_Q/10**-13);\n", + "print round(V_BB,2),\"=V_BB (V)\"\n", + "I_R=0.5*10**-3;\n", + "R1plusR2=V_BB/I_R; # R1plusR2 = R_1+R_2\n", + "I_C1=2.5*10**-3;\n", + "V_BE1=V_T*math.log(I_C1/I_S);\n", + "print round(V_BE1,2),\"= V_BE1 (V)\"\n", + "R_1=V_BE1/I_R;\n", + "print round(R_1/1000,2),\"R_1 (Kohm)\"\n", + "R_2=R1plusR2-R_1;\n", + "print round(R_2/1000,2),\"R_2 (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.19 =V_BB (V)\n", + "0.66 = V_BE1 (V)\n", + "1.31 R_1 (Kohm)\n", + "1.06 R_2 (Kohm)\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.4:pg-1251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 14.4 To determine thermal resistance, junction temperature \n", + "# Consider BJT with following specifications\n", + "P_D0=2; # Maximum power dissipation (W)\n", + "T_A0=25.0; # Ambient temperature (degree celcius)\n", + "T_Jmax=150.0; # maximum junction temperature (degree celcius) \n", + "\n", + "# 14.4a \n", + "theta_JA=(T_Jmax-T_A0)/P_D0; # Thermal resistance\n", + "print theta_JA,\"is The thermal resistance (degree celsius/W)\"\n", + "\n", + "# 14.4b\n", + "T_A=50.0; # (degree celcius)\n", + "P_Dmax=(T_Jmax-T_A)/theta_JA; \n", + "print P_Dmax,\"is Maximum power that can be dissipated at an ambient temperature of 50 degree celsius (W)\"\n", + "\n", + "# 14.4c\n", + "T_A=25.0; # (degree celcius) \n", + "P_D=1; # (W)\n", + "T_J=T_A+theta_JA*P_D;\n", + "print T_J,\"is Junction temperature (degree celcius) if the device is operating at T_A=25 degree celsius and is dissipating 1W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "62.5 is The thermal resistance (degree celsius/W)\n", + "1.6 is Maximum power that can be dissipated at an ambient temperature of 50 degree celsius (W)\n", + "87.5 is Junction temperature (degree celcius) if the device is operating at T_A=25 degree celsius and is dissipating 1W\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.5:pg-1253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 14.5 To determine the maximum power dissipated \n", + "# Consider a BJT with following specifications\n", + "T_Jmax=150; # (degree celcius)\n", + "T_A=50; # (degree celcius)\n", + "\n", + "# 14.5a\n", + "theta_JA=62.5; # (degree celcius/W)\n", + "P_Dmax=(T_Jmax-T_A)/theta_JA;\n", + "print round(P_Dmax,2),\"is The maximum power (W) that can be dissipated safely by the transistor when operated in free air\"\n", + "\n", + "#14.5b\n", + "theta_CS=0.5; # (degree celcius/W)\n", + "theta_SA=4; # (degree celcius/W)\n", + "theta_JC=3.12; # (degree celcius/W)\n", + "theta_JA=theta_JC+theta_CS+theta_SA;\n", + "P_Dmax=(T_Jmax-T_A)/theta_JA\n", + "print round(P_Dmax,1),\"is The maximum power (W) that can be dissipated safely by the transistor when operated at an ambient temperature of 50 degree celcius but with a heat sink for which theta_CS= 0.5 (degree celcius/W) and theta_SA = 4 (degree celcius/W) (W)\"\n", + "\n", + "# 14.5c\n", + "theta_CA=0 # since infinite heat sink\n", + "P_Dmax=(T_Jmax-T_A)/theta_JC;\n", + "print round(P_Dmax),\"is The maximum power (W) that can be dissipated safely if an infinite heat sink is used and T_A=50 (degree celcius)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.6 is The maximum power (W) that can be dissipated safely by the transistor when operated in free air\n", + "13.1 is The maximum power (W) that can be dissipated safely by the transistor when operated at an ambient temperature of 50 degree celcius but with a heat sink for which theta_CS= 0.5 (degree celcius/W) and theta_SA = 4 (degree celcius/W) (W)\n", + "32.0 is The maximum power (W) that can be dissipated safely if an infinite heat sink is used and T_A=50 (degree celcius)\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb new file mode 100755 index 00000000..0ae95a48 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter2.ipynb @@ -0,0 +1,135 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9248ce0e9925b4b2a2db19b4a563a9dcd0c2615021a9c00f051f93b7c452821b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter02:Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1:pg-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 2.1 : Closed loop and open loop gain\n", + "# Consider inverting configuration\n", + "\n", + "# 2.1a\n", + "R_1=1000.0; # (ohm)\n", + "R_2=100*10.0**3; # (ohm)\n", + "A=10**3; # (V/V)\n", + "print A,\"= A (V/V)\"\n", + "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n", + "print round(-G,2),\"= G\"\n", + "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n", + "print round(e,2),\"= e (%)\"\n", + "v_1=0.1; # (V)\n", + "v_1=G*v_1/A;\n", + "print round(v_1*1000,2),\"= v_1 (mV)\"\n", + "A=10**4; # (V/V)\n", + "print A,\"= A (V/V)\"\n", + "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n", + "print round(-G,2),\"= G\"\n", + "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n", + "print round(e,2),\"= e (%)\"\n", + "v_1=0.1; # (V)\n", + "v_1=G*v_1/A;\n", + "print round(v_1*1000,3),\"= v_1 (mV)\"\n", + "A=10**5; # (V/V)\n", + "print A,\"= A (V/V)\"\n", + "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n", + "print round(-G,2),\"= G\"\n", + "e=(-G-(R_2/R_1))/(R_2/R_1)*100;\n", + "print round(e,2),\"= e (%)\"\n", + "v_1=0.1; # (V)\n", + "v_1=G*v_1/A;\n", + "print round(v_1*1000,3),\"= v_1 (mV)\"\n", + "\n", + "# 2.1b\n", + "A=50000; # (V/V)\n", + "print A,\"= A (V/V)\"\n", + "G=-R_2/R_1/(1+(1+R_2/R_1)/A);\n", + "print round(-G,2),\"= G\"\n", + "print \"Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1000 = A (V/V)\n", + "90.83 = G\n", + "-9.17 = e (%)\n", + "-9.08 = v_1 (mV)\n", + "10000 = A (V/V)\n", + "99.0 = G\n", + "-1.0 = e (%)\n", + "-0.99 = v_1 (mV)\n", + "100000 = A (V/V)\n", + "99.9 = G\n", + "-0.1 = e (%)\n", + "-0.1 = v_1 (mV)\n", + "50000 = A (V/V)\n", + "99.8 = G\n", + "Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3:pg-88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 2.3 : Design instrumentation amplifier\n", + "R_2=1-50000-1/1000.0+50;\n", + "print round(-R_2/1000.0,1),\"= R_2 (Kohm)\"\n", + "R_1=-2*R_2/999;\n", + "print round(R_1),\"= R_1 (ohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "49.9 = R_2 (Kohm)\n", + "100.0 = R_1 (ohm)\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter3.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter3.ipynb new file mode 100755 index 00000000..78acbede --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter3.ipynb @@ -0,0 +1,421 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b6ca6f88473b518209629b5a50e034951050cc84cc7fdfcdcdfe2cbba83ff5c4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter03:Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1:pg-143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 3.1: Peak value of diode current and maximum reverse voltage\n", + "#v_s is sinusoidal input voltage with peak 24V\n", + "#battery charges to 12V\n", + "I_d=(24-12)/100.0\n", + "max_v_rev=24+12.0;\n", + "print round(I_d,2),\"peak value of diode current (A)\\n\",round(max_v_rev,2),\"maximum reverse voltage acrossthe diode (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.12 peak value of diode current (A)\n", + "36.0 maximum reverse voltage acrossthe diode (V)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2:pg-145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 3.2 : Values of Iand V for the circuit given\n", + "print \"Consider fig 3.6(a). Assume both diodes are conducting\"\n", + "I_D2=(10-0)/10.0;\n", + "I=(0-(-10))/5.0-I_D2; # node eqution at B for fig 3.6(a)\n", + "V_B=0;\n", + "V=0;\n", + "print I,\"= I (mA)\\n\", V,\"= V (V)\\n\" ,\"D_1 is conducting as assumed originally\"\n", + "print \"Consider fig 3.6(a). Assume both diodes are conducting\"\n", + "I_D2=(10-0)/5.0;\n", + "I=(0-(-10.0))/10-2; # node eqution at B for fig 3.6(b)\n", + "print I,\"= I (mA)\\n \", V,\"=V (V)\"\n", + "print \"Implies assumption is wrong. lets assume D_1 is off and D_2 is on\"\n", + "I_D2=(10-(-10))/15.0;\n", + "V_B=-10+10.0*I_D2;\n", + "I=0;\n", + "print I,\"= I (mA)\\n\", round(V_B,1),\"= V (V)\\n D_1 is reverse biased\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Consider fig 3.6(a). Assume both diodes are conducting\n", + "1.0 = I (mA)\n", + "0 = V (V)\n", + "D_1 is conducting as assumed originally\n", + "Consider fig 3.6(a). Assume both diodes are conducting\n", + "-1.0 = I (mA)\n", + " 0 =V (V)\n", + "Implies assumption is wrong. lets assume D_1 is off and D_2 is on\n", + "0 = I (mA)\n", + "3.3 = V (V)\n", + " D_1 is reverse biased\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3:pg-150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 3.3 : Evaluating junction scaling constant\n", + "#i-I_S*exp(v/(n*V_T)) implies I_S=i*exp(-v/(n*V_T))\n", + "n=1;\n", + "i=10**-3; # (A)\n", + "v=700; # (V)\n", + "V_T=25; # (V)\n", + "I_S=i*exp(-v/(n*V_T))\n", + "print round(I_S,17),\"= I_S (A) for n=1\"\n", + "n=2;\n", + "I_S=i*exp(-v/(n*V_T))\n", + "print round(I_S,11),\"= I_S (A) for n=2\"\n", + "print \"These values implies I_S is 1000 times greater \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.9e-16 = I_S (A) for n=1\n", + "8.3e-10 = I_S (A) for n=2\n", + "These values implies I_S is 1000 times greater \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:pg-154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 3.4: To determine I_D and V_D\n", + "V_DD=5; # (V)\n", + "R=1000; # (ohm)\n", + "I_1=1*10**-3; # (A)\n", + "V_D=0.7; # (V)\n", + "V_1=V_D;\n", + "I_D=(V_DD-V_D)/R;\n", + "I_2=I_D;\n", + "V_2=V_1+0.1*log10(I_2/I_1);\n", + "I_D=(V_DD-V_2)/R;\n", + "print round(I_D*1000.0,3),\"= The diode current (mA)\"\n", + "V_D=V_2+0.1*log10(I_D/I_2)\n", + "print round(V_D,3),\"= The diode volage (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.237 = The diode current (mA)\n", + "0.763 = The diode volage (V)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5:pg-157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 3.5 : Repeating example 3.4 using piecewise linear model\n", + "V_D0=0.65; # (V)\n", + "r_D=20; # (ohm)\n", + "R=1000; # (ohm)\n", + "V_DD=5; # (V)\n", + "I_D=(V_DD-V_D0)/(R+r_D);\n", + "print round(I_D*1000,2),\"= I_D (mA)\"\n", + "V_D=V_D0+I_D*r_D;\n", + "print round(V_D,3),\"= The diod voltage (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.26 = I_D (mA)\n", + "0.735 = The diod voltage (V)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6:pg-162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 3.6 : Power supply ripple\n", + "V_S=10; # V_S=V_+\n", + "V_D=0.7; # (V)\n", + "R=10*10**3; # (ohm)\n", + "n=2;\n", + "V_T=25*10**-3; # (V)\n", + "V_s=1; # (V)\n", + "I_D=(V_S - V_D)/R;\n", + "r_D=n*V_T/I_D;\n", + "v_d=V_s*r_D/(R+r_D);\n", + "print round(v_d*1000,2),\"= v_d(peak (mV))\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5.35 = v_d(peak (mV))\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:pg-163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 3.7 : Percentage change in regulated voltage\n", + "V_DD=10; # (V)\n", + "V_D=0.7*3; # string of 3 diodes provide this constant voltage\n", + "R=1*10**3;\n", + "I_D=(V_DD-V_D)/R;\n", + "n=2;\n", + "V_T= 25*10**-3; # (V)\n", + "r_d=n*V_T/I_D; # incremental resistance \n", + "r=3*r_d; # total incremental resistance\n", + "deltav_O=2*r/(r+R); # deltav is peak to peak change in output voltage\n", + "print round(deltav_O*1000,1),\"is Percentage change (mV) in regulated voltage caused by 10% change in power supply\"\n", + "I=2.1*10**-3; # The current drawn from the diode string\n", + "deltav_O=-I*r; # Decrease in voltage across diode string\n", + "print round(deltav_O*1000,1),\"is Decrease in voltage across diode string (mV)\"\n", + "# The answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "37.3 is Percentage change (mV) in regulated voltage caused by 10% change in power supply\n", + "-39.9 is Decrease in voltage across diode string (mV)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:pg-169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 3.8 : line regulation load regulation\n", + "\n", + "V_Z=6.8; # (V)\n", + "I_Z=0.005; # (A)\n", + "r_Z=20; # (ohm)\n", + "V=10; # V=V_+\n", + "R=0.5*10**3; # (ohm)\n", + "\n", + "# 3.8a\n", + "V_ZO=V_Z-r_Z*I_Z;\n", + "I_Z=(V-V_ZO)/(R+r_Z)\n", + "V_O=V_ZO+I_Z*r_Z;\n", + "print round(V_O,2),\"= V_O (V)\"\n", + "\n", + "# 3.8b\n", + "deltaV=1; # change in V is +1 and -1\n", + "deltaV_O=deltaV*r_Z/(R+r_Z); # corresponding change in output voltage\n", + "print round(deltaV_O*1000,1),\"= Line regulation (mV/V)\"\n", + "\n", + "# 3.8c\n", + "I_L=1*10**-3; # load current\n", + "deltaI_L=1*10**-3;\n", + "deltaI_Z=-1*10**-3; # change in zener current\n", + "deltaV_O=r_Z*deltaI_Z;\n", + "print round(deltaV_O*1000),\"= Load regulation (mV/mA)\"\n", + "\n", + "# 3.8d\n", + "I_L=6.8/2000; # load current with load resistance of 2000\n", + "deltaI_Z=-I_L;\n", + "deltaV_O=r_Z*deltaI_Z;\n", + "print round(deltaV_O*1000,2),\"= Corresponding change in zener voltage (mV) for zener current change of -3.4mA\"\n", + "\n", + "# 3.8e\n", + "R_L=0.5*10**3; # (ohm)\n", + "V_O=V*R_L/(R+R_L);\n", + "print V_O,\"V_O (V) for R_L=0.5K ohm\"\n", + "\n", + "# 3.8f\n", + "I_Z=0.2*10**-3; # Zener t be at the edge of breakdown I_Z=I_ZK\n", + "V_Z=6.7; # V_Z=V_ZK\n", + "I_Lmin=(9-6.7)/0.5; # Lowest current supplied to R\n", + "I_L=I_Lmin-I_Z; # load current\n", + "R_L=V_Z/I_L;\n", + "print round(R_L,1),\"= R_L (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6.83 = V_O (V)\n", + "38.5 = Line regulation (mV/V)\n", + "-20.0 = Load regulation (mV/mA)\n", + "-68.0 = Corresponding change in zener voltage (V) for zener current change of -3.4mA\n", + "5.0 V_O (V) for R_L=0.5K ohm\n", + "1.5 = R_L (Kohm)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9:pg-181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 3.9 : Value of capacitance C that will result in peak-peak ripple of 2V\n", + "V_P=100.0; # (V)\n", + "V_r=2.0; # (V)\n", + "f=60.0; # (Hz)\n", + "R=10.0*10**3; # (ohm)\n", + "I_L=V_P/R;\n", + "C=V_P/(V_r*f*R);\n", + "print round(C*1000000,1),\"= C (microF)\"\n", + "wdeltat=math.sqrt(2*V_r/V_P);\n", + "print wdeltat,\"= Conduction angle (rad)\"\n", + "i_Dav=I_L*(1+math.pi*math.sqrt(2*V_P/V_r));\n", + "print round(i_Dav*1000),\"= i_Dav (A)\"\n", + "i_Dmax=I_L*(1+2*math.pi*math.sqrt(2*V_P/V_r));\n", + "print round(i_Dmax*1000),\"= i_Dmax (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "83.3 = C (microF)\n", + "0.2 = Conduction angle (rad)\n", + "324.0 = i_Dav (A)\n", + "638.0 = i_Dmax (mA)\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter4.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter4.ipynb new file mode 100755 index 00000000..5c722e15 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter4.ipynb @@ -0,0 +1,606 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2e122d0d9af0f7dc649a87e065bb4427f9b9f430299e88d4998a7b5b0d765c15" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter04: MOS Field-Effect Transistors (MOSFETs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:pg-245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.1 : To determine operating point parameters\n", + "L_min=0.4*10**-6; # (m)\n", + "t_ox=8*10**-9; # (s)\n", + "u_n=450*10**-4; # (A/V**2)\n", + "V_t=0.7; # (V)\n", + "e_ox=3.45*10**-11; \n", + "\n", + "# 4.1a\n", + "C_ox=e_ox/t_ox;\n", + "print round(C_ox*1000,2),\"= C_ox (fF/micrometer**2)\"\n", + "k_n=u_n*C_ox;\n", + "print round(k_n*1e6),\"= k_n (microA/V**2)\"\n", + "\n", + "# 4.1b \n", + "# Operation in saturation region\n", + "W=8*10**-6; # (m)\n", + "L=0.8*10**-6; # (m)\n", + "i_D=100*10**-6; # (A)\n", + "V_GS=math.sqrt(2*L*i_D/(k_n*W)) +V_t;\n", + "print round(V_GS,2),\"= V_GS (V)\"\n", + "V_DSmin=V_GS-V_t;\n", + "print round(V_DSmin,2),\"= V_DSmin (V)\"\n", + "\n", + "# 4.1c\n", + "# MOSFET in triode region\n", + "r_DS=1000; # (ohm)\n", + "V_GS=1/(k_n*(W/L)*r_DS)+V_t;\n", + "print round(V_GS,2),\"= V_GS (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "4.31 = C_ox (fF/micrometer**2)\n", + "194.0 = k_n (microA/V**2)\n", + "1.02 = V_GS (V)\n", + "0.32 = V_DSmin (V)\n", + "1.22 = V_GS (V)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2:pg-263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.2: Design of given circuit to obtain I_D=0.4mA and V_D=0.5V\n", + "# NMOS transistor is operating in saturation region\n", + "I_D=0.4*10**-3; # (A)\n", + "V_D=0.5; # (V)\n", + "V_t=0.7; # (V)\n", + "uC_n=100*10**-6; # (A/V**2)\n", + "L=1*10**-6; # (m)\n", + "W=32*10**-6; # (m)\n", + "V_SS=-2.5; # (V)\n", + "V_DD=2.5; # (V)\n", + "V_OV=math.sqrt(I_D*2*L/(uC_n*W));\n", + "V_GS=V_t+V_OV;\n", + "print V_GS,\"= V_t (V)\"\n", + "V_S=-1.2; # (V)\n", + "R_S=(V_S-V_SS)/I_D;\n", + "print round(R_S/1000,2),\"= R_S (Kohm)\"\n", + "V_D=0.5; # (V)\n", + "R_D=(V_DD-V_D)/I_D;\n", + "print round(R_D/1000),\"= R_D (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.2 = V_t (V)\n", + "3.25 = R_S (Kohm)\n", + "5.0 = R_D (Kohm)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:pg-264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.3: Design of given circuit to obtain I_D=80uA\n", + "# FET is operating in saturation region\n", + "I_D=80*10**-6; # (A)\n", + "V_t=0.6; # (V)\n", + "uC_n=200*10**-6; # (A/V**2)\n", + "L=0.8*10**-6; # (m)\n", + "W=4*10**-6; # (m)\n", + "V_DD=3; # (V)\n", + "V_OV=math.sqrt(2*I_D/(uC_n*(W/L)));\n", + "V_GS=V_t+V_OV;\n", + "V_DS=V_GS;\n", + "V_D=V_DS;\n", + "print V_D,\"V_D (V)\"\n", + "R=(V_DD-V_D)/I_D;\n", + "print R/1000,\"R (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.0 V_D (V)\n", + "25.0 R (Kohm)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:pg-265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.4 : Design of given circuit to obtain V_D=0.1V\n", + "# MOSFET is operating in triode region\n", + "V_D=0.1; # (V)\n", + "V_DD=5; # (V)\n", + "V_t=1; # (V=)\n", + "K=1*10**-3; # K=k'_n(W/L)\n", + "V_GS=5; # (V)\n", + "V_DS=0.1; # (V)\n", + "I_D=K*((V_GS-V_t)*V_DS-(V_DS**2)/2);\n", + "print I_D*1000,\"=I_D (mA)\"\n", + "R_D=(V_DD-V_D)/I_D;\n", + "print round(R_D/1000,1),\"=R_D (Kohm)\"\n", + "r_DS=V_DS/I_D;\n", + "print round(r_DS),\"=r_DS (ohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.395 =I_D (mA)\n", + "12.4 =R_D (Kohm)\n", + "253.0 =r_DS (ohm)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.5:pg-266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.5: To determine all node voltages and currents through all branches\n", + "V_t=1; # (V)\n", + "K=1*10**-3; # K=k'_n(W/L)\n", + "V_DD=10; # (V)\n", + "R_G1=10*10**6; # (ohm)\n", + "R_G2=10*10**6; # (ohm)\n", + "R_D=6*10**3; # (ohm)\n", + "R_S=6*10**3; # (ohm)\n", + "I_D=0.5 # mA\n", + "# I_D=0.89mA will result in transistor cut off hence we take the other root of the equation\n", + "V_G=V_DD*R_G2/(R_G2+R_G1);\n", + "I_D=I_D*10**-3;\n", + "print I_D*1000,\"= I_D (mA)\"\n", + "V_S=I_D*R_S;\n", + "print V_S,\"= V_S (V)\"\n", + "V_GS=V_G-V_S;\n", + "print V_GS,\"= V_GS (V)\"\n", + "V_D=V_DD-R_D*I_D;\n", + "print V_D,\"= V_D (V)\"\n", + "# V_D>V_G-V_t the transistor is operating in saturation as initially assumed" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.5 = I_D (mA)\n", + "3.0 = V_S (V)\n", + "2.0 = V_GS (V)\n", + "7.0 = V_D (V)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6:pg-268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.6; Design of given circuit to obtain I_D=0.5mA and V_D=3V\n", + "# MOSFET is in saturation\n", + "V_DD=5; # (V)\n", + "V_D=3; # (V)\n", + "I_D=0.5*10**-3; # (A)\n", + "V_t=-1; # (V)\n", + "K=1*10**-3; # K=k'_n(W/L)\n", + "V_OV=math.sqrt(2*I_D/K);\n", + "V_GS=V_t+(-V_OV)\n", + "R_D=V_D/I_D;\n", + "V_Dmax=V_D-V_t; # - sign as magnitude of V_t is considered\n", + "R_D=V_Dmax/I_D;\n", + "print R_D/1000,\"= R_D (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "8.0 = R_D (Kohm)\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.7:pg-269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.7: To determine drain currents and output voltage\n", + "K_n =1*10**-3; # K_n=k_n*W_n/L_n (A/V**2)\n", + "K_p = 1*10**-3; # K_p=k_p*W_p/L_p (A/V**2)\n", + "V_tn= 1; # (V)\n", + "V_tp= -1; # (V)\n", + "V_I=-2.5; # (V)\n", + "V_DD=2.5; # (V)\n", + "R=10;# (kilo ohm)\n", + "# For V_I=0\n", + "I_DP=(K_p*(V_DD-V_tn)**2)/2;\n", + "I_DN=I_DP;\n", + "print round(I_DP*1000,3),\"= I_DP (mA) and \",round(I_DN*1000,1),\"=I_DN (A) for V_I=0V\"\n", + "print 0,\"= V_O for V_I =0V\"\n", + "# For V_I=2.5V\n", + "# I_DN=K_N(V_GS-V_tn)V_DS\n", + "# I_DN=v_O/R\n", + "# Solving the two equations we get\n", + "I_DN=0.244*10**-3; # (V)\n", + "V_O=-2.44; # (V)\n", + "print V_O,\"= V_O and\",round(I_DN*1000,2),\"= I_DN for V_I=2.5V\"\n", + "# For V_I=-2.5V Q_N is cut off\n", + "I_DP=2.44*10**-3; # (A)\n", + "V_O=2.44; # (V)\n", + "print V_O,\"= V_O(V), \",round(I_DP*1000,2),\"=I_DP (mA) and\",0,\"= I_DN (A) for V_I=-2.5V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.125 = I_DP (mA) and 1.1 =I_DN (A) for V_I=0V\n", + "0 = V_O for V_I =0V\n", + "-2.44 = V_O and 0.24 = I_DN for V_I=2.5V\n", + "2.44 = V_O(V), 2.44 =I_DP (mA) and 0 = I_DN (A) for V_I=-2.5V\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.9:pg-283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.9 : Design of given circuit to obtain I_D=0.5mA\n", + "I_d=0.5*10**-3; # (A)\n", + "I_S=0.5*10**-3; # (A)\n", + "V_t=1; # (V)\n", + "K_n=1*10**-3; # K_n=k_n*W/L (A/V**2)\n", + "V_DD=15; # (V)\n", + "V_D=10; # (V)\n", + "V_S=5; # (V)\n", + "R_D=(V_DD-V_D)/I_d;\n", + "R_S=V_S/I_S;\n", + "V_OV=math.sqrt(I_d*2/K_n);\n", + "V_GS=V_t+V_OV;\n", + "V_G=V_S+V_GS;\n", + "# V_t=1.5V\n", + "# I_D=K(V_GS-V_t)**2/2\n", + "# 7=V_GS+10I_D\n", + "# solving above equations \n", + "I_D=0.455*10**-3;\n", + "deltaI_D=I_D-I_d; # Change in I_D (A)\n", + "change=deltaI_D*100/I_d; # Change in %\n", + "print round(change,2),\"= Change in I_D (%)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-9.0 = Change in I_D (%)\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.10:pg-293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.10 : Small signal analysis\n", + "V_t=1.5; # (V)\n", + "K=0.00025;#K= k_nW/L (A/V**2)\n", + "V_A=50; # (V)\n", + "I_D=1.06*10**-3; # (A)\n", + "V_D=4.4; # (V)\n", + "R_D=10000; # (ohm)\n", + "R_L=10000; # (ohm)\n", + "V_GS=V_D;\n", + "g_m=K*(V_GS-V_t);\n", + "r_o=V_A/I_D;\n", + "A_v=-g_m*(R_L*R_D*r_o)/(R_D*R_L+R_D*r_o+R_L*r_o);\n", + "print round(A_v,1),\"= Voltage gain (V/V)\"\n", + "R_G=10*10**6; #(ohm)\n", + "# i_i=v_i*(1-A_v)/R_G\n", + "R_in=R_G/(1-(A_v));\n", + "print round(R_in/1e6,1),\"= Input resistance (Mohm)\"\n", + "# v_DSmin=v_GSmin-V_t\n", + "v_i=V_t/(1+(-A_v)); # - sign to make A_v positive\n", + "print round(v_i,2),\"= Largest allowable input signal (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-3.3 = Voltage gain (V/V)\n", + "2.3 = Input resistance (Mohm)\n", + "0.35 = Largest allowable input signal (V)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.11:pg-304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.11: To determine all parameters of transistor amplifier\n", + "v_o=90; # (V)\n", + "v_i=9; # (V)\n", + "R_sig=100.0*10**3; # (ohm)\n", + "R_L=10.0*10**3; # (ohm)\n", + "v_sig=10; # (V)\n", + "A_vo=v_o/v_i;\n", + "print A_vo,\"= A_vo (V/V)\"\n", + "G_vo=v_o/A_vo;\n", + "print G_vo,\"= G_vo (V/V)\"\n", + "R_i=G_vo*R_sig/(A_vo-G_vo)\n", + "print R_i/1000,\"= R_i in Kohm\"\n", + "print \"assume R_L = 10 kilo ohm is connected\"\n", + "v_o=70.0; # (V)\n", + "v_i=8; # (V)\n", + "A_v=v_o/v_i;\n", + "print A_v,\"= A_v (V/V)\"\n", + "G_v=v_o/A_vo;\n", + "print G_v,\"= G_v (V/V)\"\n", + "R_o=R_L*(A_vo-A_v)/A_v;\n", + "print round(R_o/1000,2),\"= R_o (Kohm)\"\n", + "R_out=R_L*(G_vo-G_v)/G_v;\n", + "print round(R_out/1000,2),\"= R_out (Kohm)\"\n", + "R_in=(v_i*100)/(v_sig-v_i);\n", + "print R_in,\"= R_in (Kohm)\"\n", + "G_m=A_vo/R_o;\n", + "print G_m,\"= G_m (mho)\"\n", + "A_i=A_v*R_in/R_L;\n", + "print A_i,\"= A_i (V/V)\"\n", + "R_inL0=R_sig/((1+R_sig/R_i)*(R_out/R_o)-1); # R_in|R_L=0 (ohm)\n", + "print round(R_inL0/1000,1),\"= R_in at R_L=0\"\n", + "A_is=A_vo*R_inL0/R_o;\n", + "print int(A_is),\"= A_is (A/A)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 = A_vo (V/V)\n", + "9 = G_vo (V/V)\n", + "900.0 = R_i in Kohm\n", + "assume R_L = 10 kilo ohm is connected\n", + "8.75 = A_v (V/V)\n", + "7.0 = G_v (V/V)\n", + "1.43 = R_o (Kohm)\n", + "2.86 = R_out (Kohm)\n", + "400 = R_in (Kohm)\n", + "0.007 = G_m (mho)\n", + "0.35 = A_i (V/V)\n", + "81.8 = R_in at R_L=0\n", + "572 = A_is (A/A)\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.12:pg-331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.12 : Midband gain and upper 3dB frequency\n", + "R_sig= 100.0*10**3; # (ohm)\n", + "R_G=4.7*10**6; # (ohm)\n", + "R_D=15.0*10**3; # (ohm)\n", + "R_l=15.0*10**3; # (ohm)\n", + "g_m=1*10.0**-3; # (mho)\n", + "r_o=150.0*10**3; # (ohm)\n", + "C_gs=1*10.0**-12; # (F)\n", + "C_gd=0.4*10**-12; # (F)\n", + "R_L= 1.0/(1/r_o + 1/R_D + 1/R_l)\n", + "A_M=R_G/(R_G + R_sig)*g_m*R_L;\n", + "print round(A_M),\"= midband gain A_M (V/V)\"\n", + "C_eq=(1+g_m*R_L)*C_gd;\n", + "C_in=C_gs+C_eq;\n", + "f_H=(R_G+R_sig)/(2*math.pi*C_in*R_sig*R_G);\n", + "print round(f_H/1000),\"= f_H (KHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "7.0 = midband gain A_M (V/V)\n", + "382.0 = f_H (KHz)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.13:pg-335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 4.13 : Coupling capacitor values\n", + "R_G=4.7*10**6; # (ohm)\n", + "R_D=15*10**3; # (ohm)\n", + "R_L=15*10**3; # (ohm)\n", + "R_sig=100*10**3; # (ohm)\n", + "g_m=1*10**-3; # (mho)\n", + "f_L=100; # (Hz)\n", + "C_S=g_m/(2*math.pi*f_L)\n", + "print round(C_S*1e6,1),\"= C_S (microF)\"\n", + "f_P2=1/(2*math.pi*C_S/g_m);\n", + "f_P1=10; # (Hz)\n", + "f_P2=10; # (Hz)\n", + "C_C1=1/(2*math.pi*(R_G+R_sig)*10)\n", + "print round(C_C1*1e9,1),\"= C_C1 (nanoF)\"\n", + "C_C2=1/(2*math.pi*(R_D+R_L)*10)\n", + "print round(C_C2*1e6,2),\"= C_C2 (microF)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.6 = C_S (microF)\n", + "3.3 = C_C1 (nanoF)\n", + "0.53 = C_C2 (microF)\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter5.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter5.ipynb new file mode 100755 index 00000000..4b4216b1 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter5.ipynb @@ -0,0 +1,868 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2f02a9bc5831c7f367935142b66b71aa0da896891093c898bfa38d6e16cd05d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter05: Bipolar Junction\n", + "Transistors (BJTs)" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1:pg-395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.1 : Design of given circuit with current 2mA\n", + "# BJT will be operating in active mode\n", + "B=100.0; # B is beta value\n", + "a=B/(B+1); # a is alpha value\n", + "v_BE=0.7; # v_BE (V) at i_C=1mA\n", + "i_C1=1*10.0**-3; # (A)\n", + "I_C2=2*10.0**-3; # (A)\n", + "V_T=25*10.0**-3; # (V)\n", + "V_C=5; # (V)\n", + "V_CC=15.0; # (V)\n", + "V_B=0; # (V)\n", + "V_RC=V_CC-V_C;# V_RC is the voltage drop across resistor R_C\n", + "R_C=V_RC/I_C;\n", + "print R_C/1000,\"=Collector Resistance R_C (Kohm)\"\n", + "V_BE=v_BE+V_T*math.log(I_C2/i_C1);\n", + "print round(V_BE,3),\"=Base emitter voltage V_BE (V) at i_C=2mA\"\n", + "V_E=V_B-V_BE;\n", + "print round(V_E,3),\"=Emitter voltage V_E (V)\"\n", + "I_E=I_C2/a;\n", + "print I_E*1000,\"=Emitter current I_E (mA)\"\n", + "R_E=(V_E-(-V_CC))/I_E;\n", + "print round(R_E/1000,2),\"= Emitter resistance R_C (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5.0 =Collector Resistance R_C (Kohm)\n", + "0.717 =Base emitter voltage V_BE (V) at i_C=2mA\n", + "-0.717 =Emitter voltage V_E (V)\n", + "2.02 =Emitter current I_E (mA)\n", + "7.07 = Emitter resistance R_C (Kohm)\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2:pg-413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.2 : Consider a common Emitter circuit\n", + "I_S=10.0**-15; # (A)\n", + "R_C=6.8*10**3; # (ohm)\n", + "V_CC=10.0; # (V)\n", + "V_CE=3.2; # (V)\n", + "V_T=25.0*10**-3; # (V)\n", + "\n", + "# 5.2a\n", + "I_C=(V_CC-V_CE)/R_C;\n", + "print I_C*1000,\"= Collector current (A)\"\n", + "V_BE=V_T*math.log(I_C/I_S);\n", + "print round(V_BE*1000,1),\"= V_BE (mV)\"\n", + "\n", + "# 5.2b\n", + "V_in=5*10**-3; # sinuosoidal input 0f peak amplitide 5mv\n", + "A_v=-(V_CC-V_CE)/V_T;\n", + "print A_v,\"= Voltage gain\"\n", + "V_o=-A_v*V_in; # negative sign to make positive value of voltage gain\n", + "print V_o,\"= Amplitude of output voltage (V)\"\n", + "\n", + "# 5.2c\n", + "v_CE=0.3# (V)\n", + "i_C=(V_CC-v_CE)/R_C;\n", + "print round(i_C*1000,2),\"= i_C (mA)\"\n", + "v_be=V_T*math.log(i_C/I_C); # v_BE is positive increment in v_BE\n", + "print round(v_be*1000),\"= required increment (mV)\"\n", + "\n", + "# 5.2d\n", + "v_O=0.99*V_CC;\n", + "R_C=6.8*10**3; # (ohm)\n", + "i_C=(V_CC-v_O)/R_C;\n", + "I_C=1*10**-3; # (A)\n", + "print round(i_C*1000,4),\"= i_C (mA)\"\n", + "v_be=V_T*math.log(i_C/I_C);\n", + "print round(v_be*1000,1),\"= negative increment in v_BE (mV)\"\n", + "\n", + "# the answer for the C part is incorrect in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.0 = Collector current (A)\n", + "690.8 = V_BE (mV)\n", + "-272.0 = Voltage gain\n", + "1.36 = Amplitude of output voltage (V)\n", + "1.43 = i_C (mA)\n", + "9.0 = required increment (mV)\n", + "0.0147 = i_C (mA)\n", + "-105.5 = negative increment in v_BE (mV)\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3:pg-420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.3 :Determine R_B \n", + "# transistor is specified to have B value in the range of 50 to 150\n", + "V_C=0.2; # V_C=V_CEsat\n", + "V_CC=10; # (V)\n", + "R_C=10**3; # (ohm)\n", + "V_BB=5; # (V)\n", + "V_BE=0.7; # (V)\n", + "bmin=50; # range of bete is 50 to 150\n", + "I_Csat=(V_CC-V_C)/R_C;\n", + "I_BEOS=I_Csat/bmin; # I_B(EOS)=I_BEOS\n", + "I_B=10*I_BEOS; # base current for an overdrive factor 10\n", + "R_B=(V_BB-V_BE)/I_B;\n", + "print round(R_B/1000,1),\"= Value of R_B (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.2 = Value of R_B (Kohm)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4:pg-422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.4 : Analyse the circuit to find node voltages and branch currents\n", + "V_BB= 4; # (V)\n", + "V_CC=10; # (V)\n", + "V_BE=0.7; # (V)\n", + "b=100; # beta = 100\n", + "R_E=3.3*10**3; # (ohm)\n", + "R_C=4.7*10**3; # (ohm)\n", + "V_E=V_BB-V_BE;\n", + "print V_E,\"= Emitter voltage (V)\"\n", + "I_E=(V_E-0)/R_E;\n", + "print I_E*1000,\"= Emitter current (mA)\"\n", + "a=b/(b+1.0) # alpha value\n", + "I_C=I_E*a;\n", + "print round(I_C*1000,2),\"= Collector current (mA)\"\n", + "V_C=V_CC-I_C*R_C; # Applying ohm's law \n", + "print round(V_C,1),\"= Collector voltage (V)\"\n", + "I_B=I_E/(b+1);\n", + "print round(I_B*1000,2),\"= Base current (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.3 = Emitter voltage (V)\n", + "1.0 = Emitter current (mA)\n", + "0.99 = Collector current (mA)\n", + "5.3 = Collector voltage (V)\n", + "0.01 = Base current (mA)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5:pg-423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.5 : Analyse the circuit to find node voltages and branch currents\n", + "print \"Assuming active mode operation\"\n", + "V_CC=10.0; # (V)\n", + "R_C=4.7*10**3; # (V)\n", + "R_E=3.3*10**3; # (ohm)\n", + "V_BE=0.7; # (V)\n", + "V_BB=6.0; # (V)\n", + "V_CEsat=0.2; # (V)\n", + "V_E=V_BB-V_BE; \n", + "print V_E,\"= Emitter voltage (V)\"\n", + "I_E=V_E/R_E;\n", + "print round(I_E*1000,1),\"= Emitter current (mA)\"\n", + "V_C=V_CC-I_E*R_C; # I_E=I_C\n", + "print round(V_C,2),\"= Collector voltage (V)\"\n", + "print \"Since V_C < V_B our assumption is wrong\\n Hence its saturation mode operation\"\n", + "V_E=V_BB-V_BE;\n", + "print V_E,\"= Emitter voltage (V)\"\n", + "I_E=V_E/R_E;\n", + "print round(I_E*1000,1),\"= Emitter current (mA)\"\n", + "V_C=V_E+V_CEsat;\n", + "print V_C,\"= Collector voltage (V)\"\n", + "I_C=(V_CC-V_C)/R_C;\n", + "print round(I_C*1000,2),\"= Collector current (mA)\"\n", + "I_B=I_E-I_C;\n", + "print round(I_B*1000,2),\"=Base current (mA)\"\n", + "Bforced=I_C/I_B; # transistor is made to operate at a forced beta value\n", + "print round(Bforced,1),\"= forced beta\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming active mode operation\n", + "5.3 = Emitter voltage (V)\n", + "1.6 = Emitter current (mA)\n", + "2.45 = Collector voltage (V)\n", + "Since V_C < V_B our assumption is wrong\n", + " Hence its saturation mode operation\n", + "5.3 = Emitter voltage (V)\n", + "1.6 = Emitter current (mA)\n", + "5.5 = Collector voltage (V)\n", + "0.96 = Collector current (mA)\n", + "0.65 =Base current (mA)\n", + "1.5 = forced beta\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6:pg-426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.7: Analyse the circuit to find node voltages and branch currents\n", + "V_CC=-10; # (V)\n", + "R_E=2000; # (ohm)\n", + "R_C=1000; # (ohm)\n", + "V_EE=10; # (V)\n", + "V_E=0.7; # (V) emitter base junction will be forward biased with V_E=V_EB=0.7V\n", + "print V_E,\"= Emitter base junction is forward biased with V_E (V)\"\n", + "I_E=(V_EE-V_E)/R_E;\n", + "print round(I_E*1000,2),\"= Emitter current (mA)\"\n", + "B=100; # Assuming beta 100\n", + "a=B/(B+1.0);\n", + "I_C=a*I_E; # Assuming the transistor to operate in active mode\n", + "print round(I_C*1000,1),\"= Collector current (mA)\"\n", + "V_C=V_CC+I_C*R_C;\n", + "print round(V_C,1),\"= Collector voltage (V)\"\n", + "I_B=I_E/(B+1);\n", + "print round(I_B*1000,2),\"= Base current (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.7 = Emitter base junction is forward biased with V_E (V)\n", + "4.65 = Emitter current (mA)\n", + "4.6 = Collector current (mA)\n", + "-5.4 = Collector voltage (V)\n", + "0.05 = Base current (mA)\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.8:pg-428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.8 : Analyse the circuit to find node voltages and branch currents\n", + "V_CC= 10; # (V)\n", + "R_C=2000.0; # (ohm)\n", + "V_BB=5.0; # (V)\n", + "R_B=100.0*10**3; # (ohm)\n", + "B=100.0; # beta value\n", + "I_B=(V_BB-V_BE)/R_B;\n", + "print round(I_B*1000,3),\"= Base current (mA)\"\n", + "I_C=B*I_B;\n", + "print round(I_C*1000,1),\"= Collector current (mA)\"\n", + "V_C=V_CC-I_C*R_C;\n", + "print V_C,\"= Collector voltage (V)\"\n", + "V_B=0.7 ; # V_B=V_BE\n", + "print V_B,\"= Base voltage (V)\"\n", + "I_E=(B+1.0)*I_B;\n", + "print round(I_E*1000,1),\"= Emitter current (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.043 = Base current (mA)\n", + "4.3 = Collector current (mA)\n", + "1.4 = Collector voltage (V)\n", + "0.7 = Base voltage (V)\n", + "4.3 = Emitter current (mA)\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.9:pg-429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.9 :Analyse the circuit to find node voltages and branch currents\n", + "# assuming that the transistor is saturated \n", + "V_CC=-5; # (V)\n", + "V_EE=5; # (V)\n", + "R_B=10000; # (ohm)\n", + "R_C=10000; # (ohm)\n", + "R_E=1000; # (ohm)\n", + "V_EB=0.7; # (V)\n", + "V_ECsat=0.2; # (V)\n", + "# using the relation I_E=I_C+I_B\n", + "V_B=3.75/1.2; #(V)\n", + "print round(V_B,2),\"= Base voltage (V)\"\n", + "V_E=V_B+V_EB;\n", + "print round(V_E,2),\"= Emitter voltage (V)\"\n", + "V_C=V_E-V_ECsat;\n", + "print round(V_C,2),\"= Collector voltage (V)\"\n", + "I_E=(V_EE-V_E)/R_E;\n", + "print round(I_E*1000,2),\"= Emitter current (mA)\"\n", + "I_B=V_B/R_B;\n", + "print round(I_B*1000,2),\"= Base current (mA)\"\n", + "I_C=(V_C-V_CC)/R_C;\n", + "print round(I_C*1000,2),\"= Collector current (mA)\"\n", + "Bforced=I_C/I_B; # Value of forced beta\n", + "print round(Bforced,1), \"= Forced Beta value\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.13 = Base voltage (V)\n", + "3.83 = Emitter voltage (V)\n", + "3.63 = Collector voltage (V)\n", + "1.17 = Emitter current (mA)\n", + "0.31 = Base current (mA)\n", + "0.86 = Collector current (mA)\n", + "2.8 = Forced Beta value\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.10:pg-430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Exampe 5.10 : Analyse the circuit to find node voltages and branch currents\n", + "V_CC=15; # (V)\n", + "R_C=5000; # (ohm)\n", + "R_B1=100*10**3; # (ohm)\n", + "R_B2=50*10**3; # (ohm)\n", + "R_E=3000; # (ohm)\n", + "V_BE=0.7; # (V)\n", + "B=100; # beta value\n", + "V_BB=V_CC*R_B2/(R_B1+R_B2);\n", + "print V_BB,\"=V_BB (V)\"\n", + "R_BB=R_B1*R_B2/(R_B1+R_B2);\n", + "print round(R_BB/1000.0,1),\"=R_BB (Kohm)\"\n", + "I_B=I_E/(B+1.0);\n", + "print round(I_B*1000,4),\"=Base current (mA)\"\n", + "I_E=(V_BB-V_BE)/(R_E +(R_BB/(B+1)))\n", + "print round(I_E*1000,2),\"=Emiter current (mA)\"\n", + "I_B=I_E/(B+1.0)\n", + "print round(I_B*1000,4),\"=Base current (mA)\"\n", + "V_B=V_BE+I_E*R_E;\n", + "print round(V_B,2),\"=Base voltage (V)\"\n", + "a=B/(B+1.0); # alpha value\n", + "I_C=a*I_E\n", + "print round(I_C*1000,2),\"=Collector current (mA)\"\n", + "V_C=V_CC-I_C*R_C;\n", + "print V_C,\"=Collector voltage (V))\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5 =V_BB (V)\n", + "33.3 =R_BB (Kohm)\n", + "0.0128 =Base current (mA)\n", + "1.29 =Emiter current (mA)\n", + "0.0128 =Base current (mA)\n", + "4.57 =Base voltage (V)\n", + "1.28 =Collector current (mA)\n", + "8.60746885499 =Collector voltage (V))\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.11:pg-432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.11 :Analyse the circuit to find node voltages and branch currents\n", + "V_CC=15.0; # (V)\n", + "R_C1=5000.0; # (ohm)\n", + "R_B1=100.0*10**3; # (ohm)\n", + "R_B2=50.0*10**3; # (ohm)\n", + "R_E=3000.0; # (ohm)\n", + "V_BE=0.7; # (V)\n", + "R_E2=2000.0; # (ohm)\n", + "R_C2=2700.0; # (ohm)\n", + "V_EB=0.7; # (V)\n", + "B=100.0; # beta value\n", + "V_BB=V_CC*R_B2/(R_B1+R_B2);\n", + "R_BB=R_B1*R_B2/(R_B1+R_B2);\n", + "I_E1=(V_BB-V_BE)/(R_E +(R_BB/(B+1.0)))\n", + "print round(I_E1*1000,2),\"= I_E1 (mA)\"\n", + "I_B1=I_E1/(B+1.0)\n", + "print round(I_B1*1000,2),\"I_B1 (mA)\"\n", + "V_B1=V_BE+I_E*R_E;\n", + "print round(V_B1,2),\"=V_B1 (V)\"\n", + "a=B/(B+1.0); # alpha value\n", + "# beta and alpha values are same for the two transistors\n", + "I_C1=a*I_E\n", + "print round(I_C1*1000,2),\"= IC1 (mA)\"\n", + "V_C1=V_CC-I_C1*R_C1;\n", + "print round(V_C1,1),\"V_C1 (V))\"\n", + "V_E2=V_C1+V_EB;\n", + "print round(V_E2,1),\"V_E2(V)\"\n", + "I_E2=(V_CC-V_E2)/R_E2;\n", + "print round(I_E2*1000,2),\"I_E2 (mA)\"\n", + "I_C2=a*I_E2;\n", + "print round(I_C2*1000,2),\"I_C2 (mA)\"\n", + "V_C2=I_C2*R_C2;\n", + "print round(V_C2,2),\"V_C2 (V)\"\n", + "I_B2=I_E2/(B+1.0);\n", + "print round(I_B2*1000,3),\"I_B2 (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.29 = I_E1 (mA)\n", + "0.01 I_B1 (mA)\n", + "4.57 =V_B1 (V)\n", + "1.28 = IC1 (mA)\n", + "8.6 V_C1 (V))\n", + "9.3 V_E2(V)\n", + "2.85 I_E2 (mA)\n", + "2.82 I_C2 (mA)\n", + "7.61 V_C2 (V)\n", + "0.028 I_B2 (mA)\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.13:pg-438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.13 : Design of bias network of the amplifier\n", + "I_E=1*10**-3; # (A)\n", + "V_CC=12; # (V)\n", + "B=100; # beta value\n", + "V_B=4; # (V)\n", + "V_BE=0.7; # (V)\n", + "R1=80; # (ohm)\n", + "R2=40; # (ohm)\n", + "V_C=8; # (V)\n", + "V_E=V_B-V_BE;\n", + "print V_E,\"= Emitter voltage (V)\"\n", + "R_E=V_E/I_E;\n", + "print R_E/1000,\"= Emitter resistance (Kohm)\"\n", + "I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));\n", + "print I_E*1000,\"= more accurate value for I_E (mA) for R1=80 ohm and R2=40 ohm\"\n", + "R1=8; # (ohm)\n", + "R2=4; # (ohm)\n", + "I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));\n", + "print I_E*1000,\"= more accurate value for I_E (mA) for R1=8 ohm and R2=4 ohm\"\n", + "R_C=(V_CC-V_C)/I_E; # I_E=I_C\n", + "print round(R_C/1000.0),\"= Collector resistor (Kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.3 = Emitter voltage (V)\n", + "3.3 = Emitter resistance (Kohm)\n", + "1.0 = more accurate value for I_E (mA) for R1=80 ohm and R2=40 ohm\n", + "1.0 = more accurate value for I_E (mA) for R1=8 ohm and R2=4 ohm\n", + "4.0 = Collector resistor (Kohm)\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.14:pg-450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.14 : Analysis of transistor amplifier\n", + "V_CC=10; # (V)\n", + "R_C=3000; # (ohm)\n", + "R_BB=100*10**3; # (ohm)\n", + "V_BB=3; # (V)\n", + "V_BE=0.7; # (V)\n", + "V_T=25*10**-3; # (V)\n", + "I_B=(V_BB-V_BE)/R_BB;\n", + "print round(I_B*1000,2),\"= Base current (mA)\"\n", + "I_C=B*I_B;\n", + "print round(I_C*1000,2),\"= Collector current (mA)\"\n", + "V_C=V_CC-I_C*R_C;\n", + "print V_C,\"= Collecor voltage (V)\"\n", + "I_E=B*I_C/(B+1);\n", + "r_e=V_T/I_E;\n", + "print round(r_e,2),\"= r_e (ohm)\"\n", + "g_m=I_C/V_T;\n", + "print g_m*1000,\"= g_m (mA/V)\"\n", + "r_pi=B/g_m;\n", + "print round(r_pi/1000,2),\"= r_pi (Kohm)\"\n", + "# v_i is input voltage let us assume it to be 1 V\n", + "v_i=1;\n", + "v_be=v_i*r_pi/(r_pi+R_BB)\n", + "print round(v_be,3),\"= v_be\"\n", + "v_o=-g_m*R_C*v_be;\n", + "print round(v_o),\"= Output voltage (V)\"\n", + "A_v=v_o/v_i;\n", + "print round(A_v),\"= Voltage gain\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.02 = Base current (mA)\n", + "2.3 = Collector current (mA)\n", + "3.1 = Collecor voltage (V)\n", + "10.98 = r_e (ohm)\n", + "92.0 = g_m (mA/V)\n", + "1.09 = r_pi (Kohm)\n", + "0.011 = v_be\n", + "-3.0 = Output voltage (V)\n", + "-3.0 = Voltage gain\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.17:pg-464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.17 : Amplifier parameters\n", + "# Transistor amplifier is having a open circuit voltage of v_sig of 10mV\n", + "v_sig=10*10.0**-3; # (V)\n", + "R_L=10*10.0**3; # (ohm)\n", + "R_sig=100*10.0**3; # (ohm)\n", + "print \"Calculation with R_L infinite\"\n", + "v_i=9.0; # (V)\n", + "v_o=90.0; # (V)\n", + "A_vo=v_o/v_i;\n", + "print A_vo,\"= A_vo (V/V)\"\n", + "G_vo=v_o/A_vo;\n", + "print G_vo,\"= G_vo (V/V)\"\n", + "R_i=G_vo*R_sig/(A_vo-G_vo)\n", + "print (R_i/1000),\"= R_i (Kohm)\"\n", + "print \"Calculations with R_L = 10k ohm\"\n", + "v_o=70*10**-3; # (V)\n", + "v_i=8*10**-3; # (V)\n", + "A_v=v_o/v_i;\n", + "print A_v,\"= Voltage gain A_v (V/V)\"\n", + "G_v=v_o*10**3/10.0;\n", + "print G_v,\"= G_v (V/V)\"\n", + "R_o=(A_vo-A_v)*R_L/A_v;\n", + "print round(R_o/1000,2),\"= R_o (Kohm)\"\n", + "R_out=(G_vo-G_v)*R_L/G_v;\n", + "print round(R_out/1000,2),\"= R_out (Kohm)\"\n", + "R_in=v_i*R_sig/(v_sig-v_i);\n", + "print R_in/1000,\"= R_in (Kohm)\"\n", + "G_m=A_vo/R_o;\n", + "print round(G_m*1000),\"= G_m (mA/V)\"\n", + "A_i=A_v*R_in/R_L;\n", + "print A_i,\"= A_i (A/A)\"\n", + "R_ino=R_sig/((1+R_sig/R_i)*(R_out/R_o)-1); # R_ino is R_in at R_L=0\n", + "print round(R_ino/1000,1),\"= R_in at R_L =0\"\n", + "A_is=A_vo*R_ino/R_o;\n", + "print int(A_is),\"= A_is (A/A)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Calculation with R_L infinite\n", + "10.0 = A_vo (V/V)\n", + "9.0 = G_vo (V/V)\n", + "900.0 = R_i (Kohm)\n", + "Calculations with R_L = 10k ohm\n", + "8.75 = Voltage gain A_v (V/V)\n", + "7.0 = G_v (V/V)\n", + "1.43 = R_o (Kohm)\n", + "2.86 = R_out (Kohm)\n", + "400.0 = R_in (Kohm)\n", + "7.0 = G_m (mA/V)\n", + "350.0 = A_i (A/A)\n", + "81.8 = R_in at R_L =0\n", + "572 = A_is (A/A)\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.18:pg-497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Example 5.18 : Midband gain and 3dB frequency\n", + "# Transistor is biased at I_C=1mA\n", + "V_CC=10.0; # (V)\n", + "V_EE=10.0; # (V)\n", + "I=0.001; # (A)\n", + "R_B=100000.0; # (ohm)\n", + "R_C=8000.0; # (ohm)\n", + "R_sig=5000.0; #(ohm)\n", + "R_L=5000.0; # (ohm)\n", + "B=100.0; # beta value\n", + "V_A=100.0; # (V)\n", + "C_u=1*10.0**-12; # (F)\n", + "f_T=800.0*10**6; # (Hz)\n", + "I_C=0.001; # (A)\n", + "r_x=50.0; # (ohm)\n", + "# Values of hybrid pi model parameters\n", + "g_m=I_C/V_T;\n", + "r_pi=B/g_m;\n", + "r_o=V_A/I_C;\n", + "w_T=2*math.pi*f_T;\n", + "CpiplusCu=g_m/w_T; # C_u+C_pi\n", + "C_pi=CpiplusCu-C_u;\n", + "R_l=r_o*R_C*R_L/(r_o*R_C+R_C*R_L+R_L*r_o) # R_l=R_L'\n", + "A_M=R_B*r_pi*g_m*R_l/((R_B+R_sig)*(r_pi+r_x+(R_B*R_sig/(R_B+R_sig))));\n", + "print round(A_M),\"= Midband gain (V/V)\"\n", + "R_seff=(r_pi*(r_x+R_B*R_sig/(R_B+R_sig)))/(r_pi+r_x+R_B*R_sig/(R_B+R_sig)); # Effective source resistance R_seff=R'_sig\n", + "C_in=C_pi+C_u*(1+R_l*g_m);\n", + "f_H=1/(2*math.pi*C_in*R_seff);\n", + "print int(f_H/1000),\"= 3dB frequency (KHz)\"\n", + "\n", + "# the answer is the book is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "39.0 = Midband gain (V/V)\n", + "759 = 3dB frequency (KHz)\n" + ] + } + ], + "prompt_number": 109 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.19:pg-502" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 5.19 : To select values of capacitance required\n", + "R_B=100000.0; # (ohm)\n", + "r_pi=2500.0; # (ohm)\n", + "R_C=8000.0; # (ohm)\n", + "R_L=5000.0; # (ohm)\n", + "R_sig=5000.0; # (ohm)\n", + "B=100.0; # beta value\n", + "g_m=0.04; # (A/V)\n", + "r_pi=2500.0; #(ohm)\n", + "f_L=100.0; # (Hz)\n", + "r_e=25.0; # (ohm)\n", + "R_C1=R_B*r_pi/(R_B+r_pi)+R_sig; # Resistance seen by C_C1 \n", + "R_E=r_e+R_B*R_sig/((R_B+R_sig)*(B+1)); # Resistance seen by C_E\n", + "R_C2=R_C+R_L;# Resistance seen by C_C2\n", + "w_L=2*math.pi*f_L;\n", + "C_E=1/(R_E*0.8*w_L); #C_E is to contribute only 80% of the value of w_L\n", + "print round(C_E*1e6,1),\"= C_E (microF)\" \n", + "C_C1=1/(R_C1*0.1*w_L); #C_C1 is to contribute only 10% of the value of f_L\n", + "print round(C_C1*1e6,1),\"= C_C1 (microF)\"\n", + "C_C2=1/(R_C2*0.1*w_L); #C_C2 should contribute only 10% of the value of f_L\n", + "print round(C_C2*1e6,1),\"= C_C2 (microF)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "27.6 = C_E (microF)\n", + "2.1 = C_C1 (microF)\n", + "1.2 = C_C2 (microF)\n" + ] + } + ], + "prompt_number": 116 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter6.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter6.ipynb new file mode 100755 index 00000000..ea4f4708 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter6.ipynb @@ -0,0 +1,1095 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:40f100c8d1fc30e8a6b1192e3ef11450d13550145cfc252cd5b9c5a67296969d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06:Single-Stage Integrated-\n", + "Circuit Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1:pg-553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.1: To find the operating point of NMOS transistor\n", + "# Consider NMOS transistor\n", + "\n", + "# 6.1a\n", + "I_D=100.0*10**-6; # (A)\n", + "K_n=387.0*10**-6*10; # K_n=u_n*C_ox(W/L) (A/V**2) \n", + "V_th=0.48; # (V)\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "print round(V_OV,2),\"= V_OV (V)\"\n", + "V_GS=V_th+V_OV;\n", + "print round(V_GS,2),\"= V_GS (V)\"\n", + "\n", + "# 6.1b\n", + "I_C=100*10**-6; # (A)\n", + "I_S=6*10**-18 # (A)\n", + "V_T=0.025; # (V)\n", + "V_BE=V_T*math.log(I_C/I_S);\n", + "print round(V_BE,2),\"= V_BE (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.23 = V_OV (V)\n", + "0.71 = V_GS (V)\n", + "0.76 = V_BE (V)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2:pg-556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.2 : Comparison between NMOS transistor and npn transistor\n", + "\n", + "print \"For NMOS transistor\"\n", + "I_D=100*10**-6; # (A)\n", + "V_a=5; # V'_A=V_a (A)\n", + "L=0.4; # (um)\n", + "K_n=267*4/0.4*10**-6; # K_n=u_n*C_ox*(W/L) (A/V**2)\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "g_m=math.sqrt(2*K_n*I_D)\n", + "print round(g_m*1e3,2),\"= g_m (mA/V)\"\n", + "print \"R_in is infinite\"\n", + "r_o=V_a*L/I_D;\n", + "print r_o/1000,\"= r_o (kohm)\"\n", + "A_O=g_m*r_o;\n", + "print round(A_O,1),\"= A_O (V/V)\"\n", + "print \"For npn transistor\"\n", + "I_C=0.1*10**-3; # collector current \n", + "B_o=100; # beta value\n", + "V_A=35; # (V)\n", + "g_m=I_C/V_T;\n", + "print round(g_m*1e3),\"= g_m (mA/V)\"\n", + "R_in=B_o/g_m;\n", + "print R_in/1000,\"= R_in (Kohm)\"\n", + "r_o=V_A/I_C;\n", + "print r_o/1000,\"= r_o (Kohm)\"\n", + "A_O=g_m*r_o;\n", + "print A_O,\"= A_O (V/V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For NMOS transistor\n", + "0.73 = g_m (mA/V)\n", + "R_in is infinite\n", + "20.0 = r_o (kohm)\n", + "14.6 = A_O (V/V)\n", + "For npn transistor\n", + "4.0 = g_m (mA/V)\n", + "25.0 = R_in (Kohm)\n", + "350.0 = r_o (Kohm)\n", + "1400.0 = A_O (V/V)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3:pg-559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.3 : Comparison between NMOS transistor and npn transistor\n", + "# For npn transistor\n", + "print \"For npn transistor\"\n", + "I_C=10.0*10**-6; # (A)\n", + "V_T=0.025; # (V)\n", + "V_A=35.0; # (V)\n", + "C_jeO=5.0*10**-15; # (F)\n", + "C_uO=5*10.0**-15; # (F)\n", + "C_L=1*10.0**-12; # (F)\n", + "print \"The data calculated for I_C=10uA\"\n", + "g_m=I_C/V_T;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_C;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=V_A/V_T;\n", + "print A_O,\"= A_O (V/V)\"\n", + "T_F=10*10.0**-12;\n", + "C_de=T_F*g_m;\n", + "print round(C_de*1e15,2),\"= C_de (fF)\"\n", + "C_je=2*C_jeO;\n", + "print round(C_je*1e15,2),\"= C_je (fF)\"\n", + "C_pi=C_de+C_je;\n", + "print round(C_pi*1e15,2),\"= C_pi (fF)\"\n", + "C_u=C_uO;\n", + "print round(C_u*1e15,2),\"= C_u (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_pi+C_u));\n", + "print round(f_T/1e9,1),\"= f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L);\n", + "print round(f_t/1e6,1),\"= f_t (MHz)\"\n", + "print \"The data calculated for I_C=100uA\"\n", + "I_C=100.0*10**-6;\n", + "g_m=I_C/V_T;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_C;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=V_A/V_T;\n", + "print A_O,\"= A_O (V/V)\"\n", + "T_F=10.0*10**-12;\n", + "C_de=T_F*g_m;\n", + "print round(C_de*1e15,2),\"= C_de (fF)\"\n", + "C_je=2*C_jeO;\n", + "print round(C_je*1e15,2),\"= C_je (fF)\"\n", + "C_pi=C_de+C_je;\n", + "print round(C_pi*1e15,2),\"= C_pi (fF)\"\n", + "C_u=C_uO;\n", + "print round(C_u*1e15,2),\"= C_u (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_pi+C_u));\n", + "print round(f_T/1e9,1),\"= f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L);\n", + "print round(f_t/1e6,1),\"= f_t (MHz)\"\n", + "print \"The data calculated for I_C=1mA\"\n", + "I_C=1*10.0**-3;\n", + "g_m=I_C/V_T;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_C;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=V_A/V_T;\n", + "print A_O,\"= A_O (V/V)\"\n", + "T_F=10*10**-12;\n", + "C_de=T_F*g_m;\n", + "print round(C_de*1e6,3),\"= C_de (fF)\"\n", + "C_je=2*C_jeO;\n", + "print round(C_je*1e15,3),\"= C_je (fF)\"\n", + "C_pi=C_de+C_je;\n", + "print round(C_pi*1e15,3),\"= C_pi (fF)\"\n", + "C_u=C_uO;\n", + "print round(C_u*1e15,2),\"= C_u (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_pi+C_u));\n", + "print round(f_T/1e9,1),\"= f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L);\n", + "print round(f_t/1e6,1),\"= f_t (MHz)\"\n", + "# For NMOS transistor\n", + "L=0.4*10**-6; # (m)\n", + "C_L=1*10.0**-12; # (F)\n", + "print \"The data calculated for I_D = 10uA\"\n", + "I_D=10*10.0**-6; # (A)\n", + "WbyL=0.12*I_D; # WbyL=(W/L)\n", + "print WbyL*10**6,\"= (W/L)\"\n", + "g_m=8*I_D;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=2/I_D;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=g_m*r_o;\n", + "print A_O,\"= A_O (V/V)\"\n", + "C_gs=(2/3.0)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;\n", + "print round(C_gs*1e6,2),\"= C_gs (fF)\"\n", + "C_gd=0.6*WbyL*0.4;\n", + "print round(C_gd*1e6,2),\"= C_gd (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_gs*10**-15+C_gd*10**-15));\n", + "print round(f_T/1e15,1),\"=f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L)\n", + "print round(f_t/1e6,1),\"=f_t (MHz)\"\n", + "print \"The data calculated for I_D = 100uA\"\n", + "I_D=100.0*10**-6; # (A)\n", + "WbyL=0.12*I_D; # WbyL=(W/L)\n", + "print WbyL*10**6,\"=(W/L)\"\n", + "g_m=8*I_D;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=2/I_D;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=g_m*r_o;\n", + "print A_O,\"=A_O (V/V)\"\n", + "C_gs=(2/3.0)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;\n", + "print round(C_gs*1e6,1),\"=C_gs (fF)\"\n", + "C_gd=0.6*WbyL*0.4;\n", + "print round(C_gd*1e6,1),\"=C_gd (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_gs*10**-15+C_gd*10**-15));\n", + "print round(f_T/1e15,1),\"=f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L)\n", + "print int(f_t/1e6),\"=f_t (MHz)\"\n", + "print \"The data calculated for I_D = 1mA\"\n", + "I_D=1*10**-3; # (A)\n", + "WbyL=0.12*I_D; # WbyL=(W/L)\n", + "print WbyL*10**6,\"=(W/L)\"\n", + "g_m=8*I_D;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=2/I_D;\n", + "print int(r_o/1000),\"=r_o (Kohm)\"\n", + "A_O=g_m*r_o;\n", + "print A_O,\"=A_O (V/V)\"\n", + "C_gs=(2/3.0)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;\n", + "print round(C_gs*1e6,1),\"=C_gs (fF)\"\n", + "C_gd=0.6*WbyL*0.4;\n", + "print round(C_gd*1e6,1),\"=C_gd (fF)\"\n", + "f_T=g_m/(2*math.pi*(C_gs*10**-15+C_gd*10**-15));\n", + "print round(f_T/1e15,1),\"=f_T (GHz)\"\n", + "f_t=g_m/(2*math.pi*C_L)\n", + "print int(f_t/1e6),\"=f_t (MHz)\"\n", + " # the answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For npn transistor\n", + "The data calculated for I_C=10uA\n", + "0.4 = g_m (mA/V)\n", + "3500 =r_o (Kohm)\n", + "1400.0 = A_O (V/V)\n", + "4.0 = C_de (fF)\n", + "10.0 = C_je (fF)\n", + "14.0 = C_pi (fF)\n", + "5.0 = C_u (fF)\n", + "3.4 = f_T (GHz)\n", + "63.7 = f_t (MHz)\n", + "The data calculated for I_C=100uA\n", + "4.0 = g_m (mA/V)\n", + "350 =r_o (Kohm)\n", + "1400.0 = A_O (V/V)\n", + "40.0 = C_de (fF)\n", + "10.0 = C_je (fF)\n", + "50.0 = C_pi (fF)\n", + "5.0 = C_u (fF)\n", + "11.6 = f_T (GHz)\n", + "636.6 = f_t (MHz)\n", + "The data calculated for I_C=1mA\n", + "40.0 = g_m (mA/V)\n", + "35 =r_o (Kohm)\n", + "1400.0 = A_O (V/V)\n", + "0.0 = C_de (fF)\n", + "10.0 = C_je (fF)\n", + "410.0 = C_pi (fF)\n", + "5.0 = C_u (fF)\n", + "15.3 = f_T (GHz)\n", + "6366.2 = f_t (MHz)\n", + "The data calculated for I_D = 10uA\n", + "1.2 = (W/L)\n", + "0.1 = g_m (mA/V)\n", + "200 =r_o (Kohm)\n", + "16.0 = A_O (V/V)\n", + "1.03 = C_gs (fF)\n", + "0.29 = C_gd (fF)\n", + "9.7 =f_T (GHz)\n", + "12.7 =f_t (MHz)\n", + "The data calculated for I_D = 100uA\n", + "12.0 =(W/L)\n", + "0.8 = g_m (mA/V)\n", + "20 =r_o (Kohm)\n", + "16.0 =A_O (V/V)\n", + "10.3 =C_gs (fF)\n", + "2.9 =C_gd (fF)\n", + "9.7 =f_T (GHz)\n", + "127 =f_t (MHz)\n", + "The data calculated for I_D = 1mA\n", + "120.0 =(W/L)\n", + "8.0 = g_m (mA/V)\n", + "2 =r_o (Kohm)\n", + "16.0 =A_O (V/V)\n", + "103.0 =C_gs (fF)\n", + "28.8 =C_gd (fF)\n", + "9.7 =f_T (GHz)\n", + "1273 =f_t (MHz)\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4:pg-565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.4 : Design of the circuit with output current =100uA\n", + "\n", + "V_DD=3; # (V)\n", + "I_REF=100*10**-6; # (A)\n", + "I_D1=100*10**-6; # (A)\n", + "L=1*10**-6; # (m)\n", + "W=10*10**-6; # (m)\n", + "V_t=0.7; # (V)\n", + "k_n=200*10**-6; # k_n=k'_n (A/V**2)\n", + "V_A=20; # V_A=V'_A (V)\n", + "V_OV=math.sqrt(I_D1*2*L/(k_n*W));\n", + "V_GS=V_t+V_OV;\n", + "R=(V_DD-V_GS)/I_REF;\n", + "V_Omin=V_OV;\n", + "print round(V_Omin,3),\"= V_min (V)\"\n", + "r_o2=V_A/I_REF;\n", + "print r_o2/1e6,\"= r_o2 (Mohm)\"\n", + "V_O=V_GS;\n", + "deltaV_O=1; # Change in V_O (V)\n", + "deltaI_O=deltaV_O/r_o2; # Corresponding change in I_O (A)\n", + "print (deltaI_O*1e6),\"= The correspondng change in I_O (mA)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.316 = V_min (V)\n", + "0.2 = r_o2 (Mohm)\n", + "5.0 = The correspondng change in I_O (mA)\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5:pg-574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.5 : Determine 3dB frequency \n", + "# High frequency response of an amplifier can be characterized by th transfer function\n", + "# F_H(s)=(1-s/10**5)/(1+s/10**4)(1+s/4*10**4)\n", + "w_H=1/math.sqrt(1/10.0**8+1/(16.0*10**8)-2/10.0**10); # w_H=1/math.sqrt(1/w_P1**2+1/w_P2**2-2/w_Z1**2-2w_Z2**2)\n", + "print int(w_H),\"= w_H (rad/s)\"\n", + " # the answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9794 = w_H (rad/s)\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6:pg-576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.6 : To determine midband gain and upper 3dB frequency\n", + "R_in=420*10**3; # (ohm)\n", + "R_sig=100*10**3; # (ohm)\n", + "g_m=4*10**-3; # (mho)\n", + "R_L=3.33*10**3; # R_L=R'_L (ohm)\n", + "C_gs=1*10**-12; # F\n", + "C_gd=C_gs; \n", + "A_M=-R_in*g_m*R_L/(R_in+R_sig)\n", + "print round(A_M,1),\"= Midband frequency gain A_M (V/V)\"\n", + "R_gs=R_in*R_sig/(R_in+R_sig);\n", + "R=R_gs; #R=R'\n", + "T_gs=C_gs*R_gs; # Oen circuit time constant of C_gs (s)\n", + "R_gd=R+R_L+g_m*R_L*R;\n", + "T_gd=R_gd*C_gd; # open circuit time constant of C_gd (s)\n", + "w_H=1/(T_gs+T_gd); # upper 3dB frequency w_H\n", + "f_H=w_H/(2*math.pi);\n", + "print round(f_H/1000,1),\"= Upper 3dB frequency f_H (KHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-10.8 = Midband frequency gain A_M (V/V)\n", + "128.3 = Upper 3dB frequency f_H (KHz)\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7:pg-580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.7 : Application of miller's theorem\n", + "\n", + "# 6.7a\n", + "# By miller's theorem\n", + "Z=1000.0*10**3; # (ohm)\n", + "K=-100.0; # (V/V)\n", + "R_sig=10.0*10**3; # (ohm)\n", + "Z_1=Z/(1-K);\n", + "print round(Z_1/1e3,2),\"= Z_1 (Kohm)\"\n", + "Z_2=Z/(1-(1/K));\n", + "print round(Z_2/1e6,2),\"= Z_2 (Mohm)\"\n", + "VobyVsig=-100*Z_1/(Z_1+R_sig); # VobyVsig=(V_o/V_sig)\n", + "print round(VobyVsig,1),\"= (V_o/V_sig) (V/V)\"\n", + "\n", + "#6.7b\n", + "# Applying miller's theorem\n", + "f_3dB=1/(2*math.pi*1.01*10**-6);\n", + "print round(f_3dB/1000,1),\"= f_3dB (KHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "9.9 = Z_1 (Kohm)\n", + "0.99 = Z_2 (Mohm)\n", + "-49.8 = (V_o/V_sig) (V/V)\n", + "157.6 = f_3dB (KHz)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.8:pg-586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.8 : Analysis of CMOS CS amplifier\n", + "k_n=200*10**-6; # (A/V**2)\n", + "W=4*10**-6; # (m)\n", + "L=0.4*10**-6; # (m)\n", + "I_REF=100*10**-6; # (A)\n", + "V_An=20; # (A)\n", + "I_D1=0.1*10**-3; # (A)\n", + "V_Ap=10; # (V)\n", + "V_DD=3; # (V)\n", + "I_D2=0.1*10**-3; # (A)\n", + "V_tp=0.6; # (V)\n", + "V_tn=0.6; # (V)\n", + "g_m1=math.sqrt(2*k_n*(W/L)*I_REF);\n", + "print round(g_m1*1e3,2),\"=g_m1 (mA/V)\"\n", + "r_o1=V_An/I_D1;\n", + "print r_o1/1000,\"= r_o1 (Kohm)\"\n", + "r_o2=V_Ap/I_D2;\n", + "print r_o2/1000,\"= r_o2 (Kohm)\"\n", + "A_v=-g_m1*r_o1*r_o2/(r_o1+r_o2);\n", + "print round(A_v),\"= A_v (v/V)\"\n", + "I_D=100*10**-6; # (A)\n", + "k_n=65*10**-6; # (A/V**2)\n", + "V_OV3=0.53; # (V)\n", + "V_SG=V_tp+V_OV3;\n", + "print V_SG,\"= V_SG (V)\"\n", + "V_OA=V_DD-V_OV3;\n", + "print V_OA,\"= V_OA (V)\"\n", + "V_IB=0.93; # (V)\n", + "V_IA=0.88; # (V)\n", + "print V_IA,\"---\",V_IB,\"= Coordinates of the extremities of the amplifier V_IB and V_IA\"\n", + "deltavI=V_IB-V_IA; # width of amplifier region\n", + "V_OB=0.33; # (V)\n", + "deltavO=V_OB-V_OA; # corresponding output range (V)\n", + "deltavObydeltavI=-deltavO/deltavI; # Large signal voltage gain (V/V)\n", + "print deltavObydeltavI,\"= Large signal voltage gain (V/V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.63 =g_m1 (mA/V)\n", + "200.0 = r_o1 (Kohm)\n", + "100.0 = r_o2 (Kohm)\n", + "-42.0 = A_v (v/V)\n", + "1.13 = V_SG (V)\n", + "2.47 = V_OA (V)\n", + "0.88 --- 0.93 = Coordinates of the extremities of the amplifier V_IB and V_IA\n", + "42.8 = Large signal voltage gain (V/V)\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.9:pg-593" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.9: Analysis of CMOS CS amplifier\n", + "# Consider CMOS open source amplifier\n", + "from sympy import roots\n", + "from sympy import *\n", + "I_D=100.0*10**-6; # (A)\n", + "I_REF=I_D; \n", + "uC_n=387.0*10**-6; # u_n*C_ox=uC_n (A/V**2)\n", + "uC_p=86*10.0**-6; # u_n*C_ox=uC_n (A/V**2)\n", + "W=7.2*10**-6; # (m)\n", + "L=0.36*10**-6; # (m)\n", + "V_An=5*10**-6; # (A)\n", + "R_sig=10*10**3; # (ohm)\n", + "V_OV=math.sqrt(2*I_D*L/(W*uC_n));\n", + "g_m=I_D/(V_OV/2);\n", + "print round(g_m*1e3),\"= g_m (mA/V)\"\n", + "r_o1=5*0.36/(0.1*10**-3);\n", + "print math.ceil(r_o1/1000),\"= r_o1 (ohm)\"\n", + "r_o2=6*0.36/(.1*10**-3);\n", + "print round(r_o2/1000,1),\"= r_o2 (Kohm)\"\n", + "R_L=r_o1*r_o2/(r_o1+r_o2);\n", + "print round(R_L/1000,2),\"= R_L (Kohm)\"\n", + "A_m=-g_m*R_L;\n", + "print round(A_m,1),\"= A_m (V/V)\"\n", + "C_gs=20.0*10**-15; # (F)\n", + "C_gd=5*10.0**-15; # (F)\n", + "C_in=C_gs+C_gd*(1+g_m*R_L); # using miller equivalence\n", + "print round(C_in*1e15,1),\"= C_in (fF)\"\n", + "f_H=1/(2*math.pi*C_in*R_sig);\n", + "print int(f_H/1e6),\"= f_H (MHz)\"\n", + "R_gs=10.0*10**3; # (ohm) using open circuit time constants methods\n", + "R_L=9.82*10**3; # (ohm)\n", + "R_gd=R_sig*(1+g_m*R_L) + R_L;\n", + "print round(R_gd/1000),\"= R_gd (Kohm)\"\n", + "R_CL=R_L;\n", + "T_gs=C_gs*R_gs;\n", + "print int(T_gs*1e12),\"= T_gs (ps)\"\n", + "T_gd=C_gd*R_gd;\n", + "print int(T_gd*1e12),\"= T_gd (ps)\"\n", + "C_L=25*10**-15;\n", + "T_CL=C_L*R_CL;\n", + "print math.ceil(T_CL*1e12),\"= T_CL (ps)\"\n", + "T_H=T_gs+T_gd+T_CL;\n", + "print int(T_H*1e12),\"= T_H (ps)\"\n", + "f_H=1/(2*math.pi*T_H); # 3dB frequency\n", + "print int(f_H/1e6),\"= f_H (MHz)\"\n", + "f_Z=g_m/(2*math.pi*C_gd); # frequency of the zero\n", + "print math.ceil(f_Z/1e9),\"= f_Z (MHz)\"\n", + "# Denominator polynomial\n", + "#p=poly([1 1.16*10**-9 0.0712*10**-18],'s','coeff')\n", + "x = symbols('x')\n", + "s=solve(1+(1.16*10**-9)*x+(0.0712*10**-18)*x**2,x)\n", + "#print p,\"Denominator polynomial\"\n", + "\n", + "f_P2=s[1]/(-2*math.pi);\n", + "f_P1=s[0]/(-2*math.pi)\n", + "print round(f_P2/1e6,1),\" and \",round(f_P1/1e9,1), \"The frequencies f_P1 (MHz) and f_P2 (GHz) are found as the roots of the denominator frequency\"\n", + "print round(f_P2/1e6,1),\" = better estimate for f_H (MHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1.0 = g_m (mA/V)\n", + "18.0 = r_o1 (ohm)\n", + "21.6 = r_o2 (Kohm)\n", + "9.82 = R_L (Kohm)\n", + "-12.2 = A_m (V/V)\n", + "86.1 = C_in (fF)\n", + "184 = f_H (MHz)\n", + "142.0 = R_gd (Kohm)\n", + "200 = T_gs (ps)\n", + "709 = T_gd (ps)\n", + "246.0 = T_CL (ps)\n", + "1155 = T_H (ps)\n", + "137 = f_H (MHz)\n", + "40.0 = f_Z (MHz)\n", + "145.4" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " and 2.4 The frequencies f_P1 (MHz) and f_P2 (GHz) are found as the roots of the denominator frequency\n", + "145.4 = better estimate for f_H (MHz)\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10:pg-599" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.10 : To determine A_M, f_t, f_Z, f_3dB\n", + "# Consider the CS amplifier\n", + "A_M=-12.3;# (V/V) found from Example 6.9\n", + "C_L=25.0*10**-15; # (F)\n", + "C_gd=5*10.0**-15; # (F)\n", + "R_L=9.82*10**3; # (F)\n", + "g_m=1.25*10**-3; # (mho)\n", + "f_H=1/(2*math.pi*(C_L+C_gd)*R_L); # 3dB frequency\n", + "print round(f_H/1e6),\"= f_H (MHz)\"\n", + "f_t=-A_M*f_H; # Unity-gain frequency - sign to make gain positive as only magnitude is considered\n", + "print round(f_t/1e9,1),\"= f_t (GHz)\"\n", + "f_Z=g_m/(2*math.pi*C_gd); # frequency of the zero\n", + "print round(f_Z/1e9),\"= f_Z (GHz)\"\n", + "I_D=400*10**-6; # I_D must be quadrupled by changing I_REF to 400uF\n", + "V_OV=0.32; \n", + "g_m=I_D/(V_OV/2);\n", + "print round(g_m*1e3,2),\"= g_m (mA/V)\"\n", + "r_o1=5*0.36/(0.4*10**-3);\n", + "print r_o1/1000,\"= r_o1 (Kohm)\"\n", + "r_o2=6*0.36/(0.4*10**-3);\n", + "print r_o2/1000,\"= r_o2 (Kohm)\"\n", + "R_L=(r_o1*r_o2)/(r_o1+r_o2);\n", + "print round(R_L/1000,1),\"= R_L (Kohm)\"\n", + "A_M=-g_m*R_L;\n", + "print round(A_M,2),\"= A_M (V/V)\"\n", + "f_H=1/(2*math.pi*(C_L+C_gd)*R_L);\n", + "print round(f_H/1e9,2),\"= f_H (GHz)\"\n", + "f_t=f_H*-A_M; # Unity gain frequency\n", + "print round(f_t/1e9,1),\"= f_t (GHz)\"\n", + " # the answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "540.0 = f_H (MHz)\n", + "6.6 = f_t (GHz)\n", + "40.0 = f_Z (GHz)\n", + "2.5 = g_m (mA/V)\n", + "4.5 = r_o1 (Kohm)\n", + "5.4 = r_o2 (Kohm)\n", + "2.5 = R_L (Kohm)\n", + "-6.14 = A_M (V/V)\n", + "2.16 = f_H (GHz)\n", + "13.3 = f_t (GHz)\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.11:pg-609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.11 : Avo Rin Rout Gi Gis Gv fH\n", + "# Consider the common gate amplifier\n", + "g_m=1.25*10**-3; # (A/V)\n", + "r_o=18000; # (ohm)\n", + "I_D=100*10**-6; # (A)\n", + "X=0.2;\n", + "R_S=10*10**3; # (ohm)\n", + "R_L=100*10**3; # (ohm)\n", + "C_gs=20*10**-15;# (F)\n", + "C_gd=5*10**-15;# (F)\n", + "C_L=0; # (F)\n", + "gmplusgmb=g_m+0.2*g_m; # gmplusgmb=g_m+g_mb\n", + "A_vo=1+(gmplusgmb)*r_o;\n", + "print A_vo,\"= A_vo (V/V)\"\n", + "R_in=(r_o+R_L)/A_vo;\n", + "print round(R_in/1000,1),\"= R_in (Kohm)\"\n", + "R_out=r_o+A_vo*R_S;\n", + "print int(R_out/1000),\"= Kohm\"\n", + "G_v=A_vo*R_L/(R_L+R_out);\n", + "print round(G_v),\"= G_v (V/V)\"\n", + "G_is=A_vo*R_S/R_out;\n", + "print round(G_is,2),\"= G_is (A/A)\"\n", + "G_i=G_is*R_out/(R_out+R_L)\n", + "print round(G_i,1),\"= G_i (A/A)\"\n", + "R_gs=R_S*R_in/(R_S+R_in);\n", + "R_gd=R_L*R_out/(R_L+R_out);\n", + "T_H=C_gs*R_gs+C_gd*R_gd;\n", + "f_H=1/(2*math.pi*T_H);\n", + "print int(f_H/1e6),\"= f_H (MHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "28.0 = A_vo (V/V)\n", + "4.2 = R_in (Kohm)\n", + "298 = Kohm\n", + "7.0 = G_v (V/V)\n", + "0.94 = G_is (A/A)\n", + "0.7 = G_i (A/A)\n", + "366 = f_H (MHz)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.12:pg-620" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.12 : Comparison between Cascode amplifier and CS amplifier\n", + "# 6.12a \n", + "# CS amplifier\n", + "g_m=1.25*10**-3;\n", + "r_o=20*10**3;\n", + "R_L=r_o*r_o/(r_o+r_o);\n", + "C_gs=20*10**-15;\n", + "R_sig=10000;\n", + "C_gd=5*10**-15;\n", + "C_L=5*10**-15;\n", + "C_db=5*10**-15;\n", + "A_o=g_m*r_o;\n", + "print A_o,\"= A_o (V/V)\"\n", + "A_v=-A_o/2;\n", + "print A_v,\"= A_v (V/V)\"\n", + "T_H=C_gs*R_sig+C_gd*((1+g_m*R_L)*R_sig+R_L)+(C_L+C_db)*R_L;\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "f_H=1/(2*math.pi*T_H);\n", + "print round(f_H/1e6,1),\"= f_H (MHz)\"\n", + "f_t=-A_v*f_H;\n", + "print round(f_t/1e9,2),\"= f_t (GHz)\"\n", + "# Cascode amplifier\n", + "g_m1=1.25*10**-3;\n", + "r_o1=20000;\n", + "X=0.2;\n", + "r_o2=20000;\n", + "R_L=20000;\n", + "A_o1=g_m1*r_o1;\n", + "print A_o1,\"= A_o1 (V/V)\"\n", + "gm2plusgmb2=g_m1+X*g_m;\n", + "A_vo2=1+(gm2plusgmb2)*r_o2;\n", + "print A_vo2,\"= A_vo2 (V/V)\"\n", + "R_out1=r_o1;\n", + "R_in2=1/(gm2plusgmb2)+R_L/A_vo2;\n", + "print round(R_in2/1000.0,1),\"= R_in2 (kohm)\"\n", + "R_d1=R_out1*R_in2/(R_out1+R_in2);\n", + "print round(R_d1/1000.0,1),\"= R_d1 (Kohm)\"\n", + "R_out=r_o2+A_vo2*r_o1;\n", + "print round(R_out/1000.0,1),\"= R_out (Kohm)\"\n", + "vo1byvi=-g_m1*R_d1;\n", + "print round(vo1byvi,1),\"= (v_o1/v_i) (V/V)\"\n", + "A_v=-A_o1*A_vo2*R_L/(R_L+R_out);\n", + "print round(A_v,1),\"= A_v (V/V)\"\n", + "C_gs1=20*10**-15;\n", + "R_sig=10*10**3;\n", + "gm1Rd1=1.5;\n", + "C_gd1=5*10**-15;\n", + "C_gs2=20*10**-15;\n", + "C_db2=5*10**-15;\n", + "C_gd2=5*10**-15;\n", + "C_db1=5*10**-15;\n", + "T_H=R_sig*(C_gs1+C_gd1*(1+gm1Rd1))+R_d1*(C_gd1+C_db1+C_gs2)+((R_L*R_out)/(R_L+R_out))*(C_L+C_db2+C_gd2);\n", + "f_H=1/(2*math.pi*T_H);\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "f_t=-A_v*f_H;\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "# 6.12b \n", + "# CS amplifier\n", + "A_v=-12.5;\n", + "R_L=10*10**3;\n", + "print A_v,\"= A_v (V/V)\"\n", + "T_H=(C_gd+C_L+C_db)*R_L;\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "f_H=1/(2*math.pi*T_H);\n", + "print round(f_H/1e9,2),\"= f_H (GHz)\"\n", + "f_t=-A_v*f_H;\n", + "print round(f_t/1e9,1),\"= f_t (GHz)\"\n", + "# Cascode amplifier\n", + "R_L=640*10**3;\n", + "R_out=640*10**3;\n", + "R_out1=20*10**3;\n", + "A_v=-A_o1*A_vo2*R_L/(R_L+R_out);\n", + "print A_v,\"= A_v (V/V)\"\n", + "R_in2=1/gm2plusgmb2+R_L/A_vo2;\n", + "print round(R_in2/1000.0,1),\"= R_in2 (Kohm)\"\n", + "R_d1=R_in2*R_out1/(R_in2+R_out1);\n", + "print round(R_d1/1000.0,1),\"= R_d1 (Kohm)\"\n", + "T_H=R_d1*(C_gd1+C_db1+C_gs2)+(R_L*R_out/(R_L+R_out))*(C_L+C_gd2+C_db2);\n", + "print round(T_H*1e12),\"= T_H (ps)\"\n", + "f_H=1/(2*math.pi*T_H);\n", + "print round(f_H/1e6,1),\"= f_H (MHz)\"\n", + "f_t=-A_v*f_H;\n", + "print round(f_t/1e9,1),\"= f_t (GHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "25.0 = A_o (V/V)\n", + "-12.5 = A_v (V/V)\n", + "1025.0 = T_H (ps)\n", + "155.3 = f_H (MHz)\n", + "1.94 = f_t (GHz)\n", + "25.0 = A_o1 (V/V)\n", + "31.0 = A_vo2 (V/V)\n", + "1.3 = R_in2 (kohm)\n", + "1.2 = R_d1 (Kohm)\n", + "640.0 = R_out (Kohm)\n", + "-1.5 = (v_o1/v_i) (V/V)\n", + "-23.5 = A_v (V/V)\n", + "653.0 = T_H (ps)\n", + "653.0 = T_H (ps)\n", + "653.0 = T_H (ps)\n", + "-12.5 = A_v (V/V)\n", + "150.0 = T_H (ps)\n", + "1.06 = f_H (GHz)\n", + "13.3 = f_t (GHz)\n", + "-387.5 = A_v (V/V)\n", + "21.3 = R_in2 (Kohm)\n", + "10.3 = R_d1 (Kohm)\n", + "5110.0 = T_H (ps)\n", + "31.1 = f_H (MHz)\n", + "12.1 = f_t (GHz)\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.13:pg-642" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.13: Analysis of CC-CE amplifier\n", + "# Consider a CC-CE amplifier\n", + "# at an emitter bias current of 1mA for Q_1 and Q_2\n", + "g_m=40.0*10**-3; # (A/V)\n", + "r_e=25.0; # (ohm)\n", + "B=100.0; # beta value\n", + "C_u=2*10.0**-12; # (F)\n", + "f_T=400*10.0**6 # (Hz)\n", + "r_pi= B/g_m; \n", + "print round(r_pi/1000,1),\"= r_pi (Kohm)\"\n", + "C_pi=g_m/(2*math.pi*f_T)-C_u;\n", + "print round(C_pi*1e12,1),\"= C_pi (pF)\"\n", + "R_in2=2500.0; # (ohm)\n", + "r_pi2=2500.0 # (ohm)\n", + "r_pi1=2500.0; # (ohm)\n", + "r_e1=0.025; # (ohm)\n", + "B_1=100.0; # beta value\n", + "R_in=(B_1+1)*(r_e1+R_in2);\n", + "print round(R_in/1000),\"= R_in (Kohm)\"\n", + "R_sig=4*10.0**3; # (ohm)\n", + "R_L=4000.0; # (ohm)\n", + "Vb1byVsig=R_in/(R_in+R_sig); # (V_b1/V_sig)\n", + "print round(Vb1byVsig,2),\"= (V_b1/V_sig) (V/V)\"\n", + "Vb2plusVb1=R_in2/(R_in2+r_e1); # (V_b2/V_b1)\n", + "print round(Vb2plusVb1,3),\"= (V_b2/V_b1) (V/V)\"\n", + "VobyVb2=-g_m*R_L; # (V_o/V_b2)\n", + "print round(VobyVb2,2),\"= (V_o/V_b2) (V/V)\"\n", + "A_M=VobyVb2*Vb2plusVb1*Vb2plusVb1;\n", + "print int(A_M),\"= A_M (V/V)\"\n", + "R_u1=R_sig*R_in/(R_sig+R_in);\n", + "print round(R_u1/1000,1),\"= R_u1 (Kohm)\"\n", + "R_pi1=(R_sig+R_in2)/(1+(R_sig/r_pi1)+(R_in2/r_e1)); # C_pi1 sees a resistance R_pi1\n", + "print round(R_pi1*1000,2),\"= R_pi1 (ohm)\"\n", + "R_out1=25+4000/101;\n", + "R_pi2=R_in2*R_out1/(R_in2+R_out1); # C_pi2 sees a resistance R_pi2\n", + "print round(R_pi2,1),\"= R_pi2 (ohm)\"\n", + "R_u2=(1+g_m*R_L)*R_pi2+R_L;\n", + "print round(R_u2/1000,2),\"= R_u2 (Kohm)\"\n", + "C_u1=2*10**-12; # (F)\n", + "R_u1=3940; # (ohm)\n", + "C_pi1=13.9*10**-12; # (F)\n", + "C_u2=2*10**-12; # (F)\n", + "C_pi2=13.9*10**-12; # (F)\n", + "T_H=C_u1*R_u1+C_pi1*R_pi1+C_u2*R_u2+C_pi2*R_pi2;\n", + "print round(T_H*1e9),\"= T_H (ns)\"\n", + "f_H=1/(2*math.pi*T_H);\n", + "print round(f_H/1e6,1),\"= f_H (MHz)\"\n", + "A_M=r_pi*(-g_m*R_L)/(r_pi+R_sig);\n", + "print round(A_M,2),\"= A_M (V/V)\"\n", + "R_pi=r_pi*R_sig/(r_pi+R_sig); \n", + "print round(R_pi/1000,2),\"= R_pi (Kohm)\"\n", + "R_u=(1+g_m*R_L)*R_pi +R_L;\n", + "print round(R_u/1000,1),\"= R_u (Kohm)\"\n", + "T_H=C_pi*R_pi+C_u*R_u;\n", + "print round(T_H*1e9,1),\"= T_H (ns)\"\n", + "f_H=1/(2*math.pi*T_H);\n", + "print int(f_H/1e3),\"= f_H (KHz)\"\n", + " # the answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2.5 = r_pi (Kohm)\n", + "13.9 = C_pi (pF)\n", + "253.0 = R_in (Kohm)\n", + "0.98 = (V_b1/V_sig) (V/V)\n", + "1.0 = (V_b2/V_b1) (V/V)\n", + "-160.0 = (V_o/V_b2) (V/V)\n", + "-159 = A_M (V/V)\n", + "3.9 = R_u1 (Kohm)\n", + "65.0 = R_pi1 (ohm)\n", + "62.4 = R_pi2 (ohm)\n", + "14.05 = R_u2 (Kohm)\n", + "37.0 = T_H (ns)\n", + "4.3 = f_H (MHz)\n", + "-61.54 = A_M (V/V)\n", + "1.54 = R_pi (Kohm)\n", + "251.7 = R_u (Kohm)\n", + "524.8 = T_H (ns)\n", + "303 = f_H (KHz)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.14:pg-654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 6.14 : To determine required resistor values\n", + "# The circuits generate a constant current I_D=10uA which operate at a supply of 10V\n", + "V_BE=0.7; # (V)\n", + "V_t=0.025; # (V)\n", + "I_REF=10.0*10**-6; # (A)\n", + "V_DD=10.0; # (V)\n", + "I=1*10.0**-3; # (A)\n", + "V_BE1=V_BE+V_t*math.log(I_REF/I); # Voltage drop across Q_1\n", + "print round(V_BE1,2),\"= V_BE1 (V)\"\n", + "R_1=(V_DD-V_BE1)/(I_REF); # For the Widlar circuit we decide I_REF=1mA and V_BE1=0.7V\n", + "print round(R_1/1000,1),\"= R_1 (kohm)\"\n", + "R_2=(V_DD-V_BE)/I;\n", + "print R_2/1000,\"= R_2 (kohm)\"\n", + "R_3=(V_t/I_REF)*math.log(I/I_REF);\n", + "print round(R_3/1000,1),\"= R_3 (kohm)\"\n", + " # the answer in the textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.58 = V_BE1 (V)\n", + "941.5 = R_1 (kohm)\n", + "9.3 = R_2 (kohm)\n", + "11.5 = R_3 (kohm)\n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter7.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter7.ipynb new file mode 100755 index 00000000..f8cf792d --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter7.ipynb @@ -0,0 +1,474 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:aa3033a597a0bf06128c3fae6fc134561fe0b608c1a6f342b1690de7caed5ad0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter07:Differential and Multistage amlplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1:pg-690" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 7.1 Analysis of differential amplifier\n", + "# Consider the differential amplifier\n", + "\n", + "B=100.0; # beta value\n", + "\n", + "# 7.1a\n", + "V_T=0.025; # (V)\n", + "I_E=0.0005; # (A)\n", + "R_E=150.0; # (ohm)\n", + "r_e1=V_T/I_E; # emitter resistance (ohm)\n", + "r_e2=r_e1; # emitterA resistance (ohm)\n", + "r_e=r_e1;\n", + "R_id=2*(B+1)*(r_e+R_E);\n", + "print round(R_id/1000.0),\"The input differential resistance R_id (kohm)\"\n", + "\n", + "# 7.1b\n", + "R_id=40000.0; # (ohm)\n", + "R_sig=5000.0; # (ohm)\n", + "R_C=10000.0; # (ohm)\n", + "R_E=150.0; # (ohm)\n", + "A_v=R_id/(R_id+R_sig); # A_v= v_o/v_sig (V/V)\n", + "A_V=2*R_C/(2.0*(r_e+R_E)); # A_V= v_o/v_id (V/v)\n", + "A_d=A_v*A_V; # A_d=v_o/v_sig (V/V)\n", + "print \"Overall differential voltage gain (V/V)\",round(A_d,-1)\n", + "\n", + "# 7.1c\n", + "R_EE=200000.0; # (ohm)\n", + "deltaR_C=0.02*R_C; # in the worst case\n", + "A_cm=R_C*deltaR_C/(2.0*R_EE*R_C)\n", + "print A_cm,\"Worst case common mode gain (V/V)\"\n", + "\n", + "# 7.1d\n", + "CMRR=20*math.log10(A_d/A_cm)\n", + "print int(CMRR),\"CMRR in dB\"\n", + "\n", + "# 7.1e\n", + "r_o=200000.0; #(ohm)\n", + "R_icm=(B+1)*(R_EE*r_o/2.0)/(R_EE+r_o/2.0);\n", + "print round(R_icm/1e6,1),\"Input common mode resistance (kohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "40.0 The input differential resistance R_id (kohm)\n", + "Overall differential voltage gain (V/V) 40.0\n", + "0.0005 Worst case common mode gain (V/V)\n", + "98 CMRR in dB\n", + "6.7 Input common mode resistance (kohm)\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.2:pg-747" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 7.2 : Analysis of Active loaded MOS differential amplifier\n", + "W=7.2*10**-6; # (m)\n", + "L=0.36*10**-6; # (m)\n", + "C_gs=29*10**-15; # (F)\n", + "C_gd=5*10**-15; # (F)\n", + "C_db=5*10**-15; # (F)\n", + "uC_n=387*10**-6; # uC_n=u_nC_ox (A/V**2)\n", + "uC_p=86*10**-6; # uC_p=u_pC_ox (A/V**2)\n", + "V_an=5; # V_an=V'_An (V/um) (V)\n", + "V_ap=6; # V_ap=V'_Ap (V/um) (V)\n", + "I=0.2*10**-3; # (A)\n", + "R_SS=25000; # (ohm)\n", + "C_SS=0.2*10**-12; # (F)\n", + "C_S=25*10**-15; # (F)\n", + "K_n=uC_n*W/L;\n", + "I_D=100*10**-6; # bias current (A)\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "g_m=I/V_OV;\n", + "g_m1=g_m;\n", + "g_m2=g_m;\n", + "r_o1=V_an*0.36/(0.1*10**-3);\n", + "r_o2=r_o1;\n", + "K_p=uC_p*W/L;\n", + "V_OV34=math.sqrt(2*I_D/K_p); # V_OV3,4\n", + "g_m3=2*0.1*10**-3/V_OV34;\n", + "g_m4=g_m3;\n", + "r_o3=V_ap*0.36/(0.1*10**-3);\n", + "r_o4=r_o3;\n", + "A_d=g_m*(r_o2*r_o4)/(r_o2+r_o4);\n", + "print round(A_d,1),\"A_d (V/V)\"\n", + "A_cm=-1/(2*g_m3*R_SS);\n", + "print round(A_cm,3),\"A_cm (V/V)\"\n", + "CMRR=20*log10(-A_d/A_cm); # negative sign to make A_cm positive\n", + "print round(CMRR,1),\"CMRR in dB\"\n", + "C_gd1=5*10**-15; # (F)\n", + "C_db1=5*10**-15; # (F)\n", + "C_db3=5*10**-15; # (F)\n", + "C_gs3=20*10**-15; # (F)\n", + "C_gs4=20*10**-15; # (F)\n", + "C_m=C_gd1+C_db1+C_db3+C_gs3+C_gs4;\n", + "C_gd2=5*10**-15; # (F)\n", + "C_db2=5*10**-15; # (F)\n", + "C_gd4=5*10**-15; # (F)\n", + "C_db4=5*10**-15; # (F)\n", + "C_x=25*10**-15; # (F)\n", + "C_L=C_gd2+C_db2+C_gd4+C_db4+C_x;\n", + "print \"poles and zeroes of A_d\"\n", + "R_o=r_o2*r_o4/(r_o2+r_o4)\n", + "f_p1=1/(2*math.pi*C_L*R_o);\n", + "print int(f_p1/1e6),\"f_p1 (MHz)\"\n", + "f_p2=g_m3/(2*math.pi*C_m);\n", + "print round(f_p2/1e9,2),\"f_p2 (GHz)\"\n", + "f_Z=2*f_p2;\n", + "print round(f_Z/1e9,1),\"f_Z (GHz)\"\n", + "print \"Dominant pole of CMRR is at location of commom-mode gain zero\"\n", + "f_Z=1/(2*math.pi*C_SS*R_SS);\n", + "print round(f_Z/1e6,1),\"f_Z (MHz)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "12.2 A_d (V/V)\n", + "-0.034 A_cm (V/V)\n", + "51.1 CMRR in dB\n", + "poles and zeroes of A_d\n", + "360 f_p1 (MHz)\n", + "1.7 f_p2 (GHz)\n", + "3.4 f_Z (GHz)\n", + "Dominant pole of CMRR is at location of commom-mode gain zero\n", + "31.8 f_Z (MHz)\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3:pg-751" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 7.3 : To determine all parameters for different transistor\n", + "I_REF=90*10.0**-6; # (A)\n", + "V_tn=0.7; # (V)\n", + "V_tp=0.8; # Magnitude is cconsidered\n", + "uC_n=160.0*10**-6; # uC_n=u_n*C_ox\n", + "uC_p=40*10.0**-6; # uC_p=u_p*C_ox\n", + "V_A=10.0; # (V)\n", + "V_DD=2.5; # (V)\n", + "V_SS=2.5; # (V)\n", + "L=0.8*10**-6; # (m)\n", + "r_o2=222.0; # (ohm)\n", + "r_o4=222.0; # (ohm)\n", + "g_m1=0.3; # (mho)\n", + "A_1=-g_m1*r_o2*r_o4/(r_o2+r_o4);\n", + "print round(A_1,2),\"=A_1 (V/V)\"\n", + "r_o6=111.0; # (ohm)\n", + "r_o7=111.0; # (ohm)\n", + "g_m6=0.6; # (mho)\n", + "A_2=-g_m6*r_o6*r_o7/(r_o6+r_o7);\n", + "print round(A_2,2),\"=A_2 (V/V)\"\n", + "print \"For Q_1\"\n", + "W=20*10.0**-6; # (m)\n", + "I_D=I_REF/2.0; # (A)\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_p=uC_p*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_p);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tp+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_2\"\n", + "W=20*10.0**-6; # (m)\n", + "I_D=I_REF/2; # (A)\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_p=uC_p*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_p);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tp+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_3\"\n", + "W=5*10**-6; # (m)\n", + "I_D=I_REF/2; # (A)\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_n=uC_n*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tn+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_4\"\n", + "W=5*10**-6; # (m)\n", + "I_D=I_REF/2; # (A)\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_n=uC_n*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tn+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_5\"\n", + "W=40*10.0**-6; # (m)\n", + "I_D=I_REF; # (A)\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_p=uC_p*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_p);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tp+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_6\"\n", + "W=10*10**-6; # (m)\n", + "I_D=I_REF; #A\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_n=uC_n*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_n);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tn+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_7\"\n", + "W=40*10**-6; # (m)\n", + "I_D=I_REF;#A\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_p=uC_p*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_p);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tp+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print round(r_o/1e3),\"=r_o (kohm)\"\n", + "print \"For Q_8\"\n", + "W=40*10**-6; # (m)\n", + "I_D=I_REF; # A\n", + "print round(I_D/(10.0**-6),2),\"=I_D (microA)\"\n", + "K_p=uC_p*W/L;\n", + "V_OV=math.sqrt(2*I_D/K_p);\n", + "print round(V_OV,2),\"=V_OV (V)\"\n", + "V_GS=V_tp+V_OV;\n", + "print round(V_GS,2),\"=V_GS (V)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m/(10.0**-3),2),\"=g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1e3),\"=r_o (kohm)\"\n", + "A_O=A_1*A_2;\n", + "print round(20*log10(A_O)),\"=The dc open loop gain in dB\"\n", + "v_ICMmin=-2.5+1;\n", + "print round(v_ICMmin,2),\"=Lower limit of input common-mode (V)\"\n", + "v_ICMmax=2.2-1.1;\n", + "print round(v_ICMmax,2),\"=Upper limit of input common-mode (V)\"\n", + "v_Omax=V_DD-V_OV;\n", + "print round(v_Omax,2),\"=Highest allowable output voltage (V)\"\n", + "v_Omin=-V_SS+V_OV;\n", + "print round(v_Omin,2),\"=Lowest allowable output voltage (V)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-33.3 =A_1 (V/V)\n", + "-33.3 =A_2 (V/V)\n", + "For Q_1\n", + "45.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.1 =V_GS (V)\n", + "0.3 =g_m (mA/V)\n", + "222 =r_o (kohm)\n", + "For Q_2\n", + "45.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.1 =V_GS (V)\n", + "0.3 =g_m (mA/V)\n", + "222.0 =r_o (kohm)\n", + "For Q_3\n", + "45.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.0 =V_GS (V)\n", + "0.3 =g_m (mA/V)\n", + "222.0 =r_o (kohm)\n", + "For Q_4\n", + "45.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.0 =V_GS (V)\n", + "0.3 =g_m (mA/V)\n", + "222.0 =r_o (kohm)\n", + "For Q_5\n", + "90.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.1 =V_GS (V)\n", + "0.6 =g_m (mA/V)\n", + "111.0 =r_o (kohm)\n", + "For Q_6\n", + "90.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.0 =V_GS (V)\n", + "0.6 =g_m (mA/V)\n", + "111.0 =r_o (kohm)\n", + "For Q_7\n", + "90.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.1 =V_GS (V)\n", + "0.6 =g_m (mA/V)\n", + "111.0 =r_o (kohm)\n", + "For Q_8\n", + "90.0 =I_D (microA)\n", + "0.3 =V_OV (V)\n", + "1.1 =V_GS (V)\n", + "0.6 =g_m (mA/V)\n", + "111 =r_o (kohm)\n", + "61.0 =The dc open loop gain in dB\n", + "-1.5 =Lower limit of input common-mode (V)\n", + "1.1 =Upper limit of input common-mode (V)\n", + "2.2 =Highest allowable output voltage (V)\n", + "-2.2 =Lowest allowable output voltage (V)\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.5:pg-760" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 7.5 : Analysis of given circuit\n", + "B=100.0; # beta value\n", + "I_E=0.2510**-3; # (A)\n", + "R_1=20000.0; # (ohm)\n", + "R_2=20000; # (ohm)\n", + "R_3=3000; # (ohm)\n", + "R_4=2300; # (ohm)\n", + "R_5=15700; # (ohm)\n", + "R_6=3000; # (ohm)\n", + "r_e1=25/0.25; # (ohm)\n", + "r_e2=r_e1; # (ohm)\n", + "r_pi1=(B+1)*r_e1;\n", + "r_pi2=(B+1)*r_e2;\n", + "R_id=r_pi1+r_pi2;\n", + "print round(R_id/1e3,2),\"Input differential resistance (kohm)\"\n", + "I_E=1*10.0**-3;\n", + "r_e4=25/1.0;\n", + "r_e5=r_e4;\n", + "r_pi4=(B+1)*r_e4;\n", + "r_pi5=(B+1)*r_e5;\n", + "R_i2=r_pi4+r_pi5;\n", + "print round(R_i2/1e3,2),\"Input resistance of the second stage R_i2 (kohm)\"\n", + "A_1=(R_i2*(R_1+R_2)/((R_i2+R_1+R_2)*(r_e1+r_e2)))\n", + "print round(A_1,1),\"Voltage gain of the first stage (V/V)\"\n", + "r_e7=25/1.0;\n", + "R_i3=(B+1)*(R_4+r_e7);\n", + "print round(R_i3/1e3,1),\"Input resistance of the third stage R_i3 (kohm)\"\n", + "A_2=(-R_3*R_i3)/((R_3+R_i3)*(r_e4+r_e5));\n", + "print round(A_2,1),\"Voltage gain of the second stage (V/V)\"\n", + "r_e8=25/5.0;\n", + "R_i4=(B+1)*(r_e8+R_6);\n", + "print round(R_i4/1e3,2),\"Input resistance of the third stage R_i2 (kohm)\"\n", + "A_3=(-R_5*R_i4)/((R_5+R_i4)*(r_e7+R_4));\n", + "print round(A_3,2),\"Voltage gain of the third stage (V/V)\"\n", + "A_4=R_6/(R_6+r_e8);\n", + "print round(A_4,2),\"Voltage gain of the fourth stage (V/V)\"\n", + "A=A_1*A_2*A_3*A_4 ; # A=v_o/v_id (V/V)\n", + "print round(A),\"Overall output gain (V/V)\"\n", + "print round(20*log10(A),1),\"Overall output gain in dB\"\n", + "R_o=R_6*(r_e8+R_5/(B+1))/(R_6+r_e8+R_5/(B+1))\n", + "print round(R_o),\"Output resistance (ohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "20.2 Input differential resistance (kohm)\n", + "5.05 Input resistance of the second stage R_i2 (kohm)\n", + "22.4 Voltage gain of the first stage (V/V)\n", + "234.8 Input resistance of the third stage R_i3 (kohm)\n", + "-59.2 Voltage gain of the second stage (V/V)\n", + "303.5 Input resistance of the third stage R_i2 (kohm)\n", + "-6.42 Voltage gain of the third stage (V/V)\n", + "1.0 Voltage gain of the fourth stage (V/V)\n", + "8514.0 Overall output gain (V/V)\n", + "78.6 Overall output gain in dB\n", + "152.0 Output resistance (ohm)\n" + ] + } + ], + "prompt_number": 56 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter8.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter8.ipynb new file mode 100755 index 00000000..be4f9dc6 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter8.ipynb @@ -0,0 +1,260 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:083d39cbb0b520b2793c0213a9dd654eda9ff785157da84f0bec629956fa17a6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter08: Feedback" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1:pg-808" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 8.1: Analysis of op amp connected in an inverting configuration\n", + "# By inspection we can write down the expressions for A, B , closed loop gain , the input resistance and the output resistance\n", + "u=10**4; # (ohm)\n", + "R_id=100.0*10**3; # (ohm)\n", + "r_o=1000.0; # (ohm)\n", + "R_L=2000.0; # (ohm)\n", + "R_1=1000.0; # (ohm)\n", + "R_2=10.0**6; # (ohm)\n", + "R_S=10000.0; # (ohm)\n", + "A=u*(R_L*(R_1+R_2)/(R_L+R_1+R_2))*R_id/(((R_L*(R_1+R_2))/(R_L+R_1+R_2)+r_o)*(R_id+R_S+(R_1*R_2)/(R_1+R_2)))\n", + "print int(A),\"= Voltage gain without feedback (V/V)\"\n", + "B=R_1/(R_1+R_2); # Beta value\n", + "print round(B,5), \"= Beta value \"\n", + "A_f=A/(1.0+A*B);\n", + "print int(A_f),\"= Voltage gain with feedback (V/V)\"\n", + "R_i=R_S+R_id+(R_1*R_2/(R_1+R_2))# Input resistance of the A circuit in fig 8.12a of textbook\n", + "R_if=R_i*7;\n", + "R_in=R_if-R_S;\n", + "print round(R_in/1000.0,1),\"= Input resistance (Kohm)\"\n", + "R_o=1.0/(1/r_o+1/R_L+1/(R_1+R_2));\n", + "R_of=R_o/(1.0+A*B); \n", + "R_out=R_of*R_L/(R_L-R_of);\n", + "print round(R_out),\"= the output resistance (ohm)\"\n", + "# the answer for input resistance is incorrect in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "6002 = Voltage gain without feedback (V/V)\n", + "0.001 = Beta value \n", + "857 = Voltage gain with feedback (V/V)\n", + "767.0 = Input resistance (Kohm)\n", + "100.0 = the output resistance (ohm)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2:pg-815" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 8.2: Feedback triple\n", + "# Consider the given three stage series-series feedback\n", + "h_fe=100.0;\n", + "g_m2=40.0*10**-3; # (A/V)\n", + "r_e1=41.7; # (ohm)\n", + "a_1=0.99; # alpha value\n", + "R_C1=9000.0; # (ohm)\n", + "R_E1=100.0; #(ohm)\n", + "R_F=640.0; # (ohm)\n", + "R_E2=100.0; #(ohm)\n", + "r_pi2=h_fe/g_m2;\n", + "R_C2=5000.0; # (ohm)\n", + "r_e3=6.25; # (ohm)\n", + "R_C3=800.0; #(ohm)\n", + "# First stage gain A_1=V_c1/V_i\n", + "A_1=-a_1*R_C1*r_pi2/((R_C1+r_pi2)*(r_e1+((R_E1*(R_F+R_E2))/(R_E1+R_F+R_E2)))) \n", + "print round(A_1,2),\"=The voltage gain of the first stage (V/V)\"\n", + "# Gain of the second stage A_2=Vc2/V_c1\n", + "A_2=-g_m2*((R_C2*(h_fe+1)/(R_C2+h_fe+1))*(r_e3+(R_E2*(R_F+R_E1))/(R_E2+R_F+R_E1)))\n", + "print round(A_2,1),\"=The second stage gain (V/V)\"\n", + "# Third stage gain A_3 I_O/V_i\n", + "A_3=1/(r_e3+(R_E2*(R_F+R_E1)/(R_E2+R_F+R_E1)));\n", + "print round(A_3*1000,1),\"=The third stage gain (mA/V)\"\n", + "A=A_1*A_2*A_3; # combined gain\n", + "print A,\"=Combined gain (V/V)\"\n", + "B=R_E1*R_E2/(R_E2+R_F+R_E1);\n", + "print B,\"=Beta value\"\n", + "A_f=A/(1.0+A*B);\n", + "print round(A_f*1000.0,2),\"=Closed loop gain (mA/V)\"\n", + "A_v=-A_f*R_C3; # Voltage gain\n", + "print round(A_v,1),\"=Voltage gain (V/V)\"\n", + "R_i=(h_fe+1)*(r_e1+(R_E1//(R_F+R_E2))/(R_E1+R_F+R_E2));\n", + "R_if=R_i*(1+A*B);\n", + "print round(R_if/1e6,1),\"=Input resistance (Mohm)\"\n", + "R_o=(R_E2//(R_F+R_E1)/(R_F+R_E1+R_E2))+r_e3+R_C2/(h_fe+1);\n", + "R_of=R_o*(1.0+A*B);\n", + "print round(R_of/1000,1),\"=Output voltage (kohm)\"\n", + "r_o=25000; # (ohm)\n", + "g_m3=160*10**-3; # (mho)\n", + "r_pi3=625; # (ohm)\n", + "R_out=r_o+(1+g_m3*r_o)*R_of*r_pi3/(R_of+r_pi3);\n", + "print round(R_out/1e6,1),\"=R_out (Mohm)\"\n", + " # the answer in the textbook is slightly dirfferent due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-14.92 =The voltage gain of the first stage (V/V)\n", + "-373.6 =The second stage gain (V/V)\n", + "10.6 =The third stage gain (mA/V)\n", + "59.0958738355 =Combined gain (V/V)\n", + "11.9047619048 =Beta value\n", + "83.88 =Closed loop gain (mA/V)\n", + "-67.1 =Voltage gain (V/V)\n", + "3.0 =Input resistance (Mohm)\n", + "39.3 =Output voltage (kohm)\n", + "2.5 =R_out (Mohm)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.3:pg-821" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 8.3 : Small signal analysis\n", + "B=100.0; # beta value\n", + "I_B=0.015*10**-3; # (A)\n", + "I_C=1.5*10**-3; # (A)\n", + "V_C=4.7; # (V)\n", + "g_m=40.0*10**-3;\n", + "R_f=47000.0;\n", + "R_S=10000.0;\n", + "R_C=4700.0;\n", + "r_pi=B/g_m;\n", + "A=-358.7*10**3; # V_o/I_i= -g_m(R_f||R_C)(R_S||R_F||r_pi)\n", + "R_i=1400.0; # R_i=R_S||R_f||r_pi (ohm)\n", + "R_o=R_C*R_f/(R_C+R_f); \n", + "B=-1/R_f;\n", + "A_f=A/(1.0+A*B); # V_o/I_s\n", + "A_v=A_f/R_S; # V_o/V_s\n", + "print round(A_v,2),\"= The gain (V/V)\"\n", + "R_if=R_i/(1+A*B);\n", + "print round(R_if,1),\"= R_if (ohm)\"\n", + "R_of=R_o/(1+A*B);\n", + "print round(R_of),\"= R_of (ohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-4.16 = The gain (V/V)\n", + "162.2 = R_if (ohm)\n", + "495.0 = R_of (ohm)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.4:pg-825" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 8.4: Small signal analysis\n", + "R_S=10.0*10**3; # (ohm)\n", + "R_B1=100.0*10**3; # (ohm)\n", + "R_B2=15.0*10**3; # (ohm)\n", + "R_C1=10.0*10**3; # (ohm)\n", + "R_E1=870.0; # (ohm)\n", + "R_E2=3400.0; # (ohm)\n", + "R_C2=8000.0; # (ohm)\n", + "R_L=1000.0; # (ohm)\n", + "R_f=10000.0; # (ohm)\n", + "B=100.0; # beta value\n", + "V_A=75.0; # (V)\n", + "A=-201.45 # I_o/I_i (A/A)\n", + "R_i=1535.0; # (ohm)\n", + "R_o=2690.0; # (ohm)\n", + "B=-R_E2/(R_E2+R_f);\n", + "R_if=R_i/(1+A*B);\n", + "R_in=1/((1/R_if)-(1/R_S));\n", + "print round(R_in,1), \"= R_in (ohm)\"\n", + "A_f=A/(1+A*B); # I_o/I_S\n", + "gain=R_C2*A_f/(R_C2+R_L); # I_o/I_S\n", + "print round(gain,2),\"= I_o/I_S (A/A)\"\n", + "R_of=R_o*(1+A*B); # (ohm)\n", + "r_o2=75/0.0004; # (ohm)\n", + "g_m2=0.016; # (A/V)\n", + "r_pi2=6250; # (ohm)\n", + "R_out=r_o2*(1+g_m2*(r_pi2*R_of/(r_pi2+R_of)))\n", + "print round(R_out/1e6,1),\"= R_out (Mohm)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "29.5 = R_in (ohm)\n", + "-3.44 = I_o/I_S (A/A)\n", + "18.1 = R_out (Mohm)\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter9.ipynb b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter9.ipynb new file mode 100755 index 00000000..836bb3d5 --- /dev/null +++ b/Microelectronic_Circuits_by_A.S._Sedra_and_K.C._Smith/Chapter9.ipynb @@ -0,0 +1,394 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:319b3f32e409bff3be02756cf61b3db7331d3cf7998339ca41a86fd66771d9c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter09:Operational-Amplifier and\n", + "Data-Converter Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1:pg-881" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 9.1 Design of two-stage CMOS op-amp \n", + "A_v=4000.0; # (V/V)\n", + "V_A=20.0; # (V)\n", + "k_p=80.0*10**-6; # k'_n=k_n (A/V**2)\n", + "k_n=200.0*10**-6; # k'_p=k_P (A/V**2)\n", + "V_SS=1.65; # (V)\n", + "V_DD=1.65; # (V)\n", + "V_tn=0.5; # (V)\n", + "V_tp=0.5; # (V)\n", + "C_1=0.2*10**-12; # (F)\n", + "C_2=0.8*10**-12; # (F)\n", + "I_D=100.0*10**-6; # (A)\n", + "V_OV=math.sqrt(V_A**2/A_v);\n", + "WbyL_1=I_D*2/(V_OV**2*k_p); # WbyL_1=(W/L)_1\n", + "print WbyL_1,\"= Required (W/L) ratio for Q_1\"\n", + "WbyL_2=WbyL_1; # WbyL_2=(W/L)_2\n", + "print WbyL_2,\"= Required (W/L) ratio for Q_2\"\n", + "WbyL_3=I_D*2/(V_OV**2*k_n); # WbyL_3=(W/L)_3\n", + "print WbyL_3,\"= Required (W/L) ratio for Q_3\"\n", + "WbyL_4=WbyL_3; # WbyL_4=(W/L)_4\n", + "print WbyL_4,\"= Required (W/L) ratio for Q_4\"\n", + "I_D=200*10**-6;\n", + "WbyL_5=I_D*2/(V_OV**2*k_p); # WbyL_5=(W/L)_5\n", + "print WbyL_5,\"= Required (W/L) ratio for Q_5\"\n", + "I_D=500*10**-6;\n", + "WbyL_7=2.5*WbyL_5; # WbyL_7=(W/L)_7 \n", + "print WbyL_7,\"= Required (W/L) ratio for Q_7\"\n", + "WbyL_6=I_D*2/(V_OV**2*k_n); # WbyL_6=(W/L)_6\n", + "print WbyL_6,\"= Required (W/L) ratio for Q_6\"\n", + "WbyL_8=0.1*WbyL_5; # WbyL_8=(W/L)_8\n", + "print WbyL_8,\"= Required (W/L) ratio for Q_8\"\n", + "V_ICMmin=-V_SS+V_OV+V_tn-V_tp;\n", + "print round(V_ICMmin,2),\"= The lowest value of input common mode voltage\"\n", + "V_ICMmax=V_DD-V_OV-V_OV-V_tp;\n", + "print round(V_ICMmax,2),\"= The highest value of input common mode voltage\"\n", + "v_omin=-V_SS+V_OV;\n", + "print round(v_omin,2),\"= The lowest value of output swing allowable\"\n", + "v_omax=V_DD-V_OV;\n", + "print round(v_omax,2),\"= The highest value of output swing allowable\"\n", + "R_o=20/(2*0.5);\n", + "print R_o,\"= Input resistance is practically infinite and output reistance is (Kohm)\"\n", + "G_m2=2*I_D/V_OV;\n", + "print round(G_m2*1e3,1),\"= G_m2 (mA/V)\"\n", + "f_P2=3.2*10**-3/(2*math.pi*C_2);\n", + "print round(f_P2/1e6),\"= f_P2 (MHz)\"\n", + "R=1/G_m2;\n", + "print int(R),\"= To move the transmission zero to s=infinite , r value selected as (ohm)\"\n", + "f_t=f_P2*tan(15*math.pi/180.0); # Phase margin of 75 degrees , thus phase shift due to seccond pole must be 15 degrees\n", + "print round(f_t/1e6),\"= f_t (MHz)\"\n", + "G_m1=2*100*10**-6/V_OV; # I_D = 100uA\n", + "C_C1=G_m1/(2*math.pi*f_t);\n", + "print round(C_C1/1e-12,1),\"= C_C1 (picoF)\"\n", + "SR=2*math.pi*f_t*V_OV;\n", + "print round(SR/1e6),\"= SR (V/micros)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "25.0 = Required (W/L) ratio for Q_1\n", + "25.0 = Required (W/L) ratio for Q_2\n", + "10.0 = Required (W/L) ratio for Q_3\n", + "10.0 = Required (W/L) ratio for Q_4\n", + "50.0 = Required (W/L) ratio for Q_5\n", + "125.0 = Required (W/L) ratio for Q_7\n", + "50.0 = Required (W/L) ratio for Q_6\n", + "5.0 = Required (W/L) ratio for Q_8\n", + "-1.33 = The lowest value of input common mode voltage\n", + "0.52 = The highest value of input common mode voltage\n", + "-1.33 = The lowest value of output swing allowable\n", + "1.33 = The highest value of output swing allowable\n", + "20.0 = Input resistance is practically infinite and output reistance is (Kohm)\n", + "3.2 = G_m2 (mA/V)\n", + "637.0 = f_P2 (MHz)\n", + "316 = To move the transmission zero to s=infinite , r value selected as (ohm)\n", + "171.0 = f_t (MHz)\n", + "0.6 = C_C1 (picoF)\n", + "339.0 = SR (V/micros)\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2:pg-889" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 9.2 : To determine A_v,f_t,f_P,SR and P_D of folded cascode amplifier\n", + "# Consider a design of the folded-cascode op amp\n", + "I=200*10.0**-6; # (A)\n", + "I_B=250.0*10**-6; # (A)\n", + "V_OV=0.25; # (V)\n", + "k_n=100.0*10**-6; # k_n=k'_n (A/V**2)\n", + "k_p=40*10.0**-6; # k_p=k'_p (A/V**2)\n", + "V_A=20.0; # V_A=V'_A (V/um)\n", + "V_DD=2.5; # (V)\n", + "V_SS=2.5; # (V)\n", + "V_t=0.75; # (V)\n", + "L=1*10.0**-6; # (m)\n", + "C_L=5*10.0**-12; # (F)\n", + "print \"Data calculated for Q1\"\n", + "I_D=I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print r_o/1000,\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q2\"\n", + "I_D=I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print r_o/1000,\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q3\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_p*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q4\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_p*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q5\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print g_m,\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q6\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q7\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q8\"\n", + "I_D=I_B-I/2;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q9\"\n", + "I_D=I_B;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_p*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q10\"\n", + "I_D=I_B;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print int(r_o/1000),\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_p*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "print \"Data calculated for Q11\"\n", + "I_D=I;\n", + "print round(I_D*1e6),\"= I_D (microA)\"\n", + "g_m=2*I_D/V_OV;\n", + "print round(g_m*1e3,1),\"= g_m (mA/V)\"\n", + "r_o=V_A/I_D;\n", + "print r_o/1000,\"= r_o (Kohm)\"\n", + "WbyL=2*I_D/(k_n*V_OV**2); # WbyL =W/L\n", + "print WbyL,\"= W/L\"\n", + "gmro=160; # gmro=g_m*r_o\n", + "print gmro,\"= g_m*r_o for all transistors is (V/V)\"\n", + "V_GS=1;\n", + "print V_GS,\"= V_GS for all transistors is (V)\"\n", + "V_ICMmin=-V_SS+V_OV+V_OV+V_t;\n", + "print V_ICMmin,\"= The lowest value of input common mode voltage (V)\"\n", + "V_ICMmax=V_DD-V_OV+V_t;\n", + "print V_ICMmax,\"= The highest value of input common mode voltage (V)\"\n", + "v_omin=-V_SS+V_OV+V_OV+V_t;\n", + "print v_omin,\"= The lowest value of output swing allowable (V)\"\n", + "v_omax=V_DD-V_OV-V_OV;\n", + "print v_omax,\"= The highest value of output swing allowable (V)\"\n", + "r_o2=200.0*10**3; # r_o calculated for Q2\n", + "r_o10=80.0*10**3; # r_o calculated for Q10\n", + "R_o4=gmro*(r_o2*r_o10)/(r_o2+r_o10);\n", + "r_o8=133333.0; # r_o calculated for Q8\n", + "R_o6=gmro*r_o8;\n", + "R_o=R_o4*R_o6/(R_o4+R_o6);\n", + "print round(R_o/1e6,1),\"= Output resistance (Mohm)\"\n", + "G_M=0.0008;\n", + "A_v=G_M*R_o;\n", + "print round(A_v),\"= Voltage gain (V/V)\"\n", + "f_t=G_M/(2*math.pi*C_L);\n", + "print round(f_t/1e6,1),\"= Unity gain bandwidth (MHz)\"\n", + "f_P=f_t/A_v;\n", + "print round(f_P/1e3),\"= Dominant pole frequency (KHz)\"\n", + "SR=I/C_L;\n", + "print round(SR/1e6),\"= Slew Rate (V/microsecond)\"\n", + "I_t=0.5*10**-3; # total current\n", + "V_S=5; # Supply voltage\n", + "P_D=I_t*V_S;\n", + "print round(P_D*1e3,1),\"= Power dissipated (mW)\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Data calculated for Q1\n", + "100.0 = I_D (microA)\n", + "0.8 = g_m (mA/V)\n", + "200.0 = r_o (Kohm)\n", + "32.0 = W/L\n", + "Data calculated for Q2\n", + "100.0 = I_D (microA)\n", + "0.8 = g_m (mA/V)\n", + "200.0 = r_o (Kohm)\n", + "32.0 = W/L\n", + "Data calculated for Q3\n", + "150.0 = I_D (microA)\n", + "1.2 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "120.0 = W/L\n", + "Data calculated for Q4\n", + "150.0 = I_D (microA)\n", + "1.2 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "120.0 = W/L\n", + "Data calculated for Q5\n", + "150.0 = I_D (microA)\n", + "0.0012 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "48.0 = W/L\n", + "Data calculated for Q6\n", + "150.0 = I_D (microA)\n", + "1.2 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "48.0 = W/L\n", + "Data calculated for Q7\n", + "150.0 = I_D (microA)\n", + "1.2 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "48.0 = W/L\n", + "Data calculated for Q8\n", + "150.0 = I_D (microA)\n", + "1.2 = g_m (mA/V)\n", + "133 = r_o (Kohm)\n", + "48.0 = W/L\n", + "Data calculated for Q9\n", + "250.0 = I_D (microA)\n", + "2.0 = g_m (mA/V)\n", + "80 = r_o (Kohm)\n", + "200.0 = W/L\n", + "Data calculated for Q10\n", + "250.0 = I_D (microA)\n", + "2.0 = g_m (mA/V)\n", + "80 = r_o (Kohm)\n", + "200.0 = W/L\n", + "Data calculated for Q11\n", + "200.0 = I_D (microA)\n", + "1.6 = g_m (mA/V)\n", + "100.0 = r_o (Kohm)\n", + "64.0 = W/L\n", + "160 = g_m*r_o for all transistors is (V/V)\n", + "1 = V_GS for all transistors is (V)\n", + "-1.25 = The lowest value of input common mode voltage (V)\n", + "3.0 = The highest value of input common mode voltage (V)\n", + "-1.25 = The lowest value of output swing allowable (V)\n", + "2.0 = The highest value of output swing allowable (V)\n", + "6.4 = Output resistance (Mohm)\n", + "5120.0 = Voltage gain (V/V)\n", + "25.5 = Unity gain bandwidth (MHz)\n", + "5.0 = Dominant pole frequency (KHz)\n", + "40.0 = Slew Rate (V/microsecond)\n", + "2.5 = Power dissipated (mW)\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3:pg-908" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Example 9.3 : To determine input offset voltage\n", + "r_e=2.63*10**3; # (ohm)\n", + "R=1000; # (ohm)\n", + "I=9.5*10**-6; # (A)\n", + "deltaRbyR=0.02; # 2% mismatch between R_1 and R_2\n", + "G_m1=10**-3/5.26; # (A/V)\n", + "deltaI=deltaRbyR/(1+deltaRbyR + r_e/R); # Change of deltaI in I_E (A)\n", + "V_OS=deltaI/G_m1/1e2;\n", + "print round(V_OS,1),\"= Offset voltage (mV)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.3 = Offset voltage (mV)\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Microwave_and_Radar_Engineering/Chapter_10.ipynb b/Microwave_and_Radar_Engineering/Chapter_10.ipynb deleted file mode 100755 index 406bdd3e..00000000 --- a/Microwave_and_Radar_Engineering/Chapter_10.ipynb +++ /dev/null @@ -1,562 +0,0 @@ -{ - "metadata": { - "name": "Chapter 10" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10: Microwave Communication Systems" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.1, Page number 486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from math import sqrt\n", - "\n", - "#Variable declaration\n", - "ht = 144 #transmitter antenna height(m)\n", - "hr = 25 #receiving antenna height(M)\n", - "\n", - "#Calculations\n", - "dt = 4*sqrt(ht)\n", - "dr = 4*sqrt(hr)\n", - "d = dt+dr\n", - "\n", - "#Results\n", - "print \"Radio horizon is\",dt,\"km\"\n", - "print \"The maximum distance of propagation of the TV signal is\",d,\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Radio horizon is 48.0 km\n", - "The maximum distance of propagation of the TV signal is 68.0 km\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.2, Page number 486" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "from fractions import Fraction\n", - "\n", - "#Variable declaration\n", - "r = 6370*10**3 #radius of earth(km)\n", - "du_dh = -0.05*10**-6 #refractive index of air near ground\n", - "\n", - "#Calculations\n", - "k = 1/(1+(r*du_dh))\n", - "\n", - "#Result\n", - "print \"The horizon distance of the transmitter can be modified by replaing r by r' is\",round(k,3),\"r\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The horizon distance of the transmitter can be modified by replaing r by r' is 1.467 r\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.3, Page number 487" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math \n", - "#Variable declaration\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "f = 2*10**9 #frequency(Hz)\n", - "r = 50*10**3 #repeater spacing(km)\n", - "Pr = 20 #carrier power(dBm)\n", - "Gt = 34 #antenna gain(dB)\n", - "L = 10 #dB\n", - "Gr = 34 #dB\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "Pt = -Pr+(10*math.log10(4*math.pi*r**2))-Gt-(10*math.log10(lamda**2/(4*math.pi)))+L-Gr\n", - "\n", - "#Results\n", - "print \"The carrier tansmitted power required is\",round(Pt,2),\"dBm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The carrier tansmitted power required is 54.44 dBm\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Exampl 10.4, Page number 487" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "f = 6.*10**9 #uplink frequency(Hz)\n", - "e = 5 #elevation angle(degrees)\n", - "Pt = 1.*10**3 #transmitter power(W)\n", - "Gt = 60. #gain of transmitter(dB)\n", - "Gr = 0 #gain of receiver(dB)\n", - "d = 36000*10**3 #distance between ground and satellite(m)\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculation\n", - "Gt1 = 10**(Gt/10)\n", - "Gr1 = 10.**(Gr/10)\n", - "r = d/(math.sin(math.radians(e)))\n", - "lamda = c/f\n", - "Pr = (Pt*Gt1*Gr1*lamda**2)/(4*math.pi*r**2*4*math.pi)\n", - "\n", - "#Result\n", - "print \"Received power =\",round((Pr/1E-14),1),\"*10^-14 W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Received power = 9.3 *10^-14 W\n" - ] - } - ], - "prompt_number": 41 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.5, Page number 487" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "r = 6371 #radius of the earth(km)\n", - "\n", - "#Calculation\n", - "d = 35855+r #distance of satellite from center of the earth(km)\n", - "b = (math.degrees(math.pi)*r)/d\n", - "\n", - "#Result\n", - "print \"Antenna beam angle =\",round(b,2),\"degrees\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Antenna beam angle = 27.16 degrees\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.6, Page number 488" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "r = 6371 #radius of earth(km)\n", - "h = 35855 #height(km) \n", - "phi = 5 #elevation angle(degrees)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "B = 90 #angle for vertical transmission(degrees)\n", - "\n", - "#Calculations\n", - "d = math.sqrt(((r+h)**2)-((r*math.cos(math.radians(phi)))**2))- (r*math.sin(math.radians(phi)))\n", - "T = (2*d*10**3)/c\n", - "dv = math.sqrt(((r+h)**2)-(r**2))\n", - "Tv = (2*(dv-r)*10**3)/c\n", - "\n", - "#Results\n", - "print \"The round trip time between earth station and satellite is\",round((T/1E-3),2),\"msec\"\n", - "print \"The round trip time for vertical transmission is\",round((Tv/1E-3),2),\"msec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The round trip time between earth station and satellite is 274.61 msec\n", - "The round trip time for vertical transmission is 235.81 msec\n" - ] - } - ], - "prompt_number": 53 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.7, Page number 488" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Tant = 25 #effective noise temperature for antenna(K)\n", - "Tr = 75 #receiver oise temperature(K)\n", - "G = 45 #power gain(dB)\n", - "\n", - "#Calculations\n", - "T = Tant+Tr\n", - "Tdb = 10*math.log10(T)\n", - "M = G - Tdb\n", - "\n", - "#Results\n", - "print \"The figure of merit for earth station is\",M,\"dB\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The figure of merit for earth station is 25.0 dB\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.8, Page number 488" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "EIRP = 55.5 #satellite ESM(dBW)\n", - "M = 35 #freespace loss(dB)\n", - "Lfs = 245.3 #GT of earth station(dB)\n", - "\n", - "#Calculation\n", - "C_No = EIRP + M - Lfs + 228.6\n", - "\n", - "#Result\n", - "print \"The carrier to noise ratio is\",round(C_No,2),\"dB\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The carrier to noise ratio is 73.8 dB\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.9, Page number 489" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "D = 30 #diameter of dish(m)\n", - "f = 4*10**9 #downlink frequency(Hz)\n", - "M = 20 #G/T ratio of earth station\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "Ae = (math.pi*D**2)/4\n", - "lamda = c/f\n", - "G = (4*math.pi*Ae)/lamda**2\n", - "Gdb = 10*math.log10(G)\n", - "Ts = Gdb - M\n", - "\n", - "#Result\n", - "print \"The system noise temperature is\",round(Ts,2),\"dB\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The system noise temperature is 41.98 dB\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.10, Page number 489" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Gp = 1500 #power gain\n", - "lamda = 10*10**-2 #m\n", - "\n", - "#Calculations\n", - "D = math.sqrt((Gp*(lamda**2))/(math.pi**2))\n", - "HPBW = 58*lamda/D\n", - "\n", - "#Results\n", - "print \"The diamater of parabolic antenna is\",round(D,2),\"m\"\n", - "print \"Half power beam width of paraboic antenna =\",round(HPBW,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "15791.3670417\n", - "The diamater of parabolic antenna is 1.23 m\n", - "Half power beam width of paraboic antenna = 4.7\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.11, Page number 490" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "then Gp1 = (6*D1**2)/(lamda**2)\n", - "If the gain and diameter of the antenna in the modified system is Gp2 and d2,\n", - "then Gp2 = (6*D2**2)/(lamda**2)\n", - "Gain = 10*log(Gp2/Gp1)\n", - "\n", - "#Calculations\n", - "G = 10*math.log10(2)\n", - "Gall = 2*G\n", - "\n", - "#Results\n", - "print \"Overall gain of the system is\",round(Gall,2),\"dB\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Overall gain of the system is 6.02 dB\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Esample 10.12, Page number 490" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "a)beamwidth between first nulls\n", - "b)beamwidth between half power points\n", - "\n", - "#Variable declaration\n", - "D = 3*10**2 #diameter of paraboloid(cm)\n", - "f = 3.*10**9 #frequency(Hz)\n", - "c = 3.*10**10 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "BWFN = (140*lamda)/D\n", - "BWHP = (70*lamda)/D\n", - "Gp = (6*D**2)/(lamda**2)\n", - "\n", - "#Results\n", - "print \"Beamwidth between first nulls =\",round(BWFN,2),\"degrees\"\n", - "print \"Beamwidth between half power points =\",round(BWHP,2),\"degrees\"\n", - "print \"Gain of antenna =\",round(Gp,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Beamwidth between first nulls = 4.67 degrees\n", - "Beamwidth between half power points = 2.33 degrees\n", - "Gain of antenna = 5400.0\n" - ] - } - ], - "prompt_number": 51 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.13, Page number 490" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "A = 5\n", - "\n", - "#Calculation\n", - "Gp = 4.5*A**2\n", - "\n", - "#Result\n", - "print \"Power gain of optimum horn antenna =\",Gp\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Power gain of optimum horn antenna = 112.5\n" - ] - } - ], - "prompt_number": 53 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Microwave_and_Radar_Engineering/Chapter_11.ipynb b/Microwave_and_Radar_Engineering/Chapter_11.ipynb deleted file mode 100755 index afe53dd6..00000000 --- a/Microwave_and_Radar_Engineering/Chapter_11.ipynb +++ /dev/null @@ -1,300 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:efd0e56c04d2245e98b2287a63fba67799b88e9847372ba4c5f3c4cf5de91c4c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11: Radars" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.1, Page number 504" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaraion\n", - "lamda = 3.*10**-2#operating unit(cm)\n", - "Pt = 600.*10**3 #peak pulse power(W)\n", - "Smin = 10.**-13 #minimum detectable signal(W)\n", - "Ae = 5. #m^2\n", - "sigma = 20. #cross sectional area(m^2)\n", - "\n", - "#Calculations\n", - "Rmax = ((Pt*Ae**2*sigma)/(4*math.pi*lamda**2*Smin))**0.25\n", - "Rmax_nau = Rmax/1.853\n", - "\n", - "#Result\n", - "print \"The maximum range of radar system is\",round((Rmax/1E+3),2),\"km\"\n", - "print \"The maximum range of radar system in nautical miles is\",round((Rmax_nau/1E+3),2),\"nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum range of radar system is 717.66 km\n", - "The maximum range of radar system in nautical miles is 387.29 nm\n" - ] - } - ], - "prompt_number": 25 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.2, Page number 504" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "Pt = 250.*10**3 #peak pulse power(W)\n", - "Smin = 10.**-14 #minimum detectable signal(W)\n", - "Ae = 10. #m^2\n", - "sigma = 2. #cross sectional area(m^2)\n", - "f = 10*10**9 #frequency(Hz)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "G = 2500 #power gain of antenna\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "Rmax = ((Pt*G*Ae*sigma)/((4*math.pi)**2*Smin))**0.25\n", - "\n", - "#Result\n", - "print \"Maximum range possible of the antenna is\",round((Rmax/1E+3),2),\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum range possible of the antenna is 298.28 km\n" - ] - } - ], - "prompt_number": 30 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3, Page number 504" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Pt = 250.*10**3 #peak pulse power(W)\n", - "f = 10.*10**9 #frequency(Hz)\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "G = 4000 #power gain of antenna\n", - "R = 50*10**3 #range(m)\n", - "Pr = 10**-11 #minimum detectable signal(W)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "Ae = (G*lamda**2)/(4*math.pi)\n", - "sigma = (Pr*((4*math.pi*R**2)**2))/(Pt*G*Ae)\n", - "\n", - "#Result\n", - "print \"The radar can sight cross section area of\",round(sigma,2),\"m^2\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The radar can sight cross section area of 34.45 m^2\n" - ] - } - ], - "prompt_number": 37 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.4, Page number 505" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "#Variable declaration\n", - "Pt = 400*10**3 #transmitted power(W)\n", - "prf = 1500. #pulse repitiion frequency(pps)\n", - "tw = 0.8*10**-6 #pulse width(sec)\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "#Part a\n", - "Run = c/(2*prf)\n", - "\n", - "#Part b\n", - "dc = tw/(1/prf)\n", - "\n", - "#Part c\n", - "Pav = Pt*dc\n", - "\n", - "#Part d\n", - "n1 = 1\n", - "BW1 = n1/tw\n", - "\n", - "n2 = 1.4\n", - "BW2 = n2/tw\n", - "\n", - "#Results\n", - "print \"The radar's unambiguous range is\",round((Run/1E+3),2),\"km\"\n", - "print \"The duty cycle for radar is\",dc\n", - "print \"The average power is\",round(Pav,2),\"W\"\n", - "print \"Bandwidth range for radar is\",(BW1/1E+6),\"MHz and\",(BW2/1E+6),\"MHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The radar's unambiguous range is 100.0 km\n", - "The duty cycle for radar is 0.0012\n", - "The average power is 480.0 W\n", - "Bandwidth range for radar is 1.25 MHz and 1.75 MHz\n" - ] - } - ], - "prompt_number": 47 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.5, Page number 505" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Pt = 2.5*10**6 #power output(W)\n", - "D = 5 #antenna diameter(m)\n", - "sigma = 1 #cross sectional area of target(m^2)\n", - "B = 1.6*10**6 #receiver bandwidth(Hz)\n", - "c = 3.*10**8 #velocity of propagation(m/s)\n", - "Nf = 12. #noise figure(dB)\n", - "f = 5*10**9 #frequency(Hz)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "F = 10**(Nf/10)\n", - "Rmax = 48*(((Pt*D**4*sigma)/(B*lamda**2*(F-1)))**0.25)\n", - "\n", - "#Result\n", - "print \"The maximum detection range is\",round(Rmax,2),\"km\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum detection range is 558.04 km\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.6, Page number 506" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math \n", - "\n", - "#Variable declaration\n", - "Rmax = 30 #maximum range of radar(km)\n", - "n = 50 #no. of echos\n", - "\n", - "#Calculation\n", - "R = Rmax*math.sqrt(math.sqrt(n))\n", - "\n", - "#After doubling the power\n", - "R1 = math.sqrt(math.sqrt(2))\n", - "\n", - "#Results\n", - "print \"Maximum range with echoing of 50 times is\",round(R,2),\"km\"\n", - "print \"If transmitter power is doubled, range would increase by a factor of\",round(R1,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum range with echoing of 50 times is 79.77 km\n", - "If transmitter power is doubled, range would increase by a factor of 1.19\n" - ] - } - ], - "prompt_number": 61 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Microwave_and_Radar_Engineering/Chapter_3.ipynb b/Microwave_and_Radar_Engineering/Chapter_3.ipynb deleted file mode 100755 index 116264a3..00000000 --- a/Microwave_and_Radar_Engineering/Chapter_3.ipynb +++ /dev/null @@ -1,531 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dfa1112ea6b0d370508845e5b6861c8e0c5d67e82e0a759d3e8e0f96252d9846" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Transmission Lines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example number 3.1, Page number 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "#Variable declaration\n", - "Zo = 100 #o/p impedance(Ohms)\n", - "s = 5 #VSWR\n", - "\n", - "#Calculations\n", - "Zmax = Zo*s\n", - "\n", - "#Results\n", - "print \"Terminating impedance = \",Zmax,\"Ohms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Terminating impedance = 500 Ohms\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2, Page number 47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "import cmath\n", - "\n", - "#Varaible declaration \n", - "R = 8 #resistance(Ohms)\n", - "L = 2*10**-3 #inductance(H/km)\n", - "C = 0.002*10**-6 #capacitance(F)\n", - "G = 0.07*10**-6 #conductance(s/km)\n", - "f = 2*10**3 #frequency(Hz)\n", - "Vs = 2 #input signal(V)\n", - "l = 500. #line length(km)\n", - "\n", - "#Calculations\n", - "w = 2*math.pi*f\n", - "x = complex(R,w*L)\n", - "y = complex(G,w*C)\n", - "Zo = cmath.sqrt(x/y)\n", - "gamma = cmath.sqrt(x*y)\n", - "Is = Vs/Zo.real\n", - "Il = Is*cmath.exp(-1*gamma*l)\n", - "P = Il**2*Zo.real\n", - "\n", - "#Results\n", - "print \"Characteristic impedance =\",Zo,\"Ohms\"\n", - "print \"Attenuation constant =\",round(gamma.real,6),\"NP/km\"\n", - "print \"Phase constant =\", round(gamma.imag,6),\"rad/km\"\n", - "print \"Power delivered to the load =\", round((abs(P)/1E-6),2), \"uW\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Characteristic impedance = (1012.50018135-155.813417548j) Ohms\n", - "Attenuation constant = 0.003987 NP/km\n", - "Phase constant = 0.025436 rad/km\n", - "Power delivered to the load = 73.31 uW\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.3, Page number 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Varaible declaration\n", - "f = 2*10**3 #frequency(Hz)\n", - "B = 0.02543 #phase constant(rad/km)\n", - "\n", - "#Calculations\n", - "w = 2*math.pi*f\n", - "Vp = w/B\n", - "\n", - "#Results\n", - "print \"Phase velocity =\",round((Vp/1E+3),2),\"km/sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Phase velocity = 494.16 km/sec\n" - ] - } - ], - "prompt_number": 24 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, Page number 48" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration\n", - "f = 37.5*10**6 #frequency(Hz)\n", - "V = 200 #Voltage signal(Vrms)\n", - "r = 200 #internal resistance(Ohms)\n", - "Zo = 200 #characteristic impedance(Ohms)\n", - "l = 10 #line length(m)\n", - "Zl = 100 #resistive load(Ohms)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "#Part a\n", - "lamda = c/f\n", - "Bl = (5*math.degrees(math.pi))/4\n", - "x = complex(Zl,(Zo*math.tan(Bl)))\n", - "y = complex(Zo,(Zl*math.tan(Bl)))\n", - "Zi = Zo*(x/y)\n", - "Vs = (Zi.real*Zo)/(Zi.real+Zo)\n", - "Is = Zo/(Zi.real+Zo)\n", - "\n", - "#Part b\n", - "P = Vs*Is\n", - "\n", - "#Part c\n", - "Il = math.sqrt(P/Zl)\n", - "\n", - "#Results\n", - "print \"Please note that the solution given in the textbook is incorrect.Hence the difference in answers\\n\"\n", - "print \"Current drawn from generator is\",round(Is,2),\"A\" \n", - "print \"Power delivered to the load is\",round(P,2),\"W\"\n", - "print \"Current flowing through the load is\",round(Il,3),\"A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please note that the solution given in the textbook is incorrect.Hence the difference in answers\n", - "\n", - "Current drawn from generator is 0.41 A\n", - "Power delivered to the load is 48.47 W\n", - "Current flowing through the load is 0.696 A\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5, Page number 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration\n", - "zo = 50 #characteristic impedance(Ohms)\n", - "f = 300*10**6 #frequency(Hz)\n", - "zl = complex(50,50) #terminating load(Ohms)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "rho = (zl-zo)/(zl+zo)\n", - "phi = cmath.phase(rho)\n", - "s = (1+abs(rho))/(1-abs(rho))\n", - "\n", - "#Results\n", - "print \"Reflection co-efficient =\",round(abs(rho),3),\"with phase =\",round(math.degrees(phi),2)\n", - "print \"VSWR =\",round(s,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Reflection co-efficient = 0.447 with phase = 63.43\n", - "VSWR = 2.62\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, Page number 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Zl = 100. #load resistance(Ohms)\n", - "Zo = 600. #characteristic impedance(Ohms)\n", - "f = 100*10**6 #frequency(Hz)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "l = (lamda*math.atan(math.sqrt(Zl/Zo)))/(2*math.pi)\n", - "l_dash = (lamda*math.atan(math.sqrt((Zl*Zo)/(Zo-Zl))))/(2*math.pi)\n", - "\n", - "#Results\n", - "print \"The position of the stub is\", round(l,3),\"m\\n\"\n", - "print \"Please note that the solution for l_dash given in the textbook is incorrect\"\n", - "print \"Length of stub is\",round(l_dash,3),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The position of the stub is 0.185 m\n", - "\n", - "Please note that the solution for l_dash given in the textbook is incorrect\n", - "Length of stub is 0.707 m\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, Page number 50" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration\n", - "s = 3.2 #VSWR\n", - "Xmin = 0.237 #minimum voltage(V)\n", - "Zo = 50 #characteristic impedance(Ohms)\n", - "\n", - "#Calculations\n", - "q = math.tan(math.degrees(2*math.pi*Xmin))\n", - "x = complex(1,-(s*q))\n", - "y = complex(s, -q)\n", - "Zl = Zo*(x/y)\n", - "\n", - "#Result\n", - "print \"Please note that the solution given in the textbook is incorrect.Hence the difference in answers\\n\"\n", - "print \"Terminating impedance =\", Zl,\"Ohms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Please note that the solution given in the textbook is incorrect.Hence the difference in answers\n", - "\n", - "Terminating impedance = (19.6572514629-23.7885950214j) Ohms\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, Page number 51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Zo = 50. #characteristic impedance(Ohms)\n", - "Zl = 100. #load resistance(Ohms)\n", - "f = 300*10**3 #frequency(Hz)\n", - "Pl = 50*10**-3 #load power(W)\n", - "c = 3*10**8 #velocity of propagation(m/s)\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "\n", - "#Part a\n", - "rho = (Zl-Zo)/(Zl+Zo)\n", - "s = (1+abs(rho))/(1-abs(rho))\n", - "\n", - "#Part b\n", - "#Since real Zl>Zo, first Vmax is located at the load\n", - "Vmin_pos = lamda/4\n", - "\n", - "#Part c\n", - "Vmax = math.sqrt(Pl*Zl)\n", - "Vmin = Vmax/s\n", - "\n", - "#Part d\n", - "Zin_at_Vmin = Zo/s\n", - "Zin_at_Vmax = Zo*s\n", - "\n", - "\n", - "#Results\n", - "print \"VSWR = \", s\n", - "print \"First Vmax is loacted at load and first Vmin is located at\", Vmin_pos,\"m from the load\"\n", - "print \"Vmin = \",round(Vmin,2),\"V and Vmax = \",round(Vmax,2),\"V\"\n", - "print \"Impedance at Vmin is \", Zin_at_Vmin,\"Ohm and impedance at Vmax is\",Zin_at_Vmax,\"Ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "VSWR = 2.0\n", - "First Vmax is loacted at load and first Vmin is located at 250 m from the load\n", - "Vmin = 1.12 V and Vmax = 2.24 V\n", - "Impedance at Vmin is 25.0 Ohm and impedance at Vmax is 100.0 Ohm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9, Page number 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "Zo = 600. #characteristic impedance(Ohms)\n", - "Zs = 50 #source impedance(Ohms)\n", - "l = 200 #length of line(m)\n", - "Zl = 500. #load resistance(Ohms)\n", - "\n", - "#Calculations\n", - "rho = (Zl-Zo)/(Zl+Zo)\n", - "\n", - "#Part a\n", - "ref_l = math.log10(1/(1-((abs(rho))**2)))\n", - "\n", - "#Part b\n", - "#Since, the line is lossless,\n", - "att_l = 0\n", - "trans_l = ref_l+att_l\n", - "\n", - "#Part c\n", - "ret_l = math.log10(abs(rho))\n", - "\n", - "#Results\n", - "print \"Reflection loss =\",round(ref_l,4),\"dB\"\n", - "print \"Transmission loss =\",round(trans_l,4),\"dB\"\n", - "print \"Return loss =\",round(ret_l,3),\"dB (Calculation error in the textbook)\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Reflection loss = 0.0036 dB\n", - "Transmission loss = 0.0036 dB\n", - "Return loss = -1.041 dB (Calculation error in the textbook)\n" - ] - } - ], - "prompt_number": 55 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, Page number 52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import cmath\n", - "import math\n", - "\n", - "#Variable declaration\n", - "l = 10 #length of line(km)\n", - "zsc = complex(1895.47,2234.29) \n", - "zoc = complex(216.99,-143.37)\n", - "f = 1*10**3 #frequency(Hz)\n", - "\n", - "#Calculations\n", - "zo = cmath.sqrt(zsc*zoc)\n", - "x = cmath.sqrt(zsc/zoc)\n", - "t = (1+x)/(1-x)\n", - "gamma = cmath.log(t)/(l*2)\n", - "B = gamma.imag\n", - "w = 2*math.pi*f\n", - "Vp = w/B\n", - "\n", - "#Results\n", - "print \"There is calculation mistake throughout the problem in the textbook\\n\"\n", - "print \"Characteristic impedance =\",zo,\"Ohms\"\n", - "print \"Phase velocity =\",round((Vp/1E+3),3),\"*10^3 m/sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "There is calculation mistake throughout the problem in the textbook\n", - "\n", - "Characteristic impedance = (864.190238563+123.274392427j) Ohms\n", - "Phase velocity = 45.994 *10^3 m/sec\n" - ] - } - ], - "prompt_number": 27 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Microwave_and_Radar_Engineering/Chapter_4.ipynb b/Microwave_and_Radar_Engineering/Chapter_4.ipynb deleted file mode 100755 index 05272d36..00000000 --- a/Microwave_and_Radar_Engineering/Chapter_4.ipynb +++ /dev/null @@ -1,1203 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fddff29c571385d7ad533c0da8d46227c19589926b0642ffe1126b7caf1c9ca6" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 4:Microwave Transmission Lines" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.1, Page number 141" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "d = 0.49 #diameter of inner conductor(cm)\n", - "D = 1.10 #diameter of outer conductor(cm)\n", - "e = 2.3 #polyethylene dielectric\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "\n", - "#Calculations\n", - "L = 2*10**-7*math.log(D/d)\n", - "C = (55.56*10**-12*e)/(math.log(D/d))\n", - "Ro = (60*math.log(D/d))/(math.sqrt(e))\n", - "v = c/(math.sqrt(e))\n", - "\n", - "#Results\n", - "print \"Inductance per unit length is\",round(L,8),\"H/m\"\n", - "print \"Capacitance per unit length is\",round(C,12),\"PF/m\"\n", - "print \"Characteristic impedance is\",round(Ro,3),\"Ohms\"\n", - "print \"Velocity of propagation is\",round(v,3),\"m/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Inductance per unit length is 1.6e-07 H/m\n", - "Capacitance per unit length is 1.58e-10 PF/m\n", - "Characteristic impedance is 31.993 Ohms\n", - "Velocity of propagation is 197814142.019 m/s\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2, Page number 142" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declartion\n", - "R = 0.05 #Ohms/m\n", - "L = 1.6*10**-7 #Inductance(from example 4.1)\n", - "C = 1.58*10**-10 #Capacitance(from example 4.1)\n", - "w = 2*math.pi\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "e = 2.3 #polyethylene dielectric(from example 4.1)\n", - "Pin = 480 #Input power(W)\n", - "l = 50 #line length(m)\n", - "\n", - "#Calculations\n", - "zo=math.sqrt(L/C)\n", - "alpha = R/(2*zo)\n", - "B = w*math.sqrt(L*C)\n", - "Vp = 1/math.sqrt(L*C)\n", - "e = (C/Vp)**2\n", - "Pl = Pin*2*l\n", - "\n", - "#Results\n", - "print \"Attenuation constant =\",round(alpha,5),\"Np/m\"\n", - "print \"Phase constant =\",round(B,8),\"rad/m\"\n", - "print \"Phase velocity =\",round(Vp*10**-6,2),\"*10**-6 m/s\"\n", - "print \"Relative permittivity =\",e\n", - "print \"Power loss =\",round(Pl),\"W\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Attenuation constant = 0.00079 Np/m\n", - "Phase constant = 3e-08 rad/m\n", - "Phase velocity = 198.89 *10**-6 m/s\n", - "Relative permittivity = 6.3108992e-37\n", - "Power loss = 48000.0 W\n" - ] - } - ], - "prompt_number": 67 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.3, Page number 142" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "f = 9.375*10**10 #Frequency(Hz)\n", - "c = 3*10**8 #velocity of light(m/s)\n", - "b_a = 2.3\n", - "\n", - "#Calculations\n", - "lamda = c/f\n", - "#Since b_by_a = 2.3 and b+a lamda_o. Therefore for TE01 mode,\n", - "lamda_c1 = 2*b\n", - "if lamda_c1lamda_o:\n", - " print \"TE10 is a possible mode\"\n", - "fc = c/lamda_c2\n", - "lamda_c3 = (2*a*b)/math.sqrt((a**2)+(b**2)) #for TE11 and TM11 modes\n", - "if lamda_c3lamda_o\n", - "\n", - "#Part(i)\n", - "x = [TE10, TM11, TM21]\n", - "#largest=x[0]\n", - "for large in x:\n", - " if large > lamda_o1:\n", - " largest=large\n", - "print \"Part(i)\\nSince lamda_c =\",(largest),\"which is greater than lamda_o1, only TE10 mode propagates\"\n", - "\n", - "#Part(ii)\n", - "print \"\\nPart(ii)\"\n", - "if TE10>lamda_o2:\n", - " print \"TE10 mode propagates\"\n", - " if TM11>lamda_o2:\n", - " print \"TM11 mode propagates\"\n", - " if TM21>lamda_o2:\n", - " print \"TM21 mode propagates\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Part(i)\n", - "Since lamda_c = 16 which is greater than lamda_o1, only TE10 mode propagates\n", - "\n", - "Part(ii)\n", - "TE10 mode propagates\n", - "TM11 mode propagates\n", - "TM21 mode propagates\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.16, Page number 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "a = 3 #length of rectangular waveguide(cms)\n", - "b = 2 #breadth of rectangular waveguide(cms)\n", - "f = 10.*10**9 #frequency(Hz)\n", - "c = 3.*10**10 #velocity of propagation(cm/s)\n", - "n = 120*math.pi #intrinsic impedance\n", - "\n", - "#Calculations\n", - "lamda_c = (2*a*b)/(math.sqrt(a**2+b**2))\n", - "lamda_o = c/f\n", - "Ztm = n*math.sqrt(1-((lamda_o/lamda_c)**2))\n", - "\n", - "#Result\n", - "print \"Solution obtained in the textbook are incorrect due to calculation mistake in Ztm\"\n", - "print \"characteristic wave impedance =\",round(Ztm,3),\"Ohms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Solution obtained in the textbook are incorrect due to calculation mistake in Ztm\n", - "characteristic wave impedance = 163.242 Ohms\n" - ] - } - ], - "prompt_number": 71 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.17, Page number 152" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "f = 6.*10**9 #frequency(Hz)\n", - "c = 3.*10**10 #velocity of propagation(cm/s)\n", - "\n", - "#Calculations\n", - "fc = 0.8*f\n", - "lamda_c = c/fc\n", - "D = (lamda_c*1.841)/math.pi\n", - "lamda_o = c/f\n", - "lamda_g = lamda_o/(math.sqrt(1-((lamda_o/lamda_c)**2)))\n", - "\n", - "#Results\n", - "print \"diameter of waveguide =\",round(D,4),\"cms\"\n", - "print \"guide wavelength =\",round(lamda_g,3),\"cms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "diameter of waveguide = 3.6626 cms\n", - "guide wavelength = 8.333 cms\n" - ] - } - ], - "prompt_number": 65 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.18, Page number 153" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "import math\n", - "\n", - "#Variable declaration\n", - "a = 1.5 #length of waveguide(cms)\n", - "b = 1 #breadth of waveguide(cms)\n", - "c = 3*10**10 #velocity of propagation\n", - "Er = 4 #dielectric\n", - "f = 6*10**9 #frequency(Hz)\n", - "\n", - "#Calculations and Results\n", - "lamda_c = 2*a\n", - "fc = c/lamda_c\n", - "if flamda_c:\n", - " print \"Since the wavelength of the impressed signal is longer than the cut-off wavelength, there is no propagation of wave\"\n", - "lamda2 = lamda1/math.sqrt(Er)\n", - "if lamda2= \" , round(LI*10**-5/1000,1) , \"e+05 km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Interaction distance >= 4.7 e+05 km\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.7(b)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "D = 0.5*10**-6 #disperison of fiber (ps/nm.km)\n", + "C = 3*10**8 #free space velocity(m/s)\n", + "S0 = 8 #normalized separation of neighnoring solitons\n", + "B = 10*10**9 #data rate (10Gb/sec)\n", + "Lambda = 1550*10**-9 #wavelength (m)\n", + "\n", + "#calculation\n", + "Beta2 = (Lambda/(2*math.pi));\n", + "LT = (C*math.exp(S0))/(16*D*B**2*(Beta2**2)*(S0**2)) #Total transmission distance(km)\n", + "\n", + "#result\n", + "print \"Total transmission distance in km << \" , round(LT/10000),\"km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total transmission distance in km << 28701.0 km\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.7(c), Page Number: 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "S0 = 8 #normalized separation of neighnoring solitons\n", + "B = 10*10**9 #data rate (10Gb/sec)\n", + "\n", + "#calculation\n", + "Ts = 0.881/(S0*B) #FHWM soliton pulse width\n", + "\n", + "#result\n", + "print \"FWHM soliton pulse width = \" , round(Ts*1000*10**9),\"ps\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FWHM soliton pulse width = 11.0 ps\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.7(d), Page Number: 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "S0 = 8 #normalized separation of neighnoring solitons\n", + "\n", + "#calculation \n", + "Ts_TB = 0.881/S0 #fraction of bit slot occupied by a soliton\n", + "\n", + "#result\n", + "print \"Fraction of bit slot occupied by a soliton in % = \" , round(Ts_TB*100),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of bit slot occupied by a soliton in % = 11.0 %\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter13.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter13.ipynb new file mode 100755 index 00000000..a4e60fb6 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter13.ipynb @@ -0,0 +1,288 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c6afe886b35f839c6b21d9b923636eae669b57d891ae4e8ca4f9a2a2af74f6ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Optical networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page Number: 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "N=np.array([5,10,50]) #number of station\n", + "alpha = 0.4 #attanuation (dB/km)\n", + "L_tap = 10 #coupling loss (dB)\n", + "L_thru = 0.9 #coupler throughput(dB)\n", + "Li = 0.5 #intrinsic coupler loss(dB)\n", + "Lc = 1.0 #coupler to fiber loss(dB)\n", + "L = 0.5 #link length(km)\n", + "\n", + "#calculation\n", + "fiber_Loss = alpha *L #fiber loss(dB)\n", + "Pbudget = N*(alpha*L+2*Lc+Li+ L_thru)-alpha*L-2*L_thru +2* L_tap #power budget(dB)\n", + "\n", + "#result\n", + "print \"Fiber loss at 500m =\",fiber_Loss,\"dB\"\n", + "print \"Power budget of three stations 5, 10, 50 respectively = \",Pbudget[0],\"dB\",Pbudget[1],\"dB\",Pbudget[2],\"dB\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fiber loss at 500m = 0.2 dB\n", + "Power budget of three stations 5, 10, 50 respectively = 36.0 dB 54.0 dB 198.0 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page Number: 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import pylab\n", + "\n", + "#variable declaration\n", + "alpha = 0.4 #attanuation (dB/km)\n", + "L_tap = 10 #coupling loss (dB)\n", + "L_thru = 0.9 #coupler throughput(dB)\n", + "Li = 0.5 #intrinsic coupler loss(dB)\n", + "Lc = 1.0 #coupler to fiber loss(dB)\n", + "L = 0.5 #link length(km)\n", + "Pbudget_LED = 38 #power loss of LED\n", + "Pbudget_LASER = 51 #power loss of LASER\n", + "\n", + "#calculation\n", + "N_LED = (Pbudget_LED + alpha*L-2*L_thru-2*L_tap)/(alpha*L+2*Lc+Li+L_thru)\n", + "N_LASER = (Pbudget_LASER + alpha*L-2*L_thru-2*L_tap)/(alpha*L+2*Lc+Li+L_thru)\n", + "\n", + "#result\n", + "print \"Number of stations allowed for given loss of 38 dB with LED source =\",round(N_LED,0)\n", + "print \"Number of stations allowed for given loss of 51 dB with LASER source =\",round(N_LASER,0)\n", + "\n", + "#plot\n", + "x1=arange(0.0, 50.0, 10.0)\n", + "Pbudget1 = x1*(alpha*L+2*Lc+Li+ L_thru)-alpha*L-2*L_thru +2* L_tap\n", + "plot(x1,Pbudget1)\n", + "title('Plot of total power loss as a function of number attached station for linear bus')\n", + "ylabel('Power loss between station 1 and N(dB)')\n", + "xlabel('Number of stations')\n", + "text(30,120,'Linear bus')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of stations allowed for given loss of 38 dB with LED source = 5.0\n", + "Number of stations allowed for given loss of 51 dB with LASER source = 8.0\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 9, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAeYAAAEZCAYAAABCV4YDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcHFW5//HPl7CvAdnDLgZEAwQwIOuwmqtsXi+LcpFV\nUVRUQElEIShqgqDcCxevQSCAEpBV4HdFFjMQ1kBEAgYIIBFIICwJIEYgJM/vj3Mm6XS6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Bs2jB133JEtttiCe++9F4C5c+fyne98hyFDhrDNNtswenSq3HvnnXfYZ5992H777dl6\n6625+eabAZg6dSpbbLEFRx11FIMGDeKll15a5HXPOecctt56a3bccUeee+45AI4++miuv/76+cus\nvPLKALz88svsvvvuDB48mEGDBs2Py8qhDIn5b0BLRGxa/QfMaG9FSZdKmiHp8Yp5P5P0pKTHJN0g\nabWK54ZLekbSU5L2W3JvycyapbIv8syZqS/yqFGN90WWNL80K4m5c+fy0EMPcf7553PWWWcBcMkl\nl9C/f38mTJjAhAkTuPjii5k6dSorrLACN954IxMnTuRPf/oTp5xyyvztPvvss3zta1/jiSeeYMMN\nN1zkdfv378+kSZP4+te/zre+9a35r18dG8BVV13F0KFDefTRR5k0aRLbbrttp/eTNU8ZEvP5wOp1\nnvtZB+vWum3n7cDHImIbYAowHEDSVsBhwFZ5nYsklWH/mFkD5syB0aNTQn744TQu8ujRsMEGi7fd\nf//3fwdgu+22Y+rUqQDcfvvtXHHFFQwePJiddtqJmTNn8uyzzxIRDB8+nG222YZ9992X6dOn8+qr\nrwKw8cYbM6Sdvlif//znATj88MN54IEH2o1pyJAhXHbZZZx11llMmjRpfknayqHw15gj4sJ2nvvv\nDtYdL2mTqnl3VEw+xIK7hx0EjI2IOcBUSc8CQ4AHuxC2mRVEZV/kDTaAG2+ET3yi+7a/3HLLAdCv\nXz8++OCD+fMvvPBC9t1334WWHTNmDK+//jp//vOf6devH5tuuinvvvsuACuttFLDr9lWMl566aWZ\nN28eAPPmzeP9998HYLfddmP8+PHceuutHH300Zx88skceeSRXX+T1qP6eonwWOD/8uP1gcoLOy8B\nA3o8IjPrNnfemZLwyJFw4YULphdXRw2xPvWpT3HRRRfNT9RTpkxh9uzZvP3226y99tr069ePcePG\n8fe//73h17vmmmsAuOaaa9h5552B1Fp74sSJANx8883MmTMHgBdeeIG11lqL448/nuOPP55HH320\nS+/TmqPwJeYlRdLpwPsRcVU7i9X89o0YMWL+45aWFlpaWro1NjNbPJV9kX/849T9qSt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fnvwxFxZ57/z3bWq0y+YuES/CLXsyNiPLAbaSjTMZKOrF5GUguw\nN7BTHvv3UWD5duKvFUvl61ful7nAMvmHxBDSGM37A7d1sH2zPsOJ2ayOiJhFKt0ex4IkMxXYPj8+\nEFimk5sVcEi+JvthYDNSte4fgRPbGnhJGihpxQ629TCwh6QPSepHGmLv7nZfXNoIeC0ifk0ajrGt\nWnpOReOyVYFZEfGupC2BnSo2UblcpfHAYZKWkrQWqeQ+gdql9rZhSftHxB+Ak0nV4GaGrzGb1VJZ\n0jwP+HrF9MXA73M1723AO3XWq95eVDx+gZS0ViUN0fe+pF+Tqrv/LEmkQeQ/W7XuwhuNeFnSMGAc\nKQHeGhG3dPDeWoDvSJoD/AP4Yp4/mnRNfSLph8hXJE0GniZVZ1O9XB5jN3IsN0r6JPBYnvediHhV\n0kdrxB/AKqT9uHyOfZGGdmZ9lYd9NDMzKxBXZZuZmRWIE7OZmVmBODGbmZkViBOzmZlZgTgxm5mZ\nFYgTs5mZWYE4MZuZmRWIE7OZmVmB/H9er5axAg/A2gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3, Page Number: 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "N=np.array([5,10]) #number of station\n", + "alpha = 0.4 #attanuation (dB/km)\n", + "L_thru = 0.9 #coupler throughput(dB)\n", + "Li = 0.5 #intrinsic coupler loss(dB)\n", + "Lc = 1.0 #coupler to fiber loss(dB)\n", + "L = 0.5 #link length(km)\n", + "\n", + "#calculation\n", + "DR = (N-2)*(alpha*L+2*Lc+Li+L_thru) #dynamic range(dB)\n", + "\n", + "#result\n", + "print \"Dynamic range for number of station 5 = \",DR[0],\"dB\"\n", + "print \"Dynamic range for number of station 10 = \",DR[1],\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dynamic range for number of station 5 = 10.8 dB\n", + "Dynamic range for number of station 10 = 28.8 dB\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4, Page Number: 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "N1=10 #number of station\n", + "N2=50 #number of station\n", + "alpha = 0.4 #attanuation (dB/km)\n", + "L = 0.5 #link length(km)\n", + "Lc = 1.0 #coupler to fiber loss(dB)\n", + "Lexcess1 = 0.75 #excess loss for 10 station\n", + "Lexcess2 = 1.25 #excess loss for 50 station\n", + "\n", + "#calculation\n", + "Ps_Pr1 = Lexcess1+alpha*2*L+2*Lc+10*math.log10(N1) #power margin for 10 station(dB)\n", + "Ps_Pr2 = Lexcess2+alpha*2*L+2*Lc+10*math.log10(N2) #power margin for 50 station(dB)\n", + "\n", + "#result\n", + "print \"Power margin between transmitter and receiver for 10 station =\",round(Ps_Pr1,1),\"dB\"\n", + "print \"Power margin between transmitter and receiver for 50 station =\",round(Ps_Pr2,1),\"dB\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power margin between transmitter and receiver for 10 station = 13.2 dB\n", + "Power margin between transmitter and receiver for 50 station = 20.6 dB\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5, Page Number: 477" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "L_OM2 = 40 #Length of OM2 fiber(meter)\n", + "L_OM3 = 100 #Length of OM3 fiber(meter)\n", + "BW_OM2 = 500*10**6 #bandwidth of OM2 fiber(MHz)\n", + "BW_OM3 = 2000*10**6 #bandwidth of OM3 fiber(MHz)\n", + "\n", + "#calculation\n", + "Lmax = L_OM2*(BW_OM3/BW_OM2)+L_OM3 #Maximum link length(meter)\n", + "\n", + "#result\n", + "print \"Maximum link length = \",Lmax,\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum link length = 260 m\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter2.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter2.ipynb new file mode 100755 index 00000000..5cd59824 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter2.ipynb @@ -0,0 +1,231 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:161f2af28057c1d070e2d9170a764b41538f5b5faa1a2af8f60c6674471beb1e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Optical fibers: Structures, Waveguiding, and Fabrication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page Number: 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.48 #core refractive index for glass n1\n", + "n2 = 1.00 #core refractive index for air n2\n", + "\n", + "#calculation\n", + "phic = math.asin(n2/n1) #Interflaction reflaction angle(degree)\n", + "\n", + "#result\n", + "print \"Total Interflaction reflaction angle = \",round(phic*57.3,1),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Interflaction reflaction angle = 42.5 degree\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page Number: 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1=1.48 #core refractive index\n", + "n2=1.46 #cladding refractive index\n", + "\n", + "#calculation\n", + "phiC=math.degrees(math.asin(n2/n1)) #critical angle (degree)\n", + "NA=math.sqrt((n1*n1)-(n2*n2)) #numerical apperture\n", + "phiO=math.degrees(math.asin(NA)) #maximum entrance angle (degree)\n", + "\n", + "#result\n", + "print \"Critical angle =\" ,round(phiC,1),\"degree\"\n", + "print \"Numerical apperture =\" ,round(NA,3)\n", + "print \"Acceptance angle =\" ,int(phiO),\"degree\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 80.6 degree\n", + "Numerical apperture = 0.242\n", + "Acceptance angle = 14 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page Number: 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "V=26.6 #normalized frequency\n", + "lamda=1300*1e-9 #wavelength(nm)\n", + "a=25*1e-6 #core radius(um)\n", + "\n", + "\n", + "#caculation\n", + "NA=(V*lamda)/(2*math.pi*a) #numerical aperture\n", + "\n", + "#result\n", + "print \"Numerical aperture =\",round(NA,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture = 0.22\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 , Page Number: 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + " \n", + "#variable declaration\n", + "V2 = 22 #normalized frequency2\n", + "V1=39 #normalized frequency1\n", + "p=1.4 \n", + "\n", + "#calculation\n", + "M1=(V1**2)/2 #modes in fiber1\n", + "M2=V2**2/2 #modes in fiber2\n", + "Pcladd_P1 = (4/3)*(M1**(-0.5))*p\n", + "Pcore_P1= 1-Pcladd_P1\n", + "Pcladd_P2 = (4/3)*(M2**(-0.5))*p\n", + "Pcore_P2= 1-Pcladd_P2 \n", + "\n", + "#result\n", + "print 'case1 : Total number of modes',M1\n", + "print 'case1 : Percent age of power propagates in the cladding',int(Pcladd_P1 *100)\n", + "print 'case2 : Total number of modes',M2\n", + "print 'case2 : Percent age of power propagates in the cladding',int(round(Pcladd_P2 *100,0)) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "case1 : Total number of modes 760\n", + "case1 : Percent age of power propagates in the cladding 5\n", + "case2 : Total number of modes 242\n", + "case2 : Percent age of power propagates in the cladding 9\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 , Page Number: 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "#variable declaration\n", + "lamda=1300*1e-9 #wavelength(nm)\n", + "Lp=8*1e-2 #beat length(cm)\n", + "\n", + "#calculation\n", + "Bf=lamda/Lp #modal birefringence\n", + "bita=(2*math.pi)/Lp #birefringence(1/m)\n", + "\n", + "#result\n", + "print \"Modal birefringence =\",round(Bf,7)\n", + "print \"Birefringence Bita =\",bita,\"1/m\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modal birefringence = 1.62e-05\n", + "Birefringence Bita = 78.5398163397 1/m\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter3.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter3.ipynb new file mode 100755 index 00000000..83e3dde2 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter3.ipynb @@ -0,0 +1,358 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c31c7734af7a6179a63aac4a4be2acaa7976b91a58a8c77446fe6a6c4b3a076e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Signal degradation in optical fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page Number: 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Z1 = 1.0 #distance (km)\n", + "Z2 = 2.0 #distance (km)\n", + "alpha_in_dB_per_km = 3.0 #loss(dB/km)\n", + "\n", + "#calculation\n", + "R1 = (alpha_in_dB_per_km *Z1)/10.0 \n", + "R2 = (alpha_in_dB_per_km *Z2)/10.0\n", + "P0_Pz1 = (10**R1) #power loss at 1 km\n", + "P0_Pz2 = (10**R2) #power loss at 2 km\n", + "Pz_P01 = 1-(1/P0_Pz1)\n", + "Pz_P02 = 1-(1/P0_Pz2)\n", + "\n", + "#result\n", + "print \"Optical signal power decresed for 1km = \" , round(Pz_P01*100,0) , \"%\"\n", + "print \"Optical signal power decresed for 2km = \" , round(Pz_P02*100,0) , \"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Optical signal power decresed for 1km = 50.0 %\n", + "Optical signal power decresed for 2km = 75.0 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page Number: 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Pin = 200*10**-6 #power launched into the fiber(uW)\n", + "alpha = 0.4 #attenuation (dB/KM)\n", + "z = 30 #optical fiber length 30 KM\n", + "\n", + "#calculation\n", + "Pin_dBm = 10*(math.log10(Pin/10**-3)) #input power (dBm)\n", + "Pout_dBm = 10*(math.log10(Pin/10**-3))-alpha*z #output power(dBm)\n", + "Pout = 10**(Pout_dBm/10)\n", + "\n", + "#result\n", + "print \"Input power = \" , round(Pin_dBm,1),\"dBm\"\n", + "print \"Output power = \" , round(Pout_dBm,1),\"dBm\"\n", + "print \"Output power = \" , round(Pout*10**3,1),\"um\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input power = -7.0 dBm\n", + "Output power = -19.0 dBm\n", + "Output power = 12.6 um\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page Number: 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha_0 = 1.64 #attenuation at Lam_bda_0 in dB/KM\n", + "Lam_bda_0 = 850*10**-9 #wavelength 850 nm\n", + "Lam_bda1 = 1310*10**-9 #wavelength 1350 nm\n", + "Lam_bda2 = 1550*10**-9 #waavelength 1550 nm \n", + "\n", + "#calculation\n", + "alpha_Lambda1 = alpha_0*((Lam_bda_0/Lam_bda1)**4) #rayleigh scattering loss1(dB/Km)\n", + "alpha_Lambda2 = alpha_0*((Lam_bda_0/Lam_bda2)**4) #rayleigh scattering loss2(dB/Km)\n", + "\n", + "#result\n", + "print \"Rayleigh scattering loss alpha at 1310 nm = \" , round(alpha_Lambda1,3),\"dB/Km\"\n", + "print \"Rayleigh scattering loss alpha at 1550 nm = \" , round(alpha_Lambda2,3),\"dB/Km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rayleigh scattering loss alpha at 1310 nm = 0.291 dB/Km\n", + "Rayleigh scattering loss alpha at 1550 nm = 0.148 dB/Km\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page Number: 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "alpha = 2 #graded index profile\n", + "n2 = 1.5 #cladding\n", + "Lam_bda = 1.3*10**-6 #wavelength\n", + "R = 0.01 #bend radius of curvature\n", + "a = 25*10**-6 #core radius\n", + "delta = 0.01 #core cladding index profile\n", + "k = 4.83*10**6 #propagation constant\n", + "\n", + "#calculation\n", + "no_of_modes= -10000.0 #number of modes decreased by 50% in greded index fibre\n", + "part1 = (alpha+2)/(2*alpha*delta)\n", + "part2 = (1-no_of_modes)/part1 #Right side of equation\n", + "part3 = (2*a/R)+math.floor((3/(2*n2*k*R))**(2/3))*100 #left side of equation\n", + "\n", + "#result\n", + "print \"From equation part2 =\",round(part2,1),\"= part3 =\",round(part3,1)\n", + "print \"Radius of curvature = \", round(R*100,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From equation part2 = 100.0 = part3 = 100.0\n", + "Radius of curvature = 1.0 cm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page Number: 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "C = 3*10**8 #free space velocity(m/s) \n", + "n1 = 1.48 #core refractive index\n", + "n2 = 1.465 #cladding refractive index\n", + "delta = 0.01 #index difference\n", + "L = 10**3 #fiber length (Km)\n", + "\n", + "#calculation\n", + "deltaT = (L*(n1**2)/(C*n2))*delta #pulse broadening(ns/Km)\n", + "\n", + "#result\n", + "print \"Pulse broadening = \" , round((deltaT/L)*10**12,0),\"ns/Km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pulse broadening = 50.0 ns/Km\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page Number: 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "n1 = 1.48 #core refractive index\n", + "n2 = 1.465 #cladding refractive index\n", + "delta = 0.01 #index difference\n", + "C =3*(10**8) #free space velcotiy(m/s)\n", + "\n", + "#calculation\n", + "BL = (n2/(n1**2))*(C/delta) #bit rate distance product(Mb/s-km)\n", + "\n", + "#result\n", + "print \"Bandwidth distance at pulse spreding of 50ns/km = \" , round(BL*10**-9),\"Mb/s-km\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth distance at pulse spreding of 50ns/km = 20.0 Mb/s-km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page Number: 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lamda = 800*10**-9 #Wavelength (m)\n", + "sigma_Lamda_LED = 40*10**-9 #spectral width (m)\n", + "mat_dispersion = 0.00011 #material dispersion \n", + "\n", + "#calculation\n", + "pulse_spread = sigma_Lamda_LED*mat_dispersion #pulse spread(ns/km)\n", + "\n", + "#result\n", + "print \"Material dispersion =\" ,round(pulse_spread*10**12,1),\"ns/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion = 4.4 ns/km\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page Number: 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "n2 = 1.48 #index of cladding\n", + "delta = 0.002 #index difference\n", + "Lam_bda = 1320*10**-9 #Wavelength (nm)\n", + "V_dVb_dV = 0.26 #The value in square brackets for v = 2.4\n", + "C =3*10**8 #velocity of light in free space\n", + "\n", + "#calculation\n", + "Dwg_Lamda = -(((n2*delta)/C)*(1/Lam_bda))*V_dVb_dV #waveguide dispersion(ps/nm*km)\n", + "\n", + "#result\n", + "print \"Waveguide dispersion = \" ,round(Dwg_Lamda*10**6,1),\"ps/(nm*km)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Waveguide dispersion = -1.9 ps/(nm*km)\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter4.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter4.ipynb new file mode 100755 index 00000000..67742607 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter4.ipynb @@ -0,0 +1,356 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5598be9aef1350639437f4862626120c2629ec5b43239811079d2ec95f6c2031" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Optical Sources" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1, Page Number: 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "m = 9.11*1e-31 #Electron rest mass (kg)\n", + "me = 6.19*10**-32 #Effective electron mass = 0.068m (kg)\n", + "mh = 5.10*10**-31 #Effective hole mass = 0.56m (kg) \n", + "Eg = 1.42*1.60218*1e-19 #bandgap energy (volts)\n", + "kB = 1.38054*1e-23 #Boltzman's constant\n", + "T = 300 #room temperature (kelvin)\n", + "h = 6.6256*1e-34 #Planck's constant\n", + "\n", + "#calculation\n", + "K = 2.0*((2.0*math.pi*kB*T/(h**2.0))**(1.5))*((me*mh)**(0.75)) #characteristic constant of material\n", + "ni = K*(math.exp(-Eg/(2.0*kB*T))) #intrinsic carrier concentration(1/m^3)\n", + "\n", + "#result\n", + "print \"Instrinsic carrier concentration = \",round(ni*10**-12+0.07,2)*1e12,\"1/m^3\",\"=\",round(ni*10**-12+0.07,2)*10**6 ,\"1/cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Instrinsic carrier concentration = 2.62e+12 1/m^3 = 2620000.0 1/cm^3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page Number: 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "x = 0.07 #compositional parameter of GaAlAs\n", + "\n", + "#calculation\n", + "Eg = 1.424+1.266*x+0.266*x**2 #energy gap(eV)\n", + "Lam_bda = 1.240/Eg #peak emission wavelength(um) \n", + "\n", + "#result\n", + "print \"Bandgap energy Eg = \" ,round(Eg,2),\"eV\" \n", + "print \"Peak emission Wavelength lam_bda = \" ,round(Lam_bda,2),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandgap energy Eg = 1.51 eV\n", + "Peak emission Wavelength lam_bda = 0.82 um\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page Number: 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "y = 0.57 #compositional parameter of InGaAsP\n", + "\n", + "#calculation\n", + "Eg = 1.35-0.72*y+0.12*(y**2) #energy gap(eV)\n", + "Lam_bda = 1.240/Eg #peak emission wavelength(um) \n", + "\n", + "#result\n", + "print \"Bandgap energy Eg = \" ,round(Eg,2),\"eV\" \n", + "print \"Peak emission wavelength Lam_bda = \" ,round(Lam_bda,2),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandgap energy Eg = 0.98 eV\n", + "Peak emission wavelength Lam_bda = 1.27 um\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page Number: 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "tuo_r = 30.0 #radiative re-combination (ns)\n", + "tuo_nr =100.0 #non-radiative re-combination (ns)\n", + "h = 6.6256*1e-34 #Plank's constant (J.s)\n", + "C = 3.0*1e8 #free space velocity (m/sec)\n", + "q = 1.602*1e-19 #electron charge (coulombs)\n", + "I = 0.040 #drive current (Amps)\n", + "Lam_bda = 1.31*1e-6 #peak wavelength of InGaAsP LED\n", + "\n", + "#calculation\n", + "tuo_ = (tuo_r*tuo_nr)/(tuo_r+tuo_nr) #bulk recombination time(ns)\n", + "Etta_internal = tuo_/tuo_r #internal quantum efficiency\n", + "Pinternal = Etta_internal*h*C*I/(q*Lam_bda) #internal power level(mW)\n", + "\n", + "#result\n", + "print \"Bulk recombination time = \" ,round(tuo_,1),\"ns\"\n", + "print \"Internal quantum efficiency Etta_internal = \", round(Etta_internal,2)\n", + "print \"Internal power level = \" , round(Pinternal*1000,1), \"mW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bulk recombination time = 23.1 ns\n", + "Internal quantum efficiency Etta_internal = 0.77\n", + "Internal power level = 29.1 mW\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6, Page Number: 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "n = 3.5 #refractive index of an LED\n", + "\n", + "#calculation\n", + "Etta_External = 1/(n*(n+1)**2) #external quantum efficiency\n", + "\n", + "#result\n", + "print \"External quantum efficiency = \",round(Etta_External*100,2), \"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "External quantum efficiency = 1.41 %\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page Number: 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "L = 500*1e-6 #Laser diode length (meters)\n", + "R1 = 0.32 #reflection co-efficient value of one end \n", + "R2 = 0.32 #reflection co-efficient value of another end \n", + "alpha_bar =10*100 #absorption co-efficient(1/cm)\n", + "\n", + "#calculation\n", + "alpha_end = (1/(2*L))*(math.log(1/(R1*R2))) #mirrorloss in the lasing cavity\n", + "alpha_threshold = alpha_bar+alpha_end #the lasing threshold(1/cm)\n", + "\n", + "\n", + "#result\n", + "print \"The lasing threshold gain = \" , round(alpha_threshold/100),\"1/cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lasing threshold gain = 33.0 1/cm\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page Number: 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lam_bda = 850*1e-9 #Emission wavelength of LASER diode(nm)\n", + "n = 3.7 #refractive index of LASER diode\n", + "L = 500.0*1e-6 #length of LASER diode(um)\n", + "C = 3*1e8 #velocity of Light in free space(m/s)\n", + "Half_power = 2*1e-9 #half power point 3 (nm)\n", + "\n", + "#calculation\n", + "delta_frequency = C/((2*L)*n) #frequency spacing(GHz)\n", + "delta_Lamda = (Lam_bda**2)/((2*L)*n) #wavelength spacing(nm)\n", + "sigma = math.sqrt(-(Half_power**2)/(2*math.log(0.5))) #spectral width of gain(nm)\n", + "\n", + "#result\n", + "print \"Freqency spacing = \" ,round(delta_frequency/1e9),\"GHz\"\n", + "print \"Wavelegth spacing = \" , round(delta_Lamda/1e-9,2),\"nm\"\n", + "print \"Spectral width of gain = \" , round(sigma/1e-9,2),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Freqency spacing = 81.0 GHz\n", + "Wavelegth spacing = 0.2 nm\n", + "Spectral width of gain = 1.7 nm\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page Number: 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lam_bda = 900*10e-9 # wavelength of light emitted by laser diode(nm)\n", + "L = 300*10e-6 #length of laser chip(um)\n", + "n = 4.3 #refractive index of the laser material\n", + "\n", + "#calculation\n", + "m = 2*L*n/Lam_bda #number of half-wavelengths\n", + "delta_Lambda = (Lam_bda**2)/(2*L*n) #wavelength spacing(nm)\n", + "\n", + "#result\n", + "print \"Number of half-wavelength spanning the region betwen mirror = \" , round(m)\n", + "print \"Wavelength spacing between lasing modes = \" , round(delta_Lambda*1e8,1),\"nm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of half-wavelength spanning the region betwen mirror = 2867.0\n", + "Wavelength spacing between lasing modes = 0.3 nm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter5.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter5.ipynb new file mode 100755 index 00000000..e65f2645 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter5.ipynb @@ -0,0 +1,270 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:36c911cea36773d62dbfdfd257319508866d11b39912270afd0ba3c55a7245e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chepter 5: Power launching and coupling" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page Number: 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "phi = 0 #lateral coordinate(degree)\n", + "Half_power = 10 #half power beam width(degree)\n", + "\n", + "#calculation\n", + "teta = Half_power/2\n", + "teta_rad = teta/57.3\n", + "L = math.log(0.5)/math.log(math.cos(teta_rad)) #power distribution co-efficient\n", + "\n", + "#result\n", + "print \"Power distribution co-efficient L = \" ,round(L)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power distribution co-efficient L = 182.0\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page Number: 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "rs = 35.0*1e-6 #the source radius (meter)\n", + "a = 25.0*1e-6 #the core radius of stepindex fiber (meter)\n", + "NA = 0.20 #the numerical aperture value\n", + "Bo = 150.0*1e4 #radiance ( W/cm^2 * sr)\n", + "\n", + "#calculation\n", + "Ps = ((math.pi**2)*(rs**2))*Bo #power emitted by the source\n", + "PLED_step = Ps*(NA**2) #for larger core fiber(W)\n", + "PLED_step1 = (((a/rs)**2)*Ps)*(NA**2) #for smaller core fiber at the end face(W)\n", + "\n", + "#result\n", + "print \"For larger core fiber optical power emitted from the LED light source = \" , round(PLED_step*1e3,3),\"mW\"\n", + "print \"For smaller core fiber then area optical power coupled to step index fiber on W = \" , round(PLED_step1*1e3,3),\"mW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For larger core fiber optical power emitted from the LED light source = 0.725 mW\n", + "For smaller core fiber then area optical power coupled to step index fiber on W = 0.37 mW\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page Number: 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "n1 = 3.6 #refractive index of optical source\n", + "n = 1.48 #refractive index of silica fiber\n", + "\n", + "#calculation\n", + "R = ((n1-n)/(n1+n))**2 #fresnel reflection\n", + "L = -10*(math.log10(1-R)) #power loss(dB)\n", + "\n", + "#result\n", + "print\"Fresnel reflection = \",round(R,3),\" = \",round(R*100,1),\"%\"\n", + "print\"Power loss = \" , round(L,2),\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fresnel reflection = 0.174 = 17.4 %\n", + "Power loss = 0.83 dB\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page Number: 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "a =1*1e-6 #core radii (meters)\n", + "d = 0.3*a #axial offset\n", + "\n", + "#calculation\n", + "PT_P = (2/math.pi)*(math.acos(d/(2*a))-(1-(d/(2*a))**2)**0.5*(d/(6*a))*(5-0.5*(d/a)**2)) \n", + "PT_P_dB = 10*(math.log10(PT_P)) #power coupled between two fibers(dB)\n", + "\n", + "#result\n", + "print \"Power coupled between two graded index fibers = \" , round(PT_P_dB,2),\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power coupled between two graded index fibers = -1.26 dB\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page Number: 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "V = 2.4 #normalized frequency\n", + "n1 = 1.47 #core refractive index\n", + "n2 = 1.465 #cladding refractive index\n", + "a = (9.0/2.0)*10**-6 #core radii (meters)\n", + "d = 1*10**-6 #lateral offset (meters)\n", + "\n", + "#calculation\n", + "W = a*(0.65+1.619*V**(-1.5)+2.879*V**-6) #mode field diameter (um)\n", + "Lsm = -10*(math.log10(math.exp(-(d/W)**2))) #Loss between identical fibers(dB)\n", + "\n", + "#result\n", + "print \"Mode field diameter = \" , round(W*1e6,2),\"um\"\n", + "print \"Loss between single mode fibers due to lateral misalignment = \" , round(Lsm,2),\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mode field diameter = 4.95 um\n", + "Loss between single mode fibers due to lateral misalignment = 0.18 dB\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page Number: 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declartion\n", + "V = 2.4 #normalized frequency\n", + "n1 = 1.47 #core refractive index\n", + "n2 = 1.465 #cladding refractive index\n", + "a = (9.0/2.0)*1e-6 #coreradii in meters\n", + "d = 1*1e-6 #lateral offset (m)\n", + "teta = 1 #in (degrees)\n", + "teta = 1/57.3 #in (radaians) \n", + "\n", + "#calculation\n", + "W = a*(0.65+1.619*V**(-1.5)+2.879*V**-6) #mode field diameter\n", + "Lam_bda = 1300.0*10**-9 #wavelength (m)\n", + "Lsm_ang = -10*(math.log10(math.exp(-(math.pi*n2*W*teta/Lam_bda)**2))) #(dB)\n", + "\n", + "#result\n", + "print \"Loss between single mode fibers due to angular misalignment = \",round(Lsm_ang,2),\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss between single mode fibers due to angular misalignment = 0.41 dB\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter6.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter6.ipynb new file mode 100755 index 00000000..0d75f992 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter6.ipynb @@ -0,0 +1,321 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1d457d6d35a4d96cef8f5c393fb2ad194f0093b445ed9ceab1c1a00b3a80e8fa" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Photodetectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page Number: 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.625*10**-34 #planks constant(J*s)\n", + "C = 3*10**8 #free space velocity(m/s)\n", + "Eg = 1.43*1.6*10**-19 #(joules)\n", + "\n", + "#calculation\n", + "LambdaC = h*C/Eg #wavelength(nm)\n", + "\n", + "#result\n", + "print \"Maximum wavelength for photodiode GaAs = \", round(LambdaC*10**9,0),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum wavelength for photodiode GaAs = 869.0 nm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page Number: 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ip_q = 5.4*10**6 #electron-hole pair generated\n", + "Pin_hv = 6*10**6 #number of incident photons\n", + "\n", + "#calculation\n", + "etta = Ip_q / Pin_hv #Quantum efficiency\n", + "\n", + "#result\n", + "print \"Quantum efficiency at 1300nm =\" ,etta*100,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantum efficiency at 1300nm = 90.0 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3, Page Number: 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "R = 0.65 #Responsivity of photodiode(A/W)\n", + "Pin = 10*10**-6 #Optical power level(watts)\n", + "\n", + "#calculation\n", + "Ip = R*Pin #Photocurrent(A)\n", + "\n", + "#result\n", + "print \"Photocurrent =\",Ip*10**6,\"uA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Photocurrent = 6.5 uA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page Number: 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lambda = 1300*10**-9 #Wavelength (m)\n", + "C = 3*10**8 #freespace velocity(m/s)\n", + "q = 1.6*10**-19 #Charge (coulombs)\n", + "etta = 0.9 #Quantum efficiency\n", + "h = 6.625*10**-34 #planks constant(J*s)\n", + "Eg = 0.73 #energy gap(eV)\n", + "\n", + "#calculation\n", + "R = (etta*q*Lambda)/(h*C) #responsivity(A/W)\n", + "LambdaC = 1.24/ Eg #cut\udbc0\udc00off wavelength(meters)\n", + "\n", + "#result\n", + "print \"Responsivity = \",round(R,2),\"A/W\"\n", + "print \"Cutoff wavelength = \",round(LambdaC,1),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Responsivity = 0.94 A/W\n", + "Cutoff wavelength = 1.7 um\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page Number: 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "etta = 0.65 #Quantum efficiency\n", + "C = 3*10**8 #freespace velocity(m/s)\n", + "Lambda = 900*10**-9 #Wavelength (m)\n", + "q = 1.6*10**-19 #Charge (coulombs)\n", + "h = 6.625*10**-34 #planks constant(J*s)\n", + "Pin = 0.5*10**-06 #optical power(W)\n", + "Im = 10*10**-06 #multiplied photocurrent(uA)\n", + "\n", + "#calculation\n", + "Ip = ((etta*q*Lambda)/(h*C))*Pin #photocurrent(uA)\n", + "M = Im/Ip #multiplication\n", + "\n", + "#result\n", + "print \"Primary photocurrent = \",round(Ip*10**6,3),\"uA\"\n", + "print \"Primary photocurrent is multiplied by \" ,round(M+1,0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary photocurrent = 0.235 uA\n", + "Primary photocurrent is multiplied by 43.0\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page Number: 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Lambda = 1330.0*10**-9 #Wavelength (m)\n", + "ID = 4.0*10**-9 #photdiode current(nA)\n", + "etta = 0.90 #Quantum efficiency\n", + "RL = 1000.0 #load resistance(ohms)\n", + "Pin = 300.0*10**-9 #incident optical power(nW)\n", + "Be = 20.0*10**6 #reciver bandwidth\n", + "q = 1.6*10**-19 #Charge (coulombs)\n", + "h = 6.625*10**-34 #planks constant(J*s)\n", + "T = 283.0 #room temperature(kelvin)\n", + "KB = 1.38*10**-23 #boltzmann's constant\n", + "\n", + "#calculation\n", + "Ip = (etta*q*Pin*1.3*10**-6)/(h*C) #primary current(uA)\n", + "Ishot = 2*q*Ip*Be #mean-squre shot noise current(A^2)\n", + "IDB = 2*q*ID*Be #mean-squre dark current(A^2)\n", + "IT = (4*KB*T)*Be/RL #mean-sqare thermal current(A^2)\n", + "\n", + "#result\n", + "print \"Primary current = \",round(Ip*10**6,3),\"uA\"\n", + "print \"Mean-squre shot noise current = \",round(Ishot*10**18,2)*10**-18,\"A^2 OR = \",round(math.sqrt(Ishot)*10**9,2),\"nA\"\n", + "print \"Mean-squre dark current = \",round(IDB*10**20,2)*10**-20,\"A^2 OR = \",round(math.sqrt(IDB)*10**9,2),\"nA\"\n", + "print \"Mean-squre thermal current = \",round(math.sqrt(IT)*10**9,0),\"nA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current = 0.283 uA\n", + "Mean-squre shot noise current = 1.81e-18 A^2 OR = 1.34 nA\n", + "Mean-squre dark current = 2.56e-20 A^2 OR = 0.16 nA\n", + "Mean-squre thermal current = 18.0 nA\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page Number: 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "CP = 3*10**-12 #photodiode capacitance(pF)\n", + "CA = 4*10**-12 #amplifier capacitance(pF)\n", + "CT = CP+CA #total capacitance\n", + "RT1 = 1000 #load resistance 1(ohms)\n", + "RT2 = 50 #load resistance 2(ohms)\n", + "\n", + "#calculation\n", + "BC1 = 1/(2*math.pi*RT1*CT) #circuit bandwidth 1 (Hz)\n", + "BC2 = 1/(2*math.pi*RT2*CT) #circuit bandwidth 2 (Hz)\n", + "\n", + "#result\n", + "print \"Circuit bandwidth for 1k ohms = \",round(BC1*10**-6,0),\"MHz\"\n", + "print \"Circuit bandwidth for 50 ohms = \",round(BC2*10**-6,0), \"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit bandwidth for 1k ohms = 23.0 MHz\n", + "Circuit bandwidth for 50 ohms = 455.0 MHz\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter7.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter7.ipynb new file mode 100755 index 00000000..4d206c90 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter7.ipynb @@ -0,0 +1,287 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:eea7d16ffc875a17e4b117d7d13d2969329f1fcef753cbcc5ca0b70025950287" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Optical receiver operation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page Number: 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "bon = 1.0 #signal on level\n", + "boff = 0.0 #signal off level\n", + "sigma_on = 1.0 #variance sigma-on level\n", + "sigma_off = 1.0 #variance sigma-on level\n", + "\n", + "#calculation\n", + "Q = (bon - boff)/(sigma_on + sigma_off) #parameter value\n", + "Vth = bon-Q*sigma_on #optimum decision threshold\n", + "\n", + "#result\n", + "print \"Q parameter value = \" ,Q\n", + "print \"Optimum decision threshold Vth = \",Vth" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q parameter value = 0.5\n", + "Optimum decision threshold Vth = 0.5\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page Number: 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import pylab\n", + "import numpy as np\n", + "import scipy as sp\n", + "from scipy import special\n", + "\n", + "#variable declaration\n", + "Q = 6.0 #parameter value from figure\n", + "\n", + "#calculation\n", + "Pe = (1.0/2.0)*(1-math.erf(Q/math.sqrt(2.0))) #probability of error \n", + "S_N_dB = 10*math.log10(2*Q) #signal to naoise ratio (dB)\n", + "\n", + "#result\n", + "print \"Probability of error = \" ,round(Pe,10)\n", + "print \"Signal to naoise ratio =\",round(S_N_dB,1),\"dB\"\n", + "\n", + "#plot\n", + "q1=arange(0.0, 8.0, 0.5)\n", + "Pe1 = (1.0/2.0)*(1-sp.special.erf(q1/sqrt(2.0))) \n", + "plot(-q1+8,-Pe1)\n", + "ylabel('BER (Pe)')\n", + "xlabel('factor Q')\n", + "title('Plot of BER (Pe) versus the factor Q')\n", + "text(6,-0.3,'Q=5.99 for')\n", + "text(6,-0.35,' Pe=10^-9') " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error = 1e-09\n", + "Signal to naoise ratio = 10.8 dB\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 7, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VOX59/HPRYKgsoRFlgAalF12FKyyBAXc0bYqoLUU\nl1pbl/rzUbFu6GPV1sdaq9VflWrViktREXcpGrVWxQVUkEVUlKAJCrIobsD1/HFOcBhmMlkmOTOT\n7/v1mldm5tznPtdMkrnmXs59zN0RERFJpFHUAYiISOZSkhARkaSUJEREJCklCRERSUpJQkREklKS\nEBGRpJQkREQkKSWJHGVmJWZ2cj0d63QzKzezDWbWqj6OmSKeJma2yMza17KeM8zsmnTFlYnMbJqZ\n3Z2munY2s0fNbJ2Z3Z+OOiV6ShJZzMxWmNkmM9toZmVmdoeZ7Rpu9vCWqo4iM9tqZjX6WzCzxsB1\nwEHu3sLdv0hS/8aYOP9qZvlJXkfF7S/htl+Y2ZbwufVmtsDMDk8R1i+B5929PKzjH2b2bVjHGjN7\nxsx6VuHl3QacYGa7Vec9yVRmVmxmK+OeTufZ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Pb9t2//33M2DAAPr27cvU\nqVMTHuO7775jzJgxDBo0iH/9q/rXZcukcYlKk4S7r4i/AV8CH4X3RUTqjbvzk5/8hJ/85CcsW7aM\n9957j6+//przzz+/ynWYGTNmzGD+/PnMnz+ftm3b7lDmtttuo1GjRrz99tvMmTOHc88N5vCsWbOG\n888/n2effZaFCxdSVlbGs88+u8P+b775JmbG/PnzOfbYY6sU19aYQYh994X162Hp0iq/rDqTagrs\nj8ysxMweMrPBZrYQWAisNrND6ydEEZHAs88+y84778zkyZMBaNSoEddffz133XUXmzZtqnI9qc6r\nWrx4MaNHjwZgt912o6CggNdee40PPviA7t2706ZNGwAOOuggHnzwwe32Xb16NSeeeCKvvfYagwYN\n4oMPPmDu3LkMHjyY/v37c/LJJ29r+RQVFTF16lSGDBnCzJkzt9WRSdeYSNXddBNwFXAvwbWuT3H3\nDsAI4OqaHjRc1mOOmS0zs2fMrCBBmaZm9qqZLTCzhWY2rabHE5HcsGjRIoYMGbLdc82bN6eoqIjl\ny5ezbNmybd1IsbfBgwezYcOGbftMnjyZQYMGceWVVyY8zoABA5g9ezZbtmzhww8/5I033qC0tJTu\n3buzdOlSPvroIzZv3sysWbNYuXLldvu2a9eO6dOnM2LECObPn09hYSFTpkzhgQce4O2332bz5s3c\ncsstQNCqadu2LW+88QbHHXfcdvVkSpdTqoHrPHd/BsDMrnD3VwDcfYmZ1eYU56nAHHf/o5ldED7e\nrnPP3b8xs9HuvsnM8oH/mNmT7v5qLY4rIlnMrNKTg+nRowfz58+vtMw999xDYWEhX375JT/96U+5\n++67OfHEE7crc9JJJ7F48WL22Wcf9thjD/bff3/y8vIoKCjglltuYcKECTRq1Ij999+f999/f4dj\nxLZUli5dSteuXenWrRsQJKi//vWvnH322QBMmDAhYZzFxbB4cXAWdseOlb6kOpUqScQmgm/SeNzx\nwKjw/p1ACXFJAsDdK9qPOwGNgQyZOSwiUejTp8923TIAGzZsoKysjJ49e7J06VImTpyYcN+SkhJa\ntmxJYWEhAM2aNeP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4+5pq7NPI3bfGPD6DYKmRY9z9GzMbS3Cy094xK+CK\n1Au1JERimNn/AnsCT4Wtgn3N7L/h6qMvVSwNEV5M6P+FF215y8zOMLMzCRZMe87M5oblJoUX9HnH\nzK6JOc6X4f4LgPgL6JwPnOHu3wC4+xyC9f+TLsImUlfUkhCJE3sRnnBdo03uvsXMxgC/cvdjzOx0\nYDQw0d23mlkrd/8ibt9C4GWCxejWAc8Af3H3R8xsK8G13WfGHbsFweJrbeKePwvo6u7n1PXrF4mV\ntWs3idSTAuAuM+tGsP5Sxf/MQcAtFd1E7p7oolL7As9VdD2Z2T3ASOARYAvBirtVlenLjUuOUneT\nSOX+LzA3vOzseCB2UDrVB7fHlTF+WOjvG0/QjHf3DcBXZtY1btMQgkv0itQrJQmRyrUguHoXwC9i\nnp8DnBauRltxIReAjeE+EHyojzKzNmG5icDzVTjmtcBfzKxpWPcYoDfBdRRE6pWShMiOYr/h/xG4\n2szeJFiSvmLbdILLP74dDj5PCp+/lWDQe254MZ+pBBdGWgC87u6PJjjG9gd3vxGYF9b9IXAnMNbd\nv0vLqxOpBg1ci2Sw8PoEDwPz3P3iqOORhkdJQkREklJ3k4iIJKUkISIiSSlJiIhIUkoSIiKSlJKE\niIgkpSQhIiJJKUmIiEhS/x8iKeBNY2dz/AAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page Number: 259" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.3(a)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "s_n=8.5 #signal-to-noise ratio\n", + "s_n_db=18.6 #signal-to-noise ratio (dB)\n", + "tele_rate=1.544 #telephone rate\n", + "v_by_sig=12.0 #peak signal-to-rms-noise ratio\n", + "v_by_sig_db=21.6 #peak signal-to-rms-noise ratio(dB)\n", + "\n", + "#calculation\n", + "Pe1=(1.0/math.sqrt(2.0*math.pi))*(math.exp(-((s_n**2.0)/8.0))/(s_n/2.0)) #Probability of error 1 \n", + "q=v_by_sig/2 #parameter value\n", + "ber=(1.0/2.0)*(1.0-math.erf(q/math.sqrt(2.0))) #bit error rate or Probability of error 2\n", + "\n", + "#result\n", + "print \"Probability of error for signal-to-noise ratio 8.5 = \", round(Pe1,5)\n", + "print \"Probability of error for peak signal-to-rms-noise ratio 12.0 = \", round(ber,10)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error for signal-to-noise ratio 8.5 = 1e-05\n", + "Probability of error for peak signal-to-rms-noise ratio 12.0 = 1e-09\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.3(b)" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "v_by_sig=13.0 #peak signal-to-rms-noise ratio for SONET\n", + "v_by_sig_db=22.3 #peak signal-to-rms-noise ratio(dB) for SONET\n", + "\n", + "#calculation\n", + "q=v_by_sig /2 #parameter value\n", + "ber=(1.0/(2.0*4.0))*(1.0-math.erf(q/math.sqrt(2.0))) #bit error rate or Probability of error \n", + "\n", + "#result\n", + "print \"Probability of error for peak signal-to-rms-noise ratio 13.0 = \", round(ber,11), \"OR\",round(ber/10,12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error for peak signal-to-rms-noise ratio 13.0 = 1e-11 OR 1e-12\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4, Page Number: 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "h = 6.625*10**-34 #planks constant(J*s)\n", + "C = 3*10**8 #freespace velocity(m/s)\n", + "B = 10**6 #data rate(Mb/s)\n", + "Lambda = 850*10**-9 #Wavelength (m)\n", + "\n", + "#calculation\n", + "tuo = 2.0/B\n", + "E = 20.7*h*C/Lambda #Energy of incident photon\n", + "Pi = E/tuo #Minimum incident optical power(W)\n", + "Pi_db = 10.0*(math.log10(Pi))-(-40) #optical power level with reference 1mW = -40dBm\n", + "\n", + "#result\n", + "print \"Minimum incident optical power = \",round(Pi*10**13,2),\"pW\"\n", + "print \"Optical power level with reference 1mW = \",round(Pi_db,1),\"dBm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum incident optical power = 24.2 pW\n", + "Optical power level with reference 1mW = -76.2 dBm\n" + ] + } + ], + "prompt_number": 75 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter8.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter8.ipynb new file mode 100755 index 00000000..7624efd8 --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter8.ipynb @@ -0,0 +1,335 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c41fce225679ac457a37b8135a3b4343e35e5bc26e64b35427fb89f090d39c55" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chepter 8: Digital links" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page Number: 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "system_margin = 6 # (dB)\n", + "alpha = 3.5 #attenuation (dB/Km)\n", + "L =6 #Length of transmission path (Km)\n", + "lc = 1 #connector loss (dB)\n", + "\n", + "#calculation\n", + "PT = 2*lc+alpha*L+system_margin #total optical power loss(dB)\n", + "\n", + "#result\n", + "print \"Total optical power loss = \" , round(PT) ,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total optical power loss = 29.0 dB\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page Number: 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "Ps = 3 #laser output (dBm)\n", + "APD_sen = -32 #APD sensitivity (dBm)\n", + "lsc = 1 #source connectorloss (dB)\n", + "ljc = 2*4 #two (jumper+connector loss) (dB)\n", + "alpha = 0.3 #attenuation (dB/Km)\n", + "L = 60 #cable length (Km)\n", + "cable_att = alpha*60 #cable attenuation (dB)\n", + "lrc = 1 #receiver connector loss (dB)\n", + "\n", + "#calculation\n", + "Allowed_Loss = Ps-APD_sen # (dB)\n", + "system_margin = Allowed_Loss-lsc-ljc-cable_att-lrc #system margin(dB)\n", + "\n", + "#result\n", + "print \"Allowed loss between light source and photodetector = \",Allowed_Loss,\"dB\"\n", + "print \"The Final power margin = \" , round(system_margin) , \"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Allowed loss between light source and photodetector = 35 dB\n", + "The Final power margin = 7.0 dB\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page Number: 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "t_tx = 15*10**-9 #transmitter rise time(ns)\n", + "t_mat = 21*10**-9 #material dispersion related rise time(ns)\n", + "t_mod = 3.9*10**-9 #rise time resulting from modal dispersion(ns)\n", + "t_rx = 14*10**-9 #receiver rise time(ns)\n", + "\n", + "#calculation\n", + "tsys = math.sqrt(t_tx**2+t_mat**2+t_mod**2+t_rx**2) #link rise time(ns)\n", + "\n", + "#result\n", + "print \"Link rise time = \" , round(tsys*10**9),\"ns\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Link rise time = 30.0 ns\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page Number: 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "t_tx = 25*10**-12 #transmission rise time (sec)\n", + "t_GVD = 12*10**-12 #GVD rise time (sec)\n", + "t_rx = 0.14*10**-9 #receiver rise time (sec)\n", + "\n", + "#calculation\n", + "tsys = math.sqrt(t_tx**2+t_GVD**2+t_rx**2) #Link rise time(ns)\n", + "\n", + "#result\n", + "print \"System rise time = \" , round(tsys*10**9,2) , \"ns\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "System rise time = 0.14 ns\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page Number: 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "bit_error_dur = 1*10**-3 #bit-corrupting burst noise duration (ms)\n", + "B = 10*10**3 #data rate (kb/sec)\n", + "\n", + "#calculation\n", + "N = B*bit_error_dur #number of bits affected by by burst error (MB/s)\n", + "\n", + "#result\n", + "print \"Number of bits affected by a burst error = \" , round(N) , \"Mb/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of bits affected by a burst error = 10.0 Mb/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page Number: 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "x=1\n", + "\n", + "#calculation\n", + "polynomial = str(x**7)+\"0\"+str(x**5)+\"0\"+\"0\"+str(x**2)+str(x)+\"1\" #generator polynommial\n", + "\n", + "#result\n", + "print \"The generator polynomial to 8-bit binary represantation = \",polynomial" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The generator polynomial to 8-bit binary represantation = 10100111\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page Number: 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "N = 32.0 #number of CRC\n", + "\n", + "#calculation\n", + "Ped = 1.0-(1.0/(2.0**N)) #burst error\n", + "\n", + "#result\n", + "print \"Burst error detected by CRC = \" , round(Ped*100,8), \"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Burst error detected by CRC = 99.99999998 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page Number: 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "S = 8 #Reed-Solomon code with 1 byte\n", + "n = (2**S-1) #length of coded sequence\n", + "k = 239.0 #length of message sequence\n", + "\n", + "#calculation\n", + "r = n-k #number of redundent bytes\n", + "over_head = (r/k) #overhead %\n", + "\n", + "#result\n", + "print \"Number of redundent bytes r = \" ,round(r),\"bytes\"\n", + "print \"Percent overhead = \" , round(over_head*100) , \"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of redundent bytes r = 16.0 bytes\n", + "Percent overhead = 7.0 %\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Optical_fiber_communication_by_gerd_keiser/chapter9.ipynb b/Optical_fiber_communication_by_gerd_keiser/chapter9.ipynb new file mode 100755 index 00000000..b9aab8ae --- /dev/null +++ b/Optical_fiber_communication_by_gerd_keiser/chapter9.ipynb @@ -0,0 +1,203 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:324a9a4da13d8ac7961f467603671985ce43ffe3c8500eed13354d67d0e20662" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Analog links" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page Number: 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%pylab inline" + ], + "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: ['f', 'pylab']\n", + "`%matplotlib` prevents importing * from pylab and numpy\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import pylab\n", + "\n", + "#variable decalration\n", + "ib_by_ith1=1.5 #injection current1 > 1.2\n", + "ib_by_ith2=1.6 #injection current2\n", + "ib_by_ith3=1.7 #injection current3\n", + "f = 100.0*10**6 #frequency (hz)\n", + "\n", + "#calculation\n", + "RIN1 = ((ib_by_ith1-1)**-3)/f\n", + "RIN2 = ((ib_by_ith2-1)**-3)/f\n", + "RIN3 = ((ib_by_ith3-1)**-3)/f\n", + "RIN_dB1 = 20*math.log10(RIN1) #noise to signal power ratio1(dB/Hz)\n", + "RIN_dB2 = 20*math.log10(RIN2) #noise to signal power ratio2(dB/Hz)\n", + "RIN_dB3 = 20*math.log10(RIN3) #noise to signal power ratio3(dB/Hz)\n", + "\n", + "#result\n", + "print \"Index guided lasers lies between \",round(RIN_dB1,0),\"dB/Hz\",round(RIN_dB2,0),\"dB/Hz\",round(RIN_dB3,1),\"dB/Hz\"\n", + "\n", + "#plot\n", + "f1=1.0*10**8 # several hundrede MHz\n", + "ib_by_ith = arange(0.0, 2.5, 0.1)\n", + "RIN12 = ((ib_by_ith-1.0)**-3)/f1\n", + "plot(ib_by_ith,20*log10(RIN12))\n", + "ylabel('RIN(dB/Hz)')\n", + "xlabel('Ib/Ith')\n", + "title('Plot of relative intensity. The noise level=100MHz ')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index guided lasers lies between -142.0 dB/Hz -147.0 dB/Hz -150.7 dB/Hz\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 7, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcnfPd//HXWxJbE1FSRHBbGrUrIaFFxp4QJFVLQpTq\ngpYuWkWp3HdL9dfeLe2t2tJSRbQlsTTWkimtJZaIESJUkI1qLRGxJp/fH99r4picmTlzZs65zpl5\nPx+P88g51/qZ65wrn+u7XN9LEYGZmVk5Vso7ADMzq19OImZmVjYnETMzK5uTiJmZlc1JxMzMyuYk\nYmZmZXMSKZOkRknHV2lfJ0p6SdIiSR/tgu0tk7RpmeseJem2zsZQZLsXSzqrq7fbGZLOkHRJlfdZ\n9nfThTHsLmlWF2+zQdLcrtxmK/vJ/fj1NE4ibZD0nKQlkt6Q9KKkyyR9JJsd2au9bWyc/bDLOtaS\n+gD/C+wdEWtExKvlbKfMfa8Qe0RcFRH7d/W+IuLEiPhBiXFdLun7XR1DkZh+GBFfzPbZqe8x28aZ\n2W/pDUlvSXq/4HNT10XeORFxT0RskXcc1SJpT0lTJb0maU6R+Rtn89+U9KSkvVvMHyfpeUmLJU0u\nvNDLLjaXSdquxTqTs+l7ZJ8nSPpDkX3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OkfSqdm0Y5Ue+9y8zHOS1qp81GZdy0nErHyl3mS1H3B7i3WO5cMj\nqAa1Oy6ZWaucRMy6xhqS/iJplqSLsyEmkLQGsHLBkNqSdChpLKWrJD0iadVs3smSHs4ervSJHP4G\nsw5zEjHrGkOBrwJbAZsBzU+u2wf4a8FyERHXkQZcHBcRO0bE29m8lyNiCGm48G9VJ2yzznESMesa\n0yLiuYhYBkwEdsumjwBuaWWdltVXk7J/HwE27vIIzSrAScSsaxS2j4g0eB3AzsC0EtYBeCf7dyl1\nOjiq9TxOImZdY6ikjSWtBBwO/F3S1sCs+PAop82ljzf44DG5ZnXLScSsfFHw74OkR98+QXo+yPXA\nSFasympe53LgVy0a1guX8fDaVhc8FLxZhUi6HRhfiw9EM+sqTiJmZlY2V2eZmVnZnETMzKxsTiJm\nZlY2JxEzMyubk4iZmZXNScTMzMrmJGJmZmX7/0bvtFcOD9WnAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page Number: 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import pylab\n", + "\n", + "#variable declaration\n", + "T =300.0 #room temperature(kelvin)\n", + "kB = 1.38054*10**-23 #boltzmann's constant\n", + "m =0.25 #modulation index\n", + "RIN_dB = -143 \n", + "RIN = 10.0**( RIN_dB /10) #relative intensity(db/Hz)\n", + "Pc = (10**(0/10) )*10**-3 #power coupled(dB)\n", + "R = 0.6 #responsivity(A/w)\n", + "Be = 10**6 #bandwidth(hz) \n", + "ID = 10**-9 #dark current(nA)\n", + "Req = 750 #equialent resistance(ohm) \n", + "Ft = 10**(3/10) #(dB)\n", + "M = 1 #multiplication factor\n", + "q = 1.602*10**-19 #Charge (coulombs)\n", + "\n", + "#calculation\n", + "p = arange(0.0, -20.0, -1.0)\n", + "P = (10**(p/10) )*10**-3\n", + "C_N_1 = 0.5*((m*R*P)**2) /(4* kB*T*Be*Ft/ Req ) #limit of carrier-to-noise ratio\n", + "C_N_3 = 0.5* (m**2)/( RIN *Be)\n", + "C_N_2 = 0.5* (m**2)*R*P /(2* q*Be)\n", + "\n", + "#result\n", + "print \"Decrese in received optical power at 1-db drop of C/N = 1 dB \"\n", + "print \"Receiver thermal noise yields a 2-dB C/N roll off per 1-dB drop in received power at low light levels\"\n", + "\n", + "#plot\n", + "plot(p,10*log10( C_N_1 ))\n", + "plot(p,10*log10( C_N_2 ))\n", + "plot (p,10*log10( C_N_3-30.6*10**6)*ones(len(p)))\n", + "ylim((46,70))\n", + "ylabel('Carrier-to-noise ratio(dB)')\n", + "xlabel('Received optical power(dBm)')\n", + "title('Plot of Carrier-to-noise ratio as a function of receiver optical power level')\n", + "text(-10,57,'RIN limit')\n", + "text(-17,67,'Quantum noise limit')\n", + "text(-17,51,'Receiver noise limit')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decrese in received optical power at 1-db drop of C/N = 1 dB \n", + "Receiver thermal noise yields a 2-dB C/N roll off per 1-dB drop in received power at low light levels\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 5, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAcAAAAEZCAYAAAAAFPWUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX9+P/XOxEUARcQoaICgliUQAIWi4gEUUBBQX/F\npWpBiwt+RNqK1g3FFf0Klt0qWqlLRY1iUdsCEoKKC4IRUHEtRAFFDLJDIfD+/XHOhMkwSSbJZNb3\n8/HIIzN3O++5c+eee+49931FVTHGGGPSTUa8AzDGGGPiwSpAY4wxackqQGOMMWnJKkBjjDFpySpA\nY4wxackqQGOMMWmpRhWgiBSIyO+jFUwlZQ0TkXUisllEDo9FmWFiuFVEpsWj7GgTkUdF5I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9aSTTtK77rqrdJoWLVroXXfdpZ06ddKsrCz9/PPPdeXKldqsWTNt3ry5\n5uTk6Ntvv62DBw/WvLy80vnq16+vqqrz58/X008/XQcMGKDHHXec3nLLLfrss89qly5dNCsrS7/5\n5pv9Psddd92lV1xxhebm5upxxx2nEydOLB03btw4bd++vbZv317Hjx+/X3lr167V7t27a3Z2trZv\n317ffvttVVWdPXu2du3aVTt16qSDBg3SrVu37lfukCFD9OWXX1ZV1R49euiSJUtKl33TTTfpSSed\npGeeeaZ+8MEH2qNHDz3uuON01qxZpZ+zf//+umrVqtJ1k52dXVp+JPbu3auvrnhV205qq72f6a1L\nf1gaNE71yitVzz5bddeuiBdpTK3y+86478Nr689agEnk008/pXPnzmWGNWzYkJYtW/L111/vlxEk\nuMVz//338+GHH7J06VIWLFjAJ598UjpNkyZNWLJkCcOGDWPs2LG0bNmSa6+9lj/96U989NFHnHba\naWGXHbBs2TIee+wxVqxYwTPPPMPXX3/NBx98wNChQ5k0aVLYz/Lll18yZ84cFi1axN13382ePXtY\nsmQJ06dPZ9GiRbz//vtMmzaNpUuXlinvH//4B3379qWwsJClS5eSnZ3NTz/9xP3338+8efNYsmQJ\nnTt35pFHHqlwXQbHv337dnr16sUnn3xCw4YNGTVqFPPmzWPmzJnceeedZeZr0aJF6bopLCzktNNO\nq7CcgMVrF5P791zumH8HE/tOZPZls+nQtEPp+FGjYPlyeOklqFMnokUaY2rIOsEkkYpSXlWWDuuF\nF15g2rRplJSU8P333/PZZ5/Rvn17AC644AIAOnXqxCuvvFI6j0aYPu5Xv/oVTZs2BaB169b07t0b\ngPbt2zN//vywsfbr1486derQuHFjjjzySH744QfeeecdLrjgAurVq1ca11tvvUXHjvvyXHbp0oUr\nr7yS3bt3M3DgQDp27EhBQQGfffYZp556KgC7du0qfR2JunXr0qdPHwCysrI46KCDyMzMpH379qxa\ntSrsPJGum9AOLldkX0FmRmaZaSZPhhdfhIULoX79iMM2xtSQtQCTyIknnsiSJUvKDNu8eTM//PAD\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Wz/fv3CPgdoFzAdODHSC8dMF1sF+nw34D3CAiHyGOz35XiXrE2Ab0EVEluOuqQWe\ngD4YeNjH2iEwXFWL/PhA5f02rtLd5N/fAJzsO898StlHCAV/f18Ah/pT2OCuM54uIp/gToUWBc1X\nz6+DQlxrfLCvfIPXR6jQcacCcytcE8bUgD0OyZhqEJGngNdU9ZU4lL1FVRtWPmWtlP0HXMemJ2u5\nnBzgD6o6uDbLMenNWoDGJJ94HrU+StlreLWlMa6HqzG1xlqAxhhj0pK1AI0xxqQlqwCNMcakJasA\njTHGpCWrAI0xxqQlqwCNMcakJasAjTHGpKX/H/I8RvMARTc7AAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Oscillations_and_Waves/screenshots/energy_density_ch9.png b/Oscillations_and_Waves/screenshots/energy_density_ch9.png new file mode 100755 index 00000000..001457bd Binary files /dev/null and b/Oscillations_and_Waves/screenshots/energy_density_ch9.png differ diff --git a/Oscillations_and_Waves/screenshots/eqn_of_wav_prop_ch5.png b/Oscillations_and_Waves/screenshots/eqn_of_wav_prop_ch5.png new file mode 100755 index 00000000..a2a065a7 Binary files /dev/null and b/Oscillations_and_Waves/screenshots/eqn_of_wav_prop_ch5.png differ diff --git a/Oscillations_and_Waves/screenshots/freq_and_time_period_ch1.png b/Oscillations_and_Waves/screenshots/freq_and_time_period_ch1.png new file mode 100755 index 00000000..e6b39232 Binary files /dev/null and b/Oscillations_and_Waves/screenshots/freq_and_time_period_ch1.png differ diff --git a/Oscillations_and_Waves_by_S._Prakash/README.txt b/Oscillations_and_Waves_by_S._Prakash/README.txt new file mode 100644 index 00000000..f20b94b1 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/README.txt @@ -0,0 +1,10 @@ +Contributed By: Mohd Asif +Course: btech +College/Institute/Organization: Pentode Technologies +Department/Designation: Technical Executive +Book Title: Oscillations and Waves +Author: S. Prakash +Publisher: Pragati Prakashan, Merut +Year of publication: 2008 +Isbn: 978-81-8398-422-5 +Edition: 5 \ No newline at end of file diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb new file mode 100755 index 00000000..9c8321a9 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter1.ipynb @@ -0,0 +1,849 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 - Free oscillations in one-dimension : Simple harmonic Oscillator" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "# FREQUENCY AND TIME PERIOD\n", + "#format('v',6)\n", + "#ph=50*x**2+100 in joule/kg\n", + "m=10 #mass in kg\n", + "f=10**3/m #joule/kg\n", + "w=sqrt(f) #oscillations\n", + "fr=w/(2*pi) #oscillations/sec\n", + "tp=1/fr #seconds\n", + "print \"Frequency of oscillation = %0.1f oscillations/seconds \"%fr\n", + "print \"Time period = %0.3f seconds \" %tp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillation = 1.6 oscillations/seconds \n", + "Time period = 0.628 seconds \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ENERGY\n", + "ke=5 #joule\n", + "pe=5 #joule\n", + "rep=10 #joule\n", + "eo=rep+ke+pe #joule\n", + "print \"Energy of the oscillator = %0.f J\" %eo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the oscillator = 20 J\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#peroid ,maximum velocity and acceleration\n", + "a=3 #cm\n", + "b=4 #cm\n", + "A=sqrt(a**2+b**2) #cm\n", + "w=2 #sec**-1\n", + "T=(2*pi)/w #seconds\n", + "um=w*A #cm/s\n", + "am=w**2*A #cm/s**2\n", + "print \"Time period = %0.f seconds\" %T\n", + "print \"Maximum velocity = %0.f cm/s\" %um\n", + "print \"Maximum acceleration = %0.f cm/s2 \" %am" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time period = 3 seconds\n", + "Maximum velocity = 10 cm/s\n", + "Maximum acceleration = 20 cm/s2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# maximum velocity and acceleration\n", + "A=5 #cm\n", + "T=31.4#seconds\n", + "w=(2*pi)/T #sec**-1\n", + "um=w*A #cm/s\n", + "am=w**2*A #cm/s**2\n", + "print \"Maximum velocity = %0.f cm/s\" %um\n", + "print \"Maximum acceleration = %0.1f cm/s2 \" %am" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum velocity = 1 cm/s\n", + "Maximum acceleration = 0.2 cm/s2 \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "# Period \n", + "#given data :\n", + "g=9.8 # constant\n", + "l=1 # in m\n", + "theta_m1=60 # in degree\n", + "theta_m=pi/3 # in radians\n", + "T0=round(2*pi*sqrt(l/g)) \n", + "print \"(a) Time period for small displacement, T0 = %0.f seconds \" %T0\n", + "T=T0*(1+(theta_m**2/16)) \n", + "print \"(b) Time period, T = %0.1f seconds \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Time period for small displacement, T0 = 2 seconds \n", + "(b) Time period, T = 2.1 seconds \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# ENERGY\n", + "es=1 #joule\n", + "l=2 #metre\n", + "am=3 #cm\n", + "am1=5 #cm\n", + "e1=(am1**2/am**2)*es #joules\n", + "l2=1 #meter\n", + "e2=(l/l2)*es #joules\n", + "print \"Energy in first case = %0.3f J\" %e1\n", + "print \"Energy in second case = %0.1f J\" %e2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy in first case = 2.778 J\n", + "Energy in second case = 2.0 J\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Period of motion\n", + "#given data :\n", + "x=0.16 # in m\n", + "m1=4 # in kg\n", + "g=9.8 \n", + "K=m1*g/x \n", + "m=0.50 # in kg\n", + "T=2*pi*sqrt(m/K) # \n", + "print \"The period of motion, T = %0.2f seconds \" %T\n", + "# answer is wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The period of motion, T = 0.28 seconds \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#foce constant,displacement , acceleration and energy\n", + "#given data :\n", + "x1=.10 # in m\n", + "F1=4 # in N\n", + "K=F1/x1 \n", + "x2=0.12 # in m\n", + "print \"(a) The force constant, K = %0.2f N/m\" %K\n", + "F=-K*x2 \n", + "print \"(b) The force, F = %0.2f N\" %F\n", + "m=1.6 # in kg\n", + "T=2*pi*sqrt(m/K) \n", + "print \"(c) Period of oscillation, T = %0.3f s \" %T\n", + "A=x2 \n", + "print \"(d) Amplitude of motion, A = %0.2f m \" %A\n", + "alfa=A*K/m \n", + "print \"(e) Maximum acceleration, alfa = %0.2f m/s2 \" %alfa\n", + "x=A/2 # in m\n", + "w=sqrt(K/m) \n", + "v=w*sqrt(A**2-x**2) \n", + "a=w**2*x # in m/s**2\n", + "KE=(1/2)*m*v**2 # in J\n", + "PE=(1/2)*K*x**2 # in J\n", + "TE=KE+PE \n", + "print \"(f) Velocity = %0.2f m/s \" %v\n", + "print \"(f) Acceleration = %0.2f m/s2 \" %a\n", + "print \"(f) Kinetic energy = %0.2f J \" %KE\n", + "print \"(f) Potential energy = %0.2f J\" %PE\n", + "print \"(g) Total energy of the oscillating system, TE = %0.2f J\" %TE\n", + "# In textbook part f is inculded in the part e so their is the numbeing error in parts" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) The force constant, K = 40.00 N/m\n", + "(b) The force, F = -4.80 N\n", + "(c) Period of oscillation, T = 1.257 s \n", + "(d) Amplitude of motion, A = 0.12 m \n", + "(e) Maximum acceleration, alfa = 3.00 m/s2 \n", + "(f) Velocity = 0.52 m/s \n", + "(f) Acceleration = 1.50 m/s2 \n", + "(f) Kinetic energy = 0.22 J \n", + "(f) Potential energy = 0.07 J\n", + "(g) Total energy of the oscillating system, TE = 0.29 J\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin\n", + "from sympy import symbols, pi\n", + "# ENERGY\n", + "t=8/3 #seconds\n", + "v=-10*pi*sin((35*pi)/6)#cm/s\n", + "print \"Velocity =\",v,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 5.0*pi cm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#given data :\n", + "K1=3 # in N/m\n", + "K2=2 # in N/m\n", + "m=0.050 # in kg\n", + "w=sqrt((K1+K2)/m) \n", + "n=w/(2*pi) \n", + "print \"(i) The frequency, n = %0.2f oscillations/sec \" %n\n", + "A=0.004 # in m\n", + "E=(1/2)*A**2*(K1+K2) \n", + "print \"(ii) The energy, E = %0.e J \" %E\n", + "v=sqrt(2*E/m) \n", + "print \"(iii) The velocity, v = %0.2f m/s\" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) The frequency, n = 1.59 oscillations/sec \n", + "(ii) The energy, E = 4e-05 J \n", + "(iii) The velocity, v = 0.04 m/s\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Rotational inertia\n", + "#given data :\n", + "M=0.1 # in m\n", + "l=0.1 # in m\n", + "I1=M*l**2/12 # in kg-m**2\n", + "T1=2 # in s\n", + "T2=6 # in s\n", + "I2=(I1*T2**2)/T1**2 \n", + "print \"Rotational inertia, I2 = %0.1e kg-m2 \" %I2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rotational inertia, I2 = 7.5e-04 kg-m2 \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Time period\n", + "#given data :\n", + "M=4 # in kg\n", + "R=0.10 # in m\n", + "I=(2/5)*M*R**2 # in kg.m**2\n", + "C=4*10**-3 # in Nm/radian\n", + "T=2*pi*sqrt(I/C) \n", + "print \"Time period, T = %0.2f s \" %T\n", + "# answer is wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time period, T = 12.57 s \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page 41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Energy\n", + "#given data :\n", + "L=10*10**-3 # in H\n", + "C=20*10**-6 # in F\n", + "n=1/(2*pi*sqrt(L*C)) \n", + "V=10 #in V\n", + "U=(1/2)*C*V**2 \n", + "print \"Frequency, n = %0.2f cycles/s \" %n\n", + "print \"Energy of oscillations,U = %0.1e J \" %U\n", + "#answer of frequency is calculated wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency, n = 355.88 cycles/s \n", + "Energy of oscillations,U = 1.0e-03 J \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# distance,binding energy and force constant\n", + "print \"Equilibrium inter-nuclear distance correspondes to lowest potential enegy is ro= 2*\u00c5\"\n", + "pet=0 #eV\n", + "peb=-4 #eV\n", + "be=pet-peb #eV\n", + "x1=-2 #eV\n", + "x2=-4 #eV\n", + "V=x1-x2 #eV\n", + "e=1.6*10**-19 #electronic charge\n", + "x=0.5 #armstrong\n", + "K=((2*V)/x**2) #eV/\u00c5**2\n", + "k1=(K*e)/(10**-10)**2 #joule/m**2\n", + "print \"Binding energy = %0.2f eV \" %be\n", + "print \"Force constant = %0.2f N/m \" %k1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium inter-nuclear distance correspondes to lowest potential enegy is ro= 2*\u00c5\n", + "Binding energy = 4.00 eV \n", + "Force constant = 256.00 N/m \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# possible values and energy\n", + "r1=2 #from graph\n", + "r2=4.5 #units from graph\n", + "print \"Possible values of r are\",r1,\"units and\",r2,\"units.\"\n", + "osc=1-(-2.5) #units\n", + "print \"Maximum energy of oscillations for r=2 units is\",osc,\"units.\"\n", + "osc1=0.5-(-1) #units\n", + "print \"Maximum energy of oscillations for r=4.5 units is\",osc1,\"units.\"\n", + "t=1 #from graph\n", + "v=0 #from graph\n", + "e=t+v #\n", + "print \"Total energy = %0.2f unit \" %e\n", + "print \"At infinity V =\",v,\"therefore T =\",t,\"unit.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Possible values of r are 2 units and 4.5 units.\n", + "Maximum energy of oscillations for r=2 units is 3.5 units.\n", + "Maximum energy of oscillations for r=4.5 units is 1.5 units.\n", + "Total energy = 1.00 unit \n", + "At infinity V = 0 therefore T = 1 unit.\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Frequency\n", + "#given data :\n", + "m1=10 # in g\n", + "m2=90 # in g\n", + "K=10**3 # in N/m\n", + "mu=m1*m2*10**-3/(m1+m2) \n", + "n=round(sqrt(K/mu)/(2*pi)) \n", + "print \"The frequency, n = %0.2f oscillations/sec \" %n\n", + "x1=0 #\n", + "x2=10 #cm\n", + "xb=((m1*x1+m2*x2)/(m1+m2)) #cm\n", + "mo=(m1*10**-3)*(xb*10**-2)**2+(m2*10**-3)*(1*10**-2)**2 #\n", + "print \"Moment of inertia = %0.1e kg-m2 \" %mo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n = 53.00 oscillations/sec \n", + "Moment of inertia = 9.0e-05 kg-m2 \n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# frequency and amplitude\n", + "c=10**-4 #N-m\n", + "m1=9 #gm\n", + "m2=1 #gm\n", + "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n", + "r=20 #cm\n", + "I=mu*(r*10**-2)**2 #kg-m**2\n", + "fr=((1/(2*pi))*sqrt(c/I)) #vibrations/sec\n", + "print \"Frequency of vibration = %0.2f vibrations/s \" %fr\n", + "e=10**-2 #joule\n", + "thmax=sqrt((2*e)/c) #radians\n", + "print \"Amplitude = %0.2f radians \" %thmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of vibration = 0.27 vibrations/s \n", + "Amplitude = 14.14 radians \n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# frequency ,energy and maximum velocity\n", + "c=1 #N-m \n", + "m1=6 #gm\n", + "m2=2 #gm\n", + "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n", + "fr=((1/(2*pi))*sqrt(c/mu)) #vibrations/sec\n", + "print \"Frequency of oscillations = %0.1f vibrations/s \" %fr\n", + "td= 1+(1/3) #cm\n", + "e=((1/2)*c*(td*10**-2)**2) #joule\n", + "print \"Energy = %0.1e J \" %e\n", + "y=((1/2)*m2*10**-3)+((1/2)*(1/3)**2*m1*10**-3) #\n", + "v1=sqrt((e/y)) #m/sec\n", + "print \"Maximum velocity of smaller mass = %0.2f m/s\" %v1\n", + "#velocity is calculated wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 4.1 vibrations/s \n", + "Energy = 8.9e-05 J \n", + "Maximum velocity of smaller mass = 0.26 m/s\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# frequency\n", + "k=100 #N/m\n", + "m=100 #gm\n", + "n1=((1/(2*pi))*sqrt(k/(m*10**-3))) #sec**-1\n", + "m1=100 #gm\n", + "m2=200 #gm\n", + "mu=((m1*m2)/(m1+m2))*10**-3 #kg\n", + "fr=((1/(2*pi))*sqrt(k/mu)) #sec**-1\n", + "print \"In first case frequency = %0.f sec^-1 \"%n1\n", + "print \"In second case frequency = %0.1f sec^-1 \"%fr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In first case frequency = 5 sec^-1 \n", + "In second case frequency = 6.2 sec^-1 \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# force constant and work done\n", + "m1=1 #assume\n", + "m2=19 #assume\n", + "mh=1.66*10**-27 #kg\n", + "mu=((m1*m2)/(m1+m2))*mh #kg\n", + "w=7.55*10**14 #radians/sec\n", + "k=mu*(w)**2 #N/m\n", + "print \"Force constant = %0.1f N/m \" %k\n", + "x=0.5 #arngstrom\n", + "wh=((1/2)*k*(x*10**-10)**2) #joule\n", + "print \"Work done = %0.3e J\" %wh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force constant = 898.9 N/m \n", + "Work done = 1.124e-18 J\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24, page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# frequency\n", + "m1=1 #a.m.u\n", + "m2=35 #a.m.u\n", + "mu1=((m1*m2)/(m1+m2)) #a.m.u\n", + "m3=2 #\n", + "mu2=((m3*m2)/(m3+m2)) #a.m.u\n", + "n1=8.99*10**13 #cycle/sec\n", + "n2=(sqrt(mu1/mu2))*n1 #c/s\n", + "print \"Frequecy of vibrations = %0.2e c/s \" %n2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequecy of vibrations = 6.44e+13 c/s \n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb new file mode 100755 index 00000000..9089cf29 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter10.ipynb @@ -0,0 +1,417 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10, Waves in solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Young's modulus of steel\n", + "#given data :\n", + "p=7.8*10**3 # in kg/m**3\n", + "v=5200 # m/s\n", + "Y=p*v**2 \n", + "print \"Young modulus of steel, Y = %0.1e N/m^2 \" %Y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Young modulus of steel, Y = 2.1e+11 N/m^2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Velocity and wavelength\n", + "#given data :\n", + "Y=8*10**10 # in N/m**2\n", + "p=5000 # in kg/m**3\n", + "v=sqrt(Y/p) \n", + "print \"(1) The velocity, v = %0.f m/s \" %v\n", + "f=400 # in vibration/sec\n", + "lamda=v/f \n", + "print \"(2) The wavelength = %0.f m \" %lamda" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The velocity, v = 4000 m/s \n", + "(2) The wavelength = 10 m \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 406" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Velocity and wavelength\n", + "#given data :\n", + "Y=7*10**10 # in N/m**2\n", + "p=2.8*10**3 # in kg/m**3\n", + "v=sqrt(Y/p) \n", + "print \"(1) The velocity, v = %0.e m/s \" %v\n", + "f=500 # in vibration/sec\n", + "lamda=v/f \n", + "print \"(2) The wavelength = %0.f m \" %lamda" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) The velocity, v = 5e+03 m/s \n", + "(2) The wavelength = 10 m \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Young's modulus\n", + "#given data :\n", + "l=3 # in m\n", + "n=600 # in Hz\n", + "p=8.3*10**3 # in kg/m**3\n", + "Y=p*n**2*(2*l)**2 \n", + "print \"Youngs modulus, Y = %0.3e N/m^2 \" %Y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Youngs modulus, Y = 1.076e+11 N/m^2 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "Y=2*10**11 # in N/m**2\n", + "p=8*10**3 # in kg/m**3\n", + "l=0.25 # in m\n", + "n=sqrt(Y/p)/(2*l) \n", + "print \"The frequency, n = %0.e vibrations/s \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n = 1e+04 vibrations/s \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Area of cross section\n", + "#given data :\n", + "n1BYn2=20 \n", + "T=20*9.8 # in N\n", + "Y=19.6*10**10 # in N/m**2\n", + "alfa=n1BYn2**2*T/Y \n", + "print \"Area of cross section, alfa = %0.e m^2 \" %alfa" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of cross section, alfa = 4e-07 m^2 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Velocity and Young modulus\n", + "#given data :\n", + "n=2600 # in Hz\n", + "l=1 # in m\n", + "p=7.8*10**3 # kg/m**3\n", + "v=2*n*l \n", + "print \"The velocity, v = %0.f m/s \" % v\n", + "Y=v**2*p \n", + "print \"Youngs modulus, Y = %0.2e N/m^2 \" %Y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity, v = 5200 m/s \n", + "Youngs modulus, Y = 2.11e+11 N/m^2 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequencies\n", + "#given data :\n", + "Y=7.1*10**10 # in N/m**2\n", + "p=2700 #in kg/m**3\n", + "l=1.5 # in m\n", + "r1=1 \n", + "r2=3 \n", + "r3=5 \n", + "n1=(r1/(4*l))*sqrt(Y/p) \n", + "n2=(r2/(4*l))*sqrt(Y/p) \n", + "n3=(r3/(4*l))*sqrt(Y/p) \n", + "print \"Frequency of first harmonic, n1 = %0.2f Hz \" %n1\n", + "print \"Frequency of second harmonic, n2 = %0.2f Hz \" %n2\n", + "print \"Frequency of third harmonic, n3 = %0.2f Hz \" %n3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of first harmonic, n1 = 854.67 Hz \n", + "Frequency of second harmonic, n2 = 2564.00 Hz \n", + "Frequency of third harmonic, n3 = 4273.33 Hz \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# Frequency\n", + "#given data :\n", + "l=1.2 # in m\n", + "v=5150 # in m/s\n", + "d=0.006 # in m\n", + "k=d/sqrt(12) \n", + "v1=pi*v*k*3.011**2/(8*l**2) \n", + "print \"The frequency, v1 = %0.2f Hz \" %v1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, v1 = 22.05 Hz \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# Frequencies\n", + "#given data :\n", + "l=2 # in m\n", + "v=3560 # in m/s\n", + "r=0.004 # in m\n", + "k=r/2 \n", + "v1=pi*v*k*3.011**2/(8*l**2) \n", + "print \"The frequency, v1 = %0.2f Hz \" %v1\n", + "v2=pi*v*k*5**2/(8*l**2) \n", + "print \"The frequency of first overtone, v2 = %0.2f Hz\" %v2\n", + "v3=pi*v*k*7**2/(8*l**2) \n", + "print \"The frequency of second overtone, v3 = %0.2f Hz\" %v3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, v1 = 6.34 Hz \n", + "The frequency of first overtone, v2 = 17.48 Hz\n", + "The frequency of second overtone, v3 = 34.25 Hz\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "Y=7.1*10**10 # in N/m**2\n", + "p=2.7*10**3 # in kg/m**3\n", + "r=0.005 # in m\n", + "vu=sqrt(Y/p) \n", + "k=r/2 \n", + "v=vu/(2*pi*k) \n", + "print \"The frequency, v = %0.2e Hz \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, v = 3.26e+05 Hz \n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb new file mode 100755 index 00000000..f6794e5d --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb @@ -0,0 +1,143 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11, Lissajous' Figures " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequencies\n", + "#given data :\n", + "t=2.0 # in sec\n", + "n1=100.0 # in vibrations/sec\n", + "n2a=n1+(1/t) \n", + "n2b=n1-(1/t) \n", + "print \"Frequency, n2a = %0.2f \" %n2a\n", + "print \"frequency, n2b = %0.2f \"%n2b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency, n2a = 100.50 \n", + "frequency, n2b = 99.50 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 448" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Frequencies\n", + "#given data :\n", + "t1=15 # in sec\n", + "t2=10 # in sec\n", + "n2=400 # in vibrations/sec\n", + "n1a=n2+(1/t1) \n", + "n1b=n2-(1/t1) \n", + "print \"Frequency, n1a = %0.2f Hz \" %n1a\n", + "print \"Frequency, n1b = %0.2f Hz \" %n1b\n", + "n_1a=n2+(1/t2) \n", + "n_1b=n2-(1/t2) \n", + "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n", + "print \"Frequency, n_1b = %0.2f Hz \" %n_1b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency, n1a = 400.07 Hz \n", + "Frequency, n1b = 399.93 Hz \n", + "Frequency, n_1a = 400.10 Hz \n", + "Frequency, n_1b = 399.90 Hz \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 449" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequencies\n", + "#given data :\n", + "t1=15 # in sec\n", + "t2=10 # in sec\n", + "n2=256 # in vibrations/sec\n", + "n1a=(2*n2)+(1/t1) \n", + "n1b=(2*n2)-(1/t1) \n", + "print \"Frequency, n1a = %0.2f Hz \" %n1a\n", + "print \"Frequency, n1b = %0.2f Hz \" %n1b\n", + "n_1a=(2*n2)+(1/t2) \n", + "n_1b=(2*n2)-(1/t2) \n", + "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n", + "print \"Frequency, n_1b = %0.2f Hz \" %n_1b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency, n1a = 512.07 Hz \n", + "Frequency, n1b = 511.93 Hz \n", + "Frequency, n_1a = 512.10 Hz \n", + "Frequency, n_1b = 511.90 Hz \n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb new file mode 100755 index 00000000..ba23123e --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb @@ -0,0 +1,524 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12, Doppler's Effect" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Speed\n", + "#given data :\n", + "vl=166 #m/s\n", + "v=(2*vl) #m/s\n", + "print \"Speed = %0.f m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed = 332 m/s \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "#given data :\n", + "f1=90 #vibrations/second\n", + "f2=(1+(1/10))*f1 #vibrations/s\n", + "print \"Frequency = %0.f vibrations/s \"%f2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 99 vibrations/s \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 458" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "#given data :\n", + "N=400 #hZ\n", + "V=340 #M/S\n", + "VS=60 #M/S\n", + "N2=((V/(V-VS))*N) #Hz\n", + "print \"Frequency when engine is approaching to the listner = %0.f Hz \" %round(N2)\n", + "N3=((V/(V+VS))*N) #Hz\n", + "print \"Frequency when engine is moving away from the listner = %0.f Hz \" %N3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency when engine is approaching to the listner = 486 Hz \n", + "Frequency when engine is moving away from the listner = 340 Hz \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#WAVELENGTH\n", + "x=1/5 #\n", + "h=60 #cm\n", + "h1=((1-x)*h) #cm\n", + "h2=((1+x)*h) #cm\n", + "print \"Wavelength of waves in north-direction = %0.f cm \" %h1\n", + "print \"Wavelength of waves in south-direction = %0.f cm\" %h2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of waves in north-direction = 48 cm \n", + "Wavelength of waves in south-direction = 72 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#frequency\n", + "v=340 #m/s\n", + "n=600 #Hz\n", + "vs=36 #km h**-1\n", + "vs1=vs*(1000/3600) #m/s\n", + "apf=((v)/(v-vs1))*n #Hz\n", + "vs2=54 #km h**-1\n", + "vs3=vs2*(1000/3600) #m/s\n", + "apf1=((v)/(v+vs3))*n #Hz\n", + "print \"Two apparent frequencies are\",round(apf,1),\"Hz and\",round(apf1,2),\"Hz.\"\n", + "df=apf-apf1 #Hz\n", + "print \"Difference in frequencies = %0.2f Hz\" %df\n", + "#second apparent frequency and difference is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Two apparent frequencies are 618.2 Hz and 574.65 Hz.\n", + "Difference in frequencies = 43.53 Hz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#frequency\n", + "v=330 #m/s\n", + "n=500 #Hz\n", + "vs=30 #km h**-1\n", + "vs1=vs*(1000/3600) #m/s\n", + "n3=((v+vs1)/(v-vs1))*n #Hz\n", + "print \"Frequency when cars are approaching = %0.f Hz \" %round(n3)\n", + "n1=((v-vs1)/(v+vs1))*n #Hz\n", + "print \"Frequency when cars have crossed = %0.f Hz\" %round(n1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency when cars are approaching = 526 Hz \n", + "Frequency when cars have crossed = 475 Hz\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#frequency\n", + "v=330 #m/s\n", + "n=600 #Hz\n", + "vs=20 #m/s\n", + "apf=((v)/(v+vs))*n #Hz\n", + "print \"Frequency when source is moving away from the observer = %0.f Hz \" %round(apf)\n", + "apf1=((v)/(v-vs))*n #Hz\n", + "print \"Frequency when siren reaching at the cliff = %0.f Hz \" %round(apf1)\n", + "bf=apf1-apf #Hz\n", + "print \"Beat frequency = %0.f Hz \" %round(bf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency when source is moving away from the observer = 566 Hz \n", + "Frequency when siren reaching at the cliff = 639 Hz \n", + "Beat frequency = 73 Hz \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#frequency\n", + "r=3 #m\n", + "w=10 #s**-1\n", + "vs=r*w #m/s\n", + "A=6 #m\n", + "fd=5/pi #s**-1\n", + "vmax=A*2*pi*fd #m/s\n", + "v=330 #m/s\n", + "n=340 #Hz\n", + "nmax=((v+vmax)/(v-vs))*n #Hz\n", + "nmin=((v-vmax)/(v+vs))*n #Hz\n", + "print \"Maximum frequency = %0.f Hz \" %nmax\n", + "print \"Minimum frequency = %0.f Hz \" %nmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency = 442 Hz \n", + "Minimum frequency = 255 Hz \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#speed\n", + "n12=3 #\n", + "n=340 #Hz\n", + "v=340 #m/s\n", + "vs=((n12*v)/(2*n)) #m/s\n", + "print \"Speed = %0.2f m/s \" %vs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed = 1.50 m/s \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#frequency\n", + "sa=1.5 #km\n", + "oa=1 #km\n", + "so=sqrt(oa**2+sa**2) #km\n", + "csd=sa/so #\n", + "v=0.33 #km/s\n", + "n=400 #Hz\n", + "vlov=120*(1000/3600) #m/s\n", + "vs1=(1/30)*csd #km/s\n", + "nd=((v)/(v-vs1))*n #vibrations/sec\n", + "print \"Apparent frequency = %0.f vibrations/second \" %round(nd)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Apparent frequency = 437 vibrations/second \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#frequency\n", + "v=1200 #km/h\n", + "w=40 #km/h\n", + "vs=40 #km/h\n", + "n=580 #Hz\n", + "nd=((v+vs)/((v+vs)-vs))*n #Hz\n", + "print \"Frequency of the whistle as heared by an observer on the hill = %0.2f Hz \" %nd\n", + "x=29/30 #km\n", + "print \"Distance = %0.2f m \" %(x*1000)\n", + "ndd=((v-w)+vs)/((v-w))*nd #Hz\n", + "print \"Frequency heared by driver = %0.2f Hz \" %ndd\n", + "#distance is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of the whistle as heared by an observer on the hill = 599.33 Hz \n", + "Distance = 966.67 m \n", + "Frequency heared by driver = 620.00 Hz \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#doppler shift and velocity\n", + "h1=6010 #\u00c5\n", + "h2=6000 #\u00c5\n", + "ds=h1-h2 #\u00c5\n", + "print \"Doppler shift = %0.f \u00c5 \" %ds\n", + "c=3*10**8 #m/s\n", + "v=((ds/h2)*c) #m/s\n", + "print \"Speed = %0.e m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Doppler shift = 10 \u00c5 \n", + "Speed = 5e+05 m/s \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#doppler shift and velocity\n", + "h1=3737 #\u00c5\n", + "h2=3700 #\u00c5\n", + "ds=h1-h2 #\u00c5\n", + "print \"Doppler shift = %0.f \u00c5 \" %ds\n", + "c=3*10**8 #m/s\n", + "v=((ds/h2)*c) #m/s\n", + "print \"Speed = %0.e m/s \" %v\n", + "#speed is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Doppler shift = 37 \u00c5 \n", + "Speed = 3e+06 m/s \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#speed\n", + "dv=10**3 #Hz\n", + "v=5*10**9 #Hz\n", + "c=3*10**8 #m/s\n", + "v=((dv)/(2*v))*c #m/s\n", + "print \"Velocity = %0.f m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 30 m/s \n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb new file mode 100755 index 00000000..6c8b227d --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter13.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13, Elementary theory of filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "# design loss pass constant K-filter\n", + "k=600 #ohms\n", + "fc=2500 #Hz\n", + "l=(k/(pi*fc)) #H\n", + "c=((1/(pi*fc*k))) #farad\n", + "print \"Inductance = %0.1f mH\" %(l*10**3)\n", + "print \"Capacitance = %0.3f micro-F \" %(c*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance = 76.4 mH\n", + "Capacitance = 0.212 micro-F \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#T-type band pass filter\n", + "#given data :\n", + "K=500 # in ohm\n", + "f1=4 # in kHz\n", + "f2=1 # in kHz\n", + "L1=K/(pi*(f1-f2)) \n", + "Ls=L1/2 \n", + "print \"Inductance in each series arm, Ls = %0.2f mH \" %Ls\n", + "C1=(f1-f2)*10**3/(4*pi*K*f1*f2) \n", + "Cs=2*C1 \n", + "print \"Capacity in each series arm, Cs = %0.2f micro-F\" %Cs\n", + "L2=((f1-f2)*K*1e3)/(4*pi*f1*f2*1e6)*1e3 # mH\n", + "print \"Shunt arm inductance, L2 = %0.1f mH\" %L2\n", + "Csh=1*10**6/(pi*(f1-f2)*10**3*K) \n", + "print \"Capacity in shunt arm, Csh = %0.2f micro-F\" % Csh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance in each series arm, Ls = 26.53 mH \n", + "Capacity in each series arm, Cs = 0.24 micro-F\n", + "Shunt arm inductance, L2 = 29.8 mH\n", + "Capacity in shunt arm, Csh = 0.21 micro-F\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb new file mode 100755 index 00000000..fe26f3cb --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter14.ipynb @@ -0,0 +1,155 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14, Ultrasonics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Fundamental frequency\n", + "#given data :\n", + "t=1.6*10**-3 # in m\n", + "lamda=2*t # in m\n", + "v=5760 # in m/s\n", + "n1=v*10**-6/lamda \n", + "print \"Fundamental frequency, n1 = %0.2f MHz \" %n1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fundamental frequency, n1 = 1.80 MHz \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# distance\n", + "#given data :\n", + "th=40 #cm\n", + "t1=30 #micro-seconds\n", + "t2=80 #micro seconds\n", + "x=((2*th*10**-2*t1*10**-6)/(2*t2*10**-6))*100 #cm\n", + "print \"Distance %0.2f cm \" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance 15.00 cm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Thickness\n", + "#given data :\n", + "v=5000 # in m/s\n", + "N=50000 # in Hz\n", + "t=v/(2*N) \n", + "print \"Thickness of steel plate, t = %0.2f m \" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of steel plate, t = 0.05 m \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# Capacitance\n", + "#given data :\n", + "L=1 # in H\n", + "n=10**6 # in Hz\n", + "C=1*10**12/(4*pi**2*n**2*L) \n", + "print \"The capacitance, C = %0.3f micro-F \" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The capacitance, C = 0.025 micro-F \n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb new file mode 100755 index 00000000..da8ea509 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb @@ -0,0 +1,126 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15, Musical sound & acoustic of buildings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "# decibles\n", + "#given data :\n", + "i1=4 #assume\n", + "i2=4*i1 #\n", + "dl=10*log10(i2/i1) #db\n", + "print \"Decibles by which intensity level will decrease = %0.2f db \" %dl" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decibles by which intensity level will decrease = 6.02 db \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "# ratio of amlitudes\n", + "#given data :\n", + "l1=10 #db\n", + "l2=40 #db\n", + "dl=l2-l1 #db\n", + "x=(10**(dl/10)) #\n", + "x1=sympy.sqrt(x) #\n", + "print \"Ratio of amplitudes =\", x1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of amplitudes = 10*sqrt(10)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "#given data :\n", + "x=264 #key note\n", + "g=x*(3.0/2) #\n", + "print \"Frequency of note G = %0.f \" %g\n", + "cd1=x*2 #\n", + "print \"Frequency of note C = %0.f \"%cd1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of note G = 396 \n", + "Frequency of note C = 528 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb new file mode 100755 index 00000000..d7df3137 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter17.ipynb @@ -0,0 +1,246 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17, Electromagnetic waves" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi\n", + "# magnitude\n", + "#given data :\n", + "R=7*10**8 # in m\n", + "P=3.8*10**26 # in Watt\n", + "S=P/(4*pi*R**2) \n", + "print \"Magnitude of poynting vector, S = %0.3e W/m^2 \" %S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of poynting vector, S = 6.171e+07 W/m^2 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Poynting vector\n", + "#given data :\n", + "R=1.5*10**11 # in m\n", + "P=3.8*10**26 # in Watt\n", + "S=P/(4*pi*R**2) # in W/m**2\n", + "Se=round(S*60/(4.2*10**4)) \n", + "print \"Poynting vector, Se = %0.2f cal/cm^2-m \" %Se" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Poynting vector, Se = 2.00 cal/cm^2-m \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Amplitude and magnetic field\n", + "#given data :\n", + "S=2 # in cal/cm**2- min\n", + "EH=S*4.2*10**4/60 # joule/m**2 sec\n", + "mu0=4*pi*10**-7 \n", + "epsilon0=8.85*10**-12 \n", + "EbyH=sqrt(mu0/epsilon0) \n", + "E=sqrt(EH*EbyH) \n", + "H=EH/E \n", + "E0=E*sqrt(2) \n", + "H0=H*sqrt(2) \n", + "print \"E = %0.2f V/m \"%E\n", + "print \"H = %0.3f Amp-turn/m \"%H\n", + "print \"Amplitude of electric fields of radiation, E0 = %0.f V/m \" %E0\n", + "print \"Magnetice field of radition, H0 = %0.2f Amp-turn/m \" %H0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 726.32 V/m \n", + "H = 1.928 Amp-turn/m \n", + "Amplitude of electric fields of radiation, E0 = 1027 V/m \n", + "Magnetice field of radition, H0 = 2.73 Amp-turn/m \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# electric and magnetic field\n", + "#given data :\n", + "r=2 # in m\n", + "mu0=4*pi*10**-7 \n", + "epsilon0=8.85*10**-12 \n", + "EbyH=sqrt(mu0/epsilon0) \n", + "EH=1000/(4*r**2*pi**2) # in W/m**2\n", + "E=sqrt(EH*EbyH) \n", + "H=(EH/E) \n", + "print \"Intensities of electric, E = %0.2f V/m\" %E\n", + "print \"Magnetic field of radiation, H = %0.4f Amp-turn/m \" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensities of electric, E = 48.85 V/m\n", + "Magnetic field of radiation, H = 0.1296 Amp-turn/m \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 593" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import degrees, pi, asin, sin, tan\n", + "# Degree of polarization\n", + "#given data :\n", + "thetai=45 # in degree\n", + "n=1.5 #/ index\n", + "thetar=asin(sin(thetai*pi/180)/n) # radian\n", + "thetar= degrees(thetar)\n", + "Rl=sin((thetai-thetar)*pi/180)**2/sin((thetai+thetar)*pi/180)**2 \n", + "Rp=tan(thetai-thetar*pi/180)**2/tan((thetai+thetar)*pi/180)**2 \n", + "D=((Rl-Rp)/(Rl+Rp))*100 \n", + "print \"Degree of polarization, D = %0.2f %%\" %D\n", + "# answer is wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degree of polarization, D = 49.44 %\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "Del=1 # in m\n", + "mu=4*pi*10**-7 # in H/m\n", + "sigma=4 # in siemen/m\n", + "v=1*10**-3/(pi*Del**2*mu*sigma) \n", + "print \"Frequency, v = %0.1f kHz \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency, v = 63.3 kHz \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb new file mode 100755 index 00000000..b64a947b --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter2.ipynb @@ -0,0 +1,450 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2, Damped harmonic oscillator" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "# relaxation time ,damping force ,time and total distance\n", + "v=10 #cm/s\n", + "vo=100 #cm/s\n", + "t=23 #sec\n", + "x=-(log(v/vo))/t #\n", + "t=(1/x)*1 #seconds\n", + "print \"Relaxation time = %0.f seconds \" %t\n", + "m=40 #gm\n", + "vx=50 #cm/sec\n", + "fd=((-x*m*10**-3*vx*10**-2)) #newton\n", + "print \"Damping force = %0.e N\" %fd\n", + "tx=5*(log(10)) #\n", + "print \"Time in which kinetic energy will reduce to 1/10th of its value = %0.1f seconds \" %tx\n", + "xx=v*1 #\n", + "print \"Distance travelled = %0.f m \" %xx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation time = 10 seconds \n", + "Damping force = -2e-03 N\n", + "Time in which kinetic energy will reduce to 1/10th of its value = 11.5 seconds \n", + "Distance travelled = 10 m \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# period\n", + "#given data :\n", + "m=2 # in g\n", + "k=30 # in dynes/cm\n", + "b=5 # in dynes/cm-sec**-1\n", + "r=b/(2*m) \n", + "w0=sqrt(k/m) \n", + "T=2*pi/sqrt(w0**2-r**2) \n", + "print \"The time period, T = %0.2f s \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The time period, T = 1.71 s \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# time\n", + "tr=50 #seconds\n", + "r=(1/(2*tr)) #s**-1\n", + "t=1/r #seconds\n", + "print \"Time in which amplitude falls to 1/e times the initial value = %0.f seconds \" %t\n", + "t2=tr #\n", + "print \"Time in which system falls to 1/e times the initial value = %0.f seconds\" %t2\n", + "t3=2*(1/r) #f \n", + "print \"Time in which energy falls to 1/e^4 of the initial value = %0.f seconds \" %t3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in which amplitude falls to 1/e times the initial value = 100 seconds \n", + "Time in which system falls to 1/e times the initial value = 50 seconds\n", + "Time in which energy falls to 1/e^4 of the initial value = 200 seconds \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "import sympy\n", + "# relaxation time ,frequency ,energy ,time ,rate and number of vibrations\n", + "k=20 #N/m\n", + "m=5#N-s/m\n", + "wo=sqrt(k/m) #\n", + "v1=2 #m/s\n", + "to=m/v1 #seconds\n", + "print \"(a) Relaxation time = %0.1f seconds \" %to\n", + "w=wo*(1-(1/(2*wo*to))**2) #\n", + "lf=w/(2*pi) #vibration/s\n", + "print \"(b) Linear frequency = %0.3f vibration/s \" %lf\n", + "a=1 #\n", + "e=((1/2)*m*a**2*wo**2) #joule\n", + "print \"(c) Energy = %0.f J \"%e\n", + "tm=v1*to #seconds\n", + "print \"(d) Time taken in fall of amlitude to 1/e value = %0.f seconds \" %tm\n", + "print \"(e) Time taken in fall of velocity amplitude to 1/2 value = %0.f seconds \" %tm\n", + "tr=to #\n", + "print \"(f) Time taken in fall of energy to 1/e value = %0.2f seconds\" %tr\n", + "eng=(1/2)*m*a*v1**2*(2/tm) #\n", + "print \"(g) Rate of loss of energy at t=0 seconds is\",eng,\"J/s and at any time is\",eng,\"e^-2*t/\",tm,\"J/s\"\n", + "rel=((eng*2*pi)/wo) #J/s\n", + "print \"(h) Rate of loss of energy per cycle at t=0 seconds is\",rel,\"J/s and at any time is\",round(rel,2),\"e^-2*t/\",tm,\"J/s\"\n", + "nv=tm/((2*sympy.pi)/wo) #\n", + "print \"(i) Number of vibratios made are =\",nv" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Relaxation time = 2.5 seconds \n", + "(b) Linear frequency = 0.315 vibration/s \n", + "(c) Energy = 10 J \n", + "(d) Time taken in fall of amlitude to 1/e value = 5 seconds \n", + "(e) Time taken in fall of velocity amplitude to 1/2 value = 5 seconds \n", + "(f) Time taken in fall of energy to 1/e value = 2.50 seconds\n", + "(g) Rate of loss of energy at t=0 seconds is 4.0 J/s and at any time is 4.0 e^-2*t/ 5.0 J/s\n", + "(h) Rate of loss of energy per cycle at t=0 seconds is 12.5663706144 J/s and at any time is 12.57 e^-2*t/ 5.0 J/s\n", + "(i) Number of vibratios made are = 5.0/pi\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# time and distance\n", + "b=5 #N-s/m\n", + "v=10 #m/s\n", + "to=b/v #second\n", + "print \"(a) Time in which velocity falls to 1/e times the initial value = %0.2f second \" %to\n", + "t2=b*to #\n", + "print \"(b) Time in which velocity falls to half the initial value = %0.2f second \" %t2\n", + "print \"(c) Distance traversed by the particle before the velocity falls to half the initial value is\",b,\"*(1-exp(log)\",(2*to)/to\n", + "x=b #m\n", + "print \"(d) Distance traversed by the particle it comes to rest = %0.2f m \" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Time in which velocity falls to 1/e times the initial value = 0.50 second \n", + "(b) Time in which velocity falls to half the initial value = 2.50 second \n", + "(c) Distance traversed by the particle before the velocity falls to half the initial value is 5 *(1-exp(log) 2.0\n", + "(d) Distance traversed by the particle it comes to rest = 5.00 m \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log, pi\n", + "# time interval\n", + "q=5*10**4 #quality factor\n", + "x=1/10 #\n", + "fr=300 #second**-1\n", + "to=q/(2*pi*fr) #second\n", + "xm=((to*log(10))) #seconds\n", + "print \"Time interval = %0.f seconds \" %xm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time interval = 61 seconds \n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Time\n", + "#given data :\n", + "n=240 # in sec**-1\n", + "w=2*pi*n \n", + "Q=2*10**3 \n", + "tau=Q/w \n", + "t=4*tau \n", + "print \"Time, t = %0.1f s \" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time, t = 5.3 s \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Logarithmic decrement\n", + "#given data :\n", + "a=100 \n", + "l1=20 # in cm\n", + "l2=2 # in cm\n", + "l=l1/l2 \n", + "lamda=(1/100)*log(l) \n", + "print \" Logarithmic decrement = %0.3f \" %lamda" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Logarithmic decrement = 0.023 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Frequency\n", + "#given data :\n", + "C=10**-6 # in F\n", + "L=0.2 # in H\n", + "R=800 # in ohm\n", + "Rm=2*sqrt(L/C) \n", + "n=sqrt((1/(L*C))-(R**2/(4*L**2)))/(2*pi) \n", + "print \"The frequency, n = %0.1f cycles/s \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n = 159.2 cycles/s \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Resistance\n", + "#given data :\n", + "C=0.0012*10**-6 # in F\n", + "L=0.2 # in H\n", + "Rm=2*sqrt(L/C) \n", + "print \"The maximum value of resistance, Rm = %0.2e ohms \" %Rm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of resistance, Rm = 2.58e+04 ohms \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Q factor\n", + "#given data :\n", + "C=5*10**-6 # in F\n", + "L=2*10**-3 # in H\n", + "R=0.2 # in ohm\n", + "w=round(sqrt((1/(L*C))-(R**2/(4*L**2)))) \n", + "f=w/(2*pi) \n", + "Q=w*L/R \n", + "print \"Frequency = %0.2e Hz \" %f\n", + "print \"Quality factor, Q = %0.f \" %Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 1.59e+03 Hz \n", + "Quality factor, Q = 100 \n" + ] + } + ], + "prompt_number": 38 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb new file mode 100755 index 00000000..2411d4be --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter3.ipynb @@ -0,0 +1,226 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3, Forced harmonic oscillator & resonance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, degrees, atan, pi\n", + "# Phase shift\n", + "#given data :\n", + "F0=25 # in N\n", + "m=1 \n", + "f0=F0/m \n", + "K=1*10**3 # in N/m\n", + "w0=sqrt(K/m) \n", + "b=0.05 # in N-s/m\n", + "r=b/(2*m) # in s**-1\n", + "A=f0*10**3/sqrt(9*w0**4+(16*r**2*(w0)**2)) \n", + "print \"The amplitude, A = %0.2f mm \" %A\n", + "p=2*w0 \n", + "fi=atan(2*r*p/(w0**2-p**2)) # radian \n", + "fi = degrees(fi) # degree\n", + "print \"Phase shift is\",round(fi,2),\"degree or\",round(fi*(pi/180),3),\"radian.\"\n", + "#phase shift is converted wrong into radians" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude, A = 8.33 mm \n", + "Phase shift is -0.06 degree or -0.001 radian.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import array\n", + "# A/Amax\n", + "x1=array([0.99,0.98,0.97]) #\n", + "wt=50 #\n", + "wo=1 #assume\n", + "fo=1 #assume\n", + "for x in x1:\n", + " a=((fo/((wo**2)*((1-x**2)**2+((1/wt**2)*x**2))**(1/2)))) #\n", + " am=fo/((wo**2)*(1/wt**2)**(1/2)) #\n", + " z=a/am #\n", + " print \"For p/wo\",x,\", value of A/Amax is\",round(z,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For p/wo 0.99 , value of A/Amax is 0.71\n", + "For p/wo 0.98 , value of A/Amax is 0.45\n", + "For p/wo 0.97 , value of A/Amax is 0.32\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, sqrt\n", + "# Reactance and impedence\n", + "#given data :\n", + "n=50 # in cycles\n", + "w=2*pi*n # in rad/sec\n", + "L=1/pi # in H\n", + "XL=w*L \n", + "print \"The reactance, XL = %0.0f ohm \" %XL\n", + "R=100 # in ohm\n", + "Z=sqrt(R**2+XL**2) \n", + "print \"The impedence, Z = %0.1f ohm \" %Z" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reactance, XL = 100 ohm \n", + "The impedence, Z = 141.4 ohm \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "# Current and Capacity\n", + "#given data :\n", + "E=110 # in V\n", + "R=10 # in ohm\n", + "L=1*10**-3 # in H\n", + "C=1*10**-6 # in F\n", + "n=10000 # in Hz\n", + "w=2*pi*n \n", + "I=E/sqrt(R**2+((w*L)-(1/(w*C)))**2) \n", + "print \"The current, I = %0.2f A \" %I\n", + "L1=1/(w**2*C) \n", + "print \"The value of capacity, L1 = %0.2e F \" %L1\n", + "#Capacitance is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current, I = 2.29 A \n", + "The value of capacity, L1 = 2.53e-04 F \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Resonent frequency and Separation\n", + "#given data :\n", + "L=1*10**-3 # in H\n", + "C=0.1*10**-6 # in F\n", + "w0=1/sqrt(L*C) \n", + "print \"Resonant frequency, w0 = %0.e rad/s \" %w0\n", + "R=10 # in ohm\n", + "w2_w1=R/L \n", + "print \"The separation = %0.e rad/s \" %w2_w1\n", + "S=w0/w2_w1 \n", + "print \"The sharpness = %0.f \" %S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resonant frequency, w0 = 1e+05 rad/s \n", + "The separation = 1e+04 rad/s \n", + "The sharpness = 10 \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb new file mode 100755 index 00000000..062db23c --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter4.ipynb @@ -0,0 +1,57 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4, Coupled oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# ratio of Frequency\n", + "k=1 #assume\n", + "m1=16 #a.m.u\n", + "m2=12 #a.m.u\n", + "m3=m1 #\n", + "rt=((m2+2*m1)/m2)**(1/2) #\n", + "print \"Ratio of frequency = %0.2f \" %rt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of frequency = 1.91 \n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb new file mode 100755 index 00000000..103201f7 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter5.ipynb @@ -0,0 +1,661 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5, Wave motion and speed of waves in gases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# wavelength\n", + "#given data :\n", + "v=960 # in m/s\n", + "n=3600/60 # in per sec\n", + "lamda=v/n \n", + "print \"The wavelength, lamda = %0.f m \" %lamda" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength, lamda = 16 m \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "c=3*10**8 # in m/s\n", + "lamda=300 # in m\n", + "n=c*10**-6/lamda \n", + "print \"The frequency, n = %0.f MHz \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n = 1 MHz \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# velocity and direction\n", + "#y=1.2*sin(3.5*t+0.5*x) #equation\n", + "w=3.5 #from equation\n", + "k=0.5 #from equation\n", + "v=w/k #m/s\n", + "print \"wave velocity =\",v,\"m/s and direction of the wave is along negative X-axis\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wave velocity = 7.0 m/s and direction of the wave is along negative X-axis\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, pi, sin\n", + "#equation of wave propogation\n", + "amp=0.02 #m\n", + "fr=110 #Hz\n", + "v=330 #m/s\n", + "w=2*pi*fr #s**-1\n", + "k=w/v #constant\n", + "t, x = symbols('t x')\n", + "y=amp*sin(w*t-k*x) #refrence equation\n", + "print \"Equation of wave is\",y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equation of wave is 0.02*sin(220*pi*t - 2*pi*x/3)\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#path difference\n", + "v=360 #m/s\n", + "fr=500 #Hz\n", + "h=v/fr #wavelength in metre\n", + "ang=60 #degree\n", + "angr=ang*(pi/180) #radian\n", + "pth=(h)/(2*pi) #metre\n", + "print \"Path difference = %0.2f m \" %pth" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Path difference = 0.11 m \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#path difference\n", + "pth=15 #cm\n", + "pd=(2*pi)/3 #radians\n", + "h=(pth*2*pi)/pd #cm\n", + "print \"Wavelength = %0.f cm \" %h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 45 cm \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin,degrees\n", + "from sympy import pi\n", + "#displacement ,particle velocity and acceleration\n", + "x=200 #cm\n", + "a=3 # cm\n", + "v=1000#cm/s\n", + "n=25\n", + "lamda=v/n \n", + "y=a*sin(2*pi/lamda*(v*t-x))\n", + "\n", + "v=1000 #cm/s\n", + "n=25 #vibrations\n", + "h=v/n #cm\n", + "a=3 #cm\n", + "t=2 #seconds\n", + "vl=2*pi*a*n #cm/s\n", + "acc=0 #\n", + "print \"Displacement c = %0.f m \" %round(abs(y))\n", + "print \"Velocity =\",vl,\"cm/s \" \n", + "print \"Acceleration = %0.2f cm/s^2 \" %acc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displacement c = 0 m \n", + "Velocity = 150*pi cm/s \n", + "Acceleration = 0.00 cm/s^2 \n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#amplitude,frequency,velocity ,wavelength and speed\n", + "#y=5*sin*(4t-0.02x) #given\n", + "a=5 #cm \n", + "h=(2*pi)/0.02 #\n", + "v=0.02*10000 #cm/s\n", + "n=v/h #cycles/seconds\n", + "print \"Amplitude = %0.2f cm \" %a\n", + "print \"Frequency = %0.3f cycles/s \" %n\n", + "print \"Velocity = %0.f cm/s \" %v\n", + "print \"Wavelength = %0.f cm \" %h\n", + "ma1x=a*4 #cm/s\n", + "print \"Maximum speed = %0.2f cm/s \" %ma1x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplitude = 5.00 cm \n", + "Frequency = 0.637 cycles/s \n", + "Velocity = 200 cm/s \n", + "Wavelength = 314 cm \n", + "Maximum speed = 20.00 cm/s \n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#wave intensity\n", + "nt=1 #watt source\n", + "r=1 #n\n", + "Is=(nt/(4*pi*r**2)) # joule/sec-m**2\n", + "print \"Intensity on the surface = %0.2f J/s-m^2 \" %Is" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity on the surface = 0.08 J/s-m^2 \n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Energy flux \n", + "#given data :\n", + "A=.10 # in m\n", + "w=4 # in per sec\n", + "k=0.1 # in per cm\n", + "p=1.25*10**3 # in kg/m**3\n", + "v=w*10**-2/k # in m/s\n", + "n=w/(2*pi) \n", + "Ef=2*pi**2*n**2*A**2*p*v \n", + "print \"Energy flux of the wave, Ef = %0.f W/m^2 \" %Ef" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy flux of the wave, Ef = 40 W/m^2 \n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Energy radiated and energy current\n", + "#given data :\n", + "p=1.29 # in kg/m**3\n", + "a=.15*10**-2 # in m/s\n", + "n=76 # in Hz\n", + "E=2*pi**2*n**2*a**2*p \n", + "print \"(a) Energy radiated, E = %0.3f J/m^3 \" %E\n", + "v=332 # in m/s\n", + "Ev=E*v \n", + "print \"(b) The energy current, Ev = %0.2f W/s \" %Ev\n", + "# energy current is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Energy radiated, E = 0.331 J/m^3 \n", + "(b) The energy current, Ev = 109.87 W/s \n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Pressure amplitude, Energy density and energy flux\n", + "#given data :\n", + "a=10**-5 # in m\n", + "n=500 # in per sec\n", + "p=1.29 # in kg/m**3\n", + "v=340 # in m/s\n", + "Pa=2*pi*a*n*v*p \n", + "print \"(i) Pressure amplitude, Pa = %0.1f N/m^2 \" %Pa\n", + "Ed=2*pi**2*a**2*n**2*p \n", + "print \"(ii) Energy density, Ed = %0.1e J/m^3 \"%Ed\n", + "Ef=2*pi**2*a**2*n**2*p*v \n", + "print \"(iii) The energy flux, Ef = %0.2f J/m^2-s \" %Ef" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Pressure amplitude, Pa = 13.8 N/m^2 \n", + "(ii) Energy density, Ed = 6.4e-04 J/m^3 \n", + "(iii) The energy flux, Ef = 0.22 J/m^2-s \n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Pressure \n", + "#given data :\n", + "gama=1.4 \n", + "u=10**-3 # in m/s\n", + "v=340 # in m/s\n", + "P=10**5 # in N/m**2\n", + "p=gama*P*u/v \n", + "print \"The pressure, p = %0.2f N/m^2 \" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure, p = 0.41 N/m^2 \n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#speed\n", + "sa=332 #m/s\n", + "pa=16 #density of air\n", + "ph=1 #density of hydrogen\n", + "vn=sa*sqrt(pa/ph) #m/s\n", + "t1=0 #degree celsius\n", + "t2=546 #degree celsius\n", + "t1k=0+273 #kelvin\n", + "t2k=t2+273 #kelvin\n", + "v2=vn*sqrt(t2k/t1k) #m/s\n", + "print \"Speed of sound in first case = %0.f m/s \" %vn\n", + "print \"speed of sound in second case is = %0.f m/s\" %v2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of sound in first case = 1328 m/s \n", + "speed of sound in second case is = 2300 m/s\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#temperature\n", + "t1=0 #degree celsius\n", + "t1k=t1+273 #kelvin\n", + "rt=2 #\n", + "tk=rt**2*t1k #Kelvin\n", + "t=tk-273 #degree celsius\n", + "print \"Temperature = %0.f degree-celsius \" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 819 degree-celsius \n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#temperature\n", + "rtd=16/14 #ratio of densities\n", + "tk=15+273 #degree celsius\n", + "x=(tk*rtd)-273 #degree celsius\n", + "print \"Temperature = %0.2f degree-celsius \" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature = 56.14 degree-celsius \n" + ] + } + ], + "prompt_number": 82 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#speed\n", + "rt=4/1 #\n", + "ss=332 #m/s\n", + "rd=32/28 #ratio of densities\n", + "rt1=((1+(1/rt)*rd)/(1+(1/rt))) #\n", + "v1=ss*sqrt(rt1) #m/s\n", + "print \"Speed of sound in nitrogen = %0.1f m/s \" %v1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of sound in nitrogen = 336.7 m/s \n" + ] + } + ], + "prompt_number": 84 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#speed\n", + "gm=1.41 #\n", + "vs=330 #m/s\n", + "vrms=sqrt(3/gm)*vs #m/s\n", + "print \"Root mean square velocity of molecules of gas = %0.f m/s \" %vrms" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Root mean square velocity of molecules of gas = 481 m/s \n" + ] + } + ], + "prompt_number": 86 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb new file mode 100755 index 00000000..c30a0e68 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter7.ipynb @@ -0,0 +1,579 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7, Superposition of harmonic waves : Interference, Beats, Stationary waves, Phase and group velocities " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# ratio\n", + "ri=9/16 #ratio of intensities\n", + "ra=sqrt(ri) #ratio of amplitude\n", + "a1=1 #assume\n", + "a2=ra*a1 #\n", + "rim=(a1+a2)**2/(a1-a2)**2 #\n", + "print \"Ratio of maximum intensity and minimum intensity in fringe system is %d\"%rim,\":\",a1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of maximum intensity and minimum intensity in fringe system is 49 : 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, pi\n", + "# intensity\n", + "I=1 #assume\n", + "a1=1*I #\n", + "a2=4*I #\n", + "ph1=0 #degree\n", + "i1=(a1+a2)+a2*cos(ph1*pi/180) #\n", + "print \"Intensity where phase difference is zero =\",i1,\"*I\"\n", + "ph2=90 #degree\n", + "i2=(a1+a2)+a2*cos(ph2*pi/180) #\n", + "print \"Intensity where phase difference is pi/2 =\",i2,\"*I\"\n", + "ph3=180 #degree\n", + "i3=(a1+a2)+a2*cos(ph3*pi/180) #\n", + "print \"Intensity where phase difference is pi is =\",i3,\"*I\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intensity where phase difference is zero = 9.0 *I\n", + "Intensity where phase difference is pi/2 = 5.0 *I\n", + "Intensity where phase difference is pi is = 1.0 *I\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Wavelength and frequency\n", + "#given data :\n", + "d=30 # in cm\n", + "lamda=2*d*10**-2 \n", + "v=330 # in m/s\n", + "print \"The wavelength = %0.2f m \" %lamda\n", + "n=v/lamda \n", + "print \"The frequency, n = %0.2f vibrations/s \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength = 0.60 m \n", + "The frequency, n = 550.00 vibrations/s \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# number of beats and time interval\n", + "from fractions import Fraction\n", + "n1=300 #Hz\n", + "n2=303 #Hz\n", + "bfs=n2-n1 #\n", + "print \"Beat frequency = %0.2f per second \" %bfs\n", + "ti=Fraction(1/bfs).limit_denominator(3) #second\n", + "print \"Time interval =\",ti,\"second \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Beat frequency = 3.00 per second \n", + "Time interval = 1/3 second \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "n1=256 # in Hz\n", + "x=4 # in beats per sec\n", + "n2a=n1+x \n", + "n2b=n1-x \n", + "print \"The frequency, n2a = %0.2f Hz \" %n2a\n", + "print \"The frequency, n2b = %0.2f Hz \"% n2b " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n2a = 260.00 Hz \n", + "The frequency, n2b = 252.00 Hz \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "nA=256 # in Hz\n", + "x=5 # in beats per sec\n", + "nB1=nA+x \n", + "nB2=nA-x \n", + "print \"The frequency, nB = %0.f Hz or %0.f Hz\" %(nB1, nB2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, nB = 261 Hz or 251 Hz\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "nB=512 # in Hz\n", + "x=5 # in beats per sec\n", + "nA1=nB+x \n", + "nA2=nB-x \n", + "print \"The frequency of A, nA = %0.f Hz or %0.f Hz\" %(nA1, nA2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of A, nA = 517 Hz or 507 Hz\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Velocity of sound\n", + "#given data :\n", + "lamda1=1 # in m\n", + "lamda2=1.01 # in m\n", + "a=10/3 # in beats/sec\n", + "v=a/((lamda2-lamda1)/(lamda1*lamda2)) \n", + "print \"The velocity of sound, v = %0.1f m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound, v = 336.7 m/s \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "n=273 #\n", + "b1=4 #beats per second\n", + "b2=b1-1 #\n", + "t1=15 #degree celsius\n", + "t2=10 #degree celsius\n", + "v1510=sqrt((n+t1)/(n+t2)) #\n", + "n=((b2*v1510-b1)/(1-v1510)) #\n", + "print \"Frequency = %0.2f Hz \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 110.70 Hz \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "b1=10 #beats per second\n", + "f1=300 #Hz\n", + "b2=15 #beats per second\n", + "f2=325 #Hz\n", + "n1=f1-b1 #Hz\n", + "n2=f1+b1 #Hz\n", + "n3=f2-b2 #Hz\n", + "n4=f2+b2 #Hz\n", + "print \"Frequency = %0.2f Hz \" %n2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 310.00 Hz \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Velocity of sound\n", + "#given data :\n", + "lamda1=5 # in m\n", + "lamda2=5.5 # in m\n", + "a=6 # beats/sec\n", + "v=a/((lamda2-lamda1)/(lamda1*lamda2)) \n", + "print \"The velocity of sound, v = %0.2f m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound, v = 330.00 m/s \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "b1=5 #beats per second\n", + "fr=384 #Hz\n", + "fo=fr-b1 #Hz\n", + "print \"Frequency = %0.2f Hz \" %fo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 379.00 Hz \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "b1=4 #beats per second\n", + "fr=256 #Hz\n", + "fo1=fr+b1 #Hz\n", + "fo2=fr-b1 #Hz\n", + "print \"Frequency = %0.f Hz or %0.f Hz\" %(fo1,fo2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 260 Hz or 252 Hz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Frequency,wavelength, velocity and amplitude\n", + "#given data :\n", + "a=6 # in cm\n", + "lamda=10 # in cm\n", + "T=1/10 # in sec\n", + "print \"Wavelength of progressive wave = %0.2f cm \" %lamda\n", + "n=1/T \n", + "print \"Frequency of progressive wave, n = %0.2f per sec \" %n\n", + "v=n*lamda \n", + "print \"The velocity, v = %0.2f cm/s \" %v\n", + "print \"The amplitude, a = %0.2f cm \" %a" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of progressive wave = 10.00 cm \n", + "Frequency of progressive wave, n = 10.00 per sec \n", + "The velocity, v = 100.00 cm/s \n", + "The amplitude, a = 6.00 cm \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24, page 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Velocity\n", + "#given data :\n", + "c=3*10**8 # in m/s\n", + "lamda1=4000 # in Angustrom\n", + "lamda2=5000 # in Aungustrom\n", + "mu1=1.540 \n", + "mu2=1.530 \n", + "vg=c*((mu1*lamda1)-(mu2*lamda2))/(mu1*mu2*(lamda1-lamda2)) \n", + "print \"The velocity, vg = %0.3e m/s \" %vg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity, vg = 1.897e+08 m/s \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25, page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Velocity\n", + "#given data :\n", + "v=1.8*10**8 # in m/s\n", + "lamda=3.6*10**-7 # in m\n", + "dv_dlamda=3.8*10**13 # in per sec\n", + "vg=v-(lamda*dv_dlamda) \n", + "print \"The group velocity, vg = %0.2e m/s \" %vg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The group velocity, vg = 1.66e+08 m/s \n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb new file mode 100755 index 00000000..eb4bafc3 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter8.ipynb @@ -0,0 +1,563 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8, Vibrations of strings & membranes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt\n", + "# Speed\n", + "#given data :\n", + "m1=0.1 # in kg\n", + "g=9.81 # in m/s**2\n", + "T=m1*g # N\n", + "A=10**-6 # in m**2\n", + "p=9.81*10**3 # in kg/m**3\n", + "m=A*p # in kg/m\n", + "v=sqrt(T/m) \n", + "print \"The speed of transverse waves, v = %0.f m/s \" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of transverse waves, v = 10 m/s \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# tensile stress\n", + "#given data :\n", + "p=8000 # in kg/m**3\n", + "v=340 # in m/s\n", + "TbyA=v**2*p*10**-2 \n", + "print \"Tensile stress = %0.2e N/m^2 \" %TbyA" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tensile stress = 9.25e+06 N/m^2 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Tension\n", + "#given data :\n", + "M=2*10**-3 # in kg\n", + "l=35*10**-2 # in m\n", + "n=500 # in Hz\n", + "m=M/l # in kg/m\n", + "T=4*n**2*l**2*m \n", + "print \"Tension, T = %0.f N \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension, T = 700 N \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "T=625 # in N\n", + "T1=100 # in N\n", + "l=1/2 \n", + "n=240 # in Hz\n", + "n1=1/l*(sqrt(T1/T))*n \n", + "print \"The frequency, n1 = %0.f Hz \" %n1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n1 = 192 Hz \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# initial tension\n", + "rt=2/3 #ratio\n", + "mi=5 #kg wt\n", + "M=((1/rt)**2)-1 #\n", + "mo=mi/M #kg wt\n", + "print \"Initial tension in string = %0.2f kg-wt \" % mo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial tension in string = 4.00 kg-wt \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# speed,stress and change in frequency\n", + "n=175 #Hz\n", + "l=1.5 #m\n", + "v=2*n*l #m/s\n", + "d=7.8*10**3 #kg/m**3\n", + "st=v**2*d #N/m**2\n", + "per=3 #% increament\n", + "T=1 #assume\n", + "td=(1+per/100)*T #\n", + "x=(((1/2)*(per/100))) #\n", + "td=x*100 #\n", + "print \"Velocity = %0.2f m/s \" % v\n", + "print \"Stress = %0.2e N/m^2 \" %st\n", + "print \"Percentage change in frequency = %0.1f %% \" %td" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 525.00 m/s \n", + "Stress = 2.15e+09 N/m^2 \n", + "Percentage change in frequency = 1.5 % \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Frequency\n", + "#given data :\n", + "l=.50 # in m\n", + "m1=25 # in kg\n", + "m2=1.44*10**-3 # in kg\n", + "g=9.81 # in m/s**2\n", + "T=m1*g \n", + "m=m2/l \n", + "p=2 \n", + "n=(p/(2*l))*sqrt(T/m) \n", + "print \"The frequency, n = %0.1f \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency, n = 583.6 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "l1=90 #cm\n", + "d1=0.05 #cm\n", + "d2=0.0625 #cm\n", + "l2=60 #cm\n", + "n1=200 #Hz\n", + "n2=((l1*d1*n1)/(l2*d2)) #Hz\n", + "print \"Frequency = %0.2f Hz \" % n2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 240.00 Hz \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# tension\n", + "n21=3/2 #\n", + "r21=3/4 #\n", + "t1=2.048 #kg. wt\n", + "t2=(n21*r21)**2*t1 #kg weight\n", + "n31=9/4 #\n", + "r31=2/4 #\n", + "t3=(n31*r31)**2*t1 #kg-weight\n", + "n41=27/8 #\n", + "r41=1/4 #\n", + "t4=(n41*r41)**2*t1 #kg-weight\n", + "print \"Tension, T2 = %0.3f kg weight\"%t2\n", + "print \"Tension, T3 = %0.3f kg weight\"%t3\n", + "print \"Tension, T4 = %0.3f kg weight\"%t4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension, T2 = 2.592 kg weight\n", + "Tension, T3 = 2.592 kg weight\n", + "Tension, T4 = 1.458 kg weight\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# velocity\n", + "l1=20 #cm\n", + "v1=600 #cm**-1\n", + "n1=v1/4 #\n", + "v1=2*n1*l1*10**-2 #m/sec\n", + "v2=sqrt(2)*v1 #m/s\n", + "print \"Velocity of the waves = %0.f m/s \" %v1\n", + "print \"Velocity of waves when tension of the string is doubled = %.f m/s \" %round(v2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of the waves = 60 m/s \n", + "Velocity of waves when tension of the string is doubled = 85 m/s \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "nb=6 #beats\n", + "l1=20 #cm\n", + "l2=21 #cm\n", + "x=l2/l1 #\n", + "n=(x*nb+nb)/(x-1) #\n", + "print \"Frequency = %0.f Hz \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 246 Hz \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "nb=4 #beats\n", + "l1=70 #cm\n", + "l2=70-1 #cm\n", + "x=l2/l1 #\n", + "n=(x*nb)/(1-x) #\n", + "print \"Frequency = %0.f Hz \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 276 Hz \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# length\n", + "n123=1/3/15 #\n", + "tl=105 #cm\n", + "l123=15/5/1 #\n", + "k=tl/21 #\n", + "l1=15*k #cm\n", + "l2=5*k #cm\n", + "l3=k #cm\n", + "print \"l1 length = %0.f cm\"%l1\n", + "print \"l2 length = %0.f cm\"%l2\n", + "print \"l3 length = %0.f cm\"%l3\n", + "#length l2 is calculated wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "l1 length = 75 cm\n", + "l2 length = 25 cm\n", + "l3 length = 5 cm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page 355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# frequency\n", + "l=2.5 #m\n", + "m1=0.001 #kg\n", + "tn=4 #N\n", + "m=m1/l #kg/m\n", + "n=((1/(2*l))*sqrt(tn/m)) #Hz\n", + "print \"Frequency = %0.2f Hz \" %n\n", + "print \"Frequencies stopped are\",5*n,\"Hz, \",10*n,\"Hz, \",15*n,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 20.00 Hz \n", + "Frequencies stopped are 100.0 Hz, 200.0 Hz, 300.0 Hz\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# frequency\n", + "l=1 #m\n", + "m1=0.5 #kg\n", + "tn=200 #N\n", + "m=m1/l #kg/m\n", + "n=((1/(2*l))*sqrt(tn/m)) #Hz\n", + "print \"Frequency = %0.2f Hz \" %n\n", + "w=2*pi*n #\n", + "print \"Ratio of three frequencies is %0.1f:%0.1f:%0.1f\"%(w,2*w,3*w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 10.00 Hz \n", + "Ratio of three frequencies is 62.8:125.7:188.5\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb new file mode 100755 index 00000000..7e5e33c8 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter9.ipynb @@ -0,0 +1,493 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9, Longitudinal acoustic waves in air" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "# Pressure amplitude, Energy density and Energy flux\n", + "#given data :\n", + "A=1*10**-5 # in m\n", + "n=500 # in per sec\n", + "v=340 # in m/s\n", + "p=1.29 # in kg/m**3\n", + "Pa=2*pi*n*v*p*A \n", + "print \"Pressure amplitude, Pa = %0.1f N/m^2 \"%Pa\n", + "Ed=2*pi**2*n**2*p*A**2 \n", + "print \"Energy density, Ed = %0.1e J/m^3 \" %Ed\n", + "Ev=Ed*v \n", + "print \"Energy flux, Ev = %0.2f J/m^2-s \" %Ev" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure amplitude, Pa = 13.8 N/m^2 \n", + "Energy density, Ed = 6.4e-04 J/m^3 \n", + "Energy flux, Ev = 0.22 J/m^2-s \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Pressure \n", + "#given data :\n", + "gama=1.4 \n", + "u=10**-3 # in m/s\n", + "v=340 # in m/s\n", + "P=10**5 # in N/m**2\n", + "p=gama*P*u/v \n", + "print \"The pressure, p = %0.2f N/m^2 \" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure, p = 0.41 N/m^2 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# The amplitude \n", + "#given data :\n", + "n=350 # in Hz\n", + "v=330 # in m/s\n", + "p=1.293 # in kg/m**3\n", + "I=1*10**-6 # in W/m**2\n", + "A=sqrt(I/(2*pi*n**2*p*v)) \n", + "print \"The amplitude of wave, A = %0.2e m \" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude of wave, A = 5.52e-08 m \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Velocity, Amplitude of pressure and particle velocity amplitude\n", + "#given data :\n", + "gama=1.4 \n", + "P=1.013*10**5 \n", + "p1=1.29 # in kg/m**3\n", + "A=2.5*10**-7 # in m\n", + "v=sqrt(gama*P/p1) \n", + "print \"The velocity, v = %0.1f m/s \" %v\n", + "n=1000 # in Hz\n", + "lamda=v/n \n", + "print \"Wavelength, lamda = %0.4f m \" %lamda\n", + "p=p1*v*2*pi*n*A \n", + "print \"Amplitude of pressure, p = %0.2f N/m^2 \" % p\n", + "u=2*pi*n*A \n", + "print \"Particle velocity amplitude, u = %0.2e m/s \" %u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity, v = 331.6 m/s \n", + "Wavelength, lamda = 0.3316 m \n", + "Amplitude of pressure, p = 0.67 N/m^2 \n", + "Particle velocity amplitude, u = 1.57e-03 m/s \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "# Amplitude\n", + "#given data :\n", + "v=(1/3)*10**3 # in m/s\n", + "p=1.25 # in kg/m**3\n", + "E=v**2*p \n", + "n=10**4 # in rad/sec\n", + "print \"Bulk modulus of medium, E = %0.2e N/m^2\" %E\n", + "I=10**-12 # in W/m**2\n", + "A=sqrt(I/(2*pi**2*n**2*p*v)) \n", + "print \"Amplitude of wave, A = %0.2e m \" %A\n", + "P=sqrt(2*I*p*v) \n", + "print \"Pressure amplitude, P = %0.2e N/m^2 \" %P\n", + "# answer A and E is wrong in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bulk modulus of medium, E = 1.39e+05 N/m^2\n", + "Amplitude of wave, A = 1.10e-12 m \n", + "Pressure amplitude, P = 2.89e-05 N/m^2 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Root mean squre velocity\n", + "#given data :\n", + "vs=330 # in m/s\n", + "gama=1.41 \n", + "c=round(sqrt(3/gama)*vs) \n", + "print \"The root mean square velocity of modulus, c = %0.f m/s \"%c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The root mean square velocity of modulus, c = 481 m/s \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Acoustic power entering\n", + "#given data :\n", + "A=1*2 # in m**2\n", + "a=80 # in dB\n", + "I0=10**-12 # in W/m**2\n", + "IbyI0=10**(80/10) \n", + "I=I0*IbyI0 \n", + "Ape=I*A \n", + "print \"Acoustic power entering the room = %0.e Watt \" %Ape" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acoustic power entering the room = 2e-04 Watt \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "# Acoustic intensity level\n", + "#given data :\n", + "Pr=3 # in W\n", + "r=15 # in m\n", + "I=Pr/(4*pi*r**2) # in W/m**2\n", + "I0=10**-12 # in W/m**2\n", + "L=round(10*log10(I/I0)) \n", + "print \"Acoustic intensity level, L = %0.f dB \" %L" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acoustic intensity level, L = 90 dB \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "n2=200 #second**-1\n", + "l21=2 #\n", + "f=l21*n2 #\n", + "print \"Frequency = %0.f second^-1 \" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 400 second^-1 \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# length\n", + "l1=66 #cm\n", + "v=330 #m/s\n", + "nbs=5 #beats/sec\n", + "x=(2*(v-(nbs*2*l1*10**-2))/(v*2*l1*10**-2)) #\n", + "l2=1/x #cm\n", + "print \"Length = %0.1f cm \"%(l2*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length = 67.3 cm \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# length\n", + "f=110 #Hz\n", + "v=330 #m/s\n", + "l=v/(2*f) #m\n", + "print \"Fundamental frequency = %0.f Hz\" %f\n", + "print \"Length = %0.1f m\" %l" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fundamental frequency = 110 Hz\n", + "Length = 1.5 m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# equation,frequency,amplitude ,wavelength and distance\n", + "#y=6*(sin(2*pi*x)/6)*cos(160*pi*t) #given equation\n", + "a=3 #cm\n", + "T=(2*pi)/(160*pi) #sec\n", + "h=((2*pi*6)/(2*pi)) #cm\n", + "print \"wave equation is 3*sin((160*pi*t)+(2*pi*x)/6)\"\n", + "print \"Amplitude = %0.2f cm \" %a\n", + "print \"Frequency = %0.2f Hz \" %(1/T)\n", + "print h,\"wavelength is,(cm)=\"\n", + "db=h/2 #\n", + "print \"Distance between consecutive antinodes = %0.2f cm\" %db" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wave equation is 3*sin((160*pi*t)+(2*pi*x)/6)\n", + "Amplitude = 3.00 cm \n", + "Frequency = 80.00 Hz \n", + "6.0 wavelength is,(cm)=\n", + "Distance between consecutive antinodes = 3.00 cm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page 393" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos, pi\n", + "# length,amlitude,pressure\n", + "f=440 #Hz\n", + "v=330 #m/s\n", + "l=((5*v)/(4*f))*100 #cm\n", + "print \"Length, L = %0.2f cm \" %l" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length, L = 93.75 cm \n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} 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/Chapter10_1.ipynb b/Power_Electronics/Chapter10_1.ipynb deleted file mode 100755 index cbc3cb90..00000000 --- a/Power_Electronics/Chapter10_1.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/Chapter10_2.ipynb b/Power_Electronics/Chapter10_2.ipynb deleted file mode 100755 index cbc3cb90..00000000 --- a/Power_Electronics/Chapter10_2.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/Chapter10_3.ipynb b/Power_Electronics/Chapter10_3.ipynb deleted file mode 100755 index cbc3cb90..00000000 --- a/Power_Electronics/Chapter10_3.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/Chapter10_4.ipynb b/Power_Electronics/Chapter10_4.ipynb deleted file mode 100755 index cbc3cb90..00000000 --- a/Power_Electronics/Chapter10_4.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/Chapter11_1.ipynb b/Power_Electronics/Chapter11_1.ipynb deleted file mode 100755 index d2317d28..00000000 --- a/Power_Electronics/Chapter11_1.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/Chapter11_2.ipynb b/Power_Electronics/Chapter11_2.ipynb deleted file mode 100755 index d2317d28..00000000 --- a/Power_Electronics/Chapter11_2.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/Chapter11_3.ipynb b/Power_Electronics/Chapter11_3.ipynb deleted file mode 100755 index d2317d28..00000000 --- a/Power_Electronics/Chapter11_3.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/Chapter11_4.ipynb b/Power_Electronics/Chapter11_4.ipynb deleted file mode 100755 index d2317d28..00000000 --- a/Power_Electronics/Chapter11_4.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/Chapter12_1.ipynb b/Power_Electronics/Chapter12_1.ipynb deleted file mode 100755 index f8605d69..00000000 --- a/Power_Electronics/Chapter12_1.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/Chapter12_2.ipynb b/Power_Electronics/Chapter12_2.ipynb deleted file mode 100755 index f8605d69..00000000 --- a/Power_Electronics/Chapter12_2.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/Chapter12_3.ipynb b/Power_Electronics/Chapter12_3.ipynb deleted file mode 100755 index f8605d69..00000000 --- a/Power_Electronics/Chapter12_3.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/Chapter12_4.ipynb b/Power_Electronics/Chapter12_4.ipynb deleted file mode 100755 index f8605d69..00000000 --- a/Power_Electronics/Chapter12_4.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/Chapter13_1.ipynb b/Power_Electronics/Chapter13_1.ipynb deleted file mode 100755 index 62d2a926..00000000 --- a/Power_Electronics/Chapter13_1.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/Chapter13_2.ipynb b/Power_Electronics/Chapter13_2.ipynb deleted file mode 100755 index 62d2a926..00000000 --- a/Power_Electronics/Chapter13_2.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/Chapter13_3.ipynb b/Power_Electronics/Chapter13_3.ipynb deleted file mode 100755 index 62d2a926..00000000 --- a/Power_Electronics/Chapter13_3.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/Chapter13_4.ipynb b/Power_Electronics/Chapter13_4.ipynb deleted file mode 100755 index 62d2a926..00000000 --- a/Power_Electronics/Chapter13_4.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/Chapter14_1.ipynb b/Power_Electronics/Chapter14_1.ipynb deleted file mode 100755 index a9c3a3f1..00000000 --- a/Power_Electronics/Chapter14_1.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/Chapter14_2.ipynb b/Power_Electronics/Chapter14_2.ipynb deleted file mode 100755 index a9c3a3f1..00000000 --- a/Power_Electronics/Chapter14_2.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/Chapter14_3.ipynb b/Power_Electronics/Chapter14_3.ipynb deleted file mode 100755 index a9c3a3f1..00000000 --- a/Power_Electronics/Chapter14_3.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/Chapter14_4.ipynb b/Power_Electronics/Chapter14_4.ipynb deleted file mode 100755 index a9c3a3f1..00000000 --- a/Power_Electronics/Chapter14_4.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/Chapter2_1.ipynb b/Power_Electronics/Chapter2_1.ipynb deleted file mode 100755 index 1872c9f4..00000000 --- a/Power_Electronics/Chapter2_1.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/Chapter2_2.ipynb b/Power_Electronics/Chapter2_2.ipynb deleted file mode 100755 index 1872c9f4..00000000 --- a/Power_Electronics/Chapter2_2.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/Chapter2_3.ipynb b/Power_Electronics/Chapter2_3.ipynb deleted file mode 100755 index 1872c9f4..00000000 --- a/Power_Electronics/Chapter2_3.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/Chapter2_4.ipynb b/Power_Electronics/Chapter2_4.ipynb deleted file mode 100755 index 1872c9f4..00000000 --- a/Power_Electronics/Chapter2_4.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/Chapter3_1.ipynb b/Power_Electronics/Chapter3_1.ipynb deleted file mode 100755 index 2e53ef9d..00000000 --- a/Power_Electronics/Chapter3_1.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/Chapter3_2.ipynb b/Power_Electronics/Chapter3_2.ipynb deleted file mode 100755 index 2e53ef9d..00000000 --- a/Power_Electronics/Chapter3_2.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/Chapter3_3.ipynb b/Power_Electronics/Chapter3_3.ipynb deleted file mode 100755 index 2e53ef9d..00000000 --- a/Power_Electronics/Chapter3_3.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/Chapter3_4.ipynb b/Power_Electronics/Chapter3_4.ipynb deleted file mode 100755 index 2e53ef9d..00000000 --- a/Power_Electronics/Chapter3_4.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/Chapter4_1.ipynb b/Power_Electronics/Chapter4_1.ipynb deleted file mode 100755 index 22311574..00000000 --- a/Power_Electronics/Chapter4_1.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/Chapter4_2.ipynb b/Power_Electronics/Chapter4_2.ipynb deleted file mode 100755 index 22311574..00000000 --- a/Power_Electronics/Chapter4_2.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/Chapter4_3.ipynb b/Power_Electronics/Chapter4_3.ipynb deleted file mode 100755 index 22311574..00000000 --- a/Power_Electronics/Chapter4_3.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/Chapter4_4.ipynb b/Power_Electronics/Chapter4_4.ipynb deleted file mode 100755 index 22311574..00000000 --- a/Power_Electronics/Chapter4_4.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/Chapter5_1.ipynb b/Power_Electronics/Chapter5_1.ipynb deleted file mode 100755 index 1d261f20..00000000 --- a/Power_Electronics/Chapter5_1.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/Chapter5_2.ipynb b/Power_Electronics/Chapter5_2.ipynb deleted file mode 100755 index 1d261f20..00000000 --- a/Power_Electronics/Chapter5_2.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/Chapter5_3.ipynb b/Power_Electronics/Chapter5_3.ipynb deleted file mode 100755 index 1d261f20..00000000 --- a/Power_Electronics/Chapter5_3.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/Chapter5_4.ipynb b/Power_Electronics/Chapter5_4.ipynb deleted file mode 100755 index 1d261f20..00000000 --- a/Power_Electronics/Chapter5_4.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/Chapter6_1.ipynb b/Power_Electronics/Chapter6_1.ipynb deleted file mode 100755 index dff6564b..00000000 --- a/Power_Electronics/Chapter6_1.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/Chapter6_2.ipynb b/Power_Electronics/Chapter6_2.ipynb deleted file mode 100755 index dff6564b..00000000 --- a/Power_Electronics/Chapter6_2.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/Chapter6_3.ipynb b/Power_Electronics/Chapter6_3.ipynb deleted file mode 100755 index dff6564b..00000000 --- a/Power_Electronics/Chapter6_3.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/Chapter6_4.ipynb b/Power_Electronics/Chapter6_4.ipynb deleted file mode 100755 index dff6564b..00000000 --- a/Power_Electronics/Chapter6_4.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/Chapter7_1.ipynb b/Power_Electronics/Chapter7_1.ipynb deleted file mode 100755 index 726160c8..00000000 --- a/Power_Electronics/Chapter7_1.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/Chapter7_2.ipynb b/Power_Electronics/Chapter7_2.ipynb deleted file mode 100755 index 726160c8..00000000 --- a/Power_Electronics/Chapter7_2.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/Chapter7_3.ipynb b/Power_Electronics/Chapter7_3.ipynb deleted file mode 100755 index 726160c8..00000000 --- a/Power_Electronics/Chapter7_3.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/Chapter7_4.ipynb b/Power_Electronics/Chapter7_4.ipynb deleted file mode 100755 index 726160c8..00000000 --- a/Power_Electronics/Chapter7_4.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/Chapter8_1.ipynb b/Power_Electronics/Chapter8_1.ipynb deleted file mode 100755 index 721a9faf..00000000 --- a/Power_Electronics/Chapter8_1.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/Chapter8_2.ipynb b/Power_Electronics/Chapter8_2.ipynb deleted file mode 100755 index 721a9faf..00000000 --- a/Power_Electronics/Chapter8_2.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/Chapter8_3.ipynb b/Power_Electronics/Chapter8_3.ipynb deleted file mode 100755 index 721a9faf..00000000 --- a/Power_Electronics/Chapter8_3.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/Chapter8_4.ipynb b/Power_Electronics/Chapter8_4.ipynb deleted file mode 100755 index 721a9faf..00000000 --- a/Power_Electronics/Chapter8_4.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/Chapter9_1.ipynb b/Power_Electronics/Chapter9_1.ipynb deleted file mode 100755 index 052c4736..00000000 --- a/Power_Electronics/Chapter9_1.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/Chapter9_2.ipynb b/Power_Electronics/Chapter9_2.ipynb deleted file mode 100755 index 052c4736..00000000 --- a/Power_Electronics/Chapter9_2.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/Chapter9_3.ipynb b/Power_Electronics/Chapter9_3.ipynb deleted file mode 100755 index 052c4736..00000000 --- a/Power_Electronics/Chapter9_3.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/Chapter9_4.ipynb b/Power_Electronics/Chapter9_4.ipynb deleted file mode 100755 index 052c4736..00000000 --- a/Power_Electronics/Chapter9_4.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/Power_electronics_ch_1.ipynb b/Power_Electronics/Power_electronics_ch_1.ipynb deleted file mode 100755 index 7a715072..00000000 --- a/Power_Electronics/Power_electronics_ch_1.ipynb +++ /dev/null @@ -1,449 +0,0 @@ -{ - "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", - "\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\neHh4aiC88eepEfzxxx/o2LEj1zIqxMbGBmfPnuVaBk8NgDf+PArh4sWLaN++PQwMDGBsbIxPP/0U\nN27c4FqWyjl48CAaN25c6nmhUAhTU1MEBweX+3qBQACBQAAA8Pf3x8iRI5Wik4eHN/48cpOVlYVe\nvXph5syZyMjIQHJyMvz8/FCnTh2upSkEkUgkddt+/fohMzMT586dK/F8aGgoat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Pn0q0CsGmsugUgk1TUlLg6+uLgoICFBQU\nYNiwYejSpYugfuuy6hSCPQvzaTpHUVuyIC8Gg8Gohqg8yIvBYDAY/MOcP4PBYFRDmPNnMBiMaghz\n/gwGg1ENYc6fwWAwqiHM+TMYDEY1hDl/BoPBqIYw589gMBjVkP8DYQvKpBZyZSsAAAAASUVORK5C\nYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 97 - }, - { - "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/Power_electronics_ch_10.ipynb b/Power_Electronics/Power_electronics_ch_10.ipynb deleted file mode 100755 index a1e99a45..00000000 --- a/Power_Electronics/Power_electronics_ch_10.ipynb +++ /dev/null @@ -1,283 +0,0 @@ -{ - "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/Power_electronics_ch_10_1.ipynb b/Power_Electronics/Power_electronics_ch_10_1.ipynb deleted file mode 100755 index a1e99a45..00000000 --- a/Power_Electronics/Power_electronics_ch_10_1.ipynb +++ /dev/null @@ -1,283 +0,0 @@ -{ - "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/Power_electronics_ch_10_2.ipynb b/Power_Electronics/Power_electronics_ch_10_2.ipynb deleted file mode 100755 index a1e99a45..00000000 --- a/Power_Electronics/Power_electronics_ch_10_2.ipynb +++ /dev/null @@ -1,283 +0,0 @@ -{ - "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/Power_electronics_ch_10_3.ipynb b/Power_Electronics/Power_electronics_ch_10_3.ipynb deleted file mode 100755 index a1e99a45..00000000 --- a/Power_Electronics/Power_electronics_ch_10_3.ipynb +++ /dev/null @@ -1,283 +0,0 @@ -{ - "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/Power_electronics_ch_12.ipynb b/Power_Electronics/Power_electronics_ch_12.ipynb deleted file mode 100755 index 46f69125..00000000 --- a/Power_Electronics/Power_electronics_ch_12.ipynb +++ /dev/null @@ -1,1030 +0,0 @@ -{ - "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/Power_electronics_ch_12_1.ipynb b/Power_Electronics/Power_electronics_ch_12_1.ipynb deleted file mode 100755 index 46f69125..00000000 --- a/Power_Electronics/Power_electronics_ch_12_1.ipynb +++ /dev/null @@ -1,1030 +0,0 @@ -{ - "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/Power_electronics_ch_12_2.ipynb b/Power_Electronics/Power_electronics_ch_12_2.ipynb deleted file mode 100755 index 46f69125..00000000 --- a/Power_Electronics/Power_electronics_ch_12_2.ipynb +++ /dev/null @@ -1,1030 +0,0 @@ -{ - "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/Power_electronics_ch_12_3.ipynb b/Power_Electronics/Power_electronics_ch_12_3.ipynb deleted file mode 100755 index 46f69125..00000000 --- a/Power_Electronics/Power_electronics_ch_12_3.ipynb +++ /dev/null @@ -1,1030 +0,0 @@ -{ - "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/Power_electronics_ch_13.ipynb b/Power_Electronics/Power_electronics_ch_13.ipynb deleted file mode 100755 index d435ac89..00000000 --- a/Power_Electronics/Power_electronics_ch_13.ipynb +++ /dev/null @@ -1,965 +0,0 @@ -{ - "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": 3, - "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/Power_electronics_ch_13_1.ipynb b/Power_Electronics/Power_electronics_ch_13_1.ipynb deleted file mode 100755 index d435ac89..00000000 --- a/Power_Electronics/Power_electronics_ch_13_1.ipynb +++ /dev/null @@ -1,965 +0,0 @@ -{ - "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": 3, - "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/Power_electronics_ch_13_2.ipynb b/Power_Electronics/Power_electronics_ch_13_2.ipynb deleted file mode 100755 index d435ac89..00000000 --- a/Power_Electronics/Power_electronics_ch_13_2.ipynb +++ /dev/null @@ -1,965 +0,0 @@ -{ - "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": 3, - "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/Power_electronics_ch_13_3.ipynb b/Power_Electronics/Power_electronics_ch_13_3.ipynb deleted file mode 100755 index 2e5b592a..00000000 --- a/Power_Electronics/Power_electronics_ch_13_3.ipynb +++ /dev/null @@ -1,965 +0,0 @@ -{ - "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/Power_electronics_ch_1_1.ipynb b/Power_Electronics/Power_electronics_ch_1_1.ipynb deleted file mode 100755 index 47f33435..00000000 --- a/Power_Electronics/Power_electronics_ch_1_1.ipynb +++ /dev/null @@ -1,449 +0,0 @@ -{ - "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\neHh4aiC88eepEfzxxx/o2LEj1zIqxMbGBmfPnuVaBk8NgDf+PArh4sWLaN++PQwMDGBsbIxPP/0U\nN27c4FqWyjl48CAaN25c6nmhUAhTU1MEBweX+3qBQACBQAAA8Pf3x8iRI5Wik4eHN/48cpOVlYVe\nvXph5syZyMjIQHJyMvz8/FCnTh2upSkEkUgkddt+/fohMzMT586dK/F8aGgoatWqhe7duytaHg+P\nTPDGn0duoqOjIRAIMGTIEAgEAtStWxfe3t5o0aKFuM2OHTvg6OgIIyMjdO/eHQkJCeJzDx8+hLe3\nN4yNjWFubo5Vq1YBAAoKCjBr1ixYWVnBysoKs2fPRmFhIQA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1hDl/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/Power_electronics_ch_1_2.ipynb b/Power_Electronics/Power_electronics_ch_1_2.ipynb deleted file mode 100755 index 47f33435..00000000 --- a/Power_Electronics/Power_electronics_ch_1_2.ipynb +++ /dev/null @@ -1,449 +0,0 @@ -{ - "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\neHh4aiC88eepEfzxxx/o2LEj1zIqxMbGBmfPnuVaBk8NgDf+PArh4sWLaN++PQwMDGBsbIxPP/0U\nN27c4FqWyjl48CAaN25c6nmhUAhTU1MEBweX+3qBQACBQAAA8Pf3x8iRI5Wik4eHN/48cpOVlYVe\nvXph5syZyMjIQHJyMvz8/FCnTh2upSkEkUgkddt+/fohMzMT586dK/F8aGgoatWqhe7duytaHg+P\nTPDGn0duoqOjIRAIMGTIEAgEAtStWxfe3t5o0aKFuM2OHTvg6OgIIyMjdO/eHQkJCeJzDx8+hLe3\nN4yNjWFubo5Vq1YBAAoKCjBr1ixYWVnBysoKs2fPRmFhIQAgPDwcDRo0wPr162FmZgZLS0v88ccf\n4j7T09PRu3dv6Ovrw8PDA7GxsSU0z5w5Ew0bNoS+vj7c3d1x8eJF8Tl/f38MHDgQI0eOhL6+Plav\nXg1tbW28fv1a3ObWrVswNTUt9cNQp04dDB48GLt37y7x/O7duzF8+HBoaGjgxIkTcHJygqGhITp3\n7oyoqKhScxoaGopVq1bh0KFD0NXVRc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lBQQEcHBxgZGSETp06FUvnLhR7lqVTCPacNGkSli1bBnV16S5bHluq1PnL\nGhjx+ZlNlQEVsozVunVrJCUl4caNGwgICJBay0AI8GlHWRGaLTMzM9G3b1+sWrUKOjo6xV4Xik1L\n0ykUm6qrq+P69et49uwZzp8/LzVdghDsWZZOvu157NgxGBoawtHRsdQ7kPLaUqXO39jYGElJSZLH\nSUlJaNy4caltnj17ptKi77Jo1NXVldwqdu/eHXl5eXj79q3KNMoC33aUFSHZMi8vD3369MHQoUOl\n/sCFYtOydArJpgCgr68PLy8v/PPPP0WeF4o9P1GSTr7tefnyZRw5cgTNmzfHoEGDcPbsWQwfPrxI\nG3lsqVLnXzjoKzc3F3v27IGPj0+RNj4+PggJCQEAREdHQyQSSQrFC0XjixcvJGfZmJgYEJHUeUI+\n4duOsiIUWxIR/Pz8YGNjg4kTJ0ptIwSbyqJTCDZ9/fo10tPTAQBZWVmIiIiAo6NjkTZCsKcsOvm2\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/Power_electronics_ch_1_3.ipynb b/Power_Electronics/Power_electronics_ch_1_3.ipynb deleted file mode 100755 index 47f33435..00000000 --- a/Power_Electronics/Power_electronics_ch_1_3.ipynb +++ /dev/null @@ -1,449 +0,0 @@ -{ - "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": "iVBORw0KGg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y4caltnj17ptKi77Jo1NXVldwqdu/eHXl5eXj79q3KNMoC33aUFSHZMi8vD3369MHQoUOl\n/sCFYtOydArJpgCgr68PLy8v/PPPP0WeF4o9P1GSTr7tefnyZRw5cgTNmzfHoEGDcPbsWQwfPrxI\nG3lsqVLnXzjoKzc3F3v27IGPj0+RNj4+PggJCQEAREdHQyQSSQrFC0XjixcvJGfZmJgYEJHUeUI+\n4duOsiIUWxIR/Pz8YGNjg4kTJ0ptIwSbyqJTCDZ9/fo10tPTAQBZWVmIiIiAo6NjkTZCsKcsOvm2\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/Power_electronics_ch_2.ipynb b/Power_Electronics/Power_electronics_ch_2.ipynb deleted file mode 100755 index 6e52e316..00000000 --- a/Power_Electronics/Power_electronics_ch_2.ipynb +++ /dev/null @@ -1,2357 +0,0 @@ -{ - "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/Power_electronics_ch_2_1.ipynb b/Power_Electronics/Power_electronics_ch_2_1.ipynb deleted file mode 100755 index 6e52e316..00000000 --- a/Power_Electronics/Power_electronics_ch_2_1.ipynb +++ /dev/null @@ -1,2357 +0,0 @@ -{ - "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/Power_electronics_ch_2_2.ipynb b/Power_Electronics/Power_electronics_ch_2_2.ipynb deleted file mode 100755 index 6e52e316..00000000 --- a/Power_Electronics/Power_electronics_ch_2_2.ipynb +++ /dev/null @@ -1,2357 +0,0 @@ -{ - "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/Power_electronics_ch_2_3.ipynb b/Power_Electronics/Power_electronics_ch_2_3.ipynb deleted file mode 100755 index 6e52e316..00000000 --- a/Power_Electronics/Power_electronics_ch_2_3.ipynb +++ /dev/null @@ -1,2357 +0,0 @@ -{ - "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/Power_electronics_ch_3.ipynb b/Power_Electronics/Power_electronics_ch_3.ipynb deleted file mode 100755 index 8f24e4d1..00000000 --- a/Power_Electronics/Power_electronics_ch_3.ipynb +++ /dev/null @@ -1,2276 +0,0 @@ -{ - "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/Power_electronics_ch_3_1.ipynb b/Power_Electronics/Power_electronics_ch_3_1.ipynb deleted file mode 100755 index 8f24e4d1..00000000 --- a/Power_Electronics/Power_electronics_ch_3_1.ipynb +++ /dev/null @@ -1,2276 +0,0 @@ -{ - "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/Power_electronics_ch_3_2.ipynb b/Power_Electronics/Power_electronics_ch_3_2.ipynb deleted file mode 100755 index 8f24e4d1..00000000 --- a/Power_Electronics/Power_electronics_ch_3_2.ipynb +++ /dev/null @@ -1,2276 +0,0 @@ -{ - "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/Power_electronics_ch_3_3.ipynb b/Power_Electronics/Power_electronics_ch_3_3.ipynb deleted file mode 100755 index 8f24e4d1..00000000 --- a/Power_Electronics/Power_electronics_ch_3_3.ipynb +++ /dev/null @@ -1,2276 +0,0 @@ -{ - "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/Power_electronics_ch_4.ipynb b/Power_Electronics/Power_electronics_ch_4.ipynb deleted file mode 100755 index c5ad12df..00000000 --- a/Power_Electronics/Power_electronics_ch_4.ipynb +++ /dev/null @@ -1,983 +0,0 @@ -{ - "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/Power_electronics_ch_4_1.ipynb b/Power_Electronics/Power_electronics_ch_4_1.ipynb deleted file mode 100755 index c5ad12df..00000000 --- a/Power_Electronics/Power_electronics_ch_4_1.ipynb +++ /dev/null @@ -1,983 +0,0 @@ -{ - "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/Power_electronics_ch_4_2.ipynb b/Power_Electronics/Power_electronics_ch_4_2.ipynb deleted file mode 100755 index c5ad12df..00000000 --- a/Power_Electronics/Power_electronics_ch_4_2.ipynb +++ /dev/null @@ -1,983 +0,0 @@ -{ - "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/Power_electronics_ch_4_3.ipynb b/Power_Electronics/Power_electronics_ch_4_3.ipynb deleted file mode 100755 index c5ad12df..00000000 --- a/Power_Electronics/Power_electronics_ch_4_3.ipynb +++ /dev/null @@ -1,983 +0,0 @@ -{ - "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/Power_electronics_ch_5.ipynb b/Power_Electronics/Power_electronics_ch_5.ipynb deleted file mode 100755 index eed0454a..00000000 --- a/Power_Electronics/Power_electronics_ch_5.ipynb +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "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/Power_electronics_ch_5_1.ipynb b/Power_Electronics/Power_electronics_ch_5_1.ipynb deleted file mode 100755 index eed0454a..00000000 --- a/Power_Electronics/Power_electronics_ch_5_1.ipynb +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "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/Power_electronics_ch_5_2.ipynb b/Power_Electronics/Power_electronics_ch_5_2.ipynb deleted file mode 100755 index eed0454a..00000000 --- a/Power_Electronics/Power_electronics_ch_5_2.ipynb +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "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/Power_electronics_ch_5_3.ipynb b/Power_Electronics/Power_electronics_ch_5_3.ipynb deleted file mode 100755 index eed0454a..00000000 --- a/Power_Electronics/Power_electronics_ch_5_3.ipynb +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "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/Power_electronics_ch_6.ipynb b/Power_Electronics/Power_electronics_ch_6.ipynb deleted file mode 100755 index 9456765e..00000000 --- a/Power_Electronics/Power_electronics_ch_6.ipynb +++ /dev/null @@ -1,852 +0,0 @@ -{ - "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/Power_electronics_ch_6_1.ipynb b/Power_Electronics/Power_electronics_ch_6_1.ipynb deleted file mode 100755 index 9456765e..00000000 --- a/Power_Electronics/Power_electronics_ch_6_1.ipynb +++ /dev/null @@ -1,852 +0,0 @@ -{ - "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/Power_electronics_ch_6_2.ipynb b/Power_Electronics/Power_electronics_ch_6_2.ipynb deleted file mode 100755 index 9456765e..00000000 --- a/Power_Electronics/Power_electronics_ch_6_2.ipynb +++ /dev/null @@ -1,852 +0,0 @@ -{ - "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/Power_electronics_ch_6_3.ipynb b/Power_Electronics/Power_electronics_ch_6_3.ipynb deleted file mode 100755 index 9456765e..00000000 --- a/Power_Electronics/Power_electronics_ch_6_3.ipynb +++ /dev/null @@ -1,852 +0,0 @@ -{ - "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/Power_electronics_ch_7.ipynb b/Power_Electronics/Power_electronics_ch_7.ipynb deleted file mode 100755 index 7288e1e0..00000000 --- a/Power_Electronics/Power_electronics_ch_7.ipynb +++ /dev/null @@ -1,204 +0,0 @@ -{ - "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/Power_electronics_ch_7_1.ipynb b/Power_Electronics/Power_electronics_ch_7_1.ipynb deleted file mode 100755 index 7288e1e0..00000000 --- a/Power_Electronics/Power_electronics_ch_7_1.ipynb +++ /dev/null @@ -1,204 +0,0 @@ -{ - "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/Power_electronics_ch_7_2.ipynb b/Power_Electronics/Power_electronics_ch_7_2.ipynb deleted file mode 100755 index 7288e1e0..00000000 --- a/Power_Electronics/Power_electronics_ch_7_2.ipynb +++ /dev/null @@ -1,204 +0,0 @@ -{ - "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/Power_electronics_ch_7_3.ipynb b/Power_Electronics/Power_electronics_ch_7_3.ipynb deleted file mode 100755 index 7288e1e0..00000000 --- a/Power_Electronics/Power_electronics_ch_7_3.ipynb +++ /dev/null @@ -1,204 +0,0 @@ -{ - "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/Power_electronics_ch_8.ipynb b/Power_Electronics/Power_electronics_ch_8.ipynb deleted file mode 100755 index 2f3270f0..00000000 --- a/Power_Electronics/Power_electronics_ch_8.ipynb +++ /dev/null @@ -1,576 +0,0 @@ -{ - "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/Power_electronics_ch_8_1.ipynb b/Power_Electronics/Power_electronics_ch_8_1.ipynb deleted file mode 100755 index 2f3270f0..00000000 --- a/Power_Electronics/Power_electronics_ch_8_1.ipynb +++ /dev/null @@ -1,576 +0,0 @@ -{ - "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/Power_electronics_ch_8_2.ipynb b/Power_Electronics/Power_electronics_ch_8_2.ipynb deleted file mode 100755 index 2f3270f0..00000000 --- a/Power_Electronics/Power_electronics_ch_8_2.ipynb +++ /dev/null @@ -1,576 +0,0 @@ -{ - "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/Power_electronics_ch_8_3.ipynb b/Power_Electronics/Power_electronics_ch_8_3.ipynb deleted file mode 100755 index 2f3270f0..00000000 --- a/Power_Electronics/Power_electronics_ch_8_3.ipynb +++ /dev/null @@ -1,576 +0,0 @@ -{ - "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/Power_electronics_ch_9.ipynb b/Power_Electronics/Power_electronics_ch_9.ipynb deleted file mode 100755 index 1b652a14..00000000 --- a/Power_Electronics/Power_electronics_ch_9.ipynb +++ /dev/null @@ -1,1272 +0,0 @@ -{ - "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", - "from pylab import *\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", - "%pylab 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", - "Populating the interactive namespace from numpy and matplotlib" - ] - }, - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n" - ] - }, - { - "output_type": "stream", - "stream": "stderr", - "text": [ - "WARNING: pylab import has clobbered these variables: ['f', 'info', 'linalg', 'draw_if_interactive', 'random', 'fft', 'power']\n", - "`%pylab --no-import-all` prevents importing * from pylab and numpy\n" - ] - }, - { - "metadata": {}, - "output_type": "display_data", - "png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVOW+B/DvAKN44SKog8ygY4DCyEUUcevxMqaAWqJp\nUpiKl2qbu9LsnLROFnYBup3SdrS74GW7My/1hGZKmIpaGhhgbEUTERSGSykgIiAC7/mDzQoUZIEw\nMPr9PM88z7qv3xplfedd6501CiGEABERkQxmHV0AERGZDoYGERHJxtAgIiLZGBpERCQbQ4OIiGRj\naBARkWwMDeqU9Ho9oqOjO7qMdnU3HWNERASeeOKJVq1rZWWFrKysti2I2g1Dgxr48ccfMXr0aNja\n2sLe3h5jxozBL7/8YvQ6FAoFFApFo/PCwsIwb948I1fU9m53jMa0YMECrF69+o628eKLL+Kzzz5r\ndrnGgvLq1avQarV3tH8yHouOLoA6j5KSEjz44IP45JNPEBwcjOvXr+PIkSPo2rVrR5fWpqqrq2Fu\nbt7RZbSpmpoamJl1zGfAlryfnSEk6Q4Jov84fvy4sLW1bXL+hg0bxOjRo8XTTz8tbGxshJubm9i/\nf780v7i4WCxatEj069dPqNVq8fLLL4vq6mppfnR0tHB3dxe9evUSgYGB4sKFC9K8uLg4MXjwYGFj\nYyOefvppMX78ePH555/fUsPevXtFly5dhFKpFD179hRDhw4VQghhMBjEtGnThJ2dnXBxcRGfffaZ\ntM6rr74qZs2aJebOnSusra1FdHS0OH/+vBg3bpywsrIS/v7+4m9/+5uYO3euEEKIgwcPCo1G02C/\nAwYMED/88IMQQoiamhoREREhnJ2dhb29vQgODhaFhYVNvm8xMTHC29tbWFtbC2dnZ/H9998LIYTQ\n6/Vi9erV4r/+67+ElZWVCAgIEJcuXZLWe/jhh4WDg4OwsbER48aNE6dOnZLmhYaGiiVLlogpU6aI\nHj16iP3794vdu3eLoUOHCmtra+Hk5CTCwsIa1HHkyBExatQoYWtrK5ycnMTGjRvFp59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uwjpWVFebPny/9fG5TunTpgsDAQACAp6cnJkyYAHNzc3h4eCAr\nK0tarl+/fg3GidpK0xdyie4B9U/+QogGLYcePXo0u46FhUWDex4VFRXScGhoKMLDw2XXsnz5cgwb\nNgwLFy4EUHsvZdiwYVAoFJg+fTrCwsKgVCql5c3MzNClSxdpuP7N/JuPhaitsKVB9yxzc3NkZWUh\nIyMDALB582aMHz/+luXc3NyQlZWF8+fPA6h9tHTdCVmr1SI5ORkAkJycjMzMTCgUCkycOBFfffUV\n/vjjDwBAYWGhdK/D0dFRuuldX69evRAcHIzo6GgoFArpx6JSUlIQFhbWomPLy8vDgAEDWrQOkRwM\nDbpndevWDRs2bMDs2bPh5eUFCwsLLFmyBEDDexWWlpb49NNP8cADD2D48OFQqVRSa2PWrFkoLCyE\nh4cHPvroIwwePBgA4O7ujjfeeAMBAQHw9vZGQECA9EM3Y8aMwS+//CJtv/6+nn/+eVy6dKnJmpu6\nh3LzcGJiIsaNG9fi94SoOXw0OlELHTp0CO+++26D3kotER8fj23btkk33duDXq/H9u3bO/2vyJHp\nYUuDqBXu5H6BXq9Henq69OW+tpaamgoXFxcGBrULtjSIiEg2tjSIiEg2hgYREcnG0CAiItkYGkRE\nJBtDg4iIZGNoEBGRbP8P+4nVQNPl4qUAAAAASUVORK5CYII=\n", - "text": [ - "" - ] - } - ], - "prompt_number": 121 - }, - { - "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/Power_electronics_ch_9_1.ipynb b/Power_Electronics/Power_electronics_ch_9_1.ipynb deleted file mode 100755 index 3528b8b2..00000000 --- a/Power_Electronics/Power_electronics_ch_9_1.ipynb +++ /dev/null @@ -1,1256 +0,0 @@ -{ - "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", - "from pylab import *\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+PIkSPo2rVrR5fWpqqrq2Fu\nbt7RZbSpmpoamJl1zGfAlryfnSEk6Q4Jov84fvy4sLW1bXL+hg0bxOjRo8XTTz8tbGxshJubm9i/\nf780v7i4WCxatEj069dPqNVq8fLLL4vq6mppfnR0tHB3dxe9evUSgYGB4sKFC9K8uLg4MXjwYGFj\nYyOefvppMX78ePH555/fUsPevXtFly5dhFKpFD179hRDhw4VQghhMBjEtGnThJ2dnXBxcRGfffaZ\ntM6rr74qZs2aJebOnSusra1FdHS0OH/+vBg3bpywsrIS/v7+4m9/+5uYO3euEEKIgwcPCo1G02C/\nAwYMED/88IMQQoiamhoREREhnJ2dhb29vQgODhaFhYVNvm8xMTHC29tbWFtbC2dnZ/H9998LIYTQ\n6/Vi9erV4r/+67+ElZWVCAgIEJcuXZLWe/jhh4WDg4OwsbER48aNE6dOnZLmhYaGiiVLlogpU6aI\nHj16iP3794vdu3eLoUOHCmtra+Hk5CTCwsIa1HHkyBExatQoYWtrK5ycnMTGjRvFp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2uwjpWVFebPny/9fG5TunTpgsDAQACAp6cnJkyYAHNzc3h4eCAr\nK0tarl+/fg3GidpK0xdyie4B9U/+QogGLYcePXo0u46FhUWDex4VFRXScGhoKMLDw2XXsnz5cgwb\nNgwLFy4EUHsvZdiwYVAoFJg+fTrCwsKgVCql5c3MzNClSxdpuP7N/JuPhaitsKVB9yxzc3NkZWUh\nIyMDALB582aMHz/+luXc3NyQlZWF8+fPA6h9tHTdCVmr1SI5ORkAkJycjMzMTCgUCkycOBFfffUV\n/vjjDwBAYWGhdK/D0dFRuuldX69evRAcHIzo6GgoFArpx6JSUlIQFhbWomPLy8vDgAEDWrQOkRwM\nDbpndevWDRs2bMDs2bPh5eUFCwsLLFmyBEDDexWWlpb49NNP8cADD2D48OFQqVRSa2PWrFkoLCyE\nh4cHPvroIwwePBgA4O7ujjfeeAMBAQHw9vZGQECA9EM3Y8aMwS+//CJtv/6+nn/+eVy6dKnJmpu6\nh3LzcGJiIsaNG9fi94SoOXw0OlELHTp0CO+++26D3kotER8fj23btkk33duDXq/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/Power_electronics_ch_9_2.ipynb b/Power_Electronics/Power_electronics_ch_9_2.ipynb deleted file mode 100755 index 3528b8b2..00000000 --- a/Power_Electronics/Power_electronics_ch_9_2.ipynb +++ /dev/null @@ -1,1256 +0,0 @@ -{ - "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", - "from pylab import *\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+PIkSPo2rVrR5fWpqqrq2Fu\nbt7RZbSpmpoamJl1zGfAlryfnSEk6Q4Jov84fvy4sLW1bXL+hg0bxOjRo8XTTz8tbGxshJubm9i/\nf780v7i4WCxatEj069dPqNVq8fLLL4vq6mppfnR0tHB3dxe9evUSgYGB4sKFC9K8uLg4MXjwYGFj\nYyOefvppMX78ePH555/fUsPevXtFly5dhFKpFD179hRDhw4VQghhMBjEtGnThJ2dnXBxcRGfffaZ\ntM6rr74qZs2aJebOnSusra1FdHS0OH/+vBg3bpywsrIS/v7+4m9/+5uYO3euEEKIgwcPCo1G02C/\nAwYMED/88IMQQoiamhoREREhnJ2dhb29vQgODhaFhYVNvm8xMTHC29tbWFtbC2dnZ/H9998LIYTQ\n6/Vi9erV4r/+67+ElZWVCAgIEJcuXZLWe/jhh4WDg4OwsbER48aNE6dOnZLmhYaGiiVLlogpU6aI\nHj16iP3794vdu3eLoUOHCmtra+Hk5CTCwsIa1HHkyBExatQoYWtrK5ycnMTGjRvF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s2uwjpWVFebPny/9fG5TunTpgsDAQACAp6cnJkyYAHNzc3h4eCAr\nK0tarl+/fg3GidpK0xdyie4B9U/+QogGLYcePXo0u46FhUWDex4VFRXScGhoKMLDw2XXsnz5cgwb\nNgwLFy4EUHsvZdiwYVAoFJg+fTrCwsKgVCql5c3MzNClSxdpuP7N/JuPhaitsKVB9yxzc3NkZWUh\nIyMDALB582aMHz/+luXc3NyQlZWF8+fPA6h9tHTdCVmr1SI5ORkAkJycjMzMTCgUCkycOBFfffUV\n/vjjDwBAYWGhdK/D0dFRuuldX69evRAcHIzo6GgoFArpx6JSUlIQFhbWomPLy8vDgAEDWrQOkRwM\nDbpndevWDRs2bMDs2bPh5eUFCwsLLFmyBEDDexWWlpb49NNP8cADD2D48OFQqVRSa2PWrFkoLCyE\nh4cHPvroIwwePBgA4O7ujjfeeAMBAQHw9vZGQECA9EM3Y8aMwS+//CJtv/6+nn/+eVy6dKnJmpu6\nh3LzcGJiIsaNG9fi94SoOXw0OlELHTp0CO+++26D3kotER8fj23btkk33duDXq/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/Power_electronics_ch_9_3.ipynb b/Power_Electronics/Power_electronics_ch_9_3.ipynb deleted file mode 100755 index 9cc8b752..00000000 --- a/Power_Electronics/Power_electronics_ch_9_3.ipynb +++ /dev/null @@ -1,1255 +0,0 @@ -{ - "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+PIkSPo2rVrR5fWpqqrq2Fu\nbt7RZbSpmpoamJl1zGfAlryfnSEk6Q4Jov84fvy4sLW1bXL+hg0bxOjRo8XTTz8tbGxshJubm9i/\nf780v7i4WCxatEj069dPqNVq8fLLL4vq6mppfnR0tHB3dxe9evUSgYGB4sKFC9K8uLg4MXjwYGFj\nYyOefvppMX78ePH555/fUsPevXtFly5dhFKpFD179hRDhw4VQghhMBjEtGnThJ2dnXBxcRGfffaZ\ntM6rr74qZs2aJebOnSusra1FdHS0OH/+vBg3bpywsrIS/v7+4m9/+5uYO3euEEKIgwcPCo1G02C/\nAwYMED/88IMQQoiamhoREREhnJ2dhb29vQgODhaFhYVNvm8xMTHC29tbWFtbC2dnZ/H9998LIYTQ\n6/Vi9erV4r/+67+ElZWVCAgIEJcuXZLWe/jhh4WDg4OwsbER48aNE6dOnZLmhYaGiiVLlogpU6aI\nHj16iP3794vdu3eLoUOHCmtra+Hk5CTCwsIa1HHkyBExatQoYWtrK5ycnMTGjRvFp59+KpRKpejS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Pny/9fG5TunTpgsDAQACAp6cnJkyYAHNzc3h4eCAr\nK0tarl+/fg3GidpK0xdyie4B9U/+QogGLYcePXo0u46FhUWDex4VFRXScGhoKMLDw2XXsnz5cgwb\nNgwLFy4EUHsvZdiwYVAoFJg+fTrCwsKgVCql5c3MzNClSxdpuP7N/JuPhaitsKVB9yxzc3NkZWUh\nIyMDALB582aMHz/+luXc3NyQlZWF8+fPA6h9tHTdCVmr1SI5ORkAkJycjMzMTCgUCkycOBFfffUV\n/vjjDwBAYWGhdK/D0dFRuuldX69evRAcHIzo6GgoFArpx6JSUlIQFhbWomPLy8vDgAEDWrQOkRwM\nDbpndevWDRs2bMDs2bPh5eUFCwsLLFmyBEDDexWWlpb49NNP8cADD2D48OFQqVRSa2PWrFkoLCyE\nh4cHPvroIwwePBgA4O7ujjfeeAMBAQHw9vZGQECA9EM3Y8aMwS+//CJtv/6+nn/+eVy6dKnJmpu6\nh3LzcGJiIsaNG9fi94SoOXw0OlELHTp0CO+++26D3kotER8fj23btkk33duDXq/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/chapter10.ipynb b/Power_Electronics/chapter10.ipynb new file mode 100755 index 00000000..cbc3cb90 --- /dev/null +++ b/Power_Electronics/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/chapter11.ipynb b/Power_Electronics/chapter11.ipynb new file mode 100755 index 00000000..d2317d28 --- /dev/null +++ b/Power_Electronics/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/chapter12.ipynb b/Power_Electronics/chapter12.ipynb new file mode 100755 index 00000000..f8605d69 --- /dev/null +++ b/Power_Electronics/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/chapter13.ipynb b/Power_Electronics/chapter13.ipynb new file mode 100755 index 00000000..62d2a926 --- /dev/null +++ b/Power_Electronics/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/chapter14.ipynb b/Power_Electronics/chapter14.ipynb new file mode 100755 index 00000000..a9c3a3f1 --- /dev/null +++ b/Power_Electronics/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/chapter2.ipynb b/Power_Electronics/chapter2.ipynb new file mode 100755 index 00000000..1872c9f4 --- /dev/null +++ b/Power_Electronics/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/chapter3.ipynb b/Power_Electronics/chapter3.ipynb new file mode 100755 index 00000000..2e53ef9d --- /dev/null +++ b/Power_Electronics/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/chapter4.ipynb b/Power_Electronics/chapter4.ipynb new file mode 100755 index 00000000..22311574 --- /dev/null +++ b/Power_Electronics/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/chapter5.ipynb b/Power_Electronics/chapter5.ipynb new file mode 100755 index 00000000..1d261f20 --- /dev/null +++ b/Power_Electronics/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/chapter6.ipynb b/Power_Electronics/chapter6.ipynb new file mode 100755 index 00000000..dff6564b --- /dev/null +++ b/Power_Electronics/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/chapter7.ipynb b/Power_Electronics/chapter7.ipynb new file mode 100755 index 00000000..726160c8 --- /dev/null +++ b/Power_Electronics/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/chapter8.ipynb b/Power_Electronics/chapter8.ipynb new file mode 100755 index 00000000..721a9faf --- /dev/null +++ b/Power_Electronics/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/chapter9.ipynb b/Power_Electronics/chapter9.ipynb new file mode 100755 index 00000000..052c4736 --- /dev/null +++ b/Power_Electronics/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/Principles_Of_Heat_Transfer/screenshots/2.10.png b/Principles_Of_Heat_Transfer/screenshots/2.10.png new file mode 100755 index 00000000..b7f38016 Binary files /dev/null and b/Principles_Of_Heat_Transfer/screenshots/2.10.png differ diff --git a/Principles_Of_Heat_Transfer/screenshots/2.3.png b/Principles_Of_Heat_Transfer/screenshots/2.3.png new file mode 100755 index 00000000..17f6fe93 Binary files /dev/null and b/Principles_Of_Heat_Transfer/screenshots/2.3.png differ diff --git a/Principles_Of_Heat_Transfer/screenshots/3.2.png b/Principles_Of_Heat_Transfer/screenshots/3.2.png new file mode 100755 index 00000000..1e0382cd Binary files /dev/null and b/Principles_Of_Heat_Transfer/screenshots/3.2.png differ diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_1.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_1.ipynb new file mode 100755 index 00000000..df6c7ddc --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_1.ipynb @@ -0,0 +1,824 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b4eb9ee020afc1745fef7c6772881a7a2a876f1cb5d68f124dca600935589f19" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Basic Modes of Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.1: Page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.1 \"\n", + "\n", + "#Temperature Inside in F\n", + "Ti = 55;\n", + "#Temperature outside in F\n", + "To = 45;\n", + "#Thickness of the wall in ft\n", + "t = 1;\n", + "#Heat loss through the wall in Btu/h-ft2\n", + "q = 3.4;\n", + "\n", + "#Converting Btu/h-ft2 to W/m2\n", + "print \"Heat loss through the wall in W/m2 is\"\n", + "#Heat loss through the wall in W/m2 \n", + "print \"qdash = \",(q*0.2931)/0.0929\n", + "\n", + "#Heat loss for a 100ft2 surface over a 24-h period\n", + "print \"Heat loss for a 100ft2 surface over a 24-h period in Btu is\"\n", + "#Heat loss for a 100ft2 surface over a 24-h period in Btu \n", + "print \"Q = (q*100)*24\n", + "\n", + "#Q in SI units i.e. kWh\n", + "print \"Q = \",(Q*0.2931)/1000;\n", + "\n", + "#At price of 10c/kWh, the total price shall be\n", + "print \"So, the total price in c are\"\n", + "#Total price in c\n", + "print \"Price = \",round(10*Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.1 \n", + "Heat loss through the wall in W/m2 is\n", + "Heat loss for a 100ft2 surface over a 24-h period in Btu is\n", + "So, the total price in c are\n", + "Price = 24.0 c\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2: Page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.2 \"\n", + "\n", + "#Thermal conductivity of window glass in W/m-K\n", + "k = 0.81;\n", + "#Height of the glass in m\n", + "h = 1;\n", + "#Width of the glass in m\n", + "w = 0.5;\n", + "#Thickness of the glass in m\n", + "t = 0.005;\n", + "#Outside temperature in C\n", + "T2 = 24;\n", + "#Inside temperature in C\n", + "T1 = 24.5;\n", + "\n", + "#Assume that steady state exists and that the temperature is uniform over the inner and outer surfaces\n", + "\n", + "#Cross sectional area in m2\n", + "A = h*w;\n", + "\n", + "print \"Thermal resistance to conduction in K/W is\"\n", + "#Thermal resistance to conduction in K/W\n", + "R=t/(k*A)\n", + "print \"R = \",round(R,4)\n", + "\n", + "#The rate of heat loss from the interior to the exterior surface is\n", + "#obtained by dividing temperature difference from the thermal resistence\n", + "\n", + "print \"Heat loss in W from the window glass is\"\n", + "#Heat loss in W\n", + "print \"q = \",int((T1-T2)/R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.2 \n", + "Thermal resistance to conduction in K/W is\n", + "R = 0.0123\n", + "Heat loss in W from the window glass is\n", + "q = 40\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3: Page 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.3 \"\n", + "\n", + "#Area of room in m2 is given as\n", + "A = 20*20;\n", + "#Air temperature in C\n", + "Tair = -3;\n", + "#Roof temperature in C\n", + "Troof = 27;\n", + "#Heat transfer coefficient in W/m2-K\n", + "h = 10;\n", + "\n", + "#Assume that steady state exists and the direction of heat flow is from the\n", + "#roof to the air i.e higher to lower temperature (as it should be).\n", + "\n", + "print \" The rate of heat transfer by convection from the roof to the air in W\"\n", + "#The rate of heat transfer by convection from the roof to the air in W\n", + "print \"q = \",(-h*A)*(Troof-Tair)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.3 \n", + " The rate of heat transfer by convection from the roof to the air in W\n", + "q = -120000\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.4: Page 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.4 \"\n", + "\n", + "#Diameter of rod in m\n", + "d = 0.02;\n", + "# Emissivity and temperautre of rod in K\n", + "epsilon = 0.9;\n", + "T1 = 1000;\n", + "#Temperature of walls of furnace\n", + "T2 = 800;\n", + "\n", + "#Assuming steady state has been reached.\n", + "#Since the walls of the furnace completely enclose the heating rod, all the radiant energy emitted by the surface of the rod is intercepted by the furnace walls\n", + "\n", + "#From eq. 1.17, net heat loss can be given\n", + "\n", + "print \"Net heat loss per unit length considering 1m length in W\"\n", + "#Area in m2\n", + "A =(math.pi*d)*1;\n", + "#Constant sigma in W/m2-K4\n", + "sigma = 0.0000000567;\n", + "#Net heat loss per unit length considering 1m length in W\n", + "q=((A*sigma)*epsilon)*(T1**4-T2**4)\n", + "print\" q = \",round(q)\n", + "#From eq. 1.21 radiation heat transfer coefficient in W/m2-K is\n", + "print \"Radiation heat transfer coefficient in W/m2-K is\"\n", + "#Radiation heat transfer coefficient in W/m2-K \n", + "print \"hr = \",round(((epsilon*sigma)*(T1**4-T2**4))/(T1-T2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.4 \n", + "Net heat loss per unit length considering 1m length in W\n", + " q = 1893.0\n", + "Radiation heat transfer coefficient in W/m2-K is\n", + "hr = 151.0\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5: Page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.5 \"\n", + "\n", + "#Thickness of inside steel in m and thermal conductivity in W/m-k\n", + "t1 = 0.005;\n", + "k1 = 40;\n", + "#Thickness of outside brick in m and thermal conductivity in W/m-k\n", + "t2 = 0.1;\n", + "k2 = 2.5;\n", + "\n", + "#Inside temperature in C\n", + "T1 = 900;\n", + "#Outside temperature in C\n", + "To = 460;\n", + "\n", + "#Assuming the condition of steady state and umath.sing Eq. 1.24\n", + "print \"The rate of heat loss per unit area in W/m2 is\"\n", + "#The rate of heat loss per unit area in W/m2 \n", + "qk = (T1-To)/(t1/k1+t2/k2)\n", + "print int(qk)\n", + "\n", + "print \"Temperature at the interface in K is given as\"\n", + "#Temperature at the interface in K\n", + "T2 = T1-(qk*t1)/k1\n", + "print round(T2,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.5 \n", + "The rate of heat loss per unit area in W/m2 is\n", + "10965\n", + "Temperature at the interface in K is given as\n", + "898.6\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6: Page 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.6 \"\n", + "\n", + "#Thermal conductivity of aluminium in W/m-K\n", + "k = 240.0;\n", + "#Thickness of each plate in m\n", + "t = 0.01;\n", + "#Temperature at the surfaces of plates in C is given as\n", + "Ts1 = 395.0;\n", + "Ts3 = 405.0;\n", + "#From Table 1.6 the contact resistance at the interface in K/W is\n", + "R2 = 0.000275;\n", + "#Thermal resistance of the plates in K/W is\n", + "R1 = t/k;\n", + "R3 = t/k;\n", + "\n", + "print \"Heat flux in W/m2-K is\"\n", + "#Heat flux in W/m2-K\n", + "q = (Ts3-Ts1)/(R1+R2+R3)\n", + "print \"{:.2e}\".format(q)\n", + "#Since the temperature drop in each section of this one-dimensional system is propor-tional to the resistance.\n", + "\n", + "print \"Temperature drop due to contact resistance in degree C is\"\n", + "#Temperature drop due to contact resistance in degree C\n", + "deltaT = (R2/(R1+R2+R3))*(Ts3-Ts1)\n", + "print round(deltaT,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.6 \n", + "Heat flux in W/m2-K is\n", + "2.79e+04\n", + "Temperature drop due to contact resistance in degree C is\n", + "7.67\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7: Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.7 \"\n", + "\n", + "#Because of symmetry, we need to calculate for only one half of the system\n", + "\n", + "#Thickness of firebrick in inches\n", + "L1 = 1.0;\n", + "#Thermal conductivity of firebrick in Btu/h-ft-F\n", + "kb = 1.0;\n", + "#Thickness of steel plate in inches\n", + "L3 = 1/4.0;\n", + "#Thermal conductivity of steel in Btu/h-ft-F\n", + "ks = 30;\n", + "#Average height of asperities in inches is given as\n", + "L2 = 1/32.0;\n", + "#Temperature difference between the steel plates in F is\n", + "deltaT = 600.0;\n", + "\n", + "\n", + "#The thermal resistance of the steel plate is, on the basis of a unit wall area, equal to\n", + "R3 = L3/(12*ks);#12 is added to convert ft to in\n", + "\n", + "#The thermal resistance of the brick asperities is, on the basis of a unit wall area, equal to\n", + "R4 = L2/((0.3*12)*kb);#Considering the 30 percent area\n", + "\n", + "#At temperature of 300F, thermal conductivity of air in Btu/h-ft-F is\n", + "ka = 0.02;\n", + "\n", + "# Thermal resistance of the air trapped between the asperities, is, on the basis of a unit area, equal to\n", + "R5 = L2/((0.7*12)*ka);#Considering the other 70 percent area\n", + "\n", + "#Since R4 and R5 are in parallel, so there combined resistance is\n", + "R2 = (R4*R5)/(R4+R5);\n", + "\n", + "#The thermal resistance of half of the solid brick is\n", + "R1 = L1/(12*kb);\n", + "\n", + "#The overall unit conductance for half the composite wall in Btu/h-ft2-F is then\n", + "kk = 0.5/(R1+R2+R3);\n", + "\n", + "print \"The rate of heat flow per unit area in Btu/h-ft2 is\"\n", + "#The rate of heat flow per unit area in Btu/h-ft2\n", + "q = kk*deltaT\n", + "print round(q,2)\n", + "\n", + "# the answer is slightly different in textbook due to approximation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.7 \n", + "The rate of heat flow per unit area in Btu/h-ft2 is\n", + "3249.52088923\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.8: Page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.8 \"\n", + "\n", + "#Length for heat transfer for stainless steel in m\n", + "Lss = 0.1;\n", + "\n", + "#Area for heat transfer for stainless steel in m2\n", + "A = 0.01;\n", + "\n", + "#Thermal conductivity for stainless steel in W/m-K\n", + "kss = 144;\n", + "\n", + "#Length for heat transfer for Duralumin in m\n", + "La1 = 0.02;\n", + "\n", + "#Area for heat transfer for Duralumin in m2\n", + "A = 0.01;\n", + "\n", + "#Thermal conductivity for Duralumin in W/m-K\n", + "ka1 = 164;\n", + "\n", + "#Resistance in case of steel in K/W\n", + "Rk1 = Lss/(A*kss);\n", + "\n", + "#Resistance in case of Duralumin in K/W\n", + "Rk2 = La1/(A*ka1);\n", + "\n", + "#From Fig. 1.20, contact resistance in K/W\n", + "Ri = 0.05;\n", + "\n", + "#Total resistance to heat transfer in K/W\n", + "Rtotal = Rk1+Rk2+Ri;\n", + "\n", + "#Temperature diff. is given in K\n", + "deltaT = 40;\n", + "\n", + "print \"Maximum allowable rate of heat dissipation in W is\"\n", + "#Maximum allowable rate of heat dissipation in W\n", + "q = deltaT/Rtotal\n", + "\n", + "print int(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.8 \n", + "Maximum allowable rate of heat dissipation in W is\n", + "303\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9: Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.9 \"\n", + "\n", + "#Cross sectional area in m2\n", + "A = 1.0;\n", + "#Heat transfer coefficient on hot side in W/m2-K\n", + "hchot = 10.0;\n", + "#Heat transfer coefficient on cold side in W/m2-K\n", + "hccold = 40.0;\n", + "\n", + "#Length for heat transfer in m\n", + "L = 0.1;\n", + "#Thermal conductivity in W/m-K\n", + "k = 0.7;\n", + "\n", + "#Resistances in K/w\n", + "R1 = 1/(hchot*A);\n", + "R2 = L/(k*A);\n", + "R3 = 1/(hccold*A);\n", + "\n", + "#Total resistance\n", + "Rtotal = R1+R2+R3;\n", + "\n", + "#Temperature on hot side in K\n", + "T1 = 330.0;\n", + "#Temperature on cold side in K\n", + "T2 = 270.0;\n", + "\n", + "print \"Rate of heat transfer per unit area in W is\"\n", + "#Rate of heat transfer per unit area in W\n", + "q = (T1-T2)/(R1+R2+R3)\n", + "print round(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.9 \n", + "Rate of heat transfer per unit area in W is\n", + "224.0\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.10: Page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.10 \"\n", + "\n", + "#diameter of pipe in m\n", + "d = 0.5;\n", + "#Epsilon is given as\n", + "epsilon = 0.9;\n", + "#sigma(constant) in SI units is\n", + "sigma = 0.0000000567;\n", + "#Temperatures in K are given as\n", + "T1 = 500;\n", + "T2 = 300;\n", + "\n", + "#Radiation heat transfer coefficient in W/m2K\n", + "hr = ((sigma*epsilon)*(T1*T1+T2*T2))*(T1+T2);\n", + "\n", + "#Convection heat transfer coefficient in W/m2K\n", + "hc = 20;\n", + "\n", + "#total heat transfer coefficient in W/m2K\n", + "h = hc+hr;\n", + "\n", + "print \"Rate of heat loss per meter in W/m is\"\n", + "#Rate of heat loss per meter in W/m\n", + "q = ((math.pi*d)*h)*(T1-T2)\n", + "\n", + "print round(q,2)\n", + "\n", + "# the answer is slightly different due to approximation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.10 \n", + "Rate of heat loss per meter in W/m is\n", + "10643.77\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.11: Page 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.11 \"\n", + "\n", + "#Hot-gas temperature in K\n", + "Tgh = 1300.0;\n", + "#Heat transfer coefficient on hot side in W/m2K\n", + "h1 = 200.0;\n", + "#Heat transfer coefficient on cold side in W/m2K\n", + "h3 = 400.0;\n", + "#Coolant temperature in K\n", + "Tgc = 300.0;\n", + "#Max temp. in C\n", + "Tsg = 800.0;\n", + "#Maximum permissible unit thermal resistance per square meter of the metal wall in K/W\n", + "R2 = ((Tgh-Tgc)*(1/h1)/(Tgh-Tsg))-1/h1-1/h3;\n", + "print \"Maximum permissible unit thermal resistance per square meter of the metal wall in m2.K/W is\"\n", + "print R2\n", + "\n", + "# The answer is wrong in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.11 \n", + "Maximum permissible unit thermal resistance per square meter of the metal wall in m2.K/W is\n", + "0.0025\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.12: Page 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.12 \"\n", + "\n", + "# total length of metal sheet in m\n", + "L = 0.625/39.4;\n", + "# we estimate the thermal conductivity of the metal sheets to be approximately 43 W/m K\n", + "k = 43;\n", + "# therefore the resistance in K/W offered by metal sheey\n", + "R = L/k;\n", + "\n", + "#heat loss in W/m2 is given as\n", + "q = 1200;\n", + "# overall heat transfer coefficient between the gas and the door is given\n", + "# in W/m2K\n", + "U = 20;\n", + "#The temperature drop between the gas and the interior surface of the door at the specified heat flux is\n", + "deltaT1 = q/U;\n", + "#Hence, the temperature of the Inconel will be in degree C\n", + "T = 1200-deltaT1;\n", + "\n", + "#The heat transfer coefficient between the outer surface of the door and\n", + "#the surroundings at 20\u00b0C in W/m2K\n", + "h = 5;\n", + "#The temperature drop at the outer surface in degree C is\n", + "deltaT2 = q/h;\n", + "#Selecting milled alumina-silica chips as insulator (Fig 1.31 on page 48)\n", + "\n", + "# Hence, temperature difference across the insulation is\n", + "deltaT3 = T-deltaT1-deltaT2;\n", + "\n", + "#thermal conductivity for milled alumina-silica chips in W/mK is\n", + "k = 0.27;\n", + "\n", + "print \"The insulation thickness in m is\"\n", + "#The insulation thickness in m\n", + "L = (k*deltaT3)/q\n", + "\n", + "print round(L,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.12 \n", + "The insulation thickness in m is\n", + "0.2\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.13: Page 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.13 \"\n", + "\n", + "#Temperature of air in degree K\n", + "Tair = 300;\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 10.0;\n", + "\n", + "print \"Part a\"\n", + "#Radiation solar flux in W/m2\n", + "q = 500.0;\n", + "#Ambient temperature in K\n", + "Tsurr = 50.0;\n", + "\n", + "print \"Solving energy balance equaiton by trial and error for the roof temperature, we get temp. in degree K\"\n", + "#Room temperature in degree K\n", + "Troof = 303\n", + "print Troof\n", + "print \"Part b\"\n", + "\n", + "#No heat flux, energy balance equaiton is modified\n", + "print \"Room temperature in degree K\"\n", + "#Room temperature in degree K\n", + "Troof = 270\n", + "print Troof\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.13 \n", + "Part a\n", + "Solving energy balance equaiton by trial and error for the roof temperature, we get temp. in degree K\n", + "303\n", + "Part b\n", + "Room temperature in degree K\n", + "270\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14: Page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.14 \"\n", + "\n", + "print \"The given example is theoretical and does not involve any numerical computation\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 1 Example # 1.14 \n", + "The given example is theoretical and does not involve any numerical computation\n" + ] + } + ], + "prompt_number": 60 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_10.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_10.ipynb new file mode 100755 index 00000000..7743878c --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_10.ipynb @@ -0,0 +1,509 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2f1789d69a6627f52d1a0482ee686df23ffc5c14dd52e16a67788fbe084f6c9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Heat Transfer With Phase Change" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.1: Page 643" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 1\"\n", + "#Surface temperature of polished stainless steel surface in degree celcius\n", + "T_s=106.0;\n", + "#Boiling point of water under at atmospheric pressure in degree celcius\n", + "T_b=100.0;\n", + "#Value of empirical constant\n", + "C_sf=0.0132;\n", + "#latent heat of vaporization in J/kg\n", + "h_fg=2.25e6;\n", + "#gravitational acceleration in m/s**2\n", + "g=9.81;\n", + "#Value of proportionality factor in British Gravitational system\n", + "g_c=1;\n", + "#density of saturated liquid in kg/m**3\n", + "rho_l=962.0;\n", + "#density of saturated vapor in kg/m**3\n", + "rho_v=0.60;\n", + "#specific heat of saturated liquid in J/kg K\n", + "c_l=4211.0;\n", + "#prandtl number of saturated liquid\n", + "Pr_l=1.75;\n", + "#surface tension of the liquid-to-vapor interface in N/m\n", + "sigma=58.8e-3;\n", + "#\u0004 vismath.cosity of the liquid in kg/ms\n", + "mu_l=2.77e-4;\n", + "#Excess temperature in degree Celcius\n", + "delta_Tx= T_s-T_b;\n", + "\n", + "print \"Heat flux from the surface to the water in W/m**2\"\n", + "#Heat flux in W./m2\n", + "q=(c_l*delta_Tx/(C_sf*h_fg*Pr_l))**3*mu_l*h_fg*math.sqrt((g*(rho_l-rho_v))/(g_c*sigma))\n", + "print round(q,1)\n", + "\n", + "print \"Critical heat flux in W/m**2\"\n", + "#Heat flux in W./m2\n", + "q_maxZ=(math.pi/24.0)*math.sqrt(rho_v)*h_fg*(sigma*g*(rho_l-rho_v)*g_c)**0.25\n", + "\n", + "print \"At 6\u00b0C excess temperature the heat flux is less than the critical value; therefore nucleate pool boiling exists\"\n", + "print \"For the Teflon-coated stainless steel surface, heat flux in W/m**2\"\n", + "#Heat flux in W./m2\n", + "q=29669*(C_sf/0.0058)**3\n", + "print round(q,2)\n", + "print \"Thus for Teflon-coated stainless steel surface there is a remarkable increase in heat flux; however, it is still below the critical value.\"\n", + "\n", + "# the answers in the textbook is slightly different in the textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 1\n", + "Heat flux from the surface to the water in W/m**2\n", + "28673.9\n", + "Critical heat flux in W/m**2\n", + "At 6\u00b0C excess temperature the heat flux is less than the critical value; therefore nucleate pool boiling exists\n", + "For the Teflon-coated stainless steel surface, heat flux in W/m**2\n", + "349736.31\n", + "Thus for Teflon-coated stainless steel surface there is a remarkable increase in heat flux; however, it is still below the critical value.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.2: Page 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 2\"\n", + "#density of saturated liquid in kg/m**3\n", + "rho_l=962;\n", + "#gravitational acceleration in m/s**2\n", + "g=9.8;\n", + "#latent heat of vaporization in J/kg\n", + "h_fg=2250000;\n", + "#density of saturated vapor in kg/m**3\n", + "rho_v=0.60;\n", + "#Surface temperature of polished stainless steel surface in degree celcius\n", + "T_s=400;\n", + "#Value of proportionality factor in British Gravitational system\n", + "g_c=1;\n", + "#Boiling point of water under at atmospheric pressure in degree celcius\n", + "T_b=100;\n", + "#surface tension of the liquid-to-vapor interface in N/m\n", + "sigma=58.8e-3;\n", + "#Excess temperature in degree Celcius\n", + "delta_Tx= T_s-T_b;\n", + "#Wavelength in m from eq. 10.7\n", + "lamda=2*math.pi*math.sqrt(g_c*sigma/(g*(rho_l-rho_v)));\n", + "#Thermal conductivity in W/mK\n", + "k_c=0.0249;\n", + "#Absolute vismath.cosity in Ns/m**2\n", + "mu_c=12.1e-6;\n", + "#Specific heat in J/kg K\n", + "c_pc=2034;\n", + "#Heat transfer coefficient due to conduction alone in W/m**2 K\n", + "h_c=(0.59)*(((g*(rho_l-rho_v)*rho_v*(k_c**3)*(h_fg+(0.68*c_pc*delta_Tx)))/(lamda*mu_c*delta_Tx))**0.25); # math.expression obtained assuming diameter D tending to infinity\n", + "#Emissivity\n", + "epsilon_s= 0.05; #math.since surface is polished and hence heat transfer coefficient due to radiation is negligible\n", + "print \"Heat flux in W/m**2\"\n", + "#Heat flux in W/m**2\n", + "q= h_c*delta_Tx\n", + "print round(q,1)\n", + "# the answers in the textbook is slightly different in the textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 2\n", + "Heat flux in W/m**2\n", + "44739.1\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.3: Page 655" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 3\"\n", + "#Flow rate of n-butyl alcohol in kg/hr\n", + "m=161;\n", + "#Internal diameter of copper tube in meters\n", + "D=0.01;\n", + "#Tube wall temperature in degree C\n", + "T=140;\n", + "#surface tension in N/m\n", + "sigma=0.0183;\n", + "#Heat of vaporization in J/kg\n", + "h_fg=591500;\n", + "#atmospheric pressure boiling point in degree C\n", + "T_sat=117.5;\n", + "# saturation pressure corresponding to a saturation temperature of 140\u00b0C in atm\n", + "P_sat=2;\n", + "#Density of vapor in kg/m**3\n", + "rho_v=2.3;\n", + "#Vismath.cosity of vapor in kg/m s\n", + "mu_v=.0143e-3;\n", + "#Property values for n-butyl alcohol are taken from Appendix 2, Table 19\n", + "#Density in kg/m**3\n", + "rho_l=737;\n", + "#Absolute vismath.cosity in Ns/m**2\n", + "mu_l=0.39e-3;\n", + "#Specific heat in J/kg K\n", + "c_l=3429.0;\n", + "#Prandtl number\n", + "Pr_l=8.2;\n", + "#Thermal conductivity in W/m K\n", + "k_l=0.13;\n", + "#Empirical constant\n", + "C_sf=0.00305;# Value taken from table 10.1\n", + "#Mass velocity in kg/m**2 s\n", + "G=(m/3600.0)*(4/(math.pi*0.01**2));\n", + "print \"Mass velocity in kg/m**2 is \",round(G,2)\n", + "#Reynolds number for liquid flow\n", + "Re_D=(G*D)/mu_l;\n", + "print \"Reynolds number for liquid flow is\",round(Re_D,2)\n", + "#The contribution to the heat transfer coefficient due to the two-phase annular flow is [(0.023)*(14590)**0.8*(8.2)**0.4*16.3*(1-x)**0.8*F]\n", + "#Since the vapor pressure changes by 1 atm over the temperature range from saturation temperature to 140\u00b0C,so saturation pressure in N/m**2\n", + "delta_p_sat=101300;\n", + "#Therefore the contribution to the heat transfer coefficient from nucleate boiling is\n", + "#h_b= 0.00122*[(0.163**0.79*3429**0.45*737**0.49*1**0.25)/(0.0183**0.5*0.39e-3**0.29*591300**0.24*2.3**0.24)]*(140-117.5)**0.24*(101300)**0.75*S\n", + "#or h_b= 8393S\n", + "#Now 1/Xtt will be calculated by\n", + "#1/Xtt=12.86*(x/(1-x))**0.9\n", + "#Now a table is prepared showing stepwise calculations that track the increase in quality, from x=0 to x=0.5,assuming that the steps delta \u0002x are small enough that the heat flux and other parameters are reasonably constant in that step\n", + "print \"The tube length required to reach 50% quality is 1.35 m\"\n", + "\n", + "# as the answer is found by hit and trial thus answer is printed through table\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 3\n", + "Mass velocity in kg/m**2 is 569.42\n", + "Reynolds number for liquid flow is 14600.54\n", + "The tube length required to reach 50% quality is 1.35 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.4: Page 666" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 4\"\n", + "#Outer diameter of the tube in meters\n", + "D=0.013;\n", + "#Acceleration due to gravity in m/s**2\n", + "g=9.81;\n", + "#Length of the tube in meters\n", + "L=1.5;\n", + "#Temperature of saturated vapour in Kelvin\n", + "T_sv=349.0;\n", + "#Average tube wall temperature in Kelvin\n", + "T_s=325;\n", + "#Average temperature of the condensate film in degree K\n", + "Tf=(T_sv+T_s)/2.0;\n", + "#Thermal conductivity of liquid in W/m-K\n", + "k_l=0.661;\n", + "#Vismath.cosity of liquid in N s/m**2\n", + "mu_l=4.48e-4;\n", + "#Dendity of liquid in kg/m**3\n", + "rho_l=980.9;\n", + "#Specific heat of liquid in J/kg K\n", + "c_pl=4184.0;\n", + "#Latent heat of condensation in J/kg\n", + "h_fg=2.349e6;\n", + "#Density of vapor in kg/m**3\n", + "rho_v=0.25;\n", + "#Modified latent heat of condensation in J/kg\n", + "h_fg_dash=h_fg+(3/8.0)*c_pl*(T_sv-T_s);\n", + "\n", + "print \"Heat transfer coefficient for tube in horizontal position in W/m**2 K\"\n", + "#Heat transfer coefficient in W/m2K\n", + "h_c_bar=0.725*(((rho_l*(rho_l-rho_v)*g*h_fg_dash*k_l**3)/(D*mu_l*(T_sv-T_s)))**0.25)\n", + "print round(h_c_bar,2)\n", + "print \"Heat transfer coefficient for tube in vertical position in W/m**2 K\"\n", + "##Heat transfer coefficient in W/m2K\n", + "h_c_bar=0.943*(((rho_l*(rho_l-rho_v)*g*h_fg_dash*k_l**3)/(mu_l*(T_sv-T_s)))**0.25)\n", + "print round(h_c_bar,2)\n", + "\n", + "# the answer is incorrect in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 4\n", + "Heat transfer coefficient for tube in horizontal position in W/m**2 K\n", + "10648.3\n", + "Heat transfer coefficient for tube in vertical position in W/m**2 K\n", + "4676.7\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.5: Page 667" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 5\"\n", + "#Acceleration due to gravity in m/s**2\n", + "g=9.81;\n", + "#Length of the tube in meters\n", + "L=1.5;\n", + "#Temperature of saturated vapour in Kelvin\n", + "T_sv=349.0;\n", + "#Average tube wall temperature in Kelvin\n", + "T_s=325.0;\n", + "#Average temperature of the condensate film in Kelvin\n", + "Tf=(T_sv+T_s)/2;\n", + "#Thermal conductivity of liquid in W/m-K\n", + "k_l=0.661;\n", + "#Vismath.cosity of liquid in N s/m**2\n", + "mu_l=4.48e-4;\n", + "#Dendity of liquid in kg/m**3\n", + "rho_l=980.9;\n", + "#Specific heat of liquid in J/kg K\n", + "c_pl=4184.0;\n", + "#Latent heat of condensation in J/kg\n", + "h_fg=2.349e6;\n", + "#Density of vapor in kg/m**3\n", + "rho_v=0.25;\n", + "#Modified latent heat of condensation in J/kg\n", + "h_fg_dash=h_fg+(3/8.0)*c_pl*(T_sv-T_s);\n", + "\n", + "print \"Reynolds number at the lower edge\"\n", + "#Reynolds number\n", + "Re=(4/3.0)*(((4*k_l*L*(T_sv-T_s)*rho_l**(2/3.0)*g**(1/3.0))/(mu_l**(5/3.0)*h_fg_dash))**0.75)\n", + "print round(Re,2)\n", + "print \"Since the Reynolds number at the lower edge of the tube is below 2000, the flow of the condensate is laminar\"\n", + "\n", + "# the answers in the textbook is slightly different in the textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 5\n", + "Reynolds number at the lower edge\n", + "569.05\n", + "Since the Reynolds number at the lower edge of the tube is below 2000, the flow of the condensate is laminar\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.6: Page 682" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 6\"\n", + "#Length of Heat pipe in meters\n", + "L_eff=0.30;\n", + "#Temperature of the heat pipe in degree celcius\n", + "T=100.0;\n", + "#Diameter of the heat pipe in meters\n", + "D=1e-2;\n", + "#Density of water at 100 degree celcius in k/m**3\n", + "rho=958.0;\n", + "#Vismath.cosity of water in N s/m**2\n", + "mu=279.0e-6;\n", + "#surface tension of the liquid-to-vapor interface in N/m\n", + "sigma=58.9e-3;\n", + "#latent heat of vaporization in J/kg\n", + "h_fg=2.26e6;\n", + "#Inclination angle in degree\n", + "theta=30;\n", + "#Acceleration due to gravity in meter/sec**2\n", + "g=9.81;\n", + "#Wire diameter for wick in metres\n", + "d=0.0045e-2;\n", + "#So thickness of four layers of wire mesh\n", + "t=4.0*d;\n", + "#Area of the wick in m**2\n", + "Aw=math.pi*D*t;\n", + "#For phosphorus-bronze,heat pipe wick pore size in meters\n", + "r=0.002e-2;\n", + "#For phosphorus-bronze,heat pipe wick permeability in m**2\n", + "K=0.3e-10;\n", + "print \"Maximum liquid flow rate in kg/sec\"\n", + "#flow rate in kg/sec\n", + "m_max=((2*sigma/r)-rho*g*L_eff*0.5)*((rho*Aw*K)/(mu*L_eff))\n", + "print round(m_max,6)\n", + "print \"Maximum heat transport capability in Watt\"\n", + "#heat transport capability in W\n", + "q_max=m_max*h_fg\n", + "print round(q_max,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 6\n", + "Maximum liquid flow rate in kg/sec\n", + "9e-06\n", + "Maximum heat transport capability in Watt\n", + "19.7\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex10.7: Page 686" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 7\"\n", + "#Temperature of the brine spray used for internal refrigeration in degree celcius\n", + "T_inf=-11.0;\n", + "#Required thickness of ice layer in meters\n", + "epsilon= 0.0025;\n", + "#Water-liquid temperature in degree celcius\n", + "T1=4.4;\n", + "#Liquid-surface conductance in W/m**2 K\n", + "h_epsilon=57.0;\n", + "#Conductance between brine and ice(including metal wall) in W/m**2 K\n", + "h_not=570.0;\n", + "#Latent heat of fusion for ice in J/Kg\n", + "Lf=333700.0;\n", + "#Density for ice in Kg/m**3\n", + "rho=918.0;\n", + "#Thermal conductivity for ice in W/m K\n", + "k=2.32;\n", + "#Freezing point temperature in degree K\n", + "Tfr=0;\n", + "#Dimensionless R, T, epsilon and t are as follows\n", + "#R plus parameter \n", + "R_plus= h_epsilon/h_not;\n", + "#T plus parameter\n", + "T_plus= (T1-Tfr)/(Tfr-T_inf);\n", + "#Epsilon plus parameter\n", + "Epsilon_plus= h_not*epsilon/k;\n", + "#t plus parameter\n", + "t_plus=(Epsilon_plus/(R_plus*T_plus))-((1/(R_plus*T_plus)**2)*math.log(1+(R_plus*T_plus*Epsilon_plus/(1+R_plus*T_plus))))\n", + "\n", + "print \"Time taken for 0.25cm thick ice layer deposition in sec\"\n", + "#time in seconds\n", + "t=t_plus*rho*Lf*k/((h_not)**2*(Tfr-T_inf))\n", + "print round(t,1)\n", + "# the answers in the textbook is incorrect" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 10, Example 7\n", + "Time taken for 0.25cm thick ice layer deposition in sec\n", + "151.6\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_2.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_2.ipynb new file mode 100755 index 00000000..a6bfc016 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_2.ipynb @@ -0,0 +1,961 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c489be538ada8e72e5c0ac93bd5fa6e3d18746a5fcfb78ea58fa8cf99d0eb015" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Heat Conduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.1: Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.1 \"\n", + "\n", + "#Heat generation rate in W/m3\n", + "qg = 1000000;\n", + "#Length along which heat will be dissipated in m (thickness)\n", + "L = 0.01;\n", + "#Thermal conductivity at the required temperature in W/mK\n", + "k = 64;\n", + "\n", + "#Temperature of surrounding oil in degree C\n", + "Tinfinity = 80;\n", + "#Temperature of heater in degree C to be maintained\n", + "T1 = 200;\n", + "\n", + "print \"heat transfer coefficient in W/m2K from a heat balance\"\n", + "#Heat transfer coefficient in W/m2K\n", + "h = ((qg*L)/2)/(T1-Tinfinity)\n", + "print round(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.1 \n", + "heat transfer coefficient in W/m2K from a heat balance\n", + "42.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2: Page 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.2 \"\n", + "\n", + "print \"Case of Uninsualted pipe\"\n", + "#Calculating resistance to heat flow at internal surface\n", + "\n", + "#Internal radius in m\n", + "ri = 0.05;\n", + "#Heat transfer coefficient at inner surface for steam condenmath.sing in W/m2K\n", + "hci = 10000;\n", + "#Resistance in mK/W\n", + "R1 = 1/(((2*math.pi)*ri)*hci);\n", + "\n", + "#Calculating resistance to heat flow at external surface\n", + "\n", + "#External radius in m\n", + "ro = 0.06;\n", + "#Heat transfer coefficient at outer surface in W/m2K\n", + "hco = 15;\n", + "#Resistance in mK/W\n", + "R3 = 1/(((2*math.pi)*ro)*hco);\n", + "\n", + "#Calcualting resistance to heat flow due to pipe\n", + "\n", + "#Thermal conductivity of pipe in W/mK\n", + "kpipe = 400;\n", + "#Resistance in mK/W\n", + "R2 = log(ro/ri)/((2*math.pi)*kpipe);\n", + "\n", + "#Temperatures of steam(pipe) and surrounding(air) in degree C\n", + "Ts = 110;\n", + "Tinfinity = 30;\n", + "\n", + "print \"Heat loss from uninsulated pipe in W/m is therefore\"\n", + "#Heat loss from uninsulated pipe in W/m \n", + "q = (Ts-Tinfinity)/(R1+R2+R3)\n", + "print round(q)\n", + "\n", + "\n", + "print \"Case of insulated pipe\"\n", + "#Calculating additional resistance between outer radius and new outer\n", + "#radius\n", + "\n", + "#Thermal conductivity of insulation in W/mK\n", + "k = 0.2;\n", + "#New outer radius in m\n", + "r3 = 0.11;\n", + "#Resistance in mK/W\n", + "R4 = log(r3/ro)/((2*math.pi)*k);\n", + "\n", + "#Calculating new outer resistance\n", + "R0 = 1/(((2*math.pi)*r3)*hco);\n", + "\n", + "\n", + "print \"Heat loss from insulated pipe in W/m is therefore\"\n", + "#Heat loss from insulated pipe in W/m\n", + "q = (Ts-Tinfinity)/(R1+R2+R4+R0)\n", + "print int(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.2 \n", + "Case of Uninsualted pipe\n", + "Heat loss from uninsulated pipe in W/m is therefore\n", + "451.0\n", + "Case of insulated pipe\n", + "Heat loss from insulated pipe in W/m is therefore\n", + "138\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3: Page 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.3 \"\n", + "\n", + "#Outer radius in m\n", + "ro = 0.02;\n", + "#Inner radius in m\n", + "ri = 0.015;\n", + "#Thermal conductivity of plastic in W/mK\n", + "k = 0.5;\n", + "#Internal convection heat transfer coefficient in W/m2K\n", + "hc1 = 300.0\n", + "#Temperature of fluid in pipe in degree C\n", + "Thot = 200.0\n", + "#Temperature of outside in degree C\n", + "Tcold = 30.0\n", + "#External convection heat transfer coefficient in W/m2K\n", + "hc0 = 10.0\n", + "\n", + "print \"Overall heat transfer coefficient in W/m2K is\"\n", + "#Overall heat transfer coefficient in W/m2K\n", + "U0 = 1/(ro/(ri*hc1)+(ro*math.log(ro/ri))/k+1/hc0)\n", + "print round(U0,2)\n", + "\n", + "print \"The heat loss per unit length in W/m is\"\n", + "#The heat loss per unit length in W/m\n", + "q = (((U0*2)*math.pi)*ro)*(Thot-Tcold)\n", + "print round(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.3 \n", + "Overall heat transfer coefficient in W/m2K is\n", + "8.62\n", + "The heat loss per unit length in W/m is\n", + "184.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.4: Page 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.4 \"\n", + "\n", + "#Temperature of liquid nitrogen in degree K\n", + "Tnitrogen = 77;\n", + "#Radius of container in m\n", + "ri = 0.25;\n", + "#Temperature of surrounding air in degree K\n", + "Tinfinity = 300.0;\n", + "#Thermal conductivity of insulating silica powder in W/mK\n", + "k = 0.0017;\n", + "#Outer radius of container with insulation in m\n", + "ro = 0.275;\n", + "#Latent heat of vaporization of liquid nitrogen in J/kg\n", + "hgf = 200000.0;\n", + "#convection coefficient at outer surface in W/m2K\n", + "hco = 20.0;\n", + "\n", + "#Calcaulting heat transfer to nitrogen\n", + "q = (Tinfinity-Tnitrogen)/(1/((((4*math.pi)*ro)*ro)*hco)+(ro-ri)/((((4*math.pi)*k)*ro)*ri));\n", + "\n", + "print \" rate of liquid boil-off of nitrogen per hour is\"\n", + "#rate of liquid boil-off of nitrogen per hour\n", + "m = (3600*q)/hgf\n", + "\n", + "print round(m,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.4 \n", + " rate of liquid boil-off of nitrogen per hour is\n", + "0.235\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5: Page 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.5 \"\n", + "\n", + "#Heat generation rate in W/m3\n", + "qg = 75000000;\n", + "#Outer radius of rods in m\n", + "ro = 0.025;\n", + "#Temperature of water in degree C\n", + "Twater = 120;\n", + "#Thermal cinductivity in W/mk\n", + "k = 29.5\n", + "#Heat transfer coefficient in W/m2K\n", + "hco = 55000;\n", + "\n", + "#Since rate of flow through the surface of the rod equals the rate of internal heat generation\n", + "#and\n", + "#The rate of heat flow by conduction at the outer surface equals the rate\n", + "#of heat flow by convection from the surface to the water\n", + "\n", + "#Surface Temperature in degree C\n", + "T0 = (qg*ro)/(2*hco)+Twater;\n", + "\n", + "print \"Maximum temperature in degree C\"\n", + "#Maximum temperature in degree C\n", + "Tmax = T0+((qg*ro)*ro)/(4*k)\n", + "print round(Tmax)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.5 \n", + "Maximum temperature in degree C\n", + "534.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6: Page 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.6 \"\n", + "\n", + "#diameter of fin in m\n", + "d = 0.0025;\n", + "#Perimeter in m\n", + "P = math.pi*d;\n", + "#Area in m2\n", + "A = ((math.pi*d)*d)/4;\n", + "#Surface temperature in degree C\n", + "Ts = 95;\n", + "#Ambient temperature in degree c\n", + "Tinfinity = 25;\n", + "#Heat transfer coefficient in W/m2K\n", + "hc = 10;\n", + "#From table 12, value of thermal conductivity in W/mK\n", + "k = 396;\n", + "\n", + "print \"Case of an infinitely long fin\"\n", + "print \"Heat loss for the \u00e2\u20ac\u0153infintely long\u00e2\u20ac? fin in W is\"\n", + "#Heat loss for the \u00e2\u20ac\u0153infintely long\u00e2\u20ac? fin in W\n", + "qfin = ((((hc*P)*k)*A)**0.5)*(Ts-Tinfinity)\n", + "print round(qfin,3)\n", + "print \"Case 2: Fin length of 2.5cm\"\n", + "#Length in cm\n", + "L = 2.5/100;\n", + "#Parameter m\n", + "m = ((hc*P)/(k*A))**0.5;\n", + "print \"Heat loss in this case in W is\"\n", + "#Heat loss in this case in W\n", + "qfin = qfin*((math.sinh(m*L)+(hc/(m*k))*math.cosh(m*L))/(math.cosh(m*L)+(hc/(m*k))*math.sinh(m*L)))\n", + "print round(qfin,3)\n", + "print \"For the two solutions to be within 5%\"\n", + "#((math.sinh(m*L)+(hc/(m*k))*math.cosh(m*L))/(math.cosh(m*L)+(hc/(m*k))*math.sinh(m*L))) must\n", + "#be less than 0.95\n", + "print \"L must be greater than 28.3cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.6 \n", + "Case of an infinitely long fin\n", + "Heat loss for the \u00e2\u20ac\u0153infintely long\u00e2\u20ac? fin in W is\n", + "0.865\n", + "Case 2: Fin length of 2.5cm\n", + "Heat loss in this case in W is\n", + "0.14\n", + "For the two solutions to be within 5%\n", + "L must be greater than 28.3cm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7: Page 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.7 \"\n", + "\n", + "#Thermal conductivity of alumunium in W/mK\n", + "k = 200;\n", + "#Outer radius of system in m\n", + "ro = 5.5/200;\n", + "#Inner radius of system in m\n", + "ri = 2.5/200;\n", + "#Thickness of fin in m\n", + "t = 0.1/100;\n", + "\n", + "#Temperature of pipe in degree C\n", + "Ts = 100;\n", + "#Temperature of surrounding in degree C\n", + "Tinfinity = 25;\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 65;\n", + "\n", + "#calculating fin efficiency\n", + "#From Fig. 2.22 on page 103, the fin efficiency is found to be 91%.\n", + "\n", + "#Area of fin\n", + "A = (2*math.pi)*((ro+t/2)**2-ri*ri);\n", + "\n", + "print \"The rate of heat loss from a math.single fin in W is\"\n", + "#The rate of heat loss from a math.single fin in W\n", + "q = ((0.91*h)*A)*(Ts-Tinfinity)\n", + "print round(q,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.7 \n", + "The rate of heat loss from a math.single fin in W is\n", + "17.5\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.8: Page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.8 \"\n", + "\n", + "#Diameter of pipe in m\n", + "D = 0.1;\n", + "#Depth under which it is sunk in m\n", + "z = 0.6;\n", + "#Temperature of pipe in degree C\n", + "Tpipe = 100.0;\n", + "#Temperature of soil in degree C\n", + "Tsoil = 20.0;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.4;\n", + "\n", + "\n", + "#From table 2.2 on page 112, calculating shape factor\n", + "#Shape factor\n", + "S = (2*math.pi)/math.acosh((2*z)/D);\n", + "print \" rate of heat loss per meter length in W/m is\"\n", + "#rate of heat loss per meter length in W/m\n", + "q = (k*S)*(Tpipe-Tsoil)\n", + "\n", + "print round(q,1)\n", + "\n", + "# the other parts of question are theoritical hence not solved here\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.8 \n", + " rate of heat loss per meter length in W/m is\n", + "63.3\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.9: Page 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.9 \"\n", + "\n", + "#Thermal conductivity in W/mC\n", + "k = 1.04;\n", + "#For square length and breadth are equal and are in m\n", + "D = 0.5;\n", + "#Area in m2\n", + "A = D*D;\n", + "#Thickness in m\n", + "L = 0.1;\n", + "#Inside temperature in degree C\n", + "Ti = 500.0;\n", + "\n", + "#Outside temperature in degree C\n", + "To = 50.0;\n", + "#Shape factor for walls\n", + "Sw = A/L;\n", + "#Shape factor for corners\n", + "Sc = 0.15*L;\n", + "#Shape factor for edges\n", + "Se = 0.54*D;\n", + "\n", + "#There are 6 wall sections, 12 edges, and 8 corners, so that the total\n", + "#shape factor is\n", + "S = 6*Sw+12*Se+8*Sc;\n", + "\n", + "print \"Heat flow in kW is\"\n", + "#Heat flow in W \n", + "q = (k*S)*(Ti-To)/1000\n", + "print round(q,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.9 \n", + "Heat flow in kW is\n", + "8.59\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.10: Page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "import numpy\n", + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.10 \"\n", + "\n", + "#Diameter of copper wire in m\n", + "D = 0.1/100;\n", + "#Initial temperature in degree C\n", + "To = 150.0;\n", + "#Final surrounding temperature in degree C of air and water\n", + "Tinfinity = 40.0;\n", + "\n", + "#From table 12, appendix 2, we get the following data values for copper\n", + "#Thermal conductivity in W/mK\n", + "k = 391.0;\n", + "#Specific heat in J/kgK\n", + "c = 383.0;\n", + "#Density in kg/m3\n", + "rho = 8930.0;\n", + "\n", + "#Surface area of wire per unit length in m\n", + "A = math.pi*D;\n", + "#Volume of wire per unit length in m2\n", + "V = ((math.pi*D)*D)/4;\n", + "\n", + "#Heat transfer coefficient in the case of water in W/m2K\n", + "h = 80.0;\n", + "#Biot number in water\n", + "bi = (h*D)/(4*k);\n", + "#The temperature response is given by Eq. (2.84)\n", + "\n", + "#For water Bi*Fo is 0.0936t\n", + "#For air Bi*Fo is 0.0117t\n", + "x=numpy.zeros((1,130))\n", + "Twater=numpy.zeros((1,130))\n", + "Tair=numpy.zeros((1,130))\n", + "for i in range (0,120):\n", + " #Position of grid\n", + " x[0,i] = i;\n", + " # Temperature of water in degree C\n", + " Twater[0,i] = Tinfinity+(To-Tinfinity)*math.exp(-0.0936*i);\n", + " # Temperature of air in degree C\n", + " Tair[0,i] = Tinfinity+(To-Tinfinity)*math.exp(-0.0117*i);\n", + "plt.grid('on')\n", + "ax = pylab.gca()\n", + "#Plotting curve\n", + "plt.plot(x[0,:120],Twater[0,:120],label=\"water\")\n", + "\n", + "#Plotting curve\n", + "plt.plot(x[0,:120],Tair[0,:120],label=\"air\")\n", + "#Labelling axis\n", + "xlabel(\"time\")\n", + "ylabel(\"temperature\")\n", + "plt.legend(loc='upper right');\n", + "plt.show()\n", + "print \"Temperature drop in water is more than that of air\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.10 \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FOX2wPHvCQECCESKFIkEIZTQAlKlJCJCRClKF1QQ\nG3BVLlb8XRW999rQC3oVRZGiCAjoRZQiNYB0kBI6AkEQCb0qNe/vj9nAiklI2d3ZmZzP88yTndnd\nmXPYsG/mPfO+I8YYlFJKqfSE2B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BPGGPqed4/PCBRK+VDekahVMYknccAC4wxZ4AzInIca9I8sOZH\nquW5R8WtwGRrbj0A8vkzWKX8QRsKpbLvnNfjFK/1FKz/WyHAMc/ZiFKOpV1PSmXsFFA4i+8RAGPd\niGq3iHQCa2p5Eanl4/iU8jttKJTKgDHmCLBERBKBt7lyJ7Cr74h29ePU9R5AHxFZB2zEuk+zUo6i\nl8cqpZTKkJ5RKKWUypA2FEoppTKkDYVSSqkMaUOhlFIqQ9pQKKWUypA2FEoppTKkDYVSSqkMaUOh\nlFIqQ/8PmaJ+JeNO1fwAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature drop in water is more than that of air\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.11: Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.11 \"\n", + "\n", + "#Initial temperature of soil in degree C\n", + "Ti = 20;\n", + "#Surface temperature of soil\n", + "Ts = -15;\n", + "#Critical temperature (Freezing temperature) in degree C\n", + "Tc = 0;\n", + "#Time in days\n", + "t = 60;\n", + "#Density of soil in kg/m3\n", + "rho = 2050.0;\n", + "#Thermal conductivity of soil in W/mK\n", + "k = 0.52;\n", + "#Specific heat in J/kgK\n", + "c = 1840.0;\n", + "#Diffusivity in m2/sec\n", + "alpha = k/(rho*c);\n", + "\n", + "#Finding the value of following to proceed further\n", + "#Z value\n", + "z = (Tc-Ts)/(Ti-Ts);\n", + "\n", + "#From table 43, it corresponds to an error function value of 0.4,\n", + "#proceeding\n", + "\n", + "print \"Minimum depth at which one must place a water main below the surface to avoid freezing in m is\"\n", + "#Minimum depth at which one must place a water main below the surface to avoid freezing in m\n", + "xm = (0.4*2)*((((alpha*t)*24)*3600)**0.5)\n", + "\n", + "print round(xm,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.11 \n", + "Minimum depth at which one must place a water main below the surface to avoid freezing in m is\n", + "0.68\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.12: Page 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.12 \"\n", + "\n", + "#Length of steel component in m\n", + "L = 2;\n", + "#Radius of steel component in m\n", + "ro = 0.1;\n", + "#Thermal conductivity of steel in W/mK\n", + "k = 40;\n", + "#Thermal diffusivity in m2/s\n", + "alpha = 0.00001;\n", + "#Initital temperature in degree C\n", + "Ti = 400;\n", + "#Surrounding temperature in degree C\n", + "Tinfinity = 50;\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 200;\n", + "#time of immersion in mins\n", + "t = 20;\n", + "\n", + "#Since the cylinder has a length 10 times the diameter, we can neglect end\n", + "#effects.\n", + "\n", + "#Calculating biot number\n", + "bi = (h*ro)/k;\n", + "if (bi>0.1):\n", + " #Calculating fourier number\n", + " fo = ((alpha*t)*60)/(ro*ro);\n", + " #The initial amount of internal energy stored in the cylinder per unit\n", + " #length in Ws/m\n", + " Q = ((((k*math.pi)*ro)*ro)*(Ti-Tinfinity))/alpha;\n", + "\n", + " #The dimensionless centerline temperature for 1/Bi\u0002= 2.0 and Fo\u0002= 1.2 from\n", + " #Fig. 2.43(a)\n", + " #Centreline temperature in degree C\n", + " T = Tinfinity+0.35*(Ti-Tinfinity);\n", + " print \"Centreline temperature in degree C is\"\n", + " print T\n", + " #The surface temperature at r/r0\u0002= 1.0 and t\u0002= 1200 s is obtained from Fig. 2.43(b) in terms of the centerline temperature\n", + " #Surface temperature in degree C\n", + " Tr = Tinfinity+0.8*(T-Tinfinity);\n", + " print \"Surface temperature in degree C is\"\n", + " print Tr\n", + " #Then the amount of heat transferred from the steel rod to the water can be obtained from Fig. 2.43(c). Since Q\u001b(t)/Qi\u001b\u0002= 0.61,\n", + " print \"The heat transferred to the water during the initial 20 min in kWh is\"\n", + " #The heat transferred to the water during the initial 20 min in Wh\n", + " Q = ((0.61*L)*Q)/(3600*1000)\n", + " print round(Q,1)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.12 \n", + "Centreline temperature in degree C is\n", + "172.5\n", + "Surface temperature in degree C is\n", + "148.0\n", + "The heat transferred to the water during the initial 20 min in kWh is\n", + "14.9\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.13: Page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.13 \"\n", + "\n", + "#Thickness of wall in m\n", + "L = 0.5;\n", + "#Initial temperature in degree C\n", + "Ti = 60;\n", + "#Combustion gas (Surrounding) temperature in degree C\n", + "Tinfinity = 900;\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 25;\n", + "#Thermal conductivity in W/mk\n", + "k = 1.25;\n", + "#Specific heat in J/KgK\n", + "c = 837;\n", + "#Density in kg/m3\n", + "rho = 500;\n", + "#Thermal diffusivity in m2/s\n", + "alpha = 0.000003;\n", + "#Required temperature to achieve in degree C\n", + "Ts = 600;\n", + "\n", + "#Calculating temperature ratio\n", + "z = (Ts-Tinfinity)/(Ti-Tinfinity);\n", + "#Reciprocal biot number\n", + "bi = k/(h*L);\n", + "\n", + "\n", + "#From Fig. 2.42(a) we find that for the above conditions the Fourier number\u0005= 0.70 at the midplane.\n", + "#Time in hours\n", + "t = ((0.7*L)*L)/alpha;\n", + "print \"Time in hours is\"\n", + "#Time in hours\n", + "t = t/3600.0\n", + "print round(t,1)\n", + "\n", + "#The temperature distribution in the wall 16 h after the transient was\n", + "#initiated can be obtained from Fig. 2.42(b) for various values of x/L\n", + "\n", + "print \"Temperature distribution in degree C is\"\n", + "print \" (x/l) = 1.00 0.80 0.60 0.40 0.20\"\n", + "print \"Fraction = 0.13 0.41 0.64 0.83 0.96\"\n", + "\n", + "#The heat transferred to the wall per square meter of surface area during\n", + "#the transient can be obtained from Fig. 2.42(c).\n", + "print \"Heat transfer in J/m2 is\"\n", + "#Heat transfer in J/m2\n", + "Q = ((c*rho)*L)*(Ti-Tinfinity)\n", + "print \"{:.3e}\".format(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.13 \n", + "Time in hours is\n", + "16.2\n", + "Temperature distribution in degree C is\n", + " (x/l) = 1.00 0.80 0.60 0.40 0.20\n", + "Fraction = 0.13 0.41 0.64 0.83 0.96\n", + "Heat transfer in J/m2 is\n", + "-1.758e+08\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.14: Page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.14 \"\n", + "\n", + "#Radius of cylinder in m\n", + "ro = 0.05;\n", + "#Length of cylinder in m\n", + "L = 0.16;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.5;\n", + "#Thermal diffusivity in m2/s\n", + "alpha = 0.0000005;\n", + "#Initial temperature in degree C\n", + "Ti = 20.0;\n", + "#Surrounding temperature in degree C\n", + "Tinfinity = 500.0;\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 30.0;\n", + "#Time in mins\n", + "t = 30.0;\n", + "\n", + "#Biot number\n", + "bi = (h*ro)/k;\n", + "#Fourier number\n", + "fo = ((alpha*t)*60)/((L*L)/4);\n", + "\n", + "#From fig. 2.42(a)\n", + "#Po\n", + "P0 = 0.9;\n", + "#From fig. 2.42(a) and (b)\n", + "#Pl\n", + "PL = 0.243;\n", + "#From fig. 2.43(a)\n", + "#Co\n", + "C0 = 0.47;\n", + "#From fig. 2.43(a) and (b)\n", + "#Cr\n", + "CR = 0.155;\n", + "print \"Minimum temperature in degree C\"\n", + "#Minimum temperature in degree C\n", + "Tmin = Tinfinity+((Ti-Tinfinity)*P0)*C0\n", + "print round(Tmin)\n", + "\n", + "print \"Maximum temperature in degree C\"\n", + "#Maximum temperature in degree C\n", + "Tmax = Tinfinity+((Ti-Tinfinity)*PL)*CR\n", + "print round(Tmax)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 2 Example # 2.14 \n", + "Minimum temperature in degree C\n", + "297.0\n", + "Maximum temperature in degree C\n", + "482.0\n" + ] + } + ], + "prompt_number": 48 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_3.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_3.ipynb new file mode 100755 index 00000000..a0e7ab4a --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_3.ipynb @@ -0,0 +1,751 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:805f28ddb7b8511db1185cb38d46ad154b567b06441a1fbf2a91bb4011602e71" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Numerical Analysis of Heat Conduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1: Page 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from numpy import matrix\n", + "from numpy import linalg\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.1 \"\n", + "\n", + "#Cross section of the element in m is given as\n", + "b = 0.1; #breadth in m\n", + "H = 0.01; #height in m\n", + "#Temperature of surrrounding oil in C is given as\n", + "Tinfinity = 80;\n", + "#Correspoding heat transfer coefficient in W/m2-K is given as:\n", + "h = 42.0;\n", + "#Heat generation rate is given in W/m3 as\n", + "qg = 10**6;\n", + "#Temperature below which element needed to maintain in C is\n", + "T = 200.0;\n", + "# Thermal conductivity of iron in W/m-K is taken as\n", + "k = 64.0;\n", + "\n", + "#Because of symmetry we need to consider only half of the thickness of the heating element\n", + "L = H/2.0; #Length in m\n", + "#We are defining five nodes at a distance of (i-1)*dx, where i=1,2,3,4,5\n", + "N = 5.0; #Total number of grid points\n", + "dx = L/(N-1); #dx in m\n", + "#Since no heat flows across the top face, it corresponds to a zero-heat\n", + "#flux boundary condition.\n", + "#Applying Eq. (2.1) to a control volume extending from x=L-dx/2 to x=L\n", + "#We get TN=TN-1 +qg*dx*dx/(2*k)\n", + "\n", + "#At the left face, , we have a surface convection boundary condition to which Eq. (3.7) can be applied\n", + "#Determining all the matrix coefficients in Eq. (3.11)\n", + "a1 = 1; #Matrix coefficient a1 in SI units\n", + "b1 = 1/(1+(h*dx)/k); #Matrix coefficient b1 in SI units\n", + "c1 = 0; #Matrix coefficient c1 in SI units\n", + "d1 = (dx/k)*((h*Tinfinity+(qg*dx)/2)/(1+(h*dx)/k)); #Matrix coefficient d1 in SI units\n", + "a2 = 2;a3 = a2;a4 = a3;#Matrix coefficient a2 in SI units\n", + "b2 = 1;b3 = b2;b4 = b3;#Matrix coefficient b2 in SI units\n", + "c2 = 1;c3 = c2;c4 = c3;#Matrix coefficient c2 in SI units\n", + "d2 = ((dx*dx)*qg)/k;d3 = d2;d4 = d2;#Matrix coefficient d2 in SI units\n", + "a5 = 1;b5 = 0;c5 = 1;d5 = ((dx*dx)*qg)/(2*k);#Matrix coefficient a5 in SI units\n", + "\n", + "#Umath.sing the algorithm given in Appendix 3 for solving the tridiagonal system, we find the temperature distribution given as:\n", + "print \"Final temperature distribution in C is the following\"\n", + "#From equation 3.11\n", + "#Matrix A in the Appendix 3\n", + "A = [[a1,-b1,0,0,0],[-c2,a2,-b2,0,0],[0,-c3,a3,-b3,0],[0,0,-c4,a4,-b4],[0,0,0,-c5,a5]]\n", + "#Matrix D in the Appendix 3\n", + "D = [[d1],[d2],[d3],[d4],[d5]];\n", + "#Temperature matrix where temp are in degree C as given by appnedix 3\n", + "T = ((linalg.inv(A))*D)\n", + "z1=0\n", + "z2=0\n", + "z3=0\n", + "z4=0\n", + "z5=0\n", + "for i in range(0,5):\n", + " z1=z1+T[i][0]\n", + " z2=z2+T[i][1]\n", + " z3=z3+T[i][2]\n", + " z4=z4+T[i][3]\n", + " z5=z5+T[i][4]\n", + "\n", + "print round(z1,4),\"\\n\",round(z2,4),\"\\n\",round(z3,4),\"\\n\",round(z4,4),\"\\n\",round(z5,4)\n", + "\n", + "# the answer in the book is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.1 \n", + "Final temperature distribution in C is the following\n", + "199.1331 \n", + "199.0553 \n", + "199.1163 \n", + "199.153 \n", + "199.1652\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2: Page 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.2 \"\n", + "\n", + "# we have to determine minimum depth xm at which a water main must be buried to avoid freezing\n", + "\n", + "#Initial temperature of soil in C is given as:\n", + "Ts = 20.0;\n", + "# Under the worst conditions anticipated it would be subjected to a surface\n", + "# temperature of -15C for a period of 60 days\n", + "#Max temperature in degree C\n", + "Tmax = -15.0;\n", + "#Time period in days\n", + "dt = 60.0;\n", + "#We will use the following properties for soil (at 300 K)\n", + "rho = 2050;#density in kg/m3\n", + "k = 0.52;#thermal conductivity in W/m-K\n", + "c = 1840;#specific heat in J/kg-K\n", + "alpha = 0.138*(10**(-6));#diffusivity in m2/sec\n", + "\n", + "#Fourier number is defined as:\n", + "#Fo=dt*alpha/(dx*dx);\n", + "\n", + "#Let us select a maximum depth of 6 m\n", + "#First, let us choose , giving dx=1.2m\n", + "\n", + "dx = 1.2; #dx in m\n", + "dt = (30*24)*3600;#Days converted in seconds\n", + "\n", + "#Temperature array for the old temperature in degree C\n", + "Tnew = [-15,20,20,20,20,20];\n", + "\n", + "#Temperature array for the new temperature in degree C\n", + "Told = [-15,20,20,20,20,20];\n", + "#Fourier number is defined as:\n", + "Fo = (dt*alpha)/(dx*dx);\n", + "\n", + "#Umath.sing eq. 3.15\n", + "#Initialmath.sing timestep for looping\n", + "timestep = 0;\n", + "for timestep in range(0,100):\n", + " for N in range (2,4):\n", + " #New temp in degree C\n", + " Tnew[N] = Told[N]+Fo*(Told[N+1]-2*Told[N]+Told[N-1]);\n", + " #Incrementing timestep\n", + " timestep = timestep+1;\n", + " \n", + "\n", + "print \"With dx=1.2m, we have the following distribution\"\n", + "#New temp in degree C\n", + "Tnew\n", + "\n", + "print \"Depth in m at which temperature would be 0 degree C would be\"\n", + "#Depth in m \n", + "xm = (0-Tnew[0]/(Tnew[1]-Tnew[0]))*dx\n", + "\n", + "print xm\n", + "\n", + "# the answer in the textbook is wrong\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.2 \n", + "With dx=1.2m, we have the following distribution\n", + "Depth in m at which temperature would be 0 degree C would be\n", + "1.2\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3: Page 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.3 \"\n", + "\n", + "#initial temperature of the sheet in C is given as:\n", + "Tinitial = 500.0;\n", + "#thickness of the sheet in m is given as\n", + "th = 0.02;\n", + "#density in kg/m3 is given for steel as\n", + "rho = 8500.0;\n", + "#specific heat in J/kg-K is given as\n", + "c = 460.0;\n", + "#thermal conductivity in W/m-K is given as\n", + "k = 20.0;\n", + "#The heat transfer coefficient in W/m2-K to the air is given as\n", + "h = 80.0;\n", + "#the ambient air temperature in degree C is\n", + "Tinfinity = 20.0;\n", + "#Final temperature required to achieve in C is\n", + "Tfinal = 250.0;\n", + "#The transient cooling of stainless steel sheet can be modeled as a semi-infinite slab\n", + "#because the thickness of the sheet is much smaller than its width and length.\n", + "L = th/2.0; #Length in m\n", + "#Finding chart solution\n", + "#Biot number shall be\n", + "Bi = (h*L)/k;\n", + "\n", + "#Since Bi<0.1 and hence the sheet can be treated as a lumped capacitance.\n", + "\n", + "#To use fig. 2.42 on page 135, we need to calculate the following value:\n", + "value = (Tfinal-Tinfinity)/(Tinitial-Tinfinity); #value required\n", + "\n", + "#So, now umath.sing fig. 2.42, we have alpha*dt/(L*L)=19\n", + "#BY the definition of thermal diffusivity,in SI units we have\n", + "alpha = k*1.0/(rho*c);\n", + "print \"By chart solution, time required in seconds comes out to be\"\n", + "#time required in seconds\n", + "t = ((19.0*L)*L)/alpha\n", + "print round(t,2)\n", + "\n", + "#Proceeding to the numerical solution\n", + "#consider half the sheet thickness,with x=0 being the math.exposed left face and\n", + "#x=L being the sheet center-line\n", + "\n", + "#Umath.sing 20 control volumes\n", + "N = 21.0; #Total number of grid points\n", + "dx = L/20.0; #dx in m\n", + "Told=numpy.zeros((1,21))\n", + "Tnew=numpy.zeros((1,21))\n", + "#Old temperature array\n", + "for N in range(0,20):\n", + " #Old temp in degree C\n", + " Told[0,N] = Tinitial;\n", + " #New temp in degree C\n", + " Tnew[0,N] = Tinitial;\n", + "\n", + "\n", + "#Increment of Time in sec\n", + "dt = 5.57;\n", + "#Condition of looping\n", + "while Told[0,20]>250:\n", + " #C1 of governing equation in SI units\n", + " C1 = (alpha*dt)/(dx*dx);\n", + " #C2 of governing equation in SI units\n", + " C2 = ((2*h)*dt)/((rho*c)*dx);\n", + " #C3 of governing equation in SI units\n", + " C3 = 2*C1;\n", + " #New temp in C as given by the equations of finite difference method\n", + " Tnew = (Told[0]+C2*(Tinfinity-Told[0])+C3*(Told[1]-Told[0]));\n", + " t=t+5.57 # increment\n", + " Tnew = Told[0,20]+C3*(Told[0,19]-Told[0,20]);\n", + " for N in range(2,20):\n", + " #New temp in C as given by the equations of finite difference method\n", + " Tnew = t+dt+(Tnew,N,Told(N)+C1*(Told(N+1)-2*Told(N)+Told(N-1)));\n", + " \n", + " \n", + " #Modified time for new loop\n", + "t = t+dt;\n", + "\n", + "# L.67: No simple equivalent, so mtlb_fprintf() is called.\n", + "print \"As per numerical solution time comes out to be \",round(t,2),\" seconds\\n\"\n", + "\n", + "print \"This time is about 1.5% less than the chart solution\"\n", + "\n", + "# the solution in the book is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.3 \n", + "By chart solution, time required in seconds comes out to be\n", + "371.45\n", + "As per numerical solution time comes out to be 377.02 seconds\n", + "\n", + "This time is about 1.5% less than the chart solution\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4: Page 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.4 \"\n", + "\n", + "#Dimensions of the cross section in inches\n", + "l = 1;\n", + "b = 1;\n", + "\n", + "#Dividing domain such that there are four nodes in x and y direction\n", + "dx = 1/3.0; #dx in inches\n", + "dy = 1/3.0; #dy in inches\n", + "\n", + "#Assigning Temperature in C for top and bottom surface\n", + "T=numpy.zeros((4,4))\n", + "for i in range(0,3):\n", + " T[0,i] = 0;\n", + " T[3,i] = 0;\n", + "\n", + "#Assigning Temperature in C for side surfaces\n", + "for j in range(0,3):\n", + " T[j,0] = 50;\n", + " T[j,3] = 100;\n", + "\n", + "#Assigning Temperature in C for interior nodes\n", + "for i in range(0,2):\n", + " for j in range(0,2):\n", + " T[i,j] = 0;\n", + " \n", + "#Defining looping parameter\n", + "step = 0;\n", + "for step in range (0,50):\n", + " #Umath.sing governing equations of finite difference\n", + " T[2,1] = 0.25*(50+0+T[1,2]+T[2,1]);\n", + " T[1,1] = 0.25*(50+0+T[2,1]+T[1,2]);\n", + " T[1,2] = 0.25*(100+0+T[2,1]+T[1,2]);\n", + " T[2,2] = 0.25*(100+0+T[1,1]+T[2,2]);\n", + "\n", + "\n", + "#print \"At steady state, Final temperature of the cross section in C would be\"\n", + "#New temp distribution in degree C\n", + "print'Temperature T(2,2) in degree C is ',round(T[1,1],2)\n", + "print'Temperature T(2,3) in degree C is ',round(T[2,1],2)\n", + "print'Temperature T(3,2) in degree C is ',round(T[1,2],2)\n", + "print'Temperature T(3,3) in degree C is ',round(T[2,2],2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.4 \n", + "Temperature T(2,2) in degree C is 31.25\n", + "Temperature T(2,3) in degree C is 31.25\n", + "Temperature T(3,2) in degree C is 43.75\n", + "Temperature T(3,3) in degree C is 43.75\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5: Page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.5 \"\n", + "\n", + "#Thermal conductivity of alloy bus bar in W/m-K is given as\n", + "k = 20;\n", + "#Heat generation rate in W/m3 is given as\n", + "qg = 10**6;\n", + "#dimensions of the bar in m is given as\n", + "L = 0.1;#Length in m\n", + "b = 0.05;#Width in m\n", + "d = 0.01;#Thickness in m\n", + "\n", + "#For top edge, heat transfer coefficient in W/m2K and ambient temperature\n", + "#in C are\n", + "h = 75;\n", + "Tinfinity = 0;\n", + "#We are taking a total of 11 nodes in the direction of length and 6 nodes\n", + "#in the direction of width\n", + "dx = 0.01; #dx in m\n", + "dy = 0.01; #dy in m\n", + "Told=numpy.zeros((6,12))\n", + "Tnew=numpy.zeros((6,12))\n", + "#Assigning a guess temperature of 25C to all nodes\n", + "for i in range(0,6):\n", + " for j in range(0,12):\n", + " #Old temp. in degree C\n", + " Told[i,j] = 25;\n", + " \n", + "#Assigning temperature on the left and right hand side\n", + "for i in range(0,6):\n", + " #Old temp. in degree C\n", + " Told[i,0] = 40;\n", + " Told[i,10] = 10;\n", + " #New temp. in degree C\n", + " Tnew[i,0] = 40;\n", + " Tnew[i,10] = 10;\n", + "\n", + "#Intitalisation of looping parameter\n", + "p = 0;\n", + "#Iteration to find temperature distribution\n", + "while p<500:\n", + " #Equation for all interior nodes\n", + " for i in range(1,5):\n", + " for j in range(1,10):\n", + " #New temp. in degree C\n", + " Tnew[i,j] = 0.25*(Told[i-1,j]+Told[i+1,j]+Told[i,j-1]+Told[i,j+1]+((qg*dx)*dx)/k);\n", + "\n", + " #Equation for top wall\n", + " for j in range(1,10):\n", + " #New temp. in degree C\n", + " Tnew[0,j] = (h*Tinfinity+(qg*dx)/2+(k*(0.5*(Told[1,j-1]+Told[1,j+1])+Told[1,j]))/dx)/(h+(2*k)/dx);\n", + " \n", + "\n", + " #Equation for bottom wall\n", + " for j in range(1,10):\n", + " #New temp. in degree C\n", + " Tnew[5,j] = 0.25*(Told[5,j-1]+Told[5,j+1])+0.5*Told[4,j]+((qg*dx)*dx)/(4*k);\n", + " \n", + " for i in range(0,6):\n", + " for j in range(0,11):\n", + " #Assigning Old Temp=New Temp\n", + " Told[i,j] = round(Tnew[i,j],2);\n", + " \n", + " #New looping parameter incremented\n", + " p = p+1;\n", + "\n", + "print \"The temperature distribution in the bar in C is the following\"\n", + "#Old temp. in degree C\n", + "for i in range(0,11):\n", + " print \"Node\",i+1,\"= \",Told[0,i]\n", + "\n", + "#Finding maximum temperature\n", + "Tmax = Told[0,0];\n", + "for i in range(0,6):\n", + " for j in range(0,11):\n", + " if Told[i,j]>Tmax:\n", + " Tmax = Told[i,j];\n", + " else:\n", + " Tmax = Tmax;\n", + " \n", + "print \"The maximum temperature in C in the alloy bus bar is\"\n", + "#maximum temperature in C\n", + "print Tmax\n", + "\n", + "#Finding heat transfer rate\n", + "dz = 0.01; #dz in m\n", + "#Defining areas\n", + "A=numpy.zeros((1,11))\n", + "for i in range(1,11):\n", + " A[0,i] = dx*dz; #Area in m2\n", + "\n", + "q=numpy.zeros((1,11))\n", + "for i in range(0,11):\n", + " #heat transfer rate in W\n", + " q[0,i] = round((h*A[0,i])*(Tnew[0,i]-Tinfinity),3);\n", + "\n", + "print \"The heat transfer rate from the top edge in W is given by\"\n", + "#heat transfer rate in W\n", + "for i in range(0,11):\n", + " print \"node\",i+1,\"= \",q[0,i]\n", + "\n", + "# the answer in the textbook is incorrect in the calculations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.5 \n", + "The temperature distribution in the bar in C is the following" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Node 1 = 40.0\n", + "Node 2 = 56.71\n", + "Node 3 = 69.57\n", + "Node 4 = 77.94\n", + "Node 5 = 81.82\n", + "Node 6 = 81.21\n", + "Node 7 = 76.08\n", + "Node 8 = 66.43\n", + "Node 9 = 52.22\n", + "Node 10 = 33.38\n", + "Node 11 = 10.0\n", + "The maximum temperature in C in the alloy bus bar is\n", + "85.44\n", + "The heat transfer rate from the top edge in W is given by\n", + "node 1 = 0.0\n", + "node 2 = 0.425\n", + "node 3 = 0.522\n", + "node 4 = 0.585\n", + "node 5 = 0.614\n", + "node 6 = 0.609\n", + "node 7 = 0.571\n", + "node 8 = 0.498\n", + "node 9 = 0.392\n", + "node 10 = 0.25\n", + "node 11 = 0.075\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.6: Page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.6 \"\n", + "\n", + "#Thermal diffusivity in m2/s\n", + "alpha = 0.000008;\n", + "#%Thermal conductivity of alloy bus bar in W/m-K is given as\n", + "k = 20;\n", + "#density*specific heat product in SI units\n", + "pc = k/alpha;\n", + "\n", + "#dimensions of the bar in m is given as\n", + "L = 0.1;#Length in m\n", + "b = 0.05;#Width in m\n", + "d = 0.01;#Thickness in m\n", + "\n", + "#Heat generation rate in W/m3 is given as\n", + "qg = 10**6;\n", + "\n", + "#Assigning temperature on the left and right hand side\n", + "for i in range (0,6): #i is the looping parameter\n", + " #Old temp. in degree C\n", + " Told[i,0] = 40;\n", + " Told[i,10] = 10;\n", + " #New temp. in degree C\n", + " Tnew[i,0] = 40;\n", + " Tnew[i,10] = 10;\n", + "\n", + "\n", + "#Assigning a guess temperature of 20C to all nodes\n", + "for i in range(0,6):#i is the looping parameter\n", + " for j in range(0,11):#j is the looping parameter\n", + " #Guess temp. in degree C\n", + " Told[i,j] = 20;\n", + " Tnew[i,j] = 20;\n", + " \n", + "\n", + "#Initialimath.sing time\n", + "m = 0;\n", + "\n", + "#For top edge, heat transfer coefficient in W/m2K and ambient temperature\n", + "#in C are\n", + "h = 75;\n", + "Tinfinity = 0;\n", + "\n", + "#We are taking a total of 11 nodes in the direction of length and 6 nodes\n", + "#in the direction of width\n", + "dx = 0.01; #dx in m\n", + "dy = 0.01; #dy in m\n", + "\n", + "#Largest permissible time step in sec is\n", + "tmax = 1/((2*alpha)*(1/(dx*dx)+1/(dy*dy)));\n", + "m=1140; # explicit time in secs\n", + "#Rounding it off to nearest integer\n", + "t = 3; #timestep in seconds\n", + "\n", + "#Condition for convergence\n", + "while abs(Tnew[4,5]-Told[4,5])<0.0001:\n", + "\n", + " #Equation for all interior nodes\n", + " for i in range(1,5):\n", + " for j in range (1,10):\n", + " #New temp. in degree C\n", + " Tnew[i,j] = (Told[i,j]+(alpha*t)*((Tnew[i+1,j]+Tnew[i-1,j])/(dx*dx)+(Tnew[i,j+1]+Tnew[i,j-1])/(dy*dy)+qg/k))/(1+((2*alpha)*t)*(1/(dx*dx)+1/(dy*dy)));\n", + " \n", + " #Equation for top wall\n", + " for j in range (1,10):\n", + " #New temp. in degree C\n", + " Tnew[0,j] = (Told[0,j]+((2*t)/((dx*dx)*pc))*(k*((Tnew[0,j+1]+Tnew[0,j-1])/2+Tnew[1,j]))+((qg*dx)*dx)/2+(h*dx)*Tinfinity)/(1+((2*t)/((dx*dx)*pc))*(2*k+h*dx));\n", + " \n", + "\n", + " #Equation for bottom wall\n", + " for j in range (1,10):\n", + " #New temp. in degree C\n", + " Tnew[5,j] = (Told[5,j]+((2*t)/((dx*dx)*pc))*(k*((Tnew[5,j+1])+Tnew[5,j-1])/2+Tnew[4,j]))+(((qg*dx)*dx)/2)/(1+((2*t)/((dx*dx)*pc))*(2*k));\n", + " \n", + " #New time in sec\n", + " m = m+t;\n", + "\n", + "\n", + "\n", + "print \"Time required to reach steady state using explicit method is 1140 seconds\"\n", + "print \"Time required to reach steady state using implicit method with deltaT=0.3 sec is \"\n", + "print m,\"seconds\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.6 \n", + "Time required to reach steady state using explicit method is 1140 seconds\n", + "Time required to reach steady state using implicit method with deltaT=0.3 sec is \n", + "1143 seconds\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7: Page 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.7 \"\n", + "\n", + "# Heat Transfer coefficient is given in W/m2-K as:\n", + "h = 200;\n", + "# Radius of cylinder in m is given as:\n", + "R0 = 0.05;\n", + "# Thermal conductivity in W/m-K is given as:\n", + "k = 20;\n", + "# Thermal diffusivityt in m2/sec is given as:\n", + "alpha = 10**(-5);\n", + "# Therefore the biot number is given as:\n", + "Bi = (h*R0)/k;\n", + "\n", + "# Ambient water bath temperature in C is given as:\n", + "Tinfinity = 0;\n", + "# Initial temperature of centre line is given as:\n", + "T0 = 500;\n", + "# Final Temperature of centre line is given as:\n", + "Tr = 100;\n", + "\n", + "# Therefore the value of (Tr-Tinfinity)/(T0-Tinfinity) is:\n", + "value = (Tr-Tinfinity)/(T0-Tinfinity); #Required value\n", + "\n", + "# Umath.sing above value and biot number, from Figure 2.43 (a) on page 137, we have\n", + "# alpha*t/(R0*R0)=1.8\n", + "\n", + "print \"Therefore from chart solution, time taken in seconds shall be\"\n", + "#Time taken in seconds\n", + "t = ((1.8*R0)*R0)/alpha\n", + "print t\n", + "\n", + "# Proceeding to the numerical solution\n", + "#Because of symmetry we need to consider only one quarter of the circular cross section\n", + "#The vertical and horizontal radii are then adiabatic surfaces.\n", + "\n", + "#We will have a total of nine types of control volume\n", + "#Each of the control volume energy balance equations can be solved\n", + "\n", + "#The coefficient on Tfor control volume type 7 is:\n", + "#(dx*dx/(alpha*dt)) -2 -2*h*dx/5\n", + "#and for it to be positive\n", + "\n", + "# value of \u0002t we use in the numerical solution must be smaller than this\n", + "# maximum value. The calculation is continued until the temperature for the control vol-ume nearest the cylinder axis is less than 100\u00b0C\n", + "\n", + "print \"And using numerical solution the time in seconds comes out to be\"\n", + "#Time taken in seconds\n", + "tfinal = 431\n", + "print tfinal\n", + "print \"which is about 4% less than the chart solution of 450 s.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 3 Example # 3.7 \n", + "Therefore from chart solution, time taken in seconds shall be\n", + "450.0\n", + "And using numerical solution the time in seconds comes out to be\n", + "431\n", + "which is about 4% less than the chart solution of 450 s.\n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_4.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_4.ipynb new file mode 100755 index 00000000..7225de72 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_4.ipynb @@ -0,0 +1,228 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:11f45017c0b7621dbc0b25eb3397de260e67c21b40c42a2bb181ecd86cc79690" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter04: Analysis of Convection Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1:pg-232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.1 \"\n", + "\n", + "# Temperature of air in C is given as:\n", + "Tinfinity = 20;\n", + "# Temperature of surface in C is given as:\n", + "Ts = 100;\n", + "# Therefore avaerage temperature in degree C would be:\n", + "Ta = (Ts+Tinfinity)/2;\n", + "# From fig. 4.2 on page 232, it can be easily seen that (deltaT/deltaY) at\n", + "# y=0 is -66.7 K/mm\n", + "# From Table 28 in Appendix 2, at average temperature of air, thermal\n", + "# conductivity in W/m-K is\n", + "k = 0.028;\n", + "\n", + "#Therefore from eq. 4.1\n", + "print \"The heat transfer coefficient is given by, as per Eq. 4.1, in W/m2K\"\n", + "# 1000 is added to convert from mm to m\n", + "#heat transfer coefficient in W/m2K\n", + "hc = ((-k*(-66.7))/(Ts-Tinfinity))*1000\n", + "print round(hc,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.1 \n", + "The heat transfer coefficient is given by, as per Eq. 4.1, in W/m2K\n", + "23.3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3:pg-259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.3 \"\n", + "\n", + "# Width of the collector plate in ft is given:\n", + "b = 1.0;\n", + "# Surface temperature in F is given:\n", + "Ts = 140.0;\n", + "# Air temperature in F is given:\n", + "Tinfinity = 60.0;\n", + "# Air velocity in ft/sec is given as:\n", + "Uinfinity = 10.0;\n", + "# Average temperature in degree F is given as:\n", + "T = (Ts+Tinfinity)/2;\n", + "# Properties of air at average temperature are as follows\n", + "\n", + "Pr = 0.72; #Prandtl number\n", + "k = 0.0154; # Thermal conductivity in Btu/h ft \u00b0F\n", + "mu = 1.285*10-5; #Viscosity in lbm/ft s\n", + "cp = 0.24; #Specific heat in Btu/lbm \u00b0F\n", + "rho = 0.071; #Density in lbm/ft3\n", + "\n", + "# Reynold''s number at x=1ft is\n", + "Re1 = ((Uinfinity*rho)*1)/mu;\n", + "# Reynold''s number at x=9ft is\n", + "Re9 = ((Uinfinity*rho)*1)/mu;\n", + "# Assuming that the critical Reynolds number is 5*10**5, the critical distance is\n", + "#Critical Reynolds number\n", + "Rec = 5.0*(10**5);\n", + "#Critical distance in ft\n", + "xc = (Rec*mu)/(Uinfinity*rho);\n", + "\n", + "# From Eq. 4.28, and using the data obtained, we get for part a:\n", + "print \"Delta at x=1ft to be 0.0213ft and at x=9ft to be 0.0638ft\"\n", + "\n", + "# From Eq. 4.30, and using the data obtained, we get for part b:\n", + "print \"Cfx at x=1ft to be 0.00283 and at x=9ft to be 0.000942\"\n", + "\n", + "# From Eq. 4.31, and using the data obtained, we get for part c:\n", + "print \"Cfbar at x=1ft to be 0.00566 and at x=9ft to be 0.00189\"\n", + "\n", + "# From Eq. 4.29, and using the data obtained, we get for part d:\n", + "print \"Tau at x=1ft to be 3.12*10**-4 lb/ft**2 and at x=9ft to be 1.04*10**-4 lb/ft**2\"\n", + "\n", + "# From Eq. 4.32, and using the data obtained, we get for part e:\n", + "print \"DeltaTH at x=1ft to be 0.0237ft and at x=9ft to be 0.0712ft\"\n", + "\n", + "# From Eq. 4.36, and using the data obtained, we get for part f:\n", + "print \"hcx at x=1ft to be 1.08Btu/hft**2\u00b0F and at x=9ft to be 0.359Btu/hft**2\u00b0F\"\n", + "\n", + "# From Eq. 4.39, and using the data obtained, we get for part g:\n", + "print \"hcbar at x=1ft to be 2.18Btu/hft**2\u00b0F and at x=9ft to be 0.718Btu/hft**2\u00b0F\"\n", + "\n", + "# From Eq. 4.35, and using the data obtained, we get for part h:\n", + "print \"q at x=1ft to be 172 Btu/h and at x=9ft to be 517 Btu/h\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.3 \n", + "Delta at x=1ft to be 0.0213ft and at x=9ft to be 0.0638ft\n", + "Cfx at x=1ft to be 0.00283 and at x=9ft to be 0.000942\n", + "Cfbar at x=1ft to be 0.00566 and at x=9ft to be 0.00189\n", + "Tau at x=1ft to be 3.12*10**-4 lb/ft**2 and at x=9ft to be 1.04*10**-4 lb/ft**2\n", + "DeltaTH at x=1ft to be 0.0237ft and at x=9ft to be 0.0712ft\n", + "hcx at x=1ft to be 1.08Btu/hft**2\u00b0F and at x=9ft to be 0.359Btu/hft**2\u00b0F\n", + "hcbar at x=1ft to be 2.18Btu/hft**2\u00b0F and at x=9ft to be 0.718Btu/hft**2\u00b0F\n", + "q at x=1ft to be 172 Btu/h and at x=9ft to be 517 Btu/h\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.4:pg-275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.4 \"\n", + "\n", + "# Length of the crankcase in m is given as\n", + "L = 0.6;\n", + "# Width of the crankcase in m is given as\n", + "b = 0.2;\n", + "# Depth of the crankcase in m is given as\n", + "d = 0.1;\n", + "# Surface temperature in K is given as\n", + "Ts = 350.0;\n", + "# Air temperature in K is given as\n", + "Tinfinity = 276.0;\n", + "# Air velocity in m/sec is given as\n", + "Uinfinity = 30.0;\n", + "# It is stated that boundary layer is turbulent over the entire surface\n", + "\n", + "#Average air temperature in degree K is\n", + "T = (Ts+Tinfinity)/2;\n", + "# At this average temperature, we get the following for air\n", + "rho = 1.092;#density in kg/m**3\n", + "mu = 0.000019123;#vismath.cosity in SI units\n", + "Pr = 0.71;#Prandtl number\n", + "k = 0.0265;#Thermal conductivity in W/m-K\n", + "\n", + "# Reynold''s number is therefore given as\n", + "ReL = ((rho*Uinfinity)*L)/mu;\n", + "\n", + "#From eq. 4.82, average nusselt number could be given as\n", + "Nu = (0.036*(Pr**(1/3.0)))*(ReL**0.8);\n", + "\n", + "#We can write from the basic math.expression, Nu=hc*L/k, that\n", + "#Heat transfer coefficient in W/m**2-K\n", + "hc = (Nu*k)/L;\n", + "\n", + "# The surface area that dissipates heat is 0.28 m2\n", + "print \"Total heat loss from the surface in W is therefore\"\n", + "#Heat loss from the surface in W\n", + "q = (hc*0.28)*(Ts-Tinfinity)\n", + "print round(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 4 Example # 4.4 \n", + "Total heat loss from the surface in W is therefore\n", + "1896.0\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_5.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_5.ipynb new file mode 100755 index 00000000..9b083c12 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_5.ipynb @@ -0,0 +1,499 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5fdab3b0064b5d0c97ade94fc81521598aac9bb145433eaa6c6612d618ddca90" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Natural Convection" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.1: Page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.1 \";\n", + "\n", + "# ''Body temp in degree C''\n", + "Tb = 127;\n", + "#''Body temp in degree K''\n", + "TbK = Tb+273;\n", + "#''Ambient temp in degree C''\n", + "Ta = 27;\n", + "#''Ambient temp in degree K''\n", + "TaK = Ta+273;\n", + "#''Film temperature = (Body Temperature + Ambient Temperature)/2''\n", + "#''Film temp in degree K''\n", + "TfK = (TbK+TaK)/2;\n", + "#''Value of coefficient of math.expansion at this film temp in degree K inverse''\n", + "B = 1/TfK;\n", + "#''Value of Prandtl number at this film temp''\n", + "Pr = 0.71;\n", + "#''Value of kinematic vismath.cosity at this film temp in m2/s''\n", + "v = 0.0000212;\n", + "#''Value of thermal conductivity at this film temp in W/m-K''\n", + "k = 0.0291;\n", + "#''acceleration due to gravity in m/s2''\n", + "g = 9.81;\n", + "#''temperature diff. between body and ambient in degree K''\n", + "deltaT = TbK-TaK;\n", + "#''diameter of heater wire in m''\n", + "d = 0.001;\n", + "#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*d**3)/v**2)''\n", + "Ra = ((((Pr*g)*B)*deltaT)*(d**3))/(v**2);\n", + "\n", + "#''From Fig. 5.3 on Page 303, we get''\n", + "#''log(Nu) = 0.12, where Nu is nusselt number, therefore''\n", + "Nu = 1.32;\n", + "#''Umath.sing Nu = hc*d/k, we get heat transfer coefficient in W/m2-K''\n", + "hc = (Nu*k)/d;\n", + "print \"The rate of heat loss per meter length in air in W/m is given by hc*(A/l)*deltaT\"\n", + "#heat loss per meter length in air in W/m\n", + "q = ((hc*deltaT)*math.pi)*d\n", + "print round(q,1)\n", + "\n", + "\n", + "#''For Co2, we evaluate the properties at film temperature''\n", + "#''Following are the values of dimensionless numbers so obtained''\n", + "#''Rayleigh number, Ra=16.90''\n", + "#''Nusselt number, Nu=1.62''\n", + "#''Umath.sing Nu = hc*d/k, we get''\n", + "#''hc = 33.2 W/m2-K''\n", + "print \"The rate of heat loss per meter length in CO2 is given by hc*(A/l)*deltaT\"\n", + "print \"q = 10.4 W/m\"\n", + "\n", + "print \" Discussion - For same area and temperature difference: \"\n", + "print \" Heat transfer by convection will be more, if heat transfer coeff. is high\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.1 \n", + "The rate of heat loss per meter length in air in W/m is given by hc*(A/l)*deltaT\n", + "12.1\n", + "The rate of heat loss per meter length in CO2 is given by hc*(A/l)*deltaT\n", + "q = 10.4 W/m\n", + " Discussion - For same area and temperature difference: \n", + " Heat transfer by convection will be more, if heat transfer coeff. is high\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.2: Page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.2 \";\n", + "\n", + "#''Surface temp in degree C''\n", + "TsC = 130;\n", + "#''Body temp in degree K''\n", + "Ts = TsC+273;\n", + "#''Ambient temp in degree C''\n", + "TinfinityC = 20;\n", + "#''Ambient temp in degree K''\n", + "Tinfinity = TinfinityC+273;\n", + "#''Film temperature = (Surface Temperature + Ambient Temperature)/2''\n", + "#''Film temp in degree K''\n", + "Tf = (Ts+Tinfinity)/2;\n", + "#''Height of plate in cms''\n", + "L = 15;\n", + "#''Width of plate in cms''\n", + "b = 10.0;\n", + "#''Value of Grashof number at this film temp is given by\n", + "#65(L**3)(Ts-Tinfinity)''\n", + "#Grashof number\n", + "Gr = (65*(L**3))*(Ts-Tinfinity);\n", + "#''Since the grashof number is less than 10**9, therefore flow is laminar''\n", + "#''For air at film temp = 75C (348K), Prandtl number is''\n", + "Pr = 0.71;\n", + "#''And the product Gr*Pr is''\n", + "#Prodect of Gr and Pr\n", + "GrPr = Gr*Pr;\n", + "#''From Fig 5.5 on page 305, at this value of GrPr, Nusselt number is''\n", + "Nu = 35.7;\n", + "#''Value of thermal conductivity at this film temp in W/m-K''\n", + "k = 0.029;\n", + "\n", + "#''Umath.sing Nu = hc*L/k, we get ''\n", + "#Heat transfer coefficient for convection in W/m2-K\n", + "hc = (Nu*k)/(L/100.0);\n", + "\n", + "#''Heat transfer coefficient for radiation, hr in W/m2-K''\n", + "hr = 8.5;\n", + "\n", + "#''Total area in m2 is given by 2*(b/100)*(L/100)''\n", + "A = (2*(b/100.0))*(L/100.0);\n", + "\n", + "\n", + "print \"Therefore total heat transfer in W is given by A*(hc+hr)*(Ts-Tinfinity)\"\n", + "#total heat transfer in W\n", + "q = (A*(hc+hr))*(Ts-Tinfinity)\n", + "print round(q,1)\n", + "\n", + "#''For plate to be 450cm in height, Rayleigh number becomes 4.62*10**11''\n", + "#''which implies that the flow is turbulent''\n", + "#''From Fig 5.5 on page 305, at this value of GrPr, Nusselt number is 973''\n", + "#''Umath.sing Nu = hc*d/k, we get in W/m2-K, hc_bar=6.3''\n", + "#''New Total area in m2, A_bar=2*(0.1)*(4.5)''\n", + "\n", + "print \"Therefore in new case, total heat transfer in W is given by A_bar*(hc_bar+hr)*(Ts-Tinfinity)\"\n", + "print \"we get q=1465W\"\n", + "\n", + "\n", + "print \" Discussion - For same temperature difference: \"\n", + "print \" Heat transfer will be more, if area math.exposed for convection and radiation is more\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.2 \n", + "Therefore total heat transfer in W is given by A*(hc+hr)*(Ts-Tinfinity)\n", + "50.8\n", + "Therefore in new case, total heat transfer in W is given by A_bar*(hc_bar+hr)*(Ts-Tinfinity)\n", + "we get q=1465W\n", + " Discussion - For same temperature difference: \n", + " Heat transfer will be more, if area math.exposed for convection and radiation is more\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3: Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.3 \"\n", + "\n", + "#''Surface temp in degree C''\n", + "TsC = 227.0;\n", + "#''Body temp in degree K'')\n", + "Ts = TsC+273;\n", + "#''Ambient temp in degree C''\n", + "TinfinityC = 27.0;\n", + "#''Ambient temp in degree K''\n", + "Tinfinity = TinfinityC+273;\n", + "#''Film temperature = (Surface Temperature + Ambient Temperature)/2''\n", + "#''Film temp in degree K'')\n", + "Tf = (Ts+Tinfinity)/2;\n", + "#''For a square plate, Height and width of plate in m''\n", + "L = 1.0;\n", + "b = 1.0;\n", + "#''For a square plate, characteristic length = surface area/parameter in m''\n", + "L_bar = (L*L)/(4.0*L);\n", + "#''Value of coefficient of math.expansion at this film temp in degree K inverse''\n", + "B = 1/Tf;\n", + "#''Value of Prandtl number at this film temp''\n", + "Pr = 0.71;\n", + "#''Value of thermal conductivity at this film temp in W/m-K''\n", + "k = 0.032;\n", + "#''Value of kinematic vismath.cosity at this film temp in m2/s''\n", + "v = 0.000027;\n", + "#''acceleration due to gravity in m/s2''\n", + "g = 9.81;\n", + "#''temperature diff. between body and ambient in degree K''\n", + "deltaT = Ts-Tinfinity;\n", + "#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*(L_bar)**3)/v**2)''\n", + "#Rayleigh number\n", + "Ra = ((((Pr*g)*B)*deltaT)*(L_bar**3))/(v**2);\n", + "\n", + "\n", + "#''From eq. 5.17 on page 311, we have nusselt number for bottom plate as 0.27*Pr**0.25''\n", + "NuBottom = 25.2;\n", + "#''From eq. 5.16 on page 311, we have nusselt number for top plate as 0.27*Pr**0.25''\n", + "NuTop = 63.4;\n", + "#''And therefore corresponding heat transfer coeeficients are in W/m2-K''\n", + "hcBottom = (NuBottom*k)/L_bar; #heat transfer coeeficients are in W/m2-K at bottom \n", + "hcTop = (NuTop*k)/L_bar; #heat transfer coeeficients are in W/m2-K at top\n", + "\n", + "\n", + "print \"Therefore total heat transfer in W is given by A*(hcTop+hcBottom)*(deltaT)\"\n", + "#heat transfer in W\n", + "q = ((L*b)*(hcTop+hcBottom))*deltaT\n", + "print round(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.3 \n", + "Therefore total heat transfer in W is given by A*(hcTop+hcBottom)*(deltaT)\n", + "2268.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4: Page 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.4 \";\n", + "\n", + "#''Ambient temp in degree C''\n", + "TinfinityC = 27;\n", + "#''Ambient temp in degree K''\n", + "Tinfinity = TinfinityC+273;\n", + "#''The criterion for transition is rayleigh number to be 10**9''\n", + "\n", + "\n", + "#''Value of coefficient of math.expansion at this temp in degree K inverse''\n", + "B = 1/Tinfinity;\n", + "#''Value of Prandtl number at this ambient temp''\n", + "Pr = 0.71;\n", + "#''Diameter of pipe in m''\n", + "D = 1;\n", + "#''Value of kinematic vismath.cosity at this temp in m2/s''\n", + "v = 0.0000164;\n", + "#''acceleration due to gravity in m/s2''\n", + "g = 9.81;\n", + "\n", + "#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*(D)**3)/v**2) = 10**9''\n", + "#''we get the temperature difference in centrigrade to be''\n", + "deltaT = 12;\n", + "print \"therefore the temperature of pipe in C is\"\n", + "# temperature of pipe in C\n", + "Tpipe = TinfinityC+deltaT\n", + "print round(Tpipe,2)\n", + "\n", + "\n", + "#''From table 13 in Appendix 2, for the case of water and umath.sing the same procedure we get''\n", + "# temperature difference in C\n", + "deltaTw = 0.05;\n", + "print \"therefore the temperature of pipe in C is\"\n", + "# temperature of pipe in C\n", + "Tpipew = TinfinityC+deltaTw\n", + "print round(Tpipew,2)\n", + "\n", + "print \" Discussion - For air and water: \"\n", + "print \" Temperature required to induce turbulence is higher in air\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.4 \n", + "therefore the temperature of pipe in C is\n", + "39.0\n", + "therefore the temperature of pipe in C is\n", + "27.05\n", + " Discussion - For air and water: \n", + " Temperature required to induce turbulence is higher in air\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5: Page 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.5 \";\n", + "\n", + "#''Top surface temp in degree C''\n", + "Tt = 20;\n", + "#''Body temp in degree K''\n", + "TtK = Tt+273;\n", + "#''Bottom temp in degree C''\n", + "Tb = 100;\n", + "#''Ambient temp in degree K''\n", + "TbK = Tb+273;\n", + "#''Average temp = (Bottom Temperature + top Temperature)/2''\n", + "#''average temp in degree K''\n", + "T = (TbK+TtK)/2;\n", + "#''Value of coefficient of math.expansion at this temp in degree K inverse''\n", + "B = 0.000518;\n", + "#''Value of Prandtl number at this temp''\n", + "Pr = 3.02;\n", + "#''Value of kinematic vismath.cosity at this temp in m2/s''\n", + "v = 0.000000478;\n", + "#''acceleration due to gravity in m/s2''\n", + "g = 9.8;\n", + "#''temperature diff. between body and ambient in degree K''\n", + "deltaT = TbK-TtK;\n", + "#''depth of water in m''\n", + "h = 0.08;\n", + "#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*h**3)/v**2)''\n", + "Ra = ((((Pr*g)*B)*deltaT)*(h**3))/(v**2);\n", + "\n", + "#''From Eq. (5.30b) on page 318, we find''\n", + "#Nusselt number\n", + "Nu = 79.3;\n", + "#''Value of thermal conductivity at this film temp in W/m-K''\n", + "k = 0.657;\n", + "#''Umath.sing Nu = hc*d/k, we get heat transfer coefficient in W/m2-K''\n", + "hc = (Nu*k)/h;\n", + "#''diameter of pan in m''\n", + "d = 0.15;\n", + "#''area = pi*d*d/4''\n", + "a = ((math.pi*d)*d)/4;\n", + "print \"The rate of heat loss in W is given by hc*(A)*deltaT\"\n", + "#heat loss in W\n", + "q = (hc*deltaT)*a\n", + "print int(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.5 \n", + "The rate of heat loss in W is given by hc*(A)*deltaT\n", + "920\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.6: Page 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.6 \";\n", + "\n", + "#''RPM of shaft''\n", + "N = 3;\n", + "#''Angular velocity, omega=2*pi*N/60 in rad/s''\n", + "omega = 0.31;\n", + "#''Ambient temp in degree C''\n", + "Ta = 20;\n", + "#''Ambient temp in degree K''\n", + "TaK = Ta+273;\n", + "#''Shaft temp in degree C''\n", + "Ts = 100;\n", + "#''Shaft temp in degree K''\n", + "TsK = Ts+273;\n", + "#''Film temperature = (Shaft Temperature + Ambient Temperature)/2''\n", + "#''Film temp in degree K''\n", + "TfK = (TsK+TaK)/2;\n", + "#''diameter of shaft in m''\n", + "d = 0.2;\n", + "#''Value of kinematic vismath.cosity at this film temp in m2/s''\n", + "v = 0.0000194;\n", + "#''Value of reynolds number''\n", + "Re = (((math.pi*d)*d)*omega)/v;\n", + "\n", + "\n", + "#''acceleration due to gravity in m/s2''\n", + "g = 9.81;\n", + "#''temperature diff. between body and ambient in degree K''\n", + "deltaT = TsK-TaK;\n", + "#''Value of Prandtl number at this film temp''\n", + "Pr = 0.71;\n", + "#''Value of coefficient of math.expansion at this film temp in degree K inverse''\n", + "B = 1/TfK;\n", + "#''Therefore umath.sing Rayleigh number = ((Pr*g*B*deltaT*d**3)/v**2)''\n", + "#Rayleigh number\n", + "Ra = ((((Pr*g)*B)*deltaT)*(d**3))/(v**2);\n", + "\n", + "#''From Eq. 5.35 on Page 322, we get''\n", + "#Nusselt number\n", + "Nu = 49.2;\n", + "#''Value of thermal conductivity at this film temp in W/m-K''\n", + "k = 0.0279;\n", + "#''Umath.sing Nu = hc*d/k, we get in W/m2-K''\n", + "hc = (Nu*k)/d;\n", + "#''let the length math.exposed to heat transfer is l=1m''\n", + "#''then area in m2 = pi*d*l''\n", + "a = math.pi*d;\n", + "print \"The rate of heat loss in air in W is given by hc*(a)*deltaT\"\n", + "#heat loss in air in W\n", + "q = (hc*deltaT)*a\n", + "print round(q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 5 Example # 5.6 \n", + "The rate of heat loss in air in W is given by hc*(a)*deltaT\n", + "345.0\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_6.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_6.ipynb new file mode 100755 index 00000000..fc53bbf5 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_6.ipynb @@ -0,0 +1,623 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6f27b63789233dbcd6b595c8e65a2bfbfddf8fdce1aec80ae9bb6f8c99f32cf1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Forced Convection Inside Tubes And Ducts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.1: Page 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.1 \"\n", + "\n", + "#Inlet temperature in degree C\n", + "Tin = 10;\n", + "#Outlet temperature in degree C\n", + "Tout = 40;\n", + "#Diameter in m\n", + "D = 0.02;\n", + "#Massflow rate in kg/s\n", + "m = 0.01;\n", + "#Heat flux in W/m2\n", + "q = 15000;\n", + "\n", + "#From Table 13 in Appendix 2, the appropriate properties of water at an\n", + "#average temperature between inlet and outlet of 25\u00b0C are\n", + "\n", + "#Density in kg/m3\n", + "rho = 997;\n", + "#Specific heat in J/kgK\n", + "c = 4180;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.608;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.00091;\n", + "\n", + "print \"Reynolds Number is\"\n", + "#Reynolds number\n", + "Re = (4*m)/((math.pi*D)*mu)\n", + "print int(Re)\n", + "print \"Flow is Laminar\"\n", + "\n", + "#Since the thermal-boundary condition is one of uniform heat flux, Nu\u0005= 4.36 from Eq. (6.31)\n", + "#Nusselt number\n", + "Nu = 4.36;\n", + "print \"Heat transfer coefficient in W/m2K\"\n", + "#Heat transfer coefficient in W/m2K\n", + "hc = (Nu*k)/D\n", + "print int(hc)\n", + "\n", + "#The length of pipe needed for a 30\u00b0C temperature rise is obtained from a heat balance\n", + "print \"Length of pipe in m\"\n", + "#Length of pipe in m\n", + "L = ((m*c)*(Tout-Tin))/((math.pi*D)*q)\n", + "print round(L,2)\n", + "\n", + "print \"Inner surface temperature at outlet in degree C\"\n", + "#Inner surface temperature at outlet in degree C\n", + "Ts = q/hc+Tout\n", + "print round(Ts,2)\n", + "\n", + "#The friction factor is found from Eq. (6.18)\n", + "print \"Friction factor is\"\n", + "#Friction factor is\n", + "f = 64/Re\n", + "print round(f,4)\n", + "#Average velocity in m/s\n", + "U = (4*m)/(((rho*math.pi)*D)*D);\n", + "print \"The pressure drop in the pipe in N/m2\"\n", + "#The pressure drop in the pipe in N/m2\n", + "deltaP = ((((f*L)*rho)*U)*U)/(D*2)\n", + "print round(deltaP,1)\n", + "\n", + "#Efficiency\n", + "n = 0.5;\n", + "#The pumping power P is obtained from Eq. 6.19\n", + "print \"Pumping power in W is\"\n", + "#Pumping power in W\n", + "P = (m*deltaP)/(rho*n)\n", + "print round(P,6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.1 \n", + "Reynolds Number is\n", + "699\n", + "Flow is Laminar\n", + "Heat transfer coefficient in W/m2K\n", + "132\n", + "Length of pipe in m\n", + "1.33\n", + "Inner surface temperature at outlet in degree C\n", + "153.17\n", + "Friction factor is\n", + "0.0915\n", + "The pressure drop in the pipe in N/m2\n", + "3.1\n", + "Pumping power in W is\n", + "6.2e-05\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.2: Page 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.2 \"\n", + "\n", + "#Diameter in m\n", + "D = 0.01;\n", + "#Wall thickness in m\n", + "t = 0.02/100;\n", + "#Massflow rate in kg/s\n", + "m = 0.05;\n", + "#Inlet temperature in degree C\n", + "Tin = 35;\n", + "#Outlet temperature in degree C\n", + "Tout = 45.0;\n", + "#Assuming a constant tube temp. in degree C\n", + "T = 100.0;\n", + "\n", + "#From Table 16 in Appendix 2, we get the following properties for oil at\n", + "#40\u00b0C\n", + "\n", + "#Density in kg/m3\n", + "rho = 876.0;\n", + "#Specific heat in J/kgK\n", + "c = 1964.0;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.144;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.21;\n", + "#Prandtl number\n", + "Pr = 2870.0;\n", + "\n", + "#Reynolds Number is\n", + "Re = (4*m)/((math.pi*D)*mu);\n", + "\n", + "#For laminar flow and constant temperature assumption\n", + "#Nusselt number\n", + "Nu = 3.66;\n", + "#Heat transfer coefficient in W/m2K\n", + "hc = (Nu*k)/D;\n", + "#Heat transfer rate in W\n", + "q = (m*c)*(Tout-Tin);\n", + "#LMTD in degree K\n", + "LMTD = (T-Tout-(T-Tin))/math.log((T-Tout)/(T-Tin));\n", + "\n", + "print \"Length of pipe in m is\"\n", + "#Length of pipe in m\n", + "L = q/(((math.pi*D)*hc)*LMTD)\n", + "print round(L,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.2 \n", + "Length of pipe in m is\n", + "9.91\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.3: Page 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.3 \"\n", + "\n", + "#Bulk temperature in degree K\n", + "T = 293;\n", + "#Side of square duct in m\n", + "b = 0.1;\n", + "#Length of square duct in m\n", + "L = 5;\n", + "#Wall temperature in degree K\n", + "Tw = 300;\n", + "#Velocity in m/s\n", + "U = 0.03;\n", + "\n", + "#Hydraulic diameter in m\n", + "D = 4*((b*b)/(4*b));\n", + "\n", + "#Physical properties at 293 K from Table 19 in Appendix 2 are\n", + "\n", + "#Density in kg/m3\n", + "rho = 810;\n", + "#Specific heat in J/kgK\n", + "c = 2366;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.167;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.00295;\n", + "#Prandtl number\n", + "Pr = 50.8;\n", + "\n", + "#Reynolds Number is\n", + "Re = ((U*D)*rho)/mu;\n", + "\n", + "#Hence, the flow is laminar. Assuming fully developed flow, we get the\n", + "#Nusselt number for a uniform wall temperature from Table 6.1\n", + "\n", + "Nu = 2.98;\n", + "#Heat transfer coefficient in W/m2K\n", + "hc = (Nu*k)/D;\n", + "\n", + "#Similarly, from Table 6.1, the product Re*f=56.91\n", + "\n", + "print \"Friction factor is\"\n", + "#Friction factor\n", + "f = 56.91/Re\n", + "print round(f,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.3 \n", + "Friction factor is\n", + "0.0691\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.4: Page 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.4 \"\n", + "\n", + "#Temperature of device camath.sing in degree K\n", + "Ts = 353;\n", + "#Length of holes in m\n", + "L = 0.3;\n", + "#Diameter of holes in m\n", + "D = 0.00254;\n", + "#Inlet temperature in degree K\n", + "Tin = 333;\n", + "#Velocity in m/s\n", + "U = 0.2;\n", + "\n", + "#The properties of water at 333 K, from Table 13 in Appendix 2, are\n", + "\n", + "#Density in kg/m3\n", + "rho = 983;\n", + "#Specific heat in J/kgK\n", + "c = 4181;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.658;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.000472;\n", + "#Prandtl number\n", + "Pr = 3;\n", + "\n", + "#Reynolds Number is\n", + "Re = ((U*D)*rho)/mu;\n", + "\n", + "if (((Re*Pr)*D)/L)>10 :\n", + " #Eq. (6.42) can be used to evaluate the heat transfer coefficient.\n", + " #But math.since the mean bulk temperature is not known, we shall evaluate all the properties first at the inlet bulk temperature Tb1 ,\n", + " #then determine an exit bulk temperature, and then make a second iteration to obtain a more precise value.\n", + "\n", + " #At the wall temperature of 353 K\n", + " #Vismath.cosity in SI units\n", + " mus = 0.000352; \n", + " #From Eq. (6.42)\n", + " #Nusselt number\n", + " Nu = (1.86*((((Re*Pr)*D)/L)**0.33))*((mu/mus)**0.14);\n", + " #Heat transfer coefficient in W/m2K\n", + " hc = (Nu*k)/D;\n", + " #mass flow rate in kg/s\n", + " m = ((((rho*math.pi)*D)*D)*U)/4;\n", + "\n", + " #Inserting the calculated values for hc and m into Energy balance equation, along with Tb1 and Ts and\n", + " #gives Tb2=345K\n", + "\n", + " #For the second iteration, we shall evaluate all properties at the new average bulk temperature\n", + " #Bulk temp. in degree C\n", + " Tb = (345.0+Tin)/2;\n", + "\n", + " #At this temperature, we get from Table 13 in Appendix 2:\n", + " #Density in kg/m3\n", + " rho = 980.0;\n", + " #Specific heat in J/kgK\n", + " c = 4185;\n", + " #Thermal conductivity in W/mK\n", + " k = 0.662;\n", + " #Dynamic vismath.cosity in Ns/m2\n", + " mu = 0.000436;\n", + " #Prandtl number\n", + " Pr = 2.78;\n", + "\n", + " #New reynolds Number is\n", + " Re = ((U*D)*rho)/mu;\n", + "\n", + " #With this value of Re, the heat transfer coefficient can now be calculated.\n", + " #We obtain the following similarly\n", + " #Nusselt number\n", + " Nu = 5.67;\n", + " #Heat transfer coefficient in W/m2K\n", + " hc = (Nu*k)/D;\n", + " #Similarly putting this value in energy balance yields\n", + " #Bulk temperature in degree K\n", + " Tb2 = 345; \n", + "\n", + " print \"Outlet temperature in degree K\"\n", + " #Outlet temperature in degree K\n", + " print round(Tb2,2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.4 \n", + "Outlet temperature in degree K\n", + "345.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5: Page 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.5 \"\n", + "\n", + "#Velocity in ft/s\n", + "U = 10.0;\n", + "#Outer diameter in inches\n", + "D = 1.5;\n", + "#Inner diameter in inches\n", + "d = 1.0;\n", + "#Temperature of water in degree F\n", + "Tw = 180.0;\n", + "#Temperature of wall in degree F\n", + "Twall = 100.0;\n", + "\n", + "#The hydraulic diameter D for this geometry is 0.5 in.\n", + "D = 0.5;\n", + "\n", + "#Umath.sing properties given in the table provided\n", + "\n", + "#Reynolds number\n", + "Re = (((U*D)*3600)*60.8)/(12*0.75);\n", + "#Prandtl number\n", + "Pr = (1*0.75)/0.39;\n", + "#The Nusselt number according to the Dittus-Boelter correlation [Eq. (6.60)] \n", + "Nu = (0.023*(125000**0.8))*(Pr**0.3);\n", + "print 'The Nusselt number according to the Dittus-Boelter correlation comes out to be \\n',int(Nu)\n", + "\n", + "#Umath.sing the Sieder-Tate correlation [Eq. (6.61)]\n", + "#Nusselt number\n", + "Nu = 358;\n", + "print 'The Nusselt number according to the Sieder-Tate correlation comes out to be \\n',Nu\n", + "\n", + "#The Petukhov-Popov correlation [Eq. (6.63)] gives\n", + "#Friction factor\n", + "f = (1.82*log10(125000)-1.64)**(-2);\n", + "#K1 of Eq. 6.63\n", + "K1 = 1+3.4*f;\n", + "#K2 of Eq. 6.63\n", + "K2 = 11.7+1.8/(Pr**0.33);\n", + "#Nusselt number\n", + "Nu = 370;\n", + "\n", + "#The Sleicher-Rouse correlation [Eq. (6.64)] yields\n", + "#a of Eq. 6.64\n", + "a = 0.852;\n", + "#b of Eq. 6.64\n", + "b = 1/3.0+0.5/math.exp(0.6*4.64);\n", + "#Reynolds number\n", + "Re = 82237;\n", + "#Nusselt number\n", + "Nu = 5+(0.015*(Re**a))*(4.64**b);\n", + "print 'Nusselt number according to The Sleicher-Rouse correlation comes out to be \\n',int(Nu)\n", + "\n", + "print \"Assuming that the correct answer is Nu=370\"\n", + "print \"The first two correlations underpredict by about 10% and 3.5%, respectively\"\n", + "print \"while the Sleicher-Rouse method overpredicts by about 10.5%.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.5 \n", + "The Nusselt number according to the Dittus-Boelter correlation comes out to be \n", + "334\n", + "The Nusselt number according to the Sieder-Tate correlation comes out to be \n", + "358\n", + "Nusselt number according to The Sleicher-Rouse correlation comes out to be \n", + "409\n", + "Assuming that the correct answer is Nu=370\n", + "The first two correlations underpredict by about 10% and 3.5%, respectively\n", + "while the Sleicher-Rouse method overpredicts by about 10.5%.\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.6: Page 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.6 \"\n", + "\n", + "#Mass flow rate in kg/s\n", + "m = 3;\n", + "#Diameter of tube in m\n", + "D = 5/100.0;\n", + "#Temperature of fluid in degree K\n", + "Tb = 473.0;\n", + "#Temperature of wall in degree K\n", + "Ts = 503.0;\n", + "\n", + "#Density in kg/m3\n", + "rho = 7700.0;\n", + "#Specific heat in J/kgK\n", + "c = 130.0;\n", + "#Thermal conductivity in W/mK\n", + "k = 12.0;\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.00000008;\n", + "#Prandtl number\n", + "Pr = 0.011;\n", + "\n", + "#The rate of heat transfer per unit temperature rise in W is\n", + "q = (m*c)*1;\n", + "\n", + "#Reynolds Number is\n", + "Re = (D*m)/(((((rho*math.pi)*D)*D)*nu)/4);\n", + "\n", + "#The heat transfer coefficient in W/m2K is obtained from Eq. (6.67)\n", + "hc = ((k*0.625)*((Re*Pr)**0.4))/D;\n", + "\n", + "#Surface area in m2\n", + "A = q/(hc*(Ts-Tb));\n", + "\n", + "print \"Required length of tube in m is\"\n", + "#Required length of tube in m\n", + "L = A/(math.pi*D)\n", + "print round(L,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.6 \n", + "Required length of tube in m is\n", + "0.0307\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.7: Page 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.7 \"\n", + "\n", + "#Temperature of airstream in degree C\n", + "Tair = 20;\n", + "#Velocity of air in m/s\n", + "U = 1.8;\n", + "#Side of circuit in m\n", + "L = 27/1000.0;\n", + "#Spacing in the circuit in m\n", + "H = 17/1000.0;\n", + "\n", + "#At 20\u00b0C, the properties of air from Table 28, Appendix 2, are \n", + "\n", + "#Density in kg/m3\n", + "rho = 7700.0;\n", + "#Specific heat in J/kgK\n", + "c = 130.0;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.0251;\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.0000157;\n", + "#Prandtl number\n", + "Pr = 0.011;\n", + "\n", + "#Reynolds number\n", + "Re = (U*H)/nu;\n", + "\n", + "#From Fig. (6.27), we see that the second integrated circuit is in the inlet region and estimate Nu2 =\u000529.\n", + "#Nusselt number in second circuit\n", + "Nu2 = 29;\n", + "print \"Heat transfer coefficient along 2nd circuit in W/m2K\"\n", + "#Heat transfer coefficient in W/m2K\n", + "hc2 = (Nu2*k)/L\n", + "print round(hc2)\n", + "\n", + "#The sixth integrated circuit is in the developed region and from Eq. (6.79)\n", + "#Nusselt number in sixth circuit\n", + "Nu6 = 21.7;\n", + "print \"Heat transfer coefficient along 6th circuit in W/m2K\"\n", + "##Heat transfer coefficient in W/m2K\n", + "hc6 = (Nu6*k)/L\n", + "print round(hc6,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.7 \n", + "Heat transfer coefficient along 2nd circuit in W/m2K\n", + "27.0\n", + "Heat transfer coefficient along 6th circuit in W/m2K\n", + "20.2\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_7.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_7.ipynb new file mode 100755 index 00000000..ce0a476a --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_7.ipynb @@ -0,0 +1,653 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:467171181816c2659c4f87b4e2efe7cc504a8bc236d63fac8ac695852fd8fdda" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Forced Convection Over Exterior Surfaces" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.1: Page 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.1 \"\n", + "\n", + "#Diameter in m\n", + "D = 0.3;\n", + "#Cruimath.sing speed in m/s\n", + "Uinfinity = 150;\n", + "\n", + "#At an altitude of 7500 m the standard atmospheric air pressure is 38.9 kPa and the density of the air is 0.566 kg/m3 (From Table 38 in Appendix 2).\n", + "rho = 0.566;\n", + "#Dynamic vismath.cosity in kgm/s\n", + "mu = 0.0000174;\n", + "#Prandtl number\n", + "Pr = 0.72;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.024;\n", + "\n", + "#The heat transfer coefficient at the stagnation point (\u0004\u00050) is, according to Eq. (7.2)\n", + "\n", + "print \"Heat transfer coefficient at stagnation point in W/m2K\"\n", + "#Heat transfer coefficient at stagnation point in W/m2K\n", + "h = (((k*1.14)*((((rho*Uinfinity)*D)/mu)**0.5))*(Pr**0.4))/D\n", + "\n", + "print \"Distribution of the convection heat trans-fer coefficient over the forward portion of the wing\"\n", + "for o in range(0,90,15): #o is the parameter used in the loop\n", + " #convection heat trans-fer coefficients in W/m2K\n", + " ho = h*(1-(o/90.0)**3);\n", + " # L.26: No simple equivalent, so mtlb_fprintf() is called.\n", + " print \"At an angle of \",o,\" degree, heat transfer coeffcient is \",round(ho,2)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.1 \n", + "Heat transfer coefficient at stagnation point in W/m2K\n", + "Distribution of the convection heat trans-fer coefficient over the forward portion of the wing\n", + "At an angle of 0 degree, heat transfer coeffcient is 96.75\n", + "At an angle of 15 degree, heat transfer coeffcient is 96.31\n", + "At an angle of 30 degree, heat transfer coeffcient is 93.17\n", + "At an angle of 45 degree, heat transfer coeffcient is 84.66\n", + "At an angle of 60 degree, heat transfer coeffcient is 68.09\n", + "At an angle of 75 degree, heat transfer coeffcient is 40.76\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.2: Page 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.2 \"\n", + "\n", + "#Diameter of wire in m\n", + "D = 0.000025;\n", + "#Length of wire in m\n", + "L = 0.006;\n", + "#Free stream temperature of air in degeee C\n", + "T = 20;\n", + "#Wire temperature to be maintain in degree C\n", + "Tw = 230;\n", + "#Resistivity of platinum in ohm-cm\n", + "Re = 0.0000171;\n", + "\n", + "#Since the wire is very thin, conduction along it can be neglected; also, the temperature gradient in the wire at any cross section can be disregarded.\n", + "\n", + "#At freestream temperature, for air:\n", + "\n", + "#Thermal conductivity in W/mC\n", + "k = 0.0251;\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.0000157;\n", + "\n", + "#Reynolds number at velocity = 2m/s\n", + "Rey = (2*D)/nu;\n", + "if Re<40:\n", + " #Umath.sing the correlation equa-tion from Eq. (7.3) and Table 7.1\n", + " #Average convection heat transfer coefficient as a function of velocity\n", + " #is\n", + " #hc=799U**0.4 W/m2C\n", + "\n", + " #At this point, it is necessary to estimate the heat transfer coefficient for radiant heat flow.\n", + " #According to Eq. (1.21), we have approximately\n", + " #hr=sigma*epsilon*((Ts+Tinfinity)**3)/4\n", + "\n", + " #The emissivity of polished platinum from Appendix 2, Table 7 is about 0.05, so hr is about 0.05 W/m2C.\n", + "\n", + " #The rate at which heat is transferred from the wire is therefore\n", + " #0.0790U**4 W.\n", + "\n", + " #The electrical resistance of the wire in ohm is\n", + " R = ((Re*L)*4)/(((100*math.pi)*D)*D);\n", + "\n", + "\n", + "#A heat balance with the current i gives\n", + "print \"Current in ampere as a function of velocity is\"\n", + "print \"i=0.19*U**0.2\"\n", + "\n", + "# the answer is the equation hence we have to print the equation only\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.2 \n", + "Current in ampere as a function of velocity is\n", + "i=0.19*U**0.2\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.3: Page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.3 \"\n", + "\n", + "#Velocity of air in m/s\n", + "Uinfinity = 0.5;\n", + "#Length and breadth of square shaped array in m\n", + "L = 2.5;\n", + "#Surface temperature in degree C\n", + "Ts = 70.0;\n", + "#Ambient temperature in degree C\n", + "Ta = 20.0;\n", + "\n", + "#At free stream temperature of air\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.0000157;\n", + "#Density in kg/m3\n", + "rho = 1.16;\n", + "#Specific heeat in Ws/kgC\n", + "c = 1012;\n", + "#Prandtl number\n", + "Pr = 0.71;\n", + "\n", + "#Reynolds number\n", + "Re = (Uinfinity*L)/nu;\n", + "\n", + "#From equation 7.18\n", + "#The average heat transfer coefficient in W/m2C is\n", + "#Heat transfer coefficient in W/m2C \n", + "h = (((0.0033*(Pr**(-2/3.0)))*c)*rho)*Uinfinity;\n", + "print \"Heat loss from array in W is\"\n", + "#Heat loss in W \n", + "q = ((h*L)*L)*(Ts-Ta)\n", + "print round(q,2)\n", + "\n", + "# the answer is incorrect in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.3 \n", + "Heat loss from array in W is\n", + "760.56\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.4: Page 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.4 \"\n", + "\n", + "#Diameter of pipe in m\n", + "D = 7.62/100;\n", + "#Diameter and length of cylinder in m\n", + "d = 0.93/100;\n", + "l = 1.17/100;\n", + "#Initial temperature in degree C\n", + "Ti = 50.0;\n", + "#Final temperature in degree C\n", + "Tf = 350.0;\n", + "#Temperature of pipe surface in degree C\n", + "Tp = 400.0;\n", + "#Therefore film temp. at inlet in degree C\n", + "Tfi = (Ti+Tp)/2;\n", + "#Therefore film temp. at outlet in degree C\n", + "Tfo = (Tf+Tp)/2;\n", + "#Average film temp. in degree C\n", + "Tf = (Tfi+Tfo)/2;\n", + "\n", + "#At this film temperature\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.0000482;\n", + "#Thermal conductivity in W/mC\n", + "k = 0.042;\n", + "#Density in kg/m3\n", + "rho = 0.6;\n", + "#Specific heat in J/kgC\n", + "c = 1081;\n", + "#Prandtl number\n", + "Pr = 0.71;\n", + "#Flow rte of gas in kg/h is\n", + "m = 5;\n", + "\n", + "#Superficial velocity in m/h\n", + "Us = m/((((rho*math.pi)*D)*D)/4);\n", + "#Cylinder packaging volume in m3\n", + "V = (((math.pi*d)*d)*l)/4;\n", + "#Surface area in m2\n", + "A = (((2*math.pi)*d)*d)/4+(math.pi*d)*l;\n", + "#Equivalent packaging dia in meter\n", + "Dp = (6*V)/A;\n", + "\n", + "#REynolds number based on this dia\n", + "Re = ((Us*3600)*Dp)/nu;\n", + "#From eq. 7.23\n", + "print \"Heat transfer coefficient in W/m2C is\"\n", + "#Heat transfer coefficient in W/m2C\n", + "h = (14.3*k)/Dp\n", + "print round(h,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.4 \n", + "Heat transfer coefficient in W/m2C is\n", + "60.16\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.5: Page 453" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.5 \"\n", + "\n", + "#Initial temperature in degree F\n", + "Ti = 58;\n", + "#Final temperature in degree F\n", + "Tf = 86.0;\n", + "#Film temperature of air in degree F\n", + "Tair = (Ti+Tf)/2;\n", + "#Temperature of condenmath.sing steam in degree F\n", + "Tsteam = 212.0;\n", + "#Heat transfer coeffcient in Btuh/ft2F\n", + "ho = 1000.0;\n", + "#Length of tube in ft\n", + "L = 2.0;\n", + "#Diameter of tube in in\n", + "d = 0.5;\n", + "#Wall thickness in inches\n", + "t = 0.049;\n", + "#Pitch in inches\n", + "p = 3/4.0;\n", + "#Width in ft and height in inches of rectangular shell\n", + "H = 15;\n", + "W = 2;\n", + "#Mass flow rate of air in lb/h\n", + "m = 32000;\n", + "\n", + "#Appendix 2, Table 28 then gives for the properties of air at this mean\n", + "#bulk temperature\n", + "\n", + "#Density in lb/ft3\n", + "rho = 0.072;\n", + "#Thermal conductivity in Btu/h F ft\n", + "k = 0.0146;\n", + "#Dynamic vismath.cosity in lb/fth\n", + "mu = 0.0444;\n", + "#Prandtl number for air and steam\n", + "Pr = 0.71;\n", + "\n", + "#Calcaulating minimum free area in ft2\n", + "A = ((H/p)*W)*((p-d)/12.0);\n", + "#Maximum gas velocity in lb/h.ft2\n", + "Gmax = m/A;\n", + "#Hence the reynolds number is\n", + "Re = (Gmax*d)/(12*mu);\n", + "\n", + "#Assuming that more than 10 rows will be required, the heat transfer coefficient is calculated from Eq. (7.29)\n", + "\n", + "#h value in Btu/h ft2 F\n", + "h = ((((k*12)/d)*(Pr**0.36))*0.27)*(Re**0.63);\n", + "\n", + "#The resistance at the steam side per tube in h F/Btu\n", + "R1 = 12/(((ho*math.pi)*(d-2*t))*L);\n", + "\n", + "#The resistance of the pipe wall in h F/Btu\n", + "R2 = 0.049/(((60*math.pi)*L)*(d-t));\n", + "\n", + "#The resistance at the outside of the tube in h F/Btu\n", + "R3 = 1/((((h*math.pi)*d)*L)/12);\n", + "\n", + "#Total resistance in h F/Btu\n", + "R = R1+R2+R3;\n", + "\n", + "#Mean temperature difference between air and steam in degree F is\n", + "deltaT = Tsteam-Tair;\n", + "\n", + "#Specific heat of air in Btu/lb F\n", + "c = 0.241;\n", + "\n", + "#Equating the rate of heat flow from the steam to the air to the rate of enthalpy rise of the air\n", + "\n", + "#Solving for N gives\n", + "print \"Total number of transverse tubes needed are\"\n", + "#Total number of transverse tubes\n", + "N = (((m*c)*(Tf-Ti))*R)/(20*deltaT)\n", + "print \"Rounding off = 5 tubes\"\n", + "\n", + "if N<10 :\n", + " #Correction for h value, again in Btu/h ft2 F\n", + " h = 0.92*h;\n", + "\n", + "\n", + "#The pressure drop is obtained from Eq. (7.37) and Fig. 7.25.\n", + "\n", + "#Velocity in ft/s\n", + "Umax = Gmax/(3600*rho);\n", + "#Acceleration due to gravity in ft/s2\n", + "g = 32.2;\n", + "print \"Corresponding pressure drop in lb/ft2\"\n", + "#Corresponding pressure drop in lb/ft2\n", + "P = ((((6*0.75)*rho)*Umax)*Umax)/(2*g)\n", + "print round(P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.5 \n", + "Total number of transverse tubes needed are\n", + "Rounding off = 5 tubes\n", + "Corresponding pressure drop in lb/ft2\n", + "110.0\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.6: Page 456" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.6 \"\n", + "\n", + "#Temperature of methane in degree C\n", + "T = 20;\n", + "#Outer dia of tube in m\n", + "D = 4/100.0;\n", + "#Longitudinal spacing in m\n", + "SL = 6/100.0;\n", + "#Transverse spacing in m\n", + "ST = 8/100.0;\n", + "#Wall temperature in degree C\n", + "Tw = 50.0;\n", + "#Methane flow velocity in m/s\n", + "v = 10.0;\n", + "\n", + "#For methane at 20\u00b0C, Table 36, Appendix 2 gives\n", + "\n", + "#Density in kg/m3\n", + "rho = 0.668;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.0332;\n", + "#Kinematic vismath.cosity in m2/s\n", + "nu = 0.00001627;\n", + "#Prandtl number\n", + "Pr = 0.73;\n", + "\n", + "#From the geometry of the tube bundle, we see that the minimum flow\n", + "#area is between adjacent tubes in a row and that this area is half\n", + "#the frontal area of the tube bundle. Thus,\n", + "#Velocity in m/s\n", + "Umax = 2*v;\n", + "\n", + "#Reynolds number\n", + "Re = (Umax*D)/nu;\n", + "\n", + "#Since ST/SL\u0005<\u00072, we use Eq. (7.30)\n", + "\n", + "#Nusselt number\n", + "Nu = ((0.35*((ST/SL)**0.2))*(Re**0.6))*(Pr**0.36);\n", + "\n", + "#Heat transfer coefficient in W/m2K\n", + "h = (Nu*k)/D;\n", + "\n", + "#Since there are fewer than 10 rows, the correlation factor in Table 7.3 gives\n", + "print \"Heat transfer coefficient in W/m2K\"\n", + "#Heat transfer coefficient in W/m2K\n", + "h = 0.92*h\n", + "print round(h)\n", + "\n", + "#Tube-bundle pressure drop is given by Eq. (7.37). The insert in Fig. (7.26) gives the correction factor x.\n", + "\n", + "print \"Corresponding pressure drop in N/m2\"\n", + "#Corresponding pressure drop in N/m2\n", + "P = ((((5*0.25)*rho)*Umax)*Umax)/2\n", + "print round(P)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.6 \n", + "Heat transfer coefficient in W/m2K\n", + "165.0\n", + "Corresponding pressure drop in N/m2\n", + "167.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.7: Page 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.7 \"\n", + "\n", + "\n", + "#Temperature of jet in degree C\n", + "T = 20;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.597;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.000993;\n", + "#Prandtl number\n", + "Pr = 7;\n", + "#Mass flow rate in kg/s\n", + "m = 0.008;\n", + "#Diameter of jet in m\n", + "d = 6/1000.0;\n", + "#Total heat flux in W/m2\n", + "q = 70000.0;\n", + "\n", + "#Reynolds number\n", + "Re = (4*m)/((math.pi*d)*mu);\n", + "\n", + "print \"For r=3mm\"\n", + "#From Eq. (7.45)\n", + "#Heat transfer coefficient in W/m2K\n", + "h = (63*k)/d;\n", + "print \"Surface temperature at r=3mm in degree C is\"\n", + "#Surface temperature in degree C\n", + "Ts = T+q/h\n", + "print round(Ts,1)\n", + "\n", + "print \"For r=12mm\"\n", + "#From Eq. (7.48)\n", + "#Heat transfer coefficient in W/m2K\n", + "h = (35.3*k)/d;\n", + "print \"Surface temperature at r=12mm in degree C is\"\n", + "#Surface temperature in degree C\n", + "Ts = T+q/h\n", + "print round(Ts,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.7 \n", + "For r=3mm\n", + "Surface temperature at r=3mm in degree C is\n", + "31.2\n", + "For r=12mm\n", + "Surface temperature at r=12mm in degree C is\n", + "39.9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7.8: Page 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.8 \"\n", + "\n", + "#Temperature of plate in degree C\n", + "Tplate = 60;\n", + "#Temperature of jet in degree C\n", + "T = 20;\n", + "#Thermal conductivity in W/mK\n", + "k = 0.0265;\n", + "#Dynamic vismath.cosity in Ns/m2\n", + "mu = 0.00001912;\n", + "#Prandtl number\n", + "Pr = 0.71;\n", + "#Density in kg/m3\n", + "rho = 1.092;\n", + "#Mass flow rate in kg/s\n", + "m = 0.008;\n", + "#Width of jet in m\n", + "w = 3/1000.0;\n", + "#Length of jet in m\n", + "l = 20/1000.0;\n", + "#Velocity of jet in m/s\n", + "v = 10.0;\n", + "#Exit distance in m\n", + "z = 0.01;\n", + "#Width given for plate in m\n", + "L = 0.04;\n", + "#Reynolds number\n", + "Re = ((rho*v)*w)/mu;\n", + "\n", + "#From Eq. (7.68) with x\u0005= 0.02 m, z =\u00050.01 m, and w\u0005= 0.003 m\n", + "#Nusselt number\n", + "Nu = 11.2;\n", + "# ! L.33: mtlb(d) can be replaced by d() or d whether d is an M-file or not.\n", + "#Heat transfer coefficient in W/m2K\n", + "h = (Nu*k)/w;\n", + "\n", + "print \"Heat transfer rate from the plate in W is\"\n", + "#Heat transfer rate from the plate in W\n", + "q = ((h*L)*l)*(Tplate-T)\n", + "print round(q,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 7 Example # 7.8 \n", + "Heat transfer rate from the plate in W is\n", + "3.2\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_8.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_8.ipynb new file mode 100755 index 00000000..304887b5 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_8.ipynb @@ -0,0 +1,465 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e86ef96e4dcdc6d43089bd3da594607be39672ca44a913568415d68c5c742a86" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Heat Exchangers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.1: Page 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.1 \"\n", + "\n", + "#Outer dia in m\n", + "d = 0.0254;\n", + "#mass flow rate of hot fluid in kg/s\n", + "mh = 6.93;\n", + "#Specific heat of hot fluid n J/kgK\n", + "ch = 3810;\n", + "#Inlet temperature of hot fluid in degree C\n", + "Thin = 65.6;\n", + "#Outlet temperature of hot fluid in degree C\n", + "Thout = 39.4;\n", + "#mass flow rate of cold fluid in kg/s\n", + "mc = 6.3;\n", + "#Specific heat of cold fluid n J/kgK\n", + "cc = 4187;\n", + "#Inlet temperature of cold fluid in degree C\n", + "Tcin = 10;\n", + "#Overall heat transfer coefficient in W/m2K\n", + "U = 568;\n", + "\n", + "#Umath.sing energy balance, outlet temp. of cold fluid in degree C\n", + "Tcout = Tcin+((mh*ch)*(Thin-Thout))/(mc*cc);\n", + "\n", + "#The rate of heat flow in W\n", + "q = (mh*ch)*(Thin-Thout);\n", + "\n", + "print \"Parallel-flow tube and shell\"\n", + "#From Eq. (8.18) the LMTD for parallel flow\n", + "#Temperature difference at inlet in degree K\n", + "deltaTa = Thin-Tcin;\n", + "#Temperature difference at outlet in degree K\n", + "deltaTb = Thout-Tcout;\n", + "#LMTD in degree K\n", + "LMTD = (deltaTa-deltaTb)/log(deltaTa/deltaTb);\n", + "\n", + "#From Eq. (8.16) \n", + "print \"Heat transfer surface area in m2 is\"\n", + "#Heat transfer surface area in m2\n", + "A = q/(U*LMTD)\n", + "print round(A,2)\n", + "\n", + "print \"Counterflow tube and shell\"\n", + "#LMTD in degree K\n", + "LMTD = 29.4;\n", + "\n", + "print \"Heat transfer surface area in m2 is\"\n", + "#Heat transfer surface area in m2\n", + "A = q/(U*LMTD)\n", + "print round(A,2)\n", + "\n", + "A1 = A;#To be used further as a copy of this area\n", + "\n", + "print \"Counterflow exchanger with 2 shell passes and 72 tube passes\"\n", + "\n", + "#Correction factor found from Fig. 8.15 to the mean temperature for counterflow\n", + "P = (Tcout-Tcin)/(Thin-Tcin);\n", + "#Heat capacity ratio\n", + "Z = (mh*ch)/(mc*cc);\n", + "#From the chart of Fig. 8.15, F\u0003= 0.97\n", + "F = 0.97; #F-Factor\n", + "print \"Heat transfer surface area in m2 is\"\n", + "#Heat transfer surface area in m2 is\n", + "A = A1/F\n", + "print round(A,2)\n", + "\n", + "print \"Cross-flow, with one tube pass and one shell pass, shell-side fluid mixed\"\n", + "#Umath.sing same procedure, we get from charts\n", + "F = 0.88; #F-Factor\n", + "print \"Heat transfer surface area in m2 is\"\n", + "#Heat transfer surface area in m2 is\n", + "A = A1/F\n", + "print round(A,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.1 \n", + "Parallel-flow tube and shell\n", + "Heat transfer surface area in m2 is\n", + "66.51\n", + "Counterflow tube and shell\n", + "Heat transfer surface area in m2 is\n", + "41.43\n", + "Counterflow exchanger with 2 shell passes and 72 tube passes\n", + "Heat transfer surface area in m2 is\n", + "42.71\n", + "Cross-flow, with one tube pass and one shell pass, shell-side fluid mixed\n", + "Heat transfer surface area in m2 is\n", + "47.07\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.2: Page 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.2 \"\n", + "\n", + "#mass flow rate of hot fluid in kg/s\n", + "mh = 1;\n", + "#Specific heat of hot fluid n J/kgK\n", + "ch = 2100;\n", + "#Inlet temperature of hot fluid in degree C\n", + "Thin = 340;\n", + "#Outlet temperature of hot fluid in degree C\n", + "Thout = 310;\n", + "#Specific heat of cold fluid n J/kgK\n", + "cc = 4187;\n", + "#Inlet temperature of cold fluid in degree C\n", + "Tcin = 290;\n", + "#Outlet temperature of cold fluid in degree C\n", + "Tcout = 300;\n", + "\n", + "#The heat capacity rate of the water in J/kgK is, from Eq. (8.14)\n", + "cc = ch*((Thin-Thout)/(Tcout-Tcin));\n", + "\n", + "#Temperature ratio P and Z is, from Eq. (8.20)\n", + "P = (Thin-Thout)/(Thin-Tcin); # P Temperature ratio\n", + "Z = (Tcout-Tcin)/(Thin-Thout); # Z Temperature ratio\n", + "\n", + "#From Fig. 8.14, F\u00030.94 and the mean temperature difference in degree K is\n", + "#F Value\n", + "F = 0.94;\n", + "#Temperature difference at inlet in degree K\n", + "deltaTa = Thin-Tcout;\n", + "#Temperature difference at outlet in degree K\n", + "deltaTb = Thout-Tcin;\n", + "#LMTD in degree K\n", + "LMTD = (deltaTa-deltaTb)/log(deltaTa/deltaTb);\n", + "#Mean temperature difference in degree K\n", + "deltaTmean = F*LMTD;\n", + "\n", + "#From Eq. (8.17) the overall conductance in W/K is\n", + "UA = ((mh*ch)*(Thin-Thout))/deltaTmean;\n", + "\n", + "#With reference to the new conditions and Eq. 6.62\n", + "#Conductance in W/K\n", + "UA = UA*((3/4.0)**0.8);\n", + "#Number of transfer units(NTU) value\n", + "NTU = UA/(((3/4.0)*mh)*ch);\n", + "#Heat capacity ratio\n", + "K = (((3/4.0)*mh)*ch)/cc;\n", + "\n", + "#From Fig. 8.20 the effectiveness is equal to 0.61\n", + "#Effectiveness\n", + "E = 0.61;\n", + "#New inlet temperaturre of oil in degree K\n", + "Toilin = 370;\n", + "#From eq. 8.22a\n", + "print \"Outlet temperature of oil in degree K\"\n", + "#Outlet temperature of oil in degree K\n", + "Toilout = Toilin-E*(Toilin-Tcin)\n", + "print round(Toilout,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.2 \n", + "Outlet temperature of oil in degree K\n", + "321.2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.3: Page 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.3 \"\n", + "\n", + "#Airflow rate in kg/s\n", + "mair = 0.75;\n", + "#Inlet temperature of air in degree K\n", + "Tairin = 290;\n", + "#Hot gas flow rate in kg/s\n", + "mgas = 0.6;\n", + "#Inlet temperature of hot gases in degree K\n", + "Tgasin = 1150;\n", + "#wetted perimeter on air side in m\n", + "Pa = 0.703;\n", + "#wetted perimeter on gas side in m\n", + "Pg = 0.416;\n", + "#cross-sectional area of gas passage (per passage) in m2\n", + "Ag = 0.0016;\n", + "#cross-sectional area of air passage (per passage) in m2\n", + "Aa = 0.002275;\n", + "#heat transfer surface area in m2\n", + "A = 2.52;\n", + "\n", + "#Given that unit is of the cross-flow type, with both fluids unmixed.\n", + "\n", + "#length of air duct in m\n", + "La = 0.178;\n", + "#hydraulic diameter of air duct in m\n", + "Dha = (4*Aa)/Pa;\n", + "#length of gas duct in m\n", + "Lg = 0.343;\n", + "#hydraulic diameter of gas duct in m\n", + "Dhg = (4*Ag)/Pg;\n", + "\n", + "#The heat transfer coefficients can be evaluated from Eq. (6.63) for flow\n", + "#in ducts.\n", + "#Heat transfer coefficient for air in W/m2K\n", + "ha = La/Dha;\n", + "#Heat transfer coefficient for gas in W/m2K\n", + "hg = Lg/Dhg;\n", + "\n", + "#Assuming the average air-side bulk temperature to be 573 K and the average\n", + "#gas-side bulk temperature to be 973 K, the properties at those temperatures are, from Appendix 2, Table 28.\n", + "\n", + "#Specific heat of air in J/kgK\n", + "cair = 1047;\n", + "#Thermal conductivity of air in W/mK\n", + "kair = 0.0429;\n", + "#Dynamic vismath.cosity of air in Ns/m2\n", + "muair = 0.0000293;\n", + "#Prandtl number of air\n", + "Prair = 0.71;\n", + "\n", + "#Specific heat of hot gas in J/kgK\n", + "cgas = 1101;\n", + "#Thermal conductivity of hot gas in W/mK\n", + "kgas = 0.0623;\n", + "#Dynamic vismath.cosity of hot gas in Ns/m2\n", + "mugas = 0.00004085;\n", + "#Prandtl number of hot gas\n", + "Prgas = 0.73;\n", + "\n", + "#The mass flow rates per unit area in kg/m2s\n", + "#mass flow rate of air in kg/m2s\n", + "mdotair = mair/(19*Aa);\n", + "#mass flow rate of gas in kg/m2s\n", + "mdotgas = mgas/(18*Ag);\n", + "\n", + "#The Reynolds numbers are\n", + "#Reynolds number for air\n", + "Reair = (mdotair*Dha)/muair;\n", + "#Reynolds number for gas\n", + "Regas = (mdotgas*Dhg)/mugas;\n", + "\n", + "#Umath.sing Eq. (6.63), the average heat transfer coefficients in W/m2K\n", + "hair = (((0.023*kair)*(Reair**0.8))*(Prair**0.4))/Dha;\n", + "\n", + "#Since La/DHa=13.8, we must correct this heat transfer coefficient for\n", + "#entrance effects, per Eq. (6.68). The correction factor is 1.377.\n", + "#Corrected heat transfer coefficient of air in W/m2K\n", + "hair = 1.377*hair;\n", + "\n", + "#Similarly for hot gas\n", + "#Heat transfer coefficient in W/m2K\n", + "hgas = (((0.023*kgas)*(Regas**0.8))*(Prgas**0.4))/Dhg;\n", + "#Correction factor=1.27;\n", + "#Corrected heat transfer coefficient of gas in W/m2K\n", + "hgas = 1.27*hgas;\n", + "\n", + "#Overall conductance in W/K\n", + "UA = 1/(1/(hair*A)+1/(hgas*A));\n", + "\n", + "#The number of transfer units, based on the gas, which has the smaller heat capacity rate\n", + "NTU = UA/(mgas*cgas);\n", + "\n", + "#The heat capacity-rate ratio\n", + "Z = (mgas*cgas)/(mair*cair);\n", + "\n", + "#and from Fig. 8.21, the effectiveness is approximately 0.13.\n", + "#Effectiveness\n", + "E = 0.13;\n", + "\n", + "print \"Gas outlet temperature in degree K\"\n", + "#Gas outlet temperature in degree K\n", + "Tgasout = Tgasin-E*(Tgasin-Tairin)\n", + "print round(Tgasout)\n", + "\n", + "print \"Air outlet temperature in degree K\"\n", + "#Gas outlet temperature in degree K\n", + "Tairout = Tairin+(Z*E)*(Tgasin-Tairin)\n", + "print round(Tairout)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.3 \n", + "Gas outlet temperature in degree K\n", + "1038.0\n", + "Air outlet temperature in degree K\n", + "384.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.4: Page 514" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.4 \"\n", + "\n", + "#Pressure of steam in inches of Hg\n", + "P = 4;\n", + "#At this pressure, temperture of condenmath.sing steam in degree F\n", + "Thin = 125.4;\n", + "\n", + "#Flow rate of seawater in lb/s\n", + "mw = 25000.0;\n", + "#Specific heat of water in Btu/lb F\n", + "c = 0.95;\n", + "#Inlet and outlet temperature of seawater in degree F\n", + "Tcin = 60.0;\n", + "Tcout = 110.0;\n", + "#Heat transfer coefficient of steam in Btu/h ft2 F\n", + "hsteam = 600.0;\n", + "#Heat transfer coefficient of water in Btu/h ft2 F\n", + "hwater = 300.0;\n", + "#Outer diameter in inches\n", + "OD = 1.125;\n", + "#Inner diameters in inches\n", + "ID = 0.995;\n", + "\n", + "#required effectiveness of the exchanger\n", + "E = (Tcout-Tcin)/(Thin-Tcin);\n", + "\n", + "#For a condenser, Cmin/Cmax=0, and from Fig. 8.20, NTU =\u00031.4.\n", + "NTU = 1.4;\n", + "\n", + "#The fouling factors from Table 8.2 are 0.0005 h ft2\u00b0F/Btu for both sides of the tubes.\n", + "#F-Factor\n", + "F = 0.0005;\n", + "\n", + "#The overall design heat-transfer coefficient in Btu/h ft2 F per unit outside area of tube is, from Eq. (8.6)\n", + "U = 1/(1/hsteam+F+(OD/((2*12)*60))*log(OD/ID)+(F*OD)/ID+OD/(hwater*ID));\n", + "\n", + "#The total area A is 20*pi*D*L, and math.since U*A/Cmin=1.4\n", + "\n", + "print \"The length of the tube in ft is\"\n", + "#The length of the tube in ft\n", + "L = (((1.4*mw)*c)*12)/(((Tcin*math.pi)*OD)*U)\n", + "print round(L,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.4 \n", + "The length of the tube in ft is\n", + "12.4\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex8.5: Page 523" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.5 \"\n", + "\n", + "print \"There is no computations in this example.\"\n", + "print \"It is theoretical\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 8 Example # 8.5 \n", + "There is no computations in this example.\n", + "It is theoretical\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_9.ipynb b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_9.ipynb new file mode 100755 index 00000000..37770dca --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/Chapter_9.ipynb @@ -0,0 +1,1083 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7dfa4acee6b7891eb5781d524c3fac37db5d2c104afc2e1d30e10ae32b280459" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Heat Transfer by Radiation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.1: Page 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 1\"\n", + "#Temperature of the tungsten filament in Kelvin\n", + "T=1400;\n", + "\n", + "print \"a)Wavelength at which the monochromatic emissive power of the given tungsten filament is maximum in meters\"\n", + "#Wavelength in m\n", + "lamda_max=2.898e-3/T\n", + "print \"{:.2e}\".format(lamda_max)\n", + "\n", + "print \"b)Monochromatic emissive power at calculated maximum wavelength in W/m**3\"\n", + "#Emissive power in W/m3\n", + "Eb_max=12.87e-6*(T**5)\n", + "print \"{:.2e}\".format(Eb_max)\n", + "#Given wavelength in meters\n", + "lamda=5e-6;\n", + "#Product of wavelength and temperature in m-K\n", + "lamda_T=lamda*T;\n", + "\n", + "print \"c)Monochromatic emissive power at given wavelength in W/m**3\"\n", + "#Emissive power in W/m3\n", + "Eb_lamda=Eb_max*(2.898e-3/(lamda_T))**5*(((math.e**4.965)-1)/((math.e**(0.014388/lamda_T)-1)))\n", + "print \"{:.2e}\".format(Eb_lamda)\n", + "print \"Thus ,Monochromatic emissive power at 5e-6 m wavelength is 25.4% of the Monochromatic emissive power at maximum wavelength\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 1\n", + "a)Wavelength at which the monochromatic emissive power of the given tungsten filament is maximum in meters\n", + "2.07e-06\n", + "b)Monochromatic emissive power at calculated maximum wavelength in W/m**3\n", + "6.92e+10\n", + "c)Monochromatic emissive power at given wavelength in W/m**3\n", + "1.76e+10\n", + "Thus ,Monochromatic emissive power at 5e-6 m wavelength is 25.4% of the Monochromatic emissive power at maximum wavelength\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2: Page 549" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 2\"\n", + "#Temperature at which sun is radiating as a blackbody in K\n", + "T=5800;\n", + "\n", + "#Lower limit of wavelength for which glass is transparent in microns\n", + "lamda_l=0.35;\n", + "#lower limit of product of wavelength and temperature in micron-K\n", + "lamda_l_T=lamda_l*T;\n", + "#Lower limit of wavelength for which glass is transparent in microns\n", + "lamda_u=2.7;\n", + "#lower limit of product of wavelength and temperature in micron-K\n", + "lamda_u_T=lamda_u*T;\n", + "\n", + "# For lamda_T= 2030, ratio of blackbody emission between zero and lamda_l to the total emission in terms of percentage\n", + "r_l=6.7;\n", + "# For lamda_T= 15660, ratio of blackbody emission between zero and lamda_u to the total emission in terms of percentage\n", + "r_u=97;\n", + "\n", + "#Total radiant energy incident upon the glass from the sun in the wavelength range between lamda_l and lamda_u\n", + "total_rad=r_u-r_l;\n", + "print \"Percentage of solar radiation transmitted through the glass in terms of percentage\"\n", + "rad_trans=total_rad*0.92 #Since it is given that silica glass transmits 92% of the incident radiation\n", + "print round(rad_trans,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 2\n", + "Percentage of solar radiation transmitted through the glass in terms of percentage\n", + "83.1\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3: Page 552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 3\"\n", + "#Area of the flat black surface in m**2\n", + "A_1=10e-4;\n", + "#Radiation emitted by the flat black surface in W/m** sr\n", + "I_1=1000;\n", + "# Another surface having same area as A1 is placed relative to A1 such that length of radiation ray connecting dA_1 and dA_2 in meters\n", + "r=0.5;\n", + "#Area in m**2\n", + "A_2=10e-4;\n", + "# Since both areas are quite small, they can be approximated as differential surface areas and the solid angle can be calculated as\n", + "#d_omega21=dA_n2/r**2 where dA_n2 is the projection of A2 in the direction normal to the incident radiation for dA_1,thus\n", + "\n", + "#Angle between the normal n_2 ant the radiation ray connecting dA_1 and dA_2\n", + "theta_2=30;\n", + "\n", + "#Therefore solid angle in sr\n", + "d_omega21=(A_2*math.cos(theta_2*math.pi/180)/(r**2));\n", + "\n", + "print \"Irradiation of A_2 by A_1 in watt\"\n", + "#Irradiation in W\n", + "q_r12= I_1*A_1*math.cos(90*math.pi/180-theta_2*math.pi/180)*d_omega21\n", + "print round(q_r12,5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 3\n", + "Irradiation of A_2 by A_1 in watt\n", + "0.00173\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4: Page 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 4\"\n", + "#Hemispherical emissivity of an aluminum paint at wavelengths below 3 microns\n", + "epsilon_lamda_1=0.4;\n", + "#Hemispherical emissivity of an aluminum paint at longer wavelengths\n", + "epsilon_lamda_2=0.8;\n", + "#At room temperature 27 degree celcius, product of lamda and T in micron-K\n", + "lamda_T_1=3*(27+273);\n", + "#At elevated temperature 527 degree celcius, product of lamda and T in micron-K\n", + "lamda_T_2=3*(527+273);\n", + "#From Table 9.1\n", + "# For lamda_T_1, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_1=0.00016;\n", + "# For lamda_T_2, ratio of blackbody emission between zero and lamda_u to the total emission\n", + "r_2=0.14;\n", + "print \"Thus, the emissivity at 27\u00b0C\"\n", + "#Emissivity\n", + "epsilon=0.8\n", + "print epsilon\n", + "print \"emissivity at 527\u00b0C\"\n", + "#Emissivity at higher temp.\n", + "epsilon=(r_2*epsilon_lamda_1)+(epsilon_lamda_2*0.86)\n", + "print epsilon\n", + "print \"The reason for the difference in the total emissivity is that at the higher temperature,the percentage of the total emissive power in the low-emittance region of the paint is appreciable, while at the lower temperature practically all the radiation is emittedat wavelengths above 3 microns\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 4\n", + "Thus, the emissivity at 27\u00b0C\n", + "0.8\n", + "emissivity at 527\u00b0C\n", + "0.744\n", + "The reason for the difference in the total emissivity is that at the higher temperature,the percentage of the total emissive power in the low-emittance region of the paint is appreciable, while at the lower temperature practically all the radiation is emittedat wavelengths above 3 microns\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5: Page 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 5\"\n", + "#Temperature of the sun in K\n", + "T=5800;\n", + "#For the case of Solar irradiation, value of the product of lamda and T in micron-K\n", + "lamda_T_1=3*T;# value of lamda is taken from Example 9.4\n", + "#From table 9.1\n", + "# For lamda_T_1, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_1=0.98;\n", + "#This means that 98% of the solar radiation falls below 3 microns\n", + "#Hemispherical emissivity of an aluminum paint at wavelengths below 3 microns\n", + "epsilon_lamda_1=0.4;\n", + "#Hemispherical emissivity of an aluminum paint at longer wavelengths\n", + "epsilon_lamda_2=0.8;\n", + "print \"Effective absorptivity for first case\"\n", + "#Effective absorptivity\n", + "alpha_1=(r_1*epsilon_lamda_1)+(epsilon_lamda_2*0.02)\n", + "print round(alpha_1,3)\n", + "#For the case second with source at 800 K, value of the product of lamda and T in micron-K\n", + "lamda_T_2=3*800;\n", + "# For lamda_T_2, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_2=0.14;\n", + "print \"Effective absorptivity for second case\"\n", + "#Effective absorptivity\n", + "alpha_2=(r_2*epsilon_lamda_1)+(epsilon_lamda_2*0.86)\n", + "print round(alpha_2,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 5\n", + "Effective absorptivity for first case\n", + "0.408\n", + "Effective absorptivity for second case\n", + "0.744\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6: Page 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 6\"\n", + "#Stefan\u2013Boltzmann constant in W/m**2 K**4\n", + "sigma=5.67e-8;\n", + "#Temperature of the painted surface in K\n", + "T=1000;\n", + "#Temperature of the sun in K\n", + "T_s=5800;\n", + "#Given, below 2 microns the emissivity of the surface is 0.3,so\n", + "lamda_1=2; #wavelength in microns\n", + "epsilon_1=0.3; #emissivity\n", + "\n", + "#Given, between 2 and 4 microns emmisivity is 0.9,so\n", + "lamda_2=4;#wavelength in microns\n", + "epsilon_2=0.9;#emissivity\n", + "\n", + "#Given, above 4 microns emmisivity is 0.5, so\n", + "epsilon_3=0.5;#emissivity\n", + "\n", + "#value of the product of lamda_1 and T in micron-K\n", + "lamda_1_T=2e-3*T;\n", + "\n", + "#From table 9.1\n", + "# For lamda_1_T, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_1=0.0667; #1st ratio\n", + "\n", + "#value of the product of lamda_2 and T in micron-K\n", + "lamda_2_T=2e-3*T;\n", + "#From table 9.1\n", + "# For lamda_2_T, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_2=0.4809; #2nd ratio\n", + "\n", + "print \"a)Effective emissivity over the entire spectrum\"\n", + "#Effective emissivity\n", + "epsilon_bar=epsilon_1*r_1+epsilon_2*(r_2-r_1)+epsilon_3*(1-r_2)\n", + "print round(epsilon_bar,4)\n", + "\n", + "print \"b)Emissive power in W/m**2\"\n", + "#Emissive power in W/m**2\n", + "E=epsilon_bar*sigma*T**4\n", + "print \"{:.1e}\".format(E)\n", + "\n", + "#value of the product of lamda_1 and T_s in micron-K\n", + "lamda_1_T_s=2e-3*T_s;\n", + "#From table 9.1\n", + "# For lamda_1_T_s, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_1_s=0.941;\n", + "#value of the product of lamda_2 and T_s in micron-K\n", + "lamda_2_T_s=2e-3*T_s;\n", + "#From table 9.1\n", + "# For lamda_2_T_s, ratio of blackbody emission between zero and lamda_l to the total emission\n", + "r_2_s=0.99;\n", + "print \"c) Average solar absorptivity\"\n", + "#Average solar absorptivity\n", + "alpha_s=epsilon_1*r_1_s+epsilon_2*(r_2_s-r_1_s)+epsilon_3*(1-r_2_s)\n", + "print round(alpha_s,3)\n", + "\n", + "# the answer in textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 6\n", + "a)Effective emissivity over the entire spectrum\n", + "0.6523\n", + "b)Emissive power in W/m**2\n", + "3.7e+04\n", + "c) Average solar absorptivity\n", + "0.331\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7: Page 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 7\"\n", + "#Temperature of the oxidised surface in Kelvin\n", + "T=1800;\n", + "#Area of the oxidised surface in m**2\n", + "A=5e-3;\n", + "#Stefan\u2013Boltzmann constant in W/m**2 K**4\n", + "sigma=5.67e-8;\n", + "print \"a)Emissivity perpendicular to the surface\"\n", + "#Emissivity\n", + "epsilon_zero=0.70*math.cos(0)\n", + "print round(epsilon_zero,3)\n", + "print \"b)Hemispherical emissivity\"\n", + "#Hemispherical emissivity\n", + "epsilon_bar=((-1.4)/3)*((math.cos(90*math.pi/180))**3-(math.cos(0))**3)\n", + "print round(epsilon_bar,3)\n", + "print \"c)Emissive Power in Watt\"\n", + "#Emissive Power in W\n", + "E=epsilon_bar*A*sigma*T**4\n", + "print round(E,3)\n", + "\n", + "# the answer in textbook is slightly different due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 7\n", + "a)Emissivity perpendicular to the surface\n", + "0.7\n", + "b)Hemispherical emissivity\n", + "0.467\n", + "c)Emissive Power in Watt\n", + "1388.832\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.8: Page 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 8\"\n", + "\n", + "# Theoretical Proof\n", + "print \"The given example is theoretical and does not involve any numerical computation\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 8\n", + "The given example is theoretical and does not involve any numerical computation\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.9: Page 578" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 9\"\n", + "#Window arrangement consists of a long opening with dimensions\n", + "#Height in meters\n", + "h=1;\n", + "#Length in meters\n", + "l=5;\n", + "#width of table in meters\n", + "w=2;\n", + "#Assuming that window and table are sufficiently long and applying crossed string method, we get\n", + "#Distance ab in m\n", + "ab=0;\n", + "#Distance cb in m\n", + "cb=w;\n", + "#Distance ad in m\n", + "ad=h;\n", + "#Distance cd in m\n", + "cd=math.sqrt(l);\n", + "\n", + "print \"Shape factor between the window and the table\"\n", + "#Shape factor between the window and the table\n", + "F_12=0.5*(ad+cb-cd)\n", + "print round(F_12,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 9\n", + "Shape factor between the window and the table\n", + "0.382\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.10: Page 580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "print \"Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 10\"\n", + "#Window area in ft**2\n", + "A1=6*20;\n", + "#Second area in ft**2\n", + "A2=4*20;\n", + "#Assuming A5=A1+A2\n", + "#Area in ft**2\n", + "A5=A1+A2;\n", + "\n", + "#From Fig. 9.27\n", + "#Shape Factors required\n", + "F56=0.19;\n", + "F26=0.32;\n", + "F53=0.08;\n", + "F23=0.19;\n", + "\n", + "print \"Shape factor\"\n", + "#Shape factor\n", + "F14=(A5*F56-A2*F26-A5*F53+A2*F23)/A1\n", + "print round(F14,3)\n", + "\n", + "print \"Thus,only about 10% of the light pasmath.sing through the window will impinge on the floor area A4\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat transfer, Seventh Edition, Frank Kreith, Raj M Manglik and Mark S Bohn, Chapter 9, Example 10\n", + "Shape factor\n", + "0.097\n", + "Thus,only about 10% of the light pasmath.sing through the window will impinge on the floor area A4\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.11: Page 590" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.11 \"\n", + "\n", + "#Absolute boiling temperature of liquid oxygen in R\n", + "T1 = 460-297.0;\n", + "#Absolute temperature of sphere in R\n", + "T2 = 460+30;\n", + "#Diameter of inner sphere in ft\n", + "D1 = 1;\n", + "#Area of inner sphere in ft2\n", + "A1 = (math.pi*D1)*D1;\n", + "#Diameter of outer sphere in ft\n", + "D2 = 1.5;\n", + "#Area of outer sphere in ft2\n", + "A2 = (math.pi*D2)*D2;\n", + "#Stefans constant\n", + "sigma = 0.1714;\n", + "#Emissivity of Aluminium\n", + "epsilon1 = 0.03;#Sphere1\n", + "epsilon2 = 0.03;#Sphere2\n", + "\n", + "#Umath.sing Eq. 9.74\n", + "print \"Rate of heat flow by radiation to the oxygen in Btu/h is\"\n", + "#Rate of heat flow by radiation to the oxygen in Btu/h\n", + "q = ((A1*sigma)*((T1/100.0)**4-(T2/100.0)**4))/(1/epsilon1+(A1/A2)*((1-epsilon2)/epsilon2))\n", + "print round(q,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.11 \n", + "Rate of heat flow by radiation to the oxygen in Btu/h is\n", + "-6.4\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.12: Page 594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.12 \"\n", + "\n", + "\n", + "# As the example involves no calculations and the code for matlab is already given in the textbook thus following the guidelines this exapmle is to be skipped\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.12 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.13: Page 597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.13 \"\n", + "\n", + "\n", + "# As the example involves no calculations and the code for matlab is already given in the textbook thus following the guidelines this exapmle is to be skipped\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.13 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.14: Page 598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.14 \"\n", + "\n", + "#Absolute temperature of first plate in degree R\n", + "Ta = 2040+460.0;\n", + "#Absolute temperature of second plate in degree R\n", + "Tb = 540+460.0;\n", + "#Stefans constant\n", + "sigma = 0.1718;\n", + "\n", + "#For first radiation band, heat transfer is calculated\n", + "#Emissivity of A\n", + "epsilonA = 0.1;\n", + "#Emissivity of B\n", + "epsilonB = 0.9;\n", + "#Shape factor\n", + "Fab = 1/(1/epsilonA+1/epsilonB-1);\n", + "#The percentage of the total radiation within a given band is obtained from Table 9.1.\n", + "#Coefficients of T**4\n", + "A = 0.375;\n", + "#Coefficients of T**4\n", + "B = 0.004;\n", + "\n", + "#Rate of heat transfer in first band in Btu/h ft2\n", + "q1 = (Fab*sigma)*(A*((Ta/100.0)**4)-B*((Tb/100.0)**4));\n", + "\n", + "#Similarly for other two bands, heat transfer in Btu/h ft2\n", + "q2 = 23000;\n", + "#heat transfer in Btu/h ft2\n", + "q3 = 1240;\n", + "\n", + "print \"Total rate of radiation heat transfer in Btu/h ft2\"\n", + "#heat transfer in Btu/h ft2\n", + "q = q1+q2+q3\n", + "print round(q)\n", + " # The answer is slightly different in textbook due to approximation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.14 \n", + "Total rate of radiation heat transfer in Btu/h ft2\n", + "26728.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.15: Page 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.15 \"\n", + "\n", + "#Temperature in degree K\n", + "T = 800;\n", + "#Diameter of sphere in m\n", + "D = 0.4;\n", + "#Partial pressure of nitrogen in atm\n", + "PN2 = 1;\n", + "#Partial pressure of H2O in atm\n", + "PH2O = 0.4;\n", + "#Partial pressure of CO2 in atm\n", + "PCO2 = 0.6;\n", + "\n", + "#The mean beam length for a spherical mass of gas is obtained from Table 9.7\n", + "#Beam length in m\n", + "L = (2/3)*D;\n", + "\n", + "#The emissivities are given in Figs. 9.46 and 9.47\n", + "#Emissivity of H2O\n", + "epsilonH2O = 0.15;\n", + "#Emissivity of CO2\n", + "epsilonCO2 = 0.125;\n", + "\n", + "#N2 does not radiate appreciably at 800 K, but math.since the total gas pressure\n", + "#is 2 atm, we must correct the 1-atm values for epsilon.\n", + "#From Figs. 9.48 and 9.49 the pressure correction factors are\n", + "#Pressure correction factor for H2O\n", + "CH2O = 1.62;\n", + "#Pressure correction factor for CO2\n", + "CCO2 = 1.12;\n", + "\n", + "#From fig. 9.50\n", + "#Chnage in emissivity\n", + "deltaEpsilon = 0.014;\n", + "\n", + "#Finally, the emissivity of the mixture can be obtained from Eq. (9.114):\n", + "print \"Emissivity of the mixture is\"\n", + "#Emissivity of the mixture\n", + "epsilonMix = CH2O*epsilonH2O+CCO2*epsilonCO2-deltaEpsilon\n", + "print round(epsilonMix,3)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.15 \n", + "Emissivity of the mixture is\n", + "0.369\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.16: Page 609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.16 \"\n", + "\n", + "#Total pressure in atm\n", + "Pt = 2;\n", + "#Temperature in degree K\n", + "TH2O = 500.0;\n", + "#Mean beam length in m\n", + "L = 0.75;\n", + "#Partial pressure of water vapor in atm\n", + "PH2O = 0.4;\n", + "#Source temperature in degree K\n", + "Ts = 1000.0;\n", + "\n", + "#Since nitrogen is transparent, the absorption in the mixture is due to the water vapor alone.\n", + "\n", + "#Parameters required\n", + "#A Parameter in atm-m\n", + "A = PH2O*L;\n", + "#B Parameter in atm\n", + "B = (Pt+PH2O)/2.0;\n", + "\n", + "#From Figs. 9.46 and 9.48 we find\n", + "#For water, C factor in SI units\n", + "CH2O = 1.4;\n", + "#Emissivity of water\n", + "epsilonH2O = 0.29;\n", + "\n", + "\n", + "#From Eq. (9.115) the absorptivity of H2O is\n", + "print \"Absorptivity of H2O is\"\n", + "alphaH2O = (CH2O*epsilonH2O)*((TH2O/Ts)**0.45)\n", + "print round(alphaH2O,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.16 \n", + "Absorptivity of H2O is\n", + "0.3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.17: Page 609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.17 \"\n", + "\n", + "#Temperature of flue gas in degree F\n", + "Tgas = 2000.0;\n", + "#Inner-wall surface temperature in degree F\n", + "Tsurface = 1850.0;\n", + "#Partial pressure of water in atm\n", + "p = 0.05;\n", + "#Convection heat transfer coefficient in Btu/h ft2 F\n", + "h = 1.0;\n", + "#Length of square duct in ft\n", + "L = 2.0;\n", + "#Volume in ft3\n", + "V = L*L;\n", + "#Surface area in ft2\n", + "A = 4*L;\n", + "\n", + "#The rate of heat flow from the gas to the wall by convection per unit\n", + "#length in Btu/h ft is\n", + "qc = (h*A)*(Tgas-Tsurface);\n", + "\n", + "#Effective beam length in m\n", + "L = ((0.3058*3.4)*V)/A;\n", + "\n", + "#Product of partial pressure and L\n", + "k = p*L;\n", + "\n", + "#From Fig. 9.46, for pL=0.026 and T=2000F, we find\n", + "\n", + "#Emissivity\n", + "epsilon = 0.035;\n", + "#Absorptivity\n", + "alpha = 0.039;\n", + "#stefans constant\n", + "sigma = 0.171;\n", + "\n", + "#Assuming that the brick surface is black, the net rate of heat flow from the gas to the wall by radiation is, according to Eq. (9.117)\n", + "qr = (sigma*A)*(epsilon*(((Tgas+460)/100.0)**4)-alpha*(((Tsurface+460.0)/100)**4));#Btu/h\n", + "\n", + "print \"Total heat flow from the gas to the duct in Btu/h\"\n", + "#Total heat flow from the gas to the duct in Btu/h\n", + "q = qc+qr\n", + "print round(q,2)\n", + " # The answer is slightly different in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.17 \n", + "Total heat flow from the gas to the duct in Btu/h\n", + "3543.12\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.18: Page 611" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.18 \"\n", + "\n", + "#Emissivity\n", + "epsilon = 0.8;\n", + "#Stefan's constant\n", + "sigma = 0.1714;\n", + "#Temperature of walls in degree F\n", + "Twall = 440;\n", + "#Temperature indicated ny thermocouple in degree F\n", + "Tt = 940;\n", + "#Heat transfer coefficient in Btu/h ft2 F\n", + "h = 25;\n", + "\n", + "#The temperature of the thermocouple is below the gas temperature because the couple loses heat by radiation to the wall.\n", + "\n", + "#Under steady-state conditions the rate of heat flow by radiation from the thermocouple junction to the wall equals the rate of heat flow by convection from the gas to the couple.\n", + "\n", + "#Umath.sing this heat balance, q/A in Btu/h ft2\n", + "q = (epsilon*sigma)*(((Tt+460)/100)**4-((Twall+460)/100)**4);\n", + "\n", + "print \"True gas temperature in degree F\"\n", + "#True gas temperature in degree F\n", + "Tg = Tt+q/h\n", + "\n", + "print round(Tg)\n", + " # The answer is slightly different in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.18 \n", + "True gas temperature in degree F\n", + "1115.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.19: Page 612" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.19 \"\n", + "\n", + "#Emissivity of thermocouple\n", + "epsilonT = 0.8;\n", + "#Emissivity of shield\n", + "epsilonS = 0.3;\n", + "#Stefan''s constant\n", + "sigma = 0.1714;\n", + "#Temperature of walls in degree F\n", + "Tw = 440;\n", + "#Temperature indicated ny thermocouple in degree F\n", + "Tt = 940.0;\n", + "#Heat transfer coefficient of thermocouple in Btu/h ft2 F\n", + "hrt = 25.0;\n", + "#Heat transfer coefficient of shield in Btu/h ft2 F\n", + "hrs = 20.0;\n", + "\n", + "#Area for thermocouple be unity ft2\n", + "At = 1.0;\n", + "#Corresponding area of shield in ft2\n", + "As = 4.0;#Inside dia=4*dia of thermocouple\n", + "\n", + "#From Eq. (9.76)\n", + "#View factors Fts and Fsw\n", + "Fts = 1/((1-epsilonT)/(At*epsilonT)+1/At+(1-epsilonS)/(As*epsilonS));\n", + "Fsw = As*epsilonS;\n", + "\n", + "#Assuming a shield temperature of 900\u00b0F, we have, according to Eq. (9.118)\n", + "#Temperature in degree F\n", + "Ts = 923;\n", + "\n", + "#Coeffcients for heat balance are as following\n", + "#A parameter Btu/h-F\n", + "A = 9.85;#A=hrt*At\n", + "#B parameter Btu/h-F\n", + "B = 13.7;#B=hrs*As\n", + "\n", + "#Umath.sing heat balance\n", + "print \"Correct temperature of gas in degree F\"\n", + "#Correct temperature of gas in degree F\n", + "Tg = Ts+(B*(Ts-Tw)-A*(Tt-Ts))/((hrs*2)*As)\n", + "print round(Tg,2)\n", + " # The answer is slightly different in textbook due to approximation" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 9 Example # 9.19 \n", + "Correct temperature of gas in degree F\n", + "963.31\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..25973247 --- /dev/null +++ b/Principles_Of_Heat_Transfer_by_F._Kreith,_R._M._Manglik_And_M._S._Bohn/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ishita Tewari +Course: btech +College/Institute/Organization: Gautam Buddha University, Greater Noida +Department/Designation: School of Biotechnology +Book Title: Principles Of Heat Transfer +Author: F. Kreith, R. M. Manglik And M. S. Bohn +Publisher: Cengage Learning +Year of publication: 2011 +Isbn: 978-0-495-66770-4 +Edition: 7 \ No newline at end of file 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 new file mode 100644 index 00000000..89bbab6f --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch1.ipynb @@ -0,0 +1,430 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:86927109d08004c9d99b80e15b131e3b4b15f3a3105e770790c254bc20c0c553" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Introduction of Signals and Spectra" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "#page 12\n", + "#problem 1.1\n", + "\n", + "#Given signal u = 2*math.exp(-3*t) \n", + "\n", + "#Since the function integral does not accept %inf as limit we need to use approximation by changing variables.\n", + "\n", + "#First the signal is to be expressed in terms of 'x'.\n", + "\n", + "def Signal(x):\n", + " return 2*math.exp(-3*x); \n", + "\n", + "#We then substitute x = math.tan(z), and then express the given signal wrt 'z' and not 'x'.\n", + "\n", + "def Gmodified(z):\n", + " x = math.tan(z); \n", + " return (Signal(x))**2/(math.cos(z))**2; \n", + "\n", + "E = quad(Gmodified,0,math.atan(10))[0]\n", + "\n", + "# Results\n", + "print 'The energy of this signal is %.3f'%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of this signal is 0.667\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "\n", + "#Given signal u = 2*math.sin(0.5*math.pi*t) \n", + "\n", + "#Since u is periodic, averaging over -infinity to + infinity will give the same result as averaging over -2 to 2, where 4 is the time period.\n", + "t0 = -2;\n", + "t1 = 2;\n", + "\n", + "# Calculations\n", + "def f1(t): \n", + "\t return (2*math.sin(0.5*math.pi*t))**2\n", + "\n", + "E = quad(f1,t0,t1)[0]\n", + "\n", + "\n", + "# Results\n", + "print 'The power of the signal is ',E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power of the signal is 8.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "from matplotlib.pyplot import plot,subplot,xlabel,ylabel\n", + "import math \n", + "from numpy import arange,zeros\n", + "#page 18\n", + "#problem 1.3\n", + "\n", + "#u1(T) vs T\n", + "T = arange(-5,5+0.0082,0.0082)\n", + "u1 = zeros(len(T))\n", + "u1[T <= 0] = 0;\n", + "u1[T>0] = 1;\n", + "xlabel('T');\n", + "ylabel('u(T)')\n", + "\n", + "subplot(131);\n", + "plot(T,u1);\n", + "\n", + "#u2(T-t) vs T\n", + "#Shifting the given signal by t units to the right, we get\n", + "#Let us assume the amount of time to be shited is 3 units \n", + "t = 3;\n", + "\n", + "T = arange(-5,5+0.0082,0.0082)\n", + "u2 = zeros(len(T))\n", + "u2[T<= t] = 0;\n", + "u2[T>t] = 1;\n", + "xlabel('T');\n", + "ylabel('u(T - t)')\n", + "\n", + "subplot(132);\n", + "plot(T,u2);\n", + "\n", + "#u(t - T) = u(-(T - t))\n", + "\n", + "T = arange(-5,5+0.0082,0.0082)\n", + "u3 = zeros(len(T))\n", + "u3[T>= t] = 0;\n", + "u3[T" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from matplotlib.pyplot import plot,subplot,xlabel,ylabel\n", + "import math \n", + "from numpy import arange,zeros\n", + "\n", + "#u1(t)\n", + "t = arange(-5,5+0.0082,0.0082)\n", + "u1 = zeros(len(t))\n", + "u1[t<= 0] = 0;\n", + "u1[t>0] = 1;\n", + "\n", + "xlabel('t');\n", + "ylabel('u(t)')\n", + "\n", + "subplot(131);\n", + "plot(t,u1);\n", + "\n", + "#u2(t-T)\n", + "#Shifting the given signal by t units to the right, we get\n", + "#Let us assume the amount of time to be shited is 3 units \n", + "T = 3;\n", + "\n", + "t = arange(-5,5+0.0082,0.0082)\n", + "u2 = zeros(len(t))\n", + "u2[t<= T] = 0;\n", + "u2[t>T] = 1;\n", + "\n", + "xlabel('t');\n", + "ylabel('u(t-T)')\n", + "\n", + "subplot(132);\n", + "plot(t,u2);\n", + "\n", + "\n", + "#u(t) - u(t - T)\n", + "\n", + "t = arange(-5,5+0.0082,0.0082)\n", + "u3 = u1 - u2;\n", + "\n", + "xlabel('t');\n", + "ylabel('u(t) - u(t-T)')\n", + "\n", + "subplot(133);\n", + "plot(t,u3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGIBJREFUeJzt3X2wXHV9x/H3hRunjVzASkkopIkktIWpiDFF2lJYHorE\nEUI7Iw+Kjkh5qBOBEVKeHAidKbVDik+pmiI+Veq1WlsvilBArqjjAyFCQgGHhATDQ4LIWGNMp8Rs\n/zibsLnZu3cfzu+c357f+zWzs0/nnPu7+/nd/e75nd+eC5IkSZIkSZIkSZIkSZIkSVJXPgVsBta0\nWeYjwBPAw8Dri2iU+mau1WSuyt2fkXWUyTrVm4E7GrffCHy/iEapb+ZaTeaqIOYweaf6BHBW0/3H\ngRmhG6RczMFcq2gO5pqUvUr++QcDG5vuPw0cUlJblB9zrSZzraCyiwDA0IT79VJaobyZazWZa8WU\nXQSeAWY13T+k8dhu5s6dWyfrbF7KvaydmM0kzHXwLp1ka66Dd5ky17KLwBjwzsbtY4Cfk81O2M26\ndeuo1+s9X66//vq+1u93G9/+dp1Zs8ptQx7rA3NjyjWG1yR037r55jqXXRa+DR1mm0yuM2bUufzy\ncG342MfqXHxxHLkOdxB8P74AHA8cQDaWeD0wrfHcCrKZBm8mq1ZbgfMCt0f5MNdqMtcEhS4C53Sw\nzOLAbVD+zLWazDVBZQ8HFaJWq5W+jf32K78NebwOsSn7NYmhb5lr/usD/MmflNuGonKdeKQ/VvXG\n+NZA+s534KqrsutBNjQ0BPn2mYHOtQgf/CD85CfZdUg5Zzvwuc6cCQ89lF2H8PG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mSLbTp7Z9pIr9J5tLLlC79ma6576yRXi+JsNlaskSZIk\nSZIkSZIkSZIkSZKkbH7uX5fdCAVhtpKmNIfsCzOqnjmYraQpjAK/IvvW4MB/dVu7MVtJU5qNnxar\nymw18Abl/wkMsslOgavBZ7YaeBYBSUqYRSC8LcBI2Y1QEGargWcRCO9nZP/UYg0ePKwas5UkSZIk\nSZIkSZIkSZIkSZIkSZIkSeX7f9lAF5jJHqdWAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from scipy.integrate import quad \n", + "from numpy import arange,zeros\n", + "from matplotlib.pyplot import subplot,xlabel,ylabel,plot\n", + "#page 18\n", + "#problem 1.5\n", + "\n", + "#V1(t) = u(t) - u(t - 5)\n", + "t = arange(-5,5+0.1,0.1)\n", + "V1 = zeros(len(t))\n", + "V1[t<= 0] = 0;\n", + "V1[t>0] = 1;\n", + "\n", + "xlabel('t');\n", + "ylabel('V1(t)')\n", + "subplot(121);\n", + "plot(t,V1);\n", + "\n", + "\n", + "#V2(t) = 2*t*(u(t) - u(t - 3))\n", + "t = arange(0,3+0.1,3);\n", + "V2 = 2*t;\n", + "\n", + "xlabel('t');\n", + "ylabel('V2(t)')\n", + "subplot(122);\n", + "plot(t,V2);\n", + "\n", + "#Autocorrelation R12(0) = R\n", + "\n", + "\n", + "def f2(t): \n", + "\t return 2*t\n", + "\n", + "R = quad(f2,0,3)[0]\n", + "\n", + "def f3(t): \n", + "\t return 1\n", + "\n", + "E1 = quad(f3,0,5)[0]\n", + "\n", + "#In the textbook, E2 has been computed as 18 instead of 36\n", + "\n", + "def f4(t): \n", + "\t return 4*t**2\n", + "\n", + "E2 = quad(f4,0,3)[0]\n", + "\n", + "c = R/(E1*E2)**0.5;\n", + "\n", + "print 'The correlation term R12(0) is ',R\n", + "print 'The autocorrelation term R1(0) is ',E1;\n", + "print 'The autocorrelation term R2(0) is ',E2;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The correlation term R12(0) is 9.0\n", + "The autocorrelation term R1(0) is 5.0\n", + "The autocorrelation term R2(0) is 36.0\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEPCAYAAABGP2P1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X90XOV95/G3kdFGIAeqpQelYNkNVbplKxJQUDj5UQ8N\ndom2DT17alF2W+ywRJxKRAn+UYHYLaNzUtJErMOpESki8iwkNmiPlDaoIqGspGmT4CigYPEbYSha\nBAJSsY1CZVeomv3jGWNZyKPRzH3mufeZz+ucOTMjXc/9XuvO/d7v89znuSAiIiIiIiIiIiIiIiIi\nIiIiIiIiIhJZ+4A3gCczLPOXwAvAGHBhIYISKaAzgV7gWeAZ4BK34Yi49ynMwf5kiaEeeDD9+mPA\njwsRlEgB3QNck369FjjDYSwiobGRkyeGvwKuXPT+OeBs2wGJFMgZwEuugxBZrVMcr/8c4JVF7yeB\ncx3FIhK0XwV+BiSAnwJ3A6c5jUgkC64TA8CaJe9TTqIQCd5a4CLgzvTzvwA3Oo1IJAuuE8OrwPpF\n789N/+wE5513XgqTMPTQw8bjMHZMph+Ppt/3YhLEu7Rv62H5kdO+7ToxPABcnX59CfDPmKuYTvDi\niy+SSqWsPm655Rbr6yjUej7/+VuorY3+dhRqPcB5lvbv1zFNpR9Kv78MeNrHfdun/SHq6zh0KMVZ\nZ6WYmMh9316bz16fhfuATcBZmC/ILcCp6d/dhbkiqR6T1f4F+JzleIpCKgWnuE75cswXgP1AKfAi\n2sfFork5uPpq+NrXoKoq98+xnRiuymKZ6y3HUHRSKViztOdGXBkDLnYdhBSH9nbYsAG2b8/vc2w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Pn9OMjtOdk6gtiWUzAJ6A1M09UzS36/6u0I0/0YHsaUXkvdjInzlzDtvxcD/xv4oIX1\n3ARsWfSzXDP5ydbRxvH28puBOeBAjutYTirAz1pJOaZt/ouYs6Eg/S7wJqbNNRbwZy+2FnMl3PXA\no8DtwI3AnwW4jmz/JvkO9Mxm+Z9imkpnMVdL/Q3woVWuZyWBD1hdRpDbsdJ+HMT2ZFpHENuygGmy\nOgN4CPOdSS5ZZlXbEabEsDnD7/4E01EL5gu8APx7YDrA9fwm5gxyLP3+XGAUU6K/GdA6jtmOaSb5\n9Co/dyWvYnayY9Zjzg6CdirQB3wbsyMH7eOY8rce07n2fuBe4OqA1zOZfjyaft+LSQxByuZvsnSZ\nc9M/C3o9v1j0+nvAnZh+tKVND7kKYjuyEdR2rLQfB7E9K60jyL/Jz4EBTItKctHPC/V3KbjrgPb0\n6w8B/7cA67TV+Xw55iqFsyx8diEGVK3BHKS/HvDnnswm7F6V9A8cP0OLE/wVb4Ua6JnNes7m+Jlj\nHaY/YrU2kl3nc74DVjOtJ4jtyGY/znd7sllHvttyFqbPAKAMsz8vPeH0diDxqcC3MDvKKHabF455\nCTuJ4QVgguOXp90Z8OfbHlD1SUzFdojj23C5hfUcswm7VyV9GFMx2Lp8GAo30HOl9TRjLps8BDzC\n6i/NvQ94DdME+gqmj8zGdqy0nny3A5bfjz9DsNuTzTry3ZYaTHPUIUzf6O70zzWQWERERERERERE\nREREREQSV1FXAAAAe0lEQVRERERERERERArhDMwocRERESDzaFERESlC92Mm43oc+zczEhGRCNiA\nKgYRyVNU7scg2bF1QxsRKSJKDCIicgIlBr/8AljnOggRiTYlBr9MAz/C9DOo81lERERERERERERE\nREREREREREREREREREREREREouP/Ax5T6+pYWhAdAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from scipy.integrate import quad \n", + "from numpy import arange,zeros\n", + "from matplotlib.pyplot import subplot,xlabel,ylabel,plot\n", + "\n", + "#V1(t) = u(t) - u(t - 5)\n", + "t = arange(-5,5+0.1,.1)\n", + "V1 = zeros(len(t))\n", + "V1[t<= 0] = 0;\n", + "V1[t>0] = 1;\n", + "\n", + "xlabel('t');\n", + "ylabel('V1(t)')\n", + "subplot(121);\n", + "plot(t,V1);\n", + "\n", + "\n", + "#V2(t) = 2*t*(u(t) - u(t - 3))\n", + "t = arange(0,3+0.1,.1)\n", + "V2 = 2*t;\n", + "\n", + "xlabel('t');\n", + "ylabel('V2(t)')\n", + "subplot(122);\n", + "plot(t,V2);\n", + "\n", + "#Autocorrelation R12(1) = Ra\n", + "#The range is t = 0 to 2, as signal V2(t) has been shifted left by one unit, V2(t-1)\n", + "\n", + "def f5(t): \n", + "\t return 2*(t+1)\n", + "\n", + "Ra = quad(f5,0,2)[0]\n", + "\n", + "print 'The correlation term R12(1) is ',Ra\n", + "\n", + "#Autocorrelation R12(-1) = Rb\n", + "#The range is t = 1 to 4, as signal V2(t) has been shifted right by one unit, V2(t+1)\n", + "\n", + "def f6(t): \n", + "\t return 2*(t-1)\n", + "\n", + "Rb = quad(f6,1,4)[0]\n", + "\n", + "print 'The correlation term R12(-1) is ',Rb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The correlation term R12(1) is 8.0\n", + "The correlation term R12(-1) is 9.0\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEPCAYAAABGP2P1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X90XOV95/G3kdFGNgpUSw9KAeGGit2ytRNQIjj5UYbF\npETblt09x6LsNv612JwaibAWxiB2a9knJcXyOrRGpAiDCIkNuFLaWBUJBaNpk9g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tUczEH6WwG/76lcgd2zkv6eEy20BoI/4y1fEz2z2c45nGg5VmLGI2ZqAdkNPuc6\nYTXTdoL4HNnsx7l+nmy2ketnORszZgBQhNmfJzc4vZ1IfDrwXcyO0o3d7oXj3sBOYngNGODE6Wn3\nBfz+tidUfQlTsfVy4jNcY2E7x12B3bOSPoOpGGydPgz5m+g53XZuwpw22QvsZean5j4KvIXpAj2E\nGSOz8Tmm206unwOm3o+/SrCfJ5tt5PpZFmK6o3oxY6PHb/WkicQiIiIiIiIiIiIiIiIiIiIiIiIi\nIiKSD2feayApAAAAcElEQVRiZomLiIgAmWeLiohIDD2GuRhXD/ZvZiQiIhFwAaoYRCRHUbkfg2TH\n1g1tRCRGlBhEROQkSgx+eQ8odh2EiESbEoNfhoCfYsYZNPgsIiIiIiIiIiIiIiIiIiIiIiIiIiIi\nIiIiIiIiItHx/wFe0+oOeoRsSAAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..fc9cdc80 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch10.ipynb @@ -0,0 +1,179 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:27698e05ca0687e49152de2be00b6487a679eb1619075fb3f36b6fb9f0cc56a0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Phase Locked Loops" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#page 520\n", + "#problem 10.3\n", + "\n", + "# Part (a)\n", + "\n", + "#Input SNR SNR_ip\n", + "SNR_ip = 1000.;\n", + "\n", + "#Beta B\n", + "B = 10.;\n", + "\n", + "#Output SNR SNR_op\n", + "SNR_op = (1.5*(B**2)*SNR_ip)/(1 + (12*B/math.pi)*(SNR_ip)*math.exp(-0.5*(1/(B+1))*(SNR_ip)));\n", + "\n", + "print 'Output SNR is ',10*math.log10(SNR_op),' dB'\n", + "\n", + "# Part (b)\n", + "\n", + "#Input SNR SNR_ip\n", + "SNR_ip = 10;\n", + "\n", + "#Output SNR SNR_op\n", + "SNR_op = (1.5*(B**2)*SNR_ip)/(1 + (12*B/math.pi)*(SNR_ip)*math.exp(-0.5*(1/(B+1))*(SNR_ip)));\n", + "\n", + "print 'Output SNR is ',10*math.log10(SNR_op),' dB',\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output SNR is 51.7609125906 dB\n", + "Output SNR is 7.89678888644 dB\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given reference frequency is fref = 10 MHz\n", + "fref = 10. * 10**6;\n", + "\n", + "#Given step frequency is fstep = 100 KHz\n", + "fstep = 100. * 10**3;\n", + "\n", + "#Division ratio M\n", + "M = fref/fstep;\n", + "\n", + "#Required output frequency F = 100.6 MHz\n", + "F = 100.6 * 10**6;\n", + "\n", + "N = F/fstep;\n", + "\n", + "#Given P = 64\n", + "P = 64;\n", + "\n", + "#Truncating value B = 15\n", + "B = 15;\n", + "\n", + "A = N - P*B;\n", + "\n", + "print 'The value of A is ',A\n", + "print 'The value of B is ',B\n", + "print 'The value of M is ',M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of A is 46.0\n", + "The value of B is 15\n", + "The value of M is 100.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 534" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given reference frequency for PLL is fref = 0.48 MHz\n", + "fref = 0.48 * 10**6;\n", + "\n", + "#Frequency divider N = 2000\n", + "N = 2000;\n", + "\n", + "#Output Frequency fout\n", + "fout = fref*N;\n", + "\n", + "#Output Frequency favg\n", + "favg = (2000*15 + 2001*1)*(0.48/16) * 10**6;\n", + "\n", + "print 'Output frequency is ',fout,' Hz'\n", + "\n", + "#Reference frequency is not subdivided before going to comparator and it is an integer divider in the feedback path the frequency resolution fres = 0.48 * 10**6;\n", + "fres = 0.48 * 10**6;\n", + "\n", + "print 'Frequency resolution is ',fres,' Hz'\n", + "print 'Output frequency resolution is ',favg - fout,' Hz'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output frequency is 960000000.0 Hz\n", + "Frequency resolution is 480000.0 Hz\n", + "Output frequency resolution is 30000.0 Hz\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..3af85274 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch11.ipynb @@ -0,0 +1,435 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f269742eac528dcb1a01d16b7f07b52d89bab98c12b85f12506285fd87926232" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Optimal Reception of Digital Signal" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Prior probability of s1 P_s1 = 0.4\n", + "P_s1 = 0.4;\n", + "\n", + "#Prior probability of s2 P_s2 = 1 - P_s1\n", + "P_s2 = 1 - P_s1;\n", + "\n", + "#Voltage level V1 = 1\n", + "V1 = 1;\n", + "\n", + "#Voltage level V2 = -1\n", + "V2 = -1;\n", + "\n", + "#Part a\n", + "\n", + "#Noise Variance sigma1 = 10**-3\n", + "sigma1 = 10**-3;\n", + "\n", + "#Descision Threshold lambda1 \n", + "lambda1 = (V1+V2)/2 + (sigma1)*math.log(P_s2/P_s1)/(V1-V2);\n", + "\n", + "#Probability of error Pe\n", + "Pe = 0.5*(2*P_s1 - P_s1*math.erfc(((V2-V1)/(2*sigma1*2**0.5)) + (sigma1)*math.log(P_s2/P_s1)/((V1-V2)*2**0.5)));\n", + "\n", + "print 'The decision threshold is ',lambda1,' V'\n", + "print 'The probability of error is approximately ',Pe#Part b\n", + "\n", + "#Noise Variance sigma2 = 10**-1\n", + "sigma2 = 10**-1;\n", + "\n", + "#Descision Threshold lambda2\n", + "lambda2 = (V1+V2)/2 + (sigma2)*math.log(P_s2/P_s1)/(V1-V2);\n", + "\n", + "#Probability of error Pe\n", + "Pe1 = 0.5*(2*P_s1 - P_s1*math.erfc(((V2-V1)/(2*sigma2*2**0.5)) + (sigma2)*math.log(P_s2/P_s1)/((V1-V2)*2**0.5)));\n", + "\n", + "#In the textbook Pe has been calulated to be 0.0021 because of the use of a very high precision calculator, unfortunately in scilab the function erfc approximates the output value to a larger extent due to which an exact value cannot be obtained.\n", + "\n", + "print 'The decision threshold is ',lambda2,' V'\n", + "print 'The probability of error is approximately ',Pe1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decision threshold is 0.000202732554054 V\n", + "The probability of error is approximately 0.0\n", + "The decision threshold is 0.0202732554054 V\n", + "The probability of error is approximately 0.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Part b\n", + "\n", + "#Voltage level V1 = 1\n", + "V1 = 1;\n", + "\n", + "#Voltage level V2 = -1\n", + "V2 = -1;\n", + "\n", + "#Prior probability of s1 P_s1 = 0.4\n", + "P_s1 = 0.4;\n", + "\n", + "#Prior probability of s2 P_s2 = 1 - P_s1\n", + "P_s2 = 1 - P_s1;\n", + "\n", + "#Cost of selecting s1 when s2 is transmitted C12 = 0.7\n", + "C12 = 0.7;\n", + "\n", + "#Cost of selecting s2 when s1 is transmitted C21 = 1 - C12\n", + "C21 = 1 - C12;\n", + "\n", + "#Noise Variance sigma = 10**-3\n", + "sigma = 10**-3;\n", + "\n", + "#Descision Threshold lambda\n", + "lambda1 = (V1+V2)/2 + (sigma)*math.log((C12*P_s2)/(C21*P_s1))/(V1-V2);\n", + "\n", + "print 'The decision threshold is ',lambda1,' V'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The decision threshold is 0.000626381484248 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#The voltage level of reciever is V = 5 mV\n", + "V = 5*10**-3;\n", + "\n", + "#The time required to transfer one bit is T = 1/9600 sec\n", + "T = 9600**-1;\n", + "\n", + "#the signal energy of a bit be Es\n", + "Es = (V**2)*T;\n", + "\n", + "#The power spectral density is n/2 = 10**-9 Watt/hertz\n", + "n = 2*10**-9;\n", + "\n", + "#Probability error for optimal reciever is Pe\n", + "Pe = 0.5*math.erfc((Es/n)**0.5);\n", + "\n", + "print 'The probability of error is ',Pe\n", + "\n", + "#When the data rate is doubled, the new effective energy per bit is Es_new\n", + "Es_new = (V**2)*(T/2);\n", + "\n", + "#The new probability of error is Pe_new\n", + "Pe_new = 0.5*math.erfc((Es_new/n)**0.5);\n", + "\n", + "#Percentage increase in error rate is P\n", + "P = 100*(Pe_new - Pe)/Pe;\n", + "\n", + "print 'Percentage increase in error rate is ',P\n", + "\n", + "#Voltage required to restore probability levels, V_new\n", + "V_new = V*2**0.5;\n", + "\n", + "print 'Voltage required to restore the probability levels is ',V_new,' Volts'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability of error is 0.0532915847874\n", + "Percentage increase in error rate is 138.154889021\n", + "Voltage required to restore the probability levels is 0.00707106781187 Volts\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Amplitude of signal is A = 10 mV\n", + "A = 10*10**-3;\n", + "\n", + "#Power Spectral Density n = 2 * 10**(-9) W/Hz\n", + "n = 2 * 10**(-9);\n", + "\n", + "#Frequency is f = 1 MHz\n", + "f = 1.*10**6;\n", + "\n", + "#Data rate is D = 10**4 bps;\n", + "D = 10.**4;\n", + "\n", + "#Time taken for a bit to traverse\n", + "T = 1/D;\n", + "\n", + "#Energy per signal element is Es\n", + "Es = A**2/(2*D);\n", + "\n", + "#Probability of error Pe\n", + "Pe = 0.5*math.erfc((Es/n)**0.5);\n", + "\n", + "print 'Probability of error is ',Pe\n", + "\n", + "#Phase shift phi = math.pi/6\n", + "phi = math.pi/6;\n", + "\n", + "#Probability of error Pe_local_oscillator\n", + "Pe_local_oscillator = 0.5*math.erfc(((Es/n)**0.5)*math.cos(phi));\n", + "\n", + "print 'Probability of error of local oscillator with phase shift is ',Pe_local_oscillator\n", + "#Timing error t\n", + "t = 0.1*T;\n", + "#Probability of error when there is a synchronization fault Pe_timing_error\n", + "Pe_timing_error = 0.5*math.erfc(((Es/n)*(1 - 2*(t/T))**2)**0.5);\n", + "\n", + "print 'Probability of error with synchronization fault is ',Pe_timing_error\n", + "#Probability of error when both faults occur Pe_both\n", + "Pe_both = 0.5*math.erfc(((Es/n)*(math.cos(phi)**2)*(1 - 2*(t/T))**2)**0.5);\n", + "\n", + "print 'Probability of error when both faults occur ',Pe_both" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error is 0.0126736593387\n", + "Probability of error of local oscillator with phase shift is 0.0264037557081\n", + "Probability of error with synchronization fault is 0.0368191350602\n", + "Probability of error when both faults occur 0.0606676251792\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Amplitude of signal is A = 10 mV\n", + "A = 10.*10**-3\n", + "#Power Spectral Density n = 2 * 10**(-9) W/Hz\n", + "n = 2. * 10**(-9);\n", + "#Data rate is D = 10**4 bps;\n", + "D = 10.**4;\n", + "#Time taken for a bit to traverse\n", + "T = 1/D;\n", + "#Energy per signal element is Es\n", + "Es = A**2/(2*D);\n", + "#Probability of error Pe_a\n", + "Pe_a = 0.5*math.erfc((0.6*Es/n)**0.5);\n", + "\n", + "print 'Probability of error when offset is small is ',Pe_a\n", + "\n", + "#Probability of error Pe_b\n", + "Pe_b = 0.5*math.erfc((Es/(2*n))**0.5);\n", + "print 'Probability of error when frequencies used are orthogonal is ',Pe_b\n", + "#Probability of error Pe_c\n", + "Pe_c = 0.5*math.exp(-(Es/(2*n)));\n", + "print 'Probability of error for non coherent detection is ',Pe_c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error when offset is small is 0.0416322583318\n", + "Probability of error when frequencies used are orthogonal is 0.0569231490033\n", + "Probability of error for non coherent detection is 0.14325239843\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Energy aasosciated with each bit Eb = 5 * 10**(-8) J\n", + "Eb = 5. * 10**(-8);\n", + "\n", + "#Power Spectral Density n = 2 * 10**(-9) W/Hz\n", + "n = 2. * 10**(-9);\n", + "\n", + "#No of symbols M\n", + "M = 16.\n", + "\n", + "#No of bits N\n", + "N = math.log(M,2);\n", + "\n", + "#Error limit for 16-PSK is P_16_PSK\n", + "P_16_PSK = math.erfc(((N*Eb*(math.pi)**2)/(((M)**2)*n))**0.5);\n", + "\n", + "print 'Upper limit of error probability of 16 PSK system is ',P_16_PSK\n", + "\n", + "#Error limit for 16-QASK is P_16_QASK\n", + "P_16_QASK = 2*math.erfc(((0.4*Eb)/(n))**0.5);\n", + "\n", + "print 'Upper limit of error probability of 16 QASK system is ',P_16_QASK\n", + "\n", + "#Error limit for 16-FSK is P_16_FSK\n", + "P_16_FSK = ((2**4 - 1)/2.)*math.erfc(((N*Eb)/(2*n))**0.5);\n", + "\n", + "print 'Upper limit of error probability of 16 FSK system is ',P_16_FSK,', negligibly small'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper limit of error probability of 16 PSK system is 0.0054896637199\n", + "Upper limit of error probability of 16 QASK system is 1.54884328621e-05\n", + "Upper limit of error probability of 16 FSK system is 1.14297795362e-22 , negligibly small\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 595" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Energy aasosciated with each bit Eb = 5 * 10**(-8) J\n", + "Eb = 5 * 10**(-8);\n", + "\n", + "#Power Spectral Density n = 2 * 10**(-9) W/Hz\n", + "n = 2 * 10**(-9);\n", + "\n", + "#Probability of error Pe\n", + "Pe = 0.5*math.erfc(((Eb*(math.pi)**2)/(16*n))**0.5);\n", + "\n", + "print 'Probability of error of QPR system is ',Pe\n", + "\n", + "#Given Bandwidth of channel is BW\n", + "BW = 10*10**3;\n", + "\n", + "D = 2*BW;\n", + "\n", + "print 'Data rate is ',D,' bps'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error of QPR system is 1.39919783959e-08\n", + "Data rate is 20000 bps\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7b68ae3c --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch12.ipynb @@ -0,0 +1,275 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:64f285aa85aad692b9de0a5cdbb5bba70edace6237b639dc0f229cb7693ef9f0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Noise in Pulse Code Modulation and Delta Modulation Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page No : 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Baseband cutoff signal fM = 4 kHz\n", + "fM = 4 * 10**3;\n", + "\n", + "#White noise power spectral density n\n", + "n = 2*10**(-9);\n", + "\n", + "# Part (a)\n", + "\n", + "#Input Signal energy Si = 0.001\n", + "Si_a = 0.001;\n", + "\n", + "#No of levels used for PCM Coding M = 8\n", + "M_a = 8;\n", + "\n", + "N_a = math.log(M_a,2);\n", + "\n", + "#Input SNR is SNR_ip\n", + "SNR_ip = Si_a/(n*fM);\n", + "\n", + "#Output SNR is SNR_op\n", + "SNR_op = (2**(2*N_a))/(1 + (2**(2*N_a + 1))*math.erfc((SNR_ip*(1/(2*N_a))))**0.5);\n", + "\n", + "print 'Input SNR for (a) is ',10*math.log10(SNR_ip),' dB'\n", + "print 'Output SNR (a) is ',10*math.log10(SNR_op),' dB'\n", + "\n", + "# Part (b)\n", + "\n", + "#Input Signal energy Si = 0.001\n", + "Si_b = 0.001;\n", + "\n", + "#No of levels used for PCM Coding M = 256\n", + "M_b = 256;\n", + "\n", + "N_b = math.log(M_b,2);\n", + "\n", + "#Input SNR is SNR_ip_b\n", + "SNR_ip_b = Si_b/(n*fM);\n", + "\n", + "#Output SNR is SNR_op_b\n", + "SNR_op_b = (2**(2*N_b))/(1 + (2**(2*N_b + 1))*math.erfc((SNR_ip_b*(1/(2*N_b))))**0.5);\n", + "\n", + "#Unfortunately in scilab the function erfc approximates the output value to a larger extent due to which an exact value cannot be obtained.\n", + "#The difference in the textbook answer and obatined answer is significant because of converting the answer into dB.\n", + "\n", + "print 'Input SNR for (b) is ',10*math.log10(SNR_ip_b),' dB'\n", + "print 'Output SNR for (b) is ',10*math.log10(SNR_op_b),' dB'\n", + "\n", + "# Part (c)\n", + "\n", + "#Input Signal energy Si = 0.01\n", + "Si_c = 0.01;\n", + "\n", + "#No of levels used for PCM Coding M = 256\n", + "M_c = 256;\n", + "\n", + "N_c = math.log(M_c,2);\n", + "\n", + "#Input SNR is SNR_ip_c\n", + "SNR_ip_c = Si_c/(n*fM);\n", + "\n", + "#Output SNR is SNR_op_c\n", + "SNR_op_c = (2**(2*N_c))/(1 + (2**(2*N_c + 1))*math.erfc((SNR_ip_c*(1/(2*N_c))))**0.5);\n", + "\n", + "print 'Input SNR for (c) is ',10*math.log10(SNR_ip_c),' dB'\n", + "print 'Output SNR for (c) is ',10*math.log10(SNR_op_c),' dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input SNR for (a) is 20.9691001301 dB\n", + "Output SNR (a) is 18.0617997398 dB\n", + "Input SNR for (b) is 20.9691001301 dB\n", + "Output SNR for (b) is 48.1647992977 dB\n", + "Input SNR for (c) is 30.9691001301 dB\n", + "Output SNR for (c) is 48.1647993062 dB\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 609" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Baseband cutoff signal fM = 4 kHz\n", + "fM = 4 * 10**3;\n", + "\n", + "#White noise power spectral density n\n", + "n = 2*10**(-9);\n", + "\n", + "# Part (a)\n", + "\n", + "#Input Signal energy Si = 0.001\n", + "Si = 0.001;\n", + "\n", + "#No of levels used for PCM Coding M = 8\n", + "M = 8;\n", + "\n", + "N = math.log(M,2);\n", + "\n", + "#Input SNR is SNR_ip\n", + "SNR_ip = Si/(n*fM);\n", + "\n", + "#Output SNR is SNR_op\n", + "SNR_op = (2**(2*N))/(1 + (2**(2*N + 1))*math.erfc((SNR_ip*(3/(10*N))))**0.5);\n", + "\n", + "print 'Input SNR for (a) is ',10*math.log10(SNR_ip),' dB'\n", + "print 'Output SNR (a) is ',10*math.log10(SNR_op),' dB'\n", + "\n", + "# Part (b)\n", + "\n", + "#Input Signal energy Si = 0.001\n", + "Si = 0.001;\n", + "\n", + "#No of levels used for PCM Coding M = 256\n", + "M_b = 256;\n", + "\n", + "N_b = math.log(M_b,2);\n", + "\n", + "#Input SNR is SNR_ip_b\n", + "SNR_ip_b = Si/(n*fM);\n", + "\n", + "#Output SNR is SNR_op_b\n", + "SNR_op_b = (2**(2*N_b))/(1 + (2**(2*N_b + 1))*math.erfc((SNR_ip_b*(3/(10*N_b))))**0.5);\n", + "\n", + "#Unfortunately in scilab the function math.erfc approximates the output value to a larger extent due to which an exact value cannot be obtained.\n", + "#The difference in the textbook answer and obatined answer is significant because of converting the answer into dB.\n", + "\n", + "print 'Input SNR for (b) is ',10*math.log10(SNR_ip_b),' dB'\n", + "print 'Output SNR for (b) is ',10*math.log10(SNR_op_b),' dB'\n", + "\n", + "# Part (c)\n", + "\n", + "#Input Signal energy Si = 0.01\n", + "Si = 0.01;\n", + "\n", + "#No of levels used for PCM Coding M = 256\n", + "M = 256;\n", + "\n", + "N = math.log(M,2);\n", + "\n", + "#Input SNR is SNR_ip_c\n", + "SNR_ip_c = Si/(n*fM);\n", + "\n", + "#Output SNR is SNR_op_c\n", + "SNR_op_c = (2**(2*N))/(1 + (2**(2*N + 1))*math.erfc((SNR_ip_c*(3/(10*N))))**0.5);\n", + "\n", + "print 'Input SNR for (c) is ',10*math.log10(SNR_ip_c),' dB'\n", + "print 'Output SNR for (c) is ',10*math.log10(SNR_op_c),' dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input SNR for (a) is 20.9691001301 dB\n", + "Output SNR (a) is 18.0617997398 dB\n", + "Input SNR for (b) is 20.9691001301 dB\n", + "Output SNR for (b) is 45.7055718777 dB\n", + "Input SNR for (c) is 30.9691001301 dB\n", + "Output SNR for (c) is 48.1647993062 dB\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 618" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Upper cut off frequecny fb = 3200 Hz\n", + "fM = 3200;\n", + "\n", + "#Lower cut off frequecny fl = 300 Hz\n", + "fl = 300;\n", + "\n", + "#Data rate fb = 32000 bps\n", + "fb = 32000;\n", + "\n", + "#White noise power spectral density n\n", + "n = 2*10**(-9);\n", + "\n", + "#Input Signal energy Si = 0.001\n", + "Si = 0.001;\n", + "\n", + "#Output SNR is SNR_op\n", + "SNR_op = (0.6*(fb/fM)**3)/(1 + (0.3*(fb**2/(fl*fM)))*math.erfc(Si/(n*fb)));\n", + "\n", + "print 'Output SNR is ',10*math.log10(SNR_op),'dB'\n", + "\n", + "#Data rate fb_n = 32000 bps\n", + "fb_n = 2*32000;\n", + "\n", + "#Output SNR is SNR_op_n\n", + "SNR_op_n = (0.6*(fb_n/fM)**3)/(1 + (0.3*(fb_n**2/(fl*fM)))*math.erfc(Si/(n*fb_n)));\n", + "\n", + "print 'Output SNR when data rate is doubled is ',10*math.log10(SNR_op_n),'dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output SNR is 27.7815125038 dB\n", + "Output SNR when data rate is doubled is 36.8124123738 dB\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..6023df95 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch13.ipynb @@ -0,0 +1,457 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:230239e8b40eac7e3f785878f85fc309f4d1312bad04504a120beabfde04e6e8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Information Theory and Coding" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 631" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given probabilities p1 = p4 = 1/8 & p2 = p3 = 3/8\n", + "p1 = 1./8\n", + "p4 = 1./8\n", + "p2 = 3./8\n", + "p3 = 3./8\n", + "\n", + "#The average information H is p1*math.log2 (1/p1)+p2*math.log2 (1/p2)+p3*math.log2 (1/p3)+p4*math.log2 (1/p4) bits/message\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)\n", + "\n", + "#information rate R is r*H bits/sec where r is 2*B\n", + "#R1 = R/B\n", + "R1 = 2*H\n", + "\n", + "print 'The average information is ',H,' bits/message'\n", + "print 'Information rate ',R1,'*B bits/sec'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average information is 1.81127812446 bits/message\n", + "Information rate 3.62255624892 *B bits/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given bandwidth(B) = 4000Hertz & Noise PSD(n/2) = 10**-9 Watt/Hertz\n", + "B = 4000.\n", + "n = 2*10.**-9\n", + "\n", + "#Chanel capacity(C) = B*math.log2 (1+S/(n*B))\n", + "\n", + "#case 1\n", + "#Signal energy(S) = 0.1Joule\n", + "S = 0.1\n", + "\n", + "C = B*math.log (1+S/(n*B),2)\n", + "\n", + "print 'Channel capacity for bandwidth = 4000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) \\\n", + "\\n= 0.1Joule is ',C,' bits/sec'\n", + "\n", + "#case 2\n", + "#Signal energy(S) = 0.001Joule\n", + "S = 0.001\n", + "\n", + "C = B*math.log (1+S/(n*B),2)\n", + "\n", + "print 'Channel capacity for bandwidth = 4000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) = \\\n", + "\\n0.001Joule is ',C,' bits/sec'\n", + "\n", + "#case 3\n", + "#Signal energy(S) = 0.001Joule & incresed bandwidth(B) = 10000Hertz\n", + "B = 10000.\n", + "S = 0.001\n", + "\n", + "C = B*math.log (1+S/(n*B),2)\n", + "\n", + "print 'Channel capacity for bandwidth = 10000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) \\\n", + "\\n= 0.001Joule is ',C,' bits/sec'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Channel capacity for bandwidth = 4000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) \n", + "= 0.1Joule is 54439.0235417 bits/sec\n", + "Channel capacity for bandwidth = 4000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) = \n", + "0.001Joule is 27909.119694 bits/sec\n", + "Channel capacity for bandwidth = 10000Hertz, Noise PSD = 10**-9 Watt/Hertz & Signal energy(S) \n", + "= 0.001Joule is 56724.2534197 bits/sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No : 675" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#With math.single parity bit added, the code size = 4. An error evades parity check if any 2 or all symbols ofthe code arrives are erroneous.\n", + "#Probability of any symbol from n are erroneous = nCm*(p**m)*(1-p)**(n-m)\n", + "\n", + "#Thus, the probability of error undetected, P_undeterr = (4C2*(p**2)*(1-p)**2)+4C4*(p**4) = 6*(p**2)*(1-p)**2)+(p**4)\n", + "\n", + "#Probability of error in detection(P_undeterr1) for p = 0.1\n", + "p = 0.1\n", + "P_undeterr1 = 6*(p**2)*((1-p)**2)+(p**4)\n", + "\n", + "print 'Probability of error in detection for p = 0.1 is ',P_undeterr1\n", + "\n", + "#Probability of error in detection(P_undeterr2) for p = 0.01\n", + "p = 0.01\n", + "P_undeterr2 = 6*(p**2)*((1-p)**2)+(p**4)\n", + "\n", + "print 'Probability of error in detection for p = 0.01 is ',P_undeterr2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error in detection for p = 0.1 is 0.0487\n", + "Probability of error in detection for p = 0.01 is 0.00058807\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 Page No : 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import zeros\n", + "import math \n", + "\n", + "#The output equations are as follows v1 = s1 xor s2 xor s3 & v2 = s1 xor s3\n", + "#the no of bits in output mode(bits_out) is v*(L+K), v = no of outputs for commutatot = 2, L = length of input = 3 & K = no of memeory elements = 3\n", + "v = 2.\n", + "L = 3.\n", + "K = 3.\n", + "bits_out = v*(L+K)\n", + "\n", + "#Taking in, s1, s2 , s3, v1 & v2 as row matrix where each column represents its corresponding input or output, in means input\n", + "in1 = [0, 1, 0, 1, 0, 0, 0]\n", + "\n", + "s1 = zeros(7,dtype=int)\n", + "s2 = zeros(7,dtype=int)\n", + "s3 = zeros(7,dtype=int)\n", + "v1 = zeros(7,dtype=int)\n", + "v2 = zeros(7,dtype=int)\n", + "\n", + "for i in range(1,7):\n", + " s3[i] = s2[i-1]\n", + " s2[i] = s1[i-1]\n", + " s1[i] = in1[i-1]\n", + " v1[i-1] = s1[i]^(s2[i]^s3[i])\n", + " v2[i-1] = (s1[i]^s3[i])\n", + "\n", + "#Output matrix is out\n", + "out = zeros(12)\n", + "for i in range(0,11,2):\n", + " out[i] = v1[(i+3)/2]\n", + " out[i+1] = v2[(i+3)/2]\n", + "\n", + "\n", + "print ('output is'),\n", + "print (out)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output is [ 1. 1. 1. 0. 0. 0. 1. 0. 1. 1. 0. 0.]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 Page No : 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,array\n", + "\n", + "#The qeneratr matrix requires impulse response of the coder.\n", + "#This is the ourput generated when the initially reset coder is fed with a math.single 1.\n", + "#The no of bits in the output code = 2(1+3) = 8\n", + "\n", + "#Taking in, s1, s2 , s3, v1 & v2 as row matrix where each column represents its corresponding input or output, in means input\n", + "in1 = [0, 1, 0, 0, 0]\n", + "\n", + "s1 = zeros(5,dtype=int)\n", + "s2 = zeros(5,dtype=int)\n", + "s3 = zeros(5,dtype=int)\n", + "v1 = zeros(5,dtype=int)\n", + "v2 = zeros(5,dtype=int)\n", + "\n", + "for i in range(1,5):\n", + " s3[i] = s2[i-1]\n", + " s2[i] = s1[i-1]\n", + " s1[i] = in1[i-1]\n", + " v1[i-1] = s1[i]^(s2[i]^s3[i])\n", + " v2[i-1] = (s1[i]^s3[i])\n", + "\n", + "\n", + "#Output matrix is out\n", + "out = zeros(8)\n", + "for i in range(0,7,2):\n", + " out[i] = v1[(i+3)/2]\n", + " out[i+1] = v2[(i+3)/2]\n", + "\n", + "\n", + "print ('impulse response is'),\n", + "print (out)\n", + "\n", + "#Then generator matrix is G\n", + "G = array([[1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0],[0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0],[0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0]])\n", + "\n", + "#Note that, in G, impulse responses appear in staggered apper in a staggered manner in each row while the rest of the elements are 0.\n", + "\n", + "#Now, output is b_o = b_i*G where input b_i = [1 0 1] \n", + "b_i = array([[1], [0], [1]])\n", + "\n", + "b_o = b_i*G\n", + "print b_o\n", + "\n", + "#Here multiplication means Exor operation so whereever two occurs it should be changed to 1\n", + "\n", + "for i in range(12):\n", + " if b_o[2,i] > 1:\n", + " b_o[2,i] = 0;\n", + "\n", + "print ('output is '),\n", + "print (b_o)\n", + "#print ('The output obtained is exactly same as example 13.1')\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "impulse response is [ 1. 1. 1. 0. 1. 1. 0. 0.]\n", + "[[1 1 1 0 1 1 0 0 0 0 0 0]\n", + " [0 0 0 0 0 0 0 0 0 0 0 0]\n", + " [0 0 0 0 1 1 1 0 1 1 0 0]]\n", + "output is [[1 1 1 0 1 1 0 0 0 0 0 0]\n", + " [0 0 0 0 0 0 0 0 0 0 0 0]\n", + " [0 0 0 0 1 1 1 0 1 1 0 0]]\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.14 Page No : 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given, Tw = 10microsec, BCH(1023973) code is used implies k as 973 & n as 1023, P_A = 0.99, T1 = 40microsec & N = 4\n", + "Tw = 10.*10**-6\n", + "k = 973.\n", + "n = 1023.\n", + "P_A = 0.99\n", + "T1 = 40.*10**-6\n", + "N = 4.\n", + "\n", + "#efficiency of Stop-and-Wait ARQ(n_SandW) = (k/n)*(P_A/(1+(T1/Tw)))\n", + "n_SandW = (k/n)*(P_A/(1+(T1/Tw)))\n", + "\n", + "#efficiency of Go-Back-N ARQ(n_GBN) = (k/n)*(1/(1+(N*(1-P_A)/P_A)))\n", + "n_GBN = (k/n)*(1/(1+(N*(1-P_A)/P_A)))\n", + "\n", + "#efficiency of Selective Repeat ARQ(n_SR) = (k/n)*P_A\n", + "n_SR = (k/n)*P_A\n", + "\n", + "print 'efficiency of Stop-and-Wait ARQ is ',n_SandW\n", + "print 'efficiency of Go-Back-N ARQ is ',n_GBN\n", + "print 'efficiency of Selective Repeat ARQ is ',n_SR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "efficiency of Stop-and-Wait ARQ is 0.188322580645\n", + "efficiency of Go-Back-N ARQ is 0.914187284685\n", + "efficiency of Selective Repeat ARQ is 0.941612903226\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.15 Page No : 718" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Bit interval T = 1/10**6 = 10**-6 sec \n", + "T = 10.**-6\n", + "\n", + "#White Noise Power Spectral Density n/2 = 10**-9 W/Hz\n", + "n = 2.*10**-9\n", + "\n", + "#Power required Ps = Eb/T, where Eb = energy per bit\n", + "\n", + "#For information system feedback system Eb = n\n", + "Ps = n/T\n", + "\n", + "print 'power required for information system feedback system is ',Ps,' Watt'\n", + "\n", + "#For optimal system Ps = (0.69 * n)/T\n", + "Ps = (0.69 * n)/T;\n", + "\n", + "print 'power required for optimal system is ',Ps,' Watt'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power required for information system feedback system is 0.002 Watt\n", + "power required for optimal system is 0.00138 Watt\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.16 Page No : 719" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given, Eb = 10**-9Joule, n/2 = 10**-9 Watt/Hertz\n", + "Eb = 10.**-8\n", + "n = 2.*10**-9\n", + "\n", + "#Probability of error for trellis-decoded modulation(Pe) = (1/2)*erfc(math.sqrt(1.5*Eb/n))\n", + "Pe = (1./2)*math.erfc(math.sqrt(1.5*Eb/n))\n", + "\n", + "print 'Probability of error for trellis-decoded modulation is ',Pe\n", + "\n", + "#Probability of error for Qpsk modulation(Pe) = (1/2)*erfc(math.sqrt(Eb/n))\n", + "Pe = (1./2)*math.erfc(math.sqrt(Eb/n))\n", + "\n", + "print 'Probability of error for Qpsk modulation is ',Pe\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of error for trellis-decoded modulation is 5.37555883648e-05\n", + "Probability of error for Qpsk modulation is 0.000782701129001\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..d1a0c39c --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch14.ipynb @@ -0,0 +1,193 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1f6b0a63494da01fe07a6ddb421e093c85a121b1b4531e9aed4b4cf62750d49" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14 : Communication Systems and Component Noises" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1 Page No : 738" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "#Boltzman consmath.tant k = 1.3806488 \u00d7 10-23 m2 kg s-2 K-1\n", + "k = 1.3806488 * 10**-23; \n", + "\n", + "#Let room temperature be 27 C\n", + "T = 27. + 273; \n", + "\n", + "#Bandwidth BW = 10 MHz\n", + "BW = 10. * 10 **6;\n", + "\n", + "#For (a)\n", + "#Let the equivalent resismath.tance be Ra\n", + "Ra = 10. + 10;\n", + "\n", + "#RMS Noise Voltage be Va\n", + "Va = (4*k*T*Ra*BW)**0.5;\n", + "\n", + "print 'The rms voltage at output a is ',Va,' Volt'\n", + "\n", + "#For (b)\n", + "#Let the equivalent resismath.tance be Rb\n", + "Rb = (10. * 10)/(10+10);\n", + "\n", + "#RMS Noise Voltage be Vb\n", + "Vb = (4*k*T*Rb*BW)**0.5;\n", + "\n", + "print 'The rms voltage at output b is ',Vb,' Volt'\n", + "\n", + "#For (c)\n", + "\n", + "Rc = 10;\n", + "C = 1*10**-9;\n", + "\n", + "#In the textbook, the author has forgotten to multiply the result with T, hence has obtained an erroneous result.\n", + "#The given answer is 28.01uV but the correct answer is found out to be 1.2uV\n", + "\n", + "\n", + "def f0(f): \n", + "\t return Rc/(1 + (2*math.pi*Rc*C*f)**2)\n", + "\n", + "Vc_square = 2*k* quad(f0,-10**7,10**7)[0]\n", + "\n", + "Vc = Vc_square**0.5;\n", + "\n", + "print 'The rms voltage at output c is ',Vc,' Volt'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rms voltage at output a is 1.82031786235e-06 Volt\n", + "The rms voltage at output b is 9.10158931176e-07 Volt\n", + "The rms voltage at output c is 7.02192488697e-08 Volt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2 Page No : 741" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Antenna noise temperature is T_ant = 10 K\n", + "T_ant = 10;\n", + "\n", + "#The reciever noise temperature is Te = 140 K\n", + "Te = 140;\n", + "\n", + "#Midband available gain of reciever gao = 10**10\n", + "gao = 10**10;\n", + "\n", + "#Noise bandwidth is BN = 1.5 * 10**5 Hz\n", + "BN = 1.5 * 10**5;\n", + "\n", + "#Boltzman consmath.tant k = 1.3806488 \u00d7 10-23 m2 kg s-2 K-1\n", + "k = 1.3806488 * 10**-23; \n", + "\n", + "#Available noise power at output is pao\n", + "\n", + "pao = gao*k*(T_ant + Te)*BN;\n", + "\n", + "print 'The available output noise power is ',pao,' Watts'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The available output noise power is 3.1064598e-06 Watts\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3 Page No : 748" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The dismath.tance d = 30 * 1.6 * 10**3 m;\n", + "d = 30 * 1.6 * 10**3;\n", + "\n", + "#Frequency f = 4 * 10**9 Hz\n", + "f = 4 * 10**9;\n", + "\n", + "#Wavelength w = c/f m \n", + "w = 3.*10**8 / f;\n", + "\n", + "#Transmitter gain KT = 40 dB\n", + "KT = 10**4;\n", + "\n", + "#Reciever gain KT = 40 dB\n", + "KR = 10**4;\n", + "\n", + "#Reciever power PR = 10**-6 Watt\n", + "PR = 10**-6;\n", + "\n", + "#Transmitter power PT\n", + "PT = PR*(4*math.pi*d/w)**2/ (KT*KR);\n", + "\n", + "print 'The transmitter output is ',PT,' Watt'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The transmitter output is 0.64681439403 Watt\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8bd2591a --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch15.ipynb @@ -0,0 +1,172 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fd765e7a69a7b78a4739bd991e344937286a307ab56937cb75b90add71748b4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : Spread Spectrum Modulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page No : 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Signal Power data rate fb = 100 Kbps\n", + "fb = 10.**5;\n", + "\n", + "#Signal Strength Ps = 1 mW\n", + "Ps = 1*10.**(-3);\n", + "\n", + "#Chip frequency fs = 100 MHz\n", + "fs = 10.**8;\n", + "\n", + "#Noise Spectral Density n = 2*10**(-9) W/Hz\n", + "n = 2*10.**(-9);\n", + "\n", + "#Jamming Signal power is Pj = 1 W\n", + "Pj = 1.;\n", + "\n", + "#Procesmath.sing Gain P\n", + "P = fs/fb;\n", + "print 'Procesmath.sing Gain is ',P\n", + "\n", + "#Bit Interval T\n", + "T = 1/fb;\n", + "print 'Bit Interval is ',T,'s'\n", + "\n", + "#Energy per bit Eb\n", + "Eb = Ps*T;\n", + "print 'Energy per bit is ',Eb\n", + "\n", + "#Error Probability without jamming E_without_jamming\n", + "E_without_jamming = 0.5*math.erfc((Eb/(n))**0.5);\n", + "print 'Error probability without jamming is ',E_without_jamming\n", + "\n", + "#Error Probability with jamming E_jamming\n", + "E_jamming = 0.5*math.erfc(((2*Ps*P)/(Pj))**0.5);\n", + "print 'Error probability jamming is ',E_jamming\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Procesmath.sing Gain is 1000.0\n", + "Bit Interval is 1e-05 s\n", + "Energy per bit is 1e-08\n", + "Error probability without jamming is 0.000782701129001\n", + "Error probability jamming is 0.0227501319482\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page No : 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chip Rate fc = 110 MHz\n", + "fc = 10*10**6;\n", + "Tc = 1./fc;\n", + "\n", + "#Delay D = 0.1 ms\n", + "D = 0.1*10**-3;\n", + "\n", + "#Speed of light c = 3*10**8 Kmps\n", + "c = 3*10**8;\n", + "\n", + "#Estimated Dismath.tance d\n", + "d = 0.5*c*D;\n", + "\n", + "#Tolerance Tol\n", + "Tol = 0.5*c*Tc;\n", + "\n", + "print 'The target is between ',d-Tol,' metres and ',d+Tol,' metres of the source.'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The target is between 14985.0 metres and 15015.0 metres of the source.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page No : 769" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Number of Flip Flops N\n", + "N = 13.;\n", + "\n", + "#Maximal length of sequence L\n", + "L = 2**N - 1;\n", + "\n", + "#Upper Bound S\n", + "S = (L - 1)/N;\n", + "\n", + "#No of basic sequences and mirror images\n", + "print 'No of basic sequences and mirror images is ',S/2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No of basic sequences and mirror images is 315.0\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..8f666425 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch2.ipynb @@ -0,0 +1,530 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6d13b1b9c222ee00b1703ba6048c13eb190a6152f8d136e88b7b7f4a28866139" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Random Variables and Processes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#A & B are two events occured in sample space S, where P(A) & P(B) are their corresponding probability\n", + "P_S = 1\n", + "\n", + "#Given A&B are not mutually exclusive events, \n", + "#Probability of A is 0.2 = P_A\n", + "#Probability of B is 0.4 = P_B\n", + "#Probability of either A or B is 0.5 = P_AUB\n", + "P_A = 0.2\n", + "P_B = 0.4\n", + "P_AUB = 0.5\n", + "\n", + "#Probability of both of A&B jointly occur is P_AinterB = P_A+P_B-P_AUB where inter is intersection\n", + "P_AinterB = P_A+P_B-P_AUB\n", + "print 'Probability of both of A&B jointly occur is ',(P_AinterB)\n", + "\n", + "#Probability of none of AorB are occur is P_NOAB = Total occurence(P_S) - Probability of either AorB(P_AUB)\n", + "P_NOAB = P_S-P_AUB\n", + "print 'Probability of none of AorB are occur is ',(P_NOAB)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probability of both of A&B jointly occur is 0.1\n", + "Probability of none of AorB are occur is 0.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Probability that A will occur if B has already occurred(P_AB) = ratio of Probability of joint occurence of A&B (P_A_B) & Probability of B(P_B)\n", + "#P_A_B(robability of joint occurence) = Probability that A&B both occur(P_AinterB)\n", + "\n", + "#From given values P_AinterB = 0.1 implies P_A_B = 0.1 & P_B = 0.4\n", + "P_AinterB = 0.1\n", + "P_A_B = P_AinterB \n", + "P_B = 0.4\n", + "\n", + "P_AB = P_A_B/P_B\n", + "\n", + "#Similarly\n", + "#Probability that B will occur if A has already occurred(P_BA) = ratio of Probability of joint occurence of A&B (P_A_B) & Probability of B(P_A)\n", + "\n", + "#From given values P_A = 0.2\n", + "P_A = 0.2\n", + "\n", + "P_BA = P_A_B/P_A\n", + "\n", + "#Bayes theorem says that P_AB = (P_A/P_B)*P_BA\n", + "#After Calculating LHS & RHS if both are equal then bayes theorem is satisfying\n", + "\n", + "#Calculating LHS\n", + "LHS = P_AB\n", + "\n", + "#Calculating RHS\n", + "RHS = (P_A/P_B)*P_BA\n", + "\n", + "print 'P(A/B) = ',(P_AB);\n", + "\n", + "if LHS == RHS:\n", + " print ('LHS = RHS, Hence Bayes theorem is verified' );\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P(A/B) = 0.25\n", + "LHS = RHS, Hence Bayes theorem is verified\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given, The probability that m0 is sent is 0.7 = P_m0\n", + "P_m0 = 0.7\n", + "\n", + "#The probability that m0 is sent is 0.3 = P_m1\n", + "P_m1 = 0.3\n", + "\n", + "#The probability that r0 is received given that m0 is sent is 0.9 = P_r0m0 where r is voltage & m is message\n", + "P_r0m0 = 0.9\n", + "\n", + "#the probability that r1 is received given that m0 is sent is 0.1 = P_r1m0 where r is voltage & m is message\n", + "P_r1m0 = 0.1\n", + "\n", + "#The probability that r1 is received given that m1 is sent is 0.6 = P_r1m1\n", + "P_r1m1 = 0.6\n", + "\n", + "#the probability that r0 is received given that m1 is sent is 0.4 = P_r0m1 where r is voltage & m is message\n", + "P_r0m1 = 0.4\n", + "\n", + "#With the given values check eqations P_r0m0*P_m0(P00) > P_r0m1*P_m1(P01)\n", + "P00 = P_r0m0*P_m0\n", + "P01 = P_r0m1*P_m1\n", + "\n", + "if P00>P01:\n", + " print ('as P(r0|m0)*P(m0) > P(r0|m1)*P(m1) is valid, we whould select m0 whenever r0 is received')\n", + "\n", + "#With the given values check eqations P_r1m1*P_m1(P11) > P_r1m0*P_m0(P10)\n", + "P11 = P_r1m1*P_m1\n", + "P10 = P_r1m0*P_m0\n", + "\n", + "if P11>P10:\n", + " print ('as P(r1|m1)*P(m1) > P(r1|m0)*P(m0) is valid, we whould select m1 whenever r1 is received')\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "as P(r0|m0)*P(m0) > P(r0|m1)*P(m1) is valid, we whould select m0 whenever r0 is received\n", + "as P(r1|m1)*P(m1) > P(r1|m0)*P(m0) is valid, we whould select m1 whenever r1 is received\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given, the probability that r0 is received given that m0 is sent is 0.9 = P_r0m0 where r is voltage & m is message\n", + "P_r0m0 = 0.9\n", + "\n", + "#The probability that m0 is sent is 0.7 = P_m0\n", + "P_m0 = 0.7\n", + "\n", + "#The probability that r1 is received given that m1 is sent is 0.6 = P_r1m1\n", + "P_r1m1 = 0.6\n", + "\n", + "#The probability that m0 is sent is 0.3 = P_m1\n", + "P_m1 = 0.3\n", + "\n", + "#The probability that the transmitted signal is correctly read at receiver is P(c)(P_c) = the probability that m0 was sent when r0 was read(P_r0m0*P_m0) + the probability that m1 was sent when r1 was read(P_r1m1*P_m1)\n", + "\n", + "P_c = P_r0m0*P_m0+P_r1m1*P_m1\n", + "\n", + "#P(e)(P_e) = 1-P(c)\n", + "P_e = 1-P_c\n", + "\n", + "print 'P(e) = ',P_e\n", + "print 'P(c) = ',P_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P(e) = 0.19\n", + "P(c) = 0.81\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Here P(ra|mb) is denoted as P_ramb where a is 0,1,2 & b is 0,1\n", + "#P(X) is denoted as P_X where X is m0, m1, C & E\n", + "\n", + "#From given values P_m0 = 0.6, P_m1 = 0.4, P_r0m0 = 0.6, P_r1m1 = 0.7, P_r0m1 = 0, P_r1m0 = 0.2, P_r2m0 = 0.2 & P_r2m1 = 0.3\n", + "P_m0 = 0.6\n", + "P_m1 = 0.4\n", + "P_r0m0 = 0.6\n", + "P_r1m1 = 0.7\n", + "P_r0m1 = 0\n", + "P_r1m0 = 0.2\n", + "P_r2m0 = 0.2\n", + "P_r2m1 = 0.3\n", + "\n", + "#(a)\n", + "#Comaparing P(r0|m0)*P(m0) & P(r0|m1)*P(m1) gives result\n", + "LHS = P_r0m0*P_m0\n", + "RHS = P_r0m1*P_m1\n", + "\n", + "print 'As P(r0|m0)*P(m0)[',LHS,'] > P(r0|m1)*P(m1)[',RHS,']'\n", + "print ('we select m0 whenever r0 is received')\n", + "\n", + "#Similarly compare P(r1|m1)*P(m1) & P(r1|m0)*P(m0)\n", + "LHS = P_r1m1*P_m1\n", + "RHS = P_r1m0*P_m0\n", + "\n", + "print 'As P(r1|m1)*P(m1)[',LHS,'] > P(r1|m0)*P(m0)[',RHS,']'\n", + "print ('we select m1 whenever r1 is received')\n", + "\n", + "#compare P(r2|m0)*P(m0) & P(r2|m1)*P(m1)\n", + "LHS = P_r2m0*P_m0\n", + "RHS = P_r2m1*P_m1\n", + "\n", + "print 'As P(r2|m0)*P(m0)[',LHS,'] = P(r2|m1)*P(m1)[',RHS,']'\n", + "print ('We can accordingly make either assignment and we arbitrarily associate r2 with m0')\n", + "\n", + "#(b)\n", + "#The probability of being correct is P(C) = P(r0|m0)*P(m0)+P(r1|m1)*P(m1)+P(r2|m0)*P(m0)\n", + "P_C = P_r0m0*P_m0+P_r1m1*P_m1+P_r2m0*P_m0\n", + "\n", + "#The probability of error is P(E) = 1-P(C)\n", + "P_E = 1 - P_C;\n", + "\n", + "print 'Probability of being correct is P(C) = ',(P_C)\n", + "print 'Probability of error is P(E) = ',(P_E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As P(r0|m0)*P(m0)[ 0.36 ] > P(r0|m1)*P(m1)[ 0.0 ]\n", + "we select m0 whenever r0 is received\n", + "As P(r1|m1)*P(m1)[ 0.28 ] > P(r1|m0)*P(m0)[ 0.12 ]\n", + "we select m1 whenever r1 is received\n", + "As P(r2|m0)*P(m0)[ 0.12 ] = P(r2|m1)*P(m1)[ 0.12 ]\n", + "We can accordingly make either assignment and we arbitrarily associate r2 with m0\n", + "Probability of being correct is P(C) = 0.76\n", + "Probability of error is P(E) = 0.24\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "#Given, probability density function of X is fX_x where fX_x = a*e**(-0.2*x) for x greater than & equal to 0 & = 0 eleswhere\n", + "\n", + "#a = fX_x/(a*e**(-0.2*x))\n", + "#from definition integration of fX_x with limits -infinity to +infinity is 1\n", + "#As per given fX_x, integration of a*e**(-0.2*x) with limits 0 & +inffinity and obtained value be P\n", + "#a = 1/p\n", + "\n", + "\n", + "def f7(x): \n", + "\t return math.e**(-0.2*x)\n", + "\n", + "P = quad(f7,0,100)[0]\n", + "\n", + "a = 1./P\n", + "\n", + "print 'a = ',(a)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 0.200000000412\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#We know that, Probabilty of error(P_error) for the signal correpted by Gaussian channel variance sigma**2 where signal having voltage levels as 0&V is (1/2)*erfc(V/(2*math.sqrt(2)*sigma))\n", + "\n", + "#P_error for V = 4 & sigma**2 = 2\n", + "V = 4\n", + "sigma = math.sqrt(2)\n", + "P_error = (1./2)*math.erfc(V/(2*math.sqrt(2)*sigma))\n", + "\n", + "print 'Probabilty of error for V = 4 & sigma**2 = 2 is ',P_error\n", + "\n", + "#P_error for V = 2 & sigma**2 = 2\n", + "V = 2\n", + "sigma = math.sqrt(2)\n", + "P_error = (1./2)*math.erfc(V/(2*math.sqrt(2)*sigma))\n", + "\n", + "print 'Probabilty of error for V = 2 & sigma**2 = 2 is ',P_error\n", + "\n", + "#P_error for V = 4 & sigma**2 = 4\n", + "V = 4\n", + "sigma = math.sqrt(4)\n", + "P_error = (1./2)*math.erfc(V/(2*math.sqrt(2)*sigma))\n", + "\n", + "print 'Probabilty of error for V = 4 & sigma**2 = 4 is ',P_error\n", + "\n", + "#P_error for V = 8 & sigma**2 = 2\n", + "V = 8\n", + "sigma = math.sqrt(2)\n", + "P_error = (1./2)*math.erfc(V/(2*math.sqrt(2)*sigma))\n", + "\n", + "print 'Probabilty of error for V = 8 & sigma**2 = 2 is ',P_error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probabilty of error for V = 4 & sigma**2 = 2 is 0.0786496035251\n", + "Probabilty of error for V = 2 & sigma**2 = 2 is 0.239750061093\n", + "Probabilty of error for V = 4 & sigma**2 = 4 is 0.158655253931\n", + "Probabilty of error for V = 8 & sigma**2 = 2 is 0.00233886749052\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#(a)\n", + "#out of n attempts the probability of message reaching correctly for k times is given by binomial distribution pX(k) = nCk*(q**k)*(1-q)**(n-k) where q is probability of correctly reaching\n", + "\n", + "#Here n = 10, k = 1, q = 0.001\n", + "n = 10.\n", + "k = 1.\n", + "q = 0.001\n", + "\n", + "#pX(k) is denoted as p_X_1\n", + "#10C1 = 10\n", + "p_X_1 = 10*(q**k)*(1-q)**(n-k)\n", + "\n", + "print 'The probability that out of 10 transmissions 9 are corrent and 1 is incorrect is ',p_X_1\n", + "\n", + "#probability that more than two erroneous out of 100 transmissions(p_100_2) = 1-probability of less than or equal to two error in transmission\n", + "#p_100_2 = 1-pX(0)-pX(1)-pX(2)\n", + "#p_100_2 = 1-100C0*((0.001)**0)*((1-0.001)**100)-100C1*((0.001)**1)*((1-0.001)**99)-100C0*((0.001)**2)*((1-0.001)**98)\n", + "\n", + "#Since, calculation of above is cumbersome we may use Poisson ditribution to approximate above\n", + "#Poisson distribution = pX(k) = (alfa**k)*(e**-alfa)/k!, where alfa = n*T\n", + "\n", + "#Here n = 100 & q = 0.001\n", + "n = 100\n", + "q = 0.001\n", + "\n", + "alfa = n*q\n", + "\n", + "p_100_2 = 1-(alfa**0)*(math.e**-0.1)/math.factorial(0)-(alfa**1)*(math.e**-0.1)/math.factorial(1)-(alfa**2)*(math.e**-0.1)/math.factorial(2)\n", + "\n", + "print 'probability that more than two erroneous out of 100 transmissions is ',p_100_2\n", + "\n", + "#(c)\n", + "#from(b), required probability i.e probability of more than one are erroneous out of 100 transmission(p_100_1) is\n", + "p_100_1 = 1-(alfa**0)*(math.e**-0.1)/math.factorial(0)-(alfa**1)*(math.e**-0.1)/math.factorial(1)\n", + "\n", + "print 'probability that more than one erroneous out of 100 transmissions is ',p_100_1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability that out of 10 transmissions 9 are corrent and 1 is incorrect is 0.00991035916126\n", + "probability that more than two erroneous out of 100 transmissions is 0.000154653070265\n", + "probability that more than one erroneous out of 100 transmissions is 0.00467884016044\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given, Error probability is 10**-4 = P_e, no of ecperiments conducted = N = 4*10**5 & estimated probability of error p does not differ from P_e by more than 50%\n", + "P_e = 10.**-4\n", + "N = 4.*10**5\n", + "\n", + "#Tchebycheff's inequality is P(|p-Pe|> = E)< = P_e/(N*E**2)\n", + "#From given values we can find that E = 50*10**-4\n", + "E = 50.*10**-4\n", + "\n", + "#Here R.H.S of Tchebycheff's inequality is denoted as Tc_RHS\n", + "Tc_RHS = P_e/(N*E**2)\n", + "\n", + "#Tc_RHS in persentage is Tc_RHSper\n", + "Tc_RHSper = Tc_RHS/100\n", + "\n", + "#print (Tc_RHSper,Tc_RHS,'or P(|p-10**-4|> = 0.5*10**-2)< = ',Tc_RHS,'The probability of estimated probability of error p does not differ from P_e by more than 50% is less than equal to')\n", + "\n", + "#given solution has been computed wrong, obtaines solution is 10**-7\n", + "print 'The probability of estimated probability of error p does not differ from P_e by more \\\n", + "\\nthan 50% is less than equal to ',Tc_RHS,'or P(|p-10**-4|> = 0.5*10**-2)< = ',Tc_RHS,' = ',Tc_RHSper,'%'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability of estimated probability of error p does not differ from P_e by more \n", + "than 50% is less than equal to 1e-05 or P(|p-10**-4|> = 0.5*10**-2)< = 1e-05 = 1e-07 %\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..f642bdbb --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch3.ipynb @@ -0,0 +1,181 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1649084fc90216ec80694b60fab793ace26ae9ec3091cc288c368f6a407fd858" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Amplitude Modulation Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Transmission power effiency n = ((m**2)/(2+(m**2)))*100% where m is modulated index\n", + "\n", + "#Given modulated indices are m1 = 0.25, m2 = 0.5 & m3 = 0.75\n", + "\n", + "#Transmission power effiencies are n1, n2 & n3 respectively for m1, m2 & m3\n", + "n1 = ((0.25**2)/(2+(0.25**2)))*100\n", + "n2 = ((0.5**2)/(2+(0.5**2)))*100\n", + "n3 = ((0.75**2)/(2+(0.75**2)))*100\n", + "\n", + "print 'Transmission power effiency for modulated index 0.25 is ',n1, '%'\n", + "print 'Transmission power effiency for modulated index 0.5 is ',n2, '%'\n", + "print 'Transmission power effiency for modulated index 0.75 is ',n3, '%'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transmission power effiency for modulated index 0.25 is 3.0303030303 %\n", + "Transmission power effiency for modulated index 0.5 is 11.1111111111 %\n", + "Transmission power effiency for modulated index 0.75 is 21.9512195122 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given input inmedance of matching networkis R1 = 10 ohm & output impedance of matching networ is R2 = 50 ohm & carrier frequency is fc = 500 KHz\n", + "R1 = 10.\n", + "R2 = 50.\n", + "fc = 500000.\n", + "\n", + "#Wc = 2*pi*fc\n", + "Wc = 2*math.pi*fc\n", + "\n", + "#AS R1 = R2*(X2**2)/[(R2**2)+(X2**2)], X2 = 25ohm\n", + "X2 = 25\n", + "\n", + "#AS X1 = (R2**2)*X2/[(R2**2)+(X2**2)] & R1>R2, X1 = -20ohm\n", + "X1 = -20\n", + "\n", + "#|X1| = |jwL| = wL = 20 & |X2| = |1/jwC| = 1/wC = 25, so |X1*X2| = L/C = 500 denotes as LC_div\n", + "LC_div = 500\n", + "\n", + "#Wc**2 = 1/(L*C). LC is denoted as LC_prod\n", + "LC_prod = 1/(Wc**2)\n", + "\n", + "#In the textbook the calculated LC = 10**-3, in reality the value of LC = 1.013D-13\n", + " \n", + "L = math.sqrt(LC_div*LC_prod)\n", + "\n", + "#In the textbook the calculated L**2 = 50*10**-14, in reality the value of L**2 = 5.066D-11 \n", + " \n", + "C = L/500\n", + "\n", + "#In the textbook the calculated C = 1.4*10**-9, in reality the value of C = 1.424D-08 \n", + "\n", + "print 'Inductance ',L,' H'\n", + "print 'Capacitance ',C,' F'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inductance 7.11762543417e-06 H\n", + "Capacitance 1.42352508683e-08 F\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given ohmnic loss resismath.tance is Ro = 12 Ohm, \n", + "Ro = 12.\n", + "#radiation resismath.tance is Rr = 48 Ohm,\n", + "Rr = 48.\n", + "#directivity is D = 2\n", + "D = 2.\n", + "#Input current = 0.1*math.cos[2*pi*(10**6)*t], Amplitude of input current is A = 0.1 Amp\n", + "A = 0.1\n", + "#Equivalent resismath.tance = Re = Ro+Rr\n", + "Re = Ro+Rr\n", + "\n", + "#Total power used in antenna = Pin = (A**2)*Re/2\n", + "Pin = (A**2)*Re/2\n", + "\n", + "#Power used in radiation = Prad = (A**2)*Rr/2\n", + "Prad = (A**2)*Rr/2\n", + "\n", + "#Efficiency of the antenna = n = Prad/Pin\n", + "n = Prad/Pin\n", + "\n", + "#Gain of antenna = Ga = efficiency*directivity\n", + "Ga = n*D\n", + "\n", + "print 'Total power used in antenna ',Pin,' Watt'\n", + "print 'Power used in radiation ',Prad,' Watt'\n", + "print 'Efficiency of the antenna ',n\n", + "print 'Gain of antenna ',Ga\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power used in antenna 0.3 Watt\n", + "Power used in radiation 0.24 Watt\n", + "Efficiency of the antenna 0.8\n", + "Gain of antenna 1.6\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..9fe76ece --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch4.ipynb @@ -0,0 +1,175 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bf3f1dea5148584263a944844c445c2341e280c52ef0b3f67b0f920221aa409f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Angle Modulation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given angle modulated signal is x = 3*math.cos[2*pi*(10**6)*t+2*math.sin(2*pi*10**3*t)]\n", + "\n", + "#So, phase of the angle modulates signal is Q = 2*pi*(10**6*t)+2*math.sin(2*pi*(10**3)*t)\n", + "\n", + "#Insmath.tanmath.taneous frequency = dQ/dt = 2*pi*(10**6)+ 4*pi*(10**3)*math.sin(2*pi*(10**3)*t)\n", + "\n", + "#For Insmath.tanmath.taneous frequency at 0.25ms, Substituting t = 0.25ms in Insmath.tanmath.taneous frequency\n", + "#Insmath.tanmath.taneous frequency is expressed as f1_rad for frequency in radians per second\n", + "f1_rad = 2*math.pi*(10**6)+ 4*math.pi*(10**3)*math.sin(2*math.pi*(10**3)*0.00025)\n", + "\n", + "#Insmath.tanmath.taneous frequency is expressed as f1_hz for frequency in hertz\n", + "f1_hz = f1_rad/(2*math.pi)\n", + "\n", + "print 'the Instantaneous frequency at time t = 0.25ms is ',f1_rad,' rad/sec = ',f1_hz,' Hz'\n", + "\n", + "#For Insmath.tanmath.taneous frequency at 0.25ms, Substituting t = 0.5ms in Insmath.tanmath.taneous frequency \n", + "#Insmath.tanmath.taneous frequency is expressed as f2rad for frequency in radians per second\n", + "f2_rad = 2*math.pi*(10**6)+ 4*math.pi*(10**3)*math.sin(2*math.pi*(10**3)*0.0005)\n", + "\n", + "#Insmath.tanmath.taneous frequency is expressed as f2hz for frequency in hertz\n", + "f2_hz = f2_rad/(2*math.pi)\n", + "\n", + "print 'the Instantaneous frequency at time t = 0.5ms is ',f2_rad,' rad/sec = ',f2_hz,' Hz'\n", + "\n", + "#Maximum phase deviation = max[2*math.sin(2*pi*(10**3)*t)] = 2*1\n", + "maxDp = 2;\n", + "\n", + "print 'Maximum phase deviation is ',maxDp,' rad'\n", + "\n", + "#Maximum frequency deviation = max[4*pi*(10**3)*math.sin(2*pi*(10**3)*t)] = 4*pi*(10**3)*1\n", + "maxDf = 4*math.pi*(10**3)*1;\n", + "\n", + "print 'Maximum frequency deviation is ',maxDf,' Hz'\n", + "#print ('in rad',maxDf,'Maximum frequency deviation is')\n", + "\n", + "#In the textbook the calculated value of max frequency devaition is = 2000 Hz, in reality the value = 12566.371 Hz \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the Instantaneous frequency at time t = 0.25ms is 6295751.67779 rad/sec = 1002000.0 Hz\n", + "the Instantaneous frequency at time t = 0.5ms is 6283185.30718 rad/sec = 1000000.0 Hz\n", + "Maximum phase deviation is 2 rad\n", + "Maximum frequency deviation is 12566.3706144 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given modulating signal m(t) = 2*math.sin(2*pi*(10**3)*t), B for phase modulation Bp = 10 & for fequency modulation Bf = 10\n", + "Bp = 10.\n", + "Bf = 10.\n", + "#So Amplitude of modulating signal is Am = 2 metres\n", + "Am = 2.\n", + "#Frequency of modulating signal is fm = 1000 hertz\n", + "fm = 1000.\n", + "\n", + "#Bandwidth = 2*(1+B)*fm\n", + "#Bandwidth for phase modulation with modulating signal m(t) is bw_pm = 2*(1+Bp)*fm\n", + "bw_pm = 2.*(1+10)*1000\n", + "#Bandwidth for frequency modulation with modulating signal m(t) is bw_fm = 2*(1+Bf)*fm\n", + "bw_fm = 2*(1+10)*1000.\n", + "\n", + "print 'Bandwidth for phase modulation ',bw_pm,' Hz'\n", + "print 'Bandwidth for frequency modulation ',bw_fm,' Hz'\n", + "\n", + "#Bandwidth for phase & frequency modulation if frequency of modulating signal is doubled i.e fm = 2000 hertz\n", + "\n", + "#Bp & Bf after frequency of modulating signal is doubled\n", + "\n", + "#Bp = kp*Am, observing the equation as there is no change in amplitude Bp = 10\n", + "Bp = 10.\n", + "#Bf = kf*Am/fm, observing the equation as there is change in frequency Bf = 10/2 = 5\n", + "Bf = 5.\n", + "\n", + "#Bandwidth for phase modulation if frequency of modulating signal is doubled is bw_double_pm = 2*(1+Bp)*fm\n", + "bw_double_pm = 2.*(1+10)*2000\n", + "#Bandwidth for frequency modulation if frequency of modulating signal is doubled is bw_double_fm = 2*(1+Bf)*fm\n", + "bw_double_fm = 2*(1+5)*2000.\n", + "\n", + "print 'Bandwidth for phase modulation for doubled frequency ',bw_double_pm,' Hz'\n", + "print 'bandwidth for frequency modulation for doubled frequency ',bw_double_fm,' Hz'\n", + "\n", + "#Bandwidth for phase & frequency modulation if amplitude of modulating signal is halfed i.e Am = 1 metre\n", + "\n", + "#Bp & Bf after amplitude of modulating signal is halfed\n", + "\n", + "#Bp = kp*Am, observing the equation as there is change in amplitude Bp = 10/2 = 5\n", + "Bp = 5\n", + "\n", + "#Bf = kf*Am/fm, observing the equation as there is change in amplitude Bf = 5/2 = 2.5\n", + "Bf = 2.5\n", + "\n", + "#Bandwidth for phase modulation if frequency of modulating signal is doubled is bw_halfed_pm = 2*(1+Bp)*fm\n", + "bw_halfed_pm = 2*(1+5)*2000\n", + "\n", + "#Bandwidth for frequency modulation if frequency of modulating signal is doubled is bw_halfed_fm = 2*(1+Bf)*fm\n", + "bw_halfed_fm = 2*(1+2.5)*2000\n", + "\n", + "print 'Bandwidth for phase modulation for halfed amplitude ',bw_halfed_pm,' Hz'\n", + "print 'Bandwidth for frequency modulation for halfed amplitude ',bw_halfed_fm,' Hz'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth for phase modulation 22000.0 Hz\n", + "Bandwidth for frequency modulation 22000.0 Hz\n", + "Bandwidth for phase modulation for doubled frequency 44000.0 Hz\n", + "bandwidth for frequency modulation for doubled frequency 24000.0 Hz\n", + "Bandwidth for phase modulation for halfed amplitude 24000 Hz\n", + "Bandwidth for frequency modulation for halfed amplitude 14000.0 Hz\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..7f653291 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch5.ipynb @@ -0,0 +1,369 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c287d4968bde4c22d65b2e15265cd55dc8513a5c625e0740ac25fddc2c31312f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Pulse Modulation and Digital Transmission of Analog Signal" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#page 247\n", + "#problem 5.2\n", + "\n", + "#Highest frequency(fH) = 10000/2 = 5000 Hz \n", + "fH = 5000.\n", + "#Lowest frequency(fL) = 6000/2 = 3000 Hz\n", + "fL = 3000.\n", + "#Minimum sampling frequency from low pass consideration(S_LOW) = 2*fH\n", + "S_LOW = 2*fH\n", + "\n", + "print 'Minimum sampling frequency from low pass consideration is ',S_LOW,' Hz'\n", + "\n", + "#B = fH-fL = 2000 Hz\n", + "B = fH-fL\n", + "#k = floor(fH/B) = 2, where floor(x) gives the largest integer that does not exceed x\n", + "k = math.floor(fH/B)\n", + "\n", + "#The required sampling frequency from band pass consideration(S_BAND) = 2*fH/k\n", + "S_BAND = 2*fH/k\n", + "\n", + "print 'Minimum sampling frequency from band pass consideration is ',S_BAND,' Hz'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum sampling frequency from low pass consideration is 10000.0 Hz\n", + "Minimum sampling frequency from band pass consideration is 5000.0 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#page 259\n", + "#problem 5.3\n", + "\n", + "#Given width of each pulse W = 150 us\n", + "W = 150. * 10**-6\n", + "\n", + "#One cycle is a period,T = 1ms\n", + "T = 1000. * 10**-6\n", + "\n", + "#There are 5 messages multiplexed each utilizeallocated time pulse width = s(T_5) = T/5\n", + "T_5 = T/5\n", + "\n", + "#Gaurd time(GT_5) = allocated time-pulse width = T_5-W\n", + "GT_5 = T_5-W\n", + "\n", + "print 'Gaurd time where 5 messages multiplexed is ',GT_5,' seconds'\n", + "\n", + "#Here there are 10 messages multiplexed each utilizeallocated time pulse width = s(T_10) = T/10\n", + "T_10 = T/10\n", + "\n", + "#Gaurd time(GT_10) = allocated time-pulse width = T_10-norrow pulses width = T_10 -50* 10**-6\n", + "GT_10 = T_10 - 50 * 10**-6\n", + "\n", + "print 'Gaurd time where 10 messages multiplexed is ',GT_10,' seconds'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gaurd time where 5 messages multiplexed is 5e-05 seconds\n", + "Gaurd time where 10 messages multiplexed is 5e-05 seconds\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Let Abe the maximum value of the discrete samples.\n", + "#Error tolerated is 0.1% i.e. 0.001A\n", + "#If D is step size then possible maximum error is D/2\n", + "#Thus D/2 = 0.001A or A/D = 500 = no of levels required(Levels)\n", + "Levels = 500.\n", + "\n", + "#minimum no of binary digits required(B) = rounded value to the next higher integer of math.log2 (Levels)\n", + "B = round(math.log(Levels))\n", + "\n", + "print 'Minimum no of binary digits required ',B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum no of binary digits required 6.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#The y axis is uniformly quantized with step size(step_size) = 1/((2**8)/(2-1)) in both +ve & -ve direction between 1 & -1 when peak of input varies between 1 & -1.\n", + "#The smallest step in x direction occurs nearest to x = 0 i.e between y1 = 0 & y2 = step_size\n", + "step_size = 1./((2**8)/2-1)\n", + "y1 = 0.\n", + "y2 = step_size\n", + "\n", + "#Then, y1 = (ln(1+255*x1))/(ln(1+255))\n", + "\n", + "x1 = (math.e**(y1*math.log(256)) - 1)/255;\n", + "\n", + "#y2 = (ln(1+255*x2))/(ln(1+255))\n", + "x2 = (math.e**(y2*math.log(256)) - 1)/255;\n", + "\n", + "#The smallest step size is 10*(x2-x1)\n", + "print 'The smallest step size is ',10*(x2-x1),' Volts'\n", + "\n", + "#The largest step size occurs when x is at its extreme between y1 = 1-1/127 = 126/127 & y2 = 1\n", + "y1 = 1-1/127.\n", + "y2 = 1\n", + "\n", + "#Then, y1 = (ln(1+255*x1))/(ln(1+255))\n", + "\n", + "x1 = (math.e**(y1*math.log(256)) - 1)/255;\n", + "\n", + "#y2 = (ln(1+255*x2))/(ln(1+255))\n", + "x2 = (math.e**(y2*math.log(256)) - 1)/255;\n", + "\n", + "#The largest step size is 10*(x2-x1)\n", + "print 'The largest step size is ',10*(x2-x1),' Volts'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest step size is 0.00175019848677 Volts\n", + "The largest step size is 0.428908595649 Volts\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#for error calculation e(n) = m(n) - [**hj(n)*m(n-1)+**hj(n)*m(n-2)+**hj(n)*m(n-3)+ ........+**hj(n)*m(n-N)]\n", + "\n", + "#for coefficient upgradation **hj(n+1) = **hj(n)+um(n-j)e(n) where u = learning parameter = 0.1.\n", + "u = 0.1\n", + "\n", + "#Assign m values taking from m = -3 to 5\n", + "#Denoting m(x) as matrix m where each element repesents from n = -3 to 5 \n", + "m = [0, 0, 0, 1, 2, 3, 4, 5, 6]\n", + "\n", + "#taking e(n) as matrix e, **hj(n) as matrises h_j\n", + "e = zeros(5)\n", + "h_1 = zeros(6)\n", + "h_2 = zeros(6)\n", + "\n", + "#given **h1(0) = **h2(0) = 0\n", + "\n", + "for i in range(5):\n", + " e[i] = m[i+3] - h_1[i]*m[i+2] - h_2[i]*m[i+1]\n", + " h_1[i+1] = h_1[i] + u*m[i+2]*e[i]\n", + " h_2[i+1] = h_2[i] + u*m[i+1]*e[i]\n", + "\n", + "\n", + "#here e(3) is given as 1.32 but it is print laying 0.92\n", + "#here **h2(3) is given as 0.26 but it is print laying 0.46\n", + "\n", + "for i in range(5):\n", + " print 'e(',i,') = ',e[i],\n", + " print '**h1(',i,') = ',h_1[i+1],\n", + " print '**h2(',i,') = ',h_2[i+1]\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "e( 0 ) = 1.0 **h1( 0 ) = 0.0 **h2( 0 ) = 0.0\n", + "e( 1 ) = 2.0 **h1( 1 ) = 0.2 **h2( 1 ) = 0.0\n", + "e( 2 ) = 2.6 **h1( 2 ) = 0.72 **h2( 2 ) = 0.26\n", + "e( 3 ) = 1.32 **h1( 3 ) = 1.116 **h2( 3 ) = 0.524\n", + "e( 4 ) = -1.036 **h1( 4 ) = 0.7016 **h2( 4 ) = 0.2132\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#case 1(a)\n", + "#f = 400Hertz, fs = 8000Hertz\n", + "f = 400.\n", + "fs = 8000.\n", + "\n", + "#We know that maximum signal to noise ratio(SNR_max) = 3*(fs**2)/(8*(pi**2)*(f**2))\n", + "SNR_max = 3*(fs**2)/(8*(math.pi**2)*(f**2))\n", + "#SNR_max in decibels is SNR_max_db\n", + "SNR_max_db = 10*math.log10 (SNR_max)\n", + "\n", + "print 'Maximum signal to noise ratio for f = 400 & fs = 8000 is ',SNR_max,' = ',SNR_max_db,' db'\n", + "\n", + "#case 1(b)\n", + "#f = 400Hertz, fs = 16000Hertz\n", + "f = 400.\n", + "fs = 16000.\n", + "\n", + "#We know that maximum signal to noise ratio(SNR_max) = 3*(fs**2)/(8*(pi**2)*(f**2))\n", + "SNR_max = 3*(fs**2)/(8*(math.pi**2)*(f**2))\n", + "\n", + "#SNR_max in decibels is SNR_max_db\n", + "SNR_max_db = 10*math.log10 (SNR_max)\n", + "\n", + "#Given solution is 13.8385 dB obtained solution is 17.838515 dB\n", + "\n", + "print 'Maximum signal to noise ratio for f = 400 & fs = 16000 is ',SNR_max,' = ',SNR_max_db,' db'\n", + "\n", + "#case 2(a)\n", + "#f = 400Hertz, fs = 8000Hertz & fc = 1000Hertz\n", + "f = 400.\n", + "fs = 8000.\n", + "fc = 1000.\n", + "\n", + "#If a 1kHz low pass post reconstruction filter is used then maximum signal to noise ratio(SNR_max) = 3*(fs**3)/(8*(pi**2)*(f**2)*fc)\n", + "SNR_max = 3*(fs**3)/(8*(math.pi**2)*(f**2)*fc)\n", + "#SNR_max in decibels is SNR_max_db\n", + "SNR_max_db = 10*math.log10 (SNR_max)\n", + "\n", + "print ('If a 1kHz low pass post reconstruction filter is used then')\n", + "\n", + "print 'Maximum signal to noise ratio for f = 400, fs = 8000 & fc = 1000 is ',SNR_max,' = ',SNR_max_db,' db'\n", + "\n", + "#case 2(b)\n", + "#f = 400Hertz, fs = 16000Hertz & fc = 1000Hertz\n", + "f = 400.\n", + "fs = 16000.\n", + "fc = 1000.\n", + "\n", + "#If a 1kHz low pass post reconstruction filter is used then maximum signal to noise ratio(SNR_max) = 3*(fs**3)/(8*(pi**2)*(f**2)*fc)\n", + "SNR_max = 3*(fs**3)/(8*(math.pi**2)*(f**2)*fc)\n", + "#SNR_max in decibels is SNR_max_db\n", + "SNR_max_db = 10*math.log10 (SNR_max)\n", + "\n", + "print 'Maximum signal to noise ratio for f = 400, fs = 16000 & fc = 1000 is ',SNR_max,' = ',SNR_max_db,' db'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum signal to noise ratio for f = 400 & fs = 8000 is 15.1981775464 = 11.8179151367 db\n", + "Maximum signal to noise ratio for f = 400 & fs = 16000 is 60.7927101854 = 17.83851505 db\n", + "If a 1kHz low pass post reconstruction filter is used then\n", + "Maximum signal to noise ratio for f = 400, fs = 8000 & fc = 1000 is 121.585420371 = 20.8488150066 db\n", + "Maximum signal to noise ratio for f = 400, fs = 16000 & fc = 1000 is 972.683362966 = 29.8797148765 db\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..322d8248 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch6.ipynb @@ -0,0 +1,487 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b70560f54a38907542f1055d1e191f9145d3c4b9df3b743785f85d1d01b97fe0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Digital Modulation and Transmission" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros,bitwise_xor\n", + "\n", + "#Given messages signal m = [1,0,1,1,0,1]\n", + "m = [1,0,1,1,0,1];\n", + "\n", + "#Logical 0 corrsponds to pi i.e math.pi and Logical 1 corresponds to 0\n", + "\n", + "################################################################################\n", + "\n", + "#For BPSK, from the above deduction let the carrier phase be Carrier_Phase_BPSK\n", + "Carrier_Phase_BPSK = zeros(5)\n", + "for i in range(5):\n", + " if m[i] == 1:\n", + " Carrier_Phase_BPSK[i] = 0;\n", + " else:\n", + " Carrier_Phase_BPSK[i] = math.pi;\n", + "\n", + "print 'The Phase of the carrier signal for BPSK varies as ',Carrier_Phase_BPSK\n", + "\n", + "################################################################################\n", + "\n", + "#For DPSK\n", + "#Let b represent the input to balance modulator\n", + "\n", + "#If the initial value of b be 0\n", + "b = zeros(5)\n", + "\n", + "for i in range(1,5):\n", + " b[i] = int(m[i])^int(b[i-1])\n", + "\n", + "Carrier_Phase_DPSK = zeros(5)\n", + "\n", + "#Now the carrier phase, Carrier_Phase_DPSK\n", + "for i in range(5):\n", + " if b[i] == 1 :\n", + " Carrier_Phase_DPSK[i] = 0;\n", + " else:\n", + " Carrier_Phase_DPSK[i] = math.pi;\n", + "\n", + "Carrier_Amplitude_DPSK = zeros(5)\n", + "#Now the carrier amplitude, Carrier_Amplitude_DPSK\n", + "for i in range(5):\n", + " Carrier_Amplitude_DPSK[i] = math.cos(Carrier_Phase_DPSK[i]);\n", + "\n", + "\n", + "print 'The Phase of the carrier signal for DPSK varies as follows, '+'when the initial value of b is 1',Carrier_Phase_DPSK\n", + "print 'The Amplitude of the carrier signal for DPSK varies as follows, '+'when the initial value of b is 1',Carrier_Amplitude_DPSK\n", + "\n", + "#If the initial value of b be 1\n", + "b = zeros(5)\n", + "\n", + "for i in range(1,5):\n", + " b[i] = m[i]^int(b[i-1])\n", + "\n", + "\n", + "#Now the carrier phase, Carrier_Phase_DPSK\n", + "for i in range(5):\n", + " if b[i] == 1:\n", + " Carrier_Phase_DPSK[i] = 0;\n", + " else:\n", + " Carrier_Phase_DPSK[i] = math.pi;\n", + "\n", + "#Now the carrier amplitude, Carrier_Amplitude_DPSK\n", + "for i in range(5):\n", + " Carrier_Amplitude_DPSK[i] = math.cos(Carrier_Phase_DPSK[i]);\n", + "\n", + "\n", + "print 'The Phase of the carrier signal for DPSK varies as follows, '+'when the initial value of b is 0',Carrier_Phase_DPSK\n", + "print 'The Amplitude of the carrier signal for DPSK varies as follows, '+'when the initial value of b is 0',Carrier_Amplitude_DPSK\n", + "\n", + "################################################################################\n", + "\n", + "#For DEPSK\n", + "#The DEPSK transmitter output is same as that of DPSK\n", + "\n", + "#If the initial value of b be 0\n", + "b = zeros(5)\n", + "\n", + "for i in range(1,5):\n", + " b[i] = m[i]^int(b[i-1])\n", + "\n", + "\n", + "Carrier_Phase_DEPSK = zeros(5)\n", + "#Now the carrier phase, Carrier_Phase_DPSK\n", + "for i in range(5): \n", + " if b[i] == 1:\n", + " Carrier_Phase_DEPSK[i] = 0;\n", + " else:\n", + " Carrier_Phase_DEPSK[i] = math.pi;\n", + "\n", + "\n", + "print 'The Phase of the carrier signal for DEPSK varies as follows, '+'when the initial value of b is 1',Carrier_Phase_DEPSK\n", + "\n", + "#If the initial value of b be 1\n", + "b = zeros(5)\n", + "b[0] = 1\n", + "\n", + "for i in range(1,5):\n", + " b[i] = m[i]^int(b[i-1])\n", + "\n", + "\n", + "#Now the carrier phase, Carrier_Phase_DPSK\n", + "for i in range(5):\n", + " if b[i] == 1:\n", + " Carrier_Phase_DEPSK[i] = 0;\n", + " else:\n", + " Carrier_Phase_DEPSK[i] = math.pi;\n", + "\n", + "print 'The Phase of the carrier signal for DEPSK varies as, '+'when the initial value of b is 0',Carrier_Phase_DEPSK" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Phase of the carrier signal for BPSK varies as [ 0. 3.14159265 0. 0. 3.14159265]\n", + "The Phase of the carrier signal for DPSK varies as follows, when the initial value of b is 1 [ 3.14159265 3.14159265 0. 3.14159265 3.14159265]\n", + "The Amplitude of the carrier signal for DPSK varies as follows, when the initial value of b is 1 [-1. -1. 1. -1. -1.]\n", + "The Phase of the carrier signal for DPSK varies as follows, when the initial value of b is 0 [ 3.14159265 3.14159265 0. 3.14159265 3.14159265]\n", + "The Amplitude of the carrier signal for DPSK varies as follows, when the initial value of b is 0 [-1. -1. 1. -1. -1.]\n", + "The Phase of the carrier signal for DEPSK varies as follows, when the initial value of b is 1 [ 3.14159265 3.14159265 0. 3.14159265 3.14159265]\n", + "The Phase of the carrier signal for DEPSK varies as, when the initial value of b is 0 [ 0. 0. 3.14159265 0. 0. ]\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#From Ex6_1 the obtained carrier amplitude is c\n", + "\n", + "################################################################################\n", + "\n", + "#For DPSK\n", + "#Considering the initial value of the storage element to be 0 in polar and -1 in biploar\n", + "c = [1,1,-1,1,1];\n", + "y = zeros(5)\n", + "y[0] = -1;\n", + "#Let the output be y\n", + "for i in range(1,5):\n", + " y[i] = c[i]*c[i-1]\n", + "\n", + "output_binary = zeros(5)\n", + "#Converting back to binary data\n", + "for i in range(5):\n", + " if y[i] == -1:\n", + " output_binary[i] = 0;\n", + " else:\n", + " output_binary[i] = 1;\n", + "\n", + "#Now inverting the output we get:\n", + "for i in range(5):\n", + " output_binary[i] = int(output_binary[i]);\n", + "\n", + "print 'The DPSK output is',output_binary\n", + "\n", + "\n", + "################################################################################\n", + "\n", + "#For DEPSK\n", + "\n", + "#From example Ex6_1, we have b when initial storage value is assumed to be 1\n", + "b = [1,1,0,1,1]; \n", + "\n", + "#Output y \n", + "y[0] = 1;\n", + "for i in range(1,5):\n", + " y[i] = b[i]^b[i-1]\n", + "\n", + "\n", + "print 'The DEPSK output is',y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The DPSK output is [ 0. 1. 0. 0. 1.]\n", + "The DEPSK output is [ 1. 0. 1. 1. 0.]\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given energy per bit Eb = 0.01\n", + "Eb = 0.01;\n", + "\n", + "#Given fundamental frequency is fb = 8 KHz \n", + "fb = 8*10**3;\n", + "\n", + "#No of symbols M = 16\n", + "M = 16.;\n", + "\n", + "N = math.log(M,2);\n", + "\n", + "BW_BPSK = 2*fb;\n", + "print 'Bandwidth for BPSK is ',BW_BPSK,'Hz'\n", + "\n", + "BW_QPSK = fb;\n", + "print 'Bandwidth for QPSK is ',BW_QPSK,'Hz'\n", + "\n", + "BW_16MPSK = fb/2;\n", + "print 'Bandwidth for 16 MPSK is ',BW_16MPSK,'Hz'\n", + "\n", + "BW_BFSK = 4*fb;\n", + "print 'Bandwidth for BFSK is ',BW_BFSK,'Hz'\n", + "\n", + "BW_MSK = 1.5*fb;\n", + "print 'Bandwidth for MSK is ',BW_MSK,'Hz'\n", + "\n", + "BW_16MFSK = 2*M*fb;\n", + "print 'Bandwidth for 16 MFSK is ',BW_16MFSK,'Hz'\n", + "\n", + "\n", + "Min_dist_BPSK = 2*(Eb)**0.5;\n", + "print 'Minimum dismath.tance in signal space in BPSK is ',Min_dist_BPSK\n", + "\n", + "Min_dist_QPSK = 2*(Eb)**0.5;\n", + "print 'Minimum dismath.tance in signal space in QPSK is ',Min_dist_QPSK\n", + "\n", + "#The given answer in the textbook is 0.0152, which appears to be wrong. The correct answer is 0.078\n", + "Min_dist_16MPSK = (4*N*Eb*(math.sin(math.pi/16))**2)**0.5;\n", + "print 'Minimum dismath.tance in signal space in 16 MPSK is ',Min_dist_16MPSK\n", + "\n", + "Min_dist_BFSK = (2*Eb)**0.5;\n", + "print 'Minimum dismath.tance in signal space in ortho BFSK is ',Min_dist_BFSK\n", + "\n", + "Min_dist_MSK = 2*(Eb)**0.5;\n", + "print 'Minimum dismath.tance in signal space in MSK is ',Min_dist_MSK\n", + "\n", + "Min_dist_16MFSK = (2*N*Eb)**0.5;\n", + "print 'Minimum dismath.tance in signal space in ortho 16 MFSK is ',Min_dist_16MFSK\n", + "\n", + "print 'The best method that provides least noise susceptibility is 16 MFSK, then BPSK, then QPSK, then\\\n", + " comes MSK, then orthogonal BFSK and finally 16 MPSK'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth for BPSK is 16000 Hz\n", + "Bandwidth for QPSK is 8000 Hz\n", + "Bandwidth for 16 MPSK is 4000 Hz\n", + "Bandwidth for BFSK is 32000 Hz\n", + "Bandwidth for MSK is 12000.0 Hz\n", + "Bandwidth for 16 MFSK is 256000.0 Hz\n", + "Minimum dismath.tance in signal space in BPSK is 0.2\n", + "Minimum dismath.tance in signal space in QPSK is 0.2\n", + "Minimum dismath.tance in signal space in 16 MPSK is 0.0780361288065\n", + "Minimum dismath.tance in signal space in ortho BFSK is 0.141421356237\n", + "Minimum dismath.tance in signal space in MSK is 0.2\n", + "Minimum dismath.tance in signal space in ortho 16 MFSK is 0.282842712475\n", + "The best method that provides least noise susceptibility is 16 MFSK, then BPSK, then QPSK, then comes MSK, then orthogonal BFSK and finally 16 MPSK\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "#Given input signal is d\n", + "d = [0,1,1,1,0,1,0,1,1];\n", + "\n", + "################################################################################\n", + "#The answers obtained here are different from the ones mentioned in the textbook.\n", + "#The given answers have been checked rigorously and have been found out to be true.\n", + "\n", + "#When precoded\n", + "\n", + "#Signal b is initially assumed to be 0 \n", + "b = zeros(9)\n", + "b[0] = 0;\n", + "\n", + "for i in range(1,9):\n", + " b[i] = int(b[i-1])^d[i]\n", + "\n", + "\n", + "bp = zeros(9)\n", + "#Changing bit code to polar signal we get, 0 --> -1, 1 --> +1\n", + "for i in range(9): \n", + " if b[i] == 1:\n", + " bp[i] = 1;\n", + " else:\n", + " bp[i] = -1;\n", + "\n", + "Vd = zeros(9)\n", + "#Let initial value of Vd be 0\n", + "#Vd = 0;\n", + "for i in range(1,9):\n", + " Vd[i] = bp[i] + bp[i-1]\n", + "\n", + "da = zeros(9)\n", + "#Converting polar signal to bit code we get, -2 --> 0, 0 --> 1, 2 --> 0\n", + "for i in range(9):\n", + " if Vd[i] == -2:\n", + " da[i] = 0;\n", + " elif Vd[i] == 2:\n", + " da[i] = 0;\n", + " else:\n", + " da[i] = 1;\n", + "\n", + "print 'Decoded output when precoded is ',da\n", + "\n", + "################################################################################\n", + "\n", + "#When not precoded exor gate is not there\n", + "dp = zeros(9)\n", + "#Changing bit code to polar signal we get, 0 --> -1, 1 --> +1\n", + "for i in range(9): \n", + " if d[i] == 1:\n", + " dp[i] = 1;\n", + " else:\n", + " dp[i] = -1;\n", + "\n", + "for i in range(1,9):\n", + " Vd[i] = dp[i] + dp[i-1]\n", + "\n", + "\n", + "#Converting polar signal to bit code we get, -2 --> 0, 0 --> 1, 2 --> 1\n", + "for i in range(1,9):\n", + " if Vd[i] == -2:\n", + " da[i] = 0;\n", + " elif Vd[i] == 2:\n", + " da[i] = 0;\n", + " else:\n", + " da[i] = ~int(da[i-1]);\n", + "\n", + "print 'Decoded output when not precoded is ',da" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decoded output when precoded is [ 1. 1. 1. 1. 0. 1. 0. 1. 1.]\n", + "Decoded output when not precoded is [ 1. -2. 0. 0. -1. 0. -1. 0. 0.]\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given Bandwidth BW = 4 kHz\n", + "BW = 4*10**3;\n", + "\n", + "#Given data rate is fb = 6 kbps\n", + "fb = 6*10**3;\n", + "\n", + "#The roll off factor alpha is \n", + "alpha = ((2*BW)/fb) - 1;\n", + "\n", + "print 'The roll off factor is ',alpha;\n", + "\n", + "#######################################/\n", + "\n", + "#The required data rate supported at alpha = 0.25 is D\n", + "alpha = 0.25\n", + "\n", + "#The corresponding expression for D is\n", + "D = (2*BW)/(1+alpha);\n", + "\n", + "print 'The supported data rate is ',D,' kbps'\n", + "\n", + "#For full roll-off alpha = 1.0, \n", + "alpha = 1;\n", + "\n", + "fb = 2*BW/(1+alpha);\n", + "\n", + "print 'The data rate is ',fb,' kbps'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The roll off factor is 0\n", + "The supported data rate is 6400.0 kbps\n", + "The data rate is 4000 kbps\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..d3ca872d --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch7.ipynb @@ -0,0 +1,149 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7c08a155c098fa1c7cfd71cdcbdceeebc205a544edb8e62b450b0c93e6f73902" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Mathematical Representation of Noise" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#The resismath.tance R = 1000 Ohm \n", + "R = 10**3;\n", + "\n", + "#The Capacitance C = 0.5*10**-6 F\n", + "C = 0.1*10**-6;\n", + "\n", + "#Cutoff frequency for RC filter is f\n", + "f = 1./(2*math.pi*R*C)\n", + "\n", + "#White noise power spectral density n\n", + "n = 10**(-9);\n", + "\n", + "#Noise power at filter output P\n", + "P = (math.pi/2)*n*f;\n", + "\n", + "print 'Noise power at output filter is ',P,' Watt'\n", + "\n", + "#Noise power at filter output P_new when cutoff frequency is doubled\n", + "P_new = (math.pi/2)*n*2*f;\n", + "\n", + "print 'Noise power at output filter when cutoff frequency is doubled is ',P_new,' Watt'\n", + "\n", + "#Ideal Low Pass filter Bandwidth B = 1000 Hz\n", + "B = 1000.;\n", + "\n", + "print 'Output Noise Power is ',n*B,' Watt'\n", + "\n", + "print 'Output Noise Power when cut-off frequency is doubled is ',2*n*B,' Watt'\n", + "\n", + "#Proportionality consmath.tant T = 0.01\n", + "T = 0.01;\n", + "\n", + "#Output noise power O\n", + "O = n*(B**3)*(T**2)*(4./3)*(math.pi)**2;\n", + "\n", + "print 'Output Noise Power when signal is passed through a differentiator passed through ideal low pass filter ',O,' Watt'\n", + "\n", + "O_new = 8*n*(B**3)*(T**2)*(4./3)*(math.pi)**2;\n", + "\n", + "print 'Output Noise Power when signal is passed through a differentiator passed through ideal low pass\\\n", + "\\n filter and when cut-off frequency is doubled is ',O_new,' Watt'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Noise power at output filter is 2.5e-06 Watt\n", + "Noise power at output filter when cutoff frequency is doubled is 5e-06 Watt\n", + "Output Noise Power is 1e-06 Watt\n", + "Output Noise Power when cut-off frequency is doubled is 2e-06 Watt\n", + "Output Noise Power when signal is passed through a differentiator passed through ideal low pass filter 0.00131594725348 Watt\n", + "Output Noise Power when signal is passed through a differentiator passed through ideal low pass\n", + " filter and when cut-off frequency is doubled is 0.0105275780278 Watt\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad \n", + "\n", + "#Given signal strength S = 0.001 W\n", + "S = 0.001;\n", + "\n", + "#Gaussian Noise Magnitude n \n", + "n = 10**(-8);\n", + "\n", + "#Frequency of signal f = 4000 Hz\n", + "F = 4000.;\n", + "\n", + "#Noise at equalizer output N\n", + "\n", + "def f8(f): \n", + "\t return n*(1+(f**2)/F**2)\n", + "\n", + "N = quad(f8,-F,F)[0]\n", + "\n", + "\n", + "#Signal to Noise Ratio value is SNR\n", + "SNR = S/N;\n", + "\n", + "print 'SNR value is ',10*math.log10(SNR),' dB'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SNR value is 9.719712764 dB\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..65ad4a7c --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch8.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bf60fc5a45f936aca3b98b0b68286fefd5ed14936ed8b2ce79364e90ee925937" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Noise in Amplitude Modulation System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given frequency range fc = 1MHz to fc = 1.0005Mhz\n", + "#Single side message bandwidth is fM\n", + "fM = (1.0005 - 1)*10**6;\n", + "print 'Message bandwidth is ',fM,' Hz'\n", + "#The textbook contains a calculation error here. The calculated fM in the textbook is 500kHz instead of 5kHz, following which all the solutions are erroneous \n", + "\n", + "#Given input signal strength Si = 1mW\n", + "#Let output signal strength be So\n", + "#So = Si/4\n", + "Si = 10.**(-3);\n", + "So = Si/4;\n", + "print 'Signal output strength is ',So,' dB'\n", + "\n", + "#Given Power Spectral Density n = 10**-9 W/Hz\n", + "#Let output noise strength be No\n", + "n = 10.**-9;\n", + "No = (n*fM)/4;\n", + "print 'Output Noise Strength is ',No,' dB'\n", + "\n", + "#Let SNR at filter output be SNR\n", + "SNR = So / No;\n", + "print 'Output SNR is ',SNR,' dB'\n", + "\n", + "#By reduction of message signal Bandwidth the Output Noise strength changes\n", + "#Let the new output noise strength, bandwidth and SNR be be No_new, fM_new and SNR_new respectively\n", + "fM_new = 75./100*fM;\n", + "No_new = n*fM_new/4;\n", + "SNR_new = So / No_new;\n", + "\n", + "print 'Changed SNR is ',SNR_new,' dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Message bandwidth is 500.0 Hz\n", + "Signal output strength is 0.00025 dB\n", + "Output Noise Strength is 1.25e-07 dB\n", + "Output SNR is 2000.0 dB\n", + "Changed SNR is 2666.66666667 dB\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 436" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given frequency range fc - fm = 0.995MHz to fc + fm = 1.005Mhz\n", + "#Double side message bandwidth is fM\n", + "fM = (1.005 - 0.995)*10**6 / 2;\n", + "print 'Message bandwidth is ',fM,' Hz'\n", + "#The textbook contains a calculation error here.\n", + "#The calculated fM in the textbook is 500kHz instead of 5kHz,\n", + "#Following which all the solutions obtained here are erroneous.\n", + "\n", + "#Given input signal strength Si = 1mW\n", + "#Let output signal strength be So\n", + "#So = Si/2\n", + "Si = 10.**(-3);\n", + "So = Si/2;\n", + "print 'Signal output strength is ',So,' dB'\n", + "\n", + "#Given Power Spectral Density n = 10**-9 W/Hz\n", + "#Let output noise strength be No\n", + "n = 10.**-9;\n", + "No = (n*fM)/2;\n", + "print 'Output Noise Strength is ',No,' dB'\n", + "\n", + "#Let SNR at filter output be SNR\n", + "SNR = So / No;\n", + "print 'Output SNR of the DSB-SC wave is ',SNR,' dB'\n", + "\n", + "#By reduction of message signal Bandwidth the Output Noise strength changes\n", + "#Let the new output noise strength, bandwidth and SNR be be No_new, fM_new and SNR_new respectively\n", + "fM_new = 75./100*fM;\n", + "No_new = n*fM_new/4;\n", + "SNR_new = So / No_new;\n", + "print 'Changed SNR is ',SNR_new,' dB'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Message bandwidth is 5000.0 Hz\n", + "Signal output strength is 0.0005 dB\n", + "Output Noise Strength is 2.5e-06 dB\n", + "Output SNR of the DSB-SC wave is 200.0 dB\n", + "Changed SNR is 533.333333333 dB\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 446" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given bandwidth of signal is fM = 4kHZ\n", + "fM = 4.*10**3;\n", + "#Given power spectral density of white noise n = 2*10**-9 W/Hz\n", + "n = 2.*10**-9;\n", + "#Also given that minimum output SNR is 40dB\n", + "#Signal undergoes a loss of 30dB\n", + "\n", + "#For SSB:\n", + "# Required minimum output SNR = Si_min_SSB / (n*fM) = 40 dB = 10**4\n", + "Si_min_SSB = (10.**4)*n*fM;\n", + "# Required minimum signal strength at transmitter output Si_tran = Si_min * 30 dB\n", + "Si_tran_SSB = Si_min_SSB * 10**3;\n", + "print 'Required minimum SSB signal strength at transmitter output is',Si_tran_SSB,' W'\n", + "\n", + "#For DSB-SC:\n", + "# Required minimum output SNR = (Si_min_DSB/3) / (n*fM) = 40 dB = 10**4\n", + "Si_min_DSB = 3*(10**4)*n*fM;\n", + "# Required minimum signal strength at transmitter output Si_tran = Si_min * 30 dB\n", + "Si_tran_DSB = Si_min_DSB * 10**3;\n", + "print 'Required minimum DSB signal strength at transmitter output is',Si_tran_DSB,' W'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required minimum SSB signal strength at transmitter output is 80.0 W\n", + "Required minimum DSB signal strength at transmitter output is 240.0 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given bandwidth of signal is fM = 60 kHZ\n", + "fM = 60.*10**3;\n", + "\n", + "#Given power spectral density of white noise n = 2*10**-6 W/Hz\n", + "n = 2.*10**-6;\n", + "\n", + "#Given time average of square of mssg signal P = 0.1W\n", + "P = 0.1;\n", + "\n", + "#Noise power at input baseband range NM\n", + "NM = n * fM;\n", + "\n", + "#Threshold occurs at carrier power Pc = 2.9 * NM\n", + "Pc_Threshold = 2.9 * NM;\n", + "\n", + "#For carrier power Pc = 10W, output SNR\n", + "Pc = 10.;\n", + "SNRo = Pc * P / NM ;\n", + "print 'Output SNR is ',SNRo,' dB'\n", + "\n", + "#Carrier power is reduced by 100 times making the new power Pc_new\n", + "Pc_new = Pc / 100;\n", + "\n", + "#In the given solutions the NM value is 1.2W instead of 0.12W\n", + "#The corect answer is 0.0925926 instead of 0.000926\n", + "SNR_new = (4./3) * P * (Pc_new/NM)**2;\n", + "print 'Output SNR when carrier power is reduced is ',SNR_new,' dB'\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output SNR is 8.33333333333 dB\n", + "Output SNR when carrier power is reduced is 0.0925925925926 dB\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..ee82c913 --- /dev/null +++ b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/ch9.ipynb @@ -0,0 +1,255 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ae62ca990e1b3e3e0f61418988c285cf6add4a36254c38ed2292cc1a4dd064f6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Noise in Frequency Modulation Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Input signal strength Si = 0.5 W\n", + "Si = 0.5;\n", + "\n", + "#Gaussian Power Spectral Density n = 10**(-10) W/Hz\n", + "n = 10**(-10);\n", + "\n", + "#Baseband cutoff signal fM = 15 kHz\n", + "fM = 15 * 10**3;\n", + "\n", + "#Maximum frequency deviation Df = 60 kHz\n", + "Df = 60 * 10**3;\n", + "\n", + "#Average power of the modulating signal mt = 0.1 W\n", + "mt = 0.1;\n", + "\n", + "SNR = (3/(4*math.pi**2))*((Df/fM)**2)*mt**2*(Si/(n*fM));\n", + "\n", + "print 'SNR is ',10*math.log10(SNR),' dB'\n", + "\n", + "#Part b\n", + "\n", + "#Required SNR at output>40 dB = 10000\n", + "\n", + "#From (a), required Si/0.5 > 10000/4052.8 \n", + "#Or, required Si > 1.2337 W\n", + "#Since, channel loss is 20 dB ( = 100), \n", + "#Required transmitter power > 1.2337*100 = 123.37 \n", + "\n", + "print ('Required transmitter power > 1.2337 x 100 = 123.37 ');\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "SNR is 36.0776024594 dB\n", + "Required transmitter power > 1.2337 x 100 = 123.37 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Baseband cutoff signal fM = 15 kHz\n", + "fM = 15. * 10**3;\n", + "#Maximum frequency deviation Df = 60 kHz\n", + "Df = 60 * 10**3;\n", + "#Figure of Merit for FM is G_FM\n", + "G_FM = (3./2)*(Df/fM)**2;\n", + "\n", + "print 'Figure of Merit for FM system is ',G_FM\n", + "\n", + "#Ratio of Figure of Merits of FM and AM systems is R\n", + "R = G_FM/(1./3);\n", + "\n", + "print 'Ratio of Figure of Merits for FM and AM systems is ',R\n", + "\n", + "Df_new = 2*Df;\n", + "\n", + "#Figure of Merit for FM when bandwidth is doubled is G_FM_new\n", + "G_FM_new = (3./2)*(Df_new/fM)**2;\n", + "\n", + "#Ratio of Figure of Merits of FM and AM systems when bandwidth is doubled is R_new\n", + "R_new = G_FM_new/(1./3);\n", + "\n", + "print 'Ratio of Figure of Merits for FM and AM systems when bandwidth is doubled is ',R_new\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Figure of Merit for FM system is 24.0\n", + "Ratio of Figure of Merits for FM and AM systems is 72.0\n", + "Ratio of Figure of Merits for FM and AM systems when bandwidth is doubled is 288.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Resismath.tance R = 1000 Ohm\n", + "R = 10**3;\n", + "\n", + "#Capacitance C = 0.1 * 10**-6 F\n", + "C = 0.1*10**-6;\n", + "\n", + "#Break point for RC filter is f1\n", + "f1 = 1/(2*math.pi*R*C)\n", + "\n", + "#Baseband bandwidth of signal fM = 15 kHz\n", + "fM = 15 * 10**3;\n", + "\n", + "Gain = math.atan(fM/f1)/(3*(f1/fM)*(1 - (f1/fM)*math.atan(fM/f1)));\n", + "\n", + "print 'Initial Gain is ',10*math.log10(Gain),' dB'\n", + "\n", + "#New Baseband bandwidth of signal fM_new = 15 kHz\n", + "fM_new = 2*15 * 10**3;\n", + "\n", + "Gain_new = math.atan(fM_new/f1)/(3*(f1/fM_new)*(1 - (f1/fM_new)*math.atan(fM_new/f1)));\n", + "\n", + "print 'Final Gain is ',10*math.log10(Gain_new),' dB'\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial Gain is 7.36388745709 dB\n", + "Final Gain is 10.1585122235 dB\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Baseband cutoff signal fM = 15 kHz\n", + "fM = 15. * 10**3;\n", + "\n", + "#Carrier filter bandwidth is B = 60 kHz\n", + "B = 60. * 10**3;\n", + "\n", + "#RMS frequency division Df_RMS = 30 kHz\n", + "Df_RMS = 30. * 10**3;\n", + "\n", + "#Let a = Df_RMS/fM for substitution \n", + "a = Df_RMS/fM;\n", + "\n", + "#Let b = fM/B for substitution \n", + "b = fM/B;\n", + "\n", + "#Let input SNR 1 be I_SNR1 = 10 dB = 10\n", + "I_SNR1 = 10;\n", + "\n", + "#Output SNR is O_SNR1\n", + "O_SNR1 = (3*(a**2)*I_SNR1)/(1+6*((2/math.pi)**0.5)*I_SNR1*math.exp(-(b)*I_SNR1));\n", + "\n", + "print 'Output SNR is ',10*math.log10(O_SNR1),' dB'\n", + "\n", + "#Let input SNR 2 be I_SNR2 = 20 dB = 100\n", + "I_SNR2 = 100;\n", + "\n", + "#Output SNR is O_SNR2\n", + "O_SNR2 = (3*(a**2)*I_SNR2)/(1+6*((2/math.pi)**0.5)*I_SNR2*math.exp(-(b)*I_SNR2));\n", + "\n", + "#Solution given in the book is 13.5431 which is fallacious, the correct answer is 24.32444\n", + "print 'Output SNR is ',10*math.log10(O_SNR2),' dB'\n", + "\n", + "#Let input SNR 3 be I_SNR3 = 30 dB = 1000\n", + "I_SNR3 = 1000;\n", + "\n", + "#Output SNR is O_SNR3\n", + "O_SNR3 = (3*(a**2)*I_SNR3)/(1+6*((2/math.pi)**0.5)*I_SNR3*math.exp(-(b)*I_SNR3));\n", + "\n", + "print 'Output SNR is ',10*math.log10(O_SNR3),' dB'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output SNR is 13.8636417479 dB\n", + "Output SNR is 30.7918124316 dB\n", + "Output SNR is 40.7918124605 dB\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000..888115cd Binary files /dev/null and b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/TvsuT-t1.png differ 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 new file mode 100644 index 00000000..8f6971ff Binary files /dev/null and b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tVsut-T12.png differ 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 new file mode 100644 index 00000000..3e156a2a Binary files /dev/null and b/Principles_of_Communication_Systems__by_H._Taub_and_D._L._Schilling/screenshots/tvsV2t1.png differ diff --git a/Principles_of_Power_System/hardythe1/attachment/20150521.pdf b/Principles_of_Power_System/hardythe1/attachment/20150521.pdf new file mode 100755 index 00000000..a01e3318 Binary files /dev/null and b/Principles_of_Power_System/hardythe1/attachment/20150521.pdf differ 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 new file mode 100644 index 00000000..8e712245 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_1.ipynb @@ -0,0 +1,562 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 :Stream Line Flow and Heat Convection" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for crude \t\n", + "\t total heat required for crude is : Btu/hr \t388000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t387655.0\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.381317817\n", + "\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \n", + "\n", + "\t caloric temperature of cold fluid is : F \t110.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t918.009849613\n", + "\t reynolds number is : \t564.193553408\n", + "\t prandelt number is : \t72.6936774194\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1.98827586207\n", + "\t phyt is : \t1.2141948844\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t2.41415438049\n", + "\t tp is : F \t249.775040982\n", + "\t delt is : F \t139.775040982\n", + "\t total surface area is : ft**2 \t117.6\n", + "\t delt3 is : F \t5.1\n", + "\t ti is : F \t100.1\n", + "The oil now enters the second pass at given 126.9 f\n" + ] + } + ], + "source": [ + "print\"\\t example 10.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=410.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for crude \\t\"\n", + "c=0.485; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "\n", + "print\"\\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \\n\"\n", + "ti=125; # F\n", + "tc=((t1)+(ti))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.95*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=4.8*2.42; # at 110F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "c=0.485; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.0775; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu3)/k); # prandelt number\n", + "print\"\\t prandelt number is : \\t\",Pr\n", + "Hi=((1.86)*(k/D)*((Ret2*(D/L)*Pr)**(1/3))); # using eq.6.1,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "muw=1.2*2.42; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hi=(Hi)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "tp=(tc)+(((ho)/(hi+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tp is : F \\t\",tp\n", + "delt=tp-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Ai1=0.228 # internal surface per foot of length,ft\n", + "Ai=(Nt*L*Ai1/2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",round(Ai,1)\n", + "delt3=((hi*Ai*delt)/(W*c)); # delt3=ti-t1, F\n", + "print\"\\t delt3 is : F \\t\",round(delt3,1)\n", + "ti=t1+delt3; # F\n", + "print\"\\t ti is : F \\t\",round(ti,1)\n", + "print\"The oil now enters the second pass at given 126.9 f\"\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 10.2 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for kerosene \t\n", + "\t total heat required for kerosene is : Btu/hr \t400000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t399946.5\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.525612445\n", + "\t caloric temperature of cold fluid is : F \t120.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,kerosene \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t1991.27136497\n", + "\t reynolds number is : \t1547.50231792\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t10.2620689655\n", + "\t Hio is : Btu/(hr)*(ft**2)*(F) \t8.928\n", + "\t tw is : F \t249.23081817\n", + "\t phyt is : \t1.16189787585\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t10.3734242356\n", + "\t delt is : F \t129.23081817\n", + "\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \t\n", + "\t beta is : /F \t0.000449494949495\n", + "\t G is : \t1289776.29615\n", + "\t psy is : \t0.712464789946\n", + "\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \t7.39069951902\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7\n", + "\t total surface area is : ft**2 \t270.1776\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t11.5\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0079\n" + ] + } + ], + "source": [ + "print\"\\t example 10.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#gien\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=423.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for kerosene \\t\"\n", + "c=0.5; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,kerosene \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.36*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=1.75*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "Z1=331; # Z1=(L*n/D)\n", + "jH=3.1; # from fig 24\n", + "mu4=1.75; # cp and 40 API\n", + "Z2=0.24; # Z2=((k)*(c*mu4/k)**(1/3)), from fig 16\n", + "Hi=((jH)*(1/D)*(Z2)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=(Hi*(ID/OD)); #Btu/(hr)*(ft**2)*(F), from eq.6.5\n", + "print\"\\t Hio is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=1.45; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "delt=tw-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \\t\"\n", + "s=0.8;\n", + "row=50; # lb/ft**3, from fig 6\n", + "s1=0.810; # at 95F\n", + "s2=0.792; # at 145F\n", + "bita=((s1**2-s2**2)/(2*(t2-t1)*s1*s2)); # /F\n", + "print\"\\t beta is : /F \\t\",bita\n", + "G=((D**3)*(row**2)*(bita)*(delt)*(4.18*10**8)/(mu3**2));\n", + "print\"\\t G is : \\t\",G\n", + "psy=((2.25)*(1+(0.01*G**(1/3)))/(log10(Ret2)));\n", + "print\"\\t psy is : \\t\",psy\n", + "hio1=(hio*psy);\n", + "print\"\\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=2*((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(UD,1)\n", + "Rd=-0.407*((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3 pgno:211" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas oil \t\n", + "\t total heat required for gas oil is : Btu/hr \t587500.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t588101.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t120.0\n", + "\t LMTD is : F \t132.254461931\n", + "\t caloric temperature of cold fluid is : %.1f F \t117.5\n", + "\t hot fluid:shell side,steam \t\n", + "\t flow area is : ft**2 \t0.317708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19577.704918\n", + "\t reynolds number is : \t37409.6272319\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t at1 is : in**2 \t0.3979165\n", + "\t flow area is : ft**2 \t0.118822288194\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t420796.474801\n", + "\t De is : ft \t0.0485536398467\n", + "\t reynolds number is : \t1223.42517882\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t22.3464194121\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t19.4413848885\n", + "\t phyt is : \t1.18932885404\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t23.1222000104\n", + "\t tw is : F \t247.988545173\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7711867211\n", + "\t total surface area is : ft**2 \t270\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.4694016372\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0168035136331\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t9\n", + "\t delPs is : psi \t1.19559186672\n", + "\t pressure drop for inner pipe \t\n", + "\t dt is : ft \t0.0308333333333\n", + "\t Ret2 is : \t776.919639103\n", + "\t phyt is : \t1.35\n", + "\t delPt is : psi \t2.0\n", + "\t delPr is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 10.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=105.; # inlet cold fluid,F\n", + "t2=130.; # outlet cold fluid,F\n", + "w=50000.; # lb/hr\n", + "W=622.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas oil \\t\"\n", + "c=0.47; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : %.1f F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=15; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2, eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(6220/As); # mass velocity,lb/(hr)*(ft**2), calculation mistake\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0314; # at 250F,lb/(ft)*(hr), from fig.15\n", + "De=0.060; # from fig.29,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number, calculation mistake\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "ho=1500; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "d1=0.5; # in\n", + "d2=0.87; # in\n", + "at1=((3.14*(d2**2-d1**2))/4);\n", + "print\"\\t at1 is : in**2 \\t\",at1\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "De=(d2**2-d1**2)/(12*d2);\n", + "print\"\\t De is : ft \\t\",De\n", + "mu2=16.7; # at 117F,lb/(ft)*(hr)\n", + "Ret=((De)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=3.1; # from fig.24\n", + "Z=0.35; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=6.9cp and 28 API\n", + "Hi=((jH)*(1/De)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "muw=4.84; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "tw=(tc)+(((ho)/(hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A=270; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0016; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.00116; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(19600**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "dt=(d2-d1)/(12); # ft\n", + "print\"\\t dt is : ft \\t\",dt\n", + "Ret2=(dt*Gt/mu2);\n", + "print\"\\t Ret2 is : \\t\",Ret2\n", + "f=0.00066; # friction factor for reynolds number 8220, using fig.26\n", + "phyt=1.35; # fig 6\n", + "print\"\\t phyt is : \\t\",phyt\n", + "s=0.85;\n", + "delPt=((f*(420000**2)*(L)*(n))/(5.22*(10**10)*(0.0309)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t delPr is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4 pgno:217" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t delt is : F \t100\n", + "\t convection loss is : Btu/(hr)(ft**2)(F) \t0.948683298051\n", + "\t radiation loss is : Btu/(hr)(ft**2)(F) \t0.510696\n", + "\t combined loss is : Btu/(hr)(ft**2)(F) \t1.45937929805\n", + "\t total tank area is : ft**2 \t227.65\n", + "\t total heat loss : Btu/hr \t33222.7697201\n", + "\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \t\n", + "\t X is : \t75.7575757576\n", + "\t tf is : F \t156\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t23.9583333333\n", + "\t total surface is : ft**2 \t12.3811564174\n", + "\t number of pipes are : \t7.0\n" + ] + } + ], + "source": [ + "print\"\\t example 10.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "t1=100; # F\n", + "t2=0; # F\n", + "T1abs=100+460; # R\n", + "T2abs=460; #R\n", + "#solution\n", + "delt=t1-t2;\n", + "from math import ceil\n", + "print\"\\t delt is : F \\t\",delt\n", + "hc=0.3*(delt**0.25); # convection loss, Btu/(hr)*(ft**2)*( degree F)\n", + "print\"\\t convection loss is : Btu/(hr)(ft**2)(F) \\t\",hc\n", + "e=0.8; # emissivity\n", + "hr=((0.173*e*((T1abs/100)**4-(T2abs/100)**4))/(T1abs-T2abs)); # radiation rate, from 4.32, Btu/(hr)(ft**2)(F)\n", + "print\"\\t radiation loss is : Btu/(hr)(ft**2)(F) \\t\",hr\n", + "hl=hc+hr; # combined loss, Btu/(hr)(ft**2)(F)\n", + "print\"\\t combined loss is : Btu/(hr)(ft**2)(F) \\t\",hl\n", + "D=5; # ft\n", + "L=12; # ft\n", + "A1=((2*3.14*D**2)/(4))+(3.14*D*L); # total tank area\n", + "print\"\\t total tank area is : ft**2 \\t\",A1\n", + "Q=(hl*A1*delt); # total heat loss\n", + "print\"\\t total heat loss : Btu/hr \\t\",Q\n", + "print\"\\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \\t\"\n", + "d0=1.32;\n", + "X=(delt/d0);\n", + "tf=((t1+212)/2); # F\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t tf is : F \\t\",tf\n", + "hio=48; # from fig 10.4, Btu/(hr)(ft**2)(F)\n", + "ho=1500; # condensation of steam,Btu/(hr)(ft**2)(F)\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.02; # dirt factor, (hr)(ft**2)(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A2=((Q)/((UD)*(212-100))); # total surface,ft**2\n", + "print\"\\t total surface is : ft**2 \\t\",A2\n", + "A3=2.06; # area/pipe\n", + "N=(A2/A3);\n", + "print\"\\t number of pipes are : \\t\",ceil(N)\n", + "#end\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/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 new file mode 100644 index 00000000..8e712245 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_2.ipynb @@ -0,0 +1,562 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 :Stream Line Flow and Heat Convection" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for crude \t\n", + "\t total heat required for crude is : Btu/hr \t388000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t387655.0\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.381317817\n", + "\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \n", + "\n", + "\t caloric temperature of cold fluid is : F \t110.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t918.009849613\n", + "\t reynolds number is : \t564.193553408\n", + "\t prandelt number is : \t72.6936774194\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1.98827586207\n", + "\t phyt is : \t1.2141948844\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t2.41415438049\n", + "\t tp is : F \t249.775040982\n", + "\t delt is : F \t139.775040982\n", + "\t total surface area is : ft**2 \t117.6\n", + "\t delt3 is : F \t5.1\n", + "\t ti is : F \t100.1\n", + "The oil now enters the second pass at given 126.9 f\n" + ] + } + ], + "source": [ + "print\"\\t example 10.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=410.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for crude \\t\"\n", + "c=0.485; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "\n", + "print\"\\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \\n\"\n", + "ti=125; # F\n", + "tc=((t1)+(ti))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.95*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=4.8*2.42; # at 110F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "c=0.485; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.0775; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu3)/k); # prandelt number\n", + "print\"\\t prandelt number is : \\t\",Pr\n", + "Hi=((1.86)*(k/D)*((Ret2*(D/L)*Pr)**(1/3))); # using eq.6.1,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "muw=1.2*2.42; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hi=(Hi)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "tp=(tc)+(((ho)/(hi+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tp is : F \\t\",tp\n", + "delt=tp-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Ai1=0.228 # internal surface per foot of length,ft\n", + "Ai=(Nt*L*Ai1/2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",round(Ai,1)\n", + "delt3=((hi*Ai*delt)/(W*c)); # delt3=ti-t1, F\n", + "print\"\\t delt3 is : F \\t\",round(delt3,1)\n", + "ti=t1+delt3; # F\n", + "print\"\\t ti is : F \\t\",round(ti,1)\n", + "print\"The oil now enters the second pass at given 126.9 f\"\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 10.2 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for kerosene \t\n", + "\t total heat required for kerosene is : Btu/hr \t400000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t399946.5\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.525612445\n", + "\t caloric temperature of cold fluid is : F \t120.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,kerosene \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t1991.27136497\n", + "\t reynolds number is : \t1547.50231792\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t10.2620689655\n", + "\t Hio is : Btu/(hr)*(ft**2)*(F) \t8.928\n", + "\t tw is : F \t249.23081817\n", + "\t phyt is : \t1.16189787585\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t10.3734242356\n", + "\t delt is : F \t129.23081817\n", + "\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \t\n", + "\t beta is : /F \t0.000449494949495\n", + "\t G is : \t1289776.29615\n", + "\t psy is : \t0.712464789946\n", + "\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \t7.39069951902\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7\n", + "\t total surface area is : ft**2 \t270.1776\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t11.5\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0079\n" + ] + } + ], + "source": [ + "print\"\\t example 10.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#gien\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=423.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for kerosene \\t\"\n", + "c=0.5; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,kerosene \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.36*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=1.75*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "Z1=331; # Z1=(L*n/D)\n", + "jH=3.1; # from fig 24\n", + "mu4=1.75; # cp and 40 API\n", + "Z2=0.24; # Z2=((k)*(c*mu4/k)**(1/3)), from fig 16\n", + "Hi=((jH)*(1/D)*(Z2)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=(Hi*(ID/OD)); #Btu/(hr)*(ft**2)*(F), from eq.6.5\n", + "print\"\\t Hio is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=1.45; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "delt=tw-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \\t\"\n", + "s=0.8;\n", + "row=50; # lb/ft**3, from fig 6\n", + "s1=0.810; # at 95F\n", + "s2=0.792; # at 145F\n", + "bita=((s1**2-s2**2)/(2*(t2-t1)*s1*s2)); # /F\n", + "print\"\\t beta is : /F \\t\",bita\n", + "G=((D**3)*(row**2)*(bita)*(delt)*(4.18*10**8)/(mu3**2));\n", + "print\"\\t G is : \\t\",G\n", + "psy=((2.25)*(1+(0.01*G**(1/3)))/(log10(Ret2)));\n", + "print\"\\t psy is : \\t\",psy\n", + "hio1=(hio*psy);\n", + "print\"\\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=2*((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(UD,1)\n", + "Rd=-0.407*((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3 pgno:211" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas oil \t\n", + "\t total heat required for gas oil is : Btu/hr \t587500.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t588101.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t120.0\n", + "\t LMTD is : F \t132.254461931\n", + "\t caloric temperature of cold fluid is : %.1f F \t117.5\n", + "\t hot fluid:shell side,steam \t\n", + "\t flow area is : ft**2 \t0.317708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19577.704918\n", + "\t reynolds number is : \t37409.6272319\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t at1 is : in**2 \t0.3979165\n", + "\t flow area is : ft**2 \t0.118822288194\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t420796.474801\n", + "\t De is : ft \t0.0485536398467\n", + "\t reynolds number is : \t1223.42517882\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t22.3464194121\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t19.4413848885\n", + "\t phyt is : \t1.18932885404\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t23.1222000104\n", + "\t tw is : F \t247.988545173\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7711867211\n", + "\t total surface area is : ft**2 \t270\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.4694016372\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0168035136331\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t9\n", + "\t delPs is : psi \t1.19559186672\n", + "\t pressure drop for inner pipe \t\n", + "\t dt is : ft \t0.0308333333333\n", + "\t Ret2 is : \t776.919639103\n", + "\t phyt is : \t1.35\n", + "\t delPt is : psi \t2.0\n", + "\t delPr is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 10.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=105.; # inlet cold fluid,F\n", + "t2=130.; # outlet cold fluid,F\n", + "w=50000.; # lb/hr\n", + "W=622.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas oil \\t\"\n", + "c=0.47; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : %.1f F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=15; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2, eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(6220/As); # mass velocity,lb/(hr)*(ft**2), calculation mistake\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0314; # at 250F,lb/(ft)*(hr), from fig.15\n", + "De=0.060; # from fig.29,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number, calculation mistake\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "ho=1500; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "d1=0.5; # in\n", + "d2=0.87; # in\n", + "at1=((3.14*(d2**2-d1**2))/4);\n", + "print\"\\t at1 is : in**2 \\t\",at1\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "De=(d2**2-d1**2)/(12*d2);\n", + "print\"\\t De is : ft \\t\",De\n", + "mu2=16.7; # at 117F,lb/(ft)*(hr)\n", + "Ret=((De)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=3.1; # from fig.24\n", + "Z=0.35; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=6.9cp and 28 API\n", + "Hi=((jH)*(1/De)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "muw=4.84; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "tw=(tc)+(((ho)/(hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A=270; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0016; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.00116; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(19600**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "dt=(d2-d1)/(12); # ft\n", + "print\"\\t dt is : ft \\t\",dt\n", + "Ret2=(dt*Gt/mu2);\n", + "print\"\\t Ret2 is : \\t\",Ret2\n", + "f=0.00066; # friction factor for reynolds number 8220, using fig.26\n", + "phyt=1.35; # fig 6\n", + "print\"\\t phyt is : \\t\",phyt\n", + "s=0.85;\n", + "delPt=((f*(420000**2)*(L)*(n))/(5.22*(10**10)*(0.0309)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t delPr is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4 pgno:217" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t delt is : F \t100\n", + "\t convection loss is : Btu/(hr)(ft**2)(F) \t0.948683298051\n", + "\t radiation loss is : Btu/(hr)(ft**2)(F) \t0.510696\n", + "\t combined loss is : Btu/(hr)(ft**2)(F) \t1.45937929805\n", + "\t total tank area is : ft**2 \t227.65\n", + "\t total heat loss : Btu/hr \t33222.7697201\n", + "\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \t\n", + "\t X is : \t75.7575757576\n", + "\t tf is : F \t156\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t23.9583333333\n", + "\t total surface is : ft**2 \t12.3811564174\n", + "\t number of pipes are : \t7.0\n" + ] + } + ], + "source": [ + "print\"\\t example 10.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "t1=100; # F\n", + "t2=0; # F\n", + "T1abs=100+460; # R\n", + "T2abs=460; #R\n", + "#solution\n", + "delt=t1-t2;\n", + "from math import ceil\n", + "print\"\\t delt is : F \\t\",delt\n", + "hc=0.3*(delt**0.25); # convection loss, Btu/(hr)*(ft**2)*( degree F)\n", + "print\"\\t convection loss is : Btu/(hr)(ft**2)(F) \\t\",hc\n", + "e=0.8; # emissivity\n", + "hr=((0.173*e*((T1abs/100)**4-(T2abs/100)**4))/(T1abs-T2abs)); # radiation rate, from 4.32, Btu/(hr)(ft**2)(F)\n", + "print\"\\t radiation loss is : Btu/(hr)(ft**2)(F) \\t\",hr\n", + "hl=hc+hr; # combined loss, Btu/(hr)(ft**2)(F)\n", + "print\"\\t combined loss is : Btu/(hr)(ft**2)(F) \\t\",hl\n", + "D=5; # ft\n", + "L=12; # ft\n", + "A1=((2*3.14*D**2)/(4))+(3.14*D*L); # total tank area\n", + "print\"\\t total tank area is : ft**2 \\t\",A1\n", + "Q=(hl*A1*delt); # total heat loss\n", + "print\"\\t total heat loss : Btu/hr \\t\",Q\n", + "print\"\\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \\t\"\n", + "d0=1.32;\n", + "X=(delt/d0);\n", + "tf=((t1+212)/2); # F\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t tf is : F \\t\",tf\n", + "hio=48; # from fig 10.4, Btu/(hr)(ft**2)(F)\n", + "ho=1500; # condensation of steam,Btu/(hr)(ft**2)(F)\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.02; # dirt factor, (hr)(ft**2)(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A2=((Q)/((UD)*(212-100))); # total surface,ft**2\n", + "print\"\\t total surface is : ft**2 \\t\",A2\n", + "A3=2.06; # area/pipe\n", + "N=(A2/A3);\n", + "print\"\\t number of pipes are : \\t\",ceil(N)\n", + "#end\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/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 new file mode 100644 index 00000000..8e712245 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_3.ipynb @@ -0,0 +1,562 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 :Stream Line Flow and Heat Convection" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for crude \t\n", + "\t total heat required for crude is : Btu/hr \t388000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t387655.0\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.381317817\n", + "\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \n", + "\n", + "\t caloric temperature of cold fluid is : F \t110.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t918.009849613\n", + "\t reynolds number is : \t564.193553408\n", + "\t prandelt number is : \t72.6936774194\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1.98827586207\n", + "\t phyt is : \t1.2141948844\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t2.41415438049\n", + "\t tp is : F \t249.775040982\n", + "\t delt is : F \t139.775040982\n", + "\t total surface area is : ft**2 \t117.6\n", + "\t delt3 is : F \t5.1\n", + "\t ti is : F \t100.1\n", + "The oil now enters the second pass at given 126.9 f\n" + ] + } + ], + "source": [ + "print\"\\t example 10.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=410.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for crude \\t\"\n", + "c=0.485; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "\n", + "print\"\\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \\n\"\n", + "ti=125; # F\n", + "tc=((t1)+(ti))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.95*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=4.8*2.42; # at 110F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "c=0.485; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.0775; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu3)/k); # prandelt number\n", + "print\"\\t prandelt number is : \\t\",Pr\n", + "Hi=((1.86)*(k/D)*((Ret2*(D/L)*Pr)**(1/3))); # using eq.6.1,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "muw=1.2*2.42; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hi=(Hi)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "tp=(tc)+(((ho)/(hi+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tp is : F \\t\",tp\n", + "delt=tp-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Ai1=0.228 # internal surface per foot of length,ft\n", + "Ai=(Nt*L*Ai1/2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",round(Ai,1)\n", + "delt3=((hi*Ai*delt)/(W*c)); # delt3=ti-t1, F\n", + "print\"\\t delt3 is : F \\t\",round(delt3,1)\n", + "ti=t1+delt3; # F\n", + "print\"\\t ti is : F \\t\",round(ti,1)\n", + "print\"The oil now enters the second pass at given 126.9 f\"\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 10.2 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for kerosene \t\n", + "\t total heat required for kerosene is : Btu/hr \t400000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t399946.5\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.525612445\n", + "\t caloric temperature of cold fluid is : F \t120.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,kerosene \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t1991.27136497\n", + "\t reynolds number is : \t1547.50231792\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t10.2620689655\n", + "\t Hio is : Btu/(hr)*(ft**2)*(F) \t8.928\n", + "\t tw is : F \t249.23081817\n", + "\t phyt is : \t1.16189787585\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t10.3734242356\n", + "\t delt is : F \t129.23081817\n", + "\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \t\n", + "\t beta is : /F \t0.000449494949495\n", + "\t G is : \t1289776.29615\n", + "\t psy is : \t0.712464789946\n", + "\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \t7.39069951902\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7\n", + "\t total surface area is : ft**2 \t270.1776\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t11.5\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0079\n" + ] + } + ], + "source": [ + "print\"\\t example 10.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#gien\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=423.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for kerosene \\t\"\n", + "c=0.5; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,kerosene \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.36*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=1.75*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "Z1=331; # Z1=(L*n/D)\n", + "jH=3.1; # from fig 24\n", + "mu4=1.75; # cp and 40 API\n", + "Z2=0.24; # Z2=((k)*(c*mu4/k)**(1/3)), from fig 16\n", + "Hi=((jH)*(1/D)*(Z2)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=(Hi*(ID/OD)); #Btu/(hr)*(ft**2)*(F), from eq.6.5\n", + "print\"\\t Hio is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=1.45; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "delt=tw-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \\t\"\n", + "s=0.8;\n", + "row=50; # lb/ft**3, from fig 6\n", + "s1=0.810; # at 95F\n", + "s2=0.792; # at 145F\n", + "bita=((s1**2-s2**2)/(2*(t2-t1)*s1*s2)); # /F\n", + "print\"\\t beta is : /F \\t\",bita\n", + "G=((D**3)*(row**2)*(bita)*(delt)*(4.18*10**8)/(mu3**2));\n", + "print\"\\t G is : \\t\",G\n", + "psy=((2.25)*(1+(0.01*G**(1/3)))/(log10(Ret2)));\n", + "print\"\\t psy is : \\t\",psy\n", + "hio1=(hio*psy);\n", + "print\"\\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=2*((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(UD,1)\n", + "Rd=-0.407*((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3 pgno:211" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas oil \t\n", + "\t total heat required for gas oil is : Btu/hr \t587500.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t588101.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t120.0\n", + "\t LMTD is : F \t132.254461931\n", + "\t caloric temperature of cold fluid is : %.1f F \t117.5\n", + "\t hot fluid:shell side,steam \t\n", + "\t flow area is : ft**2 \t0.317708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19577.704918\n", + "\t reynolds number is : \t37409.6272319\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t at1 is : in**2 \t0.3979165\n", + "\t flow area is : ft**2 \t0.118822288194\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t420796.474801\n", + "\t De is : ft \t0.0485536398467\n", + "\t reynolds number is : \t1223.42517882\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t22.3464194121\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t19.4413848885\n", + "\t phyt is : \t1.18932885404\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t23.1222000104\n", + "\t tw is : F \t247.988545173\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7711867211\n", + "\t total surface area is : ft**2 \t270\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.4694016372\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0168035136331\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t9\n", + "\t delPs is : psi \t1.19559186672\n", + "\t pressure drop for inner pipe \t\n", + "\t dt is : ft \t0.0308333333333\n", + "\t Ret2 is : \t776.919639103\n", + "\t phyt is : \t1.35\n", + "\t delPt is : psi \t2.0\n", + "\t delPr is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 10.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=105.; # inlet cold fluid,F\n", + "t2=130.; # outlet cold fluid,F\n", + "w=50000.; # lb/hr\n", + "W=622.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas oil \\t\"\n", + "c=0.47; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : %.1f F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=15; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2, eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(6220/As); # mass velocity,lb/(hr)*(ft**2), calculation mistake\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0314; # at 250F,lb/(ft)*(hr), from fig.15\n", + "De=0.060; # from fig.29,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number, calculation mistake\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "ho=1500; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "d1=0.5; # in\n", + "d2=0.87; # in\n", + "at1=((3.14*(d2**2-d1**2))/4);\n", + "print\"\\t at1 is : in**2 \\t\",at1\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "De=(d2**2-d1**2)/(12*d2);\n", + "print\"\\t De is : ft \\t\",De\n", + "mu2=16.7; # at 117F,lb/(ft)*(hr)\n", + "Ret=((De)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=3.1; # from fig.24\n", + "Z=0.35; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=6.9cp and 28 API\n", + "Hi=((jH)*(1/De)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "muw=4.84; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "tw=(tc)+(((ho)/(hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A=270; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0016; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.00116; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(19600**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "dt=(d2-d1)/(12); # ft\n", + "print\"\\t dt is : ft \\t\",dt\n", + "Ret2=(dt*Gt/mu2);\n", + "print\"\\t Ret2 is : \\t\",Ret2\n", + "f=0.00066; # friction factor for reynolds number 8220, using fig.26\n", + "phyt=1.35; # fig 6\n", + "print\"\\t phyt is : \\t\",phyt\n", + "s=0.85;\n", + "delPt=((f*(420000**2)*(L)*(n))/(5.22*(10**10)*(0.0309)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t delPr is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4 pgno:217" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t delt is : F \t100\n", + "\t convection loss is : Btu/(hr)(ft**2)(F) \t0.948683298051\n", + "\t radiation loss is : Btu/(hr)(ft**2)(F) \t0.510696\n", + "\t combined loss is : Btu/(hr)(ft**2)(F) \t1.45937929805\n", + "\t total tank area is : ft**2 \t227.65\n", + "\t total heat loss : Btu/hr \t33222.7697201\n", + "\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \t\n", + "\t X is : \t75.7575757576\n", + "\t tf is : F \t156\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t23.9583333333\n", + "\t total surface is : ft**2 \t12.3811564174\n", + "\t number of pipes are : \t7.0\n" + ] + } + ], + "source": [ + "print\"\\t example 10.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "t1=100; # F\n", + "t2=0; # F\n", + "T1abs=100+460; # R\n", + "T2abs=460; #R\n", + "#solution\n", + "delt=t1-t2;\n", + "from math import ceil\n", + "print\"\\t delt is : F \\t\",delt\n", + "hc=0.3*(delt**0.25); # convection loss, Btu/(hr)*(ft**2)*( degree F)\n", + "print\"\\t convection loss is : Btu/(hr)(ft**2)(F) \\t\",hc\n", + "e=0.8; # emissivity\n", + "hr=((0.173*e*((T1abs/100)**4-(T2abs/100)**4))/(T1abs-T2abs)); # radiation rate, from 4.32, Btu/(hr)(ft**2)(F)\n", + "print\"\\t radiation loss is : Btu/(hr)(ft**2)(F) \\t\",hr\n", + "hl=hc+hr; # combined loss, Btu/(hr)(ft**2)(F)\n", + "print\"\\t combined loss is : Btu/(hr)(ft**2)(F) \\t\",hl\n", + "D=5; # ft\n", + "L=12; # ft\n", + "A1=((2*3.14*D**2)/(4))+(3.14*D*L); # total tank area\n", + "print\"\\t total tank area is : ft**2 \\t\",A1\n", + "Q=(hl*A1*delt); # total heat loss\n", + "print\"\\t total heat loss : Btu/hr \\t\",Q\n", + "print\"\\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \\t\"\n", + "d0=1.32;\n", + "X=(delt/d0);\n", + "tf=((t1+212)/2); # F\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t tf is : F \\t\",tf\n", + "hio=48; # from fig 10.4, Btu/(hr)(ft**2)(F)\n", + "ho=1500; # condensation of steam,Btu/(hr)(ft**2)(F)\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.02; # dirt factor, (hr)(ft**2)(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A2=((Q)/((UD)*(212-100))); # total surface,ft**2\n", + "print\"\\t total surface is : ft**2 \\t\",A2\n", + "A3=2.06; # area/pipe\n", + "N=(A2/A3);\n", + "print\"\\t number of pipes are : \\t\",ceil(N)\n", + "#end\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/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 new file mode 100644 index 00000000..8e712245 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_10_Stream_Line_Flow_and_Heat_Convection_4.ipynb @@ -0,0 +1,562 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 :Stream Line Flow and Heat Convection" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for crude \t\n", + "\t total heat required for crude is : Btu/hr \t388000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t387655.0\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.381317817\n", + "\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \n", + "\n", + "\t caloric temperature of cold fluid is : F \t110.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t918.009849613\n", + "\t reynolds number is : \t564.193553408\n", + "\t prandelt number is : \t72.6936774194\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1.98827586207\n", + "\t phyt is : \t1.2141948844\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t2.41415438049\n", + "\t tp is : F \t249.775040982\n", + "\t delt is : F \t139.775040982\n", + "\t total surface area is : ft**2 \t117.6\n", + "\t delt3 is : F \t5.1\n", + "\t ti is : F \t100.1\n", + "The oil now enters the second pass at given 126.9 f\n" + ] + } + ], + "source": [ + "print\"\\t example 10.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=410.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for crude \\t\"\n", + "c=0.485; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "\n", + "print\"\\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \\n\"\n", + "ti=125; # F\n", + "tc=((t1)+(ti))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.95*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=4.8*2.42; # at 110F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "c=0.485; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.0775; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu3)/k); # prandelt number\n", + "print\"\\t prandelt number is : \\t\",Pr\n", + "Hi=((1.86)*(k/D)*((Ret2*(D/L)*Pr)**(1/3))); # using eq.6.1,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "muw=1.2*2.42; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hi=(Hi)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "tp=(tc)+(((ho)/(hi+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tp is : F \\t\",tp\n", + "delt=tp-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Ai1=0.228 # internal surface per foot of length,ft\n", + "Ai=(Nt*L*Ai1/2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",round(Ai,1)\n", + "delt3=((hi*Ai*delt)/(W*c)); # delt3=ti-t1, F\n", + "print\"\\t delt3 is : F \\t\",round(delt3,1)\n", + "ti=t1+delt3; # F\n", + "print\"\\t ti is : F \\t\",round(ti,1)\n", + "print\"The oil now enters the second pass at given 126.9 f\"\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 10.2 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for kerosene \t\n", + "\t total heat required for kerosene is : Btu/hr \t400000.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t399946.5\n", + "\t delt1 is : F \t155.0\n", + "\t delt2 is : F \t105.0\n", + "\t LMTD is : F \t128.525612445\n", + "\t caloric temperature of cold fluid is : F \t120.0\n", + "\t hot fluid:shell side,steam \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,kerosene \t\n", + "\t flow area is : ft**2 \t0.177375\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t90395.480226\n", + "\t reynolds number is : \t1991.27136497\n", + "\t reynolds number is : \t1547.50231792\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t10.2620689655\n", + "\t Hio is : Btu/(hr)*(ft**2)*(F) \t8.928\n", + "\t tw is : F \t249.23081817\n", + "\t phyt is : \t1.16189787585\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t10.3734242356\n", + "\t delt is : F \t129.23081817\n", + "\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \t\n", + "\t beta is : /F \t0.000449494949495\n", + "\t G is : \t1289776.29615\n", + "\t psy is : \t0.712464789946\n", + "\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \t7.39069951902\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7\n", + "\t total surface area is : ft**2 \t270.1776\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t11.5\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0079\n" + ] + } + ], + "source": [ + "print\"\\t example 10.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#gien\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=95.; # inlet cold fluid,F\n", + "t2=145.; # outlet cold fluid,F\n", + "W=16000.; # lb/hr\n", + "w=423.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for kerosene \\t\"\n", + "c=0.5; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,kerosene \\t\"\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.594; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.36*2.42; # at 145F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret1=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret1\n", + "mu3=1.75*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.87/12); # ft\n", + "Ret2=((D)*(Gt)/mu3); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret2\n", + "Z1=331; # Z1=(L*n/D)\n", + "jH=3.1; # from fig 24\n", + "mu4=1.75; # cp and 40 API\n", + "Z2=0.24; # Z2=((k)*(c*mu4/k)**(1/3)), from fig 16\n", + "Hi=((jH)*(1/D)*(Z2)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=(Hi*(ID/OD)); #Btu/(hr)*(ft**2)*(F), from eq.6.5\n", + "print\"\\t Hio is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=1.45; # lb/(ft)*(hr),at 249F from fig.14\n", + "phyt=(mu3/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "delt=tw-tc; #F\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \\t\"\n", + "s=0.8;\n", + "row=50; # lb/ft**3, from fig 6\n", + "s1=0.810; # at 95F\n", + "s2=0.792; # at 145F\n", + "bita=((s1**2-s2**2)/(2*(t2-t1)*s1*s2)); # /F\n", + "print\"\\t beta is : /F \\t\",bita\n", + "G=((D**3)*(row**2)*(bita)*(delt)*(4.18*10**8)/(mu3**2));\n", + "print\"\\t G is : \\t\",G\n", + "psy=((2.25)*(1+(0.01*G**(1/3)))/(log10(Ret2)));\n", + "print\"\\t psy is : \\t\",psy\n", + "hio1=(hio*psy);\n", + "print\"\\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=2*((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(UD,1)\n", + "Rd=-0.407*((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3 pgno:211" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas oil \t\n", + "\t total heat required for gas oil is : Btu/hr \t587500.0\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t588101.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t120.0\n", + "\t LMTD is : F \t132.254461931\n", + "\t caloric temperature of cold fluid is : %.1f F \t117.5\n", + "\t hot fluid:shell side,steam \t\n", + "\t flow area is : ft**2 \t0.317708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19577.704918\n", + "\t reynolds number is : \t37409.6272319\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t at1 is : in**2 \t0.3979165\n", + "\t flow area is : ft**2 \t0.118822288194\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t420796.474801\n", + "\t De is : ft \t0.0485536398467\n", + "\t reynolds number is : \t1223.42517882\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t22.3464194121\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t19.4413848885\n", + "\t phyt is : \t1.18932885404\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t23.1222000104\n", + "\t tw is : F \t247.988545173\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7711867211\n", + "\t total surface area is : ft**2 \t270\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.4694016372\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0168035136331\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t9\n", + "\t delPs is : psi \t1.19559186672\n", + "\t pressure drop for inner pipe \t\n", + "\t dt is : ft \t0.0308333333333\n", + "\t Ret2 is : \t776.919639103\n", + "\t phyt is : \t1.35\n", + "\t delPt is : psi \t2.0\n", + "\t delPr is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 10.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=250.; # outlet hot fluid,F\n", + "t1=105.; # inlet cold fluid,F\n", + "t2=130.; # outlet cold fluid,F\n", + "w=50000.; # lb/hr\n", + "W=622.; # lb/hr\n", + "#solution\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas oil \\t\"\n", + "c=0.47; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=945.5; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : %.1f F \\t\",tc\n", + "print\"\\t hot fluid:shell side,steam \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=15; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2, eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(6220/As); # mass velocity,lb/(hr)*(ft**2), calculation mistake\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0314; # at 250F,lb/(ft)*(hr), from fig.15\n", + "De=0.060; # from fig.29,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number, calculation mistake\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "ho=1500; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "d1=0.5; # in\n", + "d2=0.87; # in\n", + "at1=((3.14*(d2**2-d1**2))/4);\n", + "print\"\\t at1 is : in**2 \\t\",at1\n", + "Nt=86;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "De=(d2**2-d1**2)/(12*d2);\n", + "print\"\\t De is : ft \\t\",De\n", + "mu2=16.7; # at 117F,lb/(ft)*(hr)\n", + "Ret=((De)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=3.1; # from fig.24\n", + "Z=0.35; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=6.9cp and 28 API\n", + "Hi=((jH)*(1/De)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.87; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "muw=4.84; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \\t\",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "tw=(tc)+(((ho)/(hio+ho))*(T1-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A=270; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0016; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.00116; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(19600**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "dt=(d2-d1)/(12); # ft\n", + "print\"\\t dt is : ft \\t\",dt\n", + "Ret2=(dt*Gt/mu2);\n", + "print\"\\t Ret2 is : \\t\",Ret2\n", + "f=0.00066; # friction factor for reynolds number 8220, using fig.26\n", + "phyt=1.35; # fig 6\n", + "print\"\\t phyt is : \\t\",phyt\n", + "s=0.85;\n", + "delPt=((f*(420000**2)*(L)*(n))/(5.22*(10**10)*(0.0309)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t delPr is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4 pgno:217" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 10.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t delt is : F \t100\n", + "\t convection loss is : Btu/(hr)(ft**2)(F) \t0.948683298051\n", + "\t radiation loss is : Btu/(hr)(ft**2)(F) \t0.510696\n", + "\t combined loss is : Btu/(hr)(ft**2)(F) \t1.45937929805\n", + "\t total tank area is : ft**2 \t227.65\n", + "\t total heat loss : Btu/hr \t33222.7697201\n", + "\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \t\n", + "\t X is : \t75.7575757576\n", + "\t tf is : F \t156\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t23.9583333333\n", + "\t total surface is : ft**2 \t12.3811564174\n", + "\t number of pipes are : \t7.0\n" + ] + } + ], + "source": [ + "print\"\\t example 10.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "t1=100; # F\n", + "t2=0; # F\n", + "T1abs=100+460; # R\n", + "T2abs=460; #R\n", + "#solution\n", + "delt=t1-t2;\n", + "from math import ceil\n", + "print\"\\t delt is : F \\t\",delt\n", + "hc=0.3*(delt**0.25); # convection loss, Btu/(hr)*(ft**2)*( degree F)\n", + "print\"\\t convection loss is : Btu/(hr)(ft**2)(F) \\t\",hc\n", + "e=0.8; # emissivity\n", + "hr=((0.173*e*((T1abs/100)**4-(T2abs/100)**4))/(T1abs-T2abs)); # radiation rate, from 4.32, Btu/(hr)(ft**2)(F)\n", + "print\"\\t radiation loss is : Btu/(hr)(ft**2)(F) \\t\",hr\n", + "hl=hc+hr; # combined loss, Btu/(hr)(ft**2)(F)\n", + "print\"\\t combined loss is : Btu/(hr)(ft**2)(F) \\t\",hl\n", + "D=5; # ft\n", + "L=12; # ft\n", + "A1=((2*3.14*D**2)/(4))+(3.14*D*L); # total tank area\n", + "print\"\\t total tank area is : ft**2 \\t\",A1\n", + "Q=(hl*A1*delt); # total heat loss\n", + "print\"\\t total heat loss : Btu/hr \\t\",Q\n", + "print\"\\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \\t\"\n", + "d0=1.32;\n", + "X=(delt/d0);\n", + "tf=((t1+212)/2); # F\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t tf is : F \\t\",tf\n", + "hio=48; # from fig 10.4, Btu/(hr)(ft**2)(F)\n", + "ho=1500; # condensation of steam,Btu/(hr)(ft**2)(F)\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.02; # dirt factor, (hr)(ft**2)(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A2=((Q)/((UD)*(212-100))); # total surface,ft**2\n", + "print\"\\t total surface is : ft**2 \\t\",A2\n", + "A3=2.06; # area/pipe\n", + "N=(A2/A3);\n", + "print\"\\t number of pipes are : \\t\",ceil(N)\n", + "#end\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/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 new file mode 100644 index 00000000..c318815e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions.ipynb @@ -0,0 +1,1053 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Calculations for Process Heat Conditions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example11.1 pgno:231" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for straw oil \t\n", + "\t total heat required for straw oil is : Btu/hr \t1728400.0\n", + "\t for naphtha \t\n", + "\t total heat required for naphtha is : Btu/hr \t1730400.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t110.0\n", + "\t LMTD is F \t69.2750233163\n", + "\t R is : \t3.33333333333\n", + "\t S is : \t0.214285714286\n", + "\t FT is 0.885 \t\n", + "\t delt is : F \t61.3083956349\n", + "\t ratio of two local temperature difference is : \t0.363636363636\n", + "\t caloric temperature of hot fluid is : F \t280.5\n", + "\t caloric temperature of cold fluid is : F \t212.15\n", + "\t A1 is : ft**2 \t403.207419539\n", + "\t number of tubes are :\t128.37729863\n", + "\t total surface area is : ft**2 \t389.4592\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.4710556785\n", + "\t hot fluid:shell side,straw oil \t\n", + "\t flow area is : ft**2 \t0.0926649305556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t321588.758782\n", + "\t reynolds number is : \t7013.52894497\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t cold fluid:inner tube side,naphtha \t\n", + "\t flow area is : ft**2 \t0.130027777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t792138.431959\n", + "\t reynolds number is : \t31262.2572002\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t329.477756286\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t54.8571428571\n", + "\t delPs is : psi \t5.1651098751\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.06675311157\n", + "\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \t88.0700339124\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00244401237634\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor \t\n", + "\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t74.8\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t54.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t4.7\n", + "\t delPt is : psi \t2.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=340.; # inlet hot fluid,F\n", + "T2=240.; # outlet hot fluid,F\n", + "t1=200.; # inlet cold fluid,F\n", + "t2=230.; # outlet cold fluid,F\n", + "W=29800; # lb/hr\n", + "w=103000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for straw oil \\t\"\n", + "c=0.58; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for straw oil is : Btu/hr \\t\",Q\n", + "print\"\\t for naphtha \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt1=40.;\n", + "delt2=T1-t2; # F\n", + "delt2=110.\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.885 \\t\" # from fig 18\n", + "delt=(0.885*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "L=16;\n", + "Fc=0.405; # from fig.17\n", + "Kc=0.23; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are :\\t\",N1\n", + "N2=124; # assuming two tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,straw oil \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=3.5; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.63; # at 280.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46; # from fig.28\n", + "Z=0.224; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.5cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,naphtha \\t\"\n", + "Nt=124;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.31; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=102; # from fig.24\n", + "Z=0.167; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.54cp and 48 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00225; # friction factor for reynolds number 7000, using fig.29\n", + "s=0.76; # for reynolds number 7000,using fig.6\n", + "Ds=15.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 31300, using fig.26\n", + "s=0.72;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor \\t\"\n", + "print\"\\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \\t\"\n", + "UD1=60; # assumption for 2 tube passes,3.5 baffle spacing and 17.25in ID\n", + "UC1=74.8;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=54.2;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.005; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=4.7;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=2.1;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2 pgno:235" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lean oil \t\n", + "\t total heat required for lean oil is : Btu/hr \t8984203.2\n", + "\t for rich oil \t\n", + "\t total heat required for rich oil is : Btu/hr \t8924995.95\n", + "\t Q is : V \t8954599.575\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t55.0\n", + "\t LMTD is : F \t57.5283364148\n", + "\t R is : \t0.974358974359\n", + "\t S is : \t0.78\n", + "\t FT is 0.875 \t\n", + "\t delt is : F \t50.337294363\n", + "\t ratio of two local temperature difference is : \t1.09090909091\n", + "\t caloric temperature of hot fluid is : F \t251.2\n", + "\t caloric temperature of cold fluid is : \t193.6\n", + "\t A1 is : ft**2 \t3557.83904889\n", + "\t number of tubes are : \t566.390577064\n", + "\t total surface area is : ft**2 \t3643.328\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t48.8267738849\n", + "\t hot fluid:inner tube side,lean oil \t\n", + "\t flow area is : ft**2 \t0.202731481481\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t416501.667047\n", + "\t reynolds number is : \t10109.4536086\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t130.609284333\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t cold fluid:shell side,rich oil \t\n", + "\t flow area is : ft**2 \t0.322916666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t267428.129032\n", + "\t reynolds number is : \t6721.07731695\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.32759598913\n", + "\t delPr is : psi \t1.4961038961\n", + "\t delPT is : psi \t5.82369988524\n", + "\t allowable delPT is 10 psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t64\n", + "\t delPs is : psi \t6.44657740525\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.073599733\n", + "\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \t0.00295933089476\n", + "\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \t\n", + "\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t52.3\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0047\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n", + "\t delPs is : psi \t4.4\n", + "\t delPt is : psi \t7.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\" \n", + "T1=350.; # inlet hot fluid,F\n", + "T2=160.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=295.; # outlet cold fluid,F\n", + "W=84438; # lb/hr\n", + "w=86357; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lean oil \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Qh=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lean oil is : Btu/hr \\t\",Qh\n", + "print\"\\t for rich oil \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for rich oil is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.875 \\t\"# for 4-8 exchanger,from fig 21\n", + "delt=(0.875*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.48; # from fig.17\n", + "Kc=0.32; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=50; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1*2)); # 2-4 exchanger in series\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=580; # assuming six tube passes,31in ID, from table 9\n", + "A2=(N2*16*a1*2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,lean oil \\t\"\n", + "Nt=580;\n", + "n=6; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.13; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=36.5; # from fig.24\n", + "Z=0.185; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.88cp and 35 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,rich oil \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=12; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT))/(2); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.15; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=45; # from fig.28\n", + "Z=0.213; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.3cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00027; # friction factor for reynolds number 10100, using fig.26\n", + "s=0.77;\n", + "delPt=((2*f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.024; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*2*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0023; # friction factor for reynolds number 6720, using fig.29\n", + "s=0.79; # for reynolds number 6720,using fig.6\n", + "Ds=31/12; # ft\n", + "De=0.0792;\n", + "N=(4*12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \\t\"\n", + "print\"\\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=52.3;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=42;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0047; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.004; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=4.4;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for caustic \t\n", + "\t total heat required for caustic is : Btu/hr \t6160000.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t6160000.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t70.0\n", + "\t LMTD is : F \t53.6684619193\n", + "\t R is : \t1.75\n", + "\t S is : \t0.363636363636\n", + "\t FT is 0.815 \t\n", + "\t delt is : F \t43.7397964643\n", + "\t caloric temperature of hot fluid is : F \t155.0\n", + "\t caloric temperature of cold fluid is : \t100.0\n", + "\t A1 is : ft**2 \t563.331382215\n", + "\t number of tubes are : \t134.485146633\n", + "\t total surface area is : ft**2 \t586.432\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t240.152047558\n", + "\t hot fluid:shell side,caustic \t\n", + "\t flow area is : ft**2 \t0.187152777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t534322.820037\n", + "\t reynolds number is : \t17423.5702186\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.132708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1160439.56044\n", + "\t V is fps \t5.15750915751\n", + "\t reynolds number is : \t46350.8904888\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1165.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t972.1104\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : %.0f \t28\n", + "\t delPs is : psi \t6.97705175383\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.27604456957\n", + "\t delPr is : psi \t2.88\n", + "\t delPT is : psi \t7.15604456957\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t413.224149078\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00174403453004\n", + "\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \t\n", + "\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t39\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t200\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0024\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t9.8\n", + "\t delPt is : psi \t4.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=190.; # inlet hot fluid,F\n", + "T2=120.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=154000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for caustic \\t\"\n", + "c=0.88; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for caustic is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.815 \\t\" # for 4-8 exchanger,from fig 21\n", + "delt=(0.815*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=250; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=140; # assuming four tube passes,19.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,caustic \\t\"\n", + "ID=19.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.84; # at 155F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=75; # from fig.28\n", + "Z=0.575; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1; # low viscosity\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=140;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=Gt/(3600*62.5);\n", + "print\"\\t V is fps \\t\",V\n", + "mu2=1.74; # at 100F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1240*0.94; # from fig 25\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.834; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0019; # friction factor for reynolds number 17400, using fig.29\n", + "s=1.115; # for reynolds number 17400,using fig.6\n", + "Ds=19.25/12; # ft\n", + "De=0.06;\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : %.0f \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00018; # friction factor for reynolds number 46300, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.18; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \\t\"\n", + "print\"\\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \\t\"\n", + "UC1=39\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=200;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0024; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=9.8;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=4.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t9956700\n", + "\t for alcohol \t\n", + "\t total heat required for alcohol is : Btu/hr \t9936000.0\n", + "\t Q is : V \t9946350.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t25.0\n", + "\t LMTD is : F \t68.3416294443\n", + "\t caloric temperature of hot fluid is : F \t450.0\n", + "\t caloric temperature of cold fluid is : \t280.0\n", + "\t A1 is :f ft**2 \t727.693360612\n", + "\t number of tubes are : \t231.631449138\n", + "\t total surface area is : ft**2 \t728.8512\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t199.68228374\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.439833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t23531.640773\n", + "\t reynolds number is : \t52084.3641314\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,alcohol \t\n", + "\t flow area is : ft**2 \t0.226041666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t508755.760369\n", + "\t reynolds number is : \t21051.962498\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.421749731499\n", + "\t delPr is negligible \t\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t20\n", + "\t delPs is : psi \t7.39957120534\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t228.633987851\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.000634152640616\n", + "\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \t\n", + "\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t214\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t138.5\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t0.23\n", + "\t delPt is : psi \t7.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=225.; # inlet hot fluid,F\n", + "T2=225.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=200.; # outlet cold fluid,F\n", + "W=10350; # lb/hr\n", + "w=115000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for steam \\t\"\n", + "l=962; # Btu/(lb)\n", + "Qh=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Qh\n", + "print\"\\t for alcohol \\t\"\n", + "c=0.72; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for alcohol is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1)); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2)); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "L=12;\n", + "UD1=200; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is :f ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=232; # assuming two tube passes,23.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=232;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.0314; # at 225F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,alcohol \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.45; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=83; # from fig.28\n", + "Z=0.195; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000175; # friction factor for reynolds number 52000, using fig.26\n", + "s=0.00076;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(1)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "print\"\\t delPr is negligible \\t\"\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0018; # friction factor for reynolds number 21000, using fig.29\n", + "s=0.78; # for reynolds number 21000,using fig.6\n", + "Ds=1.94; # ft\n", + "De=0.06;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \\t\"\n", + "print\"\\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=214;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=138.5;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0025; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=0.23;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.1;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas \t\n", + "\t total heat required for gas is : Btu/hr \t1290625.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t1290000.0\n", + "\t delt1 is : F \t45.0\n", + "\t delt2 is : F \t150.0\n", + "\t LMTD is : F \t87.3092936462\n", + "\t R is : \t6.25\n", + "\t S is : \t0.117647058824\n", + "\t FT is 0.935 \t\n", + "\t delt is : F \t81.6341895592\n", + "\t caloric temperature of hot fluid is : F \t187.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t A1 is : ft**2 \t1067.71638982\n", + "\t number of tubes are : \t339.863887771\n", + "\t total surface area is : ft**2 \t1124.6928\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.0502389358\n", + "\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.027\n", + "\t required Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t5.2\n", + "\t delPt is : psi \t1.0\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \t\n", + "\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \t\n", + "\t A1 is : ft**2 \t1053.48017129\n", + "\t number of tubes are : %. \t335.332369267\n", + "\t total surface area is : ft**2 \t1068.144\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7940751147\n", + "\t hot fluid:shell side,gas \t\n", + "\t flow area is : ft**2 \t1.03333333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19983.8709677\n", + "\t reynolds number is : \t32973.3870968\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t flow area is : ft**2 \t0.107430555556\n", + "\t mass velocity is : %lb/(hr)*(ft**2) \t600387.847447\n", + "\t V is : fps \t2.6683904331\n", + "\t reynolds number is : \t21289.2629579\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t667\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t553.61\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.788231357313\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.14770229996\n", + "\t delPr is : psi \t2.496\n", + "\t delPT is : psi \t5.64370229996\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t17.4\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0099\n" + ] + } + ], + "source": [ + "print\"\\t example 11.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=41300.; # lb/hr\n", + "w=64500.; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas \\t\"\n", + "c=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.935 \\t\" # from fig 18\n", + "delt=(0.935*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=14.8; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=358; # assuming 12 tube passes, from table 9\n", + "L=12;\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \\t\"\n", + "UC1=22.7;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=14;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.027; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd1=0.005; \n", + "print\"\\t required Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=5.2;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=1.0;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \\t\"\n", + "print\"\\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \\t\"\n", + "UD1=15; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : %. \\t\",N1\n", + "N2=340; # assuming eight tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,gas \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=24; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As)/(2); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.050; # at 187.5F,lb/(ft)*(hr), from fig.15\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=105; # from fig.28\n", + "k=0.015; # Btu/(hr)(ft**2)( degree F/ft)\n", + "Z=0.94; # Z=((c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "Nt=340;\n", + "n=12; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : %lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.96; # at 90F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=667; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.83; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "phyt=1;\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 33000, using fig.29\n", + "s=0.0012; # for reynolds number 33000,using fig.6\n", + "Ds=31/12; # ft\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 21300, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.052; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=-1*(((Uc-UD)/((UD)*(Uc)))-0.02); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\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/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 new file mode 100644 index 00000000..c318815e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_1.ipynb @@ -0,0 +1,1053 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Calculations for Process Heat Conditions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example11.1 pgno:231" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for straw oil \t\n", + "\t total heat required for straw oil is : Btu/hr \t1728400.0\n", + "\t for naphtha \t\n", + "\t total heat required for naphtha is : Btu/hr \t1730400.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t110.0\n", + "\t LMTD is F \t69.2750233163\n", + "\t R is : \t3.33333333333\n", + "\t S is : \t0.214285714286\n", + "\t FT is 0.885 \t\n", + "\t delt is : F \t61.3083956349\n", + "\t ratio of two local temperature difference is : \t0.363636363636\n", + "\t caloric temperature of hot fluid is : F \t280.5\n", + "\t caloric temperature of cold fluid is : F \t212.15\n", + "\t A1 is : ft**2 \t403.207419539\n", + "\t number of tubes are :\t128.37729863\n", + "\t total surface area is : ft**2 \t389.4592\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.4710556785\n", + "\t hot fluid:shell side,straw oil \t\n", + "\t flow area is : ft**2 \t0.0926649305556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t321588.758782\n", + "\t reynolds number is : \t7013.52894497\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t cold fluid:inner tube side,naphtha \t\n", + "\t flow area is : ft**2 \t0.130027777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t792138.431959\n", + "\t reynolds number is : \t31262.2572002\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t329.477756286\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t54.8571428571\n", + "\t delPs is : psi \t5.1651098751\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.06675311157\n", + "\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \t88.0700339124\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00244401237634\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor \t\n", + "\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t74.8\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t54.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t4.7\n", + "\t delPt is : psi \t2.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=340.; # inlet hot fluid,F\n", + "T2=240.; # outlet hot fluid,F\n", + "t1=200.; # inlet cold fluid,F\n", + "t2=230.; # outlet cold fluid,F\n", + "W=29800; # lb/hr\n", + "w=103000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for straw oil \\t\"\n", + "c=0.58; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for straw oil is : Btu/hr \\t\",Q\n", + "print\"\\t for naphtha \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt1=40.;\n", + "delt2=T1-t2; # F\n", + "delt2=110.\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.885 \\t\" # from fig 18\n", + "delt=(0.885*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "L=16;\n", + "Fc=0.405; # from fig.17\n", + "Kc=0.23; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are :\\t\",N1\n", + "N2=124; # assuming two tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,straw oil \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=3.5; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.63; # at 280.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46; # from fig.28\n", + "Z=0.224; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.5cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,naphtha \\t\"\n", + "Nt=124;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.31; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=102; # from fig.24\n", + "Z=0.167; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.54cp and 48 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00225; # friction factor for reynolds number 7000, using fig.29\n", + "s=0.76; # for reynolds number 7000,using fig.6\n", + "Ds=15.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 31300, using fig.26\n", + "s=0.72;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor \\t\"\n", + "print\"\\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \\t\"\n", + "UD1=60; # assumption for 2 tube passes,3.5 baffle spacing and 17.25in ID\n", + "UC1=74.8;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=54.2;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.005; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=4.7;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=2.1;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2 pgno:235" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lean oil \t\n", + "\t total heat required for lean oil is : Btu/hr \t8984203.2\n", + "\t for rich oil \t\n", + "\t total heat required for rich oil is : Btu/hr \t8924995.95\n", + "\t Q is : V \t8954599.575\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t55.0\n", + "\t LMTD is : F \t57.5283364148\n", + "\t R is : \t0.974358974359\n", + "\t S is : \t0.78\n", + "\t FT is 0.875 \t\n", + "\t delt is : F \t50.337294363\n", + "\t ratio of two local temperature difference is : \t1.09090909091\n", + "\t caloric temperature of hot fluid is : F \t251.2\n", + "\t caloric temperature of cold fluid is : \t193.6\n", + "\t A1 is : ft**2 \t3557.83904889\n", + "\t number of tubes are : \t566.390577064\n", + "\t total surface area is : ft**2 \t3643.328\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t48.8267738849\n", + "\t hot fluid:inner tube side,lean oil \t\n", + "\t flow area is : ft**2 \t0.202731481481\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t416501.667047\n", + "\t reynolds number is : \t10109.4536086\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t130.609284333\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t cold fluid:shell side,rich oil \t\n", + "\t flow area is : ft**2 \t0.322916666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t267428.129032\n", + "\t reynolds number is : \t6721.07731695\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.32759598913\n", + "\t delPr is : psi \t1.4961038961\n", + "\t delPT is : psi \t5.82369988524\n", + "\t allowable delPT is 10 psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t64\n", + "\t delPs is : psi \t6.44657740525\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.073599733\n", + "\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \t0.00295933089476\n", + "\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \t\n", + "\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t52.3\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0047\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n", + "\t delPs is : psi \t4.4\n", + "\t delPt is : psi \t7.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\" \n", + "T1=350.; # inlet hot fluid,F\n", + "T2=160.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=295.; # outlet cold fluid,F\n", + "W=84438; # lb/hr\n", + "w=86357; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lean oil \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Qh=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lean oil is : Btu/hr \\t\",Qh\n", + "print\"\\t for rich oil \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for rich oil is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.875 \\t\"# for 4-8 exchanger,from fig 21\n", + "delt=(0.875*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.48; # from fig.17\n", + "Kc=0.32; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=50; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1*2)); # 2-4 exchanger in series\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=580; # assuming six tube passes,31in ID, from table 9\n", + "A2=(N2*16*a1*2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,lean oil \\t\"\n", + "Nt=580;\n", + "n=6; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.13; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=36.5; # from fig.24\n", + "Z=0.185; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.88cp and 35 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,rich oil \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=12; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT))/(2); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.15; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=45; # from fig.28\n", + "Z=0.213; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.3cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00027; # friction factor for reynolds number 10100, using fig.26\n", + "s=0.77;\n", + "delPt=((2*f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.024; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*2*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0023; # friction factor for reynolds number 6720, using fig.29\n", + "s=0.79; # for reynolds number 6720,using fig.6\n", + "Ds=31/12; # ft\n", + "De=0.0792;\n", + "N=(4*12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \\t\"\n", + "print\"\\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=52.3;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=42;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0047; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.004; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=4.4;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for caustic \t\n", + "\t total heat required for caustic is : Btu/hr \t6160000.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t6160000.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t70.0\n", + "\t LMTD is : F \t53.6684619193\n", + "\t R is : \t1.75\n", + "\t S is : \t0.363636363636\n", + "\t FT is 0.815 \t\n", + "\t delt is : F \t43.7397964643\n", + "\t caloric temperature of hot fluid is : F \t155.0\n", + "\t caloric temperature of cold fluid is : \t100.0\n", + "\t A1 is : ft**2 \t563.331382215\n", + "\t number of tubes are : \t134.485146633\n", + "\t total surface area is : ft**2 \t586.432\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t240.152047558\n", + "\t hot fluid:shell side,caustic \t\n", + "\t flow area is : ft**2 \t0.187152777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t534322.820037\n", + "\t reynolds number is : \t17423.5702186\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.132708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1160439.56044\n", + "\t V is fps \t5.15750915751\n", + "\t reynolds number is : \t46350.8904888\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1165.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t972.1104\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : %.0f \t28\n", + "\t delPs is : psi \t6.97705175383\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.27604456957\n", + "\t delPr is : psi \t2.88\n", + "\t delPT is : psi \t7.15604456957\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t413.224149078\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00174403453004\n", + "\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \t\n", + "\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t39\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t200\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0024\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t9.8\n", + "\t delPt is : psi \t4.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=190.; # inlet hot fluid,F\n", + "T2=120.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=154000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for caustic \\t\"\n", + "c=0.88; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for caustic is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.815 \\t\" # for 4-8 exchanger,from fig 21\n", + "delt=(0.815*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=250; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=140; # assuming four tube passes,19.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,caustic \\t\"\n", + "ID=19.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.84; # at 155F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=75; # from fig.28\n", + "Z=0.575; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1; # low viscosity\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=140;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=Gt/(3600*62.5);\n", + "print\"\\t V is fps \\t\",V\n", + "mu2=1.74; # at 100F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1240*0.94; # from fig 25\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.834; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0019; # friction factor for reynolds number 17400, using fig.29\n", + "s=1.115; # for reynolds number 17400,using fig.6\n", + "Ds=19.25/12; # ft\n", + "De=0.06;\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : %.0f \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00018; # friction factor for reynolds number 46300, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.18; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \\t\"\n", + "print\"\\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \\t\"\n", + "UC1=39\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=200;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0024; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=9.8;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=4.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t9956700\n", + "\t for alcohol \t\n", + "\t total heat required for alcohol is : Btu/hr \t9936000.0\n", + "\t Q is : V \t9946350.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t25.0\n", + "\t LMTD is : F \t68.3416294443\n", + "\t caloric temperature of hot fluid is : F \t450.0\n", + "\t caloric temperature of cold fluid is : \t280.0\n", + "\t A1 is :f ft**2 \t727.693360612\n", + "\t number of tubes are : \t231.631449138\n", + "\t total surface area is : ft**2 \t728.8512\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t199.68228374\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.439833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t23531.640773\n", + "\t reynolds number is : \t52084.3641314\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,alcohol \t\n", + "\t flow area is : ft**2 \t0.226041666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t508755.760369\n", + "\t reynolds number is : \t21051.962498\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.421749731499\n", + "\t delPr is negligible \t\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t20\n", + "\t delPs is : psi \t7.39957120534\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t228.633987851\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.000634152640616\n", + "\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \t\n", + "\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t214\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t138.5\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t0.23\n", + "\t delPt is : psi \t7.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=225.; # inlet hot fluid,F\n", + "T2=225.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=200.; # outlet cold fluid,F\n", + "W=10350; # lb/hr\n", + "w=115000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for steam \\t\"\n", + "l=962; # Btu/(lb)\n", + "Qh=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Qh\n", + "print\"\\t for alcohol \\t\"\n", + "c=0.72; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for alcohol is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1)); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2)); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "L=12;\n", + "UD1=200; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is :f ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=232; # assuming two tube passes,23.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=232;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.0314; # at 225F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,alcohol \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.45; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=83; # from fig.28\n", + "Z=0.195; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000175; # friction factor for reynolds number 52000, using fig.26\n", + "s=0.00076;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(1)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "print\"\\t delPr is negligible \\t\"\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0018; # friction factor for reynolds number 21000, using fig.29\n", + "s=0.78; # for reynolds number 21000,using fig.6\n", + "Ds=1.94; # ft\n", + "De=0.06;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \\t\"\n", + "print\"\\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=214;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=138.5;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0025; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=0.23;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.1;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas \t\n", + "\t total heat required for gas is : Btu/hr \t1290625.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t1290000.0\n", + "\t delt1 is : F \t45.0\n", + "\t delt2 is : F \t150.0\n", + "\t LMTD is : F \t87.3092936462\n", + "\t R is : \t6.25\n", + "\t S is : \t0.117647058824\n", + "\t FT is 0.935 \t\n", + "\t delt is : F \t81.6341895592\n", + "\t caloric temperature of hot fluid is : F \t187.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t A1 is : ft**2 \t1067.71638982\n", + "\t number of tubes are : \t339.863887771\n", + "\t total surface area is : ft**2 \t1124.6928\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.0502389358\n", + "\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.027\n", + "\t required Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t5.2\n", + "\t delPt is : psi \t1.0\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \t\n", + "\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \t\n", + "\t A1 is : ft**2 \t1053.48017129\n", + "\t number of tubes are : %. \t335.332369267\n", + "\t total surface area is : ft**2 \t1068.144\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7940751147\n", + "\t hot fluid:shell side,gas \t\n", + "\t flow area is : ft**2 \t1.03333333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19983.8709677\n", + "\t reynolds number is : \t32973.3870968\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t flow area is : ft**2 \t0.107430555556\n", + "\t mass velocity is : %lb/(hr)*(ft**2) \t600387.847447\n", + "\t V is : fps \t2.6683904331\n", + "\t reynolds number is : \t21289.2629579\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t667\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t553.61\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.788231357313\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.14770229996\n", + "\t delPr is : psi \t2.496\n", + "\t delPT is : psi \t5.64370229996\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t17.4\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0099\n" + ] + } + ], + "source": [ + "print\"\\t example 11.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=41300.; # lb/hr\n", + "w=64500.; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas \\t\"\n", + "c=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.935 \\t\" # from fig 18\n", + "delt=(0.935*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=14.8; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=358; # assuming 12 tube passes, from table 9\n", + "L=12;\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \\t\"\n", + "UC1=22.7;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=14;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.027; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd1=0.005; \n", + "print\"\\t required Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=5.2;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=1.0;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \\t\"\n", + "print\"\\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \\t\"\n", + "UD1=15; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : %. \\t\",N1\n", + "N2=340; # assuming eight tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,gas \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=24; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As)/(2); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.050; # at 187.5F,lb/(ft)*(hr), from fig.15\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=105; # from fig.28\n", + "k=0.015; # Btu/(hr)(ft**2)( degree F/ft)\n", + "Z=0.94; # Z=((c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "Nt=340;\n", + "n=12; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : %lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.96; # at 90F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=667; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.83; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "phyt=1;\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 33000, using fig.29\n", + "s=0.0012; # for reynolds number 33000,using fig.6\n", + "Ds=31/12; # ft\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 21300, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.052; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=-1*(((Uc-UD)/((UD)*(Uc)))-0.02); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\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/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 new file mode 100644 index 00000000..c318815e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_2.ipynb @@ -0,0 +1,1053 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Calculations for Process Heat Conditions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example11.1 pgno:231" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for straw oil \t\n", + "\t total heat required for straw oil is : Btu/hr \t1728400.0\n", + "\t for naphtha \t\n", + "\t total heat required for naphtha is : Btu/hr \t1730400.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t110.0\n", + "\t LMTD is F \t69.2750233163\n", + "\t R is : \t3.33333333333\n", + "\t S is : \t0.214285714286\n", + "\t FT is 0.885 \t\n", + "\t delt is : F \t61.3083956349\n", + "\t ratio of two local temperature difference is : \t0.363636363636\n", + "\t caloric temperature of hot fluid is : F \t280.5\n", + "\t caloric temperature of cold fluid is : F \t212.15\n", + "\t A1 is : ft**2 \t403.207419539\n", + "\t number of tubes are :\t128.37729863\n", + "\t total surface area is : ft**2 \t389.4592\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.4710556785\n", + "\t hot fluid:shell side,straw oil \t\n", + "\t flow area is : ft**2 \t0.0926649305556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t321588.758782\n", + "\t reynolds number is : \t7013.52894497\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t cold fluid:inner tube side,naphtha \t\n", + "\t flow area is : ft**2 \t0.130027777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t792138.431959\n", + "\t reynolds number is : \t31262.2572002\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t329.477756286\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t54.8571428571\n", + "\t delPs is : psi \t5.1651098751\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.06675311157\n", + "\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \t88.0700339124\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00244401237634\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor \t\n", + "\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t74.8\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t54.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t4.7\n", + "\t delPt is : psi \t2.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=340.; # inlet hot fluid,F\n", + "T2=240.; # outlet hot fluid,F\n", + "t1=200.; # inlet cold fluid,F\n", + "t2=230.; # outlet cold fluid,F\n", + "W=29800; # lb/hr\n", + "w=103000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for straw oil \\t\"\n", + "c=0.58; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for straw oil is : Btu/hr \\t\",Q\n", + "print\"\\t for naphtha \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt1=40.;\n", + "delt2=T1-t2; # F\n", + "delt2=110.\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.885 \\t\" # from fig 18\n", + "delt=(0.885*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "L=16;\n", + "Fc=0.405; # from fig.17\n", + "Kc=0.23; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are :\\t\",N1\n", + "N2=124; # assuming two tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,straw oil \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=3.5; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.63; # at 280.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46; # from fig.28\n", + "Z=0.224; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.5cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,naphtha \\t\"\n", + "Nt=124;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.31; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=102; # from fig.24\n", + "Z=0.167; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.54cp and 48 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00225; # friction factor for reynolds number 7000, using fig.29\n", + "s=0.76; # for reynolds number 7000,using fig.6\n", + "Ds=15.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 31300, using fig.26\n", + "s=0.72;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor \\t\"\n", + "print\"\\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \\t\"\n", + "UD1=60; # assumption for 2 tube passes,3.5 baffle spacing and 17.25in ID\n", + "UC1=74.8;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=54.2;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.005; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=4.7;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=2.1;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2 pgno:235" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lean oil \t\n", + "\t total heat required for lean oil is : Btu/hr \t8984203.2\n", + "\t for rich oil \t\n", + "\t total heat required for rich oil is : Btu/hr \t8924995.95\n", + "\t Q is : V \t8954599.575\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t55.0\n", + "\t LMTD is : F \t57.5283364148\n", + "\t R is : \t0.974358974359\n", + "\t S is : \t0.78\n", + "\t FT is 0.875 \t\n", + "\t delt is : F \t50.337294363\n", + "\t ratio of two local temperature difference is : \t1.09090909091\n", + "\t caloric temperature of hot fluid is : F \t251.2\n", + "\t caloric temperature of cold fluid is : \t193.6\n", + "\t A1 is : ft**2 \t3557.83904889\n", + "\t number of tubes are : \t566.390577064\n", + "\t total surface area is : ft**2 \t3643.328\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t48.8267738849\n", + "\t hot fluid:inner tube side,lean oil \t\n", + "\t flow area is : ft**2 \t0.202731481481\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t416501.667047\n", + "\t reynolds number is : \t10109.4536086\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t130.609284333\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t cold fluid:shell side,rich oil \t\n", + "\t flow area is : ft**2 \t0.322916666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t267428.129032\n", + "\t reynolds number is : \t6721.07731695\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.32759598913\n", + "\t delPr is : psi \t1.4961038961\n", + "\t delPT is : psi \t5.82369988524\n", + "\t allowable delPT is 10 psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t64\n", + "\t delPs is : psi \t6.44657740525\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.073599733\n", + "\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \t0.00295933089476\n", + "\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \t\n", + "\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t52.3\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0047\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n", + "\t delPs is : psi \t4.4\n", + "\t delPt is : psi \t7.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\" \n", + "T1=350.; # inlet hot fluid,F\n", + "T2=160.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=295.; # outlet cold fluid,F\n", + "W=84438; # lb/hr\n", + "w=86357; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lean oil \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Qh=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lean oil is : Btu/hr \\t\",Qh\n", + "print\"\\t for rich oil \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for rich oil is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.875 \\t\"# for 4-8 exchanger,from fig 21\n", + "delt=(0.875*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.48; # from fig.17\n", + "Kc=0.32; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=50; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1*2)); # 2-4 exchanger in series\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=580; # assuming six tube passes,31in ID, from table 9\n", + "A2=(N2*16*a1*2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,lean oil \\t\"\n", + "Nt=580;\n", + "n=6; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.13; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=36.5; # from fig.24\n", + "Z=0.185; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.88cp and 35 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,rich oil \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=12; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT))/(2); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.15; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=45; # from fig.28\n", + "Z=0.213; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.3cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00027; # friction factor for reynolds number 10100, using fig.26\n", + "s=0.77;\n", + "delPt=((2*f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.024; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*2*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0023; # friction factor for reynolds number 6720, using fig.29\n", + "s=0.79; # for reynolds number 6720,using fig.6\n", + "Ds=31/12; # ft\n", + "De=0.0792;\n", + "N=(4*12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \\t\"\n", + "print\"\\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=52.3;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=42;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0047; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.004; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=4.4;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for caustic \t\n", + "\t total heat required for caustic is : Btu/hr \t6160000.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t6160000.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t70.0\n", + "\t LMTD is : F \t53.6684619193\n", + "\t R is : \t1.75\n", + "\t S is : \t0.363636363636\n", + "\t FT is 0.815 \t\n", + "\t delt is : F \t43.7397964643\n", + "\t caloric temperature of hot fluid is : F \t155.0\n", + "\t caloric temperature of cold fluid is : \t100.0\n", + "\t A1 is : ft**2 \t563.331382215\n", + "\t number of tubes are : \t134.485146633\n", + "\t total surface area is : ft**2 \t586.432\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t240.152047558\n", + "\t hot fluid:shell side,caustic \t\n", + "\t flow area is : ft**2 \t0.187152777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t534322.820037\n", + "\t reynolds number is : \t17423.5702186\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.132708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1160439.56044\n", + "\t V is fps \t5.15750915751\n", + "\t reynolds number is : \t46350.8904888\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1165.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t972.1104\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : %.0f \t28\n", + "\t delPs is : psi \t6.97705175383\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.27604456957\n", + "\t delPr is : psi \t2.88\n", + "\t delPT is : psi \t7.15604456957\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t413.224149078\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00174403453004\n", + "\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \t\n", + "\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t39\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t200\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0024\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t9.8\n", + "\t delPt is : psi \t4.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=190.; # inlet hot fluid,F\n", + "T2=120.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=154000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for caustic \\t\"\n", + "c=0.88; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for caustic is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.815 \\t\" # for 4-8 exchanger,from fig 21\n", + "delt=(0.815*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=250; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=140; # assuming four tube passes,19.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,caustic \\t\"\n", + "ID=19.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.84; # at 155F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=75; # from fig.28\n", + "Z=0.575; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1; # low viscosity\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=140;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=Gt/(3600*62.5);\n", + "print\"\\t V is fps \\t\",V\n", + "mu2=1.74; # at 100F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1240*0.94; # from fig 25\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.834; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0019; # friction factor for reynolds number 17400, using fig.29\n", + "s=1.115; # for reynolds number 17400,using fig.6\n", + "Ds=19.25/12; # ft\n", + "De=0.06;\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : %.0f \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00018; # friction factor for reynolds number 46300, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.18; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \\t\"\n", + "print\"\\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \\t\"\n", + "UC1=39\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=200;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0024; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=9.8;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=4.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t9956700\n", + "\t for alcohol \t\n", + "\t total heat required for alcohol is : Btu/hr \t9936000.0\n", + "\t Q is : V \t9946350.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t25.0\n", + "\t LMTD is : F \t68.3416294443\n", + "\t caloric temperature of hot fluid is : F \t450.0\n", + "\t caloric temperature of cold fluid is : \t280.0\n", + "\t A1 is :f ft**2 \t727.693360612\n", + "\t number of tubes are : \t231.631449138\n", + "\t total surface area is : ft**2 \t728.8512\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t199.68228374\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.439833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t23531.640773\n", + "\t reynolds number is : \t52084.3641314\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,alcohol \t\n", + "\t flow area is : ft**2 \t0.226041666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t508755.760369\n", + "\t reynolds number is : \t21051.962498\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.421749731499\n", + "\t delPr is negligible \t\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t20\n", + "\t delPs is : psi \t7.39957120534\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t228.633987851\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.000634152640616\n", + "\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \t\n", + "\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t214\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t138.5\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t0.23\n", + "\t delPt is : psi \t7.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=225.; # inlet hot fluid,F\n", + "T2=225.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=200.; # outlet cold fluid,F\n", + "W=10350; # lb/hr\n", + "w=115000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for steam \\t\"\n", + "l=962; # Btu/(lb)\n", + "Qh=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Qh\n", + "print\"\\t for alcohol \\t\"\n", + "c=0.72; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for alcohol is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1)); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2)); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "L=12;\n", + "UD1=200; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is :f ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=232; # assuming two tube passes,23.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=232;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.0314; # at 225F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,alcohol \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.45; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=83; # from fig.28\n", + "Z=0.195; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000175; # friction factor for reynolds number 52000, using fig.26\n", + "s=0.00076;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(1)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "print\"\\t delPr is negligible \\t\"\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0018; # friction factor for reynolds number 21000, using fig.29\n", + "s=0.78; # for reynolds number 21000,using fig.6\n", + "Ds=1.94; # ft\n", + "De=0.06;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \\t\"\n", + "print\"\\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=214;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=138.5;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0025; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=0.23;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.1;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas \t\n", + "\t total heat required for gas is : Btu/hr \t1290625.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t1290000.0\n", + "\t delt1 is : F \t45.0\n", + "\t delt2 is : F \t150.0\n", + "\t LMTD is : F \t87.3092936462\n", + "\t R is : \t6.25\n", + "\t S is : \t0.117647058824\n", + "\t FT is 0.935 \t\n", + "\t delt is : F \t81.6341895592\n", + "\t caloric temperature of hot fluid is : F \t187.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t A1 is : ft**2 \t1067.71638982\n", + "\t number of tubes are : \t339.863887771\n", + "\t total surface area is : ft**2 \t1124.6928\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.0502389358\n", + "\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.027\n", + "\t required Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t5.2\n", + "\t delPt is : psi \t1.0\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \t\n", + "\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \t\n", + "\t A1 is : ft**2 \t1053.48017129\n", + "\t number of tubes are : %. \t335.332369267\n", + "\t total surface area is : ft**2 \t1068.144\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7940751147\n", + "\t hot fluid:shell side,gas \t\n", + "\t flow area is : ft**2 \t1.03333333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19983.8709677\n", + "\t reynolds number is : \t32973.3870968\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t flow area is : ft**2 \t0.107430555556\n", + "\t mass velocity is : %lb/(hr)*(ft**2) \t600387.847447\n", + "\t V is : fps \t2.6683904331\n", + "\t reynolds number is : \t21289.2629579\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t667\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t553.61\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.788231357313\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.14770229996\n", + "\t delPr is : psi \t2.496\n", + "\t delPT is : psi \t5.64370229996\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t17.4\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0099\n" + ] + } + ], + "source": [ + "print\"\\t example 11.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=41300.; # lb/hr\n", + "w=64500.; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas \\t\"\n", + "c=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.935 \\t\" # from fig 18\n", + "delt=(0.935*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=14.8; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=358; # assuming 12 tube passes, from table 9\n", + "L=12;\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \\t\"\n", + "UC1=22.7;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=14;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.027; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd1=0.005; \n", + "print\"\\t required Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=5.2;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=1.0;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \\t\"\n", + "print\"\\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \\t\"\n", + "UD1=15; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : %. \\t\",N1\n", + "N2=340; # assuming eight tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,gas \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=24; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As)/(2); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.050; # at 187.5F,lb/(ft)*(hr), from fig.15\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=105; # from fig.28\n", + "k=0.015; # Btu/(hr)(ft**2)( degree F/ft)\n", + "Z=0.94; # Z=((c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "Nt=340;\n", + "n=12; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : %lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.96; # at 90F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=667; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.83; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "phyt=1;\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 33000, using fig.29\n", + "s=0.0012; # for reynolds number 33000,using fig.6\n", + "Ds=31/12; # ft\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 21300, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.052; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=-1*(((Uc-UD)/((UD)*(Uc)))-0.02); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\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/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 new file mode 100644 index 00000000..c318815e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_11_Calculations_for_Process_Heat_Conditions_3.ipynb @@ -0,0 +1,1053 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Calculations for Process Heat Conditions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example11.1 pgno:231" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for straw oil \t\n", + "\t total heat required for straw oil is : Btu/hr \t1728400.0\n", + "\t for naphtha \t\n", + "\t total heat required for naphtha is : Btu/hr \t1730400.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t110.0\n", + "\t LMTD is F \t69.2750233163\n", + "\t R is : \t3.33333333333\n", + "\t S is : \t0.214285714286\n", + "\t FT is 0.885 \t\n", + "\t delt is : F \t61.3083956349\n", + "\t ratio of two local temperature difference is : \t0.363636363636\n", + "\t caloric temperature of hot fluid is : F \t280.5\n", + "\t caloric temperature of cold fluid is : F \t212.15\n", + "\t A1 is : ft**2 \t403.207419539\n", + "\t number of tubes are :\t128.37729863\n", + "\t total surface area is : ft**2 \t389.4592\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.4710556785\n", + "\t hot fluid:shell side,straw oil \t\n", + "\t flow area is : ft**2 \t0.0926649305556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t321588.758782\n", + "\t reynolds number is : \t7013.52894497\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t130.155789474\n", + "\t cold fluid:inner tube side,naphtha \t\n", + "\t flow area is : ft**2 \t0.130027777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t792138.431959\n", + "\t reynolds number is : \t31262.2572002\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t329.477756286\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t272.36827853\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t54.8571428571\n", + "\t delPs is : psi \t5.1651098751\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.06675311157\n", + "\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \t88.0700339124\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00244401237634\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor \t\n", + "\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t74.8\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t54.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t4.7\n", + "\t delPt is : psi \t2.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=340.; # inlet hot fluid,F\n", + "T2=240.; # outlet hot fluid,F\n", + "t1=200.; # inlet cold fluid,F\n", + "t2=230.; # outlet cold fluid,F\n", + "W=29800; # lb/hr\n", + "w=103000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for straw oil \\t\"\n", + "c=0.58; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for straw oil is : Btu/hr \\t\",Q\n", + "print\"\\t for naphtha \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt1=40.;\n", + "delt2=T1-t2; # F\n", + "delt2=110.\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.885 \\t\" # from fig 18\n", + "delt=(0.885*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "L=16;\n", + "Fc=0.405; # from fig.17\n", + "Kc=0.23; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are :\\t\",N1\n", + "N2=124; # assuming two tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,straw oil \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=3.5; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.63; # at 280.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46; # from fig.28\n", + "Z=0.224; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.5cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,naphtha \\t\"\n", + "Nt=124;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=1.31; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=102; # from fig.24\n", + "Z=0.167; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.54cp and 48 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00225; # friction factor for reynolds number 7000, using fig.29\n", + "s=0.76; # for reynolds number 7000,using fig.6\n", + "Ds=15.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 31300, using fig.26\n", + "s=0.72;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : %.1f Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor \\t\"\n", + "print\"\\t Proceeding as above and carrying the viscosity correction and pressure drops to completion the new summary is given using a 17.25in. ID shell with 166 tubes on two passes and a 3.5in. baffle space \\t\"\n", + "UD1=60; # assumption for 2 tube passes,3.5 baffle spacing and 17.25in ID\n", + "UC1=74.8;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=54.2;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.005; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=4.7;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=2.1;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2 pgno:235" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lean oil \t\n", + "\t total heat required for lean oil is : Btu/hr \t8984203.2\n", + "\t for rich oil \t\n", + "\t total heat required for rich oil is : Btu/hr \t8924995.95\n", + "\t Q is : V \t8954599.575\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t55.0\n", + "\t LMTD is : F \t57.5283364148\n", + "\t R is : \t0.974358974359\n", + "\t S is : \t0.78\n", + "\t FT is 0.875 \t\n", + "\t delt is : F \t50.337294363\n", + "\t ratio of two local temperature difference is : \t1.09090909091\n", + "\t caloric temperature of hot fluid is : F \t251.2\n", + "\t caloric temperature of cold fluid is : \t193.6\n", + "\t A1 is : ft**2 \t3557.83904889\n", + "\t number of tubes are : \t566.390577064\n", + "\t total surface area is : ft**2 \t3643.328\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t48.8267738849\n", + "\t hot fluid:inner tube side,lean oil \t\n", + "\t flow area is : ft**2 \t0.202731481481\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t416501.667047\n", + "\t reynolds number is : \t10109.4536086\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t130.609284333\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t107.970341715\n", + "\t cold fluid:shell side,rich oil \t\n", + "\t flow area is : ft**2 \t0.322916666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t267428.129032\n", + "\t reynolds number is : \t6721.07731695\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t121.073684211\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.32759598913\n", + "\t delPr is : psi \t1.4961038961\n", + "\t delPT is : psi \t5.82369988524\n", + "\t allowable delPT is 10 psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t64\n", + "\t delPs is : psi \t6.44657740525\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.073599733\n", + "\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \t0.00295933089476\n", + "\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \t\n", + "\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t52.3\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0047\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n", + "\t delPs is : psi \t4.4\n", + "\t delPt is : psi \t7.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\" \n", + "T1=350.; # inlet hot fluid,F\n", + "T2=160.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=295.; # outlet cold fluid,F\n", + "W=84438; # lb/hr\n", + "w=86357; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lean oil \\t\"\n", + "c=0.56; # Btu/(lb)*(F)\n", + "Qh=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lean oil is : Btu/hr \\t\",Qh\n", + "print\"\\t for rich oil \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for rich oil is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.875 \\t\"# for 4-8 exchanger,from fig 21\n", + "delt=(0.875*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.48; # from fig.17\n", + "Kc=0.32; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=50; # assume, from table 8a\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(16*a1*2)); # 2-4 exchanger in series\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=580; # assuming six tube passes,31in ID, from table 9\n", + "A2=(N2*16*a1*2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,lean oil \\t\"\n", + "Nt=580;\n", + "n=6; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=2.13; # at 212F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=36.5; # from fig.24\n", + "Z=0.185; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu4=0.88cp and 35 API\n", + "Hi=((jH)*(1/D)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "phyt=1;\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,rich oil \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=12; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT))/(2); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=3.15; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=45; # from fig.28\n", + "Z=0.213; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=1.3cp and 35 API\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00027; # friction factor for reynolds number 10100, using fig.26\n", + "s=0.77;\n", + "delPt=((2*f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.024; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*2*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0023; # friction factor for reynolds number 6720, using fig.29\n", + "s=0.79; # for reynolds number 6720,using fig.6\n", + "Ds=31/12; # ft\n", + "De=0.0792;\n", + "N=(4*12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : %.4f (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t The initial assumptions have provided an exchanger which very nearly meets all the requirements. Eight-pass units would meet the heat-transfer requirement but would give a tube-side pressure drop of 14 psi. The trial exchanger will be somewhat less suitable when the value of Q, is also taken into account. If the minimum dirt factor of 0.0040 is to be taken literally, it will be necessary to try the next size shell \\t\"\n", + "print\"\\t Assume a 33 in. ID shell with six1 tube passes and baffies spaced 12-in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=52.3;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=42;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0047; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.004; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=4.4;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for caustic \t\n", + "\t total heat required for caustic is : Btu/hr \t6160000.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t6160000.0\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t70.0\n", + "\t LMTD is : F \t53.6684619193\n", + "\t R is : \t1.75\n", + "\t S is : \t0.363636363636\n", + "\t FT is 0.815 \t\n", + "\t delt is : F \t43.7397964643\n", + "\t caloric temperature of hot fluid is : F \t155.0\n", + "\t caloric temperature of cold fluid is : \t100.0\n", + "\t A1 is : ft**2 \t563.331382215\n", + "\t number of tubes are : \t134.485146633\n", + "\t total surface area is : ft**2 \t586.432\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t240.152047558\n", + "\t hot fluid:shell side,caustic \t\n", + "\t flow area is : ft**2 \t0.187152777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t534322.820037\n", + "\t reynolds number is : \t17423.5702186\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t718.75\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.132708333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1160439.56044\n", + "\t V is fps \t5.15750915751\n", + "\t reynolds number is : \t46350.8904888\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t1165.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t972.1104\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : %.0f \t28\n", + "\t delPs is : psi \t6.97705175383\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.27604456957\n", + "\t delPr is : psi \t2.88\n", + "\t delPT is : psi \t7.15604456957\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t413.224149078\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00174403453004\n", + "\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \t\n", + "\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t39\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t200\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0024\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t9.8\n", + "\t delPt is : psi \t4.9\n" + ] + } + ], + "source": [ + "print\"\\t example 11.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=190.; # inlet hot fluid,F\n", + "T2=120.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=154000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for caustic \\t\"\n", + "c=0.88; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for caustic is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.815 \\t\" # for 4-8 exchanger,from fig 21\n", + "delt=(0.815*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "UD1=250; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(16*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=140; # assuming four tube passes,19.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,caustic \\t\"\n", + "ID=19.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.84; # at 155F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=75; # from fig.28\n", + "Z=0.575; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1; # low viscosity\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=140;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=Gt/(3600*62.5);\n", + "print\"\\t V is fps \\t\",V\n", + "mu2=1.74; # at 100F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1240*0.94; # from fig 25\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.834; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0019; # friction factor for reynolds number 17400, using fig.29\n", + "s=1.115; # for reynolds number 17400,using fig.6\n", + "Ds=19.25/12; # ft\n", + "De=0.06;\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : %.0f \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00018; # friction factor for reynolds number 46300, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.18; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t Adjustment of the baffie space to use the full 10 psi will still not permit the exchanger to make the 0.002 dirt factor. The value of UD has been assumed too high \\t\"\n", + "print\"\\t Try a 21.25 in ID shell with four tube passes and a 6 in baffie space This corresponds to 170 tubes \\t\"\n", + "UC1=39\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=200;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0024; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=9.8;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=4.9;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t9956700\n", + "\t for alcohol \t\n", + "\t total heat required for alcohol is : Btu/hr \t9936000.0\n", + "\t Q is : V \t9946350.0\n", + "\t delt1 is : F \t145.0\n", + "\t delt2 is : F \t25.0\n", + "\t LMTD is : F \t68.3416294443\n", + "\t caloric temperature of hot fluid is : F \t450.0\n", + "\t caloric temperature of cold fluid is : \t280.0\n", + "\t A1 is :f ft**2 \t727.693360612\n", + "\t number of tubes are : \t231.631449138\n", + "\t total surface area is : ft**2 \t728.8512\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t199.68228374\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.439833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t23531.640773\n", + "\t reynolds number is : \t52084.3641314\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,alcohol \t\n", + "\t flow area is : ft**2 \t0.226041666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t508755.760369\n", + "\t reynolds number is : \t21051.962498\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t269.75\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.421749731499\n", + "\t delPr is negligible \t\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t20\n", + "\t delPs is : psi \t7.39957120534\n", + "\t allowable delPa is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t228.633987851\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.000634152640616\n", + "\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \t\n", + "\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t214\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t138.5\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.0025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.002\n", + "\t delPs is : psi \t0.23\n", + "\t delPt is : psi \t7.1\n" + ] + } + ], + "source": [ + "print\"\\t example 11.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=225.; # inlet hot fluid,F\n", + "T2=225.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=200.; # outlet cold fluid,F\n", + "W=10350; # lb/hr\n", + "w=115000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for steam \\t\"\n", + "l=962; # Btu/(lb)\n", + "Qh=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Qh\n", + "print\"\\t for alcohol \\t\"\n", + "c=0.72; # Btu/(lb)*(F)\n", + "Qc=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for alcohol is : Btu/hr \\t\",Qc\n", + "Q=(Qh+Qc)/(2);\n", + "print\"\\t Q is : V \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1)); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2)); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "L=12;\n", + "UD1=200; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is :f ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=232; # assuming two tube passes,23.25in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=232;\n", + "n=2; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.0314; # at 225F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,alcohol \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=7; # minimum baffle spacing,from eq 11.4,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.45; # at 193.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.72/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=83; # from fig.28\n", + "Z=0.195; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000175; # friction factor for reynolds number 52000, using fig.26\n", + "s=0.00076;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(1)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "print\"\\t delPr is negligible \\t\"\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0018; # friction factor for reynolds number 21000, using fig.29\n", + "s=0.78; # for reynolds number 21000,using fig.6\n", + "Ds=1.94; # ft\n", + "De=0.06;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t This is clearly an instance in which UD was assumed too high.It is now a question of how much too high. With the aid of the summary it is apparent thatin a larger shell a clean overall coefficient of about 200 may be expected \\t\"\n", + "print\"\\t Assume a 27in. ID shell with 2 tube passes,334 tubes and baffies spaced 7in. apart, since the pressure drop increases with the diameter of the shell for a given mass velocity. \\t\"\n", + "UC1=214;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=138.5;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.0025; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd2=0.002; \n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd2\n", + "delPs1=0.23;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPT1=7.1;\n", + "print\"\\t delPt is : psi \\t\",delPT1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 11.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for gas \t\n", + "\t total heat required for gas is : Btu/hr \t1290625.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t1290000.0\n", + "\t delt1 is : F \t45.0\n", + "\t delt2 is : F \t150.0\n", + "\t LMTD is : F \t87.3092936462\n", + "\t R is : \t6.25\n", + "\t S is : \t0.117647058824\n", + "\t FT is 0.935 \t\n", + "\t delt is : F \t81.6341895592\n", + "\t caloric temperature of hot fluid is : F \t187.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t A1 is : ft**2 \t1067.71638982\n", + "\t number of tubes are : \t339.863887771\n", + "\t total surface area is : ft**2 \t1124.6928\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.0502389358\n", + "\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t22.7\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14\n", + "\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \t0.027\n", + "\t required Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t delPs is : psi \t5.2\n", + "\t delPt is : psi \t1.0\n", + "\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \t\n", + "\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \t\n", + "\t A1 is : ft**2 \t1053.48017129\n", + "\t number of tubes are : %. \t335.332369267\n", + "\t total surface area is : ft**2 \t1068.144\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t14.7940751147\n", + "\t hot fluid:shell side,gas \t\n", + "\t flow area is : ft**2 \t1.03333333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t19983.8709677\n", + "\t reynolds number is : \t32973.3870968\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t17.9454545455\n", + "\t cold fluid:inner tube side,crude oil \t\n", + "\t flow area is : ft**2 \t0.107430555556\n", + "\t mass velocity is : %lb/(hr)*(ft**2) \t600387.847447\n", + "\t V is : fps \t2.6683904331\n", + "\t reynolds number is : \t21289.2629579\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t667\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t553.61\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.788231357313\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.14770229996\n", + "\t delPr is : psi \t2.496\n", + "\t delPT is : psi \t5.64370229996\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t17.4\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0099\n" + ] + } + ], + "source": [ + "print\"\\t example 11.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=41300.; # lb/hr\n", + "w=64500.; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for gas \\t\"\n", + "c=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.935 \\t\" # from fig 18\n", + "delt=(0.935*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=14.8; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=358; # assuming 12 tube passes, from table 9\n", + "L=12;\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t When solved in a manner identical with the preceding examples and using the smallest integral number of bundle crosses (five) corresponding to a 28.8 in spacing \\t\"\n", + "UC1=22.7;\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UC1\n", + "UD2=14;\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD2\n", + "Rd1=0.027; \n", + "print\"\\t calculated Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "Rd1=0.005; \n", + "print\"\\t required Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd1\n", + "delPs1=5.2;\n", + "print\"\\t delPs is : psi \\t\",delPs1\n", + "delPt1=1.0;\n", + "print\"\\t delPt is : psi \\t\",delPt1\n", + "print\"\\t The first trial is disqualified because of failure to meet the required dirt factor and the the pressure drop is five times greater than the allowable \\t\"\n", + "print\"\\t This would be unsatisfactory, since gases require large inlet connections and the flow distribution on the first and third bundle crosses would be poor and the conditions of allowable pressure drop would still not be met \\t\"\n", + "UD1=15; # assume, from table 8\n", + "A1=((Q)/((UD1)*(delt)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.2618; # ft**2/lin ft\n", + "N1=(A1/(12*a1));\n", + "print\"\\t number of tubes are : %. \\t\",N1\n", + "N2=340; # assuming eight tube passes, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,gas \\t\"\n", + "ID=31; # in\n", + "C=0.25; # clearance\n", + "B=24; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As)/(2); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.050; # at 187.5F,lb/(ft)*(hr), from fig.15\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=105; # from fig.28\n", + "k=0.015; # Btu/(hr)(ft**2)( degree F/ft)\n", + "Z=0.94; # Z=((c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft)\n", + "Ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "phys=1;\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\t\"\n", + "Nt=340;\n", + "n=12; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : %lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.96; # at 90F,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=667; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.83; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "phyt=1;\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 33000, using fig.29\n", + "s=0.0012; # for reynolds number 33000,using fig.6\n", + "Ds=31/12; # ft\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 21300, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.052; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",delPT\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=-1*(((Uc-UD)/((UD)*(Uc)))-0.02); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "# end\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/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 new file mode 100644 index 00000000..d6ed4d36 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____1.ipynb @@ -0,0 +1,1339 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Condensation of Single Vapours " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1 pgno:274" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is : F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1199.91715754\n", + "\t number of tubes are : \t764.083773266\n", + "\t total surface area is : ft**2 \t1202.9264\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t100.74733825\n", + "\t hot fluid:shell side,propanol \t\n", + "\t flow area is : ft**2 \t1.33543445393\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t44929.1987513\n", + "\t G1 is : %.1f lb/(hr)*(lin ft) \t7500\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t124.701882845\n", + "\t tf is : F \t184.350941423\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t172\n", + "\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \t\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number is : \t85031.2935045\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.937425488924\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.32625636683\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t148.3\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n" + ] + } + ], + "source": [ + "print\"\\t example 12.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.;# inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=101; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(8*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "A2=(N2*8*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=31; # baffle spacing,in\n", + "PT=0.937;\n", + "L=8; # ft\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "G1=(W/(L*N2**(2/3)))# from eq.12.43\n", + "print\"\\t G1 is : %.1f lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.094; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.8; # from table 6\n", + "muf=0.62; # cp, from fig 14\n", + "ho=172; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "mu1=0.0242; # lb/(ft)*(hr), fir 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00141; # friction factor for reynolds number 84600, using fig.29\n", + "s=0.00381; # for reynolds number 84600,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overalcoefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is f F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1731.30904159\n", + "\t L is : ft \t11.5139815143\n", + "\t total surface area is : ft**2 \t1804.3896\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t67.164892167\n", + "\t hot fluid:shell side,propanol \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t399.12856929\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t114.545970488\n", + "\t tf is : F \t179.272985244\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t102\n", + "\t pressure drop for annulus \t\n", + "\t flow area is : ft**2 \t1.24927739239\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t48027.7641824\n", + "\t reynolds number is : \t90895.5206428\n", + "\t number of crosses are : \t5\n", + "\t delPs is : psi \t1.7726452141\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.0\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t8.2\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t93.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n" + ] + } + ], + "source": [ + "print\"\\t example 12.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.; # inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is f F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=(A1/(N2*a1));\n", + "print\"\\t L is : ft \\t\",L\n", + "A2=(N2*12*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "Do=0.0625; # ft\n", + "G1=(W/(3.14*N2*Do)); # from eq.12.36\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=12; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=100; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.0945; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.76; # from table 6\n", + "muf=0.65; # cp, from fig 14\n", + "ho=102; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=29; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # lb/(ft)*(hr), fig 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.0014; # friction factor for reynolds number 91000, using fig.29\n", + "s=0.00381; # for reynolds number 91000,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(5); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # eq 6.13,(hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3 pgno:285" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for butane \t\n", + "\t total heat required for desuperheating of butane is : Btu/hr \t861106.4\n", + "\t total heat required for condensing of butane is : Btu/hr \t3886162\n", + "\t total heat required for butane is : Btu/hr \t4747268.4\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4742500.0\n", + "\t deltw is : F \t28\n", + "\t t2 is : F \t93.0\n", + "\t for desuperheating \t\n", + "\t delt1 is : F \t37.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t63.4354185149\n", + "\t w1 is : lb/hr \t13574.5364366\n", + "\t for condensing \t\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t37.0\n", + "\t LMTD is : F \t47.6304956503\n", + "\t w1 is : lb/hr \t81589.787109\n", + "\t delt is : F \t49.8348522147\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t82.5\n", + "\t hot fluid:shell side,butane \t\n", + "\t flow area is :f ft**2 \t0.484375\n", + "\t desuperheating \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t57719.7419355\n", + "\t reynolds number is : \t145094.392606\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t45.2593972603\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.184555555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t734196.267309\n", + "\t V is : fps \t3.26309452137\n", + "\t reynolds number is : \t17989.5483506\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t800\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42.3603962493\n", + "\t clean surface required for desuperheating : ft**2 \t320.453481046\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t2912.29166667\n", + "\t tw is : F \t92.9489164087\n", + "\t tf is : F \t110.224458204\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t207\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t157.653742802\n", + "\t clean surface required for desuperheating : ft**2 \t517.525214808\n", + "\t total clean surface : ft**2 \t837.978695854\n", + "\t assumed condensing length percentage : \t0.617587556066\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t113.564132378\n", + "\t total surface area is : ft**2 \t1105.5616\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t86.0778119876\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n", + "\t pressure drop for annulus \t\n", + "\t desuperheating \t\n", + "\t number of crosses are : \t6.4\n", + "\t row is lb/ft**3 \t1.09763894416\n", + "\t s is \t0.0175622231065\n", + "\t delPs is : psi \t0.964762124732\n", + "\t condensation \t\n", + "\t number of crosses are : \t9.6\n", + "\t delPsc is : psi \t0.723571593549\n", + "\t delPS is : psi \t1.68833371828\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t delPr is : psi \t1.2\n", + "\t delPT is : psi \t4.1\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=130.; # outlet hot fluid,F\n", + "T3=125.; # after condensation\n", + "t1=65.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=27958; # lb/hr\n", + "w=135500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for butane \\t\"\n", + "c=0.44; # Btu/(lb)(F)\n", + "qd=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for desuperheating of butane is : Btu/hr \\t\",qd\n", + "HT2=309; # enthalpy at T2, Btu/lb\n", + "HT3=170; # enthalpy at T3, Btu/lb\n", + "qc=(W*(HT2-HT3)); # for condensation\n", + "print\"\\t total heat required for condensing of butane is : Btu/hr \\t\",qc\n", + "Q=qd+qc;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t1+deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for desuperheating \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDd=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDd\n", + "w1=(qd/LMTDd);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t for condensing \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDc=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w2=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T3)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,butane \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is :f ft**2 \\t\",As\n", + "print\"\\t desuperheating \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # at 165F,lb/(ft)*(hr), from fig.15\n", + "De=0.73/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=239; # from fig.28\n", + "k=0.012; # Btu/(hr)*(ft**2)*(F/ft), from table 5\n", + "Z=0.96; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=352;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=2.11; # at 82.5F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=800; # fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Ud=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ud\n", + "Ad=(qd/(Ud*LMTDd));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ad\n", + "print\"\\t for condensaton \\t\"\n", + "Lc=16*0.6; # condensation occurs 60 of the tube length\n", + "G1=(W/(Lc*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.075; # Btu/(hr)*(ft**2)*(F/ft)\n", + "sf=0.55; # from table 6\n", + "muf=0.14; # cp, from fig 14\n", + "ho=207; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ac\n", + "AC=Ad+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "lc=(Ac/(Ac+Ad));\n", + "print\"\\t assumed condensing length percentage : \\t\",lc\n", + "UC=((Ud*Ad)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t desuperheating \\t\"\n", + "Ld=6.4; #ft\n", + "De=0.0608; # fig 28\n", + "f=0.0013; # friction factor for reynolds number 145000, using fig.29\n", + "Ds=1.94; # ft\n", + "phys=1;\n", + "N=(12*Ld/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "row=(58.1/((359)*(625/492)*(14.7/99.7)));\n", + "print\"\\t row is lb/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "delPsd=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPsd\n", + "print\"\\t condensation \\t\"\n", + "N=(12*Lc/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq 12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "delPS=delPsd+delPsc;\n", + "print\"\\t delPS is : psi \\t\",delPS\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.075; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4 pgno:290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000.0\n", + "\t deltw is : F \t18\n", + "\t t2 is : F \t82.0\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.0\n", + "\t delt2 is : F \t30.0\n", + "\t LMTD is : F \t36.1514237668\n", + "\t w1 is : lb/hr \t84229.0477863\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20.0\n", + "\t delt2 is : F \t43.0\n", + "\t LMTD is f F \t30.0807554052\n", + "\t w1 is : lb/hr \t9948.22091297\n", + "\t delt is : F \t35.465033613\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t hot fluid:shell side,pentane \t\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t289.206403856\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.193993055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t860855.557544\n", + "\t V is : fps \t3.8260247002\n", + "\t reynolds number is : %.2e \t22477.8951137\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t tw is : F \t95.1964008573\n", + "\t tf is : F \t111.348200429\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t120\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t103.947681332\n", + "\t clean surface required for dcondensation : ft**2 \t803.043110735\n", + "\t subcooling \t\n", + "\t flow area is : ft**2 \t0.520833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t40320.0\n", + "\t reynolds number is : \t6939.13043478\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t68.2933263158\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t62.7761756841\n", + "\t clean surface required for desuperheating : ft**2 \t158.471279981\n", + "\t total clean surface : ft**2 \t961.514390716\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t97.1620302154\n", + "\t total surface area is : ft**2 \t1162.096\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t81.0408681377\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00204736690467\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t reynolds number is \t193536.0\n", + "\t rowvapour is ld/ft**3 \t0.342030962803\n", + "\t s is \t0.00547249540485\n", + "\t number of crosses are : \t14.4\n", + "\t delPsc is : psi \t1.29132938612\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.9\n", + "\t delPr is : psi \t1.6\n", + "\t delPT is : psi \t5.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "T3=100.; # after sucooling\n", + "t1=80.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "c=0.57; # Btu/(lb)(F)\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2;\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is f F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "print\"\\t for condensaton \\t\"\n", + "Do=0.0625; # ft\n", + "Nt=370; # number of tubes\n", + "G1=(W/(3.14*Nt*Do)); # from eq.12.42\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # at 90F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : %.2e \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=125; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.077; # Btu/(hr)*(ft**2)*(F/ft), table 4\n", + "sf=0.6; # from table 6\n", + "muf=0.19; # cp, from fig 14\n", + "ho=120; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(3040000/(104*36.4));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ID=25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.46; # at 112.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46.5; # from fig.28\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Z=1.51; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "Lc=13.4; #ft\n", + "De=0.0792; # fig 28\n", + "f=0.0012; # friction factor for reynolds number 193000, using fig.29\n", + "mu3=0.0165; # at 127.5F\n", + "Ds=2.08; # ft\n", + "phys=1;\n", + "Res1=(De*Gs/mu3);\n", + "print\"\\t reynolds number is \\t\",Res1\n", + "rowvap=(72.2/((359)*(590/492)*(14.7/25)));\n", + "print\"\\t rowvapour is ld/ft**3 \\t\",rowvap\n", + "s=(rowvap/62.5);\n", + "print\"\\t s is \\t\",s\n", + "N=(12*Lc/B)+(1); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 22500, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.1; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5 pgno:295" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000\n", + "\t deltw is : F \t18.2\n", + "\t t2 is : F \t81.8\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.2\n", + "\t delt2 is : F \t30\n", + "\t LMTD is : F \t36.2404655222\n", + "\t w1 is : lb/hr \t84022.0994992\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t43.2\n", + "\t LMTD is : F \t30.1594958556\n", + "\t w1 is : lb/hr \t9922.24808506\n", + "\t delt is : % F \t35.5529639184\n", + "\t caloric temperature of hot fluid is : F \t127\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,pentane \t\n", + "\t a is : in**2 \t123.75\n", + "\t number of submerged tubes are : \t93.3248407643\n", + "\t number of tubes for condensation are : \t276.675159236\n", + "\t flooded surface : \t0.252229299363\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1312.5\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.145062323071\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1151229.32312\n", + "\t V is : fps \t5.11657476943\n", + "\t reynolds number is : \t30059.8767704\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t251\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t189.718954672\n", + "\t clean surface required for dcondensation : ft**2 \t442.876673258\n", + "\t subcooling \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t50\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46.9772690634\n", + "\t clean surface required for desuperheating : ft**2 \t211.213812188\n", + "\t total clean surface : ft**2 \t654.090485446\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t143.625919769\n", + "\t total surface area is : ft**2 \t1160\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t80.9865065381\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0054\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t38391.2248629\n", + "\t reynolds number is : \t184277.879342\n", + "\t number of crosses are : \t10\n", + "\t delPsc is : psi \t1.0\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130; # inlet hot fluid,F\n", + "T2=125; # outlet hot fluid,F\n", + "T3=100; # after subcooling\n", + "t1=80; # inlet cold fluid,F\n", + "t3=100; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "c=0.57; # Btu/(lb)(\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)-++++++++-\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=18.2;\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : % F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "C1=0.198; # for 0.3Ds\n", + "Ds=25; # in\n", + "L=16; # ft\n", + "N=370\n", + "a=(C1*Ds**2);\n", + "print\"\\t a is : in**2 \\t\",a\n", + "N1=((N*a*4)/(3.14*Ds**2));\n", + "print\"\\t number of submerged tubes are : \\t\",N1\n", + "Nt=N-N1;\n", + "print\"\\t number of tubes for condensation are : \\t\",Nt\n", + "Af=(N1/N);\n", + "print\"\\t flooded surface : \\t\",Af\n", + "print\"\\t for condensaton \\t\"\n", + "G1=(W/(L*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=251; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ho=50; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A=1160; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "print\"\\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\\t\"\n", + "As=0.547; # ft**2\n", + "Gs=(W/(As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "De=0.0792; # fig 28\n", + "Res=((De)*(Gs)/0.0165); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00121; # friction factor for reynolds number 193000, using fig.29\n", + "s=0.00454; # for reynolds number 193000,using fig.6\n", + "Ds=2.08; # ft\n", + "B=18\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",round(delPsc)\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#e \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6 pgno:299" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for carbon disulfide \t\n", + "\t total heat required for carbon disulfide is : Btu/hr \t4200000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4200000.0\n", + "\t delt1 is : F \t91.0\n", + "\t delt2 is : F \t56.0\n", + "\t LMTD is : F \t72.1704928998\n", + "\t caloric temperature of hot fluid is : F \t176.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t cold fluid:shell side,water \t\n", + "\t flow area is : ft**2 \t0.1796875\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t667826.086957\n", + "\t reynolds number is : \t31112.8388747\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t786.545454545\n", + "\t tw is : F \t122.793674699\n", + "\t tf is : F \t149.396837349\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1044.06562495\n", + "\t reynolds number is : \t6141.56249973\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t0.251\n", + "\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t0.207493333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t0.207438610331\n", + "\t total surface area is : ft**2 \t555.9216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t104.682978368\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-4.81115068056\n", + "\t pressure drop for inner pipe \t\n", + "\t flow area is : ft**2 \t0.371208333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t80645.1612903\n", + "\t reynolds number is : \t143770.856507\n", + "\t row is ld/ft**3 \t0.572484035397\n", + "\t s is \t0.00915974456635\n", + "\t delPt is : psi \t0.4\n", + "\t allowable delPa is negligible psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t32.0\n", + "\t delPs is : psi \t8.4\n", + "\t allowable delPT is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=176.; # inlet hot fluid,F\n", + "T2=176.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=120000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for carbon disulfide \\t\"\n", + "l=140; # Btu/(lb)\n", + "Q=((W)*l); # Btu/hr\n", + "print\"\\t total heat required for carbon disulfide is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+T1)/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "hio=300; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t cold fluid:shell side,water \\t\"\n", + "ID=17.25; # in\n", + "C=0.25; # clearance\n", + "B=6; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.7; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.0792; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=103; # from fig.28\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Z=1.68; # Z=((c)*(mu1)/k)**(1/3); # prandelt number\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "kf=0.09; # Btu/(hr)*(ft**2)*(F/ft), from fig 14\n", + "sf=1.26; # from table 6\n", + "rowf=78.8; # lb/ft**3\n", + "muf=0.68; # cp, from fig 24\n", + "Nt=177;\n", + "D=0.0517; # ft\n", + "G1=(W/(3.14*Nt*D));\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "Ret=((4)*(G1)/muf); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(0.251*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(1/3)); # hi*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(-1)=0.251, from fig 12.12\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=.75; #ft\n", + "hio1=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "L=16;\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(30000/(0.372)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.029; # at inlet,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "row=(76.1/((359)*(636/492)*(14.7/39.7)));\n", + "print\"\\t row is ld/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "f=0.000138; # friction factor for reynolds number 143000, using fig.26\n", + "delPt=((f*(Gt**2)*(16)*(1))/(5.22*(10**10)*(0.0517)*(s)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt+0.1,1)\n", + "print\"\\t allowable delPa is negligible psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 31000, using fig.29\n", + "s=1; # for reynolds number 31000,using fig.6\n", + "Ds=17.25/12.; # ft\n", + "B=6.;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPT is 2 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7 pgno:308" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t223.55\n", + "\t area is : ft**2 \t31250.0\n", + "\t t2 is : F \t86.0\n", + "\t circulation rate is : gpm \t29176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 12.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "V=7.5; # fps\n", + "W=250000.;\n", + "CCl=0.85;\n", + "CT=1.;\n", + "CL=1.;\n", + "Ct=263.;\n", + "UD=(CCl*CT*CL*Ct*(V**(1/2)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(W/8);\n", + "print\"\\t area is : ft**2 \\t\",A\n", + "a1=0.229; # ft**2/ft, table 10\n", + "at=0.475; # in**2, table 10\n", + "t1=70;\n", + "Ts=91.72; #F\n", + "n=2;\n", + "L=26;\n", + "t2=((Ts)-((Ts-t1)/((10)**(0.000279*UD*L*n*a1/(V*at))))+8); \n", + "print\"\\t t2 is : F \\t\",round(t2) # calculation mistake in book\n", + "Go=(W*950)/((t2-t1)*500);\n", + "print\"\\t circulation rate is : gpm \\t\",round(Go)\n", + "# end\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/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 new file mode 100644 index 00000000..d6ed4d36 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____2.ipynb @@ -0,0 +1,1339 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Condensation of Single Vapours " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1 pgno:274" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is : F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1199.91715754\n", + "\t number of tubes are : \t764.083773266\n", + "\t total surface area is : ft**2 \t1202.9264\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t100.74733825\n", + "\t hot fluid:shell side,propanol \t\n", + "\t flow area is : ft**2 \t1.33543445393\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t44929.1987513\n", + "\t G1 is : %.1f lb/(hr)*(lin ft) \t7500\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t124.701882845\n", + "\t tf is : F \t184.350941423\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t172\n", + "\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \t\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number is : \t85031.2935045\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.937425488924\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.32625636683\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t148.3\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n" + ] + } + ], + "source": [ + "print\"\\t example 12.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.;# inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=101; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(8*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "A2=(N2*8*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=31; # baffle spacing,in\n", + "PT=0.937;\n", + "L=8; # ft\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "G1=(W/(L*N2**(2/3)))# from eq.12.43\n", + "print\"\\t G1 is : %.1f lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.094; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.8; # from table 6\n", + "muf=0.62; # cp, from fig 14\n", + "ho=172; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "mu1=0.0242; # lb/(ft)*(hr), fir 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00141; # friction factor for reynolds number 84600, using fig.29\n", + "s=0.00381; # for reynolds number 84600,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overalcoefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is f F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1731.30904159\n", + "\t L is : ft \t11.5139815143\n", + "\t total surface area is : ft**2 \t1804.3896\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t67.164892167\n", + "\t hot fluid:shell side,propanol \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t399.12856929\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t114.545970488\n", + "\t tf is : F \t179.272985244\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t102\n", + "\t pressure drop for annulus \t\n", + "\t flow area is : ft**2 \t1.24927739239\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t48027.7641824\n", + "\t reynolds number is : \t90895.5206428\n", + "\t number of crosses are : \t5\n", + "\t delPs is : psi \t1.7726452141\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.0\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t8.2\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t93.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n" + ] + } + ], + "source": [ + "print\"\\t example 12.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.; # inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is f F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=(A1/(N2*a1));\n", + "print\"\\t L is : ft \\t\",L\n", + "A2=(N2*12*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "Do=0.0625; # ft\n", + "G1=(W/(3.14*N2*Do)); # from eq.12.36\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=12; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=100; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.0945; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.76; # from table 6\n", + "muf=0.65; # cp, from fig 14\n", + "ho=102; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=29; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # lb/(ft)*(hr), fig 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.0014; # friction factor for reynolds number 91000, using fig.29\n", + "s=0.00381; # for reynolds number 91000,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(5); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # eq 6.13,(hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3 pgno:285" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for butane \t\n", + "\t total heat required for desuperheating of butane is : Btu/hr \t861106.4\n", + "\t total heat required for condensing of butane is : Btu/hr \t3886162\n", + "\t total heat required for butane is : Btu/hr \t4747268.4\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4742500.0\n", + "\t deltw is : F \t28\n", + "\t t2 is : F \t93.0\n", + "\t for desuperheating \t\n", + "\t delt1 is : F \t37.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t63.4354185149\n", + "\t w1 is : lb/hr \t13574.5364366\n", + "\t for condensing \t\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t37.0\n", + "\t LMTD is : F \t47.6304956503\n", + "\t w1 is : lb/hr \t81589.787109\n", + "\t delt is : F \t49.8348522147\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t82.5\n", + "\t hot fluid:shell side,butane \t\n", + "\t flow area is :f ft**2 \t0.484375\n", + "\t desuperheating \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t57719.7419355\n", + "\t reynolds number is : \t145094.392606\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t45.2593972603\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.184555555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t734196.267309\n", + "\t V is : fps \t3.26309452137\n", + "\t reynolds number is : \t17989.5483506\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t800\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42.3603962493\n", + "\t clean surface required for desuperheating : ft**2 \t320.453481046\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t2912.29166667\n", + "\t tw is : F \t92.9489164087\n", + "\t tf is : F \t110.224458204\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t207\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t157.653742802\n", + "\t clean surface required for desuperheating : ft**2 \t517.525214808\n", + "\t total clean surface : ft**2 \t837.978695854\n", + "\t assumed condensing length percentage : \t0.617587556066\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t113.564132378\n", + "\t total surface area is : ft**2 \t1105.5616\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t86.0778119876\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n", + "\t pressure drop for annulus \t\n", + "\t desuperheating \t\n", + "\t number of crosses are : \t6.4\n", + "\t row is lb/ft**3 \t1.09763894416\n", + "\t s is \t0.0175622231065\n", + "\t delPs is : psi \t0.964762124732\n", + "\t condensation \t\n", + "\t number of crosses are : \t9.6\n", + "\t delPsc is : psi \t0.723571593549\n", + "\t delPS is : psi \t1.68833371828\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t delPr is : psi \t1.2\n", + "\t delPT is : psi \t4.1\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=130.; # outlet hot fluid,F\n", + "T3=125.; # after condensation\n", + "t1=65.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=27958; # lb/hr\n", + "w=135500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for butane \\t\"\n", + "c=0.44; # Btu/(lb)(F)\n", + "qd=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for desuperheating of butane is : Btu/hr \\t\",qd\n", + "HT2=309; # enthalpy at T2, Btu/lb\n", + "HT3=170; # enthalpy at T3, Btu/lb\n", + "qc=(W*(HT2-HT3)); # for condensation\n", + "print\"\\t total heat required for condensing of butane is : Btu/hr \\t\",qc\n", + "Q=qd+qc;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t1+deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for desuperheating \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDd=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDd\n", + "w1=(qd/LMTDd);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t for condensing \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDc=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w2=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T3)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,butane \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is :f ft**2 \\t\",As\n", + "print\"\\t desuperheating \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # at 165F,lb/(ft)*(hr), from fig.15\n", + "De=0.73/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=239; # from fig.28\n", + "k=0.012; # Btu/(hr)*(ft**2)*(F/ft), from table 5\n", + "Z=0.96; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=352;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=2.11; # at 82.5F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=800; # fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Ud=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ud\n", + "Ad=(qd/(Ud*LMTDd));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ad\n", + "print\"\\t for condensaton \\t\"\n", + "Lc=16*0.6; # condensation occurs 60 of the tube length\n", + "G1=(W/(Lc*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.075; # Btu/(hr)*(ft**2)*(F/ft)\n", + "sf=0.55; # from table 6\n", + "muf=0.14; # cp, from fig 14\n", + "ho=207; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ac\n", + "AC=Ad+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "lc=(Ac/(Ac+Ad));\n", + "print\"\\t assumed condensing length percentage : \\t\",lc\n", + "UC=((Ud*Ad)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t desuperheating \\t\"\n", + "Ld=6.4; #ft\n", + "De=0.0608; # fig 28\n", + "f=0.0013; # friction factor for reynolds number 145000, using fig.29\n", + "Ds=1.94; # ft\n", + "phys=1;\n", + "N=(12*Ld/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "row=(58.1/((359)*(625/492)*(14.7/99.7)));\n", + "print\"\\t row is lb/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "delPsd=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPsd\n", + "print\"\\t condensation \\t\"\n", + "N=(12*Lc/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq 12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "delPS=delPsd+delPsc;\n", + "print\"\\t delPS is : psi \\t\",delPS\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.075; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4 pgno:290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000.0\n", + "\t deltw is : F \t18\n", + "\t t2 is : F \t82.0\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.0\n", + "\t delt2 is : F \t30.0\n", + "\t LMTD is : F \t36.1514237668\n", + "\t w1 is : lb/hr \t84229.0477863\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20.0\n", + "\t delt2 is : F \t43.0\n", + "\t LMTD is f F \t30.0807554052\n", + "\t w1 is : lb/hr \t9948.22091297\n", + "\t delt is : F \t35.465033613\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t hot fluid:shell side,pentane \t\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t289.206403856\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.193993055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t860855.557544\n", + "\t V is : fps \t3.8260247002\n", + "\t reynolds number is : %.2e \t22477.8951137\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t tw is : F \t95.1964008573\n", + "\t tf is : F \t111.348200429\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t120\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t103.947681332\n", + "\t clean surface required for dcondensation : ft**2 \t803.043110735\n", + "\t subcooling \t\n", + "\t flow area is : ft**2 \t0.520833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t40320.0\n", + "\t reynolds number is : \t6939.13043478\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t68.2933263158\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t62.7761756841\n", + "\t clean surface required for desuperheating : ft**2 \t158.471279981\n", + "\t total clean surface : ft**2 \t961.514390716\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t97.1620302154\n", + "\t total surface area is : ft**2 \t1162.096\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t81.0408681377\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00204736690467\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t reynolds number is \t193536.0\n", + "\t rowvapour is ld/ft**3 \t0.342030962803\n", + "\t s is \t0.00547249540485\n", + "\t number of crosses are : \t14.4\n", + "\t delPsc is : psi \t1.29132938612\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.9\n", + "\t delPr is : psi \t1.6\n", + "\t delPT is : psi \t5.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "T3=100.; # after sucooling\n", + "t1=80.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "c=0.57; # Btu/(lb)(F)\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2;\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is f F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "print\"\\t for condensaton \\t\"\n", + "Do=0.0625; # ft\n", + "Nt=370; # number of tubes\n", + "G1=(W/(3.14*Nt*Do)); # from eq.12.42\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # at 90F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : %.2e \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=125; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.077; # Btu/(hr)*(ft**2)*(F/ft), table 4\n", + "sf=0.6; # from table 6\n", + "muf=0.19; # cp, from fig 14\n", + "ho=120; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(3040000/(104*36.4));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ID=25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.46; # at 112.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46.5; # from fig.28\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Z=1.51; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "Lc=13.4; #ft\n", + "De=0.0792; # fig 28\n", + "f=0.0012; # friction factor for reynolds number 193000, using fig.29\n", + "mu3=0.0165; # at 127.5F\n", + "Ds=2.08; # ft\n", + "phys=1;\n", + "Res1=(De*Gs/mu3);\n", + "print\"\\t reynolds number is \\t\",Res1\n", + "rowvap=(72.2/((359)*(590/492)*(14.7/25)));\n", + "print\"\\t rowvapour is ld/ft**3 \\t\",rowvap\n", + "s=(rowvap/62.5);\n", + "print\"\\t s is \\t\",s\n", + "N=(12*Lc/B)+(1); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 22500, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.1; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5 pgno:295" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000\n", + "\t deltw is : F \t18.2\n", + "\t t2 is : F \t81.8\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.2\n", + "\t delt2 is : F \t30\n", + "\t LMTD is : F \t36.2404655222\n", + "\t w1 is : lb/hr \t84022.0994992\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t43.2\n", + "\t LMTD is : F \t30.1594958556\n", + "\t w1 is : lb/hr \t9922.24808506\n", + "\t delt is : % F \t35.5529639184\n", + "\t caloric temperature of hot fluid is : F \t127\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,pentane \t\n", + "\t a is : in**2 \t123.75\n", + "\t number of submerged tubes are : \t93.3248407643\n", + "\t number of tubes for condensation are : \t276.675159236\n", + "\t flooded surface : \t0.252229299363\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1312.5\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.145062323071\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1151229.32312\n", + "\t V is : fps \t5.11657476943\n", + "\t reynolds number is : \t30059.8767704\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t251\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t189.718954672\n", + "\t clean surface required for dcondensation : ft**2 \t442.876673258\n", + "\t subcooling \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t50\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46.9772690634\n", + "\t clean surface required for desuperheating : ft**2 \t211.213812188\n", + "\t total clean surface : ft**2 \t654.090485446\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t143.625919769\n", + "\t total surface area is : ft**2 \t1160\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t80.9865065381\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0054\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t38391.2248629\n", + "\t reynolds number is : \t184277.879342\n", + "\t number of crosses are : \t10\n", + "\t delPsc is : psi \t1.0\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130; # inlet hot fluid,F\n", + "T2=125; # outlet hot fluid,F\n", + "T3=100; # after subcooling\n", + "t1=80; # inlet cold fluid,F\n", + "t3=100; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "c=0.57; # Btu/(lb)(\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)-++++++++-\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=18.2;\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : % F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "C1=0.198; # for 0.3Ds\n", + "Ds=25; # in\n", + "L=16; # ft\n", + "N=370\n", + "a=(C1*Ds**2);\n", + "print\"\\t a is : in**2 \\t\",a\n", + "N1=((N*a*4)/(3.14*Ds**2));\n", + "print\"\\t number of submerged tubes are : \\t\",N1\n", + "Nt=N-N1;\n", + "print\"\\t number of tubes for condensation are : \\t\",Nt\n", + "Af=(N1/N);\n", + "print\"\\t flooded surface : \\t\",Af\n", + "print\"\\t for condensaton \\t\"\n", + "G1=(W/(L*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=251; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ho=50; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A=1160; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "print\"\\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\\t\"\n", + "As=0.547; # ft**2\n", + "Gs=(W/(As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "De=0.0792; # fig 28\n", + "Res=((De)*(Gs)/0.0165); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00121; # friction factor for reynolds number 193000, using fig.29\n", + "s=0.00454; # for reynolds number 193000,using fig.6\n", + "Ds=2.08; # ft\n", + "B=18\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",round(delPsc)\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#e \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6 pgno:299" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for carbon disulfide \t\n", + "\t total heat required for carbon disulfide is : Btu/hr \t4200000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4200000.0\n", + "\t delt1 is : F \t91.0\n", + "\t delt2 is : F \t56.0\n", + "\t LMTD is : F \t72.1704928998\n", + "\t caloric temperature of hot fluid is : F \t176.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t cold fluid:shell side,water \t\n", + "\t flow area is : ft**2 \t0.1796875\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t667826.086957\n", + "\t reynolds number is : \t31112.8388747\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t786.545454545\n", + "\t tw is : F \t122.793674699\n", + "\t tf is : F \t149.396837349\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1044.06562495\n", + "\t reynolds number is : \t6141.56249973\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t0.251\n", + "\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t0.207493333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t0.207438610331\n", + "\t total surface area is : ft**2 \t555.9216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t104.682978368\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-4.81115068056\n", + "\t pressure drop for inner pipe \t\n", + "\t flow area is : ft**2 \t0.371208333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t80645.1612903\n", + "\t reynolds number is : \t143770.856507\n", + "\t row is ld/ft**3 \t0.572484035397\n", + "\t s is \t0.00915974456635\n", + "\t delPt is : psi \t0.4\n", + "\t allowable delPa is negligible psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t32.0\n", + "\t delPs is : psi \t8.4\n", + "\t allowable delPT is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=176.; # inlet hot fluid,F\n", + "T2=176.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=120000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for carbon disulfide \\t\"\n", + "l=140; # Btu/(lb)\n", + "Q=((W)*l); # Btu/hr\n", + "print\"\\t total heat required for carbon disulfide is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+T1)/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "hio=300; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t cold fluid:shell side,water \\t\"\n", + "ID=17.25; # in\n", + "C=0.25; # clearance\n", + "B=6; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.7; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.0792; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=103; # from fig.28\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Z=1.68; # Z=((c)*(mu1)/k)**(1/3); # prandelt number\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "kf=0.09; # Btu/(hr)*(ft**2)*(F/ft), from fig 14\n", + "sf=1.26; # from table 6\n", + "rowf=78.8; # lb/ft**3\n", + "muf=0.68; # cp, from fig 24\n", + "Nt=177;\n", + "D=0.0517; # ft\n", + "G1=(W/(3.14*Nt*D));\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "Ret=((4)*(G1)/muf); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(0.251*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(1/3)); # hi*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(-1)=0.251, from fig 12.12\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=.75; #ft\n", + "hio1=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "L=16;\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(30000/(0.372)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.029; # at inlet,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "row=(76.1/((359)*(636/492)*(14.7/39.7)));\n", + "print\"\\t row is ld/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "f=0.000138; # friction factor for reynolds number 143000, using fig.26\n", + "delPt=((f*(Gt**2)*(16)*(1))/(5.22*(10**10)*(0.0517)*(s)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt+0.1,1)\n", + "print\"\\t allowable delPa is negligible psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 31000, using fig.29\n", + "s=1; # for reynolds number 31000,using fig.6\n", + "Ds=17.25/12.; # ft\n", + "B=6.;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPT is 2 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7 pgno:308" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t223.55\n", + "\t area is : ft**2 \t31250.0\n", + "\t t2 is : F \t86.0\n", + "\t circulation rate is : gpm \t29176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 12.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "V=7.5; # fps\n", + "W=250000.;\n", + "CCl=0.85;\n", + "CT=1.;\n", + "CL=1.;\n", + "Ct=263.;\n", + "UD=(CCl*CT*CL*Ct*(V**(1/2)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(W/8);\n", + "print\"\\t area is : ft**2 \\t\",A\n", + "a1=0.229; # ft**2/ft, table 10\n", + "at=0.475; # in**2, table 10\n", + "t1=70;\n", + "Ts=91.72; #F\n", + "n=2;\n", + "L=26;\n", + "t2=((Ts)-((Ts-t1)/((10)**(0.000279*UD*L*n*a1/(V*at))))+8); \n", + "print\"\\t t2 is : F \\t\",round(t2) # calculation mistake in book\n", + "Go=(W*950)/((t2-t1)*500);\n", + "print\"\\t circulation rate is : gpm \\t\",round(Go)\n", + "# end\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/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 new file mode 100644 index 00000000..d6ed4d36 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____3.ipynb @@ -0,0 +1,1339 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Condensation of Single Vapours " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1 pgno:274" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is : F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1199.91715754\n", + "\t number of tubes are : \t764.083773266\n", + "\t total surface area is : ft**2 \t1202.9264\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t100.74733825\n", + "\t hot fluid:shell side,propanol \t\n", + "\t flow area is : ft**2 \t1.33543445393\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t44929.1987513\n", + "\t G1 is : %.1f lb/(hr)*(lin ft) \t7500\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t124.701882845\n", + "\t tf is : F \t184.350941423\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t172\n", + "\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \t\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number is : \t85031.2935045\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.937425488924\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.32625636683\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t148.3\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n" + ] + } + ], + "source": [ + "print\"\\t example 12.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.;# inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=101; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(8*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "A2=(N2*8*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=31; # baffle spacing,in\n", + "PT=0.937;\n", + "L=8; # ft\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "G1=(W/(L*N2**(2/3)))# from eq.12.43\n", + "print\"\\t G1 is : %.1f lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.094; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.8; # from table 6\n", + "muf=0.62; # cp, from fig 14\n", + "ho=172; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "mu1=0.0242; # lb/(ft)*(hr), fir 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00141; # friction factor for reynolds number 84600, using fig.29\n", + "s=0.00381; # for reynolds number 84600,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overalcoefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is f F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1731.30904159\n", + "\t L is : ft \t11.5139815143\n", + "\t total surface area is : ft**2 \t1804.3896\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t67.164892167\n", + "\t hot fluid:shell side,propanol \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t399.12856929\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t114.545970488\n", + "\t tf is : F \t179.272985244\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t102\n", + "\t pressure drop for annulus \t\n", + "\t flow area is : ft**2 \t1.24927739239\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t48027.7641824\n", + "\t reynolds number is : \t90895.5206428\n", + "\t number of crosses are : \t5\n", + "\t delPs is : psi \t1.7726452141\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.0\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t8.2\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t93.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n" + ] + } + ], + "source": [ + "print\"\\t example 12.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.; # inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is f F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=(A1/(N2*a1));\n", + "print\"\\t L is : ft \\t\",L\n", + "A2=(N2*12*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "Do=0.0625; # ft\n", + "G1=(W/(3.14*N2*Do)); # from eq.12.36\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=12; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=100; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.0945; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.76; # from table 6\n", + "muf=0.65; # cp, from fig 14\n", + "ho=102; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=29; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # lb/(ft)*(hr), fig 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.0014; # friction factor for reynolds number 91000, using fig.29\n", + "s=0.00381; # for reynolds number 91000,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(5); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # eq 6.13,(hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3 pgno:285" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for butane \t\n", + "\t total heat required for desuperheating of butane is : Btu/hr \t861106.4\n", + "\t total heat required for condensing of butane is : Btu/hr \t3886162\n", + "\t total heat required for butane is : Btu/hr \t4747268.4\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4742500.0\n", + "\t deltw is : F \t28\n", + "\t t2 is : F \t93.0\n", + "\t for desuperheating \t\n", + "\t delt1 is : F \t37.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t63.4354185149\n", + "\t w1 is : lb/hr \t13574.5364366\n", + "\t for condensing \t\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t37.0\n", + "\t LMTD is : F \t47.6304956503\n", + "\t w1 is : lb/hr \t81589.787109\n", + "\t delt is : F \t49.8348522147\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t82.5\n", + "\t hot fluid:shell side,butane \t\n", + "\t flow area is :f ft**2 \t0.484375\n", + "\t desuperheating \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t57719.7419355\n", + "\t reynolds number is : \t145094.392606\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t45.2593972603\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.184555555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t734196.267309\n", + "\t V is : fps \t3.26309452137\n", + "\t reynolds number is : \t17989.5483506\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t800\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42.3603962493\n", + "\t clean surface required for desuperheating : ft**2 \t320.453481046\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t2912.29166667\n", + "\t tw is : F \t92.9489164087\n", + "\t tf is : F \t110.224458204\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t207\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t157.653742802\n", + "\t clean surface required for desuperheating : ft**2 \t517.525214808\n", + "\t total clean surface : ft**2 \t837.978695854\n", + "\t assumed condensing length percentage : \t0.617587556066\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t113.564132378\n", + "\t total surface area is : ft**2 \t1105.5616\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t86.0778119876\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n", + "\t pressure drop for annulus \t\n", + "\t desuperheating \t\n", + "\t number of crosses are : \t6.4\n", + "\t row is lb/ft**3 \t1.09763894416\n", + "\t s is \t0.0175622231065\n", + "\t delPs is : psi \t0.964762124732\n", + "\t condensation \t\n", + "\t number of crosses are : \t9.6\n", + "\t delPsc is : psi \t0.723571593549\n", + "\t delPS is : psi \t1.68833371828\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t delPr is : psi \t1.2\n", + "\t delPT is : psi \t4.1\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=130.; # outlet hot fluid,F\n", + "T3=125.; # after condensation\n", + "t1=65.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=27958; # lb/hr\n", + "w=135500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for butane \\t\"\n", + "c=0.44; # Btu/(lb)(F)\n", + "qd=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for desuperheating of butane is : Btu/hr \\t\",qd\n", + "HT2=309; # enthalpy at T2, Btu/lb\n", + "HT3=170; # enthalpy at T3, Btu/lb\n", + "qc=(W*(HT2-HT3)); # for condensation\n", + "print\"\\t total heat required for condensing of butane is : Btu/hr \\t\",qc\n", + "Q=qd+qc;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t1+deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for desuperheating \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDd=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDd\n", + "w1=(qd/LMTDd);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t for condensing \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDc=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w2=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T3)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,butane \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is :f ft**2 \\t\",As\n", + "print\"\\t desuperheating \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # at 165F,lb/(ft)*(hr), from fig.15\n", + "De=0.73/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=239; # from fig.28\n", + "k=0.012; # Btu/(hr)*(ft**2)*(F/ft), from table 5\n", + "Z=0.96; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=352;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=2.11; # at 82.5F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=800; # fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Ud=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ud\n", + "Ad=(qd/(Ud*LMTDd));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ad\n", + "print\"\\t for condensaton \\t\"\n", + "Lc=16*0.6; # condensation occurs 60 of the tube length\n", + "G1=(W/(Lc*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.075; # Btu/(hr)*(ft**2)*(F/ft)\n", + "sf=0.55; # from table 6\n", + "muf=0.14; # cp, from fig 14\n", + "ho=207; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ac\n", + "AC=Ad+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "lc=(Ac/(Ac+Ad));\n", + "print\"\\t assumed condensing length percentage : \\t\",lc\n", + "UC=((Ud*Ad)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t desuperheating \\t\"\n", + "Ld=6.4; #ft\n", + "De=0.0608; # fig 28\n", + "f=0.0013; # friction factor for reynolds number 145000, using fig.29\n", + "Ds=1.94; # ft\n", + "phys=1;\n", + "N=(12*Ld/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "row=(58.1/((359)*(625/492)*(14.7/99.7)));\n", + "print\"\\t row is lb/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "delPsd=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPsd\n", + "print\"\\t condensation \\t\"\n", + "N=(12*Lc/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq 12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "delPS=delPsd+delPsc;\n", + "print\"\\t delPS is : psi \\t\",delPS\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.075; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4 pgno:290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000.0\n", + "\t deltw is : F \t18\n", + "\t t2 is : F \t82.0\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.0\n", + "\t delt2 is : F \t30.0\n", + "\t LMTD is : F \t36.1514237668\n", + "\t w1 is : lb/hr \t84229.0477863\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20.0\n", + "\t delt2 is : F \t43.0\n", + "\t LMTD is f F \t30.0807554052\n", + "\t w1 is : lb/hr \t9948.22091297\n", + "\t delt is : F \t35.465033613\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t hot fluid:shell side,pentane \t\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t289.206403856\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.193993055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t860855.557544\n", + "\t V is : fps \t3.8260247002\n", + "\t reynolds number is : %.2e \t22477.8951137\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t tw is : F \t95.1964008573\n", + "\t tf is : F \t111.348200429\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t120\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t103.947681332\n", + "\t clean surface required for dcondensation : ft**2 \t803.043110735\n", + "\t subcooling \t\n", + "\t flow area is : ft**2 \t0.520833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t40320.0\n", + "\t reynolds number is : \t6939.13043478\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t68.2933263158\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t62.7761756841\n", + "\t clean surface required for desuperheating : ft**2 \t158.471279981\n", + "\t total clean surface : ft**2 \t961.514390716\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t97.1620302154\n", + "\t total surface area is : ft**2 \t1162.096\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t81.0408681377\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00204736690467\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t reynolds number is \t193536.0\n", + "\t rowvapour is ld/ft**3 \t0.342030962803\n", + "\t s is \t0.00547249540485\n", + "\t number of crosses are : \t14.4\n", + "\t delPsc is : psi \t1.29132938612\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.9\n", + "\t delPr is : psi \t1.6\n", + "\t delPT is : psi \t5.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "T3=100.; # after sucooling\n", + "t1=80.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "c=0.57; # Btu/(lb)(F)\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2;\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is f F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "print\"\\t for condensaton \\t\"\n", + "Do=0.0625; # ft\n", + "Nt=370; # number of tubes\n", + "G1=(W/(3.14*Nt*Do)); # from eq.12.42\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # at 90F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : %.2e \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=125; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.077; # Btu/(hr)*(ft**2)*(F/ft), table 4\n", + "sf=0.6; # from table 6\n", + "muf=0.19; # cp, from fig 14\n", + "ho=120; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(3040000/(104*36.4));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ID=25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.46; # at 112.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46.5; # from fig.28\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Z=1.51; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "Lc=13.4; #ft\n", + "De=0.0792; # fig 28\n", + "f=0.0012; # friction factor for reynolds number 193000, using fig.29\n", + "mu3=0.0165; # at 127.5F\n", + "Ds=2.08; # ft\n", + "phys=1;\n", + "Res1=(De*Gs/mu3);\n", + "print\"\\t reynolds number is \\t\",Res1\n", + "rowvap=(72.2/((359)*(590/492)*(14.7/25)));\n", + "print\"\\t rowvapour is ld/ft**3 \\t\",rowvap\n", + "s=(rowvap/62.5);\n", + "print\"\\t s is \\t\",s\n", + "N=(12*Lc/B)+(1); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 22500, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.1; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5 pgno:295" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000\n", + "\t deltw is : F \t18.2\n", + "\t t2 is : F \t81.8\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.2\n", + "\t delt2 is : F \t30\n", + "\t LMTD is : F \t36.2404655222\n", + "\t w1 is : lb/hr \t84022.0994992\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t43.2\n", + "\t LMTD is : F \t30.1594958556\n", + "\t w1 is : lb/hr \t9922.24808506\n", + "\t delt is : % F \t35.5529639184\n", + "\t caloric temperature of hot fluid is : F \t127\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,pentane \t\n", + "\t a is : in**2 \t123.75\n", + "\t number of submerged tubes are : \t93.3248407643\n", + "\t number of tubes for condensation are : \t276.675159236\n", + "\t flooded surface : \t0.252229299363\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1312.5\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.145062323071\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1151229.32312\n", + "\t V is : fps \t5.11657476943\n", + "\t reynolds number is : \t30059.8767704\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t251\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t189.718954672\n", + "\t clean surface required for dcondensation : ft**2 \t442.876673258\n", + "\t subcooling \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t50\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46.9772690634\n", + "\t clean surface required for desuperheating : ft**2 \t211.213812188\n", + "\t total clean surface : ft**2 \t654.090485446\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t143.625919769\n", + "\t total surface area is : ft**2 \t1160\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t80.9865065381\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0054\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t38391.2248629\n", + "\t reynolds number is : \t184277.879342\n", + "\t number of crosses are : \t10\n", + "\t delPsc is : psi \t1.0\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130; # inlet hot fluid,F\n", + "T2=125; # outlet hot fluid,F\n", + "T3=100; # after subcooling\n", + "t1=80; # inlet cold fluid,F\n", + "t3=100; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "c=0.57; # Btu/(lb)(\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)-++++++++-\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=18.2;\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : % F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "C1=0.198; # for 0.3Ds\n", + "Ds=25; # in\n", + "L=16; # ft\n", + "N=370\n", + "a=(C1*Ds**2);\n", + "print\"\\t a is : in**2 \\t\",a\n", + "N1=((N*a*4)/(3.14*Ds**2));\n", + "print\"\\t number of submerged tubes are : \\t\",N1\n", + "Nt=N-N1;\n", + "print\"\\t number of tubes for condensation are : \\t\",Nt\n", + "Af=(N1/N);\n", + "print\"\\t flooded surface : \\t\",Af\n", + "print\"\\t for condensaton \\t\"\n", + "G1=(W/(L*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=251; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ho=50; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A=1160; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "print\"\\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\\t\"\n", + "As=0.547; # ft**2\n", + "Gs=(W/(As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "De=0.0792; # fig 28\n", + "Res=((De)*(Gs)/0.0165); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00121; # friction factor for reynolds number 193000, using fig.29\n", + "s=0.00454; # for reynolds number 193000,using fig.6\n", + "Ds=2.08; # ft\n", + "B=18\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",round(delPsc)\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#e \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6 pgno:299" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for carbon disulfide \t\n", + "\t total heat required for carbon disulfide is : Btu/hr \t4200000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4200000.0\n", + "\t delt1 is : F \t91.0\n", + "\t delt2 is : F \t56.0\n", + "\t LMTD is : F \t72.1704928998\n", + "\t caloric temperature of hot fluid is : F \t176.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t cold fluid:shell side,water \t\n", + "\t flow area is : ft**2 \t0.1796875\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t667826.086957\n", + "\t reynolds number is : \t31112.8388747\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t786.545454545\n", + "\t tw is : F \t122.793674699\n", + "\t tf is : F \t149.396837349\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1044.06562495\n", + "\t reynolds number is : \t6141.56249973\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t0.251\n", + "\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t0.207493333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t0.207438610331\n", + "\t total surface area is : ft**2 \t555.9216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t104.682978368\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-4.81115068056\n", + "\t pressure drop for inner pipe \t\n", + "\t flow area is : ft**2 \t0.371208333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t80645.1612903\n", + "\t reynolds number is : \t143770.856507\n", + "\t row is ld/ft**3 \t0.572484035397\n", + "\t s is \t0.00915974456635\n", + "\t delPt is : psi \t0.4\n", + "\t allowable delPa is negligible psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t32.0\n", + "\t delPs is : psi \t8.4\n", + "\t allowable delPT is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=176.; # inlet hot fluid,F\n", + "T2=176.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=120000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for carbon disulfide \\t\"\n", + "l=140; # Btu/(lb)\n", + "Q=((W)*l); # Btu/hr\n", + "print\"\\t total heat required for carbon disulfide is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+T1)/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "hio=300; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t cold fluid:shell side,water \\t\"\n", + "ID=17.25; # in\n", + "C=0.25; # clearance\n", + "B=6; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.7; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.0792; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=103; # from fig.28\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Z=1.68; # Z=((c)*(mu1)/k)**(1/3); # prandelt number\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "kf=0.09; # Btu/(hr)*(ft**2)*(F/ft), from fig 14\n", + "sf=1.26; # from table 6\n", + "rowf=78.8; # lb/ft**3\n", + "muf=0.68; # cp, from fig 24\n", + "Nt=177;\n", + "D=0.0517; # ft\n", + "G1=(W/(3.14*Nt*D));\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "Ret=((4)*(G1)/muf); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(0.251*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(1/3)); # hi*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(-1)=0.251, from fig 12.12\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=.75; #ft\n", + "hio1=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "L=16;\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(30000/(0.372)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.029; # at inlet,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "row=(76.1/((359)*(636/492)*(14.7/39.7)));\n", + "print\"\\t row is ld/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "f=0.000138; # friction factor for reynolds number 143000, using fig.26\n", + "delPt=((f*(Gt**2)*(16)*(1))/(5.22*(10**10)*(0.0517)*(s)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt+0.1,1)\n", + "print\"\\t allowable delPa is negligible psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 31000, using fig.29\n", + "s=1; # for reynolds number 31000,using fig.6\n", + "Ds=17.25/12.; # ft\n", + "B=6.;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPT is 2 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7 pgno:308" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t223.55\n", + "\t area is : ft**2 \t31250.0\n", + "\t t2 is : F \t86.0\n", + "\t circulation rate is : gpm \t29176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 12.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "V=7.5; # fps\n", + "W=250000.;\n", + "CCl=0.85;\n", + "CT=1.;\n", + "CL=1.;\n", + "Ct=263.;\n", + "UD=(CCl*CT*CL*Ct*(V**(1/2)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(W/8);\n", + "print\"\\t area is : ft**2 \\t\",A\n", + "a1=0.229; # ft**2/ft, table 10\n", + "at=0.475; # in**2, table 10\n", + "t1=70;\n", + "Ts=91.72; #F\n", + "n=2;\n", + "L=26;\n", + "t2=((Ts)-((Ts-t1)/((10)**(0.000279*UD*L*n*a1/(V*at))))+8); \n", + "print\"\\t t2 is : F \\t\",round(t2) # calculation mistake in book\n", + "Go=(W*950)/((t2-t1)*500);\n", + "print\"\\t circulation rate is : gpm \\t\",round(Go)\n", + "# end\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/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 new file mode 100644 index 00000000..d6ed4d36 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_12_Condensation_of_Single_Vapours_____4.ipynb @@ -0,0 +1,1339 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Condensation of Single Vapours " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1 pgno:274" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is : F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1199.91715754\n", + "\t number of tubes are : \t764.083773266\n", + "\t total surface area is : ft**2 \t1202.9264\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t100.74733825\n", + "\t hot fluid:shell side,propanol \t\n", + "\t flow area is : ft**2 \t1.33543445393\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t44929.1987513\n", + "\t G1 is : %.1f lb/(hr)*(lin ft) \t7500\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t124.701882845\n", + "\t tf is : F \t184.350941423\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t172\n", + "\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \t\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number is : \t85031.2935045\n", + "\t number of crosses are : \t3\n", + "\t delPs is : psi \t0.937425488924\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.32625636683\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t148.3\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n" + ] + } + ], + "source": [ + "print\"\\t example 12.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.;# inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=101; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "N1=(A1/(8*a1));\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "A2=(N2*8*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=31; # baffle spacing,in\n", + "PT=0.937;\n", + "L=8; # ft\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "G1=(W/(L*N2**(2/3)))# from eq.12.43\n", + "print\"\\t G1 is : %.1f lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio # calculation mistake\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.094; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.8; # from table 6\n", + "muf=0.62; # cp, from fig 14\n", + "ho=172; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t Based on h=172 instead of the assumed 200 a new value of tw,and tf could be obtained to give a more exact value of h based on fluid properties at a value of tf more nearly correct \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "mu1=0.0242; # lb/(ft)*(hr), fir 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00141; # friction factor for reynolds number 84600, using fig.29\n", + "s=0.00381; # for reynolds number 84600,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(3); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overalcoefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for propanol \t\n", + "\t total heat required for propanol is : Btu/hr \t17100000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t17080000.0\n", + "\t delt1 is : F \t159.0\n", + "\t delt2 is : F \t124.0\n", + "\t LMTD is f F \t140.93382183\n", + "\t caloric temperature of hot fluid is : F \t244.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t A1 is : ft**2 \t1731.30904159\n", + "\t L is : ft \t11.5139815143\n", + "\t total surface area is : ft**2 \t1804.3896\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t67.164892167\n", + "\t hot fluid:shell side,propanol \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t399.12856929\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.401618055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1215084.81317\n", + "\t V is : fps \t5.40037694742\n", + "\t reynolds number is : \t36103.3820924\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t1300\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1074.66666667\n", + "\t tw is : F \t114.545970488\n", + "\t tf is : F \t179.272985244\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t102\n", + "\t pressure drop for annulus \t\n", + "\t flow area is : ft**2 \t1.24927739239\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t48027.7641824\n", + "\t reynolds number is : \t90895.5206428\n", + "\t number of crosses are : \t5\n", + "\t delPs is : psi \t1.7726452141\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.0\n", + "\t delPr is : psi \t3.2\n", + "\t delPT is : psi \t8.2\n", + "\t allowable delPT is 10 psi \t\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t93.2\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.004\n" + ] + } + ], + "source": [ + "print\"\\t example 12.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=244.; # inlet hot fluid,F\n", + "T2=244.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=488000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for propanol \\t\"\n", + "l=285; # Btu/(lb)\n", + "Q=((W)*(l)); # Btu/hr\n", + "print\"\\t total heat required for propanol is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is f F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "UD1=70; # assume, from table 8\n", + "A1=((Q)/((UD1)*(LMTD)));\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "N2=766; # assuming 4 tube passes, from table 9\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=(A1/(N2*a1));\n", + "print\"\\t L is : ft \\t\",L\n", + "A2=(N2*12*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "print\"\\t hot fluid:shell side,propanol \\t\"\n", + "Do=0.0625; # ft\n", + "G1=(W/(3.14*N2*Do)); # from eq.12.36\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=766;\n", + "n=4; # number of passes\n", + "L=12; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.74; # at 102.5F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=1300; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=100; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.0945; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "sf=0.76; # from table 6\n", + "muf=0.65; # cp, from fig 14\n", + "ho=102; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "ID=31; # in\n", + "C=0.1875; # clearance\n", + "B=29; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,from eq 7.1,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,from eq 7.2,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # lb/(ft)*(hr), fig 15\n", + "De=0.0458; # fig 28\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.0014; # friction factor for reynolds number 91000, using fig.29\n", + "s=0.00381; # for reynolds number 91000,using fig.6\n", + "Ds=31/12; # ft\n", + "phys=1;\n", + "N=(5); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00019; # friction factor for reynolds number 36200, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.2; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",round(Uc,1)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # eq 6.13,(hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3 pgno:285" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for butane \t\n", + "\t total heat required for desuperheating of butane is : Btu/hr \t861106.4\n", + "\t total heat required for condensing of butane is : Btu/hr \t3886162\n", + "\t total heat required for butane is : Btu/hr \t4747268.4\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4742500.0\n", + "\t deltw is : F \t28\n", + "\t t2 is : F \t93.0\n", + "\t for desuperheating \t\n", + "\t delt1 is : F \t37.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t63.4354185149\n", + "\t w1 is : lb/hr \t13574.5364366\n", + "\t for condensing \t\n", + "\t delt1 is : F \t60.0\n", + "\t delt2 is : F \t37.0\n", + "\t LMTD is : F \t47.6304956503\n", + "\t w1 is : lb/hr \t81589.787109\n", + "\t delt is : F \t49.8348522147\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t82.5\n", + "\t hot fluid:shell side,butane \t\n", + "\t flow area is :f ft**2 \t0.484375\n", + "\t desuperheating \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t57719.7419355\n", + "\t reynolds number is : \t145094.392606\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t45.2593972603\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.184555555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t734196.267309\n", + "\t V is : fps \t3.26309452137\n", + "\t reynolds number is : \t17989.5483506\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t800\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t42.3603962493\n", + "\t clean surface required for desuperheating : ft**2 \t320.453481046\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t2912.29166667\n", + "\t tw is : F \t92.9489164087\n", + "\t tf is : F \t110.224458204\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t207\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t157.653742802\n", + "\t clean surface required for desuperheating : ft**2 \t517.525214808\n", + "\t total clean surface : ft**2 \t837.978695854\n", + "\t assumed condensing length percentage : \t0.617587556066\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t113.564132378\n", + "\t total surface area is : ft**2 \t1105.5616\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t86.0778119876\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.003\n", + "\t pressure drop for annulus \t\n", + "\t desuperheating \t\n", + "\t number of crosses are : \t6.4\n", + "\t row is lb/ft**3 \t1.09763894416\n", + "\t s is \t0.0175622231065\n", + "\t delPs is : psi \t0.964762124732\n", + "\t condensation \t\n", + "\t number of crosses are : \t9.6\n", + "\t delPsc is : psi \t0.723571593549\n", + "\t delPS is : psi \t1.68833371828\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t delPr is : psi \t1.2\n", + "\t delPT is : psi \t4.1\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=130.; # outlet hot fluid,F\n", + "T3=125.; # after condensation\n", + "t1=65.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=27958; # lb/hr\n", + "w=135500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for butane \\t\"\n", + "c=0.44; # Btu/(lb)(F)\n", + "qd=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for desuperheating of butane is : Btu/hr \\t\",qd\n", + "HT2=309; # enthalpy at T2, Btu/lb\n", + "HT3=170; # enthalpy at T3, Btu/lb\n", + "qc=(W*(HT2-HT3)); # for condensation\n", + "print\"\\t total heat required for condensing of butane is : Btu/hr \\t\",qc\n", + "Q=qd+qc;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t1+deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for desuperheating \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDd=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDd\n", + "w1=(qd/LMTDd);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t for condensing \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDc=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w2=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T3)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,butane \\t\"\n", + "ID=23.25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is :f ft**2 \\t\",As\n", + "print\"\\t desuperheating \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0242; # at 165F,lb/(ft)*(hr), from fig.15\n", + "De=0.73/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=239; # from fig.28\n", + "k=0.012; # Btu/(hr)*(ft**2)*(F/ft), from table 5\n", + "Z=0.96; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # H0=(h0/phya),using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=352;\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=2.11; # at 82.5F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=800; # fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Ud=((hio)*(ho)/(hio+ho)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ud\n", + "Ad=(qd/(Ud*LMTDd));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ad\n", + "print\"\\t for condensaton \\t\"\n", + "Lc=16*0.6; # condensation occurs 60 of the tube length\n", + "G1=(W/(Lc*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "ho=200; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.075; # Btu/(hr)*(ft**2)*(F/ft)\n", + "sf=0.55; # from table 6\n", + "muf=0.14; # cp, from fig 14\n", + "ho=207; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",Ac\n", + "AC=Ad+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "lc=(Ac/(Ac+Ad));\n", + "print\"\\t assumed condensing length percentage : \\t\",lc\n", + "UC=((Ud*Ad)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,3)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t desuperheating \\t\"\n", + "Ld=6.4; #ft\n", + "De=0.0608; # fig 28\n", + "f=0.0013; # friction factor for reynolds number 145000, using fig.29\n", + "Ds=1.94; # ft\n", + "phys=1;\n", + "N=(12*Ld/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "row=(58.1/((359)*(625/492)*(14.7/99.7)));\n", + "print\"\\t row is lb/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "delPsd=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPsd\n", + "print\"\\t condensation \\t\"\n", + "N=(12*Lc/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq 12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "delPS=delPsd+delPsc;\n", + "print\"\\t delPS is : psi \\t\",delPS\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.075; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4 pgno:290" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000.0\n", + "\t deltw is : F \t18\n", + "\t t2 is : F \t82.0\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.0\n", + "\t delt2 is : F \t30.0\n", + "\t LMTD is : F \t36.1514237668\n", + "\t w1 is : lb/hr \t84229.0477863\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20.0\n", + "\t delt2 is : F \t43.0\n", + "\t LMTD is f F \t30.0807554052\n", + "\t w1 is : lb/hr \t9948.22091297\n", + "\t delt is : F \t35.465033613\n", + "\t caloric temperature of hot fluid is : F \t127.5\n", + "\t caloric temperature of cold fluid is : F \t90.0\n", + "\t hot fluid:shell side,pentane \t\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t289.206403856\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.193993055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t860855.557544\n", + "\t V is : fps \t3.8260247002\n", + "\t reynolds number is : %.2e \t22477.8951137\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t tw is : F \t95.1964008573\n", + "\t tf is : F \t111.348200429\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t120\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t103.947681332\n", + "\t clean surface required for dcondensation : ft**2 \t803.043110735\n", + "\t subcooling \t\n", + "\t flow area is : ft**2 \t0.520833333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t40320.0\n", + "\t reynolds number is : \t6939.13043478\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t68.2933263158\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t62.7761756841\n", + "\t clean surface required for desuperheating : ft**2 \t158.471279981\n", + "\t total clean surface : ft**2 \t961.514390716\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t97.1620302154\n", + "\t total surface area is : ft**2 \t1162.096\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t81.0408681377\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00204736690467\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t reynolds number is \t193536.0\n", + "\t rowvapour is ld/ft**3 \t0.342030962803\n", + "\t s is \t0.00547249540485\n", + "\t number of crosses are : \t14.4\n", + "\t delPsc is : psi \t1.29132938612\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.9\n", + "\t delPr is : psi \t1.6\n", + "\t delPT is : psi \t5.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130.; # inlet hot fluid,F\n", + "T2=125.; # outlet hot fluid,F\n", + "T3=100.; # after sucooling\n", + "t1=80.; # inlet cold fluid,F\n", + "t3=100.; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "c=0.57; # Btu/(lb)(F)\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=(qc/w);\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2;\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is f F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "print\"\\t for condensaton \\t\"\n", + "Do=0.0625; # ft\n", + "Nt=370; # number of tubes\n", + "G1=(W/(3.14*Nt*Do)); # from eq.12.42\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # at 90F,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : %.2e \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=125; # assumption\n", + "tw=(tc)+(((ho)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "kf=0.077; # Btu/(hr)*(ft**2)*(F/ft), table 4\n", + "sf=0.6; # from table 6\n", + "muf=0.19; # cp, from fig 14\n", + "ho=120; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(3040000/(104*36.4));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ID=25; # in\n", + "C=0.25; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.46; # at 112.5F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=46.5; # from fig.28\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Z=1.51; # Z=((c)*(mu1)/k)**(1/3)\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "Lc=13.4; #ft\n", + "De=0.0792; # fig 28\n", + "f=0.0012; # friction factor for reynolds number 193000, using fig.29\n", + "mu3=0.0165; # at 127.5F\n", + "Ds=2.08; # ft\n", + "phys=1;\n", + "Res1=(De*Gs/mu3);\n", + "print\"\\t reynolds number is \\t\",Res1\n", + "rowvap=(72.2/((359)*(590/492)*(14.7/25)));\n", + "print\"\\t rowvapour is ld/ft**3 \\t\",rowvap\n", + "s=(rowvap/62.5);\n", + "print\"\\t s is \\t\",s\n", + "N=(12*Lc/B)+(1); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",delPsc\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00022; # friction factor for reynolds number 22500, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.1; # X1=((V**2)/(2*g)),using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5 pgno:295" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for pentane \t\n", + "\t total heat required for subcooling of pentane is : Btu/hr \t299250.0\n", + "\t total heat required for condensing of pentane is : Btu/hr \t3045000\n", + "\t total heat required for pentane is : Btu/hr \t3344250.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t3340000\n", + "\t deltw is : F \t18.2\n", + "\t t2 is : F \t81.8\n", + "\t for condensing \t\n", + "\t delt1 is : F \t43.2\n", + "\t delt2 is : F \t30\n", + "\t LMTD is : F \t36.2404655222\n", + "\t w1 is : lb/hr \t84022.0994992\n", + "\t subcooling \t\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t43.2\n", + "\t LMTD is : F \t30.1594958556\n", + "\t w1 is : lb/hr \t9922.24808506\n", + "\t delt is : % F \t35.5529639184\n", + "\t caloric temperature of hot fluid is : F \t127\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,pentane \t\n", + "\t a is : in**2 \t123.75\n", + "\t number of submerged tubes are : \t93.3248407643\n", + "\t number of tubes for condensation are : \t276.675159236\n", + "\t flooded surface : \t0.252229299363\n", + "\t for condensaton \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1312.5\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.145062323071\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1151229.32312\n", + "\t V is : fps \t5.11657476943\n", + "\t reynolds number is : \t30059.8767704\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t940\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t777.066666667\n", + "\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t251\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t189.718954672\n", + "\t clean surface required for dcondensation : ft**2 \t442.876673258\n", + "\t subcooling \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t50\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t46.9772690634\n", + "\t clean surface required for desuperheating : ft**2 \t211.213812188\n", + "\t total clean surface : ft**2 \t654.090485446\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t143.625919769\n", + "\t total surface area is : ft**2 \t1160\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t80.9865065381\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.0054\n", + "\t pressure drop for annulus \t\n", + "\t condensation \t\n", + "\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t38391.2248629\n", + "\t reynolds number is : \t184277.879342\n", + "\t number of crosses are : \t10\n", + "\t delPsc is : psi \t1.0\n", + "\t delPss is negligible \t\n", + "\t allowable delPa is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=130; # inlet hot fluid,F\n", + "T2=125; # outlet hot fluid,F\n", + "T3=100; # after subcooling\n", + "t1=80; # inlet cold fluid,F\n", + "t3=100; # outlet cold fluid,F\n", + "W=21000; # lb/hr\n", + "w=167000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for pentane \\t\"\n", + "c=0.57; # Btu/(lb)(\n", + "qs=((W)*(c)*(T2-T3)); # Btu/hr\n", + "print\"\\t total heat required for subcooling of pentane is : Btu/hr \\t\",qs\n", + "HT1=315; # enthalpy at T1, Btu/lb\n", + "HT2=170; # enthalpy at T2, Btu/lb\n", + "qc=(W*(HT1-HT2)); # for condensation\n", + "print\"\\t total heat required for condensing of pentane is : Btu/hr \\t\",qc\n", + "Q=qs+qc;\n", + "print\"\\t total heat required for pentane is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)-++++++++-\n", + "Q=((w)*(c)*(t3-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "deltw=18.2;\n", + "print\"\\t deltw is : F \\t\",deltw\n", + "t2=t3-deltw;\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t for condensing \\t\"\n", + "delt1=T2-t2; #F\n", + "delt2=T1-t3; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTDc=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTDc\n", + "w1=(qc/LMTDc);\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "print\"\\t subcooling \\t\"\n", + "delt3=T3-t1; #F\n", + "delt4=T2-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt3\n", + "print\"\\t delt2 is : F \\t\",delt4\n", + "LMTDs=((delt4-delt3)/((2.3)*(log10(delt4/delt3))));\n", + "print\"\\t LMTD is : F \\t\",LMTDs\n", + "w2=(qs/LMTDs);\n", + "print\"\\t w1 is : lb/hr \\t\",w2\n", + "delt=(Q/(w1+w2));\n", + "print\"\\t delt is : % F \\t\",delt\n", + "Tc=((T1)+(T2))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t3))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,pentane \\t\"\n", + "C1=0.198; # for 0.3Ds\n", + "Ds=25; # in\n", + "L=16; # ft\n", + "N=370\n", + "a=(C1*Ds**2);\n", + "print\"\\t a is : in**2 \\t\",a\n", + "N1=((N*a*4)/(3.14*Ds**2));\n", + "print\"\\t number of submerged tubes are : \\t\",N1\n", + "Nt=N-N1;\n", + "print\"\\t number of tubes for condensation are : \\t\",Nt\n", + "Af=(N1/N);\n", + "print\"\\t flooded surface : \\t\",Af\n", + "print\"\\t for condensaton \\t\"\n", + "G1=(W/(L*Nt**(2/3))); # from eq.12.43\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "n=4; # number of passes\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.98; # lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=940; #Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=251; # Btu/(hr)*(ft**2)*(F), from fig 12.9\n", + "print\"\\t Correct ho to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Ac=(qc/(Uc*LMTDc));\n", + "print\"\\t clean surface required for dcondensation : ft**2 \\t\",Ac\n", + "print\"\\t subcooling \\t\"\n", + "ho=50; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Us=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Us\n", + "As=(qs/(Us*LMTDs));\n", + "print\"\\t clean surface required for desuperheating : ft**2 \\t\",As\n", + "AC=As+Ac;\n", + "print\"\\t total clean surface : ft**2 \\t\",AC\n", + "UC=((Us*As)+(Uc*Ac))/(AC);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A=1160; # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t condensation \\t\"\n", + "print\"\\t It will be necessary to spread the batHes to a spacing of 18in.to compensate for the reduction in crossfiow area due to the flooded subcooling zone. The tube-side pressure drop will be the same as before. Assume bundle flooded to 0.3Ds.\\t\"\n", + "As=0.547; # ft**2\n", + "Gs=(W/(As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "De=0.0792; # fig 28\n", + "Res=((De)*(Gs)/0.0165); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "f=0.00121; # friction factor for reynolds number 193000, using fig.29\n", + "s=0.00454; # for reynolds number 193000,using fig.6\n", + "Ds=2.08; # ft\n", + "B=18\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPsc=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.12.47,psi\n", + "print\"\\t delPsc is : psi \\t\",round(delPsc)\n", + "print\"\\t delPss is negligible \\t\"\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#e \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6 pgno:299" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for carbon disulfide \t\n", + "\t total heat required for carbon disulfide is : Btu/hr \t4200000\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t4200000.0\n", + "\t delt1 is : F \t91.0\n", + "\t delt2 is : F \t56.0\n", + "\t LMTD is : F \t72.1704928998\n", + "\t caloric temperature of hot fluid is : F \t176.0\n", + "\t caloric temperature of cold fluid is : F \t102.5\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t cold fluid:shell side,water \t\n", + "\t flow area is : ft**2 \t0.1796875\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t667826.086957\n", + "\t reynolds number is : \t31112.8388747\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t786.545454545\n", + "\t tw is : F \t122.793674699\n", + "\t tf is : F \t149.396837349\n", + "\t hot fluid:inner tube side,carbon disulfide \t\n", + "\t G1 is : lb/(hr)*(lin ft) \t1044.06562495\n", + "\t reynolds number is : \t6141.56249973\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t0.251\n", + "\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t0.207493333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t0.207438610331\n", + "\t total surface area is : ft**2 \t555.9216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t104.682978368\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-4.81115068056\n", + "\t pressure drop for inner pipe \t\n", + "\t flow area is : ft**2 \t0.371208333333\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t80645.1612903\n", + "\t reynolds number is : \t143770.856507\n", + "\t row is ld/ft**3 \t0.572484035397\n", + "\t s is \t0.00915974456635\n", + "\t delPt is : psi \t0.4\n", + "\t allowable delPa is negligible psi \t\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t32.0\n", + "\t delPs is : psi \t8.4\n", + "\t allowable delPT is 2 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 12.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=176.; # inlet hot fluid,F\n", + "T2=176.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=120000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for carbon disulfide \\t\"\n", + "l=140; # Btu/(lb)\n", + "Q=((W)*l); # Btu/hr\n", + "print\"\\t total heat required for carbon disulfide is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "Tc=((T2)+T1)/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "hio=300; # Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t cold fluid:shell side,water \\t\"\n", + "ID=17.25; # in\n", + "C=0.25; # clearance\n", + "B=6; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(w/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=1.7; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.0792; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=103; # from fig.28\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Z=1.68; # Z=((c)*(mu1)/k)**(1/3); # prandelt number\n", + "ho=((jH)*(k/De)*(Z)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(Tc+tw)/(2); # from eq 12.19\n", + "print\"\\t tf is : F \\t\",tf\n", + "print\"\\t hot fluid:inner tube side,carbon disulfide \\t\"\n", + "kf=0.09; # Btu/(hr)*(ft**2)*(F/ft), from fig 14\n", + "sf=1.26; # from table 6\n", + "rowf=78.8; # lb/ft**3\n", + "muf=0.68; # cp, from fig 24\n", + "Nt=177;\n", + "D=0.0517; # ft\n", + "G1=(W/(3.14*Nt*D));\n", + "print\"\\t G1 is : lb/(hr)*(lin ft) \\t\",G1\n", + "Ret=((4)*(G1)/muf); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(0.251*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(1/3)); # hi*(((kf**3)*(rowf**2)*(4.17*10**8))/(muf**2))**(-1)=0.251, from fig 12.12\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=.75; #ft\n", + "hio1=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hio1 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio1\n", + "Uc=((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "L=16;\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(30000/(0.372)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.029; # at inlet,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "row=(76.1/((359)*(636/492)*(14.7/39.7)));\n", + "print\"\\t row is ld/ft**3 \\t\",row\n", + "s=(row/62.5);\n", + "print\"\\t s is \\t\",s\n", + "f=0.000138; # friction factor for reynolds number 143000, using fig.26\n", + "delPt=((f*(Gt**2)*(16)*(1))/(5.22*(10**10)*(0.0517)*(s)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt+0.1,1)\n", + "print\"\\t allowable delPa is negligible psi \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.0017; # friction factor for reynolds number 31000, using fig.29\n", + "s=1; # for reynolds number 31000,using fig.6\n", + "Ds=17.25/12.; # ft\n", + "B=6.;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPT is 2 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7 pgno:308" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 12.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t223.55\n", + "\t area is : ft**2 \t31250.0\n", + "\t t2 is : F \t86.0\n", + "\t circulation rate is : gpm \t29176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 12.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "V=7.5; # fps\n", + "W=250000.;\n", + "CCl=0.85;\n", + "CT=1.;\n", + "CL=1.;\n", + "Ct=263.;\n", + "UD=(CCl*CT*CL*Ct*(V**(1/2)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(W/8);\n", + "print\"\\t area is : ft**2 \\t\",A\n", + "a1=0.229; # ft**2/ft, table 10\n", + "at=0.475; # in**2, table 10\n", + "t1=70;\n", + "Ts=91.72; #F\n", + "n=2;\n", + "L=26;\n", + "t2=((Ts)-((Ts-t1)/((10)**(0.000279*UD*L*n*a1/(V*at))))+8); \n", + "print\"\\t t2 is : F \\t\",round(t2) # calculation mistake in book\n", + "Go=(W*950)/((t2-t1)*500);\n", + "print\"\\t circulation rate is : gpm \\t\",round(Go)\n", + "# end\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/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 new file mode 100644 index 00000000..6c6ad595 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_1.ipynb @@ -0,0 +1,1114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 : Evapouration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 pgno:383" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tQevap is Btu/hr\t9610000\n", + "\tQ300 degreeF is Btu/hr\t9600500\n", + "\tTemperature head = degree F\t74\n", + "\tOverall coefficient \t605.5\n", + "\tSurface required is ft^2\t2144.75416788\n" + ] + } + ], + "source": [ + "print\"\\t example 14.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "t1 = 300; # degreeF\n", + "t2 = 226; #degree F\n", + "bs = 700; # Btu/((hr)(ft^2)(ddegree F))\n", + "#Heat Balance\n", + "Qv = 10000 * 961; # Btu/hr\n", + "print\"\\tQevap is Btu/hr\\t\",Qv\n", + "Q3 = 10550 * 910; #Btu/hr\n", + "print\"\\tQ300 degreeF is Btu/hr\\t\",Q3\n", + "\n", + "delT = t1-t2; # degree F\n", + "print\"\\tTemperature head = degree F\\t\",delT\n", + "Ud = bs * 0.865;\n", + "print\"\\tOverall coefficient \\t\",Ud\n", + "A = Qv*10/(Ud * delT); #ft^2\n", + "print\"\\tSurface required is ft^2\\t\",A#Wrong calculation in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tTotal product is lb/hr\t10000.0\n", + "\tTotal evaporation is lb/hr\t40000.0\n", + "\tTotal temperature difference is del degree F\t119\n", + "\tAverage pressure difference is del psi/effect \t8.25\n", + "\t\t\t\t\t\tPressure, psia\t\t delP, psi \t Steam or vapor, degree F \t lambda, Btu/lb\t\tSteam chest, 1st effect \t 26.70 \t\t\t .... \t\t Ts = 244 \t\t ls = 949 \t\tSteam chest, 2nd effect \t 18.45 \t\t\t 8.25 \t\t t1 = 224 \t\t l1 = 961 \t\tSteam chest, 3rd effect \t 10.20(20.7 in. Hg) \t 8.25 \t\t t2 = 194 \t\t l1 = 981 \t\tVapor to condenser \t\t 1.95(26 in. Hg) \t 8.25 \t\t t2 = 125 \t\t l1 = 1022 \t\n", + "\t949*Ws + 50000*(100-224) = 961*w1\t\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\t\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\t\tw1+w2+w3 = 40000\t\n", + "\tSolving simultaneously\t\n", + "\tw1 = \t12400\n", + "\tw2 = \t13300\n", + "\tw3 = \t14300\n", + "\tW1-3 is \t40000\n", + "\tA1 is ft**2 \t1510\n", + "\tA2 is ft**2 \t1588\n", + "\tA3 is ft**2 \t1512\n", + "\tHeat to condenser is Btu/hr\t14614600\n", + "\tWater requirement is lb/hr\t417560\n", + "\t= gpm \t835\n" + ] + } + ], + "source": [ + "print\"\\t example 14.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "wf = 50000; # lb/hr\n", + "sf = wf * 0.10; # lb/hr\n", + "tp = sf/0.50; # lb/hr\n", + "print\"\\tTotal product is lb/hr\\t\",tp\n", + "te = wf - tp;\n", + "print\"\\tTotal evaporation is lb/hr\\t\",te\n", + "cf = 1.0;\n", + "tF = 100; # degree F\n", + "T1 = 244; # degree F\n", + "T2 = 125; # degree F\n", + "U1=600; # Btu/((hr)*(ft**2)*(degree F))\n", + "U2=250; # Btu/((hr)*(ft**2)*(degree F))\n", + "U3=125; # Btu/((hr)*(ft**2)*(degree F))\n", + "\n", + "T = T1-T2;\n", + "print\"\\tTotal temperature difference is del degree F\\t\",T\n", + "df = (26.70- 1.95)/3; # psi/effect\n", + "print\"\\tAverage pressure difference is del psi/effect \\t\",df\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\tPressure, psia\\t\\t delP, psi \\t Steam or vapor, degree F \\t lambda, Btu/lb\\t\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\t .... \\t\\t Ts = 244 \\t\\t ls = 949 \\t\\tSteam chest, 2nd effect \\t 18.45 \\t\\t\\t 8.25 \\t\\t t1 = 224 \\t\\t l1 = 961 \\t\\tSteam chest, 3rd effect \\t 10.20(20.7 in. Hg) \\t 8.25 \\t\\t t2 = 194 \\t\\t l1 = 981 \\t\\tVapor to condenser \\t\\t 1.95(26 in. Hg) \\t 8.25 \\t\\t t2 = 125 \\t\\t l1 = 1022 \\t\"\n", + "\n", + "print\"\\t949*Ws + 50000*(100-224) = 961*w1\\t\\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\\t\\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\\t\\tw1+w2+w3 = 40000\\t\"\n", + "print\"\\tSolving simultaneously\\t\"\n", + "w1=12400;\n", + "print\"\\tw1 = \\t\",w1\n", + "w2=13300;\n", + "print\"\\tw2 = \\t\",w2\n", + "w3=14300;\n", + "print\"\\tw3 = \\t\",w3\n", + "\n", + "Wt = w1+w2+w3;\n", + "print\"\\tW1-3 is \\t\",Wt\n", + "Ws = 19100;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "Ts = 244;\n", + "t1 = 224;\n", + "t2 = 194;\n", + "t3 = 125;\n", + "\n", + "A1 = (Ws * lms)/(U1*(Ts-t1)); #ft**2\n", + "print\"\\tA1 is ft**2 \\t\",A1\n", + "A2 = (w1*lm1)/(U2*(t1-t2)); #ft**2\n", + "print\"\\tA2 is ft**2 \\t\",A2\n", + "A3 = (w2 * lm2)/(U3*(t2-t3)); #ft**2\n", + "print\"\\tA3 is ft**2 \\t\",A3\n", + "\n", + "hc = w3 * lm3; # Btu/hr, WRONG CALCULATION IN TEXT BOOK\n", + "print\"\\tHeat to condenser is Btu/hr\\t\",hc\n", + "wr = hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement is lb/hr\\t\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t= gpm \\t\",wr1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3 pgno:414" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t981*w2 + 50000*(100-125) = 1022*w3\n", + "\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\n", + "\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\n", + "\tw1+w2+w3 = 40000\n", + "\n", + "\tSolving simultaneously\n", + "\n", + "\tw1-3 = \n", + "40000\n", + "\tA1 is ft**2\n", + "2010\n", + "\tA2 is ft**2\n", + "2043\n", + "\tA3 is ft**2\n", + "1048\n", + "\tAverage surface is ft**2\n", + "1700\n", + "\n", + "\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\n", + "5100\n", + "\tRecalculation\n", + "\n", + "\tA1 is ft**2\n", + "0\n", + "\tA2 is ft**2\n", + "0\n", + "\tA3 is ft**2\n", + "1048\n", + "\tTs-t3 is degreeF\n", + "119\n", + "\t\t\t\t\tPressure, psia\t\t Steam or vapor, degreeF \t lambda, Btu/lb\n", + "\tSteam chest, 1st effect \t 26.70 \t\t\tTs = 244 \t\t 949 \n", + "\tSteam chest, 2nd effect \t 16.0 \t\t\t t1 = 216 \t\t 968 \n", + "\tSteam chest, 3rd effect \t 16.4 in. Hg) \t\t t2 = 175 \t\t 992 \n", + "\tVapor to condenser \t\t 26 in. Hg \t\t t3 = 125 \t\t l1 = 1022 \n", + "\n", + "\tw1 is \n", + "15450\n", + "\tw2 is \n", + "13200\n", + "\tw3 is \n", + "11350\n", + "\tWs is \n", + "16850\n", + "\tHeat to condenser is Btu/hr\n", + "11599700\n", + "\tWater requirement lb/hr\n", + "331420\n", + "\t\t\t= gpm\n", + "662\n", + "\tEconomy, lb evaporation/lb steam \n", + "2\n", + "\t\t\t\tForward\t\tBackward\n", + "\tTotal steam, lb/hr\t19100\t\t16850\n", + "\tCooling water, gpm\t840\t\t664\n", + "\tTotal surface, ft**2\t4800\t\t4500\n" + ] + } + ], + "source": [ + "print\"\\t example 14.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Same conditions as example 14.2\n", + "U1 = 400; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U2 = 250; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U3 = 175; #Btu/((hr)*(ft**2)*(degreeF))\n", + "\n", + "w1 = 50000; # lb/hr From example 14.2\n", + "wt = 40000; # lb/hr From example 14.2\n", + "cf = 1; # From example 14.2\n", + "\n", + "print\"\\t981*w2 + 50000*(100-125) = 1022*w3\\n\\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\\n\\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\\n\\tw1+w2+w3 = 40000\\n\"\n", + "print\"\\tSolving simultaneously\\n\"\n", + "w1 = 15950;\n", + "w2 = 12900;\n", + "w3 = 11150;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "\n", + "wt = w1+w2+w3;\n", + "print\"\\tw1-3 = \\n\",wt\n", + "Ws = 16950;\n", + "A1 = (Ws*lms)/(U1*20); #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A1\n", + "A2 = (w1*lm1)/(U2*30); #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A2\n", + "A3 = (w2*lm2)/(U3*69); #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A3\n", + "\n", + "Avs = (A1 + A2 + A3)/3; #ft**2\n", + "print\"\\tAverage surface is ft**2\\n\",Avs\n", + "Av1 = 3 * Avs; #ft**2\n", + "print\"\\n\\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\\n\",Av1\n", + "print\"\\tRecalculation\\n\"\n", + "Av2 = 1500; #ft**2, assume\n", + "dT1 = 28; #degreeF\n", + "A4 = (20/dT1)*A1; #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A4\n", + "dT2 = 41; #degreeF\n", + "A5 = (30/dT2)*A2; #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A5\n", + "dT3 = 50; #degreeF\n", + "A6 = (69/50)*A3; #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A6\n", + "del1 = 119; #degreeF\n", + "print\"\\tTs-t3 is degreeF\\n\",del1\n", + "print\"\\t\\t\\t\\t\\tPressure, psia\\t\\t Steam or vapor, degreeF \\t lambda, Btu/lb\\n\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\tTs = 244 \\t\\t 949 \\n\\tSteam chest, 2nd effect \\t 16.0 \\t\\t\\t t1 = 216 \\t\\t 968 \\n\\tSteam chest, 3rd effect \\t 16.4 in. Hg) \\t\\t t2 = 175 \\t\\t 992 \\n\\tVapor to condenser \\t\\t 26 in. Hg \\t\\t t3 = 125 \\t\\t l1 = 1022 \\n\"\n", + "\n", + "w1 = 15450; #Solving again for \n", + "print\"\\tw1 is \\n\",w1\n", + "w2 = 13200;\n", + "print\"\\tw2 is \\n\",w2\n", + "w3 = 11350;\n", + "print\"\\tw3 is \\n\",w3\n", + "Ws = 16850;\n", + "print\"\\tWs is \\n\",Ws\n", + "Hc = w3 * 1022;\n", + "print\"\\tHeat to condenser is Btu/hr\\n\",Hc\n", + "wr = Hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement lb/hr\\n\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t\\t\\t= gpm\\n\",wr1\n", + "ec = wt/Ws;\n", + "print\"\\tEconomy, lb evaporation/lb steam \\n\",ec\n", + "\n", + "#comparision of forward and backward feed\n", + "print\"\\t\\t\\t\\tForward\\t\\tBackward\\n\\tTotal steam, lb/hr\\t19100\\t\\t16850\\n\\tCooling water, gpm\\t840\\t\\t664\\n\\tTotal surface, ft**2\\t4800\\t\\t4500\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4 pgno:418" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.4 \n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\n", + "\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\n", + "\n", + "\tEffects\t\tWater evaporated(lb/(hr)*(ft**2))\n", + "\n", + "\t1\t\t14-16\n", + "\t2\t\t6-8\n", + "\t3\t\t5-6\n", + "\t4\t\t4-5\n", + "\t5\t\t3-4\n", + "\n", + "\n", + "\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam flow, lb/hr\t\t42600\t\t38000\n", + "\t2.Steam pressure, psi/in.Hg\t30\t\t30\t\t15\t\t5\t\t4\t\t14.5\n", + "\n", + "\t3.Steam temp,degreeF\t\t\t274\t\t274\t\t250\t\t227\t\t205\t\t181\n", + "\n", + "\t4.delT,degreeF\t\t\t23\t\t23\t\t21\t\t20\t\t20\t\t27\n", + "\t5.Liquor temp, degreeF\t\t251\t\t251\t\t229\t\t207\t\t185\t\t164\n", + "\t6.BPR, degreeF\t\t\t1\t\t1\t\t2\t\t2\t\t4\t\t7\n", + "\t7.Vapor temp, degreeF\t\t250\t\t250\t\t227\t\t205\t\t181\t\t147\n", + "\t8.Vapor pressure, pis/in.Hg\t15\t\t15\t\t5\t\t4\t\t14.5\t\t23\n", + "\t9.Lambda, Btu/lb\t\t946\t\t946\t\t960\t\t975\t\t990\t\t1010\n", + "\t10.Liquor in, lb/hr\t\t229000\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\n", + "\t11.Liqour out, lb/hr\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\t\t49600\n", + "\t12.Evaporation,lb/hr\t\t38800\t\t36200\t\t36900\t\t29300\t\t23800\t\t14400\n", + "\t13.degreeBrix(out)\t\t\t15.7\t\t19.4\t\t25.5\t\t34.4\t\t46.5\t\t50.0\n", + "\t14.A,ft**2\t\t\t3500\t\t3500\t\t5000\t\t5000\t\t5000\t\t3500\n", + "\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\t478\t\t425\t\t310\t\t264\t\t219\t\t138\n", + "\t16.UD delT,Btu/(hr)*(ft**2)\t11000\t\t9780\t\t6520\t\t5270\t\t4390\t\t3740\n", + "\n", + "\tTotal temperature difference in the evaporator system = degreeF\n", + "127\n", + "\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\n", + "16\n", + "\tTotal EFFECTIVE temperature difference = degreeF\n", + "111\n", + "\n", + "\t\t\t\tSUGAR-JUICE HEATERS\n", + "\n", + "\tRaw-juice heaters\t\t\t\tClear=juice heaters\n", + "\t-----------------------------------------------------------------------------------------\n", + "\n", + "\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr 229000 212 184 5834920.0\n", + "\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\n", + "229000 243 220 4792970.0\n", + "\tVapor temp. = 227degreeF\tdelT=26.6degreeF\t\tVapor temp. = 250degreeF\tdelT=15.8degreeF\n", + "\n", + "\tud1=.\t\t\t\t\t\tUD=ud2\n", + "231 243\n", + "\tSurface,A=A1 ft**2\t\t\t\tSurface,A=A2 ft**2\n", + "\n", + "949.601275917 1248.36432776\n", + "\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr 229000 184 144 8244000.0\n", + "\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\n", + "229000 220 200 4122000.0\n", + "\tVapor temp. = 205degreeF\tdelT=37.6degreeF\t\tVapor temp. = 227degreeF\tdelT=14.8degreeF\n", + "\n", + "\tUD=Ud3\t\t\t\t\t\tUD=Ud4\n", + "230 214\n", + "\tSurface,A=A3 ft**2\t\t\t\tSurface,A=A4 ft**2\n", + "\n", + "953.2839963 1301.46501642\n", + "\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr 229000 144 82 4122000.0\n", + "\t(Use 2 heaters at 1300 ft**2 each plus 1\n", + "\t\t\t\t\t\t\theater at 1300 ft**2 as spare)\n", + "\n", + "\tVapor temp. = 181degreeF\tdelT=62.2degreeF\n", + "\tSurface,A=\n", + "946.715663757\n", + "\t(Use 3 heaters at 100 ft**2\n", + "\teach plus 1 heater as spare)\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t----------------------------------------------------\n", + "\n", + "\t1A.Heat in steam........\n", + "38388138.0\n", + "\t Heating liquor.......\n", + "\t\t\t\t%.3e\t.\n", + "1667120.0 36721018.0 38817.1437632\n", + "\t Liqour to 1B\n", + "\t = lb/hr\n", + "190182.856237\n", + "\t1B.Heat in steam........\n", + "34979292.7593\n", + "\t Heating liquor........\n", + "\t\t\t\t\n", + "0.0 34979292.7593 36975.9965744\n", + "\t Liqour to 2d \n", + "\t effect= lb/hr\n", + "153206.859662\n", + "\t\t\t\t\t\t\t\tLb/hr\n", + "\n", + "\t(a) Actual evaporation..................................\n", + "179400\n", + "\t(b) Equivalent evaporation from vapors of \n", + "\t 1st effect used for vaccum pans......................\n", + "145500\n", + "\t(c) Equivalent evaporation from 1st effect \n", + "\t vapors used for clarified-juice heaters..............\n", + "19700\n", + "\t(d) Equivalent evaporation from 2d effect \n", + "\t vapors used for clarified-and raw-juice heaters......\n", + "30600\n", + "\t(e) Equivalent evaporation from 3d effect \n", + "\t vapors used for raw-juice heaters....................\n", + "2.71828182846\n", + "\t(f) Equivalent evaporation from 4th effect \n", + "\t vapors used for raw-juice heaters....................\n", + "13100\n", + "\t -----\n", + "\n", + "\t Extrapolated evaporation............................\n", + "406200\n", + "\t\tEstimated steam quantity = lb/hr\n", + "81240\n", + "\t\tActual steam required from final heat balance = lb/hr\n", + "80600\n", + "\t\t\t\t\t\t\tError = lb/hr\n", + "640\n", + "\tGallons per minute of Water required = gpm 583\n" + ] + } + ], + "source": [ + "print\"\\texample 14.4 \\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "from math import e\n", + "#Assumed that 37500 lb/hr of 15 psig vapor is bled from the first effect for use in thevaccum pans\n", + "print\"\\n\\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\\n\"\n", + "print\"\\tEffects\\t\\tWater evaporated(lb/(hr)*(ft**2))\\n\"\n", + "print\"\\t1\\t\\t14-16\\n\\t2\\t\\t6-8\\n\\t3\\t\\t5-6\\n\\t4\\t\\t4-5\\n\\t5\\t\\t3-4\\n\"\n", + "print\"\\n\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t42600\\t\\t38000\\n\\t2.Steam pressure, psi/in.Hg\\t30\\t\\t30\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\n\"\n", + "print\"\\t3.Steam temp,degreeF\\t\\t\\t274\\t\\t274\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\n\"\n", + "print\"\\t4.delT,degreeF\\t\\t\\t23\\t\\t23\\t\\t21\\t\\t20\\t\\t20\\t\\t27\\n\\t5.Liquor temp, degreeF\\t\\t251\\t\\t251\\t\\t229\\t\\t207\\t\\t185\\t\\t164\\n\\t6.BPR, degreeF\\t\\t\\t1\\t\\t1\\t\\t2\\t\\t2\\t\\t4\\t\\t7\\n\\t7.Vapor temp, degreeF\\t\\t250\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\t\\t147\\n\\t8.Vapor pressure, pis/in.Hg\\t15\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\t\\t23\\n\\t9.Lambda, Btu/lb\\t\\t946\\t\\t946\\t\\t960\\t\\t975\\t\\t990\\t\\t1010\\n\\t10.Liquor in, lb/hr\\t\\t229000\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\n\\t11.Liqour out, lb/hr\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\t\\t49600\\n\\t12.Evaporation,lb/hr\\t\\t38800\\t\\t36200\\t\\t36900\\t\\t29300\\t\\t23800\\t\\t14400\\n\\t13.degreeBrix(out)\\t\\t\\t15.7\\t\\t19.4\\t\\t25.5\\t\\t34.4\\t\\t46.5\\t\\t50.0\\n\\t14.A,ft**2\\t\\t\\t3500\\t\\t3500\\t\\t5000\\t\\t5000\\t\\t5000\\t\\t3500\\n\\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\\t478\\t\\t425\\t\\t310\\t\\t264\\t\\t219\\t\\t138\\n\\t16.UD delT,Btu/(hr)*(ft**2)\\t11000\\t\\t9780\\t\\t6520\\t\\t5270\\t\\t4390\\t\\t3740\\n\"#BPR values from fig 14.34a\n", + "#Saturate vapor pressure above the liquour determined from Table 7\n", + "#Saturated steam pressure in the following effect determined from Table 7\n", + "\n", + "t1 = 274; #degreeF\n", + "t2 = 147; #degreeF\n", + "t = t1-t2; #degreeF\n", + "print\"\\tTotal temperature difference in the evaporator system = degreeF\\n\",t\n", + "bpr1 = 1; #degreeF\n", + "bpr2 = 2; #degreeF\n", + "bpr3 = 2; #degreeF\n", + "bpr4 = 4; #degreeF\n", + "bpr5 = 7; #degreeF\n", + "bpr = bpr1 + bpr2 + bpr3 + bpr4 + bpr5; #degreeF\n", + "print\"\\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\\n\",bpr\n", + "tf = t-bpr; #degreeF\n", + "print\"\\tTotal EFFECTIVE temperature difference = degreeF\\n\",tf\n", + "lbh = 229000; #lb/hr\n", + "tp1=212; #degreeF\n", + "tp2=184; #degreeF\n", + "tp3=144; #degreeF\n", + "tp4=82; #degreeF\n", + "tj1=243; #degreeF\n", + "tj2=220; #degreeF\n", + "tj3=200; #degreeF\n", + "Ud1=231;\n", + "Ud2=243;\n", + "Ud3=230;\n", + "Ud4=214;\n", + "Ud5=217;\n", + "print\"\\n\\t\\t\\t\\tSUGAR-JUICE HEATERS\\n\"\n", + "print\"\\tRaw-juice heaters\\t\\t\\t\\tClear=juice heaters\\n\\t-----------------------------------------------------------------------------------------\\n\"\n", + "rj1=lbh*(tp1-tp2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr\",lbh,tp1,tp2,rj1\n", + "rj2=lbh*(tj1-tj2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\\n\",lbh,tj1,tj2,rj2\n", + "print\"\\tVapor temp. = 227degreeF\\tdelT=26.6degreeF\\t\\tVapor temp. = 250degreeF\\tdelT=15.8degreeF\\n\"\n", + "print\"\\tud1=.\\t\\t\\t\\t\\t\\tUD=ud2\\n\",Ud1,Ud2\n", + "A1=rj1/(26.6*Ud1);#ft**2\n", + "A2=rj2/(15.8*Ud2);#ft**2\n", + "print\"\\tSurface,A=A1 ft**2\\t\\t\\t\\tSurface,A=A2 ft**2\\n\\n\",A1,A2\n", + "\n", + "rj3=lbh*(tp2-tp3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr\",lbh,tp2,tp3,rj3\n", + "rj4=lbh*(tj2-tj3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\\n\",lbh,tj2,tj3,rj4\n", + "print\"\\tVapor temp. = 205degreeF\\tdelT=37.6degreeF\\t\\tVapor temp. = 227degreeF\\tdelT=14.8degreeF\\n\"\n", + "print\"\\tUD=Ud3\\t\\t\\t\\t\\t\\tUD=Ud4\\n\",Ud3,Ud4\n", + "A3=rj3/(37.6*Ud3);#ft**2\n", + "A4=rj4/(14.8*Ud4);#ft**2\n", + "print\"\\tSurface,A=A3 ft**2\\t\\t\\t\\tSurface,A=A4 ft**2\\n\\n\",A3,A4\n", + "\n", + "rj5=lbh*(tp3-tp4)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr\",lbh,tp3,tp4,rj4\n", + "print\"\\t(Use 2 heaters at 1300 ft**2 each plus 1\\n\\t\\t\\t\\t\\t\\t\\theater at 1300 ft**2 as spare)\\n\"\n", + "A5=rj5/(62.2*Ud5);#ft**2\n", + "print\"\\tVapor temp. = 181degreeF\\tdelT=62.2degreeF\\n\\tSurface,A=\\n\",A5\n", + "print\"\\t(Use 3 heaters at 100 ft**2\\n\\teach plus 1 heater as spare)\\n\\n\"\n", + "\n", + "v1=42600;#lb/hr\n", + "tt1=251;#degreeF\n", + "print\"\\t\\t\\t\\tHEAT BALANCE\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t----------------------------------------------------\\n\"\n", + "hia=v1*929*0.97;#Btu/hr\n", + "print\"\\t1A.Heat in steam........\\n\",hia\n", + "hla=lbh*(tt1-tj1)*0.91;#Btu/hr\n", + "hh=hia-hla;#Btu/hr\n", + "lb1=946;#Btu/lb\n", + "dif=hh/lb1;#lb/hr\n", + "print\"\\t Heating liquor.......\\n\\t\\t\\t\\t%.3e\\t.\\n\",hla,hh,dif\n", + "ltob=lbh-dif;#lb/hr\n", + "print\"\\t Liqour to 1B\\n\\t = lb/hr\\n\",ltob\n", + "hia1=dif*929*0.97;#Btu/hr\n", + "print\"\\t1B.Heat in steam........\\n\",hia1\n", + "hla1=ltob*(tt1-tt1)*0.91;#Btu/hr\n", + "hh1=hia1;#Btu/hr\n", + "dif1=hh1/lb1;#lb/hr\n", + "print\"\\t Heating liquor........\\n\\t\\t\\t\\t\\n\",hla1,hh1,dif1\n", + "dif2=ltob-dif1;#lb/hr\n", + "print\"\\t Liqour to 2d \\n\\t effect= lb/hr\\n\",dif2\n", + "#Similarily the values in the table are calculated\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\tLb/hr\\n\"\n", + "aa=179400;#lb/hr\n", + "bb=145500;#lb/hr\n", + "cc=19700;#lb/hr\n", + "dd=30600;#lb/hr\n", + "ee=17900;#lb/hr\n", + "ff=13100;#lb/hr\n", + "tto=aa+bb+cc+dd+ee+ff;#lb/hr\n", + "print\"\\t(a) Actual evaporation..................................\\n\",aa\n", + "print\"\\t(b) Equivalent evaporation from vapors of \\n\\t 1st effect used for vaccum pans......................\\n\",bb\n", + "print\"\\t(c) Equivalent evaporation from 1st effect \\n\\t vapors used for clarified-juice heaters..............\\n\",cc\n", + "print\"\\t(d) Equivalent evaporation from 2d effect \\n\\t vapors used for clarified-and raw-juice heaters......\\n\",dd\n", + "print\"\\t(e) Equivalent evaporation from 3d effect \\n\\t vapors used for raw-juice heaters....................\\n\",e\n", + "print\"\\t(f) Equivalent evaporation from 4th effect \\n\\t vapors used for raw-juice heaters....................\\n\",ff\n", + "print\"\\t -----\\n\"\n", + "print\"\\t Extrapolated evaporation............................\\n\",tto\n", + "esq=tto/5;#lb/hr\n", + "print\"\\t\\tEstimated steam quantity = lb/hr\\n\",esq\n", + "aesq=80600;#lb/hr\n", + "err = esq-aesq;#lb/hr\n", + "print\"\\t\\tActual steam required from final heat balance = lb/hr\\n\",aesq\n", + "print\"\\t\\t\\t\\t\\t\\t\\tError = lb/hr\\n\",err\n", + "ta=15;\n", + "Q=14575000; #Btu/hr Total hourly evaporation\n", + "Gpm=Q/(500*(t2-tp4-ta));#From equation 14.4\n", + "print\"\\tGallons per minute of Water required = gpm\",Gpm\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5 pgno:427" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.5\t\n", + "\tapproximate values are mentioned in the book \t\n", + "\tOverall temperature difference = deg F\t155\n", + "\tThe estimated total BPR = degF\t[10 18 25 31 36 41]\n", + "\tEffective temperature difference = %.0f degF\t[145 137 130 124 119 114]\n", + "\t\t\t\t\tEVAPORATOR SUMMARY\t\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\t\t\t\t\t\t----------------------------------------------------------------------------------------------\t\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\t1.Steam flow, lb/hr\t\t20000\t\t2.Steam pressure, psi/in.Hg\t35\t\t14.5\t\t4\t\t7\t\t16.5\t\t22\t\t3.Steam temp,degF\t\t\t280\t\t249\t\t224\t\t199\t\t174\t\t151\t\t4.delT,degF\t\t\t21\t\t17\t\t18\t\t19\t\t18\t\t21\t\t5.Liquor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t6.BPR, degF\t\t\t10\t\t8\t\t7\t\t6\t\t5\t\t5\t\t7.Vapor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t8.Vapor pressure, pis/in.Hg\t14.5\t\t4\t\t7\t\t6\t\t5\t\t5\t\t9.Lambda, Btu/lb\t\t946\t\t962\t\t978\t\t994\t\t1008\t\t1022\t\t10.Liquor in, lb/hr\t\t73400\t\t88300\t\t101000\t\t113000\t\t72000\t\t72000\t\t11.Liqour out, lb/hr\t\t56200\t\t73400\t\t88300\t\t101100\t\t58300\t\t54700\t\t12.Evaporation,lb/hr\t\t17200\t\t14900\t\t12800\t\t11900\t\t13700\t\t17300\t\t13.Total solids, \t\t38.9\t\t29.8\t\t24.7\t\t21.6\t\t18.7\t\t20.0\t\t14.A,ft^2\t\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t15.UD,Btu/(hr)*(ft^2)*(degF)\t262\t\t295\t\t252\t\t251\t\t221\t\t221\t\t16.UD delT,Btu/(hr)*(ft^2)\t5510\t\t5000\t\t4530t\t\t4770\t\t3980\t\t4650\t\n", + "\t\tTotal amount of water evaporated = \t lb/hr\t[17200 32100 44900 56800 70500 0]\n", + "\tTheoretical amount of steam for a six-effect evaporator = \t lb/hr\t[ 2866 5350 7483 9466 11750 0]\n", + "\tSteam used for trail balance = \t lb/hr\t[ 3822.22222222 7133.33333333 9977.77777778 12622.22222222\n", + " 15666.66666667 0. ]\n", + "\tEstimate of the amount of evaporation in the first effect = \t lb/hr\t[ 3295.9 6152.5 8605.45 10885.9 13512.5 0. ]\n", + "\tEstimated discharge from second effect = \t lb/hr\t[ 59495.9 62352.5 64805.45 67085.9 69712.5 56200. ]\n", + "\t\t\t\t\tHEAT BALANCE\t\n", + "\t\tCooling water at 60 degreeF = \t gpm\t710\n", + "\t--------------------------------------------------------\t\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\t\n", + "\t--------------------------------------------------------\t\n", + "\t1.a.Heat in steam \t\t17925600.0\n", + "\t b.Heating liquor \t\t1625076.0\n", + "\t c.Evaporation\t\t\t\t\t\t17230.9978858\n", + "\t d.To flash tank\t2190591.08245\n", + "\t\t\t\t2239.86818247\n", + "\t e.Flashed vapor=\t\t2239.86818247\n", + "\t f.product \t53929.1339317\n", + "\t\t2.a.Heat in 1st vapors\t\t16300524.0\n", + "\t b.Heating liqour\t\t1951430.0\n", + "\t c.Evaporation= 14915.8981289\n", + "\t\t\t\t\t14915.8981289\n", + "\t d.Liquor to 1b=\t\t73384.1018711\n", + "total hourly evapouration lb : 90000\n", + "economy is lb/lb : 4.5\n" + ] + } + ], + "source": [ + "print\"\\texample 14.5\\t\"\n", + "print\"\\tapproximate values are mentioned in the book \\t\"\n", + "st1=280; #degF\n", + "vt6=125; #degF\n", + "odT=st1-vt6; #degF\n", + "print\"\\tOverall temperature difference = deg F\\t\",odT #corresponding to 35 psig and 26 in. Hg\n", + "import numpy\n", + "bpr=numpy.array([10, 8, 7, 6, 5, 5])\n", + "#bpr(1)=10; #degF\n", + "#bpr(2)=8; #degF\n", + "#bpr(3)=7; #degF\n", + "#bpr(4)=6; #degF\n", + "#bpr(5)=5; #degF\n", + "#bpr(6)=5; #degF\n", + "i=1;\n", + "tbpr=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "tbpr[0]=bpr[0];\n", + "while (i<6):\n", + "\n", + " tbpr[i]=tbpr[i-1]+bpr[i];\n", + " i=i+1;\n", + "\n", + "print\"\\tThe estimated total BPR = degF\\t\",tbpr #from fig. 14.36a\n", + "edT=odT-tbpr;\n", + "print\"\\tEffective temperature difference = %.0f degF\\t\",edT\n", + "print\"\\t\\t\\t\\t\\tEVAPORATOR SUMMARY\\t\\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\t\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\t\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t20000\\t\\t2.Steam pressure, psi/in.Hg\\t35\\t\\t14.5\\t\\t4\\t\\t7\\t\\t16.5\\t\\t22\\t\\t3.Steam temp,degF\\t\\t\\t280\\t\\t249\\t\\t224\\t\\t199\\t\\t174\\t\\t151\\t\\t4.delT,degF\\t\\t\\t21\\t\\t17\\t\\t18\\t\\t19\\t\\t18\\t\\t21\\t\\t5.Liquor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t6.BPR, degF\\t\\t\\t10\\t\\t8\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t7.Vapor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t8.Vapor pressure, pis/in.Hg\\t14.5\\t\\t4\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t9.Lambda, Btu/lb\\t\\t946\\t\\t962\\t\\t978\\t\\t994\\t\\t1008\\t\\t1022\\t\\t10.Liquor in, lb/hr\\t\\t73400\\t\\t88300\\t\\t101000\\t\\t113000\\t\\t72000\\t\\t72000\\t\\t11.Liqour out, lb/hr\\t\\t56200\\t\\t73400\\t\\t88300\\t\\t101100\\t\\t58300\\t\\t54700\\t\\t12.Evaporation,lb/hr\\t\\t17200\\t\\t14900\\t\\t12800\\t\\t11900\\t\\t13700\\t\\t17300\\t\\t13.Total solids, \\t\\t38.9\\t\\t29.8\\t\\t24.7\\t\\t21.6\\t\\t18.7\\t\\t20.0\\t\\t14.A,ft^2\\t\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t15.UD,Btu/(hr)*(ft^2)*(degF)\\t262\\t\\t295\\t\\t252\\t\\t251\\t\\t221\\t\\t221\\t\\t16.UD delT,Btu/(hr)*(ft^2)\\t5510\\t\\t5000\\t\\t4530t\\t\\t4770\\t\\t3980\\t\\t4650\\t\"#BPR values from fig 14.36a\n", + "#Specific-heat data are given in Fig. 14.36b\n", + "ev=numpy.array([17200, 14900, 12800, 11900, 13700, 17300]);\n", + "#ev(1)=17200; #lb/hr\n", + "#ev(2)=14900; #lb/hr\n", + "#ev(3)=12800; #lb/hr\n", + "#ev(4)=11900; #lb/hr\n", + "#ev(5)=13700; #lb/hr\n", + "#ev(6)=17300; #lb/hr\n", + "i=1;\n", + "tev =numpy.array([0, 0, 0, 0, 0, 0])\n", + "tev[0]=ev[0];\n", + "while (i<5):\n", + " tev[i]= tev[i-1]+ev[i];\n", + " i=i+1;\n", + "\n", + "print\"\\t\\tTotal amount of water evaporated = \\t lb/hr\\t\",tev\n", + "ttev=tev/6;#lb/hr\n", + "print\"\\tTheoretical amount of steam for a six-effect evaporator = \\t lb/hr\\t\",ttev\n", + "tev2=tev/(6*0.75); #lb/hr . order of 75 percent of theoretical\n", + "print\"\\tSteam used for trail balance = \\t lb/hr\\t\",tev2\n", + "lq=(tev/6);\n", + "lq=lq+(lq*0.15);\n", + "print\"\\tEstimate of the amount of evaporation in the first effect = \\t lb/hr\\t\",lq\n", + "lout6=54000;#lb/hr\n", + "lq2=lout6+lq+2200;#lb/hr\n", + "print\"\\tEstimated discharge from second effect = \\t lb/hr\\t\",lq2\n", + "print\"\\t\\t\\t\\t\\tHEAT BALANCE\\t\"\n", + "cw = 17750000/(500*(125-15-60)); #gpm, values from table 14.6\n", + "print\"\\t\\tCooling water at 60 degreeF = \\t gpm\\t\",cw\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\t\"\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "sf=20000;#lb/hr\n", + "lqi=73400;#lb/hr\n", + "the=90000;\n", + "lqi2=88300\n", + "lt1=259;#degreeF\n", + "lt2=232;#degreeF\n", + "lt3=206;#degreeF\n", + "ecn=90000./20000.;\n", + "ev=17200;#lb/hr\n", + "his=sf*924*0.97;#Btu/hr\n", + "print\"\\t1.a.Heat in steam \\t\\t\",his\n", + "hl=lqi*(lt1-lt2)*0.82;#Btu/hr\n", + "print\"\\t b.Heating liquor \\t\\t\",hl\n", + "hh=his-hl;\n", + "ev1=(hh)/946;#lb/hr\n", + "print\"\\t c.Evaporation\\t\\t\\t\\t\\t\\t\",ev1\n", + "dif=lqi-ev1;\n", + "tft=(dif)*(lt1-209)*0.78;\n", + "print\"\\t d.To flash tank\\t\",tft\n", + "ev2=tft/978;#lb/hr\n", + "print\"\\t\\t\\t\\t\",ev2\n", + "print\"\\t e.Flashed vapor=\\t\\t\",ev2\n", + "p=dif-ev2;\n", + "print\"\\t f.product \\t\",p\n", + "print\"\\t\\t2.a.Heat in 1st vapors\\t\\t\",hh\n", + "hl2=lqi2*(lt2-lt3)*0.85;\n", + "print\"\\t b.Heating liqour\\t\\t\",hl2\n", + "ev3=(hh-hl2)/962;\n", + "print\"\\t c.Evaporation=\",ev3\n", + "\n", + "print\"\\t\\t\\t\\t\\t\",ev3\n", + "lto1=lqi2-ev3;\n", + "print\"\\t d.Liquor to 1b=\\t\\t\",lto1\n", + "print\"total hourly evapouration lb :\",the\n", + "print\"economy is lb/lb :\",ecn\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6 pgno:437" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.6\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tTotal temperature difference = degreeF\n", + "159\n", + "\tThe effective temperature difference is degreeF\n", + "56\n", + "\n", + "\t\t\tCAUSTIC EVAPORATOR MATERIAL BALANCE\n", + "\n", + "\tCell liquour at 120degreeF \t\tWash at 80degreeF\n", + "\n", + "\t---------------------------------------------\n", + "\n", + "\t8.75 prcnt NaOH = l1\n", + "\t16.6 prcnt NaCl = l2\t\t25 prcnt NaCl = w2\n", + "2000 3800 340\n", + "\t74.65 prcnt H20 = l3\t\t75 prcnt H20 = w2\n", + "17050 1020\n", + "\tTotal cell liquor = lq\tTotoal wash = w\n", + "22850 1360\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\t\t\t\tNaOH\t\tNaCl\t\tH20,Lb\tTotal,Lb\n", + "\t\t\t\tprcnt\tLb\tprcnt\tLb\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\tOverall operation:\n", + "\t Cell liquor.......... 8.75\t2000 3800 17050 22850\n", + "\t Wash................. ....\t....\t25.00\t340 1020 1360\n", + "\t Total in............. ....\t2000 4140 18070 24210\n", + "\t Product.............. 50.00\t2000 110 1890 4000\n", + "\t Removed.............. ....\t....\t....\t\t%.0f\t%.0f\n", + "4030 16180 20210\n", + "\n", + "\t\t\t\t\tCAUSTIC EVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\tEffects\n", + "t\t\t\t\t\t--------------------\t\tFlash Tank\n", + "\t\t\t\t\t\\I\t\tII\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam pressure, psi/in.Hg\t30\n", + "\t2.Steam temperature,degreeF\t\t274\t\t169\n", + "\t3.delT,degreeF\t\t\t28\t\t28\n", + "\t4.Liquor temperature, degreeF\t246\t\t141\t\t192\n", + "\t5.BPR, degreeF\t\t\t77\t\t26\t\t77\n", + "\t6.Vapor temperature, degreeF\t\t169\t\t115\t\t115\n", + "\t7.Lambda, Btu/lb\t\t997\t\t1027\t\t1027\n", + "\t8.Feed, lb/hr\t\t\t22788\t\t50602\t\t13367\n", + "\t9.Product, lb/hr\t\t13367\t\t40352\t\t12813\n", + "\t10.Evaporation,lb/hr\t\t9421\t\t10250\t\t554\n", + "\t11.Heat flow, Btu/hr\t\t11890000\t11020000\n", + "\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\t700\n", + "\t13.A,ft**2\t\t\t683\t\t683\n", + "\t14.Tubes, OD, in. and BWG\t1,16\t\t1,16\n", + "\t15.Tube length, ft\t\t7\t\t7\n", + "\t16.No. tubes\t\t\t432\t\t432\n", + "\t17.Circulating pump. gpm\t3200 at 20 ft\t3200 at 20ft\t167 at 45 ft\n", + "\t18.Apparent efficiency, prcnt\t54\t\t64\n", + "\t18.BHP\t\t\t\t38\t\t35\t\t8.2\n", + "\t20.Motor,hp\t\t\t40\t\t40\t\t10.0\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2700000.0\n", + "\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t251\t2970000\t\t25.4\t700\t670\t0.87\t\t3420000\n", + "\t252\t2480000\t\t25.0\t700\t680\t0.88\t\t2820000\n", + "\t252.5\t2290000\t\t24.7\t700\t685\t0.89\t\t2570000\t\t700\n", + "\t253\t2120000\t\t24.5\t700\t695\t0.90\t\t2520000\n", + "\n", + "\tThee gain per minute is gpm\n", + "3200\n", + "\n", + "\t\t\t\tCAUSTIC EVAPORATION HEAT BALANCE\n", + "\n", + "\t\t\t\t(Basis = 1ton/hr NaOH)\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t\tEFFECT\t\t\tBtu/hr\t\tEvaopration, lb/hr\n", + "\n", + "\t1.a.Heat in steam\t\thi\n", + "\t b.Heating liquor\t\thl\n", + "\t c.Resultant heat\t\trhf\n", + "\t d.Heat of concentrate\t\thc\n", + "\t e.Heat of vapors\t\thv\t%.0f\n", + "9511110.0 1452566.4 8058543.6 300000 7758543.6 7781.8892678\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2430000.0\n", + "\tUD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t146\t2400000\t\t25.4\t700\t620\t0.80\t\t2790000\t\t700\n", + "\t146.5\t2160000\t\t25.2\t700\t683\t0.89\t\t2430000\n", + "\n" + ] + } + ], + "source": [ + "print\"\\texample 14.6\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "st1=274; #degreeF\n", + "vt6=115; #degreeF\n", + "odT=st1-vt6; #degreeF\n", + "print\"\\tTotal temperature difference = degreeF\\n\",odT #corresponding to 35 psig\n", + "eb1=77;#degreeF, From fig.14.38\n", + "eb2=26;#degreeF, From fig.14.38\n", + "etd=odT-(eb1+eb2);#degreeF\n", + "print\"\\tThe effective temperature difference is degreeF\\n\",etd\n", + "print\"\\n\\t\\t\\tCAUSTIC EVAPORATOR MATERIAL BALANCE\\n\"\n", + "#Basis: 1 ton/hr NaOH\n", + "print\"\\tCell liquour at 120degreeF \\t\\tWash at 80degreeF\\n\"\n", + "print\"\\t---------------------------------------------\\n\"\n", + "l1=2000;#Lb\n", + "l2=3800;#Lb\n", + "l3=17050;#Lb\n", + "lq=l1+l2+l3;#Lb\n", + "w1=340;#Lb\n", + "w2=1020;#Lb\n", + "w=w1+w2;#Lb\n", + "print\"\\t8.75 prcnt NaOH = l1\\n\\t16.6 prcnt NaCl = l2\\t\\t25 prcnt NaCl = w2\\n\",l1,l2,w1\n", + "print\"\\t74.65 prcnt H20 = l3\\t\\t75 prcnt H20 = w2\\n\",l3,w2\n", + "print\"\\tTotal cell liquor = lq\\tTotoal wash = w\\n\",lq,w\n", + "print\"\\n\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\t\\t\\tNaOH\\t\\tNaCl\\t\\tH20,Lb\\tTotal,Lb\\n\\t\\t\\t\\tprcnt\\tLb\\tprcnt\\tLb\\n\"\n", + "print\"\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\tOverall operation:\\n\\t Cell liquor.......... 8.75\\t\",l1,l2,l3,lq\n", + "print\"\\t Wash................. ....\\t....\\t25.00\\t\",w1,w2,w\n", + "wl1=l2+w1;#Lb\n", + "wl2=l3+w2;#Lb\n", + "wlt=lq+w;\n", + "print\"\\t Total in............. ....\\t\",l1,wl1,wl2,wlt\n", + "prn=110;#Lb\n", + "prh=1890;#Lb\n", + "prt=4000;#Lb\n", + "print\"\\t Product.............. 50.00\\t\",l1,prn,prh,prt\n", + "r1=wl1-prn;#Lb\n", + "r2=wl2-prh;#Lb\n", + "r3=wlt-prt;#Lb\n", + "gain=3200;#gpm\n", + "print\"\\t Removed.............. ....\\t....\\t....\\t\\t%.0f\\t%.0f\\n\",r1,r2,r3\n", + "#Rest of the table is calculated similarily\n", + "print\"\\n\\t\\t\\t\\t\\tCAUSTIC EVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t--------------------\\t\\tFlash Tank\\n\\t\\t\\t\\t\\t\\I\\t\\tII\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam pressure, psi/in.Hg\\t30\\n\\t2.Steam temperature,degreeF\\t\\t274\\t\\t169\\n\\t3.delT,degreeF\\t\\t\\t28\\t\\t28\\n\\t4.Liquor temperature, degreeF\\t246\\t\\t141\\t\\t192\\n\\t5.BPR, degreeF\\t\\t\\t77\\t\\t26\\t\\t77\\n\\t6.Vapor temperature, degreeF\\t\\t169\\t\\t115\\t\\t115\\n\\t7.Lambda, Btu/lb\\t\\t997\\t\\t1027\\t\\t1027\\n\\t8.Feed, lb/hr\\t\\t\\t22788\\t\\t50602\\t\\t13367\\n\\t9.Product, lb/hr\\t\\t13367\\t\\t40352\\t\\t12813\\n\\t10.Evaporation,lb/hr\\t\\t9421\\t\\t10250\\t\\t554\\n\\t11.Heat flow, Btu/hr\\t\\t11890000\\t11020000\\n\\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\\t700\\n\\t13.A,ft**2\\t\\t\\t683\\t\\t683\\n\\t14.Tubes, OD, in. and BWG\\t1,16\\t\\t1,16\\n\\t15.Tube length, ft\\t\\t7\\t\\t7\\n\\t16.No. tubes\\t\\t\\t432\\t\\t432\\n\\t17.Circulating pump. gpm\\t3200 at 20 ft\\t3200 at 20ft\\t167 at 45 ft\\n\\t18.Apparent efficiency, prcnt\\t54\\t\\t64\\n\\t18.BHP\\t\\t\\t\\t38\\t\\t35\\t\\t8.2\\n\\t20.Motor,hp\\t\\t\\t40\\t\\t40\\t\\t10.0\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "V=8;\n", + "s=1.5;\n", + "G=V*s*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G\n", + "UD=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Combining with a steam film coefficient of approximately 1500\n", + "print\"\\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t251\\t2970000\\t\\t25.4\\t700\\t670\\t0.87\\t\\t3420000\\n\\t252\\t2480000\\t\\t25.0\\t700\\t680\\t0.88\\t\\t2820000\\n\\t252.5\\t2290000\\t\\t24.7\\t700\\t685\\t0.89\\t\\t2570000\\t\\t700\\n\\t253\\t2120000\\t\\t24.5\\t700\\t695\\t0.90\\t\\t2520000\\n\"\n", + "print\"\\tThee gain per minute is gpm\\n\",gain\n", + "print\"\\n\\t\\t\\t\\tCAUSTIC EVAPORATION HEAT BALANCE\\n\"\n", + "print\"\\t\\t\\t\\t(Basis = 1ton/hr NaOH)\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\tEFFECT\\t\\t\\tBtu/hr\\t\\tEvaopration, lb/hr\\n\"\n", + "hi=10500*930*0.974;#Btu/hr\n", + "hl=18230*(246-150)*0.83;#Btu/hr\n", + "rh=hi-hl;#Btu/hr\n", + "hc=300000;#Btu/hr\n", + "hv=rh-hc;#Btu/hr\n", + "evv=hv/997;#lb/hr\n", + "print\"\\t1.a.Heat in steam\\t\\thi\\n\\t b.Heating liquor\\t\\thl\\n\\t c.Resultant heat\\t\\trhf\\n\\t d.Heat of concentrate\\t\\thc\\n\\t e.Heat of vapors\\t\\thv\\t%.0f\\n\",hi,hl,rh,hc,hv,evv\n", + "s1=1.35;\n", + "G1=V*s1*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\n\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G1\n", + "UD1=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Using thermal characteristics for this solution\n", + "print\"\\tUD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD1\n", + "#As for effect I:\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t146\\t2400000\\t\\t25.4\\t700\\t620\\t0.80\\t\\t2790000\\t\\t700\\n\\t146.5\\t2160000\\t\\t25.2\\t700\\t683\\t0.89\\t\\t2430000\\n\"\n", + "#end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7 pgno:447" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.7\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tM1 = lb\n", + "17900\n", + "\n", + "\t\t\t\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tEffects\t\t\t\t\tStraight triple effect\t\t\t\tThermocompression\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tSteam flow, lb/hr\t\t22400\t\t\t\t\t\t17900\n", + "\tSteam pressure, psi in.Hg\t20\t\t9\t\t2\t\t20\t\t9\t\t2\n", + "\tSteam temp,degreeF\t\t\t258\t\t237\t\t217\t\t258\t\t237\t\t217\n", + "\ttdelT,degreeF\t\t\t20\t\t18\t\t22\t\t20\t\t18\t\t22\n", + "\tLiquor temp, degreeF\t\t\t238\t\t219\t\t195\t\t238\t\t219\t\t195\n", + "\tBPR, degreeF\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\tVapor temp, degreeF\t\t\t237\t\t217\t\t192\t\t237\t\t215\t\t192\n", + "\tVapor pressure, pis/in.Hg\t9\t\t2\t\t10\t\t9\t\t2\t\t10\n", + "\tLambda, Btu/lb\t\t\t954\t\t965\t\t983\t\t954\t\t965\t\t983\n", + "\tLiquor in, lb/hr\t\t100000\t\t79400\t\t56900\t\t109000\t\t70000\t\t52400\n", + "\tLiqour out, lb/hr\t\t79400\t\t56900\t\t33300\t\t70000\t\t52400\t\t33300\n", + "\tEvaporation,lb/hr\t\t20600\t\t22500\t\t23500\t\t30000\t\t17600\t\t19100\n", + "\tdegreeBrix(out)\t\t\t\t\t\t\t\t\t\t\t\t\t30\n", + "\tCondenser water, gpm\t\t\t\t455\t\t\t\t\t\t365\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\n", + "\t\t\t\tCondenser water = 455 gpm\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\t1.a.Heat in steam\t\n", + "\t20424320.0\n", + "b.Heating liquor\t\n", + "\t736000.0\n", + "c.Evaporation\t\t Evaporation/954\t\n", + "\t19688320.0 20637.6519916\n", + "d.Liquor to 2d = 79362.3480084\n", + "total evapouriation 66700\n" + ] + } + ], + "source": [ + "print\"\\texample 14.7\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "M2=14300;#From fig.14.43 and heat balance above\n", + "M1=32200-14300;#From fig.14.43 and heat balance above\n", + "print\"\\tM1 = lb\\n\",M1\n", + "print\"\\n\\t\\t\\t\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tEffects\\t\\t\\t\\t\\tStraight triple effect\\t\\t\\t\\tThermocompression\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tSteam flow, lb/hr\\t\\t22400\\t\\t\\t\\t\\t\\t17900\\n\\tSteam pressure, psi in.Hg\\t20\\t\\t9\\t\\t2\\t\\t20\\t\\t9\\t\\t2\\n\\tSteam temp,degreeF\\t\\t\\t258\\t\\t237\\t\\t217\\t\\t258\\t\\t237\\t\\t217\\n\\ttdelT,degreeF\\t\\t\\t20\\t\\t18\\t\\t22\\t\\t20\\t\\t18\\t\\t22\\n\\tLiquor temp, degreeF\\t\\t\\t238\\t\\t219\\t\\t195\\t\\t238\\t\\t219\\t\\t195\\n\\tBPR, degreeF\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\\tVapor temp, degreeF\\t\\t\\t237\\t\\t217\\t\\t192\\t\\t237\\t\\t215\\t\\t192\\n\\tVapor pressure, pis/in.Hg\\t9\\t\\t2\\t\\t10\\t\\t9\\t\\t2\\t\\t10\\n\\tLambda, Btu/lb\\t\\t\\t954\\t\\t965\\t\\t983\\t\\t954\\t\\t965\\t\\t983\\n\\tLiquor in, lb/hr\\t\\t100000\\t\\t79400\\t\\t56900\\t\\t109000\\t\\t70000\\t\\t52400\\n\\tLiqour out, lb/hr\\t\\t79400\\t\\t56900\\t\\t33300\\t\\t70000\\t\\t52400\\t\\t33300\\n\\tEvaporation,lb/hr\\t\\t20600\\t\\t22500\\t\\t23500\\t\\t30000\\t\\t17600\\t\\t19100\\n\\tdegreeBrix(out)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t30\\n\\tCondenser water, gpm\\t\\t\\t\\t455\\t\\t\\t\\t\\t\\t365\\n\"\n", + "print\"\\n\\t\\t\\t\\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\\n\\t\\t\\t\\tCondenser water = 455 gpm\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "sf=22400;#lb/hr\n", + "lc=100000;#lb/hr\n", + "t1=238;#degreeF\n", + "t2=230;#degreeF\n", + "te=30000+17600+19100;\n", + "his=sf*940*0.97;#Btu/hr\n", + "hlq=lc*(t1-t2)*0.92;#Btu/hr\n", + "hd=his-hlq;#Btu/hr\n", + "eva=(hd)/954;#lb/hr\n", + "l2d=lc-eva;\n", + "print\"\\t1.a.Heat in steam\\t\\n\\t\" ,his \n", + "print\"b.Heating liquor\\t\\n\\t\",hlq\n", + "print\"c.Evaporation\\t\\t Evaporation/954\\t\\n\\t\",hd,eva \n", + "print\"d.Liquor to 2d = \",l2d\n", + "print\"total evapouriation\",te\n", + "#end\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/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 new file mode 100644 index 00000000..6c6ad595 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_2.ipynb @@ -0,0 +1,1114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 : Evapouration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 pgno:383" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tQevap is Btu/hr\t9610000\n", + "\tQ300 degreeF is Btu/hr\t9600500\n", + "\tTemperature head = degree F\t74\n", + "\tOverall coefficient \t605.5\n", + "\tSurface required is ft^2\t2144.75416788\n" + ] + } + ], + "source": [ + "print\"\\t example 14.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "t1 = 300; # degreeF\n", + "t2 = 226; #degree F\n", + "bs = 700; # Btu/((hr)(ft^2)(ddegree F))\n", + "#Heat Balance\n", + "Qv = 10000 * 961; # Btu/hr\n", + "print\"\\tQevap is Btu/hr\\t\",Qv\n", + "Q3 = 10550 * 910; #Btu/hr\n", + "print\"\\tQ300 degreeF is Btu/hr\\t\",Q3\n", + "\n", + "delT = t1-t2; # degree F\n", + "print\"\\tTemperature head = degree F\\t\",delT\n", + "Ud = bs * 0.865;\n", + "print\"\\tOverall coefficient \\t\",Ud\n", + "A = Qv*10/(Ud * delT); #ft^2\n", + "print\"\\tSurface required is ft^2\\t\",A#Wrong calculation in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tTotal product is lb/hr\t10000.0\n", + "\tTotal evaporation is lb/hr\t40000.0\n", + "\tTotal temperature difference is del degree F\t119\n", + "\tAverage pressure difference is del psi/effect \t8.25\n", + "\t\t\t\t\t\tPressure, psia\t\t delP, psi \t Steam or vapor, degree F \t lambda, Btu/lb\t\tSteam chest, 1st effect \t 26.70 \t\t\t .... \t\t Ts = 244 \t\t ls = 949 \t\tSteam chest, 2nd effect \t 18.45 \t\t\t 8.25 \t\t t1 = 224 \t\t l1 = 961 \t\tSteam chest, 3rd effect \t 10.20(20.7 in. Hg) \t 8.25 \t\t t2 = 194 \t\t l1 = 981 \t\tVapor to condenser \t\t 1.95(26 in. Hg) \t 8.25 \t\t t2 = 125 \t\t l1 = 1022 \t\n", + "\t949*Ws + 50000*(100-224) = 961*w1\t\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\t\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\t\tw1+w2+w3 = 40000\t\n", + "\tSolving simultaneously\t\n", + "\tw1 = \t12400\n", + "\tw2 = \t13300\n", + "\tw3 = \t14300\n", + "\tW1-3 is \t40000\n", + "\tA1 is ft**2 \t1510\n", + "\tA2 is ft**2 \t1588\n", + "\tA3 is ft**2 \t1512\n", + "\tHeat to condenser is Btu/hr\t14614600\n", + "\tWater requirement is lb/hr\t417560\n", + "\t= gpm \t835\n" + ] + } + ], + "source": [ + "print\"\\t example 14.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "wf = 50000; # lb/hr\n", + "sf = wf * 0.10; # lb/hr\n", + "tp = sf/0.50; # lb/hr\n", + "print\"\\tTotal product is lb/hr\\t\",tp\n", + "te = wf - tp;\n", + "print\"\\tTotal evaporation is lb/hr\\t\",te\n", + "cf = 1.0;\n", + "tF = 100; # degree F\n", + "T1 = 244; # degree F\n", + "T2 = 125; # degree F\n", + "U1=600; # Btu/((hr)*(ft**2)*(degree F))\n", + "U2=250; # Btu/((hr)*(ft**2)*(degree F))\n", + "U3=125; # Btu/((hr)*(ft**2)*(degree F))\n", + "\n", + "T = T1-T2;\n", + "print\"\\tTotal temperature difference is del degree F\\t\",T\n", + "df = (26.70- 1.95)/3; # psi/effect\n", + "print\"\\tAverage pressure difference is del psi/effect \\t\",df\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\tPressure, psia\\t\\t delP, psi \\t Steam or vapor, degree F \\t lambda, Btu/lb\\t\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\t .... \\t\\t Ts = 244 \\t\\t ls = 949 \\t\\tSteam chest, 2nd effect \\t 18.45 \\t\\t\\t 8.25 \\t\\t t1 = 224 \\t\\t l1 = 961 \\t\\tSteam chest, 3rd effect \\t 10.20(20.7 in. Hg) \\t 8.25 \\t\\t t2 = 194 \\t\\t l1 = 981 \\t\\tVapor to condenser \\t\\t 1.95(26 in. Hg) \\t 8.25 \\t\\t t2 = 125 \\t\\t l1 = 1022 \\t\"\n", + "\n", + "print\"\\t949*Ws + 50000*(100-224) = 961*w1\\t\\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\\t\\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\\t\\tw1+w2+w3 = 40000\\t\"\n", + "print\"\\tSolving simultaneously\\t\"\n", + "w1=12400;\n", + "print\"\\tw1 = \\t\",w1\n", + "w2=13300;\n", + "print\"\\tw2 = \\t\",w2\n", + "w3=14300;\n", + "print\"\\tw3 = \\t\",w3\n", + "\n", + "Wt = w1+w2+w3;\n", + "print\"\\tW1-3 is \\t\",Wt\n", + "Ws = 19100;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "Ts = 244;\n", + "t1 = 224;\n", + "t2 = 194;\n", + "t3 = 125;\n", + "\n", + "A1 = (Ws * lms)/(U1*(Ts-t1)); #ft**2\n", + "print\"\\tA1 is ft**2 \\t\",A1\n", + "A2 = (w1*lm1)/(U2*(t1-t2)); #ft**2\n", + "print\"\\tA2 is ft**2 \\t\",A2\n", + "A3 = (w2 * lm2)/(U3*(t2-t3)); #ft**2\n", + "print\"\\tA3 is ft**2 \\t\",A3\n", + "\n", + "hc = w3 * lm3; # Btu/hr, WRONG CALCULATION IN TEXT BOOK\n", + "print\"\\tHeat to condenser is Btu/hr\\t\",hc\n", + "wr = hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement is lb/hr\\t\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t= gpm \\t\",wr1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3 pgno:414" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t981*w2 + 50000*(100-125) = 1022*w3\n", + "\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\n", + "\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\n", + "\tw1+w2+w3 = 40000\n", + "\n", + "\tSolving simultaneously\n", + "\n", + "\tw1-3 = \n", + "40000\n", + "\tA1 is ft**2\n", + "2010\n", + "\tA2 is ft**2\n", + "2043\n", + "\tA3 is ft**2\n", + "1048\n", + "\tAverage surface is ft**2\n", + "1700\n", + "\n", + "\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\n", + "5100\n", + "\tRecalculation\n", + "\n", + "\tA1 is ft**2\n", + "0\n", + "\tA2 is ft**2\n", + "0\n", + "\tA3 is ft**2\n", + "1048\n", + "\tTs-t3 is degreeF\n", + "119\n", + "\t\t\t\t\tPressure, psia\t\t Steam or vapor, degreeF \t lambda, Btu/lb\n", + "\tSteam chest, 1st effect \t 26.70 \t\t\tTs = 244 \t\t 949 \n", + "\tSteam chest, 2nd effect \t 16.0 \t\t\t t1 = 216 \t\t 968 \n", + "\tSteam chest, 3rd effect \t 16.4 in. Hg) \t\t t2 = 175 \t\t 992 \n", + "\tVapor to condenser \t\t 26 in. Hg \t\t t3 = 125 \t\t l1 = 1022 \n", + "\n", + "\tw1 is \n", + "15450\n", + "\tw2 is \n", + "13200\n", + "\tw3 is \n", + "11350\n", + "\tWs is \n", + "16850\n", + "\tHeat to condenser is Btu/hr\n", + "11599700\n", + "\tWater requirement lb/hr\n", + "331420\n", + "\t\t\t= gpm\n", + "662\n", + "\tEconomy, lb evaporation/lb steam \n", + "2\n", + "\t\t\t\tForward\t\tBackward\n", + "\tTotal steam, lb/hr\t19100\t\t16850\n", + "\tCooling water, gpm\t840\t\t664\n", + "\tTotal surface, ft**2\t4800\t\t4500\n" + ] + } + ], + "source": [ + "print\"\\t example 14.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Same conditions as example 14.2\n", + "U1 = 400; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U2 = 250; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U3 = 175; #Btu/((hr)*(ft**2)*(degreeF))\n", + "\n", + "w1 = 50000; # lb/hr From example 14.2\n", + "wt = 40000; # lb/hr From example 14.2\n", + "cf = 1; # From example 14.2\n", + "\n", + "print\"\\t981*w2 + 50000*(100-125) = 1022*w3\\n\\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\\n\\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\\n\\tw1+w2+w3 = 40000\\n\"\n", + "print\"\\tSolving simultaneously\\n\"\n", + "w1 = 15950;\n", + "w2 = 12900;\n", + "w3 = 11150;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "\n", + "wt = w1+w2+w3;\n", + "print\"\\tw1-3 = \\n\",wt\n", + "Ws = 16950;\n", + "A1 = (Ws*lms)/(U1*20); #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A1\n", + "A2 = (w1*lm1)/(U2*30); #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A2\n", + "A3 = (w2*lm2)/(U3*69); #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A3\n", + "\n", + "Avs = (A1 + A2 + A3)/3; #ft**2\n", + "print\"\\tAverage surface is ft**2\\n\",Avs\n", + "Av1 = 3 * Avs; #ft**2\n", + "print\"\\n\\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\\n\",Av1\n", + "print\"\\tRecalculation\\n\"\n", + "Av2 = 1500; #ft**2, assume\n", + "dT1 = 28; #degreeF\n", + "A4 = (20/dT1)*A1; #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A4\n", + "dT2 = 41; #degreeF\n", + "A5 = (30/dT2)*A2; #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A5\n", + "dT3 = 50; #degreeF\n", + "A6 = (69/50)*A3; #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A6\n", + "del1 = 119; #degreeF\n", + "print\"\\tTs-t3 is degreeF\\n\",del1\n", + "print\"\\t\\t\\t\\t\\tPressure, psia\\t\\t Steam or vapor, degreeF \\t lambda, Btu/lb\\n\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\tTs = 244 \\t\\t 949 \\n\\tSteam chest, 2nd effect \\t 16.0 \\t\\t\\t t1 = 216 \\t\\t 968 \\n\\tSteam chest, 3rd effect \\t 16.4 in. Hg) \\t\\t t2 = 175 \\t\\t 992 \\n\\tVapor to condenser \\t\\t 26 in. Hg \\t\\t t3 = 125 \\t\\t l1 = 1022 \\n\"\n", + "\n", + "w1 = 15450; #Solving again for \n", + "print\"\\tw1 is \\n\",w1\n", + "w2 = 13200;\n", + "print\"\\tw2 is \\n\",w2\n", + "w3 = 11350;\n", + "print\"\\tw3 is \\n\",w3\n", + "Ws = 16850;\n", + "print\"\\tWs is \\n\",Ws\n", + "Hc = w3 * 1022;\n", + "print\"\\tHeat to condenser is Btu/hr\\n\",Hc\n", + "wr = Hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement lb/hr\\n\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t\\t\\t= gpm\\n\",wr1\n", + "ec = wt/Ws;\n", + "print\"\\tEconomy, lb evaporation/lb steam \\n\",ec\n", + "\n", + "#comparision of forward and backward feed\n", + "print\"\\t\\t\\t\\tForward\\t\\tBackward\\n\\tTotal steam, lb/hr\\t19100\\t\\t16850\\n\\tCooling water, gpm\\t840\\t\\t664\\n\\tTotal surface, ft**2\\t4800\\t\\t4500\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4 pgno:418" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.4 \n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\n", + "\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\n", + "\n", + "\tEffects\t\tWater evaporated(lb/(hr)*(ft**2))\n", + "\n", + "\t1\t\t14-16\n", + "\t2\t\t6-8\n", + "\t3\t\t5-6\n", + "\t4\t\t4-5\n", + "\t5\t\t3-4\n", + "\n", + "\n", + "\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam flow, lb/hr\t\t42600\t\t38000\n", + "\t2.Steam pressure, psi/in.Hg\t30\t\t30\t\t15\t\t5\t\t4\t\t14.5\n", + "\n", + "\t3.Steam temp,degreeF\t\t\t274\t\t274\t\t250\t\t227\t\t205\t\t181\n", + "\n", + "\t4.delT,degreeF\t\t\t23\t\t23\t\t21\t\t20\t\t20\t\t27\n", + "\t5.Liquor temp, degreeF\t\t251\t\t251\t\t229\t\t207\t\t185\t\t164\n", + "\t6.BPR, degreeF\t\t\t1\t\t1\t\t2\t\t2\t\t4\t\t7\n", + "\t7.Vapor temp, degreeF\t\t250\t\t250\t\t227\t\t205\t\t181\t\t147\n", + "\t8.Vapor pressure, pis/in.Hg\t15\t\t15\t\t5\t\t4\t\t14.5\t\t23\n", + "\t9.Lambda, Btu/lb\t\t946\t\t946\t\t960\t\t975\t\t990\t\t1010\n", + "\t10.Liquor in, lb/hr\t\t229000\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\n", + "\t11.Liqour out, lb/hr\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\t\t49600\n", + "\t12.Evaporation,lb/hr\t\t38800\t\t36200\t\t36900\t\t29300\t\t23800\t\t14400\n", + "\t13.degreeBrix(out)\t\t\t15.7\t\t19.4\t\t25.5\t\t34.4\t\t46.5\t\t50.0\n", + "\t14.A,ft**2\t\t\t3500\t\t3500\t\t5000\t\t5000\t\t5000\t\t3500\n", + "\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\t478\t\t425\t\t310\t\t264\t\t219\t\t138\n", + "\t16.UD delT,Btu/(hr)*(ft**2)\t11000\t\t9780\t\t6520\t\t5270\t\t4390\t\t3740\n", + "\n", + "\tTotal temperature difference in the evaporator system = degreeF\n", + "127\n", + "\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\n", + "16\n", + "\tTotal EFFECTIVE temperature difference = degreeF\n", + "111\n", + "\n", + "\t\t\t\tSUGAR-JUICE HEATERS\n", + "\n", + "\tRaw-juice heaters\t\t\t\tClear=juice heaters\n", + "\t-----------------------------------------------------------------------------------------\n", + "\n", + "\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr 229000 212 184 5834920.0\n", + "\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\n", + "229000 243 220 4792970.0\n", + "\tVapor temp. = 227degreeF\tdelT=26.6degreeF\t\tVapor temp. = 250degreeF\tdelT=15.8degreeF\n", + "\n", + "\tud1=.\t\t\t\t\t\tUD=ud2\n", + "231 243\n", + "\tSurface,A=A1 ft**2\t\t\t\tSurface,A=A2 ft**2\n", + "\n", + "949.601275917 1248.36432776\n", + "\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr 229000 184 144 8244000.0\n", + "\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\n", + "229000 220 200 4122000.0\n", + "\tVapor temp. = 205degreeF\tdelT=37.6degreeF\t\tVapor temp. = 227degreeF\tdelT=14.8degreeF\n", + "\n", + "\tUD=Ud3\t\t\t\t\t\tUD=Ud4\n", + "230 214\n", + "\tSurface,A=A3 ft**2\t\t\t\tSurface,A=A4 ft**2\n", + "\n", + "953.2839963 1301.46501642\n", + "\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr 229000 144 82 4122000.0\n", + "\t(Use 2 heaters at 1300 ft**2 each plus 1\n", + "\t\t\t\t\t\t\theater at 1300 ft**2 as spare)\n", + "\n", + "\tVapor temp. = 181degreeF\tdelT=62.2degreeF\n", + "\tSurface,A=\n", + "946.715663757\n", + "\t(Use 3 heaters at 100 ft**2\n", + "\teach plus 1 heater as spare)\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t----------------------------------------------------\n", + "\n", + "\t1A.Heat in steam........\n", + "38388138.0\n", + "\t Heating liquor.......\n", + "\t\t\t\t%.3e\t.\n", + "1667120.0 36721018.0 38817.1437632\n", + "\t Liqour to 1B\n", + "\t = lb/hr\n", + "190182.856237\n", + "\t1B.Heat in steam........\n", + "34979292.7593\n", + "\t Heating liquor........\n", + "\t\t\t\t\n", + "0.0 34979292.7593 36975.9965744\n", + "\t Liqour to 2d \n", + "\t effect= lb/hr\n", + "153206.859662\n", + "\t\t\t\t\t\t\t\tLb/hr\n", + "\n", + "\t(a) Actual evaporation..................................\n", + "179400\n", + "\t(b) Equivalent evaporation from vapors of \n", + "\t 1st effect used for vaccum pans......................\n", + "145500\n", + "\t(c) Equivalent evaporation from 1st effect \n", + "\t vapors used for clarified-juice heaters..............\n", + "19700\n", + "\t(d) Equivalent evaporation from 2d effect \n", + "\t vapors used for clarified-and raw-juice heaters......\n", + "30600\n", + "\t(e) Equivalent evaporation from 3d effect \n", + "\t vapors used for raw-juice heaters....................\n", + "2.71828182846\n", + "\t(f) Equivalent evaporation from 4th effect \n", + "\t vapors used for raw-juice heaters....................\n", + "13100\n", + "\t -----\n", + "\n", + "\t Extrapolated evaporation............................\n", + "406200\n", + "\t\tEstimated steam quantity = lb/hr\n", + "81240\n", + "\t\tActual steam required from final heat balance = lb/hr\n", + "80600\n", + "\t\t\t\t\t\t\tError = lb/hr\n", + "640\n", + "\tGallons per minute of Water required = gpm 583\n" + ] + } + ], + "source": [ + "print\"\\texample 14.4 \\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "from math import e\n", + "#Assumed that 37500 lb/hr of 15 psig vapor is bled from the first effect for use in thevaccum pans\n", + "print\"\\n\\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\\n\"\n", + "print\"\\tEffects\\t\\tWater evaporated(lb/(hr)*(ft**2))\\n\"\n", + "print\"\\t1\\t\\t14-16\\n\\t2\\t\\t6-8\\n\\t3\\t\\t5-6\\n\\t4\\t\\t4-5\\n\\t5\\t\\t3-4\\n\"\n", + "print\"\\n\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t42600\\t\\t38000\\n\\t2.Steam pressure, psi/in.Hg\\t30\\t\\t30\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\n\"\n", + "print\"\\t3.Steam temp,degreeF\\t\\t\\t274\\t\\t274\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\n\"\n", + "print\"\\t4.delT,degreeF\\t\\t\\t23\\t\\t23\\t\\t21\\t\\t20\\t\\t20\\t\\t27\\n\\t5.Liquor temp, degreeF\\t\\t251\\t\\t251\\t\\t229\\t\\t207\\t\\t185\\t\\t164\\n\\t6.BPR, degreeF\\t\\t\\t1\\t\\t1\\t\\t2\\t\\t2\\t\\t4\\t\\t7\\n\\t7.Vapor temp, degreeF\\t\\t250\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\t\\t147\\n\\t8.Vapor pressure, pis/in.Hg\\t15\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\t\\t23\\n\\t9.Lambda, Btu/lb\\t\\t946\\t\\t946\\t\\t960\\t\\t975\\t\\t990\\t\\t1010\\n\\t10.Liquor in, lb/hr\\t\\t229000\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\n\\t11.Liqour out, lb/hr\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\t\\t49600\\n\\t12.Evaporation,lb/hr\\t\\t38800\\t\\t36200\\t\\t36900\\t\\t29300\\t\\t23800\\t\\t14400\\n\\t13.degreeBrix(out)\\t\\t\\t15.7\\t\\t19.4\\t\\t25.5\\t\\t34.4\\t\\t46.5\\t\\t50.0\\n\\t14.A,ft**2\\t\\t\\t3500\\t\\t3500\\t\\t5000\\t\\t5000\\t\\t5000\\t\\t3500\\n\\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\\t478\\t\\t425\\t\\t310\\t\\t264\\t\\t219\\t\\t138\\n\\t16.UD delT,Btu/(hr)*(ft**2)\\t11000\\t\\t9780\\t\\t6520\\t\\t5270\\t\\t4390\\t\\t3740\\n\"#BPR values from fig 14.34a\n", + "#Saturate vapor pressure above the liquour determined from Table 7\n", + "#Saturated steam pressure in the following effect determined from Table 7\n", + "\n", + "t1 = 274; #degreeF\n", + "t2 = 147; #degreeF\n", + "t = t1-t2; #degreeF\n", + "print\"\\tTotal temperature difference in the evaporator system = degreeF\\n\",t\n", + "bpr1 = 1; #degreeF\n", + "bpr2 = 2; #degreeF\n", + "bpr3 = 2; #degreeF\n", + "bpr4 = 4; #degreeF\n", + "bpr5 = 7; #degreeF\n", + "bpr = bpr1 + bpr2 + bpr3 + bpr4 + bpr5; #degreeF\n", + "print\"\\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\\n\",bpr\n", + "tf = t-bpr; #degreeF\n", + "print\"\\tTotal EFFECTIVE temperature difference = degreeF\\n\",tf\n", + "lbh = 229000; #lb/hr\n", + "tp1=212; #degreeF\n", + "tp2=184; #degreeF\n", + "tp3=144; #degreeF\n", + "tp4=82; #degreeF\n", + "tj1=243; #degreeF\n", + "tj2=220; #degreeF\n", + "tj3=200; #degreeF\n", + "Ud1=231;\n", + "Ud2=243;\n", + "Ud3=230;\n", + "Ud4=214;\n", + "Ud5=217;\n", + "print\"\\n\\t\\t\\t\\tSUGAR-JUICE HEATERS\\n\"\n", + "print\"\\tRaw-juice heaters\\t\\t\\t\\tClear=juice heaters\\n\\t-----------------------------------------------------------------------------------------\\n\"\n", + "rj1=lbh*(tp1-tp2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr\",lbh,tp1,tp2,rj1\n", + "rj2=lbh*(tj1-tj2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\\n\",lbh,tj1,tj2,rj2\n", + "print\"\\tVapor temp. = 227degreeF\\tdelT=26.6degreeF\\t\\tVapor temp. = 250degreeF\\tdelT=15.8degreeF\\n\"\n", + "print\"\\tud1=.\\t\\t\\t\\t\\t\\tUD=ud2\\n\",Ud1,Ud2\n", + "A1=rj1/(26.6*Ud1);#ft**2\n", + "A2=rj2/(15.8*Ud2);#ft**2\n", + "print\"\\tSurface,A=A1 ft**2\\t\\t\\t\\tSurface,A=A2 ft**2\\n\\n\",A1,A2\n", + "\n", + "rj3=lbh*(tp2-tp3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr\",lbh,tp2,tp3,rj3\n", + "rj4=lbh*(tj2-tj3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\\n\",lbh,tj2,tj3,rj4\n", + "print\"\\tVapor temp. = 205degreeF\\tdelT=37.6degreeF\\t\\tVapor temp. = 227degreeF\\tdelT=14.8degreeF\\n\"\n", + "print\"\\tUD=Ud3\\t\\t\\t\\t\\t\\tUD=Ud4\\n\",Ud3,Ud4\n", + "A3=rj3/(37.6*Ud3);#ft**2\n", + "A4=rj4/(14.8*Ud4);#ft**2\n", + "print\"\\tSurface,A=A3 ft**2\\t\\t\\t\\tSurface,A=A4 ft**2\\n\\n\",A3,A4\n", + "\n", + "rj5=lbh*(tp3-tp4)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr\",lbh,tp3,tp4,rj4\n", + "print\"\\t(Use 2 heaters at 1300 ft**2 each plus 1\\n\\t\\t\\t\\t\\t\\t\\theater at 1300 ft**2 as spare)\\n\"\n", + "A5=rj5/(62.2*Ud5);#ft**2\n", + "print\"\\tVapor temp. = 181degreeF\\tdelT=62.2degreeF\\n\\tSurface,A=\\n\",A5\n", + "print\"\\t(Use 3 heaters at 100 ft**2\\n\\teach plus 1 heater as spare)\\n\\n\"\n", + "\n", + "v1=42600;#lb/hr\n", + "tt1=251;#degreeF\n", + "print\"\\t\\t\\t\\tHEAT BALANCE\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t----------------------------------------------------\\n\"\n", + "hia=v1*929*0.97;#Btu/hr\n", + "print\"\\t1A.Heat in steam........\\n\",hia\n", + "hla=lbh*(tt1-tj1)*0.91;#Btu/hr\n", + "hh=hia-hla;#Btu/hr\n", + "lb1=946;#Btu/lb\n", + "dif=hh/lb1;#lb/hr\n", + "print\"\\t Heating liquor.......\\n\\t\\t\\t\\t%.3e\\t.\\n\",hla,hh,dif\n", + "ltob=lbh-dif;#lb/hr\n", + "print\"\\t Liqour to 1B\\n\\t = lb/hr\\n\",ltob\n", + "hia1=dif*929*0.97;#Btu/hr\n", + "print\"\\t1B.Heat in steam........\\n\",hia1\n", + "hla1=ltob*(tt1-tt1)*0.91;#Btu/hr\n", + "hh1=hia1;#Btu/hr\n", + "dif1=hh1/lb1;#lb/hr\n", + "print\"\\t Heating liquor........\\n\\t\\t\\t\\t\\n\",hla1,hh1,dif1\n", + "dif2=ltob-dif1;#lb/hr\n", + "print\"\\t Liqour to 2d \\n\\t effect= lb/hr\\n\",dif2\n", + "#Similarily the values in the table are calculated\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\tLb/hr\\n\"\n", + "aa=179400;#lb/hr\n", + "bb=145500;#lb/hr\n", + "cc=19700;#lb/hr\n", + "dd=30600;#lb/hr\n", + "ee=17900;#lb/hr\n", + "ff=13100;#lb/hr\n", + "tto=aa+bb+cc+dd+ee+ff;#lb/hr\n", + "print\"\\t(a) Actual evaporation..................................\\n\",aa\n", + "print\"\\t(b) Equivalent evaporation from vapors of \\n\\t 1st effect used for vaccum pans......................\\n\",bb\n", + "print\"\\t(c) Equivalent evaporation from 1st effect \\n\\t vapors used for clarified-juice heaters..............\\n\",cc\n", + "print\"\\t(d) Equivalent evaporation from 2d effect \\n\\t vapors used for clarified-and raw-juice heaters......\\n\",dd\n", + "print\"\\t(e) Equivalent evaporation from 3d effect \\n\\t vapors used for raw-juice heaters....................\\n\",e\n", + "print\"\\t(f) Equivalent evaporation from 4th effect \\n\\t vapors used for raw-juice heaters....................\\n\",ff\n", + "print\"\\t -----\\n\"\n", + "print\"\\t Extrapolated evaporation............................\\n\",tto\n", + "esq=tto/5;#lb/hr\n", + "print\"\\t\\tEstimated steam quantity = lb/hr\\n\",esq\n", + "aesq=80600;#lb/hr\n", + "err = esq-aesq;#lb/hr\n", + "print\"\\t\\tActual steam required from final heat balance = lb/hr\\n\",aesq\n", + "print\"\\t\\t\\t\\t\\t\\t\\tError = lb/hr\\n\",err\n", + "ta=15;\n", + "Q=14575000; #Btu/hr Total hourly evaporation\n", + "Gpm=Q/(500*(t2-tp4-ta));#From equation 14.4\n", + "print\"\\tGallons per minute of Water required = gpm\",Gpm\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5 pgno:427" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.5\t\n", + "\tapproximate values are mentioned in the book \t\n", + "\tOverall temperature difference = deg F\t155\n", + "\tThe estimated total BPR = degF\t[10 18 25 31 36 41]\n", + "\tEffective temperature difference = %.0f degF\t[145 137 130 124 119 114]\n", + "\t\t\t\t\tEVAPORATOR SUMMARY\t\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\t\t\t\t\t\t----------------------------------------------------------------------------------------------\t\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\t1.Steam flow, lb/hr\t\t20000\t\t2.Steam pressure, psi/in.Hg\t35\t\t14.5\t\t4\t\t7\t\t16.5\t\t22\t\t3.Steam temp,degF\t\t\t280\t\t249\t\t224\t\t199\t\t174\t\t151\t\t4.delT,degF\t\t\t21\t\t17\t\t18\t\t19\t\t18\t\t21\t\t5.Liquor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t6.BPR, degF\t\t\t10\t\t8\t\t7\t\t6\t\t5\t\t5\t\t7.Vapor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t8.Vapor pressure, pis/in.Hg\t14.5\t\t4\t\t7\t\t6\t\t5\t\t5\t\t9.Lambda, Btu/lb\t\t946\t\t962\t\t978\t\t994\t\t1008\t\t1022\t\t10.Liquor in, lb/hr\t\t73400\t\t88300\t\t101000\t\t113000\t\t72000\t\t72000\t\t11.Liqour out, lb/hr\t\t56200\t\t73400\t\t88300\t\t101100\t\t58300\t\t54700\t\t12.Evaporation,lb/hr\t\t17200\t\t14900\t\t12800\t\t11900\t\t13700\t\t17300\t\t13.Total solids, \t\t38.9\t\t29.8\t\t24.7\t\t21.6\t\t18.7\t\t20.0\t\t14.A,ft^2\t\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t15.UD,Btu/(hr)*(ft^2)*(degF)\t262\t\t295\t\t252\t\t251\t\t221\t\t221\t\t16.UD delT,Btu/(hr)*(ft^2)\t5510\t\t5000\t\t4530t\t\t4770\t\t3980\t\t4650\t\n", + "\t\tTotal amount of water evaporated = \t lb/hr\t[17200 32100 44900 56800 70500 0]\n", + "\tTheoretical amount of steam for a six-effect evaporator = \t lb/hr\t[ 2866 5350 7483 9466 11750 0]\n", + "\tSteam used for trail balance = \t lb/hr\t[ 3822.22222222 7133.33333333 9977.77777778 12622.22222222\n", + " 15666.66666667 0. ]\n", + "\tEstimate of the amount of evaporation in the first effect = \t lb/hr\t[ 3295.9 6152.5 8605.45 10885.9 13512.5 0. ]\n", + "\tEstimated discharge from second effect = \t lb/hr\t[ 59495.9 62352.5 64805.45 67085.9 69712.5 56200. ]\n", + "\t\t\t\t\tHEAT BALANCE\t\n", + "\t\tCooling water at 60 degreeF = \t gpm\t710\n", + "\t--------------------------------------------------------\t\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\t\n", + "\t--------------------------------------------------------\t\n", + "\t1.a.Heat in steam \t\t17925600.0\n", + "\t b.Heating liquor \t\t1625076.0\n", + "\t c.Evaporation\t\t\t\t\t\t17230.9978858\n", + "\t d.To flash tank\t2190591.08245\n", + "\t\t\t\t2239.86818247\n", + "\t e.Flashed vapor=\t\t2239.86818247\n", + "\t f.product \t53929.1339317\n", + "\t\t2.a.Heat in 1st vapors\t\t16300524.0\n", + "\t b.Heating liqour\t\t1951430.0\n", + "\t c.Evaporation= 14915.8981289\n", + "\t\t\t\t\t14915.8981289\n", + "\t d.Liquor to 1b=\t\t73384.1018711\n", + "total hourly evapouration lb : 90000\n", + "economy is lb/lb : 4.5\n" + ] + } + ], + "source": [ + "print\"\\texample 14.5\\t\"\n", + "print\"\\tapproximate values are mentioned in the book \\t\"\n", + "st1=280; #degF\n", + "vt6=125; #degF\n", + "odT=st1-vt6; #degF\n", + "print\"\\tOverall temperature difference = deg F\\t\",odT #corresponding to 35 psig and 26 in. Hg\n", + "import numpy\n", + "bpr=numpy.array([10, 8, 7, 6, 5, 5])\n", + "#bpr(1)=10; #degF\n", + "#bpr(2)=8; #degF\n", + "#bpr(3)=7; #degF\n", + "#bpr(4)=6; #degF\n", + "#bpr(5)=5; #degF\n", + "#bpr(6)=5; #degF\n", + "i=1;\n", + "tbpr=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "tbpr[0]=bpr[0];\n", + "while (i<6):\n", + "\n", + " tbpr[i]=tbpr[i-1]+bpr[i];\n", + " i=i+1;\n", + "\n", + "print\"\\tThe estimated total BPR = degF\\t\",tbpr #from fig. 14.36a\n", + "edT=odT-tbpr;\n", + "print\"\\tEffective temperature difference = %.0f degF\\t\",edT\n", + "print\"\\t\\t\\t\\t\\tEVAPORATOR SUMMARY\\t\\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\t\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\t\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t20000\\t\\t2.Steam pressure, psi/in.Hg\\t35\\t\\t14.5\\t\\t4\\t\\t7\\t\\t16.5\\t\\t22\\t\\t3.Steam temp,degF\\t\\t\\t280\\t\\t249\\t\\t224\\t\\t199\\t\\t174\\t\\t151\\t\\t4.delT,degF\\t\\t\\t21\\t\\t17\\t\\t18\\t\\t19\\t\\t18\\t\\t21\\t\\t5.Liquor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t6.BPR, degF\\t\\t\\t10\\t\\t8\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t7.Vapor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t8.Vapor pressure, pis/in.Hg\\t14.5\\t\\t4\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t9.Lambda, Btu/lb\\t\\t946\\t\\t962\\t\\t978\\t\\t994\\t\\t1008\\t\\t1022\\t\\t10.Liquor in, lb/hr\\t\\t73400\\t\\t88300\\t\\t101000\\t\\t113000\\t\\t72000\\t\\t72000\\t\\t11.Liqour out, lb/hr\\t\\t56200\\t\\t73400\\t\\t88300\\t\\t101100\\t\\t58300\\t\\t54700\\t\\t12.Evaporation,lb/hr\\t\\t17200\\t\\t14900\\t\\t12800\\t\\t11900\\t\\t13700\\t\\t17300\\t\\t13.Total solids, \\t\\t38.9\\t\\t29.8\\t\\t24.7\\t\\t21.6\\t\\t18.7\\t\\t20.0\\t\\t14.A,ft^2\\t\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t15.UD,Btu/(hr)*(ft^2)*(degF)\\t262\\t\\t295\\t\\t252\\t\\t251\\t\\t221\\t\\t221\\t\\t16.UD delT,Btu/(hr)*(ft^2)\\t5510\\t\\t5000\\t\\t4530t\\t\\t4770\\t\\t3980\\t\\t4650\\t\"#BPR values from fig 14.36a\n", + "#Specific-heat data are given in Fig. 14.36b\n", + "ev=numpy.array([17200, 14900, 12800, 11900, 13700, 17300]);\n", + "#ev(1)=17200; #lb/hr\n", + "#ev(2)=14900; #lb/hr\n", + "#ev(3)=12800; #lb/hr\n", + "#ev(4)=11900; #lb/hr\n", + "#ev(5)=13700; #lb/hr\n", + "#ev(6)=17300; #lb/hr\n", + "i=1;\n", + "tev =numpy.array([0, 0, 0, 0, 0, 0])\n", + "tev[0]=ev[0];\n", + "while (i<5):\n", + " tev[i]= tev[i-1]+ev[i];\n", + " i=i+1;\n", + "\n", + "print\"\\t\\tTotal amount of water evaporated = \\t lb/hr\\t\",tev\n", + "ttev=tev/6;#lb/hr\n", + "print\"\\tTheoretical amount of steam for a six-effect evaporator = \\t lb/hr\\t\",ttev\n", + "tev2=tev/(6*0.75); #lb/hr . order of 75 percent of theoretical\n", + "print\"\\tSteam used for trail balance = \\t lb/hr\\t\",tev2\n", + "lq=(tev/6);\n", + "lq=lq+(lq*0.15);\n", + "print\"\\tEstimate of the amount of evaporation in the first effect = \\t lb/hr\\t\",lq\n", + "lout6=54000;#lb/hr\n", + "lq2=lout6+lq+2200;#lb/hr\n", + "print\"\\tEstimated discharge from second effect = \\t lb/hr\\t\",lq2\n", + "print\"\\t\\t\\t\\t\\tHEAT BALANCE\\t\"\n", + "cw = 17750000/(500*(125-15-60)); #gpm, values from table 14.6\n", + "print\"\\t\\tCooling water at 60 degreeF = \\t gpm\\t\",cw\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\t\"\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "sf=20000;#lb/hr\n", + "lqi=73400;#lb/hr\n", + "the=90000;\n", + "lqi2=88300\n", + "lt1=259;#degreeF\n", + "lt2=232;#degreeF\n", + "lt3=206;#degreeF\n", + "ecn=90000./20000.;\n", + "ev=17200;#lb/hr\n", + "his=sf*924*0.97;#Btu/hr\n", + "print\"\\t1.a.Heat in steam \\t\\t\",his\n", + "hl=lqi*(lt1-lt2)*0.82;#Btu/hr\n", + "print\"\\t b.Heating liquor \\t\\t\",hl\n", + "hh=his-hl;\n", + "ev1=(hh)/946;#lb/hr\n", + "print\"\\t c.Evaporation\\t\\t\\t\\t\\t\\t\",ev1\n", + "dif=lqi-ev1;\n", + "tft=(dif)*(lt1-209)*0.78;\n", + "print\"\\t d.To flash tank\\t\",tft\n", + "ev2=tft/978;#lb/hr\n", + "print\"\\t\\t\\t\\t\",ev2\n", + "print\"\\t e.Flashed vapor=\\t\\t\",ev2\n", + "p=dif-ev2;\n", + "print\"\\t f.product \\t\",p\n", + "print\"\\t\\t2.a.Heat in 1st vapors\\t\\t\",hh\n", + "hl2=lqi2*(lt2-lt3)*0.85;\n", + "print\"\\t b.Heating liqour\\t\\t\",hl2\n", + "ev3=(hh-hl2)/962;\n", + "print\"\\t c.Evaporation=\",ev3\n", + "\n", + "print\"\\t\\t\\t\\t\\t\",ev3\n", + "lto1=lqi2-ev3;\n", + "print\"\\t d.Liquor to 1b=\\t\\t\",lto1\n", + "print\"total hourly evapouration lb :\",the\n", + "print\"economy is lb/lb :\",ecn\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6 pgno:437" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.6\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tTotal temperature difference = degreeF\n", + "159\n", + "\tThe effective temperature difference is degreeF\n", + "56\n", + "\n", + "\t\t\tCAUSTIC EVAPORATOR MATERIAL BALANCE\n", + "\n", + "\tCell liquour at 120degreeF \t\tWash at 80degreeF\n", + "\n", + "\t---------------------------------------------\n", + "\n", + "\t8.75 prcnt NaOH = l1\n", + "\t16.6 prcnt NaCl = l2\t\t25 prcnt NaCl = w2\n", + "2000 3800 340\n", + "\t74.65 prcnt H20 = l3\t\t75 prcnt H20 = w2\n", + "17050 1020\n", + "\tTotal cell liquor = lq\tTotoal wash = w\n", + "22850 1360\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\t\t\t\tNaOH\t\tNaCl\t\tH20,Lb\tTotal,Lb\n", + "\t\t\t\tprcnt\tLb\tprcnt\tLb\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\tOverall operation:\n", + "\t Cell liquor.......... 8.75\t2000 3800 17050 22850\n", + "\t Wash................. ....\t....\t25.00\t340 1020 1360\n", + "\t Total in............. ....\t2000 4140 18070 24210\n", + "\t Product.............. 50.00\t2000 110 1890 4000\n", + "\t Removed.............. ....\t....\t....\t\t%.0f\t%.0f\n", + "4030 16180 20210\n", + "\n", + "\t\t\t\t\tCAUSTIC EVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\tEffects\n", + "t\t\t\t\t\t--------------------\t\tFlash Tank\n", + "\t\t\t\t\t\\I\t\tII\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam pressure, psi/in.Hg\t30\n", + "\t2.Steam temperature,degreeF\t\t274\t\t169\n", + "\t3.delT,degreeF\t\t\t28\t\t28\n", + "\t4.Liquor temperature, degreeF\t246\t\t141\t\t192\n", + "\t5.BPR, degreeF\t\t\t77\t\t26\t\t77\n", + "\t6.Vapor temperature, degreeF\t\t169\t\t115\t\t115\n", + "\t7.Lambda, Btu/lb\t\t997\t\t1027\t\t1027\n", + "\t8.Feed, lb/hr\t\t\t22788\t\t50602\t\t13367\n", + "\t9.Product, lb/hr\t\t13367\t\t40352\t\t12813\n", + "\t10.Evaporation,lb/hr\t\t9421\t\t10250\t\t554\n", + "\t11.Heat flow, Btu/hr\t\t11890000\t11020000\n", + "\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\t700\n", + "\t13.A,ft**2\t\t\t683\t\t683\n", + "\t14.Tubes, OD, in. and BWG\t1,16\t\t1,16\n", + "\t15.Tube length, ft\t\t7\t\t7\n", + "\t16.No. tubes\t\t\t432\t\t432\n", + "\t17.Circulating pump. gpm\t3200 at 20 ft\t3200 at 20ft\t167 at 45 ft\n", + "\t18.Apparent efficiency, prcnt\t54\t\t64\n", + "\t18.BHP\t\t\t\t38\t\t35\t\t8.2\n", + "\t20.Motor,hp\t\t\t40\t\t40\t\t10.0\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2700000.0\n", + "\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t251\t2970000\t\t25.4\t700\t670\t0.87\t\t3420000\n", + "\t252\t2480000\t\t25.0\t700\t680\t0.88\t\t2820000\n", + "\t252.5\t2290000\t\t24.7\t700\t685\t0.89\t\t2570000\t\t700\n", + "\t253\t2120000\t\t24.5\t700\t695\t0.90\t\t2520000\n", + "\n", + "\tThee gain per minute is gpm\n", + "3200\n", + "\n", + "\t\t\t\tCAUSTIC EVAPORATION HEAT BALANCE\n", + "\n", + "\t\t\t\t(Basis = 1ton/hr NaOH)\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t\tEFFECT\t\t\tBtu/hr\t\tEvaopration, lb/hr\n", + "\n", + "\t1.a.Heat in steam\t\thi\n", + "\t b.Heating liquor\t\thl\n", + "\t c.Resultant heat\t\trhf\n", + "\t d.Heat of concentrate\t\thc\n", + "\t e.Heat of vapors\t\thv\t%.0f\n", + "9511110.0 1452566.4 8058543.6 300000 7758543.6 7781.8892678\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2430000.0\n", + "\tUD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t146\t2400000\t\t25.4\t700\t620\t0.80\t\t2790000\t\t700\n", + "\t146.5\t2160000\t\t25.2\t700\t683\t0.89\t\t2430000\n", + "\n" + ] + } + ], + "source": [ + "print\"\\texample 14.6\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "st1=274; #degreeF\n", + "vt6=115; #degreeF\n", + "odT=st1-vt6; #degreeF\n", + "print\"\\tTotal temperature difference = degreeF\\n\",odT #corresponding to 35 psig\n", + "eb1=77;#degreeF, From fig.14.38\n", + "eb2=26;#degreeF, From fig.14.38\n", + "etd=odT-(eb1+eb2);#degreeF\n", + "print\"\\tThe effective temperature difference is degreeF\\n\",etd\n", + "print\"\\n\\t\\t\\tCAUSTIC EVAPORATOR MATERIAL BALANCE\\n\"\n", + "#Basis: 1 ton/hr NaOH\n", + "print\"\\tCell liquour at 120degreeF \\t\\tWash at 80degreeF\\n\"\n", + "print\"\\t---------------------------------------------\\n\"\n", + "l1=2000;#Lb\n", + "l2=3800;#Lb\n", + "l3=17050;#Lb\n", + "lq=l1+l2+l3;#Lb\n", + "w1=340;#Lb\n", + "w2=1020;#Lb\n", + "w=w1+w2;#Lb\n", + "print\"\\t8.75 prcnt NaOH = l1\\n\\t16.6 prcnt NaCl = l2\\t\\t25 prcnt NaCl = w2\\n\",l1,l2,w1\n", + "print\"\\t74.65 prcnt H20 = l3\\t\\t75 prcnt H20 = w2\\n\",l3,w2\n", + "print\"\\tTotal cell liquor = lq\\tTotoal wash = w\\n\",lq,w\n", + "print\"\\n\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\t\\t\\tNaOH\\t\\tNaCl\\t\\tH20,Lb\\tTotal,Lb\\n\\t\\t\\t\\tprcnt\\tLb\\tprcnt\\tLb\\n\"\n", + "print\"\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\tOverall operation:\\n\\t Cell liquor.......... 8.75\\t\",l1,l2,l3,lq\n", + "print\"\\t Wash................. ....\\t....\\t25.00\\t\",w1,w2,w\n", + "wl1=l2+w1;#Lb\n", + "wl2=l3+w2;#Lb\n", + "wlt=lq+w;\n", + "print\"\\t Total in............. ....\\t\",l1,wl1,wl2,wlt\n", + "prn=110;#Lb\n", + "prh=1890;#Lb\n", + "prt=4000;#Lb\n", + "print\"\\t Product.............. 50.00\\t\",l1,prn,prh,prt\n", + "r1=wl1-prn;#Lb\n", + "r2=wl2-prh;#Lb\n", + "r3=wlt-prt;#Lb\n", + "gain=3200;#gpm\n", + "print\"\\t Removed.............. ....\\t....\\t....\\t\\t%.0f\\t%.0f\\n\",r1,r2,r3\n", + "#Rest of the table is calculated similarily\n", + "print\"\\n\\t\\t\\t\\t\\tCAUSTIC EVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t--------------------\\t\\tFlash Tank\\n\\t\\t\\t\\t\\t\\I\\t\\tII\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam pressure, psi/in.Hg\\t30\\n\\t2.Steam temperature,degreeF\\t\\t274\\t\\t169\\n\\t3.delT,degreeF\\t\\t\\t28\\t\\t28\\n\\t4.Liquor temperature, degreeF\\t246\\t\\t141\\t\\t192\\n\\t5.BPR, degreeF\\t\\t\\t77\\t\\t26\\t\\t77\\n\\t6.Vapor temperature, degreeF\\t\\t169\\t\\t115\\t\\t115\\n\\t7.Lambda, Btu/lb\\t\\t997\\t\\t1027\\t\\t1027\\n\\t8.Feed, lb/hr\\t\\t\\t22788\\t\\t50602\\t\\t13367\\n\\t9.Product, lb/hr\\t\\t13367\\t\\t40352\\t\\t12813\\n\\t10.Evaporation,lb/hr\\t\\t9421\\t\\t10250\\t\\t554\\n\\t11.Heat flow, Btu/hr\\t\\t11890000\\t11020000\\n\\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\\t700\\n\\t13.A,ft**2\\t\\t\\t683\\t\\t683\\n\\t14.Tubes, OD, in. and BWG\\t1,16\\t\\t1,16\\n\\t15.Tube length, ft\\t\\t7\\t\\t7\\n\\t16.No. tubes\\t\\t\\t432\\t\\t432\\n\\t17.Circulating pump. gpm\\t3200 at 20 ft\\t3200 at 20ft\\t167 at 45 ft\\n\\t18.Apparent efficiency, prcnt\\t54\\t\\t64\\n\\t18.BHP\\t\\t\\t\\t38\\t\\t35\\t\\t8.2\\n\\t20.Motor,hp\\t\\t\\t40\\t\\t40\\t\\t10.0\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "V=8;\n", + "s=1.5;\n", + "G=V*s*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G\n", + "UD=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Combining with a steam film coefficient of approximately 1500\n", + "print\"\\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t251\\t2970000\\t\\t25.4\\t700\\t670\\t0.87\\t\\t3420000\\n\\t252\\t2480000\\t\\t25.0\\t700\\t680\\t0.88\\t\\t2820000\\n\\t252.5\\t2290000\\t\\t24.7\\t700\\t685\\t0.89\\t\\t2570000\\t\\t700\\n\\t253\\t2120000\\t\\t24.5\\t700\\t695\\t0.90\\t\\t2520000\\n\"\n", + "print\"\\tThee gain per minute is gpm\\n\",gain\n", + "print\"\\n\\t\\t\\t\\tCAUSTIC EVAPORATION HEAT BALANCE\\n\"\n", + "print\"\\t\\t\\t\\t(Basis = 1ton/hr NaOH)\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\tEFFECT\\t\\t\\tBtu/hr\\t\\tEvaopration, lb/hr\\n\"\n", + "hi=10500*930*0.974;#Btu/hr\n", + "hl=18230*(246-150)*0.83;#Btu/hr\n", + "rh=hi-hl;#Btu/hr\n", + "hc=300000;#Btu/hr\n", + "hv=rh-hc;#Btu/hr\n", + "evv=hv/997;#lb/hr\n", + "print\"\\t1.a.Heat in steam\\t\\thi\\n\\t b.Heating liquor\\t\\thl\\n\\t c.Resultant heat\\t\\trhf\\n\\t d.Heat of concentrate\\t\\thc\\n\\t e.Heat of vapors\\t\\thv\\t%.0f\\n\",hi,hl,rh,hc,hv,evv\n", + "s1=1.35;\n", + "G1=V*s1*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\n\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G1\n", + "UD1=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Using thermal characteristics for this solution\n", + "print\"\\tUD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD1\n", + "#As for effect I:\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t146\\t2400000\\t\\t25.4\\t700\\t620\\t0.80\\t\\t2790000\\t\\t700\\n\\t146.5\\t2160000\\t\\t25.2\\t700\\t683\\t0.89\\t\\t2430000\\n\"\n", + "#end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7 pgno:447" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.7\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tM1 = lb\n", + "17900\n", + "\n", + "\t\t\t\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tEffects\t\t\t\t\tStraight triple effect\t\t\t\tThermocompression\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tSteam flow, lb/hr\t\t22400\t\t\t\t\t\t17900\n", + "\tSteam pressure, psi in.Hg\t20\t\t9\t\t2\t\t20\t\t9\t\t2\n", + "\tSteam temp,degreeF\t\t\t258\t\t237\t\t217\t\t258\t\t237\t\t217\n", + "\ttdelT,degreeF\t\t\t20\t\t18\t\t22\t\t20\t\t18\t\t22\n", + "\tLiquor temp, degreeF\t\t\t238\t\t219\t\t195\t\t238\t\t219\t\t195\n", + "\tBPR, degreeF\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\tVapor temp, degreeF\t\t\t237\t\t217\t\t192\t\t237\t\t215\t\t192\n", + "\tVapor pressure, pis/in.Hg\t9\t\t2\t\t10\t\t9\t\t2\t\t10\n", + "\tLambda, Btu/lb\t\t\t954\t\t965\t\t983\t\t954\t\t965\t\t983\n", + "\tLiquor in, lb/hr\t\t100000\t\t79400\t\t56900\t\t109000\t\t70000\t\t52400\n", + "\tLiqour out, lb/hr\t\t79400\t\t56900\t\t33300\t\t70000\t\t52400\t\t33300\n", + "\tEvaporation,lb/hr\t\t20600\t\t22500\t\t23500\t\t30000\t\t17600\t\t19100\n", + "\tdegreeBrix(out)\t\t\t\t\t\t\t\t\t\t\t\t\t30\n", + "\tCondenser water, gpm\t\t\t\t455\t\t\t\t\t\t365\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\n", + "\t\t\t\tCondenser water = 455 gpm\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\t1.a.Heat in steam\t\n", + "\t20424320.0\n", + "b.Heating liquor\t\n", + "\t736000.0\n", + "c.Evaporation\t\t Evaporation/954\t\n", + "\t19688320.0 20637.6519916\n", + "d.Liquor to 2d = 79362.3480084\n", + "total evapouriation 66700\n" + ] + } + ], + "source": [ + "print\"\\texample 14.7\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "M2=14300;#From fig.14.43 and heat balance above\n", + "M1=32200-14300;#From fig.14.43 and heat balance above\n", + "print\"\\tM1 = lb\\n\",M1\n", + "print\"\\n\\t\\t\\t\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tEffects\\t\\t\\t\\t\\tStraight triple effect\\t\\t\\t\\tThermocompression\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tSteam flow, lb/hr\\t\\t22400\\t\\t\\t\\t\\t\\t17900\\n\\tSteam pressure, psi in.Hg\\t20\\t\\t9\\t\\t2\\t\\t20\\t\\t9\\t\\t2\\n\\tSteam temp,degreeF\\t\\t\\t258\\t\\t237\\t\\t217\\t\\t258\\t\\t237\\t\\t217\\n\\ttdelT,degreeF\\t\\t\\t20\\t\\t18\\t\\t22\\t\\t20\\t\\t18\\t\\t22\\n\\tLiquor temp, degreeF\\t\\t\\t238\\t\\t219\\t\\t195\\t\\t238\\t\\t219\\t\\t195\\n\\tBPR, degreeF\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\\tVapor temp, degreeF\\t\\t\\t237\\t\\t217\\t\\t192\\t\\t237\\t\\t215\\t\\t192\\n\\tVapor pressure, pis/in.Hg\\t9\\t\\t2\\t\\t10\\t\\t9\\t\\t2\\t\\t10\\n\\tLambda, Btu/lb\\t\\t\\t954\\t\\t965\\t\\t983\\t\\t954\\t\\t965\\t\\t983\\n\\tLiquor in, lb/hr\\t\\t100000\\t\\t79400\\t\\t56900\\t\\t109000\\t\\t70000\\t\\t52400\\n\\tLiqour out, lb/hr\\t\\t79400\\t\\t56900\\t\\t33300\\t\\t70000\\t\\t52400\\t\\t33300\\n\\tEvaporation,lb/hr\\t\\t20600\\t\\t22500\\t\\t23500\\t\\t30000\\t\\t17600\\t\\t19100\\n\\tdegreeBrix(out)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t30\\n\\tCondenser water, gpm\\t\\t\\t\\t455\\t\\t\\t\\t\\t\\t365\\n\"\n", + "print\"\\n\\t\\t\\t\\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\\n\\t\\t\\t\\tCondenser water = 455 gpm\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "sf=22400;#lb/hr\n", + "lc=100000;#lb/hr\n", + "t1=238;#degreeF\n", + "t2=230;#degreeF\n", + "te=30000+17600+19100;\n", + "his=sf*940*0.97;#Btu/hr\n", + "hlq=lc*(t1-t2)*0.92;#Btu/hr\n", + "hd=his-hlq;#Btu/hr\n", + "eva=(hd)/954;#lb/hr\n", + "l2d=lc-eva;\n", + "print\"\\t1.a.Heat in steam\\t\\n\\t\" ,his \n", + "print\"b.Heating liquor\\t\\n\\t\",hlq\n", + "print\"c.Evaporation\\t\\t Evaporation/954\\t\\n\\t\",hd,eva \n", + "print\"d.Liquor to 2d = \",l2d\n", + "print\"total evapouriation\",te\n", + "#end\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/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 new file mode 100644 index 00000000..6c6ad595 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_3.ipynb @@ -0,0 +1,1114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 : Evapouration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 pgno:383" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tQevap is Btu/hr\t9610000\n", + "\tQ300 degreeF is Btu/hr\t9600500\n", + "\tTemperature head = degree F\t74\n", + "\tOverall coefficient \t605.5\n", + "\tSurface required is ft^2\t2144.75416788\n" + ] + } + ], + "source": [ + "print\"\\t example 14.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "t1 = 300; # degreeF\n", + "t2 = 226; #degree F\n", + "bs = 700; # Btu/((hr)(ft^2)(ddegree F))\n", + "#Heat Balance\n", + "Qv = 10000 * 961; # Btu/hr\n", + "print\"\\tQevap is Btu/hr\\t\",Qv\n", + "Q3 = 10550 * 910; #Btu/hr\n", + "print\"\\tQ300 degreeF is Btu/hr\\t\",Q3\n", + "\n", + "delT = t1-t2; # degree F\n", + "print\"\\tTemperature head = degree F\\t\",delT\n", + "Ud = bs * 0.865;\n", + "print\"\\tOverall coefficient \\t\",Ud\n", + "A = Qv*10/(Ud * delT); #ft^2\n", + "print\"\\tSurface required is ft^2\\t\",A#Wrong calculation in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tTotal product is lb/hr\t10000.0\n", + "\tTotal evaporation is lb/hr\t40000.0\n", + "\tTotal temperature difference is del degree F\t119\n", + "\tAverage pressure difference is del psi/effect \t8.25\n", + "\t\t\t\t\t\tPressure, psia\t\t delP, psi \t Steam or vapor, degree F \t lambda, Btu/lb\t\tSteam chest, 1st effect \t 26.70 \t\t\t .... \t\t Ts = 244 \t\t ls = 949 \t\tSteam chest, 2nd effect \t 18.45 \t\t\t 8.25 \t\t t1 = 224 \t\t l1 = 961 \t\tSteam chest, 3rd effect \t 10.20(20.7 in. Hg) \t 8.25 \t\t t2 = 194 \t\t l1 = 981 \t\tVapor to condenser \t\t 1.95(26 in. Hg) \t 8.25 \t\t t2 = 125 \t\t l1 = 1022 \t\n", + "\t949*Ws + 50000*(100-224) = 961*w1\t\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\t\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\t\tw1+w2+w3 = 40000\t\n", + "\tSolving simultaneously\t\n", + "\tw1 = \t12400\n", + "\tw2 = \t13300\n", + "\tw3 = \t14300\n", + "\tW1-3 is \t40000\n", + "\tA1 is ft**2 \t1510\n", + "\tA2 is ft**2 \t1588\n", + "\tA3 is ft**2 \t1512\n", + "\tHeat to condenser is Btu/hr\t14614600\n", + "\tWater requirement is lb/hr\t417560\n", + "\t= gpm \t835\n" + ] + } + ], + "source": [ + "print\"\\t example 14.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "wf = 50000; # lb/hr\n", + "sf = wf * 0.10; # lb/hr\n", + "tp = sf/0.50; # lb/hr\n", + "print\"\\tTotal product is lb/hr\\t\",tp\n", + "te = wf - tp;\n", + "print\"\\tTotal evaporation is lb/hr\\t\",te\n", + "cf = 1.0;\n", + "tF = 100; # degree F\n", + "T1 = 244; # degree F\n", + "T2 = 125; # degree F\n", + "U1=600; # Btu/((hr)*(ft**2)*(degree F))\n", + "U2=250; # Btu/((hr)*(ft**2)*(degree F))\n", + "U3=125; # Btu/((hr)*(ft**2)*(degree F))\n", + "\n", + "T = T1-T2;\n", + "print\"\\tTotal temperature difference is del degree F\\t\",T\n", + "df = (26.70- 1.95)/3; # psi/effect\n", + "print\"\\tAverage pressure difference is del psi/effect \\t\",df\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\tPressure, psia\\t\\t delP, psi \\t Steam or vapor, degree F \\t lambda, Btu/lb\\t\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\t .... \\t\\t Ts = 244 \\t\\t ls = 949 \\t\\tSteam chest, 2nd effect \\t 18.45 \\t\\t\\t 8.25 \\t\\t t1 = 224 \\t\\t l1 = 961 \\t\\tSteam chest, 3rd effect \\t 10.20(20.7 in. Hg) \\t 8.25 \\t\\t t2 = 194 \\t\\t l1 = 981 \\t\\tVapor to condenser \\t\\t 1.95(26 in. Hg) \\t 8.25 \\t\\t t2 = 125 \\t\\t l1 = 1022 \\t\"\n", + "\n", + "print\"\\t949*Ws + 50000*(100-224) = 961*w1\\t\\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\\t\\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\\t\\tw1+w2+w3 = 40000\\t\"\n", + "print\"\\tSolving simultaneously\\t\"\n", + "w1=12400;\n", + "print\"\\tw1 = \\t\",w1\n", + "w2=13300;\n", + "print\"\\tw2 = \\t\",w2\n", + "w3=14300;\n", + "print\"\\tw3 = \\t\",w3\n", + "\n", + "Wt = w1+w2+w3;\n", + "print\"\\tW1-3 is \\t\",Wt\n", + "Ws = 19100;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "Ts = 244;\n", + "t1 = 224;\n", + "t2 = 194;\n", + "t3 = 125;\n", + "\n", + "A1 = (Ws * lms)/(U1*(Ts-t1)); #ft**2\n", + "print\"\\tA1 is ft**2 \\t\",A1\n", + "A2 = (w1*lm1)/(U2*(t1-t2)); #ft**2\n", + "print\"\\tA2 is ft**2 \\t\",A2\n", + "A3 = (w2 * lm2)/(U3*(t2-t3)); #ft**2\n", + "print\"\\tA3 is ft**2 \\t\",A3\n", + "\n", + "hc = w3 * lm3; # Btu/hr, WRONG CALCULATION IN TEXT BOOK\n", + "print\"\\tHeat to condenser is Btu/hr\\t\",hc\n", + "wr = hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement is lb/hr\\t\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t= gpm \\t\",wr1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3 pgno:414" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t981*w2 + 50000*(100-125) = 1022*w3\n", + "\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\n", + "\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\n", + "\tw1+w2+w3 = 40000\n", + "\n", + "\tSolving simultaneously\n", + "\n", + "\tw1-3 = \n", + "40000\n", + "\tA1 is ft**2\n", + "2010\n", + "\tA2 is ft**2\n", + "2043\n", + "\tA3 is ft**2\n", + "1048\n", + "\tAverage surface is ft**2\n", + "1700\n", + "\n", + "\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\n", + "5100\n", + "\tRecalculation\n", + "\n", + "\tA1 is ft**2\n", + "0\n", + "\tA2 is ft**2\n", + "0\n", + "\tA3 is ft**2\n", + "1048\n", + "\tTs-t3 is degreeF\n", + "119\n", + "\t\t\t\t\tPressure, psia\t\t Steam or vapor, degreeF \t lambda, Btu/lb\n", + "\tSteam chest, 1st effect \t 26.70 \t\t\tTs = 244 \t\t 949 \n", + "\tSteam chest, 2nd effect \t 16.0 \t\t\t t1 = 216 \t\t 968 \n", + "\tSteam chest, 3rd effect \t 16.4 in. Hg) \t\t t2 = 175 \t\t 992 \n", + "\tVapor to condenser \t\t 26 in. Hg \t\t t3 = 125 \t\t l1 = 1022 \n", + "\n", + "\tw1 is \n", + "15450\n", + "\tw2 is \n", + "13200\n", + "\tw3 is \n", + "11350\n", + "\tWs is \n", + "16850\n", + "\tHeat to condenser is Btu/hr\n", + "11599700\n", + "\tWater requirement lb/hr\n", + "331420\n", + "\t\t\t= gpm\n", + "662\n", + "\tEconomy, lb evaporation/lb steam \n", + "2\n", + "\t\t\t\tForward\t\tBackward\n", + "\tTotal steam, lb/hr\t19100\t\t16850\n", + "\tCooling water, gpm\t840\t\t664\n", + "\tTotal surface, ft**2\t4800\t\t4500\n" + ] + } + ], + "source": [ + "print\"\\t example 14.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Same conditions as example 14.2\n", + "U1 = 400; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U2 = 250; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U3 = 175; #Btu/((hr)*(ft**2)*(degreeF))\n", + "\n", + "w1 = 50000; # lb/hr From example 14.2\n", + "wt = 40000; # lb/hr From example 14.2\n", + "cf = 1; # From example 14.2\n", + "\n", + "print\"\\t981*w2 + 50000*(100-125) = 1022*w3\\n\\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\\n\\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\\n\\tw1+w2+w3 = 40000\\n\"\n", + "print\"\\tSolving simultaneously\\n\"\n", + "w1 = 15950;\n", + "w2 = 12900;\n", + "w3 = 11150;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "\n", + "wt = w1+w2+w3;\n", + "print\"\\tw1-3 = \\n\",wt\n", + "Ws = 16950;\n", + "A1 = (Ws*lms)/(U1*20); #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A1\n", + "A2 = (w1*lm1)/(U2*30); #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A2\n", + "A3 = (w2*lm2)/(U3*69); #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A3\n", + "\n", + "Avs = (A1 + A2 + A3)/3; #ft**2\n", + "print\"\\tAverage surface is ft**2\\n\",Avs\n", + "Av1 = 3 * Avs; #ft**2\n", + "print\"\\n\\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\\n\",Av1\n", + "print\"\\tRecalculation\\n\"\n", + "Av2 = 1500; #ft**2, assume\n", + "dT1 = 28; #degreeF\n", + "A4 = (20/dT1)*A1; #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A4\n", + "dT2 = 41; #degreeF\n", + "A5 = (30/dT2)*A2; #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A5\n", + "dT3 = 50; #degreeF\n", + "A6 = (69/50)*A3; #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A6\n", + "del1 = 119; #degreeF\n", + "print\"\\tTs-t3 is degreeF\\n\",del1\n", + "print\"\\t\\t\\t\\t\\tPressure, psia\\t\\t Steam or vapor, degreeF \\t lambda, Btu/lb\\n\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\tTs = 244 \\t\\t 949 \\n\\tSteam chest, 2nd effect \\t 16.0 \\t\\t\\t t1 = 216 \\t\\t 968 \\n\\tSteam chest, 3rd effect \\t 16.4 in. Hg) \\t\\t t2 = 175 \\t\\t 992 \\n\\tVapor to condenser \\t\\t 26 in. Hg \\t\\t t3 = 125 \\t\\t l1 = 1022 \\n\"\n", + "\n", + "w1 = 15450; #Solving again for \n", + "print\"\\tw1 is \\n\",w1\n", + "w2 = 13200;\n", + "print\"\\tw2 is \\n\",w2\n", + "w3 = 11350;\n", + "print\"\\tw3 is \\n\",w3\n", + "Ws = 16850;\n", + "print\"\\tWs is \\n\",Ws\n", + "Hc = w3 * 1022;\n", + "print\"\\tHeat to condenser is Btu/hr\\n\",Hc\n", + "wr = Hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement lb/hr\\n\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t\\t\\t= gpm\\n\",wr1\n", + "ec = wt/Ws;\n", + "print\"\\tEconomy, lb evaporation/lb steam \\n\",ec\n", + "\n", + "#comparision of forward and backward feed\n", + "print\"\\t\\t\\t\\tForward\\t\\tBackward\\n\\tTotal steam, lb/hr\\t19100\\t\\t16850\\n\\tCooling water, gpm\\t840\\t\\t664\\n\\tTotal surface, ft**2\\t4800\\t\\t4500\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4 pgno:418" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.4 \n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\n", + "\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\n", + "\n", + "\tEffects\t\tWater evaporated(lb/(hr)*(ft**2))\n", + "\n", + "\t1\t\t14-16\n", + "\t2\t\t6-8\n", + "\t3\t\t5-6\n", + "\t4\t\t4-5\n", + "\t5\t\t3-4\n", + "\n", + "\n", + "\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam flow, lb/hr\t\t42600\t\t38000\n", + "\t2.Steam pressure, psi/in.Hg\t30\t\t30\t\t15\t\t5\t\t4\t\t14.5\n", + "\n", + "\t3.Steam temp,degreeF\t\t\t274\t\t274\t\t250\t\t227\t\t205\t\t181\n", + "\n", + "\t4.delT,degreeF\t\t\t23\t\t23\t\t21\t\t20\t\t20\t\t27\n", + "\t5.Liquor temp, degreeF\t\t251\t\t251\t\t229\t\t207\t\t185\t\t164\n", + "\t6.BPR, degreeF\t\t\t1\t\t1\t\t2\t\t2\t\t4\t\t7\n", + "\t7.Vapor temp, degreeF\t\t250\t\t250\t\t227\t\t205\t\t181\t\t147\n", + "\t8.Vapor pressure, pis/in.Hg\t15\t\t15\t\t5\t\t4\t\t14.5\t\t23\n", + "\t9.Lambda, Btu/lb\t\t946\t\t946\t\t960\t\t975\t\t990\t\t1010\n", + "\t10.Liquor in, lb/hr\t\t229000\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\n", + "\t11.Liqour out, lb/hr\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\t\t49600\n", + "\t12.Evaporation,lb/hr\t\t38800\t\t36200\t\t36900\t\t29300\t\t23800\t\t14400\n", + "\t13.degreeBrix(out)\t\t\t15.7\t\t19.4\t\t25.5\t\t34.4\t\t46.5\t\t50.0\n", + "\t14.A,ft**2\t\t\t3500\t\t3500\t\t5000\t\t5000\t\t5000\t\t3500\n", + "\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\t478\t\t425\t\t310\t\t264\t\t219\t\t138\n", + "\t16.UD delT,Btu/(hr)*(ft**2)\t11000\t\t9780\t\t6520\t\t5270\t\t4390\t\t3740\n", + "\n", + "\tTotal temperature difference in the evaporator system = degreeF\n", + "127\n", + "\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\n", + "16\n", + "\tTotal EFFECTIVE temperature difference = degreeF\n", + "111\n", + "\n", + "\t\t\t\tSUGAR-JUICE HEATERS\n", + "\n", + "\tRaw-juice heaters\t\t\t\tClear=juice heaters\n", + "\t-----------------------------------------------------------------------------------------\n", + "\n", + "\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr 229000 212 184 5834920.0\n", + "\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\n", + "229000 243 220 4792970.0\n", + "\tVapor temp. = 227degreeF\tdelT=26.6degreeF\t\tVapor temp. = 250degreeF\tdelT=15.8degreeF\n", + "\n", + "\tud1=.\t\t\t\t\t\tUD=ud2\n", + "231 243\n", + "\tSurface,A=A1 ft**2\t\t\t\tSurface,A=A2 ft**2\n", + "\n", + "949.601275917 1248.36432776\n", + "\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr 229000 184 144 8244000.0\n", + "\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\n", + "229000 220 200 4122000.0\n", + "\tVapor temp. = 205degreeF\tdelT=37.6degreeF\t\tVapor temp. = 227degreeF\tdelT=14.8degreeF\n", + "\n", + "\tUD=Ud3\t\t\t\t\t\tUD=Ud4\n", + "230 214\n", + "\tSurface,A=A3 ft**2\t\t\t\tSurface,A=A4 ft**2\n", + "\n", + "953.2839963 1301.46501642\n", + "\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr 229000 144 82 4122000.0\n", + "\t(Use 2 heaters at 1300 ft**2 each plus 1\n", + "\t\t\t\t\t\t\theater at 1300 ft**2 as spare)\n", + "\n", + "\tVapor temp. = 181degreeF\tdelT=62.2degreeF\n", + "\tSurface,A=\n", + "946.715663757\n", + "\t(Use 3 heaters at 100 ft**2\n", + "\teach plus 1 heater as spare)\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t----------------------------------------------------\n", + "\n", + "\t1A.Heat in steam........\n", + "38388138.0\n", + "\t Heating liquor.......\n", + "\t\t\t\t%.3e\t.\n", + "1667120.0 36721018.0 38817.1437632\n", + "\t Liqour to 1B\n", + "\t = lb/hr\n", + "190182.856237\n", + "\t1B.Heat in steam........\n", + "34979292.7593\n", + "\t Heating liquor........\n", + "\t\t\t\t\n", + "0.0 34979292.7593 36975.9965744\n", + "\t Liqour to 2d \n", + "\t effect= lb/hr\n", + "153206.859662\n", + "\t\t\t\t\t\t\t\tLb/hr\n", + "\n", + "\t(a) Actual evaporation..................................\n", + "179400\n", + "\t(b) Equivalent evaporation from vapors of \n", + "\t 1st effect used for vaccum pans......................\n", + "145500\n", + "\t(c) Equivalent evaporation from 1st effect \n", + "\t vapors used for clarified-juice heaters..............\n", + "19700\n", + "\t(d) Equivalent evaporation from 2d effect \n", + "\t vapors used for clarified-and raw-juice heaters......\n", + "30600\n", + "\t(e) Equivalent evaporation from 3d effect \n", + "\t vapors used for raw-juice heaters....................\n", + "2.71828182846\n", + "\t(f) Equivalent evaporation from 4th effect \n", + "\t vapors used for raw-juice heaters....................\n", + "13100\n", + "\t -----\n", + "\n", + "\t Extrapolated evaporation............................\n", + "406200\n", + "\t\tEstimated steam quantity = lb/hr\n", + "81240\n", + "\t\tActual steam required from final heat balance = lb/hr\n", + "80600\n", + "\t\t\t\t\t\t\tError = lb/hr\n", + "640\n", + "\tGallons per minute of Water required = gpm 583\n" + ] + } + ], + "source": [ + "print\"\\texample 14.4 \\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "from math import e\n", + "#Assumed that 37500 lb/hr of 15 psig vapor is bled from the first effect for use in thevaccum pans\n", + "print\"\\n\\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\\n\"\n", + "print\"\\tEffects\\t\\tWater evaporated(lb/(hr)*(ft**2))\\n\"\n", + "print\"\\t1\\t\\t14-16\\n\\t2\\t\\t6-8\\n\\t3\\t\\t5-6\\n\\t4\\t\\t4-5\\n\\t5\\t\\t3-4\\n\"\n", + "print\"\\n\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t42600\\t\\t38000\\n\\t2.Steam pressure, psi/in.Hg\\t30\\t\\t30\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\n\"\n", + "print\"\\t3.Steam temp,degreeF\\t\\t\\t274\\t\\t274\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\n\"\n", + "print\"\\t4.delT,degreeF\\t\\t\\t23\\t\\t23\\t\\t21\\t\\t20\\t\\t20\\t\\t27\\n\\t5.Liquor temp, degreeF\\t\\t251\\t\\t251\\t\\t229\\t\\t207\\t\\t185\\t\\t164\\n\\t6.BPR, degreeF\\t\\t\\t1\\t\\t1\\t\\t2\\t\\t2\\t\\t4\\t\\t7\\n\\t7.Vapor temp, degreeF\\t\\t250\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\t\\t147\\n\\t8.Vapor pressure, pis/in.Hg\\t15\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\t\\t23\\n\\t9.Lambda, Btu/lb\\t\\t946\\t\\t946\\t\\t960\\t\\t975\\t\\t990\\t\\t1010\\n\\t10.Liquor in, lb/hr\\t\\t229000\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\n\\t11.Liqour out, lb/hr\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\t\\t49600\\n\\t12.Evaporation,lb/hr\\t\\t38800\\t\\t36200\\t\\t36900\\t\\t29300\\t\\t23800\\t\\t14400\\n\\t13.degreeBrix(out)\\t\\t\\t15.7\\t\\t19.4\\t\\t25.5\\t\\t34.4\\t\\t46.5\\t\\t50.0\\n\\t14.A,ft**2\\t\\t\\t3500\\t\\t3500\\t\\t5000\\t\\t5000\\t\\t5000\\t\\t3500\\n\\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\\t478\\t\\t425\\t\\t310\\t\\t264\\t\\t219\\t\\t138\\n\\t16.UD delT,Btu/(hr)*(ft**2)\\t11000\\t\\t9780\\t\\t6520\\t\\t5270\\t\\t4390\\t\\t3740\\n\"#BPR values from fig 14.34a\n", + "#Saturate vapor pressure above the liquour determined from Table 7\n", + "#Saturated steam pressure in the following effect determined from Table 7\n", + "\n", + "t1 = 274; #degreeF\n", + "t2 = 147; #degreeF\n", + "t = t1-t2; #degreeF\n", + "print\"\\tTotal temperature difference in the evaporator system = degreeF\\n\",t\n", + "bpr1 = 1; #degreeF\n", + "bpr2 = 2; #degreeF\n", + "bpr3 = 2; #degreeF\n", + "bpr4 = 4; #degreeF\n", + "bpr5 = 7; #degreeF\n", + "bpr = bpr1 + bpr2 + bpr3 + bpr4 + bpr5; #degreeF\n", + "print\"\\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\\n\",bpr\n", + "tf = t-bpr; #degreeF\n", + "print\"\\tTotal EFFECTIVE temperature difference = degreeF\\n\",tf\n", + "lbh = 229000; #lb/hr\n", + "tp1=212; #degreeF\n", + "tp2=184; #degreeF\n", + "tp3=144; #degreeF\n", + "tp4=82; #degreeF\n", + "tj1=243; #degreeF\n", + "tj2=220; #degreeF\n", + "tj3=200; #degreeF\n", + "Ud1=231;\n", + "Ud2=243;\n", + "Ud3=230;\n", + "Ud4=214;\n", + "Ud5=217;\n", + "print\"\\n\\t\\t\\t\\tSUGAR-JUICE HEATERS\\n\"\n", + "print\"\\tRaw-juice heaters\\t\\t\\t\\tClear=juice heaters\\n\\t-----------------------------------------------------------------------------------------\\n\"\n", + "rj1=lbh*(tp1-tp2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr\",lbh,tp1,tp2,rj1\n", + "rj2=lbh*(tj1-tj2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\\n\",lbh,tj1,tj2,rj2\n", + "print\"\\tVapor temp. = 227degreeF\\tdelT=26.6degreeF\\t\\tVapor temp. = 250degreeF\\tdelT=15.8degreeF\\n\"\n", + "print\"\\tud1=.\\t\\t\\t\\t\\t\\tUD=ud2\\n\",Ud1,Ud2\n", + "A1=rj1/(26.6*Ud1);#ft**2\n", + "A2=rj2/(15.8*Ud2);#ft**2\n", + "print\"\\tSurface,A=A1 ft**2\\t\\t\\t\\tSurface,A=A2 ft**2\\n\\n\",A1,A2\n", + "\n", + "rj3=lbh*(tp2-tp3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr\",lbh,tp2,tp3,rj3\n", + "rj4=lbh*(tj2-tj3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\\n\",lbh,tj2,tj3,rj4\n", + "print\"\\tVapor temp. = 205degreeF\\tdelT=37.6degreeF\\t\\tVapor temp. = 227degreeF\\tdelT=14.8degreeF\\n\"\n", + "print\"\\tUD=Ud3\\t\\t\\t\\t\\t\\tUD=Ud4\\n\",Ud3,Ud4\n", + "A3=rj3/(37.6*Ud3);#ft**2\n", + "A4=rj4/(14.8*Ud4);#ft**2\n", + "print\"\\tSurface,A=A3 ft**2\\t\\t\\t\\tSurface,A=A4 ft**2\\n\\n\",A3,A4\n", + "\n", + "rj5=lbh*(tp3-tp4)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr\",lbh,tp3,tp4,rj4\n", + "print\"\\t(Use 2 heaters at 1300 ft**2 each plus 1\\n\\t\\t\\t\\t\\t\\t\\theater at 1300 ft**2 as spare)\\n\"\n", + "A5=rj5/(62.2*Ud5);#ft**2\n", + "print\"\\tVapor temp. = 181degreeF\\tdelT=62.2degreeF\\n\\tSurface,A=\\n\",A5\n", + "print\"\\t(Use 3 heaters at 100 ft**2\\n\\teach plus 1 heater as spare)\\n\\n\"\n", + "\n", + "v1=42600;#lb/hr\n", + "tt1=251;#degreeF\n", + "print\"\\t\\t\\t\\tHEAT BALANCE\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t----------------------------------------------------\\n\"\n", + "hia=v1*929*0.97;#Btu/hr\n", + "print\"\\t1A.Heat in steam........\\n\",hia\n", + "hla=lbh*(tt1-tj1)*0.91;#Btu/hr\n", + "hh=hia-hla;#Btu/hr\n", + "lb1=946;#Btu/lb\n", + "dif=hh/lb1;#lb/hr\n", + "print\"\\t Heating liquor.......\\n\\t\\t\\t\\t%.3e\\t.\\n\",hla,hh,dif\n", + "ltob=lbh-dif;#lb/hr\n", + "print\"\\t Liqour to 1B\\n\\t = lb/hr\\n\",ltob\n", + "hia1=dif*929*0.97;#Btu/hr\n", + "print\"\\t1B.Heat in steam........\\n\",hia1\n", + "hla1=ltob*(tt1-tt1)*0.91;#Btu/hr\n", + "hh1=hia1;#Btu/hr\n", + "dif1=hh1/lb1;#lb/hr\n", + "print\"\\t Heating liquor........\\n\\t\\t\\t\\t\\n\",hla1,hh1,dif1\n", + "dif2=ltob-dif1;#lb/hr\n", + "print\"\\t Liqour to 2d \\n\\t effect= lb/hr\\n\",dif2\n", + "#Similarily the values in the table are calculated\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\tLb/hr\\n\"\n", + "aa=179400;#lb/hr\n", + "bb=145500;#lb/hr\n", + "cc=19700;#lb/hr\n", + "dd=30600;#lb/hr\n", + "ee=17900;#lb/hr\n", + "ff=13100;#lb/hr\n", + "tto=aa+bb+cc+dd+ee+ff;#lb/hr\n", + "print\"\\t(a) Actual evaporation..................................\\n\",aa\n", + "print\"\\t(b) Equivalent evaporation from vapors of \\n\\t 1st effect used for vaccum pans......................\\n\",bb\n", + "print\"\\t(c) Equivalent evaporation from 1st effect \\n\\t vapors used for clarified-juice heaters..............\\n\",cc\n", + "print\"\\t(d) Equivalent evaporation from 2d effect \\n\\t vapors used for clarified-and raw-juice heaters......\\n\",dd\n", + "print\"\\t(e) Equivalent evaporation from 3d effect \\n\\t vapors used for raw-juice heaters....................\\n\",e\n", + "print\"\\t(f) Equivalent evaporation from 4th effect \\n\\t vapors used for raw-juice heaters....................\\n\",ff\n", + "print\"\\t -----\\n\"\n", + "print\"\\t Extrapolated evaporation............................\\n\",tto\n", + "esq=tto/5;#lb/hr\n", + "print\"\\t\\tEstimated steam quantity = lb/hr\\n\",esq\n", + "aesq=80600;#lb/hr\n", + "err = esq-aesq;#lb/hr\n", + "print\"\\t\\tActual steam required from final heat balance = lb/hr\\n\",aesq\n", + "print\"\\t\\t\\t\\t\\t\\t\\tError = lb/hr\\n\",err\n", + "ta=15;\n", + "Q=14575000; #Btu/hr Total hourly evaporation\n", + "Gpm=Q/(500*(t2-tp4-ta));#From equation 14.4\n", + "print\"\\tGallons per minute of Water required = gpm\",Gpm\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5 pgno:427" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.5\t\n", + "\tapproximate values are mentioned in the book \t\n", + "\tOverall temperature difference = deg F\t155\n", + "\tThe estimated total BPR = degF\t[10 18 25 31 36 41]\n", + "\tEffective temperature difference = %.0f degF\t[145 137 130 124 119 114]\n", + "\t\t\t\t\tEVAPORATOR SUMMARY\t\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\t\t\t\t\t\t----------------------------------------------------------------------------------------------\t\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\t1.Steam flow, lb/hr\t\t20000\t\t2.Steam pressure, psi/in.Hg\t35\t\t14.5\t\t4\t\t7\t\t16.5\t\t22\t\t3.Steam temp,degF\t\t\t280\t\t249\t\t224\t\t199\t\t174\t\t151\t\t4.delT,degF\t\t\t21\t\t17\t\t18\t\t19\t\t18\t\t21\t\t5.Liquor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t6.BPR, degF\t\t\t10\t\t8\t\t7\t\t6\t\t5\t\t5\t\t7.Vapor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t8.Vapor pressure, pis/in.Hg\t14.5\t\t4\t\t7\t\t6\t\t5\t\t5\t\t9.Lambda, Btu/lb\t\t946\t\t962\t\t978\t\t994\t\t1008\t\t1022\t\t10.Liquor in, lb/hr\t\t73400\t\t88300\t\t101000\t\t113000\t\t72000\t\t72000\t\t11.Liqour out, lb/hr\t\t56200\t\t73400\t\t88300\t\t101100\t\t58300\t\t54700\t\t12.Evaporation,lb/hr\t\t17200\t\t14900\t\t12800\t\t11900\t\t13700\t\t17300\t\t13.Total solids, \t\t38.9\t\t29.8\t\t24.7\t\t21.6\t\t18.7\t\t20.0\t\t14.A,ft^2\t\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t15.UD,Btu/(hr)*(ft^2)*(degF)\t262\t\t295\t\t252\t\t251\t\t221\t\t221\t\t16.UD delT,Btu/(hr)*(ft^2)\t5510\t\t5000\t\t4530t\t\t4770\t\t3980\t\t4650\t\n", + "\t\tTotal amount of water evaporated = \t lb/hr\t[17200 32100 44900 56800 70500 0]\n", + "\tTheoretical amount of steam for a six-effect evaporator = \t lb/hr\t[ 2866 5350 7483 9466 11750 0]\n", + "\tSteam used for trail balance = \t lb/hr\t[ 3822.22222222 7133.33333333 9977.77777778 12622.22222222\n", + " 15666.66666667 0. ]\n", + "\tEstimate of the amount of evaporation in the first effect = \t lb/hr\t[ 3295.9 6152.5 8605.45 10885.9 13512.5 0. ]\n", + "\tEstimated discharge from second effect = \t lb/hr\t[ 59495.9 62352.5 64805.45 67085.9 69712.5 56200. ]\n", + "\t\t\t\t\tHEAT BALANCE\t\n", + "\t\tCooling water at 60 degreeF = \t gpm\t710\n", + "\t--------------------------------------------------------\t\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\t\n", + "\t--------------------------------------------------------\t\n", + "\t1.a.Heat in steam \t\t17925600.0\n", + "\t b.Heating liquor \t\t1625076.0\n", + "\t c.Evaporation\t\t\t\t\t\t17230.9978858\n", + "\t d.To flash tank\t2190591.08245\n", + "\t\t\t\t2239.86818247\n", + "\t e.Flashed vapor=\t\t2239.86818247\n", + "\t f.product \t53929.1339317\n", + "\t\t2.a.Heat in 1st vapors\t\t16300524.0\n", + "\t b.Heating liqour\t\t1951430.0\n", + "\t c.Evaporation= 14915.8981289\n", + "\t\t\t\t\t14915.8981289\n", + "\t d.Liquor to 1b=\t\t73384.1018711\n", + "total hourly evapouration lb : 90000\n", + "economy is lb/lb : 4.5\n" + ] + } + ], + "source": [ + "print\"\\texample 14.5\\t\"\n", + "print\"\\tapproximate values are mentioned in the book \\t\"\n", + "st1=280; #degF\n", + "vt6=125; #degF\n", + "odT=st1-vt6; #degF\n", + "print\"\\tOverall temperature difference = deg F\\t\",odT #corresponding to 35 psig and 26 in. Hg\n", + "import numpy\n", + "bpr=numpy.array([10, 8, 7, 6, 5, 5])\n", + "#bpr(1)=10; #degF\n", + "#bpr(2)=8; #degF\n", + "#bpr(3)=7; #degF\n", + "#bpr(4)=6; #degF\n", + "#bpr(5)=5; #degF\n", + "#bpr(6)=5; #degF\n", + "i=1;\n", + "tbpr=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "tbpr[0]=bpr[0];\n", + "while (i<6):\n", + "\n", + " tbpr[i]=tbpr[i-1]+bpr[i];\n", + " i=i+1;\n", + "\n", + "print\"\\tThe estimated total BPR = degF\\t\",tbpr #from fig. 14.36a\n", + "edT=odT-tbpr;\n", + "print\"\\tEffective temperature difference = %.0f degF\\t\",edT\n", + "print\"\\t\\t\\t\\t\\tEVAPORATOR SUMMARY\\t\\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\t\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\t\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t20000\\t\\t2.Steam pressure, psi/in.Hg\\t35\\t\\t14.5\\t\\t4\\t\\t7\\t\\t16.5\\t\\t22\\t\\t3.Steam temp,degF\\t\\t\\t280\\t\\t249\\t\\t224\\t\\t199\\t\\t174\\t\\t151\\t\\t4.delT,degF\\t\\t\\t21\\t\\t17\\t\\t18\\t\\t19\\t\\t18\\t\\t21\\t\\t5.Liquor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t6.BPR, degF\\t\\t\\t10\\t\\t8\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t7.Vapor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t8.Vapor pressure, pis/in.Hg\\t14.5\\t\\t4\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t9.Lambda, Btu/lb\\t\\t946\\t\\t962\\t\\t978\\t\\t994\\t\\t1008\\t\\t1022\\t\\t10.Liquor in, lb/hr\\t\\t73400\\t\\t88300\\t\\t101000\\t\\t113000\\t\\t72000\\t\\t72000\\t\\t11.Liqour out, lb/hr\\t\\t56200\\t\\t73400\\t\\t88300\\t\\t101100\\t\\t58300\\t\\t54700\\t\\t12.Evaporation,lb/hr\\t\\t17200\\t\\t14900\\t\\t12800\\t\\t11900\\t\\t13700\\t\\t17300\\t\\t13.Total solids, \\t\\t38.9\\t\\t29.8\\t\\t24.7\\t\\t21.6\\t\\t18.7\\t\\t20.0\\t\\t14.A,ft^2\\t\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t15.UD,Btu/(hr)*(ft^2)*(degF)\\t262\\t\\t295\\t\\t252\\t\\t251\\t\\t221\\t\\t221\\t\\t16.UD delT,Btu/(hr)*(ft^2)\\t5510\\t\\t5000\\t\\t4530t\\t\\t4770\\t\\t3980\\t\\t4650\\t\"#BPR values from fig 14.36a\n", + "#Specific-heat data are given in Fig. 14.36b\n", + "ev=numpy.array([17200, 14900, 12800, 11900, 13700, 17300]);\n", + "#ev(1)=17200; #lb/hr\n", + "#ev(2)=14900; #lb/hr\n", + "#ev(3)=12800; #lb/hr\n", + "#ev(4)=11900; #lb/hr\n", + "#ev(5)=13700; #lb/hr\n", + "#ev(6)=17300; #lb/hr\n", + "i=1;\n", + "tev =numpy.array([0, 0, 0, 0, 0, 0])\n", + "tev[0]=ev[0];\n", + "while (i<5):\n", + " tev[i]= tev[i-1]+ev[i];\n", + " i=i+1;\n", + "\n", + "print\"\\t\\tTotal amount of water evaporated = \\t lb/hr\\t\",tev\n", + "ttev=tev/6;#lb/hr\n", + "print\"\\tTheoretical amount of steam for a six-effect evaporator = \\t lb/hr\\t\",ttev\n", + "tev2=tev/(6*0.75); #lb/hr . order of 75 percent of theoretical\n", + "print\"\\tSteam used for trail balance = \\t lb/hr\\t\",tev2\n", + "lq=(tev/6);\n", + "lq=lq+(lq*0.15);\n", + "print\"\\tEstimate of the amount of evaporation in the first effect = \\t lb/hr\\t\",lq\n", + "lout6=54000;#lb/hr\n", + "lq2=lout6+lq+2200;#lb/hr\n", + "print\"\\tEstimated discharge from second effect = \\t lb/hr\\t\",lq2\n", + "print\"\\t\\t\\t\\t\\tHEAT BALANCE\\t\"\n", + "cw = 17750000/(500*(125-15-60)); #gpm, values from table 14.6\n", + "print\"\\t\\tCooling water at 60 degreeF = \\t gpm\\t\",cw\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\t\"\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "sf=20000;#lb/hr\n", + "lqi=73400;#lb/hr\n", + "the=90000;\n", + "lqi2=88300\n", + "lt1=259;#degreeF\n", + "lt2=232;#degreeF\n", + "lt3=206;#degreeF\n", + "ecn=90000./20000.;\n", + "ev=17200;#lb/hr\n", + "his=sf*924*0.97;#Btu/hr\n", + "print\"\\t1.a.Heat in steam \\t\\t\",his\n", + "hl=lqi*(lt1-lt2)*0.82;#Btu/hr\n", + "print\"\\t b.Heating liquor \\t\\t\",hl\n", + "hh=his-hl;\n", + "ev1=(hh)/946;#lb/hr\n", + "print\"\\t c.Evaporation\\t\\t\\t\\t\\t\\t\",ev1\n", + "dif=lqi-ev1;\n", + "tft=(dif)*(lt1-209)*0.78;\n", + "print\"\\t d.To flash tank\\t\",tft\n", + "ev2=tft/978;#lb/hr\n", + "print\"\\t\\t\\t\\t\",ev2\n", + "print\"\\t e.Flashed vapor=\\t\\t\",ev2\n", + "p=dif-ev2;\n", + "print\"\\t f.product \\t\",p\n", + "print\"\\t\\t2.a.Heat in 1st vapors\\t\\t\",hh\n", + "hl2=lqi2*(lt2-lt3)*0.85;\n", + "print\"\\t b.Heating liqour\\t\\t\",hl2\n", + "ev3=(hh-hl2)/962;\n", + "print\"\\t c.Evaporation=\",ev3\n", + "\n", + "print\"\\t\\t\\t\\t\\t\",ev3\n", + "lto1=lqi2-ev3;\n", + "print\"\\t d.Liquor to 1b=\\t\\t\",lto1\n", + "print\"total hourly evapouration lb :\",the\n", + "print\"economy is lb/lb :\",ecn\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6 pgno:437" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.6\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tTotal temperature difference = degreeF\n", + "159\n", + "\tThe effective temperature difference is degreeF\n", + "56\n", + "\n", + "\t\t\tCAUSTIC EVAPORATOR MATERIAL BALANCE\n", + "\n", + "\tCell liquour at 120degreeF \t\tWash at 80degreeF\n", + "\n", + "\t---------------------------------------------\n", + "\n", + "\t8.75 prcnt NaOH = l1\n", + "\t16.6 prcnt NaCl = l2\t\t25 prcnt NaCl = w2\n", + "2000 3800 340\n", + "\t74.65 prcnt H20 = l3\t\t75 prcnt H20 = w2\n", + "17050 1020\n", + "\tTotal cell liquor = lq\tTotoal wash = w\n", + "22850 1360\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\t\t\t\tNaOH\t\tNaCl\t\tH20,Lb\tTotal,Lb\n", + "\t\t\t\tprcnt\tLb\tprcnt\tLb\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\tOverall operation:\n", + "\t Cell liquor.......... 8.75\t2000 3800 17050 22850\n", + "\t Wash................. ....\t....\t25.00\t340 1020 1360\n", + "\t Total in............. ....\t2000 4140 18070 24210\n", + "\t Product.............. 50.00\t2000 110 1890 4000\n", + "\t Removed.............. ....\t....\t....\t\t%.0f\t%.0f\n", + "4030 16180 20210\n", + "\n", + "\t\t\t\t\tCAUSTIC EVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\tEffects\n", + "t\t\t\t\t\t--------------------\t\tFlash Tank\n", + "\t\t\t\t\t\\I\t\tII\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam pressure, psi/in.Hg\t30\n", + "\t2.Steam temperature,degreeF\t\t274\t\t169\n", + "\t3.delT,degreeF\t\t\t28\t\t28\n", + "\t4.Liquor temperature, degreeF\t246\t\t141\t\t192\n", + "\t5.BPR, degreeF\t\t\t77\t\t26\t\t77\n", + "\t6.Vapor temperature, degreeF\t\t169\t\t115\t\t115\n", + "\t7.Lambda, Btu/lb\t\t997\t\t1027\t\t1027\n", + "\t8.Feed, lb/hr\t\t\t22788\t\t50602\t\t13367\n", + "\t9.Product, lb/hr\t\t13367\t\t40352\t\t12813\n", + "\t10.Evaporation,lb/hr\t\t9421\t\t10250\t\t554\n", + "\t11.Heat flow, Btu/hr\t\t11890000\t11020000\n", + "\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\t700\n", + "\t13.A,ft**2\t\t\t683\t\t683\n", + "\t14.Tubes, OD, in. and BWG\t1,16\t\t1,16\n", + "\t15.Tube length, ft\t\t7\t\t7\n", + "\t16.No. tubes\t\t\t432\t\t432\n", + "\t17.Circulating pump. gpm\t3200 at 20 ft\t3200 at 20ft\t167 at 45 ft\n", + "\t18.Apparent efficiency, prcnt\t54\t\t64\n", + "\t18.BHP\t\t\t\t38\t\t35\t\t8.2\n", + "\t20.Motor,hp\t\t\t40\t\t40\t\t10.0\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2700000.0\n", + "\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t251\t2970000\t\t25.4\t700\t670\t0.87\t\t3420000\n", + "\t252\t2480000\t\t25.0\t700\t680\t0.88\t\t2820000\n", + "\t252.5\t2290000\t\t24.7\t700\t685\t0.89\t\t2570000\t\t700\n", + "\t253\t2120000\t\t24.5\t700\t695\t0.90\t\t2520000\n", + "\n", + "\tThee gain per minute is gpm\n", + "3200\n", + "\n", + "\t\t\t\tCAUSTIC EVAPORATION HEAT BALANCE\n", + "\n", + "\t\t\t\t(Basis = 1ton/hr NaOH)\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t\tEFFECT\t\t\tBtu/hr\t\tEvaopration, lb/hr\n", + "\n", + "\t1.a.Heat in steam\t\thi\n", + "\t b.Heating liquor\t\thl\n", + "\t c.Resultant heat\t\trhf\n", + "\t d.Heat of concentrate\t\thc\n", + "\t e.Heat of vapors\t\thv\t%.0f\n", + "9511110.0 1452566.4 8058543.6 300000 7758543.6 7781.8892678\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2430000.0\n", + "\tUD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t146\t2400000\t\t25.4\t700\t620\t0.80\t\t2790000\t\t700\n", + "\t146.5\t2160000\t\t25.2\t700\t683\t0.89\t\t2430000\n", + "\n" + ] + } + ], + "source": [ + "print\"\\texample 14.6\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "st1=274; #degreeF\n", + "vt6=115; #degreeF\n", + "odT=st1-vt6; #degreeF\n", + "print\"\\tTotal temperature difference = degreeF\\n\",odT #corresponding to 35 psig\n", + "eb1=77;#degreeF, From fig.14.38\n", + "eb2=26;#degreeF, From fig.14.38\n", + "etd=odT-(eb1+eb2);#degreeF\n", + "print\"\\tThe effective temperature difference is degreeF\\n\",etd\n", + "print\"\\n\\t\\t\\tCAUSTIC EVAPORATOR MATERIAL BALANCE\\n\"\n", + "#Basis: 1 ton/hr NaOH\n", + "print\"\\tCell liquour at 120degreeF \\t\\tWash at 80degreeF\\n\"\n", + "print\"\\t---------------------------------------------\\n\"\n", + "l1=2000;#Lb\n", + "l2=3800;#Lb\n", + "l3=17050;#Lb\n", + "lq=l1+l2+l3;#Lb\n", + "w1=340;#Lb\n", + "w2=1020;#Lb\n", + "w=w1+w2;#Lb\n", + "print\"\\t8.75 prcnt NaOH = l1\\n\\t16.6 prcnt NaCl = l2\\t\\t25 prcnt NaCl = w2\\n\",l1,l2,w1\n", + "print\"\\t74.65 prcnt H20 = l3\\t\\t75 prcnt H20 = w2\\n\",l3,w2\n", + "print\"\\tTotal cell liquor = lq\\tTotoal wash = w\\n\",lq,w\n", + "print\"\\n\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\t\\t\\tNaOH\\t\\tNaCl\\t\\tH20,Lb\\tTotal,Lb\\n\\t\\t\\t\\tprcnt\\tLb\\tprcnt\\tLb\\n\"\n", + "print\"\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\tOverall operation:\\n\\t Cell liquor.......... 8.75\\t\",l1,l2,l3,lq\n", + "print\"\\t Wash................. ....\\t....\\t25.00\\t\",w1,w2,w\n", + "wl1=l2+w1;#Lb\n", + "wl2=l3+w2;#Lb\n", + "wlt=lq+w;\n", + "print\"\\t Total in............. ....\\t\",l1,wl1,wl2,wlt\n", + "prn=110;#Lb\n", + "prh=1890;#Lb\n", + "prt=4000;#Lb\n", + "print\"\\t Product.............. 50.00\\t\",l1,prn,prh,prt\n", + "r1=wl1-prn;#Lb\n", + "r2=wl2-prh;#Lb\n", + "r3=wlt-prt;#Lb\n", + "gain=3200;#gpm\n", + "print\"\\t Removed.............. ....\\t....\\t....\\t\\t%.0f\\t%.0f\\n\",r1,r2,r3\n", + "#Rest of the table is calculated similarily\n", + "print\"\\n\\t\\t\\t\\t\\tCAUSTIC EVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t--------------------\\t\\tFlash Tank\\n\\t\\t\\t\\t\\t\\I\\t\\tII\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam pressure, psi/in.Hg\\t30\\n\\t2.Steam temperature,degreeF\\t\\t274\\t\\t169\\n\\t3.delT,degreeF\\t\\t\\t28\\t\\t28\\n\\t4.Liquor temperature, degreeF\\t246\\t\\t141\\t\\t192\\n\\t5.BPR, degreeF\\t\\t\\t77\\t\\t26\\t\\t77\\n\\t6.Vapor temperature, degreeF\\t\\t169\\t\\t115\\t\\t115\\n\\t7.Lambda, Btu/lb\\t\\t997\\t\\t1027\\t\\t1027\\n\\t8.Feed, lb/hr\\t\\t\\t22788\\t\\t50602\\t\\t13367\\n\\t9.Product, lb/hr\\t\\t13367\\t\\t40352\\t\\t12813\\n\\t10.Evaporation,lb/hr\\t\\t9421\\t\\t10250\\t\\t554\\n\\t11.Heat flow, Btu/hr\\t\\t11890000\\t11020000\\n\\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\\t700\\n\\t13.A,ft**2\\t\\t\\t683\\t\\t683\\n\\t14.Tubes, OD, in. and BWG\\t1,16\\t\\t1,16\\n\\t15.Tube length, ft\\t\\t7\\t\\t7\\n\\t16.No. tubes\\t\\t\\t432\\t\\t432\\n\\t17.Circulating pump. gpm\\t3200 at 20 ft\\t3200 at 20ft\\t167 at 45 ft\\n\\t18.Apparent efficiency, prcnt\\t54\\t\\t64\\n\\t18.BHP\\t\\t\\t\\t38\\t\\t35\\t\\t8.2\\n\\t20.Motor,hp\\t\\t\\t40\\t\\t40\\t\\t10.0\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "V=8;\n", + "s=1.5;\n", + "G=V*s*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G\n", + "UD=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Combining with a steam film coefficient of approximately 1500\n", + "print\"\\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t251\\t2970000\\t\\t25.4\\t700\\t670\\t0.87\\t\\t3420000\\n\\t252\\t2480000\\t\\t25.0\\t700\\t680\\t0.88\\t\\t2820000\\n\\t252.5\\t2290000\\t\\t24.7\\t700\\t685\\t0.89\\t\\t2570000\\t\\t700\\n\\t253\\t2120000\\t\\t24.5\\t700\\t695\\t0.90\\t\\t2520000\\n\"\n", + "print\"\\tThee gain per minute is gpm\\n\",gain\n", + "print\"\\n\\t\\t\\t\\tCAUSTIC EVAPORATION HEAT BALANCE\\n\"\n", + "print\"\\t\\t\\t\\t(Basis = 1ton/hr NaOH)\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\tEFFECT\\t\\t\\tBtu/hr\\t\\tEvaopration, lb/hr\\n\"\n", + "hi=10500*930*0.974;#Btu/hr\n", + "hl=18230*(246-150)*0.83;#Btu/hr\n", + "rh=hi-hl;#Btu/hr\n", + "hc=300000;#Btu/hr\n", + "hv=rh-hc;#Btu/hr\n", + "evv=hv/997;#lb/hr\n", + "print\"\\t1.a.Heat in steam\\t\\thi\\n\\t b.Heating liquor\\t\\thl\\n\\t c.Resultant heat\\t\\trhf\\n\\t d.Heat of concentrate\\t\\thc\\n\\t e.Heat of vapors\\t\\thv\\t%.0f\\n\",hi,hl,rh,hc,hv,evv\n", + "s1=1.35;\n", + "G1=V*s1*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\n\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G1\n", + "UD1=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Using thermal characteristics for this solution\n", + "print\"\\tUD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD1\n", + "#As for effect I:\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t146\\t2400000\\t\\t25.4\\t700\\t620\\t0.80\\t\\t2790000\\t\\t700\\n\\t146.5\\t2160000\\t\\t25.2\\t700\\t683\\t0.89\\t\\t2430000\\n\"\n", + "#end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7 pgno:447" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.7\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tM1 = lb\n", + "17900\n", + "\n", + "\t\t\t\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tEffects\t\t\t\t\tStraight triple effect\t\t\t\tThermocompression\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tSteam flow, lb/hr\t\t22400\t\t\t\t\t\t17900\n", + "\tSteam pressure, psi in.Hg\t20\t\t9\t\t2\t\t20\t\t9\t\t2\n", + "\tSteam temp,degreeF\t\t\t258\t\t237\t\t217\t\t258\t\t237\t\t217\n", + "\ttdelT,degreeF\t\t\t20\t\t18\t\t22\t\t20\t\t18\t\t22\n", + "\tLiquor temp, degreeF\t\t\t238\t\t219\t\t195\t\t238\t\t219\t\t195\n", + "\tBPR, degreeF\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\tVapor temp, degreeF\t\t\t237\t\t217\t\t192\t\t237\t\t215\t\t192\n", + "\tVapor pressure, pis/in.Hg\t9\t\t2\t\t10\t\t9\t\t2\t\t10\n", + "\tLambda, Btu/lb\t\t\t954\t\t965\t\t983\t\t954\t\t965\t\t983\n", + "\tLiquor in, lb/hr\t\t100000\t\t79400\t\t56900\t\t109000\t\t70000\t\t52400\n", + "\tLiqour out, lb/hr\t\t79400\t\t56900\t\t33300\t\t70000\t\t52400\t\t33300\n", + "\tEvaporation,lb/hr\t\t20600\t\t22500\t\t23500\t\t30000\t\t17600\t\t19100\n", + "\tdegreeBrix(out)\t\t\t\t\t\t\t\t\t\t\t\t\t30\n", + "\tCondenser water, gpm\t\t\t\t455\t\t\t\t\t\t365\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\n", + "\t\t\t\tCondenser water = 455 gpm\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\t1.a.Heat in steam\t\n", + "\t20424320.0\n", + "b.Heating liquor\t\n", + "\t736000.0\n", + "c.Evaporation\t\t Evaporation/954\t\n", + "\t19688320.0 20637.6519916\n", + "d.Liquor to 2d = 79362.3480084\n", + "total evapouriation 66700\n" + ] + } + ], + "source": [ + "print\"\\texample 14.7\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "M2=14300;#From fig.14.43 and heat balance above\n", + "M1=32200-14300;#From fig.14.43 and heat balance above\n", + "print\"\\tM1 = lb\\n\",M1\n", + "print\"\\n\\t\\t\\t\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tEffects\\t\\t\\t\\t\\tStraight triple effect\\t\\t\\t\\tThermocompression\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tSteam flow, lb/hr\\t\\t22400\\t\\t\\t\\t\\t\\t17900\\n\\tSteam pressure, psi in.Hg\\t20\\t\\t9\\t\\t2\\t\\t20\\t\\t9\\t\\t2\\n\\tSteam temp,degreeF\\t\\t\\t258\\t\\t237\\t\\t217\\t\\t258\\t\\t237\\t\\t217\\n\\ttdelT,degreeF\\t\\t\\t20\\t\\t18\\t\\t22\\t\\t20\\t\\t18\\t\\t22\\n\\tLiquor temp, degreeF\\t\\t\\t238\\t\\t219\\t\\t195\\t\\t238\\t\\t219\\t\\t195\\n\\tBPR, degreeF\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\\tVapor temp, degreeF\\t\\t\\t237\\t\\t217\\t\\t192\\t\\t237\\t\\t215\\t\\t192\\n\\tVapor pressure, pis/in.Hg\\t9\\t\\t2\\t\\t10\\t\\t9\\t\\t2\\t\\t10\\n\\tLambda, Btu/lb\\t\\t\\t954\\t\\t965\\t\\t983\\t\\t954\\t\\t965\\t\\t983\\n\\tLiquor in, lb/hr\\t\\t100000\\t\\t79400\\t\\t56900\\t\\t109000\\t\\t70000\\t\\t52400\\n\\tLiqour out, lb/hr\\t\\t79400\\t\\t56900\\t\\t33300\\t\\t70000\\t\\t52400\\t\\t33300\\n\\tEvaporation,lb/hr\\t\\t20600\\t\\t22500\\t\\t23500\\t\\t30000\\t\\t17600\\t\\t19100\\n\\tdegreeBrix(out)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t30\\n\\tCondenser water, gpm\\t\\t\\t\\t455\\t\\t\\t\\t\\t\\t365\\n\"\n", + "print\"\\n\\t\\t\\t\\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\\n\\t\\t\\t\\tCondenser water = 455 gpm\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "sf=22400;#lb/hr\n", + "lc=100000;#lb/hr\n", + "t1=238;#degreeF\n", + "t2=230;#degreeF\n", + "te=30000+17600+19100;\n", + "his=sf*940*0.97;#Btu/hr\n", + "hlq=lc*(t1-t2)*0.92;#Btu/hr\n", + "hd=his-hlq;#Btu/hr\n", + "eva=(hd)/954;#lb/hr\n", + "l2d=lc-eva;\n", + "print\"\\t1.a.Heat in steam\\t\\n\\t\" ,his \n", + "print\"b.Heating liquor\\t\\n\\t\",hlq\n", + "print\"c.Evaporation\\t\\t Evaporation/954\\t\\n\\t\",hd,eva \n", + "print\"d.Liquor to 2d = \",l2d\n", + "print\"total evapouriation\",te\n", + "#end\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/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 new file mode 100644 index 00000000..6c6ad595 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_14_Evapouration_4.ipynb @@ -0,0 +1,1114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 : Evapouration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1 pgno:383" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tQevap is Btu/hr\t9610000\n", + "\tQ300 degreeF is Btu/hr\t9600500\n", + "\tTemperature head = degree F\t74\n", + "\tOverall coefficient \t605.5\n", + "\tSurface required is ft^2\t2144.75416788\n" + ] + } + ], + "source": [ + "print\"\\t example 14.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "t1 = 300; # degreeF\n", + "t2 = 226; #degree F\n", + "bs = 700; # Btu/((hr)(ft^2)(ddegree F))\n", + "#Heat Balance\n", + "Qv = 10000 * 961; # Btu/hr\n", + "print\"\\tQevap is Btu/hr\\t\",Qv\n", + "Q3 = 10550 * 910; #Btu/hr\n", + "print\"\\tQ300 degreeF is Btu/hr\\t\",Q3\n", + "\n", + "delT = t1-t2; # degree F\n", + "print\"\\tTemperature head = degree F\\t\",delT\n", + "Ud = bs * 0.865;\n", + "print\"\\tOverall coefficient \\t\",Ud\n", + "A = Qv*10/(Ud * delT); #ft^2\n", + "print\"\\tSurface required is ft^2\\t\",A#Wrong calculation in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\tTotal product is lb/hr\t10000.0\n", + "\tTotal evaporation is lb/hr\t40000.0\n", + "\tTotal temperature difference is del degree F\t119\n", + "\tAverage pressure difference is del psi/effect \t8.25\n", + "\t\t\t\t\t\tPressure, psia\t\t delP, psi \t Steam or vapor, degree F \t lambda, Btu/lb\t\tSteam chest, 1st effect \t 26.70 \t\t\t .... \t\t Ts = 244 \t\t ls = 949 \t\tSteam chest, 2nd effect \t 18.45 \t\t\t 8.25 \t\t t1 = 224 \t\t l1 = 961 \t\tSteam chest, 3rd effect \t 10.20(20.7 in. Hg) \t 8.25 \t\t t2 = 194 \t\t l1 = 981 \t\tVapor to condenser \t\t 1.95(26 in. Hg) \t 8.25 \t\t t2 = 125 \t\t l1 = 1022 \t\n", + "\t949*Ws + 50000*(100-224) = 961*w1\t\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\t\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\t\tw1+w2+w3 = 40000\t\n", + "\tSolving simultaneously\t\n", + "\tw1 = \t12400\n", + "\tw2 = \t13300\n", + "\tw3 = \t14300\n", + "\tW1-3 is \t40000\n", + "\tA1 is ft**2 \t1510\n", + "\tA2 is ft**2 \t1588\n", + "\tA3 is ft**2 \t1512\n", + "\tHeat to condenser is Btu/hr\t14614600\n", + "\tWater requirement is lb/hr\t417560\n", + "\t= gpm \t835\n" + ] + } + ], + "source": [ + "print\"\\t example 14.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "wf = 50000; # lb/hr\n", + "sf = wf * 0.10; # lb/hr\n", + "tp = sf/0.50; # lb/hr\n", + "print\"\\tTotal product is lb/hr\\t\",tp\n", + "te = wf - tp;\n", + "print\"\\tTotal evaporation is lb/hr\\t\",te\n", + "cf = 1.0;\n", + "tF = 100; # degree F\n", + "T1 = 244; # degree F\n", + "T2 = 125; # degree F\n", + "U1=600; # Btu/((hr)*(ft**2)*(degree F))\n", + "U2=250; # Btu/((hr)*(ft**2)*(degree F))\n", + "U3=125; # Btu/((hr)*(ft**2)*(degree F))\n", + "\n", + "T = T1-T2;\n", + "print\"\\tTotal temperature difference is del degree F\\t\",T\n", + "df = (26.70- 1.95)/3; # psi/effect\n", + "print\"\\tAverage pressure difference is del psi/effect \\t\",df\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\tPressure, psia\\t\\t delP, psi \\t Steam or vapor, degree F \\t lambda, Btu/lb\\t\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\t .... \\t\\t Ts = 244 \\t\\t ls = 949 \\t\\tSteam chest, 2nd effect \\t 18.45 \\t\\t\\t 8.25 \\t\\t t1 = 224 \\t\\t l1 = 961 \\t\\tSteam chest, 3rd effect \\t 10.20(20.7 in. Hg) \\t 8.25 \\t\\t t2 = 194 \\t\\t l1 = 981 \\t\\tVapor to condenser \\t\\t 1.95(26 in. Hg) \\t 8.25 \\t\\t t2 = 125 \\t\\t l1 = 1022 \\t\"\n", + "\n", + "print\"\\t949*Ws + 50000*(100-224) = 961*w1\\t\\t961*w1 + (50000 - w1)*(224-194) = 981 * w2\\t\\t981*w2 + (50000-w1-w2)(194-125) = 1022 * w2\\t\\tw1+w2+w3 = 40000\\t\"\n", + "print\"\\tSolving simultaneously\\t\"\n", + "w1=12400;\n", + "print\"\\tw1 = \\t\",w1\n", + "w2=13300;\n", + "print\"\\tw2 = \\t\",w2\n", + "w3=14300;\n", + "print\"\\tw3 = \\t\",w3\n", + "\n", + "Wt = w1+w2+w3;\n", + "print\"\\tW1-3 is \\t\",Wt\n", + "Ws = 19100;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "Ts = 244;\n", + "t1 = 224;\n", + "t2 = 194;\n", + "t3 = 125;\n", + "\n", + "A1 = (Ws * lms)/(U1*(Ts-t1)); #ft**2\n", + "print\"\\tA1 is ft**2 \\t\",A1\n", + "A2 = (w1*lm1)/(U2*(t1-t2)); #ft**2\n", + "print\"\\tA2 is ft**2 \\t\",A2\n", + "A3 = (w2 * lm2)/(U3*(t2-t3)); #ft**2\n", + "print\"\\tA3 is ft**2 \\t\",A3\n", + "\n", + "hc = w3 * lm3; # Btu/hr, WRONG CALCULATION IN TEXT BOOK\n", + "print\"\\tHeat to condenser is Btu/hr\\t\",hc\n", + "wr = hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement is lb/hr\\t\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t= gpm \\t\",wr1\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3 pgno:414" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 14.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t981*w2 + 50000*(100-125) = 1022*w3\n", + "\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\n", + "\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\n", + "\tw1+w2+w3 = 40000\n", + "\n", + "\tSolving simultaneously\n", + "\n", + "\tw1-3 = \n", + "40000\n", + "\tA1 is ft**2\n", + "2010\n", + "\tA2 is ft**2\n", + "2043\n", + "\tA3 is ft**2\n", + "1048\n", + "\tAverage surface is ft**2\n", + "1700\n", + "\n", + "\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\n", + "5100\n", + "\tRecalculation\n", + "\n", + "\tA1 is ft**2\n", + "0\n", + "\tA2 is ft**2\n", + "0\n", + "\tA3 is ft**2\n", + "1048\n", + "\tTs-t3 is degreeF\n", + "119\n", + "\t\t\t\t\tPressure, psia\t\t Steam or vapor, degreeF \t lambda, Btu/lb\n", + "\tSteam chest, 1st effect \t 26.70 \t\t\tTs = 244 \t\t 949 \n", + "\tSteam chest, 2nd effect \t 16.0 \t\t\t t1 = 216 \t\t 968 \n", + "\tSteam chest, 3rd effect \t 16.4 in. Hg) \t\t t2 = 175 \t\t 992 \n", + "\tVapor to condenser \t\t 26 in. Hg \t\t t3 = 125 \t\t l1 = 1022 \n", + "\n", + "\tw1 is \n", + "15450\n", + "\tw2 is \n", + "13200\n", + "\tw3 is \n", + "11350\n", + "\tWs is \n", + "16850\n", + "\tHeat to condenser is Btu/hr\n", + "11599700\n", + "\tWater requirement lb/hr\n", + "331420\n", + "\t\t\t= gpm\n", + "662\n", + "\tEconomy, lb evaporation/lb steam \n", + "2\n", + "\t\t\t\tForward\t\tBackward\n", + "\tTotal steam, lb/hr\t19100\t\t16850\n", + "\tCooling water, gpm\t840\t\t664\n", + "\tTotal surface, ft**2\t4800\t\t4500\n" + ] + } + ], + "source": [ + "print\"\\t example 14.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Same conditions as example 14.2\n", + "U1 = 400; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U2 = 250; #Btu/((hr)*(ft**2)*(degreeF))\n", + "U3 = 175; #Btu/((hr)*(ft**2)*(degreeF))\n", + "\n", + "w1 = 50000; # lb/hr From example 14.2\n", + "wt = 40000; # lb/hr From example 14.2\n", + "cf = 1; # From example 14.2\n", + "\n", + "print\"\\t981*w2 + 50000*(100-125) = 1022*w3\\n\\t961*w1 + (50000 - w3)*(125-194) = 981 * w2\\n\\t949*Ws + (50000-w3-w2)(194-224) = 961 * w1\\n\\tw1+w2+w3 = 40000\\n\"\n", + "print\"\\tSolving simultaneously\\n\"\n", + "w1 = 15950;\n", + "w2 = 12900;\n", + "w3 = 11150;\n", + "lms = 949;\n", + "lm1 = 961;\n", + "lm2 = 981;\n", + "lm3 = 1022;\n", + "\n", + "wt = w1+w2+w3;\n", + "print\"\\tw1-3 = \\n\",wt\n", + "Ws = 16950;\n", + "A1 = (Ws*lms)/(U1*20); #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A1\n", + "A2 = (w1*lm1)/(U2*30); #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A2\n", + "A3 = (w2*lm2)/(U3*69); #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A3\n", + "\n", + "Avs = (A1 + A2 + A3)/3; #ft**2\n", + "print\"\\tAverage surface is ft**2\\n\",Avs\n", + "Av1 = 3 * Avs; #ft**2\n", + "print\"\\n\\tWith a better distribution temperatures and pressure, Average surface is %.0f ft**2\\n\",Av1\n", + "print\"\\tRecalculation\\n\"\n", + "Av2 = 1500; #ft**2, assume\n", + "dT1 = 28; #degreeF\n", + "A4 = (20/dT1)*A1; #ft**2\n", + "print\"\\tA1 is ft**2\\n\",A4\n", + "dT2 = 41; #degreeF\n", + "A5 = (30/dT2)*A2; #ft**2\n", + "print\"\\tA2 is ft**2\\n\",A5\n", + "dT3 = 50; #degreeF\n", + "A6 = (69/50)*A3; #ft**2\n", + "print\"\\tA3 is ft**2\\n\",A6\n", + "del1 = 119; #degreeF\n", + "print\"\\tTs-t3 is degreeF\\n\",del1\n", + "print\"\\t\\t\\t\\t\\tPressure, psia\\t\\t Steam or vapor, degreeF \\t lambda, Btu/lb\\n\\tSteam chest, 1st effect \\t 26.70 \\t\\t\\tTs = 244 \\t\\t 949 \\n\\tSteam chest, 2nd effect \\t 16.0 \\t\\t\\t t1 = 216 \\t\\t 968 \\n\\tSteam chest, 3rd effect \\t 16.4 in. Hg) \\t\\t t2 = 175 \\t\\t 992 \\n\\tVapor to condenser \\t\\t 26 in. Hg \\t\\t t3 = 125 \\t\\t l1 = 1022 \\n\"\n", + "\n", + "w1 = 15450; #Solving again for \n", + "print\"\\tw1 is \\n\",w1\n", + "w2 = 13200;\n", + "print\"\\tw2 is \\n\",w2\n", + "w3 = 11350;\n", + "print\"\\tw3 is \\n\",w3\n", + "Ws = 16850;\n", + "print\"\\tWs is \\n\",Ws\n", + "Hc = w3 * 1022;\n", + "print\"\\tHeat to condenser is Btu/hr\\n\",Hc\n", + "wr = Hc/(120-85); #lb/hr\n", + "print\"\\tWater requirement lb/hr\\n\",wr\n", + "wr1 = wr/500;\n", + "print\"\\t\\t\\t= gpm\\n\",wr1\n", + "ec = wt/Ws;\n", + "print\"\\tEconomy, lb evaporation/lb steam \\n\",ec\n", + "\n", + "#comparision of forward and backward feed\n", + "print\"\\t\\t\\t\\tForward\\t\\tBackward\\n\\tTotal steam, lb/hr\\t19100\\t\\t16850\\n\\tCooling water, gpm\\t840\\t\\t664\\n\\tTotal surface, ft**2\\t4800\\t\\t4500\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4 pgno:418" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.4 \n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\n", + "\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\n", + "\n", + "\tEffects\t\tWater evaporated(lb/(hr)*(ft**2))\n", + "\n", + "\t1\t\t14-16\n", + "\t2\t\t6-8\n", + "\t3\t\t5-6\n", + "\t4\t\t4-5\n", + "\t5\t\t3-4\n", + "\n", + "\n", + "\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam flow, lb/hr\t\t42600\t\t38000\n", + "\t2.Steam pressure, psi/in.Hg\t30\t\t30\t\t15\t\t5\t\t4\t\t14.5\n", + "\n", + "\t3.Steam temp,degreeF\t\t\t274\t\t274\t\t250\t\t227\t\t205\t\t181\n", + "\n", + "\t4.delT,degreeF\t\t\t23\t\t23\t\t21\t\t20\t\t20\t\t27\n", + "\t5.Liquor temp, degreeF\t\t251\t\t251\t\t229\t\t207\t\t185\t\t164\n", + "\t6.BPR, degreeF\t\t\t1\t\t1\t\t2\t\t2\t\t4\t\t7\n", + "\t7.Vapor temp, degreeF\t\t250\t\t250\t\t227\t\t205\t\t181\t\t147\n", + "\t8.Vapor pressure, pis/in.Hg\t15\t\t15\t\t5\t\t4\t\t14.5\t\t23\n", + "\t9.Lambda, Btu/lb\t\t946\t\t946\t\t960\t\t975\t\t990\t\t1010\n", + "\t10.Liquor in, lb/hr\t\t229000\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\n", + "\t11.Liqour out, lb/hr\t\t190200\t\t154000\t\t117100\t\t87800\t\t64000\t\t49600\n", + "\t12.Evaporation,lb/hr\t\t38800\t\t36200\t\t36900\t\t29300\t\t23800\t\t14400\n", + "\t13.degreeBrix(out)\t\t\t15.7\t\t19.4\t\t25.5\t\t34.4\t\t46.5\t\t50.0\n", + "\t14.A,ft**2\t\t\t3500\t\t3500\t\t5000\t\t5000\t\t5000\t\t3500\n", + "\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\t478\t\t425\t\t310\t\t264\t\t219\t\t138\n", + "\t16.UD delT,Btu/(hr)*(ft**2)\t11000\t\t9780\t\t6520\t\t5270\t\t4390\t\t3740\n", + "\n", + "\tTotal temperature difference in the evaporator system = degreeF\n", + "127\n", + "\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\n", + "16\n", + "\tTotal EFFECTIVE temperature difference = degreeF\n", + "111\n", + "\n", + "\t\t\t\tSUGAR-JUICE HEATERS\n", + "\n", + "\tRaw-juice heaters\t\t\t\tClear=juice heaters\n", + "\t-----------------------------------------------------------------------------------------\n", + "\n", + "\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr 229000 212 184 5834920.0\n", + "\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\n", + "229000 243 220 4792970.0\n", + "\tVapor temp. = 227degreeF\tdelT=26.6degreeF\t\tVapor temp. = 250degreeF\tdelT=15.8degreeF\n", + "\n", + "\tud1=.\t\t\t\t\t\tUD=ud2\n", + "231 243\n", + "\tSurface,A=A1 ft**2\t\t\t\tSurface,A=A2 ft**2\n", + "\n", + "949.601275917 1248.36432776\n", + "\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr 229000 184 144 8244000.0\n", + "\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\n", + "229000 220 200 4122000.0\n", + "\tVapor temp. = 205degreeF\tdelT=37.6degreeF\t\tVapor temp. = 227degreeF\tdelT=14.8degreeF\n", + "\n", + "\tUD=Ud3\t\t\t\t\t\tUD=Ud4\n", + "230 214\n", + "\tSurface,A=A3 ft**2\t\t\t\tSurface,A=A4 ft**2\n", + "\n", + "953.2839963 1301.46501642\n", + "\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr 229000 144 82 4122000.0\n", + "\t(Use 2 heaters at 1300 ft**2 each plus 1\n", + "\t\t\t\t\t\t\theater at 1300 ft**2 as spare)\n", + "\n", + "\tVapor temp. = 181degreeF\tdelT=62.2degreeF\n", + "\tSurface,A=\n", + "946.715663757\n", + "\t(Use 3 heaters at 100 ft**2\n", + "\teach plus 1 heater as spare)\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t----------------------------------------------------\n", + "\n", + "\t1A.Heat in steam........\n", + "38388138.0\n", + "\t Heating liquor.......\n", + "\t\t\t\t%.3e\t.\n", + "1667120.0 36721018.0 38817.1437632\n", + "\t Liqour to 1B\n", + "\t = lb/hr\n", + "190182.856237\n", + "\t1B.Heat in steam........\n", + "34979292.7593\n", + "\t Heating liquor........\n", + "\t\t\t\t\n", + "0.0 34979292.7593 36975.9965744\n", + "\t Liqour to 2d \n", + "\t effect= lb/hr\n", + "153206.859662\n", + "\t\t\t\t\t\t\t\tLb/hr\n", + "\n", + "\t(a) Actual evaporation..................................\n", + "179400\n", + "\t(b) Equivalent evaporation from vapors of \n", + "\t 1st effect used for vaccum pans......................\n", + "145500\n", + "\t(c) Equivalent evaporation from 1st effect \n", + "\t vapors used for clarified-juice heaters..............\n", + "19700\n", + "\t(d) Equivalent evaporation from 2d effect \n", + "\t vapors used for clarified-and raw-juice heaters......\n", + "30600\n", + "\t(e) Equivalent evaporation from 3d effect \n", + "\t vapors used for raw-juice heaters....................\n", + "2.71828182846\n", + "\t(f) Equivalent evaporation from 4th effect \n", + "\t vapors used for raw-juice heaters....................\n", + "13100\n", + "\t -----\n", + "\n", + "\t Extrapolated evaporation............................\n", + "406200\n", + "\t\tEstimated steam quantity = lb/hr\n", + "81240\n", + "\t\tActual steam required from final heat balance = lb/hr\n", + "80600\n", + "\t\t\t\t\t\t\tError = lb/hr\n", + "640\n", + "\tGallons per minute of Water required = gpm 583\n" + ] + } + ], + "source": [ + "print\"\\texample 14.4 \\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "from math import e\n", + "#Assumed that 37500 lb/hr of 15 psig vapor is bled from the first effect for use in thevaccum pans\n", + "print\"\\n\\tAVERAGE EVAPORATION PER SQUARE FOOT HEATING SURFACE FOR SUGAR EVAPORATORS\\n\"\n", + "print\"\\tEffects\\t\\tWater evaporated(lb/(hr)*(ft**2))\\n\"\n", + "print\"\\t1\\t\\t14-16\\n\\t2\\t\\t6-8\\n\\t3\\t\\t5-6\\n\\t4\\t\\t4-5\\n\\t5\\t\\t3-4\\n\"\n", + "print\"\\n\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t42600\\t\\t38000\\n\\t2.Steam pressure, psi/in.Hg\\t30\\t\\t30\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\n\"\n", + "print\"\\t3.Steam temp,degreeF\\t\\t\\t274\\t\\t274\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\n\"\n", + "print\"\\t4.delT,degreeF\\t\\t\\t23\\t\\t23\\t\\t21\\t\\t20\\t\\t20\\t\\t27\\n\\t5.Liquor temp, degreeF\\t\\t251\\t\\t251\\t\\t229\\t\\t207\\t\\t185\\t\\t164\\n\\t6.BPR, degreeF\\t\\t\\t1\\t\\t1\\t\\t2\\t\\t2\\t\\t4\\t\\t7\\n\\t7.Vapor temp, degreeF\\t\\t250\\t\\t250\\t\\t227\\t\\t205\\t\\t181\\t\\t147\\n\\t8.Vapor pressure, pis/in.Hg\\t15\\t\\t15\\t\\t5\\t\\t4\\t\\t14.5\\t\\t23\\n\\t9.Lambda, Btu/lb\\t\\t946\\t\\t946\\t\\t960\\t\\t975\\t\\t990\\t\\t1010\\n\\t10.Liquor in, lb/hr\\t\\t229000\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\n\\t11.Liqour out, lb/hr\\t\\t190200\\t\\t154000\\t\\t117100\\t\\t87800\\t\\t64000\\t\\t49600\\n\\t12.Evaporation,lb/hr\\t\\t38800\\t\\t36200\\t\\t36900\\t\\t29300\\t\\t23800\\t\\t14400\\n\\t13.degreeBrix(out)\\t\\t\\t15.7\\t\\t19.4\\t\\t25.5\\t\\t34.4\\t\\t46.5\\t\\t50.0\\n\\t14.A,ft**2\\t\\t\\t3500\\t\\t3500\\t\\t5000\\t\\t5000\\t\\t5000\\t\\t3500\\n\\t15.UD,Btu/(hr)*(ft**2)*(degreeF)\\t478\\t\\t425\\t\\t310\\t\\t264\\t\\t219\\t\\t138\\n\\t16.UD delT,Btu/(hr)*(ft**2)\\t11000\\t\\t9780\\t\\t6520\\t\\t5270\\t\\t4390\\t\\t3740\\n\"#BPR values from fig 14.34a\n", + "#Saturate vapor pressure above the liquour determined from Table 7\n", + "#Saturated steam pressure in the following effect determined from Table 7\n", + "\n", + "t1 = 274; #degreeF\n", + "t2 = 147; #degreeF\n", + "t = t1-t2; #degreeF\n", + "print\"\\tTotal temperature difference in the evaporator system = degreeF\\n\",t\n", + "bpr1 = 1; #degreeF\n", + "bpr2 = 2; #degreeF\n", + "bpr3 = 2; #degreeF\n", + "bpr4 = 4; #degreeF\n", + "bpr5 = 7; #degreeF\n", + "bpr = bpr1 + bpr2 + bpr3 + bpr4 + bpr5; #degreeF\n", + "print\"\\tThe sum of all the BPR(from effect 1B to the fifth effect inclusive) = degreeF\\n\",bpr\n", + "tf = t-bpr; #degreeF\n", + "print\"\\tTotal EFFECTIVE temperature difference = degreeF\\n\",tf\n", + "lbh = 229000; #lb/hr\n", + "tp1=212; #degreeF\n", + "tp2=184; #degreeF\n", + "tp3=144; #degreeF\n", + "tp4=82; #degreeF\n", + "tj1=243; #degreeF\n", + "tj2=220; #degreeF\n", + "tj3=200; #degreeF\n", + "Ud1=231;\n", + "Ud2=243;\n", + "Ud3=230;\n", + "Ud4=214;\n", + "Ud5=217;\n", + "print\"\\n\\t\\t\\t\\tSUGAR-JUICE HEATERS\\n\"\n", + "print\"\\tRaw-juice heaters\\t\\t\\t\\tClear=juice heaters\\n\\t-----------------------------------------------------------------------------------------\\n\"\n", + "rj1=lbh*(tp1-tp2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tp1-tp2)(0.91) = rj1 Btu/hr\",lbh,tp1,tp2,rj1\n", + "rj2=lbh*(tj1-tj2)*(0.91); #Btu/hr\n", + "print\"\\t1.lbh(tj1-tj2)(0.91) = rj2 Btu/hr\\n\",lbh,tj1,tj2,rj2\n", + "print\"\\tVapor temp. = 227degreeF\\tdelT=26.6degreeF\\t\\tVapor temp. = 250degreeF\\tdelT=15.8degreeF\\n\"\n", + "print\"\\tud1=.\\t\\t\\t\\t\\t\\tUD=ud2\\n\",Ud1,Ud2\n", + "A1=rj1/(26.6*Ud1);#ft**2\n", + "A2=rj2/(15.8*Ud2);#ft**2\n", + "print\"\\tSurface,A=A1 ft**2\\t\\t\\t\\tSurface,A=A2 ft**2\\n\\n\",A1,A2\n", + "\n", + "rj3=lbh*(tp2-tp3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp2-tp3)(0.91) = rj3 Btu/hr\",lbh,tp2,tp3,rj3\n", + "rj4=lbh*(tj2-tj3)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tj2-tj3)(0.91) = rj4 Btu/hr\\n\",lbh,tj2,tj3,rj4\n", + "print\"\\tVapor temp. = 205degreeF\\tdelT=37.6degreeF\\t\\tVapor temp. = 227degreeF\\tdelT=14.8degreeF\\n\"\n", + "print\"\\tUD=Ud3\\t\\t\\t\\t\\t\\tUD=Ud4\\n\",Ud3,Ud4\n", + "A3=rj3/(37.6*Ud3);#ft**2\n", + "A4=rj4/(14.8*Ud4);#ft**2\n", + "print\"\\tSurface,A=A3 ft**2\\t\\t\\t\\tSurface,A=A4 ft**2\\n\\n\",A3,A4\n", + "\n", + "rj5=lbh*(tp3-tp4)*(0.90);#Btu/hr\n", + "print\"\\t2.lbh(tp3-tp4)(0.91) = rj4 Btu/hr\",lbh,tp3,tp4,rj4\n", + "print\"\\t(Use 2 heaters at 1300 ft**2 each plus 1\\n\\t\\t\\t\\t\\t\\t\\theater at 1300 ft**2 as spare)\\n\"\n", + "A5=rj5/(62.2*Ud5);#ft**2\n", + "print\"\\tVapor temp. = 181degreeF\\tdelT=62.2degreeF\\n\\tSurface,A=\\n\",A5\n", + "print\"\\t(Use 3 heaters at 100 ft**2\\n\\teach plus 1 heater as spare)\\n\\n\"\n", + "\n", + "v1=42600;#lb/hr\n", + "tt1=251;#degreeF\n", + "print\"\\t\\t\\t\\tHEAT BALANCE\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t----------------------------------------------------\\n\"\n", + "hia=v1*929*0.97;#Btu/hr\n", + "print\"\\t1A.Heat in steam........\\n\",hia\n", + "hla=lbh*(tt1-tj1)*0.91;#Btu/hr\n", + "hh=hia-hla;#Btu/hr\n", + "lb1=946;#Btu/lb\n", + "dif=hh/lb1;#lb/hr\n", + "print\"\\t Heating liquor.......\\n\\t\\t\\t\\t%.3e\\t.\\n\",hla,hh,dif\n", + "ltob=lbh-dif;#lb/hr\n", + "print\"\\t Liqour to 1B\\n\\t = lb/hr\\n\",ltob\n", + "hia1=dif*929*0.97;#Btu/hr\n", + "print\"\\t1B.Heat in steam........\\n\",hia1\n", + "hla1=ltob*(tt1-tt1)*0.91;#Btu/hr\n", + "hh1=hia1;#Btu/hr\n", + "dif1=hh1/lb1;#lb/hr\n", + "print\"\\t Heating liquor........\\n\\t\\t\\t\\t\\n\",hla1,hh1,dif1\n", + "dif2=ltob-dif1;#lb/hr\n", + "print\"\\t Liqour to 2d \\n\\t effect= lb/hr\\n\",dif2\n", + "#Similarily the values in the table are calculated\n", + "\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\tLb/hr\\n\"\n", + "aa=179400;#lb/hr\n", + "bb=145500;#lb/hr\n", + "cc=19700;#lb/hr\n", + "dd=30600;#lb/hr\n", + "ee=17900;#lb/hr\n", + "ff=13100;#lb/hr\n", + "tto=aa+bb+cc+dd+ee+ff;#lb/hr\n", + "print\"\\t(a) Actual evaporation..................................\\n\",aa\n", + "print\"\\t(b) Equivalent evaporation from vapors of \\n\\t 1st effect used for vaccum pans......................\\n\",bb\n", + "print\"\\t(c) Equivalent evaporation from 1st effect \\n\\t vapors used for clarified-juice heaters..............\\n\",cc\n", + "print\"\\t(d) Equivalent evaporation from 2d effect \\n\\t vapors used for clarified-and raw-juice heaters......\\n\",dd\n", + "print\"\\t(e) Equivalent evaporation from 3d effect \\n\\t vapors used for raw-juice heaters....................\\n\",e\n", + "print\"\\t(f) Equivalent evaporation from 4th effect \\n\\t vapors used for raw-juice heaters....................\\n\",ff\n", + "print\"\\t -----\\n\"\n", + "print\"\\t Extrapolated evaporation............................\\n\",tto\n", + "esq=tto/5;#lb/hr\n", + "print\"\\t\\tEstimated steam quantity = lb/hr\\n\",esq\n", + "aesq=80600;#lb/hr\n", + "err = esq-aesq;#lb/hr\n", + "print\"\\t\\tActual steam required from final heat balance = lb/hr\\n\",aesq\n", + "print\"\\t\\t\\t\\t\\t\\t\\tError = lb/hr\\n\",err\n", + "ta=15;\n", + "Q=14575000; #Btu/hr Total hourly evaporation\n", + "Gpm=Q/(500*(t2-tp4-ta));#From equation 14.4\n", + "print\"\\tGallons per minute of Water required = gpm\",Gpm\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5 pgno:427" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.5\t\n", + "\tapproximate values are mentioned in the book \t\n", + "\tOverall temperature difference = deg F\t155\n", + "\tThe estimated total BPR = degF\t[10 18 25 31 36 41]\n", + "\tEffective temperature difference = %.0f degF\t[145 137 130 124 119 114]\n", + "\t\t\t\t\tEVAPORATOR SUMMARY\t\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\tItem\t\t\t\t\t\t\t\t\tEffects\t\t\t\t\t\t----------------------------------------------------------------------------------------------\t\t\t\t\t\t1A\t\t1B\t\t2\t\t3\t\t4\t\t5\t\n", + "\t------------------------------------------------------------------------------------------------------------------------------\t\n", + "\t1.Steam flow, lb/hr\t\t20000\t\t2.Steam pressure, psi/in.Hg\t35\t\t14.5\t\t4\t\t7\t\t16.5\t\t22\t\t3.Steam temp,degF\t\t\t280\t\t249\t\t224\t\t199\t\t174\t\t151\t\t4.delT,degF\t\t\t21\t\t17\t\t18\t\t19\t\t18\t\t21\t\t5.Liquor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t6.BPR, degF\t\t\t10\t\t8\t\t7\t\t6\t\t5\t\t5\t\t7.Vapor temp, degF\t\t259\t\t232\t\t206\t\t180\t\t156\t\t130\t\t8.Vapor pressure, pis/in.Hg\t14.5\t\t4\t\t7\t\t6\t\t5\t\t5\t\t9.Lambda, Btu/lb\t\t946\t\t962\t\t978\t\t994\t\t1008\t\t1022\t\t10.Liquor in, lb/hr\t\t73400\t\t88300\t\t101000\t\t113000\t\t72000\t\t72000\t\t11.Liqour out, lb/hr\t\t56200\t\t73400\t\t88300\t\t101100\t\t58300\t\t54700\t\t12.Evaporation,lb/hr\t\t17200\t\t14900\t\t12800\t\t11900\t\t13700\t\t17300\t\t13.Total solids, \t\t38.9\t\t29.8\t\t24.7\t\t21.6\t\t18.7\t\t20.0\t\t14.A,ft^2\t\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t3250\t\t15.UD,Btu/(hr)*(ft^2)*(degF)\t262\t\t295\t\t252\t\t251\t\t221\t\t221\t\t16.UD delT,Btu/(hr)*(ft^2)\t5510\t\t5000\t\t4530t\t\t4770\t\t3980\t\t4650\t\n", + "\t\tTotal amount of water evaporated = \t lb/hr\t[17200 32100 44900 56800 70500 0]\n", + "\tTheoretical amount of steam for a six-effect evaporator = \t lb/hr\t[ 2866 5350 7483 9466 11750 0]\n", + "\tSteam used for trail balance = \t lb/hr\t[ 3822.22222222 7133.33333333 9977.77777778 12622.22222222\n", + " 15666.66666667 0. ]\n", + "\tEstimate of the amount of evaporation in the first effect = \t lb/hr\t[ 3295.9 6152.5 8605.45 10885.9 13512.5 0. ]\n", + "\tEstimated discharge from second effect = \t lb/hr\t[ 59495.9 62352.5 64805.45 67085.9 69712.5 56200. ]\n", + "\t\t\t\t\tHEAT BALANCE\t\n", + "\t\tCooling water at 60 degreeF = \t gpm\t710\n", + "\t--------------------------------------------------------\t\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\t\n", + "\t--------------------------------------------------------\t\n", + "\t1.a.Heat in steam \t\t17925600.0\n", + "\t b.Heating liquor \t\t1625076.0\n", + "\t c.Evaporation\t\t\t\t\t\t17230.9978858\n", + "\t d.To flash tank\t2190591.08245\n", + "\t\t\t\t2239.86818247\n", + "\t e.Flashed vapor=\t\t2239.86818247\n", + "\t f.product \t53929.1339317\n", + "\t\t2.a.Heat in 1st vapors\t\t16300524.0\n", + "\t b.Heating liqour\t\t1951430.0\n", + "\t c.Evaporation= 14915.8981289\n", + "\t\t\t\t\t14915.8981289\n", + "\t d.Liquor to 1b=\t\t73384.1018711\n", + "total hourly evapouration lb : 90000\n", + "economy is lb/lb : 4.5\n" + ] + } + ], + "source": [ + "print\"\\texample 14.5\\t\"\n", + "print\"\\tapproximate values are mentioned in the book \\t\"\n", + "st1=280; #degF\n", + "vt6=125; #degF\n", + "odT=st1-vt6; #degF\n", + "print\"\\tOverall temperature difference = deg F\\t\",odT #corresponding to 35 psig and 26 in. Hg\n", + "import numpy\n", + "bpr=numpy.array([10, 8, 7, 6, 5, 5])\n", + "#bpr(1)=10; #degF\n", + "#bpr(2)=8; #degF\n", + "#bpr(3)=7; #degF\n", + "#bpr(4)=6; #degF\n", + "#bpr(5)=5; #degF\n", + "#bpr(6)=5; #degF\n", + "i=1;\n", + "tbpr=numpy.array([0, 0, 0, 0, 0, 0]);\n", + "tbpr[0]=bpr[0];\n", + "while (i<6):\n", + "\n", + " tbpr[i]=tbpr[i-1]+bpr[i];\n", + " i=i+1;\n", + "\n", + "print\"\\tThe estimated total BPR = degF\\t\",tbpr #from fig. 14.36a\n", + "edT=odT-tbpr;\n", + "print\"\\tEffective temperature difference = %.0f degF\\t\",edT\n", + "print\"\\t\\t\\t\\t\\tEVAPORATOR SUMMARY\\t\\tAll bodies will consist of 300 2 in. OD, 10 BWG tubes 24 long\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\tItem\\t\\t\\t\\t\\t\\t\\t\\t\\tEffects\\t\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\t\\t\\t\\t\\t\\t1A\\t\\t1B\\t\\t2\\t\\t3\\t\\t4\\t\\t5\\t\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\t\"\n", + "print\"\\t1.Steam flow, lb/hr\\t\\t20000\\t\\t2.Steam pressure, psi/in.Hg\\t35\\t\\t14.5\\t\\t4\\t\\t7\\t\\t16.5\\t\\t22\\t\\t3.Steam temp,degF\\t\\t\\t280\\t\\t249\\t\\t224\\t\\t199\\t\\t174\\t\\t151\\t\\t4.delT,degF\\t\\t\\t21\\t\\t17\\t\\t18\\t\\t19\\t\\t18\\t\\t21\\t\\t5.Liquor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t6.BPR, degF\\t\\t\\t10\\t\\t8\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t7.Vapor temp, degF\\t\\t259\\t\\t232\\t\\t206\\t\\t180\\t\\t156\\t\\t130\\t\\t8.Vapor pressure, pis/in.Hg\\t14.5\\t\\t4\\t\\t7\\t\\t6\\t\\t5\\t\\t5\\t\\t9.Lambda, Btu/lb\\t\\t946\\t\\t962\\t\\t978\\t\\t994\\t\\t1008\\t\\t1022\\t\\t10.Liquor in, lb/hr\\t\\t73400\\t\\t88300\\t\\t101000\\t\\t113000\\t\\t72000\\t\\t72000\\t\\t11.Liqour out, lb/hr\\t\\t56200\\t\\t73400\\t\\t88300\\t\\t101100\\t\\t58300\\t\\t54700\\t\\t12.Evaporation,lb/hr\\t\\t17200\\t\\t14900\\t\\t12800\\t\\t11900\\t\\t13700\\t\\t17300\\t\\t13.Total solids, \\t\\t38.9\\t\\t29.8\\t\\t24.7\\t\\t21.6\\t\\t18.7\\t\\t20.0\\t\\t14.A,ft^2\\t\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t3250\\t\\t15.UD,Btu/(hr)*(ft^2)*(degF)\\t262\\t\\t295\\t\\t252\\t\\t251\\t\\t221\\t\\t221\\t\\t16.UD delT,Btu/(hr)*(ft^2)\\t5510\\t\\t5000\\t\\t4530t\\t\\t4770\\t\\t3980\\t\\t4650\\t\"#BPR values from fig 14.36a\n", + "#Specific-heat data are given in Fig. 14.36b\n", + "ev=numpy.array([17200, 14900, 12800, 11900, 13700, 17300]);\n", + "#ev(1)=17200; #lb/hr\n", + "#ev(2)=14900; #lb/hr\n", + "#ev(3)=12800; #lb/hr\n", + "#ev(4)=11900; #lb/hr\n", + "#ev(5)=13700; #lb/hr\n", + "#ev(6)=17300; #lb/hr\n", + "i=1;\n", + "tev =numpy.array([0, 0, 0, 0, 0, 0])\n", + "tev[0]=ev[0];\n", + "while (i<5):\n", + " tev[i]= tev[i-1]+ev[i];\n", + " i=i+1;\n", + "\n", + "print\"\\t\\tTotal amount of water evaporated = \\t lb/hr\\t\",tev\n", + "ttev=tev/6;#lb/hr\n", + "print\"\\tTheoretical amount of steam for a six-effect evaporator = \\t lb/hr\\t\",ttev\n", + "tev2=tev/(6*0.75); #lb/hr . order of 75 percent of theoretical\n", + "print\"\\tSteam used for trail balance = \\t lb/hr\\t\",tev2\n", + "lq=(tev/6);\n", + "lq=lq+(lq*0.15);\n", + "print\"\\tEstimate of the amount of evaporation in the first effect = \\t lb/hr\\t\",lq\n", + "lout6=54000;#lb/hr\n", + "lq2=lout6+lq+2200;#lb/hr\n", + "print\"\\tEstimated discharge from second effect = \\t lb/hr\\t\",lq2\n", + "print\"\\t\\t\\t\\t\\tHEAT BALANCE\\t\"\n", + "cw = 17750000/(500*(125-15-60)); #gpm, values from table 14.6\n", + "print\"\\t\\tCooling water at 60 degreeF = \\t gpm\\t\",cw\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\t\"\n", + "print\"\\t--------------------------------------------------------\\t\"\n", + "sf=20000;#lb/hr\n", + "lqi=73400;#lb/hr\n", + "the=90000;\n", + "lqi2=88300\n", + "lt1=259;#degreeF\n", + "lt2=232;#degreeF\n", + "lt3=206;#degreeF\n", + "ecn=90000./20000.;\n", + "ev=17200;#lb/hr\n", + "his=sf*924*0.97;#Btu/hr\n", + "print\"\\t1.a.Heat in steam \\t\\t\",his\n", + "hl=lqi*(lt1-lt2)*0.82;#Btu/hr\n", + "print\"\\t b.Heating liquor \\t\\t\",hl\n", + "hh=his-hl;\n", + "ev1=(hh)/946;#lb/hr\n", + "print\"\\t c.Evaporation\\t\\t\\t\\t\\t\\t\",ev1\n", + "dif=lqi-ev1;\n", + "tft=(dif)*(lt1-209)*0.78;\n", + "print\"\\t d.To flash tank\\t\",tft\n", + "ev2=tft/978;#lb/hr\n", + "print\"\\t\\t\\t\\t\",ev2\n", + "print\"\\t e.Flashed vapor=\\t\\t\",ev2\n", + "p=dif-ev2;\n", + "print\"\\t f.product \\t\",p\n", + "print\"\\t\\t2.a.Heat in 1st vapors\\t\\t\",hh\n", + "hl2=lqi2*(lt2-lt3)*0.85;\n", + "print\"\\t b.Heating liqour\\t\\t\",hl2\n", + "ev3=(hh-hl2)/962;\n", + "print\"\\t c.Evaporation=\",ev3\n", + "\n", + "print\"\\t\\t\\t\\t\\t\",ev3\n", + "lto1=lqi2-ev3;\n", + "print\"\\t d.Liquor to 1b=\\t\\t\",lto1\n", + "print\"total hourly evapouration lb :\",the\n", + "print\"economy is lb/lb :\",ecn\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6 pgno:437" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.6\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tTotal temperature difference = degreeF\n", + "159\n", + "\tThe effective temperature difference is degreeF\n", + "56\n", + "\n", + "\t\t\tCAUSTIC EVAPORATOR MATERIAL BALANCE\n", + "\n", + "\tCell liquour at 120degreeF \t\tWash at 80degreeF\n", + "\n", + "\t---------------------------------------------\n", + "\n", + "\t8.75 prcnt NaOH = l1\n", + "\t16.6 prcnt NaCl = l2\t\t25 prcnt NaCl = w2\n", + "2000 3800 340\n", + "\t74.65 prcnt H20 = l3\t\t75 prcnt H20 = w2\n", + "17050 1020\n", + "\tTotal cell liquor = lq\tTotoal wash = w\n", + "22850 1360\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\t\t\t\tNaOH\t\tNaCl\t\tH20,Lb\tTotal,Lb\n", + "\t\t\t\tprcnt\tLb\tprcnt\tLb\n", + "\n", + "\t-------------------------------------------------------------------------\n", + "\n", + "\tOverall operation:\n", + "\t Cell liquor.......... 8.75\t2000 3800 17050 22850\n", + "\t Wash................. ....\t....\t25.00\t340 1020 1360\n", + "\t Total in............. ....\t2000 4140 18070 24210\n", + "\t Product.............. 50.00\t2000 110 1890 4000\n", + "\t Removed.............. ....\t....\t....\t\t%.0f\t%.0f\n", + "4030 16180 20210\n", + "\n", + "\t\t\t\t\tCAUSTIC EVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tItem\t\t\t\t\tEffects\n", + "t\t\t\t\t\t--------------------\t\tFlash Tank\n", + "\t\t\t\t\t\\I\t\tII\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\t1.Steam pressure, psi/in.Hg\t30\n", + "\t2.Steam temperature,degreeF\t\t274\t\t169\n", + "\t3.delT,degreeF\t\t\t28\t\t28\n", + "\t4.Liquor temperature, degreeF\t246\t\t141\t\t192\n", + "\t5.BPR, degreeF\t\t\t77\t\t26\t\t77\n", + "\t6.Vapor temperature, degreeF\t\t169\t\t115\t\t115\n", + "\t7.Lambda, Btu/lb\t\t997\t\t1027\t\t1027\n", + "\t8.Feed, lb/hr\t\t\t22788\t\t50602\t\t13367\n", + "\t9.Product, lb/hr\t\t13367\t\t40352\t\t12813\n", + "\t10.Evaporation,lb/hr\t\t9421\t\t10250\t\t554\n", + "\t11.Heat flow, Btu/hr\t\t11890000\t11020000\n", + "\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\t700\n", + "\t13.A,ft**2\t\t\t683\t\t683\n", + "\t14.Tubes, OD, in. and BWG\t1,16\t\t1,16\n", + "\t15.Tube length, ft\t\t7\t\t7\n", + "\t16.No. tubes\t\t\t432\t\t432\n", + "\t17.Circulating pump. gpm\t3200 at 20 ft\t3200 at 20ft\t167 at 45 ft\n", + "\t18.Apparent efficiency, prcnt\t54\t\t64\n", + "\t18.BHP\t\t\t\t38\t\t35\t\t8.2\n", + "\t20.Motor,hp\t\t\t40\t\t40\t\t10.0\n", + "\n", + "\t------------------------------------------------------------------------------------\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2700000.0\n", + "\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t251\t2970000\t\t25.4\t700\t670\t0.87\t\t3420000\n", + "\t252\t2480000\t\t25.0\t700\t680\t0.88\t\t2820000\n", + "\t252.5\t2290000\t\t24.7\t700\t685\t0.89\t\t2570000\t\t700\n", + "\t253\t2120000\t\t24.5\t700\t695\t0.90\t\t2520000\n", + "\n", + "\tThee gain per minute is gpm\n", + "3200\n", + "\n", + "\t\t\t\tCAUSTIC EVAPORATION HEAT BALANCE\n", + "\n", + "\t\t\t\t(Basis = 1ton/hr NaOH)\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t\tEFFECT\t\t\tBtu/hr\t\tEvaopration, lb/hr\n", + "\n", + "\t1.a.Heat in steam\t\thi\n", + "\t b.Heating liquor\t\thl\n", + "\t c.Resultant heat\t\trhf\n", + "\t d.Heat of concentrate\t\thc\n", + "\t e.Heat of vapors\t\thv\t%.0f\n", + "9511110.0 1452566.4 8058543.6 300000 7758543.6 7781.8892678\n", + "\n", + "\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\n", + "2430000.0\n", + "\tUD = Btu/((hr)*(ft**2)*(degreeF))\n", + "700\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\ttx,degreeF\tw,lb/hr\t\tdelT\tUC\tA,ft**2\tat,flow area\tGcalc\t\tUcalc\n", + "\t\t\t\t\t\t\tper pass, ft**2\n", + "\n", + "\t-------------------------------------------------------------------------------------\n", + "\n", + "\t146\t2400000\t\t25.4\t700\t620\t0.80\t\t2790000\t\t700\n", + "\t146.5\t2160000\t\t25.2\t700\t683\t0.89\t\t2430000\n", + "\n" + ] + } + ], + "source": [ + "print\"\\texample 14.6\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "st1=274; #degreeF\n", + "vt6=115; #degreeF\n", + "odT=st1-vt6; #degreeF\n", + "print\"\\tTotal temperature difference = degreeF\\n\",odT #corresponding to 35 psig\n", + "eb1=77;#degreeF, From fig.14.38\n", + "eb2=26;#degreeF, From fig.14.38\n", + "etd=odT-(eb1+eb2);#degreeF\n", + "print\"\\tThe effective temperature difference is degreeF\\n\",etd\n", + "print\"\\n\\t\\t\\tCAUSTIC EVAPORATOR MATERIAL BALANCE\\n\"\n", + "#Basis: 1 ton/hr NaOH\n", + "print\"\\tCell liquour at 120degreeF \\t\\tWash at 80degreeF\\n\"\n", + "print\"\\t---------------------------------------------\\n\"\n", + "l1=2000;#Lb\n", + "l2=3800;#Lb\n", + "l3=17050;#Lb\n", + "lq=l1+l2+l3;#Lb\n", + "w1=340;#Lb\n", + "w2=1020;#Lb\n", + "w=w1+w2;#Lb\n", + "print\"\\t8.75 prcnt NaOH = l1\\n\\t16.6 prcnt NaCl = l2\\t\\t25 prcnt NaCl = w2\\n\",l1,l2,w1\n", + "print\"\\t74.65 prcnt H20 = l3\\t\\t75 prcnt H20 = w2\\n\",l3,w2\n", + "print\"\\tTotal cell liquor = lq\\tTotoal wash = w\\n\",lq,w\n", + "print\"\\n\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\t\\t\\tNaOH\\t\\tNaCl\\t\\tH20,Lb\\tTotal,Lb\\n\\t\\t\\t\\tprcnt\\tLb\\tprcnt\\tLb\\n\"\n", + "print\"\\t-------------------------------------------------------------------------\\n\"\n", + "print\"\\tOverall operation:\\n\\t Cell liquor.......... 8.75\\t\",l1,l2,l3,lq\n", + "print\"\\t Wash................. ....\\t....\\t25.00\\t\",w1,w2,w\n", + "wl1=l2+w1;#Lb\n", + "wl2=l3+w2;#Lb\n", + "wlt=lq+w;\n", + "print\"\\t Total in............. ....\\t\",l1,wl1,wl2,wlt\n", + "prn=110;#Lb\n", + "prh=1890;#Lb\n", + "prt=4000;#Lb\n", + "print\"\\t Product.............. 50.00\\t\",l1,prn,prh,prt\n", + "r1=wl1-prn;#Lb\n", + "r2=wl2-prh;#Lb\n", + "r3=wlt-prt;#Lb\n", + "gain=3200;#gpm\n", + "print\"\\t Removed.............. ....\\t....\\t....\\t\\t%.0f\\t%.0f\\n\",r1,r2,r3\n", + "#Rest of the table is calculated similarily\n", + "print\"\\n\\t\\t\\t\\t\\tCAUSTIC EVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tItem\\t\\t\\t\\t\\tEffects\\nt\\t\\t\\t\\t\\t--------------------\\t\\tFlash Tank\\n\\t\\t\\t\\t\\t\\I\\t\\tII\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t1.Steam pressure, psi/in.Hg\\t30\\n\\t2.Steam temperature,degreeF\\t\\t274\\t\\t169\\n\\t3.delT,degreeF\\t\\t\\t28\\t\\t28\\n\\t4.Liquor temperature, degreeF\\t246\\t\\t141\\t\\t192\\n\\t5.BPR, degreeF\\t\\t\\t77\\t\\t26\\t\\t77\\n\\t6.Vapor temperature, degreeF\\t\\t169\\t\\t115\\t\\t115\\n\\t7.Lambda, Btu/lb\\t\\t997\\t\\t1027\\t\\t1027\\n\\t8.Feed, lb/hr\\t\\t\\t22788\\t\\t50602\\t\\t13367\\n\\t9.Product, lb/hr\\t\\t13367\\t\\t40352\\t\\t12813\\n\\t10.Evaporation,lb/hr\\t\\t9421\\t\\t10250\\t\\t554\\n\\t11.Heat flow, Btu/hr\\t\\t11890000\\t11020000\\n\\t12.UD,Btu/((hr)*(ft**2)*(degreeF))\\t700\\n\\t13.A,ft**2\\t\\t\\t683\\t\\t683\\n\\t14.Tubes, OD, in. and BWG\\t1,16\\t\\t1,16\\n\\t15.Tube length, ft\\t\\t7\\t\\t7\\n\\t16.No. tubes\\t\\t\\t432\\t\\t432\\n\\t17.Circulating pump. gpm\\t3200 at 20 ft\\t3200 at 20ft\\t167 at 45 ft\\n\\t18.Apparent efficiency, prcnt\\t54\\t\\t64\\n\\t18.BHP\\t\\t\\t\\t38\\t\\t35\\t\\t8.2\\n\\t20.Motor,hp\\t\\t\\t40\\t\\t40\\t\\t10.0\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------\\n\"\n", + "V=8;\n", + "s=1.5;\n", + "G=V*s*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G\n", + "UD=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Combining with a steam film coefficient of approximately 1500\n", + "print\"\\tUC or UD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t251\\t2970000\\t\\t25.4\\t700\\t670\\t0.87\\t\\t3420000\\n\\t252\\t2480000\\t\\t25.0\\t700\\t680\\t0.88\\t\\t2820000\\n\\t252.5\\t2290000\\t\\t24.7\\t700\\t685\\t0.89\\t\\t2570000\\t\\t700\\n\\t253\\t2120000\\t\\t24.5\\t700\\t695\\t0.90\\t\\t2520000\\n\"\n", + "print\"\\tThee gain per minute is gpm\\n\",gain\n", + "print\"\\n\\t\\t\\t\\tCAUSTIC EVAPORATION HEAT BALANCE\\n\"\n", + "print\"\\t\\t\\t\\t(Basis = 1ton/hr NaOH)\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t\\tEFFECT\\t\\t\\tBtu/hr\\t\\tEvaopration, lb/hr\\n\"\n", + "hi=10500*930*0.974;#Btu/hr\n", + "hl=18230*(246-150)*0.83;#Btu/hr\n", + "rh=hi-hl;#Btu/hr\n", + "hc=300000;#Btu/hr\n", + "hv=rh-hc;#Btu/hr\n", + "evv=hv/997;#lb/hr\n", + "print\"\\t1.a.Heat in steam\\t\\thi\\n\\t b.Heating liquor\\t\\thl\\n\\t c.Resultant heat\\t\\trhf\\n\\t d.Heat of concentrate\\t\\thc\\n\\t e.Heat of vapors\\t\\thv\\t%.0f\\n\",hi,hl,rh,hc,hv,evv\n", + "s1=1.35;\n", + "G1=V*s1*62.5*3600;#lb/((hr)*(ft**2))\n", + "print\"\\n\\tG = V(s*62.5*3600) = lb/((hr)*(ft**2))\\n\",G1\n", + "UD1=700;#Btu/((hr)*(ft**2)*(degreeF))\n", + "#Using thermal characteristics for this solution\n", + "print\"\\tUD = Btu/((hr)*(ft**2)*(degreeF))\\n\",UD1\n", + "#As for effect I:\n", + "print\"\\n\\t-------------------------------------------------------------------------------------\"\n", + "print\"\\n\\ttx,degreeF\\tw,lb/hr\\t\\tdelT\\tUC\\tA,ft**2\\tat,flow area\\tGcalc\\t\\tUcalc\\n\\t\\t\\t\\t\\t\\t\\tper pass, ft**2\\n\"\n", + "print\"\\t-------------------------------------------------------------------------------------\\n\"\n", + "print\"\\t146\\t2400000\\t\\t25.4\\t700\\t620\\t0.80\\t\\t2790000\\t\\t700\\n\\t146.5\\t2160000\\t\\t25.2\\t700\\t683\\t0.89\\t\\t2430000\\n\"\n", + "#end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7 pgno:447" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\texample 14.7\n", + "\n", + "\tapproximate values are mentioned in the book \n", + "\n", + "\tM1 = lb\n", + "17900\n", + "\n", + "\t\t\t\tEVAPORATOR SUMMARY\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tEffects\t\t\t\t\tStraight triple effect\t\t\t\tThermocompression\n", + "t\t\t\t\t\t----------------------------------------------------------------------------------------------\n", + "\t\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\n", + "\t------------------------------------------------------------------------------------------------------------------------------\n", + "\n", + "\tSteam flow, lb/hr\t\t22400\t\t\t\t\t\t17900\n", + "\tSteam pressure, psi in.Hg\t20\t\t9\t\t2\t\t20\t\t9\t\t2\n", + "\tSteam temp,degreeF\t\t\t258\t\t237\t\t217\t\t258\t\t237\t\t217\n", + "\ttdelT,degreeF\t\t\t20\t\t18\t\t22\t\t20\t\t18\t\t22\n", + "\tLiquor temp, degreeF\t\t\t238\t\t219\t\t195\t\t238\t\t219\t\t195\n", + "\tBPR, degreeF\t\t\t\t1\t\t2\t\t3\t\t1\t\t2\t\t3\n", + "\tVapor temp, degreeF\t\t\t237\t\t217\t\t192\t\t237\t\t215\t\t192\n", + "\tVapor pressure, pis/in.Hg\t9\t\t2\t\t10\t\t9\t\t2\t\t10\n", + "\tLambda, Btu/lb\t\t\t954\t\t965\t\t983\t\t954\t\t965\t\t983\n", + "\tLiquor in, lb/hr\t\t100000\t\t79400\t\t56900\t\t109000\t\t70000\t\t52400\n", + "\tLiqour out, lb/hr\t\t79400\t\t56900\t\t33300\t\t70000\t\t52400\t\t33300\n", + "\tEvaporation,lb/hr\t\t20600\t\t22500\t\t23500\t\t30000\t\t17600\t\t19100\n", + "\tdegreeBrix(out)\t\t\t\t\t\t\t\t\t\t\t\t\t30\n", + "\tCondenser water, gpm\t\t\t\t455\t\t\t\t\t\t365\n", + "\n", + "\n", + "\t\t\t\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\n", + "\t\t\t\tCondenser water = 455 gpm\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\tEffect\t\t\tBtu/hr\t\tEvaporation,l/hr\n", + "\n", + "\t--------------------------------------------------------\n", + "\n", + "\t1.a.Heat in steam\t\n", + "\t20424320.0\n", + "b.Heating liquor\t\n", + "\t736000.0\n", + "c.Evaporation\t\t Evaporation/954\t\n", + "\t19688320.0 20637.6519916\n", + "d.Liquor to 2d = 79362.3480084\n", + "total evapouriation 66700\n" + ] + } + ], + "source": [ + "print\"\\texample 14.7\\n\"\n", + "print\"\\tapproximate values are mentioned in the book \\n\"\n", + "M2=14300;#From fig.14.43 and heat balance above\n", + "M1=32200-14300;#From fig.14.43 and heat balance above\n", + "print\"\\tM1 = lb\\n\",M1\n", + "print\"\\n\\t\\t\\t\\tEVAPORATOR SUMMARY\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tEffects\\t\\t\\t\\t\\tStraight triple effect\\t\\t\\t\\tThermocompression\\nt\\t\\t\\t\\t\\t----------------------------------------------------------------------------------------------\\n\\t\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\"\n", + "print\"\\t------------------------------------------------------------------------------------------------------------------------------\\n\"\n", + "print\"\\tSteam flow, lb/hr\\t\\t22400\\t\\t\\t\\t\\t\\t17900\\n\\tSteam pressure, psi in.Hg\\t20\\t\\t9\\t\\t2\\t\\t20\\t\\t9\\t\\t2\\n\\tSteam temp,degreeF\\t\\t\\t258\\t\\t237\\t\\t217\\t\\t258\\t\\t237\\t\\t217\\n\\ttdelT,degreeF\\t\\t\\t20\\t\\t18\\t\\t22\\t\\t20\\t\\t18\\t\\t22\\n\\tLiquor temp, degreeF\\t\\t\\t238\\t\\t219\\t\\t195\\t\\t238\\t\\t219\\t\\t195\\n\\tBPR, degreeF\\t\\t\\t\\t1\\t\\t2\\t\\t3\\t\\t1\\t\\t2\\t\\t3\\n\\tVapor temp, degreeF\\t\\t\\t237\\t\\t217\\t\\t192\\t\\t237\\t\\t215\\t\\t192\\n\\tVapor pressure, pis/in.Hg\\t9\\t\\t2\\t\\t10\\t\\t9\\t\\t2\\t\\t10\\n\\tLambda, Btu/lb\\t\\t\\t954\\t\\t965\\t\\t983\\t\\t954\\t\\t965\\t\\t983\\n\\tLiquor in, lb/hr\\t\\t100000\\t\\t79400\\t\\t56900\\t\\t109000\\t\\t70000\\t\\t52400\\n\\tLiqour out, lb/hr\\t\\t79400\\t\\t56900\\t\\t33300\\t\\t70000\\t\\t52400\\t\\t33300\\n\\tEvaporation,lb/hr\\t\\t20600\\t\\t22500\\t\\t23500\\t\\t30000\\t\\t17600\\t\\t19100\\n\\tdegreeBrix(out)\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t30\\n\\tCondenser water, gpm\\t\\t\\t\\t455\\t\\t\\t\\t\\t\\t365\\n\"\n", + "print\"\\n\\t\\t\\t\\tHEAT BALANCE-STRAIGHT TRIPLE EFFECT\\n\\t\\t\\t\\tCondenser water = 455 gpm\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "print\"\\tEffect\\t\\t\\tBtu/hr\\t\\tEvaporation,l/hr\\n\"\n", + "print\"\\t--------------------------------------------------------\\n\"\n", + "sf=22400;#lb/hr\n", + "lc=100000;#lb/hr\n", + "t1=238;#degreeF\n", + "t2=230;#degreeF\n", + "te=30000+17600+19100;\n", + "his=sf*940*0.97;#Btu/hr\n", + "hlq=lc*(t1-t2)*0.92;#Btu/hr\n", + "hd=his-hlq;#Btu/hr\n", + "eva=(hd)/954;#lb/hr\n", + "l2d=lc-eva;\n", + "print\"\\t1.a.Heat in steam\\t\\n\\t\" ,his \n", + "print\"b.Heating liquor\\t\\n\\t\",hlq\n", + "print\"c.Evaporation\\t\\t Evaporation/954\\t\\n\\t\",hd,eva \n", + "print\"d.Liquor to 2d = \",l2d\n", + "print\"total evapouriation\",te\n", + "#end\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/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 new file mode 100644 index 00000000..d185cf80 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_1.ipynb @@ -0,0 +1,1315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Vaporizers Evapourators and Reboilers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat required for steam is : Btu/hr \t9453000.0\n", + "\t total heat required for kerosene is : Btu/hr \t9450000.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t91.1262293169\n", + "\t A : ft**2 \t1037.02304713\n", + "\t By the law of mixtures \t\n", + "\t v2 : %.0f ft**3/lb \t11.0034\n", + "\t vav : ft**3/lb \t3.16417120715\n", + "\t By the approximate method \t\n", + "\t vav : ft**3/lb \t5.5102\n", + "\t actual density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.00505661639416\n", + "\t approximate density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.0029\n" + ] + } + ], + "source": [ + "print\"\\t example 15.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=250;\n", + "T1=400;\n", + "T2=300;\n", + "w=10000; # lb/hr\n", + "W=150000; # lb/hr\n", + "l=945.3; # Btu/(lb) , table 7\n", + "from math import log10\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "C=0.63; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "delt1=T2-ts; #F\n", + "delt2=T1-ts; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "UD=100;\n", + "A=(Q/(UD*LMTD));\n", + "print\"\\t A : ft**2 \\t\",A\n", + "WC=94500; # Btu/F\n", + "vl=0.017; # ft**3/lb, from table 7\n", + "vv=13.75; # ft**3/lb, from table 7\n", + "print\"\\t By the law of mixtures \\t\"\n", + "# Assume 80 per cent of the outlet fluid is vapor\n", + "v2=(0.8*vv)+(.2*vl);\n", + "print\"\\t v2 : ft**3/lb \\t\",v2\n", + "vav=(WC*(v2-vl)/(UD*A))-((WC*(T2-ts)/(l*w))*(vv-vl))+vl;\n", + "print\"\\t vav : ft**3/lb \\t\",vav\n", + "print\"\\t By the approximate method \\t\"\n", + "vav1=(vl+v2)/(2);\n", + "print\"\\t vav : ft**3/lb \\t\",vav1\n", + "row=62.5;\n", + "rowac=(1/vav);\n", + "s=(rowac/row);\n", + "print\"\\t actual density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",s\n", + "rowap=(1/vav1);\n", + "s=(rowap/row);\n", + "print\"\\t approximate density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",round(s,4)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 pgno:464" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for preheat of butane is : Btu/hr \t2124200\n", + "\t total heat required for vapourisation of butane is : Btu/hr \t2172500\n", + "\t total heat required for butane is : Btu/hr \t4296700\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t4297328.0\n", + "\t Wp1 is : lb/hr \t13401.8927445\n", + "\t Wv1 is : lb/hr \t21092\n", + "\t W is : lb/hr \t34493.8927445\n", + "\t weighted delt is : % F \t124.582285677\n", + "\t caloric temperature of hot fluid is : F \t338\n", + "\t caloric temperature of cold fluid is : F \t171\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.15675\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t31132.3763955\n", + "\t reynolds number is : \t62178.9886688\n", + "\t hio is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,butane \t\n", + "\t preheating \t\n", + "\t flow area is : ft**2 \t0.105902777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t233232.786885\n", + "\t reynolds number is : \t69214.7658922\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t231.272727273\n", + "\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \t200.378071834\n", + "\t clean surface required for preheating : ft**2 \t66.883030772\n", + "\t for vapourisation \t\n", + "\t reynolds number is : \t79511.1773472\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t236.96969697\n", + "\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \t204.640614096\n", + "\t clean surface required for vapourisation : ft**2 \t103.069633088\n", + "\t total clean surface : ft**2 \t169.952663859\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t202.96313674\n", + "\t total surface area is : ft**2 \t318.3488\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.352513798\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00430213212754\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.16\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t preheating \t\n", + "\t length of preheat zone : ft \t6.29662676683\n", + "\t number of crosses are : \t15.1119042404\n", + "\t delPsp is : psi \t0.703032923143\n", + "\t vapourisation \t\n", + "\t number of crosses are : \t23.28\n", + "\t delPsv is : psi \t1.89396418309\n", + "\t delPS is : psi \t2.6\n", + "\t allowable delPa is 5 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=108; # inlet cold fluid,F\n", + "t2=235; # outlet cold fluid,F\n", + "Ts=338;\n", + "Wp=24700; # lb/hr\n", + "Wv=19750; # lb/hr\n", + "w=4880; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=162; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=248; # enthalpy at t2, Btu/lb, fig 9\n", + "qp=(Wp*(Ht2-Ht1)); # for preheat\n", + "print\"\\t total heat required for preheat of butane is : Btu/hr \\t\",qp\n", + "Ht3=358; # enthalpy of vapour at t2, Btu/lb, fig 9\n", + "qv=Wv*(Ht3-Ht2);\n", + "print\"\\t total heat required for vapourisation of butane is : Btu/hr \\t\",qv\n", + "Q=qp+qv;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=880.6; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "deltp=158.5; # F, from eq 5.14\n", + "deltv=103; # F eq 5.14\n", + "Wp1=(qp/deltp);\n", + "print\"\\t Wp1 is : lb/hr \\t\",Wp1\n", + "Wv1=(qv/deltv);\n", + "print\"\\t Wv1 is : lb/hr \\t\",Wv1\n", + "W=(Wp1+Wv1);\n", + "print\"\\t W is : lb/hr \\t\",W\n", + "delt=(Q/W);\n", + "print\"\\t weighted delt is : % F \\t\",delt\n", + "Tc=((Ts)+(Ts))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=76;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.594; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.0363; # at 338F, fig 15,lb/(ft)*(hr)\n", + "D=0.0725; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensing steam,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hio is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,butane \\t\"\n", + "print\"\\t preheating \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(Wp/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.278; # at 172F,lb/(ft)*(hr), from fig.14\n", + "De=0.0825; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=159; # from fig.28\n", + "Z=0.12; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hop=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hop\n", + "Up=((hio)*(hop)/(hio+hop)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \\t\",Up\n", + "Ap=(qp/(Up*deltp));\n", + "print\"\\t clean surface required for preheating : ft**2 \\t\",Ap\n", + "print\"\\t for vapourisation \\t\"\n", + "mu2=0.242; # at 172F,lb/(ft)*(hr), from fig.14\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=170; # from fig.28\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hov=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hov\n", + "Uv=((hio)*(hov)/(hio+hov)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \\t\",Uv\n", + "Av=(qv/(Uv*deltv));\n", + "print\"\\t clean surface required for vapourisation : ft**2 \\t\",Av\n", + "Ac=Ap+Av;\n", + "print\"\\t total clean surface : ft**2 \\t\",Ac\n", + "UC=((Up*Ap)+(Uv*Av))/(Ac);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# A total of 170 ft2 are required of which 103 are to be used for vaporization. For the total surface required 318 ft2 will be provided. It can be assumed, then, that the surface provided for vaporization is 193ft**2\n", + "# then flux is Q/A=10700, which is with in satisfactory levels.\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000165; # friction factor for reynolds number 62000, using fig.26\n", + "s=0.00413;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t preheating \\t\"\n", + "f=0.00145; # friction factor for reynolds number 69200, using fig.29\n", + "Lp=(L*Ap/Ac); #ft\n", + "print\"\\t length of preheat zone : ft \\t\",Lp\n", + "N=(12*Lp/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "s=0.5; # for reynolds number 69200,using fig.6\n", + "Ds=1.27; # fig 28\n", + "phys=1;\n", + "delPsp=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPsp is : psi \\t\",delPsp\n", + "print\"\\t vapourisation \\t\"\n", + "f=0.00142;\n", + "Lv=9.7; # Lv=L-Lp\n", + "Nv=(12*Lv/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",Nv\n", + "s=0.28; \n", + "delPsv=((f*(Gs**2)*(Ds)*(Nv))/(5.22*(10**10)*(De)*(s)*(1))); # using eq 12.47,psi\n", + "print\"\\t delPsv is : psi \\t\",delPsv\n", + "delPS=delPsp+delPsv;\n", + "print\"\\t delPS is : psi \\t\",round(delPS,2)\n", + "print\"\\t allowable delPa is 5 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3 pgno:475" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gasoline is : Btu/hr \t2669500\n", + "\t total heat required for gasoil is : Btu/hr \t2671900.0\n", + "\t S is : \t0.428571428571\n", + "\t Tc is : F \t517.0\n", + "\t hot fluid:inner tube side,gasoil \t\n", + "\t flow area is : ft**2 \t0.0429722222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t807498.383969\n", + "\t reynolds number is : \t86215.9813038\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t374.063400576\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t311.968876081\n", + "\t cold fluid:shell side,gasoline \t\n", + "\t tw is : F \t459.64414193\n", + "\t deltw : F \t59.6441419296\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t152.933697255\n", + "\t total surface area is : ft**2 \t213.6288\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t105.993294626\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00289577777619\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.73790740915\n", + "\t delPr is : psi \t3.04225352113\n", + "\t delPT is : psi \t5.8\n", + "\t allowable delPa is 10psi \t\n", + "\t delPs is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=400;\n", + "T1=575;\n", + "T2=475;\n", + "W=28100; # lb/hr\n", + "w=34700; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "HT1=290; # enthalpy at T1, Btu/lb, fig 11\n", + "HT2=385; # enthalpy at T2, Btu/lb, fig 11\n", + "Q=(W*(HT2-HT1)); # for preheat\n", + "print\"\\t total heat required for gasoline is : Btu/hr \\t\",Q\n", + "c=0.77; # Btu/(lb), table 7\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt=118; # F eq 5.14\n", + "S=75./175.;#((T2-ts)/(T1-ts));\n", + "print\"\\t S is : \\t\",S\n", + "Kc=0.37; # fig 17\n", + "Fc=0.42;\n", + "Tc=(T2+(0.42*(T1-T2)));\n", + "print\"\\t Tc is : F \\t\",Tc\n", + "print\"\\t hot fluid:inner tube side,gasoil \\t\"\n", + "Nt=68;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.65; # at 517F, fig 14,lb/(ft)*(hr)\n", + "D=0.0694; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=220; # from fig.24\n", + "Z=0.118; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #hi/phyt, Hi=()using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "# (mu1/muw)**(0.14) is negligible\n", + "print\"\\t cold fluid:shell side,gasoline \\t\"\n", + "ho=300; # assumption\n", + "tw=(ts)+(((Hio)/(Hio+ho))*(Tc-ts)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-ts);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, ho>300\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=12500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00015; # friction factor for reynolds number 85700, using fig.26\n", + "s=0.71;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.09; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10psi \\t\"\n", + "print\"\\t delPs is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4 pgno:482" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.4\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t qv is : Btu/hr \t3654000\n", + "\t qs is : Btu/hr \t539000\n", + "\t total heat required for naphtha is : Btu/hr \t4193000\n", + "\t total heat required for gasoil is : Btu/hr \t4207500.0\n", + "\t delt1 is : F \t85.0\n", + "\t delt2 is : F \t190.0\n", + "\t LMTD is : F \t130.683201952\n", + "\t R is : \t6.25\n", + "\t S is : \t0.0952380952381\n", + "\t FT is 0.97 \t\n", + "\t delt is : F \t126.762705893\n", + "\t ratio of two local temperature difference is : \t0.447368421053\n", + "\t caloric temperature of hot fluid is : F \t451.25\n", + "\t caloric temperature of cold fluid is : F \t323.2\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.0549791666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t927624.100038\n", + "\t reynolds number is : \t59146.6742685\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t343.251798561\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t286.272\n", + "\t cold fluid:shell side,naphtha \t\n", + "\t tw is : F \t398.584002369\n", + "\t deltw : F \t75.384002369\n", + "\t qv/hv : \t12180\n", + "\t qs/hs : \t8983\n", + "\t A : \t21163\n", + "\t ho : \t198.813967774\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t117.329454908\n", + "\t total surface area is : ft**2 \t364.4256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t91.0801518561\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00245633150105\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.24018227225\n", + "\t delPr is : psi \t4.82191780822\n", + "\t delPT is : psi \t10.1\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t flow area : in**2 \t131.70828125\n", + "\t wetted perimeter : in \t236.7325\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20992.3664122\n", + "\t reynolds number is : \t59146.6742685\n", + "\t delPs is : psi \t0.25\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.4\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=315.; # inlet cold fluid,F\n", + "t2=335.; # outlet cold fluid,F\n", + "T1=525.;\n", + "T2=400.;\n", + "Wv=29000; # lb/hr\n", + "Ws=38500; # lb/hr\n", + "w=51000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=238; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=252; # enthalpy at t2, Btu/lb, fig 9\n", + "Ht3=378; # enthalpy of vapour at t2 \n", + "qv=(Wv*(Ht3-Ht2)); # for preheat\n", + "print\"\\t qv is : Btu/hr \\t\",qv\n", + "qs=Ws*(Ht2-Ht1);\n", + "print\"\\t qs is : Btu/hr \\t\",qs\n", + "Q=qs+qv;\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "c=0.66; # Btu/(lb)(F)\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.97 \\t\" # from fig 18\n", + "delt=(0.97*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2)); # fig 17\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.41; # from fig.17\n", + "Kc=0.42;\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=116;\n", + "n=8; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=1.09; # at 451F, fig 14,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=168; # from fig.24\n", + "Z=0.142; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "print\"\\t cold fluid:shell side,naphtha \\t\"\n", + "ho1=200; # assumption\n", + "tw=(tc)+(((Hio)/(Hio+ho1))*(Tc-tc)); # from eq.5.31, calculation mistake\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-tc);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, hv>300, hs=60\n", + "Av=(qv/300);\n", + "As=qs/60;\n", + "print\"\\t qv/hv : \\t\",Av\n", + "print\"\\t qs/hs : \\t\",As\n", + "A1=As+Av;\n", + "print\"\\t A : \\t\",A1\n", + "ho=(Q/A1);\n", + "print\"\\t ho : \\t\",ho\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=11500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000168; # friction factor for reynolds number 59200, using fig.26\n", + "s=0.73;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.11; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "Af=(3.14*(21.25**2-(116))/8);\n", + "print\"\\t flow area : in**2 \\t\",Af\n", + "As=0.917; # ft**2\n", + "p=(3.14*21.25/2)+(3.14*1*116/2)+(21.25)\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=0.186; # ft\n", + "Gs=(Ws/(2*As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.435; # at 315F, fig 14,lb/(ft)*(hr)\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.00028; # using fig.26\n", + "row=0.337; # fig 13.14\n", + "# soutlet max=0.071,\n", + "s=0.35; # using fig.6\n", + "phys=1;\n", + "delPs=0.25 #((f*(Gs**2)*(L))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5 pgno:488" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.5\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for butane is : Btu/hr \t3957600\n", + "\t total heat required for steam is : Btu/hr \t3966760\n", + "\t trail 1 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t105.068772287\n", + "\t total surface area is : ft**2 \t342.3472\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t92.6956025929\n", + "\t vapour density : lb/ft**3 \t3.18723589714\n", + "\t weight flow of recirculated liquid : lb/hr \t163200\n", + "\t volume of liquid : ft**3 \t6071.04\n", + "\t volume of vapour : ft**3 \t17952.0\n", + "\t total volume out of reboiler : ft**3 \t24023.04\n", + "\t vo is : ft**3/lb \t0.11776\n", + "\t pressure leg : psi \t1.58756230188\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.228597222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t892399.295218\n", + "\t reynolds number is : \t190648.940342\n", + "\t delPt is : psi \t2.1\n", + "negilgable\n", + "\t total resisitance : psi \t3.69151627479\n", + "\t driving force : psi \t2.98611111111\n", + "\t trial 2 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t140.091696383\n", + "\t total surface area is : ft**2 \t355.6956\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.21695967\n", + "\t pressure leg : psi \t1.19067172641\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.316680555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t644182.272707\n", + "\t reynolds number is : \t137620.75826\n", + "\t delPt is : psi \t0.874030618788\n", + "\t total resisitance : psi \t2.0647023452\n", + "\t driving force : psi \t2.23958333333\n", + "\t hot fluid : shell side,steam \t\n", + "\t cold fluid:inner tube side, butane \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t734.042553191\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t248.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t212.814645309\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.006537030325\n" + ] + } + ], + "source": [ + "print\"\\t example 15.5\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "W=40800; # lb/hr\n", + "w=4570; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=241; # enthalpy of liquid at 228F, Btu/lb, fig 9\n", + "Ht2=338; # enthalpy of vapourat 228F, Btu/lb, fig 9\n", + "Q=(W*(Ht2-Ht1));\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "l=868; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt=125; # delt=LMTD, isothermal boiling, eq 5.14\n", + "# Tc and tc: Both streams are isuthermal\n", + "print\"\\t trail 1 \\t\"\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=109; # assuming one tube passes, 13.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# Assume 4: 1 recirculation ratio\n", + "rowv=(58/(359*(688/492)*(14.7/290))); # eq 15.18\n", + "print\"\\t vapour density : lb/ft**3 \\t\",rowv\n", + "Vv=0.44; \n", + "Vl=0.0372; # fig 6\n", + "W1=4*W;\n", + "print\"\\t weight flow of recirculated liquid : lb/hr \\t\",W1\n", + "VL=W1*Vl;\n", + "VV=W*Vv;\n", + "print\"\\t volume of liquid : ft**3 \\t\",VL\n", + "print\"\\t volume of vapour : ft**3 \\t\",VV\n", + "V=VL+VV;\n", + "print\"\\t total volume out of reboiler : ft**3 \\t\",V\n", + "vo=(V/(W1+W));\n", + "print\"\\t vo is : ft**3/lb \\t\",vo\n", + "Pl=((2.3*16)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=109;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000127; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "P=Pl+delPt;\n", + "print\"negilgable\"\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(16*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# The resistances are greater than the hydrostatic head can provide; hence the recirculation ratio will be less than 4: 1\n", + "print\"\\t trial 2 \\t\" # Assume 12'0\" tubes and 4:1 recirculation ratio\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=12;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=151; # assuming one tube passes, 15.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Pl=((2.3*12)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=151;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000135; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(12)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "P=Pl+delPt;\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(12*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# Since the driving force is slightly greater than the resistances, a recirculation ratio better than 4:1 is assured.\n", + "print\"\\t hot fluid : shell side,steam \\t\"\n", + "ho=1500; # condensing steam\n", + "print\"\\t cold fluid:inner tube side, butane \\t\"\n", + "jH=330; # from fig.24\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((300)*(0.62/0.75)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "UD=89;\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6 pgno492" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.6\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat duty : Btu/hr \t5799016.0\n", + "\t total heat duty : lb/hr \t37902.0\n" + ] + } + ], + "source": [ + "print\"\\t example 15.6\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#20000=WD+WB;\n", + "#0.99*WD+(0.05*WB)=(20000*.5);\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "HBl=108; # fig 3 and 12\n", + "HDl=85.8; #fig 3 and 12\n", + "HDv=253.8; # fig 3 and 12\n", + "HFl=92; # fig 3 and 12\n", + "l=153; # fig 3 and 12\n", + "QR=((2.54+1)*WD*(HDv))-(2.54*WD*HDl)+(WB*HBl)-(20000*HFl);\n", + "print\"\\t total heat duty : Btu/hr \\t\",round(QR)\n", + "Q=QR/153;\n", + "print\"\\t total heat duty : lb/hr \\t\",round(Q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7 pgno:502" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\ttotal Lb/hr is \t20000\n", + "\ttotal Mol/hr is \t235.5\n", + "\tx1 of C6H6 is \t0.543524416136\n", + "\tx1 of C7H8 is \t0.456475583864\n", + "\tTotal x1 is \t1.0\n", + "\tx1Pp1 of C6H6 is \t750.063694268\n", + "\tx1Pp1 of C7H8 is \t262.473460722\n", + "\tTotal x1Pp1 is \t1012.53715499\n", + "\ty1 of C6H6 is \t0.740776464914\n", + "\ty1 of C7H8 is \t0.259223535086\n", + "\tTotal y1 is \t1.0\n", + "\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\t0.558\n", + "\tWR` = %.2f (mol reflux)/(mol distillate)\t1.27\n", + "\tAssumed 200 percent of the theoretical minimum reflux as economic\t\tWR = (mol)/(mil distillate)\t2.54\n", + "\tThe intercept for the upper operating line = \t0.280225988701\n", + "\tConnecting the corresponding line in Fig. 15.23, plates required: \t13\n", + "\tFeed plate is th(from top)\t7\n", + "\tTotal reflux is \t311.15\n", + "\t\t\t\t\tHeat balances\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\tHeat balance \t\taround condenser:\t\n", + "\t Heat in:\t\t Top plate vapor.......433\t87.3\t\t195\t%.1f\t\t33900 253.8 8603820.0\n", + "\t Heat out:\t\t Distillate............\n", + "122.5\t78.3\t\t195\t\t\t9570 85.8 821106.0\n", + "\t Reflux................\n", + "310.5\t78.3\t\t195\t\t\t24330 85.8 2087514.0\n", + "\t Condenser duty, by\t\t difference........... ..... .... ...... ..\n", + ". ..... 5688000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t8600000\t\t\n", + "\tReboiler vapor is lb/hr\t37908\n", + "\tTrapout is lb/hr\t48338\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\n", + "\tHeat in:\t\t Trapout...............522\t92.8\t\t246\t108.0\t5230000\t48338\n", + "\t Reboiler duty, \t\t by difference....... .... .... ..... ... ..... 5800000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t11030000\t\t\n", + "\t\tReboiler requirements are\t\n", + "\t\tTotal liquid to reboiler\t48330 lb/hr\t\t\tVaporization\t\t\t37900 lb/hr\t\t\tTemperature(nearly isothermal)\t246DegF\t\t\tPressure\t\t\t5 psig\t\t\tHeat load\t\t\t5800000 Btu/hr\t\n", + "total heat out is btu/hr 7640000\n" + ] + } + ], + "source": [ + "print\"\\t example 15.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "#Basis: One hour\n", + "#20000=WD+WB , material balance\n", + "#0.99*WD+(0.05*WB)=(20000*0.5) , Benzene balance\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "\n", + "#Compositions and Boiling Points\n", + "#Feed\n", + "l1 = 10000; #Lb/hr , C6H4\n", + "l2 = 10000; #Lb/hr , C7H8\n", + "lb = l1+l2; #Lb/hr\n", + "print\"\\ttotal Lb/hr is \\t\",lb\n", + "mo1 = 78.1; #Mol. wt., C6H6\n", + "mo2 = 93.1; #Mol. wt , C7H8\n", + "mh1 = 128.0; #Mol/hr , C6H6\n", + "mh2 = 107.5; #Mol/hr , C7H8\n", + "mh = mh1 + mh2; # Mol/hr\n", + "print\"\\ttotal Mol/hr is \\t\",mh\n", + "x1 = mh1/mh;\n", + "print\"\\tx1 of C6H6 is \\t\",x1\n", + "x2 = mh2/mh;\n", + "print\"\\tx1 of C7H8 is \\t\",x2\n", + "x = x1+x2;\n", + "print\"\\tTotal x1 is \\t\",x\n", + "Pp1= 1380; # 214Deg F\n", + "Pp2=575; # 214Deg F\n", + "xp1 = x1*Pp1;\n", + "print\"\\tx1Pp1 of C6H6 is \\t\",xp1\n", + "xp2 = x2*Pp2;\n", + "print\"\\tx1Pp1 of C7H8 is \\t\",xp2\n", + "sxp = xp1 + xp2;\n", + "print\"\\tTotal x1Pp1 is \\t\",sxp\n", + "y1 = xp1/sxp;\n", + "print\"\\ty1 of C6H6 is \\t\",y1\n", + "y2 = xp2/sxp;\n", + "print\"\\ty1 of C7H8 is \\t\",y2\n", + "y = y1+y2;\n", + "print\"\\tTotal y1 is \\t\",y\n", + "\n", + "\n", + "w1 = 0.558; #from eq 15.42\n", + "print\"\\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\\t\",w1\n", + "wD=1;\n", + "xD = 0.992;\n", + "#V = WR' + WD\n", + "# WR'/V = 0.558\n", + "#Solving, WR' = (WR' * 0.558) + (0.558 * WD)\n", + "Wr = 1.27; # mol reflux/mol distillate\n", + "print\"\\tWR` = %.2f (mol reflux)/(mol distillate)\\t\",Wr\n", + "Wr1 = Wr * 2; # mol/ mol distillate\n", + "print\"\\tAssumed 200 percent of the theoretical minimum reflux as economic\\t\\tWR = (mol)/(mil distillate)\\t\",Wr1\n", + "In = (wD * xD)/(Wr1 + 1); #intercept for the upper operating line\n", + "print\"\\tThe intercept for the upper operating line = \\t\",In\n", + "p = 13; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tConnecting the corresponding line in Fig. 15.23, plates required: \\t\",p\n", + "fp = 7; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tFeed plate is th(from top)\\t\",fp\n", + "d=122.5;\n", + "tf = Wr1 * d;\n", + "print\"\\tTotal reflux is \\t\",tf\n", + "print\"\\t\\t\\t\\t\\tHeat balances\"\n", + "\n", + "#Heat Balances\n", + "l1 = 33900;\n", + "l2 = 9570;\n", + "l3 = 24330;\n", + "b1 = 253.8;\n", + "b2 = 85.8;\n", + "b3 = 85.8;\n", + "bt1 = b1*l1;\n", + "bt2 = b2*l2;\n", + "bt3 = b3*l3;\n", + "bt4 = 5688000;\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\\tHeat balance \\t\\taround condenser:\\t\"\n", + "print\"\\t Heat in:\\t\\t Top plate vapor.......433\\t87.3\\t\\t195\\t%.1f\\t\\t\",l1,b1,bt1\n", + "print\"\\t Heat out:\\t\\t Distillate............\"\n", + "print\"122.5\\t78.3\\t\\t195\\t\\t\\t\",l2,b2,bt2\n", + "print\"\\t Reflux................\"\n", + "print\"310.5\\t78.3\\t\\t195\\t\\t\\t\",l3,b3,bt3\n", + "print\"\\t Condenser duty, by\\t\\t difference........... ..... .... ...... ..\"\n", + "print\". ..... 5688000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t8600000\\t\\t\"\n", + "tho=7640000;\n", + "\n", + "lam = 153; # At 246 DegF, Btu/hr\n", + "rv = 5800000/153; #Lb/hr\n", + "print\"\\tReboiler vapor is lb/hr\\t\",rv\n", + "to = rv + 10430; #Lb/hr\n", + "print\"\\tTrapout is lb/hr\\t\",to\n", + "\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\"\n", + "print\"\\tHeat in:\\t\\t Trapout...............522\\t92.8\\t\\t246\\t108.0\\t5230000\\t\",to\n", + "print\"\\t Reboiler duty, \\t\\t by difference....... .... .... ..... ... ..... 5800000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t11030000\\t\\t\"\n", + "print\"\\t\\tReboiler requirements are\\t\"\n", + "print\"\\t\\tTotal liquid to reboiler\\t48330 lb/hr\\t\\t\\tVaporization\\t\\t\\t37900 lb/hr\\t\\t\\tTemperature(nearly isothermal)\\t246DegF\\t\\t\\tPressure\\t\\t\\t5 psig\\t\\t\\tHeat load\\t\\t\\t5800000 Btu/hr\\t\"\n", + "print\"total heat out is btu/hr\",tho \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\n", + "\t\tDEW POINT OF OVERHEAD\n", + "\n", + "\t\tMol/hr\t\tK(148DegF,40 psia)\tV/K\n", + "\n", + "\t\t--------------------------------------------\n", + "\n", + "[ 6.4 219.7 2.3] [ 2.8 1.01 0.34] [ 17 221 74]\n", + "\n", + "\t\tBUBBLE POINTS OF BOTTOMS\n", + "\n", + "\t\tMol/hr\t\tK(330DegF,40psia)\t\tKL\t\tLb/hr\n", + "\n", + "\t\t--------------------------------------------------------------\n", + "\n", + "4.1 5.8 23.8 1700\n", + "49.3 3.0 148.0 13900\n", + "71.9 1.68 120.0 13030\n", + "52.5 0.98 51.4 6260\n", + "54.7 0.57 31.2 4240\n", + "82.5 0.35 28.9 4330\n", + "76.6 0.21 16.1 2640\n", + "22.4 0.13 2.9 520\n", + "\t\t____\t\t\t\t\t____\t\t____\n", + "\n", + "\t\t[ 4 53 124 176 230 312 388 410]\n", + "\t\t\t\t\t[23.800000000000001, 171.80000000000001, 291.80000000000001, 343.19999999999999, 374.39999999999998, 403.29999999999995, 419.39999999999998, 422.29999999999995]\n", + "\t\t[ 1700 13900 13030 6260 4240 4330 2640 520]\n", + "\tAverage mol. wt. \n", + "[ 71.42857143 80.9080326 44.65387252 18.24009324 11.32478632\n", + " 10.7364245 6.29470672 1.23135212]\n", + "\n", + "\n", + "\t\t\t\t\t\tHEAT BALANCES:\n", + "\n", + "\t\t\t\tMol/hr\t\tMol.wt.\t\tLb/hr\t\tTemp,DegF\t\tBtu/lb\t\tBtu/hr\n", + "\t\n", + "\t\t\t----------------------------------------------------------------------------------------\n", + "\n", + "\tHeat Balance onCondeser\n", + "\t Heat in:\n", + "\t Top plate vapor......\n", + "\n", + "\n", + "\t\tCALCULATION OF BOTTOM PLATE TEMPERATURE\n", + "\n", + "\t\ty*\t\t\tReboiler vapor\t\t\t\tK(300DegF,40psia)\tMol*K\n", + "\t\t\t\tV = y*205.7 +\tBottoms\t=\tTrapout\n", + "\n", + "\t\t----------------------------------------------------------------------------------------\n", + "\n", + "CALCULATION OF BOTTOM PLATE TEMPERATURE\n", + " y* Reboiler vapor K(300DegF,40psia) Mol*K\n", + " V = y*205.7 + Bottoms = Trapout\n", + " ----------------------------------------------------------------------------------------\n", + "C5 0.056 11.5 4.1 15.6 4.5 70.29\n", + "C6 0.35 72.0 49.3 121.3 2.25 272.91\n", + "C7 0.285 58.6 71.9 130.5 1.2 156.63\n", + "C8 0.122 25.1 52.5 77.6 0.66 51.21\n", + "C9 0.074 15.2 54.7 69.9 0.38 26.57\n", + "C10 0.068 14.0 82.5 96.5 0.22 21.23\n", + "C11 0.038 7.8 76.6 84.4 0.13 10.97\n", + "C12 0.007 1.4 22.4 23.8 0.07 1.67\n", + "----------------------------------------------------------------------------------------\n", + "1.000 205.7 414.0 619.7 611.5\n", + "Reboiler requirements are\n", + " Vaporization lb/hr 22700\n", + " Total liquor to reboiler lb/hr 78177\n", + " Heat load Btu/hr 4280000\n", + " Temperature range 300-330 def F\n", + " Operating pressure psi 40\n" + ] + } + ], + "source": [ + "print\"\\t example 15.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Dew point of Overhead\n", + "import numpy\n", + "vc=numpy.array([6.4, 219.7, 2.3])\n", + "#vc(1) = 6.4; # Mol/hr\n", + "#vc(2) = 219.7; #Mol/hr\n", + "#vc(3) = 2.3; #Mol/hr\n", + "K=numpy.array([2.8, 1.01, 0.34])\n", + "#K(1) = 2.8; #at 148DegF and 40 psia\n", + "#K(2) = 1.01; #at 148DegF and 40 psia\n", + "#K(3) = 0.34; #at 148DegF and 40 psia\n", + "v=numpy.array([0, 0, 0])\n", + "i=0;\n", + "while (i<3):\n", + " v[0]=vc[0]*K[0];\n", + " v[1]=vc[1]*K[1];\n", + " v[2]=vc[1]*K[2];\n", + " i=i+1;\n", + "\n", + "\n", + "print\"\\n\\t\\tDEW POINT OF OVERHEAD\"\n", + "print\"\\n\\t\\tMol/hr\\t\\tK(148DegF,40 psia)\\tV/K\\n\"\n", + "print\"\\t\\t--------------------------------------------\\n\"\n", + "\n", + "\n", + "print vc,K,v\n", + "\n", + "bc=numpy.array([4.1, 49.3, 71.9, 52.5, 54.7, 82.5, 76.6, 22.4])\n", + "#bc(1)=4.1; #Mol/hr\n", + "#bc(2)=49.3; #Mol/hr\n", + "#c(3)=71.9; #Mol/hr\n", + "#bc(4)=52.5; #Mol/hr\n", + "#bc(5)=54.7; #Mol/hr\n", + "#bc(6)=82.5; #Mol/hr\n", + "#bc(7)=76.6; #Mol/hr\n", + "#bc(8)=22.4; #Mol/hr\n", + "tbc=numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "tbc[0]=tbc[0]+bc[0];\n", + "i=1\n", + "while (i<8):\n", + " tbc[i]=tbc[i-1]+bc[i];\n", + " i=i+1;\n", + "\n", + "\n", + "bK=numpy.array([5.8, 3.0, 1.68, 0.98, 0.57, 0.35, 0.21, 0.13])\n", + "#bK(1)=5.8; #at 330DegF, 40 psia\n", + "#bK(2)=3.0; #at 330DegF, 40 psia\n", + "#bK(3)=1.68; #at 330DegF, 40 psia\n", + "#bK(4)=0.98; #at 330DegF, 40 psia\n", + "#bK(5)=0.57; #at 330DegF, 40 psia\n", + "#bK(6)=0.35; #at 330DegF, 40 psia\n", + "#bK(7)=0.21; #at 330DegF, 40 psia\n", + "#bK(8)=0.13; #at 330DegF, 40 psia\n", + "\n", + "KL=numpy.array([23.8, 148.0, 120.0, 51.4, 31.2, 28.9, 16.1, 2.9])\n", + "\n", + "#KL(1)=23.8;\n", + "#KL(2)=148.0;\n", + "#KL(3)=120.8;\n", + "#KL(4)=51.4;\n", + "#KL(5)=31.2;\n", + "#KL(6)=28.9;\n", + "#KL(7)=16.1;\n", + "#KL(8)=2.9;\n", + "\n", + "tk=([0, 0, 0, 0, 0, 0, 0, 0])\n", + "i=1;\n", + "op=40;\n", + "tk[0]=KL[0]\n", + "while (i<8):\n", + " tk[i]=tk[i-1]+KL[i];\n", + " i=i+1;\n", + "\n", + "l=numpy.array([1700, 13900, 13030, 6260, 4240, 4330, 2640, 520]) \n", + "#l(1)=1700; #Lb/hr\n", + "#l(2)=13900; #Lb/hr\n", + "#l(3)=13030; #Lb/hr\n", + "#l(4)=6260; #Lb/hr\n", + "#l(5)=4240; #Lb/hr\n", + "#l(6)=4330; #Lb/hr\n", + "#l(7)=2640; #Lb/hr\n", + "#l(8)=520; #Lb/hr\n", + "\n", + "tl=numpy.array([0, 0, 0, 0, 0, 0, 0, 0,])\n", + "\n", + "i=0;\n", + "while (i<8):\n", + " tl[i]=tl[i]+l[i];\n", + " i=i+1;\n", + "\n", + "print\"\\n\\t\\tBUBBLE POINTS OF BOTTOMS\\n\"\n", + "print\"\\t\\tMol/hr\\t\\tK(330DegF,40psia)\\t\\tKL\\t\\tLb/hr\\n\"\n", + "print\"\\t\\t--------------------------------------------------------------\\n\"\n", + "tlr=78177;\n", + "i=0;\n", + "while (i<8):\n", + "\n", + " print bc[i],bK[i],KL[i],l[i]\n", + " i=i+1;\n", + "\n", + "print\"\\t\\t____\\t\\t\\t\\t\\t____\\t\\t____\\n\"\n", + "\n", + "print\"\\t\\t\",tbc \n", + "print\"\\t\\t\\t\\t\\t\",tk \n", + "print\"\\t\\t\",tl\n", + "av = numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "av=tl/tk\n", + "hl=4280000;\n", + "print\"\\tAverage mol. wt. \\n\",av\n", + "\n", + "lh=numpy.array([48894, 16298, 32596])\n", + "bl=numpy.array([286, 129, 129])\n", + "#lh(1)=48894;#Lb/hr\n", + "#lh(2)=16298;#Lb/hr\n", + "#lh(3)=32596;#Lb/hr\n", + "#bl(1)=286;#Btu/hr\n", + "#bl(2)=129;#Btu/hr\n", + "#bl(3)=129;#Btu/hr\n", + "\n", + "bh=numpy.array([0, 0, 0])\n", + "vap=22700;\n", + "i=0;\n", + "\n", + "while (i<3):\n", + " bh[0]=lh[0]*bl[0];\n", + " i=i+1;\n", + "\n", + "#Heat Balances\n", + "print\"\\n\\n\\t\\t\\t\\t\\t\\tHEAT BALANCES:\"\n", + "print\"\\n\\t\\t\\t\\tMol/hr\\t\\tMol.wt.\\t\\tLb/hr\\t\\tTemp,DegF\\t\\tBtu/lb\\t\\tBtu/hr\\n\\t\"\n", + "print\"\\t\\t\\t----------------------------------------------------------------------------------------\"\n", + "print\"\\n\\tHeat Balance onCondeser\\n\\t Heat in:\\n\\t Top plate vapor......\"\n", + "\n", + "#Heat Balances on reboiler\n", + "#Assume 30Deg difference between reboiler and bottom plate giving bottom-plate temperature of 300DegF\n", + "#Mol/hr from Eq. 15.47\n", + "\n", + "pc=numpy.array([0.056, 0.35, 0.285, 0.122, 0.074, 0.068, 0.038, 0.007])\n", + "#pc(1)=0.056;\n", + "#pc(2)=0.350;\n", + "##pc(3)=0.285;\n", + "#pc(4)=0.122;\n", + "#pc(5)=0.074;\n", + "#pc(6)=0.068;\n", + "#pc(7)=0.038;\n", + "#pc(8)=0.007;\n", + "\n", + "pk=numpy.array([4.5, 2.25, 1.2, 0.66, 0.38, 0.22, 0.13, 0.07])\n", + "#pK(1)=4.5;\n", + "#pK(2)=2.25;\n", + "#pK(3)=1.20;\n", + "#pK(4)=0.66;\n", + "#pK(5)=0.38;\n", + "#pK(6)=0.22;\n", + "#pK(7)=0.13;\n", + "#pK(8)=0.07;\n", + "\n", + "print\"\\n\\n\\t\\tCALCULATION OF BOTTOM PLATE TEMPERATURE\\n\"\n", + "print\"\\t\\ty*\\t\\t\\tReboiler vapor\\t\\t\\t\\tK(300DegF,40psia)\\tMol*K\\n\\t\\t\\t\\tV = y*205.7 +\\tBottoms\\t=\\tTrapout\\n\"\n", + "print\"\\t\\t----------------------------------------------------------------------------------------\\n\"\n", + "\n", + "\n", + "print \"CALCULATION OF BOTTOM PLATE TEMPERATURE\"\n", + "print\" y* Reboiler vapor K(300DegF,40psia) Mol*K\"\n", + "print\" V = y*205.7 + Bottoms = Trapout\"\n", + "print\" ----------------------------------------------------------------------------------------\"\n", + "print \"C5 0.056 11.5 4.1 15.6 4.5 70.29\"\n", + "print \"C6 0.35 72.0 49.3 121.3 2.25 272.91\"\n", + "print \"C7 0.285 58.6 71.9 130.5 1.2 156.63\"\n", + "print \"C8 0.122 25.1 52.5 77.6 0.66 51.21\"\n", + "print \"C9 0.074 15.2 54.7 69.9 0.38 26.57\"\n", + "print \"C10 0.068 14.0 82.5 96.5 0.22 21.23\"\n", + "print \"C11 0.038 7.8 76.6 84.4 0.13 10.97\"\n", + "print \"C12 0.007 1.4 22.4 23.8 0.07 1.67\"\n", + "print \"----------------------------------------------------------------------------------------\"\n", + "print \"1.000 205.7 414.0 619.7 611.5\"\n", + "\n", + "\n", + "print\"Reboiler requirements are\"\n", + "print\" Vaporization lb/hr\",vap\n", + "print\" Total liquor to reboiler lb/hr\",tlr \n", + "print\" Heat load Btu/hr\",hl\n", + "print\" Temperature range 300-330 def F\"\n", + "print\" Operating pressure psi\",op " + ] + } + ], + "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/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 new file mode 100644 index 00000000..d185cf80 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_2.ipynb @@ -0,0 +1,1315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Vaporizers Evapourators and Reboilers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat required for steam is : Btu/hr \t9453000.0\n", + "\t total heat required for kerosene is : Btu/hr \t9450000.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t91.1262293169\n", + "\t A : ft**2 \t1037.02304713\n", + "\t By the law of mixtures \t\n", + "\t v2 : %.0f ft**3/lb \t11.0034\n", + "\t vav : ft**3/lb \t3.16417120715\n", + "\t By the approximate method \t\n", + "\t vav : ft**3/lb \t5.5102\n", + "\t actual density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.00505661639416\n", + "\t approximate density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.0029\n" + ] + } + ], + "source": [ + "print\"\\t example 15.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=250;\n", + "T1=400;\n", + "T2=300;\n", + "w=10000; # lb/hr\n", + "W=150000; # lb/hr\n", + "l=945.3; # Btu/(lb) , table 7\n", + "from math import log10\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "C=0.63; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "delt1=T2-ts; #F\n", + "delt2=T1-ts; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "UD=100;\n", + "A=(Q/(UD*LMTD));\n", + "print\"\\t A : ft**2 \\t\",A\n", + "WC=94500; # Btu/F\n", + "vl=0.017; # ft**3/lb, from table 7\n", + "vv=13.75; # ft**3/lb, from table 7\n", + "print\"\\t By the law of mixtures \\t\"\n", + "# Assume 80 per cent of the outlet fluid is vapor\n", + "v2=(0.8*vv)+(.2*vl);\n", + "print\"\\t v2 : ft**3/lb \\t\",v2\n", + "vav=(WC*(v2-vl)/(UD*A))-((WC*(T2-ts)/(l*w))*(vv-vl))+vl;\n", + "print\"\\t vav : ft**3/lb \\t\",vav\n", + "print\"\\t By the approximate method \\t\"\n", + "vav1=(vl+v2)/(2);\n", + "print\"\\t vav : ft**3/lb \\t\",vav1\n", + "row=62.5;\n", + "rowac=(1/vav);\n", + "s=(rowac/row);\n", + "print\"\\t actual density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",s\n", + "rowap=(1/vav1);\n", + "s=(rowap/row);\n", + "print\"\\t approximate density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",round(s,4)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 pgno:464" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for preheat of butane is : Btu/hr \t2124200\n", + "\t total heat required for vapourisation of butane is : Btu/hr \t2172500\n", + "\t total heat required for butane is : Btu/hr \t4296700\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t4297328.0\n", + "\t Wp1 is : lb/hr \t13401.8927445\n", + "\t Wv1 is : lb/hr \t21092\n", + "\t W is : lb/hr \t34493.8927445\n", + "\t weighted delt is : % F \t124.582285677\n", + "\t caloric temperature of hot fluid is : F \t338\n", + "\t caloric temperature of cold fluid is : F \t171\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.15675\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t31132.3763955\n", + "\t reynolds number is : \t62178.9886688\n", + "\t hio is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,butane \t\n", + "\t preheating \t\n", + "\t flow area is : ft**2 \t0.105902777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t233232.786885\n", + "\t reynolds number is : \t69214.7658922\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t231.272727273\n", + "\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \t200.378071834\n", + "\t clean surface required for preheating : ft**2 \t66.883030772\n", + "\t for vapourisation \t\n", + "\t reynolds number is : \t79511.1773472\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t236.96969697\n", + "\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \t204.640614096\n", + "\t clean surface required for vapourisation : ft**2 \t103.069633088\n", + "\t total clean surface : ft**2 \t169.952663859\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t202.96313674\n", + "\t total surface area is : ft**2 \t318.3488\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.352513798\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00430213212754\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.16\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t preheating \t\n", + "\t length of preheat zone : ft \t6.29662676683\n", + "\t number of crosses are : \t15.1119042404\n", + "\t delPsp is : psi \t0.703032923143\n", + "\t vapourisation \t\n", + "\t number of crosses are : \t23.28\n", + "\t delPsv is : psi \t1.89396418309\n", + "\t delPS is : psi \t2.6\n", + "\t allowable delPa is 5 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=108; # inlet cold fluid,F\n", + "t2=235; # outlet cold fluid,F\n", + "Ts=338;\n", + "Wp=24700; # lb/hr\n", + "Wv=19750; # lb/hr\n", + "w=4880; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=162; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=248; # enthalpy at t2, Btu/lb, fig 9\n", + "qp=(Wp*(Ht2-Ht1)); # for preheat\n", + "print\"\\t total heat required for preheat of butane is : Btu/hr \\t\",qp\n", + "Ht3=358; # enthalpy of vapour at t2, Btu/lb, fig 9\n", + "qv=Wv*(Ht3-Ht2);\n", + "print\"\\t total heat required for vapourisation of butane is : Btu/hr \\t\",qv\n", + "Q=qp+qv;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=880.6; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "deltp=158.5; # F, from eq 5.14\n", + "deltv=103; # F eq 5.14\n", + "Wp1=(qp/deltp);\n", + "print\"\\t Wp1 is : lb/hr \\t\",Wp1\n", + "Wv1=(qv/deltv);\n", + "print\"\\t Wv1 is : lb/hr \\t\",Wv1\n", + "W=(Wp1+Wv1);\n", + "print\"\\t W is : lb/hr \\t\",W\n", + "delt=(Q/W);\n", + "print\"\\t weighted delt is : % F \\t\",delt\n", + "Tc=((Ts)+(Ts))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=76;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.594; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.0363; # at 338F, fig 15,lb/(ft)*(hr)\n", + "D=0.0725; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensing steam,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hio is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,butane \\t\"\n", + "print\"\\t preheating \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(Wp/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.278; # at 172F,lb/(ft)*(hr), from fig.14\n", + "De=0.0825; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=159; # from fig.28\n", + "Z=0.12; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hop=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hop\n", + "Up=((hio)*(hop)/(hio+hop)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \\t\",Up\n", + "Ap=(qp/(Up*deltp));\n", + "print\"\\t clean surface required for preheating : ft**2 \\t\",Ap\n", + "print\"\\t for vapourisation \\t\"\n", + "mu2=0.242; # at 172F,lb/(ft)*(hr), from fig.14\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=170; # from fig.28\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hov=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hov\n", + "Uv=((hio)*(hov)/(hio+hov)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \\t\",Uv\n", + "Av=(qv/(Uv*deltv));\n", + "print\"\\t clean surface required for vapourisation : ft**2 \\t\",Av\n", + "Ac=Ap+Av;\n", + "print\"\\t total clean surface : ft**2 \\t\",Ac\n", + "UC=((Up*Ap)+(Uv*Av))/(Ac);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# A total of 170 ft2 are required of which 103 are to be used for vaporization. For the total surface required 318 ft2 will be provided. It can be assumed, then, that the surface provided for vaporization is 193ft**2\n", + "# then flux is Q/A=10700, which is with in satisfactory levels.\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000165; # friction factor for reynolds number 62000, using fig.26\n", + "s=0.00413;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t preheating \\t\"\n", + "f=0.00145; # friction factor for reynolds number 69200, using fig.29\n", + "Lp=(L*Ap/Ac); #ft\n", + "print\"\\t length of preheat zone : ft \\t\",Lp\n", + "N=(12*Lp/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "s=0.5; # for reynolds number 69200,using fig.6\n", + "Ds=1.27; # fig 28\n", + "phys=1;\n", + "delPsp=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPsp is : psi \\t\",delPsp\n", + "print\"\\t vapourisation \\t\"\n", + "f=0.00142;\n", + "Lv=9.7; # Lv=L-Lp\n", + "Nv=(12*Lv/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",Nv\n", + "s=0.28; \n", + "delPsv=((f*(Gs**2)*(Ds)*(Nv))/(5.22*(10**10)*(De)*(s)*(1))); # using eq 12.47,psi\n", + "print\"\\t delPsv is : psi \\t\",delPsv\n", + "delPS=delPsp+delPsv;\n", + "print\"\\t delPS is : psi \\t\",round(delPS,2)\n", + "print\"\\t allowable delPa is 5 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3 pgno:475" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gasoline is : Btu/hr \t2669500\n", + "\t total heat required for gasoil is : Btu/hr \t2671900.0\n", + "\t S is : \t0.428571428571\n", + "\t Tc is : F \t517.0\n", + "\t hot fluid:inner tube side,gasoil \t\n", + "\t flow area is : ft**2 \t0.0429722222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t807498.383969\n", + "\t reynolds number is : \t86215.9813038\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t374.063400576\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t311.968876081\n", + "\t cold fluid:shell side,gasoline \t\n", + "\t tw is : F \t459.64414193\n", + "\t deltw : F \t59.6441419296\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t152.933697255\n", + "\t total surface area is : ft**2 \t213.6288\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t105.993294626\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00289577777619\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.73790740915\n", + "\t delPr is : psi \t3.04225352113\n", + "\t delPT is : psi \t5.8\n", + "\t allowable delPa is 10psi \t\n", + "\t delPs is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=400;\n", + "T1=575;\n", + "T2=475;\n", + "W=28100; # lb/hr\n", + "w=34700; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "HT1=290; # enthalpy at T1, Btu/lb, fig 11\n", + "HT2=385; # enthalpy at T2, Btu/lb, fig 11\n", + "Q=(W*(HT2-HT1)); # for preheat\n", + "print\"\\t total heat required for gasoline is : Btu/hr \\t\",Q\n", + "c=0.77; # Btu/(lb), table 7\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt=118; # F eq 5.14\n", + "S=75./175.;#((T2-ts)/(T1-ts));\n", + "print\"\\t S is : \\t\",S\n", + "Kc=0.37; # fig 17\n", + "Fc=0.42;\n", + "Tc=(T2+(0.42*(T1-T2)));\n", + "print\"\\t Tc is : F \\t\",Tc\n", + "print\"\\t hot fluid:inner tube side,gasoil \\t\"\n", + "Nt=68;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.65; # at 517F, fig 14,lb/(ft)*(hr)\n", + "D=0.0694; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=220; # from fig.24\n", + "Z=0.118; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #hi/phyt, Hi=()using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "# (mu1/muw)**(0.14) is negligible\n", + "print\"\\t cold fluid:shell side,gasoline \\t\"\n", + "ho=300; # assumption\n", + "tw=(ts)+(((Hio)/(Hio+ho))*(Tc-ts)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-ts);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, ho>300\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=12500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00015; # friction factor for reynolds number 85700, using fig.26\n", + "s=0.71;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.09; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10psi \\t\"\n", + "print\"\\t delPs is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4 pgno:482" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.4\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t qv is : Btu/hr \t3654000\n", + "\t qs is : Btu/hr \t539000\n", + "\t total heat required for naphtha is : Btu/hr \t4193000\n", + "\t total heat required for gasoil is : Btu/hr \t4207500.0\n", + "\t delt1 is : F \t85.0\n", + "\t delt2 is : F \t190.0\n", + "\t LMTD is : F \t130.683201952\n", + "\t R is : \t6.25\n", + "\t S is : \t0.0952380952381\n", + "\t FT is 0.97 \t\n", + "\t delt is : F \t126.762705893\n", + "\t ratio of two local temperature difference is : \t0.447368421053\n", + "\t caloric temperature of hot fluid is : F \t451.25\n", + "\t caloric temperature of cold fluid is : F \t323.2\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.0549791666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t927624.100038\n", + "\t reynolds number is : \t59146.6742685\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t343.251798561\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t286.272\n", + "\t cold fluid:shell side,naphtha \t\n", + "\t tw is : F \t398.584002369\n", + "\t deltw : F \t75.384002369\n", + "\t qv/hv : \t12180\n", + "\t qs/hs : \t8983\n", + "\t A : \t21163\n", + "\t ho : \t198.813967774\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t117.329454908\n", + "\t total surface area is : ft**2 \t364.4256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t91.0801518561\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00245633150105\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.24018227225\n", + "\t delPr is : psi \t4.82191780822\n", + "\t delPT is : psi \t10.1\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t flow area : in**2 \t131.70828125\n", + "\t wetted perimeter : in \t236.7325\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20992.3664122\n", + "\t reynolds number is : \t59146.6742685\n", + "\t delPs is : psi \t0.25\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.4\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=315.; # inlet cold fluid,F\n", + "t2=335.; # outlet cold fluid,F\n", + "T1=525.;\n", + "T2=400.;\n", + "Wv=29000; # lb/hr\n", + "Ws=38500; # lb/hr\n", + "w=51000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=238; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=252; # enthalpy at t2, Btu/lb, fig 9\n", + "Ht3=378; # enthalpy of vapour at t2 \n", + "qv=(Wv*(Ht3-Ht2)); # for preheat\n", + "print\"\\t qv is : Btu/hr \\t\",qv\n", + "qs=Ws*(Ht2-Ht1);\n", + "print\"\\t qs is : Btu/hr \\t\",qs\n", + "Q=qs+qv;\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "c=0.66; # Btu/(lb)(F)\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.97 \\t\" # from fig 18\n", + "delt=(0.97*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2)); # fig 17\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.41; # from fig.17\n", + "Kc=0.42;\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=116;\n", + "n=8; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=1.09; # at 451F, fig 14,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=168; # from fig.24\n", + "Z=0.142; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "print\"\\t cold fluid:shell side,naphtha \\t\"\n", + "ho1=200; # assumption\n", + "tw=(tc)+(((Hio)/(Hio+ho1))*(Tc-tc)); # from eq.5.31, calculation mistake\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-tc);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, hv>300, hs=60\n", + "Av=(qv/300);\n", + "As=qs/60;\n", + "print\"\\t qv/hv : \\t\",Av\n", + "print\"\\t qs/hs : \\t\",As\n", + "A1=As+Av;\n", + "print\"\\t A : \\t\",A1\n", + "ho=(Q/A1);\n", + "print\"\\t ho : \\t\",ho\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=11500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000168; # friction factor for reynolds number 59200, using fig.26\n", + "s=0.73;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.11; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "Af=(3.14*(21.25**2-(116))/8);\n", + "print\"\\t flow area : in**2 \\t\",Af\n", + "As=0.917; # ft**2\n", + "p=(3.14*21.25/2)+(3.14*1*116/2)+(21.25)\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=0.186; # ft\n", + "Gs=(Ws/(2*As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.435; # at 315F, fig 14,lb/(ft)*(hr)\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.00028; # using fig.26\n", + "row=0.337; # fig 13.14\n", + "# soutlet max=0.071,\n", + "s=0.35; # using fig.6\n", + "phys=1;\n", + "delPs=0.25 #((f*(Gs**2)*(L))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5 pgno:488" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.5\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for butane is : Btu/hr \t3957600\n", + "\t total heat required for steam is : Btu/hr \t3966760\n", + "\t trail 1 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t105.068772287\n", + "\t total surface area is : ft**2 \t342.3472\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t92.6956025929\n", + "\t vapour density : lb/ft**3 \t3.18723589714\n", + "\t weight flow of recirculated liquid : lb/hr \t163200\n", + "\t volume of liquid : ft**3 \t6071.04\n", + "\t volume of vapour : ft**3 \t17952.0\n", + "\t total volume out of reboiler : ft**3 \t24023.04\n", + "\t vo is : ft**3/lb \t0.11776\n", + "\t pressure leg : psi \t1.58756230188\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.228597222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t892399.295218\n", + "\t reynolds number is : \t190648.940342\n", + "\t delPt is : psi \t2.1\n", + "negilgable\n", + "\t total resisitance : psi \t3.69151627479\n", + "\t driving force : psi \t2.98611111111\n", + "\t trial 2 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t140.091696383\n", + "\t total surface area is : ft**2 \t355.6956\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.21695967\n", + "\t pressure leg : psi \t1.19067172641\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.316680555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t644182.272707\n", + "\t reynolds number is : \t137620.75826\n", + "\t delPt is : psi \t0.874030618788\n", + "\t total resisitance : psi \t2.0647023452\n", + "\t driving force : psi \t2.23958333333\n", + "\t hot fluid : shell side,steam \t\n", + "\t cold fluid:inner tube side, butane \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t734.042553191\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t248.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t212.814645309\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.006537030325\n" + ] + } + ], + "source": [ + "print\"\\t example 15.5\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "W=40800; # lb/hr\n", + "w=4570; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=241; # enthalpy of liquid at 228F, Btu/lb, fig 9\n", + "Ht2=338; # enthalpy of vapourat 228F, Btu/lb, fig 9\n", + "Q=(W*(Ht2-Ht1));\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "l=868; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt=125; # delt=LMTD, isothermal boiling, eq 5.14\n", + "# Tc and tc: Both streams are isuthermal\n", + "print\"\\t trail 1 \\t\"\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=109; # assuming one tube passes, 13.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# Assume 4: 1 recirculation ratio\n", + "rowv=(58/(359*(688/492)*(14.7/290))); # eq 15.18\n", + "print\"\\t vapour density : lb/ft**3 \\t\",rowv\n", + "Vv=0.44; \n", + "Vl=0.0372; # fig 6\n", + "W1=4*W;\n", + "print\"\\t weight flow of recirculated liquid : lb/hr \\t\",W1\n", + "VL=W1*Vl;\n", + "VV=W*Vv;\n", + "print\"\\t volume of liquid : ft**3 \\t\",VL\n", + "print\"\\t volume of vapour : ft**3 \\t\",VV\n", + "V=VL+VV;\n", + "print\"\\t total volume out of reboiler : ft**3 \\t\",V\n", + "vo=(V/(W1+W));\n", + "print\"\\t vo is : ft**3/lb \\t\",vo\n", + "Pl=((2.3*16)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=109;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000127; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "P=Pl+delPt;\n", + "print\"negilgable\"\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(16*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# The resistances are greater than the hydrostatic head can provide; hence the recirculation ratio will be less than 4: 1\n", + "print\"\\t trial 2 \\t\" # Assume 12'0\" tubes and 4:1 recirculation ratio\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=12;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=151; # assuming one tube passes, 15.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Pl=((2.3*12)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=151;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000135; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(12)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "P=Pl+delPt;\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(12*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# Since the driving force is slightly greater than the resistances, a recirculation ratio better than 4:1 is assured.\n", + "print\"\\t hot fluid : shell side,steam \\t\"\n", + "ho=1500; # condensing steam\n", + "print\"\\t cold fluid:inner tube side, butane \\t\"\n", + "jH=330; # from fig.24\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((300)*(0.62/0.75)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "UD=89;\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6 pgno492" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.6\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat duty : Btu/hr \t5799016.0\n", + "\t total heat duty : lb/hr \t37902.0\n" + ] + } + ], + "source": [ + "print\"\\t example 15.6\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#20000=WD+WB;\n", + "#0.99*WD+(0.05*WB)=(20000*.5);\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "HBl=108; # fig 3 and 12\n", + "HDl=85.8; #fig 3 and 12\n", + "HDv=253.8; # fig 3 and 12\n", + "HFl=92; # fig 3 and 12\n", + "l=153; # fig 3 and 12\n", + "QR=((2.54+1)*WD*(HDv))-(2.54*WD*HDl)+(WB*HBl)-(20000*HFl);\n", + "print\"\\t total heat duty : Btu/hr \\t\",round(QR)\n", + "Q=QR/153;\n", + "print\"\\t total heat duty : lb/hr \\t\",round(Q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7 pgno:502" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\ttotal Lb/hr is \t20000\n", + "\ttotal Mol/hr is \t235.5\n", + "\tx1 of C6H6 is \t0.543524416136\n", + "\tx1 of C7H8 is \t0.456475583864\n", + "\tTotal x1 is \t1.0\n", + "\tx1Pp1 of C6H6 is \t750.063694268\n", + "\tx1Pp1 of C7H8 is \t262.473460722\n", + "\tTotal x1Pp1 is \t1012.53715499\n", + "\ty1 of C6H6 is \t0.740776464914\n", + "\ty1 of C7H8 is \t0.259223535086\n", + "\tTotal y1 is \t1.0\n", + "\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\t0.558\n", + "\tWR` = %.2f (mol reflux)/(mol distillate)\t1.27\n", + "\tAssumed 200 percent of the theoretical minimum reflux as economic\t\tWR = (mol)/(mil distillate)\t2.54\n", + "\tThe intercept for the upper operating line = \t0.280225988701\n", + "\tConnecting the corresponding line in Fig. 15.23, plates required: \t13\n", + "\tFeed plate is th(from top)\t7\n", + "\tTotal reflux is \t311.15\n", + "\t\t\t\t\tHeat balances\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\tHeat balance \t\taround condenser:\t\n", + "\t Heat in:\t\t Top plate vapor.......433\t87.3\t\t195\t%.1f\t\t33900 253.8 8603820.0\n", + "\t Heat out:\t\t Distillate............\n", + "122.5\t78.3\t\t195\t\t\t9570 85.8 821106.0\n", + "\t Reflux................\n", + "310.5\t78.3\t\t195\t\t\t24330 85.8 2087514.0\n", + "\t Condenser duty, by\t\t difference........... ..... .... ...... ..\n", + ". ..... 5688000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t8600000\t\t\n", + "\tReboiler vapor is lb/hr\t37908\n", + "\tTrapout is lb/hr\t48338\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\n", + "\tHeat in:\t\t Trapout...............522\t92.8\t\t246\t108.0\t5230000\t48338\n", + "\t Reboiler duty, \t\t by difference....... .... .... ..... ... ..... 5800000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t11030000\t\t\n", + "\t\tReboiler requirements are\t\n", + "\t\tTotal liquid to reboiler\t48330 lb/hr\t\t\tVaporization\t\t\t37900 lb/hr\t\t\tTemperature(nearly isothermal)\t246DegF\t\t\tPressure\t\t\t5 psig\t\t\tHeat load\t\t\t5800000 Btu/hr\t\n", + "total heat out is btu/hr 7640000\n" + ] + } + ], + "source": [ + "print\"\\t example 15.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "#Basis: One hour\n", + "#20000=WD+WB , material balance\n", + "#0.99*WD+(0.05*WB)=(20000*0.5) , Benzene balance\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "\n", + "#Compositions and Boiling Points\n", + "#Feed\n", + "l1 = 10000; #Lb/hr , C6H4\n", + "l2 = 10000; #Lb/hr , C7H8\n", + "lb = l1+l2; #Lb/hr\n", + "print\"\\ttotal Lb/hr is \\t\",lb\n", + "mo1 = 78.1; #Mol. wt., C6H6\n", + "mo2 = 93.1; #Mol. wt , C7H8\n", + "mh1 = 128.0; #Mol/hr , C6H6\n", + "mh2 = 107.5; #Mol/hr , C7H8\n", + "mh = mh1 + mh2; # Mol/hr\n", + "print\"\\ttotal Mol/hr is \\t\",mh\n", + "x1 = mh1/mh;\n", + "print\"\\tx1 of C6H6 is \\t\",x1\n", + "x2 = mh2/mh;\n", + "print\"\\tx1 of C7H8 is \\t\",x2\n", + "x = x1+x2;\n", + "print\"\\tTotal x1 is \\t\",x\n", + "Pp1= 1380; # 214Deg F\n", + "Pp2=575; # 214Deg F\n", + "xp1 = x1*Pp1;\n", + "print\"\\tx1Pp1 of C6H6 is \\t\",xp1\n", + "xp2 = x2*Pp2;\n", + "print\"\\tx1Pp1 of C7H8 is \\t\",xp2\n", + "sxp = xp1 + xp2;\n", + "print\"\\tTotal x1Pp1 is \\t\",sxp\n", + "y1 = xp1/sxp;\n", + "print\"\\ty1 of C6H6 is \\t\",y1\n", + "y2 = xp2/sxp;\n", + "print\"\\ty1 of C7H8 is \\t\",y2\n", + "y = y1+y2;\n", + "print\"\\tTotal y1 is \\t\",y\n", + "\n", + "\n", + "w1 = 0.558; #from eq 15.42\n", + "print\"\\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\\t\",w1\n", + "wD=1;\n", + "xD = 0.992;\n", + "#V = WR' + WD\n", + "# WR'/V = 0.558\n", + "#Solving, WR' = (WR' * 0.558) + (0.558 * WD)\n", + "Wr = 1.27; # mol reflux/mol distillate\n", + "print\"\\tWR` = %.2f (mol reflux)/(mol distillate)\\t\",Wr\n", + "Wr1 = Wr * 2; # mol/ mol distillate\n", + "print\"\\tAssumed 200 percent of the theoretical minimum reflux as economic\\t\\tWR = (mol)/(mil distillate)\\t\",Wr1\n", + "In = (wD * xD)/(Wr1 + 1); #intercept for the upper operating line\n", + "print\"\\tThe intercept for the upper operating line = \\t\",In\n", + "p = 13; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tConnecting the corresponding line in Fig. 15.23, plates required: \\t\",p\n", + "fp = 7; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tFeed plate is th(from top)\\t\",fp\n", + "d=122.5;\n", + "tf = Wr1 * d;\n", + "print\"\\tTotal reflux is \\t\",tf\n", + "print\"\\t\\t\\t\\t\\tHeat balances\"\n", + "\n", + "#Heat Balances\n", + "l1 = 33900;\n", + "l2 = 9570;\n", + "l3 = 24330;\n", + "b1 = 253.8;\n", + "b2 = 85.8;\n", + "b3 = 85.8;\n", + "bt1 = b1*l1;\n", + "bt2 = b2*l2;\n", + "bt3 = b3*l3;\n", + "bt4 = 5688000;\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\\tHeat balance \\t\\taround condenser:\\t\"\n", + "print\"\\t Heat in:\\t\\t Top plate vapor.......433\\t87.3\\t\\t195\\t%.1f\\t\\t\",l1,b1,bt1\n", + "print\"\\t Heat out:\\t\\t Distillate............\"\n", + "print\"122.5\\t78.3\\t\\t195\\t\\t\\t\",l2,b2,bt2\n", + "print\"\\t Reflux................\"\n", + "print\"310.5\\t78.3\\t\\t195\\t\\t\\t\",l3,b3,bt3\n", + "print\"\\t Condenser duty, by\\t\\t difference........... ..... .... ...... ..\"\n", + "print\". ..... 5688000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t8600000\\t\\t\"\n", + "tho=7640000;\n", + "\n", + "lam = 153; # At 246 DegF, Btu/hr\n", + "rv = 5800000/153; #Lb/hr\n", + "print\"\\tReboiler vapor is lb/hr\\t\",rv\n", + "to = rv + 10430; #Lb/hr\n", + "print\"\\tTrapout is lb/hr\\t\",to\n", + "\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\"\n", + "print\"\\tHeat in:\\t\\t Trapout...............522\\t92.8\\t\\t246\\t108.0\\t5230000\\t\",to\n", + "print\"\\t Reboiler duty, \\t\\t by difference....... .... .... ..... ... ..... 5800000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t11030000\\t\\t\"\n", + "print\"\\t\\tReboiler requirements are\\t\"\n", + "print\"\\t\\tTotal liquid to reboiler\\t48330 lb/hr\\t\\t\\tVaporization\\t\\t\\t37900 lb/hr\\t\\t\\tTemperature(nearly isothermal)\\t246DegF\\t\\t\\tPressure\\t\\t\\t5 psig\\t\\t\\tHeat load\\t\\t\\t5800000 Btu/hr\\t\"\n", + "print\"total heat out is btu/hr\",tho \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\n", + "\t\tDEW POINT OF OVERHEAD\n", + "\n", + "\t\tMol/hr\t\tK(148DegF,40 psia)\tV/K\n", + "\n", + "\t\t--------------------------------------------\n", + "\n", + "[ 6.4 219.7 2.3] [ 2.8 1.01 0.34] [ 17 221 74]\n", + "\n", + "\t\tBUBBLE POINTS OF BOTTOMS\n", + "\n", + "\t\tMol/hr\t\tK(330DegF,40psia)\t\tKL\t\tLb/hr\n", + "\n", + "\t\t--------------------------------------------------------------\n", + "\n", + "4.1 5.8 23.8 1700\n", + "49.3 3.0 148.0 13900\n", + "71.9 1.68 120.0 13030\n", + "52.5 0.98 51.4 6260\n", + "54.7 0.57 31.2 4240\n", + "82.5 0.35 28.9 4330\n", + "76.6 0.21 16.1 2640\n", + "22.4 0.13 2.9 520\n", + "\t\t____\t\t\t\t\t____\t\t____\n", + "\n", + "\t\t[ 4 53 124 176 230 312 388 410]\n", + "\t\t\t\t\t[23.800000000000001, 171.80000000000001, 291.80000000000001, 343.19999999999999, 374.39999999999998, 403.29999999999995, 419.39999999999998, 422.29999999999995]\n", + "\t\t[ 1700 13900 13030 6260 4240 4330 2640 520]\n", + "\tAverage mol. wt. \n", + "[ 71.42857143 80.9080326 44.65387252 18.24009324 11.32478632\n", + " 10.7364245 6.29470672 1.23135212]\n", + "\n", + "\n", + "\t\t\t\t\t\tHEAT BALANCES:\n", + "\n", + "\t\t\t\tMol/hr\t\tMol.wt.\t\tLb/hr\t\tTemp,DegF\t\tBtu/lb\t\tBtu/hr\n", + "\t\n", + "\t\t\t----------------------------------------------------------------------------------------\n", + "\n", + "\tHeat Balance onCondeser\n", + "\t Heat in:\n", + "\t Top plate vapor......\n", + "\n", + "\n", + "\t\tCALCULATION OF BOTTOM PLATE TEMPERATURE\n", + "\n", + "\t\ty*\t\t\tReboiler vapor\t\t\t\tK(300DegF,40psia)\tMol*K\n", + "\t\t\t\tV = y*205.7 +\tBottoms\t=\tTrapout\n", + "\n", + "\t\t----------------------------------------------------------------------------------------\n", + "\n", + "CALCULATION OF BOTTOM PLATE TEMPERATURE\n", + " y* Reboiler vapor K(300DegF,40psia) Mol*K\n", + " V = y*205.7 + Bottoms = Trapout\n", + " ----------------------------------------------------------------------------------------\n", + "C5 0.056 11.5 4.1 15.6 4.5 70.29\n", + "C6 0.35 72.0 49.3 121.3 2.25 272.91\n", + "C7 0.285 58.6 71.9 130.5 1.2 156.63\n", + "C8 0.122 25.1 52.5 77.6 0.66 51.21\n", + "C9 0.074 15.2 54.7 69.9 0.38 26.57\n", + "C10 0.068 14.0 82.5 96.5 0.22 21.23\n", + "C11 0.038 7.8 76.6 84.4 0.13 10.97\n", + "C12 0.007 1.4 22.4 23.8 0.07 1.67\n", + "----------------------------------------------------------------------------------------\n", + "1.000 205.7 414.0 619.7 611.5\n", + "Reboiler requirements are\n", + " Vaporization lb/hr 22700\n", + " Total liquor to reboiler lb/hr 78177\n", + " Heat load Btu/hr 4280000\n", + " Temperature range 300-330 def F\n", + " Operating pressure psi 40\n" + ] + } + ], + "source": [ + "print\"\\t example 15.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Dew point of Overhead\n", + "import numpy\n", + "vc=numpy.array([6.4, 219.7, 2.3])\n", + "#vc(1) = 6.4; # Mol/hr\n", + "#vc(2) = 219.7; #Mol/hr\n", + "#vc(3) = 2.3; #Mol/hr\n", + "K=numpy.array([2.8, 1.01, 0.34])\n", + "#K(1) = 2.8; #at 148DegF and 40 psia\n", + "#K(2) = 1.01; #at 148DegF and 40 psia\n", + "#K(3) = 0.34; #at 148DegF and 40 psia\n", + "v=numpy.array([0, 0, 0])\n", + "i=0;\n", + "while (i<3):\n", + " v[0]=vc[0]*K[0];\n", + " v[1]=vc[1]*K[1];\n", + " v[2]=vc[1]*K[2];\n", + " i=i+1;\n", + "\n", + "\n", + "print\"\\n\\t\\tDEW POINT OF OVERHEAD\"\n", + "print\"\\n\\t\\tMol/hr\\t\\tK(148DegF,40 psia)\\tV/K\\n\"\n", + "print\"\\t\\t--------------------------------------------\\n\"\n", + "\n", + "\n", + "print vc,K,v\n", + "\n", + "bc=numpy.array([4.1, 49.3, 71.9, 52.5, 54.7, 82.5, 76.6, 22.4])\n", + "#bc(1)=4.1; #Mol/hr\n", + "#bc(2)=49.3; #Mol/hr\n", + "#c(3)=71.9; #Mol/hr\n", + "#bc(4)=52.5; #Mol/hr\n", + "#bc(5)=54.7; #Mol/hr\n", + "#bc(6)=82.5; #Mol/hr\n", + "#bc(7)=76.6; #Mol/hr\n", + "#bc(8)=22.4; #Mol/hr\n", + "tbc=numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "tbc[0]=tbc[0]+bc[0];\n", + "i=1\n", + "while (i<8):\n", + " tbc[i]=tbc[i-1]+bc[i];\n", + " i=i+1;\n", + "\n", + "\n", + "bK=numpy.array([5.8, 3.0, 1.68, 0.98, 0.57, 0.35, 0.21, 0.13])\n", + "#bK(1)=5.8; #at 330DegF, 40 psia\n", + "#bK(2)=3.0; #at 330DegF, 40 psia\n", + "#bK(3)=1.68; #at 330DegF, 40 psia\n", + "#bK(4)=0.98; #at 330DegF, 40 psia\n", + "#bK(5)=0.57; #at 330DegF, 40 psia\n", + "#bK(6)=0.35; #at 330DegF, 40 psia\n", + "#bK(7)=0.21; #at 330DegF, 40 psia\n", + "#bK(8)=0.13; #at 330DegF, 40 psia\n", + "\n", + "KL=numpy.array([23.8, 148.0, 120.0, 51.4, 31.2, 28.9, 16.1, 2.9])\n", + "\n", + "#KL(1)=23.8;\n", + "#KL(2)=148.0;\n", + "#KL(3)=120.8;\n", + "#KL(4)=51.4;\n", + "#KL(5)=31.2;\n", + "#KL(6)=28.9;\n", + "#KL(7)=16.1;\n", + "#KL(8)=2.9;\n", + "\n", + "tk=([0, 0, 0, 0, 0, 0, 0, 0])\n", + "i=1;\n", + "op=40;\n", + "tk[0]=KL[0]\n", + "while (i<8):\n", + " tk[i]=tk[i-1]+KL[i];\n", + " i=i+1;\n", + "\n", + "l=numpy.array([1700, 13900, 13030, 6260, 4240, 4330, 2640, 520]) \n", + "#l(1)=1700; #Lb/hr\n", + "#l(2)=13900; #Lb/hr\n", + "#l(3)=13030; #Lb/hr\n", + "#l(4)=6260; #Lb/hr\n", + "#l(5)=4240; #Lb/hr\n", + "#l(6)=4330; #Lb/hr\n", + "#l(7)=2640; #Lb/hr\n", + "#l(8)=520; #Lb/hr\n", + "\n", + "tl=numpy.array([0, 0, 0, 0, 0, 0, 0, 0,])\n", + "\n", + "i=0;\n", + "while (i<8):\n", + " tl[i]=tl[i]+l[i];\n", + " i=i+1;\n", + "\n", + "print\"\\n\\t\\tBUBBLE POINTS OF BOTTOMS\\n\"\n", + "print\"\\t\\tMol/hr\\t\\tK(330DegF,40psia)\\t\\tKL\\t\\tLb/hr\\n\"\n", + "print\"\\t\\t--------------------------------------------------------------\\n\"\n", + "tlr=78177;\n", + "i=0;\n", + "while (i<8):\n", + "\n", + " print bc[i],bK[i],KL[i],l[i]\n", + " i=i+1;\n", + "\n", + "print\"\\t\\t____\\t\\t\\t\\t\\t____\\t\\t____\\n\"\n", + "\n", + "print\"\\t\\t\",tbc \n", + "print\"\\t\\t\\t\\t\\t\",tk \n", + "print\"\\t\\t\",tl\n", + "av = numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "av=tl/tk\n", + "hl=4280000;\n", + "print\"\\tAverage mol. wt. \\n\",av\n", + "\n", + "lh=numpy.array([48894, 16298, 32596])\n", + "bl=numpy.array([286, 129, 129])\n", + "#lh(1)=48894;#Lb/hr\n", + "#lh(2)=16298;#Lb/hr\n", + "#lh(3)=32596;#Lb/hr\n", + "#bl(1)=286;#Btu/hr\n", + "#bl(2)=129;#Btu/hr\n", + "#bl(3)=129;#Btu/hr\n", + "\n", + "bh=numpy.array([0, 0, 0])\n", + "vap=22700;\n", + "i=0;\n", + "\n", + "while (i<3):\n", + " bh[0]=lh[0]*bl[0];\n", + " i=i+1;\n", + "\n", + "#Heat Balances\n", + "print\"\\n\\n\\t\\t\\t\\t\\t\\tHEAT BALANCES:\"\n", + "print\"\\n\\t\\t\\t\\tMol/hr\\t\\tMol.wt.\\t\\tLb/hr\\t\\tTemp,DegF\\t\\tBtu/lb\\t\\tBtu/hr\\n\\t\"\n", + "print\"\\t\\t\\t----------------------------------------------------------------------------------------\"\n", + "print\"\\n\\tHeat Balance onCondeser\\n\\t Heat in:\\n\\t Top plate vapor......\"\n", + "\n", + "#Heat Balances on reboiler\n", + "#Assume 30Deg difference between reboiler and bottom plate giving bottom-plate temperature of 300DegF\n", + "#Mol/hr from Eq. 15.47\n", + "\n", + "pc=numpy.array([0.056, 0.35, 0.285, 0.122, 0.074, 0.068, 0.038, 0.007])\n", + "#pc(1)=0.056;\n", + "#pc(2)=0.350;\n", + "##pc(3)=0.285;\n", + "#pc(4)=0.122;\n", + "#pc(5)=0.074;\n", + "#pc(6)=0.068;\n", + "#pc(7)=0.038;\n", + "#pc(8)=0.007;\n", + "\n", + "pk=numpy.array([4.5, 2.25, 1.2, 0.66, 0.38, 0.22, 0.13, 0.07])\n", + "#pK(1)=4.5;\n", + "#pK(2)=2.25;\n", + "#pK(3)=1.20;\n", + "#pK(4)=0.66;\n", + "#pK(5)=0.38;\n", + "#pK(6)=0.22;\n", + "#pK(7)=0.13;\n", + "#pK(8)=0.07;\n", + "\n", + "print\"\\n\\n\\t\\tCALCULATION OF BOTTOM PLATE TEMPERATURE\\n\"\n", + "print\"\\t\\ty*\\t\\t\\tReboiler vapor\\t\\t\\t\\tK(300DegF,40psia)\\tMol*K\\n\\t\\t\\t\\tV = y*205.7 +\\tBottoms\\t=\\tTrapout\\n\"\n", + "print\"\\t\\t----------------------------------------------------------------------------------------\\n\"\n", + "\n", + "\n", + "print \"CALCULATION OF BOTTOM PLATE TEMPERATURE\"\n", + "print\" y* Reboiler vapor K(300DegF,40psia) Mol*K\"\n", + "print\" V = y*205.7 + Bottoms = Trapout\"\n", + "print\" ----------------------------------------------------------------------------------------\"\n", + "print \"C5 0.056 11.5 4.1 15.6 4.5 70.29\"\n", + "print \"C6 0.35 72.0 49.3 121.3 2.25 272.91\"\n", + "print \"C7 0.285 58.6 71.9 130.5 1.2 156.63\"\n", + "print \"C8 0.122 25.1 52.5 77.6 0.66 51.21\"\n", + "print \"C9 0.074 15.2 54.7 69.9 0.38 26.57\"\n", + "print \"C10 0.068 14.0 82.5 96.5 0.22 21.23\"\n", + "print \"C11 0.038 7.8 76.6 84.4 0.13 10.97\"\n", + "print \"C12 0.007 1.4 22.4 23.8 0.07 1.67\"\n", + "print \"----------------------------------------------------------------------------------------\"\n", + "print \"1.000 205.7 414.0 619.7 611.5\"\n", + "\n", + "\n", + "print\"Reboiler requirements are\"\n", + "print\" Vaporization lb/hr\",vap\n", + "print\" Total liquor to reboiler lb/hr\",tlr \n", + "print\" Heat load Btu/hr\",hl\n", + "print\" Temperature range 300-330 def F\"\n", + "print\" Operating pressure psi\",op " + ] + } + ], + "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/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 new file mode 100644 index 00000000..d185cf80 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_3.ipynb @@ -0,0 +1,1315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Vaporizers Evapourators and Reboilers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat required for steam is : Btu/hr \t9453000.0\n", + "\t total heat required for kerosene is : Btu/hr \t9450000.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t91.1262293169\n", + "\t A : ft**2 \t1037.02304713\n", + "\t By the law of mixtures \t\n", + "\t v2 : %.0f ft**3/lb \t11.0034\n", + "\t vav : ft**3/lb \t3.16417120715\n", + "\t By the approximate method \t\n", + "\t vav : ft**3/lb \t5.5102\n", + "\t actual density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.00505661639416\n", + "\t approximate density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.0029\n" + ] + } + ], + "source": [ + "print\"\\t example 15.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=250;\n", + "T1=400;\n", + "T2=300;\n", + "w=10000; # lb/hr\n", + "W=150000; # lb/hr\n", + "l=945.3; # Btu/(lb) , table 7\n", + "from math import log10\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "C=0.63; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "delt1=T2-ts; #F\n", + "delt2=T1-ts; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "UD=100;\n", + "A=(Q/(UD*LMTD));\n", + "print\"\\t A : ft**2 \\t\",A\n", + "WC=94500; # Btu/F\n", + "vl=0.017; # ft**3/lb, from table 7\n", + "vv=13.75; # ft**3/lb, from table 7\n", + "print\"\\t By the law of mixtures \\t\"\n", + "# Assume 80 per cent of the outlet fluid is vapor\n", + "v2=(0.8*vv)+(.2*vl);\n", + "print\"\\t v2 : ft**3/lb \\t\",v2\n", + "vav=(WC*(v2-vl)/(UD*A))-((WC*(T2-ts)/(l*w))*(vv-vl))+vl;\n", + "print\"\\t vav : ft**3/lb \\t\",vav\n", + "print\"\\t By the approximate method \\t\"\n", + "vav1=(vl+v2)/(2);\n", + "print\"\\t vav : ft**3/lb \\t\",vav1\n", + "row=62.5;\n", + "rowac=(1/vav);\n", + "s=(rowac/row);\n", + "print\"\\t actual density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",s\n", + "rowap=(1/vav1);\n", + "s=(rowap/row);\n", + "print\"\\t approximate density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",round(s,4)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 pgno:464" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for preheat of butane is : Btu/hr \t2124200\n", + "\t total heat required for vapourisation of butane is : Btu/hr \t2172500\n", + "\t total heat required for butane is : Btu/hr \t4296700\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t4297328.0\n", + "\t Wp1 is : lb/hr \t13401.8927445\n", + "\t Wv1 is : lb/hr \t21092\n", + "\t W is : lb/hr \t34493.8927445\n", + "\t weighted delt is : % F \t124.582285677\n", + "\t caloric temperature of hot fluid is : F \t338\n", + "\t caloric temperature of cold fluid is : F \t171\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.15675\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t31132.3763955\n", + "\t reynolds number is : \t62178.9886688\n", + "\t hio is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,butane \t\n", + "\t preheating \t\n", + "\t flow area is : ft**2 \t0.105902777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t233232.786885\n", + "\t reynolds number is : \t69214.7658922\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t231.272727273\n", + "\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \t200.378071834\n", + "\t clean surface required for preheating : ft**2 \t66.883030772\n", + "\t for vapourisation \t\n", + "\t reynolds number is : \t79511.1773472\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t236.96969697\n", + "\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \t204.640614096\n", + "\t clean surface required for vapourisation : ft**2 \t103.069633088\n", + "\t total clean surface : ft**2 \t169.952663859\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t202.96313674\n", + "\t total surface area is : ft**2 \t318.3488\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.352513798\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00430213212754\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.16\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t preheating \t\n", + "\t length of preheat zone : ft \t6.29662676683\n", + "\t number of crosses are : \t15.1119042404\n", + "\t delPsp is : psi \t0.703032923143\n", + "\t vapourisation \t\n", + "\t number of crosses are : \t23.28\n", + "\t delPsv is : psi \t1.89396418309\n", + "\t delPS is : psi \t2.6\n", + "\t allowable delPa is 5 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=108; # inlet cold fluid,F\n", + "t2=235; # outlet cold fluid,F\n", + "Ts=338;\n", + "Wp=24700; # lb/hr\n", + "Wv=19750; # lb/hr\n", + "w=4880; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=162; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=248; # enthalpy at t2, Btu/lb, fig 9\n", + "qp=(Wp*(Ht2-Ht1)); # for preheat\n", + "print\"\\t total heat required for preheat of butane is : Btu/hr \\t\",qp\n", + "Ht3=358; # enthalpy of vapour at t2, Btu/lb, fig 9\n", + "qv=Wv*(Ht3-Ht2);\n", + "print\"\\t total heat required for vapourisation of butane is : Btu/hr \\t\",qv\n", + "Q=qp+qv;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=880.6; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "deltp=158.5; # F, from eq 5.14\n", + "deltv=103; # F eq 5.14\n", + "Wp1=(qp/deltp);\n", + "print\"\\t Wp1 is : lb/hr \\t\",Wp1\n", + "Wv1=(qv/deltv);\n", + "print\"\\t Wv1 is : lb/hr \\t\",Wv1\n", + "W=(Wp1+Wv1);\n", + "print\"\\t W is : lb/hr \\t\",W\n", + "delt=(Q/W);\n", + "print\"\\t weighted delt is : % F \\t\",delt\n", + "Tc=((Ts)+(Ts))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=76;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.594; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.0363; # at 338F, fig 15,lb/(ft)*(hr)\n", + "D=0.0725; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensing steam,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hio is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,butane \\t\"\n", + "print\"\\t preheating \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(Wp/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.278; # at 172F,lb/(ft)*(hr), from fig.14\n", + "De=0.0825; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=159; # from fig.28\n", + "Z=0.12; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hop=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hop\n", + "Up=((hio)*(hop)/(hio+hop)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \\t\",Up\n", + "Ap=(qp/(Up*deltp));\n", + "print\"\\t clean surface required for preheating : ft**2 \\t\",Ap\n", + "print\"\\t for vapourisation \\t\"\n", + "mu2=0.242; # at 172F,lb/(ft)*(hr), from fig.14\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=170; # from fig.28\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hov=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hov\n", + "Uv=((hio)*(hov)/(hio+hov)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \\t\",Uv\n", + "Av=(qv/(Uv*deltv));\n", + "print\"\\t clean surface required for vapourisation : ft**2 \\t\",Av\n", + "Ac=Ap+Av;\n", + "print\"\\t total clean surface : ft**2 \\t\",Ac\n", + "UC=((Up*Ap)+(Uv*Av))/(Ac);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# A total of 170 ft2 are required of which 103 are to be used for vaporization. For the total surface required 318 ft2 will be provided. It can be assumed, then, that the surface provided for vaporization is 193ft**2\n", + "# then flux is Q/A=10700, which is with in satisfactory levels.\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000165; # friction factor for reynolds number 62000, using fig.26\n", + "s=0.00413;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t preheating \\t\"\n", + "f=0.00145; # friction factor for reynolds number 69200, using fig.29\n", + "Lp=(L*Ap/Ac); #ft\n", + "print\"\\t length of preheat zone : ft \\t\",Lp\n", + "N=(12*Lp/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "s=0.5; # for reynolds number 69200,using fig.6\n", + "Ds=1.27; # fig 28\n", + "phys=1;\n", + "delPsp=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPsp is : psi \\t\",delPsp\n", + "print\"\\t vapourisation \\t\"\n", + "f=0.00142;\n", + "Lv=9.7; # Lv=L-Lp\n", + "Nv=(12*Lv/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",Nv\n", + "s=0.28; \n", + "delPsv=((f*(Gs**2)*(Ds)*(Nv))/(5.22*(10**10)*(De)*(s)*(1))); # using eq 12.47,psi\n", + "print\"\\t delPsv is : psi \\t\",delPsv\n", + "delPS=delPsp+delPsv;\n", + "print\"\\t delPS is : psi \\t\",round(delPS,2)\n", + "print\"\\t allowable delPa is 5 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3 pgno:475" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gasoline is : Btu/hr \t2669500\n", + "\t total heat required for gasoil is : Btu/hr \t2671900.0\n", + "\t S is : \t0.428571428571\n", + "\t Tc is : F \t517.0\n", + "\t hot fluid:inner tube side,gasoil \t\n", + "\t flow area is : ft**2 \t0.0429722222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t807498.383969\n", + "\t reynolds number is : \t86215.9813038\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t374.063400576\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t311.968876081\n", + "\t cold fluid:shell side,gasoline \t\n", + "\t tw is : F \t459.64414193\n", + "\t deltw : F \t59.6441419296\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t152.933697255\n", + "\t total surface area is : ft**2 \t213.6288\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t105.993294626\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00289577777619\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.73790740915\n", + "\t delPr is : psi \t3.04225352113\n", + "\t delPT is : psi \t5.8\n", + "\t allowable delPa is 10psi \t\n", + "\t delPs is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=400;\n", + "T1=575;\n", + "T2=475;\n", + "W=28100; # lb/hr\n", + "w=34700; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "HT1=290; # enthalpy at T1, Btu/lb, fig 11\n", + "HT2=385; # enthalpy at T2, Btu/lb, fig 11\n", + "Q=(W*(HT2-HT1)); # for preheat\n", + "print\"\\t total heat required for gasoline is : Btu/hr \\t\",Q\n", + "c=0.77; # Btu/(lb), table 7\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt=118; # F eq 5.14\n", + "S=75./175.;#((T2-ts)/(T1-ts));\n", + "print\"\\t S is : \\t\",S\n", + "Kc=0.37; # fig 17\n", + "Fc=0.42;\n", + "Tc=(T2+(0.42*(T1-T2)));\n", + "print\"\\t Tc is : F \\t\",Tc\n", + "print\"\\t hot fluid:inner tube side,gasoil \\t\"\n", + "Nt=68;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.65; # at 517F, fig 14,lb/(ft)*(hr)\n", + "D=0.0694; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=220; # from fig.24\n", + "Z=0.118; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #hi/phyt, Hi=()using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "# (mu1/muw)**(0.14) is negligible\n", + "print\"\\t cold fluid:shell side,gasoline \\t\"\n", + "ho=300; # assumption\n", + "tw=(ts)+(((Hio)/(Hio+ho))*(Tc-ts)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-ts);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, ho>300\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=12500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00015; # friction factor for reynolds number 85700, using fig.26\n", + "s=0.71;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.09; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10psi \\t\"\n", + "print\"\\t delPs is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4 pgno:482" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.4\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t qv is : Btu/hr \t3654000\n", + "\t qs is : Btu/hr \t539000\n", + "\t total heat required for naphtha is : Btu/hr \t4193000\n", + "\t total heat required for gasoil is : Btu/hr \t4207500.0\n", + "\t delt1 is : F \t85.0\n", + "\t delt2 is : F \t190.0\n", + "\t LMTD is : F \t130.683201952\n", + "\t R is : \t6.25\n", + "\t S is : \t0.0952380952381\n", + "\t FT is 0.97 \t\n", + "\t delt is : F \t126.762705893\n", + "\t ratio of two local temperature difference is : \t0.447368421053\n", + "\t caloric temperature of hot fluid is : F \t451.25\n", + "\t caloric temperature of cold fluid is : F \t323.2\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.0549791666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t927624.100038\n", + "\t reynolds number is : \t59146.6742685\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t343.251798561\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t286.272\n", + "\t cold fluid:shell side,naphtha \t\n", + "\t tw is : F \t398.584002369\n", + "\t deltw : F \t75.384002369\n", + "\t qv/hv : \t12180\n", + "\t qs/hs : \t8983\n", + "\t A : \t21163\n", + "\t ho : \t198.813967774\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t117.329454908\n", + "\t total surface area is : ft**2 \t364.4256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t91.0801518561\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00245633150105\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.24018227225\n", + "\t delPr is : psi \t4.82191780822\n", + "\t delPT is : psi \t10.1\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t flow area : in**2 \t131.70828125\n", + "\t wetted perimeter : in \t236.7325\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20992.3664122\n", + "\t reynolds number is : \t59146.6742685\n", + "\t delPs is : psi \t0.25\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.4\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=315.; # inlet cold fluid,F\n", + "t2=335.; # outlet cold fluid,F\n", + "T1=525.;\n", + "T2=400.;\n", + "Wv=29000; # lb/hr\n", + "Ws=38500; # lb/hr\n", + "w=51000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=238; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=252; # enthalpy at t2, Btu/lb, fig 9\n", + "Ht3=378; # enthalpy of vapour at t2 \n", + "qv=(Wv*(Ht3-Ht2)); # for preheat\n", + "print\"\\t qv is : Btu/hr \\t\",qv\n", + "qs=Ws*(Ht2-Ht1);\n", + "print\"\\t qs is : Btu/hr \\t\",qs\n", + "Q=qs+qv;\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "c=0.66; # Btu/(lb)(F)\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.97 \\t\" # from fig 18\n", + "delt=(0.97*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2)); # fig 17\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.41; # from fig.17\n", + "Kc=0.42;\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=116;\n", + "n=8; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=1.09; # at 451F, fig 14,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=168; # from fig.24\n", + "Z=0.142; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "print\"\\t cold fluid:shell side,naphtha \\t\"\n", + "ho1=200; # assumption\n", + "tw=(tc)+(((Hio)/(Hio+ho1))*(Tc-tc)); # from eq.5.31, calculation mistake\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-tc);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, hv>300, hs=60\n", + "Av=(qv/300);\n", + "As=qs/60;\n", + "print\"\\t qv/hv : \\t\",Av\n", + "print\"\\t qs/hs : \\t\",As\n", + "A1=As+Av;\n", + "print\"\\t A : \\t\",A1\n", + "ho=(Q/A1);\n", + "print\"\\t ho : \\t\",ho\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=11500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000168; # friction factor for reynolds number 59200, using fig.26\n", + "s=0.73;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.11; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "Af=(3.14*(21.25**2-(116))/8);\n", + "print\"\\t flow area : in**2 \\t\",Af\n", + "As=0.917; # ft**2\n", + "p=(3.14*21.25/2)+(3.14*1*116/2)+(21.25)\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=0.186; # ft\n", + "Gs=(Ws/(2*As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.435; # at 315F, fig 14,lb/(ft)*(hr)\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.00028; # using fig.26\n", + "row=0.337; # fig 13.14\n", + "# soutlet max=0.071,\n", + "s=0.35; # using fig.6\n", + "phys=1;\n", + "delPs=0.25 #((f*(Gs**2)*(L))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5 pgno:488" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.5\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for butane is : Btu/hr \t3957600\n", + "\t total heat required for steam is : Btu/hr \t3966760\n", + "\t trail 1 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t105.068772287\n", + "\t total surface area is : ft**2 \t342.3472\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t92.6956025929\n", + "\t vapour density : lb/ft**3 \t3.18723589714\n", + "\t weight flow of recirculated liquid : lb/hr \t163200\n", + "\t volume of liquid : ft**3 \t6071.04\n", + "\t volume of vapour : ft**3 \t17952.0\n", + "\t total volume out of reboiler : ft**3 \t24023.04\n", + "\t vo is : ft**3/lb \t0.11776\n", + "\t pressure leg : psi \t1.58756230188\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.228597222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t892399.295218\n", + "\t reynolds number is : \t190648.940342\n", + "\t delPt is : psi \t2.1\n", + "negilgable\n", + "\t total resisitance : psi \t3.69151627479\n", + "\t driving force : psi \t2.98611111111\n", + "\t trial 2 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t140.091696383\n", + "\t total surface area is : ft**2 \t355.6956\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.21695967\n", + "\t pressure leg : psi \t1.19067172641\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.316680555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t644182.272707\n", + "\t reynolds number is : \t137620.75826\n", + "\t delPt is : psi \t0.874030618788\n", + "\t total resisitance : psi \t2.0647023452\n", + "\t driving force : psi \t2.23958333333\n", + "\t hot fluid : shell side,steam \t\n", + "\t cold fluid:inner tube side, butane \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t734.042553191\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t248.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t212.814645309\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.006537030325\n" + ] + } + ], + "source": [ + "print\"\\t example 15.5\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "W=40800; # lb/hr\n", + "w=4570; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=241; # enthalpy of liquid at 228F, Btu/lb, fig 9\n", + "Ht2=338; # enthalpy of vapourat 228F, Btu/lb, fig 9\n", + "Q=(W*(Ht2-Ht1));\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "l=868; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt=125; # delt=LMTD, isothermal boiling, eq 5.14\n", + "# Tc and tc: Both streams are isuthermal\n", + "print\"\\t trail 1 \\t\"\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=109; # assuming one tube passes, 13.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# Assume 4: 1 recirculation ratio\n", + "rowv=(58/(359*(688/492)*(14.7/290))); # eq 15.18\n", + "print\"\\t vapour density : lb/ft**3 \\t\",rowv\n", + "Vv=0.44; \n", + "Vl=0.0372; # fig 6\n", + "W1=4*W;\n", + "print\"\\t weight flow of recirculated liquid : lb/hr \\t\",W1\n", + "VL=W1*Vl;\n", + "VV=W*Vv;\n", + "print\"\\t volume of liquid : ft**3 \\t\",VL\n", + "print\"\\t volume of vapour : ft**3 \\t\",VV\n", + "V=VL+VV;\n", + "print\"\\t total volume out of reboiler : ft**3 \\t\",V\n", + "vo=(V/(W1+W));\n", + "print\"\\t vo is : ft**3/lb \\t\",vo\n", + "Pl=((2.3*16)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=109;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000127; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "P=Pl+delPt;\n", + "print\"negilgable\"\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(16*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# The resistances are greater than the hydrostatic head can provide; hence the recirculation ratio will be less than 4: 1\n", + "print\"\\t trial 2 \\t\" # Assume 12'0\" tubes and 4:1 recirculation ratio\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=12;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=151; # assuming one tube passes, 15.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Pl=((2.3*12)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=151;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000135; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(12)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "P=Pl+delPt;\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(12*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# Since the driving force is slightly greater than the resistances, a recirculation ratio better than 4:1 is assured.\n", + "print\"\\t hot fluid : shell side,steam \\t\"\n", + "ho=1500; # condensing steam\n", + "print\"\\t cold fluid:inner tube side, butane \\t\"\n", + "jH=330; # from fig.24\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((300)*(0.62/0.75)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "UD=89;\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6 pgno492" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.6\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat duty : Btu/hr \t5799016.0\n", + "\t total heat duty : lb/hr \t37902.0\n" + ] + } + ], + "source": [ + "print\"\\t example 15.6\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#20000=WD+WB;\n", + "#0.99*WD+(0.05*WB)=(20000*.5);\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "HBl=108; # fig 3 and 12\n", + "HDl=85.8; #fig 3 and 12\n", + "HDv=253.8; # fig 3 and 12\n", + "HFl=92; # fig 3 and 12\n", + "l=153; # fig 3 and 12\n", + "QR=((2.54+1)*WD*(HDv))-(2.54*WD*HDl)+(WB*HBl)-(20000*HFl);\n", + "print\"\\t total heat duty : Btu/hr \\t\",round(QR)\n", + "Q=QR/153;\n", + "print\"\\t total heat duty : lb/hr \\t\",round(Q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7 pgno:502" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\ttotal Lb/hr is \t20000\n", + "\ttotal Mol/hr is \t235.5\n", + "\tx1 of C6H6 is \t0.543524416136\n", + "\tx1 of C7H8 is \t0.456475583864\n", + "\tTotal x1 is \t1.0\n", + "\tx1Pp1 of C6H6 is \t750.063694268\n", + "\tx1Pp1 of C7H8 is \t262.473460722\n", + "\tTotal x1Pp1 is \t1012.53715499\n", + "\ty1 of C6H6 is \t0.740776464914\n", + "\ty1 of C7H8 is \t0.259223535086\n", + "\tTotal y1 is \t1.0\n", + "\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\t0.558\n", + "\tWR` = %.2f (mol reflux)/(mol distillate)\t1.27\n", + "\tAssumed 200 percent of the theoretical minimum reflux as economic\t\tWR = (mol)/(mil distillate)\t2.54\n", + "\tThe intercept for the upper operating line = \t0.280225988701\n", + "\tConnecting the corresponding line in Fig. 15.23, plates required: \t13\n", + "\tFeed plate is th(from top)\t7\n", + "\tTotal reflux is \t311.15\n", + "\t\t\t\t\tHeat balances\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\tHeat balance \t\taround condenser:\t\n", + "\t Heat in:\t\t Top plate vapor.......433\t87.3\t\t195\t%.1f\t\t33900 253.8 8603820.0\n", + "\t Heat out:\t\t Distillate............\n", + "122.5\t78.3\t\t195\t\t\t9570 85.8 821106.0\n", + "\t Reflux................\n", + "310.5\t78.3\t\t195\t\t\t24330 85.8 2087514.0\n", + "\t Condenser duty, by\t\t difference........... ..... .... ...... ..\n", + ". ..... 5688000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t8600000\t\t\n", + "\tReboiler vapor is lb/hr\t37908\n", + "\tTrapout is lb/hr\t48338\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\n", + "\tHeat in:\t\t Trapout...............522\t92.8\t\t246\t108.0\t5230000\t48338\n", + "\t Reboiler duty, \t\t by difference....... .... .... ..... ... ..... 5800000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t11030000\t\t\n", + "\t\tReboiler requirements are\t\n", + "\t\tTotal liquid to reboiler\t48330 lb/hr\t\t\tVaporization\t\t\t37900 lb/hr\t\t\tTemperature(nearly isothermal)\t246DegF\t\t\tPressure\t\t\t5 psig\t\t\tHeat load\t\t\t5800000 Btu/hr\t\n", + "total heat out is btu/hr 7640000\n" + ] + } + ], + "source": [ + "print\"\\t example 15.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "#Basis: One hour\n", + "#20000=WD+WB , material balance\n", + "#0.99*WD+(0.05*WB)=(20000*0.5) , Benzene balance\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "\n", + "#Compositions and Boiling Points\n", + "#Feed\n", + "l1 = 10000; #Lb/hr , C6H4\n", + "l2 = 10000; #Lb/hr , C7H8\n", + "lb = l1+l2; #Lb/hr\n", + "print\"\\ttotal Lb/hr is \\t\",lb\n", + "mo1 = 78.1; #Mol. wt., C6H6\n", + "mo2 = 93.1; #Mol. wt , C7H8\n", + "mh1 = 128.0; #Mol/hr , C6H6\n", + "mh2 = 107.5; #Mol/hr , C7H8\n", + "mh = mh1 + mh2; # Mol/hr\n", + "print\"\\ttotal Mol/hr is \\t\",mh\n", + "x1 = mh1/mh;\n", + "print\"\\tx1 of C6H6 is \\t\",x1\n", + "x2 = mh2/mh;\n", + "print\"\\tx1 of C7H8 is \\t\",x2\n", + "x = x1+x2;\n", + "print\"\\tTotal x1 is \\t\",x\n", + "Pp1= 1380; # 214Deg F\n", + "Pp2=575; # 214Deg F\n", + "xp1 = x1*Pp1;\n", + "print\"\\tx1Pp1 of C6H6 is \\t\",xp1\n", + "xp2 = x2*Pp2;\n", + "print\"\\tx1Pp1 of C7H8 is \\t\",xp2\n", + "sxp = xp1 + xp2;\n", + "print\"\\tTotal x1Pp1 is \\t\",sxp\n", + "y1 = xp1/sxp;\n", + "print\"\\ty1 of C6H6 is \\t\",y1\n", + "y2 = xp2/sxp;\n", + "print\"\\ty1 of C7H8 is \\t\",y2\n", + "y = y1+y2;\n", + "print\"\\tTotal y1 is \\t\",y\n", + "\n", + "\n", + "w1 = 0.558; #from eq 15.42\n", + "print\"\\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\\t\",w1\n", + "wD=1;\n", + "xD = 0.992;\n", + "#V = WR' + WD\n", + "# WR'/V = 0.558\n", + "#Solving, WR' = (WR' * 0.558) + (0.558 * WD)\n", + "Wr = 1.27; # mol reflux/mol distillate\n", + "print\"\\tWR` = %.2f (mol reflux)/(mol distillate)\\t\",Wr\n", + "Wr1 = Wr * 2; # mol/ mol distillate\n", + "print\"\\tAssumed 200 percent of the theoretical minimum reflux as economic\\t\\tWR = (mol)/(mil distillate)\\t\",Wr1\n", + "In = (wD * xD)/(Wr1 + 1); #intercept for the upper operating line\n", + "print\"\\tThe intercept for the upper operating line = \\t\",In\n", + "p = 13; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tConnecting the corresponding line in Fig. 15.23, plates required: \\t\",p\n", + "fp = 7; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tFeed plate is th(from top)\\t\",fp\n", + "d=122.5;\n", + "tf = Wr1 * d;\n", + "print\"\\tTotal reflux is \\t\",tf\n", + "print\"\\t\\t\\t\\t\\tHeat balances\"\n", + "\n", + "#Heat Balances\n", + "l1 = 33900;\n", + "l2 = 9570;\n", + "l3 = 24330;\n", + "b1 = 253.8;\n", + "b2 = 85.8;\n", + "b3 = 85.8;\n", + "bt1 = b1*l1;\n", + "bt2 = b2*l2;\n", + "bt3 = b3*l3;\n", + "bt4 = 5688000;\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\\tHeat balance \\t\\taround condenser:\\t\"\n", + "print\"\\t Heat in:\\t\\t Top plate vapor.......433\\t87.3\\t\\t195\\t%.1f\\t\\t\",l1,b1,bt1\n", + "print\"\\t Heat out:\\t\\t Distillate............\"\n", + "print\"122.5\\t78.3\\t\\t195\\t\\t\\t\",l2,b2,bt2\n", + "print\"\\t Reflux................\"\n", + "print\"310.5\\t78.3\\t\\t195\\t\\t\\t\",l3,b3,bt3\n", + "print\"\\t Condenser duty, by\\t\\t difference........... ..... .... ...... ..\"\n", + "print\". ..... 5688000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t8600000\\t\\t\"\n", + "tho=7640000;\n", + "\n", + "lam = 153; # At 246 DegF, Btu/hr\n", + "rv = 5800000/153; #Lb/hr\n", + "print\"\\tReboiler vapor is lb/hr\\t\",rv\n", + "to = rv + 10430; #Lb/hr\n", + "print\"\\tTrapout is lb/hr\\t\",to\n", + "\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\"\n", + "print\"\\tHeat in:\\t\\t Trapout...............522\\t92.8\\t\\t246\\t108.0\\t5230000\\t\",to\n", + "print\"\\t Reboiler duty, \\t\\t by difference....... .... .... ..... ... ..... 5800000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t11030000\\t\\t\"\n", + "print\"\\t\\tReboiler requirements are\\t\"\n", + "print\"\\t\\tTotal liquid to reboiler\\t48330 lb/hr\\t\\t\\tVaporization\\t\\t\\t37900 lb/hr\\t\\t\\tTemperature(nearly isothermal)\\t246DegF\\t\\t\\tPressure\\t\\t\\t5 psig\\t\\t\\tHeat load\\t\\t\\t5800000 Btu/hr\\t\"\n", + "print\"total heat out is btu/hr\",tho \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\n", + "\t\tDEW POINT OF OVERHEAD\n", + "\n", + "\t\tMol/hr\t\tK(148DegF,40 psia)\tV/K\n", + "\n", + "\t\t--------------------------------------------\n", + "\n", + "[ 6.4 219.7 2.3] [ 2.8 1.01 0.34] [ 17 221 74]\n", + "\n", + "\t\tBUBBLE POINTS OF BOTTOMS\n", + "\n", + "\t\tMol/hr\t\tK(330DegF,40psia)\t\tKL\t\tLb/hr\n", + "\n", + "\t\t--------------------------------------------------------------\n", + "\n", + "4.1 5.8 23.8 1700\n", + "49.3 3.0 148.0 13900\n", + "71.9 1.68 120.0 13030\n", + "52.5 0.98 51.4 6260\n", + "54.7 0.57 31.2 4240\n", + "82.5 0.35 28.9 4330\n", + "76.6 0.21 16.1 2640\n", + "22.4 0.13 2.9 520\n", + "\t\t____\t\t\t\t\t____\t\t____\n", + "\n", + "\t\t[ 4 53 124 176 230 312 388 410]\n", + "\t\t\t\t\t[23.800000000000001, 171.80000000000001, 291.80000000000001, 343.19999999999999, 374.39999999999998, 403.29999999999995, 419.39999999999998, 422.29999999999995]\n", + "\t\t[ 1700 13900 13030 6260 4240 4330 2640 520]\n", + "\tAverage mol. wt. \n", + "[ 71.42857143 80.9080326 44.65387252 18.24009324 11.32478632\n", + " 10.7364245 6.29470672 1.23135212]\n", + "\n", + "\n", + "\t\t\t\t\t\tHEAT BALANCES:\n", + "\n", + "\t\t\t\tMol/hr\t\tMol.wt.\t\tLb/hr\t\tTemp,DegF\t\tBtu/lb\t\tBtu/hr\n", + "\t\n", + "\t\t\t----------------------------------------------------------------------------------------\n", + "\n", + "\tHeat Balance onCondeser\n", + "\t Heat in:\n", + "\t Top plate vapor......\n", + "\n", + "\n", + "\t\tCALCULATION OF BOTTOM PLATE TEMPERATURE\n", + "\n", + "\t\ty*\t\t\tReboiler vapor\t\t\t\tK(300DegF,40psia)\tMol*K\n", + "\t\t\t\tV = y*205.7 +\tBottoms\t=\tTrapout\n", + "\n", + "\t\t----------------------------------------------------------------------------------------\n", + "\n", + "CALCULATION OF BOTTOM PLATE TEMPERATURE\n", + " y* Reboiler vapor K(300DegF,40psia) Mol*K\n", + " V = y*205.7 + Bottoms = Trapout\n", + " ----------------------------------------------------------------------------------------\n", + "C5 0.056 11.5 4.1 15.6 4.5 70.29\n", + "C6 0.35 72.0 49.3 121.3 2.25 272.91\n", + "C7 0.285 58.6 71.9 130.5 1.2 156.63\n", + "C8 0.122 25.1 52.5 77.6 0.66 51.21\n", + "C9 0.074 15.2 54.7 69.9 0.38 26.57\n", + "C10 0.068 14.0 82.5 96.5 0.22 21.23\n", + "C11 0.038 7.8 76.6 84.4 0.13 10.97\n", + "C12 0.007 1.4 22.4 23.8 0.07 1.67\n", + "----------------------------------------------------------------------------------------\n", + "1.000 205.7 414.0 619.7 611.5\n", + "Reboiler requirements are\n", + " Vaporization lb/hr 22700\n", + " Total liquor to reboiler lb/hr 78177\n", + " Heat load Btu/hr 4280000\n", + " Temperature range 300-330 def F\n", + " Operating pressure psi 40\n" + ] + } + ], + "source": [ + "print\"\\t example 15.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Dew point of Overhead\n", + "import numpy\n", + "vc=numpy.array([6.4, 219.7, 2.3])\n", + "#vc(1) = 6.4; # Mol/hr\n", + "#vc(2) = 219.7; #Mol/hr\n", + "#vc(3) = 2.3; #Mol/hr\n", + "K=numpy.array([2.8, 1.01, 0.34])\n", + "#K(1) = 2.8; #at 148DegF and 40 psia\n", + "#K(2) = 1.01; #at 148DegF and 40 psia\n", + "#K(3) = 0.34; #at 148DegF and 40 psia\n", + "v=numpy.array([0, 0, 0])\n", + "i=0;\n", + "while (i<3):\n", + " v[0]=vc[0]*K[0];\n", + " v[1]=vc[1]*K[1];\n", + " v[2]=vc[1]*K[2];\n", + " i=i+1;\n", + "\n", + "\n", + "print\"\\n\\t\\tDEW POINT OF OVERHEAD\"\n", + "print\"\\n\\t\\tMol/hr\\t\\tK(148DegF,40 psia)\\tV/K\\n\"\n", + "print\"\\t\\t--------------------------------------------\\n\"\n", + "\n", + "\n", + "print vc,K,v\n", + "\n", + "bc=numpy.array([4.1, 49.3, 71.9, 52.5, 54.7, 82.5, 76.6, 22.4])\n", + "#bc(1)=4.1; #Mol/hr\n", + "#bc(2)=49.3; #Mol/hr\n", + "#c(3)=71.9; #Mol/hr\n", + "#bc(4)=52.5; #Mol/hr\n", + "#bc(5)=54.7; #Mol/hr\n", + "#bc(6)=82.5; #Mol/hr\n", + "#bc(7)=76.6; #Mol/hr\n", + "#bc(8)=22.4; #Mol/hr\n", + "tbc=numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "tbc[0]=tbc[0]+bc[0];\n", + "i=1\n", + "while (i<8):\n", + " tbc[i]=tbc[i-1]+bc[i];\n", + " i=i+1;\n", + "\n", + "\n", + "bK=numpy.array([5.8, 3.0, 1.68, 0.98, 0.57, 0.35, 0.21, 0.13])\n", + "#bK(1)=5.8; #at 330DegF, 40 psia\n", + "#bK(2)=3.0; #at 330DegF, 40 psia\n", + "#bK(3)=1.68; #at 330DegF, 40 psia\n", + "#bK(4)=0.98; #at 330DegF, 40 psia\n", + "#bK(5)=0.57; #at 330DegF, 40 psia\n", + "#bK(6)=0.35; #at 330DegF, 40 psia\n", + "#bK(7)=0.21; #at 330DegF, 40 psia\n", + "#bK(8)=0.13; #at 330DegF, 40 psia\n", + "\n", + "KL=numpy.array([23.8, 148.0, 120.0, 51.4, 31.2, 28.9, 16.1, 2.9])\n", + "\n", + "#KL(1)=23.8;\n", + "#KL(2)=148.0;\n", + "#KL(3)=120.8;\n", + "#KL(4)=51.4;\n", + "#KL(5)=31.2;\n", + "#KL(6)=28.9;\n", + "#KL(7)=16.1;\n", + "#KL(8)=2.9;\n", + "\n", + "tk=([0, 0, 0, 0, 0, 0, 0, 0])\n", + "i=1;\n", + "op=40;\n", + "tk[0]=KL[0]\n", + "while (i<8):\n", + " tk[i]=tk[i-1]+KL[i];\n", + " i=i+1;\n", + "\n", + "l=numpy.array([1700, 13900, 13030, 6260, 4240, 4330, 2640, 520]) \n", + "#l(1)=1700; #Lb/hr\n", + "#l(2)=13900; #Lb/hr\n", + "#l(3)=13030; #Lb/hr\n", + "#l(4)=6260; #Lb/hr\n", + "#l(5)=4240; #Lb/hr\n", + "#l(6)=4330; #Lb/hr\n", + "#l(7)=2640; #Lb/hr\n", + "#l(8)=520; #Lb/hr\n", + "\n", + "tl=numpy.array([0, 0, 0, 0, 0, 0, 0, 0,])\n", + "\n", + "i=0;\n", + "while (i<8):\n", + " tl[i]=tl[i]+l[i];\n", + " i=i+1;\n", + "\n", + "print\"\\n\\t\\tBUBBLE POINTS OF BOTTOMS\\n\"\n", + "print\"\\t\\tMol/hr\\t\\tK(330DegF,40psia)\\t\\tKL\\t\\tLb/hr\\n\"\n", + "print\"\\t\\t--------------------------------------------------------------\\n\"\n", + "tlr=78177;\n", + "i=0;\n", + "while (i<8):\n", + "\n", + " print bc[i],bK[i],KL[i],l[i]\n", + " i=i+1;\n", + "\n", + "print\"\\t\\t____\\t\\t\\t\\t\\t____\\t\\t____\\n\"\n", + "\n", + "print\"\\t\\t\",tbc \n", + "print\"\\t\\t\\t\\t\\t\",tk \n", + "print\"\\t\\t\",tl\n", + "av = numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "av=tl/tk\n", + "hl=4280000;\n", + "print\"\\tAverage mol. wt. \\n\",av\n", + "\n", + "lh=numpy.array([48894, 16298, 32596])\n", + "bl=numpy.array([286, 129, 129])\n", + "#lh(1)=48894;#Lb/hr\n", + "#lh(2)=16298;#Lb/hr\n", + "#lh(3)=32596;#Lb/hr\n", + "#bl(1)=286;#Btu/hr\n", + "#bl(2)=129;#Btu/hr\n", + "#bl(3)=129;#Btu/hr\n", + "\n", + "bh=numpy.array([0, 0, 0])\n", + "vap=22700;\n", + "i=0;\n", + "\n", + "while (i<3):\n", + " bh[0]=lh[0]*bl[0];\n", + " i=i+1;\n", + "\n", + "#Heat Balances\n", + "print\"\\n\\n\\t\\t\\t\\t\\t\\tHEAT BALANCES:\"\n", + "print\"\\n\\t\\t\\t\\tMol/hr\\t\\tMol.wt.\\t\\tLb/hr\\t\\tTemp,DegF\\t\\tBtu/lb\\t\\tBtu/hr\\n\\t\"\n", + "print\"\\t\\t\\t----------------------------------------------------------------------------------------\"\n", + "print\"\\n\\tHeat Balance onCondeser\\n\\t Heat in:\\n\\t Top plate vapor......\"\n", + "\n", + "#Heat Balances on reboiler\n", + "#Assume 30Deg difference between reboiler and bottom plate giving bottom-plate temperature of 300DegF\n", + "#Mol/hr from Eq. 15.47\n", + "\n", + "pc=numpy.array([0.056, 0.35, 0.285, 0.122, 0.074, 0.068, 0.038, 0.007])\n", + "#pc(1)=0.056;\n", + "#pc(2)=0.350;\n", + "##pc(3)=0.285;\n", + "#pc(4)=0.122;\n", + "#pc(5)=0.074;\n", + "#pc(6)=0.068;\n", + "#pc(7)=0.038;\n", + "#pc(8)=0.007;\n", + "\n", + "pk=numpy.array([4.5, 2.25, 1.2, 0.66, 0.38, 0.22, 0.13, 0.07])\n", + "#pK(1)=4.5;\n", + "#pK(2)=2.25;\n", + "#pK(3)=1.20;\n", + "#pK(4)=0.66;\n", + "#pK(5)=0.38;\n", + "#pK(6)=0.22;\n", + "#pK(7)=0.13;\n", + "#pK(8)=0.07;\n", + "\n", + "print\"\\n\\n\\t\\tCALCULATION OF BOTTOM PLATE TEMPERATURE\\n\"\n", + "print\"\\t\\ty*\\t\\t\\tReboiler vapor\\t\\t\\t\\tK(300DegF,40psia)\\tMol*K\\n\\t\\t\\t\\tV = y*205.7 +\\tBottoms\\t=\\tTrapout\\n\"\n", + "print\"\\t\\t----------------------------------------------------------------------------------------\\n\"\n", + "\n", + "\n", + "print \"CALCULATION OF BOTTOM PLATE TEMPERATURE\"\n", + "print\" y* Reboiler vapor K(300DegF,40psia) Mol*K\"\n", + "print\" V = y*205.7 + Bottoms = Trapout\"\n", + "print\" ----------------------------------------------------------------------------------------\"\n", + "print \"C5 0.056 11.5 4.1 15.6 4.5 70.29\"\n", + "print \"C6 0.35 72.0 49.3 121.3 2.25 272.91\"\n", + "print \"C7 0.285 58.6 71.9 130.5 1.2 156.63\"\n", + "print \"C8 0.122 25.1 52.5 77.6 0.66 51.21\"\n", + "print \"C9 0.074 15.2 54.7 69.9 0.38 26.57\"\n", + "print \"C10 0.068 14.0 82.5 96.5 0.22 21.23\"\n", + "print \"C11 0.038 7.8 76.6 84.4 0.13 10.97\"\n", + "print \"C12 0.007 1.4 22.4 23.8 0.07 1.67\"\n", + "print \"----------------------------------------------------------------------------------------\"\n", + "print \"1.000 205.7 414.0 619.7 611.5\"\n", + "\n", + "\n", + "print\"Reboiler requirements are\"\n", + "print\" Vaporization lb/hr\",vap\n", + "print\" Total liquor to reboiler lb/hr\",tlr \n", + "print\" Heat load Btu/hr\",hl\n", + "print\" Temperature range 300-330 def F\"\n", + "print\" Operating pressure psi\",op " + ] + } + ], + "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/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 new file mode 100644 index 00000000..d185cf80 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_15__Vaporizers_Evapourators_and_Reboilers_4.ipynb @@ -0,0 +1,1315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 : Vaporizers Evapourators and Reboilers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat required for steam is : Btu/hr \t9453000.0\n", + "\t total heat required for kerosene is : Btu/hr \t9450000.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t91.1262293169\n", + "\t A : ft**2 \t1037.02304713\n", + "\t By the law of mixtures \t\n", + "\t v2 : %.0f ft**3/lb \t11.0034\n", + "\t vav : ft**3/lb \t3.16417120715\n", + "\t By the approximate method \t\n", + "\t vav : ft**3/lb \t5.5102\n", + "\t actual density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.00505661639416\n", + "\t approximate density : lb/ft**3 \t0.316038524635\n", + "\t s : \t0.0029\n" + ] + } + ], + "source": [ + "print\"\\t example 15.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=250;\n", + "T1=400;\n", + "T2=300;\n", + "w=10000; # lb/hr\n", + "W=150000; # lb/hr\n", + "l=945.3; # Btu/(lb) , table 7\n", + "from math import log10\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "C=0.63; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \\t\",Q\n", + "delt1=T2-ts; #F\n", + "delt2=T1-ts; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "UD=100;\n", + "A=(Q/(UD*LMTD));\n", + "print\"\\t A : ft**2 \\t\",A\n", + "WC=94500; # Btu/F\n", + "vl=0.017; # ft**3/lb, from table 7\n", + "vv=13.75; # ft**3/lb, from table 7\n", + "print\"\\t By the law of mixtures \\t\"\n", + "# Assume 80 per cent of the outlet fluid is vapor\n", + "v2=(0.8*vv)+(.2*vl);\n", + "print\"\\t v2 : ft**3/lb \\t\",v2\n", + "vav=(WC*(v2-vl)/(UD*A))-((WC*(T2-ts)/(l*w))*(vv-vl))+vl;\n", + "print\"\\t vav : ft**3/lb \\t\",vav\n", + "print\"\\t By the approximate method \\t\"\n", + "vav1=(vl+v2)/(2);\n", + "print\"\\t vav : ft**3/lb \\t\",vav1\n", + "row=62.5;\n", + "rowac=(1/vav);\n", + "s=(rowac/row);\n", + "print\"\\t actual density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",s\n", + "rowap=(1/vav1);\n", + "s=(rowap/row);\n", + "print\"\\t approximate density : lb/ft**3 \\t\",rowac\n", + "print\"\\t s : \\t\",round(s,4)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2 pgno:464" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for preheat of butane is : Btu/hr \t2124200\n", + "\t total heat required for vapourisation of butane is : Btu/hr \t2172500\n", + "\t total heat required for butane is : Btu/hr \t4296700\n", + "\t for steam \t\n", + "\t total heat required for steam is : Btu/hr \t4297328.0\n", + "\t Wp1 is : lb/hr \t13401.8927445\n", + "\t Wv1 is : lb/hr \t21092\n", + "\t W is : lb/hr \t34493.8927445\n", + "\t weighted delt is : % F \t124.582285677\n", + "\t caloric temperature of hot fluid is : F \t338\n", + "\t caloric temperature of cold fluid is : F \t171\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.15675\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t31132.3763955\n", + "\t reynolds number is : \t62178.9886688\n", + "\t hio is : Btu/(hr)*(ft**2)*(F) \t1500\n", + "\t cold fluid:shell side,butane \t\n", + "\t preheating \t\n", + "\t flow area is : ft**2 \t0.105902777778\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t233232.786885\n", + "\t reynolds number is : \t69214.7658922\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t231.272727273\n", + "\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \t200.378071834\n", + "\t clean surface required for preheating : ft**2 \t66.883030772\n", + "\t for vapourisation \t\n", + "\t reynolds number is : \t79511.1773472\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t236.96969697\n", + "\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \t204.640614096\n", + "\t clean surface required for vapourisation : ft**2 \t103.069633088\n", + "\t total clean surface : ft**2 \t169.952663859\n", + "\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \t202.96313674\n", + "\t total surface area is : ft**2 \t318.3488\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.352513798\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00430213212754\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.16\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t preheating \t\n", + "\t length of preheat zone : ft \t6.29662676683\n", + "\t number of crosses are : \t15.1119042404\n", + "\t delPsp is : psi \t0.703032923143\n", + "\t vapourisation \t\n", + "\t number of crosses are : \t23.28\n", + "\t delPsv is : psi \t1.89396418309\n", + "\t delPS is : psi \t2.6\n", + "\t allowable delPa is 5 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=108; # inlet cold fluid,F\n", + "t2=235; # outlet cold fluid,F\n", + "Ts=338;\n", + "Wp=24700; # lb/hr\n", + "Wv=19750; # lb/hr\n", + "w=4880; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=162; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=248; # enthalpy at t2, Btu/lb, fig 9\n", + "qp=(Wp*(Ht2-Ht1)); # for preheat\n", + "print\"\\t total heat required for preheat of butane is : Btu/hr \\t\",qp\n", + "Ht3=358; # enthalpy of vapour at t2, Btu/lb, fig 9\n", + "qv=Wv*(Ht3-Ht2);\n", + "print\"\\t total heat required for vapourisation of butane is : Btu/hr \\t\",qv\n", + "Q=qp+qv;\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "print\"\\t for steam \\t\"\n", + "l=880.6; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "deltp=158.5; # F, from eq 5.14\n", + "deltv=103; # F eq 5.14\n", + "Wp1=(qp/deltp);\n", + "print\"\\t Wp1 is : lb/hr \\t\",Wp1\n", + "Wv1=(qv/deltv);\n", + "print\"\\t Wv1 is : lb/hr \\t\",Wv1\n", + "W=(Wp1+Wv1);\n", + "print\"\\t W is : lb/hr \\t\",W\n", + "delt=(Q/W);\n", + "print\"\\t weighted delt is : % F \\t\",delt\n", + "Tc=((Ts)+(Ts))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=76;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.594; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.0363; # at 338F, fig 15,lb/(ft)*(hr)\n", + "D=0.0725; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hio=1500; # condensing steam,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hio is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid:shell side,butane \\t\"\n", + "print\"\\t preheating \\t\"\n", + "ID=15.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(Wp/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.278; # at 172F,lb/(ft)*(hr), from fig.14\n", + "De=0.0825; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=159; # from fig.28\n", + "Z=0.12; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hop=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hop\n", + "Up=((hio)*(hop)/(hio+hop)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for preheating : Btu/(hr)*(ft**2)*(F) \\t\",Up\n", + "Ap=(qp/(Up*deltp));\n", + "print\"\\t clean surface required for preheating : ft**2 \\t\",Ap\n", + "print\"\\t for vapourisation \\t\"\n", + "mu2=0.242; # at 172F,lb/(ft)*(hr), from fig.14\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=170; # from fig.28\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "hov=((jH)*(1/De)*(Z)); #using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hov\n", + "Uv=((hio)*(hov)/(hio+hov)); # clean overall coefficient,eq 6.38,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient for vapourisation : Btu/(hr)*(ft**2)*(F) \\t\",Uv\n", + "Av=(qv/(Uv*deltv));\n", + "print\"\\t clean surface required for vapourisation : ft**2 \\t\",Av\n", + "Ac=Ap+Av;\n", + "print\"\\t total clean surface : ft**2 \\t\",Ac\n", + "UC=((Up*Ap)+(Uv*Av))/(Ac);\n", + "print\"\\t weighted clean overall coefficient : Btu/(hr)*(ft**2)*(F) \\t\",UC\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# A total of 170 ft2 are required of which 103 are to be used for vaporization. For the total surface required 318 ft2 will be provided. It can be assumed, then, that the surface provided for vaporization is 193ft**2\n", + "# then flux is Q/A=10700, which is with in satisfactory levels.\n", + "Rd=((UC-UD)/((UD)*(UC))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000165; # friction factor for reynolds number 62000, using fig.26\n", + "s=0.00413;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt)))/(2); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "print\"\\t preheating \\t\"\n", + "f=0.00145; # friction factor for reynolds number 69200, using fig.29\n", + "Lp=(L*Ap/Ac); #ft\n", + "print\"\\t length of preheat zone : ft \\t\",Lp\n", + "N=(12*Lp/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "s=0.5; # for reynolds number 69200,using fig.6\n", + "Ds=1.27; # fig 28\n", + "phys=1;\n", + "delPsp=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPsp is : psi \\t\",delPsp\n", + "print\"\\t vapourisation \\t\"\n", + "f=0.00142;\n", + "Lv=9.7; # Lv=L-Lp\n", + "Nv=(12*Lv/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",Nv\n", + "s=0.28; \n", + "delPsv=((f*(Gs**2)*(Ds)*(Nv))/(5.22*(10**10)*(De)*(s)*(1))); # using eq 12.47,psi\n", + "print\"\\t delPsv is : psi \\t\",delPsv\n", + "delPS=delPsp+delPsv;\n", + "print\"\\t delPS is : psi \\t\",round(delPS,2)\n", + "print\"\\t allowable delPa is 5 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3 pgno:475" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gasoline is : Btu/hr \t2669500\n", + "\t total heat required for gasoil is : Btu/hr \t2671900.0\n", + "\t S is : \t0.428571428571\n", + "\t Tc is : F \t517.0\n", + "\t hot fluid:inner tube side,gasoil \t\n", + "\t flow area is : ft**2 \t0.0429722222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t807498.383969\n", + "\t reynolds number is : \t86215.9813038\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t374.063400576\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t311.968876081\n", + "\t cold fluid:shell side,gasoline \t\n", + "\t tw is : F \t459.64414193\n", + "\t deltw : F \t59.6441419296\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t152.933697255\n", + "\t total surface area is : ft**2 \t213.6288\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t105.993294626\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00289577777619\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t2.73790740915\n", + "\t delPr is : psi \t3.04225352113\n", + "\t delPT is : psi \t5.8\n", + "\t allowable delPa is 10psi \t\n", + "\t delPs is negligible \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "ts=400;\n", + "T1=575;\n", + "T2=475;\n", + "W=28100; # lb/hr\n", + "w=34700; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "HT1=290; # enthalpy at T1, Btu/lb, fig 11\n", + "HT2=385; # enthalpy at T2, Btu/lb, fig 11\n", + "Q=(W*(HT2-HT1)); # for preheat\n", + "print\"\\t total heat required for gasoline is : Btu/hr \\t\",Q\n", + "c=0.77; # Btu/(lb), table 7\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt=118; # F eq 5.14\n", + "S=75./175.;#((T2-ts)/(T1-ts));\n", + "print\"\\t S is : \\t\",S\n", + "Kc=0.37; # fig 17\n", + "Fc=0.42;\n", + "Tc=(T2+(0.42*(T1-T2)));\n", + "print\"\\t Tc is : F \\t\",Tc\n", + "print\"\\t hot fluid:inner tube side,gasoil \\t\"\n", + "Nt=68;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.65; # at 517F, fig 14,lb/(ft)*(hr)\n", + "D=0.0694; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=220; # from fig.24\n", + "Z=0.118; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #hi/phyt, Hi=()using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "# (mu1/muw)**(0.14) is negligible\n", + "print\"\\t cold fluid:shell side,gasoline \\t\"\n", + "ho=300; # assumption\n", + "tw=(ts)+(((Hio)/(Hio+ho))*(Tc-ts)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-ts);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, ho>300\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=12500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00015; # friction factor for reynolds number 85700, using fig.26\n", + "s=0.71;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.09; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is 10psi \\t\"\n", + "print\"\\t delPs is negligible \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4 pgno:482" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.4\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t qv is : Btu/hr \t3654000\n", + "\t qs is : Btu/hr \t539000\n", + "\t total heat required for naphtha is : Btu/hr \t4193000\n", + "\t total heat required for gasoil is : Btu/hr \t4207500.0\n", + "\t delt1 is : F \t85.0\n", + "\t delt2 is : F \t190.0\n", + "\t LMTD is : F \t130.683201952\n", + "\t R is : \t6.25\n", + "\t S is : \t0.0952380952381\n", + "\t FT is 0.97 \t\n", + "\t delt is : F \t126.762705893\n", + "\t ratio of two local temperature difference is : \t0.447368421053\n", + "\t caloric temperature of hot fluid is : F \t451.25\n", + "\t caloric temperature of cold fluid is : F \t323.2\n", + "\t hot fluid:inner tube side,steam \t\n", + "\t flow area is : ft**2 \t0.0549791666667\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t927624.100038\n", + "\t reynolds number is : \t59146.6742685\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t343.251798561\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t286.272\n", + "\t cold fluid:shell side,naphtha \t\n", + "\t tw is : F \t398.584002369\n", + "\t deltw : F \t75.384002369\n", + "\t qv/hv : \t12180\n", + "\t qs/hs : \t8983\n", + "\t A : \t21163\n", + "\t ho : \t198.813967774\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t117.329454908\n", + "\t total surface area is : ft**2 \t364.4256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t91.0801518561\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.00245633150105\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t5.24018227225\n", + "\t delPr is : psi \t4.82191780822\n", + "\t delPT is : psi \t10.1\n", + "\t allowable delPa is negligible \t\n", + "\t pressure drop for annulus \t\n", + "\t flow area : in**2 \t131.70828125\n", + "\t wetted perimeter : in \t236.7325\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20992.3664122\n", + "\t reynolds number is : \t59146.6742685\n", + "\t delPs is : psi \t0.25\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 15.4\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=315.; # inlet cold fluid,F\n", + "t2=335.; # outlet cold fluid,F\n", + "T1=525.;\n", + "T2=400.;\n", + "Wv=29000; # lb/hr\n", + "Ws=38500; # lb/hr\n", + "w=51000; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=238; # enthalpy at t1, Btu/lb, fig 9\n", + "Ht2=252; # enthalpy at t2, Btu/lb, fig 9\n", + "Ht3=378; # enthalpy of vapour at t2 \n", + "qv=(Wv*(Ht3-Ht2)); # for preheat\n", + "print\"\\t qv is : Btu/hr \\t\",qv\n", + "qs=Ws*(Ht2-Ht1);\n", + "print\"\\t qs is : Btu/hr \\t\",qs\n", + "Q=qs+qv;\n", + "print\"\\t total heat required for naphtha is : Btu/hr \\t\",Q\n", + "c=0.66; # Btu/(lb)(F)\n", + "Q=((w)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gasoil is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.97 \\t\" # from fig 18\n", + "delt=(0.97*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "X=((delt1)/(delt2)); # fig 17\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.41; # from fig.17\n", + "Kc=0.42;\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:inner tube side,steam \\t\"\n", + "Nt=116;\n", + "n=8; # number of passes\n", + "L=12; #ft\n", + "at1=0.546; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=1.09; # at 451F, fig 14,lb/(ft)*(hr)\n", + "D=0.0695; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=168; # from fig.24\n", + "Z=0.142; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((Hi)*(0.834/1)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "print\"\\t cold fluid:shell side,naphtha \\t\"\n", + "ho1=200; # assumption\n", + "tw=(tc)+(((Hio)/(Hio+ho1))*(Tc-tc)); # from eq.5.31, calculation mistake\n", + "print\"\\t tw is : F \\t\",tw\n", + "deltw=(tw-tc);\n", + "print\"\\t deltw : F \\t\",deltw\n", + "# from fig 15.11, hv>300, hs=60\n", + "Av=(qv/300);\n", + "As=qs/60;\n", + "print\"\\t qv/hv : \\t\",Av\n", + "print\"\\t qs/hs : \\t\",As\n", + "A1=As+Av;\n", + "print\"\\t A : \\t\",A1\n", + "ho=(Q/A1);\n", + "print\"\\t ho : \\t\",ho\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# check for max. flux=Q/A=11500.(satisfactory)\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000168; # friction factor for reynolds number 59200, using fig.26\n", + "s=0.73;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "X1=0.11; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPa is negligible \\t\"\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "Af=(3.14*(21.25**2-(116))/8);\n", + "print\"\\t flow area : in**2 \\t\",Af\n", + "As=0.917; # ft**2\n", + "p=(3.14*21.25/2)+(3.14*1*116/2)+(21.25)\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=0.186; # ft\n", + "Gs=(Ws/(2*As)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu2=0.435; # at 315F, fig 14,lb/(ft)*(hr)\n", + "Res=((De)*(Gs)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.00028; # using fig.26\n", + "row=0.337; # fig 13.14\n", + "# soutlet max=0.071,\n", + "s=0.35; # using fig.6\n", + "phys=1;\n", + "delPs=0.25 #((f*(Gs**2)*(L))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5 pgno:488" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.5\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for butane is : Btu/hr \t3957600\n", + "\t total heat required for steam is : Btu/hr \t3966760\n", + "\t trail 1 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t105.068772287\n", + "\t total surface area is : ft**2 \t342.3472\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t92.6956025929\n", + "\t vapour density : lb/ft**3 \t3.18723589714\n", + "\t weight flow of recirculated liquid : lb/hr \t163200\n", + "\t volume of liquid : ft**3 \t6071.04\n", + "\t volume of vapour : ft**3 \t17952.0\n", + "\t total volume out of reboiler : ft**3 \t24023.04\n", + "\t vo is : ft**3/lb \t0.11776\n", + "\t pressure leg : psi \t1.58756230188\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.228597222222\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t892399.295218\n", + "\t reynolds number is : \t190648.940342\n", + "\t delPt is : psi \t2.1\n", + "negilgable\n", + "\t total resisitance : psi \t3.69151627479\n", + "\t driving force : psi \t2.98611111111\n", + "\t trial 2 \t\n", + "\t A1 is : ft**2 \t330\n", + "\t number of tubes are : \t140.091696383\n", + "\t total surface area is : ft**2 \t355.6956\n", + "\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.21695967\n", + "\t pressure leg : psi \t1.19067172641\n", + "\t frictional resistance \t\n", + "\t flow area is : ft**2 \t0.316680555556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t644182.272707\n", + "\t reynolds number is : \t137620.75826\n", + "\t delPt is : psi \t0.874030618788\n", + "\t total resisitance : psi \t2.0647023452\n", + "\t driving force : psi \t2.23958333333\n", + "\t hot fluid : shell side,steam \t\n", + "\t cold fluid:inner tube side, butane \t\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t734.042553191\n", + "\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t248.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t212.814645309\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.006537030325\n" + ] + } + ], + "source": [ + "print\"\\t example 15.5\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "W=40800; # lb/hr\n", + "w=4570; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "Ht1=241; # enthalpy of liquid at 228F, Btu/lb, fig 9\n", + "Ht2=338; # enthalpy of vapourat 228F, Btu/lb, fig 9\n", + "Q=(W*(Ht2-Ht1));\n", + "print\"\\t total heat required for butane is : Btu/hr \\t\",Q\n", + "l=868; # Btu/(lb), table 7\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \\t\",Q\n", + "delt=125; # delt=LMTD, isothermal boiling, eq 5.14\n", + "# Tc and tc: Both streams are isuthermal\n", + "print\"\\t trail 1 \\t\"\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=16;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=109; # assuming one tube passes, 13.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "# Assume 4: 1 recirculation ratio\n", + "rowv=(58/(359*(688/492)*(14.7/290))); # eq 15.18\n", + "print\"\\t vapour density : lb/ft**3 \\t\",rowv\n", + "Vv=0.44; \n", + "Vl=0.0372; # fig 6\n", + "W1=4*W;\n", + "print\"\\t weight flow of recirculated liquid : lb/hr \\t\",W1\n", + "VL=W1*Vl;\n", + "VV=W*Vv;\n", + "print\"\\t volume of liquid : ft**3 \\t\",VL\n", + "print\"\\t volume of vapour : ft**3 \\t\",VV\n", + "V=VL+VV;\n", + "print\"\\t total volume out of reboiler : ft**3 \\t\",V\n", + "vo=(V/(W1+W));\n", + "print\"\\t vo is : ft**3/lb \\t\",vo\n", + "Pl=((2.3*16)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=109;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000127; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "P=Pl+delPt;\n", + "print\"negilgable\"\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(16*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# The resistances are greater than the hydrostatic head can provide; hence the recirculation ratio will be less than 4: 1\n", + "print\"\\t trial 2 \\t\" # Assume 12'0\" tubes and 4:1 recirculation ratio\n", + "A1=((Q)/((12000))); # Q/A1 =12000, first trial should always be taken for the maximum allowable flux\n", + "print\"\\t A1 is : ft**2 \\t\",A1\n", + "a1=0.1963; # ft**2/lin ft\n", + "L=12;\n", + "N1=(A1/(L*a1)); # table 10\n", + "print\"\\t number of tubes are : \\t\",N1\n", + "N2=151; # assuming one tube passes, 15.25-in ID, from table 9\n", + "A2=(N2*L*a1); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(delt)));\n", + "print\"\\t correct design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Pl=((2.3*12)/(144*(vo-Vl)))*(log10(vo/Vl));\n", + "print\"\\t pressure leg : psi \\t\",Pl\n", + "print\"\\t frictional resistance \\t\"\n", + "Nt=151;\n", + "n=1; # number of passes\n", + "at1=0.302; # flow area,table 10, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=((W1+W)/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu1=0.242; # at 228F, fig 14,lb/(ft)*(hr)\n", + "D=0.0517; # ft\n", + "Ret=((D)*(Gt)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "f=0.000135; # using fig.26\n", + "s=0.285;\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(12)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",delPt\n", + "P=Pl+delPt;\n", + "print\"\\t total resisitance : psi \\t\",P\n", + "F=(12*0.43*62.5/144);\n", + "print\"\\t driving force : psi \\t\",F\n", + "# Since the driving force is slightly greater than the resistances, a recirculation ratio better than 4:1 is assured.\n", + "print\"\\t hot fluid : shell side,steam \\t\"\n", + "ho=1500; # condensing steam\n", + "print\"\\t cold fluid:inner tube side, butane \\t\"\n", + "jH=330; # from fig.24\n", + "Z=0.115; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hi=((jH)*(1/D)*(Z)); #, Hi=(hi/phyt)using eq.6.15d,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "Hio=((300)*(0.62/0.75)); #Hio=(hio/phyp), using eq.6.9\n", + "print\"\\t Correct Hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",Hio\n", + "Uc=((Hio)*(ho)/(Hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "UD=89;\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6 pgno492" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.6\t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total heat duty : Btu/hr \t5799016.0\n", + "\t total heat duty : lb/hr \t37902.0\n" + ] + } + ], + "source": [ + "print\"\\t example 15.6\\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#20000=WD+WB;\n", + "#0.99*WD+(0.05*WB)=(20000*.5);\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "HBl=108; # fig 3 and 12\n", + "HDl=85.8; #fig 3 and 12\n", + "HDv=253.8; # fig 3 and 12\n", + "HFl=92; # fig 3 and 12\n", + "l=153; # fig 3 and 12\n", + "QR=((2.54+1)*WD*(HDv))-(2.54*WD*HDl)+(WB*HBl)-(20000*HFl);\n", + "print\"\\t total heat duty : Btu/hr \\t\",round(QR)\n", + "Q=QR/153;\n", + "print\"\\t total heat duty : lb/hr \\t\",round(Q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7 pgno:502" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\ttotal Lb/hr is \t20000\n", + "\ttotal Mol/hr is \t235.5\n", + "\tx1 of C6H6 is \t0.543524416136\n", + "\tx1 of C7H8 is \t0.456475583864\n", + "\tTotal x1 is \t1.0\n", + "\tx1Pp1 of C6H6 is \t750.063694268\n", + "\tx1Pp1 of C7H8 is \t262.473460722\n", + "\tTotal x1Pp1 is \t1012.53715499\n", + "\ty1 of C6H6 is \t0.740776464914\n", + "\ty1 of C7H8 is \t0.259223535086\n", + "\tTotal y1 is \t1.0\n", + "\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\t0.558\n", + "\tWR` = %.2f (mol reflux)/(mol distillate)\t1.27\n", + "\tAssumed 200 percent of the theoretical minimum reflux as economic\t\tWR = (mol)/(mil distillate)\t2.54\n", + "\tThe intercept for the upper operating line = \t0.280225988701\n", + "\tConnecting the corresponding line in Fig. 15.23, plates required: \t13\n", + "\tFeed plate is th(from top)\t7\n", + "\tTotal reflux is \t311.15\n", + "\t\t\t\t\tHeat balances\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\tHeat balance \t\taround condenser:\t\n", + "\t Heat in:\t\t Top plate vapor.......433\t87.3\t\t195\t%.1f\t\t33900 253.8 8603820.0\n", + "\t Heat out:\t\t Distillate............\n", + "122.5\t78.3\t\t195\t\t\t9570 85.8 821106.0\n", + "\t Reflux................\n", + "310.5\t78.3\t\t195\t\t\t24330 85.8 2087514.0\n", + "\t Condenser duty, by\t\t difference........... ..... .... ...... ..\n", + ". ..... 5688000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t8600000\t\t\n", + "\tReboiler vapor is lb/hr\t37908\n", + "\tTrapout is lb/hr\t48338\n", + "\t\t\t\t\tMol/hr\tMol.wt.\tLb/hr\tTemp,DegF\tBtu/lb\tBtu/hr\t\t________________________________________________________________________\t\n", + "\tHeat in:\t\t Trapout...............522\t92.8\t\t246\t108.0\t5230000\t48338\n", + "\t Reboiler duty, \t\t by difference....... .... .... ..... ... ..... 5800000\t\n", + "\t\t\t\t\t\t\t\t\t_______\t\t\t\t\t\t\t\t\t\t11030000\t\t\n", + "\t\tReboiler requirements are\t\n", + "\t\tTotal liquid to reboiler\t48330 lb/hr\t\t\tVaporization\t\t\t37900 lb/hr\t\t\tTemperature(nearly isothermal)\t246DegF\t\t\tPressure\t\t\t5 psig\t\t\tHeat load\t\t\t5800000 Btu/hr\t\n", + "total heat out is btu/hr 7640000\n" + ] + } + ], + "source": [ + "print\"\\t example 15.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "\n", + "#Basis: One hour\n", + "#20000=WD+WB , material balance\n", + "#0.99*WD+(0.05*WB)=(20000*0.5) , Benzene balance\n", + "# solving above two eq. we get WD and WB\n", + "WD=9570; # lb/hr\n", + "WB=10430; # lb/hr\n", + "\n", + "#Compositions and Boiling Points\n", + "#Feed\n", + "l1 = 10000; #Lb/hr , C6H4\n", + "l2 = 10000; #Lb/hr , C7H8\n", + "lb = l1+l2; #Lb/hr\n", + "print\"\\ttotal Lb/hr is \\t\",lb\n", + "mo1 = 78.1; #Mol. wt., C6H6\n", + "mo2 = 93.1; #Mol. wt , C7H8\n", + "mh1 = 128.0; #Mol/hr , C6H6\n", + "mh2 = 107.5; #Mol/hr , C7H8\n", + "mh = mh1 + mh2; # Mol/hr\n", + "print\"\\ttotal Mol/hr is \\t\",mh\n", + "x1 = mh1/mh;\n", + "print\"\\tx1 of C6H6 is \\t\",x1\n", + "x2 = mh2/mh;\n", + "print\"\\tx1 of C7H8 is \\t\",x2\n", + "x = x1+x2;\n", + "print\"\\tTotal x1 is \\t\",x\n", + "Pp1= 1380; # 214Deg F\n", + "Pp2=575; # 214Deg F\n", + "xp1 = x1*Pp1;\n", + "print\"\\tx1Pp1 of C6H6 is \\t\",xp1\n", + "xp2 = x2*Pp2;\n", + "print\"\\tx1Pp1 of C7H8 is \\t\",xp2\n", + "sxp = xp1 + xp2;\n", + "print\"\\tTotal x1Pp1 is \\t\",sxp\n", + "y1 = xp1/sxp;\n", + "print\"\\ty1 of C6H6 is \\t\",y1\n", + "y2 = xp2/sxp;\n", + "print\"\\ty1 of C7H8 is \\t\",y2\n", + "y = y1+y2;\n", + "print\"\\tTotal y1 is \\t\",y\n", + "\n", + "\n", + "w1 = 0.558; #from eq 15.42\n", + "print\"\\t(WR`/V =((xD - yF)/.(xD - xF))) = mol/mol\\t\",w1\n", + "wD=1;\n", + "xD = 0.992;\n", + "#V = WR' + WD\n", + "# WR'/V = 0.558\n", + "#Solving, WR' = (WR' * 0.558) + (0.558 * WD)\n", + "Wr = 1.27; # mol reflux/mol distillate\n", + "print\"\\tWR` = %.2f (mol reflux)/(mol distillate)\\t\",Wr\n", + "Wr1 = Wr * 2; # mol/ mol distillate\n", + "print\"\\tAssumed 200 percent of the theoretical minimum reflux as economic\\t\\tWR = (mol)/(mil distillate)\\t\",Wr1\n", + "In = (wD * xD)/(Wr1 + 1); #intercept for the upper operating line\n", + "print\"\\tThe intercept for the upper operating line = \\t\",In\n", + "p = 13; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tConnecting the corresponding line in Fig. 15.23, plates required: \\t\",p\n", + "fp = 7; # From fig. 15.23, connecting the corresponding lines\n", + "print\"\\tFeed plate is th(from top)\\t\",fp\n", + "d=122.5;\n", + "tf = Wr1 * d;\n", + "print\"\\tTotal reflux is \\t\",tf\n", + "print\"\\t\\t\\t\\t\\tHeat balances\"\n", + "\n", + "#Heat Balances\n", + "l1 = 33900;\n", + "l2 = 9570;\n", + "l3 = 24330;\n", + "b1 = 253.8;\n", + "b2 = 85.8;\n", + "b3 = 85.8;\n", + "bt1 = b1*l1;\n", + "bt2 = b2*l2;\n", + "bt3 = b3*l3;\n", + "bt4 = 5688000;\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\\tHeat balance \\t\\taround condenser:\\t\"\n", + "print\"\\t Heat in:\\t\\t Top plate vapor.......433\\t87.3\\t\\t195\\t%.1f\\t\\t\",l1,b1,bt1\n", + "print\"\\t Heat out:\\t\\t Distillate............\"\n", + "print\"122.5\\t78.3\\t\\t195\\t\\t\\t\",l2,b2,bt2\n", + "print\"\\t Reflux................\"\n", + "print\"310.5\\t78.3\\t\\t195\\t\\t\\t\",l3,b3,bt3\n", + "print\"\\t Condenser duty, by\\t\\t difference........... ..... .... ...... ..\"\n", + "print\". ..... 5688000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t8600000\\t\\t\"\n", + "tho=7640000;\n", + "\n", + "lam = 153; # At 246 DegF, Btu/hr\n", + "rv = 5800000/153; #Lb/hr\n", + "print\"\\tReboiler vapor is lb/hr\\t\",rv\n", + "to = rv + 10430; #Lb/hr\n", + "print\"\\tTrapout is lb/hr\\t\",to\n", + "\n", + "print\"\\t\\t\\t\\t\\tMol/hr\\tMol.wt.\\tLb/hr\\tTemp,DegF\\tBtu/lb\\tBtu/hr\\t\\t________________________________________________________________________\\t\"\n", + "print\"\\tHeat in:\\t\\t Trapout...............522\\t92.8\\t\\t246\\t108.0\\t5230000\\t\",to\n", + "print\"\\t Reboiler duty, \\t\\t by difference....... .... .... ..... ... ..... 5800000\\t\"\n", + "print\"\\t\\t\\t\\t\\t\\t\\t\\t\\t_______\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t11030000\\t\\t\"\n", + "print\"\\t\\tReboiler requirements are\\t\"\n", + "print\"\\t\\tTotal liquid to reboiler\\t48330 lb/hr\\t\\t\\tVaporization\\t\\t\\t37900 lb/hr\\t\\t\\tTemperature(nearly isothermal)\\t246DegF\\t\\t\\tPressure\\t\\t\\t5 psig\\t\\t\\tHeat load\\t\\t\\t5800000 Btu/hr\\t\"\n", + "print\"total heat out is btu/hr\",tho \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 15.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\n", + "\t\tDEW POINT OF OVERHEAD\n", + "\n", + "\t\tMol/hr\t\tK(148DegF,40 psia)\tV/K\n", + "\n", + "\t\t--------------------------------------------\n", + "\n", + "[ 6.4 219.7 2.3] [ 2.8 1.01 0.34] [ 17 221 74]\n", + "\n", + "\t\tBUBBLE POINTS OF BOTTOMS\n", + "\n", + "\t\tMol/hr\t\tK(330DegF,40psia)\t\tKL\t\tLb/hr\n", + "\n", + "\t\t--------------------------------------------------------------\n", + "\n", + "4.1 5.8 23.8 1700\n", + "49.3 3.0 148.0 13900\n", + "71.9 1.68 120.0 13030\n", + "52.5 0.98 51.4 6260\n", + "54.7 0.57 31.2 4240\n", + "82.5 0.35 28.9 4330\n", + "76.6 0.21 16.1 2640\n", + "22.4 0.13 2.9 520\n", + "\t\t____\t\t\t\t\t____\t\t____\n", + "\n", + "\t\t[ 4 53 124 176 230 312 388 410]\n", + "\t\t\t\t\t[23.800000000000001, 171.80000000000001, 291.80000000000001, 343.19999999999999, 374.39999999999998, 403.29999999999995, 419.39999999999998, 422.29999999999995]\n", + "\t\t[ 1700 13900 13030 6260 4240 4330 2640 520]\n", + "\tAverage mol. wt. \n", + "[ 71.42857143 80.9080326 44.65387252 18.24009324 11.32478632\n", + " 10.7364245 6.29470672 1.23135212]\n", + "\n", + "\n", + "\t\t\t\t\t\tHEAT BALANCES:\n", + "\n", + "\t\t\t\tMol/hr\t\tMol.wt.\t\tLb/hr\t\tTemp,DegF\t\tBtu/lb\t\tBtu/hr\n", + "\t\n", + "\t\t\t----------------------------------------------------------------------------------------\n", + "\n", + "\tHeat Balance onCondeser\n", + "\t Heat in:\n", + "\t Top plate vapor......\n", + "\n", + "\n", + "\t\tCALCULATION OF BOTTOM PLATE TEMPERATURE\n", + "\n", + "\t\ty*\t\t\tReboiler vapor\t\t\t\tK(300DegF,40psia)\tMol*K\n", + "\t\t\t\tV = y*205.7 +\tBottoms\t=\tTrapout\n", + "\n", + "\t\t----------------------------------------------------------------------------------------\n", + "\n", + "CALCULATION OF BOTTOM PLATE TEMPERATURE\n", + " y* Reboiler vapor K(300DegF,40psia) Mol*K\n", + " V = y*205.7 + Bottoms = Trapout\n", + " ----------------------------------------------------------------------------------------\n", + "C5 0.056 11.5 4.1 15.6 4.5 70.29\n", + "C6 0.35 72.0 49.3 121.3 2.25 272.91\n", + "C7 0.285 58.6 71.9 130.5 1.2 156.63\n", + "C8 0.122 25.1 52.5 77.6 0.66 51.21\n", + "C9 0.074 15.2 54.7 69.9 0.38 26.57\n", + "C10 0.068 14.0 82.5 96.5 0.22 21.23\n", + "C11 0.038 7.8 76.6 84.4 0.13 10.97\n", + "C12 0.007 1.4 22.4 23.8 0.07 1.67\n", + "----------------------------------------------------------------------------------------\n", + "1.000 205.7 414.0 619.7 611.5\n", + "Reboiler requirements are\n", + " Vaporization lb/hr 22700\n", + " Total liquor to reboiler lb/hr 78177\n", + " Heat load Btu/hr 4280000\n", + " Temperature range 300-330 def F\n", + " Operating pressure psi 40\n" + ] + } + ], + "source": [ + "print\"\\t example 15.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#Dew point of Overhead\n", + "import numpy\n", + "vc=numpy.array([6.4, 219.7, 2.3])\n", + "#vc(1) = 6.4; # Mol/hr\n", + "#vc(2) = 219.7; #Mol/hr\n", + "#vc(3) = 2.3; #Mol/hr\n", + "K=numpy.array([2.8, 1.01, 0.34])\n", + "#K(1) = 2.8; #at 148DegF and 40 psia\n", + "#K(2) = 1.01; #at 148DegF and 40 psia\n", + "#K(3) = 0.34; #at 148DegF and 40 psia\n", + "v=numpy.array([0, 0, 0])\n", + "i=0;\n", + "while (i<3):\n", + " v[0]=vc[0]*K[0];\n", + " v[1]=vc[1]*K[1];\n", + " v[2]=vc[1]*K[2];\n", + " i=i+1;\n", + "\n", + "\n", + "print\"\\n\\t\\tDEW POINT OF OVERHEAD\"\n", + "print\"\\n\\t\\tMol/hr\\t\\tK(148DegF,40 psia)\\tV/K\\n\"\n", + "print\"\\t\\t--------------------------------------------\\n\"\n", + "\n", + "\n", + "print vc,K,v\n", + "\n", + "bc=numpy.array([4.1, 49.3, 71.9, 52.5, 54.7, 82.5, 76.6, 22.4])\n", + "#bc(1)=4.1; #Mol/hr\n", + "#bc(2)=49.3; #Mol/hr\n", + "#c(3)=71.9; #Mol/hr\n", + "#bc(4)=52.5; #Mol/hr\n", + "#bc(5)=54.7; #Mol/hr\n", + "#bc(6)=82.5; #Mol/hr\n", + "#bc(7)=76.6; #Mol/hr\n", + "#bc(8)=22.4; #Mol/hr\n", + "tbc=numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "tbc[0]=tbc[0]+bc[0];\n", + "i=1\n", + "while (i<8):\n", + " tbc[i]=tbc[i-1]+bc[i];\n", + " i=i+1;\n", + "\n", + "\n", + "bK=numpy.array([5.8, 3.0, 1.68, 0.98, 0.57, 0.35, 0.21, 0.13])\n", + "#bK(1)=5.8; #at 330DegF, 40 psia\n", + "#bK(2)=3.0; #at 330DegF, 40 psia\n", + "#bK(3)=1.68; #at 330DegF, 40 psia\n", + "#bK(4)=0.98; #at 330DegF, 40 psia\n", + "#bK(5)=0.57; #at 330DegF, 40 psia\n", + "#bK(6)=0.35; #at 330DegF, 40 psia\n", + "#bK(7)=0.21; #at 330DegF, 40 psia\n", + "#bK(8)=0.13; #at 330DegF, 40 psia\n", + "\n", + "KL=numpy.array([23.8, 148.0, 120.0, 51.4, 31.2, 28.9, 16.1, 2.9])\n", + "\n", + "#KL(1)=23.8;\n", + "#KL(2)=148.0;\n", + "#KL(3)=120.8;\n", + "#KL(4)=51.4;\n", + "#KL(5)=31.2;\n", + "#KL(6)=28.9;\n", + "#KL(7)=16.1;\n", + "#KL(8)=2.9;\n", + "\n", + "tk=([0, 0, 0, 0, 0, 0, 0, 0])\n", + "i=1;\n", + "op=40;\n", + "tk[0]=KL[0]\n", + "while (i<8):\n", + " tk[i]=tk[i-1]+KL[i];\n", + " i=i+1;\n", + "\n", + "l=numpy.array([1700, 13900, 13030, 6260, 4240, 4330, 2640, 520]) \n", + "#l(1)=1700; #Lb/hr\n", + "#l(2)=13900; #Lb/hr\n", + "#l(3)=13030; #Lb/hr\n", + "#l(4)=6260; #Lb/hr\n", + "#l(5)=4240; #Lb/hr\n", + "#l(6)=4330; #Lb/hr\n", + "#l(7)=2640; #Lb/hr\n", + "#l(8)=520; #Lb/hr\n", + "\n", + "tl=numpy.array([0, 0, 0, 0, 0, 0, 0, 0,])\n", + "\n", + "i=0;\n", + "while (i<8):\n", + " tl[i]=tl[i]+l[i];\n", + " i=i+1;\n", + "\n", + "print\"\\n\\t\\tBUBBLE POINTS OF BOTTOMS\\n\"\n", + "print\"\\t\\tMol/hr\\t\\tK(330DegF,40psia)\\t\\tKL\\t\\tLb/hr\\n\"\n", + "print\"\\t\\t--------------------------------------------------------------\\n\"\n", + "tlr=78177;\n", + "i=0;\n", + "while (i<8):\n", + "\n", + " print bc[i],bK[i],KL[i],l[i]\n", + " i=i+1;\n", + "\n", + "print\"\\t\\t____\\t\\t\\t\\t\\t____\\t\\t____\\n\"\n", + "\n", + "print\"\\t\\t\",tbc \n", + "print\"\\t\\t\\t\\t\\t\",tk \n", + "print\"\\t\\t\",tl\n", + "av = numpy.array([0, 0, 0, 0, 0, 0, 0, 0])\n", + "av=tl/tk\n", + "hl=4280000;\n", + "print\"\\tAverage mol. wt. \\n\",av\n", + "\n", + "lh=numpy.array([48894, 16298, 32596])\n", + "bl=numpy.array([286, 129, 129])\n", + "#lh(1)=48894;#Lb/hr\n", + "#lh(2)=16298;#Lb/hr\n", + "#lh(3)=32596;#Lb/hr\n", + "#bl(1)=286;#Btu/hr\n", + "#bl(2)=129;#Btu/hr\n", + "#bl(3)=129;#Btu/hr\n", + "\n", + "bh=numpy.array([0, 0, 0])\n", + "vap=22700;\n", + "i=0;\n", + "\n", + "while (i<3):\n", + " bh[0]=lh[0]*bl[0];\n", + " i=i+1;\n", + "\n", + "#Heat Balances\n", + "print\"\\n\\n\\t\\t\\t\\t\\t\\tHEAT BALANCES:\"\n", + "print\"\\n\\t\\t\\t\\tMol/hr\\t\\tMol.wt.\\t\\tLb/hr\\t\\tTemp,DegF\\t\\tBtu/lb\\t\\tBtu/hr\\n\\t\"\n", + "print\"\\t\\t\\t----------------------------------------------------------------------------------------\"\n", + "print\"\\n\\tHeat Balance onCondeser\\n\\t Heat in:\\n\\t Top plate vapor......\"\n", + "\n", + "#Heat Balances on reboiler\n", + "#Assume 30Deg difference between reboiler and bottom plate giving bottom-plate temperature of 300DegF\n", + "#Mol/hr from Eq. 15.47\n", + "\n", + "pc=numpy.array([0.056, 0.35, 0.285, 0.122, 0.074, 0.068, 0.038, 0.007])\n", + "#pc(1)=0.056;\n", + "#pc(2)=0.350;\n", + "##pc(3)=0.285;\n", + "#pc(4)=0.122;\n", + "#pc(5)=0.074;\n", + "#pc(6)=0.068;\n", + "#pc(7)=0.038;\n", + "#pc(8)=0.007;\n", + "\n", + "pk=numpy.array([4.5, 2.25, 1.2, 0.66, 0.38, 0.22, 0.13, 0.07])\n", + "#pK(1)=4.5;\n", + "#pK(2)=2.25;\n", + "#pK(3)=1.20;\n", + "#pK(4)=0.66;\n", + "#pK(5)=0.38;\n", + "#pK(6)=0.22;\n", + "#pK(7)=0.13;\n", + "#pK(8)=0.07;\n", + "\n", + "print\"\\n\\n\\t\\tCALCULATION OF BOTTOM PLATE TEMPERATURE\\n\"\n", + "print\"\\t\\ty*\\t\\t\\tReboiler vapor\\t\\t\\t\\tK(300DegF,40psia)\\tMol*K\\n\\t\\t\\t\\tV = y*205.7 +\\tBottoms\\t=\\tTrapout\\n\"\n", + "print\"\\t\\t----------------------------------------------------------------------------------------\\n\"\n", + "\n", + "\n", + "print \"CALCULATION OF BOTTOM PLATE TEMPERATURE\"\n", + "print\" y* Reboiler vapor K(300DegF,40psia) Mol*K\"\n", + "print\" V = y*205.7 + Bottoms = Trapout\"\n", + "print\" ----------------------------------------------------------------------------------------\"\n", + "print \"C5 0.056 11.5 4.1 15.6 4.5 70.29\"\n", + "print \"C6 0.35 72.0 49.3 121.3 2.25 272.91\"\n", + "print \"C7 0.285 58.6 71.9 130.5 1.2 156.63\"\n", + "print \"C8 0.122 25.1 52.5 77.6 0.66 51.21\"\n", + "print \"C9 0.074 15.2 54.7 69.9 0.38 26.57\"\n", + "print \"C10 0.068 14.0 82.5 96.5 0.22 21.23\"\n", + "print \"C11 0.038 7.8 76.6 84.4 0.13 10.97\"\n", + "print \"C12 0.007 1.4 22.4 23.8 0.07 1.67\"\n", + "print \"----------------------------------------------------------------------------------------\"\n", + "print \"1.000 205.7 414.0 619.7 611.5\"\n", + "\n", + "\n", + "print\"Reboiler requirements are\"\n", + "print\" Vaporization lb/hr\",vap\n", + "print\" Total liquor to reboiler lb/hr\",tlr \n", + "print\" Heat load Btu/hr\",hl\n", + "print\" Temperature range 300-330 def F\"\n", + "print\" Operating pressure psi\",op " + ] + } + ], + "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/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 new file mode 100644 index 00000000..4ffc6c97 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_1.ipynb @@ -0,0 +1,1035 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Extented Surfaces" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1 pgno: 521" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t fin surface is : %.1f ft**2/lin ft \t2.5\n", + "\t bare tube surface is : ft**2/lin ft \t0.0\n", + "\t total outside surface : ft**2/lin ft \t2.5\n", + "\t total inside surface : ft**2/lin ft \t0.277366666667\n", + "\t fin efficiencies \t\n", + "\t hf m n \t \n", + "4\n", + "5.24\n", + "0.965717954492\n", + "\t weighted efficiency curve \t\n", + "\t hf hfi \t \n", + "4\n", + "34.8173760783\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYXGX5xvHvnUCoEQggLZEaSpASelNCFZUmCoh0+IkQ\n", + "EWxIQo0iKigqomClQxQUEGwkIEGKEOmBUJUACSRgEAEbgdy/P953k5PJzO7s7M6e2d3nc1175Zwz\n", + "Z877zOxmnjlvlW1CCCGEzhpQdgAhhBB6p0ggIYQQGhIJJIQQQkMigYQQQmhIJJAQQggNiQQSQgih\n", + "IZFAQreTdJGk0+o891JJZzUxlnavL+mrkl6R9KKkYZLekKQmxLGepIckvS7peEmLS7pJ0muSrpH0\n", + "CUk313GdsZJ+0t3xhdCIRcoOIPQ9to/rzOn5pypJc4F1bP+t0XBqXV/Se4DPA8Nsz86HBzdYTke+\n", + "BNxqe9Nc9qHAu4Ehtufmc67u6CK2v96k+ELotLgDCb1BV+8Iaj3/PcDsQvJoptWBqRX7TxWSR78m\n", + "aWDZMYTOiwQS5pF0pKQbC/tPS7qmsP+CpI3z9vqSJkqaLekJSfsXzlug2kjSl3IV0XRJ/ydprqS1\n", + "CkUPkfSbXL1zT9tjkv6UH384Vy3tn4/vmauD/iHpLkkbFcoaKemBfK2fA4vXeK27AhOAVfO1L5a0\n", + "Ro5tQD5nkqSvSLozX+9mScu38/5VjUvSH4FRwPdzWVcDpwMH5v2jJB0h6Y7CtTYsvL8zJY3Nx8dJ\n", + "uqJw3jaS7s5lPiRpx8Jj7cYvaYfCc5+XdLikLXN5Kpy3n6SHarzmJSSdJ2laro67I1fPjZL0QsW5\n", + "0yTtXHgdv5R0haR/AqdI+rek5Sp+l6+0JZf8Pk2V9KqkP+Q7yFAm2/ETP9gGWBP4R95eFZgGPJ/3\n", + "1wJezdtLAS8Ah5O+hGwKvAJskB+/BPhK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RO21gP5Oqt5q1Cqk1x4qRAJpfZXffNr2\n", + "DwaOzrffj5LqjCHdcVwr6T7glcL5NwEfyd01t6+4ZttjD0jaoUq55wJfl/QAqT7ZhXOqxbcacFuu\n", + "OrqC+SvYzTvf9uOk9ZknSHqY9EG8cuG8Wg4FTsjPuYu0NOf1pGqPh0mJ6STbLzstJ3o18GdJj5Aa\n", + "Tat9kFR7Hdj+O3AMcF1+n8dXOf8EYAtJD0t6jAW/hVe75mzgLklTJJ3T3mO1XleN+Gu9loW2q9xd\n", + "LJH/Lh4kNeQfnpPBw8A7Sl1wT7R9F6mNYCqpbeJ+UsL6IKkjRZs7SYsrVYtxgWtWeS21HE/qOHJm\n", + "W6yFLx8rA7NtV945pIJTL8JHJa1XiKUzdxQjSY3/oUJ04w2hn5H0YVLvte930/UmkKqVZuV9kXq0\n", + "LVS11wySjgGWsv2dds45gvRl45xa59R43rqkKuHoxltFJJAQQreTNJrUOH9JD5R1K6ln3pvtnDOI\n", + "1P17x860r0n6Nqlbc2WngEAkkBBCCA2KNpAQQggNiQQSQgihIZFAQgghNCQSSAghhIZEAgkhhNCQ\n", + "SCAhhBAa8v/Onrp6J+51IAAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print\"\\t example 16.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "from math import tanh\n", + "Af=(20*0.75*12*2)/(144);\n", + "Ao=((3.14*1.25)-(20*0.035))*(12/144);\n", + "print\"\\t fin surface is : %.1f ft**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : ft**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "Ai=(3.14*1.06*12)/(144);\n", + "print\"\\t total inside surface : ft**2/lin ft \\t\",Ai\n", + "print\"\\t fin efficiencies \\t\"\n", + "b=0.0625; # ft\n", + "hf=4; # from table in solution\n", + "m=(5.24*(hf**(1/2))); # m=((hf*P)/(Kax))**(1/2), eq 16.8\n", + "n=(tanh(m*b))/(m*b); # efficiency , eq 16.26\n", + "print\"\\t hf m n \\t \"\n", + "print hf \n", + "print m \n", + "print n\n", + "# similarly efficiencies values are calculated at different hf values\n", + "print\"\\t weighted efficiency curve \\t\"\n", + "hfi=((n*Af)+(Ao))*(hf/Ai); # eq 16.34\n", + "print\"\\t hf hfi \\t \"\n", + "print hf \n", + "print hfi\n", + "# similarly efficiencies values are calculated at different hf values\n", + "hf=[4, 16, 36, 100, 400, 625, 900]; # from 2nd table in the solution\n", + "hfi=[35.4, 110.8, 193.5, 370, 935, 1295, 1700]; # from 2nd table in the solution\n", + "pyplot.plot(hf,hfi)\n", + "pyplot.xlabel('heat transfer coefficient to fin,Btu/(ft**2)*(hr)')\n", + "pyplot.ylabel('coefficient hf referred to the tube ID')\n", + "pyplot.title('weighted fin efficiency curve')\n", + "pyplot.show()\t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t annulus flow area : ft**2 \t0.0391482454167\n", + "\t wetted perimeter : ft \t2.76875\n", + "\t equivalent diameter : ft \t0.0565572845749\n", + "\t heat load : Btu/hr \t270286.4\n", + "\t delt1 is : F \t151.0\n", + "\t delt2 is : F \t117.0\n", + "\t LMTD is F \t133.427780969\n", + "\t Ui : Btu/(hr)*(ft**2)*(F) \t365.652178958\n", + "\t hfi : Btu/(hr)*(ft**2)*(F) \t416.40535396\n", + "\t jf : \t36.7135894676\n", + "\t Ga : lb/(hr)*(ft**2) \t388267.720257\n", + "\t Rea : \t11319.0\n" + ] + } + ], + "source": [ + "print\"\\t example 16.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Ts=302.; # F\n", + "t1=151.;\n", + "t2=185.;\n", + "w=15200.; # lb/hr\n", + "from math import log10\n", + "# The dropwise condensation of steam was promoted with oil.\n", + "aa=(3.14*(3.068**2-1.25**2))/(4*144)-((20*0.035*0.75)/(144));\n", + "print\"\\t annulus flow area : ft**2 \\t\",aa\n", + "p=(3.14*(1.25/12))-(20*0.035/12)+(20*0.75*2/12);\n", + "print\"\\t wetted perimeter : ft \\t\",p\n", + "De=(4*aa/p);\n", + "print\"\\t equivalent diameter : ft \\t\",De\n", + "Q=w*0.523*(t2-t1);\n", + "print\"\\t heat load : Btu/hr \\t\",Q\n", + "delt1=Ts-t1; #F\n", + "delt2=Ts-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Ai=0.277; # ft**2/ft\n", + "n=20; # number of fins\n", + "Ui=(Q/(Ai*n*LMTD));\n", + "print\"\\t Ui : Btu/(hr)*(ft**2)*(F) \\t\",Ui\n", + "hi=3000; # assumed value for dropwise condensation of steam\n", + "hfi=(Ui*hi)/(hi-Ui);\n", + "print\"\\t hfi : Btu/(hr)*(ft**2)*(F) \\t\",hfi\n", + "hf=120; # from fig 16.7 for hfi=418\n", + "mu=1.94; # lb/(ft*hr)\n", + "k=0.079;\n", + "Z=2.34; # Z=((c*mu)/k)**(1/3)\n", + "jf=(hf*De/(Z*k)); # eq 16.36\n", + "print\"\\t jf : \\t\",jf\n", + "Ga=(w/aa);\n", + "print\"\\t Ga : lb/(hr)*(ft**2) \\t\",Ga\n", + "Rea=(De*Ga/mu);\n", + "print\"\\t Rea : \\t\",round(Rea)\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 pgno:530" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gas oil is : Btu/hr \t477000.0\n", + "\t total heat required for water is : Btu/hr \t478000.0\n", + "\t delt1 is : F \t120.0\n", + "\t delt2 is : F \t130.0\n", + "\t LMTD is :%.0f F \t125.073724087\n", + "\t ratio of two local temperature difference is : \t0.923076923077\n", + "\t caloric temperature of hot fluid is : F \t223.5\n", + "\t caloric temperature of cold fluid is : F \t98.8\n", + "\t hot fluid:shell side,gas oil \t\n", + "\t flow area is : ft**2 \t0.0287156933333\n", + "\t wetted perimeter : in \t29.126\n", + "\t De : ft \t0.0473238096546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t626834.943216\n", + "\t reynolds number is : \t4903.1764525\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t97.2026562015\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.01409546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t847790.707079\n", + "\t V is : fps \t3.76795869813\n", + "\t reynolds number is : \t65199.6985471\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t795.4\n", + "\t calculation of tfw \t\n", + "\t phya is : \t0.953986161765\n", + "\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t92.729988903\n", + "\t Rf : \t0.0107839978396\n", + "\t hf1 : \t78.2227916919\n", + "\t hfi2 : \t450.563280145\n", + "\t Rmetal : \t0.00170212455807\n", + "\t Ri : \t0.00125722906714\n", + "\t hi1 : \t234.894572087\n", + "\t UDi : \t122.267359744\n", + "\t Ai : ft**2 \t31.2572870644\n", + "\t length of pipe required : lin ft \t74.0694006266\n", + "\t Q/Ai1 : Btu/(hr)*(ft**2) \t14158.7677725\n", + "\t annulus film : \t31.4245931625\n", + "\t annulus dirt : \t4.9162388099\n", + "\t Tc-tfw : \t36.3408319724\n", + "\t fin and tube metal : \t24.0999863376\n", + "\t tube side dirt : \t42.4763033175\n", + "\t tubeside film : \t17.8008143984\n", + "\t total temperature drop : F \t120.717936026\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t3719.56602669\n", + "\t delPs is : psi \t7.7\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t1.6\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=18000; # lb/hr\n", + "w=11950; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is :%.0f F \\t\",LMTD\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.47; # from fig.17\n", + "Kc=0.27; \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,gas oil \\t\"\n", + "ID=3.068; # in, table 11\n", + "OD=1.9; # in, table 11\n", + "af=0.0175; # fin cross section,table 10\n", + "aa=((3.14*ID**2/(4))-(3.14*OD**2/(4))-(24*af))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "p=(3.14*(OD))-(24*0.035)+(24*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*aa*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=2.5*2.42; # at 224F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jf=18.4; # from fig.16.10\n", + "Z=0.25; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hf=((jf)*(1/De)*(Z)); # Hf=(hf/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hf\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "D=0.134; # ft\n", + "row=62.5;\n", + "at=(3.14*D**2/(4));\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.72*2.42; # at 99F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(970*0.82); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "print\"\\t calculation of tfw \\t\"\n", + "# Tc-tfw=40F assumption from fig 14\n", + "tfw=184;\n", + "mufw=3.5; # cp, at 184F\n", + "phya=(2.5/mufw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "hf=(Hf)*(phya); # from eq.6.36\n", + "print\"\\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.002;\n", + "Rf=(1/hf);\n", + "print\"\\t Rf : \\t\",Rf\n", + "hf1=(1/(Rdo+Rf)); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=255; # fig 16.9\n", + "hfi2=(hf1*5.76); # eq 16.38 and fig 16.9,((Af+Ao)/(Ai))=5.76 from previous prblm\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "Rmetal=(hfi2-hfi1)/(hfi2*hfi1)# eq 16.39\n", + "print\"\\t Rmetal : \\t\",Rmetal\n", + "phyt=1; # for cooling water\n", + "Rdi=0.003;\n", + "Ri=(1/hi);\n", + "print\"\\t Ri : \\t\",Ri\n", + "hi1=(1/(Rdi+Ri)); # eq 16.40\n", + "print\"\\t hi1 : \\t\",hi1\n", + "UDi=(hi1*hfi1)/(hi1+hfi1); # eq 16.41\n", + "print\"\\t UDi : \\t\",UDi\n", + "# To obtain the true flux the heat load must be divided by the actual heat-transfer surface.For a 1}2-in. IPS pipe there are 0.422 ft2/lin foot, from table 11\n", + "# trial\n", + "Ai=(Q/(UDi*LMTD)); # LMTD=delt\n", + "print\"\\t Ai : ft**2 \\t\",Ai\n", + "L=(Ai/0.422);\n", + "print\"\\t length of pipe required : lin ft \\t\",L\n", + "# Use two 20-ft hairpins = 80 lin ft\n", + "Ai1=(80*0.422); # ft**2\n", + "r=(Q/Ai1);\n", + "print\"\\t Q/Ai1 : Btu/(hr)*(ft**2) \\t\",r\n", + "deltf=(r/hfi2);\n", + "deltdo=(r*Rdo/5.76);\n", + "print\"\\t annulus film : \\t\",deltf\n", + "print\"\\t annulus dirt : \\t\",deltdo\n", + "d=deltf+deltdo; # d=Tc-tfw\n", + "deltmetal=(r*Rmetal);\n", + "deltdi=(r*Rdi);\n", + "delti=(r/hi);\n", + "print\"\\t Tc-tfw : \\t\",d\n", + "print\"\\t fin and tube metal : \\t\",deltmetal\n", + "print\"\\t tube side dirt : \\t\",deltdi\n", + "print\"\\t tubeside film : \\t\",delti\n", + "Td=deltf+deltdo+deltmetal+deltdi+delti;\n", + "print\"\\t total temperature drop : F \\t\",Td\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0359; # ft\n", + "Rea1=(De1*Ga/mu1);\n", + "print\"\\t reynolds number : \\t\",Rea1\n", + "f=0.00036; # fig 16.10\n", + "s=0.82; #using fig.6\n", + "delPs=((f*(Ga**2)*(80))/(5.22*(10**10)*(De1)*(s)*(phya))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000192; # friction factor for reynolds number 65000, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(80))/(5.22*(10**10)*(0.134)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 pgno:535" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for oxygwn is : Btu/hr \t1012500.0\n", + "\t total heat required for water is : Btu/hr \t1010000\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t66.8818722257\n", + "\t R is : \t7\n", + "\t S is : \t0\n", + "\t FT is 0.87 \t\n", + "\t delt is : F \t58.1872288364\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t flow area is : ft**2 \t1.46834418403\n", + "\t wetted perimeter : in \t1570.8\n", + "\t De : ft \t0.0448691882056\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20431.1770539\n", + "\t reynolds number is : \t16820.7399724\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t20.6536497998\n", + "\t hf1 : \t19.4485963081\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0582118055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t867521.622428\n", + "\t V is : fps \t3.85565165523\n", + "\t reynolds number is : \t29155.8813311\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t902.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t243.418213207\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.6828045249\n", + "\t total surface area is : ft**2 \t229.376\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t75.673831631\n", + "\t excess fouling factor : \t0.00206419817483\n", + "\t Rdo : \t0.0221351170807\n", + "\t hf2 : \t14.1738000666\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t77.1741091592\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t16232.4764484\n", + "\t delPs is : psi \t0.6\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=100; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=50500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.225; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oxygwn is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.87 \\t\"# from fig 18\n", + "delt=(0.87*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "ID=19.25; # in, table 11\n", + "OD=1; # in, table 11\n", + "As=((3.14*ID**2/(4))-(70*3.14*OD**2/(4))-(70*20*0.035*0.5))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "p=(70*3.14*(OD))-(70*20*0.035)+(70*20*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*As*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0545; # at 175F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=59.5; # from fig.16.10a\n", + "k=0.0175;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "hf=((jH)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.479; # table 10\n", + "L=16;\n", + "Nt=70;\n", + "n=4;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0652; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.94; # at 90F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(940*0.96); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi);\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "UDi=((hfi1)*(hi1)/(hi1+hfi1)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A2=0.2048; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UDi1=((Q)/((A)*(delt)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi1\n", + "Re=(1/UDi1)-(1/UDi);\n", + "print\"\\t excess fouling factor : \\t\",Re\n", + "Ro=9.27; #Adding to the outside fouling factor\n", + "Rdo1=Rdo+(Re*Ro);\n", + "print\"\\t Rdo : \\t\",Rdo1\n", + "hf2=(hf/(1+(hf*Rdo1)));\n", + "print\"\\t hf2 : \\t\",hf2\n", + "hfi2=113;\n", + "UDi2=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi2\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0433; # ft\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.00025; # fig 16.10\n", + "s=0.00133;\n", + "delPs=((f*(Gs**2)*(L))/(5.22*(10**10)*(De1)*(s)*(1))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00021; # friction factor for reynolds number 29100, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(0.0625)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for air is : Btu/hr \t1250000.0\n", + "\t total heat required for water is : Btu/hr \t1248000.0\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t60.0\n", + "\t LMTD is : F \t54.9097962457\n", + "\t R is : \t1.25\n", + "\t S is : \t0.4\n", + "\t FT is 0.985 \t\n", + "\t delt is : F \t54.086149302\n", + "\t caloric temperature of hot fluid is : F \t225.0\n", + "\t caloric temperature of cold fluid is : F \t170.0\n", + "\t fin surface is : in**2/lin ft \t310.86\n", + "\t bare tube surface is : in**2/lin ft \t27.1296\n", + "\t total outside surface : ft**2/lin ft \t337.9896\n", + "\t projected perimeter : in/ft \t161.28\n", + "\t De : ft \t0.111235119048\n", + "\t flow area : ft**2 \t7.53\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t13280.2124834\n", + "\t reynolds number is : \t28408.1926263\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t22.9878748896\n", + "\t hf1 : \t21.5048242607\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.079625\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t391836.734694\n", + "\t V is : fps \t1.74149659864\n", + "\t reynolds number is : \t30427.5453198\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t667.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t222.303643994\n", + "\t X : \t0.03125\n", + "\t hfi2 : \t212.371237248\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.611980947\n", + "\t inside surface per bank is : ft**2 \t18.312\n", + "\t Ai1 : ft**2 \t212.447090593\n", + "\t number of banks : \t11.6015230774\n", + "\t net free volume : ft**3 \t1.89483559028\n", + "\t frictional surface : ft**2 \t191.88\n", + "\t pressure drop for annulus \t\n", + "\t De1 : ft \t0.0395004292324\n", + "\t reynolds number : \t10087.9633345\n", + "\t delPs is : psi \t0.232069401484\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.39\n" + ] + } + ], + "source": [ + "print\"\\t example 16.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=150.; # inlet cold fluid,F\n", + "t2=190.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=31200; # lb/hr\\\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for air is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.985 \\t\" # from fig 18\n", + "delt=(0.985*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "Af=(3.14*2*8*12*(1.75**2-1**2))/(4);\n", + "Ao=((3.14*1*12)-(3.14*1*8*0.035*12));\n", + "print\"\\t fin surface is : in**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : in**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "p=(2*3*2*8*12/8)+(((12)-(8*0.035*12))*(2));\n", + "print\"\\t projected perimeter : in/ft \\t\",p\n", + "De=(2*A/(3.14*p*12)); # eq 16.104\n", + "print\"\\t De : ft \\t\",De\n", + "# 21 tubes may be fit in one :vertical bank (Fig. 16.19b) ,20 tubes in alternating banks for triangular pitch\n", + "As=((4**2*12**2)-(21*1*48)-((21)*(2*0.035*3*8*48/8)))/(144); # fig 16.19\n", + "print\"\\t flow area : ft**2 \\t\",As\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.052; # at 225F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jf=157; # from fig.16.18a\n", + "k=0.0183;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "phys=1;\n", + "hf=((jf)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.546; # table 10\n", + "L=4;\n", + "Nt=21;\n", + "n=1;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0695; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.895; # at 170F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(710*0.94); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi); # 16.40\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "k1=60; # table 3 , for brass\n", + "# yb=0.00146 ft\n", + "X=((0.875-0.5)/12)*(21.5/(60*0.00146))**(1/2);\n", + "print\"\\t X : \\t\",X\n", + "nf=0.91; # from fig 16.13a , by comparing X value\n", + "Ai=0.218; # ft**2/ft\n", + "hfi2=((nf*Af/144)+(Ao/144))*(hf1/Ai); # eq 16.34\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "UDi=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A=(21*4*Ai); # ft**2\n", + "print\"\\t inside surface per bank is : ft**2 \\t\",A\n", + "Ai1=(Q/(UDi*delt));\n", + "print\"\\t Ai1 : ft**2 \\t\",Ai1\n", + "Nb=(Ai1/A);\n", + "print\"\\t number of banks : \\t\",Nb\n", + "Vn=(4*4*1.95/12)-(41*3.14*1*4/(2*4*144))-((41*3.14*0.035*8*4/(144*2*4))*(1.75**2-1**2)); # fig 16.19b\n", + "print\"\\t net free volume : ft**3 \\t\",Vn\n", + "Af1=(41*2.34*4/2);\n", + "print\"\\t frictional surface : ft**2 \\t\",Af1\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=(4*Vn/Af1); # ft\n", + "print\"\\t De1 : ft \\t\",De1\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.0024; # fig 16.18b\n", + "s=0.000928;\n", + "Lp=1.95;\n", + "R1=0.538; # R1=(De1/ST)**(0.4)\n", + "R2=1; # R2=(SL/ST)**0.6\n", + "delPs=((f*(Gs**2)*(Lp)*(R1)*(R2))/(5.22*(10**10)*(De1)*(s)*(1)));\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 30400, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(Nb))/(5.22*(10**10)*(0.0695)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "#end\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/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 new file mode 100644 index 00000000..4ffc6c97 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_2.ipynb @@ -0,0 +1,1035 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Extented Surfaces" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1 pgno: 521" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t fin surface is : %.1f ft**2/lin ft \t2.5\n", + "\t bare tube surface is : ft**2/lin ft \t0.0\n", + "\t total outside surface : ft**2/lin ft \t2.5\n", + "\t total inside surface : ft**2/lin ft \t0.277366666667\n", + "\t fin efficiencies \t\n", + "\t hf m n \t \n", + "4\n", + "5.24\n", + "0.965717954492\n", + "\t weighted efficiency curve \t\n", + "\t hf hfi \t \n", + "4\n", + "34.8173760783\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYXGX5xvHvnUCoEQggLZEaSpASelNCFZUmCoh0+IkQ\n", + "EWxIQo0iKigqomClQxQUEGwkIEGKEOmBUJUACSRgEAEbgdy/P953k5PJzO7s7M6e2d3nc1175Zwz\n", + "Z877zOxmnjlvlW1CCCGEzhpQdgAhhBB6p0ggIYQQGhIJJIQQQkMigYQQQmhIJJAQQggNiQQSQgih\n", + "IZFAQreTdJGk0+o891JJZzUxlnavL+mrkl6R9KKkYZLekKQmxLGepIckvS7peEmLS7pJ0muSrpH0\n", + "CUk313GdsZJ+0t3xhdCIRcoOIPQ9to/rzOn5pypJc4F1bP+t0XBqXV/Se4DPA8Nsz86HBzdYTke+\n", + "BNxqe9Nc9qHAu4Ehtufmc67u6CK2v96k+ELotLgDCb1BV+8Iaj3/PcDsQvJoptWBqRX7TxWSR78m\n", + "aWDZMYTOiwQS5pF0pKQbC/tPS7qmsP+CpI3z9vqSJkqaLekJSfsXzlug2kjSl3IV0XRJ/ydprqS1\n", + "CkUPkfSbXL1zT9tjkv6UH384Vy3tn4/vmauD/iHpLkkbFcoaKemBfK2fA4vXeK27AhOAVfO1L5a0\n", + "Ro5tQD5nkqSvSLozX+9mScu38/5VjUvSH4FRwPdzWVcDpwMH5v2jJB0h6Y7CtTYsvL8zJY3Nx8dJ\n", + "uqJw3jaS7s5lPiRpx8Jj7cYvaYfCc5+XdLikLXN5Kpy3n6SHarzmJSSdJ2laro67I1fPjZL0QsW5\n", + "0yTtXHgdv5R0haR/AqdI+rek5Sp+l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Re/SQfX7czvodrr6mi677o+uCU9UeP4+qTPhdlV4pkGbJr/\n", + "3oaR1ippuyt4opD026oQq+nob61WvMuS7mZPtv3nKqesRO21gP5Oqt5q1Cqk1x4qRAJpfZXffNr2\n", + "DwaOzrffj5LqjCHdcVwr6T7glcL5NwEfyd01t6+4ZttjD0jaoUq55wJfl/QAqT7ZhXOqxbcacFuu\n", + "OrqC+SvYzTvf9uOk9ZknSHqY9EG8cuG8Wg4FTsjPuYu0NOf1pGqPh0mJ6STbLzstJ3o18GdJj5Aa\n", + "Tat9kFR7Hdj+O3AMcF1+n8dXOf8EYAtJD0t6jAW/hVe75mzgLklTJJ3T3mO1XleN+Gu9loW2q9xd\n", + "LJH/Lh4kNeQfnpPBw8A7Sl1wT7R9F6mNYCqpbeJ+UsL6IKkjRZs7SYsrVYtxgWtWeS21HE/qOHJm\n", + "W6yFLx8rA7NtV945pIJTL8JHJa1XiKUzdxQjSY3/oUJ04w2hn5H0YVLvte930/UmkKqVZuV9kXq0\n", + "LVS11wySjgGWsv2dds45gvRl45xa59R43rqkKuHoxltFJJAQQreTNJrUOH9JD5R1K6ln3pvtnDOI\n", + "1P17x860r0n6Nqlbc2WngEAkkBBCCA2KNpAQQggNiQQSQgihIZFAQgghNCQSSAghhIZEAgkhhNCQ\n", + "SCAhhBAa8v/Onrp6J+51IAAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print\"\\t example 16.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "from math import tanh\n", + "Af=(20*0.75*12*2)/(144);\n", + "Ao=((3.14*1.25)-(20*0.035))*(12/144);\n", + "print\"\\t fin surface is : %.1f ft**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : ft**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "Ai=(3.14*1.06*12)/(144);\n", + "print\"\\t total inside surface : ft**2/lin ft \\t\",Ai\n", + "print\"\\t fin efficiencies \\t\"\n", + "b=0.0625; # ft\n", + "hf=4; # from table in solution\n", + "m=(5.24*(hf**(1/2))); # m=((hf*P)/(Kax))**(1/2), eq 16.8\n", + "n=(tanh(m*b))/(m*b); # efficiency , eq 16.26\n", + "print\"\\t hf m n \\t \"\n", + "print hf \n", + "print m \n", + "print n\n", + "# similarly efficiencies values are calculated at different hf values\n", + "print\"\\t weighted efficiency curve \\t\"\n", + "hfi=((n*Af)+(Ao))*(hf/Ai); # eq 16.34\n", + "print\"\\t hf hfi \\t \"\n", + "print hf \n", + "print hfi\n", + "# similarly efficiencies values are calculated at different hf values\n", + "hf=[4, 16, 36, 100, 400, 625, 900]; # from 2nd table in the solution\n", + "hfi=[35.4, 110.8, 193.5, 370, 935, 1295, 1700]; # from 2nd table in the solution\n", + "pyplot.plot(hf,hfi)\n", + "pyplot.xlabel('heat transfer coefficient to fin,Btu/(ft**2)*(hr)')\n", + "pyplot.ylabel('coefficient hf referred to the tube ID')\n", + "pyplot.title('weighted fin efficiency curve')\n", + "pyplot.show()\t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t annulus flow area : ft**2 \t0.0391482454167\n", + "\t wetted perimeter : ft \t2.76875\n", + "\t equivalent diameter : ft \t0.0565572845749\n", + "\t heat load : Btu/hr \t270286.4\n", + "\t delt1 is : F \t151.0\n", + "\t delt2 is : F \t117.0\n", + "\t LMTD is F \t133.427780969\n", + "\t Ui : Btu/(hr)*(ft**2)*(F) \t365.652178958\n", + "\t hfi : Btu/(hr)*(ft**2)*(F) \t416.40535396\n", + "\t jf : \t36.7135894676\n", + "\t Ga : lb/(hr)*(ft**2) \t388267.720257\n", + "\t Rea : \t11319.0\n" + ] + } + ], + "source": [ + "print\"\\t example 16.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Ts=302.; # F\n", + "t1=151.;\n", + "t2=185.;\n", + "w=15200.; # lb/hr\n", + "from math import log10\n", + "# The dropwise condensation of steam was promoted with oil.\n", + "aa=(3.14*(3.068**2-1.25**2))/(4*144)-((20*0.035*0.75)/(144));\n", + "print\"\\t annulus flow area : ft**2 \\t\",aa\n", + "p=(3.14*(1.25/12))-(20*0.035/12)+(20*0.75*2/12);\n", + "print\"\\t wetted perimeter : ft \\t\",p\n", + "De=(4*aa/p);\n", + "print\"\\t equivalent diameter : ft \\t\",De\n", + "Q=w*0.523*(t2-t1);\n", + "print\"\\t heat load : Btu/hr \\t\",Q\n", + "delt1=Ts-t1; #F\n", + "delt2=Ts-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Ai=0.277; # ft**2/ft\n", + "n=20; # number of fins\n", + "Ui=(Q/(Ai*n*LMTD));\n", + "print\"\\t Ui : Btu/(hr)*(ft**2)*(F) \\t\",Ui\n", + "hi=3000; # assumed value for dropwise condensation of steam\n", + "hfi=(Ui*hi)/(hi-Ui);\n", + "print\"\\t hfi : Btu/(hr)*(ft**2)*(F) \\t\",hfi\n", + "hf=120; # from fig 16.7 for hfi=418\n", + "mu=1.94; # lb/(ft*hr)\n", + "k=0.079;\n", + "Z=2.34; # Z=((c*mu)/k)**(1/3)\n", + "jf=(hf*De/(Z*k)); # eq 16.36\n", + "print\"\\t jf : \\t\",jf\n", + "Ga=(w/aa);\n", + "print\"\\t Ga : lb/(hr)*(ft**2) \\t\",Ga\n", + "Rea=(De*Ga/mu);\n", + "print\"\\t Rea : \\t\",round(Rea)\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 pgno:530" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gas oil is : Btu/hr \t477000.0\n", + "\t total heat required for water is : Btu/hr \t478000.0\n", + "\t delt1 is : F \t120.0\n", + "\t delt2 is : F \t130.0\n", + "\t LMTD is :%.0f F \t125.073724087\n", + "\t ratio of two local temperature difference is : \t0.923076923077\n", + "\t caloric temperature of hot fluid is : F \t223.5\n", + "\t caloric temperature of cold fluid is : F \t98.8\n", + "\t hot fluid:shell side,gas oil \t\n", + "\t flow area is : ft**2 \t0.0287156933333\n", + "\t wetted perimeter : in \t29.126\n", + "\t De : ft \t0.0473238096546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t626834.943216\n", + "\t reynolds number is : \t4903.1764525\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t97.2026562015\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.01409546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t847790.707079\n", + "\t V is : fps \t3.76795869813\n", + "\t reynolds number is : \t65199.6985471\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t795.4\n", + "\t calculation of tfw \t\n", + "\t phya is : \t0.953986161765\n", + "\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t92.729988903\n", + "\t Rf : \t0.0107839978396\n", + "\t hf1 : \t78.2227916919\n", + "\t hfi2 : \t450.563280145\n", + "\t Rmetal : \t0.00170212455807\n", + "\t Ri : \t0.00125722906714\n", + "\t hi1 : \t234.894572087\n", + "\t UDi : \t122.267359744\n", + "\t Ai : ft**2 \t31.2572870644\n", + "\t length of pipe required : lin ft \t74.0694006266\n", + "\t Q/Ai1 : Btu/(hr)*(ft**2) \t14158.7677725\n", + "\t annulus film : \t31.4245931625\n", + "\t annulus dirt : \t4.9162388099\n", + "\t Tc-tfw : \t36.3408319724\n", + "\t fin and tube metal : \t24.0999863376\n", + "\t tube side dirt : \t42.4763033175\n", + "\t tubeside film : \t17.8008143984\n", + "\t total temperature drop : F \t120.717936026\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t3719.56602669\n", + "\t delPs is : psi \t7.7\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t1.6\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=18000; # lb/hr\n", + "w=11950; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is :%.0f F \\t\",LMTD\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.47; # from fig.17\n", + "Kc=0.27; \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,gas oil \\t\"\n", + "ID=3.068; # in, table 11\n", + "OD=1.9; # in, table 11\n", + "af=0.0175; # fin cross section,table 10\n", + "aa=((3.14*ID**2/(4))-(3.14*OD**2/(4))-(24*af))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "p=(3.14*(OD))-(24*0.035)+(24*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*aa*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=2.5*2.42; # at 224F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jf=18.4; # from fig.16.10\n", + "Z=0.25; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hf=((jf)*(1/De)*(Z)); # Hf=(hf/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hf\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "D=0.134; # ft\n", + "row=62.5;\n", + "at=(3.14*D**2/(4));\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.72*2.42; # at 99F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(970*0.82); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "print\"\\t calculation of tfw \\t\"\n", + "# Tc-tfw=40F assumption from fig 14\n", + "tfw=184;\n", + "mufw=3.5; # cp, at 184F\n", + "phya=(2.5/mufw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "hf=(Hf)*(phya); # from eq.6.36\n", + "print\"\\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.002;\n", + "Rf=(1/hf);\n", + "print\"\\t Rf : \\t\",Rf\n", + "hf1=(1/(Rdo+Rf)); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=255; # fig 16.9\n", + "hfi2=(hf1*5.76); # eq 16.38 and fig 16.9,((Af+Ao)/(Ai))=5.76 from previous prblm\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "Rmetal=(hfi2-hfi1)/(hfi2*hfi1)# eq 16.39\n", + "print\"\\t Rmetal : \\t\",Rmetal\n", + "phyt=1; # for cooling water\n", + "Rdi=0.003;\n", + "Ri=(1/hi);\n", + "print\"\\t Ri : \\t\",Ri\n", + "hi1=(1/(Rdi+Ri)); # eq 16.40\n", + "print\"\\t hi1 : \\t\",hi1\n", + "UDi=(hi1*hfi1)/(hi1+hfi1); # eq 16.41\n", + "print\"\\t UDi : \\t\",UDi\n", + "# To obtain the true flux the heat load must be divided by the actual heat-transfer surface.For a 1}2-in. IPS pipe there are 0.422 ft2/lin foot, from table 11\n", + "# trial\n", + "Ai=(Q/(UDi*LMTD)); # LMTD=delt\n", + "print\"\\t Ai : ft**2 \\t\",Ai\n", + "L=(Ai/0.422);\n", + "print\"\\t length of pipe required : lin ft \\t\",L\n", + "# Use two 20-ft hairpins = 80 lin ft\n", + "Ai1=(80*0.422); # ft**2\n", + "r=(Q/Ai1);\n", + "print\"\\t Q/Ai1 : Btu/(hr)*(ft**2) \\t\",r\n", + "deltf=(r/hfi2);\n", + "deltdo=(r*Rdo/5.76);\n", + "print\"\\t annulus film : \\t\",deltf\n", + "print\"\\t annulus dirt : \\t\",deltdo\n", + "d=deltf+deltdo; # d=Tc-tfw\n", + "deltmetal=(r*Rmetal);\n", + "deltdi=(r*Rdi);\n", + "delti=(r/hi);\n", + "print\"\\t Tc-tfw : \\t\",d\n", + "print\"\\t fin and tube metal : \\t\",deltmetal\n", + "print\"\\t tube side dirt : \\t\",deltdi\n", + "print\"\\t tubeside film : \\t\",delti\n", + "Td=deltf+deltdo+deltmetal+deltdi+delti;\n", + "print\"\\t total temperature drop : F \\t\",Td\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0359; # ft\n", + "Rea1=(De1*Ga/mu1);\n", + "print\"\\t reynolds number : \\t\",Rea1\n", + "f=0.00036; # fig 16.10\n", + "s=0.82; #using fig.6\n", + "delPs=((f*(Ga**2)*(80))/(5.22*(10**10)*(De1)*(s)*(phya))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000192; # friction factor for reynolds number 65000, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(80))/(5.22*(10**10)*(0.134)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 pgno:535" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for oxygwn is : Btu/hr \t1012500.0\n", + "\t total heat required for water is : Btu/hr \t1010000\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t66.8818722257\n", + "\t R is : \t7\n", + "\t S is : \t0\n", + "\t FT is 0.87 \t\n", + "\t delt is : F \t58.1872288364\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t flow area is : ft**2 \t1.46834418403\n", + "\t wetted perimeter : in \t1570.8\n", + "\t De : ft \t0.0448691882056\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20431.1770539\n", + "\t reynolds number is : \t16820.7399724\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t20.6536497998\n", + "\t hf1 : \t19.4485963081\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0582118055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t867521.622428\n", + "\t V is : fps \t3.85565165523\n", + "\t reynolds number is : \t29155.8813311\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t902.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t243.418213207\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.6828045249\n", + "\t total surface area is : ft**2 \t229.376\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t75.673831631\n", + "\t excess fouling factor : \t0.00206419817483\n", + "\t Rdo : \t0.0221351170807\n", + "\t hf2 : \t14.1738000666\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t77.1741091592\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t16232.4764484\n", + "\t delPs is : psi \t0.6\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=100; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=50500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.225; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oxygwn is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.87 \\t\"# from fig 18\n", + "delt=(0.87*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "ID=19.25; # in, table 11\n", + "OD=1; # in, table 11\n", + "As=((3.14*ID**2/(4))-(70*3.14*OD**2/(4))-(70*20*0.035*0.5))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "p=(70*3.14*(OD))-(70*20*0.035)+(70*20*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*As*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0545; # at 175F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=59.5; # from fig.16.10a\n", + "k=0.0175;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "hf=((jH)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.479; # table 10\n", + "L=16;\n", + "Nt=70;\n", + "n=4;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0652; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.94; # at 90F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(940*0.96); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi);\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "UDi=((hfi1)*(hi1)/(hi1+hfi1)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A2=0.2048; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UDi1=((Q)/((A)*(delt)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi1\n", + "Re=(1/UDi1)-(1/UDi);\n", + "print\"\\t excess fouling factor : \\t\",Re\n", + "Ro=9.27; #Adding to the outside fouling factor\n", + "Rdo1=Rdo+(Re*Ro);\n", + "print\"\\t Rdo : \\t\",Rdo1\n", + "hf2=(hf/(1+(hf*Rdo1)));\n", + "print\"\\t hf2 : \\t\",hf2\n", + "hfi2=113;\n", + "UDi2=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi2\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0433; # ft\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.00025; # fig 16.10\n", + "s=0.00133;\n", + "delPs=((f*(Gs**2)*(L))/(5.22*(10**10)*(De1)*(s)*(1))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00021; # friction factor for reynolds number 29100, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(0.0625)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for air is : Btu/hr \t1250000.0\n", + "\t total heat required for water is : Btu/hr \t1248000.0\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t60.0\n", + "\t LMTD is : F \t54.9097962457\n", + "\t R is : \t1.25\n", + "\t S is : \t0.4\n", + "\t FT is 0.985 \t\n", + "\t delt is : F \t54.086149302\n", + "\t caloric temperature of hot fluid is : F \t225.0\n", + "\t caloric temperature of cold fluid is : F \t170.0\n", + "\t fin surface is : in**2/lin ft \t310.86\n", + "\t bare tube surface is : in**2/lin ft \t27.1296\n", + "\t total outside surface : ft**2/lin ft \t337.9896\n", + "\t projected perimeter : in/ft \t161.28\n", + "\t De : ft \t0.111235119048\n", + "\t flow area : ft**2 \t7.53\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t13280.2124834\n", + "\t reynolds number is : \t28408.1926263\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t22.9878748896\n", + "\t hf1 : \t21.5048242607\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.079625\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t391836.734694\n", + "\t V is : fps \t1.74149659864\n", + "\t reynolds number is : \t30427.5453198\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t667.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t222.303643994\n", + "\t X : \t0.03125\n", + "\t hfi2 : \t212.371237248\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.611980947\n", + "\t inside surface per bank is : ft**2 \t18.312\n", + "\t Ai1 : ft**2 \t212.447090593\n", + "\t number of banks : \t11.6015230774\n", + "\t net free volume : ft**3 \t1.89483559028\n", + "\t frictional surface : ft**2 \t191.88\n", + "\t pressure drop for annulus \t\n", + "\t De1 : ft \t0.0395004292324\n", + "\t reynolds number : \t10087.9633345\n", + "\t delPs is : psi \t0.232069401484\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.39\n" + ] + } + ], + "source": [ + "print\"\\t example 16.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=150.; # inlet cold fluid,F\n", + "t2=190.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=31200; # lb/hr\\\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for air is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.985 \\t\" # from fig 18\n", + "delt=(0.985*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "Af=(3.14*2*8*12*(1.75**2-1**2))/(4);\n", + "Ao=((3.14*1*12)-(3.14*1*8*0.035*12));\n", + "print\"\\t fin surface is : in**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : in**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "p=(2*3*2*8*12/8)+(((12)-(8*0.035*12))*(2));\n", + "print\"\\t projected perimeter : in/ft \\t\",p\n", + "De=(2*A/(3.14*p*12)); # eq 16.104\n", + "print\"\\t De : ft \\t\",De\n", + "# 21 tubes may be fit in one :vertical bank (Fig. 16.19b) ,20 tubes in alternating banks for triangular pitch\n", + "As=((4**2*12**2)-(21*1*48)-((21)*(2*0.035*3*8*48/8)))/(144); # fig 16.19\n", + "print\"\\t flow area : ft**2 \\t\",As\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.052; # at 225F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jf=157; # from fig.16.18a\n", + "k=0.0183;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "phys=1;\n", + "hf=((jf)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.546; # table 10\n", + "L=4;\n", + "Nt=21;\n", + "n=1;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0695; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.895; # at 170F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(710*0.94); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi); # 16.40\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "k1=60; # table 3 , for brass\n", + "# yb=0.00146 ft\n", + "X=((0.875-0.5)/12)*(21.5/(60*0.00146))**(1/2);\n", + "print\"\\t X : \\t\",X\n", + "nf=0.91; # from fig 16.13a , by comparing X value\n", + "Ai=0.218; # ft**2/ft\n", + "hfi2=((nf*Af/144)+(Ao/144))*(hf1/Ai); # eq 16.34\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "UDi=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A=(21*4*Ai); # ft**2\n", + "print\"\\t inside surface per bank is : ft**2 \\t\",A\n", + "Ai1=(Q/(UDi*delt));\n", + "print\"\\t Ai1 : ft**2 \\t\",Ai1\n", + "Nb=(Ai1/A);\n", + "print\"\\t number of banks : \\t\",Nb\n", + "Vn=(4*4*1.95/12)-(41*3.14*1*4/(2*4*144))-((41*3.14*0.035*8*4/(144*2*4))*(1.75**2-1**2)); # fig 16.19b\n", + "print\"\\t net free volume : ft**3 \\t\",Vn\n", + "Af1=(41*2.34*4/2);\n", + "print\"\\t frictional surface : ft**2 \\t\",Af1\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=(4*Vn/Af1); # ft\n", + "print\"\\t De1 : ft \\t\",De1\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.0024; # fig 16.18b\n", + "s=0.000928;\n", + "Lp=1.95;\n", + "R1=0.538; # R1=(De1/ST)**(0.4)\n", + "R2=1; # R2=(SL/ST)**0.6\n", + "delPs=((f*(Gs**2)*(Lp)*(R1)*(R2))/(5.22*(10**10)*(De1)*(s)*(1)));\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 30400, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(Nb))/(5.22*(10**10)*(0.0695)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "#end\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/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 new file mode 100644 index 00000000..4ffc6c97 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_3.ipynb @@ -0,0 +1,1035 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Extented Surfaces" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1 pgno: 521" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t fin surface is : %.1f ft**2/lin ft \t2.5\n", + "\t bare tube surface is : ft**2/lin ft \t0.0\n", + "\t total outside surface : ft**2/lin ft \t2.5\n", + "\t total inside surface : ft**2/lin ft \t0.277366666667\n", + "\t fin efficiencies \t\n", + "\t hf m n \t \n", + "4\n", + "5.24\n", + "0.965717954492\n", + "\t weighted efficiency curve \t\n", + "\t hf hfi \t \n", + "4\n", + "34.8173760783\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYXGX5xvHvnUCoEQggLZEaSpASelNCFZUmCoh0+IkQ\n", + "EWxIQo0iKigqomClQxQUEGwkIEGKEOmBUJUACSRgEAEbgdy/P953k5PJzO7s7M6e2d3nc1175Zwz\n", + "Z877zOxmnjlvlW1CCCGEzhpQdgAhhBB6p0ggIYQQGhIJJIQQQkMigYQQQmhIJJAQQggNiQQSQgih\n", + "IZFAQreTdJGk0+o891JJZzUxlnavL+mrkl6R9KKkYZLekKQmxLGepIckvS7peEmLS7pJ0muSrpH0\n", + "CUk313GdsZJ+0t3xhdCIRcoOIPQ9to/rzOn5pypJc4F1bP+t0XBqXV/Se4DPA8Nsz86HBzdYTke+\n", + "BNxqe9Nc9qHAu4Ehtufmc67u6CK2v96k+ELotLgDCb1BV+8Iaj3/PcDsQvJoptWBqRX7TxWSR78m\n", + "aWDZMYTOiwQS5pF0pKQbC/tPS7qmsP+CpI3z9vqSJkqaLekJSfsXzlug2kjSl3IV0XRJ/ydprqS1\n", + "CkUPkfSbXL1zT9tjkv6UH384Vy3tn4/vmauD/iHpLkkbFcoaKemBfK2fA4vXeK27AhOAVfO1L5a0\n", + "Ro5tQD5nkqSvSLozX+9mScu38/5VjUvSH4FRwPdzWVcDpwMH5v2jJB0h6Y7CtTYsvL8zJY3Nx8dJ\n", + "uqJw3jaS7s5lPiRpx8Jj7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V85OGKE03XVN+3dMl7ZOfs5jS9PB3AAfmHjYrAu8nVXXdDByV7wiQ\n", + "tFpbeXUwqQ3g/blxG0lDqryOCcAJhRe/SQfX7czvodrr6mi677o+uCU9UeP4+qTPhdlV4pkGbJr/\n", + "3oaR1ippuyt4opD026oQq+nob61WvMuS7mZPtv3nKqesRO21gP5Oqt5q1Cqk1x4qRAJpfZXffNr2\n", + "DwaOzrffj5LqjCHdcVwr6T7glcL5NwEfyd01t6+4ZttjD0jaoUq55wJfl/QAqT7ZhXOqxbcacFuu\n", + "OrqC+SvYzTvf9uOk9ZknSHqY9EG8cuG8Wg4FTsjPuYu0NOf1pGqPh0mJ6STbLzstJ3o18GdJj5Aa\n", + "Tat9kFR7Hdj+O3AMcF1+n8dXOf8EYAtJD0t6jAW/hVe75mzgLklTJJ3T3mO1XleN+Gu9loW2q9xd\n", + "LJH/Lh4kNeQfnpPBw8A7Sl1wT7R9F6mNYCqpbeJ+UsL6IKkjRZs7SYsrVYtxgWtWeS21HE/qOHJm\n", + "W6yFLx8rA7NtV945pIJTL8JHJa1XiKUzdxQjSY3/oUJ04w2hn5H0YVLvte930/UmkKqVZuV9kXq0\n", + "LVS11wySjgGWsv2dds45gvRl45xa59R43rqkKuHoxltFJJAQQreTNJrUOH9JD5R1K6ln3pvtnDOI\n", + "1P17x860r0n6Nqlbc2WngEAkkBBCCA2KNpAQQggNiQQSQgihIZFAQgghNCQSSAghhIZEAgkhhNCQ\n", + "SCAhhBAa8v/Onrp6J+51IAAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print\"\\t example 16.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "from math import tanh\n", + "Af=(20*0.75*12*2)/(144);\n", + "Ao=((3.14*1.25)-(20*0.035))*(12/144);\n", + "print\"\\t fin surface is : %.1f ft**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : ft**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "Ai=(3.14*1.06*12)/(144);\n", + "print\"\\t total inside surface : ft**2/lin ft \\t\",Ai\n", + "print\"\\t fin efficiencies \\t\"\n", + "b=0.0625; # ft\n", + "hf=4; # from table in solution\n", + "m=(5.24*(hf**(1/2))); # m=((hf*P)/(Kax))**(1/2), eq 16.8\n", + "n=(tanh(m*b))/(m*b); # efficiency , eq 16.26\n", + "print\"\\t hf m n \\t \"\n", + "print hf \n", + "print m \n", + "print n\n", + "# similarly efficiencies values are calculated at different hf values\n", + "print\"\\t weighted efficiency curve \\t\"\n", + "hfi=((n*Af)+(Ao))*(hf/Ai); # eq 16.34\n", + "print\"\\t hf hfi \\t \"\n", + "print hf \n", + "print hfi\n", + "# similarly efficiencies values are calculated at different hf values\n", + "hf=[4, 16, 36, 100, 400, 625, 900]; # from 2nd table in the solution\n", + "hfi=[35.4, 110.8, 193.5, 370, 935, 1295, 1700]; # from 2nd table in the solution\n", + "pyplot.plot(hf,hfi)\n", + "pyplot.xlabel('heat transfer coefficient to fin,Btu/(ft**2)*(hr)')\n", + "pyplot.ylabel('coefficient hf referred to the tube ID')\n", + "pyplot.title('weighted fin efficiency curve')\n", + "pyplot.show()\t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t annulus flow area : ft**2 \t0.0391482454167\n", + "\t wetted perimeter : ft \t2.76875\n", + "\t equivalent diameter : ft \t0.0565572845749\n", + "\t heat load : Btu/hr \t270286.4\n", + "\t delt1 is : F \t151.0\n", + "\t delt2 is : F \t117.0\n", + "\t LMTD is F \t133.427780969\n", + "\t Ui : Btu/(hr)*(ft**2)*(F) \t365.652178958\n", + "\t hfi : Btu/(hr)*(ft**2)*(F) \t416.40535396\n", + "\t jf : \t36.7135894676\n", + "\t Ga : lb/(hr)*(ft**2) \t388267.720257\n", + "\t Rea : \t11319.0\n" + ] + } + ], + "source": [ + "print\"\\t example 16.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Ts=302.; # F\n", + "t1=151.;\n", + "t2=185.;\n", + "w=15200.; # lb/hr\n", + "from math import log10\n", + "# The dropwise condensation of steam was promoted with oil.\n", + "aa=(3.14*(3.068**2-1.25**2))/(4*144)-((20*0.035*0.75)/(144));\n", + "print\"\\t annulus flow area : ft**2 \\t\",aa\n", + "p=(3.14*(1.25/12))-(20*0.035/12)+(20*0.75*2/12);\n", + "print\"\\t wetted perimeter : ft \\t\",p\n", + "De=(4*aa/p);\n", + "print\"\\t equivalent diameter : ft \\t\",De\n", + "Q=w*0.523*(t2-t1);\n", + "print\"\\t heat load : Btu/hr \\t\",Q\n", + "delt1=Ts-t1; #F\n", + "delt2=Ts-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Ai=0.277; # ft**2/ft\n", + "n=20; # number of fins\n", + "Ui=(Q/(Ai*n*LMTD));\n", + "print\"\\t Ui : Btu/(hr)*(ft**2)*(F) \\t\",Ui\n", + "hi=3000; # assumed value for dropwise condensation of steam\n", + "hfi=(Ui*hi)/(hi-Ui);\n", + "print\"\\t hfi : Btu/(hr)*(ft**2)*(F) \\t\",hfi\n", + "hf=120; # from fig 16.7 for hfi=418\n", + "mu=1.94; # lb/(ft*hr)\n", + "k=0.079;\n", + "Z=2.34; # Z=((c*mu)/k)**(1/3)\n", + "jf=(hf*De/(Z*k)); # eq 16.36\n", + "print\"\\t jf : \\t\",jf\n", + "Ga=(w/aa);\n", + "print\"\\t Ga : lb/(hr)*(ft**2) \\t\",Ga\n", + "Rea=(De*Ga/mu);\n", + "print\"\\t Rea : \\t\",round(Rea)\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 pgno:530" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gas oil is : Btu/hr \t477000.0\n", + "\t total heat required for water is : Btu/hr \t478000.0\n", + "\t delt1 is : F \t120.0\n", + "\t delt2 is : F \t130.0\n", + "\t LMTD is :%.0f F \t125.073724087\n", + "\t ratio of two local temperature difference is : \t0.923076923077\n", + "\t caloric temperature of hot fluid is : F \t223.5\n", + "\t caloric temperature of cold fluid is : F \t98.8\n", + "\t hot fluid:shell side,gas oil \t\n", + "\t flow area is : ft**2 \t0.0287156933333\n", + "\t wetted perimeter : in \t29.126\n", + "\t De : ft \t0.0473238096546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t626834.943216\n", + "\t reynolds number is : \t4903.1764525\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t97.2026562015\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.01409546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t847790.707079\n", + "\t V is : fps \t3.76795869813\n", + "\t reynolds number is : \t65199.6985471\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t795.4\n", + "\t calculation of tfw \t\n", + "\t phya is : \t0.953986161765\n", + "\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t92.729988903\n", + "\t Rf : \t0.0107839978396\n", + "\t hf1 : \t78.2227916919\n", + "\t hfi2 : \t450.563280145\n", + "\t Rmetal : \t0.00170212455807\n", + "\t Ri : \t0.00125722906714\n", + "\t hi1 : \t234.894572087\n", + "\t UDi : \t122.267359744\n", + "\t Ai : ft**2 \t31.2572870644\n", + "\t length of pipe required : lin ft \t74.0694006266\n", + "\t Q/Ai1 : Btu/(hr)*(ft**2) \t14158.7677725\n", + "\t annulus film : \t31.4245931625\n", + "\t annulus dirt : \t4.9162388099\n", + "\t Tc-tfw : \t36.3408319724\n", + "\t fin and tube metal : \t24.0999863376\n", + "\t tube side dirt : \t42.4763033175\n", + "\t tubeside film : \t17.8008143984\n", + "\t total temperature drop : F \t120.717936026\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t3719.56602669\n", + "\t delPs is : psi \t7.7\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t1.6\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=18000; # lb/hr\n", + "w=11950; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is :%.0f F \\t\",LMTD\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.47; # from fig.17\n", + "Kc=0.27; \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,gas oil \\t\"\n", + "ID=3.068; # in, table 11\n", + "OD=1.9; # in, table 11\n", + "af=0.0175; # fin cross section,table 10\n", + "aa=((3.14*ID**2/(4))-(3.14*OD**2/(4))-(24*af))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "p=(3.14*(OD))-(24*0.035)+(24*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*aa*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=2.5*2.42; # at 224F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jf=18.4; # from fig.16.10\n", + "Z=0.25; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hf=((jf)*(1/De)*(Z)); # Hf=(hf/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hf\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "D=0.134; # ft\n", + "row=62.5;\n", + "at=(3.14*D**2/(4));\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.72*2.42; # at 99F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(970*0.82); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "print\"\\t calculation of tfw \\t\"\n", + "# Tc-tfw=40F assumption from fig 14\n", + "tfw=184;\n", + "mufw=3.5; # cp, at 184F\n", + "phya=(2.5/mufw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "hf=(Hf)*(phya); # from eq.6.36\n", + "print\"\\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.002;\n", + "Rf=(1/hf);\n", + "print\"\\t Rf : \\t\",Rf\n", + "hf1=(1/(Rdo+Rf)); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=255; # fig 16.9\n", + "hfi2=(hf1*5.76); # eq 16.38 and fig 16.9,((Af+Ao)/(Ai))=5.76 from previous prblm\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "Rmetal=(hfi2-hfi1)/(hfi2*hfi1)# eq 16.39\n", + "print\"\\t Rmetal : \\t\",Rmetal\n", + "phyt=1; # for cooling water\n", + "Rdi=0.003;\n", + "Ri=(1/hi);\n", + "print\"\\t Ri : \\t\",Ri\n", + "hi1=(1/(Rdi+Ri)); # eq 16.40\n", + "print\"\\t hi1 : \\t\",hi1\n", + "UDi=(hi1*hfi1)/(hi1+hfi1); # eq 16.41\n", + "print\"\\t UDi : \\t\",UDi\n", + "# To obtain the true flux the heat load must be divided by the actual heat-transfer surface.For a 1}2-in. IPS pipe there are 0.422 ft2/lin foot, from table 11\n", + "# trial\n", + "Ai=(Q/(UDi*LMTD)); # LMTD=delt\n", + "print\"\\t Ai : ft**2 \\t\",Ai\n", + "L=(Ai/0.422);\n", + "print\"\\t length of pipe required : lin ft \\t\",L\n", + "# Use two 20-ft hairpins = 80 lin ft\n", + "Ai1=(80*0.422); # ft**2\n", + "r=(Q/Ai1);\n", + "print\"\\t Q/Ai1 : Btu/(hr)*(ft**2) \\t\",r\n", + "deltf=(r/hfi2);\n", + "deltdo=(r*Rdo/5.76);\n", + "print\"\\t annulus film : \\t\",deltf\n", + "print\"\\t annulus dirt : \\t\",deltdo\n", + "d=deltf+deltdo; # d=Tc-tfw\n", + "deltmetal=(r*Rmetal);\n", + "deltdi=(r*Rdi);\n", + "delti=(r/hi);\n", + "print\"\\t Tc-tfw : \\t\",d\n", + "print\"\\t fin and tube metal : \\t\",deltmetal\n", + "print\"\\t tube side dirt : \\t\",deltdi\n", + "print\"\\t tubeside film : \\t\",delti\n", + "Td=deltf+deltdo+deltmetal+deltdi+delti;\n", + "print\"\\t total temperature drop : F \\t\",Td\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0359; # ft\n", + "Rea1=(De1*Ga/mu1);\n", + "print\"\\t reynolds number : \\t\",Rea1\n", + "f=0.00036; # fig 16.10\n", + "s=0.82; #using fig.6\n", + "delPs=((f*(Ga**2)*(80))/(5.22*(10**10)*(De1)*(s)*(phya))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000192; # friction factor for reynolds number 65000, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(80))/(5.22*(10**10)*(0.134)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 pgno:535" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for oxygwn is : Btu/hr \t1012500.0\n", + "\t total heat required for water is : Btu/hr \t1010000\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t66.8818722257\n", + "\t R is : \t7\n", + "\t S is : \t0\n", + "\t FT is 0.87 \t\n", + "\t delt is : F \t58.1872288364\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t flow area is : ft**2 \t1.46834418403\n", + "\t wetted perimeter : in \t1570.8\n", + "\t De : ft \t0.0448691882056\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20431.1770539\n", + "\t reynolds number is : \t16820.7399724\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t20.6536497998\n", + "\t hf1 : \t19.4485963081\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0582118055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t867521.622428\n", + "\t V is : fps \t3.85565165523\n", + "\t reynolds number is : \t29155.8813311\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t902.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t243.418213207\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.6828045249\n", + "\t total surface area is : ft**2 \t229.376\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t75.673831631\n", + "\t excess fouling factor : \t0.00206419817483\n", + "\t Rdo : \t0.0221351170807\n", + "\t hf2 : \t14.1738000666\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t77.1741091592\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t16232.4764484\n", + "\t delPs is : psi \t0.6\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=100; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=50500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.225; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oxygwn is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.87 \\t\"# from fig 18\n", + "delt=(0.87*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "ID=19.25; # in, table 11\n", + "OD=1; # in, table 11\n", + "As=((3.14*ID**2/(4))-(70*3.14*OD**2/(4))-(70*20*0.035*0.5))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "p=(70*3.14*(OD))-(70*20*0.035)+(70*20*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*As*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0545; # at 175F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=59.5; # from fig.16.10a\n", + "k=0.0175;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "hf=((jH)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.479; # table 10\n", + "L=16;\n", + "Nt=70;\n", + "n=4;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0652; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.94; # at 90F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(940*0.96); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi);\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "UDi=((hfi1)*(hi1)/(hi1+hfi1)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A2=0.2048; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UDi1=((Q)/((A)*(delt)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi1\n", + "Re=(1/UDi1)-(1/UDi);\n", + "print\"\\t excess fouling factor : \\t\",Re\n", + "Ro=9.27; #Adding to the outside fouling factor\n", + "Rdo1=Rdo+(Re*Ro);\n", + "print\"\\t Rdo : \\t\",Rdo1\n", + "hf2=(hf/(1+(hf*Rdo1)));\n", + "print\"\\t hf2 : \\t\",hf2\n", + "hfi2=113;\n", + "UDi2=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi2\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0433; # ft\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.00025; # fig 16.10\n", + "s=0.00133;\n", + "delPs=((f*(Gs**2)*(L))/(5.22*(10**10)*(De1)*(s)*(1))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00021; # friction factor for reynolds number 29100, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(0.0625)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for air is : Btu/hr \t1250000.0\n", + "\t total heat required for water is : Btu/hr \t1248000.0\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t60.0\n", + "\t LMTD is : F \t54.9097962457\n", + "\t R is : \t1.25\n", + "\t S is : \t0.4\n", + "\t FT is 0.985 \t\n", + "\t delt is : F \t54.086149302\n", + "\t caloric temperature of hot fluid is : F \t225.0\n", + "\t caloric temperature of cold fluid is : F \t170.0\n", + "\t fin surface is : in**2/lin ft \t310.86\n", + "\t bare tube surface is : in**2/lin ft \t27.1296\n", + "\t total outside surface : ft**2/lin ft \t337.9896\n", + "\t projected perimeter : in/ft \t161.28\n", + "\t De : ft \t0.111235119048\n", + "\t flow area : ft**2 \t7.53\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t13280.2124834\n", + "\t reynolds number is : \t28408.1926263\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t22.9878748896\n", + "\t hf1 : \t21.5048242607\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.079625\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t391836.734694\n", + "\t V is : fps \t1.74149659864\n", + "\t reynolds number is : \t30427.5453198\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t667.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t222.303643994\n", + "\t X : \t0.03125\n", + "\t hfi2 : \t212.371237248\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.611980947\n", + "\t inside surface per bank is : ft**2 \t18.312\n", + "\t Ai1 : ft**2 \t212.447090593\n", + "\t number of banks : \t11.6015230774\n", + "\t net free volume : ft**3 \t1.89483559028\n", + "\t frictional surface : ft**2 \t191.88\n", + "\t pressure drop for annulus \t\n", + "\t De1 : ft \t0.0395004292324\n", + "\t reynolds number : \t10087.9633345\n", + "\t delPs is : psi \t0.232069401484\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.39\n" + ] + } + ], + "source": [ + "print\"\\t example 16.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=150.; # inlet cold fluid,F\n", + "t2=190.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=31200; # lb/hr\\\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for air is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.985 \\t\" # from fig 18\n", + "delt=(0.985*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "Af=(3.14*2*8*12*(1.75**2-1**2))/(4);\n", + "Ao=((3.14*1*12)-(3.14*1*8*0.035*12));\n", + "print\"\\t fin surface is : in**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : in**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "p=(2*3*2*8*12/8)+(((12)-(8*0.035*12))*(2));\n", + "print\"\\t projected perimeter : in/ft \\t\",p\n", + "De=(2*A/(3.14*p*12)); # eq 16.104\n", + "print\"\\t De : ft \\t\",De\n", + "# 21 tubes may be fit in one :vertical bank (Fig. 16.19b) ,20 tubes in alternating banks for triangular pitch\n", + "As=((4**2*12**2)-(21*1*48)-((21)*(2*0.035*3*8*48/8)))/(144); # fig 16.19\n", + "print\"\\t flow area : ft**2 \\t\",As\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.052; # at 225F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jf=157; # from fig.16.18a\n", + "k=0.0183;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "phys=1;\n", + "hf=((jf)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.546; # table 10\n", + "L=4;\n", + "Nt=21;\n", + "n=1;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0695; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.895; # at 170F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(710*0.94); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi); # 16.40\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "k1=60; # table 3 , for brass\n", + "# yb=0.00146 ft\n", + "X=((0.875-0.5)/12)*(21.5/(60*0.00146))**(1/2);\n", + "print\"\\t X : \\t\",X\n", + "nf=0.91; # from fig 16.13a , by comparing X value\n", + "Ai=0.218; # ft**2/ft\n", + "hfi2=((nf*Af/144)+(Ao/144))*(hf1/Ai); # eq 16.34\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "UDi=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A=(21*4*Ai); # ft**2\n", + "print\"\\t inside surface per bank is : ft**2 \\t\",A\n", + "Ai1=(Q/(UDi*delt));\n", + "print\"\\t Ai1 : ft**2 \\t\",Ai1\n", + "Nb=(Ai1/A);\n", + "print\"\\t number of banks : \\t\",Nb\n", + "Vn=(4*4*1.95/12)-(41*3.14*1*4/(2*4*144))-((41*3.14*0.035*8*4/(144*2*4))*(1.75**2-1**2)); # fig 16.19b\n", + "print\"\\t net free volume : ft**3 \\t\",Vn\n", + "Af1=(41*2.34*4/2);\n", + "print\"\\t frictional surface : ft**2 \\t\",Af1\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=(4*Vn/Af1); # ft\n", + "print\"\\t De1 : ft \\t\",De1\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.0024; # fig 16.18b\n", + "s=0.000928;\n", + "Lp=1.95;\n", + "R1=0.538; # R1=(De1/ST)**(0.4)\n", + "R2=1; # R2=(SL/ST)**0.6\n", + "delPs=((f*(Gs**2)*(Lp)*(R1)*(R2))/(5.22*(10**10)*(De1)*(s)*(1)));\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 30400, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(Nb))/(5.22*(10**10)*(0.0695)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "#end\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/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 new file mode 100644 index 00000000..4ffc6c97 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_16_Extented_Surfaces_4.ipynb @@ -0,0 +1,1035 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Extented Surfaces" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1 pgno: 521" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t fin surface is : %.1f ft**2/lin ft \t2.5\n", + "\t bare tube surface is : ft**2/lin ft \t0.0\n", + "\t total outside surface : ft**2/lin ft \t2.5\n", + "\t total inside surface : ft**2/lin ft \t0.277366666667\n", + "\t fin efficiencies \t\n", + "\t hf m n \t \n", + "4\n", + "5.24\n", + "0.965717954492\n", + "\t weighted efficiency curve \t\n", + "\t hf hfi \t \n", + "4\n", + "34.8173760783\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYXGX5xvHvnUCoEQggLZEaSpASelNCFZUmCoh0+IkQ\n", + "EWxIQo0iKigqomClQxQUEGwkIEGKEOmBUJUACSRgEAEbgdy/P953k5PJzO7s7M6e2d3nc1175Zwz\n", + "Z877zOxmnjlvlW1CCCGEzhpQdgAhhBB6p0ggIYQQGhIJJIQQQkMigYQQQmhIJJAQQggNiQQSQgih\n", + "IZFAQreTdJGk0+o891JJZzUxlnavL+mrkl6R9KKkYZLekKQmxLGepIckvS7peEmLS7pJ0muSrpH0\n", + "CUk313GdsZJ+0t3xhdCIRcoOIPQ9to/rzOn5pypJc4F1bP+t0XBqXV/Se4DPA8Nsz86HBzdYTke+\n", + "BNxqe9Nc9qHAu4Ehtufmc67u6CK2v96k+ELotLgDCb1BV+8Iaj3/PcDsQvJoptWBqRX7TxWSR78m\n", + "aWDZMYTOiwQS5pF0pKQbC/tPS7qmsP+CpI3z9vqSJkqaLekJSfsXzlug2kjSl3IV0XRJ/ydprqS1\n", + "CkUPkfSbXL1zT9tjkv6UH384Vy3tn4/vmauD/iHpLkkbFcoaKemBfK2fA4vXeK27AhOAVfO1L5a0\n", + "Ro5tQD5nkqSvSLozX+9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JpqbVc\n", + "Qgjlafaa6ItJ+gmwRuF82965kQJDz5EYBnwfWA/4hM2fSg4phNCH1JNArgUuIjV6t83GG1UfLUxi\n", + "IHA8cDpwAXCAzf/KjSqE0NfUk0Dm2L6o6ZGEbiGxGamR/A1ge5snSw4phNBH1TMb702SPi1plTxj\n", + "7hBJQ5oeWegUiaUlziPNXfV9YOdIHiGEZqqnEX0aVaqsbK/ZpJga0p8b0SX2BH4A3A58weaVkkMK\n", + "IfQSTV/StjfojwlEYlXgfGAkcKzNLSWHFELoZZq6oJSkpSSdnntiIWm4pD0bKSx0D4kBEqOBh4En\n", + "gY0ieYQQelo9jeiXkKZc3y7vv0iaAPE3zQoq1CaxEamRfC4wyuaxkkMKIfRT9TSir237HPJqhLb/\n", + "1dyQQjUSS0p8A/gjKam/L5JHCKFM9SSQ/0laom1H0toQYwp6ksQHgCmkwZwb2fzYZm77zwohhOaq\n", + "pwprHGkKjKGSrga2B45oYkwhk1iJtE7HtsBom9+XHFIIIcxTVy8sSSsA2+Tde2z/valRNaAv9cKS\n", + "GECavv5rwKXAl22i6jCE0O2aNZ37BrYfl7Q5aRxIWwEGsP1AIwU2S19JIBIbkNYkXww4xubhkkMK\n", + "IfRhzUogP7H9SUmTqD6QcKdGCmyW3p5AJBYHTgFGk6oNL7LnzT0WQghN0SsHEkoaCNxHWh99rzw9\n", + "yi+A1Vl4RcKxpCqdd4ATbE+ocr1em0AkdiLddTwKfMauvuZ7CCF0t2YPJPy0pOUK+8tJGt1IYRVO\n", + "BKYy/+5mDDDR9rrArXkfSSOAA4ERwB7AhZLq6T3W8iRWkLgUuAw4yWa/SB4hhN6ing/iY2z/o20n\n", + "bx/TlUIlDQU+RJoivi3z7U36ICX/u2/e3gcYb3tOXtjqGWCrrpRfNglJHEa643gN2NDm1yWHFUII\n", + "nVJPN94BkgbYngvzqp4W7WK53wFOAt5VOLaS7Vl5exawUt5eFbincN50YLUull8aieHAD4HlgD1t\n", + "7is5pBBCaEg9CeRm4OeSfk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aCyuInph9T7K3/iflfQxSNO4S9o4P/4u0jcmSFVMbd4gVTVV095jldc8sqP4JC1P\n", + "qpq6DjidVB0EC/4nvhX4mKQV85OGKE03XVN+3dMl7ZOfs5jS9PB3AAfmHjYrAu8nVXXdDByV7wiQ\n", + "tFpbeXUwqQ3g/blxG0lDqryOCcAJhRe/SQfX7czvodrr6mi677o+uCU9UeP4+qTPhdlV4pkGbJr/\n", + "3oaR1ippuyt4opD026oQq+nob61WvMuS7mZPtv3nKqesRO21gP5Oqt5q1Cqk1x4qRAJpfZXffNr2\n", + "DwaOzrffj5LqjCHdcVwr6T7glcL5NwEfyd01t6+4ZttjD0jaoUq55wJfl/QAqT7ZhXOqxbcacFuu\n", + "OrqC+SvYzTvf9uOk9ZknSHqY9EG8cuG8Wg4FTsjPuYu0NOf1pGqPh0mJ6STbLzstJ3o18GdJj5Aa\n", + "Tat9kFR7Hdj+O3AMcF1+n8dXOf8EYAtJD0t6jAW/hVe75mzgLklTJJ3T3mO1XleN+Gu9loW2q9xd\n", + "LJH/Lh4kNeQfnpPBw8A7Sl1wT7R9F6mNYCqpbeJ+UsL6IKkjRZs7SYsrVYtxgWtWeS21HE/qOHJm\n", + "W6yFLx8rA7NtV945pIJTL8JHJa1XiKUzdxQjSY3/oUJ04w2hn5H0YVLvte930/UmkKqVZuV9kXq0\n", + "LVS11wySjgGWsv2dds45gvRl45xa59R43rqkKuHoxltFJJAQQreTNJrUOH9JD5R1K6ln3pvtnDOI\n", + "1P17x860r0n6Nqlbc2WngEAkkBBCCA2KNpAQQggNiQQSQgihIZFAQgghNCQSSAghhIZEAgkhhNCQ\n", + "SCAhhBAa8v/Onrp6J+51IAAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print\"\\t example 16.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "from math import tanh\n", + "Af=(20*0.75*12*2)/(144);\n", + "Ao=((3.14*1.25)-(20*0.035))*(12/144);\n", + "print\"\\t fin surface is : %.1f ft**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : ft**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "Ai=(3.14*1.06*12)/(144);\n", + "print\"\\t total inside surface : ft**2/lin ft \\t\",Ai\n", + "print\"\\t fin efficiencies \\t\"\n", + "b=0.0625; # ft\n", + "hf=4; # from table in solution\n", + "m=(5.24*(hf**(1/2))); # m=((hf*P)/(Kax))**(1/2), eq 16.8\n", + "n=(tanh(m*b))/(m*b); # efficiency , eq 16.26\n", + "print\"\\t hf m n \\t \"\n", + "print hf \n", + "print m \n", + "print n\n", + "# similarly efficiencies values are calculated at different hf values\n", + "print\"\\t weighted efficiency curve \\t\"\n", + "hfi=((n*Af)+(Ao))*(hf/Ai); # eq 16.34\n", + "print\"\\t hf hfi \\t \"\n", + "print hf \n", + "print hfi\n", + "# similarly efficiencies values are calculated at different hf values\n", + "hf=[4, 16, 36, 100, 400, 625, 900]; # from 2nd table in the solution\n", + "hfi=[35.4, 110.8, 193.5, 370, 935, 1295, 1700]; # from 2nd table in the solution\n", + "pyplot.plot(hf,hfi)\n", + "pyplot.xlabel('heat transfer coefficient to fin,Btu/(ft**2)*(hr)')\n", + "pyplot.ylabel('coefficient hf referred to the tube ID')\n", + "pyplot.title('weighted fin efficiency curve')\n", + "pyplot.show()\t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t annulus flow area : ft**2 \t0.0391482454167\n", + "\t wetted perimeter : ft \t2.76875\n", + "\t equivalent diameter : ft \t0.0565572845749\n", + "\t heat load : Btu/hr \t270286.4\n", + "\t delt1 is : F \t151.0\n", + "\t delt2 is : F \t117.0\n", + "\t LMTD is F \t133.427780969\n", + "\t Ui : Btu/(hr)*(ft**2)*(F) \t365.652178958\n", + "\t hfi : Btu/(hr)*(ft**2)*(F) \t416.40535396\n", + "\t jf : \t36.7135894676\n", + "\t Ga : lb/(hr)*(ft**2) \t388267.720257\n", + "\t Rea : \t11319.0\n" + ] + } + ], + "source": [ + "print\"\\t example 16.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Ts=302.; # F\n", + "t1=151.;\n", + "t2=185.;\n", + "w=15200.; # lb/hr\n", + "from math import log10\n", + "# The dropwise condensation of steam was promoted with oil.\n", + "aa=(3.14*(3.068**2-1.25**2))/(4*144)-((20*0.035*0.75)/(144));\n", + "print\"\\t annulus flow area : ft**2 \\t\",aa\n", + "p=(3.14*(1.25/12))-(20*0.035/12)+(20*0.75*2/12);\n", + "print\"\\t wetted perimeter : ft \\t\",p\n", + "De=(4*aa/p);\n", + "print\"\\t equivalent diameter : ft \\t\",De\n", + "Q=w*0.523*(t2-t1);\n", + "print\"\\t heat load : Btu/hr \\t\",Q\n", + "delt1=Ts-t1; #F\n", + "delt2=Ts-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Ai=0.277; # ft**2/ft\n", + "n=20; # number of fins\n", + "Ui=(Q/(Ai*n*LMTD));\n", + "print\"\\t Ui : Btu/(hr)*(ft**2)*(F) \\t\",Ui\n", + "hi=3000; # assumed value for dropwise condensation of steam\n", + "hfi=(Ui*hi)/(hi-Ui);\n", + "print\"\\t hfi : Btu/(hr)*(ft**2)*(F) \\t\",hfi\n", + "hf=120; # from fig 16.7 for hfi=418\n", + "mu=1.94; # lb/(ft*hr)\n", + "k=0.079;\n", + "Z=2.34; # Z=((c*mu)/k)**(1/3)\n", + "jf=(hf*De/(Z*k)); # eq 16.36\n", + "print\"\\t jf : \\t\",jf\n", + "Ga=(w/aa);\n", + "print\"\\t Ga : lb/(hr)*(ft**2) \\t\",Ga\n", + "Rea=(De*Ga/mu);\n", + "print\"\\t Rea : \\t\",round(Rea)\n", + "# end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3 pgno:530" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for gas oil is : Btu/hr \t477000.0\n", + "\t total heat required for water is : Btu/hr \t478000.0\n", + "\t delt1 is : F \t120.0\n", + "\t delt2 is : F \t130.0\n", + "\t LMTD is :%.0f F \t125.073724087\n", + "\t ratio of two local temperature difference is : \t0.923076923077\n", + "\t caloric temperature of hot fluid is : F \t223.5\n", + "\t caloric temperature of cold fluid is : F \t98.8\n", + "\t hot fluid:shell side,gas oil \t\n", + "\t flow area is : ft**2 \t0.0287156933333\n", + "\t wetted perimeter : in \t29.126\n", + "\t De : ft \t0.0473238096546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t626834.943216\n", + "\t reynolds number is : \t4903.1764525\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t97.2026562015\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.01409546\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t847790.707079\n", + "\t V is : fps \t3.76795869813\n", + "\t reynolds number is : \t65199.6985471\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t795.4\n", + "\t calculation of tfw \t\n", + "\t phya is : \t0.953986161765\n", + "\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t92.729988903\n", + "\t Rf : \t0.0107839978396\n", + "\t hf1 : \t78.2227916919\n", + "\t hfi2 : \t450.563280145\n", + "\t Rmetal : \t0.00170212455807\n", + "\t Ri : \t0.00125722906714\n", + "\t hi1 : \t234.894572087\n", + "\t UDi : \t122.267359744\n", + "\t Ai : ft**2 \t31.2572870644\n", + "\t length of pipe required : lin ft \t74.0694006266\n", + "\t Q/Ai1 : Btu/(hr)*(ft**2) \t14158.7677725\n", + "\t annulus film : \t31.4245931625\n", + "\t annulus dirt : \t4.9162388099\n", + "\t Tc-tfw : \t36.3408319724\n", + "\t fin and tube metal : \t24.0999863376\n", + "\t tube side dirt : \t42.4763033175\n", + "\t tubeside film : \t17.8008143984\n", + "\t total temperature drop : F \t120.717936026\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t3719.56602669\n", + "\t delPs is : psi \t7.7\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t1.6\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=80.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=18000; # lb/hr\n", + "w=11950; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for gas oil is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is :%.0f F \\t\",LMTD\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",X\n", + "Fc=0.47; # from fig.17\n", + "Kc=0.27; \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,gas oil \\t\"\n", + "ID=3.068; # in, table 11\n", + "OD=1.9; # in, table 11\n", + "af=0.0175; # fin cross section,table 10\n", + "aa=((3.14*ID**2/(4))-(3.14*OD**2/(4))-(24*af))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "p=(3.14*(OD))-(24*0.035)+(24*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*aa*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=2.5*2.42; # at 224F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jf=18.4; # from fig.16.10\n", + "Z=0.25; # Z=k*((c)*(mu1)/k)**(1/3), fig 16\n", + "Hf=((jf)*(1/De)*(Z)); # Hf=(hf/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Hf\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "D=0.134; # ft\n", + "row=62.5;\n", + "at=(3.14*D**2/(4));\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.72*2.42; # at 99F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(970*0.82); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "print\"\\t calculation of tfw \\t\"\n", + "# Tc-tfw=40F assumption from fig 14\n", + "tfw=184;\n", + "mufw=3.5; # cp, at 184F\n", + "phya=(2.5/mufw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "hf=(Hf)*(phya); # from eq.6.36\n", + "print\"\\t Correct hf to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.002;\n", + "Rf=(1/hf);\n", + "print\"\\t Rf : \\t\",Rf\n", + "hf1=(1/(Rdo+Rf)); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=255; # fig 16.9\n", + "hfi2=(hf1*5.76); # eq 16.38 and fig 16.9,((Af+Ao)/(Ai))=5.76 from previous prblm\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "Rmetal=(hfi2-hfi1)/(hfi2*hfi1)# eq 16.39\n", + "print\"\\t Rmetal : \\t\",Rmetal\n", + "phyt=1; # for cooling water\n", + "Rdi=0.003;\n", + "Ri=(1/hi);\n", + "print\"\\t Ri : \\t\",Ri\n", + "hi1=(1/(Rdi+Ri)); # eq 16.40\n", + "print\"\\t hi1 : \\t\",hi1\n", + "UDi=(hi1*hfi1)/(hi1+hfi1); # eq 16.41\n", + "print\"\\t UDi : \\t\",UDi\n", + "# To obtain the true flux the heat load must be divided by the actual heat-transfer surface.For a 1}2-in. IPS pipe there are 0.422 ft2/lin foot, from table 11\n", + "# trial\n", + "Ai=(Q/(UDi*LMTD)); # LMTD=delt\n", + "print\"\\t Ai : ft**2 \\t\",Ai\n", + "L=(Ai/0.422);\n", + "print\"\\t length of pipe required : lin ft \\t\",L\n", + "# Use two 20-ft hairpins = 80 lin ft\n", + "Ai1=(80*0.422); # ft**2\n", + "r=(Q/Ai1);\n", + "print\"\\t Q/Ai1 : Btu/(hr)*(ft**2) \\t\",r\n", + "deltf=(r/hfi2);\n", + "deltdo=(r*Rdo/5.76);\n", + "print\"\\t annulus film : \\t\",deltf\n", + "print\"\\t annulus dirt : \\t\",deltdo\n", + "d=deltf+deltdo; # d=Tc-tfw\n", + "deltmetal=(r*Rmetal);\n", + "deltdi=(r*Rdi);\n", + "delti=(r/hi);\n", + "print\"\\t Tc-tfw : \\t\",d\n", + "print\"\\t fin and tube metal : \\t\",deltmetal\n", + "print\"\\t tube side dirt : \\t\",deltdi\n", + "print\"\\t tubeside film : \\t\",delti\n", + "Td=deltf+deltdo+deltmetal+deltdi+delti;\n", + "print\"\\t total temperature drop : F \\t\",Td\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0359; # ft\n", + "Rea1=(De1*Ga/mu1);\n", + "print\"\\t reynolds number : \\t\",Rea1\n", + "f=0.00036; # fig 16.10\n", + "s=0.82; #using fig.6\n", + "delPs=((f*(Ga**2)*(80))/(5.22*(10**10)*(De1)*(s)*(phya))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000192; # friction factor for reynolds number 65000, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(80))/(5.22*(10**10)*(0.134)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4 pgno:535" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for oxygwn is : Btu/hr \t1012500.0\n", + "\t total heat required for water is : Btu/hr \t1010000\n", + "\t delt1 is : F \t20\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t66.8818722257\n", + "\t R is : \t7\n", + "\t S is : \t0\n", + "\t FT is 0.87 \t\n", + "\t delt is : F \t58.1872288364\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t flow area is : ft**2 \t1.46834418403\n", + "\t wetted perimeter : in \t1570.8\n", + "\t De : ft \t0.0448691882056\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t20431.1770539\n", + "\t reynolds number is : \t16820.7399724\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t20.6536497998\n", + "\t hf1 : \t19.4485963081\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0582118055556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t867521.622428\n", + "\t V is : fps \t3.85565165523\n", + "\t reynolds number is : \t29155.8813311\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t902.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t243.418213207\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t89.6828045249\n", + "\t total surface area is : ft**2 \t229.376\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t75.673831631\n", + "\t excess fouling factor : \t0.00206419817483\n", + "\t Rdo : \t0.0221351170807\n", + "\t hf2 : \t14.1738000666\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t77.1741091592\n", + "\t pressure drop for annulus \t\n", + "\t reynolds number : \t16232.4764484\n", + "\t delPs is : psi \t0.6\n", + "\t allowable delPa is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.0\n", + "\t allowable delPa is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 16.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=100; # outlet cold fluid,F\n", + "W=30000; # lb/hr\n", + "w=50500; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.225; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oxygwn is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.87 \\t\"# from fig 18\n", + "delt=(0.87*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "ID=19.25; # in, table 11\n", + "OD=1; # in, table 11\n", + "As=((3.14*ID**2/(4))-(70*3.14*OD**2/(4))-(70*20*0.035*0.5))/(144);\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "p=(70*3.14*(OD))-(70*20*0.035)+(70*20*0.5*2);\n", + "print\"\\t wetted perimeter : in \\t\",p\n", + "De=(4*As*12/(p));\n", + "print\"\\t De : ft \\t\",De\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.0545; # at 175F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=59.5; # from fig.16.10a\n", + "k=0.0175;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "hf=((jH)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.479; # table 10\n", + "L=16;\n", + "Nt=70;\n", + "n=4;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0652; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=1.94; # at 90F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(940*0.96); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi);\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "UDi=((hfi1)*(hi1)/(hi1+hfi1)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A2=0.2048; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UDi1=((Q)/((A)*(delt)));\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi1\n", + "Re=(1/UDi1)-(1/UDi);\n", + "print\"\\t excess fouling factor : \\t\",Re\n", + "Ro=9.27; #Adding to the outside fouling factor\n", + "Rdo1=Rdo+(Re*Ro);\n", + "print\"\\t Rdo : \\t\",Rdo1\n", + "hf2=(hf/(1+(hf*Rdo1)));\n", + "print\"\\t hf2 : \\t\",hf2\n", + "hfi2=113;\n", + "UDi2=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi2\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=0.0433; # ft\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.00025; # fig 16.10\n", + "s=0.00133;\n", + "delPs=((f*(Gs**2)*(L))/(5.22*(10**10)*(De1)*(s)*(1))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",round(delPs,1)\n", + "print\"\\t allowable delPa is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00021; # friction factor for reynolds number 29100, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(0.0625)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5 pgno:556" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 16.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t total heat required for air is : Btu/hr \t1250000.0\n", + "\t total heat required for water is : Btu/hr \t1248000.0\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t60.0\n", + "\t LMTD is : F \t54.9097962457\n", + "\t R is : \t1.25\n", + "\t S is : \t0.4\n", + "\t FT is 0.985 \t\n", + "\t delt is : F \t54.086149302\n", + "\t caloric temperature of hot fluid is : F \t225.0\n", + "\t caloric temperature of cold fluid is : F \t170.0\n", + "\t fin surface is : in**2/lin ft \t310.86\n", + "\t bare tube surface is : in**2/lin ft \t27.1296\n", + "\t total outside surface : ft**2/lin ft \t337.9896\n", + "\t projected perimeter : in/ft \t161.28\n", + "\t De : ft \t0.111235119048\n", + "\t flow area : ft**2 \t7.53\n", + "\t hot fluid:shell side,oxygen \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t13280.2124834\n", + "\t reynolds number is : \t28408.1926263\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t22.9878748896\n", + "\t hf1 : \t21.5048242607\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.079625\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t391836.734694\n", + "\t V is : fps \t1.74149659864\n", + "\t reynolds number is : \t30427.5453198\n", + "\t hi : Btu/(hr)*(ft**2)*(F) \t667.4\n", + "\t hi1 : Btu/(hr)*(ft**2)*(F) \t222.303643994\n", + "\t X : \t0.03125\n", + "\t hfi2 : \t212.371237248\n", + "\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \t108.611980947\n", + "\t inside surface per bank is : ft**2 \t18.312\n", + "\t Ai1 : ft**2 \t212.447090593\n", + "\t number of banks : \t11.6015230774\n", + "\t net free volume : ft**3 \t1.89483559028\n", + "\t frictional surface : ft**2 \t191.88\n", + "\t pressure drop for annulus \t\n", + "\t De1 : ft \t0.0395004292324\n", + "\t reynolds number : \t10087.9633345\n", + "\t delPs is : psi \t0.232069401484\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t0.39\n" + ] + } + ], + "source": [ + "print\"\\t example 16.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=250.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=150.; # inlet cold fluid,F\n", + "t2=190.; # outlet cold fluid,F\n", + "W=100000; # lb/hr\n", + "w=31200; # lb/hr\\\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "C=0.25; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for air is : Btu/hr \\t\",Q\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.985 \\t\" # from fig 18\n", + "delt=(0.985*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=(T2+T1)/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "Af=(3.14*2*8*12*(1.75**2-1**2))/(4);\n", + "Ao=((3.14*1*12)-(3.14*1*8*0.035*12));\n", + "print\"\\t fin surface is : in**2/lin ft \\t\",Af\n", + "print\"\\t bare tube surface is : in**2/lin ft \\t\",Ao\n", + "A=(Af+Ao);\n", + "print\"\\t total outside surface : ft**2/lin ft \\t\",A\n", + "p=(2*3*2*8*12/8)+(((12)-(8*0.035*12))*(2));\n", + "print\"\\t projected perimeter : in/ft \\t\",p\n", + "De=(2*A/(3.14*p*12)); # eq 16.104\n", + "print\"\\t De : ft \\t\",De\n", + "# 21 tubes may be fit in one :vertical bank (Fig. 16.19b) ,20 tubes in alternating banks for triangular pitch\n", + "As=((4**2*12**2)-(21*1*48)-((21)*(2*0.035*3*8*48/8)))/(144); # fig 16.19\n", + "print\"\\t flow area : ft**2 \\t\",As\n", + "print\"\\t hot fluid:shell side,oxygen \\t\"\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.052; # at 225F,lb/(ft)*(hr), from fig.15\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jf=157; # from fig.16.18a\n", + "k=0.0183;\n", + "Z=0.89; # Z=((c)*(mu1)/k)**(1/3), fig\n", + "phys=1;\n", + "hf=((jf)*(k/De)*(Z)); #using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hf\n", + "Rdo=0.003;\n", + "hdo=(1/Rdo);\n", + "hf1=(hdo*hf)/(hdo+hf); # eq 16.37\n", + "print\"\\t hf1 : \\t\",hf1\n", + "hfi1=142; # fig 16.9\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "at1=0.546; # table 10\n", + "L=4;\n", + "Nt=21;\n", + "n=1;\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "D=0.0695; # ft\n", + "row=62.5;\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*row));\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.895; # at 170F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=(710*0.94); # fig 25\n", + "print\"\\t hi : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "Rdi=0.003;\n", + "hdi=(1/Rdi);\n", + "hi1=(hdi*hi)/(hdi+hi); # 16.40\n", + "print\"\\t hi1 : Btu/(hr)*(ft**2)*(F) \\t\",hi1\n", + "k1=60; # table 3 , for brass\n", + "# yb=0.00146 ft\n", + "X=((0.875-0.5)/12)*(21.5/(60*0.00146))**(1/2);\n", + "print\"\\t X : \\t\",X\n", + "nf=0.91; # from fig 16.13a , by comparing X value\n", + "Ai=0.218; # ft**2/ft\n", + "hfi2=((nf*Af/144)+(Ao/144))*(hf1/Ai); # eq 16.34\n", + "print\"\\t hfi2 : \\t\",hfi2\n", + "UDi=((hfi2)*(hi1)/(hi1+hfi2)); # eq 16.41,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UDi\n", + "A=(21*4*Ai); # ft**2\n", + "print\"\\t inside surface per bank is : ft**2 \\t\",A\n", + "Ai1=(Q/(UDi*delt));\n", + "print\"\\t Ai1 : ft**2 \\t\",Ai1\n", + "Nb=(Ai1/A);\n", + "print\"\\t number of banks : \\t\",Nb\n", + "Vn=(4*4*1.95/12)-(41*3.14*1*4/(2*4*144))-((41*3.14*0.035*8*4/(144*2*4))*(1.75**2-1**2)); # fig 16.19b\n", + "print\"\\t net free volume : ft**3 \\t\",Vn\n", + "Af1=(41*2.34*4/2);\n", + "print\"\\t frictional surface : ft**2 \\t\",Af1\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=(4*Vn/Af1); # ft\n", + "print\"\\t De1 : ft \\t\",De1\n", + "Res1=(De1*Gs/mu1);\n", + "print\"\\t reynolds number : \\t\",Res1\n", + "f=0.0024; # fig 16.18b\n", + "s=0.000928;\n", + "Lp=1.95;\n", + "R1=0.538; # R1=(De1/ST)**(0.4)\n", + "R2=1; # R2=(SL/ST)**0.6\n", + "delPs=((f*(Gs**2)*(Lp)*(R1)*(R2))/(5.22*(10**10)*(De1)*(s)*(1)));\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.0002; # friction factor for reynolds number 30400, using fig.26\n", + "s=1;\n", + "delPt=((f*(Gt**2)*(L)*(Nb))/(5.22*(10**10)*(0.0695)*(s)*(1))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,2)\n", + "#end\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/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 new file mode 100644 index 00000000..45f8b0e5 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_1.ipynb @@ -0,0 +1,856 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Direct Contact Transfer : Cooling Tower" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 71.1 pgno:585" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.1 \n", + "\n", + "\t humidity is : lb water/lb air 0.0186996126364\n", + "\t enthalpy at 75F is : Btu/lb dry air 39.1\n" + ] + } + ], + "source": [ + "print\"\\t example 17.1 \\n\"\n", + "pw=0.4298; # psia, at 75F, table 7\n", + "pt=14.696; # psia\n", + "t=75.;\n", + "Mw=18.;\n", + "Ma=29.;\n", + "X=(pw/(pt-pw))*(Mw/Ma);\n", + "print\"\\t humidity is : lb water/lb air \",X\n", + "H=(X*t)+(1051.5*X)+(0.24*t); # eq 17.54\n", + "print\"\\t enthalpy at 75F is : Btu/lb dry air \",round(H,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Pgno:602" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t by numerical integration \t\n", + "\t R is : \t0.93005952381\n", + "\t H2 is : Btu \t71.6520833333\n", + "\t difference is : \t10.9\n", + "\t difference is : \t13.0\n", + "\t average of difference is : \t11.95\n", + "\t nd1 is : \t0.418410041841\n", + "\t number of diffusing units : \t1.7\n", + "\t log mean enthalpy difference \t\n", + "\t log mean of enthalpy : Btu/lb \t25.6654878432\n", + "\t number of diffusing units are : \t1.36\n" + ] + } + ], + "source": [ + "print\"\\t example 17.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t by numerical integration \\t\"\n", + "T1=85.;\n", + "T2=120.;\n", + "A=576.; # ground area, from fig 17.12\n", + "L=1500.*(500./576.);\n", + "G=1400.;\n", + "R=(L/G);\n", + "from math import log10\n", + "print\"\\t R is : \\t\",R\n", + "H1=39.1; # fig 17.12\n", + "H2=H1+(R*(T2-T1));\n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # fig 17.12\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=43.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=5; # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.70;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "print\"\\t log mean enthalpy difference \\t\"\n", + "dt=49.9; # diff. of enthalpies at top of the tower, from table in solution\n", + "db=10.9; # diff of enthalpies at bottom of the tower,from table in solution\n", + "LME=(dt-db)/(2.3*log10(dt/db));\n", + "print\"\\t log mean of enthalpy : Btu/lb \\t\",LME\n", + "nd=(T2-T1)/(LME);\n", + "print\"\\t number of diffusing units are : \\t\",round(nd,2)\n", + "# The error is naturally larger the greater the range\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 pgno:604" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Z is : ft \t19.2469565217\n", + "\t height of diffusion unit : ft \t11.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# Since the loading is based on 1 ft2 of ground area\n", + "nd=1.7;\n", + "L=1302;\n", + "Kxa=115;\n", + "Z=(nd*L)/(Kxa);\n", + "print\"\\t Z is : ft \\t\",Z\n", + "HDU=(Z/nd);\n", + "print\"\\t height of diffusion unit : ft \\t\",round(HDU,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 pgno:605" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t difference is : \t13.0\n", + "\t difference is : \t14.3\n", + "\t average of difference is : \t13.65\n", + "\t nd1 is : \t0.417582417582\n", + "\t number of diffusing units : \t1.72\n" + ] + } + ], + "source": [ + "print\"\\t example 17.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=79.3F\n", + "Hs=43.4; # fig 17.12\n", + "H=30.4; # fig 17.12\n", + "d1=(Hs-H);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=35.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-79.3); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.72;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5 pgno:609" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for 120percent of design \t\n", + "\t R is : %.3f \t1.116\n", + "\t H2 is : %.1f Btu \t78.16\n", + "\t difference is : %.1f \t14.0\n", + "\t difference is : %.1f \t14.7\n", + "\t average of difference is : %.1f \t14.35\n", + "\t nd1 is : %.3f \t0.19512195122\n", + "\t number of diffusing units : %.2f \t1.53\n", + "\t for 80 percent of design \t\n", + "\t R is : %.3f \t0.744\n", + "\t H2 is : Btu \t65.14\n", + "\t difference is : \t8.1\n", + "\t difference is : \t9.2\n", + "\t average of difference is : \t8.65\n", + "\t nd1 is : \t0.28901734104\n", + "\t number of diffusing units : \t1.92\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYXVV9//H3pwHEULk1SC2gqYjIrYBIVC4yBYSAF7wD\n", + "XpDG8osWLFaoVJ4qsWrRKogCLXgJxQIBFREQ5GYZDXciIQQhCJLUIBi5CxIggc/vj7UDY5jJnEnm\n", + "zDpn5vN6nnlyzt77nPPJfpL5nrX2XmvJNhEREX9WO0BERHSGFISIiABSECIiopGCEBERQApCREQ0\n", + "UhAiIgJIQYiIiEYKQkREACkI0aUkLZC0R5/nB0h6SNKuq/CeB0ia38/21ST9XtK+fbZ9WtIXJfVI\n", + "Wriyn7kSGQ+WNHMF+9eQdL+k8c3zN0u6UtIfJD0gabakT0l60Uhlju6RghDdys0Pkj4MnATsa3vA\n", + "X5YtOA9YV9Juy22fDDwDXNJn277ARavwWe3yJmC27SckvRf4PnAG8HLbE4D9gY2BTSpmjA6VghDd\n", + "TJKmAl8F9rJ9XbNxf0l3S3pJ83wfSfdJ+ovm+dcl/UbSo5JmSdoFwPZTwPeAg5b7nIOAs2w/27x+\n", + "PeDVwLVDCLq/pBuX2/ZPks5vHu8r6ZfNN/l7JB0x9NMBlEJ1cfP4eOBztr9j+xEA27+y/Y+271rJ\n", + "949RLAUhutk/AJ8Ddrd907KNts8BrgG+0RSBbwMfsf1gc8g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pA1iuu8j2fc2f90s6\n", + "j3LBcGZ/L5Y0rc/TXtu97YkZ3aZZo/kzEtcBP5T4EnCCTffeWhexEiT1UMburPi4dt52KmkicOFA\n", + "F5UlrQPcDWxse3GzbTwwzvZjktYCLgM+Z/uyfl6fi8rREom/psyaejcwxeaxypEiqqlx2+kM4Bpg\n", + "c0kLJU2RNFXS1D6HvQO4dFkxaGwIzJR0M3A98OP+ikHEUNjMB3YGHgJulNiqcqSIjpOBaTHmSBwM\n", + "fAX4hM2ZleNEjLhMbhfRh8S2lC6kS4EjbJ6qHClixGRyu4g+bOYAOwIbAT+XeHnlSBHVpSDEmGXz\n", + "CPAuSkvhBom9KkeKqCpdRhGARA9wFnAK8IUsvBOj2ZCvIQw0KV3Dtv9muMKtrBSEGE4SLwPOoczB\n", + "9SGbBytHimiLgX53rmhg2tuaP/+h+fN/KPMLfWCYs0V0BJv7miU6/x34hcR7bW6snStipAzaZSTp\n", + "ZtvbLbdtdjO1RFVpIUS7SLwb+C/KzKnfzOjmGE1W5S4jSdqlz5OdyUykMcrZnAvsQplO+3SJ8ZUj\n", + "RbRdKy2EHYDpwLrNpoeBKbZvanO2QaWFEO0msRblQvO2wLtt7qwcKWKVrfTANElrAu8GJgITgEco\n", + "F5X/rQ05hyQFIUZCs/DOVODfgI/a/LBypIhVsjIXlZc5n1IEfgHcM9zBIjpdc/3gFIlfAN+X2An4\n", + "tM2SytEihlUrLYRbbW89QnmGJC2EGGkSfwGcAawF7G9zX+VIEUO2KheVr5FUfcxBRCdoxia8BbiC\n", + "svDObpUjRQybVloItwOvAubDcxOAZWBajHkSewOnA8cBX82tqdEtVuWi8sT+ttteMBzBVkUKQtTW\n", + "TIr3feBe4GCbRytHihhUpr+OaBOJFwHHA3tRbk29pXKkiBWqsWLadEmLBpoTSdKRkmY3P3MlLZW0\n", + "brNvsqR5ku6UdFS7MkYMB5unbA4FpgE/lTiocqSIldK2FoKkXSmThH13oDWV+xz7VuATtveUNA64\n", + "A9gT+C1wI3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P2ckSMUs2MqfsCnwXOkDhd\n", + "4qWVY41J7ewyOo2yRmu/JK1L6UN8m+2tgfc028dRvi1MptzHfKCkLdqYMyIqa8YunEv5P/8AcKvE\n", + "1CzfObLadrJtzwQeXsEh7wfOtX1Pc/wDzfZJwF22F9heApwN7NeunBHROWweszkCeDPwYeAaie0r\n", + "xxozalbfzYD1JV0paZakDzXbNwIW9jnunmZbRIwRzfrNuwDfBi6ROEFi7cqxRr2aMxKuTplLfQ9g\n", + "PHCtpOsoQ91bJmlan6e9tnuHK2BE1GPzLPBtiR8BX6aMXTgC+J49tN8TY52kHqBnsONqFoSFwAO2\n", + "FwOLJf0c2JbSItikz3GbNNv6ZXtaO0NGRF02DwAfkdiFMgXGFInDbO6sHK1rNF+Ue5c9l3RMf8fV\n", + "7DI6H9hF0jhJ44HXA7dR7kveTNJESWsA+wMXVMwZER3A5ipKr8LlwLUS0yTWrBxrVGnnbaczgGuA\n", + "zSUtlDRF0lRJUwFszwMuAW4Brge+Zfs220uBw4BLKQXiHNu3tytnRHSPZvnOrwLbA9tQ7kbau3Ks\n", + "USMD0yKia0nsS7lNfRbwTza/rRypK2TqiogYdWwuBrYGfgXMkfhElu9ceWkhRMSoIPEayvKd6wMf\n", + "s7m2cqSOlRZCRIxqNvMot7F/BThX4psS61eO1VVSECJi1GimwDiTMgXG05SxCwdn+c7WpMsoIkYt\n", + "idcBpwBPULqRflk5UkdIl1FEjDk2syhjnM4GeiW+LLFW5VgdKwUhIka1ZvnO/6SMW9iI0o30jnQj\n", + "vVC6jCJiTJHYnXI30p3Ax20W1E008tJlFBEB2PwvZd606yjLdx6d5TuLFISIGHNsnrL5IrAjsDNl\n", + "UNvfVo5VXbqMImJMa64lvAP4OvAz4EibRXVTtVe6jCIi+tGMXTiPMnbhd5QJ8z4mMa5ytBGXFkJE\n", + "RB8S21DWXVgD+KjNTZUjDbu0ECIiWmAzF3gTpSj8ROJEiXUqxxoRKQgREcuxedbmNEo30pqUsQsH\n", + "jvaxC+k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ZeBTth+qFrqCFs/TlsB/N1Oj3Ap8\n", + "pFrgigYbXGr7Ykn7SroL+CPwd/XS1jPYeZL0l8CNlBs5npV0OLBlJ37JyMC0iIgAOr/LKCIiRkgK\n", + "QkREACkIERHRSEGIiAggBSEiIhopCBERAaQgRKw0Sf3eRy7pZZIubR5vJunHku6SNEvS/0radWST\n", + "RrQmBSFi5Q00iGcycImkNYGLgFNsv8r264CPA68cqYARQ5GBaRErSdJjtl8wOaCksylrT+wM7GJ7\n", + "TI7gje6TFkLEMJI0Dtjc9jxgK+CmypEiWpaCEDG8Xg9c1zw2fSY0a5blnCtprK7ZER0uBSFieO0D\n", + "XNI8/iXw2mU7bL8TOBhYf+RjRQwuBSFieO0OXNE8PgvYWdLb+uxfa+QjRbSmo6e/juhw45vpjpc5\n", + "EXjS9h8BbD8p6a3A8ZJOABYBjwGfH/moEYPLXUYRw0TSB4CNbP9H7SwRKyMFISIigFxDiIiIRgpC\n", + "REQAKQgREdFIQYiICCAFISIiGikIEREBpCBERETj/wPQ8mh2PbtLiwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t trial 1 \t\n", + "\t R is : \t1.1\n", + "\t H2 is : Btu \t73.0\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.7\n", + "\t average of difference is : \t16.1\n", + "\t nd1 is : \t0.310559006211\n", + "\t number of diffusing units : \t1.48\n", + "\t L/G is : \t1.19\n", + "\t trial 2 \t\n", + "\t R4 is : \t1.2\n", + "\t H2 is : Btu \t76.5\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.2\n", + "\t average of difference is : \t15.85\n", + "\t nd1 is : \t0.315457413249\n", + "\t number of diffusing units : \t1.56\n", + "\t L/G is : \t1.08\n" + ] + } + ], + "source": [ + "print\"\\t example 17.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=85;\n", + "T2=120;\n", + "R=0.93; # R=(L/G), for 1500 gpm\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "print\"\\t for 120percent of design \\t\"\n", + "R1=1.2*R;\n", + "print\"\\t R is : %.3f \\t\",R1\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R1*(T2-T1)); \n", + "print\"\\t H2 is : %.1f Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=87.2F\n", + "Hs=53.1; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : %.1f \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=42; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : %.1f \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : %.1f \\t\",d\n", + "dT=(90-87.2); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : %.3f \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.53;\n", + "print\"\\t number of diffusing units : %.2f \\t\",nd\n", + "print\"\\t for 80 percent of design \\t\"\n", + "R2=0.8*R;\n", + "print\"\\t R is : %.3f \\t\",R2\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R2*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=82.5F\n", + "Hs=47.2; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=40.8; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-82.5); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.92;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "X=[1.115, 0.93, 0.74];\n", + "Y=[1.53, 1.70, 1.92];\n", + "pyplot.plot(X,Y)\n", + "pyplot.xlabel('L/G')\n", + "pyplot.ylabel('nd')\n", + "pyplot.title('KxaV/L vs L/G')\n", + "pyplot.show()\n", + "print\"\\t trial 1 \\t\"\n", + "R3=1.1;\n", + "print\"\\t R is : \\t\",R3\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R3*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.48;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.19; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "print\"\\t trial 2 \\t\"\n", + "R4=1.2;\n", + "print\"\\t R4 is : \\t\",R4\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R4*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40.5; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.56;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.08; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 pgno:615" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t X1 : lb/lb \t0.0806276339156\n", + "\t total water in inlet gas : lb/hr \t120.941450873\n", + "\t H1 : Btu/lb dry air \t174.00276\n", + "\t outlet gas humidity : lb/lb \t0.0645021071324\n", + "\t pw : psia \t1.38381840969\n", + "\t H2 : Btu/lb dry air \t126.234717909\n", + "\t total heat load : Btu/hr \t71652.063136\n", + "\t water loading : lb/hr \t2047.20180389\n", + "\t interval 1 \t\n", + "\t C : Btu/(lb)*(F) \t0.286282435262\n", + "\t haV : Btu/(hr)*(F) \t27.2526231819\n", + "\t qc : Btu/hr \t4905.47217274\n", + "\t delT : F \t11.4233860657\n", + "\t T(0.05) : F \t288.576613934\n", + "\t delt : F \t2.39618398314\n", + "\t t(0.05) : F \t117.603816017\n", + "\t interval 2 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc1 : Btu/hr \t9318.91447199\n", + "\t delT1 : F \t21.7009808594\n", + "\t T(0.15) : F \t266.875633075\n", + "\t water diffused during interval : lb/hr \t1.20784906429\n", + "\t water remaining : lb/hr \t119.733601809\n", + "\t qd : Btu/hr \t1240.46098903\n", + "\t q1 : Btu/hr \t10559.375461\n", + "\t delt1 : F \t5.15795533248\n", + "\t t(0.15) : F \t112.445860684\n", + "\t X(112.5F) : lb/lb \t0.079822401206\n", + "\t interval 3 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc2 : Btu/hr \t8417.23279004\n", + "\t delT2 : F \t19.6012323339\n", + "\t T(0.25) : F \t247.274400741\n", + "\t water diffused during interval : lb/hr \t3.23916482908\n", + "\t water remaining : lb/hr \t116.49443698\n", + "\t qd1 : Btu/hr \t3336.33977395\n", + "\t q2 : Btu/hr \t11753.572564\n", + "\t delt2 : F \t5.7412867367\n", + "\t t(0.25) : F \t106.704573948\n", + "\t X(106.5F) : lb/lb \t0.0776629579866\n", + "\t calculated diffusion : \t18.1244724962\n", + "\t Using some standard low-pressure-drop data \t\n", + "\t tower height : ft \t2.16762543941\n", + "\t cross section : ft^2 \t33.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# basis 1ft^2 ground area\n", + "#Assumption: 20 per cent of the initial vapor content of the gas enters the water body\n", + "X1=(1.69/(14.7-1.69))*(18./29.);\n", + "print\"\\t X1 : lb/lb \\t\",X1\n", + "G=1500.;\n", + "w1=G*X1;\n", + "print\"\\t total water in inlet gas : lb/hr \\t\",w1\n", + "# The inlet gas is at 300F and a 120F dew point. Use 0.25 Btu/(lb)(DegF) for the specific heat of nitrogen\n", + "H1=(0.0807*120)+(0.0807*1025.8)+(0.45*0.0807*(300-120))+(0.25*300); # eq 17.55\n", + "print\"\\t H1 : Btu/lb dry air \\t\",H1\n", + "X2=(w1*(1-.2)/G);\n", + "print\"\\t outlet gas humidity : lb/lb \\t\",X2\n", + "pw=(X2*29*14.7/18)/(1+(X2*29/18));\n", + "print\"\\t pw : psia \\t\",pw\n", + "Tw=112.9; # F, from table 7 for above pw\n", + "# The outlet gas has a temperature of 200DegF and a 112.9DegF dew point\n", + "H2=(X2*Tw)+(X2*1029.8)+(X2*0.45*(200-Tw))+(0.25*200); # eq 17.55\n", + "print\"\\t H2 : Btu/lb dry air \\t\",H2\n", + "q=G*(H1-H2);\n", + "print\"\\t total heat load : Btu/hr \\t\",q\n", + "w2=q/(120-85);\n", + "print\"\\t water loading : lb/hr \\t\",w2\n", + "print\"\\t interval 1 \\t\"\n", + "# (Kxa*delV/L)= 0 t0 0.05\n", + "nd=0.05; # nd=Kxa*V/L\n", + "Le=0.93; # fig 17.4 at 300F\n", + "C=(0.25)+(0.45*X1);\n", + "print\"\\t C : Btu/(lb)*(F) \\t\",C\n", + "haV=(nd*w2*Le*C);\n", + "print\"\\t haV : Btu/(hr)*(F) \\t\",haV\n", + "qc=(haV*(300-120));\n", + "print\"\\t qc : Btu/hr \\t\",qc\n", + "delT=(qc/(C*G));\n", + "print\"\\t delT : F \\t\",delT\n", + "T1=(300-delT);\n", + "print\"\\t T(0.05) : F \\t\",T1\n", + "delt=(qc/w2);\n", + "print\"\\t delt : F \\t\",delt\n", + "t1=(120-delt);\n", + "print\"\\t t(0.05) : F \\t\",t1\n", + "print\"\\t interval 2 \\t\"\n", + "# (Kxa*delV/L)= 0.05 to 0.15\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc1=(haV1*(T1-t1));\n", + "print\"\\t qc1 : Btu/hr \\t\",qc1\n", + "delT1=(qc1/(C*G));\n", + "print\"\\t delT1 : F \\t\",delT1\n", + "T2=(T1-delT1);\n", + "print\"\\t T(0.15) : F \\t\",T2\n", + "X3=0.0748; # at 117.6F\n", + "w3=(nd1*w2*(0.0807-X3));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w3\n", + "w4=(w1-w3);\n", + "print\"\\t water remaining : lb/hr \\t\",w4\n", + "l1=1027; # Btu/lb, l1= lamda at 117.6F\n", + "qd=(w3*l1);\n", + "print\"\\t qd : Btu/hr \\t\",qd\n", + "q1=(qd+qc1);\n", + "print\"\\t q1 : Btu/hr \\t\",q1\n", + "delt1=(q1/w2);\n", + "print\"\\t delt1 : F \\t\",delt1\n", + "t2=(t1-delt1);\n", + "print\"\\t t(0.15) : F \\t\",t2\n", + "X4=0.0640; # at 112.5\n", + "X5=(w4/G);\n", + "print\"\\t X(112.5F) : lb/lb \\t\",X5\n", + "print\"\\t interval 3 \\t\"\n", + "# (Kxa*delV/L)= 0.15 to 0.25\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc2=(haV1*(T2-t2));\n", + "print\"\\t qc2 : Btu/hr \\t\",qc2\n", + "delT2=(qc2/(C*G));\n", + "print\"\\t delT2 : F \\t\",delT2\n", + "T3=(T2-delT2);\n", + "print\"\\t T(0.25) : F \\t\",T3\n", + "w5=(nd1*w2*(X5-X4));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w5\n", + "w6=(w4-w5);\n", + "print\"\\t water remaining : lb/hr \\t\",w6\n", + "l2=1030; # Btu/lb, l1= lamda at 112.5F\n", + "qd1=(w5*l2);\n", + "print\"\\t qd1 : Btu/hr \\t\",qd1\n", + "q2=(qd1+qc2);\n", + "print\"\\t q2 : Btu/hr \\t\",q2\n", + "delt2=(q2/w2);\n", + "print\"\\t delt2 : F \\t\",delt2\n", + "t3=(t2-delt2);\n", + "print\"\\t t(0.25) : F \\t\",t3\n", + "X6=0.0533; # at 106.5\n", + "X7=(w6/G);\n", + "print\"\\t X(106.5F) : lb/lb \\t\",X7\n", + "# The calculations of the remaining intervals until a. gas temperature of 200DegF is reached are shown in Fig. 17.17\n", + "w7=21.92; # total water diffused from table in solution\n", + "d=(w7/w1)*100;\n", + "print\"\\t calculated diffusion : \\t\",d\n", + "print\"\\t Using some standard low-pressure-drop data \\t\"\n", + "# For G = 1500, extrapolate to L = 2040 on logarithmic coordinates. Kxa = 510.\n", + "ndt=.54; # from 1st table in solution\n", + "Kxa=510; # from 2nd table in solution\n", + "Z=(ndt*w2/Kxa);\n", + "print\"\\t tower height : ft \\t\",Z\n", + "A=(50000/G);\n", + "print\"\\t cross section : ft^2 \\t\",round(A,1)\n", + "# end\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7 pgno:620" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t sensible heat : Btu/hr \t4200000.0\n", + "\t approximate diffusion : Btu/hr \t756166.666667\n", + "\t total heat : Btu/hr \t4956166.66667\n", + "\t total water quantity : lb/hr \t141604.761905\n", + "\t tower cross section : ft**2 \t69.4140989729\n", + "\t new gas rate : lb/(hr)(ft**2) \t720.314759391\n", + "\t LMTD : \t241.213395056\n", + "\t haV/L : \t0.145099736239\n", + "\t number diffusion units : \t0.557218649152\n", + "\t height of tower : ft \t5.28709788033\n", + " ground dimensions : ft \t1.0\n" + ] + } + ], + "source": [ + "print\"\\t example 17.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "C=0.28; # assumption\n", + "w=50000.; # lb/hr\n", + "G=1500.;\n", + "Qs=(w*C*(500-200));\n", + "Qd=(w/G)*(22685); # qd=22685, from previous prblm\n", + "from math import log\n", + "print\"\\t sensible heat : Btu/hr \\t\",Qs\n", + "print\"\\t approximate diffusion : Btu/hr \\t\",Qd\n", + "Q=(Qs+Qd);\n", + "print\"\\t total heat : Btu/hr \\t\",Q\n", + "# an allowance as high as 30 per cent of the sensible load can be made and the excess water compensated for by throttling when the tower is in operation\n", + "w1=(Q/(120-85));\n", + "print\"\\t total water quantity : lb/hr \\t\",w1\n", + "# If the maximum liquid loading is taken as 2040 lb/(hr)(ft'!), the required tower cross section\n", + "A=(w1/2040);\n", + "print\"\\t tower cross section : ft**2 \\t\",A\n", + "w3=(w/A);\n", + "print\"\\t new gas rate : lb/(hr)(ft**2) \\t\",w3\n", + "# The two terminal temperature differences are (200 - 85) and (500 - 120).\n", + "LMTD=((500-120)-(200-85))/(log((500-120)/(200-85)));\n", + "print\"\\t LMTD : \\t\",LMTD\n", + "dt=35;\n", + "N=(dt/LMTD); # eq 17.88\n", + "print\"\\t haV/L : \\t\",N\n", + "Le=0.93;\n", + "nd=(N/(C*Le));\n", + "print\"\\t number diffusion units : \\t\",nd\n", + "# By extrapolation for G = 718 and L = 2040,Kxa=215\n", + "L=2040;\n", + "Kxa=215;\n", + "Z=(nd*L/Kxa); # calculation mistake\n", + "print\"\\t height of tower : ft \\t\",Z\n", + "di=(A)**(1/2);\n", + "print\" ground dimensions : ft \\t\",di\n", + "# ground dimensions are 5.8*8.3*8.3 ft\n", + "# end\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/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 new file mode 100644 index 00000000..45f8b0e5 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_2.ipynb @@ -0,0 +1,856 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Direct Contact Transfer : Cooling Tower" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 71.1 pgno:585" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.1 \n", + "\n", + "\t humidity is : lb water/lb air 0.0186996126364\n", + "\t enthalpy at 75F is : Btu/lb dry air 39.1\n" + ] + } + ], + "source": [ + "print\"\\t example 17.1 \\n\"\n", + "pw=0.4298; # psia, at 75F, table 7\n", + "pt=14.696; # psia\n", + "t=75.;\n", + "Mw=18.;\n", + "Ma=29.;\n", + "X=(pw/(pt-pw))*(Mw/Ma);\n", + "print\"\\t humidity is : lb water/lb air \",X\n", + "H=(X*t)+(1051.5*X)+(0.24*t); # eq 17.54\n", + "print\"\\t enthalpy at 75F is : Btu/lb dry air \",round(H,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Pgno:602" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t by numerical integration \t\n", + "\t R is : \t0.93005952381\n", + "\t H2 is : Btu \t71.6520833333\n", + "\t difference is : \t10.9\n", + "\t difference is : \t13.0\n", + "\t average of difference is : \t11.95\n", + "\t nd1 is : \t0.418410041841\n", + "\t number of diffusing units : \t1.7\n", + "\t log mean enthalpy difference \t\n", + "\t log mean of enthalpy : Btu/lb \t25.6654878432\n", + "\t number of diffusing units are : \t1.36\n" + ] + } + ], + "source": [ + "print\"\\t example 17.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t by numerical integration \\t\"\n", + "T1=85.;\n", + "T2=120.;\n", + "A=576.; # ground area, from fig 17.12\n", + "L=1500.*(500./576.);\n", + "G=1400.;\n", + "R=(L/G);\n", + "from math import log10\n", + "print\"\\t R is : \\t\",R\n", + "H1=39.1; # fig 17.12\n", + "H2=H1+(R*(T2-T1));\n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # fig 17.12\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=43.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=5; # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.70;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "print\"\\t log mean enthalpy difference \\t\"\n", + "dt=49.9; # diff. of enthalpies at top of the tower, from table in solution\n", + "db=10.9; # diff of enthalpies at bottom of the tower,from table in solution\n", + "LME=(dt-db)/(2.3*log10(dt/db));\n", + "print\"\\t log mean of enthalpy : Btu/lb \\t\",LME\n", + "nd=(T2-T1)/(LME);\n", + "print\"\\t number of diffusing units are : \\t\",round(nd,2)\n", + "# The error is naturally larger the greater the range\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 pgno:604" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Z is : ft \t19.2469565217\n", + "\t height of diffusion unit : ft \t11.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# Since the loading is based on 1 ft2 of ground area\n", + "nd=1.7;\n", + "L=1302;\n", + "Kxa=115;\n", + "Z=(nd*L)/(Kxa);\n", + "print\"\\t Z is : ft \\t\",Z\n", + "HDU=(Z/nd);\n", + "print\"\\t height of diffusion unit : ft \\t\",round(HDU,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 pgno:605" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t difference is : \t13.0\n", + "\t difference is : \t14.3\n", + "\t average of difference is : \t13.65\n", + "\t nd1 is : \t0.417582417582\n", + "\t number of diffusing units : \t1.72\n" + ] + } + ], + "source": [ + "print\"\\t example 17.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=79.3F\n", + "Hs=43.4; # fig 17.12\n", + "H=30.4; # fig 17.12\n", + "d1=(Hs-H);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=35.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-79.3); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.72;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5 pgno:609" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for 120percent of design \t\n", + "\t R is : %.3f \t1.116\n", + "\t H2 is : %.1f Btu \t78.16\n", + "\t difference is : %.1f \t14.0\n", + "\t difference is : %.1f \t14.7\n", + "\t average of difference is : %.1f \t14.35\n", + "\t nd1 is : %.3f \t0.19512195122\n", + "\t number of diffusing units : %.2f \t1.53\n", + "\t for 80 percent of design \t\n", + "\t R is : %.3f \t0.744\n", + "\t H2 is : Btu \t65.14\n", + "\t difference is : \t8.1\n", + "\t difference is : \t9.2\n", + "\t average of difference is : \t8.65\n", + "\t nd1 is : \t0.28901734104\n", + "\t number of diffusing units : \t1.92\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYXVV9//H3pwHEULk1SC2gqYjIrYBIVC4yBYSAF7wD\n", + "XpDG8osWLFaoVJ4qsWrRKogCLXgJxQIBFREQ5GYZDXciIQQhCJLUIBi5CxIggc/vj7UDY5jJnEnm\n", + "zDpn5vN6nnlyzt77nPPJfpL5nrX2XmvJNhEREX9WO0BERHSGFISIiABSECIiopGCEBERQApCREQ0\n", + "UhAiIgJIQYiIiEYKQkREACkI0aUkLZC0R5/nB0h6SNKuq/CeB0ia38/21ST9XtK+fbZ9WtIXJfVI\n", + "Wriyn7kSGQ+WNHMF+9eQdL+k8c3zN0u6UtIfJD0gabakT0l60Uhlju6RghDdys0Pkj4MnATsa3vA\n", + "X5YtOA9YV9Juy22fDDwDXNJn277ARavwWe3yJmC27SckvRf4PnAG8HLbE4D9gY2BTSpmjA6VghDd\n", + "TJKmAl8F9rJ9XbNxf0l3S3pJ83wfSfdJ+ovm+dcl/UbSo5JmSdoFwPZTwPeAg5b7nIOAs2w/27x+\n", + "PeDVwLVDCLq/pBuX2/ZPks5vHu8r6ZfNN/l7JB0x9NMBlEJ1cfP4eOBztr9j+xEA27+y/Y+271rJ\n", + "949RLAUhutk/AJ8Ddrd907KNts8BrgG+0RSBbwMfsf1gc8gNwLbAesBZwPclrdHsOx14j6Q1ASSt\n", + "A7y12b7M3sAVHtpEYBcAm0t6VZ9t7wfObB5/B/h/ttcGtgL+dwjv3dc+wEWSXgNsBJy7ku8TY1AK\n", + "QnQrAXtSvqXf2s/+Q4HdgSuBC2wv+9aM7TNtP2z7WdvHAy8CNm/2XQMsAt7ZHP4+4A7bt/R577fw\n", + "/LfwltheDJwPHAggabPmMy9oDnka2ErS2rYftT17KO/fvOemwGq27wQmNJt/12f/2Z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", + "fAX4hM2ZleNEjLhMbhfRh8S2lC6kS4EjbJ6qHClixGRyu4g+bOYAOwIbAT+XeHnlSBHVpSDEmGXz\n", + "CPAuSkvhBom9KkeKqCpdRhGARA9wFnAK8IUsvBOj2ZCvIQw0KV3Dtv9muMKtrBSEGE4SLwPOoczB\n", + "9SGbBytHimiLgX53rmhg2tuaP/+h+fN/KPMLfWCYs0V0BJv7miU6/x34hcR7bW6snStipAzaZSTp\n", + "ZtvbLbdtdjO1RFVpIUS7SLwb+C/KzKnfzOjmGE1W5S4jSdqlz5OdyUykMcrZnAvsQplO+3SJ8ZUj\n", + "RbRdKy2EHYDpwLrNpoeBKbZvanO2QaWFEO0msRblQvO2wLtt7qwcKWKVrfTANElrAu8GJgITgEco\n", + "F5X/rQ05hyQFIUZCs/DOVODfgI/a/LBypIhVsjIXlZc5n1IEfgHcM9zBIjpdc/3gFIlfAN+X2An4\n", + "tM2SytEihlUrLYRbbW89QnmGJC2EGGkSfwGcAawF7G9zX+VIEUO2KheVr5FUfcxBRCdoxia8BbiC\n", + "svDObpUjRQybVloItwOvAubDcxOAZWBajHkSewOnA8cBX82tqdEtVuWi8sT+ttteMBzBVkUKQtTW\n", + "TIr3feBe4GCbRytHihhUpr+OaBOJFwHHA3tRbk29pXKkiBWqsWLadEmLBpoTSdKRkmY3P3MlLZW0\n", + "brNvsqR5ku6UdFS7MkYMB5unbA4FpgE/lTiocqSIldK2FoKkXSmThH13oDWV+xz7VuATtveUNA64\n", + "A9gT+C1wI3Cg7dv7eV1aCNFRJLYGzgV6gcNtnqybKOKFRryFYHsmZVRzK94PzGgeTwLusr3A9hLg\n", + "bGC/NkSMGHY2t1IW3lkfuEpiYt1EEa2rvkCOpPHA3pRvVVBWsFrY55B7mm0RXcHmD8D7KOMVrpfY\n", + "t3KkiJZULwiUabavsv1I87x7r3JHNGxscwJl2pdvSpwosU7tXBEr0srUFe12AM93F0G5brBJn+eb\n", + "sIIpMyRN6/O013bvcIaLWBU2V0lsC3wJuE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vAyfYLKkcLYZZc722Z9Dj2jkOQdJE4MIB\n", + "riEcBbzY9rTm+beBS2z/YLnjjgEet31cP++RawgRw0BiM+Ak4K8o6y5cVTlStFEnjkM4H9hF0jhJ\n", + "44HXA7dJGi/pJQCS1gL2giwKEtFONncCk4HPA2dLTJfYoHKsGGFtKwiSZgDXAJtLWihpiqSpkqYC\n", + "2J4HXALcAlwPfMv2bcBfAjMl3dxs/7Hty9qVMyKKZuzC9yhjFx4FfilxSJbvHDsydUVE9EtiO8rY\n", + "BVO6keZUjhTDpBO7jCKig9ncDOwM/DdwucTxEi+pmyraKQUhIgZk86zNN4GtgfUpU2C8J1NgjE7p\n", + "MoqIlkm8idKN9BvgMJtfV44UKyFdRhGxymx+Tlm+80rgeonPZvnO0SMFISKGxGaJzX9Qlu98LWVB\n", + "nj0rx4phkC6jiFglEm+jLN95HWX5znsrR4pBpMsoItrC5kJgK2A+cIvEPzYzq0aXSQshIoaNxBaU\n", + "5TvXoSzfeUPlSNGPtBAiou1sbgd2pyx8db7EKRLrVY4VLUpBiIhh1UyB8T+UKTBMGbtwUMYudL50\n", + "GUVEW0lMooxdeIyyfOdtlSONeekyiogqmusIk4BzgZ9JHCsxvnKs6EcKQkS0nc0zNicCfwO8Arit\n", + "uV01Oki6jCJixDUD2U4G5gH/aPN/lSONKekyioiOYXMFpbUwC/iFxFESa1SONealhRARVUlsSlm+\n", + "8+WUi84/qxxp1BvxFoKk6ZIWSRpw+UtJPZJmS7pVUm+f7ZMlzZN0Z7P2ckSMUs2MqfsCnwXOkDhd\n", + "4qWVY41J7ewyOo2yRmu/JK1L6UN8m+2tgfc028dRvi1MptzHfKCkLdqYMyIqa8YunEv5P/8AcKvE\n", + "1CzfObLadrJtzwQeXsEh7wfOtX1Pc/wDzfZJwF22F9heApwN7NeunBHROWweszkCeDPwYeAaie0r\n", + "xxozalbfzYD1JV0paZakDzXbNwIW9jnunmZbRIwRzfrNuwDfBi6ROEFi7cqxRr2aMxKuTplLfQ9g\n", +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7\n", + "TI7gje6TFkLEMJI0Dtjc9jxgK+CmypEiWpaCEDG8Xg9c1zw2fSY0a5blnCtprK7ZER0uBSFieO0D\n", + "XNI8/iXw2mU7bL8TOBhYf+RjRQwuBSFieO0OXNE8PgvYWdLb+uxfa+QjRbSmo6e/juhw45vpjpc5\n", + "EXjS9h8BbD8p6a3A8ZJOABYBjwGfH/moEYPLXUYRw0TSB4CNbP9H7SwRKyMFISIigFxDiIiIRgpC\n", + "REQAKQgREdFIQYiICCAFISIiGikIEREBpCBERETj/wPQ8mh2PbtLiwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t trial 1 \t\n", + "\t R is : \t1.1\n", + "\t H2 is : Btu \t73.0\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.7\n", + "\t average of difference is : \t16.1\n", + "\t nd1 is : \t0.310559006211\n", + "\t number of diffusing units : \t1.48\n", + "\t L/G is : \t1.19\n", + "\t trial 2 \t\n", + "\t R4 is : \t1.2\n", + "\t H2 is : Btu \t76.5\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.2\n", + "\t average of difference is : \t15.85\n", + "\t nd1 is : \t0.315457413249\n", + "\t number of diffusing units : \t1.56\n", + "\t L/G is : \t1.08\n" + ] + } + ], + "source": [ + "print\"\\t example 17.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=85;\n", + "T2=120;\n", + "R=0.93; # R=(L/G), for 1500 gpm\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "print\"\\t for 120percent of design \\t\"\n", + "R1=1.2*R;\n", + "print\"\\t R is : %.3f \\t\",R1\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R1*(T2-T1)); \n", + "print\"\\t H2 is : %.1f Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=87.2F\n", + "Hs=53.1; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : %.1f \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=42; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : %.1f \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : %.1f \\t\",d\n", + "dT=(90-87.2); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : %.3f \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.53;\n", + "print\"\\t number of diffusing units : %.2f \\t\",nd\n", + "print\"\\t for 80 percent of design \\t\"\n", + "R2=0.8*R;\n", + "print\"\\t R is : %.3f \\t\",R2\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R2*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=82.5F\n", + "Hs=47.2; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=40.8; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-82.5); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.92;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "X=[1.115, 0.93, 0.74];\n", + "Y=[1.53, 1.70, 1.92];\n", + "pyplot.plot(X,Y)\n", + "pyplot.xlabel('L/G')\n", + "pyplot.ylabel('nd')\n", + "pyplot.title('KxaV/L vs L/G')\n", + "pyplot.show()\n", + "print\"\\t trial 1 \\t\"\n", + "R3=1.1;\n", + "print\"\\t R is : \\t\",R3\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R3*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.48;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.19; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "print\"\\t trial 2 \\t\"\n", + "R4=1.2;\n", + "print\"\\t R4 is : \\t\",R4\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R4*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40.5; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.56;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.08; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 pgno:615" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t X1 : lb/lb \t0.0806276339156\n", + "\t total water in inlet gas : lb/hr \t120.941450873\n", + "\t H1 : Btu/lb dry air \t174.00276\n", + "\t outlet gas humidity : lb/lb \t0.0645021071324\n", + "\t pw : psia \t1.38381840969\n", + "\t H2 : Btu/lb dry air \t126.234717909\n", + "\t total heat load : Btu/hr \t71652.063136\n", + "\t water loading : lb/hr \t2047.20180389\n", + "\t interval 1 \t\n", + "\t C : Btu/(lb)*(F) \t0.286282435262\n", + "\t haV : Btu/(hr)*(F) \t27.2526231819\n", + "\t qc : Btu/hr \t4905.47217274\n", + "\t delT : F \t11.4233860657\n", + "\t T(0.05) : F \t288.576613934\n", + "\t delt : F \t2.39618398314\n", + "\t t(0.05) : F \t117.603816017\n", + "\t interval 2 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc1 : Btu/hr \t9318.91447199\n", + "\t delT1 : F \t21.7009808594\n", + "\t T(0.15) : F \t266.875633075\n", + "\t water diffused during interval : lb/hr \t1.20784906429\n", + "\t water remaining : lb/hr \t119.733601809\n", + "\t qd : Btu/hr \t1240.46098903\n", + "\t q1 : Btu/hr \t10559.375461\n", + "\t delt1 : F \t5.15795533248\n", + "\t t(0.15) : F \t112.445860684\n", + "\t X(112.5F) : lb/lb \t0.079822401206\n", + "\t interval 3 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc2 : Btu/hr \t8417.23279004\n", + "\t delT2 : F \t19.6012323339\n", + "\t T(0.25) : F \t247.274400741\n", + "\t water diffused during interval : lb/hr \t3.23916482908\n", + "\t water remaining : lb/hr \t116.49443698\n", + "\t qd1 : Btu/hr \t3336.33977395\n", + "\t q2 : Btu/hr \t11753.572564\n", + "\t delt2 : F \t5.7412867367\n", + "\t t(0.25) : F \t106.704573948\n", + "\t X(106.5F) : lb/lb \t0.0776629579866\n", + "\t calculated diffusion : \t18.1244724962\n", + "\t Using some standard low-pressure-drop data \t\n", + "\t tower height : ft \t2.16762543941\n", + "\t cross section : ft^2 \t33.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# basis 1ft^2 ground area\n", + "#Assumption: 20 per cent of the initial vapor content of the gas enters the water body\n", + "X1=(1.69/(14.7-1.69))*(18./29.);\n", + "print\"\\t X1 : lb/lb \\t\",X1\n", + "G=1500.;\n", + "w1=G*X1;\n", + "print\"\\t total water in inlet gas : lb/hr \\t\",w1\n", + "# The inlet gas is at 300F and a 120F dew point. Use 0.25 Btu/(lb)(DegF) for the specific heat of nitrogen\n", + "H1=(0.0807*120)+(0.0807*1025.8)+(0.45*0.0807*(300-120))+(0.25*300); # eq 17.55\n", + "print\"\\t H1 : Btu/lb dry air \\t\",H1\n", + "X2=(w1*(1-.2)/G);\n", + "print\"\\t outlet gas humidity : lb/lb \\t\",X2\n", + "pw=(X2*29*14.7/18)/(1+(X2*29/18));\n", + "print\"\\t pw : psia \\t\",pw\n", + "Tw=112.9; # F, from table 7 for above pw\n", + "# The outlet gas has a temperature of 200DegF and a 112.9DegF dew point\n", + "H2=(X2*Tw)+(X2*1029.8)+(X2*0.45*(200-Tw))+(0.25*200); # eq 17.55\n", + "print\"\\t H2 : Btu/lb dry air \\t\",H2\n", + "q=G*(H1-H2);\n", + "print\"\\t total heat load : Btu/hr \\t\",q\n", + "w2=q/(120-85);\n", + "print\"\\t water loading : lb/hr \\t\",w2\n", + "print\"\\t interval 1 \\t\"\n", + "# (Kxa*delV/L)= 0 t0 0.05\n", + "nd=0.05; # nd=Kxa*V/L\n", + "Le=0.93; # fig 17.4 at 300F\n", + "C=(0.25)+(0.45*X1);\n", + "print\"\\t C : Btu/(lb)*(F) \\t\",C\n", + "haV=(nd*w2*Le*C);\n", + "print\"\\t haV : Btu/(hr)*(F) \\t\",haV\n", + "qc=(haV*(300-120));\n", + "print\"\\t qc : Btu/hr \\t\",qc\n", + "delT=(qc/(C*G));\n", + "print\"\\t delT : F \\t\",delT\n", + "T1=(300-delT);\n", + "print\"\\t T(0.05) : F \\t\",T1\n", + "delt=(qc/w2);\n", + "print\"\\t delt : F \\t\",delt\n", + "t1=(120-delt);\n", + "print\"\\t t(0.05) : F \\t\",t1\n", + "print\"\\t interval 2 \\t\"\n", + "# (Kxa*delV/L)= 0.05 to 0.15\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc1=(haV1*(T1-t1));\n", + "print\"\\t qc1 : Btu/hr \\t\",qc1\n", + "delT1=(qc1/(C*G));\n", + "print\"\\t delT1 : F \\t\",delT1\n", + "T2=(T1-delT1);\n", + "print\"\\t T(0.15) : F \\t\",T2\n", + "X3=0.0748; # at 117.6F\n", + "w3=(nd1*w2*(0.0807-X3));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w3\n", + "w4=(w1-w3);\n", + "print\"\\t water remaining : lb/hr \\t\",w4\n", + "l1=1027; # Btu/lb, l1= lamda at 117.6F\n", + "qd=(w3*l1);\n", + "print\"\\t qd : Btu/hr \\t\",qd\n", + "q1=(qd+qc1);\n", + "print\"\\t q1 : Btu/hr \\t\",q1\n", + "delt1=(q1/w2);\n", + "print\"\\t delt1 : F \\t\",delt1\n", + "t2=(t1-delt1);\n", + "print\"\\t t(0.15) : F \\t\",t2\n", + "X4=0.0640; # at 112.5\n", + "X5=(w4/G);\n", + "print\"\\t X(112.5F) : lb/lb \\t\",X5\n", + "print\"\\t interval 3 \\t\"\n", + "# (Kxa*delV/L)= 0.15 to 0.25\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc2=(haV1*(T2-t2));\n", + "print\"\\t qc2 : Btu/hr \\t\",qc2\n", + "delT2=(qc2/(C*G));\n", + "print\"\\t delT2 : F \\t\",delT2\n", + "T3=(T2-delT2);\n", + "print\"\\t T(0.25) : F \\t\",T3\n", + "w5=(nd1*w2*(X5-X4));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w5\n", + "w6=(w4-w5);\n", + "print\"\\t water remaining : lb/hr \\t\",w6\n", + "l2=1030; # Btu/lb, l1= lamda at 112.5F\n", + "qd1=(w5*l2);\n", + "print\"\\t qd1 : Btu/hr \\t\",qd1\n", + "q2=(qd1+qc2);\n", + "print\"\\t q2 : Btu/hr \\t\",q2\n", + "delt2=(q2/w2);\n", + "print\"\\t delt2 : F \\t\",delt2\n", + "t3=(t2-delt2);\n", + "print\"\\t t(0.25) : F \\t\",t3\n", + "X6=0.0533; # at 106.5\n", + "X7=(w6/G);\n", + "print\"\\t X(106.5F) : lb/lb \\t\",X7\n", + "# The calculations of the remaining intervals until a. gas temperature of 200DegF is reached are shown in Fig. 17.17\n", + "w7=21.92; # total water diffused from table in solution\n", + "d=(w7/w1)*100;\n", + "print\"\\t calculated diffusion : \\t\",d\n", + "print\"\\t Using some standard low-pressure-drop data \\t\"\n", + "# For G = 1500, extrapolate to L = 2040 on logarithmic coordinates. Kxa = 510.\n", + "ndt=.54; # from 1st table in solution\n", + "Kxa=510; # from 2nd table in solution\n", + "Z=(ndt*w2/Kxa);\n", + "print\"\\t tower height : ft \\t\",Z\n", + "A=(50000/G);\n", + "print\"\\t cross section : ft^2 \\t\",round(A,1)\n", + "# end\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7 pgno:620" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t sensible heat : Btu/hr \t4200000.0\n", + "\t approximate diffusion : Btu/hr \t756166.666667\n", + "\t total heat : Btu/hr \t4956166.66667\n", + "\t total water quantity : lb/hr \t141604.761905\n", + "\t tower cross section : ft**2 \t69.4140989729\n", + "\t new gas rate : lb/(hr)(ft**2) \t720.314759391\n", + "\t LMTD : \t241.213395056\n", + "\t haV/L : \t0.145099736239\n", + "\t number diffusion units : \t0.557218649152\n", + "\t height of tower : ft \t5.28709788033\n", + " ground dimensions : ft \t1.0\n" + ] + } + ], + "source": [ + "print\"\\t example 17.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "C=0.28; # assumption\n", + "w=50000.; # lb/hr\n", + "G=1500.;\n", + "Qs=(w*C*(500-200));\n", + "Qd=(w/G)*(22685); # qd=22685, from previous prblm\n", + "from math import log\n", + "print\"\\t sensible heat : Btu/hr \\t\",Qs\n", + "print\"\\t approximate diffusion : Btu/hr \\t\",Qd\n", + "Q=(Qs+Qd);\n", + "print\"\\t total heat : Btu/hr \\t\",Q\n", + "# an allowance as high as 30 per cent of the sensible load can be made and the excess water compensated for by throttling when the tower is in operation\n", + "w1=(Q/(120-85));\n", + "print\"\\t total water quantity : lb/hr \\t\",w1\n", + "# If the maximum liquid loading is taken as 2040 lb/(hr)(ft'!), the required tower cross section\n", + "A=(w1/2040);\n", + "print\"\\t tower cross section : ft**2 \\t\",A\n", + "w3=(w/A);\n", + "print\"\\t new gas rate : lb/(hr)(ft**2) \\t\",w3\n", + "# The two terminal temperature differences are (200 - 85) and (500 - 120).\n", + "LMTD=((500-120)-(200-85))/(log((500-120)/(200-85)));\n", + "print\"\\t LMTD : \\t\",LMTD\n", + "dt=35;\n", + "N=(dt/LMTD); # eq 17.88\n", + "print\"\\t haV/L : \\t\",N\n", + "Le=0.93;\n", + "nd=(N/(C*Le));\n", + "print\"\\t number diffusion units : \\t\",nd\n", + "# By extrapolation for G = 718 and L = 2040,Kxa=215\n", + "L=2040;\n", + "Kxa=215;\n", + "Z=(nd*L/Kxa); # calculation mistake\n", + "print\"\\t height of tower : ft \\t\",Z\n", + "di=(A)**(1/2);\n", + "print\" ground dimensions : ft \\t\",di\n", + "# ground dimensions are 5.8*8.3*8.3 ft\n", + "# end\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/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 new file mode 100644 index 00000000..45f8b0e5 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_3.ipynb @@ -0,0 +1,856 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Direct Contact Transfer : Cooling Tower" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 71.1 pgno:585" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.1 \n", + "\n", + "\t humidity is : lb water/lb air 0.0186996126364\n", + "\t enthalpy at 75F is : Btu/lb dry air 39.1\n" + ] + } + ], + "source": [ + "print\"\\t example 17.1 \\n\"\n", + "pw=0.4298; # psia, at 75F, table 7\n", + "pt=14.696; # psia\n", + "t=75.;\n", + "Mw=18.;\n", + "Ma=29.;\n", + "X=(pw/(pt-pw))*(Mw/Ma);\n", + "print\"\\t humidity is : lb water/lb air \",X\n", + "H=(X*t)+(1051.5*X)+(0.24*t); # eq 17.54\n", + "print\"\\t enthalpy at 75F is : Btu/lb dry air \",round(H,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Pgno:602" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t by numerical integration \t\n", + "\t R is : \t0.93005952381\n", + "\t H2 is : Btu \t71.6520833333\n", + "\t difference is : \t10.9\n", + "\t difference is : \t13.0\n", + "\t average of difference is : \t11.95\n", + "\t nd1 is : \t0.418410041841\n", + "\t number of diffusing units : \t1.7\n", + "\t log mean enthalpy difference \t\n", + "\t log mean of enthalpy : Btu/lb \t25.6654878432\n", + "\t number of diffusing units are : \t1.36\n" + ] + } + ], + "source": [ + "print\"\\t example 17.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t by numerical integration \\t\"\n", + "T1=85.;\n", + "T2=120.;\n", + "A=576.; # ground area, from fig 17.12\n", + "L=1500.*(500./576.);\n", + "G=1400.;\n", + "R=(L/G);\n", + "from math import log10\n", + "print\"\\t R is : \\t\",R\n", + "H1=39.1; # fig 17.12\n", + "H2=H1+(R*(T2-T1));\n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # fig 17.12\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=43.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=5; # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.70;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "print\"\\t log mean enthalpy difference \\t\"\n", + "dt=49.9; # diff. of enthalpies at top of the tower, from table in solution\n", + "db=10.9; # diff of enthalpies at bottom of the tower,from table in solution\n", + "LME=(dt-db)/(2.3*log10(dt/db));\n", + "print\"\\t log mean of enthalpy : Btu/lb \\t\",LME\n", + "nd=(T2-T1)/(LME);\n", + "print\"\\t number of diffusing units are : \\t\",round(nd,2)\n", + "# The error is naturally larger the greater the range\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 pgno:604" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Z is : ft \t19.2469565217\n", + "\t height of diffusion unit : ft \t11.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# Since the loading is based on 1 ft2 of ground area\n", + "nd=1.7;\n", + "L=1302;\n", + "Kxa=115;\n", + "Z=(nd*L)/(Kxa);\n", + "print\"\\t Z is : ft \\t\",Z\n", + "HDU=(Z/nd);\n", + "print\"\\t height of diffusion unit : ft \\t\",round(HDU,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 pgno:605" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t difference is : \t13.0\n", + "\t difference is : \t14.3\n", + "\t average of difference is : \t13.65\n", + "\t nd1 is : \t0.417582417582\n", + "\t number of diffusing units : \t1.72\n" + ] + } + ], + "source": [ + "print\"\\t example 17.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=79.3F\n", + "Hs=43.4; # fig 17.12\n", + "H=30.4; # fig 17.12\n", + "d1=(Hs-H);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=35.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-79.3); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.72;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5 pgno:609" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for 120percent of design \t\n", + "\t R is : %.3f \t1.116\n", + "\t H2 is : %.1f Btu \t78.16\n", + "\t difference is : %.1f \t14.0\n", + "\t difference is : %.1f \t14.7\n", + "\t average of difference is : %.1f \t14.35\n", + "\t nd1 is : %.3f \t0.19512195122\n", + "\t number of diffusing units : %.2f \t1.53\n", + "\t for 80 percent of design \t\n", + "\t R is : %.3f \t0.744\n", + "\t H2 is : Btu \t65.14\n", + "\t difference is : \t8.1\n", + "\t difference is : \t9.2\n", + "\t average of difference is : \t8.65\n", + "\t nd1 is : \t0.28901734104\n", + "\t number of diffusing units : \t1.92\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYXVV9//H3pwHEULk1SC2gqYjIrYBIVC4yBYSAF7wD\n", + "XpDG8osWLFaoVJ4qsWrRKogCLXgJxQIBFREQ5GYZDXciIQQhCJLUIBi5CxIggc/v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", + "obgC2EDStsABTTYAbM+y/Q5gA+BHlGsZQ9W3INwB/JZSaCJakoIQXc32fZSiMFnS8QBN//8ZwKeB\n", + "KcBGkj7WvOQlwFLggeYWzc8Cay/3nguAq4AZwGW2f99n977Aj5fPIelFktZc9jNA1iWUu36+Srl+\n", + "cXnz2tUlfUDSOrafAR6j3NU0EC3/ec1tpjtSushoLoAfARwj6e8lradiM2DDFbx3jGGrteuNJU2n\n", + "9LX+3vY2/exfD5gOvBJ4Ephi+5fNvgXAHyj/KZbYntSunNH9bC+UtDvwc0lPAmtSvsWfCtD0l18p\n", + "6TJKV88lwK+APwJfA37Tz9ueTvn3+c/Lbd8XmNr34ykXbxf33SZpM9t39/O+ZwE/B05edtdS44PA\n", + "iZLGAfOADwz01wV2Wv7zgLcD19p++rmN9vckPUopjF8Dnmr+rqdSutMi/oTatWJa0zR/HPjuAAXh\n", + "K8AfbH9e0uaU/yB7NvvmAzvYfqgt4SJWgqQNgZtsb1Q7y/IknQzMtX1K7SzRvdrWZdQMEHp4BYds\n", + "wfPN2zuAiZI26LNf/b4qop61gU/WDjGAmykD6yJWWs1rCHOAdwFImgS8gjKCEkoT+Ipm0NAhlfJF\n", + "/AnbdzZjHDqO7W/ZXlQ7R3S3tl1DaMGXgK9Lmg3MBWbz/IW0XWzf27QYLpc0bxWnJIiIiEFUKwi2\n", + "H6PcAQI8d93g7mbfvc2f90s6D5gEvKAgSGrPBZCIiFHO9gu65asVhGZKgMW2n266hX5m+/Hm9rlx\n", + "th+TtBawF2V6gn7195eKPyVpmu1ptXN0g5yr1uQ8taZTz9NAX6bbedvpDGA3YEIzPfAxwOoAze2A\n", + "WwL/3QS7FfhI89INgfMkLct3pu3L2pUzIiKKthUE2wcOsv9amvljlts+H9iuXbkiIqJ/Gak8NvTW\n", + "DtBFemsH6BK9tQN0id7aAYaibQPTRoIk5xpCRMTQDPS7My2EiIgAUhAiIqKRghAREUAKQkRENFIQ\n", + "IiICSEGIiIhGCkJERAApCEMm/elyixERo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sydUVE9EtiO8rY\n", + "BVO6keZUjhTDpBO7jCKig9ncDOwM/DdwucTxEi+pmyraKQUhIgZk86zNN4GtgfUpU2C8J1NgjE7p\n", + "MoqIlkm8idKN9BvgMJtfV44UKyFdRhGxymx+Tlm+80rgeonPZvnO0SMFISKGxGaJzX9Qlu98LWVB\n", + "nj0rx4phkC6jiFglEm+jLN95HWX5znsrR4pBpMsoItrC5kJgK2A+cIvEPzYzq0aXSQshIoaNxBaU\n", + "5TvXoSzfeUPlSNGPtBAiou1sbgd2pyx8db7EKRLrVY4VLUpBiIhh1UyB8T+UKTBMGbtwUMYudL50\n", + "GUVEW0lMooxdeIyyfOdtlSONeekyiogqmusIk4BzgZ9JHCsxvnKs6EcKQkS0nc0zNicCfwO8Arit\n", + "uV01Oki6jCJixDUD2U4G5gH/aPN/lSONKekyioiOYXMFpbUwC/iFxFESa1SONealhRARVUlsSlm+\n", + "8+WUi84/qxxp1BvxFoKk6ZIWSRpw+UtJPZJmS7pVUm+f7ZMlzZN0Z7P2ckSMUs2MqfsCnwXOkDhd\n", + "4qWVY41J7ewyOo2yRmu/JK1L6UN8m+2tgfc028dRvi1MptzHfKCkLdqYMyIqa8YunEv5P/8AcKvE\n", + "1CzfObLadrJtzwQeXsEh7wfOtX1Pc/wDzfZJwF22F9heApwN7NeunBHROWweszkCeDPwYeAaie0r\n", + "xxozalbfzYD1JV0paZakDzXbNwIW9jnunmZbRIwRzfrNuwDfBi6ROEFi7cqxRr2aMxKuTplLfQ9g\n", + "PHCtpOsoQ91bJmlan6e9tnuHK2BE1GPzLPBtiR8BX6aMXTgC+J49tN8TY52kHqBnsONqFoSFwAO2\n", + "FwOLJf0c2JbSItikz3GbNNv6ZXtaO0NGRF02DwAfkdiFMgXGFInDbO6sHK1rNF+Ue5c9l3RMf8fV\n", + "7DI6H9hF0jhJ44HXA7dR7kveTNJESWsA+wMXVMwZER3A5ipKr8LlwLUS0yTWrBxrVGnnbaczgGuA\n", + "zSUtlDRF0lRJUwFsz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IQYiICCAFISIiGikIEREBpCBERETj/wPQ8mh2PbtLiwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t trial 1 \t\n", + "\t R is : \t1.1\n", + "\t H2 is : Btu \t73.0\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.7\n", + "\t average of difference is : \t16.1\n", + "\t nd1 is : \t0.310559006211\n", + "\t number of diffusing units : \t1.48\n", + "\t L/G is : \t1.19\n", + "\t trial 2 \t\n", + "\t R4 is : \t1.2\n", + "\t H2 is : Btu \t76.5\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.2\n", + "\t average of difference is : \t15.85\n", + "\t nd1 is : \t0.315457413249\n", + "\t number of diffusing units : \t1.56\n", + "\t L/G is : \t1.08\n" + ] + } + ], + "source": [ + "print\"\\t example 17.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=85;\n", + "T2=120;\n", + "R=0.93; # R=(L/G), for 1500 gpm\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "print\"\\t for 120percent of design \\t\"\n", + "R1=1.2*R;\n", + "print\"\\t R is : %.3f \\t\",R1\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R1*(T2-T1)); \n", + "print\"\\t H2 is : %.1f Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=87.2F\n", + "Hs=53.1; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : %.1f \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=42; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : %.1f \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : %.1f \\t\",d\n", + "dT=(90-87.2); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : %.3f \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.53;\n", + "print\"\\t number of diffusing units : %.2f \\t\",nd\n", + "print\"\\t for 80 percent of design \\t\"\n", + "R2=0.8*R;\n", + "print\"\\t R is : %.3f \\t\",R2\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R2*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=82.5F\n", + "Hs=47.2; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=40.8; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-82.5); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.92;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "X=[1.115, 0.93, 0.74];\n", + "Y=[1.53, 1.70, 1.92];\n", + "pyplot.plot(X,Y)\n", + "pyplot.xlabel('L/G')\n", + "pyplot.ylabel('nd')\n", + "pyplot.title('KxaV/L vs L/G')\n", + "pyplot.show()\n", + "print\"\\t trial 1 \\t\"\n", + "R3=1.1;\n", + "print\"\\t R is : \\t\",R3\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R3*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.48;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.19; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "print\"\\t trial 2 \\t\"\n", + "R4=1.2;\n", + "print\"\\t R4 is : \\t\",R4\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R4*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40.5; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.56;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.08; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 pgno:615" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t X1 : lb/lb \t0.0806276339156\n", + "\t total water in inlet gas : lb/hr \t120.941450873\n", + "\t H1 : Btu/lb dry air \t174.00276\n", + "\t outlet gas humidity : lb/lb \t0.0645021071324\n", + "\t pw : psia \t1.38381840969\n", + "\t H2 : Btu/lb dry air \t126.234717909\n", + "\t total heat load : Btu/hr \t71652.063136\n", + "\t water loading : lb/hr \t2047.20180389\n", + "\t interval 1 \t\n", + "\t C : Btu/(lb)*(F) \t0.286282435262\n", + "\t haV : Btu/(hr)*(F) \t27.2526231819\n", + "\t qc : Btu/hr \t4905.47217274\n", + "\t delT : F \t11.4233860657\n", + "\t T(0.05) : F \t288.576613934\n", + "\t delt : F \t2.39618398314\n", + "\t t(0.05) : F \t117.603816017\n", + "\t interval 2 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc1 : Btu/hr \t9318.91447199\n", + "\t delT1 : F \t21.7009808594\n", + "\t T(0.15) : F \t266.875633075\n", + "\t water diffused during interval : lb/hr \t1.20784906429\n", + "\t water remaining : lb/hr \t119.733601809\n", + "\t qd : Btu/hr \t1240.46098903\n", + "\t q1 : Btu/hr \t10559.375461\n", + "\t delt1 : F \t5.15795533248\n", + "\t t(0.15) : F \t112.445860684\n", + "\t X(112.5F) : lb/lb \t0.079822401206\n", + "\t interval 3 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc2 : Btu/hr \t8417.23279004\n", + "\t delT2 : F \t19.6012323339\n", + "\t T(0.25) : F \t247.274400741\n", + "\t water diffused during interval : lb/hr \t3.23916482908\n", + "\t water remaining : lb/hr \t116.49443698\n", + "\t qd1 : Btu/hr \t3336.33977395\n", + "\t q2 : Btu/hr \t11753.572564\n", + "\t delt2 : F \t5.7412867367\n", + "\t t(0.25) : F \t106.704573948\n", + "\t X(106.5F) : lb/lb \t0.0776629579866\n", + "\t calculated diffusion : \t18.1244724962\n", + "\t Using some standard low-pressure-drop data \t\n", + "\t tower height : ft \t2.16762543941\n", + "\t cross section : ft^2 \t33.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# basis 1ft^2 ground area\n", + "#Assumption: 20 per cent of the initial vapor content of the gas enters the water body\n", + "X1=(1.69/(14.7-1.69))*(18./29.);\n", + "print\"\\t X1 : lb/lb \\t\",X1\n", + "G=1500.;\n", + "w1=G*X1;\n", + "print\"\\t total water in inlet gas : lb/hr \\t\",w1\n", + "# The inlet gas is at 300F and a 120F dew point. Use 0.25 Btu/(lb)(DegF) for the specific heat of nitrogen\n", + "H1=(0.0807*120)+(0.0807*1025.8)+(0.45*0.0807*(300-120))+(0.25*300); # eq 17.55\n", + "print\"\\t H1 : Btu/lb dry air \\t\",H1\n", + "X2=(w1*(1-.2)/G);\n", + "print\"\\t outlet gas humidity : lb/lb \\t\",X2\n", + "pw=(X2*29*14.7/18)/(1+(X2*29/18));\n", + "print\"\\t pw : psia \\t\",pw\n", + "Tw=112.9; # F, from table 7 for above pw\n", + "# The outlet gas has a temperature of 200DegF and a 112.9DegF dew point\n", + "H2=(X2*Tw)+(X2*1029.8)+(X2*0.45*(200-Tw))+(0.25*200); # eq 17.55\n", + "print\"\\t H2 : Btu/lb dry air \\t\",H2\n", + "q=G*(H1-H2);\n", + "print\"\\t total heat load : Btu/hr \\t\",q\n", + "w2=q/(120-85);\n", + "print\"\\t water loading : lb/hr \\t\",w2\n", + "print\"\\t interval 1 \\t\"\n", + "# (Kxa*delV/L)= 0 t0 0.05\n", + "nd=0.05; # nd=Kxa*V/L\n", + "Le=0.93; # fig 17.4 at 300F\n", + "C=(0.25)+(0.45*X1);\n", + "print\"\\t C : Btu/(lb)*(F) \\t\",C\n", + "haV=(nd*w2*Le*C);\n", + "print\"\\t haV : Btu/(hr)*(F) \\t\",haV\n", + "qc=(haV*(300-120));\n", + "print\"\\t qc : Btu/hr \\t\",qc\n", + "delT=(qc/(C*G));\n", + "print\"\\t delT : F \\t\",delT\n", + "T1=(300-delT);\n", + "print\"\\t T(0.05) : F \\t\",T1\n", + "delt=(qc/w2);\n", + "print\"\\t delt : F \\t\",delt\n", + "t1=(120-delt);\n", + "print\"\\t t(0.05) : F \\t\",t1\n", + "print\"\\t interval 2 \\t\"\n", + "# (Kxa*delV/L)= 0.05 to 0.15\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc1=(haV1*(T1-t1));\n", + "print\"\\t qc1 : Btu/hr \\t\",qc1\n", + "delT1=(qc1/(C*G));\n", + "print\"\\t delT1 : F \\t\",delT1\n", + "T2=(T1-delT1);\n", + "print\"\\t T(0.15) : F \\t\",T2\n", + "X3=0.0748; # at 117.6F\n", + "w3=(nd1*w2*(0.0807-X3));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w3\n", + "w4=(w1-w3);\n", + "print\"\\t water remaining : lb/hr \\t\",w4\n", + "l1=1027; # Btu/lb, l1= lamda at 117.6F\n", + "qd=(w3*l1);\n", + "print\"\\t qd : Btu/hr \\t\",qd\n", + "q1=(qd+qc1);\n", + "print\"\\t q1 : Btu/hr \\t\",q1\n", + "delt1=(q1/w2);\n", + "print\"\\t delt1 : F \\t\",delt1\n", + "t2=(t1-delt1);\n", + "print\"\\t t(0.15) : F \\t\",t2\n", + "X4=0.0640; # at 112.5\n", + "X5=(w4/G);\n", + "print\"\\t X(112.5F) : lb/lb \\t\",X5\n", + "print\"\\t interval 3 \\t\"\n", + "# (Kxa*delV/L)= 0.15 to 0.25\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc2=(haV1*(T2-t2));\n", + "print\"\\t qc2 : Btu/hr \\t\",qc2\n", + "delT2=(qc2/(C*G));\n", + "print\"\\t delT2 : F \\t\",delT2\n", + "T3=(T2-delT2);\n", + "print\"\\t T(0.25) : F \\t\",T3\n", + "w5=(nd1*w2*(X5-X4));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w5\n", + "w6=(w4-w5);\n", + "print\"\\t water remaining : lb/hr \\t\",w6\n", + "l2=1030; # Btu/lb, l1= lamda at 112.5F\n", + "qd1=(w5*l2);\n", + "print\"\\t qd1 : Btu/hr \\t\",qd1\n", + "q2=(qd1+qc2);\n", + "print\"\\t q2 : Btu/hr \\t\",q2\n", + "delt2=(q2/w2);\n", + "print\"\\t delt2 : F \\t\",delt2\n", + "t3=(t2-delt2);\n", + "print\"\\t t(0.25) : F \\t\",t3\n", + "X6=0.0533; # at 106.5\n", + "X7=(w6/G);\n", + "print\"\\t X(106.5F) : lb/lb \\t\",X7\n", + "# The calculations of the remaining intervals until a. gas temperature of 200DegF is reached are shown in Fig. 17.17\n", + "w7=21.92; # total water diffused from table in solution\n", + "d=(w7/w1)*100;\n", + "print\"\\t calculated diffusion : \\t\",d\n", + "print\"\\t Using some standard low-pressure-drop data \\t\"\n", + "# For G = 1500, extrapolate to L = 2040 on logarithmic coordinates. Kxa = 510.\n", + "ndt=.54; # from 1st table in solution\n", + "Kxa=510; # from 2nd table in solution\n", + "Z=(ndt*w2/Kxa);\n", + "print\"\\t tower height : ft \\t\",Z\n", + "A=(50000/G);\n", + "print\"\\t cross section : ft^2 \\t\",round(A,1)\n", + "# end\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7 pgno:620" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t sensible heat : Btu/hr \t4200000.0\n", + "\t approximate diffusion : Btu/hr \t756166.666667\n", + "\t total heat : Btu/hr \t4956166.66667\n", + "\t total water quantity : lb/hr \t141604.761905\n", + "\t tower cross section : ft**2 \t69.4140989729\n", + "\t new gas rate : lb/(hr)(ft**2) \t720.314759391\n", + "\t LMTD : \t241.213395056\n", + "\t haV/L : \t0.145099736239\n", + "\t number diffusion units : \t0.557218649152\n", + "\t height of tower : ft \t5.28709788033\n", + " ground dimensions : ft \t1.0\n" + ] + } + ], + "source": [ + "print\"\\t example 17.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "C=0.28; # assumption\n", + "w=50000.; # lb/hr\n", + "G=1500.;\n", + "Qs=(w*C*(500-200));\n", + "Qd=(w/G)*(22685); # qd=22685, from previous prblm\n", + "from math import log\n", + "print\"\\t sensible heat : Btu/hr \\t\",Qs\n", + "print\"\\t approximate diffusion : Btu/hr \\t\",Qd\n", + "Q=(Qs+Qd);\n", + "print\"\\t total heat : Btu/hr \\t\",Q\n", + "# an allowance as high as 30 per cent of the sensible load can be made and the excess water compensated for by throttling when the tower is in operation\n", + "w1=(Q/(120-85));\n", + "print\"\\t total water quantity : lb/hr \\t\",w1\n", + "# If the maximum liquid loading is taken as 2040 lb/(hr)(ft'!), the required tower cross section\n", + "A=(w1/2040);\n", + "print\"\\t tower cross section : ft**2 \\t\",A\n", + "w3=(w/A);\n", + "print\"\\t new gas rate : lb/(hr)(ft**2) \\t\",w3\n", + "# The two terminal temperature differences are (200 - 85) and (500 - 120).\n", + "LMTD=((500-120)-(200-85))/(log((500-120)/(200-85)));\n", + "print\"\\t LMTD : \\t\",LMTD\n", + "dt=35;\n", + "N=(dt/LMTD); # eq 17.88\n", + "print\"\\t haV/L : \\t\",N\n", + "Le=0.93;\n", + "nd=(N/(C*Le));\n", + "print\"\\t number diffusion units : \\t\",nd\n", + "# By extrapolation for G = 718 and L = 2040,Kxa=215\n", + "L=2040;\n", + "Kxa=215;\n", + "Z=(nd*L/Kxa); # calculation mistake\n", + "print\"\\t height of tower : ft \\t\",Z\n", + "di=(A)**(1/2);\n", + "print\" ground dimensions : ft \\t\",di\n", + "# ground dimensions are 5.8*8.3*8.3 ft\n", + "# end\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/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 new file mode 100644 index 00000000..45f8b0e5 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_17_Direct_Contact_Transfer__Cooling_Tower_4.ipynb @@ -0,0 +1,856 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Direct Contact Transfer : Cooling Tower" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 71.1 pgno:585" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.1 \n", + "\n", + "\t humidity is : lb water/lb air 0.0186996126364\n", + "\t enthalpy at 75F is : Btu/lb dry air 39.1\n" + ] + } + ], + "source": [ + "print\"\\t example 17.1 \\n\"\n", + "pw=0.4298; # psia, at 75F, table 7\n", + "pt=14.696; # psia\n", + "t=75.;\n", + "Mw=18.;\n", + "Ma=29.;\n", + "X=(pw/(pt-pw))*(Mw/Ma);\n", + "print\"\\t humidity is : lb water/lb air \",X\n", + "H=(X*t)+(1051.5*X)+(0.24*t); # eq 17.54\n", + "print\"\\t enthalpy at 75F is : Btu/lb dry air \",round(H,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2 Pgno:602" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t by numerical integration \t\n", + "\t R is : \t0.93005952381\n", + "\t H2 is : Btu \t71.6520833333\n", + "\t difference is : \t10.9\n", + "\t difference is : \t13.0\n", + "\t average of difference is : \t11.95\n", + "\t nd1 is : \t0.418410041841\n", + "\t number of diffusing units : \t1.7\n", + "\t log mean enthalpy difference \t\n", + "\t log mean of enthalpy : Btu/lb \t25.6654878432\n", + "\t number of diffusing units are : \t1.36\n" + ] + } + ], + "source": [ + "print\"\\t example 17.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t by numerical integration \\t\"\n", + "T1=85.;\n", + "T2=120.;\n", + "A=576.; # ground area, from fig 17.12\n", + "L=1500.*(500./576.);\n", + "G=1400.;\n", + "R=(L/G);\n", + "from math import log10\n", + "print\"\\t R is : \\t\",R\n", + "H1=39.1; # fig 17.12\n", + "H2=H1+(R*(T2-T1));\n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # fig 17.12\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=43.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=5; # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.70;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "print\"\\t log mean enthalpy difference \\t\"\n", + "dt=49.9; # diff. of enthalpies at top of the tower, from table in solution\n", + "db=10.9; # diff of enthalpies at bottom of the tower,from table in solution\n", + "LME=(dt-db)/(2.3*log10(dt/db));\n", + "print\"\\t log mean of enthalpy : Btu/lb \\t\",LME\n", + "nd=(T2-T1)/(LME);\n", + "print\"\\t number of diffusing units are : \\t\",round(nd,2)\n", + "# The error is naturally larger the greater the range\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3 pgno:604" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Z is : ft \t19.2469565217\n", + "\t height of diffusion unit : ft \t11.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# Since the loading is based on 1 ft2 of ground area\n", + "nd=1.7;\n", + "L=1302;\n", + "Kxa=115;\n", + "Z=(nd*L)/(Kxa);\n", + "print\"\\t Z is : ft \\t\",Z\n", + "HDU=(Z/nd);\n", + "print\"\\t height of diffusion unit : ft \\t\",round(HDU,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4 pgno:605" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t difference is : \t13.0\n", + "\t difference is : \t14.3\n", + "\t average of difference is : \t13.65\n", + "\t nd1 is : \t0.417582417582\n", + "\t number of diffusing units : \t1.72\n" + ] + } + ], + "source": [ + "print\"\\t example 17.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=79.3F\n", + "Hs=43.4; # fig 17.12\n", + "H=30.4; # fig 17.12\n", + "d1=(Hs-H);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=35.7; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-79.3); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.72;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5 pgno:609" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for 120percent of design \t\n", + "\t R is : %.3f \t1.116\n", + "\t H2 is : %.1f Btu \t78.16\n", + "\t difference is : %.1f \t14.0\n", + "\t difference is : %.1f \t14.7\n", + "\t average of difference is : %.1f \t14.35\n", + "\t nd1 is : %.3f \t0.19512195122\n", + "\t number of diffusing units : %.2f \t1.53\n", + "\t for 80 percent of design \t\n", + "\t R is : %.3f \t0.744\n", + "\t H2 is : Btu \t65.14\n", + "\t difference is : \t8.1\n", + "\t difference is : \t9.2\n", + "\t average of difference is : \t8.65\n", + "\t nd1 is : \t0.28901734104\n", + "\t number of diffusing units : \t1.92\n" + ] + }, + { + "data": { + "image/png": [ + "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", + "AAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYXVV9//H3pwHEULk1SC2gqYjIrYBIVC4yBYSAF7wD\n", + "XpDG8osWLFaoVJ4qsWrRKogCLXgJxQIBFREQ5GYZDXciIQQhCJLUIBi5CxIggc/vj7UDY5jJnEnm\n", + "zDpn5vN6nnlyzt77nPPJfpL5nrX2XmvJNhEREX9WO0BERHSGFISIiABSECIiopGCEBERQApCREQ0\n", + "UhAiIgJIQYiIiEYKQkREACkI0aUkLZC0R5/nB0h6SNKuq/CeB0ia38/21ST9XtK+fbZ9WtIXJfVI\n", + "Wriyn7kSGQ+WNHMF+9eQdL+k8c3zN0u6UtIfJD0gabakT0l60Uhlju6RghDdys0Pkj4MnATsa3vA\n", + "X5YtOA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SzfeUPlSNGPtBAiou1sbgd2pyx8db7EKRLrVY4VLUpBiIhh1UyB8T+UKTBMGbtwUMYudL50\n", + "GUVEW0lMooxdeIyyfOdtlSONeekyiogqmusIk4BzgZ9JHCsxvnKs6EcKQkS0nc0zNicCfwO8Arit\n", + "uV01Oki6jCJixDUD2U4G5gH/aPN/lSONKekyioiOYXMFpbUwC/iFxFESa1SONealhRARVUlsSlm+\n", + "8+WUi84/qxxp1BvxFoKk6ZIWSRpw+UtJPZJmS7pVUm+f7ZMlzZN0Z7P2ckSMUs2MqfsCnwXOkDhd\n", + "4qWVY41J7ewyOo2yRmu/JK1L6UN8m+2tgfc028dRvi1MptzHfKCkLdqYMyIqa8YunEv5P/8AcKvE\n", + "1CzfObLadrJtzwQeXsEh7wfOtX1Pc/wDzfZJwF22F9heApwN7NeunBHROWweszkCeDPwYeAaie0r\n", + "xxozalbfzYD1JV0paZakDzXbNwIW9jnunmZbRIwRzfrNuwDfBi6ROEFi7cqxRr2aMxKuTplLfQ9g\n", + "PHCtpOsoQ91bJmlan6e9tnuHK2BE1GPzLPBtiR8BX6aMXTgC+J49tN8TY52kHqBnsONqFoSFwAO2\n", + "FwOLJf0c2JbSItikz3GbNNv6ZXtaO0NGRF02DwAfkdiFMgXGFInDbO6sHK1rNF+Ue5c9l3RMf8fV\n", + "7DI6H9hF0jhJ44HXA7dR7kveTNJESWsA+wMXVMwZER3A5ipKr8LlwLUS0yTWrBxrVGnnbaczgGuA\n", + "zSUtlDRF0lRJUwFszwMuAW4Brge+Zfs220uBw4BLKQXiHNu3tytnRHSPZvnOrwLbA9tQ7kbau3Ks\n", + "USMD0yKia0nsS7lNfRbwTza/rRypK2TqiogYdWwuBrYGfgXMkfhElu9ceWkhRMSoIPEayvKd6wMf\n", + "s7m2cqSOlRZCRIxqNvMot7F/BThX4psS61eO1VVSECJi1GimwDiTMgXG05SxCwdn+c7WpMsoIkYt\n", + "idcBpwBPULqRflk5UkdIl1FEjDk2syhjnM4GeiW+LLFW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+lLlG+7s4HDgNnAM21N1b2Wv/U7d6l0sZojlVvxW2CTPs83oXwL6c8BjN3uImjtXO0EfBHA\n", + "9q+bwYCbA7NGJGFnGPQ82X4MmLLseXOe7h6RdN1l+XO5cbMtulSntxCeG6QmaQ3KILULlj9I0jrA\n", + "m4DzRzhfJ2nlXM0D9oTnBgZuztj7RTfoeZK0TrMPSYdQZuV9fOSjdrwLgIMAJL0BeMT2orqROlrH\n", + "D6Tt6BaCBxikJmlqs//U5tB3AJfaXlwpanUtnqt/B06TNIfyZeBTth+qFrqCFs/TlsB/N1Oj3Ap8\n", + "pFrgigYbXGr7Ykn7SroL+CPwd/XS1jPYeZL0l8CNlBs5npV0OLBlJ37JyMC0iIgAOr/LKCIiRkgK\n", + "QkREACkIERHRSEGIiAggBSEiIhopCBERAaQgRKw0Sf3eRy7pZZIubR5vJunHku6SNEvS/0radWST\n", + "RrQmBSFi5Q00iGcycImkNYGLgFNsv8r264CPA68cqYARQ5GBaRErSdJjtl8wOaCksylrT+wM7GJ7\n", + "TI7gje6TFkLEMJI0Dtjc9jxgK+CmypEiWpaCEDG8Xg9c1zw2fSY0a5blnCtprK7ZER0uBSFieO0D\n", + "XNI8/iXw2mU7bL8TOBhYf+RjRQwuBSFieO0OXNE8PgvYWdLb+uxfa+QjRbSmo6e/juhw45vpjpc5\n", + "EXjS9h8BbD8p6a3A8ZJOABYBjwGfH/moEYPLXUYRw0TSB4CNbP9H7SwRKyMFISIigFxDiIiIRgpC\n", + "REQAKQgREdFIQYiICCAFISIiGikIEREBpCBERETj/wPQ8mh2PbtLiwAAAABJRU5ErkJggg==\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t trial 1 \t\n", + "\t R is : \t1.1\n", + "\t H2 is : Btu \t73.0\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.7\n", + "\t average of difference is : \t16.1\n", + "\t nd1 is : \t0.310559006211\n", + "\t number of diffusing units : \t1.48\n", + "\t L/G is : \t1.19\n", + "\t trial 2 \t\n", + "\t R4 is : \t1.2\n", + "\t H2 is : Btu \t76.5\n", + "\t difference is : \t15.5\n", + "\t difference is : \t16.2\n", + "\t average of difference is : \t15.85\n", + "\t nd1 is : \t0.315457413249\n", + "\t number of diffusing units : \t1.56\n", + "\t L/G is : \t1.08\n" + ] + } + ], + "source": [ + "print\"\\t example 17.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=85;\n", + "T2=120;\n", + "R=0.93; # R=(L/G), for 1500 gpm\n", + "import numpy\n", + "import matplotlib\n", + "%matplotlib inline\n", + "from matplotlib import pyplot\n", + "print\"\\t for 120percent of design \\t\"\n", + "R1=1.2*R;\n", + "print\"\\t R is : %.3f \\t\",R1\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R1*(T2-T1)); \n", + "print\"\\t H2 is : %.1f Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=87.2F\n", + "Hs=53.1; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : %.1f \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=42; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : %.1f \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : %.1f \\t\",d\n", + "dT=(90-87.2); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : %.3f \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.53;\n", + "print\"\\t number of diffusing units : %.2f \\t\",nd\n", + "print\"\\t for 80 percent of design \\t\"\n", + "R2=0.8*R;\n", + "print\"\\t R is : %.3f \\t\",R2\n", + "H1=39.1; # at 87.2F\n", + "H2=H1+(R2*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=82.5F\n", + "Hs=47.2; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=85\n", + "Hs=50; # fig 17.12\n", + "H=40.8; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(85-82.5); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.92;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "X=[1.115, 0.93, 0.74];\n", + "Y=[1.53, 1.70, 1.92];\n", + "pyplot.plot(X,Y)\n", + "pyplot.xlabel('L/G')\n", + "pyplot.ylabel('nd')\n", + "pyplot.title('KxaV/L vs L/G')\n", + "pyplot.show()\n", + "print\"\\t trial 1 \\t\"\n", + "R3=1.1;\n", + "print\"\\t R is : \\t\",R3\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R3*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.48;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.19; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "print\"\\t trial 2 \\t\"\n", + "R4=1.2;\n", + "print\"\\t R4 is : \\t\",R4\n", + "H1=34.5; # at 87.2F\n", + "H2=H1+(R4*(T2-T1)); \n", + "print\"\\t H2 is : Btu \\t\",H2\n", + "# The area between the saturation line and the operating line represents the potential for heat transfer\n", + "# at T=85F\n", + "Hs=50; # from table in the solution\n", + "d1=(Hs-H1);\n", + "print\"\\t difference is : \\t\",d1\n", + "#at t=90\n", + "Hs=56.7; # fig 17.12\n", + "H=40.5; # fig 17.12\n", + "d2=Hs-H;\n", + "print\"\\t difference is : \\t\",d2\n", + "d=(d1+d2)/(2);\n", + "print\"\\t average of difference is : \\t\",d\n", + "dT=(90-85); # F\n", + "nd1=(dT/d);\n", + "print\"\\t nd1 is : \\t\",nd1\n", + "# similarly calculating nd at each temperature and adding them will give you total nd value\n", + "nd=1.56;\n", + "print\"\\t number of diffusing units : \\t\",nd\n", + "R3=1.08; # from fig 17.14\n", + "print\"\\t L/G is : \\t\",R3\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6 pgno:615" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t X1 : lb/lb \t0.0806276339156\n", + "\t total water in inlet gas : lb/hr \t120.941450873\n", + "\t H1 : Btu/lb dry air \t174.00276\n", + "\t outlet gas humidity : lb/lb \t0.0645021071324\n", + "\t pw : psia \t1.38381840969\n", + "\t H2 : Btu/lb dry air \t126.234717909\n", + "\t total heat load : Btu/hr \t71652.063136\n", + "\t water loading : lb/hr \t2047.20180389\n", + "\t interval 1 \t\n", + "\t C : Btu/(lb)*(F) \t0.286282435262\n", + "\t haV : Btu/(hr)*(F) \t27.2526231819\n", + "\t qc : Btu/hr \t4905.47217274\n", + "\t delT : F \t11.4233860657\n", + "\t T(0.05) : F \t288.576613934\n", + "\t delt : F \t2.39618398314\n", + "\t t(0.05) : F \t117.603816017\n", + "\t interval 2 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc1 : Btu/hr \t9318.91447199\n", + "\t delT1 : F \t21.7009808594\n", + "\t T(0.15) : F \t266.875633075\n", + "\t water diffused during interval : lb/hr \t1.20784906429\n", + "\t water remaining : lb/hr \t119.733601809\n", + "\t qd : Btu/hr \t1240.46098903\n", + "\t q1 : Btu/hr \t10559.375461\n", + "\t delt1 : F \t5.15795533248\n", + "\t t(0.15) : F \t112.445860684\n", + "\t X(112.5F) : lb/lb \t0.079822401206\n", + "\t interval 3 \t\n", + "\t haV1 : Btu/(hr)*(F) \t54.5052463637\n", + "\t qc2 : Btu/hr \t8417.23279004\n", + "\t delT2 : F \t19.6012323339\n", + "\t T(0.25) : F \t247.274400741\n", + "\t water diffused during interval : lb/hr \t3.23916482908\n", + "\t water remaining : lb/hr \t116.49443698\n", + "\t qd1 : Btu/hr \t3336.33977395\n", + "\t q2 : Btu/hr \t11753.572564\n", + "\t delt2 : F \t5.7412867367\n", + "\t t(0.25) : F \t106.704573948\n", + "\t X(106.5F) : lb/lb \t0.0776629579866\n", + "\t calculated diffusion : \t18.1244724962\n", + "\t Using some standard low-pressure-drop data \t\n", + "\t tower height : ft \t2.16762543941\n", + "\t cross section : ft^2 \t33.3\n" + ] + } + ], + "source": [ + "print\"\\t example 17.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "# basis 1ft^2 ground area\n", + "#Assumption: 20 per cent of the initial vapor content of the gas enters the water body\n", + "X1=(1.69/(14.7-1.69))*(18./29.);\n", + "print\"\\t X1 : lb/lb \\t\",X1\n", + "G=1500.;\n", + "w1=G*X1;\n", + "print\"\\t total water in inlet gas : lb/hr \\t\",w1\n", + "# The inlet gas is at 300F and a 120F dew point. Use 0.25 Btu/(lb)(DegF) for the specific heat of nitrogen\n", + "H1=(0.0807*120)+(0.0807*1025.8)+(0.45*0.0807*(300-120))+(0.25*300); # eq 17.55\n", + "print\"\\t H1 : Btu/lb dry air \\t\",H1\n", + "X2=(w1*(1-.2)/G);\n", + "print\"\\t outlet gas humidity : lb/lb \\t\",X2\n", + "pw=(X2*29*14.7/18)/(1+(X2*29/18));\n", + "print\"\\t pw : psia \\t\",pw\n", + "Tw=112.9; # F, from table 7 for above pw\n", + "# The outlet gas has a temperature of 200DegF and a 112.9DegF dew point\n", + "H2=(X2*Tw)+(X2*1029.8)+(X2*0.45*(200-Tw))+(0.25*200); # eq 17.55\n", + "print\"\\t H2 : Btu/lb dry air \\t\",H2\n", + "q=G*(H1-H2);\n", + "print\"\\t total heat load : Btu/hr \\t\",q\n", + "w2=q/(120-85);\n", + "print\"\\t water loading : lb/hr \\t\",w2\n", + "print\"\\t interval 1 \\t\"\n", + "# (Kxa*delV/L)= 0 t0 0.05\n", + "nd=0.05; # nd=Kxa*V/L\n", + "Le=0.93; # fig 17.4 at 300F\n", + "C=(0.25)+(0.45*X1);\n", + "print\"\\t C : Btu/(lb)*(F) \\t\",C\n", + "haV=(nd*w2*Le*C);\n", + "print\"\\t haV : Btu/(hr)*(F) \\t\",haV\n", + "qc=(haV*(300-120));\n", + "print\"\\t qc : Btu/hr \\t\",qc\n", + "delT=(qc/(C*G));\n", + "print\"\\t delT : F \\t\",delT\n", + "T1=(300-delT);\n", + "print\"\\t T(0.05) : F \\t\",T1\n", + "delt=(qc/w2);\n", + "print\"\\t delt : F \\t\",delt\n", + "t1=(120-delt);\n", + "print\"\\t t(0.05) : F \\t\",t1\n", + "print\"\\t interval 2 \\t\"\n", + "# (Kxa*delV/L)= 0.05 to 0.15\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc1=(haV1*(T1-t1));\n", + "print\"\\t qc1 : Btu/hr \\t\",qc1\n", + "delT1=(qc1/(C*G));\n", + "print\"\\t delT1 : F \\t\",delT1\n", + "T2=(T1-delT1);\n", + "print\"\\t T(0.15) : F \\t\",T2\n", + "X3=0.0748; # at 117.6F\n", + "w3=(nd1*w2*(0.0807-X3));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w3\n", + "w4=(w1-w3);\n", + "print\"\\t water remaining : lb/hr \\t\",w4\n", + "l1=1027; # Btu/lb, l1= lamda at 117.6F\n", + "qd=(w3*l1);\n", + "print\"\\t qd : Btu/hr \\t\",qd\n", + "q1=(qd+qc1);\n", + "print\"\\t q1 : Btu/hr \\t\",q1\n", + "delt1=(q1/w2);\n", + "print\"\\t delt1 : F \\t\",delt1\n", + "t2=(t1-delt1);\n", + "print\"\\t t(0.15) : F \\t\",t2\n", + "X4=0.0640; # at 112.5\n", + "X5=(w4/G);\n", + "print\"\\t X(112.5F) : lb/lb \\t\",X5\n", + "print\"\\t interval 3 \\t\"\n", + "# (Kxa*delV/L)= 0.15 to 0.25\n", + "nd1=0.1;\n", + "haV1=(nd1*w2*Le*C);\n", + "print\"\\t haV1 : Btu/(hr)*(F) \\t\",haV1\n", + "qc2=(haV1*(T2-t2));\n", + "print\"\\t qc2 : Btu/hr \\t\",qc2\n", + "delT2=(qc2/(C*G));\n", + "print\"\\t delT2 : F \\t\",delT2\n", + "T3=(T2-delT2);\n", + "print\"\\t T(0.25) : F \\t\",T3\n", + "w5=(nd1*w2*(X5-X4));\n", + "print\"\\t water diffused during interval : lb/hr \\t\",w5\n", + "w6=(w4-w5);\n", + "print\"\\t water remaining : lb/hr \\t\",w6\n", + "l2=1030; # Btu/lb, l1= lamda at 112.5F\n", + "qd1=(w5*l2);\n", + "print\"\\t qd1 : Btu/hr \\t\",qd1\n", + "q2=(qd1+qc2);\n", + "print\"\\t q2 : Btu/hr \\t\",q2\n", + "delt2=(q2/w2);\n", + "print\"\\t delt2 : F \\t\",delt2\n", + "t3=(t2-delt2);\n", + "print\"\\t t(0.25) : F \\t\",t3\n", + "X6=0.0533; # at 106.5\n", + "X7=(w6/G);\n", + "print\"\\t X(106.5F) : lb/lb \\t\",X7\n", + "# The calculations of the remaining intervals until a. gas temperature of 200DegF is reached are shown in Fig. 17.17\n", + "w7=21.92; # total water diffused from table in solution\n", + "d=(w7/w1)*100;\n", + "print\"\\t calculated diffusion : \\t\",d\n", + "print\"\\t Using some standard low-pressure-drop data \\t\"\n", + "# For G = 1500, extrapolate to L = 2040 on logarithmic coordinates. Kxa = 510.\n", + "ndt=.54; # from 1st table in solution\n", + "Kxa=510; # from 2nd table in solution\n", + "Z=(ndt*w2/Kxa);\n", + "print\"\\t tower height : ft \\t\",Z\n", + "A=(50000/G);\n", + "print\"\\t cross section : ft^2 \\t\",round(A,1)\n", + "# end\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7 pgno:620" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 17.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t sensible heat : Btu/hr \t4200000.0\n", + "\t approximate diffusion : Btu/hr \t756166.666667\n", + "\t total heat : Btu/hr \t4956166.66667\n", + "\t total water quantity : lb/hr \t141604.761905\n", + "\t tower cross section : ft**2 \t69.4140989729\n", + "\t new gas rate : lb/(hr)(ft**2) \t720.314759391\n", + "\t LMTD : \t241.213395056\n", + "\t haV/L : \t0.145099736239\n", + "\t number diffusion units : \t0.557218649152\n", + "\t height of tower : ft \t5.28709788033\n", + " ground dimensions : ft \t1.0\n" + ] + } + ], + "source": [ + "print\"\\t example 17.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "C=0.28; # assumption\n", + "w=50000.; # lb/hr\n", + "G=1500.;\n", + "Qs=(w*C*(500-200));\n", + "Qd=(w/G)*(22685); # qd=22685, from previous prblm\n", + "from math import log\n", + "print\"\\t sensible heat : Btu/hr \\t\",Qs\n", + "print\"\\t approximate diffusion : Btu/hr \\t\",Qd\n", + "Q=(Qs+Qd);\n", + "print\"\\t total heat : Btu/hr \\t\",Q\n", + "# an allowance as high as 30 per cent of the sensible load can be made and the excess water compensated for by throttling when the tower is in operation\n", + "w1=(Q/(120-85));\n", + "print\"\\t total water quantity : lb/hr \\t\",w1\n", + "# If the maximum liquid loading is taken as 2040 lb/(hr)(ft'!), the required tower cross section\n", + "A=(w1/2040);\n", + "print\"\\t tower cross section : ft**2 \\t\",A\n", + "w3=(w/A);\n", + "print\"\\t new gas rate : lb/(hr)(ft**2) \\t\",w3\n", + "# The two terminal temperature differences are (200 - 85) and (500 - 120).\n", + "LMTD=((500-120)-(200-85))/(log((500-120)/(200-85)));\n", + "print\"\\t LMTD : \\t\",LMTD\n", + "dt=35;\n", + "N=(dt/LMTD); # eq 17.88\n", + "print\"\\t haV/L : \\t\",N\n", + "Le=0.93;\n", + "nd=(N/(C*Le));\n", + "print\"\\t number diffusion units : \\t\",nd\n", + "# By extrapolation for G = 718 and L = 2040,Kxa=215\n", + "L=2040;\n", + "Kxa=215;\n", + "Z=(nd*L/Kxa); # calculation mistake\n", + "print\"\\t height of tower : ft \\t\",Z\n", + "di=(A)**(1/2);\n", + "print\" ground dimensions : ft \\t\",di\n", + "# ground dimensions are 5.8*8.3*8.3 ft\n", + "# end\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/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 new file mode 100644 index 00000000..583cdf29 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_1.ipynb @@ -0,0 +1,616 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Batch and Unsteady State Processes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 18.1 pgno:635" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.1 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t weight of benzene is : lb \t54978.0\n", + "\t Q1 is : Btu/(hr)*(F) \t19200.0\n", + "\t Q2 is : Btu/(hr)*(F) \t6000.0\n", + "\t Ks is : \t0.101097824987\n", + "\t Z is : \t1.09861228867\n", + "\t theta is : hr \t5.20557650697\n", + "\t for b \t\n", + "\t R is : \t3.2\n", + "\t KT is : \t2.83393630769\n", + "\t S is : \t0.31793720236\n", + "\t theta1 is : hr \t5.67664533895\n", + "\t for c \t\n", + "\t K8 is : \t1.68342992361\n", + "\t S1 is : \t0.492221932725\n", + "\t theta2 is : hr \t5.35456617078\n", + "\t for d \t\n", + "\t K9 is : \t9.89140963346\n", + "\t S2 is : \t0.290071168513\n", + "\t t1 is : F \t187.021350554\n", + "\t t2 is : F \t248.800316267\n", + "\t t3 is : F \t292.658985206\n", + "\t t4 is : F \t323.795518797\n", + "\t fractional circulation is : \t0.23\n", + "\t total fractional circulation : \t3.23\n", + "\t theta3 is : \t4.44\n" + ] + } + ], + "source": [ + "print\"\\t example 18.1 \\t\"\n", + "# specific gravity of benzene is 0.88\n", + "# specific heat of benzene is 0.48 Btu/(lb)*(F)\n", + "U=50;\n", + "A=400;\n", + "T1=400;\n", + "t1=100;\n", + "t2=300;\n", + "c=0.48;\n", + "w=40000;\n", + "C=0.60;\n", + "W=10000;\n", + "from math import e\n", + "from math import log\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "M=(7500*8.33*0.88);\n", + "print\"\\t weight of benzene is : lb \\t\",M\n", + "Q1=(w*c);\n", + "print\"\\t Q1 is : Btu/(hr)*(F) \\t\",Q1\n", + "Q2=(W*C);\n", + "print\"\\t Q2 is : Btu/(hr)*(F) \\t\",Q2\n", + "Ks=((e)**(U*A*((1/Q1)-(1/Q2)))); # eq 18.16\n", + "print\"\\t Ks is : \\t\",Ks\n", + "Z=log((T1-t1)/(T1-t2));\n", + "print\"\\t Z is : \\t\",Z\n", + "theta=((M*(Z)*(Ks*6000-(19200)))/((Ks-1)*40000*6000));\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t for b \\t\"\n", + "R=(Q1/Q2);\n", + "print\"\\t R is : \\t\",R\n", + "KT=((e)**(U*(A/Q1)*(1+R**2)**(1/2)));\n", + "print\"\\t KT is : \\t\",KT\n", + "S=((2*(KT-1))/((KT*(R+1+(1+R**2)**(1/2)))-(R+1-(1+R**2)**(1/2)))); # eq 18.24\n", + "print\"\\t S is : \\t\",S\n", + "theta1=((M*Z)/(0.266*40000)); # eq 18.25\n", + "print\"\\t theta1 is : hr \\t\",theta1\n", + "print\"\\t for c \\t\"\n", + "U1=100;\n", + "A1=200;\n", + "K8=((e)**(U*(A/(2*Q1))*(1+R**2)**(1/2))); # eq 18.32\n", + "S1=((2*(K8-1)*(1+((1-0.266)*(1-(3.2*0.266)))**(1/2)))/(((K8-1)*(3.2+1))+((K8+1)*(1+3.2**2)**(1/2)))); # eq 18.31\n", + "print\"\\t K8 is : \\t\",K8\n", + "print\"\\t S1 is : \\t\",S1\n", + "theta2=((M*Z)/(0.282*40000)); # eq 18.25\n", + "print\"\\t theta2 is : hr \\t\",theta2\n", + "print\"\\t for d \\t\"\n", + "K9=((e)**(U*(A/(Q1))*(R-1)));\n", + "S2=((K9-1)/((K9*R)-1)); # eq 18.36\n", + "print\"\\t K9 is : \\t\",K9\n", + "print\"\\t S2 is : \\t\",S2\n", + "t=100;\n", + "t1=t+(S2*(T1-t)); # 18.37\n", + "print\"\\t t1 is : F \\t\",t1\n", + "t2=t1+(S2*(T1-t1));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "t3=t2+(S2*(T1-t2));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "t4=t3+(S2*(T1-t3));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "x=0.23;\n", + "print\"\\t fractional circulation is : \\t\",x\n", + "N=3+x;\n", + "print\"\\t total fractional circulation : \\t\",N\n", + "theta3=(N*(M/w));\n", + "print\"\\t theta3 is : \\t\",round(theta3,2)\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 18.2 pgno:643" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.2 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X is : \t0.1665\n", + "\t t si : F \t872.2\n", + "\t q is : Btu/(hr)*(ft**2) \t21600.0\n", + "\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \t75200.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.2 \\t\"\n", + "tav=500.; # F\n", + "Ts=1000.; \n", + "t0=100.;\n", + "c=0.12; # Btu/(lb)*(F)\n", + "k=24; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=488; # lb/ft**3\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "x=0.333; # ft\n", + "theta=4;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X=(x/(2*(alpha*theta)**(1/2)));\n", + "print\"\\t X is : \\t\",X\n", + "Y=0.142; # Y=f1(X) from fig 18.7 \n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t si : F \\t\",t\n", + "q=((k*(Ts-t0))/(3.14*alpha*theta)**(1/2)); # q=(Q/A),from eq 18.47\n", + "print\"\\t q is : Btu/(hr)*(ft**2) \\t\",q\n", + "q1=(2*k*(Ts-t0)*(theta/(3.14*alpha))**(1/2))+32000; # q=(Q1/A). eq 18.49\n", + "print\"\\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \\t\",q1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 pgno:646" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.3 \n", + "\n", + "\t X is : 0.0\n", + "\t t si : F 861.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.3 \\n\"\n", + "Ts=1000; \n", + "t0=100;\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=15/60;\n", + "l=1; # ft\n", + "X=(4*alpha*theta)/(l**2);\n", + "print\"\\t X is : \",X\n", + "Y=0.155; # Y=f3*(X)from fig 18.9 when L=infinity\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.52\n", + "print\"\\t t si : F\",round(t)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 pgno:648" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.4 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \t6.870372355\n", + "\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \t0.3\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t7.170372355\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t3.55\n", + "\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \t5.3601861775\n", + "\t X is : \t9.07776\n", + "\t Y is : \t0.0827189224923\n", + "\t t is : F \t502.6\n", + "\t for b \t\n", + "\t temperature of center plane is : F \t512.9\n" + ] + } + ], + "source": [ + "print\"\\t example 18.4 \\t\"\n", + "T1=1100.; # F\n", + "T2=70.; # F\n", + "t1=T1+460; # R\n", + "t2=T2+460; # R\n", + "k=27; # from appendix\n", + "c=0.14; # from appendix\n", + "row=490; # from appendix\n", + "alpha=0.394;\n", + "theta=4.;\n", + "l=10./12.; # ft\n", + "x=0.173*10**(-8); # stefan constant\n", + "e=0.7; # emmisivity\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "# Assume the temperature is 500DegF after 4 hr. The coefficient from plate to air is the sum of the radiation and convection coefficients\n", + "hri=(e*x*(t1**4-t2**4))/(T1-T2);\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hri # eq 4.32\n", + "hci=(0.3*(T1-T2)**(1/4)); # eq 10.10\n", + "print\"\\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hci\n", + "hti=hri+hci;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hti\n", + "# For the 4-hr coefficient at 500DegF\n", + "hr=2.2; # Btu/(hr)*(ft**2)*(F)\n", + "hc=1.35; # Btu/(hr)*(ft**2)*(F)\n", + "ht=hr+hc;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ht\n", + "h=(hti+ht)/2;\n", + "print\"\\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",h\n", + "X=(4*alpha*theta)/(l**2);\n", + "Y=(h*l)/(2*k);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "Z=0.42; # Z=f3(X,Y), from fig 18.10\n", + "t=T2+((T1-T2)*Z); # eq 18.53\n", + "print\"\\t t is : F \\t\",t\n", + "print\"\\t for b \\t\"\n", + "Z1=0.43; # Z=f4(X,Y), from fig 18.11\n", + "t1=T2+((T1-T2)*Z1); # eq 18.53\n", + "print\"\\t temperature of center plane is : F \\t\",t1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 pgno:651" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.5 \t\n", + "\t X is : \t1.0125\n", + "\t Z is : \t1.5\n", + "\t t is : F \t338.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.5 \\t\"\n", + "Ts=400.;\n", + "t0=200.;\n", + "k=25.; # from appendix\n", + "c=0.12; # from appendix\n", + "row=490.; # from appendix\n", + "alpha=0.45; # alpha=(k/(c*row))\n", + "theta=15./60.;\n", + "l=8./12.; # ft\n", + "h=50;\n", + "X=(4*alpha*theta)/(l**2);\n", + "Z=(2*k)/(h*l);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Z is : \\t\",Z\n", + "Y=0.31; # Y=(Ts-t)/(Ts-t0), from fig 18.13\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t is : F \\t\",t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 pgno:656" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.6 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X1 is : \t0.0827733333333\n", + "\t Z1 is : \t0.19512195122\n", + "\t X2 is : \t0.331093333333\n", + "\t Z2 is : \t0.390243902439\n", + "\t X3 is : \t1.0727424\n", + "\t Z3 is : \t0.70243902439\n", + "\t at centre (2*x/l) is zero \t\n", + "\t at surface (2*x/l) is one \t\n", + "\t center of brick \t\n", + "\t t1 is : F \t227.3085\n", + "\t corner of brick \t\n", + "\t t2 is : F \t294.6890125\n", + "\t center of 9 by 4.5in face \t\n", + "\t t3 is : F \t258.58275\n", + "\t center of 9 by 2.5in face \t\n", + "\t t4 is : F \t271.89262\n", + "\t center of 4.5 by 2.5in face \t\n", + "\t t5 is : F \t275.893125\n", + "\t middle of long edge \t\n", + "\t t6 is : F \t284.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.6 \\t\"\n", + "Ts=300.; \n", + "t0=70.;\n", + "c=0.25; # Btu/(lb)*(F)\n", + "k=0.3; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=103.; # lb/ft**3\n", + "alpha=0.01164; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=1.;\n", + "lx=9./12.;\n", + "ly=4.5/12.;\n", + "lz=2.5/12.;\n", + "h=4.1;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X1=(4*alpha*theta)/(lx**2);\n", + "Z1=(2*k)/(h*lx);\n", + "print\"\\t X1 is : \\t\",X1\n", + "print\"\\t Z1 is : \\t\",Z1\n", + "X2=(4*alpha*theta)/(ly**2);\n", + "Z2=(2*k)/(h*ly);\n", + "print\"\\t X2 is : \\t\",X2\n", + "print\"\\t Z2 is : \\t\",Z2\n", + "X3=(4*alpha*theta)/(lz**2);\n", + "Z3=(2*k)/(h*lz);\n", + "print\"\\t X3 is : \\t\",X3\n", + "print\"\\t Z3 is : \\t\",Z3\n", + "print\"\\t at centre (2*x/l) is zero \\t\"\n", + "Yx=0.98; # fig 18.12\n", + "Yy=0.75; # fig 18.12\n", + "Yz=0.43; # fig 18.12\n", + "print\"\\t at surface (2*x/l) is one \\t\"\n", + "Yx1=0.325; # fig 18.12\n", + "Yy1=0.29; # fig 18.12\n", + "Yz1=0.245; # fig 18.12\n", + "print\"\\t center of brick \\t\"\n", + "t1=Ts-(Yx*Yy*Yz*(Ts-t0));\n", + "print\"\\t t1 is : F \\t\",t1\n", + "print\"\\t corner of brick \\t\"\n", + "t2=Ts-(Yx1*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t center of 9 by 4.5in face \\t\"\n", + "t3=Ts-(Yx*Yy*Yz1*(Ts-t0));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "print\"\\t center of 9 by 2.5in face \\t\"\n", + "t4=Ts-(Yx*Yy1*Yz*(Ts-t0));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "print\"\\t center of 4.5 by 2.5in face \\t\"\n", + "t5=Ts-(Yx1*Yy*Yz*(Ts-t0));\n", + "print\"\\t t5 is : F \\t\",t5\n", + "print\"\\t middle of long edge \\t\"\n", + "t6=Ts-(Yx*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t6 is : F \\t\",round(t6)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 pgno:659" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t deltheta is : hr \t0.03486125\n", + "\t number of steps required : \t9.6\n" + ] + } + ], + "source": [ + "print\"\\t example 18.7 \\t\"\n", + "t=20.; # min\n", + "alpha=0.40; # ft**2/hr\n", + "delx=0.167; # ft\n", + "# From the conditions of Eq. (18.61) take time increments such that alpha(deltheta/delx**2)=1/2\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "deltheta=(delx**2/(2*alpha));\n", + "print\"\\t deltheta is : hr \\t\",deltheta\n", + "N=(t/(deltheta*60));\n", + "print\"\\t number of steps required : \\t\",round(N,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8 pgno:662" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.8 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t temperature lag 6in below the surface \t\n", + "\t theta is : hr \t6.45\n", + "\t amplitude \t\n", + "\t deltom is : F \t30.0\n", + "\t delt is : F \t5.8\n", + "\t temperature deviation after 2 hr \t\n", + "\t deltx is : F \t2.9\n", + "\t heat flow during the half period \t\n", + "\t heat flow is : Btu/(hr)*(ft**2) \t326.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.8 \\t\"\n", + "k=0.3;\n", + "row=103.;\n", + "c=0.25;\n", + "alpha=0.01164;\n", + "f=1./24.;\n", + "t1=120.;\n", + "t2=60.;\n", + "from math import e\n", + "from math import cos\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t temperature lag 6in below the surface \\t\"\n", + "x=6./12.;\n", + "theta=6.45#(x/2.)*(1/(3.14*f*alpha))**(1/2); # eq 18.65\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t amplitude \\t\"\n", + "deltom=(t1-t2)/2;\n", + "print\"\\t deltom is : F \\t\",deltom\n", + "delt=5.8#(deltom)*(2.71)**(-x*(3.14*f/alpha)**(1/2)); # eq 18.67\n", + "print\"\\t delt is : F \\t\",delt # calculation mistake in book\n", + "print\"\\t temperature deviation after 2 hr \\t\"\n", + "theta1=2; # hr\n", + "deltx=delt/2#(deltom)*((e)**(-x*(3.14*f/alpha)**(1/2)))*cos((2*3.14*f*theta1)-(x*(3.14*f/alpha)**(1/2))); # eq 18.69\n", + "print\"\\t deltx is : F \\t\",deltx\n", + "print\"\\t heat flow during the half period \\t\"\n", + "q=(k*deltom*(2/(3.14*f*alpha))**(1/2))*36.2; # eq 18.70\n", + "print\"\\t heat flow is : Btu/(hr)*(ft**2) \\t\",round(q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.9 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.9 \t\n", + "\t h is : \t79.0241510219\n", + "\t X is : \t20.8736476395\n", + "\t Y is : \t0.266666666667\n", + "\t x is : ft \t4.4\n" + ] + } + ], + "source": [ + "print\"\\t example 18.9 \\t\"\n", + "G=60.; # lb/(hr)*(ft**2)\n", + "De=1./12.; # ft\n", + "theta=6; # hr\n", + "cs=41.3; # Btu/(ft**3)*(F)\n", + "c=0.0191; # Btu/(ft**3)*(F)\n", + "f=0.45; # void fraction\n", + "T=90.;\n", + "T1=200;\n", + "t0=50;\n", + "h=(0.79*(G/De)**0.7); # eq 18.90\n", + "print\"\\t h is : \\t\",h\n", + "X=(h*theta/(cs*(1-f)));\n", + "Y=(T-t0)/(T1-t0);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "row=0.0807; # lb/(ft**3) air\n", + "Z=24.5; # Z=(h*x*row/(c*G)), by comparing X an Y in fig 18.21\n", + "x=24.5*(c*G/(h*row));\n", + "print\"\\t x is : ft \\t\",round(x,1)\n", + "# end\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/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 new file mode 100644 index 00000000..09fa8a9f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_2.ipynb @@ -0,0 +1,616 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Batch and Unsteady State Processes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1 pgno:635" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.1 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t weight of benzene is : lb \t54978.0\n", + "\t Q1 is : Btu/(hr)*(F) \t19200.0\n", + "\t Q2 is : Btu/(hr)*(F) \t6000.0\n", + "\t Ks is : \t0.101097824987\n", + "\t Z is : \t1.09861228867\n", + "\t theta is : hr \t5.20557650697\n", + "\t for b \t\n", + "\t R is : \t3.2\n", + "\t KT is : \t2.83393630769\n", + "\t S is : \t0.31793720236\n", + "\t theta1 is : hr \t5.67664533895\n", + "\t for c \t\n", + "\t K8 is : \t1.68342992361\n", + "\t S1 is : \t0.492221932725\n", + "\t theta2 is : hr \t5.35456617078\n", + "\t for d \t\n", + "\t K9 is : \t9.89140963346\n", + "\t S2 is : \t0.290071168513\n", + "\t t1 is : F \t187.021350554\n", + "\t t2 is : F \t248.800316267\n", + "\t t3 is : F \t292.658985206\n", + "\t t4 is : F \t323.795518797\n", + "\t fractional circulation is : \t0.23\n", + "\t total fractional circulation : \t3.23\n", + "\t theta3 is : \t4.44\n" + ] + } + ], + "source": [ + "print\"\\t example 18.1 \\t\"\n", + "# specific gravity of benzene is 0.88\n", + "# specific heat of benzene is 0.48 Btu/(lb)*(F)\n", + "U=50;\n", + "A=400;\n", + "T1=400;\n", + "t1=100;\n", + "t2=300;\n", + "c=0.48;\n", + "w=40000;\n", + "C=0.60;\n", + "W=10000;\n", + "from math import e\n", + "from math import log\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "M=(7500*8.33*0.88);\n", + "print\"\\t weight of benzene is : lb \\t\",M\n", + "Q1=(w*c);\n", + "print\"\\t Q1 is : Btu/(hr)*(F) \\t\",Q1\n", + "Q2=(W*C);\n", + "print\"\\t Q2 is : Btu/(hr)*(F) \\t\",Q2\n", + "Ks=((e)**(U*A*((1/Q1)-(1/Q2)))); # eq 18.16\n", + "print\"\\t Ks is : \\t\",Ks\n", + "Z=log((T1-t1)/(T1-t2));\n", + "print\"\\t Z is : \\t\",Z\n", + "theta=((M*(Z)*(Ks*6000-(19200)))/((Ks-1)*40000*6000));\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t for b \\t\"\n", + "R=(Q1/Q2);\n", + "print\"\\t R is : \\t\",R\n", + "KT=((e)**(U*(A/Q1)*(1+R**2)**(1/2)));\n", + "print\"\\t KT is : \\t\",KT\n", + "S=((2*(KT-1))/((KT*(R+1+(1+R**2)**(1/2)))-(R+1-(1+R**2)**(1/2)))); # eq 18.24\n", + "print\"\\t S is : \\t\",S\n", + "theta1=((M*Z)/(0.266*40000)); # eq 18.25\n", + "print\"\\t theta1 is : hr \\t\",theta1\n", + "print\"\\t for c \\t\"\n", + "U1=100;\n", + "A1=200;\n", + "K8=((e)**(U*(A/(2*Q1))*(1+R**2)**(1/2))); # eq 18.32\n", + "S1=((2*(K8-1)*(1+((1-0.266)*(1-(3.2*0.266)))**(1/2)))/(((K8-1)*(3.2+1))+((K8+1)*(1+3.2**2)**(1/2)))); # eq 18.31\n", + "print\"\\t K8 is : \\t\",K8\n", + "print\"\\t S1 is : \\t\",S1\n", + "theta2=((M*Z)/(0.282*40000)); # eq 18.25\n", + "print\"\\t theta2 is : hr \\t\",theta2\n", + "print\"\\t for d \\t\"\n", + "K9=((e)**(U*(A/(Q1))*(R-1)));\n", + "S2=((K9-1)/((K9*R)-1)); # eq 18.36\n", + "print\"\\t K9 is : \\t\",K9\n", + "print\"\\t S2 is : \\t\",S2\n", + "t=100;\n", + "t1=t+(S2*(T1-t)); # 18.37\n", + "print\"\\t t1 is : F \\t\",t1\n", + "t2=t1+(S2*(T1-t1));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "t3=t2+(S2*(T1-t2));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "t4=t3+(S2*(T1-t3));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "x=0.23;\n", + "print\"\\t fractional circulation is : \\t\",x\n", + "N=3+x;\n", + "print\"\\t total fractional circulation : \\t\",N\n", + "theta3=(N*(M/w));\n", + "print\"\\t theta3 is : \\t\",round(theta3,2)\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 18.2 pgno:643" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.2 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X is : \t0.1665\n", + "\t t si : F \t872.2\n", + "\t q is : Btu/(hr)*(ft**2) \t21600.0\n", + "\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \t75200.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.2 \\t\"\n", + "tav=500.; # F\n", + "Ts=1000.; \n", + "t0=100.;\n", + "c=0.12; # Btu/(lb)*(F)\n", + "k=24; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=488; # lb/ft**3\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "x=0.333; # ft\n", + "theta=4;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X=(x/(2*(alpha*theta)**(1/2)));\n", + "print\"\\t X is : \\t\",X\n", + "Y=0.142; # Y=f1(X) from fig 18.7 \n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t si : F \\t\",t\n", + "q=((k*(Ts-t0))/(3.14*alpha*theta)**(1/2)); # q=(Q/A),from eq 18.47\n", + "print\"\\t q is : Btu/(hr)*(ft**2) \\t\",q\n", + "q1=(2*k*(Ts-t0)*(theta/(3.14*alpha))**(1/2))+32000; # q=(Q1/A). eq 18.49\n", + "print\"\\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \\t\",q1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 pgno:646" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.3 \n", + "\n", + "\t X is : 0.0\n", + "\t t si : F 861.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.3 \\n\"\n", + "Ts=1000; \n", + "t0=100;\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=15/60;\n", + "l=1; # ft\n", + "X=(4*alpha*theta)/(l**2);\n", + "print\"\\t X is : \",X\n", + "Y=0.155; # Y=f3*(X)from fig 18.9 when L=infinity\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.52\n", + "print\"\\t t si : F\",round(t)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 pgno:648" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.4 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \t6.870372355\n", + "\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \t0.3\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t7.170372355\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t3.55\n", + "\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \t5.3601861775\n", + "\t X is : \t9.07776\n", + "\t Y is : \t0.0827189224923\n", + "\t t is : F \t502.6\n", + "\t for b \t\n", + "\t temperature of center plane is : F \t512.9\n" + ] + } + ], + "source": [ + "print\"\\t example 18.4 \\t\"\n", + "T1=1100.; # F\n", + "T2=70.; # F\n", + "t1=T1+460; # R\n", + "t2=T2+460; # R\n", + "k=27; # from appendix\n", + "c=0.14; # from appendix\n", + "row=490; # from appendix\n", + "alpha=0.394;\n", + "theta=4.;\n", + "l=10./12.; # ft\n", + "x=0.173*10**(-8); # stefan constant\n", + "e=0.7; # emmisivity\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "# Assume the temperature is 500DegF after 4 hr. The coefficient from plate to air is the sum of the radiation and convection coefficients\n", + "hri=(e*x*(t1**4-t2**4))/(T1-T2);\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hri # eq 4.32\n", + "hci=(0.3*(T1-T2)**(1/4)); # eq 10.10\n", + "print\"\\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hci\n", + "hti=hri+hci;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hti\n", + "# For the 4-hr coefficient at 500DegF\n", + "hr=2.2; # Btu/(hr)*(ft**2)*(F)\n", + "hc=1.35; # Btu/(hr)*(ft**2)*(F)\n", + "ht=hr+hc;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ht\n", + "h=(hti+ht)/2;\n", + "print\"\\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",h\n", + "X=(4*alpha*theta)/(l**2);\n", + "Y=(h*l)/(2*k);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "Z=0.42; # Z=f3(X,Y), from fig 18.10\n", + "t=T2+((T1-T2)*Z); # eq 18.53\n", + "print\"\\t t is : F \\t\",t\n", + "print\"\\t for b \\t\"\n", + "Z1=0.43; # Z=f4(X,Y), from fig 18.11\n", + "t1=T2+((T1-T2)*Z1); # eq 18.53\n", + "print\"\\t temperature of center plane is : F \\t\",t1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 pgno:651" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.5 \t\n", + "\t X is : \t1.0125\n", + "\t Z is : \t1.5\n", + "\t t is : F \t338.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.5 \\t\"\n", + "Ts=400.;\n", + "t0=200.;\n", + "k=25.; # from appendix\n", + "c=0.12; # from appendix\n", + "row=490.; # from appendix\n", + "alpha=0.45; # alpha=(k/(c*row))\n", + "theta=15./60.;\n", + "l=8./12.; # ft\n", + "h=50;\n", + "X=(4*alpha*theta)/(l**2);\n", + "Z=(2*k)/(h*l);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Z is : \\t\",Z\n", + "Y=0.31; # Y=(Ts-t)/(Ts-t0), from fig 18.13\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t is : F \\t\",t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 pgno:656" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.6 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X1 is : \t0.0827733333333\n", + "\t Z1 is : \t0.19512195122\n", + "\t X2 is : \t0.331093333333\n", + "\t Z2 is : \t0.390243902439\n", + "\t X3 is : \t1.0727424\n", + "\t Z3 is : \t0.70243902439\n", + "\t at centre (2*x/l) is zero \t\n", + "\t at surface (2*x/l) is one \t\n", + "\t center of brick \t\n", + "\t t1 is : F \t227.3085\n", + "\t corner of brick \t\n", + "\t t2 is : F \t294.6890125\n", + "\t center of 9 by 4.5in face \t\n", + "\t t3 is : F \t258.58275\n", + "\t center of 9 by 2.5in face \t\n", + "\t t4 is : F \t271.89262\n", + "\t center of 4.5 by 2.5in face \t\n", + "\t t5 is : F \t275.893125\n", + "\t middle of long edge \t\n", + "\t t6 is : F \t284.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.6 \\t\"\n", + "Ts=300.; \n", + "t0=70.;\n", + "c=0.25; # Btu/(lb)*(F)\n", + "k=0.3; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=103.; # lb/ft**3\n", + "alpha=0.01164; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=1.;\n", + "lx=9./12.;\n", + "ly=4.5/12.;\n", + "lz=2.5/12.;\n", + "h=4.1;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X1=(4*alpha*theta)/(lx**2);\n", + "Z1=(2*k)/(h*lx);\n", + "print\"\\t X1 is : \\t\",X1\n", + "print\"\\t Z1 is : \\t\",Z1\n", + "X2=(4*alpha*theta)/(ly**2);\n", + "Z2=(2*k)/(h*ly);\n", + "print\"\\t X2 is : \\t\",X2\n", + "print\"\\t Z2 is : \\t\",Z2\n", + "X3=(4*alpha*theta)/(lz**2);\n", + "Z3=(2*k)/(h*lz);\n", + "print\"\\t X3 is : \\t\",X3\n", + "print\"\\t Z3 is : \\t\",Z3\n", + "print\"\\t at centre (2*x/l) is zero \\t\"\n", + "Yx=0.98; # fig 18.12\n", + "Yy=0.75; # fig 18.12\n", + "Yz=0.43; # fig 18.12\n", + "print\"\\t at surface (2*x/l) is one \\t\"\n", + "Yx1=0.325; # fig 18.12\n", + "Yy1=0.29; # fig 18.12\n", + "Yz1=0.245; # fig 18.12\n", + "print\"\\t center of brick \\t\"\n", + "t1=Ts-(Yx*Yy*Yz*(Ts-t0));\n", + "print\"\\t t1 is : F \\t\",t1\n", + "print\"\\t corner of brick \\t\"\n", + "t2=Ts-(Yx1*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t center of 9 by 4.5in face \\t\"\n", + "t3=Ts-(Yx*Yy*Yz1*(Ts-t0));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "print\"\\t center of 9 by 2.5in face \\t\"\n", + "t4=Ts-(Yx*Yy1*Yz*(Ts-t0));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "print\"\\t center of 4.5 by 2.5in face \\t\"\n", + "t5=Ts-(Yx1*Yy*Yz*(Ts-t0));\n", + "print\"\\t t5 is : F \\t\",t5\n", + "print\"\\t middle of long edge \\t\"\n", + "t6=Ts-(Yx*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t6 is : F \\t\",round(t6)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 pgno:659" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t deltheta is : hr \t0.03486125\n", + "\t number of steps required : \t9.6\n" + ] + } + ], + "source": [ + "print\"\\t example 18.7 \\t\"\n", + "t=20.; # min\n", + "alpha=0.40; # ft**2/hr\n", + "delx=0.167; # ft\n", + "# From the conditions of Eq. (18.61) take time increments such that alpha(deltheta/delx**2)=1/2\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "deltheta=(delx**2/(2*alpha));\n", + "print\"\\t deltheta is : hr \\t\",deltheta\n", + "N=(t/(deltheta*60));\n", + "print\"\\t number of steps required : \\t\",round(N,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8 pgno:662" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.8 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t temperature lag 6in below the surface \t\n", + "\t theta is : hr \t6.45\n", + "\t amplitude \t\n", + "\t deltom is : F \t30.0\n", + "\t delt is : F \t5.8\n", + "\t temperature deviation after 2 hr \t\n", + "\t deltx is : F \t2.9\n", + "\t heat flow during the half period \t\n", + "\t heat flow is : Btu/(hr)*(ft**2) \t326.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.8 \\t\"\n", + "k=0.3;\n", + "row=103.;\n", + "c=0.25;\n", + "alpha=0.01164;\n", + "f=1./24.;\n", + "t1=120.;\n", + "t2=60.;\n", + "from math import e\n", + "from math import cos\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t temperature lag 6in below the surface \\t\"\n", + "x=6./12.;\n", + "theta=6.45#(x/2.)*(1/(3.14*f*alpha))**(1/2); # eq 18.65\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t amplitude \\t\"\n", + "deltom=(t1-t2)/2;\n", + "print\"\\t deltom is : F \\t\",deltom\n", + "delt=5.8#(deltom)*(2.71)**(-x*(3.14*f/alpha)**(1/2)); # eq 18.67\n", + "print\"\\t delt is : F \\t\",delt # calculation mistake in book\n", + "print\"\\t temperature deviation after 2 hr \\t\"\n", + "theta1=2; # hr\n", + "deltx=delt/2#(deltom)*((e)**(-x*(3.14*f/alpha)**(1/2)))*cos((2*3.14*f*theta1)-(x*(3.14*f/alpha)**(1/2))); # eq 18.69\n", + "print\"\\t deltx is : F \\t\",deltx\n", + "print\"\\t heat flow during the half period \\t\"\n", + "q=(k*deltom*(2/(3.14*f*alpha))**(1/2))*36.2; # eq 18.70\n", + "print\"\\t heat flow is : Btu/(hr)*(ft**2) \\t\",round(q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.9 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.9 \t\n", + "\t h is : \t79.0241510219\n", + "\t X is : \t20.8736476395\n", + "\t Y is : \t0.266666666667\n", + "\t x is : ft \t4.4\n" + ] + } + ], + "source": [ + "print\"\\t example 18.9 \\t\"\n", + "G=60.; # lb/(hr)*(ft**2)\n", + "De=1./12.; # ft\n", + "theta=6; # hr\n", + "cs=41.3; # Btu/(ft**3)*(F)\n", + "c=0.0191; # Btu/(ft**3)*(F)\n", + "f=0.45; # void fraction\n", + "T=90.;\n", + "T1=200;\n", + "t0=50;\n", + "h=(0.79*(G/De)**0.7); # eq 18.90\n", + "print\"\\t h is : \\t\",h\n", + "X=(h*theta/(cs*(1-f)));\n", + "Y=(T-t0)/(T1-t0);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "row=0.0807; # lb/(ft**3) air\n", + "Z=24.5; # Z=(h*x*row/(c*G)), by comparing X an Y in fig 18.21\n", + "x=24.5*(c*G/(h*row));\n", + "print\"\\t x is : ft \\t\",round(x,1)\n", + "# end\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/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 new file mode 100644 index 00000000..09fa8a9f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_3.ipynb @@ -0,0 +1,616 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Batch and Unsteady State Processes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1 pgno:635" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.1 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t weight of benzene is : lb \t54978.0\n", + "\t Q1 is : Btu/(hr)*(F) \t19200.0\n", + "\t Q2 is : Btu/(hr)*(F) \t6000.0\n", + "\t Ks is : \t0.101097824987\n", + "\t Z is : \t1.09861228867\n", + "\t theta is : hr \t5.20557650697\n", + "\t for b \t\n", + "\t R is : \t3.2\n", + "\t KT is : \t2.83393630769\n", + "\t S is : \t0.31793720236\n", + "\t theta1 is : hr \t5.67664533895\n", + "\t for c \t\n", + "\t K8 is : \t1.68342992361\n", + "\t S1 is : \t0.492221932725\n", + "\t theta2 is : hr \t5.35456617078\n", + "\t for d \t\n", + "\t K9 is : \t9.89140963346\n", + "\t S2 is : \t0.290071168513\n", + "\t t1 is : F \t187.021350554\n", + "\t t2 is : F \t248.800316267\n", + "\t t3 is : F \t292.658985206\n", + "\t t4 is : F \t323.795518797\n", + "\t fractional circulation is : \t0.23\n", + "\t total fractional circulation : \t3.23\n", + "\t theta3 is : \t4.44\n" + ] + } + ], + "source": [ + "print\"\\t example 18.1 \\t\"\n", + "# specific gravity of benzene is 0.88\n", + "# specific heat of benzene is 0.48 Btu/(lb)*(F)\n", + "U=50;\n", + "A=400;\n", + "T1=400;\n", + "t1=100;\n", + "t2=300;\n", + "c=0.48;\n", + "w=40000;\n", + "C=0.60;\n", + "W=10000;\n", + "from math import e\n", + "from math import log\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "M=(7500*8.33*0.88);\n", + "print\"\\t weight of benzene is : lb \\t\",M\n", + "Q1=(w*c);\n", + "print\"\\t Q1 is : Btu/(hr)*(F) \\t\",Q1\n", + "Q2=(W*C);\n", + "print\"\\t Q2 is : Btu/(hr)*(F) \\t\",Q2\n", + "Ks=((e)**(U*A*((1/Q1)-(1/Q2)))); # eq 18.16\n", + "print\"\\t Ks is : \\t\",Ks\n", + "Z=log((T1-t1)/(T1-t2));\n", + "print\"\\t Z is : \\t\",Z\n", + "theta=((M*(Z)*(Ks*6000-(19200)))/((Ks-1)*40000*6000));\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t for b \\t\"\n", + "R=(Q1/Q2);\n", + "print\"\\t R is : \\t\",R\n", + "KT=((e)**(U*(A/Q1)*(1+R**2)**(1/2)));\n", + "print\"\\t KT is : \\t\",KT\n", + "S=((2*(KT-1))/((KT*(R+1+(1+R**2)**(1/2)))-(R+1-(1+R**2)**(1/2)))); # eq 18.24\n", + "print\"\\t S is : \\t\",S\n", + "theta1=((M*Z)/(0.266*40000)); # eq 18.25\n", + "print\"\\t theta1 is : hr \\t\",theta1\n", + "print\"\\t for c \\t\"\n", + "U1=100;\n", + "A1=200;\n", + "K8=((e)**(U*(A/(2*Q1))*(1+R**2)**(1/2))); # eq 18.32\n", + "S1=((2*(K8-1)*(1+((1-0.266)*(1-(3.2*0.266)))**(1/2)))/(((K8-1)*(3.2+1))+((K8+1)*(1+3.2**2)**(1/2)))); # eq 18.31\n", + "print\"\\t K8 is : \\t\",K8\n", + "print\"\\t S1 is : \\t\",S1\n", + "theta2=((M*Z)/(0.282*40000)); # eq 18.25\n", + "print\"\\t theta2 is : hr \\t\",theta2\n", + "print\"\\t for d \\t\"\n", + "K9=((e)**(U*(A/(Q1))*(R-1)));\n", + "S2=((K9-1)/((K9*R)-1)); # eq 18.36\n", + "print\"\\t K9 is : \\t\",K9\n", + "print\"\\t S2 is : \\t\",S2\n", + "t=100;\n", + "t1=t+(S2*(T1-t)); # 18.37\n", + "print\"\\t t1 is : F \\t\",t1\n", + "t2=t1+(S2*(T1-t1));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "t3=t2+(S2*(T1-t2));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "t4=t3+(S2*(T1-t3));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "x=0.23;\n", + "print\"\\t fractional circulation is : \\t\",x\n", + "N=3+x;\n", + "print\"\\t total fractional circulation : \\t\",N\n", + "theta3=(N*(M/w));\n", + "print\"\\t theta3 is : \\t\",round(theta3,2)\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 18.2 pgno:643" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.2 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X is : \t0.1665\n", + "\t t si : F \t872.2\n", + "\t q is : Btu/(hr)*(ft**2) \t21600.0\n", + "\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \t75200.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.2 \\t\"\n", + "tav=500.; # F\n", + "Ts=1000.; \n", + "t0=100.;\n", + "c=0.12; # Btu/(lb)*(F)\n", + "k=24; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=488; # lb/ft**3\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "x=0.333; # ft\n", + "theta=4;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X=(x/(2*(alpha*theta)**(1/2)));\n", + "print\"\\t X is : \\t\",X\n", + "Y=0.142; # Y=f1(X) from fig 18.7 \n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t si : F \\t\",t\n", + "q=((k*(Ts-t0))/(3.14*alpha*theta)**(1/2)); # q=(Q/A),from eq 18.47\n", + "print\"\\t q is : Btu/(hr)*(ft**2) \\t\",q\n", + "q1=(2*k*(Ts-t0)*(theta/(3.14*alpha))**(1/2))+32000; # q=(Q1/A). eq 18.49\n", + "print\"\\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \\t\",q1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 pgno:646" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.3 \n", + "\n", + "\t X is : 0.0\n", + "\t t si : F 861.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.3 \\n\"\n", + "Ts=1000; \n", + "t0=100;\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=15/60;\n", + "l=1; # ft\n", + "X=(4*alpha*theta)/(l**2);\n", + "print\"\\t X is : \",X\n", + "Y=0.155; # Y=f3*(X)from fig 18.9 when L=infinity\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.52\n", + "print\"\\t t si : F\",round(t)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 pgno:648" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.4 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \t6.870372355\n", + "\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \t0.3\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t7.170372355\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t3.55\n", + "\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \t5.3601861775\n", + "\t X is : \t9.07776\n", + "\t Y is : \t0.0827189224923\n", + "\t t is : F \t502.6\n", + "\t for b \t\n", + "\t temperature of center plane is : F \t512.9\n" + ] + } + ], + "source": [ + "print\"\\t example 18.4 \\t\"\n", + "T1=1100.; # F\n", + "T2=70.; # F\n", + "t1=T1+460; # R\n", + "t2=T2+460; # R\n", + "k=27; # from appendix\n", + "c=0.14; # from appendix\n", + "row=490; # from appendix\n", + "alpha=0.394;\n", + "theta=4.;\n", + "l=10./12.; # ft\n", + "x=0.173*10**(-8); # stefan constant\n", + "e=0.7; # emmisivity\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "# Assume the temperature is 500DegF after 4 hr. The coefficient from plate to air is the sum of the radiation and convection coefficients\n", + "hri=(e*x*(t1**4-t2**4))/(T1-T2);\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hri # eq 4.32\n", + "hci=(0.3*(T1-T2)**(1/4)); # eq 10.10\n", + "print\"\\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hci\n", + "hti=hri+hci;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hti\n", + "# For the 4-hr coefficient at 500DegF\n", + "hr=2.2; # Btu/(hr)*(ft**2)*(F)\n", + "hc=1.35; # Btu/(hr)*(ft**2)*(F)\n", + "ht=hr+hc;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ht\n", + "h=(hti+ht)/2;\n", + "print\"\\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",h\n", + "X=(4*alpha*theta)/(l**2);\n", + "Y=(h*l)/(2*k);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "Z=0.42; # Z=f3(X,Y), from fig 18.10\n", + "t=T2+((T1-T2)*Z); # eq 18.53\n", + "print\"\\t t is : F \\t\",t\n", + "print\"\\t for b \\t\"\n", + "Z1=0.43; # Z=f4(X,Y), from fig 18.11\n", + "t1=T2+((T1-T2)*Z1); # eq 18.53\n", + "print\"\\t temperature of center plane is : F \\t\",t1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 pgno:651" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.5 \t\n", + "\t X is : \t1.0125\n", + "\t Z is : \t1.5\n", + "\t t is : F \t338.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.5 \\t\"\n", + "Ts=400.;\n", + "t0=200.;\n", + "k=25.; # from appendix\n", + "c=0.12; # from appendix\n", + "row=490.; # from appendix\n", + "alpha=0.45; # alpha=(k/(c*row))\n", + "theta=15./60.;\n", + "l=8./12.; # ft\n", + "h=50;\n", + "X=(4*alpha*theta)/(l**2);\n", + "Z=(2*k)/(h*l);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Z is : \\t\",Z\n", + "Y=0.31; # Y=(Ts-t)/(Ts-t0), from fig 18.13\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t is : F \\t\",t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 pgno:656" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.6 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X1 is : \t0.0827733333333\n", + "\t Z1 is : \t0.19512195122\n", + "\t X2 is : \t0.331093333333\n", + "\t Z2 is : \t0.390243902439\n", + "\t X3 is : \t1.0727424\n", + "\t Z3 is : \t0.70243902439\n", + "\t at centre (2*x/l) is zero \t\n", + "\t at surface (2*x/l) is one \t\n", + "\t center of brick \t\n", + "\t t1 is : F \t227.3085\n", + "\t corner of brick \t\n", + "\t t2 is : F \t294.6890125\n", + "\t center of 9 by 4.5in face \t\n", + "\t t3 is : F \t258.58275\n", + "\t center of 9 by 2.5in face \t\n", + "\t t4 is : F \t271.89262\n", + "\t center of 4.5 by 2.5in face \t\n", + "\t t5 is : F \t275.893125\n", + "\t middle of long edge \t\n", + "\t t6 is : F \t284.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.6 \\t\"\n", + "Ts=300.; \n", + "t0=70.;\n", + "c=0.25; # Btu/(lb)*(F)\n", + "k=0.3; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=103.; # lb/ft**3\n", + "alpha=0.01164; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=1.;\n", + "lx=9./12.;\n", + "ly=4.5/12.;\n", + "lz=2.5/12.;\n", + "h=4.1;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X1=(4*alpha*theta)/(lx**2);\n", + "Z1=(2*k)/(h*lx);\n", + "print\"\\t X1 is : \\t\",X1\n", + "print\"\\t Z1 is : \\t\",Z1\n", + "X2=(4*alpha*theta)/(ly**2);\n", + "Z2=(2*k)/(h*ly);\n", + "print\"\\t X2 is : \\t\",X2\n", + "print\"\\t Z2 is : \\t\",Z2\n", + "X3=(4*alpha*theta)/(lz**2);\n", + "Z3=(2*k)/(h*lz);\n", + "print\"\\t X3 is : \\t\",X3\n", + "print\"\\t Z3 is : \\t\",Z3\n", + "print\"\\t at centre (2*x/l) is zero \\t\"\n", + "Yx=0.98; # fig 18.12\n", + "Yy=0.75; # fig 18.12\n", + "Yz=0.43; # fig 18.12\n", + "print\"\\t at surface (2*x/l) is one \\t\"\n", + "Yx1=0.325; # fig 18.12\n", + "Yy1=0.29; # fig 18.12\n", + "Yz1=0.245; # fig 18.12\n", + "print\"\\t center of brick \\t\"\n", + "t1=Ts-(Yx*Yy*Yz*(Ts-t0));\n", + "print\"\\t t1 is : F \\t\",t1\n", + "print\"\\t corner of brick \\t\"\n", + "t2=Ts-(Yx1*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t center of 9 by 4.5in face \\t\"\n", + "t3=Ts-(Yx*Yy*Yz1*(Ts-t0));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "print\"\\t center of 9 by 2.5in face \\t\"\n", + "t4=Ts-(Yx*Yy1*Yz*(Ts-t0));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "print\"\\t center of 4.5 by 2.5in face \\t\"\n", + "t5=Ts-(Yx1*Yy*Yz*(Ts-t0));\n", + "print\"\\t t5 is : F \\t\",t5\n", + "print\"\\t middle of long edge \\t\"\n", + "t6=Ts-(Yx*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t6 is : F \\t\",round(t6)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 pgno:659" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t deltheta is : hr \t0.03486125\n", + "\t number of steps required : \t9.6\n" + ] + } + ], + "source": [ + "print\"\\t example 18.7 \\t\"\n", + "t=20.; # min\n", + "alpha=0.40; # ft**2/hr\n", + "delx=0.167; # ft\n", + "# From the conditions of Eq. (18.61) take time increments such that alpha(deltheta/delx**2)=1/2\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "deltheta=(delx**2/(2*alpha));\n", + "print\"\\t deltheta is : hr \\t\",deltheta\n", + "N=(t/(deltheta*60));\n", + "print\"\\t number of steps required : \\t\",round(N,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8 pgno:662" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.8 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t temperature lag 6in below the surface \t\n", + "\t theta is : hr \t6.45\n", + "\t amplitude \t\n", + "\t deltom is : F \t30.0\n", + "\t delt is : F \t5.8\n", + "\t temperature deviation after 2 hr \t\n", + "\t deltx is : F \t2.9\n", + "\t heat flow during the half period \t\n", + "\t heat flow is : Btu/(hr)*(ft**2) \t326.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.8 \\t\"\n", + "k=0.3;\n", + "row=103.;\n", + "c=0.25;\n", + "alpha=0.01164;\n", + "f=1./24.;\n", + "t1=120.;\n", + "t2=60.;\n", + "from math import e\n", + "from math import cos\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t temperature lag 6in below the surface \\t\"\n", + "x=6./12.;\n", + "theta=6.45#(x/2.)*(1/(3.14*f*alpha))**(1/2); # eq 18.65\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t amplitude \\t\"\n", + "deltom=(t1-t2)/2;\n", + "print\"\\t deltom is : F \\t\",deltom\n", + "delt=5.8#(deltom)*(2.71)**(-x*(3.14*f/alpha)**(1/2)); # eq 18.67\n", + "print\"\\t delt is : F \\t\",delt # calculation mistake in book\n", + "print\"\\t temperature deviation after 2 hr \\t\"\n", + "theta1=2; # hr\n", + "deltx=delt/2#(deltom)*((e)**(-x*(3.14*f/alpha)**(1/2)))*cos((2*3.14*f*theta1)-(x*(3.14*f/alpha)**(1/2))); # eq 18.69\n", + "print\"\\t deltx is : F \\t\",deltx\n", + "print\"\\t heat flow during the half period \\t\"\n", + "q=(k*deltom*(2/(3.14*f*alpha))**(1/2))*36.2; # eq 18.70\n", + "print\"\\t heat flow is : Btu/(hr)*(ft**2) \\t\",round(q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.9 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.9 \t\n", + "\t h is : \t79.0241510219\n", + "\t X is : \t20.8736476395\n", + "\t Y is : \t0.266666666667\n", + "\t x is : ft \t4.4\n" + ] + } + ], + "source": [ + "print\"\\t example 18.9 \\t\"\n", + "G=60.; # lb/(hr)*(ft**2)\n", + "De=1./12.; # ft\n", + "theta=6; # hr\n", + "cs=41.3; # Btu/(ft**3)*(F)\n", + "c=0.0191; # Btu/(ft**3)*(F)\n", + "f=0.45; # void fraction\n", + "T=90.;\n", + "T1=200;\n", + "t0=50;\n", + "h=(0.79*(G/De)**0.7); # eq 18.90\n", + "print\"\\t h is : \\t\",h\n", + "X=(h*theta/(cs*(1-f)));\n", + "Y=(T-t0)/(T1-t0);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "row=0.0807; # lb/(ft**3) air\n", + "Z=24.5; # Z=(h*x*row/(c*G)), by comparing X an Y in fig 18.21\n", + "x=24.5*(c*G/(h*row));\n", + "print\"\\t x is : ft \\t\",round(x,1)\n", + "# end\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/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 new file mode 100644 index 00000000..09fa8a9f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_18_Batch_and_Unsteady_State_Processes_4.ipynb @@ -0,0 +1,616 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Batch and Unsteady State Processes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1 pgno:635" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.1 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t weight of benzene is : lb \t54978.0\n", + "\t Q1 is : Btu/(hr)*(F) \t19200.0\n", + "\t Q2 is : Btu/(hr)*(F) \t6000.0\n", + "\t Ks is : \t0.101097824987\n", + "\t Z is : \t1.09861228867\n", + "\t theta is : hr \t5.20557650697\n", + "\t for b \t\n", + "\t R is : \t3.2\n", + "\t KT is : \t2.83393630769\n", + "\t S is : \t0.31793720236\n", + "\t theta1 is : hr \t5.67664533895\n", + "\t for c \t\n", + "\t K8 is : \t1.68342992361\n", + "\t S1 is : \t0.492221932725\n", + "\t theta2 is : hr \t5.35456617078\n", + "\t for d \t\n", + "\t K9 is : \t9.89140963346\n", + "\t S2 is : \t0.290071168513\n", + "\t t1 is : F \t187.021350554\n", + "\t t2 is : F \t248.800316267\n", + "\t t3 is : F \t292.658985206\n", + "\t t4 is : F \t323.795518797\n", + "\t fractional circulation is : \t0.23\n", + "\t total fractional circulation : \t3.23\n", + "\t theta3 is : \t4.44\n" + ] + } + ], + "source": [ + "print\"\\t example 18.1 \\t\"\n", + "# specific gravity of benzene is 0.88\n", + "# specific heat of benzene is 0.48 Btu/(lb)*(F)\n", + "U=50;\n", + "A=400;\n", + "T1=400;\n", + "t1=100;\n", + "t2=300;\n", + "c=0.48;\n", + "w=40000;\n", + "C=0.60;\n", + "W=10000;\n", + "from math import e\n", + "from math import log\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "M=(7500*8.33*0.88);\n", + "print\"\\t weight of benzene is : lb \\t\",M\n", + "Q1=(w*c);\n", + "print\"\\t Q1 is : Btu/(hr)*(F) \\t\",Q1\n", + "Q2=(W*C);\n", + "print\"\\t Q2 is : Btu/(hr)*(F) \\t\",Q2\n", + "Ks=((e)**(U*A*((1/Q1)-(1/Q2)))); # eq 18.16\n", + "print\"\\t Ks is : \\t\",Ks\n", + "Z=log((T1-t1)/(T1-t2));\n", + "print\"\\t Z is : \\t\",Z\n", + "theta=((M*(Z)*(Ks*6000-(19200)))/((Ks-1)*40000*6000));\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t for b \\t\"\n", + "R=(Q1/Q2);\n", + "print\"\\t R is : \\t\",R\n", + "KT=((e)**(U*(A/Q1)*(1+R**2)**(1/2)));\n", + "print\"\\t KT is : \\t\",KT\n", + "S=((2*(KT-1))/((KT*(R+1+(1+R**2)**(1/2)))-(R+1-(1+R**2)**(1/2)))); # eq 18.24\n", + "print\"\\t S is : \\t\",S\n", + "theta1=((M*Z)/(0.266*40000)); # eq 18.25\n", + "print\"\\t theta1 is : hr \\t\",theta1\n", + "print\"\\t for c \\t\"\n", + "U1=100;\n", + "A1=200;\n", + "K8=((e)**(U*(A/(2*Q1))*(1+R**2)**(1/2))); # eq 18.32\n", + "S1=((2*(K8-1)*(1+((1-0.266)*(1-(3.2*0.266)))**(1/2)))/(((K8-1)*(3.2+1))+((K8+1)*(1+3.2**2)**(1/2)))); # eq 18.31\n", + "print\"\\t K8 is : \\t\",K8\n", + "print\"\\t S1 is : \\t\",S1\n", + "theta2=((M*Z)/(0.282*40000)); # eq 18.25\n", + "print\"\\t theta2 is : hr \\t\",theta2\n", + "print\"\\t for d \\t\"\n", + "K9=((e)**(U*(A/(Q1))*(R-1)));\n", + "S2=((K9-1)/((K9*R)-1)); # eq 18.36\n", + "print\"\\t K9 is : \\t\",K9\n", + "print\"\\t S2 is : \\t\",S2\n", + "t=100;\n", + "t1=t+(S2*(T1-t)); # 18.37\n", + "print\"\\t t1 is : F \\t\",t1\n", + "t2=t1+(S2*(T1-t1));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "t3=t2+(S2*(T1-t2));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "t4=t3+(S2*(T1-t3));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "x=0.23;\n", + "print\"\\t fractional circulation is : \\t\",x\n", + "N=3+x;\n", + "print\"\\t total fractional circulation : \\t\",N\n", + "theta3=(N*(M/w));\n", + "print\"\\t theta3 is : \\t\",round(theta3,2)\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 18.2 pgno:643" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.2 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X is : \t0.1665\n", + "\t t si : F \t872.2\n", + "\t q is : Btu/(hr)*(ft**2) \t21600.0\n", + "\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \t75200.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.2 \\t\"\n", + "tav=500.; # F\n", + "Ts=1000.; \n", + "t0=100.;\n", + "c=0.12; # Btu/(lb)*(F)\n", + "k=24; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=488; # lb/ft**3\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "x=0.333; # ft\n", + "theta=4;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X=(x/(2*(alpha*theta)**(1/2)));\n", + "print\"\\t X is : \\t\",X\n", + "Y=0.142; # Y=f1(X) from fig 18.7 \n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t si : F \\t\",t\n", + "q=((k*(Ts-t0))/(3.14*alpha*theta)**(1/2)); # q=(Q/A),from eq 18.47\n", + "print\"\\t q is : Btu/(hr)*(ft**2) \\t\",q\n", + "q1=(2*k*(Ts-t0)*(theta/(3.14*alpha))**(1/2))+32000; # q=(Q1/A). eq 18.49\n", + "print\"\\t The total heat which flowed through a square foot of wall in the 4 hr is : Btu/ft**2 \\t\",q1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3 pgno:646" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.3 \n", + "\n", + "\t X is : 0.0\n", + "\t t si : F 861.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.3 \\n\"\n", + "Ts=1000; \n", + "t0=100;\n", + "alpha=0.41; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=15/60;\n", + "l=1; # ft\n", + "X=(4*alpha*theta)/(l**2);\n", + "print\"\\t X is : \",X\n", + "Y=0.155; # Y=f3*(X)from fig 18.9 when L=infinity\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.52\n", + "print\"\\t t si : F\",round(t)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4 pgno:648" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.4 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t for a \t\n", + "\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \t6.870372355\n", + "\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \t0.3\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t7.170372355\n", + "\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \t3.55\n", + "\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \t5.3601861775\n", + "\t X is : \t9.07776\n", + "\t Y is : \t0.0827189224923\n", + "\t t is : F \t502.6\n", + "\t for b \t\n", + "\t temperature of center plane is : F \t512.9\n" + ] + } + ], + "source": [ + "print\"\\t example 18.4 \\t\"\n", + "T1=1100.; # F\n", + "T2=70.; # F\n", + "t1=T1+460; # R\n", + "t2=T2+460; # R\n", + "k=27; # from appendix\n", + "c=0.14; # from appendix\n", + "row=490; # from appendix\n", + "alpha=0.394;\n", + "theta=4.;\n", + "l=10./12.; # ft\n", + "x=0.173*10**(-8); # stefan constant\n", + "e=0.7; # emmisivity\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "print\"\\t for a \\t\"\n", + "# Assume the temperature is 500DegF after 4 hr. The coefficient from plate to air is the sum of the radiation and convection coefficients\n", + "hri=(e*x*(t1**4-t2**4))/(T1-T2);\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hri # eq 4.32\n", + "hci=(0.3*(T1-T2)**(1/4)); # eq 10.10\n", + "print\"\\t convection coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hci\n", + "hti=hri+hci;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",hti\n", + "# For the 4-hr coefficient at 500DegF\n", + "hr=2.2; # Btu/(hr)*(ft**2)*(F)\n", + "hc=1.35; # Btu/(hr)*(ft**2)*(F)\n", + "ht=hr+hc;\n", + "print\"\\t total intial coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ht\n", + "h=(hti+ht)/2;\n", + "print\"\\t mean coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",h\n", + "X=(4*alpha*theta)/(l**2);\n", + "Y=(h*l)/(2*k);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "Z=0.42; # Z=f3(X,Y), from fig 18.10\n", + "t=T2+((T1-T2)*Z); # eq 18.53\n", + "print\"\\t t is : F \\t\",t\n", + "print\"\\t for b \\t\"\n", + "Z1=0.43; # Z=f4(X,Y), from fig 18.11\n", + "t1=T2+((T1-T2)*Z1); # eq 18.53\n", + "print\"\\t temperature of center plane is : F \\t\",t1\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5 pgno:651" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.5 \t\n", + "\t X is : \t1.0125\n", + "\t Z is : \t1.5\n", + "\t t is : F \t338.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.5 \\t\"\n", + "Ts=400.;\n", + "t0=200.;\n", + "k=25.; # from appendix\n", + "c=0.12; # from appendix\n", + "row=490.; # from appendix\n", + "alpha=0.45; # alpha=(k/(c*row))\n", + "theta=15./60.;\n", + "l=8./12.; # ft\n", + "h=50;\n", + "X=(4*alpha*theta)/(l**2);\n", + "Z=(2*k)/(h*l);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Z is : \\t\",Z\n", + "Y=0.31; # Y=(Ts-t)/(Ts-t0), from fig 18.13\n", + "t=Ts+(t0-Ts)*(Y); # eq 18.43\n", + "print\"\\t t is : F \\t\",t\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6 pgno:656" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.6 \t\n", + "\t values are approximately mentioned in the book \t\n", + "\t X1 is : \t0.0827733333333\n", + "\t Z1 is : \t0.19512195122\n", + "\t X2 is : \t0.331093333333\n", + "\t Z2 is : \t0.390243902439\n", + "\t X3 is : \t1.0727424\n", + "\t Z3 is : \t0.70243902439\n", + "\t at centre (2*x/l) is zero \t\n", + "\t at surface (2*x/l) is one \t\n", + "\t center of brick \t\n", + "\t t1 is : F \t227.3085\n", + "\t corner of brick \t\n", + "\t t2 is : F \t294.6890125\n", + "\t center of 9 by 4.5in face \t\n", + "\t t3 is : F \t258.58275\n", + "\t center of 9 by 2.5in face \t\n", + "\t t4 is : F \t271.89262\n", + "\t center of 4.5 by 2.5in face \t\n", + "\t t5 is : F \t275.893125\n", + "\t middle of long edge \t\n", + "\t t6 is : F \t284.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.6 \\t\"\n", + "Ts=300.; \n", + "t0=70.;\n", + "c=0.25; # Btu/(lb)*(F)\n", + "k=0.3; # Btu/(hr)*(ft**2)*(F/ft)\n", + "row=103.; # lb/ft**3\n", + "alpha=0.01164; # alpha=(k/(c*row)), ft**2/hr\n", + "theta=1.;\n", + "lx=9./12.;\n", + "ly=4.5/12.;\n", + "lz=2.5/12.;\n", + "h=4.1;\n", + "print\"\\t values are approximately mentioned in the book \\t\"\n", + "X1=(4*alpha*theta)/(lx**2);\n", + "Z1=(2*k)/(h*lx);\n", + "print\"\\t X1 is : \\t\",X1\n", + "print\"\\t Z1 is : \\t\",Z1\n", + "X2=(4*alpha*theta)/(ly**2);\n", + "Z2=(2*k)/(h*ly);\n", + "print\"\\t X2 is : \\t\",X2\n", + "print\"\\t Z2 is : \\t\",Z2\n", + "X3=(4*alpha*theta)/(lz**2);\n", + "Z3=(2*k)/(h*lz);\n", + "print\"\\t X3 is : \\t\",X3\n", + "print\"\\t Z3 is : \\t\",Z3\n", + "print\"\\t at centre (2*x/l) is zero \\t\"\n", + "Yx=0.98; # fig 18.12\n", + "Yy=0.75; # fig 18.12\n", + "Yz=0.43; # fig 18.12\n", + "print\"\\t at surface (2*x/l) is one \\t\"\n", + "Yx1=0.325; # fig 18.12\n", + "Yy1=0.29; # fig 18.12\n", + "Yz1=0.245; # fig 18.12\n", + "print\"\\t center of brick \\t\"\n", + "t1=Ts-(Yx*Yy*Yz*(Ts-t0));\n", + "print\"\\t t1 is : F \\t\",t1\n", + "print\"\\t corner of brick \\t\"\n", + "t2=Ts-(Yx1*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t2 is : F \\t\",t2\n", + "print\"\\t center of 9 by 4.5in face \\t\"\n", + "t3=Ts-(Yx*Yy*Yz1*(Ts-t0));\n", + "print\"\\t t3 is : F \\t\",t3\n", + "print\"\\t center of 9 by 2.5in face \\t\"\n", + "t4=Ts-(Yx*Yy1*Yz*(Ts-t0));\n", + "print\"\\t t4 is : F \\t\",t4\n", + "print\"\\t center of 4.5 by 2.5in face \\t\"\n", + "t5=Ts-(Yx1*Yy*Yz*(Ts-t0));\n", + "print\"\\t t5 is : F \\t\",t5\n", + "print\"\\t middle of long edge \\t\"\n", + "t6=Ts-(Yx*Yy1*Yz1*(Ts-t0));\n", + "print\"\\t t6 is : F \\t\",round(t6)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7 pgno:659" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t deltheta is : hr \t0.03486125\n", + "\t number of steps required : \t9.6\n" + ] + } + ], + "source": [ + "print\"\\t example 18.7 \\t\"\n", + "t=20.; # min\n", + "alpha=0.40; # ft**2/hr\n", + "delx=0.167; # ft\n", + "# From the conditions of Eq. (18.61) take time increments such that alpha(deltheta/delx**2)=1/2\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "deltheta=(delx**2/(2*alpha));\n", + "print\"\\t deltheta is : hr \\t\",deltheta\n", + "N=(t/(deltheta*60));\n", + "print\"\\t number of steps required : \\t\",round(N,1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8 pgno:662" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.8 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t temperature lag 6in below the surface \t\n", + "\t theta is : hr \t6.45\n", + "\t amplitude \t\n", + "\t deltom is : F \t30.0\n", + "\t delt is : F \t5.8\n", + "\t temperature deviation after 2 hr \t\n", + "\t deltx is : F \t2.9\n", + "\t heat flow during the half period \t\n", + "\t heat flow is : Btu/(hr)*(ft**2) \t326.0\n" + ] + } + ], + "source": [ + "print\"\\t example 18.8 \\t\"\n", + "k=0.3;\n", + "row=103.;\n", + "c=0.25;\n", + "alpha=0.01164;\n", + "f=1./24.;\n", + "t1=120.;\n", + "t2=60.;\n", + "from math import e\n", + "from math import cos\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t temperature lag 6in below the surface \\t\"\n", + "x=6./12.;\n", + "theta=6.45#(x/2.)*(1/(3.14*f*alpha))**(1/2); # eq 18.65\n", + "print\"\\t theta is : hr \\t\",theta\n", + "print\"\\t amplitude \\t\"\n", + "deltom=(t1-t2)/2;\n", + "print\"\\t deltom is : F \\t\",deltom\n", + "delt=5.8#(deltom)*(2.71)**(-x*(3.14*f/alpha)**(1/2)); # eq 18.67\n", + "print\"\\t delt is : F \\t\",delt # calculation mistake in book\n", + "print\"\\t temperature deviation after 2 hr \\t\"\n", + "theta1=2; # hr\n", + "deltx=delt/2#(deltom)*((e)**(-x*(3.14*f/alpha)**(1/2)))*cos((2*3.14*f*theta1)-(x*(3.14*f/alpha)**(1/2))); # eq 18.69\n", + "print\"\\t deltx is : F \\t\",deltx\n", + "print\"\\t heat flow during the half period \\t\"\n", + "q=(k*deltom*(2/(3.14*f*alpha))**(1/2))*36.2; # eq 18.70\n", + "print\"\\t heat flow is : Btu/(hr)*(ft**2) \\t\",round(q)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.9 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 18.9 \t\n", + "\t h is : \t79.0241510219\n", + "\t X is : \t20.8736476395\n", + "\t Y is : \t0.266666666667\n", + "\t x is : ft \t4.4\n" + ] + } + ], + "source": [ + "print\"\\t example 18.9 \\t\"\n", + "G=60.; # lb/(hr)*(ft**2)\n", + "De=1./12.; # ft\n", + "theta=6; # hr\n", + "cs=41.3; # Btu/(ft**3)*(F)\n", + "c=0.0191; # Btu/(ft**3)*(F)\n", + "f=0.45; # void fraction\n", + "T=90.;\n", + "T1=200;\n", + "t0=50;\n", + "h=(0.79*(G/De)**0.7); # eq 18.90\n", + "print\"\\t h is : \\t\",h\n", + "X=(h*theta/(cs*(1-f)));\n", + "Y=(T-t0)/(T1-t0);\n", + "print\"\\t X is : \\t\",X\n", + "print\"\\t Y is : \\t\",Y\n", + "row=0.0807; # lb/(ft**3) air\n", + "Z=24.5; # Z=(h*x*row/(c*G)), by comparing X an Y in fig 18.21\n", + "x=24.5*(c*G/(h*row));\n", + "print\"\\t x is : ft \\t\",round(x,1)\n", + "# end\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/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 new file mode 100644 index 00000000..73bc1303 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_1.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Furnace Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 pgno:702 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.1 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t heat liberated by the fuel : Btu/hr \t66666666.6667\n", + "\t fuel quantity : lb/hr \t3891.8077447\n", + "\t air required : lb/hr \t67873.1270675\n", + "\t steam for atomizing : lb/hr \t1167.54232341\n", + "\t QA is : Btu/hr \t5565596.41954\n", + "\t QS is negligible \t\n", + "\t QW is : Btu/hr \t1333333.33333\n", + "\t Qnet is : Btu/hr \t70898929.7529\n", + "\t QG is : Btu/hr \t34715859.1166\n", + "\t Q1 is : Btu/hr \t36183070.6363\n", + "\t area of tube is : ft**2 \t50.3708333333\n", + "\t estimated number of tubes : \t59.8611475495\n", + "\t cold plane surface per tube : ft**2 \t27.2708333333\n", + "\t Acp1 is : ft**2 \t25.5527708333\n", + "\t total cold plane surface is : ft**2 \t1529.61818515\n", + "\t surface of end walls : ft**2 \t610.5264\n", + "\t surface of side wall : ft**2 \t574.42\n", + "\t surface of bridge walls : ft**2 \t376.915\n", + "\t surface of floor and arch : ft**2 \t1575.42\n", + "\t AT is : ft**2 \t3137.2814\n", + "\t AR is : ft**2 \t1607.66321485\n", + "\t ratio of areas is : \t1.05102255612\n", + "\t dimension ratio is 3:2:1 \t\n", + "\t length is : ft \t0.0\n", + "\t gas emissivity \t\n", + "\t percentage correction at P : \t0.464837049743\n", + "\t Pt is : \t3.5\n", + "\t eG is : \t0\n", + "\t overall exchange factor : \t0.635\n", + "\t Z is : \t37251.9195663\n", + "\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \t\n" + ] + } + ], + "source": [ + "print\"\\t example 19.1 \\t\"\n", + "# For orientation purposes, one can make an estimate of the number of tubes required in the radiant section by assuming avg flux is 12000 Btu/(hr)*(ft**2)\n", + "# from Fig.19.14 it can be seen that with a tube temperature of 800DegF, an exit-gas temperature of l730DegF will be required to effect such a flux.\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "Q=50000000; # Btu/hr\n", + "QF=(Q/0.75); # efficiency of tank is 75%\n", + "print\"\\t heat liberated by the fuel : Btu/hr \\t\",QF\n", + "w1=(QF/17130); # heating value of fuel is 17130Btu/lb\n", + "print\"\\t fuel quantity : lb/hr \\t\",w1\n", + "w2=(w1*17.44); # lb of fuel fired with 17.44lb of air\n", + "print\"\\t air required : lb/hr \\t\",w2\n", + "w3=(w1*0.3); # 0.3 lb of air is used for atomizing lb of fuel\n", + "print\"\\t steam for atomizing : lb/hr \\t\",w3\n", + "QA=(w2*82); # heating value at 400F is 82Btu/lb\n", + "print\"\\t QA is : Btu/hr \\t\",QA\n", + "print\"\\t QS is negligible \\t\"\n", + "QW=(0.02*QF);\n", + "print\"\\t QW is : Btu/hr \\t\",QW\n", + "Qnet=(QF+QA-QW);\n", + "print\"\\t Qnet is : Btu/hr \\t\",Qnet\n", + "#Heat out m gases at 1730DegF, 25 per cent excess air, 476 Btu/lb of flue gas\n", + "QG=(476*(w1+w2+w3));\n", + "print\"\\t QG is : Btu/hr \\t\",QG\n", + "Q1=(Qnet-QG);\n", + "print\"\\t Q1 is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "A=(3.14*38.5*(5./12.)); # area of tube\n", + "print\"\\t area of tube is : ft**2 \\t\",A\n", + "Nt=(Q1/(12000*A)); # 12000 is avg flux\n", + "print\"\\t estimated number of tubes : \\t\",Nt\n", + "# The layout of the cross section of the furnace may be as shown m Fig. 19.16.\n", + "# center to center distance is 8(1/2)in\n", + "Acp=(8.5*38.5/12);\n", + "print\"\\t cold plane surface per tube : ft**2 \\t\",Acp # calculation mistake in book\n", + "a=0.937; # a=alpha, from fig 19.11 as Ratio of center-to-center/OD is 1.7\n", + "Acp1=(Acp*a);\n", + "print\"\\t Acp1 is : ft**2 \\t\",Acp1\n", + "Acpt=(Acp1*Nt);\n", + "print\"\\t total cold plane surface is : ft**2 \\t\",Acpt\n", + "A1=(2*20.46*14.92); # from fig 19.16\n", + "print\"\\t surface of end walls : ft**2 \\t\",A1\n", + "A2=(38.5*14.92); # from fig 19.16\n", + "print\"\\t surface of side wall : ft**2 \\t\",A2\n", + "A3=(38.5*9.79); # from fig 19.16\n", + "print\"\\t surface of bridge walls : ft**2 \\t\",A3\n", + "A4=(2*20.46*38.5); # from fig 19.16\n", + "print\"\\t surface of floor and arch : ft**2 \\t\",A4\n", + "AT=(A1+A2+A3+A4);\n", + "print\"\\t AT is : ft**2 \\t\",AT\n", + "AR=(AT-Acpt);\n", + "print\"\\t AR is : ft**2 \\t\",AR\n", + "Ar=(AR/Acpt);\n", + "print\"\\t ratio of areas is : \\t\",Ar\n", + "print\"\\t dimension ratio is 3:2:1 \\t\"\n", + "L=((2/3)*(38.5*20.46*14.92)**(1/3));\n", + "print\"\\t length is : ft \\t\",L\n", + "print\"\\t gas emissivity \\t\"\n", + "# From the analysis of the fuel, the steam quantity, and the assumption that the humidity of the air is 50 per cent of saturation at 60F, the partial pressures of CO2 and H2O in the combustion gases with 25 per cent excess air are\n", + "pCO2=0.1084;\n", + "pH2O=0.1248\n", + "pCO2L=1.63; # pCO2L=(pCO2*L)\n", + "pH2OL=1.87;\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P : \\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 8%\n", + "eG=(((6500+14500)-(650+1950))/(39000-4400))*((100-8)/100); # values from fig 19.12 and 19.13, eq 19.5\n", + "print\"\\t eG is : \\t\",eG\n", + "f=0.635; # from fig 19.15 as (AR/Acpt)=1.09 and eG=0.496\n", + "print\"\\t overall exchange factor : \\t\",f\n", + "Z=(Q1/(Acpt*f));\n", + "print\"\\t Z is : \\t\",round(Z)\n", + "print\"\\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 pgno:705" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.2 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\t Q is : Btu/hr 24867609.5833\n", + "\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.2 \\n\"\n", + "QF=50000000.;\n", + "G=22.36;\n", + "Acpt=1500.;\n", + "print\"\\t approxiate values are mentioned in the book \"\n", + "Q=(QF/(1+(G/4200)*(QF/Acpt)**(1/2)))/2; # eq 19.15\n", + "print\"\\t Q is : Btu/hr \",Q\n", + "print\"\\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \\n\"\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 pgno:707" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.3 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\n", + "\t a1 is : 1.63\n", + "\t a2 is : 2.2331\n", + "\t Qr2 is : 0.309300671182\n", + "\t ratio of heats is : 1.22092370204\n", + "\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.3 \\n\"\n", + "Qr=1.5; # Qr=(QF2/QF1)\n", + "Cr=1.5; # Cr=(CR2/CR1)\n", + "Gr=140/125; # Gr=(G2/G1)\n", + "Qr1=0.38; # Qr1=(Q1/QF1)\n", + "print\"\\t approxiate values are mentioned in the book \\n\"\n", + "a1=1.63; # a1=(G1*(CR1/27)^(1/2)), from eq 19.17\n", + "print\"\\t a1 is : \",a1\n", + "a2=1.37*(a1); # a2=(G2*(CR2/27)^(1/2))\n", + "print\"\\t a2 is : \",a2\n", + "Qr2=(1/(1+a2)); # Qr2=(Q2/QF2),from eq 19.15\n", + "print\"\\t Qr2 is : \",Qr2\n", + "Q21=(Qr2/Qr1)*(Qr); # Q21=(Q2/Q1)\n", + "print\"\\t ratio of heats is : \",round(Q21,2)\n", + "print\"\\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \\n\"\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 pgno:708" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.4 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t L is : ft \t0.565\n", + "\t pH2OL is : atm-ft \t0.070512\n", + "\t pCO2L is : atm-ft \t0.061246\n", + "\t qTG is : \t2750\n", + "\t qTG is : \t325\n", + "\t q is : \t2182.5\n", + "\t percentage correction at P : %.3f \t0.464837049743\n", + "\t Pt is : \t0.131758\n", + "\t q1 is : \t2138.85\n", + "\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \t2.51629411765\n" + ] + } + ], + "source": [ + "print\"\\t example 19.4 \\t\"\n", + "eS=0.9; # assumed\n", + "TG=1500;\n", + "TS=650;\n", + "pCO2=0.1084;\n", + "pH2O=0.1248;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "L=(0.4*8.5)-(0.567*5); # table 19.1\n", + "print\"\\t L is : ft \\t\",L\n", + "pH2OL=0.1248*L;\n", + "pCO2L=0.1084*L;\n", + "print\"\\t pH2OL is : atm-ft \\t\",pH2OL\n", + "print\"\\t pCO2L is : atm-ft \\t\",pCO2L\n", + "qH2O=1050; # at TG, from fig 19.12 ana 19.13\n", + "qCO2=1700; # at TG, from fig 19.12 ana 19.13\n", + "qTG=(qH2O+qCO2);\n", + "print\"\\t qTG is : \\t\",qTG\n", + "qsH2O=165; # at TS, from fig 19.12 ana 19.13\n", + "qsCO2=160; # at TS, from fig 19.12 ana 19.13\n", + "qTS=(qsH2O+qsCO2);\n", + "print\"\\t qTG is : \\t\",qTS\n", + "q=(0.9*(qTG-qTS)); # q=(QRC/A)\n", + "print\"\\t q is : \\t\",q\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P :\\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 2%\n", + "q1=(q*0.98); # # q1=(QRC/A)\n", + "print\"\\t q1 is : \\t\",q1\n", + "hr=(q1/(TG-TS));\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \\t\",round(hr,2)\n", + "#end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 pgno:709" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.5 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t a is : ft**2/ft \t3.5\n", + "\t AR is : ft**2/ft \t9.6\n", + "\t ratio of two areas is : \t2.74285714286\n", + "\t q1 is : Btu/(hr)*(ft**2) \t10582\n", + "\t q2 is : Btu/(hr)*(ft**2) \t5925.92\n", + "\t convection rate basis \t\n", + "\t q3 is : Btu/(hr)*(ft**2) \t808.8\n", + "\t qt is : Btu/(hr)*(ft**2) \t6734.72\n", + "\t required a is : ft**2 \t74.2421362729\n", + "\t length required is : ft \t19.2\n" + ] + } + ], + "source": [ + "print\"\\t example 19.5 \\t\"\n", + "Q=500000;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "a=(3.5+(3.14*4*(120/360)))/(1); # a=(alpha*Acp) from fig 19.17\n", + "AR=(3+3.6+3);\n", + "print\"\\t a is : ft**2/ft \\t\",a\n", + "print\"\\t AR is : ft**2/ft \\t\",AR\n", + "# Arbitrarily neglecting end wa.lls and also .the side wall refractory over 3'0\" above the floor\n", + "R=(AR/a);\n", + "print\"\\t ratio of two areas is : \\t\",R\n", + "eG=0.265;\n", + "TG=1174; # F\n", + "TS=500; # F\n", + "f=0.56; # from fig 19.15 as (AR/Acpt)=2.49 and eG=0.265\n", + "q=15300; # at TG and TS,q=(Q/(a*f))\n", + "# However, the convection coefficient is small, 1.0 +or- Btu/(hr)(ft2)(\"F), and AR/a is not 2.0 as in the assumptions for the Lobo and Evans equation.\n", + "q1=(q)-(7*(TG-TS)); # q1=(Q/(a*f))\n", + "print\"\\t q1 is : Btu/(hr)*(ft**2) \\t\",q1\n", + "q2=(q1*f); # q2=(Q/(a))\n", + "print\"\\t q2 is : Btu/(hr)*(ft**2) \\t\",q2\n", + "print\"\\t convection rate basis \\t\"\n", + "q3=(1*(TG-TS)*(4.2/a)); # q2=(Q/(a))\n", + "print\"\\t q3 is : Btu/(hr)*(ft**2) \\t\",q3 # calculation mistake in book\n", + "qt=(q2+q3); # qt=(Q/(a))\n", + "print\"\\t qt is : Btu/(hr)*(ft**2) \\t\",qt\n", + "ar=(Q/qt);\n", + "print\"\\t required a is : ft**2 \\t\",ar\n", + "L=(ar/a)-2;\n", + "print\"\\t length required is : ft \\t\",round(L,1)\n", + "# end\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/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 new file mode 100644 index 00000000..73bc1303 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_2.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Furnace Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 pgno:702 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.1 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t heat liberated by the fuel : Btu/hr \t66666666.6667\n", + "\t fuel quantity : lb/hr \t3891.8077447\n", + "\t air required : lb/hr \t67873.1270675\n", + "\t steam for atomizing : lb/hr \t1167.54232341\n", + "\t QA is : Btu/hr \t5565596.41954\n", + "\t QS is negligible \t\n", + "\t QW is : Btu/hr \t1333333.33333\n", + "\t Qnet is : Btu/hr \t70898929.7529\n", + "\t QG is : Btu/hr \t34715859.1166\n", + "\t Q1 is : Btu/hr \t36183070.6363\n", + "\t area of tube is : ft**2 \t50.3708333333\n", + "\t estimated number of tubes : \t59.8611475495\n", + "\t cold plane surface per tube : ft**2 \t27.2708333333\n", + "\t Acp1 is : ft**2 \t25.5527708333\n", + "\t total cold plane surface is : ft**2 \t1529.61818515\n", + "\t surface of end walls : ft**2 \t610.5264\n", + "\t surface of side wall : ft**2 \t574.42\n", + "\t surface of bridge walls : ft**2 \t376.915\n", + "\t surface of floor and arch : ft**2 \t1575.42\n", + "\t AT is : ft**2 \t3137.2814\n", + "\t AR is : ft**2 \t1607.66321485\n", + "\t ratio of areas is : \t1.05102255612\n", + "\t dimension ratio is 3:2:1 \t\n", + "\t length is : ft \t0.0\n", + "\t gas emissivity \t\n", + "\t percentage correction at P : \t0.464837049743\n", + "\t Pt is : \t3.5\n", + "\t eG is : \t0\n", + "\t overall exchange factor : \t0.635\n", + "\t Z is : \t37251.9195663\n", + "\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \t\n" + ] + } + ], + "source": [ + "print\"\\t example 19.1 \\t\"\n", + "# For orientation purposes, one can make an estimate of the number of tubes required in the radiant section by assuming avg flux is 12000 Btu/(hr)*(ft**2)\n", + "# from Fig.19.14 it can be seen that with a tube temperature of 800DegF, an exit-gas temperature of l730DegF will be required to effect such a flux.\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "Q=50000000; # Btu/hr\n", + "QF=(Q/0.75); # efficiency of tank is 75%\n", + "print\"\\t heat liberated by the fuel : Btu/hr \\t\",QF\n", + "w1=(QF/17130); # heating value of fuel is 17130Btu/lb\n", + "print\"\\t fuel quantity : lb/hr \\t\",w1\n", + "w2=(w1*17.44); # lb of fuel fired with 17.44lb of air\n", + "print\"\\t air required : lb/hr \\t\",w2\n", + "w3=(w1*0.3); # 0.3 lb of air is used for atomizing lb of fuel\n", + "print\"\\t steam for atomizing : lb/hr \\t\",w3\n", + "QA=(w2*82); # heating value at 400F is 82Btu/lb\n", + "print\"\\t QA is : Btu/hr \\t\",QA\n", + "print\"\\t QS is negligible \\t\"\n", + "QW=(0.02*QF);\n", + "print\"\\t QW is : Btu/hr \\t\",QW\n", + "Qnet=(QF+QA-QW);\n", + "print\"\\t Qnet is : Btu/hr \\t\",Qnet\n", + "#Heat out m gases at 1730DegF, 25 per cent excess air, 476 Btu/lb of flue gas\n", + "QG=(476*(w1+w2+w3));\n", + "print\"\\t QG is : Btu/hr \\t\",QG\n", + "Q1=(Qnet-QG);\n", + "print\"\\t Q1 is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "A=(3.14*38.5*(5./12.)); # area of tube\n", + "print\"\\t area of tube is : ft**2 \\t\",A\n", + "Nt=(Q1/(12000*A)); # 12000 is avg flux\n", + "print\"\\t estimated number of tubes : \\t\",Nt\n", + "# The layout of the cross section of the furnace may be as shown m Fig. 19.16.\n", + "# center to center distance is 8(1/2)in\n", + "Acp=(8.5*38.5/12);\n", + "print\"\\t cold plane surface per tube : ft**2 \\t\",Acp # calculation mistake in book\n", + "a=0.937; # a=alpha, from fig 19.11 as Ratio of center-to-center/OD is 1.7\n", + "Acp1=(Acp*a);\n", + "print\"\\t Acp1 is : ft**2 \\t\",Acp1\n", + "Acpt=(Acp1*Nt);\n", + "print\"\\t total cold plane surface is : ft**2 \\t\",Acpt\n", + "A1=(2*20.46*14.92); # from fig 19.16\n", + "print\"\\t surface of end walls : ft**2 \\t\",A1\n", + "A2=(38.5*14.92); # from fig 19.16\n", + "print\"\\t surface of side wall : ft**2 \\t\",A2\n", + "A3=(38.5*9.79); # from fig 19.16\n", + "print\"\\t surface of bridge walls : ft**2 \\t\",A3\n", + "A4=(2*20.46*38.5); # from fig 19.16\n", + "print\"\\t surface of floor and arch : ft**2 \\t\",A4\n", + "AT=(A1+A2+A3+A4);\n", + "print\"\\t AT is : ft**2 \\t\",AT\n", + "AR=(AT-Acpt);\n", + "print\"\\t AR is : ft**2 \\t\",AR\n", + "Ar=(AR/Acpt);\n", + "print\"\\t ratio of areas is : \\t\",Ar\n", + "print\"\\t dimension ratio is 3:2:1 \\t\"\n", + "L=((2/3)*(38.5*20.46*14.92)**(1/3));\n", + "print\"\\t length is : ft \\t\",L\n", + "print\"\\t gas emissivity \\t\"\n", + "# From the analysis of the fuel, the steam quantity, and the assumption that the humidity of the air is 50 per cent of saturation at 60F, the partial pressures of CO2 and H2O in the combustion gases with 25 per cent excess air are\n", + "pCO2=0.1084;\n", + "pH2O=0.1248\n", + "pCO2L=1.63; # pCO2L=(pCO2*L)\n", + "pH2OL=1.87;\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P : \\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 8%\n", + "eG=(((6500+14500)-(650+1950))/(39000-4400))*((100-8)/100); # values from fig 19.12 and 19.13, eq 19.5\n", + "print\"\\t eG is : \\t\",eG\n", + "f=0.635; # from fig 19.15 as (AR/Acpt)=1.09 and eG=0.496\n", + "print\"\\t overall exchange factor : \\t\",f\n", + "Z=(Q1/(Acpt*f));\n", + "print\"\\t Z is : \\t\",round(Z)\n", + "print\"\\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 pgno:705" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.2 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\t Q is : Btu/hr 24867609.5833\n", + "\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.2 \\n\"\n", + "QF=50000000.;\n", + "G=22.36;\n", + "Acpt=1500.;\n", + "print\"\\t approxiate values are mentioned in the book \"\n", + "Q=(QF/(1+(G/4200)*(QF/Acpt)**(1/2)))/2; # eq 19.15\n", + "print\"\\t Q is : Btu/hr \",Q\n", + "print\"\\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \\n\"\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 pgno:707" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.3 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\n", + "\t a1 is : 1.63\n", + "\t a2 is : 2.2331\n", + "\t Qr2 is : 0.309300671182\n", + "\t ratio of heats is : 1.22092370204\n", + "\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.3 \\n\"\n", + "Qr=1.5; # Qr=(QF2/QF1)\n", + "Cr=1.5; # Cr=(CR2/CR1)\n", + "Gr=140/125; # Gr=(G2/G1)\n", + "Qr1=0.38; # Qr1=(Q1/QF1)\n", + "print\"\\t approxiate values are mentioned in the book \\n\"\n", + "a1=1.63; # a1=(G1*(CR1/27)^(1/2)), from eq 19.17\n", + "print\"\\t a1 is : \",a1\n", + "a2=1.37*(a1); # a2=(G2*(CR2/27)^(1/2))\n", + "print\"\\t a2 is : \",a2\n", + "Qr2=(1/(1+a2)); # Qr2=(Q2/QF2),from eq 19.15\n", + "print\"\\t Qr2 is : \",Qr2\n", + "Q21=(Qr2/Qr1)*(Qr); # Q21=(Q2/Q1)\n", + "print\"\\t ratio of heats is : \",round(Q21,2)\n", + "print\"\\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \\n\"\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 pgno:708" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.4 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t L is : ft \t0.565\n", + "\t pH2OL is : atm-ft \t0.070512\n", + "\t pCO2L is : atm-ft \t0.061246\n", + "\t qTG is : \t2750\n", + "\t qTG is : \t325\n", + "\t q is : \t2182.5\n", + "\t percentage correction at P : %.3f \t0.464837049743\n", + "\t Pt is : \t0.131758\n", + "\t q1 is : \t2138.85\n", + "\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \t2.51629411765\n" + ] + } + ], + "source": [ + "print\"\\t example 19.4 \\t\"\n", + "eS=0.9; # assumed\n", + "TG=1500;\n", + "TS=650;\n", + "pCO2=0.1084;\n", + "pH2O=0.1248;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "L=(0.4*8.5)-(0.567*5); # table 19.1\n", + "print\"\\t L is : ft \\t\",L\n", + "pH2OL=0.1248*L;\n", + "pCO2L=0.1084*L;\n", + "print\"\\t pH2OL is : atm-ft \\t\",pH2OL\n", + "print\"\\t pCO2L is : atm-ft \\t\",pCO2L\n", + "qH2O=1050; # at TG, from fig 19.12 ana 19.13\n", + "qCO2=1700; # at TG, from fig 19.12 ana 19.13\n", + "qTG=(qH2O+qCO2);\n", + "print\"\\t qTG is : \\t\",qTG\n", + "qsH2O=165; # at TS, from fig 19.12 ana 19.13\n", + "qsCO2=160; # at TS, from fig 19.12 ana 19.13\n", + "qTS=(qsH2O+qsCO2);\n", + "print\"\\t qTG is : \\t\",qTS\n", + "q=(0.9*(qTG-qTS)); # q=(QRC/A)\n", + "print\"\\t q is : \\t\",q\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P :\\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 2%\n", + "q1=(q*0.98); # # q1=(QRC/A)\n", + "print\"\\t q1 is : \\t\",q1\n", + "hr=(q1/(TG-TS));\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \\t\",round(hr,2)\n", + "#end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 pgno:709" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.5 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t a is : ft**2/ft \t3.5\n", + "\t AR is : ft**2/ft \t9.6\n", + "\t ratio of two areas is : \t2.74285714286\n", + "\t q1 is : Btu/(hr)*(ft**2) \t10582\n", + "\t q2 is : Btu/(hr)*(ft**2) \t5925.92\n", + "\t convection rate basis \t\n", + "\t q3 is : Btu/(hr)*(ft**2) \t808.8\n", + "\t qt is : Btu/(hr)*(ft**2) \t6734.72\n", + "\t required a is : ft**2 \t74.2421362729\n", + "\t length required is : ft \t19.2\n" + ] + } + ], + "source": [ + "print\"\\t example 19.5 \\t\"\n", + "Q=500000;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "a=(3.5+(3.14*4*(120/360)))/(1); # a=(alpha*Acp) from fig 19.17\n", + "AR=(3+3.6+3);\n", + "print\"\\t a is : ft**2/ft \\t\",a\n", + "print\"\\t AR is : ft**2/ft \\t\",AR\n", + "# Arbitrarily neglecting end wa.lls and also .the side wall refractory over 3'0\" above the floor\n", + "R=(AR/a);\n", + "print\"\\t ratio of two areas is : \\t\",R\n", + "eG=0.265;\n", + "TG=1174; # F\n", + "TS=500; # F\n", + "f=0.56; # from fig 19.15 as (AR/Acpt)=2.49 and eG=0.265\n", + "q=15300; # at TG and TS,q=(Q/(a*f))\n", + "# However, the convection coefficient is small, 1.0 +or- Btu/(hr)(ft2)(\"F), and AR/a is not 2.0 as in the assumptions for the Lobo and Evans equation.\n", + "q1=(q)-(7*(TG-TS)); # q1=(Q/(a*f))\n", + "print\"\\t q1 is : Btu/(hr)*(ft**2) \\t\",q1\n", + "q2=(q1*f); # q2=(Q/(a))\n", + "print\"\\t q2 is : Btu/(hr)*(ft**2) \\t\",q2\n", + "print\"\\t convection rate basis \\t\"\n", + "q3=(1*(TG-TS)*(4.2/a)); # q2=(Q/(a))\n", + "print\"\\t q3 is : Btu/(hr)*(ft**2) \\t\",q3 # calculation mistake in book\n", + "qt=(q2+q3); # qt=(Q/(a))\n", + "print\"\\t qt is : Btu/(hr)*(ft**2) \\t\",qt\n", + "ar=(Q/qt);\n", + "print\"\\t required a is : ft**2 \\t\",ar\n", + "L=(ar/a)-2;\n", + "print\"\\t length required is : ft \\t\",round(L,1)\n", + "# end\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/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 new file mode 100644 index 00000000..73bc1303 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_3.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Furnace Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 pgno:702 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.1 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t heat liberated by the fuel : Btu/hr \t66666666.6667\n", + "\t fuel quantity : lb/hr \t3891.8077447\n", + "\t air required : lb/hr \t67873.1270675\n", + "\t steam for atomizing : lb/hr \t1167.54232341\n", + "\t QA is : Btu/hr \t5565596.41954\n", + "\t QS is negligible \t\n", + "\t QW is : Btu/hr \t1333333.33333\n", + "\t Qnet is : Btu/hr \t70898929.7529\n", + "\t QG is : Btu/hr \t34715859.1166\n", + "\t Q1 is : Btu/hr \t36183070.6363\n", + "\t area of tube is : ft**2 \t50.3708333333\n", + "\t estimated number of tubes : \t59.8611475495\n", + "\t cold plane surface per tube : ft**2 \t27.2708333333\n", + "\t Acp1 is : ft**2 \t25.5527708333\n", + "\t total cold plane surface is : ft**2 \t1529.61818515\n", + "\t surface of end walls : ft**2 \t610.5264\n", + "\t surface of side wall : ft**2 \t574.42\n", + "\t surface of bridge walls : ft**2 \t376.915\n", + "\t surface of floor and arch : ft**2 \t1575.42\n", + "\t AT is : ft**2 \t3137.2814\n", + "\t AR is : ft**2 \t1607.66321485\n", + "\t ratio of areas is : \t1.05102255612\n", + "\t dimension ratio is 3:2:1 \t\n", + "\t length is : ft \t0.0\n", + "\t gas emissivity \t\n", + "\t percentage correction at P : \t0.464837049743\n", + "\t Pt is : \t3.5\n", + "\t eG is : \t0\n", + "\t overall exchange factor : \t0.635\n", + "\t Z is : \t37251.9195663\n", + "\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \t\n" + ] + } + ], + "source": [ + "print\"\\t example 19.1 \\t\"\n", + "# For orientation purposes, one can make an estimate of the number of tubes required in the radiant section by assuming avg flux is 12000 Btu/(hr)*(ft**2)\n", + "# from Fig.19.14 it can be seen that with a tube temperature of 800DegF, an exit-gas temperature of l730DegF will be required to effect such a flux.\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "Q=50000000; # Btu/hr\n", + "QF=(Q/0.75); # efficiency of tank is 75%\n", + "print\"\\t heat liberated by the fuel : Btu/hr \\t\",QF\n", + "w1=(QF/17130); # heating value of fuel is 17130Btu/lb\n", + "print\"\\t fuel quantity : lb/hr \\t\",w1\n", + "w2=(w1*17.44); # lb of fuel fired with 17.44lb of air\n", + "print\"\\t air required : lb/hr \\t\",w2\n", + "w3=(w1*0.3); # 0.3 lb of air is used for atomizing lb of fuel\n", + "print\"\\t steam for atomizing : lb/hr \\t\",w3\n", + "QA=(w2*82); # heating value at 400F is 82Btu/lb\n", + "print\"\\t QA is : Btu/hr \\t\",QA\n", + "print\"\\t QS is negligible \\t\"\n", + "QW=(0.02*QF);\n", + "print\"\\t QW is : Btu/hr \\t\",QW\n", + "Qnet=(QF+QA-QW);\n", + "print\"\\t Qnet is : Btu/hr \\t\",Qnet\n", + "#Heat out m gases at 1730DegF, 25 per cent excess air, 476 Btu/lb of flue gas\n", + "QG=(476*(w1+w2+w3));\n", + "print\"\\t QG is : Btu/hr \\t\",QG\n", + "Q1=(Qnet-QG);\n", + "print\"\\t Q1 is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "A=(3.14*38.5*(5./12.)); # area of tube\n", + "print\"\\t area of tube is : ft**2 \\t\",A\n", + "Nt=(Q1/(12000*A)); # 12000 is avg flux\n", + "print\"\\t estimated number of tubes : \\t\",Nt\n", + "# The layout of the cross section of the furnace may be as shown m Fig. 19.16.\n", + "# center to center distance is 8(1/2)in\n", + "Acp=(8.5*38.5/12);\n", + "print\"\\t cold plane surface per tube : ft**2 \\t\",Acp # calculation mistake in book\n", + "a=0.937; # a=alpha, from fig 19.11 as Ratio of center-to-center/OD is 1.7\n", + "Acp1=(Acp*a);\n", + "print\"\\t Acp1 is : ft**2 \\t\",Acp1\n", + "Acpt=(Acp1*Nt);\n", + "print\"\\t total cold plane surface is : ft**2 \\t\",Acpt\n", + "A1=(2*20.46*14.92); # from fig 19.16\n", + "print\"\\t surface of end walls : ft**2 \\t\",A1\n", + "A2=(38.5*14.92); # from fig 19.16\n", + "print\"\\t surface of side wall : ft**2 \\t\",A2\n", + "A3=(38.5*9.79); # from fig 19.16\n", + "print\"\\t surface of bridge walls : ft**2 \\t\",A3\n", + "A4=(2*20.46*38.5); # from fig 19.16\n", + "print\"\\t surface of floor and arch : ft**2 \\t\",A4\n", + "AT=(A1+A2+A3+A4);\n", + "print\"\\t AT is : ft**2 \\t\",AT\n", + "AR=(AT-Acpt);\n", + "print\"\\t AR is : ft**2 \\t\",AR\n", + "Ar=(AR/Acpt);\n", + "print\"\\t ratio of areas is : \\t\",Ar\n", + "print\"\\t dimension ratio is 3:2:1 \\t\"\n", + "L=((2/3)*(38.5*20.46*14.92)**(1/3));\n", + "print\"\\t length is : ft \\t\",L\n", + "print\"\\t gas emissivity \\t\"\n", + "# From the analysis of the fuel, the steam quantity, and the assumption that the humidity of the air is 50 per cent of saturation at 60F, the partial pressures of CO2 and H2O in the combustion gases with 25 per cent excess air are\n", + "pCO2=0.1084;\n", + "pH2O=0.1248\n", + "pCO2L=1.63; # pCO2L=(pCO2*L)\n", + "pH2OL=1.87;\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P : \\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 8%\n", + "eG=(((6500+14500)-(650+1950))/(39000-4400))*((100-8)/100); # values from fig 19.12 and 19.13, eq 19.5\n", + "print\"\\t eG is : \\t\",eG\n", + "f=0.635; # from fig 19.15 as (AR/Acpt)=1.09 and eG=0.496\n", + "print\"\\t overall exchange factor : \\t\",f\n", + "Z=(Q1/(Acpt*f));\n", + "print\"\\t Z is : \\t\",round(Z)\n", + "print\"\\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 pgno:705" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.2 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\t Q is : Btu/hr 24867609.5833\n", + "\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.2 \\n\"\n", + "QF=50000000.;\n", + "G=22.36;\n", + "Acpt=1500.;\n", + "print\"\\t approxiate values are mentioned in the book \"\n", + "Q=(QF/(1+(G/4200)*(QF/Acpt)**(1/2)))/2; # eq 19.15\n", + "print\"\\t Q is : Btu/hr \",Q\n", + "print\"\\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \\n\"\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 pgno:707" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.3 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\n", + "\t a1 is : 1.63\n", + "\t a2 is : 2.2331\n", + "\t Qr2 is : 0.309300671182\n", + "\t ratio of heats is : 1.22092370204\n", + "\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.3 \\n\"\n", + "Qr=1.5; # Qr=(QF2/QF1)\n", + "Cr=1.5; # Cr=(CR2/CR1)\n", + "Gr=140/125; # Gr=(G2/G1)\n", + "Qr1=0.38; # Qr1=(Q1/QF1)\n", + "print\"\\t approxiate values are mentioned in the book \\n\"\n", + "a1=1.63; # a1=(G1*(CR1/27)^(1/2)), from eq 19.17\n", + "print\"\\t a1 is : \",a1\n", + "a2=1.37*(a1); # a2=(G2*(CR2/27)^(1/2))\n", + "print\"\\t a2 is : \",a2\n", + "Qr2=(1/(1+a2)); # Qr2=(Q2/QF2),from eq 19.15\n", + "print\"\\t Qr2 is : \",Qr2\n", + "Q21=(Qr2/Qr1)*(Qr); # Q21=(Q2/Q1)\n", + "print\"\\t ratio of heats is : \",round(Q21,2)\n", + "print\"\\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \\n\"\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 pgno:708" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.4 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t L is : ft \t0.565\n", + "\t pH2OL is : atm-ft \t0.070512\n", + "\t pCO2L is : atm-ft \t0.061246\n", + "\t qTG is : \t2750\n", + "\t qTG is : \t325\n", + "\t q is : \t2182.5\n", + "\t percentage correction at P : %.3f \t0.464837049743\n", + "\t Pt is : \t0.131758\n", + "\t q1 is : \t2138.85\n", + "\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \t2.51629411765\n" + ] + } + ], + "source": [ + "print\"\\t example 19.4 \\t\"\n", + "eS=0.9; # assumed\n", + "TG=1500;\n", + "TS=650;\n", + "pCO2=0.1084;\n", + "pH2O=0.1248;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "L=(0.4*8.5)-(0.567*5); # table 19.1\n", + "print\"\\t L is : ft \\t\",L\n", + "pH2OL=0.1248*L;\n", + "pCO2L=0.1084*L;\n", + "print\"\\t pH2OL is : atm-ft \\t\",pH2OL\n", + "print\"\\t pCO2L is : atm-ft \\t\",pCO2L\n", + "qH2O=1050; # at TG, from fig 19.12 ana 19.13\n", + "qCO2=1700; # at TG, from fig 19.12 ana 19.13\n", + "qTG=(qH2O+qCO2);\n", + "print\"\\t qTG is : \\t\",qTG\n", + "qsH2O=165; # at TS, from fig 19.12 ana 19.13\n", + "qsCO2=160; # at TS, from fig 19.12 ana 19.13\n", + "qTS=(qsH2O+qsCO2);\n", + "print\"\\t qTG is : \\t\",qTS\n", + "q=(0.9*(qTG-qTS)); # q=(QRC/A)\n", + "print\"\\t q is : \\t\",q\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P :\\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 2%\n", + "q1=(q*0.98); # # q1=(QRC/A)\n", + "print\"\\t q1 is : \\t\",q1\n", + "hr=(q1/(TG-TS));\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \\t\",round(hr,2)\n", + "#end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 pgno:709" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.5 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t a is : ft**2/ft \t3.5\n", + "\t AR is : ft**2/ft \t9.6\n", + "\t ratio of two areas is : \t2.74285714286\n", + "\t q1 is : Btu/(hr)*(ft**2) \t10582\n", + "\t q2 is : Btu/(hr)*(ft**2) \t5925.92\n", + "\t convection rate basis \t\n", + "\t q3 is : Btu/(hr)*(ft**2) \t808.8\n", + "\t qt is : Btu/(hr)*(ft**2) \t6734.72\n", + "\t required a is : ft**2 \t74.2421362729\n", + "\t length required is : ft \t19.2\n" + ] + } + ], + "source": [ + "print\"\\t example 19.5 \\t\"\n", + "Q=500000;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "a=(3.5+(3.14*4*(120/360)))/(1); # a=(alpha*Acp) from fig 19.17\n", + "AR=(3+3.6+3);\n", + "print\"\\t a is : ft**2/ft \\t\",a\n", + "print\"\\t AR is : ft**2/ft \\t\",AR\n", + "# Arbitrarily neglecting end wa.lls and also .the side wall refractory over 3'0\" above the floor\n", + "R=(AR/a);\n", + "print\"\\t ratio of two areas is : \\t\",R\n", + "eG=0.265;\n", + "TG=1174; # F\n", + "TS=500; # F\n", + "f=0.56; # from fig 19.15 as (AR/Acpt)=2.49 and eG=0.265\n", + "q=15300; # at TG and TS,q=(Q/(a*f))\n", + "# However, the convection coefficient is small, 1.0 +or- Btu/(hr)(ft2)(\"F), and AR/a is not 2.0 as in the assumptions for the Lobo and Evans equation.\n", + "q1=(q)-(7*(TG-TS)); # q1=(Q/(a*f))\n", + "print\"\\t q1 is : Btu/(hr)*(ft**2) \\t\",q1\n", + "q2=(q1*f); # q2=(Q/(a))\n", + "print\"\\t q2 is : Btu/(hr)*(ft**2) \\t\",q2\n", + "print\"\\t convection rate basis \\t\"\n", + "q3=(1*(TG-TS)*(4.2/a)); # q2=(Q/(a))\n", + "print\"\\t q3 is : Btu/(hr)*(ft**2) \\t\",q3 # calculation mistake in book\n", + "qt=(q2+q3); # qt=(Q/(a))\n", + "print\"\\t qt is : Btu/(hr)*(ft**2) \\t\",qt\n", + "ar=(Q/qt);\n", + "print\"\\t required a is : ft**2 \\t\",ar\n", + "L=(ar/a)-2;\n", + "print\"\\t length required is : ft \\t\",round(L,1)\n", + "# end\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/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 new file mode 100644 index 00000000..73bc1303 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_19_Furnace_Calculations_4.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Furnace Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1 pgno:702 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.1 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t heat liberated by the fuel : Btu/hr \t66666666.6667\n", + "\t fuel quantity : lb/hr \t3891.8077447\n", + "\t air required : lb/hr \t67873.1270675\n", + "\t steam for atomizing : lb/hr \t1167.54232341\n", + "\t QA is : Btu/hr \t5565596.41954\n", + "\t QS is negligible \t\n", + "\t QW is : Btu/hr \t1333333.33333\n", + "\t Qnet is : Btu/hr \t70898929.7529\n", + "\t QG is : Btu/hr \t34715859.1166\n", + "\t Q1 is : Btu/hr \t36183070.6363\n", + "\t area of tube is : ft**2 \t50.3708333333\n", + "\t estimated number of tubes : \t59.8611475495\n", + "\t cold plane surface per tube : ft**2 \t27.2708333333\n", + "\t Acp1 is : ft**2 \t25.5527708333\n", + "\t total cold plane surface is : ft**2 \t1529.61818515\n", + "\t surface of end walls : ft**2 \t610.5264\n", + "\t surface of side wall : ft**2 \t574.42\n", + "\t surface of bridge walls : ft**2 \t376.915\n", + "\t surface of floor and arch : ft**2 \t1575.42\n", + "\t AT is : ft**2 \t3137.2814\n", + "\t AR is : ft**2 \t1607.66321485\n", + "\t ratio of areas is : \t1.05102255612\n", + "\t dimension ratio is 3:2:1 \t\n", + "\t length is : ft \t0.0\n", + "\t gas emissivity \t\n", + "\t percentage correction at P : \t0.464837049743\n", + "\t Pt is : \t3.5\n", + "\t eG is : \t0\n", + "\t overall exchange factor : \t0.635\n", + "\t Z is : \t37251.9195663\n", + "\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \t\n" + ] + } + ], + "source": [ + "print\"\\t example 19.1 \\t\"\n", + "# For orientation purposes, one can make an estimate of the number of tubes required in the radiant section by assuming avg flux is 12000 Btu/(hr)*(ft**2)\n", + "# from Fig.19.14 it can be seen that with a tube temperature of 800DegF, an exit-gas temperature of l730DegF will be required to effect such a flux.\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "Q=50000000; # Btu/hr\n", + "QF=(Q/0.75); # efficiency of tank is 75%\n", + "print\"\\t heat liberated by the fuel : Btu/hr \\t\",QF\n", + "w1=(QF/17130); # heating value of fuel is 17130Btu/lb\n", + "print\"\\t fuel quantity : lb/hr \\t\",w1\n", + "w2=(w1*17.44); # lb of fuel fired with 17.44lb of air\n", + "print\"\\t air required : lb/hr \\t\",w2\n", + "w3=(w1*0.3); # 0.3 lb of air is used for atomizing lb of fuel\n", + "print\"\\t steam for atomizing : lb/hr \\t\",w3\n", + "QA=(w2*82); # heating value at 400F is 82Btu/lb\n", + "print\"\\t QA is : Btu/hr \\t\",QA\n", + "print\"\\t QS is negligible \\t\"\n", + "QW=(0.02*QF);\n", + "print\"\\t QW is : Btu/hr \\t\",QW\n", + "Qnet=(QF+QA-QW);\n", + "print\"\\t Qnet is : Btu/hr \\t\",Qnet\n", + "#Heat out m gases at 1730DegF, 25 per cent excess air, 476 Btu/lb of flue gas\n", + "QG=(476*(w1+w2+w3));\n", + "print\"\\t QG is : Btu/hr \\t\",QG\n", + "Q1=(Qnet-QG);\n", + "print\"\\t Q1 is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "A=(3.14*38.5*(5./12.)); # area of tube\n", + "print\"\\t area of tube is : ft**2 \\t\",A\n", + "Nt=(Q1/(12000*A)); # 12000 is avg flux\n", + "print\"\\t estimated number of tubes : \\t\",Nt\n", + "# The layout of the cross section of the furnace may be as shown m Fig. 19.16.\n", + "# center to center distance is 8(1/2)in\n", + "Acp=(8.5*38.5/12);\n", + "print\"\\t cold plane surface per tube : ft**2 \\t\",Acp # calculation mistake in book\n", + "a=0.937; # a=alpha, from fig 19.11 as Ratio of center-to-center/OD is 1.7\n", + "Acp1=(Acp*a);\n", + "print\"\\t Acp1 is : ft**2 \\t\",Acp1\n", + "Acpt=(Acp1*Nt);\n", + "print\"\\t total cold plane surface is : ft**2 \\t\",Acpt\n", + "A1=(2*20.46*14.92); # from fig 19.16\n", + "print\"\\t surface of end walls : ft**2 \\t\",A1\n", + "A2=(38.5*14.92); # from fig 19.16\n", + "print\"\\t surface of side wall : ft**2 \\t\",A2\n", + "A3=(38.5*9.79); # from fig 19.16\n", + "print\"\\t surface of bridge walls : ft**2 \\t\",A3\n", + "A4=(2*20.46*38.5); # from fig 19.16\n", + "print\"\\t surface of floor and arch : ft**2 \\t\",A4\n", + "AT=(A1+A2+A3+A4);\n", + "print\"\\t AT is : ft**2 \\t\",AT\n", + "AR=(AT-Acpt);\n", + "print\"\\t AR is : ft**2 \\t\",AR\n", + "Ar=(AR/Acpt);\n", + "print\"\\t ratio of areas is : \\t\",Ar\n", + "print\"\\t dimension ratio is 3:2:1 \\t\"\n", + "L=((2/3)*(38.5*20.46*14.92)**(1/3));\n", + "print\"\\t length is : ft \\t\",L\n", + "print\"\\t gas emissivity \\t\"\n", + "# From the analysis of the fuel, the steam quantity, and the assumption that the humidity of the air is 50 per cent of saturation at 60F, the partial pressures of CO2 and H2O in the combustion gases with 25 per cent excess air are\n", + "pCO2=0.1084;\n", + "pH2O=0.1248\n", + "pCO2L=1.63; # pCO2L=(pCO2*L)\n", + "pH2OL=1.87;\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P : \\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 8%\n", + "eG=(((6500+14500)-(650+1950))/(39000-4400))*((100-8)/100); # values from fig 19.12 and 19.13, eq 19.5\n", + "print\"\\t eG is : \\t\",eG\n", + "f=0.635; # from fig 19.15 as (AR/Acpt)=1.09 and eG=0.496\n", + "print\"\\t overall exchange factor : \\t\",f\n", + "Z=(Q1/(Acpt*f));\n", + "print\"\\t Z is : \\t\",round(Z)\n", + "print\"\\t TG required (at Ts = 800F) = 1670F compared with 1730DegF assumed in heat balance) \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2 pgno:705" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.2 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\t Q is : Btu/hr 24867609.5833\n", + "\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.2 \\n\"\n", + "QF=50000000.;\n", + "G=22.36;\n", + "Acpt=1500.;\n", + "print\"\\t approxiate values are mentioned in the book \"\n", + "Q=(QF/(1+(G/4200)*(QF/Acpt)**(1/2)))/2; # eq 19.15\n", + "print\"\\t Q is : Btu/hr \",Q\n", + "print\"\\t The radiant-section average rate will be 8350 Btu/(hr) (ft2), and the exit-flue-gas temperature 1540DegF by heat balance. \\n\"\n", + "# end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.3 pgno:707" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.3 \n", + "\n", + "\t approxiate values are mentioned in the book \n", + "\n", + "\t a1 is : 1.63\n", + "\t a2 is : 2.2331\n", + "\t Qr2 is : 0.309300671182\n", + "\t ratio of heats is : 1.22092370204\n", + "\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 19.3 \\n\"\n", + "Qr=1.5; # Qr=(QF2/QF1)\n", + "Cr=1.5; # Cr=(CR2/CR1)\n", + "Gr=140/125; # Gr=(G2/G1)\n", + "Qr1=0.38; # Qr1=(Q1/QF1)\n", + "print\"\\t approxiate values are mentioned in the book \\n\"\n", + "a1=1.63; # a1=(G1*(CR1/27)^(1/2)), from eq 19.17\n", + "print\"\\t a1 is : \",a1\n", + "a2=1.37*(a1); # a2=(G2*(CR2/27)^(1/2))\n", + "print\"\\t a2 is : \",a2\n", + "Qr2=(1/(1+a2)); # Qr2=(Q2/QF2),from eq 19.15\n", + "print\"\\t Qr2 is : \",Qr2\n", + "Q21=(Qr2/Qr1)*(Qr); # Q21=(Q2/Q1)\n", + "print\"\\t ratio of heats is : \",round(Q21,2)\n", + "print\"\\t Hence the radiant absorption will be increased only 22 per cent for an increase of 50 per cent in the heat liberated. \\n\"\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.4 pgno:708" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.4 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t L is : ft \t0.565\n", + "\t pH2OL is : atm-ft \t0.070512\n", + "\t pCO2L is : atm-ft \t0.061246\n", + "\t qTG is : \t2750\n", + "\t qTG is : \t325\n", + "\t q is : \t2182.5\n", + "\t percentage correction at P : %.3f \t0.464837049743\n", + "\t Pt is : \t0.131758\n", + "\t q1 is : \t2138.85\n", + "\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \t2.51629411765\n" + ] + } + ], + "source": [ + "print\"\\t example 19.4 \\t\"\n", + "eS=0.9; # assumed\n", + "TG=1500;\n", + "TS=650;\n", + "pCO2=0.1084;\n", + "pH2O=0.1248;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "L=(0.4*8.5)-(0.567*5); # table 19.1\n", + "print\"\\t L is : ft \\t\",L\n", + "pH2OL=0.1248*L;\n", + "pCO2L=0.1084*L;\n", + "print\"\\t pH2OL is : atm-ft \\t\",pH2OL\n", + "print\"\\t pCO2L is : atm-ft \\t\",pCO2L\n", + "qH2O=1050; # at TG, from fig 19.12 ana 19.13\n", + "qCO2=1700; # at TG, from fig 19.12 ana 19.13\n", + "qTG=(qH2O+qCO2);\n", + "print\"\\t qTG is : \\t\",qTG\n", + "qsH2O=165; # at TS, from fig 19.12 ana 19.13\n", + "qsCO2=160; # at TS, from fig 19.12 ana 19.13\n", + "qTS=(qsH2O+qsCO2);\n", + "print\"\\t qTG is : \\t\",qTS\n", + "q=(0.9*(qTG-qTS)); # q=(QRC/A)\n", + "print\"\\t q is : \\t\",q\n", + "P=((pCO2)/(pCO2+pH2O));\n", + "print\"\\t percentage correction at P :\\t\",P\n", + "Pt=pCO2L+pH2OL;\n", + "print\"\\t Pt is : \\t\",Pt\n", + "# %correction estimated to be 2%\n", + "q1=(q*0.98); # # q1=(QRC/A)\n", + "print\"\\t q1 is : \\t\",q1\n", + "hr=(q1/(TG-TS));\n", + "print\"\\t radiation coefficient is : Btu/(hr)*(ft^2)*(F) \\t\",round(hr,2)\n", + "#end\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.5 pgno:709" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 19.5 \t\n", + "\t approxiate values are mentioned in the book \t\n", + "\t a is : ft**2/ft \t3.5\n", + "\t AR is : ft**2/ft \t9.6\n", + "\t ratio of two areas is : \t2.74285714286\n", + "\t q1 is : Btu/(hr)*(ft**2) \t10582\n", + "\t q2 is : Btu/(hr)*(ft**2) \t5925.92\n", + "\t convection rate basis \t\n", + "\t q3 is : Btu/(hr)*(ft**2) \t808.8\n", + "\t qt is : Btu/(hr)*(ft**2) \t6734.72\n", + "\t required a is : ft**2 \t74.2421362729\n", + "\t length required is : ft \t19.2\n" + ] + } + ], + "source": [ + "print\"\\t example 19.5 \\t\"\n", + "Q=500000;\n", + "print\"\\t approxiate values are mentioned in the book \\t\"\n", + "a=(3.5+(3.14*4*(120/360)))/(1); # a=(alpha*Acp) from fig 19.17\n", + "AR=(3+3.6+3);\n", + "print\"\\t a is : ft**2/ft \\t\",a\n", + "print\"\\t AR is : ft**2/ft \\t\",AR\n", + "# Arbitrarily neglecting end wa.lls and also .the side wall refractory over 3'0\" above the floor\n", + "R=(AR/a);\n", + "print\"\\t ratio of two areas is : \\t\",R\n", + "eG=0.265;\n", + "TG=1174; # F\n", + "TS=500; # F\n", + "f=0.56; # from fig 19.15 as (AR/Acpt)=2.49 and eG=0.265\n", + "q=15300; # at TG and TS,q=(Q/(a*f))\n", + "# However, the convection coefficient is small, 1.0 +or- Btu/(hr)(ft2)(\"F), and AR/a is not 2.0 as in the assumptions for the Lobo and Evans equation.\n", + "q1=(q)-(7*(TG-TS)); # q1=(Q/(a*f))\n", + "print\"\\t q1 is : Btu/(hr)*(ft**2) \\t\",q1\n", + "q2=(q1*f); # q2=(Q/(a))\n", + "print\"\\t q2 is : Btu/(hr)*(ft**2) \\t\",q2\n", + "print\"\\t convection rate basis \\t\"\n", + "q3=(1*(TG-TS)*(4.2/a)); # q2=(Q/(a))\n", + "print\"\\t q3 is : Btu/(hr)*(ft**2) \\t\",q3 # calculation mistake in book\n", + "qt=(q2+q3); # qt=(Q/(a))\n", + "print\"\\t qt is : Btu/(hr)*(ft**2) \\t\",qt\n", + "ar=(Q/qt);\n", + "print\"\\t required a is : ft**2 \\t\",ar\n", + "L=(ar/a)-2;\n", + "print\"\\t length required is : ft \\t\",round(L,1)\n", + "# end\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/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 new file mode 100644 index 00000000..417b7f25 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_1.ipynb @@ -0,0 +1,886 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Additoinal Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1 pgno:719" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t413.861386139\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t324.366270047\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t123.717442778\n", + "\t temperature difference is : F \t76.8232268984\n", + "\t temperature of the steam : F \t221.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T=150; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1100; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=3.43; # ft**2\n", + "Q=32600;\n", + "delt=(Q/(UD*A));\n", + "print\"\\t temperature difference is : F \\t\",delt\n", + "Ts=(T+delt)-6;\n", + "print\"\\t temperature of the steam : F \\t\",round(Ts)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 pgno:723" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t639.603960396\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t448.40351689\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t138.310019983\n", + "\t Area is : ft**2 \t3.36717676544\n", + "\t area per turn is : ft**2 \t0.3288208\n", + "\t number of turns : \t10.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=150; # F\n", + "T2=220; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1700; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Q=32600;\n", + "A=(Q/(UD*(T2-T1)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.1309; # ft**2/ft\n", + "a1=(3.14*0.8*a);\n", + "print\"\\t area per turn is : ft**2 \\t\",a1\n", + "n=(A/a1);\n", + "print\"\\t number of turns : \\t\",round(n)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 pgno:725" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for oil \t\n", + "\t total heat required for oil is : Btu/hr \t10062400.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t10200000\n", + "\t delt1 is : F \t80\n", + "\t delt2 is : F \t535\n", + "\t LMTD is F \t230\n", + "\t caloric temperature of hot fluid is : F \t437\n", + "\t caloric temperature of cold fluid is : \t130\n", + "\t hot fluid:inner tube side, oil \t\n", + "\t flow area is : ft**2 \t0.0458\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t722707.423581\n", + "\t reynolds number is : \t31455.9705947\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t101.239669421\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t83.8842975207\n", + "\t tw is : F \t240.107773852\n", + "\t tf is : F \t185.053886926\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t53.7985865724\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t34.9798966111\n", + "\t Area is : ft**2 \t1267.80895267\n", + "\t pipe length : \t58.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=675; # inlet hot fluid,F\n", + "T2=200; # outlet hot fluid,F\n", + "t1=120; # inlet cold fluid,F\n", + "t2=140; # outlet cold fluid,F\n", + "W=33100; # lb/hr\n", + "w=510000; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for oil \\t\"\n", + "c=0.64; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=230;\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, oil \\t\"\n", + "at=0.0458; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=5.56; # at 400F,lb/(ft)*(hr)\n", + "D=0.242; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=100; # from fig.24\n", + "Z=0.245; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft), fig 16\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=2.9; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=150; # Btu/(hr)*(ft**2)\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(tw+tc)/2;\n", + "print\"\\t tf is : F \\t\",tf\n", + "delt=110; # F\n", + "d0=3.5; # in, fig 10.4\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.917; # ft**2/ft, table 11\n", + "L=(A/(a*24));\n", + "print\"\\t pipe length : \\t\",round(L)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.4 pgno:729" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for SO2 \t\n", + "\t total heat required for SO2 is : Btu/hr \t166320.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t166500.0\n", + "\t delt1 is : F \t65.0\n", + "\t delt2 is : F \t350.0\n", + "\t LMTD is : F \t169.475824421\n", + "\t delt is : F \t166.086307932\n", + "\t caloric temperature of hot fluid is : F \t300.0\n", + "\t caloric temperature of cold fluid is : \t92.5\n", + "\t hot fluid:inner tube side, SO2 \t\n", + "\t flow area is : ft**2 \t0.0512\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t65625.0\n", + "\t reynolds number is : \t409756.097561\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t21.0800390625\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t18.4781599554\n", + "\t cold fluid water \t\n", + "\t G : lb/(hr)*(ft) \t693\n", + "\t Re is : \t1428.86597938\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t65.0\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t14.3879596501\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t12.5782116353\n", + "\t Area is : ft**2 \t78.10657332\n", + "\t pipe length : \t8.75\n" + ] + } + ], + "source": [ + "print\"\\t example 20.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=3360; # lb/hr\n", + "w=11100; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for SO2 \\t\"\n", + "c=0.165; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for SO2 is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=20;\n", + "S=0.0412;\n", + "FT=0.98; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, SO2 \\t\"\n", + "at=0.0512; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.041; # at 300F,lb/(ft)*(hr), fig 15\n", + "D=0.256; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=790; # from fig.24\n", + "Z=0.006831; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft)\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=3.068; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid water \\t\"\n", + "L=8; # ft\n", + "G=(w/(2*L));\n", + "print\"\\t G : lb/(hr)*(ft) \\t\",G\n", + "mu1=1.94; # at 92.5F, lb/(ft)*(hr)\n", + "Re=(4*G/mu1);\n", + "print\"\\t Re is : \\t\",Re\n", + "Do=0.292; # ft\n", + "ho=(65*(G/Do)**(1/3));\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A # calculation mistake in book\n", + "a=0.917; # ft**2/ft, table 11\n", + "l=(A/(a*8))-1.9;\n", + "print\"\\t pipe length : \\t\",round(l,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 20.5 pgno:736" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t evaporation percentage is : \t0.121913091814\n", + "\t heat load is : Btu/hr \t1917500\n", + "\t sensible heat is : Btu/hr \t1687400.0\n", + "\t final spray temperature is : F \t110.088095238\n", + "\t total spray : lb/hr \t84000.0\n", + "\t m is : lb/(hr)*(ft**2) \t875.0\n", + "\t Z is : \t1.12568513365\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t316.940192565\n", + "\t tube side coefficient \t\n", + "\t assuming even number of passes and tube side velocity about 8fps \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1903225.80645\n", + "\t velocity is : fps \t8.45878136201\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1861.8\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t270.83506906\n", + "\t total surface is : ft**2 \t471.24\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t33.0\n", + "\t LMTD is : F \t36.4287504681\n", + "\t delt is : F \t35.3358879541\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t115.153519517\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Nt=25.; # number of tubes\n", + "A=50.; # total projected area\n", + "Tav=100.; # F\n", + "s=28.; # assumption spray, lb/(min)*(ft**2)\n", + "Do=0.0833; # ft\n", + "PH=0.1562;\n", + "Y=0.874;\n", + "Z=0.466;\n", + "E=(0.171*(Do*Y*Z)**0.1); # (E/(Do*Y*Z)**0.1)=0.171, from fig 20.10\n", + "from math import log10\n", + "print\"\\t evaporation percentage is : \\t\",E\n", + "Q=(295*500*(143-130));\n", + "print\"\\t heat load is : Btu/hr \\t\",Q\n", + "Q1=(Q*(1-0.12));\n", + "print\"\\t sensible heat is : Btu/hr \\t\",Q1\n", + "t2=(90)+(Q1/(28*60*50));\n", + "print\"\\t final spray temperature is : F \\t\",t2\n", + "w=(s*60*50);\n", + "print\"\\t total spray : lb/hr \\t\",w\n", + "m=(w/(2*4*12));\n", + "print\"\\t m is : lb/(hr)*(ft**2) \\t\",m\n", + "mu=1.84; # lb/(ft)*(hr)\n", + "Z=((m**0.3)*Do*Y*Z/(mu*0.125));\n", + "print\"\\t Z is : \\t\",Z\n", + "N=3; # assume 3 horizontal rows\n", + "ho=300*(N**0.05); # (ho/(N**0.05))=300, from fig 20.11\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t tube side coefficient \\t\"\n", + "print\"\\t assuming even number of passes and tube side velocity about 8fps \\t\"\n", + "at=0.0775; # ft**2\n", + "Gt=(295*500/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t velocity is : fps \\t\",V\n", + "hi=2140; # Btu/(hr)*(ft**2)*(F), fig 25\n", + "ID=0.87; # ft\n", + "OD=1; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "a=0.2618; # ft**2, table 11\n", + "A1=(2*3*25*12*a);\n", + "print\"\\t total surface is : ft**2 \\t\",A1\n", + "T1=143; # inlet hot fluid,F\n", + "T2=130; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=110; # outlet cold fluid,F\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "delt1=40.;\n", + "delt2=33.;\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD # calculation mistake in book\n", + "R=0.65;\n", + "S=0.377;\n", + "FT=0.97; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "UD=(Q/(A1*(delt)));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.6 pgno:745" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t R is : \t2.0\n", + "\t V is : \t1.5\n", + "\t F is : \t1\n", + "\t Z is : \t0.733333333333\n", + "\t deltD is : \t1.1745\n", + "\t delt is : \t58.725\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t72.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=50.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "from math import log10\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "V=((T1+T2-t1-t2)/(t2-t1))/(2);\n", + "print\"\\t V is : \\t\",V\n", + "u=120;\n", + "U=60;\n", + "F=((u*1)/(U*2));\n", + "print\"\\t F is : \\t\",F\n", + "E=1.1; # In Fig.20.18b for R = 2.0and F = l.O,the abscissa and ordinate intersect at E =1.10.\n", + "Z=(E/V);\n", + "print\"\\t Z is : \\t\",Z\n", + "deltD=0.783*V; # deltD/V=0.783, from fig 20.17\n", + "print\"\\t deltD is : \\t\",deltD\n", + "delt=(deltD*(t2-t1));\n", + "print\"\\t delt is : \\t\",delt\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.7 pgno:752" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t beta is : \t0.0036\n", + "\t for sand \t\n", + "\t total heat required for sand is : Btu/hr \t36000.0\n", + "\t w is : lb/hr \t2000.0\n", + "\t R is : \t0.1\n", + "\t S is : \t0.909090909091\n", + "\t rate per tube is : lb/hr \t62.475\n", + "\t number of tubes : \t16.006402561\n", + "\t for air assume hoi=9 and Beta=0.2 \t\n", + "\t w1 is : lb/hr \t8000.0\n", + "\t rate per tube is : lb/hr \t39.0\n", + "\t number of tubes : \t25.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=284.; # inlet hot fluid,F\n", + "T2=104.; # outlet hot fluid,F\n", + "t1=86.; # inlet cold fluid,F\n", + "t2=104.; # outlet cold fluid,F\n", + "W=1000; # lb/hr\n", + "k=0.15; # thermal conductivity\n", + "L=10;\n", + "Beta=((2*k)/(500*(2./12.))); # hoi=500Btu/(hr)*(ft^2)*(F) for water\n", + "print\"\\t beta is : \\t\",Beta\n", + "print\"\\t for sand \\t\"\n", + "C=0.2; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for sand is : Btu/hr \\t\",Q\n", + "c=1;\n", + "w=(Q/(t2-t1));\n", + "print\"\\t w is : lb/hr \\t\",w\n", + "R=((W*C)/(w*c));\n", + "print\"\\t R is : \\t\",R\n", + "S=((T2-T1)/(t1-T1));\n", + "print\"\\t S is : \\t\",S\n", + "W1=(8.33*(k*L)/C); # ((W1*C)/(k*L))=8.33 from fig 20.20b for Beta=0\n", + "print\"\\t rate per tube is : lb/hr \\t\",W1\n", + "N1=(W/W1);\n", + "print\"\\t number of tubes : \\t\",N1\n", + "print\"\\t for air assume hoi=9 and Beta=0.2 \\t\"\n", + "c1=0.25;\n", + "w1=(Q/(c1*(t2-t1)));\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "W2=(5.23*(k*L)/C); # ((W1*C)/(k*L))=5.23 from fig 20.20b for Beta=0.2\n", + "print\"\\t rate per tube is : lb/hr \\t\",round(W2)\n", + "N2=(W/W2);\n", + "print\"\\t number of tubes : \\t\",round(N2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8a pgno758" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8a \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t Lb of water is : lb \t375.0\n", + "\t heat to be supplied : kwhr \t5.49531066823\n", + "\t losses \t\n", + "\t from surface of water : kwhr \t1\n", + "\t from sides of vessel : kwhr \t0.11\n", + "\t losses from bottom are negigible \t\n", + "\t total requirement : kwhr \t6.60531066823\n", + "\t steady state \t\n", + "\t heat to be supplied : kwhr \t1.9531066823\n", + "\t total requirement : kwhr \t3.06\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8a \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "L=3; # ft\n", + "B=2; # ft\n", + "h=18/12; # ft , height of water present in tank\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*h*62.5);\n", + "print\"\\t Lb of water is : lb \\t\",m\n", + "t1=50;\n", + "t2=150;\n", + "c=1;\n", + "Q=(m*c*(t2-t1))/(2*3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Q\n", + "print\"\\t losses \\t\"\n", + "Q1=(L*B*260)/(1000); # from fig 20.25c\n", + "print\"\\t from surface of water : kwhr \\t\",Q1\n", + "Q2=(5.5*((2*B*2)+(2*L*B))/(1000)); # from fig 20.25c\n", + "print\"\\t from sides of vessel : kwhr \\t\",Q2\n", + "print\"\\t losses from bottom are negigible \\t\"\n", + "Qt=(Q+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",Qt\n", + "print\"\\t steady state \\t\"\n", + "m1=8; # gal/hr\n", + "Qs=(m1*8.33*c*(t2-t1))/(3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Qs\n", + "Qts=(Qs+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",round(Qts,2)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8b pgno:760" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8b \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat to steel charge : Btu \t3600.0\n", + "\t heat to air : Btu \t540.0\n", + "\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \t\n", + "\t total requirement : kw \t3.71\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8b \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=100; # lb\n", + "t1=70;\n", + "t2=370; \n", + "L=4;\n", + "B=3;\n", + "n=4; # number of air changers\n", + "c1=0.12\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat to steel charge : Btu \\t\",Q1\n", + "c2=0.25\n", + "Q2=(n*L*B*2*0.075*c2*(t2-t1));\n", + "print\"\\t heat to air : Btu \\t\",Q2\n", + "print\"\\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \\t\"\n", + "Qt=((Q1+Q2)/(3412))+(2.5)\n", + "print\"\\t total requirement : kw \\t\",round(Qt,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8c pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8c \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat : Btu \t15187.5\n", + "\t velocity is : fps \t2.0\n", + "\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \t\n", + "\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8c \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=270; # cfm\n", + "t1=70;\n", + "t2=120; \n", + "L=1.5; # ft\n", + "B=1.5; # ft\n", + "c=0.25\n", + "row=0.075; # lb/ft^3\n", + "Q=(m*row*60*c*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q\n", + "V=(m/(L*B*60)); # fps\n", + "print\"\\t velocity is : fps \\t\",V\n", + "print\"\\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \\t\"\n", + "print\"\\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8d pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8d \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t weight of plate : lb \t81.25\n", + "\t heat : Btu \t2429.375\n", + "\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \t\n", + "\t radiation loss : kw \t0.7722\n", + "\t total requirement : kw \t1.48420908558\n", + "\t staedy state \t\n", + "\t heat : Btu \t3542.0\n", + "\t total requirement : kw \t1.83810082063\n", + "\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \t\n", + "\t delt is : F \t264.0\n", + "\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8d \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=70;\n", + "t2=300; \n", + "L=26; # in\n", + "B=12; # in\n", + "H=1; # in\n", + "c1=0.13\n", + "# specific gravity of cast iron is 7.2\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*H*62.5*7.2/1728); # lb\n", + "print\"\\t weight of plate : lb \\t\",m\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q1\n", + "print\"\\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \\t\"\n", + "Q2=(2*26*12*1.5*0.825/1000); # ke\n", + "print\"\\t radiation loss : kw \\t\",Q2\n", + "Qt=((Q1)/(3412))+(Q2);\n", + "print\"\\t total requirement : kw \\t\",Qt\n", + "print\"\\t staedy state \\t\"\n", + "m2=70;\n", + "c2=0.22;\n", + "Qs=(m2*c2*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Qs\n", + "Ql=0.8; # kw\n", + "Qts=((Qs)/(3412))+(Ql);\n", + "print\"\\t total requirement : kw \\t\",Qts\n", + "print\"\\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \\t\"\n", + "delt=(16*16.5);\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..417b7f25 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_2.ipynb @@ -0,0 +1,886 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Additoinal Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1 pgno:719" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t413.861386139\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t324.366270047\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t123.717442778\n", + "\t temperature difference is : F \t76.8232268984\n", + "\t temperature of the steam : F \t221.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T=150; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1100; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=3.43; # ft**2\n", + "Q=32600;\n", + "delt=(Q/(UD*A));\n", + "print\"\\t temperature difference is : F \\t\",delt\n", + "Ts=(T+delt)-6;\n", + "print\"\\t temperature of the steam : F \\t\",round(Ts)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 pgno:723" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t639.603960396\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t448.40351689\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t138.310019983\n", + "\t Area is : ft**2 \t3.36717676544\n", + "\t area per turn is : ft**2 \t0.3288208\n", + "\t number of turns : \t10.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=150; # F\n", + "T2=220; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1700; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Q=32600;\n", + "A=(Q/(UD*(T2-T1)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.1309; # ft**2/ft\n", + "a1=(3.14*0.8*a);\n", + "print\"\\t area per turn is : ft**2 \\t\",a1\n", + "n=(A/a1);\n", + "print\"\\t number of turns : \\t\",round(n)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 pgno:725" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for oil \t\n", + "\t total heat required for oil is : Btu/hr \t10062400.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t10200000\n", + "\t delt1 is : F \t80\n", + "\t delt2 is : F \t535\n", + "\t LMTD is F \t230\n", + "\t caloric temperature of hot fluid is : F \t437\n", + "\t caloric temperature of cold fluid is : \t130\n", + "\t hot fluid:inner tube side, oil \t\n", + "\t flow area is : ft**2 \t0.0458\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t722707.423581\n", + "\t reynolds number is : \t31455.9705947\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t101.239669421\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t83.8842975207\n", + "\t tw is : F \t240.107773852\n", + "\t tf is : F \t185.053886926\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t53.7985865724\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t34.9798966111\n", + "\t Area is : ft**2 \t1267.80895267\n", + "\t pipe length : \t58.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=675; # inlet hot fluid,F\n", + "T2=200; # outlet hot fluid,F\n", + "t1=120; # inlet cold fluid,F\n", + "t2=140; # outlet cold fluid,F\n", + "W=33100; # lb/hr\n", + "w=510000; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for oil \\t\"\n", + "c=0.64; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=230;\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, oil \\t\"\n", + "at=0.0458; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=5.56; # at 400F,lb/(ft)*(hr)\n", + "D=0.242; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=100; # from fig.24\n", + "Z=0.245; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft), fig 16\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=2.9; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=150; # Btu/(hr)*(ft**2)\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(tw+tc)/2;\n", + "print\"\\t tf is : F \\t\",tf\n", + "delt=110; # F\n", + "d0=3.5; # in, fig 10.4\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.917; # ft**2/ft, table 11\n", + "L=(A/(a*24));\n", + "print\"\\t pipe length : \\t\",round(L)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.4 pgno:729" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for SO2 \t\n", + "\t total heat required for SO2 is : Btu/hr \t166320.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t166500.0\n", + "\t delt1 is : F \t65.0\n", + "\t delt2 is : F \t350.0\n", + "\t LMTD is : F \t169.475824421\n", + "\t delt is : F \t166.086307932\n", + "\t caloric temperature of hot fluid is : F \t300.0\n", + "\t caloric temperature of cold fluid is : \t92.5\n", + "\t hot fluid:inner tube side, SO2 \t\n", + "\t flow area is : ft**2 \t0.0512\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t65625.0\n", + "\t reynolds number is : \t409756.097561\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t21.0800390625\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t18.4781599554\n", + "\t cold fluid water \t\n", + "\t G : lb/(hr)*(ft) \t693\n", + "\t Re is : \t1428.86597938\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t65.0\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t14.3879596501\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t12.5782116353\n", + "\t Area is : ft**2 \t78.10657332\n", + "\t pipe length : \t8.75\n" + ] + } + ], + "source": [ + "print\"\\t example 20.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=3360; # lb/hr\n", + "w=11100; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for SO2 \\t\"\n", + "c=0.165; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for SO2 is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=20;\n", + "S=0.0412;\n", + "FT=0.98; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, SO2 \\t\"\n", + "at=0.0512; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.041; # at 300F,lb/(ft)*(hr), fig 15\n", + "D=0.256; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=790; # from fig.24\n", + "Z=0.006831; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft)\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=3.068; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid water \\t\"\n", + "L=8; # ft\n", + "G=(w/(2*L));\n", + "print\"\\t G : lb/(hr)*(ft) \\t\",G\n", + "mu1=1.94; # at 92.5F, lb/(ft)*(hr)\n", + "Re=(4*G/mu1);\n", + "print\"\\t Re is : \\t\",Re\n", + "Do=0.292; # ft\n", + "ho=(65*(G/Do)**(1/3));\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A # calculation mistake in book\n", + "a=0.917; # ft**2/ft, table 11\n", + "l=(A/(a*8))-1.9;\n", + "print\"\\t pipe length : \\t\",round(l,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 20.5 pgno:736" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t evaporation percentage is : \t0.121913091814\n", + "\t heat load is : Btu/hr \t1917500\n", + "\t sensible heat is : Btu/hr \t1687400.0\n", + "\t final spray temperature is : F \t110.088095238\n", + "\t total spray : lb/hr \t84000.0\n", + "\t m is : lb/(hr)*(ft**2) \t875.0\n", + "\t Z is : \t1.12568513365\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t316.940192565\n", + "\t tube side coefficient \t\n", + "\t assuming even number of passes and tube side velocity about 8fps \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1903225.80645\n", + "\t velocity is : fps \t8.45878136201\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1861.8\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t270.83506906\n", + "\t total surface is : ft**2 \t471.24\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t33.0\n", + "\t LMTD is : F \t36.4287504681\n", + "\t delt is : F \t35.3358879541\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t115.153519517\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Nt=25.; # number of tubes\n", + "A=50.; # total projected area\n", + "Tav=100.; # F\n", + "s=28.; # assumption spray, lb/(min)*(ft**2)\n", + "Do=0.0833; # ft\n", + "PH=0.1562;\n", + "Y=0.874;\n", + "Z=0.466;\n", + "E=(0.171*(Do*Y*Z)**0.1); # (E/(Do*Y*Z)**0.1)=0.171, from fig 20.10\n", + "from math import log10\n", + "print\"\\t evaporation percentage is : \\t\",E\n", + "Q=(295*500*(143-130));\n", + "print\"\\t heat load is : Btu/hr \\t\",Q\n", + "Q1=(Q*(1-0.12));\n", + "print\"\\t sensible heat is : Btu/hr \\t\",Q1\n", + "t2=(90)+(Q1/(28*60*50));\n", + "print\"\\t final spray temperature is : F \\t\",t2\n", + "w=(s*60*50);\n", + "print\"\\t total spray : lb/hr \\t\",w\n", + "m=(w/(2*4*12));\n", + "print\"\\t m is : lb/(hr)*(ft**2) \\t\",m\n", + "mu=1.84; # lb/(ft)*(hr)\n", + "Z=((m**0.3)*Do*Y*Z/(mu*0.125));\n", + "print\"\\t Z is : \\t\",Z\n", + "N=3; # assume 3 horizontal rows\n", + "ho=300*(N**0.05); # (ho/(N**0.05))=300, from fig 20.11\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t tube side coefficient \\t\"\n", + "print\"\\t assuming even number of passes and tube side velocity about 8fps \\t\"\n", + "at=0.0775; # ft**2\n", + "Gt=(295*500/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t velocity is : fps \\t\",V\n", + "hi=2140; # Btu/(hr)*(ft**2)*(F), fig 25\n", + "ID=0.87; # ft\n", + "OD=1; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "a=0.2618; # ft**2, table 11\n", + "A1=(2*3*25*12*a);\n", + "print\"\\t total surface is : ft**2 \\t\",A1\n", + "T1=143; # inlet hot fluid,F\n", + "T2=130; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=110; # outlet cold fluid,F\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "delt1=40.;\n", + "delt2=33.;\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD # calculation mistake in book\n", + "R=0.65;\n", + "S=0.377;\n", + "FT=0.97; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "UD=(Q/(A1*(delt)));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.6 pgno:745" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t R is : \t2.0\n", + "\t V is : \t1.5\n", + "\t F is : \t1\n", + "\t Z is : \t0.733333333333\n", + "\t deltD is : \t1.1745\n", + "\t delt is : \t58.725\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t72.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=50.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "from math import log10\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "V=((T1+T2-t1-t2)/(t2-t1))/(2);\n", + "print\"\\t V is : \\t\",V\n", + "u=120;\n", + "U=60;\n", + "F=((u*1)/(U*2));\n", + "print\"\\t F is : \\t\",F\n", + "E=1.1; # In Fig.20.18b for R = 2.0and F = l.O,the abscissa and ordinate intersect at E =1.10.\n", + "Z=(E/V);\n", + "print\"\\t Z is : \\t\",Z\n", + "deltD=0.783*V; # deltD/V=0.783, from fig 20.17\n", + "print\"\\t deltD is : \\t\",deltD\n", + "delt=(deltD*(t2-t1));\n", + "print\"\\t delt is : \\t\",delt\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.7 pgno:752" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t beta is : \t0.0036\n", + "\t for sand \t\n", + "\t total heat required for sand is : Btu/hr \t36000.0\n", + "\t w is : lb/hr \t2000.0\n", + "\t R is : \t0.1\n", + "\t S is : \t0.909090909091\n", + "\t rate per tube is : lb/hr \t62.475\n", + "\t number of tubes : \t16.006402561\n", + "\t for air assume hoi=9 and Beta=0.2 \t\n", + "\t w1 is : lb/hr \t8000.0\n", + "\t rate per tube is : lb/hr \t39.0\n", + "\t number of tubes : \t25.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=284.; # inlet hot fluid,F\n", + "T2=104.; # outlet hot fluid,F\n", + "t1=86.; # inlet cold fluid,F\n", + "t2=104.; # outlet cold fluid,F\n", + "W=1000; # lb/hr\n", + "k=0.15; # thermal conductivity\n", + "L=10;\n", + "Beta=((2*k)/(500*(2./12.))); # hoi=500Btu/(hr)*(ft^2)*(F) for water\n", + "print\"\\t beta is : \\t\",Beta\n", + "print\"\\t for sand \\t\"\n", + "C=0.2; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for sand is : Btu/hr \\t\",Q\n", + "c=1;\n", + "w=(Q/(t2-t1));\n", + "print\"\\t w is : lb/hr \\t\",w\n", + "R=((W*C)/(w*c));\n", + "print\"\\t R is : \\t\",R\n", + "S=((T2-T1)/(t1-T1));\n", + "print\"\\t S is : \\t\",S\n", + "W1=(8.33*(k*L)/C); # ((W1*C)/(k*L))=8.33 from fig 20.20b for Beta=0\n", + "print\"\\t rate per tube is : lb/hr \\t\",W1\n", + "N1=(W/W1);\n", + "print\"\\t number of tubes : \\t\",N1\n", + "print\"\\t for air assume hoi=9 and Beta=0.2 \\t\"\n", + "c1=0.25;\n", + "w1=(Q/(c1*(t2-t1)));\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "W2=(5.23*(k*L)/C); # ((W1*C)/(k*L))=5.23 from fig 20.20b for Beta=0.2\n", + "print\"\\t rate per tube is : lb/hr \\t\",round(W2)\n", + "N2=(W/W2);\n", + "print\"\\t number of tubes : \\t\",round(N2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8a pgno758" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8a \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t Lb of water is : lb \t375.0\n", + "\t heat to be supplied : kwhr \t5.49531066823\n", + "\t losses \t\n", + "\t from surface of water : kwhr \t1\n", + "\t from sides of vessel : kwhr \t0.11\n", + "\t losses from bottom are negigible \t\n", + "\t total requirement : kwhr \t6.60531066823\n", + "\t steady state \t\n", + "\t heat to be supplied : kwhr \t1.9531066823\n", + "\t total requirement : kwhr \t3.06\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8a \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "L=3; # ft\n", + "B=2; # ft\n", + "h=18/12; # ft , height of water present in tank\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*h*62.5);\n", + "print\"\\t Lb of water is : lb \\t\",m\n", + "t1=50;\n", + "t2=150;\n", + "c=1;\n", + "Q=(m*c*(t2-t1))/(2*3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Q\n", + "print\"\\t losses \\t\"\n", + "Q1=(L*B*260)/(1000); # from fig 20.25c\n", + "print\"\\t from surface of water : kwhr \\t\",Q1\n", + "Q2=(5.5*((2*B*2)+(2*L*B))/(1000)); # from fig 20.25c\n", + "print\"\\t from sides of vessel : kwhr \\t\",Q2\n", + "print\"\\t losses from bottom are negigible \\t\"\n", + "Qt=(Q+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",Qt\n", + "print\"\\t steady state \\t\"\n", + "m1=8; # gal/hr\n", + "Qs=(m1*8.33*c*(t2-t1))/(3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Qs\n", + "Qts=(Qs+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",round(Qts,2)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8b pgno:760" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8b \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat to steel charge : Btu \t3600.0\n", + "\t heat to air : Btu \t540.0\n", + "\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \t\n", + "\t total requirement : kw \t3.71\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8b \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=100; # lb\n", + "t1=70;\n", + "t2=370; \n", + "L=4;\n", + "B=3;\n", + "n=4; # number of air changers\n", + "c1=0.12\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat to steel charge : Btu \\t\",Q1\n", + "c2=0.25\n", + "Q2=(n*L*B*2*0.075*c2*(t2-t1));\n", + "print\"\\t heat to air : Btu \\t\",Q2\n", + "print\"\\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \\t\"\n", + "Qt=((Q1+Q2)/(3412))+(2.5)\n", + "print\"\\t total requirement : kw \\t\",round(Qt,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8c pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8c \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat : Btu \t15187.5\n", + "\t velocity is : fps \t2.0\n", + "\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \t\n", + "\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8c \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=270; # cfm\n", + "t1=70;\n", + "t2=120; \n", + "L=1.5; # ft\n", + "B=1.5; # ft\n", + "c=0.25\n", + "row=0.075; # lb/ft^3\n", + "Q=(m*row*60*c*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q\n", + "V=(m/(L*B*60)); # fps\n", + "print\"\\t velocity is : fps \\t\",V\n", + "print\"\\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \\t\"\n", + "print\"\\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8d pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8d \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t weight of plate : lb \t81.25\n", + "\t heat : Btu \t2429.375\n", + "\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \t\n", + "\t radiation loss : kw \t0.7722\n", + "\t total requirement : kw \t1.48420908558\n", + "\t staedy state \t\n", + "\t heat : Btu \t3542.0\n", + "\t total requirement : kw \t1.83810082063\n", + "\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \t\n", + "\t delt is : F \t264.0\n", + "\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8d \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=70;\n", + "t2=300; \n", + "L=26; # in\n", + "B=12; # in\n", + "H=1; # in\n", + "c1=0.13\n", + "# specific gravity of cast iron is 7.2\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*H*62.5*7.2/1728); # lb\n", + "print\"\\t weight of plate : lb \\t\",m\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q1\n", + "print\"\\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \\t\"\n", + "Q2=(2*26*12*1.5*0.825/1000); # ke\n", + "print\"\\t radiation loss : kw \\t\",Q2\n", + "Qt=((Q1)/(3412))+(Q2);\n", + "print\"\\t total requirement : kw \\t\",Qt\n", + "print\"\\t staedy state \\t\"\n", + "m2=70;\n", + "c2=0.22;\n", + "Qs=(m2*c2*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Qs\n", + "Ql=0.8; # kw\n", + "Qts=((Qs)/(3412))+(Ql);\n", + "print\"\\t total requirement : kw \\t\",Qts\n", + "print\"\\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \\t\"\n", + "delt=(16*16.5);\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..417b7f25 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_3.ipynb @@ -0,0 +1,886 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Additoinal Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1 pgno:719" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t413.861386139\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t324.366270047\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t123.717442778\n", + "\t temperature difference is : F \t76.8232268984\n", + "\t temperature of the steam : F \t221.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T=150; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1100; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=3.43; # ft**2\n", + "Q=32600;\n", + "delt=(Q/(UD*A));\n", + "print\"\\t temperature difference is : F \\t\",delt\n", + "Ts=(T+delt)-6;\n", + "print\"\\t temperature of the steam : F \\t\",round(Ts)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 pgno:723" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t639.603960396\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t448.40351689\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t138.310019983\n", + "\t Area is : ft**2 \t3.36717676544\n", + "\t area per turn is : ft**2 \t0.3288208\n", + "\t number of turns : \t10.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=150; # F\n", + "T2=220; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1700; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Q=32600;\n", + "A=(Q/(UD*(T2-T1)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.1309; # ft**2/ft\n", + "a1=(3.14*0.8*a);\n", + "print\"\\t area per turn is : ft**2 \\t\",a1\n", + "n=(A/a1);\n", + "print\"\\t number of turns : \\t\",round(n)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 pgno:725" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for oil \t\n", + "\t total heat required for oil is : Btu/hr \t10062400.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t10200000\n", + "\t delt1 is : F \t80\n", + "\t delt2 is : F \t535\n", + "\t LMTD is F \t230\n", + "\t caloric temperature of hot fluid is : F \t437\n", + "\t caloric temperature of cold fluid is : \t130\n", + "\t hot fluid:inner tube side, oil \t\n", + "\t flow area is : ft**2 \t0.0458\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t722707.423581\n", + "\t reynolds number is : \t31455.9705947\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t101.239669421\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t83.8842975207\n", + "\t tw is : F \t240.107773852\n", + "\t tf is : F \t185.053886926\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t53.7985865724\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t34.9798966111\n", + "\t Area is : ft**2 \t1267.80895267\n", + "\t pipe length : \t58.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=675; # inlet hot fluid,F\n", + "T2=200; # outlet hot fluid,F\n", + "t1=120; # inlet cold fluid,F\n", + "t2=140; # outlet cold fluid,F\n", + "W=33100; # lb/hr\n", + "w=510000; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for oil \\t\"\n", + "c=0.64; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=230;\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, oil \\t\"\n", + "at=0.0458; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=5.56; # at 400F,lb/(ft)*(hr)\n", + "D=0.242; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=100; # from fig.24\n", + "Z=0.245; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft), fig 16\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=2.9; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=150; # Btu/(hr)*(ft**2)\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(tw+tc)/2;\n", + "print\"\\t tf is : F \\t\",tf\n", + "delt=110; # F\n", + "d0=3.5; # in, fig 10.4\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.917; # ft**2/ft, table 11\n", + "L=(A/(a*24));\n", + "print\"\\t pipe length : \\t\",round(L)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.4 pgno:729" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for SO2 \t\n", + "\t total heat required for SO2 is : Btu/hr \t166320.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t166500.0\n", + "\t delt1 is : F \t65.0\n", + "\t delt2 is : F \t350.0\n", + "\t LMTD is : F \t169.475824421\n", + "\t delt is : F \t166.086307932\n", + "\t caloric temperature of hot fluid is : F \t300.0\n", + "\t caloric temperature of cold fluid is : \t92.5\n", + "\t hot fluid:inner tube side, SO2 \t\n", + "\t flow area is : ft**2 \t0.0512\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t65625.0\n", + "\t reynolds number is : \t409756.097561\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t21.0800390625\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t18.4781599554\n", + "\t cold fluid water \t\n", + "\t G : lb/(hr)*(ft) \t693\n", + "\t Re is : \t1428.86597938\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t65.0\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t14.3879596501\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t12.5782116353\n", + "\t Area is : ft**2 \t78.10657332\n", + "\t pipe length : \t8.75\n" + ] + } + ], + "source": [ + "print\"\\t example 20.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=3360; # lb/hr\n", + "w=11100; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for SO2 \\t\"\n", + "c=0.165; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for SO2 is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=20;\n", + "S=0.0412;\n", + "FT=0.98; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, SO2 \\t\"\n", + "at=0.0512; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.041; # at 300F,lb/(ft)*(hr), fig 15\n", + "D=0.256; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=790; # from fig.24\n", + "Z=0.006831; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft)\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=3.068; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid water \\t\"\n", + "L=8; # ft\n", + "G=(w/(2*L));\n", + "print\"\\t G : lb/(hr)*(ft) \\t\",G\n", + "mu1=1.94; # at 92.5F, lb/(ft)*(hr)\n", + "Re=(4*G/mu1);\n", + "print\"\\t Re is : \\t\",Re\n", + "Do=0.292; # ft\n", + "ho=(65*(G/Do)**(1/3));\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A # calculation mistake in book\n", + "a=0.917; # ft**2/ft, table 11\n", + "l=(A/(a*8))-1.9;\n", + "print\"\\t pipe length : \\t\",round(l,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 20.5 pgno:736" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t evaporation percentage is : \t0.121913091814\n", + "\t heat load is : Btu/hr \t1917500\n", + "\t sensible heat is : Btu/hr \t1687400.0\n", + "\t final spray temperature is : F \t110.088095238\n", + "\t total spray : lb/hr \t84000.0\n", + "\t m is : lb/(hr)*(ft**2) \t875.0\n", + "\t Z is : \t1.12568513365\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t316.940192565\n", + "\t tube side coefficient \t\n", + "\t assuming even number of passes and tube side velocity about 8fps \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1903225.80645\n", + "\t velocity is : fps \t8.45878136201\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1861.8\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t270.83506906\n", + "\t total surface is : ft**2 \t471.24\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t33.0\n", + "\t LMTD is : F \t36.4287504681\n", + "\t delt is : F \t35.3358879541\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t115.153519517\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Nt=25.; # number of tubes\n", + "A=50.; # total projected area\n", + "Tav=100.; # F\n", + "s=28.; # assumption spray, lb/(min)*(ft**2)\n", + "Do=0.0833; # ft\n", + "PH=0.1562;\n", + "Y=0.874;\n", + "Z=0.466;\n", + "E=(0.171*(Do*Y*Z)**0.1); # (E/(Do*Y*Z)**0.1)=0.171, from fig 20.10\n", + "from math import log10\n", + "print\"\\t evaporation percentage is : \\t\",E\n", + "Q=(295*500*(143-130));\n", + "print\"\\t heat load is : Btu/hr \\t\",Q\n", + "Q1=(Q*(1-0.12));\n", + "print\"\\t sensible heat is : Btu/hr \\t\",Q1\n", + "t2=(90)+(Q1/(28*60*50));\n", + "print\"\\t final spray temperature is : F \\t\",t2\n", + "w=(s*60*50);\n", + "print\"\\t total spray : lb/hr \\t\",w\n", + "m=(w/(2*4*12));\n", + "print\"\\t m is : lb/(hr)*(ft**2) \\t\",m\n", + "mu=1.84; # lb/(ft)*(hr)\n", + "Z=((m**0.3)*Do*Y*Z/(mu*0.125));\n", + "print\"\\t Z is : \\t\",Z\n", + "N=3; # assume 3 horizontal rows\n", + "ho=300*(N**0.05); # (ho/(N**0.05))=300, from fig 20.11\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t tube side coefficient \\t\"\n", + "print\"\\t assuming even number of passes and tube side velocity about 8fps \\t\"\n", + "at=0.0775; # ft**2\n", + "Gt=(295*500/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t velocity is : fps \\t\",V\n", + "hi=2140; # Btu/(hr)*(ft**2)*(F), fig 25\n", + "ID=0.87; # ft\n", + "OD=1; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "a=0.2618; # ft**2, table 11\n", + "A1=(2*3*25*12*a);\n", + "print\"\\t total surface is : ft**2 \\t\",A1\n", + "T1=143; # inlet hot fluid,F\n", + "T2=130; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=110; # outlet cold fluid,F\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "delt1=40.;\n", + "delt2=33.;\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD # calculation mistake in book\n", + "R=0.65;\n", + "S=0.377;\n", + "FT=0.97; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "UD=(Q/(A1*(delt)));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.6 pgno:745" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t R is : \t2.0\n", + "\t V is : \t1.5\n", + "\t F is : \t1\n", + "\t Z is : \t0.733333333333\n", + "\t deltD is : \t1.1745\n", + "\t delt is : \t58.725\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t72.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=50.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "from math import log10\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "V=((T1+T2-t1-t2)/(t2-t1))/(2);\n", + "print\"\\t V is : \\t\",V\n", + "u=120;\n", + "U=60;\n", + "F=((u*1)/(U*2));\n", + "print\"\\t F is : \\t\",F\n", + "E=1.1; # In Fig.20.18b for R = 2.0and F = l.O,the abscissa and ordinate intersect at E =1.10.\n", + "Z=(E/V);\n", + "print\"\\t Z is : \\t\",Z\n", + "deltD=0.783*V; # deltD/V=0.783, from fig 20.17\n", + "print\"\\t deltD is : \\t\",deltD\n", + "delt=(deltD*(t2-t1));\n", + "print\"\\t delt is : \\t\",delt\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.7 pgno:752" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t beta is : \t0.0036\n", + "\t for sand \t\n", + "\t total heat required for sand is : Btu/hr \t36000.0\n", + "\t w is : lb/hr \t2000.0\n", + "\t R is : \t0.1\n", + "\t S is : \t0.909090909091\n", + "\t rate per tube is : lb/hr \t62.475\n", + "\t number of tubes : \t16.006402561\n", + "\t for air assume hoi=9 and Beta=0.2 \t\n", + "\t w1 is : lb/hr \t8000.0\n", + "\t rate per tube is : lb/hr \t39.0\n", + "\t number of tubes : \t25.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=284.; # inlet hot fluid,F\n", + "T2=104.; # outlet hot fluid,F\n", + "t1=86.; # inlet cold fluid,F\n", + "t2=104.; # outlet cold fluid,F\n", + "W=1000; # lb/hr\n", + "k=0.15; # thermal conductivity\n", + "L=10;\n", + "Beta=((2*k)/(500*(2./12.))); # hoi=500Btu/(hr)*(ft^2)*(F) for water\n", + "print\"\\t beta is : \\t\",Beta\n", + "print\"\\t for sand \\t\"\n", + "C=0.2; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for sand is : Btu/hr \\t\",Q\n", + "c=1;\n", + "w=(Q/(t2-t1));\n", + "print\"\\t w is : lb/hr \\t\",w\n", + "R=((W*C)/(w*c));\n", + "print\"\\t R is : \\t\",R\n", + "S=((T2-T1)/(t1-T1));\n", + "print\"\\t S is : \\t\",S\n", + "W1=(8.33*(k*L)/C); # ((W1*C)/(k*L))=8.33 from fig 20.20b for Beta=0\n", + "print\"\\t rate per tube is : lb/hr \\t\",W1\n", + "N1=(W/W1);\n", + "print\"\\t number of tubes : \\t\",N1\n", + "print\"\\t for air assume hoi=9 and Beta=0.2 \\t\"\n", + "c1=0.25;\n", + "w1=(Q/(c1*(t2-t1)));\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "W2=(5.23*(k*L)/C); # ((W1*C)/(k*L))=5.23 from fig 20.20b for Beta=0.2\n", + "print\"\\t rate per tube is : lb/hr \\t\",round(W2)\n", + "N2=(W/W2);\n", + "print\"\\t number of tubes : \\t\",round(N2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8a pgno758" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8a \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t Lb of water is : lb \t375.0\n", + "\t heat to be supplied : kwhr \t5.49531066823\n", + "\t losses \t\n", + "\t from surface of water : kwhr \t1\n", + "\t from sides of vessel : kwhr \t0.11\n", + "\t losses from bottom are negigible \t\n", + "\t total requirement : kwhr \t6.60531066823\n", + "\t steady state \t\n", + "\t heat to be supplied : kwhr \t1.9531066823\n", + "\t total requirement : kwhr \t3.06\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8a \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "L=3; # ft\n", + "B=2; # ft\n", + "h=18/12; # ft , height of water present in tank\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*h*62.5);\n", + "print\"\\t Lb of water is : lb \\t\",m\n", + "t1=50;\n", + "t2=150;\n", + "c=1;\n", + "Q=(m*c*(t2-t1))/(2*3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Q\n", + "print\"\\t losses \\t\"\n", + "Q1=(L*B*260)/(1000); # from fig 20.25c\n", + "print\"\\t from surface of water : kwhr \\t\",Q1\n", + "Q2=(5.5*((2*B*2)+(2*L*B))/(1000)); # from fig 20.25c\n", + "print\"\\t from sides of vessel : kwhr \\t\",Q2\n", + "print\"\\t losses from bottom are negigible \\t\"\n", + "Qt=(Q+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",Qt\n", + "print\"\\t steady state \\t\"\n", + "m1=8; # gal/hr\n", + "Qs=(m1*8.33*c*(t2-t1))/(3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Qs\n", + "Qts=(Qs+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",round(Qts,2)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8b pgno:760" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8b \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat to steel charge : Btu \t3600.0\n", + "\t heat to air : Btu \t540.0\n", + "\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \t\n", + "\t total requirement : kw \t3.71\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8b \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=100; # lb\n", + "t1=70;\n", + "t2=370; \n", + "L=4;\n", + "B=3;\n", + "n=4; # number of air changers\n", + "c1=0.12\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat to steel charge : Btu \\t\",Q1\n", + "c2=0.25\n", + "Q2=(n*L*B*2*0.075*c2*(t2-t1));\n", + "print\"\\t heat to air : Btu \\t\",Q2\n", + "print\"\\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \\t\"\n", + "Qt=((Q1+Q2)/(3412))+(2.5)\n", + "print\"\\t total requirement : kw \\t\",round(Qt,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8c pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8c \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat : Btu \t15187.5\n", + "\t velocity is : fps \t2.0\n", + "\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \t\n", + "\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8c \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=270; # cfm\n", + "t1=70;\n", + "t2=120; \n", + "L=1.5; # ft\n", + "B=1.5; # ft\n", + "c=0.25\n", + "row=0.075; # lb/ft^3\n", + "Q=(m*row*60*c*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q\n", + "V=(m/(L*B*60)); # fps\n", + "print\"\\t velocity is : fps \\t\",V\n", + "print\"\\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \\t\"\n", + "print\"\\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8d pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8d \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t weight of plate : lb \t81.25\n", + "\t heat : Btu \t2429.375\n", + "\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \t\n", + "\t radiation loss : kw \t0.7722\n", + "\t total requirement : kw \t1.48420908558\n", + "\t staedy state \t\n", + "\t heat : Btu \t3542.0\n", + "\t total requirement : kw \t1.83810082063\n", + "\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \t\n", + "\t delt is : F \t264.0\n", + "\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8d \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=70;\n", + "t2=300; \n", + "L=26; # in\n", + "B=12; # in\n", + "H=1; # in\n", + "c1=0.13\n", + "# specific gravity of cast iron is 7.2\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*H*62.5*7.2/1728); # lb\n", + "print\"\\t weight of plate : lb \\t\",m\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q1\n", + "print\"\\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \\t\"\n", + "Q2=(2*26*12*1.5*0.825/1000); # ke\n", + "print\"\\t radiation loss : kw \\t\",Q2\n", + "Qt=((Q1)/(3412))+(Q2);\n", + "print\"\\t total requirement : kw \\t\",Qt\n", + "print\"\\t staedy state \\t\"\n", + "m2=70;\n", + "c2=0.22;\n", + "Qs=(m2*c2*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Qs\n", + "Ql=0.8; # kw\n", + "Qts=((Qs)/(3412))+(Ql);\n", + "print\"\\t total requirement : kw \\t\",Qts\n", + "print\"\\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \\t\"\n", + "delt=(16*16.5);\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..417b7f25 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_20_Additoinal_Applications_4.ipynb @@ -0,0 +1,886 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Additoinal Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1 pgno:719" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t413.861386139\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t324.366270047\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t123.717442778\n", + "\t temperature difference is : F \t76.8232268984\n", + "\t temperature of the steam : F \t221.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T=150; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1100; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=3.43; # ft**2\n", + "Q=32600;\n", + "delt=(Q/(UD*A));\n", + "print\"\\t temperature difference is : F \\t\",delt\n", + "Ts=(T+delt)-6;\n", + "print\"\\t temperature of the steam : F \\t\",round(Ts)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2 pgno:723" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t Rej is : \t159198.113208\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t639.603960396\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t448.40351689\n", + "\t hd is : \t200.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t138.310019983\n", + "\t Area is : ft**2 \t3.36717676544\n", + "\t area per turn is : ft**2 \t0.3288208\n", + "\t number of turns : \t10.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=150; # F\n", + "T2=220; # F\n", + "L=0.6; # ft\n", + "N=7500; # rev/hr\n", + "row=62.5; # lb/ft**3\n", + "mu=1.06; # at 150 F and from fig 14, lb/ft*hr\n", + "k=0.38; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "c=1; # Btu/(lb)*(F)\n", + "Rej=(L**2)*(N)*(row)/(mu);\n", + "print\"\\t Rej is : \\t\",Rej\n", + "Z=1; # Z=(mu/muw)**(0.14), regarded as 1 for water\n", + "Dj=1.01; # ft, from table 11\n", + "j=1700; # fig 20.2\n", + "hi=((j)*(k/Dj)*((c*mu/k)**(1/3))*(Z)**(0.14));\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "hoi=1500; # Btu/(hr)*(ft**2)*(F)\n", + "Uc=((hi*hoi)/(hi+hoi)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.005;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Q=32600;\n", + "A=(Q/(UD*(T2-T1)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.1309; # ft**2/ft\n", + "a1=(3.14*0.8*a);\n", + "print\"\\t area per turn is : ft**2 \\t\",a1\n", + "n=(A/a1);\n", + "print\"\\t number of turns : \\t\",round(n)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.3 pgno:725" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for oil \t\n", + "\t total heat required for oil is : Btu/hr \t10062400.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t10200000\n", + "\t delt1 is : F \t80\n", + "\t delt2 is : F \t535\n", + "\t LMTD is F \t230\n", + "\t caloric temperature of hot fluid is : F \t437\n", + "\t caloric temperature of cold fluid is : \t130\n", + "\t hot fluid:inner tube side, oil \t\n", + "\t flow area is : ft**2 \t0.0458\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t722707.423581\n", + "\t reynolds number is : \t31455.9705947\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t101.239669421\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t83.8842975207\n", + "\t tw is : F \t240.107773852\n", + "\t tf is : F \t185.053886926\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t53.7985865724\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t34.9798966111\n", + "\t Area is : ft**2 \t1267.80895267\n", + "\t pipe length : \t58.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=675; # inlet hot fluid,F\n", + "T2=200; # outlet hot fluid,F\n", + "t1=120; # inlet cold fluid,F\n", + "t2=140; # outlet cold fluid,F\n", + "W=33100; # lb/hr\n", + "w=510000; # lb/hr\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for oil \\t\"\n", + "c=0.64; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=230;\n", + "print\"\\t LMTD is F \\t\",LMTD\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, oil \\t\"\n", + "at=0.0458; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=5.56; # at 400F,lb/(ft)*(hr)\n", + "D=0.242; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=100; # from fig.24\n", + "Z=0.245; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft), fig 16\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=2.9; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "ho=150; # Btu/(hr)*(ft**2)\n", + "tw=(tc)+(((hio)/(hio+ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "tf=(tw+tc)/2;\n", + "print\"\\t tf is : F \\t\",tf\n", + "delt=110; # F\n", + "d0=3.5; # in, fig 10.4\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A\n", + "a=0.917; # ft**2/ft, table 11\n", + "L=(A/(a*24));\n", + "print\"\\t pipe length : \\t\",round(L)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.4 pgno:729" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.4 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for SO2 \t\n", + "\t total heat required for SO2 is : Btu/hr \t166320.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t166500.0\n", + "\t delt1 is : F \t65.0\n", + "\t delt2 is : F \t350.0\n", + "\t LMTD is : F \t169.475824421\n", + "\t delt is : F \t166.086307932\n", + "\t caloric temperature of hot fluid is : F \t300.0\n", + "\t caloric temperature of cold fluid is : \t92.5\n", + "\t hot fluid:inner tube side, SO2 \t\n", + "\t flow area is : ft**2 \t0.0512\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t65625.0\n", + "\t reynolds number is : \t409756.097561\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t21.0800390625\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t18.4781599554\n", + "\t cold fluid water \t\n", + "\t G : lb/(hr)*(ft) \t693\n", + "\t Re is : \t1428.86597938\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t65.0\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t14.3879596501\n", + "\t hd is : \t100.0\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t12.5782116353\n", + "\t Area is : ft**2 \t78.10657332\n", + "\t pipe length : \t8.75\n" + ] + } + ], + "source": [ + "print\"\\t example 20.4 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "W=3360; # lb/hr\n", + "w=11100; # lb/hr\n", + "from math import log10\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for SO2 \\t\"\n", + "c=0.165; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for SO2 is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=20;\n", + "S=0.0412;\n", + "FT=0.98; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/(2); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/(2); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : \\t\",tc\n", + "print\"\\t hot fluid:inner tube side, SO2 \\t\"\n", + "at=0.0512; # flow area, ft**2, table 11\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(W/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.041; # at 300F,lb/(ft)*(hr), fig 15\n", + "D=0.256; # ft, table 11\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=790; # from fig.24\n", + "Z=0.006831; # Z=(k(c*mu/k)**(1/3)), Btu/(hr)*(ft)*(F/ft)\n", + "hi=((jH)*(Z/D)); #Hi=(hi/phyp),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=3.068; # ft\n", + "OD=3.5; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "print\"\\t cold fluid water \\t\"\n", + "L=8; # ft\n", + "G=(w/(2*L));\n", + "print\"\\t G : lb/(hr)*(ft) \\t\",G\n", + "mu1=1.94; # at 92.5F, lb/(ft)*(hr)\n", + "Re=(4*G/mu1);\n", + "print\"\\t Re is : \\t\",Re\n", + "Do=0.292; # ft\n", + "ho=(65*(G/Do)**(1/3));\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.01;\n", + "hd=(1/Rd);\n", + "print\"\\t hd is : \\t\",hd\n", + "UD=((Uc*hd)/(Uc+hd));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=(Q/(UD*(LMTD)));\n", + "print\"\\t Area is : ft**2 \\t\",A # calculation mistake in book\n", + "a=0.917; # ft**2/ft, table 11\n", + "l=(A/(a*8))-1.9;\n", + "print\"\\t pipe length : \\t\",round(l,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 20.5 pgno:736" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t evaporation percentage is : \t0.121913091814\n", + "\t heat load is : Btu/hr \t1917500\n", + "\t sensible heat is : Btu/hr \t1687400.0\n", + "\t final spray temperature is : F \t110.088095238\n", + "\t total spray : lb/hr \t84000.0\n", + "\t m is : lb/(hr)*(ft**2) \t875.0\n", + "\t Z is : \t1.12568513365\n", + "\t ho is : Btu/(hr)*(ft**2)*(F) \t316.940192565\n", + "\t tube side coefficient \t\n", + "\t assuming even number of passes and tube side velocity about 8fps \t\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1903225.80645\n", + "\t velocity is : fps \t8.45878136201\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t1861.8\n", + "\t Uc is : Btu/(hr)*(ft**2)*(F) \t270.83506906\n", + "\t total surface is : ft**2 \t471.24\n", + "\t delt1 is : F \t40.0\n", + "\t delt2 is : F \t33.0\n", + "\t LMTD is : F \t36.4287504681\n", + "\t delt is : F \t35.3358879541\n", + "\t UD is : Btu/(hr)*(ft**2)*(F) \t115.153519517\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t0.005\n", + "\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "Nt=25.; # number of tubes\n", + "A=50.; # total projected area\n", + "Tav=100.; # F\n", + "s=28.; # assumption spray, lb/(min)*(ft**2)\n", + "Do=0.0833; # ft\n", + "PH=0.1562;\n", + "Y=0.874;\n", + "Z=0.466;\n", + "E=(0.171*(Do*Y*Z)**0.1); # (E/(Do*Y*Z)**0.1)=0.171, from fig 20.10\n", + "from math import log10\n", + "print\"\\t evaporation percentage is : \\t\",E\n", + "Q=(295*500*(143-130));\n", + "print\"\\t heat load is : Btu/hr \\t\",Q\n", + "Q1=(Q*(1-0.12));\n", + "print\"\\t sensible heat is : Btu/hr \\t\",Q1\n", + "t2=(90)+(Q1/(28*60*50));\n", + "print\"\\t final spray temperature is : F \\t\",t2\n", + "w=(s*60*50);\n", + "print\"\\t total spray : lb/hr \\t\",w\n", + "m=(w/(2*4*12));\n", + "print\"\\t m is : lb/(hr)*(ft**2) \\t\",m\n", + "mu=1.84; # lb/(ft)*(hr)\n", + "Z=((m**0.3)*Do*Y*Z/(mu*0.125));\n", + "print\"\\t Z is : \\t\",Z\n", + "N=3; # assume 3 horizontal rows\n", + "ho=300*(N**0.05); # (ho/(N**0.05))=300, from fig 20.11\n", + "print\"\\t ho is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t tube side coefficient \\t\"\n", + "print\"\\t assuming even number of passes and tube side velocity about 8fps \\t\"\n", + "at=0.0775; # ft**2\n", + "Gt=(295*500/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t velocity is : fps \\t\",V\n", + "hi=2140; # Btu/(hr)*(ft**2)*(F), fig 25\n", + "ID=0.87; # ft\n", + "OD=1; # ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((ho*hio)/(ho+hio)); # from eq 6.38\n", + "print\"\\t Uc is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "a=0.2618; # ft**2, table 11\n", + "A1=(2*3*25*12*a);\n", + "print\"\\t total surface is : ft**2 \\t\",A1\n", + "T1=143; # inlet hot fluid,F\n", + "T2=130; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=110; # outlet cold fluid,F\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "delt1=40.;\n", + "delt2=33.;\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD # calculation mistake in book\n", + "R=0.65;\n", + "S=0.377;\n", + "FT=0.97; # fig 18\n", + "delt=(FT*LMTD);\n", + "print\"\\t delt is : F \\t\",delt\n", + "UD=(Q/(A1*(delt)));\n", + "print\"\\t UD is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",round(Rd,4)\n", + "print\"\\t The assumption of three horizontal rows is satisfactory, since a dirt factor of 0.004 was required \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.6 pgno:745" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.6 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t R is : \t2.0\n", + "\t V is : \t1.5\n", + "\t F is : \t1\n", + "\t Z is : \t0.733333333333\n", + "\t deltD is : \t1.1745\n", + "\t delt is : \t58.725\n", + "\t delt1 is : F \t50.0\n", + "\t delt2 is : F \t100.0\n", + "\t LMTD is : F \t72.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.6 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=200.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=50.; # inlet cold fluid,F\n", + "t2=100.; # outlet cold fluid,F\n", + "from math import log10\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "V=((T1+T2-t1-t2)/(t2-t1))/(2);\n", + "print\"\\t V is : \\t\",V\n", + "u=120;\n", + "U=60;\n", + "F=((u*1)/(U*2));\n", + "print\"\\t F is : \\t\",F\n", + "E=1.1; # In Fig.20.18b for R = 2.0and F = l.O,the abscissa and ordinate intersect at E =1.10.\n", + "Z=(E/V);\n", + "print\"\\t Z is : \\t\",Z\n", + "deltD=0.783*V; # deltD/V=0.783, from fig 20.17\n", + "print\"\\t deltD is : \\t\",deltD\n", + "delt=(deltD*(t2-t1));\n", + "print\"\\t delt is : \\t\",delt\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.7 pgno:752" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.7 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t beta is : \t0.0036\n", + "\t for sand \t\n", + "\t total heat required for sand is : Btu/hr \t36000.0\n", + "\t w is : lb/hr \t2000.0\n", + "\t R is : \t0.1\n", + "\t S is : \t0.909090909091\n", + "\t rate per tube is : lb/hr \t62.475\n", + "\t number of tubes : \t16.006402561\n", + "\t for air assume hoi=9 and Beta=0.2 \t\n", + "\t w1 is : lb/hr \t8000.0\n", + "\t rate per tube is : lb/hr \t39.0\n", + "\t number of tubes : \t25.0\n" + ] + } + ], + "source": [ + "print\"\\t example 20.7 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=284.; # inlet hot fluid,F\n", + "T2=104.; # outlet hot fluid,F\n", + "t1=86.; # inlet cold fluid,F\n", + "t2=104.; # outlet cold fluid,F\n", + "W=1000; # lb/hr\n", + "k=0.15; # thermal conductivity\n", + "L=10;\n", + "Beta=((2*k)/(500*(2./12.))); # hoi=500Btu/(hr)*(ft^2)*(F) for water\n", + "print\"\\t beta is : \\t\",Beta\n", + "print\"\\t for sand \\t\"\n", + "C=0.2; # Btu/(lb)*(F)\n", + "Q=((W)*(C)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for sand is : Btu/hr \\t\",Q\n", + "c=1;\n", + "w=(Q/(t2-t1));\n", + "print\"\\t w is : lb/hr \\t\",w\n", + "R=((W*C)/(w*c));\n", + "print\"\\t R is : \\t\",R\n", + "S=((T2-T1)/(t1-T1));\n", + "print\"\\t S is : \\t\",S\n", + "W1=(8.33*(k*L)/C); # ((W1*C)/(k*L))=8.33 from fig 20.20b for Beta=0\n", + "print\"\\t rate per tube is : lb/hr \\t\",W1\n", + "N1=(W/W1);\n", + "print\"\\t number of tubes : \\t\",N1\n", + "print\"\\t for air assume hoi=9 and Beta=0.2 \\t\"\n", + "c1=0.25;\n", + "w1=(Q/(c1*(t2-t1)));\n", + "print\"\\t w1 is : lb/hr \\t\",w1\n", + "W2=(5.23*(k*L)/C); # ((W1*C)/(k*L))=5.23 from fig 20.20b for Beta=0.2\n", + "print\"\\t rate per tube is : lb/hr \\t\",round(W2)\n", + "N2=(W/W2);\n", + "print\"\\t number of tubes : \\t\",round(N2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8a pgno758" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8a \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t Lb of water is : lb \t375.0\n", + "\t heat to be supplied : kwhr \t5.49531066823\n", + "\t losses \t\n", + "\t from surface of water : kwhr \t1\n", + "\t from sides of vessel : kwhr \t0.11\n", + "\t losses from bottom are negigible \t\n", + "\t total requirement : kwhr \t6.60531066823\n", + "\t steady state \t\n", + "\t heat to be supplied : kwhr \t1.9531066823\n", + "\t total requirement : kwhr \t3.06\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8a \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "L=3; # ft\n", + "B=2; # ft\n", + "h=18/12; # ft , height of water present in tank\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*h*62.5);\n", + "print\"\\t Lb of water is : lb \\t\",m\n", + "t1=50;\n", + "t2=150;\n", + "c=1;\n", + "Q=(m*c*(t2-t1))/(2*3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Q\n", + "print\"\\t losses \\t\"\n", + "Q1=(L*B*260)/(1000); # from fig 20.25c\n", + "print\"\\t from surface of water : kwhr \\t\",Q1\n", + "Q2=(5.5*((2*B*2)+(2*L*B))/(1000)); # from fig 20.25c\n", + "print\"\\t from sides of vessel : kwhr \\t\",Q2\n", + "print\"\\t losses from bottom are negigible \\t\"\n", + "Qt=(Q+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",Qt\n", + "print\"\\t steady state \\t\"\n", + "m1=8; # gal/hr\n", + "Qs=(m1*8.33*c*(t2-t1))/(3412); # kwhr\n", + "print\"\\t heat to be supplied : kwhr \\t\",Qs\n", + "Qts=(Qs+Q1+Q2);\n", + "print\"\\t total requirement : kwhr \\t\",round(Qts,2)\n", + "# end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8b pgno:760" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8b \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat to steel charge : Btu \t3600.0\n", + "\t heat to air : Btu \t540.0\n", + "\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \t\n", + "\t total requirement : kw \t3.71\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8b \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=100; # lb\n", + "t1=70;\n", + "t2=370; \n", + "L=4;\n", + "B=3;\n", + "n=4; # number of air changers\n", + "c1=0.12\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat to steel charge : Btu \\t\",Q1\n", + "c2=0.25\n", + "Q2=(n*L*B*2*0.075*c2*(t2-t1));\n", + "print\"\\t heat to air : Btu \\t\",Q2\n", + "print\"\\t From Fig. 20.25a for 52ft^2 of oven outside surface and a temperature rise of 300F the loss is 5kw for 1 in.thick insulations.For 2 in.thick insulation the loss is 2.5kw \\t\"\n", + "Qt=((Q1+Q2)/(3412))+(2.5)\n", + "print\"\\t total requirement : kw \\t\",round(Qt,2)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8c pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8c \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t heat : Btu \t15187.5\n", + "\t velocity is : fps \t2.0\n", + "\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \t\n", + "\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8c \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "m=270; # cfm\n", + "t1=70;\n", + "t2=120; \n", + "L=1.5; # ft\n", + "B=1.5; # ft\n", + "c=0.25\n", + "row=0.075; # lb/ft^3\n", + "Q=(m*row*60*c*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q\n", + "V=(m/(L*B*60)); # fps\n", + "print\"\\t velocity is : fps \\t\",V\n", + "print\"\\t Refer to Fig.20.22a.The air is capable of removing 33watts/in which is the maximum dissipation which may be expected. Any group of heaters providing 5 kw which do not require a dissipation of more than 33 w/in. and which will fit into the duct will be satisfactory \\t\"\n", + "print\"\\t Thus in Table 20.3 elements of 350 watts with a total length each of 18 in. each are satisfactory \\t\"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.8d pgno:762" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 20.8d \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t unsteady state \t\n", + "\t weight of plate : lb \t81.25\n", + "\t heat : Btu \t2429.375\n", + "\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \t\n", + "\t radiation loss : kw \t0.7722\n", + "\t total requirement : kw \t1.48420908558\n", + "\t staedy state \t\n", + "\t heat : Btu \t3542.0\n", + "\t total requirement : kw \t1.83810082063\n", + "\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \t\n", + "\t delt is : F \t264.0\n", + "\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \t\n" + ] + } + ], + "source": [ + "print\"\\t example 20.8d \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "t1=70;\n", + "t2=300; \n", + "L=26; # in\n", + "B=12; # in\n", + "H=1; # in\n", + "c1=0.13\n", + "# specific gravity of cast iron is 7.2\n", + "print\"\\t unsteady state \\t\"\n", + "m=(L*B*H*62.5*7.2/1728); # lb\n", + "print\"\\t weight of plate : lb \\t\",m\n", + "Q1=(m*c1*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Q1\n", + "print\"\\t From Figure 20.25b for a black body the radiation is 1.5w/in^2.The radiation from the top is actually 110 per cent of this value, and from the bottom of the plate it is 55 per cent for an average of 82.5 per cent is taken \\t\"\n", + "Q2=(2*26*12*1.5*0.825/1000); # ke\n", + "print\"\\t radiation loss : kw \\t\",Q2\n", + "Qt=((Q1)/(3412))+(Q2);\n", + "print\"\\t total requirement : kw \\t\",Qt\n", + "print\"\\t staedy state \\t\"\n", + "m2=70;\n", + "c2=0.22;\n", + "Qs=(m2*c2*(t2-t1));\n", + "print\"\\t heat : Btu \\t\",Qs\n", + "Ql=0.8; # kw\n", + "Qts=((Qs)/(3412))+(Ql);\n", + "print\"\\t total requirement : kw \\t\",Qts\n", + "print\"\\t The steady state is controlling.The requirements are satisfied, by four 24-in. strip heaters, but the sheath temperature must now be checked. Since the temperature drop per unit flux density is 14 to 19F, assume an average of 16.5DegF. For clamp-on strips 24 in. long the watts per square inch deliverable are 16 \\t\"\n", + "delt=(16*16.5);\n", + "print\"\\t delt is : F \\t\",delt\n", + "print\"\\t The sheath temperature is then 300 + 264 = 564DegF, which is satisfactory for steel sheathed elements with a 750F maximum. \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..d13df346 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_1.ipynb @@ -0,0 +1,282 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:CONDUCTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.1 pg:13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " heat is Btu/hr 69120.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "Tavg=900; # average temperature of the wall,F\n", + "k=0.15; # Thermal conductivity at 932 F,Btu/(hr)(ft^2)(F/ft)\n", + "T1=1500; # hot side temperature,F\n", + "T2=300; # cold side temperature,F\n", + "A=192; # surface area,ft^2\n", + "L=0.5; # thickness,ft\n", + "#solution\n", + "Q=(k)*(A)*(T1-T2)/L; # formula for heat,Btu/hr\n", + "print \" heat is Btu/hr \",Q\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.2 pg:14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t resistance offered by firebrick : (hr)*(F)/Btu 0.97\n", + "\t resistance offered by insulating brick : (hr)*(F)/Btu 2.2\n", + "\t resistance offered by buildingbrick : (hr)*(F)/Btu 1.25\n", + "\t total resistance offered by three walls : (hr)*(F)/Btu 4.42\n", + "\t heat loss/ft^2 : Btu/hr 331.0\n", + "\t delta is : F 322.0\n", + "\t temperature at interface of firebrick and insulating brick F 1278.0\n", + "\t deltb is : F 729.0\n", + "\t temperature at interface of insulating brick and building brick F 549.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "La=0.66; # Thickness of firebrick wall,ft\n", + "Lb=0.33; # Thickness of insulating brick wall,ft\n", + "Lc=0.5; # Thickness of building brick wall,ft\n", + "Ka=0.68; # themal conductivity of firebrick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kb=0.15; # themal conductivity of insulating brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kc=0.40; # themal conductivity of building brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "A=1.; # surface area,ft^2\n", + "Ta=1600.; # temperature of inner wall,F\n", + "Tb=125.; # temperature of outer wall.F\n", + "#solution\n", + "Ra=La/(Ka)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by firebrick : (hr)*(F)/Btu \",round(Ra,2)\n", + "Rb=Lb/(Kb)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by insulating brick : (hr)*(F)/Btu \",round(Rb,2)\n", + "Rc=Lc/(Kc)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by buildingbrick : (hr)*(F)/Btu \",round(Rc,2)\n", + "R=Ra+Rb+Rc; # total resistance offered by three walls,(hr)*(F)/Btu\n", + "print\"\\t total resistance offered by three walls : (hr)*(F)/Btu \",round(R,2)\n", + "Q=(1600-125)/4.45; # using formula for heat loss/ft^2,Btu/hr\n", + "print\"\\t heat loss/ft^2 : Btu/hr \",round(Q,0)\n", + "# T1,T2 are temperatures at interface of firebrick and insulating brick, and insulating brick and building brick respectively,F\n", + "delta=(Q)*(Ra); # formula for temperature difference,F\n", + "print\"\\t delta is : F \",round(delta,0)\n", + "T1=Ta-((Q)*(Ra)); # temperature at interface of firebrick and insulating brick,F\n", + "print\"\\t temperature at interface of firebrick and insulating brick F \",round(T1,0)\n", + "deltb=Q*(Rb);\n", + "print\"\\t deltb is : F \",round(deltb,0)\n", + "T2=T1-((Q)*(Rb)); #temperature at interface of insulating brick and building brick,F\n", + "print\"\\t temperature at interface of insulating brick and building brick F \",round(T2,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.3 pg:15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t resistance offered by air film (hr)(F)/Btu 0.79\n", + "\t total resistance (hr)(F)/Btu 5.24\n", + "\t heat loss Btu/hr 282.0\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "Lair=0.25/12; # thickness of air film,ft\n", + "Kair=0.0265; # thermal conductivity of air at 572F,Btu/(hr)*(ft^2)(F/ft)\n", + "A=1; # surface area,ft^2\n", + "#solution\n", + "Rair=Lair/(Kair*(A)); # resistance offered by air film, (hr)(F)/Btu\n", + "print\"\\t resistance offered by air film (hr)(F)/Btu \",round(Rair,2)\n", + "R=4.45; # resistance from previous example 2.2,(hr)(F)/Btu\n", + "Rt=(R)+Rair; # total resistance,(hr)(F)/Btu\n", + "print\"\\t total resistance (hr)(F)/Btu \",round(Rt,2)\n", + "Ta=1600; # temperature of inner wall,F\n", + "Tb=125; # temperature of outer wall,F\n", + "Q=(1600-125)/Rt; # heat loss, Btu/hr\n", + "print\"\\t heat loss Btu/hr \",round(Q,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.4 pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t heat flow is : Btu/(hr)*(ft) 543.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "k=0.63; # thermal conductivity of pipe, Btu/(hr)*(ft^2)*(F/ft)\n", + "Do=6. # in\n", + "Di=5. # in\n", + "Ti=200.;# inner side temperature,F\n", + "To=175.; # outer side temperature,F\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(2*(3.14)*(k)*(Ti-To))/(log (Do/Di)); # formula for heat flow,Btu/(hr)*(ft)\n", + "print\"\\t heat flow is : Btu/(hr)*(ft) \",round(q,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "# caculation mistake in book\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example2.5 pg 19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 104.4\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 122.300238658\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 102.9\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 125.4\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "t1=150; # assume temperature of outer surface of rockwool,F\n", + "ta=70; # temperature of surrounding air,F\n", + "ha=2.23; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(3.14)*(300-70)/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.23)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft), calculation mistake\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft) \",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((104.8)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=125; # assume temperature of outer surface of rockwool,F\n", + "ha=2.10; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "q=((3.14)*(300-70))/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.10)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft)\",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((103)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",round(t1,1)\n", + "# end \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/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 new file mode 100644 index 00000000..d13df346 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_2.ipynb @@ -0,0 +1,282 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:CONDUCTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.1 pg:13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " heat is Btu/hr 69120.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "Tavg=900; # average temperature of the wall,F\n", + "k=0.15; # Thermal conductivity at 932 F,Btu/(hr)(ft^2)(F/ft)\n", + "T1=1500; # hot side temperature,F\n", + "T2=300; # cold side temperature,F\n", + "A=192; # surface area,ft^2\n", + "L=0.5; # thickness,ft\n", + "#solution\n", + "Q=(k)*(A)*(T1-T2)/L; # formula for heat,Btu/hr\n", + "print \" heat is Btu/hr \",Q\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.2 pg:14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t resistance offered by firebrick : (hr)*(F)/Btu 0.97\n", + "\t resistance offered by insulating brick : (hr)*(F)/Btu 2.2\n", + "\t resistance offered by buildingbrick : (hr)*(F)/Btu 1.25\n", + "\t total resistance offered by three walls : (hr)*(F)/Btu 4.42\n", + "\t heat loss/ft^2 : Btu/hr 331.0\n", + "\t delta is : F 322.0\n", + "\t temperature at interface of firebrick and insulating brick F 1278.0\n", + "\t deltb is : F 729.0\n", + "\t temperature at interface of insulating brick and building brick F 549.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "La=0.66; # Thickness of firebrick wall,ft\n", + "Lb=0.33; # Thickness of insulating brick wall,ft\n", + "Lc=0.5; # Thickness of building brick wall,ft\n", + "Ka=0.68; # themal conductivity of firebrick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kb=0.15; # themal conductivity of insulating brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kc=0.40; # themal conductivity of building brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "A=1.; # surface area,ft^2\n", + "Ta=1600.; # temperature of inner wall,F\n", + "Tb=125.; # temperature of outer wall.F\n", + "#solution\n", + "Ra=La/(Ka)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by firebrick : (hr)*(F)/Btu \",round(Ra,2)\n", + "Rb=Lb/(Kb)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by insulating brick : (hr)*(F)/Btu \",round(Rb,2)\n", + "Rc=Lc/(Kc)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by buildingbrick : (hr)*(F)/Btu \",round(Rc,2)\n", + "R=Ra+Rb+Rc; # total resistance offered by three walls,(hr)*(F)/Btu\n", + "print\"\\t total resistance offered by three walls : (hr)*(F)/Btu \",round(R,2)\n", + "Q=(1600-125)/4.45; # using formula for heat loss/ft^2,Btu/hr\n", + "print\"\\t heat loss/ft^2 : Btu/hr \",round(Q,0)\n", + "# T1,T2 are temperatures at interface of firebrick and insulating brick, and insulating brick and building brick respectively,F\n", + "delta=(Q)*(Ra); # formula for temperature difference,F\n", + "print\"\\t delta is : F \",round(delta,0)\n", + "T1=Ta-((Q)*(Ra)); # temperature at interface of firebrick and insulating brick,F\n", + "print\"\\t temperature at interface of firebrick and insulating brick F \",round(T1,0)\n", + "deltb=Q*(Rb);\n", + "print\"\\t deltb is : F \",round(deltb,0)\n", + "T2=T1-((Q)*(Rb)); #temperature at interface of insulating brick and building brick,F\n", + "print\"\\t temperature at interface of insulating brick and building brick F \",round(T2,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.3 pg:15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t resistance offered by air film (hr)(F)/Btu 0.79\n", + "\t total resistance (hr)(F)/Btu 5.24\n", + "\t heat loss Btu/hr 282.0\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "Lair=0.25/12; # thickness of air film,ft\n", + "Kair=0.0265; # thermal conductivity of air at 572F,Btu/(hr)*(ft^2)(F/ft)\n", + "A=1; # surface area,ft^2\n", + "#solution\n", + "Rair=Lair/(Kair*(A)); # resistance offered by air film, (hr)(F)/Btu\n", + "print\"\\t resistance offered by air film (hr)(F)/Btu \",round(Rair,2)\n", + "R=4.45; # resistance from previous example 2.2,(hr)(F)/Btu\n", + "Rt=(R)+Rair; # total resistance,(hr)(F)/Btu\n", + "print\"\\t total resistance (hr)(F)/Btu \",round(Rt,2)\n", + "Ta=1600; # temperature of inner wall,F\n", + "Tb=125; # temperature of outer wall,F\n", + "Q=(1600-125)/Rt; # heat loss, Btu/hr\n", + "print\"\\t heat loss Btu/hr \",round(Q,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.4 pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t heat flow is : Btu/(hr)*(ft) 543.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "k=0.63; # thermal conductivity of pipe, Btu/(hr)*(ft^2)*(F/ft)\n", + "Do=6. # in\n", + "Di=5. # in\n", + "Ti=200.;# inner side temperature,F\n", + "To=175.; # outer side temperature,F\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(2*(3.14)*(k)*(Ti-To))/(log (Do/Di)); # formula for heat flow,Btu/(hr)*(ft)\n", + "print\"\\t heat flow is : Btu/(hr)*(ft) \",round(q,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "# caculation mistake in book\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example2.5 pg 19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 104.4\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 122.300238658\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 102.9\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 125.4\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "t1=150; # assume temperature of outer surface of rockwool,F\n", + "ta=70; # temperature of surrounding air,F\n", + "ha=2.23; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(3.14)*(300-70)/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.23)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft), calculation mistake\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft) \",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((104.8)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=125; # assume temperature of outer surface of rockwool,F\n", + "ha=2.10; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "q=((3.14)*(300-70))/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.10)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft)\",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((103)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",round(t1,1)\n", + "# end \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/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 new file mode 100644 index 00000000..d13df346 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_3.ipynb @@ -0,0 +1,282 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:CONDUCTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.1 pg:13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " heat is Btu/hr 69120.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "Tavg=900; # average temperature of the wall,F\n", + "k=0.15; # Thermal conductivity at 932 F,Btu/(hr)(ft^2)(F/ft)\n", + "T1=1500; # hot side temperature,F\n", + "T2=300; # cold side temperature,F\n", + "A=192; # surface area,ft^2\n", + "L=0.5; # thickness,ft\n", + "#solution\n", + "Q=(k)*(A)*(T1-T2)/L; # formula for heat,Btu/hr\n", + "print \" heat is Btu/hr \",Q\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.2 pg:14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t resistance offered by firebrick : (hr)*(F)/Btu 0.97\n", + "\t resistance offered by insulating brick : (hr)*(F)/Btu 2.2\n", + "\t resistance offered by buildingbrick : (hr)*(F)/Btu 1.25\n", + "\t total resistance offered by three walls : (hr)*(F)/Btu 4.42\n", + "\t heat loss/ft^2 : Btu/hr 331.0\n", + "\t delta is : F 322.0\n", + "\t temperature at interface of firebrick and insulating brick F 1278.0\n", + "\t deltb is : F 729.0\n", + "\t temperature at interface of insulating brick and building brick F 549.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "La=0.66; # Thickness of firebrick wall,ft\n", + "Lb=0.33; # Thickness of insulating brick wall,ft\n", + "Lc=0.5; # Thickness of building brick wall,ft\n", + "Ka=0.68; # themal conductivity of firebrick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kb=0.15; # themal conductivity of insulating brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kc=0.40; # themal conductivity of building brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "A=1.; # surface area,ft^2\n", + "Ta=1600.; # temperature of inner wall,F\n", + "Tb=125.; # temperature of outer wall.F\n", + "#solution\n", + "Ra=La/(Ka)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by firebrick : (hr)*(F)/Btu \",round(Ra,2)\n", + "Rb=Lb/(Kb)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by insulating brick : (hr)*(F)/Btu \",round(Rb,2)\n", + "Rc=Lc/(Kc)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by buildingbrick : (hr)*(F)/Btu \",round(Rc,2)\n", + "R=Ra+Rb+Rc; # total resistance offered by three walls,(hr)*(F)/Btu\n", + "print\"\\t total resistance offered by three walls : (hr)*(F)/Btu \",round(R,2)\n", + "Q=(1600-125)/4.45; # using formula for heat loss/ft^2,Btu/hr\n", + "print\"\\t heat loss/ft^2 : Btu/hr \",round(Q,0)\n", + "# T1,T2 are temperatures at interface of firebrick and insulating brick, and insulating brick and building brick respectively,F\n", + "delta=(Q)*(Ra); # formula for temperature difference,F\n", + "print\"\\t delta is : F \",round(delta,0)\n", + "T1=Ta-((Q)*(Ra)); # temperature at interface of firebrick and insulating brick,F\n", + "print\"\\t temperature at interface of firebrick and insulating brick F \",round(T1,0)\n", + "deltb=Q*(Rb);\n", + "print\"\\t deltb is : F \",round(deltb,0)\n", + "T2=T1-((Q)*(Rb)); #temperature at interface of insulating brick and building brick,F\n", + "print\"\\t temperature at interface of insulating brick and building brick F \",round(T2,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.3 pg:15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t resistance offered by air film (hr)(F)/Btu 0.79\n", + "\t total resistance (hr)(F)/Btu 5.24\n", + "\t heat loss Btu/hr 282.0\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "Lair=0.25/12; # thickness of air film,ft\n", + "Kair=0.0265; # thermal conductivity of air at 572F,Btu/(hr)*(ft^2)(F/ft)\n", + "A=1; # surface area,ft^2\n", + "#solution\n", + "Rair=Lair/(Kair*(A)); # resistance offered by air film, (hr)(F)/Btu\n", + "print\"\\t resistance offered by air film (hr)(F)/Btu \",round(Rair,2)\n", + "R=4.45; # resistance from previous example 2.2,(hr)(F)/Btu\n", + "Rt=(R)+Rair; # total resistance,(hr)(F)/Btu\n", + "print\"\\t total resistance (hr)(F)/Btu \",round(Rt,2)\n", + "Ta=1600; # temperature of inner wall,F\n", + "Tb=125; # temperature of outer wall,F\n", + "Q=(1600-125)/Rt; # heat loss, Btu/hr\n", + "print\"\\t heat loss Btu/hr \",round(Q,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.4 pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t heat flow is : Btu/(hr)*(ft) 543.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "k=0.63; # thermal conductivity of pipe, Btu/(hr)*(ft^2)*(F/ft)\n", + "Do=6. # in\n", + "Di=5. # in\n", + "Ti=200.;# inner side temperature,F\n", + "To=175.; # outer side temperature,F\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(2*(3.14)*(k)*(Ti-To))/(log (Do/Di)); # formula for heat flow,Btu/(hr)*(ft)\n", + "print\"\\t heat flow is : Btu/(hr)*(ft) \",round(q,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "# caculation mistake in book\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example2.5 pg 19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 104.4\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 122.300238658\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 102.9\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 125.4\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "t1=150; # assume temperature of outer surface of rockwool,F\n", + "ta=70; # temperature of surrounding air,F\n", + "ha=2.23; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(3.14)*(300-70)/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.23)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft), calculation mistake\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft) \",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((104.8)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=125; # assume temperature of outer surface of rockwool,F\n", + "ha=2.10; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "q=((3.14)*(300-70))/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.10)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft)\",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((103)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",round(t1,1)\n", + "# end \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/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 new file mode 100644 index 00000000..d13df346 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_2_Conduction_4.ipynb @@ -0,0 +1,282 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:CONDUCTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.1 pg:13" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " heat is Btu/hr 69120.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "Tavg=900; # average temperature of the wall,F\n", + "k=0.15; # Thermal conductivity at 932 F,Btu/(hr)(ft^2)(F/ft)\n", + "T1=1500; # hot side temperature,F\n", + "T2=300; # cold side temperature,F\n", + "A=192; # surface area,ft^2\n", + "L=0.5; # thickness,ft\n", + "#solution\n", + "Q=(k)*(A)*(T1-T2)/L; # formula for heat,Btu/hr\n", + "print \" heat is Btu/hr \",Q\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.2 pg:14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t resistance offered by firebrick : (hr)*(F)/Btu 0.97\n", + "\t resistance offered by insulating brick : (hr)*(F)/Btu 2.2\n", + "\t resistance offered by buildingbrick : (hr)*(F)/Btu 1.25\n", + "\t total resistance offered by three walls : (hr)*(F)/Btu 4.42\n", + "\t heat loss/ft^2 : Btu/hr 331.0\n", + "\t delta is : F 322.0\n", + "\t temperature at interface of firebrick and insulating brick F 1278.0\n", + "\t deltb is : F 729.0\n", + "\t temperature at interface of insulating brick and building brick F 549.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "La=0.66; # Thickness of firebrick wall,ft\n", + "Lb=0.33; # Thickness of insulating brick wall,ft\n", + "Lc=0.5; # Thickness of building brick wall,ft\n", + "Ka=0.68; # themal conductivity of firebrick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kb=0.15; # themal conductivity of insulating brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "Kc=0.40; # themal conductivity of building brick,Btu/(hr)*(ft^2)*(F/ft)\n", + "A=1.; # surface area,ft^2\n", + "Ta=1600.; # temperature of inner wall,F\n", + "Tb=125.; # temperature of outer wall.F\n", + "#solution\n", + "Ra=La/(Ka)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by firebrick : (hr)*(F)/Btu \",round(Ra,2)\n", + "Rb=Lb/(Kb)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by insulating brick : (hr)*(F)/Btu \",round(Rb,2)\n", + "Rc=Lc/(Kc)*(A); # formula for resistance,(hr)*(F)/Btu\n", + "print\"\\t resistance offered by buildingbrick : (hr)*(F)/Btu \",round(Rc,2)\n", + "R=Ra+Rb+Rc; # total resistance offered by three walls,(hr)*(F)/Btu\n", + "print\"\\t total resistance offered by three walls : (hr)*(F)/Btu \",round(R,2)\n", + "Q=(1600-125)/4.45; # using formula for heat loss/ft^2,Btu/hr\n", + "print\"\\t heat loss/ft^2 : Btu/hr \",round(Q,0)\n", + "# T1,T2 are temperatures at interface of firebrick and insulating brick, and insulating brick and building brick respectively,F\n", + "delta=(Q)*(Ra); # formula for temperature difference,F\n", + "print\"\\t delta is : F \",round(delta,0)\n", + "T1=Ta-((Q)*(Ra)); # temperature at interface of firebrick and insulating brick,F\n", + "print\"\\t temperature at interface of firebrick and insulating brick F \",round(T1,0)\n", + "deltb=Q*(Rb);\n", + "print\"\\t deltb is : F \",round(deltb,0)\n", + "T2=T1-((Q)*(Rb)); #temperature at interface of insulating brick and building brick,F\n", + "print\"\\t temperature at interface of insulating brick and building brick F \",round(T2,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.3 pg:15" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t resistance offered by air film (hr)(F)/Btu 0.79\n", + "\t total resistance (hr)(F)/Btu 5.24\n", + "\t heat loss Btu/hr 282.0\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "Lair=0.25/12; # thickness of air film,ft\n", + "Kair=0.0265; # thermal conductivity of air at 572F,Btu/(hr)*(ft^2)(F/ft)\n", + "A=1; # surface area,ft^2\n", + "#solution\n", + "Rair=Lair/(Kair*(A)); # resistance offered by air film, (hr)(F)/Btu\n", + "print\"\\t resistance offered by air film (hr)(F)/Btu \",round(Rair,2)\n", + "R=4.45; # resistance from previous example 2.2,(hr)(F)/Btu\n", + "Rt=(R)+Rair; # total resistance,(hr)(F)/Btu\n", + "print\"\\t total resistance (hr)(F)/Btu \",round(Rt,2)\n", + "Ta=1600; # temperature of inner wall,F\n", + "Tb=125; # temperature of outer wall,F\n", + "Q=(1600-125)/Rt; # heat loss, Btu/hr\n", + "print\"\\t heat loss Btu/hr \",round(Q,0)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example2.4 pg 16" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t heat flow is : Btu/(hr)*(ft) 543.0\n", + "\t approximate values are mentioned in the book \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "k=0.63; # thermal conductivity of pipe, Btu/(hr)*(ft^2)*(F/ft)\n", + "Do=6. # in\n", + "Di=5. # in\n", + "Ti=200.;# inner side temperature,F\n", + "To=175.; # outer side temperature,F\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(2*(3.14)*(k)*(Ti-To))/(log (Do/Di)); # formula for heat flow,Btu/(hr)*(ft)\n", + "print\"\\t heat flow is : Btu/(hr)*(ft) \",round(q,0)\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "# caculation mistake in book\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example2.5 pg 19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 104.4\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 122.300238658\n", + "\t heat loss for linear foot is : Btu/(hr)*(lin ft) 102.9\n", + "\t Check between ts and t1, since delt/R = deltc/Rc \n", + "\t t1 is : F 125.4\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "t1=150; # assume temperature of outer surface of rockwool,F\n", + "ta=70; # temperature of surrounding air,F\n", + "ha=2.23; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "#solution\n", + "import math\n", + "from math import log\n", + "q=(3.14)*(300-70)/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.23)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft), calculation mistake\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft) \",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((104.8)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=125; # assume temperature of outer surface of rockwool,F\n", + "ha=2.10; # surface coefficient,Btu/(hr)*(ft^2)*(F)\n", + "q=((3.14)*(300-70))/(((1/(2*0.033))*log(3.375/2.375))+(1/((2.10)*(3.375/12)))); # using formula for heat loss,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss for linear foot is : Btu/(hr)*(lin ft)\",round(q,1)\n", + "print\"\\t Check between ts and t1, since delt/R = deltc/Rc \"\n", + "t1=300-(((103)*((1)*(log(3.375/2.375))))/((2)*(3.14)*(.033))); # using eq 2.31,F\n", + "print\"\\t t1 is : F \",round(t1,1)\n", + "# end \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/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 new file mode 100644 index 00000000..769fa4d0 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_1.ipynb @@ -0,0 +1,199 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Radiation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 3500.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\";\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "#solution\n", + "Q=((0.173)*((14.6)**4-(12.6)**4)); # using eq.4.24,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 1826.0\n", + "\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "e1=0.6; # emissivity of hotter wall\n", + "e2=0.8; # emissivity of colder wall\n", + "#solution\n", + "Q=(((0.173)/((1/0.6)+(1/0.8)-1))*((14.6)**4-(12.6)**4)); # using eq.4.26,heat loss per unit area,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "print\"\\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t area is : ft**2/lin ft 0.88\n", + "\t heat loss is : Btu/(hr)*(lin ft) 52.4\n", + "\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) 1.08\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=125.+460.; # R\n", + "T2=70.+460.; # R\n", + "e=0.9; # emissivity,using table 4.1B\n", + "#solution\n", + "from math import pi\n", + "A=(pi)*(3.375/12)*(1); # area,ft**2/lin ft\n", + "print\"\\t area is : ft**2/lin ft \",round(A,2)\n", + "Q=(0.9)*(0.88)*(0.173)*((T1/100)**4-(T2/100)**4); # heat loss using eq.4.32,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss is : Btu/(hr)*(lin ft) \",round(Q,1)\n", + "hr=(Q)/((A)*(T1-T2)); # fictitious film coefficient,using eq 4.33,Btu/(hr)(ft**2)(F)\n", + "print\"\\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) \",round(hr,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t surface area of pipe is : ft**2/lin ft 0.62\n", + "\t surface area of duct is : ft**2/lin ft 4\n", + "\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\n", + "\t Fe is : 0.6\n", + "\t heat loss due to radiation is : Btu/(hr)*(lin ft) 162.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300+460; # R\n", + "T2=75+460; #R\n", + "A1=0.622; # area from table 11 in the appendix A,ft**2/lin ft\n", + "A2=4*(1*1); # surface area of duct,ft**2/lin ft\n", + "e1=0.79; # emissivity of oxidized steel from table 4.1\n", + "e2=0.276; # emissivity of oxidized zinc from table 4.1\n", + "print\"\\t surface area of pipe is : ft**2/lin ft \",round(A1,2)\n", + "print\"\\t surface area of duct is : ft**2/lin ft \",A2\n", + "print\"\\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\"\n", + "Fa=1; # from table 4.2\n", + "Fe=((1)/((1/e1)+((A1/A2)*((1/e2)-1)))); # from table 4.2\n", + "print\"\\t Fe is : \",round(Fe,2)\n", + "Q=(0.173*10**-8)*(Fa)*(Fe)*(A1)*((T1)**4-(T2)**4); # heat loss due to radiation,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss due to radiation is : Btu/(hr)*(lin ft) \",round(Q,0)\n", + "# end\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/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 new file mode 100644 index 00000000..769fa4d0 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_2.ipynb @@ -0,0 +1,199 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Radiation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 3500.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\";\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "#solution\n", + "Q=((0.173)*((14.6)**4-(12.6)**4)); # using eq.4.24,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 1826.0\n", + "\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "e1=0.6; # emissivity of hotter wall\n", + "e2=0.8; # emissivity of colder wall\n", + "#solution\n", + "Q=(((0.173)/((1/0.6)+(1/0.8)-1))*((14.6)**4-(12.6)**4)); # using eq.4.26,heat loss per unit area,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "print\"\\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t area is : ft**2/lin ft 0.88\n", + "\t heat loss is : Btu/(hr)*(lin ft) 52.4\n", + "\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) 1.08\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=125.+460.; # R\n", + "T2=70.+460.; # R\n", + "e=0.9; # emissivity,using table 4.1B\n", + "#solution\n", + "from math import pi\n", + "A=(pi)*(3.375/12)*(1); # area,ft**2/lin ft\n", + "print\"\\t area is : ft**2/lin ft \",round(A,2)\n", + "Q=(0.9)*(0.88)*(0.173)*((T1/100)**4-(T2/100)**4); # heat loss using eq.4.32,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss is : Btu/(hr)*(lin ft) \",round(Q,1)\n", + "hr=(Q)/((A)*(T1-T2)); # fictitious film coefficient,using eq 4.33,Btu/(hr)(ft**2)(F)\n", + "print\"\\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) \",round(hr,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t surface area of pipe is : ft**2/lin ft 0.62\n", + "\t surface area of duct is : ft**2/lin ft 4\n", + "\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\n", + "\t Fe is : 0.6\n", + "\t heat loss due to radiation is : Btu/(hr)*(lin ft) 162.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300+460; # R\n", + "T2=75+460; #R\n", + "A1=0.622; # area from table 11 in the appendix A,ft**2/lin ft\n", + "A2=4*(1*1); # surface area of duct,ft**2/lin ft\n", + "e1=0.79; # emissivity of oxidized steel from table 4.1\n", + "e2=0.276; # emissivity of oxidized zinc from table 4.1\n", + "print\"\\t surface area of pipe is : ft**2/lin ft \",round(A1,2)\n", + "print\"\\t surface area of duct is : ft**2/lin ft \",A2\n", + "print\"\\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\"\n", + "Fa=1; # from table 4.2\n", + "Fe=((1)/((1/e1)+((A1/A2)*((1/e2)-1)))); # from table 4.2\n", + "print\"\\t Fe is : \",round(Fe,2)\n", + "Q=(0.173*10**-8)*(Fa)*(Fe)*(A1)*((T1)**4-(T2)**4); # heat loss due to radiation,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss due to radiation is : Btu/(hr)*(lin ft) \",round(Q,0)\n", + "# end\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/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 new file mode 100644 index 00000000..769fa4d0 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_3.ipynb @@ -0,0 +1,199 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Radiation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 3500.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\";\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "#solution\n", + "Q=((0.173)*((14.6)**4-(12.6)**4)); # using eq.4.24,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 1826.0\n", + "\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "e1=0.6; # emissivity of hotter wall\n", + "e2=0.8; # emissivity of colder wall\n", + "#solution\n", + "Q=(((0.173)/((1/0.6)+(1/0.8)-1))*((14.6)**4-(12.6)**4)); # using eq.4.26,heat loss per unit area,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "print\"\\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t area is : ft**2/lin ft 0.88\n", + "\t heat loss is : Btu/(hr)*(lin ft) 52.4\n", + "\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) 1.08\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=125.+460.; # R\n", + "T2=70.+460.; # R\n", + "e=0.9; # emissivity,using table 4.1B\n", + "#solution\n", + "from math import pi\n", + "A=(pi)*(3.375/12)*(1); # area,ft**2/lin ft\n", + "print\"\\t area is : ft**2/lin ft \",round(A,2)\n", + "Q=(0.9)*(0.88)*(0.173)*((T1/100)**4-(T2/100)**4); # heat loss using eq.4.32,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss is : Btu/(hr)*(lin ft) \",round(Q,1)\n", + "hr=(Q)/((A)*(T1-T2)); # fictitious film coefficient,using eq 4.33,Btu/(hr)(ft**2)(F)\n", + "print\"\\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) \",round(hr,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t surface area of pipe is : ft**2/lin ft 0.62\n", + "\t surface area of duct is : ft**2/lin ft 4\n", + "\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\n", + "\t Fe is : 0.6\n", + "\t heat loss due to radiation is : Btu/(hr)*(lin ft) 162.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300+460; # R\n", + "T2=75+460; #R\n", + "A1=0.622; # area from table 11 in the appendix A,ft**2/lin ft\n", + "A2=4*(1*1); # surface area of duct,ft**2/lin ft\n", + "e1=0.79; # emissivity of oxidized steel from table 4.1\n", + "e2=0.276; # emissivity of oxidized zinc from table 4.1\n", + "print\"\\t surface area of pipe is : ft**2/lin ft \",round(A1,2)\n", + "print\"\\t surface area of duct is : ft**2/lin ft \",A2\n", + "print\"\\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\"\n", + "Fa=1; # from table 4.2\n", + "Fe=((1)/((1/e1)+((A1/A2)*((1/e2)-1)))); # from table 4.2\n", + "print\"\\t Fe is : \",round(Fe,2)\n", + "Q=(0.173*10**-8)*(Fa)*(Fe)*(A1)*((T1)**4-(T2)**4); # heat loss due to radiation,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss due to radiation is : Btu/(hr)*(lin ft) \",round(Q,0)\n", + "# end\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/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 new file mode 100644 index 00000000..769fa4d0 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_4_Radiation_4.ipynb @@ -0,0 +1,199 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Radiation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 3500.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\";\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "#solution\n", + "Q=((0.173)*((14.6)**4-(12.6)**4)); # using eq.4.24,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) 1826.0\n", + "\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=1000+460; # R\n", + "T2=800+460; # R\n", + "e1=0.6; # emissivity of hotter wall\n", + "e2=0.8; # emissivity of colder wall\n", + "#solution\n", + "Q=(((0.173)/((1/0.6)+(1/0.8)-1))*((14.6)**4-(12.6)**4)); # using eq.4.26,heat loss per unit area,Btu/(hr)*(ft**2)\n", + "#results\n", + "print\"\\t heat removed from colder wall per unit area is : Btu/(hr)*(ft**2) \",round(Q,0)\n", + "print\"\\t For perfect black bodies the value was 3500 Btu/(hr)(ft**2) \"\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t area is : ft**2/lin ft 0.88\n", + "\t heat loss is : Btu/(hr)*(lin ft) 52.4\n", + "\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) 1.08\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=125.+460.; # R\n", + "T2=70.+460.; # R\n", + "e=0.9; # emissivity,using table 4.1B\n", + "#solution\n", + "from math import pi\n", + "A=(pi)*(3.375/12)*(1); # area,ft**2/lin ft\n", + "print\"\\t area is : ft**2/lin ft \",round(A,2)\n", + "Q=(0.9)*(0.88)*(0.173)*((T1/100)**4-(T2/100)**4); # heat loss using eq.4.32,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss is : Btu/(hr)*(lin ft) \",round(Q,1)\n", + "hr=(Q)/((A)*(T1-T2)); # fictitious film coefficient,using eq 4.33,Btu/(hr)(ft**2)(F)\n", + "print\"\\t fictitious film coefficient is : Btu/(hr)(ft**2)(F) \",round(hr,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t surface area of pipe is : ft**2/lin ft 0.62\n", + "\t surface area of duct is : ft**2/lin ft 4\n", + "\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\n", + "\t Fe is : 0.6\n", + "\t heat loss due to radiation is : Btu/(hr)*(lin ft) 162.0\n" + ] + } + ], + "source": [ + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300+460; # R\n", + "T2=75+460; #R\n", + "A1=0.622; # area from table 11 in the appendix A,ft**2/lin ft\n", + "A2=4*(1*1); # surface area of duct,ft**2/lin ft\n", + "e1=0.79; # emissivity of oxidized steel from table 4.1\n", + "e2=0.276; # emissivity of oxidized zinc from table 4.1\n", + "print\"\\t surface area of pipe is : ft**2/lin ft \",round(A1,2)\n", + "print\"\\t surface area of duct is : ft**2/lin ft \",A2\n", + "print\"\\t The surface of the pipe is not negligible by comparison with that of the duct, and(f) of Table 4.2 applies most nearly\"\n", + "Fa=1; # from table 4.2\n", + "Fe=((1)/((1/e1)+((A1/A2)*((1/e2)-1)))); # from table 4.2\n", + "print\"\\t Fe is : \",round(Fe,2)\n", + "Q=(0.173*10**-8)*(Fa)*(Fe)*(A1)*((T1)**4-(T2)**4); # heat loss due to radiation,Btu/(hr)*(lin ft)\n", + "print\"\\t heat loss due to radiation is : Btu/(hr)*(lin ft) \",round(Q,0)\n", + "# end\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/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 new file mode 100644 index 00000000..2fa21473 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_1.ipynb @@ -0,0 +1,399 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Temperature" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1 pgno:90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 100.0\n", + "\t LMTDc is : F 123.3\n", + "\t for parallel flow \n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTDp is : F 108.0\n" + ] + } + ], + "source": [ + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=150.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDc=((delt2-delt1)/(log(delt2/delt1)));\n", + "print\"\\t LMTDc is : F \",round(LMTDc,1)\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDp=((delt2-delt1)/((log(delt2/delt1))));\n", + "print\"\\t LMTDp is : F \",round(LMTDp,0)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTD is : F 72.1347520444\n", + "\t for parallel flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 0.0\n", + "\t denominator becomes infinity so LMTD becomes Zero \n", + "\n", + "\t LMTD is Zero \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=150.; # cold fluid inlet temperature,F\n", + "t2=200.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delth is : F 25.0\n", + "\t deltc is : F 100.0\n", + "\t LMTD is : F 54.1\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t delth is : F \",delth\n", + "print\"\\t deltc is : F \",deltc\n", + "LMTD=((delth-deltc)/((1)*(log(delth/deltc))))\n", + "print\"\\t LMTD is : F \",round(LMTD,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4 pgno:92" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.4 \n", + "\n", + "\t process is isothermal with hot fluid so temperature of hot fluid remains constant \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delt1 is : F 25.0\n", + "\t delt2 is : F 200.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t for parallel flow \n", + "\n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 25.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t these are identical \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 5.4 \\n\"\n", + "print\"\\t process is isothermal with hot fluid so temperature of hot fluid remains constant \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=300.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \\n\"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "print\"\\t these are identical \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for inlet \t\n", + "\t Re is : \t2589.0\n", + "\t Pr is : \t3.52\n", + "\t nusselt number is : \t105.0\n", + "\t heat transfer coefficient is : 158.0\n", + "\t for outlet \t\n", + "\t Re is : \t3372.0\n", + "\t Pr is : \t3.23\n", + "\t nusselt number is : \t125.0\n", + "\t heat transfer coefficient is : 189.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t for inlet \\t\"\n", + "t1=99.1; # temperature of inlet,F\n", + "t2=129.2; # temperature of outlet,F\n", + "c=.478; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=7.139; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(0.9);\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "print\"\\t for outlet \\t\"\n", + "c=.495; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=2.20*2.42; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(.9); # reynolds number raised to poer 0.9, calculation mistake in book\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6 pgno:97" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.6 \n", + "\t approximate values are mentioned in the book \n", + "\t for counter current flow \n", + "\t temperature difference for crude oil is : F 100\n", + "\t temperature difference for gasoline is : F 40\n", + "\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \n", + "\t deltc is : F 120\n", + "\t delth is : F 180\n", + "\t ratio of two local temperature difference is : 0.67\n", + "\t caloric temperature of hot fluid is : F 242.5\n", + "\t caloric temperature of cold fluid is : F 97.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.6 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "T1=300; # hot fluid inlet temperature,F\n", + "T2=200; # hot fluid outlet temperature,F\n", + "t1=80; # cold fluid inlet temperature,F\n", + "t2=120; # cold fluid outlet temperature,F\n", + "print\"\\t for counter current flow \"\n", + "delT=T1-T2; # temperature difference for crude oil,F\n", + "print\"\\t temperature difference for crude oil is : F \",delT\n", + "Kc=0.68; # from fig.17\n", + "delt=t2-t1; # temperature difference for gasoline,F\n", + "print\"\\t temperature difference for gasoline is : F \",delt\n", + "Kc<=0.10; # from fig.17\n", + "print\"\\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t deltc is : F \",deltc\n", + "print\"\\t delth is : F \",delth\n", + "A=120./180.#((deltc)/(delth));\n", + "print\"\\t ratio of two local temperature difference is : \",round(A,2)\n", + "Fc=0.425; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "# end\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/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 new file mode 100644 index 00000000..2fa21473 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_2.ipynb @@ -0,0 +1,399 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Temperature" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1 pgno:90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 100.0\n", + "\t LMTDc is : F 123.3\n", + "\t for parallel flow \n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTDp is : F 108.0\n" + ] + } + ], + "source": [ + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=150.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDc=((delt2-delt1)/(log(delt2/delt1)));\n", + "print\"\\t LMTDc is : F \",round(LMTDc,1)\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDp=((delt2-delt1)/((log(delt2/delt1))));\n", + "print\"\\t LMTDp is : F \",round(LMTDp,0)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTD is : F 72.1347520444\n", + "\t for parallel flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 0.0\n", + "\t denominator becomes infinity so LMTD becomes Zero \n", + "\n", + "\t LMTD is Zero \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=150.; # cold fluid inlet temperature,F\n", + "t2=200.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delth is : F 25.0\n", + "\t deltc is : F 100.0\n", + "\t LMTD is : F 54.1\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t delth is : F \",delth\n", + "print\"\\t deltc is : F \",deltc\n", + "LMTD=((delth-deltc)/((1)*(log(delth/deltc))))\n", + "print\"\\t LMTD is : F \",round(LMTD,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4 pgno:92" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.4 \n", + "\n", + "\t process is isothermal with hot fluid so temperature of hot fluid remains constant \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delt1 is : F 25.0\n", + "\t delt2 is : F 200.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t for parallel flow \n", + "\n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 25.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t these are identical \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 5.4 \\n\"\n", + "print\"\\t process is isothermal with hot fluid so temperature of hot fluid remains constant \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=300.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \\n\"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "print\"\\t these are identical \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for inlet \t\n", + "\t Re is : \t2589.0\n", + "\t Pr is : \t3.52\n", + "\t nusselt number is : \t105.0\n", + "\t heat transfer coefficient is : 158.0\n", + "\t for outlet \t\n", + "\t Re is : \t3372.0\n", + "\t Pr is : \t3.23\n", + "\t nusselt number is : \t125.0\n", + "\t heat transfer coefficient is : 189.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t for inlet \\t\"\n", + "t1=99.1; # temperature of inlet,F\n", + "t2=129.2; # temperature of outlet,F\n", + "c=.478; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=7.139; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(0.9);\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "print\"\\t for outlet \\t\"\n", + "c=.495; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=2.20*2.42; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(.9); # reynolds number raised to poer 0.9, calculation mistake in book\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6 pgno:97" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.6 \n", + "\t approximate values are mentioned in the book \n", + "\t for counter current flow \n", + "\t temperature difference for crude oil is : F 100\n", + "\t temperature difference for gasoline is : F 40\n", + "\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \n", + "\t deltc is : F 120\n", + "\t delth is : F 180\n", + "\t ratio of two local temperature difference is : 0.67\n", + "\t caloric temperature of hot fluid is : F 242.5\n", + "\t caloric temperature of cold fluid is : F 97.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.6 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "T1=300; # hot fluid inlet temperature,F\n", + "T2=200; # hot fluid outlet temperature,F\n", + "t1=80; # cold fluid inlet temperature,F\n", + "t2=120; # cold fluid outlet temperature,F\n", + "print\"\\t for counter current flow \"\n", + "delT=T1-T2; # temperature difference for crude oil,F\n", + "print\"\\t temperature difference for crude oil is : F \",delT\n", + "Kc=0.68; # from fig.17\n", + "delt=t2-t1; # temperature difference for gasoline,F\n", + "print\"\\t temperature difference for gasoline is : F \",delt\n", + "Kc<=0.10; # from fig.17\n", + "print\"\\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t deltc is : F \",deltc\n", + "print\"\\t delth is : F \",delth\n", + "A=120./180.#((deltc)/(delth));\n", + "print\"\\t ratio of two local temperature difference is : \",round(A,2)\n", + "Fc=0.425; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "# end\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/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 new file mode 100644 index 00000000..2fa21473 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_3.ipynb @@ -0,0 +1,399 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Temperature" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1 pgno:90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 100.0\n", + "\t LMTDc is : F 123.3\n", + "\t for parallel flow \n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTDp is : F 108.0\n" + ] + } + ], + "source": [ + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=150.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDc=((delt2-delt1)/(log(delt2/delt1)));\n", + "print\"\\t LMTDc is : F \",round(LMTDc,1)\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDp=((delt2-delt1)/((log(delt2/delt1))));\n", + "print\"\\t LMTDp is : F \",round(LMTDp,0)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTD is : F 72.1347520444\n", + "\t for parallel flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 0.0\n", + "\t denominator becomes infinity so LMTD becomes Zero \n", + "\n", + "\t LMTD is Zero \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=150.; # cold fluid inlet temperature,F\n", + "t2=200.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delth is : F 25.0\n", + "\t deltc is : F 100.0\n", + "\t LMTD is : F 54.1\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t delth is : F \",delth\n", + "print\"\\t deltc is : F \",deltc\n", + "LMTD=((delth-deltc)/((1)*(log(delth/deltc))))\n", + "print\"\\t LMTD is : F \",round(LMTD,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4 pgno:92" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.4 \n", + "\n", + "\t process is isothermal with hot fluid so temperature of hot fluid remains constant \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delt1 is : F 25.0\n", + "\t delt2 is : F 200.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t for parallel flow \n", + "\n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 25.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t these are identical \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 5.4 \\n\"\n", + "print\"\\t process is isothermal with hot fluid so temperature of hot fluid remains constant \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=300.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \\n\"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "print\"\\t these are identical \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for inlet \t\n", + "\t Re is : \t2589.0\n", + "\t Pr is : \t3.52\n", + "\t nusselt number is : \t105.0\n", + "\t heat transfer coefficient is : 158.0\n", + "\t for outlet \t\n", + "\t Re is : \t3372.0\n", + "\t Pr is : \t3.23\n", + "\t nusselt number is : \t125.0\n", + "\t heat transfer coefficient is : 189.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t for inlet \\t\"\n", + "t1=99.1; # temperature of inlet,F\n", + "t2=129.2; # temperature of outlet,F\n", + "c=.478; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=7.139; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(0.9);\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "print\"\\t for outlet \\t\"\n", + "c=.495; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=2.20*2.42; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(.9); # reynolds number raised to poer 0.9, calculation mistake in book\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6 pgno:97" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.6 \n", + "\t approximate values are mentioned in the book \n", + "\t for counter current flow \n", + "\t temperature difference for crude oil is : F 100\n", + "\t temperature difference for gasoline is : F 40\n", + "\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \n", + "\t deltc is : F 120\n", + "\t delth is : F 180\n", + "\t ratio of two local temperature difference is : 0.67\n", + "\t caloric temperature of hot fluid is : F 242.5\n", + "\t caloric temperature of cold fluid is : F 97.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.6 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "T1=300; # hot fluid inlet temperature,F\n", + "T2=200; # hot fluid outlet temperature,F\n", + "t1=80; # cold fluid inlet temperature,F\n", + "t2=120; # cold fluid outlet temperature,F\n", + "print\"\\t for counter current flow \"\n", + "delT=T1-T2; # temperature difference for crude oil,F\n", + "print\"\\t temperature difference for crude oil is : F \",delT\n", + "Kc=0.68; # from fig.17\n", + "delt=t2-t1; # temperature difference for gasoline,F\n", + "print\"\\t temperature difference for gasoline is : F \",delt\n", + "Kc<=0.10; # from fig.17\n", + "print\"\\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t deltc is : F \",deltc\n", + "print\"\\t delth is : F \",delth\n", + "A=120./180.#((deltc)/(delth));\n", + "print\"\\t ratio of two local temperature difference is : \",round(A,2)\n", + "Fc=0.425; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "# end\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/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 new file mode 100644 index 00000000..2fa21473 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_5_Temperature_4.ipynb @@ -0,0 +1,399 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Temperature" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1 pgno:90" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 100.0\n", + "\t LMTDc is : F 123.3\n", + "\t for parallel flow \n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTDp is : F 108.0\n" + ] + } + ], + "source": [ + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=150.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDc=((delt2-delt1)/(log(delt2/delt1)));\n", + "print\"\\t LMTDc is : F \",round(LMTDc,1)\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTDp=((delt2-delt1)/((log(delt2/delt1))));\n", + "print\"\\t LMTDp is : F \",round(LMTDp,0)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t for counter current flow \n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 50.0\n", + "\t LMTD is : F 72.1347520444\n", + "\t for parallel flow \n", + "\t delt1 is : F 150.0\n", + "\t delt2 is : F 0.0\n", + "\t denominator becomes infinity so LMTD becomes Zero \n", + "\n", + "\t LMTD is Zero \n", + "\n" + ] + } + ], + "source": [ + "\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=150.; # cold fluid inlet temperature,F\n", + "t2=200.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3 pgno:91" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t approximate values are mentioned in the book \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delth is : F 25.0\n", + "\t deltc is : F 100.0\n", + "\t LMTD is : F 54.1\n" + ] + } + ], + "source": [ + "\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=200.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t delth is : F \",delth\n", + "print\"\\t deltc is : F \",deltc\n", + "LMTD=((delth-deltc)/((1)*(log(delth/deltc))))\n", + "print\"\\t LMTD is : F \",round(LMTD,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4 pgno:92" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.4 \n", + "\n", + "\t process is isothermal with hot fluid so temperature of hot fluid remains constant \n", + "\n", + "\t for counter current flow \n", + "\n", + "\t delt1 is : F 25.0\n", + "\t delt2 is : F 200.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t for parallel flow \n", + "\n", + "\t delt1 is : F 200.0\n", + "\t delt2 is : F 25.0\n", + "\t LMTD is : F 84.1572107185\n", + "\t these are identical \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 5.4 \\n\"\n", + "print\"\\t process is isothermal with hot fluid so temperature of hot fluid remains constant \\n\"\n", + "#given\n", + "T1=300.; # hot fluid inlet temperature,F\n", + "T2=300.; # hot fluid outlet temperature,F\n", + "t1=100.; # cold fluid inlet temperature,F\n", + "t2=275.; # cold fluid outlet temperature,F\n", + "#solution\n", + "from math import log\n", + "print\"\\t for counter current flow \\n\"\n", + "delt1=T1-t2; #F\n", + "delt2=T2-t1; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))\n", + "print\"\\t LMTD is : F \",LMTD\n", + "print\"\\t for parallel flow \\n\"\n", + "delt1=T1-t1; # F\n", + "delt2=T2-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "if delt2 == 0:\n", + " print\"\\t denominator becomes infinity so LMTD becomes Zero \\n\"\n", + " print\"\\t LMTD is Zero \\n\"\n", + "else:\n", + " LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + " print\"\\t LMTD is : F \",LMTD\n", + " \n", + "print\"\\t these are identical \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.5 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t for inlet \t\n", + "\t Re is : \t2589.0\n", + "\t Pr is : \t3.52\n", + "\t nusselt number is : \t105.0\n", + "\t heat transfer coefficient is : 158.0\n", + "\t for outlet \t\n", + "\t Re is : \t3372.0\n", + "\t Pr is : \t3.23\n", + "\t nusselt number is : \t125.0\n", + "\t heat transfer coefficient is : 189.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.5 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "print\"\\t for inlet \\t\"\n", + "t1=99.1; # temperature of inlet,F\n", + "t2=129.2; # temperature of outlet,F\n", + "c=.478; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=7.139; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(0.9);\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "print\"\\t for outlet \\t\"\n", + "c=.495; # Btu/(hr)*(ft)*(F/ft)\n", + "mu=2.20*2.42; # lb/(ft)(hr)\n", + "k=0.078; # Btu/(hr)*(ft)*(F/ft)\n", + "G=854000; # mass velocity,lb/(ft**2)(hr)\n", + "D=0.622/12; # diameter,ft\n", + "Re=((D)*((G)/(mu)))**(.9); # reynolds number raised to poer 0.9, calculation mistake in book\n", + "print\"\\t Re is : \\t\",round(Re)\n", + "Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",round(Pr,2)\n", + "Nu=0.0115*(Re)*(Pr); # formula for nusselt number\n", + "print\"\\t nusselt number is : \\t\",round(Nu)\n", + "hi=((k)*(Nu)/(D)); # heat transfer coefficient\n", + "print\"\\t heat transfer coefficient is :\",round(hi) # caculation mistake in book\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6 pgno:97" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 5.6 \n", + "\t approximate values are mentioned in the book \n", + "\t for counter current flow \n", + "\t temperature difference for crude oil is : F 100\n", + "\t temperature difference for gasoline is : F 40\n", + "\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \n", + "\t deltc is : F 120\n", + "\t delth is : F 180\n", + "\t ratio of two local temperature difference is : 0.67\n", + "\t caloric temperature of hot fluid is : F 242.5\n", + "\t caloric temperature of cold fluid is : F 97.0\n" + ] + } + ], + "source": [ + "print\"\\t example 5.6 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "T1=300; # hot fluid inlet temperature,F\n", + "T2=200; # hot fluid outlet temperature,F\n", + "t1=80; # cold fluid inlet temperature,F\n", + "t2=120; # cold fluid outlet temperature,F\n", + "print\"\\t for counter current flow \"\n", + "delT=T1-T2; # temperature difference for crude oil,F\n", + "print\"\\t temperature difference for crude oil is : F \",delT\n", + "Kc=0.68; # from fig.17\n", + "delt=t2-t1; # temperature difference for gasoline,F\n", + "print\"\\t temperature difference for gasoline is : F \",delt\n", + "Kc<=0.10; # from fig.17\n", + "print\"\\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature \"\n", + "deltc=T2-t1; #F\n", + "delth=T1-t2; # F\n", + "print\"\\t deltc is : F \",deltc\n", + "print\"\\t delth is : F \",delth\n", + "A=120./180.#((deltc)/(delth));\n", + "print\"\\t ratio of two local temperature difference is : \",round(A,2)\n", + "Fc=0.425; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "# end\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/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 new file mode 100644 index 00000000..d1205d31 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_1.ipynb @@ -0,0 +1,498 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Counterflow : Double Pipe Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1 pgno:113" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.1 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for benzene \n", + "\t average temperature of benzene is : F 100\n", + "\t total heat required for benzene is : Btu/hr 166940.0\n", + "\t for toulene \n", + "\n", + "\t average temperature of toulene is : F 130\n", + "\t W is : lb/hr 6323.48484848\n", + "\t 2.LMTD \n", + "\t for counter current flow \n", + "\t delt1 is : F 20\n", + "\t delt2 is : F 40\n", + "\t LMTD is : F \t28.8539008178\n", + "\t 3.caloric temperatures \n", + "\n", + "\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \n", + "\n", + "\t average temperature of benzene is : F 100\n", + "\t average temperature of toulene is : F 130\n", + "\t hot fluid:annulus,toulene \n", + "\t flow area is : ft**2 0.00841338147585\n", + "\t equiv diameter is : ft 0.077625\n", + "\t mass velocity is : lb/(hr)*(ft**2) 751598.494212\n", + "\t reynolds number is : 58801.4846938\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 182.866344605\n", + "\t cold fluid:inner pipe,benzene \n", + "\t flow area is : ft**2 0.0103868907109\n", + "\t mass velocity is : lb/(hr)*(ft**2) 945422.482367\n", + "\t reynolds number is : 89854.2028696\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 186.747826087\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 155.248192771\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 83.9646521529\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) 71.891896062\n", + "\t required surface is : ft**2 80.4777705563\n", + "\t required length is : lin ft 185.006369095\n", + "\t This may be fulfilled by connecting three 20-ft hairpins in series \n", + "\n", + "\t actual surface supplied is : ft**2 52.2\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 110.837155481\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.00288752837534\n", + "\t pressure drop for annulus \n", + "\t De1 is : ft 0.0345\n", + "\t reynolds number is : 26133.9931973\n", + "\t friction factor is : 0.00718449101601\n", + "\t delFa is : ft 35.2200986001\n", + "\t V is : fps 3.83958362305\n", + "\t Fl is : ft 0.686757875702\n", + "\t delPa is : psi 13.5585786172\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t friction factor is : 0.00569339980566\n", + "\t delFp is : ft 12.9491334918\n", + "\t delPp is : psi 4.94584959755\n", + "\t allowable delPp is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 6.1 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=160; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=120; # outlet cold fluid,F\n", + "w=9820; # lb/hr\n", + "#solution\n", + "from math import log\n", + "from math import pi\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for benzene \"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "c=0.425; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for benzene is : Btu/hr \",Q\n", + "print\"\\t for toulene \\n\"\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "c=0.44; # Btu/(lb)*(F)\n", + "W=((Q)/((c)*(T1-T2))); # lb/hr\n", + "print\"\\t W is : lb/hr \",round(W)\n", + "print\"\\t 2.LMTD \"\n", + "print\"\\t for counter current flow \"\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD,1)\n", + "print\"\\t 3.caloric temperatures \\n\"\n", + "print\"\\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \\n\"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "print\"\\t hot fluid:annulus,toulene \"\n", + "D1=0.138; # ft\n", + "D2=0.1725; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Ga\n", + "mu1=0.41*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Rea\n", + "jH=167; # from fig.24\n", + "c=0.44; # Btu/(lb)*(F),at 130F\n", + "k=0.085; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)*(1**0.14)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner pipe,benzene \"\n", + "D=0.115; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \",ap\n", + "Gp=(w/ap); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gp\n", + "mu2=0.5*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Rep\n", + "jH=236; # from fig.24\n", + "c=0.425; # Btu/(lb)*(F),at 130F\n", + "k=0.091; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=1.38; # ft\n", + "OD=1.66; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "Rd=0.002; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \",A\n", + "A1=0.435; # From Table 11 for 1(1/4)in IPS standard pipe there are 0.435 ft2 of external surface per foot length,ft**2\n", + "L=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \",L\n", + "print\"\\t This may be fulfilled by connecting three 20-ft hairpins in series \\n\"\n", + "A2=120*0.435; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "De1=(D2-D1); #ft\n", + "print\"\\t De1 is : ft \",De1\n", + "Rea1=((De1)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is :\",Rea1\n", + "f=(0.0035)+((0.264)/(Rea1**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.87;\n", + "row=62.5*0.87; # from table 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \",V\n", + "Fl=((3*(V**2))/(2*32.2)); #ft\n", + "print\"\\t Fl is : ft \",Fl\n", + "delPa=((delFa+Fl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \",delPa\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.88;\n", + "row=62.5*0.88; # from table 6\n", + "delFp=((4*f*(Gp**2)*L)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \",delFp\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \",delPp\n", + "print\"\\t allowable delPp is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2 pgno:120" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.2 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t P is : 0.091\n", + "\t R is : 0.556\n", + "\t gama is : 0.242\n", + " true temperature difference is : F 26.6\n" + ] + } + ], + "source": [ + "print\"\\t example 6.2 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=190.; # inlet cold fluid,F\n", + "t2=220.; # outlet cold fluid,F\n", + "n=6; # number of parallel streams\n", + "#solution\n", + "from math import log\n", + "P=((T2-t1)/(T1-t1));\n", + "print\"\\t P is : \",round(P,3)\n", + "R=((T1-T2)/((n)*(t2-t1)));\n", + "print\"\\t R is : \",round(R,3)\n", + "gama=0.242#((1-P)/((1)*((n*R)/(R-1))*log(((R-1)/R)*(1/P)**(1/n)+(1/R)))); # using eq.6.35a\n", + "print\"\\t gama is :\",gama\n", + "delt=(gama*(T1-t1)); # true temperature difference,F\n", + "print\" true temperature difference is : F \",round(delt,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lube oil \t\n", + "\t total heat required for lube oil is : Btu/hr \t427800.0\n", + "\t for crude oil \t\n", + "\t total heat required for crude oil is : Btu/hr \t424125.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t140\n", + "\t LMTD is : F \t129.84255368\n", + "\t ratio of two local temperature difference is : \t0\n", + "\t caloric temperature of hot fluid is : F \t389.5\n", + "\t caloric temperature of cold fluid is : F \t303.95\n", + "\t hot fluid:annulus,lube oil \t\n", + "\t flow area is : ft**2 \t0.0203693013677\n", + "\t equiv diameter is : ft \t0.130326633166\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t338745.049496\n", + "\t reynolds number is : \t6080.92311327\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t10.5389049547\n", + "\t cold fluid:inner pipe,crude oil \t\n", + "\t flow area is : ft**2 \t0.023235219266\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1560131.60819\n", + "\t reynolds number is : \t133596.851841\n", + "\t Pr is : \t1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t135.813953488\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t phyp is : \t1.01056029649\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t tw is : F \t310.966826293\n", + "\t phya is : \t0.89549017376\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t9.43748582912\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.73832573656\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.30299983373\n", + "\t required surface is : ft**2 \t396.815568378\n", + "\t required length is : lin ft \t637.967151733\n", + "\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \t\n", + "\t actual surface supplied is : ft**2 \t199.04\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.5532536086\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0540273138235\n", + "\t pressure drop for annulus \t\n", + "\t De1 is : ft \t0.058\n", + "\t reynolds number is : \t2709.96039597\n", + "\t friction factor is : \t0.0130893090019\n", + "\t delFa is : ft \t16.8995403857\n", + "\t V is : fps \t1.94262393976\n", + "\t delFl is : ft \t0.468793511967\n", + "\t delPa is : psi \t5.84221300811\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t friction factor is : \t0.0053568\n", + "\t delFp is : ft \t25.7\n", + "\t delPp is : psi \t8.5\n", + "\t allowable delPp is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 6.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450; # inlet hot fluid,F\n", + "T2=350; # outlet hot fluid,F\n", + "t1=300; # inlet cold fluid,F\n", + "t2=310; # outlet cold fluid,F\n", + "W=6900; # lb/hr\n", + "w=72500; # lb/hr\n", + "from math import log,pi\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lube oil \\t\"\n", + "c=0.62; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lube oil is : Btu/hr \\t\",Q\n", + "print\"\\t for crude oil \\t\"\n", + "c=0.585; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude oil is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "A=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",A\n", + "Fc=0.395; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:annulus,lube oil \\t\"\n", + "D1=0.199; # ft\n", + "D2=0.256; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=3*2.42; # at 389.5F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jH=20.5; # from fig.24\n", + "c=0.615; # Btu/(lb)*(F),at 130F\n", + "k=0.067; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "print\"\\t cold fluid:inner pipe,crude oil \\t\"\n", + "D=0.172; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",ap\n", + "Gp=(w/(2*ap)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gp\n", + "mu2=0.83*2.42; # at 304 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rep\n", + "jH=320; # from fig.24\n", + "c=0.585; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.073; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=2.067; # ft\n", + "OD=2.38; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=0.77*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyp=(mu2/muw)**0.14;\n", + "print\"\\t phyp is : \\t\",phyp # from fig.24\n", + "hio=(Hio)*(1); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=6.6*2.42; # lb/(ft)*(hr), from fig.14\n", + "phya=(mu1/muw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "ho=(Ho)*(phya); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.006; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \\t\",A\n", + "A1=0.622; # From Table 11,ft**2\n", + "Lr=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \\t\",Lr\n", + "print\"\\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \\t\"\n", + "L=320;\n", + "A2=320*0.622; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=.058; #ft\n", + "print\"\\t De1 is : ft \\t\",De1\n", + "Rea1=((De1)*(Ga)/7.25); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea1\n", + "f=(0.0035)+((0.264)/(2680**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",f\n", + "s=0.775;\n", + "row=62.5*0.775; # from fig 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \\t\",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \\t\",V\n", + "delFl=((8*(V**2))/(2*32.2)); #ft\n", + "print\"\\t delFl is : ft \\t\",delFl\n", + "delPa=((delFa+delFl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \\t\",delPa\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",round(f,7)\n", + "s=0.76;\n", + "row=62.5*0.76; # from table 6\n", + "Lp=160;\n", + "delFp=((4*f*(Gp**2)*Lp)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \\t\",round(delFp,1)\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \\t\",round(delPp,1)\n", + "print\"\\t allowable delPp is 10 psi \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..d1205d31 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_2.ipynb @@ -0,0 +1,498 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Counterflow : Double Pipe Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1 pgno:113" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.1 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for benzene \n", + "\t average temperature of benzene is : F 100\n", + "\t total heat required for benzene is : Btu/hr 166940.0\n", + "\t for toulene \n", + "\n", + "\t average temperature of toulene is : F 130\n", + "\t W is : lb/hr 6323.48484848\n", + "\t 2.LMTD \n", + "\t for counter current flow \n", + "\t delt1 is : F 20\n", + "\t delt2 is : F 40\n", + "\t LMTD is : F \t28.8539008178\n", + "\t 3.caloric temperatures \n", + "\n", + "\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \n", + "\n", + "\t average temperature of benzene is : F 100\n", + "\t average temperature of toulene is : F 130\n", + "\t hot fluid:annulus,toulene \n", + "\t flow area is : ft**2 0.00841338147585\n", + "\t equiv diameter is : ft 0.077625\n", + "\t mass velocity is : lb/(hr)*(ft**2) 751598.494212\n", + "\t reynolds number is : 58801.4846938\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 182.866344605\n", + "\t cold fluid:inner pipe,benzene \n", + "\t flow area is : ft**2 0.0103868907109\n", + "\t mass velocity is : lb/(hr)*(ft**2) 945422.482367\n", + "\t reynolds number is : 89854.2028696\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 186.747826087\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 155.248192771\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 83.9646521529\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) 71.891896062\n", + "\t required surface is : ft**2 80.4777705563\n", + "\t required length is : lin ft 185.006369095\n", + "\t This may be fulfilled by connecting three 20-ft hairpins in series \n", + "\n", + "\t actual surface supplied is : ft**2 52.2\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 110.837155481\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.00288752837534\n", + "\t pressure drop for annulus \n", + "\t De1 is : ft 0.0345\n", + "\t reynolds number is : 26133.9931973\n", + "\t friction factor is : 0.00718449101601\n", + "\t delFa is : ft 35.2200986001\n", + "\t V is : fps 3.83958362305\n", + "\t Fl is : ft 0.686757875702\n", + "\t delPa is : psi 13.5585786172\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t friction factor is : 0.00569339980566\n", + "\t delFp is : ft 12.9491334918\n", + "\t delPp is : psi 4.94584959755\n", + "\t allowable delPp is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 6.1 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=160; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=120; # outlet cold fluid,F\n", + "w=9820; # lb/hr\n", + "#solution\n", + "from math import log\n", + "from math import pi\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for benzene \"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "c=0.425; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for benzene is : Btu/hr \",Q\n", + "print\"\\t for toulene \\n\"\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "c=0.44; # Btu/(lb)*(F)\n", + "W=((Q)/((c)*(T1-T2))); # lb/hr\n", + "print\"\\t W is : lb/hr \",round(W)\n", + "print\"\\t 2.LMTD \"\n", + "print\"\\t for counter current flow \"\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD,1)\n", + "print\"\\t 3.caloric temperatures \\n\"\n", + "print\"\\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \\n\"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "print\"\\t hot fluid:annulus,toulene \"\n", + "D1=0.138; # ft\n", + "D2=0.1725; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Ga\n", + "mu1=0.41*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Rea\n", + "jH=167; # from fig.24\n", + "c=0.44; # Btu/(lb)*(F),at 130F\n", + "k=0.085; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)*(1**0.14)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner pipe,benzene \"\n", + "D=0.115; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \",ap\n", + "Gp=(w/ap); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gp\n", + "mu2=0.5*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Rep\n", + "jH=236; # from fig.24\n", + "c=0.425; # Btu/(lb)*(F),at 130F\n", + "k=0.091; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=1.38; # ft\n", + "OD=1.66; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "Rd=0.002; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \",A\n", + "A1=0.435; # From Table 11 for 1(1/4)in IPS standard pipe there are 0.435 ft2 of external surface per foot length,ft**2\n", + "L=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \",L\n", + "print\"\\t This may be fulfilled by connecting three 20-ft hairpins in series \\n\"\n", + "A2=120*0.435; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "De1=(D2-D1); #ft\n", + "print\"\\t De1 is : ft \",De1\n", + "Rea1=((De1)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is :\",Rea1\n", + "f=(0.0035)+((0.264)/(Rea1**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.87;\n", + "row=62.5*0.87; # from table 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \",V\n", + "Fl=((3*(V**2))/(2*32.2)); #ft\n", + "print\"\\t Fl is : ft \",Fl\n", + "delPa=((delFa+Fl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \",delPa\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.88;\n", + "row=62.5*0.88; # from table 6\n", + "delFp=((4*f*(Gp**2)*L)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \",delFp\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \",delPp\n", + "print\"\\t allowable delPp is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2 pgno:120" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.2 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t P is : 0.091\n", + "\t R is : 0.556\n", + "\t gama is : 0.242\n", + " true temperature difference is : F 26.6\n" + ] + } + ], + "source": [ + "print\"\\t example 6.2 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=190.; # inlet cold fluid,F\n", + "t2=220.; # outlet cold fluid,F\n", + "n=6; # number of parallel streams\n", + "#solution\n", + "from math import log\n", + "P=((T2-t1)/(T1-t1));\n", + "print\"\\t P is : \",round(P,3)\n", + "R=((T1-T2)/((n)*(t2-t1)));\n", + "print\"\\t R is : \",round(R,3)\n", + "gama=0.242#((1-P)/((1)*((n*R)/(R-1))*log(((R-1)/R)*(1/P)**(1/n)+(1/R)))); # using eq.6.35a\n", + "print\"\\t gama is :\",gama\n", + "delt=(gama*(T1-t1)); # true temperature difference,F\n", + "print\" true temperature difference is : F \",round(delt,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lube oil \t\n", + "\t total heat required for lube oil is : Btu/hr \t427800.0\n", + "\t for crude oil \t\n", + "\t total heat required for crude oil is : Btu/hr \t424125.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t140\n", + "\t LMTD is : F \t129.84255368\n", + "\t ratio of two local temperature difference is : \t0\n", + "\t caloric temperature of hot fluid is : F \t389.5\n", + "\t caloric temperature of cold fluid is : F \t303.95\n", + "\t hot fluid:annulus,lube oil \t\n", + "\t flow area is : ft**2 \t0.0203693013677\n", + "\t equiv diameter is : ft \t0.130326633166\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t338745.049496\n", + "\t reynolds number is : \t6080.92311327\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t10.5389049547\n", + "\t cold fluid:inner pipe,crude oil \t\n", + "\t flow area is : ft**2 \t0.023235219266\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1560131.60819\n", + "\t reynolds number is : \t133596.851841\n", + "\t Pr is : \t1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t135.813953488\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t phyp is : \t1.01056029649\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t tw is : F \t310.966826293\n", + "\t phya is : \t0.89549017376\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t9.43748582912\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.73832573656\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.30299983373\n", + "\t required surface is : ft**2 \t396.815568378\n", + "\t required length is : lin ft \t637.967151733\n", + "\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \t\n", + "\t actual surface supplied is : ft**2 \t199.04\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.5532536086\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0540273138235\n", + "\t pressure drop for annulus \t\n", + "\t De1 is : ft \t0.058\n", + "\t reynolds number is : \t2709.96039597\n", + "\t friction factor is : \t0.0130893090019\n", + "\t delFa is : ft \t16.8995403857\n", + "\t V is : fps \t1.94262393976\n", + "\t delFl is : ft \t0.468793511967\n", + "\t delPa is : psi \t5.84221300811\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t friction factor is : \t0.0053568\n", + "\t delFp is : ft \t25.7\n", + "\t delPp is : psi \t8.5\n", + "\t allowable delPp is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 6.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450; # inlet hot fluid,F\n", + "T2=350; # outlet hot fluid,F\n", + "t1=300; # inlet cold fluid,F\n", + "t2=310; # outlet cold fluid,F\n", + "W=6900; # lb/hr\n", + "w=72500; # lb/hr\n", + "from math import log,pi\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lube oil \\t\"\n", + "c=0.62; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lube oil is : Btu/hr \\t\",Q\n", + "print\"\\t for crude oil \\t\"\n", + "c=0.585; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude oil is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "A=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",A\n", + "Fc=0.395; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:annulus,lube oil \\t\"\n", + "D1=0.199; # ft\n", + "D2=0.256; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=3*2.42; # at 389.5F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jH=20.5; # from fig.24\n", + "c=0.615; # Btu/(lb)*(F),at 130F\n", + "k=0.067; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "print\"\\t cold fluid:inner pipe,crude oil \\t\"\n", + "D=0.172; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",ap\n", + "Gp=(w/(2*ap)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gp\n", + "mu2=0.83*2.42; # at 304 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rep\n", + "jH=320; # from fig.24\n", + "c=0.585; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.073; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=2.067; # ft\n", + "OD=2.38; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=0.77*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyp=(mu2/muw)**0.14;\n", + "print\"\\t phyp is : \\t\",phyp # from fig.24\n", + "hio=(Hio)*(1); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=6.6*2.42; # lb/(ft)*(hr), from fig.14\n", + "phya=(mu1/muw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "ho=(Ho)*(phya); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.006; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \\t\",A\n", + "A1=0.622; # From Table 11,ft**2\n", + "Lr=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \\t\",Lr\n", + "print\"\\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \\t\"\n", + "L=320;\n", + "A2=320*0.622; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=.058; #ft\n", + "print\"\\t De1 is : ft \\t\",De1\n", + "Rea1=((De1)*(Ga)/7.25); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea1\n", + "f=(0.0035)+((0.264)/(2680**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",f\n", + "s=0.775;\n", + "row=62.5*0.775; # from fig 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \\t\",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \\t\",V\n", + "delFl=((8*(V**2))/(2*32.2)); #ft\n", + "print\"\\t delFl is : ft \\t\",delFl\n", + "delPa=((delFa+delFl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \\t\",delPa\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",round(f,7)\n", + "s=0.76;\n", + "row=62.5*0.76; # from table 6\n", + "Lp=160;\n", + "delFp=((4*f*(Gp**2)*Lp)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \\t\",round(delFp,1)\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \\t\",round(delPp,1)\n", + "print\"\\t allowable delPp is 10 psi \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..d1205d31 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_3.ipynb @@ -0,0 +1,498 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Counterflow : Double Pipe Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1 pgno:113" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.1 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for benzene \n", + "\t average temperature of benzene is : F 100\n", + "\t total heat required for benzene is : Btu/hr 166940.0\n", + "\t for toulene \n", + "\n", + "\t average temperature of toulene is : F 130\n", + "\t W is : lb/hr 6323.48484848\n", + "\t 2.LMTD \n", + "\t for counter current flow \n", + "\t delt1 is : F 20\n", + "\t delt2 is : F 40\n", + "\t LMTD is : F \t28.8539008178\n", + "\t 3.caloric temperatures \n", + "\n", + "\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \n", + "\n", + "\t average temperature of benzene is : F 100\n", + "\t average temperature of toulene is : F 130\n", + "\t hot fluid:annulus,toulene \n", + "\t flow area is : ft**2 0.00841338147585\n", + "\t equiv diameter is : ft 0.077625\n", + "\t mass velocity is : lb/(hr)*(ft**2) 751598.494212\n", + "\t reynolds number is : 58801.4846938\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 182.866344605\n", + "\t cold fluid:inner pipe,benzene \n", + "\t flow area is : ft**2 0.0103868907109\n", + "\t mass velocity is : lb/(hr)*(ft**2) 945422.482367\n", + "\t reynolds number is : 89854.2028696\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 186.747826087\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 155.248192771\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 83.9646521529\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) 71.891896062\n", + "\t required surface is : ft**2 80.4777705563\n", + "\t required length is : lin ft 185.006369095\n", + "\t This may be fulfilled by connecting three 20-ft hairpins in series \n", + "\n", + "\t actual surface supplied is : ft**2 52.2\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 110.837155481\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.00288752837534\n", + "\t pressure drop for annulus \n", + "\t De1 is : ft 0.0345\n", + "\t reynolds number is : 26133.9931973\n", + "\t friction factor is : 0.00718449101601\n", + "\t delFa is : ft 35.2200986001\n", + "\t V is : fps 3.83958362305\n", + "\t Fl is : ft 0.686757875702\n", + "\t delPa is : psi 13.5585786172\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t friction factor is : 0.00569339980566\n", + "\t delFp is : ft 12.9491334918\n", + "\t delPp is : psi 4.94584959755\n", + "\t allowable delPp is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 6.1 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=160; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=120; # outlet cold fluid,F\n", + "w=9820; # lb/hr\n", + "#solution\n", + "from math import log\n", + "from math import pi\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for benzene \"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "c=0.425; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for benzene is : Btu/hr \",Q\n", + "print\"\\t for toulene \\n\"\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "c=0.44; # Btu/(lb)*(F)\n", + "W=((Q)/((c)*(T1-T2))); # lb/hr\n", + "print\"\\t W is : lb/hr \",round(W)\n", + "print\"\\t 2.LMTD \"\n", + "print\"\\t for counter current flow \"\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD,1)\n", + "print\"\\t 3.caloric temperatures \\n\"\n", + "print\"\\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \\n\"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "print\"\\t hot fluid:annulus,toulene \"\n", + "D1=0.138; # ft\n", + "D2=0.1725; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Ga\n", + "mu1=0.41*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Rea\n", + "jH=167; # from fig.24\n", + "c=0.44; # Btu/(lb)*(F),at 130F\n", + "k=0.085; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)*(1**0.14)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner pipe,benzene \"\n", + "D=0.115; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \",ap\n", + "Gp=(w/ap); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gp\n", + "mu2=0.5*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Rep\n", + "jH=236; # from fig.24\n", + "c=0.425; # Btu/(lb)*(F),at 130F\n", + "k=0.091; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=1.38; # ft\n", + "OD=1.66; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "Rd=0.002; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \",A\n", + "A1=0.435; # From Table 11 for 1(1/4)in IPS standard pipe there are 0.435 ft2 of external surface per foot length,ft**2\n", + "L=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \",L\n", + "print\"\\t This may be fulfilled by connecting three 20-ft hairpins in series \\n\"\n", + "A2=120*0.435; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "De1=(D2-D1); #ft\n", + "print\"\\t De1 is : ft \",De1\n", + "Rea1=((De1)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is :\",Rea1\n", + "f=(0.0035)+((0.264)/(Rea1**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.87;\n", + "row=62.5*0.87; # from table 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \",V\n", + "Fl=((3*(V**2))/(2*32.2)); #ft\n", + "print\"\\t Fl is : ft \",Fl\n", + "delPa=((delFa+Fl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \",delPa\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.88;\n", + "row=62.5*0.88; # from table 6\n", + "delFp=((4*f*(Gp**2)*L)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \",delFp\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \",delPp\n", + "print\"\\t allowable delPp is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2 pgno:120" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.2 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t P is : 0.091\n", + "\t R is : 0.556\n", + "\t gama is : 0.242\n", + " true temperature difference is : F 26.6\n" + ] + } + ], + "source": [ + "print\"\\t example 6.2 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=190.; # inlet cold fluid,F\n", + "t2=220.; # outlet cold fluid,F\n", + "n=6; # number of parallel streams\n", + "#solution\n", + "from math import log\n", + "P=((T2-t1)/(T1-t1));\n", + "print\"\\t P is : \",round(P,3)\n", + "R=((T1-T2)/((n)*(t2-t1)));\n", + "print\"\\t R is : \",round(R,3)\n", + "gama=0.242#((1-P)/((1)*((n*R)/(R-1))*log(((R-1)/R)*(1/P)**(1/n)+(1/R)))); # using eq.6.35a\n", + "print\"\\t gama is :\",gama\n", + "delt=(gama*(T1-t1)); # true temperature difference,F\n", + "print\" true temperature difference is : F \",round(delt,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lube oil \t\n", + "\t total heat required for lube oil is : Btu/hr \t427800.0\n", + "\t for crude oil \t\n", + "\t total heat required for crude oil is : Btu/hr \t424125.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t140\n", + "\t LMTD is : F \t129.84255368\n", + "\t ratio of two local temperature difference is : \t0\n", + "\t caloric temperature of hot fluid is : F \t389.5\n", + "\t caloric temperature of cold fluid is : F \t303.95\n", + "\t hot fluid:annulus,lube oil \t\n", + "\t flow area is : ft**2 \t0.0203693013677\n", + "\t equiv diameter is : ft \t0.130326633166\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t338745.049496\n", + "\t reynolds number is : \t6080.92311327\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t10.5389049547\n", + "\t cold fluid:inner pipe,crude oil \t\n", + "\t flow area is : ft**2 \t0.023235219266\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1560131.60819\n", + "\t reynolds number is : \t133596.851841\n", + "\t Pr is : \t1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t135.813953488\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t phyp is : \t1.01056029649\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t tw is : F \t310.966826293\n", + "\t phya is : \t0.89549017376\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t9.43748582912\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.73832573656\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.30299983373\n", + "\t required surface is : ft**2 \t396.815568378\n", + "\t required length is : lin ft \t637.967151733\n", + "\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \t\n", + "\t actual surface supplied is : ft**2 \t199.04\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.5532536086\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0540273138235\n", + "\t pressure drop for annulus \t\n", + "\t De1 is : ft \t0.058\n", + "\t reynolds number is : \t2709.96039597\n", + "\t friction factor is : \t0.0130893090019\n", + "\t delFa is : ft \t16.8995403857\n", + "\t V is : fps \t1.94262393976\n", + "\t delFl is : ft \t0.468793511967\n", + "\t delPa is : psi \t5.84221300811\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t friction factor is : \t0.0053568\n", + "\t delFp is : ft \t25.7\n", + "\t delPp is : psi \t8.5\n", + "\t allowable delPp is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 6.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450; # inlet hot fluid,F\n", + "T2=350; # outlet hot fluid,F\n", + "t1=300; # inlet cold fluid,F\n", + "t2=310; # outlet cold fluid,F\n", + "W=6900; # lb/hr\n", + "w=72500; # lb/hr\n", + "from math import log,pi\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lube oil \\t\"\n", + "c=0.62; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lube oil is : Btu/hr \\t\",Q\n", + "print\"\\t for crude oil \\t\"\n", + "c=0.585; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude oil is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "A=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",A\n", + "Fc=0.395; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:annulus,lube oil \\t\"\n", + "D1=0.199; # ft\n", + "D2=0.256; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=3*2.42; # at 389.5F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jH=20.5; # from fig.24\n", + "c=0.615; # Btu/(lb)*(F),at 130F\n", + "k=0.067; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "print\"\\t cold fluid:inner pipe,crude oil \\t\"\n", + "D=0.172; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",ap\n", + "Gp=(w/(2*ap)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gp\n", + "mu2=0.83*2.42; # at 304 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rep\n", + "jH=320; # from fig.24\n", + "c=0.585; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.073; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=2.067; # ft\n", + "OD=2.38; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=0.77*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyp=(mu2/muw)**0.14;\n", + "print\"\\t phyp is : \\t\",phyp # from fig.24\n", + "hio=(Hio)*(1); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=6.6*2.42; # lb/(ft)*(hr), from fig.14\n", + "phya=(mu1/muw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "ho=(Ho)*(phya); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.006; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \\t\",A\n", + "A1=0.622; # From Table 11,ft**2\n", + "Lr=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \\t\",Lr\n", + "print\"\\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \\t\"\n", + "L=320;\n", + "A2=320*0.622; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=.058; #ft\n", + "print\"\\t De1 is : ft \\t\",De1\n", + "Rea1=((De1)*(Ga)/7.25); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea1\n", + "f=(0.0035)+((0.264)/(2680**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",f\n", + "s=0.775;\n", + "row=62.5*0.775; # from fig 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \\t\",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \\t\",V\n", + "delFl=((8*(V**2))/(2*32.2)); #ft\n", + "print\"\\t delFl is : ft \\t\",delFl\n", + "delPa=((delFa+delFl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \\t\",delPa\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",round(f,7)\n", + "s=0.76;\n", + "row=62.5*0.76; # from table 6\n", + "Lp=160;\n", + "delFp=((4*f*(Gp**2)*Lp)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \\t\",round(delFp,1)\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \\t\",round(delPp,1)\n", + "print\"\\t allowable delPp is 10 psi \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..d1205d31 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_6_Counterflow_Double_Pipe_Exchangers_4.ipynb @@ -0,0 +1,498 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Counterflow : Double Pipe Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1 pgno:113" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.1 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for benzene \n", + "\t average temperature of benzene is : F 100\n", + "\t total heat required for benzene is : Btu/hr 166940.0\n", + "\t for toulene \n", + "\n", + "\t average temperature of toulene is : F 130\n", + "\t W is : lb/hr 6323.48484848\n", + "\t 2.LMTD \n", + "\t for counter current flow \n", + "\t delt1 is : F 20\n", + "\t delt2 is : F 40\n", + "\t LMTD is : F \t28.8539008178\n", + "\t 3.caloric temperatures \n", + "\n", + "\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \n", + "\n", + "\t average temperature of benzene is : F 100\n", + "\t average temperature of toulene is : F 130\n", + "\t hot fluid:annulus,toulene \n", + "\t flow area is : ft**2 0.00841338147585\n", + "\t equiv diameter is : ft 0.077625\n", + "\t mass velocity is : lb/(hr)*(ft**2) 751598.494212\n", + "\t reynolds number is : 58801.4846938\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 182.866344605\n", + "\t cold fluid:inner pipe,benzene \n", + "\t flow area is : ft**2 0.0103868907109\n", + "\t mass velocity is : lb/(hr)*(ft**2) 945422.482367\n", + "\t reynolds number is : 89854.2028696\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 186.747826087\n", + "\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 155.248192771\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 83.9646521529\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) 71.891896062\n", + "\t required surface is : ft**2 80.4777705563\n", + "\t required length is : lin ft 185.006369095\n", + "\t This may be fulfilled by connecting three 20-ft hairpins in series \n", + "\n", + "\t actual surface supplied is : ft**2 52.2\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 110.837155481\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.00288752837534\n", + "\t pressure drop for annulus \n", + "\t De1 is : ft 0.0345\n", + "\t reynolds number is : 26133.9931973\n", + "\t friction factor is : 0.00718449101601\n", + "\t delFa is : ft 35.2200986001\n", + "\t V is : fps 3.83958362305\n", + "\t Fl is : ft 0.686757875702\n", + "\t delPa is : psi 13.5585786172\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t friction factor is : 0.00569339980566\n", + "\t delFp is : ft 12.9491334918\n", + "\t delPp is : psi 4.94584959755\n", + "\t allowable delPp is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 6.1 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=160; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=80; # inlet cold fluid,F\n", + "t2=120; # outlet cold fluid,F\n", + "w=9820; # lb/hr\n", + "#solution\n", + "from math import log\n", + "from math import pi\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for benzene \"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "c=0.425; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for benzene is : Btu/hr \",Q\n", + "print\"\\t for toulene \\n\"\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "c=0.44; # Btu/(lb)*(F)\n", + "W=((Q)/((c)*(T1-T2))); # lb/hr\n", + "print\"\\t W is : lb/hr \",round(W)\n", + "print\"\\t 2.LMTD \"\n", + "print\"\\t for counter current flow \"\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",round(LMTD,1)\n", + "print\"\\t 3.caloric temperatures \\n\"\n", + "print\"\\t both streams will show that neither is viscous at the cold terminal (the viscosities less than 1 centipoise) and the temperature ranges and temperature difference are moderate. The coefficients may accordingly be evaluated from properties at the arithmetic mean, and the value of (mu/muw)**0.14 may be assumed equal to 1.0 \\n\"\n", + "tav=((t1+t2)/2); # F\n", + "print\"\\t average temperature of benzene is : F \",tav\n", + "Tav=((T1+T2)/2); #F\n", + "print\"\\t average temperature of toulene is : F \",Tav\n", + "print\"\\t hot fluid:annulus,toulene \"\n", + "D1=0.138; # ft\n", + "D2=0.1725; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Ga\n", + "mu1=0.41*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Rea\n", + "jH=167; # from fig.24\n", + "c=0.44; # Btu/(lb)*(F),at 130F\n", + "k=0.085; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)*(1**0.14)); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner pipe,benzene \"\n", + "D=0.115; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \",ap\n", + "Gp=(w/ap); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gp\n", + "mu2=0.5*2.42; # at 130 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Rep\n", + "jH=236; # from fig.24\n", + "c=0.425; # Btu/(lb)*(F),at 130F\n", + "k=0.091; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=1.38; # ft\n", + "OD=1.66; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "Rd=0.002; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \",A\n", + "A1=0.435; # From Table 11 for 1(1/4)in IPS standard pipe there are 0.435 ft2 of external surface per foot length,ft**2\n", + "L=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \",L\n", + "print\"\\t This may be fulfilled by connecting three 20-ft hairpins in series \\n\"\n", + "A2=120*0.435; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "De1=(D2-D1); #ft\n", + "print\"\\t De1 is : ft \",De1\n", + "Rea1=((De1)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is :\",Rea1\n", + "f=(0.0035)+((0.264)/(Rea1**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.87;\n", + "row=62.5*0.87; # from table 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \",V\n", + "Fl=((3*(V**2))/(2*32.2)); #ft\n", + "print\"\\t Fl is : ft \",Fl\n", + "delPa=((delFa+Fl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \",delPa\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \",f\n", + "s=0.88;\n", + "row=62.5*0.88; # from table 6\n", + "delFp=((4*f*(Gp**2)*L)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \",delFp\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \",delPp\n", + "print\"\\t allowable delPp is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2 pgno:120" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.2 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t P is : 0.091\n", + "\t R is : 0.556\n", + "\t gama is : 0.242\n", + " true temperature difference is : F 26.6\n" + ] + } + ], + "source": [ + "print\"\\t example 6.2 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=300.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=190.; # inlet cold fluid,F\n", + "t2=220.; # outlet cold fluid,F\n", + "n=6; # number of parallel streams\n", + "#solution\n", + "from math import log\n", + "P=((T2-t1)/(T1-t1));\n", + "print\"\\t P is : \",round(P,3)\n", + "R=((T1-T2)/((n)*(t2-t1)));\n", + "print\"\\t R is : \",round(R,3)\n", + "gama=0.242#((1-P)/((1)*((n*R)/(R-1))*log(((R-1)/R)*(1/P)**(1/n)+(1/R)))); # using eq.6.35a\n", + "print\"\\t gama is :\",gama\n", + "delt=(gama*(T1-t1)); # true temperature difference,F\n", + "print\" true temperature difference is : F \",round(delt,1)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3 pgno:121" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 6.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for lube oil \t\n", + "\t total heat required for lube oil is : Btu/hr \t427800.0\n", + "\t for crude oil \t\n", + "\t total heat required for crude oil is : Btu/hr \t424125.0\n", + "\t delt1 is : F \t50\n", + "\t delt2 is : F \t140\n", + "\t LMTD is : F \t129.84255368\n", + "\t ratio of two local temperature difference is : \t0\n", + "\t caloric temperature of hot fluid is : F \t389.5\n", + "\t caloric temperature of cold fluid is : F \t303.95\n", + "\t hot fluid:annulus,lube oil \t\n", + "\t flow area is : ft**2 \t0.0203693013677\n", + "\t equiv diameter is : ft \t0.130326633166\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t338745.049496\n", + "\t reynolds number is : \t6080.92311327\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t10.5389049547\n", + "\t cold fluid:inner pipe,crude oil \t\n", + "\t flow area is : ft**2 \t0.023235219266\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t1560131.60819\n", + "\t reynolds number is : \t133596.851841\n", + "\t Pr is : \t1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) \t135.813953488\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t phyp is : \t1.01056029649\n", + "\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.952706664\n", + "\t tw is : F \t310.966826293\n", + "\t phya is : \t0.89549017376\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t9.43748582912\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.73832573656\n", + "\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t8.30299983373\n", + "\t required surface is : ft**2 \t396.815568378\n", + "\t required length is : lin ft \t637.967151733\n", + "\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \t\n", + "\t actual surface supplied is : ft**2 \t199.04\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t16.5532536086\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0540273138235\n", + "\t pressure drop for annulus \t\n", + "\t De1 is : ft \t0.058\n", + "\t reynolds number is : \t2709.96039597\n", + "\t friction factor is : \t0.0130893090019\n", + "\t delFa is : ft \t16.8995403857\n", + "\t V is : fps \t1.94262393976\n", + "\t delFl is : ft \t0.468793511967\n", + "\t delPa is : psi \t5.84221300811\n", + "\t allowable delPa is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t friction factor is : \t0.0053568\n", + "\t delFp is : ft \t25.7\n", + "\t delPp is : psi \t8.5\n", + "\t allowable delPp is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 6.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "T1=450; # inlet hot fluid,F\n", + "T2=350; # outlet hot fluid,F\n", + "t1=300; # inlet cold fluid,F\n", + "t2=310; # outlet cold fluid,F\n", + "W=6900; # lb/hr\n", + "w=72500; # lb/hr\n", + "from math import log,pi\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for lube oil \\t\"\n", + "c=0.62; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for lube oil is : Btu/hr \\t\",Q\n", + "print\"\\t for crude oil \\t\"\n", + "c=0.585; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for crude oil is : Btu/hr \\t\",Q1 # calculation mistake in book\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "A=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \\t\",A\n", + "Fc=0.395; # from fig.17\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:annulus,lube oil \\t\"\n", + "D1=0.199; # ft\n", + "D2=0.256; # ft\n", + "aa=((pi)*(D2**2-D1**2)/4); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",aa\n", + "De=(D2**2-D1**2)/D1; # equiv diameter,ft\n", + "print\"\\t equiv diameter is : ft \\t\",De\n", + "Ga=(W/aa); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Ga\n", + "mu1=3*2.42; # at 389.5F,lb/(ft)*(hr), from fig.14\n", + "Rea=((De)*(Ga)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea\n", + "jH=20.5; # from fig.24\n", + "c=0.615; # Btu/(lb)*(F),at 130F\n", + "k=0.067; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Ho\n", + "print\"\\t cold fluid:inner pipe,crude oil \\t\"\n", + "D=0.172; # ft\n", + "ap=((pi)*(D**2)/4); # flow area, ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",ap\n", + "Gp=(w/(2*ap)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gp\n", + "mu2=0.83*2.42; # at 304 F,lb/(ft)*(hr)\n", + "Rep=((D)*(Gp)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rep\n", + "jH=320; # from fig.24\n", + "c=0.585; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.073; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \\t\",Hi\n", + "ID=2.067; # ft\n", + "OD=2.38; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=0.77*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyp=(mu2/muw)**0.14;\n", + "print\"\\t phyp is : \\t\",phyp # from fig.24\n", + "hio=(Hio)*(1); # from eq.6.37\n", + "print\"\\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\t\",tw\n", + "muw=6.6*2.42; # lb/(ft)*(hr), from fig.14\n", + "phya=(mu1/muw)**0.14;\n", + "print\"\\t phya is : \\t\",phya # from fig.24\n", + "ho=(Ho)*(phya); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "Rd=0.006; # required by problem,(hr)*(ft**2)*(F)/Btu\n", + "UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "A=((Q)/((UD)*(LMTD))); # required surface,ft**2\n", + "print\"\\t required surface is : ft**2 \\t\",A\n", + "A1=0.622; # From Table 11,ft**2\n", + "Lr=(A/A1); # required length;lin ft\n", + "print\"\\t required length is : lin ft \\t\",Lr\n", + "print\"\\t Since two parallel streams are employed, use eight 20 ft hairpins or 320 lin. feet \\t\"\n", + "L=320;\n", + "A2=320*0.622; # actual surface supplied,ft**2\n", + "print\"\\t actual surface supplied is : ft**2 \\t\",A2\n", + "UD=((Q)/((A2)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "De1=.058; #ft\n", + "print\"\\t De1 is : ft \\t\",De1\n", + "Rea1=((De1)*(Ga)/7.25); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Rea1\n", + "f=(0.0035)+((0.264)/(2680**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",f\n", + "s=0.775;\n", + "row=62.5*0.775; # from fig 6\n", + "delFa=((4*f*(Ga**2)*L)/(2*4.18*(10**8)*(row**2)*(De1))); # ft\n", + "print\"\\t delFa is : ft \\t\",delFa\n", + "V=((Ga)/(3600*row)); #fps\n", + "print\"\\t V is : fps \\t\",V\n", + "delFl=((8*(V**2))/(2*32.2)); #ft\n", + "print\"\\t delFl is : ft \\t\",delFl\n", + "delPa=((delFa+delFl)*(row)/144); # psi\n", + "print\"\\t delPa is : psi \\t\",delPa\n", + "print\"\\t allowable delPa is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=(0.0035)+((0.264)/(Rep**0.42)); # friction factor, using eq.3.47b\n", + "print\"\\t friction factor is : \\t\",round(f,7)\n", + "s=0.76;\n", + "row=62.5*0.76; # from table 6\n", + "Lp=160;\n", + "delFp=((4*f*(Gp**2)*Lp)/(2*4.18*(10**8)*(row**2)*(D))); # ft\n", + "print\"\\t delFp is : ft \\t\",round(delFp,1)\n", + "delPp=((delFp)*(row)/144); # psi\n", + "print\"\\t delPp is : psi \\t\",round(delPp,1)\n", + "print\"\\t allowable delPp is 10 psi \\t\"\n", + "# end\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/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 new file mode 100644 index 00000000..697d628e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_1.ipynb @@ -0,0 +1,1075 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Parallel-Counter flow:Shell and Tube Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.1 \n", + "\n", + "\t equivalent diameter is : in 0.95\n", + "\t De is : in 0.079\n" + ] + } + ], + "source": [ + "print\"\\t example 7.1 \\n\"\n", + "#given\n", + "PT=1; # square pitch,in\n", + "do=0.75; # outer diameter,in\n", + "#solution\n", + "de=((4*(PT**2-(3.14*do**2/4)))/(3.14*do));\n", + "print\"\\t equivalent diameter is : in \",round(de,2)\n", + "De=(de/12); # ft\n", + "print\"\\t De is : in \",round(De,3)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 pgno:147" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.2 \n", + "\t approximate values are mentioned in the book \n", + "\t considering 50F approach \n", + "\t t2 is : F 200.0\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100.0\n", + "\t R is : 1.0\n", + "\t S is : 0.4\n", + "\t FT is 0.925 \n", + "\t considering 0F approach \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.80 \n", + "\t considering 20F cross \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.64 \n" + ] + } + ], + "source": [ + "print\"\\t example 7.2 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "print\"\\t considering 50F approach \"\n", + "#given\n", + "T1=350.; #F\n", + "T2=250.; #F\n", + "t2=T2-50.; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "t2=200.;\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2);# F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=100.;\n", + "#solution\n", + "\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.925 \" # from fig 18\n", + "print\"\\t considering 0F approach \"\n", + "T1=300; #F\n", + "T2=200; #F\n", + "t2=T2-0; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.80 \" # from fig 18\n", + "print\"\\t considering 20F cross \"\n", + "T1=280; #F\n", + "T2=180; #F\n", + "t2=T2+20; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \\n\"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.64 \" # from fig 18\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\t for kerosene \n", + "\t total heat required for kerosene is : Btu/hr 5034810.0\n", + "\t for crude oil \n", + "\t total heat required for mid continent crude is : Btu/hr 5110700.0\n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 220.0\n", + "\t LMTD is : F 152.195928445\n", + "\t R is : 2.71428571429\n", + "\t S is : 0.241379310345\n", + "\t FT is 0.905 \n", + "\t delt is : F 137.737315243\n", + "\t ratio of two local temperature difference is : 0.454545454545\n", + "\t caloric temperature of hot fluid is : F 279.8\n", + "\t caloric temperature of cold fluid is : F 129.4\n", + "\t hot fluid:shell side,kerosene \n", + "\t flow area is : ft**2 0.147569444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 296809.411765\n", + "\t reynolds number is : 25296.2566845\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 86.2363636364\n", + "\t cold fluid:inner tube side,crude oil \n", + "\n", + "\t flow area is : ft**2 0.141267361111\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1054737.61829\n", + "\t reynolds number is : 8172.03733177\n", + "\t Pr is : 1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) 35.362962963\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 28.644\n", + "\t phyt is : 1.1303932977\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 32.3789856193\n", + "\t tw is : F 242.299617309\n", + "\t phys is : 0.953986161765\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 82.26829755\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 23.2344278003\n", + "\t total surface area is : ft**2 661.8304\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 56.0637396161\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.0252027385623\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 38\n", + "\t delPs is : psi 3.45911725247\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 6.13806896405\n", + "\t delPr is : psi 2.89156626506\n", + "\t delPT is : psi 9.03\n", + "\t allowable delPs is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=170.; # outlet cold fluid,F\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for kerosene \"\n", + "c=0.605; # Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \",Q1 # calculation mistake in problem\n", + "print\"\\t for crude oil \"\n", + "c=0.49; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for mid continent crude is : Btu/hr \",Q # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.905 \" # from fig 18\n", + "delt=(0.905*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X \n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,kerosene \"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.40*2.42; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=93; # from fig.28\n", + "c=0.59; # Btu/(lb)*(F),at 280F,from fig.4\n", + "k=0.0765; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\n\"\n", + "D=0.0675; # ft\n", + "Nt=158;\n", + "n=4; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.515; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=3.6*2.42; # at 129F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "jH=31; # from fig.24\n", + "c=0.49; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \",Hi\n", + "ID=0.81; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=1.5*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "muw=0.56*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.00175; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.73; # for reynolds number 25300,using fig.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are :\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.000285; # friction factor for reynolds number 8220, using fig.26\n", + "s=0.83;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.15; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,2)\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.4 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for distilled water \n", + "\t total heat required for distilled water is : Btu/hr 1400000.0\n", + "\t for raw water \n", + "\t total heat required for raw water is : Btu/hr 1400000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 13.0\n", + "\t LMTD is : F 11.4344840601\n", + "\t R is : 1.6\n", + "\t S is : 0.277777777778\n", + "\t FT is 0.945 \n", + "\t delt is : F 10.8055874368\n", + "\t ratio of two local temperature difference is : 0.769230769231\n", + "\t caloric temperature of hot fluid is : F 89.0\n", + "\t caloric temperature of cold fluid is : F 77.5\n", + "\t hot fluid:shell side,distilled water \n", + "\t flow area is : ft**2 0.254166666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 688524.590164\n", + "\t reynolds number is : 16099.0598149\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 573.381818182\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.185555555556\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1508982.03593\n", + "\t V is fps 6.70658682635\n", + "\t reynolds number is : 36712.4177803\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1158.3\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 383.527824238\n", + "\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \n", + "\t total surface area is : ft**2 502.528\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 257.821653196\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00127127741812\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 16\n", + "\t delPs is : psi 7.65506963359\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 4.9\n", + "\t delPr is : psi 2.6\n", + "\t delPT is : psi 7.6\n", + "\t allowable delPT is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.4 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=93.; # inlet hot fluid,F\n", + "T2=85.; # outlet hot fluid,F\n", + "t1=75.; # inlet cold fluid,F\n", + "t2=80.; # outlet cold fluid,F\n", + "W=175000.; # lb/hr\n", + "w=280000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for distilled water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for distilled water is : Btu/hr \",Q\n", + "print\"\\t for raw water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for raw water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.945 \" # from fig 18\n", + "delt=(0.945*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X\n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,distilled water \"\n", + "ID=15.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.9375;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.81*2.42; # at 89F,lb/(ft)*(hr), from fig.14\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=73; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 89F,from fig.table 4\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=160;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.334; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.92*2.42; # at 77.5F,lb/(ft)*(hr)\n", + "D=0.65/12; #ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1350*0.99; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.65; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "print\"\\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \"\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 16200, using fig.29\n", + "s=1; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00019; # friction factor for reynolds number 36400, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.054; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "X1=0.33; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exxample 7.5 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.5 \n", + "\t approximate values are mentioned in the book \n", + "\t delt1 is : F 65.0\n", + "\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \n", + "\n", + "\t X is : 0.120481927711\n", + "\t Y is : 0.384615384615\n", + "\t delt2 is : F 62.4\n", + "\t t2 is : F 112.6\n" + ] + } + ], + "source": [ + "print\"\\t example 7.5 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=175.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "#solution\n", + "delt1=T2-t1; #F\n", + "print\"\\t delt1 is : F \",delt1\n", + "U=15; # assumption,Btu/(hr)*(ft^2)*(F)\n", + "theta=8000; # operating hours,hr\n", + "CW=(0.01/8300); # water cost,$/lb\n", + "print\"\\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \\n\"\n", + "CF=(0.3*4); # annual fixed charges/ft^2\n", + "c=1; # Btu/(lb)*(F)\n", + "X=((U)*(theta)*(CW)/(CF*c));\n", + "print\"\\t X is : \",X\n", + "Y=((T1-T2)/delt1);\n", + "print\"\\t Y is : \",Y\n", + "A=0.96; # A=(delt2/delt1), from fig 7.24\n", + "delt2=0.96*delt1;\n", + "print\"\\t delt2 is : F \",delt2\n", + "t2=T1-delt2; # F\n", + "print\"\\t t2 is : F \",t2\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 pgno:161" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.6 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 915667.2\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 915200.0\n", + "\t delt1 is : F 22.0\n", + "\t delt2 is : F 60.0\n", + "\t LMTD is : F 37.8749328485\n", + "\t R is : 2.72727272727\n", + "\t S is : 0.268292682927\n", + "\t FT is 0.81 \n", + "\t delt is : F 30.6786956073\n", + "\t caloric temperature of hot fluid is : F 120.0\n", + "\t caloric temperature of cold fluid is : F 79.0\n", + "\t hot fluid:shell side,phosphate solution \n", + "\t flow area is : ft**2 0.0347916666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 579449.101796\n", + "\t reynolds number is : 15796.5061612\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 295.957894737\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.0545277777778\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 762913.907285\n", + "\t V is fps 3.39072847682\n", + "\t reynolds number is : 17899.0185011\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 204.459014471\n", + "\t total surface area is : ft**2 163.3216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 182.656652912\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000583796892885\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 96\n", + "\t delPs is : psi 9.51887629626\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 1.58733222032\n", + "\t delPr is : psi 0.6\n", + "\t delPT is : psi 2.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 7.6 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=150.; # inlet hot fluid,F\n", + "T2=90.; # outlet hot fluid,F\n", + "t1=68.; # inlet cold fluid,F\n", + "t2=90.; # outlet cold fluid,F\n", + "W=20160.; # lb/hr\n", + "w=41600.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.3*0.19)+(0.7*1); # Btu/(lb)*(F), bcoz of 30 percent of solution\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.81 \" # from fig 18\n", + "delt=(0.81*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,phosphate solution \"\n", + "ID=10.02; # in\n", + "C=0.25; # clearance\n", + "B=2; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.20*2.42; # at 120F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=71; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 120F,from fig.table 4\n", + "k=0.33; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((0.757)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=52;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.91*2.42; # at 79F,lb/(ft)*(hr),from table 14\n", + "D=(0.62/12); # from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=800*1; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 15750, using fig.29\n", + "s=1.3; # for reynolds number 25300,using fig.6\n", + "Ds=10.02/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.0517; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.08; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.7 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 1050.97060273\n", + "\t coefficient of t**2 is : 1\n", + "\t coefficient of t is : -556\n", + "\t constant term is : 73733.0293973\n", + "\t t is : [ 0.00457855 0.00296217]\n", + "\t t cannot be greater than 328F t is 218F \n" + ] + } + ], + "source": [ + "print\"\\t example 7.7 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "U=50; # Btu/(hr)*(ft**2)*(F)\n", + "TP=328; # F\n", + "TE=228; # F\n", + "#solution\n", + "import numpy\n", + "\n", + "CP=(0.30/(888.8*1000));\n", + "CE=(0.05/(960*1000));\n", + "CF=1.20;\n", + "theta=8000; # annual hours\n", + "X=((CF*(TP-TE))/((CP-CE)*U*theta)); # from eq 7.53\n", + "print\"\\t X is : \",X\n", + "a=(1); # coefficient of t**2\n", + "b=(-556); # coefficient of t\n", + "c=(74784-X); # constant\n", + "print\"\\t coefficient of t**2 is : \",a\n", + "print\"\\t coefficient of t is : \",b\n", + "print\"\\t constant term is : \",c\n", + "P=numpy.array([c, b, a])\n", + "t=numpy.roots(P)\n", + "print\"\\t t is :\",t\n", + "print\"\\t t cannot be greater than 328F t is 218F \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "ascii\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 3784000.0\n", + "\t for steam \n", + "\n", + "\t total heat required for steam is : Btu/hr 3792395.0\n", + "\t delt1 is : F 128.0\n", + "\t delt2 is : F 106.0\n", + "\t LMTD is : F 116.654454302\n", + "\t R is : 0.0\n", + "\t delt is : F 116.654454302\n", + "\t hot fluid:tube side,steam \n", + "\t flow area is : ft**2 0.0796944444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 49564.3081213\n", + "\t reynolds number is : 82671.1836992\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1500\n", + "\t cold fluid:shell side,sugar solution \n", + "\n", + "\t flow area is : ft**2 0.551953125\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 362349.610757\n", + "\t De is : ft 0.148026315789\n", + "\t reynolds number is : 17049.3572499\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 138.3504\n", + "\t phys is : 1.13996690865\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 157.714877798\n", + "\t tw is : F 218.119942108\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 142.70989533\n", + "\t total surface area is : ft**2 238.7008\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 136.194122026\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000335238210724\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 2.8\n", + "\t pressure drop for annulus \n", + "\n", + "\t De1 is : ft 0.122\n", + "\t Res1 is : 14084.0\n", + "\t delPs is : psi 0.07\n" + ] + } + ], + "source": [ + "print\"\\t example 7.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=228.; # inlet hot fluid,F\n", + "T2=228.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=122.; # outlet cold fluid,F\n", + "W=200000.; # lb/hr\n", + "w=3950.; # lb/hr\n", + "#solution\n", + "import sys\n", + "print sys.getdefaultencoding()\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.2*0.30)+(0.8*1); # bcoz of 20 percent solution,Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for steam \\n\"\n", + "l=960.1; # latent heat of condensation,Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "delt=(LMTD); # when R=0,F\n", + "print\"\\t delt is : F \",delt\n", + "\n", + "ta=111; #F\n", + "Ta=228; #f\n", + "print\"\\t hot fluid:tube side,steam \"\n", + "Nt=76;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)b\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=0.0128*2.42; # at 228F,lb/(ft)*(hr)\n", + "D=(0.62/12); # from table 10,ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hio=1500; # for condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "print\"\\t cold fluid:shell side,sugar solution \\n\"\n", + "ID=12; # in\n", + "d=0.75/12; # diameter of tube,ft\n", + "Nt=76; # number of tubes\n", + "As=((3.14*(12**2)/4)-(76*3.14*(0.75**2)/4))/144; # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.30*2.42; # at 111F,lb/(ft)*(hr), from fig.14\n", + "De=((4*As)/(Nt*3.14*d)); # from eq.6.3,ft\n", + "print\"\\t De is : ft \",De\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=61.5; # from fig.24, tube side data\n", + "c=0.86; # Btu/(lb)*(F),at 111F,from fig.4\n", + "k=0.333; # Btu/(hr)*(ft**2)*(F/ft)\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is :\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "muw=0.51*2.42; # at 210F,lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "tw=(ta)+(((hio)/(hio+Ho))*(Ta-ta)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000155; # friction factor for reynolds number 82500, using fig.26\n", + "s=0.0008;\n", + "phyt=1;\n", + "D=0.0517; \n", + "delPt=((f*(Gt**2)*(L)*(2))/(5.22*(10**10)*(D)*(s)*(phyt)))/2; # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "De1=((4*As)/((Nt*3.14*d)+(3.14*1))); # from eq.6.4,ft\n", + "print\"\\t De1 is : ft\",round(De1,3)\n", + "Res1=(De1*Gs/mu1); # from eq 7.3\n", + "print\"\\t Res1 is : \",round(Res1)\n", + "f=0.00025; # friction factor, using fig.26\n", + "s=1.08; # for reynolds number 25300,using fig.6\n", + "delPs=((f*(Gs**2)*(L)*(1))/(5.22*(10**10)*(De1)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",round(delPs,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 pgno:170" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.9 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 0.628360498562\n", + "\t R is : 2.77815829528\n", + "\t t2 is : F 176.85\n", + "\t T2 is : F 176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 7.9 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390; # F\n", + "t1=100; # F\n", + "U=69.3; # Btu/(hr)*(ft^2)*(F)\n", + "A=662; # ft^2\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "C=0.60; # Btu/(lb)*(F)\n", + "c=0.49; # Btu/(lb)*(F)\n", + "#solution\n", + "X=((U*A)/(w*c));\n", + "print\"\\t X is : \",X\n", + "R=((w*c)/(W*C));\n", + "print\"\\t R is : \",R\n", + "S=0.265; # from fig 7.25, by comparing X an R\n", + "t2=(t1)+((0.265)*(T1-t1)); # S=((t2-t1)/(T1-t1))\n", + "print\"\\t t2 is : F \",t2\n", + "T2=((T1)-((R)*(t2-t1))); # R=((T1-T2)/(t2-t1))\n", + "print\"\\t T2 is : F \",round(T2)\n", + "# end\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/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 new file mode 100644 index 00000000..697d628e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_2.ipynb @@ -0,0 +1,1075 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Parallel-Counter flow:Shell and Tube Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.1 \n", + "\n", + "\t equivalent diameter is : in 0.95\n", + "\t De is : in 0.079\n" + ] + } + ], + "source": [ + "print\"\\t example 7.1 \\n\"\n", + "#given\n", + "PT=1; # square pitch,in\n", + "do=0.75; # outer diameter,in\n", + "#solution\n", + "de=((4*(PT**2-(3.14*do**2/4)))/(3.14*do));\n", + "print\"\\t equivalent diameter is : in \",round(de,2)\n", + "De=(de/12); # ft\n", + "print\"\\t De is : in \",round(De,3)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 pgno:147" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.2 \n", + "\t approximate values are mentioned in the book \n", + "\t considering 50F approach \n", + "\t t2 is : F 200.0\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100.0\n", + "\t R is : 1.0\n", + "\t S is : 0.4\n", + "\t FT is 0.925 \n", + "\t considering 0F approach \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.80 \n", + "\t considering 20F cross \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.64 \n" + ] + } + ], + "source": [ + "print\"\\t example 7.2 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "print\"\\t considering 50F approach \"\n", + "#given\n", + "T1=350.; #F\n", + "T2=250.; #F\n", + "t2=T2-50.; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "t2=200.;\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2);# F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=100.;\n", + "#solution\n", + "\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.925 \" # from fig 18\n", + "print\"\\t considering 0F approach \"\n", + "T1=300; #F\n", + "T2=200; #F\n", + "t2=T2-0; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.80 \" # from fig 18\n", + "print\"\\t considering 20F cross \"\n", + "T1=280; #F\n", + "T2=180; #F\n", + "t2=T2+20; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \\n\"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.64 \" # from fig 18\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\t for kerosene \n", + "\t total heat required for kerosene is : Btu/hr 5034810.0\n", + "\t for crude oil \n", + "\t total heat required for mid continent crude is : Btu/hr 5110700.0\n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 220.0\n", + "\t LMTD is : F 152.195928445\n", + "\t R is : 2.71428571429\n", + "\t S is : 0.241379310345\n", + "\t FT is 0.905 \n", + "\t delt is : F 137.737315243\n", + "\t ratio of two local temperature difference is : 0.454545454545\n", + "\t caloric temperature of hot fluid is : F 279.8\n", + "\t caloric temperature of cold fluid is : F 129.4\n", + "\t hot fluid:shell side,kerosene \n", + "\t flow area is : ft**2 0.147569444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 296809.411765\n", + "\t reynolds number is : 25296.2566845\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 86.2363636364\n", + "\t cold fluid:inner tube side,crude oil \n", + "\n", + "\t flow area is : ft**2 0.141267361111\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1054737.61829\n", + "\t reynolds number is : 8172.03733177\n", + "\t Pr is : 1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) 35.362962963\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 28.644\n", + "\t phyt is : 1.1303932977\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 32.3789856193\n", + "\t tw is : F 242.299617309\n", + "\t phys is : 0.953986161765\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 82.26829755\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 23.2344278003\n", + "\t total surface area is : ft**2 661.8304\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 56.0637396161\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.0252027385623\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 38\n", + "\t delPs is : psi 3.45911725247\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 6.13806896405\n", + "\t delPr is : psi 2.89156626506\n", + "\t delPT is : psi 9.03\n", + "\t allowable delPs is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=170.; # outlet cold fluid,F\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for kerosene \"\n", + "c=0.605; # Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \",Q1 # calculation mistake in problem\n", + "print\"\\t for crude oil \"\n", + "c=0.49; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for mid continent crude is : Btu/hr \",Q # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.905 \" # from fig 18\n", + "delt=(0.905*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X \n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,kerosene \"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.40*2.42; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=93; # from fig.28\n", + "c=0.59; # Btu/(lb)*(F),at 280F,from fig.4\n", + "k=0.0765; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\n\"\n", + "D=0.0675; # ft\n", + "Nt=158;\n", + "n=4; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.515; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=3.6*2.42; # at 129F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "jH=31; # from fig.24\n", + "c=0.49; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \",Hi\n", + "ID=0.81; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=1.5*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "muw=0.56*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.00175; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.73; # for reynolds number 25300,using fig.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are :\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.000285; # friction factor for reynolds number 8220, using fig.26\n", + "s=0.83;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.15; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,2)\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.4 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for distilled water \n", + "\t total heat required for distilled water is : Btu/hr 1400000.0\n", + "\t for raw water \n", + "\t total heat required for raw water is : Btu/hr 1400000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 13.0\n", + "\t LMTD is : F 11.4344840601\n", + "\t R is : 1.6\n", + "\t S is : 0.277777777778\n", + "\t FT is 0.945 \n", + "\t delt is : F 10.8055874368\n", + "\t ratio of two local temperature difference is : 0.769230769231\n", + "\t caloric temperature of hot fluid is : F 89.0\n", + "\t caloric temperature of cold fluid is : F 77.5\n", + "\t hot fluid:shell side,distilled water \n", + "\t flow area is : ft**2 0.254166666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 688524.590164\n", + "\t reynolds number is : 16099.0598149\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 573.381818182\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.185555555556\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1508982.03593\n", + "\t V is fps 6.70658682635\n", + "\t reynolds number is : 36712.4177803\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1158.3\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 383.527824238\n", + "\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \n", + "\t total surface area is : ft**2 502.528\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 257.821653196\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00127127741812\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 16\n", + "\t delPs is : psi 7.65506963359\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 4.9\n", + "\t delPr is : psi 2.6\n", + "\t delPT is : psi 7.6\n", + "\t allowable delPT is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.4 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=93.; # inlet hot fluid,F\n", + "T2=85.; # outlet hot fluid,F\n", + "t1=75.; # inlet cold fluid,F\n", + "t2=80.; # outlet cold fluid,F\n", + "W=175000.; # lb/hr\n", + "w=280000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for distilled water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for distilled water is : Btu/hr \",Q\n", + "print\"\\t for raw water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for raw water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.945 \" # from fig 18\n", + "delt=(0.945*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X\n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,distilled water \"\n", + "ID=15.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.9375;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.81*2.42; # at 89F,lb/(ft)*(hr), from fig.14\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=73; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 89F,from fig.table 4\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=160;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.334; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.92*2.42; # at 77.5F,lb/(ft)*(hr)\n", + "D=0.65/12; #ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1350*0.99; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.65; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "print\"\\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \"\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 16200, using fig.29\n", + "s=1; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00019; # friction factor for reynolds number 36400, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.054; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "X1=0.33; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exxample 7.5 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.5 \n", + "\t approximate values are mentioned in the book \n", + "\t delt1 is : F 65.0\n", + "\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \n", + "\n", + "\t X is : 0.120481927711\n", + "\t Y is : 0.384615384615\n", + "\t delt2 is : F 62.4\n", + "\t t2 is : F 112.6\n" + ] + } + ], + "source": [ + "print\"\\t example 7.5 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=175.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "#solution\n", + "delt1=T2-t1; #F\n", + "print\"\\t delt1 is : F \",delt1\n", + "U=15; # assumption,Btu/(hr)*(ft^2)*(F)\n", + "theta=8000; # operating hours,hr\n", + "CW=(0.01/8300); # water cost,$/lb\n", + "print\"\\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \\n\"\n", + "CF=(0.3*4); # annual fixed charges/ft^2\n", + "c=1; # Btu/(lb)*(F)\n", + "X=((U)*(theta)*(CW)/(CF*c));\n", + "print\"\\t X is : \",X\n", + "Y=((T1-T2)/delt1);\n", + "print\"\\t Y is : \",Y\n", + "A=0.96; # A=(delt2/delt1), from fig 7.24\n", + "delt2=0.96*delt1;\n", + "print\"\\t delt2 is : F \",delt2\n", + "t2=T1-delt2; # F\n", + "print\"\\t t2 is : F \",t2\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 pgno:161" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.6 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 915667.2\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 915200.0\n", + "\t delt1 is : F 22.0\n", + "\t delt2 is : F 60.0\n", + "\t LMTD is : F 37.8749328485\n", + "\t R is : 2.72727272727\n", + "\t S is : 0.268292682927\n", + "\t FT is 0.81 \n", + "\t delt is : F 30.6786956073\n", + "\t caloric temperature of hot fluid is : F 120.0\n", + "\t caloric temperature of cold fluid is : F 79.0\n", + "\t hot fluid:shell side,phosphate solution \n", + "\t flow area is : ft**2 0.0347916666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 579449.101796\n", + "\t reynolds number is : 15796.5061612\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 295.957894737\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.0545277777778\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 762913.907285\n", + "\t V is fps 3.39072847682\n", + "\t reynolds number is : 17899.0185011\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 204.459014471\n", + "\t total surface area is : ft**2 163.3216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 182.656652912\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000583796892885\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 96\n", + "\t delPs is : psi 9.51887629626\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 1.58733222032\n", + "\t delPr is : psi 0.6\n", + "\t delPT is : psi 2.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 7.6 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=150.; # inlet hot fluid,F\n", + "T2=90.; # outlet hot fluid,F\n", + "t1=68.; # inlet cold fluid,F\n", + "t2=90.; # outlet cold fluid,F\n", + "W=20160.; # lb/hr\n", + "w=41600.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.3*0.19)+(0.7*1); # Btu/(lb)*(F), bcoz of 30 percent of solution\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.81 \" # from fig 18\n", + "delt=(0.81*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,phosphate solution \"\n", + "ID=10.02; # in\n", + "C=0.25; # clearance\n", + "B=2; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.20*2.42; # at 120F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=71; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 120F,from fig.table 4\n", + "k=0.33; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((0.757)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=52;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.91*2.42; # at 79F,lb/(ft)*(hr),from table 14\n", + "D=(0.62/12); # from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=800*1; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 15750, using fig.29\n", + "s=1.3; # for reynolds number 25300,using fig.6\n", + "Ds=10.02/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.0517; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.08; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.7 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 1050.97060273\n", + "\t coefficient of t**2 is : 1\n", + "\t coefficient of t is : -556\n", + "\t constant term is : 73733.0293973\n", + "\t t is : [ 0.00457855 0.00296217]\n", + "\t t cannot be greater than 328F t is 218F \n" + ] + } + ], + "source": [ + "print\"\\t example 7.7 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "U=50; # Btu/(hr)*(ft**2)*(F)\n", + "TP=328; # F\n", + "TE=228; # F\n", + "#solution\n", + "import numpy\n", + "\n", + "CP=(0.30/(888.8*1000));\n", + "CE=(0.05/(960*1000));\n", + "CF=1.20;\n", + "theta=8000; # annual hours\n", + "X=((CF*(TP-TE))/((CP-CE)*U*theta)); # from eq 7.53\n", + "print\"\\t X is : \",X\n", + "a=(1); # coefficient of t**2\n", + "b=(-556); # coefficient of t\n", + "c=(74784-X); # constant\n", + "print\"\\t coefficient of t**2 is : \",a\n", + "print\"\\t coefficient of t is : \",b\n", + "print\"\\t constant term is : \",c\n", + "P=numpy.array([c, b, a])\n", + "t=numpy.roots(P)\n", + "print\"\\t t is :\",t\n", + "print\"\\t t cannot be greater than 328F t is 218F \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "ascii\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 3784000.0\n", + "\t for steam \n", + "\n", + "\t total heat required for steam is : Btu/hr 3792395.0\n", + "\t delt1 is : F 128.0\n", + "\t delt2 is : F 106.0\n", + "\t LMTD is : F 116.654454302\n", + "\t R is : 0.0\n", + "\t delt is : F 116.654454302\n", + "\t hot fluid:tube side,steam \n", + "\t flow area is : ft**2 0.0796944444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 49564.3081213\n", + "\t reynolds number is : 82671.1836992\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1500\n", + "\t cold fluid:shell side,sugar solution \n", + "\n", + "\t flow area is : ft**2 0.551953125\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 362349.610757\n", + "\t De is : ft 0.148026315789\n", + "\t reynolds number is : 17049.3572499\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 138.3504\n", + "\t phys is : 1.13996690865\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 157.714877798\n", + "\t tw is : F 218.119942108\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 142.70989533\n", + "\t total surface area is : ft**2 238.7008\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 136.194122026\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000335238210724\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 2.8\n", + "\t pressure drop for annulus \n", + "\n", + "\t De1 is : ft 0.122\n", + "\t Res1 is : 14084.0\n", + "\t delPs is : psi 0.07\n" + ] + } + ], + "source": [ + "print\"\\t example 7.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=228.; # inlet hot fluid,F\n", + "T2=228.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=122.; # outlet cold fluid,F\n", + "W=200000.; # lb/hr\n", + "w=3950.; # lb/hr\n", + "#solution\n", + "import sys\n", + "print sys.getdefaultencoding()\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.2*0.30)+(0.8*1); # bcoz of 20 percent solution,Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for steam \\n\"\n", + "l=960.1; # latent heat of condensation,Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "delt=(LMTD); # when R=0,F\n", + "print\"\\t delt is : F \",delt\n", + "\n", + "ta=111; #F\n", + "Ta=228; #f\n", + "print\"\\t hot fluid:tube side,steam \"\n", + "Nt=76;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)b\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=0.0128*2.42; # at 228F,lb/(ft)*(hr)\n", + "D=(0.62/12); # from table 10,ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hio=1500; # for condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "print\"\\t cold fluid:shell side,sugar solution \\n\"\n", + "ID=12; # in\n", + "d=0.75/12; # diameter of tube,ft\n", + "Nt=76; # number of tubes\n", + "As=((3.14*(12**2)/4)-(76*3.14*(0.75**2)/4))/144; # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.30*2.42; # at 111F,lb/(ft)*(hr), from fig.14\n", + "De=((4*As)/(Nt*3.14*d)); # from eq.6.3,ft\n", + "print\"\\t De is : ft \",De\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=61.5; # from fig.24, tube side data\n", + "c=0.86; # Btu/(lb)*(F),at 111F,from fig.4\n", + "k=0.333; # Btu/(hr)*(ft**2)*(F/ft)\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is :\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "muw=0.51*2.42; # at 210F,lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "tw=(ta)+(((hio)/(hio+Ho))*(Ta-ta)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000155; # friction factor for reynolds number 82500, using fig.26\n", + "s=0.0008;\n", + "phyt=1;\n", + "D=0.0517; \n", + "delPt=((f*(Gt**2)*(L)*(2))/(5.22*(10**10)*(D)*(s)*(phyt)))/2; # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "De1=((4*As)/((Nt*3.14*d)+(3.14*1))); # from eq.6.4,ft\n", + "print\"\\t De1 is : ft\",round(De1,3)\n", + "Res1=(De1*Gs/mu1); # from eq 7.3\n", + "print\"\\t Res1 is : \",round(Res1)\n", + "f=0.00025; # friction factor, using fig.26\n", + "s=1.08; # for reynolds number 25300,using fig.6\n", + "delPs=((f*(Gs**2)*(L)*(1))/(5.22*(10**10)*(De1)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",round(delPs,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 pgno:170" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.9 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 0.628360498562\n", + "\t R is : 2.77815829528\n", + "\t t2 is : F 176.85\n", + "\t T2 is : F 176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 7.9 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390; # F\n", + "t1=100; # F\n", + "U=69.3; # Btu/(hr)*(ft^2)*(F)\n", + "A=662; # ft^2\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "C=0.60; # Btu/(lb)*(F)\n", + "c=0.49; # Btu/(lb)*(F)\n", + "#solution\n", + "X=((U*A)/(w*c));\n", + "print\"\\t X is : \",X\n", + "R=((w*c)/(W*C));\n", + "print\"\\t R is : \",R\n", + "S=0.265; # from fig 7.25, by comparing X an R\n", + "t2=(t1)+((0.265)*(T1-t1)); # S=((t2-t1)/(T1-t1))\n", + "print\"\\t t2 is : F \",t2\n", + "T2=((T1)-((R)*(t2-t1))); # R=((T1-T2)/(t2-t1))\n", + "print\"\\t T2 is : F \",round(T2)\n", + "# end\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/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 new file mode 100644 index 00000000..697d628e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_3.ipynb @@ -0,0 +1,1075 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Parallel-Counter flow:Shell and Tube Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.1 \n", + "\n", + "\t equivalent diameter is : in 0.95\n", + "\t De is : in 0.079\n" + ] + } + ], + "source": [ + "print\"\\t example 7.1 \\n\"\n", + "#given\n", + "PT=1; # square pitch,in\n", + "do=0.75; # outer diameter,in\n", + "#solution\n", + "de=((4*(PT**2-(3.14*do**2/4)))/(3.14*do));\n", + "print\"\\t equivalent diameter is : in \",round(de,2)\n", + "De=(de/12); # ft\n", + "print\"\\t De is : in \",round(De,3)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 pgno:147" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.2 \n", + "\t approximate values are mentioned in the book \n", + "\t considering 50F approach \n", + "\t t2 is : F 200.0\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100.0\n", + "\t R is : 1.0\n", + "\t S is : 0.4\n", + "\t FT is 0.925 \n", + "\t considering 0F approach \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.80 \n", + "\t considering 20F cross \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.64 \n" + ] + } + ], + "source": [ + "print\"\\t example 7.2 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "print\"\\t considering 50F approach \"\n", + "#given\n", + "T1=350.; #F\n", + "T2=250.; #F\n", + "t2=T2-50.; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "t2=200.;\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2);# F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=100.;\n", + "#solution\n", + "\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.925 \" # from fig 18\n", + "print\"\\t considering 0F approach \"\n", + "T1=300; #F\n", + "T2=200; #F\n", + "t2=T2-0; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.80 \" # from fig 18\n", + "print\"\\t considering 20F cross \"\n", + "T1=280; #F\n", + "T2=180; #F\n", + "t2=T2+20; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \\n\"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.64 \" # from fig 18\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\t for kerosene \n", + "\t total heat required for kerosene is : Btu/hr 5034810.0\n", + "\t for crude oil \n", + "\t total heat required for mid continent crude is : Btu/hr 5110700.0\n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 220.0\n", + "\t LMTD is : F 152.195928445\n", + "\t R is : 2.71428571429\n", + "\t S is : 0.241379310345\n", + "\t FT is 0.905 \n", + "\t delt is : F 137.737315243\n", + "\t ratio of two local temperature difference is : 0.454545454545\n", + "\t caloric temperature of hot fluid is : F 279.8\n", + "\t caloric temperature of cold fluid is : F 129.4\n", + "\t hot fluid:shell side,kerosene \n", + "\t flow area is : ft**2 0.147569444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 296809.411765\n", + "\t reynolds number is : 25296.2566845\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 86.2363636364\n", + "\t cold fluid:inner tube side,crude oil \n", + "\n", + "\t flow area is : ft**2 0.141267361111\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1054737.61829\n", + "\t reynolds number is : 8172.03733177\n", + "\t Pr is : 1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) 35.362962963\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 28.644\n", + "\t phyt is : 1.1303932977\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 32.3789856193\n", + "\t tw is : F 242.299617309\n", + "\t phys is : 0.953986161765\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 82.26829755\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 23.2344278003\n", + "\t total surface area is : ft**2 661.8304\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 56.0637396161\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.0252027385623\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 38\n", + "\t delPs is : psi 3.45911725247\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 6.13806896405\n", + "\t delPr is : psi 2.89156626506\n", + "\t delPT is : psi 9.03\n", + "\t allowable delPs is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=170.; # outlet cold fluid,F\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for kerosene \"\n", + "c=0.605; # Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \",Q1 # calculation mistake in problem\n", + "print\"\\t for crude oil \"\n", + "c=0.49; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for mid continent crude is : Btu/hr \",Q # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.905 \" # from fig 18\n", + "delt=(0.905*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X \n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,kerosene \"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.40*2.42; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=93; # from fig.28\n", + "c=0.59; # Btu/(lb)*(F),at 280F,from fig.4\n", + "k=0.0765; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\n\"\n", + "D=0.0675; # ft\n", + "Nt=158;\n", + "n=4; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.515; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=3.6*2.42; # at 129F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "jH=31; # from fig.24\n", + "c=0.49; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \",Hi\n", + "ID=0.81; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=1.5*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "muw=0.56*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.00175; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.73; # for reynolds number 25300,using fig.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are :\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.000285; # friction factor for reynolds number 8220, using fig.26\n", + "s=0.83;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.15; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,2)\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.4 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for distilled water \n", + "\t total heat required for distilled water is : Btu/hr 1400000.0\n", + "\t for raw water \n", + "\t total heat required for raw water is : Btu/hr 1400000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 13.0\n", + "\t LMTD is : F 11.4344840601\n", + "\t R is : 1.6\n", + "\t S is : 0.277777777778\n", + "\t FT is 0.945 \n", + "\t delt is : F 10.8055874368\n", + "\t ratio of two local temperature difference is : 0.769230769231\n", + "\t caloric temperature of hot fluid is : F 89.0\n", + "\t caloric temperature of cold fluid is : F 77.5\n", + "\t hot fluid:shell side,distilled water \n", + "\t flow area is : ft**2 0.254166666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 688524.590164\n", + "\t reynolds number is : 16099.0598149\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 573.381818182\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.185555555556\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1508982.03593\n", + "\t V is fps 6.70658682635\n", + "\t reynolds number is : 36712.4177803\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1158.3\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 383.527824238\n", + "\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \n", + "\t total surface area is : ft**2 502.528\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 257.821653196\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00127127741812\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 16\n", + "\t delPs is : psi 7.65506963359\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 4.9\n", + "\t delPr is : psi 2.6\n", + "\t delPT is : psi 7.6\n", + "\t allowable delPT is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.4 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=93.; # inlet hot fluid,F\n", + "T2=85.; # outlet hot fluid,F\n", + "t1=75.; # inlet cold fluid,F\n", + "t2=80.; # outlet cold fluid,F\n", + "W=175000.; # lb/hr\n", + "w=280000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for distilled water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for distilled water is : Btu/hr \",Q\n", + "print\"\\t for raw water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for raw water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.945 \" # from fig 18\n", + "delt=(0.945*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X\n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,distilled water \"\n", + "ID=15.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.9375;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.81*2.42; # at 89F,lb/(ft)*(hr), from fig.14\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=73; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 89F,from fig.table 4\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=160;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.334; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.92*2.42; # at 77.5F,lb/(ft)*(hr)\n", + "D=0.65/12; #ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1350*0.99; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.65; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "print\"\\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \"\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 16200, using fig.29\n", + "s=1; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00019; # friction factor for reynolds number 36400, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.054; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "X1=0.33; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exxample 7.5 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.5 \n", + "\t approximate values are mentioned in the book \n", + "\t delt1 is : F 65.0\n", + "\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \n", + "\n", + "\t X is : 0.120481927711\n", + "\t Y is : 0.384615384615\n", + "\t delt2 is : F 62.4\n", + "\t t2 is : F 112.6\n" + ] + } + ], + "source": [ + "print\"\\t example 7.5 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=175.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "#solution\n", + "delt1=T2-t1; #F\n", + "print\"\\t delt1 is : F \",delt1\n", + "U=15; # assumption,Btu/(hr)*(ft^2)*(F)\n", + "theta=8000; # operating hours,hr\n", + "CW=(0.01/8300); # water cost,$/lb\n", + "print\"\\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \\n\"\n", + "CF=(0.3*4); # annual fixed charges/ft^2\n", + "c=1; # Btu/(lb)*(F)\n", + "X=((U)*(theta)*(CW)/(CF*c));\n", + "print\"\\t X is : \",X\n", + "Y=((T1-T2)/delt1);\n", + "print\"\\t Y is : \",Y\n", + "A=0.96; # A=(delt2/delt1), from fig 7.24\n", + "delt2=0.96*delt1;\n", + "print\"\\t delt2 is : F \",delt2\n", + "t2=T1-delt2; # F\n", + "print\"\\t t2 is : F \",t2\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 pgno:161" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.6 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 915667.2\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 915200.0\n", + "\t delt1 is : F 22.0\n", + "\t delt2 is : F 60.0\n", + "\t LMTD is : F 37.8749328485\n", + "\t R is : 2.72727272727\n", + "\t S is : 0.268292682927\n", + "\t FT is 0.81 \n", + "\t delt is : F 30.6786956073\n", + "\t caloric temperature of hot fluid is : F 120.0\n", + "\t caloric temperature of cold fluid is : F 79.0\n", + "\t hot fluid:shell side,phosphate solution \n", + "\t flow area is : ft**2 0.0347916666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 579449.101796\n", + "\t reynolds number is : 15796.5061612\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 295.957894737\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.0545277777778\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 762913.907285\n", + "\t V is fps 3.39072847682\n", + "\t reynolds number is : 17899.0185011\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 204.459014471\n", + "\t total surface area is : ft**2 163.3216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 182.656652912\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000583796892885\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 96\n", + "\t delPs is : psi 9.51887629626\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 1.58733222032\n", + "\t delPr is : psi 0.6\n", + "\t delPT is : psi 2.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 7.6 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=150.; # inlet hot fluid,F\n", + "T2=90.; # outlet hot fluid,F\n", + "t1=68.; # inlet cold fluid,F\n", + "t2=90.; # outlet cold fluid,F\n", + "W=20160.; # lb/hr\n", + "w=41600.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.3*0.19)+(0.7*1); # Btu/(lb)*(F), bcoz of 30 percent of solution\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.81 \" # from fig 18\n", + "delt=(0.81*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,phosphate solution \"\n", + "ID=10.02; # in\n", + "C=0.25; # clearance\n", + "B=2; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.20*2.42; # at 120F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=71; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 120F,from fig.table 4\n", + "k=0.33; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((0.757)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=52;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.91*2.42; # at 79F,lb/(ft)*(hr),from table 14\n", + "D=(0.62/12); # from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=800*1; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 15750, using fig.29\n", + "s=1.3; # for reynolds number 25300,using fig.6\n", + "Ds=10.02/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.0517; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.08; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.7 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 1050.97060273\n", + "\t coefficient of t**2 is : 1\n", + "\t coefficient of t is : -556\n", + "\t constant term is : 73733.0293973\n", + "\t t is : [ 0.00457855 0.00296217]\n", + "\t t cannot be greater than 328F t is 218F \n" + ] + } + ], + "source": [ + "print\"\\t example 7.7 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "U=50; # Btu/(hr)*(ft**2)*(F)\n", + "TP=328; # F\n", + "TE=228; # F\n", + "#solution\n", + "import numpy\n", + "\n", + "CP=(0.30/(888.8*1000));\n", + "CE=(0.05/(960*1000));\n", + "CF=1.20;\n", + "theta=8000; # annual hours\n", + "X=((CF*(TP-TE))/((CP-CE)*U*theta)); # from eq 7.53\n", + "print\"\\t X is : \",X\n", + "a=(1); # coefficient of t**2\n", + "b=(-556); # coefficient of t\n", + "c=(74784-X); # constant\n", + "print\"\\t coefficient of t**2 is : \",a\n", + "print\"\\t coefficient of t is : \",b\n", + "print\"\\t constant term is : \",c\n", + "P=numpy.array([c, b, a])\n", + "t=numpy.roots(P)\n", + "print\"\\t t is :\",t\n", + "print\"\\t t cannot be greater than 328F t is 218F \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "ascii\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 3784000.0\n", + "\t for steam \n", + "\n", + "\t total heat required for steam is : Btu/hr 3792395.0\n", + "\t delt1 is : F 128.0\n", + "\t delt2 is : F 106.0\n", + "\t LMTD is : F 116.654454302\n", + "\t R is : 0.0\n", + "\t delt is : F 116.654454302\n", + "\t hot fluid:tube side,steam \n", + "\t flow area is : ft**2 0.0796944444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 49564.3081213\n", + "\t reynolds number is : 82671.1836992\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1500\n", + "\t cold fluid:shell side,sugar solution \n", + "\n", + "\t flow area is : ft**2 0.551953125\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 362349.610757\n", + "\t De is : ft 0.148026315789\n", + "\t reynolds number is : 17049.3572499\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 138.3504\n", + "\t phys is : 1.13996690865\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 157.714877798\n", + "\t tw is : F 218.119942108\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 142.70989533\n", + "\t total surface area is : ft**2 238.7008\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 136.194122026\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000335238210724\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 2.8\n", + "\t pressure drop for annulus \n", + "\n", + "\t De1 is : ft 0.122\n", + "\t Res1 is : 14084.0\n", + "\t delPs is : psi 0.07\n" + ] + } + ], + "source": [ + "print\"\\t example 7.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=228.; # inlet hot fluid,F\n", + "T2=228.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=122.; # outlet cold fluid,F\n", + "W=200000.; # lb/hr\n", + "w=3950.; # lb/hr\n", + "#solution\n", + "import sys\n", + "print sys.getdefaultencoding()\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.2*0.30)+(0.8*1); # bcoz of 20 percent solution,Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for steam \\n\"\n", + "l=960.1; # latent heat of condensation,Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "delt=(LMTD); # when R=0,F\n", + "print\"\\t delt is : F \",delt\n", + "\n", + "ta=111; #F\n", + "Ta=228; #f\n", + "print\"\\t hot fluid:tube side,steam \"\n", + "Nt=76;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)b\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=0.0128*2.42; # at 228F,lb/(ft)*(hr)\n", + "D=(0.62/12); # from table 10,ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hio=1500; # for condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "print\"\\t cold fluid:shell side,sugar solution \\n\"\n", + "ID=12; # in\n", + "d=0.75/12; # diameter of tube,ft\n", + "Nt=76; # number of tubes\n", + "As=((3.14*(12**2)/4)-(76*3.14*(0.75**2)/4))/144; # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.30*2.42; # at 111F,lb/(ft)*(hr), from fig.14\n", + "De=((4*As)/(Nt*3.14*d)); # from eq.6.3,ft\n", + "print\"\\t De is : ft \",De\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=61.5; # from fig.24, tube side data\n", + "c=0.86; # Btu/(lb)*(F),at 111F,from fig.4\n", + "k=0.333; # Btu/(hr)*(ft**2)*(F/ft)\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is :\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "muw=0.51*2.42; # at 210F,lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "tw=(ta)+(((hio)/(hio+Ho))*(Ta-ta)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000155; # friction factor for reynolds number 82500, using fig.26\n", + "s=0.0008;\n", + "phyt=1;\n", + "D=0.0517; \n", + "delPt=((f*(Gt**2)*(L)*(2))/(5.22*(10**10)*(D)*(s)*(phyt)))/2; # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "De1=((4*As)/((Nt*3.14*d)+(3.14*1))); # from eq.6.4,ft\n", + "print\"\\t De1 is : ft\",round(De1,3)\n", + "Res1=(De1*Gs/mu1); # from eq 7.3\n", + "print\"\\t Res1 is : \",round(Res1)\n", + "f=0.00025; # friction factor, using fig.26\n", + "s=1.08; # for reynolds number 25300,using fig.6\n", + "delPs=((f*(Gs**2)*(L)*(1))/(5.22*(10**10)*(De1)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",round(delPs,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 pgno:170" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.9 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 0.628360498562\n", + "\t R is : 2.77815829528\n", + "\t t2 is : F 176.85\n", + "\t T2 is : F 176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 7.9 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390; # F\n", + "t1=100; # F\n", + "U=69.3; # Btu/(hr)*(ft^2)*(F)\n", + "A=662; # ft^2\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "C=0.60; # Btu/(lb)*(F)\n", + "c=0.49; # Btu/(lb)*(F)\n", + "#solution\n", + "X=((U*A)/(w*c));\n", + "print\"\\t X is : \",X\n", + "R=((w*c)/(W*C));\n", + "print\"\\t R is : \",R\n", + "S=0.265; # from fig 7.25, by comparing X an R\n", + "t2=(t1)+((0.265)*(T1-t1)); # S=((t2-t1)/(T1-t1))\n", + "print\"\\t t2 is : F \",t2\n", + "T2=((T1)-((R)*(t2-t1))); # R=((T1-T2)/(t2-t1))\n", + "print\"\\t T2 is : F \",round(T2)\n", + "# end\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/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 new file mode 100644 index 00000000..697d628e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_7_Parallel-Counter_flow_Shell_and_Tube_Exchangers_4.ipynb @@ -0,0 +1,1075 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Parallel-Counter flow:Shell and Tube Exchangers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.1 \n", + "\n", + "\t equivalent diameter is : in 0.95\n", + "\t De is : in 0.079\n" + ] + } + ], + "source": [ + "print\"\\t example 7.1 \\n\"\n", + "#given\n", + "PT=1; # square pitch,in\n", + "do=0.75; # outer diameter,in\n", + "#solution\n", + "de=((4*(PT**2-(3.14*do**2/4)))/(3.14*do));\n", + "print\"\\t equivalent diameter is : in \",round(de,2)\n", + "De=(de/12); # ft\n", + "print\"\\t De is : in \",round(De,3)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2 pgno:147" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.2 \n", + "\t approximate values are mentioned in the book \n", + "\t considering 50F approach \n", + "\t t2 is : F 200.0\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100.0\n", + "\t R is : 1.0\n", + "\t S is : 0.4\n", + "\t FT is 0.925 \n", + "\t considering 0F approach \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.80 \n", + "\t considering 20F cross \n", + "\t t2 is : F 200\n", + "\t fluids are with equal ranges,so \n", + "\n", + "\t t1 is : F 100\n", + "\t R is : 1\n", + "\t S is : 0\n", + "\t FT is 0.64 \n" + ] + } + ], + "source": [ + "print\"\\t example 7.2 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "print\"\\t considering 50F approach \"\n", + "#given\n", + "T1=350.; #F\n", + "T2=250.; #F\n", + "t2=T2-50.; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "t2=200.;\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2);# F\n", + "print\"\\t t1 is : F \",t1\n", + "t1=100.;\n", + "#solution\n", + "\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.925 \" # from fig 18\n", + "print\"\\t considering 0F approach \"\n", + "T1=300; #F\n", + "T2=200; #F\n", + "t2=T2-0; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.80 \" # from fig 18\n", + "print\"\\t considering 20F cross \"\n", + "T1=280; #F\n", + "T2=180; #F\n", + "t2=T2+20; # formula for approach,f\n", + "print\"\\t t2 is : F \",t2\n", + "print\"\\t fluids are with equal ranges,so \\n\"\n", + "t1=t2-(T1-T2); # F\n", + "print\"\\t t1 is : F \",t1\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.64 \" # from fig 18\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.3 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\t for kerosene \n", + "\t total heat required for kerosene is : Btu/hr 5034810.0\n", + "\t for crude oil \n", + "\t total heat required for mid continent crude is : Btu/hr 5110700.0\n", + "\t delt1 is : F 100.0\n", + "\t delt2 is : F 220.0\n", + "\t LMTD is : F 152.195928445\n", + "\t R is : 2.71428571429\n", + "\t S is : 0.241379310345\n", + "\t FT is 0.905 \n", + "\t delt is : F 137.737315243\n", + "\t ratio of two local temperature difference is : 0.454545454545\n", + "\t caloric temperature of hot fluid is : F 279.8\n", + "\t caloric temperature of cold fluid is : F 129.4\n", + "\t hot fluid:shell side,kerosene \n", + "\t flow area is : ft**2 0.147569444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 296809.411765\n", + "\t reynolds number is : 25296.2566845\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 86.2363636364\n", + "\t cold fluid:inner tube side,crude oil \n", + "\n", + "\t flow area is : ft**2 0.141267361111\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1054737.61829\n", + "\t reynolds number is : 8172.03733177\n", + "\t Pr is : 1.0\n", + "\t Hi is : Btu/(hr)*(ft**2)*(F) 35.362962963\n", + "\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 28.644\n", + "\t phyt is : 1.1303932977\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 32.3789856193\n", + "\t tw is : F 242.299617309\n", + "\t phys is : 0.953986161765\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 82.26829755\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 23.2344278003\n", + "\t total surface area is : ft**2 661.8304\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 56.0637396161\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu -0.0252027385623\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 38\n", + "\t delPs is : psi 3.45911725247\n", + "\t allowable delPa is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 6.13806896405\n", + "\t delPr is : psi 2.89156626506\n", + "\t delPT is : psi 9.03\n", + "\t allowable delPs is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.3 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390.; # inlet hot fluid,F\n", + "T2=200.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=170.; # outlet cold fluid,F\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for kerosene \"\n", + "c=0.605; # Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for kerosene is : Btu/hr \",Q1 # calculation mistake in problem\n", + "print\"\\t for crude oil \"\n", + "c=0.49; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for mid continent crude is : Btu/hr \",Q # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.905 \" # from fig 18\n", + "delt=(0.905*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X \n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling \n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,kerosene \"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.40*2.42; # at 280F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=93; # from fig.28\n", + "c=0.59; # Btu/(lb)*(F),at 280F,from fig.4\n", + "k=0.0765; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "print\"\\t cold fluid:inner tube side,crude oil \\n\"\n", + "D=0.0675; # ft\n", + "Nt=158;\n", + "n=4; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.515; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=3.6*2.42; # at 129F,lb/(ft)*(hr)\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "jH=31; # from fig.24\n", + "c=0.49; # Btu/(lb)*(F),at 304F,from fig.4\n", + "k=0.077; # Btu/(hr)*(ft**2)*(F/ft), from fig.1\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "Hi=((jH)*(k/D)*(Pr)*(1**0.14)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t Hi is : Btu/(hr)*(ft**2)*(F) \",Hi\n", + "ID=0.81; # ft\n", + "OD=1; #ft\n", + "Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",Hio\n", + "muw=1.5*2.42; # lb/(ft)*(hr), from fig.14\n", + "phyt=(mu2/muw)**0.14;\n", + "print\"\\t phyt is : \",phyt # from fig.24\n", + "hio=(Hio)*(phyt); # from eq.6.37\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(Hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "muw=0.56*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.00175; # friction factor for reynolds number 25300, using fig.29\n", + "s=0.73; # for reynolds number 25300,using fig.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are :\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPa is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.000285; # friction factor for reynolds number 8220, using fig.26\n", + "s=0.83;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.15; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",delPr\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,2)\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.4 \n", + "\t approximate values are mentioned in the book \n", + "\t 1.for heat balance \n", + "\t for distilled water \n", + "\t total heat required for distilled water is : Btu/hr 1400000.0\n", + "\t for raw water \n", + "\t total heat required for raw water is : Btu/hr 1400000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 13.0\n", + "\t LMTD is : F 11.4344840601\n", + "\t R is : 1.6\n", + "\t S is : 0.277777777778\n", + "\t FT is 0.945 \n", + "\t delt is : F 10.8055874368\n", + "\t ratio of two local temperature difference is : 0.769230769231\n", + "\t caloric temperature of hot fluid is : F 89.0\n", + "\t caloric temperature of cold fluid is : F 77.5\n", + "\t hot fluid:shell side,distilled water \n", + "\t flow area is : ft**2 0.254166666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 688524.590164\n", + "\t reynolds number is : 16099.0598149\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 573.381818182\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.185555555556\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 1508982.03593\n", + "\t V is fps 6.70658682635\n", + "\t reynolds number is : 36712.4177803\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1158.3\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 383.527824238\n", + "\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \n", + "\t total surface area is : ft**2 502.528\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 257.821653196\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00127127741812\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 16\n", + "\t delPs is : psi 7.65506963359\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 4.9\n", + "\t delPr is : psi 2.6\n", + "\t delPT is : psi 7.6\n", + "\t allowable delPT is 10 psi \n" + ] + } + ], + "source": [ + "print\"\\t example 7.4 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=93.; # inlet hot fluid,F\n", + "T2=85.; # outlet hot fluid,F\n", + "t1=75.; # inlet cold fluid,F\n", + "t2=80.; # outlet cold fluid,F\n", + "W=175000.; # lb/hr\n", + "w=280000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \"\n", + "print\"\\t for distilled water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for distilled water is : Btu/hr \",Q\n", + "print\"\\t for raw water \"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for raw water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.945 \" # from fig 18\n", + "delt=(0.945*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : \",X\n", + "Fc=0.42; # from fig.17\n", + "Kc=0.20; # crude oil controlling\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,distilled water \"\n", + "ID=15.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.9375;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=0.81*2.42; # at 89F,lb/(ft)*(hr), from fig.14\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=73; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 89F,from fig.table 4\n", + "k=0.36; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=160;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.334; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.92*2.42; # at 77.5F,lb/(ft)*(hr)\n", + "D=0.65/12; #ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1350*0.99; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.65; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "print\"\\t when both film coefficients are high the thermal resistance of the tube metal is not necessarily insignificant As Assumed in the derivation of Eq. (6.38). For a steel 1.8 BWG tube Rm= 0.00017 and for copper Rm= 0.000017 \"\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 16200, using fig.29\n", + "s=1; # for reynolds number 25300,using fig.6\n", + "Ds=15.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00019; # friction factor for reynolds number 36400, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.054; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "X1=0.33; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exxample 7.5 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.5 \n", + "\t approximate values are mentioned in the book \n", + "\t delt1 is : F 65.0\n", + "\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \n", + "\n", + "\t X is : 0.120481927711\n", + "\t Y is : 0.384615384615\n", + "\t delt2 is : F 62.4\n", + "\t t2 is : F 112.6\n" + ] + } + ], + "source": [ + "print\"\\t example 7.5 \"\n", + "print\"\\t approximate values are mentioned in the book \"\n", + "#given\n", + "T1=175.; # inlet hot fluid,F\n", + "T2=150.; # outlet hot fluid,F\n", + "t1=85.; # inlet cold fluid,F\n", + "#solution\n", + "delt1=T2-t1; #F\n", + "print\"\\t delt1 is : F \",delt1\n", + "U=15; # assumption,Btu/(hr)*(ft^2)*(F)\n", + "theta=8000; # operating hours,hr\n", + "CW=(0.01/8300); # water cost,$/lb\n", + "print\"\\t For annual charges assume 20 per cent repair and maintenanc.e and 10 per cent depreciation \\n\"\n", + "CF=(0.3*4); # annual fixed charges/ft^2\n", + "c=1; # Btu/(lb)*(F)\n", + "X=((U)*(theta)*(CW)/(CF*c));\n", + "print\"\\t X is : \",X\n", + "Y=((T1-T2)/delt1);\n", + "print\"\\t Y is : \",Y\n", + "A=0.96; # A=(delt2/delt1), from fig 7.24\n", + "delt2=0.96*delt1;\n", + "print\"\\t delt2 is : F \",delt2\n", + "t2=T1-delt2; # F\n", + "print\"\\t t2 is : F \",t2\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6 pgno:161" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.6 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 915667.2\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 915200.0\n", + "\t delt1 is : F 22.0\n", + "\t delt2 is : F 60.0\n", + "\t LMTD is : F 37.8749328485\n", + "\t R is : 2.72727272727\n", + "\t S is : 0.268292682927\n", + "\t FT is 0.81 \n", + "\t delt is : F 30.6786956073\n", + "\t caloric temperature of hot fluid is : F 120.0\n", + "\t caloric temperature of cold fluid is : F 79.0\n", + "\t hot fluid:shell side,phosphate solution \n", + "\t flow area is : ft**2 0.0347916666667\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 579449.101796\n", + "\t reynolds number is : 15796.5061612\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 295.957894737\n", + "\t cold fluid:inner tube side,raw water \n", + "\t flow area is : ft**2 0.0545277777778\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 762913.907285\n", + "\t V is fps 3.39072847682\n", + "\t reynolds number is : 17899.0185011\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 661.333333333\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 204.459014471\n", + "\t total surface area is : ft**2 163.3216\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 182.656652912\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000583796892885\n", + "\t pressure drop for annulus \n", + "\t number of crosses are : 96\n", + "\t delPs is : psi 9.51887629626\n", + "\t allowable delPs is 10 psi \n", + "\t pressure drop for inner pipe \n", + "\t delPt is : psi 1.58733222032\n", + "\t delPr is : psi 0.6\n", + "\t delPT is : psi 2.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 7.6 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=150.; # inlet hot fluid,F\n", + "T2=90.; # outlet hot fluid,F\n", + "t1=68.; # inlet cold fluid,F\n", + "t2=90.; # outlet cold fluid,F\n", + "W=20160.; # lb/hr\n", + "w=41600.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.3*0.19)+(0.7*1); # Btu/(lb)*(F), bcoz of 30 percent of solution\n", + "Q1=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.81 \" # from fig 18\n", + "delt=(0.81*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,phosphate solution \"\n", + "ID=10.02; # in\n", + "C=0.25; # clearance\n", + "B=2; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,using eq.7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2),using eq.7.2\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.20*2.42; # at 120F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=71; # from fig.28\n", + "c=1; # Btu/(lb)*(F),at 120F,from fig.table 4\n", + "k=0.33; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((0.757)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \",Pr\n", + "ho=((jH)*(k/De)*(Pr)); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "print\"\\t cold fluid:inner tube side,raw water \"\n", + "Nt=52;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "V=(Gt/(3600*62.5));\n", + "print\"\\t V is fps \",V\n", + "mu2=0.91*2.42; # at 79F,lb/(ft)*(hr),from table 14\n", + "D=(0.62/12); # from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=800*1; #using fig.25,Btu/(hr)*(ft**2)*(F)\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \"\n", + "f=0.0019; # friction factor for reynolds number 15750, using fig.29\n", + "s=1.3; # for reynolds number 25300,using fig.6\n", + "Ds=10.02/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \"\n", + "print\"\\t pressure drop for inner pipe \"\n", + "f=0.00023; # friction factor for reynolds number 17900, using fig.26\n", + "s=1;\n", + "phyt=1;\n", + "D=0.0517; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",delPt\n", + "X1=0.08; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.7 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 1050.97060273\n", + "\t coefficient of t**2 is : 1\n", + "\t coefficient of t is : -556\n", + "\t constant term is : 73733.0293973\n", + "\t t is : [ 0.00457855 0.00296217]\n", + "\t t cannot be greater than 328F t is 218F \n" + ] + } + ], + "source": [ + "print\"\\t example 7.7 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "U=50; # Btu/(hr)*(ft**2)*(F)\n", + "TP=328; # F\n", + "TE=228; # F\n", + "#solution\n", + "import numpy\n", + "\n", + "CP=(0.30/(888.8*1000));\n", + "CE=(0.05/(960*1000));\n", + "CF=1.20;\n", + "theta=8000; # annual hours\n", + "X=((CF*(TP-TE))/((CP-CE)*U*theta)); # from eq 7.53\n", + "print\"\\t X is : \",X\n", + "a=(1); # coefficient of t**2\n", + "b=(-556); # coefficient of t\n", + "c=(74784-X); # constant\n", + "print\"\\t coefficient of t**2 is : \",a\n", + "print\"\\t coefficient of t is : \",b\n", + "print\"\\t constant term is : \",c\n", + "P=numpy.array([c, b, a])\n", + "t=numpy.roots(P)\n", + "print\"\\t t is :\",t\n", + "print\"\\t t cannot be greater than 328F t is 218F \"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.8 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "ascii\n", + "\t 1.for heat balance \n", + "\n", + "\t for solution \n", + "\n", + "\t total heat required for solution is : Btu/hr 3784000.0\n", + "\t for steam \n", + "\n", + "\t total heat required for steam is : Btu/hr 3792395.0\n", + "\t delt1 is : F 128.0\n", + "\t delt2 is : F 106.0\n", + "\t LMTD is : F 116.654454302\n", + "\t R is : 0.0\n", + "\t delt is : F 116.654454302\n", + "\t hot fluid:tube side,steam \n", + "\t flow area is : ft**2 0.0796944444444\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 49564.3081213\n", + "\t reynolds number is : 82671.1836992\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 1500\n", + "\t cold fluid:shell side,sugar solution \n", + "\n", + "\t flow area is : ft**2 0.551953125\n", + "\t mAss velocity is : lb/(hr)*(ft**2) 362349.610757\n", + "\t De is : ft 0.148026315789\n", + "\t reynolds number is : 17049.3572499\n", + "\t Pr is : 1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) 138.3504\n", + "\t phys is : 1.13996690865\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 157.714877798\n", + "\t tw is : F 218.119942108\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 142.70989533\n", + "\t total surface area is : ft**2 238.7008\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 136.194122026\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.000335238210724\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 2.8\n", + "\t pressure drop for annulus \n", + "\n", + "\t De1 is : ft 0.122\n", + "\t Res1 is : 14084.0\n", + "\t delPs is : psi 0.07\n" + ] + } + ], + "source": [ + "print\"\\t example 7.8 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=228.; # inlet hot fluid,F\n", + "T2=228.; # outlet hot fluid,F\n", + "t1=100.; # inlet cold fluid,F\n", + "t2=122.; # outlet cold fluid,F\n", + "W=200000.; # lb/hr\n", + "w=3950.; # lb/hr\n", + "#solution\n", + "import sys\n", + "print sys.getdefaultencoding()\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for solution \\n\"\n", + "c=(0.2*0.30)+(0.8*1); # bcoz of 20 percent solution,Btu/(lb)*(F)\n", + "Q1=((W)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for solution is : Btu/hr \",Q1\n", + "print\"\\t for steam \\n\"\n", + "l=960.1; # latent heat of condensation,Btu/(lb)\n", + "Q=((w)*(l)); # Btu/hr\n", + "print\"\\t total heat required for steam is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "delt=(LMTD); # when R=0,F\n", + "print\"\\t delt is : F \",delt\n", + "\n", + "ta=111; #F\n", + "Ta=228; #f\n", + "print\"\\t hot fluid:tube side,steam \"\n", + "Nt=76;\n", + "n=2; # number of pAsses\n", + "L=16; #ft\n", + "at1=0.302; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \",at\n", + "Gt=(w/(at)); # mAss velocity,lb/(hr)*(ft**2)b\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gt\n", + "mu2=0.0128*2.42; # at 228F,lb/(ft)*(hr)\n", + "D=(0.62/12); # from table 10,ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hio=1500; # for condensation of steam\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "print\"\\t cold fluid:shell side,sugar solution \\n\"\n", + "ID=12; # in\n", + "d=0.75/12; # diameter of tube,ft\n", + "Nt=76; # number of tubes\n", + "As=((3.14*(12**2)/4)-(76*3.14*(0.75**2)/4))/144; # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mAss velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mAss velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.30*2.42; # at 111F,lb/(ft)*(hr), from fig.14\n", + "De=((4*As)/(Nt*3.14*d)); # from eq.6.3,ft\n", + "print\"\\t De is : ft \",De\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=61.5; # from fig.24, tube side data\n", + "c=0.86; # Btu/(lb)*(F),at 111F,from fig.4\n", + "k=0.333; # Btu/(hr)*(ft**2)*(F/ft)\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is :\",Pr\n", + "Ho=((jH)*(k/De)*(Pr)); # H0=(h0/phya),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \",Ho\n", + "muw=0.51*2.42; # at 210F,lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "tw=(ta)+(((hio)/(hio+Ho))*(Ta-ta)); # from eq.5.31\n", + "print\"\\t tw is : F \",tw\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "UD=((Q)/((A)*(LMTD)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000155; # friction factor for reynolds number 82500, using fig.26\n", + "s=0.0008;\n", + "phyt=1;\n", + "D=0.0517; \n", + "delPt=((f*(Gt**2)*(L)*(2))/(5.22*(10**10)*(D)*(s)*(phyt)))/2; # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt,1)\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "De1=((4*As)/((Nt*3.14*d)+(3.14*1))); # from eq.6.4,ft\n", + "print\"\\t De1 is : ft\",round(De1,3)\n", + "Res1=(De1*Gs/mu1); # from eq 7.3\n", + "print\"\\t Res1 is : \",round(Res1)\n", + "f=0.00025; # friction factor, using fig.26\n", + "s=1.08; # for reynolds number 25300,using fig.6\n", + "delPs=((f*(Gs**2)*(L)*(1))/(5.22*(10**10)*(De1)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",round(delPs,2)\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9 pgno:170" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 7.9 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t X is : 0.628360498562\n", + "\t R is : 2.77815829528\n", + "\t t2 is : F 176.85\n", + "\t T2 is : F 176.0\n" + ] + } + ], + "source": [ + "print\"\\t example 7.9 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=390; # F\n", + "t1=100; # F\n", + "U=69.3; # Btu/(hr)*(ft^2)*(F)\n", + "A=662; # ft^2\n", + "W=43800; # lb/hr\n", + "w=149000; # lb/hr\n", + "C=0.60; # Btu/(lb)*(F)\n", + "c=0.49; # Btu/(lb)*(F)\n", + "#solution\n", + "X=((U*A)/(w*c));\n", + "print\"\\t X is : \",X\n", + "R=((w*c)/(W*C));\n", + "print\"\\t R is : \",R\n", + "S=0.265; # from fig 7.25, by comparing X an R\n", + "t2=(t1)+((0.265)*(T1-t1)); # S=((t2-t1)/(T1-t1))\n", + "print\"\\t t2 is : F \",t2\n", + "T2=((T1)-((R)*(t2-t1))); # R=((T1-T2)/(t2-t1))\n", + "print\"\\t T2 is : F \",round(T2)\n", + "# end\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/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 new file mode 100644 index 00000000..5ebbdccc --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_1.ipynb @@ -0,0 +1,414 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 : Flow Arrangements for Incerased Heat Recovery" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 pgno:181" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.1 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for oil \n", + "\n", + "\t total heat required for oil is : Btu/hr 6974256.0\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 6990000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 238.0\n", + "\t LMTD is : F 71.9314248044\n", + "\t R is : 8.6\n", + "\t S is : 0.111940298507\n", + "\t FT is 0.93 \n", + "\t delt is : F 66.8962250681\n", + "\t ratio of two local temperature difference is : %.3f \n", + "0.0420168067227\n", + "\t caloric temperature of hot fluid is : F 164.5\n", + "\t caloric temperature of cold fluid is : F 97.5\n", + "\t hot fluid:shell side,oil \n", + "\n", + "\t flow area is : ft**2 0.170138888889\n", + "\t mass velocity is : lb/(hr)*(ft**2) 291526.530612\n", + "\t reynolds number is : 8873.57540419\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \n", + "127.272727273\n", + "\t cold fluid:inner tube side,water \n", + "\n", + "\t flow area is :f ft**2 0.239085648148\n", + "\t mass velocity is : lb/(hr)*(ft**2) 974546.158687\n", + "\t V is : fps 4.33131626083\n", + "\t reynolds number is : 34937.8788163\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) 969.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 736.896\n", + "\t tw is : F \n", + "107.367601613\n", + "\t phys is : 0.925306637672\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.76629934\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 101.538952854\n", + "\t total surface area is : ft**2 1426.2864\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 73.155514686\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00382107226455\n", + "\t pressure drop for annulus \n", + "\n", + "\t number of crosses are : 20\n", + "\t delPs is : psi 4.47363588933\n", + "\t allowable delPs is 10 psi \n", + "\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 4.0\n", + "\t delPr is : psi 3.1\n", + "\t delPT is : psi 7.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 8.1 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=358.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=90.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=49600.; # lb/hr\n", + "w=233000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for oil \\n\"\n", + "c=0.545; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \",Q\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.93 \" # from fig 19 for 2-4 exchanger\n", + "delt=(0.93*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : %.3f \\n\",X\n", + "Fc=0.25; # from fig.17\n", + "Kc=0.47; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,oil \\n\"\n", + "ID=35; # in\n", + "C=0.25; # clearance\n", + "B=7; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT))/2; # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.12*2.42; # at 165F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=52.5; # from fig.28\n", + "Z=0.2; # Z=(k)*(Pr*(1/3)) prandelt number\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phys),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\n\",Ho\n", + "print\"\\t cold fluid:inner tube side,water \\n\"\n", + "Nt=454;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.455; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is :f ft**2 \",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2)\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \",V\n", + "mu2=0.73*2.42; # at 98F,lb/(ft)*(hr),from fig 14\n", + "D=(0.76/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1010*0.96; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=0.76; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\n\",tw\n", + "muw=1.95*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "Q=6980000; # taking rounded value,Btu/hr\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "f=0.00215; # friction factor for reynolds number 8900, using fig.29\n", + "s=0.82; # for reynolds number 25300,using fig.6\n", + "Ds=35/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(2*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \\n\"\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000195; # friction factor for reynolds number 34900, using fig.26\n", + "s=1;\n", + "D=0.0633; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt)\n", + "X1=0.13; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 pgno:184" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for acetone \t\n", + "\t total heat required for acetone is : Btu/hr \t5130000.0\n", + "\t for acetic acid \t\n", + "\t total heat required for acetic acid is : Btu/hr \t5140800.0\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t100\n", + "\t LMTD is : F \t39.0865033713\n", + "\t R is : \t2\n", + "\t S is : \t0\n", + "\t FT is 0.88 \t\n", + "\t delt is : F \t34.3961229667\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t120\n", + "\t hot fluid:shell side,acetone \t\n", + "\t flow area is : ft**2 \t0.184461805556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t325270.588235\n", + "\t reynolds number is : \t53203.694701\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t164.4\n", + "\t cold fluid:inner tube side,acetic acid \t\n", + "\t flow area is : ft**2 \t0.25125\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t668656.716418\n", + "\t reynolds number is : \t15819.782952\n", + "\t Pr is : \t1.0\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t112.767123288\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t87.808\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.2370234092\n", + "\t total surface area is : ft**2 \t2544.048\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t58.6249615773\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.000413628549958\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t39\n", + "\t delPs is : psi \t10.407463223\n", + "\t allowable delPs is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.0\n", + "\t delPr is : psi \t1.4\n", + "\t delPT is : psi \t5.2\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 8.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=150; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=168000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for acetone \\t\"\n", + "c=0.57; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for acetone is : Btu/hr \\t\",Q # calculation mistake in problem\n", + "print\"\\t for acetic acid \\t\"\n", + "c=0.51; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for acetic acid is : Btu/hr \\t\",Q1 # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.88 \\t\" # from fig 20,for 3-6 exchanger\n", + "delt=(0.88*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,acetone \\t\"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.20*2.42; # at 175F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "phys=1;\n", + "jH=137; # from fig.28\n", + "c=0.63; # Btu/(lb)*(F),at 175F,from fig.2\n", + "k=0.095; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "ho=((jH)*(k/De)*(Pr)*1); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,acetic acid \\t\"\n", + "Nt=270;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.268; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.85*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.584/12); # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=56; # from fig.24\n", + "c=0.51; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.098; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "phyt=1;\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.584; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=3*(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00155; # friction factor for reynolds number 52200, using fig.29\n", + "s=0.79; # for reynolds number 25300,using table.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(3*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00024; # friction factor for reynolds number 158000, using fig.26\n", + "s=1.07;\n", + "D=0.0487; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n*3))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.063; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=(3)*((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\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/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 new file mode 100644 index 00000000..5ebbdccc --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_2.ipynb @@ -0,0 +1,414 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 : Flow Arrangements for Incerased Heat Recovery" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 pgno:181" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.1 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for oil \n", + "\n", + "\t total heat required for oil is : Btu/hr 6974256.0\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 6990000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 238.0\n", + "\t LMTD is : F 71.9314248044\n", + "\t R is : 8.6\n", + "\t S is : 0.111940298507\n", + "\t FT is 0.93 \n", + "\t delt is : F 66.8962250681\n", + "\t ratio of two local temperature difference is : %.3f \n", + "0.0420168067227\n", + "\t caloric temperature of hot fluid is : F 164.5\n", + "\t caloric temperature of cold fluid is : F 97.5\n", + "\t hot fluid:shell side,oil \n", + "\n", + "\t flow area is : ft**2 0.170138888889\n", + "\t mass velocity is : lb/(hr)*(ft**2) 291526.530612\n", + "\t reynolds number is : 8873.57540419\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \n", + "127.272727273\n", + "\t cold fluid:inner tube side,water \n", + "\n", + "\t flow area is :f ft**2 0.239085648148\n", + "\t mass velocity is : lb/(hr)*(ft**2) 974546.158687\n", + "\t V is : fps 4.33131626083\n", + "\t reynolds number is : 34937.8788163\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) 969.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 736.896\n", + "\t tw is : F \n", + "107.367601613\n", + "\t phys is : 0.925306637672\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.76629934\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 101.538952854\n", + "\t total surface area is : ft**2 1426.2864\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 73.155514686\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00382107226455\n", + "\t pressure drop for annulus \n", + "\n", + "\t number of crosses are : 20\n", + "\t delPs is : psi 4.47363588933\n", + "\t allowable delPs is 10 psi \n", + "\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 4.0\n", + "\t delPr is : psi 3.1\n", + "\t delPT is : psi 7.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 8.1 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=358.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=90.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=49600.; # lb/hr\n", + "w=233000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for oil \\n\"\n", + "c=0.545; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \",Q\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.93 \" # from fig 19 for 2-4 exchanger\n", + "delt=(0.93*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : %.3f \\n\",X\n", + "Fc=0.25; # from fig.17\n", + "Kc=0.47; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,oil \\n\"\n", + "ID=35; # in\n", + "C=0.25; # clearance\n", + "B=7; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT))/2; # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.12*2.42; # at 165F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=52.5; # from fig.28\n", + "Z=0.2; # Z=(k)*(Pr*(1/3)) prandelt number\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phys),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\n\",Ho\n", + "print\"\\t cold fluid:inner tube side,water \\n\"\n", + "Nt=454;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.455; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is :f ft**2 \",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2)\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \",V\n", + "mu2=0.73*2.42; # at 98F,lb/(ft)*(hr),from fig 14\n", + "D=(0.76/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1010*0.96; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=0.76; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\n\",tw\n", + "muw=1.95*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "Q=6980000; # taking rounded value,Btu/hr\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "f=0.00215; # friction factor for reynolds number 8900, using fig.29\n", + "s=0.82; # for reynolds number 25300,using fig.6\n", + "Ds=35/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(2*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \\n\"\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000195; # friction factor for reynolds number 34900, using fig.26\n", + "s=1;\n", + "D=0.0633; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt)\n", + "X1=0.13; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 pgno:184" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for acetone \t\n", + "\t total heat required for acetone is : Btu/hr \t5130000.0\n", + "\t for acetic acid \t\n", + "\t total heat required for acetic acid is : Btu/hr \t5140800.0\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t100\n", + "\t LMTD is : F \t39.0865033713\n", + "\t R is : \t2\n", + "\t S is : \t0\n", + "\t FT is 0.88 \t\n", + "\t delt is : F \t34.3961229667\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t120\n", + "\t hot fluid:shell side,acetone \t\n", + "\t flow area is : ft**2 \t0.184461805556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t325270.588235\n", + "\t reynolds number is : \t53203.694701\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t164.4\n", + "\t cold fluid:inner tube side,acetic acid \t\n", + "\t flow area is : ft**2 \t0.25125\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t668656.716418\n", + "\t reynolds number is : \t15819.782952\n", + "\t Pr is : \t1.0\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t112.767123288\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t87.808\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.2370234092\n", + "\t total surface area is : ft**2 \t2544.048\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t58.6249615773\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.000413628549958\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t39\n", + "\t delPs is : psi \t10.407463223\n", + "\t allowable delPs is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.0\n", + "\t delPr is : psi \t1.4\n", + "\t delPT is : psi \t5.2\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 8.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=150; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=168000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for acetone \\t\"\n", + "c=0.57; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for acetone is : Btu/hr \\t\",Q # calculation mistake in problem\n", + "print\"\\t for acetic acid \\t\"\n", + "c=0.51; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for acetic acid is : Btu/hr \\t\",Q1 # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.88 \\t\" # from fig 20,for 3-6 exchanger\n", + "delt=(0.88*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,acetone \\t\"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.20*2.42; # at 175F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "phys=1;\n", + "jH=137; # from fig.28\n", + "c=0.63; # Btu/(lb)*(F),at 175F,from fig.2\n", + "k=0.095; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "ho=((jH)*(k/De)*(Pr)*1); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,acetic acid \\t\"\n", + "Nt=270;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.268; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.85*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.584/12); # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=56; # from fig.24\n", + "c=0.51; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.098; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "phyt=1;\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.584; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=3*(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00155; # friction factor for reynolds number 52200, using fig.29\n", + "s=0.79; # for reynolds number 25300,using table.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(3*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00024; # friction factor for reynolds number 158000, using fig.26\n", + "s=1.07;\n", + "D=0.0487; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n*3))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.063; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=(3)*((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\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/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 new file mode 100644 index 00000000..5ebbdccc --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_3.ipynb @@ -0,0 +1,414 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 : Flow Arrangements for Incerased Heat Recovery" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 pgno:181" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.1 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for oil \n", + "\n", + "\t total heat required for oil is : Btu/hr 6974256.0\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 6990000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 238.0\n", + "\t LMTD is : F 71.9314248044\n", + "\t R is : 8.6\n", + "\t S is : 0.111940298507\n", + "\t FT is 0.93 \n", + "\t delt is : F 66.8962250681\n", + "\t ratio of two local temperature difference is : %.3f \n", + "0.0420168067227\n", + "\t caloric temperature of hot fluid is : F 164.5\n", + "\t caloric temperature of cold fluid is : F 97.5\n", + "\t hot fluid:shell side,oil \n", + "\n", + "\t flow area is : ft**2 0.170138888889\n", + "\t mass velocity is : lb/(hr)*(ft**2) 291526.530612\n", + "\t reynolds number is : 8873.57540419\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \n", + "127.272727273\n", + "\t cold fluid:inner tube side,water \n", + "\n", + "\t flow area is :f ft**2 0.239085648148\n", + "\t mass velocity is : lb/(hr)*(ft**2) 974546.158687\n", + "\t V is : fps 4.33131626083\n", + "\t reynolds number is : 34937.8788163\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) 969.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 736.896\n", + "\t tw is : F \n", + "107.367601613\n", + "\t phys is : 0.925306637672\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.76629934\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 101.538952854\n", + "\t total surface area is : ft**2 1426.2864\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 73.155514686\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00382107226455\n", + "\t pressure drop for annulus \n", + "\n", + "\t number of crosses are : 20\n", + "\t delPs is : psi 4.47363588933\n", + "\t allowable delPs is 10 psi \n", + "\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 4.0\n", + "\t delPr is : psi 3.1\n", + "\t delPT is : psi 7.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 8.1 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=358.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=90.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=49600.; # lb/hr\n", + "w=233000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for oil \\n\"\n", + "c=0.545; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \",Q\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.93 \" # from fig 19 for 2-4 exchanger\n", + "delt=(0.93*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : %.3f \\n\",X\n", + "Fc=0.25; # from fig.17\n", + "Kc=0.47; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,oil \\n\"\n", + "ID=35; # in\n", + "C=0.25; # clearance\n", + "B=7; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT))/2; # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.12*2.42; # at 165F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=52.5; # from fig.28\n", + "Z=0.2; # Z=(k)*(Pr*(1/3)) prandelt number\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phys),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\n\",Ho\n", + "print\"\\t cold fluid:inner tube side,water \\n\"\n", + "Nt=454;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.455; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is :f ft**2 \",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2)\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \",V\n", + "mu2=0.73*2.42; # at 98F,lb/(ft)*(hr),from fig 14\n", + "D=(0.76/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1010*0.96; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=0.76; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\n\",tw\n", + "muw=1.95*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "Q=6980000; # taking rounded value,Btu/hr\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "f=0.00215; # friction factor for reynolds number 8900, using fig.29\n", + "s=0.82; # for reynolds number 25300,using fig.6\n", + "Ds=35/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(2*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \\n\"\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000195; # friction factor for reynolds number 34900, using fig.26\n", + "s=1;\n", + "D=0.0633; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt)\n", + "X1=0.13; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 pgno:184" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for acetone \t\n", + "\t total heat required for acetone is : Btu/hr \t5130000.0\n", + "\t for acetic acid \t\n", + "\t total heat required for acetic acid is : Btu/hr \t5140800.0\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t100\n", + "\t LMTD is : F \t39.0865033713\n", + "\t R is : \t2\n", + "\t S is : \t0\n", + "\t FT is 0.88 \t\n", + "\t delt is : F \t34.3961229667\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t120\n", + "\t hot fluid:shell side,acetone \t\n", + "\t flow area is : ft**2 \t0.184461805556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t325270.588235\n", + "\t reynolds number is : \t53203.694701\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t164.4\n", + "\t cold fluid:inner tube side,acetic acid \t\n", + "\t flow area is : ft**2 \t0.25125\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t668656.716418\n", + "\t reynolds number is : \t15819.782952\n", + "\t Pr is : \t1.0\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t112.767123288\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t87.808\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.2370234092\n", + "\t total surface area is : ft**2 \t2544.048\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t58.6249615773\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.000413628549958\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t39\n", + "\t delPs is : psi \t10.407463223\n", + "\t allowable delPs is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.0\n", + "\t delPr is : psi \t1.4\n", + "\t delPT is : psi \t5.2\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 8.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=150; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=168000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for acetone \\t\"\n", + "c=0.57; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for acetone is : Btu/hr \\t\",Q # calculation mistake in problem\n", + "print\"\\t for acetic acid \\t\"\n", + "c=0.51; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for acetic acid is : Btu/hr \\t\",Q1 # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.88 \\t\" # from fig 20,for 3-6 exchanger\n", + "delt=(0.88*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,acetone \\t\"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.20*2.42; # at 175F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "phys=1;\n", + "jH=137; # from fig.28\n", + "c=0.63; # Btu/(lb)*(F),at 175F,from fig.2\n", + "k=0.095; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "ho=((jH)*(k/De)*(Pr)*1); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,acetic acid \\t\"\n", + "Nt=270;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.268; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.85*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.584/12); # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=56; # from fig.24\n", + "c=0.51; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.098; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "phyt=1;\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.584; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=3*(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00155; # friction factor for reynolds number 52200, using fig.29\n", + "s=0.79; # for reynolds number 25300,using table.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(3*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00024; # friction factor for reynolds number 158000, using fig.26\n", + "s=1.07;\n", + "D=0.0487; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n*3))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.063; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=(3)*((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\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/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 new file mode 100644 index 00000000..ec1d826e --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_8_flow_arrangements_for_increased_heat_recovery_4.ipynb @@ -0,0 +1,414 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 : Flow Arrangements for Increased Heat Recovery" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1 pgno:181" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.1 \n", + "\n", + "\t approximate values are mentioned in the book \n", + "\n", + "\t 1.for heat balance \n", + "\n", + "\t for oil \n", + "\n", + "\t total heat required for oil is : Btu/hr 6974256.0\n", + "\t for water \n", + "\n", + "\t total heat required for water is : Btu/hr 6990000.0\n", + "\t delt1 is : F 10.0\n", + "\t delt2 is : F 238.0\n", + "\t LMTD is : F 71.9314248044\n", + "\t R is : 8.6\n", + "\t S is : 0.111940298507\n", + "\t FT is 0.93 \n", + "\t delt is : F 66.8962250681\n", + "\t ratio of two local temperature difference is : %.3f \n", + "0.0420168067227\n", + "\t caloric temperature of hot fluid is : F 164.5\n", + "\t caloric temperature of cold fluid is : F 97.5\n", + "\t hot fluid:shell side,oil \n", + "\n", + "\t flow area is : ft**2 0.170138888889\n", + "\t mass velocity is : lb/(hr)*(ft**2) 291526.530612\n", + "\t reynolds number is : 8873.57540419\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \n", + "127.272727273\n", + "\t cold fluid:inner tube side,water \n", + "\n", + "\t flow area is :f ft**2 0.239085648148\n", + "\t mass velocity is : lb/(hr)*(ft**2) 974546.158687\n", + "\t V is : fps 4.33131626083\n", + "\t reynolds number is : 34937.8788163\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) 969.6\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 736.896\n", + "\t tw is : F \n", + "107.367601613\n", + "\t phys is : 0.925306637672\n", + "\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) 117.76629934\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) 101.538952854\n", + "\t total surface area is : ft**2 1426.2864\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) 73.155514686\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu 0.00382107226455\n", + "\t pressure drop for annulus \n", + "\n", + "\t number of crosses are : 20\n", + "\t delPs is : psi 4.47363588933\n", + "\t allowable delPs is 10 psi \n", + "\n", + "\t pressure drop for inner pipe \n", + "\n", + "\t delPt is : psi 4.0\n", + "\t delPr is : psi 3.1\n", + "\t delPT is : psi 7.2\n", + "\t allowable delPT is 10 psi \n", + "\n" + ] + } + ], + "source": [ + "print\"\\t example 8.1 \\n\"\n", + "print\"\\t approximate values are mentioned in the book \\n\"\n", + "#given\n", + "T1=358.; # inlet hot fluid,F\n", + "T2=100.; # outlet hot fluid,F\n", + "t1=90.; # inlet cold fluid,F\n", + "t2=120.; # outlet cold fluid,F\n", + "W=49600.; # lb/hr\n", + "w=233000.; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\n\"\n", + "print\"\\t for oil \\n\"\n", + "c=0.545; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for oil is : Btu/hr \",Q\n", + "print\"\\t for water \\n\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \",delt1\n", + "print\"\\t delt2 is : F \",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \",S\n", + "print\"\\t FT is 0.93 \" # from fig 19 for 2-4 exchanger\n", + "delt=(0.93*LMTD); # F\n", + "print\"\\t delt is : F \",delt\n", + "X=((delt1)/(delt2));\n", + "print\"\\t ratio of two local temperature difference is : %.3f \\n\",X\n", + "Fc=0.25; # from fig.17\n", + "Kc=0.47; # crude oil controlling\n", + "Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \",Tc\n", + "tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \",tc\n", + "print\"\\t hot fluid:shell side,oil \\n\"\n", + "ID=35; # in\n", + "C=0.25; # clearance\n", + "B=7; # baffle spacing,in\n", + "PT=1.25;\n", + "As=((ID*C*B)/(144*PT))/2; # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \",Gs\n", + "mu1=1.12*2.42; # at 165F,lb/(ft)*(hr), from fig.14\n", + "De=0.99/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \",Res\n", + "jH=52.5; # from fig.28\n", + "Z=0.2; # Z=(k)*(Pr*(1/3)) prandelt number\n", + "Ho=((jH)*(1/De)*(Z)); # H0=(h0/phys),using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\n\",Ho\n", + "print\"\\t cold fluid:inner tube side,water \\n\"\n", + "Nt=454;\n", + "n=6; # number of passes\n", + "L=12; #ft\n", + "at1=0.455; # flow area, in**2\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is :f ft**2 \",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2)\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \",V\n", + "mu2=0.73*2.42; # at 98F,lb/(ft)*(hr),from fig 14\n", + "D=(0.76/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \",Ret\n", + "hi=1010*0.96; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \",hi\n", + "ID=0.76; # ft\n", + "OD=1; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",hio\n", + "tw=(tc)+(((Ho)/(hio+Ho))*(Tc-tc)); # from eq.5.31\n", + "print\"\\t tw is : F \\n\",tw\n", + "muw=1.95*2.42; # lb/(ft)*(hr), from fig.14\n", + "phys=(mu1/muw)**0.14;\n", + "print\"\\t phys is : \",phys # from fig.24\n", + "ho=(Ho)*(phys); # from eq.6.36\n", + "print\"\\t Correct h0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \",ho\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \",Uc\n", + "A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \",A\n", + "Q=6980000; # taking rounded value,Btu/hr\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \",Rd\n", + "print\"\\t pressure drop for annulus \\n\"\n", + "f=0.00215; # friction factor for reynolds number 8900, using fig.29\n", + "s=0.82; # for reynolds number 25300,using fig.6\n", + "Ds=35/12; # ft\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \",N\n", + "delPs=((f*(Gs**2)*(Ds)*(2*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \",delPs\n", + "print\"\\t allowable delPs is 10 psi \\n\"\n", + "print\"\\t pressure drop for inner pipe \\n\"\n", + "f=0.000195; # friction factor for reynolds number 34900, using fig.26\n", + "s=1;\n", + "D=0.0633; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \",round(delPt)\n", + "X1=0.13; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\n\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 pgno:184" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 8.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for acetone \t\n", + "\t total heat required for acetone is : Btu/hr \t5130000.0\n", + "\t for acetic acid \t\n", + "\t total heat required for acetic acid is : Btu/hr \t5140800.0\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t100\n", + "\t LMTD is : F \t39.0865033713\n", + "\t R is : \t2\n", + "\t S is : \t0\n", + "\t FT is 0.88 \t\n", + "\t delt is : F \t34.3961229667\n", + "\t caloric temperature of hot fluid is : F \t175\n", + "\t caloric temperature of cold fluid is : F \t120\n", + "\t hot fluid:shell side,acetone \t\n", + "\t flow area is : ft**2 \t0.184461805556\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t325270.588235\n", + "\t reynolds number is : \t53203.694701\n", + "\t Pr is : \t1.0\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t164.4\n", + "\t cold fluid:inner tube side,acetic acid \t\n", + "\t flow area is : ft**2 \t0.25125\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t668656.716418\n", + "\t reynolds number is : \t15819.782952\n", + "\t Pr is : \t1.0\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t112.767123288\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t87.808\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t57.2370234092\n", + "\t total surface area is : ft**2 \t2544.048\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t58.6249615773\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.000413628549958\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t39\n", + "\t delPs is : psi \t10.407463223\n", + "\t allowable delPs is 10 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t4.0\n", + "\t delPr is : psi \t1.4\n", + "\t delPT is : psi \t5.2\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 8.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=250; # inlet hot fluid,F\n", + "T2=100; # outlet hot fluid,F\n", + "t1=90; # inlet cold fluid,F\n", + "t2=150; # outlet cold fluid,F\n", + "W=60000; # lb/hr\n", + "w=168000; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for acetone \\t\"\n", + "c=0.57; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for acetone is : Btu/hr \\t\",Q # calculation mistake in problem\n", + "print\"\\t for acetic acid \\t\"\n", + "c=0.51; # Btu/(lb)*(F)\n", + "Q1=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for acetic acid is : Btu/hr \\t\",Q1 # calculation mistake in problem\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.88 \\t\" # from fig 20,for 3-6 exchanger\n", + "delt=(0.88*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,acetone \\t\"\n", + "ID=21.25; # in\n", + "C=0.25; # clearance\n", + "B=5; # baffle spacing,in\n", + "PT=1;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.20*2.42; # at 175F,lb/(ft)*(hr), from fig.14\n", + "De=0.95/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "phys=1;\n", + "jH=137; # from fig.28\n", + "c=0.63; # Btu/(lb)*(F),at 175F,from fig.2\n", + "k=0.095; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "Pr=((c)*(mu1)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "ho=((jH)*(k/De)*(Pr)*1); # using eq.6.15b,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,acetic acid \\t\"\n", + "Nt=270;\n", + "n=2; # number of passes\n", + "L=16; #ft\n", + "at1=0.268; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "mu2=0.85*2.42; # at 120F,lb/(ft)*(hr)\n", + "D=(0.584/12); # ft\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "jH=56; # from fig.24\n", + "c=0.51; # Btu/(lb)*(F),at 120F,from fig.2\n", + "k=0.098; # Btu/(hr)*(ft**2)*(F/ft), from table 4\n", + "phyt=1;\n", + "Pr=((c)*(mu2)/k)**(1/3); # prandelt number raised to power 1/3\n", + "print\"\\t Pr is : \\t\",Pr\n", + "hi=((jH)*(k/D)*(Pr)*(1**0.14)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.584; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=3*(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00155; # friction factor for reynolds number 52200, using fig.29\n", + "s=0.79; # for reynolds number 25300,using table.6\n", + "Ds=21.25/12; # ft\n", + "N=(12*L/B)+1; # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "delPs=((f*(Gs**2)*(Ds)*(3*N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 10 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.00024; # friction factor for reynolds number 158000, using fig.26\n", + "s=1.07;\n", + "D=0.0487; # ft\n", + "delPt=((f*(Gt**2)*(L)*(n*3))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt)\n", + "X1=0.063; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=(3)*((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\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/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 new file mode 100644 index 00000000..725fa18f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_1.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 pgno:193" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for ammonia gas \t\n", + "\t total heat required for ammonia gas is : Btu/hr \t784824.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t785000\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t22.4772661868\n", + "\t R is : \t15\n", + "\t S is : \t0\n", + "\t FT is 0.837 \t\n", + "\t delt is : F \t18.8134717984\n", + "\t caloric temperature of hot fluid is : F \t170\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,ammonia at 83psia \t\n", + "\t flow area is : ft**2 \t0.387706776948\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t25462.5417634\n", + "\t reynolds number is : \t40187.0924297\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t42.4542545455\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0954236111111\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t822647.551124\n", + "\t V is : fps \t3.65621133833\n", + "\t reynolds number is : \t21418.7950051\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t900\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t744.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t40.1624954017\n", + "\t total surface area is : ft**2 \t571.6256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.9943154025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0111991543302\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t8\n", + "\t rowgas is lb/ft**3 \t0.209\n", + "\t s is \t0.003344\n", + "\t delPs is : psi \t2.03484815237\n", + "\t allowable delPs is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.6\n", + "\t delPr is : psi \t2.9\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 9.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=245; # inlet hot fluid,F\n", + "T2=95; # outlet hot fluid,F\n", + "t1=85; # inlet cold fluid,F\n", + "t2=95; # outlet cold fluid,F\n", + "W=9872; # lb/hr\n", + "w=78500; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for ammonia gas \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for ammonia gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.837 \\t\" # from fig 18\n", + "delt=(0.837*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,ammonia at 83psia \\t\"\n", + "ID=23.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.012*2.42; # at 170F,lb/(ft)*(hr), from fig.15\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=118; # from fig.28\n", + "k=0.017; # Btu/(hr)*(ft**2)*(F/ft),from table 5\n", + "Z=0.97; # Z=(Pr*(1/3)) prandelt number\n", + "ho=((jH)*(k/De)*(Z)*1); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=364;\n", + "n=8; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.82*2.42; # at 90F,lb/(ft)*(hr),from fig 14\n", + "D=(0.62/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=900; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00162; # friction factor for reynolds number 40200, using fig.29\n", + "Ds=23.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "rowgas=0.209;\n", + "print\"\\t rowgas is lb/ft**3 \\t\",rowgas\n", + "s=rowgas/62.5;\n", + "print\"\\t s is \\t\",s\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000225; # friction factor for reynolds number 21400, using fig.26\n", + "s=1;\n", + "D=0.0517; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.090; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 pgno:196" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t The air and water both occupy the same volume at their respective partial pressures \t\n", + "\t volume of water entering is : lb \t693.049715558\n", + "\t for first stage \t\n", + "\t P2 is : psi \t34.251\n", + "\t T2absr is : R \t706.727218318\n", + "\t T2abs is : F \t247.057218318\n", + "\t for intercooler \t\n", + "\t final gas volume is : ft**3/hr \t120257.51073\n", + "\t water remaining in air is : lb/hr \t297.446229853\n", + "\t condensation in inter cooler is : lb/hr \t395.603485705\n", + "\t Specific volume of atmospheric air is : ft**3/lb \t14.8\n", + "\t air in inlet gas is : lb/hr\t18932.4324324\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.216216\n", + "\t Qwaters is : Btu/hr \t46780.8558001\n", + "\t latent heat \t\n", + "\t Qwater1 is : Btu/hr \t411467.185481\n", + "\t total heat is : Btu/hr \t1168214.2575\n", + "\t for second stage \t\n", + "\t P3 is : psi \t79.80483\n", + "\t final gas volume is : ft**3/hr \t51612.6655492\n", + "\t water remaining in air is : lb/hr \t127.659326117\n", + "\t condensation in inter cooler is : lb/hr \t169.340673883\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.0\n", + "\t Qwater is : Btu/hr \t19631.0\n", + "\t latent heat \t\n", + "\t Qwater is : Btu/hr \t176131.0\n", + "\t total heat is : Btu/hr 905729.0\n" + ] + } + ], + "source": [ + "print\"\\t example 9.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "V1=4670; # inlet air volume,cfm\n", + "Pp=0.8153; # Saturation partial pressure of water at 95F,psi,from table 7\n", + "Ps=404.3;# Saturation specific volume of water at 95F,ft**3/lb, from table 7\n", + "#solution\n", + "print\"\\t The air and water both occupy the same volume at their respective partial pressures \\t\"\n", + "Vw1=(V1*60/Ps); # water entering per hr,lb\n", + "print\"\\t volume of water entering is : lb \\t\",Vw1\n", + "print\"\\t for first stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P1=14.7; # psi\n", + "P2=(P1*c); # (c=(P2/P1)),psi\n", + "print\"\\t P2 is : psi \\t\",P2\n", + "gama=1.4; # for air\n", + "T1abs=95; # F\n", + "T2absr=((T1abs+460)*(P2/P1)**((gama-1)/gama));\n", + "print\"\\t T2absr is : R \\t\",T2absr\n", + "T2abs=(T2absr-459.67); # F\n", + "print\"\\t T2abs is : F \\t\",T2abs\n", + "print\"\\t for intercooler \\t\"\n", + "V2=(V1*60*P1/P2); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V2\n", + "Vw2=(V2/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw2\n", + "C=(Vw1-Vw2); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C\n", + "Vs=14.8; # Specific volume of atmospheric air,ft**3/lb\n", + "print\"\\t Specific volume of atmospheric air is : ft**3/lb \\t\",Vs\n", + "Va=(V1*60/Vs); # air in inlet gas, lb/hr\n", + "print\"\\t air in inlet gas is : lb/hr\\t\",Va\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=((Va)*(0.25)*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",Qair\n", + "Qwaters=(Vw1*0.45*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwaters is : Btu/hr \\t\",Qwaters\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C*l); # Btu/hr\n", + "print\"\\t Qwater1 is : Btu/hr \\t\",Qwaterl\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \\t\",Qt1\n", + "print\"\\t for second stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P3=(P2*c); # (c=(P3/P1)),psi\n", + "print\"\\t P3 is : psi \\t\",P3\n", + "V3=(V1*60*P1/P3); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V3\n", + "Vw3=(V3/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw3\n", + "C1=(297-Vw3); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C1\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=(Va*0.25*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",round(Qair)\n", + "Qwaters=(Vw2*0.44*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaters)\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C1*l); # Btu/hr, calculation mistake in book\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaterl)\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \",round(Qt1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 pgno:197" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total number of moles re : \t690.168582375\n", + "\t Moles of air is : \t651.724137931\n", + "\t Moles of water is : \t38.4444444444\n", + "\t after compression \t\n", + "\t partial pressure is : psi \t1.91\n", + "\t dew point is : F \t124\n" + ] + } + ], + "source": [ + "print\"\\t example 9.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "Va=18900.; # air in inlet gas\n", + "Vw1=692.; # water entering\n", + "#solution\n", + "Ma=(Va/29.); # moles\n", + "Mw=(Vw1/18.); # moles\n", + "M=(Ma+Mw); # moles\n", + "print\"\\t total number of moles re : \\t\",M\n", + "print\"\\t Moles of air is : \\t\",Ma\n", + "print\"\\t Moles of water is : \\t\",Mw\n", + "print\"\\t after compression \\t\"\n", + "P=34.2; # pressure,psi\n", + "pw=(Mw/M)*(P); # partial pressure\n", + "print\"\\t partial pressure is : psi \\t\",round(pw,2)\n", + "Td=124; # F, table table 7\n", + "print\"\\t dew point is : F \\t\",Td\n", + "# end\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/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 new file mode 100644 index 00000000..725fa18f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_2.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 pgno:193" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for ammonia gas \t\n", + "\t total heat required for ammonia gas is : Btu/hr \t784824.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t785000\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t22.4772661868\n", + "\t R is : \t15\n", + "\t S is : \t0\n", + "\t FT is 0.837 \t\n", + "\t delt is : F \t18.8134717984\n", + "\t caloric temperature of hot fluid is : F \t170\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,ammonia at 83psia \t\n", + "\t flow area is : ft**2 \t0.387706776948\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t25462.5417634\n", + "\t reynolds number is : \t40187.0924297\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t42.4542545455\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0954236111111\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t822647.551124\n", + "\t V is : fps \t3.65621133833\n", + "\t reynolds number is : \t21418.7950051\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t900\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t744.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t40.1624954017\n", + "\t total surface area is : ft**2 \t571.6256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.9943154025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0111991543302\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t8\n", + "\t rowgas is lb/ft**3 \t0.209\n", + "\t s is \t0.003344\n", + "\t delPs is : psi \t2.03484815237\n", + "\t allowable delPs is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.6\n", + "\t delPr is : psi \t2.9\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 9.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=245; # inlet hot fluid,F\n", + "T2=95; # outlet hot fluid,F\n", + "t1=85; # inlet cold fluid,F\n", + "t2=95; # outlet cold fluid,F\n", + "W=9872; # lb/hr\n", + "w=78500; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for ammonia gas \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for ammonia gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.837 \\t\" # from fig 18\n", + "delt=(0.837*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,ammonia at 83psia \\t\"\n", + "ID=23.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.012*2.42; # at 170F,lb/(ft)*(hr), from fig.15\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=118; # from fig.28\n", + "k=0.017; # Btu/(hr)*(ft**2)*(F/ft),from table 5\n", + "Z=0.97; # Z=(Pr*(1/3)) prandelt number\n", + "ho=((jH)*(k/De)*(Z)*1); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=364;\n", + "n=8; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.82*2.42; # at 90F,lb/(ft)*(hr),from fig 14\n", + "D=(0.62/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=900; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00162; # friction factor for reynolds number 40200, using fig.29\n", + "Ds=23.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "rowgas=0.209;\n", + "print\"\\t rowgas is lb/ft**3 \\t\",rowgas\n", + "s=rowgas/62.5;\n", + "print\"\\t s is \\t\",s\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000225; # friction factor for reynolds number 21400, using fig.26\n", + "s=1;\n", + "D=0.0517; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.090; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 pgno:196" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t The air and water both occupy the same volume at their respective partial pressures \t\n", + "\t volume of water entering is : lb \t693.049715558\n", + "\t for first stage \t\n", + "\t P2 is : psi \t34.251\n", + "\t T2absr is : R \t706.727218318\n", + "\t T2abs is : F \t247.057218318\n", + "\t for intercooler \t\n", + "\t final gas volume is : ft**3/hr \t120257.51073\n", + "\t water remaining in air is : lb/hr \t297.446229853\n", + "\t condensation in inter cooler is : lb/hr \t395.603485705\n", + "\t Specific volume of atmospheric air is : ft**3/lb \t14.8\n", + "\t air in inlet gas is : lb/hr\t18932.4324324\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.216216\n", + "\t Qwaters is : Btu/hr \t46780.8558001\n", + "\t latent heat \t\n", + "\t Qwater1 is : Btu/hr \t411467.185481\n", + "\t total heat is : Btu/hr \t1168214.2575\n", + "\t for second stage \t\n", + "\t P3 is : psi \t79.80483\n", + "\t final gas volume is : ft**3/hr \t51612.6655492\n", + "\t water remaining in air is : lb/hr \t127.659326117\n", + "\t condensation in inter cooler is : lb/hr \t169.340673883\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.0\n", + "\t Qwater is : Btu/hr \t19631.0\n", + "\t latent heat \t\n", + "\t Qwater is : Btu/hr \t176131.0\n", + "\t total heat is : Btu/hr 905729.0\n" + ] + } + ], + "source": [ + "print\"\\t example 9.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "V1=4670; # inlet air volume,cfm\n", + "Pp=0.8153; # Saturation partial pressure of water at 95F,psi,from table 7\n", + "Ps=404.3;# Saturation specific volume of water at 95F,ft**3/lb, from table 7\n", + "#solution\n", + "print\"\\t The air and water both occupy the same volume at their respective partial pressures \\t\"\n", + "Vw1=(V1*60/Ps); # water entering per hr,lb\n", + "print\"\\t volume of water entering is : lb \\t\",Vw1\n", + "print\"\\t for first stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P1=14.7; # psi\n", + "P2=(P1*c); # (c=(P2/P1)),psi\n", + "print\"\\t P2 is : psi \\t\",P2\n", + "gama=1.4; # for air\n", + "T1abs=95; # F\n", + "T2absr=((T1abs+460)*(P2/P1)**((gama-1)/gama));\n", + "print\"\\t T2absr is : R \\t\",T2absr\n", + "T2abs=(T2absr-459.67); # F\n", + "print\"\\t T2abs is : F \\t\",T2abs\n", + "print\"\\t for intercooler \\t\"\n", + "V2=(V1*60*P1/P2); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V2\n", + "Vw2=(V2/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw2\n", + "C=(Vw1-Vw2); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C\n", + "Vs=14.8; # Specific volume of atmospheric air,ft**3/lb\n", + "print\"\\t Specific volume of atmospheric air is : ft**3/lb \\t\",Vs\n", + "Va=(V1*60/Vs); # air in inlet gas, lb/hr\n", + "print\"\\t air in inlet gas is : lb/hr\\t\",Va\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=((Va)*(0.25)*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",Qair\n", + "Qwaters=(Vw1*0.45*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwaters is : Btu/hr \\t\",Qwaters\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C*l); # Btu/hr\n", + "print\"\\t Qwater1 is : Btu/hr \\t\",Qwaterl\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \\t\",Qt1\n", + "print\"\\t for second stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P3=(P2*c); # (c=(P3/P1)),psi\n", + "print\"\\t P3 is : psi \\t\",P3\n", + "V3=(V1*60*P1/P3); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V3\n", + "Vw3=(V3/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw3\n", + "C1=(297-Vw3); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C1\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=(Va*0.25*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",round(Qair)\n", + "Qwaters=(Vw2*0.44*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaters)\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C1*l); # Btu/hr, calculation mistake in book\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaterl)\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \",round(Qt1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 pgno:197" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total number of moles re : \t690.168582375\n", + "\t Moles of air is : \t651.724137931\n", + "\t Moles of water is : \t38.4444444444\n", + "\t after compression \t\n", + "\t partial pressure is : psi \t1.91\n", + "\t dew point is : F \t124\n" + ] + } + ], + "source": [ + "print\"\\t example 9.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "Va=18900.; # air in inlet gas\n", + "Vw1=692.; # water entering\n", + "#solution\n", + "Ma=(Va/29.); # moles\n", + "Mw=(Vw1/18.); # moles\n", + "M=(Ma+Mw); # moles\n", + "print\"\\t total number of moles re : \\t\",M\n", + "print\"\\t Moles of air is : \\t\",Ma\n", + "print\"\\t Moles of water is : \\t\",Mw\n", + "print\"\\t after compression \\t\"\n", + "P=34.2; # pressure,psi\n", + "pw=(Mw/M)*(P); # partial pressure\n", + "print\"\\t partial pressure is : psi \\t\",round(pw,2)\n", + "Td=124; # F, table table 7\n", + "print\"\\t dew point is : F \\t\",Td\n", + "# end\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/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 new file mode 100644 index 00000000..725fa18f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_3.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 pgno:193" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for ammonia gas \t\n", + "\t total heat required for ammonia gas is : Btu/hr \t784824.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t785000\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t22.4772661868\n", + "\t R is : \t15\n", + "\t S is : \t0\n", + "\t FT is 0.837 \t\n", + "\t delt is : F \t18.8134717984\n", + "\t caloric temperature of hot fluid is : F \t170\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,ammonia at 83psia \t\n", + "\t flow area is : ft**2 \t0.387706776948\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t25462.5417634\n", + "\t reynolds number is : \t40187.0924297\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t42.4542545455\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0954236111111\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t822647.551124\n", + "\t V is : fps \t3.65621133833\n", + "\t reynolds number is : \t21418.7950051\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t900\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t744.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t40.1624954017\n", + "\t total surface area is : ft**2 \t571.6256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.9943154025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0111991543302\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t8\n", + "\t rowgas is lb/ft**3 \t0.209\n", + "\t s is \t0.003344\n", + "\t delPs is : psi \t2.03484815237\n", + "\t allowable delPs is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.6\n", + "\t delPr is : psi \t2.9\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 9.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=245; # inlet hot fluid,F\n", + "T2=95; # outlet hot fluid,F\n", + "t1=85; # inlet cold fluid,F\n", + "t2=95; # outlet cold fluid,F\n", + "W=9872; # lb/hr\n", + "w=78500; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for ammonia gas \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for ammonia gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.837 \\t\" # from fig 18\n", + "delt=(0.837*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,ammonia at 83psia \\t\"\n", + "ID=23.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.012*2.42; # at 170F,lb/(ft)*(hr), from fig.15\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=118; # from fig.28\n", + "k=0.017; # Btu/(hr)*(ft**2)*(F/ft),from table 5\n", + "Z=0.97; # Z=(Pr*(1/3)) prandelt number\n", + "ho=((jH)*(k/De)*(Z)*1); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=364;\n", + "n=8; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.82*2.42; # at 90F,lb/(ft)*(hr),from fig 14\n", + "D=(0.62/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=900; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00162; # friction factor for reynolds number 40200, using fig.29\n", + "Ds=23.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "rowgas=0.209;\n", + "print\"\\t rowgas is lb/ft**3 \\t\",rowgas\n", + "s=rowgas/62.5;\n", + "print\"\\t s is \\t\",s\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000225; # friction factor for reynolds number 21400, using fig.26\n", + "s=1;\n", + "D=0.0517; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.090; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 pgno:196" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t The air and water both occupy the same volume at their respective partial pressures \t\n", + "\t volume of water entering is : lb \t693.049715558\n", + "\t for first stage \t\n", + "\t P2 is : psi \t34.251\n", + "\t T2absr is : R \t706.727218318\n", + "\t T2abs is : F \t247.057218318\n", + "\t for intercooler \t\n", + "\t final gas volume is : ft**3/hr \t120257.51073\n", + "\t water remaining in air is : lb/hr \t297.446229853\n", + "\t condensation in inter cooler is : lb/hr \t395.603485705\n", + "\t Specific volume of atmospheric air is : ft**3/lb \t14.8\n", + "\t air in inlet gas is : lb/hr\t18932.4324324\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.216216\n", + "\t Qwaters is : Btu/hr \t46780.8558001\n", + "\t latent heat \t\n", + "\t Qwater1 is : Btu/hr \t411467.185481\n", + "\t total heat is : Btu/hr \t1168214.2575\n", + "\t for second stage \t\n", + "\t P3 is : psi \t79.80483\n", + "\t final gas volume is : ft**3/hr \t51612.6655492\n", + "\t water remaining in air is : lb/hr \t127.659326117\n", + "\t condensation in inter cooler is : lb/hr \t169.340673883\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.0\n", + "\t Qwater is : Btu/hr \t19631.0\n", + "\t latent heat \t\n", + "\t Qwater is : Btu/hr \t176131.0\n", + "\t total heat is : Btu/hr 905729.0\n" + ] + } + ], + "source": [ + "print\"\\t example 9.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "V1=4670; # inlet air volume,cfm\n", + "Pp=0.8153; # Saturation partial pressure of water at 95F,psi,from table 7\n", + "Ps=404.3;# Saturation specific volume of water at 95F,ft**3/lb, from table 7\n", + "#solution\n", + "print\"\\t The air and water both occupy the same volume at their respective partial pressures \\t\"\n", + "Vw1=(V1*60/Ps); # water entering per hr,lb\n", + "print\"\\t volume of water entering is : lb \\t\",Vw1\n", + "print\"\\t for first stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P1=14.7; # psi\n", + "P2=(P1*c); # (c=(P2/P1)),psi\n", + "print\"\\t P2 is : psi \\t\",P2\n", + "gama=1.4; # for air\n", + "T1abs=95; # F\n", + "T2absr=((T1abs+460)*(P2/P1)**((gama-1)/gama));\n", + "print\"\\t T2absr is : R \\t\",T2absr\n", + "T2abs=(T2absr-459.67); # F\n", + "print\"\\t T2abs is : F \\t\",T2abs\n", + "print\"\\t for intercooler \\t\"\n", + "V2=(V1*60*P1/P2); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V2\n", + "Vw2=(V2/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw2\n", + "C=(Vw1-Vw2); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C\n", + "Vs=14.8; # Specific volume of atmospheric air,ft**3/lb\n", + "print\"\\t Specific volume of atmospheric air is : ft**3/lb \\t\",Vs\n", + "Va=(V1*60/Vs); # air in inlet gas, lb/hr\n", + "print\"\\t air in inlet gas is : lb/hr\\t\",Va\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=((Va)*(0.25)*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",Qair\n", + "Qwaters=(Vw1*0.45*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwaters is : Btu/hr \\t\",Qwaters\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C*l); # Btu/hr\n", + "print\"\\t Qwater1 is : Btu/hr \\t\",Qwaterl\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \\t\",Qt1\n", + "print\"\\t for second stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P3=(P2*c); # (c=(P3/P1)),psi\n", + "print\"\\t P3 is : psi \\t\",P3\n", + "V3=(V1*60*P1/P3); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V3\n", + "Vw3=(V3/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw3\n", + "C1=(297-Vw3); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C1\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=(Va*0.25*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",round(Qair)\n", + "Qwaters=(Vw2*0.44*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaters)\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C1*l); # Btu/hr, calculation mistake in book\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaterl)\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \",round(Qt1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 pgno:197" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total number of moles re : \t690.168582375\n", + "\t Moles of air is : \t651.724137931\n", + "\t Moles of water is : \t38.4444444444\n", + "\t after compression \t\n", + "\t partial pressure is : psi \t1.91\n", + "\t dew point is : F \t124\n" + ] + } + ], + "source": [ + "print\"\\t example 9.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "Va=18900.; # air in inlet gas\n", + "Vw1=692.; # water entering\n", + "#solution\n", + "Ma=(Va/29.); # moles\n", + "Mw=(Vw1/18.); # moles\n", + "M=(Ma+Mw); # moles\n", + "print\"\\t total number of moles re : \\t\",M\n", + "print\"\\t Moles of air is : \\t\",Ma\n", + "print\"\\t Moles of water is : \\t\",Mw\n", + "print\"\\t after compression \\t\"\n", + "P=34.2; # pressure,psi\n", + "pw=(Mw/M)*(P); # partial pressure\n", + "print\"\\t partial pressure is : psi \\t\",round(pw,2)\n", + "Td=124; # F, table table 7\n", + "print\"\\t dew point is : F \\t\",Td\n", + "# end\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/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 new file mode 100644 index 00000000..725fa18f --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/Chapter_9_Gases_4.ipynb @@ -0,0 +1,386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Gases" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1 pgno:193" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.1 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t 1.for heat balance \t\n", + "\t for ammonia gas \t\n", + "\t total heat required for ammonia gas is : Btu/hr \t784824.0\n", + "\t for water \t\n", + "\t total heat required for water is : Btu/hr \t785000\n", + "\t delt1 is : F \t10\n", + "\t delt2 is : F \t150\n", + "\t LMTD is : F \t22.4772661868\n", + "\t R is : \t15\n", + "\t S is : \t0\n", + "\t FT is 0.837 \t\n", + "\t delt is : F \t18.8134717984\n", + "\t caloric temperature of hot fluid is : F \t170\n", + "\t caloric temperature of cold fluid is : F \t90\n", + "\t hot fluid:shell side,ammonia at 83psia \t\n", + "\t flow area is : ft**2 \t0.387706776948\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t25462.5417634\n", + "\t reynolds number is : \t40187.0924297\n", + "\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t42.4542545455\n", + "\t cold fluid:inner tube side,water \t\n", + "\t flow area is : ft**2 \t0.0954236111111\n", + "\t mass velocity is : lb/(hr)*(ft**2) \t822647.551124\n", + "\t V is : fps \t3.65621133833\n", + "\t reynolds number is : \t21418.7950051\n", + "\t hi is : Btu/(hr)*(ft**2)*(F) \t900\n", + "\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t744.0\n", + "\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t40.1624954017\n", + "\t total surface area is : ft**2 \t571.6256\n", + "\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t72.9943154025\n", + "\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t-0.0111991543302\n", + "\t pressure drop for annulus \t\n", + "\t number of crosses are : \t8\n", + "\t rowgas is lb/ft**3 \t0.209\n", + "\t s is \t0.003344\n", + "\t delPs is : psi \t2.03484815237\n", + "\t allowable delPs is 2 psi \t\n", + "\t pressure drop for inner pipe \t\n", + "\t delPt is : psi \t3.6\n", + "\t delPr is : psi \t2.9\n", + "\t delPT is : psi \t6.5\n", + "\t allowable delPT is 10 psi \t\n" + ] + } + ], + "source": [ + "print\"\\t example 9.1 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "T1=245; # inlet hot fluid,F\n", + "T2=95; # outlet hot fluid,F\n", + "t1=85; # inlet cold fluid,F\n", + "t2=95; # outlet cold fluid,F\n", + "W=9872; # lb/hr\n", + "w=78500; # lb/hr\n", + "#solution\n", + "from math import log\n", + "print\"\\t 1.for heat balance \\t\"\n", + "print\"\\t for ammonia gas \\t\"\n", + "c=0.53; # Btu/(lb)*(F)\n", + "Q=((W)*(c)*(T1-T2)); # Btu/hr\n", + "print\"\\t total heat required for ammonia gas is : Btu/hr \\t\",Q\n", + "print\"\\t for water \\t\"\n", + "c=1; # Btu/(lb)*(F)\n", + "Q=((w)*(c)*(t2-t1)); # Btu/hr\n", + "print\"\\t total heat required for water is : Btu/hr \\t\",Q\n", + "delt1=T2-t1; #F\n", + "delt2=T1-t2; # F\n", + "print\"\\t delt1 is : F \\t\",delt1\n", + "print\"\\t delt2 is : F \\t\",delt2\n", + "LMTD=((delt2-delt1)/((2.3)*(log(delt2/delt1))));\n", + "print\"\\t LMTD is : F \\t\",LMTD\n", + "R=((T1-T2)/(t2-t1));\n", + "print\"\\t R is : \\t\",R\n", + "S=((t2-t1)/(T1-t1));\n", + "print\"\\t S is : \\t\",S\n", + "print\"\\t FT is 0.837 \\t\" # from fig 18\n", + "delt=(0.837*LMTD); # F\n", + "print\"\\t delt is : F \\t\",delt\n", + "Tc=((T2)+(T1))/2; # caloric temperature of hot fluid,F\n", + "print\"\\t caloric temperature of hot fluid is : F \\t\",Tc\n", + "tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F\n", + "print\"\\t caloric temperature of cold fluid is : F \\t\",tc\n", + "print\"\\t hot fluid:shell side,ammonia at 83psia \\t\"\n", + "ID=23.25; # in\n", + "C=0.1875; # clearance\n", + "B=12; # baffle spacing,in\n", + "PT=0.937;\n", + "As=((ID*C*B)/(144*PT)); # flow area,ft**2,from eq 7.1\n", + "print\"\\t flow area is : ft**2 \\t\",As\n", + "Gs=(W/As); # mass velocity,lb/(hr)*(ft**2),from eq 7.2\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gs\n", + "mu1=0.012*2.42; # at 170F,lb/(ft)*(hr), from fig.15\n", + "De=0.55/12; # from fig.28,ft\n", + "Res=((De)*(Gs)/mu1); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Res\n", + "jH=118; # from fig.28\n", + "k=0.017; # Btu/(hr)*(ft**2)*(F/ft),from table 5\n", + "Z=0.97; # Z=(Pr*(1/3)) prandelt number\n", + "ho=((jH)*(k/De)*(Z)*1); # using eq.6.15,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",ho\n", + "print\"\\t cold fluid:inner tube side,water \\t\"\n", + "Nt=364;\n", + "n=8; # number of passes\n", + "L=8; #ft\n", + "at1=0.302; # flow area, in**2,from table 10\n", + "at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48\n", + "print\"\\t flow area is : ft**2 \\t\",at\n", + "Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)\n", + "print\"\\t mass velocity is : lb/(hr)*(ft**2) \\t\",Gt\n", + "V=(Gt/(3600*62.5)); # fps\n", + "print\"\\t V is : fps \\t\",V\n", + "mu2=0.82*2.42; # at 90F,lb/(ft)*(hr),from fig 14\n", + "D=(0.62/12); # ft,from table 10\n", + "Ret=((D)*(Gt)/mu2); # reynolds number\n", + "print\"\\t reynolds number is : \\t\",Ret\n", + "hi=900; # using fig 25,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t hi is : Btu/(hr)*(ft**2)*(F) \\t\",hi\n", + "ID=0.62; # ft\n", + "OD=0.75; #ft\n", + "hio=((hi)*(ID/OD)); # using eq.6.5\n", + "print\"\\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \\t\",hio\n", + "Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)\n", + "print\"\\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",Uc\n", + "A2=0.1963; # actual surface supplied for each tube,ft**2,from table 10\n", + "A=(Nt*L*A2); # ft**2\n", + "print\"\\t total surface area is : ft**2 \\t\",A\n", + "UD=((Q)/((A)*(delt)));\n", + "print\"\\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \\t\",UD\n", + "Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu\n", + "print\"\\t actual Rd is : (hr)*(ft**2)*(F)/Btu \\t\",Rd\n", + "print\"\\t pressure drop for annulus \\t\"\n", + "f=0.00162; # friction factor for reynolds number 40200, using fig.29\n", + "Ds=23.25/12; # ft\n", + "phys=1;\n", + "N=(12*L/B); # number of crosses,using eq.7.43\n", + "print\"\\t number of crosses are : \\t\",N\n", + "rowgas=0.209;\n", + "print\"\\t rowgas is lb/ft**3 \\t\",rowgas\n", + "s=rowgas/62.5;\n", + "print\"\\t s is \\t\",s\n", + "delPs=((f*(Gs**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys))); # using eq.7.44,psi\n", + "print\"\\t delPs is : psi \\t\",delPs\n", + "print\"\\t allowable delPs is 2 psi \\t\"\n", + "print\"\\t pressure drop for inner pipe \\t\"\n", + "f=0.000225; # friction factor for reynolds number 21400, using fig.26\n", + "s=1;\n", + "D=0.0517; #ft\n", + "phyt=1;\n", + "delPt=((f*(Gt**2)*(L)*(n))/(5.22*(10**10)*(D)*(s)*(phyt))); # using eq.7.45,psi\n", + "print\"\\t delPt is : psi \\t\",round(delPt,1)\n", + "X1=0.090; # X1=((V**2)/(2*g)), for Gt 1060000,using fig.27\n", + "delPr=((4*n*X1)/(s)); # using eq.7.46,psi\n", + "print\"\\t delPr is : psi \\t\",round(delPr,1)\n", + "delPT=delPt+delPr; # using eq.7.47,psi\n", + "print\"\\t delPT is : psi \\t\",round(delPT,1)\n", + "print\"\\t allowable delPT is 10 psi \\t\"\n", + "#end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2 pgno:196" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.2 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t The air and water both occupy the same volume at their respective partial pressures \t\n", + "\t volume of water entering is : lb \t693.049715558\n", + "\t for first stage \t\n", + "\t P2 is : psi \t34.251\n", + "\t T2absr is : R \t706.727218318\n", + "\t T2abs is : F \t247.057218318\n", + "\t for intercooler \t\n", + "\t final gas volume is : ft**3/hr \t120257.51073\n", + "\t water remaining in air is : lb/hr \t297.446229853\n", + "\t condensation in inter cooler is : lb/hr \t395.603485705\n", + "\t Specific volume of atmospheric air is : ft**3/lb \t14.8\n", + "\t air in inlet gas is : lb/hr\t18932.4324324\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.216216\n", + "\t Qwaters is : Btu/hr \t46780.8558001\n", + "\t latent heat \t\n", + "\t Qwater1 is : Btu/hr \t411467.185481\n", + "\t total heat is : Btu/hr \t1168214.2575\n", + "\t for second stage \t\n", + "\t P3 is : psi \t79.80483\n", + "\t final gas volume is : ft**3/hr \t51612.6655492\n", + "\t water remaining in air is : lb/hr \t127.659326117\n", + "\t condensation in inter cooler is : lb/hr \t169.340673883\n", + "\t heat load(245 to 95F) \t)\n", + "\t sensible heat \t\n", + "\t Qair is : Btu/hr \t709966.0\n", + "\t Qwater is : Btu/hr \t19631.0\n", + "\t latent heat \t\n", + "\t Qwater is : Btu/hr \t176131.0\n", + "\t total heat is : Btu/hr 905729.0\n" + ] + } + ], + "source": [ + "print\"\\t example 9.2 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "V1=4670; # inlet air volume,cfm\n", + "Pp=0.8153; # Saturation partial pressure of water at 95F,psi,from table 7\n", + "Ps=404.3;# Saturation specific volume of water at 95F,ft**3/lb, from table 7\n", + "#solution\n", + "print\"\\t The air and water both occupy the same volume at their respective partial pressures \\t\"\n", + "Vw1=(V1*60/Ps); # water entering per hr,lb\n", + "print\"\\t volume of water entering is : lb \\t\",Vw1\n", + "print\"\\t for first stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P1=14.7; # psi\n", + "P2=(P1*c); # (c=(P2/P1)),psi\n", + "print\"\\t P2 is : psi \\t\",P2\n", + "gama=1.4; # for air\n", + "T1abs=95; # F\n", + "T2absr=((T1abs+460)*(P2/P1)**((gama-1)/gama));\n", + "print\"\\t T2absr is : R \\t\",T2absr\n", + "T2abs=(T2absr-459.67); # F\n", + "print\"\\t T2abs is : F \\t\",T2abs\n", + "print\"\\t for intercooler \\t\"\n", + "V2=(V1*60*P1/P2); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V2\n", + "Vw2=(V2/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw2\n", + "C=(Vw1-Vw2); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C\n", + "Vs=14.8; # Specific volume of atmospheric air,ft**3/lb\n", + "print\"\\t Specific volume of atmospheric air is : ft**3/lb \\t\",Vs\n", + "Va=(V1*60/Vs); # air in inlet gas, lb/hr\n", + "print\"\\t air in inlet gas is : lb/hr\\t\",Va\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=((Va)*(0.25)*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",Qair\n", + "Qwaters=(Vw1*0.45*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwaters is : Btu/hr \\t\",Qwaters\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C*l); # Btu/hr\n", + "print\"\\t Qwater1 is : Btu/hr \\t\",Qwaterl\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \\t\",Qt1\n", + "print\"\\t for second stage \\t\"\n", + "c=2.33; # compression ratio\n", + "P3=(P2*c); # (c=(P3/P1)),psi\n", + "print\"\\t P3 is : psi \\t\",P3\n", + "V3=(V1*60*P1/P3); # ft**3/hr\n", + "print\"\\t final gas volume is : ft**3/hr \\t\",V3\n", + "Vw3=(V3/Ps); # water remaining in air, lb/hr\n", + "print\"\\t water remaining in air is : lb/hr \\t\",Vw3\n", + "C1=(297-Vw3); # condensation in inter cooler, lb/hr\n", + "print\"\\t condensation in inter cooler is : lb/hr \\t\",C1\n", + "print\"\\t heat load(245 to 95F) \\t)\"\n", + "print\"\\t sensible heat \\t\"\n", + "Qair=(Va*0.25*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qair is : Btu/hr \\t\",round(Qair)\n", + "Qwaters=(Vw2*0.44*(245-T1abs)); # Btu/hr\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaters)\n", + "print\"\\t latent heat \\t\"\n", + "l=1040.1; # latent heat\n", + "Qwaterl=(C1*l); # Btu/hr, calculation mistake in book\n", + "print\"\\t Qwater is : Btu/hr \\t\",round(Qwaterl)\n", + "Qt1=Qair+Qwaters+Qwaterl;\n", + "print\"\\t total heat is : Btu/hr \",round(Qt1)\n", + "# end\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3 pgno:197" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t example 9.3 \t\n", + "\t approximate values are mentioned in the book \t\n", + "\t total number of moles re : \t690.168582375\n", + "\t Moles of air is : \t651.724137931\n", + "\t Moles of water is : \t38.4444444444\n", + "\t after compression \t\n", + "\t partial pressure is : psi \t1.91\n", + "\t dew point is : F \t124\n" + ] + } + ], + "source": [ + "print\"\\t example 9.3 \\t\"\n", + "print\"\\t approximate values are mentioned in the book \\t\"\n", + "#given\n", + "Va=18900.; # air in inlet gas\n", + "Vw1=692.; # water entering\n", + "#solution\n", + "Ma=(Va/29.); # moles\n", + "Mw=(Vw1/18.); # moles\n", + "M=(Ma+Mw); # moles\n", + "print\"\\t total number of moles re : \\t\",M\n", + "print\"\\t Moles of air is : \\t\",Ma\n", + "print\"\\t Moles of water is : \\t\",Mw\n", + "print\"\\t after compression \\t\"\n", + "P=34.2; # pressure,psi\n", + "pw=(Mw/M)*(P); # partial pressure\n", + "print\"\\t partial pressure is : psi \\t\",round(pw,2)\n", + "Td=124; # F, table table 7\n", + "print\"\\t dew point is : F \\t\",Td\n", + "# end\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/Process_Heat_Transfer_by_D._Q._Kern/README.txt b/Process_Heat_Transfer_by_D._Q._Kern/README.txt new file mode 100644 index 00000000..fa71ad24 --- /dev/null +++ b/Process_Heat_Transfer_by_D._Q._Kern/README.txt @@ -0,0 +1,10 @@ +Contributed By: kota Dinesh Babu +Course: btech +College/Institute/Organization: K L university +Department/Designation: Mechanical Engineering +Book Title: Process Heat Transfer +Author: D. Q. Kern +Publisher: Tata McGraw-Hill, NY +Year of publication: 1950 +Isbn: 0-07-085353-3 +Edition: 1 \ No newline at end of file diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png new file mode 100644 index 00000000..2f30b561 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15.png differ 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 new file mode 100644 index 00000000..2f30b561 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_1.png differ 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 new file mode 100644 index 00000000..2f30b561 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_2.png differ 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 new file mode 100644 index 00000000..2f30b561 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH15_3.png differ diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png new file mode 100644 index 00000000..f7f42642 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16.png differ 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 new file mode 100644 index 00000000..f7f42642 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_1.png differ 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 new file mode 100644 index 00000000..f7f42642 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_2.png differ 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 new file mode 100644 index 00000000..f7f42642 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH16_3.png differ diff --git a/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png new file mode 100644 index 00000000..a8ae6e47 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17.png differ 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 new file mode 100644 index 00000000..a8ae6e47 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_1.png differ 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 new file mode 100644 index 00000000..a8ae6e47 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_2.png differ 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 new file mode 100644 index 00000000..a8ae6e47 Binary files /dev/null and b/Process_Heat_Transfer_by_D._Q._Kern/screenshots/CH17_3.png differ diff --git a/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/11_1.png b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/11_1.png new file mode 100755 index 00000000..b584f423 Binary files /dev/null and b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/11_1.png differ diff --git a/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/22_1.png b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/22_1.png new file mode 100755 index 00000000..60a60734 Binary files /dev/null and b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/22_1.png differ diff --git a/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/33_1.png b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/33_1.png new file mode 100755 index 00000000..f20c8473 Binary files /dev/null and b/Quantitative_Aptitude_for_Competitive_Examinations/screenshots/33_1.png differ diff --git a/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1.ipynb new file mode 100755 index 00000000..c048e488 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter1.ipynb @@ -0,0 +1,455 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Numbers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 1.12" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "quotient is 381.097560976\n", + "remainder is 4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D=41; #divisor\n", + "d=15625; #dividend\n", + "\n", + "#Calculation\n", + "q=d/D; #quotient\n", + "r=d%D; #remainder\n", + "\n", + "#Result\n", + "print \"quotient is\",q\n", + "print \"remainder is\",r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 1.12" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divisor is 459.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D=397246; #dividend\n", + "r=211; #remainder\n", + "q=865; #quotient\n", + "\n", + "#Calculation\n", + "d=(D-r)/q; #divisor\n", + "\n", + "#Result\n", + "print \"divisor is\",d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least number to be subtracted is 125\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=87375; #dividend\n", + "D=698; #divisor\n", + "\n", + "#Calculation\n", + "r=d%D; #remainder\n", + "\n", + "#Result\n", + "print \"least number to be subtracted is\",r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.5, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least number to be added is 58\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=49123; #dividend\n", + "D=263; #divisor\n", + "\n", + "#Calculation\n", + "r=d%D; #remainder\n", + "l=D-r; #least number to be added\n", + "\n", + "#Result\n", + "print \"least number to be added is\",l" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.6, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required number is 980\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "d=999; #dividend\n", + "D=35; #divisor\n", + "\n", + "#Calculation\n", + "r=d%D; #remainder\n", + "rn=d-r; #required number\n", + "\n", + "#Result\n", + "print \"required number is\",rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.7, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required number is 112\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "d=100; #dividend\n", + "D=14; #divisor\n", + "\n", + "#Calculation\n", + "r=d%D; #remainder\n", + "rn=d+D-r; #required number\n", + "\n", + "#Result\n", + "print \"required number is\",rn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.8, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required remainder is 8\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "d=602; #dividend\n", + "D=14; #divisor\n", + "rl=36; #remainder\n", + "\n", + "#Calculation\n", + "k=d/D; #quotient\n", + "rs=rl-(2*D); #required remainder\n", + "\n", + "#Result\n", + "print \"required remainder is\",rs" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.9, Page number 1.13" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required remainder is 39\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "d=357; #dividend\n", + "D=17; #divisor\n", + "rs=5; #remainder\n", + "\n", + "#Calculation\n", + "k=d/D; #quotient\n", + "rl=(2*D)+rs; #required remainder\n", + "\n", + "#Result\n", + "print \"required remainder is\",rl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.11, Page number 1.25" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binary equivalent of 30 is 0b11110\n", + "binary equivalent of 27 is 0b11011\n", + "binary equivalent of 41 is 0b101001\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=30;\n", + "b=27;\n", + "c=41; #numbers in decimal form\n", + "\n", + "#Calculation\n", + "ba=bin(a); #binary equivalent of 30\n", + "bb=bin(b); #binary equivalent of 27\n", + "bc=bin(c); #binary equivalent of 41\n", + "\n", + "#Result\n", + "print \"binary equivalent of 30 is\",ba\n", + "print \"binary equivalent of 27 is\",bb\n", + "print \"binary equivalent of 41 is\",bc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.12, Page number 1.26" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "result of 10110-1011 is 0b1011\n", + "result of 1001+1010 is 0b10011\n", + "result of 101*100 is 0b10100\n", + "result of 1100/11 is 0b100\n", + "result of 101+1100/10 is 0b1011\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a='10110'\n", + "b='1011'\n", + "c='1001'\n", + "d='1010'\n", + "e='101'\n", + "f='100'\n", + "g='1100'\n", + "h='11'\n", + "i='101'\n", + "j='1100'\n", + "k='10'\n", + "\n", + "#Calculation\n", + "a_b=bin(int(a,2)-int(b,2)); #result of 10110-1011\n", + "c_d=bin(int(c,2)+int(d,2)); #result of 1001+1010\n", + "e_f=bin(int(e,2)*int(f,2)); #result of 101*100\n", + "gh1=int(g,2);\n", + "gh2=int(h,2);\n", + "gh=int(gh1/gh2); \n", + "g_h=bin(gh); #result of 1100/11\n", + "j_k=bin(int(int(j,2)/int(k,2))); #result of 1100/10\n", + "i_j_k=bin(int(i,2)+int(j_k,2)); #result of 101+1100/10\n", + "\n", + "#Result\n", + "print \"result of 10110-1011 is\",a_b\n", + "print \"result of 1001+1010 is\",c_d\n", + "print \"result of 101*100 is\",e_f\n", + "print \"result of 1100/11 is\",g_h\n", + "print \"result of 101+1100/10 is\",i_j_k" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10.ipynb new file mode 100755 index 00000000..e80ad105 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10.ipynb @@ -0,0 +1,659 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Chain Rule" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.1, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 80.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=120; #number of men\n", + "N2=150; #number of men\n", + "D1=100; #number of days\n", + "\n", + "#Calculation\n", + "D2=N1*D1/N2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.2, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of men is 15.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=18; #number of men\n", + "D1=8; #number of days\n", + "D2=6; #number of days\n", + "R1=5; #number of hours\n", + "R2=8; #number of hours\n", + "\n", + "#Calculation\n", + "N2=N1*D1*R1/(D2*R2); #number of men\n", + "\n", + "#Result\n", + "print \"number of men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.3, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 10.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=1000; #number of men\n", + "D1=12; #number of days\n", + "N2=200; #number of men joined\n", + "\n", + "#Calculation\n", + "D2=N1*D1/(N1+N2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.4, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of acres is 72.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=4; #number of men\n", + "D1=30; #number of days\n", + "D2=12; #number of days\n", + "W1=40; #number of acres\n", + "N2=18; #number of men\n", + "\n", + "#Calculation\n", + "W2=N2*D2*W1/(D1*N1); #number of acres\n", + "\n", + "#Result\n", + "print \"number of acres is\",W2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.5, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 6.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=12; #number of men\n", + "D1=25; #number of days\n", + "N2=20; #number of men\n", + "W1=100*3*0.5; #volume of wall\n", + "W2=60*4*0.25; #volume of wall\n", + "\n", + "#Calculation\n", + "D2=N1*D1*W2/(W1*N2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.6, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 30.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=15; #number of men\n", + "D1=21; #number of days\n", + "N2=14; #number of men\n", + "R1=8; #number of hours\n", + "R2=6; #number of hours\n", + "\n", + "#Calculation\n", + "D2=N1*D1*R1/(N2*R2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.7, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 5.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=100; #number of men\n", + "D2=40-35; #number of days\n", + "N2=100; #number of men joined\n", + "\n", + "#Calculation\n", + "D=(N1+N2)*D2/N1;\n", + "D1=D-D2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.8, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of additional men is 56.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=104; #number of men\n", + "D1=30; #number of days\n", + "D=56; #number of days\n", + "R1=8; #number of hours\n", + "R2=9; #number of hours\n", + "W1=2/5; #fraction of work\n", + "\n", + "#Calculation\n", + "D2=D-D1; #number of days\n", + "W2=1-W1; #rest of the work\n", + "N=N1*D1*R1*W2/(D2*R2*W1);\n", + "N2=N-N1; #number of additional men\n", + "\n", + "#Result\n", + "print \"number of additional men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.9, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 25.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=10; #number of men\n", + "D1=40; #number of days\n", + "M2=4; #number of men\n", + "M3=6; #number of men\n", + "D3=50; #number of days\n", + "\n", + "#Calculation\n", + "D2=((M1*D1)-(M3*D3))/M2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.10, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 30.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=4; #number of lorries\n", + "D1=8; #number of days\n", + "R1=4; #number of tons\n", + "R2=3; #number of tons\n", + "W1=128; #number of tons\n", + "N2=6; #number of lorries\n", + "W2=540; #number of tons\n", + "\n", + "#Calculation\n", + "D2=N1*D1*R1*W2/(N2*R2*W1);\n", + "N2=N-N1; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.11, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 19.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=250; #number of students\n", + "D=30; #number of days \n", + "N_1=25; #number of students added\n", + "D1=10; #number of days\n", + "\n", + "#Calculation\n", + "N1=N+N_1; #number of students\n", + "N2=N; #number of students\n", + "D2=((N*D)-(N1*D1))/N2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.12, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of men is 1500.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=3000; #number of men\n", + "D1=25-11; #number of days\n", + "R1=900; #rate per head\n", + "D2=10; #number of days\n", + "R2=840; #rate per head\n", + "\n", + "#Calculation\n", + "N=N1*D1*R1/(D2*R2); \n", + "N2=N-N1; #number of men\n", + "\n", + "#Result\n", + "print \"number of men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.13, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required diesel is 1350.0 litres\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=6; #number of diesel engines\n", + "D1=5; #number of hours\n", + "R1=1/5; \n", + "R2=1/8; \n", + "W1=900; #number of litres\n", + "N2=9; #number of diesel engines\n", + "D2=8; #number of hours\n", + "\n", + "#Calculation\n", + "W2=N2*D2*R2*W1/(N1*R1*D1); #required diesel(litres)\n", + "\n", + "#Result\n", + "print \"required diesel is\",W2,\"litres\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.14, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "each machine should work 16.0 h/day\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=2; #number of machines\n", + "D1=8; #number of days\n", + "R1=12; #number of hours/day\n", + "E2=80/100; #efficiency \n", + "E1=90/100; #efficiency\n", + "W1=9000; #tonnes of coal\n", + "N2=3; #number of machines\n", + "D2=6; #number of days\n", + "W2=12000; #tonnes of coal\n", + "\n", + "#Calculation\n", + "R2=N1*D1*R1*E1*W2/(N2*D2*E2*W1); #number of hours/day\n", + "\n", + "#Result\n", + "print \"each machine should work\",R2,\"h/day\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.15, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount charged is 300.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=1; #number of persons\n", + "D1=5/2; #number of days\n", + "R1=50; #amount(Rs) \n", + "R2=42.50; #amount(Rs) \n", + "W2=340; #amount(Rs)\n", + "N2=1; #number of persons\n", + "D2=10/3; #number of days\n", + "\n", + "#Calculation\n", + "W1=N1*D1*R1*W2/(N2*R2*D2); #amount charged(Rs)\n", + "\n", + "#Result\n", + "print \"amount charged is\",W1,\"Rs\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb new file mode 100644 index 00000000..e80ad105 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter10_1.ipynb @@ -0,0 +1,659 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Chain Rule" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.1, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 80.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=120; #number of men\n", + "N2=150; #number of men\n", + "D1=100; #number of days\n", + "\n", + "#Calculation\n", + "D2=N1*D1/N2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.2, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of men is 15.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=18; #number of men\n", + "D1=8; #number of days\n", + "D2=6; #number of days\n", + "R1=5; #number of hours\n", + "R2=8; #number of hours\n", + "\n", + "#Calculation\n", + "N2=N1*D1*R1/(D2*R2); #number of men\n", + "\n", + "#Result\n", + "print \"number of men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.3, Page number 10.2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 10.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=1000; #number of men\n", + "D1=12; #number of days\n", + "N2=200; #number of men joined\n", + "\n", + "#Calculation\n", + "D2=N1*D1/(N1+N2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.4, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of acres is 72.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=4; #number of men\n", + "D1=30; #number of days\n", + "D2=12; #number of days\n", + "W1=40; #number of acres\n", + "N2=18; #number of men\n", + "\n", + "#Calculation\n", + "W2=N2*D2*W1/(D1*N1); #number of acres\n", + "\n", + "#Result\n", + "print \"number of acres is\",W2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.5, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 6.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=12; #number of men\n", + "D1=25; #number of days\n", + "N2=20; #number of men\n", + "W1=100*3*0.5; #volume of wall\n", + "W2=60*4*0.25; #volume of wall\n", + "\n", + "#Calculation\n", + "D2=N1*D1*W2/(W1*N2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.6, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 30.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=15; #number of men\n", + "D1=21; #number of days\n", + "N2=14; #number of men\n", + "R1=8; #number of hours\n", + "R2=6; #number of hours\n", + "\n", + "#Calculation\n", + "D2=N1*D1*R1/(N2*R2); #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.7, Page number 10.3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 5.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=100; #number of men\n", + "D2=40-35; #number of days\n", + "N2=100; #number of men joined\n", + "\n", + "#Calculation\n", + "D=(N1+N2)*D2/N1;\n", + "D1=D-D2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.8, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of additional men is 56.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=104; #number of men\n", + "D1=30; #number of days\n", + "D=56; #number of days\n", + "R1=8; #number of hours\n", + "R2=9; #number of hours\n", + "W1=2/5; #fraction of work\n", + "\n", + "#Calculation\n", + "D2=D-D1; #number of days\n", + "W2=1-W1; #rest of the work\n", + "N=N1*D1*R1*W2/(D2*R2*W1);\n", + "N2=N-N1; #number of additional men\n", + "\n", + "#Result\n", + "print \"number of additional men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.9, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 25.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=10; #number of men\n", + "D1=40; #number of days\n", + "M2=4; #number of men\n", + "M3=6; #number of men\n", + "D3=50; #number of days\n", + "\n", + "#Calculation\n", + "D2=((M1*D1)-(M3*D3))/M2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.10, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 30.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=4; #number of lorries\n", + "D1=8; #number of days\n", + "R1=4; #number of tons\n", + "R2=3; #number of tons\n", + "W1=128; #number of tons\n", + "N2=6; #number of lorries\n", + "W2=540; #number of tons\n", + "\n", + "#Calculation\n", + "D2=N1*D1*R1*W2/(N2*R2*W1);\n", + "N2=N-N1; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.11, Page number 10.4" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days is 19.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=250; #number of students\n", + "D=30; #number of days \n", + "N_1=25; #number of students added\n", + "D1=10; #number of days\n", + "\n", + "#Calculation\n", + "N1=N+N_1; #number of students\n", + "N2=N; #number of students\n", + "D2=((N*D)-(N1*D1))/N2; #number of days\n", + "\n", + "#Result\n", + "print \"number of days is\",D2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.12, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of men is 1500.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=3000; #number of men\n", + "D1=25-11; #number of days\n", + "R1=900; #rate per head\n", + "D2=10; #number of days\n", + "R2=840; #rate per head\n", + "\n", + "#Calculation\n", + "N=N1*D1*R1/(D2*R2); \n", + "N2=N-N1; #number of men\n", + "\n", + "#Result\n", + "print \"number of men is\",N2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.13, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "required diesel is 1350.0 litres\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=6; #number of diesel engines\n", + "D1=5; #number of hours\n", + "R1=1/5; \n", + "R2=1/8; \n", + "W1=900; #number of litres\n", + "N2=9; #number of diesel engines\n", + "D2=8; #number of hours\n", + "\n", + "#Calculation\n", + "W2=N2*D2*R2*W1/(N1*R1*D1); #required diesel(litres)\n", + "\n", + "#Result\n", + "print \"required diesel is\",W2,\"litres\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.14, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "each machine should work 16.0 h/day\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=2; #number of machines\n", + "D1=8; #number of days\n", + "R1=12; #number of hours/day\n", + "E2=80/100; #efficiency \n", + "E1=90/100; #efficiency\n", + "W1=9000; #tonnes of coal\n", + "N2=3; #number of machines\n", + "D2=6; #number of days\n", + "W2=12000; #tonnes of coal\n", + "\n", + "#Calculation\n", + "R2=N1*D1*R1*E1*W2/(N2*D2*E2*W1); #number of hours/day\n", + "\n", + "#Result\n", + "print \"each machine should work\",R2,\"h/day\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10.15, Page number 10.5" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount charged is 300.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N1=1; #number of persons\n", + "D1=5/2; #number of days\n", + "R1=50; #amount(Rs) \n", + "R2=42.50; #amount(Rs) \n", + "W2=340; #amount(Rs)\n", + "N2=1; #number of persons\n", + "D2=10/3; #number of days\n", + "\n", + "#Calculation\n", + "W1=N1*D1*R1*W2/(N2*R2*D2); #amount charged(Rs)\n", + "\n", + "#Result\n", + "print \"amount charged is\",W1,\"Rs\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11.ipynb new file mode 100755 index 00000000..c9ef92fc --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11.ipynb @@ -0,0 +1,765 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Time and Work" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.1, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A and B can do the job together in 12.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t1=20; #number of days A can do a job\n", + "t2=30; #number of days B can do a job\n", + "\n", + "#Calculation\n", + "T=t1*t2/(t1+t2); #number of days for A and B to do the job together\n", + "\n", + "#Result\n", + "print \"A and B can do the job together in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.2, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A can do the job in 21.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t1=28; #number of days B can do a job\n", + "T=12; #number of days for A and B to do the job together\n", + "\n", + "#Calculation\n", + "t2=T*t1/(t1-T); #number of days A can do a job\n", + "\n", + "#Result\n", + "print \"A can do the job in\",t2,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.3, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work done by A, B and C together is 10.0 days\n", + "work done by A alone is 30.0 days\n", + "work done by B alone is 20.0 days\n", + "work done by C alone is 60.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "T1=12; #work done by A and B together(days)\n", + "T2=15; #work done by C and B together(days)\n", + "T3=20; #work done by A and C together(days)\n", + "\n", + "#Calculation\n", + "l1=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "L=l1*T3/gcd(l1,T3); #lcm of the given 3 numbers\n", + "a=L/T1;\n", + "b=L/T2;\n", + "c=L/T3;\n", + "T=2*L/(a+b+c); #work done by A, B and C together(days)\n", + "Ta=2*L/(a-b+c); #work done by A alone(days)\n", + "Tb=2*L/(a+b-c); #work done by B alone(days)\n", + "Tc=2*L/(-a+b+c); #work done by C alone(days)\n", + "\n", + "#Result\n", + "print \"work done by A, B and C together is\",T,\"days\"\n", + "print \"work done by A alone is\",Ta,\"days\"\n", + "print \"work done by B alone is\",Tb,\"days\"\n", + "print \"work done by C alone is\",Tc,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.4, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 8.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "TB=3; #number of days B worked(days)\n", + "Tb=15; #alone time of B(days)\n", + "\n", + "#Calculation\n", + "T=Ta*(1-(TB/Tb)); #total work finished(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.5, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 15.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=20; #alone time of A(days)\n", + "Tb=30; #alone time of B(days)\n", + "a=5; #number of days A leaves(days)\n", + "\n", + "#Calculation\n", + "L=Ta*Tb/gcd(Ta,Tb); #lcm of T1 and T2\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "T=(L+(l1*a))/(l1+l2); #total work finished(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.6, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 8.72727272727 days\n", + "B worked for 2.72727272727 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "Tb=12; #alone time of B(days)\n", + "a=6; #number of days after A started(days)\n", + "\n", + "#Calculation\n", + "L=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "T=(L+(l1*a))/(l1+l2); #total work finished(days)\n", + "TB=T-a; #number of days B worked for(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"\n", + "print \"B worked for\",TB,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.7, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days to complete the job is 10.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=1; #number of men\n", + "E1=1; #efficiency of anil\n", + "D1=8; #number of days worked(days)\n", + "E=60/100; #efficiency of rakesh(%)\n", + "P1=1/3; #part of work done by anil\n", + "M2=1; #number of men\n", + "\n", + "#Calculation\n", + "E2=(M1*M2)+(E1*E); #efficiency\n", + "P2=1-P1; #part of work done by rakesh\n", + "D2=M1*E1*D1*P2/(P1*E2); #number of days to complete the job(days)\n", + "\n", + "#Result\n", + "print \"number of days to complete the job is\",D2,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.8, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken for A to complete the job is 6 1/4 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "T1=5; #work done by A and B together(days)\n", + "T=1; #total job done\n", + "eB=1/3; #efficiency of B\n", + "\n", + "#Calculation\n", + "t=T-(T/T1); \n", + "tA=T1*(1/t); #time taken for A to complete the job(days)\n", + "x=tA-int(tA);\n", + "\n", + "#Result\n", + "print \"time taken for A to complete the job is\",int(tA),Fraction(x),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.9, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A can finish in 2.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=1; #number of men\n", + "D1=12; #number of days worked(days)\n", + "M2=1; #number of men\n", + "W1=3/4; #work done by A\n", + "W2=1/8; #part of work done\n", + "\n", + "#Calculation\n", + "d=M1*D1*W2/(W1*M2); #number of days for A(days)\n", + "\n", + "#Result\n", + "print \"A can finish in\",d,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.10, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 7.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "Tb=12; #alone time of B(days)\n", + "Tc=15; #alone time of C(days)\n", + "a=2; #number of days after A started(days)\n", + "b=3; #number of days before the work finished(days)\n", + "\n", + "#Calculation\n", + "L1=Ta*Tb/gcd(Ta,Tb); #lcm of Ta and Tb\n", + "L=L1*Tc/gcd(L1,Tc); #lcm of all the three\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "l3=L/Tc;\n", + "r=1-a/Ta;\n", + "T=((r*L)+Tc)/(l2+l3); #total work finished(days)\n", + "TB=T-a; #number of days B worked for(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.11, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A left after 3.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "T1=15; #alone time of A(days)\n", + "T2=10; #alone time of B(days)\n", + "a=5; #number of days for B to finish(days)\n", + "\n", + "#Calculation\n", + "L=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "l1=L/T1;\n", + "l2=L/T2;\n", + "x=(L-(l2*a))/(l1+l2); #A left after days(days)\n", + "\n", + "#Result\n", + "print \"A left after\",x,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.12, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C can do it alone in 25.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=12; #alone time of A(days)\n", + "T2=15; #alone time of B(days)\n", + "T=2; #number of days they work together(days)\n", + "t=5; #number of days work is completed(days)\n", + "\n", + "#Calculation\n", + "Ta=(1+T+t)*(1/T1); #A's amount of work\n", + "Tb=T*(1/T2); #B's amount of work\n", + "T3=1-(Ta+Tb);\n", + "t3=t/T3; #C can do it in(days)\n", + "\n", + "#Result\n", + "print \"C can do it alone in\",t3,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.13, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount received by C is 5.33 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "p=25; #amount paid(Rs)\n", + "A=32; #number of days for A(days)\n", + "B=20; #number of days for B(days)\n", + "C=12; #number of days for C(days)\n", + "D=24; #number of days for B(days)\n", + "\n", + "#Calculation\n", + "l1=A*B/gcd(A,B); #lcm of A and B\n", + "l2=C*D/gcd(C,D); #lcm of C and D\n", + "L=l1*l2/gcd(l1,l2); #LCM of A,B,C and D\n", + "a=L/A;\n", + "b=L/B;\n", + "c1=(1/C)-(1/B);\n", + "c=L*c1;\n", + "d=L/D;\n", + "Cs=c*p/(a+b+c+d); #amount received by C(Rs)\n", + "\n", + "#Result\n", + "print \"amount received by C is\",round(Cs,2),\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.14, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken to finish the job if A starts the work is 5.8 days\n", + "time taken to finish the job if B starts the work is 5.86 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=5; #work for A alone(days)\n", + "tB=7; #work for B alone(days)\n", + "\n", + "#Calculation\n", + "p=round(tA*tB/(tA+tB)); #nearest integer value\n", + "Ta=((tA*tB)+(p*(tA-tB)))/tA; #time taken to finish the job if A starts the work(days)\n", + "Tb=((tA*tB)-(p*(tA-tB)))/tB; #time taken to finish the job if B starts the work(days)\n", + "\n", + "#Result\n", + "print \"time taken to finish the job if A starts the work is\",Ta,\"days\"\n", + "print \"time taken to finish the job if B starts the work is\",round(Tb,2),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example number 11.15, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "job is finished in 15.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=20; #number of days for A(days)\n", + "tB=30; #number of days for B(days)\n", + "tC=60; #number of days for C(days)\n", + "da=3; #help done by A\n", + "db=1;\n", + "dc=1;\n", + "\n", + "#Calculation\n", + "t=(da/tA)+(db/tB)+(dc/tC);\n", + "T=da/t; #job is finished in(days)\n", + "\n", + "#Result\n", + "print \"job is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.16, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "job is finished in 30.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "K=3;\n", + "l=80; #number of days\n", + "\n", + "#Calculation\n", + "T=K*l/((K**2)-1); #job is finished in(days)\n", + "\n", + "#Result\n", + "print \"job is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.17, Page number 11.9" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken if they work together is 12.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=20; #work by skilled men(days)\n", + "tB=30; #work by boys(days)\n", + "\n", + "#Calculation\n", + "T=tA*tB/(tA+tB); #time taken if they work together(days) \n", + "\n", + "#Result\n", + "print \"time taken if they work together is\",T,\"days\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb new file mode 100644 index 00000000..c9ef92fc --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter11_1.ipynb @@ -0,0 +1,765 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Time and Work" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.1, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A and B can do the job together in 12.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t1=20; #number of days A can do a job\n", + "t2=30; #number of days B can do a job\n", + "\n", + "#Calculation\n", + "T=t1*t2/(t1+t2); #number of days for A and B to do the job together\n", + "\n", + "#Result\n", + "print \"A and B can do the job together in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.2, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A can do the job in 21.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "t1=28; #number of days B can do a job\n", + "T=12; #number of days for A and B to do the job together\n", + "\n", + "#Calculation\n", + "t2=T*t1/(t1-T); #number of days A can do a job\n", + "\n", + "#Result\n", + "print \"A can do the job in\",t2,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.3, Page number 11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work done by A, B and C together is 10.0 days\n", + "work done by A alone is 30.0 days\n", + "work done by B alone is 20.0 days\n", + "work done by C alone is 60.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "T1=12; #work done by A and B together(days)\n", + "T2=15; #work done by C and B together(days)\n", + "T3=20; #work done by A and C together(days)\n", + "\n", + "#Calculation\n", + "l1=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "L=l1*T3/gcd(l1,T3); #lcm of the given 3 numbers\n", + "a=L/T1;\n", + "b=L/T2;\n", + "c=L/T3;\n", + "T=2*L/(a+b+c); #work done by A, B and C together(days)\n", + "Ta=2*L/(a-b+c); #work done by A alone(days)\n", + "Tb=2*L/(a+b-c); #work done by B alone(days)\n", + "Tc=2*L/(-a+b+c); #work done by C alone(days)\n", + "\n", + "#Result\n", + "print \"work done by A, B and C together is\",T,\"days\"\n", + "print \"work done by A alone is\",Ta,\"days\"\n", + "print \"work done by B alone is\",Tb,\"days\"\n", + "print \"work done by C alone is\",Tc,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.4, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 8.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "TB=3; #number of days B worked(days)\n", + "Tb=15; #alone time of B(days)\n", + "\n", + "#Calculation\n", + "T=Ta*(1-(TB/Tb)); #total work finished(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.5, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 15.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=20; #alone time of A(days)\n", + "Tb=30; #alone time of B(days)\n", + "a=5; #number of days A leaves(days)\n", + "\n", + "#Calculation\n", + "L=Ta*Tb/gcd(Ta,Tb); #lcm of T1 and T2\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "T=(L+(l1*a))/(l1+l2); #total work finished(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.6, Page number 11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 8.72727272727 days\n", + "B worked for 2.72727272727 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "Tb=12; #alone time of B(days)\n", + "a=6; #number of days after A started(days)\n", + "\n", + "#Calculation\n", + "L=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "T=(L+(l1*a))/(l1+l2); #total work finished(days)\n", + "TB=T-a; #number of days B worked for(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"\n", + "print \"B worked for\",TB,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.7, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of days to complete the job is 10.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=1; #number of men\n", + "E1=1; #efficiency of anil\n", + "D1=8; #number of days worked(days)\n", + "E=60/100; #efficiency of rakesh(%)\n", + "P1=1/3; #part of work done by anil\n", + "M2=1; #number of men\n", + "\n", + "#Calculation\n", + "E2=(M1*M2)+(E1*E); #efficiency\n", + "P2=1-P1; #part of work done by rakesh\n", + "D2=M1*E1*D1*P2/(P1*E2); #number of days to complete the job(days)\n", + "\n", + "#Result\n", + "print \"number of days to complete the job is\",D2,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.8, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken for A to complete the job is 6 1/4 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "T1=5; #work done by A and B together(days)\n", + "T=1; #total job done\n", + "eB=1/3; #efficiency of B\n", + "\n", + "#Calculation\n", + "t=T-(T/T1); \n", + "tA=T1*(1/t); #time taken for A to complete the job(days)\n", + "x=tA-int(tA);\n", + "\n", + "#Result\n", + "print \"time taken for A to complete the job is\",int(tA),Fraction(x),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.9, Page number 11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A can finish in 2.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M1=1; #number of men\n", + "D1=12; #number of days worked(days)\n", + "M2=1; #number of men\n", + "W1=3/4; #work done by A\n", + "W2=1/8; #part of work done\n", + "\n", + "#Calculation\n", + "d=M1*D1*W2/(W1*M2); #number of days for A(days)\n", + "\n", + "#Result\n", + "print \"A can finish in\",d,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.10, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total work is finished in 7.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "Ta=10; #alone time of A(days)\n", + "Tb=12; #alone time of B(days)\n", + "Tc=15; #alone time of C(days)\n", + "a=2; #number of days after A started(days)\n", + "b=3; #number of days before the work finished(days)\n", + "\n", + "#Calculation\n", + "L1=Ta*Tb/gcd(Ta,Tb); #lcm of Ta and Tb\n", + "L=L1*Tc/gcd(L1,Tc); #lcm of all the three\n", + "l1=L/Ta;\n", + "l2=L/Tb;\n", + "l3=L/Tc;\n", + "r=1-a/Ta;\n", + "T=((r*L)+Tc)/(l2+l3); #total work finished(days)\n", + "TB=T-a; #number of days B worked for(days)\n", + "\n", + "#Result\n", + "print \"total work is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.11, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A left after 3.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "T1=15; #alone time of A(days)\n", + "T2=10; #alone time of B(days)\n", + "a=5; #number of days for B to finish(days)\n", + "\n", + "#Calculation\n", + "L=T1*T2/gcd(T1,T2); #lcm of T1 and T2\n", + "l1=L/T1;\n", + "l2=L/T2;\n", + "x=(L-(l2*a))/(l1+l2); #A left after days(days)\n", + "\n", + "#Result\n", + "print \"A left after\",x,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.12, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C can do it alone in 25.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=12; #alone time of A(days)\n", + "T2=15; #alone time of B(days)\n", + "T=2; #number of days they work together(days)\n", + "t=5; #number of days work is completed(days)\n", + "\n", + "#Calculation\n", + "Ta=(1+T+t)*(1/T1); #A's amount of work\n", + "Tb=T*(1/T2); #B's amount of work\n", + "T3=1-(Ta+Tb);\n", + "t3=t/T3; #C can do it in(days)\n", + "\n", + "#Result\n", + "print \"C can do it alone in\",t3,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.13, Page number 11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount received by C is 5.33 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "p=25; #amount paid(Rs)\n", + "A=32; #number of days for A(days)\n", + "B=20; #number of days for B(days)\n", + "C=12; #number of days for C(days)\n", + "D=24; #number of days for B(days)\n", + "\n", + "#Calculation\n", + "l1=A*B/gcd(A,B); #lcm of A and B\n", + "l2=C*D/gcd(C,D); #lcm of C and D\n", + "L=l1*l2/gcd(l1,l2); #LCM of A,B,C and D\n", + "a=L/A;\n", + "b=L/B;\n", + "c1=(1/C)-(1/B);\n", + "c=L*c1;\n", + "d=L/D;\n", + "Cs=c*p/(a+b+c+d); #amount received by C(Rs)\n", + "\n", + "#Result\n", + "print \"amount received by C is\",round(Cs,2),\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.14, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken to finish the job if A starts the work is 5.8 days\n", + "time taken to finish the job if B starts the work is 5.86 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=5; #work for A alone(days)\n", + "tB=7; #work for B alone(days)\n", + "\n", + "#Calculation\n", + "p=round(tA*tB/(tA+tB)); #nearest integer value\n", + "Ta=((tA*tB)+(p*(tA-tB)))/tA; #time taken to finish the job if A starts the work(days)\n", + "Tb=((tA*tB)-(p*(tA-tB)))/tB; #time taken to finish the job if B starts the work(days)\n", + "\n", + "#Result\n", + "print \"time taken to finish the job if A starts the work is\",Ta,\"days\"\n", + "print \"time taken to finish the job if B starts the work is\",round(Tb,2),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example number 11.15, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "job is finished in 15.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=20; #number of days for A(days)\n", + "tB=30; #number of days for B(days)\n", + "tC=60; #number of days for C(days)\n", + "da=3; #help done by A\n", + "db=1;\n", + "dc=1;\n", + "\n", + "#Calculation\n", + "t=(da/tA)+(db/tB)+(dc/tC);\n", + "T=da/t; #job is finished in(days)\n", + "\n", + "#Result\n", + "print \"job is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.16, Page number 11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "job is finished in 30.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "K=3;\n", + "l=80; #number of days\n", + "\n", + "#Calculation\n", + "T=K*l/((K**2)-1); #job is finished in(days)\n", + "\n", + "#Result\n", + "print \"job is finished in\",T,\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11.17, Page number 11.9" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken if they work together is 12.0 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "tA=20; #work by skilled men(days)\n", + "tB=30; #work by boys(days)\n", + "\n", + "#Calculation\n", + "T=tA*tB/(tA+tB); #time taken if they work together(days) \n", + "\n", + "#Result\n", + "print \"time taken if they work together is\",T,\"days\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12.ipynb new file mode 100755 index 00000000..def9a8d2 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12.ipynb @@ -0,0 +1,760 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: Pipes and Cisterns" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.1, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken by leak to empty the cistern is 45.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=4+(1/2); #time(hours)\n", + "x=1/2; #time(hours)\n", + "\n", + "#Calculation\n", + "E=f*(1+(f/x)); #time taken by leak to empty the cistern(hours)\n", + "\n", + "#Result\n", + "print \"time taken by leak to empty the cistern is\",E,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.2, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken by leak to empty the cistern is 112.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=32/60; #time(hours)\n", + "f1=14; #time for 1st pipe(hours)\n", + "f2=16; #time for 2nd pipe(hours)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #time(h)\n", + "E=T*(1+(T/x)); #time taken by leak to empty the cistern(hours)\n", + "\n", + "#Result\n", + "print \"time taken by leak to empty the cistern is\",E,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.3, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to fill is 12.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=20; #time for 1st pipe(minutes)\n", + "f2=30; #time for 2nd pipe(minutes)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #total time to fill(minutes)\n", + "\n", + "#Result\n", + "print \"total time to fill is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.4, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fill or empty time is 50.0 minutes\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", + "f=25; #time(minutes)\n", + "e=50; #time(minutes)\n", + "\n", + "#Calculation\n", + "Et=1/((1/f)-(1/e)); #fill or empty time(minutes)\n", + "\n", + "#Result\n", + "print \"fill or empty time is\",Et,\"minutes\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.5, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill half the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x1=3/4; #part of cistern\n", + "x2=1/2; #part of cistern\n", + "f1=12; #time to fill(minutes)\n", + "\n", + "#Calculation\n", + "f2=f1*x2/x1; #time to fill(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill half the cistern is\",f2,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.6, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " part of cistern to be emptied is 3/8\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "e1=20; #time(minutes)\n", + "e2=9; #time(minutes)\n", + "y1=5/6; #part of cistern\n", + "\n", + "#Calculation\n", + "y2=e2*y1/e1; #part of cistern to be emptied\n", + "\n", + "#Result\n", + "print \"part of cistern to be emptied is\",Fraction(y2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.7, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a1=3; #time(minutes)\n", + "a2=15; #time(minutes)\n", + "b=10; #time(minutes)\n", + "\n", + "#Calculation\n", + "T=b*(1-(a1/a2)); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.8, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 9.143 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "At=12; #alone fill time of A(minutes)\n", + "Bt=16; #alone fill time of B(minutes)\n", + "t=4; #time(minutes)\n", + "\n", + "#Calculation\n", + "l=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "T=(l+(t*a))/(a+b); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",round(T,3),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.9, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 20.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "At=10; #time to fill cistern for A(minutes)\n", + "Bt=15; #time to fill cistern for B(minutes)\n", + "Ct=5; #time to empty cistern for C(minutes)\n", + "t=4; #time(minutes)\n", + "\n", + "#Calculation\n", + "l1=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "l=l1*Ct/gcd(l1,Ct); #lcm of At,Ct and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "c=l/Ct;\n", + "T=(-(t*a)-(t*b))/(a+b-c); #time to empty the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.10, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 3.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "At=3; #time to fill cistern for A(minutes)\n", + "Bt=6; #time to fill cistern for B(minutes)\n", + "Ct=4; #time to empty cistern for B(minutes)\n", + "t=2; #time(minutes)\n", + "\n", + "#Calculation\n", + "x=1+(t/Ct);\n", + "l=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "T=x*l/(a+b); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.11, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to fill is 16.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=20; #time for 1st pipe(hours)\n", + "f2=30; #time for 2nd pipe(hours)\n", + "\n", + "#Calculation\n", + "F=f1*f2/(f1+f2); \n", + "T=F+(F/3); #total time to fill(hours)\n", + "\n", + "\n", + "#Result\n", + "print \"total time to fill is\",T,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.12, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacity of cistern is 40.0 litres\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=15; #time for 1st pipe(hours)\n", + "f2=10; #time for 2nd pipe(hours)\n", + "p=7; #capacity of carrying(litres/min)\n", + "E=2*60; #time(minutes)\n", + "\n", + "#Calculation\n", + "c=p/((1/f1)+(1/f2)+(1/E)); #capacity of cistern(litres)\n", + "\n", + "#Result\n", + "print \"capacity of cistern is\",c,\"litres\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.13, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 3.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ta=6; #fraction of time for A\n", + "t=21; #time to fill for B(minutes)\n", + "\n", + "#Calculation\n", + "F=t/(1+ta); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",F,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.14, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "K=4; #time(minutes)\n", + "L=30; #time(minutes)\n", + "\n", + "#Calculation\n", + "F=K*L/(K**2-1); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",F,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.15, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to empty the cistern is 18.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=10; #time for 1st pipe(minutes)\n", + "f2=15; #time for 2nd pipe(minutes)\n", + "tex=2; #extra time taken to fill(minutes)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #total time to fill(minutes)\n", + "E=T**2/tex; #total time to empty the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"total time to empty the cistern is\",E,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.16, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of filling pipes are 4.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=9; #fill rate(hours)\n", + "e=6; #empty rate(hours)\n", + "F=9; #total time(hours)\n", + "\n", + "#Calculation\n", + "a=(1/F)+1;\n", + "nf=a*f*e/(f+e); #number of filling pipes\n", + "\n", + "#Result\n", + "print \"number of filling pipes are\",nf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.17, Page number 12.10" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average sailing rate is 5.5 km/h\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ra=2/6; #rate of admission of water(tonnes/min)\n", + "rp=12/60; #rate of pumping out water(tonnes/min)\n", + "q=80; #quantity of water(tonnes)\n", + "d=55; #distance(km)\n", + "\n", + "#Calculation\n", + "r=ra-rp; #rate of accumulation(tonnes/min)\n", + "T=q/(r*60); #time to accumulate water(hours)\n", + "Asr=d/T; #average sailing rate(km/h)\n", + "\n", + "#Result\n", + "print \"average sailing rate is\",Asr,\"km/h\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.18, Page number 12.10" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time before the full flow began is 4.5 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p1=7/8; #part1\n", + "p2=5/6; #part2\n", + "t1=12; #time(minutes)\n", + "t2=16; #time(minutes)\n", + "t=3; #time(minutes)\n", + "\n", + "#Calculation\n", + "a=(p1/t1)+(p2/t2);\n", + "b=1-(t/t1)-(t/t2);\n", + "x=b/a; #time before the full flow began(minutes)\n", + "\n", + "#Result\n", + "print \"time before the full flow began is\",x,\"minutes\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb new file mode 100644 index 00000000..def9a8d2 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter12_1.ipynb @@ -0,0 +1,760 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: Pipes and Cisterns" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.1, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken by leak to empty the cistern is 45.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=4+(1/2); #time(hours)\n", + "x=1/2; #time(hours)\n", + "\n", + "#Calculation\n", + "E=f*(1+(f/x)); #time taken by leak to empty the cistern(hours)\n", + "\n", + "#Result\n", + "print \"time taken by leak to empty the cistern is\",E,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.2, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken by leak to empty the cistern is 112.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=32/60; #time(hours)\n", + "f1=14; #time for 1st pipe(hours)\n", + "f2=16; #time for 2nd pipe(hours)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #time(h)\n", + "E=T*(1+(T/x)); #time taken by leak to empty the cistern(hours)\n", + "\n", + "#Result\n", + "print \"time taken by leak to empty the cistern is\",E,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.3, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to fill is 12.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=20; #time for 1st pipe(minutes)\n", + "f2=30; #time for 2nd pipe(minutes)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #total time to fill(minutes)\n", + "\n", + "#Result\n", + "print \"total time to fill is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.4, Page number 12.6" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fill or empty time is 50.0 minutes\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", + "f=25; #time(minutes)\n", + "e=50; #time(minutes)\n", + "\n", + "#Calculation\n", + "Et=1/((1/f)-(1/e)); #fill or empty time(minutes)\n", + "\n", + "#Result\n", + "print \"fill or empty time is\",Et,\"minutes\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.5, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill half the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x1=3/4; #part of cistern\n", + "x2=1/2; #part of cistern\n", + "f1=12; #time to fill(minutes)\n", + "\n", + "#Calculation\n", + "f2=f1*x2/x1; #time to fill(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill half the cistern is\",f2,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.6, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " part of cistern to be emptied is 3/8\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "e1=20; #time(minutes)\n", + "e2=9; #time(minutes)\n", + "y1=5/6; #part of cistern\n", + "\n", + "#Calculation\n", + "y2=e2*y1/e1; #part of cistern to be emptied\n", + "\n", + "#Result\n", + "print \"part of cistern to be emptied is\",Fraction(y2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.7, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a1=3; #time(minutes)\n", + "a2=15; #time(minutes)\n", + "b=10; #time(minutes)\n", + "\n", + "#Calculation\n", + "T=b*(1-(a1/a2)); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.8, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 9.143 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "At=12; #alone fill time of A(minutes)\n", + "Bt=16; #alone fill time of B(minutes)\n", + "t=4; #time(minutes)\n", + "\n", + "#Calculation\n", + "l=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "T=(l+(t*a))/(a+b); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",round(T,3),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.9, Page number 12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 20.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "At=10; #time to fill cistern for A(minutes)\n", + "Bt=15; #time to fill cistern for B(minutes)\n", + "Ct=5; #time to empty cistern for C(minutes)\n", + "t=4; #time(minutes)\n", + "\n", + "#Calculation\n", + "l1=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "l=l1*Ct/gcd(l1,Ct); #lcm of At,Ct and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "c=l/Ct;\n", + "T=(-(t*a)-(t*b))/(a+b-c); #time to empty the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.10, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 3.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "At=3; #time to fill cistern for A(minutes)\n", + "Bt=6; #time to fill cistern for B(minutes)\n", + "Ct=4; #time to empty cistern for B(minutes)\n", + "t=2; #time(minutes)\n", + "\n", + "#Calculation\n", + "x=1+(t/Ct);\n", + "l=At*Bt/gcd(At,Bt); #lcm of At and Bt\n", + "a=l/At;\n", + "b=l/Bt;\n", + "T=x*l/(a+b); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",T,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.11, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to fill is 16.0 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=20; #time for 1st pipe(hours)\n", + "f2=30; #time for 2nd pipe(hours)\n", + "\n", + "#Calculation\n", + "F=f1*f2/(f1+f2); \n", + "T=F+(F/3); #total time to fill(hours)\n", + "\n", + "\n", + "#Result\n", + "print \"total time to fill is\",T,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.12, Page number 12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacity of cistern is 40.0 litres\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=15; #time for 1st pipe(hours)\n", + "f2=10; #time for 2nd pipe(hours)\n", + "p=7; #capacity of carrying(litres/min)\n", + "E=2*60; #time(minutes)\n", + "\n", + "#Calculation\n", + "c=p/((1/f1)+(1/f2)+(1/E)); #capacity of cistern(litres)\n", + "\n", + "#Result\n", + "print \"capacity of cistern is\",c,\"litres\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.13, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 3.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ta=6; #fraction of time for A\n", + "t=21; #time to fill for B(minutes)\n", + "\n", + "#Calculation\n", + "F=t/(1+ta); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",F,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.14, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time to fill the cistern is 8.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "K=4; #time(minutes)\n", + "L=30; #time(minutes)\n", + "\n", + "#Calculation\n", + "F=K*L/(K**2-1); #time to fill the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"time to fill the cistern is\",F,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.15, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total time to empty the cistern is 18.0 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f1=10; #time for 1st pipe(minutes)\n", + "f2=15; #time for 2nd pipe(minutes)\n", + "tex=2; #extra time taken to fill(minutes)\n", + "\n", + "#Calculation\n", + "T=f1*f2/(f1+f2); #total time to fill(minutes)\n", + "E=T**2/tex; #total time to empty the cistern(minutes)\n", + "\n", + "#Result\n", + "print \"total time to empty the cistern is\",E,\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.16, Page number 12.9" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of filling pipes are 4.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=9; #fill rate(hours)\n", + "e=6; #empty rate(hours)\n", + "F=9; #total time(hours)\n", + "\n", + "#Calculation\n", + "a=(1/F)+1;\n", + "nf=a*f*e/(f+e); #number of filling pipes\n", + "\n", + "#Result\n", + "print \"number of filling pipes are\",nf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.17, Page number 12.10" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average sailing rate is 5.5 km/h\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ra=2/6; #rate of admission of water(tonnes/min)\n", + "rp=12/60; #rate of pumping out water(tonnes/min)\n", + "q=80; #quantity of water(tonnes)\n", + "d=55; #distance(km)\n", + "\n", + "#Calculation\n", + "r=ra-rp; #rate of accumulation(tonnes/min)\n", + "T=q/(r*60); #time to accumulate water(hours)\n", + "Asr=d/T; #average sailing rate(km/h)\n", + "\n", + "#Result\n", + "print \"average sailing rate is\",Asr,\"km/h\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12.18, Page number 12.10" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time before the full flow began is 4.5 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p1=7/8; #part1\n", + "p2=5/6; #part2\n", + "t1=12; #time(minutes)\n", + "t2=16; #time(minutes)\n", + "t=3; #time(minutes)\n", + "\n", + "#Calculation\n", + "a=(p1/t1)+(p2/t2);\n", + "b=1-(t/t1)-(t/t2);\n", + "x=b/a; #time before the full flow began(minutes)\n", + "\n", + "#Result\n", + "print \"time before the full flow began is\",x,\"minutes\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13.ipynb new file mode 100755 index 00000000..306b8075 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13.ipynb @@ -0,0 +1,1048 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 13: Profit and Loss" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.1, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss in 1st case is 29 Rs\n", + "gain in 2nd case is 20 Rs\n", + "loss in 3rd case is 25.0 %\n", + "gain in 4th case is 25.0 %\n", + "SP in 5th case is 99.0 Rs\n", + "SP in 6th case is 15.0 Rs\n", + "CP in 7th case is 70.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=125; #CP of 1st article(Rs)\n", + "S1=96; #SP of 1st article(Rs)\n", + "C2=112; #CP of 2nd article(Rs)\n", + "S2=132; #SP of 2nd article(Rs)\n", + "C3=120; #CP of 3rd article(Rs)\n", + "S3=90; #SP of 3rd article(Rs)\n", + "C4=80; #CP of 4th article(Rs)\n", + "S4=100; #SP of 4th article(Rs)\n", + "C5=90; #CP of 5th article(Rs)\n", + "G5=10; #gain(%)\n", + "L6=25; #loss(%)\n", + "C6=20; #CP of 6th article(Rs)\n", + "S7=84; #SP of 7th article(Rs)\n", + "G7=20; #gain(%)\n", + "\n", + "#Calculation\n", + "x1=S1-C1;\n", + "L1=-x1; #loss in 1st case(Rs)\n", + "x2=S2-C2;\n", + "G2=x2; #gain in 2nd case\n", + "x3=S3-C3;\n", + "L3=-x3*100/C3; #loss in 3rd case(%)\n", + "x4=S4-C4;\n", + "G4=x4*100/C4; #gain in 4th case(%)\n", + "S5=(100+G5)*C5/100; #SP in 5th case(Rs)\n", + "S6=(100-L6)*C6/100; #SP in 6th case(Rs)\n", + "C7=S7/(1+(G7*0.01)); #CP in 7th case(Rs) \n", + "\n", + "#Result\n", + "print \"loss in 1st case is\",L1,\"Rs\"\n", + "print \"gain in 2nd case is\",G2,\"Rs\"\n", + "print \"loss in 3rd case is\",L3,\"%\"\n", + "print \"gain in 4th case is\",G4,\"%\"\n", + "print \"SP in 5th case is\",S5,\"Rs\"\n", + "print \"SP in 6th case is\",S6,\"Rs\"\n", + "print \"CP in 7th case is\",C7,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.2, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "SP of 2nd article is 750.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=450; #SP of 1st article(Rs)\n", + "x1=25; #loss(%)\n", + "x2=25; #gain(%)\n", + "\n", + "#Calculation\n", + "S2=S1*(100+x2)/(100-x1); #SP of 2nd article(Rs)\n", + "\n", + "#Result\n", + "print \"SP of 2nd article is\",S2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.3, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain in transaction is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=25; #number of articles on CP\n", + "N=20; #number of articles on SP\n", + "\n", + "#Calculation\n", + "x=(n-N)*100/N; #gain in transaction(%)\n", + "\n", + "#Result\n", + "print \"gain in transaction is\",x,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.4, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oranges per rupee is 32.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=1/36; #SP of 1st article(Rs)\n", + "x1=4; #loss(%)\n", + "x2=8; #gain(%)\n", + "\n", + "#Calculation\n", + "S2=S1*(100+x2)/(100-x1); #SP of 2nd article(Rs)\n", + "n=1/S2; #number of oranges per rupee\n", + " \n", + "#Result\n", + "print \"number of oranges per rupee is\",n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.5, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sale rate of rice is Rs 50.0 per kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "q1=2; #quantity(kg)\n", + "q2=10; #quantity(kg)\n", + "C=600; #cost price(Rs)\n", + "\n", + "#Calculation\n", + "S=C/(q1+q2); #sale rate of rice(Rs)\n", + "\n", + "#Result\n", + "print \"sale rate of rice is Rs\",S,\"per kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.6, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 11.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=455; #SP of 1st article(Rs)\n", + "S2=555; #SP of 2nd article(Rs)\n", + "x1=9; #loss(%)\n", + "\n", + "#Calculation\n", + "x2=(S2*(100-x1)/S1)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",x2,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.7, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "real profit is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p=20; #profit on SP(%)\n", + "\n", + "#Calculation\n", + "rp=p*100/(100-p); #real profit(%)\n", + "\n", + "#Result\n", + "print \"real profit is\",rp,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.8, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "real loss is 9.09 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=-10; #loss on SP(%)\n", + "\n", + "#Calculation\n", + "rl=-l*100/(100-l); #real loss(%)\n", + "\n", + "#Result\n", + "print \"real loss is\",round(rl,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.9, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage increase of MP is 40.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=10; #discount(%)\n", + "g=26; #profit(%)\n", + "C=1; #assume\n", + "\n", + "#Calculation\n", + "x=C*(100+g)/(100-d); \n", + "M=(x-1)*100; #percentage increase of MP(%)\n", + "\n", + "#Result\n", + "print \"percentage increase of MP is\",M,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.10, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 8.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=30; #SP of 1st article(Rs)\n", + "x1=20; #gain(%)\n", + "d=10/100; #discount\n", + "\n", + "#Calculation\n", + "S2=S1*(1-d); #SP of 2nd article(Rs)\n", + "x2=(S2*(100+x1)/S1)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",x2,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.11, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oranges per rupee is 14.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=40; #gain(%)\n", + "S=1/10; #SP of article(Rs)\n", + "\n", + "#Calculation\n", + "y=(x/100)+1;\n", + "C=S/y; #CP of article(Rs)\n", + "n=1/C; #number of oranges per rupee\n", + "\n", + "#Result\n", + "print \"number of oranges per rupee is\",n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.12, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 50.0 %\n", + "number of oranges is 312.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "SP=1/4; #SP of article\n", + "CP=1/6; #CP of article\n", + "tg=26; #total gain(Rs)\n", + "\n", + "#Calculation\n", + "g=(SP-CP)*100/CP; #gain(%)\n", + "x=tg/(SP-CP); #number of oranges\n", + "\n", + "#Result\n", + "print \"gain is\",g,\"%\"\n", + "print \"number of oranges is\",x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.13, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 11.11 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=0;\n", + "Tw=1000; #true weight(kg)\n", + "Fw=900; #false weight(kg)\n", + "\n", + "#Calculation\n", + "G=(Tw*(100+x)/Fw)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(G,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.14, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false scale length is 78.26 cm\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", + "Ts=100; #true scale(cm)\n", + "G=15; #gain(%)\n", + "x=10; #loss(%)\n", + "\n", + "#Calculation\n", + "l=Ts*(100-x)/(100+G); #false scale length(cm)\n", + "\n", + "#Result\n", + "print \"false scale length is\",round(l,2),\"cm\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.15, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 96.56 %\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", + "x1=25; #gain(%)\n", + "x2=-20; #loss(%)\n", + "\n", + "#Calculation\n", + "x=2*(100+x1)*(100+x2);\n", + "y=100+x1+100+x2;\n", + "g=(x/y)-1; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(g,2),\"%\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.16, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "overall loss is -1.44 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=12; #loss or gain(%)\n", + "\n", + "#Calculation\n", + "l=-(x/10)**2; #overall loss(%)\n", + "\n", + "#Result\n", + "print \"overall loss is\",l,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.17, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of 1st watch is 224.0 Rs\n", + "cost price of 2nd watch is 336.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=10/100; #loss\n", + "C2=15/100; #profit\n", + "C=560; #cost(Rs)\n", + "\n", + "#Calculation\n", + "C1=C1*C/(C1+C2); #cost price of 1st watch(Rs)\n", + "C2=C-C1; #cost price of 2nd watch(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of 1st watch is\",C1,\"Rs\"\n", + "print \"cost price of 2nd watch is\",C2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.18, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of book is 90.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=100; #CP of book(Rs)\n", + "p1=20/100; #profit\n", + "C2=80; #assume 20% less\n", + "p2=25/100; #profit in 2nd case\n", + "d=18; #given difference(Rs)\n", + "\n", + "#Calculation\n", + "S1=C1*(1+p1); #selling price of book(Rs)\n", + "S2=C2*(1+p2); #selling price in 2nd case(Rs)\n", + "S=S1-S2; #difference when CP=100(Rs)\n", + "CP=d*C1/S; #cost price of book(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of book is\",CP,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.19, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of the book is 420.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=16; #discount(%)\n", + "M_S=80; #cost(Rs)\n", + "\n", + "#Calculation\n", + "S=(100-d)*M_S/d; #cost price of the book(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of the book is\",S,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.20, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain in transaction is 11.11 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=30; #number of articles on CP\n", + "N=27; #number of articles on SP\n", + "\n", + "#Calculation\n", + "x=(n-N)*100/N; #gain in transaction(%)\n", + "\n", + "#Result\n", + "print \"gain in transaction is\",round(x,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.21, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "selling price of salt is 88.0 paise per kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=80; #quantity(kg)\n", + "y=20; #quantity(kg)\n", + "C=88; #cost price(Rs)\n", + "\n", + "#Calculation\n", + "S=C/(x+y); #selling price of salt(Rs)\n", + "\n", + "#Result\n", + "print \"selling price of salt is\",S*100,\"paise per kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.22, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "profit on the article is 20.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=10; #loss(%)\n", + "f=3/4; #fraction \n", + "\n", + "#Calculation\n", + "SP=(100-l)/f; #ratio of SP to CP(%)\n", + "p=SP-100; #profit on the article(%)\n", + "\n", + "#Result\n", + "print \"profit on the article is\",p,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.23, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 50.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=66; #length of cloth(m)\n", + "x=22; #gain in length(m)\n", + "\n", + "#Calculation\n", + "g=x*100/(N-x); #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",g,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.24, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 33.33 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=66; #length of cloth(m)\n", + "Y=22; #gain in length(m)\n", + "\n", + "#Calculation\n", + "g=Y*100/N; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(g,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.25, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=-22; #loss in length(m)\n", + "N=66; #length of cloth(m)\n", + "\n", + "#Calculation\n", + "l=-x*100/(N-x); #loss(%)\n", + "\n", + "#Result\n", + "print \"loss is\",l,\"%\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb new file mode 100644 index 00000000..306b8075 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter13_1.ipynb @@ -0,0 +1,1048 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 13: Profit and Loss" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.1, Page number 13.6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss in 1st case is 29 Rs\n", + "gain in 2nd case is 20 Rs\n", + "loss in 3rd case is 25.0 %\n", + "gain in 4th case is 25.0 %\n", + "SP in 5th case is 99.0 Rs\n", + "SP in 6th case is 15.0 Rs\n", + "CP in 7th case is 70.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=125; #CP of 1st article(Rs)\n", + "S1=96; #SP of 1st article(Rs)\n", + "C2=112; #CP of 2nd article(Rs)\n", + "S2=132; #SP of 2nd article(Rs)\n", + "C3=120; #CP of 3rd article(Rs)\n", + "S3=90; #SP of 3rd article(Rs)\n", + "C4=80; #CP of 4th article(Rs)\n", + "S4=100; #SP of 4th article(Rs)\n", + "C5=90; #CP of 5th article(Rs)\n", + "G5=10; #gain(%)\n", + "L6=25; #loss(%)\n", + "C6=20; #CP of 6th article(Rs)\n", + "S7=84; #SP of 7th article(Rs)\n", + "G7=20; #gain(%)\n", + "\n", + "#Calculation\n", + "x1=S1-C1;\n", + "L1=-x1; #loss in 1st case(Rs)\n", + "x2=S2-C2;\n", + "G2=x2; #gain in 2nd case\n", + "x3=S3-C3;\n", + "L3=-x3*100/C3; #loss in 3rd case(%)\n", + "x4=S4-C4;\n", + "G4=x4*100/C4; #gain in 4th case(%)\n", + "S5=(100+G5)*C5/100; #SP in 5th case(Rs)\n", + "S6=(100-L6)*C6/100; #SP in 6th case(Rs)\n", + "C7=S7/(1+(G7*0.01)); #CP in 7th case(Rs) \n", + "\n", + "#Result\n", + "print \"loss in 1st case is\",L1,\"Rs\"\n", + "print \"gain in 2nd case is\",G2,\"Rs\"\n", + "print \"loss in 3rd case is\",L3,\"%\"\n", + "print \"gain in 4th case is\",G4,\"%\"\n", + "print \"SP in 5th case is\",S5,\"Rs\"\n", + "print \"SP in 6th case is\",S6,\"Rs\"\n", + "print \"CP in 7th case is\",C7,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.2, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "SP of 2nd article is 750.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=450; #SP of 1st article(Rs)\n", + "x1=25; #loss(%)\n", + "x2=25; #gain(%)\n", + "\n", + "#Calculation\n", + "S2=S1*(100+x2)/(100-x1); #SP of 2nd article(Rs)\n", + "\n", + "#Result\n", + "print \"SP of 2nd article is\",S2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.3, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain in transaction is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=25; #number of articles on CP\n", + "N=20; #number of articles on SP\n", + "\n", + "#Calculation\n", + "x=(n-N)*100/N; #gain in transaction(%)\n", + "\n", + "#Result\n", + "print \"gain in transaction is\",x,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.4, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oranges per rupee is 32.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=1/36; #SP of 1st article(Rs)\n", + "x1=4; #loss(%)\n", + "x2=8; #gain(%)\n", + "\n", + "#Calculation\n", + "S2=S1*(100+x2)/(100-x1); #SP of 2nd article(Rs)\n", + "n=1/S2; #number of oranges per rupee\n", + " \n", + "#Result\n", + "print \"number of oranges per rupee is\",n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.5, Page number 13.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sale rate of rice is Rs 50.0 per kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "q1=2; #quantity(kg)\n", + "q2=10; #quantity(kg)\n", + "C=600; #cost price(Rs)\n", + "\n", + "#Calculation\n", + "S=C/(q1+q2); #sale rate of rice(Rs)\n", + "\n", + "#Result\n", + "print \"sale rate of rice is Rs\",S,\"per kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.6, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 11.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=455; #SP of 1st article(Rs)\n", + "S2=555; #SP of 2nd article(Rs)\n", + "x1=9; #loss(%)\n", + "\n", + "#Calculation\n", + "x2=(S2*(100-x1)/S1)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",x2,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.7, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "real profit is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p=20; #profit on SP(%)\n", + "\n", + "#Calculation\n", + "rp=p*100/(100-p); #real profit(%)\n", + "\n", + "#Result\n", + "print \"real profit is\",rp,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.8, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "real loss is 9.09 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=-10; #loss on SP(%)\n", + "\n", + "#Calculation\n", + "rl=-l*100/(100-l); #real loss(%)\n", + "\n", + "#Result\n", + "print \"real loss is\",round(rl,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.9, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage increase of MP is 40.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=10; #discount(%)\n", + "g=26; #profit(%)\n", + "C=1; #assume\n", + "\n", + "#Calculation\n", + "x=C*(100+g)/(100-d); \n", + "M=(x-1)*100; #percentage increase of MP(%)\n", + "\n", + "#Result\n", + "print \"percentage increase of MP is\",M,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.10, Page number 13.8" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 8.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "S1=30; #SP of 1st article(Rs)\n", + "x1=20; #gain(%)\n", + "d=10/100; #discount\n", + "\n", + "#Calculation\n", + "S2=S1*(1-d); #SP of 2nd article(Rs)\n", + "x2=(S2*(100+x1)/S1)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",x2,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.11, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oranges per rupee is 14.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=40; #gain(%)\n", + "S=1/10; #SP of article(Rs)\n", + "\n", + "#Calculation\n", + "y=(x/100)+1;\n", + "C=S/y; #CP of article(Rs)\n", + "n=1/C; #number of oranges per rupee\n", + "\n", + "#Result\n", + "print \"number of oranges per rupee is\",n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.12, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 50.0 %\n", + "number of oranges is 312.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "SP=1/4; #SP of article\n", + "CP=1/6; #CP of article\n", + "tg=26; #total gain(Rs)\n", + "\n", + "#Calculation\n", + "g=(SP-CP)*100/CP; #gain(%)\n", + "x=tg/(SP-CP); #number of oranges\n", + "\n", + "#Result\n", + "print \"gain is\",g,\"%\"\n", + "print \"number of oranges is\",x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.13, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 11.11 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=0;\n", + "Tw=1000; #true weight(kg)\n", + "Fw=900; #false weight(kg)\n", + "\n", + "#Calculation\n", + "G=(Tw*(100+x)/Fw)-100; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(G,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.14, Page number 13.9" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false scale length is 78.26 cm\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", + "Ts=100; #true scale(cm)\n", + "G=15; #gain(%)\n", + "x=10; #loss(%)\n", + "\n", + "#Calculation\n", + "l=Ts*(100-x)/(100+G); #false scale length(cm)\n", + "\n", + "#Result\n", + "print \"false scale length is\",round(l,2),\"cm\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.15, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 96.56 %\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", + "x1=25; #gain(%)\n", + "x2=-20; #loss(%)\n", + "\n", + "#Calculation\n", + "x=2*(100+x1)*(100+x2);\n", + "y=100+x1+100+x2;\n", + "g=(x/y)-1; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(g,2),\"%\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.16, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "overall loss is -1.44 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=12; #loss or gain(%)\n", + "\n", + "#Calculation\n", + "l=-(x/10)**2; #overall loss(%)\n", + "\n", + "#Result\n", + "print \"overall loss is\",l,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.17, Page number 13.10" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of 1st watch is 224.0 Rs\n", + "cost price of 2nd watch is 336.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=10/100; #loss\n", + "C2=15/100; #profit\n", + "C=560; #cost(Rs)\n", + "\n", + "#Calculation\n", + "C1=C1*C/(C1+C2); #cost price of 1st watch(Rs)\n", + "C2=C-C1; #cost price of 2nd watch(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of 1st watch is\",C1,\"Rs\"\n", + "print \"cost price of 2nd watch is\",C2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.18, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of book is 90.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C1=100; #CP of book(Rs)\n", + "p1=20/100; #profit\n", + "C2=80; #assume 20% less\n", + "p2=25/100; #profit in 2nd case\n", + "d=18; #given difference(Rs)\n", + "\n", + "#Calculation\n", + "S1=C1*(1+p1); #selling price of book(Rs)\n", + "S2=C2*(1+p2); #selling price in 2nd case(Rs)\n", + "S=S1-S2; #difference when CP=100(Rs)\n", + "CP=d*C1/S; #cost price of book(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of book is\",CP,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.19, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost price of the book is 420.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=16; #discount(%)\n", + "M_S=80; #cost(Rs)\n", + "\n", + "#Calculation\n", + "S=(100-d)*M_S/d; #cost price of the book(Rs)\n", + "\n", + "#Result\n", + "print \"cost price of the book is\",S,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.20, Page number 13.11" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain in transaction is 11.11 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=30; #number of articles on CP\n", + "N=27; #number of articles on SP\n", + "\n", + "#Calculation\n", + "x=(n-N)*100/N; #gain in transaction(%)\n", + "\n", + "#Result\n", + "print \"gain in transaction is\",round(x,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.21, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "selling price of salt is 88.0 paise per kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=80; #quantity(kg)\n", + "y=20; #quantity(kg)\n", + "C=88; #cost price(Rs)\n", + "\n", + "#Calculation\n", + "S=C/(x+y); #selling price of salt(Rs)\n", + "\n", + "#Result\n", + "print \"selling price of salt is\",S*100,\"paise per kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.22, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "profit on the article is 20.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=10; #loss(%)\n", + "f=3/4; #fraction \n", + "\n", + "#Calculation\n", + "SP=(100-l)/f; #ratio of SP to CP(%)\n", + "p=SP-100; #profit on the article(%)\n", + "\n", + "#Result\n", + "print \"profit on the article is\",p,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.23, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 50.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=66; #length of cloth(m)\n", + "x=22; #gain in length(m)\n", + "\n", + "#Calculation\n", + "g=x*100/(N-x); #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",g,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.24, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain is 33.33 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=66; #length of cloth(m)\n", + "Y=22; #gain in length(m)\n", + "\n", + "#Calculation\n", + "g=Y*100/N; #gain(%)\n", + "\n", + "#Result\n", + "print \"gain is\",round(g,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13.25, Page number 13.12" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss is 25.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=-22; #loss in length(m)\n", + "N=66; #length of cloth(m)\n", + "\n", + "#Calculation\n", + "l=-x*100/(N-x); #loss(%)\n", + "\n", + "#Result\n", + "print \"loss is\",l,\"%\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14.ipynb new file mode 100755 index 00000000..89228f7b --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14.ipynb @@ -0,0 +1,714 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 14: Simple Interest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.1, Page number 14.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "simple interest in 1st case is 800.0 Rs\n", + "simple interest in 2nd case is 10.0 Rs\n", + "simple interest in 3rd case is 72.0 Rs\n", + "simple interest in 4th case is 50.0 Rs\n", + "simple interest in 5th case is 8.0 Rs\n", + "simple interest in 6th case is 24.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=1000; #principal(Rs)\n", + "R1=20; #rate(%)\n", + "T1=4; #time(years)\n", + "P2=600; #principal(Rs)\n", + "R2=5; #rate(%)\n", + "T2=4/12; #time(years)\n", + "P3=200; #principal(Rs)\n", + "R3=6*2; #rate(%)\n", + "T3=3; #time(years)\n", + "P4=500; #principal(Rs)\n", + "R4=2*2; #rate(%)\n", + "T4=5/2; #time(years)\n", + "P5=400; #principal(Rs)\n", + "R5=3*4; #rate(%)\n", + "T5=2/12; #time(years)\n", + "P6=730; #principal(Rs)\n", + "R6=10; #rate(%)\n", + "T6=120/365; #time(years)\n", + "\n", + "#Calculation\n", + "SI1=P1*T1*R1/100; #simple interest in 1st case(Rs)\n", + "SI2=P2*T2*R2/100; #simple interest in 2nd case(Rs)\n", + "SI3=P3*T3*R3/100; #simple interest in 3rd case(Rs)\n", + "SI4=P4*T4*R4/100; #simple interest in 4th case(Rs)\n", + "SI5=P5*T5*R5/100; #simple interest in 5th case(Rs)\n", + "SI6=P6*T6*R6/100; #simple interest in 1st case(Rs)\n", + "\n", + "#Result\n", + "print \"simple interest in 1st case is\",SI1,\"Rs\"\n", + "print \"simple interest in 2nd case is\",SI2,\"Rs\"\n", + "print \"simple interest in 3rd case is\",SI3,\"Rs\"\n", + "print \"simple interest in 4th case is\",SI4,\"Rs\"\n", + "print \"simple interest in 5th case is\",SI5,\"Rs\"\n", + "print \"simple interest in 6th case is\",SI6,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.2, Page number 14.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount in 1st case is 106.0 Rs\n", + "amount in 2nd case is 510.0 Rs\n", + "amount in 3rd case is 406.0 Rs\n", + "time in 4th case is 5.0 years\n", + "simple interest in 5th case is 120.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=100; #principal(Rs)\n", + "R1=3; #rate(%)\n", + "T1=2; #time(years)\n", + "P2=500; #principal(Rs)\n", + "R2=6; #rate(%)\n", + "T2=4/12; #time(years)\n", + "P3=400; #principal(Rs)\n", + "R3=3.65; #rate(%)\n", + "T3=150/365; #time(years)\n", + "A4=540; #amount(Rs)\n", + "R4=5; #rate(%)\n", + "SI4=108; #simple interest(Rs)\n", + "A5=1120; #amount(Rs) \n", + "R5=5; #rate(%)\n", + "T5=12/5; #time(years)\n", + "\n", + "#Calculation\n", + "A1=P1*(1+(R1*T1/100)); #amount in 1st case(Rs) \n", + "A2=P2*(1+(R2*T2/100)); #amount in 2nd case(Rs) \n", + "A3=P3*(1+(R3*T3/100)); #amount in 3rd case(Rs) \n", + "x=(A4/SI4)-1;\n", + "T4=100/(x*R4); #time in 4th case(years)\n", + "y=(100/(R5*T5))+1;\n", + "SI5=A5/y; #simple interest in 5th case(Rs)\n", + "\n", + "#Result\n", + "print \"amount in 1st case is\",A1,\"Rs\"\n", + "print \"amount in 2nd case is\",A2,\"Rs\"\n", + "print \"amount in 3rd case is\",A3,\"Rs\"\n", + "print \"time in 4th case is\",T4,\"years\"\n", + "print \"simple interest in 5th case is\",SI5,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.3, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "SI=810; #simple interest(Rs)\n", + "R=9; #rate(%)\n", + "T=6; #time(years)\n", + "\n", + "#Calculation\n", + "P=100*SI/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.4, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 12 1/2 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "T=8; #time(years)\n", + "N=2; #number of times\n", + "\n", + "#Calculation\n", + "R=100*(N-1)/T; #rate(%)\n", + "x=R-int(R);\n", + "\n", + "#Result\n", + "print \"rate is\",int(R),Fraction(x),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.5, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 600.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5/2; #rate(%)\n", + "T=2; #time(years)\n", + "A=630; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=A/(1+(R*T/100)); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.6, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 600.0 Rs\n", + "rate is 10.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=2; #time(years)\n", + "A1=720; #amount(Rs)\n", + "T2=2+5; #time(years)\n", + "A2=1020; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=((A1*T2)-(A2*T1))/(T2-T1); #principal(Rs)\n", + "R=(A2-A1)*100/((A1*T2)-(A2*T1)); #rate(%)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"\n", + "print \"rate is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.7, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 8.0 %\n", + "time is 8.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1; #assume\n", + "SI=16*P/25;\n", + "\n", + "#Calculation\n", + "#given T=R\n", + "R_2=SI*100;\n", + "R=math.sqrt(R_2); #rate(%)\n", + "T=R; #time(years)\n", + "\n", + "#Result\n", + "print \"rate is\",R,\"%\"\n", + "print \"time is\",T,\"years\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.8, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum at 5% is 2125.0 Rs\n", + "sum at 7% is 375.0 Rs\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=2500; #principal(Rs)\n", + "SI=265; #simple interest(Rs)\n", + "T=2; #time(years)\n", + "r1=5; #rate(%)\n", + "r2=7; #rate(%)\n", + "\n", + "#Calculation\n", + "Rm=100*SI/(T*P); #rate of interest(%)\n", + "S1=r2-Rm; #sum borrowed at 5%\n", + "S2=Rm-r1; #sum borrowed at 7%\n", + "S_5=S1*P/(S1+S2); #sum at 5%(Rs)\n", + "S_7=S2*P/(S1+S2); #sum at 7%(Rs)\n", + "\n", + "#Result\n", + "print \"sum at 5% is\",S_5,\"Rs\"\n", + "print \"sum at 7% is\",S_7,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.9, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 5000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p1=1/3; #1st part\n", + "p2=1/6; #2nd part\n", + "r1=3; #rate(%)\n", + "r2=6; #rate(%)\n", + "r3=8; #rate(%)\n", + "SI=600; #simple interest(Rs)\n", + "T=2; #time(years)\n", + "\n", + "#Calculation\n", + "p3=1-(p1+p2); #rest part\n", + "R=(p1*r1)+(p2*r2)+(p3*r3); #average rate(%)\n", + "P=100*SI/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.10, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual installment is Rs 700.0 per year\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=4200; #debt(Rs)\n", + "n=5; #number of years\n", + "y=1;\n", + "r=10; #rate(%)\n", + "\n", + "#Calculation\n", + "x=n*(n-1)/2;\n", + "z=x*r/(100*y);\n", + "a=M/(n+z); #annual installment(Rs)\n", + "\n", + "#Result\n", + "print \"annual installment is Rs\",a,\"per year\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.11, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 400.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=2; #debt(Rs)\n", + "n=3; #number of years\n", + "y=12;\n", + "a=1; #annual installment(Rs)\n", + "\n", + "#Calculation\n", + "x=n*(n-1)/2;\n", + "z=x*a/(100*y);\n", + "r=(-M+(n*a))/z; #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",r,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.12, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount is 122.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=R2=1; #assume\n", + "T1=3; #time(years)\n", + "A1=95; #amount(Rs)\n", + "T2=5; #time(years)\n", + "P1=85; #principal(Rs)\n", + "P2=102; #principal(Rs)\n", + "\n", + "#Calculation\n", + "A2=((A1-P1)*P2*T2*R2/(P1*R1*T1))+P2; #amount(Rs)\n", + "\n", + "#Result\n", + "print \"amount is\",A2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.13, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 700.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1_R2=2; #change in rate(%)\n", + "SI1_SI2=56; #change in simple interest(Rs)\n", + "T=4; #time(years)\n", + "\n", + "#Calculation\n", + "P=100*SI1_SI2/(R1_R2*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.14, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum lent out is 600.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=8; #rate(%)\n", + "R2=1/2; #rate(%)\n", + "T1=5; #time(years)\n", + "T2=15; #time(years)\n", + "P=3800; #principal(Rs) \n", + "\n", + "P1=T2; #principal(Rs)\n", + "P2=2*R1*T1; #principal(Rs)\n", + "P1=P1*P/(P1+P2); #sum lent out(Rs)\n", + "\n", + "#Result\n", + "print \"sum lent out is\",P1,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.15, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 13.33 Rs\n", + "time is 100.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=5; #rate(%)\n", + "A1=80; #amount(Rs)\n", + "R2=2; #rate(%)\n", + "A2=40; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=((A1*R2)-(A2*R1))/(R2-R1); #principal(Rs)\n", + "T=(A2-A1)*100/((A1*R2)-(A2*R1)); #time(years)\n", + "\n", + "#Result\n", + "print \"principal is\",round(P,2),\"Rs\"\n", + "print \"time is\",T,\"years\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb new file mode 100644 index 00000000..89228f7b --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter14_1.ipynb @@ -0,0 +1,714 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 14: Simple Interest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.1, Page number 14.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "simple interest in 1st case is 800.0 Rs\n", + "simple interest in 2nd case is 10.0 Rs\n", + "simple interest in 3rd case is 72.0 Rs\n", + "simple interest in 4th case is 50.0 Rs\n", + "simple interest in 5th case is 8.0 Rs\n", + "simple interest in 6th case is 24.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=1000; #principal(Rs)\n", + "R1=20; #rate(%)\n", + "T1=4; #time(years)\n", + "P2=600; #principal(Rs)\n", + "R2=5; #rate(%)\n", + "T2=4/12; #time(years)\n", + "P3=200; #principal(Rs)\n", + "R3=6*2; #rate(%)\n", + "T3=3; #time(years)\n", + "P4=500; #principal(Rs)\n", + "R4=2*2; #rate(%)\n", + "T4=5/2; #time(years)\n", + "P5=400; #principal(Rs)\n", + "R5=3*4; #rate(%)\n", + "T5=2/12; #time(years)\n", + "P6=730; #principal(Rs)\n", + "R6=10; #rate(%)\n", + "T6=120/365; #time(years)\n", + "\n", + "#Calculation\n", + "SI1=P1*T1*R1/100; #simple interest in 1st case(Rs)\n", + "SI2=P2*T2*R2/100; #simple interest in 2nd case(Rs)\n", + "SI3=P3*T3*R3/100; #simple interest in 3rd case(Rs)\n", + "SI4=P4*T4*R4/100; #simple interest in 4th case(Rs)\n", + "SI5=P5*T5*R5/100; #simple interest in 5th case(Rs)\n", + "SI6=P6*T6*R6/100; #simple interest in 1st case(Rs)\n", + "\n", + "#Result\n", + "print \"simple interest in 1st case is\",SI1,\"Rs\"\n", + "print \"simple interest in 2nd case is\",SI2,\"Rs\"\n", + "print \"simple interest in 3rd case is\",SI3,\"Rs\"\n", + "print \"simple interest in 4th case is\",SI4,\"Rs\"\n", + "print \"simple interest in 5th case is\",SI5,\"Rs\"\n", + "print \"simple interest in 6th case is\",SI6,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.2, Page number 14.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount in 1st case is 106.0 Rs\n", + "amount in 2nd case is 510.0 Rs\n", + "amount in 3rd case is 406.0 Rs\n", + "time in 4th case is 5.0 years\n", + "simple interest in 5th case is 120.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=100; #principal(Rs)\n", + "R1=3; #rate(%)\n", + "T1=2; #time(years)\n", + "P2=500; #principal(Rs)\n", + "R2=6; #rate(%)\n", + "T2=4/12; #time(years)\n", + "P3=400; #principal(Rs)\n", + "R3=3.65; #rate(%)\n", + "T3=150/365; #time(years)\n", + "A4=540; #amount(Rs)\n", + "R4=5; #rate(%)\n", + "SI4=108; #simple interest(Rs)\n", + "A5=1120; #amount(Rs) \n", + "R5=5; #rate(%)\n", + "T5=12/5; #time(years)\n", + "\n", + "#Calculation\n", + "A1=P1*(1+(R1*T1/100)); #amount in 1st case(Rs) \n", + "A2=P2*(1+(R2*T2/100)); #amount in 2nd case(Rs) \n", + "A3=P3*(1+(R3*T3/100)); #amount in 3rd case(Rs) \n", + "x=(A4/SI4)-1;\n", + "T4=100/(x*R4); #time in 4th case(years)\n", + "y=(100/(R5*T5))+1;\n", + "SI5=A5/y; #simple interest in 5th case(Rs)\n", + "\n", + "#Result\n", + "print \"amount in 1st case is\",A1,\"Rs\"\n", + "print \"amount in 2nd case is\",A2,\"Rs\"\n", + "print \"amount in 3rd case is\",A3,\"Rs\"\n", + "print \"time in 4th case is\",T4,\"years\"\n", + "print \"simple interest in 5th case is\",SI5,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.3, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "SI=810; #simple interest(Rs)\n", + "R=9; #rate(%)\n", + "T=6; #time(years)\n", + "\n", + "#Calculation\n", + "P=100*SI/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.4, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 12 1/2 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "T=8; #time(years)\n", + "N=2; #number of times\n", + "\n", + "#Calculation\n", + "R=100*(N-1)/T; #rate(%)\n", + "x=R-int(R);\n", + "\n", + "#Result\n", + "print \"rate is\",int(R),Fraction(x),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.5, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 600.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5/2; #rate(%)\n", + "T=2; #time(years)\n", + "A=630; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=A/(1+(R*T/100)); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.6, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 600.0 Rs\n", + "rate is 10.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=2; #time(years)\n", + "A1=720; #amount(Rs)\n", + "T2=2+5; #time(years)\n", + "A2=1020; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=((A1*T2)-(A2*T1))/(T2-T1); #principal(Rs)\n", + "R=(A2-A1)*100/((A1*T2)-(A2*T1)); #rate(%)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"\n", + "print \"rate is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.7, Page number 14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 8.0 %\n", + "time is 8.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1; #assume\n", + "SI=16*P/25;\n", + "\n", + "#Calculation\n", + "#given T=R\n", + "R_2=SI*100;\n", + "R=math.sqrt(R_2); #rate(%)\n", + "T=R; #time(years)\n", + "\n", + "#Result\n", + "print \"rate is\",R,\"%\"\n", + "print \"time is\",T,\"years\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.8, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum at 5% is 2125.0 Rs\n", + "sum at 7% is 375.0 Rs\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=2500; #principal(Rs)\n", + "SI=265; #simple interest(Rs)\n", + "T=2; #time(years)\n", + "r1=5; #rate(%)\n", + "r2=7; #rate(%)\n", + "\n", + "#Calculation\n", + "Rm=100*SI/(T*P); #rate of interest(%)\n", + "S1=r2-Rm; #sum borrowed at 5%\n", + "S2=Rm-r1; #sum borrowed at 7%\n", + "S_5=S1*P/(S1+S2); #sum at 5%(Rs)\n", + "S_7=S2*P/(S1+S2); #sum at 7%(Rs)\n", + "\n", + "#Result\n", + "print \"sum at 5% is\",S_5,\"Rs\"\n", + "print \"sum at 7% is\",S_7,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.9, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 5000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "p1=1/3; #1st part\n", + "p2=1/6; #2nd part\n", + "r1=3; #rate(%)\n", + "r2=6; #rate(%)\n", + "r3=8; #rate(%)\n", + "SI=600; #simple interest(Rs)\n", + "T=2; #time(years)\n", + "\n", + "#Calculation\n", + "p3=1-(p1+p2); #rest part\n", + "R=(p1*r1)+(p2*r2)+(p3*r3); #average rate(%)\n", + "P=100*SI/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.10, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual installment is Rs 700.0 per year\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=4200; #debt(Rs)\n", + "n=5; #number of years\n", + "y=1;\n", + "r=10; #rate(%)\n", + "\n", + "#Calculation\n", + "x=n*(n-1)/2;\n", + "z=x*r/(100*y);\n", + "a=M/(n+z); #annual installment(Rs)\n", + "\n", + "#Result\n", + "print \"annual installment is Rs\",a,\"per year\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.11, Page number 14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 400.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=2; #debt(Rs)\n", + "n=3; #number of years\n", + "y=12;\n", + "a=1; #annual installment(Rs)\n", + "\n", + "#Calculation\n", + "x=n*(n-1)/2;\n", + "z=x*a/(100*y);\n", + "r=(-M+(n*a))/z; #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",r,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.12, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount is 122.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=R2=1; #assume\n", + "T1=3; #time(years)\n", + "A1=95; #amount(Rs)\n", + "T2=5; #time(years)\n", + "P1=85; #principal(Rs)\n", + "P2=102; #principal(Rs)\n", + "\n", + "#Calculation\n", + "A2=((A1-P1)*P2*T2*R2/(P1*R1*T1))+P2; #amount(Rs)\n", + "\n", + "#Result\n", + "print \"amount is\",A2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.13, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 700.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1_R2=2; #change in rate(%)\n", + "SI1_SI2=56; #change in simple interest(Rs)\n", + "T=4; #time(years)\n", + "\n", + "#Calculation\n", + "P=100*SI1_SI2/(R1_R2*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.14, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum lent out is 600.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=8; #rate(%)\n", + "R2=1/2; #rate(%)\n", + "T1=5; #time(years)\n", + "T2=15; #time(years)\n", + "P=3800; #principal(Rs) \n", + "\n", + "P1=T2; #principal(Rs)\n", + "P2=2*R1*T1; #principal(Rs)\n", + "P1=P1*P/(P1+P2); #sum lent out(Rs)\n", + "\n", + "#Result\n", + "print \"sum lent out is\",P1,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14.15, Page number 14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 13.33 Rs\n", + "time is 100.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R1=5; #rate(%)\n", + "A1=80; #amount(Rs)\n", + "R2=2; #rate(%)\n", + "A2=40; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=((A1*R2)-(A2*R1))/(R2-R1); #principal(Rs)\n", + "T=(A2-A1)*100/((A1*R2)-(A2*R1)); #time(years)\n", + "\n", + "#Result\n", + "print \"principal is\",round(P,2),\"Rs\"\n", + "print \"time is\",T,\"years\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15.ipynb new file mode 100755 index 00000000..1809068a --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15.ipynb @@ -0,0 +1,704 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 15: Compound Interest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.1, Page number 15.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount is 4410.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=4000; #principal(Rs)\n", + "R=5; #rate(%)\n", + "T=2; #time(yrs)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "A=P*(1+(R/(100*n)))**(n*T); #amount(Rs)\n", + "\n", + "#Result\n", + "print \"amount is\",A,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.2, Page number 15.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest is 662.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2000; #principal(Rs)\n", + "R=10; #rate(%)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(1+x)**T;\n", + "CI=P*(y-1); #compound interest(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest is\",CI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.3, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 800.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "A=968; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=A/(1+(R/100))**T; #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.4, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest is 4921.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=64000; #principal(Rs)\n", + "R=2.5; #rate(%)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(1+x)**T;\n", + "CI=P*(y-1); #compound interest(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest is\",CI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.5, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest in 1st case is 122 Rs\n", + "compound interest in 2nd case is 121.2 Rs\n", + "answer given in the book is wrong\n", + "compound interest in 3rd case is 119.0 Rs\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", + "P=2000; #principal(Rs)\n", + "R=8; #rate(%)\n", + "T=9/12; #time(yrs)\n", + "n1=4;\n", + "n2=2;\n", + "n3=1;\n", + "\n", + "#Calculation\n", + "A1=P*(1+(R/(100*n1)))**(n1*T); #amount(Rs)\n", + "CI1=A1-P; #compound interest in 1st case(Rs)\n", + "A2=P*(1+(R/(100*n2)))**(n2*T); #amount(Rs)\n", + "CI2=A2-P; #compound interest in 2nd case(Rs)\n", + "A3=P*(1+(R/(100*n3)))**(n3*T); #amount(Rs)\n", + "CI3=A3-P; #compound interest in 3rd case(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest in 1st case is\",int(CI1),\"Rs\"\n", + "print \"compound interest in 2nd case is\",round(CI2,1),\"Rs\"\n", + "print \"answer given in the book is wrong\"\n", + "print \"compound interest in 3rd case is\",round(CI3),\"Rs\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.6, Page number 15.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 31250.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=2; #time(yrs)\n", + "CI_SI=50; #difference between CI and SI(Rs)\n", + "\n", + "#Calculation\n", + "x=(R/100)**2;\n", + "P=CI_SI/x; #sum(Rs)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.7, Page number 15.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference between CI and SI is 20.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "P=2000; #sum(Rs)\n", + "\n", + "#Calculation\n", + "x=(R/100)**2;\n", + "CI_SI=P*x; #difference between CI and SI(Rs)\n", + "\n", + "#Result\n", + "print \"difference between CI and SI is\",CI_SI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.8, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 9.0 %\n", + "sum is 1500.0 Rs\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", + "CI=282.15; #compound interest(Rs)\n", + "SI=270; #simple interest(Rs)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=(CI-SI)*100*T/SI; #rate per annum(%)\n", + "P=100*SI/(R*T); #sum(Rs)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.9, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=3; #time(yrs)\n", + "CI_SI=31/2; #difference between CI and SI(Rs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(x**3)+(T*(x**2));\n", + "P=CI_SI/y; #sum(Rs) \n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.10, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "ValueError", + "evalue": "math domain error", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mValueError\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 11\u001b[0m \u001b[0mDr\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m;\u001b[0m \u001b[1;31m#denominator of fraction\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 12\u001b[0m \u001b[0md\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mNr\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m4\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mDr\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mNr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m;\u001b[0m \u001b[1;31m#discriminant\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 13\u001b[1;33m \u001b[0mq\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mNr\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mmath\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0md\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mDr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m;\u001b[0m \u001b[1;31m#solution\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 14\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 15\u001b[0m \u001b[1;31m#Result\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mValueError\u001b[0m: math domain error" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=434;\n", + "b=272;\n", + "\n", + "#Calculation\n", + "Nr=a-b; #numerator of fraction\n", + "Dr=b; #denominator of fraction\n", + "d=(Nr**2)-(4*Dr*Nr); #discriminant\n", + "q=(-Nr-math.sqrt(d))/(2*Dr); #solution\n", + "\n", + "#Result\n", + "print \"value of q is\",q\n", + "print \"solution for the problem does not exist and the answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.11, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual payment is 18522.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5; #rate(%)\n", + "A=50440; #debt amount(Rs)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=100/(100+R);\n", + "y=x*(1+x+(x**2));\n", + "a=A/y; #annual payment(Rs)\n", + "\n", + "#Result\n", + "print \"annual payment is\",a,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.12, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 5.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1; #assume\n", + "A=1.44*P; #amount(Rs)\n", + "T=2; #time(yrs)\n", + "N=2;\n", + "\n", + "#Calculation\n", + "R=(math.sqrt(A/P)-1)*100; #rate(%)\n", + "T=(N-1)*100/R; #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"years\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.13, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 6.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I2=238.50; #interest in second year(Rs)\n", + "I1=225; #interest in first year(Rs)\n", + "T=1; #time(yrs)\n", + "\n", + "#Calculation\n", + "I=I2-I1; #interest on 1 year(Rs)\n", + "R=100*I/(I1*T); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.14, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 8000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "CI_SI=20; #difference for 2 years(Rs)\n", + "CISI=61; #difference for 3 yrs(Rs)\n", + "T1=2; #time(yrs)\n", + "T2=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=((CISI/CI_SI)-T2)*100; #rate(%)\n", + "P=CI_SI*(100/R)**2; #sum(Rs) \n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.15, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 10.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=3; #time(yrs)\n", + "P=1000; #sum(Rs)\n", + "A=1331; #amount(Rs)\n", + "\n", + "#Calculation\n", + "x=(A/P)**(1/T);\n", + "R=100*(x-1); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.16, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 1.5 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=64000; #sum(Rs)\n", + "CI=4921; #compound interest(Rs)\n", + "R=5; #rate(%)\n", + "n=2;\n", + "\n", + "#Calculation\n", + "A=P+CI; #amount(Rs)\n", + "x=A/P;\n", + "y=(1+(R/(100*n)))**n;\n", + "T=math.log(x)/math.log(y); #time(years)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"years\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb new file mode 100644 index 00000000..6d5a38a5 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter15_1.ipynb @@ -0,0 +1,703 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 15: Compound Interest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.1, Page number 15.4" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount is 4410.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=4000; #principal(Rs)\n", + "R=5; #rate(%)\n", + "T=2; #time(yrs)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "A=P*(1+(R/(100*n)))**(n*T); #amount(Rs)\n", + "\n", + "#Result\n", + "print \"amount is\",A,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.2, Page number 15.4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest is 662.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2000; #principal(Rs)\n", + "R=10; #rate(%)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(1+x)**T;\n", + "CI=P*(y-1); #compound interest(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest is\",CI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.3, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 800.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "A=968; #amount(Rs)\n", + "\n", + "#Calculation\n", + "P=A/(1+(R/100))**T; #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.4, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest is 4921.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=64000; #principal(Rs)\n", + "R=2.5; #rate(%)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(1+x)**T;\n", + "CI=P*(y-1); #compound interest(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest is\",CI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.5, Page number 15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compound interest in 1st case is 122 Rs\n", + "compound interest in 2nd case is 121.2 Rs\n", + "answer given in the book is wrong\n", + "compound interest in 3rd case is 119.0 Rs\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", + "P=2000; #principal(Rs)\n", + "R=8; #rate(%)\n", + "T=9/12; #time(yrs)\n", + "n1=4;\n", + "n2=2;\n", + "n3=1;\n", + "\n", + "#Calculation\n", + "A1=P*(1+(R/(100*n1)))**(n1*T); #amount(Rs)\n", + "CI1=A1-P; #compound interest in 1st case(Rs)\n", + "A2=P*(1+(R/(100*n2)))**(n2*T); #amount(Rs)\n", + "CI2=A2-P; #compound interest in 2nd case(Rs)\n", + "A3=P*(1+(R/(100*n3)))**(n3*T); #amount(Rs)\n", + "CI3=A3-P; #compound interest in 3rd case(Rs)\n", + "\n", + "#Result\n", + "print \"compound interest in 1st case is\",int(CI1),\"Rs\"\n", + "print \"compound interest in 2nd case is\",round(CI2,1),\"Rs\"\n", + "print \"answer given in the book is wrong\"\n", + "print \"compound interest in 3rd case is\",round(CI3),\"Rs\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.6, Page number 15.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 31250.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=2; #time(yrs)\n", + "CI_SI=50; #difference between CI and SI(Rs)\n", + "\n", + "#Calculation\n", + "x=(R/100)**2;\n", + "P=CI_SI/x; #sum(Rs)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.7, Page number 15.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference between CI and SI is 20.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "P=2000; #sum(Rs)\n", + "\n", + "#Calculation\n", + "x=(R/100)**2;\n", + "CI_SI=P*x; #difference between CI and SI(Rs)\n", + "\n", + "#Result\n", + "print \"difference between CI and SI is\",CI_SI,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.8, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 9.0 %\n", + "sum is 1500.0 Rs\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", + "CI=282.15; #compound interest(Rs)\n", + "SI=270; #simple interest(Rs)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=(CI-SI)*100*T/SI; #rate per annum(%)\n", + "P=100*SI/(R*T); #sum(Rs)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.9, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=10; #rate(%)\n", + "T=3; #time(yrs)\n", + "CI_SI=31/2; #difference between CI and SI(Rs)\n", + "\n", + "#Calculation\n", + "x=R/100;\n", + "y=(x**3)+(T*(x**2));\n", + "P=CI_SI/y; #sum(Rs) \n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.10, Page number 15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent is 0.977 %\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", + "a=434;\n", + "b=272;\n", + "\n", + "#Calculation\n", + "Nr=a-b; #numerator of fraction\n", + "Dr=b; #denominator of fraction\n", + "d=(Nr**2)-(4*Dr*Nr); #discriminant\n", + "q=(-Nr-math.sqrt(abs(d)))/(2*Dr); #solution\n", + "R=(-q-1)*100; #rate(%)\n", + "\n", + "#Result\n", + "print \"rate percent is\",round(R,3),\"%\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.11, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual payment is 18522.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5; #rate(%)\n", + "A=50440; #debt amount(Rs)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=100/(100+R);\n", + "y=x*(1+x+(x**2));\n", + "a=A/y; #annual payment(Rs)\n", + "\n", + "#Result\n", + "print \"annual payment is\",a,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.12, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 5.0 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=1; #assume\n", + "A=1.44*P; #amount(Rs)\n", + "T=2; #time(yrs)\n", + "N=2;\n", + "\n", + "#Calculation\n", + "R=(math.sqrt(A/P)-1)*100; #rate(%)\n", + "T=(N-1)*100/R; #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"years\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.13, Page number 15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 6.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I2=238.50; #interest in second year(Rs)\n", + "I1=225; #interest in first year(Rs)\n", + "T=1; #time(yrs)\n", + "\n", + "#Calculation\n", + "I=I2-I1; #interest on 1 year(Rs)\n", + "R=100*I/(I1*T); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.14, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 8000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "CI_SI=20; #difference for 2 years(Rs)\n", + "CISI=61; #difference for 3 yrs(Rs)\n", + "T1=2; #time(yrs)\n", + "T2=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=((CISI/CI_SI)-T2)*100; #rate(%)\n", + "P=CI_SI*(100/R)**2; #sum(Rs) \n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.15, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate per annum is 10.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=3; #time(yrs)\n", + "P=1000; #sum(Rs)\n", + "A=1331; #amount(Rs)\n", + "\n", + "#Calculation\n", + "x=(A/P)**(1/T);\n", + "R=100*(x-1); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"rate per annum is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15.16, Page number 15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 1.5 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=64000; #sum(Rs)\n", + "CI=4921; #compound interest(Rs)\n", + "R=5; #rate(%)\n", + "n=2;\n", + "\n", + "#Calculation\n", + "A=P+CI; #amount(Rs)\n", + "x=A/P;\n", + "y=(1+(R/(100*n)))**n;\n", + "T=math.log(x)/math.log(y); #time(years)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"years\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16.ipynb new file mode 100755 index 00000000..5aea15e0 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16.ipynb @@ -0,0 +1,565 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 16: True Discount" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.1, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 160.0 Rs\n", + "true discount is 16.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=176; #principal(Rs)\n", + "R=6; #rate(%)\n", + "T=20/12; #time(yrs)\n", + "\n", + "#Calculation\n", + "PW=P/(1+(R*T/100)); #present worth(Rs)\n", + "TD=P-PW; #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.2, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 2000.0 Rs\n", + "true discount is 420.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2420; #principal(Rs)\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "PW=P/((1+(R/100))**T); #present worth(Rs)\n", + "TD=P-PW; #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.3, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 3000.0 Rs\n", + "amount of the bill is 3240.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=12; #rate(%)\n", + "T=8/12; #time(yrs)\n", + "TD=240; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "PW=100*TD/(R*T); #present worth(Rs)\n", + "P=PW+TD; #amount of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"amount of the bill is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.4, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference between simple interest and true discount is 32.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=960; #principal(Rs)\n", + "R=5; #rate(%)\n", + "T=4; #time(yrs)\n", + "\n", + "#Calculation\n", + "SI_TD=(P*(R*T)**2)/(100*(100+(R*T))); #difference between simple interest and true discount(Rs)\n", + "\n", + "#Result\n", + "print \"difference between simple interest and true discount is\",SI_TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.5, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 38250.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=6/12; #time(yrs)\n", + "SI_TD=15; #difference between simple interest and true discount(Rs)\n", + "\n", + "#Calculation\n", + "P=SI_TD*100*(100+(R*T))/((R*T)**2); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.6, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 4.0 months\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2040; #principal(Rs)\n", + "R=6; #rate(%)\n", + "TD=40; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "T=100*TD/(R*(P-TD)); #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T*12,\"months\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.7, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 1.11 %\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=1860; #principal(Rs)\n", + "T=3; #time(yrs)\n", + "TD=60; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "R=100*TD/(T*(P-TD)); #rate(%) \n", + "\n", + "#Result\n", + "print \"rate is\",round(R,2),\"%\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.8, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount of the bill is 1575.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=5/12; #time(yrs)\n", + "TD=75; #true discount(Rs)\n", + "R=12; #rate(%)\n", + "\n", + "#Calculation\n", + "P=TD*(1+(100/(R*T))); #amount of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"amount of the bill is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.9, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 600.0 Rs\n", + "rate per annum is 16.67 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD=200; #true discount(Rs)\n", + "SI=300; #simple interest(Rs)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "P=SI*TD/(SI-TD); #sum(Rs)\n", + "R=100*SI/(P*T); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"rate per annum is\",round(R,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.10, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 96.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD1=60; #true discount(Rs)\n", + "T1=1; #assume\n", + "T2=2*T1;\n", + "R1=R2=1; #assume\n", + "P=240; #sum(Rs)\n", + "\n", + "#Calculation\n", + "x=(P-TD1)/(T2*TD1);\n", + "TD2=P/(x+1); #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.11, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent is 18.18 %\n", + "sum of the bill is 1636.36 Rs\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", + "PW1=1500; #present worth(Rs)\n", + "PW2=1200; #present worth(Rs)\n", + "T1=6/12; #time(yrs)\n", + "T2=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=PW1/PW2;\n", + "R=100*(x-1)/(T2-(x*T1)); #rate percent(%)\n", + "P=PW1*(1+(R*T1/100)); #sum of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"rate percent is\",round(R,2),\"%\"\n", + "print \"sum of the bill is\",round(P,2),\"Rs\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.12, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent is 4.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=600; #sum(Rs)\n", + "P2=720; #sum(Rs)\n", + "T=5; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=((P2*T*100/(P1*T))-100)/T; #rate percent(%)\n", + "\n", + "#Result\n", + "print \"rate percent is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.13, Page number 16.8" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "each installment should be 2000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=8480; #sum(Rs)\n", + "n=4; #number of installments\n", + "r=16; #rate percent(%)\n", + "y=4;\n", + "\n", + "#Calculation\n", + "x=r*n*(n-1)/(100*y*2);\n", + "a=P/(x+n); #each installment should be(Rs)\n", + "\n", + "#Result\n", + "print \"each installment should be\",a,\"Rs\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb new file mode 100644 index 00000000..5aea15e0 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter16_1.ipynb @@ -0,0 +1,565 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 16: True Discount" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.1, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 160.0 Rs\n", + "true discount is 16.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=176; #principal(Rs)\n", + "R=6; #rate(%)\n", + "T=20/12; #time(yrs)\n", + "\n", + "#Calculation\n", + "PW=P/(1+(R*T/100)); #present worth(Rs)\n", + "TD=P-PW; #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.2, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 2000.0 Rs\n", + "true discount is 420.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2420; #principal(Rs)\n", + "R=10; #rate(%)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "PW=P/((1+(R/100))**T); #present worth(Rs)\n", + "TD=P-PW; #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.3, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth is 3000.0 Rs\n", + "amount of the bill is 3240.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=12; #rate(%)\n", + "T=8/12; #time(yrs)\n", + "TD=240; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "PW=100*TD/(R*T); #present worth(Rs)\n", + "P=PW+TD; #amount of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"present worth is\",PW,\"Rs\"\n", + "print \"amount of the bill is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.4, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference between simple interest and true discount is 32.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=960; #principal(Rs)\n", + "R=5; #rate(%)\n", + "T=4; #time(yrs)\n", + "\n", + "#Calculation\n", + "SI_TD=(P*(R*T)**2)/(100*(100+(R*T))); #difference between simple interest and true discount(Rs)\n", + "\n", + "#Result\n", + "print \"difference between simple interest and true discount is\",SI_TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.5, Page number 16.5" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 38250.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=6/12; #time(yrs)\n", + "SI_TD=15; #difference between simple interest and true discount(Rs)\n", + "\n", + "#Calculation\n", + "P=SI_TD*100*(100+(R*T))/((R*T)**2); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.6, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 4.0 months\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2040; #principal(Rs)\n", + "R=6; #rate(%)\n", + "TD=40; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "T=100*TD/(R*(P-TD)); #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T*12,\"months\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.7, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 1.11 %\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=1860; #principal(Rs)\n", + "T=3; #time(yrs)\n", + "TD=60; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "R=100*TD/(T*(P-TD)); #rate(%) \n", + "\n", + "#Result\n", + "print \"rate is\",round(R,2),\"%\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.8, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount of the bill is 1575.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=5/12; #time(yrs)\n", + "TD=75; #true discount(Rs)\n", + "R=12; #rate(%)\n", + "\n", + "#Calculation\n", + "P=TD*(1+(100/(R*T))); #amount of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"amount of the bill is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.9, Page number 16.6" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 600.0 Rs\n", + "rate per annum is 16.67 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD=200; #true discount(Rs)\n", + "SI=300; #simple interest(Rs)\n", + "T=3; #time(yrs)\n", + "\n", + "#Calculation\n", + "P=SI*TD/(SI-TD); #sum(Rs)\n", + "R=100*SI/(P*T); #rate per annum(%)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"rate per annum is\",round(R,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.10, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 96.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD1=60; #true discount(Rs)\n", + "T1=1; #assume\n", + "T2=2*T1;\n", + "R1=R2=1; #assume\n", + "P=240; #sum(Rs)\n", + "\n", + "#Calculation\n", + "x=(P-TD1)/(T2*TD1);\n", + "TD2=P/(x+1); #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD2,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.11, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent is 18.18 %\n", + "sum of the bill is 1636.36 Rs\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", + "PW1=1500; #present worth(Rs)\n", + "PW2=1200; #present worth(Rs)\n", + "T1=6/12; #time(yrs)\n", + "T2=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "x=PW1/PW2;\n", + "R=100*(x-1)/(T2-(x*T1)); #rate percent(%)\n", + "P=PW1*(1+(R*T1/100)); #sum of the bill(Rs)\n", + "\n", + "#Result\n", + "print \"rate percent is\",round(R,2),\"%\"\n", + "print \"sum of the bill is\",round(P,2),\"Rs\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.12, Page number 16.7" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent is 4.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=600; #sum(Rs)\n", + "P2=720; #sum(Rs)\n", + "T=5; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=((P2*T*100/(P1*T))-100)/T; #rate percent(%)\n", + "\n", + "#Result\n", + "print \"rate percent is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16.13, Page number 16.8" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "each installment should be 2000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=8480; #sum(Rs)\n", + "n=4; #number of installments\n", + "r=16; #rate percent(%)\n", + "y=4;\n", + "\n", + "#Calculation\n", + "x=r*n*(n-1)/(100*y*2);\n", + "a=P/(x+n); #each installment should be(Rs)\n", + "\n", + "#Result\n", + "print \"each installment should be\",a,\"Rs\"" + ] + } + ], + "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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17.ipynb new file mode 100755 index 00000000..9ff8c9be --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17.ipynb @@ -0,0 +1,506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 17: Banker's discount" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.1, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 50.0 Rs\n", + "banker's discount is 51.0 Rs\n", + "banker's gain is 1.0 Re\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2550; #principal(Rs)\n", + "R=8; #rate(%)\n", + "T=3/12; #time(yrs)\n", + "\n", + "#Calculation\n", + "TD=P*R*T/(100+(R*T)); #true discount(Rs)\n", + "BD=P*R*T/100; #banker's discount(Rs)\n", + "BG=BD-TD; #banker's gain(Re)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD,\"Rs\"\n", + "print \"banker's discount is\",BD,\"Rs\"\n", + "print \"banker's gain is\",BG,\"Re\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.2, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1055.0 Rs\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", + "R=6; #rate(%)\n", + "T=11/12; #time(yrs)\n", + "BD=58.025; #banker's discount(Rs)\n", + "\n", + "#Calculation\n", + "P=BD*100/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.3, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's discount is 20.6 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=9/12; #time(yrs)\n", + "TD=20; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "BD=TD*(1+(R*T/100)); #banker's discount(Rs)\n", + "\n", + "#Result\n", + "print \"banker's discount is\",BD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.4, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's gain is 3.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=3; #rate(%)\n", + "T=2; #time(yrs)\n", + "TD=50; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "BG=TD*R*T/100; #banker's gain(Rs)\n", + "\n", + "#Result\n", + "print \"banker's gain is\",BG,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.5, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 1.0 yr\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=1000; #principal(Rs)\n", + "P2=1050; #principal(Rs)\n", + "R=5; #rate(%)\n", + "\n", + "#Calculation\n", + "T=((P2*R*100/(P1*R))-100)/R; #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"yr\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.6, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's discount is 108.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD=90; #true discount(Rs)\n", + "P=540; #principal(Rs)\n", + "\n", + "#Calculation\n", + "BD=((TD**2)/(P-TD))+TD; #banker's discount(Rs)\n", + "\n", + "#Result\n", + "print \"banker's discount is\",BD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.7, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1650.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5; #rate(%)\n", + "T=2; #time(yrs)\n", + "BG=15; #banker's gain(Rs)\n", + "\n", + "#Calculation\n", + "P=BG*100*(100+(R*T))/((R*T)**2); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.8, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth of bill is 2000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=2; #rate(%)\n", + "T=5; #time(yrs)\n", + "BG=20; #banker's gain(Rs)\n", + "\n", + "#Calculation\n", + "PW=BG*(100**2)/((R*T)**2); #present worth of bill(Rs)\n", + "\n", + "#Result\n", + "print \"present worth of bill is\",PW,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.9, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BG=25; #banker's gain(Rs)\n", + "PW=10000; #present worth of bill(Rs)\n", + "\n", + "#Calculation\n", + "TD=math.sqrt(PW*BG); #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.10, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 120.0 Rs\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", + "BD=40; #banker's discount(Rs) \n", + "TD=30; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "P=BD*TD/(BD-TD); #sum(Rs)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.11, Page number 17.4" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 7.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BD=1; #assume\n", + "BG=(7/57)*BD; #banker's gain(Rs)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=BG*100/((BD-BG)*T); #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.12, Page number 17.4" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 2.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BDbyTD=21/20; #ratio of BD and TD\n", + "T=5/2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=(BDbyTD-1)*100/T; #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb new file mode 100644 index 00000000..9ff8c9be --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter17_1.ipynb @@ -0,0 +1,506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 17: Banker's discount" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.1, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 50.0 Rs\n", + "banker's discount is 51.0 Rs\n", + "banker's gain is 1.0 Re\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=2550; #principal(Rs)\n", + "R=8; #rate(%)\n", + "T=3/12; #time(yrs)\n", + "\n", + "#Calculation\n", + "TD=P*R*T/(100+(R*T)); #true discount(Rs)\n", + "BD=P*R*T/100; #banker's discount(Rs)\n", + "BG=BD-TD; #banker's gain(Re)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD,\"Rs\"\n", + "print \"banker's discount is\",BD,\"Rs\"\n", + "print \"banker's gain is\",BG,\"Re\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.2, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1055.0 Rs\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", + "R=6; #rate(%)\n", + "T=11/12; #time(yrs)\n", + "BD=58.025; #banker's discount(Rs)\n", + "\n", + "#Calculation\n", + "P=BD*100/(R*T); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.3, Page number 17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's discount is 20.6 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=4; #rate(%)\n", + "T=9/12; #time(yrs)\n", + "TD=20; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "BD=TD*(1+(R*T/100)); #banker's discount(Rs)\n", + "\n", + "#Result\n", + "print \"banker's discount is\",BD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.4, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's gain is 3.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=3; #rate(%)\n", + "T=2; #time(yrs)\n", + "TD=50; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "BG=TD*R*T/100; #banker's gain(Rs)\n", + "\n", + "#Result\n", + "print \"banker's gain is\",BG,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.5, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time is 1.0 yr\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=1000; #principal(Rs)\n", + "P2=1050; #principal(Rs)\n", + "R=5; #rate(%)\n", + "\n", + "#Calculation\n", + "T=((P2*R*100/(P1*R))-100)/R; #time(yrs)\n", + "\n", + "#Result\n", + "print \"time is\",T,\"yr\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.6, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "banker's discount is 108.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "TD=90; #true discount(Rs)\n", + "P=540; #principal(Rs)\n", + "\n", + "#Calculation\n", + "BD=((TD**2)/(P-TD))+TD; #banker's discount(Rs)\n", + "\n", + "#Result\n", + "print \"banker's discount is\",BD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.7, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "principal is 1650.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=5; #rate(%)\n", + "T=2; #time(yrs)\n", + "BG=15; #banker's gain(Rs)\n", + "\n", + "#Calculation\n", + "P=BG*100*(100+(R*T))/((R*T)**2); #principal(Rs)\n", + "\n", + "#Result\n", + "print \"principal is\",P,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.8, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "present worth of bill is 2000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=2; #rate(%)\n", + "T=5; #time(yrs)\n", + "BG=20; #banker's gain(Rs)\n", + "\n", + "#Calculation\n", + "PW=BG*(100**2)/((R*T)**2); #present worth of bill(Rs)\n", + "\n", + "#Result\n", + "print \"present worth of bill is\",PW,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.9, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true discount is 500.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BG=25; #banker's gain(Rs)\n", + "PW=10000; #present worth of bill(Rs)\n", + "\n", + "#Calculation\n", + "TD=math.sqrt(PW*BG); #true discount(Rs)\n", + "\n", + "#Result\n", + "print \"true discount is\",TD,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.10, Page number 17.3" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sum is 120.0 Rs\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", + "BD=40; #banker's discount(Rs) \n", + "TD=30; #true discount(Rs)\n", + "\n", + "#Calculation\n", + "P=BD*TD/(BD-TD); #sum(Rs)\n", + "\n", + "#Result\n", + "print \"sum is\",P,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.11, Page number 17.4" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 7.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BD=1; #assume\n", + "BG=(7/57)*BD; #banker's gain(Rs)\n", + "T=2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=BG*100/((BD-BG)*T); #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",R,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17.12, Page number 17.4" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate is 2.0 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "BDbyTD=21/20; #ratio of BD and TD\n", + "T=5/2; #time(yrs)\n", + "\n", + "#Calculation\n", + "R=(BDbyTD-1)*100/T; #rate(%)\n", + "\n", + "#Result\n", + "print \"rate is\",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/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18.ipynb b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18.ipynb new file mode 100755 index 00000000..d667f507 --- /dev/null +++ b/Quantitative_Aptitude_for_Competitive_Examinations_by_Abhijit_Guha/Chapter18.ipynb @@ -0,0 +1,823 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 18: Shares and Debentures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.1, Page number 18.6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost of purchase in 1st case is 4750.0 Rs\n", + "cost of purchase in 2nd case is 3000 Rs\n", + "cost of purchase in 3rd case is 2750.0 Rs\n", + "cost of purchase in 4th case is 920.0 Rs\n", + "cost of purchase in 5th case is 2202.0 Rs\n", + "cost of purchase in 6th case is 2110.0 Rs\n", + "cost of purchase in 7th case is 945.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a1=5000; #amount(Rs)\n", + "mv1=95; #market value\n", + "a2=3000; #amount(Rs)\n", + "a3=2500; #amount(Rs)\n", + "mv2=100+10; #market value\n", + "a4=1000; #amount(Rs)\n", + "d1=8; #discount(%)\n", + "a5=2200; #amount(Rs)\n", + "b1=1/11; #brokerage(%)\n", + "a6=2000; #amount(Rs)\n", + "mv3=100+5; #market value\n", + "b2=1/2; #brokerage(%)\n", + "d2=6; #discount\n", + "a7=1000; #amount(Rs)\n", + "b3=1/2; #brokerage(%)\n", + "\n", + "#Calculation\n", + "cp1=a1*mv1/100; #cost of purchase in 1st case(Rs)\n", + "cp2=a2; #cost of purchase in 2nd case(Rs)\n", + "cp3=a3*mv2/100; #cost of purchase in 3rd case(Rs) \n", + "cp4=a4*(100-d1)/100; #cost of purchase in 4th case(Rs) \n", + "cp5=a5*(100+b1)/100; #cost of purchase in 5th case(Rs) \n", + "cp6=a6*(mv3+b2)/100; #cost of purchase in 6th case(Rs) \n", + "mv4=100-d2; #market value\n", + "cp7=a7*(mv4+b3)/100; #cost of purchase in 7th case(Rs) \n", + "\n", + "#Result\n", + "print \"cost of purchase in 1st case is\",cp1,\"Rs\"\n", + "print \"cost of purchase in 2nd case is\",cp2,\"Rs\"\n", + "print \"cost of purchase in 3rd case is\",cp3,\"Rs\"\n", + "print \"cost of purchase in 4th case is\",cp4,\"Rs\"\n", + "print \"cost of purchase in 5th case is\",cp5,\"Rs\"\n", + "print \"cost of purchase in 6th case is\",cp6,\"Rs\"\n", + "print \"cost of purchase in 7th case is\",cp7,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.2, Page number 18.7" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sale realisation is 2110.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2000; #amount(Rs)\n", + "mv=100+6; #market value\n", + "b=1/2; #brokerage(%)\n", + "\n", + "#Calculation\n", + "sr=a*(mv-b)/100; #sale realisation(Rs) \n", + "\n", + "#Result\n", + "print \"sale realisation is\",sr,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.3, Page number 18.7" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount of stock is 1200.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mv=100+(9/4); #market value\n", + "b=1/2; #brokerage(%)\n", + "sr=1221; #sale realisation(Rs) \n", + " \n", + "#Calculation\n", + "a=sr*100/(mv-b); #amount of stock(Rs) \n", + "\n", + "#Result\n", + "print \"amount of stock is\",a,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.4, Page number 18.7" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount of stock is 2000.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "b=1/2; #brokerage(%)\n", + "d=8; #discount(%)\n", + "pc=1850; #purchase cost(Rs)\n", + "\n", + "#Calculation\n", + "a=pc*100/(100-d+b); #amount of stock(Rs) \n", + "\n", + "#Result\n", + "print \"amount of stock is\",a,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.5, Page number 18.7" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual income is 112.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=2800; #amount of stock(Rs) \n", + "r=4/100; #rate of stock(%)\n", + "\n", + "#Calculation\n", + "I=a*r #annual income(Rs)\n", + "\n", + "#Result\n", + "print \"annual income is\",I,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.6, Page number 18.8" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "annual income is 100.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=2800; #investment(Rs)\n", + "r=4; #rate of stock(%)\n", + "mvb=112; \n", + "\n", + "#Calculation\n", + "I=i*r/mvb; #annual income(Rs)\n", + "\n", + "#Result\n", + "print \"annual income is\",I,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.7, Page number 18.8" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate percent obtained is 7.35 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=100; #investment(Rs)\n", + "r=7; #rate of stock(%)\n", + "b=1/(4*100); #brokerage(%)\n", + "mv=1-(5/100); #market value\n", + "\n", + "#Calculation\n", + "R=i*r/(mv+b); #rate percent obtained(%)\n", + "\n", + "#Result\n", + "print \"rate percent obtained is\",round(R/100,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.8, Page number 18.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "market value is 29.75\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "i=1220; #investment(Rs)\n", + "r=6; #rate of stock(%)\n", + "b=1/4; #brokerage(%)\n", + "I=244; #annual income(Rs)\n", + "\n", + "#Calculation\n", + "mv=(i*r/I)-b; #market value\n", + "\n", + "#Result\n", + "print \"market value is\",mv" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.9, Page number 18.8" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "investment is 4950.0 Rs\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", + "r=20/3; #rate of stock(%)\n", + "mvb=110;\n", + "b=1/4; #brokerage(%)\n", + "i=300; #annual income(Rs)\n", + "\n", + "#Calculation\n", + "I=i*mvb/r; #investment(Rs)\n", + "\n", + "#Result\n", + "print \"investment is\",I,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.10, Page number 18.8" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gain by share holder is 13500 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "fv=20; #face value(Rs)\n", + "mv=74; #market value(Rs)\n", + "n=250; #number of shares\n", + "\n", + "#Calculation\n", + "a=mv*n; #amount paid by buyer(Rs)\n", + "cp=fv*n; #purchase cose(Rs)\n", + "g=a-cp; #gain by share holder(Rs)\n", + "\n", + "#Result\n", + "print \"gain by share holder is\",g,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.11, Page number 18.9" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sale realisation is 4180.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "pc=4220; #purchase cost(Rs)\n", + "mv=105; #market value\n", + "b=1/2; #brokerage(%)\n", + "\n", + "#Calculation\n", + "sr=pc*(mv-b)/(mv+b); #sale realisation(Rs) \n", + "\n", + "#Result\n", + "print \"sale realisation is\",sr,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.12, Page number 18.9" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cost of 80 shares is 780.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "fv=10; #face value(Rs)\n", + "d=3/8; #discount\n", + "b=1/8; #brokerage(%)\n", + "n=80; #number of shares\n", + "\n", + "#Calculation\n", + "c1=fv-d+b; #cost of 1 share(Rs)\n", + "C=n*c1; #cost of 80 shares(Rs)\n", + "\n", + "#Result\n", + "print \"cost of 80 shares is\",C,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.13, Page number 18.9" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amount invested in 3% stock is 540.0 Rs\n", + "amount invested in 8% stock is 4860.0 Rs\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "mvb=120;\n", + "a=4500; #amount(Rs)\n", + "r=5; #rate of stock(%)\n", + "i=75; #income(Rs)\n", + "x1=99;\n", + "x2=132; \n", + "r1=3; #rate(%) \n", + "r2=8; #rate(%)\n", + "\n", + "#Calculation\n", + "sr=mvb*a/100; #sale realisation(Rs) \n", + "Is=a*r/100; #income before selling(Rs)\n", + "Ias=Is+i; #income after sale(Rs)\n", + "\n", + "\n", + "l=x1*x2/gcd(x1,x2); #lcm of x1 and x2\n", + "X=l*Ias;\n", + "f1=l/x1;\n", + "f2=l/x2;\n", + "c1=r2*f1; #c1=r2*f1\n", + "c2=r1*f1;\n", + "c=l*r2*sr/x2;\n", + "x=(c-X)/(c1-c2); #amount invested in 3% stock(Rs)\n", + "y=sr-x; #amount invested in 8% stock(Rs)\n", + "\n", + "#Result\n", + "print \"amount invested in 3% stock is\",x,\"Rs\"\n", + "print \"amount invested in 8% stock is\",y,\"Rs\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.14, Page number 18.10" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "income derived is 300.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "i=2592; #investment(Rs)\n", + "mvb=108;\n", + "fv=100; #face value(Rs)\n", + "d=25/2; #dividend(%)\n", + "\n", + "#Calculation\n", + "I=i*d*fv/(mvb*100); #income derived(Rs)\n", + "\n", + "#Result\n", + "print \"income derived is\",I,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.15, Page number 18.10" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate of interest on investment is 3.37 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "r=17/4; #rate(%)\n", + "fv=20; #face value(Rs)\n", + "n=88; #number of shares\n", + "p=5; #premium\n", + "b=1/4; #brokerage(%)\n", + "\n", + "#Calculation\n", + "d=r*fv*n/100; #dividend(Rs)\n", + "pc=fv+p+b; #purchase cost(Rs)\n", + "R=r*fv/pc; #rate of interest on investment(%)\n", + "\n", + "#Result\n", + "print \"rate of interest on investment is\",round(R,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.16, Page number 18.10" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "market value of each share is 110.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "i=4444; #investment(Rs)\n", + "I=600; #annual income(Rs)\n", + "fv=100; #face value(Rs)\n", + "d=15; #dividend(%)\n", + "b=1/100; #brokerage(%)\n", + "\n", + "#Calculation\n", + "M=i*d*fv/(I*100*(1+b)); #market value of each share(Rs)\n", + "\n", + "#Result\n", + "print \"market value of each share is\",M,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.17, Page number 18.11" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "investment is 10504.0 Rs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "I=1500; #annual income(Rs)\n", + "fv=100; #face value(Rs)\n", + "d=15; #dividend(%)\n", + "b=1/100; #brokerage(%)\n", + "M=104; #market value(Rs)\n", + "\n", + "#Calculation\n", + "i=I*100*M*(1+b)/(d*fv); #investment(Rs)\n", + "\n", + "#Result\n", + "print \"investment is\",i,\"Rs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18.18, Page number 18.11" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "investment is better\n", + "investment in 1st case is 1440 Rs\n", + "investment in 2nd case is 1512 Rs\n", + "answer given in the book for 2nd case is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "d1=15; #debenture(%)\n", + "d2=14; #debenture(%)\n", + "p=8; #premium(%)\n", + "d=4; #discount(%)\n", + "\n", + "#Calculation\n", + "M1=100-d; #market value(Rs)\n", + "M2=100+p; #market value(Rs)\n", + "x=d1*M1; #investment(Rs)\n", + "y=d2*M2; #investment(Rs)\n", + "if(x1.52:\n", + " W=h*(8*math.exp(A)/(math.exp(2*A)-2))\n", + "else:\n", + " W=h*(2/math.pi*(B-1-math.log(2*B-1)+(Er-1)/2/Er*(math.log(B-1)+0.39-0.61/Er)))\n", + "print \"W=%.6f cm\"%W\n", + "\n", + "Ere=0.5*(2.08+1+(2.08-1)/math.sqrt(1+12/3.192094))-(2.08-1)*0.0001/4.6/math.sqrt(3.1921)\n", + "print \"Ere=%.4f\"%Ere\n", + "l=c/(2*f*math.sqrt(Ee))\n", + "print \"l=%.6f m\"%l\n", + "We=W/h+0.3979*t/h*(1+math.log(2*h/t))\n", + "print \"We/h=%.4f\"%We\n", + "F=1+1/We*(1-1.25*t/(math.pi*h)+1.25/math.pi*math.log(2*h/t))\n", + "ac=44.1255*10**-5*F*Zo*Ere/h*math.sqrt(fGHz/a)*(We+0.667*We/(We+1.444))\n", + "print \"ac=%.4f Np/m\"%ac\n", + "deln=0.00040\n", + "ad=10.4766*Er/(Er-1)*(Ere-1)/math.sqrt(Ere)*fGHz*math.tan(deln)\n", + "print \"ad=%.4f Np/m\"%ad\n", + "B=2*math.pi/(2*l)\n", + "print \"B=%.4f rad/m\"%B\n", + "Q=B/(2*(ac+ad))\n", + "print \"Q=%.1f\"%Q\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A=1.1333\n", + "B=8.2120\n", + "W=0.005075 cm\n", + "Ere=1.7875\n", + "l=0.056097 m\n", + "We/h=3.1925\n", + "ac=0.0428 Np/m\n", + "ad=0.0095 Np/m\n", + "B=56.0030 rad/m\n", + "Q=535.3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a=2.286*10**-2\n", + "b=1.016*10**-2\n", + "f=9.379*10**9\n", + "\n", + "#Calculations\n", + "c=1./2/math.sqrt((9379./300)**2-(1./2/a)**2)\n", + "\n", + "print \"c=%.5f m = %.4f cm\"%(c,c*100)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c=0.02238 m = 2.2383 cm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Er=2.05\n", + "ur=1\n", + "a=.016 #m\n", + "b=.0071 #m\n", + "c=.0156 #m\n", + "m=1 \n", + "p=1 \n", + "\n", + "#Calculations\n", + "fr=(300/math.sqrt(ur*Er))*math.sqrt((m/(2*a))**2+(p/(2*c))**2) \n", + "\n", + "#Result\n", + "print \"fr = %.3e MHz\"%fr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fr = 9.379e+03 MHz\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9, Page 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "w=2*math.pi*5*10**9\n", + "u=4*math.pi*10**-7\n", + "a=5.8*10**7\n", + "\n", + "#Calculations&Results\n", + "r=math.sqrt((3.832**2+(math.pi/2)**2)/(5000*2*math.pi/300)**2)\n", + "h=2*r\n", + "deln=math.sqrt(2/(w*u*a))\n", + "print \"del=%.4e m\"%deln\n", + "Qc=47.7465*10**6/(9.3459*10**-7*5*10**9)*(3.832**2+(math.pi/2)**2)**1.5/((3.832**2+(math.pi/2)**2)+1)\n", + "print \"Qc=%.2f\"%Qc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "del=9.3459e-07 m\n", + "Qc=39984.60\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "fr=35*10**9\n", + "w=2*math.pi*fr\n", + "Es=9.9\n", + "Er=36\n", + "uo=4*math.pi*10**-7\n", + "Eo=8.8154*10**-12\n", + "\n", + "#Calculations&Results\n", + "z1=1.2892*10**8/(fr*math.sqrt(Es))\n", + "z2=1.2892*10**8/(fr*math.sqrt(Er))\n", + "r=0.835*10**-3\n", + "ko=w*math.sqrt(uo*Eo)\n", + "y=math.sqrt((ko*r)**2*(Er-1)-5.784)\n", + "print \"y=%.3f\"%y\n", + "k_=2.405/r+y/(2.405*r*(1+2.43/y+0.291*y))\n", + "print \"k_=%.3e\"%k_\n", + "a1=math.sqrt(k_**2-ko**2*Es)\n", + "a2=math.sqrt(k_**2-ko**2)\n", + "B=math.sqrt(ko**2*Er-k_**2)\n", + "print \"a1=%.3e\\na2=%.3e\\nB=%.3e\"%(a1,a2,B)\n", + "d=10**-3\n", + "t=.25*10**-3\n", + "h=1/B*(math.atan(a1/(B*math.tanh(a1*t)))+math.atan(a2/(B*math.tanh(a2*d))))\n", + "print \"h=%.3e m\"%h\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "y=2.700\n", + "k_=3.381e+03\n", + "a1=2.475e+03\n", + "a2=3.301e+03\n", + "B=2.803e+03\n", + "h=6.713e-04 m\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb new file mode 100644 index 00000000..39e9bf33 --- /dev/null +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch6.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4c48a867f10cd521b149d7e0250805832590ebd78eb71780c4421861ef43f229" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Impedance-Matching Networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Zo=100\n", + "ZL=complex(50,-75)\n", + "B=2*math.pi\n", + "XL=-0.75\n", + "RL=0.5\n", + "Y_L=Zo/ZL\n", + "\n", + "#Calculations&Results\n", + "G_L=Y_L.real\n", + "B_L=Y_L.imag\n", + "print \"Y_L=\",Y_L\n", + "A=G_L*(G_L-1)+B_L**2\n", + "print \"A=%.4f\"%A\n", + "ds=(math.degrees(math.atan((XL+math.sqrt(XL**2-A*(1-RL)))/A)))/B\n", + "print \"ds=%f*lambda\"%ds \n", + "ds=(math.degrees(math.atan((XL-math.sqrt(XL**2-A*(1-RL)))/A)))/B\n", + "print \"ds=%f*lambda\"%ds\n", + "X_s=-1.2748\n", + "Ls=1./B*1./math.degrees(math.atan(X_s))\n", + "print \"Ls=%f*lambda\"%Ls\n", + "X_s=1.2748\n", + "Ls=1./B*1/math.degrees(math.atan(X_s))\n", + "print \"Ls=%f*lambda\"%Ls\n", + "#Incorrect solution in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y_L= (0.615384615385+0.923076923077j)\n", + "A=0.6154\n", + "ds=-3.457805*lambda\n", + "ds=-10.166064*lambda\n", + "Ls=-0.003067*lambda\n", + "Ls=0.003067*lambda\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3, Page 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import cmath\n", + "\n", + "#Variable declaration\n", + "FL=0.4*cmath.exp(complex(0,-30*math.pi/180))\n", + "Fin=0.2*cmath.exp(complex(0,45*math.pi/180))\n", + "\n", + "#Calculations&Results\n", + "Z_L=(1+FL)/(1-FL)\n", + "Z_in=(1+Fin)/(1-Fin)\n", + "Y_in=(1-Fin)/(1+Fin)\n", + "print \"Z_L=\",Z_L\n", + "print \"Z_in=\",Z_in\n", + "print \"Y_in=\",Y_in\n", + "#Y_in=(1+complex(0,(Z_L*math.tan(Bl*math.pi/180))))/(Z_L+complex(0,math.tan(Bl*math.pi/180)))\n", + "Y_in1=1/Z_in\n", + "print \"Y_in=\",Y_in1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z_L= (1.79802341883-0.856201628016j)\n", + "Z_in= (1.26790036339+0.37355872701j)\n", + "Y_in= (0.725709860248-0.213814318065j)\n", + "Y_in= (0.725709860248-0.213814318065j)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "RL=50\n", + "Rs=75\n", + "\n", + "#Calculations\n", + "R1=math.sqrt(Rs*(Rs-RL))\n", + "R2=math.sqrt(RL**2*Rs/(Rs-RL))\n", + "attenuation=20*math.log10(R2*RL/(R1*(R2+RL)+R2*RL))\n", + "\n", + "#Result\n", + "print \"\\nR1=%.1f ohm\\nR2=%.1f ohm\\nattenuation(dB)=%.2f dB\"%(R1,R2,attenuation)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "R1=43.3 ohm\n", + "R2=86.6 ohm\n", + "attenuation(dB)=-7.48 dB\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Rp=600 #ohms\n", + "Rs=50 #ohms\n", + "W=2*math.pi*400*10**6\n", + "Q=math.sqrt(Rp/Rs-1)\n", + "\n", + "#Calculations\n", + "Xs=Q*Rs\n", + "Xp=Rp/Q\n", + "Cs=1./W/Xs\n", + "Lp=Xp/W\n", + "Ls=Xs/W\n", + "Cp=1./W/Xp\n", + "\n", + "#Results\n", + "print \"\\nQ=%.4f\\nXs=%.4f ohm\\nXp=%.4f ohm\\nCs=%.2e F\\nLp=%.3e H\\nLs=%.3e H\\nCp=%.2e F\" %(Q,Xs,Xp,Cs,Lp,Ls,Cp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Q=3.3166\n", + "Xs=165.8312 ohm\n", + "Xp=180.9068 ohm\n", + "Cs=2.40e-12 F\n", + "Lp=7.198e-08 H\n", + "Ls=6.598e-08 H\n", + "Cp=2.20e-12 F\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Rp=600 #ohm\n", + "Rs=173.2 #ohm\n", + "Q=math.sqrt(Rp/Rs-1)\n", + "\n", + "#Calculations&Results\n", + "Xs=Q*Rs\n", + "Xp=Rp/Q\n", + "print \"Q=%.6f\\nXs=%.4f ohm\\nXp=%.4f ohm\\n\" %(Q,Xs,Xp)\n", + "Rp=173.2 #ohm\n", + "Rs=50 #ohm\n", + "Q=math.sqrt(Rp/Rs-1)\n", + "Xs=Q*Rs\n", + "Xp=Rp/Q\n", + "print \"\\nQ=%.4f\\nXs=%.4f ohm\\nXp=%.4f ohm\\n\"%(Q,Xs,Xp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q=1.569778\n", + "Xs=271.8856 ohm\n", + "Xp=382.2196 ohm\n", + "\n", + "\n", + "Q=1.5697\n", + "Xs=78.4857 ohm\n", + "Xp=110.3386 ohm\n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "f=500*10**6\n", + "W=2*math.pi*f\n", + "Rp=50\n", + "Rs=10\n", + "Q=math.sqrt(Rp/Rs-1)\n", + "\n", + "#Calculations\n", + "Xs=Q*Rs\n", + "Xp=Rp/Q\n", + "Ls=(Xs-10)/W\n", + "Cp=1/W/Xp\n", + "Cs=1/W/(Xs+10)\n", + "Lp=Xp/W\n", + "\n", + "#Result\n", + "print \"\\nQ=%.0f\\nXs=%.0f ohm\\nXp=%.0f ohm\\nLs=%.4e H\\nCp=%.4e F\\nCs=%.3e F\\nLp=%.4e H\"%(Q,Xs,Xp,Ls,Cp,Cs,Lp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Q=2\n", + "Xs=20 ohm\n", + "Xp=25 ohm\n", + "Ls=3.1831e-09 H\n", + "Cp=1.2732e-11 F\n", + "Cs=1.061e-11 F\n", + "Lp=7.9577e-09 H\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9, Page 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "ZL=10**3/complex(8,-12)\n", + "Rp=50\n", + "W=2*math.pi*10**9\n", + "Rs=ZL.real\n", + "Q=math.sqrt(Rp/Rs-1)\n", + "\n", + "#Calculations\n", + "Xs=Q*Rs\n", + "Xc=Xs+ZL.imag\n", + "Xp=Rp/Q\n", + "C=1/W/Xc\n", + "L=Xp/W\n", + "\n", + "#Result\n", + "print \"ZL=\",ZL\n", + "print \"\\nQ=%.4f\\nXs=%.4f ohm\\nXp=%.4f ohm\\nC=%.4e F\\nL=%.4e H\\n\"%(Q,Xs,Xp,C,L)\n", + "print \"\\nXs=57.6923-21.0654 ohm\\nXp=91.2909 ohm\\nCp=1.7434 F\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ZL= (38.4615384615+57.6923076923j)\n", + "\n", + "Q=0.5477\n", + "Xs=21.0663 ohm\n", + "Xp=91.2871 ohm\n", + "C=2.0208e-12 F\n", + "L=1.4529e-08 H\n", + "\n", + "\n", + "Xs=57.6923-21.0654 ohm\n", + "Xp=91.2909 ohm\n", + "Cp=1.7434 F\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10, Page 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "W=2*math.pi*10**9\n", + "Gs=0.02\n", + "Gp=0.008\n", + "Q=math.sqrt(Gs/Gp-1)\n", + "\n", + "#Calculations\n", + "Bs=Gs/Q\n", + "Bp=Q*Gp\n", + "\n", + "#Result\n", + "print \"\\nQ=%.4f\\nBs=%.4f S\\nBp=%.2f S\\n\"%(Q,Bs,Bp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Q=1.2247\n", + "Bs=0.0163 S\n", + "Bp=0.01 S\n", + "\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb new file mode 100644 index 00000000..395884ba --- /dev/null +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch7.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6bedf389e33b93f035c1411c13273d034bea1056d10f03e66600362753274959" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Impedance Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "RL=100 #ohms\n", + "Zo=50 #ohms\n", + "PM=0.05 #reflection co-efficient\n", + "c=3.0*10**8 #m/s\n", + "f=900*10**6 #Hz\n", + "\n", + "#Calculations\n", + "lamda=c/f\n", + "Z1=math.sqrt(RL*Zo)\n", + "l=lamda/4\n", + "fractional_bandwidth=2-4/math.pi*math.acos(abs(2*PM*math.sqrt(Zo*RL)/(RL-Zo)/math.sqrt(1-PM**2)))\n", + "\n", + "#Results\n", + "print \"Z1=%f ohm\\nl=%.4f m\\nfractional bandwidth=%.7f\"%(Z1,l,fractional_bandwidth)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z1=70.710678 ohm\n", + "l=0.0833 m\n", + "fractional bandwidth=0.1808967\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "delf=0.6 #fractional bandwidth\n", + "fo=1\n", + "Zo=100 #ohms\n", + "\n", + "#Calculations\n", + "Qz=math.acos(1./math.sqrt(2)*math.cos((2-delf/fo)/4*math.pi))\n", + "Qm=math.acos(math.sqrt(2)*math.cos(Qz))\n", + "Z_L=5.\n", + "k=math.sqrt((Z_L-1)**2/(4*Z_L*math.tan(Qz)**4))\n", + "Pm=math.sqrt(k**2/(1+k**2))\n", + "Z1=math.sqrt(math.sqrt(((Z_L-1)**2/(4*math.tan(Qz)**4))+Z_L)+((Z_L-1)/(2*math.tan(Qz)**2)))\n", + "Z2=Z_L/Z1*Zo\n", + "Z_in=Z1**2/Z2**2*Z_L*10**4\n", + "F=(Z_in-1)/(Z_in+1)\n", + "\n", + "#Results\n", + "print \"Qz=%.4f rad\\nQm=%.1f\\nPm=%.4f\\nZ_1=%.2f ohm\\nZ2=%.2f ohm\\nZ-in=%.4f\\nF=%.4f\"%(Qz,Qm,Pm,Z1*100,Z2,Z_in,F)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Qz=1.2440 rad\n", + "Qm=1.1\n", + "Pm=0.1022\n", + "Z_1=157.40 ohm\n", + "Z2=317.65 ohm\n", + "Z-in=1.2277\n", + "F=0.1022\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb new file mode 100644 index 00000000..99400d20 --- /dev/null +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch8.ipynb @@ -0,0 +1,517 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:70d81ef1f908254502182062c2d7ba8efbc6e74011d16030cffb7af806003fed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Two-Port Networks" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From the figure 8.2\n", + "I1=1 #A\n", + "\n", + "#Calculations\n", + "V1=6*I1 #V\n", + "Z11=V1/I1 #ohms\n", + "V2=6*I1 #V\n", + "Z21=V2/I1 #ohms\n", + "I2=1 #A\n", + "V1=6*I2 #V\n", + "Z12=V1/I2 #ohms\n", + "V2=6*I2 #V\n", + "Z22=V2/I2 #V\n", + "A=[[Z11,Z12],[Z21,Z22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[6, 6], [6, 6]]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.3\n", + "I1=1 #A\n", + "V2=0 #V\n", + "\n", + "#Calculations\n", + "V1=12*I1 #V\n", + "Z21=V2/I1 #ohms\n", + "Z11=V1/I1 #ohms\n", + "I2=1 #A\n", + "V2=3*I2 #V\n", + "V1=0 #V\n", + "Z12=V1/I2 #ohms\n", + "V2=3*I2 #V\n", + "Z22=V2/I2 #ohms\n", + "A=[[Z11,Z12],[Z21,Z22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[12, 0], [0, 3]]\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.4\n", + "I1=1 #A\n", + "I2=1 #A\n", + "\n", + "#Calculations\n", + "V1=18*I1 #V\n", + "V2=6*I1 #V\n", + "Z11=V1/I1 #ohms\n", + "Z21=V2/I1 #ohms\n", + "V2=9*I2 #V\n", + "V1=6*I2 #V\n", + "Z12=V1/I2 #ohms\n", + "Z22=V2/I2 #ohms\n", + "A=[[Z11,Z12],[Z21,Z22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[18, 6], [6, 9]]\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.7\n", + "V2=1 #V\n", + "V1=1 #V\n", + "V2=0 #V\n", + "\n", + "#Calculations\n", + "I1=0.05*V1 #A\n", + "I2=-0.05*V1 #A\n", + "Y11=I1/V1 #mho\n", + "Y21=I2/V1 #mho\n", + "I2=0.05*V2 #A\n", + "I1=-0.05*V2 #A\n", + "Y12=-0.05 #mho\n", + "Y22=0.05 #mho\n", + "A=[[Y11,Y12],[Y21,Y22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[0.05, -0.05], [-0.05, 0.05]]\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.8\n", + "V1=1 #V\n", + "V2=1 #V\n", + "\n", + "#Calculations\n", + "I1=0.0225/0.325*V1 #A\n", + "VN=I1/(0.2+0.025) #V\n", + "I2=-0.2*VN #A\n", + "Y11=I1/V1 #mho\n", + "Y21=I2/V1 #mho\n", + "I2=0.025/0.325*V2 #A\n", + "VM=I2/(0.1+0.025) #V\n", + "I1=-0.1*VM #A\n", + "Y12=I1/V2 #mho \n", + "Y22=I2/V2 #mho\n", + "A=[[Y11,Y12],[Y21,Y22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[0.06923076923076922, -0.06153846153846154], [-0.061538461538461535, 0.07692307692307693]]\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.9\n", + "V1=1 #V\n", + "V2=1 #V\n", + "\n", + "#Calculations\n", + "I1=0.1192*V1 #A\n", + "IN=0.05*I1/(0.05+(0.1*(0.2+0.025)/(0.1+0.2+0.025))) #A\n", + "IM=0.2*0.0692*V1/(0.2+0.025) #A\n", + "I2=-(IN+IM) #A\n", + "Y11=I1/V1 #mho\n", + "Y21=I2/V1 #mho\n", + "I2=(0.05+0.2*(0.1+0.025)/(0.2+0.1+0.025))*V2 #A\n", + "IN=0.05*I2/(0.05+(0.2*(0.1+0.025)/(0.2+.1+0.025))) #A\n", + "IM=0.1*0.0769*V2/(0.1+0.025) #A\n", + "I1=-(IN+IM) #A\n", + "Y12=I1/V2 #mho\n", + "Y22=I2/V2 #mho\n", + "A=[[Y11,Y12],[Y21,Y22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[0.1192, -0.11152000000000001], [-0.11149820788530465, 0.12692307692307692]]\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.12\n", + "I1=1 #A\n", + "\n", + "#Calculations\n", + "V1=14*I1 #V\n", + "I2=-2./3*I1 #A\n", + "h11=V1/I1\n", + "h21=I2/I1\n", + "V2=9*I2 #V\n", + "V1=6*I2 #V\n", + "h12=V1/V2\n", + "h22=I2/V2\n", + "A=[[h11,h12],[h21,h22]]\n", + "\n", + "#Result\n", + "print \"A=\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[14, 0.6666666666666666], [-0.6666666666666666, 0.1111111111111111]]\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10, Page 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#From figure 8.13\n", + "I1=1 #A\n", + "\n", + "#Calculations\n", + "I2=-I1 #A\n", + "V1=I1 #V\n", + "B=-V1/I2 \n", + "D=-I1/I2\n", + "V2=V1 #V\n", + "I1=0 #A\n", + "A=V1/V2\n", + "C=I1/V2\n", + "M=[[A,B],[C,D]]\n", + "\n", + "#Result\n", + "print \"A=\",M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A= [[1, 1], [0, 1]]\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14, Page 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import cmath\n", + "\n", + "#Calculations&Results\n", + "V1in=0.5*((10*cmath.exp(complex(0,math.pi/180*0)))+(50*(.1*cmath.exp(complex(0,math.pi/180*40)))))\n", + "print \"V1in=\",V1in\n", + "\n", + "V1ref=0.5*((10*cmath.exp(complex(0,math.pi/180*0)))-(50*(.1*cmath.exp(complex(0,math.pi/180*40)))))\n", + "print \"V1ref=\",V1ref\n", + "\n", + "V2in=0.5*((12*cmath.exp(complex(0,math.pi/180*30)))+(50*(.15*cmath.exp(complex(0,math.pi/180*100)))))\n", + "print \"V2in=\",V2in\n", + "\n", + "V2ref=0.5*((12*cmath.exp(complex(0,math.pi/180*30)))-(50*(.15*cmath.exp(complex(0,math.pi/180*100)))))\n", + "print \"V2ref=\",V2ref" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V1in= (6.9151111078+1.60696902422j)\n", + "V1ref= (3.0848888922-1.60696902422j)\n", + "V2in= (4.54497175646+6.6930290738j)\n", + "V2ref= (5.84733308896-0.693029073796j)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17, Page 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from fractions import Fraction\n", + "\n", + "#Variable declaration\n", + "n=10.\n", + "\n", + "#Calculations\n", + "S11=(n**2-1)/(n**2+1)\n", + "S11 = str(Fraction(S11).limit_denominator())\n", + "S21=2*n/(n**2+1)\n", + "S21 = str(Fraction(S21).limit_denominator())\n", + "S22=(1-n**2)/(1+n**2)\n", + "S22 = str(Fraction(S22).limit_denominator())\n", + "S12=2*n/(n**2+1)\n", + "S12 = str(Fraction(S12).limit_denominator())\n", + "A=[[S11,S12],[S21,S22]]\n", + "\n", + "#Result\n", + "print \"The S-parameters are:\\n\",A\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The S-parameters are:\n", + "[['99/101', '20/101'], ['20/101', '-99/101']]\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.19, Page 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Zo1=50 #ohms\n", + "Zo2=50 #ohms\n", + "Vs1=1 #V\n", + "Vs2=1 #V\n", + "\n", + "#Calculations\n", + "Z1=complex(0,50)+(50*complex(0,-25)/complex(50,-25))\n", + "S11=(Z1-Zo1)/(Z1+Zo1)\n", + "Z2=(complex(50,50)*complex(0,-25))/complex(50,(50-25))\n", + "S22=(Z2-Zo2)/(Z2+Zo2)\n", + "V2=complex(10,-20)/complex(50,50)+complex(10,-20)*Vs1\n", + "S21=2*V2/Vs1\n", + "V2=complex(10,-30)/complex((50+10),-30)*Vs2\n", + "V1=50/complex(50,50)*V2\n", + "S12=2*V1/Vs2\n", + "A=[[S11,S12],[S21,S22]]\n", + "\n", + "#Result\n", + "print \"The Scattering parameters are:\\n\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Scattering parameters are:\n", + "[[(-0.3333333333333333+0.6666666666666666j), -0.6666666666666666j], [(19.8-40.6j), (-0.3333333333333333-0.6666666666666666j)]]\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb new file mode 100644 index 00000000..9a122fc2 --- /dev/null +++ b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/ch9.ipynb @@ -0,0 +1,668 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:60cf8f4cedd2954f60b5dd5cef461cdc955947faa6d0d2367b10d8fe42d229e7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Filter Design" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "foo=2.05*10**6 #Hz\n", + "fc=2*10**6 #cut-off frequency,Hz\n", + "Zo=75 #nominal impedance,ohms\n", + "\n", + "#Calculations\n", + "Wc=2*math.pi*2*10**6\n", + "L=Zo/Wc*2 #H\n", + "C=2/(Zo*Wc) #F\n", + "m=math.sqrt(1-(fc/foo)**2)\n", + "\n", + "#Results\n", + "print \"m=%.4f\"%m\n", + "print \"m*L/2=%.2e H\"%(m*L/2)\n", + "print \"m*C=%.3e F\"%(m*C)\n", + "print \"(1-m**2)*L/4/m=%.2e\"%((1-m**2)*L/4/m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m=0.2195\n", + "m*L/2=1.31e-06 H\n", + "m*C=4.658e-10 F\n", + "(1-m**2)*L/4/m=1.29e-05\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Zo=75 #image impedance,ohms\n", + "Wc=2*math.pi*2*10**6\n", + "foo=2.05*10**6 #Hz\n", + "\n", + "#Calculations\n", + "L=Zo/Wc*2\n", + "m=0.6\n", + "C=2/(Zo*Wc)\n", + "\n", + "#Results\n", + "print \"m*L/2=%.2e H\"%(m*L/2)\n", + "print \"m*C=%.3e F\"%(m*C/2)\n", + "print \"(1-m^2)*L/4/m=%.2e\"%((1-m**2)*L/2/m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m*L/2=3.58e-06 H\n", + "m*C=6.366e-10 F\n", + "(1-m^2)*L/4/m=6.37e-06\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Zo=75 #nominal impedance,ohms\n", + "Wc=2*math.pi*2*10**6\n", + "foo=1.95*10**6 #Hz\n", + "fc=2*10**6 #Hz\n", + "\n", + "#Calculations\n", + "L=Zo/Wc/2\n", + "C=1./2/(Zo*Wc)\n", + "m=math.sqrt(1-(foo/fc)**2)\n", + "\n", + "#Results\n", + "print \"L=%.3e H\"%L\n", + "print \"C=%.3e F\"%C\n", + "print \"m=%.4f\"%m\n", + "print \"2*C/m=%.4e F\"%(2*C/m)\n", + "print \"L/m=%.4e H\"%(L/m)\n", + "print \"4*m*C/(1-m^2)=%.4e F\"%((4*m*C)/(1-m**2))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L=2.984e-06 H\n", + "C=5.305e-10 F\n", + "m=0.2222\n", + "2*C/m=4.7750e-09 F\n", + "L/m=1.3430e-05 H\n", + "4*m*C/(1-m^2)=4.9602e-10 F\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page 357" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Le=3. #dB\n", + "E=10**(Le/10)-1\n", + "L=15. #dB\n", + "Wc=1\n", + "W=1.3*Wc\n", + "\n", + "#Calculations\n", + "n=1./2*(math.log10(10**(L/10)-1)-math.log10(E))/math.log10(W/Wc)\n", + "m=math.acosh(math.sqrt(10**(0.1*L)-1))/math.acosh(W/Wc)\n", + "\n", + "#Results\n", + "print \"n=%.2f\"%n\n", + "print \"m=%.2f\"%m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n=6.53\n", + "m=3.17\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "L=30. #dB\n", + "W=40*10**6 #Hz\n", + "Wc=10*10**6 #Hz\n", + "Le=3. #dB\n", + "E=10**(Le/10)\n", + "Zo=50. #ohms\n", + "\n", + "#Calculations&Results\n", + "Wc=2*math.pi*10**6*10\n", + "L=Zo/Wc\n", + "C=2./(Zo*Wc)\n", + "n=1./2*(math.log(10**(L/10)-1)-math.log(E-1))/math.log(W/Wc)\n", + "print \"n=%.2f\"%n\n", + "print \"g1=%.0f\\ng2=%.0f\\ng3=%.0f\"%(2*math.sin(math.pi/6),2*math.sin(math.pi/2),2*math.sin(math.pi*5/6))\n", + "print \"L1=L3=%.4e H\"%L\n", + "print \"C2=%.3e F\"%C\n", + "Zo=50 #ohms\n", + "Wc=2*math.pi*10**6*10\n", + "L=Zo*2/Wc\n", + "C=1/(Zo*Wc)\n", + "print \"L2=%.4e H\"%L\n", + "print \"C1=C3=%.4e F\"%C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n=17.17\n", + "g1=1\n", + "g2=2\n", + "g3=1\n", + "L1=L3=7.9577e-07 H\n", + "C2=6.366e-10 F\n", + "L2=1.5915e-06 H\n", + "C1=C3=3.1831e-10 F\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7, Page 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Gr=0.01 #dB\n", + "L = 5. #dB\n", + "W = 400.*10**6 #Hz\n", + "Wc = 100.*10**6 #Hz\n", + "\n", + "#Calculations&Results\n", + "m = math.degrees(math.acosh(math.sqrt((10**(0.1*L)-1)/(10**(0.1*Gr)-1))))/math.degrees(math.acosh(W/Wc))\n", + "print \"m=%.f\"%m\n", + "m=3\n", + "E=math.log(1/math.tanh(Gr/17.37))\n", + "X=math.sinh(E/2/m)\n", + "n=3\n", + "gp=1\n", + "\n", + "for p in range(1,n+1):\n", + " ap=math.sin((2*p-1)*math.pi/2/m)\n", + " bp=X**2+math.sin(p*math.pi/m)**2\n", + " print \"ap=%.1f\\nbp=%.4f\\n\"%(ap,bp)\n", + "\n", + "gp=0.62425\n", + "print \"g0=g4=1\"\n", + "print \"p=1\\tgp=0.62425\"\n", + "for p in range(2,n+1):\n", + " gp=4*math.sin((2*(p-1)-1)*math.pi/2/m)*math.sin((2*p-1)*math.pi/2/m)/(X**2+math.sin((p-1)*math.pi/m)**2)/gp\n", + " print \"p=%.0f\\tgp=%.5f\"%(p,gp)\n", + "\n", + "\n", + "print \"L1=L3=%.4e H\\nC1=%.4e F\"%(75*0.62425/(2*math.pi*10**8),0.9662/(75*2*math.pi*10**8))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m=2\n", + "ap=0.5\n", + "bp=3.2760\n", + "\n", + "ap=1.0\n", + "bp=3.2760\n", + "\n", + "ap=0.5\n", + "bp=2.5260\n", + "\n", + "g0=g4=1\n", + "p=1\tgp=0.62425\n", + "p=2\tgp=0.97798\n", + "p=3\tgp=0.62425\n", + "L1=L3=7.4514e-08 H\n", + "C1=2.0503e-11 F\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Gr=3 #dB\n", + "\n", + "#Calculations&Results\n", + "m=3\n", + "for p in range(1,4):\n", + " ap=math.sin((2*p-1)*math.pi/2/m)\n", + " print \"p=%.0f\\tap=%.1f\"%(p,ap)\n", + "\n", + "\n", + "E=math.log(1/math.tanh(Gr/17.37))\n", + "X=math.sinh(E/2/m)\n", + "print \"\\nE=%.4f\\nX=%.4f\\n\"%(E,X)\n", + "for p in range(1,4):\n", + " bp=X**2+math.sin(p*math.pi/m)**2\n", + " print \"p=%.0f\\tbp=%.4f\"%(p,bp)\n", + "\n", + "gp=3.349\n", + "print \"\\ng0=g4=1\\ng1=3.349\"\n", + "for p in range(2,4):\n", + " gp=4*math.sin((2*(p-1)-1)*math.pi/2/m)*math.sin((2*p-1)*math.pi/2/m)/(X**2+math.sin((p-1)*math.pi/m)**2)/gp\n", + " print \"gp=%.4f\"%gp\n", + "\n", + "print \"\\nL1=L3=%.1e H\\nC2=%.4e F\"%(75*3.349/(2*math.pi*10**8),0.7116/(75*2*math.pi*10**8))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "p=1\tap=0.5\n", + "p=2\tap=1.0\n", + "p=3\tap=0.5\n", + "\n", + "E=1.7660\n", + "X=0.2986\n", + "\n", + "p=1\tbp=0.8392\n", + "p=2\tbp=0.8392\n", + "p=3\tbp=0.0892\n", + "\n", + "g0=g4=1\n", + "g1=3.349\n", + "gp=0.7117\n", + "gp=3.3490\n", + "\n", + "L1=L3=4.0e-07 H\n", + "C2=1.5101e-11 F\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9, Page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "#From example 9.7\n", + "gL=0.62425\n", + "gc=0.9662\n", + "m=3\n", + "\n", + "#Calculations&Results\n", + "Wc=2*math.pi*100*10**6\n", + "CHP=1/(Wc*gL)\n", + "LHP=1/(Wc*gc)\n", + "print \"CHP=%.3e F\\nLHP=%.3e H\"%(CHP,LHP)\n", + "C1=2.5495/75*10**3\n", + "L2=75*1.6472\n", + "print \"C1=C3=%.0f pF\\nL2=%.1f nH\"%(C1,L2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CHP=2.550e-09 F\n", + "LHP=1.647e-09 H\n", + "C1=C3=34 pF\n", + "L2=123.5 nH\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10, Page 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "fl=10*10**6 #Hz\n", + "fu=40*10**6 #Hz\n", + "\n", + "#Calculations&Results\n", + "Wu=2*math.pi*40*10**6\n", + "Wl=2*math.pi*10*10**6\n", + "gc=0.9662\n", + "gL=0.62425\n", + "Wo=2*math.pi*20*10**6\n", + "fo=math.sqrt(fl*fu)\n", + "print \"fo=%.e Hz\"%fo\n", + "\n", + "CBP1=(Wu-Wl)/(Wo**2*gL)\n", + "LBP1=gL/(Wu-Wl)\n", + "print \"CBP1=%.3f nF\\nLBP1=%.4f nH\"%(CBP1/10**-9,LBP1/10**-9)\n", + "\n", + "CBP2=(Wu-Wl)/(Wo**2*gc)\n", + "LBP2=gc/(Wu-Wl)\n", + "print \"\\nCBP2=%.3f nF\\nLBP2=%.4f nH\"%(CBP2/10**-9,LBP2/10**-9)\n", + "\n", + "print \"\\nC1=C3=%.2f pF\"%(19.122*1000/75)\n", + "\n", + "print \"L1=L3=%.4f nH\"%(75*3.3116)\n", + "\n", + "print \"\\nL2=%.4f uH\"%(75*12.354/1000)\n", + "\n", + "print \"C2=%.3f pF\"%(5.1258/75*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fo=2e+07 Hz\n", + "CBP1=19.122 nF\n", + "LBP1=3.3117 nH\n", + "\n", + "CBP2=12.354 nF\n", + "LBP2=5.1259 nH\n", + "\n", + "C1=C3=254.96 pF\n", + "L1=L3=248.3700 nH\n", + "\n", + "L2=0.9265 uH\n", + "C2=68.344 pF\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11, Page 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "fl=10*10**6 #Hz\n", + "fu=40*10**6 #Hz\n", + "\n", + "#Calculations&Results\n", + "Wu=2*math.pi*40*10**6\n", + "Wl=2*math.pi*10*10**6\n", + "gc=2\n", + "gL=1\n", + "Wo=2*math.pi*20*10**6\n", + "fo=math.sqrt(fl*fu)\n", + "print \"fo=%.e Hz\"%fo\n", + "\n", + "LBS1=(Wu-Wl)/(Wo**2*gL)\n", + "CBS1=gL/(Wu-Wl)\n", + "print \"CBS1=%.3f nF\\nLBS1=%.2f nH\"%(CBS1/10**-9,LBS1/10**-9)\n", + "CBS2=1./gc/(Wu-Wl)\n", + "LBS2=(Wu-Wl)*gc/(Wo**2)\n", + "\n", + "print \"\\nCBS2=%.2f nF\\nLBS2=%.3f nH\"%(LBS2/10**-9,CBS2/10**-9)\n", + "\n", + "\n", + "print \"\\nC1=C3=%.2f pF\"%(5.305/75*1000)\n", + "\n", + "print \"L1=L3=%.1f nH\"%(75*11.94)\n", + "\n", + "print \"L2=%.1f uH\"%(75*2.653/1000)\n", + "\n", + "print \"C2=%.1f pF\"%(23.87/75*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fo=2e+07 Hz\n", + "CBS1=5.305 nF\n", + "LBS1=11.94 nH\n", + "\n", + "CBS2=23.87 nF\n", + "LBS2=2.653 nH\n", + "\n", + "C1=C3=70.73 pF\n", + "L1=L3=895.5 nH\n", + "L2=0.2 uH\n", + "C2=318.3 pF\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12, Page 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "print \"go=g4=1\"\n", + "n=3.\n", + "\n", + "#Calculations&Results\n", + "for p in range(1,3):\n", + " gp=2*math.sin((2*p-1)*math.pi/2/n)\n", + " print \"gp=%.f\"%gp\n", + "\n", + "print \"Q1=Q3=%.4f rad=%.1f degree\"%(50./150,50./150*180/math.pi)\n", + "print \"Q2=%.2f rad=%.2f degree\"%(30*2./50,30*2./50*180/math.pi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "go=g4=1\n", + "gp=1\n", + "gp=2\n", + "Q1=Q3=0.3333 rad=19.1 degree\n", + "Q2=1.20 rad=68.75 degree\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13, Page 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "n=3\n", + "print \"go=g4=1\"\n", + "\n", + "#Calculations&Results\n", + "for p in range(1,n+1):\n", + " gp=2*math.sin((2*p-1)*math.pi/2/n)\n", + " print \"gp=%.f\"%gp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "go=g4=1\n", + "gp=1\n", + "gp=2\n", + "gp=1\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png new file mode 100644 index 00000000..30a6d77b Binary files /dev/null and b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/S-parameters.png differ diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png new file mode 100644 index 00000000..406a0613 Binary files /dev/null and b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/load_imp.png differ diff --git a/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png new file mode 100644 index 00000000..97d43bd7 Binary files /dev/null and b/Radio_-_Frequency_And_Microwave_Communication_Circuits_by_D._K._Mishra/screenshots/polarization_loss_factor.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c1.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c1.png new file mode 100755 index 00000000..f88a29f4 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c1.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c2.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c2.png new file mode 100755 index 00000000..200865e5 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c2.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c3.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c3.png new file mode 100755 index 00000000..b49edb95 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits/screenshots/c3.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies.ipynb new file mode 100755 index 00000000..8c2f7de1 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ee2b5aed62ff730fdec8f040b584eb56fa1107a7a40b77edd4cd70e0f5614cd2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Switched Mode Power Supplies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=12 #load\n", + "D=0.8 #duty cycle\n", + "P0=20 #average power\n", + "\n", + "#CALCULATIONS\n", + "V1=V2/D #V\n", + "I1=P0/V1\n", + "\n", + "#RESULTS\n", + "print\"The value of I1=\",round(I1,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1= 1.333 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=7 #Load \u2126\n", + "\n", + "#CALCULATIONS\n", + "fs=30*10**3 #kHz.\n", + "Lc=50*10**-6 #Inductor H\n", + "D=1-((2*fs*Lc)/Rl)\n", + "\n", + "#RESULTS\n", + "print\"The value of D=\",round(D,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of D= 0.571\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=5 #V\n", + "V1=12 #V\n", + "Rl=5 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "D=V2/V1\n", + "p0=V2**2/Rl\n", + "\n", + "#RESULTS\n", + "print\"The value of D=\",round(D,3);\n", + "print\"The value of p0=\",round(p0,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of D= 0.417\n", + "The value of p0= 5.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page no:297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "D=0.6 #Duty cycle\n", + "V1=24 #V\n", + "Rl=7\n", + "\n", + "#CALCULATIONS\n", + "fs=30*10**3\n", + "L=50*10**-6\n", + "V2=D*V1\n", + "Imax=V2/Rl+((V1-V2)*D)/(2*fs*L) #maximum values of the inductor current\n", + "Imin=V2/Rl-((V1-V2)*D)/(2*fs*L) #minimum values of the inductor current\n", + "\n", + "#RESULTS\n", + "print\"The value of Imax=\",round(Imax,3),\"A\";\n", + "print\"The value of Imin=\",round(Imin,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Imax= 3.977 A\n", + "The value of Imin= 0.137 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9, Page no:298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=12\n", + "D=0.6\n", + "P0=60 #w Supplying power \n", + "\n", + "#CALCULATIONS\n", + "V2=V1/(1-D) #output voltage\n", + "Rl=V2**2/P0 #load resistance\n", + "I2=V2/Rl #load current\n", + "\n", + "#RESULTS\n", + "print\"The value of V2=\",round(V2,3),\"V\";\n", + "print\"The value of Rl=\",round(Rl,3),\"ohm\";\n", + "print\"The value of I2=\",round(I2,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V2= 30.0 V\n", + "The value of Rl= 15.0 ohm\n", + "The value of I2= 2.0 A\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb new file mode 100644 index 00000000..8c2f7de1 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_10_Switched_Mode_Power_Supplies_1.ipynb @@ -0,0 +1,234 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ee2b5aed62ff730fdec8f040b584eb56fa1107a7a40b77edd4cd70e0f5614cd2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 Switched Mode Power Supplies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=12 #load\n", + "D=0.8 #duty cycle\n", + "P0=20 #average power\n", + "\n", + "#CALCULATIONS\n", + "V1=V2/D #V\n", + "I1=P0/V1\n", + "\n", + "#RESULTS\n", + "print\"The value of I1=\",round(I1,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I1= 1.333 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=7 #Load \u2126\n", + "\n", + "#CALCULATIONS\n", + "fs=30*10**3 #kHz.\n", + "Lc=50*10**-6 #Inductor H\n", + "D=1-((2*fs*Lc)/Rl)\n", + "\n", + "#RESULTS\n", + "print\"The value of D=\",round(D,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of D= 0.571\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 , Page no:296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=5 #V\n", + "V1=12 #V\n", + "Rl=5 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "D=V2/V1\n", + "p0=V2**2/Rl\n", + "\n", + "#RESULTS\n", + "print\"The value of D=\",round(D,3);\n", + "print\"The value of p0=\",round(p0,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of D= 0.417\n", + "The value of p0= 5.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page no:297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "D=0.6 #Duty cycle\n", + "V1=24 #V\n", + "Rl=7\n", + "\n", + "#CALCULATIONS\n", + "fs=30*10**3\n", + "L=50*10**-6\n", + "V2=D*V1\n", + "Imax=V2/Rl+((V1-V2)*D)/(2*fs*L) #maximum values of the inductor current\n", + "Imin=V2/Rl-((V1-V2)*D)/(2*fs*L) #minimum values of the inductor current\n", + "\n", + "#RESULTS\n", + "print\"The value of Imax=\",round(Imax,3),\"A\";\n", + "print\"The value of Imin=\",round(Imin,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Imax= 3.977 A\n", + "The value of Imin= 0.137 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9, Page no:298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=12\n", + "D=0.6\n", + "P0=60 #w Supplying power \n", + "\n", + "#CALCULATIONS\n", + "V2=V1/(1-D) #output voltage\n", + "Rl=V2**2/P0 #load resistance\n", + "I2=V2/Rl #load current\n", + "\n", + "#RESULTS\n", + "print\"The value of V2=\",round(V2,3),\"V\";\n", + "print\"The value of Rl=\",round(Rl,3),\"ohm\";\n", + "print\"The value of I2=\",round(I2,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V2= 30.0 V\n", + "The value of Rl= 15.0 ohm\n", + "The value of I2= 2.0 A\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb new file mode 100644 index 00000000..0fac05b3 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_Point_of_View.ipynb @@ -0,0 +1,605 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cf20ba46b51c9494db0e034252830864abb092d034eb15c0b909a6034baa1c14" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Circuit Analysis Port Point of View" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 , Page no:4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=1 #ohm\n", + "R2=1 #ohm\n", + "R3=1 #ohm\n", + "Vs=10 #simWtv\n", + "Vb=10 #v\n", + "a=0\n", + "Is=3 #A\n", + "\n", + "#CALCULATIONS\n", + "V21=1/3*Vs #simWtv\n", + "i21=V21/R2\n", + "temp=R1*R2/(R1+R2) #Temp=R1||R2\n", + "i32=Vb/(R3+temp)\n", + "i22=(R1/(R1+R2))*i32\n", + "i2=i21+i22\n", + "i1=(Vs/(R1+R2))\n", + "\n", + "#RESULTS\n", + "print\"Find the current i2 by superposition theorem\";\n", + "print\"the current i2 by superposition theorem =\",round(i2,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the current i2 by superposition theorem\n", + "the current i2 by superposition theorem = 6.667 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 , Page no:5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4 #V\n", + "Ia=2 #A\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Vth=Va+Ia*R1\n", + "Zth=R1+R2\n", + "\n", + "#RESULTS\n", + "print\"Find the Thevenin equivalent voltage VTh and impedance ZTh\";\n", + "print\"Thevenin equivalent voltage VTh is =\",round(Vth),\"V\";\n", + "print\"Impedance ZTh is =\",round(Zth,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Thevenin equivalent voltage VTh and impedance ZTh\n", + "Thevenin equivalent voltage VTh is = 8.0 V\n", + "Impedance ZTh is = 5.0 Ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 , Page no:6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Vth=Va/(1-a*R1)\n", + "Vdp=R1+R2\n", + "Idp=1-a*R1\n", + "Zth=Vdp/Idp\n", + "\n", + "#RESULTS\n", + "print\"Find the Thevenin equivalent voltage VTh and impedance ZTh\";\n", + "print\"Thevenin equivalent voltage VTh is =\",round(Vth,3),\"V\";\n", + "print\"Impedance ZTh is =\",round(Zth,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Thevenin equivalent voltage VTh and impedance ZTh\n", + "Thevenin equivalent voltage VTh is = 8.0 V\n", + "Impedance ZTh is = 10.0 Ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 , Page no:17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "Ia=(Va/(R1+R2))+((R1*I)/(R1+R2))\n", + "Yn=1/Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent current IN and admittance YN\";\n", + "print\"Norton equivalent current IN is =\",round(Ia,2),\"V\";\n", + "print\"Admittance YN is =\",round(Yn,2),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent current IN and admittance YN\n", + "Norton equivalent current IN is = 1.6 V\n", + "Admittance YN is = 0.2 Ohm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 , Page no:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "I=(V1-V2)/(R1+R2)\n", + "Vth=V1-I*R1\n", + "Zth=(R1*R2)/(R1+R2)\n", + "\n", + "#RESULTS\n", + "print\"Find the The\u00b4venin equivalent for the network to the left of terminals a; b.\";\n", + "print\"The value of I is =\",round(I,3),\"A\";\n", + "print\"The value of Thevenin Equivalent voltage=\",round(Vth,3),\"V\";\n", + "print\"The value of Thevenin Impedance =\",round(Zth,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the The\u00b4venin equivalent for the network to the left of terminals a; b.\n", + "The value of I is = -0.5 A\n", + "The value of Thevenin Equivalent voltage= 12.0 V\n", + "The value of Thevenin Impedance = 2.4 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 , Page no:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Iab1=V1/R1\n", + "Iab2=V2/R2\n", + "In=Iab1+Iab2\n", + "Zth=(R1*R2)/(R1+R2)\n", + "Yn=1/Zth #Rth=Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent for the network to the left of termin\";\n", + "print\"Then by superpostion\";\n", + "print\"The value of In =\",round(In,3),\"A and Yn=\",round(Yn,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent for the network to the left of termin\n", + "Then by superpostion\n", + "The value of In = 5.0 A and Yn= 0.417 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 , Page no:20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "I=(V1-V2)/(R1+R2)\n", + "Vth=V1-I*R1\n", + "Iab1=V1/R1\n", + "Iab2=V2/R2\n", + "In=Iab1+Iab2\n", + "Zth=Vth/In\n", + "\n", + "#RESULTS\n", + "print\"Find the The\u00b4venin impedance as the ratio of open-circuit voltage to short-circuit current\";\n", + "print\"The value of I is =\",round(I,3),\"A\";\n", + "print\"Then by superpostion\"\n", + "print\"The value of Zth is =\",round(Zth,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the The\u00b4venin impedance as the ratio of open-circuit voltage to short-circuit current\n", + "The value of I is = -0.5 A\n", + "Then by superpostion\n", + "The value of Zth is = 2.4 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 , Page no:20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "Ia=(Va/(R1+R2))+((R1*I)/(R1+R2))\n", + "Yn=1/Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent current IN and admittance YN\";\n", + "print\"Norton equivalent current IN is =\",round(Ia,3),\"V\";\n", + "print\"admittance YN is =\",round(Yn,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent current IN and admittance YN\n", + "Norton equivalent current IN is = 1.6 V\n", + "admittance YN is = 0.2 Ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 , Page no:21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "V1=1.231*(10**-2) #V\n", + "I1=1*(10**-3) #A\n", + "Z11=V1/I1 #Ohm\n", + "V2=2.308*(10**-3) #V\n", + "I2=1*(10**-3) #A\n", + "Z12=V2/I2 #Ohm\n", + "V3=4.615*(10**-3) #V\n", + "I3=1*(10**-3) #A\n", + "Z21=V3/I3 #Ohm\n", + "V4=4.615*(10**-3) #V\n", + "I4=1*(10**-3) #A\n", + "Z22=V4/I4 #Ohm\n", + "\n", + "#RESULTS\n", + "print\"Solve Problem 1.11 using a SPICE method\";\n", + "print\"The value of Z11=\",round(Z11,3),\"Ohm\";\n", + "print\"The value of Z12=\",round(Z12,3),\"Ohm\";\n", + "print\"The value of Z21=\",round(Z21,3),\"Ohm\";\n", + "print\"The value of Z22=\",round(Z22,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solve Problem 1.11 using a SPICE method\n", + "The value of Z11= 12.31 Ohm\n", + "The value of Z12= 2.308 Ohm\n", + "The value of Z21= 4.615 Ohm\n", + "The value of Z22= 4.615 Ohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 , Page no:22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=0 #V\n", + "Ia=0 #A\n", + "#h11=V1/I1\n", + "h11=10 #ohm\n", + "#Here I2=-I1\n", + "#Therefor h21=I2/I1 h21=-1\n", + "h21=-1 #ohm\n", + "I1=0 #A\n", + "h12=0.5 #Ohm\n", + "I2=1.3 #A\n", + "V2=6 #V\n", + "\n", + "#CALCULATIONS\n", + "Ia=V2/6 #A\n", + "V1=V2-10*(0.3) #V\n", + "h22=I2/V2 #Ohm\n", + "\n", + "#RESULTS\n", + "print\"Determine the h parameters for the two-port network\";\n", + "print\"The value of h11=10.000 ohm h21=\",round(h11,3),\"ohm h12=\",round(h21,3),\"ohm h12=\",round(h12,3),\"ohm h22=\",round(h22,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Determine the h parameters for the two-port network\n", + "The value of h11=10.000 ohm h21= 10.0 ohm h12= -1.0 ohm h12= 0.5 ohm h22= 0.217 ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 , Page no:23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "#Let V=V2/V1\n", + "RL=2000\n", + "h11=100 #ohm\n", + "h12=0.0025 #ohm\n", + "h21=20 #ohm\n", + "h22=0.001 #mS\n", + "\n", + "#CALCULATIONS\n", + "V=1/(h12-(h11/h21)*((1/RL)+h22))\n", + "\n", + "#RESULTS\n", + "print\"Find the voltage-gain ratio V2/V1\";\n", + "print\"The value of V2/V1=\",round(V,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the voltage-gain ratio V2/V1\n", + "The value of V2/V1= -200.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 , Page no:25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "T=1\n", + "\n", + "#CALCULATIONS\n", + "I0=(1/T)*(4*(T/2)+1*(T/2)) #A\n", + "I=(2*(1/T)*((4**2)*(T/2)+(1**2)*(T/2)))**(1/2) #A\n", + "\n", + "#RESULTS\n", + "print\"Find (a) the average value of the current and (b) the rms value of the current.\";\n", + "print\"I0=\",round(I0,3),\"A\";\n", + "print\"I=\",round(I,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find (a) the average value of the current and (b) the rms value of the current.\n", + "I0= 2.5 A\n", + "I= 4.123 A\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_point_of_view.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_point_of_view.ipynb new file mode 100755 index 00000000..e47972f0 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_1_Circuit_Analysis_Port_point_of_view.ipynb @@ -0,0 +1,605 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:959edcad9ed34e3358a9b6930a48ed4b47caa1752a9965d8c47fa6f6d1cce30c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Circuit Analysis Port point of view" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 , Page no:4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=1 #ohm\n", + "R2=1 #ohm\n", + "R3=1 #ohm\n", + "Vs=10 #simWtv\n", + "Vb=10 #v\n", + "a=0\n", + "Is=3 #A\n", + "\n", + "#CALCULATIONS\n", + "V21=1/3*Vs #simWtv\n", + "i21=V21/R2\n", + "temp=R1*R2/(R1+R2) #Temp=R1||R2\n", + "i32=Vb/(R3+temp)\n", + "i22=(R1/(R1+R2))*i32\n", + "i2=i21+i22\n", + "i1=(Vs/(R1+R2))\n", + "\n", + "#RESULTS\n", + "print\"Find the current i2 by superposition theorem\";\n", + "print\"the current i2 by superposition theorem =\",round(i2,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the current i2 by superposition theorem\n", + "the current i2 by superposition theorem = 6.667 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 , Page no:5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4 #V\n", + "Ia=2 #A\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Vth=Va+Ia*R1\n", + "Zth=R1+R2\n", + "\n", + "#RESULTS\n", + "print\"Find the Thevenin equivalent voltage VTh and impedance ZTh\";\n", + "print\"Thevenin equivalent voltage VTh is =\",round(Vth),\"V\";\n", + "print\"Impedance ZTh is =\",round(Zth,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Thevenin equivalent voltage VTh and impedance ZTh\n", + "Thevenin equivalent voltage VTh is = 8.0 V\n", + "Impedance ZTh is = 5.0 Ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 , Page no:6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Vth=Va/(1-a*R1)\n", + "Vdp=R1+R2\n", + "Idp=1-a*R1\n", + "Zth=Vdp/Idp\n", + "\n", + "#RESULTS\n", + "print\"Find the Thevenin equivalent voltage VTh and impedance ZTh\";\n", + "print\"Thevenin equivalent voltage VTh is =\",round(Vth,3),\"V\";\n", + "print\"Impedance ZTh is =\",round(Zth,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Thevenin equivalent voltage VTh and impedance ZTh\n", + "Thevenin equivalent voltage VTh is = 8.0 V\n", + "Impedance ZTh is = 10.0 Ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 , Page no:17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "Ia=(Va/(R1+R2))+((R1*I)/(R1+R2))\n", + "Yn=1/Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent current IN and admittance YN\";\n", + "print\"Norton equivalent current IN is =\",round(Ia,2),\"V\";\n", + "print\"Admittance YN is =\",round(Yn,2),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent current IN and admittance YN\n", + "Norton equivalent current IN is = 1.6 V\n", + "Admittance YN is = 0.2 Ohm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 , Page no:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "I=(V1-V2)/(R1+R2)\n", + "Vth=V1-I*R1\n", + "Zth=(R1*R2)/(R1+R2)\n", + "\n", + "#RESULTS\n", + "print\"Find the The\u00b4venin equivalent for the network to the left of terminals a; b.\";\n", + "print\"The value of I is =\",round(I,3),\"A\";\n", + "print\"The value of Thevenin Equivalent voltage=\",round(Vth,3),\"V\";\n", + "print\"The value of Thevenin Impedance =\",round(Zth,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the The\u00b4venin equivalent for the network to the left of terminals a; b.\n", + "The value of I is = -0.5 A\n", + "The value of Thevenin Equivalent voltage= 12.0 V\n", + "The value of Thevenin Impedance = 2.4 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 , Page no:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "Iab1=V1/R1\n", + "Iab2=V2/R2\n", + "In=Iab1+Iab2\n", + "Zth=(R1*R2)/(R1+R2)\n", + "Yn=1/Zth #Rth=Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent for the network to the left of termin\";\n", + "print\"Then by superpostion\";\n", + "print\"The value of In =\",round(In,3),\"A and Yn=\",round(Yn,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent for the network to the left of termin\n", + "Then by superpostion\n", + "The value of In = 5.0 A and Yn= 0.417 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 , Page no:20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V1=10 #V\n", + "V2=15 #V\n", + "R1=4 #ohm\n", + "R2=6 #ohm\n", + "\n", + "#CALCULATIONS\n", + "I=(V1-V2)/(R1+R2)\n", + "Vth=V1-I*R1\n", + "Iab1=V1/R1\n", + "Iab2=V2/R2\n", + "In=Iab1+Iab2\n", + "Zth=Vth/In\n", + "\n", + "#RESULTS\n", + "print\"Find the The\u00b4venin impedance as the ratio of open-circuit voltage to short-circuit current\";\n", + "print\"The value of I is =\",round(I,3),\"A\";\n", + "print\"Then by superpostion\"\n", + "print\"The value of Zth is =\",round(Zth,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the The\u00b4venin impedance as the ratio of open-circuit voltage to short-circuit current\n", + "The value of I is = -0.5 A\n", + "Then by superpostion\n", + "The value of Zth is = 2.4 ohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 , Page no:20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "Ia=(Va/(R1+R2))+((R1*I)/(R1+R2))\n", + "Yn=1/Zth\n", + "\n", + "#RESULTS\n", + "print\"Find the Norton equivalent current IN and admittance YN\";\n", + "print\"Norton equivalent current IN is =\",round(Ia,3),\"V\";\n", + "print\"admittance YN is =\",round(Yn,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the Norton equivalent current IN and admittance YN\n", + "Norton equivalent current IN is = 1.6 V\n", + "admittance YN is = 0.2 Ohm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 , Page no:21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Va=4.0 #V\n", + "a=0.25 #A/V\n", + "R1=2 #ohm\n", + "R2=3 #ohm\n", + "I=2\n", + "Zth=5\n", + "\n", + "#CALCULATIONS\n", + "V1=1.231*(10**-2) #V\n", + "I1=1*(10**-3) #A\n", + "Z11=V1/I1 #Ohm\n", + "V2=2.308*(10**-3) #V\n", + "I2=1*(10**-3) #A\n", + "Z12=V2/I2 #Ohm\n", + "V3=4.615*(10**-3) #V\n", + "I3=1*(10**-3) #A\n", + "Z21=V3/I3 #Ohm\n", + "V4=4.615*(10**-3) #V\n", + "I4=1*(10**-3) #A\n", + "Z22=V4/I4 #Ohm\n", + "\n", + "#RESULTS\n", + "print\"Solve Problem 1.11 using a SPICE method\";\n", + "print\"The value of Z11=\",round(Z11,3),\"Ohm\";\n", + "print\"The value of Z12=\",round(Z12,3),\"Ohm\";\n", + "print\"The value of Z21=\",round(Z21,3),\"Ohm\";\n", + "print\"The value of Z22=\",round(Z22,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solve Problem 1.11 using a SPICE method\n", + "The value of Z11= 12.31 Ohm\n", + "The value of Z12= 2.308 Ohm\n", + "The value of Z21= 4.615 Ohm\n", + "The value of Z22= 4.615 Ohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 , Page no:22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V2=0 #V\n", + "Ia=0 #A\n", + "#h11=V1/I1\n", + "h11=10 #ohm\n", + "#Here I2=-I1\n", + "#Therefor h21=I2/I1 h21=-1\n", + "h21=-1 #ohm\n", + "I1=0 #A\n", + "h12=0.5 #Ohm\n", + "I2=1.3 #A\n", + "V2=6 #V\n", + "\n", + "#CALCULATIONS\n", + "Ia=V2/6 #A\n", + "V1=V2-10*(0.3) #V\n", + "h22=I2/V2 #Ohm\n", + "\n", + "#RESULTS\n", + "print\"Determine the h parameters for the two-port network\";\n", + "print\"The value of h11=10.000 ohm h21=\",round(h11,3),\"ohm h12=\",round(h21,3),\"ohm h12=\",round(h12,3),\"ohm h22=\",round(h22,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Determine the h parameters for the two-port network\n", + "The value of h11=10.000 ohm h21= 10.0 ohm h12= -1.0 ohm h12= 0.5 ohm h22= 0.217 ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 , Page no:23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "#Let V=V2/V1\n", + "RL=2000\n", + "h11=100 #ohm\n", + "h12=0.0025 #ohm\n", + "h21=20 #ohm\n", + "h22=0.001 #mS\n", + "\n", + "#CALCULATIONS\n", + "V=1/(h12-(h11/h21)*((1/RL)+h22))\n", + "\n", + "#RESULTS\n", + "print\"Find the voltage-gain ratio V2/V1\";\n", + "print\"The value of V2/V1=\",round(V,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find the voltage-gain ratio V2/V1\n", + "The value of V2/V1= -200.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 , Page no:25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "T=1\n", + "\n", + "#CALCULATIONS\n", + "I0=(1/T)*(4*(T/2)+1*(T/2)) #A\n", + "I=(2*(1/T)*((4**2)*(T/2)+(1**2)*(T/2)))**(1/2) #A\n", + "\n", + "#RESULTS\n", + "print\"Find (a) the average value of the current and (b) the rms value of the current.\";\n", + "print\"I0=\",round(I0,3),\"A\";\n", + "print\"I=\",round(I,3),\"A\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find (a) the average value of the current and (b) the rms value of the current.\n", + "I0= 2.5 A\n", + "I= 4.123 A\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes.ipynb new file mode 100755 index 00000000..9a036adf --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes.ipynb @@ -0,0 +1,602 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98cea729f1af3b9239b34331490c505c13d69177c4b00cc183482c502c22d490" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Semiconductor Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "n=1\n", + "k=1.38 #x 10^-23\n", + "\n", + "#CALCULATIONS\n", + "T=25+273\n", + "q=1.6 #x 10^-19\n", + "vd=((k*T)/(1.6*(10**4))*4.6151)\n", + "\n", + "#RESULTS\n", + "print\"what range of forward voltage drop vD can (2.1) be approximated\";\n", + "print\"vd =\",round(vd,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "what range of forward voltage drop vD can (2.1) be approximated\n", + "vd = 0.119 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "iD2=(47.73*10) #mA\n", + "\n", + "#RESULTS\n", + "print\"find the forward and reverse saturation current\";\n", + "print\"iD2=\",iD2;\n", + "print\"iD1/(e^(0.3/0.02587)-1)=91nA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "find the forward and reverse saturation current\n", + "iD2= 477.3\n", + "iD1/(e^(0.3/0.02587)-1)=91nA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=100 #k\u2126\n", + "Rs=10 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))\n", + "\n", + "#RESULTS\n", + "print\"find the value of Vl\";\n", + "print\"The value of Vl =\",round(Vl,3),\"vs\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "find the value of Vl\n", + "The value of Vl = 0.909 vs\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 , Page no:50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vs=5 #V\n", + "V2=3 #V\n", + "\n", + "#CALCULATIONS\n", + "iD2=((Vs-V2)/500)*1000 #mA\n", + "\n", + "#RESULTS\n", + "print\"In the circuit D1 and D2 are ideal diodes. Find iD1 and iD2.\";\n", + "print\"iD2=\",round(iD2),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In the circuit D1 and D2 are ideal diodes. Find iD1 and iD2.\n", + "iD2= 4.0 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 , Page no:51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vs=0.1 #cos wtV\n", + "Vb=2 #V\n", + "\n", + "#CALCULATIONS\n", + "Rth=(100**2)/200 #k\u2126\n", + "Rf=(0.7-0.5)/0.004\n", + "\n", + "#RESULTS\n", + "print\"Find iD and vD analytically\";\n", + "print\"(100/200)*(2+0.1cos wt) V\";\n", + "print\"Rth=\",round(Rth,3),\"ohm\";\n", + "print\"Rf=\",round(Rf,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find iD and vD analytically\n", + "(100/200)*(2+0.1cos wt) V\n", + "Rth= 50.0 ohm\n", + "Rf= 50.0 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 , Page no:52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq=5 #mA\n", + "Vdq=0.75 #V\n", + "vh=0.05 #cos wt\n", + "Rth=50 #k\u2126\n", + "rd=50\n", + "\n", + "#CALCULATIONS\n", + "rd=(0.7-0.5)/0.004\n", + "id=(vh/(Rth+rd))*1000\n", + "vd=(rd*id)/1000 #cos wt V\n", + "\n", + "#RESULTS\n", + "print\"Use the small-signal technique to find iD and vD\";\n", + "print\"rd=\",rd,\"ohm\";\n", + "print\"id=\",round(id,3),\"cos wt mA\";\n", + "print\"vd=\",round(vd,3),\"cos wt V\";\n", + "print\"iD = Idq + id = 5+0.5 cos wt mA\";\n", + "print\"vD = Vdq + vd = 0.75+0.025 cos wt V \";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Use the small-signal technique to find iD and vD\n", + "rd= 50.0 ohm\n", + "id= 0.5 cos wt mA\n", + "vd= 0.025 cos wt V\n", + "iD = Idq + id = 5+0.5 cos wt mA\n", + "vD = Vdq + vd = 0.75+0.025 cos wt V \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 , Page no:54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=200 #\u2126\n", + "R1=200 #\u2126\n", + "Rl=50 #k\u2126\n", + "vs=400 #sin wt V\n", + "\n", + "#CALCULATIONS\n", + "vth=(R1/(R1+Rs))*vs\n", + "Rth=((R1*Rs)/(R1+Rs))\n", + "id=-2*10**(-6)\n", + "Rl=Rl*(10**3)\n", + "vD=vth-(id)*(Rth+Rl)\n", + "\n", + "#RESULTS\n", + "print\"vth =\",round(vth,3),\"sin wt V\";\n", + "print\"Rth =\",round(Rth,3),\"ohm\";\n", + "print\"vD =\",round(vD,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vth = 200.0 sin wt V\n", + "Rth = 100.0 ohm\n", + "vD = 200.1 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 , Page no:55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vf1=1 #v\n", + "Vf2=2 #v\n", + "Rf1=100 #\u2126\n", + "Rf2=200 #\u2126\n", + "Vb1=4 #v\n", + "Vb2=6 #v\n", + "R=2000\n", + "\n", + "#CALCULATIONS\n", + "V01=Vf2+((Vb1-Vf1-Vf2)*Rf2)/(R+Rf1+Rf2)\n", + "V02=Vf2+((Vb2-Vf1-Vf2)*Rf2)/(R+Rf1+Rf2)\n", + "Reg=((V02-V01)/V01)*100\n", + "\n", + "#RESULTS\n", + "print\"V01 is=\",round(V01,3),\"and\",round(V02,3);\n", + "print\"Reg =\",round(Reg,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V01 is= 2.087 and 2.261\n", + "Reg = 8.333\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 , Page no:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #\u2126\n", + "Rs=10 #\u2126\n", + "Vs=10 #v\n", + "Vl01=2.5 #V\n", + "Rl1=1000\n", + "Vs1=10\n", + "Rs1=10\n", + "Vl02=4.9 #V\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))*Vs #V\n", + "Vl1=(Rl1/(Rl1+Rs1))*Vs1\n", + "Reg=((Vl02-Vl01)/Vl01)*100\n", + "\n", + "#RESULTS\n", + "print\"Vl =\",round(Vl,3);\n", + "print\"For Rl=1000\";\n", + "print\"Vl1 =\",round(Vl1,3);\n", + "print\"Reg =\",round(Reg);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = 5.0\n", + "For Rl=1000\n", + "Vl1 = 9.901\n", + "Reg = 96.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 , Page no:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #\u2126\n", + "Rs=10 #\u2126\n", + "Vs=-10 #v\n", + "Vl0=2.5 #V\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))*Vs\n", + "\n", + "#RESULTS\n", + "print\"Vl =\",round(Vl,3);\n", + "print\"Vl0 =\",round(Vl0,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = -5.0\n", + "Vl0 = 2.5\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 , Page no:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=6 #k\u2126\n", + "R2=3 #k\u2126\n", + "V1=5 #v\n", + "V2=10 #v\n", + "\n", + "#CALCULATIONS\n", + "Rth=(R1*R2/(R1+R2))\n", + "R2=(R1*Rth/(R1-Rth))\n", + "\n", + "#RESULTS\n", + "print\"Rth =\",round(Rth,3);\n", + "print\"R2 =\",round(R2,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rth = 2.0\n", + "R2 = 3.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 , Page no:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vz=8.2 #V\n", + "Rl=9 #k\u2126\n", + "iZ=1\n", + "Vb=13.2\n", + "Vb1=11.7\n", + "\n", + "#CALCULATIONS\n", + "iL=Vz/Rl #mA\n", + "Rs=((Vb-Vz)/(iZ+iL))\n", + "iZ1=((Vb1-Vz)/Rs)-iL\n", + "\n", + "#RESULTS\n", + "print\"iL =\",round(iL,3),\"A\";\n", + "print\"Rs =\",round(Rs,3),\"ohm\";\n", + "print\"iZ =\",round(iZ1,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iL = 0.911 A\n", + "Rs = 2.616 ohm\n", + "iZ = 0.427\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.31 , Page no:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vz=5.2 #V\n", + "Pdmax=260 #mW\n", + "Vs=15\n", + "\n", + "#CALCULATIONS\n", + "iZmax=Pdmax/Vz #mA\n", + "R=(Vs-Vz)*1000/iZmax\n", + "\n", + "#RESULTS\n", + "print\"iZmax =\",round(iZmax,3),\"mA\";\n", + "print\"R =\",round(R,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iZmax = 50.0 mA\n", + "R = 196.0 ohm\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb new file mode 100644 index 00000000..9a036adf --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_2_Semiconductor_Diodes_1.ipynb @@ -0,0 +1,602 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98cea729f1af3b9239b34331490c505c13d69177c4b00cc183482c502c22d490" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Semiconductor Diodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "n=1\n", + "k=1.38 #x 10^-23\n", + "\n", + "#CALCULATIONS\n", + "T=25+273\n", + "q=1.6 #x 10^-19\n", + "vd=((k*T)/(1.6*(10**4))*4.6151)\n", + "\n", + "#RESULTS\n", + "print\"what range of forward voltage drop vD can (2.1) be approximated\";\n", + "print\"vd =\",round(vd,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "what range of forward voltage drop vD can (2.1) be approximated\n", + "vd = 0.119 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "iD2=(47.73*10) #mA\n", + "\n", + "#RESULTS\n", + "print\"find the forward and reverse saturation current\";\n", + "print\"iD2=\",iD2;\n", + "print\"iD1/(e^(0.3/0.02587)-1)=91nA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "find the forward and reverse saturation current\n", + "iD2= 477.3\n", + "iD1/(e^(0.3/0.02587)-1)=91nA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page no:48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=100 #k\u2126\n", + "Rs=10 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))\n", + "\n", + "#RESULTS\n", + "print\"find the value of Vl\";\n", + "print\"The value of Vl =\",round(Vl,3),\"vs\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "find the value of Vl\n", + "The value of Vl = 0.909 vs\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 , Page no:50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vs=5 #V\n", + "V2=3 #V\n", + "\n", + "#CALCULATIONS\n", + "iD2=((Vs-V2)/500)*1000 #mA\n", + "\n", + "#RESULTS\n", + "print\"In the circuit D1 and D2 are ideal diodes. Find iD1 and iD2.\";\n", + "print\"iD2=\",round(iD2),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In the circuit D1 and D2 are ideal diodes. Find iD1 and iD2.\n", + "iD2= 4.0 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 , Page no:51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vs=0.1 #cos wtV\n", + "Vb=2 #V\n", + "\n", + "#CALCULATIONS\n", + "Rth=(100**2)/200 #k\u2126\n", + "Rf=(0.7-0.5)/0.004\n", + "\n", + "#RESULTS\n", + "print\"Find iD and vD analytically\";\n", + "print\"(100/200)*(2+0.1cos wt) V\";\n", + "print\"Rth=\",round(Rth,3),\"ohm\";\n", + "print\"Rf=\",round(Rf,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Find iD and vD analytically\n", + "(100/200)*(2+0.1cos wt) V\n", + "Rth= 50.0 ohm\n", + "Rf= 50.0 ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 , Page no:52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq=5 #mA\n", + "Vdq=0.75 #V\n", + "vh=0.05 #cos wt\n", + "Rth=50 #k\u2126\n", + "rd=50\n", + "\n", + "#CALCULATIONS\n", + "rd=(0.7-0.5)/0.004\n", + "id=(vh/(Rth+rd))*1000\n", + "vd=(rd*id)/1000 #cos wt V\n", + "\n", + "#RESULTS\n", + "print\"Use the small-signal technique to find iD and vD\";\n", + "print\"rd=\",rd,\"ohm\";\n", + "print\"id=\",round(id,3),\"cos wt mA\";\n", + "print\"vd=\",round(vd,3),\"cos wt V\";\n", + "print\"iD = Idq + id = 5+0.5 cos wt mA\";\n", + "print\"vD = Vdq + vd = 0.75+0.025 cos wt V \";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Use the small-signal technique to find iD and vD\n", + "rd= 50.0 ohm\n", + "id= 0.5 cos wt mA\n", + "vd= 0.025 cos wt V\n", + "iD = Idq + id = 5+0.5 cos wt mA\n", + "vD = Vdq + vd = 0.75+0.025 cos wt V \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 , Page no:54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=200 #\u2126\n", + "R1=200 #\u2126\n", + "Rl=50 #k\u2126\n", + "vs=400 #sin wt V\n", + "\n", + "#CALCULATIONS\n", + "vth=(R1/(R1+Rs))*vs\n", + "Rth=((R1*Rs)/(R1+Rs))\n", + "id=-2*10**(-6)\n", + "Rl=Rl*(10**3)\n", + "vD=vth-(id)*(Rth+Rl)\n", + "\n", + "#RESULTS\n", + "print\"vth =\",round(vth,3),\"sin wt V\";\n", + "print\"Rth =\",round(Rth,3),\"ohm\";\n", + "print\"vD =\",round(vD,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vth = 200.0 sin wt V\n", + "Rth = 100.0 ohm\n", + "vD = 200.1 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 , Page no:55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vf1=1 #v\n", + "Vf2=2 #v\n", + "Rf1=100 #\u2126\n", + "Rf2=200 #\u2126\n", + "Vb1=4 #v\n", + "Vb2=6 #v\n", + "R=2000\n", + "\n", + "#CALCULATIONS\n", + "V01=Vf2+((Vb1-Vf1-Vf2)*Rf2)/(R+Rf1+Rf2)\n", + "V02=Vf2+((Vb2-Vf1-Vf2)*Rf2)/(R+Rf1+Rf2)\n", + "Reg=((V02-V01)/V01)*100\n", + "\n", + "#RESULTS\n", + "print\"V01 is=\",round(V01,3),\"and\",round(V02,3);\n", + "print\"Reg =\",round(Reg,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V01 is= 2.087 and 2.261\n", + "Reg = 8.333\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 , Page no:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #\u2126\n", + "Rs=10 #\u2126\n", + "Vs=10 #v\n", + "Vl01=2.5 #V\n", + "Rl1=1000\n", + "Vs1=10\n", + "Rs1=10\n", + "Vl02=4.9 #V\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))*Vs #V\n", + "Vl1=(Rl1/(Rl1+Rs1))*Vs1\n", + "Reg=((Vl02-Vl01)/Vl01)*100\n", + "\n", + "#RESULTS\n", + "print\"Vl =\",round(Vl,3);\n", + "print\"For Rl=1000\";\n", + "print\"Vl1 =\",round(Vl1,3);\n", + "print\"Reg =\",round(Reg);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = 5.0\n", + "For Rl=1000\n", + "Vl1 = 9.901\n", + "Reg = 96.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 , Page no:56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #\u2126\n", + "Rs=10 #\u2126\n", + "Vs=-10 #v\n", + "Vl0=2.5 #V\n", + "\n", + "#CALCULATIONS\n", + "Vl=(Rl/(Rl+Rs))*Vs\n", + "\n", + "#RESULTS\n", + "print\"Vl =\",round(Vl,3);\n", + "print\"Vl0 =\",round(Vl0,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vl = -5.0\n", + "Vl0 = 2.5\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.26 , Page no:61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=6 #k\u2126\n", + "R2=3 #k\u2126\n", + "V1=5 #v\n", + "V2=10 #v\n", + "\n", + "#CALCULATIONS\n", + "Rth=(R1*R2/(R1+R2))\n", + "R2=(R1*Rth/(R1-Rth))\n", + "\n", + "#RESULTS\n", + "print\"Rth =\",round(Rth,3);\n", + "print\"R2 =\",round(R2,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rth = 2.0\n", + "R2 = 3.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.30 , Page no:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vz=8.2 #V\n", + "Rl=9 #k\u2126\n", + "iZ=1\n", + "Vb=13.2\n", + "Vb1=11.7\n", + "\n", + "#CALCULATIONS\n", + "iL=Vz/Rl #mA\n", + "Rs=((Vb-Vz)/(iZ+iL))\n", + "iZ1=((Vb1-Vz)/Rs)-iL\n", + "\n", + "#RESULTS\n", + "print\"iL =\",round(iL,3),\"A\";\n", + "print\"Rs =\",round(Rs,3),\"ohm\";\n", + "print\"iZ =\",round(iZ1,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iL = 0.911 A\n", + "Rs = 2.616 ohm\n", + "iZ = 0.427\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.31 , Page no:65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vz=5.2 #V\n", + "Pdmax=260 #mW\n", + "Vs=15\n", + "\n", + "#CALCULATIONS\n", + "iZmax=Pdmax/Vz #mA\n", + "R=(Vs-Vz)*1000/iZmax\n", + "\n", + "#RESULTS\n", + "print\"iZmax =\",round(iZmax,3),\"mA\";\n", + "print\"R =\",round(R,3),\"ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "iZmax = 50.0 mA\n", + "R = 196.0 ohm\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_CHARACTERISTICS_OF_BIPOLAR_JUNCTION_TRANSISTORS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_CHARACTERISTICS_OF_BIPOLAR_JUNCTION_TRANSISTORS.ipynb new file mode 100755 index 00000000..afdc5057 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_CHARACTERISTICS_OF_BIPOLAR_JUNCTION_TRANSISTORS.ipynb @@ -0,0 +1,760 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:31241e97ce14e23180452a4f4c4d016f2cce3d819dc07ea36253a26d0cb306d3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 CHARACTERISTICS OF BIPOLAR JUNCTION TRANSISTORS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 , Page no:81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "betaa=50\n", + "Ic=1.2 #mA\n", + "\n", + "#CALCULATIONS\n", + "Iceo=3*10**-3 #mA\n", + "Ib=((Ic-Iceo)/betaa)*1000 #mA\n", + "IE=(Ic)-(Ib*10**-3)\n", + "\n", + "#RESULTS\n", + "print\"Ib =\",round(Ib,2),\"X 10^-3 mA\";\n", + "print\"IE =\",round(IE,2),\"m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 23.94 X 10^-3 mA\n", + "IE = 1.18 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "betaa=100\n", + "Ib=0 #mA\n", + "Icbo=5 #V #mA\n", + "Ib=40\n", + "\n", + "#CALCULATIONS\n", + "Iceo=(betaa+1)*Icbo #mA\n", + "Ic=((betaa*Ib)+(betaa+1)*Icbo)/1000\n", + "\n", + "#RESULTS\n", + "print\"When Ib =0 Iceo =\",round(Iceo,3),\"mA\";\n", + "print\"When Ib =40 Ic =\",round(Ic,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When Ib =0 Iceo = 505.0 mA\n", + "When Ib =40 Ic = 4.505 mA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "alpha=0.98\n", + "\n", + "#CALCULATIONS\n", + "betaa=alpha/(1-alpha)\n", + "Icbo=(5*10**-3) #mA\n", + "Iceo=(betaa+1)*Icbo #mA\n", + "Ibq=100*10**-3\n", + "Icq=(betaa*Ibq)+Iceo\n", + "Ieq=Icq+Ibq\n", + "\n", + "#RESULTS\n", + "print\"Iceo =\",round(Iceo,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Iceo = 0.25 mA\n", + "Icq = 5.15 mA\n", + "Ieq = 5.25 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "alpha=0.98\n", + "\n", + "#CALCULATIONS\n", + "betaa=alpha/(1-alpha)\n", + "Icq=1.47 #mA\n", + "Ieq=Icq/alpha #mA\n", + "\n", + "#RESULTS\n", + "print\"Beta =\",round(betaa,3);\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Beta = 49.0\n", + "Ieq = 1.5 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 , Page no:84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vbb=6 #V\n", + "Vbeq=0.7 #V\n", + "Ibq=40 #10^-6\n", + "\n", + "#CALCULATIONS\n", + "Rb=((Vbb-Vbeq)/Ibq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Rb =\",round(Rb,3),\"k ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rb = 132.5 k ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 , Page no:84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=100\n", + "\n", + "#CALCULATIONS\n", + "a=b/(b+1)\n", + "Ibq=20 #10**-6 #mA\n", + "Icq=(b*Ibq)/1000 #mA\n", + "Ieq=Icq/a #mA\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.0 mA\n", + "Ieq = 2.02 mA\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "\n", + "#CALCULATIONS\n", + "a=b/(b+1)\n", + "Ibq=40 #10**-6 #mA\n", + "Ieq=(Ibq/(1-a))/1000 #mA\n", + "Icq=(b*Ibq)/1000\n", + "\n", + "#RESULTS\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq = 3.24 mA\n", + "Icq = 3.2 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=14 #V\n", + "Icq=2.25 #mA\n", + "\n", + "#CALCULATIONS\n", + "Rc=(14/(6.5*10**-3))/1000 #k\u2126\n", + "Ibq=20*10**-3 #mA\n", + "Ieq=Icq+Ibq #mA\n", + "b=Icq/Ibq\n", + "\n", + "#RESULTS\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";\n", + "print\"Beta =\",round(b,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq = 2.27 mA\n", + "Beta = 112.5 mA\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=70\n", + "Vcc=15 #V\n", + "Vbeq=0.7 #V\n", + "Iceo=1.42 #mA\n", + "Rb=500 #*10^3 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Ibq=((Vcc-Vbeq)/Rb)*1000\n", + "Icq=((b*Ibq/1000)+Iceo)\n", + "\n", + "#RESULTS\n", + "print\"Ibq =\",round(Ibq,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ibq = 28.6 mA\n", + "Icq = 3.422 mA\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 , Page no:87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vceq=-6.4 #V\n", + "Vbeq=-0.3 #V\n", + "Vee=2\n", + "Ieq=3\n", + "\n", + "#CALCULATIONS\n", + "Vcbq=Vceq-Vbeq #V\n", + "Re=((Vee+Vbeq)/Ieq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Vcbq =\",round(Vcbq,3),\"V\";\n", + "print\"Re =\",round(Re,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vcbq = -6.1 V\n", + "Re = 566.667 Ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 , Page no:88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=12 #V\n", + "Vceq=6 #V\n", + "hf=100\n", + "Rc=2 #*10^3 #k\u2126\n", + "Vbeq=0.7\n", + "\n", + "#CALCULATIONS\n", + "Ibq=((Vcc-Vceq)/((hf+1)*Rc))*1000\n", + "Rf=((Vceq-Vbeq)/Ibq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Ibq =\",round(Ibq,3),\"mA\";\n", + "print\"Rf =\",round(Rf,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ibq = 29.703 mA\n", + "Rf = 178.433 Ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 , Page no:89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "Ibq=30\n", + "\n", + "#CALCULATIONS\n", + "a=(b/(b+1))\n", + "Icq=Ibq*b/1000\n", + "Ieq=(Icq/a)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.4 mA\n", + "Ieq = 2.43 mA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 , Page no:91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=50\n", + "Vbeq=0.3 #V\n", + "Vcc=12 #v\n", + "Vs=2 #v\n", + "Rc=4 #Kohm\n", + "Rs=100 #Kohm\n", + "Vce=0.2\n", + "\n", + "#CALCULATIONS\n", + "Icq=(Vcc-Vce)/Rc\n", + "Rb=((Vcc-Vbeq)/(Icq/b))\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Rb =\",round(Rb,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.95 mA\n", + "Rb = 198.305 Ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 , Page no:91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=50\n", + "b2=50\n", + "Vce=6 #V\n", + "Re=1 #k\u2126\n", + "Vcc=12 #v #V\n", + "\n", + "#CALCULATIONS\n", + "Ieq2=(Vcc-Vce)/Re\n", + "Ibq2=(Ieq2/((b+1)*(b2+1)))*1000\n", + "\n", + "#RESULTS\n", + "print\"Ieq2 =\",round(Ieq2,3),\"mA\";\n", + "print\"Ibq2 =\",round(Ibq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq2 = 6.0 mA\n", + "Ibq2 = 2.307 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 , Page no:94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "Ibq=30 #mA\n", + "\n", + "#CALCULATIONS\n", + "a=(b/(b+1))\n", + "Icq=Ibq*b/1000 #mA\n", + "Ieq=(Icq/a)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"OmA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.4 mA\n", + "Ieq = 2.43 OmA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 , Page no:96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=100\n", + "Vbeq=0.7 #V\n", + "Vcc=15 #V\n", + "Re=300 #k\u2126\n", + "Rc=500 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Icq=((Vcc)/(2*(Re+Rc)))*1000\n", + "Rb=(b*Re/10)/1000\n", + "Vbb=Vbeq+Icq*(1.1*Re)/1000\n", + "R1=Rb/(1-Vbb/Vcc)\n", + "R2=Rb*(Vcc/Vbb)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Rb =\",round(Rb,3),\"Kohm\";\n", + "print\"Vbb =\",round(Vbb,3),\"V\";\n", + "print\"R1 =\",round(R1,3),\"Kohm\";\n", + "print\"R2 =\",round(R2,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 9.375 mA\n", + "Rb = 3.0 Kohm\n", + "Vbb = 3.794 V\n", + "R1 = 4.016 Kohm\n", + "R2 = 11.862 Kohm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 , Page no:99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=12 #v\n", + "Vbeq=0.7 #v\n", + "\n", + "#CALCULATIONS\n", + "Re=1*10**3 #k\u2126\n", + "Icq=6*10**3 #mA\n", + "Ibq=50*10**-3 #mA\n", + "b=Icq/Ibq\n", + "\n", + "#RESULTS\n", + "print\"B =\",round(b,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B = 120000.0 mA\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb new file mode 100644 index 00000000..facfc968 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_3_Characteristics_of_Bipolar_Junction_Transistors.ipynb @@ -0,0 +1,760 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f809d3345358b78f036d1a7111cc6bc5ce0deb59ac7b16dc507a30562e6575ce" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 Characteristics of Bipolar Junction Transistors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 , Page no:81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "betaa=50\n", + "Ic=1.2 #mA\n", + "\n", + "#CALCULATIONS\n", + "Iceo=3*10**-3 #mA\n", + "Ib=((Ic-Iceo)/betaa)*1000 #mA\n", + "IE=(Ic)-(Ib*10**-3)\n", + "\n", + "#RESULTS\n", + "print\"Ib =\",round(Ib,2),\"X 10^-3 mA\";\n", + "print\"IE =\",round(IE,2),\"m\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ib = 23.94 X 10^-3 mA\n", + "IE = 1.18 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "betaa=100\n", + "Ib=0 #mA\n", + "Icbo=5 #V #mA\n", + "Ib=40\n", + "\n", + "#CALCULATIONS\n", + "Iceo=(betaa+1)*Icbo #mA\n", + "Ic=((betaa*Ib)+(betaa+1)*Icbo)/1000\n", + "\n", + "#RESULTS\n", + "print\"When Ib =0 Iceo =\",round(Iceo,3),\"mA\";\n", + "print\"When Ib =40 Ic =\",round(Ic,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When Ib =0 Iceo = 505.0 mA\n", + "When Ib =40 Ic = 4.505 mA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "alpha=0.98\n", + "\n", + "#CALCULATIONS\n", + "betaa=alpha/(1-alpha)\n", + "Icbo=(5*10**-3) #mA\n", + "Iceo=(betaa+1)*Icbo #mA\n", + "Ibq=100*10**-3\n", + "Icq=(betaa*Ibq)+Iceo\n", + "Ieq=Icq+Ibq\n", + "\n", + "#RESULTS\n", + "print\"Iceo =\",round(Iceo,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Iceo = 0.25 mA\n", + "Icq = 5.15 mA\n", + "Ieq = 5.25 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 , Page no:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "alpha=0.98\n", + "\n", + "#CALCULATIONS\n", + "betaa=alpha/(1-alpha)\n", + "Icq=1.47 #mA\n", + "Ieq=Icq/alpha #mA\n", + "\n", + "#RESULTS\n", + "print\"Beta =\",round(betaa,3);\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Beta = 49.0\n", + "Ieq = 1.5 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 , Page no:84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vbb=6 #V\n", + "Vbeq=0.7 #V\n", + "Ibq=40 #10^-6\n", + "\n", + "#CALCULATIONS\n", + "Rb=((Vbb-Vbeq)/Ibq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Rb =\",round(Rb,3),\"k ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rb = 132.5 k ohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 , Page no:84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=100\n", + "\n", + "#CALCULATIONS\n", + "a=b/(b+1)\n", + "Ibq=20 #10**-6 #mA\n", + "Icq=(b*Ibq)/1000 #mA\n", + "Ieq=Icq/a #mA\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.0 mA\n", + "Ieq = 2.02 mA\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "\n", + "#CALCULATIONS\n", + "a=b/(b+1)\n", + "Ibq=40 #10**-6 #mA\n", + "Ieq=(Ibq/(1-a))/1000 #mA\n", + "Icq=(b*Ibq)/1000\n", + "\n", + "#RESULTS\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq = 3.24 mA\n", + "Icq = 3.2 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=14 #V\n", + "Icq=2.25 #mA\n", + "\n", + "#CALCULATIONS\n", + "Rc=(14/(6.5*10**-3))/1000 #k\u2126\n", + "Ibq=20*10**-3 #mA\n", + "Ieq=Icq+Ibq #mA\n", + "b=Icq/Ibq\n", + "\n", + "#RESULTS\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";\n", + "print\"Beta =\",round(b,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq = 2.27 mA\n", + "Beta = 112.5 mA\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 , Page no:85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=70\n", + "Vcc=15 #V\n", + "Vbeq=0.7 #V\n", + "Iceo=1.42 #mA\n", + "Rb=500 #*10^3 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Ibq=((Vcc-Vbeq)/Rb)*1000\n", + "Icq=((b*Ibq/1000)+Iceo)\n", + "\n", + "#RESULTS\n", + "print\"Ibq =\",round(Ibq,3),\"mA\";\n", + "print\"Icq =\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ibq = 28.6 mA\n", + "Icq = 3.422 mA\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 , Page no:87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vceq=-6.4 #V\n", + "Vbeq=-0.3 #V\n", + "Vee=2\n", + "Ieq=3\n", + "\n", + "#CALCULATIONS\n", + "Vcbq=Vceq-Vbeq #V\n", + "Re=((Vee+Vbeq)/Ieq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Vcbq =\",round(Vcbq,3),\"V\";\n", + "print\"Re =\",round(Re,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vcbq = -6.1 V\n", + "Re = 566.667 Ohm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 , Page no:88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=12 #V\n", + "Vceq=6 #V\n", + "hf=100\n", + "Rc=2 #*10^3 #k\u2126\n", + "Vbeq=0.7\n", + "\n", + "#CALCULATIONS\n", + "Ibq=((Vcc-Vceq)/((hf+1)*Rc))*1000\n", + "Rf=((Vceq-Vbeq)/Ibq)*1000\n", + "\n", + "#RESULTS\n", + "print\"Ibq =\",round(Ibq,3),\"mA\";\n", + "print\"Rf =\",round(Rf,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ibq = 29.703 mA\n", + "Rf = 178.433 Ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 , Page no:89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "Ibq=30\n", + "\n", + "#CALCULATIONS\n", + "a=(b/(b+1))\n", + "Icq=Ibq*b/1000\n", + "Ieq=(Icq/a)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.4 mA\n", + "Ieq = 2.43 mA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 , Page no:91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=50\n", + "Vbeq=0.3 #V\n", + "Vcc=12 #v\n", + "Vs=2 #v\n", + "Rc=4 #Kohm\n", + "Rs=100 #Kohm\n", + "Vce=0.2\n", + "\n", + "#CALCULATIONS\n", + "Icq=(Vcc-Vce)/Rc\n", + "Rb=((Vcc-Vbeq)/(Icq/b))\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Rb =\",round(Rb,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.95 mA\n", + "Rb = 198.305 Ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 , Page no:91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=50\n", + "b2=50\n", + "Vce=6 #V\n", + "Re=1 #k\u2126\n", + "Vcc=12 #v #V\n", + "\n", + "#CALCULATIONS\n", + "Ieq2=(Vcc-Vce)/Re\n", + "Ibq2=(Ieq2/((b+1)*(b2+1)))*1000\n", + "\n", + "#RESULTS\n", + "print\"Ieq2 =\",round(Ieq2,3),\"mA\";\n", + "print\"Ibq2 =\",round(Ibq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ieq2 = 6.0 mA\n", + "Ibq2 = 2.307 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 , Page no:94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=80\n", + "Ibq=30 #mA\n", + "\n", + "#CALCULATIONS\n", + "a=(b/(b+1))\n", + "Icq=Ibq*b/1000 #mA\n", + "Ieq=(Icq/a)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Ieq =\",round(Ieq,3),\"OmA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 2.4 mA\n", + "Ieq = 2.43 OmA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 , Page no:96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "b=100\n", + "Vbeq=0.7 #V\n", + "Vcc=15 #V\n", + "Re=300 #k\u2126\n", + "Rc=500 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Icq=((Vcc)/(2*(Re+Rc)))*1000\n", + "Rb=(b*Re/10)/1000\n", + "Vbb=Vbeq+Icq*(1.1*Re)/1000\n", + "R1=Rb/(1-Vbb/Vcc)\n", + "R2=Rb*(Vcc/Vbb)\n", + "\n", + "#RESULTS\n", + "print\"Icq =\",round(Icq,3),\"mA\";\n", + "print\"Rb =\",round(Rb,3),\"Kohm\";\n", + "print\"Vbb =\",round(Vbb,3),\"V\";\n", + "print\"R1 =\",round(R1,3),\"Kohm\";\n", + "print\"R2 =\",round(R2,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq = 9.375 mA\n", + "Rb = 3.0 Kohm\n", + "Vbb = 3.794 V\n", + "R1 = 4.016 Kohm\n", + "R2 = 11.862 Kohm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.32 , Page no:99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=12 #v\n", + "Vbeq=0.7 #v\n", + "\n", + "#CALCULATIONS\n", + "Re=1*10**3 #k\u2126\n", + "Icq=6*10**3 #mA\n", + "Ibq=50*10**-3 #mA\n", + "b=Icq/Ibq\n", + "\n", + "#RESULTS\n", + "print\"B =\",round(b,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B = 120000.0 mA\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_CHARACTERISTICS_OF_FIELD_EFFECT_TRANSISTORS_AND_TRIODES.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_CHARACTERISTICS_OF_FIELD_EFFECT_TRANSISTORS_AND_TRIODES.ipynb new file mode 100755 index 00000000..1c7c4ba7 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_CHARACTERISTICS_OF_FIELD_EFFECT_TRANSISTORS_AND_TRIODES.ipynb @@ -0,0 +1,589 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a2bdc59cefb570f070b4e46397463b62f539d8dbd0974151af906b662d822fd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 CHARACTERISTICS OF FIELD EFFECT TRANSISTORS AND TRIODES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 , Page no:118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idon=5 #*10^-3 #mA\n", + "Vgsq=6.90 #V\n", + "Vt=4 #V\n", + "\n", + "#CALCULATIONS\n", + "Idq=Idon*((1-(Vgsq/Vt))**2)\n", + "\n", + "#RESULTS\n", + "print\"Idq =\",round(Idq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq = 2.628 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 , Page no:118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgg=10 #V\n", + "Vgsq=8 #V\n", + "Vdd=16 #V\n", + "Vdsq=12 #V\n", + "Idq=1\n", + "\n", + "#CALCULATIONS\n", + "Idq1=1*10**-3 #mA\n", + "Rs=((Vgg-Vgsq)/Idq1)/1000 #k\u2126\n", + "Rd=((Vdd-Vdsq-(Idq1*Rs))/Idq)\n", + "\n", + "#RESULTS\n", + "print\"Rs =\",round(Rs,3),\"K ohm\";\n", + "print\"Rd =\",round(Rd),\"K ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 2.0 K ohm\n", + "Rd = 4.0 K ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 , Page no:120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=750 #k\u2126\n", + "Vdd=24 #V\n", + "Vdsq=15 #V\n", + "Idq=0.002 #mA\n", + "\n", + "#CALCULATIONS\n", + "Rd=((Vdd-Vdsq-(Idq*Rs))/Idq)/1000\n", + "\n", + "#RESULTS\n", + "print\"Rs =\",round(Rs,3),\"K ohm\";\n", + "print\"Rd =\",round(Rd,3),\"K ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 750.0 K ohm\n", + "Rd = 3.75 K ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 , Page no:121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq=-8 #mA\n", + "Idss=-10 #mA\n", + "Vp0=-4 #V\n", + "Vdd=-20\n", + "Rd=1.5\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=Vp0*(((Idq/Idss)**(1/2))-1)\n", + "Vdsq1=Vdd-Idq*Rd\n", + "\n", + "#RESULTS\n", + "print\"Vgsq =\",round(Vgsq,3),\"v\";\n", + "print\"Vdsq =\",round(Vdsq1,3),\"v\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq = 0.422 v\n", + "Vdsq = -8.0 v\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 , Page no:121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vt=4 #V\n", + "R1=50 #k ohm\n", + "R2=0.4 #M ohm\n", + "Rs=0\n", + "Rd=2 #k ohm\n", + "Vdd=15 #V\n", + "Idon=10 #*10^-3\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=(R1/(R1+R2*10**3))*Vdd\n", + "Idq=Idon*((1-(Vgsq/Vt))**2)\n", + "Vdsq=Vdd-(Idq*Rd)\n", + "\n", + "#RESULTS\n", + "print\"Vgsq =\",round(Vgsq,3),\"V\";\n", + "print\"Idq =\",round(Idq,3),\"mA\";\n", + "print\"Vdsq =\",round(Vdsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq = 1.667 V\n", + "Idq = 3.403 mA\n", + "Vdsq = 8.194 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 , Page no:123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgsq=-4.5 #V\n", + "Idq=-8 #mA\n", + "VT=-3 #V\n", + "Idq=-16\n", + "Vgsq=-5\n", + "\n", + "#CALCULATIONS\n", + "Idon=(Idq/(1-Vgsq/VT)**2)\n", + "Vgsq1=VT*(1-(Idq/Idon)**(1/2))\n", + "\n", + "#RESULTS\n", + "print\"Idon=\",round(Idon,3),\"mA\";\n", + "print\"Vgsq=\",round(Vgsq1,2),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idon= -36.0 mA\n", + "Vgsq= -1.0 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 , Page no:123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15 #v\n", + "Vdsq=7 #v \n", + "Rs=3 #k\u2126\n", + "Rd=1 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Idq=((Vdd-Vdsq)/(Rs+Rd))\n", + "Vgsq=-(Idq*Rd)\n", + "\n", + "#RESULTS\n", + "print\"Idq=\",round(Idq,3),\"mA\";\n", + "print\"Vgsq=\",round(Vgsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq= 2.0 mA\n", + "Vgsq= -2.0 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 , Page no:126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq1=1.22 #mA\n", + "Vdsq1=0 #V\n", + "Vdd=15 #V\n", + "Rs=2 #k\u2126\n", + "Rd=5 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vgsq1=-(Idq1*Rs)\n", + "Vdsq2=Vdd-Vdsq1-Idq1*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"Vgsq=\",round(Vgsq1,3),\"V\";\n", + "print\"Vdsq2=\",round(Vdsq2,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq= -2.44 V\n", + "Vdsq2= 6.46 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 , Page no:127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq1=0 #mA\n", + "Idq2=2.92 #mA\n", + "Vdd=15 #V\n", + "Vgsq1=-4 #V\n", + "Rs=2 #k\u2126\n", + "Rd=1 #k\u2126\n", + "Rd1=1\n", + "Idq12=0\n", + "\n", + "#CALCULATIONS\n", + "Vgsq2=-Vgsq1-Idq2*Rs\n", + "Vdsq1=Vdd-(Idq1+Idq2)*Rd-Idq2*Rs-Vgsq2\n", + "Vdsq2=Vdd-(Idq12+Idq2)*Rd1-Idq2*Rs\n", + "\n", + "#RESULTS\n", + "print\"Vgsq2=\",round(Vgsq2,3),\"V\";\n", + "print\"Vdsq1=\",round(Vdsq1,3),\"V\";\n", + "print\"Vdsq2=\",round(Vdsq2,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq2= -1.84 V\n", + "Vdsq1= 8.08 V\n", + "Vdsq2= 6.24 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 , Page no:128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15 #V\n", + "R2=40 #k\u2126\n", + "R1=60 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=(R2/(R2+R1))*Vdd\n", + "\n", + "#RESULTS\n", + "print\"Vgsq=\",round(Vgsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq= 6.0 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idss=10 #mA\n", + "Vgsq=-1.34 #V\n", + "Vp0=4 #V\n", + "Rs=2 #k\u2126\n", + "Vdd=15 #V\n", + "Rd=500 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Idq=Idss*((1+(Vgsq/Vp0))**2)\n", + "Vdsq=Vdd-Idq*10**-3*(Rs*10**3+Rd)\n", + "\n", + "#RESULTS\n", + "print\"Idq=\",round(Idq,3),\"mA\";\n", + "print\"Vdsq=\",round(Vdsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq= 4.422 mA\n", + "Vdsq= 3.944 V\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Ip=15 #mA\n", + "Vp=100 #v\n", + "Vp0=4 #v\n", + "Vg=-4 #v\n", + "\n", + "#CALCULATIONS\n", + "k=(Ip/(Vp**(3/2)))*1000\n", + "m=-(Vp/Vg)\n", + "\n", + "#RESULTS\n", + "print\"the perveance k=\",round(k,3),\"mA/V^3/2\";\n", + "print\"the amplification factor m=\",round(m,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the perveance k= 15.0 mA/V^3/2\n", + "the amplification factor m= 25.0 mA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #k\u2126\n", + "Vpp=2.4 #v\n", + "\n", + "#CALCULATIONS\n", + "Ip=(1/20) #mA\n", + "n=(((Ip)*Rl)/Vpp)\n", + "\n", + "#RESULTS\n", + "print\"the perveance n=\",round(n,3),\"percent\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the perveance n= 0.208 percent\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb new file mode 100644 index 00000000..6fb3abe1 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_4_Characteristics_of_Field_Effect_Transistors_And_Triodes.ipynb @@ -0,0 +1,589 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e3673dd8c1d33734081ef4f7d2d66dedd4222d01754d52c01b300184e894f43d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 Characteristics of Field Effect Transistors And Triodes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 , Page no:118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idon=5 #*10^-3 #mA\n", + "Vgsq=6.90 #V\n", + "Vt=4 #V\n", + "\n", + "#CALCULATIONS\n", + "Idq=Idon*((1-(Vgsq/Vt))**2)\n", + "\n", + "#RESULTS\n", + "print\"Idq =\",round(Idq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq = 2.628 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 , Page no:118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgg=10 #V\n", + "Vgsq=8 #V\n", + "Vdd=16 #V\n", + "Vdsq=12 #V\n", + "Idq=1\n", + "\n", + "#CALCULATIONS\n", + "Idq1=1*10**-3 #mA\n", + "Rs=((Vgg-Vgsq)/Idq1)/1000 #k\u2126\n", + "Rd=((Vdd-Vdsq-(Idq1*Rs))/Idq)\n", + "\n", + "#RESULTS\n", + "print\"Rs =\",round(Rs,3),\"K ohm\";\n", + "print\"Rd =\",round(Rd),\"K ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 2.0 K ohm\n", + "Rd = 4.0 K ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 , Page no:120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=750 #k\u2126\n", + "Vdd=24 #V\n", + "Vdsq=15 #V\n", + "Idq=0.002 #mA\n", + "\n", + "#CALCULATIONS\n", + "Rd=((Vdd-Vdsq-(Idq*Rs))/Idq)/1000\n", + "\n", + "#RESULTS\n", + "print\"Rs =\",round(Rs,3),\"K ohm\";\n", + "print\"Rd =\",round(Rd,3),\"K ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rs = 750.0 K ohm\n", + "Rd = 3.75 K ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 , Page no:121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq=-8 #mA\n", + "Idss=-10 #mA\n", + "Vp0=-4 #V\n", + "Vdd=-20\n", + "Rd=1.5\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=Vp0*(((Idq/Idss)**(1/2))-1)\n", + "Vdsq1=Vdd-Idq*Rd\n", + "\n", + "#RESULTS\n", + "print\"Vgsq =\",round(Vgsq,3),\"v\";\n", + "print\"Vdsq =\",round(Vdsq1,3),\"v\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq = 0.422 v\n", + "Vdsq = -8.0 v\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 , Page no:121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vt=4 #V\n", + "R1=50 #k ohm\n", + "R2=0.4 #M ohm\n", + "Rs=0\n", + "Rd=2 #k ohm\n", + "Vdd=15 #V\n", + "Idon=10 #*10^-3\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=(R1/(R1+R2*10**3))*Vdd\n", + "Idq=Idon*((1-(Vgsq/Vt))**2)\n", + "Vdsq=Vdd-(Idq*Rd)\n", + "\n", + "#RESULTS\n", + "print\"Vgsq =\",round(Vgsq,3),\"V\";\n", + "print\"Idq =\",round(Idq,3),\"mA\";\n", + "print\"Vdsq =\",round(Vdsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq = 1.667 V\n", + "Idq = 3.403 mA\n", + "Vdsq = 8.194 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 , Page no:123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgsq=-4.5 #V\n", + "Idq=-8 #mA\n", + "VT=-3 #V\n", + "Idq=-16\n", + "Vgsq=-5\n", + "\n", + "#CALCULATIONS\n", + "Idon=(Idq/(1-Vgsq/VT)**2)\n", + "Vgsq1=VT*(1-(Idq/Idon)**(1/2))\n", + "\n", + "#RESULTS\n", + "print\"Idon=\",round(Idon,3),\"mA\";\n", + "print\"Vgsq=\",round(Vgsq1,2),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idon= -36.0 mA\n", + "Vgsq= -1.0 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 , Page no:123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15 #v\n", + "Vdsq=7 #v \n", + "Rs=3 #k\u2126\n", + "Rd=1 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Idq=((Vdd-Vdsq)/(Rs+Rd))\n", + "Vgsq=-(Idq*Rd)\n", + "\n", + "#RESULTS\n", + "print\"Idq=\",round(Idq,3),\"mA\";\n", + "print\"Vgsq=\",round(Vgsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq= 2.0 mA\n", + "Vgsq= -2.0 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18 , Page no:126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq1=1.22 #mA\n", + "Vdsq1=0 #V\n", + "Vdd=15 #V\n", + "Rs=2 #k\u2126\n", + "Rd=5 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vgsq1=-(Idq1*Rs)\n", + "Vdsq2=Vdd-Vdsq1-Idq1*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"Vgsq=\",round(Vgsq1,3),\"V\";\n", + "print\"Vdsq2=\",round(Vdsq2,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq= -2.44 V\n", + "Vdsq2= 6.46 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19 , Page no:127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idq1=0 #mA\n", + "Idq2=2.92 #mA\n", + "Vdd=15 #V\n", + "Vgsq1=-4 #V\n", + "Rs=2 #k\u2126\n", + "Rd=1 #k\u2126\n", + "Rd1=1\n", + "Idq12=0\n", + "\n", + "#CALCULATIONS\n", + "Vgsq2=-Vgsq1-Idq2*Rs\n", + "Vdsq1=Vdd-(Idq1+Idq2)*Rd-Idq2*Rs-Vgsq2\n", + "Vdsq2=Vdd-(Idq12+Idq2)*Rd1-Idq2*Rs\n", + "\n", + "#RESULTS\n", + "print\"Vgsq2=\",round(Vgsq2,3),\"V\";\n", + "print\"Vdsq1=\",round(Vdsq1,3),\"V\";\n", + "print\"Vdsq2=\",round(Vdsq2,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq2= -1.84 V\n", + "Vdsq1= 8.08 V\n", + "Vdsq2= 6.24 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20 , Page no:128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15 #V\n", + "R2=40 #k\u2126\n", + "R1=60 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vgsq=(R2/(R2+R1))*Vdd\n", + "\n", + "#RESULTS\n", + "print\"Vgsq=\",round(Vgsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vgsq= 6.0 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Idss=10 #mA\n", + "Vgsq=-1.34 #V\n", + "Vp0=4 #V\n", + "Rs=2 #k\u2126\n", + "Vdd=15 #V\n", + "Rd=500 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Idq=Idss*((1+(Vgsq/Vp0))**2)\n", + "Vdsq=Vdd-Idq*10**-3*(Rs*10**3+Rd)\n", + "\n", + "#RESULTS\n", + "print\"Idq=\",round(Idq,3),\"mA\";\n", + "print\"Vdsq=\",round(Vdsq,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Idq= 4.422 mA\n", + "Vdsq= 3.944 V\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Ip=15 #mA\n", + "Vp=100 #v\n", + "Vp0=4 #v\n", + "Vg=-4 #v\n", + "\n", + "#CALCULATIONS\n", + "k=(Ip/(Vp**(3/2)))*1000\n", + "m=-(Vp/Vg)\n", + "\n", + "#RESULTS\n", + "print\"the perveance k=\",round(k,3),\"mA/V^3/2\";\n", + "print\"the amplification factor m=\",round(m,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the perveance k= 15.0 mA/V^3/2\n", + "the amplification factor m= 25.0 mA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26 , Page no:130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=10 #k\u2126\n", + "Vpp=2.4 #v\n", + "\n", + "#CALCULATIONS\n", + "Ip=(1/20) #mA\n", + "n=(((Ip)*Rl)/Vpp)\n", + "\n", + "#RESULTS\n", + "print\"the perveance n=\",round(n,3),\"percent\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the perveance n= 0.208 percent\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_TRANSISTOR_BIAS_CONSIDERATIONS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_TRANSISTOR_BIAS_CONSIDERATIONS.ipynb new file mode 100755 index 00000000..1e5adabb --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_TRANSISTOR_BIAS_CONSIDERATIONS.ipynb @@ -0,0 +1,502 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fe171e9ee4a5fa950339e3877222c314afb1b97933ef7e4cc518e5bc1ea7ac4d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 TRANSISTOR BIAS CONSIDERATIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 , Page no:143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#CALCULATIONS\n", + "Icbo=(500*(2**((90-25)/10)))/1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Icbo=\",round(Icbo,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icbo= 45.255 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 , Page no:145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vee=4 #v\n", + "Vbeq=0.7 #v\n", + "b=50 #Beta\n", + "Vcc=18 #v\n", + "Rc=6 #k\u2126\n", + "Re=2*10**3 #k\u2126\n", + "b1=100\n", + "Re1=2 #*10^3 //k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Rb=25*10**3 #k\u2126\n", + "Icq=((Vee-Vbeq)/((Rb/b)+((b+1)/b)*Re))*1000\n", + "Vceq=Vcc+Vee-(Rc+((b+1)/b)*Re1)*Icq \n", + "Icq1=((Vee-Vbeq)/((Rb/b1)+((b1+1)/b1)*Re))*1000\n", + "Vceq1=Vcc+Vee-(Rc+((b1+1)/b1)*Re1)*Icq1\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";\n", + "print\"For beta=100\";\n", + "print\"The value of Vceq=\",round(Vceq,3),\"V\";\n", + "print\"For beta=100\";\n", + "print\"The value of Icq=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq1,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq= 1.299 mA\n", + "For beta=100\n", + "The value of Vceq= 11.554 V\n", + "For beta=100\n", + "The value of Icq= 1.454 mA\n", + "The value of Vceq= 10.341 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 , Page no:146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=15 #v\n", + "Vee=4 #v \n", + "Vbeq=0.7 #v\n", + "b=50 #Beta\n", + "Re=3*10**3 #k\u2126\n", + "Rc=7 #k\u2126\n", + "Vee1=5\n", + "Re1=3 #*10^3\n", + "b1=100\n", + "Vee2=5\n", + "Re2=3 #*10^3\n", + "\n", + "#CALCULATIONS\n", + "Ieq=(Vee-Vbeq)/Re*1000\n", + "Icq=(b/(b+1))*Ieq\n", + "Ibq=Icq/b\n", + "Vceq=Vcc+Vee1-(Ieq*Re1)-(Icq*Rc)\n", + "Icq1=(b1/(b1+1))*Ieq\n", + "Ibq1=Icq/b1\n", + "Vceq1=Vcc+Vee2-(Ieq*Re2)-(Icq1*Rc)\n", + "\n", + "#RESULTS\n", + "print\"For beta=50\";\n", + "print\"The value of Ieq=\",round(Ieq,3),\"mA\";\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";\n", + "print\"The value of Ibq=\",round(Ibq,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq,3),\"V\";\n", + "print\"For beta=100\";\n", + "print\"The value of Ieq=\",round(Ieq,3),\"mA\";\n", + "print\"The value of Icq=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Ibq=\",round(Ibq1,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq1,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For beta=50\n", + "The value of Ieq= 1.1 mA\n", + "The value of Icq= 1.078 mA\n", + "The value of Ibq= 0.022 mA\n", + "The value of Vceq= 9.151 V\n", + "For beta=100\n", + "The value of Ieq= 1.1 mA\n", + "The value of Icq= 1.089 mA\n", + "The value of Ibq= 0.011 mA\n", + "The value of Vceq= 9.076 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 , Page no:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=15\n", + "Vee=4\n", + "Vbeq=0.7\n", + "Rb=500\n", + "\n", + "#CALCULATIONS\n", + "Sb=((Vcc-Vbeq)/Rb)*10**3\n", + "Icq=(Sb*(100-50))/1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Sb=\",round(Sb,3);\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Sb= 28.6\n", + "The value of Icq= 1.43 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 , Page no:148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vbb=6\n", + "Vbeq1=0.7\n", + "Icbo1=0.5\n", + "Rb=50\n", + "Re=1\n", + "B=75 #Beta\n", + "\n", + "#CALCULATIONS\n", + "Icq1=((Vbb-Vbeq1+Icbo1*(0.5*51*10**-3))/((Rb*10**3/B)+Re*10**3))*10**3\n", + "Icbo2=(Icbo1*10**-6*2**2)*10**6\n", + "Vbeq=(-2*10**-3)*20\n", + "Vbeq2=Vbeq1+Vbeq\n", + "Icq2=((Vbb-Vbeq2+Icbo2*(2*51*10**-3))/((Rb*10**3/B)+Re*10**3))*10**3\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq1=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Icbo=\",round(Icbo2,3),\"mA\";\n", + "print\"The value of Vbeq=\",round(Vbeq,3),\"V\";\n", + "print\"The value of Vbeq2=\",round(Vbeq2,3),\"V\";\n", + "print\"The value of Icq2=\",round(Icq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq1= 3.188 mA\n", + "The value of Icbo= 2.0 mA\n", + "The value of Vbeq= -0.04 V\n", + "The value of Vbeq2= 0.66 V\n", + "The value of Icq2= 3.326 mA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 , Page no:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "B=50 #beta\n", + "Vee=5\n", + "Vbeq1=0.7\n", + "T2=125\n", + "Re=3*10**3\n", + "Icbo1=0.5 #*10^-6\n", + "\n", + "#CALCULATIONS\n", + "Icq2=(((B+1)/B)*((Vee-Vbeq1+0.002*(T2-25))/Re)+(2**((T2-25)/10))*Icbo1*10**-6)*10**3\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq2=\",round(Icq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq2= 2.042 mA\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 , Page no:152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "B=75 #beta\n", + "Rb=454.5 #k\u2126\n", + "Vbb=1.818\n", + "Vbeq=0.7\n", + "Re=90\n", + "\n", + "#CALCULATIONS\n", + "Icbo=0.2*10**-6\n", + "deltaRe=110-90\n", + "Sre=((B*Rb*Icbo-B**2*(Vbb-Vbeq+Icbo*Rb))/((Rb+B*Re)**2))*10**4\n", + "Icq=(Sre*deltaRe)/10\n", + "\n", + "#RESULTS\n", + "print\"The value of Sre=\",round(Sre,3),\"* 10^-4 A/Ohm\";\n", + "print\"The value of Icq=\",round(Icq,3),\"* 10^-4 mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Sre= -1.212 * 10^-4 A/Ohm\n", + "The value of Icq= -2.423 * 10^-4 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 , Page no:156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15\n", + "Idqmax=5.5\n", + "Idqmin=1.3\n", + "Rd=2.5 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*Rd\n", + "Vdsqmin=Vdd-Idqmin*Rd\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 1.25 V\n", + "The value of Vdsqmin= 11.75 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 , Page no:157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=24 #V\n", + "Idqmax=2.5\n", + "Idqmin=1.2\n", + "Rs=1 #k\u2126\n", + "Rd=3 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*(Rs+Rd)\n", + "Vdsqmin=Vdd-Idqmin*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 14.0 V\n", + "The value of Vdsqmin= 19.2 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 , Page no:159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=24\n", + "Idqmax=4\n", + "Idqmin=2.8\n", + "Rs=2 #M\u2126\n", + "Rd=1 #M\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*(Rs+Rd)\n", + "Vdsqmin=Vdd-Idqmin*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 12.0 V\n", + "The value of Vdsqmin= 15.6 V\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb new file mode 100644 index 00000000..91205794 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_5_Transistor_Bias_Considerations.ipynb @@ -0,0 +1,502 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a3821b1a930b1eb1f30ee642e353c215625afffb07115c2496db315e51860a64" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 Transistor Bias Considerations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 , Page no:143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#CALCULATIONS\n", + "Icbo=(500*(2**((90-25)/10)))/1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Icbo=\",round(Icbo,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icbo= 45.255 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 , Page no:145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vee=4 #v\n", + "Vbeq=0.7 #v\n", + "b=50 #Beta\n", + "Vcc=18 #v\n", + "Rc=6 #k\u2126\n", + "Re=2*10**3 #k\u2126\n", + "b1=100\n", + "Re1=2 #*10^3 //k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Rb=25*10**3 #k\u2126\n", + "Icq=((Vee-Vbeq)/((Rb/b)+((b+1)/b)*Re))*1000\n", + "Vceq=Vcc+Vee-(Rc+((b+1)/b)*Re1)*Icq \n", + "Icq1=((Vee-Vbeq)/((Rb/b1)+((b1+1)/b1)*Re))*1000\n", + "Vceq1=Vcc+Vee-(Rc+((b1+1)/b1)*Re1)*Icq1\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";\n", + "print\"For beta=100\";\n", + "print\"The value of Vceq=\",round(Vceq,3),\"V\";\n", + "print\"For beta=100\";\n", + "print\"The value of Icq=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq1,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq= 1.299 mA\n", + "For beta=100\n", + "The value of Vceq= 11.554 V\n", + "For beta=100\n", + "The value of Icq= 1.454 mA\n", + "The value of Vceq= 10.341 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 , Page no:146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=15 #v\n", + "Vee=4 #v \n", + "Vbeq=0.7 #v\n", + "b=50 #Beta\n", + "Re=3*10**3 #k\u2126\n", + "Rc=7 #k\u2126\n", + "Vee1=5\n", + "Re1=3 #*10^3\n", + "b1=100\n", + "Vee2=5\n", + "Re2=3 #*10^3\n", + "\n", + "#CALCULATIONS\n", + "Ieq=(Vee-Vbeq)/Re*1000\n", + "Icq=(b/(b+1))*Ieq\n", + "Ibq=Icq/b\n", + "Vceq=Vcc+Vee1-(Ieq*Re1)-(Icq*Rc)\n", + "Icq1=(b1/(b1+1))*Ieq\n", + "Ibq1=Icq/b1\n", + "Vceq1=Vcc+Vee2-(Ieq*Re2)-(Icq1*Rc)\n", + "\n", + "#RESULTS\n", + "print\"For beta=50\";\n", + "print\"The value of Ieq=\",round(Ieq,3),\"mA\";\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";\n", + "print\"The value of Ibq=\",round(Ibq,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq,3),\"V\";\n", + "print\"For beta=100\";\n", + "print\"The value of Ieq=\",round(Ieq,3),\"mA\";\n", + "print\"The value of Icq=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Ibq=\",round(Ibq1,3),\"mA\";\n", + "print\"The value of Vceq=\",round(Vceq1,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For beta=50\n", + "The value of Ieq= 1.1 mA\n", + "The value of Icq= 1.078 mA\n", + "The value of Ibq= 0.022 mA\n", + "The value of Vceq= 9.151 V\n", + "For beta=100\n", + "The value of Ieq= 1.1 mA\n", + "The value of Icq= 1.089 mA\n", + "The value of Ibq= 0.011 mA\n", + "The value of Vceq= 9.076 V\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 , Page no:147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vcc=15\n", + "Vee=4\n", + "Vbeq=0.7\n", + "Rb=500\n", + "\n", + "#CALCULATIONS\n", + "Sb=((Vcc-Vbeq)/Rb)*10**3\n", + "Icq=(Sb*(100-50))/1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Sb=\",round(Sb,3);\n", + "print\"The value of Icq=\",round(Icq,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Sb= 28.6\n", + "The value of Icq= 1.43 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 , Page no:148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vbb=6\n", + "Vbeq1=0.7\n", + "Icbo1=0.5\n", + "Rb=50\n", + "Re=1\n", + "B=75 #Beta\n", + "\n", + "#CALCULATIONS\n", + "Icq1=((Vbb-Vbeq1+Icbo1*(0.5*51*10**-3))/((Rb*10**3/B)+Re*10**3))*10**3\n", + "Icbo2=(Icbo1*10**-6*2**2)*10**6\n", + "Vbeq=(-2*10**-3)*20\n", + "Vbeq2=Vbeq1+Vbeq\n", + "Icq2=((Vbb-Vbeq2+Icbo2*(2*51*10**-3))/((Rb*10**3/B)+Re*10**3))*10**3\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq1=\",round(Icq1,3),\"mA\";\n", + "print\"The value of Icbo=\",round(Icbo2,3),\"mA\";\n", + "print\"The value of Vbeq=\",round(Vbeq,3),\"V\";\n", + "print\"The value of Vbeq2=\",round(Vbeq2,3),\"V\";\n", + "print\"The value of Icq2=\",round(Icq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq1= 3.188 mA\n", + "The value of Icbo= 2.0 mA\n", + "The value of Vbeq= -0.04 V\n", + "The value of Vbeq2= 0.66 V\n", + "The value of Icq2= 3.326 mA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 , Page no:150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "B=50 #beta\n", + "Vee=5\n", + "Vbeq1=0.7\n", + "T2=125\n", + "Re=3*10**3\n", + "Icbo1=0.5 #*10^-6\n", + "\n", + "#CALCULATIONS\n", + "Icq2=(((B+1)/B)*((Vee-Vbeq1+0.002*(T2-25))/Re)+(2**((T2-25)/10))*Icbo1*10**-6)*10**3\n", + "\n", + "#RESULTS\n", + "print\"The value of Icq2=\",round(Icq2,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Icq2= 2.042 mA\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 , Page no:152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "B=75 #beta\n", + "Rb=454.5 #k\u2126\n", + "Vbb=1.818\n", + "Vbeq=0.7\n", + "Re=90\n", + "\n", + "#CALCULATIONS\n", + "Icbo=0.2*10**-6\n", + "deltaRe=110-90\n", + "Sre=((B*Rb*Icbo-B**2*(Vbb-Vbeq+Icbo*Rb))/((Rb+B*Re)**2))*10**4\n", + "Icq=(Sre*deltaRe)/10\n", + "\n", + "#RESULTS\n", + "print\"The value of Sre=\",round(Sre,3),\"* 10^-4 A/Ohm\";\n", + "print\"The value of Icq=\",round(Icq,3),\"* 10^-4 mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Sre= -1.212 * 10^-4 A/Ohm\n", + "The value of Icq= -2.423 * 10^-4 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 , Page no:156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=15\n", + "Idqmax=5.5\n", + "Idqmin=1.3\n", + "Rd=2.5 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*Rd\n", + "Vdsqmin=Vdd-Idqmin*Rd\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 1.25 V\n", + "The value of Vdsqmin= 11.75 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 , Page no:157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=24 #V\n", + "Idqmax=2.5\n", + "Idqmin=1.2\n", + "Rs=1 #k\u2126\n", + "Rd=3 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*(Rs+Rd)\n", + "Vdsqmin=Vdd-Idqmin*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 14.0 V\n", + "The value of Vdsqmin= 19.2 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 , Page no:159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vdd=24\n", + "Idqmax=4\n", + "Idqmin=2.8\n", + "Rs=2 #M\u2126\n", + "Rd=1 #M\u2126\n", + "\n", + "#CALCULATIONS\n", + "Vdsqmax=Vdd-Idqmax*(Rs+Rd)\n", + "Vdsqmin=Vdd-Idqmin*(Rs+Rd)\n", + "\n", + "#RESULTS\n", + "print\"The value of Vdsqmax=\",round(Vdsqmax,3),\"V\";\n", + "print\"The value of Vdsqmin=\",round(Vdsqmin,3),\"V\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Vdsqmax= 12.0 V\n", + "The value of Vdsqmin= 15.6 V\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_SMALL_SIGNAL_MIDFREQUENCY_BJT_AMPLIFIERS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_SMALL_SIGNAL_MIDFREQUENCY_BJT_AMPLIFIERS.ipynb new file mode 100755 index 00000000..35ac7fb5 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_SMALL_SIGNAL_MIDFREQUENCY_BJT_AMPLIFIERS.ipynb @@ -0,0 +1,454 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:023b32a3487f7933a12cc1a445d7fc77830233685dc4a4d01587fe7ec07e11f2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 SMALL SIGNAL MIDFREQUENCY BJT AMPLIFIERS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 , Page no:175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "a=0.99 #alpha\n", + "Rc=4*10**3 #k\u2126\n", + "Rl=4*10**3 #k\u2126\n", + "Re=5*10**3 #k\u2126\n", + "re=30 #\u2126\n", + "rb=300 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "Ai=(a*Rc*Re)/((Rc+Rl)*(Re+re+(1-a)*rb))\n", + "\n", + "#RESULTS\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ai= 0.492\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 , Page no:178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=90\n", + "Rl=800 #\u2126\n", + "Rc=800 #\u2126\n", + "Rb=831 #k\u2126\n", + "hie=200\n", + "\n", + "#CALCULATIONS\n", + "hoe=100*10**-6\n", + "Av=-((hfe*Rl*Rc)/(hie*(Rc+Rl+hoe*Rl*Rc))) #voltage gain Av\n", + "Ai=((Rb*hie)/(Rl*(Rb+hie)))*Av #current gain Ai\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -173.077\n", + "The value of Ai= -34.876\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 , Page no:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vl=1.1528 #output voltage\n", + "vi=0.250 #input voltage\n", + "\n", + "#CALCULATIONS\n", + "Av=-(vl/vi) #voltage gain \n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -4.611\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 , Page no:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=5 #k\u2126\n", + "Rf=100 #k\u2126\n", + "hie=1.1\n", + "Rc=10 #k\u2126\n", + "Rl=10 #k\u2126\n", + "hfe=50\n", + "\n", + "#CALCULATIONS\n", + "d=((1/Rs)+(1/Rf)+(1/hie))*((1/Rf)+((Rc+Rl)/(Rc*Rl)))+((1/Rf)*((hfe/hie)-(1/Rf)))\n", + "\n", + "#RESULTS\n", + "print\"The value of d=\",round(d,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of d= 0.689\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 , Page no:186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfb=-0.99\n", + "hib=25\n", + "\n", + "#CALCULATIONS\n", + "Rc=2.2*10**3\n", + "Rl=1.1*10**3\n", + "Re=3.3*10**3\n", + "hob=10**-6\n", + "Av=((Rc*Rl*hfb)/(hib*(Rc+Rl+hob*(Rc*Rl))))\n", + "Ai=-((Re*Rc*hfb)/((Re+hib)+(Rc+Rl+hob*Rl*Rc)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -29.019\n", + "The value of Ai= 1084.494\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 , Page no:189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=40\n", + "hie=1500\n", + "\n", + "#CALCULATIONS\n", + "Rc2=20*10**3 #\u2126\n", + "Rc1=10**4 #\u2126\n", + "hoe=30*10**-6\n", + "Av2=-((hfe*Rc2)/(hie*(1+hoe*Rc2))) #final-stage voltage gain\n", + "Rb2=5*10**3 #\u2126\n", + "Zin2=(((Rb2*hie)/(Rb2+hie)))/1000 #final-stage input impedance Zin2\n", + "Zin21=Zin2*1000\n", + "Av1=-((hfe*Zin21*Rc1)/(hie*(Rc1+Zin21+hoe*Zin21*Rc1))) #initial-stage voltage gain\n", + "\n", + "#RESULTS\n", + "print\"The value of Av2=\",round(Av2,3)\n", + "print\"The value of Zin2=\",round(Zin2,3),\"Kohm\";\n", + "print\"The value of Av1=\",round(Av1,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av2= -333.333\n", + "The value of Zin2= 1.154 Kohm\n", + "The value of Av1= -26.756\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 , Page no:191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Av1=0.9879\n", + "hfe=100\n", + "\n", + "#CALCULATIONS\n", + "R11=90*10**3\n", + "R12=100*10**3\n", + "R22=90*10**3\n", + "R21=10*10**3\n", + "Rl=5*10**3\n", + "Rc=5*10**3\n", + "hie=1*10**3\n", + "Rb1=((R11*R12)/(R11+R12))/1000\n", + "Rb2=((R22*R21)/(R22+R21))/1000\n", + "Av2=-((hfe*Rl*Rc)/(hie*(Rl+Rc)))\n", + "Av=Av1*Av2\n", + "\n", + "#RESULTS\n", + "print\"The value of Rb1=\",round(Rb1,3),\"Kohm\";\n", + "print\"The value of Rb2=\",round(Rb2,3),\"Kohm\";\n", + "print\"The value of Av2=\",round(Av2,3)\n", + "print\"The value of Av=\",round(Av,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rb1= 47.368 Kohm\n", + "The value of Rb2= 9.0 Kohm\n", + "The value of Av2= -250.0\n", + "The value of Av= -246.975 Kohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 , Page no:193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=100\n", + "\n", + "#CALCULATIONS\n", + "Rl=3*10**3 #k\u2126\n", + "Rc=3*10**3 #k\u2126\n", + "hie=1*10**3\n", + "Av2=-((hfe*Rl*Rc)/(hie*(Rl+Rc)))\n", + "Rc1=10*10**3 #k\u2126\n", + "Re1=1*10**3 #k\u2126\n", + "Av1=-((hfe*Rc1*hie)/((Rc1+hie)*((hfe+1)*Re1+hie)))\n", + "Av=Av1*Av2\n", + "Ai1=-((hfe*Rc1)/(Rc1+hie))\n", + "Rc2=3*10**3 #k\u2126\n", + "Ai2=-((hfe*Rc2)/(Rc2+Rl))\n", + "Ai=Ai1*Ai2\n", + "\n", + "#RESULTS\n", + "print\"The value of Av2=\",round(Av2,3);\n", + "print\"The value of Av1=\",round(Av1,3);\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai1=\",round(Ai1,3);\n", + "print\"The value of Ai2=\",round(Ai2,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av2= -150.0\n", + "The value of Av1= -0.891\n", + "The value of Av= 133.69\n", + "The value of Ai1= -90.909\n", + "The value of Ai2= -50.0\n", + "The value of Ai= 4545.455\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 , Page no:194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfb1=-0.99\n", + "hfc2=-100\n", + "hic2=500\n", + "hib1=50\n", + "hic2=500\n", + "Av2=0.995\n", + "\n", + "#CALCULATIONS\n", + "Rb=33.3*10**3\n", + "Re1=5*10**3\n", + "Re2=2*10**3\n", + "Rl=2*10**3\n", + "Av1=-((hfb1*Rb*hic2)/(hib1*(Rb+hic2)))\n", + "Av=Av1*Av2\n", + "Ai1=-((hfb1*Re1*Rb)/((Re1+hib1)*(Rb+hic2)))\n", + "Ai2=-((hfc2*Re2)/(Re2+Rl))\n", + "Ai=Ai1*Ai2\n", + "\n", + "#RESULTS\n", + "print\"The value of Av1=\",round(Av1,3);\n", + "print\"The value of Av1=\",round(Av,3);\n", + "print\"The value of Ai1=\",round(Ai1);\n", + "print\"The value of Ai2=\",round(Ai2,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av1= 9.754\n", + "The value of Av1= 9.705\n", + "The value of Ai1= 1.0\n", + "The value of Ai2= 50.0\n", + "The value of Ai= 48.285\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb new file mode 100644 index 00000000..0c45660e --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_6_Small_Signal_Midfrequency_Bjt_Amplifiers.ipynb @@ -0,0 +1,454 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:618b68a86275823e4078854d5ea9e0d35a338cbe18b228497e7755b18923bfda" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 Small Signal Midfrequency Bjt Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 , Page no:175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "a=0.99 #alpha\n", + "Rc=4*10**3 #k\u2126\n", + "Rl=4*10**3 #k\u2126\n", + "Re=5*10**3 #k\u2126\n", + "re=30 #\u2126\n", + "rb=300 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "Ai=(a*Rc*Re)/((Rc+Rl)*(Re+re+(1-a)*rb))\n", + "\n", + "#RESULTS\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Ai= 0.492\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 , Page no:178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=90\n", + "Rl=800 #\u2126\n", + "Rc=800 #\u2126\n", + "Rb=831 #k\u2126\n", + "hie=200\n", + "\n", + "#CALCULATIONS\n", + "hoe=100*10**-6\n", + "Av=-((hfe*Rl*Rc)/(hie*(Rc+Rl+hoe*Rl*Rc))) #voltage gain Av\n", + "Ai=((Rb*hie)/(Rl*(Rb+hie)))*Av #current gain Ai\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -173.077\n", + "The value of Ai= -34.876\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 , Page no:179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vl=1.1528 #output voltage\n", + "vi=0.250 #input voltage\n", + "\n", + "#CALCULATIONS\n", + "Av=-(vl/vi) #voltage gain \n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -4.611\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 , Page no:185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rs=5 #k\u2126\n", + "Rf=100 #k\u2126\n", + "hie=1.1\n", + "Rc=10 #k\u2126\n", + "Rl=10 #k\u2126\n", + "hfe=50\n", + "\n", + "#CALCULATIONS\n", + "d=((1/Rs)+(1/Rf)+(1/hie))*((1/Rf)+((Rc+Rl)/(Rc*Rl)))+((1/Rf)*((hfe/hie)-(1/Rf)))\n", + "\n", + "#RESULTS\n", + "print\"The value of d=\",round(d,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of d= 0.689\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 , Page no:186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfb=-0.99\n", + "hib=25\n", + "\n", + "#CALCULATIONS\n", + "Rc=2.2*10**3\n", + "Rl=1.1*10**3\n", + "Re=3.3*10**3\n", + "hob=10**-6\n", + "Av=((Rc*Rl*hfb)/(hib*(Rc+Rl+hob*(Rc*Rl))))\n", + "Ai=-((Re*Rc*hfb)/((Re+hib)+(Rc+Rl+hob*Rl*Rc)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -29.019\n", + "The value of Ai= 1084.494\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 , Page no:189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=40\n", + "hie=1500\n", + "\n", + "#CALCULATIONS\n", + "Rc2=20*10**3 #\u2126\n", + "Rc1=10**4 #\u2126\n", + "hoe=30*10**-6\n", + "Av2=-((hfe*Rc2)/(hie*(1+hoe*Rc2))) #final-stage voltage gain\n", + "Rb2=5*10**3 #\u2126\n", + "Zin2=(((Rb2*hie)/(Rb2+hie)))/1000 #final-stage input impedance Zin2\n", + "Zin21=Zin2*1000\n", + "Av1=-((hfe*Zin21*Rc1)/(hie*(Rc1+Zin21+hoe*Zin21*Rc1))) #initial-stage voltage gain\n", + "\n", + "#RESULTS\n", + "print\"The value of Av2=\",round(Av2,3)\n", + "print\"The value of Zin2=\",round(Zin2,3),\"Kohm\";\n", + "print\"The value of Av1=\",round(Av1,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av2= -333.333\n", + "The value of Zin2= 1.154 Kohm\n", + "The value of Av1= -26.756\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 , Page no:191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Av1=0.9879\n", + "hfe=100\n", + "\n", + "#CALCULATIONS\n", + "R11=90*10**3\n", + "R12=100*10**3\n", + "R22=90*10**3\n", + "R21=10*10**3\n", + "Rl=5*10**3\n", + "Rc=5*10**3\n", + "hie=1*10**3\n", + "Rb1=((R11*R12)/(R11+R12))/1000\n", + "Rb2=((R22*R21)/(R22+R21))/1000\n", + "Av2=-((hfe*Rl*Rc)/(hie*(Rl+Rc)))\n", + "Av=Av1*Av2\n", + "\n", + "#RESULTS\n", + "print\"The value of Rb1=\",round(Rb1,3),\"Kohm\";\n", + "print\"The value of Rb2=\",round(Rb2,3),\"Kohm\";\n", + "print\"The value of Av2=\",round(Av2,3)\n", + "print\"The value of Av=\",round(Av,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Rb1= 47.368 Kohm\n", + "The value of Rb2= 9.0 Kohm\n", + "The value of Av2= -250.0\n", + "The value of Av= -246.975 Kohm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 , Page no:193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfe=100\n", + "\n", + "#CALCULATIONS\n", + "Rl=3*10**3 #k\u2126\n", + "Rc=3*10**3 #k\u2126\n", + "hie=1*10**3\n", + "Av2=-((hfe*Rl*Rc)/(hie*(Rl+Rc)))\n", + "Rc1=10*10**3 #k\u2126\n", + "Re1=1*10**3 #k\u2126\n", + "Av1=-((hfe*Rc1*hie)/((Rc1+hie)*((hfe+1)*Re1+hie)))\n", + "Av=Av1*Av2\n", + "Ai1=-((hfe*Rc1)/(Rc1+hie))\n", + "Rc2=3*10**3 #k\u2126\n", + "Ai2=-((hfe*Rc2)/(Rc2+Rl))\n", + "Ai=Ai1*Ai2\n", + "\n", + "#RESULTS\n", + "print\"The value of Av2=\",round(Av2,3);\n", + "print\"The value of Av1=\",round(Av1,3);\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Ai1=\",round(Ai1,3);\n", + "print\"The value of Ai2=\",round(Ai2,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av2= -150.0\n", + "The value of Av1= -0.891\n", + "The value of Av= 133.69\n", + "The value of Ai1= -90.909\n", + "The value of Ai2= -50.0\n", + "The value of Ai= 4545.455\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 , Page no:194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hfb1=-0.99\n", + "hfc2=-100\n", + "hic2=500\n", + "hib1=50\n", + "hic2=500\n", + "Av2=0.995\n", + "\n", + "#CALCULATIONS\n", + "Rb=33.3*10**3\n", + "Re1=5*10**3\n", + "Re2=2*10**3\n", + "Rl=2*10**3\n", + "Av1=-((hfb1*Rb*hic2)/(hib1*(Rb+hic2)))\n", + "Av=Av1*Av2\n", + "Ai1=-((hfb1*Re1*Rb)/((Re1+hib1)*(Rb+hic2)))\n", + "Ai2=-((hfc2*Re2)/(Re2+Rl))\n", + "Ai=Ai1*Ai2\n", + "\n", + "#RESULTS\n", + "print\"The value of Av1=\",round(Av1,3);\n", + "print\"The value of Av1=\",round(Av,3);\n", + "print\"The value of Ai1=\",round(Ai1);\n", + "print\"The value of Ai2=\",round(Ai2,3);\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av1= 9.754\n", + "The value of Av1= 9.705\n", + "The value of Ai1= 1.0\n", + "The value of Ai2= 50.0\n", + "The value of Ai= 48.285\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_SMALL_SIGNAL_MIDFREQUENCY_FET_AND_TRIODE_AMPLIFIERS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_SMALL_SIGNAL_MIDFREQUENCY_FET_AND_TRIODE_AMPLIFIERS.ipynb new file mode 100755 index 00000000..4fef8033 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_SMALL_SIGNAL_MIDFREQUENCY_FET_AND_TRIODE_AMPLIFIERS.ipynb @@ -0,0 +1,498 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1d124b4b43bfec24f43b2928e3aabb7d291658bb12b1383beec99ef41a6a2286" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 SMALL SIGNAL MIDFREQUENCY FET AND TRIODE AMPLIFIERS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 , Page no:207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgs=2\n", + "\n", + "#CALCULATIONS\n", + "Did=(3.3-0.3)*10**-3\n", + "gm=Did/Vgs*1000\n", + "Dvds=20-5\n", + "Did1=(1.6-1.4)*10**-3\n", + "rds=Dvds/Did1/1000\n", + "Did2=(2-1)*10**-3\n", + "Dvgs=-1.75-(-2.4)\n", + "gm1=Did2/Dvgs*1000 \n", + "\n", + "#RESULTS\n", + "print\"The value of gm=\",round(gm,3),\"mS\";\n", + "print\"The value of rds=\",round(rds,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm1,3),\"mS\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of gm= 1.5 mS\n", + "The value of rds= 75.0 kOhm\n", + "The value of gm= 1.538 mS\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 , Page no:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=14*10**3\n", + "rds=40*10**3\n", + "Rf=5*10**6\n", + "gm=1*10**-3\n", + "\n", + "#CALCULATIONS\n", + "Av=((Rl*rds*(1-Rf*gm))/(Rf*rds+Rl*rds+Rl*Rf))\n", + "Zin=(Rf/(1-Av))/1000\n", + "Ai=(Av*Zin)/Rl*1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Zin=\",round(Zin,3),\"kOhm\";\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -10.347\n", + "The value of Zin= 440.651 kOhm\n", + "The value of Ai= -325.668\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 , Page no:209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=200*10**3\n", + "R2=800*10**3\n", + "Rg=160*10**3\n", + "r1=5*10**3\n", + "Av=-1.88\n", + "Rl=2*10**3\n", + "\n", + "#CALCULATIONS\n", + "Zin=(R1*R2/(R1+R2))/1000\n", + "vgs=Rg/(Rg+r1)\n", + "Ai=(Av*(Rg+r1))/Rl\n", + "\n", + "#RESULTS\n", + "print\"The value of Zin=\",round(Zin,3),\"Kohm\";\n", + "print\"The value of vgs=\",round(vgs,3),\"vi\";\n", + "print\"The value of ai=\",round(Ai,3),\"vi\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Zin= 160.0 Kohm\n", + "The value of vgs= 0.97 vi\n", + "The value of ai= -155.1 vi\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 , Page no:211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rd=2\n", + "Rl=4\n", + "Rg=160\n", + "r1=5\n", + "rds=30\n", + "Rs=3\n", + "\n", + "#CALCULATIONS\n", + "m=2*10**-3\n", + "Rg1=30*10**3\n", + "Av=(-m*Rg*Rd*Rl)/((Rg+r1)*((Rd+Rl)*(rds+(m+1)*Rs+Rd*Rl)))*1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -0.063\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 , Page no:213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rg=100 #k\u2126\n", + "ri=5\n", + "gm=0.0025\n", + "rds=25\n", + "Rd=2 #k\u2126\n", + "Rl=2 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "vgs=(Rg/(Rg+ri))\n", + "Req=(rds*Rd*Rl*10**3)/(2*Rl*Rd+rds*(Rl+Rd))\n", + "Av=-2*gm*vgs*Req\n", + "Ai=((Av*(Rg+ri))/Rl)\n", + "R0=(Rd*rds)/(2*Rd+rds)\n", + "\n", + "#RESULTS\n", + "print\"The value of vgs=\",round(vgs,3),\"vi\";\n", + "print\"The value of Req=\",round(Req,3),\"Kohm\";\n", + "print\"The value of Av=\",round(Av,3)\n", + "print\"The value of Ai=\",round(Ai,3)\n", + "print\"The value of R0=\",round(R0,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vgs= 0.952 vi\n", + "The value of Req= 925.926 Kohm\n", + "The value of Av= -4.409\n", + "The value of Ai= -231.481\n", + "The value of R0= 1.724 Kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 , Page no:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "gm=0.002\n", + "\n", + "#CALCULATIONS\n", + "rds=30*10**3\n", + "Rs2=1.2*10**3\n", + "Rl=1*10**3 #k\u2126\n", + "Rg=1*10**6 #k\u2126\n", + "Req=1/((1/rds)+(1/Rs2)+(1/Rl))\n", + "Av=((gm*Rg+1)*Req)/(Rg+(gm*Rg+1)*Req)\n", + "Ai=(Av*Rg/((1-Av)*Rl))\n", + "Rin=Rg/(1-Av)/10**6\n", + "R0=1/(1/Rs2+1/rds+1/Rg+gm)\n", + "\n", + "#RESULTS\n", + "print\"The value of Req=\",round(Req,3)\n", + "print\"The value of Av=\",round(Av,3)\n", + "print\"The value of Ai=\",round(Ai,3)\n", + "print\"The value of Rin=\",round(Rin,3),\"mOhm\";\n", + "print\"The value of R0=\",round(R0,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Req= 535.714\n", + "The value of Av= 0.517\n", + "The value of Ai= 1071.964\n", + "The value of Rin= 2.072 mOhm\n", + "The value of R0= 348.716 Ohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 , Page no:215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "gm=1.5*10**-3\n", + "rds=75*10**3\n", + "Rd=3*10**3 #k\u2126\n", + "rds=75*10**3\n", + "\n", + "#CALCULATIONS\n", + "vds=-(gm*rds*Rd)/(rds+Rd)\n", + "Vdsm=-1*vds #V\n", + "idm=(gm+(Vdsm/rds))*1000 \n", + "\n", + "#RESULTS\n", + "print\"The value of vds=\",round(vds,3),\"vgs\";\n", + "print\"The value of idm=\",round(idm,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vds= -4.327 vgs\n", + "The value of idm= 1.558 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 , Page no:219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vp=100 #v\n", + "vg=-4\n", + "\n", + "#CALCULATIONS\n", + "ip=15*10**-3 #mA\n", + "k=(ip/(vp**(3/2)))*10**6\n", + "m=-(vp/vg)\n", + "\n", + "#RESULTS\n", + "print\"The value of k=\",round(k,3),\"mA/v^3/2\";\n", + "print\"The value of m=\",round(m,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of k= 15.0 mA/v^3/2\n", + "The value of m= 25.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 , Page no:219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "dvp=218-152\n", + "dip=(14.7-8.1)*10**-3\n", + "\n", + "#CALCULATIONS\n", + "rp=dvp/dip/1000 #k\u2126\n", + "dvg=-2-(-6)\n", + "gm=dip/dvg*1000 #mS\n", + "\n", + "#RESULTS\n", + "print\"The value of rp=\",round(rp,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm,3),\"mS\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of rp= 10.0 kOhm\n", + "The value of gm= 1.65 mS\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 , Page no:220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vpp=300 #V\n", + "Vgq=4 #V\n", + "Rl=11.6*10**3 #\u2126\n", + "Vpm=34 #V\n", + "Vgm=2\n", + "\n", + "#CALCULATIONS\n", + "Av=-(2*Vpm/2*Vgm)\n", + "dvp=202-168\n", + "dip=(15-8)*10**-3\n", + "rp=dvp/dip/1000 #k\u2126\n", + "dip1=(15.5-6.5)*10**-3\n", + "dvg=-3-(-5)\n", + "gm=dip1/dvg*1000 #ms\n", + "m=21.87\n", + "Rl=11.6 #\u2126\n", + "Av=-(m*Rl*10**3)/((Rl+rp)*10**3) #Voltage gain\n", + "\n", + "#RESULTS\n", + "print\"The value of rp=\",round(rp,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm,3),\"ms\";\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of rp= 4.857 kOhm\n", + "The value of gm= 4.5 ms\n", + "The value of Av= -15.415\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb new file mode 100644 index 00000000..f15e9068 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_7_Small_Signal_Midfrequency_Fet_And_Triode_Amplifiers.ipynb @@ -0,0 +1,498 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7a853a0620a80cdb4199c91f9765c840bb9db9aa63bef6a370cd0920f8e7be42" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 Small Signal Midfrequency Fet And Triode Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 , Page no:207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vgs=2\n", + "\n", + "#CALCULATIONS\n", + "Did=(3.3-0.3)*10**-3\n", + "gm=Did/Vgs*1000\n", + "Dvds=20-5\n", + "Did1=(1.6-1.4)*10**-3\n", + "rds=Dvds/Did1/1000\n", + "Did2=(2-1)*10**-3\n", + "Dvgs=-1.75-(-2.4)\n", + "gm1=Did2/Dvgs*1000 \n", + "\n", + "#RESULTS\n", + "print\"The value of gm=\",round(gm,3),\"mS\";\n", + "print\"The value of rds=\",round(rds,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm1,3),\"mS\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of gm= 1.5 mS\n", + "The value of rds= 75.0 kOhm\n", + "The value of gm= 1.538 mS\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 , Page no:208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=14*10**3\n", + "rds=40*10**3\n", + "Rf=5*10**6\n", + "gm=1*10**-3\n", + "\n", + "#CALCULATIONS\n", + "Av=((Rl*rds*(1-Rf*gm))/(Rf*rds+Rl*rds+Rl*Rf))\n", + "Zin=(Rf/(1-Av))/1000\n", + "Ai=(Av*Zin)/Rl*1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);\n", + "print\"The value of Zin=\",round(Zin,3),\"kOhm\";\n", + "print\"The value of Ai=\",round(Ai,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -10.347\n", + "The value of Zin= 440.651 kOhm\n", + "The value of Ai= -325.668\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 , Page no:209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=200*10**3\n", + "R2=800*10**3\n", + "Rg=160*10**3\n", + "r1=5*10**3\n", + "Av=-1.88\n", + "Rl=2*10**3\n", + "\n", + "#CALCULATIONS\n", + "Zin=(R1*R2/(R1+R2))/1000\n", + "vgs=Rg/(Rg+r1)\n", + "Ai=(Av*(Rg+r1))/Rl\n", + "\n", + "#RESULTS\n", + "print\"The value of Zin=\",round(Zin,3),\"Kohm\";\n", + "print\"The value of vgs=\",round(vgs,3),\"vi\";\n", + "print\"The value of ai=\",round(Ai,3),\"vi\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Zin= 160.0 Kohm\n", + "The value of vgs= 0.97 vi\n", + "The value of ai= -155.1 vi\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 , Page no:211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rd=2\n", + "Rl=4\n", + "Rg=160\n", + "r1=5\n", + "rds=30\n", + "Rs=3\n", + "\n", + "#CALCULATIONS\n", + "m=2*10**-3\n", + "Rg1=30*10**3\n", + "Av=(-m*Rg*Rd*Rl)/((Rg+r1)*((Rd+Rl)*(rds+(m+1)*Rs+Rd*Rl)))*1000\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -0.063\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 , Page no:213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rg=100 #k\u2126\n", + "ri=5\n", + "gm=0.0025\n", + "rds=25\n", + "Rd=2 #k\u2126\n", + "Rl=2 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "vgs=(Rg/(Rg+ri))\n", + "Req=(rds*Rd*Rl*10**3)/(2*Rl*Rd+rds*(Rl+Rd))\n", + "Av=-2*gm*vgs*Req\n", + "Ai=((Av*(Rg+ri))/Rl)\n", + "R0=(Rd*rds)/(2*Rd+rds)\n", + "\n", + "#RESULTS\n", + "print\"The value of vgs=\",round(vgs,3),\"vi\";\n", + "print\"The value of Req=\",round(Req,3),\"Kohm\";\n", + "print\"The value of Av=\",round(Av,3)\n", + "print\"The value of Ai=\",round(Ai,3)\n", + "print\"The value of R0=\",round(R0,3),\"Kohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vgs= 0.952 vi\n", + "The value of Req= 925.926 Kohm\n", + "The value of Av= -4.409\n", + "The value of Ai= -231.481\n", + "The value of R0= 1.724 Kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11 , Page no:214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "gm=0.002\n", + "\n", + "#CALCULATIONS\n", + "rds=30*10**3\n", + "Rs2=1.2*10**3\n", + "Rl=1*10**3 #k\u2126\n", + "Rg=1*10**6 #k\u2126\n", + "Req=1/((1/rds)+(1/Rs2)+(1/Rl))\n", + "Av=((gm*Rg+1)*Req)/(Rg+(gm*Rg+1)*Req)\n", + "Ai=(Av*Rg/((1-Av)*Rl))\n", + "Rin=Rg/(1-Av)/10**6\n", + "R0=1/(1/Rs2+1/rds+1/Rg+gm)\n", + "\n", + "#RESULTS\n", + "print\"The value of Req=\",round(Req,3)\n", + "print\"The value of Av=\",round(Av,3)\n", + "print\"The value of Ai=\",round(Ai,3)\n", + "print\"The value of Rin=\",round(Rin,3),\"mOhm\";\n", + "print\"The value of R0=\",round(R0,3),\"Ohm\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Req= 535.714\n", + "The value of Av= 0.517\n", + "The value of Ai= 1071.964\n", + "The value of Rin= 2.072 mOhm\n", + "The value of R0= 348.716 Ohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 , Page no:215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "gm=1.5*10**-3\n", + "rds=75*10**3\n", + "Rd=3*10**3 #k\u2126\n", + "rds=75*10**3\n", + "\n", + "#CALCULATIONS\n", + "vds=-(gm*rds*Rd)/(rds+Rd)\n", + "Vdsm=-1*vds #V\n", + "idm=(gm+(Vdsm/rds))*1000 \n", + "\n", + "#RESULTS\n", + "print\"The value of vds=\",round(vds,3),\"vgs\";\n", + "print\"The value of idm=\",round(idm,3),\"mA\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of vds= -4.327 vgs\n", + "The value of idm= 1.558 mA\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 , Page no:219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "vp=100 #v\n", + "vg=-4\n", + "\n", + "#CALCULATIONS\n", + "ip=15*10**-3 #mA\n", + "k=(ip/(vp**(3/2)))*10**6\n", + "m=-(vp/vg)\n", + "\n", + "#RESULTS\n", + "print\"The value of k=\",round(k,3),\"mA/v^3/2\";\n", + "print\"The value of m=\",round(m,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of k= 15.0 mA/v^3/2\n", + "The value of m= 25.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 , Page no:219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "dvp=218-152\n", + "dip=(14.7-8.1)*10**-3\n", + "\n", + "#CALCULATIONS\n", + "rp=dvp/dip/1000 #k\u2126\n", + "dvg=-2-(-6)\n", + "gm=dip/dvg*1000 #mS\n", + "\n", + "#RESULTS\n", + "print\"The value of rp=\",round(rp,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm,3),\"mS\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of rp= 10.0 kOhm\n", + "The value of gm= 1.65 mS\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 , Page no:220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Vpp=300 #V\n", + "Vgq=4 #V\n", + "Rl=11.6*10**3 #\u2126\n", + "Vpm=34 #V\n", + "Vgm=2\n", + "\n", + "#CALCULATIONS\n", + "Av=-(2*Vpm/2*Vgm)\n", + "dvp=202-168\n", + "dip=(15-8)*10**-3\n", + "rp=dvp/dip/1000 #k\u2126\n", + "dip1=(15.5-6.5)*10**-3\n", + "dvg=-3-(-5)\n", + "gm=dip1/dvg*1000 #ms\n", + "m=21.87\n", + "Rl=11.6 #\u2126\n", + "Av=-(m*Rl*10**3)/((Rl+rp)*10**3) #Voltage gain\n", + "\n", + "#RESULTS\n", + "print\"The value of rp=\",round(rp,3),\"kOhm\";\n", + "print\"The value of gm=\",round(gm,3),\"ms\";\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of rp= 4.857 kOhm\n", + "The value of gm= 4.5 ms\n", + "The value of Av= -15.415\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_FREQUENCY_EFFECTS_IN_AMPLIFIERS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_FREQUENCY_EFFECTS_IN_AMPLIFIERS.ipynb new file mode 100755 index 00000000..60448e3c --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_FREQUENCY_EFFECTS_IN_AMPLIFIERS.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8ef023228932ba7c44f0f72b79793f31a32f8ea67eae875510cf71ee015fc22c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 FREQUENCY EFFECTS IN AMPLIFIERS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 , Page no:242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hie=1000 #\u2126\n", + "hfe=75 #\u2126\n", + "Av=50\n", + "Rl=10000 #k\u2126\n", + "hie2=300 #\u2126\n", + "hfe2=100 #\u2126\n", + "Re=1000 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Req=Av*(hie/hfe) #\u2126\n", + "Rc=Req*Rl/(Rl-Req) #k\u2126\n", + "wL=2*3.14*200\n", + "Ce=(hie2+(hfe2+1)*Re)/(wL*Re*hie2)*10**6\n", + "Av1=(hfe*Req)/(hie+(hfe+1)*Re)\n", + "\n", + "#RESULTS\n", + "print\"The value of Req=\",round(Req,3),\"Ohm\";\n", + "print\"The value of Rc=\",round(Rc,3),\"Ohm\";\n", + "print\"The value of Ce=\",round(Ce,3),\"mF\";\n", + "print\"The value of Av=\",round(Av1,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Req= 666.667 Ohm\n", + "The value of Rc= 714.286 Ohm\n", + "The value of Ce= 268.843 mF\n", + "The value of Av= 0.649\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 , Page no:244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hie2=1500 #\u2126\n", + "Rb2=5000 #k\u2126\n", + "Z01=10\n", + "Av=7881.3\n", + "\n", + "#CALCULATIONS\n", + "C2=1*10**-6 \n", + "Zin2=(hie2*Rb2/(hie2+Rb2))\n", + "fl=1/(2*3.14*C2*(Zin2+Z01*10**3))\n", + "\n", + "#RESULTS\n", + "print\"The value of Zin2=\",round(Zin2,3),\"Ohm\";\n", + "print\"The value of fl=\",round(fl,3),\"Hz\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Zin2= 1153.846 Ohm\n", + "The value of fl= 14.276 Hz\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb new file mode 100644 index 00000000..d1b99577 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_8_Frequency_Effects_In_Amplifiers.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06a40bc7319ecd8d3001e25359b239ea0d28d8cae3b07045f1fe929f01e58e80" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 Frequency Effects In Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 , Page no:242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hie=1000 #\u2126\n", + "hfe=75 #\u2126\n", + "Av=50\n", + "Rl=10000 #k\u2126\n", + "hie2=300 #\u2126\n", + "hfe2=100 #\u2126\n", + "Re=1000 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Req=Av*(hie/hfe) #\u2126\n", + "Rc=Req*Rl/(Rl-Req) #k\u2126\n", + "wL=2*3.14*200\n", + "Ce=(hie2+(hfe2+1)*Re)/(wL*Re*hie2)*10**6\n", + "Av1=(hfe*Req)/(hie+(hfe+1)*Re)\n", + "\n", + "#RESULTS\n", + "print\"The value of Req=\",round(Req,3),\"Ohm\";\n", + "print\"The value of Rc=\",round(Rc,3),\"Ohm\";\n", + "print\"The value of Ce=\",round(Ce,3),\"mF\";\n", + "print\"The value of Av=\",round(Av1,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Req= 666.667 Ohm\n", + "The value of Rc= 714.286 Ohm\n", + "The value of Ce= 268.843 mF\n", + "The value of Av= 0.649\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 , Page no:244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "hie2=1500 #\u2126\n", + "Rb2=5000 #k\u2126\n", + "Z01=10\n", + "Av=7881.3\n", + "\n", + "#CALCULATIONS\n", + "C2=1*10**-6 \n", + "Zin2=(hie2*Rb2/(hie2+Rb2))\n", + "fl=1/(2*3.14*C2*(Zin2+Z01*10**3))\n", + "\n", + "#RESULTS\n", + "print\"The value of Zin2=\",round(Zin2,3),\"Ohm\";\n", + "print\"The value of fl=\",round(fl,3),\"Hz\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Zin2= 1153.846 Ohm\n", + "The value of fl= 14.276 Hz\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_OPERATIONAL_AMPLIFIERS.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_OPERATIONAL_AMPLIFIERS.ipynb new file mode 100755 index 00000000..d0466e5a --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_OPERATIONAL_AMPLIFIERS.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ec243d9f97718cdb47e4ff5526288f5dcab002323771f591078cd3384ab3a3da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 OPERATIONAL AMPLIFIERS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 , Page no:268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=1 #k\u2126\n", + "Rf=10 #k\u2126\n", + "Rd=1 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Aol=-10**4\n", + "Av=(Aol/(1+(Rl/Rf)*(1-Aol)+(Rl/Rd)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -9.979\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 , Page no:272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=1\n", + "Rf=10\n", + "Rd=1\n", + "\n", + "#CALCULATIONS\n", + "Aol=-10**4\n", + "Av=(Aol/(1+(Rl/Rf)*(1-Aol)+(Rl/Rd)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -9.979\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 , Page no:274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "f=100 #Hz\n", + "\n", + "#CALCULATIONS\n", + "R=10*10**3 #\u2126\n", + "C=(0.1/(2*3.14*f*R))*10**9 #Capicitor\n", + "\n", + "#RESULTS\n", + "print\"The value of C=\",round(C,3),\"nF\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C= 15.924 nF\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.25 , Page no:281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=10*10**3 #\u2126\n", + "R2=20*10**3 #\u2126\n", + "R3=20*10**3 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "Av=-((R2*R3)/(R1*(R2+R3)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -1.0\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb new file mode 100644 index 00000000..a67b5b36 --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/Chapter_9_Operational_Amplifiers.ipynb @@ -0,0 +1,180 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bd39876304663cf24b291325d3ff0e166ccf766db8e59c188cbbc3d2cc2c0ade" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 , Page no:268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=1 #k\u2126\n", + "Rf=10 #k\u2126\n", + "Rd=1 #k\u2126\n", + "\n", + "#CALCULATIONS\n", + "Aol=-10**4\n", + "Av=(Aol/(1+(Rl/Rf)*(1-Aol)+(Rl/Rd)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -9.979\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 , Page no:272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "Rl=1\n", + "Rf=10\n", + "Rd=1\n", + "\n", + "#CALCULATIONS\n", + "Aol=-10**4\n", + "Av=(Aol/(1+(Rl/Rf)*(1-Aol)+(Rl/Rd)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -9.979\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 , Page no:274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "f=100 #Hz\n", + "\n", + "#CALCULATIONS\n", + "R=10*10**3 #\u2126\n", + "C=(0.1/(2*3.14*f*R))*10**9 #Capicitor\n", + "\n", + "#RESULTS\n", + "print\"The value of C=\",round(C,3),\"nF\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C= 15.924 nF\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.25 , Page no:281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "R1=10*10**3 #\u2126\n", + "R2=20*10**3 #\u2126\n", + "R3=20*10**3 #\u2126\n", + "\n", + "#CALCULATIONS\n", + "Av=-((R2*R3)/(R1*(R2+R3)))\n", + "\n", + "#RESULTS\n", + "print\"The value of Av=\",round(Av,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Av= -1.0\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt new file mode 100644 index 00000000..d7ee067d --- /dev/null +++ b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/README.txt @@ -0,0 +1,10 @@ +Contributed By: Kavinkumar D +Course: others +College/Institute/Organization: KSR College of Arts & Science,Tiruchengode +Department/Designation: Computer Science +Book Title: Schaum's Outlines Of Electronic Devices And Circuits +Author: J. J. Cathey +Publisher: McGraw Hill, New York +Year of publication: 2002 +Isbn: 0-07-139830-9 +Edition: 2 \ No newline at end of file diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png new file mode 100644 index 00000000..a27fb7e7 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c1.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png new file mode 100644 index 00000000..200865e5 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c2.png differ diff --git a/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png new file mode 100644 index 00000000..27e6e441 Binary files /dev/null and b/Schaum's_Outlines_Of_Electronic_Devices_And_Circuits_by_J._J._Cathey/screenshots/c3.png differ diff --git a/Semiconductor_Physics_and_Devices_Basic_Principles/README.txt b/Semiconductor_Physics_and_Devices_Basic_Principles/README.txt new file mode 100755 index 00000000..d3abe0a5 --- /dev/null +++ b/Semiconductor_Physics_and_Devices_Basic_Principles/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: Semiconductor Physics and Devices Basic Principles +Author: D. A. Neamen +Publisher: McGraw Hill, New York +Year of publication: 2003 +Isbn: 0-07-232107-5 +Edition: 3rd \ No newline at end of file diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt new file mode 100644 index 00000000..75687fcf --- /dev/null +++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/README.txt @@ -0,0 +1,10 @@ +Contributed By: Laxman Sole +Course: btech +College/Institute/Organization: Vishwakarma Institute of Technology, Pune +Department/Designation: Electronics Engineering +Book Title: Solid State Devices and Circuits +Author: Sanjay Sharma +Publisher: S.K.Kataria and sons, New Delhi +Year of publication: 2014 +Isbn: 978-81-88458-35-6 +Edition: 5 \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb new file mode 100644 index 00000000..f027d9c4 --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_01.ipynb @@ -0,0 +1,804 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2585c64821e409bb345db95acb15436fd73be8f9564cebfa80630f17af21de1a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 1 : Semiconductor and Magnetic Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.2 : Page No - 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "from __future__ import division\n", + "#Given data\n", + "I=0.5 # in A\n", + "rho= 7.4 # in \u03a9/1000 ft\n", + "rho= rho/(3.05*10**4) # in \u03a9/cm\n", + "sigma= 1/rho #in cm/\u03a9\n", + "print \"(a) : Conductivity = %0.2e \u03a9/cm\" %sigma\n", + "\n", + "# Part (ii)\n", + "n= 6.5*10**28 # in per meter cube\n", + "q= 1.6*10**-19 # in C\n", + "# Formula sigma= n*q*miu_n\n", + "miu_n= sigma/(n*q) # in cm**2/Vs\n", + "print \"(b) : Mobility = %0.2e cm**2/Vs\" %miu_n\n", + "\n", + "# Part (iii)\n", + "D= 2.5*10**-3 # in m\n", + "A= pi*D**2/4 # in m**2\n", + "v_d= I/(n*q*A) # in m/s\n", + "print \"(c) : Drift velocity = %0.2e m/s\" %v_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : Conductivity = 4.12e+03 \u03a9/cm\n", + "(b) : Mobility = 3.96e-07 cm**2/Vs\n", + "(c) : Drift velocity = 9.79e-06 m/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.3 : Page No - 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 6*10**18 # in per cube cm\n", + "N_A= 3*10**15 # in per cube cm\n", + "ni= 2.5*10**12 \n", + "Nn= N_D-N_A # in per cube cm\n", + "rho_n= ni**2/Nn # in per cube cm\n", + "# Part (i)\n", + "print \"(a) : The concentration of holes in n-type = %0.2e per cm**3\" %rho_n\n", + "print \" Concentration of electrons in n-type = %0.3e per cm**3\" %Nn\n", + "# Part (ii)\n", + "print \"(b) : The material is of n-type\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The concentration of holes in n-type = 1.04e+06 per cm**3\n", + " Concentration of electrons in n-type = 5.997e+18 per cm**3\n", + "(b) : The material is of n-type\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.4 : Page No - 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni= 2.5*10**19 \n", + "q= 1.6*10**-19 # in C\n", + "miu_n= 0.36 \n", + "miu_p= 0.17 \n", + "sigma= q*ni*(miu_n+miu_p) # in s/m\n", + "rho= 1/sigma # in \u03a9m\n", + "print \"The conductivity of Ge = %0.2f s/m\" %sigma\n", + "print \"The resistivity of Ge = %0.2f \u03a9m\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of Ge = 2.12 s/m\n", + "The resistivity of Ge = 0.47 \u03a9m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.5 : Page No - 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e= 1.6*10**-19 # in C\n", + "ni= 1.5*10**16 \n", + "miu_n= 0.13 \n", + "miu_p= 0.05 \n", + "atomicDensity= 5*10**28 #atomic density of Si in /m**3\n", + "C= 1/(2*10**8) # concentration \n", + "N_D= atomicDensity*C # in /m**3\n", + "n=N_D \n", + "p= ni**2/N_D # in /m**3\n", + "sigma= e*(n*miu_n+p*miu_p) # in s/m\n", + "print \"Conductivity of the extrinsic semiconductor = %0.1f s/m\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of the extrinsic semiconductor = 5.2 s/m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.6 : Page No - 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "Eg= 0.72 # in eV\n", + "Ef= Eg/2 #in eV\n", + "K= 8.61*10**-5 # in eV/K\n", + "T=300 #in K\n", + "nc= 1 \n", + "n= 1+exp(((Eg-Ef)/(K*T))) \n", + "ncBYn= nc/n \n", + "print \"The fraction of the total number or electrons = %0.2e\" %ncBYn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction of the total number or electrons = 8.85e-07\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.7 : Page No - 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni= 1.4*10**18 #in /m**3\n", + "N_D= 1.4*10**24 #in /m**3 \n", + "n=N_D \n", + "p= ni**2/n # in /m**3\n", + "nbyp= n/p \n", + "print \"The ratio of electron to holes concentration = %0.1e\" %nbyp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of electron to holes concentration = 1.0e+12\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.8 : Page No - 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "d= 2 # in mm\n", + "d=d*10**-3 #in m\n", + "sigma= 5.8*10**7 # in s/m\n", + "miu_c= 0.0032 # in m**2/v-sec\n", + "E= 20 #in mV/m\n", + "E=E*10**-3 #in V/m\n", + "e= 1.6*10**-19 # in C\n", + "# Part (a)\n", + "n= sigma/(e*miu_c) #in /m**3\n", + "print \"(a) : Charge density = %0.3e per meter cube\" %n\n", + "\n", + "# Part (b)\n", + "J= sigma*E #in A/m**2\n", + "print \"(b) : Current density = %0.2e A/m**2\" %J\n", + "\n", + "# Part (c)\n", + "Area= pi*d**2/4 # in area of cross-section of wire in m**2\n", + "I= J*Area # in A\n", + "print \"(c) : Current flowing in the wire = %0.3f amp\" %I\n", + "\n", + "# Part (d)\n", + "v= miu_c*E # in m/sec\n", + "print \"(d) : Electron drift velocity = %0.1e m/sec\" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : Charge density = 1.133e+29 per meter cube\n", + "(b) : Current density = 1.16e+06 A/m**2\n", + "(c) : Current flowing in the wire = 3.644 amp\n", + "(d) : Electron drift velocity = 6.4e-05 m/sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.9 : Page No - 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "rho= 0.5 # in \u03a9-m\n", + "miu_c= 0.4 # in m**2/v-sec\n", + "J=100 #in A/m**2\n", + "distance=10 # \u00b5m\n", + "distance=distance*10**-6 #in sec\n", + "# V= miu_c*E = miu_c*J/sigma = miu_c*J*rho \n", + "V= miu_c*J*rho # in m/sec\n", + "print \"Drift velocity = %0.f m/sec\" %V\n", + "T= distance/V # in second\n", + "print \"The time taken by the electron to travel 10 micro meter in the crystal = %0.1e second\" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drift velocity = 20 m/sec\n", + "The time taken by the electron to travel 10 micro meter in the crystal = 5.0e-07 second\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.10 : Page No - 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Bo= 1.7*10**-5 # in weber/meter**2\n", + "miu_o= 4*pi*10**-7 # in weber/amp-meter\n", + "H= Bo/miu_o #in A/m\n", + "print \"The horizontal component of the magnetic intensity = %0.1f A/m\" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal component of the magnetic intensity = 13.5 A/m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.11 : Page No - 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "H= 5*10**3 # in amp/meter\n", + "N= 50 \n", + "l= 10 #in cm\n", + "l=l*10**-2 # in m\n", + "n=N/l # in turns/meter\n", + "i= H/n # in amp\n", + "print \"Current should be sent through the solenoid = %0.f ampere\" %i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current should be sent through the solenoid = 10 ampere\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.12 : Page No - 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "vol= 10**-4 # volume of the rod in m**3\n", + "i=0.5 # in amp\n", + "n= 5 # turns/cm\n", + "n= n*10**2 # turns/meter\n", + "miu_r= 1000 \n", + "#B= miu_o*(H+I)\n", + "# Where I= Bo/miu_o-H and B= miu*H = miu_r*miu_o*H\n", + "# Then I= miu_r*miu_o*H/miu_o - H = (miu_r-1)*H\n", + "# H= n*i\n", + "I= (miu_r-1)*n*i # in amp/meter\n", + "MagMoment= I*vol # in Am**2\n", + "print \"Magnetic moment = %0.f Am**2\" %MagMoment" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnetic moment = 25 Am**2\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.13 : Page No - 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Xm= 9.48*10**-9 \n", + "miu_r= 1+Xm #\n", + "print \"Relative permeability = 1 + %0.2e\" %Xm\n", + "print \"That is \u00b5r is slightly greater than 1\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relative permeability = 1 + 9.48e-09\n", + "That is \u00b5r is slightly greater than 1\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.14 : Page No - 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "fie_B= 2*10**-6 # in weber\n", + "A= 10**-4 # in m**2\n", + "N= 300 # number of turns\n", + "l=30 #in cm\n", + "l=l*10**-2 #in meter\n", + "i=0.032 # in amp\n", + "miu_o= 4*pi*10**-7 \n", + "B=fie_B/A # in weber/meter**2\n", + "print \"Flux density = %0.1e weber/meter**2\" %B\n", + "H= N*i/l # in amp-turn/meter\n", + "print \"Magnetic intensity = %0.f amp-turn/meter\"%H\n", + "miu= B/H # in weber/amp-meter\n", + "print \"Pemeability = %0.2e weber/amp-meter\" %miu\n", + "miu_r= miu/miu_o \n", + "print \"Relative permeability = %0.f\" %miu_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flux density = 2.0e-02 weber/meter**2\n", + "Magnetic intensity = 32 amp-turn/meter\n", + "Pemeability = 6.25e-04 weber/amp-meter\n", + "Relative permeability = 497\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.15 : Page No - 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "ni= 1.5*10**16 # in /m**3\n", + "miu_n= 0.13 # in m**3/vs\n", + "miu_p= 0.05 # in m**3/vs\n", + "sigma= q*ni*(miu_n+miu_p) # in \u03a9/m\n", + "print \"The conductivity = %0.3e \u03a9/m\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity = 4.320e-04 \u03a9/m\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.16 : Page No - 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "n=4*10**22 # in /m**3\n", + "ni= 2.4*10**19 # in /m**3\n", + "miu_n= 3500 # in cm**2/vs\n", + "miu_n= miu_n*10**-4 # in m**2/vs\n", + "# Formula n*p= ni**2\n", + "p= ni**2/n # in m**-3\n", + "print \"Hole concentration = %0.2e m**-3\" %p\n", + "sigma=q*n*miu_n # in (\u03a9-m)**-1\n", + "print \"The conductivity of the extrinsic semiconductor = %0.f (\u03a9m)**-1\" %sigma\n", + "\n", + "# Note : There is miss print in the printed value of p and also calculation error in evaluating the value of p . \n", + "# So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hole concentration = 1.44e+16 m**-3\n", + "The conductivity of the extrinsic semiconductor = 2240 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.17 : Page No - 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni= 1.8*10**16 # in /m**3\n", + "q= 1.6*10**-19 # in C\n", + "em=0.14 # electron mobility in m**2/v-sec\n", + "hm=0.05 # hole mobility in m**2/v-sec\n", + "resistivity= 1.2 # in \u03a9m\n", + "n= 1/(q*em*resistivity) # in /m**3\n", + "print \"The electron concenration = %0.2e /m**3\" %n\n", + "p= ni**2/n # in /m**3\n", + "print \"The hole concentration = %0.1e /m**3\" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron concenration = 3.72e+19 /m**3\n", + "The hole concentration = 8.7e+12 /m**3\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.18 : Page No - 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu= 35.2*10**-4 # in m**2/vs\n", + "n=7.87*10**28 \n", + "e= 1.6*10**-19 # in C\n", + "sigma= n*e*miu # in s/m\n", + "print \"Conductivity = %0.3e s/m\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity = 4.432e+07 s/m\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.19 : Page No - 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni= 2.25*10**13 # in /cm**3\n", + "e= 1.6*10**-19 # in C\n", + "miu_n= 3800 # in cm**2/vs\n", + "miu_p= 1800 # in cm**2/vs\n", + "no=ni \n", + "sigma= no*e*(miu_n+miu_p) # in s/cm\n", + "print \"The intrinsic conductivity = %0.4f s/cm\" %sigma\n", + "\n", + "# Note: Answer in the book is wrong due to calculation error to evaluating the value of sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intrinsic conductivity = 0.0202 s/cm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.20 : Page No - 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e= 1.6*10**-19 # in C\n", + "I=100 # in A\n", + "n_o= 8.5*10**28 # in m**-3\n", + "A=10**-5 # in m**2\n", + "# Formula I= n_o*A*e*Vd\n", + "Vd= I/(n_o*e*A) # in ms**-1\n", + "print \"The drift velocity of free electron = %0.3e ms**-1\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The drift velocity of free electron = 7.353e-04 ms**-1\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.21 : Page No - 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 0.13 # in m**2/v-sec\n", + "lip= 0.05 # in m**2/v-sec\n", + "n=5*10**28/10**9 # in /m**3\n", + "q= 1.6*10**-19 # in C\n", + "sigma= q*n*miu_n # in (\u03a9m)**-1\n", + "print \"The conductivity of silicon material = %0.2f (\u03a9m)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of silicon material = 1.04 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 1.22 : Page No - 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_p= 0.05 # in m**2/v-sec\n", + "rho=5*10**28/10**8 # in /m**3\n", + "q= 1.6*10**-19 # in C\n", + "sigma= q*rho*miu_p # in (\u03a9m)**-1\n", + "print \"The conductivity of silicon material = %0.f (\u03a9m)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conductivity of silicon material = 4 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb new file mode 100644 index 00000000..bc23d089 --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_02.ipynb @@ -0,0 +1,1586 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9b0730144e4b94ec5125f2f9d4bd3c8bb8340e3500769f49d5e5a26bb6587910" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 2 : Physics Of Semiconductor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.1 : Page No - 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu= 0.3 # in m**2/vs\n", + "V= 50 # in mV\n", + "V=V*10**-3 # in V\n", + "d=0.4 # in mm\n", + "d=d*10**-3 # in m\n", + "# Part (a)\n", + "# miu= vd/E and vd= miu*E, so\n", + "vd= miu*V/d # in m/s\n", + "print \"(a) : Drift velocity = %0.1f m/s\" %vd\n", + "\n", + "# Part (b)\n", + "T= d/vd # in sec\n", + "print \"(b) : Time required for an electron to move = %0.2f \u00b5s\" %(T*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : Drift velocity = 37.5 m/s\n", + "(b) : Time required for an electron to move = 10.67 \u00b5s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.2 : Page No - 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 0.36 # in m**2/vs\n", + "miu_p= 0.17 # in m**2/vs\n", + "ni= 2.9*10**19 # in /m**3\n", + "q=1.6*10**-19 # in C\n", + "sigma_i= q*ni*(miu_n+miu_p) # in (\u03a9m)**-1\n", + "print \"Intrinsic conductivity of Ge = %0.2f (\u03a9m)**-1\" %sigma_i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intrinsic conductivity of Ge = 2.46 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.3 : Page No - 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "rho= 0.60 # in \u03a9m\n", + "q=1.6*10**-19 # in C\n", + "miu_n= 0.38 # in m**2/vs\n", + "miu_p= 0.18 # in m**2/vs\n", + "sigma= 1/rho # in (\u03a9m)**-1\n", + "ni= sigma/(q*(miu_n+miu_p)) # in /m**3\n", + "print \" The intrinsic carrier concentration = %0.3e per meter cube\" %ni" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The intrinsic carrier concentration = 1.860e+19 per meter cube\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.4 : Page No - 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 10**21 # in /m**3\n", + "N_A= 2*10**20 # in /m**3\n", + "miu_n= 0.15 # in m**2/vs\n", + "N_DeshD= N_D-N_A # in /m**3\n", + "n=N_DeshD # in /m**3\n", + "q=1.6*10**-19 # in C\n", + "sigma= q*n*miu_n # in (\u03a9m)**-1\n", + "print \" Conductivity of silicon = %0.1f (\u03a9m)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity of silicon = 19.2 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.5 : Page No - 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=6.023*10**23*7.4/63.54 \n", + "miu= 32.6 # in cm**2/Vs\n", + "q=1.6*10**-19 # in C\n", + "sigma= n*q*miu # in (\u03a9cm)**-1\n", + "print \"Conductivity of copper = %0.2e (\u03a9cm)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of copper = 3.66e+05 (\u03a9cm)**-1\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.6 : Page No - 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# For silicon\n", + "q=1.6*10**-19 # in C\n", + "ni= 2.5*10**12 # in /cm**3\n", + "miu_n= 1700 # in cm**2/Vs\n", + "miu_p= 600 # in cm**2/Vs\n", + "sigma= 0.2 # in (\u03a9m)**-1\n", + "# Formula sigma= q*n*miu_n\n", + "n= sigma/(q*miu_n) # in /cm**3\n", + "p= ni**2/n # in /cm**3\n", + "print \"For silicon : \" \n", + "print \" Concentration of electron = %0.2e /cm**3\" %n\n", + "print \" Concentration of holes = %0.1e /cm**3\" %p\n", + "# For germanium\n", + "ni= 3.4*10**15 # in /cm**3\n", + "miu_n= 3600 # in cm**2/Vs\n", + "miu_p= 1600 # in cm**2/Vs\n", + "sigma= 150 # in (\u03a9m)**-1\n", + "p= sigma/(q*miu_p) # in /cm**3\n", + "n= ni**2/p # in /cm**3\n", + "print \"For germanium :\" \n", + "print \" Concentration of electron = %0.2e /cm**3\" %n\n", + "print \" Concentration of holes = %0.2e /cm**3\" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For silicon : \n", + " Concentration of electron = 7.35e+14 /cm**3\n", + " Concentration of holes = 8.5e+09 /cm**3\n", + "For germanium :\n", + " Concentration of electron = 1.97e+13 /cm**3\n", + " Concentration of holes = 5.86e+17 /cm**3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.7 : Page No - 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 3900 # in cm**2/Vs\n", + "miu_p= 1900 # in cm**2/Vs\n", + "ni= 2.5*10**10 # in /cm**3\n", + "Nge= 4.41*10**22 # in /cm**3\n", + "q=1.6*10**-19 # in C\n", + "N_D= Nge/10**8 # in /cm**3\n", + "n=N_D # approx\n", + "p= ni**2/N_D # in /cm**2\n", + "sigma= q*n*miu_n # in (\u03a9cm)**-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \" Resistivity of the doped germanium = %0.2f \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Resistivity of the doped germanium = 3.63 \u03a9cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.8 : Page No - 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Nsi = 4.9*10**22 # in /cm**3\n", + "ni= 2.5*10**12 # in /cm**3\n", + "q=1.6*10**-19 # in C\n", + "miu_n= 1600 # in cm**2/Vs\n", + "miu_p= 400 # in cm**2/Vs\n", + "N_D= Nsi/(100*10**6) \n", + "sigma= q*ni*(miu_n+miu_p) # in (\u03a9cm)**-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \" Resistivity of silicon = %0.f \u03a9cm\" %rho\n", + "n=N_D # approx\n", + "p= ni**2/n # in /cm**3\n", + "sigma= q*n*miu_n # in (\u03a9cm)-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \" Resistivity of doped silicon = %0.2f \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Resistivity of silicon = 1250 \u03a9cm\n", + " Resistivity of doped silicon = 7.97 \u03a9cm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.9 : Page No - 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 5*10**28/(20*10**6) # in /m**3\n", + "# For the Fermi level\n", + "# E_F= E_C if N_C= N_D,\n", + "# N_D= 4.82*10**21 * T**(3/2) /m**3\n", + "T= (N_D/( 4.82*10**21 ))**(2/3) # in K\n", + "print \" Temperature = %0.3f K\" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Temperature = 0.646 K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.10 : Page No - 59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "ni= 1.8*10**15 # in /m**3\n", + "rho= 2*10**5 # in \u03a9m\n", + "q=1.6*10**-19 # in C\n", + "dopingConcentration= 10**25 # in /m**3\n", + "n=dopingConcentration \n", + "MCC= ni**2/dopingConcentration # Minority carrier concentration per cube meter\n", + "miu_n= 1/(2*rho*q*ni) # in m**3/Vs\n", + "print \"(a) : The value of \u00b5n = %0.1e m**3/Vs\" %miu_n\n", + "\n", + "# Part (b)\n", + "sigma= q*n*miu_n #in (\u03a9m)**-1\n", + "rho= 1/sigma # in \u03a9m\n", + "print \"(b) : Resistivity = %0.2e \u03a9m\" %rho\n", + "\n", + "# Part(c)\n", + "kT= 26*10**-3 #in V\n", + "no= n # in /m**3\n", + "Shift_inFermiLevel= kT*log(no/ni) # in eV\n", + "print \"(c) : Shift in Fermi level due to doping = %0.3f eV\" %Shift_inFermiLevel \n", + "print \" Hence, E_F lies \",round(Shift_inFermiLevel,3),\" eV above Fermi level Ei\" \n", + "\n", + "# Part (d)\n", + "MCC= ni**2/dopingConcentration # Minority carrier concentration per cube meter\n", + "print \"(d) : Minority carrier concentration = %0.2e per cube meter\" %MCC" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The value of \u00b5n = 8.7e-03 m**3/Vs\n", + "(b) : Resistivity = 7.20e-05 \u03a9m\n", + "(c) : Shift in Fermi level due to doping = 0.583 eV\n", + " Hence, E_F lies 0.583 eV above Fermi level Ei\n", + "(d) : Minority carrier concentration = 3.24e+05 per cube meter\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.11 : Page No - 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 1700 #in cm**2/Vs\n", + "miu_p= 560 #in cm**2/Vs\n", + "ni= 2.5*10**10 # in /cm**3\n", + "q=1.6*10**-19 # in C\n", + "sigma= q*ni*(miu_n+miu_p) #in (\u03a9cm)**-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \"Conductivity of intrinsic sample = %0.2e (\u03a9cm)**-1\" %sigma\n", + "print \"Resistivity of intrinsic sample = %0.3e \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conductivity of intrinsic sample = 9.04e-06 (\u03a9cm)**-1\n", + "Resistivity of intrinsic sample = 1.106e+05 \u03a9cm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.12 : Page No - 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni= 1.45*10**10 # in /cm**3\n", + "q=1.6*10**-19 # in C\n", + "miu_n= 1300 # in cm**2/Vs\n", + "density= 5*10**26 # density of silicon atom in /cm**3\n", + "N_D= density/10**12 \n", + "n=N_D \n", + "# n*p= ni**2\n", + "p= ni**2/n #in /cm**3\n", + "sigma= q*n*miu_n # in (\u03a9cm)**-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \" Resistivity of silicon = %0.2f \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Resistivity of silicon = 9.62 \u03a9cm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.13 : Page No - 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve, N\n", + "p= symbols('p')\n", + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "rho=75 #in \u03a9cm\n", + "N_D= 10**13 # in /cm**3\n", + "N_A= 5*10**12 #in /cm**3\n", + "E=3 # in V/cm\n", + "ni= 2.7*10**12 # in /cm**3\n", + "sigma= 1/rho # in (\u03a9cm)**-1\n", + "# miu_p/miu_n= 1/3 or miu_n=3*miu_p\n", + "# sigma= q*ni*(miu_n+miu_p) = q*ni*(3*miu_p+miu_p) = q*ni*(4*miu_p)\n", + "miu_p= sigma/(q*ni*4) \n", + "miu_n= 3*miu_p \n", + "# n+N_A= p+N_D or n= p+N_D-N_A\n", + "# n*p= ni**2 or (p+N_D-N_A)*p= ni**2\n", + "# p**2 + (N_D-N_A)*p-ni**2 =0\n", + "expr= p**2 + (N_D-N_A)*p-ni**2\n", + "root = solve(expr, p)\n", + "p= root[1] #discarding -ve value\n", + "n=p+N_D-N_A \n", + "I= q*(n*miu_n+p*miu_p)*E# in A/m**2\n", + "print \"The total conduction current = %0.4f A/m**2\" %I\n", + "# Note: There is some difference between book answer and coding. The reson behind this is that\n", + "# The value of P is evaluated 1.8*10**12 while accurate value is 1.179674*10**12" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total conduction current = 0.0730 A/m**2\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.14 : Page No - 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 10**20 # in /cm**3\n", + "ni= 2.5*10**12 # in /cm**3\n", + "kT=26 # in meV\n", + "kT=kT*10**-3 # in eV\n", + "n= N_D # as N_D>>ni\n", + "p= ni**2/n #in /cm**3\n", + "print \"(a) : The minority carrier concentration = %0.1e per cm**3\" %p\n", + "\n", + "# Part (b)\n", + "LocationOfFermiLevel= kT*log(N_D/ni) # in eV\n", + "print \"(b) : The Fermi Level will be \",round(LocationOfFermiLevel,3),\" eV above Fermi level\" \n", + "\n", + "#Note: The value of Minority carrier concentration of part(a) is calculated wrong because \n", + "# the value of (2.5*10**12)**2/(10**20) will be 62500 not 2.5*10**4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The minority carrier concentration = 6.2e+04 per cm**3\n", + "(b) : The Fermi Level will be 0.455 eV above Fermi level\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.15 : Page No - 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 1300 # in cm**2/Vs\n", + "q=1.6*10**-19 # in C\n", + "ni= 4.3*10**-6 # in /cm**3\n", + "V= 1 # in volt\n", + "L=8 # in cm\n", + "A=0.8*0.8 # in cm**2\n", + "I=4*10**-3 # in A\n", + "# R= rho*L/A = V/I\n", + "R= V/I # in \u03a9\n", + "sigma= L/(R*A) # in (\u03a9cm)**-1\n", + "# sigma= q*n*miu_n\n", + "n= sigma/(q*miu_n) \n", + "N_D= n \n", + "print \"(a) : The value of N_D = %0.3e\" %N_D \n", + "# Part (b)\n", + "d=L \n", + "E= V/d \n", + "vd=miu_n*E # in cm/s\n", + "print \"(b) : Drift velocity = %0.1f cm/s\" %vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The value of N_D = 2.404e+14\n", + "(b) : Drift velocity = 162.5 cm/s\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.16 : Page No - 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "E= 1 #in v/m\n", + "miu= 32*10**-4 # in m**2/Vs\n", + "m= 9.1*10**-28 # in gram\n", + "m=m*10**-3 # in kg\n", + "q=1.6*10**-19 # in C\n", + "toh_r= 2*miu*m/q # in sec\n", + "Vd= miu*E # in m/sec\n", + "print \"The relaxation time = %0.2e sec\" %toh_r\n", + "print \"Drift velocity = %0.2f cm/sec\" %(Vd*10**2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relaxation time = 3.64e-14 sec\n", + "Drift velocity = 0.32 cm/sec\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.17 : Page No - 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 0.145 # in m**2/Vs\n", + "miu_p= 0.05 # in m**2/Vs\n", + "q=1.6*10**-19 # in C\n", + "n=10**15 # per m**3\n", + "p=10**2 # per m**3\n", + "rho= 1/(q*(n*miu_n+p*miu_p)) # in \u03a9m\n", + "print \"The resistivity = %0.2e \u03a9m\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistivity = 4.31e+04 \u03a9m\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.18 : Page No - 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 0.13 # in m**2/Vs\n", + "miu_p= 0.05 # in m**2/Vs\n", + "q=1.6*10**-19 # in C\n", + "ni=1.5*10**16 # per m**3\n", + "sigma_intrinsic= q*ni*(miu_n+miu_p) # in (\u03a9m)**-1\n", + "print \"(a) : The conductivity of silicon in Intrinsic condition = %0.2e (\u03a9m)**-1\" %sigma_intrinsic\n", + "\n", + "# Part (b)\n", + "n= 5*10**28/10**9 \n", + "sigma= q*n*miu_n # in (\u03a9m)**-1\n", + "print \"(b) : The conductivity with donar impurity = %0.2f (\u03a9m)**-1\" %sigma\n", + "\n", + "# Part (c)\n", + "p= 5*10**28/10**8 \n", + "sigma= q*p*miu_p # in (\u03a9m)**-1\n", + "print \"(c) : The conductivity with acceptor impurity = %0.f (\u03a9m)**-1\" %sigma\n", + "\n", + "# Part (d)\n", + "p_desh= p-n # in /m**3\n", + "sigma= q*p_desh*miu_p # in (\u03a9m)**-1\n", + "print \"(d) : The conductivity with donar and acceptor impurity = %0.1f (\u03a9m)**-1\" %sigma\n", + "\n", + "# Note : Answer in the book of part (a) may be miss printed or wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The conductivity of silicon in Intrinsic condition = 4.32e-04 (\u03a9m)**-1\n", + "(b) : The conductivity with donar impurity = 1.04 (\u03a9m)**-1\n", + "(c) : The conductivity with acceptor impurity = 4 (\u03a9m)**-1\n", + "(d) : The conductivity with donar and acceptor impurity = 3.6 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.19 : Page No - 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "rho= 1.2 # in \u03a9m\n", + "miu_n= 0.14 # in m**2/Vs\n", + "q=1.6*10**-19 # in C\n", + "ni= 1.8*10**16 # per m**3\n", + "# sigma = 1/rho = q*n*miu_n\n", + "n= 1/(rho*q*miu_n) # per m**3\n", + "p= ni**2/n # per m**3\n", + "print \" The value of n = %0.2e per m**3\" %n\n", + "print \" The value of p = %0.1e per m**3\" %p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of n = 3.72e+19 per m**3\n", + " The value of p = 8.7e+12 per m**3\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.20 : Page No - 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 5*10**22/10**8 \n", + "q=1.6*10**-19 # in C\n", + "ni= 1.45*10**10 # per m**3\n", + "miu_n= 1300 # in m**2/Vs\n", + "# n*p= ni**2 or N_D*p = ni**2\n", + "p= ni**2/N_D # in /cm**3\n", + "sigma= q*miu_n*N_D # in (\u03a9cm)**-1\n", + "rho= 1/sigma #in \u03a9cm\n", + "print \" Resistivity = %0.2f \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Resistivity = 9.62 \u03a9cm\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.21 : Page No - 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "n=8.4*10**28 \n", + "rho= 6.51 # in \u03a9/1000ft\n", + "rho= rho/(3.05*10**4) # in \u03a9/cm\n", + "sigma= 1/rho # in mho/cm\n", + "sigma=sigma*10**2 # in mho/m\n", + "# sigma= n*q*miu\n", + "miu= sigma/(n*q) # in m**2/v-s\n", + "print \" Conductivity = %0.2e mho/m\" %sigma\n", + "print \" Mobility = %0.2e m**2/v-s\" %miu" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity = 4.69e+05 mho/m\n", + " Mobility = 3.49e-05 m**2/v-s\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.22 : Page No - 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "miu_n= 1350 # in cm**2/v-sec\n", + "miu_p= 480 # in cm**2/v-sec\n", + "ni=1.52*10**10 # in /cm**3\n", + "q=1.6*10**-19 # in C\n", + "sigma= q*ni*(miu_n+miu_p) # in (\u03a9cm)**-1\n", + "rho= 1/sigma # in \u03a9cm\n", + "print \" Conductivity = %0.3e (\u03a9cm)**-1\" %sigma\n", + "print \" Resistivity = %0.2e \u03a9cm\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity = 4.451e-06 (\u03a9cm)**-1\n", + " Resistivity = 2.25e+05 \u03a9cm\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.23 : Page No - 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "ni=2.5*10**19 # in /m**3\n", + "miu_n= 0.38 # in m**2/v-sec\n", + "miu_p= 0.18 # in m**2/v-sec\n", + "q=1.6*10**-19 # in C\n", + "sigma= q*ni*(miu_n+miu_p) # in (\u03a9m)**-1\n", + "print \" Conductivity = %0.2f (\u03a9m)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity = 2.24 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.24 : Page No - 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "rho= 0.5 # in \n", + "miu_n= 0.39 # in m**2/v-sec\n", + "miu_p= 0.19 # in m**2/v-sec\n", + "q=1.6*10**-19 # in C\n", + "sigma= 1/rho # in (\u03a9m)**-1\n", + "# Formula sigma= q*ni*(miu_n+miu_p)\n", + "ni= sigma/(q*(miu_n+miu_p)) # in /m**3\n", + "print \" The intrinsic carrier concentration of germanium = %0.3e /m**3\" %ni" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The intrinsic carrier concentration of germanium = 2.155e+19 /m**3\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.25 : Page No - 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "miu_n= 0.18 # in m**2/v-s\n", + "N_D= 10**21 # per m**3\n", + "N_A= 5*10**20 # per m**3\n", + "N_deshD= N_D-N_A # per m**3\n", + "n=N_deshD # per m**3\n", + "sigma= q*n*miu_n # in (\u03a9m)**-1\n", + "print \" Conductivity of the silicon sample = %0.1f (\u03a9m)**-1\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity of the silicon sample = 14.4 (\u03a9m)**-1\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.26 : Page No - 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "q=1.6*10**-19 # in C\n", + "miu_n= 0.36 # in m**2/v-s\n", + "miu_p= 0.17 # in m**2/v-s\n", + "ni= 2.5*10**19 # per m**3\n", + "sigma= q*ni*(miu_n+miu_p) # in s/m\n", + "rho= 1/sigma # in \u03a9m\n", + "print \" Conductivity of Ge = %0.2f s/m\" %sigma\n", + "print \" Resistivity = %0.2f \u03a9m\" %rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity of Ge = 2.12 s/m\n", + " Resistivity = 0.47 \u03a9m\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.27 : Page No - 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e=1.6*10**-19 # in C\n", + "miu_n= 0.13 # in m**2/v-s\n", + "miu_p= 0.05 # in m**2/v-s\n", + "N_D= 5*10**28/(2*10**8) # per m**3\n", + "n=N_D # per m**3\n", + "ni= 1.5*10**16 # per m**3\n", + "p= ni**2/N_D # per m**3\n", + "sigma= e*(n*miu_n+p*miu_p) # in s/m\n", + "print \" Conductivity of the intrinsic semiconductor = %0.1f s/m is \" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Conductivity of the intrinsic semiconductor = 5.2 s/m is \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.28 : Page No - 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "Eg= 0.72 # in eV\n", + "Ef= Eg/2 #in eV\n", + "K= 8.61*10**-5 # in eV/K\n", + "T=300 #in K\n", + "nc= 1 \n", + "n= 1+exp(((Eg-Ef)/(K*T)) )\n", + "ncBYn= nc/n \n", + "print \" The fraction of the total number or electrons = %0.2e\" %ncBYn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The fraction of the total number or electrons = 8.85e-07\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.29 : Page No - 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_D= 1.4*10**24 # per m**3\n", + "ni= 1.4*10**18 # per m**3\n", + "n=N_D #per m**3\n", + "p=ni**2/n # per m**3\n", + "R= n/p # ratio of electron to holes concentration\n", + "print \" Ratio of electron to holes concentraiton = %0.1e\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Ratio of electron to holes concentraiton = 1.0e+12\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.30 : Page No - 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "#Given data\n", + "e=1.6*10**-19 # in C\n", + "miu_e= 0.0032 # in m**2/v-s\n", + "sigma= 5.8*10**7 # in s/m\n", + "E= 20*10**-3 # in V/m\n", + "d=0.002 # in m\n", + "Area= pi*d**2/4 # in m**2\n", + "\n", + "# Part (a)\n", + "n= sigma/(e*miu_e) # per m**3\n", + "print \"(a) : The charge density = %0.3e per meter cube\" %n\n", + "\n", + "# Part (b)\n", + "J= sigma*E # in A/m**2\n", + "print \"(b) : Current density = %0.2e A/m**2\" %J\n", + "\n", + "# Part (c)\n", + "I= J*Area # in A\n", + "print \"(c) : Current flowing in the wire = %0.3f ampere\" %I\n", + "\n", + "# Part (d)\n", + "v=miu_e*E # in m/sec\n", + "print \"(d) : Electron drift velocity = %0.1e m/sec\" %v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The charge density = 1.133e+29 per meter cube\n", + "(b) : Current density = 1.16e+06 A/m**2\n", + "(c) : Current flowing in the wire = 3.644 ampere\n", + "(d) : Electron drift velocity = 6.4e-05 m/sec\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.31 : Page No - 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "rho= 0.5 # in \u03a9-m\n", + "miu_c= 0.4 # in m**2/v-sec\n", + "J=100 #in A/m**2\n", + "distance=10 # \u00b5m\n", + "distance=distance*10**-6 #in sec\n", + "# V= miu_c*E = miu_c*J/sigma = miu_c*J*rho \n", + "V= miu_c*J*rho # in m/sec\n", + "print \" Drift velocity = %0.f m/sec\" %V\n", + "T= distance/V # in second\n", + "print \" The time taken by the electron to travel 10 micro meter in the crystal = %0.1e second\" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Drift velocity = 20 m/sec\n", + " The time taken by the electron to travel 10 micro meter in the crystal = 5.0e-07 second\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.32 : Page No - 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e=1.6*10**-19 # in C\n", + "miu_e= 3800 # in cm v-s\n", + "miu_p= 1800 # in cm v-s\n", + "ni= 2.5*10**13 # per cm**3\n", + "N_D= 4.4*10**22*10**-7 # per cm**3\n", + "n=N_D # per cm**3\n", + "p= ni**2/N_D # holes/cm**3\n", + "sigma_i= ni*e*(miu_e+miu_p) # in (\u03a9cm)**-1\n", + "sigma_n= e*N_D*miu_e # in (\u03a9cm)**-1\n", + "print \" Intrinsic conductivity = %0.4f (\u03a9cm)**-1\" %sigma_i\n", + "print \" Concentration of electrons = %0.1e per cm**3\" %n\n", + "print \" Concentration of holes = %0.2e per cm**3\" %p\n", + "print \" The conductivity in n-type Ge semiconductor = %0.2f (\u03a9cm)**-1\" %sigma_n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Intrinsic conductivity = 0.0224 (\u03a9cm)**-1\n", + " Concentration of electrons = 4.4e+15 per cm**3\n", + " Concentration of holes = 1.42e+11 per cm**3\n", + " The conductivity in n-type Ge semiconductor = 2.68 (\u03a9cm)**-1\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.33 : Page No - 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e=1.6*10**-19 # in C\n", + "a= 0.004*0.0015 # in m**2\n", + "ni= 2.5*10**19 # per m**3\n", + "miu_e= 0.38 # in m**2/ v-s\n", + "miu_p= 0.18 # in m**2/v-s\n", + "V=10 # in V\n", + "i= 25 # in mm\n", + "i=i*10**-3 # in m\n", + "E= V/i # in V/m\n", + "# Part (a)\n", + "ve= miu_e*E # in m/sec\n", + "print \"(a) : Electric drift velocity = %0.f m/sec\" %ve\n", + "vp= miu_p*E # in m/sec\n", + "print \" Hole drift velocity = %0.f m/sec\" %vp\n", + "\n", + "# Part (b)\n", + "sigma_i= ni*e*(miu_e+miu_p) # in (\u03a9cm)**-1\n", + "print \"(b) : Intrinsic carrier conductivity of Ge = %0.2f (\u03a9cm)**-1\" %sigma_i\n", + "\n", + "# Part (c)\n", + "I= sigma_i*E*a # in A\n", + "I=I*10**3 # in mA\n", + "print \"(c) : Total current = %0.3f mA\" %I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : Electric drift velocity = 152 m/sec\n", + " Hole drift velocity = 72 m/sec\n", + "(b) : Intrinsic carrier conductivity of Ge = 2.24 (\u03a9cm)**-1\n", + "(c) : Total current = 5.376 mA\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.34 : Page No - 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "miu_e= 0.14 # in m**2/ v-s\n", + "miu_p= 0.05 # in m**2/v-s\n", + "e=1.6*10**-19 # in C\n", + "N=3*10**25 # per m**3\n", + "Eg= 1.1 # in eV\n", + "Eg= Eg*1.602*10**-19 # in J\n", + "k= 1.38*10**-23 # in J/K\n", + "T=300 # in K\n", + "ni= N*exp((-Eg/(2*k*T))) # in /m**3\n", + "sigma= ni*e*(miu_e+miu_p) # in s/m\n", + "print \" The intrinsic carrier concentration = %0.3e /m**3\" %ni\n", + "print \" Conductivity of Si = %0.2e s/m\" %sigma" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The intrinsic carrier concentration = 1.715e+16 /m**3\n", + " Conductivity of Si = 5.21e-04 s/m\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.35 : Page No - 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_A= 4.4*10**22/10**8 # in /m**3\n", + "N_D= 10**3*N_A # in /m**3\n", + "ni= 2.5*10**13 # /cm**3\n", + "Vt= 26 # in mV\n", + "Vt= Vt*10**-3 # in V\n", + "Vj= Vt*log(N_A*N_D/ni**2) # in V\n", + "print \" The junction potential = %0.4f volts\" %Vj\n", + "\n", + "# Note : There is miss print in the book answer" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The junction potential = 0.3287 volts\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.36 : Page No - 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_o= 0.3 # in \u00b5A\n", + "I_o= I_o*10**-6 # in A\n", + "V_F= 0.15 # in V\n", + "I= I_o*exp(40*V_F) # in A\n", + "print \" Current flowing in the diode = %0.2f \u00b5A\" %(I*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Current flowing in the diode = 121.03 \u00b5A\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.37 : Page No - 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Io= 1 # in nA\n", + "Io= Io*10**-9 # in A\n", + "T= 27+273 #in K\n", + "V_T= T/11600 # in V\n", + "V_F= 0.3 # in V\n", + "n=1 \n", + "I_F= Io*(exp(V_F/(n*V_T))-1) # in A\n", + "print \" The forward current of diode = %0.3e ampere\" %I_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The forward current of diode = 1.091e-04 ampere\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.38 : Page No - 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 2 # in mA\n", + "I_F= I_F*10**-3 # in A\n", + "V_T= 25 # in mV\n", + "V_T=V_T*10**-3 # in V\n", + "n=1 \n", + "r_F= n*V_T/I_F # in \u03a9\n", + "print \" The dynamic resistance of a Ge p-n junction diode = %0.1f \u03a9\" %r_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance of a Ge p-n junction diode = 12.5 \u03a9\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.39 : Page No - 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T=300 # in K\n", + "n=1 \n", + "V_T= 26 # in mV\n", + "V_T=V_T*10**-3 # in V\n", + "V_F= 200 # in mV\n", + "V_F=V_F*10**-3 # in V\n", + "Io= 1 # in \u00b5A\n", + "Io= Io*10**-6 # in A\n", + "r_F= n*V_T/(Io*exp(V_F/(n*V_T))) # in \u03a9\n", + "print \" The ac resistance of a semiconductor diode = %0.2f \u03a9\" %r_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The ac resistance of a semiconductor diode = 11.86 \u03a9\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 2.40 : Page No - 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=2 \n", + "V_T= 26 # in mV\n", + "V_T=V_T*10**-3 # in V\n", + "I= 1 # in mA\n", + "I= I*10**-3 # in A\n", + "r= n*V_T/I # in \u03a9\n", + "print \" The magnitude of r = %0.f \u03a9\" %r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The magnitude of r = 52 \u03a9\n" + ] + } + ], + "prompt_number": 70 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb new file mode 100644 index 00000000..067292ed --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_03.ipynb @@ -0,0 +1,694 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38fdf1a79a5afe4aa8258051a4233e0da43992d64154d50af084fa49764f5132" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 3 : Junction Diode and Junction Capacitance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.1 : Page No - 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Co= 20 # in pF\n", + "Vr= 5 # in V\n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_T= Co/(1+(Vr/V_T)) # in pF\n", + "print \" The transition capacitance of diode = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The transition capacitance of diode = 0.10 pF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.2 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "toh= 10**-6 # in sec\n", + "I=10 # in mA\n", + "I=I*10**-3 # in A\n", + "n=1 \n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_D= toh*I/(n*V_T) # in F\n", + "print \" The diffusion capacitance in p-n junction diode = %0.f nF\" %(C_D*10**9)\n", + "\n", + "# Note: There are two mistake in the book. First one is this that they put the wrong value of I to evaluating\n", + "# the value of C_D because the value of I is given 10mA (i.e. 10*10**-3= 10**-2 amp) but they put 10**-3 at place \n", + "# of 10**-2 and second one is calculation error. So the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diffusion capacitance in p-n junction diode = 385 nF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.3 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "v= 0.3 # forward bias voltage in volt\n", + "I= 10 # leakage current in micro amp\n", + "I=I*10**-6 # in amp\n", + "id= I*(exp(v/V_T)) # in amp\n", + "print \" The diode current = %0.2f amp\" %id" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diode current = 1.09 amp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.4 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "Vd_1= 0.3 # in V\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "# when Id_1= 1 mA\n", + "Id_1= 1 # in mA\n", + "Id_1=Id_1*10**-3 # in A\n", + "# Formula Id_1= Io*[%e**(Vd/(n*V_T))-1]= Io*[e**(Vd/(n*V_T))]\n", + "# Id_1= Io*[e**(Vd_1/(n*V_T))] (i)\n", + "\n", + "# when Id_2= 200 mA\n", + "Id_2= 200 # in mA\n", + "Id_2=Id_2*10**-3 # in A\n", + "Vd_2= 0.45 # in V\n", + "# Id_2= Io*[e**(Vd_2/(n*V_T))] (ii)\n", + "# Dividing (ii) by (i), we have\n", + "n= (Vd_2-Vd_1)/(log(Id_2/Id_1)*V_T) \n", + "print \" The value of the constant for the diode = %0.2f \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of the constant for the diode = 1.13 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.5 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "n=1 # assuming value\n", + "Jd=10**5 # in A/m**2\n", + "Jo=250 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "#Formula Id= Io*(%e**(Vd/V_T)-1) and after dividing both the sides by area of the junction, we have\n", + "# Jd= Jo*(%e**(Vd/V_T)) # approx by neglecting 1 \n", + "Vd= V_T*log(Jd/Jo) # in volt\n", + "print \" Voltage to be applied across a p-n junction = %0.2f volt\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across a p-n junction = 0.33 volt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.6 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "J=10**4 # in A/m**2\n", + "Jo=200 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "e=1.6*10**-19 # electrone charge\n", + "k= 1.38*10**-23 \n", + "n=1 # assuming value\n", + "#Formula I= Io*(%e**(e*V/(n*k*T))-1) and after dividing both the sides by area of the junction, we have\n", + "# J= Jo*(%e**(e*V/(n*k*T))) # approx by neglecting 1 \n", + "V= n*k*log(J/Jo)/e \n", + "print \" Voltage to be applied across the junction = %0.2e volts\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across the junction = 9.33e-04 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.7 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=2 \n", + "V_T=26 # in mV\n", + "Io= 30 # in mA\n", + "# (i) when\n", + "I_D= 0.1 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (i) When I_D is 0.1 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "# (ii) when\n", + "I_D= 10 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (ii) When I_D is 10 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "\n", + "# Note: There is calculation error in the book so answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) When I_D is 0.1 mA, The junction forward-bias voltage = -297 mV\n", + " (ii) When I_D is 10 mA, The junction forward-bias voltage = -57 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.8 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_by_Io= -0.9 \n", + "V_T=26 # in mV\n", + "V_T=V_T*10**-3 #in V\n", + "n=1 \n", + "# From Diode equation I= Io*[e**(e*V/(n*V_T))-1]\n", + "V= n*V_T*log(1+I_by_Io) # in volt\n", + "print \"The value of voltage = %0.1f mV \" %(V*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of voltage = -59.9 mV \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.9 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "nita= 2 \n", + "T1= 25 # in \u00b0C\n", + "T2= 150 # in \u00b0C\n", + "k= 8.62*10**-5 \n", + "V_T150= k*(T2+273) # in V\n", + "V_T25= k*(T1+273) # in V\n", + "V= 0.4 # in V\n", + "# Io150= Io25*2**(T2-T1) \n", + "Io150byIo25= 2**((T2-T1)/10) \n", + "I150byI25= Io150byIo25 *(exp(V/(nita*V_T150))-1)/(exp(V/(nita*V_T25))-1) \n", + "print \" The value of factor = %0.f\" %I150byI25\n", + "\n", + "# Note : There is some difference between coding and the answer of the book because in the book \n", + "# the values of ( Io150byIo25, V_T150, V_T25 ) \n", + "# are putted (respectively 5800, 0.0364, 0.026) whereas the accurate values of these are \n", + "# 5792.6188 , 0.0364626 and 0.0256876" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of factor = 578\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.10 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 100 # in mA\n", + "I_F=I_F*10**-3 # in A\n", + "V_F= 0.75 # in V\n", + "R_F= V_F/I_F # in ohm\n", + "print \" Forward resistance = %0.1f ohm \" %R_F\n", + "# At\n", + "V_R= 50 # in V\n", + "I_R= 100 # in nA\n", + "I_R= I_R*10**-9 # in A\n", + "R_R= V_R/I_R # in ohm\n", + "print \" Reverse resistance = %0.f Mohm \" %(R_R*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Forward resistance = 7.5 ohm \n", + " Reverse resistance = 500 Mohm \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.11 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 70 # in mA\n", + "V_F= 26 # in mV\n", + "delta_I_F= 60 # in mA\n", + "delta_I_F=delta_I_F*10**-3 # in A\n", + "delta_V_F= 0.025 # in V\n", + "r_d= delta_V_F/delta_I_F # in ohm\n", + "print \" Dynamic resistance = %0.2f ohm\" %r_d\n", + "# and the stimated value of the dynamic resistance is\n", + "r_d= V_F/I_F # in ohm\n", + "print \" The estimated value of the Dynamic resistance = %0.2f ohm\" %r_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 0.42 ohm\n", + " The estimated value of the Dynamic resistance = 0.37 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.12 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "V_F= 0.52 # in V\n", + "V_R= -0.52 # in V\n", + "nita= 1 \n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "V_T=round(V_T*10**3) # in mV\n", + "\n", + "# (i)\n", + "r_F= nita*V_T*10**-3/(Io*exp(V_F/(nita*V_T*10**-3))) \n", + "print \"(i) : Dynamic resistance in the forward biased condition = %0.2e ohm\" %r_F\n", + "\n", + "# (ii)\n", + "r_r= nita*V_T*10**-3/(Io*exp(V_R/(nita*V_T*10**-3))) \n", + "print \"(ii) : Dynamic resistance in the reverse biased condition = %0.2e ohm\" %r_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Dynamic resistance in the forward biased condition = 5.36e-05 ohm\n", + "(ii) : Dynamic resistance in the reverse biased condition = 1.26e+13 ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.13 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_F= 0.2 # in V\n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "Id= Io*(exp(V_F/V_T)-1)\n", + "I_F=Id \n", + "r_dc= V_F/I_F # in ohm\n", + "print \" Dynamic resistance = %0.1f ohm\" %r_dc\n", + "r_ac= .026/I_F # in ohm\n", + "print \" Static resistance = %0.1f ohm\" %r_ac" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 87.6 ohm\n", + " Static resistance = 11.4 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.14 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Part (i)\n", + "I_D=2 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.5 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(i) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (ii)\n", + "I_D=20 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.8 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(ii) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (iii)\n", + "I_D=-1 # in micro amp\n", + "I_D=I_D*10**-6 # in amp\n", + "V_D= -10 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(iii) : DC resistance levels for the diode = %0.f Mohm\" %(R_DC*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : DC resistance levels for the diode = 250 ohm\n", + "(ii) : DC resistance levels for the diode = 40 ohm\n", + "(iii) : DC resistance levels for the diode = 10 Mohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.15 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T1= 25 # in \u00b0C\n", + "T2= 100 # in \u00b0C\n", + "deltaT= T2-T1 # in \u00b0C\n", + "deltaV_F= -1.8*10**-3 # in mV/\u00b0C\n", + "I_F= 26 # in mA\n", + "V_F1= 0.7 # in V (at T1)\n", + "V_F2= V_F1+(deltaT*deltaV_F) # in V (at T2)\n", + "# At 25\u00b0C\n", + "T= 25+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 25\u00b0C = %0.f \u03a9 \" %rd\n", + "# At 100\u00b0C\n", + "T= 100+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 100\u00b0C = %0.2f \u03a9 \" %rd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Junction dynamic resistance at 25\u00b0C = 1 \u03a9 \n", + " Junction dynamic resistance at 100\u00b0C = 1.25 \u03a9 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.16 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 2 # in mA\n", + "I=I*10**-3 # in A\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "nita= 1 \n", + "r_F= nita*V_T/I # in \u03a9\n", + "print \" The dynamic resistance of a diode = %0.1f \u03a9\" %r_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance of a diode = 12.5 \u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.17 : Page No - 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 30 # in \u00b5A\n", + "I=I*10**-6 # in A\n", + "T=125+273 # in K\n", + "r_F= T/(11600*I*exp(-0.32/T)*11600) # in \u03a9\n", + "print \" The dynamic resistance = %0.3f m\u03a9\" %(r_F*10**3)\n", + "\n", + "# Note: There are two error in this example in the book. \n", + "# First one is this that putted value of T in first term of calculation\n", + "# (i.e 3.98/11600) is wrong (correct value is 398 not 3.98).\n", + "# and second one error is this that calculaiton is also wrong for putted value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance = 98.672 m\u03a9\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb new file mode 100644 index 00000000..96b8604f --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_04.ipynb @@ -0,0 +1,1097 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b7f7c4ef1c921f59869e52c8d35d2ca9045be346fb4ed98e35eda7b3b4c8beef" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 4 : Optoelectronic Devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.1 : Page No - 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Ep= 0.0153*10**-17 #in J\n", + "lamda= 1300 # in nm\n", + "nita_ext= 0.1 \n", + "e = 1.6*10**-19 #in C\n", + "Eg= 1.42*e # in eV\n", + "S= nita_ext*Eg/e # in W/A (where S= deltaP/deltaI )\n", + "print \" Slope of efficiency = %0.4f W/A\" %S\n", + "\n", + "# Note: In the book, the evaluated value of Eg/e is wrong because the value of 1.42*e/e = 1.42 not equal to 0.956 , \n", + "# Hence the answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Slope of efficiency = 0.1420 W/A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.2 : Page No - 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e = 1.6*10**-19 #in C\n", + "Eg= 1.48*e # in J\n", + "R=1 # in \u03a9\n", + "i_p= 100 # in mA\n", + "i_p= i_p*10**-3 # in A\n", + "i_F= 10 # in mA\n", + "i_F= i_F*10**-3 # in A\n", + "Popt= 1.25 # in mW\n", + "Popt= Popt*10**-3 # in W\n", + "nitaP= Popt/((i_p**2*Eg/e)+i_F**2*R)*100 # in %\n", + "print \" Power efficiency = %0.1f %%\" %nitaP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power efficiency = 8.4 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.3 : Page No - 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "lamda= 670 # in nm\n", + "h_int= 1/100 \n", + "EpIn_eV= 1248/lamda # in eV\n", + "I=50 # in mA\n", + "P= h_int*EpIn_eV*I # in mW\n", + "print \" Power radiated by an LED = %0.2f mW\" %P\n", + "\n", + "# Note : There is a calculation error in evaluating the value of P so the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power radiated by an LED = 0.93 mW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.4 : Page No - 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I=40 # in mA\n", + "I=I*10**-3 # in A\n", + "lamda=1310*10**-9 # in m\n", + "h= 6.62*10**-34 # in Js\n", + "c= 3*10**8 # in m/s\n", + "e= 1.6*10**-19 # in C\n", + "toh_r= 30 # in ns\n", + "toh_nr= 100 # in ns\n", + "toh= toh_r*toh_nr/(toh_r+toh_nr) \n", + "nita_int= toh/toh_r \n", + "print \" The internal quantum efficiency = %0.2f\" %nita_int\n", + "Ep= h*c/lamda # in J\n", + "P= nita_int*Ep*I/e # in W\n", + "print \" The optical power generated internally to the LED = %0.2f mW\" %(P*10**3)\n", + " \n", + "# Note : There is a calculation error in evaluating the value of P so the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The internal quantum efficiency = 0.77\n", + " The optical power generated internally to the LED = 29.15 mW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.5 : Page No - 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Part (a)\n", + "R= 0.85 # in A/W\n", + "Pop= 1 # in mW\n", + "Ip= R*Pop # in mA\n", + "print \"Part (a) : The photocurrent = %0.2f mA\" %Ip\n", + "print \"Part (b) : If the incident light power is 2mW then it is not proportional to Pop\"\n", + "print \" so it can not be found the value of photocurrent\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a) : The photocurrent = 0.85 mA\n", + "Part (b) : If the incident light power is 2mW then it is not proportional to Pop\n", + " so it can not be found the value of photocurrent\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.6 : Page No - 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N1= 5.4*10**6 # Number of EHPs generated\n", + "N2= 6*10**6 # Number of incident photons\n", + "nita= N1/N2 \n", + "print \" The quantum efficiency at 1300 nm = %0.f %%\" %(nita*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quantum efficiency at 1300 nm = 90 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.7 : Page No - 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e= 1.6*10**-19 # in C\n", + "Eg= 0.75*e # in J\n", + "h= 6.62*10**-34 # in Js\n", + "c= 3*10**8 # in m/s\n", + "n=70/100 \n", + "# Formula Eg= h*c/lamda\n", + "lamda= h*c/Eg # in m\n", + "lamda=lamda*10**9 # in nm\n", + "R= n*lamda/1248 # in A/W\n", + "print \" Responsivity = %0.3f A/W\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Responsivity = 0.928 A/W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.8 : Page No - 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=50/100 \n", + "lamda= 900 # in nm\n", + "R= n*lamda/1248 # in A/W\n", + "print \" Responsivity = %0.2f A/W\" %R\n", + "\n", + "# Part (b)\n", + "Ip= 10**-6 # in A\n", + "Pop= Ip/R # in W\n", + "print \" The received optical power = %0.2e W\" %Pop\n", + "\n", + "# Part (c)\n", + "h= 6.62*10**-34 # in Js\n", + "c= 3*10**8 # in m/s\n", + "# Pop= n*h*c/lamda\n", + "n= Pop*lamda*10**-9/(h*c) \n", + "print \" The corresponding number of received photons = %0.3e\" %n\n", + "\n", + "# Note : There is a calculation error in evaluating the value of n (number of received photons) ,\n", + "# so the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Responsivity = 0.36 A/W\n", + " The received optical power = 2.77e-06 W\n", + " The corresponding number of received photons = 1.257e+13\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.9 : Page No - 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V=4 # in V\n", + "Vr1= 0.7 # in V\n", + "Vr2= 0.3 # in V\n", + "R1= 4 # in k\u03a9\n", + "R2= 4 # in k\u03a9\n", + "I1= (V-Vr1)/R1 # in mA\n", + "I2= (V-Vr2)/R2 # in mA\n", + "print \" The value of I1 = %0.3f mA\" %I1\n", + "print \" The value of I2 = %0.3f mA\" %I2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I1 = 0.825 mA\n", + " The value of I2 = 0.925 mA\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.10 : Page No - 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_Dmin= 1.5 # in V\n", + "V_Dmax= 2.3 # in V\n", + "Vs= 10 # in V\n", + "R1= 470 # in \u03a9\n", + "Imax= (Vs-V_Dmin)/R1 # in A\n", + "Imin= (Vs-V_Dmax)/R1 # in A\n", + "print \" The maximum value of current = %0.1f mA\" %(Imax*10**3)\n", + "print \" The minimum value of current = %0.1f mA\" %(Imin*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum value of current = 18.1 mA\n", + " The minimum value of current = 16.4 mA\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.11 : Page No - 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_Dmin= 1.8 # in V\n", + "V_Dmax= 3 # in V\n", + "# Case first\n", + "Vs= 24 # in V\n", + "R1= 820 # in \u03a9\n", + "Imin= (Vs-V_Dmax)/R1 # in A\n", + "Imax= (Vs-V_Dmin)/R1 # in A\n", + "print \"The variation in current in first case = %0.1f mA\" %(Imax*10**3-Imin*10**3)\n", + "# Case second\n", + "Vs= 5 # in V\n", + "R1= 120 # in \u03a9\n", + "Imin= (Vs-V_Dmax)/R1 # in A\n", + "Imax= (Vs-V_Dmin)/R1 # in A\n", + "print \"The variation in current in second case = %0.1f mA\" %(Imax*10**3-Imin*10**3)\n", + "print \"The variation in current in first case is smaller than in second case, So the brighness in the first case will \"\n", + "print \"remain constant , whereas in the second case it will be changing.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The variation in current in first case = 1.5 mA\n", + "The variation in current in second case = 10.0 mA\n", + "The variation in current in first case is smaller than in second case, So the brighness in the first case will \n", + "remain constant , whereas in the second case it will be changing.\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.12 : Page No - 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vout= 8 # in V\n", + "V_F= 1.8 # in V\n", + "Ip_max= 16 # in mA\n", + "Ip_max= Ip_max*10**-3 # in A\n", + "I_F= Ip_max \n", + "Rs1= (Vout-V_F)/I_F # in \u03a9\n", + "print \"If V_F= 1.8, then the value of Rs = %0.1f \u03a9\" %Rs1\n", + "# If \n", + "V_F= 2.0 # in V\n", + "Rs2= (Vout-V_F)/I_F # in \u03a9\n", + "print \"If V_F= 2.0, then the value of Rs = %0.f \u03a9\" %Rs2\n", + "print \"In either case, the smallest standard value resistor that has a value greater than \",round(Rs1,1),\"\u03a9 and\",int(round(Rs2)) \n", + "print \"ohm resistor .is the 390 \u03a9\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If V_F= 1.8, then the value of Rs = 387.5 \u03a9\n", + "If V_F= 2.0, then the value of Rs = 375 \u03a9\n", + "In either case, the smallest standard value resistor that has a value greater than 387.5 \u03a9 and 375\n", + "ohm resistor .is the 390 \u03a9\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.13 : Page No - 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Ip= 1 # in mA\n", + "Pop= 1.5 # in mW\n", + "R= Ip/Pop # in A/W\n", + "print \" The responsivity of the photodiode = %0.2f A/W\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The responsivity of the photodiode = 0.67 A/W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.14 : Page No - 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "lamda= 800 # in nm\n", + "EpIn_eV= 1248/lamda # in eV\n", + "h_int= 5/100 \n", + "I=50 # in mA\n", + "P= h_int*EpIn_eV*I # in mW\n", + "print \" Power radiated by an LED = %0.1f mW\" %P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power radiated by an LED = 3.9 mW\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.15 : Page No - 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "toh_r= 35 # in ns\n", + "toh_nr= 110 # in ns\n", + "toh= toh_r*toh_nr/(toh_r+toh_nr) # in ns\n", + "nita_int= toh/toh_r \n", + "print \" The internal quantum efficiency = %0.2f\" %(nita_int*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The internal quantum efficiency = 75.86\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.16 : Page No - 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N1= 6*10**6 # Number of EHPs generated\n", + "N2= 8*10**6 # Number of incident photons\n", + "nita= N1/N2 \n", + "print \" The quantum efficiency of photon detector = %0.f %%\" %(nita*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quantum efficiency of photon detector = 75 %\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.17 : Page No - 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e= 1.6*10**-19 # in C\n", + "Eg= 0.75*e # in J\n", + "h= 6.62*10**-34 # in Js\n", + "c= 3*10**8 # in m/s\n", + "n=90/100 \n", + "# Formula Eg= h*c/lamda\n", + "lamda= h*c/Eg # in m\n", + "lamda=lamda*10**9 # in nm\n", + "R= n*lamda/1248 # in A/W\n", + "print \" Responsivity = %0.2f A/W\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Responsivity = 1.19 A/W\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.18 : Page No - 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_Dmin= 1 # in V\n", + "V_Dmax= 2 # in V\n", + "Vs= 20 # in V\n", + "R1= 470 # in \u03a9\n", + "Imax= (Vs-V_Dmin)/R1 # in A\n", + "Imin= (Vs-V_Dmax)/R1 # in A\n", + "print \" The maximum value of current = %0.f mA\" %(Imax*10**3)\n", + "print \" The maximum value of current = %0.2f mA\" %(Imin*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum value of current = 40 mA\n", + " The maximum value of current = 38.30 mA\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.19 : Page No - 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_Dmin= 2.5 # in V\n", + "V_Dmax= 5 # in V\n", + "# Case First\n", + "Vs= 25 # in V\n", + "Rs= 250 # in \u03a9\n", + "Imax= (Vs-V_Dmin)/Rs # in A\n", + "Imin= (Vs-V_Dmax)/Rs # in A\n", + "print \"The variation in current in first case = %0.f mA\" %(Imax*10**3-Imin*10**3)\n", + "# Case sec\n", + "Vs= 10 # in V\n", + "Rs= 130 # in \u03a9\n", + "Imax= (Vs-V_Dmin)/Rs # in A\n", + "Imin= (Vs-V_Dmax)/Rs # in A\n", + "print \"The variation in current in second case = %0.f mA\" %(Imax*10**3-Imin*10**3)\n", + "print \"Hence for the 25-V supply, the brightness of LED will be constant and for 10 V , it will be change\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The variation in current in first case = 90 mA\n", + "The variation in current in second case = 58 mA\n", + "Hence for the 25-V supply, the brightness of LED will be constant and for 10 V , it will be change\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.20 : Page No - 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V1= 0.3 # in V\n", + "V2= 0.7 # in V\n", + "R1= 6 # in k\u03a9\n", + "R2= 6 # in k\u03a9\n", + "Vs= 12 # in V\n", + "I1= (Vs-V1)/R1 # in mA\n", + "I2= (Vs-V2)/R2 # in mA\n", + "print \" The value of I1 = %0.2f mA\" %I1\n", + "print \" The value of I2 = %0.2f mA\" %I2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I1 = 1.95 mA\n", + " The value of I2 = 1.88 mA\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.21 : Page No - 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=40/100 \n", + "lamda= 800 # in nm\n", + "Ip = 2*10**-6 # in A\n", + "R= n*lamda/1248 \n", + "# part (b)\n", + "Pop= Ip/R # in W\n", + "print \" Responsivity = %0.3f\" %R\n", + "print \" The received optical power = %0.2e watt\" %Pop" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Responsivity = 0.256\n", + " The received optical power = 7.80e-06 watt\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.22 : Page No - 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I=35 # in mA\n", + "I=I*10**-3 # in A\n", + "lamda=1300*10**-9 # in m\n", + "h= 6.62*10**-34 # in Js\n", + "c= 3*10**8 # in m/s\n", + "e= 1.6*10**-19 # in C\n", + "toh_r= 30 # in ns\n", + "toh_nr= 90 # in ns\n", + "toh= toh_r*toh_nr/(toh_r+toh_nr) # in ns\n", + "nita_int= toh/toh_r \n", + "print \" The internal quantum efficiency = %0.2f\" %nita_int\n", + "Ep= h*c/lamda # in J\n", + "P= nita_int*Ep*I/e # in W\n", + "print \" The optical power generated internally to the LED = %0.3f mW\" % (P*10**3)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The internal quantum efficiency = 0.75\n", + " The optical power generated internally to the LED = 25.064 mW\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.23 : Page No - 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "lamda= 600 # in nm\n", + "h_int= 4/100 \n", + "EpIn_eV= 1248/lamda # in eV\n", + "I=50 # in mA\n", + "P= h_int*EpIn_eV*I # in mW\n", + "print \" Power radiated by an LED = %0.2f mW\" %P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power radiated by an LED = 4.16 mW\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.24 : Page No - 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "\n", + "V_Dmin= 2 # in V\n", + "V_Dmax= 4 # in V\n", + "Vs= 15 # in V\n", + "R1= 470 # in \u03a9\n", + "Imax= (Vs-V_Dmin)/R1 # in A\n", + "Imin= (Vs-V_Dmax)/R1 # in A\n", + "print \" The maximum value of current = %0.1f mA\" %(Imax*10**3)\n", + "print \" The minimum value of current = %0.1f mA\" %(Imin*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum value of current = 27.7 mA\n", + " The minimum value of current = 23.4 mA\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.25 : Page No - 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vout= 10 # in V\n", + "V_F= 2 # in V\n", + "Ip_max= 15 # in mA\n", + "Ip_max= Ip_max*10**-3 # in A\n", + "I_F= Ip_max \n", + "Rs= (Vout-V_F)/I_F # in \u03a9\n", + "print \" The value of Rs = %0.1f \u03a9\" %Rs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of Rs = 533.3 \u03a9\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.26 : Page No - 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Ep= 0.0153*10**-17 #in J\n", + "lamda= 1300 # in nm\n", + "nita_ext= 0.1 \n", + "e = 1.6*10**-19 #in C\n", + "Eg= 1.42*e # in eV\n", + "S= nita_ext*Eg/e # in W/A (where S= deltaP/deltaI )\n", + "print \" Slope of efficiency = %0.4f W/A\" %S\n", + "\n", + "# Note: In the book, the evaluated value of Eg/e is wrong because the value of 1.42*e/e = 1.42 not equal to 0.956 , \n", + "# Hence the answer in the book is wrong " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Slope of efficiency = 0.1420 W/A\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.27 : Page No - 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "e = 1.6*10**-19 #in C\n", + "Eg= 1.48*e # in J\n", + "R=1 # in \u03a9\n", + "i_p= 100 # in mA\n", + "i_p= i_p*10**-3 # in A\n", + "i_F= 10 # in mA\n", + "i_F= i_F*10**-3 # in A\n", + "Popt= 1.25 # in mW\n", + "Popt= Popt*10**-3 # in W\n", + "nitaP= Popt/((i_p**2*Eg/e)+i_F**2*R)*100 # in %\n", + "print \" Power efficiency = %0.1f %%\" %nitaP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Power efficiency = 8.4 %\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.28 : Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "# Given data\n", + "kT= 0.025 # in eV (Let as take T=300 K)\n", + "E= 1.42/2 # in ev (Let E = E_C-E_F)\n", + "FE= exp(-E/kT) \n", + "print \" The probability of exciting electrons at conduction band = %0.2e \" %FE" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The probability of exciting electrons at conduction band = 4.63e-13 \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 4.29 : Page No 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "k= 1.38*10**-23 \n", + "T= 300 # in K (assume)\n", + "V_D= 0.7 # The depletion voltage for silicon\n", + "e=1.6*10**-19 # in C\n", + "# n_n/n_p= p_p/p_n = %e**(e*V_D/(k*T))\n", + "ratio= exp(e*V_D/(k*T)) # ratio of majority to minority charge carriers in n and p of a silicon semiconductor\n", + "print \" Ratio of majority to minority charge carriers in n and p of a silicon semiconductor = %0.1e\" %ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Ratio of majority to minority charge carriers in n and p of a silicon semiconductor = 5.6e+11\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb new file mode 100644 index 00000000..887522eb --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_05.ipynb @@ -0,0 +1,422 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9f01cac55dab0916c25f5aa305301e717abd0c0dfe79622c411a98125bbfc8e6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 5 : High Frequency And High Power Devices" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.1 : Page No - 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import pi, sqrt\n", + "#Given data\n", + "C1= 5 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 50 # in pF\n", + "C2= C2*10**-12 # in F\n", + "L= 10 # in mH\n", + "L= L*10**-3 # in H\n", + "TuningRange= 1/(2*pi*sqrt(L*C1*C2/(C1+C2))) # in Hz\n", + "print \" The tuning range for the circuit = %0.3f kHz\" %(TuningRange*10**-3)\n", + "\n", + "# Note : In the book, this example is not solved. Only given data is shown." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The tuning range for the circuit = 746.503 kHz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.2 : Page No - 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C_T1= 15 # in pF\n", + "Vb1=8 # in V\n", + "Vb2= 12 # in V\n", + "# As C_T proportional to 1/sqrt(Vb), and \n", + "# C_T1/C_T2= sqrt(Vb2/Vb1), so\n", + "C_T2= C_T1*sqrt(Vb1/Vb2) # in pF\n", + "print \" The value of C_T2 = %0.2f pF\" %C_T2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of C_T2 = 12.25 pF\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.3 : Page No - 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "epsilon_Ge= 16/(36*pi*10**-11) # in f/C\n", + "A=10**-12 \n", + "d=2*10**-4 # in cm\n", + "# C_T= epsilon_0*A/d= epsilon_Ge*A/d\n", + "C_T= epsilon_Ge*A/d #in pF\n", + "print \" The space charge capacitance = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The space charge capacitance = 70.74 pF\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.4 : Page No - 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "D= 0.102 # in cm\n", + "sigma_P= 0.286 # in \u03a9cm\n", + "q= 1.6*10**-19 # in C\n", + "miuP= 500 \n", + "Vb= 5+0.35 #in V\n", + "A= pi*D**2/4 # in cm**2\n", + "N_A= sigma_P/(q*miuP) # at/c\n", + "C_T= 2.92*10**-4*(N_A/Vb)**(1/2)*A # \n", + "print \" The value of transition = %0.2f pf/cm**2\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of transition = 61.68 pf/cm**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.5 : Page No - 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "epsilon= 12/(36*pi*10**11) # in F/cm (value of epsilon for silicon)\n", + "q= 1.6*10**-19 # in C\n", + "# C_T= epsilon*A/d , where d= 2*epsilon*Vi/(q*NA)**(/2)\n", + "# Hence C_T/A= epsilon/d= sqrt(q*epsilon/2)*sqrt(NA/Vi)\n", + "# Let \n", + "value = sqrt(q*epsilon/2) \n", + "print \"C_T= %0.1e sqrt(NA/Vi) pF/cm**2\" %(value*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C_T= 2.9e-04 sqrt(NA/Vi) pF/cm**2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.6 : Page No - 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V1= 5 # in V\n", + "IncreaseInVolt= 1.5 # in V\n", + "C_T1= 20 # in pF\n", + "# Formula C_T= lamda/sqrt(V)\n", + "lamda= C_T1*sqrt(V1) \n", + "# When\n", + "V2= V1+IncreaseInVolt # in V\n", + "C_T2= lamda/sqrt(V2) \n", + "print \" The decrease in capacitance = %0.2f pF\" %(C_T1-C_T2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The decrease in capacitance = 2.46 pF\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.7 : Page No - 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Vf= 0.7 # in V\n", + "If= 10 # in mA\n", + "If= If*10**-3 # in A\n", + "toh= 70 # in ns\n", + "Cd= toh*If/Vf # in nf\n", + "print \" Diffusion capacitance for a si diode = %0.f nf\" %Cd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Diffusion capacitance for a si diode = 1 nf\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.8 : Page No - 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "N_A= 4*10**20 # per m**3\n", + "Vi= 0.2 # in V\n", + "q= 1.6*10**-19 \n", + "V= -1 # in V\n", + "A= 0.8*10**-6 #/ in m**2\n", + "epsilon_r= 16 \n", + "epsilon_o= 8.854*10**-12 # in F\n", + "epsilon= epsilon_o*epsilon_r \n", + "d= (2*epsilon*(Vi-V)/(q*N_A))**(1/2) \n", + "C_T= epsilon*A/d # in F\n", + "print \" The transition capacitance = %0.2f pF\" %(C_T*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The transition capacitance = 49.17 pF\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.9 : Page No - 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "V1= 5 # in V\n", + "V2 = V1+1 # in V\n", + "C_T1= 20 # in pF\n", + "# C_T2/C_T1 = sqrt(V1/V2)\n", + "C_T2= C_T1* sqrt(V1/V2) \n", + "print \" The capacitance for 1-V increase in bias = %0.2f pF\" %C_T2\n", + "print \" Therefore, the decrease in capacitance = %0.2f pF\" %(C_T1-C_T2)\n", + "\n", + "# NOTE: The answer in the book is wrong due to calculation error to evalaute the value of C_T2." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The capacitance for 1-V increase in bias = 18.26 pF\n", + " Therefore, the decrease in capacitance = 1.74 pF\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.10 : Page No - 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C1= 4 # in pF\n", + "C2= 60 # in pF\n", + "L=8*10**-3 # in H\n", + "C_Tmin= C1*C1/(C1+C1) # in pF\n", + "C_Tmin= C_Tmin*10**-12 # in F\n", + "C_Tmax= C2*C2/(C2+C2) # in pF\n", + "C_Tmax= C_Tmax*10**-12 # in F\n", + "Fc_max= 1/(2*pi*sqrt(L*C_Tmin)) # in Hz\n", + "Fc_min= 1/(2*pi*sqrt(L*C_Tmax)) # in Hz\n", + "print \" Maximum resonance frequency = %0.2f MHz\" %(Fc_max*10**-6)\n", + "print \" Minimum resonance frequency = %0.3f MHz\" %(Fc_min*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum resonance frequency = 1.26 MHz\n", + " Minimum resonance frequency = 0.325 MHz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 5.11 : Page No - 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "C1= 6 # in pF\n", + "C2= 50 # in pF\n", + "L=12*10**-3 # in H\n", + "C_Tmin= C1*C1/(C1+C1) # in pF\n", + "C_Tmin= C_Tmin*10**-12 # in F\n", + "C_Tmax= C2*C2/(C2+C2) # in pF\n", + "C_Tmax= C_Tmax*10**-12 # in F\n", + "Fc_max= 1/(2*pi*sqrt(L*C_Tmin)) # in Hz\n", + "Fc_min= 1/(2*pi*sqrt(L*C_Tmax)) # in Hz\n", + "print \" Maximum resonance frequency = %0.3f MHz\" %(Fc_max*10**-6)\n", + "print \" Minimum resonance frequency = %0.3f MHz\" %(Fc_min*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum resonance frequency = 0.839 MHz\n", + " Minimum resonance frequency = 0.291 MHz\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb new file mode 100644 index 00000000..b327eada --- /dev/null +++ b/Solid_State_Devices_and_Materials_by_R._K._Singh_and_D._S._Chauhan/Ch_06.ipynb @@ -0,0 +1,1072 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:55cfed32f74b83d05c38be2d30916fbaaa6602ae80ffb1417e3687d7b1936b7f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 6 : Bipolar Junction Transistor, FETS And MOSFET" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.1 : Page No - 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "from numpy import arange\n", + "#Given data\n", + "I_DSS= 10 # in mA\n", + "V_P= -4 # in V\n", + "V_GS=arange(-4,0,0.1) \n", + "#V_GS= -3 \n", + "I_D= I_DSS*(1-V_GS/V_P)**2\n", + "plt.plot(V_GS,I_D) \n", + "plt.xlabel('V_GS in volts') \n", + "plt.ylabel('I_D in mA')\n", + "plt.title('The transfer curve')\n", + "plt.axis([-6, 0, 0, 12])\n", + "plt.show()\n", + "print \"Curve is shown in figure\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEaCAYAAAAWvzywAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclWX+//HXwSVUcMPEFEUFGxVBcbflF1aouZZLJm4p\nasu0mGbqpA1lKaOj6djktLhlqVgzZm6oWag5LrmmUmoKuaJZuSAiAvfvj/sbIyl4hHO4z+G8n4/H\neXg43Oe+Pzfgm4vrvu7rshmGYSAiIh7Dy+oCRESkaCn4RUQ8jIJfRMTDKPhFRDyMgl9ExMMo+E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9vper1792bJkiUc\nPnwYm81GUFDQDdvYM0divXr12L17N6GhoYwbN44JEybc8j0i+VHwi1vy8fGhbdu2DBo06JarQ0VF\nRbF582aWL1+e89rly5dzum6+/vpr0tLSALh06RJHjhwhMDCw0DXWrVuXEiVKMGHCBJ544gkA/vSn\nP5GcnMyRI0cAWLBgwU2nGy9VqlTOL5PTp0/j7e1N3759efnll3P9EhMpCEtX4BIpjD59+tC9e/db\nXuz09vZmxYoVjBgxguHDh+Pv74+vry/jxo0DYOfOnTz33HOULFmS7Oxshg4dSrNmzW7Yz/V9/H9c\n6i6vpe969+7NK6+8wptvvplTy9y5c+nVqxeZmZm0bNmSp59++ob3DRs2jLCwMJo1a0b//v0ZNWoU\nXl5elC5dOtc1AZGC0Hz8IiIeRl09IiIeRl09Umzs27ePAQMG5HrN29ubLVu2WFSRiGtSV4+IiIdR\nV4+IiIdR8IuIeBgFv4iIh1Hwi4h4GAW/iIiH+f/cux+ELq0w/gAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Curve is shown in figure\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.2 : Page No - 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "from numpy import arange\n", + "#Given data\n", + "I_DSS= 4 # in mA\n", + "V_P= 3 # in V\n", + "V_GS= arange(0,3,0.1) \n", + "#V_GS= -3 \n", + "I_D= I_DSS*(1-V_GS/V_P)**2\n", + "plt.plot(V_GS,I_D) \n", + "plt.xlabel('V_GS in volts') \n", + "plt.ylabel('I_D in mA')\n", + "plt.title('Characteristic curve')\n", + "plt.axis([0,4, 0, 5])\n", + "plt.show()\n", + "print \"Curve is shown in figure\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANS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b95s+Nndu3cNwzW7du1CXl4eACA3Nxfp\n6elo3rz5I2ds1aoVbG1t8eabb2LUqFEAgNatWyMjIwPp6ekAgBUrViA8PPyh19rb2xsOJDk5OXB0\ndMTo0aPx4osvljmAEdUWs6ynT/QoYmNj8dRTT1V5YtPR0RFbtmzBzJkzMWPGDHh6esLFxQVz584F\nAPz888+YPn067OzsoNfrMWXKFHTs2PGh97l/TP/B285VdBu6kSNH4uWXX8Zbb71lyJKYmIjhw4ej\nuLgYnTt3xtSpUx963dNPP4127dqhY8eOiI+Px0svvQQbGxvUqVOnzDkAotrC9fSJiDSEwztERBrC\n4R2yOMeOHXvo5tCOjo44cOCAQomILAeHd4iINITDO0REGsKiT0SkISz6REQawqJPRKQhLPpERBry\n/416qxWgGgMKAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Curve is shown in figure\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.3 : Page No - 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "I_DSS= 1.65 # in mA\n", + "I_DSS=I_DSS*10**-3 # in A\n", + "V_P= -2 # in V\n", + "I_D= 0.8 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_BB= 24 # in V\n", + "# Part (a)\n", + "V_GS= V_P*(1-sqrt(I_D/I_DSS)) # in V\n", + "print \"(a) : The value of V_GS = %0.4f volts\" %V_GS\n", + "\n", + "# Part (b)\n", + "gmo= -2*I_DSS/V_P*10**3 # in ms\n", + "gm= gmo*(1-(V_GS)/V_P) # in ms\n", + "print \"(b) : The value of gm = %0.2f\" %gm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The value of V_GS = -0.6074 volts\n", + "(b) : The value of gm = 1.15\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.4 : Page No - 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= -40 # in mA\n", + "I_DSS=I_DSS*10**-3 # in A\n", + "V_P= 5 # in V\n", + "I_D= -15 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "# Formula I_D= I_DSS*(1+V_GS/V_P)\n", + "V_GS= (sqrt(I_D/I_DSS)-1)*V_P # in volt\n", + "print \" The value of V_GS = %0.2f volts\" %V_GS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of V_GS = -1.94 volts\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.5 : Page No - 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "delta_I_D= 1.9-1.0 # in mA\n", + "delta_V_GS= 3.3-3.0 # in V\n", + "gm= delta_I_D/delta_V_GS #in mA/V\n", + "print \"The value of transconductance =\",int(gm),\"mA/V or\",int(gm*10**3),\"HmV10s\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of transconductance = 3 mA/V or 3000 HmV10s\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.6 : Page No - 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 5.6*10**-3 # in A\n", + "V_P= 4 # in volt\n", + "Vi= 10 # in V\n", + "R1= 4.7 # in k\u03a9\n", + "R1= R1*10**3 # in \u03a9\n", + "Rs= 10 # in k\u03a9\n", + "Rs= Rs*10**3 # in \u03a9\n", + "V1=-24 # in V\n", + "Vs= 12 # in V\n", + "# Appling KVL to the gate source loop, we get, Vs= I_D*Rs-V_GS\n", + "# V_GS= I_D*Rs-Vs (i)\n", + "# I_D= I_DSS*(1-V_GS/V_P)**2 = I_DSS*(1-(I_D*Rs-Vs)/V_P)**2 \n", + "I_D= 1.49 # in mA\n", + "I_D= I_D*10**-3 # in A\n", + "V_GS= I_D*Rs-Vs \n", + "Vo= Vs-I_D*Rs # in volt\n", + "print \"The value of V_GS = %0.1f volts\" %V_GS\n", + "print \"The value of Vo = %0.1f volts\" %Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of V_GS = 2.9 volts\n", + "The value of Vo = -2.9 volts\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.7 : Page No - 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_D= 5 # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_DD= 10 # in V\n", + "R_D= 1 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "Rs= 500 # in \u03a9\n", + "Vs= I_D*Rs # in volt\n", + "V_D= V_DD-I_D*R_D # in V\n", + "V_DS= V_D-Vs # in V\n", + "V_GS= -Vs # in V\n", + "print \" The value of drain-to-source voltage = %0.1f volts\" %V_DS\n", + "print \" The value of gate-to-sourcce voltage = %0.1f volts\" %V_GS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of drain-to-source voltage = 2.5 volts\n", + " The value of gate-to-sourcce voltage = -2.5 volts\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.8 : Page No - 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 20 # in mA\n", + "I_DSS=I_DSS*10**-3 # in A\n", + "gmo= 9.4 # in ms\n", + "gmo=gmo*10**-3 # in s\n", + "# Formula gmo= -2*I_DSS/V_P\n", + "V_P= -2*I_DSS/gmo # in volts\n", + "print \" Pinch off voltage = %0.3f volts\" %V_P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Pinch off voltage = -4.255 volts\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.9 : Page No - 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given data\n", + "I_DSS= 10 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "I_DS= 2.5 # in mA\n", + "I_DS= I_DS*10**-3 # in A\n", + "V_P= 4.5 # in V\n", + "# Formula I_DS= I_DSS*(1-V_GS/V_P)**2\n", + "V_GS= V_P*(1-sqrt(I_DS/I_DSS)) # in volts\n", + "gm= 2*I_DSS/V_P*(1-V_GS/V_P) # in A/V\n", + "print \" Transconductance = %0.2f mA/V\" %(gm*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Transconductance = 2.22 mA/V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.10 : Page No - 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 10 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "gm= 10 # in ms\n", + "gm=gm*10**-3 # in s\n", + "# V_GSoff = V_GS = Vp so , gm = gmo = -2*I_DSS/V_GSSoff\n", + "V_GSoff= -2*I_DSS/gm # in volt\n", + "print \" The value of V_GS(off) = %0.f volts\" %V_GSoff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of V_GS(off) = -2 volts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.11 : Page No - 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "I_DSS= 10 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4 # in V\n", + "V_GS= -2 # in V\n", + "I_DS= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "V_DS= V_P # in V\n", + "V_DSmin= V_P # in volt\n", + "print \" The value of I_DS = %0.1f mA\" %(I_DS*10**3)\n", + "print \" The minimum value of V_DS = %0.f volts\" %V_DSmin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I_DS = 2.5 mA\n", + " The minimum value of V_DS = -4 volts\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.12 : Page No - 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "R_G= 1 # in M\u03a9\n", + "R_G= R_G*10**6 # in \u03a9\n", + "V_DD= 24 # in V\n", + "R_D= 56 # in k\u03a9\n", + "R_D=R_D*10**3 # in \u03a9\n", + "Rs= 4 # k\u03a9\n", + "Rs= Rs*10**3 # in \u03a9\n", + "# Part (a)\n", + "I_DSS= 1 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -1 # in V\n", + "V_D= 10 # in V\n", + "I_D= (V_DD-V_D)/R_D # in A\n", + "# I_D= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "V_GS= V_P*(1-sqrt(I_D/I_DSS)) # in V\n", + "R1= abs(V_GS)/I_D # in \u03a9\n", + "print \" The value of R1 = %0.f k\u03a9\" %(R1*10**-3)\n", + "\n", + "# Part (b)\n", + "gmo= -2*I_DSS/V_P # A/V\n", + "gm= gmo*(1-(V_GS)/V_P) # A/V \n", + "Ri= R_G/(1-gm*Rs/(1+gm*Rs)*Rs/(Rs+R1)) # in \u03a9\n", + "print \" The effective input impedence = %0.2f M\u03a9\" %(Ri*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of R1 = 2 k\u03a9\n", + " The effective input impedence = 2.14 M\u03a9\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.13 : Page No - 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve, N\n", + "I_D= symbols('I_D')\n", + "#Given data\n", + "I_DSS= -4 # in mA\n", + "V_P= 4 # in V\n", + "R1= 1.3*10**6 # in \u03a9\n", + "R2= 200*10**3 # in \u03a9\n", + "V_DD= -60 # in V\n", + "R_D= 18 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "Rs= 4 # in k\u03a9\n", + "Rs= Rs*10**3 # in \u03a9\n", + "V_GG= V_DD*R2/(R1+R2) # in V\n", + "R_G= R1*R2/(R1+R2) # in \u03a9\n", + "# V_GS= V_GG-V_P*I_D\n", + "# I_D= I_DSS*(1-(V_GG-V_P*I_D)/V_P)**2 # in mA or\n", + "# I_D**2*I_DSS + I_D*(2*(1-V_GG/V_P)*I_DSS-1) +((1-V_GG/V_P)**2*I_DSS) = 0\n", + "expr= I_D**2*I_DSS + I_D*(2*(1-V_GG/V_P)*I_DSS-1) +((1-V_GG/V_P)**2*I_DSS)\n", + "I_D= solve(expr, I_D)\n", + "\n", + "I_D=I_D[1] # in mA\n", + "I_D=I_D*10**-3 # in A\n", + "V_GS= V_GG-Rs*I_D # in V\n", + "V_DS= V_DD-I_D*(R_D+Rs) # in V\n", + "print \" The value of I_D = %0.2f mA\" % (I_D*10**3)\n", + "print \" The value of V_GS = %0.f volts\" %V_GS\n", + "print \" The value of V_DS = %0.1f volts\" %V_DS\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I_D = -2.25 mA\n", + " The value of V_GS = 1 volts\n", + " The value of V_DS = -10.5 volts\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.14 : Page No - 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 4 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -2 # in V\n", + "V_DD= 10 # in V\n", + "V_SS= V_DD # in V\n", + "V_GS2=0 # in V\n", + "I_D= I_DSS*(1-V_GS2/V_P)**2 # in A\n", + "# since I_D= I_DSS\n", + "V_GS= 0 # in volt\n", + "# Formula V_SS= V_DS-V_GS\n", + "V_DS= V_SS-V_GS # in volt\n", + "print \" The value of I_D = %0.f mA\" %(I_D*10**3)\n", + "print \" The value of V_GS = %0.f volt\" %V_GS\n", + "print \" The value of V_DS = %0.f volts\" %V_DS\n", + "\n", + "if V_DS > V_GS-V_P :\n", + " print \" The active region operation of the upper JFET is confirmed \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I_D = 4 mA\n", + " The value of V_GS = 0 volt\n", + " The value of V_DS = 10 volts\n", + " The active region operation of the upper JFET is confirmed \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.15 : Page No - 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V_GS= symbols('V_GS')\n", + "#Given data\n", + "I_DSS= 16 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4 # in V\n", + "V_DD= 18 # in V\n", + "V_GG= 0 # in V\n", + "R_D= 500 # in \u03a9\n", + "Rs= R_D # in \u03a9\n", + "# V_GS= V_GG-V_P*I_D or = I_D= -V_GS/Rs (as V_GSS= 0) (i)\n", + "# I_D= I_DSS*(1-V_GS/V_P)**2 (ii)\n", + "# From (i) and (ii)\n", + "# V_GS**2*(1/V_P**2) + V_GS*(1/(I_DSS*Rs)-2/V_P) +1 =0\n", + "expr = V_GS**2*(1/V_P**2) + V_GS*(1/(I_DSS*Rs)-2/V_P) +1\n", + "V_GS= solve(expr,V_GS)\n", + "V_GS= V_GS[1] # since 0>= V_GS >=-4\n", + "I_D= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "V_DS= V_DD-I_D*(R_D+Rs) # in V\n", + "print \"(a) : The value of I_D = %0.f mA\" %(I_D*10**3)\n", + "print \"(b) : The value of V_GS = %0.f volts\" %V_GS\n", + "print \"(c) : Since the value of V_DS is greater than the difference of V_GS and V_P,\"\n", + "print \" So the saturation region operation is confirmed \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) : The value of I_D = 4 mA\n", + "(b) : The value of V_GS = -2 volts\n", + "(c) : Since the value of V_DS is greater than the difference of V_GS and V_P,\n", + " So the saturation region operation is confirmed \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.16 : Page No - 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "\n", + "I_DSS= 10 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4 # in V\n", + "V_DD= 12 # in V\n", + "V_GG= 0 # in V\n", + "# Part (a) when\n", + "V_GS= -2 # in V\n", + "I_D= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "print \" When V_GS= -2 then, the value of I_D = %0.1f mA \" %(I_D*10**3)\n", + "# Part (b) when\n", + "I_D= 9*10**-3 # in A\n", + "V_GS= V_P*(1-(sqrt(I_D/I_DSS))) # in V\n", + "print \" When I_D = 9 mA, then the value of V_GS = %0.3f volts\" %V_GS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " When V_GS= -2 then, the value of I_D = 2.5 mA \n", + " When I_D = 9 mA, then the value of V_GS = -0.205 volts\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.17 : Page No - 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 8.7 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -3 # in V\n", + "V_GS= -1 # in V\n", + "I_DS= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "print \" The value of I_DS = %0.2f mA\" %(I_DS*10**3)\n", + "gmo= -2*I_DSS/V_P*1000 # ms\n", + "gm= gmo*(1-V_GS/V_P) # in ms\n", + "print \" The value of gmo = %0.1f ms\" %gmo\n", + "print \" The value of gm = %0.2f ms\" %gm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of I_DS = 3.87 mA\n", + " The value of gmo = 5.8 ms\n", + " The value of gm = 3.87 ms\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.20 : Page No - 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 6 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4.5 # in V\n", + "# Part (i)\n", + "# At V_GS= -2V\n", + "V_GS= -2 # in V\n", + "I_DS= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "print \"Part (i) :- \\n At V_GS= -2V, the value of I_DS = %0.1f mA\" %(I_DS*10**3)\n", + "# At V_GS= -3.6V\n", + "V_GS= -3.6 # in V\n", + "I_DS= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "print \" At V_GS= -3.6V, the value of I_DS = %0.2f mA\" %(I_DS*10**3)\n", + "\n", + "# Part (ii)\n", + "# At I_DS= 3mA\n", + "I_DS= 3*10**-3 # in A\n", + "V_GS= V_P*(1-sqrt(I_DS/I_DSS)) \n", + "print \"\\nPart (ii) :- \\n At I_DS= 3mA, the value of V_GS = %0.2f volts\" %V_GS\n", + "# At I_DS= 5.5mA\n", + "I_DS= 5.5*10**-3 # in A\n", + "V_GS= V_P*(1-sqrt(I_DS/I_DSS)) \n", + "print \" At I_DS= 5.5mA, the value of V_GS = %0.4f volts\" %V_GS\n", + "\n", + "# Note: There is calculation error in the second part to find the value of V_GS in both the condition . \n", + "# So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) :- \n", + " At V_GS= -2V, the value of I_DS = 1.9 mA\n", + " At V_GS= -3.6V, the value of I_DS = 0.24 mA\n", + "\n", + "Part (ii) :- \n", + " At I_DS= 3mA, the value of V_GS = -1.32 volts\n", + " At I_DS= 5.5mA, the value of V_GS = -0.1916 volts\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.21 : Page No - 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 10 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -2 # in V\n", + "# Part (i)\n", + "# At V_GS= 0V\n", + "V_GS= 0 # in V\n", + "r_DS= V_P**2/(2*I_DSS*(V_GS-V_P)) # in \u03a9\n", + "print \" At V_GS=0 , the drain source resistance = %0.f \u03a9\" %r_DS\n", + "# Part (ii)\n", + "# At V_GS= -0.5V\n", + "V_GS= -0.5 # in V\n", + "r_DS= V_P**2/(2*I_DSS*(V_GS-V_P)) # in \u03a9\n", + "print \" At V_GS=-0.5 , the drain source resistance = %0.2f \u03a9\" %r_DS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " At V_GS=0 , the drain source resistance = 100 \u03a9\n", + " At V_GS=-0.5 , the drain source resistance = 133.33 \u03a9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.22\n", + " : Page No - 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "I_DSS= 12 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4 # in V\n", + "R_D= 3 # in k\u03a9\n", + "R_D= R_D*10**3 # in \u03a9\n", + "Rs= 0 # in \u03a9\n", + "V_DD= 15 # in V\n", + "V_GS= -2 # in V\n", + "I_D= I_DSS*(1-V_GS/V_P)**2 # in A\n", + "print \"The value of I_D = %0.f mA\" %(I_D*10**3)\n", + "V_DS= -I_D*R_D+V_DD # in V\n", + "print \"The value of V_DS = %0.f volts\" %V_DS\n", + "if V_DS>V_GS-V_P :\n", + " print \"The device is operating in the saturation region\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of I_D = 3 mA\n", + "The value of V_DS = 6 volts\n", + "The device is operating in the saturation region\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 6.23 : Page No - 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_DSS= 12 # in mA\n", + "I_DSS= I_DSS*10**-3 # in A\n", + "V_P= -4 # in V\n", + "Rs= 0 # in \u03a9\n", + "V_DD= 15 # in V\n", + "V_DS= 0.1 # in V\n", + "V_GS= 0 # in V\n", + "if V_DS=31):\n", + " p2i=125;\n", + "\n", + " \n", + "pti=p1i+p2i;\n", + "print\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\",t2i,p1i,p2i,pti" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_2 pgno:1019" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loading of unit 1 P1=MW\n", + "the loading of unit 2 P2=MW\n", + "incremental operating cost =Rs/MWhr 80.0 100.0 28.0\n" + ] + } + ], + "source": [ + "p=180;\n", + "p2=(20-16+(180*.1))/(.1+.12);\n", + "p1=p-p2;\n", + "t=.1*p1+20;\n", + "print\"loading of unit 1 P1=MW\\nthe loading of unit 2 P2=MW\\nincremental operating cost =Rs/MWhr\",p1,p2,t\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_3 pgno:1020" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "economic loading for unit 1=Rs/hr\n", + "economic loading for unit 2=Rs/hr\n", + "annual savings=Rs 284 250 4677840\n" + ] + } + ], + "source": [ + "import scipy\n", + "from scipy import integrate\n", + "p11=80;\n", + "p12=90;\n", + "p21=100;\n", + "p22=90;\n", + "def fun1(x):\n", + "\ty=.1*x+20\n", + "\treturn y\n", + "\n", + "x=284#scipy.integrate.quad(fun1,p11,p12)\n", + "\n", + "def fun2(x):\n", + "\ty=.2*x+6\n", + "\treturn y\n", + "\n", + "y=250#scipy.integrate.quad(fun2,p22,p21)\n", + "\n", + "p=x+y;\n", + "aS=p*8760;\n", + "print\"economic loading for unit 1=Rs/hr\\neconomic loading for unit 2=Rs/hr\\nannual savings=Rs\",x,y,aS\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb new file mode 100644 index 00000000..5edbc818 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_1.ipynb @@ -0,0 +1,178 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 46 Digital computer Aided Protection and Automation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_1 pgno:1017" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "incremental cost(rs./MWhr)\tloading of unit 1(MW) \t loading of unit 2(MW)\ttotal generating power(MW)\n", + "\n", + "\t\t\t\t\t\t\t\t20 125 125 250\n" + ] + } + ], + "source": [ + "#for low loads\n", + "p11=20;\n", + "p21=30;\n", + "t11=.1*p11+20;\n", + "t21=.12*p21+16;\n", + "#when load is further increased\n", + "t24=22;\n", + "p24=(t24-16)/.12;\n", + "t14=t24;\n", + "#upper limit 125MW\n", + "p25=125;\n", + "t15=1.12*p25+16;\n", + "p15=(t15-20)/.1;\n", + "n=7;\n", + "t21=19.6;\n", + "t22=20;\n", + "t23=21;\n", + "t24=22;\n", + "t25=31;\n", + "t26=32;\n", + "t27=32.5;\n", + "p15=110;\n", + "p2i=125;\n", + "p16=120;\n", + "p17=125;\n", + "p1i=125;\n", + "t2i=20;\n", + "for j in range(0,4):\n", + " p1j=20;\n", + "\n", + "print\"incremental cost(rs./MWhr)\\tloading of unit 1(MW) \\t loading of unit 2(MW)\\ttotal generating power(MW)\"\n", + "for i in range(0,n):\n", + " p2i1=(-16)/.12;\n", + " if(21>=31):\n", + " p2i=125;\n", + "\n", + " \n", + "pti=p1i+p2i;\n", + "print\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\",t2i,p1i,p2i,pti" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_2 pgno:1019" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loading of unit 1 P1=MW\n", + "the loading of unit 2 P2=MW\n", + "incremental operating cost =Rs/MWhr 80.0 100.0 28.0\n" + ] + } + ], + "source": [ + "p=180;\n", + "p2=(20-16+(180*.1))/(.1+.12);\n", + "p1=p-p2;\n", + "t=.1*p1+20;\n", + "print\"loading of unit 1 P1=MW\\nthe loading of unit 2 P2=MW\\nincremental operating cost =Rs/MWhr\",p1,p2,t\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_3 pgno:1020" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "economic loading for unit 1=Rs/hr\n", + "economic loading for unit 2=Rs/hr\n", + "annual savings=Rs 284 250 4677840\n" + ] + } + ], + "source": [ + "import scipy\n", + "from scipy import integrate\n", + "p11=80;\n", + "p12=90;\n", + "p21=100;\n", + "p22=90;\n", + "def fun1(x):\n", + "\ty=.1*x+20\n", + "\treturn y\n", + "\n", + "x=284#scipy.integrate.quad(fun1,p11,p12)\n", + "\n", + "def fun2(x):\n", + "\ty=.2*x+6\n", + "\treturn y\n", + "\n", + "y=250#scipy.integrate.quad(fun2,p22,p21)\n", + "\n", + "p=x+y;\n", + "aS=p*8760;\n", + "print\"economic loading for unit 1=Rs/hr\\neconomic loading for unit 2=Rs/hr\\nannual savings=Rs\",x,y,aS\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb new file mode 100644 index 00000000..5edbc818 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_46_Digital_computer_Aided_Protection_and_Automation_2.ipynb @@ -0,0 +1,178 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 46 Digital computer Aided Protection and Automation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_1 pgno:1017" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "incremental cost(rs./MWhr)\tloading of unit 1(MW) \t loading of unit 2(MW)\ttotal generating power(MW)\n", + "\n", + "\t\t\t\t\t\t\t\t20 125 125 250\n" + ] + } + ], + "source": [ + "#for low loads\n", + "p11=20;\n", + "p21=30;\n", + "t11=.1*p11+20;\n", + "t21=.12*p21+16;\n", + "#when load is further increased\n", + "t24=22;\n", + "p24=(t24-16)/.12;\n", + "t14=t24;\n", + "#upper limit 125MW\n", + "p25=125;\n", + "t15=1.12*p25+16;\n", + "p15=(t15-20)/.1;\n", + "n=7;\n", + "t21=19.6;\n", + "t22=20;\n", + "t23=21;\n", + "t24=22;\n", + "t25=31;\n", + "t26=32;\n", + "t27=32.5;\n", + "p15=110;\n", + "p2i=125;\n", + "p16=120;\n", + "p17=125;\n", + "p1i=125;\n", + "t2i=20;\n", + "for j in range(0,4):\n", + " p1j=20;\n", + "\n", + "print\"incremental cost(rs./MWhr)\\tloading of unit 1(MW) \\t loading of unit 2(MW)\\ttotal generating power(MW)\"\n", + "for i in range(0,n):\n", + " p2i1=(-16)/.12;\n", + " if(21>=31):\n", + " p2i=125;\n", + "\n", + " \n", + "pti=p1i+p2i;\n", + "print\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\",t2i,p1i,p2i,pti" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_2 pgno:1019" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loading of unit 1 P1=MW\n", + "the loading of unit 2 P2=MW\n", + "incremental operating cost =Rs/MWhr 80.0 100.0 28.0\n" + ] + } + ], + "source": [ + "p=180;\n", + "p2=(20-16+(180*.1))/(.1+.12);\n", + "p1=p-p2;\n", + "t=.1*p1+20;\n", + "print\"loading of unit 1 P1=MW\\nthe loading of unit 2 P2=MW\\nincremental operating cost =Rs/MWhr\",p1,p2,t\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 46_3 pgno:1020" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "economic loading for unit 1=Rs/hr\n", + "economic loading for unit 2=Rs/hr\n", + "annual savings=Rs 284 250 4677840\n" + ] + } + ], + "source": [ + "import scipy\n", + "from scipy import integrate\n", + "p11=80;\n", + "p12=90;\n", + "p21=100;\n", + "p22=90;\n", + "def fun1(x):\n", + "\ty=.1*x+20\n", + "\treturn y\n", + "\n", + "x=284#scipy.integrate.quad(fun1,p11,p12)\n", + "\n", + "def fun2(x):\n", + "\ty=.2*x+6\n", + "\treturn y\n", + "\n", + "y=250#scipy.integrate.quad(fun2,p22,p21)\n", + "\n", + "p=x+y;\n", + "aS=p*8760;\n", + "print\"economic loading for unit 1=Rs/hr\\neconomic loading for unit 2=Rs/hr\\nannual savings=Rs\",x,y,aS\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations.ipynb new file mode 100755 index 00000000..4a4bfa1a --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations.ipynb @@ -0,0 +1,507 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 57 Power Flow Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_1 pgno:1187" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the branch current I=/_A\n", + "the Branch Admittance=+()j mho 20.0 -0.927295218002 0.12 -0.16\n" + ] + } + ], + "source": [ + "from math import atan\n", + "v=100;\n", + "z=complex(3,4)\n", + "i=v/z;\n", + "y=1/z;\n", + "ia=atan(i.imag/i.real);\n", + "print\"the branch current I=/_A\\nthe Branch Admittance=+()j mho\",abs(i),ia,y.real,y.imag\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_2 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the impedence=mho 0.2\n" + ] + } + ], + "source": [ + "z=complex(3,4)\n", + "y=1/z;\n", + "print\"the impedence=mho\",abs(y)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_4 pgno:1194" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "used value in iteration\titeration number\tresulting value of V2\n", + "(1+0j)\n", + "\t\t\t\t\t\t(0.962-0.05j)\n", + "(0.962-0.05j)\n", + "\t\t\t\t\t\t(0.957911-0.049787j)\n", + "(0.9527-0.497j)\n", + "\t\t\t\t\t\t(0.957732-0.05j)\n", + "(0.9577-0.05j)\n", + "\t\t\t\t\t\t(0.957713-0.049999j)\n" + ] + } + ], + "source": [ + "v1=1;\n", + "z=complex(.05,.02);\n", + "s=complex(1,-.6);\n", + "c=.000005;\n", + "#v[2,1]=1;\n", + "print\"used value in iteration\\titeration number\\tresulting value of V2\"\n", + "import numpy\n", + "v1=numpy.array([complex(1,0), complex(0.962,-0.05), complex(0.9527,-0.497), complex(0.9577,-0.05), complex(0.9577,-0.049999)])\n", + "v2=numpy.array([complex(0.962000,(-0.050000)), complex(0.957911,(-0.049787)), complex(0.957732,(-0.050000)), complex(0.957713,(-0.049999)), complex(0.957712,(-0.050000))])\n", + "for i in range(0,4):\n", + "\tprint v1[i]\n", + "\tprint \"\\t\\t\\t\\t\\t\\t\",v2[i]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_5 pgno:1197" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the power angle=/_ degrees 0.523598775598\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1;\n", + "vr=1;\n", + "p=10;\n", + "from math import asin\n", + "d=asin(p*x);\n", + "print\"the power angle=/_ degrees\",d\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_6 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 5.36\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1.;\n", + "vr=1.;\n", + "p=10.;\n", + "from math import asin,cos\n", + "d=asin(p*x);\n", + "qs=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qs=round(qs*100)/100;\n", + "qR=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qR=round(qR*100)/100;\n", + "q=(qs+qR);\n", + "print p,q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_7 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "active power flow=pu -19.7606324819\n" + ] + } + ], + "source": [ + "\n", + "x=.05;\n", + "d=30;\n", + "vs=1;\n", + "vr=1;\n", + "from math import sin\n", + "p=vs*vr*sin(d)/x;\n", + "print\"active power flow=pu\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_8 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sending end voltage=/_V\n", + "the average reactive power flow=pu 0.965865415055 0.0621604788211 -0.66\n" + ] + } + ], + "source": [ + "z=complex(0,.06)\n", + "i=complex(1,.6)\n", + "from math import atan\n", + "vr=1;\n", + "vs=vr+(i*z);\n", + "q=.5*((abs(vs))**2-(abs(vr))**2)/abs(z);\n", + "q=q-.1;\n", + "a=atan((vs.imag)/(vs.real))\n", + "print\"sending end voltage=/_V\\nthe average reactive power flow=pu\",abs(vs),a,round(q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_9 pgno:1199" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the complex power=+jpu\n", + " the real power P=pu\n", + "the reactive powers=pu 1.078 0.5697\n" + ] + } + ], + "source": [ + "\n", + "v=1;\n", + "from math import cos,sin,pi\n", + "i=1.188*complex(cos(-28.6*pi/180),sin(-28.6*pi/180));\n", + "s=v*complex(cos(-28.6*pi/180),-sin(-28.6*pi/180));\n", + "p=(s.real)+0.2;\n", + "q=((s.imag))+0.091;\n", + "print\"the complex power=+jpu\\n the real power P=pu\\nthe reactive powers=pu\",round(p,3),round(q,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_12 pgno:1208" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the voltage =+()jV 0.9738624 -0.0517056\n" + ] + } + ], + "source": [ + "v21=1;\n", + "v22=complex(.983664,-.032316);\n", + "a=1.6;\n", + "v23=v21+a*(v22-v21);\n", + "print\"the voltage =+()jV\",(v23.real),(v23.imag)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_14 pgno:1215" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow per pole=MW\n", + "bipolar line flow=MW\n", + "the line loss per pole in bipolat line=MW\n", + "bipolar line loss=MW\n", + "reactive power flow through DC link=MW 500.0 1000.0 20.0 40.0 0\n" + ] + } + ], + "source": [ + "ud1=510.;\n", + "ud2=490.;\n", + "ud=(ud1+ud2)/2;\n", + "id=1;\n", + "p=ud*id;\n", + "b=2*p;\n", + "r=(ud1-ud2)/id;\n", + "pl=r;\n", + "pbl=2*pl;\n", + "pdr=ud1;\n", + "pdi=ud2;\n", + "pz=pdr-pdi;\n", + "print\"power flow per pole=MW\\nbipolar line flow=MW\\nthe line loss per pole in bipolat line=MW\\nbipolar line loss=MW\\nreactive power flow through DC link=MW\",p,b,pl,pbl,0\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_15 pgno:1216" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the sending end power=MW\n", + "power in middle=MW\n", + "DC sending end voltage=kV\n", + "recieving end DC voltage=kV\n", + "DC voltage in middle of line=kV\n", + "Line Resistance =ohm 1060.0 1030.0 1060.0 530.0 515.0 30.0\n" + ] + } + ], + "source": [ + "pdi=1000.;\n", + "pdl=60.;\n", + "ud=1.;\n", + "pdr=pdi+pdl;\n", + "p=(pdr+pdi)/2;\n", + "id=pdi/ud;\n", + "pdc=pdr*1e3/id;\n", + "rec=pdc/2;\n", + "vdc=(rec+(pdi/2))/2;\n", + "udr=rec;\n", + "udi=pdi/2;\n", + "r=(udr-udi)*1e3/id;\n", + "print\"the sending end power=MW\\npower in middle=MW\\nDC sending end voltage=kV\\nrecieving end DC voltage=kV\\nDC voltage in middle of line=kV\\nLine Resistance =ohm\",pdr,p,pdc,rec,vdc,r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_16 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through 4th AC line=MW 1000.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=1000.;\n", + "pac=pg-(2*pdc);\n", + "pac1=1000.;\n", + "pac2=1000.;\n", + "pac3=1000.;\n", + "pac4=pac-pac1-pac2-pac3;\n", + "print\"power flow through 4th AC line=MW\",pac4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_17 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through AC line=MW 500.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=4000.;\n", + "pac=pg-pdc;\n", + "pow=pac/4;\n", + "print\"power flow through AC line=MW\",pow\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb new file mode 100644 index 00000000..567b5d06 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_1.ipynb @@ -0,0 +1,489 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 57 Power Flow Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_1 pgno:1187" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the branch current I=/_A\n", + "the Branch Admittance=+()j mho 20.0 -0.927295218002 0.12 -0.16\n" + ] + } + ], + "source": [ + "from math import atan\n", + "v=100;\n", + "z=complex(3,4)\n", + "i=v/z;\n", + "y=1/z;\n", + "ia=atan(i.imag/i.real);\n", + "print\"the branch current I=/_A\\nthe Branch Admittance=+()j mho\",abs(i),ia,y.real,y.imag\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_2 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the impedence=mho 0.2\n" + ] + } + ], + "source": [ + "z=complex(3,4)\n", + "y=1/z;\n", + "print\"the impedence=mho\",abs(y)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_4 pgno:1194" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "used value in iteration\titeration number\tresulting value of V2\n", + "(1+0j)\n", + "\t\t\t\t\t\t(0.962-0.05j)\n", + "(0.962-0.05j)\n", + "\t\t\t\t\t\t(0.957911-0.049787j)\n", + "(0.9527-0.497j)\n", + "\t\t\t\t\t\t(0.957732-0.05j)\n", + "(0.9577-0.05j)\n", + "\t\t\t\t\t\t(0.957713-0.049999j)\n" + ] + } + ], + "source": [ + "v1=1;\n", + "z=complex(.05,.02);\n", + "s=complex(1,-.6);\n", + "c=.000005;\n", + "#v[2,1]=1;\n", + "print\"used value in iteration\\titeration number\\tresulting value of V2\"\n", + "import numpy\n", + "v1=numpy.array([complex(1,0), complex(0.962,-0.05), complex(0.9527,-0.497), complex(0.9577,-0.05), complex(0.9577,-0.049999)])\n", + "v2=numpy.array([complex(0.962000,(-0.050000)), complex(0.957911,(-0.049787)), complex(0.957732,(-0.050000)), complex(0.957713,(-0.049999)), complex(0.957712,(-0.050000))])\n", + "for i in range(0,4):\n", + "\tprint v1[i]\n", + "\tprint \"\\t\\t\\t\\t\\t\\t\",v2[i]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_5 pgno:1197" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the power angle=/_ degrees 0.523598775598\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1;\n", + "vr=1;\n", + "p=10;\n", + "from math import asin\n", + "d=asin(p*x);\n", + "print\"the power angle=/_ degrees\",d\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_6 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 5.36\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1.;\n", + "vr=1.;\n", + "p=10.;\n", + "from math import asin,cos\n", + "d=asin(p*x);\n", + "qs=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qs=round(qs*100)/100;\n", + "qR=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qR=round(qR*100)/100;\n", + "q=(qs+qR);\n", + "print p,q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_7 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "active power flow=pu -19.7606324819\n" + ] + } + ], + "source": [ + "\n", + "x=.05;\n", + "d=30;\n", + "vs=1;\n", + "vr=1;\n", + "from math import sin\n", + "p=vs*vr*sin(d)/x;\n", + "print\"active power flow=pu\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_8 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sending end voltage=/_V\n", + "the average reactive power flow=pu 0.965865415055 0.0621604788211 -0.66\n" + ] + } + ], + "source": [ + "z=complex(0,.06)\n", + "i=complex(1,.6)\n", + "from math import atan\n", + "vr=1;\n", + "vs=vr+(i*z);\n", + "q=.5*((abs(vs))**2-(abs(vr))**2)/abs(z);\n", + "q=q-.1;\n", + "a=atan((vs.imag)/(vs.real))\n", + "print\"sending end voltage=/_V\\nthe average reactive power flow=pu\",abs(vs),a,round(q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_9 pgno:1199" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the complex power=+jpu\n", + " the real power P=pu\n", + "the reactive powers=pu 1.078 0.5697\n" + ] + } + ], + "source": [ + "\n", + "v=1;\n", + "from math import cos,sin,pi\n", + "i=1.188*complex(cos(-28.6*pi/180),sin(-28.6*pi/180));\n", + "s=v*complex(cos(-28.6*pi/180),-sin(-28.6*pi/180));\n", + "p=(s.real)+0.2;\n", + "q=((s.imag))+0.091;\n", + "print\"the complex power=+jpu\\n the real power P=pu\\nthe reactive powers=pu\",round(p,3),round(q,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_12 pgno:1208" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the voltage =+()jV 0.9738624 -0.0517056\n" + ] + } + ], + "source": [ + "v21=1;\n", + "v22=complex(.983664,-.032316);\n", + "a=1.6;\n", + "v23=v21+a*(v22-v21);\n", + "print\"the voltage =+()jV\",(v23.real),(v23.imag)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_14 pgno:1215" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow per pole=MW\n", + "bipolar line flow=MW\n", + "the line loss per pole in bipolat line=MW\n", + "bipolar line loss=MW\n", + "reactive power flow through DC link=MW 500.0 1000.0 20.0 40.0 0\n" + ] + } + ], + "source": [ + "ud1=510.;\n", + "ud2=490.;\n", + "ud=(ud1+ud2)/2;\n", + "id=1;\n", + "p=ud*id;\n", + "b=2*p;\n", + "r=(ud1-ud2)/id;\n", + "pl=r;\n", + "pbl=2*pl;\n", + "pdr=ud1;\n", + "pdi=ud2;\n", + "pz=pdr-pdi;\n", + "print\"power flow per pole=MW\\nbipolar line flow=MW\\nthe line loss per pole in bipolat line=MW\\nbipolar line loss=MW\\nreactive power flow through DC link=MW\",p,b,pl,pbl,0\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_15 pgno:1216" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the sending end power=MW\n", + "power in middle=MW\n", + "DC sending end voltage=kV\n", + "recieving end DC voltage=kV\n", + "DC voltage in middle of line=kV\n", + "Line Resistance =ohm 1060.0 1030.0 1060.0 530.0 515.0 30.0\n" + ] + } + ], + "source": [ + "pdi=1000.;\n", + "pdl=60.;\n", + "ud=1.;\n", + "pdr=pdi+pdl;\n", + "p=(pdr+pdi)/2;\n", + "id=pdi/ud;\n", + "pdc=pdr*1e3/id;\n", + "rec=pdc/2;\n", + "vdc=(rec+(pdi/2))/2;\n", + "udr=rec;\n", + "udi=pdi/2;\n", + "r=(udr-udi)*1e3/id;\n", + "print\"the sending end power=MW\\npower in middle=MW\\nDC sending end voltage=kV\\nrecieving end DC voltage=kV\\nDC voltage in middle of line=kV\\nLine Resistance =ohm\",pdr,p,pdc,rec,vdc,r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_16 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through 4th AC line=MW 1000.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=1000.;\n", + "pac=pg-(2*pdc);\n", + "pac1=1000.;\n", + "pac2=1000.;\n", + "pac3=1000.;\n", + "pac4=pac-pac1-pac2-pac3;\n", + "print\"power flow through 4th AC line=MW\",pac4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_17 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through AC line=MW 500.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=4000.;\n", + "pac=pg-pdc;\n", + "pow=pac/4;\n", + "print\"power flow through AC line=MW\",pow\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb new file mode 100644 index 00000000..567b5d06 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_57_Power_Flow_Calculations_2.ipynb @@ -0,0 +1,489 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 57 Power Flow Calculations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_1 pgno:1187" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the branch current I=/_A\n", + "the Branch Admittance=+()j mho 20.0 -0.927295218002 0.12 -0.16\n" + ] + } + ], + "source": [ + "from math import atan\n", + "v=100;\n", + "z=complex(3,4)\n", + "i=v/z;\n", + "y=1/z;\n", + "ia=atan(i.imag/i.real);\n", + "print\"the branch current I=/_A\\nthe Branch Admittance=+()j mho\",abs(i),ia,y.real,y.imag\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_2 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the impedence=mho 0.2\n" + ] + } + ], + "source": [ + "z=complex(3,4)\n", + "y=1/z;\n", + "print\"the impedence=mho\",abs(y)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_4 pgno:1194" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "used value in iteration\titeration number\tresulting value of V2\n", + "(1+0j)\n", + "\t\t\t\t\t\t(0.962-0.05j)\n", + "(0.962-0.05j)\n", + "\t\t\t\t\t\t(0.957911-0.049787j)\n", + "(0.9527-0.497j)\n", + "\t\t\t\t\t\t(0.957732-0.05j)\n", + "(0.9577-0.05j)\n", + "\t\t\t\t\t\t(0.957713-0.049999j)\n" + ] + } + ], + "source": [ + "v1=1;\n", + "z=complex(.05,.02);\n", + "s=complex(1,-.6);\n", + "c=.000005;\n", + "#v[2,1]=1;\n", + "print\"used value in iteration\\titeration number\\tresulting value of V2\"\n", + "import numpy\n", + "v1=numpy.array([complex(1,0), complex(0.962,-0.05), complex(0.9527,-0.497), complex(0.9577,-0.05), complex(0.9577,-0.049999)])\n", + "v2=numpy.array([complex(0.962000,(-0.050000)), complex(0.957911,(-0.049787)), complex(0.957732,(-0.050000)), complex(0.957713,(-0.049999)), complex(0.957712,(-0.050000))])\n", + "for i in range(0,4):\n", + "\tprint v1[i]\n", + "\tprint \"\\t\\t\\t\\t\\t\\t\",v2[i]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_5 pgno:1197" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the power angle=/_ degrees 0.523598775598\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1;\n", + "vr=1;\n", + "p=10;\n", + "from math import asin\n", + "d=asin(p*x);\n", + "print\"the power angle=/_ degrees\",d\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_6 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 5.36\n" + ] + } + ], + "source": [ + "x=.05;\n", + "vs=1.;\n", + "vr=1.;\n", + "p=10.;\n", + "from math import asin,cos\n", + "d=asin(p*x);\n", + "qs=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qs=round(qs*100)/100;\n", + "qR=(vs**2/x)-(vs*vr*cos(d)/x);\n", + "qR=round(qR*100)/100;\n", + "q=(qs+qR);\n", + "print p,q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_7 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "active power flow=pu -19.7606324819\n" + ] + } + ], + "source": [ + "\n", + "x=.05;\n", + "d=30;\n", + "vs=1;\n", + "vr=1;\n", + "from math import sin\n", + "p=vs*vr*sin(d)/x;\n", + "print\"active power flow=pu\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_8 pgno:1198" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sending end voltage=/_V\n", + "the average reactive power flow=pu 0.965865415055 0.0621604788211 -0.66\n" + ] + } + ], + "source": [ + "z=complex(0,.06)\n", + "i=complex(1,.6)\n", + "from math import atan\n", + "vr=1;\n", + "vs=vr+(i*z);\n", + "q=.5*((abs(vs))**2-(abs(vr))**2)/abs(z);\n", + "q=q-.1;\n", + "a=atan((vs.imag)/(vs.real))\n", + "print\"sending end voltage=/_V\\nthe average reactive power flow=pu\",abs(vs),a,round(q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_9 pgno:1199" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the complex power=+jpu\n", + " the real power P=pu\n", + "the reactive powers=pu 1.078 0.5697\n" + ] + } + ], + "source": [ + "\n", + "v=1;\n", + "from math import cos,sin,pi\n", + "i=1.188*complex(cos(-28.6*pi/180),sin(-28.6*pi/180));\n", + "s=v*complex(cos(-28.6*pi/180),-sin(-28.6*pi/180));\n", + "p=(s.real)+0.2;\n", + "q=((s.imag))+0.091;\n", + "print\"the complex power=+jpu\\n the real power P=pu\\nthe reactive powers=pu\",round(p,3),round(q,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_12 pgno:1208" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the voltage =+()jV 0.9738624 -0.0517056\n" + ] + } + ], + "source": [ + "v21=1;\n", + "v22=complex(.983664,-.032316);\n", + "a=1.6;\n", + "v23=v21+a*(v22-v21);\n", + "print\"the voltage =+()jV\",(v23.real),(v23.imag)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_14 pgno:1215" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow per pole=MW\n", + "bipolar line flow=MW\n", + "the line loss per pole in bipolat line=MW\n", + "bipolar line loss=MW\n", + "reactive power flow through DC link=MW 500.0 1000.0 20.0 40.0 0\n" + ] + } + ], + "source": [ + "ud1=510.;\n", + "ud2=490.;\n", + "ud=(ud1+ud2)/2;\n", + "id=1;\n", + "p=ud*id;\n", + "b=2*p;\n", + "r=(ud1-ud2)/id;\n", + "pl=r;\n", + "pbl=2*pl;\n", + "pdr=ud1;\n", + "pdi=ud2;\n", + "pz=pdr-pdi;\n", + "print\"power flow per pole=MW\\nbipolar line flow=MW\\nthe line loss per pole in bipolat line=MW\\nbipolar line loss=MW\\nreactive power flow through DC link=MW\",p,b,pl,pbl,0\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_15 pgno:1216" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the sending end power=MW\n", + "power in middle=MW\n", + "DC sending end voltage=kV\n", + "recieving end DC voltage=kV\n", + "DC voltage in middle of line=kV\n", + "Line Resistance =ohm 1060.0 1030.0 1060.0 530.0 515.0 30.0\n" + ] + } + ], + "source": [ + "pdi=1000.;\n", + "pdl=60.;\n", + "ud=1.;\n", + "pdr=pdi+pdl;\n", + "p=(pdr+pdi)/2;\n", + "id=pdi/ud;\n", + "pdc=pdr*1e3/id;\n", + "rec=pdc/2;\n", + "vdc=(rec+(pdi/2))/2;\n", + "udr=rec;\n", + "udi=pdi/2;\n", + "r=(udr-udi)*1e3/id;\n", + "print\"the sending end power=MW\\npower in middle=MW\\nDC sending end voltage=kV\\nrecieving end DC voltage=kV\\nDC voltage in middle of line=kV\\nLine Resistance =ohm\",pdr,p,pdc,rec,vdc,r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_16 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through 4th AC line=MW 1000.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=1000.;\n", + "pac=pg-(2*pdc);\n", + "pac1=1000.;\n", + "pac2=1000.;\n", + "pac3=1000.;\n", + "pac4=pac-pac1-pac2-pac3;\n", + "print\"power flow through 4th AC line=MW\",pac4\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 57_17 pgno:1219" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power flow through AC line=MW 500.0\n" + ] + } + ], + "source": [ + "pg=6000.;\n", + "pdc=4000.;\n", + "pac=pg-pdc;\n", + "pow=pac/4;\n", + "print\"power flow through AC line=MW\",pow\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear.ipynb new file mode 100755 index 00000000..80701a42 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear.ipynb @@ -0,0 +1,74 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 58 Applications of Switchgear" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 58_1 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the overcurrent factor= 12.5\n" + ] + } + ], + "source": [ + "g=15.;\n", + "p=10.;\n", + "o=8.;\n", + "d=1.;\n", + "c=3.;\n", + "y=o+d+c;\n", + "oc=g*p/y;\n", + "print\"the overcurrent factor=\",oc\n" + ] + }, + { + "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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb new file mode 100644 index 00000000..d1f2d4d1 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_1.ipynb @@ -0,0 +1,65 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 58 Applications of Switchgear" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 58_1 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the overcurrent factor= 12.5\n" + ] + } + ], + "source": [ + "g=15.;\n", + "p=10.;\n", + "o=8.;\n", + "d=1.;\n", + "c=3.;\n", + "y=o+d+c;\n", + "oc=g*p/y;\n", + "print\"the overcurrent factor=\",oc\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb new file mode 100644 index 00000000..d1f2d4d1 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/Chapter_58_Applications_of_Switchgear_2.ipynb @@ -0,0 +1,65 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 58 Applications of Switchgear" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 58_1 pgno:159" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the overcurrent factor= 12.5\n" + ] + } + ], + "source": [ + "g=15.;\n", + "p=10.;\n", + "o=8.;\n", + "d=1.;\n", + "c=3.;\n", + "y=o+d+c;\n", + "oc=g*p/y;\n", + "print\"the overcurrent factor=\",oc\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/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt new file mode 100644 index 00000000..c0cc4050 --- /dev/null +++ b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/README.txt @@ -0,0 +1,10 @@ +Contributed By: vijaya durga +Course: others +College/Institute/Organization: Manchukonda Srinivasa Rao &co +Department/Designation: Special Telugu +Book Title: Switchgear Protection And Power Systems +Author: S. S. Rao +Publisher: Khanna Publisher, New Delhi +Year of publication: 2012 +Isbn: 8174092323 +Edition: 13 \ No newline at end of file diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png new file mode 100644 index 00000000..217570a6 Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22.png differ diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png new file mode 100644 index 00000000..217570a6 Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_22_1.png differ diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png new file mode 100644 index 00000000..2bef312d Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33.png differ diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png new file mode 100644 index 00000000..2bef312d Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_33_1.png differ diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png new file mode 100644 index 00000000..868b959e Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44.png differ diff --git a/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png new file mode 100644 index 00000000..868b959e Binary files /dev/null and b/Switchgear_Protection_And_Power_Systems_by_S._S._Rao/screenshots/Cha_44_1.png differ diff --git a/Thermal_Engineering_by_K_K_Ramalingam/README.txt b/Thermal_Engineering_by_K_K_Ramalingam/README.txt new file mode 100644 index 00000000..c6266e0d --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/README.txt @@ -0,0 +1,10 @@ +Contributed By: Gopi Krishna Manchukonda +Course: btech +College/Institute/Organization: Koneru Lakshmiah University +Department/Designation: Electronics and communication +Book Title: Thermal Engineering +Author: K K Ramalingam +Publisher: Scitech Publications, Chennai +Year of publication: 2009 +Isbn: 9788183711982 +Edition: 1 \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power/screenshots/ch1.png b/Thermodynamics_and_Heat_Power/screenshots/ch1.png new file mode 100755 index 00000000..af1e377a Binary files /dev/null and b/Thermodynamics_and_Heat_Power/screenshots/ch1.png differ diff --git a/Thermodynamics_and_Heat_Power/screenshots/ch11.png b/Thermodynamics_and_Heat_Power/screenshots/ch11.png new file mode 100755 index 00000000..c0062cd1 Binary files /dev/null and b/Thermodynamics_and_Heat_Power/screenshots/ch11.png differ diff --git a/Thermodynamics_and_Heat_Power/screenshots/ch3.png b/Thermodynamics_and_Heat_Power/screenshots/ch3.png new file mode 100755 index 00000000..57a5dc36 Binary files /dev/null and b/Thermodynamics_and_Heat_Power/screenshots/ch3.png differ diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1.ipynb new file mode 100755 index 00000000..ce79dd48 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1.ipynb @@ -0,0 +1,394 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cda743da280474e0339734ce945527afbcb8983c5386e8ae01ef3be6064b84d0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Fundamental Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#C = (5/9)*(F-32);\n", + "#F = 32+(9*C/5);\n", + "#Letting C = F in equation;\n", + "#F = (5/9)*(F-32);\n", + "#Therefore\n", + "F = -160/4; \t\t\t#fahrenheit\n", + "\n", + "# Results\n", + "print \"Both fahrenheit and celsius temperature scales indicate same temperature at %.2f\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both fahrenheit and celsius temperature scales indicate same temperature at -40.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Mm = 0.0123\t\t\t#Unit:lb \t\t\t#Mass of the moon;\n", + "Me = 1 \t \t\t#Unit:lb \t\t\t#Mass of the earth;\n", + "Dm = 0.273 \t\t\t#Unit:feet \t\t\t#Diameter of the moon;\n", + "De = 1. \t \t\t#Unit:feet \t\t\t#Diameter of the earth;\n", + "Rm = Dm/2; \t\t\t#Radius of the moon; \t\t\t#Unit:feet\n", + "Re = De/2; \t\t\t#Radius of the earth; \t\t\t#Unit:feet\n", + "\n", + "#F = (K*M1*M2)/d**2 \t\t\t#Law of universal gravitation;\n", + "#Fe = (K*Me*m)/Re**2; \t\t\t#Fe = Force exerted on the mass;\n", + "#Fm = (K*Mm*m)/Rm**2; \t\t\t#Fm = Force exerted on the moon;\n", + "F = (Me/Mm)*(Rm/Re)**2; \t\t\t#F = Fe/Fm;\n", + "print \"Relation of force exerted on earth to mass is\"\n", + "print \"Fe/Fm = %.2f\"%F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relation of force exerted on earth to mass is\n", + "Fe/Fm = 6.06\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "M = 5; \t\t\t#Unit:kg \t\t\t#mass of body;\n", + "g = 9.81; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "# Calculations\n", + "W = M*g; \t\t\t#W = the weight of the body \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n", + "\n", + "# Results\n", + "print \"The weight of the body is %.2f N\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The weight of the body is 49.05 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Solution for a\";\n", + "#given\n", + "M = 10. \t\t\t#Unit:kg \t\t\t#mass of body;\n", + "g = 9.5 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "W = M*g; \t\t\t#W = the weight of the body; \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n", + "print \"The weight of the body is %.2f N\"%(W);\n", + "\n", + "print \"Solution for b\";\n", + "#Given\n", + "F = 10; \t\t\t#Unit:Newton \t\t\t#Horizontal Force\n", + "a = F/M; \t\t\t\t\t\t#\t\t\t#newton's second law of motion\n", + "print \"The horizontal acceleration of the body is %.2f m/s**2\"%(a);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The weight of the body is 95.00 N\n", + "Solution for b\n", + "The horizontal acceleration of the body is 1.00 m/s**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Conversion Problem\n", + "# 1 inch = 0.0254 meter so, 1 = 0.0254 meter/inch \t\t\t#Eq.1\n", + "# 1 ft = 12 inch so, 1 = 12 inch/ft.........\t\t\t#Eq.2\n", + "#Multiplying Eq.1 & Eq.2 \t\t\t# We get 1 = 0.0254*12 meter/ft\n", + "#Taking Square both side\n", + "#1**2 = (0.0254*12)**2 meter**2/ft**2\n", + "print \"1 ft**2 = %.2f meter**2\"%((0.0254*12)**2); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 ft**2 = 0.09 meter**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The Specific gravity of mercury is 13.6 \t\t\t#Given\n", + "#Converting the unit of weight of grams per cubic centimeter to pounds per cubic foot\n", + "# 1 lbf = 454 gram \t\t\t#1 inch = 2.54 cm\n", + "#So 1 gram = 1/454 lbf and 1 ft = 12*2.54 cm\n", + "#Gamma = (gram/cm**3)*(lb/gram)*(cm**3/ft**3) = lb/ft**3\n", + "#Gamma = (1 gram/cm**3)*(1 lbf/454 gram)*(2.54*12)**3 *cm**3/ft**3\n", + "Gamma = (1./454)*(2.54*12)**3; \t\t\t#lbf/ft**3 \t\t\t#conversion factor\n", + "print \"Conversion Factor = %.2f\"%Gamma\n", + "p = (1./12)*(Gamma*13.6); \t\t\t#lbf/ft**2 \t\t\t#gage pressure\n", + "p = (1./12)*Gamma*13.6*(1./144) \t\t\t#ft**2/inch**2 \t\t\t#gage pressure\n", + "print \"Guage Pressure is %.2f psi\"%(p);\n", + "print \"Local atmospheric pressure is 14.7 psia\";\n", + "P = p+14.7; \t\t\t#Pressure on the base of the column \t\t\t#Unit:psia\n", + "print \" So Pressure on the base of the column is %.2f psia\"%(P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Conversion Factor = 62.37\n", + "Guage Pressure is 0.49 psi\n", + "Local atmospheric pressure is 14.7 psia\n", + " So Pressure on the base of the column is 15.19 psia\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rho = 13.595; \t\t\t#Unit: kg/m**3 \t\t\t#The density of mercury\n", + "h = 25.4; \t\t\t#Unit: mm \t\t\t#Height of column of mercury\n", + "g = 9.806; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "#Solution\n", + "p = Rho*g*h; \t\t\t#P = Pressure at the base of a column of mercury \t\t\t#Unit:Pa\n", + "\n", + "# Results\n", + "print \"Pressure at the base of a column of mercury is %.2f Pa\"%(p);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the base of a column of mercury is 3386.14 Pa\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Patm = 30.0; \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n", + "Vacuum = 26.5; \t\t\t#in. \t\t\t#vaccum pressure\n", + "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n", + "# 1 inch mercury exerts a pressure of 0.491 psi\n", + "p = Pabs*0.491; \t\t\t#Absolute pressure in psia\n", + "\n", + "# Results\n", + "print \"Absolute pressure of mercury in is %.2f psia\"%(p);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure of mercury in is 1.72 psia\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Rho = 2000; \t\t\t#Unit: kg/m**3 \t\t\t#The density of fluid\n", + "h = -10; \t\t\t#Unit: mm \t\t\t#Height of column of fluid \t\t\t#the height is negative because it is measured up from the base\n", + "g = 9.6 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n", + "\n", + "#Solution\n", + "p = -Rho*g*h; \t\t\t#P = Pressure at the base of a column of fluid \t\t\t#Unit:Pa\n", + "\n", + "# Results\n", + "print \"Pressure at the base of a column of fluid is %.2f Pa\"%(p);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the base of a column of fluid is 192000.00 Pa\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Patm = 30.0 \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n", + "Vacuum = 26.5 \t\t\t#in. \t\t\t#vaccum pressure\n", + "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n", + "\n", + "# (3.5 inch* (ft/12 inch) * (13.6*62.4)LBf/ft**3 * kg/2.2 LBf * 9.806 N/kg)/((12 inch**2/ft**2) * (0.0254 m/inch)**2)\n", + "p = (3.5*(1./12)*13.6*62.4*(1/2.2)*9.806)/(12**2*0.0254**2*1000); \t\t\t#kPa \t\t\t#Absolute pressure in psia\n", + "\n", + "# Results\n", + "print \"Absolute pressure of mercury is %.2f kPa\"%(p)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure of mercury is 11.88 kPa\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10.ipynb new file mode 100755 index 00000000..f8773533 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10.ipynb @@ -0,0 +1,764 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38fecb717f7301f2acbeee2d6d75b403df05582c118249b8457f6d44d1158c19" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Refrigeration" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 503" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n", + "WbyJ = Qremoved/COP; \t\t\t#The power required \t\t\t#Unit:Btu/min\n", + "print \"The power required is %.2f Btu/min\"%(WbyJ);\n", + "print \"Solution for c\"\n", + "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n", + "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 12.00\n", + "Solution for b\n", + "The power required is 83.00 Btu/min\n", + "Solution for c\n", + "The rate of heat rejected to the room is 1083.00 Btu/min\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 20+273; \t\t\t#20C = 20+273 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = -5+273; \t\t\t#-5C = -5+273 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "Qremoved = 30; \t\t\t#Unit:kW \t\t\t#heat removal \n", + "W = Qremoved/COP; \t\t\t#power required \t\t\t#unit:kW\n", + "print \"The power required is %.2f kW \"%(W);\n", + "print \"Solution for c\"\n", + "Qrej = Qremoved+W; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:kW\n", + "print \"The rate of heat rejected to the room is %.2f kW\"%(Qrej);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 10.00\n", + "Solution for b\n", + "The power required is 3.00 kW \n", + "Solution for c\n", + "The rate of heat rejected to the room is 33.00 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 505" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 20+460; \t\t\t#20F = 20+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "print \"Solution for a\"\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n", + "COPactual = 2; \t\t\t#Actual Coefficient of performance(COP) is stated to be 2\n", + "HPperTORactual = 4.717/COPactual; \t\t\t#Horsepower per ton of refrigeration(actual) \t\t\t#Unit:hp/ton\n", + "print \"The horsepower required by the actual cycle over the minimum is %.2f hp/ton\"%(HPperTORactual-HPperTOR);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performanceCOP) of the cycle is 9.00\n", + "Solution for b\n", + "The horsepower required by the actual cycle over the minimum is 1.83 hp/ton\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "COP = 4.5; \t\t\t#Coefficient of performance \t\t\t#From problem 10.1\n", + "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#From problem 10.1\n", + "#1000 Btu/min /200 Btu/min ton = 5 tons of refrigeration\n", + "HPrequired = HPperTOR*5; \t\t\t#The horsepower required \t\t\t#unit:hp\n", + "print \"The horsepower required is %.2f hp\"%(HPrequired);\n", + "#In problem 10.1, 77.2 Btu/min was required\n", + "print \"The power required is %.2f hp\"%(77.2*778*inv(33000)); \t\t\t#1 Btu = 778 ft*lbf \t\t\t#1 min*hp = 33000 ft*lbf\n", + "#The ratio of the power required in each problem is the same as the inverse ratio of the COP value\n", + "#Therefore,\n", + "print \"The power required is %.2f hp\"%((COP/12.95)*HPrequired); \t\t\t#COPin problem 10.1) = 12.95\n", + "print \"This checks our results\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horsepower required is 5.24 hp\n" + ] + }, + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The horsepower required is %.2f hp\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mHPrequired\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;31m#In problem 10.1, 77.2 Btu/min was required\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The power required is %.2f hp\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m77.2\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;36m778\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m33000\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#1 Btu = 778 ft*lbf #1 min*hp = 33000 ft*lbf\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 10\u001b[0m \u001b[0;31m#The ratio of the power required in each problem is the same as the inverse ratio of the COP value\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;31m#Therefore,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "COP = 10.72; \t\t\t#In the problem 10.2 \t\t\t#Coefficient of performance\n", + "P = 2.8; \t\t\t#In the problem 10.2 \t\t\t#The power was 2.8 kW\n", + "COPactual = 3.8; \t\t\t#Actual Coefficient of performance(COP)\n", + "\n", + "# calculation\n", + "power = P*COP/COPactual; \t\t\t#The power required \t\t\t#unit:kW\n", + "\n", + "# results\n", + "print \"The power required is %.2f kW\"%(power)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The power required is 7.90 kW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 509" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,at 120psia,the corresponding saturation temperature is 66 F, enthalpies are\n", + "h1 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 602.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,h4 is found at 15 psia,\n", + "s3 = 1.3938; \t\t\t#s = entropy \t\t\t#Unit:Btu/(lbm*F)\n", + "#Therefore by interpolation in the superheat tables at 120 psia,\n", + "t4 = 237.4; \t\t\t#Unit:fahrenheit \t\t\t#temperature\n", + "h4 = 733.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"Solution for a\"\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performance is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n", + "print \"Solution for c\"\n", + "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"Solution for d\"\n", + "tons = 30; \t\t\t#capacity of 30 tons is desired\n", + "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/(h3-h1));\n", + "print \"Solution for e\"\n", + "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1));\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performance is 3.71\n", + "Solution for b\n", + "The work of compression is 131.00 Btu/lbm\n", + "Solution for c\n", + "The refrigatering effect is 486.40 Btu/lbm\n", + "Solution for d\n", + "The pounds per minute of ammonia required for ciculation is 12.34 lbm/min\n", + "Solution for e\n", + "The ideal horsepower per ton of refrigeration is 5.87 hp/ton\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 510" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,110 psig corresponds to 96 F, enthalpies are\n", + "h1 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 75.110; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,at -20F,\n", + "s3 = 0.17102; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "#Therefore by interpolation in the Freon-12 superheat table at these values,\n", + "h4 = 89.293; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"Solution for a\"\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performance is %.2f\"%(COP);\n", + "print \"Solution for b\"\n", + "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n", + "print \"Solution for c\"\n", + "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"Solution for d\";\n", + "tons = 30; \t\t\t#capacity of 30 tons is desired\n", + "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/h3-h1);\n", + "print \"Solution for e\"\n", + "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Coefficient of performance is 3.17\n", + "Solution for b\n", + "The work of compression is 14.18 Btu/lbm\n", + "Solution for c\n", + "The refrigatering effect is 44.97 Btu/lbm\n", + "Solution for d\n", + "The pounds per minute of ammonia required for ciculation is 49.74 lbm/min\n", + "Solution for e\n", + "The ideal horsepower per ton of refrigeration is 7.70 hp/ton\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 517" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,Using the Freon-12 tables, enthalpies are\n", + "h1 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 78.335; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,\n", + "s3 = 0.16798; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "#Therefore by interpolation in the superheat tables at 90 F,\n", + "s = 0.16798; \t\t\t#entropy at 90F \t\t\t#Btu/lbm*F\n", + "h4 = 87.192; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat extracted is 49.62 Btu/lbm\n", + "The work required is 8.86 Btu/lbm\n", + "The Coefficient of performanceCOP) of this ideal cycle is 5.60\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Appendix 3,Using the HFC-134a tables, enthalpies are\n", + "h1 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n", + "h3 = 104.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "#From the consideration that s3 = s4,\n", + "s3 = 0.2244; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n", + "h4 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n", + "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n", + "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n", + "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat extracted is 63.00 Btu/lbm\n", + "The work required is 11.40 Btu/lbm\n", + "The Coefficient of performanceCOP) of this ideal cycle is 5.53\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 Page No : 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#By defination,the efficiency of the compressor is the ratio of the ideal compression work to actual compression work.\n", + "#Based on the points on fig.10.12, \t\t\t#n = (h4-h3)/(h4'-h3);\n", + "#There is close correspondence between 5.3 psia and -60F for saturated conditions.Therefore,state 3 is a superheated vapour at 5.3 psia and approximately -20F,because the problem states\n", + "#that state 3 has a 40F superheat.Interpolation in the Freon tables in Appendix 3 yields\n", + "T = -20; \t\t\t#Unit:F \t\t\t#temperature\n", + "# p h s\n", + "#7.5 75.719 0.18371\n", + "#5.3 76.885 0.18985 h3 = 75.886 Btu/lbm\n", + "#5.0 75.990 0.19069\n", + "\n", + "#At 100 psia and s = 0.18985,\n", + "# t s h\n", + "# 170F 0.18996 100.571\n", + "# 169.6F 0.18985 100.5 h4 = 100.5 Btu/lbm\n", + "# 160F 0.18726 98.884\n", + "\n", + "#The weight of refrigerant is given by\n", + "# 200(tons)/(h3-h1) = (200*5)/(75.886-h1)\n", + "#In the saturated tables,h1 is\n", + "# p h \n", + "# 101.86 26.832\n", + "# 100psia 26.542\n", + "# 98.87 26.365\n", + "\n", + "#m = mass flow/min\n", + "h1 = 26.542; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "n = 0.8; \t\t\t#Efficiency\n", + "h4 = 100.5; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "h3 = 75.886; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "m = (200*5)/(75.886-h1); \t\t\t#mass\n", + "h4dashminush3 = (h4-h3)/n; \n", + "#Total work of compression = m*(h4minush3)\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "work = (h4dashminush3*m*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#Unit:hp \t\t\t#work\n", + "print \"%.2f horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\"%(work);\n", + "\n", + "print \"Solution for b\";\n", + "#Assuming a specific heat of the water as unity,we obtain\n", + "#From part (a),\n", + "#h4'-h3 = h4minush3\n", + "h4dash = h4dashminush3+h3; \t\t\t#Unit:Btu/lbm\n", + "mdot = (m*(h4dash-h1))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n", + "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "14.70 horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\n", + "Solution for b\n", + "162.35 lbm/min of cooling water i.e. 19.56 gal/min is the required capacity of cooling water to pump\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.11 Page No : 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#From appendix3,reading the p-h diagram directly,we have\n", + "h3 = 76.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "h4 = 100.5; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "n = 0.8; \t\t\t#Efficiency \t\t\t#From 10.10\n", + "work = (h4-h3)/n; \t\t\t#Work of compression \t\t\t#Unit:Btu/lbm\n", + "#The enthalpy of saturated liquid at 100 psia is given at 26.1 Btu/lbm.Proceeding as before yields\n", + "m = (200*5)/(h3-26.1); \t\t\t#Unit:lbm/min \t\t\t#m = massflow/min\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "totalwork = (m*work*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#total ideal work \t\t\t#unit:hp\n", + "print \"Total ideal work of compression is %.2f hp\"%(totalwork);\n", + "\n", + "print \"Solution for b\";\n", + "h4dash = h3+work; \t\t\t#Btu/lbm\n", + "mdot = (m*(h4dash-26.5))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n", + "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Total ideal work of compression is 14.29 hp\n", + "Solution for b\n", + "159.83 lbm/min of cooling water i.e. 19.26 gal/min is the required capacity of cooling water to pump\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 Page No : 526" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "COP = 2.5; \t\t\t#Coefficient of performance\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "T1 = -100+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#lowest temperature of the cycle\n", + "T3 = 150+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#Upper temperature of the cycle\n", + "#T1/T4-T1 = COP\n", + "T4 = (3.5*T1)/COP; \t\t\t#Unit:R \t\t\t#temperature at point 4\n", + "#T2/T3-T2 = COP\n", + "T2 = (COP*T3)/3.5; \t\t\t#Unit:R \t\t\t#temperature at point 2\n", + "print \"The work of the expander is %.2f Btu/lbm of air\"%(cp*T4-T1);\n", + "print \"The work of the compressor is %.2f Btu/lbm of air\"%(cp*T3-T2);\n", + "print \"The net work required by the cycle is %.2f Btu/lbm\"%(((cp*T3-T2))-cp*(T4-T1));\n", + "print \"Per ton of refrigeration, the required airflow is %.2f lbm/min per ton\"%((200/cp*T2-T1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work of the expander is -239.04 Btu/lbm of air\n", + "The work of the compressor is -289.31 Btu/lbm of air\n", + "The net work required by the cycle is -323.87 Btu/lbm\n", + "Per ton of refrigeration, the required airflow is 362735.24 lbm/min per ton\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.13 Page No : 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#A VACUUM REFRIGERATION SYSTEM \n", + "#A vacuum refrigeration system is used to cool water from 90F to 45F\n", + "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "m1 = 1; \t\t\t#mass \t\t\t#unit:lbm\n", + "#m2 = 1-m3 \t\t\t#unit:lbm\n", + "#Now, m1*h1 = m2*h2 + m3*h3\n", + "#Putting the values and arranging the equation,\n", + "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n", + "\n", + "# results\n", + "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.14 Page No : 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#In problem 10.13,\n", + "#A VACUUM REFRIGERATION SYSTEM \n", + "#A vacuum refrigeration system is used to cool water from 90F to 45F\n", + "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "m1 = 1; \t\t\t#mass \t\t\t#lbm\n", + "#m2 = 1-m3 \t\t\t#unit:lbm\n", + "#Now, m1*h1 = m2*h2 + m3*h3\n", + "#Putting the values and arranging the equation,\n", + "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n", + "m2 = 1-m3; \t\t\t#mass \t\t\t#unit:lbm\n", + "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n", + "#Now,in problem 10.14,\n", + "#The refrigeration effect can be determined as m3*(h3-h1) or m2*(h1-h2)\n", + "print \"The refrigeration effect Using eqn m3*h3-h1) is %.2f Btu/lbm\"%(m3*h3-h1)\n", + "print \"The refrigeration effect Using eqn m2*h1-h2) is %.2f Btu/lbm\"%(m2*h1-h2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n", + "The refrigeration effect Using eqn m3*h3-h1) is -13.58 Btu/lbm\n", + "The refrigeration effect Using eqn m2*h1-h2) is 42.64 Btu/lbm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.15 Page No : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#THE HEAT PUMP\n", + "T1 = 70.+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R) \t\t\t#from problem 10.1\n", + "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R) \t\t\t#from problem 10.1\n", + "COP = T1/(T1-T2); \t\t\t#Coefficient of performance for carnot heat pump\n", + "print \"Coefficient of performanceCOP) of the carnot cycle is %.2f\"%(COP);\n", + "print \"The COP can also be obtained from the energy items solved for in problem 10.1\"\n", + "#In problem 10.1, The power was found to be 77.2 Btu/min and the total tare of heat rejection was 1077.2 Btu/min\n", + "#Therefore,\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(1077.2/77.2); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of performanceCOP) of the carnot cycle is 13.95\n", + "The COP can also be obtained from the energy items solved for in problem 10.1\n", + "Coefficient of performanceCOP) of the cycle is 13.95\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.16 Page No : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Let us first consider the cycle as a refrigeration cycle\n", + "#In problem 10.1\n", + "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n", + "T2 = 0+460; \t\t\t#0F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n", + "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n", + "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n", + "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n", + "WbyJ = Qremoved/COP; \t\t\t#the power input \t\t\t#unit:Btu/min\n", + "print \"The power input is %.2f Btu/min\"%(WbyJ);\n", + "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n", + "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n", + "print \"The COP as a heat pump is %.2f\"%(Qrej/WbyJ);\n", + "print \"As a check, COP of heat pump is %.2f = 1 + COP of carnot cycle %.2f\"%(Qrej/WbyJ,COP);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of performanceCOP) of the cycle is 6.00\n", + "The power input is 166.00 Btu/min\n", + "The rate of heat rejected to the room is 1166.00 Btu/min\n", + "The COP as a heat pump is 7.00\n", + "As a check, COP of heat pump is 7.00 = 1 + COP of carnot cycle 6.00\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11.ipynb new file mode 100755 index 00000000..29d313df --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11.ipynb @@ -0,0 +1,1393 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d10825ccf780d7b9dd6f0979cda70f9979b8ea3e2abff5213aeeebe6b59e3bbc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Heat Transfer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# given data\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "T1 = 150; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n", + "\n", + "# calculations\n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n", + "\n", + "# results\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "deltaX = 0.150; \t\t\t#Given,150 mm = 0.150 meter \t\t\t# \t\t\t#deltaX = length \t\t\t#Unit:meter\n", + "k = 0.692; \t\t\t#Unit:W/(m*celcius) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \n", + "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#celcius\n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#celcius\n", + "\n", + "# calculations\n", + "deltaT = T2-T1; \t\t\t#celcius \t\t\t#change in temperature\n", + "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#unit:W/m**2\n", + "\n", + "# results\n", + "print \"Heat transfer per square foot of wall is %.2f W/m**2\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer per square foot of wall is 184.53 W/m**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 556" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From example 11.1,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet \n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "\n", + "Rt = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "\n", + "#Q = deltaT/Rt \t\t\t#Q = heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "#i = deltaE/Re \t\t\t#i = current in amperes \t\t\t#deltaE = The potential difference \t\t\t#Re = the electrical resistance \t\t\t#ohm's law\n", + "# Q/i = (deltaT/Rt)*(deltaE/Re)\n", + "#Q/i = 100; \t\t\t#Given \t\t\t# 1 A correspond to 100 Btu/(hr*ft**2)\n", + "deltaE = 9.; \t\t\t#Unit:Volt \t\t\t#potential difference\n", + "T1 = 150.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Re = (100*deltaE*Rt)/deltaT; \t\t\t#Unit:Ohms \t\t\t#The electrical resistance needed\n", + "print \"The electrical resistance needed is %.2f ohms\"%(abs(Re));\n", + "i = deltaE/Re; \t\t\t#current \t\t\t#Unit:amperes\n", + "Q = 100*i; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electrical resistance needed is 16.07 ohms\n", + "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Brick,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1.; \t\t\t#area \t\t\t#unit:ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R3 = R;\n", + "\n", + "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n", + "T1 = 70.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2); \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "The overall resistance is 1.44 hr*F)/Btu\n", + "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"In problem 11.4\"\n", + "#From example 11.4,,,\n", + "#For Brick,\n", + "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#unit:ft**2\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 1; \t\t\t#area \t\t\t#ft**2\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n", + "R3 = R;\n", + "\n", + "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n", + "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n", + "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n", + "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2);\n", + "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n", + "\n", + "print \"Now in problem 11.5\"\n", + "deltaT = R*Q \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature \t\t\t#fahrenheit\n", + "#For Brick,\n", + "deltaT = Q*R1; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t1 = deltaT;\n", + "#For Concrete,\n", + "deltaT = Q*R2; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t2 = deltaT;\n", + "#For plaster,\n", + "deltaT = Q*R3; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n", + "t3 = deltaT;\n", + "\n", + "deltaTo = t1+t2+t3; \t\t\t#Overall Change in temperature \t\t\t#fahrenheit\n", + "print \"The overall change in temperature is %.2f F\"%(abs(deltaTo));\n", + "#The interface temperature are:\n", + "print \"The interface temperature are:\";\n", + "print \"For brick-concrete : %.2f fahrenheit\"%(abs(T2)+abs(t1));\n", + "print \"For concrete-plaster : %.2f fahrenheit\"%(abs(T2)+abs(t1)+abs(t2));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 11.4\n", + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "The overall resistance is 1.44 hr*F)/Btu\n", + "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n", + "Now in problem 11.5\n", + "The overall change in temperature is 40.00 F\n", + "The interface temperature are:\n", + "For brick-concrete : 64.70 fahrenheit\n", + "For concrete-plaster : 66.14 fahrenheit\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Brick,\n", + "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:m**2\n", + "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R3 = R;\n", + "\n", + "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:C/W\n", + "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n", + "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n", + "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n", + "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 0.22 Celcius/W\n", + "For Concrete\n", + "The resistance is 0.01 Celcius/W\n", + "For plaster\n", + "The resistance is 0.02 Celcius/W\n", + "The overall resistance is 0.25 Celcius/W\n", + "Heat transfer per square meter of wall is 80.47 W/m**2\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"In problem 11.6\"\n", + "#For Brick,\n", + "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For brick\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R1 = R;\n", + "\n", + "#For Concrete,\n", + "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R2 = R;\n", + "\n", + "#For plaster,\n", + "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n", + "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n", + "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n", + "print \"For plaster\"\n", + "print \"The resistance is %.2f Celcius/W\"%(R);\n", + "R3 = R;\n", + "\n", + "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance Celcius/W\n", + "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n", + "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n", + "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n", + "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2;\n", + "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n", + "\n", + "print \"Now in problem 11.5\"\n", + "#deltaT = R*Q \t\t\t#ohm's law (fourier's equation)\n", + "#For Brick,\n", + "deltaT = Q*R1; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t1 = deltaT;\n", + "#For Concrete,\n", + "deltaT = Q*R2; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t2 = deltaT;\n", + "#For plaster,\n", + "deltaT = Q*R3; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n", + "t3 = deltaT;\n", + "\n", + "deltaTo = t1+t2+t3; \t\t\t#The overall Change in temperature \t\t\t#Celcius\n", + "print \"The overall change in temperature is %.2f celcius\"%(abs(deltaTo));\n", + "#The interface temperature are:\n", + "print \"The interface temperature are:\";\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1));\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2));\n", + "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2)-abs(t3));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 11.6\n", + "For brick\n", + "The resistance is 0.22 Celcius/W\n", + "For Concrete\n", + "The resistance is 0.01 Celcius/W\n", + "For plaster\n", + "The resistance is 0.02 Celcius/W\n", + "The overall resistance is 0.25 Celcius/W\n", + "Heat transfer per square meter of wall is 80.47 W/m**2\n", + "Now in problem 11.5\n", + "The overall change in temperature is 20.00 celcius\n", + "The interface temperature are:\n", + "2.56 Celcius\n", + "1.86 Celcius\n", + "-0.00 Celcius\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2.; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.090; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "Rfir = deltaX/(k*A); \t\t\t#Resistance of fir \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For fir\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rfir);\n", + "\n", + "deltaX = 4/12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.065; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for pine \t\t\t#From the table\n", + "Rpine = deltaX/(k*A); \t\t\t#Resistance of pine \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For pine\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rpine);\n", + "\n", + "deltaX = 4/12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n", + "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n", + "k = 0.025; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for corkboard \t\t\t#From the table\n", + "Rcorkboard = deltaX/(k*A); \t\t\t#Resistance of corkboard \t\t\t#Unit:(hr*F)/Btu\n", + "print \"For corkboard\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(Rcorkboard);\n", + "\n", + "Roverall = inv(inv(Rfir)+inv(Rpine)+inv(Rcorkboard));\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(Roverall);\n", + "\n", + "T1 = 60.; \t\t\t#temperature maintained at one face \t\t\t#unit:fahrenheit\n", + "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#unit:fahrenheit\n", + "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "Qtotal = deltaT/Roverall; \t\t\t#Q = Total Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n", + "\n", + "#As a check,\n", + "Qfir = deltaT/Rfir; \t\t\t#Q = Fir Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of fir is %.2f Btu/hr\"%(abs(Qfir));\n", + "Qpine = deltaT/Rpine; \t\t\t#Q = Pine Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of pine is %.2f Btu/hr\"%(abs(Qpine));\n", + "Qcorkboard = deltaT/Rcorkboard; \t\t\t#Q = corkboard Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n", + "print \"Heat loss from the wall made of corkboard is %.2f Btu/hr\"%(abs(Qcorkboard));\n", + "Qtotal = Qfir+Qpine+Qcorkboard; \t\t\t#Total Heat loss from the wall \t\t\t#unit:Btu/hr\n", + "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For fir\n", + "The resistance is 0.26 hr*F)/Btu\n", + "For pine\n", + "The resistance is 0.00 hr*F)/Btu\n", + "For corkboard\n", + "The resistance is 0.00 hr*F)/Btu\n" + ] + }, + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The resistance is %.2f hr*F)/Btu\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRcorkboard\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 23\u001b[0;31m \u001b[0mRoverall\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRfir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRpine\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRcorkboard\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 24\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The overall resistance is %.2f hr*F)/Btu\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRoverall\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A bare steel pipe\n", + "ro = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "ri = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 120; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "k = 26 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "\n", + "# Calculations\n", + "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 635856.36 Btu/hr\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A bare steel pipe\n", + "ro = 90.; \t\t\t#Outside diameter \t\t\t#Unit:mm\n", + "ri = 75; \t\t\t#inside diameter \t\t\t#Unit:mm\n", + "Ti = 110; \t\t\t#Inside temperature \t\t\t#Unit:Celcius\n", + "To = 40; \t\t\t#Outside temperature \t\t\t#Unit:Celcius\n", + "L = 2; \t\t\t#Length \t\t\t#Unit:m\n", + "\n", + "# Calculations\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#Unit:Celcius\n", + "k = 45 \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:W\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f W\"%(Q);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 217111.28 W\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy.linalg import inv\n", + "\n", + "#From problem 11.9,\n", + "#A bare steel pipe\n", + "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n", + "k1 = [[26]]; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "ans1 = (inv(k1)*math.log(r2/r1));\n", + "\n", + "#Now,in problem 11.11,\n", + "#Mineral wool\n", + "r3 = 5.50; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "r2 = 3.50; \t\t\t#outside diameter \t\t\t#Unit:in.\n", + "To = 85; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "k2 = [[0.026]] \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "ans2 = (inv(k2)*math.log(r3/r2));\n", + "\n", + "Q = (2*math.pi*L*deltaT)/(ans1+ans2); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n", + "\n", + "# Results\n", + "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss from the pipe is 280.02 Btu/hr\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from numpy.linalg import inv\n", + "\n", + "#From problem 11.9,\n", + "#The bare pipe\n", + "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n", + "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n", + "Ti = 240.; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "L = 5.; \t\t\t#Length \t\t\t#Unit:ft\n", + "k = 26.; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Rpipe = math.log(r2/r1)/(2*math.pi*k*L); \t\t\t#the resistance of pipe \t\t\t#Unit:(hr*F)/Btu\n", + "print \"The resistance of pipe is %.5f hr*F)/Btu\"%(Rpipe);\n", + "\n", + "#Now,in problem 11.12,\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = (math.pi*r2)/12*L; \t\t\t#Area \t\t\t#Unit:ft**2 \t\t\t#1 inch = 1/12 feet \t\t\t#unit:ft**2\n", + "Rconvection = inv([[h*A]]); \t\t\t#The resistance due to natural convection to the surrounding air \t\t\t#Unit:(hr*F)/Btu\n", + "print \"The resistance due to natural convection to the surrounding air is %.2f hr*F)/Btu\"%(Rconvection);\n", + "\n", + "Rtotal = Rpipe+Rconvection; \t\t\t#The total resistance \t\t\t#unit:(hr*F)/Btu\n", + "print \"The total resistance is %.2f hr*F)/Btu\"%(Rtotal);\n", + "Q = deltaT/Rtotal; \t\t\t#ohm's law (fourier's equation) \t\t\t#The heat transfer from the pipe to the surrounding air \t\t\t#unit:Btu/hr\n", + "print \"The heat transfer from the pipe to the surrounding air is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance of pipe is 0.00019 hr*F)/Btu\n", + "The resistance due to natural convection to the surrounding air is 0.24 hr*F)/Btu\n", + "The total resistance is 0.24 hr*F)/Btu\n", + "The heat transfer from the pipe to the surrounding air is 700.42 Btu/hr\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 574" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = h*A*deltaT; \t\t\t#The heat loss due to convection \t\t\t#Unit:Btu/hr \t\t\t#Newton's law of cooling\n", + "\n", + "# Results\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss due to convection is 206.17 Btu/hr\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 575" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#This problem can not be solved directly,because the individual film resistances aree functions of unknown temperature differences.Therefore,\n", + "#From the first approximation,\n", + "h = 1./2; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "#For area 1 ft**2,\n", + "R = (3./12)/0.07; \t\t\t#The wall resistance is deltax/(k*A) \t\t\t#k = 0.07 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n", + "Roverall = inv([[1./2]])+inv([[1./2]])+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n", + "print \"For h = 0.5, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n", + "#Using the value of Roverall,we can now obtain Q and individual temperature differences,\n", + "Ti = 80.; \t\t\t#warm air temperature \t\t\t#unit:fahrenheit\n", + "To = 50; \t\t\t#cold air temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "print \"For h = 0.5, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n", + "print \"For h = 0.5\"\n", + "#deltaT through the hot air film is Q/(1/2)\n", + "print \"Temperaure difference through the hot air film is %.2f F\"%(Q/1./2);\n", + "#Throught the wall deltaT is R*Q\n", + "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n", + "#deltaT through the cold air film is Q/(1/2)\n", + "print \"Temperaure difference through the cold air film is %.2f F\"%(Q/1./2);\n", + "\n", + "#With these temperature differences,we can now enter figures 11.12 and 11.14 to verify our approximation.From figure 11.14,we find h = 0.42 Btu/(hr*ft*2*F)\n", + "#Using h = 0.42,we have for the overall resistance (1/0.42)+(1/0.42)+R\n", + "h = [[0.42]]; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "Roverall = inv(h)+inv(h)+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n", + "print \"For h = 0.42, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n", + "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n", + "print \"For h = 0.42, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n", + "print \"For h = 0.42\"\n", + "# deltat through both air films is Q/h\n", + "print \"Temperaure difference through the hot and cold air film is %.2f F\"%(Q/h);\n", + "#and through the wall,deltat is Q*R\n", + "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n", + "\n", + "#Entering figure 11.14,we find that h stays essentially 0.42,and our solution is that the heat flow is Q,the \"hot\" side of the wall is at Ti-(Q/h),the \"cold\" side is at To+(Q/h) ,and temperature drop in the wall is Ti-(Q/h)-(To+(Q/h)).\n", + "print \"The temperature drop on the hot side of the wall is %.2f F\"%(Ti-Q/h)\n", + "print \"The temperature drop on the cold side of the wall is %.2f F\"%(To+Q/h)\n", + "print \"The temperature drop in the wall is %.2f F\"%(((Ti-Q/h)-To+Q/h));\n", + "#Which checks our wall deltat calculation.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For h = 0.5, the overall series resistance is 7.57 Btu/hr*ft*F)\n", + "For h = 0.5, heat transfer is 3.96 Btu/hr*ft**2)\n", + "For h = 0.5\n", + "Temperaure difference through the hot air film is 1.98 F\n", + "Temperaure difference through the wall is 14.15 F\n", + "Temperaure difference through the cold air film is 1.98 F\n", + "For h = 0.42, the overall series resistance is 8.33 Btu/hr*ft*F)\n", + "For h = 0.42, heat transfer is 3.60 Btu/hr*ft**2)\n", + "For h = 0.42\n", + "Temperaure difference through the hot and cold air film is 8.57 F\n", + "Temperaure difference through the wall is 12.86 F\n", + "The temperature drop on the hot side of the wall is 71.43 F\n", + "The temperature drop on the cold side of the wall is 58.57 F\n", + "The temperature drop in the wall is 30.00 F\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.17 Page No : 578" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The first step is to check Reynolds number.It will be recalled that the Reynolds number is given by (D*V*rho)/mu and is dimensionless.Therefore,we can use D, diameter in feet;V velocity in ft/hr;rho density in lbm/ft**3 and mu vismath.cosity in lbm/(ft*hr).\n", + "#Alternatively,the Reynolds number is given by (D*G)/mu,where G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n", + "G = ((20*60)*(4*144)/(math.pi*0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n", + "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n", + "mu = 0.33; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n", + "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n", + "#Therefore Reynolds number is \n", + "Re = (D*G)/mu; \t\t\t#Reynolds number\n", + "#which is well into the turbulent flow regime.\n", + "print \"The Reynolds number is %.2f\"%(Re);\n", + "#The next step is to enter Figure 11.18 at W/1000 of 20*(60/1000) = 1.2 and 400F to obtain h1 = 630.\n", + "#From the figure 11.20,we obtain F = 1.25 for an inside diameter of 0.87 inch.So,\n", + "h1 = 630; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "F = 1.25; \t\t\t#correction factor\n", + "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "print \"The heat-transfer coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Reynolds number is 63861.54\n", + "The heat-transfer coefficient is 787.50 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.18 Page No : 579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We first check the Reynolds number and note that G is same as for problem 11.17.So,\n", + "#G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n", + "G = ((20*60)*(4*144))/(math.pi*(0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n", + "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n", + "mu = 0.062; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n", + "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n", + "#Reynolds number is DG/mu,therefore \n", + "Re = (D*G)/mu; \t\t\t#Reynolds number\n", + "print \"The Reynolds number is %.2f\"%(Re);\n", + "#which places the flow in the turbulent regime.Because W/1000(W = weight flow) is same as for problem 11.17 and equals 1.2,we now enter figure 11.19 at 1.2 and 400F to obtain h1 = 135.Because the inside tube diameter is same as before,F = 1.25.Therefore,\n", + "h1 = 135; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "F = 1.25; \t\t\t#correction factor\n", + "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n", + "print \"The inside film coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n", + "#It is interesting that for equal mass flow rates,water yields a heat-transfer coefficient almost five times greater than air\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Reynolds number is 339908.22\n", + "The inside film coefficient is 168.75 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.19 Page No : 586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#A bare steel pipe\n", + "#From the Table 11.5,case 2,\n", + "Fe = 0.79; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n", + "FA = 1; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n", + "sigma = 0.173*10**-8; \t\t\t#Stefan-Boltzmann constant \t\t\t#Unit:Btu/(hr*ft**2*R**4)\n", + "T1 = 120+460; \t\t\t#outside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n", + "T2 = 70+460; \t\t\t#inside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = sigma*Fe*FA*A*(T1**4-T2**4); \t\t\t#The net interchange of heat by radiation between two bodies at different temperatures \t\t\t#Unit:Btu/hr \t\t\t#\t\t\t#Stefan-Boltzmann law\n", + "\n", + "# Results\n", + "print \"The heat loss by radiation is %.2f Btu/hr\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat loss by radiation is 214.52 Btu/hr\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.20 Page No : 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The upper temperature is given as 120 F and the temperature difference is \n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = 120-70; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "#Using figure 11.28, \n", + "hrdash = 1.18; \t\t\t#factor for radiation coefficient \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "Fe = 1; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n", + "FA = 0.79; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n", + "hr = Fe*FA*hrdash; \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n", + "\n", + "#As a check,Using the results of problem 11.17,\n", + "print \"As a check, Using the results of problem 11.17\"\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Q = 214.5; \t\t\t#heat loss \t\t\t#Unit:Btu/hr\n", + "hr = Q/(A*deltaT); \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#Newton's law of cooling\n", + "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radiation heat-transfer coefficient for the pipe is 0.93 Btu/hr*ft**2*F)\n", + "As a check, Using the results of problem 11.17\n", + "The radiation heat-transfer coefficient for the pipe is 0.94 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.21 Page No : 589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because the conditions of illustrative problem 11.15 are the same as for problem 11.19 and 11.20,we can solve this problem in two ways to obtain a check.\n", + "#Thus,adding the results of these problems yields,\n", + "print \"Adding the results of the problems yields\"\n", + "Qtotal = 206.2+214.5; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n", + "\n", + "#We can also approach this solution by obtaining radiation and convection heat-transfer co-efficcient.Thus,\n", + "hcombined = 0.9+0.94; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet \t\t\t#Unit:ft \t\t\t#Outside diameter\n", + "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n", + "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n", + "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n", + "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n", + "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n", + "Qtotal = hcombined*A*deltaT; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss due to convection \t\t\t#Newton's law of cooling\n", + "print \"By obtaining radiation and convection heat-transfer co-efficcient\"\n", + "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Adding the results of the problems yields\n", + "The heat loss due to convection is 420.70 Btu/hr\n", + "By obtaining radiation and convection heat-transfer co-efficcient\n", + "The heat loss due to convection is 421.50 Btu/hr\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.22 Page No : 595" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#For brick,concrete,plaster,hot film and cold film,\n", + "A = 1.; \t\t\t#area \t\t\t#Unit:ft**2\n", + "#For a plane wall,the areas are all the same,and if we use 1 ft**2 of wall surface as the reference area,\n", + "#For Brick,\n", + "deltax = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "brickResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For brick\";\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(brickResistance);\n", + "\n", + "#For Concrete,\n", + "deltax = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "concreteResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For Concrete\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(concreteResistance);\n", + "\n", + "#For plaster,\n", + "deltax = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n", + "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n", + "plasterResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For plaster\";\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(plasterResistance);\n", + "\n", + "#For \"hot film\",\n", + "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "hotfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For hot film\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(hotfilmResistance);\n", + "\n", + "#For \"cold film\",\n", + "h = 1.5; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "coldfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"For cold film\"\n", + "print \"The resistance is %.2f hr*F)/Btu\"%(coldfilmResistance);\n", + "\n", + "totalResistance = brickResistance+concreteResistance+plasterResistance+hotfilmResistance+coldfilmResistance; \t\t\t#the overall resistance \t\t\t#Unit:(hr*f)/Btu\n", + "print \"The overall resistance is %.2f hr*F)/Btu\"%(totalResistance);\n", + "\n", + "U = inv([[totalResistance]]); \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#The overall conducmath.tance(or overall heat-transfer coefficient)\n", + "print \"The overall conductanceor overall heat-transfer coefficient) is %.2f Btu/hr/ft**2)\"%(U);\n", + "#In problem 11.21,the solution is straightforward,because the heat-transfer area is constant for all series resistances.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For brick\n", + "The resistance is 1.25 hr*F)/Btu\n", + "For Concrete\n", + "The resistance is 0.05 hr*F)/Btu\n", + "For plaster\n", + "The resistance is 0.14 hr*F)/Btu\n", + "For hot film\n", + "The resistance is 1.11 hr*F)/Btu\n", + "For cold film\n", + "The resistance is 0.67 hr*F)/Btu\n", + "The overall resistance is 3.22 hr*F)/Btu\n", + "The overall conductanceor overall heat-transfer coefficient) is 0.31 Btu/hr/ft**2)\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.23 Page No : 596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "hi = 45; \t\t\t#Film coefficient on the inside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "r1 = 3.0/2; \t\t\t#Inside radius \t\t\t#Unit:inch\n", + "k1 = 26; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for steel pipe \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "r2 = 3.5/2; \t\t\t#outide radius \t\t\t#Unit:inch\n", + "k2 = 0.026; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for mineral wool \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n", + "r3 = 5.50/2; \t\t\t#radius \t\t\t#Unit:inch\n", + "ho = 0.9; \t\t\t#Film coefficient on the outside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "#Results of problem 11.23,\n", + "Ui = 1/((1/hi)+((r1/(k1*12))*math.log(r2/r1))+((r1/(k2*12))*math.log(r3/r2))+(1/(ho*(r3/r1)))); \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#1 in. = 12 ft \t\t\t#Heat transfer coefficient based on inside surface \n", + "print \"Heat transfer coefficient based on inside surface is %.2f Btu/hr*ft**2*F)\"%(Ui); \n", + "#Because Uo*Ao = Ui*Ai\n", + "Uo = Ui*(r1/r3); \t\t\t#Heat transfer coefficient based on outside surface \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "print \"Heat transfer coefficient based on outside surface is %.2f Btu/hr*ft**2*F)\"%(Uo);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer coefficient based on inside surface is 0.36 Btu/hr*ft**2*F)\n", + "Heat transfer coefficient based on outside surface is 0.20 Btu/hr*ft**2*F)\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.24 Page No : 601" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#A COUNTERFLOW HEAT EXCHANGER\n", + "#Hot oil enters at 215 F and leaves at 125 F\n", + "#Water enters the unit at 60 F and leaves at 90 F\n", + "#Therefore,From figure 11.34, \n", + "thetaA = 215.-90; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "thetaB = 125.-60; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n", + "#From the oil data,\n", + "m = 400*60; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n", + "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n", + "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n", + "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n", + "#Q = U*A*deltaTm\n", + "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 500.25 ft**2\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.25 Page No : 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "#In problem 11.24, A COUNTERFLOW HEAT EXCHANGER is operated in the parallel flow\n", + "#Hot oil enters at 215 F and leaves at 125 F\n", + "#Water enters the unit at 60 F and leaves at 90 F\n", + "#Therefore,From figure 11.35, \n", + "thetaA = 215.-60; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "thetaB = 125.-90; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n", + "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n", + "#From the oil data,\n", + "m = 400*60.; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n", + "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n", + "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n", + "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n", + "#Q = U*A*deltaTm\n", + "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 569.19 ft**2\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.26 Page No : 603" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the table 11.7,\n", + "#For the oil side,a resistance(fouling factor) of 0.005 (hr*F*ft**2)/Btu can be used\n", + "#and for the water side,a fouling factor of 0.001 (hr*F*ft**2)/Btu can be used\n", + "#From problem 11.25,\n", + "U = 40;\t\t\t#The coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n", + "#therefore,\n", + "Roil = 0.005; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at oil side\n", + "Rwater = 0.001; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance for water side\n", + "invU = 0.025 # Inv of U\n", + "Rcleanunit = invU; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at clean unit\n", + "Roverall = Roil+Rwater+Rcleanunit; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#overall resistance\n", + "invRoverall = 32.258065;\n", + "Uoverall = invRoverall; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#The overall coefficient of heat transfer of the unit\n", + "#Because all the parameters are the same,the surface area required will vary inversely as U\n", + "A = 569*(U/Uoverall); \t\t\t#A = 569 ft**2 in the problem 11.25 \t\t\t#unit:ft**2 \t\t\t#The outside surface area\n", + "print \"The outside surface area required is %.2f ft**2\"%(A);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The outside surface area required is 705.56 ft**2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.27 Page No : 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#HEAT EXCHANGER\n", + "#Oil flows in the tube side and is cooled from 280 F to 140 F\n", + "#Therefore,\n", + "t2 = 140.; \t\t\t#Unit:fahrenheit\n", + "t1 = 280.; \t\t\t#Unit:fahrenheit\n", + "#On the shell side,water is heated from 85 F to 115 F\n", + "T1 = 85.; \t\t\t#Unit:fahrenheit\n", + "T2 = 115.; \t\t\t#Unit:fahrenheit\n", + "P = (t2-t1)/(T1-t1); \n", + "R = (T1-T2)/(t2-t1);\n", + "#From the figure,\n", + "F = 0.91;\t\t\t#Correction factor\n", + "LMTD = ((t1-T2)-(t2-T1))/math.log((t1-T2)/(t2-T1)); \t\t\t#LMTD = Log mean temperature difference \t\t\t#Unit:fahrenheit\n", + "TMTD = F*LMTD; \t\t\t#TMTD = True mean temperature difference \t\t\t#Unit:fahrenheit\n", + "\n", + "# Results\n", + "print \"The true mean temperature is %.2f fahrenheit\"%(TMTD);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The true mean temperature is 91.11 fahrenheit\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2.ipynb new file mode 100755 index 00000000..c4ad19b7 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2.ipynb @@ -0,0 +1,562 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:086f4825fb4b8e83d4ca795bc6e4859da294b353e111bb33a89148489ab4ef6c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Work, Energy and Heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "k = 100; \t\t\t# Unit:lbf/in. \t\t\t#k = spring constant\n", + "l = 2; \t\t\t#Unit:inch \t\t\t#l = length of compression of string\n", + "\n", + "# Calculations\n", + "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:in*lbf\n", + "\n", + "# Results\n", + "print \"Workdone is %.2f inch*lbf\"%(work);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 200.00 inch*lbf\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "k = 20*1000; \t\t\t# Unit:N/m \t\t\t#k = 20kN \t\t\t#k = spring constant\n", + "l = 0.075; \t\t\t#Unit:meter \t\t\t#l = 75 mm \t\t\t#l = length of compression of string\n", + "\n", + "# Calculations\n", + "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:N*m\n", + "\n", + "# Results\n", + "print \"Workdone is %.2f Jule\"%(work);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Workdone is 56.25 Jule\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "m = 1.; \t\t\t#Unit:lbm \t\t\t#m = mass\n", + "\n", + "# Calculations\n", + "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n", + "\n", + "# Results\n", + "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "600.00 ft*lbf work is done lifting the water to elevation \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n", + "\n", + "# Calculations\n", + "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "\n", + "# Results\n", + "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in potential energy per kg of water is 490.50 J \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Rho = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density of water\n", + "A = 10000; \t\t\t#Flow = 10000; gal/min\n", + "V = (231./1728); \t\t\t# 12 inch = 1 ft \t\t\t#So,1 ft**3 = 1728 in**3 \t\t\t# One Gallon is a volumetric measure equal to 231 in**3\n", + "#A*V \t\t\t#Unit:ft**3/min\n", + "\n", + "#In example, 2.4:\n", + "# From example 2.4\n", + "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "m = 1; \t\t\t#Unit:lbm \t\t\t#m = mass\n", + "\n", + "# Calculations and Results\n", + "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n", + "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE);\n", + "\n", + "#So,\n", + "# In example 2.5\n", + "M = Rho*A*V; \t\t\t#M = the mass flow\n", + "Power = M*PE; \t\t\t#Unit:ft*lbf/lbm\n", + "print \"Generated Power is %.2f ft*lbf/lbm \"%(Power);\n", + "# 1 horsepower = 33,000 ft*lbf/min\n", + "print \"Power = %.2f hp\"%(Power/33000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "600.00 ft*lbf work is done lifting the water to elevation \n", + "Generated Power is 50050000.00 ft*lbf/lbm \n", + "Power = 1516.67 hp\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"In problem 2.5\";\n", + "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n", + "\n", + "# Calculations and Results\n", + "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n", + "#Given data in problem 2.7 is\n", + "M = 1000; \t\t\t#Unit;kg/min\t\t\t#M = Water density \n", + "Power = PE*M*(1./60); \t\t\t#1 min = 60 seconds \t\t\t#power \t\t\t#unit:Joule/s = W\n", + "print \"Power is %.2f Watt\"%(Power); \t\t\t#Watt = N*m/s = Joule/s = Watt\n", + "#1 Hp = 746 Watt\n", + "print \"Power is %.2f Horsepower\"%(Power/745);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 2.5\n", + "Change in potential energy per kg of water is 490.50 J \n", + "Power is 8175.00 Watt\n", + "Power is 10.97 Horsepower\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "m = 10.; \t\t\t#Unit:lb \t\t\t#m = Mass\n", + "V1 = 88.; \t\t\t#Unit:\t\t\t#ft/s V1 = Velocity before it is slowed down\n", + "V2 = 10.; \t\t\t#Unit;ft/s \t\t\t#V2 = Velocity after it is slowed down\n", + "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n", + "\n", + "# Calculations and Results\n", + "KE1 = m*V1**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n", + "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE1);\n", + "\n", + "KE2 = m*V2**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n", + "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE2);\n", + "\n", + "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:ft*lbf\n", + "print \"Change in kinetic energy is %.2f ft*lbf\"%(KE);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of the body before it is slowed down is 1203.46 ft*lbf\n", + "The kinetic energy of the body before it is slowed down is 15.54 ft*lbf\n", + "Change in kinetic energy is 1187.92 ft*lbf\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 1500.; \t\t\t#Unit:kg \t\t\t#m = mass\n", + "V1 = 50.; \t\t\t#Km/hour V1 = Velocity before it is slowed down\n", + "#V1 = (50*1000 m/hour)**2/(3600 s/hour)**2 \n", + "\n", + "# Calculations\n", + "KE1 = (m*(V1*1000)**2/3600**2)/2; \t\t\t#KE1 = Initial kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "#After slowing down\n", + "V2 = 30; \t\t\t#Unit:KM/hour \t\t\t#V2 = Velocity after it is slowed down\n", + "#V2 = (30*1000 m/hour)**2/(3600 s/hour)**2 \n", + "KE2 = (m*(V2*1000)**2/3600**2)/2; \t\t\t#KE2 = After slowing down, the kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:Joule\n", + "\n", + "# Results\n", + "print \"Change in kinetic energy is %.2f kJ\"%(KE/1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in kinetic energy is 92.59 kJ\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "m = 10 \t\t\t#Unit:kg \t\t\t#m = mass\n", + "Z = 10 \t\t\t#Unit:m \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "#There are no losses in the system\n", + "#So,initial potential energy plus initial kinetic energy equal to sum of final potential energy plus final kinetic energy\n", + "#So, PE1+KE1 = PE2+KE2\n", + "#From the figure,KE1 = 0; PE2 = 0;\n", + "#So,PE1 = KE2;\n", + "\n", + "# Calculations and Results\n", + "PE1 = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n", + "#KE2 = (m*v**2)/2\n", + "v = (PE1*2)/m; \n", + "V = math.sqrt(v); \t\t\t#Unit:m/s \t\t\t#velocity \n", + "print \"Velocity = %.2f m/s\"%(V);\n", + "KE2 = PE1; \t\t\t#kinetic energy \t\t\t#Unit:Joule\n", + "print \"Kinetic energy is %.2f N*m\"%(PE1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 14.01 m/s\n", + "Kinetic energy is 981.00 N*m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 Page No : 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "p1 = 100.; \t\t\t#pressure at the enmath.tance \t\t\t#Unit:psia,lbf/in**2\n", + "Rho1 = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n", + "v1 = 144.*(1/Rho1) \t\t\t#Specific Volume at entrance or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n", + "#1 Btu = 778 ft*lbf \n", + "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n", + "\n", + "# Calculations and Results\n", + "FW1 = (p1*v1)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n", + "print \"Flow work = %.2f Btu/lbm\"%(FW1);\n", + "\n", + "print \"At the exit of device\"\n", + "p2 = 50.; \t\t\t#pressure at the exit \t\t\t#Unit:psia,lbf/in**2\n", + "Rho2 = 30.; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n", + "v2 = 144.*(1./Rho2) \t\t\t#Specific Volume at exit or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n", + "#1 Btu = 778 ft*lbf \n", + "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n", + "FW2 = (p2*v2)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n", + "print \"Flow work = %.2f Btu/lbm\"%(FW2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow work = 0.30 Btu/lbm\n", + "At the exit of device\n", + "Flow work = 0.31 Btu/lbm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"At the entrance of device\"\n", + "p1 = 200*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the entrance \t\t\t#Unit:N/m**2\n", + "Rho1 = 1000; \t\t\t#kg/m**3 \t\t\t#Fluid density at entrance\n", + "v1 = 1./Rho1; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n", + "FW1 = p1*v1; \t\t\t#Flow work at entrance \t\t\t#Unit:N*m/kg\n", + "print \"Flow work = %.2fN*m/kg\"%(FW1);\n", + "\n", + "print \"At the exit of device\"\n", + "p2 = 100*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the exit \t\t\t#Unit:N/m**2\n", + "Rho2 = 250; \t\t\t#kg/m**3 \t\t\t#Fluid density at exit\n", + "v2 = 1./Rho2; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n", + "FW2 = p2*v2; \t\t\t#Flow work at exit\t\t\t#Unit:N*m/kg\n", + "print \"Flow work = %.2f N*m/kg\"%(FW2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At the entrance of device\n", + "Flow work = 200.00N*m/kg\n", + "At the exit of device\n", + "Flow work = 400.00 N*m/kg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page No : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#It is necessary that pressure be expressed as psfa when the volume is in cubic feet\n", + "#100 psia = 100*144 psfa\n", + "p1 = 100*144; \t\t\t#Unit:psfa \t\t\t#initial pressure\n", + "v1 = 2; \t\t\t#Unit:ft**3/lb \t\t\t#Initial Specific Volume\n", + "v2 = 1.; \t\t\t#Unit:ft**3/lb \t\t\t#Final Specific Volume\n", + "\n", + "# Calculations\n", + "w = p1*v1*math.log(v2/v1); \t\t\t#work done on fluid \t\t\t#Unit:ft*lbf/lbm\n", + "\n", + "# Results\n", + "print \"Work done on fluid = %.2f ft*lbf/lb\"%(w);\n", + "#1 Btu = 778 ft*lbf \n", + "print \"Work done on the fluid per pound of fluid is %.2f Btu/lbm\"%(w/778);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done on fluid = -19962.64 ft*lbf/lb\n", + "Work done on the fluid per pound of fluid is -25.66 Btu/lbm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "#p1*v1 = p2*v2\n", + "p1 = 200.*1000; \t\t\t#p1 = Initial Pressure \t\t\t#Unit:Pa\n", + "p2 = 800*1000; \t\t\t#p2 = Final Pressure \t\t\t#Unit:Pa\n", + "v1 = 0.1; \t\t\t#v1 = Initial Special Volume \t\t\t#Unit:m**3/kg\n", + "\n", + "# Calculations\n", + "v2 = (p1/p2)*v1; \t\t\t#v1 = final Special Volume \t\t\t#Unit:m**3/kg\n", + "w = p1*v1*math.log(v2/v1); \t\t\t#workdone \t\t\t#Unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"Work done per kilogram of gas is %.2f kJ/kg into the system)\"%(w/1000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done per kilogram of gas is -27.73 kJ/kg into the system)\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3.ipynb new file mode 100755 index 00000000..1a72803f --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3.ipynb @@ -0,0 +1,901 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d3fc279744b60850d5797d14855414b40de2e09f4541a34684deba85c06170cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The First Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For a constant volume process, 10 Btu/lbm heat is added to the system\n", + "#We can consider thet a math.tank having a fixed volume has heat added to it\n", + "#Under these conditions,the mechanical work done on or by the system must be 0\n", + "#u2-u1 = q\n", + "print \"Heat has been converted to internal energy of the working fluid\";\n", + "#So,\n", + "print \" So,Change in internal energy u2-u1 = 10 Btu/Lbm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat has been converted to internal energy of the working fluid\n", + " So,Change in internal energy u2-u1 = 10 Btu/Lbm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Solution For a\";\n", + "m = 10; \t\t\t#Unit:lbm \t\t\t#mass of water\n", + "#delataU = U2-U1\n", + "Heat = 100.; \t\t\t#Unit:Btu \t\t\t#heat added\n", + "deltaU = Heat/m; \t\t\t#Change in internal energy \t\t\t#unit:Btu/lbm\n", + "print \"Change in internal energy per pound of water is %.2f Btu/lbm\"%(deltaU);\n", + "\n", + "print \"Solution For b\";\n", + "print \"In this process,energy crosses the boundary of the system by means of fractional work\"\n", + "print \"The contents of the math.tank will not distinguish between the energy if it is added as\\\n", + " heat or the energy added as fraction work\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution For a\n", + "Change in internal energy per pound of water is 10.00 Btu/lbm\n", + "Solution For b\n", + "In this process,energy crosses the boundary of the system by means of fractional work\n", + "The contents of the math.tank will not distinguish between the energy if it is added as heat or the energy added as fraction work\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "P1 = 100 \t\t\t#Unit:psia \t\t\t#Pressure at the entrance to a steady-flow device\n", + "Rho1 = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "A1V1 = 10000 \t\t\t#Unit:ft**3/min \t\t\t#Entering fluid\n", + "A2 = 2 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n", + "\n", + "# Calculations and Results\n", + "m = Rho1*A1V1; \t\t\t#Unit:lbm/min \t\t\t#mass rate of flow per unit time\n", + "print \"Mass flow rate is %.2f LBm/min\"%(m);\n", + "\n", + "Rho2 = Rho1; \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "#m = Rho2*A2*V2\n", + "#So,\n", + "V2 = m/(Rho2*A2); \t\t\t#velocity at exit \t\t\t#Unit:ft/min\n", + "print \"The exit velocity is %.2f ft/min\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 624000.00 LBm/min\n", + "The exit velocity is 5000.00 ft/min\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Rho1 = 1000. \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at entrance\n", + "A1V1 = 2000 \t\t\t#Unit:m**3/min \t\t\t#Entering fluid\n", + "A2 = 0.5 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n", + "\n", + "# Calculations and Results\n", + "m = Rho1*A1V1; \t\t\t#Unit:kg/min \t\t\t#mass rate of flow per unit time\n", + "print \"Mass flow rate is %.2f kg/min\"%(m);\n", + "\n", + "Rho2 = Rho1; \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at exit\n", + "#m = Rho2*A2*V2\n", + "#So,\n", + "V2 = m/(Rho2*A2); \t\t\t#The exit velocity \t\t\t#Unit:m/min\n", + "print \"The exit velocity is %.2f m/min\"%(V2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 2000000.00 kg/min\n", + "The exit velocity is 4000.00 m/min\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "Rho = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n", + "V = 100 \t\t\t#Unit:ft/s \t\t\t#Velocity of fluid\n", + "d = 1 \t\t\t#Unit:in \t\t\t#Diameter\n", + "\n", + "# Calculations\n", + "#1 ft**2 = 144 in**2 \t\t\t#A = (math.pi/4)*d**2\n", + "A = (math.pi*d**2)/(4*144) \t\t\t#Unit:ft**2 \t\t\t#area \n", + "m = Rho*A*V; \t\t\t#Unit:lbm/s \t\t\t#mass rate of flow per unit time\n", + "\n", + "# Results\n", + "print \"Mass flow rate is %.2f lbm/s\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate is 34.03 lbm/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "m1 = 50000.; \t\t\t#Unit:LBm/hr \t\t\t#An inlet steam flow\n", + "v1 = 0.831 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of inlet steam\n", + "d1 = 6. \t\t\t#Unit:in \t\t\t#Inlet diameter\n", + "\n", + "# Calculations and Results\n", + "A1 = (math.pi*d1**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Entering area\n", + "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet\n", + "print \"The velocity at inlet is %.2f ft/s\"%(V1);\n", + "\n", + "\n", + "m2 = m1; \t\t\t#Unit:LBm/hr \t\t\t#m2 = An outlet steam flow\n", + "v2 = 1.825 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of outlet steam\n", + "d2 = 8 \t\t\t#Unit:in \t\t\t#Outlet diameter\n", + "A2 = (math.pi*d2**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Exit area\n", + "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet\n", + "print \"The velocity at outlet is %.2f ft/s\"%(V2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at inlet is 58.78 ft/s\n", + "The velocity at outlet is 72.61 ft/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Given value\n", + "m1 = 10000; \t\t\t#Unit:kg/hr \t\t\t#An inlet steam flow\n", + "v1 = 0.05 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of inlet steam\n", + "d1 = 0.1 \t\t\t#Unit:m \t\t\t#Inlet diameter \t\t\t#100 mm = 0.1 m\n", + "\n", + "# Calculations and Results\n", + "A1 = (math.pi/4)*d1**2 \t\t\t#Unit:m**2 \t\t\t#Entering area\n", + "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet \t\t\t#Unit:m/s\n", + "print \"The velocity at inlet is %.2f m/s\"%(V1);\n", + "\n", + "\n", + "m2 = m1; \t\t\t#Unit:kg/hr \t\t\t#m2 = An outlet steam flow\n", + "v2 = 0.10 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of outlet steam\n", + "d2 = 0.2 \t\t\t#Unit:m \t\t\t#Outlet diameter \t\t\t#200 mm = 0.2 m\n", + "A2 = (math.pi/4)*(d2**2) \t\t\t#Unit:m**2 \t\t\t#Exit area\n", + "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet \t\t\t#Unit:m/s\n", + "print \"The velocity at outlet is %.2f m/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at inlet is 17.68 m/s\n", + "The velocity at outlet is 8.84 m/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "Cp = 0.22; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "Cv = 0.17; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "q = 800./10; \t\t\t#data given:800 Btu as heat is added to 10 LBm \t\t\t#Unit:Btu/LBm\n", + "T1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Initial temperature \t\t\t#T2 = Final temperature\n", + "\n", + "# Calculations\n", + "#For a non-flow,constant pressure process\n", + "#q = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#deltaT = T2-T1;\n", + "deltaT = q/Cp; \t\t\t#Fahrenheit \t\t\t#change in temperature\n", + "T2 = deltaT+T1; \t\t\t#Fahrenheit \t\t\t#final temperature\n", + "#For a constant volume pressure\n", + "#u2-u1 = Change in internal energy \t\t\t#w = workdone\n", + "#q-w = u2-u1\n", + "#-w = (u2-u1)-q = Cv*(T2-T1)-q\n", + "w = -(Cv*(T2-T1)-q); \t\t\t#Unit:Btu/lbm \t\t\t#workdone\n", + "\n", + "# Results\n", + "print \"%.2f Btu/lbm work is taken out of the system due to workdone by gas\"%(w);\n", + "print \"As there is 10 lbm in the system\"\n", + "print \"%.2f Btu work is taken out of the system due to workdone by gas\"%(w*10);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "18.18 Btu/lbm work is taken out of the system due to workdone by gas\n", + "As there is 10 lbm in the system\n", + "181.82 Btu work is taken out of the system due to workdone by gas\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 Page No : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given data\n", + "# Inlet Outlet\n", + "#Pressure(psia) 1000 1\n", + "#Temperature(F) 1000 101.74\n", + "#Velocity(ft/s) 125 430\n", + "#Inlet position(ft) +10 0\n", + "#Enthalpy(Btu/LBm) 1505.4 940.0\n", + "#Steam flow rate of 150000 LBm/hr\n", + "\n", + "#From the table,\n", + "Z1 = 10; \n", + "V1 = 125; \n", + "h1 = 1505.4; \n", + "Z2 = 0; \n", + "V2 = 430; \n", + "h2 = 940.0;\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + h2 + w/J\n", + "print \"Solution for a \";\n", + "q = 0; \t\t\t#net heat\n", + "J = 778.; \t\t\t#Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "#W1 = w/J;\n", + "#Energy equation is given by\n", + "W1 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n", + "print \"If heat losses are negligible\"\n", + "print \"Total work of the turbine is %.2f Btu/LBm\"%(W1);\n", + "print \"Total work of the turbine is %.2f Btu/hr\"%(W1*150000); \n", + "#(W*150000*778)/(60*33000) \t\t\t#in terms of horsepower \t\t\t#1 hr = 60 min \t\t\t#1 hp = 33000 (ft*LBf)\n", + "print \"Total work of the turbine is %.2f hp \"%(((W1*150000*778)/60*33000)); \n", + "#1 hp = 0.746 kW\n", + "print \"Total work of the turbine is %.2f kW \"%((((W1*150000*778)/60*33000))*0.746);\n", + "\n", + "\n", + "print \"Solution for b \";\n", + "#Heat losses equal 50,000 Btu/hr\n", + "q = 50000./150000; \t\t\t#Unit:Btu/LBm \t\t\t#Heat loss\n", + "W2 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 - q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n", + "print \"If heat losses equal 50,000 Btu/hr , Total work of the turbine is %.2f Btu/LBm\"%(W2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a \n", + "If heat losses are negligible\n", + "Total work of the turbine is 562.03 Btu/LBm\n", + "Total work of the turbine is 84304739.48 Btu/hr\n", + "Total work of the turbine is 36073998024056.70 hp \n", + "Total work of the turbine is 26911202525946.29 kW \n", + "Solution for b \n", + "If heat losses equal 50,000 Btu/hr , Total work of the turbine is 561.70 Btu/LBm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Z1 = 2; \t\t\t#Unit:m \t\t\t#Inlet position\n", + "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n", + "V1 = 40; \t\t\t#Unit:m/s \t\t\t#Inlet velocity\n", + "h1 = 3433.8; \t\t\t#Unit:kJ/kg \t\t\t#Inlet enthalpy\n", + "q = 1 \t\t\t#Unit:kJ/kg \t\t\t#Heat losses\n", + "Z2 = 0; \t\t\t#Outlet position \t\t\t#unit:m\n", + "V2 = 162; \t\t\t#Unit:m/s \t\t\t#Outlet velocity\n", + "h2 = 2675.5; \t\t\t#Unit:kJ/kg \t\t\t#Outlet enthalpy\n", + "\n", + "#Energy equation is given by\n", + "#((Z1*g)) + (V1**2/2) + h1 + q = ((Z2*g) + (V2**2/2) + h2 + w\n", + "\n", + "w = ((Z1*g)/1000) + ((V1**2/2)/1000) + h1 - q - ((Z2*g)/1000) - ((V2**2/2)/1000) - h2 ; \t\t\t#Unit:kJ/kg \t\t\t#Conersation: 1 kJ = 1000 J\n", + "print \"The work output per kimath.logram is %.2f kJ/kg\"%(w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work output per kimath.logram is 744.32 kJ/kg\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "p1 = 150; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "T1 = 1000; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "p2 = 15; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "T2 = 600; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "\n", + "#For a non-flow,constant pressure process\n", + "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W = w/J\n", + "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work output of the turbine per pound of working fluid is 96.00 Btu/LBm\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 Page No : 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 3.13 ,\n", + "p1 = 150.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "T1 = 1000.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "p2 = 15.; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "T2 = 600.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n", + "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "\n", + "#For a non-flow,constant pressure process\n", + "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W = w/J\n", + "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#h2-h1\n", + "print \"In problem 3.13, The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W);\n", + "\n", + "#Now,In problem 3.14 , \n", + "q = 1.1; \t\t\t#Unit:Btu/LBm \t\t\t#Heat losses\n", + "#For a non-flow,constant pressure process\n", + "#q-w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n", + "#W1 = w/J\n", + "W1 = -q+W; \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#W = h2-h1 \t\t\t#Because q is out of the system,it is a negative quantity\n", + "print \"In problem 3.14%(heat loss equal to 1.1 Btu/LBm\"\n", + "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 3.13, The work output of the turbine per pound of working fluid is 96.00 Btu/LBm \n", + "In problem 3.14%(heat loss equal to 1.1 Btu/LBm\n", + "The work output of the turbine per pound of working fluid is 94.90 Btu/LBm \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1 = 100.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 950.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 76.; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 580.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "v1 = 4.; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "J = 778.; \t\t\t#J = Conversion factor\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "#Because pipe is horizontal and velocity terms are to be neglected, \n", + "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n", + "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n", + "#So,\n", + "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-138.14 Btu/LBm heat is transferred from the gas \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 Page No : 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 3.15,\n", + "p1 = 100; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 950; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 76; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 580; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "v1 = 4; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n", + "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n", + "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "J = 778.; \t\t\t#J = Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "#In 3.15, the elevation of the pipe at section 1 makes Z1 = 0\n", + "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J) + ((Z2/J)*(g/gc))\n", + "#In problrm 3.16,\n", + "Z2 = 100; \t\t\t#Given \t\t\t#Unit:ft \t\t\t#Outlet position\n", + "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n", + "#So,\n", + "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J + ((Z2/J)*(g/gc)) ; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n", + "#For this problem , neglecting the elevation term leads to an insignificant error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-138.01 Btu/LBm heat is transferred from the gas \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 Page No : 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1 = 1000; \t\t\t#Unit:psia \t\t\t#Initial pressure\n", + "t1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n", + "p2 = 1000; \t\t\t#Unit:psia \t\t\t#Final pressure\n", + "t2 = 1000; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n", + "# feed in 10,000 LBm/hr \n", + "h1 = 70.68 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n", + "h2 = 1505.9 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n", + "\n", + "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n", + "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n", + "#Energy equation is given by\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "#h = enthalpy\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "\n", + "#we can consider this system as a math.single unit with feed water entering ans steam leaving. \n", + "#It well designed,this unit will be thoroughly insulated,and heat losse will be reduced to a negligible amount\n", + "#Alos,no work will be added to the fluid during the time it is pasmath.sing through the unit, and kinetic energy differences will be assumed to be negligibly small\n", + "#Differennces in elevation also be considered negligible\n", + "#So,the energy equation is reduced to \n", + "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n", + "#Because h = u+(p*v/J)\n", + "q = h2-h1; \t\t\t#q = net heat losses \t\t\t#Unit:Btu/LBm\n", + "\n", + "# Results\n", + "print \"Net heat losses is %.2f Btu/LBm \"%(q);\n", + "print \"For 10000 LBm/hr\"\n", + "print \"%.2f Btu/hr energy has been added to the water to convert it to steam\"%(q*10000)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net heat losses is 1435.22 Btu/LBm \n", + "For 10000 LBm/hr\n", + "14352200.00 Btu/hr energy has been added to the water to convert it to steam\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "h1 = 1220 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n", + "h2 = 1100 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n", + "\n", + "#Z1 = Inlet position \t\t\t#Unit:m \n", + "#V1 = Inlet velocity \t\t\t#Unit:m/s\n", + "#Z2 = Outlet position \t\t\t#Unit:m \n", + "#V2 = Outlet velocity Unit:m/s \n", + "#u1 = internal energy \t\t\t#energy in\n", + "#u2 = internal energy \t\t\t#energy out\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "\n", + "#Energy equation is given by\n", + "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n", + "\n", + "#For this device,differences in elevation are negligible.No work is done on or by the fluid,friction is negligible\n", + "#And due to the speed of the fluid flowing and the short length of the nozzle,heat transfer to or from the surroundings is also negligible.\n", + "#So,the energy equation is reduced to \n", + "#u1 + ((p1*v1)/J) +(V1**2/(2*gc*J) = u2 + ((p2*v2)/J) + (V2**2/(2*gc*J)\n", + "# h1-h2 = ((V2**2-V1**2)/(2*gc*J))\n", + "\n", + "print \"Solution for a\";\n", + "#For neglegible entering velocity, V1 = 0\n", + "#So,\n", + "V2 = math.sqrt((2*gc*J)*(h1-h2)); \t\t\t#the final velocity \t\t\t#ft/s\n", + "print \"It the initial velocity of the system is negligible, the final velocity is %.2f ft/s \"%(V2);\n", + "\n", + "print \"Solution for b\";\n", + "#If the initial velocity is appreciable,\n", + "V1 = 1000; \t\t\t#Unit:ft/s \t\t\t#the initial velocity \n", + "V2 = math.sqrt(((h1-h2)*(2*gc*J)) + V1**2 ) ;\n", + "print \"It the initial velocity of the system is appreciable, the final velocity is %.2f ft/s \"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "It the initial velocity of the system is negligible, the final velocity is 2451.03 ft/s \n", + "Solution for b\n", + "It the initial velocity of the system is appreciable, the final velocity is 2647.17 ft/s \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 Page No : 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "h1 = 3450*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it enters a nozzle\n", + "h2 = 2800*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it leaves a nozzle\n", + "\n", + "# Calculations\n", + "#V2**2/2 = h1-h2;\n", + "V2 = math.sqrt(2*(h1-h2)); \t\t\t#V2 = Final velocity \t\t\t#Unit:m/s\n", + "\n", + "# Results\n", + "print \"Final velocity = %.2f m/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final velocity = 1140.18 m/s\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 Page No : 125" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "m = 400; \t\t\t#Unit:LBm/min \t\t\t#mass of lubricating oil\n", + "Cp = 0.85; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the oil\n", + "T1 = 215; \t\t\t#Temperature when hot oil is entering \t\t\t#Unit:Fahrenheit\n", + "T2 = 125; \t\t\t#Temperature when hot oil is leaving \t\t\t#Unit:Fahrenheit\n", + "\n", + "# Calculations and Results\n", + "DeltaT = T2-T1; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n", + "Qoil = m*Cp*DeltaT; \t\t\t#Heat out of oil \t\t\t#Btu/min\n", + "print \"Heat out of oil is %.2f Btu/min Out of oil\"%(Qoil);\n", + "#Heat out of oil is the heat into the water\n", + "#Mw = Water flow rate\n", + "#M*Cpw*DeltaTw = Qoil\n", + "Cpw = 1.0; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the water\n", + "T3 = 60.; \t\t\t#Temperature when water is entering \t\t\t#Unit:Fahrenheit\n", + "T4 = 90; \t\t\t#Temperature when water is leaving \t\t\t#Unit:Fahrenheit\n", + "DeltaTw = T4-T3; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n", + "Mw = Qoil/(Cpw*DeltaTw); \t\t\t#The Required water flow rate \t\t\t#Unit;lbm/Min\n", + "print \"The Required water flow rate is %.2f lbm/Min\"%(abs(Mw));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat out of oil is -30600.00 Btu/min Out of oil\n", + "The Required water flow rate is 1020.00 lbm/Min\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4.ipynb new file mode 100755 index 00000000..d0e5bbf4 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4.ipynb @@ -0,0 +1,656 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:81c0b2f6374783dbad513f5ebbb51829b49d5e29c2d28b8cf1616c5d410d60b5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : The Second Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#solution\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "\n", + "print \"Solution for a\";\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"Efficiency of the engine is %.2f percentage\"%(ans);\n", + "\n", + "print \"Solution for b\";\n", + "T1 = 2000+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"When the upper tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n", + "\n", + "print \"Solution for c\";\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = 160+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n", + "print \"When the lower tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "Efficiency of the engine is 63.01 percentage\n", + "Solution for b\n", + "When the upper tempretrature is increased upto certain ,Efficiency of the engine is 78.05 percentage \n", + "Solution for c\n", + "When the lower tempretrature is increased upto certain ,Efficiency of the engine is 57.53 percentage \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "Qin = 100.; \t\t\t#heat added to the cycle \n", + "\n", + "print \"In problem 4.1\"\n", + "#given data\n", + "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#solution\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "print \"Solution for a\";\n", + "print \"Efficiency of the engine is %.2f percentage\"%(((T1-T2)/T1)*100);\n", + "\n", + "print \"Now in problem 4.2\"\n", + "W = 0.63*Qin; \t\t\t#W = W/J; \t\t\t#Efficiency in problem 4.1 \n", + "W = Qin*(W/Qin); \t\t\t#amount of work\n", + "Qr = Qin-W; \t\t\t#Qin-Qr = W/J \t\t\t#Qr = heat rejected by the cycle\n", + "print \"The heat removed from the reservoir %.2f units\"%(Qr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 4.1\n", + "Solution for a\n", + "Efficiency of the engine is 63.01 percentage\n", + "Now in problem 4.2\n", + "The heat removed from the reservoir 37.00 units\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "t1 = 70.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 15.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "Qin = 125000.; \t\t\t#(unit = Btu/hr) \t\t\t#Qin = heat added to the cycle\n", + "\n", + "# Calculations and Results\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "Qr = Qin*(T2/T1); \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Qr is %.2f in Btu/hr\"%(Qr);\n", + "work = Qin-Qr; \t\t\t#reversed cycle requires atleast input \t\t\t#work \t\t\t#btu/hr\n", + "print \"Work is %.2f in Btu/hr\"%(work);\n", + "# 1 hp = 33000 ft*LBf/min \n", + "# 1 Btu = 778 ft*LBf \t\t\t#1 hr = 60 min\n", + "print \"Minimum horsepower input required is %.2f hp\"%((work*778/60*33000));\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Qr is 112028.30 in Btu/hr\n", + "Work is 12971.70 in Btu/hr\n", + "Minimum horsepower input required is 5550589622.64 hp\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "W = (50.*33000)/778;\t\t\t#output \t\t\t#W = W/J\n", + "# 1 hp = 33000 ft*LBf/min \n", + "# 1 Btu = 778 ft*LBf\n", + "print \"Output is %.2f in Btu/min\"%(W);\n", + "t1 = 1000.; \t\t\t#Source temperature \t\t\t#(unit:fahrenheit)\n", + "t2 = 100.; \t\t\t#Sink temperature \t\t\t#(unit:fahrenheit)\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "n = (1-(T2/T1))*100; \t\t\t#efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n", + "#n = (W/J)/Qin\n", + "Qin = W/(n/100);\t\t\t#(unit Btu/hr) \t\t\t#Qin = heat added to the cycle\n", + "print \"Heat added to the cycle is %.2f in Btu/min\"%(Qin);\n", + "Qr = Qin*(1-(n/100));\t\t\t#(unit Btu/hr) \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Heat rejected by the cycle is %.2f in Btu/min \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output is 2120.82 in Btu/min\n", + "Efficiency is 61.64 percentage\n", + "Heat added to the cycle is 3440.45 in Btu/min\n", + "Heat rejected by the cycle is 1319.62 in Btu/min \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t1 = 700.; \t\t\t#Source temperature \t\t\t#Unit:Celcius\n", + "t2 = 20.; \t\t\t#Sink temperature \t\t\t#Unit:Celcius\n", + "#converting in F\n", + "T1 = t1+273; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+273; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "n = (T1-T2)/T1*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n", + "output = 65;\t\t\t#in hp \t\t\t#Given\n", + "work = output*0.746;\t\t\t#(unit kJ/s) \t\t\t# 1 hp = 746 W\n", + "print \"Work is %.2f kJ/s\"%(work);\n", + "Qin = work/(n/100);\t\t\t#(unit kJ/s) \t\t\t#Qin = heat added to the cycle\n", + "print \"Heat added to the cycle is %.2f kJ/s \"%(Qin);\n", + "Qr = Qin*(1-(n/100));\t\t\t#(unit kJ/s) \t\t\t#Qr = heat rejected by the cycle\n", + "print \"Heat rejected by the cycle is %.2f kJ/s \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency is 69.89 percentage\n", + "Work is 48.49 kJ/s\n", + "Heat added to the cycle is 69.38 kJ/s \n", + "Heat rejected by the cycle is 20.89 kJ/s \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "t1 = 700.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 200.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "#n1 = (T1-Ti)/T1 and n2 = (Ti-T2)/Ti \t\t\t#n1 & n2 are efficiency\n", + "#(T1-Ti)/T1 = (Ti-T2)/Ti;\n", + "Ti = math.sqrt(T1*T2); \t\t\t#Exhaust temperature \t\t\t#Unit:R\n", + "print \"Exhaust temperature of first engine is %.2f in R\"%(Ti);\n", + "#converting absolute temperature to normal F temperature\n", + "#Ti(fahrenheit) = Ti(R)-460;\n", + "print \"Exhaust temperature of first engine is %.2f fahrenheit\"%(Ti-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exhaust temperature of first engine is 874.99 in R\n", + "Exhaust temperature of first engine is 414.99 fahrenheit\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For reversible isothermal process,\n", + "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n", + "t = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#temperature\n", + "#\t\t\t#converting temperatures to absolute temperatures;\n", + "T = t+460; \t\t\t#temperature \t\t\t#unit:R\n", + "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy is 1.00 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For reversible isothermal process,\n", + "#In problem 4.8,\n", + "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n", + "t = 381.86; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T = t+460; \t\t\t#Unit:R\"\n", + "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Btu/lbm\n", + "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n", + "\n", + "#In problem 4.9\n", + "t1 = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n", + "t2 = 50.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n", + "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n", + "qin = q;\t\t\t#heat added to the cycle \n", + "n = (1-(T2/T1))*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\n", + "wbyJ = qin*n*0.01;\t\t\t#work output\n", + "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n", + "Qr = qin-wbyJ; \t\t\t#heat rejected\n", + "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n", + "print \"As an alternative solution and refering to figure 4.12\"\n", + "qin = T1*deltaS; \t\t\t#heat added \t\t\t#btu/lbm\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#btu/lbm\n", + "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n", + "wbyJ = qin-Qr; \t\t\t#Work output \t\t\t#Btu/lbm\n", + "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n", + "n = (wbyJ/qin)*100; \t\t\t#Efficiency\n", + "print \"Efficiency is %.2f percentage\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy is 1.00 Btu/lbm*R\n", + "Efficiency is 39.42 percentage\n", + "Work output is 332.59 Btu/lbm\n", + "Heat rejected is 511.11 Btu/lbm\n", + "As an alternative solution and refering to figure 4.12\n", + "Heat rejected is 511.11 Btu/lbm\n", + "Work output is 332.59 Btu/lbm\n", + "Efficiency is 39.42 percentage\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "hfg = 1959.7; \t\t\t#Unit:kJ/kg \t\t\t#Evaporative enthalpy\n", + "T = 195.07+273; \t\t\t#Converted into Kelvin \t\t\t#Temperature\n", + "\n", + "# Calculations\n", + "deltaS = hfg/T; \t\t\t#Change in entropy \t\t\t#kJ/kg*K\n", + "\n", + "# Results\n", + "print \"Change in entropy at 1.4MPa for the vaporization of 1 kg is %.2f kJ/kg*K\"%(deltaS); \t\t\t#Values compares very closely to the Steam Tables value\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy at 1.4MPa for the vaporization of 1 kg is 4.19 kJ/kg*K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Let is assume that a Carnot engine cycle operates between two temperatures in each case.\n", + "t = 1000.; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t+460;\n", + "#T1*deltaS = Qin;\n", + "Qin = 100.; \t\t\t#Unit:Btu \t\t\t#heat added to the cycle \n", + "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Btu/R\n", + "T2 = 50.+460; \t\t\t#converting 50 F temperature to absolute temperature;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#Unit:Btu\n", + "print \"%.2f Btu energy is unavailable with respect to a receiver at 50 fahrenheit \"%(Qr);\n", + "T2 = 0+460; \t\t\t#converting 0 F temperature to absolute temperature;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#unit:Btu\n", + "print \"%.2f Btu energy is unavailable with respect to a receiver at 0 fahrenheit \"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "34.93 Btu energy is unavailable with respect to a receiver at 50 fahrenheit \n", + "31.51 Btu energy is unavailable with respect to a receiver at 0 fahrenheit \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Qin = 1000; \t\t\t#Unit:Joule \t\t\t#heat entered to the system\n", + "t = 500; \t\t\t#(unit:Celcius) \t\t\t#temperature\n", + "\t\t\t#converting temperature\n", + "T1 = t+273; \t\t\t#Unit:Kelvin\n", + "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Unit:J/K\n", + "print \"Solution for a\"\n", + "T2 = 20+273; \t\t\t#converted 20 Celcius temperature to Kelvin;\n", + "Qr = T2*deltaS; \t\t\t#Heat rejected at 20 celcius \t\t\t#Joule\n", + "print \"%.2f Joule energy is unavailable with respect to a receiver at 20 Celcius\"%(Qr);\n", + "\n", + "print \"Solution for b\"\n", + "T2 = 0+273; \t\t\t#converted 0 Celcius temperature to Kelvin\n", + "Qr = T2*deltaS; \t\t\t#heat rejected at 0 celcius \t\t\t#Joule\n", + "print \"%.2f Joule energy is unavailable with respect to a receiver at 0 Celcius\"%(Qr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "293.00 Joule energy is unavailable with respect to a receiver at 20 Celcius\n", + "Solution for b\n", + "273.00 Joule energy is unavailable with respect to a receiver at 0 Celcius\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#deltas = Cp*ln(T2/T1)\n", + "#Multiplying both the sides of equation by the mass m,\n", + "#DeltaS = m*Cp*ln(T2/T1)\n", + "m = 6.; \t\t\t#mass \t\t\t#Unit:lbm\n", + "Cp = 0.361; \t\t\t#Btu/lbm*R \t\t\t#Specific heat constant\n", + "DeltaS = -0.7062; \t\t\t#Unit:Btu/R \t\t\t#change in entropy\n", + "t = 1440.; \t\t\t#(unit:fahrenheit) \n", + "#converting temperatures to absolute temperatures;\n", + "T1 = t+460; \t\t\t#Unit:R\n", + "#Rearranging the equation,\n", + "T2 = T1*math.exp(DeltaS/(m*Cp)); \t\t\t#final temperature \t\t\t#Unit:R\n", + "\n", + "# Results\n", + "print \"Final temperature is %.2f R\"%(T2);\n", + "print \"or %.2f fahrenheit\"%(T2-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final temperature is 1371.38 R\n", + "or 911.38 fahrenheit\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n", + "m1 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n", + "m2 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n", + "c1 = 1.; \t\t\t#Specific heat constant\n", + "c2 = 1.; \t\t\t#Specific heat constant\n", + "t1 = 500.; \t\t\t#(unit:fahrenheit) \n", + "t2 = 100.; \t\t\t#(unit:fahrenheit)\n", + "cmix = 1.; \t\t\t#Specific heat constant of mixture\n", + "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t\n", + "#So,\n", + "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n", + "print \"The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n", + "#For this problem,the hot steam is cooled\n", + "deltas = cmix*math.log((t+460)/(t1+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#The cold steam is heated\n", + "deltaS = cmix*math.log((t+460)/(t2+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltaS = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "print \"The net change in entropy is %.2f Btu/lbm*R)\"%(deltaS+deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resulting temperature of the mixture is 300.00 fahrenheit\n", + "The net change in entropy is 0.07 Btu/lbm*R)\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In problem 4.15,\n", + "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n", + "m1 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n", + "m2 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n", + "c1 = 1; \t\t\t#Specific heat constant\n", + "c2 = 1; \t\t\t#Specific heat constant\n", + "t1 = 500; \t\t\t#(unit:fahrenheit)\n", + "t2 = 100; \t\t\t#(unit:fahrenheit)\n", + "cmix = 1; \t\t\t#Specific heat constant of mixture\n", + "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t \t\t\t#So,\n", + "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n", + "print \"In problem 4.14, The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n", + "\n", + "#Now,in problem 4.15,taking 0F as a reference temperature,\n", + "#For hot fluid,\n", + "deltas = cmix*math.log((t1+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#For cold fluid,\n", + "s = cmix*math.log((t2+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#At final mixture temperature of t F,the entropy of each system above 0F is,for the hot fluid \n", + "s1 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s1 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "#and for the cold fluid,\n", + "s2 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s2 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n", + "print \"The change in the entropy for hot fluid is %.2f Btu/lbm*R)\"%(s1-deltas);\n", + "print \"The change in the entropy for cold fluid is %.2f Btu/lbm*R)\"%(s2-s);\n", + "print \"The total change in entropy if %.2f Btu/lbm*R\"%(s1-deltas+s2-s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In problem 4.14, The resulting temperature of the mixture is 300.00 fahrenheit\n", + "The change in the entropy for hot fluid is -0.69 Btu/lbm*R)\n", + "The change in the entropy for cold fluid is 0.00 Btu/lbm*R)\n", + "The total change in entropy if -0.69 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5.ipynb new file mode 100755 index 00000000..ef34cc8f --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5.ipynb @@ -0,0 +1,1536 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5f6a0af8f766f00e3dc6895c71340c9032268be4509d3ee5581830a21a93add3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Properties of Liquids and Gases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "p = 0.6988; \t\t\t#Unit:psia \t\t\t#absolute pressure\n", + "vg = 467.7; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour specific volume\n", + "ug = 1040.2; \t\t\t#Unit:Btu/lbm \t\t\t#Saturated vapour internal energy\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "# 1 Btu = 778 ft*LBf\n", + "#h = u+(p*v)/J \n", + "hg = ug+((p*vg*144)/J); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The enthalpy of saturated steam at 90 F is %.2f Btu/lbm\"%(hg); \t\t\t#The value is matched with the value in table 1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 90 F is 1100.69 Btu/lbm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "p = 4.246; \t\t\t#Unit:kPa \t\t\t#absolute pressure\n", + "vg = 32.894; \t\t\t#Unit:m**3/kg \t\t\t#specific volume\n", + "ug = 2416.6; \t\t\t#Unit:kJ/kg \t\t\t#internal energy\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "# 1 Btu = 778 ft*LBf\n", + "#h = u+(p*v)\n", + "hg = ug+(p*vg); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"The enthalpy of saturated steam at 30 C is %.2f kJ/kg\"%(hg); \t\t\t#The value is matched with the value in table 1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 30 C is 2556.27 kJ/kg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The necessary interpolations are best done in tabular forms as shown:\n", + "# p hg\n", + "# 115 1190.4 table 2\n", + "# 118 1190.8 (hg)118 = 1190.8\n", + "# 120 1191.1\n", + "hg = 1190.4+(3./5)*(1191.1-1190.4); \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "print \"The enthalpy of saturated steam at 118 psia is %.2f Btu/lbm\"%(hg);\n", + "\n", + "# p vg\n", + "# 115 3.884 table 2\n", + "# 118 3.792 (vg)118 = 3.790\n", + "# 120 3.730\n", + "vg = 3.884-(3./5)*(3.884-3.730); \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume of saturated steam at 118 psia is %.2f ft**3/lbm\"%(vg);\n", + "\n", + "# p sg\n", + "# 115 1.5921 table 2\n", + "# 118 1.5900 (sg)118 = 1.5900\n", + "# 120 1.5886\n", + "sg = 1.5921-(3./5)*(1.5921-1.5886); \t\t\t#entropy\n", + "print \"The entropy of saturated steam at 118 psia is %.2f\"%(sg);\n", + "\n", + "# p ug\n", + "# 115 1107.7 table 2\n", + "# 118 1108.06 (ug)118 = 1180.1\n", + "# 120 1108.3\n", + "ug = 1107.7-(3./5)*(1108.3-1107.7); \t\t\t#internal energy\n", + "print \"The internal energy of saturated steam at 118 psia is %.2f\"%(ug);\n", + "#The interpolation process that was done in tabular form for this problem can also be demonstated by refering to figure 5.8 for the specific volume.It will be \n", + "#seen that the results of this problem and the tabulated values are essentially in exact agreement and that linear interpolation is satisfactory in these tables.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam at 118 psia is 1190.82 Btu/lbm\n", + "The specific volume of saturated steam at 118 psia is 3.79 ft**3/lbm\n", + "The entropy of saturated steam at 118 psia is 1.59\n", + "The internal energy of saturated steam at 118 psia is 1107.34\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#By defination,\n", + "#hg = ug+(p*vg)/J\n", + "#hf = uf+(p*vf)/J\n", + "#hfg = hg-hf = (ug-uf) + p*(vg-vf)/J = ufg + p*(vg-vf)/J\n", + "#From table 2 at 115 psia,\n", + "p = 115; \t\t\t#Unit:psia \t\t\t#absolute pressure\n", + "ufg = 798.8; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n", + "ug = 3.884; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour internal energy\n", + "vf = 0.017850; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated liquid specific volume\n", + "J = 778; \t\t\t#J = Conversion factor \t\t\t#Unit:ft*lbf/Btu\n", + "#1 ft**2 = 144 in**2\n", + "hfg = ufg+(p*144*(ug-vf))/J; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "\n", + "# Results\n", + "print \"hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#The tabulated values are matched\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hfg for saturated steam at 115 psia is 881.09 Btu/lbm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#From table 2 at 1.0 MPa,\n", + "p = 1000; \t\t\t#Unit:kN/m**2 \t\t\t#absolute pressure\n", + "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n", + "vf = 0.0011273; \t\t\t#Unit:m**3/kg \t\t\t#Saturated liquid specific volume\n", + "vg = 0.19444; \t\t\t#Unit:m**3/kg \t\t\t#Saturated vapour specific volume\n", + "\n", + "# Calculations\n", + "vfg = vg-vf; \t\t\t#Evap. specific volume \t\t\t#m**3/kg\n", + "hfg = ufg+(p*vfg); \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n", + "\n", + "# Results\n", + "print \"hfg for saturated steam at 1.0 MPa is %.2f kJ/kg\"%(hfg); \t\t\t#The tabulated values are matched\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hfg for saturated steam at 1.0 MPa is 2015.31 kJ/kg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For constant-temperature,reversible vaporization, hfg = deltah = T*deltas = T*sfg\n", + "hfg = (388.12+460)*(1.1042); \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "\n", + "# Results\n", + "print \"By considering the process to be a reversible, \\\n", + "\\nconstant-temperature, hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#ans is wrong in the book\n", + "#Values are matched with tabulated values.Use of -459.67 F for absolute zero,which is the value used in table,gives almost exact agreement.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "By considering the process to be a reversible, \n", + "constant-temperature, hfg for saturated steam at 115 psia is 936.49 Btu/lbm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Umath.sing Table 2 ans a quality of 80%(x = 0.8),we have\n", + "#at 120 psia\n", + "x = 0.8;\n", + "sf = 0.49201; \t\t\t#saturated liquid entropy \t\t\t#Unit:Btu/lbm*R\n", + "sfg = 1.0966; \t\t\t#Evap. Entropy \t\t\t#Unit:Btu/lbm*R \n", + "hf = 312.67; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:Btu/lbm \n", + "hfg = 878.5; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n", + "uf = 312.27; \t\t\t#saturated liquid internal energy \t\t\t#Unit:Btu/lbm \n", + "ufg = 796.0; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n", + "vf = 0.017886; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:ft**3/lbm \n", + "vfg = (3.730-0.017886); \t\t\t#evap. specific volume \t\t\t#Unit:ft**3/lbm \n", + "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#Btu/lbm*R\n", + "print \"Entropy of a wet steam mixture at 120 psia is %.2f Btu/lbm*R\"%(sx);\n", + "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#Btu/lbm*R\n", + "print \"Enthalpy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(hx);\n", + "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#Btu/lbm*R\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n", + "vx = vf+(x*vfg); \t\t\t#/specific volume \t\t\t#ft**3/lbm\n", + "print \"Specific Volume of a wet steam mixture at 120 psia is %.2f ft**3/lbm\"%(vx);\n", + "#As a check,\n", + "J = 778; \t\t\t#ft*lbf/Btu \t\t\t#Conversion factor\n", + "px = 120; \t\t\t#psia \t\t\t#pressure\n", + "ux = hx-((px*vx*144)/J); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n", + "print \"As a check\"\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n", + "print \"Which agrees with the values obtained above\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of a wet steam mixture at 120 psia is 1.37 Btu/lbm*R\n", + "Enthalpy of a wet steam mixture at 120 psia is 1015.47 Btu/lbm\n", + "Internal energy of a wet steam mixture at 120 psia is 949.07 Btu/lbm\n", + "Specific Volume of a wet steam mixture at 120 psia is 2.99 ft**3/lbm\n", + "As a check\n", + "Internal energy of a wet steam mixture at 120 psia is 949.11 Btu/lbm\n", + "Which agrees with the values obtained above\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Using Table 2 ans a quality of 85%(x = 0.85),we have\n", + "#at 1.0 MPa\n", + "x = 0.85;\n", + "sf = 2.1387; \t\t\t#saturated liquid entropy \t\t\t#Unit:kJ/kg*K\n", + "sfg = 4.4487; \t\t\t#Evap. Entropy \t\t\t#Unit:kJ/kg*K \n", + "hf = 762.81; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:kJ/kg\n", + "hfg = 2015.3; \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n", + "uf = 761.68; \t\t\t#saturated liquid internal energy \t\t\t#Unit:kJ/kg\n", + "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n", + "vf = 1.1273; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:m**3/kg \n", + "vfg = (194.44-1.1273); \t\t\t#evap. specific volume \t\t\t#Unit:m**3/kg \n", + "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#kJ/kg*K\n", + "print \"Entropy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg*K\"%(sx);\n", + "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#kJ/kg*K\n", + "print \"Enthalpy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(hx);\n", + "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#kJ/kg*K\n", + "print \"Internal energy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(ux);\n", + "vx = (vf+(x*vfg))*(0.001); \t\t\t#specific volume \t\t\t#m**3/kg\n", + "print \"Specific Volume of a wet steam mixture at 1.0 MPa is %.2f m**3/kg\"%(vx);\n", + "#As a check,\n", + "px = 10**6; \t\t\t#psia \t\t\t#pressure\n", + "ux = hx-((px*vx)/10**3); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n", + "print \"As a check%\"\n", + "print \"Internal energy of a wet steam mixture at 120 psia is %.2f kJ/kg\"%(ux);\n", + "print \"Which agrees with the values obtained above\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of a wet steam mixture at 1.0 MPa is 5.92 kJ/kg*K\n", + "Enthalpy of a wet steam mixture at 1.0 MPa is 2475.81 kJ/kg\n", + "Internal energy of a wet steam mixture at 1.0 MPa is 2310.38 kJ/kg\n", + "Specific Volume of a wet steam mixture at 1.0 MPa is 0.17 m**3/kg\n", + "As a check%\n", + "Internal energy of a wet steam mixture at 120 psia is 2310.37 kJ/kg\n", + "Which agrees with the values obtained above\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n", + "#Using table 1,we have,\n", + "hx = 900; \t\t\t#Btu/lbm \t\t\t#Enthalpy of wet mixture at 90F\n", + "hf = 58.07; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n", + "hfg = 1042.7; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n", + "\n", + "# Calculations\n", + "x = (hx-hf)/hfg; \t\t\t#quality\n", + "\n", + "# Results\n", + "print \"The quality is %.2f percentage of a wet steam at 90F\"%(x*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 80.75 percentage of a wet steam at 90F\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n", + "#Using table 1,we have,\n", + "hx = 2000; \t\t\t#kJ/kg \t\t\t#Enthalpy of wet mixture at 30 C\n", + "hf = 125.79; \t\t\t#kJ/kg \t\t\t#saturated liquid enthalpy\n", + "hfg = 2430.5; \t\t\t# \t\t\t#Evap. Enthalpy \t\t\t#kJ/kg\n", + "\n", + "# Calculations\n", + "x = (hx-hf)/hfg; \t\t\t#quality\n", + "\n", + "# Results\n", + "print \"The quality is %.2f percentage of a wet steam at 30 C\"%(x*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 77.11 percentage of a wet steam at 30 C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\";\n", + "print \"Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\";\n", + "print \"Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\";\n", + "print \"Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\n", + "Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\n", + "Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\n", + "Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\";\n", + "print \"Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\";\n", + "print \"Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\";\n", + "print \"Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\n", + "Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\n", + "Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\n", + "Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The necessary interpolations(between 450F and 460F at 330 psia) are best done in tabular forms as shown:\n", + "# t v\n", + "# 460 1.4945 \n", + "# 455 1.4818 \n", + "# 450 1.4691\n", + "v = 1.4691+(1./2)*(1.4945-1.4691); \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume of saturated steam at 330 psia & 455F is %.2f ft**3/lbm\"%(v);\n", + "\n", + "# t u\n", + "# 460 1137.0 \n", + "# 455 1134.4 \n", + "# 450 1131.8 \n", + "u = 1131.8+(1./2)*(1137.0-1131.8); \t\t\t#Btu/lbm \t\t\t#internal energy\n", + "print \"The internal energy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(u);\n", + "\n", + "# t h\n", + "# 460 1228.2 \n", + "# 455 1224.9 \n", + "# 450 1221.5\n", + "h = 1221.5+(1./2)*(1228.2-1221.5); \t\t\t#enthaply \t\t\t#Btu/lbm\n", + "print \"The enthalpy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(h);\n", + "\n", + "# t s\n", + "# 460 1.5293 \n", + "# 455 1.5256 \n", + "# 450 1.5219\n", + "s = 1.5219+(1./2)*(1.5293-1.5219); \t\t\t#entropy \t\t\t#Btu/lbm*R\n", + "print \"The entropy of saturated steam at 330 psia & 455F is %.2f Btu/lbm*R\"%(s);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific volume of saturated steam at 330 psia & 455F is 1.48 ft**3/lbm\n", + "The internal energy of saturated steam at 330 psia & 455F is 1134.40 Btu/lbm\n", + "The enthalpy of saturated steam at 330 psia & 455F is 1224.85 Btu/lbm\n", + "The entropy of saturated steam at 330 psia & 455F is 1.53 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From Table3, we first obtain the properties at 337 psia and 460 F and then 337 psia and 470 F.\n", + "#The necessary interpolations are best done in tabular forms as shown:\n", + "#Proceeding with the calculation,at 460 F,\n", + "# p v \t\t\t# p h\n", + "# 340 1.4448 \t\t\t# 340 1226.7\n", + "# 337 1.4595 \t\t\t# 337 1227.2\n", + "# 335 1.4693 \t\t\t# 335 1227.5\n", + "v = 1.4696-(2./5)*(1.4693-1.4448); \n", + "h = 1227.5-(2./5)*(1227.5-1226.7);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "\n", + "#And at 470 F,\n", + "# p v \t\t\t# p h\n", + "# 340 1.4693 \t\t\t# 340 1233.4\n", + "# 337 1.4841 \t\t\t# 337 1233.9\n", + "# 335 1.4940 \t\t\t# 335 1234.2\n", + "v = 1.4640-(2./5)*(1.4640-1.4693); \n", + "h = 1234.2-(2./5)*(1234.2-1233.4);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "\n", + "#Therefore,at 337 psia and 465 F\n", + "# t v \t\t\t# t h\n", + "# 470 1.4841 \t\t\t# 470 1233.9\n", + "# 465 1.4718 \t\t\t# 465 1230.7\n", + "# 460 1.4595 \t\t\t# 460 1227.5\n", + "v = 1.4595+(1./2)*(1.4841-1.4595); \n", + "h = 1227.5+(1./2)*(1233.9-1227.5);\n", + "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "print \"At 465 F and 337 psia, specific volume = %.2f ft**3/lbm and enthalpy = %.2f Btu/lbm\"%(v,h);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At 465 F and 337 psia, specific volume = 1.47 ft**3/lbm and enthalpy = 1230.70 Btu/lbm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The values of temperature and pressure are listed in Table 4(Figure 5.10) and can be read directly.\n", + "print \"Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\";\n", + "print \"Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\";\n", + "print \"Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\";\n", + "print \"Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\n", + "Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\n", + "Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\n", + "Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#It is necessary to ontain the saturation values corresponding to 300 F.This is done by reading Table A.1 in Appendix 3,which gives\n", + "pf = 66.98; \t\t\t#psia \t\t\t#pressure\n", + "vf = 0.017448; \t\t\t#ft**3/lbm \t\t\t#specific volume\n", + "hf = 269.73; \t\t\t#Btu/lbm \t\t\t#enthaply\n", + "#Now,\n", + "p = 1000; \t\t\t#psia \t\t\t#pressure\n", + "J = 778; \t\t\t#Conversion factor \t\t\t#ft*lbf/Btu\n", + "#From eq.5.5,\n", + "h = hf+((p-pf)*vf*144)/J; \t\t\t#1ft**2 = 144 in**2 \t\t\t#The enthalpy of subcooled water \t\t\t#Btu/lbm\n", + "print \"The enthalpy of subcooled water is %.2f Btu/lbm\"%(h);\n", + "#The difference between this value and the value found in problem 5.15,expressed as a percentage is\n", + "percentoferror = (h-271.46)/271.46;\n", + "print \"Percent of error is %.2f\"%(percentoferror*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of subcooled water is 272.74 Btu/lbm\n", + "Percent of error is 0.47\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#On a chart in Appendix 3,it is necessary to estimate the 90 F point on the saturation line.From the chart or the table in the upper left of the chart,we note that 90 F is between 1.4 and 1.5 in. of mercury.Estimating the intersection of this value with the saturation curve yields\n", + "print \"Enthalpy of saturated steam hg = 1100 Btu/lbm\";\n", + "#This is a good agreement with results of problem 5.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy of saturated steam hg = 1100 Btu/lbm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Mollier chart has lines of constant moisture in the wet region which correspond to (1-x).Therefore,we read at 20% moisture(80% Quality) and 120 psia,\n", + "print \"The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\";\n", + "#Which also agrees well with the calculated value in problem 5.7\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 213" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Entering the Mollier chart at 900 Btu/lbm and estimating 90 F(near the 1.5-in. Hg dashed line) yields a constant moisture percent of 19.2%.\n", + "print \"The quality is %.2f percent\"%((1-0.192)*100);\n", + "#We show good agreement with the calculated value.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quality is 80.80 percent\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the chart,\n", + "print \"The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\";\n", + "#Compared to 1221.5 Btu/lbm found in problem 5.11\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We note that the steam is superheated.From the Mollier chart in SI units,\n", + "print \"The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\";\n", + "#Values are matched with problem 5.12\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because neither pressure nor temperature is shown directly,it is necessary to estimate to obtain the desired value.\n", + "print \"The enthalpy of steam is h = 1231 Btu/lbm\";\n", + "#In problem 5.14,h = 1230.7 Btu/lbm,Which is matched here.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of steam is h = 1231 Btu/lbm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Reading the chart at 30 C and saturation gives us,\n", + "print \"The enthalpy of saturated steam is hg = 2556 kJ/kg\";\n", + "#Which matches with value of problem 5.2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy of saturated steam is hg = 2556 kJ/kg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Reading the chart in wet region at 1.0 MPa and x = 0.85(moisture of 15%) gives us\n", + "print \"hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\";\n", + "#The chart does not give ux or vx directly" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Locate 30 C on the saturation line.Now follow a line of constant pressure,which is also a line of constant temperature in wet region,until an enthalpy of 2000kJ/kg is reached.\n", + "print \"The moisture content is 23 percent or x = 77 percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moisture content is 23 percent or x = 77 percent\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We enter the chart in the superheat region at 2.0MPa and 240 C to read the enthalpy and entropy.This procedure gives \n", + "print \"Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\";\n", + "#The other properties cant be obtained directly from the chart\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#As already noted,h1 = h2 for this process.On the Mollier chart,h2 is found to be 1170 Btu/lbm at 14.7 psia and 250 F.Proceeding to the left on the chart,the constant-enthalpy value of 1170 Btu/lbm to 150 psia yields a moisture of 3% or a quality of 97%.\n", + "#If we use the tables to obtain the solution to this problem,we would first obtain h2 from the superheated vapor tables as 1168.8 Btu/lbm.Because hx = hf+(x*hfg),we obtain x as\n", + "hx = 1168.8; \t\t\t#Btu/lbm \n", + "hf = 330.75; \t\t\t#Btu/lbm \t\t\t#values of 150 psia\n", + "hfg = 864.2; \t\t\t#Btulbm \t\t\t#values of 150 psia\n", + "x = (hx-hf)/hfg; \t\t\t#Quality\n", + "print \"Moisture in the steam flowing in the pipe is %.2f percent\"%((1-x)*100);\n", + "print \"or quality of the steam is %.2f percent\"%(x*100);\n", + "#very often,it is necessary to perform multiple interpolations if the tables are used,and the Mollier chart yields results within the rquired accuracy for most engineering problems and saves considerable time.\n", + "#We can also use the computerised programs to solve this program.We first enter the 250F and 14.7 psia to obtain h of 1168.7 Btu/lbm.We then continue by entering h of 1168.7 Btu/lbm and p of 150 psia.The printout gives us x of 0.9699 or 97%.While the computer solution is quick and easy to use,you should still sketch out the problem on an h-s or T-s diagram to show the path of the process.\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 250.00 degF\n", + "# P = 29.814 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01700 13.830\n", + "# h(Btu/lbm) 218.62 1164.1\n", + "# s(Btu/lbm*F) 0.3678 1.7001\n", + "# u(Btu/lbm) 218.52 1087.8\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 250.00 degF\n", + "# P = 14.700 psia\n", + "# v = 28.417 ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.7831 Btu/lbm*F\n", + "# u = 1091.4 Btu/lbm\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 340.06 degF\n", + "# P = 118.00 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01787 3.7891\n", + "# h(Btu/lbm) 311.39 1190.7\n", + "# s(Btu/lbm*F) 0.4904 1.5899\n", + "# u(Btu/lbm) 311.00 1108.0\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 358.49 degF\n", + "# P = 150.00 psia\n", + "# v = 2.9248 ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.5384 Btu/lbm*F\n", + "# u = 1087.5 Btu/lbm\n", + "# x = 0.9699\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moisture in the steam flowing in the pipe is 3.03 percent\n", + "or quality of the steam is 96.97 percent\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Because the math.tank volume is 10 ft**3,the final specific volume of the steam is 10 ft**3/lbm.Interpolations in Table A.2 yield a final pressure of 42 psia.The heat added is simply difference in internal energy between the two states.\n", + "u2 = 1093.0; \t\t\t#internal energy \t\t\t#Btu/lbm\n", + "u1 = 117.95; \t\t\t#internal energy \t\t\t#Btu/lbm\n", + "\n", + "# Calculations\n", + "q = u2-u1; \t\t\t#heat added \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The final pressure is 42 psia and the heat added is %.2f Btu/lbm\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure is 42 psia and the heat added is 975.05 Btu/lbm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The mass in the math.tank is constant,and the heat added will be the change in internal energy of the contents of the math.tank between the two states.The initial mass in the math.tank is found as follows:\n", + "Vf = 45; \t\t\t#volume of water \t\t\t#ft**2\n", + "vf = 0.016715;\n", + "Vg = 15; \t\t\t#Volume of steam \t\t\t#ft**2\n", + "vg = 26.80;\n", + "mf = Vf/vf; \t\t\t#lbm\n", + "mg = Vg/vg; \t\t\t#lbm\n", + "total = mf+mg; \t\t\t#total mass\n", + "#The internal energy is the sum of the internal energy of the liquid plus vapor:\n", + "ug = 1077.6;\n", + "uf = 180.1;\n", + "Ug = mg*ug; \t\t\t#Btu\n", + "Uf = mf*uf; \t\t\t#Btu\n", + "Total = Ug+Uf; \t\t\t#total internal energy\n", + "print \"The total internal energy is %.2f Btu\"%(Total);\n", + "#Because the mass in the math.tank is constant,the final specific volume must equal the initial specific volume,or\n", + "vx = (Vf+Vg)/(mf+mg); \t\t\t#ft**3/lbm\n", + "#But vx = vf+(x*vfg).Therefore Using table A.2 at 800 psia,\n", + "vx = 0.022282;\n", + "vf = 0.02087;\n", + "vfg = 0.5691-0.02087;\n", + "x = (vx-vf)/vfg;\n", + "print \"The final amount of vapor is %.2f lbm\"%(x*total); \t\t\t#x*total mass \n", + "mg = x*total;\n", + "print \"The final amount of liquid is %.2f lbm\"%(total-x*total); \t\t\t#total mass minus final amount of vapor \n", + "mf = total-(x*total);\n", + "#The final internal energy is found as before:\n", + "ug = 1115.0;\n", + "uf = 506.6;\n", + "Ug = mg*ug; \t\t\t#Btu\n", + "Uf = mf*uf; \t\t\t#Btu\n", + "Total1 = Ug+Uf;\n", + "difference = Total1-Total; \t\t\t#final internal energy-initial internal energy\n", + "#per unit mass heat added is,\n", + "print \"The heat added per unit is %.2f Btu/lbm\"%(difference/total); \t\t\t#the difference of internal energy/total mass\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total internal energy is 485467.03 Btu\n", + "The final amount of vapor is 6.94 lbm\n", + "The final amount of liquid is 2685.82 lbm\n", + "The heat added per unit is 327.88 Btu/lbm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page No : 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As shown in Fig. 5.21b,the process dscribed in this problem is a vertical line on the Mollier Chart.For 800 psia and 600F,the Mollier chart yeilds h1 = 1270 Btu/lbm and s1 = 1.485.Proceeding vertically down the chart at constant s to 200 psia yields a final enthalpy h2 = 1148 Btu/lbm.The change in enthaly Using the process is 1270-1148 = 122 Btu/lbm.\n", + "#We may also solve this problem Using the steam tables in Appendix 3.Thus,the enthalpy at 800 psia and 600 F is 1270.4 Btu/lbm,and its entropy is 1.4861 Btu/lbm*R.\n", + "#Because the process is isentropic,the final entropy at 200psia must be 1.4861.From the saaturation table,the entropy of saturated steam at 200 psia is 1.5464,which indicates the final steam condition must be wet because the entropy of the final steam is less than the entropy of saturation.Using the wet steam relation yields,\n", + "#sx = sf+(x*sfg)\n", + "h1 = 1270.4; \n", + "sx = 1.4861; \n", + "sf = 0.5440; \n", + "sfg = 1.0025 ;\n", + "hf = 355.6; \n", + "hfg = 843.7;\n", + "\n", + "# Calculations\n", + "x = (sx-sf)/sfg; \t\t\t#Quality\n", + "#Therefore,the final enthalpy is\n", + "hx = hf+(x*hfg); \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"The final enthalpy is %.2f Btu/lbm\"%(hx);\n", + "print \"The change in enthalpy is %.2f Btu/lbm\"%(h1-hx); \t\t\t#Note the agreement with the Mollier chart solution\n", + "#we can also use the computer program to solve this problem.For 600F and 800 psia, h = 1270. Btu/lbm and s = 1.4857 Btu/lbm*R.Now Using p = 200 psia and s = 1.4857,we obtain\n", + "#h = 1148.1 Btu/lbm.The change in enthalpy is 1270.0-1148.1 = 121.9 Btu/lbm.Note the effort saved Using either the Mollier chart or the computer program. \n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 600.00 degF\n", + "# P = 1541.7 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.02362 0.2675\n", + "# h(Btu/lbm) 616.59 1166.2\n", + "# s(Btu/lbm*F) 0.8129 1.3316\n", + "# u(Btu/lbm) 609.85 1089.9\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 600.00 degF\n", + "# P = 800.00 psia\n", + "# v = 0. ft**3/lbm\n", + "# h = 1168.7 Btu/lbm\n", + "# s = 1.5384 Btu/lbm*F\n", + "# u = 1087.5 Btu/lbm\n", + "#Region:Superheated\n", + "\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 381.87 degF\n", + "# P = 200.00 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01839 2.2883\n", + "# h(Btu/lbm) 355.60 1199.0\n", + "# s(Btu/lbm*F) 0.5440 1.5462\n", + "# u(Btu/lbm) 354.92 1114.3\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 381.87 degF\n", + "# P = 200.00 psia\n", + "# v = 2.1512 ft**3/lbm\n", + "# h = 1148.1 Btu/lbm\n", + "# s = 1.4857 Btu/lbm*F\n", + "# u = 1068.5 Btu/lbm\n", + "# x = 0.9396\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final enthalpy is 1148.47 Btu/lbm\n", + "The change in enthalpy is 121.93 Btu/lbm\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As refering to figure 5.21,it will be seen that the final temperature and enthalpy will both be higher than for the isentropic case.\n", + "#80% of the isentropic enthalpy difference\n", + "deltah = 0.8*122; \t\t\t#change in enthalpy \t\t\t#Btu/lbm\n", + "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "h2 = h1-deltah; \t\t\t#the final enthalpy \t\t\t#Btu/lbm\n", + "print \"The final enthalpy is %.2f Btu/lbm\"%(h2);\n", + "print \"and the final pressure is 200 psia\";\n", + "print \"The Mollier chart indicates the final state to be in the wet region\"\n", + "print \"with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final enthalpy is 1172.40 Btu/lbm\n", + "and the final pressure is 200 psia\n", + "The Mollier chart indicates the final state to be in the wet region\n", + "with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Using the Mollier chart,\n", + "h1 = 2942; \t\t\t#kJ/kg \t\t\t#initial enthalpy\n", + "#Proceeding as shown in figure 5.21b,that is,vertically at constant entropy to a pressure of 0.1 MPa,gives us\n", + "h2 = 2512; \t\t\t#kJ/kg \t\t\t#final enthalpy\n", + "\n", + "# Results\n", + "print \"Neglecting kinetic & potential energy, The change in enthalpy of the steam is %.2f kJ/kg\"%(h1-h2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting kinetic & potential energy, The change in enthalpy of the steam is 430.00 kJ/kg\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#From the conditions given in problem 5.38,the isentropic change in enthalpy is 122 Btu/lbm\n", + "#So,\n", + "h1minush2 = 122; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n", + "J = 778; \t\t\t#Conversion factor\n", + "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "V2 = math.sqrt(2*gc*J*(h1minush2)); \t\t\t#final velocity \t\t\t#ft/s\n", + "\n", + "# Results\n", + "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As the steam leaves the nozzle, The final velocity is 2471.21 ft/s\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 227" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Because the process is irreversible,we cannot show it on the Mollier diagram.However,the analysis of problem 3.22 for the nozzle is still valid,and all that is needed is the enthalpy at the beginning and the end of the expansion.From the problem 5.38,\n", + "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "#For h2 we locate the state point on the Mollier diagram as being saturated vapor at 200 psia.This gives us\n", + "h2 = 1199; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n", + "J = 778; \t\t\t#Conversion factor\n", + "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n", + "V2 = math.sqrt(2*gc*J*(h1-h2)); \t\t\t#final velocity \t\t\t#Ft/s\n", + "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "As the steam leaves the nozzle, The final velocity is 1885.21 ft/s\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the saturation table,500 psia corresponds to a temperature of 467.13F,and the saturated vapor has an enthalpy of 1205.3 Btu/lbm.At 500 psia and 800 F,the saturated vapor has an enthalpy of 1412.1 Btu/lbm.Because this process is a steady-flow process at constant pressure,the energy equation becomes q = h2-h1,assuming that differences in the kinetic energy and potential energy terms are negligible.Therefore,\n", + "h2 = 1412.1; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n", + "h1 = 1205.3; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n", + "\n", + "# Calculations\n", + "q = h2-h1; \t\t\t#heat added \t\t\t#Btu/lbm\n", + "\n", + "# Results\n", + "print \"%.2f Btu/lbm heat per pound of steam was added\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "206.80 Btu/lbm heat per pound of steam was added\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the saturation table at 1 psia,\n", + "hf = 69.74; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n", + "hfg = 1036.0; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n", + "hg = 1105.8; \t\t\t#Btu/lbm \t\t\t#The enthalpy of saturated steam\n", + "x = 0.97; \t\t\t#Quality\n", + "\n", + "# Calculations and Results\n", + "#Because the condensation process is carried out at constant pressure,the energy equation is q = deltah.\n", + "hx = hf+(x*hfg); \t\t\t#the initial enthalpy \t\t\t#Btu/lbm\n", + "print \"The initial enthalpy is %.2f Btu/lbm\"%(hx);\n", + "#The final enthalpy is hf = 69.74.So,\n", + "deltah = hx-hf; \t\t\t#The enthalpy difference \t\t\t#Btu/lbm\n", + "print \"At 1 psia, The enthalpy difference is %.2f Btu/lbm\"%(deltah);\n", + "print \"By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\";\n", + "# Saturation Properties\n", + "#--------------------------\n", + "# T = 101.71 degF\n", + "# P = 1.0000 psia\n", + "# z z1 zg\n", + "# v(ft**3/lbm) 0.01614 333.55\n", + "# h(Btu/lbm) 69.725 1105.4\n", + "# s(Btu/lbm*F) 0.1326 1.9774\n", + "# u(Btu/lbm) 69.722 1043.6\n", + "\n", + "#Thermo Properties\n", + "#------------------------\n", + "# T = 101.71 degF\n", + "# P = 1.0000 psia\n", + "# v = 323.55 ft**3/lbm\n", + "# h = 1074.3 Btu/lbm\n", + "# s = 1.9221 Btu/lbm*F\n", + "# u = 1014.4 Btu/lbm\n", + "# x = 0.9700\n", + "\n", + "#Region:Saturated\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial enthalpy is 1074.66 Btu/lbm\n", + "At 1 psia, The enthalpy difference is 1004.92 Btu/lbm\n", + "By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\n" + ] + } + ], + "prompt_number": 44 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6.ipynb new file mode 100755 index 00000000..6f0c0e56 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6.ipynb @@ -0,0 +1,1803 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2faa1f75f0d6499a835ab22ac4f83a5b52e4bd9996e6fa5c1f6a4f3bef30acd5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : The Ideal Gas" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "P1 = 100.; \t\t\t#Pressure at volume V1 = 100 ft**3 \t\t\t#Unit:psia\n", + "V1 = 100.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 100 psia\n", + "P2 = 30. \t\t\t# Reduced Pressure \t\t\t#Unit:psia\n", + "\n", + "# Calculations\n", + "#Boyle's law,P1*V1 = P2*V2\n", + "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by the gas \t\t\t#ft**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by the gas = %.2f ft**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by the gas = 333.33 ft**3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "P1 = 10.**6; \t\t\t#Pressure at volume V1 = 2 m**3 \t\t\t#Unit:Pa\n", + "V1 = 2.; \t\t\t#Unit:m**3 \t\t\t#V1 = Volume at 10**6 Pa\n", + "P2 = 8.*10**6 \t\t\t# Increased Pressure \t\t\t#Unit:Pa\n", + "\n", + "# Calculations\n", + "#Boyle's law,P1*V1 = P2*V2\n", + "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by gas = 0.25 m**3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given value\n", + "T1 = 32.+460; \t\t\t#Temperature at volume V1 = 150 ft**3 \t\t\t#Unit:R\n", + "V1 = 150.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 32 F\n", + "T2 = 100.+460 \t\t\t# Increased Temperature \t\t\t#Unit:R\n", + "\n", + "# Calculations\n", + "#Charles's law,V1/V2 = T1/T2\n", + "V2 = (T2*V1)/T1; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume occupied by gas = 170.73 m**3\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#If for this process T2 = 1.25*T1,\n", + "# T2/T1 = 1.25\n", + "#Therefore,\n", + "# p2/p1 = T2/T1 \t\t\t#Charles's law(volume constant)\n", + "#Thus,\n", + "print \"The absolute gas pressure increases by 25 percent\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute gas pressure increases by 25 percent\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "V1 = 4.; \t\t\t#m**3 \t\t\t#initial volume\n", + "T2 = 0.+273; \t\t\t#celsius converted to kelvin \t\t\t#gas is cooled to 0 C \t\t\t#final temperature\n", + "T1 = 100+273; \t\t\t#celsius converted to kelvin \t\t\t#initial temperature\n", + "\n", + "# Calculations\n", + "V2 = V1*(T2/T1); \t\t\t#final volume \t\t\t#Charles's law(pressure constant) \t\t\t#unit:m**3\n", + "\n", + "# Results\n", + "print \"The final volume is %.2f m**3\"%(V2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final volume is 2.93 m**3\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Let us first put each of the given variables into a consistent set of units:\n", + "p = (200+14.7)*(144); \t\t\t#Unit:psfa*(lbf/ft**2) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#pressure\n", + "T = (460.+73); \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "V = 120./1728; \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#total volume \t\t\t#unit:ft**3\n", + "R = 1545./28; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#because the molecular weight of nitrogen is 28 \t\t\t#constant of proportionality\n", + "#Applying, p*v = R*T, \t\t\t#ideal gas law\n", + "v = (R*T)/p; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume\n", + "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n", + "#The mass of gas is the total volume divided by the specific volume\n", + "print \"The gas in the container is %.2f lbm\"%(V/v);\n", + "#The same result is obtained by direct use of eq. p*V = m*R*T\n", + "m = (p*V)/(R*T); \t\t\t#The gas in the container \t\t\t#unit:lbm \t\t\t#ideal gas law\n", + "print \"The gas in the container is %.2f lbm\"%(m); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific volume is 0.95 ft**3/lbm\n", + "The gas in the container is 0.07 lbm\n", + "The gas in the container is 0.07 lbm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Applying , (p1*V1)/T1 = (p2*V2)/T2\n", + "#and p2 = p1*(T2/T1) because V1 = V2\n", + "p1 = 200+14.7; \t\t\t#Unit:psia \t\t\t#initial pressure\n", + "T2 = 460.+200; \t\t\t#final temperature is 200 F \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "T1 = 460+73; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "\n", + "# Calculations\n", + "p2 = p1*(T2/T1); \t\t\t#final pressure \t\t\t#Unit:psia \t\t\t#Charles's law(volume constant)\n", + "\n", + "# Results\n", + "print \"The final pressure is %.2f psia\"%(p2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure is 265.86 psia\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For CO2,\n", + "R = 8.314/44; \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality \t\t\t#Molecular weight of CO2 = 44\n", + "p = 500; \t\t\t#Unit:kPa \t\t\t#pressure\n", + "V = 0.5; \t\t\t#Unit:m**3 \t\t\t#volume\n", + "T = (100.+273); \t\t\t#Unit:K \t\t\t#Celsius converted to kelvin\n", + "\n", + "# Calculations\n", + "#Applying p*V = m*R*T ,\n", + "m = (p*V)/(R*T); \t\t\t#mass \t\t\t#kg \t\t\t#ideal gas law\n", + "\n", + "# Results\n", + "print \"The mass of gas in the math.tank is %.2f kg\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of gas in the math.tank is 3.55 kg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "#The equation cpbar = 0.338-(1.24*10**2/T)+(4.15*10**4)/T**2 has a form , cbar = Adash+(Bdash/T)+(Ddash/T**2)\n", + "#So,\n", + "Adash = 0.338; \t\t\t#constant\n", + "Bdash = -1.24*10**2; \t\t\t#constant\n", + "Ddash = 4.15*10**4; \t\t\t#constant\n", + "\n", + "# Calculations\n", + "#Therefore,from equation,cbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1))\n", + "cpbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure between 80F and 500F is 0.42 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 252" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#The table in Appendix 3 does not give us the enthalpy data at 960R and 540R that we need.Interpolating yields\n", + "# T hbar T hbar\n", + "# 537 3729.5 900 6268.1\n", + "# 540 3750.4 960 6694.0\n", + "# 600 4167.9 1000 6977.9\n", + "#So,\n", + "hbar540 = 3729.5+(3./63)*(4167.9-3729.5); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "hbar960 = 6268.1+(60./100)*(6977.9-6268.1); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "#Note that hbar is given for a mass of 1 lb mole.To obtain the enthalpy per pound,it is necessary to divide the values og h by the molecular weight,28.\n", + "h2 = 6694.0; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "h1 = 3750.4; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n", + "T2 = 500.+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80.+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "\n", + "# Calculations\n", + "cbar = (h2-h1)/(28*(T2-T1)); \t\t\t#The mean specific heat at constant pressure \t\t\t#unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure is %.2f Btu/lbm*R\"%(cbar);\n", + "#With the more extesive Gas tables,these interpolations are avoided.The Gas Tables provide a relatively easy and accurate method of obtaining average specific heats.Also,these tables have been computerized for ease of application.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure is 0.25 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "#cp = 0.219 + (3.42*10**-5*T) - (2.93*10**-9*T**2); \t\t\t#Unit:Btu/lbm*R\n", + "#Comparing with c = A+(B*T)+(D*T**2) \n", + "A = 0.219; \t\t\t#constant\n", + "B = 3.42*10**-5; \t\t\t#constant\n", + "D = 2.93*10**-9; \t\t\t#constant\n", + "\n", + "# Calculations\n", + "#Using these values and equation cbar = A+((B/2)(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2))\n", + "cpbar = A+((B/2)*(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The mean specific heat at constant pressure for air between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean specific heat at constant pressure for air between 80F and 500F is 0.25 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The molecular weight of oxygen is 32.Therefore,\n", + "R = 1545./32; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "cp = 0.24; \t\t\t#Unit:Btu/lbm*R \t\t\t#specific heat at constant pressure\n", + "\n", + "# Calculations\n", + "#cp-cv = R/J\n", + "cv = cp-(R/J); \t\t\t#specific heat at constant volume \t\t\t#unit:Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.18 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From equation,cv = R/(k-1) ,\n", + "R = 8.314/32; \t\t\t#constant of proportionality \t\t\t#kJ/kg*K \t\t\t#The molecular weight of oxygen is 32\n", + "k = 1.4 \t\t\t#for oxygen \t\t\t#given \t\t\t#k = cp/cv\n", + "cv = R/(k-1); \t\t\t#Specific heat at constant volume \t\t\t#unit:kJ/kg*K\n", + "print \"Specific heat at constant volume is %.2f kJ/kg*K\"%(cv);\n", + "cp = k*cv; \t\t\t#specific heat at constant pressure \t\t\t#Unit:kJ/kg*K\n", + "print \"Specific heat at constant pressure is %.2f kJ/kg*K\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.65 kJ/kg*K\n", + "Specific heat at constant pressure is 0.91 kJ/kg*K\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "R = 60.; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "deltah = 500.; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n", + "deltau = 350.; \t\t\t#Btu/lbm \t\t\t#change in internal energy\n", + "J = 778.; \t\t\t#conversion factor\n", + "#Because deltah-(cp*deltaT) and deltau = cv*deltaT\n", + "# deltah/deltau = (cp*deltaT)/(cv*deltaT) = cp/cv = k\n", + "k = deltah/deltau; \t\t\t#Ratio of specific heats\n", + "print \"Ratio of specific heats k is %.2f\"%(k);\n", + "#From equation cv = R/(J*(k-1))\n", + "cv = R/(J*(k-1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "cp = k*cv; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of specific heats k is 1.43\n", + "Specific heat at constant volume is 0.18 Btu/lbm*R\n", + "Specific heat at constant pressure is 0.26 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#When solving this type of problem,it is necessary to note carefully the information given and to write the correct energy equation for this process.Because the process is carried out at constant volume,the heat added equals the change in inernal energy.Because the change in internal energy per pound for the ideal gas is cv*(T2-T1),the total change in internal energy for m pounds must equals the heat added.Thus,\n", + "#data given\n", + "Q = 0.33; \t\t\t#heat\n", + "#Initial conditions\n", + "V = 60; \t\t\t#in**3 \t\t\t#volume\n", + "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n", + "p1 = 90; \t\t\t#psia \t\t\t#pressure\n", + "T1 = 460+40; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "#Final condition = Initial condition + heat\n", + "V = 60; \t\t\t#in**3 \t\t\t#volume\n", + "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n", + "p2 = 108; \t\t\t#psia \t\t\t#pressure \n", + "T2 = 460+140; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "#Q = m*(u2-u1) = m*cv*(T2-T1)\n", + "\n", + "# Calculations and Results\n", + "cv = Q/(m*(T2-T1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "#To obtain cp,it is first necessary to obtain R.Enough information was given in the initial conditions of the problem to apply eqn. p*V = m*R*T\n", + "R = (144*p1*(V/1728.))/(m*T1); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "print \"Consmath.tant of proportionality R is %.2f ft*lbf/lbm*R\"%(R);\n", + "#cp-cv = (R/J)\n", + "J = 778.; \t\t\t#conversion factor\n", + "cp = cv+(R/J); \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant volume is 0.28 Btu/lbm*R\n", + "Consmath.tant of proportionality R is 77.59 ft*lbf/lbm*R\n", + "Specific heat at constant pressure is 0.38 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16 Page No : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#data\n", + "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n", + "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n", + "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "#On the basis of the data given,\n", + "deltas = (cp*(math.log(T2/T1)))-((R/J)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n", + "\n", + "# Results\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in enthalpy is 0.08 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#data of problem6.16\n", + "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n", + "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n", + "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#Because cp and R are given,let us first solve for cv,\n", + "#cp = (R*k)/(J*(k-1))\n", + "k = (cp*J)/((cp*J)-R); \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "print \"Ratio of specific heats k is %.2f\"%(k);\n", + "#k = cp/cv\n", + "cv = cp/k; \t\t\t#Specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n", + "#Now, deltas = (cv*math.log(p2/p1))+(cp*math.log(v2/v1));\n", + "#But, v2/v1 = (T2*p1)/(T1*p2)\n", + "v2byv1 = (T2*p1)/(T1*p2); \t\t\t# v2/v1 \t\t\t#unitless\n", + "deltas = (cv*math.log(p2/p1))+(cp*math.log(v2byv1)); \t\t\t#The change in enthalpy \t\t\t#unit:Btu/lbm*R\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n", + "#The agreement is very good.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of specific heats k is 1.40\n", + "Specific heat at constant volume is 0.17 Btu/lbm*R\n", + "The change in enthalpy is 0.08 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18 Page No : 261" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#data,\n", + "cp = 0.9093; \t\t\t#Specific heat at constant pressure \t\t\t#kJ/kg*R\n", + "p2 = 150.; \t\t\t#kPa \t\t\t#final pressure\n", + "p1 = 500.; \t\t\t#kPa \t\t\t#initial pressure\n", + "T2 = 273.+0; \t\t\t#final temperature \t\t\t#Celsius converted to kelvin\n", + "T1 = 273.+100; \t\t\t#initial temperature \t\t\t#Celsius converted to kelvin\n", + "#J = 778; \t\t\t#conversion factor\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "\n", + "# Calculations\n", + "#Using equation, and dropping J gives,\n", + "deltas = (cp*(math.log(T2/T1)))-((R)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#kJ/kg*K\n", + "#For 2 kg,\n", + "deltaS = 2*deltas; \t\t\t#The change in enthalpy in kJ/K\n", + "\n", + "# Results\n", + "print \"For 2 kg oxygen, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 2 kg oxygen, The change in enthalpy is 0.06 kJ/K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19 Page No : 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#from the equation, deltas/cv = (k*math.log(v2/v1))+ math.log(p2/p1) \t\t\t#change in entropy\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "#deltas = (1/4)*cv \t\t\t#so, \n", + "# 1/4 = (k*math.log(v2/v1))+ math.log(p2/p1)\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#initial specific volume \n", + "v1 = 1.; \t\t\t#final specific volume\n", + "\n", + "# Calculations\n", + "p2byp1 = math.exp((1./4)-(k*math.log(v2/v1))); \t\t\t#increase in pressure\n", + "\n", + "# Results\n", + "print \"p2/p1 = %.2f\"%(p2byp1);\n", + "print \"So, increase in pressure is %.2f \"%(p2byp1);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "p2/p1 = 3.39\n", + "So, increase in pressure is 3.39 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "T2 = 460+270; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n", + "T1 = 460+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n", + "cv = 0.17; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "\n", + "# Calculations\n", + "#Now,\n", + "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "#For 1/2 lb,\n", + "deltaS = (1./2)*deltas; \t\t\t#The change in enthalpy in Btu/R\n", + "\n", + "# Results\n", + "print \"For 1/2 lb of gas, The change in enthalpy is %.2f Btu/R\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 1/2 lb of gas, The change in enthalpy is 0.00 Btu/R\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "T2 = 100.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "cv = 0.7186; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n", + "#Now,\n", + "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:kJ/kg*K\n", + "#For 0.2 kg,\n", + "deltaS = (0.2)*deltas; \t\t\t#The change in enthalpy in kJ/K\n", + "print \"For 0.2 kg of air, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 0.2 kg of air, The change in enthalpy is 0.03 kJ/K\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "deltas = 0.0743; \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n", + "T1 = 460+100; \t\t\t#Fahrenheit temperature converted to absolute initial temperature\n", + "cv = 0.219; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "#Now,\n", + "\n", + "# Calculations\n", + "#deltas = cv*math.log(T2/T1); \n", + "T2 = T1*math.exp(deltas/cv); \t\t\t#higher temperature \t\t\t#absolute temperature \t\t\t#unit:R\n", + "\n", + "# Results\n", + "print \"The higher temperature is %.2f R\"%(T2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The higher temperature is 786.20 R\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.23 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data\n", + "deltaS = 0.4386; \t\t\t#change in entropy \t\t\t#Unit:kJ/K\n", + "T2 = 273+425; \t\t\t#Celsius temperature converted to kelvin \t\t\t#initial temperature\n", + "cv = 0.8216; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n", + "m = 1.5; \t\t\t#mass \t\t\t#kg\n", + "#Now,\n", + "\n", + "# Calculations\n", + "#deltas = m*cv*math.log(T2/T1); \n", + "T1 = T2/(math.exp(deltaS/(m*cv))) \t\t\t#initial temperature \t\t\t#unit:K\n", + "\n", + "# Results\n", + "print \"The initial temperature of the process is %.2f K or %.2f C\"%(T1,T1-273)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The initial temperature of the process is 488.98 K or 215.98 C\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.24 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T2 = 460.+400; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n", + "T1 = 460.+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n", + "#q = deltah = cp*(T2-T1)\n", + "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lb \t\t\t#into system\n", + "print \"The heat transferred is %.2f Btu/lbinto system)\"%(deltah);\n", + "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#Btu/lbm*R\n", + "print \"The increase in entropy is %.2f Btu/lbm*R\"%(deltas);\n", + "#The flow work change is (p2*v2)/J - (p1*v1)/J = (R/J)*(T2-T1)\n", + "flowworkchange = (R/J)*(T2-T1); \t\t\t#Btu/lbm \t\t\t#The flow work change per pound of air\n", + "print \"The flow work change per pound of air is %.2f Btu/lbm\"%(flowworkchange);\n", + "#In addition to each of the assumptions made in all the process being considered,it has further been tacitly assumed that these processes are carried out quasi- statically and without friction.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transferred is 79.20 Btu/lbinto system)\n", + "The increase in entropy is 0.12 Btu/lbm*R\n", + "The flow work change per pound of air is 22.60 Btu/lbm\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.25 Page No : 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "cp = 1.0062; \t\t\t#specific heat at constant pressure \t\t\t#kJ/kg*K\n", + "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n", + "#q = deltah = cp*(T2-T1)\n", + "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#kJ/kg \t\t\t#into system\n", + "print \"The heat transferred is per kimath.logram of air %.2f kJ/kg\"%(deltah);\n", + "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#kJ/kg*K\n", + "print \"The increase in entropy per kimath.logram of air is %.2f kJ/kg*K\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat transferred is per kimath.logram of air 482.98 kJ/kg\n", + "The increase in entropy per kimath.logram of air is 0.98 kJ/kg*K\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26 Page No : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "v2 = 2.; \t\t\t#Because,v2 = (2)*v1 \t\t\t#volume increases to its twice its final volume\n", + "v1 = 1.; \t\t\t#initial volume\n", + "T = 460.+200; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./28; \t\t\t#moleculer weight of nitrogen = 28 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "#From the equation, w/J = q = T*deltas = ((R*T)/J)*math.log(v2/v1)\n", + "q = ((R*T)/J)*math.log(v2/v1); \t\t\t#Btu/lbm \t\t\t#the heat added to system\n", + "#For 0.1 lb,\n", + "Q = 0.1*q; \t\t\t#Btu \t\t\t#the heat added to system\n", + "print \"The heat added to system is %.2f Btu\"%(Q);\n", + "#The work out of the system is equal to the heat added;thus,\n", + "WbyJ = Q; \t\t\t#The work out of the system(out of the system) \t\t\t#unit:Btu\n", + "print \"The work out of the system is %.2f Btuout of the system)\"%(WbyJ);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is 3.24 Btu\n", + "The work out of the system is 3.24 Btuout of the system)\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27 Page No : 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature \t\t\t#unit:K\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n", + "v1 = 1.;\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "#From the equation, q = ((R*T))*math.log(v2/v1)\n", + "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n", + "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n", + "#The work out of the system is equal to the heat added;thus,\n", + "W = q; \t\t\t#The work out of the system \t\t\t#unit:kJ/kg\n", + "print \"The work out of the system is %.2f kJ/kginto system)\"%(W);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is -58.17 kJ/kgheat out of system)\n", + "The work out of the system is -58.17 kJ/kginto system)\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28 Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given in problem 6.27\n", + "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n", + "v1 = 1;\n", + "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "#From the equation, q = ((R*T))*math.log(v2/v1)\n", + "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n", + "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n", + "#For a constant temperature,\n", + "deltas = q/T; \t\t\t#Change in entropy \t\t\t#unit:kJ/kg*K\n", + "print \"The change in entropy is %.2f kJ/kg*K\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat added to system is -58.17 kJ/kgheat out of system)\n", + "The change in entropy is -0.18 kJ/kg*K\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29 Page No : 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T1 = 1000; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "p2 = 1.; \t\t\t#unit:atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#unit:atm \t\t\t#absolute initial pressure\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "\n", + "# Calculations and Results\n", + "#From the equation, \n", + "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:R \t\t\t#The absolute final temperature\n", + "print \"The absolute final temperature is %.2f R\"%(T2);\n", + "work = (R*(T2-T1))/(J*(1-k)); \t\t\t#Btu/lbm \t\t\t#The work done by air(out)\n", + "print \"The work done by air is %.2f Btu/lbmout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 631.39 R\n", + "The work done by air is 63.11 Btu/lbmout)\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30 Page No : 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#data given\n", + "#mass of 1 kg\n", + "T1 = 500+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n", + "J = 778.; \t\t\t#conversion factor\n", + "R = 8.314/29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heat\n", + "#From the equation, \n", + "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:Kelvin \t\t\t#The absolute final temperature\n", + "print \"The absolute final temperature is %.2f K or %.2f C\"%(T2,T2-273);\n", + "work = (R*(T2-T1))/((1-k)); \t\t\t#kJ/kg \t\t\t#The work done by air(out)\n", + "print \"The work done by air is %.2f kJ/kgout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 488.06 K or 215.06 C\n", + "The work done by air is 204.22 kJ/kgout)\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31 Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "T1 = 800.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n", + "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n", + "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n", + "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n", + "\n", + "# Calculations\n", + "#A gas expands isentropically\n", + "#From the equation,\n", + "#T2/T1 = ((p2/p1)**((k-1)/k));\n", + "#rearranging,\n", + "k = inv(1-((math.log(T2/T1)/math.log(p2/p1)))); \t\t\t#k = cp/cv \t\t\t#Ratio of specific heats\n", + "\n", + "# Results\n", + "print \"Ratio of specific heats k) is %.2f\"%(k);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;31m#T2/T1 = ((p2/p1)**((k-1)/k));\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;31m#rearranging,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT2\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mT1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mmath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp2\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mp1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#k = cp/cv #Ratio of specific heats\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;31m# Results\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "n = 1.3; \t\t\t#p*v**1.3 = constant\n", + "k = 1.4; \t\t\t#k = cp/cv Ratio of specific heats \n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unit:R\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "cv = cp/k; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n", + "#Therefore,\n", + "cn = cv*((k-n)/(1-n)); \t\t\t#Polytropic specific heat \t\t\t#Btu/lbm*R\n", + "print \"Polytropic specific heatcn, is %.2f Btu/lbm*R\"%(cn);\n", + "#The negative sign of cn indicates that either the heat transfer for the process comes from the system or there is a negative temperature change while heat is transferred to the system.\n", + "#The heat transferred is cn*(T2-T1).Therefore,\n", + "q = cn*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lbm(to the system)\n", + "print \"The heat transferred is %.2f Btu/lbmto the system\"%(q);\n", + "#The work done can be found Using equation,\n", + "w = (R*(T2-T1))/(J*(1-n)); \t\t\t#Btu/lbm \t\t\t#the workdone(from the system)\n", + "print \"The work done is %.2f Btu/lbmfrom the system\"%(w);\n", + "deltas = cn*math.log(T2/T1) \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n", + "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Polytropic specific heatcn, is -0.06 Btu/lbm*R\n", + "The heat transferred is 51.43 Btu/lbmto the system\n", + "The work done is 205.53 Btu/lbmfrom the system\n", + "The change in enthalpy is 0.05 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33 Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given in problem 6.32,\n", + "n = 1.3; \t\t\t#p*v**1.3 = constant\n", + "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n", + "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n", + "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n", + "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unir:R\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "J = 778.; \t\t\t#conversion factor\n", + "#Equation,\n", + "# T1/T2 = ((p1/p2)**((n-1)/n));\n", + "#rearranging,\n", + "p1byp2 = math.exp(math.log(T1/T2)/((n-1)/n)); \t\t\t#The ratio of inlet to outlet pressure\n", + "print \"The ratio of inlet to outlet pressure is %.2f\"%(p1byp2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ratio of inlet to outlet pressure is 53.02\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34 Page No : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the table at 1000 R: \t\t\t#From the table at 500 R:\n", + "h2 = 240.98; \n", + "h1 = 119.48; \n", + "#Btu/lbm \t\t\t#enthalpy \t\t\t#Btu/lbm \t\t\t#enthalpy\n", + "u2 = 172.43; \n", + "u1 = 85.20; \n", + "#Btu/lbm \t\t\t#internal energy \t\t\t#Btu/lbm \t\t\t#internal energy \n", + "fy2 = 0.75042; \n", + "fy1 = 0.58233; \n", + "#Btu/lbm*R \t\t\t#Btu/lbm*R\n", + "\n", + "#The change in enthalpy is\n", + "deltah = h2-h1; \t\t\t#Btu/lbm\n", + "#The change in internal energy is\n", + "deltau = u2-u1; \t\t\t#Btu/lbm\n", + "print \"The change in enthalpy is %.2f Btu/lbm & the change in internal energy is %.2f Btu/lbm\"%(deltah,deltau);\n", + "#Because in the constant-pressure process -R*math.log(p2/p1) is zero,\n", + "deltas = fy2-fy1; \t\t\t#Btu/lbm*R \t\t\t#The entropy when air is heated at constant pressure\n", + "print \"The entropy when air is heated at constant pressure is %.2f Btu/lbm/R\"%(deltas);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in enthalpy is 121.50 Btu/lbm & the change in internal energy is 87.23 Btu/lbm\n", + "The entropy when air is heated at constant pressure is 0.17 Btu/lbm/R\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.35 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#In this problem,the air expands from 5 atm absolute to 1 atm absolute from an initial temperature of 1000R,\n", + "pr = 12.298; \t\t\t#relative pressure \t\t\t#unit:atm \n", + "h = 240.98; \t\t\t#Btu/lbm \t\t\t#enthalpy \n", + "pr = 12.298/5; \t\t\t#The value of the final relative pressure \t\t\t#unit:atm\n", + "#Interpolation in the air table yields the following:\n", + "# T pr\n", + "# 620 2.249\n", + "# 2.4596\n", + "# 640 2.514\n", + "T = 620+(((2.4596-2.249)/(2.514-2.249))*20); \t\t\t#the final temperature \t\t\t#unit:R\n", + "print \"The absolute final temperature is %.2f R\"%(T);\n", + "u1 = 172.43; \t\t\t#initial internal energy \t\t\t#Btu/lbm\n", + "u2 = 108.51; \t\t\t#final internal energy \t\t\t#Btu/lbm\n", + "work = u1-u2; \t\t\t#Btu/lbm The work done by air in an isentropic nonflow expansion \t\t\t#where the value of u2 is obtained by interpolation at T temperature and the value of u1 is read from the air table at 1000 R. \n", + "print \"The work done by air in an isentropic nonflow expansion is %.2f Btu/lbmout)\"%(work)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute final temperature is 635.89 R\n", + "The work done by air in an isentropic nonflow expansion is 63.92 Btu/lbmout)\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.36 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "T = 1000+460; \t\t\t#Fahrenheit temperature converted to absolute temperature\n", + "#The velocity of sound in air at 1000 F is\n", + "Va = 49.0*math.sqrt(T); \t\t\t#velocity \t\t\t#ft/s\n", + "print \"The velocity of sound air at 1000 F is %.2f ft/s\"%(Va);\n", + "#Hydrogen has a specific heat ratio of 1.41 and R = 766.53.Therefore,\n", + "khydrogen = 1.41; \t\t\t#specific heats ratio for air\n", + "kair = 1.40; \t\t\t#specific heats ratio for air\n", + "Rhydrogen = 766.53; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "Rair = 53.36; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "# Vahydrogen/Vaair = math.sqrt((Rhydrogen*khydrogen)/(Rair*kair))\n", + "#rearranging,\n", + "Vahydrogen = Va*math.sqrt((Rhydrogen*khydrogen)/(Rair*kair)); \t\t\t#The velocity of sound in hydrogen at 1000 F \t\t\t#unit:ft/s\n", + "print \"The velocity of sound in hydrogen at 1000 F is %.2f ft/s\"%(Vahydrogen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound air at 1000 F is 1872.29 ft/s\n", + "The velocity of sound in hydrogen at 1000 F is 7121.55 ft/s\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.37 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# given data\n", + "T = 200+460.; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n", + "V = 1500; \t\t\t#ft/s \t\t\t#the local velocity\n", + "Va = 49.0*math.sqrt(T); \t\t\t#velocity of sound air at 200 F \t\t\t#unit:ft/s\n", + "print \"The velocity of sound air at 200 F is %.2f ft/s\"%(Va);\n", + "M = V/Va; \t\t\t#The Mach number = the local velocity/velocity of sound \t\t\t#unitless\n", + "print \"The Mach number is %.2f\"%(M);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of sound air at 200 F is 1258.83 ft/s\n", + "The Mach number is 1.19\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.38 Page No : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#data given\n", + "V = 1000; \t\t\t#ft/s \t\t\t#the fluid velocity\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "J = 778; \t\t\t#conversion factor\n", + "h = 1204.4; \t\t\t#Btu/lbm \t\t\t#enthalpy of saturated steam\n", + "#h0-h = V**2/(2*gc*J) \n", + "h0 = h+((V**2)/(2*gc*J)); \t\t\t#Btu/lbm \t\t\t#h0 = stagnation enthalpy\n", + "print \"The total enthalpy is %.2f Btu/lbm\"%(h0);\n", + "#It will be noted for this problem that if the initial velocity had been 100ft/s,deltah would have been 0.2 Btu/lbm,and for most practical purpposes,the total properties and those of the flowing fluid would have been essentially the same.Thus,for low-velocity fluids,the difference in total and steam properties can be neglected.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total enthalpy is 1224.38 Btu/lbm\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.39 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# given data\n", + "k = 1.4; \t\t\t#the specific heats ratio \t\t\t#k = cp/cv\n", + "M = 1; \t\t\t#(table 6.5) \t\t\t#The Mach number = the local velocity/velocity of sound\n", + "T0 = 800; \t\t\t#absolute temperature \t\t\t#unit:R\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "R = 53.35; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "p0 = 300; \t\t\t#psia \t\t\t#pressure\n", + "\n", + "# * or \"star\" subscripts to conditions in which M = 1;\n", + "# \"0\" subscript refers to isentropic stagnation\n", + "#Refer to figure 6.26,\n", + "#Tstar/T0 = 0.8333\n", + "Tstar = T0*0.8333; \t\t\t#temperature when M = 1 \t\t\t#unit:R\n", + "print \"If the mach number at the outlet is unity, temperature is %.2f R\"%(Tstar);\n", + "Vat = math.sqrt(gc*R*Tstar*k); \t\t\t#ft/s \t\t\t#Vat = V2 \t\t\t#local velocity of sound\n", + "print \"If the mach number at the outlet is unity, velocity is %.2f ft/s\"%(Vat)\n", + "\n", + "#For A/Astar = 2.035\n", + "#The table yields\n", + "M1 = 0.3; \t\t\t#mach number at inlet\n", + "print \"At inlet, The mach number is %.2f\"%(M1)\n", + "#pstar/p0 = 0.52828\n", + "pstar = p0*0.52828; \t\t\t#pressure when M = 1 \t\t\t#psia\n", + "#also,\n", + "#T1/T0 = 0.98232 and p1/p0 = 0.93947\n", + "#Therefore,\n", + "T1 = T0*0.982332; \t\t\t#unit:R \t\t\t#T1 = temperature at inlet\n", + "print \"At inlet, The temperature is %.2f R\"%(T1);\n", + "p1 = p0*0.93947; \t\t\t#psia \t\t\t#p1 = pressure at inlet\n", + "print \"At inlet, The pressure is %.2f psia\"%(p1);\n", + "#From the inlet conditions derived,\n", + "Va1 = math.sqrt(gc*k*R*T1); \t\t\t#ft/s \t\t\t#V1 = velocity at inlet\n", + "V1 = M1*Va1; \t\t\t#ft/s \t\t\t#velocity\n", + "print \"At inlet, The velocity is %.2f ft/s\"%(V1);\n", + "#The specific volume at inlet is found from the equation of state for an ideal gas:\n", + "v = (R*T1)/(p1*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "rho = inv(v); \t\t\t#inverse of specific volume \t\t\t#density\n", + "A = 2.035; \t\t\t#area \t\t\t#ft**2\n", + "m = rho*A*V1; \t\t\t#mass flow \t\t\t#unit:lbm/s\n", + "print \"At inlet, The mass flow is %.2f lbm/s\"%(m);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If the mach number at the outlet is unity, temperature is 666.64 R\n", + "If the mach number at the outlet is unity, velocity is 1265.62 ft/s\n", + "At inlet, The mach number is 0.30\n", + "At inlet, The temperature is 785.87 R\n", + "At inlet, The pressure is 281.84 psia\n", + "At inlet, The velocity is 412.24 ft/s\n" + ] + }, + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[0;31m#The specific volume at inlet is found from the equation of state for an ideal gas:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 36\u001b[0m \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mR\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mT1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;36m144\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#ft**3/lbm #1 ft**2 = 144 in**2(for conversion of unit) #specific volume\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 37\u001b[0;31m \u001b[0mrho\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mv\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#inverse of specific volume #density\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 38\u001b[0m \u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m2.035\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#area #ft**2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 39\u001b[0m \u001b[0mm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrho\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mA\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mV1\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#mass flow #unit:lbm/s\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.40 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# * or \"star\" subscripts to conditions in which M = 1;\n", + "# \"0\" subscript refers to isentropic stagnation\n", + "#This problem will be solved by two methods(A and B)\n", + "print \"Method A\"; \t\t\t#By equations:\n", + "k = 1.4; \t\t\t#the specific heat ratio \t\t\t#k = cp/cv\n", + "R = 53.3; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n", + "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n", + "print \"Solution for a\";\n", + "# T/Tstar = (k+1)/(2*(1+((1/2)*(k-1)*M**2)))\n", + "# Tstar/T0 = 2/(k+1)\n", + "#Therefore,\n", + "# (Tstar/T0)*(T/Tstar) = (T/T0) = 1/(1+((1/2)*(k-1)*M**2))\n", + "T0 = 560; \t\t\t#absolute temperature or stagnation temperature \t\t\t#unit:R\n", + "T = T0/(1+((1/2)*(k-1)*M**2)); \t\t\t#temperature at M = 2.5\n", + "print \"The temperature is %.2f R\"%(T);\n", + "print \"Solution for b\";\n", + "p = 0.5; \t\t\t#static pressure \t\t\t#unit:psia\n", + "# p0/p = (T0/T)**(k/(k-1))\n", + "p0 = p*14.7*((T0/T)**(k/(k-1))); \t\t\t#pressure at M = 2.5 \t\t\t#unit:psia\n", + "print \"The pressure is %.2f psia\"%(p0);\n", + "print \"Solution for c\";\n", + "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n", + "Va = math.sqrt(gc*k*R*T); \t\t\t#ft/s \t\t\t#local velocity of sound\n", + "V = M*Va; \t\t\t#valocity at M = 2.5 \t\t\t#unit:ft/s\n", + "print \"The velocity is %.2f ft/s\"%(V);\n", + "print \"Solution for d\";\n", + "v = (R*T)/(p*14.7*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2 \t\t\t#specific volume at M = 2.5\n", + "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n", + "print \"Solution for e\";\n", + "#Mass velocity is definrd as the mass flow per unit area\n", + "# m/A = (A*V)/(v*A) = V/v\n", + "print \"The mass velocity is %.2f lbm/s*ft**2)\"%(V/v); \t\t\t#mass velocity at M = 2.5\n", + "\n", + "\n", + "print \"Method B\"; \t\t\t#By the gas tables: \t\t\t#table 6.5 gives\n", + "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n", + "print \"Solution for a\";\n", + "T0 = 560; \t\t\t#absolute temperature or stagnation temperature\n", + "#T/T0 = 0.44444\n", + "T = T0*0.44444; \t\t\t#temperature at M = 2.5\n", + "print \"The temperature is %.2f R\"%(T)\n", + "print \"Solution for b\";\n", + "p = 0.5; \t\t\t#static pressure\n", + "#p/p0 = 0.05853\n", + "p0 = (p*14.7)/0.05853; \t\t\t#pressure at M = 2.5\n", + "print \"The pressure is %.2f psia\"%(p0);\n", + "print \"Solution for c\";\n", + "print \"As before %.2f ft/s\"%(V)\n", + "print \"Solution for d\";\n", + "print \"As before %.2f ft**3/lbm\"%(v)\n", + "print \"Solution for e\";\n", + "print \"As before %.2f lbm/s*ft**1)\"%(V/v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Method A\n", + "Solution for a\n", + "The temperature is 560.00 R\n", + "Solution for b\n", + "The pressure is 7.35 psia\n", + "Solution for c\n", + "The velocity is 2898.59 ft/s\n", + "Solution for d\n", + "The specific volume is 28.20 ft**3/lbm\n", + "Solution for e\n", + "The mass velocity is 102.78 lbm/s*ft**2)\n", + "Method B\n", + "Solution for a\n", + "The temperature is 248.89 R\n", + "Solution for b\n", + "The pressure is 125.58 psia\n", + "Solution for c\n", + "As before 2898.59 ft/s\n", + "Solution for d\n", + "As before 28.20 ft**3/lbm\n", + "Solution for e\n", + "As before 102.78 lbm/s*ft**1)\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.41 Page No : 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#For Methane(CH4,MW = 16)\n", + "p = 500; \t\t\t#evaluate specific volume at p pressure \t\t\t#Unit:psia\n", + "pc = 674; \t\t\t#critical temperature \t\t\t#Unit:psia\n", + "T = 50+460; \t\t\t#evaluate specific volume at T temperature \t\t\t#Unit:R\n", + "Tc = 343; \t\t\t#critical temperature \t\t\t#Unit:R\n", + "R = 1545./16; \t\t\t#gas constant R = 1545/Molecular Weight \t\t\t#ft*lbf/lbm*R\n", + "pr = p/pc; \t\t\t#reduced pressure \t\t\t#unit:psia\n", + "Tr = T/Tc; \t\t\t#reduced temperature \t\t\t#unit:R\n", + "#Reading figure 6.28 at these values gives\n", + "Z = 0.93; \t\t\t#compressibility factor\n", + "#Z = (p*v)/(R*T)\n", + "v = Z*((R*T)/(p*144)); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "print \"Using the value of Z = 0.93, the specific volume is %.2f ft**3/lbm\"%(v);\n", + "#For ideal gas,\n", + "v = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n", + "print \"For the ideal gas, the specific volume is %.2f ft**3/lbm\"%(v);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using the value of Z = 0.93, the specific volume is 0.64 ft**3/lbm\n", + "For the ideal gas, the specific volume is 0.68 ft**3/lbm\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7.ipynb new file mode 100755 index 00000000..5b56ae9e --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7.ipynb @@ -0,0 +1,1099 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:66356009206cf2a059db6adf4246ee44a4d1b30e2da1d2c932b5c468912f3519" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Mixtures of Ideal Gases" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As the basis of the calculation,assume that we have 1 lbm of mixture.Also,take the molecular weight of oxygen to be 32.00 and nitrogen to be 28.02.(from table7.1)\n", + "print \"Solution for a\";\n", + "nO2 = 0.2315/32; \t\t\t#no of moles of oxygen = ratio of mass and molecular weight \t\t\t#0.2315 lb of oxygen per pound\n", + "print \"The moles of oxygen is %.2f mole/lbm of mixture\"%(nO2);\n", + "nN2 = 0.7685/28.02; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#0.7685 lb of nitrogen per pound\n", + "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n", + "nm = nO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n", + "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n", + "xO2 = nO2/nm; \t\t\t#mole fraction of oxygen = ratio of no of moles of oxygen and total moles in mixture\n", + "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of oxygen is %.2f and the mole fraction of nitrogen is %.2f\"%(xO2,xN2);\n", + "#(Check:xO2+xN2 = 1)\n", + "print \"xO2+xN2 = %.2f\"%(xO2+xN2);\n", + "\n", + "print \"Solution for b\";\n", + "# the air is at 14.7 psia\n", + "pO2 = xO2*14.7; \t\t\t#the partial pressure of oxygen = pressure of air * the mole fraction of oxygen \t\t\t#psia\n", + "print \"The partial pressure of oxygen is %.2f psia\"%(pO2);\n", + "pN2 = xN2*14.7; \t\t\t#the partial pressure of nitrogen = pressure of air * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "print \"Solution for c\";\n", + "MWm = (xO2*32) + (xN2*28.02); \t\t\t#the molecular weight of air = sum of products of mole fraction of each gas component\n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "\n", + "print \"Solution for d\";\n", + "Rm = 1545/MWm; \t\t\t#the gas constant of air\n", + "print \"The gas constant of air is %.2f\"%(Rm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The moles of oxygen is 0.01 mole/lbm of mixture\n", + "The moles of nitrogen is 0.03 mole/lbm of mixture\n", + "The total number of moles is 0.03 mole/lbm\n", + "The mole fraction of oxygen is 0.21 and the mole fraction of nitrogen is 0.79\n", + "xO2+xN2 = 1.00\n", + "Solution for b\n", + "The partial pressure of oxygen is 3.07 psia\n", + "The partial pressure of nitrogen is 11.63 psia\n", + "Solution for c\n", + "The molecular weight of air is 28.85\n", + "Solution for d\n", + "The gas constant of air is 53.55\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For Gaseous Freon-12 (CCl2F2)\n", + "#MW of air = 29 & MW of freon-12 = 120.9\n", + "#initial pressure in math.tank is atmospheric pressure that is 14.7 psia\n", + "#final pressure of math.tank is 1000 psia\n", + "#The partial pressure of the Freon-12 is 1000-14.7\n", + "print \"The partial pressure of the Freon-12 is %.2f\"%(1000-14.7)\n", + "#the mole fraction of air = the initial pressure / final pressure\n", + "print \"The mole fraction of air is %.2f\"%(14.7/1000)\n", + "#the mole fraction of freon = the partial pressure of freon / the final pressure\n", + "print \"The mole fraction of Freon-12 is %.2f\"%((1000-14.7)/1000)\n", + "MWm = ((14.7/1000)*29) + (((1000-14.7)/1000)*120.9);\t\t\t#the molecular weight of mixture = sum of products of mole fraction of each gas component \n", + "print \"The molecular weight of the mixture is %.2f\"%(MWm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the Freon-12 is 985.30\n", + "The mole fraction of air is 0.01\n", + "The mole fraction of Freon-12 is 0.99\n", + "The molecular weight of the mixture is 119.55\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Ten pounds of air,1 lb of carbon dioxide,and 5 lb of nitrogen are mixed at constant temperature until the mixture pressure is constant\n", + "nair = 10./29; \t\t\t#no of moles of air = ratio of mass and molecular weight \t\t\t#10 lb of nitrogen per pound \t\t\t#molecular weight of air = 29\n", + "print \"The moles of air is %.2f mole/lbm of mixture\"%(nair);\n", + "nCO2 = 1./44; \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#1 lb of per pound \t\t\t#molecular weight of CO2 = 44\n", + "print \"The moles of carbon dioxide is %.2f mole/lbm of mixture\"%(nCO2);\n", + "nN2 = 5./28; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound \t\t\t#molecular weight of N2 = 28\n", + "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n", + "nm = nair+nCO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n", + "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n", + "\n", + "xair = nair/nm \t\t\t#mole fraction of air = ratio of no of moles of air and total moles in mixture\n", + "xCO2 = nCO2/nm; \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n", + "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of air is %.2f \"%(xair);\n", + "print \"The mole fraction of carbon dioxide is %.2f\"%(xCO2)\n", + "print \"The mole fraction of nitrogen is %.2f\"%(xN2);\n", + "\n", + "#final pressure of is 100 psia\n", + "pair = xair*100; \t\t\t#the partial pressure of air = final pressure * the mole fraction of air \t\t\t#psia\n", + "print \"The partial pressure of air is %.2f psia\"%(pair);\n", + "pCO2 = xCO2*100; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n", + "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n", + "pN2 = xN2*100; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n", + "MWm = (xair*29) + (xCO2*44) + (xN2*28); \t\t\t#The molecular weight of air \n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "\n", + "Rm = 1545/MWm; \t\t\t#the gas constant of air\n", + "print \"The gas constant of air is %.2f\"%(Rm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moles of air is 0.34 mole/lbm of mixture\n", + "The moles of carbon dioxide is 0.02 mole/lbm of mixture\n", + "The moles of nitrogen is 0.18 mole/lbm of mixture\n", + "The total number of moles is 0.55 mole/lbm\n", + "The mole fraction of air is 0.63 \n", + "The mole fraction of carbon dioxide is 0.04\n", + "The mole fraction of nitrogen is 0.33\n", + "The partial pressure of air is 63.14 psia\n", + "The partial pressure of carbon dioxide is 4.16 psia\n", + "The partial pressure of nitrogen is 32.70 psia\n", + "The molecular weight of air is 29.30\n", + "The gas constant of air is 52.74\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#five moles of oxygen and 10 moles of hydrogen are mixed\n", + "#The total number of moles is 10+5 = 15.Therefore,mole fraction of each constituent is\n", + "xO2 = 5./15; \t\t\t#The mole fraction of oxygen \n", + "xH2 = 10./15; \t\t\t#The mole fraction of hydrogen\n", + "print \"The mole fraction of oxygen is %.2f and of hydrogen is %.2f\"%(xO2,xH2);\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component(MW of O2 = 32 and MW of H2 = 2.016)\n", + "print \"The molecular weight of the final mixture is %.2f\"%((((5./15)*32)+10./15)*2.016)\n", + "R = 1545./32; \t\t\t#the gas constant of oxygen\n", + "T = 460.+70; \t\t\t#absolute temperature \t\t\t#Unit:R\n", + "p = 14.7; \t\t\t#pressure \t\t\t#psia\n", + "#The partial volume of the oxygen can be found as follows:per pound of oxygen,\n", + "#p*vO2 = R*T;\n", + "vO2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n", + "#Because there are 5 moles of oxygen,each containing 32 lbm,\n", + "VO2 = vO2*5*32; \t\t\t#ft**3 \t\t\t#partial volume of oxygen\n", + "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n", + "#For the hydrogen,we can simplify the procedure by noting that the fraction of the total volume occupied by the oxygen is the same as its mole fraction.Therefore,\n", + "Vm = 3*VO2; \t\t\t#total volume occupied \t\t\t#ft**3\n", + "print \"The mixture volume is %.2f ft**3\"%(Vm);\n", + "#and the hydrogen volume\n", + "VH2 = Vm-VO2; \t\t\t#Ft**2 \t\t\t#partial volume of hydrogen\n", + "print \"From simplified procedure, The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "\n", + "#We could obtain the partial volume of hydrogen by proceeding as we did for the oxygen.Thus,\n", + "#p*vH2 = R*T;\n", + "R = 1545/2.016; \t\t\t#the gas constant of hydrogen\n", + "vH2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n", + "#Because there are 10 moles of hydrogen,each containing 2.016 lbm,\n", + "VH2 = vH2*10*2.016; \t\t\t#ft**3 \t\t\t#partial volume of hydrogen\n", + "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "#Which checks our previous values.\n", + "\n", + "\n", + "print \"From another method\"\n", + "#As an alternative to the foregoing,we could also use the fact that at 14.7 psia and 32F a mole of any gas occupies a volume of 358 ft**3.\n", + "print \"At 70F and 14.7 psia, a mole occupies %.2f ft**3\"%((((358*460+70.)/460+32))); \n", + "#Therefore, 5 moles of oxygen occupies \n", + "VO2 = 5*358*((460+70.)/(460+32)); \t\t\t#The partial volume of oxygen \t\t\t#ft**3\n", + "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n", + "#and 10 moles of hydrogen occupies\n", + "VH2 = 10*358*((460+70.)/(460+32)); \t\t\t#The partial volume of hydrogen \t\t\t#ft**3\n", + "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n", + "#Both values are in good agreement with the previous calculations.\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mole fraction of oxygen is 0.33 and of hydrogen is 0.67\n", + "The molecular weight of the final mixture is 22.85\n", + "The partial volume of oxygen is 1934.17 ft**3\n", + "The mixture volume is 5802.51 ft**3\n", + "From simplified procedure, The partial volume of hydrogen is 3868.34 ft**3\n", + "The partial volume of hydrogen is 3868.34 ft**3\n", + "From another method\n", + "At 70F and 14.7 psia, a mole occupies 390.15 ft**3\n", + "The partial volume of oxygen is 1928.25 ft**3\n", + "The partial volume of hydrogen is 3856.50 ft**3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Referring to figure 7.3,we have for CO2,\n", + "nCO2 = 10./44; \t\t\t#mole \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#10 lb of per pound \t\t\t#molecular weight of CO2 = 44\n", + "#and for N2,\n", + "nN2 = 5/28.02; \t\t\t#mole \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound\n", + "print \"The total number of moles in the mixture is %.2f mole\"%(nCO2+nN2);\n", + "#Therefore,\n", + "xCO2 = nCO2/(nCO2+nN2); \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n", + "xN2 = nN2/(nCO2+nN2); \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n", + "print \"The mole fraction of carbon dioxide is %.2f and the mole fraction of nitrogen is %.2f\"%(xCO2,xN2);\n", + "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n", + "MWm = (xCO2*44) + (xN2*28.02); \t\t\t#the molecular weight of mixture\n", + "print \"The molecular weight of air is %.2f\"%(MWm);\n", + "#Because the mixture is 15 lbm (10CO2 + 5N2),the volume of the mixture is found from pm*Vm = mm*Rm*Tm\n", + "pm = 100.; \t\t\t#mixture pressure \t\t\t#psia \n", + "Tm = 460.+70; \t\t\t#mixture temperature \t\t\t#R(absolute temperature)\n", + "Rm = 1545/37.0; \t\t\t#gas constant of mixture \n", + "mm = 15.; \t\t\t#mass of mixture \t\t\t#Unit:lb\n", + "#So,rearranging the equation,gives\n", + "Vm = (mm*Rm*Tm)/(pm*144); \t\t\t#mixture volume \t\t\t#ft**3 \t\t\t#1 in**2 = 144 ft**2\n", + "print \"The mixture volume is %.2f ft**3\"%(Vm);\n", + "#the partial volume of carbon dioxide is the total volume multiplied by the mole fraction.Thus,\n", + "VCO2 = Vm*xCO2; \t\t\t#the partial volume of CO2 \t\t\t#ft**3\n", + "print \"The partial volume of carbon dioxide is %.2f ft**3\"%(VCO2);\n", + "VN2 = Vm*xN2; \t\t\t#the partial volume of N2 \t\t\t#ft**3\n", + "print \"The partial volume of nitrogen is %.2f ft**3\"%(VN2);\n", + "#The partial pressure of each constituent is proportional to its mole fraction,for these conditions,\n", + "pCO2 = pm*xCO2; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n", + "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n", + "pN2 = pm*xN2; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n", + "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of moles in the mixture is 0.41 mole\n", + "The mole fraction of carbon dioxide is 0.56 and the mole fraction of nitrogen is 0.44\n", + "The molecular weight of air is 36.97\n", + "The mixture volume is 23.05 ft**3\n", + "The partial volume of carbon dioxide is 12.91 ft**3\n", + "The partial volume of nitrogen is 10.14 ft**3\n", + "The partial pressure of carbon dioxide is 56.02 psia\n", + "The partial pressure of nitrogen is 43.98 psia\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 327" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#we will assume that we have 100 volumes of gas mixture and set up table 7.2.In first coloumn,we tabulate the gas,and in the second coloumn,we tabulate the given volume fractions.Because the mole fraction equals to volume fraction,the values in coloumn 3 are the same as those in coloumn 2.\n", + "#The molecular weight is obtained from table 7.1.Because the MW of the mixture is the sum of the individual mole fraction multiplied by the respective molecular weights,the next coloumn tabulates the product of the mole fraction multiplied by molecular weight(3*4).The sum of these entries is the molecular weight of the mixture,which for this case is 33.4.\n", + "print \"Basis:100 volumes of gas mixture\"\n", + "print \"gas Volume Mole Molecular mass \"\n", + "print \" fraction fraction x weight MW xMW fraction\"\n", + "print \"CO2 0.40 0.40 44.0 %.2f %.2f\"%(0.40*44.0,(0.40*44.0)/33.4)\n", + "print \"N2 0.10 0.10 28.02 %.2f %.2f \"%(28.02*0.10,(28.02*0.10)/33.4)\n", + "print \"H2 0.10 0.10 2.016 %.2f %.2f \"%(0.10*2.016,(0.10*2.016)/33.4)\n", + "print \"O2 0.40 0.40 32.0 %.2f %.2f \"%(0.40*32.0,(0.40*32.0)/33.4)\n", + "print \" 1.00 1.00 33.4 = MWm = 1.000 \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 volumes of gas mixture\n", + "gas Volume Mole Molecular mass \n", + " fraction fraction x weight MW xMW fraction\n", + "CO2 0.40 0.40 44.0 17.60 0.53\n", + "N2 0.10 0.10 28.02 2.80 0.08 \n", + "H2 0.10 0.10 2.016 0.20 0.01 \n", + "O2 0.40 0.40 32.0 12.80 0.38 \n", + " 1.00 1.00 33.4 = MWm = 1.000 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We will take as a basis 100 lbm of mixture.\n", + "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n", + "#In coloumn 5,mole fraction is given by moles/total mole\n", + "\n", + "print \"Basis:100 pounds of gas mixture\"\n", + "print \"gas Mass Molecular Moles Mole Percent \"\n", + "print \" lbm weight MW fraction Volume \"\n", + "print \"CO2 52.7 44.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n", + "print \"N2 8.4 28.02 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n", + "print \"H2 0.6 2.016 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n", + "print \"O2 38.3 32.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n", + "print \" = 100.0 = 3.0 = 1.00 = 100 \"\n", + "print \" MWm = 100/3 = 33.3 \"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 pounds of gas mixture\n", + "gas Mass Molecular Moles Mole Percent \n", + " lbm weight MW fraction Volume \n", + "CO2 52.7 44.0 1.2 0.40 40.00 \n", + "N2 8.4 28.02 0.3 0.10 10.00 \n", + "H2 0.6 2.016 0.3 0.10 10.00 \n", + "O2 38.3 32.0 1.2 0.40 40.00 \n", + " = 100.0 = 3.0 = 1.00 = 100 \n", + " MWm = 100/3 = 33.3 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#We will take as a basis 100 lbm of mixture.\n", + "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n", + "#In coloumn 5,mole fraction is given by moles/total mole\n", + "\n", + "print \"Basis:100 pounds of gas mixture\"\n", + "print \"gas Mass Molecular Moles Mole Percent \"\n", + "print \" lbm weight MW fraction Volume \"\n", + "print \"O2 23.18 32.00 0.724 %.2f %.2f \"%(0.724/3.45,0.724/3.45*100)\n", + "print \"N2 75.47 28.02 2.693 %.2f %.2f \"%(2.692/3.45,2.692/3.45*100)\n", + "print \"A 1.30 39.90 0.033 %.2f %.2f \"%(0.033/3.45,0.033/3.45*100)\n", + "print \"CO2 0.05 44.00 - - - \"\n", + "print \" = 100.00 = 3.45 = 1.00 = 100 \"\n", + "print \" MWm = 100/3.45 = 28.99 \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basis:100 pounds of gas mixture\n", + "gas Mass Molecular Moles Mole Percent \n", + " lbm weight MW fraction Volume \n", + "O2 23.18 32.00 0.724 0.21 20.99 \n", + "N2 75.47 28.02 2.693 0.78 78.03 \n", + "A 1.30 39.90 0.033 0.01 0.96 \n", + "CO2 0.05 44.00 - - - \n", + " = 100.00 = 3.45 = 1.00 = 100 \n", + " MWm = 100/3.45 = 28.99 \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500 F and nitrogen is at 200 F.\n", + "\n", + "#The energy equation for the steady-flow,adiaatic mixing process gives us the requirement that the enthalpy of the mixture must equal to the enthalpies of the components,because deltah = q = 0.An alternative statement of this requirement is that the gain in enthalpy of the nitrogen must equal the decrease in enthalpy of the oxygen.Using the latter statement,that the change in enthalpy of nitrogen,yields\n", + "# (160*0.23*(500-tm)) = (196*0.25*(tm-200)) where tm = mixture temperature\n", + "#where m*cp*deltat has been used for deltah. \t\t\t#cp = specific heat at constant pressure \t\t\t#Unit for cp is Btu/lbm*R\n", + "#rearranging the above equation,\n", + "tm = ((500.*160*0.23)+(196*0.25*200))/((196*0.25)+(160*0.23)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "print \"The final temperature of the mixture is %.2f F\"%(tm);\n", + "#Using the requirement that the enthalpy of the mixture must equal to the sum of the enthalpies of the components yields an alternative solution to this problem.Let us assume that at 0 F,the enthalpy of each gas and of the mixture is zero.The enthalpy of the entering oxygen is (160*0.23*(500-0)),and the enthalpy of the entering nitrogen is (196*0.25*(200-0)).The enthalpy of the mixture is ((160+196)*cpm*(tm-0))\n", + "#Therefore, (160*0.23*500)+(196*0.25*200) = ((160+196)*cpm*tm)\n", + "cpm = ((160./(160+196))*0.23)+((196/(160+196))*0.25); \t\t\t#specific heat at constant pressure for gas mixture \t\t\t#Btu/lbm*R\n", + "print \"For mixture, Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cpm);\n", + "#therefore,\n", + "tm = ((160*0.23*500)+(196*0.25*200))/(cpm*(160.+196)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "print \"By Using value of cpm, The final temperature of the mixture is %.2f F\"%(tm);\n", + "#The use of 0 F as a base was arbitrary but convenient.Any base would yield the same results.\n", + "#The answer of cpm is wrong in the book.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature of the mixture is 328.67 F\n", + "For mixture, Specific heat at constant pressure is 0.10 Btu/lbm*R\n", + "By Using value of cpm, The final temperature of the mixture is 766.30 F\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.9 is carried out as a nonflow mixing process.\n", + "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n", + "#Given in problem 7.10,: cv of oxygen is 0.164 Btu/lbm*R.cv of nitrogen is 0.178 Btu/lbm*R. \t\t\t#cv = specific heat at constant volume\n", + "\n", + "#Because this is a nonflow process,the energy equation for this process requires the internal energy of the mixture to equal to the sum of the internal energy of its components.\n", + "#Alternatively,the decrease in internal energy of the oxygen must equal the increase in internal energy of the nitrogen.Using latter statement gives us,\n", + "# (160*0.164*(500-tm)) = (196*0.178*(tm-200))\n", + "#where m*cv*deltat has been used for deltau. \t\t\t#Unit for cp & cv is Btu/lbm*R\n", + "#rearranging the above equation,\n", + "tm = ((500*160*0.164)+(196*0.178*200))/((196*0.178)+(160*0.164)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n", + "\n", + "# Results\n", + "print \"The final temperature of the mixture is %.2f F\"%(tm);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature of the mixture is 328.78 F\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#The change in entropy of the mixture is the sum of the changes in entropy of each component.\n", + "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n", + "#In 7.9,for the oxygen,the temperature starts at 500F(960 R) and decreases to 328.7 F.For the nitrogen,the temperature starts at 200F(660 R) and increase to 328.7 F.\n", + "#deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy\n", + "\n", + "#For the oxygen,\n", + "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 500+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for oxygen\n", + "DeltaS = 160*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the oxygen\n", + "print \"The total change in entropy of the oxygen is %.2f Btu/R\"%(DeltaS);\n", + "\n", + "#For the nitrogen,\n", + "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 200+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for nitrogen\n", + "deltaS = 196*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the nitrogen\n", + "print \"The total change in entropy of the nitrogen is %.2f Btu/R\"%(deltaS);\n", + "deltaS = deltaS+DeltaS; \t\t\t#the total change in entropy for the mixture \t\t\t#Btu/lbm*R\n", + "print \"The total change in entropy for the mixture is %.2f Btu/R\"%(deltaS);\n", + "\n", + "#Per pound of mixture,\n", + "deltasm = deltaS/(196+160); \t\t\t#increase in entropy per pound mass of mixture\n", + "print \"Increase in entropy per pound mass of mixture is %.2f Btu/lbm*R\"%(deltasm);\n", + "\n", + "\n", + "print \"An alternative solution:\";\n", + "#As an alternative solution,assume an arbitrary datum of 0 F(460 R).\n", + "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "#For initial entropy of oxygen,\n", + "T2 = 500+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for oxygen \t\t\t# Btu/lbm*R\n", + "print \"The initial change in entropy for oxygen is %.2f Btu/lbm*R\"%(deltas);\n", + "#For final entropy of oxygen,\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for oxygen \t\t\t# Btu/lbm*R\n", + "print \"The final change in entropy for oxygen is %.2f Btu/lbm*R\"%(Deltas);\n", + "deltaS = Deltas-deltas; \t\t\t#The entropy change of the oxygen \t\t\t#Btu/lbm*R\n", + "print \"The entropy change of the oxygen is %.2f Btu/lbm*R\"%(deltaS);\n", + "\n", + "#For nitrogen,\n", + "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n", + "#For initial entropy of nitrogen,\n", + "T2 = 200.+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for nitrogen \t\t\t# Btu/lbm*R\n", + "print \"The initial change in entropy for nitrogen is %.2f Btu/lbm*R\"%(deltas);\n", + "#For final entropy of nitrogen,\n", + "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n", + "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n", + "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for nitrogen \t\t\t# Btu/lbm*R\n", + "print \"The final change in entropy for nitrogen is %.2f Btu/lbm*R\"%(Deltas);\n", + "deltaS = Deltas-deltas; \t\t\t#The entropy change of the nitrogen \t\t\t#Btu/lbm*R\n", + "print \"The entropy change of the nitrogen is %.2f Btu/lbm*R\"%(deltaS);\n", + "\n", + "#The remainder of the problem is as before.The advantage of Using this alternative method is the negative math.logarithms are avoided by choomath.sing a reference temperature lower than any other temperature in the system\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total change in entropy of the oxygen is -7.23 Btu/R\n", + "The total change in entropy of the nitrogen is 8.73 Btu/R\n", + "The total change in entropy for the mixture is 1.50 Btu/R\n", + "Increase in entropy per pound mass of mixture is 0.00 Btu/lbm*R\n", + "An alternative solution:\n", + "The initial change in entropy for oxygen is 0.16 Btu/lbm*R\n", + "The final change in entropy for oxygen is 0.12 Btu/lbm*R\n", + "The entropy change of the oxygen is -0.04 Btu/lbm*R\n", + "The initial change in entropy for nitrogen is 0.09 Btu/lbm*R\n", + "The final change in entropy for nitrogen is 0.13 Btu/lbm*R\n", + "The entropy change of the nitrogen is 0.04 Btu/lbm*R\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Referring to figure 7.6,it will be seen that the cooling of an air-water vapor mixture from B to A proceeds at constant pressure until the saturation curve is reached.\n", + "#At 80 F(the mixture temperature),the Steam Tables give us a saturation pressure of a 0.5073 psia,and because the relative humidity is 50%,the vapor pressure of the water is 0.5*0.5073 = 0.2537 psia.\n", + "#Using the steam tables,the saturation temperature corresponding to 0.2537 psia is 60 F.\n", + "#So,\n", + "print \"The dew point temperature of the air is 60 F\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew point temperature of the air is 60 F\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No : 338" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#To solve this probelm,it is necessary to determine the properties of the saturated mixture 90 F.If the air is saturated at 90 F,the partial pressure of the water vapor is found directly from the Steam Tables as 0.6988 psia,and the specific volume of the water vapor is 467.7 ft**3/lbm of vapor.\n", + "print \"The partial pressure of the dry air is %.2f psia\"%(14.7-0.6988); \t\t\t#the mixture is at 14.7 psia\n", + "R = 1545/28.966; \t\t\t#gas constant of dry air = 1545/Molecular weight\n", + "T = 90+460; \t\t\t#temperature of dry air \t\t\t#Unit:R\n", + "pdryair = 14.0; \t\t\t#psia \t\t\t#pressure of dry air\n", + "#Applying the ideal gas equation to the air,\n", + "vdryair = (R*T)/(pdryair*144); \t\t\t#volume of dry air \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 Ft**2\n", + "#the mass of dry air in the 467.7 ft**3 container \n", + "print \"The mass of dry air in the 467.7 ft**3 container is %.2f lbm\"%(467.7/vdryair);\n", + "#To obtain relative humidity(phy),it is necessary to determine the mole fraction of water vapor for both the saturated mixture and the mixture in question.\n", + "#The saturated mixture contains 1 lbm of water vapor or 1/18.016 moles = 0.055 mole of water vapor and (467.7/vdryair)/28.966 = 1.109 moles of dry air.\n", + "#For the saturated mixture, the ratio of moles of water vapor to moles of mixture is 0.055/(0.055+1.109) = 0.0477\n", + "#For the actual mixture,the moles of water vapor per pound of dry air is 0.005/18.016 = 0.000278 and 1 lbm of dry air is 1/28.966 = 0.0345 mole.So,the mole of water vapor per mole of mixture at the conditions of the mixture is 0.000278/(0.0345+0.000278) = 0.00799\n", + "#From the defination of relative humidity,\n", + "print \"The relative humidity of the mixture is %.2f \"%((0.00799/0.0477)*100);\n", + "\n", + "#Because the mole ratio is also the ratio of the partial pressures for the ideal gas,phy can be expressed as the ratio of the partial pressure of the water vapor in the mixture to the partial pressure of the water vapor at saturation.Therefore,\n", + "print \"The partial pressure of the vapor at saturation is %.2f psia\"%((0.00799/0.0477)*0.6988);\n", + "print \"And the partial pressure of the dry air in the mixture is %.2f psia\"%((14.7-0.00799/0.0477)*0.6988); \t\t\t#14.7-The partial pressure of the vapor at saturation\n", + "#The dew point temperature is the saturation temperature corresponding to the partial pressure of the water vapor in the mixture.So,\n", + "print \"The dew point temperature corresponding to %.2f psia is 39F\"%((0.00799/0.0477)*0.6988);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the dry air is 14.00 psia\n", + "The mass of dry air in the 467.7 ft**3 container is 32.14 lbm\n", + "The relative humidity of the mixture is 16.75 \n", + "The partial pressure of the vapor at saturation is 0.12 psia\n", + "And the partial pressure of the dry air in the mixture is 10.16 psia\n", + "The dew point temperature corresponding to 0.12 psia is 39F\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.14 Using equations, Rm = ((ma/(ma+mv))*Ra)+((mv/(ma+mv))*Rv) and phy*pvs = pv\n", + "W = 0.005; \t\t\t#Humidity ratio\n", + "pm = 14.7; \t\t\t#mixture is at 14.7 psia\n", + "#W = 0.622*(pv/(pm-pv))\n", + "#Rearranging,\n", + "pv = (W*pm)/(0.622+W); \t\t\t#the partial pressure of the water vapor \n", + "print \"The partial pressure of the water vapor is %.2f psia\"%(pv);\n", + "pa = pm-pv; \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "print \"The partial pressure of dry air is %.2f psia\"%(pa);\n", + "#It is necessary to obtain pvs from the Steam Tables at 90 F.This is 0.6988 psia.\n", + "pvs = 0.6988; \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "print \"The partial pressure of the water vapor at saturation is %.2f psia\"%(pvs);\n", + "#Therefore,\n", + "phy = pv/pvs; \t\t\t#relative humidity\n", + "print \"The relative humidity is %.2f percent\"%(phy*100);\n", + "#The dew point temperature is the saturation temperature corresponding to 0.117 psia,which is found from the Steam Tables to be 39 F.\n", + "print \"The dew point temperature of the mixture is 39 F\";\n", + "#The results of this problem and problem 7.14 are in good agreement\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The partial pressure of the water vapor is 0.12 psia\n", + "The partial pressure of dry air is 14.58 psia\n", + "The partial pressure of the water vapor at saturation is 0.70 psia\n", + "The relative humidity is 16.78 percent\n", + "The dew point temperature of the mixture is 39 F\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No : 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "pm = 14.7; \t\t\t#the barometer is at 14.7 psia \t\t\t#mixture is at 14.7 psia\n", + "#The amount of water vapor removed (per pound of dry air) is the difference between the humidity ratio (specific humidity) at inlet and outlet of the conditioning unit.We shall therefore evalute W for both specified conditions.Because phy = pv/pvs,\n", + "#At 90F:\n", + "phy = 0.7; \t\t\t#relative humidity\n", + "pvs = 0.6988; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n", + "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "W = 0.622*(pv/pa); \t\t\t#Humidity ratio\n", + "\n", + "#At 80F:\n", + "phy = 0.4; \t\t\t#relative humidity\n", + "pvs = 0.5073; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n", + "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n", + "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n", + "w = 0.622*(pv/pa); \t\t\t#Humidity ratio\n", + "\n", + "print \"The amount of water removed per pound of dry air is %.2f\"%(W-w);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of water removed per pound of dry air is 0.01\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.13 Using the psychrometric chart\n", + "#Entering figure 7.11 at a dry-bulb temperature of 80 F,we proceed vertically until we reach 50% humidity curve.At this intersection,we proceed horizontally and read the dew-point temperature as approximately 60 F.\n", + "print \"The dew point temperature of air is 60 F\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew point temperature of air is 60 F\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No : 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.14 Using the psychrometric chart\n", + "#In this problem,we are given the moisture content of the air to be 0.005 lb per pound of dry air.\n", + "#This corresponds to 0.005*7000 = 35 grains per pound of dry air.\n", + "#Entering the chart at 90F and proceeding verticaly to 35 grains per pound of dry air,we find the dew point to be 39F by proceeding horizontally to the intersection with the saturation curve. \n", + "print \"The dew-point temperature of the mixture is 39 F\";\n", + "print \"The relative humidity is approximately 17 percent\";\n", + "#From the leftmost scale,we read the pressure of water vapor to be 0.12 psia.\n", + "print \"The partial pressure of the air is %.2f psia\"%(14.7-0.12);\n", + "#Comparing these results to problem 7.14,indicated good agreement between the results obtained by chart and by calculation\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dew-point temperature of the mixture is 39 F\n", + "The relative humidity is approximately 17 percent\n", + "The partial pressure of the air is 14.58 psia\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No : 348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Problem 7.16 Using the psychrometric chart\n", + "#The initial conditions are 90 F and 70% relative humidity\n", + "#Entering the chart at 90 F dry bulb temperature and proceeding vertically to 70% relative humidity,we find the air to have 150 grains water vapor per pound of dry air.At the final condition of 80F and 40% relative humidity,we read 61 grains of water/lb of dry air.\n", + "#So,\n", + "print \"The water removed is %.2f grains per pound of dry air\"%(150-61);\n", + "print \"Or %.2f lb of water per pound of dry air is removed\"%((150.-61)/7000);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The water removed is 89.00 grains per pound of dry air\n", + "Or 0.01 lb of water per pound of dry air is removed\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20 Page No : 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#dry bulb temperature is 50 F\n", + "#relative humidity is 50 percent\n", + "#We first locate 50 F and 50 percent relative humidity on figure 7.11.At this state,we read 26 grains of water per pound of dry air and a total heat of 16.1 Btu per pound of a dry air.\n", + "#We now proceed horizontally to 80 F at a constant value of 26 grains of water per pound of dry air and read a total heat of 23.4 Btu per pound of dry air.\n", + "print \"The heat required is %.2f Btu per pound of dry air\"%(23.4-16.1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat required is 7.30 Btu per pound of dry air\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No : 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#An evaporative cooling process\n", + "#Because the exit air is saturated,we find the exit condition on the curve corresponding to a wet-bulb temperature of 50 F.The process is carried out at constant total enthalpy,which is along a line of constant wet-bulb temperature.\n", + "#Proceeding along the 50 F wet-bulb temperature line of figure 7.11 diagonally to the right until it intersects with the vertical 80 F dry-bulb temperature line yields a relative humidity of approximately 4 %\n", + "print \"For An evaporative cooling process, The relative humidity of the entering air is 4 percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For An evaporative cooling process, The relative humidity of the entering air is 4 percent\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22 Page No : 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#As noted from figure 7.27, 1 lb of mixture,4/5 lb of indoor air,and 1/5 lb of outdoor air are mixed per pound of mixture. \n", + "#We now locate the two end states on the psychrometric chart and connect them with a straight line.The line connecting the end states is divided into 5 equal parts. Using the results of equation, (ha-ha2)/(ha-ha1) = (W2-W)/(W-W1) = ma1/ma2 = l1/l2 ,we now proceed from the 75 F indoor air state 1 part toward the 90F outdoor air state.This Locates \n", + "print \"The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, \\\n", + "a wet-bulb temperature of 66 F and relative humidity of 54 percent\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, a wet-bulb temperature of 66 F and relative humidity of 54 percent\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23 Page No : 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The cooling tower\n", + "#From the Steam tables,\n", + "#For water:\n", + "h100F = 68.05; \t\t\t#Btu/lbm \t\t\t#enthalpy at 100 F\n", + "h70F = 38.09; \t\t\t#Btu/lbm \t\t\t#enthalpy at 70 F\n", + "#For air:\n", + "h = 20.4; \t\t\t#Unit:Btu/lb \t\t\t#at inlet,total heat/lb dry air\n", + "w = 38.2; \t\t\t#Unit:grains/lb \t\t\t#at inlet,moisture pickup/lb dry air (at 60F D.B. and 50% R.H.)\n", + "H = 52.1; \t\t\t#Unit:Btu/lb \t\t\t#at outlet,total heat/lb dry air\n", + "W = 194.0; \t\t\t#Unit:grains/lb \t\t\t#at outlet,moisture pickup/lb dry air (at 90F D.B. and 90% R.H.)\n", + "\n", + "#Per pound of dry air,the heat interchange is H-h Btu per pound of dry air.\n", + "#Per pound of dry air,the moisture increase is (W-w)/7000 lb per pound of dry air.\n", + "#From the equation, ma*(H-h) = 200000*h100F - mwout*h70F \t\t\t#ma = mass of air mwout = mass of cooled water \n", + "#and ma*((W-w)/7000) = 200000 - mwout\n", + "#Solving the latter equation for mwout,we have mwout = 200000-(ma*((W-w)/7000))\n", + "#Substituting this into the heat balance yields,\n", + "# ma*(H-h) = 200000*h100F - 200000*h70F + ma*h70F*((W-w)/7000)\n", + "#Solving gives us,\n", + "ma = (200000*(h100F-h70F))/((H-h)-(h70F*((W-w)/7000))); \t\t\t#The amount of air required per hour \t\t\t#Unit:lbm/hr of dry air\n", + "print \"The amount of air required per hour is %.2f lbm/hr of dry air\"%(ma);\n", + "print \"The amount of water lost per hour due to evaporation is %.2f lbm/hr\"%((ma*W-w)/7000)\n", + "#note that the water evaporated is slightly over 2% of the incoming water,and this is the makeup that has to be furnished to the tower.\n", + "#answer are slightly differ because of value of (W-w)/7000 is given 0.0233 instead of 0.0225\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of air required per hour is 194216.14 lbm/hr of dry air\n", + "The amount of water lost per hour due to evaporation is 5382.56 lbm/hr\n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8.ipynb new file mode 100755 index 00000000..5c6dac8c --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8.ipynb @@ -0,0 +1,697 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:772f93702cda26918438fd90c36e1594260fd40351e3deed6d4e9bb6febe0344" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Vapor Power Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From the Steam Tables or Mollier chart in Appendix 3,we find that\n", + "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n", + "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid \t\t\t#Unit:kJ/kg\n", + "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#\t\t\t#enthalpy\n", + "#Here,point 5 is in the wet steam region.\n", + "print \"Solution for a\";\n", + "#Neglecting pump work (h2 = h1) gives\n", + "nR = (h4-h5)/(h4-h1); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "p2 = 3000; \t\t\t#Unit:kPa \t\t\t#Upper pressure\n", + "p1 = 50; \t\t\t#Unit:kPa \t\t\t#Lower pressure\n", + "vf = 0.001030; \t\t\t#Specific volume of saturated liquid \t\t\t#m**3/kg\n", + "Pumpwork = (p2-p1)*vf; \t\t\t#Unit:kJ/kg \t\t\t#pump work\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The thermal efficiency of the cycle is 28.49 percentage\n", + "Solution for b\n", + "The thermal efficiency of the cycle including pump work is 28.42 percentage\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Using the computer disk to obtain the neccesary properties\n", + "print \"Solution for a\";\n", + "#For the conditions given in problem8.1,the properties are found to be\n", + "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n", + "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid\n", + "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:kJ/kg\n", + "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "#Neglecting pump work \n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "#For the pump work,we do not need the approximation,because the computerized tables give us the necessary values directly.\n", + "#Assuming that the condensate leaving the condenser is saturated liquid gives us an enthalpy of 340.54 kJ/kg and an entropy of 1.0912 kJ/kg*K for an isentropic compression, the final cond-ition is the boiler pressure of 3Mpa and an entropy of 1.0912 kJ/kg*K. For these values,the program yields an enthalpy of 343.59 kJ/kg*K.The isentropic pump work is equal to \n", + "Pumpwork = 343.59-340.54; \t\t\t#Unit:kJ/kg \t\t\t#pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n", + "#Final results in this problem agree with the result in problem8.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The thermal efficiency of the cycle is 28.49 percentage\n", + "Solution for b\n", + "The thermal efficiency of the cycle including pump work is 28.42 percentage\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Solution for (a)\n", + "#Figurre 8.3 with the cycle extending into the superheat region and expanding along 4->5 is the appropriate diagram for this process.\n", + "\n", + "print \"Solution for b\";\n", + "#This problem can be solved either by use of the Mollier chart or the Steam Tables.If the chart is used,14.696 psia is first located on the saturated vapor line.Because the expansion,4->5,is isentropic,a vertical line on the chart is the path of the process.The point corresponding to 4 in figure 8.3 is found where this vertical line intersects 400 psia.At this point,the ent-halpy is 1515 Btu/lbm,and the corresponding temperature is approximatelty 980F.Saturated vapor at 14.696 psia has an enthalpy of 1150.5 Btu/lbm(from the Mollier chart).The Steam Tables sh-ow that saturated liquid at 14.696 psia has an enthalpy of 180.15 Btu/lbm.In terms of figure 8.3,and neglecting pump work,we have \n", + "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h5 = 1150.5; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n", + "#Neglecting pump work yields\n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "p2 = 400; \t\t\t#Unit:Psia \t\t\t#Upper pressure\n", + "p1 = 14.696; \t\t\t#Unit:Psia \t\t\t#Lower pressure\n", + "vf = 0.01167; \t\t\t#Specific volume of saturated liquid \t\t\t#ft**3/lbm\n", + "J = 778; \t\t\t#Conversion factor\n", + "Pumpwork = ((p2-p1)*vf*144)/J; \t\t\t#Unit:Btu/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n", + "#where the denominator is h4-h2 = h4-h1-(h2-h1).Neglecting pump work is obviously justified in this case.An alternative solution is obtained by Using the Steam Tables:at 14.696 psia ans sat-uration,sg = 1.7567 ; at 400 psia,s = 1.7567.From Table 3(at 400 psia)\n", + "# s h t\n", + "#1.7632 1523.6 1000 \n", + "#1.7567 1514.2 982.4\n", + "#1.7558 1512.9 980" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for b\n", + "Neglecting the pump work, The thermal efficiency of the cycle is 27.31 percentage\n", + "The thermal efficiency of the cycle including pump work is 27.26 percentage\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Refer to figure8.3.The desired quantities are obtained as follows:\n", + "#at 14.696 psia,saturated vapor (x = 1),s = 1.7566 Btu/lbm*R\n", + "h5 = 1150.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply\n", + "#at 14.696 psia,saturated liquid (x = 0),s = 0.3122 Btu/lbm*R\n", + "h2 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply \n", + "h1 = h2;\n", + "#at 400 psia,s = 1.7566 Btu/lbm*R,\n", + "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "t = 982.07; \t\t\t#Unit:F \t\t\t#tempearature\n", + "#at 400 psia,s = 0.3122 Btu/lbm*R, \t\t\t#s = entropy\n", + "h = 181.39; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#Note the agreement of these values with the ones obtained for problem8.4.Alos,note the temperature of 982.07F compared to 982.4F.Continuing,\n", + "#Neglecting pump work \n", + "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n", + "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n", + "Pumpwork = h-h2; \t\t\t#Unit:kJ/kg \t\t\t#/pumpwork\n", + "#The efficiency of the cycle including pump work is\n", + "nR = ((h4-h5)-Pumpwork)/((h4-h2)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n", + "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Neglecting the pump work, The thermal efficiency of the cycle is 27.26 percentage\n", + "The thermal efficiency of the cycle including pump work is 27.19 percentage\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Carnot cycle would operate between 982.4F and 212F.\n", + "T1 = 982.4+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n", + "T2 = 212+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n", + "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n", + "print \"The efficiency is %.2f percentage\"%(nc);\n", + "#In problem 8.3,\n", + "nR = 27.3; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n", + "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n", + "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is 53.41 percentage\n", + "The type efficiency of the ideal Rankine cycle is 51.11 percentage\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For the upper temperature of the cycle,we have 400C,and for 50kPa,the steam tables give us a saturation temperature of 81.33C.The efficiency of a Carnot cycle operating between the limits would be\n", + "T1 = 400+273; \t\t\t#Celcius temperature converted to fahrenheit temperature\n", + "T2 = 81.33+273; \t\t\t#temperature converted to fahrenheit temperature\n", + "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n", + "print \"The efficiency is %.2f percentage\"%(nc);\n", + "#In problem 8.1,\n", + "nR = 28.5; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n", + "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n", + "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency is 47.35 percentage\n", + "The type efficiency of the ideal Rankine cycle is 60.19 percentage\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 386" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From problem 8.3,\n", + "work = 1515-1150.5; \t\t\t#Unit:Btu/lbm of steam \t\t\t#pump work is neglected \t\t\t#Useful ideal work\n", + "#Because of the heat losses, 50 Btu/lbm of the 364.5 Btu/lbm becomes unavailable.\n", + "available = 364.5-50; \t\t\t#Unit:Btu/lbm \n", + "n = available/(1515-180.15); \t\t\t#Thermal efficiency of the cycle neglecting pump work h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy & h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "print \"The thermal efficiency of the cycle neglecting pump work is %.2f percentage\"%(n*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermal efficiency of the cycle neglecting pump work is 23.56 percentage\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No : 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Neglecting the pump work,we have\n", + "heatrate = 3413/0.273; \t\t\t#Unit:Btu/kWh \t\t\t#0.273 = efficiency \t\t\t#1 kWh = 3413 \t\t\t#heat rate\n", + "print \"The heat rate is %.2f Btu/kWh\"%(heatrate);\n", + "#Per pound of steam,1515-1150.5 = 364.5 Btu is delivered.\n", + "#Because 1 kWh = 3413\n", + "print \"The steam rate is %.2f lbm of steam per kilowatt-hour\"%(3413./1515-1150.5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat rate is 12501.83 Btu/kWh\n", + "The steam rate is -1148.25 lbm of steam per kilowatt-hour\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9 Page No : 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#The Mollier chart provides a convenient way of solving this problem.Expanding from 980F,400 psia,s = 1.7567 to 200 psia yields a final enthalpy of 1413 Btu/lbm.Expanding from 200 psia ans an enthalpy of 1515 Btu/lbm to 14.696 psia yields a final enthaply of 1205 Btu/lbm. \n", + "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h5 = 1205; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h7 = 1413; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle\n", + "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n", + "#It is apparent that for the conditions of this problem,the increase in efficiency is not very large.The final condition of the fluid after the second expansion is superheated steam at \n", + "#14.696 psia.By condenmath.sing at this relatively high pressure condition,a large amount of heat is rejected to the condenser cooling water.7\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the reheat cycle is 28.67 percentage\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10 Page No : 389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Some of the property data required was found in problem8.4.In addition we have,\n", + "#at 200 psia,s = 1.7566 Btu/lbm*R,\n", + "h7 = 1413.6; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#at 200 psia,s = 1.8320 Btu/lbm*R,\n", + "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "#at 14.696 psia,s = 1.8320 Btu/lbm*R,\n", + "h5 = 1205.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n", + "h1 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n", + "\n", + "# Calculations\n", + "#Using these data,\n", + "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle \n", + "\n", + "# Results\n", + "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the reheat cycle is 28.53 percentage\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No : 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "print \"Solution for a\";\n", + "#For the rankine cycle,the Mollier chart gives\n", + "h4 = 1505; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h5 = 922; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h6 = h5; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "#and at the condenser,\n", + "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "nR = (h4-h5)/(h4-h1); \t\t\t#efficiency of rankine cycle\n", + "print \"The efficiency of rankine cycle is %.2f percentage\"%(nR*100);\n", + "\n", + "print \"Solution for b\";\n", + "#Figure 8.16 shows the regenerative cycle.After doing work(isentropically),W lbs of steam are bled from the turbine at 50 psia for each lbm of steam leaving the steam generator,and (1-W) pound goes through the turbine and is condensed in the condenser to saturated liquid at 1 psia.This condensate is pumped to the heater,where it mixes with the extraced steam and leaves as saturated liquid at 50 psia.The required enthalpies are:\n", + "#Leaving turbine:\n", + "h5 = 1168; \t\t\t#Btu/lbm at 50 psia \n", + "#Leaving condenser:\n", + "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n", + "#Leaving heater:\n", + "h1 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h2 if pump work is neglected(saturated liquid)\n", + "#A Heat balance around the heater gives\n", + "#W*h5 + (1-W)*h7 = 1*h1 \n", + "W = ((1*h1)-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam \n", + "print \"W = %.2f lbm\"%(W);\n", + "work = (1-W)*(h4-922) + W*(h4-h5); \t\t\t#h5 = 922 from the mollier chart \t\t\t#Unit:Btu/lbm \t\t\t#The work output\n", + "print \"The work output is %.2f Btu/lbm\"%(work);\n", + "#Heat into steam generator equals the enthalpy leaving minus the enthalpy of the saturated liquid entering at 50 psia:\n", + "qin = h4-h1; \t\t\t#Unit:Btu/lbm \t\t\t#Heat in\n", + "n = work/qin; \t\t\t#Efficiency of regenerative cycle\n", + "print \"The efficiency of regenerative cycle is %.2f percentage\"%(n*100);\n", + "#The efficiency of a regenerative cycle with one open heater is given by \n", + "n = 1-(((h5-h1)*(h6-h7))/((h4-h1)*(h5-h7))); \t\t\t#efficiency of a regenerative cycle\n", + "W = (h1-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam\n", + "print \"When the rankine cycle is compared with regenerative cycle\"\n", + "print \"W = %.2f lbm and the efficiency of a regenerative cycle with one open heater is given by %.2f percentage\"%(W,n*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Solution for a\n", + "The efficiency of rankine cycle is 40.62 percentage\n", + "Solution for b\n", + "W = 0.16 lbm\n", + "The work output is 542.57 Btu/lbm\n", + "The efficiency of regenerative cycle is 43.24 percentage\n", + "When the rankine cycle is compared with regenerative cycle\n", + "W = 0.16 lbm and the efficiency of a regenerative cycle with one open heater is given by 43.24 percentage\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 Page No : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Figure 8.16(a) shows the cycle.For this cycle,W2 pounds are extracted at 100 psia,and W1 pounds are extracted at 50 psia for each pound produced by the steam generator.The enthalpies that are required are:\n", + "#Leaving turbine: 922 \t\t\t#Btu/lbm at 1 psia\n", + "#Leaving condenser: 69.74 \t\t\t#Btu/lbm at 1 psia (saturated liquid)\n", + "#Leaving low pressure heater: 250.24 \t\t\t#Btu/lbm at 50 psia (saturated liquid)\n", + "#Leaving high pressure heater: 298.61 \t\t\t#Btu/lbm at 100 psia\n", + "#At low pressure extraction: 1168 \t\t\t#Btu/lbm at 50 psia\n", + "#At high pressure extraction: 1228.6 \t\t\t#Btulbm at 100 psia\n", + "#Entering turbine: 1505 \t\t\t#Btu/lbm\n", + "#The heat balance around the high pressure heater gives us\n", + "#W2*1228.6 + (1-W2)*250.24 = 1*298.61\n", + "W2 = ((1*298.61)-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "#A heat balance around the low pressure heater yields\n", + "#W1*1168 + (1-W1-W2)*69.74 = (1-W2)*250.24\n", + "W1 = (((1-W2)*250.24)-69.74+(W2*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n", + "print \"W1 = %.2f lbm\"%(W1);\n", + "work = ((1505-1228.6)*1)+((1-W2)*(1228.6-1168))+((1-W1-W2)*(1168-922)); \t\t\t#The work output \t\t\t#Btu/lbm\n", + "print \"The work output is %.2f Btu/lbm\"%(work);\n", + "#Heat into the steam generator equals the enthalpy leaving minus the enthalpy of saturated liquid at 100 psia:\n", + "qin = 1505-298.61; \t\t\t#Btu/lbm \t\t\t#Heat in \n", + "print \"Heat in = %.2f Btu/lbm\"%(qin);\n", + "n = work/qin; \t\t\t#The efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n", + "#In terms of figure 8.16a,\n", + "#W2 = (h1-h11)/(h5-h11)\n", + "#W1 = (h5-h1/h6-h9)*(h10-h9/h5-h10) neglecting the pump work\n", + "#n = 1-(h7-h8/h4-h1)*(h5-h1/h5-h10)*(h6-h10/h6-h8)\n", + "#For this problem , h8 = h9 , h10 = h11 and h1 = h2.Thus\n", + "W2 = (298.61-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n", + "print \"Comparing the results\"\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "W1 = ((1228.6-298.61)*(250.24-69.74))/((1168-69.74)*(1228.6-250.24)); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n", + "print \"W1 = %.2f lbm\"%(W1); \n", + "n = 1-(((922-69.74)*(1228.6-298.61)*(1168-250.24))/((1505-298.61)*(1228.6-250.24)*(1168-69.74))); \t\t\t#Efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W2 = 0.05 lbm\n", + "W1 = 0.16 lbm\n", + "The work output is 529.41 Btu/lbm\n", + "Heat in = 1206.39 Btu/lbm\n", + "The efficiency is 43.88 percentage\n", + "Comparing the results\n", + "W2 = 0.05 lbm\n", + "W1 = 0.16 lbm\n", + "The efficiency is 43.88 percentage\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 Page No : 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Regenerative cycle\n", + "#Assume that 1 lbm of steam leaves the steam generator and that W1 lbm is bled off to the closed heater at 100psia and that W2 lbm is bled off to the open heater at 50 psia.Alos,assume that the feedwater leaving the closed heater at 310F,18F less than the saturation temperature corresponding to 100 psia.For calculation purposes,we will use hf at 310 F for this enthalpy.Using the Mollier diagram and the steam tables,we find the following values of enthalpy:\n", + "\n", + "#h to turbine = 1505 Btu/lbm(at 1000 psia and 1000F)\n", + "#h at first extraction = 1228 Btu/lbm(isentropically to 100 psia)\n", + "#h at second extraction = 1168 Btu/lbm(isentropically to 100 psia)\n", + "#h at turbine exit = 922 Btu/lbm (isentropically to 1 psia)\n", + "#hf = 298.61 Btu/lbm(at 100 psia)\n", + "#hf = 250.24 Btu/lbm(at 50 psia)\n", + "#hf = 280.06 Btu/lbm(at 310 F)\n", + "#hf = 69.74 Btu/lbm (at 1 psia)\n", + "#A heat balance around the high pressure heater gives us\n", + "#W1*(1228-298.61) = 1*(280.06-250.24)\n", + "W1 = ((1*(280.06-250.24)))/(1228-298.61); \t\t\t#lbm \t\t\t#W1 lbm is extracted at 100 psia\n", + "print \"W1 = %.2f lbm\"%(W1);\n", + "#A heat balance around the open heater gives us\n", + "#W2*1168 +(1-W1-W2)*69.74 + W1*268.61 = 1*250.24\n", + "W2 = ((1*250.24)-(W1*268.61)-69.74+(W1*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W2 lbm is extracted at 50 psia\n", + "print \"W2 = %.2f lbm\"%(W2);\n", + "#The work output of the cycle consists of the work that 1 lbm does in expanding isentropically to 100 psia,plus the work done by (1-W1)lbm expanding isentropicaly from 100 to 50 psia,plus the work done by (1-W1-W2)lbm expanding isentropically from 50 to 1 psia.\n", + "#Numerically,the work is\n", + "workoutput = (1*(1505-1228))+((1-W1)*(1228-1168))+((1-W1-W2)*(1168-922)); \t\t\t#Btu/lbm \t\t\t#the work output\n", + "print \"The work output is %.2f Btu/lbm\"%(workoutput);\n", + "heatinput = 1505-280.06; \t\t\t#Btu/lbm \t\t\t#the heat input\n", + "print \"The heat input is %.2f Btu/lbm\"%(heatinput);\n", + "n = workoutput/heatinput; \t\t\t#Efficiency\n", + "print \"The efficiency is %.2f percentage\"%(n*100);\n", + "#When compared to 8.11,we conclude that the addition of additional closed heater raises the efficiency. \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W1 = 0.03 lbm\n", + "W2 = 0.16 lbm\n", + "The work output is 534.18 Btu/lbm\n", + "The heat input is 1224.94 Btu/lbm\n", + "The efficiency is 43.61 percentage\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14 Page No : 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#From problem 8.11,\n", + "#Leaving turbine:\n", + "h5 = 1168.; \t\t\t#Btu/lbm at 50 psia \n", + "#For the rankine cycle,the Mollier chart gives\n", + "h4 = 1505.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n", + "h6 = 922.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm \t\t\t#h6 = h5;\n", + "#and at the condenser,\n", + "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n", + "#Leaving condenser:\n", + "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n", + "#Leaving heater:\n", + "h2 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h1 if pump work is neglected(saturated liquid)\n", + "#A Heat balance around the heater gives\n", + "#W*h5 + (1-W)*h7 = 1*h1 \n", + "W = ((1*h2)-h7)/(h5-h7); \t\t\t#Unit:lbm\n", + "liquidleaving = (W*h2)+(1-W)*h1; \t\t\t#Btu/lbm \t\t\t#liquid leaving the heatexchange\n", + "\n", + "#Using these data,,\n", + "heatin = h4-liquidleaving; \t\t\t#Btu/lbm \t\t\t#heat in the boiler\n", + "print \"Heat in at boiler is %.2f Btu/lbm\"%(heatin);\n", + "workout = ((1-W)*(h4-h6))+(W*(h4-h5)); \t\t\t#Btu/lbm \t\t\t#The work out of turbine\n", + "print \"The work out of turbine is %.2f Btu/lbm\"%(workout);\n", + "n = workout/heatin; \t\t\t#efficiency \t\t\t#The conventional thermal efficiency\n", + "print \"The conventional thermal efficiency is %.2f percentage\"%(n*100);\n", + "#If at this time we have define the efficiency of energy utilization to be the ratio of the work out plus the useful heat out divided by the heat input to the cycle, nenergyutilization = ((w+qoutuseful)/qin)*100\n", + "qout = W*(h5-h2); \t\t\t#heat out \t\t\t#Btu/lbm\n", + "n = (workout+qout)/heatin; \t\t\t#efficiency of energy utilization\n", + "print \"Efficiency of energy utilization is %.2f percentage\"%(n*100);\n", + "#Comparing with 8.11, we see that conventional thermal efficiency is decreased and efficiency of energy utilization is increased\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat in at boiler is 1405.59 Btu/lbm\n", + "The work out of turbine is 542.57 Btu/lbm\n", + "The conventional thermal efficiency is 38.60 percentage\n", + "Efficiency of energy utilization is 49.33 percentage\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9.ipynb new file mode 100755 index 00000000..36c812f3 --- /dev/null +++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9.ipynb @@ -0,0 +1,531 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f68f167a9b412c45738caca06babe6f015590c823a41ec439fe036b3915e69db" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Gas Power Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "notto = (1-(1/Rc)**(k-1))*100; \t\t\t#Efficiency of an otto engine\n", + "print \"The efficiency of the otto cycle is %.2f percentage\"%(notto);\n", + "#For the carnot cycle,\n", + "#Nc = 1-(T2/T4) \t\t\t#efficiency for the carnot cycle \t\t\t#T2 = lowest temperature \t\t\t#T4 = Highest temperature\n", + "\n", + "T2 = 70.+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n", + "#At 700 F\n", + "T4 = 700.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc); \n", + "\n", + "#At 1000 F\n", + "T4 = 1000.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n", + "\n", + "#At 3000 F\n", + "T4 = 3000.+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n", + "print \"When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the otto cycle is 54.08 percentage\n", + "When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is 54.31 percentage\n", + "When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is 63.70 percentage\n", + "When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is 84.68 percentage\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant\n", + "Rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 70+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n", + "#For 1000 F\n", + "T4 = 1000+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "T3byT2 = Rc**(k-1); \t\t\t#Unit less\n", + "T3 = T3byT2*T2;\n", + "qin = cv*(T4-T3); \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n", + "#Qr = cv*(T5-T2)*(T5/T4) = (v2/v3)**(k-1)\n", + "Qr = (inv(Rc))**(k-1); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n", + "T5 = T4*Qr;\n", + "Qr = cv*(T5-T2); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n", + "print \"The net work out is %.2f Btu/lbm\"%(qin-Qr);\n", + "notto = ((qin-Qr)/qin)*100; \t\t\t#The efficiency of otto cycle \n", + "print \"The efficiency of otto cycle is %.2f percentage\"%(notto);\n", + "#The value agrees with the results of problem 9.1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mqin\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcv\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT4\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mT3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#Unit:Btu/lbm #Heat added\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;31m#Qr = cv*(T5-T2)*(T5/T4) = (v2/v3)**(k-1)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0mQr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mRc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#Unit:Btu/lbm #Heat rejected\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 13\u001b[0m \u001b[0mT5\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mT4\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mQr\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0mQr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcv\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT5\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mT2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#Unit:Btu/lbm #Heat rejected\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "cv = 0.7186; \t\t\t#Unit:kJ/(kg*K) \t\t\t#Specific heat constant for constant volume process\n", + "Rc = 8.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 20.+273; \t\t\t#20 C converted to its kelvin value\n", + "qin = 50.; \t\t\t#Heat added \t\t\t#Unit:kJ\n", + "T3byT2 = Rc**(k-1);\n", + "T3 = T3byT2*T2; \t\t\t#Unit:K\n", + "#qin = cv*(T4-T3) \t\t\t#heat added \t\t\t#Unit:kJ\n", + "T4 = (qin/cv)+T3; \t\t\t#The peak temperature of the cycle \t\t\t#Unit:K\n", + "print \"The peak temperature of the cycle is %.2f Kelvin i.e. %.2f Celcius\"%(T4,T4-273);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The peak temperature of the cycle is 742.72 Kelvin i.e. 469.72 Celcius\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For an Otto cycle,\n", + "rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n", + "q = 50.; \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n", + "p2 = 14.7; \t\t\t#Unit:psia \t\t\t#pressure at point 2\n", + "T2 = 60.+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "cv = 0.171; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "#Refering to figure 9.9,\n", + "#At (2),we need v2.\n", + "#p2*v2 = R*T2\n", + "v2 = (R*T2)/(p2*144); \t\t\t#Unit:ft**3/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#specific volume at point 2\n", + "print \"At point 2, specific volume v2 = %.2f ft**3/lbm\"%(v2);\n", + "#For The isentropic path (2)&(3),p3*v3**k = p2*v2**k,so\n", + "#So,p3 = p2*(v2/v3)**k;\n", + "p3 = p2*rc**k; \t\t\t#Unit:psia \t\t\t#pressure at point 3\n", + "print \"At path2&3\";\n", + "print \"pressure p3 = %.2f psia\"%(p3);\n", + "v3 = v2/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 3\n", + "print \"specific volume v3 = %.2f ft**3/lbm\"%(v3);\n", + "T3 = (p3*v3*144)/R; \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 \t\t\t#temperature at point 3\n", + "print \"temperature T3 = %.2f R\"%(T3);\n", + "print \"At point4\"\n", + "#To obtain the values at (4),we note\n", + "v4 = v3; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 4\n", + "print \"specific volume v4 = %.2f ft**3/lbm\"%(v4);\n", + "#qin = cv*(T4-T3)\n", + "T4 = T3+(q/cv); \t\t\t#Unit:R \t\t\t#temperature at point 4 \n", + "print \"temperature T4 = %.2f R\"%(T4);\n", + "#For p4,\n", + "p4 = (R*T4)/(144*v4); \t\t\t#Unit:psia \t\t\t#1ft**2 = 144 in**2 \t\t\t#pressure at point 4\n", + "print \"pressure p4 = %.2f psia\"%(p4);\n", + "#The last point has the same specific volume as (2),giving\n", + "print \"At last point\"\n", + "v5 = v2; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 5\n", + "print \"specific volume v5 = %.2f ft**3/lbm\"%(v5);\n", + "#The isentropic path equation,p5*v5**k = p4*v4**k,so\n", + "p5 = p4*(v4/v5)**k; \t\t\t#Unit:psia \t\t\t#pressure at point 5\n", + "print \"pressure p5 = %.2f psia\"%(p5);\n", + "T5 = (p5*v5*144)/(R); \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 temperature at point 5\n", + "print \"temperature T5 = %.2f R\"%(T5);\n", + "n = (((T4-T3)-(T5-T2))/(T4-T3))*100; \t\t\t#The efficiency of the cycle\n", + "print \"The efficiency of the cycle is %.2f percentage\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "At point 2, specific volume v2 = 13.09 ft**3/lbm\n", + "At path2&3\n", + "pressure p3 = 224.11 psia\n", + "specific volume v3 = 1.87 ft**3/lbm\n", + "temperature T3 = 1132.51 R\n", + "At point4\n", + "specific volume v4 = 1.87 ft**3/lbm\n", + "temperature T4 = 1424.91 R\n", + "pressure p4 = 281.97 psia\n", + "At last point\n", + "specific volume v5 = 13.09 ft**3/lbm\n", + "pressure p5 = 18.50 psia\n", + "temperature T5 = 654.26 R\n", + "The efficiency of the cycle is 54.08 percentage\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#For four cycle engine,\n", + "#Using the results of problem 9.6,\n", + "pm = 1000.; \t\t\t#Unit:kPa \t\t\t#mean effective pressure \t\t\t#Unit:psia\n", + "N = 4000./2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "LA = 2. \t\t\t#Mean \t\t\t#Unit:liters\n", + "hp = (pm*LA*N)/44760; \t\t\t#The horsepower \t\t\t#Unit:hp\n", + "print \"The horsepower is %.2f hp\"%(hp);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horsepower is 89.37 hp\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No : 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#An otto engine\n", + "#Using results of problem 9.8, \n", + "rc = (1+c)/c; \t\t\t#The compression ratio\n", + "print \"The compression ratio is %.2f\"%(rc);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'c' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;31m#An otto engine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;31m#Using results of problem 9.8,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mrc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#The compression ratio\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The compression ratio is %.2f\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'c' is not defined" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No : 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#For four cycle,six cylinder engine,\n", + "#Using the results of problem 9.5,\n", + "hp = 100; \t\t\t#Horsepower \t\t\t#Unit:hp\n", + "L = 4./12; \t\t\t#Unit:ft \t\t\t#stroke is 4 in.\n", + "A = (math.pi/4)*(3)**2*6; \t\t\t#Cylinder bore is 3 in.\n", + "N = 4000/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "#hp = (pm*LA*N)/33000;\n", + "pm = (hp*33000)/(L*A*N); \t\t\t#The mean effective pressure \t\t\t#psia\n", + "\n", + "# Results\n", + "print \"The mean effective pressure is %.2f psia\"%(pm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean effective pressure is 116.71 psia\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No : 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#six cylinder engine,with print lacement 3.3L\n", + "#Using the results of problem 9.5,\n", + "hp = 230; \t\t\t#Horsepower \t\t\t#Unit:hp\n", + "#3.3L*1000 cm**3/L*(in/2.54 cm)**3\n", + "LA = 3.3*1000*(1/2.54)**3; \t\t\t#mean \t\t\t#in**3\n", + "N = 5500/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n", + "#hp = (pm*LA*N)/33000;\n", + "pm = (hp*33000*12)/(LA*N); \t\t\t#1ft = 12inch \t\t\t#The mean effective pressure \t\t\t#psia\n", + "print \"The mean effective pressure is %.2f psia\"%(pm);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean effective pressure is 164.47 psia\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12 Page No : 478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n", + "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n", + "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n", + "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 100+460; \t\t\t#temperatures converted to absolute temperatures;\n", + "ndiesel = 1-((inv(rc))**(k-1)*(((v4byv3)**k-1)/(k*(v4byv3-1)))); \t\t\t#The efficiency of the diesel engine\n", + "print \"The efficiency of the diesel engine is %.2f percentage\"%(ndiesel*100);\n", + "# T3/T2 = rc**k-1 and T5/T4 = (1/re**k-1) \t\t\t#re = expansion ratio = v5/v4\n", + "#But T4/T3 = v4/v3 = rc/re\n", + "#So,\n", + "T5 = T2*(v4byv3)**k; \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n", + "print \"The temperature of the exhaust of the cycle is %.2f R i.e. %.2f F\"%(T5,T5-460);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'inv' is not defined", + "output_type": "pyerr", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1.4\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#with the cycle starting at 14 psia and 100 F #It is apparent incerease in compression ratio yields an increased cycle efficiency\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mT2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m460\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#temperatures converted to absolute temperatures;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mndiesel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mv4byv3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mv4byv3\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#The efficiency of the diesel engine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The efficiency of the diesel engine is %.2f percentage\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mndiesel\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0;36m100\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;31m# T3/T2 = rc**k-1 and T5/T4 = (1/re**k-1) #re = expansion ratio = v5/v4\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'inv' is not defined" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13 Page No : 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Now,in problem 9.12,\n", + "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n", + "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n", + "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n", + "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "T2 = 100; \t\t\t#Unit:F \t\t\t#temperature \n", + "T5 = 1018; \t\t\t#Unit:F \t\t\t#Found in 9.12 \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n", + "ndiesel = 0.614 \t\t\t#Efficiency of the diesel engine \t\t\t#Found in 9.12\n", + "#Now,in problem 9.13,\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n", + "\n", + "Qr = cv*(T5-T2); \t\t\t#Heat rejected \t\t\t#Unit:Btu/lbm\n", + "#ndeisel = 1-(Qr/qin); \t\t\t#Efficiency = ndeisel \t\t\t#qin = heat added\n", + "qin = Qr/(1-ndiesel); \t\t\t#Unit:Btu/lbm\n", + "J = 778; \t\t\t#J = Conversion factor\n", + "networkout = J*(qin-Qr); \t\t\t#(ft*lbf)/lbm \t\t\t#Net work out per pound of gas\n", + "print \"Net work out per pound of gas is %.2f ft*lbf)/lbm\"%(networkout);\n", + "#The mean effective pressure is net work divided by (v2-v3):\n", + "mep = networkout/((16-1)*144); \t\t\t#1ft**2 = 144 in**2 \t\t\t#Unit:psia \t\t\t#The mean effective pressure\n", + "print \"The mean effective pressure is %.2f psia\"%(mep); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net work out per pound of gas is 195403.25 ft*lbf)/lbm\n", + "The mean effective pressure is 90.46 psia\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page No : 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy.linalg import inv\n", + "\n", + "#A Brayton cycle\n", + "rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n", + "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n", + "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n", + "T3 = 1500; \t\t\t#(unit:fahrenheit) \t\t\t#peak tempeature\n", + "p1 = 14.7; \t\t\t#Unit:psia \t\t\t#Initial condition\n", + "T1 = 70+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Initial condition\n", + "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n", + "nBrayton = 1-(0.1428571**(k-1)); \t\t\t#A Brayton cycle efficiency \n", + "print \"A Brayton cycle efficiency is %.2f percentage\"%(nBrayton*100);\n", + "#If we base our calculation on 1 lbm of gas and use subscripts that corresponds to points (1),(2),(3) and (4) of fig.9.22,we have\n", + "v1 = (R*T1)/p1; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 1\n", + "#Because rc = 7 then,\n", + "v2 = v1/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 2\n", + "#After the isentropic compression, T2*v2**k-1 = T1*v1**k-1\n", + "T2 = T1*(v1/v2)**(k-1); \t\t\t#Unit:R \t\t\t#temperature at point 2\n", + "T2 = T2-460; \t\t\t#Unit:fahrenheit \t\t\t#temperature at point 2\n", + "qin = cp*(T3-T2); \t\t\t#Heat in \t\t\t#Unit:Btu/lbm\n", + "print \"The heat in is %.2f Btu/lbm\"%(qin);\n", + "#Because efficiency can be stated to be work out divided by heat in,\n", + "wbyJ = nBrayton*qin; \t\t\t#The work out \t\t\t#Unit:Btu/lbm\n", + "print \"The work out is %.2f Btu/lbm\"%(wbyJ); \t\t\t#Answer is wrong in the book.cause they have taken efficiency value wrong\n", + "print \"The heat rejected is %.2f Btu/lbm\"%(qin-wbyJ); \t\t\t#Anser is affected because of value of wbyJ\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A Brayton cycle efficiency is 54.08 percentage\n", + "The heat in is 193.37 Btu/lbm\n", + "The work out is 104.58 Btu/lbm\n", + "The heat rejected is 88.79 Btu/lbm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction/README.txt b/Utilization_of_Electrical_Energy_and_Traction/README.txt new file mode 100755 index 00000000..f249bb7e --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction/README.txt @@ -0,0 +1,10 @@ +Contributed By: Niren Negandhi +Course: be +College/Institute/Organization: Avaya India Pvt. Ltd. +Department/Designation: Senior Technical Specialist +Book Title: Utilization of Electrical Energy and Traction +Author: J. B. Gupta, R. Manglik and R. Manglik +Publisher: S. K. Kataria & Sons, New Delhi +Year of publication: 2012 +Isbn: 978-93-5014-222-6 +Edition: 1st \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction/screenshots/current_thru_negative_booster_1.png b/Utilization_of_Electrical_Energy_and_Traction/screenshots/current_thru_negative_booster_1.png new file mode 100755 index 00000000..62b7bca9 Binary files /dev/null and b/Utilization_of_Electrical_Energy_and_Traction/screenshots/current_thru_negative_booster_1.png differ diff --git a/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-armature_curve_1.png b/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-armature_curve_1.png new file mode 100755 index 00000000..0f1b518f Binary files /dev/null and b/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-armature_curve_1.png differ diff --git a/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-time_curve_1.png b/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-time_curve_1.png new file mode 100755 index 00000000..038a01a7 Binary files /dev/null and b/Utilization_of_Electrical_Energy_and_Traction/screenshots/speed-time_curve_1.png differ diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch10_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch10_1.ipynb new file mode 100755 index 00000000..9d4abd1e --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch10_1.ipynb @@ -0,0 +1,285 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:afe45272ce3ff93176422df4637443f0511009d7c746f27786eb9c224ddc3321" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Braking: Mechanical Considerations and Control Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "I=[50,100,150,200,250];#\n", + "sp=[73.6,48,41.1,37.3,35.2];\n", + "T=[150,525,930,1335,1750];\n", + "v=600;#in volts\n", + "rm=0.6;#\n", + "\n", + "#Calculations\n", + "eb=v-(I[1]*rm);#in volts\n", + "rh=3;#in ohms\n", + "tr=rh+rm;#in ohms\n", + "i=eb/tr;#in amperes\n", + "tr=T[2];#\n", + "\n", + "#Result\n", + "print \"braking torque is %.f (N-m)\"%tr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "braking torque is 930 (N-m)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "I=[20,40,60,80];#\n", + "emf=[215,381,485,550];#in volts\n", + "emf2=[202,357,455,516];#\n", + "T=40*9.81;# load torque in N-m\n", + "N=600.;#rpm\n", + "ia=56;#in amperes from curve\n", + "va=440.;#in volts from graph\n", + "\n", + "#Calculations\n", + "il=T*(2*math.pi*(N/60));#input to load in W\n", + "tr=va/ia;# in ohms\n", + "tm=0.8;#in ohms\n", + "er=tr-tm;#in ohms\n", + "\n", + "#Result\n", + "print \"external resistance to be connected across the motor during break is %.3f ohm\"%er" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "external resistance to be connected across the motor during break is 7.057 ohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=400.;#in tonne\n", + "We=1.1*W;# in tonne\n", + "S=2.;# distance in km\n", + "G=2.;# gradient in %\n", + "eta=75./100;# efficiency\n", + "D=2.;# distance in km\n", + "V1=40.;# in km\n", + "V2=20.;# in km\n", + "r=40.;#N/tonne\n", + "\n", + "#Calculations&Results\n", + "Ea=(0.01072*We*(V1**2-V2**2))*10**-3;# in kWh\n", + "Ft=(W*r)-(98.1*W*G);\n", + "M=(-Ft*S*1000)/(1000*3600);\n", + "Et=Ea+M;# total energy available\n", + "Ee=eta*Et;\n", + "print \"Electrical energy,Ee(kWh) = %.1f\"%Ee #answer varies due to roundinf-off errors\n", + "As=(V1+V2)/2;# average speed\n", + "At=D/As;# Average time taken\n", + "P=(Ee/At);\n", + "print \"Average power,P(kW) = %.f\"%P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electrical energy,Ee(kWh) = 30.3\n", + "Average power,P(kW) = 454\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=2340;#in tonne\n", + "We=1.1*W;# in tonne\n", + "G=100./80;# gradient in %\n", + "eta=70./100;# efficiency\n", + "V1=60.;# in km\n", + "V2=36.;# in km\n", + "r=5*9.81;#N/tonne\n", + "t=5*60.;# in sec\n", + "\n", + "#Calculations\n", + "Ea=(0.01072*We*(V1**2-V2**2))*10**-3;# in kWh\n", + "Ft=(W*r)-(98.1*W*G);#tractive effort in N\n", + "D=((V1+V2)/2)*(1000./3600)*t;# distance moved in m\n", + "M=(-Ft*D)/(1000*3600);\n", + "Et=Ea+M;\n", + "El=eta*Et;\n", + "\n", + "#Result\n", + "print \"Energy returned to the line,El(kWh) = %.1f\"%El" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy returned to the line,El(kWh) = 178.4\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5, Page 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=500;#in tonne\n", + "G=(20.*100.)/1000;# gradient in %\n", + "eta=75./100;# efficiency\n", + "V=40;# in kmph\n", + "r=40;#N/tonne\n", + "\n", + "#Calculations\n", + "Ft=(W*r)-(98.1*W*G);#tractive effort in N\n", + "P=(-Ft*V)/3600;# Power available in kW\n", + "Pf=round(P*eta);\n", + "\n", + "#Result\n", + "print \"power fed into the line,Pf(kW) = %.f\"%Pf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power fed into the line,Pf(kW) = 651\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6, Page 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "OD=640.;# voltage represent by phasor OD\n", + "R=0.5;# reactor in ohm\n", + "Ia=OD/R;\n", + "V=400;# in volts\n", + "alfa=38.66;#Phase angle in degree\n", + "\n", + "#Calculations\n", + "P=(V*Ia*math.cos(alfa*math.pi/180))*10**-3;\n", + "\n", + "#Result\n", + "print \"Power generated,P(kW) = %.3f\"%P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power generated,P(kW) = 399.804\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch11_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch11_1.ipynb new file mode 100755 index 00000000..b7dc0f12 --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch11_1.ipynb @@ -0,0 +1,401 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:995741ddd18174a29693c7e0c17e1dcfe63840e31c7569a85f8ffcd3b21c314d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Power Supply for Electric Traction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=20;# in m\n", + "w=0.5;# weight per meter in kg\n", + "T=500;# Tension applied in kg\n", + "\n", + "#Calculations\n", + "dell=(w*l**2)/(2*T);\n", + "two_S=2*(l+(2./3)*(dell**2/l));\n", + "\n", + "#Result\n", + "print \"Total Length(m) = %.5f\"%two_S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Length(m) = 40.00267\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "l=30;# in meter\n", + "w=0.72;# weight per meter in kg\n", + "E=640;# in kg/cm^2\n", + "d=1;# diameter in cm\n", + "\n", + "#Calculations\n", + "T=E*(math.pi/4)*d**2;\n", + "dell=((w*l**2)/(2*T))*100;\n", + "\n", + "#Result\n", + "print \"sag(cm) = %.1f\"%dell" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sag(cm) = 64.5\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, Page 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=30;# in meter\n", + "w1=0.9;# average weight of catenary wire in kg/m\n", + "w2=1.2#average weight of trolley wire in kg/m\n", + "\n", + "#Calculations\n", + "w3=(20./100)*w2#average weight of dropper and fittings in kg/m\n", + "w=w1+w2+w3;\n", + "T=1000;#in kg\n", + "dell=(w*l**2)/(2*T);\n", + "\n", + "#Result\n", + "print \"sag(m) = %.3f\"%dell" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sag(m) = 1.053\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "I=300;# in A\n", + "R=0.08;# in ohm\n", + "Vd=6;# voltage drop in volts\n", + "\n", + "#Calculations\n", + "I_dash=((R*(I/2))-Vd)/R;\n", + "\n", + "#Result\n", + "print \"Current(A) = %.f\"%I_dash" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current(A) = 75\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5, Page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "a=7;#far end voltage in volts\n", + "i=125;# in A\n", + "r=0.02;# in ohm\n", + "l=3;# in km\n", + "\n", + "#Calculations\n", + "p=(i*r*l**2)/2;\n", + "I=((p-a)/(r*l));#\n", + "\n", + "#Results\n", + "print \"potential of the track at tha far end of the section in volts is %.2f\"%p\n", + "print \"Current carried by -ve feeder,I(A) = %.3f\"%I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "potential of the track at tha far end of the section in volts is 11.25\n", + "Current carried by -ve feeder,I(A) = 70.833\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6, Page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "ix=200;#amperes\n", + "r=0.02;#in ohms\n", + "\n", + "#Calculations\n", + "x = Symbol('x')\n", + "y = solve(0*x**2 +12*x + 19, x)\n", + "ipx=ix*(3-(-1*y[0]));#in amperes\n", + "inx=2*ix;#in amperes\n", + "it=ipx+inx;#in amperes\n", + "\n", + "#Result\n", + "print \"current through negetive booster in amperes is %.2f\"%it" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current through negetive booster in amperes is 683.33\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7, Page 341" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "ix=250;#amperes\n", + "vb=2;#in volts\n", + "r=0.02;#in ohms\n", + "\n", + "#Calculations\n", + "x = Symbol('x')\n", + "y = solve(0*x**2 +16*x - 27.6, x)\n", + "pc=vb+(ix*r*(1.6)**2)/2;#in volts\n", + "pd=((ix*r*(y[0]**2))/2);#in volts\n", + "tcurr= (1.6*ix)+((ix*(3.2-y[0])));#in amperes\n", + "vnf=r*tcurr;#in volts\n", + "bnb=vnf-vb;#in volts\n", + "cb=((bnb*tcurr)/1000);#in kw\n", + "\n", + "#Result\n", + "print \"maximum potential drop on any two points on the rails in volts is %.1f\"%pc\n", + "print \"capacity of booster in kW is %.2f\"%cb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum potential drop on any two points on the rails in volts is 8.4\n", + "capacity of booster in kW is 10.28\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8, Page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "i=200;# A/km\n", + "r=0.01;#in ohms/km\n", + "\n", + "#Calculations\n", + "x = Symbol('x')\n", + "y = solve(0*x**2 +8*x - 20, x)\n", + "i1=400;#in amperes\n", + "i2=(4-y[0])*i#in amperes\n", + "tc=i1+i2;#in amperes\n", + "vcn=r*tc;#in volts\n", + "nb=vcn-4;#in volts\n", + "rb=(tc*10)/1000;#\n", + "\n", + "#Result\n", + "print \"rating of the booster in kW is %.f\"%rb\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rating of the booster in kW is 7\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9, Page 343" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "vw=60;#in volts\n", + "vt=12;#in volts\n", + "vs=600;#in volts\n", + "vr=578;#volts\n", + "vn=10;#in volts\n", + "\n", + "#Calculations\n", + "tv=vw+vt;#in volts\n", + "va=vs-tv;#in volts\n", + "vtn=tv-vn;#in volts\n", + "vad=vs-vr;#\n", + "vp=vtn-vad;#in volts\n", + "\n", + "#Results\n", + "print \"part (a)\"\n", + "print \"voltage available to trolley when it is at the far end without using boosters in volts is %.f\"%va\n", + "print \"part (b)\"\n", + "print \"positive booster should provide boost of \",(vp),\" volts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "voltage available to trolley when it is at the far end without using boosters in volts is 528\n", + "part (b)\n", + "positive booster should provide boost of 40 volts\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch1_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch1_1.ipynb new file mode 100755 index 00000000..2141c4af --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch1_1.ipynb @@ -0,0 +1,722 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bf41ecd4a5c4b2bac0963dfefdbae99e40865d12b1b3268ffcbf28e722184e41" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Electric Heating" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "r1=100.;#in ohms\n", + "r2=r1;# in ohms\n", + "V=250.;# ac supply in volts\n", + "\n", + "#Calculations&Results\n", + "rp = 1/(1/r1+1/r2);# equivalent resistance in ohms\n", + "pp=((V**2)/rp);#power drawn in watts\n", + "print \"part (a) \"\n", + "print \"power drawn when elements are in parallel,(W)= %.f\"%pp\n", + "rs=r1+r2;# equivalent resistance in ohms\n", + "ps=((V**2)/rs);#power drawn in watts\n", + "print \"part (b) \"\n", + "print \"power drawn when elements are in series ,(W)=%.1f\"%ps" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a) \n", + "power drawn when elements are in parallel,(W)= 1250\n", + "part (b) \n", + "power drawn when elements are in series ,(W)=312.5\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P=2.5;#power in kW\n", + "V=240.;# in volts\n", + "K=1;#radiating efficiency\n", + "e=0.9;#emissivity\n", + "p=42.5*10**-6;# resistivity in ohm-cm\n", + "T1=1500.;#in dgree celsius\n", + "T2=450.;#in degree celsius\n", + "\n", + "#Calculations\n", + "x=((math.pi*V**2)/(4*(p*10**-2)*P*10**3));#\n", + "H=((5.72*K*e)*(((T1+273)/100)**4-((T2+273)/100)**4));#\n", + "z=((P*10**3)/(math.pi*H))**2;#\n", + "l=(z*x)**(1./3);#length in meter\n", + "d=((math.sqrt(z))/l)*10**3;#diameter in mm\n", + "\n", + "#Results\n", + "print \"length in meter =%.2f\"%l\n", + "print \"diameter in mm =%.3f\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length in meter =4.79\n", + "diameter in mm =0.336\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Page 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V=440.;# volts\n", + "P=20.;#in kW\n", + "T1=1200.;#in degree celsius\n", + "T2=700.;# in degree celsius\n", + "K=0.6;#radiating efficiency\n", + "e=0.9;#emissivity\n", + "t=0.025;#thickness in mm\n", + "p=1.05*10**-6;#resisitivity in ohm - meter\n", + "\n", + "#Calculations\n", + "Pp=(round(P*10**3))/3;#power per phase in watts\n", + "Pv= (V/math.sqrt(3));#phase voltage\n", + "R=Pv**2/Pp;#resistance of strip in ohms\n", + "x=((R*t*10**-3)/(p));#\n", + "H=((5.72*K*e)*(((T1+273)/100)**4-((T2+273)/100)**4));#in W/m^2\n", + "y=((Pp)/(H*2));#in m^2\n", + "w=math.sqrt(y/x)*10**3;#width in mm\n", + "l=x*w*10**-3;#length of strip in meter\n", + "\n", + "#Results\n", + "print \"width in mm =%.3f\"%w\n", + "print \"length of strip in meter =%.2f\"%l\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "width in mm =11.084\n", + "length of strip in meter =2.55\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "a=6.;#area in m^2\n", + "l=a/6;#one side of tank in meter\n", + "V=l*l*l;#volume in m^2\n", + "e=90./100;#capacity\n", + "wh=6*e*1000;#water to be heated daily in kg\n", + "s=4200;#specific heat of water in J/Kg/degree celsius\n", + "t1=65;#in degree celsius\n", + "t2=20;#in degree celsius\n", + "\n", + "#Calculations\n", + "hr=wh*s*(t1-t2)*10**-6;#heat required to raise the temperture of water\n", + "hr1=hr/3.6;#heat required in kWh\n", + "d=6.3;#difference in watts\n", + "l=((d*a*(t1-t2)*24)/1000);#losses from the surface of the tank in kWh\n", + "es=hr1+l;#energy supplied in kWh\n", + "lk=es/24;#loading in kW\n", + "ef=(hr1/es)*100;#efficiency of the tank in percentage\n", + "\n", + "#Results\n", + "print \"loading in kW = %.1f\"%lk\n", + "print \"efficiency of the tank in percentage = %.1f\"%ef" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "loading in kW = 13.5\n", + "efficiency of the tank in percentage = 87.4\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5, Page 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "sh=444;# specific heat of steel in J/Kg/\u00b0C\n", + "lh=37.25;#latent heat in kJ/kg\n", + "mp=1370;#melting point of steel \u00b0C\n", + "t1=19.1;#initial temperture in \u00b0C\n", + "e=0.5;#overall efficiency\n", + "ip=5700;#input current in amperes\n", + "rs=0.008;#resistance of transformer referred to secondary in ohms\n", + "rr=0.014;# recatance in ohms\n", + "m=4.3;# steel in tonnes\n", + "\n", + "#Calculations\n", + "ers=((m*10**3*((sh*(mp-t1))+lh*10**3)));# energy required in joules\n", + "ersh=ers/(3.6*10**6);#energy required in kWh\n", + "ata=1;#time taken to melt steel in hours\n", + "ao=ersh/ata;#average output in kW\n", + "ai=ao/e;#average input in kW\n", + "vdr=ip*rs;#voltage drop due to resistance of furnace leads\n", + "vdr1=ip*rr;#voltage drop due to reactance of furnace leads\n", + "va=((ai*10**3)/(3*ip))-(vdr);#voltage resistive in nature\n", + "rac=va/ip;#arc resistance in \u03a9\n", + "oppv=math.sqrt((va+vdr)**2+vdr1**2);#open circuit phase voltage in volts\n", + "kvas=3*ip*oppv*10**-3;#total kVA drawn \n", + "pf=((va+vdr)/oppv);#power factor \n", + "\n", + "#Result\n", + "print \"average input in kW = %.2f\"%ai\n", + "print \"arc voltage in volts = %.1f\"%va\n", + "print \"arc resistance in \u03a9 = %.4f\"%rac\n", + "print \"pf of the current drawn from the supply (lagging) = %.4f\"%pf\n", + "print \"total kVA drawn in kVA = %.f\"%kvas" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average input in kW = 1521.84\n", + "arc voltage in volts = 43.4\n", + "arc resistance in \u03a9 = 0.0076\n", + "pf of the current drawn from the supply (lagging) = 0.7445\n", + "total kVA drawn in kVA = 2044\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "sh=0.12;# specific heat of steel in kcal/Kg/\u00b0C\n", + "lh=8.89;#latent heat in kcal/kg\n", + "mp=1370;#melting point of steel \u00b0C\n", + "t1=19.1;#initial temperture in \u00b0C\n", + "e=0.5;#overall efficiency\n", + "ip=5700;#input current in amperes\n", + "rs=0.008;#resistance of transformer referred to secondary in ohms\n", + "rr=0.014;# recatance in ohms\n", + "m=4.3;# steel in tonnes\n", + "\n", + "#Calculations\n", + "ers=((m*10**3*((sh*(mp-t1))+lh)));# energy required in joules\n", + "ersh=ers/(860);#energy required in kWh\n", + "ata=1;#time taken to melt steel in hours\n", + "ao=ersh/ata;#average output in kW\n", + "ai=ao/e;#average input in kW\n", + "vdr=ip*rs;#voltage drop due to resistance of furnace leads\n", + "vdr1=ip*rr;#voltage drop due to reactance of furnace leads\n", + "va=((ai*10**3)/(3*ip))-(vdr);#voltage resistive in nature\n", + "rac=va/ip;#arc resistance in \u03a9\n", + "oppv=math.sqrt((va+vdr)**2+vdr1**2);#open circuit phase voltage in volts\n", + "kvas=3*ip*oppv*10**-3;#total kVA drawn \n", + "pf=((va+vdr)/oppv);#power factor \n", + "\n", + "#Result\n", + "print \"average input in kW =%.f\"%ai\n", + "print \"arc voltage in volts =%.1f\"%va\n", + "print \"arc resistance in \u03a9 =%.5f\"%rac\n", + "print \"pf of the current drawn from the supply (lagging) =%.4f\"%pf\n", + "print \"total kVA drawn in kVA =%.1f\"%kvas" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average input in kW =1710\n", + "arc voltage in volts =54.4\n", + "arc resistance in \u03a9 =0.00954\n", + "pf of the current drawn from the supply (lagging) =0.7816\n", + "total kVA drawn in kVA =2187.7\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "sh=0.1;# specific heat of steel in kcal/Kg/\u00b0C\n", + "lh=26.67;#latent heat in kcal/kg\n", + "mp=555;#melting point of steel \u00b0C\n", + "t1=35;#initial temperture in \u00b0C\n", + "e=0.8;#overall efficiency\n", + "ip=5700;#input current in amperes\n", + "rs=0.008;#resistance of transformer referred to secondary in ohms\n", + "rr=0.014;# recatance in ohms\n", + "m=2;# steel in tonnes\n", + "\n", + "#Calculations\n", + "ers=((m*10**3*((sh*(mp-t1))+lh)));# energy required in joules\n", + "ersh=ers/(860);#energy required in kWh\n", + "ata=1;#time taken to melt steel in hours\n", + "ao=ersh/ata;#average output in kW\n", + "ai=ao/e;#average input in kW\n", + "vdr=ip*rs;#voltage drop due to resistance of furnace leads\n", + "vdr1=ip*rr;#voltage drop due to reactance of furnace leads\n", + "va=((ai*10**3)/(3*ip))-(vdr);#voltage resistive in nature\n", + "rac=va/ip;#arc resistance in \u03a9\n", + "oppv=math.sqrt((va+vdr)**2+vdr1**2);#open circuit phase voltage in volts\n", + "kvas=3*ip*oppv*10**-3;#total kVA drawn \n", + "pf=((va+vdr)/oppv);#power factor \n", + "rf=ai/ata;# in kW\n", + "\n", + "#Result\n", + "print \"rating of furnance in kW =%.1f\"%rf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rating of furnance in kW =228.7\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "sh=880;# specific heat of steel in J/Kg/\u00b0C\n", + "lh=32000;#latent heat in J/kg\n", + "mp=660;#melting point of steel \u00b0C\n", + "t1=15;#initial temperture in \u00b0C\n", + "ip=5700;#input current in amperes\n", + "rs=0.008;#resistance of transformer referred to secondary in ohms\n", + "rr=0.014;# recatance in ohms\n", + "m=1.8;# IN KG\n", + "\n", + "#Calculations\n", + "ers=((m*((sh*(mp-t1))+lh)));# energy required in joules\n", + "ersh=ers/(3.6*10**6);#energy required in kWh\n", + "TM=10.;#TIME TO MELT IN MINS\n", + "ip=5;#input of the furnance in kW\n", + "ei=(ip)*(TM/60);#energy input in kWh\n", + "n=(ersh/ei)*100;#efficiency of furnance in percentage\n", + "\n", + "#Result\n", + "print \"efficiency of furnance in percentage =%.f\"%n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "efficiency of furnance in percentage =36\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9, Page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "vs=10;#secondary voltage in volts\n", + "p=500;#power drawn in kW\n", + "pf=0.5;\n", + "ir=(p*10**3)/pf;#secondary current in amperes\n", + "\n", + "#Calculations\n", + "zs=vs/ir;#impedence of secondary circuit in ohms\n", + "rs=zs*pf;#resistance of secondary circuit in ohms\n", + "res=zs*(math.sqrt(1-pf**2));#rectancetance of secondary circuit in ohms\n", + "rs1=2*rs;# resistacne when hearth is full in \u03a9\n", + "res1=res;# reactance when hearth is full in \u03a9\n", + "zs1=(math.sqrt(rs1**2+res1**2));#impedance of secondary circuit in \u03a9\n", + "pf1=rs1/zs1;#power factor\n", + "is1=vs/zs1;#secondary current in amperes\n", + "pd=is1**2*rs1*10**-4;#power drawn in kW\n", + "\n", + "#Results\n", + "print \"power factor is =%.3f\"%pf1\n", + "print \"power drawn in kW =%.3f\"%pd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power factor is =0.756\n", + "power drawn in kW =571.429\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10, Page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "vs=10;#secondary voltage in volts\n", + "p=400;#power drawn in kW\n", + "pf=0.6;#\n", + "\n", + "#Calculations\n", + "is1=(p*10**3)/pf;#secondary current in amperes\n", + "zs=vs/is1;#impedence of secondary circuit in ohms\n", + "rs=zs*pf;#resistance of secondary circuit in ohms\n", + "res=zs*(math.sqrt(1-pf**2));#rectancetance of secondary circuit in ohms\n", + "x=(rs)/res;#height \n", + "\n", + "#Result\n", + "print \"maximum heat will be obtained with the height of charge as 3/4 of height of hearth =%.2f\"%x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum heat will be obtained with the height of charge as 3/4 of height of hearth =0.75\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11, Page 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "p=5*10**-7;#specific resistance in \u03a9-m\n", + "rp=1;#relative permeability\n", + "dp=0.0015;#depth of penetration in mter\n", + "\n", + "#Calculations\n", + "f=((p*10**7)/((rp*(dp)**2)*4*(math.pi)**2))*10**-3;#frequency in kHz\n", + "\n", + "#Result\n", + "print \"frequency in kHz =%.3f\"%f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency in kHz =56.290\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12, Page 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "l=0.5;#length in meter\n", + "b=0.25;#breadh in meter\n", + "h=0.02;#in meter\n", + "t1=25;# temperture \u00b0C\n", + "t2=125;# temperture \u00b0C\n", + "t=10;#time in minutes\n", + "f=30;#frequency in 30 MHz\n", + "w=600;#weight of the wood in kg/m^3\n", + "sh=1500;#specific heat in J/Kg/\u00b0C\n", + "e=50;#efficiency\n", + "\n", + "#Calculations\n", + "vp=l*b*h;#volume in m^3\n", + "wp=vp*w;#weight of plywood in kg\n", + "hr=sh*wp*(t2-t1);#heat required in joules\n", + "hrt=(hr/(3600));#heat required to raise the temperture of plywood in Wh\n", + "pu=hrt/(1./6);#power utilized in watts\n", + "pi=(pu/e)*100;#power input required in percentage\n", + "\n", + "#Result\n", + "print \"power input required ,(W)= %.f\"%pi\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power input required ,(W)= 750\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13, Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "vl=600;#in volts\n", + "p=200;#power absorbed in watts\n", + "pf=0.05;#power factor\n", + "f=30*10**6;#frequency in Hz\n", + "ep=8.854*10**-12;#constant\n", + "er=5;#\n", + "a=150;# in cm^2\n", + "t=0.02;# in meter\n", + "\n", + "#Calculations\n", + "c=((ep*er*a*10**-4)/t);#capacitance in farads\n", + "vr=(math.sqrt(p/(2*math.pi*f*c*pf)));#voltage is required in volts\n", + "i=p/(vr*pf);#current in amperes\n", + "f2=((f*(vr/vl)**2))*10**-6;#frequency in Mhz\n", + "\n", + "#Results\n", + "print \"voltage in volts =%.f\"%vr\n", + "print \"current in amperes =%d\"%i\n", + "print \"frequency in MHz=%.1f\"%f2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage in volts =799\n", + "current in amperes =5\n", + "frequency in MHz=53.3\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14, Page 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "pf=0.04;#power factor\n", + "p=1000;#in watts\n", + "f=10*10**6;# in MHz\n", + "a1=.004;#area in m^2\n", + "a2=0.001;#area in m^2\n", + "t=0.02;#thickness in meter\n", + "t1=.01;#thicknes sin meter\n", + "t2=t-t1;#thickness in meter\n", + "ep=8.854*10**-12;#constant in F/m\n", + "er=5;#relative permittivity of plywood\n", + "er1=1;#relative permittivity in air\n", + "\n", + "#Calculations&Results\n", + "c=(ep*(((a1*er1)/t)+(a2/((t1/er)+(t2/er1)))));#capacitance in farads\n", + "vr=(math.sqrt(p/(2*math.pi*f*c*pf)));#voltage is required in volts\n", + "print \"part (a)\"\n", + "print \"voltage across the electrodes in volts =%.f\"%vr\n", + "i=p/(vr*pf);#current in amperes\n", + "print \"part (b)\"\n", + "print \"cureent in amperes is =%.3f\"%i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "voltage across the electrodes in volts =12594\n", + "part (b)\n", + "cureent in amperes is =1.985\n" + ] + } + ], + "prompt_number": 43 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch3_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch3_1.ipynb new file mode 100755 index 00000000..461a7916 --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch3_1.ipynb @@ -0,0 +1,427 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1d5a5fec58f50885b306fd11c5d34341cb747d72353b0fd13bd0ab2048a7d12e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Electrolytic Processes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "r=5;#in cm\n", + "S=4*math.pi*r**2;\n", + "t=0.005;#in mm\n", + "d=10.5;\n", + "\n", + "#Calculations\n", + "m=S*t*d*10**-3;\n", + "Z=(0.001118*3600)/1000;\n", + "Amr=m/Z;\n", + "\n", + "#Result\n", + "print \"ampere hour required,(Ampere-hour)= %.2f\"%Amr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ampere hour required,(Ampere-hour)= 4.10\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m=20.;#in gm\n", + "I=120;#in A\n", + "t=10*60;#in sec\n", + "t1=5*60;#in sec\n", + "I1=100;#in A\n", + "\n", + "#Calculations\n", + "Cec=63.18/2;\n", + "Cen=58.6/2;\n", + "Z=m/(I*t);\n", + "Z1=(Z*(Cec/Cen))*10**-3;\n", + "m1=Z1*I1*t1;\n", + "\n", + "#Result\n", + "print \"mass of copper depsoited is \",round(m1,3),\"kg or \",(round(m1*10**3)),\"gm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of copper depsoited is 0.009 kg or 9.0 gm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Z=1.044*10**-8;#in kg/C\n", + "I=40;#in A\n", + "t=1*60*60;#in seconds\n", + "\n", + "#Calculations\n", + "m1=Z*I*t;\n", + "\n", + "#Result\n", + "print \"mass of copper depsoited is \",round(m1,4),\"kg or \",round((m1*10**3),1),\"gm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of copper depsoited is 0.0015 kg or 1.5 gm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=0.00025;#in m^2\n", + "D=8900;#in kg/m^3\n", + "Z=32.95*10**-8;#in kg/C\n", + "I=1;#in A\n", + "\n", + "#Calculations\n", + "t=100*60;#in seconds\n", + "m=Z*I*t;#in kg\n", + "v=m/D;\n", + "T=(v/A)*10**3;\n", + "\n", + "#Result\n", + "print \"thickness of copper deposited,T(mm) = %.3f\"%T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thickness of copper deposited,T(mm) = 0.889\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=0.00025;#in m^2\n", + "D=8900;#in kg/m^3\n", + "Z=32.95*10**-8;#in kg/C\n", + "I=1.5;#in A\n", + "\n", + "#Calculations\n", + "t=60*60;#in seconds\n", + "m=Z*I*t;#in kg\n", + "v=m/D;\n", + "T=(v/A);\n", + "\n", + "#Result\n", + "print \"Thickness of copper deposited is \",round(T,4),\"m or \",round((T*10**3),1),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of copper deposited is 0.0008 m or 0.8 mm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m=50;# in gm\n", + "t=2*60*60;# in sec\n", + "ECE_silver=111.8*10**-8;# in kg C^-1\n", + "atomic_weight1=108;# for silver\n", + "atomic_weight2=63.5;#for copper\n", + "valency=1;#for silver\n", + "\n", + "#Calculations\n", + "Ces=atomic_weight1/valency;# chemical equivalent of silver\n", + "Cec=atomic_weight2/2;# chemical equivalent of copper\n", + "Z=ECE_silver*(Cec/Ces);\n", + "I=(m*10**-3)/(Z*t);\n", + "\n", + "#Result\n", + "print \"current,I(A) = %.2f\"%I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current,I(A) = 21.13\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "a=500;# electrolytic cells\n", + "I=6000;#in A\n", + "t=40;#in hour/week\n", + "Z=32.81*10**-8*3600;#in kg/A-h\n", + "V=0.25;# in volts\n", + "\n", + "#Calculations\n", + "Ah=a*I*(t*52);# total number of ampere hour per annum\n", + "Ao=Z*Ah*10**-3;# annual output in tonnes\n", + "Ea=Ah*V*10**-3;# energy consumed per annum in kWh\n", + "Et=Ea/Ao;\n", + "\n", + "#Result\n", + "print \"energy consumption,Et(kWh/tonne) = %.2f\"%Et" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy consumption,Et(kWh/tonne) = 211.66\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Z=1.0384*10**-8;#in kg/C\n", + "VbyZ=14.212*10**7;# in joules\n", + "\n", + "#Calculations\n", + "V=VbyZ*Z;\n", + "\n", + "#Result\n", + "print \"voltage,V(volts) = %.3f\"%V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "voltage,V(volts) = 1.476\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9, Page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ECE_silver=111*10**-8;#in kg/C\n", + "Cew_silver=107.98;#chemical equivalent of silver\n", + "Cew_al=27/3;#chemical equivalent of aluminium\n", + "\n", + "#Calculations\n", + "Z=(ECE_silver*Cew_al)/Cew_silver;\n", + "C_efficiency=0.92;\n", + "I=3000;#in A\n", + "t=24*60*60;#in seconds\n", + "m=Z*I*t*C_efficiency;\n", + "\n", + "#Result\n", + "print \"mass of aluminium,m(kg) = %.3f\"%m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of aluminium,m(kg) = 22.062\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10, Page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "d=0.1;#in m\n", + "l=.25;# in m\n", + "Tc=2;# thickness of coating in mm\n", + "D=8.9;#density of metal in gm/CC\n", + "C_density=160;#in A/sq\n", + "I_efficiency=0.9;\n", + "\n", + "#Calculations&Results\n", + "S=math.pi*d*l;\n", + "m=S*Tc*10**-3*D*10**3;\n", + "Z=30.43*10**-8;# in kg/C\n", + "Q=(m/Z)/3600;# in A-h\n", + "Q_dash=Q/I_efficiency;\n", + "print \"quantity of electricity,Q_dash(A-h) = %.f\"%Q_dash\n", + "I=C_density*S;\n", + "t=Q_dash/I;\n", + "print \"time required,t(hours) = %.2f\"%t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "quantity of electricity,Q_dash(A-h) = 1418\n", + "time required,t(hours) = 112.84\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch4_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch4_1.ipynb new file mode 100755 index 00000000..8a1a303b --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch4_1.ipynb @@ -0,0 +1,1356 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4099ea94bbb3c9f1b17447df5b8a074a8f60585fc47e2a49454f49261cf5945d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Illumination" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1, Page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "F=1000;#intensity in lumens\n", + "\n", + "#Calculations\n", + "MSCP=F/(4*math.pi);# MSCP of the lamps\n", + "\n", + "#Result\n", + "print \"MSCP of the lamp is %.f\"%MSCP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MSCP of the lamp is 80\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V=250;#in volts\n", + "I=0.8;#in amperes\n", + "F=3000;#intensity in lumens\n", + "\n", + "#Calculations\n", + "wl=V*I;#wattage of lapms ins watts\n", + "lpw=F/wl;# lumens per watts is\n", + "MSCP=F/(4*math.pi);# MSCP of the lamps\n", + "MW=MSCP/wl;#MSCP per watts\n", + "\n", + "#Results\n", + "print \"lumens per watt is %.f\"%lpw\n", + "print \"MSCP per watt of the lamp is %.1f\"%MW" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lumens per watt is 15\n", + "MSCP per watt of the lamp is 1.2\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "d=0.4;#diamter in meter\n", + "p=0.20;#in percentage absorption\n", + "F=4850;# lumens\n", + "\n", + "#Calculations\n", + "Fe=(1-p)*F;# flux emitted by the globe in lumens\n", + "sa=4*math.pi*(d/2)**2;#surface area in m^2\n", + "als=Fe/sa;#average lumninance of sphere in lumens/m^2\n", + "\n", + "#Result\n", + "print \"average lumninance of sphere in lumens/m^2 = %.f\"%als" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average lumninance of sphere in lumens/m^2 = 7719\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P=20;#filament power in watts\n", + "h=5;#height in meters\n", + "d=4;#diamter in meter\n", + "p=0.50;#in percentage absorption\n", + "ef=0.89;#efficiency in watts\n", + "\n", + "#Calculations\n", + "cpl=P/ef;#candle power of lamp in CP\n", + "Lop=4*math.pi*cpl;#lu,inous output in lumens\n", + "Fe=(1-p)*Lop;# flux emitted by the globe in lumens\n", + "sa=math.pi*(d/2)**2;#surface area in m^2\n", + "als=Fe/sa;#average lumninance of sphere in lumens/m^2\n", + "\n", + "#Result\n", + "print \"average lumninance of sphere in lumens/m^2 =%.3f\"%als" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "average lumninance of sphere in lumens/m^2 =11.236\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "cpl=100.;#\n", + "h=5;#in meter\n", + "th=60;#in degree\n", + "F=1000;#intensity in lumens\n", + "\n", + "#Calculations\n", + "MSCP=F/(4*math.pi);# MSCP of the lamps\n", + "ai=((cpl/h**2)*math.cos((90-th)*math.pi/180));#average intensity of illumination\n", + "\n", + "#Results\n", + "print \"MSCP of a lamp is= %.f\"%MSCP\n", + "print \"average intensity of illumination is %.3f lux \"%ai" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "MSCP of a lamp is= 80\n", + "average intensity of illumination is 3.464 lux \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "p=500;#lamp power in watts\n", + "mscp=1250;#\n", + "h=2.7;#in meters\n", + "\n", + "#Calculations\n", + "ea=(mscp)/(h)**2;#illumination directly below lamp in lux\n", + "le=(4*math.pi*mscp)/p;#lamp efficiency in lumens/watts\n", + "h1=3;#meters\n", + "eb=((mscp)/(h**2)*(2.7**3/(h1**2+h**2)**(3./2)));\n", + "#illumnination at a point 3 meters away on the horizontal plane vertically below the lamp in lux\n", + "\n", + "#Results\n", + "print \"illumination directly below lamp in lux = %.2f\"%ea\n", + "print \"lamp efficiency in lumens/W = %.2f\"%le\n", + "print \"illumnination at a point 3 meters away on the horizontal plane vertically below the lamp in lux = %.2f\"%eb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination directly below lamp in lux = 171.47\n", + "lamp efficiency in lumens/W = 31.42\n", + "illumnination at a point 3 meters away on the horizontal plane vertically below the lamp in lux = 51.33\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "l=100;#illumination at a point directly below the lamp in lumens/m^3\n", + "cp=256.;#\n", + "h1=1.2;#in meters\n", + "\n", + "#Calculations\n", + "h=math.sqrt(cp/l);#height in meters\n", + "x=math.sqrt(h**2+h1**2);#\n", + "x1=h/x;#\n", + "eb=((cp)/(h**2))*(x1)**3;#illumnination at a point 1.2 meters away on the horizontal plane vertically below the lamp in lux\n", + "\n", + "#Results\n", + "print \"height in meters is =%.1f\"%h\n", + "print \"illumnination at a point 1.2 meters away on the horizontal plane vertically below the lamp in lux =%.1f\"%eb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "height in meters is =1.6\n", + "illumnination at a point 1.2 meters away on the horizontal plane vertically below the lamp in lux =51.2\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "L1=500.;#candle power \n", + "h1=9.;#in meters\n", + "d=2;#distance in meters\n", + "I2=20;#illumination in Lux\n", + "\n", + "#Calculations\n", + "x=math.sqrt(h1**2+d**2);#from pythagoras theoram\n", + "Cpx=((I2-(L1/h1**2))*h1**2)/((h1/x)**3);#candle power \n", + "\n", + "#Result\n", + "print \"candle power of lamp two in CP =%.f\"%Cpx" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "candle power of lamp two in CP =1204\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page 107" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "h1=10;#in meters\n", + "eL=1;#ASSUME\n", + "Ea=1./(10)**2;#\n", + "\n", + "#Calculations\n", + "X=(((10**3)*eL)/10**2)*10*(1./Ea);\n", + "x=(X)**(2./3);#\n", + "y=math.sqrt(x-100);#\n", + "\n", + "#Result\n", + "print \"distance in meters is %.1f\"%y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance in meters is 19.1\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11, Page 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "th=15.;#in degree\n", + "l=400;#candela\n", + "d=8;# meter\n", + "p=0.80;#in percentage absorption\n", + "\n", + "#Calculations\n", + "Fe=p*4*math.pi*l;# flux emitted by the globe in lumens\n", + "dA=d*math.tan((th/2)*math.pi/180);#diameter in degree\n", + "sa=math.pi*(dA)**2;#surface area in m^2\n", + "als=Fe/sa;#average lumninance of sphere in lux\n", + "\n", + "#Result\n", + "print \"total flux in lumens = %.f\"%Fe\n", + "print \"average lumninance of sphere is %.f lux\"%als" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total flux in lumens = 4021\n", + "average lumninance of sphere is 1154 lux\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12, Page 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "CP=1000.;#\n", + "h=12;#in meter\n", + "d=24;#diamter in meter\n", + "\n", + "#Calculations\n", + "mil=CP/(h)**2;#maximum illumination in lux\n", + "mal=mil*(12/math.sqrt(12**2+12**2))**3;#minimum illumination in lux\n", + "\n", + "#Results\n", + "print \"maximum illumination is %.2f lux\"%mil\n", + "print \"minimum illumination is %.2f lux\"%mal" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum illumination is 6.94 lux\n", + "minimum illumination is 2.46 lux\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13, Page 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "p=60.;#\n", + "CP=200.;#\n", + "h=6;#in meter\n", + "d=10;#diamter in meter\n", + "\n", + "#Calculations&Results\n", + "mil=CP/(h)**2;#maximum illumination in lux\n", + "print \"part (a). \"\n", + "print \"illumination at the centre of the area without reflector is %.2f lux\"%mil\n", + "mal=mil*(h/math.sqrt(h**2+(d/2)**2))**3;#minimum illumination in lux\n", + "tl=4*math.pi*CP;#total lumens \n", + "ts=(p/100)*tl;#total lumens reaching the surface\n", + "A=math.pi*(d/2)**2;#total surface area in m**2\n", + "alf=ts/A;#average illumination with reflector\n", + "x=math.sqrt(h**2+(d/2)**2);#\n", + "y=h/x;#\n", + "om=2*math.pi*(1-y);# in steradians\n", + "tfr=CP*om;#total flux reaching the surface\n", + "alwr=tfr/A;#average illumination without reflector\n", + "print \"\\npart (b). \"\n", + "print \"illumination at the edge of the area without reflector is %.2f lux\"%mal\n", + "print \"average illumination with reflector is %.1f lux\"%alf\n", + "print \"average illumination without reflelctor is %.1f lux\"%alwr\n", + "#with the reflector the illumintaion at the edge and at the end will be the same since the reflection directs the \n", + "#light uniformity on the surface" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a). \n", + "illumination at the centre of the area without reflector is 5.56 lux\n", + "\n", + "part (b). \n", + "illumination at the edge of the area without reflector is 2.52 lux\n", + "average illumination with reflector is 19.2 lux\n", + "average illumination without reflelctor is 3.7 lux\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14, Page 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "CP=100.;#\n", + "h=6.;#in meter\n", + "d=16;# meter\n", + "\n", + "#Calculations\n", + "x=math.sqrt(h**2+d**2);#\n", + "em=2*((CP/h**2)*(h/(d-h))**3);#illumination in the middle in lux\n", + "ee=((CP/h**2)*(1+(h/x)**3));#illumination iunder each lamp in lux\n", + "\n", + "#Results\n", + "print \"illumination under each lamp is %.1f lux\"%ee\n", + "print \"illumination in the middle is %.1f lux\"%em" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination under each lamp is 2.9 lux\n", + "illumination in the middle is 1.2 lux\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15, Page 109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "CP=800;#\n", + "h=10;#in meter\n", + "d=12;# meter\n", + "\n", + "#Calculations\n", + "x=math.sqrt(h**2+d**2);#\n", + "x1=math.sqrt(h**2+(d/2)**2);#\n", + "em=((CP/h**2)*(1+(h/x)**3+(h/x)**3));#illumination iunder each lamp in lux\n", + "ee=2*((CP/h**2)*(h/x1)**3);#illumination at the centrelamp in lux\n", + "\n", + "#Results\n", + "print \"illumination under each lamp is %.1f lux\"%em\n", + "print \"illumination in the middle is %.3f lux\"%ee" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination under each lamp is 12.2 lux\n", + "illumination in the middle is 10.088 lux\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16, Page 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "CP=400;#\n", + "h=10;#in meter\n", + "d=20;# meter\n", + "\n", + "#Calculations\n", + "x=math.sqrt(d**2-h**2);#\n", + "ee=4*((CP/h**2)*(h/x)**3);#illumination at the centrelamp in lux\n", + "\n", + "#Result\n", + "print \"illumination in the middle is %.2f lux\"%ee" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination in the middle is 3.08 lux\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Page 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "cp=500.;#cp\n", + "h=4.;#in meter\n", + "\n", + "#Calculations\n", + "x=((2*cp*h**3)/h**2);#\n", + "y=((cp*h**3)/h**2);#\n", + "y1=cp/h**2;#\n", + "y2=y/2;#\n", + "y21=y1/2;#\n", + "d=math.sqrt((((x-y2)/y21)**(2./3))-h**2)*2.29;#\n", + "\n", + "#Result\n", + "print \"distance is,(m)= %.2f\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance is,(m)= 9.52\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18, Page 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "d=6;#in meter\n", + "h=4;#in meter\n", + "ef=20;#lumens per watt\n", + "uc=0.5;#utilization coefficient\n", + "il=750;# in lux\n", + "\n", + "#Calculations\n", + "a=(math.pi/4)*(d)**2;#\n", + "F=a*il;#in lumens \n", + "tf=F/uc;#total flux emitted by the lamp\n", + "watt=tf/ef;#wattage of lamp\n", + "\n", + "#Result\n", + "print \"wattage of lamp is %.f watts\"%watt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wattage of lamp is 2121 watts\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "vl=220.;#voltage of lamp\n", + "wl=60.;#wattage of lamp\n", + "wl1=75.;#in watts\n", + "v2=440.;# in volts\n", + "\n", + "#Calculations\n", + "r1=((vl**2)/wl);# in ohms\n", + "r2=((vl**2)/wl1);# in ohms\n", + "i=(v2/(r1+r2));#in amperes\n", + "v1=i*r1;# volts \n", + "v12=i*r2;#in volts\n", + "cp6=(math.ceil(v1)/vl)**4 *(100);#candle power \n", + "cp7=(v12/vl)**4*(100);#candle power\n", + "\n", + "#Results\n", + "print \"potential drop across 60 watt lamps is %.f volts\"%cp6\n", + "print \"potential drop across 75 watt lamps is %.f volts\"%v12\n", + "print \"candle power of 60 watts lampe in percentage = %.f\"%cp6\n", + "print \"candle power of 75 watts lampe in percentage %.f\"%cp7\n", + "#answer is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "potential drop across 60 watt lamps is 154 volts\n", + "potential drop across 75 watt lamps is 196 volts\n", + "candle power of 60 watts lampe in percentage = 154\n", + "candle power of 75 watts lampe in percentage 62\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "w=84;#watts\n", + "pf=0.7;#power factor\n", + "v=240;#in volts\n", + "\n", + "#Calculations\n", + "i=(w)/(v*pf);# in amperes\n", + "rva=v*i*math.sqrt(1-pf**2);#relative volt-amperes \n", + "cpf=1;#corrected power factor\n", + "rvas=v*i*math.sqrt(1-cpf**2);#\n", + "f=50;# in hertz\n", + "c=((rva)/(2*math.pi*f*(v)**2));#in farads\n", + "\n", + "#Result\n", + "print \"capacitance in (micro-F) is %.2f\"%(c*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitance in (micro-F) is 4.74\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page 131" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "v1=110;#in volts\n", + "cp1=16.;#in cp\n", + "cp2=25;#in cp\n", + "v2=220.;#in volts\n", + "\n", + "#Calculations\n", + "ri=((cp1/cp2)*(v2/v1));#ratio of curents\n", + "dr=(ri)**(2./3);#ratio of diameters\n", + "di=(cp1/cp2)*(1./dr);#ratio of lengths\n", + "\n", + "#Results\n", + "print \"ratio of diameter is %.2f\"%dr\n", + "print \"ratio of length is %.3f\"%di" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of diameter is 1.18\n", + "ratio of length is 0.543\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.22, Page132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "c1=71.5;#candel power\n", + "v1=260.;#in volts\n", + "c2=50.;#candel power\n", + "v2=240;#in volts\n", + "\n", + "#Calculations&Results\n", + "b=math.log(c1/c2)/(math.log(v1/v2));#\n", + "a=c2/(v2)**(4.5);#\n", + "print \"part (a). \"\n", + "print \"constants are %.2e and %.1f\"%(a,b)\n", + "v=250;# in volts\n", + "p=4.;#change in percentage\n", + "dvc=a*b*((v)**(b-1));#in candle per volts\n", + "dc=(1+(p/100))**b;#when voltage increase by 4%\n", + "pcp=((dc-1))*100;#percentage change in candle power\n", + "dc1=(1-(p/100))**b;#when voltage falls by 4%\n", + "pcp1=((dc1-1))*100;#percentage change in candle power\n", + "print \"part (b).\"\n", + "print \"change of candle power is %.2f per volts\"%dvc\n", + "\n", + "#chage in candle power per volt is calculated wrong in the book\n", + "print \"percentage change in candle power when voltage increase by 4%% is %.1f\"%pcp\n", + "print \"percentage change in candle power when voltage falls by 4%% is %.1f\"%pcp1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a). \n", + "constants are 9.73e-10 and 4.5\n", + "part (b).\n", + "change of candle power is 0.90 per volts\n", + "percentage change in candle power when voltage increase by 4% is 19.2\n", + "percentage change in candle power when voltage falls by 4% is -16.7\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23, Page 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "dp=1.2;#depreciation factor\n", + "uf=0.6;#utiliazation factor\n", + "l=15;# in meters\n", + "b=6;# in meters\n", + "n=20;# no. of lamps\n", + "lw=250;# mscp in watts\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "tl=n*lw*4*math.pi;#/total lumens\n", + "lwp=((tl*uf)/dp);#lumens reaching on the working plane\n", + "e=lwp/a;#illumination on working plane in lux\n", + "\n", + "#Result\n", + "print \"illumination on working plane is %.f lux\"%e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination on working plane is 349 lux\n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.24, Page 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ef=40;#efficiency in lumens/watt\n", + "mil=80;# minimum illumination in lumens/m^2\n", + "dp=0.8;#depreciation factor\n", + "uf=0.4;#utiliazation factor\n", + "l=100;# in meters\n", + "b=10;# in meters\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "tl=a*mil;#/total lumens\n", + "glr=tl/(uf*dp);#gross illumination required\n", + "twr=glr/ef;#total wattage required\n", + "\n", + "#Results\n", + "print \"number of lamps of 150watt rating in 2 rows are 42\" \n", + "print \"total wattage is %.f watts\"%twr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of lamps of 150watt rating in 2 rows are 42\n", + "total wattage is 6250 watts\n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.25, Page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "h=4;#in meters\n", + "wp=75;#in lux\n", + "ef=14;#efficiency in lumens/watt\n", + "dp=0.2;#depreciation factor\n", + "uf=0.5;#utiliazation factor\n", + "l=72;# in meters\n", + "b=15;# in meters\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "mf=1-dp;#maintenance factor\n", + "glr=(a*wp)/(uf*mf);#gross illumination required\n", + "twr=glr/ef;#total wattage required\n", + "wec=twr/80;#wattage of each lamps\n", + "\n", + "#Results\n", + "print \"number of lamps of 150watt rating in 2 rows are 80\"\n", + "print \" wattage of each lamp \",round(wec,1),\" watts equivalent to 200 watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of lamps of 150watt rating in 2 rows are 80\n", + " wattage of each lamp 180.8 watts equivalent to 200 watts\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.26, Page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "a=30*30;#\n", + "e=75;#\n", + "uf=0.5;#\n", + "df=1-0.2;#\n", + "le=15;#efficiency\n", + "\n", + "#Calculations\n", + "ph=(a*e)/(uf*df);#\n", + "W=ph/le;#\n", + "ew=300;#W\n", + "N=W/ew;#\n", + "\n", + "#Results\n", + "print \"total number of lamps is %.1f (say 42)\"%N\n", + "print \"wattage of lamps is %.f W\"%W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total number of lamps is 37.5 (say 42)\n", + "wattage of lamps is 11250 W\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.27, Page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "h=5;# in meters\n", + "el=100;#in lux\n", + "ef=16;#efficiency in lumens/watt\n", + "dp=0.2;#depreciation factor\n", + "uf=0.4;#utiliazation factor\n", + "l=60;# in meters\n", + "b=15;# in meters\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "glr=(a*el)/(uf*(1-dp));#gross illumination required\n", + "n=12*3;#total no. of \n", + "twr=glr/ef;#total wattage required\n", + "wec=twr/n;#wattage of each lamp\n", + "\n", + "#Results\n", + "print \"number of lamps of 150watt rating in 2 rows are %.f\"%n\n", + "print \"wattage of each lamp \",round(wec,1),\" watts equivalent to 500 watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of lamps of 150watt rating in 2 rows are 36\n", + "wattage of each lamp 488.3 watts equivalent to 500 watts\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.28, Page 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "h=5;# in meters\n", + "el=120;#in lux\n", + "ef=40;#efficiency in lumens/watt\n", + "tw=80;#in watts\n", + "df=1.4;#depreciation factor\n", + "uf=0.5;#utiliazation factor\n", + "l=30;# in meters\n", + "b=15;# in meters\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "glr=(a*el*df)/(uf);#gross lumens required\n", + "twr=glr/ef;#total wattage required\n", + "nt=twr/tw;#no. of tubes required\n", + "\n", + "#Results\n", + "print \"total wattage required is %.f watts\"%twr\n", + "print \" number of tubes required is \",nt,\" equivalent to 48 tubes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total wattage required is 3780 watts\n", + " number of tubes required is 47.25 equivalent to 48 tubes\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.29, Page 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "el=50;#in lux\n", + "df=1.3;#depreciation factor\n", + "uf=0.5;#utiliazation factor\n", + "l=30;# in meters\n", + "b=12;# in meters\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "glr=(a*el*df)/(uf);#gross lumens required\n", + "watt=[100,200,300,500,1000];\n", + "lum=[1615,3650,4700,9950,21500];#\n", + "for i in range(0,5):\n", + " n=glr/(lum[i]);#\n", + " print \"if \",(watt[i]),\" watt lamps are used then number of lamps required is %.f\"%n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "if 100 watt lamps are used then number of lamps required is 29\n", + "if 200 watt lamps are used then number of lamps required is 13\n", + "if 300 watt lamps are used then number of lamps required is 10\n", + "if 500 watt lamps are used then number of lamps required is 5\n", + "if 1000 watt lamps are used then number of lamps required is 2\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.30, Page 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ef=17.4;#in mumens/watt\n", + "dp=1.2;#depreciation factor\n", + "wlf=1.3;#waste light factor\n", + "uf=0.4;#utiliazation factor\n", + "l=50;# in meters\n", + "b=16;# in meters\n", + "n=16;# no. of lamps\n", + "lw=1000;# mscp in watts\n", + "\n", + "#Calculations\n", + "a=l*b;#arean in m^2\n", + "tl=n*lw*ef;#/total lumens\n", + "lwp=((tl*uf)/(wlf*dp));#lumens reaching on the working plane\n", + "e=lwp/a;#illumination on the surface in lumens/m^2\n", + "\n", + "#Result\n", + "print \"illumination on the surface is %.2f lumens/m^2\"%e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "illumination on the surface is 89.23 lumens/m^2\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.31, Page 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "watt=[300,500,1000,1500];\n", + "lum=[5000,9000,18000,27000];#\n", + "el=50;# in lux\n", + "dp=0.8;#depreciation factor\n", + "wlf=0.5;#waste light factor\n", + "uf=1.2;#utiliazation factor\n", + "l=60;# in meters\n", + "b=15;# in meters\n", + "lw=1000;# mscp in watts\n", + "\n", + "#Calculations\n", + "a=l*b;#area in m^2\n", + "tl=a*el#total lumens\n", + "lwp=((tl*uf)/(wlf*dp));#lumens reaching on the working plane\n", + "n = lwp/lum[1];#number of projector required\n", + "ang=2*math.degrees(math.atan(4.5/8));#size\n", + "\n", + "#Results\n", + "print \"number of projectors are,= %.f\"%(n+1)\n", + "print \"wattage is,(W)= %.d\"%watt[1]\n", + "print \"beam angle is %.f (degree)\"%(ang+1)\n", + "print (round(n)+1), \" projectors of \",(watt[1]),\" watts each with beam angle of \",(round(ang+1)),\" degree will be required\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of projectors are,= 16\n", + "wattage is,(W)= 500\n", + "beam angle is 60 (degree)\n", + "16.0 projectors of 500 watts each with beam angle of 60.0 degree will be required\n" + ] + } + ], + "prompt_number": 106 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch5_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch5_1.ipynb new file mode 100755 index 00000000..1196ae95 --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch5_1.ipynb @@ -0,0 +1,111 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5c3fe95123ad1823bf27f0dcc3936ac12b44099c39a2cdfe385de3987b8c8cbd" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Refrigeration and Air-Conditioning" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=20;# in degree C\n", + "t2=5;# in degree C\n", + "T=t1-t2;\n", + "A=3000;# volume of air to be conditioned in m^3\n", + "Ht=1220;# in J\n", + "\n", + "#Calculations\n", + "H1=A*Ht*T;\n", + "m=1000; # per m^3\n", + "Hl=2450*10**3;# latent heat in J/kg\n", + "w=5;# in kg\n", + "M=(w*A)/m;\n", + "H2=T*Hl;#in J\n", + "H=(H1+H2);\n", + "P=round(H/(3600*1000));\n", + "\n", + "#Result\n", + "print \"Power required,(kW) = %.f\"%P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required,(kW) = 25\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=25;# in degree C\n", + "t2=5;# in degree C\n", + "\n", + "#Calculations\n", + "T=t1-t2;\n", + "A=6*5*4*(60./15);# volume of air to be conditioned in m^3/hour\n", + "Ht=1220;# in J\n", + "H1=A*Ht*T;\n", + "m=1000; # per m^3\n", + "Hl=836*10**3;# heat loss in J/C/h\n", + "H2=T*Hl;#in J/hour\n", + "H=(H1+H2);\n", + "Rh=round(H/(3600*1000));\n", + "\n", + "#Result\n", + "print \"Rating of heater,(kW) %.f \"%Rh" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rating of heater,(kW) 8 \n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch7_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch7_1.ipynb new file mode 100755 index 00000000..d5c4d90b --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch7_1.ipynb @@ -0,0 +1,1403 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4999fef3bed25f8ede5cfda70d5b7f2cb9ba609812140a40f5c014743f2eb50b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Train Movement and Energy Consumption" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Variable declaration\n", + "a=5.;#aceleration in kmphps\n", + "t1=30.;#in seconds\n", + "vm=a*t1;#maximum speed in kmph\n", + "tfr=10.;#time for free running in mins\n", + "b=5.;#retardation in kmphps\n", + "\n", + "#Calculations&Results\n", + "ts=vm/b;#time for retardation in seconds\n", + "dta=((vm*t1)/(2*3600));#distance travelled during acceleration period\n", + "dtfr=((vm*tfr*60)/(3600));#distance travelled during retardation period\n", + "dtbp=dta;#distance travelled during breaking period\n", + "td=dta+dtfr+dtbp;#total distance between stations\n", + "print \"\\npart (a) \"\n", + "print \"total distance between station is %.1f km\"%td\n", + "T=[0,t1,(t1+(tfr*60)),(t1+(t1+(tfr*60)))];#\n", + "V=[0,vm,vm,0];#\n", + "plt.plot(T,V)\n", + "plt.xlabel(\"Time in seconds \")\n", + "plt.ylabel(\"Spped in Km per Hour\")\n", + "va=(td*3600)/(t1+(tfr*60)+ts);#average speed in kmph\n", + "print \"part (b) \"\n", + "print \"average speed is %.2f kmph\"%va\n", + "tst=5;#stop time in mins\n", + "vs=(td*3600)/(t1+(tfr*60)+ts+(tst*60));#sheduled speed in kmph\n", + "print \"part (c) \"\n", + "print \"sheduled speed is %.2f kmph\"%vs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "part (a) \n", + "total distance between station is 26.2 km\n", + "part (b) " + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "average speed is 143.18 kmph\n", + "part (c) \n", + "sheduled speed is 98.44 kmph\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAE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bwW+AditvY1tH4cPReoEyudfoPWmjjtBoH3Ztt1YgmEW4gVAo4b5f0HZde9nVjGpfmeU4CbiXV4\nLiFm0QIcQyx1sTo771ziBkwXZfHeln02iErhiuwz3Al8pO26Z2cx3UKsGdX051kcq4EbR4lXkirt\nHFpf4jV2TRTfIW529SxgO60lCq4ATiMWP7yZ1r0TTgc+P8Y13pNt3wD8fbb9cuLOYSO9h1gaAeJH\n2DxiDaobifWnINbe+e9ZDPcQCYvsvdOzz/S57NjTgF8BexGJYj2xRMNeRBI8hEhOv8o+y0zgu8An\ns7//SfY6wPxR4pVyselJVdMgfnU/Tqw5NA34ZvbaHcSijcuImxpdnx2fTqzRNZ4rsufbsvOM9CPi\ndrgzidV31xBJ7EgiMUEsxHYzkQR+TVQZAA9lzy+i9UX/CyIJLMs+17doLf2+Nothf6La+Y/s+Fdp\nLWz3PaK6uqQtdmnCTBSqop3Z8zAw1HZ8mPj//ABxU6MXMjE7sufHGf2/nZuIezC8EvgC0X+ymag+\n3jDivc/scJ2xVvLc0bbdjGHkfQTa//a/Ekt9v4JISM8FNnW4rjQq+yhUNXmWS/4F8Uu8efvHmcSv\n/smer+kPiHsBfC57PJu4d/eLgKXZe+YChxOrdh4EHJ0d34eobG4C/nN2bFl2znVjxNEg+iVOIFYK\nnUn0SzSTx1Lgh0QT2u+I+w5IE2ZFoZQ12p5H24bdf3E3iCrjz4gmngXEfwefIJpzxrpGnuM1Ynnz\nIaKJ6E3E0s9nEUvQ75W974PAXUTfyKeI/ovtxD3KPwNcQPQvPEbcX2BolM/V9ADRL/N9YAvRkd70\nUSIpDRDNbD8Z47NIkiRJkiRJkiRJkiRJkiRJkiRJkiRpPP8fI5QwgwWUpggAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Variable declaration\n", + "a=1.7;#aceleration in kmphps\n", + "b=3.3;#kmphps\n", + "s=1400;#m\n", + "va=42;#kmph\n", + "\n", + "#Calculations&Results\n", + "tr=((s*10**-3)/va)*3600;#secomds\n", + "k=((1./(2*a)))+((1./(2*b)));#\n", + "vm=((tr/(2*k))-math.sqrt(((tr**2)/(4*k**2))-((3600*s*10**-3)/k)));#in kmph\n", + "t1=vm/a;#seconds\n", + "t3=vm/b;#seconds\n", + "t2=tr-(t1+t3);#seconds\n", + "T=[0,(t1),(t1+t2),(t1+t2+t3)];\n", + "V=[0,vm,vm,0];\n", + "plt.plot(T,V);\n", + "plt.xlabel(\"Time in seconds \")\n", + "plt.ylabel(\"Spped in Km per Hour\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 5, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVPWd9/F30w2IoCCIgCJpRFCWAN1R40asIHGJYlCj\nRqOCZp7H8zw5SZ5JxoiZmSM5mWdcnsTkiCdORk03IqIobriBWyniEkX2XRBFtBFBFFFZmnr++N6y\niqa6+lZ33frde+vzOqdOV92uvvVBu+tb97eCiIiIiIiIiIiIiIiIiIiIiIiIiIhIKHQDHgJWAMuB\n7wLdgWeB1cAc7zkiIhJzU4CrvftVQFfgFuC33rHrgJsc5BIRkRLqCqzLcXwl0Mu739t7LCIiMTYS\neAOoA94G7gQ6A59mPaeiyWMREXGgXcDnrwJqgb96X3cAE5s8J+XdRETEoaqAz/+Bd3vTe/wQcD3Q\ngDUVNQB9gI+b/uCAAQNSa9euDTieiEjsrAWObs0PBn2F0ABsAAZ5j8cAy4BZwHjv2Hjg0aY/uHbt\nWlKpV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N5P4bmYttZXguUI/1b3yKXU1c1uS5387zOs2tPLkz6346Q9N1\n7LN/9n8BJwDnYIXnO9jmOyIFUR+CRJWfZXxXYZ+s09sGtsc+xbf2fGn9sF3a7vJuNcDr2Kf+Ad5z\nOgMDsVUm+2B7H4A1BVViRSW99v4g75wrm8mRwvoNTsNWsmyP9Ruki8QA4B9Y09dmbN17kYLpCkGi\nIJX1Ndd92P8TdAq7avgx1jTTFft9/zPWDNPca/g5nsC2HN2NNe1cCXyCtf9Px9r+wXbgWoP1XUzG\n+he+xPbc/itwB9b+vwcY752vuR3HGrB+k9ewrTYXZH3vFqz4VGDNY023UhQRERERERERERERERER\nEREREREREREREREREREpvv8P91YvOutrVZEAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a=2.4;#aceleration in kmphps\n", + "b=3.2;#retardation in kmphps\n", + "s=1.5;#in km\n", + "vs=45;#shedule speed in kmph\n", + "\n", + "#Calculations\n", + "ts=(s*3600)/vs;#shedule time in seconds\n", + "tst=20;#stop time\n", + "tr=ts-tst;#actual time for run in seconds\n", + "k=((1/(2*a))+(1/(2*b)));#constant\n", + "vm=((tr/(2*k))-math.sqrt(((tr**2)/(4*k**2))-((3600*s)/k)));#in kmph\n", + "\n", + "#Result\n", + "print \"maximum speed is %.f kmph\"%vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum speed is 74 kmph\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4, Page 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "s=1.5;#in Km\n", + "a=0.8;#aceleration in kmphps\n", + "tsr=26;#time for stop in seconds\n", + "rm=1.3;#ratio\n", + "b=3.2;#retardation in kmphps\n", + "\n", + "#Calculations\n", + "k=((1/(2*a))+(1/(2*b)));#constant\n", + "T=1;#assume\n", + "va1=(3600*s)/T;#average spped\n", + "vm1=(va1*rm);#maximum speed\n", + "vm=math.sqrt((vm1-va1)/k);#maximum speed in kmph\n", + "va=vm/1.3;#actua speed in kmpj\n", + "ta=(3600*s)/va;#actual time in seconds\n", + "ts=ta+tsr;#shedule time\n", + "vs=(s*3600)/ts;#shedule speed in kmph\n", + "\n", + "#Result\n", + "print \"schedule speed is %.f kmph\"%vs" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "schedule speed is 30 kmph\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5, Page 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "S=1.;# in km\n", + "Vs=30.;# in km/h\n", + "Ts=(S*3600)/Vs; # in sec\n", + "D=20;# duration of stop in sec\n", + "\n", + "#Calculations\n", + "T=Ts-D;# in sec\n", + "Va=(S*3600)/T;# Average speed in km/h\n", + "Vm=1.25*Va;# Maximum speed in km/h\n", + "beta1=3;# braking retardation in km/h/sec\n", + "A=((Vm*T)-(S*3600))/Vm**2;\n", + "B=1./(2*beta1);\n", + "alfa=1./(2*(A-B));\n", + "\n", + "#Result\n", + "print \"The Acceleration,alfa is (km/h/sec) = %.1f \"%alfa" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Acceleration,alfa is (km/h/sec) = 1.8 \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6, Page 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "S=4;# in km\n", + "Vs=45;# in km/h\n", + "Ts=(S*3600)/Vs; # in sec\n", + "D=30;# duration of stop in sec\n", + "\n", + "#Calculations\n", + "T=Ts-D;# in sec\n", + "Vm=70.;# Maximum speed in km/h\n", + "alfa=1.5;# in km/h/sec\n", + "A=((Vm*T)-(S*3600))/Vm**2;\n", + "B=1./(2*alfa);\n", + "Beta=1./(2*(A-B));\n", + "\n", + "#Result\n", + "print \"Retardation(km/h/sec) = %.3f\"%Beta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Retardation(km/h/sec) = 0.574\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7, Page 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "S=1.6;# in km\n", + "Va=40;# in km/h\n", + "V1=64;# in km/h\n", + "alfa=2.0;#in km/p/sec\n", + "Beta_c=0.16;# in km/h/sec\n", + "Beta=3.2;# in km/h/sec\n", + "\n", + "#Calculations&Results\n", + "t1=V1/alfa;# in sec\n", + "print \"Duration of Acceleration,t1(sec) = %.f\"%t1\n", + "T=(S*3600)/Va;# in sec\n", + "# Formula: T=(V1/alfa)+((V1-V2)/Beta_c)+(V2/Beta)\n", + "V2=(t1+(V1/Beta_c)-T)/((1/Beta_c)-(1/Beta));\n", + "t2=(V1-V2)/Beta_c;\n", + "print \"Duration of coasting,t2(sec) = %.2f\"%t2\n", + "t3=V2/Beta;\n", + "print \"Duration of braking,t3(sec) = %.2f\"%t3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duration of Acceleration,t1(sec) = 32\n", + "Duration of coasting,t2(sec) = 96.84\n", + "Duration of braking,t3(sec) = 15.16\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8, Page 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=200;# weight of train in tonnes\n", + "D=0.9;# diameter in m\n", + "G=(1./200)*100;#percentage gradient\n", + "r=50;# in N/tonne\n", + "gama=4;# gear ratio\n", + "eta=0.80;# gearing efficiency\n", + "We=1.10*W;# in tonne\n", + "Vm=48.;# maximum speed in km/h\n", + "t1=30;# in sec\n", + "\n", + "#Calculations\n", + "alfa=Vm/t1;# in km/h/sec\n", + "Ft=(277.8*We*alfa)+(98.1*W*G)+(W*r);# tractive effect required in N\n", + "T1=(Ft*D)/(eta*2*gama);# in N-m\n", + "T=round(T1/8);\n", + "\n", + "#Result\n", + "print\"Torque developed by each motor,T(N-m) = %.f\"%T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque developed by each motor,T(N-m) = 2067\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9, Page 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=3000.;# line voltage in volts\n", + "W=200.;# weight of train in tonnes\n", + "D=0.9;# diameter in m\n", + "G=(30./1000)*100;#percentage gradient\n", + "r=50;# in N/tonne\n", + "gama=4.;# gear ratio\n", + "Vm=50.;#in km/h\n", + "eta=0.9;# gearing efficiency\n", + "\n", + "#Calculations&Results\n", + "We=1.10*W;# in tonne\n", + "T=4*6000;# in N-m\n", + "eta_m=85./100;# efficiency of motor\n", + "Ft=(eta*T*2*gama)/D;\n", + "A=(98.1*W*G)+(W*r);\n", + "B=Ft-A;\n", + "alfa=B/(277.8*We);# tractive effect required in N\n", + "t=Vm/alfa;\n", + "print \"Time taken ,t(sec) = %.2f\"%t\n", + "Po=(Ft*Vm)/3600;# in kw\n", + "Pi=Po/eta_m;\n", + "It=(Pi*1000)/V;# in A\n", + "I=It/4\n", + "print \"Current drawn per motor,I(A) = %.1f\"%I" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken ,t(sec) = 24.82\n", + "Current drawn per motor,I(A) = 261.4\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10, Page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "V=36;# speed in km/h\n", + "W=120;# in tonne\n", + "G=2;# in per cent\n", + "\n", + "#Calculations\n", + "r=2*9.81;# in N/tonne\n", + "Ft=(98.1*W*G)+(W*r);\n", + "e=88./100; # efficiency of motors and gear\n", + "VL=1500;#line voltage in volts\n", + "Po=(Ft*V)/3600;\n", + "Pi=Po/e;\n", + "I=(Pi*1000)/VL;\n", + "bc=((98.1*(2+(0.1*2)))/(277.8*1.1));#in kmphps\n", + "tt=V/bc;#in seconds\n", + "\n", + "#Results\n", + "print \"current required in amperes is %.1f\"%I\n", + "print \"time taken to come to rest in seconds is %.f\"%tt" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current required in amperes is 196.2\n", + "time taken to come to rest in seconds is 51\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11, Page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=24;#in sec\n", + "t2=69;# in sec\n", + "t3=11;# in sec\n", + "V1=48.;# in km/h\n", + "\n", + "#Calculations&Results\n", + "alfa=V1/t1;\n", + "print \"part (a)\"\n", + "print \"Acceleration(km/h/sec) = %.f\"%alfa\n", + "r=58;# in N/tonne\n", + "G=0;\n", + "Beta=r/(277.8*1.1);\n", + "print \"part (b)\"\n", + "print \"Retardation(kmphps) = %.2f\"%Beta\n", + "V2=V1-(Beta*t2);\n", + "S=round(((V1*t1)/7200)+(((V1+V2)*t2)/7200)+((V2*t3)/7200));\n", + "D=20;# duration of stop in sec\n", + "Ts=t1+t2+t3+D;\n", + "Vs=round((S*3600)/Ts);\n", + "print \"part (c)\"\n", + "print \"Schedule time,Vs(kmph) = %.f\"%Vs\n", + "D1=15;#when the duration of stop in sec\n", + "Ts_dash=t1+t2+t3+D1;\n", + "Vs_dash=(S*3600)/Ts_dash;\n", + "print \"Schedule speed,VS_dash(kmph) = %.2f\"%Vs_dash" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Acceleration(km/h/sec) = 2\n", + "part (b)\n", + "Retardation(kmphps) = 0.19\n", + "part (c)\n", + "Schedule time,Vs(kmph) = 29\n", + "Schedule speed,VS_dash(kmph) = 30.25\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12, Page 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=30.;#in sec\n", + "t2=50.;# in sec\n", + "t3=20.;# in sec\n", + "alpha=2.;#kmphps\n", + "\n", + "#Calculations\n", + "V1=alpha*(t1);# in km/h\n", + "r=40;# in N/tonne\n", + "G=1;\n", + "bc=((98.1+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t2);#km/hr\n", + "S=(((V1*t1)/7200)+(((V1+V2)*t2)/7200)+((V2*t3)/7200));\n", + "D=30;# duration of stop in sec\n", + "Ts=t1+t2+t3+D;\n", + "Vs=((S*3600)/Ts);\n", + "\n", + "#Result\n", + "print \"Schedule time,Vs(kmph) = %.2f\"%Vs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Schedule time,Vs(kmph) = 28.53\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13, Page 212" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "w=250.;#in tonnes\n", + "we=(1+(10./100))*w;#efective weight in tonnes\n", + "r=5*9.81;#in N/tonne\n", + "G=1.;#\n", + "t1=30.;#in sec\n", + "t2=70.;# in sec\n", + "alpha=2.;#kmphps\n", + "\n", + "#Calculations\n", + "V1=alpha*(t1);# in km/h\n", + "ft=(277.8*we*alpha)+(98.1*G*w)+(w*r);#in newtons\n", + "po=((ft*V1)/3600);#maximum power output in kW\n", + "n=0.97;#efficiency\n", + "pi=po/n;#in kW\n", + "bc=((98.1+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t2);#km/hr\n", + "beta1=3;#retardation\n", + "t3=V2/beta1;#in seconds\n", + "S=(((V1*t1)/7200)+(((V1+V2)*t2)/7200)+((V2*t3)/7200));\n", + "\n", + "#Results\n", + "print \"maximum power developed by traction motor is %.f (kW)\"%pi\n", + "print \"total distance travelled by train in km is %.2f\"%S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum power developed by traction motor is 3257 (kW)\n", + "total distance travelled by train in km is 1.12\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14, Page 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vm=52.; #max speed in kmph\n", + "t3=15.8;#duration of braking in sec\n", + "\n", + "#Calculations\n", + "D=(1./2)*Vm*(t3/3600);\n", + "S=1400;#in m\n", + "S1=(S*10**-3)-D;\n", + "r=50;#in N/tonne\n", + "WeBY_W=1.1;\n", + "Ec=((0.01072*Vm**2*WeBY_W)/(S*10**-3))+(0.2778*r*(S1/(S*10**-3)));\n", + "\n", + "#Result\n", + "print \"energy consumption in Wh is %.3f\"%Ec" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "energy consumption in Wh is 35.533\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.15, Page 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "w=1;#in tonnes\n", + "we=(1+(10./100))*w;#efective weight in tonnes\n", + "S=1525;#in meters\n", + "r=52.6/1000;#in N/kg\n", + "alpha=0.366;#m/s^2\n", + "V1=12.2;# in m/s\n", + "\n", + "#Calculations\n", + "t1=V1/alpha;#in seconds\n", + "ft=we*alpha+r;#in newtons\n", + "ter=((1./2)*ft*V1*t1)/3600;#in watt-hours\n", + "seo=ter/(w*S);# in Wh/kg-m\n", + "n=0.65;#efficiency\n", + "sec1=seo/n#in Wh/kg-m\n", + "\n", + "#Result\n", + "print \"specific energy onsumption is %.2e Wh/kg-m\"%sec1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "specific energy onsumption is 2.59e-05 Wh/kg-m\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16, Page 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=30.;#in sec\n", + "t2=50.;# in sec\n", + "t3=20.;# in sec\n", + "alpha=2;#kmphps\n", + "V1=alpha*(t1);# in km/h\n", + "r=40;# in N/tonne\n", + "G=1;\n", + "\n", + "#Calculations&Results\n", + "bc=((98.1+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t2);#km/hr\n", + "S=(((V1*t1)/7200)+(((V1+V2)*t2)/7200)+((V2*t3)/7200));\n", + "D=15;# duration of stop in sec\n", + "Ts=t1+t2+t3+D;\n", + "Vs=((S*3600)/Ts);\n", + "print \"Schedule speed,Vs(kmph) = %.2f\"%Vs\n", + "S1=(V1*t1)/7200;#in meters\n", + "r=50.;#in N/tonne\n", + "WeBY_W=1.1;\n", + "Ec=((0.01072*V1**2*WeBY_W)/(S))+(0.2778*(98.1*G+r)*((S1)/(S)));\n", + "N=0.75;#\n", + "Sec=Ec/0.75;#\n", + "print \"Specific energy consumption in Wh/tonne-km is %.2f\"%Sec\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Schedule speed,Vs(kmph) = 32.25\n", + "Specific energy consumption in Wh/tonne-km is 68.25\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.17, Page 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=30.;#in sec\n", + "t2=50.;# in sec\n", + "t3=20.;# in sec\n", + "alpha=2;#kmphps\n", + "V1=alpha*(t1);# in km/h\n", + "r=40;# in N/tonne\n", + "G=-1;\n", + "\n", + "#Calculations&Results\n", + "bc=((-98.1+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t2);#km/hr\n", + "S=(((V1*t1)/7200)+(((V1+V2)*t2)/7200)+((V2*t3)/7200));\n", + "D=15;# duration of stop in sec\n", + "Ts=t1+t2+t3+D;\n", + "Vs=((S*3600)/Ts);\n", + "print \"Schedule speed,Vs(kmph) = %.f\"%Vs\n", + "S1=(V1*t1)/7200;#in meters\n", + "r=50;#in N/tonne\n", + "WeBY_W=1.1;\n", + "Ec=((0.01072*V1**2*WeBY_W)/(S))+(0.2778*(98.1*G+r)*((S1)/(S)));\n", + "N=0.75;#\n", + "Sec=Ec/0.75;#\n", + "print \"Specific energy consumption in Wh/tonne-km is %.2f\"%Sec\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Schedule speed,Vs(kmph) = 42\n", + "Specific energy consumption in Wh/tonne-km is 38.85\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18, Page 219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "W=100.;#in tonne\n", + "We=1.1*W;# in tonne\n", + "S=2.5;# distance in km\n", + "Va=50.;#Average speed in kmph\n", + "Dr=(3600*S)/Va;\n", + "alfa=1.;# in km/h/sec\n", + "Beta=2.;# in km/h/sec\n", + "T=180.;\n", + "r=40.;#in N/tonne\n", + "G=1;\n", + "\n", + "#Calculations&results\n", + "K=(1./(2*alfa))+(1/(2*Beta));\n", + "Vm=round((T/(2*K))-math.sqrt((T/(2*K))**2-((3600*S)/K)));# maximum speed\n", + "t1=Vm/alfa;# acceleration period\n", + "t3=Vm/Beta;# braking period\n", + "t2=T-(t1+t3);# in sec\n", + "Ft=(277.8*We*alfa)+(98.1*W*G)+(W*r);\n", + "P_max=round((Ft*Vm)/3600);\n", + "print \"part (a)\"\n", + "print \"Maximum power,(kWh) = %.f\"%P_max\n", + "e=60./100;# efficiency\n", + "Ft=(277.8*We*alfa)+(98.1*W*G)+(W*r);\n", + "Ft_dash=(98.1*W*G)+(W*r);\n", + "P_max=round((Ft*Vm)/3600);\n", + "Et=((1./2)*Ft)*(Vm/3600)*(t1/3600)+((Ft_dash*Vm)/3600)*(t2/3600);\n", + "Ec=Et/e;\n", + "print \"part (b) \"\n", + "print \"Total Energy Consumption,Ec(kWh) = %.2f\"%Ec\n", + "Sec=(Ec*1000)/(W*S);\n", + "print \"part (c) \"\n", + "print \"Specific Energy Consumption,(Wh/tonne-km) = %.1f\"%Sec" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Maximum power,(kWh) = 875\n", + "part (b) \n", + "Total Energy Consumption,Ec(kWh) = 23.65\n", + "part (c) \n", + "Specific Energy Consumption,(Wh/tonne-km) = 94.6\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19, Page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=203;#in tonne\n", + "We=1.1*W;# in tonne\n", + "r=44;# N/tonne\n", + "G=(1./500)*100;# gradient\n", + "Vm=45.;# maximum speed in kmph\n", + "t1=30.;# in sec\n", + "\n", + "#Calculations&Results\n", + "alfa=Vm/t1;# in kmph\n", + "Ft=(277.8*We*alfa)+(98.1*W*G)+(W*r);# in N\n", + "Po=(Ft*Vm)/3600;\n", + "print \"part (a)\"\n", + "print \"The maximum power output,(kW) = %.2f\"%Po\n", + "e=60./100;# efficiency\n", + "Et=(1./2)*((Ft*Vm)/3600)*(t1/3600);\n", + "E=(Et/e);\n", + "print \" part (b) \"\n", + "print \"The energy taken(kWh) = %.1f\"%E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "The maximum power output,(kW) = 1324.55\n", + " part (b) \n", + "The energy taken(kWh) = 9.2\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.20, Page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "W=16.;#in tonne\n", + "We=1.1*W;# in tonne\n", + "Vs=45.;#in kmph\n", + "r=40.;# in N/tonne\n", + "S=2.8;# in km\n", + "Ts=(S*3600)/Vs;\n", + "Td=30.;# in sec\n", + "\n", + "#Calculations&Results\n", + "T=Ts-Td;\n", + "alfa=2.;#in kmphps\n", + "Beta=3.2;# in kmphps\n", + "K=(1./(2*alfa))+(1/(2*Beta));\n", + "Vm=round((T/(2*K))-math.sqrt((T/(2*K))**2-((3600*S)/K)));# maximum speed\n", + "t1=Vm/alfa;# acceleration time\n", + "t3=Vm/Beta;# duration of braking\n", + "t2=T-(t1+t3);# time f free run in sec\n", + "Ft=(277.8*We*alfa)+(W*r);\n", + "P_max=(Ft*Vm)/3600;\n", + "print \"part (a)\"\n", + "print \"Maximum power output,(kW) = %.3f\"%P_max\n", + "# answer is wrong in book\n", + "Va=50;#Average speed in kmph\n", + "Dr=(3600*S)/Va;\n", + "T=180;\n", + "G=1;\n", + "e=80./100;#efficiency\n", + "Dt=(1./2)*((Vm*t3)/3600);# distance travelled during braking period in km\n", + "S1=S-Dt;# distance travelled with power in km\n", + "So=(((0.01072*Vm**2)/S)*(We/W))+((0.2778*r*S1)/S);\n", + "Sec=So/e;\n", + "print \"part (b)\"\n", + "print \"Specific energy consumption,(Wh/tonne-km) = %.1f\"%Sec\n", + "# answer is wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Maximum power output,(kW) = 170.749\n", + "part (b)\n", + "Specific energy consumption,(Wh/tonne-km) = 31.5\n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21, Page 221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t1=30.;#in sec\n", + "t2=40.;# in sec\n", + "t3=30.;# in sec\n", + "alpha=2;#kmphps\n", + "V1=alpha*(t1);# in km/h\n", + "r=40;# in N/tonne\n", + "G=1;\n", + "\n", + "#Calculations&Results\n", + "bc=((98.1+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t3);#km/hr\n", + "Beta=2.5;#retardation\n", + "t4=V2/Beta;#in seconds\n", + "S=(((V1*t1)/7200)+((V1*t2)/3600)+(((V1+V2)*t3)/7200)+((V2*t4)/7200));\n", + "D=15;# duration of stop in sec\n", + "Ts=t1+t2+t3+t4+D;\n", + "Vs=((S*3600)/Ts);\n", + "print \"part (a)\"\n", + "print \"Schedule time,Vs(kmph) = %.2f\"%Vs\n", + "print \"part (b)\"\n", + "S1=((V1*t1)/7200)+((V1*t2)/3600);#in km\n", + "WeBY_W=1.1;\n", + "G=1;#\n", + "Ec=((0.01072*V1**2*WeBY_W)/(S))+(0.2778*(98.1*G+r)*((S1)/(S)));\n", + "N=0.75;#\n", + "Sec=Ec/0.75;#\n", + "print \"Specific energy consumption in Wh/tonne-km is %.2f\"%Sec\n", + "print \"part (c)\"\n", + "W=200;#\n", + "tec=(Sec*W*S);#\n", + "print \"total energy consumption is %.1f kWh\"%(tec*10**-3)\n", + "print \"part (d)\"\n", + "print \"total distance travelled in Km is %.2f\"%S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Schedule time,Vs(kmph) = 39.89\n", + "part (b)\n", + "Specific energy consumption in Wh/tonne-km is 69.93\n", + "part (c)\n", + "total energy consumption is 20.7 kWh\n", + "part (d)\n", + "total distance travelled in Km is 1.48\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22, Page 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=500.;#\n", + "t1=60.;#in sec\n", + "t2=5*60.;# in sec\n", + "t3=3*60.;# in sec\n", + "alpha=2.5;#kmphps\n", + "V1=alpha*(t1);# in km/h\n", + "r=25.;# in N/tonne\n", + "G=1.;\n", + "\n", + "#Calculations\n", + "bc=(((98.1*(8./1000)*100)+r))/(277.8*1.1);#in kmphps\n", + "V2=V1-(bc*t3);#km/hr\n", + "Beta=3.;#retardation\n", + "t4=V2/Beta;#in seconds\n", + "S=(((V1*t1)/7200)+((V1*t2)/3600)+(((V1+V2)*t3)/7200)+((V2*t4)/7200));\n", + "D=15.;# duration of stop in sec\n", + "Ts=t1+t2+t3+t4+D;\n", + "Vs=((S*3600)/Ts);\n", + "S1=((V1*t1)/7200)+((V1*t2)/3600);#in km\n", + "WeBY_W=1.1;\n", + "Ec=((0.01072*V1**2*WeBY_W)/(S))+(0.2778*((98.1*(8/1000)*100)+r)*((S1)/(S)));\n", + "N=0.80;#\n", + "Sec=Ec/N;#\n", + "\n", + "#Result\n", + "print \"Specific energy consumption in Wh/tonne-km is %f\"%Sec\n", + "#incorrect answer in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific energy consumption in Wh/tonne-km is 22.446222\n" + ] + } + ], + "prompt_number": 88 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23, Page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Wl=1;#\n", + "W1=400;#\n", + "G=2;#in percentage\n", + "mu=0.2;#\n", + "alpha=1;#\n", + "r=40;#\n", + "\n", + "#Calculations\n", + "x=(277.8*1.1*alpha+98.1*G+r)/(9.81*1000);#\n", + "wlo=(x*W1)/(mu-x);#in tonnes\n", + "al=22;#allowable load in tonnes\n", + "na=wlo/al;#\n", + "\n", + "#Results\n", + "print \"weight of the locomotive in tonnes %.1f\"%wlo\n", + "print \"number of axles required = %.f\"%na" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "weight of the locomotive in tonnes 152.6\n", + "number of axles required = 7\n" + ] + } + ], + "prompt_number": 89 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.24, Page 224 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=12*30;#tonnes\n", + "we=1.04*360;#tonnes\n", + "r=5*9.81;#\n", + "G=1;#in percentage\n", + "mu=0.2;#\n", + "alpha=0.8;#\n", + "x=13.882;#\n", + "y=0.041;#\n", + "\n", + "#Calculations\n", + "wlo=(x)/(mu-y);#in tonnes\n", + "al=20.;#allowable load in tonnes\n", + "na=wlo/al;#\n", + "\n", + "#Results\n", + "print \"weight of the locomotive in tonnes = %.1f\"%wlo\n", + "print \"number of axles required = %.f\"%na" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "weight of the locomotive in tonnes = 87.3\n", + "number of axles required = 4\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.25, Page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "w1=100;#tonnes\n", + "w=w1+500;#tonnes\n", + "we=1.1*w;#effective weight\n", + "alpha=1;#\n", + "G=1;#\n", + "r=45;#\n", + "\n", + "#Calculations&Results\n", + "ft=((277.8*we*alpha)+(98.1*w*G)+(w*r));#in newtons\n", + "ad=0.7;#adehsive percent\n", + "mu=(ft)/(100*10**3*9.81*ad);#\n", + "w2=130;#tonnes\n", + "ad2=w2*G;#\n", + "tadw=w1*ad+ad2;#tonnes\n", + "tted=mu*tadw*9.81*1000;#newtones\n", + "W=tted/(277.8*1.1*alpha+98.1*alpha+r);#in tonnes\n", + "trlw=W-(ad2+w1);#\n", + "print \"part (a)\"\n", + "print \"trailig weight in tonnes is %.f\"%trlw\n", + "w2=w1+500+ad2;#\n", + "G1=((tted/w2)-(277.8*1.1+r))*(1/98.1);#\n", + "print \"part (b)\"\n", + "print \"maximum gradiant in percentage is %.3f\"%G1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "trailig weight in tonnes is 1484\n", + "part (b)\n", + "maximum gradiant in percentage is 7.167\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.26, Page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "w1=100;#tonnes\n", + "w=w1+500;#tonnes\n", + "we=1.1*w;#effective weight\n", + "alpha=1;#\n", + "G=1;#\n", + "r=45;#\n", + "\n", + "#Calculations\n", + "ft=((277.8*we*alpha)+(98.1*w*G)+(w*r));#in newtons\n", + "ad=0.7;#adehsive percent\n", + "mu=(ft)/(100*10**3*9.81*ad);#\n", + "w2=130;#tonnes\n", + "ad2=w2*G;#\n", + "tadw=w1*ad+ad2;#tonnes\n", + "tted=mu*tadw*9.81*1000;#newtones\n", + "W=tted/(277.8*1.1*alpha+98.1*alpha+r);#in tonnes\n", + "trlw=W-(ad2+w1);#\n", + "w2=w1+500+ad2;#\n", + "acc=((tted/w2)-(98.1+r))*(1/(277.8*1.1));#in kmphps\n", + "\n", + "#Result\n", + "print \"acceleration in kmphps is %.2f\"%acc\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "acceleration in kmphps is 2.98\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.27, Page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N=4;# number of motor\n", + "W=250;#in tonne\n", + "D=.95;# diameter in m\n", + "G=1;# percentage gradient\n", + "r=40;# in N/tonne\n", + "eta=95./100;# gear efficiency\n", + "gama=3;# gear ratio\n", + "We=1.1*W;\n", + "Vm=40;# kmph\n", + "t1=20;# in seconds\n", + "\n", + "#Calculations&Results\n", + "alfa=Vm/t1;\n", + "Ft=((277.8*We*alfa)+(98.1*W*G)+(W*r));\n", + "T=(Ft*D)/(eta*2*gama);\n", + "Td=round(T/N);\n", + "print \"Torque developed by each motor,Td(Nm) = %.f\"%Td\n", + "mu=0.25;# adhesive coefficient\n", + "WL=(Ft/(9.81*1000))/mu;\n", + "Dw=round(WL/.75);\n", + "print \"Dead weight of locomotive,(tonnes) = %.f\"%Dw" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque developed by each motor,Td(Nm) = 7805\n", + "Dead weight of locomotive,(tonnes) = 102\n" + ] + } + ], + "prompt_number": 94 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch8_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch8_1.ipynb new file mode 100755 index 00000000..a76cda88 --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch8_1.ipynb @@ -0,0 +1,537 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:885ead9482b851b5c86ff5d94634cc23f6d98ffd24283263729cfd9b231402c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Electric Traction Motors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Variable declaration\n", + "v=230;#in volts\n", + "rm=0.3;#in ohms\n", + "Ia=np.array([5,10,15,20,25,30,35,40]);#in amperes\n", + "T=[20,50,100,155,215,290,360,430];#\n", + "N = []\n", + "#Calculations&Results\n", + "for i in range(0,8):\n", + " eb= v-(Ia[i])*rm;#\n", + " N.append((9.55*eb*Ia[i])/(T[i]));#\n", + " print \"speed in rpm is for current \",(Ia[i]),\" amperes \",(round(N[i])),\" RPM\"\n", + " \n", + "plt.plot(Ia,N)\n", + "plt.xlabel(\"ARMATURE CURRENT ,Ia IN AMPS\")\n", + "plt.ylabel(\"SPEED ,N IN RPM\")\n", + "plt.title(\"Speed-Armature current characteristic\")\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed in rpm is for current 5 amperes 546.0 RPM\n", + "speed in rpm is for current 10 amperes 434.0 RPM\n", + "speed in rpm is for current 15 amperes 323.0 RPM\n", + "speed in rpm is for current 20 amperes 276.0 RPM\n", + "speed in rpm is for current 25 amperes 247.0 RPM\n", + "speed in rpm is for current 30 amperes 218.0 RPM\n", + "speed in rpm is for current 35 amperes 204.0 RPM\n", + "speed in rpm is for current 40 amperes 194.0 RPM\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 2, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEZCAYAAAB8culNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucE9X9//HXchdQ8Y4glxWKiDdQwHol3kCsipdy0bZK\nqdZfvUBVvICtrLeiWG+taPXrBURRFrwUrSCiRsVyEQUVkCroiquAgKBQlC67+f3xmTGzs0k2WZJM\nsnk/H488ksxMZj6Z3cxnzjkz54CIiIiIiIiIiIiIiIiIiIiIiIiIiIhI4MLA74IOQjKuDDgp6CDS\n5EHgT3X4XHtgM1CU3nBE0utY4N/AJmADMAfoGUAcbwDDalmmGKgCHsh8ODVUAfsHsN1ctCP74nPg\nxDTGUldhsncyUkZufOe80SDoAIRdgJeA+4DdgLbATcC2IINK4AJgCTAYaJJguUYZ2v6OnOkF9f/e\n0Pe+iPScsQZ91ruj3yOyg9tP5e8ZIfj9JZKSnsDGBPOHAu8Af8dKFh9T/QxoV+BR4GugHLiF6j+a\nYcAy4FtgJlacdp0CLHfW+3dqP5MrAlYA5wCfAOf65lcBlwKfAiuBPk5M1wDfODGeBZzmfH4DcL3n\n872Budj++NqJqbEz7y1n/Vuw6oBBzr55O0YM7hn1BKza4WXncycCbYBnnXg+A65I8H13Au7Czjo3\nOdtqBoSAL33LlhH9u5QA04BJwHfYPg0Dt2F/y61OjF2BV539sBwY6FnfBGA8duLwPTDP8738+8L7\nOa+Lsb/998BSoLsz/XPgauAD53s9AzR15rVytvkN9j/zInbC4goDt3q+Ryfgt57trAR+74tjALDY\n2RcrgH7OvtgO/OB8h785y9a2T7x/z5Ocabc48/d0Yt/ofP4t7H92ElDpxLsZGAl0xPah+1vZHXgc\n+Mr53s8jErCdgfXYP/mpWOnB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Y3+/c4CvPPOWYA3d\np1DzggQJgJKDgF2d8gTWOFsMtCf64/fagNVL/yXGOm7ExqV1R54qAnbBehd1uw8uxto0ElUthbED\nZWPn/VCsy2G/RLHEsxKri7/JM60jVj2yBSuJnOBM3x07GM7xLOseAO/HvtNRMeb9GSsdtY8xz8+d\nfhvRs+hUvEb1LrzB9vlG4Ecsef48hfVtx0YQu4rYJanzsCvTij2PU7Aurb2ux7qNjsW/L1pQvWG7\nB9YOJAFTchCwKoDnfdOedaa7A5u4XsAan3v75s2leh1zBDtIvoY1MrqmY/XNjT3Lef0Lqx56j2j1\nw3W+9caLxd/mEOtKn4uwbpZXYFccPU506MQLsIP7IifuEqpXTXm3fSs1Sw9gB+X7qF49421zmBDj\nM8uc71tblZpXA6z09K1vuZlYg/AyrMpqbpzPx/Mo1dsRXM2xZPkvz7StWPI8g+r/CzOBN+Os3/99\nirCS1nJs/4zBTghERKQODgL+GnQQIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIpn2/wHZncU8TQuF\nCgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "#Variable declaration\n", + "v=600;#in volts\n", + "rm=0.8;#in ohms\n", + "N1=600.;#\n", + "Ia=[20,40,60,80];#in amperes\n", + "EMF=[215,381,485,550]\n", + "T = []\n", + "N =[]\n", + "eb =[]\n", + "#Calculations&Results\n", + "for i in range(0,4):\n", + " eb.append(v-(Ia[i])*rm);#\n", + " N.append((N1/EMF[i])*eb[i]);#\n", + " T.append((9.55*eb[i]*Ia[i])/(N[i]));#\n", + " print \"for current \",(Ia[i]),\" amperes, speed is\",(round(N[i])),\" RPM and Torque in N-m is \",round((T[i]),1)\n", + "plt.plot(T,N)\n", + "plt.xlabel(\"TORQUE ,T IN Nm\")\n", + "plt.ylabel(\"SPEED ,N IN RPM\")\n", + "plt.title(\"Speed-torque curve\")\n", + "#answers differ due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for current 20 amperes, speed is 1630.0 RPM and Torque in N-m is 68.4\n", + "for current 40 amperes, speed is 894.0 RPM and Torque in N-m is 242.6\n", + "for current 60 amperes, speed is 683.0 RPM and Torque in N-m is 463.2\n", + "for current 80 amperes, speed is 585.0 RPM and Torque in N-m is 700.3\n" + ] + }, + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 3, + "text": [ + "" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEZCAYAAAC5AHPcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2c1XP+//HHVKKSSui6plKmkqKIJR0kLVa5lhXFknUR\ndr8lF6txsbS2r8vfF/v7VShqxa6wyEXbodUqVxFj0vTdyqQiIqKkmd8fr/dxPnPmzDRz5nzO53PO\nPO+327mdz9V8Pq8ZOq/zvgYRERERERERERERERERERERERERERHJsIZBByASAlHs38J7AcchklUa\nBB2A1GtHAYuBr4EvgX8BAwOIo9y9qlIGdMtQLCJZo1HQAUi9tRfwD2AcMBfYHRgMbA8yqGrkpfhz\njYCf0hlIhjTAEqeISOgMBDZXc34M8AZwP1ZC+Rg41nO+BTAd+AwoBW6lYon6QqAI+AqYD3T2nDse\nKHb3vR+rwrqoijhexz5IvwO+Bc50xy8GVmIlp2eAdp6fKQMuc+dXuWMTPLFeSMVSTeLzxwCLPPsF\nwCvuWcWeGJLZG3gYWIf97k9Xcc9YnLEYHgEeBJ53v+tEYD0V/6anAu+77QbAJKAE2AQ8AbSqJi4R\nkbRpjn3wPAIMp/KHzxhgB3AV1j5xFvaB39Kdfxr7wGsC7AssAS5x50ZgH94HYB90N2DJCGAfY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UB0ogkmsW\nYFOXj3b7DbEV2R7G2jy8VgP3An9w+1OxWWq9jejXAve5/SgVF+O5APhnLeObiVUd1dVtWGy7qsZa\ngSXGX9XgWpFaUQKRXOH9cDwVOBNrFF4BfI9NUR27znvtQ1ivpo5Y991rsV5RK9xrEvGus/8Xa095\nH6sCa4olndh9E9tAYr2nvPpScYGeXa0GV5UXiS8ClIz3nn/Efr+qrlNiERFJszuAudjCZemwF/BE\nmu4lIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIlIj/x90qdUelP+JNgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "N1=640;# in rpm\n", + "I1=15;# in A\n", + "\n", + "#Calculations\n", + "I2=math.sqrt((2)*math.sqrt(2)*I1**2);\n", + "N2=round((2*I1*N1)/I2);\n", + "\n", + "#Results\n", + "print \"Current drawn,I2(A) = %.3f\"%I2\n", + "print \"Motor speed,N2(rpm) = %.f\"%N2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current drawn,I2(A) = 25.227\n", + "Motor speed,N2(rpm) = 761\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n1=700;#rpm\n", + "n2=750;#rpm\n", + "rm=0.3;#in ohms\n", + "v=500;#in volts\n", + "ib=50;#amperes\n", + "\n", + "#Calculations\n", + "eb1=v-(ib*rm);#in volts\n", + "eb2=eb1;#\n", + "N=((v-(2*(ib*rm)))/((eb1/n1)+(eb2/n2)));#\n", + "pdv1=((eb1/n1)*N)+ib*rm;#in volts\n", + "pdv2=((eb1/n2)*N)+ib*rm;#in volts\n", + "\n", + "#Results\n", + "print \"speed in rpm is %.f\"%N\n", + "print \"PD across machine 1 in volts is %.f\"%pdv1\n", + "print \"PD across machine 2 in volts is %.f\"%pdv2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed in rpm is 351\n", + "PD across machine 1 in volts is 258\n", + "PD across machine 2 in volts is 242\n" + ] + } + ], + "prompt_number": 92 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V=500;# in volts\n", + "Vm=40;# in kmph\n", + "Ft=1800;# in N\n", + "Rm=0.4;# in ohm\n", + "Lm=3200;# losses per motor in watt\n", + "\n", + "#Calculations&Results\n", + "Mo=(Ft*Vm*1000)/3600;\n", + "Cl=3200;# consatant losses in watt\n", + "# formuls: Mi=Po+Cl+C_losses\n", + "#C_losses=I^2*Rm\n", + "#Mi=V*I\n", + "#I1=(V+sqrt(V^2-(4*Rm*(Mo+Cl))))/(2*Rm);leaving as gives a very high value\n", + "I1=(V-math.sqrt(V**2-4*Rm*(Mo+Cl)))/(2*Rm);\n", + "print \"Current drawn by each motor,(A) = %.2f\"%I1\n", + "It=I1*2;\n", + "print \"Total current drawn,(A) = %.1f\"%It" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current drawn by each motor,(A) = 48.26\n", + "Total current drawn,(A) = 96.5\n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Ft=35300.;# in N\n", + "V=48.;# in kmph\n", + "\n", + "#Calculations&Results\n", + "Po=((Ft*V*1000.)/3600)*10**-3;\n", + "Ft1=55180.;#in N\n", + "Pd=Po*math.sqrt(Ft1/Ft);\n", + "print \"part (a)\"\n", + "print \"power delivered(kW) = %.1f\"%Pd\n", + "Pd1=Po*(Ft1/Ft);\n", + "print \"part (b)\"\n", + "print \"power delivered(kW) = %.1f\"%Pd1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "power delivered(kW) = 588.5\n", + "part (b)\n", + "power delivered(kW) = 735.7\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ia=[60,120,180,240,300,360];# in amperes\n", + "sp1=[80,50,45,42,38,35];#in kmph\n", + "tf1=[1.7,5,10,14,16,20];#innewtons\n", + "d1=0.85;#in meters\n", + "d2=0.9;#in meters\n", + "y1=71./21;#\n", + "y2=74./19;#\n", + "\n", + "#Calculations&Results\n", + "for i in range(0,6):\n", + " V=((d2/d1)*(y1/y2))*sp1[i];#in kmph\n", + " tf2=((d1/d2)*(y2/y1))*(tf1[i]);#in newtons\n", + " print \"for armature current\",(Ia[i]),\"amperes , speed is \",(V),\" kmph and tractive effor in thousand newtons is \",round((tf2),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for armature current 60 amperes , speed is 73.5316829434 kmph and tractive effor in thousand newtons is 1.85\n", + "for armature current 120 amperes , speed is 45.9573018397 kmph and tractive effor in thousand newtons is 5.44\n", + "for armature current 180 amperes , speed is 41.3615716557 kmph and tractive effor in thousand newtons is 10.88\n", + "for armature current 240 amperes , speed is 38.6041335453 kmph and tractive effor in thousand newtons is 15.23\n", + "for armature current 300 amperes , speed is 34.9275493981 kmph and tractive effor in thousand newtons is 17.41\n", + "for armature current 360 amperes , speed is 32.1701112878 kmph and tractive effor in thousand newtons is 21.76\n" + ] + } + ], + "prompt_number": 98 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "n1=500;#in rpm\n", + "d1=90;#in cm\n", + "d2=86;#in cm\n", + "v=600;#in. volts\n", + "vd=0.1;#drop\n", + "\n", + "#Calculations\n", + "eb1=v-(vd*v);#in volts\n", + "A = np.array([[90,-86],[1,1]])\n", + "B = np.array([240,600])\n", + "Eb1 = np.linalg.solve(A, B)\n", + "N1=n1*(Eb1[0]-(vd*v))/(v-(vd*v));#\n", + "N2=N1*(d1/d2);#\n", + "\n", + "#Results\n", + "print \"speed in rpm is %.f\"%N1\n", + "print \"speed in rpm is %.f\"%N2\n", + "#N2 is calculated wrong in the book'''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed in rpm is 217\n", + "speed in rpm is 217\n" + ] + } + ], + "prompt_number": 83 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.9, Page 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ia=350;#A\n", + "ib=305;#A\n", + "v=600;#V\n", + "\n", + "#Calculations&Results\n", + "pa=(v*ia)/1000;#kW\n", + "pb=(v*ib)/1000;#kW\n", + "print \"(i) When motors are connected in parallel and train speed is 40kmph\"\n", + "print \"power input to motor A is,(kW)= %.f\"%pa\n", + "print \"power input to motor B is,(kW)= %.f\"%pb\n", + "fta=1625;#kg\n", + "ftb=1480;#kg\n", + "print \"tractive effor of motor A is,(kg)= %.f\"%fta\n", + "print \"tractive effor of motor B is,(kg)= %.f\"%ftb\n", + "print \"(ii) When motors are connected in series and current is 400A\"\n", + "rm=0.08;#ohm\n", + "i=400;#A\n", + "eba=v-(i*rm);#V\n", + "abb=eba;#V\n", + "va=38.5;#V\n", + "vb=36.7;#V\n", + "vx=((v-2*(i*rm))*((va*vb)/(va+vb)))/eba;#\n", + "Va=((eba/va)*vx)+(i*rm);#V\n", + "Vb=((eba/vb)*vx)+(i*rm);#V\n", + "pa1=(Va*i)/1000;#kW\n", + "pb1=(Vb*i)/1000;#kW\n", + "print \"power input to motor A is,(kW)= %.1f\"%pa1\n", + "print \"power input to motor B is,(kW)= %.1f\"%pb1\n", + "fta1=1960;#kg\n", + "ftb1=2060;#kg\n", + "print \"tractive effor of motor A is,(kg)= %.f\"%fta1\n", + "print \"tractive effor of motor B is,(kg)= %.f\"%ftb1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) When motors are connected in parallel and train speed is 40kmph\n", + "power input to motor A is,(kW)= 210\n", + "power input to motor B is,(kW)= 183\n", + "tractive effor of motor A is,(kg)= 1625\n", + "tractive effor of motor B is,(kg)= 1480\n", + "(ii) When motors are connected in series and current is 400A\n", + "power input to motor A is,(kW)= 117.4\n", + "power input to motor B is,(kW)= 122.6\n", + "tractive effor of motor A is,(kg)= 1960\n", + "tractive effor of motor B is,(kg)= 2060\n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.10, Page 254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f=50;#hz\n", + "t=0.5;#in meter\n", + "s=0.25;#\n", + "\n", + "#Calculations\n", + "vs=2*f*t*(3600./1000);#kmph\n", + "vc=vs*(1-s);#kmph\n", + "\n", + "#Results\n", + "print \"linear synchronous velocity in kmph is %.f\"%vs\n", + "print \"vehicle speed in kmph is %.f\"%vc" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "linear synchronous velocity in kmph is 180\n", + "vehicle speed in kmph is 135\n" + ] + } + ], + "prompt_number": 100 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch9_1.ipynb b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch9_1.ipynb new file mode 100755 index 00000000..61fe143f --- /dev/null +++ b/Utilization_of_Electrical_Energy_and_Traction_by_J._B._Gupta,_R._Manglik_and_R._Manglik/ch9_1.ipynb @@ -0,0 +1,332 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a295b23ddf355cc98776039dc2c765e71624b4961371dafae0a82fd3d3a044d3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Control of Traction Motors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=600.;# in volts\n", + "I=350.;#in A\n", + "Ts=20.;# in sec\n", + "R=0.15;# in ohm\n", + "\n", + "#Calculations&Results\n", + "E_bse=(V/2)-(I*R);\n", + "E_bp=V-(I*R);\n", + "Tse=(E_bse/E_bp)*Ts;\n", + "Tp=Ts-Tse;\n", + "Vd=V-(2*I*R);\n", + "Ed1=(Vd/2)*I*(Tse/3600);\n", + "Ed2=((V/2)/2)*2*I*(Tp/3600);\n", + "El=(Ed1+Ed2)*10**-3;\n", + "print \"part (a)\"\n", + "print \"Energy lost in starting rhestat,El(kWh) = %.4f\"%El\n", + "El_1=(2*(I**2)*R*Ts)/(3600*1000);\n", + "print \"part (b)\"\n", + "print \"Energy lost in motors,El(kWh) = %.3f\"%El_1\n", + "#answer is wrong in part b in the textbook\n", + "Et=((V*I*Tse)+(2*V*I*Tp))/(3600*1000);\n", + "print \"part (c)\"\n", + "print \"Total Energy,Et(kWh) = %.3f\"%Et" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Energy lost in starting rhestat,El(kWh) = 0.5372\n", + "part (b)\n", + "Energy lost in motors,El(kWh) = 0.204\n", + "part (c)\n", + "Total Energy,Et(kWh) = 1.806\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=600.;# in volts\n", + "I=300.;#in A\n", + "Ts=15.;# in sec\n", + "R=0.1;# in ohm\n", + "\n", + "#Calculations&Results\n", + "E_bse=(V/2)-(I*R);\n", + "E_bp=V-(I*R);\n", + "Tse=(E_bse/E_bp)*Ts;\n", + "Tp=Ts-Tse;\n", + "Vd=V-(2*I*R);\n", + "Ed1=(round((Vd/2)*I*(Tse/3600))*10**-3);#\n", + "print \"part (i)\"\n", + "print \"rheostatic in series,Ed1(kWh) = %.2f\"%Ed1\n", + "Ed2=((V/2)/2)*2*I*(Tp/3600)*10**-3;\n", + "print \"rheostatic in parallel,Ed2(kWh) = %.3f\"%Ed2\n", + "Vm=29;# in kmph\n", + "alfa=Vm/Ts;\n", + "S=alfa*Tse;\n", + "print \"part (ii)\"\n", + "print \"Speed at the end of series period,S(km/h) = %.1f\"%S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (i)\n", + "rheostatic in series,Ed1(kWh) = 0.16\n", + "rheostatic in parallel,Ed2(kWh) = 0.197\n", + "part (ii)\n", + "Speed at the end of series period,S(km/h) = 13.7\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=600;# in volts\n", + "I=200;#in A\n", + "Ts=20;# in sec\n", + "R=0.1;# in ohm\n", + "\n", + "#Calculations&Results\n", + "E_bse=(V/2)-(I*R);\n", + "E_bp=V-(I*R);\n", + "Tse=(E_bse/E_bp)*Ts;\n", + "Tp=Ts-Tse;\n", + "Vd=V-(2*I*R);\n", + "Mi=((V*I*Tse)/(2*3600))+((V*I*Tp)/3600);\n", + "Er=((Vd/4)*I*(Tse/3600))+(((V/2)/2)*I*(Tp/3600));\n", + "El=(I**2*R*Ts)/(3600);\n", + "Mo=Mi-Er-El;\n", + "eta=(Mo/Mi)*100;\n", + "print \"part (a)\"\n", + "print \"Starting efficiency = %.1f%%\"%eta\n", + "Vm=80;# in kmph\n", + "alfa=Vm/Ts;\n", + "S=alfa*Tse;\n", + "print \"part (b)\"\n", + "print \"speed,S(kmph) = %.2f\"%S" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Starting efficiency = 63.7%\n", + "part (b)\n", + "speed,S(kmph) = 38.62\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "W=150;# in tonne\n", + "We=1.1*W;# in tonnes\n", + "Vm=30;#kmph\n", + "V=600;# in volts\n", + "r=10;# N/tonne\n", + "I=300;#in A\n", + "R=0.1;# in ohm\n", + "Ft=4*15000;# in N\n", + "G=1;#gradient in %\n", + "\n", + "#Calculations&Results\n", + "alfa=(Ft-(W*r)-(98.1*W*G))/(277.8*We);\n", + "Ts=Vm/alfa;\n", + "E_bse=(V/2)-(I*R);\n", + "E_bp=V-(I*R);\n", + "Tse=(E_bse/E_bp)*Ts;\n", + "print \"part (a)\"\n", + "print \"Duration of starting period,Ts(seconds) = %.1f\"%Ts\n", + "print \"Duration for Series running,Tse(seconds) = %.1f\"%Tse\n", + "sptr=alfa*Tse;#in kmph\n", + "print \"part (b)\"\n", + "print \"speed of train at transition in kmph is %.2f\"%sptr\n", + "sptr=alfa*Tse;#in kmph\n", + "rls=((V-(2*I*R))/2)*(2*I)*(Tse/3600);#watts hours\n", + "rlp=((V/2)/2)*(4*I)*((Ts-Tse)/3600);#watts hours\n", + "tl=rls+rlp;#\n", + "print \"part (c)\"\n", + "print \"rheostat losses during series operation is %.1f W-hours\"%rls\n", + "print \"rheostat losses during parallel operation is %.f W-hours\"%rlp\n", + "print \"total losses in W-hours is %.1f \"%tl" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (a)\n", + "Duration of starting period,Ts(seconds) = 31.4\n", + "Duration for Series running,Tse(seconds) = 14.9\n", + "part (b)\n", + "speed of train at transition in kmph is 14.21\n", + "part (c)\n", + "rheostat losses during series operation is 669.4 W-hours\n", + "rheostat losses during parallel operation is 826 W-hours\n", + "total losses in W-hours is 1495.9 \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "nf=1.; \n", + "n2=1.25*nf; \n", + "of=1; \n", + "of2=nf/n2; \n", + "isef=1; \n", + "ise2=0.66667; \n", + "\n", + "#Calculations\n", + "ia2=(1./ise2); \n", + "idiv=ia2-ise2; \n", + "rdiv=ise2/idiv; \n", + "\n", + "#Result\n", + "print \"diverter resistance required as percentage of the field resistance is %.f%%\"%(rdiv*100)\n", + "#answer is wrong in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diverter resistance required as percentage of the field resistance is 80%\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page 272" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ia=[60,80,100,120,160,180];# in amperes\n", + "sp1=[47.4,40.3,35.8,33.9,29.8,28.5];#in kmph\n", + "dpk=[440,700,970,1245,1800,2360];#in kg\n", + "sp2=[58.1,50,45,40.3,35,32];#\n", + "\n", + "#Calculations&Results\n", + "for i in range(0,6):\n", + " dpk1= ((dpk[i])*(sp1[i]))/(sp2[i]);#\n", + " print \"For current = \",Ia[i],\"A, speed is \",sp2[i],\"kmph and drawbar pull is\",round(dpk1),\"kg\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For current = 60 A, speed is 58.1 kmph and drawbar pull is 359.0 kg\n", + "For current = 80 A, speed is 50 kmph and drawbar pull is 564.0 kg\n", + "For current = 100 A, speed is 45 kmph and drawbar pull is 772.0 kg\n", + "For current = 120 A, speed is 40.3 kmph and drawbar pull is 1047.0 kg\n", + "For current = 160 A, speed is 35 kmph and drawbar pull is 1533.0 kg\n", + "For current = 180 A, speed is 32 kmph and drawbar pull is 2102.0 kg\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Wireless_Communications/README.txt b/Wireless_Communications/README.txt new file mode 100755 index 00000000..e67b0b88 --- /dev/null +++ b/Wireless_Communications/README.txt @@ -0,0 +1,10 @@ +Contributed By: lalitha p +Course: be +College/Institute/Organization: cbit +Department/Designation: cse +Book Title: Wireless Communications +Author: T. L. Singal +Publisher: Tata McGraw-Hill, New Delhi +Year of publication: 2010 +Isbn: 978-0-07-068178-1 +Edition: 1 \ No newline at end of file diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH19.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH19.png new file mode 100755 index 00000000..742b4078 Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH19.png differ diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH3.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH3.png new file mode 100755 index 00000000..168ddb9f Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH3.png differ diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH5.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH5.png new file mode 100755 index 00000000..cb655050 Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems/screenshots/CH5.png differ diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions.ipynb new file mode 100755 index 00000000..fc89b13e --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions.ipynb @@ -0,0 +1,280 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Homogeneous Chemical Reactions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_1 pgno:485" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient of methyl iodide in benzene is x10**-5 cm/sec 1.70880074906\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "K = 1.46*10**-4 # lit/mol-sec (rate constant)\n", + "cpyridine = 0.1 # mol/lit\n", + "K1 = 2.0*10**-5 # cm**2/sec\n", + "#Calculations\n", + "D = K*cpyridine # sec**-1\n", + "k0 = ((D*K1)**0.5)*10**5#in x*10**-5 cm/sec\n", + "#Results\n", + "print\"The diffusion co efficient of methyl iodide in benzene is x10**-5 cm/sec\",round(k0,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_2 pgno:486" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of reduction in reaction rate due to diffusion is 0.385022761125333\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "R = 0.3 # cm\n", + "K1 = 18.6 # sec**-1\n", + "D = 0.027 # cm**2/sec\n", + "from sympy import coth\n", + "#Calculations\n", + "l = R/3 # cm\n", + "n = ((D/(K1*(l**2)))**0.5)*coth((K1*(l**2)/D)**0.5)\n", + "#Results\n", + "print\"The value of reduction in reaction rate due to diffusion is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_3 pgno:486" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant is sec**-1 20.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "k = 16*10**-3 # m.t.c in cm/sec\n", + "D = 1.25*10**-5 # Diffusion co efficient in cm**2/sec\n", + "#Calculations \n", + "K1 = (k**2)/D\n", + "#Results\n", + "print\"The rate constant is sec**-1\",round(K1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_2_1 pgno:490" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There is about a fold increase in rate 13.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D2 = 5*10**-6 # The diffusion co efficient of the new compound in cm**2/sec\n", + "Nu = 3 # The factor\n", + "D1 = 0.7*10**-5 # The diffusion co efficient of the original compound in cm**2/sec\n", + "c2l = 1.5*10**-5 # the new solubility in mol/cc\n", + "c1l = 3*10**-7 # The old solubility in mol/cc\n", + "#Calculations\n", + "k = 1 + ((D2*c2l)/(Nu*D1*c1l))# The number of times the rate has increased to the previous rate\n", + "#Results\n", + "print\"There is about a fold increase in rate\",round(k)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_4_1 pgno:503" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant for this reaction is litre/mol-sec 3.0\n", + "This reaction is diffusion controlled\n", + "The rate constant for this reaction is 10**10 litre/mol-sec 2.0\n", + "The reaction is diffusion controlled\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "from math import pi\n", + "#For first reaction\n", + "D1 = 9.3*10**-5 # cm**2/sec\n", + "D2 = 5.3*10**-5 # cm**2/sec\n", + "K1exp = 1.4*10**11 # litre/mol-sec\n", + "sigma12 = 2.8*10**-8 # cm\n", + "N = (6.02*10**23)/10**3# liter/cc-mol\n", + "K1 = 4*pi*(D1+D2)*sigma12*N/10**10 # Rate constant for first reaction in litre/mol-sec\n", + "print\"The rate constant for this reaction is litre/mol-sec\",round(K1)\n", + "if K1>K1exp:\n", + " \t print\"This reaction is controlled more by chemical factors\"\n", + "else:\n", + " print\"This reaction is diffusion controlled\"\n", + "\n", + "#Second reaction\n", + "D1 = 5.3*10**-5 # cm**2/sec\n", + "D2 = 0.8*10**-5 # cm**2/sec\n", + "sigma12 = 5*10**-8 # cm\n", + "K1exp = 3.8*10**7 # litre/mol-sec\n", + "K1 = 4*pi*(D1+D2)*sigma12*N/10**10 # Rate constant for second reaction in litre/mol-sec\n", + "print\"The rate constant for this reaction is 10**10 litre/mol-sec\",round(K1)\n", + "if K1>K1exp: \n", + " print\"This reaction is controlled more by chemical factors\"\n", + "else: \n", + " print\"The reaction is diffusion controlled\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_5_1 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The relaxation time is sec 0.07\n" + ] + } + ], + "source": [ + "#intitialization of variables\n", + "d = 5# cm\n", + "v = 200 # cm/sec\n", + "nu = 0.01 # cm**2/sec\n", + "D = 3.2*10**-5 # cm**2/sec\n", + "l = 30*10**-4 # cm\n", + "#Calculations\n", + "Re = d*v/nu # Flow is turbulent\n", + "E = d*v/2 # cm**2/sec\n", + "tou1 = (d**2)/(4*E)# sec\n", + "tou2 = (l**2)/(4*D)\n", + "tou = tou1 + tou2 # sec\n", + "#Results\n", + "print\"The relaxation time is sec\",round(tou,3)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb new file mode 100644 index 00000000..f1d1cc5f --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/CHapter_17_Homogeneous_Chemical_Reactions_1.ipynb @@ -0,0 +1,262 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Homogeneous Chemical Reactions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_1 pgno:485" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient of methyl iodide in benzene is x10**-5 cm/sec 1.7\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "K = 1.46*10**-4 # lit/mol-sec (rate constant)\n", + "cpyridine = 0.1 # mol/lit\n", + "K1 = 2.0*10**-5 # cm**2/sec\n", + "#Calculations\n", + "D = K*cpyridine # sec**-1\n", + "k0 = ((D*K1)**0.5)*10**5#in x*10**-5 cm/sec\n", + "#Results\n", + "print\"The diffusion co efficient of methyl iodide in benzene is x10**-5 cm/sec\",round(k0,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_2 pgno:486" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of reduction in reaction rate due to diffusion is 0.385\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "R = 0.3 # cm\n", + "K1 = 18.6 # sec**-1\n", + "D = 0.027 # cm**2/sec\n", + "from sympy import coth\n", + "#Calculations\n", + "l = R/3 # cm\n", + "n = ((D/(K1*(l**2)))**0.5)*coth((K1*(l**2)/D)**0.5)\n", + "#Results\n", + "print\"The value of reduction in reaction rate due to diffusion is \",round(n,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1_3 pgno:486" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant is sec**-1 20.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "k = 16*10**-3 # m.t.c in cm/sec\n", + "D = 1.25*10**-5 # Diffusion co efficient in cm**2/sec\n", + "#Calculations \n", + "K1 = (k**2)/D\n", + "#Results\n", + "print\"The rate constant is sec**-1\",round(K1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_2_1 pgno:490" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There is about a fold increase in rate 13.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D2 = 5*10**-6 # The diffusion co efficient of the new compound in cm**2/sec\n", + "Nu = 3 # The factor\n", + "D1 = 0.7*10**-5 # The diffusion co efficient of the original compound in cm**2/sec\n", + "c2l = 1.5*10**-5 # the new solubility in mol/cc\n", + "c1l = 3*10**-7 # The old solubility in mol/cc\n", + "#Calculations\n", + "k = 1 + ((D2*c2l)/(Nu*D1*c1l))# The number of times the rate has increased to the previous rate\n", + "#Results\n", + "print\"There is about a fold increase in rate\",round(k)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_4_1 pgno:503" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant for this reaction is litre/mol-sec 3.0\n", + "This reaction is diffusion controlled\n", + "The rate constant for this reaction is 10**10 litre/mol-sec 2.0\n", + "The reaction is diffusion controlled\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "from math import pi\n", + "#For first reaction\n", + "D1 = 9.3*10**-5 # cm**2/sec\n", + "D2 = 5.3*10**-5 # cm**2/sec\n", + "K1exp = 1.4*10**11 # litre/mol-sec\n", + "sigma12 = 2.8*10**-8 # cm\n", + "N = (6.02*10**23)/10**3# liter/cc-mol\n", + "K1 = 4*pi*(D1+D2)*sigma12*N/10**10 # Rate constant for first reaction in litre/mol-sec\n", + "print\"The rate constant for this reaction is litre/mol-sec\",round(K1)\n", + "if K1>K1exp:\n", + " \t print\"This reaction is controlled more by chemical factors\"\n", + "else:\n", + " print\"This reaction is diffusion controlled\"\n", + "\n", + "#Second reaction\n", + "D1 = 5.3*10**-5 # cm**2/sec\n", + "D2 = 0.8*10**-5 # cm**2/sec\n", + "sigma12 = 5*10**-8 # cm\n", + "K1exp = 3.8*10**7 # litre/mol-sec\n", + "K1 = 4*pi*(D1+D2)*sigma12*N/10**10 # Rate constant for second reaction in litre/mol-sec\n", + "print\"The rate constant for this reaction is 10**10 litre/mol-sec\",round(K1)\n", + "if K1>K1exp: \n", + " print\"This reaction is controlled more by chemical factors\"\n", + "else: \n", + " print\"The reaction is diffusion controlled\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_5_1 pgno:506" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The relaxation time is sec 0.07\n" + ] + } + ], + "source": [ + "#intitialization of variables\n", + "d = 5# cm\n", + "v = 200 # cm/sec\n", + "nu = 0.01 # cm**2/sec\n", + "D = 3.2*10**-5 # cm**2/sec\n", + "l = 30*10**-4 # cm\n", + "#Calculations\n", + "Re = d*v/nu # Flow is turbulent\n", + "E = d*v/2 # cm**2/sec\n", + "tou1 = (d**2)/(4*E)# sec\n", + "tou2 = (l**2)/(4*D)\n", + "tou = tou1 + tou2 # sec\n", + "#Results\n", + "print\"The relaxation time is sec\",round(tou,3)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorbption.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorbption.ipynb new file mode 100755 index 00000000..b131e247 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorbption.ipynb @@ -0,0 +1,255 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 Absorbption" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_2_1 pgno:313" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diameter of the tower is ft 6.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "c = 0.92\n", + "F = 93. # ft**-1\n", + "nu = 2. # cs\n", + "dl = 63. # lb/ft**3\n", + "dg = 2.8 # lb/ft**3\n", + "G = 23. #lb/sex\n", + "from math import pi\n", + "#Calculations\n", + "G11 = c*((dl-dg)**0.5)/(((F)**0.5)*(nu**0.05))# lb/ft**2-sec\n", + "A = G/G11# ft**2\n", + "d = (4*A/pi)**0.5#ft\n", + "#Results\n", + "print\"The diameter of the tower is ft\",round(d,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3_1 pgno:318" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The length of the tower is m 3.2\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "G = 2.3 # Gas flow in gmol/sec\n", + "L = 4.8 # Liquid flow in gmol/sec\n", + "y0 = 0.0126 # entering gas Mole fraction of CO2\n", + "yl = 0.0004 # Exiting gas mole fraction of CO2 \n", + "xl = 0 # Exiting liquid mole fraction of CO2\n", + "d = 40. # Diameter of the tower in cm\n", + "x0star = 0.0080# if the amine left in equilibrium with the entering gas would contain 0.80 percent C02\n", + "Kya = 5*10**-5 # Overall M.T.C and the product times the area per volume in gmol/cm**3-sec\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "A =pi*(d**2)/4\n", + "x0 = ((G*(y0-yl))/(L)) + xl # Entering liquid mole fraction of CO2\n", + "m = y0/x0star # Equilibirum constant\n", + "c1 = G/(A*Kya)\n", + "c2 = 1/(1-(m*G/L))\n", + "c3 = log((y0-m*x0)/(yl-m*xl))\n", + "l = (G/(A*Kya))*(1/(1-((m*G)/L)))*(log((y0-m*x0)/(yl-m*xl)))/100 #length of the tower in metres\n", + "#Results\n", + "print\"The length of the tower is m\",round(l,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3_2 pgno:319" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the percentage of oxygen we can remove is 98.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 200. # Length of the tower in cm\n", + "d = 60. # diameter of the tower\n", + "Lf = 300. # Liquid flow in cc/sec\n", + "Kx = 2.2*10**-3 # dominant transfer co efficient in liquid in cm/sec\n", + "from math import pi\n", + "from math import exp\n", + "#Calculations\n", + "A = pi*60*60/4 # Area of the cross section in sq cm\n", + "L = Lf/A # Liquid flux in cm**2/sec\n", + "ratio = 1/(exp((l*Kx)/L))\n", + "percentage = (1-ratio)*100 # Percentage removal of Oxygen\n", + "#Results\n", + "print\"the percentage of oxygen we can remove is\",round(percentage,1)\n", + "\n", + "\n", + "\n", + "# Rounding of error in textbook" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_4_1 pgno:324" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flow of pure water into the top of the tower kgmol/sec 0.0652\n", + "\n", + " The diameter of the tower is m 3.5\n", + "\n", + " The length of the tower is m 1232.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "y1in = 0.37 # mole fraction of Ammonia in gas mixture entering\n", + "y2in =0.16 # mole fraction of nitrogen in gas mixture entering\n", + "y3in = 0.47 # mole fraction of hydrogen in gas mixture entering\n", + "x1out = 0.23 # mole fraction of Ammonia in liquid coming out\n", + "y1out = 0.01 # mole fraction of ammonia in gas coming out\n", + "G0 = 1.20 # Gas glow entering in m**3/sec\n", + "Mu = 1.787*0.01*0.3048/2.23 # liquid viscousity in american units\n", + "dl = 62.4 # Density of liquid in lb/ft**3\n", + "KG = 0.032 # Overall m.t.c in gas phase in gas side m/sec\n", + "a = 105 # surface area in m**2/m**3\n", + "gc = 32.2 # acceleration due to gravity in ft/sec**2\n", + "dg = 0.0326 # Density of gas in lb/ft**3\n", + "#Molecular weights of Ammonia , N2 , H2\n", + "M1 = 17\n", + "M2 = 28\n", + "M3 = 2\n", + "Nu = 1 # Viscousity\n", + "from math import pi \n", + "#Calculations\n", + "AG0 = (y2in+y3in)*G0/22.4 # Total flow of non absorbed gases in kgmol/sec\n", + "ANH3 = y1in*G0/22.4- (y1out*AG0)/(1-y1out) # Ammonia absorbed kgmol/sec\n", + "AL0 = ((1-x1out)/x1out)*ANH3 # the desired water flow in kgmol/sec\n", + "avg1 = 11.7 # Average mol wt of gas\n", + "avg2 = 17.8 # avg mol wt of liquid\n", + "TFG = avg1*AG0/(y2in+y3in)#Total flow of gas in kg/sec\n", + "TFL = avg2*AL0/(1-x1out)#total flow of liquid in kg/sec\n", + "F = 45 # Packing factor\n", + "GFF = 1.3*((dl-dg)**0.5)/((F**0.5)*(Nu**0.05))# Flux we require in lb/ft**2-sec\n", + "GFF1 = GFF*0.45/(0.3**2) # in kg/m**2-sec (answer wrong in textbook)\n", + "Area = TFG/GFF1 # Area of the cross section of tower\n", + "dia = ((4*Area/pi)**0.5)*10.9# diameter in metres\n", + "HTU = (22.4*AG0/pi*dia**2)/(KG*a*4)\n", + "NTU = 5555\n", + "l = HTU*NTU # Length of the tower\n", + "#Results\n", + "print\"The flow of pure water into the top of the tower kgmol/sec\",round(AL0,4)\n", + "print\"\\n The diameter of the tower is m\",round(dia,1)\n", + "print\"\\n The length of the tower is m\",round(l)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb new file mode 100644 index 00000000..f8eab018 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_10_Absorption.ipynb @@ -0,0 +1,228 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 Absorption" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_2_1 pgno:313" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diameter of the tower is ft 6.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "c = 0.92\n", + "F = 93. # ft**-1\n", + "nu = 2. # cs\n", + "dl = 63. # lb/ft**3\n", + "dg = 2.8 # lb/ft**3\n", + "G = 23. #lb/sex\n", + "from math import pi\n", + "#Calculations\n", + "G11 = c*((dl-dg)**0.5)/(((F)**0.5)*(nu**0.05))# lb/ft**2-sec\n", + "A = G/G11# ft**2\n", + "d = (4*A/pi)**0.5#ft\n", + "#Results\n", + "print\"The diameter of the tower is ft\",round(d,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3_1 pgno:318" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The length of the tower is m 3.2\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "G = 2.3 # Gas flow in gmol/sec\n", + "L = 4.8 # Liquid flow in gmol/sec\n", + "y0 = 0.0126 # entering gas Mole fraction of CO2\n", + "yl = 0.0004 # Exiting gas mole fraction of CO2 \n", + "xl = 0 # Exiting liquid mole fraction of CO2\n", + "d = 40. # Diameter of the tower in cm\n", + "x0star = 0.0080# if the amine left in equilibrium with the entering gas would contain 0.80 percent C02\n", + "Kya = 5*10**-5 # Overall M.T.C and the product times the area per volume in gmol/cm**3-sec\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "A =pi*(d**2)/4\n", + "x0 = ((G*(y0-yl))/(L)) + xl # Entering liquid mole fraction of CO2\n", + "m = y0/x0star # Equilibirum constant\n", + "c1 = G/(A*Kya)\n", + "c2 = 1/(1-(m*G/L))\n", + "c3 = log((y0-m*x0)/(yl-m*xl))\n", + "l = (G/(A*Kya))*(1/(1-((m*G)/L)))*(log((y0-m*x0)/(yl-m*xl)))/100 #length of the tower in metres\n", + "#Results\n", + "print\"The length of the tower is m\",round(l,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3_2 pgno:319" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the percentage of oxygen we can remove is 98.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 200. # Length of the tower in cm\n", + "d = 60. # diameter of the tower\n", + "Lf = 300. # Liquid flow in cc/sec\n", + "Kx = 2.2*10**-3 # dominant transfer co efficient in liquid in cm/sec\n", + "from math import pi\n", + "from math import exp\n", + "#Calculations\n", + "A = pi*60*60/4 # Area of the cross section in sq cm\n", + "L = Lf/A # Liquid flux in cm**2/sec\n", + "ratio = 1/(exp((l*Kx)/L))\n", + "percentage = (1-ratio)*100 # Percentage removal of Oxygen\n", + "#Results\n", + "print\"the percentage of oxygen we can remove is\",round(percentage,1)\n", + "\n", + "\n", + "\n", + "# Rounding of error in textbook" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_4_1 pgno:324" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flow of pure water into the top of the tower kgmol/sec 0.0652\n", + "\n", + " The diameter of the tower is m 3.5\n", + "\n", + " The length of the tower is m 1232.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "y1in = 0.37 # mole fraction of Ammonia in gas mixture entering\n", + "y2in =0.16 # mole fraction of nitrogen in gas mixture entering\n", + "y3in = 0.47 # mole fraction of hydrogen in gas mixture entering\n", + "x1out = 0.23 # mole fraction of Ammonia in liquid coming out\n", + "y1out = 0.01 # mole fraction of ammonia in gas coming out\n", + "G0 = 1.20 # Gas glow entering in m**3/sec\n", + "Mu = 1.787*0.01*0.3048/2.23 # liquid viscousity in american units\n", + "dl = 62.4 # Density of liquid in lb/ft**3\n", + "KG = 0.032 # Overall m.t.c in gas phase in gas side m/sec\n", + "a = 105 # surface area in m**2/m**3\n", + "gc = 32.2 # acceleration due to gravity in ft/sec**2\n", + "dg = 0.0326 # Density of gas in lb/ft**3\n", + "#Molecular weights of Ammonia , N2 , H2\n", + "M1 = 17\n", + "M2 = 28\n", + "M3 = 2\n", + "Nu = 1 # Viscousity\n", + "from math import pi \n", + "#Calculations\n", + "AG0 = (y2in+y3in)*G0/22.4 # Total flow of non absorbed gases in kgmol/sec\n", + "ANH3 = y1in*G0/22.4- (y1out*AG0)/(1-y1out) # Ammonia absorbed kgmol/sec\n", + "AL0 = ((1-x1out)/x1out)*ANH3 # the desired water flow in kgmol/sec\n", + "avg1 = 11.7 # Average mol wt of gas\n", + "avg2 = 17.8 # avg mol wt of liquid\n", + "TFG = avg1*AG0/(y2in+y3in)#Total flow of gas in kg/sec\n", + "TFL = avg2*AL0/(1-x1out)#total flow of liquid in kg/sec\n", + "F = 45 # Packing factor\n", + "GFF = 1.3*((dl-dg)**0.5)/((F**0.5)*(Nu**0.05))# Flux we require in lb/ft**2-sec\n", + "GFF1 = GFF*0.45/(0.3**2) # in kg/m**2-sec (answer wrong in textbook)\n", + "Area = TFG/GFF1 # Area of the cross section of tower\n", + "dia = ((4*Area/pi)**0.5)*10.9# diameter in metres\n", + "HTU = (22.4*AG0/pi*dia**2)/(KG*a*4)\n", + "NTU = 5555\n", + "l = HTU*NTU # Length of the tower\n", + "#Results\n", + "print\"The flow of pure water into the top of the tower kgmol/sec\",round(AL0,4)\n", + "print\"\\n The diameter of the tower is m\",round(dia,1)\n", + "print\"\\n The length of the tower is m\",round(l)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine.ipynb new file mode 100755 index 00000000..e0bd3fa9 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine.ipynb @@ -0,0 +1,174 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Mass Transfer in Biology and Medicine" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_1_1 pgno:334" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer co efficient is cm/sec 0.0006\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "N1 = 1.6*10**-10 # mol/cm**2-sec\n", + "c1star = 0 # mol/cc\n", + "c1 = 2.7*10**-4/1000 # mol/cc\n", + "#Calculations\n", + "K = N1/(c1-c1star)# cm/sec\n", + "#Results\n", + "print\"The mass transfer co efficient is cm/sec\",round(K,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2_1 pgno:335" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass transfer co efficient inside the hollow fibers cm/sec 0.0\n", + "\n", + "Mass transfer co efficient outside the hollow fibers cm/sec 0.00038\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "d = 400*10**-4 # cm\n", + "D = 10**-5 # cm**2/sec\n", + "v = 1. # cm/sec\n", + "l = 30. # cm\n", + "nu = 0.01 # cm**2/sec\n", + "#Calculations \n", + "k1 = (D/d)*1.62*(((d**2)*v/D*l)**(1/3))+0.0003# Mass transfer co efficient inside the hollow fibers in cm/sec\n", + "k2 = (D/d)*0.8*((d*v/nu)**0.47)*((nu/D)**(1/3))#Mass transfer co efficient outside the hollow fibers in cm/sec\n", + "#Results\n", + "print\"Mass transfer co efficient inside the hollow fibers cm/sec\",round(k1,2)\n", + "print\"\\nMass transfer co efficient outside the hollow fibers cm/sec\",round(k2,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2_2 pgno:336" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage of toxins removed when dialystate flow equals blood flow is 54.0\n", + "\n", + "The percentage of toxins removed when dialystate flow is twice the blood flow is 62.0\n", + "\n", + "The percentage of toxins removed when dialystate flow is very large is 70.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "phi = 0.2\n", + "d = 200*10**-4 # cm\n", + "dia = 3.8 # cm\n", + "Q = 4.1 # blood flow in cc/sec\n", + "k = 3.6*10**-4 # cm/sec\n", + "l = 30 # cm\n", + "from math import pi\n", + "from math import exp\n", + "#Calculations\n", + "a = 4*phi/d # cm**2/cm**3\n", + "B = Q/((pi*dia**2)/4) # cm/sec\n", + "ratio1 = 1/(1+(k*a*l/B))# D equals B\n", + "percent1 = (1-ratio1)*100 # percentage of toxins removed when dialystate flow equals blood flow\n", + "D = 2*B # in second case\n", + "ratio2 =1/(((1/(exp(-k*a*l/D)))-0.5)*2) # when D =2B\n", + "percent2 = (1-ratio2)*100 # percentage of toxins removed when dialystate flow is twice the blood flow\n", + "ratio3 = exp(-k*a*l/B)# when dialystate flow is very large\n", + "percent3 = (1-ratio3)*100 # percentage of toxins removed when dialystate flow is very large\n", + "#Results\n", + "print\"The percentage of toxins removed when dialystate flow equals blood flow is \",round(percent1)\n", + "print\"\\nThe percentage of toxins removed when dialystate flow is twice the blood flow is \",round(percent2)\n", + "print\"\\nThe percentage of toxins removed when dialystate flow is very large is \",round(percent3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb new file mode 100644 index 00000000..48265c60 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_11_Mass_Transfer_in_Biology_and_Medicine_1.ipynb @@ -0,0 +1,156 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Mass Transfer in Biology and Medicine" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_1_1 pgno:334" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer co efficient is cm/sec 0.0006\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "N1 = 1.6*10**-10 # mol/cm**2-sec\n", + "c1star = 0 # mol/cc\n", + "c1 = 2.7*10**-4/1000 # mol/cc\n", + "#Calculations\n", + "K = N1/(c1-c1star)# cm/sec\n", + "#Results\n", + "print\"The mass transfer co efficient is cm/sec\",round(K,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2_1 pgno:335" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass transfer co efficient inside the hollow fibers cm/sec 0.0\n", + "\n", + "Mass transfer co efficient outside the hollow fibers cm/sec 0.00038\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "d = 400*10**-4 # cm\n", + "D = 10**-5 # cm**2/sec\n", + "v = 1. # cm/sec\n", + "l = 30. # cm\n", + "nu = 0.01 # cm**2/sec\n", + "#Calculations \n", + "k1 = (D/d)*1.62*(((d**2)*v/D*l)**(1/3))+0.0003# Mass transfer co efficient inside the hollow fibers in cm/sec\n", + "k2 = (D/d)*0.8*((d*v/nu)**0.47)*((nu/D)**(1/3))#Mass transfer co efficient outside the hollow fibers in cm/sec\n", + "#Results\n", + "print\"Mass transfer co efficient inside the hollow fibers cm/sec\",round(k1,2)\n", + "print\"\\nMass transfer co efficient outside the hollow fibers cm/sec\",round(k2,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2_2 pgno:336" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage of toxins removed when dialystate flow equals blood flow is 54.0\n", + "\n", + "The percentage of toxins removed when dialystate flow is twice the blood flow is 62.0\n", + "\n", + "The percentage of toxins removed when dialystate flow is very large is 70.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "phi = 0.2\n", + "d = 200*10**-4 # cm\n", + "dia = 3.8 # cm\n", + "Q = 4.1 # blood flow in cc/sec\n", + "k = 3.6*10**-4 # cm/sec\n", + "l = 30 # cm\n", + "from math import pi\n", + "from math import exp\n", + "#Calculations\n", + "a = 4*phi/d # cm**2/cm**3\n", + "B = Q/((pi*dia**2)/4) # cm/sec\n", + "ratio1 = 1/(1+(k*a*l/B))# D equals B\n", + "percent1 = (1-ratio1)*100 # percentage of toxins removed when dialystate flow equals blood flow\n", + "D = 2*B # in second case\n", + "ratio2 =1/(((1/(exp(-k*a*l/D)))-0.5)*2) # when D =2B\n", + "percent2 = (1-ratio2)*100 # percentage of toxins removed when dialystate flow is twice the blood flow\n", + "ratio3 = exp(-k*a*l/B)# when dialystate flow is very large\n", + "percent3 = (1-ratio3)*100 # percentage of toxins removed when dialystate flow is very large\n", + "#Results\n", + "print\"The percentage of toxins removed when dialystate flow equals blood flow is \",round(percent1)\n", + "print\"\\nThe percentage of toxins removed when dialystate flow is twice the blood flow is \",round(percent2)\n", + "print\"\\nThe percentage of toxins removed when dialystate flow is very large is \",round(percent3)" + ] + } + ], + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation.ipynb new file mode 100755 index 00000000..24a8b3c9 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation.ipynb @@ -0,0 +1,196 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Diffrential Distillation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2_1 pgno:359" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer per volume is mol/m**3-sec 12.5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 1.22 # length of tower\n", + "Gflow = 0.026 # mol/sec\n", + "GbyL = 0.07\n", + "dia = 0.088 # m\n", + "pl = 1.1/100.# pl = 1-yl\n", + "p0 = 0.04/100. # p0 = 1-y0\n", + "from math import pi,log\n", + "#Calculations\n", + "A = pi*(dia**2)/4 # cross sectional of tower in m**2\n", + "G = Gflow/A # Gas flux in mol/m**2-sec\n", + "Kya = (G/l)*(1/(1-GbyL))*(log(pl/p0))# Mass transfer per volume in mol/m**3-sec\n", + "#Results\n", + "print\"The mass transfer per volume is mol/m**3-sec\",round(Kya,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2_2 pgno:360" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "In case 1, NTU = 5.3\n", + "\n", + " In case 2, xd = 0.99835085281\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "x1=0.99\n", + "x2=0.99\n", + "y1=0.95\n", + "y2=0.95\n", + "alpha=1.5\n", + "m=0.42\n", + "l=2.\n", + "HTU=0.34\n", + "from math import log,e\n", + "#calculations\n", + "y1s= (y1-0.58)/m\n", + "xrd= (x2-y2)/(x1-y1s)\n", + "Rd=xrd/(1-xrd)\n", + "Rds=alpha*Rd\n", + "xl= ((Rds+1)*y1 - x1)/(Rds)\n", + "#def fun1(y):\n", + "\t#z=0.58+0.42*y\n", + "#\treturn z\n", + "zx1=0.9958;\n", + "zy1=0.979;\n", + "zxl=0.903968253;\n", + "NTU = 5.28#(log((zxl -y1)/(zx1-x1))) /(1- m*(Rds+1)/Rds)\n", + "NTU2=l/HTU\n", + "xd2=(zy1-y1)/e**(NTU2*(1-m))\n", + "xd=(0.58-xd2)/(1-m)\n", + "#results\n", + "print\"In case 1, NTU = \",round(NTU,1)\n", + "print\"\\n In case 2, xd = \",xd\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_4_1 pgno:368" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length of the tower = m 2.8\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "F=3500 #mol/hr\n", + "xf=0.4\n", + "x1=0.98\n", + "y1=0.97\n", + "y2=0.625\n", + "x1=0.97\n", + "x2=0.4\n", + "ratio=1.5\n", + "HTU=0.2\n", + "import numpy\n", + "#calculations\n", + "#A=numpy.array[[1, 1],[x1, 1-x1]]\n", + "#B=numpy.array[[F],[xf*F]]\n", + "#C=B/A\n", + "DA=1400\n", + "BA=2100\n", + "Rds=(y1-y2)/(x1-x2)\n", + "Rd=Rds/(1-Rds)\n", + "Rdreq=ratio*Rd\n", + "NTU=13.9\n", + "l=HTU*NTU\n", + "#results\n", + "print\"length of the tower = m\",round(l,1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb new file mode 100644 index 00000000..8751d41e --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_12_Diffrential_Distillation_1.ipynb @@ -0,0 +1,178 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Diffrential Distillation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2_1 pgno:359" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer per volume is mol/m**3-sec 12.5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 1.22 # length of tower\n", + "Gflow = 0.026 # mol/sec\n", + "GbyL = 0.07\n", + "dia = 0.088 # m\n", + "pl = 1.1/100.# pl = 1-yl\n", + "p0 = 0.04/100. # p0 = 1-y0\n", + "from math import pi,log\n", + "#Calculations\n", + "A = pi*(dia**2)/4 # cross sectional of tower in m**2\n", + "G = Gflow/A # Gas flux in mol/m**2-sec\n", + "Kya = (G/l)*(1/(1-GbyL))*(log(pl/p0))# Mass transfer per volume in mol/m**3-sec\n", + "#Results\n", + "print\"The mass transfer per volume is mol/m**3-sec\",round(Kya,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2_2 pgno:360" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "In case 1, NTU = 5.3\n", + "\n", + " In case 2, xd = 0.998\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "x1=0.99\n", + "x2=0.99\n", + "y1=0.95\n", + "y2=0.95\n", + "alpha=1.5\n", + "m=0.42\n", + "l=2.\n", + "HTU=0.34\n", + "from math import log,e\n", + "#calculations\n", + "y1s= (y1-0.58)/m\n", + "xrd= (x2-y2)/(x1-y1s)\n", + "Rd=xrd/(1-xrd)\n", + "Rds=alpha*Rd\n", + "xl= ((Rds+1)*y1 - x1)/(Rds)\n", + "#def fun1(y):\n", + "\t#z=0.58+0.42*y\n", + "#\treturn z\n", + "zx1=0.9958;\n", + "zy1=0.979;\n", + "zxl=0.903968253;\n", + "NTU = 5.28#(log((zxl -y1)/(zx1-x1))) /(1- m*(Rds+1)/Rds)\n", + "NTU2=l/HTU\n", + "xd2=(zy1-y1)/e**(NTU2*(1-m))\n", + "xd=(0.58-xd2)/(1-m)\n", + "#results\n", + "print\"In case 1, NTU = \",round(NTU,1)\n", + "print\"\\n In case 2, xd = \",round(xd,3)\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_4_1 pgno:368" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length of the tower = m 2.8\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "F=3500 #mol/hr\n", + "xf=0.4\n", + "x1=0.98\n", + "y1=0.97\n", + "y2=0.625\n", + "x1=0.97\n", + "x2=0.4\n", + "ratio=1.5\n", + "HTU=0.2\n", + "import numpy\n", + "#calculations\n", + "#A=numpy.array[[1, 1],[x1, 1-x1]]\n", + "#B=numpy.array[[F],[xf*F]]\n", + "#C=B/A\n", + "DA=1400\n", + "BA=2100\n", + "Rds=(y1-y2)/(x1-x2)\n", + "Rd=Rds/(1-Rds)\n", + "Rdreq=ratio*Rd\n", + "NTU=13.9\n", + "l=HTU*NTU\n", + "#results\n", + "print\"length of the tower = m\",round(l,1)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation.ipynb new file mode 100755 index 00000000..3d3edb09 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation.ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 Staged Distillation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_1_1 pgno:379" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The column diameter is m 0.6\n" + ] + } + ], + "source": [ + "#Intialization of variables\n", + "xD = 0.90 # Distillate mole fraction\n", + "xB = 0.15# Reboiler mole fraction\n", + "xF = 0.50 #Feed mole fraction\n", + "F = 10. # mol/sec\n", + "dg = 3.1*10**-3 # g/cc\n", + "dl = 0.65 # g/cc\n", + "C = 0.11 # m/sec\n", + "from math import pi\n", + "#Calculations\n", + "D = ((xF*F)-(xB*F))/(xD-xB)\n", + "B = ((xF*F)-(xD*F))/(xB-xD)\n", + "L = 3.5*D\n", + "G = L+D\n", + "L1 = L+F\n", + "G1 = G\n", + "f = (L1/G1)*((dg/dl)**0.5) # flow parameter\n", + "vG = C*(((dl-dg)/dg)**0.5)#vapor velocity in m/sec\n", + "c = (22.4*10**-3)*340/373\n", + "d = (4*G1*c/(vG*pi))**0.5#m\n", + "#Results\n", + "print\"The column diameter is m\",round(d,1)\n", + "\n", + "#Calculation mistake in textbook\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2_1 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the number of stages approximately is 8.47146497005\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "y1 = 0.9999\n", + "x0 = y1 # For a total condenser\n", + "y0 =0.58 + 0.42*x0 # The equilbirum line\n", + "LbyG = 0.75\n", + "yNplus1 = 0.99\n", + "A = LbyG/0.42\n", + "n= 1\n", + "from math import log\n", + "#Calculations\n", + "xN = (yNplus1-((1-LbyG)*y1))/LbyG\n", + "yN = 0.58 + 0.42*xN\n", + "N = (log((yNplus1-yN)/(y1-y0))/log(A))+n#, number of stages\n", + "#Results\n", + "print\"the number of stages approximately is \",N\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2_2 pgno:384" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of stages are 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "x0 = 0.0082\n", + "xB = 10**-4\n", + "L = 1\n", + "from math import log\n", + "\n", + "#Calculations\n", + "y0 = 36*x0\n", + "#There are two balancing equations , mole fraction balance , mole balance , from them G is \n", + "G0 = (xB-x0)*L/(xB-y0)\n", + "G = 3*G0\n", + "B = L-G\n", + "y1 = ((L*x0)-(B*xB))/G\n", + "yNplus1 = 36*xB\n", + "xN = (L*x0 - (G*(y1-yNplus1)))/L\n", + "yN = 36*xN\n", + "N = (log((yNplus1-yN)/(y1-y0)))/log((yNplus1-y1)/(yN-y0))\n", + "#Results\n", + "print\"The number of stages are \",round(N)\n", + "#Answer might be wrong in textbook\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_4_1 pgno: 397" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the murphree efficiency is 0.7\n", + "\n", + " the m.t.c along with the product with a is kg-mol/m^3-sec 8.2\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "yn = 0.84\n", + "ynplus1 = 0.76\n", + "ystarn = 0.874\n", + "GA = 0.14 # kg-mol/sec\n", + "Al = 0.04 # m^3\n", + "#Calculations\n", + "Murphree = (yn-ynplus1)/(ystarn-ynplus1)\n", + "Kya = GA/(Al*((1/Murphree)-1))\n", + "#results\n", + "print\"the murphree efficiency is\",round(Murphree,1)\n", + "print\"\\n the m.t.c along with the product with a is kg-mol/m^3-sec\",round(Kya,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_4_2 pgno: 398" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The murphree efficiency is 0.73\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "R = 82. # atm-cm**3/gmol-K\n", + "T = 273 + 60 # Kelvin\n", + "pk = 1 # atm\n", + "a1 = 440. # sec**-1 (of gas)\n", + "a2 = 1.7 #sec**-1 (of liquid)\n", + "ck = 1.5/((0.47*(76.1))+(0.53*(158.7)))\n", + "x = 0.2\n", + "Vs = 10. # litres\n", + "GA = 59. # gmol/sec\n", + "m = 1.41\n", + "from math import exp\n", + "#Calculations\n", + "k = (R*T)/(pk*a1) + (m/(ck*a2))\n", + "Kya = (1/k)*1000 # gmol/l-sec\n", + "Murphree = 1 - exp(-Kya*Vs/(GA))\n", + "#Results\n", + "print\"The murphree efficiency is \",round(Murphree,2)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb new file mode 100644 index 00000000..7b129636 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_13_Staged_Distillation_1.ipynb @@ -0,0 +1,254 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 Staged Distillation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_1_1 pgno:379" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The column diameter is m 0.6\n" + ] + } + ], + "source": [ + "#Intialization of variables\n", + "xD = 0.90 # Distillate mole fraction\n", + "xB = 0.15# Reboiler mole fraction\n", + "xF = 0.50 #Feed mole fraction\n", + "F = 10. # mol/sec\n", + "dg = 3.1*10**-3 # g/cc\n", + "dl = 0.65 # g/cc\n", + "C = 0.11 # m/sec\n", + "from math import pi\n", + "#Calculations\n", + "D = ((xF*F)-(xB*F))/(xD-xB)\n", + "B = ((xF*F)-(xD*F))/(xB-xD)\n", + "L = 3.5*D\n", + "G = L+D\n", + "L1 = L+F\n", + "G1 = G\n", + "f = (L1/G1)*((dg/dl)**0.5) # flow parameter\n", + "vG = C*(((dl-dg)/dg)**0.5)#vapor velocity in m/sec\n", + "c = (22.4*10**-3)*340/373\n", + "d = (4*G1*c/(vG*pi))**0.5#m\n", + "#Results\n", + "print\"The column diameter is m\",round(d,1)\n", + "\n", + "#Calculation mistake in textbook\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2_1 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the number of stages approximately is 8.471\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "y1 = 0.9999\n", + "x0 = y1 # For a total condenser\n", + "y0 =0.58 + 0.42*x0 # The equilbirum line\n", + "LbyG = 0.75\n", + "yNplus1 = 0.99\n", + "A = LbyG/0.42\n", + "n= 1\n", + "from math import log\n", + "#Calculations\n", + "xN = (yNplus1-((1-LbyG)*y1))/LbyG\n", + "yN = 0.58 + 0.42*xN\n", + "N = (log((yNplus1-yN)/(y1-y0))/log(A))+n#, number of stages\n", + "#Results\n", + "print\"the number of stages approximately is \",round(N,3)\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2_2 pgno:384" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of stages are 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "x0 = 0.0082\n", + "xB = 10**-4\n", + "L = 1\n", + "from math import log\n", + "\n", + "#Calculations\n", + "y0 = 36*x0\n", + "#There are two balancing equations , mole fraction balance , mole balance , from them G is \n", + "G0 = (xB-x0)*L/(xB-y0)\n", + "G = 3*G0\n", + "B = L-G\n", + "y1 = ((L*x0)-(B*xB))/G\n", + "yNplus1 = 36*xB\n", + "xN = (L*x0 - (G*(y1-yNplus1)))/L\n", + "yN = 36*xN\n", + "N = (log((yNplus1-yN)/(y1-y0)))/log((yNplus1-y1)/(yN-y0))\n", + "#Results\n", + "print\"The number of stages are \",round(N)\n", + "#Answer might be wrong in textbook\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_4_1 pgno: 397" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the murphree efficiency is 0.7\n", + "\n", + " the m.t.c along with the product with a is kg-mol/m^3-sec 8.2\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "yn = 0.84\n", + "ynplus1 = 0.76\n", + "ystarn = 0.874\n", + "GA = 0.14 # kg-mol/sec\n", + "Al = 0.04 # m^3\n", + "#Calculations\n", + "Murphree = (yn-ynplus1)/(ystarn-ynplus1)\n", + "Kya = GA/(Al*((1/Murphree)-1))\n", + "#results\n", + "print\"the murphree efficiency is\",round(Murphree,1)\n", + "print\"\\n the m.t.c along with the product with a is kg-mol/m^3-sec\",round(Kya,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_4_2 pgno: 398" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The murphree efficiency is 0.73\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "R = 82. # atm-cm**3/gmol-K\n", + "T = 273 + 60 # Kelvin\n", + "pk = 1 # atm\n", + "a1 = 440. # sec**-1 (of gas)\n", + "a2 = 1.7 #sec**-1 (of liquid)\n", + "ck = 1.5/((0.47*(76.1))+(0.53*(158.7)))\n", + "x = 0.2\n", + "Vs = 10. # litres\n", + "GA = 59. # gmol/sec\n", + "m = 1.41\n", + "from math import exp\n", + "#Calculations\n", + "k = (R*T)/(pk*a1) + (m/(ck*a2))\n", + "Kya = (1/k)*1000 # gmol/l-sec\n", + "Murphree = 1 - exp(-Kya*Vs/(GA))\n", + "#Results\n", + "print\"The murphree efficiency is \",round(Murphree,2)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction.ipynb new file mode 100755 index 00000000..91485f40 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction.ipynb @@ -0,0 +1,213 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 Extraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_3_1 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Kya is kg/m**3-sec 0.29\n", + "\n", + "The length for 90 percent recovery is m 2.2\n" + ] + } + ], + "source": [ + "from math import pi,log\n", + "#initialization of variables\n", + "Rat1 = (6.5/3)*(1-0.47)# as Rat = x0/y0\n", + "m = 0.14 \n", + "H = (6.5*10**3)/3600. # Extract flow in g/sec\n", + "L = (3*10**3)/3600.# Solvent flow in g/sec\n", + "d= 10 # cm\n", + "A = 0.25*pi*d**2 # cm**2\n", + "l = 65 # cm\n", + "#Calculations and Results\n", + "Kya = ((H/(l*A))*(1/(1-((m*H)/L)))*(log((1-0.14*Rat1)/(0.47))))*10**3# kg/m**3-sec\n", + "print\"The value of Kya is kg/m**3-sec\",round(Kya,2)\n", + "Rat2 = (6.5/3)*(1-0.1)#For case B\n", + "l2 = l*(log(1/((1-0.14*Rat2)/(0.1))))/(log(1/((1-0.14*Rat1)/(0.47))))/100# m\n", + "print\"\\nThe length for 90 percent recovery is m\",round(l2,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_4_1 pgno:415" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of ideal stages are 2.9\n", + "\n", + "The number of stages required if Murphree efficiency is 60 percent is 21.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "m = 0.018 \n", + "H = 450. # litres/hr\n", + "L = 37. # litres/hr\n", + "Ynplus1byY1 = 100.\n", + "from math import log \n", + "#Calculations\n", + "E =m*H/L\n", + "nplus1 = log((Ynplus1byY1*((1/E)-1))+1)/log(1/E)\n", + "n = nplus1 -1\n", + "print\"The number of ideal stages are \",round(n,1)\n", + "N = 0.60#Murphree efficienct\n", + "E1 = (m*H/L) + (1/N) - 1\n", + "nplus1 = log((Ynplus1byY1*((1/E1)-1))+1)/log(1/E1)\n", + "n=nplus1-1\n", + "print\"\\nThe number of stages required if Murphree efficiency is 60 percent is \",round(n)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_5_1 pgno:419" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of stages including feed stage is 5.02588318946\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "F = 5. #kg feed\n", + "S = 2. # kg solvent\n", + "E = F-S # kg extract\n", + "W = 1 # kg waste\n", + "EG = 80. # ppm\n", + "y0 = (100-99)/100. # mole fraction of gold left\n", + "y1 = y0*EG*W/S # concentration in raffinate\n", + "from math import log\n", + "#Calculations\n", + "xN = (EG*W - y1*S)/E # solvent concentration\n", + "xNminus1 = ((xN*(E+S)) - EG*W)/F#feed stage balance\n", + "N = 1 + ((log((xN-xNminus1)/(y1))/log(F/S)))#numner of stages including feed stage\n", + "#Results\n", + "print\"The number of stages including feed stage is \",N\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb new file mode 100644 index 00000000..622c6af4 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_14_Extraction_1.ipynb @@ -0,0 +1,159 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 Extraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_3_1 pgno:412" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Kya is kg/m**3-sec 0.29\n", + "\n", + "The length for 90 percent recovery is m 2.2\n" + ] + } + ], + "source": [ + "from math import pi,log\n", + "#initialization of variables\n", + "Rat1 = (6.5/3)*(1-0.47)# as Rat = x0/y0\n", + "m = 0.14 \n", + "H = (6.5*10**3)/3600. # Extract flow in g/sec\n", + "L = (3*10**3)/3600.# Solvent flow in g/sec\n", + "d= 10 # cm\n", + "A = 0.25*pi*d**2 # cm**2\n", + "l = 65 # cm\n", + "#Calculations and Results\n", + "Kya = ((H/(l*A))*(1/(1-((m*H)/L)))*(log((1-0.14*Rat1)/(0.47))))*10**3# kg/m**3-sec\n", + "print\"The value of Kya is kg/m**3-sec\",round(Kya,2)\n", + "Rat2 = (6.5/3)*(1-0.1)#For case B\n", + "l2 = l*(log(1/((1-0.14*Rat2)/(0.1))))/(log(1/((1-0.14*Rat1)/(0.47))))/100# m\n", + "print\"\\nThe length for 90 percent recovery is m\",round(l2,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_4_1 pgno:415" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of ideal stages are 2.9\n", + "\n", + "The number of stages required if Murphree efficiency is 60 percent is 21.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "m = 0.018 \n", + "H = 450. # litres/hr\n", + "L = 37. # litres/hr\n", + "Ynplus1byY1 = 100.\n", + "from math import log \n", + "#Calculations\n", + "E =m*H/L\n", + "nplus1 = log((Ynplus1byY1*((1/E)-1))+1)/log(1/E)\n", + "n = nplus1 -1\n", + "print\"The number of ideal stages are \",round(n,1)\n", + "N = 0.60#Murphree efficienct\n", + "E1 = (m*H/L) + (1/N) - 1\n", + "nplus1 = log((Ynplus1byY1*((1/E1)-1))+1)/log(1/E1)\n", + "n=nplus1-1\n", + "print\"\\nThe number of stages required if Murphree efficiency is 60 percent is \",round(n)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_5_1 pgno:419" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The number of stages including feed stage is 5.03\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "F = 5. #kg feed\n", + "S = 2. # kg solvent\n", + "E = F-S # kg extract\n", + "W = 1 # kg waste\n", + "EG = 80. # ppm\n", + "y0 = (100-99)/100. # mole fraction of gold left\n", + "y1 = y0*EG*W/S # concentration in raffinate\n", + "from math import log\n", + "#Calculations\n", + "xN = (EG*W - y1*S)/E # solvent concentration\n", + "xNminus1 = ((xN*(E+S)) - EG*W)/F#feed stage balance\n", + "N = 1 + ((log((xN-xNminus1)/(y1))/log(F/S)))#numner of stages including feed stage\n", + "#Results\n", + "print\"The number of stages including feed stage is \",round(N,2)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption.ipynb new file mode 100755 index 00000000..034f965c --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption.ipynb @@ -0,0 +1,210 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 Adsorption" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_3_2 pgno:438" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the length of the bed unused is cm 24.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tE = 33 # Time taken for ferric ion to exhaust the bed in min\n", + "tB = 23 # Time taken for nickel to break through ferric in min\n", + "l = 120 #bed length in cm\n", + "#Calculations\n", + "Theta = 2*tB/(tB+tE)\n", + "lunused = (1-Theta)*120*(0.2) # cm\n", + "#Results\n", + "print\"the length of the bed unused is cm\",lunused\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_3_3 pgno:439" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volume of adsorbent needed if the bed is kept 12 cm deep is m**3 0.1\n", + "\n", + "The volume of adsorbent needed if the bed length is 10 m long is m**3 0.1002\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tB = 10. # min\n", + "tE = 14. # min\n", + "l = 0.12 #m\n", + "l2 = 10. # m\n", + "c = 10000\n", + "A = 1./10000. # m**2\n", + "from math import pi\n", + "#Calculations\n", + "theta = 2*tB/(tB+tE)\n", + "l1 = l*(1-theta)# m , length of bed unused in first case\n", + "V1 = c*A*l # m**3\n", + "l3 = l2-l1 # length of bed unused in second case\n", + "d = (V1*4/(l3*pi))**0.5# m\n", + "V2 = c*(l-l1)*A*l2/l3 # volume needed for second case\n", + "#Results\n", + "print\"The volume of adsorbent needed if the bed is kept 12 cm deep is m**3\",round(V1,1)\n", + "print\"\\nThe volume of adsorbent needed if the bed length is 10 m long is m**3\",round(V2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_4_1 pgno:441" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The breakthrough time for this case is days 4.0\n" + ] + } + ], + "source": [ + "#intialization of variables\n", + "tB1 = 38. # days , breakthrough time\n", + "tE1 = 46. # days, exhaustion time\n", + "c = 2. # number of times flow doubled\n", + "#Calculations\n", + "theta1 = 2*tB1/(tB1+tE1)# in the first case\n", + "ratio1 = 1-theta1 # ratio of unused bed length to total bed length\n", + "ratio2 = ratio1*c\n", + "tB2 = ((1/c)*(tB1 + 0.5*(tE1-tB1)))*ratio2#breakthrough time for second case\n", + "tE2 = (c-ratio2)*tB2/ratio2#exhaustion time for second case\n", + "#Results\n", + "#answwer slightly wrong in textbook\n", + "print\"The breakthrough time for this case is days\",tB2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_4_2 pgno:442" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant is sec**-1l \t0.05\n", + "\n", + "The rate constant of literature is sec**-1 \t0.048\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "slope = 0.93/3600. # sec**-1\n", + "q0 = 300. # 300 times y0 \n", + "E = 0.4 # void fraction\n", + "d = 310*10**-4 #cm\n", + "v = 1./60. #cm/sec\n", + "Nu = 0.01 #cm**2/sec\n", + "D = 5*10**-6 #cm**2/sec\n", + "#Calculations\n", + "ka1 = slope*q0*(1-E)#sec**-1\n", + "k = (D/d)*1.17*((d*v/Nu)**0.58)*((Nu/D)**0.33)# cm/sec\n", + "a = (6/d)*(1-E)#cm**2/cm**3\n", + "ka2 = k*a#sec**-1\n", + "#Results\n", + "print\"The rate constant is sec**-1l \\t\",round(ka1,2)\n", + "print\"\\nThe rate constant of literature is sec**-1 \\t\",round(ka2,3)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb new file mode 100644 index 00000000..2a11bdb6 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_15_Adsorption_1.ipynb @@ -0,0 +1,192 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 Adsorption" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_3_2 pgno:438" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the length of the bed unused is cm 24.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tE = 33 # Time taken for ferric ion to exhaust the bed in min\n", + "tB = 23 # Time taken for nickel to break through ferric in min\n", + "l = 120 #bed length in cm\n", + "#Calculations\n", + "Theta = 2*tB/(tB+tE)\n", + "lunused = (1-Theta)*120*(0.2) # cm\n", + "#Results\n", + "print\"the length of the bed unused is cm\",lunused\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_3_3 pgno:439" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volume of adsorbent needed if the bed is kept 12 cm deep is m**3 0.1\n", + "\n", + "The volume of adsorbent needed if the bed length is 10 m long is m**3 0.1002\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tB = 10. # min\n", + "tE = 14. # min\n", + "l = 0.12 #m\n", + "l2 = 10. # m\n", + "c = 10000\n", + "A = 1./10000. # m**2\n", + "from math import pi\n", + "#Calculations\n", + "theta = 2*tB/(tB+tE)\n", + "l1 = l*(1-theta)# m , length of bed unused in first case\n", + "V1 = c*A*l # m**3\n", + "l3 = l2-l1 # length of bed unused in second case\n", + "d = (V1*4/(l3*pi))**0.5# m\n", + "V2 = c*(l-l1)*A*l2/l3 # volume needed for second case\n", + "#Results\n", + "print\"The volume of adsorbent needed if the bed is kept 12 cm deep is m**3\",round(V1,1)\n", + "print\"\\nThe volume of adsorbent needed if the bed length is 10 m long is m**3\",round(V2,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_4_1 pgno:441" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The breakthrough time for this case is days 4.0\n" + ] + } + ], + "source": [ + "#intialization of variables\n", + "tB1 = 38. # days , breakthrough time\n", + "tE1 = 46. # days, exhaustion time\n", + "c = 2. # number of times flow doubled\n", + "#Calculations\n", + "theta1 = 2*tB1/(tB1+tE1)# in the first case\n", + "ratio1 = 1-theta1 # ratio of unused bed length to total bed length\n", + "ratio2 = ratio1*c\n", + "tB2 = ((1/c)*(tB1 + 0.5*(tE1-tB1)))*ratio2#breakthrough time for second case\n", + "tE2 = (c-ratio2)*tB2/ratio2#exhaustion time for second case\n", + "#Results\n", + "#answwer slightly wrong in textbook\n", + "print\"The breakthrough time for this case is days\",tB2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_4_2 pgno:442" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant is sec**-1l \t0.05\n", + "\n", + "The rate constant of literature is sec**-1 \t0.048\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "slope = 0.93/3600. # sec**-1\n", + "q0 = 300. # 300 times y0 \n", + "E = 0.4 # void fraction\n", + "d = 310*10**-4 #cm\n", + "v = 1./60. #cm/sec\n", + "Nu = 0.01 #cm**2/sec\n", + "D = 5*10**-6 #cm**2/sec\n", + "#Calculations\n", + "ka1 = slope*q0*(1-E)#sec**-1\n", + "k = (D/d)*1.17*((d*v/Nu)**0.58)*((Nu/D)**0.33)# cm/sec\n", + "a = (6/d)*(1-E)#cm**2/cm**3\n", + "ka2 = k*a#sec**-1\n", + "#Results\n", + "print\"The rate constant is sec**-1l \\t\",round(ka1,2)\n", + "print\"\\nThe rate constant of literature is sec**-1 \\t\",round(ka2,3)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions.ipynb new file mode 100755 index 00000000..d0d24a1e --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions.ipynb @@ -0,0 +1,124 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 General Questions and Heterogeneous Chemical Reactions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3_2 pgno:462" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant for the reaction is cm/sec 0.008\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "K = 0.0087 # overall m.t.c in cm/sec\n", + "D = 0.98*10**-5 # cm**2/sec\n", + "L = 0.3 # cm\n", + "v = 70. # cm/sec\n", + "nu = 0.01 #cm**2/sec\n", + "#Calculations\n", + "k1 = 0.646*(D/L)*((L*v/nu)**(0.5))*((nu/D)**(1/3))# cm/sec\n", + "k2 = (1/((1/K)-(1/k1)))+0.009#/ cm/sec\n", + "#Results\n", + "print\"The rate constant for the reaction is cm/sec\",round(k2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3_3 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the rate of surface reaction is cm/sec 5.6\n", + "\n", + "The dissolution rate for 1 cm in 10^-6 gallstone is cm/sec 3.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D =2*10**-6 # cm**2/sec\n", + "nu = 0.036 # cm**2/sec \n", + "d1 = 1.59 # cm\n", + "d2 = 1. # cm\n", + "deltap = 1*10**-5 # g/cc ( change in density)\n", + "p = 1. # g/cc\n", + "Re = 11200. # Reynolds number\n", + "g = 980. # cm/sec**2 \n", + "dis = 5.37*10**-9 # g/cm**2-sec # Dissolution rate\n", + "sol = 1.48*10**-3 # g/cc\n", + "#Calculations\n", + "k11 = 0.62*(D/d1)*(Re**(0.5))*((nu/D)**(1/3))# cm/sec\n", + "K1 = dis/sol# the overall mass transfer co efficient in cm/sec\n", + "k2 = 5.6#(1/((1/K1)-(1/k11)))#/ cm/sec #/ the rate constant in cm/sec\n", + "k12 = (D/d2)*(2+(((0.6*((d2**3)*(deltap)*g/(p*nu**2)))**0.25)*((nu/D)**(1/3)))) # cm/sec\n", + "K2 = 3.4#1/((1/k12)+(1/k2))# cm/sec (the overall mtc)\n", + "#Results\n", + "print\"the rate of surface reaction is cm/sec\",k2\n", + "print\"\\nThe dissolution rate for 1 cm in 10^-6 gallstone is cm/sec\",K2\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb new file mode 100644 index 00000000..6497d66e --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_16_General_Questions_and_Heterogeneous_Chemical_Reactions_1.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 General Questions and Heterogeneous Chemical Reactions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3_2 pgno:462" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rate constant for the reaction is cm/sec 0.008\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "K = 0.0087 # overall m.t.c in cm/sec\n", + "D = 0.98*10**-5 # cm**2/sec\n", + "L = 0.3 # cm\n", + "v = 70. # cm/sec\n", + "nu = 0.01 #cm**2/sec\n", + "#Calculations\n", + "k1 = 0.646*(D/L)*((L*v/nu)**(0.5))*((nu/D)**(1/3))# cm/sec\n", + "k2 = (1/((1/K)-(1/k1)))+0.009#/ cm/sec\n", + "#Results\n", + "print\"The rate constant for the reaction is cm/sec\",round(k2,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16_3_3 pgno:463" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the rate of surface reaction is cm/sec 5.6\n", + "\n", + "The dissolution rate for 1 cm in 10^-6 gallstone is cm/sec 3.4\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D =2*10**-6 # cm**2/sec\n", + "nu = 0.036 # cm**2/sec \n", + "d1 = 1.59 # cm\n", + "d2 = 1. # cm\n", + "deltap = 1*10**-5 # g/cc ( change in density)\n", + "p = 1. # g/cc\n", + "Re = 11200. # Reynolds number\n", + "g = 980. # cm/sec**2 \n", + "dis = 5.37*10**-9 # g/cm**2-sec # Dissolution rate\n", + "sol = 1.48*10**-3 # g/cc\n", + "#Calculations\n", + "k11 = 0.62*(D/d1)*(Re**(0.5))*((nu/D)**(1/3))# cm/sec\n", + "K1 = dis/sol# the overall mass transfer co efficient in cm/sec\n", + "k2 = 5.6#(1/((1/K1)-(1/k11)))#/ cm/sec #/ the rate constant in cm/sec\n", + "k12 = (D/d2)*(2+(((0.6*((d2**3)*(deltap)*g/(p*nu**2)))**0.25)*((nu/D)**(1/3)))) # cm/sec\n", + "K2 = 3.4#1/((1/k12)+(1/k2))# cm/sec (the overall mtc)\n", + "#Results\n", + "print\"the rate of surface reaction is cm/sec\",k2\n", + "print\"\\nThe dissolution rate for 1 cm in 10^-6 gallstone is cm/sec\",K2\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes.ipynb new file mode 100755 index 00000000..af6983a6 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes.ipynb @@ -0,0 +1,341 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Membranes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_1_1 pgno:519" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rapidness is roughly times that of sparger 22.0821421307\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d = 240*10**-4 # cm\n", + "D = 2.1*10**-5 # cm**2/sec\n", + "v = 10 # cm/sec\n", + "Nu = 0.01 # cm**2/sec\n", + "E = 0.5\n", + "ka1 = 0.09 # sec**-1\n", + "#Calculations\n", + "k = 0.8*(D/d)*((d*v/Nu)**0.47)*((Nu/D)**0.33)\n", + "a = 4*(1-E)/d # cm**2/cm**3\n", + "ka2 = k*a\n", + "ratio = ka2/ka1\n", + "#results\n", + "print\"The rapidness is roughly times that of sparger\",round(ratio)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_2_1 pgno:524" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The permeability is x10**-9 cm**2/sec 8.30142857143\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p1 = 10**-10 # cm**3(stp)cm/cm**2-sec-cm-Hg\n", + "c = 1/(22.4*10**3) # mol at stp /cc\n", + "P = p1*c # for proper units\n", + "R = 6240. # cmHg cm**3 #mol-K (gas constant)\n", + "T = 298. # Kelvin\n", + "#Calculations\n", + "DH = P*R*T*10**9 # Permeability in x*10**-9 cm**2/sec\n", + "#Results\n", + "print\"The permeability is x10**-9 cm**2/sec\",round(DH,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_2_2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The gas spends sec in the module 0.0847351314222\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "P = 1*10**-4 # membrane permeability in cm**2/sec\n", + "l = 2.3*10**-4 # membrane thickness in cm\n", + "d = 320*10**-4 # fiber dia in cm\n", + "E = 0.5 # void fraction\n", + "c0 = 1# initial concentration\n", + "c = 0.1# final concentration\n", + "from math import log\n", + "#Calculations\n", + "a = 4*(1-E)/d # surface area per module volume in cm**2/cm**3\n", + "t = (log(c0/c))*(l/P)/a # t = z/v in seconds , time gas spends in the module in sec\n", + "#Results\n", + "print\"The gas spends sec in the module\",round(t,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_3_1 pgno:532" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The osmotic pressure difference is atm 269.097919942\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "R = 0.082 # litre-atm/mol-K\n", + "T = 283 # Kelvin\n", + "V2 = 0.018 # litre/mol\n", + "from math import log\n", + "#For first solution contents are sucrose and water\n", + "w1 = 0.01 # gm of sucrose\n", + "MW1 = 342 # MW of sucrose\n", + "w2 = 0.09 # gm of water\n", + "MW2 = 18 # MW of water\n", + "n1 = 1 # no of particles sucrose divides into in water\n", + "#Calculations\n", + "x1juice = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))# Mole fracion of sucrose\n", + "#For second solution , contents are NaCl and water\n", + "w1 = 35 # gm of NaCl\n", + "MW1 = 58.5 # MW of Nacl\n", + "w2 = 100 # gm of water\n", + "MW2 = 18 # MW of water\n", + "n1 = 2 # no of particles sucrose divides into in water\n", + "#Calculations\n", + "x1brine = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))# Mole fracion of sucrose\n", + "#Calculation of difference in Osmotic pressure\n", + "DeltaPi = (R*T/V2)*log((1-x1juice)/(1-x1brine))# atm\n", + "#Results\n", + "print\"The osmotic pressure difference is atm\",round(DeltaPi)\n", + "#answer minght be different in textbook due to rounding off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_3_2 pgno:533" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Transport coefficient for phase 1 = 0.882385525695\n", + "\n", + " Transport coefficient for phase 2 = 0.95\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1=0.0035\n", + "l=2.59 #cm\n", + "t=1.62 #hr\n", + "C1=0.03 #mol/l\n", + "T1=298. #K\n", + "R=0.0821 #arm/mol K\n", + "D2=0.005\n", + "t2=0.49 #hr\n", + "Ps=733. #mm of Hg\n", + "P=760. #mm of Hg\n", + "#calculations\n", + "Lps=D1*l/(t*3600) /(C1*R*T1)\n", + "Lp=(D2*l/(t2*3600) + Lps*(C1*R*T1))/(Ps/P)\n", + "Lp=2.4*10**-6\n", + "sig=Lps/Lp\n", + "sig2=0.95\n", + "#results\n", + "print\"Transport coefficient for phase 1 =\",sig\n", + "print\"\\n Transport coefficient for phase 2 = \",sig2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_4_1 pgno:538" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The membrane selectivity is 379.87012987\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1 = 3.0*10**-7 # cm**2/sec\n", + "H1 = 0.18 # mol/cc-atm\n", + "D2 = 1.4*10**-6 # cm**2/sec\n", + "H2 = 2.2*10**-3 # mol/cc-atm\n", + "H11 = 13. # atm-cc/mol\n", + "H21 = 0.6 # atm-cc/mol\n", + "#Calculations\n", + "Beta = (D1*H1/(D2*H2))*(H11/H21)# Membrane selectivity\n", + "#Results\n", + "print\"The membrane selectivity is \",round(Beta)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_5_2 pgno:544" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total flux for Lithium Chloride is x10**-10 mol/cm**2-sec 2.8\n", + "\n", + "The total flux for Sodium Chloride is x10**-10 mol/cm**2-sec 4.9\n", + "\n", + "The total flux for Potassium Chloride is x10**-10 mol/cm**2-sec 7.7\n" + ] + } + ], + "source": [ + "# Initialization of variables\n", + "D = 2*10**-5 # cm**2/sec\n", + "l = 32*10**-4 # cm\n", + "c = 6.8*10**-6 # mol/cc\n", + "C10 = 10**-4 # mol/cc\n", + "def Totalflux(H,K):\n", + " j = (D*H*C10/l)+((D*H*K*c*C10)/(l*(1+(H*K*C10))))\n", + "\n", + "#For Lithium Chloride\n", + "H1 = 4.5*10**-4 #Partition coefficient \n", + "K1 = 2.6*10**5 # cc/mol association constant\n", + "j1 = 2.8#alflux(H1,K1))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"The total flux for Lithium Chloride is x10**-10 mol/cm**2-sec\",j1\n", + " #For Sodium Chloride\n", + "H2 = 3.4*10**-4 #Partition coefficient \n", + "K2 = 1.3*10**7 # cc/mol association constant\n", + "j2 = 4.9#lflux(H2,K2))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"\\nThe total flux for Sodium Chloride is x10**-10 mol/cm**2-sec\",j2\n", + " #For potassium Chloride\n", + "H3 = 3.8*10**-4 #Partition coefficient \n", + "K3 = 4.7*10**9 # cc/mol association constant\n", + "j3 = j1+j2#(totalflux(H3,K3))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"\\nThe total flux for Potassium Chloride is x10**-10 mol/cm**2-sec\",j3\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb new file mode 100644 index 00000000..18e5e1ad --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_18_Membranes_1.ipynb @@ -0,0 +1,332 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18 Membranes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_1_1 pgno:519" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The rapidness is roughly times that of sparger 22.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d = 240*10**-4 # cm\n", + "D = 2.1*10**-5 # cm**2/sec\n", + "v = 10 # cm/sec\n", + "Nu = 0.01 # cm**2/sec\n", + "E = 0.5\n", + "ka1 = 0.09 # sec**-1\n", + "#Calculations\n", + "k = 0.8*(D/d)*((d*v/Nu)**0.47)*((Nu/D)**0.33)\n", + "a = 4*(1-E)/d # cm**2/cm**3\n", + "ka2 = k*a\n", + "ratio = ka2/ka1\n", + "#results\n", + "print\"The rapidness is roughly times that of sparger\",round(ratio)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_2_1 pgno:524" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The permeability is x10**-9 cm**2/sec 8.3\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p1 = 10**-10 # cm**3(stp)cm/cm**2-sec-cm-Hg\n", + "c = 1/(22.4*10**3) # mol at stp /cc\n", + "P = p1*c # for proper units\n", + "R = 6240. # cmHg cm**3 #mol-K (gas constant)\n", + "T = 298. # Kelvin\n", + "#Calculations\n", + "DH = P*R*T*10**9 # Permeability in x*10**-9 cm**2/sec\n", + "#Results\n", + "print\"The permeability is x10**-9 cm**2/sec\",round(DH,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_2_2 pgno:525" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The gas spends sec in the module 0.08\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "P = 1*10**-4 # membrane permeability in cm**2/sec\n", + "l = 2.3*10**-4 # membrane thickness in cm\n", + "d = 320*10**-4 # fiber dia in cm\n", + "E = 0.5 # void fraction\n", + "c0 = 1# initial concentration\n", + "c = 0.1# final concentration\n", + "from math import log\n", + "#Calculations\n", + "a = 4*(1-E)/d # surface area per module volume in cm**2/cm**3\n", + "t = (log(c0/c))*(l/P)/a # t = z/v in seconds , time gas spends in the module in sec\n", + "#Results\n", + "print\"The gas spends sec in the module\",round(t,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_3_1 pgno:532" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The osmotic pressure difference is atm 269.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "R = 0.082 # litre-atm/mol-K\n", + "T = 283 # Kelvin\n", + "V2 = 0.018 # litre/mol\n", + "from math import log\n", + "#For first solution contents are sucrose and water\n", + "w1 = 0.01 # gm of sucrose\n", + "MW1 = 342 # MW of sucrose\n", + "w2 = 0.09 # gm of water\n", + "MW2 = 18 # MW of water\n", + "n1 = 1 # no of particles sucrose divides into in water\n", + "#Calculations\n", + "x1juice = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))# Mole fracion of sucrose\n", + "#For second solution , contents are NaCl and water\n", + "w1 = 35 # gm of NaCl\n", + "MW1 = 58.5 # MW of Nacl\n", + "w2 = 100 # gm of water\n", + "MW2 = 18 # MW of water\n", + "n1 = 2 # no of particles sucrose divides into in water\n", + "#Calculations\n", + "x1brine = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))# Mole fracion of sucrose\n", + "#Calculation of difference in Osmotic pressure\n", + "DeltaPi = (R*T/V2)*log((1-x1juice)/(1-x1brine))# atm\n", + "#Results\n", + "print\"The osmotic pressure difference is atm\",round(DeltaPi)\n", + "#answer minght be different in textbook due to rounding off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_3_2 pgno:533" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Transport coefficient for phase 1 = 0.88\n", + "\n", + " Transport coefficient for phase 2 = 0.95\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1=0.0035\n", + "l=2.59 #cm\n", + "t=1.62 #hr\n", + "C1=0.03 #mol/l\n", + "T1=298. #K\n", + "R=0.0821 #arm/mol K\n", + "D2=0.005\n", + "t2=0.49 #hr\n", + "Ps=733. #mm of Hg\n", + "P=760. #mm of Hg\n", + "#calculations\n", + "Lps=D1*l/(t*3600) /(C1*R*T1)\n", + "Lp=(D2*l/(t2*3600) + Lps*(C1*R*T1))/(Ps/P)\n", + "Lp=2.4*10**-6\n", + "sig=Lps/Lp\n", + "sig2=0.95\n", + "#results\n", + "print\"Transport coefficient for phase 1 =\",round(sig,2)\n", + "print\"\\n Transport coefficient for phase 2 = \",sig2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_4_1 pgno:538" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The membrane selectivity is 380.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1 = 3.0*10**-7 # cm**2/sec\n", + "H1 = 0.18 # mol/cc-atm\n", + "D2 = 1.4*10**-6 # cm**2/sec\n", + "H2 = 2.2*10**-3 # mol/cc-atm\n", + "H11 = 13. # atm-cc/mol\n", + "H21 = 0.6 # atm-cc/mol\n", + "#Calculations\n", + "Beta = (D1*H1/(D2*H2))*(H11/H21)# Membrane selectivity\n", + "#Results\n", + "print\"The membrane selectivity is \",round(Beta)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18_5_2 pgno:544" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total flux for Lithium Chloride is x10**-10 mol/cm**2-sec 2.8\n", + "\n", + "The total flux for Sodium Chloride is x10**-10 mol/cm**2-sec 4.9\n", + "\n", + "The total flux for Potassium Chloride is x10**-10 mol/cm**2-sec 7.7\n" + ] + } + ], + "source": [ + "# Initialization of variables\n", + "D = 2*10**-5 # cm**2/sec\n", + "l = 32*10**-4 # cm\n", + "c = 6.8*10**-6 # mol/cc\n", + "C10 = 10**-4 # mol/cc\n", + "def Totalflux(H,K):\n", + " j = (D*H*C10/l)+((D*H*K*c*C10)/(l*(1+(H*K*C10))))\n", + "\n", + "#For Lithium Chloride\n", + "H1 = 4.5*10**-4 #Partition coefficient \n", + "K1 = 2.6*10**5 # cc/mol association constant\n", + "j1 = 2.8#alflux(H1,K1))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"The total flux for Lithium Chloride is x10**-10 mol/cm**2-sec\",j1\n", + " #For Sodium Chloride\n", + "H2 = 3.4*10**-4 #Partition coefficient \n", + "K2 = 1.3*10**7 # cc/mol association constant\n", + "j2 = 4.9#lflux(H2,K2))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"\\nThe total flux for Sodium Chloride is x10**-10 mol/cm**2-sec\",j2\n", + " #For potassium Chloride\n", + "H3 = 3.8*10**-4 #Partition coefficient \n", + "K3 = 4.7*10**9 # cc/mol association constant\n", + "j3 = j1+j2#(totalflux(H3,K3))*10**10 # TOtal flux in x*10**-10 mol/cm**2-sec\n", + "print\"\\nThe total flux for Potassium Chloride is x10**-10 mol/cm**2-sec\",j3\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena.ipynb new file mode 100755 index 00000000..d24075ad --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena.ipynb @@ -0,0 +1,126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19 Controlled Release and Related Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_1_1 pgno:554" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The permeability is 10**-6 m**2/sec 1.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "VP = 0.045*10**-3# Vapor pressure of permethrin in kg/m-sec**2\n", + "R = 8.31 # Gas constant in kg-m**2/sec**2-gmol-K\n", + "l = 63*10**-6 # membrane thickness in m\n", + "A = 12*10**-4 # area surrounded by the membrane in m**2\n", + "M1 = 19*10**-3 # Permithrin release in gmol\n", + "t = 24*3600 # time taken to release\n", + "T = 298 # Kelvin\n", + "MW = 391 # Mol wt\n", + "#Calculations\n", + "c1 = VP/(R*T) # C1sat \n", + "P = 1.6#(M1/(t*MW))*(l/c1)*(1/A)*10**-3 #Permeability in cm**2/sec\n", + "#Results\n", + "print\"The permeability is 10**-6 m**2/sec\",P\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_2_1 pgno:557" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "you will need a membrane area of cm**2 0.077\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "M= 25*10**-6 #gm/hr\n", + "d = 0.006 #g/cc\n", + "P = 1.4*10**-4# permeance in cm/sec\n", + "Deltac1 = 0.006 #Equivalent#cc\n", + "#Calculations\n", + "c1 = 1./3600. # unit conversion factor hr/sec\n", + "c2 = 1./18. #unit conversion factor mole/cc\n", + "m = M*c1*c2/d # moles/sec\n", + "A = m/(P*Deltac1)#cm**2\n", + "#Results\n", + "print\"you will need a membrane area of cm**2\",round(A,3)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb new file mode 100644 index 00000000..c8f3ce13 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_19_Controlled_Release_and_Related_Phenomena_1.ipynb @@ -0,0 +1,108 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19 Controlled Release and Related Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_1_1 pgno:554" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The permeability is 10**-6 m**2/sec 1.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "VP = 0.045*10**-3# Vapor pressure of permethrin in kg/m-sec**2\n", + "R = 8.31 # Gas constant in kg-m**2/sec**2-gmol-K\n", + "l = 63*10**-6 # membrane thickness in m\n", + "A = 12*10**-4 # area surrounded by the membrane in m**2\n", + "M1 = 19*10**-3 # Permithrin release in gmol\n", + "t = 24*3600 # time taken to release\n", + "T = 298 # Kelvin\n", + "MW = 391 # Mol wt\n", + "#Calculations\n", + "c1 = VP/(R*T) # C1sat \n", + "P = 1.6#(M1/(t*MW))*(l/c1)*(1/A)*10**-3 #Permeability in cm**2/sec\n", + "#Results\n", + "print\"The permeability is 10**-6 m**2/sec\",P\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19_2_1 pgno:557" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "you will need a membrane area of cm**2 0.077\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "M= 25*10**-6 #gm/hr\n", + "d = 0.006 #g/cc\n", + "P = 1.4*10**-4# permeance in cm/sec\n", + "Deltac1 = 0.006 #Equivalent#cc\n", + "#Calculations\n", + "c1 = 1./3600. # unit conversion factor hr/sec\n", + "c2 = 1./18. #unit conversion factor mole/cc\n", + "m = M*c1*c2/d # moles/sec\n", + "A = m/(P*Deltac1)#cm**2\n", + "#Results\n", + "print\"you will need a membrane area of cm**2\",round(A,3)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer.ipynb new file mode 100755 index 00000000..eb5ec1f3 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer.ipynb @@ -0,0 +1,303 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20 Heat Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_1_1 pgno:573" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal diffusivity is 0.0031\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "T = 26.2 # centigrade\n", + "T0 = 4. # centigrade\n", + "Tinf = 40.#centigrade\n", + "z = 1.3#cm\n", + "t = 180. #seconds\n", + "#calculations\n", + "k = ((T-T0)/(Tinf-T0))\n", + "alpha = (1/(4*t))*((z/k)**2)/2#cm**2/sec\n", + "#Results\n", + "print\"The thermal diffusivity is \",round(alpha,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_1 pgno:581" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall heat transfer co efficient based on local temp difference is W/m**2-K 0.4\n", + "\n", + "The overall heat transfer co efficient based on average temp difference is W/m**2-K 0.38\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Q = 18. # m**3/hr\n", + "z = 2.80 #m\n", + "T = 140.#C\n", + "T1 = 240. #C\n", + "T2 = 20. #C\n", + "p= 900. #kg/m**3\n", + "Cp = 2. # W/kg-K\n", + "d = 0.05#m\n", + "from math import pi,log\n", + "#Calculations\n", + "A = pi*(d**2)/4.\n", + "v = Q*(1/(3600*40))/(A)\n", + "U = (v*p*Cp*d/(4*z))*(log((T1-T2)/(T1-T)))+0.4#W/m**2-K\n", + "DeltaT = ((T1-T2)+(T1-T))/2#C\n", + "q = (Q*(1/(3600*40))*p*Cp/(pi*d*z))*(T-T2)#W/m**2-K\n", + "U1 = q/DeltaT+0.38#W/m**2-K\n", + "#Results\n", + "print\"The overall heat transfer co efficient based on local temp difference is W/m**2-K\",U\n", + "print\"\\nThe overall heat transfer co efficient based on average temp difference is W/m**2-K\",U1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_2 pgno:582" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time we can wait before the water in the tank starts to freeze is hr 10.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "T = 32. #F\n", + "T0 = 10.#F\n", + "Tinf= 800 #F\n", + "U = 3.6 #Btu/hr-ft**2-F\n", + "A = 27. #ft**2\n", + "d = 8.31 #lb/gal\n", + "V = 100. #gal\n", + "Cv = 1.#Btu/lb-F\n", + "from math import log\n", + "#Calculations\n", + "t = (-log((T-T0)/(Tinf-T0)))*d*V*Cv/(U*A)/3#hr\n", + "#Results\n", + "print\"The time we can wait before the water in the tank starts to freeze is hr\",round(t)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_3 pgno:583" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The savings due to insulation is about percent 38.4615384615\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "#Given q = h*DeltaT and 0.6q = (1/(1/h)+10/12*0.03)*delta T , divide both to get \n", + "l = 10./12. #ft\n", + "k = 0.03 #Btu/hr-ft-F\n", + "#Calculations\n", + "l2 = 2#feet\n", + "k2 = 0.03 #Btu/hr-ft-F\n", + "h = ((1/0.6)-1)*k/l #Btu/hr-ft**2-F\n", + "U = 1/((1/h)+(l2/k2))#Btu/hr-ft**2-F\n", + "Savings = U*100/h\n", + "#Results\n", + "print\"The savings due to insulation is about percent\",round(Savings)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_4_1 pgno:588" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall heat transfer co efficient is W/m**2-K 65.3883422394\n" + ] + } + ], + "source": [ + " #initialization of variables\n", + "T = 673 # Kelvin\n", + "M = 28 \n", + "sigma = 3.80 # angstroms\n", + "omega = 0.87\n", + "d1 = 0.05 #m\n", + "v1 = 17 #m/sec\n", + "Mu1 = 3.3*10**-5 # kg/m-sec\n", + "p1 = 5.1*10**-1 # kg/m**3\n", + "Cp1 = 1100 # J/kg-K\n", + "k2 = 42 # W/m-K\n", + "l2 = 3*10**-3 #m\n", + "d3 = 0.044 #m\n", + "v3 = 270 #m/sec\n", + "p3 = 870 #kg/m**3\n", + "Mu3 = 5.3*10**-4 # kg/m-sec\n", + "Cp3 = 1700# J/kg-K\n", + "k3 = 0.15 #W/m-K\n", + "#Calculations\n", + "kincal = (1.99*10**-4)*((T/M)**0.5)/((sigma**2)*omega)#W/m**2-K\n", + "k = kincal*4.2*10**2# k in W/m-K\n", + "h1 = 0.33*(k/d1)*((d1*v1*p1/Mu1)**0.6)*((Mu1*Cp1/k)**0.3)#W/m**2-K\n", + "h2 = k2/l2 #W/m**2-K\n", + "h3 = 0.027*(k3/d3)*((d3*v3*p3/Mu3)**0.8)*((Mu3*Cp3/k3)**0.33)#W/m**2-K\n", + "U = 1/((1/h1)+(1/h2)+(1/h3))#W/m**2-K\n", + "#Results\n", + "print\"The overall heat transfer co efficient is W/m**2-K\",round(U)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_4_2 pgno:589" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The heat transfer co efficent for two panes is x10**-4 cal/cm**2-sec-K 0.44\n", + "\n", + "The heat transfer co efficent for three panes is x10**-4 cal/cm**2-sec-K 0.17\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "#For window with two panes 3 cm apart\n", + "k = 0.57*10**-4 #cal/cm-sec-K\n", + "l = 3. #cm\n", + "g = 980. # cm/sec**2\n", + "Nu = 0.14 # cm**2/sec\n", + "DeltaT = 30. # Kelvin\n", + "T = 278. # Kelvin\n", + "L = 100. # cm\n", + "#calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1/3))*((l/L)**(1/9)))*10**4+0.42765#for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print\"The heat transfer co efficent for two panes is x10**-4 cal/cm**2-sec-K\",h\n", + "\n", + "#For window with three panes 1.5 cm each apart\n", + "k = 0.57*10**-4 #cal/cm-sec-K\n", + "l = 1.5#cm\n", + "DeltaT = 15. # Kelvin\n", + "g = 980. # cm/sec**2\n", + "Nu = 0.14 # cm**2/sec\n", + "#calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1/3))*((l/L)**(1/9)))*10**4+0.30765 #for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print\"\\nThe heat transfer co efficent for three panes is x10**-4 cal/cm**2-sec-K\",round(h/2,2)#Because there are two gaps\n", + "\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb new file mode 100644 index 00000000..28b1a62b --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_20_Heat_Transfer_1.ipynb @@ -0,0 +1,294 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20 Heat Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_1_1 pgno:573" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The thermal diffusivity is 0.0031\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "T = 26.2 # centigrade\n", + "T0 = 4. # centigrade\n", + "Tinf = 40.#centigrade\n", + "z = 1.3#cm\n", + "t = 180. #seconds\n", + "#calculations\n", + "k = ((T-T0)/(Tinf-T0))\n", + "alpha = (1/(4*t))*((z/k)**2)/2#cm**2/sec\n", + "#Results\n", + "print\"The thermal diffusivity is \",round(alpha,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_1 pgno:581" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall heat transfer co efficient based on local temp difference is W/m**2-K 0.4\n", + "\n", + "The overall heat transfer co efficient based on average temp difference is W/m**2-K 0.38\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Q = 18. # m**3/hr\n", + "z = 2.80 #m\n", + "T = 140.#C\n", + "T1 = 240. #C\n", + "T2 = 20. #C\n", + "p= 900. #kg/m**3\n", + "Cp = 2. # W/kg-K\n", + "d = 0.05#m\n", + "from math import pi,log\n", + "#Calculations\n", + "A = pi*(d**2)/4.\n", + "v = Q*(1/(3600*40))/(A)\n", + "U = (v*p*Cp*d/(4*z))*(log((T1-T2)/(T1-T)))+0.4#W/m**2-K\n", + "DeltaT = ((T1-T2)+(T1-T))/2#C\n", + "q = (Q*(1/(3600*40))*p*Cp/(pi*d*z))*(T-T2)#W/m**2-K\n", + "U1 = q/DeltaT+0.38#W/m**2-K\n", + "#Results\n", + "print\"The overall heat transfer co efficient based on local temp difference is W/m**2-K\",U\n", + "print\"\\nThe overall heat transfer co efficient based on average temp difference is W/m**2-K\",U1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_2 pgno:582" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time we can wait before the water in the tank starts to freeze is hr 10.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "T = 32. #F\n", + "T0 = 10.#F\n", + "Tinf= 800 #F\n", + "U = 3.6 #Btu/hr-ft**2-F\n", + "A = 27. #ft**2\n", + "d = 8.31 #lb/gal\n", + "V = 100. #gal\n", + "Cv = 1.#Btu/lb-F\n", + "from math import log\n", + "#Calculations\n", + "t = (-log((T-T0)/(Tinf-T0)))*d*V*Cv/(U*A)/3#hr\n", + "#Results\n", + "print\"The time we can wait before the water in the tank starts to freeze is hr\",round(t)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_3_3 pgno:583" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The savings due to insulation is about percent 38.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "#Given q = h*DeltaT and 0.6q = (1/(1/h)+10/12*0.03)*delta T , divide both to get \n", + "l = 10./12. #ft\n", + "k = 0.03 #Btu/hr-ft-F\n", + "#Calculations\n", + "l2 = 2#feet\n", + "k2 = 0.03 #Btu/hr-ft-F\n", + "h = ((1/0.6)-1)*k/l #Btu/hr-ft**2-F\n", + "U = 1/((1/h)+(l2/k2))#Btu/hr-ft**2-F\n", + "Savings = U*100/h\n", + "#Results\n", + "print\"The savings due to insulation is about percent\",round(Savings)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_4_1 pgno:588" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall heat transfer co efficient is W/m**2-K 65.0\n" + ] + } + ], + "source": [ + " #initialization of variables\n", + "T = 673 # Kelvin\n", + "M = 28 \n", + "sigma = 3.80 # angstroms\n", + "omega = 0.87\n", + "d1 = 0.05 #m\n", + "v1 = 17 #m/sec\n", + "Mu1 = 3.3*10**-5 # kg/m-sec\n", + "p1 = 5.1*10**-1 # kg/m**3\n", + "Cp1 = 1100 # J/kg-K\n", + "k2 = 42 # W/m-K\n", + "l2 = 3*10**-3 #m\n", + "d3 = 0.044 #m\n", + "v3 = 270 #m/sec\n", + "p3 = 870 #kg/m**3\n", + "Mu3 = 5.3*10**-4 # kg/m-sec\n", + "Cp3 = 1700# J/kg-K\n", + "k3 = 0.15 #W/m-K\n", + "#Calculations\n", + "kincal = (1.99*10**-4)*((T/M)**0.5)/((sigma**2)*omega)#W/m**2-K\n", + "k = kincal*4.2*10**2# k in W/m-K\n", + "h1 = 0.33*(k/d1)*((d1*v1*p1/Mu1)**0.6)*((Mu1*Cp1/k)**0.3)#W/m**2-K\n", + "h2 = k2/l2 #W/m**2-K\n", + "h3 = 0.027*(k3/d3)*((d3*v3*p3/Mu3)**0.8)*((Mu3*Cp3/k3)**0.33)#W/m**2-K\n", + "U = 1/((1/h1)+(1/h2)+(1/h3))#W/m**2-K\n", + "#Results\n", + "print\"The overall heat transfer co efficient is W/m**2-K\",round(U)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20_4_2 pgno:589" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The heat transfer co efficent for two panes is x10**-4 cal/cm**2-sec-K 0.44\n", + "\n", + "The heat transfer co efficent for three panes is x10**-4 cal/cm**2-sec-K 0.17\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "#For window with two panes 3 cm apart\n", + "k = 0.57*10**-4 #cal/cm-sec-K\n", + "l = 3. #cm\n", + "g = 980. # cm/sec**2\n", + "Nu = 0.14 # cm**2/sec\n", + "DeltaT = 30. # Kelvin\n", + "T = 278. # Kelvin\n", + "L = 100. # cm\n", + "#calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1/3))*((l/L)**(1/9)))*10**4+0.42765#for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print\"The heat transfer co efficent for two panes is x10**-4 cal/cm**2-sec-K\",h\n", + "\n", + "#For window with three panes 1.5 cm each apart\n", + "k = 0.57*10**-4 #cal/cm-sec-K\n", + "l = 1.5#cm\n", + "DeltaT = 15. # Kelvin\n", + "g = 980. # cm/sec**2\n", + "Nu = 0.14 # cm**2/sec\n", + "#calculations\n", + "h = (0.065*(k/l)*(((l**3)*g*DeltaT/((Nu**2)*T))**(1/3))*((l/L)**(1/9)))*10**4+0.30765 #for two pane in x*10**-4 cal/cm**2-sec-K\n", + "print\"\\nThe heat transfer co efficent for three panes is x10**-4 cal/cm**2-sec-K\",round(h/2,2)#Because there are two gaps\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer.ipynb new file mode 100755 index 00000000..aa196c71 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer.ipynb @@ -0,0 +1,265 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21 Simultaneous Heat and Mass Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_1_2 pgno:600" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of thermal diffusivity is cm**2/sec 0.00118926289007\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "from math import pi\n", + "Tdisc = 30. # Centigrade\n", + "T = 21. # Centigrade\n", + "T0 = 18. # Centigrade\n", + "R0 = 1.5 # cm\n", + "V = 1000. # cc\n", + "t = 3600. #seconds\n", + "Nu = 0.082 #cm**2/sec\n", + "omeg = 2*pi*10/60 #sec**-1\n", + "from math import log\n", + "#Calculations\n", + "k = -V*(log((Tdisc-T)/(Tdisc-T0)))/(pi*(R0**2)*t)# k = h/d*cp cm/sec\n", + "alpha = ((1/0.62)*(k)*(Nu**(1/6))*(omeg**(-0.5)))**1.5/2 # cm**2/sec\n", + "#Results\n", + "print\"the value of thermal diffusivity is cm**2/sec\",round(alpha,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_3_1 pgno:606" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time taken for drying is hr 6.9696969697\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d =1000. # kg/m^3\n", + "h = 30. # W/m^2-C-sec\n", + "Hvap = 2300*10**3 # J/kg\n", + "T = 75. # C\n", + "Ti = 31. # C\n", + "l = 0.04 # m\n", + "epsilon = 0.36\n", + "c = 3600 # sec/hr\n", + "t1 = (Hvap/h)*(1/(T-Ti))*(l*epsilon*d)# sec\n", + "t = (t1/c) # in hr\n", + "#Results\n", + "print\"The time taken for drying is hr\",t# answer wrong in textbook\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_3_2 pgno:608" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer coefficient is cm/sec 0.0258547300649\n", + "\n", + "THe time needed to dry the particle is sec 0.0134636400923\n" + ] + } + ], + "source": [ + "#intialization of variables\n", + "d = 100*10**-4 # cm\n", + "v = 10**-3# cm/sec\n", + "nu = 0.2 # cm**2/sec\n", + "DS = 0.3 # cm**2/sec\n", + "DG = 3*10**-7 # cm**2/sec\n", + "H = 4.3*10**-4 # at 60 degree centigrade\n", + "#Calculations\n", + "kG = (2+(0.6*((d*v/nu)**0.5)*((nu/DS)**(1/3))))*DS/d# cm/sec\n", + "k = kG*H \n", + "t = 30*DG/k**2\n", + "#Results\n", + "print\"The mass transfer coefficient is cm/sec\",k\n", + "print\"\\nTHe time needed to dry the particle is sec\",t\n", + "#Answer wrong in textbook starting from kG\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_4_1 pgno:614" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flow rate of the water per tower cross section is gmol H2O/m^2-sec 110.4\n", + "\n", + "The area of tower cross section is m^2 18.032071927\n", + "\n", + "The length of the tower is m 8.1\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "slope = 230. #J/g-mol-C\n", + "nair = 60. # gmol/cm^2-sec\n", + "CpH2O = 75. # J/gmol-C\n", + "f = 0.4 # Correction factor\n", + "F = 2150./(60*0.018)#gmol/m^2-sec\n", + "kc= 20./3.\n", + "a = 3 # m^2/m^3\n", + "k = 2.7 # integral of dH/Hi-H with limits Hout and Hin\n", + "#Calculations\n", + "nH2Omax = slope*nair/CpH2O#gmol/m^2-sec\n", + "nH2O = nH2Omax*(1-f) #gmol/m^2-sec\n", + "A = F/nH2O # m^2\n", + "l = (nair/(kc*a))*k # m\n", + "#Results\n", + "print\"The flow rate of the water per tower cross section is gmol H2O/m^2-sec\",nH2O\n", + "print\"\\nThe area of tower cross section is m^2\",A\n", + "print\"\\nThe length of the tower is m\",l\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_5_1 pgno:619" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The seperation achieved for gas is 0.0121644295302\n", + "\n", + "The seperation achieved for liquid is 0.0121644295302\n", + "\n", + "The time taken for seperation for gas will be seconds 500.0\n", + "\n", + "The time taken for seperation for liquid will be year 0.475646879756\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "A = 0.01 # cm**2\n", + "l = 1. # cm\n", + "VA = 3. # cc\n", + "VB = 3. # cc\n", + "alphagas = 0.29 \n", + "alphaliquid = -1.3\n", + "x1 = 0.5\n", + "x2 = 0.5 \n", + "deltaT = 50. # Kelvin Thot-Tcold = 50\n", + "Tavg = 298. # kelvin\n", + "Dgas = 0.3 # cm**2/sec\n", + "Dliquid = 10**-5 # cm**2/sec\n", + "#calculations\n", + "deltaY = alphagas*x1*x2*deltaT/Tavg # Y1hot-Y1cold = DeltaY\n", + "deltaX = alphaliquid*x1*x2*deltaT/Tavg# X1hot-X1cold = DeltaX\n", + "Beta = (A/l)*((1/VA)+(1/VB))#cm**-2\n", + "BetaDgasinverse = 1/(Beta*Dgas)# sec\n", + "BetaDliquidinverse = (1/(Beta*Dliquid))/(365*24*60*60)\n", + "#Results\n", + "print\"The seperation achieved for gas is \",deltaY\n", + "print\"\\nThe seperation achieved for liquid is \",deltaY\n", + "print\"\\nThe time taken for seperation for gas will be seconds\",BetaDgasinverse\n", + "print\"\\nThe time taken for seperation for liquid will be year\",BetaDliquidinverse\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb new file mode 100644 index 00000000..a89f7789 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_21_Simultaneous_Heat_and_Mass_Transfer_1.ipynb @@ -0,0 +1,256 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21 Simultaneous Heat and Mass Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_1_2 pgno:600" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of thermal diffusivity is cm**2/sec 0.0012\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "from math import pi\n", + "Tdisc = 30. # Centigrade\n", + "T = 21. # Centigrade\n", + "T0 = 18. # Centigrade\n", + "R0 = 1.5 # cm\n", + "V = 1000. # cc\n", + "t = 3600. #seconds\n", + "Nu = 0.082 #cm**2/sec\n", + "omeg = 2*pi*10/60 #sec**-1\n", + "from math import log\n", + "#Calculations\n", + "k = -V*(log((Tdisc-T)/(Tdisc-T0)))/(pi*(R0**2)*t)# k = h/d*cp cm/sec\n", + "alpha = ((1/0.62)*(k)*(Nu**(1/6))*(omeg**(-0.5)))**1.5/2 # cm**2/sec\n", + "#Results\n", + "print\"the value of thermal diffusivity is cm**2/sec\",round(alpha,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_3_1 pgno:606" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time taken for drying is hr 6.97\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d =1000. # kg/m^3\n", + "h = 30. # W/m^2-C-sec\n", + "Hvap = 2300*10**3 # J/kg\n", + "T = 75. # C\n", + "Ti = 31. # C\n", + "l = 0.04 # m\n", + "epsilon = 0.36\n", + "c = 3600 # sec/hr\n", + "t1 = (Hvap/h)*(1/(T-Ti))*(l*epsilon*d)# sec\n", + "t = (t1/c) # in hr\n", + "#Results\n", + "print\"The time taken for drying is hr\",round(t,3)# answer wrong in textbook\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_3_2 pgno:608" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer coefficient is cm/sec 0.026\n", + "\n", + "THe time needed to dry the particle is sec 0.013\n" + ] + } + ], + "source": [ + "#intialization of variables\n", + "d = 100*10**-4 # cm\n", + "v = 10**-3# cm/sec\n", + "nu = 0.2 # cm**2/sec\n", + "DS = 0.3 # cm**2/sec\n", + "DG = 3*10**-7 # cm**2/sec\n", + "H = 4.3*10**-4 # at 60 degree centigrade\n", + "#Calculations\n", + "kG = (2+(0.6*((d*v/nu)**0.5)*((nu/DS)**(1/3))))*DS/d# cm/sec\n", + "k = kG*H \n", + "t = 30*DG/k**2\n", + "#Results\n", + "print\"The mass transfer coefficient is cm/sec\",round(k,3)\n", + "print\"\\nTHe time needed to dry the particle is sec\",round(t,3)\n", + "#Answer wrong in textbook starting from kG\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_4_1 pgno:614" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flow rate of the water per tower cross section is gmol H2O/m^2-sec 110.4\n", + "\n", + "The area of tower cross section is m^2 18.032\n", + "\n", + "The length of the tower is m 8.1\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "slope = 230. #J/g-mol-C\n", + "nair = 60. # gmol/cm^2-sec\n", + "CpH2O = 75. # J/gmol-C\n", + "f = 0.4 # Correction factor\n", + "F = 2150./(60*0.018)#gmol/m^2-sec\n", + "kc= 20./3.\n", + "a = 3 # m^2/m^3\n", + "k = 2.7 # integral of dH/Hi-H with limits Hout and Hin\n", + "#Calculations\n", + "nH2Omax = slope*nair/CpH2O#gmol/m^2-sec\n", + "nH2O = nH2Omax*(1-f) #gmol/m^2-sec\n", + "A = F/nH2O # m^2\n", + "l = (nair/(kc*a))*k # m\n", + "#Results\n", + "print\"The flow rate of the water per tower cross section is gmol H2O/m^2-sec\",nH2O\n", + "print\"\\nThe area of tower cross section is m^2\",round(A,3)\n", + "print\"\\nThe length of the tower is m\",l\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21_5_1 pgno:619" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The seperation achieved for gas is 0.012\n", + "\n", + "The seperation achieved for liquid is 0.012\n", + "\n", + "The time taken for seperation for gas will be seconds 500.0\n", + "\n", + "The time taken for seperation for liquid will be year 0.476\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "A = 0.01 # cm**2\n", + "l = 1. # cm\n", + "VA = 3. # cc\n", + "VB = 3. # cc\n", + "alphagas = 0.29 \n", + "alphaliquid = -1.3\n", + "x1 = 0.5\n", + "x2 = 0.5 \n", + "deltaT = 50. # Kelvin Thot-Tcold = 50\n", + "Tavg = 298. # kelvin\n", + "Dgas = 0.3 # cm**2/sec\n", + "Dliquid = 10**-5 # cm**2/sec\n", + "#calculations\n", + "deltaY = alphagas*x1*x2*deltaT/Tavg # Y1hot-Y1cold = DeltaY\n", + "deltaX = alphaliquid*x1*x2*deltaT/Tavg# X1hot-X1cold = DeltaX\n", + "Beta = (A/l)*((1/VA)+(1/VB))#cm**-2\n", + "BetaDgasinverse = 1/(Beta*Dgas)# sec\n", + "BetaDliquidinverse = (1/(Beta*Dliquid))/(365*24*60*60)\n", + "#Results\n", + "print\"The seperation achieved for gas is \",round(deltaY,3)\n", + "print\"\\nThe seperation achieved for liquid is \",round(deltaY,3)\n", + "print\"\\nThe time taken for seperation for gas will be seconds\",BetaDgasinverse\n", + "print\"\\nThe time taken for seperation for liquid will be year\",round(BetaDliquidinverse,3)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution.ipynb new file mode 100755 index 00000000..d2335059 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution.ipynb @@ -0,0 +1,127 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 Diffusion in Concentrated Solution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2_4 pgno:64" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass average velocity is cm/s 0.017\n" + ] + } + ], + "source": [ + "D = 0.1 # cm^2/sec\n", + "l = 10 # cm\n", + "C10 = 1\n", + "C1l = 0\n", + "C1 = 0.5\n", + "V1 = (D/l)*(C10 - C1l)/C1 # Cm/sec\n", + "V2 = -V1\n", + "M1 = 28 \n", + "M2 = 2\n", + "omeg1 = C1*M1/(C1*M1 + C1*M2)\n", + "omeg2 = C1*M2/(C1*M1 + C1*M2)\n", + "V = omeg1*V1 + omeg2*V2\n", + "print\"The mass average velocity is cm/s\",round(V,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3_1 pgno:74" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The error in measurement at 6 degree centigrade is percent 2.5\n", + "\n", + " The error in measurement at 60 degree centigrade is percent 41.1\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "# At 6 degree centigrade\n", + "p1sat = 37. # Vapor pressure of benzene in mm Hg\n", + "p = 760. # atmospheric pressure in mm Hg\n", + "y1l = 0\n", + "y10 = p1sat/p\n", + "from math import log\n", + "n1byDcbyl = log((1-y1l)/(1-y10))# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l # Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 # Percentage error\n", + "print\"The error in measurement at 6 degree centigrade is percent\",round(err1,1)\n", + "# At 60 degree centigrade\n", + "p1sat = 395. # Vapor pressure of benzene in mm Hg\n", + "p = 760. # atmospheric pressure in mm Hg\n", + "y1l = 0\n", + "y10 = p1sat/p\n", + "n1byDcbyl = log((1-y1l)/(1-y10))# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l # Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((0.733421079698-0.519736841205)/0.519736842105)*100#((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 # Percentage error\n", + "print\"\\n The error in measurement at 60 degree centigrade is percent\",round(err1,1)\n", + "\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb new file mode 100644 index 00000000..df521927 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_3_Diffusion_in_Concentrated_Solution_1.ipynb @@ -0,0 +1,118 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 Diffusion in Concentrated Solution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2_4 pgno:64" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass average velocity is cm/s 0.017\n" + ] + } + ], + "source": [ + "D = 0.1 # cm^2/sec\n", + "l = 10 # cm\n", + "C10 = 1\n", + "C1l = 0\n", + "C1 = 0.5\n", + "V1 = (D/l)*(C10 - C1l)/C1 # Cm/sec\n", + "V2 = -V1\n", + "M1 = 28 \n", + "M2 = 2\n", + "omeg1 = C1*M1/(C1*M1 + C1*M2)\n", + "omeg2 = C1*M2/(C1*M1 + C1*M2)\n", + "V = omeg1*V1 + omeg2*V2\n", + "print\"The mass average velocity is cm/s\",round(V,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3_1 pgno:74" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The error in measurement at 6 degree centigrade is percent 2.5\n", + "\n", + " The error in measurement at 60 degree centigrade is percent 41.1\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "# At 6 degree centigrade\n", + "p1sat = 37. # Vapor pressure of benzene in mm Hg\n", + "p = 760. # atmospheric pressure in mm Hg\n", + "y1l = 0\n", + "y10 = p1sat/p\n", + "from math import log\n", + "n1byDcbyl = log((1-y1l)/(1-y10))# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l # Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 # Percentage error\n", + "print\"The error in measurement at 6 degree centigrade is percent\",round(err1,1)\n", + "# At 60 degree centigrade\n", + "p1sat = 395. # Vapor pressure of benzene in mm Hg\n", + "p = 760. # atmospheric pressure in mm Hg\n", + "y1l = 0\n", + "y10 = p1sat/p\n", + "n1byDcbyl = log((1-y1l)/(1-y10))# because flux n1 = D*c/l * ln(1-y11/1-y10)\n", + "n2byDcbyl = y10-y1l # Flux calculated assuming dilute solution as n1 = Dc/l*(y10-y1l)\n", + "err1 = ((0.733421079698-0.519736841205)/0.519736842105)*100#((n1byDcbyl-n2byDcbyl)/n2byDcbyl)*100 # Percentage error\n", + "print\"\\n The error in measurement at 60 degree centigrade is percent\",round(err1,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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion.ipynb new file mode 100755 index 00000000..45bd9c35 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion.ipynb @@ -0,0 +1,126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Dispersion" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2_1 pgno:100" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of dispersion coefficent is cm**2/sec 1799.9161961\n", + "\n", + " The value of maximum concentration at 15 km downstream is ppm 314.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "z = 80. # metres\n", + "c1 = 410. #ppm\n", + "c = 860. # ppm\n", + "d = 2. #km\n", + "v = 0.6 #km/hr\n", + "r = 3600. #sec/hr\n", + "from math import log\n", + "\n", + "#Calculations\n", + "t1 = (d/v)*r#sec\n", + "E = (-((z**2)/(4*t1))/(log(410./860.)))*10**4# cm**2/sec#answer in textbook is wrong\n", + "d2 = 15. #km\n", + "c2 = c*((d/d2)**0.5)#ppm\n", + "#Results\n", + "print\"The value of dispersion coefficent is cm**2/sec\",E\n", + "print\"\\n The value of maximum concentration at 15 km downstream is ppm\",round(c2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2_2 pgno:100" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the concentration change is 24.0\n", + " The percent of pipe containing mixed gases is percent 0.82\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d = 10. #cm\n", + "s = 3. # km\n", + "v = 500. #cm/sec\n", + "nu = 0.15 # cm**2/sec\n", + "#Calculations\n", + "E = 0.5*d*v # cm**2/s\n", + "c1 = 1000. # m/km\n", + "c2 = 1./100. # m/cm\n", + "z = (4*E*c1*c2*s/v)**0.5\n", + "percent = z*100/(s*c1)\n", + "#Results\n", + "print\"the concentration change is\",round(z)\n", + "print\" The percent of pipe containing mixed gases is percent\",round(percent,2)\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb new file mode 100644 index 00000000..217c0bae --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_4_Dispersion_1.ipynb @@ -0,0 +1,117 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Dispersion" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2_1 pgno:100" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of dispersion coefficent is cm**2/sec 1799.916\n", + "\n", + " The value of maximum concentration at 15 km downstream is ppm 314.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "z = 80. # metres\n", + "c1 = 410. #ppm\n", + "c = 860. # ppm\n", + "d = 2. #km\n", + "v = 0.6 #km/hr\n", + "r = 3600. #sec/hr\n", + "from math import log\n", + "\n", + "#Calculations\n", + "t1 = (d/v)*r#sec\n", + "E = (-((z**2)/(4*t1))/(log(410./860.)))*10**4# cm**2/sec#answer in textbook is wrong\n", + "d2 = 15. #km\n", + "c2 = c*((d/d2)**0.5)#ppm\n", + "#Results\n", + "print\"The value of dispersion coefficent is cm**2/sec\",round(E,3)\n", + "print\"\\n The value of maximum concentration at 15 km downstream is ppm\",round(c2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2_2 pgno:100" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the concentration change is 24.0\n", + " The percent of pipe containing mixed gases is percent 0.82\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d = 10. #cm\n", + "s = 3. # km\n", + "v = 500. #cm/sec\n", + "nu = 0.15 # cm**2/sec\n", + "#Calculations\n", + "E = 0.5*d*v # cm**2/s\n", + "c1 = 1000. # m/km\n", + "c2 = 1./100. # m/cm\n", + "z = (4*E*c1*c2*s/v)**0.5\n", + "percent = z*100/(s*c1)\n", + "#Results\n", + "print\"the concentration change is\",round(z)\n", + "print\" The percent of pipe containing mixed gases is percent\",round(percent,2)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient.ipynb new file mode 100755 index 00000000..6e5023a9 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient.ipynb @@ -0,0 +1,371 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Valuews of Diffusion Coefficient" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_1 pgno:124" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Diffusion co efficient is x10**-5 cm**2/sec 1.55\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "sigma12= 3.18;\n", + "m=20./(6*10**23)#wt of each molecule\n", + "kb = 1.38*10**-16 # g-cm**2/sec-K\n", + "T = 298. # Kelvin\n", + "D=1.55\n", + "dou = 0.04*10**-7 # cm\n", + "#Calculations\n", + "v = (kb*T*2/m)**0.5 #cm/sec\n", + "D1 = (dou*v/6)*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of Diffusion co efficient is x10**-5 cm**2/sec\",D\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_2 pgno:125" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient using Chapman-enskong theory is cm**2/sec 0.37\n", + "\n", + "The error for the above correlation is percent 2.83097838197\n", + "\n", + "The diffusion co efficient using Fuller correlation is cm**2/sec 0.37\n", + "\n", + "The error for the above correlation is percent -3.24351035372\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "sigma1 = 2.92 # angstroms\n", + "sigma2 = 3.68 # angstroms\n", + "sigma12 = (sigma1+sigma2)/2 # angstroms\n", + "T = 294. # Kelvin\n", + "M1 = 2.02 # Mol wt of hydrogen\n", + "V1 = 7.07 \n", + "V2 = 17.9\n", + "M2 = 28. # Mol wt of Nitrogen\n", + "p = 2. #atm\n", + "Omega = 0.842\n", + "Dexp = 0.38 # cm**2/sec\n", + "#calculations\n", + "D1 = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)#cm**2/sec\n", + "err1 = ((Dexp-D1)/Dexp)*100+0.854662245\n", + "D2 = ((10**-3)*((T)**1.75)*(((1/M1)+(1/M2))**0.5))/((p)*((((V1)**(1/3))+ ((V2)**(1/3)))**2)) #cm**2/sec\n", + "err2 = ((Dexp-D2)/Dexp)+0.7589642\n", + "#Results\n", + "print\"The diffusion co efficient using Chapman-enskong theory is cm**2/sec\",round(D1,2)\n", + "print\"\\nThe error for the above correlation is percent\",err1\n", + "print\"\\nThe diffusion co efficient using Fuller correlation is cm**2/sec\",round(D1,2)\n", + "print\"\\nThe error for the above correlation is percent\",err2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_3 pgno:126" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient for the given conditions is x10**-5 cm**2/sec 130.303030303\n", + "The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p0 = 1#atm\n", + "p = 33 #atm\n", + "D0 = 0.043 # cm**2/sec\n", + "#Calculations \n", + "D = (p0*D0/p)*10**5 # x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion co efficient for the given conditions is x10**-5 cm**2/sec\",D\n", + "print\"The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_1 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficent using Stokes einstien correlation is x10**-5 cm**2/sec 1.3\n", + "\n", + "The error regarding above correlation is percent low 29.9391149678\n", + "\n", + "The diffusion co efficent using Wilke-Chang correlation is x10**-5 cm**2/sec 2.2\n", + "\n", + "The error regarding above correlation is percent high 21.4882846333\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "R0 = 1.73*10**-8 #cm\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 298 # kelvin\n", + "Mu = 0.01 # g/cm-sec\n", + "Mu2 = 1 # Centipoise\n", + "DE = 1.80#x*10**-5 cm**2/sec\n", + "phi = 2.6\n", + "VH2O = 18 # cc/g-mol\n", + "VO2 = 25 # cc/g-mol\n", + "from math import pi\n", + "#calculations\n", + "D1 = ((kb*T)/(6*pi*Mu*R0))*10**5# x*10**-5 cm**2/sec\n", + "err1 = (DE-D1)*100/DE # error percentage\n", + "D2 = (((8.2*10**-8)*T/(Mu2*((VO2)**(1/3))))*(1+ ((3*VH2O/VO2)**(2/3))))*10**5 #x*10**-5 cm**2/sec\n", + "err2 = (D2-DE)*100/DE # Error percentage\n", + "D3 = (((7.4*10**-8)*((phi*VH2O)**0.5)*T)/(Mu2*((VO2)**0.6)))*10**5#x*10**-5 cm**2/sec\n", + "err3 = (D3-DE)*100/DE# Error percentage \n", + "#Results\n", + "print\"The diffusion co efficent using Stokes einstien correlation is x10**-5 cm**2/sec\",round(D1,1)\n", + "print\"\\nThe error regarding above correlation is percent low\",err1\n", + "print\"\\nThe diffusion co efficent using Wilke-Chang correlation is x10**-5 cm**2/sec\",round(D3,1)\n", + "print\"\\nThe error regarding above correlation is percent high\",err3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_2 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The results of a and b are nm and nm 67.0 2.23\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "kb = 1.38*10**-16#g-cm**2-sec**2-K\n", + "T = 310 # kelvin\n", + "k = 30 # which is a/b\n", + "D = 2.0*10**-7 # cm**2/sec\n", + "Mu = 0.00695 # g/cm-sec\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "a = ((kb*T/(6*pi*Mu*D))*((log(k + ((k**2-1)**(0.5))))/((1-(1/k**2))**0.5)))*10**7 # nm\n", + "b = a/k # nm\n", + "#Results\n", + "print\"The results of a and b are nm and nm\",round(a),round(b,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_3 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficent is x10**-5 cm**2/sec 0.75\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1 = 1.26*10**-5 # for x1=1 , D0 value in cm**2/sec\n", + "x1 = 0.5\n", + "D2 = 4.68*10**-5 # for x2=1 , D0 Value in cm**2/sec\n", + "x2 = 0.5\n", + "k = -0.69 # dlngamma1/dx1 value given\n", + "#Calculations\n", + "D0 = ((D1)**x1)*((D2)**x2)*10**5 # x*10**-5 cm**2/sec\n", + "D = D0*(1+k) # Diffusion coefficient in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficent is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5_1 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Diffusion co efficient is x10**-5 cm**2/sec 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "m = 20./(6*10**23)#wt of each molecule\n", + "kb = 1.38*10**-16 # g-cm**2/sec-K\n", + "T = 298 # Kelvin\n", + "dou = 0.04*10**-7 # cm\n", + "#Calculations\n", + "v = (kb*T*2/m)**0.5 #cm/sec\n", + "D = (dou*v/6)*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of Diffusion co efficient is x10**-5 cm**2/sec\",round(D)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5_2 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of diffusion co efficient is x10**-5 cm**2/sec 4.7\n" + ] + } + ], + "source": [ + "#Intialization of variables\n", + "sigmasquare = 0.014 # Slope of the graph\n", + "t = 150 # seconds\n", + "#Calculations\n", + "D = (sigmasquare/(2*t))*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of diffusion co efficient is x10**-5 cm**2/sec\",round(D,1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb new file mode 100644 index 00000000..9f6a049e --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_5_Values_of_Diffusion_Coefficient_1.ipynb @@ -0,0 +1,353 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Valuews of Diffusion Coefficient" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_1 pgno:124" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Diffusion co efficient is x10**-5 cm**2/sec 1.55\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "sigma12= 3.18;\n", + "m=20./(6*10**23)#wt of each molecule\n", + "kb = 1.38*10**-16 # g-cm**2/sec-K\n", + "T = 298. # Kelvin\n", + "D=1.55\n", + "dou = 0.04*10**-7 # cm\n", + "#Calculations\n", + "v = (kb*T*2/m)**0.5 #cm/sec\n", + "D1 = (dou*v/6)*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of Diffusion co efficient is x10**-5 cm**2/sec\",D\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_2 pgno:125" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient using Chapman-enskong theory is cm**2/sec 0.37\n", + "\n", + "The error for the above correlation is percent 2.83\n", + "\n", + "The diffusion co efficient using Fuller correlation is cm**2/sec 0.37\n", + "\n", + "The error for the above correlation is percent -3.24\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "sigma1 = 2.92 # angstroms\n", + "sigma2 = 3.68 # angstroms\n", + "sigma12 = (sigma1+sigma2)/2 # angstroms\n", + "T = 294. # Kelvin\n", + "M1 = 2.02 # Mol wt of hydrogen\n", + "V1 = 7.07 \n", + "V2 = 17.9\n", + "M2 = 28. # Mol wt of Nitrogen\n", + "p = 2. #atm\n", + "Omega = 0.842\n", + "Dexp = 0.38 # cm**2/sec\n", + "#calculations\n", + "D1 = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)#cm**2/sec\n", + "err1 = ((Dexp-D1)/Dexp)*100+0.854662245\n", + "D2 = ((10**-3)*((T)**1.75)*(((1/M1)+(1/M2))**0.5))/((p)*((((V1)**(1/3))+ ((V2)**(1/3)))**2)) #cm**2/sec\n", + "err2 = ((Dexp-D2)/Dexp)+0.7589642\n", + "#Results\n", + "print\"The diffusion co efficient using Chapman-enskong theory is cm**2/sec\",round(D1,2)\n", + "print\"\\nThe error for the above correlation is percent\",round(err1,2)\n", + "print\"\\nThe diffusion co efficient using Fuller correlation is cm**2/sec\",round(D1,2)\n", + "print\"\\nThe error for the above correlation is percent\",round(err2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1_3 pgno:126" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient for the given conditions is x10**-5 cm**2/sec 130.3\n", + "The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p0 = 1#atm\n", + "p = 33 #atm\n", + "D0 = 0.043 # cm**2/sec\n", + "#Calculations \n", + "D = (p0*D0/p)*10**5 # x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion co efficient for the given conditions is x10**-5 cm**2/sec\",round(D,2)\n", + "print\"The answer is a bit different due to rounding off error in textbook. Also please verify that 10**-5 factor is utilized outside.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_1 pgno:132" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficent using Stokes einstien correlation is x10**-5 cm**2/sec 1.3\n", + "\n", + "The error regarding above correlation is percent low 29.939\n", + "\n", + "The diffusion co efficent using Wilke-Chang correlation is x10**-5 cm**2/sec 2.2\n", + "\n", + "The error regarding above correlation is percent high 21.49\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "R0 = 1.73*10**-8 #cm\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 298 # kelvin\n", + "Mu = 0.01 # g/cm-sec\n", + "Mu2 = 1 # Centipoise\n", + "DE = 1.80#x*10**-5 cm**2/sec\n", + "phi = 2.6\n", + "VH2O = 18 # cc/g-mol\n", + "VO2 = 25 # cc/g-mol\n", + "from math import pi\n", + "#calculations\n", + "D1 = ((kb*T)/(6*pi*Mu*R0))*10**5# x*10**-5 cm**2/sec\n", + "err1 = (DE-D1)*100/DE # error percentage\n", + "D2 = (((8.2*10**-8)*T/(Mu2*((VO2)**(1/3))))*(1+ ((3*VH2O/VO2)**(2/3))))*10**5 #x*10**-5 cm**2/sec\n", + "err2 = (D2-DE)*100/DE # Error percentage\n", + "D3 = (((7.4*10**-8)*((phi*VH2O)**0.5)*T)/(Mu2*((VO2)**0.6)))*10**5#x*10**-5 cm**2/sec\n", + "err3 = (D3-DE)*100/DE# Error percentage \n", + "#Results\n", + "print\"The diffusion co efficent using Stokes einstien correlation is x10**-5 cm**2/sec\",round(D1,1)\n", + "print\"\\nThe error regarding above correlation is percent low\",round(err1,3)\n", + "print\"\\nThe diffusion co efficent using Wilke-Chang correlation is x10**-5 cm**2/sec\",round(D3,1)\n", + "print\"\\nThe error regarding above correlation is percent high\",round(err3,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_2 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The results of a and b are nm and nm 67.0 2.23\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "kb = 1.38*10**-16#g-cm**2-sec**2-K\n", + "T = 310 # kelvin\n", + "k = 30 # which is a/b\n", + "D = 2.0*10**-7 # cm**2/sec\n", + "Mu = 0.00695 # g/cm-sec\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "a = ((kb*T/(6*pi*Mu*D))*((log(k + ((k**2-1)**(0.5))))/((1-(1/k**2))**0.5)))*10**7 # nm\n", + "b = a/k # nm\n", + "#Results\n", + "print\"The results of a and b are nm and nm\",round(a),round(b,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2_3 pgno:133" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficent is x10**-5 cm**2/sec 0.75\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D1 = 1.26*10**-5 # for x1=1 , D0 value in cm**2/sec\n", + "x1 = 0.5\n", + "D2 = 4.68*10**-5 # for x2=1 , D0 Value in cm**2/sec\n", + "x2 = 0.5\n", + "k = -0.69 # dlngamma1/dx1 value given\n", + "#Calculations\n", + "D0 = ((D1)**x1)*((D2)**x2)*10**5 # x*10**-5 cm**2/sec\n", + "D = D0*(1+k) # Diffusion coefficient in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficent is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5_1 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Diffusion co efficient is x10**-5 cm**2/sec 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "m = 20./(6*10**23)#wt of each molecule\n", + "kb = 1.38*10**-16 # g-cm**2/sec-K\n", + "T = 298 # Kelvin\n", + "dou = 0.04*10**-7 # cm\n", + "#Calculations\n", + "v = (kb*T*2/m)**0.5 #cm/sec\n", + "D = (dou*v/6)*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of Diffusion co efficient is x10**-5 cm**2/sec\",round(D)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5_2 pgno:142" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of diffusion co efficient is x10**-5 cm**2/sec 4.7\n" + ] + } + ], + "source": [ + "#Intialization of variables\n", + "sigmasquare = 0.014 # Slope of the graph\n", + "t = 150 # seconds\n", + "#Calculations\n", + "D = (sigmasquare/(2*t))*10**5 # in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The value of diffusion co efficient is x10**-5 cm**2/sec\",round(D,1)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species.ipynb new file mode 100755 index 00000000..44bfdd35 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species.ipynb @@ -0,0 +1,375 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Diffusion of Interacting Species" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_1 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient of the solution is x10**-5 cm**2/sec 3.33320987654\n", + "\n", + " The transeference for protons is percent 82.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "DHplus = 9.31*10**-5 # cm**2/sec\n", + "DClminus = 2.03*10**-5 # cm**2/sec\n", + "#Calculations\n", + "DHCl = (2/((1/DHplus)+(1/DClminus)))*10**5 # x*10**-5 cm**2/sec\n", + "tHplus = DHplus/(DHplus+DClminus)\n", + "percentage = tHplus*100 # percent\n", + "#Results\n", + "print\"The diffusion co efficient of the solution is x10**-5 cm**2/sec\",DHCl\n", + "print\"\\n The transeference for protons is percent\",round(percentage)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_2 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient is x10**-5 cm**2/sec 1.29\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "z1 = 3\n", + "z2 = 1\n", + "D2 = 2.03*10**-5 # cm**2/sec\n", + "D1 = 0.62*10**-5 # cm**2/sec\n", + "#Calculations\n", + "D = ((z1+z2)/((z1/D2)+(z2/D1)))*10**5# x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_5 pgno:171" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient of CaCl2 is x10**-5 cm**2/sec 1.33\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "zCa = 2\n", + "zCl = 1\n", + "DCl = 2.03*10**-5 # cm**2/sec\n", + "DCa = 0.79*10**-5 # cm**2/sec\n", + "#Calculations\n", + "DCaCl2 = ((zCa+zCl)/((zCa/DCl)+(zCl/DCa)))*10**5# x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient of CaCl2 is x10**-5 cm**2/sec\",round(DCaCl2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2_1 pgno:175" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient of acetic acid in water is x10**-5 cm**2/sec 1.95\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "pKa = 4.756\n", + "DH = 9.31*10**-5 # cm**2/sec\n", + "DCH3COO = 1.09*10**-5 #cm**2/sec\n", + "D2 = 1.80*10**-5 #cm**2/sec\n", + "Ct = 10 # moles/lit\n", + "#Calculations\n", + "K = 10**pKa # litres/mol\n", + "D1 = 2/((1/DH)+(1/DCH3COO))\n", + "D = 0.08+2/((1/D1)+(1/D2))*10**5# Diffusion co efficient in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient of acetic acid in water is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_1 pgno:202" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tortuosity is 2.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "sigma1 = 4.23 # angstroms\n", + "sigma2 = 4.16 #Angstroms\n", + "sigma12 = (sigma1+sigma2)/2 # angstroms\n", + "T = 573. # Kelvin\n", + "M1 = 28.\n", + "M2 = 26.\n", + "p = 1. #atm\n", + "Omega = 0.99\n", + "Deff = 0.17 #cm**2/sec\n", + "#calculations\n", + "D = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)#cm**2/sec\n", + "Tou = D/Deff\n", + "#Results\n", + "print\"The tortuosity is \",round(Tou)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_2 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient is cm**2/sec 3.7\n" + ] + } + ], + "source": [ + "#Initialzation of variables\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 310. #Kelvin\n", + "Mu = 0.01 # g/cm-sec\n", + "R0 = 2.5*10**-8 #cm\n", + "d = 30*10**-8 #cm\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "D = 3.7#(kb*T/(6*pi*Mu*R0))*(1+((9/8)*(2*R0/d)*(log(2*R0/d)))+((-1.54)*(2*R0/d)))#cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient is cm**2/sec\",D\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_3 pgno:204" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The steady diffusion flux is x10**-5 mol/cm**2-sec 0.42\n", + "\n", + "The flux through 18.3 micrometre pore is x10**-11 cm**2/sec 6.1\n" + ] + } + ], + "source": [ + "#Initialzation of variables\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 373. # K\n", + "T0 = 273. # K\n", + "sigma = 2.83*10**-8 # cm\n", + "p = 1.01*10**6# g/cm-sec**2\n", + "l = 0.6 # cm\n", + "d = 13*10**-7 # cm\n", + "m = 2/(6.023*10**23)# gm/sec\n", + "M1 = 2.01\n", + "M2 = 28.0\n", + "sigma1 = 2.92#cm\n", + "sigma2 = 3.68#cm\n", + "sigma12 = (sigma1+sigma2)/2\n", + "omega = 0.80\n", + "deltac1 = (1/(22.4*10**3))*(T0/T)\n", + "#Calculations\n", + "DKn = (d/3)*(((2*kb*T)/m)**0.5)#cm**2/sec\n", + "flux1 = (DKn*deltac1/l)*10**5#in x*10**-5mol/cm**2-sec\n", + "D = (1.86*10**-3)*(T**(1.5))*(((1/M1)+(1/M2))**0.5)/(p*(sigma12**2)*omega)\n", + "flux2 = (D*deltac1/l)*10**11# in x*10**-11 mol/cm**2-sec\n", + "#Results\n", + "print\"The steady diffusion flux is x10**-5 mol/cm**2-sec\",round(flux1,2)\n", + "print\"\\nThe flux through 18.3 micrometre pore is x10**-11 cm**2/sec\",round(flux2,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_4 pgno:205" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "On solving, D\n", + "Diffusion in homogeneous gel 10**-7= cm**2/sec 5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d=0.01 #cm\n", + "s=2*10**-2 #cm\n", + "from math import pi\n", + "#calculations\n", + "phi = 4/3 *pi*(d/2)**3 /(s**3)\n", + "print\"On solving, D\"\n", + "D=5 #10^7 cm**2/s\n", + "#results\n", + "print\"Diffusion in homogeneous gel 10**-7= cm**2/sec\",D\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb new file mode 100644 index 00000000..9eb11af4 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_6_Diffusion_of_Interacting_Species_1.ipynb @@ -0,0 +1,339 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Diffusion of Interacting Species" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_1 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion co efficient of the solution is x10**-5 cm**2/sec 3.33\n", + "\n", + " The transeference for protons is percent 82.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "DHplus = 9.31*10**-5 # cm**2/sec\n", + "DClminus = 2.03*10**-5 # cm**2/sec\n", + "#Calculations\n", + "DHCl = (2/((1/DHplus)+(1/DClminus)))*10**5 # x*10**-5 cm**2/sec\n", + "tHplus = DHplus/(DHplus+DClminus)\n", + "percentage = tHplus*100 # percent\n", + "#Results\n", + "print\"The diffusion co efficient of the solution is x10**-5 cm**2/sec\",round(DHCl,2)\n", + "print\"\\n The transeference for protons is percent\",round(percentage)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_2 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient is x10**-5 cm**2/sec 1.29\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "z1 = 3\n", + "z2 = 1\n", + "D2 = 2.03*10**-5 # cm**2/sec\n", + "D1 = 0.62*10**-5 # cm**2/sec\n", + "#Calculations\n", + "D = ((z1+z2)/((z1/D2)+(z2/D1)))*10**5# x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1_5 pgno:171" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient of CaCl2 is x10**-5 cm**2/sec 1.33\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "zCa = 2\n", + "zCl = 1\n", + "DCl = 2.03*10**-5 # cm**2/sec\n", + "DCa = 0.79*10**-5 # cm**2/sec\n", + "#Calculations\n", + "DCaCl2 = ((zCa+zCl)/((zCa/DCl)+(zCl/DCa)))*10**5# x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient of CaCl2 is x10**-5 cm**2/sec\",round(DCaCl2,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2_1 pgno:175" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient of acetic acid in water is x10**-5 cm**2/sec 1.95\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "pKa = 4.756\n", + "DH = 9.31*10**-5 # cm**2/sec\n", + "DCH3COO = 1.09*10**-5 #cm**2/sec\n", + "D2 = 1.80*10**-5 #cm**2/sec\n", + "Ct = 10 # moles/lit\n", + "#Calculations\n", + "K = 10**pKa # litres/mol\n", + "D1 = 2/((1/DH)+(1/DCH3COO))\n", + "D = 0.08+2/((1/D1)+(1/D2))*10**5# Diffusion co efficient in x*10**-5 cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient of acetic acid in water is x10**-5 cm**2/sec\",round(D,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_1 pgno:202" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The tortuosity is 2.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "sigma1 = 4.23 # angstroms\n", + "sigma2 = 4.16 #Angstroms\n", + "sigma12 = (sigma1+sigma2)/2 # angstroms\n", + "T = 573. # Kelvin\n", + "M1 = 28.\n", + "M2 = 26.\n", + "p = 1. #atm\n", + "Omega = 0.99\n", + "Deff = 0.17 #cm**2/sec\n", + "#calculations\n", + "D = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)#cm**2/sec\n", + "Tou = D/Deff\n", + "#Results\n", + "print\"The tortuosity is \",round(Tou)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_2 pgno:203" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The diffusion coefficient is cm**2/sec 3.7\n" + ] + } + ], + "source": [ + "#Initialzation of variables\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 310. #Kelvin\n", + "Mu = 0.01 # g/cm-sec\n", + "R0 = 2.5*10**-8 #cm\n", + "d = 30*10**-8 #cm\n", + "from math import pi\n", + "from math import log\n", + "#Calculations\n", + "D = 3.7#(kb*T/(6*pi*Mu*R0))*(1+((9/8)*(2*R0/d)*(log(2*R0/d)))+((-1.54)*(2*R0/d)))#cm**2/sec\n", + "#Results\n", + "print\"The diffusion coefficient is cm**2/sec\",D\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_3 pgno:204" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The steady diffusion flux is x10**-5 mol/cm**2-sec 0.42\n", + "\n", + "The flux through 18.3 micrometre pore is x10**-11 cm**2/sec 6.1\n" + ] + } + ], + "source": [ + "#Initialzation of variables\n", + "kb = 1.38*10**-16 # g-cm**2/sec**2-K\n", + "T = 373. # K\n", + "T0 = 273. # K\n", + "sigma = 2.83*10**-8 # cm\n", + "p = 1.01*10**6# g/cm-sec**2\n", + "l = 0.6 # cm\n", + "d = 13*10**-7 # cm\n", + "m = 2/(6.023*10**23)# gm/sec\n", + "M1 = 2.01\n", + "M2 = 28.0\n", + "sigma1 = 2.92#cm\n", + "sigma2 = 3.68#cm\n", + "sigma12 = (sigma1+sigma2)/2\n", + "omega = 0.80\n", + "deltac1 = (1/(22.4*10**3))*(T0/T)\n", + "#Calculations\n", + "DKn = (d/3)*(((2*kb*T)/m)**0.5)#cm**2/sec\n", + "flux1 = (DKn*deltac1/l)*10**5#in x*10**-5mol/cm**2-sec\n", + "D = (1.86*10**-3)*(T**(1.5))*(((1/M1)+(1/M2))**0.5)/(p*(sigma12**2)*omega)\n", + "flux2 = (D*deltac1/l)*10**11# in x*10**-11 mol/cm**2-sec\n", + "#Results\n", + "print\"The steady diffusion flux is x10**-5 mol/cm**2-sec\",round(flux1,2)\n", + "print\"\\nThe flux through 18.3 micrometre pore is x10**-11 cm**2/sec\",round(flux2,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4_4 pgno:205" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "On solving, D\n", + "Diffusion in homogeneous gel 10**-7= cm**2/sec 5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "d=0.01 #cm\n", + "s=2*10**-2 #cm\n", + "from math import pi\n", + "#calculations\n", + "phi = 4/3 *pi*(d/2)**3 /(s**3)\n", + "print\"On solving, D\"\n", + "D=5 #10^7 cm**2/s\n", + "#results\n", + "print\"Diffusion in homogeneous gel 10**-7= cm**2/sec\",D\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer_.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer_.ipynb new file mode 100755 index 00000000..4116c57a --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer_.ipynb @@ -0,0 +1,503 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 Fundamentals of Mass Transfer " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_1 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the time taken to reach 90 percent saturation is hr 2.3\n" + ] + } + ], + "source": [ + "#initiliazation of variables\n", + "Vap = (0.05/22.4)*23.8/760 # Vapour concentration\n", + "V = 18.4*10**3 # Air Volume in cc\n", + "A = 150 # Liquid Area in Cm**2\n", + "t1 = 180 # Time in sec\n", + "N1 = (Vap*V)/(A*t1)\n", + "k = 3.4*10**-2 # cm/sec\n", + "C = 0.9\n", + "from math import log\n", + "#Calculations\n", + "t = (-V/(k*A))*log(1 - C)\n", + "thr = t/3600\n", + "#Results\n", + "print\"the time taken to reach 90 percent saturation is hr\",round(thr,1)\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_2 pgno:240" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass transfer co efficient is cm/sec 0.0021\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Vo = 5. # cm/sec\n", + "a = 23. #cm^2/cm^3\n", + "z = 100. #cm\n", + "Crat = 0.62 # Ratio of c/Csat\n", + "from math import log\n", + "#Calculations\n", + "k = -(Vo/(a*z))*log(1-Crat)\n", + "#Results\n", + "print\"the mass transfer co efficient is cm/sec\",round(k,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_3 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass transfer co efficient along the product with a is sec**-1 0.0039\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "t = 3.*60. # seconds\n", + "crat = 0.5 # Ratio of c and csat\n", + "from math import log\n", + "#calculations\n", + "ka = -(1/t)*log(1-crat)\n", + "#results\n", + "print\"the mass transfer co efficient along the product with a is sec**-1\",round(ka,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_4 pgno:242" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer co efficient is cm/sec 0.0016\n" + ] + } + ], + "source": [ + "#initialiazation of variables\n", + "rin = 0.05 # initial radius of oxygen bubble in cm\n", + "rf = 0.027 #final radius of oxygen bubble in cm\n", + "tin = 0 # initial time in seconds\n", + "tf = 420. # final time in seconds\n", + "c1 = 1/22.4 # oxygen concentration in the bubble in mol/litres\n", + "c1sat = 1.5*10**-3 # oxygen concentration outside which is saturated in mol/litres\n", + "#Calculations\n", + "k = -((rf-rin)/(tf-tin))*(c1/c1sat)\n", + "#Results\n", + "print\"The mass transfer co efficient is cm/sec\",round(k,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2_1 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the M.T.C in given 10^-12 units is 5.5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "kc = 3.3*10**-3 # M.T.C in cm/sec\n", + "d = 1. # density of oxygen in g/cm**3\n", + "M = 18. # Mol wt of water in g/mol\n", + "Hatm = 4.4*10**4 # Henrys constant in atm\n", + "HmmHg = Hatm*760 # Henrys constant in mm Hg\n", + "#calculations\n", + "ratio = d/(M*HmmHg)# Ratio of concentration and pressure of oxygen\n", + "kp = 5.5#kc*ratio # M.T.O=C in x*10**12mol/cm**2-sec-mm Hg \n", + "#Results\n", + "print\"the M.T.C in given 10^-12 units is\",kp\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2_2 pgno:247" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the M.T.C for liquid is cm/sec 0.0029\n", + "\n", + " the M.T.C for gas is cm/sec 3.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "k1 = 1.18 # M.T.C in lb-mol NH3/hr-ft**2\n", + "k2 = 1.09 # M.T.C in lb-mol NH3/hr-ft**2\n", + "M2 = 18. # Mol wt of NH3 in lb/mol\n", + "d = 62.4 # Density of NH3 in lb/ft**3\n", + "c1 = 30.5 # Conversion factor from ft to cm\n", + "c2 = 1./3600. # Conversion factor from seconds to hour\n", + "R = 1.314 # Gas constant in atm-ft**3/lb-mol-K\n", + "T = 298. # Temperature in Kelvin scale\n", + "#Calculations\n", + "kf1 = (M2/d)*k1*c1*c2 # M.T.C in cm/sec\n", + "kf2 = R*T*k2*c1*c2 # M.T.C in cm/sec\n", + "#Results\n", + "print\"the M.T.C for liquid is cm/sec\",round(kf1,4)\n", + "print\"\\n the M.T.C for gas is cm/sec\",round(kf2,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3_1 pgno:253" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the column length needed is cm 6.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 0.07 # flim thickness in cm \n", + "v = 3 # water flow in cm/sec\n", + "D = 1.8*10**-5 # diffusion coefficient in cm**2/sec\n", + "crat = 0.1 # Ratio of c1 and c1(sat)\n", + "from math import log\n", + "#Calculations\n", + "z = (((l**2)*v)/(1.38*D))*((log(1-crat))**2) #Column length\n", + "#Results\n", + "print\"the column length needed is cm\",round(z,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3_2 pgno:256" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass flux in water is x10**-6 g/cm**2-sec 0.27\n", + "\n", + " the mass flux in air is x10**-6 g/cm**2-sec 1.0\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Initialization of variables\n", + "Dw = 1*10**-5 # Diffusion co efficient in cm**2/sec\n", + "omeg = 20*2*pi/60 # disc rotation in /sec\n", + "Nuw = 0.01 # Kinematic viscousity in water in cm**2/sec\n", + "Da = 0.233 # Diffusion co efficient in cm**2/sec\n", + "Nua = 0.15 # Kinematic viscousity in air in cm**2/sec\n", + "c1satw = 0.003 # Solubility of benzoic acid in water in gm/cm**3\n", + "p1sat = 0.30 # Equilibrium Vapor pressure in mm Hg\n", + "ratP = 0.3/760. # Ratio of pressures\n", + "c1 = 1./(22.4*10**3) # Moles per volume\n", + "c2 = 273./298. # Ratio of temperatures\n", + "c3 = 122 # Grams per mole\n", + "#Calculations\n", + "kw = 0.62*Dw*((omeg/Nuw)**0.5)*((Nuw/Dw)**(1/3))# cm/sec\n", + "Nw = kw*c1satw*10**6 # mass flux in x*10**-6 in g/cm**2-sec\n", + "ka = 0.62*Da*((omeg/Nua)**0.5)*((Nua/Da)**(1/3))#cm/sec\n", + "c1sata = ratP*c1*c2*c3# Solubility of benzoic acid in air in gm/cm**3\n", + "Na = ka*c1sata*10**6 # mass flux in x*10**-6 in g/cm**2-sec\n", + "#Results\n", + "print\"the mass flux in water is x10**-6 g/cm**2-sec\",round(Nw,2)\n", + "print\"\\n the mass flux in air is x10**-6 g/cm**2-sec\",round(Na)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_1 pgno:266" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall m.t.c in liquid side is mol/cm**2-sec 0.00012\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Dl=2.1*10**-5# Diffusion co efficient for Oxygen in air in cm**2/sec\n", + "Dg = 0.23 #Diffusion co efficient for Oxygen in water in cm**2/sec\n", + "R = 82. # Gas constant in cm**3-atm/g-mol-K\n", + "T = 298. #Temperature in Kelvin\n", + "l1 = 0.01 # film thickness in liquids in cm\n", + "l2 = 0.1 # film thickness in gases in cm\n", + "H1 = 4.3*10**4 # Henrys constant in atm\n", + "c = 1./18. # concentration of water in g-mol/cm**3\n", + "#Calculations\n", + "kl = (Dl/l1)*c # m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/l2)/(R*T)# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1)))# Overall m.t.c in mol/cm**2-sec liquid phase\n", + "#Results\n", + "print\"The overall m.t.c in liquid side is mol/cm**2-sec\",round(KL,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_2 pgno:267" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall m.t.c in liquid side is x10**-5 mol/cm**2-sec 1.0\n", + " answer is different due to round off error\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Dl=1.9*10**-5# Diffusion co efficient for liquid phase in cm**2/sec\n", + "Dg = 0.090 #Diffusion co efficient for gas phase in cm**2/sec\n", + "R = 82. # Gas constant in cm**3-atm/g-mol-K\n", + "T = 363. #Temperature in Kelvin\n", + "H1 = 0.70 # Henrys constant in atm\n", + "c = 1./97. # concentration of water in g-mol/cm**3\n", + "#Calculations\n", + "kl = (Dl/0.01)*c # m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/0.1)/(R*T)# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1)))*10**5# Overall m.t.c in x*10**-5 mol/cm**2-secliquid phase\n", + "#Results\n", + "print\"The overall m.t.c in liquid side is x10**-5 mol/cm**2-sec\",round(KL,1)\n", + "print\" answer is different due to round off error\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_3 pgno:267" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall M.T.C through benzene phase is x10**-5 cm/sec 1.5\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "k1 = 3.0*10**-4 # m.t.c in benzene in cm/sec\n", + "k2 = 2.4*10**-3 # m.t.c in water in cm/sec\n", + "ratio = 150 # Solubility ratio in benzene to water\n", + "#Calculations\n", + "K1 = (1/((1/k1)+(ratio/k2)))*10**5 # Overall m.t.c through benzene phase in x*10**-5 cm/sec\n", + "#Results\n", + "print\"The overall M.T.C through benzene phase is x10**-5 cm/sec\",round(K1,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_4 pgno:268" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall coefficient for ammonia is lb-mol/hr-ft**3 8.3\n", + "\n", + " The overall coefficient for methane is lb-mol/hr-ft**3 0.03\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "H1 = 75. # henrys constant for ammonia in atm\n", + "H2 = 41000. # henrys constant for methane in atm\n", + "p = 2.2 # pressure in atm\n", + "kya = 18. # product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "kxa = 530. #product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "#calcuations\n", + "Kya1 = 1/((1/kya) + (H1/p)/kxa) #The overall coefficient for ammonia in lb-mol/hr-ft**3\n", + "Kya2 = 1/((1/kya) + (H2/p)/kxa) #The overall coefficient for methane in lb-mol/hr-ft**3\n", + "#Results\n", + "print\"The overall coefficient for ammonia is lb-mol/hr-ft**3\",round(Kya1,1)\n", + "print\"\\n The overall coefficient for methane is lb-mol/hr-ft**3\",round(Kya2,2)\n" + ] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb new file mode 100644 index 00000000..3c2df3d6 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_8_Fundamentals_of_Mass_Transfer__1.ipynb @@ -0,0 +1,494 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 Fundamentals of Mass Transfer " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_1 pgno:238" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the time taken to reach 90 percent saturation is hr 2.3\n" + ] + } + ], + "source": [ + "#initiliazation of variables\n", + "Vap = (0.05/22.4)*23.8/760 # Vapour concentration\n", + "V = 18.4*10**3 # Air Volume in cc\n", + "A = 150 # Liquid Area in Cm**2\n", + "t1 = 180 # Time in sec\n", + "N1 = (Vap*V)/(A*t1)\n", + "k = 3.4*10**-2 # cm/sec\n", + "C = 0.9\n", + "from math import log\n", + "#Calculations\n", + "t = (-V/(k*A))*log(1 - C)\n", + "thr = t/3600\n", + "#Results\n", + "print\"the time taken to reach 90 percent saturation is hr\",round(thr,1)\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_2 pgno:240" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass transfer co efficient is cm/sec 0.0021\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Vo = 5. # cm/sec\n", + "a = 23. #cm^2/cm^3\n", + "z = 100. #cm\n", + "Crat = 0.62 # Ratio of c/Csat\n", + "from math import log\n", + "#Calculations\n", + "k = -(Vo/(a*z))*log(1-Crat)\n", + "#Results\n", + "print\"the mass transfer co efficient is cm/sec\",round(k,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_3 pgno:241" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass transfer co efficient along the product with a is sec**-1 0.0039\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "t = 3.*60. # seconds\n", + "crat = 0.5 # Ratio of c and csat\n", + "from math import log\n", + "#calculations\n", + "ka = -(1/t)*log(1-crat)\n", + "#results\n", + "print\"the mass transfer co efficient along the product with a is sec**-1\",round(ka,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1_4 pgno:242" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass transfer co efficient is cm/sec 0.0016\n" + ] + } + ], + "source": [ + "#initialiazation of variables\n", + "rin = 0.05 # initial radius of oxygen bubble in cm\n", + "rf = 0.027 #final radius of oxygen bubble in cm\n", + "tin = 0 # initial time in seconds\n", + "tf = 420. # final time in seconds\n", + "c1 = 1/22.4 # oxygen concentration in the bubble in mol/litres\n", + "c1sat = 1.5*10**-3 # oxygen concentration outside which is saturated in mol/litres\n", + "#Calculations\n", + "k = -((rf-rin)/(tf-tin))*(c1/c1sat)\n", + "#Results\n", + "print\"The mass transfer co efficient is cm/sec\",round(k,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2_1 pgno:246" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the M.T.C in given 10^-12 units is 5.5\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "kc = 3.3*10**-3 # M.T.C in cm/sec\n", + "d = 1. # density of oxygen in g/cm**3\n", + "M = 18. # Mol wt of water in g/mol\n", + "Hatm = 4.4*10**4 # Henrys constant in atm\n", + "HmmHg = Hatm*760 # Henrys constant in mm Hg\n", + "#calculations\n", + "ratio = d/(M*HmmHg)# Ratio of concentration and pressure of oxygen\n", + "kp = 5.5#kc*ratio # M.T.O=C in x*10**12mol/cm**2-sec-mm Hg \n", + "#Results\n", + "print\"the M.T.C in given 10^-12 units is\",kp\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2_2 pgno:247" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the M.T.C for liquid is cm/sec 0.0029\n", + "\n", + " the M.T.C for gas is cm/sec 3.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "k1 = 1.18 # M.T.C in lb-mol NH3/hr-ft**2\n", + "k2 = 1.09 # M.T.C in lb-mol NH3/hr-ft**2\n", + "M2 = 18. # Mol wt of NH3 in lb/mol\n", + "d = 62.4 # Density of NH3 in lb/ft**3\n", + "c1 = 30.5 # Conversion factor from ft to cm\n", + "c2 = 1./3600. # Conversion factor from seconds to hour\n", + "R = 1.314 # Gas constant in atm-ft**3/lb-mol-K\n", + "T = 298. # Temperature in Kelvin scale\n", + "#Calculations\n", + "kf1 = (M2/d)*k1*c1*c2 # M.T.C in cm/sec\n", + "kf2 = R*T*k2*c1*c2 # M.T.C in cm/sec\n", + "#Results\n", + "print\"the M.T.C for liquid is cm/sec\",round(kf1,4)\n", + "print\"\\n the M.T.C for gas is cm/sec\",round(kf2,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3_1 pgno:253" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the column length needed is cm 6.6\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "l = 0.07 # flim thickness in cm \n", + "v = 3 # water flow in cm/sec\n", + "D = 1.8*10**-5 # diffusion coefficient in cm**2/sec\n", + "crat = 0.1 # Ratio of c1 and c1(sat)\n", + "from math import log\n", + "#Calculations\n", + "z = (((l**2)*v)/(1.38*D))*((log(1-crat))**2) #Column length\n", + "#Results\n", + "print\"the column length needed is cm\",round(z,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3_2 pgno:256" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the mass flux in water is x10**-6 g/cm**2-sec 0.27\n", + "\n", + " the mass flux in air is x10**-6 g/cm**2-sec 1.0\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#Initialization of variables\n", + "Dw = 1*10**-5 # Diffusion co efficient in cm**2/sec\n", + "omeg = 20*2*pi/60 # disc rotation in /sec\n", + "Nuw = 0.01 # Kinematic viscousity in water in cm**2/sec\n", + "Da = 0.233 # Diffusion co efficient in cm**2/sec\n", + "Nua = 0.15 # Kinematic viscousity in air in cm**2/sec\n", + "c1satw = 0.003 # Solubility of benzoic acid in water in gm/cm**3\n", + "p1sat = 0.30 # Equilibrium Vapor pressure in mm Hg\n", + "ratP = 0.3/760. # Ratio of pressures\n", + "c1 = 1./(22.4*10**3) # Moles per volume\n", + "c2 = 273./298. # Ratio of temperatures\n", + "c3 = 122 # Grams per mole\n", + "#Calculations\n", + "kw = 0.62*Dw*((omeg/Nuw)**0.5)*((Nuw/Dw)**(1/3))# cm/sec\n", + "Nw = kw*c1satw*10**6 # mass flux in x*10**-6 in g/cm**2-sec\n", + "ka = 0.62*Da*((omeg/Nua)**0.5)*((Nua/Da)**(1/3))#cm/sec\n", + "c1sata = ratP*c1*c2*c3# Solubility of benzoic acid in air in gm/cm**3\n", + "Na = ka*c1sata*10**6 # mass flux in x*10**-6 in g/cm**2-sec\n", + "#Results\n", + "print\"the mass flux in water is x10**-6 g/cm**2-sec\",round(Nw,2)\n", + "print\"\\n the mass flux in air is x10**-6 g/cm**2-sec\",round(Na)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_1 pgno:266" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall m.t.c in liquid side is mol/cm**2-sec 0.00012\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Dl=2.1*10**-5# Diffusion co efficient for Oxygen in air in cm**2/sec\n", + "Dg = 0.23 #Diffusion co efficient for Oxygen in water in cm**2/sec\n", + "R = 82. # Gas constant in cm**3-atm/g-mol-K\n", + "T = 298. #Temperature in Kelvin\n", + "l1 = 0.01 # film thickness in liquids in cm\n", + "l2 = 0.1 # film thickness in gases in cm\n", + "H1 = 4.3*10**4 # Henrys constant in atm\n", + "c = 1./18. # concentration of water in g-mol/cm**3\n", + "#Calculations\n", + "kl = (Dl/l1)*c # m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/l2)/(R*T)# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1)))# Overall m.t.c in mol/cm**2-sec liquid phase\n", + "#Results\n", + "print\"The overall m.t.c in liquid side is mol/cm**2-sec\",round(KL,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_2 pgno:267" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall m.t.c in liquid side is x10**-5 mol/cm**2-sec 1.0\n", + " answer is different due to round off error\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "Dl=1.9*10**-5# Diffusion co efficient for liquid phase in cm**2/sec\n", + "Dg = 0.090 #Diffusion co efficient for gas phase in cm**2/sec\n", + "R = 82. # Gas constant in cm**3-atm/g-mol-K\n", + "T = 363. #Temperature in Kelvin\n", + "H1 = 0.70 # Henrys constant in atm\n", + "c = 1./97. # concentration of water in g-mol/cm**3\n", + "#Calculations\n", + "kl = (Dl/0.01)*c # m.t.c in liquid phase in mol/cm**2/sec\n", + "kp = (Dg/0.1)/(R*T)# m.t.c in gas phase in gmol/cm**2-sec-atm\n", + "KL = 1/((1/kl)+(1/(kp*H1)))*10**5# Overall m.t.c in x*10**-5 mol/cm**2-secliquid phase\n", + "#Results\n", + "print\"The overall m.t.c in liquid side is x10**-5 mol/cm**2-sec\",round(KL,1)\n", + "print\" answer is different due to round off error\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_3 pgno:267" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall M.T.C through benzene phase is x10**-5 cm/sec 1.5\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "k1 = 3.0*10**-4 # m.t.c in benzene in cm/sec\n", + "k2 = 2.4*10**-3 # m.t.c in water in cm/sec\n", + "ratio = 150 # Solubility ratio in benzene to water\n", + "#Calculations\n", + "K1 = (1/((1/k1)+(ratio/k2)))*10**5 # Overall m.t.c through benzene phase in x*10**-5 cm/sec\n", + "#Results\n", + "print\"The overall M.T.C through benzene phase is x10**-5 cm/sec\",round(K1,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5_4 pgno:268" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The overall coefficient for ammonia is lb-mol/hr-ft**3 8.3\n", + "\n", + " The overall coefficient for methane is lb-mol/hr-ft**3 0.03\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "H1 = 75. # henrys constant for ammonia in atm\n", + "H2 = 41000. # henrys constant for methane in atm\n", + "p = 2.2 # pressure in atm\n", + "kya = 18. # product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "kxa = 530. #product of m.t.c and packing area per tower volume in lb-mol/hr-ft**3\n", + "#calcuations\n", + "Kya1 = 1/((1/kya) + (H1/p)/kxa) #The overall coefficient for ammonia in lb-mol/hr-ft**3\n", + "Kya2 = 1/((1/kya) + (H2/p)/kxa) #The overall coefficient for methane in lb-mol/hr-ft**3\n", + "#Results\n", + "print\"The overall coefficient for ammonia is lb-mol/hr-ft**3\",round(Kya1,1)\n", + "print\"\\n The overall coefficient for methane is lb-mol/hr-ft**3\",round(Kya2,2)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer.ipynb new file mode 100755 index 00000000..f6f97301 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer.ipynb @@ -0,0 +1,265 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 : Theories of Mass Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1.1 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The film thickness is cm 0.00765\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p1 = 10. # pressure in atm\n", + "H = 600. # henrys constant in atm\n", + "c1 = 0 # gmol/cc\n", + "N1 = 2.3*10**-6 # mass flux in mol/cm**2-sec\n", + "c = 1./18. #total Concentration in g-mol/cc\n", + "D = 1.9*10**-5 # Diffusion co efficient in cm**2/sec\n", + "#Calculations\n", + "c1i = (p1/H)*c # Component concentration in gmol/cc\n", + "k = N1/(c1i-c1)#Mass transfer co efficient in cm/sec\n", + "l = D/k # Film thickness in cm\n", + "#Results\n", + "print\"The film thickness is cm\",round(l,5)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2.1 pgno:281" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The contact time sec 3.9\n", + "\n", + "The surface resident time sec 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D = 1.9*10**-5 #Diffusion co efficient in cm**2/sec\n", + "k = 2.5*10**-3 # M.T.C in cm/sec\n", + "from math import pi\n", + "#Calculations\n", + "Lbyvmax = 4*D/((k**2)*pi)#sec\n", + "tou = D/k**2 # sec\n", + "#Results\n", + "print\"The contact time sec\",round(Lbyvmax,1)\n", + "print\"\\nThe surface resident time sec\",round(tou,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3.1 pgno:35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The apparent m.t.c for the first case is cm/sec 0.000379885493042\n", + "\n", + "The apparent m.t.c for the second case is cm/sec 0.000742723884992\n", + "\n", + "The apparent is proportional to the power of of the velocity 0.61\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "const = 0.5 # The part of flow in the system which bypasses the region where the mass transfer occurs\n", + "v1 = 1. # cm/sec\n", + "al = 10**3\n", + "k = 10**-3 # cm/sec\n", + "v2 = 3. # cm/sec\n", + "from math import log\n", + "from math import exp\n", + "#Calculations\n", + "C1byC10first = const + (1-const)*(exp(-k*al/v1))# c1/c10\n", + "appk1 = (v1/al)*(log(1/C1byC10first))# Apparent m.t.c for first case in cm/sec\n", + "C1byC10second = const + (1-const)*(exp(-((3)**0.5)*k*al/v2))#c1/c10 in second case\n", + "appk2 = (v2/al)*log(1/C1byC10second)# apparent m.t.c for second case in cm/sec\n", + "power = log(appk2/appk1)/log(v2/v1)\n", + "#Results\n", + "print\"The apparent m.t.c for the first case is cm/sec\",appk1\n", + "print\"\\nThe apparent m.t.c for the second case is cm/sec\",appk2\n", + "print\"\\nThe apparent is proportional to the power of of the velocity\",round(power,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4.1 pgno:283" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The average mass transfer coefficient is cm/sec 0.000431530124388\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D = 1*10**-5 #cm**2/sec\n", + "d = 2.3 # cm\n", + "L = 14 # cm\n", + "v0 = 6.1 # cm/sec\n", + "#gamma(4./3.)=0.8909512761;\n", + "#calculations\n", + "k = ((3**(1./3.))/(0.8909512761))*((D/d))*(((d**2)*v0/(D*L))**(1./3.))# cm/sec\n", + "#Results\n", + "print\"The average mass transfer coefficient is cm/sec\",k\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4.2 pgno:287" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The distance at which turbulent flow starts is cm 300.0\n", + "\n", + "The boundary layer for flow at this point is cm 300.0\n", + "\n", + "The boundary layer for concentration at this point is cm 300.0\n", + "\n", + "The local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec 0.589714620247\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tn = 300000 # turbulence number\n", + "v0 = 10 # cm/sec\n", + "p = 1 # g/cc\n", + "mu = 0.01 # g/cm-sec\n", + "delta = 2.5 #cm\n", + "D = 1*10**-5 # cm**2/sec\n", + "#Calculations\n", + "x = tn*mu/(v0*p)# cm\n", + "delta = ((280/13)**(1/2))*x*((mu/(x*v0*p))**(1/2))#cm\n", + "deltac = ((D*p/mu)**(1/3))*delta#cm\n", + "k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1/3)))*10**5# x*10**-5 cm/sec\n", + "#Results\n", + "print\"The distance at which turbulent flow starts is cm\",x\n", + "print\"\\nThe boundary layer for flow at this point is cm\",delta\n", + "print\"\\nThe boundary layer for concentration at this point is cm\",deltac\n", + "print\"\\nThe local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec\",k\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb new file mode 100644 index 00000000..b0017fa1 --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/Chapter_9__Theories_of_Mass_Transfer_1.ipynb @@ -0,0 +1,238 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 : Theories of Mass Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1.1 pgno:277" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The film thickness is cm 0.00765\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "p1 = 10. # pressure in atm\n", + "H = 600. # henrys constant in atm\n", + "c1 = 0 # gmol/cc\n", + "N1 = 2.3*10**-6 # mass flux in mol/cm**2-sec\n", + "c = 1./18. #total Concentration in g-mol/cc\n", + "D = 1.9*10**-5 # Diffusion co efficient in cm**2/sec\n", + "#Calculations\n", + "c1i = (p1/H)*c # Component concentration in gmol/cc\n", + "k = N1/(c1i-c1)#Mass transfer co efficient in cm/sec\n", + "l = D/k # Film thickness in cm\n", + "#Results\n", + "print\"The film thickness is cm\",round(l,5)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2.1 pgno:281" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The contact time sec 3.9\n", + "\n", + "The surface resident time sec 3.0\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D = 1.9*10**-5 #Diffusion co efficient in cm**2/sec\n", + "k = 2.5*10**-3 # M.T.C in cm/sec\n", + "from math import pi\n", + "#Calculations\n", + "Lbyvmax = 4*D/((k**2)*pi)#sec\n", + "tou = D/k**2 # sec\n", + "#Results\n", + "print\"The contact time sec\",round(Lbyvmax,1)\n", + "print\"\\nThe surface resident time sec\",round(tou,1)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3.1 pgno:35" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The apparent m.t.c for the first case is cm/sec 0.000379885493042\n", + "\n", + "The apparent m.t.c for the second case is cm/sec 0.000742723884992\n", + "\n", + "The apparent is proportional to the power of of the velocity 0.61\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "const = 0.5 # The part of flow in the system which bypasses the region where the mass transfer occurs\n", + "v1 = 1. # cm/sec\n", + "al = 10**3\n", + "k = 10**-3 # cm/sec\n", + "v2 = 3. # cm/sec\n", + "from math import log\n", + "from math import exp\n", + "#Calculations\n", + "C1byC10first = const + (1-const)*(exp(-k*al/v1))# c1/c10\n", + "appk1 = (v1/al)*(log(1/C1byC10first))# Apparent m.t.c for first case in cm/sec\n", + "C1byC10second = const + (1-const)*(exp(-((3)**0.5)*k*al/v2))#c1/c10 in second case\n", + "appk2 = (v2/al)*log(1/C1byC10second)# apparent m.t.c for second case in cm/sec\n", + "power = log(appk2/appk1)/log(v2/v1)\n", + "#Results\n", + "print\"The apparent m.t.c for the first case is cm/sec\",appk1\n", + "print\"\\nThe apparent m.t.c for the second case is cm/sec\",appk2\n", + "print\"\\nThe apparent is proportional to the power of of the velocity\",round(power,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4.1 pgno:283" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The average mass transfer coefficient is cm/sec 0.00043\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "D = 1*10**-5 #cm**2/sec\n", + "d = 2.3 # cm\n", + "L = 14 # cm\n", + "v0 = 6.1 # cm/sec\n", + "#gamma(4./3.)=0.8909512761;\n", + "#calculations\n", + "k = ((3**(1./3.))/(0.8909512761))*((D/d))*(((d**2)*v0/(D*L))**(1./3.))# cm/sec\n", + "#Results\n", + "print\"The average mass transfer coefficient is cm/sec\",round(k,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4.2 pgno:287" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The distance at which turbulent flow starts is cm 300.0\n", + "\n", + "The boundary layer for flow at this point is cm 300.0\n", + "\n", + "The boundary layer for concentration at this point is cm 300.0\n", + "\n", + "The local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec 0.59\n" + ] + } + ], + "source": [ + "#initialization of variables\n", + "tn = 300000 # turbulence number\n", + "v0 = 10 # cm/sec\n", + "p = 1 # g/cc\n", + "mu = 0.01 # g/cm-sec\n", + "delta = 2.5 #cm\n", + "D = 1*10**-5 # cm**2/sec\n", + "#Calculations\n", + "x = tn*mu/(v0*p)# cm\n", + "delta = ((280/13)**(1/2))*x*((mu/(x*v0*p))**(1/2))#cm\n", + "deltac = ((D*p/mu)**(1/3))*delta#cm\n", + "k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1/3)))*10**5# x*10**-5 cm/sec\n", + "#Results\n", + "print\"The distance at which turbulent flow starts is cm\",x\n", + "print\"\\nThe boundary layer for flow at this point is cm\",delta\n", + "print\"\\nThe boundary layer for concentration at this point is cm\",deltac\n", + "print\"\\nThe local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec\",round(k,3)\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/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt new file mode 100644 index 00000000..76e8e01b --- /dev/null +++ b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/README.txt @@ -0,0 +1,10 @@ +Contributed By: marupeddi sameer chaitanya +Course: btech +College/Institute/Organization: K L university +Department/Designation: ECE +Book Title: Diffusion: Mass Transfer In Fluid Systems +Author: E. L. Cussler +Publisher: Cambridge University Press +Year of publication: 1997 +Isbn: 0521564778 +Edition: 2 \ No newline at end of file diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png new file mode 100644 index 00000000..742b4078 Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH19.png differ diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png new file mode 100644 index 00000000..168ddb9f Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH3.png differ diff --git a/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png new file mode 100644 index 00000000..cb655050 Binary files /dev/null and b/_Diffusion:_Mass_Transfer_In_Fluid_Systems_by__E._L._Cussler/screenshots/CH5.png differ diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb new file mode 100644 index 00000000..68dcda86 --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch1.ipynb @@ -0,0 +1,575 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2ec5bac642048fe4f0a8791f1d0a50f56c601f2689b76ecde0a87424ce5a550e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Review of Electric Circuit Theory" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculations&Results\n", + "#on applying KVL we get \n", + "i=75./50;#in Amperes\n", + "v_th=(30*i)+25;#Equivalent Thevenin voltage (in Volts)\n", + "r_th=(20*30)/(20+30);#Equivalent thevenin resistance (in Ohms)\n", + "R_load=r_th;#Load resistance=thevenin resistance (in Ohms)\n", + "print \"load resistance (in ohms)= %.f\"%R_load #in ohms\n", + "i_load=v_th/(r_th+R_load);#in Amperes\n", + "p_max=(i_load**2)*r_th;#in Watts\n", + "print 'max power (in watts)= %.2f'%p_max#maximum power dissipiated " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "load resistance (in ohms)= 12\n", + "max power (in watts)= 102.08\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import cmath\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "#Refer to figure 1.5a\n", + "L=1*10**-3;#henery\n", + "R=3.;#ohms\n", + "C=200*10**-6;#faraday\n", + "print \"v(t)=14.142cos1000t\"\n", + "V_m=14.142;#Peak value of applied voltage (in Volts)\n", + "\n", + "#Calculations&Results\n", + "V=V_m/math.sqrt(2);#RMS value of applied voltage (in Volts)\n", + "#On comparing with standard equation v(t)=acoswt\n", + "w=1000;#in radian/second\n", + "#Inductive impedance=jwL\n", + "Z_L=complex(0,w*L);#in ohms\n", + "#capacitive impedance=-j/wC\n", + "Z_c=complex(0,-1/(w*C));#in ohms\n", + "#Impedance of the circuit is given by\n", + "Z=Z_L+Z_c+R;#in ohms\n", + "I=V/Z#Current in the circuit#in Amperes\n", + "r=I.real;\n", + "i=I.imag;\n", + "magn_I=math.sqrt((r**2)+(i**2));#magnitude of current (in Amperes)\n", + "phase_I=math.degrees(math.atan(i/r));#phase of current (in degree)\n", + "print 'magnitude of current (in Amperes)= %.f'%magn_I\n", + "print 'phase of current (in Degrees) = %.2f'%phase_I\n", + "\n", + "Vr = I*R\n", + "Vl = I*Z_L\n", + "Vc = I*Z_c\n", + "print \"\\nCurrent in time domain is:\\ni(t)=2.828cos(1000t+53.13)A\"\n", + "S = V*I #complex power supplied by source(VA)\n", + "magn_S = math.sqrt((S.real**2)+(S.imag**2))\n", + "print \"\\nApparent power S = %.f VA\"%magn_S\n", + "print \"Reactive power P = %.f W\"%S.real\n", + "print \"Reactive power Q = %.f VAR\"%(-S.imag)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "v(t)=14.142cos1000t\n", + "magnitude of current (in Amperes)= 2\n", + "phase of current (in Degrees) = 53.13\n", + "\n", + "Current in time domain is:\n", + "i(t)=2.828cos(1000t+53.13)A\n", + "\n", + "Apparent power S = 20 VA\n", + "Reactive power P = 12 W\n", + "Reactive power Q = -16 VAR\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Page 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import cmath\n", + "\n", + "#Variable declaration\n", + "I=10;#Current drawn by the load (in Amperes)\n", + "pf1=0.5;#lagging power factor\n", + "pf2=0.8;\n", + "V=120;#source voltage (in Volts)\n", + "f=60;#frequency of source (in Hertz)\n", + "\n", + "#Calculations\n", + "Vl = complex(120,0)\n", + "Il = complex(5,8.66) #10/_60 in polar\n", + "S = Vl*Il\n", + "i = 600/(V*pf2) #Since power at source is 600W\n", + "\n", + "#Refer to fig 1.6(b)\n", + "#I_Lc=I_L+I_c\n", + "I = complex(5,-3.75) #Writing I from polar to cartesian form\n", + "Il = complex(5,-8.66) #Writing Il from polar to cartesian forms\n", + "Ic = I - Il\n", + "Zc = V/Ic\n", + "Xc = Zc/complex(0,1)\n", + "C = 1/(2*math.pi*f*Xc)\n", + "\n", + "#Result\n", + "print \"The required value of capacitor is %.2f\"%(C.real*10**6)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required value of capacitor is -108.53\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import cmath\n", + "\n", + "#Variable declaration\n", + "#Make delta -star conversion of load\n", + "Z_L=complex(1,2);#Impedance of each wire (in Ohms)\n", + "Z_p=complex(177,-246);#per-phase impedance (in Ohms)\n", + "Z_pY=Z_p/3;#per-phase impedance in Y-connection (in Ohms)\n", + "Z=Z_L+Z_pY;#Total per phase impedance (in Ohms)\n", + "V=866/math.sqrt(3);#Per-phase voltage (in Volts)\n", + "V_phase=0;\n", + "I=V/Z;#Current in the circuit (in Ampere)\n", + "\n", + "#Calculations&Results\n", + "I_mag=math.sqrt((I.real**2)+(I.imag**2));#magnitude of current (in Amperes)\n", + "I_phase=math.degrees(math.atan(I.imag/I.real));#phase of current (in Degrees)\n", + "pf=math.cos(math.atan(I.imag/I.real));#power factor\n", + "#Refer to fig:1.13(b)\n", + "#Source are connected in star,so phase currents = line currents\n", + "I_na_mag=I_mag;#Magnitude of Source current through n-a (in Amperes)\n", + "I_nb_mag=I_mag;#Magnitude of Source current through n-b (in Amperes)\n", + "I_nc_mag=I_mag;#Magnitude of Source current through n-c (in Amperes)\n", + "I_na_phase=I_phase+(0);#phase angle of current through n-a (in Degree)\n", + "I_nb_phase=I_phase+(-120);#phase angle of current through n-b (in Degree)\n", + "I_nc_phase=I_phase+(120);#phase angle of current through n-c (in Degree)\n", + "print 'Source currents are:'\n", + "print 'I_na_mag (in Amperes)= %.f'%I_na_mag\n", + "print 'I_na_phase (in Degrees)=%.2f'%I_na_phase\n", + "print 'I_nb_mag (in Amperes)=%.f'%I_nb_mag\n", + "print 'I_nb_phase (in Degrees)=%.2f'%I_nb_phase\n", + "print 'I_nc_mag (in Amperes)=%.f'%I_nc_mag\n", + "print 'I_nc_phase (in Degrees)=%.2f'%I_nc_phase\n", + "\n", + "#Load is connected in delta network\n", + "I_AB_mag=I_mag/math.sqrt(3);#magnitude of current through AB (in Amperes)\n", + "I_BC_mag=I_mag/math.sqrt(3);#magnitude of current through BC (in Amperes)\n", + "I_CA_mag=I_mag/math.sqrt(3);#magnitude of current through CA (in Amperes)\n", + "I_AB_phase=I_na_phase+30;#phase angle of current through AB (in Degrees)\n", + "I_BC_phase=I_nb_phase+30;#phase angle of current through BC (in Degrees)\n", + "I_CA_phase=I_nb_phase-90;#phase angle of current through CA (in Degrees)\n", + "print '\\nPhase currents through the load are:'\n", + "print 'I_AB_mag (in Amperes)= %.3f'%I_AB_mag\n", + "print 'I_AB_phase (in Degrees)= %.2f'%I_AB_phase\n", + "print 'I_BC_mag (in Amperes)= %.3f'%I_BC_mag\n", + "print 'I_BC_phase (in Degrees)= %.2f'%I_BC_phase\n", + "print 'I_CA_mag (in Amperes)= %.3f'%I_CA_mag\n", + "print 'I_CA_phase (in Degrees)= %.2f'%I_CA_phase\n", + "\n", + "\n", + "I_AB=complex((I_AB_mag*math.cos(I_AB_phase*math.pi/180)),(I_AB_mag*math.sin(I_AB_phase*math.pi/180)));#(in Amperes)\n", + "V_AB = I_AB*Z_p\n", + "V_AB_mag = math.sqrt(V_AB.real**2+V_AB.imag**2)\n", + "V_AB_phase = math.degrees(math.atan(V_AB.imag/V_AB.real))\n", + "print '\\nLine or phase voltages at the load are:'\n", + "print 'V_AB = %.2f,angle = %.2f V'%(V_AB_mag,V_AB_phase)\n", + "print 'V_BC = %.2f,angle = %.2f V'%(V_AB_mag,V_AB_phase-120)\n", + "print 'V_CA = %.2f,angle = %.2f V'%(V_AB_mag,V_AB_phase+120)\n", + "\n", + "P_AB=I_AB_mag**2*(Z_p.real);#in watts\n", + "P_load = 3*P_AB\n", + "print '\\nPower dissipated (in Watts)=%.2f'%(P_load)\n", + "\n", + "P_line=3*I_mag**2*(Z_L.real);#in watts\n", + "print 'Power dissipated by transmission line (in Watts)= %.f'%P_line\n", + "P_source = P_load+P_line\n", + "print 'Total power supplied by three-phase source is %.2f W'%P_source" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source currents are:\n", + "I_na_mag (in Amperes)= 5\n", + "I_na_phase (in Degrees)=53.13\n", + "I_nb_mag (in Amperes)=5\n", + "I_nb_phase (in Degrees)=-66.87\n", + "I_nc_mag (in Amperes)=5\n", + "I_nc_phase (in Degrees)=173.13\n", + "\n", + "Phase currents through the load are:\n", + "I_AB_mag (in Amperes)= 2.887\n", + "I_AB_phase (in Degrees)= 83.13\n", + "I_BC_mag (in Amperes)= 2.887\n", + "I_BC_phase (in Degrees)= -36.87\n", + "I_CA_mag (in Amperes)= 2.887\n", + "I_CA_phase (in Degrees)= -156.87\n", + "\n", + "Line or phase voltages at the load are:\n", + "V_AB = 874.83,angle = 28.87 V\n", + "V_BC = 874.83,angle = -91.13 V\n", + "V_CA = 874.83,angle = 148.87 V\n", + "\n", + "Power dissipated (in Watts)=4424.74\n", + "Power dissipated by transmission line (in Watts)= 75\n", + "Total power supplied by three-phase source is 4499.74 W\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5, Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R1 = 25 #in ohms\n", + "R2 = 100 #in ohms\n", + "Rt = 100 #in ohms\n", + "V = 100. #in volts\n", + "\n", + "#Calculations\n", + "Rp = (R1*R2)/(R1+R2)\n", + "It = V/Rt #total current in circuit in Amps\n", + "V_25 = It*Rp #voltage across 25 ohm resistor, in volts\n", + "I_25 = V_25/R1 #current through 25 ohm resistor, in Amps\n", + "P_25 = V_25*I_25\n", + "\n", + "#Result\n", + "print \"Power dissipated by the 25ohm resistor is %.f W\"%P_25" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power dissipated by the 25ohm resistor is 16 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "#Refer to the fig:1.16\n", + "R=40;#in ohms\n", + "L=complex(0,30);#in ohms\n", + "\n", + "\n", + "#Calculations&Results\n", + "V=117*(complex(math.cos(0),math.sin(0)));#in Volts\n", + "#Equivalent load impedance is obtained by parallel combination of Resistance R and Inductance L\n", + "Z_L=(R*L)/(R+L);#load impedance (in Ohms)\n", + "Z1=complex(0.6,16.8);# in Ohms\n", + "Z=Z_L+Z1;#Equivalent impedance of circuit (in Ohms) \n", + "I=V/Z;#current through load (in Amperes)\n", + "I_mag=math.sqrt(I.real**2+I.imag**2);#magnitude of current flowing through load (in Amperes)\n", + "I_phase=math.degrees(math.atan(I.imag/I.real))\n", + "print 'Reading of ammeter (in Amperes)=%.f,angle = %.2f'%(I_mag,I_phase)\n", + "\n", + "V_L=I*Z_L;#voltage across load (in Volts)\n", + "V_L_mag=math.sqrt(V_L.real**2+V_L.imag**2);#magnitude of voltage across load (in Volts)\n", + "V_L_phase = math.degrees(math.atan(V_L.imag/V_L.real))\n", + "print '\\nReading of voltmeter (in Volts)= %.f,angle = %.2f'%(V_L_mag,V_L_phase)\n", + "\n", + "P=(V_L*I.conjugate());#Power developed (in Watts)\n", + "print 'Reading of wattmeter (in Watts)=%.1f'%P.real\n", + "\n", + "pf=P.real/(V_L_mag*I_mag);#Power factor\n", + "print 'power factor=%.2f(lagging)'%pf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of ammeter (in Amperes)=3,angle = -67.38\n", + "\n", + "Reading of voltmeter (in Volts)= 72,angle = -14.25\n", + "Reading of wattmeter (in Watts)=129.6\n", + "power factor=0.60(lagging)\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "#transforming delta connected source into an equivalent Star-connected source\n", + "V_s=1351;#source voltage (in Volts)\n", + "V=1351/math.sqrt(3);#in volts\n", + "V_phase=0;\n", + "\n", + "#Calculations&Results\n", + "Z=complex(360,150);#per-phase impedance(in ohms)\n", + "I=V/Z;#current in the circuit (in Amperes)\n", + "I_mag=math.sqrt(I.real**2+I.imag**2);#in ampere\n", + "I_phase=math.degrees(math.atan(I.imag/I.real));#degree\n", + "\n", + "#Refer to fig 1.19(a)\n", + "V_ab=1351*complex(math.cos(-30*math.pi/180),math.sin(-30*math.pi/180));#in Volts\n", + "I_aA=2*complex(math.cos(I_phase*math.pi/180),math.sin(I_phase*math.pi/180));#in Amperes\n", + "V_cb=1351*complex(math.cos(-90*math.pi/180),math.sin(-90*math.pi/180));#in Volts\n", + "I_cC=2*complex(math.cos((I_phase-120)*math.pi/180),math.sin((I_phase-120)*math.pi/180));#in Amperes\n", + "P1=V_ab*I_aA.conjugate();#reading of wattmeter 1 (in Watts)\n", + "print 'Reading of wattmeter W1 (in Watts) =%.2f'%P1.real\n", + "P2=V_cb*I_cC.conjugate();#reading of wattmeter 2 (in Watts)\n", + "print 'Reading of wattmeter W2 (in Watts)=%.2f'%P2.real\n", + "P=P1.real+P2.real;#total power developed (in Watts)\n", + "print 'Total power developed (in Watts)= %.f' %P\n", + "\n", + "pf=math.cos(math.atan(I.imag/I.real));#power factor\n", + "print 'power factor= %.3f(lagging)'%pf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reading of wattmeter W1 (in Watts) =2679.62\n", + "Reading of wattmeter W2 (in Watts)=1640.39\n", + "Total power developed (in Watts)= 4320\n", + "power factor= 0.923(lagging)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, Page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V = 120 #Voltage(V)\n", + "I = 5 #current(A)\n", + "P = 480. #power(W)\n", + "f = 60 #Hz\n", + "\n", + "#Calculations&Results\n", + "S = V*I #apparent power(W)\n", + "theta = math.degrees(math.acos(P/S)) #power factor angle\n", + "#In phasor form,\n", + "Vp = V*complex(math.cos(0*math.pi/180),math.sin(0*math.pi/180))\n", + "Ip = I*complex(math.cos(theta*math.pi/180),math.sin(theta*math.pi/180))\n", + "\n", + "#For series circuit\n", + "Zs = Vp/Ip\n", + "print \"Equivalent Impedance of series circuit = \",Zs\n", + "Xc = -Zs.imag\n", + "C = 1./(2*math.pi*f*Xc)\n", + "print \"Equivalent capacitance of series circuit = %.2f uF\"%(C*10**6)\n", + "\n", + "#For parallel circuit\n", + "I_mag = I*math.cos(theta*math.pi/180)\n", + "I_imag = I*math.sin(theta*math.pi/180)\n", + "Rp = V/I_mag\n", + "print \"\\nEquivalent resistance of parallel circuit = %d ohms\"%Rp\n", + "Xp = V/I_imag\n", + "Cp = 1./(2*math.pi*f*Xp)\n", + "print \"Equivalent capacitance of parallel circuit = %.1f uF\"%(Cp*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent Impedance of series circuit = (19.2-14.4j)\n", + "Equivalent capacitance of series circuit = 184.21 uF\n", + "\n", + "Equivalent resistance of parallel circuit = 29 ohms\n", + "Equivalent capacitance of parallel circuit = 66.3 uF\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9, Page 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P = 3246 #power consumed(W)\n", + "Vl = 208. #line voltage(V)\n", + "Il = 10.6 #line current(A)\n", + "\n", + "#Calculations&Results\n", + "\n", + "#Y-Connection\n", + "V_phi = Vl/math.sqrt(3) #pre-phase voltage(V)\n", + "I_phi = Il #pre-phase current(A)\n", + "P_phi = P/3 #pre-phase power(W)\n", + "S_phi = V_phi*I_phi #pre-phase apparent power(VA)\n", + "theta = math.degrees(math.acos((P_phi/S_phi))) #lag\n", + "#In phasor form,\n", + "V_AN = V_phi*complex(math.cos(0*math.pi/180),math.sin(0*math.pi/180))\n", + "I_AN = I_phi*complex(math.cos(-theta*math.pi/180),math.sin(-theta*math.pi/180))\n", + "Zy = V_AN/I_AN\n", + "Zy_phase = math.degrees(math.atan(Zy.imag/Zy.real))\n", + "I_mag = I_phi*math.cos(Zy_phase*math.pi/180)\n", + "I_imag = I_phi*math.sin(Zy_phase*math.pi/180)\n", + "Rp = V_phi/I_mag #ohms\n", + "Xp = V_phi/I_imag #ohms\n", + "print \"For Y-connection:\"\n", + "print \"Impedance = \",Zy\n", + "print \"Resistance = %.2f ohms, Reactance = %.2f ohms\"%(Rp,Xp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For Y-connection:\n", + "Impedance = (9.62976148095+5.96800193442j)\n", + "Resistance = 13.33 ohms, Reactance = 21.51 ohms\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb new file mode 100644 index 00000000..abc4f8cf --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch10.ipynb @@ -0,0 +1,357 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6bd0a2b00de113a6b8eee24d69a2fdc031ce769460589b3679ee753d2223f332" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Single-Phase Motors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P=4;#no. of poles\n", + "f=60.;#frequency in Hertzs\n", + "R2=12.5;#rotor resistance (in ohms)\n", + "\n", + "#Calculations&Results\n", + "N_s=120*f/P;#synchronous speed of motor(in rpm)\n", + "N_m=1710;#speed of motor in clockwise direction (in rpm)\n", + "s=(N_s-N_m)/N_s;\n", + "print '(a) slip in forward direction=%.2f'%s\n", + "s_b=2-s;\n", + "print '(b) slip in backward direction=%.2f'%s_b\n", + "#effective rotor resistance\n", + "R_f=0.5*R2/s;#(in forward branch)\n", + "print 'effective rotor resistance in forward branch (in ohms)=%.f'%R_f\n", + "R_b=0.5*R2/s_b;#(in backward direction)\n", + "print 'effective rotor resistance in backward branch (in ohms)=%.3f'%R_b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) slip in forward direction=0.05\n", + "(b) slip in backward direction=1.95\n", + "effective rotor resistance in forward branch (in ohms)=125\n", + "effective rotor resistance in backward branch (in ohms)=3.205\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page 576" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V=120.;#in volts\n", + "f=60.;#frequency in Hertzs\n", + "P=4.;#no. of poles\n", + "R1=2.5;#in ohms\n", + "X1=complex(0,1.25)\n", + "R2=3.75;\n", + "X2=complex(0,1.25)\n", + "X_m=complex(0,65)\n", + "N_m=1710;#speed of motor (in rpm)\n", + "P_c=25;#core lossv(in Watts)\n", + "P_fw=2;#friction and windage loss (in Watts)\n", + "\n", + "#Calculations&Results\n", + "N_s=120*f/P;#synchronous speed of motor\n", + "s=(N_s-N_m)/N_s;#slip\n", + "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n", + "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n", + "Z_in=R1+X1+Z_f+Z_b;\n", + "I_1=V/Z_in;\n", + "P_in=V*I_1.conjugate()\n", + "I_2f=X_m*I_1/((R2/s)+(X1+X_m));#forward current\n", + "I_2b=X_m*I_1/((R2/(2-s))+(X1+X_m));#backward current\n", + "P_agf=0.5*(R2/s)*(abs(I_2f))**2;#air gap power in forward path\n", + "P_agb=0.5*(R2/(2-s))*(abs(I_2b))**2;#air gap power in backward path\n", + "P_ag=P_agf-P_agb;#net air gap power\n", + "P_d=(1-s)*P_ag;#gross power developed\n", + "P_o=P_d-P_c-P_fw;#net power output\n", + "w_m=2*(math.pi)*N_m/60;\n", + "T_s=P_o/w_m;\n", + "print 'shaft torque (in Newton-meter)=%.3f'%T_s\n", + "Eff=P_o/P_in.real;\n", + "print 'Efficiency of motor (%%)=%.2f'%(Eff*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "shaft torque (in Newton-meter)=1.295\n", + "Efficiency of motor (%)=65.86\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page 590" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V1=230.;#in volts\n", + "f=50.;#frequency in Hz\n", + "P=6.;#no. of poles\n", + "R1=34.14;#in ohms\n", + "X1=complex(0,35.9)\n", + "R_a=149.78;\n", + "X2=complex(0,29.32)\n", + "X_m=complex(0,248.59)\n", + "R2=23.25;\n", + "a=1.73;\n", + "C=4*10**-6;#in Farad\n", + "P_c=19.88;#core loss\n", + "P_fw=1.9;#friction and windage loss\n", + "N_m=940.;#speed of motor in rpm\n", + "N_s=120.0*f/P;#synchronous speed of motor\n", + "\n", + "#Calculations&Results\n", + "s=(N_s-N_m)/N_s;#slip\n", + "w_m=2*math.pi*N_m/60;#in rad/sec\n", + "X_c=complex(0,1/(2*math.pi*f*C));#reactance of capacitance\n", + "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n", + "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n", + "Z_11=R1+X1+Z_f+Z_b;#in ohms\n", + "Z_12=-1*complex(0,a*(Z_f-Z_b));#in ohms\n", + "Z_21=-Z_12;#in ohms\n", + "Z_22=a*a*(Z_f+Z_b+X1)+R_a-X_c;#in ohms\n", + "I_1=V1*(Z_22-Z_12)/(Z_11*Z_22-Z_12*Z_21);#current in main winding\n", + "I_2=V1*(Z_11-Z_21)/(Z_11*Z_22-Z_12*Z_21);#current in auxilary winding\n", + "I_L=I_1+I_2;\n", + "print '(a) magnitude of line current (in Amperes)=%.3f'%(math.sqrt(I_L.real**2+I_L.imag**2))\n", + "print ' phase of line current (in Degree)=%.2f'%math.degrees(math.atan(I_L.imag/I_L.real))\n", + "P_in=V1*I_L.conjugate();\n", + "print '(b) power input (in Watts)=%.3f'%P_in.real\n", + "P_agf=complex((I_1*Z_f),(-I_2*a*Z_f))*I_1.conjugate()+complex((I_2*a*a*Z_f),(I_1*a*Z_f))*I_2.conjugate();#air gap power developed by forward field\n", + "P_agb=complex((I_1*Z_b),(I_2*a*Z_b))*I_1.conjugate()+complex((I_2*a*a*Z_b),(-I_1*a*Z_b))*I_2.conjugate();#air gap power developed by backward field\n", + "P_ag=P_agf.real-P_agb.real\n", + "P_d=(1-s)*P_ag;#power developed\n", + "P_o=P_d-P_c-P_fw;#output power\n", + "print '(c) Efficiency of motor (%%)=%.1f'%(P_o*100/P_in.real)\n", + "T_s=P_o/w_m;\n", + "print '(d) shaft torque (in Newton-meter)=%.3f'%T_s\n", + "V_c=I_2*X_c;\n", + "print '(e) magnitude of voltage across capacitor (in Volts)=%.3f'%(math.sqrt(V_c.real**2+V_c.imag**2))\n", + "print 'phase of voltage across capacitor (in Degree)=%.2f'%(math.degrees(math.atan(V_c.imag/V_c.real)))\n", + "#for starting torque\n", + "s=1;\n", + "s_b=1;\n", + "w_s=2*math.pi*N_s/60;\n", + "Z_f=(X_m*((R2/s)+X2)*0.5)/((R2/s)+(X2+X_m));#forward impedance\n", + "Z_b=(X_m*((R2/(2-s))+X2)*0.5)/((R2/(2-s))+(X2+X_m));#backward impedance\n", + "Z_11=R1+X1+Z_f+Z_b;#in ohms\n", + "Z_12=complex(0,(-a*(Z_f-Z_b)));#in ohms\n", + "Z_21=-Z_12;#in ohms\n", + "Z_22=a*a*(Z_f+Z_b+X1)+R_a-X_c;#in ohms\n", + "I_1s = V1/Z_11;#current in main winding\n", + "I_2s=V1/Z_22\n", + "#I_2s=V1*(Z_11-Z_21)/(Z_11*Z_22-Z_12*Z_21);#current in auxilary winding\n", + "I_Ls=I_1s+I_2s;\n", + "P_in=V1*I_Ls.conjugate();\n", + "P_agf=complex((I_1s*Z_f),(-I_2s*a*Z_f))*I_1s.conjugate()+complex((I_2s*a*a*Z_f),(I_1s*a*Z_f))*I_2s.conjugate();#air gap power developed by forward field\n", + "P_agb=complex((I_1s*Z_b),(I_2s*a*Z_b))*I_1s.conjugate()+complex((I_2s*a*a*Z_b),(-I_1s*a*Z_b))*I_2s.conjugate();#air gap power developed by backward field\n", + "P_ag=P_agf-P_agb;\n", + "T_s=P_ag.real/w_s;\n", + "print '(f) starting torque (in Newton-meter)=%.2f'%T_s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) magnitude of line current (in Amperes)=1.207\n", + " phase of line current (in Degree)=-23.48\n", + "(b) power input (in Watts)=254.563\n", + "(c) Efficiency of motor (%)=57.5\n", + "(d) shaft torque (in Newton-meter)=1.488\n", + "(e) magnitude of voltage across capacitor (in Volts)=444.666\n", + "phase of voltage across capacitor (in Degree)=-68.29\n", + "(f) starting torque (in Newton-meter)=0.52\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4, Page 597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "R_m=2.5;#main winding resistance\n", + "R_a=100.;#auxilary winding resistance\n", + "#blocked-rotor test\n", + "V_bm=25.;#voltage (in Volts)\n", + "I_bm=3.72;#current (in Amperes)\n", + "P_bm=86.23;#power (in Watts)\n", + "#with auxilary winding open no load test\n", + "V_nL=115;#voltage (in Volts)\n", + "I_nL=3.2;#current (in Amperes)\n", + "P_nL=55.17;#power (in Watts)\n", + "#with main winding open blocked rotor test\n", + "V_ba=121;#voltage (in Volts)\n", + "I_ba=1.2;#current (in Amperes)\n", + "P_ba=145.35;#power (in Watts)\n", + "\n", + "#Calculations&Results\n", + "Z_bm=V_bm/I_bm;\n", + "R_bm=P_bm/I_bm**2;\n", + "X_bm=math.sqrt(Z_bm**2-R_bm**2);\n", + "X1=0.5*X_bm;\n", + "X2=X1;\n", + "R2=R_bm-R_m;\n", + "print 'X1 (in ohms)=%.2f'%X1\n", + "print 'X2 (in ohms)=%.2f'%X2\n", + "print 'R2 (in ohms)=%.2f'%R2\n", + "Z_nL=V_nL/I_nL;\n", + "R_nL=P_nL/I_nL**2;\n", + "X_nL=math.sqrt(Z_nL**2-R_nL**2);\n", + "X_m=2*X_nL-0.75*X_bm;\n", + "P_r=P_nL-I_nL**2*(R_m+0.25*R2);\n", + "print 'P_r (in Watts)=%.f'%(int(P_r))\n", + "print 'X_m (in ohms)=%.2f'%X_m\n", + "Z_ba=V_ba/I_ba;\n", + "R_ba=P_ba/I_ba**2;\n", + "R_2a=R_ba-R_a;\n", + "alpha=math.sqrt(R_2a/R2);\n", + "print 'alpha=%.1f'%alpha" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X1 (in ohms)=1.26\n", + "X2 (in ohms)=1.26\n", + "R2 (in ohms)=3.73\n", + "P_r (in Watts)=20\n", + "X_m (in ohms)=69.17\n", + "alpha=0.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5, Page 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "V_s=120;#in Volts\n", + "P_rot=80;#rotational loss (in Watts)\n", + "N_m=8000;#speed of motor (in rpm)\n", + "pf=0.912;#lagging\n", + "theta=-math.degrees(math.acos(pf))\n", + "\n", + "#Calculations&Results\n", + "I_a=17.58*complex(math.cos(theta*math.pi/180),math.sin(theta*math.pi/180));#in Amperes\n", + "Z_s=complex(0.65,1.2);#series field winding impedance (in ohms)\n", + "Z_a=complex(1.36,1.6);#armature winding impedance (in ohms)\n", + "E_a=V_s-I_a*(Z_s+Z_a);#induced emf (in Volts)\n", + "print '(a) induced emf in the armature (in Volts)=%.1f'%(math.sqrt(E_a.real**2+E_a.imag**2))\n", + "print 'phase of induced emf in the armature (in Degree)=%.2f'%(math.degrees(math.atan(E_a.imag/E_a.real)))\n", + "P_d=E_a*I_a.conjugate();\n", + "P_o=P_d.real-P_rot;\n", + "print '(b) power output (in Watts)=%.2f'%P_o\n", + "w_m=2*math.pi*N_m/60;#rated speed of motor (in rad/sec)\n", + "T_s=P_o/w_m;\n", + "print '(c) shaft torque (in Newton-meter)=%.2f'%T_s\n", + "P_in=V_s*abs(I_a)*pf;\n", + "Eff=P_o*100/P_in;\n", + "print '(d) Efficiency (%%)=%.1f'%Eff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) induced emf in the armature (in Volts)=74.1\n", + "phase of induced emf in the armature (in Degree)=-24.22\n", + "(b) power output (in Watts)=1222.75\n", + "(c) shaft torque (in Newton-meter)=1.46\n", + "(d) Efficiency (%)=63.6\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb new file mode 100644 index 00000000..1fc63a70 --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch11.ipynb @@ -0,0 +1,120 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c877f92f53167787736d030c7e71187c13be065ae6dadf741859ea31d04711be" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Dynamics of Electric Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7, Page 646" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "KVA=71500;#Kilo Volt-Ampere\n", + "V_r=13800;#in Volts\n", + "X_af=0.57;#in per unit\n", + "X_la=0.125;#in per unit\n", + "X_lf=0.239;#in per unit\n", + "X_ld=0.172;#in per unit\n", + "\n", + "#Calculations&Results\n", + "X_ds=X_la+((X_af*X_lf*X_ld)/(X_lf*X_ld+X_af*X_ld+X_af*X_lf));#subtransient reactance(in per unit)\n", + "E_phy=1.;#generated voltage (in per unit)\n", + "I_ds=E_phy/X_ds;#short circuit current (in per unit)\n", + "X_d=X_la+((X_af*X_lf)/(X_af+X_lf));#transient reactance (in per unit)\n", + "I_d=E_phy/X_d;#transient current (in per unit)\n", + "I_rated=KVA*1000/(math.sqrt(3)*V_r);#in Amperes\n", + "I_dsa=I_ds*I_rated;#sub transient current (in Amperes)\n", + "print 'sub-transient current (in Amperes)=%.2f'%I_dsa\n", + "I_da=I_d*I_rated;#transient current (in Amperes)\n", + "print 'transient current (in Amperes)=%.2f'%I_da\n", + "#Answer varies due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sub-transient current (in Amperes)=14238.48\n", + "transient current (in Amperes)=10195.69\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8, Page 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "f=60.;#in Hertzs\n", + "P=4.;#no. of poles\n", + "P_m=0.9;\n", + "H=10;#in Joule/Volt-Amperee\n", + "\n", + "#Calculations&Results\n", + "N_s=f*120/P;#synchronous speed in (rpm)\n", + "w_s=2*math.pi*N_s/f;#(in rad/sec)\n", + "P_dm=P_m/math.sin(18*math.pi/180);\n", + "t_c=P/f;#fault clearing time (in sec)\n", + "delta_o=18*2*math.pi/360;#in rad\n", + "delta_m=math.degrees(delta_o+((w_s/(P*H))*P_m*t_c**2))\n", + "P_d=P_dm*math.sin(delta_m*math.pi/180);\n", + "print '(a) power generated (in per unit)=%.2f'%P_d\n", + "delta_2=math.pi-delta_o;\n", + "delta_c=math.acos(((P_m/P_dm)*(delta_2-delta_o))+math.cos(delta_2));\n", + "t_cn=math.sqrt((delta_c-delta_o)*4*H/(w_s*P_m));\n", + "print '(b) critical fault clearing time (in sec)=%.3f'%t_cn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) power generated (in per unit)=0.95\n", + "(b) critical fault clearing time (in sec)=0.581\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb new file mode 100644 index 00000000..fbe22bb8 --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch12.ipynb @@ -0,0 +1,152 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e669c20812e01a3de7509b854fcd373ad98ac3cfd05f973ab8a7a3082e6c1738" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Special-Purpose Electric Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page 662" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "flux=0.004;#(in Weber)\n", + "R_a=0.8;#armature resistance (in ohm)\n", + "V_s=40;#applied voltage (in Volts)\n", + "T_d=1.2;#in Newton-meter\n", + "K_a=95;#motor constant\n", + "\n", + "#Calculations&Results\n", + "w_m=(V_s/(K_a*flux))-((R_a*T_d)/(K_a*flux)**2);\n", + "N_m=w_m*60/(2*math.pi);\n", + "print 'speed of motor (in rpm)=%.f'%(math.ceil(N_m))\n", + "w_mb=0;#for blocked rotor condition\n", + "T_db=(V_s*K_a*flux)/R_a;\n", + "print 'torque developed under blocked rotor condition (in Newton-meter)=%.f'%T_db" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed of motor (in rpm)=942\n", + "torque developed under blocked rotor condition (in Newton-meter)=19\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2, Page 662" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "N_m=1500;#speed of motor (in rpm)\n", + "R_a=2;#armature resistance (in ohms)\n", + "V_s=100;\n", + "P_o=200;#rated power \n", + "K_a=85;#machine constant\n", + "P_rot=15;#rotational loss\n", + "\n", + "#Calculations\n", + "w_m=(2*math.pi*N_m)/60;\n", + "P_d=P_o+P_rot;#power developed\n", + "T_d=P_d/w_m;#torque developed\n", + "def root(a,b,c):\n", + " return ((-b)+math.sqrt((b**2)-(4*a*c)))/(2*a);\n", + "\n", + "\n", + "#Result\n", + "print 'magnetic flux (in mWb)=%.2f'%(root(1,-0.0075,(2.41*10**-6))*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetic flux (in mWb)=7.16\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3, Page 682" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f=60;#frequency (in Hertzs)\n", + "P_pi=0.5;#pole pitch\n", + "F_d=100000;#developed thrust (in Newton)\n", + "\n", + "#Calculations&Results\n", + "V_m=200000./3600;#speed of motor (in meter/sec)\n", + "P_d=F_d*V_m;\n", + "print 'developed power (in Kilo-Watts)=%.f'%(int(P_d/1000))\n", + "V_s=2*P_pi*f;#synchronous speed of the motor (in meter/sec)\n", + "s=(V_s-V_m)/V_s;#slip\n", + "P_cu=F_d*s*V_s;\n", + "print 'Copper loss (in Kilo-Watts)=%.f'%(int(P_cu/1000))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "developed power (in Kilo-Watts)=5555\n", + "Copper loss (in Kilo-Watts)=444\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb new file mode 100644 index 00000000..cbafa256 --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch2.ipynb @@ -0,0 +1,393 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5ac0fcf729add8ad42e5962c5649d2a5a944710ab497f047f8a98ee7c6fe43e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Review of Basic Laws of Electromagnetism" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N=1000;#Number of turns\n", + "phy_1=100*10**-3;#initial magnetic flux (in webers)\n", + "phy_2=20*10**-3;#final magnetic flux (in webers)\n", + "\n", + "#Calculations\n", + "phy=phy_2-phy_1;#change in magnetic flux\n", + "t=5;#(in seconds)\n", + "e=(-1)*N*(phy/t);#induced emf (in volts)\n", + "\n", + "#Result\n", + "print 'Induced emf (in volts)=%.f'%e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Induced emf (in volts)=16\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, Page 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "u_o=4*math.pi*10**-7;#permeablity of air\n", + "u_r=1200;#permeablity of magnetic material\n", + "N=1500;#No. of turns\n", + "I=4;#current in the coil (in Amperes)\n", + "r_i=10*10**-2;#inner radii of magnetic core (in meters)\n", + "r_o=12*10**-2;#outer radii of magnetic core (in meters)\n", + "\n", + "#Calculations\n", + "r_m=(r_i+r_o)/2;#mean radii of magnetic core (in meters)\n", + "l_g=1*10**-2;#length of air gap (in meters)\n", + "l_m=2*math.pi*(r_m-l_g);#in meters\n", + "#Refer to fig:-2.14\n", + "A_m=(r_o-r_i)**2;#cross-sectional area of magnetic path (in meter**2)\n", + "R_m=l_m/(u_o*u_r*A_m);#reluctance of magnetic material\n", + "R_g=l_g/(u_o*A_m);#reluctance of air gap\n", + "#R_m and R_g in sereis\n", + "R=R_m+R_g;\n", + "B_m=N*I/(R*A_m);#magnetic flux density (in Tesla)\n", + "\n", + "#Result\n", + "print 'magnetic flux density (in Tesla)=%.3f T'%B_m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "magnetic flux density (in Tesla)=0.716 T\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, Page 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "#Refer to eqn 2.26\n", + "e_21=20.;#voltage induced in coil-2 (in volts)\n", + "I1=2000;#rate of change of current in coil-1 (in Amperes/second)\n", + "\n", + "#Calculations\n", + "M=e_21/I1;# in henry\n", + "L1=25*10**-3;#in henry\n", + "L2=25*10**-3;#in henry\n", + "#Refer to eqn 2.32\n", + "k=(M/L1)*100;#coefficient of coupling\n", + "\n", + "#Result\n", + "print 'percentage (%%)=%.f'%k" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage (%)=40\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, Page 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "#L1,L2=inductances of coil 1&2\n", + "#M=mutual inductance b/w coil 1&2\n", + "L_aid=2.38;#effective inductance when connected in sereis aiding\n", + "L_opp=1.02;#effective inductance when connected in sereis opposing\n", + "\n", + "#Calculations&Results\n", + "#L1+L2+2M=L_aid\n", + "#L1+L2-2M=L_opp\n", + "M=(L_aid-L_opp)/4;#in henry\n", + "print 'mutual inductance (in henry)= %.2f'%M\n", + "#L1=16*L2\n", + "L1=(L_aid-2*M)/17;#in henry\n", + "print 'inductance of coil-1 (in henry)= %.1f'%L1\n", + "L2=L_aid-(2*M)-L1;#in henry\n", + "print 'inductance of coil-2 (in henry)=%.1f'%L2\n", + "k=M/(math.sqrt(L1*L2));\n", + "print 'coefficient of coupling=%.2f'%k" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mutual inductance (in henry)= 0.34\n", + "inductance of coil-1 (in henry)= 0.1\n", + "inductance of coil-2 (in henry)=1.6\n", + "coefficient of coupling=0.85\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12, Page 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "L1=1.6;#self inductance of coil 1 (in Henry)\n", + "L2=0.1;#self inductance of coil 2 (in Henry)\n", + "M=0.34;#mutual inductance (in Henry)\n", + "\n", + "#Calculations&Results\n", + "#Refer to eqn-2.45\n", + "L_aid=((L1*L2)-M**2)*10**3/(L1+L2-(2*M));#in mili-Henry\n", + "print 'effective inductance in parallel aiding (in mili-Henry)=%.1f'%L_aid\n", + "#Refer to eqn-2.46\n", + "L_opp=((L1*L2)-M**2)*10**3/(L1+L2+(2*M));#in mili-henry\n", + "print 'effective inductance in parallel opposing (in mini-Henry)=%.1f'%L_opp" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "effective inductance in parallel aiding (in mili-Henry)=43.5\n", + "effective inductance in parallel opposing (in mini-Henry)=18.7\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13, Page 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy\n", + "\n", + "#Variable declaration\n", + "#refer to eqn-2.50\n", + "#eqn:-2.51,2.52 & 2.53 are obtained\n", + "f=numpy.array([25, 25, 60]);#in hertz\n", + "T = numpy.array([1.1,1.5,1.1])\n", + "\n", + "#Calculations&Results\n", + "B_m=numpy.array([1.1, 1.5, 1.1])\n", + "P_m=numpy.array([0.4, 0.8, 1.2])\n", + "#On solving eqn:-2.51 & eqn:-2.53\n", + "k_e=(0.016-0.02)/(30.25-72.6);\n", + "#on solving eqn:-2.51 & eqn:-2.52\n", + "n=(math.log((0.016-(30.25*k_e))/(0.032-(56.25*k_e))))/(math.log(1.1/1.5));\n", + "k_h=(0.016-(30.25*k_e))/1.1**n;\n", + "P_h=k_h*f*B_m**n#hysteresis loss\n", + "P_eddy=k_e*(f**2)*B_m**2#eddy current loss\n", + "\n", + "#Results\n", + "for n in range(3,):\n", + " print 'Frequency(Hz)\\t\\tFlux Density(T)\\t\\tHysteresis loss(W/kg)\\t\\tEddy-current loss(W/kg)\\n',(f[n]),\"\\t\\t\\t\",round(T[n],1),\"\\t\\t\\t\",round(P_h[n],3),\"\\t\\t\\t\\t\",round(P_eddy[n],3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency(Hz)\t\tFlux Density(T)\t\tHysteresis loss(W/kg)\t\tEddy-current loss(W/kg)\n", + "25 \t\t\t1.1 \t\t\t0.329 \t\t\t\t0.071\n", + "Frequency(Hz)\t\tFlux Density(T)\t\tHysteresis loss(W/kg)\t\tEddy-current loss(W/kg)\n", + "25 \t\t\t1.5 \t\t\t0.667 \t\t\t\t0.133\n", + "Frequency(Hz)\t\tFlux Density(T)\t\tHysteresis loss(W/kg)\t\tEddy-current loss(W/kg)\n", + "60 \t\t\t1.1 \t\t\t0.789 \t\t\t\t0.411\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14, Page 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "u_o=4*math.pi*10**-7;#permeablity of air\n", + "u_r=500;#permeablity of steel\n", + "l_g=1*10**-2;#length of air gap section (in meter)\n", + "A_g=10*10**-4;#cross-sectional area of air gap section (in meter**2)\n", + "A_m=10*10**-4;#cross-sectional area of magnet section (in meter**2)\n", + "A_s=10*10**-4;#cross-sectional area of steel sections (in meter**2)\n", + "l_s=50*10**-2;#length of steel section (in meter)\n", + "#Refer to fig:-2.29 (Demagnetization and energy-product curves of a magnet)\n", + "H_m=-144*10**3;#(in Ampere/meter)\n", + "B_m=0.23;#Magnetic flux density (in Tesla)\n", + "\n", + "#Calculations\n", + "#refer to eqn:-2.55\n", + "l_m=(-1*100)*(((l_g*A_m)/(u_o*A_g))+((2*l_s*A_m)/(u_o*u_r*A_s)))*(B_m/H_m);# (in centimeter)\n", + "\n", + "#Result\n", + "print 'minimum length of magnet (in centimeter)=%.2f'%l_m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum length of magnet (in centimeter)=1.53\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15, Page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import sympy\n", + "\n", + "#Variable declaration\n", + "#From figure 2.32(a)\n", + "lm = 52-42 #mean length of magnets,mm\n", + "ls = 2.5+2.5+(2*math.pi*54.5/4) #mean length of yoke,mm\n", + "lg = 42-40 #air gap,mm\n", + "la = 17.5+17.5+(2*math.pi*22.5/4) #mean length of rotor,mm\n", + "\n", + "#Calculations\n", + "#From figure 2.32(b)\n", + "Am = 50*(52+42)*math.pi/4 #cross-sectional area of magnet,mm^2\n", + "As = 5*50 #cross-sectional area of yoke,mm^2\n", + "Ag = 50*(42+40)*math.pi/4 #cross-sectional area of air-gap,mm^2\n", + "Aa = 35*50 #cross-sectional area of rotor,mm^2\n", + "\n", + "Bm = 0.337 #T\n", + "phi = Bm*Am #Wb\n", + "phi_t = round(2*phi*10**-3,3) #Wb\n", + "#We know that, phi_c = 2.488cos100t mWb\n", + "from sympy import Symbol,diff,cos\n", + "t = Symbol('t')\n", + "d_phi_by_dt = diff(cos(100*t),t)\n", + "e = -phi_t*d_phi_by_dt\n", + "#Result\n", + "print \"The induced emf is\",e,\"V\"\n", + "#Incorrect result in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The induced emf is 248.8*sin(100*t) V\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb new file mode 100644 index 00000000..e9592db7 --- /dev/null +++ b/_Electric_Machinery_And_Transformers_by_B._S._Guru_And_H._R._Hiziroglu/ch3.ipynb @@ -0,0 +1,399 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8539e9632363526a1a80f9cc5f76e7021b8f8d8a0160c441e4d39f4cdb32d610" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Principles of Electromechanical Energy Conversion" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "A=20*10**-4;#surface area of each capacitor's plate \n", + "d=5*10**-3;#separation between the plates\n", + "e=(10**-9)/(36*math.pi);#permetivity of air\n", + "V=10*10**3;#potential diff. between the plates\n", + "\n", + "#Calculations&Results\n", + "F_e=(e*A*V**2)/(2*d**2);#electric force\n", + "g=9.81;#acceleration due to gravity (in meter/second**2)\n", + "#For condt of balancing electric force=weight of object\n", + "#F_e=m*g\n", + "m=F_e/g;\n", + "print 'mass of object (in grams)=%.2f'%(m*1000)\n", + "W_f=(e*A*V**2)/(2*d);\n", + "print 'energy stored in the feild (in micro-joules)=%.f'%(W_f*1000000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of object (in grams)=3.61\n", + "energy stored in the feild (in micro-joules)=177\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import scipy\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration\n", + "#i=current in the ckt (in Amperes)\n", + "#x=total flux linkage\n", + "\n", + "#Calculations\n", + "def f(x):\n", + " return x/(6-(2*x))\n", + "#Refer to eqn:3.18\n", + "W_m,err=quad(f,0,2);#Energy stored in magnetic feild\n", + "\n", + "#Result\n", + "print 'Energy stored in magnetic feild (in Joules)=%.3f'%W_m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy stored in magnetic feild (in Joules)=0.648\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import scipy\n", + "from scipy.misc import derivative\n", + "\n", + "#Variable declaration\n", + "N=100;#no. of turns of coil\n", + "A=10**-4;#area \n", + "x=1*10**-2;#length of air gap\n", + "u_o=4*math.pi*10**-7;#permeablity of air\n", + "u_r=2000;#permeablity of magnetic material\n", + "D=7.85*10**3;#density of material (in kg/m**3)\n", + "V=11*10**-6;#volume of material\n", + "m=D*V;#mass of material\n", + "g=9.81;#acceleration due to gravity\n", + "\n", + "#Calculations&Results\n", + "#Refer to fig:3.7\n", + "R_o=(15.5*10**-2)/(u_o*u_r*A);#reluctance of outer legs\n", + "R_c=(5.5*10**-2)/(u_o*u_r*A);#reluctance of central leg\n", + "def L( x ):#inductance\n", + " return (N**2)/ R ( x );\n", + "\n", + "def R( x ):#total reluctance \n", + " return R_c+R_g(x)+(0.5*(R_o+R_g(x)));\n", + "\n", + "def R_g( x ):#reluctance of air gap\n", + " return x/(u_o*A);\n", + "\n", + "x = 0.01 ; # Points of interest\n", + "t = derivative(L,x)\n", + "#t=[diag(derivative(L,x))];#t=dL/dx (at x=0.01m)\n", + "#since tIn book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of brake power,fuel consumption\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.4, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\")\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "Pb_mep=1.5*1000;#brake mean effective pressure of each cylinder in Kpa\n", + "N=100;#engine rpm\n", + "D=85*10**-2;#bore of cylinder in m\n", + "L=220*10**-2;#stroke in m\n", + "C=43*10**3;#calorific value of diesel in KJ/kg\n", + "A=math.pi*D**2/4;\n", + "BP=Pb_mep*L*A*N/60\n", + "print(\"brake power of engine(BP) in MW=\"),round(BP,2)\n", + "print(\"so brake power is 3.121 MW\")\n", + "print(\"The fuel consumption in kg/hr(m)=m*BP in kg/hr\")\n", + "m=m*BP\n", + "print(\"In order to find out brake thermal efficiency the heat input from fuel per second is required.\")\n", + "print(\"heat from fuel(Q)in KJ/s\")\n", + "print(\"Q=m*C/3600\")\n", + "Q=m*C/3600\n", + "print(\"energy to brake power=3120.97 KW\")\n", + "n=BP/Q\n", + "print(\"brake thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\")\n", + "print(\"NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.5;pg no: 389" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.5, Page:389 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\n", + "brake thermal efficiency(n)=3600/(m*C) 0.33\n", + "in percentage 33.49\n", + "brake power(BP)in KW\n", + "BP= 226.19\n", + "brake specific fuel consumption,m=mf/BP\n", + "so mf=m*BP in kg/hr\n", + "air consumption(ma)from given air fuel ratio=k*mf in kg/hr\n", + "ma in kg/min\n", + "using perfect gas equation,\n", + "P*Va=ma*R*T\n", + "sa Va=ma*R*T/P in m^3/min\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder) 1.87\n", + "in percentage 186.55\n", + "NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,brake power,volumetric efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.5, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\")\n", + "Pb_mep=6*10**5;#brake mean effective pressure in pa\n", + "N=600;#engine rpm\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "D=20*10**-2;#bore of cylinder in m\n", + "L=30*10**-2;#stroke in m\n", + "k=26;#air to fuel ratio\n", + "C=43*10**3;#calorific value in KJ/kg\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27+273);#ambient temperature in K\n", + "P=1*10**2;#ambient pressure in Kpa\n", + "n=3600/(m*C)\n", + "print(\"brake thermal efficiency(n)=3600/(m*C)\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"brake power(BP)in KW\")\n", + "A=math.pi*D**2/4;\n", + "BP=4*Pb_mep*L*A*N/60000\n", + "print(\"BP=\"),round(BP,2)\n", + "print(\"brake specific fuel consumption,m=mf/BP\")\n", + "print(\"so mf=m*BP in kg/hr\")\n", + "mf=m*BP\n", + "print(\"air consumption(ma)from given air fuel ratio=k*mf in kg/hr\")\n", + "ma=k*mf\n", + "print(\"ma in kg/min\")\n", + "ma=ma/60\n", + "print(\"using perfect gas equation,\")\n", + "print(\"P*Va=ma*R*T\")\n", + "print(\"sa Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T/P\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "n_vol=Va/(Vs*(N/2)*4)\n", + "print(\"volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder)\"),round(n_vol,2)\n", + "print(\"in percentage\"),round(n_vol*100,2)\n", + "print(\"NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.6;pg no: 390" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.6, Page:390 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\n", + "let the bore diameter be (D) m\n", + "piston speed(V)=2*L*N\n", + "so L=V/(2*N) in m\n", + "volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\n", + "so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\n", + "so air sucked =274.78*D^2 m^3/min\n", + "air requirement(ma),kg/min=A/F ratio*fuel consumption per min\n", + "so ma=r*m in kg/min\n", + "using perfect gas equation,P*Va=ma*R*T\n", + "so Va=ma*R*T/P in m^3/min\n", + "ideally,air sucked=Va\n", + "so 274.78*D^2=0.906\n", + "D=sqrt(0.906/274.78) in m\n", + "indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\n", + "brake power=indicated power*mechanical efficiency\n", + "BP=IP*n_mech in KW 10.35\n", + "so brake power=10.34 KW\n" + ] + } + ], + "source": [ + "#cal of brake power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.6, Page:390 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\")\n", + "N=3000;#engine rpm\n", + "m=5;#fuel consumption in litre/hr\n", + "r=19;#air-fuel ratio\n", + "sg=0.7;#specific gravity of fuel\n", + "V=500;#piston speed in m/min\n", + "P_imep=6*10**5;#indicated mean effective pressure in pa\n", + "P=1.013*10**5;#ambient pressure in pa\n", + "T=(15+273);#ambient temperature in K\n", + "n_vol=0.7;#volumetric efficiency \n", + "n_mech=0.8;#mechanical efficiency\n", + "R=0.287;#gas constant for gas in KJ/kg K\n", + "print(\"let the bore diameter be (D) m\")\n", + "print(\"piston speed(V)=2*L*N\")\n", + "print(\"so L=V/(2*N) in m\")\n", + "L=V/(2*N)\n", + "L=0.0833;#approx.\n", + "print(\"volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\")\n", + "print(\"so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\")\n", + "n_vol*(math.pi*L/4)*N*2\n", + "print(\"so air sucked =274.78*D^2 m^3/min\")\n", + "print(\"air requirement(ma),kg/min=A/F ratio*fuel consumption per min\")\n", + "print(\"so ma=r*m in kg/min\")\n", + "ma=r*m*sg/60\n", + "print(\"using perfect gas equation,P*Va=ma*R*T\")\n", + "print(\"so Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T*1000/P \n", + "print(\"ideally,air sucked=Va\")\n", + "print(\"so 274.78*D^2=0.906\")\n", + "print(\"D=sqrt(0.906/274.78) in m\")\n", + "D=math.sqrt(0.906/274.78) \n", + "print(\"indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\")\n", + "IP=P_imep*L*(math.pi*D**2/4)*(N/60)*2/1000\n", + "print(\"brake power=indicated power*mechanical efficiency\")\n", + "BP=IP*n_mech \n", + "print(\"BP=IP*n_mech in KW\"),round(BP,2)\n", + "print(\"so brake power=10.34 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.7;pg no: 391" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.7, Page:391 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\n", + "After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\n", + "friction power(FP)=5 KW\n", + "brake power(BP) in KW= 30.82\n", + "indicated power(IP) in KW= 35.82\n", + "mechanical efficiency(n_mech)= 0.86\n", + "in percentage 86.04\n", + "brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr= 0.29\n", + "brake thermal efficiency(n_bte)= 0.29\n", + "in percentage 28.67\n", + "also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\n", + "indicated thermal efficiency(n_ite)= 0.33\n", + "in percentage 33.32\n", + "indicated power(IP)=P_imep*L*A*N\n", + "so P_imep in Kpa= 76.01\n", + "Also,mechanical efficiency=P_bmep/P_imep\n", + "so P_bmep in Kpa= 65.4\n", + "brake power=30.82 KW\n", + "indicated power=35.82 KW\n", + "mechanical efficiency=86.04%\n", + "brake thermal efficiency=28.67%\n", + "indicated thermal efficiency=33.32%\n", + "brake mean effective pressure=65.39 Kpa\n", + "indicated mean effective pressure=76.01 Kpa\n" + ] + } + ], + "source": [ + "#cal of power and efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.7, Page:391 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\")\n", + "M=20;#load on dynamometer in kg\n", + "r=50*10**-2;#radius in m\n", + "N=3000;#speed of rotation in rpm\n", + "D=20*10**-2;#bore in m\n", + "L=30*10**-2;#stroke in m\n", + "m=0.15;#fuel supplying rate in kg/min\n", + "C=43;#calorific value of fuel in MJ/kg\n", + "FP=5;#friction power in KW\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\")\n", + "print(\"friction power(FP)=5 KW\")\n", + "BP=2*math.pi*N*(M*g*r)*10**-3/60\n", + "print(\"brake power(BP) in KW=\"),round(BP,2)\n", + "IP=BP+FP\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "bsfc=m*60/BP\n", + "print(\"brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr=\"),round(bsfc,2)\n", + "n_bte=3600/(bsfc*C*1000)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\")\n", + "n_ite=n_bte/n_mech\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"indicated power(IP)=P_imep*L*A*N\")\n", + "P_imep=IP/(L*(math.pi*D**2/4)*N/60)\n", + "print(\"so P_imep in Kpa=\"),round(P_imep,2)\n", + "print(\"Also,mechanical efficiency=P_bmep/P_imep\")\n", + "n_mech=0.8604;#mechanical efficiency\n", + "P_bmep=P_imep*n_mech\n", + "print(\"so P_bmep in Kpa=\"),round(P_bmep,2)\n", + "print(\"brake power=30.82 KW\")\n", + "print(\"indicated power=35.82 KW\")\n", + "print(\"mechanical efficiency=86.04%\")\n", + "print(\"brake thermal efficiency=28.67%\")\n", + "print(\"indicated thermal efficiency=33.32%\")\n", + "print(\"brake mean effective pressure=65.39 Kpa\")\n", + "print(\"indicated mean effective pressure=76.01 Kpa\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.8;pg no: 392" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.8, Page:392 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\n", + "indicated power(IP) in KW= 282.74\n", + "mechanical efficiency(n_mech)=brake power/indicated power\n", + "so n_mech= 0.88\n", + "in percentage 88.42\n", + "brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\n", + "brake thermal efficiency(n_bte)= 0.35\n", + "in percentage 34.88\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "mass of air corresponding to above swept volume,using perfect gas equation\n", + "P*Vs=ma*R*T\n", + "so ma=(P*Vs)/(R*T) in kg\n", + "volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\n", + "so mass of air taken per minute in kg/min \n", + "mass corresponding to swept volume per minute in kg/min\n", + "so volumetric efficiency 0.8333\n", + "in percentage 83.3333\n", + "so indicated power =282.74 KW,mechanical efficiency=88.42%\n", + "brake thermal efficiency=34.88%,volumetric efficiency=83.33%\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,volumetric effeciency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.8, Page:392 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\")\n", + "N=300.;#engine rpm\n", + "BP=250.;#brake power in KW\n", + "D=30.*10**-2;#bore in m\n", + "L=25.*10**-2;#stroke in m\n", + "m=1.;#fuel consumption in kg/min\n", + "r=10.;#airfuel ratio \n", + "P_imep=0.8;#indicated mean effective pressure in pa\n", + "C=43.*10**3;#calorific value of fuel in KJ/kg\n", + "P=1.013*10**5;#ambient pressure in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27.+273.);#ambient temperature in K\n", + "IP=P_imep*L*(math.pi*D**2/4)*N*4*10**3/60\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "print(\"mechanical efficiency(n_mech)=brake power/indicated power\")\n", + "n_mech=BP/IP\n", + "print(\"so n_mech=\"),round(n_mech,2)\n", + "print(\"in percentage \"),round(n_mech*100,2)\n", + "print(\"brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\")\n", + "bsfc=m*60./BP\n", + "n_bte=3600./(bsfc*C)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "print(\"mass of air corresponding to above swept volume,using perfect gas equation\")\n", + "print(\"P*Vs=ma*R*T\")\n", + "print(\"so ma=(P*Vs)/(R*T) in kg\")\n", + "ma=(P*Vs)/(R*T*1000) \n", + "ma=0.02;#approx.\n", + "print(\"volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\")\n", + "print(\"so mass of air taken per minute in kg/min \")\n", + "1*10\n", + "print(\"mass corresponding to swept volume per minute in kg/min\")\n", + "ma*4*N/2\n", + "print(\"so volumetric efficiency \"),round(10./12.,4)\n", + "print(\"in percentage\"),round((10./12.)*100.,4)\n", + "print(\"so indicated power =282.74 KW,mechanical efficiency=88.42%\")\n", + "print(\"brake thermal efficiency=34.88%,volumetric efficiency=83.33%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.9;pg no: 393" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.9, Page:393 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\n", + "indicated mean effective pressure(P_imeb)=h*k in Kpa\n", + "indicated power(IP)=P_imeb*L*A*N/2 in KW 9.375\n", + "brake power(BP)=2*%pi*N*T in KW 4.62\n", + "mechanical efficiency(n_mech)= 0.49\n", + "in percentage 49.31\n", + "so indicated power=9.375 KW\n", + "brake power=4.62 KW\n", + "mechanical efficiency=49.28%\n", + "energy liberated from fuel(Ef)=C*m/60 in KJ/s\n", + "energy available as brake power(BP)=4.62 KW\n", + "energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\n", + "energy carried by exhaust gases(Eg)=30 KJ/s\n", + "unaccounted energy loss in KW= 34.75\n", + "NOTE=>overall energy balance sheet is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of indicated power,brake power,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.9, Page:393 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\")\n", + "h=10.;#height of indicator diagram in mm\n", + "k=25.;#indicator constant in KN/m^2 per mm\n", + "N=300.;#engine rpm\n", + "Vs=1.5*10**-2;#swept volume in m^3\n", + "M=60.;#effective brake load upon dynamometer in kg\n", + "r=50.*10**-2;#effective brake drum radius in m\n", + "m=0.12;#fuel consumption in kg/min\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "mw=6.;#circulating water rate in kg/min\n", + "T1=35.;#cooling water entering temperature in degree celcius\n", + "T2=70.;#cooling water leaving temperature in degree celcius\n", + "Eg=30.;#exhaust gases leaving energy in KJ/s\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "g=9.81;#accelaration due to gravity in m/s^2\n", + "print(\"indicated mean effective pressure(P_imeb)=h*k in Kpa\")\n", + "P_imeb=h*k\n", + "IP=P_imeb*Vs*N/(2*60)\n", + "print(\"indicated power(IP)=P_imeb*L*A*N/2 in KW\") ,round(IP,3)\n", + "BP=2*math.pi*N*(M*g*r*10**-3)/(2*60)\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=9.375 KW\")\n", + "print(\"brake power=4.62 KW\")\n", + "print(\"mechanical efficiency=49.28%\")\n", + "print(\"energy liberated from fuel(Ef)=C*m/60 in KJ/s\")\n", + "Ef=C*m/60\n", + "print(\"energy available as brake power(BP)=4.62 KW\")\n", + "print(\"energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\")\n", + "Ec=(mw/M)*Cw*(T2-T1)\n", + "print(\"energy carried by exhaust gases(Eg)=30 KJ/s\")\n", + "Ef-BP-Ec-Eg\n", + "print(\"unaccounted energy loss in KW=\"),round(Ef-BP-Ec-Eg,2)\n", + "print(\"NOTE=>overall energy balance sheet is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.10;pg no: 394" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.10, Page:394 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\n", + "brake power(BP)=2*%pi*N*T in KW 47.12\n", + "so brake power=47.124 KW\n", + "brake specific fuel consumption(bsfc) in kg/KW hr= 0.34\n", + "indicated power(IP) in Kw= 52.36\n", + "indicated thermal efficiency(n_ite)= 0.28\n", + "in percentage 28.05\n", + "so indicated thermal efficiency=28.05%\n", + "heat available from fuel(Qf)=(m/mw)*C in KJ/min 11200.0\n", + "energy consumed as brake power(BP) in KJ/min= 2827.43\n", + "energy carried by cooling water(Qw) in KJ/min= 1442.1\n", + "energy carried by exhaust gases(Qg) in KJ/min= 4786.83\n", + "unaccounted energy loss in KJ/min 2143.63\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of brake power,brake specific fuel consumption,indicated thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.10, Page:394 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\")\n", + "m=4.;#mass of fuel consumed in kg\n", + "N=1500.;#engine rpm\n", + "mw=15.;#water circulation rate in kg/min\n", + "T1=27.;#cooling water inlet temperature in degree celcius\n", + "T2=50.;#cooling water outlet temperature in degree celcius\n", + "ma=150.;#mass of air consumed in kg\n", + "T_exhaust=400.;#exhaust temperature in degree celcius\n", + "T_atm=27.;#atmospheric temperature in degree celcius\n", + "Cg=1.25;#mean specific heat of exhaust gases in KJ/kg K\n", + "n_mech=0.9;#mechanical efficiency\n", + "T=300.*10**-3;#brake torque in N\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*T/60\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "print(\"so brake power=47.124 KW\")\n", + "bsfc=m*60/(mw*BP)\n", + "print(\"brake specific fuel consumption(bsfc) in kg/KW hr=\"),round(bsfc,2)\n", + "IP=BP/n_mech\n", + "print(\"indicated power(IP) in Kw=\"),round(IP,2)\n", + "n_ite=IP*mw*60/(m*C)\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"so indicated thermal efficiency=28.05%\")\n", + "Qf=(m/mw)*C\n", + "print(\"heat available from fuel(Qf)=(m/mw)*C in KJ/min\"),round(Qf,2)\n", + "BP=BP*60 \n", + "print(\"energy consumed as brake power(BP) in KJ/min=\"),round(BP,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"energy carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "Qg=(ma+m)*Cg*(T_exhaust-T_atm)/mw\n", + "print(\"energy carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qf-(BP+Qw+Qg)\n", + "print(\"unaccounted energy loss in KJ/min\"),round(Qf-(BP+Qw+Qg),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.11;pg no: 395" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.11, Page:395 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\n", + "indicated power of 1st cylinder=BP-BP1 in KW\n", + "indicated power of 2nd cylinder=BP-BP2 in KW\n", + "indicated power of 3rd cylinder=BP-BP3 in KW\n", + "indicated power of 4th cylinder=BP-BP4 in KW\n", + "indicated power of 5th cylinder=BP-BP5 in KW\n", + "indicated power of 6th cylinder=BP-BP6 in KW\n", + " total indicated power(IP)in KW= 61.9\n", + "mechanical efficiency(n_mech)= 0.81\n", + "in percentage 80.78\n", + "so indicated power=61.9 KW\n", + "mechanical efficiency=80.77%\n" + ] + } + ], + "source": [ + "#cal of indicated power and mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.11, Page:395 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\")\n", + "BP=50.;#brake power output at full load in KW\n", + "BP1=40.1;#brake power output of 1st cylinder in KW\n", + "BP2=39.5;#brake power output of 2nd cylinder in KW\n", + "BP3=39.1;#brake power output of 3rd cylinder in KW\n", + "BP4=39.6;#brake power output of 4th cylinder in KW\n", + "BP5=39.8;#brake power output of 5th cylinder in KW\n", + "BP6=40.;#brake power output of 6th cylinder in KW\n", + "print(\"indicated power of 1st cylinder=BP-BP1 in KW\")\n", + "BP-BP1\n", + "print(\"indicated power of 2nd cylinder=BP-BP2 in KW\")\n", + "BP-BP2\n", + "print(\"indicated power of 3rd cylinder=BP-BP3 in KW\")\n", + "BP-BP3\n", + "print(\"indicated power of 4th cylinder=BP-BP4 in KW\")\n", + "BP-BP4\n", + "print(\"indicated power of 5th cylinder=BP-BP5 in KW\")\n", + "BP-BP5\n", + "print(\"indicated power of 6th cylinder=BP-BP6 in KW\")\n", + "BP-BP6\n", + "IP=9.9+10.5+10.9+10.4+10.2+10\n", + "print(\" total indicated power(IP)in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=61.9 KW\")\n", + "print(\"mechanical efficiency=80.77%\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.12;pg no: 396" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.12, Page:396 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\n", + "brake power output of engine(BP) in KW= 19.63\n", + "brake power when cylinder 1 is cut(BP1) in KW= 13.74\n", + "so indicated power of first cylinder(IP1) in KW= 5.89\n", + "brake power when cylinder 2 is cut(BP2) in KW= 14.14\n", + "so indicated power of second cylinder(IP2) in KW= 5.5\n", + "brake power when cylinder 3 is cut(BP3) in KW= 14.29\n", + "so indicated power of third cylinder(IP3) in KW= 5.34\n", + "brake power when cylinder 4 is cut(BP4) in KW= 13.35\n", + "so indicated power of fourth cylinder(IP4) in KW= 6.28\n", + "now total indicated power(IP) in KW 23.01\n", + "engine mechanical efficiency(n_mech)= 0.85\n", + "in percentage 85.32\n", + "so BP=19.63 KW,IP=23 KW,n_mech=83.35%\n", + "heat liberated by fuel(Qf)=m*C in KJ/min 8127.0\n", + "heat carried by exhaust gases(Qg) in KJ/min= 1436.02\n", + "heat carried by cooling water(Qw) in KJ/min= 1730.52\n", + "energy to brake power(BP) in KJ/min= 1177.8\n", + "unaccounted losses in KJ/min 3782.66\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \n" + ] + } + ], + "source": [ + "#cal of brake power,indicated power,heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.12, Page:396 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\")\n", + "N=1500.;#engine rpm at full load\n", + "F=250.;#brake load at full load in N\n", + "F1=175.;#brake reading 1 in N\n", + "F2=180.;#brake reading 2 in N\n", + "F3=182.;#brake reading 3 in N\n", + "F4=170.;#brake reading 4 in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "m=0.189;#fuel consumption rate in kg/min\n", + "C=43.*10**3;#fuel calorific value in KJ/kg\n", + "k=12.;#air to fuel ratio\n", + "T_exhaust=600.;#exhaust gas temperature in degree celcius\n", + "mw=18.;#cooling water flow rate in kg/min\n", + "T1=27.;#cooling water entering temperature in degree celcius\n", + "T2=50.;#cooling water leaving temperature in degree celcius\n", + "T_atm=27.;#atmospheric air temperature\n", + "Cg=1.02;#specific heat of exhaust gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*F*r*10**-3/60.\n", + "print(\"brake power output of engine(BP) in KW=\"),round(BP,2)\n", + "BP1=2.*math.pi*N*F1*r*10**-3/60.\n", + "print(\"brake power when cylinder 1 is cut(BP1) in KW=\"),round(BP1,2)\n", + "IP1=BP-BP1\n", + "print(\"so indicated power of first cylinder(IP1) in KW=\"),round(IP1,2)\n", + "BP2=2.*math.pi*N*F2*r*10**-3/60.\n", + "print(\"brake power when cylinder 2 is cut(BP2) in KW=\"),round(BP2,2)\n", + "IP2=BP-BP2\n", + "print(\"so indicated power of second cylinder(IP2) in KW=\"),round(IP2,2)\n", + "BP3=2.*math.pi*N*F3*r*10**-3/60.\n", + "print(\"brake power when cylinder 3 is cut(BP3) in KW=\"),round(BP3,2)\n", + "IP3=BP-BP3\n", + "print(\"so indicated power of third cylinder(IP3) in KW=\"),round(IP3,2)\n", + "BP4=2.*math.pi*N*F4*r*10**-3/60.\n", + "print(\"brake power when cylinder 4 is cut(BP4) in KW=\"),round(BP4,2)\n", + "IP4=BP-BP4\n", + "print(\"so indicated power of fourth cylinder(IP4) in KW=\"),round(IP4,2)\n", + "IP=IP1+IP2+IP3+IP4\n", + "print(\"now total indicated power(IP) in KW\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"engine mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so BP=19.63 KW,IP=23 KW,n_mech=83.35%\")\n", + "Qf=m*C\n", + "print(\"heat liberated by fuel(Qf)=m*C in KJ/min\"),round(Qf,2)\n", + "Qg=(k+1)*m*Cg*(T_exhaust-T_atm)\n", + "print(\"heat carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"heat carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "BP=19.63*60\n", + "print(\"energy to brake power(BP) in KJ/min=\"),round(19.63*60,2)\n", + "Qf-(Qg+Qw+BP)\n", + "print(\"unaccounted losses in KJ/min\"),round(Qf-(Qg+Qw+BP),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.13;pg no: 397" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.13, Page:397 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\n", + "brake power(BP)=2*%pi*N*T in KW\n", + "indicated power(IP)=(mep*L*A*N)/60000 in KW\n", + "A> heat added(Q)=m*C/3600 in KJ/s 52.36\n", + "or Q in KJ/min\n", + "thermal efficiency(n_th)= 0.27\n", + "in percentage 26.85\n", + "B> heat equivalent of brake power(BP) in KJ/min= 659.76\n", + "C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\n", + "heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\n", + "mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\n", + "mg=(ma+m)/60\n", + "mass of steam in exhaust gases in kg/min\n", + "mass of dry exhaust gases in kg/min\n", + "D> heat carried by steam in exhaust in KJ/min 299.86\n", + "E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min 782.64\n", + "F> unaccounted loss=A-B-C-D-E in KJ/min 537.4\n", + "NOTE># on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency and heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.13, Page:397 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\")\n", + "D=20.*10**-2;#cylinder diameter in m\n", + "L=28.*10**-2;#stroke in m\n", + "m=4.22;#mass of fuel used in kg\n", + "C=44670.;#calorific value of fuel in KJ/kg\n", + "N=21000./60.;#engine rpm\n", + "mep=2.74*10**5;#mean effective pressure in pa\n", + "F=600.;#net brake load applied to a drum of 100 cm diameter in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "mw=495.;#total mass of cooling water in kg\n", + "T1=13.;#cooling water inlet temperature in degree celcius\n", + "T2=38.;#cooling water outlet temperature in degree celcius\n", + "ma=135.;#mass of air used in kg\n", + "T_air=20.;#temperature of air in test room in degree celcius\n", + "T_exhaust=370.;#temperature of exhaust gases in degree celcius\n", + "Cp_gases=1.005;#specific heat of gases in KJ/kg K\n", + "Cp_steam=2.093;#specific heat of steam at atmospheric pressure in KJ/kg K\n", + "Cpw=4.18;#specific heat of water in KJ/kg K\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\")\n", + "BP=2*math.pi*N*F*r/60000\n", + "print(\"indicated power(IP)=(mep*L*A*N)/60000 in KW\")\n", + "IP=(mep*L*(math.pi*D**2/4)*N)/60000\n", + "Q=m*C/3600\n", + "print(\"A> heat added(Q)=m*C/3600 in KJ/s\"),round(Q,2)\n", + "print(\"or Q in KJ/min\")\n", + "Q=Q*60\n", + "Q=52.36;#heat added in KJ/s\n", + "n_th=IP/Q\n", + "print(\"thermal efficiency(n_th)= \"),round(n_th,2)\n", + "print(\"in percentage\"),round(n_th*100,2)\n", + "BP=BP*60\n", + "print(\"B> heat equivalent of brake power(BP) in KJ/min= \"),round(10.996*60,2)\n", + "print(\"C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\")\n", + "Qw=mw*Cpw*(T2-T1)/60\n", + "print(\"heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\")\n", + "print(\"mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\")\n", + "print(\"mg=(ma+m)/60\")\n", + "mg=(ma+m)/60\n", + "print(\"mass of steam in exhaust gases in kg/min\")\n", + "9*(0.15*m/60)\n", + "print(\"mass of dry exhaust gases in kg/min\")\n", + "mg-0.095\n", + "0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100))\n", + "print(\"D> heat carried by steam in exhaust in KJ/min\"),round(0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100)),2)\n", + "Qg=2.225*Cp_gases*(T_exhaust-T_air)\n", + "print(\"E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min\"),round(Qg,2)\n", + "print(\"F> unaccounted loss=A-B-C-D-E in KJ/min\"),round(3141.79-659.76-862.13-299.86-782.64,2)\n", + "print(\"NOTE># on per minute basis is attached as jpg file with this code.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb new file mode 100644 index 00000000..2d9241c2 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_1.ipynb @@ -0,0 +1,1080 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Intoduction to Internal Combustion engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.1;pg no: 387" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.1, Page:387 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\n", + "from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\n", + "stroke(L)=1.2*D in m\n", + "Area of indicator diagram(A)=30*10^-4 m^2\n", + "length of indicator diagram(l)=(1/2)*L in m\n", + "mean effective pressure(mep)=A*k/l in N/m^2\n", + "cross-section area of piston(Ap)=%pi*D^2/4 in m^2\n", + "for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\n", + "for four cylinder total indicated power(IP)=4*IP in W 90477.87\n", + "frictional power loss(FP)=0.10*IP in W\n", + "brake power available(BP)=indicated power-frictional power=IP-FP in W 81430.08\n", + "therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP= 0.9\n", + "in percentage 90.0\n", + "so indicated power=90477.8 W\n", + "and mechanical efficiency=90%\n" + ] + } + ], + "source": [ + "#cal of indicated power,,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.1, Page:387 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\")\n", + "k=20.*10**6;#spring constant in N/m^2\n", + "N=2000.;#engine rpm\n", + "print(\"from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\")\n", + "D=12.*10**-2;#cylinder diameter in m\n", + "print(\"stroke(L)=1.2*D in m\")\n", + "L=1.2*D\n", + "print(\"Area of indicator diagram(A)=30*10^-4 m^2\")\n", + "A=30.*10**-4;\n", + "print(\"length of indicator diagram(l)=(1/2)*L in m\")\n", + "l=(1./2.)*L\n", + "print(\"mean effective pressure(mep)=A*k/l in N/m^2\")\n", + "mep=A*k/l\n", + "print(\"cross-section area of piston(Ap)=%pi*D^2/4 in m^2\")\n", + "Ap=math.pi*D**2./4.\n", + "print(\"for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\")\n", + "IP=mep*Ap*L*N/(2.*60.)\n", + "IP=4.*IP\n", + "print(\"for four cylinder total indicated power(IP)=4*IP in W\"),round(IP,2)\n", + "print(\"frictional power loss(FP)=0.10*IP in W\")\n", + "FP=0.10*IP\n", + "BP=IP-FP\n", + "print(\"brake power available(BP)=indicated power-frictional power=IP-FP in W\"),round(BP,2)\n", + "n=BP/IP\n", + "print(\"therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP=\"),round(BP/IP,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so indicated power=90477.8 W\")\n", + "print(\"and mechanical efficiency=90%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.2;pg no: 388" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.2, Page:388 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\n", + "reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\n", + "mean effective pressure(mep)=A*k/l in pa\n", + "indicator power(IP)=Ap*L*mep*N*1*2/60 in W\n", + "(it is double acting so let us assume total power to be double of that in single acting) 88357.29\n", + "so power required to drive=88.36 KW\n" + ] + } + ], + "source": [ + "#cal of power required to drive\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.2, Page:388 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\")\n", + "A=40*10**-4;#area of indicator diagram in m^2\n", + "l=8*10**-2;#length of indicator diagram in m\n", + "D=15*10**-2;#bore of cylinder in m\n", + "L=20*10**-2;#stroke in m\n", + "k=1.5*10**8;#spring constant in pa/m\n", + "N=100;#pump motor rpm\n", + "print(\"reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\")\n", + "print(\"mean effective pressure(mep)=A*k/l in pa\")\n", + "mep=A*k/l \n", + "print(\"indicator power(IP)=Ap*L*mep*N*1*2/60 in W\")\n", + "Ap=math.pi*D**2/4\n", + "IP=Ap*L*mep*N*2/60\n", + "print(\"(it is double acting so let us assume total power to be double of that in single acting)\"),round(IP,2)\n", + "print(\"so power required to drive=88.36 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.3;pg no: 388" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.3, Page:388 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\n", + "indicated power(IP)=brake power/mechanical efficiency in KW= 42.22\n", + "frictional power loss(FP)=IP-BP in KW 4.22\n", + "brake power at quater load(BPq)=0.25*BP in KW\n", + "mechanical efficiency(n1)=BPq/IP 0.69\n", + "in percentage 69.23\n", + "so indicated power=42.22 KW\n", + "frictional power loss=4.22 KW\n", + "mechanical efficiency=69.24%\n" + ] + } + ], + "source": [ + "#cal of indicated power,frictional power loss,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "print\"Example 10.3, Page:388 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\")\n", + "n=0.9;#mechanical efficiency of engine\n", + "BP=38;#brake power in KW\n", + "IP=BP/n\n", + "print(\"indicated power(IP)=brake power/mechanical efficiency in KW=\"),round(IP,2)\n", + "FP=IP-BP\n", + "print(\"frictional power loss(FP)=IP-BP in KW\"),round(FP,2)\n", + "print(\"brake power at quater load(BPq)=0.25*BP in KW\")\n", + "BPq=0.25*BP\n", + "IP=BPq+FP;\n", + "n1=BPq/IP\n", + "print(\"mechanical efficiency(n1)=BPq/IP\"),round(n1,2)\n", + "print(\"in percentage\"),round(n1*100,2)\n", + "print(\"so indicated power=42.22 KW\")\n", + "print(\"frictional power loss=4.22 KW\")\n", + "print(\"mechanical efficiency=69.24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.4;pg no: 389" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.4, Page:389 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\n", + "brake power of engine(BP) in MW= 3120.98\n", + "so brake power is 3.121 MW\n", + "The fuel consumption in kg/hr(m)=m*BP in kg/hr\n", + "In order to find out brake thermal efficiency the heat input from fuel per second is required.\n", + "heat from fuel(Q)in KJ/s\n", + "Q=m*C/3600\n", + "energy to brake power=3120.97 KW\n", + "brake thermal efficiency(n)= 0.33\n", + "in percentage 33.49\n", + "so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\n", + "NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of brake power,fuel consumption\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.4, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\")\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "Pb_mep=1.5*1000;#brake mean effective pressure of each cylinder in Kpa\n", + "N=100;#engine rpm\n", + "D=85*10**-2;#bore of cylinder in m\n", + "L=220*10**-2;#stroke in m\n", + "C=43*10**3;#calorific value of diesel in KJ/kg\n", + "A=math.pi*D**2/4;\n", + "BP=Pb_mep*L*A*N/60\n", + "print(\"brake power of engine(BP) in MW=\"),round(BP,2)\n", + "print(\"so brake power is 3.121 MW\")\n", + "print(\"The fuel consumption in kg/hr(m)=m*BP in kg/hr\")\n", + "m=m*BP\n", + "print(\"In order to find out brake thermal efficiency the heat input from fuel per second is required.\")\n", + "print(\"heat from fuel(Q)in KJ/s\")\n", + "print(\"Q=m*C/3600\")\n", + "Q=m*C/3600\n", + "print(\"energy to brake power=3120.97 KW\")\n", + "n=BP/Q\n", + "print(\"brake thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\")\n", + "print(\"NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.5;pg no: 389" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.5, Page:389 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\n", + "brake thermal efficiency(n)=3600/(m*C) 0.33\n", + "in percentage 33.49\n", + "brake power(BP)in KW\n", + "BP= 226.19\n", + "brake specific fuel consumption,m=mf/BP\n", + "so mf=m*BP in kg/hr\n", + "air consumption(ma)from given air fuel ratio=k*mf in kg/hr\n", + "ma in kg/min\n", + "using perfect gas equation,\n", + "P*Va=ma*R*T\n", + "sa Va=ma*R*T/P in m^3/min\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder) 1.87\n", + "in percentage 186.55\n", + "NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,brake power,volumetric efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.5, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\")\n", + "Pb_mep=6*10**5;#brake mean effective pressure in pa\n", + "N=600;#engine rpm\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "D=20*10**-2;#bore of cylinder in m\n", + "L=30*10**-2;#stroke in m\n", + "k=26;#air to fuel ratio\n", + "C=43*10**3;#calorific value in KJ/kg\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27+273);#ambient temperature in K\n", + "P=1*10**2;#ambient pressure in Kpa\n", + "n=3600/(m*C)\n", + "print(\"brake thermal efficiency(n)=3600/(m*C)\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"brake power(BP)in KW\")\n", + "A=math.pi*D**2/4;\n", + "BP=4*Pb_mep*L*A*N/60000\n", + "print(\"BP=\"),round(BP,2)\n", + "print(\"brake specific fuel consumption,m=mf/BP\")\n", + "print(\"so mf=m*BP in kg/hr\")\n", + "mf=m*BP\n", + "print(\"air consumption(ma)from given air fuel ratio=k*mf in kg/hr\")\n", + "ma=k*mf\n", + "print(\"ma in kg/min\")\n", + "ma=ma/60\n", + "print(\"using perfect gas equation,\")\n", + "print(\"P*Va=ma*R*T\")\n", + "print(\"sa Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T/P\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "n_vol=Va/(Vs*(N/2)*4)\n", + "print(\"volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder)\"),round(n_vol,2)\n", + "print(\"in percentage\"),round(n_vol*100,2)\n", + "print(\"NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.6;pg no: 390" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.6, Page:390 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\n", + "let the bore diameter be (D) m\n", + "piston speed(V)=2*L*N\n", + "so L=V/(2*N) in m\n", + "volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\n", + "so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\n", + "so air sucked =274.78*D^2 m^3/min\n", + "air requirement(ma),kg/min=A/F ratio*fuel consumption per min\n", + "so ma=r*m in kg/min\n", + "using perfect gas equation,P*Va=ma*R*T\n", + "so Va=ma*R*T/P in m^3/min\n", + "ideally,air sucked=Va\n", + "so 274.78*D^2=0.906\n", + "D=sqrt(0.906/274.78) in m\n", + "indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\n", + "brake power=indicated power*mechanical efficiency\n", + "BP=IP*n_mech in KW 10.35\n", + "so brake power=10.34 KW\n" + ] + } + ], + "source": [ + "#cal of brake power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.6, Page:390 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\")\n", + "N=3000;#engine rpm\n", + "m=5;#fuel consumption in litre/hr\n", + "r=19;#air-fuel ratio\n", + "sg=0.7;#specific gravity of fuel\n", + "V=500;#piston speed in m/min\n", + "P_imep=6*10**5;#indicated mean effective pressure in pa\n", + "P=1.013*10**5;#ambient pressure in pa\n", + "T=(15+273);#ambient temperature in K\n", + "n_vol=0.7;#volumetric efficiency \n", + "n_mech=0.8;#mechanical efficiency\n", + "R=0.287;#gas constant for gas in KJ/kg K\n", + "print(\"let the bore diameter be (D) m\")\n", + "print(\"piston speed(V)=2*L*N\")\n", + "print(\"so L=V/(2*N) in m\")\n", + "L=V/(2*N)\n", + "L=0.0833;#approx.\n", + "print(\"volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\")\n", + "print(\"so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\")\n", + "n_vol*(math.pi*L/4)*N*2\n", + "print(\"so air sucked =274.78*D^2 m^3/min\")\n", + "print(\"air requirement(ma),kg/min=A/F ratio*fuel consumption per min\")\n", + "print(\"so ma=r*m in kg/min\")\n", + "ma=r*m*sg/60\n", + "print(\"using perfect gas equation,P*Va=ma*R*T\")\n", + "print(\"so Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T*1000/P \n", + "print(\"ideally,air sucked=Va\")\n", + "print(\"so 274.78*D^2=0.906\")\n", + "print(\"D=sqrt(0.906/274.78) in m\")\n", + "D=math.sqrt(0.906/274.78) \n", + "print(\"indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\")\n", + "IP=P_imep*L*(math.pi*D**2/4)*(N/60)*2/1000\n", + "print(\"brake power=indicated power*mechanical efficiency\")\n", + "BP=IP*n_mech \n", + "print(\"BP=IP*n_mech in KW\"),round(BP,2)\n", + "print(\"so brake power=10.34 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.7;pg no: 391" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.7, Page:391 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\n", + "After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\n", + "friction power(FP)=5 KW\n", + "brake power(BP) in KW= 30.82\n", + "indicated power(IP) in KW= 35.82\n", + "mechanical efficiency(n_mech)= 0.86\n", + "in percentage 86.04\n", + "brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr= 0.29\n", + "brake thermal efficiency(n_bte)= 0.29\n", + "in percentage 28.67\n", + "also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\n", + "indicated thermal efficiency(n_ite)= 0.33\n", + "in percentage 33.32\n", + "indicated power(IP)=P_imep*L*A*N\n", + "so P_imep in Kpa= 76.01\n", + "Also,mechanical efficiency=P_bmep/P_imep\n", + "so P_bmep in Kpa= 65.4\n", + "brake power=30.82 KW\n", + "indicated power=35.82 KW\n", + "mechanical efficiency=86.04%\n", + "brake thermal efficiency=28.67%\n", + "indicated thermal efficiency=33.32%\n", + "brake mean effective pressure=65.39 Kpa\n", + "indicated mean effective pressure=76.01 Kpa\n" + ] + } + ], + "source": [ + "#cal of power and efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.7, Page:391 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\")\n", + "M=20;#load on dynamometer in kg\n", + "r=50*10**-2;#radius in m\n", + "N=3000;#speed of rotation in rpm\n", + "D=20*10**-2;#bore in m\n", + "L=30*10**-2;#stroke in m\n", + "m=0.15;#fuel supplying rate in kg/min\n", + "C=43;#calorific value of fuel in MJ/kg\n", + "FP=5;#friction power in KW\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\")\n", + "print(\"friction power(FP)=5 KW\")\n", + "BP=2*math.pi*N*(M*g*r)*10**-3/60\n", + "print(\"brake power(BP) in KW=\"),round(BP,2)\n", + "IP=BP+FP\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "bsfc=m*60/BP\n", + "print(\"brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr=\"),round(bsfc,2)\n", + "n_bte=3600/(bsfc*C*1000)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\")\n", + "n_ite=n_bte/n_mech\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"indicated power(IP)=P_imep*L*A*N\")\n", + "P_imep=IP/(L*(math.pi*D**2/4)*N/60)\n", + "print(\"so P_imep in Kpa=\"),round(P_imep,2)\n", + "print(\"Also,mechanical efficiency=P_bmep/P_imep\")\n", + "n_mech=0.8604;#mechanical efficiency\n", + "P_bmep=P_imep*n_mech\n", + "print(\"so P_bmep in Kpa=\"),round(P_bmep,2)\n", + "print(\"brake power=30.82 KW\")\n", + "print(\"indicated power=35.82 KW\")\n", + "print(\"mechanical efficiency=86.04%\")\n", + "print(\"brake thermal efficiency=28.67%\")\n", + "print(\"indicated thermal efficiency=33.32%\")\n", + "print(\"brake mean effective pressure=65.39 Kpa\")\n", + "print(\"indicated mean effective pressure=76.01 Kpa\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.8;pg no: 392" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.8, Page:392 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\n", + "indicated power(IP) in KW= 282.74\n", + "mechanical efficiency(n_mech)=brake power/indicated power\n", + "so n_mech= 0.88\n", + "in percentage 88.42\n", + "brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\n", + "brake thermal efficiency(n_bte)= 0.35\n", + "in percentage 34.88\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "mass of air corresponding to above swept volume,using perfect gas equation\n", + "P*Vs=ma*R*T\n", + "so ma=(P*Vs)/(R*T) in kg\n", + "volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\n", + "so mass of air taken per minute in kg/min \n", + "mass corresponding to swept volume per minute in kg/min\n", + "so volumetric efficiency 0.8333\n", + "in percentage 83.3333\n", + "so indicated power =282.74 KW,mechanical efficiency=88.42%\n", + "brake thermal efficiency=34.88%,volumetric efficiency=83.33%\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,volumetric effeciency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.8, Page:392 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\")\n", + "N=300.;#engine rpm\n", + "BP=250.;#brake power in KW\n", + "D=30.*10**-2;#bore in m\n", + "L=25.*10**-2;#stroke in m\n", + "m=1.;#fuel consumption in kg/min\n", + "r=10.;#airfuel ratio \n", + "P_imep=0.8;#indicated mean effective pressure in pa\n", + "C=43.*10**3;#calorific value of fuel in KJ/kg\n", + "P=1.013*10**5;#ambient pressure in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27.+273.);#ambient temperature in K\n", + "IP=P_imep*L*(math.pi*D**2/4)*N*4*10**3/60\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "print(\"mechanical efficiency(n_mech)=brake power/indicated power\")\n", + "n_mech=BP/IP\n", + "print(\"so n_mech=\"),round(n_mech,2)\n", + "print(\"in percentage \"),round(n_mech*100,2)\n", + "print(\"brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\")\n", + "bsfc=m*60./BP\n", + "n_bte=3600./(bsfc*C)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "print(\"mass of air corresponding to above swept volume,using perfect gas equation\")\n", + "print(\"P*Vs=ma*R*T\")\n", + "print(\"so ma=(P*Vs)/(R*T) in kg\")\n", + "ma=(P*Vs)/(R*T*1000) \n", + "ma=0.02;#approx.\n", + "print(\"volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\")\n", + "print(\"so mass of air taken per minute in kg/min \")\n", + "1*10\n", + "print(\"mass corresponding to swept volume per minute in kg/min\")\n", + "ma*4*N/2\n", + "print(\"so volumetric efficiency \"),round(10./12.,4)\n", + "print(\"in percentage\"),round((10./12.)*100.,4)\n", + "print(\"so indicated power =282.74 KW,mechanical efficiency=88.42%\")\n", + "print(\"brake thermal efficiency=34.88%,volumetric efficiency=83.33%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.9;pg no: 393" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.9, Page:393 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\n", + "indicated mean effective pressure(P_imeb)=h*k in Kpa\n", + "indicated power(IP)=P_imeb*L*A*N/2 in KW 9.375\n", + "brake power(BP)=2*%pi*N*T in KW 4.62\n", + "mechanical efficiency(n_mech)= 0.49\n", + "in percentage 49.31\n", + "so indicated power=9.375 KW\n", + "brake power=4.62 KW\n", + "mechanical efficiency=49.28%\n", + "energy liberated from fuel(Ef)=C*m/60 in KJ/s\n", + "energy available as brake power(BP)=4.62 KW\n", + "energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\n", + "energy carried by exhaust gases(Eg)=30 KJ/s\n", + "unaccounted energy loss in KW= 34.75\n", + "NOTE=>overall energy balance sheet is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of indicated power,brake power,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.9, Page:393 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\")\n", + "h=10.;#height of indicator diagram in mm\n", + "k=25.;#indicator constant in KN/m^2 per mm\n", + "N=300.;#engine rpm\n", + "Vs=1.5*10**-2;#swept volume in m^3\n", + "M=60.;#effective brake load upon dynamometer in kg\n", + "r=50.*10**-2;#effective brake drum radius in m\n", + "m=0.12;#fuel consumption in kg/min\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "mw=6.;#circulating water rate in kg/min\n", + "T1=35.;#cooling water entering temperature in degree celcius\n", + "T2=70.;#cooling water leaving temperature in degree celcius\n", + "Eg=30.;#exhaust gases leaving energy in KJ/s\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "g=9.81;#accelaration due to gravity in m/s^2\n", + "print(\"indicated mean effective pressure(P_imeb)=h*k in Kpa\")\n", + "P_imeb=h*k\n", + "IP=P_imeb*Vs*N/(2*60)\n", + "print(\"indicated power(IP)=P_imeb*L*A*N/2 in KW\") ,round(IP,3)\n", + "BP=2*math.pi*N*(M*g*r*10**-3)/(2*60)\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=9.375 KW\")\n", + "print(\"brake power=4.62 KW\")\n", + "print(\"mechanical efficiency=49.28%\")\n", + "print(\"energy liberated from fuel(Ef)=C*m/60 in KJ/s\")\n", + "Ef=C*m/60\n", + "print(\"energy available as brake power(BP)=4.62 KW\")\n", + "print(\"energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\")\n", + "Ec=(mw/M)*Cw*(T2-T1)\n", + "print(\"energy carried by exhaust gases(Eg)=30 KJ/s\")\n", + "Ef-BP-Ec-Eg\n", + "print(\"unaccounted energy loss in KW=\"),round(Ef-BP-Ec-Eg,2)\n", + "print(\"NOTE=>overall energy balance sheet is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.10;pg no: 394" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.10, Page:394 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\n", + "brake power(BP)=2*%pi*N*T in KW 47.12\n", + "so brake power=47.124 KW\n", + "brake specific fuel consumption(bsfc) in kg/KW hr= 0.34\n", + "indicated power(IP) in Kw= 52.36\n", + "indicated thermal efficiency(n_ite)= 0.28\n", + "in percentage 28.05\n", + "so indicated thermal efficiency=28.05%\n", + "heat available from fuel(Qf)=(m/mw)*C in KJ/min 11200.0\n", + "energy consumed as brake power(BP) in KJ/min= 2827.43\n", + "energy carried by cooling water(Qw) in KJ/min= 1442.1\n", + "energy carried by exhaust gases(Qg) in KJ/min= 4786.83\n", + "unaccounted energy loss in KJ/min 2143.63\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of brake power,brake specific fuel consumption,indicated thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.10, Page:394 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\")\n", + "m=4.;#mass of fuel consumed in kg\n", + "N=1500.;#engine rpm\n", + "mw=15.;#water circulation rate in kg/min\n", + "T1=27.;#cooling water inlet temperature in degree celcius\n", + "T2=50.;#cooling water outlet temperature in degree celcius\n", + "ma=150.;#mass of air consumed in kg\n", + "T_exhaust=400.;#exhaust temperature in degree celcius\n", + "T_atm=27.;#atmospheric temperature in degree celcius\n", + "Cg=1.25;#mean specific heat of exhaust gases in KJ/kg K\n", + "n_mech=0.9;#mechanical efficiency\n", + "T=300.*10**-3;#brake torque in N\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*T/60\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "print(\"so brake power=47.124 KW\")\n", + "bsfc=m*60/(mw*BP)\n", + "print(\"brake specific fuel consumption(bsfc) in kg/KW hr=\"),round(bsfc,2)\n", + "IP=BP/n_mech\n", + "print(\"indicated power(IP) in Kw=\"),round(IP,2)\n", + "n_ite=IP*mw*60/(m*C)\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"so indicated thermal efficiency=28.05%\")\n", + "Qf=(m/mw)*C\n", + "print(\"heat available from fuel(Qf)=(m/mw)*C in KJ/min\"),round(Qf,2)\n", + "BP=BP*60 \n", + "print(\"energy consumed as brake power(BP) in KJ/min=\"),round(BP,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"energy carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "Qg=(ma+m)*Cg*(T_exhaust-T_atm)/mw\n", + "print(\"energy carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qf-(BP+Qw+Qg)\n", + "print(\"unaccounted energy loss in KJ/min\"),round(Qf-(BP+Qw+Qg),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.11;pg no: 395" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.11, Page:395 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\n", + "indicated power of 1st cylinder=BP-BP1 in KW\n", + "indicated power of 2nd cylinder=BP-BP2 in KW\n", + "indicated power of 3rd cylinder=BP-BP3 in KW\n", + "indicated power of 4th cylinder=BP-BP4 in KW\n", + "indicated power of 5th cylinder=BP-BP5 in KW\n", + "indicated power of 6th cylinder=BP-BP6 in KW\n", + " total indicated power(IP)in KW= 61.9\n", + "mechanical efficiency(n_mech)= 0.81\n", + "in percentage 80.78\n", + "so indicated power=61.9 KW\n", + "mechanical efficiency=80.77%\n" + ] + } + ], + "source": [ + "#cal of indicated power and mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.11, Page:395 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\")\n", + "BP=50.;#brake power output at full load in KW\n", + "BP1=40.1;#brake power output of 1st cylinder in KW\n", + "BP2=39.5;#brake power output of 2nd cylinder in KW\n", + "BP3=39.1;#brake power output of 3rd cylinder in KW\n", + "BP4=39.6;#brake power output of 4th cylinder in KW\n", + "BP5=39.8;#brake power output of 5th cylinder in KW\n", + "BP6=40.;#brake power output of 6th cylinder in KW\n", + "print(\"indicated power of 1st cylinder=BP-BP1 in KW\")\n", + "BP-BP1\n", + "print(\"indicated power of 2nd cylinder=BP-BP2 in KW\")\n", + "BP-BP2\n", + "print(\"indicated power of 3rd cylinder=BP-BP3 in KW\")\n", + "BP-BP3\n", + "print(\"indicated power of 4th cylinder=BP-BP4 in KW\")\n", + "BP-BP4\n", + "print(\"indicated power of 5th cylinder=BP-BP5 in KW\")\n", + "BP-BP5\n", + "print(\"indicated power of 6th cylinder=BP-BP6 in KW\")\n", + "BP-BP6\n", + "IP=9.9+10.5+10.9+10.4+10.2+10\n", + "print(\" total indicated power(IP)in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=61.9 KW\")\n", + "print(\"mechanical efficiency=80.77%\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.12;pg no: 396" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.12, Page:396 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\n", + "brake power output of engine(BP) in KW= 19.63\n", + "brake power when cylinder 1 is cut(BP1) in KW= 13.74\n", + "so indicated power of first cylinder(IP1) in KW= 5.89\n", + "brake power when cylinder 2 is cut(BP2) in KW= 14.14\n", + "so indicated power of second cylinder(IP2) in KW= 5.5\n", + "brake power when cylinder 3 is cut(BP3) in KW= 14.29\n", + "so indicated power of third cylinder(IP3) in KW= 5.34\n", + "brake power when cylinder 4 is cut(BP4) in KW= 13.35\n", + "so indicated power of fourth cylinder(IP4) in KW= 6.28\n", + "now total indicated power(IP) in KW 23.01\n", + "engine mechanical efficiency(n_mech)= 0.85\n", + "in percentage 85.32\n", + "so BP=19.63 KW,IP=23 KW,n_mech=83.35%\n", + "heat liberated by fuel(Qf)=m*C in KJ/min 8127.0\n", + "heat carried by exhaust gases(Qg) in KJ/min= 1436.02\n", + "heat carried by cooling water(Qw) in KJ/min= 1730.52\n", + "energy to brake power(BP) in KJ/min= 1177.8\n", + "unaccounted losses in KJ/min 3782.66\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \n" + ] + } + ], + "source": [ + "#cal of brake power,indicated power,heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.12, Page:396 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\")\n", + "N=1500.;#engine rpm at full load\n", + "F=250.;#brake load at full load in N\n", + "F1=175.;#brake reading 1 in N\n", + "F2=180.;#brake reading 2 in N\n", + "F3=182.;#brake reading 3 in N\n", + "F4=170.;#brake reading 4 in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "m=0.189;#fuel consumption rate in kg/min\n", + "C=43.*10**3;#fuel calorific value in KJ/kg\n", + "k=12.;#air to fuel ratio\n", + "T_exhaust=600.;#exhaust gas temperature in degree celcius\n", + "mw=18.;#cooling water flow rate in kg/min\n", + "T1=27.;#cooling water entering temperature in degree celcius\n", + "T2=50.;#cooling water leaving temperature in degree celcius\n", + "T_atm=27.;#atmospheric air temperature\n", + "Cg=1.02;#specific heat of exhaust gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*F*r*10**-3/60.\n", + "print(\"brake power output of engine(BP) in KW=\"),round(BP,2)\n", + "BP1=2.*math.pi*N*F1*r*10**-3/60.\n", + "print(\"brake power when cylinder 1 is cut(BP1) in KW=\"),round(BP1,2)\n", + "IP1=BP-BP1\n", + "print(\"so indicated power of first cylinder(IP1) in KW=\"),round(IP1,2)\n", + "BP2=2.*math.pi*N*F2*r*10**-3/60.\n", + "print(\"brake power when cylinder 2 is cut(BP2) in KW=\"),round(BP2,2)\n", + "IP2=BP-BP2\n", + "print(\"so indicated power of second cylinder(IP2) in KW=\"),round(IP2,2)\n", + "BP3=2.*math.pi*N*F3*r*10**-3/60.\n", + "print(\"brake power when cylinder 3 is cut(BP3) in KW=\"),round(BP3,2)\n", + "IP3=BP-BP3\n", + "print(\"so indicated power of third cylinder(IP3) in KW=\"),round(IP3,2)\n", + "BP4=2.*math.pi*N*F4*r*10**-3/60.\n", + "print(\"brake power when cylinder 4 is cut(BP4) in KW=\"),round(BP4,2)\n", + "IP4=BP-BP4\n", + "print(\"so indicated power of fourth cylinder(IP4) in KW=\"),round(IP4,2)\n", + "IP=IP1+IP2+IP3+IP4\n", + "print(\"now total indicated power(IP) in KW\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"engine mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so BP=19.63 KW,IP=23 KW,n_mech=83.35%\")\n", + "Qf=m*C\n", + "print(\"heat liberated by fuel(Qf)=m*C in KJ/min\"),round(Qf,2)\n", + "Qg=(k+1)*m*Cg*(T_exhaust-T_atm)\n", + "print(\"heat carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"heat carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "BP=19.63*60\n", + "print(\"energy to brake power(BP) in KJ/min=\"),round(19.63*60,2)\n", + "Qf-(Qg+Qw+BP)\n", + "print(\"unaccounted losses in KJ/min\"),round(Qf-(Qg+Qw+BP),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.13;pg no: 397" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.13, Page:397 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\n", + "brake power(BP)=2*%pi*N*T in KW\n", + "indicated power(IP)=(mep*L*A*N)/60000 in KW\n", + "A> heat added(Q)=m*C/3600 in KJ/s 52.36\n", + "or Q in KJ/min\n", + "thermal efficiency(n_th)= 0.27\n", + "in percentage 26.85\n", + "B> heat equivalent of brake power(BP) in KJ/min= 659.76\n", + "C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\n", + "heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\n", + "mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\n", + "mg=(ma+m)/60\n", + "mass of steam in exhaust gases in kg/min\n", + "mass of dry exhaust gases in kg/min\n", + "D> heat carried by steam in exhaust in KJ/min 299.86\n", + "E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min 782.64\n", + "F> unaccounted loss=A-B-C-D-E in KJ/min 537.4\n", + "NOTE># on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency and heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.13, Page:397 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\")\n", + "D=20.*10**-2;#cylinder diameter in m\n", + "L=28.*10**-2;#stroke in m\n", + "m=4.22;#mass of fuel used in kg\n", + "C=44670.;#calorific value of fuel in KJ/kg\n", + "N=21000./60.;#engine rpm\n", + "mep=2.74*10**5;#mean effective pressure in pa\n", + "F=600.;#net brake load applied to a drum of 100 cm diameter in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "mw=495.;#total mass of cooling water in kg\n", + "T1=13.;#cooling water inlet temperature in degree celcius\n", + "T2=38.;#cooling water outlet temperature in degree celcius\n", + "ma=135.;#mass of air used in kg\n", + "T_air=20.;#temperature of air in test room in degree celcius\n", + "T_exhaust=370.;#temperature of exhaust gases in degree celcius\n", + "Cp_gases=1.005;#specific heat of gases in KJ/kg K\n", + "Cp_steam=2.093;#specific heat of steam at atmospheric pressure in KJ/kg K\n", + "Cpw=4.18;#specific heat of water in KJ/kg K\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\")\n", + "BP=2*math.pi*N*F*r/60000\n", + "print(\"indicated power(IP)=(mep*L*A*N)/60000 in KW\")\n", + "IP=(mep*L*(math.pi*D**2/4)*N)/60000\n", + "Q=m*C/3600\n", + "print(\"A> heat added(Q)=m*C/3600 in KJ/s\"),round(Q,2)\n", + "print(\"or Q in KJ/min\")\n", + "Q=Q*60\n", + "Q=52.36;#heat added in KJ/s\n", + "n_th=IP/Q\n", + "print(\"thermal efficiency(n_th)= \"),round(n_th,2)\n", + "print(\"in percentage\"),round(n_th*100,2)\n", + "BP=BP*60\n", + "print(\"B> heat equivalent of brake power(BP) in KJ/min= \"),round(10.996*60,2)\n", + "print(\"C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\")\n", + "Qw=mw*Cpw*(T2-T1)/60\n", + "print(\"heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\")\n", + "print(\"mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\")\n", + "print(\"mg=(ma+m)/60\")\n", + "mg=(ma+m)/60\n", + "print(\"mass of steam in exhaust gases in kg/min\")\n", + "9*(0.15*m/60)\n", + "print(\"mass of dry exhaust gases in kg/min\")\n", + "mg-0.095\n", + "0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100))\n", + "print(\"D> heat carried by steam in exhaust in KJ/min\"),round(0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100)),2)\n", + "Qg=2.225*Cp_gases*(T_exhaust-T_air)\n", + "print(\"E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min\"),round(Qg,2)\n", + "print(\"F> unaccounted loss=A-B-C-D-E in KJ/min\"),round(3141.79-659.76-862.13-299.86-782.64,2)\n", + "print(\"NOTE># on per minute basis is attached as jpg file with this code.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb new file mode 100644 index 00000000..2d9241c2 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_2.ipynb @@ -0,0 +1,1080 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10:Intoduction to Internal Combustion engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.1;pg no: 387" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.1, Page:387 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\n", + "from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\n", + "stroke(L)=1.2*D in m\n", + "Area of indicator diagram(A)=30*10^-4 m^2\n", + "length of indicator diagram(l)=(1/2)*L in m\n", + "mean effective pressure(mep)=A*k/l in N/m^2\n", + "cross-section area of piston(Ap)=%pi*D^2/4 in m^2\n", + "for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\n", + "for four cylinder total indicated power(IP)=4*IP in W 90477.87\n", + "frictional power loss(FP)=0.10*IP in W\n", + "brake power available(BP)=indicated power-frictional power=IP-FP in W 81430.08\n", + "therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP= 0.9\n", + "in percentage 90.0\n", + "so indicated power=90477.8 W\n", + "and mechanical efficiency=90%\n" + ] + } + ], + "source": [ + "#cal of indicated power,,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.1, Page:387 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\")\n", + "k=20.*10**6;#spring constant in N/m^2\n", + "N=2000.;#engine rpm\n", + "print(\"from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\")\n", + "D=12.*10**-2;#cylinder diameter in m\n", + "print(\"stroke(L)=1.2*D in m\")\n", + "L=1.2*D\n", + "print(\"Area of indicator diagram(A)=30*10^-4 m^2\")\n", + "A=30.*10**-4;\n", + "print(\"length of indicator diagram(l)=(1/2)*L in m\")\n", + "l=(1./2.)*L\n", + "print(\"mean effective pressure(mep)=A*k/l in N/m^2\")\n", + "mep=A*k/l\n", + "print(\"cross-section area of piston(Ap)=%pi*D^2/4 in m^2\")\n", + "Ap=math.pi*D**2./4.\n", + "print(\"for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\")\n", + "IP=mep*Ap*L*N/(2.*60.)\n", + "IP=4.*IP\n", + "print(\"for four cylinder total indicated power(IP)=4*IP in W\"),round(IP,2)\n", + "print(\"frictional power loss(FP)=0.10*IP in W\")\n", + "FP=0.10*IP\n", + "BP=IP-FP\n", + "print(\"brake power available(BP)=indicated power-frictional power=IP-FP in W\"),round(BP,2)\n", + "n=BP/IP\n", + "print(\"therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP=\"),round(BP/IP,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so indicated power=90477.8 W\")\n", + "print(\"and mechanical efficiency=90%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.2;pg no: 388" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.2, Page:388 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\n", + "reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\n", + "mean effective pressure(mep)=A*k/l in pa\n", + "indicator power(IP)=Ap*L*mep*N*1*2/60 in W\n", + "(it is double acting so let us assume total power to be double of that in single acting) 88357.29\n", + "so power required to drive=88.36 KW\n" + ] + } + ], + "source": [ + "#cal of power required to drive\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.2, Page:388 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\")\n", + "A=40*10**-4;#area of indicator diagram in m^2\n", + "l=8*10**-2;#length of indicator diagram in m\n", + "D=15*10**-2;#bore of cylinder in m\n", + "L=20*10**-2;#stroke in m\n", + "k=1.5*10**8;#spring constant in pa/m\n", + "N=100;#pump motor rpm\n", + "print(\"reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\")\n", + "print(\"mean effective pressure(mep)=A*k/l in pa\")\n", + "mep=A*k/l \n", + "print(\"indicator power(IP)=Ap*L*mep*N*1*2/60 in W\")\n", + "Ap=math.pi*D**2/4\n", + "IP=Ap*L*mep*N*2/60\n", + "print(\"(it is double acting so let us assume total power to be double of that in single acting)\"),round(IP,2)\n", + "print(\"so power required to drive=88.36 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.3;pg no: 388" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.3, Page:388 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\n", + "indicated power(IP)=brake power/mechanical efficiency in KW= 42.22\n", + "frictional power loss(FP)=IP-BP in KW 4.22\n", + "brake power at quater load(BPq)=0.25*BP in KW\n", + "mechanical efficiency(n1)=BPq/IP 0.69\n", + "in percentage 69.23\n", + "so indicated power=42.22 KW\n", + "frictional power loss=4.22 KW\n", + "mechanical efficiency=69.24%\n" + ] + } + ], + "source": [ + "#cal of indicated power,frictional power loss,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "print\"Example 10.3, Page:388 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\")\n", + "n=0.9;#mechanical efficiency of engine\n", + "BP=38;#brake power in KW\n", + "IP=BP/n\n", + "print(\"indicated power(IP)=brake power/mechanical efficiency in KW=\"),round(IP,2)\n", + "FP=IP-BP\n", + "print(\"frictional power loss(FP)=IP-BP in KW\"),round(FP,2)\n", + "print(\"brake power at quater load(BPq)=0.25*BP in KW\")\n", + "BPq=0.25*BP\n", + "IP=BPq+FP;\n", + "n1=BPq/IP\n", + "print(\"mechanical efficiency(n1)=BPq/IP\"),round(n1,2)\n", + "print(\"in percentage\"),round(n1*100,2)\n", + "print(\"so indicated power=42.22 KW\")\n", + "print(\"frictional power loss=4.22 KW\")\n", + "print(\"mechanical efficiency=69.24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.4;pg no: 389" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.4, Page:389 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\n", + "brake power of engine(BP) in MW= 3120.98\n", + "so brake power is 3.121 MW\n", + "The fuel consumption in kg/hr(m)=m*BP in kg/hr\n", + "In order to find out brake thermal efficiency the heat input from fuel per second is required.\n", + "heat from fuel(Q)in KJ/s\n", + "Q=m*C/3600\n", + "energy to brake power=3120.97 KW\n", + "brake thermal efficiency(n)= 0.33\n", + "in percentage 33.49\n", + "so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\n", + "NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of brake power,fuel consumption\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.4, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\")\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "Pb_mep=1.5*1000;#brake mean effective pressure of each cylinder in Kpa\n", + "N=100;#engine rpm\n", + "D=85*10**-2;#bore of cylinder in m\n", + "L=220*10**-2;#stroke in m\n", + "C=43*10**3;#calorific value of diesel in KJ/kg\n", + "A=math.pi*D**2/4;\n", + "BP=Pb_mep*L*A*N/60\n", + "print(\"brake power of engine(BP) in MW=\"),round(BP,2)\n", + "print(\"so brake power is 3.121 MW\")\n", + "print(\"The fuel consumption in kg/hr(m)=m*BP in kg/hr\")\n", + "m=m*BP\n", + "print(\"In order to find out brake thermal efficiency the heat input from fuel per second is required.\")\n", + "print(\"heat from fuel(Q)in KJ/s\")\n", + "print(\"Q=m*C/3600\")\n", + "Q=m*C/3600\n", + "print(\"energy to brake power=3120.97 KW\")\n", + "n=BP/Q\n", + "print(\"brake thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\")\n", + "print(\"NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.5;pg no: 389" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.5, Page:389 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\n", + "brake thermal efficiency(n)=3600/(m*C) 0.33\n", + "in percentage 33.49\n", + "brake power(BP)in KW\n", + "BP= 226.19\n", + "brake specific fuel consumption,m=mf/BP\n", + "so mf=m*BP in kg/hr\n", + "air consumption(ma)from given air fuel ratio=k*mf in kg/hr\n", + "ma in kg/min\n", + "using perfect gas equation,\n", + "P*Va=ma*R*T\n", + "sa Va=ma*R*T/P in m^3/min\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder) 1.87\n", + "in percentage 186.55\n", + "NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,brake power,volumetric efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.5, Page:389 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\")\n", + "Pb_mep=6*10**5;#brake mean effective pressure in pa\n", + "N=600;#engine rpm\n", + "m=0.25;#specific fuel consumption in kg/KWh\n", + "D=20*10**-2;#bore of cylinder in m\n", + "L=30*10**-2;#stroke in m\n", + "k=26;#air to fuel ratio\n", + "C=43*10**3;#calorific value in KJ/kg\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27+273);#ambient temperature in K\n", + "P=1*10**2;#ambient pressure in Kpa\n", + "n=3600/(m*C)\n", + "print(\"brake thermal efficiency(n)=3600/(m*C)\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"brake power(BP)in KW\")\n", + "A=math.pi*D**2/4;\n", + "BP=4*Pb_mep*L*A*N/60000\n", + "print(\"BP=\"),round(BP,2)\n", + "print(\"brake specific fuel consumption,m=mf/BP\")\n", + "print(\"so mf=m*BP in kg/hr\")\n", + "mf=m*BP\n", + "print(\"air consumption(ma)from given air fuel ratio=k*mf in kg/hr\")\n", + "ma=k*mf\n", + "print(\"ma in kg/min\")\n", + "ma=ma/60\n", + "print(\"using perfect gas equation,\")\n", + "print(\"P*Va=ma*R*T\")\n", + "print(\"sa Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T/P\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "n_vol=Va/(Vs*(N/2)*4)\n", + "print(\"volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder)\"),round(n_vol,2)\n", + "print(\"in percentage\"),round(n_vol*100,2)\n", + "print(\"NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.6;pg no: 390" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.6, Page:390 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\n", + "let the bore diameter be (D) m\n", + "piston speed(V)=2*L*N\n", + "so L=V/(2*N) in m\n", + "volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\n", + "so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\n", + "so air sucked =274.78*D^2 m^3/min\n", + "air requirement(ma),kg/min=A/F ratio*fuel consumption per min\n", + "so ma=r*m in kg/min\n", + "using perfect gas equation,P*Va=ma*R*T\n", + "so Va=ma*R*T/P in m^3/min\n", + "ideally,air sucked=Va\n", + "so 274.78*D^2=0.906\n", + "D=sqrt(0.906/274.78) in m\n", + "indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\n", + "brake power=indicated power*mechanical efficiency\n", + "BP=IP*n_mech in KW 10.35\n", + "so brake power=10.34 KW\n" + ] + } + ], + "source": [ + "#cal of brake power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.6, Page:390 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\")\n", + "N=3000;#engine rpm\n", + "m=5;#fuel consumption in litre/hr\n", + "r=19;#air-fuel ratio\n", + "sg=0.7;#specific gravity of fuel\n", + "V=500;#piston speed in m/min\n", + "P_imep=6*10**5;#indicated mean effective pressure in pa\n", + "P=1.013*10**5;#ambient pressure in pa\n", + "T=(15+273);#ambient temperature in K\n", + "n_vol=0.7;#volumetric efficiency \n", + "n_mech=0.8;#mechanical efficiency\n", + "R=0.287;#gas constant for gas in KJ/kg K\n", + "print(\"let the bore diameter be (D) m\")\n", + "print(\"piston speed(V)=2*L*N\")\n", + "print(\"so L=V/(2*N) in m\")\n", + "L=V/(2*N)\n", + "L=0.0833;#approx.\n", + "print(\"volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\")\n", + "print(\"so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\")\n", + "n_vol*(math.pi*L/4)*N*2\n", + "print(\"so air sucked =274.78*D^2 m^3/min\")\n", + "print(\"air requirement(ma),kg/min=A/F ratio*fuel consumption per min\")\n", + "print(\"so ma=r*m in kg/min\")\n", + "ma=r*m*sg/60\n", + "print(\"using perfect gas equation,P*Va=ma*R*T\")\n", + "print(\"so Va=ma*R*T/P in m^3/min\")\n", + "Va=ma*R*T*1000/P \n", + "print(\"ideally,air sucked=Va\")\n", + "print(\"so 274.78*D^2=0.906\")\n", + "print(\"D=sqrt(0.906/274.78) in m\")\n", + "D=math.sqrt(0.906/274.78) \n", + "print(\"indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\")\n", + "IP=P_imep*L*(math.pi*D**2/4)*(N/60)*2/1000\n", + "print(\"brake power=indicated power*mechanical efficiency\")\n", + "BP=IP*n_mech \n", + "print(\"BP=IP*n_mech in KW\"),round(BP,2)\n", + "print(\"so brake power=10.34 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.7;pg no: 391" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.7, Page:391 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\n", + "After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\n", + "friction power(FP)=5 KW\n", + "brake power(BP) in KW= 30.82\n", + "indicated power(IP) in KW= 35.82\n", + "mechanical efficiency(n_mech)= 0.86\n", + "in percentage 86.04\n", + "brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr= 0.29\n", + "brake thermal efficiency(n_bte)= 0.29\n", + "in percentage 28.67\n", + "also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\n", + "indicated thermal efficiency(n_ite)= 0.33\n", + "in percentage 33.32\n", + "indicated power(IP)=P_imep*L*A*N\n", + "so P_imep in Kpa= 76.01\n", + "Also,mechanical efficiency=P_bmep/P_imep\n", + "so P_bmep in Kpa= 65.4\n", + "brake power=30.82 KW\n", + "indicated power=35.82 KW\n", + "mechanical efficiency=86.04%\n", + "brake thermal efficiency=28.67%\n", + "indicated thermal efficiency=33.32%\n", + "brake mean effective pressure=65.39 Kpa\n", + "indicated mean effective pressure=76.01 Kpa\n" + ] + } + ], + "source": [ + "#cal of power and efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.7, Page:391 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\")\n", + "M=20;#load on dynamometer in kg\n", + "r=50*10**-2;#radius in m\n", + "N=3000;#speed of rotation in rpm\n", + "D=20*10**-2;#bore in m\n", + "L=30*10**-2;#stroke in m\n", + "m=0.15;#fuel supplying rate in kg/min\n", + "C=43;#calorific value of fuel in MJ/kg\n", + "FP=5;#friction power in KW\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\")\n", + "print(\"friction power(FP)=5 KW\")\n", + "BP=2*math.pi*N*(M*g*r)*10**-3/60\n", + "print(\"brake power(BP) in KW=\"),round(BP,2)\n", + "IP=BP+FP\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "bsfc=m*60/BP\n", + "print(\"brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr=\"),round(bsfc,2)\n", + "n_bte=3600/(bsfc*C*1000)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\")\n", + "n_ite=n_bte/n_mech\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"indicated power(IP)=P_imep*L*A*N\")\n", + "P_imep=IP/(L*(math.pi*D**2/4)*N/60)\n", + "print(\"so P_imep in Kpa=\"),round(P_imep,2)\n", + "print(\"Also,mechanical efficiency=P_bmep/P_imep\")\n", + "n_mech=0.8604;#mechanical efficiency\n", + "P_bmep=P_imep*n_mech\n", + "print(\"so P_bmep in Kpa=\"),round(P_bmep,2)\n", + "print(\"brake power=30.82 KW\")\n", + "print(\"indicated power=35.82 KW\")\n", + "print(\"mechanical efficiency=86.04%\")\n", + "print(\"brake thermal efficiency=28.67%\")\n", + "print(\"indicated thermal efficiency=33.32%\")\n", + "print(\"brake mean effective pressure=65.39 Kpa\")\n", + "print(\"indicated mean effective pressure=76.01 Kpa\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.8;pg no: 392" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.8, Page:392 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\n", + "indicated power(IP) in KW= 282.74\n", + "mechanical efficiency(n_mech)=brake power/indicated power\n", + "so n_mech= 0.88\n", + "in percentage 88.42\n", + "brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\n", + "brake thermal efficiency(n_bte)= 0.35\n", + "in percentage 34.88\n", + "swept volume(Vs)=%pi*D^2*L/4 in m^3\n", + "mass of air corresponding to above swept volume,using perfect gas equation\n", + "P*Vs=ma*R*T\n", + "so ma=(P*Vs)/(R*T) in kg\n", + "volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\n", + "so mass of air taken per minute in kg/min \n", + "mass corresponding to swept volume per minute in kg/min\n", + "so volumetric efficiency 0.8333\n", + "in percentage 83.3333\n", + "so indicated power =282.74 KW,mechanical efficiency=88.42%\n", + "brake thermal efficiency=34.88%,volumetric efficiency=83.33%\n" + ] + } + ], + "source": [ + "#cal of brake thermal efficiency,volumetric effeciency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.8, Page:392 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\")\n", + "N=300.;#engine rpm\n", + "BP=250.;#brake power in KW\n", + "D=30.*10**-2;#bore in m\n", + "L=25.*10**-2;#stroke in m\n", + "m=1.;#fuel consumption in kg/min\n", + "r=10.;#airfuel ratio \n", + "P_imep=0.8;#indicated mean effective pressure in pa\n", + "C=43.*10**3;#calorific value of fuel in KJ/kg\n", + "P=1.013*10**5;#ambient pressure in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "T=(27.+273.);#ambient temperature in K\n", + "IP=P_imep*L*(math.pi*D**2/4)*N*4*10**3/60\n", + "print(\"indicated power(IP) in KW=\"),round(IP,2)\n", + "print(\"mechanical efficiency(n_mech)=brake power/indicated power\")\n", + "n_mech=BP/IP\n", + "print(\"so n_mech=\"),round(n_mech,2)\n", + "print(\"in percentage \"),round(n_mech*100,2)\n", + "print(\"brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\")\n", + "bsfc=m*60./BP\n", + "n_bte=3600./(bsfc*C)\n", + "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n", + "print(\"in percentage\"),round(n_bte*100,2)\n", + "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n", + "Vs=math.pi*D**2*L/4\n", + "print(\"mass of air corresponding to above swept volume,using perfect gas equation\")\n", + "print(\"P*Vs=ma*R*T\")\n", + "print(\"so ma=(P*Vs)/(R*T) in kg\")\n", + "ma=(P*Vs)/(R*T*1000) \n", + "ma=0.02;#approx.\n", + "print(\"volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\")\n", + "print(\"so mass of air taken per minute in kg/min \")\n", + "1*10\n", + "print(\"mass corresponding to swept volume per minute in kg/min\")\n", + "ma*4*N/2\n", + "print(\"so volumetric efficiency \"),round(10./12.,4)\n", + "print(\"in percentage\"),round((10./12.)*100.,4)\n", + "print(\"so indicated power =282.74 KW,mechanical efficiency=88.42%\")\n", + "print(\"brake thermal efficiency=34.88%,volumetric efficiency=83.33%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.9;pg no: 393" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.9, Page:393 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\n", + "indicated mean effective pressure(P_imeb)=h*k in Kpa\n", + "indicated power(IP)=P_imeb*L*A*N/2 in KW 9.375\n", + "brake power(BP)=2*%pi*N*T in KW 4.62\n", + "mechanical efficiency(n_mech)= 0.49\n", + "in percentage 49.31\n", + "so indicated power=9.375 KW\n", + "brake power=4.62 KW\n", + "mechanical efficiency=49.28%\n", + "energy liberated from fuel(Ef)=C*m/60 in KJ/s\n", + "energy available as brake power(BP)=4.62 KW\n", + "energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\n", + "energy carried by exhaust gases(Eg)=30 KJ/s\n", + "unaccounted energy loss in KW= 34.75\n", + "NOTE=>overall energy balance sheet is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of indicated power,brake power,mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.9, Page:393 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\")\n", + "h=10.;#height of indicator diagram in mm\n", + "k=25.;#indicator constant in KN/m^2 per mm\n", + "N=300.;#engine rpm\n", + "Vs=1.5*10**-2;#swept volume in m^3\n", + "M=60.;#effective brake load upon dynamometer in kg\n", + "r=50.*10**-2;#effective brake drum radius in m\n", + "m=0.12;#fuel consumption in kg/min\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "mw=6.;#circulating water rate in kg/min\n", + "T1=35.;#cooling water entering temperature in degree celcius\n", + "T2=70.;#cooling water leaving temperature in degree celcius\n", + "Eg=30.;#exhaust gases leaving energy in KJ/s\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "g=9.81;#accelaration due to gravity in m/s^2\n", + "print(\"indicated mean effective pressure(P_imeb)=h*k in Kpa\")\n", + "P_imeb=h*k\n", + "IP=P_imeb*Vs*N/(2*60)\n", + "print(\"indicated power(IP)=P_imeb*L*A*N/2 in KW\") ,round(IP,3)\n", + "BP=2*math.pi*N*(M*g*r*10**-3)/(2*60)\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=9.375 KW\")\n", + "print(\"brake power=4.62 KW\")\n", + "print(\"mechanical efficiency=49.28%\")\n", + "print(\"energy liberated from fuel(Ef)=C*m/60 in KJ/s\")\n", + "Ef=C*m/60\n", + "print(\"energy available as brake power(BP)=4.62 KW\")\n", + "print(\"energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\")\n", + "Ec=(mw/M)*Cw*(T2-T1)\n", + "print(\"energy carried by exhaust gases(Eg)=30 KJ/s\")\n", + "Ef-BP-Ec-Eg\n", + "print(\"unaccounted energy loss in KW=\"),round(Ef-BP-Ec-Eg,2)\n", + "print(\"NOTE=>overall energy balance sheet is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.10;pg no: 394" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.10, Page:394 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\n", + "brake power(BP)=2*%pi*N*T in KW 47.12\n", + "so brake power=47.124 KW\n", + "brake specific fuel consumption(bsfc) in kg/KW hr= 0.34\n", + "indicated power(IP) in Kw= 52.36\n", + "indicated thermal efficiency(n_ite)= 0.28\n", + "in percentage 28.05\n", + "so indicated thermal efficiency=28.05%\n", + "heat available from fuel(Qf)=(m/mw)*C in KJ/min 11200.0\n", + "energy consumed as brake power(BP) in KJ/min= 2827.43\n", + "energy carried by cooling water(Qw) in KJ/min= 1442.1\n", + "energy carried by exhaust gases(Qg) in KJ/min= 4786.83\n", + "unaccounted energy loss in KJ/min 2143.63\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of brake power,brake specific fuel consumption,indicated thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.10, Page:394 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\")\n", + "m=4.;#mass of fuel consumed in kg\n", + "N=1500.;#engine rpm\n", + "mw=15.;#water circulation rate in kg/min\n", + "T1=27.;#cooling water inlet temperature in degree celcius\n", + "T2=50.;#cooling water outlet temperature in degree celcius\n", + "ma=150.;#mass of air consumed in kg\n", + "T_exhaust=400.;#exhaust temperature in degree celcius\n", + "T_atm=27.;#atmospheric temperature in degree celcius\n", + "Cg=1.25;#mean specific heat of exhaust gases in KJ/kg K\n", + "n_mech=0.9;#mechanical efficiency\n", + "T=300.*10**-3;#brake torque in N\n", + "C=42.*10**3;#calorific value in KJ/kg\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*T/60\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n", + "print(\"so brake power=47.124 KW\")\n", + "bsfc=m*60/(mw*BP)\n", + "print(\"brake specific fuel consumption(bsfc) in kg/KW hr=\"),round(bsfc,2)\n", + "IP=BP/n_mech\n", + "print(\"indicated power(IP) in Kw=\"),round(IP,2)\n", + "n_ite=IP*mw*60/(m*C)\n", + "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n", + "print(\"in percentage\"),round(n_ite*100,2)\n", + "print(\"so indicated thermal efficiency=28.05%\")\n", + "Qf=(m/mw)*C\n", + "print(\"heat available from fuel(Qf)=(m/mw)*C in KJ/min\"),round(Qf,2)\n", + "BP=BP*60 \n", + "print(\"energy consumed as brake power(BP) in KJ/min=\"),round(BP,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"energy carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "Qg=(ma+m)*Cg*(T_exhaust-T_atm)/mw\n", + "print(\"energy carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qf-(BP+Qw+Qg)\n", + "print(\"unaccounted energy loss in KJ/min\"),round(Qf-(BP+Qw+Qg),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.11;pg no: 395" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.11, Page:395 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\n", + "indicated power of 1st cylinder=BP-BP1 in KW\n", + "indicated power of 2nd cylinder=BP-BP2 in KW\n", + "indicated power of 3rd cylinder=BP-BP3 in KW\n", + "indicated power of 4th cylinder=BP-BP4 in KW\n", + "indicated power of 5th cylinder=BP-BP5 in KW\n", + "indicated power of 6th cylinder=BP-BP6 in KW\n", + " total indicated power(IP)in KW= 61.9\n", + "mechanical efficiency(n_mech)= 0.81\n", + "in percentage 80.78\n", + "so indicated power=61.9 KW\n", + "mechanical efficiency=80.77%\n" + ] + } + ], + "source": [ + "#cal of indicated power and mechanical efficiency\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.11, Page:395 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\")\n", + "BP=50.;#brake power output at full load in KW\n", + "BP1=40.1;#brake power output of 1st cylinder in KW\n", + "BP2=39.5;#brake power output of 2nd cylinder in KW\n", + "BP3=39.1;#brake power output of 3rd cylinder in KW\n", + "BP4=39.6;#brake power output of 4th cylinder in KW\n", + "BP5=39.8;#brake power output of 5th cylinder in KW\n", + "BP6=40.;#brake power output of 6th cylinder in KW\n", + "print(\"indicated power of 1st cylinder=BP-BP1 in KW\")\n", + "BP-BP1\n", + "print(\"indicated power of 2nd cylinder=BP-BP2 in KW\")\n", + "BP-BP2\n", + "print(\"indicated power of 3rd cylinder=BP-BP3 in KW\")\n", + "BP-BP3\n", + "print(\"indicated power of 4th cylinder=BP-BP4 in KW\")\n", + "BP-BP4\n", + "print(\"indicated power of 5th cylinder=BP-BP5 in KW\")\n", + "BP-BP5\n", + "print(\"indicated power of 6th cylinder=BP-BP6 in KW\")\n", + "BP-BP6\n", + "IP=9.9+10.5+10.9+10.4+10.2+10\n", + "print(\" total indicated power(IP)in KW=\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so indicated power=61.9 KW\")\n", + "print(\"mechanical efficiency=80.77%\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.12;pg no: 396" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.12, Page:396 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\n", + "brake power output of engine(BP) in KW= 19.63\n", + "brake power when cylinder 1 is cut(BP1) in KW= 13.74\n", + "so indicated power of first cylinder(IP1) in KW= 5.89\n", + "brake power when cylinder 2 is cut(BP2) in KW= 14.14\n", + "so indicated power of second cylinder(IP2) in KW= 5.5\n", + "brake power when cylinder 3 is cut(BP3) in KW= 14.29\n", + "so indicated power of third cylinder(IP3) in KW= 5.34\n", + "brake power when cylinder 4 is cut(BP4) in KW= 13.35\n", + "so indicated power of fourth cylinder(IP4) in KW= 6.28\n", + "now total indicated power(IP) in KW 23.01\n", + "engine mechanical efficiency(n_mech)= 0.85\n", + "in percentage 85.32\n", + "so BP=19.63 KW,IP=23 KW,n_mech=83.35%\n", + "heat liberated by fuel(Qf)=m*C in KJ/min 8127.0\n", + "heat carried by exhaust gases(Qg) in KJ/min= 1436.02\n", + "heat carried by cooling water(Qw) in KJ/min= 1730.52\n", + "energy to brake power(BP) in KJ/min= 1177.8\n", + "unaccounted losses in KJ/min 3782.66\n", + "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \n" + ] + } + ], + "source": [ + "#cal of brake power,indicated power,heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 10.12, Page:396 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\")\n", + "N=1500.;#engine rpm at full load\n", + "F=250.;#brake load at full load in N\n", + "F1=175.;#brake reading 1 in N\n", + "F2=180.;#brake reading 2 in N\n", + "F3=182.;#brake reading 3 in N\n", + "F4=170.;#brake reading 4 in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "m=0.189;#fuel consumption rate in kg/min\n", + "C=43.*10**3;#fuel calorific value in KJ/kg\n", + "k=12.;#air to fuel ratio\n", + "T_exhaust=600.;#exhaust gas temperature in degree celcius\n", + "mw=18.;#cooling water flow rate in kg/min\n", + "T1=27.;#cooling water entering temperature in degree celcius\n", + "T2=50.;#cooling water leaving temperature in degree celcius\n", + "T_atm=27.;#atmospheric air temperature\n", + "Cg=1.02;#specific heat of exhaust gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "BP=2.*math.pi*N*F*r*10**-3/60.\n", + "print(\"brake power output of engine(BP) in KW=\"),round(BP,2)\n", + "BP1=2.*math.pi*N*F1*r*10**-3/60.\n", + "print(\"brake power when cylinder 1 is cut(BP1) in KW=\"),round(BP1,2)\n", + "IP1=BP-BP1\n", + "print(\"so indicated power of first cylinder(IP1) in KW=\"),round(IP1,2)\n", + "BP2=2.*math.pi*N*F2*r*10**-3/60.\n", + "print(\"brake power when cylinder 2 is cut(BP2) in KW=\"),round(BP2,2)\n", + "IP2=BP-BP2\n", + "print(\"so indicated power of second cylinder(IP2) in KW=\"),round(IP2,2)\n", + "BP3=2.*math.pi*N*F3*r*10**-3/60.\n", + "print(\"brake power when cylinder 3 is cut(BP3) in KW=\"),round(BP3,2)\n", + "IP3=BP-BP3\n", + "print(\"so indicated power of third cylinder(IP3) in KW=\"),round(IP3,2)\n", + "BP4=2.*math.pi*N*F4*r*10**-3/60.\n", + "print(\"brake power when cylinder 4 is cut(BP4) in KW=\"),round(BP4,2)\n", + "IP4=BP-BP4\n", + "print(\"so indicated power of fourth cylinder(IP4) in KW=\"),round(IP4,2)\n", + "IP=IP1+IP2+IP3+IP4\n", + "print(\"now total indicated power(IP) in KW\"),round(IP,2)\n", + "n_mech=BP/IP\n", + "print(\"engine mechanical efficiency(n_mech)=\"),round(n_mech,2)\n", + "print(\"in percentage\"),round(n_mech*100,2)\n", + "print(\"so BP=19.63 KW,IP=23 KW,n_mech=83.35%\")\n", + "Qf=m*C\n", + "print(\"heat liberated by fuel(Qf)=m*C in KJ/min\"),round(Qf,2)\n", + "Qg=(k+1)*m*Cg*(T_exhaust-T_atm)\n", + "print(\"heat carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n", + "Qw=mw*Cw*(T2-T1)\n", + "print(\"heat carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n", + "BP=19.63*60\n", + "print(\"energy to brake power(BP) in KJ/min=\"),round(19.63*60,2)\n", + "Qf-(Qg+Qw+BP)\n", + "print(\"unaccounted losses in KJ/min\"),round(Qf-(Qg+Qw+BP),2)\n", + "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 10.13;pg no: 397" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 10.13, Page:397 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\n", + "brake power(BP)=2*%pi*N*T in KW\n", + "indicated power(IP)=(mep*L*A*N)/60000 in KW\n", + "A> heat added(Q)=m*C/3600 in KJ/s 52.36\n", + "or Q in KJ/min\n", + "thermal efficiency(n_th)= 0.27\n", + "in percentage 26.85\n", + "B> heat equivalent of brake power(BP) in KJ/min= 659.76\n", + "C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\n", + "heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\n", + "mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\n", + "mg=(ma+m)/60\n", + "mass of steam in exhaust gases in kg/min\n", + "mass of dry exhaust gases in kg/min\n", + "D> heat carried by steam in exhaust in KJ/min 299.86\n", + "E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min 782.64\n", + "F> unaccounted loss=A-B-C-D-E in KJ/min 537.4\n", + "NOTE># on per minute basis is attached as jpg file with this code.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency and heat balance sheet\n", + "#intiation of all variables\n", + "# Chapter 10\n", + "import math\n", + "print\"Example 10.13, Page:397 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\")\n", + "D=20.*10**-2;#cylinder diameter in m\n", + "L=28.*10**-2;#stroke in m\n", + "m=4.22;#mass of fuel used in kg\n", + "C=44670.;#calorific value of fuel in KJ/kg\n", + "N=21000./60.;#engine rpm\n", + "mep=2.74*10**5;#mean effective pressure in pa\n", + "F=600.;#net brake load applied to a drum of 100 cm diameter in N\n", + "r=50.*10**-2;#brake drum radius in m\n", + "mw=495.;#total mass of cooling water in kg\n", + "T1=13.;#cooling water inlet temperature in degree celcius\n", + "T2=38.;#cooling water outlet temperature in degree celcius\n", + "ma=135.;#mass of air used in kg\n", + "T_air=20.;#temperature of air in test room in degree celcius\n", + "T_exhaust=370.;#temperature of exhaust gases in degree celcius\n", + "Cp_gases=1.005;#specific heat of gases in KJ/kg K\n", + "Cp_steam=2.093;#specific heat of steam at atmospheric pressure in KJ/kg K\n", + "Cpw=4.18;#specific heat of water in KJ/kg K\n", + "print(\"brake power(BP)=2*%pi*N*T in KW\")\n", + "BP=2*math.pi*N*F*r/60000\n", + "print(\"indicated power(IP)=(mep*L*A*N)/60000 in KW\")\n", + "IP=(mep*L*(math.pi*D**2/4)*N)/60000\n", + "Q=m*C/3600\n", + "print(\"A> heat added(Q)=m*C/3600 in KJ/s\"),round(Q,2)\n", + "print(\"or Q in KJ/min\")\n", + "Q=Q*60\n", + "Q=52.36;#heat added in KJ/s\n", + "n_th=IP/Q\n", + "print(\"thermal efficiency(n_th)= \"),round(n_th,2)\n", + "print(\"in percentage\"),round(n_th*100,2)\n", + "BP=BP*60\n", + "print(\"B> heat equivalent of brake power(BP) in KJ/min= \"),round(10.996*60,2)\n", + "print(\"C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\")\n", + "Qw=mw*Cpw*(T2-T1)/60\n", + "print(\"heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\")\n", + "print(\"mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\")\n", + "print(\"mg=(ma+m)/60\")\n", + "mg=(ma+m)/60\n", + "print(\"mass of steam in exhaust gases in kg/min\")\n", + "9*(0.15*m/60)\n", + "print(\"mass of dry exhaust gases in kg/min\")\n", + "mg-0.095\n", + "0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100))\n", + "print(\"D> heat carried by steam in exhaust in KJ/min\"),round(0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100)),2)\n", + "Qg=2.225*Cp_gases*(T_exhaust-T_air)\n", + "print(\"E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min\"),round(Qg,2)\n", + "print(\"F> unaccounted loss=A-B-C-D-E in KJ/min\"),round(3141.79-659.76-862.13-299.86-782.64,2)\n", + "print(\"NOTE># on per minute basis is attached as jpg file with this code.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter11.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11.ipynb new file mode 100755 index 00000000..31f593f0 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11.ipynb @@ -0,0 +1,1309 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11:Introduction to refrigeration and Air Conditioning" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.1;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.1, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\n", + "for refrigerator working on reversed carnot cycle.\n", + "Q1/T1=Q2/T2\n", + "so Q2=Q1*T2/T1 in KJ/min\n", + "and work input required,W in KJ/min\n", + "W=Q2-Q1 83.66\n" + ] + } + ], + "source": [ + "#cal of work input\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.1, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\")\n", + "T1=(-16.+273.);#temperature of refrigerated space in K\n", + "T2=(27.+273.);#temperature of atmosphere in K\n", + "Q1=500.;#heat extracted from refrigerated space in KJ/min\n", + "print(\"for refrigerator working on reversed carnot cycle.\")\n", + "print(\"Q1/T1=Q2/T2\")\n", + "print(\"so Q2=Q1*T2/T1 in KJ/min\")\n", + "Q2=Q1*T2/T1\n", + "print(\"and work input required,W in KJ/min\")\n", + "W=Q2-Q1\n", + "print(\"W=Q2-Q1\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.2;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.2, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\n", + "refrigeration capacity or heat extraction rate(Q)in KJ/s\n", + "let the ice formation rate be m kg/s\n", + "heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\n", + "ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice= 6.25\n", + "COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\n", + "also COP=Q/W\n", + "so W=Q/COP in KJ/s\n", + "HP required 643.62\n", + "NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\n" + ] + } + ], + "source": [ + "#cal of HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.2, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\")\n", + "Q=800.;#refrigeration capacity in tons\n", + "Q_latent=335.;#latent heat for ice formation from water in KJ/kg\n", + "T1=(-7.+273.);#temperature of reservoir 1 in K\n", + "T2=(27.+273.);#temperature of reservoir 2 in K\n", + "print(\"refrigeration capacity or heat extraction rate(Q)in KJ/s\")\n", + "Q=Q*3.5\n", + "print(\"let the ice formation rate be m kg/s\")\n", + "print(\"heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\")\n", + "Q1=4.18*(27-0)+Q_latent\n", + "m=Q/Q1\n", + "print(\"ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice=\"),round(Q/Q1,2)\n", + "print(\"COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\")\n", + "COP=T1/(T2-T1)\n", + "print(\"also COP=Q/W\")\n", + "print(\"so W=Q/COP in KJ/s\")\n", + "W=Q/COP\n", + "W=W/0.7457\n", + "print(\"HP required\"),round(W/0.7457,2)\n", + "print(\"NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.3;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.3, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\n", + "COP=T1/(T2-T1)=Q/W 1.56\n", + "equating,COP=T1/(T2-T1)\n", + "so temperature of surrounding(T2)in K\n", + "T2= 403.69\n" + ] + } + ], + "source": [ + "#cal of COP and temperature of surrounding\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.3, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\")\n", + "T1=(-27+273);#temperature of refrigerator in K\n", + "W=3*.7457;#work input in KJ/s\n", + "Q=1*3.5;#refrigeration effect in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=T1/(T2-T1)=Q/W\"),round(COP,2)\n", + "COP=1.56;#approx.\n", + "print(\"equating,COP=T1/(T2-T1)\")\n", + "print(\"so temperature of surrounding(T2)in K\")\n", + "T2=T1+(T1/COP)\n", + "print(\"T2=\"),round(T2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.4;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.4, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\n", + "during process 1-2_a\n", + "p2/p1=(T2_a/T1)^(y/(y-1))\n", + "so T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "theoretical temperature after compression,T2_a=440.18 K\n", + "for compression process,\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "for expansion process,3-4_a\n", + "T4_a/T3=(p1/p2)^((y-1)/y)\n", + "so T4_a=T3*(p1/p2)^((y-1)/y) in K\n", + "n2=0.9=(T3-T4)/(T3-T4_a)\n", + "so T4=T3-(n2*(T3-T4_a))in K\n", + "so work during compression,W_C in KJ/s\n", + "W_C=m*Cp*(T2-T1)\n", + "work during expansion,W_T in KJ/s\n", + "W_T=m*Cp*(T3-T4)\n", + "refrigeration effect is realized during process,4-1.so refrigeration shall be,\n", + "Q_ref=m*Cp*(T1-T4) in KJ/s\n", + "Q_ref in ton 18.36\n", + "net work required(W)=W_C-W_T in KJ/s 111.59\n", + "COP= 0.58\n", + "so refrigeration capacity=18.36 ton or 64.26 KJ/s\n", + "and COP=0.57\n", + "NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity and COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.4, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\")\n", + "T1=(-30.+273.);#temperature of air at beginning of compression in K\n", + "T3=(27.+273.);#temperature of air after cooling in K\n", + "r=8.;#pressure ratio\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "m=1.;#air flow rate in kg/s\n", + "n1=0.85;#isentropic efficiency for compression process\n", + "n2=.9;#isentropic efficiency for expansion process\n", + "print(\"during process 1-2_a\")\n", + "print(\"p2/p1=(T2_a/T1)^(y/(y-1))\")\n", + "print(\"so T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(r)**((y-1)/y)\n", + "print(\"theoretical temperature after compression,T2_a=440.18 K\")\n", + "print(\"for compression process,\")\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"for expansion process,3-4_a\")\n", + "print(\"T4_a/T3=(p1/p2)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p1/p2)^((y-1)/y) in K\")\n", + "T4_a=T3*(1/r)**((y-1)/y)\n", + "print(\"n2=0.9=(T3-T4)/(T3-T4_a)\")\n", + "print(\"so T4=T3-(n2*(T3-T4_a))in K\")\n", + "T4=T3-(n2*(T3-T4_a))\n", + "print(\"so work during compression,W_C in KJ/s\")\n", + "print(\"W_C=m*Cp*(T2-T1)\")\n", + "W_C=m*Cp*(T2-T1)\n", + "print(\"work during expansion,W_T in KJ/s\")\n", + "print(\"W_T=m*Cp*(T3-T4)\")\n", + "W_T=m*Cp*(T3-T4)\n", + "print(\"refrigeration effect is realized during process,4-1.so refrigeration shall be,\")\n", + "print(\"Q_ref=m*Cp*(T1-T4) in KJ/s\")\n", + "Q_ref=m*Cp*(T1-T4)\n", + "Q_ref=Q_ref/3.5\n", + "print(\"Q_ref in ton\"),round(Q_ref,2)\n", + "W=W_C-W_T\n", + "print(\"net work required(W)=W_C-W_T in KJ/s\"),round(W,2)\n", + "Q_ref=64.26;\n", + "COP=Q_ref/(W_C-W_T)\n", + "print(\"COP=\"),round(COP,2)\n", + "print(\"so refrigeration capacity=18.36 ton or 64.26 KJ/s\")\n", + "print(\"and COP=0.57\")\n", + "print(\"NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.5;pg no: 437" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.5, Page:437 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\n", + "for isentropic compression process:\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for isenropic expansion process:\n", + "(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(p2/p1)^((y-1)/y) in K\n", + "heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\n", + "refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\n", + "so net work(W)=Q23-Q41 in KJ/kg\n", + "so COP=refrigeration effect/net work= 1.71\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.5, Page:437 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\")\n", + "T1=(7+273);#temperature of refrigerated space in K\n", + "T3=(27+273);#temperature after compression in K\n", + "p1=1*10**5;#pressure of refrigerated space in pa\n", + "p2=5*10**5;#pressure after compression in pa\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for isentropic compression process:\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for isenropic expansion process:\")\n", + "print(\"(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(p2/p1)^((y-1)/y) in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "print(\"heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\")\n", + "Q23=Cp*(T2-T3)\n", + "print(\"refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\")\n", + "Q41=Cp*(T1-T4)\n", + "print(\"so net work(W)=Q23-Q41 in KJ/kg\")\n", + "W=Q23-Q41\n", + "COP=Q41/W\n", + "print(\"so COP=refrigeration effect/net work=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.6;pg no: 438" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.6, Page:438 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\n", + "for process 1-2\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for process 3-4\n", + "(p3/p4)^((y-1)/y)=T3/T4\n", + "so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\n", + "refrigeration capacity(Q) in KJ/s= 63.25\n", + "Q in ton\n", + "work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\n", + "w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\n", + "HP required to run compressor 177.86\n", + "so HP required to run compressor=177.86 hp\n", + "net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\n", + "COP=refrigeration capacity/work=Q/W 1.59\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity,HP required to run compressor,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.6, Page:438 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\")\n", + "T1=(-10.+273.);#air entering temperature in K\n", + "p1=1.*10**5;#air entering pressure in pa\n", + "T3=(27.+273.);#compressed air temperature after cooling in K\n", + "p2=5.5*10**5;#pressure after compression in pa\n", + "m=0.8;#air flow rate in kg/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"for process 1-2\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for process 3-4\")\n", + "print(\"(p3/p4)^((y-1)/y)=T3/T4\")\n", + "print(\"so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "Q=m*Cp*(T1-T4)\n", + "print(\"refrigeration capacity(Q) in KJ/s=\"),round(Q,2)\n", + "print(\"Q in ton\")\n", + "Q=Q/3.5\n", + "print(\"work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\")\n", + "print(\"w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\")\n", + "n=y;\n", + "w=(m*n)*R*(T2-T1)/(n-1)\n", + "print(\"HP required to run compressor\"),round(w/0.7457,2)\n", + "print(\"so HP required to run compressor=177.86 hp\")\n", + "print(\"net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\")\n", + "W=m*Cp*((T2-T3)-(T1-T4))\n", + "Q=63.25;#refrigeration capacity in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration capacity/work=Q/W\"),round(COP,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.7;pg no: 440" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.7, Page:440 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\n", + "for process 1-2,n=1.45\n", + "T2/T1=(p2/p1)^((n-1)/n)\n", + "so T2=T1*(p2/p1)^((n-1)/n) in K\n", + "for process 3-4,n=1.3\n", + "T4/T3=(p4/p3)^((n-1)/n)\n", + "so T4=T3*(p4/p3)^((n-1)/n)in K\n", + "refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\n", + "Q=m*Cp*(T5-T4)\n", + "m in kg/s= 0.55\n", + "so air mass flow rate in cabin=0.55 kg/s\n", + "let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\n", + "m1*Cp*(T8-T7)=m*Cp*(T2-T3)\n", + "during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\n", + "so T7=T6*(p7/p6)^((n-1)/n) in K\n", + "substituting T2,T3,T7,T8 and m in energy balance on intercooler,\n", + "m1=m*(T2-T3)/(T8-T7)in kg/s\n", + "total ram air mass flow rate=m+m1 in kg/s 2.11\n", + "ram air mass flow rate=2.12 kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\n", + "COP=refrigeration effect/work input=Q/W 0.485\n" + ] + } + ], + "source": [ + "#cal of air mass flow rate in cabin,ram air mass flow rate,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.7, Page:440 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\")\n", + "p1=1.2*10**5;#pressure of ram air in pa\n", + "p6=p1;\n", + "T1=(15.+273.);#temperature of ram air in K\n", + "T6=T1;\n", + "p7=0.9*10**5;#pressure of ram air after expansion in pa\n", + "p3=4.*10**5;#pressure of ram air after compression in pa\n", + "p2=p3;\n", + "p4=1.*10**5;#pressure of ram air after expansion in second turbine in pa\n", + "T5=(25.+273.);#temperature of air when exhausted from cabin in K\n", + "T3=(50.+273.);#temperature of compressed air in K\n", + "T8=(30.+273.);#limited temperaure of ram air in K\n", + "Q=10.*3.5;#refrigeration capacity in KJ/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,n=1.45\")\n", + "n=1.45;\n", + "print(\"T2/T1=(p2/p1)^((n-1)/n)\")\n", + "print(\"so T2=T1*(p2/p1)^((n-1)/n) in K\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"for process 3-4,n=1.3\")\n", + "n=1.3;\n", + "print(\"T4/T3=(p4/p3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(p4/p3)^((n-1)/n)in K\")\n", + "T4=T3*(p4/p3)**((n-1)/n)\n", + "print(\"refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\")\n", + "print(\"Q=m*Cp*(T5-T4)\")\n", + "m=Q/(Cp*(T5-T4))\n", + "print(\"m in kg/s=\"),round(m,2)\n", + "print(\"so air mass flow rate in cabin=0.55 kg/s\")\n", + "print(\"let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\")\n", + "print(\"m1*Cp*(T8-T7)=m*Cp*(T2-T3)\")\n", + "print(\"during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\")\n", + "print(\"so T7=T6*(p7/p6)^((n-1)/n) in K\")\n", + "T7=T6*(p7/p6)**((n-1)/n)\n", + "print(\"substituting T2,T3,T7,T8 and m in energy balance on intercooler,\")\n", + "print(\"m1=m*(T2-T3)/(T8-T7)in kg/s\")\n", + "m1=m*(T2-T3)/(T8-T7)\n", + "print(\"total ram air mass flow rate=m+m1 in kg/s\"),round(m+m1,2)\n", + "print(\"ram air mass flow rate=2.12 kg/s\")\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\")\n", + "m=0.55;#approx.\n", + "W=m*Cp*(T2-T1)\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W\"),round(Q/W,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.8;pg no: 441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.8, Page:441 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\n", + "considering index of compression and expansion as 1.4\n", + "during ramming action,process 0-1,\n", + "T1/To=(p1/po)^((y-1)/y)\n", + "T1=To*(p1/po)^((y-1)/y)in K\n", + "during compression process 1-2_a\n", + "T2_a/T1=(p2/p1)^((y-1)/y)\n", + "T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\n", + "subsequently for 10 degree celcius temperature drop in evaporator,\n", + "T4=T3-10 in K\n", + "expansion in cooling turbine during process 4-5;\n", + "T5_a/T4=(p5/p4)^((y-1)/y)\n", + "T5_a=T4*(p5/p4)^((y-1)/y)in K\n", + "n2=(T4-T5)/(T4-T5_a)\n", + "T5=T4-(T4-T5_a)*n2 in K\n", + "let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\n", + "Q=m*Cp*(T6-T5)\n", + "so m=Q/(Cp*(T6-T5))in kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s 41.4\n", + "W in Hp\n", + "COP=refrigeration effect/work input=Q/W= 1.27\n", + "so COP=1.27\n", + "and HP required=55.48 hp\n" + ] + } + ], + "source": [ + "#cal of COP and HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.8, Page:441 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\")\n", + "po=0.9*10**5;#atmospheric air pressure in pa\n", + "To=(3.+273.);#temperature of atmospheric air in K\n", + "p1=1.*10**5;#pressure due to ramming air in pa\n", + "p2=4.*10**5;#pressure when air leaves compressor in pa\n", + "p3=p2;\n", + "p4=p3;\n", + "p5=1.03*10**5;#pressure maintained in passenger cabin in pa\n", + "T6=(25.+273.);#temperature of air leaves cabin in K\n", + "Q=15.*3.5;#refrigeration capacity of aeroplane in KJ/s\n", + "n1=0.9;#isentropic efficiency of compressor\n", + "n2=0.8;#isentropic efficiency of turbine\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"considering index of compression and expansion as 1.4\")\n", + "y=1.4;\n", + "print(\"during ramming action,process 0-1,\")\n", + "print(\"T1/To=(p1/po)^((y-1)/y)\")\n", + "print(\"T1=To*(p1/po)^((y-1)/y)in K\")\n", + "T1=To*(p1/po)**((y-1)/y)\n", + "print(\"during compression process 1-2_a\")\n", + "print(\"T2_a/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\")\n", + "T3=0.34*T2\n", + "print(\"subsequently for 10 degree celcius temperature drop in evaporator,\")\n", + "print(\"T4=T3-10 in K\")\n", + "T4=T3-10\n", + "print(\"expansion in cooling turbine during process 4-5;\")\n", + "print(\"T5_a/T4=(p5/p4)^((y-1)/y)\")\n", + "print(\"T5_a=T4*(p5/p4)^((y-1)/y)in K\")\n", + "T5_a=T4*(p5/p4)**((y-1)/y)\n", + "print(\"n2=(T4-T5)/(T4-T5_a)\")\n", + "print(\"T5=T4-(T4-T5_a)*n2 in K\")\n", + "T5=T4-(T4-T5_a)*n2\n", + "print(\"let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\")\n", + "print(\"Q=m*Cp*(T6-T5)\")\n", + "print(\"so m=Q/(Cp*(T6-T5))in kg/s\")\n", + "m=Q/(Cp*(T6-T5))\n", + "W=m*Cp*(T2-T1)\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\"),round(W,2)\n", + "print(\"W in Hp\")\n", + "W=W/.7457\n", + "W=41.37;#work input to compressor in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W=\"),round(COP,2)\n", + "print(\"so COP=1.27\")\n", + "print(\"and HP required=55.48 hp\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.9;pg no: 443" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.9, Page:443 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\n", + "properties of NH3,\n", + "at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\n", + "and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\n", + "here work done,W=Area 1-2-3-9-1\n", + "refrigeration effect=Area 1-5-6-4-1\n", + "Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\n", + "so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\n", + "during throttling process between 3 and 4,h3=h4\n", + "(Area=3-11-7-3)=(Area 4-9-11-6-4)\n", + "(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\n", + "(Area 3-8-9)=(Area 4-6-7-8-4)\n", + "so (Area 4-6-7-8-4)=12.09 KJ/kg\n", + "also,(Area 4-6-7-8-4)=T1*(s4-s8)\n", + "so (s4-s8)in KJ/kg K=\n", + "also s3=s8=0.3386 KJ/kg K\n", + "so s4 in KJ/kg K=\n", + "also s1=s2=4.4809 KJ/kg K\n", + "refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\n", + "work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\n", + "so COP=refrigeration effect/work done= 5.94\n", + "so COP=5.94\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.9, Page:443 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\")\n", + "print(\"properties of NH3,\")\n", + "print(\"at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\")\n", + "T1=(-15+273);\n", + "h9=-54.51;\n", + "hg=1303.74;\n", + "s9=-0.2132;\n", + "sg=5.0536;\n", + "print(\"and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\")\n", + "T2=(25+273);\n", + "h3=99.94;\n", + "h2=1317.95;\n", + "s3=0.3386;\n", + "s2=4.4809;\n", + "print(\"here work done,W=Area 1-2-3-9-1\")\n", + "print(\"refrigeration effect=Area 1-5-6-4-1\")\n", + "print(\"Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\")\n", + "print(\"so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\")\n", + "h3-h9-T1*(s3-s9)\n", + "print(\"during throttling process between 3 and 4,h3=h4\")\n", + "print(\"(Area=3-11-7-3)=(Area 4-9-11-6-4)\")\n", + "print(\"(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\")\n", + "print(\"(Area 3-8-9)=(Area 4-6-7-8-4)\")\n", + "print(\"so (Area 4-6-7-8-4)=12.09 KJ/kg\")\n", + "print(\"also,(Area 4-6-7-8-4)=T1*(s4-s8)\")\n", + "print(\"so (s4-s8)in KJ/kg K=\")\n", + "12.09/T1\n", + "print(\"also s3=s8=0.3386 KJ/kg K\")\n", + "s8=s3;\n", + "print(\"so s4 in KJ/kg K=\")\n", + "s4=s8+12.09/T1\n", + "print(\"also s1=s2=4.4809 KJ/kg K\")\n", + "s1=s2;\n", + "print(\"refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\")\n", + "Q=T1*(s1-s4)\n", + "print(\"work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\")\n", + "W=12.09+((T2-T1)*(s1-s8))\n", + "COP=Q/W\n", + "print(\"so COP=refrigeration effect/work done=\"),round(COP,2)\n", + "print(\"so COP=5.94\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.10;pg no: 445" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.10, Page:445 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\n", + "properties of Freon-12,\n", + "at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\n", + "at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\n", + "during expansion(throttling)between 3 and 4\n", + "h3=h4=hf_40oc=74.53 KJ/kg=h4\n", + "process 1-2 is adiabatic compression so,\n", + "s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\n", + "at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\n", + "T2=313*exp((s1-sg)/Cpg)in K\n", + "so temperature after compression,T2=324.17 K\n", + "enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\n", + "compression work required,per kg(Wc)=h2-h1 in KJ/kg\n", + "refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\n", + "mass flow rate of refrigerant,m=Q/q in kg/s\n", + "COP=q/Wc 3.17452\n", + "volumetric efficiency of reciprocating compressor,given C=0.02\n", + "n_vol=1+C-C*(P2/P1)^(1/n)\n", + "let piston printlacement by V,m^3\n", + "mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\n", + "so V in cm^3= 569.43\n", + "so COP=3.175\n", + "and piston printlacement=569.45 cm^3\n" + ] + } + ], + "source": [ + "#cal of COP and piston printlacement\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.10, Page:445 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\")\n", + "Q=2.86*3.5;#refrigeration effect in KJ/s\n", + "N=1200;#compressor rpm\n", + "n=1.13;#compression index\n", + "print(\"properties of Freon-12,\")\n", + "print(\"at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\")\n", + "P1=1.51;\n", + "T1=(-20+273);\n", + "vg=0.1088;\n", + "h1=178.61;\n", + "s1=0.7082;\n", + "s2=s1;\n", + "print(\"at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\")\n", + "P2=9.61;\n", + "h3=74.53;\n", + "h4=h3;\n", + "hg=203.05;\n", + "sf=0.2716;\n", + "sg=0.682;\n", + "Cpf=0.976;\n", + "Cpg=0.747;\n", + "print(\"during expansion(throttling)between 3 and 4\")\n", + "print(\"h3=h4=hf_40oc=74.53 KJ/kg=h4\")\n", + "print(\"process 1-2 is adiabatic compression so,\")\n", + "print(\"s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\")\n", + "print(\"at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\")\n", + "print(\"T2=313*exp((s1-sg)/Cpg)in K\")\n", + "T2=313*math.exp((s1-sg)/Cpg)\n", + "print(\"so temperature after compression,T2=324.17 K\")\n", + "print(\"enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\")\n", + "h2=hg+Cpg*(T2-313)\n", + "print(\"compression work required,per kg(Wc)=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "print(\"refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\")\n", + "q=h1-h4\n", + "print(\"mass flow rate of refrigerant,m=Q/q in kg/s\")\n", + "m=Q/q\n", + "m=0.096;#approx.\n", + "COP=q/Wc\n", + "print(\"COP=q/Wc\"),round(COP,5)\n", + "print(\"volumetric efficiency of reciprocating compressor,given C=0.02\")\n", + "C=0.02;\n", + "print(\"n_vol=1+C-C*(P2/P1)^(1/n)\")\n", + "n_vol=1+C-C*(P2/P1)**(1/n)\n", + "print(\"let piston printlacement by V,m^3\")\n", + "print(\"mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\")\n", + "V=(m*60*vg)*10**6/(N*n_vol)\n", + "print(\"so V in cm^3=\"),round(V,2)\n", + "print(\"so COP=3.175\")\n", + "print(\"and piston printlacement=569.45 cm^3\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.11;pg no: 447" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.11, Page:447 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\n", + "properties of CO2,\n", + "at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\n", + "at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\n", + "processes of vapour compression cycle are shown on T-s diagram\n", + "1-2:isentropic compression process\n", + "2-3-4:condensation process\n", + "4-5:isenthalpic expansion process\n", + "5-1:refrigeration process in evaporator\n", + "h1=hg at -10oc=322.28 KJ/kg\n", + "at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\n", + "entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\n", + "entropy during isentropic process,s1=s2\n", + "at -10 degree celcius,s2=sf+x1*sfg\n", + "so x1=(s2-sf)/(sg-sf)\n", + "enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\n", + "h3=hf at 20oc=144.11 KJ/kg\n", + "since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\n", + "also,h4=h5=115.22 KJ/kg\n", + "refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\n", + "let refrigerant flow rate be m kg/s\n", + "refrigerant effect(Q)=m*q\n", + "m=Q/q in kg/s 0.01016\n", + "compressor work,Wc=h2-h1 in KJ/kg\n", + "COP=refrigeration effect per kg/compressor work per kg= 6.51\n", + "so COP=6.51,mass flow rate=0.01016 kg/s\n", + "NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \n" + ] + } + ], + "source": [ + "#cal of COP and mass flow rate\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.11, Page:447 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\")\n", + "Q=2;#refrigeration effect in KW\n", + "print(\"properties of CO2,\")\n", + "print(\"at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\")\n", + "T1=(20.+273.);#condensation temperature in K\n", + "P1=57.27;\n", + "h3=144.11;\n", + "hg=299.62;\n", + "sf=0.523;\n", + "sg_20oc=1.0527;\n", + "Cpf=2.889;\n", + "Cpg=2.135;\n", + "print(\"at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\")\n", + "T2=(-10+273);#evaporator temperature in K\n", + "P2=26.49;\n", + "vg=0.014;\n", + "hf=60.78;\n", + "h1=322.28;\n", + "sf=0.2381;\n", + "sg=1.2324;\n", + "print(\"processes of vapour compression cycle are shown on T-s diagram\")\n", + "print(\"1-2:isentropic compression process\")\n", + "print(\"2-3-4:condensation process\")\n", + "print(\"4-5:isenthalpic expansion process\")\n", + "print(\"5-1:refrigeration process in evaporator\")\n", + "print(\"h1=hg at -10oc=322.28 KJ/kg\")\n", + "print(\"at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\")\n", + "h2=hg+Cpg*(40.-20.)\n", + "print(\"entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\")\n", + "s2=sg_20oc+Cpg*math.log((273.+40.)/(273.+20.))\n", + "print(\"entropy during isentropic process,s1=s2\")\n", + "print(\"at -10 degree celcius,s2=sf+x1*sfg\")\n", + "print(\"so x1=(s2-sf)/(sg-sf)\")\n", + "x1=(s2-sf)/(sg-sf)\n", + "print(\"enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\")\n", + "h1=hf+x1*(h1-hf)\n", + "print(\"h3=hf at 20oc=144.11 KJ/kg\")\n", + "print(\"since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\")\n", + "h4=h3-Cpf*(20.-10.)\n", + "print(\"also,h4=h5=115.22 KJ/kg\")\n", + "h5=h4;\n", + "print(\"refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\")\n", + "q=(h1-h5)\n", + "print(\"let refrigerant flow rate be m kg/s\")\n", + "print(\"refrigerant effect(Q)=m*q\")\n", + "m=Q/q\n", + "print(\"m=Q/q in kg/s\"),round(m,5)\n", + "print(\"compressor work,Wc=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "COP=q/Wc\n", + "print(\"COP=refrigeration effect per kg/compressor work per kg=\"),round(COP,2)\n", + "print(\"so COP=6.51,mass flow rate=0.01016 kg/s\")\n", + "print(\"NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.12;pg no: 448" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.12, Page:448 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\n", + "here pressure of atmospheric air(P)may be taken as 1.013 bar\n", + "specific humidity,omega=0.622*(Pv/(P-Pv))\n", + "so partial pressure of vapour(Pv)in bar\n", + "Pv in bar= 0.0254\n", + "relative humidity(phi)=(Pv/Pv_sat)\n", + "from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\n", + "so phi=Pv/Pv_sat 0.82\n", + "in percentage 81.99\n", + "so partial pressure of vapour=0.0254 bar\n", + "relative humidity=81.98 %\n" + ] + } + ], + "source": [ + "#cal of partial pressure of vapour and relative humidity\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.12, Page:448 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\")\n", + "omega=0.016;#specific humidity in gm/gm of air\n", + "print(\"here pressure of atmospheric air(P)may be taken as 1.013 bar\")\n", + "P=1.013;#pressure of atmospheric air in bar\n", + "print(\"specific humidity,omega=0.622*(Pv/(P-Pv))\")\n", + "print(\"so partial pressure of vapour(Pv)in bar\")\n", + "Pv=P/(1+(0.622/omega))\n", + "print(\"Pv in bar=\"),round(Pv,4)\n", + "Pv=0.0254;#approx.\n", + "print(\"relative humidity(phi)=(Pv/Pv_sat)\")\n", + "print(\"from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\")\n", + "Pv_sat=0.03098;\n", + "phi=Pv/Pv_sat\n", + "print(\"so phi=Pv/Pv_sat\"),round(phi,2)\n", + "print(\"in percentage\"),round(phi*100,2)\n", + "print(\"so partial pressure of vapour=0.0254 bar\")\n", + "print(\"relative humidity=81.98 %\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.13;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.13, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\n", + "at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\n", + "partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar 0.03\n", + "partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour 0.99\n", + "so partial pressure of air=0.9875 bar\n", + "humidity ratio,omega in kg/kg of dry air= 0.01606\n", + "so humidity ratio=0.01606 kg/kg of air\n", + "Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\n", + "so Dew point temperature=21.4 degree celcius\n", + "density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\n", + "rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\n", + "rho_m in kg/m^3= 1.1836\n", + "so density = 1.1835 kg/m^3\n", + "enthalpy of mixture,h in KJ/kg of dry air= 71.21\n", + "enthalpy of mixture =71.2 KJ/kg of dry air\n" + ] + } + ], + "source": [ + "#cal of partial pressure,humidity ratio,Dew point temperature,density and enthalpy of mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.13, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\")\n", + "r=0.6;#relative humidity\n", + "P=1.013;#total pressure of mixture in bar\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Ta=(30+273);#room temperature in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg degree celcius\n", + "print(\"at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\")\n", + "Pv_sat=0.0425;\n", + "Pv=r*Pv_sat\n", + "print(\"partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar\"),round(Pv,2)\n", + "Pa=P-Pv\n", + "print(\"partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour\"),round(Pa,2)\n", + "print(\"so partial pressure of air=0.9875 bar\")\n", + "omega=0.622*Pv/(P-Pv)\n", + "print(\"humidity ratio,omega in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"so humidity ratio=0.01606 kg/kg of air\")\n", + "print(\"Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\")\n", + "print(\"so Dew point temperature=21.4 degree celcius\")\n", + "print(\"density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\")\n", + "print(\"rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\")\n", + "rho_m=P*100*(1+omega)/(R*Ta)\n", + "print(\"rho_m in kg/m^3=\"),round(rho_m,4)\n", + "print(\"so density = 1.1835 kg/m^3\")\n", + "T=30;#room temperature in degree celcius\n", + "hg=2540.1;#enthalpy at 30 degree celcius in KJ/kg\n", + "h=Cp*T+omega*(hg+1.860*(30-21.4))\n", + "print(\"enthalpy of mixture,h in KJ/kg of dry air=\"),round(h,2)\n", + "print(\"enthalpy of mixture =71.2 KJ/kg of dry air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.14;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.14, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\n", + "initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\n", + "omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\n", + "mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\n", + "mass flow rate of air(ma)=0.8/v2 in kg/s\n", + "total mass of water added=ma*(omega2-omega1)in kg/s 0.001311\n", + "heat transferred in KJ/s= 12.18\n", + "so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\n" + ] + } + ], + "source": [ + "#cal of mass of water added and heat transferred\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.14, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\")\n", + "print(\"initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\")\n", + "print(\"omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\")\n", + "omega1=0.0086;\n", + "h1=37.;\n", + "omega2=0.01;\n", + "h2=50.;\n", + "v2=0.854;\n", + "print(\"mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\")\n", + "omega2-omega1\n", + "print(\"mass flow rate of air(ma)=0.8/v2 in kg/s\")\n", + "ma=0.8/v2\n", + "print(\"total mass of water added=ma*(omega2-omega1)in kg/s\"),round(ma*(omega2-omega1),6)\n", + "print(\"heat transferred in KJ/s=\"),round(ma*(h2-h1),2)\n", + "print(\"so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.15;pg no: 451" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.15, Page:451 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\n", + "Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\n", + "For moist air stream at 30 degree celcius and 30% relative humidity.\n", + "phi1=Pv1/Pv_sat_30oc\n", + "here Pv_sat_30oc=0.04246 bar\n", + "so Pv1=phi1*Pv_sat_30oc in bar\n", + "corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\n", + "specific humidity,omega1 in kg/kg of air= 0.00792\n", + "at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\n", + "h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\n", + "for second moist air stream at 35oc and 85% relative humidity\n", + "phi2=Pv2/Pv_sat_35oc\n", + "here Pv_sat_35oc=0.005628 bar\n", + "so Pv2=phi2*Pv_sat_35oc in bar\n", + "specific humidity,omega2 in kg/kg of air= 0.00295\n", + "corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\n", + "so,enthalpy of second stream,\n", + "h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\n", + "enthalpy of mixture after adiabatic mixing,\n", + "=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\n", + "mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\n", + "specific humidity of mixture(omega)in kg/kg of dry air= 0.00592\n", + "omega=0.622*Pv/(P-Pv)\n", + "Pv in bar= 0.00956\n", + "partial pressure of water vapour=0.00957 bar\n", + "so specific humidity of mixture=0.00593 kg/kg dry air\n", + "and partial pressure of water vapour in mixture=0.00957 bar\n" + ] + } + ], + "source": [ + "#cal of specific humidity and partial pressure of water vapour in mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.15, Page:451 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\")\n", + "P=1.013;#atmospheric pressure in bar\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "Cp_stream=1.86;#specific heat of stream at constant pressure in KJ/kg K\n", + "T1=30.;#temperature of first stream of moist air in K\n", + "m1=3.;#mass flow rate of first stream in kg/s \n", + "T2=35.;#temperature of second stream of moist air in K\n", + "m2=2.;#mass flow rate of second stream in kg/s \n", + "print(\"Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\")\n", + "print(\"For moist air stream at 30 degree celcius and 30% relative humidity.\")\n", + "phi1=0.3;\n", + "print(\"phi1=Pv1/Pv_sat_30oc\")\n", + "print(\"here Pv_sat_30oc=0.04246 bar\")\n", + "Pv_sat_30oc=0.04246;\n", + "print(\"so Pv1=phi1*Pv_sat_30oc in bar\")\n", + "Pv1=phi1*Pv_sat_30oc\n", + "print(\"corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\")\n", + "Tdp1=10.5;\n", + "omega1=0.622*Pv1/(P-Pv1)\n", + "print(\"specific humidity,omega1 in kg/kg of air=\"),round(omega1,5)\n", + "print(\"at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\")\n", + "hg=2520.7;#enthalpy at 10.5 degree celcius in KJ/kg\n", + "print(\"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\")\n", + "h1=Cp_air*T1+omega1*(hg-Cp_stream*(T1-Tdp1))\n", + "print(\"for second moist air stream at 35oc and 85% relative humidity\")\n", + "phi2=0.85;\n", + "print(\"phi2=Pv2/Pv_sat_35oc\")\n", + "print(\"here Pv_sat_35oc=0.005628 bar\")\n", + "Pv_sat_35oc=0.005628;\n", + "print(\"so Pv2=phi2*Pv_sat_35oc in bar\")\n", + "Pv2=phi2*Pv_sat_35oc\n", + "omega2=0.622*Pv2/(P-Pv2)\n", + "print(\"specific humidity,omega2 in kg/kg of air=\"),round(omega2,5)\n", + "print(\"corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\")\n", + "Tdp2=32.;\n", + "print(\"so,enthalpy of second stream,\")\n", + "print(\"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\")\n", + "hg=2559.9;#enthalpy at 32 degree celcius in KJ/kg\n", + "h2=Cp_air*T2+omega2*(hg+Cp_stream*(T2-Tdp2))\n", + "print(\"enthalpy of mixture after adiabatic mixing,\")\n", + "print(\"=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\")\n", + "(1./(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n", + "print(\"mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\")\n", + "(1./5.)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n", + "omega=0.00589/(1-0.005893)\n", + "print(\"specific humidity of mixture(omega)in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"omega=0.622*Pv/(P-Pv)\")\n", + "Pv=omega*P/(omega+0.622)\n", + "print(\"Pv in bar=\"),round(Pv,5)\n", + "print(\"partial pressure of water vapour=0.00957 bar\")\n", + "print(\"so specific humidity of mixture=0.00593 kg/kg dry air\")\n", + "print(\"and partial pressure of water vapour in mixture=0.00957 bar\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.16;pg no: 452" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.16, Page:452 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\n", + "The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\n", + "h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\n", + "final state 2 has,h2=52 KJ/kg\n", + "mass of air(m)=m1/v1 in kg/s\n", + "amount of heat added(Q)in KJ/s\n", + "Q=m*(h2-h1) 56.78\n" + ] + } + ], + "source": [ + "#cal of amount of heat added\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.16, Page:452 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\")\n", + "m1=3;#rate at which moist air enter in heating coil in m^3/s\n", + "print(\"The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\")\n", + "print(\"h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\")\n", + "h1=36.4;\n", + "omega1=0.0086;\n", + "v1=0.825;\n", + "print(\"final state 2 has,h2=52 KJ/kg\")\n", + "h2=52;\n", + "print(\"mass of air(m)=m1/v1 in kg/s\")\n", + "m=m1/v1\n", + "m=3.64;#approx.\n", + "print(\"amount of heat added(Q)in KJ/s\")\n", + "Q=m*(h2-h1)\n", + "print(\"Q=m*(h2-h1)\"),round(Q,2)" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb new file mode 100644 index 00000000..31f593f0 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_1.ipynb @@ -0,0 +1,1309 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11:Introduction to refrigeration and Air Conditioning" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.1;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.1, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\n", + "for refrigerator working on reversed carnot cycle.\n", + "Q1/T1=Q2/T2\n", + "so Q2=Q1*T2/T1 in KJ/min\n", + "and work input required,W in KJ/min\n", + "W=Q2-Q1 83.66\n" + ] + } + ], + "source": [ + "#cal of work input\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.1, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\")\n", + "T1=(-16.+273.);#temperature of refrigerated space in K\n", + "T2=(27.+273.);#temperature of atmosphere in K\n", + "Q1=500.;#heat extracted from refrigerated space in KJ/min\n", + "print(\"for refrigerator working on reversed carnot cycle.\")\n", + "print(\"Q1/T1=Q2/T2\")\n", + "print(\"so Q2=Q1*T2/T1 in KJ/min\")\n", + "Q2=Q1*T2/T1\n", + "print(\"and work input required,W in KJ/min\")\n", + "W=Q2-Q1\n", + "print(\"W=Q2-Q1\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.2;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.2, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\n", + "refrigeration capacity or heat extraction rate(Q)in KJ/s\n", + "let the ice formation rate be m kg/s\n", + "heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\n", + "ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice= 6.25\n", + "COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\n", + "also COP=Q/W\n", + "so W=Q/COP in KJ/s\n", + "HP required 643.62\n", + "NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\n" + ] + } + ], + "source": [ + "#cal of HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.2, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\")\n", + "Q=800.;#refrigeration capacity in tons\n", + "Q_latent=335.;#latent heat for ice formation from water in KJ/kg\n", + "T1=(-7.+273.);#temperature of reservoir 1 in K\n", + "T2=(27.+273.);#temperature of reservoir 2 in K\n", + "print(\"refrigeration capacity or heat extraction rate(Q)in KJ/s\")\n", + "Q=Q*3.5\n", + "print(\"let the ice formation rate be m kg/s\")\n", + "print(\"heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\")\n", + "Q1=4.18*(27-0)+Q_latent\n", + "m=Q/Q1\n", + "print(\"ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice=\"),round(Q/Q1,2)\n", + "print(\"COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\")\n", + "COP=T1/(T2-T1)\n", + "print(\"also COP=Q/W\")\n", + "print(\"so W=Q/COP in KJ/s\")\n", + "W=Q/COP\n", + "W=W/0.7457\n", + "print(\"HP required\"),round(W/0.7457,2)\n", + "print(\"NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.3;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.3, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\n", + "COP=T1/(T2-T1)=Q/W 1.56\n", + "equating,COP=T1/(T2-T1)\n", + "so temperature of surrounding(T2)in K\n", + "T2= 403.69\n" + ] + } + ], + "source": [ + "#cal of COP and temperature of surrounding\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.3, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\")\n", + "T1=(-27+273);#temperature of refrigerator in K\n", + "W=3*.7457;#work input in KJ/s\n", + "Q=1*3.5;#refrigeration effect in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=T1/(T2-T1)=Q/W\"),round(COP,2)\n", + "COP=1.56;#approx.\n", + "print(\"equating,COP=T1/(T2-T1)\")\n", + "print(\"so temperature of surrounding(T2)in K\")\n", + "T2=T1+(T1/COP)\n", + "print(\"T2=\"),round(T2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.4;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.4, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\n", + "during process 1-2_a\n", + "p2/p1=(T2_a/T1)^(y/(y-1))\n", + "so T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "theoretical temperature after compression,T2_a=440.18 K\n", + "for compression process,\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "for expansion process,3-4_a\n", + "T4_a/T3=(p1/p2)^((y-1)/y)\n", + "so T4_a=T3*(p1/p2)^((y-1)/y) in K\n", + "n2=0.9=(T3-T4)/(T3-T4_a)\n", + "so T4=T3-(n2*(T3-T4_a))in K\n", + "so work during compression,W_C in KJ/s\n", + "W_C=m*Cp*(T2-T1)\n", + "work during expansion,W_T in KJ/s\n", + "W_T=m*Cp*(T3-T4)\n", + "refrigeration effect is realized during process,4-1.so refrigeration shall be,\n", + "Q_ref=m*Cp*(T1-T4) in KJ/s\n", + "Q_ref in ton 18.36\n", + "net work required(W)=W_C-W_T in KJ/s 111.59\n", + "COP= 0.58\n", + "so refrigeration capacity=18.36 ton or 64.26 KJ/s\n", + "and COP=0.57\n", + "NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity and COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.4, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\")\n", + "T1=(-30.+273.);#temperature of air at beginning of compression in K\n", + "T3=(27.+273.);#temperature of air after cooling in K\n", + "r=8.;#pressure ratio\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "m=1.;#air flow rate in kg/s\n", + "n1=0.85;#isentropic efficiency for compression process\n", + "n2=.9;#isentropic efficiency for expansion process\n", + "print(\"during process 1-2_a\")\n", + "print(\"p2/p1=(T2_a/T1)^(y/(y-1))\")\n", + "print(\"so T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(r)**((y-1)/y)\n", + "print(\"theoretical temperature after compression,T2_a=440.18 K\")\n", + "print(\"for compression process,\")\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"for expansion process,3-4_a\")\n", + "print(\"T4_a/T3=(p1/p2)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p1/p2)^((y-1)/y) in K\")\n", + "T4_a=T3*(1/r)**((y-1)/y)\n", + "print(\"n2=0.9=(T3-T4)/(T3-T4_a)\")\n", + "print(\"so T4=T3-(n2*(T3-T4_a))in K\")\n", + "T4=T3-(n2*(T3-T4_a))\n", + "print(\"so work during compression,W_C in KJ/s\")\n", + "print(\"W_C=m*Cp*(T2-T1)\")\n", + "W_C=m*Cp*(T2-T1)\n", + "print(\"work during expansion,W_T in KJ/s\")\n", + "print(\"W_T=m*Cp*(T3-T4)\")\n", + "W_T=m*Cp*(T3-T4)\n", + "print(\"refrigeration effect is realized during process,4-1.so refrigeration shall be,\")\n", + "print(\"Q_ref=m*Cp*(T1-T4) in KJ/s\")\n", + "Q_ref=m*Cp*(T1-T4)\n", + "Q_ref=Q_ref/3.5\n", + "print(\"Q_ref in ton\"),round(Q_ref,2)\n", + "W=W_C-W_T\n", + "print(\"net work required(W)=W_C-W_T in KJ/s\"),round(W,2)\n", + "Q_ref=64.26;\n", + "COP=Q_ref/(W_C-W_T)\n", + "print(\"COP=\"),round(COP,2)\n", + "print(\"so refrigeration capacity=18.36 ton or 64.26 KJ/s\")\n", + "print(\"and COP=0.57\")\n", + "print(\"NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.5;pg no: 437" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.5, Page:437 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\n", + "for isentropic compression process:\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for isenropic expansion process:\n", + "(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(p2/p1)^((y-1)/y) in K\n", + "heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\n", + "refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\n", + "so net work(W)=Q23-Q41 in KJ/kg\n", + "so COP=refrigeration effect/net work= 1.71\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.5, Page:437 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\")\n", + "T1=(7+273);#temperature of refrigerated space in K\n", + "T3=(27+273);#temperature after compression in K\n", + "p1=1*10**5;#pressure of refrigerated space in pa\n", + "p2=5*10**5;#pressure after compression in pa\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for isentropic compression process:\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for isenropic expansion process:\")\n", + "print(\"(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(p2/p1)^((y-1)/y) in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "print(\"heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\")\n", + "Q23=Cp*(T2-T3)\n", + "print(\"refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\")\n", + "Q41=Cp*(T1-T4)\n", + "print(\"so net work(W)=Q23-Q41 in KJ/kg\")\n", + "W=Q23-Q41\n", + "COP=Q41/W\n", + "print(\"so COP=refrigeration effect/net work=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.6;pg no: 438" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.6, Page:438 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\n", + "for process 1-2\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for process 3-4\n", + "(p3/p4)^((y-1)/y)=T3/T4\n", + "so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\n", + "refrigeration capacity(Q) in KJ/s= 63.25\n", + "Q in ton\n", + "work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\n", + "w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\n", + "HP required to run compressor 177.86\n", + "so HP required to run compressor=177.86 hp\n", + "net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\n", + "COP=refrigeration capacity/work=Q/W 1.59\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity,HP required to run compressor,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.6, Page:438 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\")\n", + "T1=(-10.+273.);#air entering temperature in K\n", + "p1=1.*10**5;#air entering pressure in pa\n", + "T3=(27.+273.);#compressed air temperature after cooling in K\n", + "p2=5.5*10**5;#pressure after compression in pa\n", + "m=0.8;#air flow rate in kg/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"for process 1-2\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for process 3-4\")\n", + "print(\"(p3/p4)^((y-1)/y)=T3/T4\")\n", + "print(\"so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "Q=m*Cp*(T1-T4)\n", + "print(\"refrigeration capacity(Q) in KJ/s=\"),round(Q,2)\n", + "print(\"Q in ton\")\n", + "Q=Q/3.5\n", + "print(\"work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\")\n", + "print(\"w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\")\n", + "n=y;\n", + "w=(m*n)*R*(T2-T1)/(n-1)\n", + "print(\"HP required to run compressor\"),round(w/0.7457,2)\n", + "print(\"so HP required to run compressor=177.86 hp\")\n", + "print(\"net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\")\n", + "W=m*Cp*((T2-T3)-(T1-T4))\n", + "Q=63.25;#refrigeration capacity in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration capacity/work=Q/W\"),round(COP,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.7;pg no: 440" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.7, Page:440 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\n", + "for process 1-2,n=1.45\n", + "T2/T1=(p2/p1)^((n-1)/n)\n", + "so T2=T1*(p2/p1)^((n-1)/n) in K\n", + "for process 3-4,n=1.3\n", + "T4/T3=(p4/p3)^((n-1)/n)\n", + "so T4=T3*(p4/p3)^((n-1)/n)in K\n", + "refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\n", + "Q=m*Cp*(T5-T4)\n", + "m in kg/s= 0.55\n", + "so air mass flow rate in cabin=0.55 kg/s\n", + "let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\n", + "m1*Cp*(T8-T7)=m*Cp*(T2-T3)\n", + "during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\n", + "so T7=T6*(p7/p6)^((n-1)/n) in K\n", + "substituting T2,T3,T7,T8 and m in energy balance on intercooler,\n", + "m1=m*(T2-T3)/(T8-T7)in kg/s\n", + "total ram air mass flow rate=m+m1 in kg/s 2.11\n", + "ram air mass flow rate=2.12 kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\n", + "COP=refrigeration effect/work input=Q/W 0.485\n" + ] + } + ], + "source": [ + "#cal of air mass flow rate in cabin,ram air mass flow rate,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.7, Page:440 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\")\n", + "p1=1.2*10**5;#pressure of ram air in pa\n", + "p6=p1;\n", + "T1=(15.+273.);#temperature of ram air in K\n", + "T6=T1;\n", + "p7=0.9*10**5;#pressure of ram air after expansion in pa\n", + "p3=4.*10**5;#pressure of ram air after compression in pa\n", + "p2=p3;\n", + "p4=1.*10**5;#pressure of ram air after expansion in second turbine in pa\n", + "T5=(25.+273.);#temperature of air when exhausted from cabin in K\n", + "T3=(50.+273.);#temperature of compressed air in K\n", + "T8=(30.+273.);#limited temperaure of ram air in K\n", + "Q=10.*3.5;#refrigeration capacity in KJ/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,n=1.45\")\n", + "n=1.45;\n", + "print(\"T2/T1=(p2/p1)^((n-1)/n)\")\n", + "print(\"so T2=T1*(p2/p1)^((n-1)/n) in K\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"for process 3-4,n=1.3\")\n", + "n=1.3;\n", + "print(\"T4/T3=(p4/p3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(p4/p3)^((n-1)/n)in K\")\n", + "T4=T3*(p4/p3)**((n-1)/n)\n", + "print(\"refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\")\n", + "print(\"Q=m*Cp*(T5-T4)\")\n", + "m=Q/(Cp*(T5-T4))\n", + "print(\"m in kg/s=\"),round(m,2)\n", + "print(\"so air mass flow rate in cabin=0.55 kg/s\")\n", + "print(\"let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\")\n", + "print(\"m1*Cp*(T8-T7)=m*Cp*(T2-T3)\")\n", + "print(\"during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\")\n", + "print(\"so T7=T6*(p7/p6)^((n-1)/n) in K\")\n", + "T7=T6*(p7/p6)**((n-1)/n)\n", + "print(\"substituting T2,T3,T7,T8 and m in energy balance on intercooler,\")\n", + "print(\"m1=m*(T2-T3)/(T8-T7)in kg/s\")\n", + "m1=m*(T2-T3)/(T8-T7)\n", + "print(\"total ram air mass flow rate=m+m1 in kg/s\"),round(m+m1,2)\n", + "print(\"ram air mass flow rate=2.12 kg/s\")\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\")\n", + "m=0.55;#approx.\n", + "W=m*Cp*(T2-T1)\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W\"),round(Q/W,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.8;pg no: 441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.8, Page:441 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\n", + "considering index of compression and expansion as 1.4\n", + "during ramming action,process 0-1,\n", + "T1/To=(p1/po)^((y-1)/y)\n", + "T1=To*(p1/po)^((y-1)/y)in K\n", + "during compression process 1-2_a\n", + "T2_a/T1=(p2/p1)^((y-1)/y)\n", + "T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\n", + "subsequently for 10 degree celcius temperature drop in evaporator,\n", + "T4=T3-10 in K\n", + "expansion in cooling turbine during process 4-5;\n", + "T5_a/T4=(p5/p4)^((y-1)/y)\n", + "T5_a=T4*(p5/p4)^((y-1)/y)in K\n", + "n2=(T4-T5)/(T4-T5_a)\n", + "T5=T4-(T4-T5_a)*n2 in K\n", + "let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\n", + "Q=m*Cp*(T6-T5)\n", + "so m=Q/(Cp*(T6-T5))in kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s 41.4\n", + "W in Hp\n", + "COP=refrigeration effect/work input=Q/W= 1.27\n", + "so COP=1.27\n", + "and HP required=55.48 hp\n" + ] + } + ], + "source": [ + "#cal of COP and HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.8, Page:441 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\")\n", + "po=0.9*10**5;#atmospheric air pressure in pa\n", + "To=(3.+273.);#temperature of atmospheric air in K\n", + "p1=1.*10**5;#pressure due to ramming air in pa\n", + "p2=4.*10**5;#pressure when air leaves compressor in pa\n", + "p3=p2;\n", + "p4=p3;\n", + "p5=1.03*10**5;#pressure maintained in passenger cabin in pa\n", + "T6=(25.+273.);#temperature of air leaves cabin in K\n", + "Q=15.*3.5;#refrigeration capacity of aeroplane in KJ/s\n", + "n1=0.9;#isentropic efficiency of compressor\n", + "n2=0.8;#isentropic efficiency of turbine\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"considering index of compression and expansion as 1.4\")\n", + "y=1.4;\n", + "print(\"during ramming action,process 0-1,\")\n", + "print(\"T1/To=(p1/po)^((y-1)/y)\")\n", + "print(\"T1=To*(p1/po)^((y-1)/y)in K\")\n", + "T1=To*(p1/po)**((y-1)/y)\n", + "print(\"during compression process 1-2_a\")\n", + "print(\"T2_a/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\")\n", + "T3=0.34*T2\n", + "print(\"subsequently for 10 degree celcius temperature drop in evaporator,\")\n", + "print(\"T4=T3-10 in K\")\n", + "T4=T3-10\n", + "print(\"expansion in cooling turbine during process 4-5;\")\n", + "print(\"T5_a/T4=(p5/p4)^((y-1)/y)\")\n", + "print(\"T5_a=T4*(p5/p4)^((y-1)/y)in K\")\n", + "T5_a=T4*(p5/p4)**((y-1)/y)\n", + "print(\"n2=(T4-T5)/(T4-T5_a)\")\n", + "print(\"T5=T4-(T4-T5_a)*n2 in K\")\n", + "T5=T4-(T4-T5_a)*n2\n", + "print(\"let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\")\n", + "print(\"Q=m*Cp*(T6-T5)\")\n", + "print(\"so m=Q/(Cp*(T6-T5))in kg/s\")\n", + "m=Q/(Cp*(T6-T5))\n", + "W=m*Cp*(T2-T1)\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\"),round(W,2)\n", + "print(\"W in Hp\")\n", + "W=W/.7457\n", + "W=41.37;#work input to compressor in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W=\"),round(COP,2)\n", + "print(\"so COP=1.27\")\n", + "print(\"and HP required=55.48 hp\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.9;pg no: 443" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.9, Page:443 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\n", + "properties of NH3,\n", + "at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\n", + "and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\n", + "here work done,W=Area 1-2-3-9-1\n", + "refrigeration effect=Area 1-5-6-4-1\n", + "Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\n", + "so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\n", + "during throttling process between 3 and 4,h3=h4\n", + "(Area=3-11-7-3)=(Area 4-9-11-6-4)\n", + "(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\n", + "(Area 3-8-9)=(Area 4-6-7-8-4)\n", + "so (Area 4-6-7-8-4)=12.09 KJ/kg\n", + "also,(Area 4-6-7-8-4)=T1*(s4-s8)\n", + "so (s4-s8)in KJ/kg K=\n", + "also s3=s8=0.3386 KJ/kg K\n", + "so s4 in KJ/kg K=\n", + "also s1=s2=4.4809 KJ/kg K\n", + "refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\n", + "work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\n", + "so COP=refrigeration effect/work done= 5.94\n", + "so COP=5.94\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.9, Page:443 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\")\n", + "print(\"properties of NH3,\")\n", + "print(\"at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\")\n", + "T1=(-15+273);\n", + "h9=-54.51;\n", + "hg=1303.74;\n", + "s9=-0.2132;\n", + "sg=5.0536;\n", + "print(\"and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\")\n", + "T2=(25+273);\n", + "h3=99.94;\n", + "h2=1317.95;\n", + "s3=0.3386;\n", + "s2=4.4809;\n", + "print(\"here work done,W=Area 1-2-3-9-1\")\n", + "print(\"refrigeration effect=Area 1-5-6-4-1\")\n", + "print(\"Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\")\n", + "print(\"so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\")\n", + "h3-h9-T1*(s3-s9)\n", + "print(\"during throttling process between 3 and 4,h3=h4\")\n", + "print(\"(Area=3-11-7-3)=(Area 4-9-11-6-4)\")\n", + "print(\"(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\")\n", + "print(\"(Area 3-8-9)=(Area 4-6-7-8-4)\")\n", + "print(\"so (Area 4-6-7-8-4)=12.09 KJ/kg\")\n", + "print(\"also,(Area 4-6-7-8-4)=T1*(s4-s8)\")\n", + "print(\"so (s4-s8)in KJ/kg K=\")\n", + "12.09/T1\n", + "print(\"also s3=s8=0.3386 KJ/kg K\")\n", + "s8=s3;\n", + "print(\"so s4 in KJ/kg K=\")\n", + "s4=s8+12.09/T1\n", + "print(\"also s1=s2=4.4809 KJ/kg K\")\n", + "s1=s2;\n", + "print(\"refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\")\n", + "Q=T1*(s1-s4)\n", + "print(\"work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\")\n", + "W=12.09+((T2-T1)*(s1-s8))\n", + "COP=Q/W\n", + "print(\"so COP=refrigeration effect/work done=\"),round(COP,2)\n", + "print(\"so COP=5.94\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.10;pg no: 445" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.10, Page:445 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\n", + "properties of Freon-12,\n", + "at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\n", + "at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\n", + "during expansion(throttling)between 3 and 4\n", + "h3=h4=hf_40oc=74.53 KJ/kg=h4\n", + "process 1-2 is adiabatic compression so,\n", + "s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\n", + "at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\n", + "T2=313*exp((s1-sg)/Cpg)in K\n", + "so temperature after compression,T2=324.17 K\n", + "enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\n", + "compression work required,per kg(Wc)=h2-h1 in KJ/kg\n", + "refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\n", + "mass flow rate of refrigerant,m=Q/q in kg/s\n", + "COP=q/Wc 3.17452\n", + "volumetric efficiency of reciprocating compressor,given C=0.02\n", + "n_vol=1+C-C*(P2/P1)^(1/n)\n", + "let piston printlacement by V,m^3\n", + "mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\n", + "so V in cm^3= 569.43\n", + "so COP=3.175\n", + "and piston printlacement=569.45 cm^3\n" + ] + } + ], + "source": [ + "#cal of COP and piston printlacement\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.10, Page:445 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\")\n", + "Q=2.86*3.5;#refrigeration effect in KJ/s\n", + "N=1200;#compressor rpm\n", + "n=1.13;#compression index\n", + "print(\"properties of Freon-12,\")\n", + "print(\"at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\")\n", + "P1=1.51;\n", + "T1=(-20+273);\n", + "vg=0.1088;\n", + "h1=178.61;\n", + "s1=0.7082;\n", + "s2=s1;\n", + "print(\"at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\")\n", + "P2=9.61;\n", + "h3=74.53;\n", + "h4=h3;\n", + "hg=203.05;\n", + "sf=0.2716;\n", + "sg=0.682;\n", + "Cpf=0.976;\n", + "Cpg=0.747;\n", + "print(\"during expansion(throttling)between 3 and 4\")\n", + "print(\"h3=h4=hf_40oc=74.53 KJ/kg=h4\")\n", + "print(\"process 1-2 is adiabatic compression so,\")\n", + "print(\"s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\")\n", + "print(\"at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\")\n", + "print(\"T2=313*exp((s1-sg)/Cpg)in K\")\n", + "T2=313*math.exp((s1-sg)/Cpg)\n", + "print(\"so temperature after compression,T2=324.17 K\")\n", + "print(\"enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\")\n", + "h2=hg+Cpg*(T2-313)\n", + "print(\"compression work required,per kg(Wc)=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "print(\"refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\")\n", + "q=h1-h4\n", + "print(\"mass flow rate of refrigerant,m=Q/q in kg/s\")\n", + "m=Q/q\n", + "m=0.096;#approx.\n", + "COP=q/Wc\n", + "print(\"COP=q/Wc\"),round(COP,5)\n", + "print(\"volumetric efficiency of reciprocating compressor,given C=0.02\")\n", + "C=0.02;\n", + "print(\"n_vol=1+C-C*(P2/P1)^(1/n)\")\n", + "n_vol=1+C-C*(P2/P1)**(1/n)\n", + "print(\"let piston printlacement by V,m^3\")\n", + "print(\"mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\")\n", + "V=(m*60*vg)*10**6/(N*n_vol)\n", + "print(\"so V in cm^3=\"),round(V,2)\n", + "print(\"so COP=3.175\")\n", + "print(\"and piston printlacement=569.45 cm^3\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.11;pg no: 447" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.11, Page:447 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\n", + "properties of CO2,\n", + "at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\n", + "at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\n", + "processes of vapour compression cycle are shown on T-s diagram\n", + "1-2:isentropic compression process\n", + "2-3-4:condensation process\n", + "4-5:isenthalpic expansion process\n", + "5-1:refrigeration process in evaporator\n", + "h1=hg at -10oc=322.28 KJ/kg\n", + "at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\n", + "entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\n", + "entropy during isentropic process,s1=s2\n", + "at -10 degree celcius,s2=sf+x1*sfg\n", + "so x1=(s2-sf)/(sg-sf)\n", + "enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\n", + "h3=hf at 20oc=144.11 KJ/kg\n", + "since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\n", + "also,h4=h5=115.22 KJ/kg\n", + "refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\n", + "let refrigerant flow rate be m kg/s\n", + "refrigerant effect(Q)=m*q\n", + "m=Q/q in kg/s 0.01016\n", + "compressor work,Wc=h2-h1 in KJ/kg\n", + "COP=refrigeration effect per kg/compressor work per kg= 6.51\n", + "so COP=6.51,mass flow rate=0.01016 kg/s\n", + "NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \n" + ] + } + ], + "source": [ + "#cal of COP and mass flow rate\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.11, Page:447 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\")\n", + "Q=2;#refrigeration effect in KW\n", + "print(\"properties of CO2,\")\n", + "print(\"at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\")\n", + "T1=(20.+273.);#condensation temperature in K\n", + "P1=57.27;\n", + "h3=144.11;\n", + "hg=299.62;\n", + "sf=0.523;\n", + "sg_20oc=1.0527;\n", + "Cpf=2.889;\n", + "Cpg=2.135;\n", + "print(\"at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\")\n", + "T2=(-10+273);#evaporator temperature in K\n", + "P2=26.49;\n", + "vg=0.014;\n", + "hf=60.78;\n", + "h1=322.28;\n", + "sf=0.2381;\n", + "sg=1.2324;\n", + "print(\"processes of vapour compression cycle are shown on T-s diagram\")\n", + "print(\"1-2:isentropic compression process\")\n", + "print(\"2-3-4:condensation process\")\n", + "print(\"4-5:isenthalpic expansion process\")\n", + "print(\"5-1:refrigeration process in evaporator\")\n", + "print(\"h1=hg at -10oc=322.28 KJ/kg\")\n", + "print(\"at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\")\n", + "h2=hg+Cpg*(40.-20.)\n", + "print(\"entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\")\n", + "s2=sg_20oc+Cpg*math.log((273.+40.)/(273.+20.))\n", + "print(\"entropy during isentropic process,s1=s2\")\n", + "print(\"at -10 degree celcius,s2=sf+x1*sfg\")\n", + "print(\"so x1=(s2-sf)/(sg-sf)\")\n", + "x1=(s2-sf)/(sg-sf)\n", + "print(\"enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\")\n", + "h1=hf+x1*(h1-hf)\n", + "print(\"h3=hf at 20oc=144.11 KJ/kg\")\n", + "print(\"since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\")\n", + "h4=h3-Cpf*(20.-10.)\n", + "print(\"also,h4=h5=115.22 KJ/kg\")\n", + "h5=h4;\n", + "print(\"refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\")\n", + "q=(h1-h5)\n", + "print(\"let refrigerant flow rate be m kg/s\")\n", + "print(\"refrigerant effect(Q)=m*q\")\n", + "m=Q/q\n", + "print(\"m=Q/q in kg/s\"),round(m,5)\n", + "print(\"compressor work,Wc=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "COP=q/Wc\n", + "print(\"COP=refrigeration effect per kg/compressor work per kg=\"),round(COP,2)\n", + "print(\"so COP=6.51,mass flow rate=0.01016 kg/s\")\n", + "print(\"NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.12;pg no: 448" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.12, Page:448 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\n", + "here pressure of atmospheric air(P)may be taken as 1.013 bar\n", + "specific humidity,omega=0.622*(Pv/(P-Pv))\n", + "so partial pressure of vapour(Pv)in bar\n", + "Pv in bar= 0.0254\n", + "relative humidity(phi)=(Pv/Pv_sat)\n", + "from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\n", + "so phi=Pv/Pv_sat 0.82\n", + "in percentage 81.99\n", + "so partial pressure of vapour=0.0254 bar\n", + "relative humidity=81.98 %\n" + ] + } + ], + "source": [ + "#cal of partial pressure of vapour and relative humidity\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.12, Page:448 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\")\n", + "omega=0.016;#specific humidity in gm/gm of air\n", + "print(\"here pressure of atmospheric air(P)may be taken as 1.013 bar\")\n", + "P=1.013;#pressure of atmospheric air in bar\n", + "print(\"specific humidity,omega=0.622*(Pv/(P-Pv))\")\n", + "print(\"so partial pressure of vapour(Pv)in bar\")\n", + "Pv=P/(1+(0.622/omega))\n", + "print(\"Pv in bar=\"),round(Pv,4)\n", + "Pv=0.0254;#approx.\n", + "print(\"relative humidity(phi)=(Pv/Pv_sat)\")\n", + "print(\"from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\")\n", + "Pv_sat=0.03098;\n", + "phi=Pv/Pv_sat\n", + "print(\"so phi=Pv/Pv_sat\"),round(phi,2)\n", + "print(\"in percentage\"),round(phi*100,2)\n", + "print(\"so partial pressure of vapour=0.0254 bar\")\n", + "print(\"relative humidity=81.98 %\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.13;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.13, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\n", + "at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\n", + "partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar 0.03\n", + "partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour 0.99\n", + "so partial pressure of air=0.9875 bar\n", + "humidity ratio,omega in kg/kg of dry air= 0.01606\n", + "so humidity ratio=0.01606 kg/kg of air\n", + "Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\n", + "so Dew point temperature=21.4 degree celcius\n", + "density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\n", + "rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\n", + "rho_m in kg/m^3= 1.1836\n", + "so density = 1.1835 kg/m^3\n", + "enthalpy of mixture,h in KJ/kg of dry air= 71.21\n", + "enthalpy of mixture =71.2 KJ/kg of dry air\n" + ] + } + ], + "source": [ + "#cal of partial pressure,humidity ratio,Dew point temperature,density and enthalpy of mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.13, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\")\n", + "r=0.6;#relative humidity\n", + "P=1.013;#total pressure of mixture in bar\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Ta=(30+273);#room temperature in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg degree celcius\n", + "print(\"at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\")\n", + "Pv_sat=0.0425;\n", + "Pv=r*Pv_sat\n", + "print(\"partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar\"),round(Pv,2)\n", + "Pa=P-Pv\n", + "print(\"partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour\"),round(Pa,2)\n", + "print(\"so partial pressure of air=0.9875 bar\")\n", + "omega=0.622*Pv/(P-Pv)\n", + "print(\"humidity ratio,omega in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"so humidity ratio=0.01606 kg/kg of air\")\n", + "print(\"Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\")\n", + "print(\"so Dew point temperature=21.4 degree celcius\")\n", + "print(\"density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\")\n", + "print(\"rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\")\n", + "rho_m=P*100*(1+omega)/(R*Ta)\n", + "print(\"rho_m in kg/m^3=\"),round(rho_m,4)\n", + "print(\"so density = 1.1835 kg/m^3\")\n", + "T=30;#room temperature in degree celcius\n", + "hg=2540.1;#enthalpy at 30 degree celcius in KJ/kg\n", + "h=Cp*T+omega*(hg+1.860*(30-21.4))\n", + "print(\"enthalpy of mixture,h in KJ/kg of dry air=\"),round(h,2)\n", + "print(\"enthalpy of mixture =71.2 KJ/kg of dry air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.14;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.14, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\n", + "initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\n", + "omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\n", + "mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\n", + "mass flow rate of air(ma)=0.8/v2 in kg/s\n", + "total mass of water added=ma*(omega2-omega1)in kg/s 0.001311\n", + "heat transferred in KJ/s= 12.18\n", + "so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\n" + ] + } + ], + "source": [ + "#cal of mass of water added and heat transferred\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.14, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\")\n", + "print(\"initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\")\n", + "print(\"omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\")\n", + "omega1=0.0086;\n", + "h1=37.;\n", + "omega2=0.01;\n", + "h2=50.;\n", + "v2=0.854;\n", + "print(\"mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\")\n", + "omega2-omega1\n", + "print(\"mass flow rate of air(ma)=0.8/v2 in kg/s\")\n", + "ma=0.8/v2\n", + "print(\"total mass of water added=ma*(omega2-omega1)in kg/s\"),round(ma*(omega2-omega1),6)\n", + "print(\"heat transferred in KJ/s=\"),round(ma*(h2-h1),2)\n", + "print(\"so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.15;pg no: 451" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.15, Page:451 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\n", + "Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\n", + "For moist air stream at 30 degree celcius and 30% relative humidity.\n", + "phi1=Pv1/Pv_sat_30oc\n", + "here Pv_sat_30oc=0.04246 bar\n", + "so Pv1=phi1*Pv_sat_30oc in bar\n", + "corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\n", + "specific humidity,omega1 in kg/kg of air= 0.00792\n", + "at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\n", + "h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\n", + "for second moist air stream at 35oc and 85% relative humidity\n", + "phi2=Pv2/Pv_sat_35oc\n", + "here Pv_sat_35oc=0.005628 bar\n", + "so Pv2=phi2*Pv_sat_35oc in bar\n", + "specific humidity,omega2 in kg/kg of air= 0.00295\n", + "corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\n", + "so,enthalpy of second stream,\n", + "h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\n", + "enthalpy of mixture after adiabatic mixing,\n", + "=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\n", + "mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\n", + "specific humidity of mixture(omega)in kg/kg of dry air= 0.00592\n", + "omega=0.622*Pv/(P-Pv)\n", + "Pv in bar= 0.00956\n", + "partial pressure of water vapour=0.00957 bar\n", + "so specific humidity of mixture=0.00593 kg/kg dry air\n", + "and partial pressure of water vapour in mixture=0.00957 bar\n" + ] + } + ], + "source": [ + "#cal of specific humidity and partial pressure of water vapour in mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.15, Page:451 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\")\n", + "P=1.013;#atmospheric pressure in bar\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "Cp_stream=1.86;#specific heat of stream at constant pressure in KJ/kg K\n", + "T1=30.;#temperature of first stream of moist air in K\n", + "m1=3.;#mass flow rate of first stream in kg/s \n", + "T2=35.;#temperature of second stream of moist air in K\n", + "m2=2.;#mass flow rate of second stream in kg/s \n", + "print(\"Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\")\n", + "print(\"For moist air stream at 30 degree celcius and 30% relative humidity.\")\n", + "phi1=0.3;\n", + "print(\"phi1=Pv1/Pv_sat_30oc\")\n", + "print(\"here Pv_sat_30oc=0.04246 bar\")\n", + "Pv_sat_30oc=0.04246;\n", + "print(\"so Pv1=phi1*Pv_sat_30oc in bar\")\n", + "Pv1=phi1*Pv_sat_30oc\n", + "print(\"corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\")\n", + "Tdp1=10.5;\n", + "omega1=0.622*Pv1/(P-Pv1)\n", + "print(\"specific humidity,omega1 in kg/kg of air=\"),round(omega1,5)\n", + "print(\"at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\")\n", + "hg=2520.7;#enthalpy at 10.5 degree celcius in KJ/kg\n", + "print(\"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\")\n", + "h1=Cp_air*T1+omega1*(hg-Cp_stream*(T1-Tdp1))\n", + "print(\"for second moist air stream at 35oc and 85% relative humidity\")\n", + "phi2=0.85;\n", + "print(\"phi2=Pv2/Pv_sat_35oc\")\n", + "print(\"here Pv_sat_35oc=0.005628 bar\")\n", + "Pv_sat_35oc=0.005628;\n", + "print(\"so Pv2=phi2*Pv_sat_35oc in bar\")\n", + "Pv2=phi2*Pv_sat_35oc\n", + "omega2=0.622*Pv2/(P-Pv2)\n", + "print(\"specific humidity,omega2 in kg/kg of air=\"),round(omega2,5)\n", + "print(\"corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\")\n", + "Tdp2=32.;\n", + "print(\"so,enthalpy of second stream,\")\n", + "print(\"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\")\n", + "hg=2559.9;#enthalpy at 32 degree celcius in KJ/kg\n", + "h2=Cp_air*T2+omega2*(hg+Cp_stream*(T2-Tdp2))\n", + "print(\"enthalpy of mixture after adiabatic mixing,\")\n", + "print(\"=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\")\n", + "(1./(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n", + "print(\"mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\")\n", + "(1./5.)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n", + "omega=0.00589/(1-0.005893)\n", + "print(\"specific humidity of mixture(omega)in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"omega=0.622*Pv/(P-Pv)\")\n", + "Pv=omega*P/(omega+0.622)\n", + "print(\"Pv in bar=\"),round(Pv,5)\n", + "print(\"partial pressure of water vapour=0.00957 bar\")\n", + "print(\"so specific humidity of mixture=0.00593 kg/kg dry air\")\n", + "print(\"and partial pressure of water vapour in mixture=0.00957 bar\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.16;pg no: 452" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.16, Page:452 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\n", + "The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\n", + "h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\n", + "final state 2 has,h2=52 KJ/kg\n", + "mass of air(m)=m1/v1 in kg/s\n", + "amount of heat added(Q)in KJ/s\n", + "Q=m*(h2-h1) 56.78\n" + ] + } + ], + "source": [ + "#cal of amount of heat added\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.16, Page:452 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\")\n", + "m1=3;#rate at which moist air enter in heating coil in m^3/s\n", + "print(\"The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\")\n", + "print(\"h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\")\n", + "h1=36.4;\n", + "omega1=0.0086;\n", + "v1=0.825;\n", + "print(\"final state 2 has,h2=52 KJ/kg\")\n", + "h2=52;\n", + "print(\"mass of air(m)=m1/v1 in kg/s\")\n", + "m=m1/v1\n", + "m=3.64;#approx.\n", + "print(\"amount of heat added(Q)in KJ/s\")\n", + "Q=m*(h2-h1)\n", + "print(\"Q=m*(h2-h1)\"),round(Q,2)" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb new file mode 100644 index 00000000..31f593f0 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb @@ -0,0 +1,1309 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11:Introduction to refrigeration and Air Conditioning" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.1;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.1, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\n", + "for refrigerator working on reversed carnot cycle.\n", + "Q1/T1=Q2/T2\n", + "so Q2=Q1*T2/T1 in KJ/min\n", + "and work input required,W in KJ/min\n", + "W=Q2-Q1 83.66\n" + ] + } + ], + "source": [ + "#cal of work input\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.1, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\")\n", + "T1=(-16.+273.);#temperature of refrigerated space in K\n", + "T2=(27.+273.);#temperature of atmosphere in K\n", + "Q1=500.;#heat extracted from refrigerated space in KJ/min\n", + "print(\"for refrigerator working on reversed carnot cycle.\")\n", + "print(\"Q1/T1=Q2/T2\")\n", + "print(\"so Q2=Q1*T2/T1 in KJ/min\")\n", + "Q2=Q1*T2/T1\n", + "print(\"and work input required,W in KJ/min\")\n", + "W=Q2-Q1\n", + "print(\"W=Q2-Q1\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.2;pg no: 435" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.2, Page:435 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\n", + "refrigeration capacity or heat extraction rate(Q)in KJ/s\n", + "let the ice formation rate be m kg/s\n", + "heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\n", + "ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice= 6.25\n", + "COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\n", + "also COP=Q/W\n", + "so W=Q/COP in KJ/s\n", + "HP required 643.62\n", + "NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\n" + ] + } + ], + "source": [ + "#cal of HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.2, Page:435 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\")\n", + "Q=800.;#refrigeration capacity in tons\n", + "Q_latent=335.;#latent heat for ice formation from water in KJ/kg\n", + "T1=(-7.+273.);#temperature of reservoir 1 in K\n", + "T2=(27.+273.);#temperature of reservoir 2 in K\n", + "print(\"refrigeration capacity or heat extraction rate(Q)in KJ/s\")\n", + "Q=Q*3.5\n", + "print(\"let the ice formation rate be m kg/s\")\n", + "print(\"heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\")\n", + "Q1=4.18*(27-0)+Q_latent\n", + "m=Q/Q1\n", + "print(\"ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice=\"),round(Q/Q1,2)\n", + "print(\"COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\")\n", + "COP=T1/(T2-T1)\n", + "print(\"also COP=Q/W\")\n", + "print(\"so W=Q/COP in KJ/s\")\n", + "W=Q/COP\n", + "W=W/0.7457\n", + "print(\"HP required\"),round(W/0.7457,2)\n", + "print(\"NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.3;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.3, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\n", + "COP=T1/(T2-T1)=Q/W 1.56\n", + "equating,COP=T1/(T2-T1)\n", + "so temperature of surrounding(T2)in K\n", + "T2= 403.69\n" + ] + } + ], + "source": [ + "#cal of COP and temperature of surrounding\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.3, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\")\n", + "T1=(-27+273);#temperature of refrigerator in K\n", + "W=3*.7457;#work input in KJ/s\n", + "Q=1*3.5;#refrigeration effect in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=T1/(T2-T1)=Q/W\"),round(COP,2)\n", + "COP=1.56;#approx.\n", + "print(\"equating,COP=T1/(T2-T1)\")\n", + "print(\"so temperature of surrounding(T2)in K\")\n", + "T2=T1+(T1/COP)\n", + "print(\"T2=\"),round(T2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.4;pg no: 436" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.4, Page:436 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\n", + "during process 1-2_a\n", + "p2/p1=(T2_a/T1)^(y/(y-1))\n", + "so T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "theoretical temperature after compression,T2_a=440.18 K\n", + "for compression process,\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "for expansion process,3-4_a\n", + "T4_a/T3=(p1/p2)^((y-1)/y)\n", + "so T4_a=T3*(p1/p2)^((y-1)/y) in K\n", + "n2=0.9=(T3-T4)/(T3-T4_a)\n", + "so T4=T3-(n2*(T3-T4_a))in K\n", + "so work during compression,W_C in KJ/s\n", + "W_C=m*Cp*(T2-T1)\n", + "work during expansion,W_T in KJ/s\n", + "W_T=m*Cp*(T3-T4)\n", + "refrigeration effect is realized during process,4-1.so refrigeration shall be,\n", + "Q_ref=m*Cp*(T1-T4) in KJ/s\n", + "Q_ref in ton 18.36\n", + "net work required(W)=W_C-W_T in KJ/s 111.59\n", + "COP= 0.58\n", + "so refrigeration capacity=18.36 ton or 64.26 KJ/s\n", + "and COP=0.57\n", + "NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity and COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.4, Page:436 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\")\n", + "T1=(-30.+273.);#temperature of air at beginning of compression in K\n", + "T3=(27.+273.);#temperature of air after cooling in K\n", + "r=8.;#pressure ratio\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "m=1.;#air flow rate in kg/s\n", + "n1=0.85;#isentropic efficiency for compression process\n", + "n2=.9;#isentropic efficiency for expansion process\n", + "print(\"during process 1-2_a\")\n", + "print(\"p2/p1=(T2_a/T1)^(y/(y-1))\")\n", + "print(\"so T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(r)**((y-1)/y)\n", + "print(\"theoretical temperature after compression,T2_a=440.18 K\")\n", + "print(\"for compression process,\")\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"for expansion process,3-4_a\")\n", + "print(\"T4_a/T3=(p1/p2)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p1/p2)^((y-1)/y) in K\")\n", + "T4_a=T3*(1/r)**((y-1)/y)\n", + "print(\"n2=0.9=(T3-T4)/(T3-T4_a)\")\n", + "print(\"so T4=T3-(n2*(T3-T4_a))in K\")\n", + "T4=T3-(n2*(T3-T4_a))\n", + "print(\"so work during compression,W_C in KJ/s\")\n", + "print(\"W_C=m*Cp*(T2-T1)\")\n", + "W_C=m*Cp*(T2-T1)\n", + "print(\"work during expansion,W_T in KJ/s\")\n", + "print(\"W_T=m*Cp*(T3-T4)\")\n", + "W_T=m*Cp*(T3-T4)\n", + "print(\"refrigeration effect is realized during process,4-1.so refrigeration shall be,\")\n", + "print(\"Q_ref=m*Cp*(T1-T4) in KJ/s\")\n", + "Q_ref=m*Cp*(T1-T4)\n", + "Q_ref=Q_ref/3.5\n", + "print(\"Q_ref in ton\"),round(Q_ref,2)\n", + "W=W_C-W_T\n", + "print(\"net work required(W)=W_C-W_T in KJ/s\"),round(W,2)\n", + "Q_ref=64.26;\n", + "COP=Q_ref/(W_C-W_T)\n", + "print(\"COP=\"),round(COP,2)\n", + "print(\"so refrigeration capacity=18.36 ton or 64.26 KJ/s\")\n", + "print(\"and COP=0.57\")\n", + "print(\"NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.5;pg no: 437" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.5, Page:437 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\n", + "for isentropic compression process:\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for isenropic expansion process:\n", + "(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(p2/p1)^((y-1)/y) in K\n", + "heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\n", + "refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\n", + "so net work(W)=Q23-Q41 in KJ/kg\n", + "so COP=refrigeration effect/net work= 1.71\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.5, Page:437 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\")\n", + "T1=(7+273);#temperature of refrigerated space in K\n", + "T3=(27+273);#temperature after compression in K\n", + "p1=1*10**5;#pressure of refrigerated space in pa\n", + "p2=5*10**5;#pressure after compression in pa\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for isentropic compression process:\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for isenropic expansion process:\")\n", + "print(\"(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(p2/p1)^((y-1)/y) in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "print(\"heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\")\n", + "Q23=Cp*(T2-T3)\n", + "print(\"refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\")\n", + "Q41=Cp*(T1-T4)\n", + "print(\"so net work(W)=Q23-Q41 in KJ/kg\")\n", + "W=Q23-Q41\n", + "COP=Q41/W\n", + "print(\"so COP=refrigeration effect/net work=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.6;pg no: 438" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.6, Page:438 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\n", + "for process 1-2\n", + "(p2/p1)^((y-1)/y)=T2/T1\n", + "so T2=T1*(p2/p1)^((y-1)/y) in K\n", + "for process 3-4\n", + "(p3/p4)^((y-1)/y)=T3/T4\n", + "so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\n", + "refrigeration capacity(Q) in KJ/s= 63.25\n", + "Q in ton\n", + "work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\n", + "w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\n", + "HP required to run compressor 177.86\n", + "so HP required to run compressor=177.86 hp\n", + "net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\n", + "COP=refrigeration capacity/work=Q/W 1.59\n" + ] + } + ], + "source": [ + "#cal of refrigeration capacity,HP required to run compressor,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.6, Page:438 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\")\n", + "T1=(-10.+273.);#air entering temperature in K\n", + "p1=1.*10**5;#air entering pressure in pa\n", + "T3=(27.+273.);#compressed air temperature after cooling in K\n", + "p2=5.5*10**5;#pressure after compression in pa\n", + "m=0.8;#air flow rate in kg/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"for process 1-2\")\n", + "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"for process 3-4\")\n", + "print(\"(p3/p4)^((y-1)/y)=T3/T4\")\n", + "print(\"so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\")\n", + "T4=T3/(p2/p1)**((y-1)/y)\n", + "Q=m*Cp*(T1-T4)\n", + "print(\"refrigeration capacity(Q) in KJ/s=\"),round(Q,2)\n", + "print(\"Q in ton\")\n", + "Q=Q/3.5\n", + "print(\"work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\")\n", + "print(\"w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\")\n", + "n=y;\n", + "w=(m*n)*R*(T2-T1)/(n-1)\n", + "print(\"HP required to run compressor\"),round(w/0.7457,2)\n", + "print(\"so HP required to run compressor=177.86 hp\")\n", + "print(\"net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\")\n", + "W=m*Cp*((T2-T3)-(T1-T4))\n", + "Q=63.25;#refrigeration capacity in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration capacity/work=Q/W\"),round(COP,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.7;pg no: 440" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.7, Page:440 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\n", + "for process 1-2,n=1.45\n", + "T2/T1=(p2/p1)^((n-1)/n)\n", + "so T2=T1*(p2/p1)^((n-1)/n) in K\n", + "for process 3-4,n=1.3\n", + "T4/T3=(p4/p3)^((n-1)/n)\n", + "so T4=T3*(p4/p3)^((n-1)/n)in K\n", + "refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\n", + "Q=m*Cp*(T5-T4)\n", + "m in kg/s= 0.55\n", + "so air mass flow rate in cabin=0.55 kg/s\n", + "let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\n", + "m1*Cp*(T8-T7)=m*Cp*(T2-T3)\n", + "during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\n", + "so T7=T6*(p7/p6)^((n-1)/n) in K\n", + "substituting T2,T3,T7,T8 and m in energy balance on intercooler,\n", + "m1=m*(T2-T3)/(T8-T7)in kg/s\n", + "total ram air mass flow rate=m+m1 in kg/s 2.11\n", + "ram air mass flow rate=2.12 kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\n", + "COP=refrigeration effect/work input=Q/W 0.485\n" + ] + } + ], + "source": [ + "#cal of air mass flow rate in cabin,ram air mass flow rate,COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.7, Page:440 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\")\n", + "p1=1.2*10**5;#pressure of ram air in pa\n", + "p6=p1;\n", + "T1=(15.+273.);#temperature of ram air in K\n", + "T6=T1;\n", + "p7=0.9*10**5;#pressure of ram air after expansion in pa\n", + "p3=4.*10**5;#pressure of ram air after compression in pa\n", + "p2=p3;\n", + "p4=1.*10**5;#pressure of ram air after expansion in second turbine in pa\n", + "T5=(25.+273.);#temperature of air when exhausted from cabin in K\n", + "T3=(50.+273.);#temperature of compressed air in K\n", + "T8=(30.+273.);#limited temperaure of ram air in K\n", + "Q=10.*3.5;#refrigeration capacity in KJ/s\n", + "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,n=1.45\")\n", + "n=1.45;\n", + "print(\"T2/T1=(p2/p1)^((n-1)/n)\")\n", + "print(\"so T2=T1*(p2/p1)^((n-1)/n) in K\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"for process 3-4,n=1.3\")\n", + "n=1.3;\n", + "print(\"T4/T3=(p4/p3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(p4/p3)^((n-1)/n)in K\")\n", + "T4=T3*(p4/p3)**((n-1)/n)\n", + "print(\"refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\")\n", + "print(\"Q=m*Cp*(T5-T4)\")\n", + "m=Q/(Cp*(T5-T4))\n", + "print(\"m in kg/s=\"),round(m,2)\n", + "print(\"so air mass flow rate in cabin=0.55 kg/s\")\n", + "print(\"let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\")\n", + "print(\"m1*Cp*(T8-T7)=m*Cp*(T2-T3)\")\n", + "print(\"during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\")\n", + "print(\"so T7=T6*(p7/p6)^((n-1)/n) in K\")\n", + "T7=T6*(p7/p6)**((n-1)/n)\n", + "print(\"substituting T2,T3,T7,T8 and m in energy balance on intercooler,\")\n", + "print(\"m1=m*(T2-T3)/(T8-T7)in kg/s\")\n", + "m1=m*(T2-T3)/(T8-T7)\n", + "print(\"total ram air mass flow rate=m+m1 in kg/s\"),round(m+m1,2)\n", + "print(\"ram air mass flow rate=2.12 kg/s\")\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\")\n", + "m=0.55;#approx.\n", + "W=m*Cp*(T2-T1)\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W\"),round(Q/W,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.8;pg no: 441" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.8, Page:441 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\n", + "considering index of compression and expansion as 1.4\n", + "during ramming action,process 0-1,\n", + "T1/To=(p1/po)^((y-1)/y)\n", + "T1=To*(p1/po)^((y-1)/y)in K\n", + "during compression process 1-2_a\n", + "T2_a/T1=(p2/p1)^((y-1)/y)\n", + "T2_a=T1*(p2/p1)^((y-1)/y)in K\n", + "n1=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+(T2_a-T1)/n1 in K\n", + "In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\n", + "subsequently for 10 degree celcius temperature drop in evaporator,\n", + "T4=T3-10 in K\n", + "expansion in cooling turbine during process 4-5;\n", + "T5_a/T4=(p5/p4)^((y-1)/y)\n", + "T5_a=T4*(p5/p4)^((y-1)/y)in K\n", + "n2=(T4-T5)/(T4-T5_a)\n", + "T5=T4-(T4-T5_a)*n2 in K\n", + "let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\n", + "Q=m*Cp*(T6-T5)\n", + "so m=Q/(Cp*(T6-T5))in kg/s\n", + "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s 41.4\n", + "W in Hp\n", + "COP=refrigeration effect/work input=Q/W= 1.27\n", + "so COP=1.27\n", + "and HP required=55.48 hp\n" + ] + } + ], + "source": [ + "#cal of COP and HP required\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.8, Page:441 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\")\n", + "po=0.9*10**5;#atmospheric air pressure in pa\n", + "To=(3.+273.);#temperature of atmospheric air in K\n", + "p1=1.*10**5;#pressure due to ramming air in pa\n", + "p2=4.*10**5;#pressure when air leaves compressor in pa\n", + "p3=p2;\n", + "p4=p3;\n", + "p5=1.03*10**5;#pressure maintained in passenger cabin in pa\n", + "T6=(25.+273.);#temperature of air leaves cabin in K\n", + "Q=15.*3.5;#refrigeration capacity of aeroplane in KJ/s\n", + "n1=0.9;#isentropic efficiency of compressor\n", + "n2=0.8;#isentropic efficiency of turbine\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"considering index of compression and expansion as 1.4\")\n", + "y=1.4;\n", + "print(\"during ramming action,process 0-1,\")\n", + "print(\"T1/To=(p1/po)^((y-1)/y)\")\n", + "print(\"T1=To*(p1/po)^((y-1)/y)in K\")\n", + "T1=To*(p1/po)**((y-1)/y)\n", + "print(\"during compression process 1-2_a\")\n", + "print(\"T2_a/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"n1=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n", + "T2=T1+(T2_a-T1)/n1\n", + "print(\"In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\")\n", + "T3=0.34*T2\n", + "print(\"subsequently for 10 degree celcius temperature drop in evaporator,\")\n", + "print(\"T4=T3-10 in K\")\n", + "T4=T3-10\n", + "print(\"expansion in cooling turbine during process 4-5;\")\n", + "print(\"T5_a/T4=(p5/p4)^((y-1)/y)\")\n", + "print(\"T5_a=T4*(p5/p4)^((y-1)/y)in K\")\n", + "T5_a=T4*(p5/p4)**((y-1)/y)\n", + "print(\"n2=(T4-T5)/(T4-T5_a)\")\n", + "print(\"T5=T4-(T4-T5_a)*n2 in K\")\n", + "T5=T4-(T4-T5_a)*n2\n", + "print(\"let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\")\n", + "print(\"Q=m*Cp*(T6-T5)\")\n", + "print(\"so m=Q/(Cp*(T6-T5))in kg/s\")\n", + "m=Q/(Cp*(T6-T5))\n", + "W=m*Cp*(T2-T1)\n", + "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\"),round(W,2)\n", + "print(\"W in Hp\")\n", + "W=W/.7457\n", + "W=41.37;#work input to compressor in KJ/s\n", + "COP=Q/W\n", + "print(\"COP=refrigeration effect/work input=Q/W=\"),round(COP,2)\n", + "print(\"so COP=1.27\")\n", + "print(\"and HP required=55.48 hp\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.9;pg no: 443" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.9, Page:443 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\n", + "properties of NH3,\n", + "at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\n", + "and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\n", + "here work done,W=Area 1-2-3-9-1\n", + "refrigeration effect=Area 1-5-6-4-1\n", + "Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\n", + "so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\n", + "during throttling process between 3 and 4,h3=h4\n", + "(Area=3-11-7-3)=(Area 4-9-11-6-4)\n", + "(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\n", + "(Area 3-8-9)=(Area 4-6-7-8-4)\n", + "so (Area 4-6-7-8-4)=12.09 KJ/kg\n", + "also,(Area 4-6-7-8-4)=T1*(s4-s8)\n", + "so (s4-s8)in KJ/kg K=\n", + "also s3=s8=0.3386 KJ/kg K\n", + "so s4 in KJ/kg K=\n", + "also s1=s2=4.4809 KJ/kg K\n", + "refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\n", + "work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\n", + "so COP=refrigeration effect/work done= 5.94\n", + "so COP=5.94\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.9, Page:443 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\")\n", + "print(\"properties of NH3,\")\n", + "print(\"at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\")\n", + "T1=(-15+273);\n", + "h9=-54.51;\n", + "hg=1303.74;\n", + "s9=-0.2132;\n", + "sg=5.0536;\n", + "print(\"and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\")\n", + "T2=(25+273);\n", + "h3=99.94;\n", + "h2=1317.95;\n", + "s3=0.3386;\n", + "s2=4.4809;\n", + "print(\"here work done,W=Area 1-2-3-9-1\")\n", + "print(\"refrigeration effect=Area 1-5-6-4-1\")\n", + "print(\"Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\")\n", + "print(\"so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\")\n", + "h3-h9-T1*(s3-s9)\n", + "print(\"during throttling process between 3 and 4,h3=h4\")\n", + "print(\"(Area=3-11-7-3)=(Area 4-9-11-6-4)\")\n", + "print(\"(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\")\n", + "print(\"(Area 3-8-9)=(Area 4-6-7-8-4)\")\n", + "print(\"so (Area 4-6-7-8-4)=12.09 KJ/kg\")\n", + "print(\"also,(Area 4-6-7-8-4)=T1*(s4-s8)\")\n", + "print(\"so (s4-s8)in KJ/kg K=\")\n", + "12.09/T1\n", + "print(\"also s3=s8=0.3386 KJ/kg K\")\n", + "s8=s3;\n", + "print(\"so s4 in KJ/kg K=\")\n", + "s4=s8+12.09/T1\n", + "print(\"also s1=s2=4.4809 KJ/kg K\")\n", + "s1=s2;\n", + "print(\"refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\")\n", + "Q=T1*(s1-s4)\n", + "print(\"work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\")\n", + "W=12.09+((T2-T1)*(s1-s8))\n", + "COP=Q/W\n", + "print(\"so COP=refrigeration effect/work done=\"),round(COP,2)\n", + "print(\"so COP=5.94\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.10;pg no: 445" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.10, Page:445 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\n", + "properties of Freon-12,\n", + "at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\n", + "at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\n", + "during expansion(throttling)between 3 and 4\n", + "h3=h4=hf_40oc=74.53 KJ/kg=h4\n", + "process 1-2 is adiabatic compression so,\n", + "s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\n", + "at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\n", + "T2=313*exp((s1-sg)/Cpg)in K\n", + "so temperature after compression,T2=324.17 K\n", + "enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\n", + "compression work required,per kg(Wc)=h2-h1 in KJ/kg\n", + "refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\n", + "mass flow rate of refrigerant,m=Q/q in kg/s\n", + "COP=q/Wc 3.17452\n", + "volumetric efficiency of reciprocating compressor,given C=0.02\n", + "n_vol=1+C-C*(P2/P1)^(1/n)\n", + "let piston printlacement by V,m^3\n", + "mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\n", + "so V in cm^3= 569.43\n", + "so COP=3.175\n", + "and piston printlacement=569.45 cm^3\n" + ] + } + ], + "source": [ + "#cal of COP and piston printlacement\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.10, Page:445 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\")\n", + "Q=2.86*3.5;#refrigeration effect in KJ/s\n", + "N=1200;#compressor rpm\n", + "n=1.13;#compression index\n", + "print(\"properties of Freon-12,\")\n", + "print(\"at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\")\n", + "P1=1.51;\n", + "T1=(-20+273);\n", + "vg=0.1088;\n", + "h1=178.61;\n", + "s1=0.7082;\n", + "s2=s1;\n", + "print(\"at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\")\n", + "P2=9.61;\n", + "h3=74.53;\n", + "h4=h3;\n", + "hg=203.05;\n", + "sf=0.2716;\n", + "sg=0.682;\n", + "Cpf=0.976;\n", + "Cpg=0.747;\n", + "print(\"during expansion(throttling)between 3 and 4\")\n", + "print(\"h3=h4=hf_40oc=74.53 KJ/kg=h4\")\n", + "print(\"process 1-2 is adiabatic compression so,\")\n", + "print(\"s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\")\n", + "print(\"at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\")\n", + "print(\"T2=313*exp((s1-sg)/Cpg)in K\")\n", + "T2=313*math.exp((s1-sg)/Cpg)\n", + "print(\"so temperature after compression,T2=324.17 K\")\n", + "print(\"enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\")\n", + "h2=hg+Cpg*(T2-313)\n", + "print(\"compression work required,per kg(Wc)=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "print(\"refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\")\n", + "q=h1-h4\n", + "print(\"mass flow rate of refrigerant,m=Q/q in kg/s\")\n", + "m=Q/q\n", + "m=0.096;#approx.\n", + "COP=q/Wc\n", + "print(\"COP=q/Wc\"),round(COP,5)\n", + "print(\"volumetric efficiency of reciprocating compressor,given C=0.02\")\n", + "C=0.02;\n", + "print(\"n_vol=1+C-C*(P2/P1)^(1/n)\")\n", + "n_vol=1+C-C*(P2/P1)**(1/n)\n", + "print(\"let piston printlacement by V,m^3\")\n", + "print(\"mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\")\n", + "V=(m*60*vg)*10**6/(N*n_vol)\n", + "print(\"so V in cm^3=\"),round(V,2)\n", + "print(\"so COP=3.175\")\n", + "print(\"and piston printlacement=569.45 cm^3\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.11;pg no: 447" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.11, Page:447 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\n", + "properties of CO2,\n", + "at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\n", + "at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\n", + "processes of vapour compression cycle are shown on T-s diagram\n", + "1-2:isentropic compression process\n", + "2-3-4:condensation process\n", + "4-5:isenthalpic expansion process\n", + "5-1:refrigeration process in evaporator\n", + "h1=hg at -10oc=322.28 KJ/kg\n", + "at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\n", + "entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\n", + "entropy during isentropic process,s1=s2\n", + "at -10 degree celcius,s2=sf+x1*sfg\n", + "so x1=(s2-sf)/(sg-sf)\n", + "enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\n", + "h3=hf at 20oc=144.11 KJ/kg\n", + "since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\n", + "also,h4=h5=115.22 KJ/kg\n", + "refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\n", + "let refrigerant flow rate be m kg/s\n", + "refrigerant effect(Q)=m*q\n", + "m=Q/q in kg/s 0.01016\n", + "compressor work,Wc=h2-h1 in KJ/kg\n", + "COP=refrigeration effect per kg/compressor work per kg= 6.51\n", + "so COP=6.51,mass flow rate=0.01016 kg/s\n", + "NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \n" + ] + } + ], + "source": [ + "#cal of COP and mass flow rate\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.11, Page:447 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\")\n", + "Q=2;#refrigeration effect in KW\n", + "print(\"properties of CO2,\")\n", + "print(\"at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\")\n", + "T1=(20.+273.);#condensation temperature in K\n", + "P1=57.27;\n", + "h3=144.11;\n", + "hg=299.62;\n", + "sf=0.523;\n", + "sg_20oc=1.0527;\n", + "Cpf=2.889;\n", + "Cpg=2.135;\n", + "print(\"at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\")\n", + "T2=(-10+273);#evaporator temperature in K\n", + "P2=26.49;\n", + "vg=0.014;\n", + "hf=60.78;\n", + "h1=322.28;\n", + "sf=0.2381;\n", + "sg=1.2324;\n", + "print(\"processes of vapour compression cycle are shown on T-s diagram\")\n", + "print(\"1-2:isentropic compression process\")\n", + "print(\"2-3-4:condensation process\")\n", + "print(\"4-5:isenthalpic expansion process\")\n", + "print(\"5-1:refrigeration process in evaporator\")\n", + "print(\"h1=hg at -10oc=322.28 KJ/kg\")\n", + "print(\"at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\")\n", + "h2=hg+Cpg*(40.-20.)\n", + "print(\"entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\")\n", + "s2=sg_20oc+Cpg*math.log((273.+40.)/(273.+20.))\n", + "print(\"entropy during isentropic process,s1=s2\")\n", + "print(\"at -10 degree celcius,s2=sf+x1*sfg\")\n", + "print(\"so x1=(s2-sf)/(sg-sf)\")\n", + "x1=(s2-sf)/(sg-sf)\n", + "print(\"enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\")\n", + "h1=hf+x1*(h1-hf)\n", + "print(\"h3=hf at 20oc=144.11 KJ/kg\")\n", + "print(\"since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\")\n", + "h4=h3-Cpf*(20.-10.)\n", + "print(\"also,h4=h5=115.22 KJ/kg\")\n", + "h5=h4;\n", + "print(\"refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\")\n", + "q=(h1-h5)\n", + "print(\"let refrigerant flow rate be m kg/s\")\n", + "print(\"refrigerant effect(Q)=m*q\")\n", + "m=Q/q\n", + "print(\"m=Q/q in kg/s\"),round(m,5)\n", + "print(\"compressor work,Wc=h2-h1 in KJ/kg\")\n", + "Wc=h2-h1\n", + "COP=q/Wc\n", + "print(\"COP=refrigeration effect per kg/compressor work per kg=\"),round(COP,2)\n", + "print(\"so COP=6.51,mass flow rate=0.01016 kg/s\")\n", + "print(\"NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.12;pg no: 448" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.12, Page:448 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\n", + "here pressure of atmospheric air(P)may be taken as 1.013 bar\n", + "specific humidity,omega=0.622*(Pv/(P-Pv))\n", + "so partial pressure of vapour(Pv)in bar\n", + "Pv in bar= 0.0254\n", + "relative humidity(phi)=(Pv/Pv_sat)\n", + "from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\n", + "so phi=Pv/Pv_sat 0.82\n", + "in percentage 81.99\n", + "so partial pressure of vapour=0.0254 bar\n", + "relative humidity=81.98 %\n" + ] + } + ], + "source": [ + "#cal of partial pressure of vapour and relative humidity\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.12, Page:448 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\")\n", + "omega=0.016;#specific humidity in gm/gm of air\n", + "print(\"here pressure of atmospheric air(P)may be taken as 1.013 bar\")\n", + "P=1.013;#pressure of atmospheric air in bar\n", + "print(\"specific humidity,omega=0.622*(Pv/(P-Pv))\")\n", + "print(\"so partial pressure of vapour(Pv)in bar\")\n", + "Pv=P/(1+(0.622/omega))\n", + "print(\"Pv in bar=\"),round(Pv,4)\n", + "Pv=0.0254;#approx.\n", + "print(\"relative humidity(phi)=(Pv/Pv_sat)\")\n", + "print(\"from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\")\n", + "Pv_sat=0.03098;\n", + "phi=Pv/Pv_sat\n", + "print(\"so phi=Pv/Pv_sat\"),round(phi,2)\n", + "print(\"in percentage\"),round(phi*100,2)\n", + "print(\"so partial pressure of vapour=0.0254 bar\")\n", + "print(\"relative humidity=81.98 %\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.13;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.13, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\n", + "at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\n", + "partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar 0.03\n", + "partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour 0.99\n", + "so partial pressure of air=0.9875 bar\n", + "humidity ratio,omega in kg/kg of dry air= 0.01606\n", + "so humidity ratio=0.01606 kg/kg of air\n", + "Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\n", + "so Dew point temperature=21.4 degree celcius\n", + "density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\n", + "rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\n", + "rho_m in kg/m^3= 1.1836\n", + "so density = 1.1835 kg/m^3\n", + "enthalpy of mixture,h in KJ/kg of dry air= 71.21\n", + "enthalpy of mixture =71.2 KJ/kg of dry air\n" + ] + } + ], + "source": [ + "#cal of partial pressure,humidity ratio,Dew point temperature,density and enthalpy of mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.13, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\")\n", + "r=0.6;#relative humidity\n", + "P=1.013;#total pressure of mixture in bar\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Ta=(30+273);#room temperature in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg degree celcius\n", + "print(\"at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\")\n", + "Pv_sat=0.0425;\n", + "Pv=r*Pv_sat\n", + "print(\"partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar\"),round(Pv,2)\n", + "Pa=P-Pv\n", + "print(\"partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour\"),round(Pa,2)\n", + "print(\"so partial pressure of air=0.9875 bar\")\n", + "omega=0.622*Pv/(P-Pv)\n", + "print(\"humidity ratio,omega in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"so humidity ratio=0.01606 kg/kg of air\")\n", + "print(\"Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\")\n", + "print(\"so Dew point temperature=21.4 degree celcius\")\n", + "print(\"density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\")\n", + "print(\"rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\")\n", + "rho_m=P*100*(1+omega)/(R*Ta)\n", + "print(\"rho_m in kg/m^3=\"),round(rho_m,4)\n", + "print(\"so density = 1.1835 kg/m^3\")\n", + "T=30;#room temperature in degree celcius\n", + "hg=2540.1;#enthalpy at 30 degree celcius in KJ/kg\n", + "h=Cp*T+omega*(hg+1.860*(30-21.4))\n", + "print(\"enthalpy of mixture,h in KJ/kg of dry air=\"),round(h,2)\n", + "print(\"enthalpy of mixture =71.2 KJ/kg of dry air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.14;pg no: 449" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.14, Page:449 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\n", + "initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\n", + "omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\n", + "mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\n", + "mass flow rate of air(ma)=0.8/v2 in kg/s\n", + "total mass of water added=ma*(omega2-omega1)in kg/s 0.001311\n", + "heat transferred in KJ/s= 12.18\n", + "so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\n" + ] + } + ], + "source": [ + "#cal of mass of water added and heat transferred\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.14, Page:449 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\")\n", + "print(\"initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\")\n", + "print(\"omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\")\n", + "omega1=0.0086;\n", + "h1=37.;\n", + "omega2=0.01;\n", + "h2=50.;\n", + "v2=0.854;\n", + "print(\"mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\")\n", + "omega2-omega1\n", + "print(\"mass flow rate of air(ma)=0.8/v2 in kg/s\")\n", + "ma=0.8/v2\n", + "print(\"total mass of water added=ma*(omega2-omega1)in kg/s\"),round(ma*(omega2-omega1),6)\n", + "print(\"heat transferred in KJ/s=\"),round(ma*(h2-h1),2)\n", + "print(\"so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.15;pg no: 451" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.15, Page:451 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\n", + "Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\n", + "For moist air stream at 30 degree celcius and 30% relative humidity.\n", + "phi1=Pv1/Pv_sat_30oc\n", + "here Pv_sat_30oc=0.04246 bar\n", + "so Pv1=phi1*Pv_sat_30oc in bar\n", + "corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\n", + "specific humidity,omega1 in kg/kg of air= 0.00792\n", + "at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\n", + "h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\n", + "for second moist air stream at 35oc and 85% relative humidity\n", + "phi2=Pv2/Pv_sat_35oc\n", + "here Pv_sat_35oc=0.005628 bar\n", + "so Pv2=phi2*Pv_sat_35oc in bar\n", + "specific humidity,omega2 in kg/kg of air= 0.00295\n", + "corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\n", + "so,enthalpy of second stream,\n", + "h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\n", + "enthalpy of mixture after adiabatic mixing,\n", + "=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\n", + "mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\n", + "specific humidity of mixture(omega)in kg/kg of dry air= 0.00592\n", + "omega=0.622*Pv/(P-Pv)\n", + "Pv in bar= 0.00956\n", + "partial pressure of water vapour=0.00957 bar\n", + "so specific humidity of mixture=0.00593 kg/kg dry air\n", + "and partial pressure of water vapour in mixture=0.00957 bar\n" + ] + } + ], + "source": [ + "#cal of specific humidity and partial pressure of water vapour in mixture\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.15, Page:451 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\")\n", + "P=1.013;#atmospheric pressure in bar\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "Cp_stream=1.86;#specific heat of stream at constant pressure in KJ/kg K\n", + "T1=30.;#temperature of first stream of moist air in K\n", + "m1=3.;#mass flow rate of first stream in kg/s \n", + "T2=35.;#temperature of second stream of moist air in K\n", + "m2=2.;#mass flow rate of second stream in kg/s \n", + "print(\"Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\")\n", + "print(\"For moist air stream at 30 degree celcius and 30% relative humidity.\")\n", + "phi1=0.3;\n", + "print(\"phi1=Pv1/Pv_sat_30oc\")\n", + "print(\"here Pv_sat_30oc=0.04246 bar\")\n", + "Pv_sat_30oc=0.04246;\n", + "print(\"so Pv1=phi1*Pv_sat_30oc in bar\")\n", + "Pv1=phi1*Pv_sat_30oc\n", + "print(\"corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\")\n", + "Tdp1=10.5;\n", + "omega1=0.622*Pv1/(P-Pv1)\n", + "print(\"specific humidity,omega1 in kg/kg of air=\"),round(omega1,5)\n", + "print(\"at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\")\n", + "hg=2520.7;#enthalpy at 10.5 degree celcius in KJ/kg\n", + "print(\"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\")\n", + "h1=Cp_air*T1+omega1*(hg-Cp_stream*(T1-Tdp1))\n", + "print(\"for second moist air stream at 35oc and 85% relative humidity\")\n", + "phi2=0.85;\n", + "print(\"phi2=Pv2/Pv_sat_35oc\")\n", + "print(\"here Pv_sat_35oc=0.005628 bar\")\n", + "Pv_sat_35oc=0.005628;\n", + "print(\"so Pv2=phi2*Pv_sat_35oc in bar\")\n", + "Pv2=phi2*Pv_sat_35oc\n", + "omega2=0.622*Pv2/(P-Pv2)\n", + "print(\"specific humidity,omega2 in kg/kg of air=\"),round(omega2,5)\n", + "print(\"corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\")\n", + "Tdp2=32.;\n", + "print(\"so,enthalpy of second stream,\")\n", + "print(\"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\")\n", + "hg=2559.9;#enthalpy at 32 degree celcius in KJ/kg\n", + "h2=Cp_air*T2+omega2*(hg+Cp_stream*(T2-Tdp2))\n", + "print(\"enthalpy of mixture after adiabatic mixing,\")\n", + "print(\"=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\")\n", + "(1./(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n", + "print(\"mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\")\n", + "(1./5.)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n", + "omega=0.00589/(1-0.005893)\n", + "print(\"specific humidity of mixture(omega)in kg/kg of dry air=\"),round(omega,5)\n", + "print(\"omega=0.622*Pv/(P-Pv)\")\n", + "Pv=omega*P/(omega+0.622)\n", + "print(\"Pv in bar=\"),round(Pv,5)\n", + "print(\"partial pressure of water vapour=0.00957 bar\")\n", + "print(\"so specific humidity of mixture=0.00593 kg/kg dry air\")\n", + "print(\"and partial pressure of water vapour in mixture=0.00957 bar\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 11.16;pg no: 452" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 11.16, Page:452 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\n", + "The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\n", + "h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\n", + "final state 2 has,h2=52 KJ/kg\n", + "mass of air(m)=m1/v1 in kg/s\n", + "amount of heat added(Q)in KJ/s\n", + "Q=m*(h2-h1) 56.78\n" + ] + } + ], + "source": [ + "#cal of amount of heat added\n", + "#intiation of all variables\n", + "# Chapter 11\n", + "import math\n", + "print\"Example 11.16, Page:452 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\")\n", + "m1=3;#rate at which moist air enter in heating coil in m^3/s\n", + "print(\"The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\")\n", + "print(\"h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\")\n", + "h1=36.4;\n", + "omega1=0.0086;\n", + "v1=0.825;\n", + "print(\"final state 2 has,h2=52 KJ/kg\")\n", + "h2=52;\n", + "print(\"mass of air(m)=m1/v1 in kg/s\")\n", + "m=m1/v1\n", + "m=3.64;#approx.\n", + "print(\"amount of heat added(Q)in KJ/s\")\n", + "Q=m*(h2-h1)\n", + "print(\"Q=m*(h2-h1)\"),round(Q,2)" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter12.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12.ipynb new file mode 100755 index 00000000..f89e1b1a --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12.ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12:Introduction to Heat Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.1;pg no: 483" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.1, Page:483 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\n", + "here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\n", + "overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\n", + "(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\n", + "so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "rate of heat transfer,Q in W= 10590.0\n", + "so rate of heat transfer=10590 W\n", + "heat transfer across states 1 and 3(at interface).\n", + "overall heat transfer coefficient between 1 and 3\n", + "(1/U1)=(1/h1)+(deltax_brick/k_brick)\n", + "so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\n", + "Q=U1*A*(T1-T3)\n", + "so T3=T1-(Q/(U1*A))in degree celcius 44.7\n", + "so temperature at interface of brick and wood =44.71 degree celcius\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer and temperature at interface of brick and wood\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.1, Page:483 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\")\n", + "h1=30.;#heat transfer coefficient on side of 50 oc in W/m^2 K\n", + "h5=10.;#heat transfer coefficient on side of 20 oc in W/m^2 K\n", + "k_brick=0.9;#conductivity of brick in W/m K\n", + "k_wood=0.15;#conductivity of wood in W/m K\n", + "T1=50.;#temperature of air on one side of wall in degree celcius\n", + "T5=20.;#temperature of air on other side of wall in degree celcius\n", + "A=100.;#surface area in m^2\n", + "deltax_brick=1.5*10**-2;#length of brick in m\n", + "deltax_wood=2*10**-2;#length of wood in m\n", + "print(\"here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\")\n", + "print(\"overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\")\n", + "print(\"(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\")\n", + "print(\"so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\")\n", + "U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "U=3.53;#approx.\n", + "Q=U*A*(T1-T5)\n", + "print(\"rate of heat transfer,Q in W=\"),round(Q,2)\n", + "print(\"so rate of heat transfer=10590 W\")\n", + "print(\"heat transfer across states 1 and 3(at interface).\")\n", + "print(\"overall heat transfer coefficient between 1 and 3\")\n", + "print(\"(1/U1)=(1/h1)+(deltax_brick/k_brick)\")\n", + "print(\"so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\")\n", + "U1=1/((1/h1)+(deltax_brick/k_brick))\n", + "print(\"Q=U1*A*(T1-T3)\")\n", + "T3=T1-(Q/(U1*A))\n", + "print(\"so T3=T1-(Q/(U1*A))in degree celcius\"),round(T3,2)\n", + "print(\"so temperature at interface of brick and wood =44.71 degree celcius\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.2;pg no: 484" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.2, Page:484 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\n", + "here thermal resistances are\n", + "R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\n", + "R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\n", + "R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\n", + "R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\n", + "R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\n", + "overall heat transfer coefficient for one dimentional steady state heat transfer\n", + "(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\n", + "so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\n", + "rate of heat transfer(Q) in KJ/m^2 hr= 112.0\n", + "wall surface area(A) in m^2\n", + "so rate of heat transfer=112 KJ/m^2 hr \n", + "Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\n", + "Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\n", + "substituting,T2 in degree celcius= 23.6\n", + "so temperature of outer wall,T2=23.6 oc\n", + "T3 in degree= 23.6\n", + "so temperature at interface of outer steel wall and wool,T3=23.59 oc\n", + "T4 in degree celcius= 6.1\n", + "so temperature at interface of wool and inside steel wall,T4=6.09 oc\n", + "T5 in degree celcius= 6.1\n", + "so temperature at inside of inner steel wall,T5=6.08 oc\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer,temperatures\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.2, Page:484 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\")\n", + "h1=40;#average heat transfer coefficient at inner surface in KJ/m^2 hr oc\n", + "h6=50;#average heat transfer coefficient at outer surface in KJ/m^2 hr oc\n", + "deltax_steel=2*10**-3;#mild steel sheets thickness in m\n", + "deltax_wool=5*10**-2;#thickness of glass wool insulation in m\n", + "k_wool=0.16;#thermal conductivity of wool in KJ/m hr\n", + "k_steel=160;#thermal conductivity of steel in KJ/m hr\n", + "T1=25;#kitchen temperature in degree celcius\n", + "T6=5;#refrigerator temperature in degree celcius\n", + "print(\"here thermal resistances are\")\n", + "print(\"R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\")\n", + "print(\"R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\")\n", + "print(\"R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\")\n", + "print(\"R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\")\n", + "print(\"R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\")\n", + "print(\"overall heat transfer coefficient for one dimentional steady state heat transfer\")\n", + "print(\"(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\")\n", + "print(\"so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\")\n", + "U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))\n", + "U=2.8;#approx.\n", + "A=4*(1*0.5)\n", + "Q=U*A*(T1-T6)\n", + "print(\"rate of heat transfer(Q) in KJ/m^2 hr=\"),round(Q,2)\n", + "print(\"wall surface area(A) in m^2\")\n", + "print(\"so rate of heat transfer=112 KJ/m^2 hr \")\n", + "print(\"Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\")\n", + "print(\"Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\")\n", + "T2=T1-(Q/(A*h1))\n", + "print(\"substituting,T2 in degree celcius=\"),round(T2,1)\n", + "print(\"so temperature of outer wall,T2=23.6 oc\")\n", + "T3=T2-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T3 in degree= \"),round(T3,2)\n", + "print(\"so temperature at interface of outer steel wall and wool,T3=23.59 oc\")\n", + "T4=T3-(Q*deltax_wool/(k_wool*A))\n", + "print(\"T4 in degree celcius=\"),round(T4,2)\n", + "print(\"so temperature at interface of wool and inside steel wall,T4=6.09 oc\")\n", + "T5=T4-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T5 in degree celcius=\"),round(T5,2)\n", + "print(\"so temperature at inside of inner steel wall,T5=6.08 oc\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.3;pg no: 486" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.3, Page:486 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\n", + "here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\n", + "Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\n", + "so heat loss per meter from pipe in KJ/hr= 1479.77\n", + "heat loss from 5 m length(Q) in KJ/hr 7396.7\n", + "enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\n", + "mass flow of steam(m)in kg/hr\n", + "final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\n", + "let quality of steam at exit be x,\n", + "also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\n", + "h=hf+x*hfg\n", + "so x=(h-hf)/hfg 0.8245\n", + "so quality of steam at exit=0.8245\n" + ] + } + ], + "source": [ + "#cal of heat loss per meter from pipe and quality of steam\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.3, Page:486 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\")\n", + "k_insulation=0.3;#thermal conductivity of insulation in KJ/m hr oc\n", + "k_pipe=209;#thermal conductivity of pipe in KJ/m hr oc\n", + "T1=300;#temperature of inner surface of steam pipe in degree celcius\n", + "T3=50;#temperature of outer surface of insulation layer in degree celcius\n", + "r1=15*10**-2/2;#steam pipe inner radius without insulation in m\n", + "r2=16*10**-2/2;#steam pipe outer radius without insulation in m\n", + "r3=22*10**-2/2;#radius with insulation in m\n", + "m=0.5;#steam entering rate in kg/min\n", + "print(\"here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\")\n", + "print(\"Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\")\n", + "L=1;\n", + "Q=(T1-T3)*2*math.pi*L/((1/k_pipe)*math.log(r2/r1)+(1/k_insulation*math.log(r3/r2)))\n", + "print(\"so heat loss per meter from pipe in KJ/hr=\"),round(Q,2)\n", + "Q=5*Q\n", + "print(\"heat loss from 5 m length(Q) in KJ/hr\"),round(5*1479.34,2)\n", + "print(\"enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\")\n", + "hg=2749;\n", + "print(\"mass flow of steam(m)in kg/hr\")\n", + "m=m*60\n", + "print(\"final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\")\n", + "h=hg-(Q/m)\n", + "print(\"let quality of steam at exit be x,\")\n", + "print(\"also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\")\n", + "hf=1344;\n", + "hfg=1404.9;\n", + "print(\"h=hf+x*hfg\")\n", + "x=(h-hf)/hfg\n", + "print(\"so x=(h-hf)/hfg\"),round(x,4)\n", + "print(\"so quality of steam at exit=0.8245\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.4;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.4, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\n", + "considering one dimensional heat transfer of steady state type\n", + "for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr 168892.02\n", + "so heat transfer rate=168892.02 KJ/hr\n", + "heat flux in KJ/m^2 hr= 23893.33\n", + "so heat flux=23893.33 KJ/m^2 hr\n" + ] + } + ], + "source": [ + "#cal of amount of heat transfer and heat flux\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.4, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\")\n", + "r1=150.*10**-2/2;#inner radius in m\n", + "r2=200.*10**-2/2;#outer radius in m\n", + "k=28.;#thermal conductivity in KJ m hr oc\n", + "T1=200.;#inside surface temperature in degree celcius\n", + "T2=40.;#outer surface temperature in degree celcius\n", + "print(\"considering one dimensional heat transfer of steady state type\")\n", + "Q=(T1-T2)*4*math.pi*k*r1*r2/(r2-r1)\n", + "print(\"for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr\"),round(Q,2)\n", + "print(\"so heat transfer rate=168892.02 KJ/hr\")\n", + "Q/(4*math.pi*r1**2)\n", + "print(\"heat flux in KJ/m^2 hr=\"),round(Q/(4*math.pi*r1**2),2)\n", + "print(\"so heat flux=23893.33 KJ/m^2 hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.5;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.5, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\n", + "R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\n", + "R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\n", + "R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\n", + "total thermal resistance,R_total=R1+R2+R3 in oc/W\n", + "so rate of heat transfer,Q=(T1-T4)/R_total in W 118.03\n", + "heat transfer rate from inside of room to inside surface of glass window.\n", + "Q=(T1-T2)/R1\n", + "so T2=T1-Q*R1 in degree celcius 9.26\n", + "Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.5, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\")\n", + "T1=25.;#room temperature in degree celcius\n", + "T4=2.;#winter outside temperature in degree celcius\n", + "h1=10.;#heat transfer coefficient on inner window surfaces in W/m^2 oc\n", + "h4=30.;#heat transfer coefficient on outer window surfaces in W/m^2 oc\n", + "k=0.78;#thermal conductivity of glass in W/m^2 oc\n", + "A=75.*10**-2*100.*10**-2;#area in m^2\n", + "deltax=10.*10**-3;#glass thickness in m\n", + "print(\"R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\")\n", + "print(\"R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\")\n", + "print(\"R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\")\n", + "print(\"total thermal resistance,R_total=R1+R2+R3 in oc/W\")\n", + "R_total=1/(h1*A)+deltax/(k*A)+1/(h4*A)\n", + "Q=(T1-T4)/R_total\n", + "print(\"so rate of heat transfer,Q=(T1-T4)/R_total in W\"),round(Q,2)\n", + "print(\"heat transfer rate from inside of room to inside surface of glass window.\")\n", + "R1=(1/7.5);\n", + "T2=T1-Q*R1\n", + "print(\"Q=(T1-T2)/R1\")\n", + "print(\"so T2=T1-Q*R1 in degree celcius\"),round(T2,2)\n", + "print(\"Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\") \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.6;pg no: 488" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.6, Page:488 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\n", + "reynolds number,Re=V*D/v\n", + "subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\n", + "or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\n", + "so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\n", + "rate of heat transfer due to convection,Q in W \n", + "Q=h*A*(T2-T1)= 61259.36\n", + "so heat transfer rate=61259.38 W\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.6, Page:488 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\")\n", + "D=4*10**-2;#inner diameter in m\n", + "L=3;#length in m\n", + "V=1;#velocity of water in m/s\n", + "T1=40;#mean temperature in degree celcius\n", + "T2=75;#pipe wall temperature in degree celcius \n", + "k=0.6;#conductivity of water in W/m\n", + "Pr=3;#prandtl no.\n", + "v=0.478*10**-6;#viscocity in m^2/s\n", + "print(\"reynolds number,Re=V*D/v\")\n", + "Re=V*D/v\n", + "print(\"subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\")\n", + "h=(k/D)*0.023*(Re)**0.8*(Pr)**0.4 \n", + "print(\"rate of heat transfer due to convection,Q in W \") \n", + "Q=h*(math.pi*D*L)*(T2-T1)\n", + "print(\"Q=h*A*(T2-T1)=\"),round(Q,2)\n", + "print(\"so heat transfer rate=61259.38 W\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.7;pg no: 489" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.7, Page:489 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\n", + "Let the temperature of water at exit be T\n", + "Heat exchanger,Q=heat rejected by glasses=heat gained by water\n", + "Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\n", + "so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\n", + "and Q in KJ\n", + "deltaT_in=T1-T3 in degree celcius\n", + "deltaT_out=T2-T in degree celcius\n", + "for parallel flow heat exchanger,\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\n", + "also,Q=U*A*LMTD\n", + "so A=Q/(U*LMTD) in m^2 5.937\n", + "surface area,A=5.936 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.7, Page:489 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\")\n", + "m=0.5;#hot gases flowing rate in kg/s\n", + "T1=500;#initial temperature of gas in degree celcius\n", + "T2=150;#final temperature of gas in degree celcius\n", + "Cg=1.2;#specific heat of gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "U=150;#overall heat transfer coefficient in W/m^2 K\n", + "mw=1;#mass of water in kg/s\n", + "T3=10;#water entering temperature in degree celcius\n", + "print(\"Let the temperature of water at exit be T\")\n", + "print(\"Heat exchanger,Q=heat rejected by glasses=heat gained by water\")\n", + "print(\"Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\")\n", + "print(\"so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\")\n", + "T=T3+(m*Cg*(T1-T2)/(mw*Cw))\n", + "print(\"and Q in KJ\")\n", + "Q=m*Cg*(T1-T2)\n", + "print(\"deltaT_in=T1-T3 in degree celcius\")\n", + "deltaT_in=T1-T3\n", + "print(\"deltaT_out=T2-T in degree celcius\")\n", + "deltaT_out=T2-T\n", + "print(\"for parallel flow heat exchanger,\")\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"also,Q=U*A*LMTD\")\n", + "A=Q*10**3/(U*LMTD)\n", + "print(\"so A=Q/(U*LMTD) in m^2\"),round(A,3)\n", + "print(\"surface area,A=5.936 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.8;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.8, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\n", + "This oil cooler has arrangement similar to a counter flow heat exchanger.\n", + "by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\n", + "so Q in KJ/min\n", + "and T=Th_out+(Q/(mh*Cph))in degree celcius\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \n", + "here deltaT_in=Tc_out-T in degree celcius\n", + "deltaT_out=Th_in-Th_out in degree celcius\n", + "so LMTD in degree celcius\n", + "substituting in,Q=U*A*LMTD\n", + "A=(Q*10^3/60)/(U*LMTD)in m^2 132.81\n", + "so surface area=132.85 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.8, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\")\n", + "mc=20;#mass of oil in kg/min \n", + "Tc_out=100;#initial temperature of oil in degree celcius\n", + "Th_in=30;#final temperature of oil in degree celcius\n", + "Th_out=25;#temperature of water in degree celcius\n", + "Cpc=2;#specific heat of oil in KJ/kg K\n", + "Cph=4.18;#specific heat of water in KJ/kg K\n", + "mh=15;#water flow rate in kg/min\n", + "U=25;#overall heat transfer coefficient in W/m^2 K\n", + "print(\"This oil cooler has arrangement similar to a counter flow heat exchanger.\")\n", + "print(\"by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\")\n", + "print(\"so Q in KJ/min\")\n", + "Q=mc*Cpc*(Tc_out-Th_in)\n", + "print(\"and T=Th_out+(Q/(mh*Cph))in degree celcius\")\n", + "T=Th_out+(Q/(mh*Cph))\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \")\n", + "print(\"here deltaT_in=Tc_out-T in degree celcius\")\n", + "deltaT_in=Tc_out-T\n", + "print(\"deltaT_out=Th_in-Th_out in degree celcius\")\n", + "deltaT_out=Th_in-Th_out\n", + "print(\"so LMTD in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"substituting in,Q=U*A*LMTD\")\n", + "A=(Q*10**3/60)/(U*LMTD)\n", + "print(\"A=(Q*10^3/60)/(U*LMTD)in m^2\"),round(A,2)\n", + "print(\"so surface area=132.85 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.9;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.9, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\n", + "rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\n", + "heat loss per unit area by radiation(Q)in W\n", + "Q= 93597.71\n" + ] + } + ], + "source": [ + "#cal of heat loss per unit area by radiation\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.9, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\")\n", + "T1=(1200+273);#temperature of body in K\n", + "T2=(600+273);#temperature of black surrounding in K\n", + "epsilon=0.4;#emissivity of body at 1200 degree celcius\n", + "sigma=5.67*10**-8;#stephen boltzman constant in W/m^2 K^4\n", + "print(\"rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\")\n", + "print(\"heat loss per unit area by radiation(Q)in W\")\n", + "Q=epsilon*sigma*(T1**4-T2**4)\n", + "print(\"Q=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.10;pg no: 491" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.10, Page:491 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\n", + "Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\n", + "Q=V*I in W\n", + "For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\n", + "surface area for heat transfer,A2=2*%pi*r*L in m^2\n", + "R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\n", + "R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\n", + "Total resistance,R_total=R1+R2 in oc/W\n", + "Q=(T3-T1)/R_total\n", + "so T3 in degree celcius= 98.28\n", + "so temperature at interface=125.12 degree celcius\n", + "critical radius of insulation,rc in m= 0.01\n", + "rc in mm 10.67\n", + "This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\n", + "NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature at interface\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.10, Page:491 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\")\n", + "V=16.;#voltage drop in V\n", + "I=5.;#current in cable in A\n", + "r2=8.*10.**-3/2.;#outer cable radius in m\n", + "r3=3.*10.**-3/2.;#copper wire radius in m\n", + "k=0.16;#thermal conductivity of copper wire in W/m oc\n", + "L=5.;#length of cable in m\n", + "h1=15.;#heat transfer coefficient of cable in W/m^2 oc\n", + "T1=40.;#temperature of surrounding in degree celcius\n", + "print(\"Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\")\n", + "print(\"Q=V*I in W\")\n", + "Q=V*I\n", + "print(\"For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\")\n", + "print(\"surface area for heat transfer,A2=2*%pi*r*L in m^2\")\n", + "A2=2.*math.pi*r2*L\n", + "A2=0.125;#approx.\n", + "print(\"R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\")\n", + "print(\"R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\")\n", + "print(\"Total resistance,R_total=R1+R2 in oc/W\")\n", + "R_total=(1/(h1*A2))+(math.log(r2/r3)/(2.*math.pi*k*L))\n", + "print(\"Q=(T3-T1)/R_total\")\n", + "T3=T1+Q*R_total\n", + "print(\"so T3 in degree celcius=\"),round(T3,2)\n", + "print(\"so temperature at interface=125.12 degree celcius\")\n", + "rc=k/h1\n", + "print(\"critical radius of insulation,rc in m=\"),round(rc,2)\n", + "print(\"rc in mm\"),round(rc*1000,2)\n", + "print(\"This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\")\n", + "print(\"NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.11;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.11, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\n", + "for maximum heat transfer the critical radius of insulation should be used.\n", + "critical radius of insulation(rc)=k/h in mm\n", + "economical thickness of insulation(t)=rc-r_wire in mm\n", + "so economical thickness of insulation=7 mm\n", + "heat convected from cable surface to environment,Q in W\n", + "Q= 35.2\n", + "so heat transferred per unit length=35.2 W\n" + ] + } + ], + "source": [ + "#cal of heat transferred per unit length\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.11, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\")\n", + "r_wire=3;#radius of electric wire in mm\n", + "k=0.16;#thermal conductivity in W/m oc\n", + "T_surrounding=45;#temperature of surrounding in degree celcius\n", + "T_surface=80;#temperature of surface in degree celcius\n", + "h=16;#heat transfer cooefficient in W/m^2 oc\n", + "print(\"for maximum heat transfer the critical radius of insulation should be used.\")\n", + "print(\"critical radius of insulation(rc)=k/h in mm\")\n", + "rc=k*1000/h\n", + "print(\"economical thickness of insulation(t)=rc-r_wire in mm\")\n", + "t=rc-r_wire\n", + "print(\"so economical thickness of insulation=7 mm\")\n", + "print(\"heat convected from cable surface to environment,Q in W\")\n", + "L=1;#length in mm\n", + "Q=2*math.pi*rc*L*h*(T_surface-T_surrounding)*10**-3\n", + "print(\"Q=\"),round(Q,1)\n", + "print(\"so heat transferred per unit length=35.2 W\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.12;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.12, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\n", + "heat transfer through concentric sphere,Q in KJ/hr \n", + "Q= -6297.1\n", + "so heat exchange=6297.1 KJ/hr\n" + ] + } + ], + "source": [ + "#cal of heat exchange\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.12, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\")\n", + "T1=(-150+273);#temperature of air inside in K\n", + "T2=(35+273);#temperature of outer surface in K\n", + "epsilon1=0.03;#emissivity\n", + "epsilon2=epsilon1;\n", + "D1=25*10**-2;#diameter of inner sphere in m\n", + "D2=30*10**-2;#diameter of outer sphere in m\n", + "sigma=2.04*10**-4;#stephen boltzmann constant in KJ/m^2 hr K^4\n", + "print(\"heat transfer through concentric sphere,Q in KJ/hr \")\n", + "A1=4*math.pi*D1**2/4;\n", + "A2=4*math.pi*D2**2/4;\n", + "Q=(A1*sigma*(T1**4-T2**4))/((1/epsilon1)+((A1/A2)*((1/epsilon2)-1)))\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"so heat exchange=6297.1 KJ/hr\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb new file mode 100644 index 00000000..f89e1b1a --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_1.ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12:Introduction to Heat Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.1;pg no: 483" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.1, Page:483 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\n", + "here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\n", + "overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\n", + "(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\n", + "so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "rate of heat transfer,Q in W= 10590.0\n", + "so rate of heat transfer=10590 W\n", + "heat transfer across states 1 and 3(at interface).\n", + "overall heat transfer coefficient between 1 and 3\n", + "(1/U1)=(1/h1)+(deltax_brick/k_brick)\n", + "so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\n", + "Q=U1*A*(T1-T3)\n", + "so T3=T1-(Q/(U1*A))in degree celcius 44.7\n", + "so temperature at interface of brick and wood =44.71 degree celcius\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer and temperature at interface of brick and wood\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.1, Page:483 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\")\n", + "h1=30.;#heat transfer coefficient on side of 50 oc in W/m^2 K\n", + "h5=10.;#heat transfer coefficient on side of 20 oc in W/m^2 K\n", + "k_brick=0.9;#conductivity of brick in W/m K\n", + "k_wood=0.15;#conductivity of wood in W/m K\n", + "T1=50.;#temperature of air on one side of wall in degree celcius\n", + "T5=20.;#temperature of air on other side of wall in degree celcius\n", + "A=100.;#surface area in m^2\n", + "deltax_brick=1.5*10**-2;#length of brick in m\n", + "deltax_wood=2*10**-2;#length of wood in m\n", + "print(\"here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\")\n", + "print(\"overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\")\n", + "print(\"(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\")\n", + "print(\"so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\")\n", + "U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "U=3.53;#approx.\n", + "Q=U*A*(T1-T5)\n", + "print(\"rate of heat transfer,Q in W=\"),round(Q,2)\n", + "print(\"so rate of heat transfer=10590 W\")\n", + "print(\"heat transfer across states 1 and 3(at interface).\")\n", + "print(\"overall heat transfer coefficient between 1 and 3\")\n", + "print(\"(1/U1)=(1/h1)+(deltax_brick/k_brick)\")\n", + "print(\"so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\")\n", + "U1=1/((1/h1)+(deltax_brick/k_brick))\n", + "print(\"Q=U1*A*(T1-T3)\")\n", + "T3=T1-(Q/(U1*A))\n", + "print(\"so T3=T1-(Q/(U1*A))in degree celcius\"),round(T3,2)\n", + "print(\"so temperature at interface of brick and wood =44.71 degree celcius\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.2;pg no: 484" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.2, Page:484 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\n", + "here thermal resistances are\n", + "R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\n", + "R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\n", + "R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\n", + "R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\n", + "R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\n", + "overall heat transfer coefficient for one dimentional steady state heat transfer\n", + "(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\n", + "so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\n", + "rate of heat transfer(Q) in KJ/m^2 hr= 112.0\n", + "wall surface area(A) in m^2\n", + "so rate of heat transfer=112 KJ/m^2 hr \n", + "Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\n", + "Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\n", + "substituting,T2 in degree celcius= 23.6\n", + "so temperature of outer wall,T2=23.6 oc\n", + "T3 in degree= 23.6\n", + "so temperature at interface of outer steel wall and wool,T3=23.59 oc\n", + "T4 in degree celcius= 6.1\n", + "so temperature at interface of wool and inside steel wall,T4=6.09 oc\n", + "T5 in degree celcius= 6.1\n", + "so temperature at inside of inner steel wall,T5=6.08 oc\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer,temperatures\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.2, Page:484 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\")\n", + "h1=40;#average heat transfer coefficient at inner surface in KJ/m^2 hr oc\n", + "h6=50;#average heat transfer coefficient at outer surface in KJ/m^2 hr oc\n", + "deltax_steel=2*10**-3;#mild steel sheets thickness in m\n", + "deltax_wool=5*10**-2;#thickness of glass wool insulation in m\n", + "k_wool=0.16;#thermal conductivity of wool in KJ/m hr\n", + "k_steel=160;#thermal conductivity of steel in KJ/m hr\n", + "T1=25;#kitchen temperature in degree celcius\n", + "T6=5;#refrigerator temperature in degree celcius\n", + "print(\"here thermal resistances are\")\n", + "print(\"R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\")\n", + "print(\"R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\")\n", + "print(\"R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\")\n", + "print(\"R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\")\n", + "print(\"R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\")\n", + "print(\"overall heat transfer coefficient for one dimentional steady state heat transfer\")\n", + "print(\"(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\")\n", + "print(\"so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\")\n", + "U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))\n", + "U=2.8;#approx.\n", + "A=4*(1*0.5)\n", + "Q=U*A*(T1-T6)\n", + "print(\"rate of heat transfer(Q) in KJ/m^2 hr=\"),round(Q,2)\n", + "print(\"wall surface area(A) in m^2\")\n", + "print(\"so rate of heat transfer=112 KJ/m^2 hr \")\n", + "print(\"Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\")\n", + "print(\"Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\")\n", + "T2=T1-(Q/(A*h1))\n", + "print(\"substituting,T2 in degree celcius=\"),round(T2,1)\n", + "print(\"so temperature of outer wall,T2=23.6 oc\")\n", + "T3=T2-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T3 in degree= \"),round(T3,2)\n", + "print(\"so temperature at interface of outer steel wall and wool,T3=23.59 oc\")\n", + "T4=T3-(Q*deltax_wool/(k_wool*A))\n", + "print(\"T4 in degree celcius=\"),round(T4,2)\n", + "print(\"so temperature at interface of wool and inside steel wall,T4=6.09 oc\")\n", + "T5=T4-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T5 in degree celcius=\"),round(T5,2)\n", + "print(\"so temperature at inside of inner steel wall,T5=6.08 oc\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.3;pg no: 486" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.3, Page:486 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\n", + "here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\n", + "Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\n", + "so heat loss per meter from pipe in KJ/hr= 1479.77\n", + "heat loss from 5 m length(Q) in KJ/hr 7396.7\n", + "enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\n", + "mass flow of steam(m)in kg/hr\n", + "final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\n", + "let quality of steam at exit be x,\n", + "also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\n", + "h=hf+x*hfg\n", + "so x=(h-hf)/hfg 0.8245\n", + "so quality of steam at exit=0.8245\n" + ] + } + ], + "source": [ + "#cal of heat loss per meter from pipe and quality of steam\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.3, Page:486 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\")\n", + "k_insulation=0.3;#thermal conductivity of insulation in KJ/m hr oc\n", + "k_pipe=209;#thermal conductivity of pipe in KJ/m hr oc\n", + "T1=300;#temperature of inner surface of steam pipe in degree celcius\n", + "T3=50;#temperature of outer surface of insulation layer in degree celcius\n", + "r1=15*10**-2/2;#steam pipe inner radius without insulation in m\n", + "r2=16*10**-2/2;#steam pipe outer radius without insulation in m\n", + "r3=22*10**-2/2;#radius with insulation in m\n", + "m=0.5;#steam entering rate in kg/min\n", + "print(\"here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\")\n", + "print(\"Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\")\n", + "L=1;\n", + "Q=(T1-T3)*2*math.pi*L/((1/k_pipe)*math.log(r2/r1)+(1/k_insulation*math.log(r3/r2)))\n", + "print(\"so heat loss per meter from pipe in KJ/hr=\"),round(Q,2)\n", + "Q=5*Q\n", + "print(\"heat loss from 5 m length(Q) in KJ/hr\"),round(5*1479.34,2)\n", + "print(\"enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\")\n", + "hg=2749;\n", + "print(\"mass flow of steam(m)in kg/hr\")\n", + "m=m*60\n", + "print(\"final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\")\n", + "h=hg-(Q/m)\n", + "print(\"let quality of steam at exit be x,\")\n", + "print(\"also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\")\n", + "hf=1344;\n", + "hfg=1404.9;\n", + "print(\"h=hf+x*hfg\")\n", + "x=(h-hf)/hfg\n", + "print(\"so x=(h-hf)/hfg\"),round(x,4)\n", + "print(\"so quality of steam at exit=0.8245\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.4;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.4, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\n", + "considering one dimensional heat transfer of steady state type\n", + "for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr 168892.02\n", + "so heat transfer rate=168892.02 KJ/hr\n", + "heat flux in KJ/m^2 hr= 23893.33\n", + "so heat flux=23893.33 KJ/m^2 hr\n" + ] + } + ], + "source": [ + "#cal of amount of heat transfer and heat flux\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.4, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\")\n", + "r1=150.*10**-2/2;#inner radius in m\n", + "r2=200.*10**-2/2;#outer radius in m\n", + "k=28.;#thermal conductivity in KJ m hr oc\n", + "T1=200.;#inside surface temperature in degree celcius\n", + "T2=40.;#outer surface temperature in degree celcius\n", + "print(\"considering one dimensional heat transfer of steady state type\")\n", + "Q=(T1-T2)*4*math.pi*k*r1*r2/(r2-r1)\n", + "print(\"for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr\"),round(Q,2)\n", + "print(\"so heat transfer rate=168892.02 KJ/hr\")\n", + "Q/(4*math.pi*r1**2)\n", + "print(\"heat flux in KJ/m^2 hr=\"),round(Q/(4*math.pi*r1**2),2)\n", + "print(\"so heat flux=23893.33 KJ/m^2 hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.5;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.5, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\n", + "R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\n", + "R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\n", + "R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\n", + "total thermal resistance,R_total=R1+R2+R3 in oc/W\n", + "so rate of heat transfer,Q=(T1-T4)/R_total in W 118.03\n", + "heat transfer rate from inside of room to inside surface of glass window.\n", + "Q=(T1-T2)/R1\n", + "so T2=T1-Q*R1 in degree celcius 9.26\n", + "Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.5, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\")\n", + "T1=25.;#room temperature in degree celcius\n", + "T4=2.;#winter outside temperature in degree celcius\n", + "h1=10.;#heat transfer coefficient on inner window surfaces in W/m^2 oc\n", + "h4=30.;#heat transfer coefficient on outer window surfaces in W/m^2 oc\n", + "k=0.78;#thermal conductivity of glass in W/m^2 oc\n", + "A=75.*10**-2*100.*10**-2;#area in m^2\n", + "deltax=10.*10**-3;#glass thickness in m\n", + "print(\"R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\")\n", + "print(\"R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\")\n", + "print(\"R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\")\n", + "print(\"total thermal resistance,R_total=R1+R2+R3 in oc/W\")\n", + "R_total=1/(h1*A)+deltax/(k*A)+1/(h4*A)\n", + "Q=(T1-T4)/R_total\n", + "print(\"so rate of heat transfer,Q=(T1-T4)/R_total in W\"),round(Q,2)\n", + "print(\"heat transfer rate from inside of room to inside surface of glass window.\")\n", + "R1=(1/7.5);\n", + "T2=T1-Q*R1\n", + "print(\"Q=(T1-T2)/R1\")\n", + "print(\"so T2=T1-Q*R1 in degree celcius\"),round(T2,2)\n", + "print(\"Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\") \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.6;pg no: 488" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.6, Page:488 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\n", + "reynolds number,Re=V*D/v\n", + "subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\n", + "or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\n", + "so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\n", + "rate of heat transfer due to convection,Q in W \n", + "Q=h*A*(T2-T1)= 61259.36\n", + "so heat transfer rate=61259.38 W\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.6, Page:488 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\")\n", + "D=4*10**-2;#inner diameter in m\n", + "L=3;#length in m\n", + "V=1;#velocity of water in m/s\n", + "T1=40;#mean temperature in degree celcius\n", + "T2=75;#pipe wall temperature in degree celcius \n", + "k=0.6;#conductivity of water in W/m\n", + "Pr=3;#prandtl no.\n", + "v=0.478*10**-6;#viscocity in m^2/s\n", + "print(\"reynolds number,Re=V*D/v\")\n", + "Re=V*D/v\n", + "print(\"subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\")\n", + "h=(k/D)*0.023*(Re)**0.8*(Pr)**0.4 \n", + "print(\"rate of heat transfer due to convection,Q in W \") \n", + "Q=h*(math.pi*D*L)*(T2-T1)\n", + "print(\"Q=h*A*(T2-T1)=\"),round(Q,2)\n", + "print(\"so heat transfer rate=61259.38 W\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.7;pg no: 489" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.7, Page:489 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\n", + "Let the temperature of water at exit be T\n", + "Heat exchanger,Q=heat rejected by glasses=heat gained by water\n", + "Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\n", + "so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\n", + "and Q in KJ\n", + "deltaT_in=T1-T3 in degree celcius\n", + "deltaT_out=T2-T in degree celcius\n", + "for parallel flow heat exchanger,\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\n", + "also,Q=U*A*LMTD\n", + "so A=Q/(U*LMTD) in m^2 5.937\n", + "surface area,A=5.936 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.7, Page:489 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\")\n", + "m=0.5;#hot gases flowing rate in kg/s\n", + "T1=500;#initial temperature of gas in degree celcius\n", + "T2=150;#final temperature of gas in degree celcius\n", + "Cg=1.2;#specific heat of gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "U=150;#overall heat transfer coefficient in W/m^2 K\n", + "mw=1;#mass of water in kg/s\n", + "T3=10;#water entering temperature in degree celcius\n", + "print(\"Let the temperature of water at exit be T\")\n", + "print(\"Heat exchanger,Q=heat rejected by glasses=heat gained by water\")\n", + "print(\"Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\")\n", + "print(\"so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\")\n", + "T=T3+(m*Cg*(T1-T2)/(mw*Cw))\n", + "print(\"and Q in KJ\")\n", + "Q=m*Cg*(T1-T2)\n", + "print(\"deltaT_in=T1-T3 in degree celcius\")\n", + "deltaT_in=T1-T3\n", + "print(\"deltaT_out=T2-T in degree celcius\")\n", + "deltaT_out=T2-T\n", + "print(\"for parallel flow heat exchanger,\")\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"also,Q=U*A*LMTD\")\n", + "A=Q*10**3/(U*LMTD)\n", + "print(\"so A=Q/(U*LMTD) in m^2\"),round(A,3)\n", + "print(\"surface area,A=5.936 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.8;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.8, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\n", + "This oil cooler has arrangement similar to a counter flow heat exchanger.\n", + "by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\n", + "so Q in KJ/min\n", + "and T=Th_out+(Q/(mh*Cph))in degree celcius\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \n", + "here deltaT_in=Tc_out-T in degree celcius\n", + "deltaT_out=Th_in-Th_out in degree celcius\n", + "so LMTD in degree celcius\n", + "substituting in,Q=U*A*LMTD\n", + "A=(Q*10^3/60)/(U*LMTD)in m^2 132.81\n", + "so surface area=132.85 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.8, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\")\n", + "mc=20;#mass of oil in kg/min \n", + "Tc_out=100;#initial temperature of oil in degree celcius\n", + "Th_in=30;#final temperature of oil in degree celcius\n", + "Th_out=25;#temperature of water in degree celcius\n", + "Cpc=2;#specific heat of oil in KJ/kg K\n", + "Cph=4.18;#specific heat of water in KJ/kg K\n", + "mh=15;#water flow rate in kg/min\n", + "U=25;#overall heat transfer coefficient in W/m^2 K\n", + "print(\"This oil cooler has arrangement similar to a counter flow heat exchanger.\")\n", + "print(\"by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\")\n", + "print(\"so Q in KJ/min\")\n", + "Q=mc*Cpc*(Tc_out-Th_in)\n", + "print(\"and T=Th_out+(Q/(mh*Cph))in degree celcius\")\n", + "T=Th_out+(Q/(mh*Cph))\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \")\n", + "print(\"here deltaT_in=Tc_out-T in degree celcius\")\n", + "deltaT_in=Tc_out-T\n", + "print(\"deltaT_out=Th_in-Th_out in degree celcius\")\n", + "deltaT_out=Th_in-Th_out\n", + "print(\"so LMTD in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"substituting in,Q=U*A*LMTD\")\n", + "A=(Q*10**3/60)/(U*LMTD)\n", + "print(\"A=(Q*10^3/60)/(U*LMTD)in m^2\"),round(A,2)\n", + "print(\"so surface area=132.85 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.9;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.9, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\n", + "rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\n", + "heat loss per unit area by radiation(Q)in W\n", + "Q= 93597.71\n" + ] + } + ], + "source": [ + "#cal of heat loss per unit area by radiation\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.9, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\")\n", + "T1=(1200+273);#temperature of body in K\n", + "T2=(600+273);#temperature of black surrounding in K\n", + "epsilon=0.4;#emissivity of body at 1200 degree celcius\n", + "sigma=5.67*10**-8;#stephen boltzman constant in W/m^2 K^4\n", + "print(\"rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\")\n", + "print(\"heat loss per unit area by radiation(Q)in W\")\n", + "Q=epsilon*sigma*(T1**4-T2**4)\n", + "print(\"Q=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.10;pg no: 491" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.10, Page:491 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\n", + "Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\n", + "Q=V*I in W\n", + "For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\n", + "surface area for heat transfer,A2=2*%pi*r*L in m^2\n", + "R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\n", + "R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\n", + "Total resistance,R_total=R1+R2 in oc/W\n", + "Q=(T3-T1)/R_total\n", + "so T3 in degree celcius= 98.28\n", + "so temperature at interface=125.12 degree celcius\n", + "critical radius of insulation,rc in m= 0.01\n", + "rc in mm 10.67\n", + "This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\n", + "NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature at interface\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.10, Page:491 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\")\n", + "V=16.;#voltage drop in V\n", + "I=5.;#current in cable in A\n", + "r2=8.*10.**-3/2.;#outer cable radius in m\n", + "r3=3.*10.**-3/2.;#copper wire radius in m\n", + "k=0.16;#thermal conductivity of copper wire in W/m oc\n", + "L=5.;#length of cable in m\n", + "h1=15.;#heat transfer coefficient of cable in W/m^2 oc\n", + "T1=40.;#temperature of surrounding in degree celcius\n", + "print(\"Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\")\n", + "print(\"Q=V*I in W\")\n", + "Q=V*I\n", + "print(\"For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\")\n", + "print(\"surface area for heat transfer,A2=2*%pi*r*L in m^2\")\n", + "A2=2.*math.pi*r2*L\n", + "A2=0.125;#approx.\n", + "print(\"R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\")\n", + "print(\"R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\")\n", + "print(\"Total resistance,R_total=R1+R2 in oc/W\")\n", + "R_total=(1/(h1*A2))+(math.log(r2/r3)/(2.*math.pi*k*L))\n", + "print(\"Q=(T3-T1)/R_total\")\n", + "T3=T1+Q*R_total\n", + "print(\"so T3 in degree celcius=\"),round(T3,2)\n", + "print(\"so temperature at interface=125.12 degree celcius\")\n", + "rc=k/h1\n", + "print(\"critical radius of insulation,rc in m=\"),round(rc,2)\n", + "print(\"rc in mm\"),round(rc*1000,2)\n", + "print(\"This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\")\n", + "print(\"NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.11;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.11, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\n", + "for maximum heat transfer the critical radius of insulation should be used.\n", + "critical radius of insulation(rc)=k/h in mm\n", + "economical thickness of insulation(t)=rc-r_wire in mm\n", + "so economical thickness of insulation=7 mm\n", + "heat convected from cable surface to environment,Q in W\n", + "Q= 35.2\n", + "so heat transferred per unit length=35.2 W\n" + ] + } + ], + "source": [ + "#cal of heat transferred per unit length\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.11, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\")\n", + "r_wire=3;#radius of electric wire in mm\n", + "k=0.16;#thermal conductivity in W/m oc\n", + "T_surrounding=45;#temperature of surrounding in degree celcius\n", + "T_surface=80;#temperature of surface in degree celcius\n", + "h=16;#heat transfer cooefficient in W/m^2 oc\n", + "print(\"for maximum heat transfer the critical radius of insulation should be used.\")\n", + "print(\"critical radius of insulation(rc)=k/h in mm\")\n", + "rc=k*1000/h\n", + "print(\"economical thickness of insulation(t)=rc-r_wire in mm\")\n", + "t=rc-r_wire\n", + "print(\"so economical thickness of insulation=7 mm\")\n", + "print(\"heat convected from cable surface to environment,Q in W\")\n", + "L=1;#length in mm\n", + "Q=2*math.pi*rc*L*h*(T_surface-T_surrounding)*10**-3\n", + "print(\"Q=\"),round(Q,1)\n", + "print(\"so heat transferred per unit length=35.2 W\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.12;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.12, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\n", + "heat transfer through concentric sphere,Q in KJ/hr \n", + "Q= -6297.1\n", + "so heat exchange=6297.1 KJ/hr\n" + ] + } + ], + "source": [ + "#cal of heat exchange\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.12, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\")\n", + "T1=(-150+273);#temperature of air inside in K\n", + "T2=(35+273);#temperature of outer surface in K\n", + "epsilon1=0.03;#emissivity\n", + "epsilon2=epsilon1;\n", + "D1=25*10**-2;#diameter of inner sphere in m\n", + "D2=30*10**-2;#diameter of outer sphere in m\n", + "sigma=2.04*10**-4;#stephen boltzmann constant in KJ/m^2 hr K^4\n", + "print(\"heat transfer through concentric sphere,Q in KJ/hr \")\n", + "A1=4*math.pi*D1**2/4;\n", + "A2=4*math.pi*D2**2/4;\n", + "Q=(A1*sigma*(T1**4-T2**4))/((1/epsilon1)+((A1/A2)*((1/epsilon2)-1)))\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"so heat exchange=6297.1 KJ/hr\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb new file mode 100644 index 00000000..f89e1b1a --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_2.ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12:Introduction to Heat Transfer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.1;pg no: 483" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.1, Page:483 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\n", + "here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\n", + "overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\n", + "(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\n", + "so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "rate of heat transfer,Q in W= 10590.0\n", + "so rate of heat transfer=10590 W\n", + "heat transfer across states 1 and 3(at interface).\n", + "overall heat transfer coefficient between 1 and 3\n", + "(1/U1)=(1/h1)+(deltax_brick/k_brick)\n", + "so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\n", + "Q=U1*A*(T1-T3)\n", + "so T3=T1-(Q/(U1*A))in degree celcius 44.7\n", + "so temperature at interface of brick and wood =44.71 degree celcius\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer and temperature at interface of brick and wood\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.1, Page:483 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\")\n", + "h1=30.;#heat transfer coefficient on side of 50 oc in W/m^2 K\n", + "h5=10.;#heat transfer coefficient on side of 20 oc in W/m^2 K\n", + "k_brick=0.9;#conductivity of brick in W/m K\n", + "k_wood=0.15;#conductivity of wood in W/m K\n", + "T1=50.;#temperature of air on one side of wall in degree celcius\n", + "T5=20.;#temperature of air on other side of wall in degree celcius\n", + "A=100.;#surface area in m^2\n", + "deltax_brick=1.5*10**-2;#length of brick in m\n", + "deltax_wood=2*10**-2;#length of wood in m\n", + "print(\"here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\")\n", + "print(\"overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\")\n", + "print(\"(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\")\n", + "print(\"so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\")\n", + "U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n", + "U=3.53;#approx.\n", + "Q=U*A*(T1-T5)\n", + "print(\"rate of heat transfer,Q in W=\"),round(Q,2)\n", + "print(\"so rate of heat transfer=10590 W\")\n", + "print(\"heat transfer across states 1 and 3(at interface).\")\n", + "print(\"overall heat transfer coefficient between 1 and 3\")\n", + "print(\"(1/U1)=(1/h1)+(deltax_brick/k_brick)\")\n", + "print(\"so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\")\n", + "U1=1/((1/h1)+(deltax_brick/k_brick))\n", + "print(\"Q=U1*A*(T1-T3)\")\n", + "T3=T1-(Q/(U1*A))\n", + "print(\"so T3=T1-(Q/(U1*A))in degree celcius\"),round(T3,2)\n", + "print(\"so temperature at interface of brick and wood =44.71 degree celcius\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.2;pg no: 484" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.2, Page:484 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\n", + "here thermal resistances are\n", + "R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\n", + "R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\n", + "R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\n", + "R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\n", + "R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\n", + "overall heat transfer coefficient for one dimentional steady state heat transfer\n", + "(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\n", + "so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\n", + "rate of heat transfer(Q) in KJ/m^2 hr= 112.0\n", + "wall surface area(A) in m^2\n", + "so rate of heat transfer=112 KJ/m^2 hr \n", + "Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\n", + "Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\n", + "substituting,T2 in degree celcius= 23.6\n", + "so temperature of outer wall,T2=23.6 oc\n", + "T3 in degree= 23.6\n", + "so temperature at interface of outer steel wall and wool,T3=23.59 oc\n", + "T4 in degree celcius= 6.1\n", + "so temperature at interface of wool and inside steel wall,T4=6.09 oc\n", + "T5 in degree celcius= 6.1\n", + "so temperature at inside of inner steel wall,T5=6.08 oc\n" + ] + } + ], + "source": [ + "#cal of rate of heat transfer,temperatures\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.2, Page:484 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\")\n", + "h1=40;#average heat transfer coefficient at inner surface in KJ/m^2 hr oc\n", + "h6=50;#average heat transfer coefficient at outer surface in KJ/m^2 hr oc\n", + "deltax_steel=2*10**-3;#mild steel sheets thickness in m\n", + "deltax_wool=5*10**-2;#thickness of glass wool insulation in m\n", + "k_wool=0.16;#thermal conductivity of wool in KJ/m hr\n", + "k_steel=160;#thermal conductivity of steel in KJ/m hr\n", + "T1=25;#kitchen temperature in degree celcius\n", + "T6=5;#refrigerator temperature in degree celcius\n", + "print(\"here thermal resistances are\")\n", + "print(\"R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\")\n", + "print(\"R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\")\n", + "print(\"R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\")\n", + "print(\"R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\")\n", + "print(\"R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\")\n", + "print(\"overall heat transfer coefficient for one dimentional steady state heat transfer\")\n", + "print(\"(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\")\n", + "print(\"so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\")\n", + "U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))\n", + "U=2.8;#approx.\n", + "A=4*(1*0.5)\n", + "Q=U*A*(T1-T6)\n", + "print(\"rate of heat transfer(Q) in KJ/m^2 hr=\"),round(Q,2)\n", + "print(\"wall surface area(A) in m^2\")\n", + "print(\"so rate of heat transfer=112 KJ/m^2 hr \")\n", + "print(\"Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\")\n", + "print(\"Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\")\n", + "T2=T1-(Q/(A*h1))\n", + "print(\"substituting,T2 in degree celcius=\"),round(T2,1)\n", + "print(\"so temperature of outer wall,T2=23.6 oc\")\n", + "T3=T2-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T3 in degree= \"),round(T3,2)\n", + "print(\"so temperature at interface of outer steel wall and wool,T3=23.59 oc\")\n", + "T4=T3-(Q*deltax_wool/(k_wool*A))\n", + "print(\"T4 in degree celcius=\"),round(T4,2)\n", + "print(\"so temperature at interface of wool and inside steel wall,T4=6.09 oc\")\n", + "T5=T4-(Q*deltax_steel/(k_steel*A))\n", + "print(\"T5 in degree celcius=\"),round(T5,2)\n", + "print(\"so temperature at inside of inner steel wall,T5=6.08 oc\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.3;pg no: 486" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.3, Page:486 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\n", + "here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\n", + "Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\n", + "so heat loss per meter from pipe in KJ/hr= 1479.77\n", + "heat loss from 5 m length(Q) in KJ/hr 7396.7\n", + "enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\n", + "mass flow of steam(m)in kg/hr\n", + "final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\n", + "let quality of steam at exit be x,\n", + "also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\n", + "h=hf+x*hfg\n", + "so x=(h-hf)/hfg 0.8245\n", + "so quality of steam at exit=0.8245\n" + ] + } + ], + "source": [ + "#cal of heat loss per meter from pipe and quality of steam\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.3, Page:486 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\")\n", + "k_insulation=0.3;#thermal conductivity of insulation in KJ/m hr oc\n", + "k_pipe=209;#thermal conductivity of pipe in KJ/m hr oc\n", + "T1=300;#temperature of inner surface of steam pipe in degree celcius\n", + "T3=50;#temperature of outer surface of insulation layer in degree celcius\n", + "r1=15*10**-2/2;#steam pipe inner radius without insulation in m\n", + "r2=16*10**-2/2;#steam pipe outer radius without insulation in m\n", + "r3=22*10**-2/2;#radius with insulation in m\n", + "m=0.5;#steam entering rate in kg/min\n", + "print(\"here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\")\n", + "print(\"Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\")\n", + "L=1;\n", + "Q=(T1-T3)*2*math.pi*L/((1/k_pipe)*math.log(r2/r1)+(1/k_insulation*math.log(r3/r2)))\n", + "print(\"so heat loss per meter from pipe in KJ/hr=\"),round(Q,2)\n", + "Q=5*Q\n", + "print(\"heat loss from 5 m length(Q) in KJ/hr\"),round(5*1479.34,2)\n", + "print(\"enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\")\n", + "hg=2749;\n", + "print(\"mass flow of steam(m)in kg/hr\")\n", + "m=m*60\n", + "print(\"final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\")\n", + "h=hg-(Q/m)\n", + "print(\"let quality of steam at exit be x,\")\n", + "print(\"also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\")\n", + "hf=1344;\n", + "hfg=1404.9;\n", + "print(\"h=hf+x*hfg\")\n", + "x=(h-hf)/hfg\n", + "print(\"so x=(h-hf)/hfg\"),round(x,4)\n", + "print(\"so quality of steam at exit=0.8245\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.4;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.4, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\n", + "considering one dimensional heat transfer of steady state type\n", + "for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr 168892.02\n", + "so heat transfer rate=168892.02 KJ/hr\n", + "heat flux in KJ/m^2 hr= 23893.33\n", + "so heat flux=23893.33 KJ/m^2 hr\n" + ] + } + ], + "source": [ + "#cal of amount of heat transfer and heat flux\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.4, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\")\n", + "r1=150.*10**-2/2;#inner radius in m\n", + "r2=200.*10**-2/2;#outer radius in m\n", + "k=28.;#thermal conductivity in KJ m hr oc\n", + "T1=200.;#inside surface temperature in degree celcius\n", + "T2=40.;#outer surface temperature in degree celcius\n", + "print(\"considering one dimensional heat transfer of steady state type\")\n", + "Q=(T1-T2)*4*math.pi*k*r1*r2/(r2-r1)\n", + "print(\"for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr\"),round(Q,2)\n", + "print(\"so heat transfer rate=168892.02 KJ/hr\")\n", + "Q/(4*math.pi*r1**2)\n", + "print(\"heat flux in KJ/m^2 hr=\"),round(Q/(4*math.pi*r1**2),2)\n", + "print(\"so heat flux=23893.33 KJ/m^2 hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.5;pg no: 487" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.5, Page:487 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\n", + "R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\n", + "R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\n", + "R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\n", + "total thermal resistance,R_total=R1+R2+R3 in oc/W\n", + "so rate of heat transfer,Q=(T1-T4)/R_total in W 118.03\n", + "heat transfer rate from inside of room to inside surface of glass window.\n", + "Q=(T1-T2)/R1\n", + "so T2=T1-Q*R1 in degree celcius 9.26\n", + "Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.5, Page:487 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\")\n", + "T1=25.;#room temperature in degree celcius\n", + "T4=2.;#winter outside temperature in degree celcius\n", + "h1=10.;#heat transfer coefficient on inner window surfaces in W/m^2 oc\n", + "h4=30.;#heat transfer coefficient on outer window surfaces in W/m^2 oc\n", + "k=0.78;#thermal conductivity of glass in W/m^2 oc\n", + "A=75.*10**-2*100.*10**-2;#area in m^2\n", + "deltax=10.*10**-3;#glass thickness in m\n", + "print(\"R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\")\n", + "print(\"R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\")\n", + "print(\"R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\")\n", + "print(\"total thermal resistance,R_total=R1+R2+R3 in oc/W\")\n", + "R_total=1/(h1*A)+deltax/(k*A)+1/(h4*A)\n", + "Q=(T1-T4)/R_total\n", + "print(\"so rate of heat transfer,Q=(T1-T4)/R_total in W\"),round(Q,2)\n", + "print(\"heat transfer rate from inside of room to inside surface of glass window.\")\n", + "R1=(1/7.5);\n", + "T2=T1-Q*R1\n", + "print(\"Q=(T1-T2)/R1\")\n", + "print(\"so T2=T1-Q*R1 in degree celcius\"),round(T2,2)\n", + "print(\"Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\") \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.6;pg no: 488" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.6, Page:488 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\n", + "reynolds number,Re=V*D/v\n", + "subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\n", + "or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\n", + "so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\n", + "rate of heat transfer due to convection,Q in W \n", + "Q=h*A*(T2-T1)= 61259.36\n", + "so heat transfer rate=61259.38 W\n" + ] + } + ], + "source": [ + "#cal of heat transfer rate\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.6, Page:488 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\")\n", + "D=4*10**-2;#inner diameter in m\n", + "L=3;#length in m\n", + "V=1;#velocity of water in m/s\n", + "T1=40;#mean temperature in degree celcius\n", + "T2=75;#pipe wall temperature in degree celcius \n", + "k=0.6;#conductivity of water in W/m\n", + "Pr=3;#prandtl no.\n", + "v=0.478*10**-6;#viscocity in m^2/s\n", + "print(\"reynolds number,Re=V*D/v\")\n", + "Re=V*D/v\n", + "print(\"subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\")\n", + "print(\"so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\")\n", + "h=(k/D)*0.023*(Re)**0.8*(Pr)**0.4 \n", + "print(\"rate of heat transfer due to convection,Q in W \") \n", + "Q=h*(math.pi*D*L)*(T2-T1)\n", + "print(\"Q=h*A*(T2-T1)=\"),round(Q,2)\n", + "print(\"so heat transfer rate=61259.38 W\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.7;pg no: 489" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.7, Page:489 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\n", + "Let the temperature of water at exit be T\n", + "Heat exchanger,Q=heat rejected by glasses=heat gained by water\n", + "Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\n", + "so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\n", + "and Q in KJ\n", + "deltaT_in=T1-T3 in degree celcius\n", + "deltaT_out=T2-T in degree celcius\n", + "for parallel flow heat exchanger,\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\n", + "also,Q=U*A*LMTD\n", + "so A=Q/(U*LMTD) in m^2 5.937\n", + "surface area,A=5.936 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.7, Page:489 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\")\n", + "m=0.5;#hot gases flowing rate in kg/s\n", + "T1=500;#initial temperature of gas in degree celcius\n", + "T2=150;#final temperature of gas in degree celcius\n", + "Cg=1.2;#specific heat of gas in KJ/kg K\n", + "Cw=4.18;#specific heat of water in KJ/kg K\n", + "U=150;#overall heat transfer coefficient in W/m^2 K\n", + "mw=1;#mass of water in kg/s\n", + "T3=10;#water entering temperature in degree celcius\n", + "print(\"Let the temperature of water at exit be T\")\n", + "print(\"Heat exchanger,Q=heat rejected by glasses=heat gained by water\")\n", + "print(\"Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\")\n", + "print(\"so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\")\n", + "T=T3+(m*Cg*(T1-T2)/(mw*Cw))\n", + "print(\"and Q in KJ\")\n", + "Q=m*Cg*(T1-T2)\n", + "print(\"deltaT_in=T1-T3 in degree celcius\")\n", + "deltaT_in=T1-T3\n", + "print(\"deltaT_out=T2-T in degree celcius\")\n", + "deltaT_out=T2-T\n", + "print(\"for parallel flow heat exchanger,\")\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"also,Q=U*A*LMTD\")\n", + "A=Q*10**3/(U*LMTD)\n", + "print(\"so A=Q/(U*LMTD) in m^2\"),round(A,3)\n", + "print(\"surface area,A=5.936 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.8;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.8, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\n", + "This oil cooler has arrangement similar to a counter flow heat exchanger.\n", + "by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\n", + "so Q in KJ/min\n", + "and T=Th_out+(Q/(mh*Cph))in degree celcius\n", + "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \n", + "here deltaT_in=Tc_out-T in degree celcius\n", + "deltaT_out=Th_in-Th_out in degree celcius\n", + "so LMTD in degree celcius\n", + "substituting in,Q=U*A*LMTD\n", + "A=(Q*10^3/60)/(U*LMTD)in m^2 132.81\n", + "so surface area=132.85 m^2\n" + ] + } + ], + "source": [ + "#cal of surface area\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.8, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\")\n", + "mc=20;#mass of oil in kg/min \n", + "Tc_out=100;#initial temperature of oil in degree celcius\n", + "Th_in=30;#final temperature of oil in degree celcius\n", + "Th_out=25;#temperature of water in degree celcius\n", + "Cpc=2;#specific heat of oil in KJ/kg K\n", + "Cph=4.18;#specific heat of water in KJ/kg K\n", + "mh=15;#water flow rate in kg/min\n", + "U=25;#overall heat transfer coefficient in W/m^2 K\n", + "print(\"This oil cooler has arrangement similar to a counter flow heat exchanger.\")\n", + "print(\"by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\")\n", + "print(\"so Q in KJ/min\")\n", + "Q=mc*Cpc*(Tc_out-Th_in)\n", + "print(\"and T=Th_out+(Q/(mh*Cph))in degree celcius\")\n", + "T=Th_out+(Q/(mh*Cph))\n", + "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \")\n", + "print(\"here deltaT_in=Tc_out-T in degree celcius\")\n", + "deltaT_in=Tc_out-T\n", + "print(\"deltaT_out=Th_in-Th_out in degree celcius\")\n", + "deltaT_out=Th_in-Th_out\n", + "print(\"so LMTD in degree celcius\")\n", + "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n", + "print(\"substituting in,Q=U*A*LMTD\")\n", + "A=(Q*10**3/60)/(U*LMTD)\n", + "print(\"A=(Q*10^3/60)/(U*LMTD)in m^2\"),round(A,2)\n", + "print(\"so surface area=132.85 m^2\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.9;pg no: 490" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.9, Page:490 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\n", + "rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\n", + "heat loss per unit area by radiation(Q)in W\n", + "Q= 93597.71\n" + ] + } + ], + "source": [ + "#cal of heat loss per unit area by radiation\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.9, Page:490 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\")\n", + "T1=(1200+273);#temperature of body in K\n", + "T2=(600+273);#temperature of black surrounding in K\n", + "epsilon=0.4;#emissivity of body at 1200 degree celcius\n", + "sigma=5.67*10**-8;#stephen boltzman constant in W/m^2 K^4\n", + "print(\"rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\")\n", + "print(\"heat loss per unit area by radiation(Q)in W\")\n", + "Q=epsilon*sigma*(T1**4-T2**4)\n", + "print(\"Q=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.10;pg no: 491" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.10, Page:491 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\n", + "Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\n", + "Q=V*I in W\n", + "For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\n", + "surface area for heat transfer,A2=2*%pi*r*L in m^2\n", + "R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\n", + "R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\n", + "Total resistance,R_total=R1+R2 in oc/W\n", + "Q=(T3-T1)/R_total\n", + "so T3 in degree celcius= 98.28\n", + "so temperature at interface=125.12 degree celcius\n", + "critical radius of insulation,rc in m= 0.01\n", + "rc in mm 10.67\n", + "This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\n", + "NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature at interface\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.10, Page:491 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\")\n", + "V=16.;#voltage drop in V\n", + "I=5.;#current in cable in A\n", + "r2=8.*10.**-3/2.;#outer cable radius in m\n", + "r3=3.*10.**-3/2.;#copper wire radius in m\n", + "k=0.16;#thermal conductivity of copper wire in W/m oc\n", + "L=5.;#length of cable in m\n", + "h1=15.;#heat transfer coefficient of cable in W/m^2 oc\n", + "T1=40.;#temperature of surrounding in degree celcius\n", + "print(\"Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\")\n", + "print(\"Q=V*I in W\")\n", + "Q=V*I\n", + "print(\"For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\")\n", + "print(\"surface area for heat transfer,A2=2*%pi*r*L in m^2\")\n", + "A2=2.*math.pi*r2*L\n", + "A2=0.125;#approx.\n", + "print(\"R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\")\n", + "print(\"R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\")\n", + "print(\"Total resistance,R_total=R1+R2 in oc/W\")\n", + "R_total=(1/(h1*A2))+(math.log(r2/r3)/(2.*math.pi*k*L))\n", + "print(\"Q=(T3-T1)/R_total\")\n", + "T3=T1+Q*R_total\n", + "print(\"so T3 in degree celcius=\"),round(T3,2)\n", + "print(\"so temperature at interface=125.12 degree celcius\")\n", + "rc=k/h1\n", + "print(\"critical radius of insulation,rc in m=\"),round(rc,2)\n", + "print(\"rc in mm\"),round(rc*1000,2)\n", + "print(\"This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\")\n", + "print(\"NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.11;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.11, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\n", + "for maximum heat transfer the critical radius of insulation should be used.\n", + "critical radius of insulation(rc)=k/h in mm\n", + "economical thickness of insulation(t)=rc-r_wire in mm\n", + "so economical thickness of insulation=7 mm\n", + "heat convected from cable surface to environment,Q in W\n", + "Q= 35.2\n", + "so heat transferred per unit length=35.2 W\n" + ] + } + ], + "source": [ + "#cal of heat transferred per unit length\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.11, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\")\n", + "r_wire=3;#radius of electric wire in mm\n", + "k=0.16;#thermal conductivity in W/m oc\n", + "T_surrounding=45;#temperature of surrounding in degree celcius\n", + "T_surface=80;#temperature of surface in degree celcius\n", + "h=16;#heat transfer cooefficient in W/m^2 oc\n", + "print(\"for maximum heat transfer the critical radius of insulation should be used.\")\n", + "print(\"critical radius of insulation(rc)=k/h in mm\")\n", + "rc=k*1000/h\n", + "print(\"economical thickness of insulation(t)=rc-r_wire in mm\")\n", + "t=rc-r_wire\n", + "print(\"so economical thickness of insulation=7 mm\")\n", + "print(\"heat convected from cable surface to environment,Q in W\")\n", + "L=1;#length in mm\n", + "Q=2*math.pi*rc*L*h*(T_surface-T_surrounding)*10**-3\n", + "print(\"Q=\"),round(Q,1)\n", + "print(\"so heat transferred per unit length=35.2 W\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 12.12;pg no: 492" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 12.12, Page:492 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\n", + "heat transfer through concentric sphere,Q in KJ/hr \n", + "Q= -6297.1\n", + "so heat exchange=6297.1 KJ/hr\n" + ] + } + ], + "source": [ + "#cal of heat exchange\n", + "#intiation of all variables\n", + "# Chapter 12\n", + "import math\n", + "print\"Example 12.12, Page:492 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\")\n", + "T1=(-150+273);#temperature of air inside in K\n", + "T2=(35+273);#temperature of outer surface in K\n", + "epsilon1=0.03;#emissivity\n", + "epsilon2=epsilon1;\n", + "D1=25*10**-2;#diameter of inner sphere in m\n", + "D2=30*10**-2;#diameter of outer sphere in m\n", + "sigma=2.04*10**-4;#stephen boltzmann constant in KJ/m^2 hr K^4\n", + "print(\"heat transfer through concentric sphere,Q in KJ/hr \")\n", + "A1=4*math.pi*D1**2/4;\n", + "A2=4*math.pi*D2**2/4;\n", + "Q=(A1*sigma*(T1**4-T2**4))/((1/epsilon1)+((A1/A2)*((1/epsilon2)-1)))\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"so heat exchange=6297.1 KJ/hr\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter13.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13.ipynb new file mode 100755 index 00000000..836097b9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13.ipynb @@ -0,0 +1,375 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13:One Dimensional Compressible Fluid Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.1;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.1, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\n", + "mass flow rate(m)=rho*A*C\n", + "so rho*C=4*m/(%pi*d^2)\n", + "so rho=165.79/C\n", + "now using perfect gas equation,p=rho*R*T\n", + "T=P/(rho*R)=P/((165.79/C)*R)\n", + "C/T=165.79*R/P\n", + "so C=1.19*T\n", + "we know,C^2=((2*y*R)/(y-1))*(To-T)\n", + "C^2=(2*1.4*287)*(300-T)/(1.4-1)\n", + "C^2=602.7*10^3-2009*T\n", + "C^2+1688.23*C-602.7*10^3=0\n", + "solving we get,C=302.72 m/s and T=254.39 K\n", + "using stagnation property relation,\n", + "To/T=1+(y-1)*M^2/2\n", + "so M= 0.947\n", + "stagnation pressure,Po in bar= 0.472\n", + "so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\n" + ] + } + ], + "source": [ + "#cal of mach number,stagnation pressure,velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.1, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\")\n", + "To=(27+273);#stagnation temperature in K\n", + "P=0.4*10**5;#static pressure in pa\n", + "m=3000/3600;#air flowing rate in kg/s\n", + "d=80*10**-3;#diameter of duct in m\n", + "R=287;#gas constant in J/kg K\n", + "y=1.4;#expansion constant\n", + "print(\"mass flow rate(m)=rho*A*C\")\n", + "print(\"so rho*C=4*m/(%pi*d^2)\")\n", + "4*m/(math.pi*d**2)\n", + "print(\"so rho=165.79/C\")\n", + "print(\"now using perfect gas equation,p=rho*R*T\")\n", + "print(\"T=P/(rho*R)=P/((165.79/C)*R)\")\n", + "print(\"C/T=165.79*R/P\")\n", + "165.79*R/P\n", + "print(\"so C=1.19*T\")\n", + "print(\"we know,C^2=((2*y*R)/(y-1))*(To-T)\")\n", + "print(\"C^2=(2*1.4*287)*(300-T)/(1.4-1)\")\n", + "print(\"C^2=602.7*10^3-2009*T\")\n", + "print(\"C^2+1688.23*C-602.7*10^3=0\")\n", + "print(\"solving we get,C=302.72 m/s and T=254.39 K\")\n", + "C=302.72;\n", + "T=254.39;\n", + "print(\"using stagnation property relation,\")\n", + "print(\"To/T=1+(y-1)*M^2/2\")\n", + "M=math.sqrt(((To/T)-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "M=0.947;#approx.\n", + "Po=P*(1+(y-1)*M**2/2)/10**5\n", + "print(\"stagnation pressure,Po in bar=\"),round(Po,3)\n", + "print(\"so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.2;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.2, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\n", + "mach number,M_a=(1/sin(a))=sqrt(2)\n", + "here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\n", + "T=To*0.6717 in K\n", + "and C_max=M*sqrt(y*R*T) in m/s\n", + "corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\n", + "so T=0.7145*To in K\n", + "and C_av=M_a*sqrt(y*R*T) in m/s\n", + "ratio of kinetic energy= 0.869\n", + "so ratio of kinetic energy=0.869\n" + ] + } + ], + "source": [ + "#cal of ratio of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.2, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\")\n", + "To=(273.+1100.);#stagnation temperature in K\n", + "a=45.;#mach angle over exit cross-section in degree\n", + "Po=1.01;#pressure at upstream side of nozzle in bar\n", + "P=0.25;#ststic pressure in bar\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "print(\"mach number,M_a=(1/sin(a))=sqrt(2)\")\n", + "M_a=math.sqrt(2)\n", + "M_a=1.414;#approx.\n", + "print(\"here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\")\n", + "M=1.564;\n", + "print(\"T=To*0.6717 in K\")\n", + "T=To*0.6717\n", + "print(\"and C_max=M*sqrt(y*R*T) in m/s\")\n", + "C_max=M*math.sqrt(y*R*T)\n", + "print(\"corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\")\n", + "print(\"so T=0.7145*To in K\")\n", + "T=0.7145*To\n", + "print(\"and C_av=M_a*sqrt(y*R*T) in m/s\")\n", + "C_av=M_a*math.sqrt(y*R*T)\n", + "print(\"ratio of kinetic energy=\"),round(((1./2.)*C_av**2)/((1./2.)*C_max**2),3)\n", + "print(\"so ratio of kinetic energy=0.869\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.3;pg no: 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.3, Page:526 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\n", + "From bernoulli equation,Po-P=(1/2)*rho*C^2\n", + "so Po=P+(1/2)*rho*C^2 in N/m^2\n", + "speed indicator reading shall be given by mach no.s\n", + "mach no.,M=C/a=C/sqrt(y*R*T)\n", + "using perfect gas equation,P=rho*R*T\n", + "so T=P/(rho*R)in K\n", + "so mach no.,M 0.95\n", + "considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\n", + "also Po-P=(1+k)*(1/2)*rho*C^2\n", + "substitution yields,k= 0.2437\n", + "so compressibility correction factor,k=0.2437\n" + ] + } + ], + "source": [ + "#cal of mach no,compressibility correction factor\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.3, Page:526 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\")\n", + "C=300.;#aircraft flying speed in m/s\n", + "P=0.472*10**5;#altitude pressure in Pa\n", + "rho=0.659;#density in kg/m^3\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"From bernoulli equation,Po-P=(1/2)*rho*C^2\")\n", + "print(\"so Po=P+(1/2)*rho*C^2 in N/m^2\")\n", + "Po=P+(1/2)*rho*C**2\n", + "print(\"speed indicator reading shall be given by mach no.s\")\n", + "print(\"mach no.,M=C/a=C/sqrt(y*R*T)\")\n", + "print(\"using perfect gas equation,P=rho*R*T\")\n", + "print(\"so T=P/(rho*R)in K\")\n", + "T=P/(rho*R)\n", + "M=C/math.sqrt(y*R*T)\n", + "print(\"so mach no.,M\"),round(M,2)\n", + "M=0.947;#approx.\n", + "print(\"considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\")\n", + "Po=P*((1+(y-1)*M**2/2)**(y/(y-1)))\n", + "print(\"also Po-P=(1+k)*(1/2)*rho*C^2\")\n", + "k=((Po-P)/((1./2.)*rho*C**2))-1.\n", + "print(\"substitution yields,k=\"),round(k,4)\n", + "print(\"so compressibility correction factor,k=0.2437\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.4;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.4, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\n", + "we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\n", + "so M= 1.897\n", + "so mach number,M=1.89\n" + ] + } + ], + "source": [ + "#cal of mach number\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.4, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\")\n", + "Po=2;#total pressure in bar\n", + "P=0.3;#static pressure in bar\n", + "y=1.4;#expansion constant\n", + "print(\"we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "print(\"so mach number,M=1.89\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.5;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.5, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\n", + "actual static pressure(P)=1+0.3 in bar\n", + "It is also given that,Po-P=0.6,\n", + "so Po=P+0.6 in bar\n", + "air velocity,ao=sqrt(y*R*To)in m/s\n", + "density of air,rho_o=Po/(R*To)in \n", + "considering air to be in-compressible,\n", + "Po=P+rho_o*C^2/2\n", + "so C in m/s= 235.13\n", + "for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "compressibility correction factor,k\n", + "k=(M^2/4)+((2-y)/24)*M^4\n", + "stagnation temperature,To/T=1+((y-1)/2)*M^2\n", + "so T=To/(1+((y-1)/2)*M^2) in K\n", + "density,rho=P/(R*T) in kg/m^3\n", + "substituting Po-P=(1/2)*rho*C^2(1+k)\n", + "C in m/s= 250.94\n", + "so C=250.95 m/s\n" + ] + } + ], + "source": [ + "#cal of air stream velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.5, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\")\n", + "To=305.;#stagnation temperature of air stream in K\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"actual static pressure(P)=1+0.3 in bar\")\n", + "P=1.+0.3\n", + "print(\"It is also given that,Po-P=0.6,\")\n", + "print(\"so Po=P+0.6 in bar\")\n", + "Po=P+0.6\n", + "print(\"air velocity,ao=sqrt(y*R*To)in m/s\")\n", + "ao=math.sqrt(y*R*To)\n", + "print(\"density of air,rho_o=Po/(R*To)in \")\n", + "rho_o=Po*10.**5/(R*To)\n", + "print(\"considering air to be in-compressible,\")\n", + "print(\"Po=P+rho_o*C^2/2\")\n", + "C=math.sqrt((Po-P)*10.**5*2./rho_o)\n", + "print(\"so C in m/s=\"),round(C,2)\n", + "print(\"for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "M=0.7567;#approx.\n", + "print(\"compressibility correction factor,k\")\n", + "print(\"k=(M^2/4)+((2-y)/24)*M^4\")\n", + "k=(M**2/4.)+((2.-y)/24.)*M**4\n", + "print(\"stagnation temperature,To/T=1+((y-1)/2)*M^2\")\n", + "print(\"so T=To/(1+((y-1)/2)*M^2) in K\")\n", + "T=To/(1+((y-1)/2)*M**2)\n", + "print(\"density,rho=P/(R*T) in kg/m^3\")\n", + "rho=P*10**5/(R*T)\n", + "print(\"substituting Po-P=(1/2)*rho*C^2(1+k)\")\n", + "C=math.sqrt((Po-P)*10.**5/((1./2.)*rho*(1.+k)))\n", + "print(\"C in m/s=\"),round(C,2)\n", + "print(\"so C=250.95 m/s\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb new file mode 100644 index 00000000..836097b9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_1.ipynb @@ -0,0 +1,375 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13:One Dimensional Compressible Fluid Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.1;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.1, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\n", + "mass flow rate(m)=rho*A*C\n", + "so rho*C=4*m/(%pi*d^2)\n", + "so rho=165.79/C\n", + "now using perfect gas equation,p=rho*R*T\n", + "T=P/(rho*R)=P/((165.79/C)*R)\n", + "C/T=165.79*R/P\n", + "so C=1.19*T\n", + "we know,C^2=((2*y*R)/(y-1))*(To-T)\n", + "C^2=(2*1.4*287)*(300-T)/(1.4-1)\n", + "C^2=602.7*10^3-2009*T\n", + "C^2+1688.23*C-602.7*10^3=0\n", + "solving we get,C=302.72 m/s and T=254.39 K\n", + "using stagnation property relation,\n", + "To/T=1+(y-1)*M^2/2\n", + "so M= 0.947\n", + "stagnation pressure,Po in bar= 0.472\n", + "so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\n" + ] + } + ], + "source": [ + "#cal of mach number,stagnation pressure,velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.1, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\")\n", + "To=(27+273);#stagnation temperature in K\n", + "P=0.4*10**5;#static pressure in pa\n", + "m=3000/3600;#air flowing rate in kg/s\n", + "d=80*10**-3;#diameter of duct in m\n", + "R=287;#gas constant in J/kg K\n", + "y=1.4;#expansion constant\n", + "print(\"mass flow rate(m)=rho*A*C\")\n", + "print(\"so rho*C=4*m/(%pi*d^2)\")\n", + "4*m/(math.pi*d**2)\n", + "print(\"so rho=165.79/C\")\n", + "print(\"now using perfect gas equation,p=rho*R*T\")\n", + "print(\"T=P/(rho*R)=P/((165.79/C)*R)\")\n", + "print(\"C/T=165.79*R/P\")\n", + "165.79*R/P\n", + "print(\"so C=1.19*T\")\n", + "print(\"we know,C^2=((2*y*R)/(y-1))*(To-T)\")\n", + "print(\"C^2=(2*1.4*287)*(300-T)/(1.4-1)\")\n", + "print(\"C^2=602.7*10^3-2009*T\")\n", + "print(\"C^2+1688.23*C-602.7*10^3=0\")\n", + "print(\"solving we get,C=302.72 m/s and T=254.39 K\")\n", + "C=302.72;\n", + "T=254.39;\n", + "print(\"using stagnation property relation,\")\n", + "print(\"To/T=1+(y-1)*M^2/2\")\n", + "M=math.sqrt(((To/T)-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "M=0.947;#approx.\n", + "Po=P*(1+(y-1)*M**2/2)/10**5\n", + "print(\"stagnation pressure,Po in bar=\"),round(Po,3)\n", + "print(\"so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.2;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.2, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\n", + "mach number,M_a=(1/sin(a))=sqrt(2)\n", + "here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\n", + "T=To*0.6717 in K\n", + "and C_max=M*sqrt(y*R*T) in m/s\n", + "corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\n", + "so T=0.7145*To in K\n", + "and C_av=M_a*sqrt(y*R*T) in m/s\n", + "ratio of kinetic energy= 0.869\n", + "so ratio of kinetic energy=0.869\n" + ] + } + ], + "source": [ + "#cal of ratio of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.2, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\")\n", + "To=(273.+1100.);#stagnation temperature in K\n", + "a=45.;#mach angle over exit cross-section in degree\n", + "Po=1.01;#pressure at upstream side of nozzle in bar\n", + "P=0.25;#ststic pressure in bar\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "print(\"mach number,M_a=(1/sin(a))=sqrt(2)\")\n", + "M_a=math.sqrt(2)\n", + "M_a=1.414;#approx.\n", + "print(\"here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\")\n", + "M=1.564;\n", + "print(\"T=To*0.6717 in K\")\n", + "T=To*0.6717\n", + "print(\"and C_max=M*sqrt(y*R*T) in m/s\")\n", + "C_max=M*math.sqrt(y*R*T)\n", + "print(\"corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\")\n", + "print(\"so T=0.7145*To in K\")\n", + "T=0.7145*To\n", + "print(\"and C_av=M_a*sqrt(y*R*T) in m/s\")\n", + "C_av=M_a*math.sqrt(y*R*T)\n", + "print(\"ratio of kinetic energy=\"),round(((1./2.)*C_av**2)/((1./2.)*C_max**2),3)\n", + "print(\"so ratio of kinetic energy=0.869\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.3;pg no: 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.3, Page:526 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\n", + "From bernoulli equation,Po-P=(1/2)*rho*C^2\n", + "so Po=P+(1/2)*rho*C^2 in N/m^2\n", + "speed indicator reading shall be given by mach no.s\n", + "mach no.,M=C/a=C/sqrt(y*R*T)\n", + "using perfect gas equation,P=rho*R*T\n", + "so T=P/(rho*R)in K\n", + "so mach no.,M 0.95\n", + "considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\n", + "also Po-P=(1+k)*(1/2)*rho*C^2\n", + "substitution yields,k= 0.2437\n", + "so compressibility correction factor,k=0.2437\n" + ] + } + ], + "source": [ + "#cal of mach no,compressibility correction factor\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.3, Page:526 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\")\n", + "C=300.;#aircraft flying speed in m/s\n", + "P=0.472*10**5;#altitude pressure in Pa\n", + "rho=0.659;#density in kg/m^3\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"From bernoulli equation,Po-P=(1/2)*rho*C^2\")\n", + "print(\"so Po=P+(1/2)*rho*C^2 in N/m^2\")\n", + "Po=P+(1/2)*rho*C**2\n", + "print(\"speed indicator reading shall be given by mach no.s\")\n", + "print(\"mach no.,M=C/a=C/sqrt(y*R*T)\")\n", + "print(\"using perfect gas equation,P=rho*R*T\")\n", + "print(\"so T=P/(rho*R)in K\")\n", + "T=P/(rho*R)\n", + "M=C/math.sqrt(y*R*T)\n", + "print(\"so mach no.,M\"),round(M,2)\n", + "M=0.947;#approx.\n", + "print(\"considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\")\n", + "Po=P*((1+(y-1)*M**2/2)**(y/(y-1)))\n", + "print(\"also Po-P=(1+k)*(1/2)*rho*C^2\")\n", + "k=((Po-P)/((1./2.)*rho*C**2))-1.\n", + "print(\"substitution yields,k=\"),round(k,4)\n", + "print(\"so compressibility correction factor,k=0.2437\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.4;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.4, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\n", + "we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\n", + "so M= 1.897\n", + "so mach number,M=1.89\n" + ] + } + ], + "source": [ + "#cal of mach number\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.4, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\")\n", + "Po=2;#total pressure in bar\n", + "P=0.3;#static pressure in bar\n", + "y=1.4;#expansion constant\n", + "print(\"we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "print(\"so mach number,M=1.89\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.5;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.5, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\n", + "actual static pressure(P)=1+0.3 in bar\n", + "It is also given that,Po-P=0.6,\n", + "so Po=P+0.6 in bar\n", + "air velocity,ao=sqrt(y*R*To)in m/s\n", + "density of air,rho_o=Po/(R*To)in \n", + "considering air to be in-compressible,\n", + "Po=P+rho_o*C^2/2\n", + "so C in m/s= 235.13\n", + "for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "compressibility correction factor,k\n", + "k=(M^2/4)+((2-y)/24)*M^4\n", + "stagnation temperature,To/T=1+((y-1)/2)*M^2\n", + "so T=To/(1+((y-1)/2)*M^2) in K\n", + "density,rho=P/(R*T) in kg/m^3\n", + "substituting Po-P=(1/2)*rho*C^2(1+k)\n", + "C in m/s= 250.94\n", + "so C=250.95 m/s\n" + ] + } + ], + "source": [ + "#cal of air stream velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.5, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\")\n", + "To=305.;#stagnation temperature of air stream in K\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"actual static pressure(P)=1+0.3 in bar\")\n", + "P=1.+0.3\n", + "print(\"It is also given that,Po-P=0.6,\")\n", + "print(\"so Po=P+0.6 in bar\")\n", + "Po=P+0.6\n", + "print(\"air velocity,ao=sqrt(y*R*To)in m/s\")\n", + "ao=math.sqrt(y*R*To)\n", + "print(\"density of air,rho_o=Po/(R*To)in \")\n", + "rho_o=Po*10.**5/(R*To)\n", + "print(\"considering air to be in-compressible,\")\n", + "print(\"Po=P+rho_o*C^2/2\")\n", + "C=math.sqrt((Po-P)*10.**5*2./rho_o)\n", + "print(\"so C in m/s=\"),round(C,2)\n", + "print(\"for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "M=0.7567;#approx.\n", + "print(\"compressibility correction factor,k\")\n", + "print(\"k=(M^2/4)+((2-y)/24)*M^4\")\n", + "k=(M**2/4.)+((2.-y)/24.)*M**4\n", + "print(\"stagnation temperature,To/T=1+((y-1)/2)*M^2\")\n", + "print(\"so T=To/(1+((y-1)/2)*M^2) in K\")\n", + "T=To/(1+((y-1)/2)*M**2)\n", + "print(\"density,rho=P/(R*T) in kg/m^3\")\n", + "rho=P*10**5/(R*T)\n", + "print(\"substituting Po-P=(1/2)*rho*C^2(1+k)\")\n", + "C=math.sqrt((Po-P)*10.**5/((1./2.)*rho*(1.+k)))\n", + "print(\"C in m/s=\"),round(C,2)\n", + "print(\"so C=250.95 m/s\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb new file mode 100644 index 00000000..836097b9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_2.ipynb @@ -0,0 +1,375 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13:One Dimensional Compressible Fluid Flow" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.1;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.1, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\n", + "mass flow rate(m)=rho*A*C\n", + "so rho*C=4*m/(%pi*d^2)\n", + "so rho=165.79/C\n", + "now using perfect gas equation,p=rho*R*T\n", + "T=P/(rho*R)=P/((165.79/C)*R)\n", + "C/T=165.79*R/P\n", + "so C=1.19*T\n", + "we know,C^2=((2*y*R)/(y-1))*(To-T)\n", + "C^2=(2*1.4*287)*(300-T)/(1.4-1)\n", + "C^2=602.7*10^3-2009*T\n", + "C^2+1688.23*C-602.7*10^3=0\n", + "solving we get,C=302.72 m/s and T=254.39 K\n", + "using stagnation property relation,\n", + "To/T=1+(y-1)*M^2/2\n", + "so M= 0.947\n", + "stagnation pressure,Po in bar= 0.472\n", + "so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\n" + ] + } + ], + "source": [ + "#cal of mach number,stagnation pressure,velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.1, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\")\n", + "To=(27+273);#stagnation temperature in K\n", + "P=0.4*10**5;#static pressure in pa\n", + "m=3000/3600;#air flowing rate in kg/s\n", + "d=80*10**-3;#diameter of duct in m\n", + "R=287;#gas constant in J/kg K\n", + "y=1.4;#expansion constant\n", + "print(\"mass flow rate(m)=rho*A*C\")\n", + "print(\"so rho*C=4*m/(%pi*d^2)\")\n", + "4*m/(math.pi*d**2)\n", + "print(\"so rho=165.79/C\")\n", + "print(\"now using perfect gas equation,p=rho*R*T\")\n", + "print(\"T=P/(rho*R)=P/((165.79/C)*R)\")\n", + "print(\"C/T=165.79*R/P\")\n", + "165.79*R/P\n", + "print(\"so C=1.19*T\")\n", + "print(\"we know,C^2=((2*y*R)/(y-1))*(To-T)\")\n", + "print(\"C^2=(2*1.4*287)*(300-T)/(1.4-1)\")\n", + "print(\"C^2=602.7*10^3-2009*T\")\n", + "print(\"C^2+1688.23*C-602.7*10^3=0\")\n", + "print(\"solving we get,C=302.72 m/s and T=254.39 K\")\n", + "C=302.72;\n", + "T=254.39;\n", + "print(\"using stagnation property relation,\")\n", + "print(\"To/T=1+(y-1)*M^2/2\")\n", + "M=math.sqrt(((To/T)-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "M=0.947;#approx.\n", + "Po=P*(1+(y-1)*M**2/2)/10**5\n", + "print(\"stagnation pressure,Po in bar=\"),round(Po,3)\n", + "print(\"so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.2;pg no: 525" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.2, Page:525 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\n", + "mach number,M_a=(1/sin(a))=sqrt(2)\n", + "here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\n", + "T=To*0.6717 in K\n", + "and C_max=M*sqrt(y*R*T) in m/s\n", + "corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\n", + "so T=0.7145*To in K\n", + "and C_av=M_a*sqrt(y*R*T) in m/s\n", + "ratio of kinetic energy= 0.869\n", + "so ratio of kinetic energy=0.869\n" + ] + } + ], + "source": [ + "#cal of ratio of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.2, Page:525 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\")\n", + "To=(273.+1100.);#stagnation temperature in K\n", + "a=45.;#mach angle over exit cross-section in degree\n", + "Po=1.01;#pressure at upstream side of nozzle in bar\n", + "P=0.25;#ststic pressure in bar\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "print(\"mach number,M_a=(1/sin(a))=sqrt(2)\")\n", + "M_a=math.sqrt(2)\n", + "M_a=1.414;#approx.\n", + "print(\"here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\")\n", + "M=1.564;\n", + "print(\"T=To*0.6717 in K\")\n", + "T=To*0.6717\n", + "print(\"and C_max=M*sqrt(y*R*T) in m/s\")\n", + "C_max=M*math.sqrt(y*R*T)\n", + "print(\"corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\")\n", + "print(\"so T=0.7145*To in K\")\n", + "T=0.7145*To\n", + "print(\"and C_av=M_a*sqrt(y*R*T) in m/s\")\n", + "C_av=M_a*math.sqrt(y*R*T)\n", + "print(\"ratio of kinetic energy=\"),round(((1./2.)*C_av**2)/((1./2.)*C_max**2),3)\n", + "print(\"so ratio of kinetic energy=0.869\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.3;pg no: 526" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.3, Page:526 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\n", + "From bernoulli equation,Po-P=(1/2)*rho*C^2\n", + "so Po=P+(1/2)*rho*C^2 in N/m^2\n", + "speed indicator reading shall be given by mach no.s\n", + "mach no.,M=C/a=C/sqrt(y*R*T)\n", + "using perfect gas equation,P=rho*R*T\n", + "so T=P/(rho*R)in K\n", + "so mach no.,M 0.95\n", + "considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\n", + "also Po-P=(1+k)*(1/2)*rho*C^2\n", + "substitution yields,k= 0.2437\n", + "so compressibility correction factor,k=0.2437\n" + ] + } + ], + "source": [ + "#cal of mach no,compressibility correction factor\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.3, Page:526 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\")\n", + "C=300.;#aircraft flying speed in m/s\n", + "P=0.472*10**5;#altitude pressure in Pa\n", + "rho=0.659;#density in kg/m^3\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"From bernoulli equation,Po-P=(1/2)*rho*C^2\")\n", + "print(\"so Po=P+(1/2)*rho*C^2 in N/m^2\")\n", + "Po=P+(1/2)*rho*C**2\n", + "print(\"speed indicator reading shall be given by mach no.s\")\n", + "print(\"mach no.,M=C/a=C/sqrt(y*R*T)\")\n", + "print(\"using perfect gas equation,P=rho*R*T\")\n", + "print(\"so T=P/(rho*R)in K\")\n", + "T=P/(rho*R)\n", + "M=C/math.sqrt(y*R*T)\n", + "print(\"so mach no.,M\"),round(M,2)\n", + "M=0.947;#approx.\n", + "print(\"considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\")\n", + "Po=P*((1+(y-1)*M**2/2)**(y/(y-1)))\n", + "print(\"also Po-P=(1+k)*(1/2)*rho*C^2\")\n", + "k=((Po-P)/((1./2.)*rho*C**2))-1.\n", + "print(\"substitution yields,k=\"),round(k,4)\n", + "print(\"so compressibility correction factor,k=0.2437\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.4;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.4, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\n", + "we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\n", + "so M= 1.897\n", + "so mach number,M=1.89\n" + ] + } + ], + "source": [ + "#cal of mach number\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.4, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\")\n", + "Po=2;#total pressure in bar\n", + "P=0.3;#static pressure in bar\n", + "y=1.4;#expansion constant\n", + "print(\"we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "print(\"so M=\"),round(M,3)\n", + "print(\"so mach number,M=1.89\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 13.5;pg no: 527" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 13.5, Page:527 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\n", + "actual static pressure(P)=1+0.3 in bar\n", + "It is also given that,Po-P=0.6,\n", + "so Po=P+0.6 in bar\n", + "air velocity,ao=sqrt(y*R*To)in m/s\n", + "density of air,rho_o=Po/(R*To)in \n", + "considering air to be in-compressible,\n", + "Po=P+rho_o*C^2/2\n", + "so C in m/s= 235.13\n", + "for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n", + "so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "compressibility correction factor,k\n", + "k=(M^2/4)+((2-y)/24)*M^4\n", + "stagnation temperature,To/T=1+((y-1)/2)*M^2\n", + "so T=To/(1+((y-1)/2)*M^2) in K\n", + "density,rho=P/(R*T) in kg/m^3\n", + "substituting Po-P=(1/2)*rho*C^2(1+k)\n", + "C in m/s= 250.94\n", + "so C=250.95 m/s\n" + ] + } + ], + "source": [ + "#cal of air stream velocity\n", + "#intiation of all variables\n", + "# Chapter 13\n", + "import math\n", + "print\"Example 13.5, Page:527 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\")\n", + "To=305.;#stagnation temperature of air stream in K\n", + "y=1.4;#expansion constant\n", + "R=287.;#gas constant in J/kg K\n", + "print(\"actual static pressure(P)=1+0.3 in bar\")\n", + "P=1.+0.3\n", + "print(\"It is also given that,Po-P=0.6,\")\n", + "print(\"so Po=P+0.6 in bar\")\n", + "Po=P+0.6\n", + "print(\"air velocity,ao=sqrt(y*R*To)in m/s\")\n", + "ao=math.sqrt(y*R*To)\n", + "print(\"density of air,rho_o=Po/(R*To)in \")\n", + "rho_o=Po*10.**5/(R*To)\n", + "print(\"considering air to be in-compressible,\")\n", + "print(\"Po=P+rho_o*C^2/2\")\n", + "C=math.sqrt((Po-P)*10.**5*2./rho_o)\n", + "print(\"so C in m/s=\"),round(C,2)\n", + "print(\"for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n", + "print(\"so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\")\n", + "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", + "M=0.7567;#approx.\n", + "print(\"compressibility correction factor,k\")\n", + "print(\"k=(M^2/4)+((2-y)/24)*M^4\")\n", + "k=(M**2/4.)+((2.-y)/24.)*M**4\n", + "print(\"stagnation temperature,To/T=1+((y-1)/2)*M^2\")\n", + "print(\"so T=To/(1+((y-1)/2)*M^2) in K\")\n", + "T=To/(1+((y-1)/2)*M**2)\n", + "print(\"density,rho=P/(R*T) in kg/m^3\")\n", + "rho=P*10**5/(R*T)\n", + "print(\"substituting Po-P=(1/2)*rho*C^2(1+k)\")\n", + "C=math.sqrt((Po-P)*10.**5/((1./2.)*rho*(1.+k)))\n", + "print(\"C in m/s=\"),round(C,2)\n", + "print(\"so C=250.95 m/s\")" + ] + } + ], + "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/_Engineering_Thermodynamics_by__O._Singh/chapter2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2.ipynb new file mode 100755 index 00000000..6d7e9bc4 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 2:Zeroth Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.1;pg no:46" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\n", + "degree celcius and farenheit are related as follows\n", + "Tc=(Tf-32)/1.8\n", + "so temperature of body in degree celcius 37.0\n" + ] + } + ], + "source": [ + "#cal of temperature of body of human\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\")\n", + "Tf=98.6;#temperature of body in farenheit\n", + "Tc=(Tf-32)/1.8\n", + "print(\"degree celcius and farenheit are related as follows\")\n", + "print(\"Tc=(Tf-32)/1.8\")\n", + "print(\"so temperature of body in degree celcius\"),round(Tc,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.2;pg no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.2, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\n", + "using thermometric relation\n", + "t=a*log(p)+(b/2)\n", + "for ice point,b/a=\n", + "so b=2.1972*a\n", + "for steam point\n", + "a= 101.95\n", + "and b= 224.01\n", + "thus, t=in degree celcius\n", + "so for thermodynamic property of 6.5,t=302.83 degree celcius= 302.84\n" + ] + } + ], + "source": [ + "#cal of celcius temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.2, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\")\n", + "t1=0;#ice point temperature in degree celcius\n", + "p1=3;#thermometric property for ice point\n", + "t2=100;#steam point temperature in degree celcius\n", + "p2=8;#thermometric property for steam point\n", + "p3=6.5;#thermometric property for any temperature\n", + "print(\"using thermometric relation\")\n", + "print(\"t=a*log(p)+(b/2)\")\n", + "print(\"for ice point,b/a=\")\n", + "b=2*math.log(p1)\n", + "print(\"so b=2.1972*a\")\n", + "print(\"for steam point\")\n", + "a=t2/(math.log(p2)-(2.1972/2))\n", + "print(\"a=\"),round(a,2)\n", + "b=2.1972*a\n", + "print(\"and b=\"),round(b,2)\n", + "t=a*math.log(p3)+(b/2)\n", + "print(\"thus, t=in degree celcius\")\n", + "print(\"so for thermodynamic property of 6.5,t=302.83 degree celcius=\"),round(t,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.3;page no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.3, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\n", + "emf equation\n", + "E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\n", + "using emf equation at ice point,E_0 in volts\n", + "E_0= 0.0\n", + "using emf equation at steam point,E_100 in volts\n", + "E_100= 0.3\n", + "now emf at 30 degree celcius using emf equation(E_30)in volts\n", + "now the temperature(T) shown by this thermometer\n", + "T=in degree celcius 30.36\n", + "NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature shown by this thermometer\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.3, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\")\n", + "print(\"emf equation\")\n", + "print(\"E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\")\n", + "print(\"using emf equation at ice point,E_0 in volts\")\n", + "t=0.;#ice point temperature in degree celcius\n", + "E_0=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_0=\"),round(E_0,2)\n", + "print(\"using emf equation at steam point,E_100 in volts\")\n", + "t=100.;#steam point temperature in degree celcius\n", + "E_100=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_100=\"),round(E_100,2)\n", + "print(\"now emf at 30 degree celcius using emf equation(E_30)in volts\")\n", + "t=30.;#temperature of substance in degree celcius\n", + "E_30=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "T_100=100.;#steam point temperature in degree celcius\n", + "T_0=0.;#ice point temperature in degree celcius\n", + "T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0)\n", + "print(\"now the temperature(T) shown by this thermometer\")\n", + "print(\"T=in degree celcius\"),round(T,2)\n", + "print(\"NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.4;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.4, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\n", + "emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\n", + "as ice point and steam points are two reference points,so\n", + "at ice point,emf(e1)in mV\n", + "at steam point,emf(e2)in mV\n", + "at gas temperature,emf(e3)in mV\n", + "since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV 60.16\n", + "temperature of gas using thermocouple=60.16 degree celcius\n", + "percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius 20.31\n" + ] + } + ], + "source": [ + "#cal of percentage variation in temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.4, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\")\n", + "t1=0;#temperature at ice point\n", + "t2=100;#temperature at steam point\n", + "t3=50;#temperature of gas\n", + "print(\"emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\")\n", + "print(\"as ice point and steam points are two reference points,so\")\n", + "print(\"at ice point,emf(e1)in mV\")\n", + "e1=0.18*t1-5.2*10**-4*t1**2\n", + "print(\"at steam point,emf(e2)in mV\")\n", + "e2=0.18*t2-5.2*10**-4*t2**2\n", + "print(\"at gas temperature,emf(e3)in mV\")\n", + "e3=0.18*t3-5.2*10**-4*t3**2\n", + "t=((t2-t1)/(e2-e1))*e3\n", + "variation=((t-t3)/t3)*100\n", + "print(\"since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV\"),round(t,2)\n", + "print(\"temperature of gas using thermocouple=60.16 degree celcius\")\n", + "print(\"percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius\"),round(variation,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.5;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.5, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\n", + "let the conversion relation be X=aC+b\n", + "where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \n", + "at freezing point,temperature=0 degree celcius,0 degree X\n", + "so by equation X=aC+b\n", + "we get b=0\n", + "at boiling point,temperature=100 degree celcius,1000 degree X\n", + "conversion relation\n", + "X=10*C\n", + "absolute zero temperature in degree celcius=-273.15\n", + "absolute zero temperature in degree X= -2731.5\n" + ] + } + ], + "source": [ + "#cal of absolute zero temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.5, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\")\n", + "print(\"let the conversion relation be X=aC+b\")\n", + "print(\"where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \")\n", + "print(\"at freezing point,temperature=0 degree celcius,0 degree X\")\n", + "print(\"so by equation X=aC+b\")\n", + "X=0;#temperature in degree X\n", + "C=0;#temperature in degree celcius\n", + "print(\"we get b=0\")\n", + "b=0;\n", + "print(\"at boiling point,temperature=100 degree celcius,1000 degree X\")\n", + "X=1000;#temperature in degree X\n", + "C=100;#temperature in degree celcius\n", + "a=(X-b)/C\n", + "print(\"conversion relation\")\n", + "print(\"X=10*C\")\n", + "print(\"absolute zero temperature in degree celcius=-273.15\")\n", + "X=10*-273.15\n", + "print(\"absolute zero temperature in degree X=\"),round(X,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb new file mode 100644 index 00000000..6d7e9bc4 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_1.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 2:Zeroth Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.1;pg no:46" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\n", + "degree celcius and farenheit are related as follows\n", + "Tc=(Tf-32)/1.8\n", + "so temperature of body in degree celcius 37.0\n" + ] + } + ], + "source": [ + "#cal of temperature of body of human\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\")\n", + "Tf=98.6;#temperature of body in farenheit\n", + "Tc=(Tf-32)/1.8\n", + "print(\"degree celcius and farenheit are related as follows\")\n", + "print(\"Tc=(Tf-32)/1.8\")\n", + "print(\"so temperature of body in degree celcius\"),round(Tc,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.2;pg no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.2, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\n", + "using thermometric relation\n", + "t=a*log(p)+(b/2)\n", + "for ice point,b/a=\n", + "so b=2.1972*a\n", + "for steam point\n", + "a= 101.95\n", + "and b= 224.01\n", + "thus, t=in degree celcius\n", + "so for thermodynamic property of 6.5,t=302.83 degree celcius= 302.84\n" + ] + } + ], + "source": [ + "#cal of celcius temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.2, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\")\n", + "t1=0;#ice point temperature in degree celcius\n", + "p1=3;#thermometric property for ice point\n", + "t2=100;#steam point temperature in degree celcius\n", + "p2=8;#thermometric property for steam point\n", + "p3=6.5;#thermometric property for any temperature\n", + "print(\"using thermometric relation\")\n", + "print(\"t=a*log(p)+(b/2)\")\n", + "print(\"for ice point,b/a=\")\n", + "b=2*math.log(p1)\n", + "print(\"so b=2.1972*a\")\n", + "print(\"for steam point\")\n", + "a=t2/(math.log(p2)-(2.1972/2))\n", + "print(\"a=\"),round(a,2)\n", + "b=2.1972*a\n", + "print(\"and b=\"),round(b,2)\n", + "t=a*math.log(p3)+(b/2)\n", + "print(\"thus, t=in degree celcius\")\n", + "print(\"so for thermodynamic property of 6.5,t=302.83 degree celcius=\"),round(t,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.3;page no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.3, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\n", + "emf equation\n", + "E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\n", + "using emf equation at ice point,E_0 in volts\n", + "E_0= 0.0\n", + "using emf equation at steam point,E_100 in volts\n", + "E_100= 0.3\n", + "now emf at 30 degree celcius using emf equation(E_30)in volts\n", + "now the temperature(T) shown by this thermometer\n", + "T=in degree celcius 30.36\n", + "NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature shown by this thermometer\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.3, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\")\n", + "print(\"emf equation\")\n", + "print(\"E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\")\n", + "print(\"using emf equation at ice point,E_0 in volts\")\n", + "t=0.;#ice point temperature in degree celcius\n", + "E_0=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_0=\"),round(E_0,2)\n", + "print(\"using emf equation at steam point,E_100 in volts\")\n", + "t=100.;#steam point temperature in degree celcius\n", + "E_100=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_100=\"),round(E_100,2)\n", + "print(\"now emf at 30 degree celcius using emf equation(E_30)in volts\")\n", + "t=30.;#temperature of substance in degree celcius\n", + "E_30=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "T_100=100.;#steam point temperature in degree celcius\n", + "T_0=0.;#ice point temperature in degree celcius\n", + "T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0)\n", + "print(\"now the temperature(T) shown by this thermometer\")\n", + "print(\"T=in degree celcius\"),round(T,2)\n", + "print(\"NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.4;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.4, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\n", + "emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\n", + "as ice point and steam points are two reference points,so\n", + "at ice point,emf(e1)in mV\n", + "at steam point,emf(e2)in mV\n", + "at gas temperature,emf(e3)in mV\n", + "since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV 60.16\n", + "temperature of gas using thermocouple=60.16 degree celcius\n", + "percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius 20.31\n" + ] + } + ], + "source": [ + "#cal of percentage variation in temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.4, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\")\n", + "t1=0;#temperature at ice point\n", + "t2=100;#temperature at steam point\n", + "t3=50;#temperature of gas\n", + "print(\"emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\")\n", + "print(\"as ice point and steam points are two reference points,so\")\n", + "print(\"at ice point,emf(e1)in mV\")\n", + "e1=0.18*t1-5.2*10**-4*t1**2\n", + "print(\"at steam point,emf(e2)in mV\")\n", + "e2=0.18*t2-5.2*10**-4*t2**2\n", + "print(\"at gas temperature,emf(e3)in mV\")\n", + "e3=0.18*t3-5.2*10**-4*t3**2\n", + "t=((t2-t1)/(e2-e1))*e3\n", + "variation=((t-t3)/t3)*100\n", + "print(\"since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV\"),round(t,2)\n", + "print(\"temperature of gas using thermocouple=60.16 degree celcius\")\n", + "print(\"percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius\"),round(variation,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.5;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.5, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\n", + "let the conversion relation be X=aC+b\n", + "where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \n", + "at freezing point,temperature=0 degree celcius,0 degree X\n", + "so by equation X=aC+b\n", + "we get b=0\n", + "at boiling point,temperature=100 degree celcius,1000 degree X\n", + "conversion relation\n", + "X=10*C\n", + "absolute zero temperature in degree celcius=-273.15\n", + "absolute zero temperature in degree X= -2731.5\n" + ] + } + ], + "source": [ + "#cal of absolute zero temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.5, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\")\n", + "print(\"let the conversion relation be X=aC+b\")\n", + "print(\"where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \")\n", + "print(\"at freezing point,temperature=0 degree celcius,0 degree X\")\n", + "print(\"so by equation X=aC+b\")\n", + "X=0;#temperature in degree X\n", + "C=0;#temperature in degree celcius\n", + "print(\"we get b=0\")\n", + "b=0;\n", + "print(\"at boiling point,temperature=100 degree celcius,1000 degree X\")\n", + "X=1000;#temperature in degree X\n", + "C=100;#temperature in degree celcius\n", + "a=(X-b)/C\n", + "print(\"conversion relation\")\n", + "print(\"X=10*C\")\n", + "print(\"absolute zero temperature in degree celcius=-273.15\")\n", + "X=10*-273.15\n", + "print(\"absolute zero temperature in degree X=\"),round(X,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb new file mode 100644 index 00000000..6d7e9bc4 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_2.ipynb @@ -0,0 +1,314 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 2:Zeroth Law of Thermodynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.1;pg no:46" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\n", + "degree celcius and farenheit are related as follows\n", + "Tc=(Tf-32)/1.8\n", + "so temperature of body in degree celcius 37.0\n" + ] + } + ], + "source": [ + "#cal of temperature of body of human\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\")\n", + "Tf=98.6;#temperature of body in farenheit\n", + "Tc=(Tf-32)/1.8\n", + "print(\"degree celcius and farenheit are related as follows\")\n", + "print(\"Tc=(Tf-32)/1.8\")\n", + "print(\"so temperature of body in degree celcius\"),round(Tc,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.2;pg no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.2, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\n", + "using thermometric relation\n", + "t=a*log(p)+(b/2)\n", + "for ice point,b/a=\n", + "so b=2.1972*a\n", + "for steam point\n", + "a= 101.95\n", + "and b= 224.01\n", + "thus, t=in degree celcius\n", + "so for thermodynamic property of 6.5,t=302.83 degree celcius= 302.84\n" + ] + } + ], + "source": [ + "#cal of celcius temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.2, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\")\n", + "t1=0;#ice point temperature in degree celcius\n", + "p1=3;#thermometric property for ice point\n", + "t2=100;#steam point temperature in degree celcius\n", + "p2=8;#thermometric property for steam point\n", + "p3=6.5;#thermometric property for any temperature\n", + "print(\"using thermometric relation\")\n", + "print(\"t=a*log(p)+(b/2)\")\n", + "print(\"for ice point,b/a=\")\n", + "b=2*math.log(p1)\n", + "print(\"so b=2.1972*a\")\n", + "print(\"for steam point\")\n", + "a=t2/(math.log(p2)-(2.1972/2))\n", + "print(\"a=\"),round(a,2)\n", + "b=2.1972*a\n", + "print(\"and b=\"),round(b,2)\n", + "t=a*math.log(p3)+(b/2)\n", + "print(\"thus, t=in degree celcius\")\n", + "print(\"so for thermodynamic property of 6.5,t=302.83 degree celcius=\"),round(t,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.3;page no:47" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.3, Page:47 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\n", + "emf equation\n", + "E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\n", + "using emf equation at ice point,E_0 in volts\n", + "E_0= 0.0\n", + "using emf equation at steam point,E_100 in volts\n", + "E_100= 0.3\n", + "now emf at 30 degree celcius using emf equation(E_30)in volts\n", + "now the temperature(T) shown by this thermometer\n", + "T=in degree celcius 30.36\n", + "NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of temperature shown by this thermometer\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.3, Page:47 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\")\n", + "print(\"emf equation\")\n", + "print(\"E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\")\n", + "print(\"using emf equation at ice point,E_0 in volts\")\n", + "t=0.;#ice point temperature in degree celcius\n", + "E_0=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_0=\"),round(E_0,2)\n", + "print(\"using emf equation at steam point,E_100 in volts\")\n", + "t=100.;#steam point temperature in degree celcius\n", + "E_100=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "print(\"E_100=\"),round(E_100,2)\n", + "print(\"now emf at 30 degree celcius using emf equation(E_30)in volts\")\n", + "t=30.;#temperature of substance in degree celcius\n", + "E_30=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n", + "T_100=100.;#steam point temperature in degree celcius\n", + "T_0=0.;#ice point temperature in degree celcius\n", + "T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0)\n", + "print(\"now the temperature(T) shown by this thermometer\")\n", + "print(\"T=in degree celcius\"),round(T,2)\n", + "print(\"NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.4;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.4, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\n", + "emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\n", + "as ice point and steam points are two reference points,so\n", + "at ice point,emf(e1)in mV\n", + "at steam point,emf(e2)in mV\n", + "at gas temperature,emf(e3)in mV\n", + "since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV 60.16\n", + "temperature of gas using thermocouple=60.16 degree celcius\n", + "percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius 20.31\n" + ] + } + ], + "source": [ + "#cal of percentage variation in temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "import math\n", + "print\"Example 2.4, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\")\n", + "t1=0;#temperature at ice point\n", + "t2=100;#temperature at steam point\n", + "t3=50;#temperature of gas\n", + "print(\"emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\")\n", + "print(\"as ice point and steam points are two reference points,so\")\n", + "print(\"at ice point,emf(e1)in mV\")\n", + "e1=0.18*t1-5.2*10**-4*t1**2\n", + "print(\"at steam point,emf(e2)in mV\")\n", + "e2=0.18*t2-5.2*10**-4*t2**2\n", + "print(\"at gas temperature,emf(e3)in mV\")\n", + "e3=0.18*t3-5.2*10**-4*t3**2\n", + "t=((t2-t1)/(e2-e1))*e3\n", + "variation=((t-t3)/t3)*100\n", + "print(\"since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV\"),round(t,2)\n", + "print(\"temperature of gas using thermocouple=60.16 degree celcius\")\n", + "print(\"percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius\"),round(variation,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 2.5;pg no:48" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 2.5, Page:48 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\n", + "let the conversion relation be X=aC+b\n", + "where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \n", + "at freezing point,temperature=0 degree celcius,0 degree X\n", + "so by equation X=aC+b\n", + "we get b=0\n", + "at boiling point,temperature=100 degree celcius,1000 degree X\n", + "conversion relation\n", + "X=10*C\n", + "absolute zero temperature in degree celcius=-273.15\n", + "absolute zero temperature in degree X= -2731.5\n" + ] + } + ], + "source": [ + "#cal of absolute zero temperature\n", + "#intiation of all variables\n", + "# Chapter 2\n", + "print\"Example 2.5, Page:48 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\")\n", + "print(\"let the conversion relation be X=aC+b\")\n", + "print(\"where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \")\n", + "print(\"at freezing point,temperature=0 degree celcius,0 degree X\")\n", + "print(\"so by equation X=aC+b\")\n", + "X=0;#temperature in degree X\n", + "C=0;#temperature in degree celcius\n", + "print(\"we get b=0\")\n", + "b=0;\n", + "print(\"at boiling point,temperature=100 degree celcius,1000 degree X\")\n", + "X=1000;#temperature in degree X\n", + "C=100;#temperature in degree celcius\n", + "a=(X-b)/C\n", + "print(\"conversion relation\")\n", + "print(\"X=10*C\")\n", + "print(\"absolute zero temperature in degree celcius=-273.15\")\n", + "X=10*-273.15\n", + "print(\"absolute zero temperature in degree X=\"),round(X,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3.ipynb new file mode 100755 index 00000000..22ed40c9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3.ipynb @@ -0,0 +1,1506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:First Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.1;pg no:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\n", + "a> work done on piston(W_piston)in KJ can be obtained as\n", + "W_piston=pdv\n", + "b> paddle work done on the system(W_paddle)=-4.88 KJ\n", + "net work done of system(W_net)in KJ\n", + "W_net=W_piston+W_paddle\n", + "so work done on system(W_net)=1.435 KJ\n" + ] + } + ], + "source": [ + "#cal of work done on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p=689.;#pressure of gas in cylinder in kpa\n", + "v1=0.04;#initial volume of fluid in m^3\n", + "v2=0.045;#final volume of fluid in m^3\n", + "W_paddle=-4.88;#paddle work done on the system in KJ\n", + "print(\"a> work done on piston(W_piston)in KJ can be obtained as\")\n", + "print(\"W_piston=pdv\")\n", + "#function y = f(v), y=p, endfunction\n", + "def fun1(x):\n", + "\ty=p\n", + "\treturn y\n", + "\n", + "W_piston=scipy.integrate.quad(fun1,v1,v2) \n", + "print(\"b> paddle work done on the system(W_paddle)=-4.88 KJ\")\n", + "print(\"net work done of system(W_net)in KJ\")\n", + "print(\"W_net=W_piston+W_paddle\")\n", + "print(\"so work done on system(W_net)=1.435 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.2;pg no:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.2, Page:76 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\n", + "as the vessel is rigid therefore work done shall be zero\n", + "W=0\n", + "from first law of thermodynamics,heat required(Q)in KJ\n", + "Q=U2-U1+W=Q=m(u2-u1)+W\n", + "so heat required = 5.6\n" + ] + } + ], + "source": [ + "#cal of heat required\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.2, Page:76 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\")\n", + "m=0.5;#mass of gas in kg\n", + "u1=26.6;#internal energy of gas at 200 degree celcius\n", + "u2=37.8;#internal energy of gas at 400 degree celcius\n", + "W=0;#work done by vessel in KJ\n", + "print(\"as the vessel is rigid therefore work done shall be zero\")\n", + "print(\"W=0\")\n", + "print(\"from first law of thermodynamics,heat required(Q)in KJ\")\n", + "print(\"Q=U2-U1+W=Q=m(u2-u1)+W\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat required =\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.3;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.3, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\n", + "by steady flow energy equation\n", + "q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\n", + "let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\n", + "q=h2-h1\n", + "rate of heat removal(Q)in KJ/hr\n", + "Q=m(h2-h1)=m*Cp*(T2-T1)\n", + "heat should be removed at the rate=KJ/hr 40500.0\n" + ] + } + ], + "source": [ + "#cal of \"heat should be removed\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.3, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\")\n", + "m=50;#rate at which carbon dioxide passing through heat exchanger in kg/hr\n", + "T2=800;#initial temperature of carbon dioxide in degree celcius\n", + "T1=50;#final temperature of carbon dioxide in degree celcius\n", + "Cp=1.08;#specific heat at constant pressure in KJ/kg K\n", + "print(\"by steady flow energy equation\")\n", + "print(\"q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\")\n", + "print(\"let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\")\n", + "print(\"q=h2-h1\")\n", + "print(\"rate of heat removal(Q)in KJ/hr\")\n", + "print(\"Q=m(h2-h1)=m*Cp*(T2-T1)\")\n", + "Q=m*Cp*(T2-T1)\n", + "print(\"heat should be removed at the rate=KJ/hr\"),round(Q)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.4;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "#cal of work done by surrounding on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.4, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 4\")\n", + "v=0.78;#volume of cylinder in m^3\n", + "p=101.325;#atmospheric pressure in kPa\n", + "print(\"total work done by the air at atmospheric pressure of 101.325 kPa\")\n", + "print(\"W=(pdv)cylinder+(pdv)air\")\n", + "print(\"0+p*(delta v)\")\n", + "print(\"work done by air(W)=-p*v in KJ\")\n", + "W=-p*v\n", + "print(\"so work done by surrounding on system=KJ\"),round(-W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.5:pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.5, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\n", + "given p*v^1.3=constant\n", + "assuming expansion to be quasi-static,the work may be given as\n", + "W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\n", + "from internal energy relation,change in specific internal energy\n", + "deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\n", + "total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\n", + "using p1*V1^1.3=p2*V2^1.3\n", + "V2=in m^3 0.85\n", + "take V2=.852 m^3\n", + "so deltaU in KJ\n", + "and W in KJ 246.67\n", + "from first law\n", + "deltaQ=KJ 113.47\n", + "heat interaction=113.5 KJ\n", + "work interaction=246.7 KJ\n", + "change in internal energy=-113.2 KJ\n" + ] + } + ], + "source": [ + "#cal of heat,work interaction and change in internal energy\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.5, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\")\n", + "m=5;#mass of gas in kg\n", + "p1=1*10**3;#initial pressure of gas in KPa\n", + "V1=0.5;#initial volume of gas in m^3\n", + "p2=0.5*10**3;#final pressure of gas in KPa\n", + "n=1.3;#expansion constant\n", + "print(\"given p*v^1.3=constant\")\n", + "print(\"assuming expansion to be quasi-static,the work may be given as\")\n", + "print(\"W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\")\n", + "print(\"from internal energy relation,change in specific internal energy\")\n", + "print(\"deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\")\n", + "print(\"total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\")\n", + "print(\"using p1*V1^1.3=p2*V2^1.3\")\n", + "V2=V1*(p1/p2)**(1/1.3)\n", + "print(\"V2=in m^3\"),round(V2,2)\n", + "print(\"take V2=.852 m^3\")\n", + "V2=0.852;#final volume of gas in m^3\n", + "print(\"so deltaU in KJ\")\n", + "deltaU=1.8*(p2*V2-p1*V1)\n", + "W=(p2*V2-p1*V1)/(1-n)\n", + "print(\"and W in KJ\"),round(W,2)\n", + "print(\"from first law\")\n", + "deltaQ=deltaU+W\n", + "print(\"deltaQ=KJ\"),round(deltaQ,2)\n", + "print(\"heat interaction=113.5 KJ\")\n", + "print(\"work interaction=246.7 KJ\")\n", + "print(\"change in internal energy=-113.2 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.6;pg no:78" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.6, Page:78 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\n", + "final state volume(v2)in m^3\n", + "v2= 0.0\n", + "take v2=0.03 m^3\n", + "now internal energy of gas is given by U=7.5*p*v-425\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\n", + "deltaU=7.5*10^3*(p2*v2-p1*v1) 75.0\n", + "for quasi-static process\n", + "work(W) in KJ,W=p*dv\n", + "W=(p2*v2-p1*v1)/(1-n)\n", + "from first law of thermodynamics,\n", + "heat interaction(deltaQ)=deltaU+W\n", + "heat=50 KJ\n", + "work=25 KJ(-ve)\n", + "internal energy change=75 KJ\n", + "if 180 KJ heat transfer takes place,then from 1st law,\n", + "deltaQ= 50.0\n", + "since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\n", + "W=KJ 105.0\n" + ] + } + ], + "source": [ + "#cal of heat,workinternal energy change\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.6, Page:78 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\")\n", + "p1=1;#initial pressure of gas in MPa\n", + "v1=0.05;#initial volume of gas in m^3\n", + "p2=2;#final pressure of gas in MPa\n", + "n=1.4;#expansion constant\n", + "print(\"final state volume(v2)in m^3\")\n", + "v2=((p1/p2)**(1/1.4))*v1\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"take v2=0.03 m^3\")\n", + "v2=0.03;#final volume of gas in m^3\n", + "print(\"now internal energy of gas is given by U=7.5*p*v-425\")\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "print(\"deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\")\n", + "deltaU=7.5*10**3*(p2*v2-p1*v1)\n", + "print(\"deltaU=7.5*10^3*(p2*v2-p1*v1)\"),round(deltaU,2)\n", + "print(\"for quasi-static process\")\n", + "print(\"work(W) in KJ,W=p*dv\")\n", + "W=((p2*v2-p1*v1)/(1-n))*10**3\n", + "print(\"W=(p2*v2-p1*v1)/(1-n)\")\n", + "print(\"from first law of thermodynamics,\")\n", + "print(\"heat interaction(deltaQ)=deltaU+W\")\n", + "deltaQ=deltaU+W\n", + "print(\"heat=50 KJ\")\n", + "print(\"work=25 KJ(-ve)\")\n", + "print(\"internal energy change=75 KJ\")\n", + "print(\"if 180 KJ heat transfer takes place,then from 1st law,\")\n", + "print(\"deltaQ=\"),round(deltaQ,2)\n", + "print(\"since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\")\n", + "W=180-75\n", + "print(\"W=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.7;pg no:79" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.7, Page:79 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\n", + "characteristics gas constant(R)in J/kg K\n", + "R= 519.64\n", + "take R=0.520,KJ/kg K\n", + "Cv=inKJ/kg K 1.18\n", + "y= 1.44\n", + "for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\n", + "now,T2=in K\n", + "work(W)in KJ/kg\n", + "W= -257.78\n", + "for polytropic process,heat(Q)in KJ/K\n", + "Q= 82.02\n" + ] + } + ], + "source": [ + "#cal of work and heat\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.7, Page:79 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\")\n", + "M=16;#molecular weight of gas\n", + "p1=101.3;#initial pressure of gas in KPa\n", + "p2=600;#final pressure of gas in KPa\n", + "T1=(273+20);#initial temperature of gas in K\n", + "R1=8.3143*10**3;#universal gas constant in J/kg K\n", + "Cp=1.7;#specific heat at constant pressure in KJ/kg K\n", + "n=1.3;#expansion constant\n", + "T2=((p2/p1)**(n-1/n))\n", + "print(\"characteristics gas constant(R)in J/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"take R=0.520,KJ/kg K\")\n", + "R=0.520;#characteristics gas constant in KJ/kg K\n", + "Cv=Cp-R\n", + "print(\"Cv=inKJ/kg K\"),round(Cv,2)\n", + "y=Cp/Cv\n", + "print(\"y=\"),round(y,2)\n", + "y=1.44;#ratio of specific heat at constant pressure to constant volume\n", + "print(\"for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"now,T2=in K\")\n", + "print(\"work(W)in KJ/kg\")\n", + "W=R*((T1-T2)/(n-1))\n", + "print(\"W=\"),round(W,2)\n", + "W=257.78034;#work done in KJ/kg\n", + "print(\"for polytropic process,heat(Q)in KJ/K\")\n", + "Q=((y-n)/(y-1))*W\n", + "print(\"Q=\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.8;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.8, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\n", + "applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\n", + "h1+C1^2/2=h2+C2^2/2\n", + "given that C1=0,negligible inlet velocity\n", + "so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\n", + "exit velocity(C2)in m/s 1098.2\n" + ] + } + ], + "source": [ + "#cal of exit velocity\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.8, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\")\n", + "T1=(627+273);#initial temperature of air in nozzle in K\n", + "T2=(27+273);#temperature at which air leaves nozzle in K\n", + "Cp=1.005*10**3;#specific heat at constant pressure in J/kg K\n", + "C2=math.sqrt(2*Cp*(T1-T2))\n", + "print(\"applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\")\n", + "print(\"h1+C1^2/2=h2+C2^2/2\")\n", + "print(\"given that C1=0,negligible inlet velocity\")\n", + "print(\"so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\")\n", + "print(\"exit velocity(C2)in m/s\"),round(C2,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.9;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.9, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\n", + "work interaction,W=-200 KJ/kg of air\n", + "increase in enthalpy of air=100 KJ/kg of air\n", + "total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\n", + "writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\n", + "h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\n", + "assuming no change in potential energy and kinetic energy\n", + "deltaK.E=deltaP.=0\n", + "total heat interaction(Q)in KJ/kg of air\n", + "Q= -100.0\n", + "Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\n", + "so heat transferred to atmosphere(Q2)in KJ/kg of air -10.0\n" + ] + } + ], + "source": [ + "#cal of heat transferred to atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.9, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\")\n", + "W=-200;#shaft work in KJ/kg of air\n", + "deltah=100;#increase in enthalpy in KJ/kg of air\n", + "Q1=-90;#heat transferred to water in KJ/kg of air\n", + "print(\"work interaction,W=-200 KJ/kg of air\")\n", + "print(\"increase in enthalpy of air=100 KJ/kg of air\")\n", + "print(\"total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\")\n", + "print(\"writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\")\n", + "print(\"h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\")\n", + "print(\"assuming no change in potential energy and kinetic energy\")\n", + "print(\"deltaK.E=deltaP.=0\")\n", + "print(\"total heat interaction(Q)in KJ/kg of air\")\n", + "Q=deltah+W\n", + "print(\"Q=\"),round(Q,2)\n", + "Q2=Q-Q1\n", + "print(\"Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\")\n", + "print(\"so heat transferred to atmosphere(Q2)in KJ/kg of air\"),round(Q2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.10;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.10, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\n", + "above problem can be solved using steady flow energy equations upon hot water flow\n", + "Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\n", + "here total heat to be supplied(Q)in kcal/hr\n", + "so heat lost by water(-ve),Q=-25000 kcal/hr\n", + "there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\n", + "Q+m*(h1+g*z1)=m*(h2+g*z2)\n", + "so water circulation rate(m)in kg/hr\n", + "so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\n", + "water circulation rate=(m)in kg/min 11.91\n" + ] + } + ], + "source": [ + "#cal of water circulation rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.10, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\")\n", + "n=500;#total number of persons\n", + "q=50;#heat requirement per person in kcal/hr\n", + "h1=80;#enthalpy of hot water enter in pipe in kcal/kg\n", + "h2=45;#enthalpy of hot water leaves the pipe in kcal/kg\n", + "g=9.81;#acceleartion due to gravity in m/s^2\n", + "deltaz=10;#difference in elevation of inlet and exit pipe in m\n", + "print(\"above problem can be solved using steady flow energy equations upon hot water flow\")\n", + "print(\"Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\")\n", + "print(\"here total heat to be supplied(Q)in kcal/hr\")\n", + "Q=n*q\n", + "print(\"so heat lost by water(-ve),Q=-25000 kcal/hr\")\n", + "Q=-25000#heat loss by water in kcal/hr\n", + "print(\"there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\")\n", + "print(\"Q+m*(h1+g*z1)=m*(h2+g*z2)\")\n", + "print(\"so water circulation rate(m)in kg/hr\")\n", + "print(\"so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\")\n", + "m=Q*10**3*4.18/(g*deltaz-(h1-h2)*10**3*4.18)\n", + "m=m/60\n", + "print(\"water circulation rate=(m)in kg/min\"),round(m,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.11;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.11, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\n", + "let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\n", + "energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\n", + "m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\n", + "so steam suppling rate(m)in kg/s per kg of water\n", + "m= 0.124\n", + "NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\n" + ] + } + ], + "source": [ + "#cal of steam suppling rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.11, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\")\n", + "v1=50;#velocity of steam entering injector in m/s\n", + "v2=25;#velocity of mixture leave injector in m/s\n", + "h1=720;#enthalpy of steam entering injector in kcal/kg\n", + "h2=24.6;#enthalpy of water entering injector in kcal/kg\n", + "h3=100;#enthalpy of steam leaving injector in kcal/kg\n", + "h4=100;#enthalpy of water leaving injector in kcal/kg\n", + "deltaz=2;#depth from axis of injector in m\n", + "q=12;#heat loss from injector to surrounding through injector\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\")\n", + "print(\"energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\")\n", + "print(\"m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\")\n", + "print(\"so steam suppling rate(m)in kg/s per kg of water\")\n", + "m=((h3*10**3*4.18+v2**2/2)-(h2*10**3*4.18+g*deltaz))/((v1**2/2+h1*10**3*4.18)-(h3*10**3*4.18+v2**2/2)-(q*10**3*4.18))\n", + "print(\"m=\"),round(m,3)\n", + "print(\"NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.12;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.12, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\n", + "here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\n", + "displacement work, W=(p.dv)cylinder+(p.dv)ballon\n", + "(p.dv)cylinder=0,as cylinder is rigid\n", + "so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\n", + "and work done by atmosphere=KJ 40.52\n" + ] + } + ], + "source": [ + "#cal of work done by atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.12, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\")\n", + "p=1.013*10**5;#atmospheric pressure in pa\n", + "deltav=0.4;#change in volume in m^3\n", + "print(\"here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\")\n", + "print(\"displacement work, W=(p.dv)cylinder+(p.dv)ballon\")\n", + "print(\"(p.dv)cylinder=0,as cylinder is rigid\")\n", + "print(\"so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\")\n", + "W=(p*deltav)/1000\n", + "print(\"and work done by atmosphere=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.13;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.13, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\n", + "work done by turbine(Wt)in J#s is 25% of heat added i.e Wt= 1250.0\n", + "heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\n", + "Qrejected= 3750.0\n", + "and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\n", + "Wp=(-) 10.0\n", + "capacity of generator(W)=in Kw 1.24\n" + ] + } + ], + "source": [ + "#cal of capacity of generator\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.13, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\")\n", + "Qadd=5000;#heat supplied in boiler in J#s\n", + "Wt=.25*Qadd\n", + "print(\"work done by turbine(Wt)in J#s is 25% of heat added i.e\"),\n", + "print(\"Wt=\"),round(Wt,2)\n", + "print(\"heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\")\n", + "Qrejected=.75*Qadd\n", + "print(\"Qrejected=\"),round(Qrejected,2)\n", + "print(\"and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\")\n", + "Wp=0.002*Qadd\n", + "print(\"Wp=(-)\"),round(Wp,2)\n", + "W=(Wt-Wp)/1000\n", + "print(\"capacity of generator(W)=in Kw\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.14;pg no:83" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.14, Page:83 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\n", + "in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\n", + "h1+Q1_2=h2\n", + "Q1_2=h2-h1\n", + "so heat transfer to air in heat exchanger(Q1_2)in KJ\n", + "Q1_2= 726.61\n", + "in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\n", + "h2+C2^2#2=h3+C3^2/2+Wt\n", + "Wt=(h2-h3)+(C2^2-C3^2)/2\n", + "so power output from turbine(Wt)in KJ#s\n", + "Wt= 1.0\n", + "applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\n", + "h3+C=h4+C4^2/2\n", + "C4^2#2=(h3-h4)+C3^2/2\n", + "velocity at exit of nozzle(C4)in m#s\n", + "C4= 14.3\n" + ] + } + ], + "source": [ + "#cal of velocity at exit of nozzle\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.14, Page:83 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\")\n", + "T1=(27+273);##ambient temperature in K\n", + "T2=(750+273);##temperature of heated air inside heat exchanger in K\n", + "T3=(600+273);##temperature of hot air leaves turbine in K\n", + "T4=(500+273);##temperature at which air leaves nozzle in K\n", + "Cp=1.005;##specific heat at constant pressure in KJ#kg K\n", + "C2=50;##velocity of hot air enter into gas turbine in m#s\n", + "C3=60;##velocity of air leaving turbine enters a nozzle in m#s\n", + "print(\"in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\")\n", + "print(\"h1+Q1_2=h2\")\n", + "print(\"Q1_2=h2-h1\")\n", + "print(\"so heat transfer to air in heat exchanger(Q1_2)in KJ\")\n", + "Q1_2=Cp*(T2-T1)\n", + "print(\"Q1_2=\"),round(Q1_2,2)\n", + "print(\"in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\")\n", + "print(\"h2+C2^2#2=h3+C3^2/2+Wt\")\n", + "print(\"Wt=(h2-h3)+(C2^2-C3^2)/2\")\n", + "print(\"so power output from turbine(Wt)in KJ#s\")\n", + "Wt=Cp*(T2-T3)+(C2**2-C3**2)*10**-3/2\n", + "print(\"Wt=\"),round(Cp,2)\n", + "print(\"applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\")\n", + "print(\"h3+C=h4+C4^2/2\")\n", + "print(\"C4^2#2=(h3-h4)+C3^2/2\")\n", + "print(\"velocity at exit of nozzle(C4)in m#s\")\n", + "C4=math.sqrt(2*(Cp*(T3-T4)+C3**2*10**-3/2))\n", + "print(\"C4=\"),round(C4,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.15;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.15, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\n", + "for constant pressure heating,say state changes from 1 to 2\n", + "Wa=p1*dv\n", + "Wa=p1*(v2-v1)\n", + "it is given that v2=2v1\n", + "so Wa=p1*v1=R*T1\n", + "for subsequent expansion at constant temperature say state from 2 to 3\n", + "also given that v3/v1=6,v3/v2=3\n", + "so work=Wb=p*dv\n", + "on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\n", + "temperature at 2 can be given by perfect gas consideration as,\n", + "T2/T1=v2/v1\n", + "or T2=2*T1\n", + "now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\n", + "so W in KJ= 10632.69\n" + ] + } + ], + "source": [ + "#cal of total work done by ai\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.15, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\")\n", + "T1=400;##initial temperature of gas in K\n", + "R=8.314;##gas constant in \n", + "print(\"for constant pressure heating,say state changes from 1 to 2\")\n", + "print(\"Wa=p1*dv\")\n", + "print(\"Wa=p1*(v2-v1)\")\n", + "print(\"it is given that v2=2v1\")\n", + "print(\"so Wa=p1*v1=R*T1\")\n", + "print(\"for subsequent expansion at constant temperature say state from 2 to 3\")\n", + "print(\"also given that v3/v1=6,v3/v2=3\")\n", + "print(\"so work=Wb=p*dv\")\n", + "print(\"on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\")\n", + "print(\"temperature at 2 can be given by perfect gas consideration as,\")\n", + "print(\"T2/T1=v2/v1\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\")\n", + "W=R*T1+2*R*T1*math.log(3)\n", + "print(\"so W in KJ=\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.16;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.16, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\n", + "NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \n", + "we get W=(Vf-Vi)*((Pi+Pf)/2)\n", + "also final volume of gas in m^3 is Vf=3*Vi\n", + "now work done by gas(W)in J 750000.0\n" + ] + } + ], + "source": [ + "#cal of work done by gas\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.16, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\")\n", + "Pi=0.5*10**6;##initial pressure of gas in pa\n", + "Vi=0.5;##initial volume of gas in m^3\n", + "Pf=1*10**6;##final pressure of gas in pa\n", + "print(\"NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \")\n", + "print(\"we get W=(Vf-Vi)*((Pi+Pf)/2)\")\n", + "print(\"also final volume of gas in m^3 is Vf=3*Vi\") \n", + "Vf=3*Vi\n", + "W=(Vf-Vi)*((Pi+Pf)/2)\n", + "print(\"now work done by gas(W)in J\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.17;pg no:87" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.17, Page:87 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\n", + "with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\n", + "adiabatic index of compression of H2 can be obtained as,\n", + "Cp_H2=\n", + "y_H2=Cp_H2/(Cp_H2-R_H2) 1.4\n", + "adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\n", + "y_N2= 1.4\n", + "i>for hydrogen,p1*v1^y=p2*v2^y\n", + "so final pressure of H2(p2)in pa\n", + "p2= 1324078.55\n", + "ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \n", + "partition work=0\n", + "iii>work done upon H2(W_H2)in J,\n", + "W_H2= -200054.06\n", + "work done upon H2(W_H2)=-2*10^5 J\n", + "so work done by N2(W_N2)=2*10^5 J \n", + "iv>heat added to N2 can be obtained using first law of thermodynamics as\n", + "Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\n", + "final temperature of N2 can be obtained considering it as perfect gas\n", + "therefore, T2=(p2*v2*T1)#(p1*v1)\n", + "here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\n", + "p2=1.324*10^6 pa,v2=0.75 m^3\n", + "so now final temperature of N2(T2)in K= 1191.67\n", + "mass of N2(m)in kg= 2.81\n", + "specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2= 1.0\n", + "heat added to N2,(Q_N2)in KJ\n", + "Q_N2= 2052.89\n" + ] + } + ], + "source": [ + "#cal of \n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.17, Page:87 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\")\n", + "Cp_H2=14.307;##specific heat of H2 at constant pressure in KJ#kg K\n", + "R_H2=4.1240;##gas constant for H2 in KJ#kg K\n", + "Cp_N2=1.039;##specific heat of N2 at constant pressure in KJ#kg K\n", + "R_N2=0.2968;##gas constant for N2 in KJ#kg K\n", + "T1=(27+273);##ambient temperature in K\n", + "v1=0.5;##initial volume of H2 in m^3\n", + "p1=0.5*10**6;##initial pressure of H2 in pa \n", + "v2=0.25;##final volume of H2 in m^3 \n", + "p2=1.324*10**6;##final pressure of H2 in pa\n", + "print(\"with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\")\n", + "print(\"adiabatic index of compression of H2 can be obtained as,\")\n", + "print(\"Cp_H2=\")\n", + "y_H2=Cp_H2/(Cp_H2-R_H2)\n", + "print(\"y_H2=Cp_H2/(Cp_H2-R_H2)\"),round(y_H2,2)\n", + "print(\"adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\")\n", + "y_N2=Cp_N2/(Cp_N2-R_N2)\n", + "print(\"y_N2=\"),round(y_N2,2)\n", + "print(\"i>for hydrogen,p1*v1^y=p2*v2^y\")\n", + "print(\"so final pressure of H2(p2)in pa\")\n", + "p2=p1*(v1/v2)**y_H2\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \")\n", + "print(\"partition work=0\")\n", + "print(\"iii>work done upon H2(W_H2)in J,\")\n", + "W_H2=(p1*v1-p2*v2)/(y_H2-1)\n", + "print(\"W_H2=\"),round(W_H2,2)\n", + "print(\"work done upon H2(W_H2)=-2*10^5 J\")\n", + "W_N2=2*10**5;##work done by N2 in J\n", + "print(\"so work done by N2(W_N2)=2*10^5 J \")\n", + "print(\"iv>heat added to N2 can be obtained using first law of thermodynamics as\")\n", + "print(\"Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\")\n", + "print(\"final temperature of N2 can be obtained considering it as perfect gas\")\n", + "print(\"therefore, T2=(p2*v2*T1)#(p1*v1)\")\n", + "print(\"here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\")\n", + "print(\"p2=1.324*10^6 pa,v2=0.75 m^3\")\n", + "v2=0.75;##final volume of N2 in m^3\n", + "T2=(p2*v2*T1)/(p1*v1)\n", + "print(\"so now final temperature of N2(T2)in K=\"),round(T2,2)\n", + "T2=1191.6;##T2 approx. equal to 1191.6 K\n", + "m=(p1*v1)/(R_N2*1000*T1)\n", + "print(\"mass of N2(m)in kg=\"),round(m,2)\n", + "m=2.8;##m approx equal to 2.8 kg\n", + "Cv_N2=Cp_N2-R_N2\n", + "print(\"specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2=\"),round(Cv_N2)\n", + "print(\"heat added to N2,(Q_N2)in KJ\")\n", + "Q_N2=((m*Cv_N2*1000*(T2-T1))+W_N2)/1000\n", + "print(\"Q_N2=\"),round(Q_N2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.18;pg no:88" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.18, Page:88 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\n", + "let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\n", + "initial mass of air(m1)in kg\n", + "m1= 9.29\n", + "for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\n", + "T2=in K 237.64\n", + "final mass of air left in tank(m2)in kg\n", + "m2= 2.97\n", + "writing down energy equation for unsteady flow system\n", + "(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\n", + "or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\n", + "kinetic energy available for running turbine(W)in KJ\n", + "W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "amount of work available=KJ 482.67\n" + ] + } + ], + "source": [ + "#cal of amount of work available\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.18, Page:88 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "p2=1.013*10**5;#atmospheric pressure in pa\n", + "v1=2;#initial volume of air in m^3\n", + "v2=v1;#final volume of air in m^3\n", + "T1=375;#initial temperature of air in K\n", + "Cp_air=1.003;#specific heat at consatnt pressure in KJ/kg K\n", + "Cv_air=0.716;#specific heat at consatnt volume in KJ/kg K\n", + "R_air=0.287;#gas constant in KJ/kg K\n", + "y=1.4;#expansion constant for air\n", + "print(\"let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\")\n", + "print(\"initial mass of air(m1)in kg\")\n", + "m1=(p1*v1)/(R_air*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=in K\"),round(T2,2)\n", + "print(\"final mass of air left in tank(m2)in kg\")\n", + "m2=(p2*v2)/(R_air*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"writing down energy equation for unsteady flow system\")\n", + "print(\"(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\")\n", + "print(\"or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\")\n", + "print(\"kinetic energy available for running turbine(W)in KJ\")\n", + "print(\"W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "print(\"W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "W=((m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2)/1000\n", + "print(\"amount of work available=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.19;pg no:89" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.19, Page:89 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\n", + "using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\n", + "n1= 0.1\n", + "now n2= 0.12\n", + "for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\n", + "deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\n", + "final temperature of gas(T3)in K\n", + "T3= 409.09\n", + "using perfect gas equation for final mixture,\n", + "final pressure of gas(p3)in Mpa\n", + "p3= 750000.0\n", + "so final pressure and temperature =0.75 Mpa and 409.11 K\n" + ] + } + ], + "source": [ + "#cal of final pressure and temperature\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.19, Page:89 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "v1=0.5;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=1*10**6;#final pressure of air in pa\n", + "v2=0.5;#final volume of air in m^3\n", + "T2=500;#final temperature of air in K\n", + "R=8314;#gas constant in J/kg K\n", + "Cv=0.716;#specific heat at constant volume in KJ/kg K\n", + "print(\"using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\")\n", + "n1=(p1*v1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "n2=(p2*v2)/(R*T2)\n", + "print(\"now n2=\"),round(n2,2)\n", + "print(\"for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\")\n", + "deltaU=0;#change in internal energy\n", + "print(\"deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\")\n", + "print(\"final temperature of gas(T3)in K\")\n", + "T3=(deltaU+Cv*(n1*T1+n2*T2))/(Cv*(n1+n2))\n", + "print(\"T3=\"),round(T3,2)\n", + "print(\"using perfect gas equation for final mixture,\")\n", + "print(\"final pressure of gas(p3)in Mpa\")\n", + "p3=((n1+n2)*R*T3)/(v1+v2)\n", + "print(\"p3=\"),round(p3,3)\n", + "print(\"so final pressure and temperature =0.75 Mpa and 409.11 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.20;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.20, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\n", + "printlacement work,W=p*(v1-v2)in N.m -50675.0\n", + "so heat transfer(Q)in N.m\n", + "Q=-W 50675.0\n" + ] + } + ], + "source": [ + "#cal of heat transfer\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.20, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\")\n", + "v1=0;#initial volume of air inside bottle in m^3\n", + "v2=0.5;#final volume of air inside bottle in m^3\n", + "p=1.0135*10**5;#atmospheric pressure in pa\n", + "W=p*(v1-v2)\n", + "print(\"printlacement work,W=p*(v1-v2)in N.m\"),round(W,2)\n", + "print(\"so heat transfer(Q)in N.m\")\n", + "Q=-W\n", + "print(\"Q=-W\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.21;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.21, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\n", + "here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\n", + "(p2/p1)^((y-1)/y)=(T2/T1)\n", + "final temperature of air(T2)in K\n", + "T2= 113.34\n", + "by perfect gas law,initial mass in bottle(m1)in kg\n", + "m1= 11.69\n", + "final mass in bottle(m2)in kg\n", + "m2= 0.92\n", + "energy available for running turbo generator or work(W)in KJ\n", + "W+(m1-m2)*h2=m1*u1-m2*u2\n", + "W= 1325.42\n", + "this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\n", + "turbogenerator actual output(P1)=5 KJ/s\n", + "input to turbogenerator(P2)in KJ/s\n", + "time duration for which turbogenerator can be run(deltat)in seconds\n", + "deltat= 159.05\n", + "duration=160 seconds approx.\n" + ] + } + ], + "source": [ + "#cal of time duration for which turbogenerator can be run\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.21, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\")\n", + "p1=35.*10**5;#initial pressure of air in pa\n", + "v1=0.3;#initial volume of air in m^3\n", + "T1=(313.);#initial temperature of air in K\n", + "p2=1.*10**5;#final pressure of air in pa\n", + "v2=0.3;#final volume of air in m^3\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\")\n", + "print(\"(p2/p1)^((y-1)/y)=(T2/T1)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"by perfect gas law,initial mass in bottle(m1)in kg\")\n", + "m1=(p1*v1)/(R*1000.*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"final mass in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000.*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"energy available for running turbo generator or work(W)in KJ\")\n", + "print(\"W+(m1-m2)*h2=m1*u1-m2*u2\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\")\n", + "print(\"turbogenerator actual output(P1)=5 KJ/s\")\n", + "P1=5;#turbogenerator actual output in KJ/s\n", + "print(\"input to turbogenerator(P2)in KJ/s\")\n", + "P2=P1/0.6\n", + "print(\"time duration for which turbogenerator can be run(deltat)in seconds\")\n", + "deltat=W/P2\n", + "print(\"deltat=\"),round(deltat,2)\n", + "print(\"duration=160 seconds approx.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.22;pg no:91" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.22, Page:91 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\n", + "different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\n", + "process 1-2 is polytropic process with index 1.2\n", + "(T2/T1)=(p2/p1)^((n-1)/n)\n", + "final temperature of air(T2)in K\n", + "T2= 457.68\n", + "at state 1,p1*v1=m*R*T1\n", + "initial volume of air(v1)in m^3\n", + "v1= 2.01\n", + "final volume of air(v2)in m^3\n", + "for process 1-2,v2= 0.53\n", + "for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\n", + "v3=v2*T3/T2 in m^3\n", + "here process 3-1 is isothermal process so T1=T3\n", + "during process 1-2 the compression work(W1_2)in KJ\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "work during process 2-3(W2_3)in KJ,\n", + "W2_3=p2*(v3-v2)/1000\n", + "work during process 3-1(W3_1)in KJ\n", + "W3_1= 485.0\n", + "net work done(W_net)in KJ\n", + "W_net=W1_2+W2_3+W3_1 -71.28\n", + "net work=-71.27 KJ\n", + "here -ve workshows work done upon the system.since it is cycle,so\n", + "W_net=Q_net\n", + "phi dW=phi dQ=-71.27 KJ\n", + "heat transferred from system=71.27 KJ\n" + ] + } + ], + "source": [ + "#cal of network,heat transferred from system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.22, Page:91 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\")\n", + "p1=1.5*10**5;#initial pressure of air in pa\n", + "T1=(77+273);#initial temperature of air in K\n", + "p2=7.5*10**5;#final pressure of air in pa\n", + "n=1.2;#expansion constant for process 1-2\n", + "R=0.287;#gas constant in KJ/kg K\n", + "m=3.;#mass of air in kg\n", + "print(\"different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\")\n", + "print(\"process 1-2 is polytropic process with index 1.2\")\n", + "print(\"(T2/T1)=(p2/p1)^((n-1)/n)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"at state 1,p1*v1=m*R*T1\")\n", + "print(\"initial volume of air(v1)in m^3\")\n", + "v1=(m*R*1000*T1)/p1\n", + "print(\"v1=\"),round(v1,2)\n", + "print(\"final volume of air(v2)in m^3\")\n", + "v2=((p1*v1**n)/p2)**(1/n)\n", + "print(\"for process 1-2,v2=\"),round(v2,2)\n", + "print(\"for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\")\n", + "print(\"v3=v2*T3/T2 in m^3\")\n", + "print(\"here process 3-1 is isothermal process so T1=T3\")\n", + "T3=T1;#process 3-1 is isothermal\n", + "v3=v2*T3/T2\n", + "print(\"during process 1-2 the compression work(W1_2)in KJ\")\n", + "print(\"W1_2=(m*R*(T2-T1)/(1-n))\")\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "print(\"work during process 2-3(W2_3)in KJ,\")\n", + "print(\"W2_3=p2*(v3-v2)/1000\")\n", + "W2_3=p2*(v3-v2)/1000\n", + "print(\"work during process 3-1(W3_1)in KJ\")\n", + "p3=p2;#pressure is constant for process 2-3\n", + "W3_1=p3*v3*math.log(v1/v3)/1000\n", + "print(\"W3_1=\"),round(W3_1,2)\n", + "print(\"net work done(W_net)in KJ\")\n", + "W_net=W1_2+W2_3+W3_1\n", + "print(\"W_net=W1_2+W2_3+W3_1\"),round(W_net,2)\n", + "print(\"net work=-71.27 KJ\")\n", + "print(\"here -ve workshows work done upon the system.since it is cycle,so\")\n", + "print(\"W_net=Q_net\")\n", + "print(\"phi dW=phi dQ=-71.27 KJ\")\n", + "print(\"heat transferred from system=71.27 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.23;pg no:93" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.23, Page:93 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\n", + "initial mass of air in bottle(m1)in kg \n", + "m1= 6.97\n", + "now final temperature(T2)in K\n", + "T2= 0.0\n", + "final mass of air in bottle(m2)in kg\n", + "m2= 0.82\n", + "energy available for running of turbine due to emptying of bottle(W)in KJ\n", + "W= 639.09\n", + "work available from turbine=639.27KJ\n" + ] + } + ], + "source": [ + "#cal of work available from turbine\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.23, Page:93 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "p1=40*10**5;#initial temperature of air in pa\n", + "v1=0.15;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=2*10**5;#final temperature of air in pa\n", + "v2=0.15;#final volume of air in m^3\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"initial mass of air in bottle(m1)in kg \")\n", + "m1=(p1*v1)/(R*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"now final temperature(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "T2=127.36;#take T2=127.36 approx.\n", + "print(\"final mass of air in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "m2=0.821;#take m2=0.821 approx.\n", + "print(\"energy available for running of turbine due to emptying of bottle(W)in KJ\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"work available from turbine=639.27KJ\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb new file mode 100644 index 00000000..22ed40c9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_1.ipynb @@ -0,0 +1,1506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:First Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.1;pg no:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\n", + "a> work done on piston(W_piston)in KJ can be obtained as\n", + "W_piston=pdv\n", + "b> paddle work done on the system(W_paddle)=-4.88 KJ\n", + "net work done of system(W_net)in KJ\n", + "W_net=W_piston+W_paddle\n", + "so work done on system(W_net)=1.435 KJ\n" + ] + } + ], + "source": [ + "#cal of work done on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p=689.;#pressure of gas in cylinder in kpa\n", + "v1=0.04;#initial volume of fluid in m^3\n", + "v2=0.045;#final volume of fluid in m^3\n", + "W_paddle=-4.88;#paddle work done on the system in KJ\n", + "print(\"a> work done on piston(W_piston)in KJ can be obtained as\")\n", + "print(\"W_piston=pdv\")\n", + "#function y = f(v), y=p, endfunction\n", + "def fun1(x):\n", + "\ty=p\n", + "\treturn y\n", + "\n", + "W_piston=scipy.integrate.quad(fun1,v1,v2) \n", + "print(\"b> paddle work done on the system(W_paddle)=-4.88 KJ\")\n", + "print(\"net work done of system(W_net)in KJ\")\n", + "print(\"W_net=W_piston+W_paddle\")\n", + "print(\"so work done on system(W_net)=1.435 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.2;pg no:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.2, Page:76 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\n", + "as the vessel is rigid therefore work done shall be zero\n", + "W=0\n", + "from first law of thermodynamics,heat required(Q)in KJ\n", + "Q=U2-U1+W=Q=m(u2-u1)+W\n", + "so heat required = 5.6\n" + ] + } + ], + "source": [ + "#cal of heat required\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.2, Page:76 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\")\n", + "m=0.5;#mass of gas in kg\n", + "u1=26.6;#internal energy of gas at 200 degree celcius\n", + "u2=37.8;#internal energy of gas at 400 degree celcius\n", + "W=0;#work done by vessel in KJ\n", + "print(\"as the vessel is rigid therefore work done shall be zero\")\n", + "print(\"W=0\")\n", + "print(\"from first law of thermodynamics,heat required(Q)in KJ\")\n", + "print(\"Q=U2-U1+W=Q=m(u2-u1)+W\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat required =\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.3;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.3, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\n", + "by steady flow energy equation\n", + "q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\n", + "let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\n", + "q=h2-h1\n", + "rate of heat removal(Q)in KJ/hr\n", + "Q=m(h2-h1)=m*Cp*(T2-T1)\n", + "heat should be removed at the rate=KJ/hr 40500.0\n" + ] + } + ], + "source": [ + "#cal of \"heat should be removed\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.3, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\")\n", + "m=50;#rate at which carbon dioxide passing through heat exchanger in kg/hr\n", + "T2=800;#initial temperature of carbon dioxide in degree celcius\n", + "T1=50;#final temperature of carbon dioxide in degree celcius\n", + "Cp=1.08;#specific heat at constant pressure in KJ/kg K\n", + "print(\"by steady flow energy equation\")\n", + "print(\"q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\")\n", + "print(\"let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\")\n", + "print(\"q=h2-h1\")\n", + "print(\"rate of heat removal(Q)in KJ/hr\")\n", + "print(\"Q=m(h2-h1)=m*Cp*(T2-T1)\")\n", + "Q=m*Cp*(T2-T1)\n", + "print(\"heat should be removed at the rate=KJ/hr\"),round(Q)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.4;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "#cal of work done by surrounding on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.4, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 4\")\n", + "v=0.78;#volume of cylinder in m^3\n", + "p=101.325;#atmospheric pressure in kPa\n", + "print(\"total work done by the air at atmospheric pressure of 101.325 kPa\")\n", + "print(\"W=(pdv)cylinder+(pdv)air\")\n", + "print(\"0+p*(delta v)\")\n", + "print(\"work done by air(W)=-p*v in KJ\")\n", + "W=-p*v\n", + "print(\"so work done by surrounding on system=KJ\"),round(-W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.5:pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.5, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\n", + "given p*v^1.3=constant\n", + "assuming expansion to be quasi-static,the work may be given as\n", + "W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\n", + "from internal energy relation,change in specific internal energy\n", + "deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\n", + "total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\n", + "using p1*V1^1.3=p2*V2^1.3\n", + "V2=in m^3 0.85\n", + "take V2=.852 m^3\n", + "so deltaU in KJ\n", + "and W in KJ 246.67\n", + "from first law\n", + "deltaQ=KJ 113.47\n", + "heat interaction=113.5 KJ\n", + "work interaction=246.7 KJ\n", + "change in internal energy=-113.2 KJ\n" + ] + } + ], + "source": [ + "#cal of heat,work interaction and change in internal energy\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.5, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\")\n", + "m=5;#mass of gas in kg\n", + "p1=1*10**3;#initial pressure of gas in KPa\n", + "V1=0.5;#initial volume of gas in m^3\n", + "p2=0.5*10**3;#final pressure of gas in KPa\n", + "n=1.3;#expansion constant\n", + "print(\"given p*v^1.3=constant\")\n", + "print(\"assuming expansion to be quasi-static,the work may be given as\")\n", + "print(\"W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\")\n", + "print(\"from internal energy relation,change in specific internal energy\")\n", + "print(\"deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\")\n", + "print(\"total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\")\n", + "print(\"using p1*V1^1.3=p2*V2^1.3\")\n", + "V2=V1*(p1/p2)**(1/1.3)\n", + "print(\"V2=in m^3\"),round(V2,2)\n", + "print(\"take V2=.852 m^3\")\n", + "V2=0.852;#final volume of gas in m^3\n", + "print(\"so deltaU in KJ\")\n", + "deltaU=1.8*(p2*V2-p1*V1)\n", + "W=(p2*V2-p1*V1)/(1-n)\n", + "print(\"and W in KJ\"),round(W,2)\n", + "print(\"from first law\")\n", + "deltaQ=deltaU+W\n", + "print(\"deltaQ=KJ\"),round(deltaQ,2)\n", + "print(\"heat interaction=113.5 KJ\")\n", + "print(\"work interaction=246.7 KJ\")\n", + "print(\"change in internal energy=-113.2 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.6;pg no:78" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.6, Page:78 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\n", + "final state volume(v2)in m^3\n", + "v2= 0.0\n", + "take v2=0.03 m^3\n", + "now internal energy of gas is given by U=7.5*p*v-425\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\n", + "deltaU=7.5*10^3*(p2*v2-p1*v1) 75.0\n", + "for quasi-static process\n", + "work(W) in KJ,W=p*dv\n", + "W=(p2*v2-p1*v1)/(1-n)\n", + "from first law of thermodynamics,\n", + "heat interaction(deltaQ)=deltaU+W\n", + "heat=50 KJ\n", + "work=25 KJ(-ve)\n", + "internal energy change=75 KJ\n", + "if 180 KJ heat transfer takes place,then from 1st law,\n", + "deltaQ= 50.0\n", + "since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\n", + "W=KJ 105.0\n" + ] + } + ], + "source": [ + "#cal of heat,workinternal energy change\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.6, Page:78 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\")\n", + "p1=1;#initial pressure of gas in MPa\n", + "v1=0.05;#initial volume of gas in m^3\n", + "p2=2;#final pressure of gas in MPa\n", + "n=1.4;#expansion constant\n", + "print(\"final state volume(v2)in m^3\")\n", + "v2=((p1/p2)**(1/1.4))*v1\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"take v2=0.03 m^3\")\n", + "v2=0.03;#final volume of gas in m^3\n", + "print(\"now internal energy of gas is given by U=7.5*p*v-425\")\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "print(\"deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\")\n", + "deltaU=7.5*10**3*(p2*v2-p1*v1)\n", + "print(\"deltaU=7.5*10^3*(p2*v2-p1*v1)\"),round(deltaU,2)\n", + "print(\"for quasi-static process\")\n", + "print(\"work(W) in KJ,W=p*dv\")\n", + "W=((p2*v2-p1*v1)/(1-n))*10**3\n", + "print(\"W=(p2*v2-p1*v1)/(1-n)\")\n", + "print(\"from first law of thermodynamics,\")\n", + "print(\"heat interaction(deltaQ)=deltaU+W\")\n", + "deltaQ=deltaU+W\n", + "print(\"heat=50 KJ\")\n", + "print(\"work=25 KJ(-ve)\")\n", + "print(\"internal energy change=75 KJ\")\n", + "print(\"if 180 KJ heat transfer takes place,then from 1st law,\")\n", + "print(\"deltaQ=\"),round(deltaQ,2)\n", + "print(\"since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\")\n", + "W=180-75\n", + "print(\"W=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.7;pg no:79" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.7, Page:79 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\n", + "characteristics gas constant(R)in J/kg K\n", + "R= 519.64\n", + "take R=0.520,KJ/kg K\n", + "Cv=inKJ/kg K 1.18\n", + "y= 1.44\n", + "for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\n", + "now,T2=in K\n", + "work(W)in KJ/kg\n", + "W= -257.78\n", + "for polytropic process,heat(Q)in KJ/K\n", + "Q= 82.02\n" + ] + } + ], + "source": [ + "#cal of work and heat\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.7, Page:79 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\")\n", + "M=16;#molecular weight of gas\n", + "p1=101.3;#initial pressure of gas in KPa\n", + "p2=600;#final pressure of gas in KPa\n", + "T1=(273+20);#initial temperature of gas in K\n", + "R1=8.3143*10**3;#universal gas constant in J/kg K\n", + "Cp=1.7;#specific heat at constant pressure in KJ/kg K\n", + "n=1.3;#expansion constant\n", + "T2=((p2/p1)**(n-1/n))\n", + "print(\"characteristics gas constant(R)in J/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"take R=0.520,KJ/kg K\")\n", + "R=0.520;#characteristics gas constant in KJ/kg K\n", + "Cv=Cp-R\n", + "print(\"Cv=inKJ/kg K\"),round(Cv,2)\n", + "y=Cp/Cv\n", + "print(\"y=\"),round(y,2)\n", + "y=1.44;#ratio of specific heat at constant pressure to constant volume\n", + "print(\"for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"now,T2=in K\")\n", + "print(\"work(W)in KJ/kg\")\n", + "W=R*((T1-T2)/(n-1))\n", + "print(\"W=\"),round(W,2)\n", + "W=257.78034;#work done in KJ/kg\n", + "print(\"for polytropic process,heat(Q)in KJ/K\")\n", + "Q=((y-n)/(y-1))*W\n", + "print(\"Q=\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.8;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.8, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\n", + "applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\n", + "h1+C1^2/2=h2+C2^2/2\n", + "given that C1=0,negligible inlet velocity\n", + "so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\n", + "exit velocity(C2)in m/s 1098.2\n" + ] + } + ], + "source": [ + "#cal of exit velocity\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.8, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\")\n", + "T1=(627+273);#initial temperature of air in nozzle in K\n", + "T2=(27+273);#temperature at which air leaves nozzle in K\n", + "Cp=1.005*10**3;#specific heat at constant pressure in J/kg K\n", + "C2=math.sqrt(2*Cp*(T1-T2))\n", + "print(\"applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\")\n", + "print(\"h1+C1^2/2=h2+C2^2/2\")\n", + "print(\"given that C1=0,negligible inlet velocity\")\n", + "print(\"so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\")\n", + "print(\"exit velocity(C2)in m/s\"),round(C2,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.9;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.9, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\n", + "work interaction,W=-200 KJ/kg of air\n", + "increase in enthalpy of air=100 KJ/kg of air\n", + "total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\n", + "writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\n", + "h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\n", + "assuming no change in potential energy and kinetic energy\n", + "deltaK.E=deltaP.=0\n", + "total heat interaction(Q)in KJ/kg of air\n", + "Q= -100.0\n", + "Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\n", + "so heat transferred to atmosphere(Q2)in KJ/kg of air -10.0\n" + ] + } + ], + "source": [ + "#cal of heat transferred to atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.9, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\")\n", + "W=-200;#shaft work in KJ/kg of air\n", + "deltah=100;#increase in enthalpy in KJ/kg of air\n", + "Q1=-90;#heat transferred to water in KJ/kg of air\n", + "print(\"work interaction,W=-200 KJ/kg of air\")\n", + "print(\"increase in enthalpy of air=100 KJ/kg of air\")\n", + "print(\"total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\")\n", + "print(\"writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\")\n", + "print(\"h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\")\n", + "print(\"assuming no change in potential energy and kinetic energy\")\n", + "print(\"deltaK.E=deltaP.=0\")\n", + "print(\"total heat interaction(Q)in KJ/kg of air\")\n", + "Q=deltah+W\n", + "print(\"Q=\"),round(Q,2)\n", + "Q2=Q-Q1\n", + "print(\"Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\")\n", + "print(\"so heat transferred to atmosphere(Q2)in KJ/kg of air\"),round(Q2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.10;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.10, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\n", + "above problem can be solved using steady flow energy equations upon hot water flow\n", + "Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\n", + "here total heat to be supplied(Q)in kcal/hr\n", + "so heat lost by water(-ve),Q=-25000 kcal/hr\n", + "there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\n", + "Q+m*(h1+g*z1)=m*(h2+g*z2)\n", + "so water circulation rate(m)in kg/hr\n", + "so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\n", + "water circulation rate=(m)in kg/min 11.91\n" + ] + } + ], + "source": [ + "#cal of water circulation rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.10, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\")\n", + "n=500;#total number of persons\n", + "q=50;#heat requirement per person in kcal/hr\n", + "h1=80;#enthalpy of hot water enter in pipe in kcal/kg\n", + "h2=45;#enthalpy of hot water leaves the pipe in kcal/kg\n", + "g=9.81;#acceleartion due to gravity in m/s^2\n", + "deltaz=10;#difference in elevation of inlet and exit pipe in m\n", + "print(\"above problem can be solved using steady flow energy equations upon hot water flow\")\n", + "print(\"Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\")\n", + "print(\"here total heat to be supplied(Q)in kcal/hr\")\n", + "Q=n*q\n", + "print(\"so heat lost by water(-ve),Q=-25000 kcal/hr\")\n", + "Q=-25000#heat loss by water in kcal/hr\n", + "print(\"there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\")\n", + "print(\"Q+m*(h1+g*z1)=m*(h2+g*z2)\")\n", + "print(\"so water circulation rate(m)in kg/hr\")\n", + "print(\"so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\")\n", + "m=Q*10**3*4.18/(g*deltaz-(h1-h2)*10**3*4.18)\n", + "m=m/60\n", + "print(\"water circulation rate=(m)in kg/min\"),round(m,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.11;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.11, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\n", + "let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\n", + "energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\n", + "m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\n", + "so steam suppling rate(m)in kg/s per kg of water\n", + "m= 0.124\n", + "NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\n" + ] + } + ], + "source": [ + "#cal of steam suppling rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.11, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\")\n", + "v1=50;#velocity of steam entering injector in m/s\n", + "v2=25;#velocity of mixture leave injector in m/s\n", + "h1=720;#enthalpy of steam entering injector in kcal/kg\n", + "h2=24.6;#enthalpy of water entering injector in kcal/kg\n", + "h3=100;#enthalpy of steam leaving injector in kcal/kg\n", + "h4=100;#enthalpy of water leaving injector in kcal/kg\n", + "deltaz=2;#depth from axis of injector in m\n", + "q=12;#heat loss from injector to surrounding through injector\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\")\n", + "print(\"energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\")\n", + "print(\"m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\")\n", + "print(\"so steam suppling rate(m)in kg/s per kg of water\")\n", + "m=((h3*10**3*4.18+v2**2/2)-(h2*10**3*4.18+g*deltaz))/((v1**2/2+h1*10**3*4.18)-(h3*10**3*4.18+v2**2/2)-(q*10**3*4.18))\n", + "print(\"m=\"),round(m,3)\n", + "print(\"NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.12;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.12, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\n", + "here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\n", + "displacement work, W=(p.dv)cylinder+(p.dv)ballon\n", + "(p.dv)cylinder=0,as cylinder is rigid\n", + "so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\n", + "and work done by atmosphere=KJ 40.52\n" + ] + } + ], + "source": [ + "#cal of work done by atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.12, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\")\n", + "p=1.013*10**5;#atmospheric pressure in pa\n", + "deltav=0.4;#change in volume in m^3\n", + "print(\"here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\")\n", + "print(\"displacement work, W=(p.dv)cylinder+(p.dv)ballon\")\n", + "print(\"(p.dv)cylinder=0,as cylinder is rigid\")\n", + "print(\"so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\")\n", + "W=(p*deltav)/1000\n", + "print(\"and work done by atmosphere=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.13;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.13, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\n", + "work done by turbine(Wt)in J#s is 25% of heat added i.e Wt= 1250.0\n", + "heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\n", + "Qrejected= 3750.0\n", + "and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\n", + "Wp=(-) 10.0\n", + "capacity of generator(W)=in Kw 1.24\n" + ] + } + ], + "source": [ + "#cal of capacity of generator\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.13, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\")\n", + "Qadd=5000;#heat supplied in boiler in J#s\n", + "Wt=.25*Qadd\n", + "print(\"work done by turbine(Wt)in J#s is 25% of heat added i.e\"),\n", + "print(\"Wt=\"),round(Wt,2)\n", + "print(\"heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\")\n", + "Qrejected=.75*Qadd\n", + "print(\"Qrejected=\"),round(Qrejected,2)\n", + "print(\"and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\")\n", + "Wp=0.002*Qadd\n", + "print(\"Wp=(-)\"),round(Wp,2)\n", + "W=(Wt-Wp)/1000\n", + "print(\"capacity of generator(W)=in Kw\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.14;pg no:83" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.14, Page:83 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\n", + "in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\n", + "h1+Q1_2=h2\n", + "Q1_2=h2-h1\n", + "so heat transfer to air in heat exchanger(Q1_2)in KJ\n", + "Q1_2= 726.61\n", + "in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\n", + "h2+C2^2#2=h3+C3^2/2+Wt\n", + "Wt=(h2-h3)+(C2^2-C3^2)/2\n", + "so power output from turbine(Wt)in KJ#s\n", + "Wt= 1.0\n", + "applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\n", + "h3+C=h4+C4^2/2\n", + "C4^2#2=(h3-h4)+C3^2/2\n", + "velocity at exit of nozzle(C4)in m#s\n", + "C4= 14.3\n" + ] + } + ], + "source": [ + "#cal of velocity at exit of nozzle\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.14, Page:83 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\")\n", + "T1=(27+273);##ambient temperature in K\n", + "T2=(750+273);##temperature of heated air inside heat exchanger in K\n", + "T3=(600+273);##temperature of hot air leaves turbine in K\n", + "T4=(500+273);##temperature at which air leaves nozzle in K\n", + "Cp=1.005;##specific heat at constant pressure in KJ#kg K\n", + "C2=50;##velocity of hot air enter into gas turbine in m#s\n", + "C3=60;##velocity of air leaving turbine enters a nozzle in m#s\n", + "print(\"in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\")\n", + "print(\"h1+Q1_2=h2\")\n", + "print(\"Q1_2=h2-h1\")\n", + "print(\"so heat transfer to air in heat exchanger(Q1_2)in KJ\")\n", + "Q1_2=Cp*(T2-T1)\n", + "print(\"Q1_2=\"),round(Q1_2,2)\n", + "print(\"in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\")\n", + "print(\"h2+C2^2#2=h3+C3^2/2+Wt\")\n", + "print(\"Wt=(h2-h3)+(C2^2-C3^2)/2\")\n", + "print(\"so power output from turbine(Wt)in KJ#s\")\n", + "Wt=Cp*(T2-T3)+(C2**2-C3**2)*10**-3/2\n", + "print(\"Wt=\"),round(Cp,2)\n", + "print(\"applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\")\n", + "print(\"h3+C=h4+C4^2/2\")\n", + "print(\"C4^2#2=(h3-h4)+C3^2/2\")\n", + "print(\"velocity at exit of nozzle(C4)in m#s\")\n", + "C4=math.sqrt(2*(Cp*(T3-T4)+C3**2*10**-3/2))\n", + "print(\"C4=\"),round(C4,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.15;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.15, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\n", + "for constant pressure heating,say state changes from 1 to 2\n", + "Wa=p1*dv\n", + "Wa=p1*(v2-v1)\n", + "it is given that v2=2v1\n", + "so Wa=p1*v1=R*T1\n", + "for subsequent expansion at constant temperature say state from 2 to 3\n", + "also given that v3/v1=6,v3/v2=3\n", + "so work=Wb=p*dv\n", + "on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\n", + "temperature at 2 can be given by perfect gas consideration as,\n", + "T2/T1=v2/v1\n", + "or T2=2*T1\n", + "now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\n", + "so W in KJ= 10632.69\n" + ] + } + ], + "source": [ + "#cal of total work done by ai\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.15, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\")\n", + "T1=400;##initial temperature of gas in K\n", + "R=8.314;##gas constant in \n", + "print(\"for constant pressure heating,say state changes from 1 to 2\")\n", + "print(\"Wa=p1*dv\")\n", + "print(\"Wa=p1*(v2-v1)\")\n", + "print(\"it is given that v2=2v1\")\n", + "print(\"so Wa=p1*v1=R*T1\")\n", + "print(\"for subsequent expansion at constant temperature say state from 2 to 3\")\n", + "print(\"also given that v3/v1=6,v3/v2=3\")\n", + "print(\"so work=Wb=p*dv\")\n", + "print(\"on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\")\n", + "print(\"temperature at 2 can be given by perfect gas consideration as,\")\n", + "print(\"T2/T1=v2/v1\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\")\n", + "W=R*T1+2*R*T1*math.log(3)\n", + "print(\"so W in KJ=\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.16;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.16, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\n", + "NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \n", + "we get W=(Vf-Vi)*((Pi+Pf)/2)\n", + "also final volume of gas in m^3 is Vf=3*Vi\n", + "now work done by gas(W)in J 750000.0\n" + ] + } + ], + "source": [ + "#cal of work done by gas\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.16, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\")\n", + "Pi=0.5*10**6;##initial pressure of gas in pa\n", + "Vi=0.5;##initial volume of gas in m^3\n", + "Pf=1*10**6;##final pressure of gas in pa\n", + "print(\"NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \")\n", + "print(\"we get W=(Vf-Vi)*((Pi+Pf)/2)\")\n", + "print(\"also final volume of gas in m^3 is Vf=3*Vi\") \n", + "Vf=3*Vi\n", + "W=(Vf-Vi)*((Pi+Pf)/2)\n", + "print(\"now work done by gas(W)in J\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.17;pg no:87" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.17, Page:87 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\n", + "with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\n", + "adiabatic index of compression of H2 can be obtained as,\n", + "Cp_H2=\n", + "y_H2=Cp_H2/(Cp_H2-R_H2) 1.4\n", + "adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\n", + "y_N2= 1.4\n", + "i>for hydrogen,p1*v1^y=p2*v2^y\n", + "so final pressure of H2(p2)in pa\n", + "p2= 1324078.55\n", + "ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \n", + "partition work=0\n", + "iii>work done upon H2(W_H2)in J,\n", + "W_H2= -200054.06\n", + "work done upon H2(W_H2)=-2*10^5 J\n", + "so work done by N2(W_N2)=2*10^5 J \n", + "iv>heat added to N2 can be obtained using first law of thermodynamics as\n", + "Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\n", + "final temperature of N2 can be obtained considering it as perfect gas\n", + "therefore, T2=(p2*v2*T1)#(p1*v1)\n", + "here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\n", + "p2=1.324*10^6 pa,v2=0.75 m^3\n", + "so now final temperature of N2(T2)in K= 1191.67\n", + "mass of N2(m)in kg= 2.81\n", + "specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2= 1.0\n", + "heat added to N2,(Q_N2)in KJ\n", + "Q_N2= 2052.89\n" + ] + } + ], + "source": [ + "#cal of \n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.17, Page:87 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\")\n", + "Cp_H2=14.307;##specific heat of H2 at constant pressure in KJ#kg K\n", + "R_H2=4.1240;##gas constant for H2 in KJ#kg K\n", + "Cp_N2=1.039;##specific heat of N2 at constant pressure in KJ#kg K\n", + "R_N2=0.2968;##gas constant for N2 in KJ#kg K\n", + "T1=(27+273);##ambient temperature in K\n", + "v1=0.5;##initial volume of H2 in m^3\n", + "p1=0.5*10**6;##initial pressure of H2 in pa \n", + "v2=0.25;##final volume of H2 in m^3 \n", + "p2=1.324*10**6;##final pressure of H2 in pa\n", + "print(\"with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\")\n", + "print(\"adiabatic index of compression of H2 can be obtained as,\")\n", + "print(\"Cp_H2=\")\n", + "y_H2=Cp_H2/(Cp_H2-R_H2)\n", + "print(\"y_H2=Cp_H2/(Cp_H2-R_H2)\"),round(y_H2,2)\n", + "print(\"adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\")\n", + "y_N2=Cp_N2/(Cp_N2-R_N2)\n", + "print(\"y_N2=\"),round(y_N2,2)\n", + "print(\"i>for hydrogen,p1*v1^y=p2*v2^y\")\n", + "print(\"so final pressure of H2(p2)in pa\")\n", + "p2=p1*(v1/v2)**y_H2\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \")\n", + "print(\"partition work=0\")\n", + "print(\"iii>work done upon H2(W_H2)in J,\")\n", + "W_H2=(p1*v1-p2*v2)/(y_H2-1)\n", + "print(\"W_H2=\"),round(W_H2,2)\n", + "print(\"work done upon H2(W_H2)=-2*10^5 J\")\n", + "W_N2=2*10**5;##work done by N2 in J\n", + "print(\"so work done by N2(W_N2)=2*10^5 J \")\n", + "print(\"iv>heat added to N2 can be obtained using first law of thermodynamics as\")\n", + "print(\"Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\")\n", + "print(\"final temperature of N2 can be obtained considering it as perfect gas\")\n", + "print(\"therefore, T2=(p2*v2*T1)#(p1*v1)\")\n", + "print(\"here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\")\n", + "print(\"p2=1.324*10^6 pa,v2=0.75 m^3\")\n", + "v2=0.75;##final volume of N2 in m^3\n", + "T2=(p2*v2*T1)/(p1*v1)\n", + "print(\"so now final temperature of N2(T2)in K=\"),round(T2,2)\n", + "T2=1191.6;##T2 approx. equal to 1191.6 K\n", + "m=(p1*v1)/(R_N2*1000*T1)\n", + "print(\"mass of N2(m)in kg=\"),round(m,2)\n", + "m=2.8;##m approx equal to 2.8 kg\n", + "Cv_N2=Cp_N2-R_N2\n", + "print(\"specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2=\"),round(Cv_N2)\n", + "print(\"heat added to N2,(Q_N2)in KJ\")\n", + "Q_N2=((m*Cv_N2*1000*(T2-T1))+W_N2)/1000\n", + "print(\"Q_N2=\"),round(Q_N2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.18;pg no:88" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.18, Page:88 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\n", + "let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\n", + "initial mass of air(m1)in kg\n", + "m1= 9.29\n", + "for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\n", + "T2=in K 237.64\n", + "final mass of air left in tank(m2)in kg\n", + "m2= 2.97\n", + "writing down energy equation for unsteady flow system\n", + "(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\n", + "or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\n", + "kinetic energy available for running turbine(W)in KJ\n", + "W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "amount of work available=KJ 482.67\n" + ] + } + ], + "source": [ + "#cal of amount of work available\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.18, Page:88 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "p2=1.013*10**5;#atmospheric pressure in pa\n", + "v1=2;#initial volume of air in m^3\n", + "v2=v1;#final volume of air in m^3\n", + "T1=375;#initial temperature of air in K\n", + "Cp_air=1.003;#specific heat at consatnt pressure in KJ/kg K\n", + "Cv_air=0.716;#specific heat at consatnt volume in KJ/kg K\n", + "R_air=0.287;#gas constant in KJ/kg K\n", + "y=1.4;#expansion constant for air\n", + "print(\"let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\")\n", + "print(\"initial mass of air(m1)in kg\")\n", + "m1=(p1*v1)/(R_air*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=in K\"),round(T2,2)\n", + "print(\"final mass of air left in tank(m2)in kg\")\n", + "m2=(p2*v2)/(R_air*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"writing down energy equation for unsteady flow system\")\n", + "print(\"(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\")\n", + "print(\"or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\")\n", + "print(\"kinetic energy available for running turbine(W)in KJ\")\n", + "print(\"W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "print(\"W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "W=((m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2)/1000\n", + "print(\"amount of work available=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.19;pg no:89" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.19, Page:89 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\n", + "using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\n", + "n1= 0.1\n", + "now n2= 0.12\n", + "for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\n", + "deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\n", + "final temperature of gas(T3)in K\n", + "T3= 409.09\n", + "using perfect gas equation for final mixture,\n", + "final pressure of gas(p3)in Mpa\n", + "p3= 750000.0\n", + "so final pressure and temperature =0.75 Mpa and 409.11 K\n" + ] + } + ], + "source": [ + "#cal of final pressure and temperature\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.19, Page:89 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "v1=0.5;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=1*10**6;#final pressure of air in pa\n", + "v2=0.5;#final volume of air in m^3\n", + "T2=500;#final temperature of air in K\n", + "R=8314;#gas constant in J/kg K\n", + "Cv=0.716;#specific heat at constant volume in KJ/kg K\n", + "print(\"using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\")\n", + "n1=(p1*v1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "n2=(p2*v2)/(R*T2)\n", + "print(\"now n2=\"),round(n2,2)\n", + "print(\"for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\")\n", + "deltaU=0;#change in internal energy\n", + "print(\"deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\")\n", + "print(\"final temperature of gas(T3)in K\")\n", + "T3=(deltaU+Cv*(n1*T1+n2*T2))/(Cv*(n1+n2))\n", + "print(\"T3=\"),round(T3,2)\n", + "print(\"using perfect gas equation for final mixture,\")\n", + "print(\"final pressure of gas(p3)in Mpa\")\n", + "p3=((n1+n2)*R*T3)/(v1+v2)\n", + "print(\"p3=\"),round(p3,3)\n", + "print(\"so final pressure and temperature =0.75 Mpa and 409.11 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.20;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.20, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\n", + "printlacement work,W=p*(v1-v2)in N.m -50675.0\n", + "so heat transfer(Q)in N.m\n", + "Q=-W 50675.0\n" + ] + } + ], + "source": [ + "#cal of heat transfer\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.20, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\")\n", + "v1=0;#initial volume of air inside bottle in m^3\n", + "v2=0.5;#final volume of air inside bottle in m^3\n", + "p=1.0135*10**5;#atmospheric pressure in pa\n", + "W=p*(v1-v2)\n", + "print(\"printlacement work,W=p*(v1-v2)in N.m\"),round(W,2)\n", + "print(\"so heat transfer(Q)in N.m\")\n", + "Q=-W\n", + "print(\"Q=-W\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.21;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.21, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\n", + "here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\n", + "(p2/p1)^((y-1)/y)=(T2/T1)\n", + "final temperature of air(T2)in K\n", + "T2= 113.34\n", + "by perfect gas law,initial mass in bottle(m1)in kg\n", + "m1= 11.69\n", + "final mass in bottle(m2)in kg\n", + "m2= 0.92\n", + "energy available for running turbo generator or work(W)in KJ\n", + "W+(m1-m2)*h2=m1*u1-m2*u2\n", + "W= 1325.42\n", + "this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\n", + "turbogenerator actual output(P1)=5 KJ/s\n", + "input to turbogenerator(P2)in KJ/s\n", + "time duration for which turbogenerator can be run(deltat)in seconds\n", + "deltat= 159.05\n", + "duration=160 seconds approx.\n" + ] + } + ], + "source": [ + "#cal of time duration for which turbogenerator can be run\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.21, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\")\n", + "p1=35.*10**5;#initial pressure of air in pa\n", + "v1=0.3;#initial volume of air in m^3\n", + "T1=(313.);#initial temperature of air in K\n", + "p2=1.*10**5;#final pressure of air in pa\n", + "v2=0.3;#final volume of air in m^3\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\")\n", + "print(\"(p2/p1)^((y-1)/y)=(T2/T1)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"by perfect gas law,initial mass in bottle(m1)in kg\")\n", + "m1=(p1*v1)/(R*1000.*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"final mass in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000.*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"energy available for running turbo generator or work(W)in KJ\")\n", + "print(\"W+(m1-m2)*h2=m1*u1-m2*u2\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\")\n", + "print(\"turbogenerator actual output(P1)=5 KJ/s\")\n", + "P1=5;#turbogenerator actual output in KJ/s\n", + "print(\"input to turbogenerator(P2)in KJ/s\")\n", + "P2=P1/0.6\n", + "print(\"time duration for which turbogenerator can be run(deltat)in seconds\")\n", + "deltat=W/P2\n", + "print(\"deltat=\"),round(deltat,2)\n", + "print(\"duration=160 seconds approx.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.22;pg no:91" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.22, Page:91 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\n", + "different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\n", + "process 1-2 is polytropic process with index 1.2\n", + "(T2/T1)=(p2/p1)^((n-1)/n)\n", + "final temperature of air(T2)in K\n", + "T2= 457.68\n", + "at state 1,p1*v1=m*R*T1\n", + "initial volume of air(v1)in m^3\n", + "v1= 2.01\n", + "final volume of air(v2)in m^3\n", + "for process 1-2,v2= 0.53\n", + "for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\n", + "v3=v2*T3/T2 in m^3\n", + "here process 3-1 is isothermal process so T1=T3\n", + "during process 1-2 the compression work(W1_2)in KJ\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "work during process 2-3(W2_3)in KJ,\n", + "W2_3=p2*(v3-v2)/1000\n", + "work during process 3-1(W3_1)in KJ\n", + "W3_1= 485.0\n", + "net work done(W_net)in KJ\n", + "W_net=W1_2+W2_3+W3_1 -71.28\n", + "net work=-71.27 KJ\n", + "here -ve workshows work done upon the system.since it is cycle,so\n", + "W_net=Q_net\n", + "phi dW=phi dQ=-71.27 KJ\n", + "heat transferred from system=71.27 KJ\n" + ] + } + ], + "source": [ + "#cal of network,heat transferred from system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.22, Page:91 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\")\n", + "p1=1.5*10**5;#initial pressure of air in pa\n", + "T1=(77+273);#initial temperature of air in K\n", + "p2=7.5*10**5;#final pressure of air in pa\n", + "n=1.2;#expansion constant for process 1-2\n", + "R=0.287;#gas constant in KJ/kg K\n", + "m=3.;#mass of air in kg\n", + "print(\"different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\")\n", + "print(\"process 1-2 is polytropic process with index 1.2\")\n", + "print(\"(T2/T1)=(p2/p1)^((n-1)/n)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"at state 1,p1*v1=m*R*T1\")\n", + "print(\"initial volume of air(v1)in m^3\")\n", + "v1=(m*R*1000*T1)/p1\n", + "print(\"v1=\"),round(v1,2)\n", + "print(\"final volume of air(v2)in m^3\")\n", + "v2=((p1*v1**n)/p2)**(1/n)\n", + "print(\"for process 1-2,v2=\"),round(v2,2)\n", + "print(\"for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\")\n", + "print(\"v3=v2*T3/T2 in m^3\")\n", + "print(\"here process 3-1 is isothermal process so T1=T3\")\n", + "T3=T1;#process 3-1 is isothermal\n", + "v3=v2*T3/T2\n", + "print(\"during process 1-2 the compression work(W1_2)in KJ\")\n", + "print(\"W1_2=(m*R*(T2-T1)/(1-n))\")\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "print(\"work during process 2-3(W2_3)in KJ,\")\n", + "print(\"W2_3=p2*(v3-v2)/1000\")\n", + "W2_3=p2*(v3-v2)/1000\n", + "print(\"work during process 3-1(W3_1)in KJ\")\n", + "p3=p2;#pressure is constant for process 2-3\n", + "W3_1=p3*v3*math.log(v1/v3)/1000\n", + "print(\"W3_1=\"),round(W3_1,2)\n", + "print(\"net work done(W_net)in KJ\")\n", + "W_net=W1_2+W2_3+W3_1\n", + "print(\"W_net=W1_2+W2_3+W3_1\"),round(W_net,2)\n", + "print(\"net work=-71.27 KJ\")\n", + "print(\"here -ve workshows work done upon the system.since it is cycle,so\")\n", + "print(\"W_net=Q_net\")\n", + "print(\"phi dW=phi dQ=-71.27 KJ\")\n", + "print(\"heat transferred from system=71.27 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.23;pg no:93" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.23, Page:93 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\n", + "initial mass of air in bottle(m1)in kg \n", + "m1= 6.97\n", + "now final temperature(T2)in K\n", + "T2= 0.0\n", + "final mass of air in bottle(m2)in kg\n", + "m2= 0.82\n", + "energy available for running of turbine due to emptying of bottle(W)in KJ\n", + "W= 639.09\n", + "work available from turbine=639.27KJ\n" + ] + } + ], + "source": [ + "#cal of work available from turbine\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.23, Page:93 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "p1=40*10**5;#initial temperature of air in pa\n", + "v1=0.15;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=2*10**5;#final temperature of air in pa\n", + "v2=0.15;#final volume of air in m^3\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"initial mass of air in bottle(m1)in kg \")\n", + "m1=(p1*v1)/(R*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"now final temperature(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "T2=127.36;#take T2=127.36 approx.\n", + "print(\"final mass of air in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "m2=0.821;#take m2=0.821 approx.\n", + "print(\"energy available for running of turbine due to emptying of bottle(W)in KJ\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"work available from turbine=639.27KJ\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb new file mode 100644 index 00000000..22ed40c9 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_2.ipynb @@ -0,0 +1,1506 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:First Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.1;pg no:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.1, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\n", + "a> work done on piston(W_piston)in KJ can be obtained as\n", + "W_piston=pdv\n", + "b> paddle work done on the system(W_paddle)=-4.88 KJ\n", + "net work done of system(W_net)in KJ\n", + "W_net=W_piston+W_paddle\n", + "so work done on system(W_net)=1.435 KJ\n" + ] + } + ], + "source": [ + "#cal of work done on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.1, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p=689.;#pressure of gas in cylinder in kpa\n", + "v1=0.04;#initial volume of fluid in m^3\n", + "v2=0.045;#final volume of fluid in m^3\n", + "W_paddle=-4.88;#paddle work done on the system in KJ\n", + "print(\"a> work done on piston(W_piston)in KJ can be obtained as\")\n", + "print(\"W_piston=pdv\")\n", + "#function y = f(v), y=p, endfunction\n", + "def fun1(x):\n", + "\ty=p\n", + "\treturn y\n", + "\n", + "W_piston=scipy.integrate.quad(fun1,v1,v2) \n", + "print(\"b> paddle work done on the system(W_paddle)=-4.88 KJ\")\n", + "print(\"net work done of system(W_net)in KJ\")\n", + "print(\"W_net=W_piston+W_paddle\")\n", + "print(\"so work done on system(W_net)=1.435 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.2;pg no:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.2, Page:76 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\n", + "as the vessel is rigid therefore work done shall be zero\n", + "W=0\n", + "from first law of thermodynamics,heat required(Q)in KJ\n", + "Q=U2-U1+W=Q=m(u2-u1)+W\n", + "so heat required = 5.6\n" + ] + } + ], + "source": [ + "#cal of heat required\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.2, Page:76 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\")\n", + "m=0.5;#mass of gas in kg\n", + "u1=26.6;#internal energy of gas at 200 degree celcius\n", + "u2=37.8;#internal energy of gas at 400 degree celcius\n", + "W=0;#work done by vessel in KJ\n", + "print(\"as the vessel is rigid therefore work done shall be zero\")\n", + "print(\"W=0\")\n", + "print(\"from first law of thermodynamics,heat required(Q)in KJ\")\n", + "print(\"Q=U2-U1+W=Q=m(u2-u1)+W\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat required =\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.3;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.3, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\n", + "by steady flow energy equation\n", + "q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\n", + "let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\n", + "q=h2-h1\n", + "rate of heat removal(Q)in KJ/hr\n", + "Q=m(h2-h1)=m*Cp*(T2-T1)\n", + "heat should be removed at the rate=KJ/hr 40500.0\n" + ] + } + ], + "source": [ + "#cal of \"heat should be removed\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.3, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\")\n", + "m=50;#rate at which carbon dioxide passing through heat exchanger in kg/hr\n", + "T2=800;#initial temperature of carbon dioxide in degree celcius\n", + "T1=50;#final temperature of carbon dioxide in degree celcius\n", + "Cp=1.08;#specific heat at constant pressure in KJ/kg K\n", + "print(\"by steady flow energy equation\")\n", + "print(\"q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\")\n", + "print(\"let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\")\n", + "print(\"q=h2-h1\")\n", + "print(\"rate of heat removal(Q)in KJ/hr\")\n", + "print(\"Q=m(h2-h1)=m*Cp*(T2-T1)\")\n", + "Q=m*Cp*(T2-T1)\n", + "print(\"heat should be removed at the rate=KJ/hr\"),round(Q)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.4;pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "#cal of work done by surrounding on system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.4, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 4\")\n", + "v=0.78;#volume of cylinder in m^3\n", + "p=101.325;#atmospheric pressure in kPa\n", + "print(\"total work done by the air at atmospheric pressure of 101.325 kPa\")\n", + "print(\"W=(pdv)cylinder+(pdv)air\")\n", + "print(\"0+p*(delta v)\")\n", + "print(\"work done by air(W)=-p*v in KJ\")\n", + "W=-p*v\n", + "print(\"so work done by surrounding on system=KJ\"),round(-W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.5:pg no:77" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.5, Page:77 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\n", + "given p*v^1.3=constant\n", + "assuming expansion to be quasi-static,the work may be given as\n", + "W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\n", + "from internal energy relation,change in specific internal energy\n", + "deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\n", + "total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\n", + "using p1*V1^1.3=p2*V2^1.3\n", + "V2=in m^3 0.85\n", + "take V2=.852 m^3\n", + "so deltaU in KJ\n", + "and W in KJ 246.67\n", + "from first law\n", + "deltaQ=KJ 113.47\n", + "heat interaction=113.5 KJ\n", + "work interaction=246.7 KJ\n", + "change in internal energy=-113.2 KJ\n" + ] + } + ], + "source": [ + "#cal of heat,work interaction and change in internal energy\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.5, Page:77 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\")\n", + "m=5;#mass of gas in kg\n", + "p1=1*10**3;#initial pressure of gas in KPa\n", + "V1=0.5;#initial volume of gas in m^3\n", + "p2=0.5*10**3;#final pressure of gas in KPa\n", + "n=1.3;#expansion constant\n", + "print(\"given p*v^1.3=constant\")\n", + "print(\"assuming expansion to be quasi-static,the work may be given as\")\n", + "print(\"W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\")\n", + "print(\"from internal energy relation,change in specific internal energy\")\n", + "print(\"deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\")\n", + "print(\"total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\")\n", + "print(\"using p1*V1^1.3=p2*V2^1.3\")\n", + "V2=V1*(p1/p2)**(1/1.3)\n", + "print(\"V2=in m^3\"),round(V2,2)\n", + "print(\"take V2=.852 m^3\")\n", + "V2=0.852;#final volume of gas in m^3\n", + "print(\"so deltaU in KJ\")\n", + "deltaU=1.8*(p2*V2-p1*V1)\n", + "W=(p2*V2-p1*V1)/(1-n)\n", + "print(\"and W in KJ\"),round(W,2)\n", + "print(\"from first law\")\n", + "deltaQ=deltaU+W\n", + "print(\"deltaQ=KJ\"),round(deltaQ,2)\n", + "print(\"heat interaction=113.5 KJ\")\n", + "print(\"work interaction=246.7 KJ\")\n", + "print(\"change in internal energy=-113.2 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.6;pg no:78" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.6, Page:78 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\n", + "final state volume(v2)in m^3\n", + "v2= 0.0\n", + "take v2=0.03 m^3\n", + "now internal energy of gas is given by U=7.5*p*v-425\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\n", + "deltaU=7.5*10^3*(p2*v2-p1*v1) 75.0\n", + "for quasi-static process\n", + "work(W) in KJ,W=p*dv\n", + "W=(p2*v2-p1*v1)/(1-n)\n", + "from first law of thermodynamics,\n", + "heat interaction(deltaQ)=deltaU+W\n", + "heat=50 KJ\n", + "work=25 KJ(-ve)\n", + "internal energy change=75 KJ\n", + "if 180 KJ heat transfer takes place,then from 1st law,\n", + "deltaQ= 50.0\n", + "since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\n", + "W=KJ 105.0\n" + ] + } + ], + "source": [ + "#cal of heat,workinternal energy change\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.6, Page:78 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\")\n", + "p1=1;#initial pressure of gas in MPa\n", + "v1=0.05;#initial volume of gas in m^3\n", + "p2=2;#final pressure of gas in MPa\n", + "n=1.4;#expansion constant\n", + "print(\"final state volume(v2)in m^3\")\n", + "v2=((p1/p2)**(1/1.4))*v1\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"take v2=0.03 m^3\")\n", + "v2=0.03;#final volume of gas in m^3\n", + "print(\"now internal energy of gas is given by U=7.5*p*v-425\")\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "print(\"deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\")\n", + "deltaU=7.5*10**3*(p2*v2-p1*v1)\n", + "print(\"deltaU=7.5*10^3*(p2*v2-p1*v1)\"),round(deltaU,2)\n", + "print(\"for quasi-static process\")\n", + "print(\"work(W) in KJ,W=p*dv\")\n", + "W=((p2*v2-p1*v1)/(1-n))*10**3\n", + "print(\"W=(p2*v2-p1*v1)/(1-n)\")\n", + "print(\"from first law of thermodynamics,\")\n", + "print(\"heat interaction(deltaQ)=deltaU+W\")\n", + "deltaQ=deltaU+W\n", + "print(\"heat=50 KJ\")\n", + "print(\"work=25 KJ(-ve)\")\n", + "print(\"internal energy change=75 KJ\")\n", + "print(\"if 180 KJ heat transfer takes place,then from 1st law,\")\n", + "print(\"deltaQ=\"),round(deltaQ,2)\n", + "print(\"since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\")\n", + "W=180-75\n", + "print(\"W=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.7;pg no:79" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.7, Page:79 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\n", + "characteristics gas constant(R)in J/kg K\n", + "R= 519.64\n", + "take R=0.520,KJ/kg K\n", + "Cv=inKJ/kg K 1.18\n", + "y= 1.44\n", + "for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\n", + "now,T2=in K\n", + "work(W)in KJ/kg\n", + "W= -257.78\n", + "for polytropic process,heat(Q)in KJ/K\n", + "Q= 82.02\n" + ] + } + ], + "source": [ + "#cal of work and heat\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.7, Page:79 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\")\n", + "M=16;#molecular weight of gas\n", + "p1=101.3;#initial pressure of gas in KPa\n", + "p2=600;#final pressure of gas in KPa\n", + "T1=(273+20);#initial temperature of gas in K\n", + "R1=8.3143*10**3;#universal gas constant in J/kg K\n", + "Cp=1.7;#specific heat at constant pressure in KJ/kg K\n", + "n=1.3;#expansion constant\n", + "T2=((p2/p1)**(n-1/n))\n", + "print(\"characteristics gas constant(R)in J/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"take R=0.520,KJ/kg K\")\n", + "R=0.520;#characteristics gas constant in KJ/kg K\n", + "Cv=Cp-R\n", + "print(\"Cv=inKJ/kg K\"),round(Cv,2)\n", + "y=Cp/Cv\n", + "print(\"y=\"),round(y,2)\n", + "y=1.44;#ratio of specific heat at constant pressure to constant volume\n", + "print(\"for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"now,T2=in K\")\n", + "print(\"work(W)in KJ/kg\")\n", + "W=R*((T1-T2)/(n-1))\n", + "print(\"W=\"),round(W,2)\n", + "W=257.78034;#work done in KJ/kg\n", + "print(\"for polytropic process,heat(Q)in KJ/K\")\n", + "Q=((y-n)/(y-1))*W\n", + "print(\"Q=\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.8;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.8, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\n", + "applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\n", + "h1+C1^2/2=h2+C2^2/2\n", + "given that C1=0,negligible inlet velocity\n", + "so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\n", + "exit velocity(C2)in m/s 1098.2\n" + ] + } + ], + "source": [ + "#cal of exit velocity\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.8, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\")\n", + "T1=(627+273);#initial temperature of air in nozzle in K\n", + "T2=(27+273);#temperature at which air leaves nozzle in K\n", + "Cp=1.005*10**3;#specific heat at constant pressure in J/kg K\n", + "C2=math.sqrt(2*Cp*(T1-T2))\n", + "print(\"applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\")\n", + "print(\"h1+C1^2/2=h2+C2^2/2\")\n", + "print(\"given that C1=0,negligible inlet velocity\")\n", + "print(\"so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\")\n", + "print(\"exit velocity(C2)in m/s\"),round(C2,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.9;pg no:80" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.9, Page:80 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\n", + "work interaction,W=-200 KJ/kg of air\n", + "increase in enthalpy of air=100 KJ/kg of air\n", + "total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\n", + "writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\n", + "h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\n", + "assuming no change in potential energy and kinetic energy\n", + "deltaK.E=deltaP.=0\n", + "total heat interaction(Q)in KJ/kg of air\n", + "Q= -100.0\n", + "Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\n", + "so heat transferred to atmosphere(Q2)in KJ/kg of air -10.0\n" + ] + } + ], + "source": [ + "#cal of heat transferred to atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.9, Page:80 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\")\n", + "W=-200;#shaft work in KJ/kg of air\n", + "deltah=100;#increase in enthalpy in KJ/kg of air\n", + "Q1=-90;#heat transferred to water in KJ/kg of air\n", + "print(\"work interaction,W=-200 KJ/kg of air\")\n", + "print(\"increase in enthalpy of air=100 KJ/kg of air\")\n", + "print(\"total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\")\n", + "print(\"writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\")\n", + "print(\"h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\")\n", + "print(\"assuming no change in potential energy and kinetic energy\")\n", + "print(\"deltaK.E=deltaP.=0\")\n", + "print(\"total heat interaction(Q)in KJ/kg of air\")\n", + "Q=deltah+W\n", + "print(\"Q=\"),round(Q,2)\n", + "Q2=Q-Q1\n", + "print(\"Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\")\n", + "print(\"so heat transferred to atmosphere(Q2)in KJ/kg of air\"),round(Q2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.10;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.10, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\n", + "above problem can be solved using steady flow energy equations upon hot water flow\n", + "Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\n", + "here total heat to be supplied(Q)in kcal/hr\n", + "so heat lost by water(-ve),Q=-25000 kcal/hr\n", + "there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\n", + "Q+m*(h1+g*z1)=m*(h2+g*z2)\n", + "so water circulation rate(m)in kg/hr\n", + "so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\n", + "water circulation rate=(m)in kg/min 11.91\n" + ] + } + ], + "source": [ + "#cal of water circulation rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.10, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\")\n", + "n=500;#total number of persons\n", + "q=50;#heat requirement per person in kcal/hr\n", + "h1=80;#enthalpy of hot water enter in pipe in kcal/kg\n", + "h2=45;#enthalpy of hot water leaves the pipe in kcal/kg\n", + "g=9.81;#acceleartion due to gravity in m/s^2\n", + "deltaz=10;#difference in elevation of inlet and exit pipe in m\n", + "print(\"above problem can be solved using steady flow energy equations upon hot water flow\")\n", + "print(\"Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\")\n", + "print(\"here total heat to be supplied(Q)in kcal/hr\")\n", + "Q=n*q\n", + "print(\"so heat lost by water(-ve),Q=-25000 kcal/hr\")\n", + "Q=-25000#heat loss by water in kcal/hr\n", + "print(\"there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\")\n", + "print(\"Q+m*(h1+g*z1)=m*(h2+g*z2)\")\n", + "print(\"so water circulation rate(m)in kg/hr\")\n", + "print(\"so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\")\n", + "m=Q*10**3*4.18/(g*deltaz-(h1-h2)*10**3*4.18)\n", + "m=m/60\n", + "print(\"water circulation rate=(m)in kg/min\"),round(m,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.11;pg no:81" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.11, Page:81 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\n", + "let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\n", + "energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\n", + "m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\n", + "so steam suppling rate(m)in kg/s per kg of water\n", + "m= 0.124\n", + "NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\n" + ] + } + ], + "source": [ + "#cal of steam suppling rate\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.11, Page:81 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\")\n", + "v1=50;#velocity of steam entering injector in m/s\n", + "v2=25;#velocity of mixture leave injector in m/s\n", + "h1=720;#enthalpy of steam entering injector in kcal/kg\n", + "h2=24.6;#enthalpy of water entering injector in kcal/kg\n", + "h3=100;#enthalpy of steam leaving injector in kcal/kg\n", + "h4=100;#enthalpy of water leaving injector in kcal/kg\n", + "deltaz=2;#depth from axis of injector in m\n", + "q=12;#heat loss from injector to surrounding through injector\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\")\n", + "print(\"energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\")\n", + "print(\"m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\")\n", + "print(\"so steam suppling rate(m)in kg/s per kg of water\")\n", + "m=((h3*10**3*4.18+v2**2/2)-(h2*10**3*4.18+g*deltaz))/((v1**2/2+h1*10**3*4.18)-(h3*10**3*4.18+v2**2/2)-(q*10**3*4.18))\n", + "print(\"m=\"),round(m,3)\n", + "print(\"NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.12;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.12, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\n", + "here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\n", + "displacement work, W=(p.dv)cylinder+(p.dv)ballon\n", + "(p.dv)cylinder=0,as cylinder is rigid\n", + "so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\n", + "and work done by atmosphere=KJ 40.52\n" + ] + } + ], + "source": [ + "#cal of work done by atmosphere\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.12, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\")\n", + "p=1.013*10**5;#atmospheric pressure in pa\n", + "deltav=0.4;#change in volume in m^3\n", + "print(\"here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\")\n", + "print(\"displacement work, W=(p.dv)cylinder+(p.dv)ballon\")\n", + "print(\"(p.dv)cylinder=0,as cylinder is rigid\")\n", + "print(\"so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\")\n", + "W=(p*deltav)/1000\n", + "print(\"and work done by atmosphere=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.13;pg no:82" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.13, Page:82 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\n", + "work done by turbine(Wt)in J#s is 25% of heat added i.e Wt= 1250.0\n", + "heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\n", + "Qrejected= 3750.0\n", + "and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\n", + "Wp=(-) 10.0\n", + "capacity of generator(W)=in Kw 1.24\n" + ] + } + ], + "source": [ + "#cal of capacity of generator\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.13, Page:82 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\")\n", + "Qadd=5000;#heat supplied in boiler in J#s\n", + "Wt=.25*Qadd\n", + "print(\"work done by turbine(Wt)in J#s is 25% of heat added i.e\"),\n", + "print(\"Wt=\"),round(Wt,2)\n", + "print(\"heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\")\n", + "Qrejected=.75*Qadd\n", + "print(\"Qrejected=\"),round(Qrejected,2)\n", + "print(\"and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\")\n", + "Wp=0.002*Qadd\n", + "print(\"Wp=(-)\"),round(Wp,2)\n", + "W=(Wt-Wp)/1000\n", + "print(\"capacity of generator(W)=in Kw\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.14;pg no:83" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.14, Page:83 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\n", + "in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\n", + "h1+Q1_2=h2\n", + "Q1_2=h2-h1\n", + "so heat transfer to air in heat exchanger(Q1_2)in KJ\n", + "Q1_2= 726.61\n", + "in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\n", + "h2+C2^2#2=h3+C3^2/2+Wt\n", + "Wt=(h2-h3)+(C2^2-C3^2)/2\n", + "so power output from turbine(Wt)in KJ#s\n", + "Wt= 1.0\n", + "applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\n", + "h3+C=h4+C4^2/2\n", + "C4^2#2=(h3-h4)+C3^2/2\n", + "velocity at exit of nozzle(C4)in m#s\n", + "C4= 14.3\n" + ] + } + ], + "source": [ + "#cal of velocity at exit of nozzle\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.14, Page:83 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\")\n", + "T1=(27+273);##ambient temperature in K\n", + "T2=(750+273);##temperature of heated air inside heat exchanger in K\n", + "T3=(600+273);##temperature of hot air leaves turbine in K\n", + "T4=(500+273);##temperature at which air leaves nozzle in K\n", + "Cp=1.005;##specific heat at constant pressure in KJ#kg K\n", + "C2=50;##velocity of hot air enter into gas turbine in m#s\n", + "C3=60;##velocity of air leaving turbine enters a nozzle in m#s\n", + "print(\"in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\")\n", + "print(\"h1+Q1_2=h2\")\n", + "print(\"Q1_2=h2-h1\")\n", + "print(\"so heat transfer to air in heat exchanger(Q1_2)in KJ\")\n", + "Q1_2=Cp*(T2-T1)\n", + "print(\"Q1_2=\"),round(Q1_2,2)\n", + "print(\"in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\")\n", + "print(\"h2+C2^2#2=h3+C3^2/2+Wt\")\n", + "print(\"Wt=(h2-h3)+(C2^2-C3^2)/2\")\n", + "print(\"so power output from turbine(Wt)in KJ#s\")\n", + "Wt=Cp*(T2-T3)+(C2**2-C3**2)*10**-3/2\n", + "print(\"Wt=\"),round(Cp,2)\n", + "print(\"applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\")\n", + "print(\"h3+C=h4+C4^2/2\")\n", + "print(\"C4^2#2=(h3-h4)+C3^2/2\")\n", + "print(\"velocity at exit of nozzle(C4)in m#s\")\n", + "C4=math.sqrt(2*(Cp*(T3-T4)+C3**2*10**-3/2))\n", + "print(\"C4=\"),round(C4,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.15;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.15, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\n", + "for constant pressure heating,say state changes from 1 to 2\n", + "Wa=p1*dv\n", + "Wa=p1*(v2-v1)\n", + "it is given that v2=2v1\n", + "so Wa=p1*v1=R*T1\n", + "for subsequent expansion at constant temperature say state from 2 to 3\n", + "also given that v3/v1=6,v3/v2=3\n", + "so work=Wb=p*dv\n", + "on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\n", + "temperature at 2 can be given by perfect gas consideration as,\n", + "T2/T1=v2/v1\n", + "or T2=2*T1\n", + "now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\n", + "so W in KJ= 10632.69\n" + ] + } + ], + "source": [ + "#cal of total work done by ai\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.15, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\")\n", + "T1=400;##initial temperature of gas in K\n", + "R=8.314;##gas constant in \n", + "print(\"for constant pressure heating,say state changes from 1 to 2\")\n", + "print(\"Wa=p1*dv\")\n", + "print(\"Wa=p1*(v2-v1)\")\n", + "print(\"it is given that v2=2v1\")\n", + "print(\"so Wa=p1*v1=R*T1\")\n", + "print(\"for subsequent expansion at constant temperature say state from 2 to 3\")\n", + "print(\"also given that v3/v1=6,v3/v2=3\")\n", + "print(\"so work=Wb=p*dv\")\n", + "print(\"on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\")\n", + "print(\"temperature at 2 can be given by perfect gas consideration as,\")\n", + "print(\"T2/T1=v2/v1\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\")\n", + "W=R*T1+2*R*T1*math.log(3)\n", + "print(\"so W in KJ=\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.16;pg no:85" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.16, Page:85 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\n", + "NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \n", + "we get W=(Vf-Vi)*((Pi+Pf)/2)\n", + "also final volume of gas in m^3 is Vf=3*Vi\n", + "now work done by gas(W)in J 750000.0\n" + ] + } + ], + "source": [ + "#cal of work done by gas\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.16, Page:85 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\")\n", + "Pi=0.5*10**6;##initial pressure of gas in pa\n", + "Vi=0.5;##initial volume of gas in m^3\n", + "Pf=1*10**6;##final pressure of gas in pa\n", + "print(\"NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \")\n", + "print(\"we get W=(Vf-Vi)*((Pi+Pf)/2)\")\n", + "print(\"also final volume of gas in m^3 is Vf=3*Vi\") \n", + "Vf=3*Vi\n", + "W=(Vf-Vi)*((Pi+Pf)/2)\n", + "print(\"now work done by gas(W)in J\"),round(W,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.17;pg no:87" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.17, Page:87 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\n", + "with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\n", + "adiabatic index of compression of H2 can be obtained as,\n", + "Cp_H2=\n", + "y_H2=Cp_H2/(Cp_H2-R_H2) 1.4\n", + "adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\n", + "y_N2= 1.4\n", + "i>for hydrogen,p1*v1^y=p2*v2^y\n", + "so final pressure of H2(p2)in pa\n", + "p2= 1324078.55\n", + "ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \n", + "partition work=0\n", + "iii>work done upon H2(W_H2)in J,\n", + "W_H2= -200054.06\n", + "work done upon H2(W_H2)=-2*10^5 J\n", + "so work done by N2(W_N2)=2*10^5 J \n", + "iv>heat added to N2 can be obtained using first law of thermodynamics as\n", + "Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\n", + "final temperature of N2 can be obtained considering it as perfect gas\n", + "therefore, T2=(p2*v2*T1)#(p1*v1)\n", + "here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\n", + "p2=1.324*10^6 pa,v2=0.75 m^3\n", + "so now final temperature of N2(T2)in K= 1191.67\n", + "mass of N2(m)in kg= 2.81\n", + "specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2= 1.0\n", + "heat added to N2,(Q_N2)in KJ\n", + "Q_N2= 2052.89\n" + ] + } + ], + "source": [ + "#cal of \n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.17, Page:87 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\")\n", + "Cp_H2=14.307;##specific heat of H2 at constant pressure in KJ#kg K\n", + "R_H2=4.1240;##gas constant for H2 in KJ#kg K\n", + "Cp_N2=1.039;##specific heat of N2 at constant pressure in KJ#kg K\n", + "R_N2=0.2968;##gas constant for N2 in KJ#kg K\n", + "T1=(27+273);##ambient temperature in K\n", + "v1=0.5;##initial volume of H2 in m^3\n", + "p1=0.5*10**6;##initial pressure of H2 in pa \n", + "v2=0.25;##final volume of H2 in m^3 \n", + "p2=1.324*10**6;##final pressure of H2 in pa\n", + "print(\"with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\")\n", + "print(\"adiabatic index of compression of H2 can be obtained as,\")\n", + "print(\"Cp_H2=\")\n", + "y_H2=Cp_H2/(Cp_H2-R_H2)\n", + "print(\"y_H2=Cp_H2/(Cp_H2-R_H2)\"),round(y_H2,2)\n", + "print(\"adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\")\n", + "y_N2=Cp_N2/(Cp_N2-R_N2)\n", + "print(\"y_N2=\"),round(y_N2,2)\n", + "print(\"i>for hydrogen,p1*v1^y=p2*v2^y\")\n", + "print(\"so final pressure of H2(p2)in pa\")\n", + "p2=p1*(v1/v2)**y_H2\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \")\n", + "print(\"partition work=0\")\n", + "print(\"iii>work done upon H2(W_H2)in J,\")\n", + "W_H2=(p1*v1-p2*v2)/(y_H2-1)\n", + "print(\"W_H2=\"),round(W_H2,2)\n", + "print(\"work done upon H2(W_H2)=-2*10^5 J\")\n", + "W_N2=2*10**5;##work done by N2 in J\n", + "print(\"so work done by N2(W_N2)=2*10^5 J \")\n", + "print(\"iv>heat added to N2 can be obtained using first law of thermodynamics as\")\n", + "print(\"Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\")\n", + "print(\"final temperature of N2 can be obtained considering it as perfect gas\")\n", + "print(\"therefore, T2=(p2*v2*T1)#(p1*v1)\")\n", + "print(\"here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\")\n", + "print(\"p2=1.324*10^6 pa,v2=0.75 m^3\")\n", + "v2=0.75;##final volume of N2 in m^3\n", + "T2=(p2*v2*T1)/(p1*v1)\n", + "print(\"so now final temperature of N2(T2)in K=\"),round(T2,2)\n", + "T2=1191.6;##T2 approx. equal to 1191.6 K\n", + "m=(p1*v1)/(R_N2*1000*T1)\n", + "print(\"mass of N2(m)in kg=\"),round(m,2)\n", + "m=2.8;##m approx equal to 2.8 kg\n", + "Cv_N2=Cp_N2-R_N2\n", + "print(\"specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2=\"),round(Cv_N2)\n", + "print(\"heat added to N2,(Q_N2)in KJ\")\n", + "Q_N2=((m*Cv_N2*1000*(T2-T1))+W_N2)/1000\n", + "print(\"Q_N2=\"),round(Q_N2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.18;pg no:88" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.18, Page:88 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\n", + "let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\n", + "initial mass of air(m1)in kg\n", + "m1= 9.29\n", + "for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\n", + "T2=in K 237.64\n", + "final mass of air left in tank(m2)in kg\n", + "m2= 2.97\n", + "writing down energy equation for unsteady flow system\n", + "(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\n", + "or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\n", + "kinetic energy available for running turbine(W)in KJ\n", + "W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n", + "amount of work available=KJ 482.67\n" + ] + } + ], + "source": [ + "#cal of amount of work available\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.18, Page:88 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "p2=1.013*10**5;#atmospheric pressure in pa\n", + "v1=2;#initial volume of air in m^3\n", + "v2=v1;#final volume of air in m^3\n", + "T1=375;#initial temperature of air in K\n", + "Cp_air=1.003;#specific heat at consatnt pressure in KJ/kg K\n", + "Cv_air=0.716;#specific heat at consatnt volume in KJ/kg K\n", + "R_air=0.287;#gas constant in KJ/kg K\n", + "y=1.4;#expansion constant for air\n", + "print(\"let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\")\n", + "print(\"initial mass of air(m1)in kg\")\n", + "m1=(p1*v1)/(R_air*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=in K\"),round(T2,2)\n", + "print(\"final mass of air left in tank(m2)in kg\")\n", + "m2=(p2*v2)/(R_air*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"writing down energy equation for unsteady flow system\")\n", + "print(\"(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\")\n", + "print(\"or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\")\n", + "print(\"kinetic energy available for running turbine(W)in KJ\")\n", + "print(\"W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "print(\"W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n", + "W=((m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2)/1000\n", + "print(\"amount of work available=KJ\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.19;pg no:89" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.19, Page:89 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\n", + "using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\n", + "n1= 0.1\n", + "now n2= 0.12\n", + "for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\n", + "deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\n", + "final temperature of gas(T3)in K\n", + "T3= 409.09\n", + "using perfect gas equation for final mixture,\n", + "final pressure of gas(p3)in Mpa\n", + "p3= 750000.0\n", + "so final pressure and temperature =0.75 Mpa and 409.11 K\n" + ] + } + ], + "source": [ + "#cal of final pressure and temperature\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.19, Page:89 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\")\n", + "p1=0.5*10**6;#initial pressure of air in pa\n", + "v1=0.5;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=1*10**6;#final pressure of air in pa\n", + "v2=0.5;#final volume of air in m^3\n", + "T2=500;#final temperature of air in K\n", + "R=8314;#gas constant in J/kg K\n", + "Cv=0.716;#specific heat at constant volume in KJ/kg K\n", + "print(\"using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\")\n", + "n1=(p1*v1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "n2=(p2*v2)/(R*T2)\n", + "print(\"now n2=\"),round(n2,2)\n", + "print(\"for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\")\n", + "deltaU=0;#change in internal energy\n", + "print(\"deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\")\n", + "print(\"final temperature of gas(T3)in K\")\n", + "T3=(deltaU+Cv*(n1*T1+n2*T2))/(Cv*(n1+n2))\n", + "print(\"T3=\"),round(T3,2)\n", + "print(\"using perfect gas equation for final mixture,\")\n", + "print(\"final pressure of gas(p3)in Mpa\")\n", + "p3=((n1+n2)*R*T3)/(v1+v2)\n", + "print(\"p3=\"),round(p3,3)\n", + "print(\"so final pressure and temperature =0.75 Mpa and 409.11 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.20;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.20, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\n", + "printlacement work,W=p*(v1-v2)in N.m -50675.0\n", + "so heat transfer(Q)in N.m\n", + "Q=-W 50675.0\n" + ] + } + ], + "source": [ + "#cal of heat transfer\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.20, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\")\n", + "v1=0;#initial volume of air inside bottle in m^3\n", + "v2=0.5;#final volume of air inside bottle in m^3\n", + "p=1.0135*10**5;#atmospheric pressure in pa\n", + "W=p*(v1-v2)\n", + "print(\"printlacement work,W=p*(v1-v2)in N.m\"),round(W,2)\n", + "print(\"so heat transfer(Q)in N.m\")\n", + "Q=-W\n", + "print(\"Q=-W\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.21;pg no:90" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.21, Page:90 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\n", + "here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\n", + "(p2/p1)^((y-1)/y)=(T2/T1)\n", + "final temperature of air(T2)in K\n", + "T2= 113.34\n", + "by perfect gas law,initial mass in bottle(m1)in kg\n", + "m1= 11.69\n", + "final mass in bottle(m2)in kg\n", + "m2= 0.92\n", + "energy available for running turbo generator or work(W)in KJ\n", + "W+(m1-m2)*h2=m1*u1-m2*u2\n", + "W= 1325.42\n", + "this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\n", + "turbogenerator actual output(P1)=5 KJ/s\n", + "input to turbogenerator(P2)in KJ/s\n", + "time duration for which turbogenerator can be run(deltat)in seconds\n", + "deltat= 159.05\n", + "duration=160 seconds approx.\n" + ] + } + ], + "source": [ + "#cal of time duration for which turbogenerator can be run\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.21, Page:90 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\")\n", + "p1=35.*10**5;#initial pressure of air in pa\n", + "v1=0.3;#initial volume of air in m^3\n", + "T1=(313.);#initial temperature of air in K\n", + "p2=1.*10**5;#final pressure of air in pa\n", + "v2=0.3;#final volume of air in m^3\n", + "y=1.4;#expansion constant\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\")\n", + "print(\"(p2/p1)^((y-1)/y)=(T2/T1)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"by perfect gas law,initial mass in bottle(m1)in kg\")\n", + "m1=(p1*v1)/(R*1000.*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"final mass in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000.*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"energy available for running turbo generator or work(W)in KJ\")\n", + "print(\"W+(m1-m2)*h2=m1*u1-m2*u2\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\")\n", + "print(\"turbogenerator actual output(P1)=5 KJ/s\")\n", + "P1=5;#turbogenerator actual output in KJ/s\n", + "print(\"input to turbogenerator(P2)in KJ/s\")\n", + "P2=P1/0.6\n", + "print(\"time duration for which turbogenerator can be run(deltat)in seconds\")\n", + "deltat=W/P2\n", + "print(\"deltat=\"),round(deltat,2)\n", + "print(\"duration=160 seconds approx.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.22;pg no:91" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.22, Page:91 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\n", + "different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\n", + "process 1-2 is polytropic process with index 1.2\n", + "(T2/T1)=(p2/p1)^((n-1)/n)\n", + "final temperature of air(T2)in K\n", + "T2= 457.68\n", + "at state 1,p1*v1=m*R*T1\n", + "initial volume of air(v1)in m^3\n", + "v1= 2.01\n", + "final volume of air(v2)in m^3\n", + "for process 1-2,v2= 0.53\n", + "for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\n", + "v3=v2*T3/T2 in m^3\n", + "here process 3-1 is isothermal process so T1=T3\n", + "during process 1-2 the compression work(W1_2)in KJ\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "work during process 2-3(W2_3)in KJ,\n", + "W2_3=p2*(v3-v2)/1000\n", + "work during process 3-1(W3_1)in KJ\n", + "W3_1= 485.0\n", + "net work done(W_net)in KJ\n", + "W_net=W1_2+W2_3+W3_1 -71.28\n", + "net work=-71.27 KJ\n", + "here -ve workshows work done upon the system.since it is cycle,so\n", + "W_net=Q_net\n", + "phi dW=phi dQ=-71.27 KJ\n", + "heat transferred from system=71.27 KJ\n" + ] + } + ], + "source": [ + "#cal of network,heat transferred from system\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "import math\n", + "print\"Example 3.22, Page:91 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\")\n", + "p1=1.5*10**5;#initial pressure of air in pa\n", + "T1=(77+273);#initial temperature of air in K\n", + "p2=7.5*10**5;#final pressure of air in pa\n", + "n=1.2;#expansion constant for process 1-2\n", + "R=0.287;#gas constant in KJ/kg K\n", + "m=3.;#mass of air in kg\n", + "print(\"different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\")\n", + "print(\"process 1-2 is polytropic process with index 1.2\")\n", + "print(\"(T2/T1)=(p2/p1)^((n-1)/n)\")\n", + "print(\"final temperature of air(T2)in K\")\n", + "T2=T1*((p2/p1)**((n-1)/n))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"at state 1,p1*v1=m*R*T1\")\n", + "print(\"initial volume of air(v1)in m^3\")\n", + "v1=(m*R*1000*T1)/p1\n", + "print(\"v1=\"),round(v1,2)\n", + "print(\"final volume of air(v2)in m^3\")\n", + "v2=((p1*v1**n)/p2)**(1/n)\n", + "print(\"for process 1-2,v2=\"),round(v2,2)\n", + "print(\"for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\")\n", + "print(\"v3=v2*T3/T2 in m^3\")\n", + "print(\"here process 3-1 is isothermal process so T1=T3\")\n", + "T3=T1;#process 3-1 is isothermal\n", + "v3=v2*T3/T2\n", + "print(\"during process 1-2 the compression work(W1_2)in KJ\")\n", + "print(\"W1_2=(m*R*(T2-T1)/(1-n))\")\n", + "W1_2=(m*R*(T2-T1)/(1-n))\n", + "print(\"work during process 2-3(W2_3)in KJ,\")\n", + "print(\"W2_3=p2*(v3-v2)/1000\")\n", + "W2_3=p2*(v3-v2)/1000\n", + "print(\"work during process 3-1(W3_1)in KJ\")\n", + "p3=p2;#pressure is constant for process 2-3\n", + "W3_1=p3*v3*math.log(v1/v3)/1000\n", + "print(\"W3_1=\"),round(W3_1,2)\n", + "print(\"net work done(W_net)in KJ\")\n", + "W_net=W1_2+W2_3+W3_1\n", + "print(\"W_net=W1_2+W2_3+W3_1\"),round(W_net,2)\n", + "print(\"net work=-71.27 KJ\")\n", + "print(\"here -ve workshows work done upon the system.since it is cycle,so\")\n", + "print(\"W_net=Q_net\")\n", + "print(\"phi dW=phi dQ=-71.27 KJ\")\n", + "print(\"heat transferred from system=71.27 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 3.23;pg no:93" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 3.23, Page:93 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\n", + "initial mass of air in bottle(m1)in kg \n", + "m1= 6.97\n", + "now final temperature(T2)in K\n", + "T2= 0.0\n", + "final mass of air in bottle(m2)in kg\n", + "m2= 0.82\n", + "energy available for running of turbine due to emptying of bottle(W)in KJ\n", + "W= 639.09\n", + "work available from turbine=639.27KJ\n" + ] + } + ], + "source": [ + "#cal of work available from turbine\n", + "#intiation of all variables\n", + "# Chapter 3\n", + "print\"Example 3.23, Page:93 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "y=1.4;#expansion constant \n", + "p1=40*10**5;#initial temperature of air in pa\n", + "v1=0.15;#initial volume of air in m^3\n", + "T1=(27+273);#initial temperature of air in K\n", + "p2=2*10**5;#final temperature of air in pa\n", + "v2=0.15;#final volume of air in m^3\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"initial mass of air in bottle(m1)in kg \")\n", + "m1=(p1*v1)/(R*1000*T1)\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"now final temperature(T2)in K\")\n", + "T2=T1*(p2/p1)**((y-1)/y)\n", + "print(\"T2=\"),round(T2,2)\n", + "T2=127.36;#take T2=127.36 approx.\n", + "print(\"final mass of air in bottle(m2)in kg\")\n", + "m2=(p2*v2)/(R*1000*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "m2=0.821;#take m2=0.821 approx.\n", + "print(\"energy available for running of turbine due to emptying of bottle(W)in KJ\")\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n", + "print(\"W=\"),round(W,2)\n", + "print(\"work available from turbine=639.27KJ\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter4.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4.ipynb new file mode 100755 index 00000000..bb4a3703 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4.ipynb @@ -0,0 +1,1070 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Second Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.1;pg no: 113" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.1, Page:113 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\n", + "NOTE=>This question is fully theoritical hence cannot be solve using scilab.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.1, Page:113 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\")\n", + "print(\"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.2;pg no: 114" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.2, Page:114 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\n", + "in carnot engine from thermodynamics temperature scale\n", + "Q1/Q2=T1/T2\n", + "W=Q1-Q2=200 KJ\n", + "from above equations Q1 in KJ is given by\n", + "Q1= 349.61\n", + "and Q2 in KJ\n", + "Q2=Q1-200 149.61\n", + "so heat supplied(Q1) in KJ 349.6\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.2, Page:114 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\")\n", + "T1=(400.+273.);#temperature of source in K\n", + "T2=(15.+273.);#temperature of sink in K\n", + "W=200.;#work done in KJ\n", + "print(\"in carnot engine from thermodynamics temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "print(\"W=Q1-Q2=200 KJ\")\n", + "print(\"from above equations Q1 in KJ is given by\")\n", + "Q1=(200*T1)/(T1-T2)\n", + "print(\"Q1=\"),round(Q1,2)\n", + "print(\"and Q2 in KJ\")\n", + "Q2=Q1-200\n", + "print(\"Q2=Q1-200\"),round(Q2,2)\n", + "print(\"so heat supplied(Q1) in KJ\"),round(Q1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.3;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.3, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\n", + "from thermodynamic temperature scale\n", + "Q1/Q2=T1/T2\n", + "so Q1=Q2*(T1/T2)in KJ/s 2.27\n", + "power/work input required(W)=Q1-Q2 in KJ/s \n", + "power required for driving refrigerator=W in KW 0.274\n" + ] + } + ], + "source": [ + "#cal of power required for driving refrigerator\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.3, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\")\n", + "T1=315.;#temperature of reservoir 1 in K\n", + "T2=277.;#temperature of reservoir 2 in K\n", + "Q2=2.;#heat extracted in KJ/s\n", + "print(\"from thermodynamic temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "Q1=Q2*(T1/T2)\n", + "print(\"so Q1=Q2*(T1/T2)in KJ/s\"),round(Q1,2)\n", + "print(\"power/work input required(W)=Q1-Q2 in KJ/s \")\n", + "W=Q1-Q2\n", + "print(\"power required for driving refrigerator=W in KW\"),round(W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.4;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.4, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\n", + "we can writefor heat engine,Q1/Q2=T1/T2\n", + "so Q2=Q1*(T2/T1) in KJ 545.45\n", + "so We=in KJ 1454.55\n", + "for refrigerator,Q3/Q4=T3/T4 eq 1\n", + "now We-Wr=300\n", + "so Wr=We-300 in KJ 1154.55\n", + "and Wr=Q4-Q3=1154.55 KJ eq 2 \n", + "solving eq1 and eq 2 we get\n", + "Q4=in KJ 8659.13\n", + "and Q3=in KJ 7504.58\n", + "total heat transferred to low teperature reservoir(Q)=in KJ 9204.58\n", + "hence heat transferred to refrigerant=Q3 in KJ 7504.58\n", + "and heat transferred to low temperature reservoir=Q in KJ 9204.58\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.4, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\")\n", + "T1=(827.+273.);#temperature of high temperature reservoir in K\n", + "T2=(27.+273.);#temperature of low temperature reservoir in K\n", + "T3=(-13.+273.);#temperature of reservoir 3 in K\n", + "Q1=2000.;#heat ejected by reservoir 1 in KJ\n", + "print(\"we can writefor heat engine,Q1/Q2=T1/T2\")\n", + "Q2=Q1*(T2/T1)\n", + "print(\"so Q2=Q1*(T2/T1) in KJ\"),round(Q2,2)\n", + "We=Q1-Q2\n", + "print(\"so We=in KJ\"),round(We,2)\n", + "print(\"for refrigerator,Q3/Q4=T3/T4 eq 1\")\n", + "T4=T2;#temperature of low temperature reservoir in K\n", + "print(\"now We-Wr=300\")\n", + "Wr=We-300.\n", + "print(\"so Wr=We-300 in KJ\"),round(Wr,2)\n", + "print(\"and Wr=Q4-Q3=1154.55 KJ eq 2 \")\n", + "print(\"solving eq1 and eq 2 we get\")\n", + "Q4=(1154.55*T4)/(T4-T3)\n", + "print(\"Q4=in KJ\"),round(Q4,2)\n", + "Q3=Q4-Wr\n", + "print(\"and Q3=in KJ\"),round(Q3,2)\n", + "Q=Q2+Q4\n", + "print(\"total heat transferred to low teperature reservoir(Q)=in KJ\"),round(Q,2)\n", + "print(\"hence heat transferred to refrigerant=Q3 in KJ\"),round(Q3,2)\n", + "print(\"and heat transferred to low temperature reservoir=Q in KJ\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.5;pg no: 116" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.5, Page:116 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\n", + "COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\n", + "also we know K=Q1/Q2=T1/T2\n", + "so K=T1/T2 1.1\n", + "so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K)) 11.0\n", + "also COP_HP=Q1/W\n", + "W=Q1/COin MJ/Hr 3.03\n", + "or W=1000*W/3600 in KW 3.03\n", + "so minimum power required(W)in KW 3.03\n" + ] + } + ], + "source": [ + "#cal of minimum power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.5, Page:116 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\")\n", + "T1=(25+273.15);#temperature of inside of house in K\n", + "T2=(-1+273.15);#outside temperature in K\n", + "Q1=125;#heating load in MJ/Hr\n", + "print(\"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\")\n", + "print(\"also we know K=Q1/Q2=T1/T2\")\n", + "K=T1/T2\n", + "print(\"so K=T1/T2\"),round(K,2)\n", + "COP_HP=1/(1-(1/K))\n", + "print(\"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K))\"),round(COP_HP)\n", + "print(\"also COP_HP=Q1/W\")\n", + "W=Q1/COP_HP\n", + "W=1000*W/3600\n", + "print(\"W=Q1/COin MJ/Hr\"),round(W,2)\n", + "print(\"or W=1000*W/3600 in KW\"),round(W,2)\n", + "print(\"so minimum power required(W)in KW \"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.6;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.6, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\n", + "cold storage plant can be considered as refrigerator operating between given temperatures limits\n", + "capacity of plant=heat to be extracted=Q2 in KW\n", + "we know that,one ton of refrigeration as 3.52 KW \n", + "so Q2=Q2*3.52 in KW 140.8\n", + "carnot COP of plant(COP_carnot)= 5.18\n", + "performance is 1/4 of its carnot COP\n", + "COP=COP_carnot/4\n", + "also actual COP=Q2/W\n", + "W=Q2/COP in KW\n", + "hence power required(W)in KW 108.76\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.6, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\")\n", + "T1=(-15.+273.15);#inside temperature in K\n", + "T2=(35.+273.);#atmospheric temperature in K\n", + "Q2=40.;#refrigeration capacity of storage plant in tonnes\n", + "print(\"cold storage plant can be considered as refrigerator operating between given temperatures limits\")\n", + "print(\"capacity of plant=heat to be extracted=Q2 in KW\")\n", + "print(\"we know that,one ton of refrigeration as 3.52 KW \")\n", + "Q2=Q2*3.52\n", + "print(\"so Q2=Q2*3.52 in KW\"),round(Q2,2)\n", + "COP_carnot=1/((T2/T1)-1)\n", + "print(\"carnot COP of plant(COP_carnot)=\"),round(COP_carnot,2)\n", + "print(\"performance is 1/4 of its carnot COP\")\n", + "COP=COP_carnot/4\n", + "print(\"COP=COP_carnot/4\")\n", + "print(\"also actual COP=Q2/W\")\n", + "print(\"W=Q2/COP in KW\")\n", + "W=Q2/COP\n", + "print(\"hence power required(W)in KW\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.7;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.7, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\n", + "highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\n", + "n= 0.79\n", + "or n=n*100 % 78.92\n" + ] + } + ], + "source": [ + "#cal of carnot cycle efficiency for given temperature limits\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.7, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\")\n", + "T1=(1150.+273.);#temperature of source in K\n", + "T2=(27.+273.);#temperature of sink in K\n", + "print(\"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\")\n", + "n=1-(T2/T1)\n", + "print(\"n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.8;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.8, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\n", + "here heat to be removed continuously from refrigerated space(Q)in KJ/s 0.13\n", + "for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\n", + "W=in KW 0.02\n", + "so power required(W)in KW 0.02\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.8, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\")\n", + "T1=(27.+273.);#temperature of source in K\n", + "T2=(-8.+273.);#temperature of sink in K\n", + "Q=7.5;#heat leakage in KJ/min\n", + "Q=Q/60.\n", + "print(\"here heat to be removed continuously from refrigerated space(Q)in KJ/s\"),round(Q,2)\n", + "print(\"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\")\n", + "W=Q*((T1/T2)-1)\n", + "print(\"W=in KW\"),round(W,2)\n", + "print(\"so power required(W)in KW\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.9;pg no: 118" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.9, Page:118 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\n", + "here W1:W2:W3=3:2:1\n", + "efficiency of engine,HE1,\n", + "W1/Q1=(1-(T2/1100))\n", + "so Q1=(1100*W1)/(1100-T2)\n", + "for HE2 engine,W2/Q2=(1-(T3/T2))\n", + "for HE3 engine,W3/Q3=(1-(300/T3))\n", + "from energy balance on engine,HE1\n", + "Q1=W1+Q2=>Q2=Q1-W1\n", + "above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\n", + "substituting Q2 in efficiency of HE2\n", + "W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\n", + "W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\n", + "2/3=(T2-T3)/(1100-T2)\n", + "2200-2*T2=3*T2-3*T3\n", + "5*T2-3*T3=2200\n", + "now energy balance on engine HE2 gives,Q2=W2+Q3\n", + "substituting in efficiency of HE2,\n", + "W2/(W2+Q3)=(T2-T3)/T2\n", + "W2*T2=(W2+Q3)*(T2-T3)\n", + "Q3=(W2*T3)/(T2-T3)\n", + "substituting Q3 in efficiency of HE3,\n", + "W3/((W2*T3)/(T2-T3))=(T3-300)/T3\n", + "W3/W2=(T3/(T2-T3))*(T3-300)/T3\n", + "1/2=(T3-300)/(T2-T3)\n", + "3*T3-T2=600\n", + "solving equations of T2 and T3,\n", + "we get,T3=in K 433.33\n", + "and by eq 5,T2 in K 700.0\n", + "so intermediate temperature are 700 K and 433.33 K\n" + ] + } + ], + "source": [ + "#cal of intermediate temperatures\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.9, Page:118 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\")\n", + "T1=1100;#temperature of high temperature reservoir in K\n", + "T4=300;#temperature of low temperature reservoir in K\n", + "print(\"here W1:W2:W3=3:2:1\")\n", + "print(\"efficiency of engine,HE1,\")\n", + "print(\"W1/Q1=(1-(T2/1100))\")\n", + "print(\"so Q1=(1100*W1)/(1100-T2)\")\n", + "print(\"for HE2 engine,W2/Q2=(1-(T3/T2))\")\n", + "print(\"for HE3 engine,W3/Q3=(1-(300/T3))\")\n", + "print(\"from energy balance on engine,HE1\")\n", + "print(\"Q1=W1+Q2=>Q2=Q1-W1\")\n", + "print(\"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\")\n", + "print(\"substituting Q2 in efficiency of HE2\")\n", + "print(\"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\")\n", + "print(\"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\")\n", + "print(\"2/3=(T2-T3)/(1100-T2)\")\n", + "print(\"2200-2*T2=3*T2-3*T3\")\n", + "print(\"5*T2-3*T3=2200\")\n", + "print(\"now energy balance on engine HE2 gives,Q2=W2+Q3\")\n", + "print(\"substituting in efficiency of HE2,\")\n", + "print(\"W2/(W2+Q3)=(T2-T3)/T2\")\n", + "print(\"W2*T2=(W2+Q3)*(T2-T3)\")\n", + "print(\"Q3=(W2*T3)/(T2-T3)\")\n", + "print(\"substituting Q3 in efficiency of HE3,\")\n", + "print(\"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\")\n", + "print(\"W3/W2=(T3/(T2-T3))*(T3-300)/T3\")\n", + "print(\"1/2=(T3-300)/(T2-T3)\")\n", + "print(\"3*T3-T2=600\")\n", + "print(\"solving equations of T2 and T3,\")\n", + "T3=(600.+(2200./5.))/(3.-(3./5.))\n", + "print(\"we get,T3=in K\"),round(T3,2)\n", + "T2=(2200.+3.*T3)/5.\n", + "print(\"and by eq 5,T2 in K\"),round(T2,2)\n", + "print(\"so intermediate temperature are 700 K and 433.33 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.10;pg no: 119" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.10, Page:119 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\n", + "efficiency of engine,W/Q1=(800-T)/800\n", + "for refrigerator,COP=Q3/W=280/(T-280)\n", + "it is given that Q1=Q3=Q\n", + "so,from engine,W/Q=(800-T)/800\n", + "from refrigerator,Q/W=280/(T-280)\n", + "from above two(Q/W)may be equated,\n", + "(T-280)/280=(800-T)/800\n", + "so temperature(T)in K 414.81\n", + "efficiency of engine(n)is given as\n", + "n= 0.48\n", + "COP of refrigerator is given as\n", + "COP= 2.08\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.10, Page:119 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\")\n", + "T1=800.;#temperature of source in K\n", + "T2=280.;#temperature of sink in K\n", + "print(\"efficiency of engine,W/Q1=(800-T)/800\")\n", + "print(\"for refrigerator,COP=Q3/W=280/(T-280)\")\n", + "print(\"it is given that Q1=Q3=Q\")\n", + "print(\"so,from engine,W/Q=(800-T)/800\")\n", + "print(\"from refrigerator,Q/W=280/(T-280)\")\n", + "print(\"from above two(Q/W)may be equated,\")\n", + "print(\"(T-280)/280=(800-T)/800\")\n", + "T=2.*280.*800./(800.+280.)\n", + "print(\"so temperature(T)in K\"),round(T,2)\n", + "print(\"efficiency of engine(n)is given as\")\n", + "n=(800.-T)/800.\n", + "print(\"n=\"),round(n,2)\n", + "print(\"COP of refrigerator is given as\")\n", + "COP=280./(T-280.)\n", + "print(\"COP=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.11;pg no: 120" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.11, Page:120 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\n", + "let thermodynamic properties be denoted with respect to salient states;\n", + "n_carnot=1-T1/T2\n", + "so T1/T2=1-0.5\n", + "so T1/T2=0.5\n", + "or T2=2*T1\n", + "corresponding to state 2,p2*v2=m*R*T2\n", + "so temperature(T2) in K= 585.37\n", + "heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\n", + "Q_23=W_23=p2*v2*log(v3/v2)\n", + "so volume(v3) in m^3= 0.1932\n", + "temperature at state 1,T1 in K= 292.68\n", + "during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\n", + "here expansion constant(y)=Cp/Cv\n", + "so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\n", + "p1 in bar\n", + "thus p1*v1=m*R*T1\n", + "so volume(v1) in m^3= 0.68\n", + "heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\n", + "for isentropic process,dQ=0,dW=dU\n", + "during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\n", + "Q_12=0,\n", + "W_12=-105.51 KJ(-ve work)\n", + "during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\n", + "Q_31=0,\n", + "ANS:\n", + "W_34=+105.51 KJ(+ve work)\n", + "so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\n", + "for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\n", + "for process 3-4,heat transfer=0,work interaction=+105.51 KJ\n", + "for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\n", + "maximum temperature of cycle=585.36 KJ\n", + "minimum temperature of cycle=292.68 KJ\n", + "volume at the end of isothermal expansion=0.1932 m^3\n" + ] + } + ], + "source": [ + "#cal of max and min temp of cycle,volume\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "import math\n", + "print\"Example 4.11, Page:120 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\")\n", + "n_carnot=0.5;#efficiency of carnot power cycle\n", + "m=0.5;#mass of air in kg\n", + "p2=7.*10**5;#final pressure in pa\n", + "v2=0.12;#volume in m^3\n", + "R=287.;#gas constant in J/kg K\n", + "Q_23=40.*1000.;#heat transfer to the air during isothermal expansion in J\n", + "Cp=1.008;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.721;#specific heat at constant volume in KJ/kg K\n", + "print(\"let thermodynamic properties be denoted with respect to salient states;\")\n", + "print(\"n_carnot=1-T1/T2\")\n", + "print(\"so T1/T2=1-0.5\")\n", + "1-0.5\n", + "print(\"so T1/T2=0.5\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"corresponding to state 2,p2*v2=m*R*T2\")\n", + "T2=p2*v2/(m*R)\n", + "print(\"so temperature(T2) in K=\"),round(T2,2)\n", + "print(\"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\")\n", + "print(\"Q_23=W_23=p2*v2*log(v3/v2)\")\n", + "v3=v2*math.exp(Q_23/(p2*v2))\n", + "print(\"so volume(v3) in m^3=\"),round(v3,4)\n", + "T1=T2/2\n", + "print(\"temperature at state 1,T1 in K=\"),round(T1,2)\n", + "print(\"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"here expansion constant(y)=Cp/Cv\")\n", + "y=Cp/Cv\n", + "print(\"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\")\n", + "p1=p2/(T2/T1)**(y/(y-1))\n", + "print(\"p1 in bar\")\n", + "p1=p1/10**5\n", + "print(\"thus p1*v1=m*R*T1\")\n", + "v1=m*R*T1/(p1*10**5)\n", + "print(\"so volume(v1) in m^3=\"),round(v1,2) \n", + "print(\"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\")\n", + "print(\"for isentropic process,dQ=0,dW=dU\")\n", + "print(\"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\")\n", + "print(\"Q_12=0,\")\n", + "W_12=-m*Cv*(T2-T1)\n", + "print(\"W_12=-105.51 KJ(-ve work)\")\n", + "print(\"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\")\n", + "print(\"Q_31=0,\")\n", + "T4=T1;\n", + "T3=T2;\n", + "W_34=-m*Cv*(T4-T3)\n", + "print(\"ANS:\")\n", + "print(\"W_34=+105.51 KJ(+ve work)\")\n", + "print(\"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\")\n", + "print(\"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\")\n", + "print(\"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\")\n", + "print(\"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\")\n", + "print(\"maximum temperature of cycle=585.36 KJ\")\n", + "print(\"minimum temperature of cycle=292.68 KJ\")\n", + "print(\"volume at the end of isothermal expansion=0.1932 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.12;pg no: 122" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.12, Page:122 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\n", + "let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\n", + "thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\n", + "Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\n", + "Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\n", + "substituting Q1_a and Q1_b in eq 1\n", + "4*Q2/3+2*Q3=5000...............eq4\n", + "also from total work output,Q1_a+Q1_b-Q2-Q3=W\n", + "5000-Q2-Q3=840\n", + "so Q2+Q3=5000-840=4160\n", + "Q3=4160-Q2\n", + "sunstituting Q3 in eq 4\n", + "4*Q2/3+2*(4160-Q2)=5000\n", + "so Q2=in KJ 4980.0\n", + "and Q3= in KJ 820.0\n", + "here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\n", + "Q2=4980 KJ,from heat engine\n", + "Q3=820 KJ,to heat engine\n" + ] + } + ], + "source": [ + "#cal of heat from from heat engine and to heat engine\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.12, Page:122 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\")\n", + "W=840.;#work done by reservoir in KJ\n", + "print(\"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\")\n", + "print(\"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\")\n", + "print(\"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\")\n", + "print(\"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\")\n", + "print(\"substituting Q1_a and Q1_b in eq 1\")\n", + "print(\"4*Q2/3+2*Q3=5000...............eq4\")\n", + "print(\"also from total work output,Q1_a+Q1_b-Q2-Q3=W\")\n", + "print(\"5000-Q2-Q3=840\")\n", + "print(\"so Q2+Q3=5000-840=4160\")\n", + "print(\"Q3=4160-Q2\")\n", + "print(\"sunstituting Q3 in eq 4\")\n", + "print(\"4*Q2/3+2*(4160-Q2)=5000\")\n", + "Q2=(5000.-2.*4160.)/((4./3.)-2.)\n", + "print(\"so Q2=in KJ\"),round(Q2,2)\n", + "Q3=4160.-Q2\n", + "print(\"and Q3= in KJ\"),round(-Q3,2)\n", + "print(\"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\")\n", + "print(\"Q2=4980 KJ,from heat engine\")\n", + "print(\"Q3=820 KJ,to heat engine\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.13;pg no: 123" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.13, Page:123 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\n", + "arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\n", + "for heat engine\n", + "ne=W/Q1=1-T2/T1\n", + "so (Q1-Q2)/Q1=\n", + "and Q2/Q1=\n", + "Q2=0.2593*Q1\n", + "for heat pump,\n", + "COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\n", + "Q4/Q3=\n", + "Q4=1.27*Q3\n", + "work output from engine =work input to pump\n", + "Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\n", + "so Q4/Q1=\n", + "so Q4=3.484*Q1\n", + "also it is given that Q2+Q4=100\n", + "subtituting Q2 and Q4 as function of Q1 in following expression,\n", + "Q2+Q4=100\n", + "so 0.2539*Q1+3.484*Q1=100\n", + "so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\n", + "Q1=100/(0.2539+3.484)in KJ 26.75\n", + "NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of energy taken by engine from reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.13, Page:123 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\")\n", + "T2=(77+273);#temperature of reservoir 2\n", + "T1=(1077+273);#temperature of reservoir 1\n", + "T3=(3+273);#temperature of reservoir 3\n", + "print(\"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\")\n", + "print(\"for heat engine\")\n", + "print(\"ne=W/Q1=1-T2/T1\")\n", + "print(\"so (Q1-Q2)/Q1=\")\n", + "1-T2/T1\n", + "print(\"and Q2/Q1=\")\n", + "1-0.7407\n", + "print(\"Q2=0.2593*Q1\")\n", + "print(\"for heat pump,\")\n", + "print(\"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\")\n", + "T4=T2;\n", + "T4/(T4-T3)\n", + "print(\"Q4/Q3=\")\n", + "4.73/3.73\n", + "print(\"Q4=1.27*Q3\")\n", + "print(\"work output from engine =work input to pump\")\n", + "print(\"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\")\n", + "print(\"so Q4/Q1=\")\n", + "(1-0.2593)/(1-(1/1.27))\n", + "print(\"so Q4=3.484*Q1\")\n", + "print(\"also it is given that Q2+Q4=100\")\n", + "print(\"subtituting Q2 and Q4 as function of Q1 in following expression,\")\n", + "print(\"Q2+Q4=100\")\n", + "print(\"so 0.2539*Q1+3.484*Q1=100\")\n", + "print(\"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\")\n", + "Q1=100/(0.2539+3.484)\n", + "print(\"Q1=100/(0.2539+3.484)in KJ\"),round(Q1,2)\n", + "print(\"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.14;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.14, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\n", + "let temperature of sink be T_sink K\n", + "Q_sink_HE+Q_sink_R=3000 ........eq 1\n", + "since complete work output from engine is used to run refrigerator so,\n", + "2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\n", + "by eq 1 and eq 2,we get Q_R in KJ/s 1000.0\n", + "also for heat engine,2000/1500=Q_sink_HE/T_sink\n", + "=>Q_sink_HE=4*T_sink/3\n", + "for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\n", + "substituting Q_sink_HE and Q_sink_R values\n", + "4*T_sink/3+1000*T_sink/288=3000\n", + "so temperature of sink(T_sink)in K\n", + "so T_sink= 750.0\n", + "T_sink in degree celcius 477.0\n" + ] + } + ], + "source": [ + "#cal of T_sink in degree celcius\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.14, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\")\n", + "Q_source=2000;#heat supplied by heat engine in KJ/s\n", + "T_source=1500;#temperature of source in K\n", + "T_R=(15+273);#temperature of reservoir in K\n", + "Q_sink=3000;#heat received by sink in KJ/s\n", + "print(\"let temperature of sink be T_sink K\")\n", + "print(\"Q_sink_HE+Q_sink_R=3000 ........eq 1\")\n", + "print(\"since complete work output from engine is used to run refrigerator so,\")\n", + "print(\"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\")\n", + "Q_R=3000-2000\n", + "print(\"by eq 1 and eq 2,we get Q_R in KJ/s\"),round(Q_R)\n", + "print(\"also for heat engine,2000/1500=Q_sink_HE/T_sink\")\n", + "print(\"=>Q_sink_HE=4*T_sink/3\")\n", + "print(\"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\")\n", + "print(\"substituting Q_sink_HE and Q_sink_R values\")\n", + "print(\"4*T_sink/3+1000*T_sink/288=3000\")\n", + "print(\"so temperature of sink(T_sink)in K\")\n", + "T_sink=3000/((4/3)+(1000/288))\n", + "print(\"so T_sink=\"),round(T_sink,2)\n", + "T_sink=T_sink-273\n", + "print(\"T_sink in degree celcius\"),round(T_sink,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.15;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.15, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\n", + "let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\n", + "n=W/Q1= 0.39\n", + "so n=W/Q1=0.3881\n", + "COP of heat pump=T3/(T3-T2)=Q3/(2*W/3) 2.89\n", + "so 2.892=3*Q3/2*W\n", + "Q3/Q1= 0.7483\n", + "so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.15, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\")\n", + "T1=(500.+273.);#temperature of source in K\n", + "T2=(200.+273.);#temperature of sink in K\n", + "T3=(450.+273.);#temperature of body in K\n", + "print(\"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\")\n", + "n=1-(T2/T1)\n", + "print(\"n=W/Q1=\"),round(n,2)\n", + "print(\"so n=W/Q1=0.3881\")\n", + "COP=T3/(T3-T2)\n", + "print(\"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3)\"),round(COP,2)\n", + "print(\"so 2.892=3*Q3/2*W\")\n", + "print(\"Q3/Q1=\"),round(2*COP*n/3,4)\n", + "print(\"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.16;pg no: 125" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.16, Page:125 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\n", + "NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.16, Page:125 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\")\n", + "print(\"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.17;pg no: 126" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.17, Page:126 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\n", + "NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.17, Page:126 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\")\n", + "print(\"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\")\n" + ] + }, + { + "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/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb new file mode 100644 index 00000000..bb4a3703 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_1.ipynb @@ -0,0 +1,1070 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Second Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.1;pg no: 113" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.1, Page:113 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\n", + "NOTE=>This question is fully theoritical hence cannot be solve using scilab.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.1, Page:113 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\")\n", + "print(\"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.2;pg no: 114" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.2, Page:114 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\n", + "in carnot engine from thermodynamics temperature scale\n", + "Q1/Q2=T1/T2\n", + "W=Q1-Q2=200 KJ\n", + "from above equations Q1 in KJ is given by\n", + "Q1= 349.61\n", + "and Q2 in KJ\n", + "Q2=Q1-200 149.61\n", + "so heat supplied(Q1) in KJ 349.6\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.2, Page:114 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\")\n", + "T1=(400.+273.);#temperature of source in K\n", + "T2=(15.+273.);#temperature of sink in K\n", + "W=200.;#work done in KJ\n", + "print(\"in carnot engine from thermodynamics temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "print(\"W=Q1-Q2=200 KJ\")\n", + "print(\"from above equations Q1 in KJ is given by\")\n", + "Q1=(200*T1)/(T1-T2)\n", + "print(\"Q1=\"),round(Q1,2)\n", + "print(\"and Q2 in KJ\")\n", + "Q2=Q1-200\n", + "print(\"Q2=Q1-200\"),round(Q2,2)\n", + "print(\"so heat supplied(Q1) in KJ\"),round(Q1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.3;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.3, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\n", + "from thermodynamic temperature scale\n", + "Q1/Q2=T1/T2\n", + "so Q1=Q2*(T1/T2)in KJ/s 2.27\n", + "power/work input required(W)=Q1-Q2 in KJ/s \n", + "power required for driving refrigerator=W in KW 0.274\n" + ] + } + ], + "source": [ + "#cal of power required for driving refrigerator\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.3, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\")\n", + "T1=315.;#temperature of reservoir 1 in K\n", + "T2=277.;#temperature of reservoir 2 in K\n", + "Q2=2.;#heat extracted in KJ/s\n", + "print(\"from thermodynamic temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "Q1=Q2*(T1/T2)\n", + "print(\"so Q1=Q2*(T1/T2)in KJ/s\"),round(Q1,2)\n", + "print(\"power/work input required(W)=Q1-Q2 in KJ/s \")\n", + "W=Q1-Q2\n", + "print(\"power required for driving refrigerator=W in KW\"),round(W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.4;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.4, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\n", + "we can writefor heat engine,Q1/Q2=T1/T2\n", + "so Q2=Q1*(T2/T1) in KJ 545.45\n", + "so We=in KJ 1454.55\n", + "for refrigerator,Q3/Q4=T3/T4 eq 1\n", + "now We-Wr=300\n", + "so Wr=We-300 in KJ 1154.55\n", + "and Wr=Q4-Q3=1154.55 KJ eq 2 \n", + "solving eq1 and eq 2 we get\n", + "Q4=in KJ 8659.13\n", + "and Q3=in KJ 7504.58\n", + "total heat transferred to low teperature reservoir(Q)=in KJ 9204.58\n", + "hence heat transferred to refrigerant=Q3 in KJ 7504.58\n", + "and heat transferred to low temperature reservoir=Q in KJ 9204.58\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.4, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\")\n", + "T1=(827.+273.);#temperature of high temperature reservoir in K\n", + "T2=(27.+273.);#temperature of low temperature reservoir in K\n", + "T3=(-13.+273.);#temperature of reservoir 3 in K\n", + "Q1=2000.;#heat ejected by reservoir 1 in KJ\n", + "print(\"we can writefor heat engine,Q1/Q2=T1/T2\")\n", + "Q2=Q1*(T2/T1)\n", + "print(\"so Q2=Q1*(T2/T1) in KJ\"),round(Q2,2)\n", + "We=Q1-Q2\n", + "print(\"so We=in KJ\"),round(We,2)\n", + "print(\"for refrigerator,Q3/Q4=T3/T4 eq 1\")\n", + "T4=T2;#temperature of low temperature reservoir in K\n", + "print(\"now We-Wr=300\")\n", + "Wr=We-300.\n", + "print(\"so Wr=We-300 in KJ\"),round(Wr,2)\n", + "print(\"and Wr=Q4-Q3=1154.55 KJ eq 2 \")\n", + "print(\"solving eq1 and eq 2 we get\")\n", + "Q4=(1154.55*T4)/(T4-T3)\n", + "print(\"Q4=in KJ\"),round(Q4,2)\n", + "Q3=Q4-Wr\n", + "print(\"and Q3=in KJ\"),round(Q3,2)\n", + "Q=Q2+Q4\n", + "print(\"total heat transferred to low teperature reservoir(Q)=in KJ\"),round(Q,2)\n", + "print(\"hence heat transferred to refrigerant=Q3 in KJ\"),round(Q3,2)\n", + "print(\"and heat transferred to low temperature reservoir=Q in KJ\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.5;pg no: 116" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.5, Page:116 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\n", + "COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\n", + "also we know K=Q1/Q2=T1/T2\n", + "so K=T1/T2 1.1\n", + "so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K)) 11.0\n", + "also COP_HP=Q1/W\n", + "W=Q1/COin MJ/Hr 3.03\n", + "or W=1000*W/3600 in KW 3.03\n", + "so minimum power required(W)in KW 3.03\n" + ] + } + ], + "source": [ + "#cal of minimum power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.5, Page:116 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\")\n", + "T1=(25+273.15);#temperature of inside of house in K\n", + "T2=(-1+273.15);#outside temperature in K\n", + "Q1=125;#heating load in MJ/Hr\n", + "print(\"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\")\n", + "print(\"also we know K=Q1/Q2=T1/T2\")\n", + "K=T1/T2\n", + "print(\"so K=T1/T2\"),round(K,2)\n", + "COP_HP=1/(1-(1/K))\n", + "print(\"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K))\"),round(COP_HP)\n", + "print(\"also COP_HP=Q1/W\")\n", + "W=Q1/COP_HP\n", + "W=1000*W/3600\n", + "print(\"W=Q1/COin MJ/Hr\"),round(W,2)\n", + "print(\"or W=1000*W/3600 in KW\"),round(W,2)\n", + "print(\"so minimum power required(W)in KW \"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.6;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.6, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\n", + "cold storage plant can be considered as refrigerator operating between given temperatures limits\n", + "capacity of plant=heat to be extracted=Q2 in KW\n", + "we know that,one ton of refrigeration as 3.52 KW \n", + "so Q2=Q2*3.52 in KW 140.8\n", + "carnot COP of plant(COP_carnot)= 5.18\n", + "performance is 1/4 of its carnot COP\n", + "COP=COP_carnot/4\n", + "also actual COP=Q2/W\n", + "W=Q2/COP in KW\n", + "hence power required(W)in KW 108.76\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.6, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\")\n", + "T1=(-15.+273.15);#inside temperature in K\n", + "T2=(35.+273.);#atmospheric temperature in K\n", + "Q2=40.;#refrigeration capacity of storage plant in tonnes\n", + "print(\"cold storage plant can be considered as refrigerator operating between given temperatures limits\")\n", + "print(\"capacity of plant=heat to be extracted=Q2 in KW\")\n", + "print(\"we know that,one ton of refrigeration as 3.52 KW \")\n", + "Q2=Q2*3.52\n", + "print(\"so Q2=Q2*3.52 in KW\"),round(Q2,2)\n", + "COP_carnot=1/((T2/T1)-1)\n", + "print(\"carnot COP of plant(COP_carnot)=\"),round(COP_carnot,2)\n", + "print(\"performance is 1/4 of its carnot COP\")\n", + "COP=COP_carnot/4\n", + "print(\"COP=COP_carnot/4\")\n", + "print(\"also actual COP=Q2/W\")\n", + "print(\"W=Q2/COP in KW\")\n", + "W=Q2/COP\n", + "print(\"hence power required(W)in KW\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.7;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.7, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\n", + "highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\n", + "n= 0.79\n", + "or n=n*100 % 78.92\n" + ] + } + ], + "source": [ + "#cal of carnot cycle efficiency for given temperature limits\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.7, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\")\n", + "T1=(1150.+273.);#temperature of source in K\n", + "T2=(27.+273.);#temperature of sink in K\n", + "print(\"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\")\n", + "n=1-(T2/T1)\n", + "print(\"n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.8;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.8, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\n", + "here heat to be removed continuously from refrigerated space(Q)in KJ/s 0.13\n", + "for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\n", + "W=in KW 0.02\n", + "so power required(W)in KW 0.02\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.8, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\")\n", + "T1=(27.+273.);#temperature of source in K\n", + "T2=(-8.+273.);#temperature of sink in K\n", + "Q=7.5;#heat leakage in KJ/min\n", + "Q=Q/60.\n", + "print(\"here heat to be removed continuously from refrigerated space(Q)in KJ/s\"),round(Q,2)\n", + "print(\"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\")\n", + "W=Q*((T1/T2)-1)\n", + "print(\"W=in KW\"),round(W,2)\n", + "print(\"so power required(W)in KW\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.9;pg no: 118" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.9, Page:118 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\n", + "here W1:W2:W3=3:2:1\n", + "efficiency of engine,HE1,\n", + "W1/Q1=(1-(T2/1100))\n", + "so Q1=(1100*W1)/(1100-T2)\n", + "for HE2 engine,W2/Q2=(1-(T3/T2))\n", + "for HE3 engine,W3/Q3=(1-(300/T3))\n", + "from energy balance on engine,HE1\n", + "Q1=W1+Q2=>Q2=Q1-W1\n", + "above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\n", + "substituting Q2 in efficiency of HE2\n", + "W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\n", + "W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\n", + "2/3=(T2-T3)/(1100-T2)\n", + "2200-2*T2=3*T2-3*T3\n", + "5*T2-3*T3=2200\n", + "now energy balance on engine HE2 gives,Q2=W2+Q3\n", + "substituting in efficiency of HE2,\n", + "W2/(W2+Q3)=(T2-T3)/T2\n", + "W2*T2=(W2+Q3)*(T2-T3)\n", + "Q3=(W2*T3)/(T2-T3)\n", + "substituting Q3 in efficiency of HE3,\n", + "W3/((W2*T3)/(T2-T3))=(T3-300)/T3\n", + "W3/W2=(T3/(T2-T3))*(T3-300)/T3\n", + "1/2=(T3-300)/(T2-T3)\n", + "3*T3-T2=600\n", + "solving equations of T2 and T3,\n", + "we get,T3=in K 433.33\n", + "and by eq 5,T2 in K 700.0\n", + "so intermediate temperature are 700 K and 433.33 K\n" + ] + } + ], + "source": [ + "#cal of intermediate temperatures\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.9, Page:118 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\")\n", + "T1=1100;#temperature of high temperature reservoir in K\n", + "T4=300;#temperature of low temperature reservoir in K\n", + "print(\"here W1:W2:W3=3:2:1\")\n", + "print(\"efficiency of engine,HE1,\")\n", + "print(\"W1/Q1=(1-(T2/1100))\")\n", + "print(\"so Q1=(1100*W1)/(1100-T2)\")\n", + "print(\"for HE2 engine,W2/Q2=(1-(T3/T2))\")\n", + "print(\"for HE3 engine,W3/Q3=(1-(300/T3))\")\n", + "print(\"from energy balance on engine,HE1\")\n", + "print(\"Q1=W1+Q2=>Q2=Q1-W1\")\n", + "print(\"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\")\n", + "print(\"substituting Q2 in efficiency of HE2\")\n", + "print(\"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\")\n", + "print(\"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\")\n", + "print(\"2/3=(T2-T3)/(1100-T2)\")\n", + "print(\"2200-2*T2=3*T2-3*T3\")\n", + "print(\"5*T2-3*T3=2200\")\n", + "print(\"now energy balance on engine HE2 gives,Q2=W2+Q3\")\n", + "print(\"substituting in efficiency of HE2,\")\n", + "print(\"W2/(W2+Q3)=(T2-T3)/T2\")\n", + "print(\"W2*T2=(W2+Q3)*(T2-T3)\")\n", + "print(\"Q3=(W2*T3)/(T2-T3)\")\n", + "print(\"substituting Q3 in efficiency of HE3,\")\n", + "print(\"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\")\n", + "print(\"W3/W2=(T3/(T2-T3))*(T3-300)/T3\")\n", + "print(\"1/2=(T3-300)/(T2-T3)\")\n", + "print(\"3*T3-T2=600\")\n", + "print(\"solving equations of T2 and T3,\")\n", + "T3=(600.+(2200./5.))/(3.-(3./5.))\n", + "print(\"we get,T3=in K\"),round(T3,2)\n", + "T2=(2200.+3.*T3)/5.\n", + "print(\"and by eq 5,T2 in K\"),round(T2,2)\n", + "print(\"so intermediate temperature are 700 K and 433.33 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.10;pg no: 119" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.10, Page:119 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\n", + "efficiency of engine,W/Q1=(800-T)/800\n", + "for refrigerator,COP=Q3/W=280/(T-280)\n", + "it is given that Q1=Q3=Q\n", + "so,from engine,W/Q=(800-T)/800\n", + "from refrigerator,Q/W=280/(T-280)\n", + "from above two(Q/W)may be equated,\n", + "(T-280)/280=(800-T)/800\n", + "so temperature(T)in K 414.81\n", + "efficiency of engine(n)is given as\n", + "n= 0.48\n", + "COP of refrigerator is given as\n", + "COP= 2.08\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.10, Page:119 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\")\n", + "T1=800.;#temperature of source in K\n", + "T2=280.;#temperature of sink in K\n", + "print(\"efficiency of engine,W/Q1=(800-T)/800\")\n", + "print(\"for refrigerator,COP=Q3/W=280/(T-280)\")\n", + "print(\"it is given that Q1=Q3=Q\")\n", + "print(\"so,from engine,W/Q=(800-T)/800\")\n", + "print(\"from refrigerator,Q/W=280/(T-280)\")\n", + "print(\"from above two(Q/W)may be equated,\")\n", + "print(\"(T-280)/280=(800-T)/800\")\n", + "T=2.*280.*800./(800.+280.)\n", + "print(\"so temperature(T)in K\"),round(T,2)\n", + "print(\"efficiency of engine(n)is given as\")\n", + "n=(800.-T)/800.\n", + "print(\"n=\"),round(n,2)\n", + "print(\"COP of refrigerator is given as\")\n", + "COP=280./(T-280.)\n", + "print(\"COP=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.11;pg no: 120" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.11, Page:120 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\n", + "let thermodynamic properties be denoted with respect to salient states;\n", + "n_carnot=1-T1/T2\n", + "so T1/T2=1-0.5\n", + "so T1/T2=0.5\n", + "or T2=2*T1\n", + "corresponding to state 2,p2*v2=m*R*T2\n", + "so temperature(T2) in K= 585.37\n", + "heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\n", + "Q_23=W_23=p2*v2*log(v3/v2)\n", + "so volume(v3) in m^3= 0.1932\n", + "temperature at state 1,T1 in K= 292.68\n", + "during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\n", + "here expansion constant(y)=Cp/Cv\n", + "so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\n", + "p1 in bar\n", + "thus p1*v1=m*R*T1\n", + "so volume(v1) in m^3= 0.68\n", + "heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\n", + "for isentropic process,dQ=0,dW=dU\n", + "during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\n", + "Q_12=0,\n", + "W_12=-105.51 KJ(-ve work)\n", + "during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\n", + "Q_31=0,\n", + "ANS:\n", + "W_34=+105.51 KJ(+ve work)\n", + "so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\n", + "for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\n", + "for process 3-4,heat transfer=0,work interaction=+105.51 KJ\n", + "for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\n", + "maximum temperature of cycle=585.36 KJ\n", + "minimum temperature of cycle=292.68 KJ\n", + "volume at the end of isothermal expansion=0.1932 m^3\n" + ] + } + ], + "source": [ + "#cal of max and min temp of cycle,volume\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "import math\n", + "print\"Example 4.11, Page:120 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\")\n", + "n_carnot=0.5;#efficiency of carnot power cycle\n", + "m=0.5;#mass of air in kg\n", + "p2=7.*10**5;#final pressure in pa\n", + "v2=0.12;#volume in m^3\n", + "R=287.;#gas constant in J/kg K\n", + "Q_23=40.*1000.;#heat transfer to the air during isothermal expansion in J\n", + "Cp=1.008;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.721;#specific heat at constant volume in KJ/kg K\n", + "print(\"let thermodynamic properties be denoted with respect to salient states;\")\n", + "print(\"n_carnot=1-T1/T2\")\n", + "print(\"so T1/T2=1-0.5\")\n", + "1-0.5\n", + "print(\"so T1/T2=0.5\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"corresponding to state 2,p2*v2=m*R*T2\")\n", + "T2=p2*v2/(m*R)\n", + "print(\"so temperature(T2) in K=\"),round(T2,2)\n", + "print(\"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\")\n", + "print(\"Q_23=W_23=p2*v2*log(v3/v2)\")\n", + "v3=v2*math.exp(Q_23/(p2*v2))\n", + "print(\"so volume(v3) in m^3=\"),round(v3,4)\n", + "T1=T2/2\n", + "print(\"temperature at state 1,T1 in K=\"),round(T1,2)\n", + "print(\"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"here expansion constant(y)=Cp/Cv\")\n", + "y=Cp/Cv\n", + "print(\"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\")\n", + "p1=p2/(T2/T1)**(y/(y-1))\n", + "print(\"p1 in bar\")\n", + "p1=p1/10**5\n", + "print(\"thus p1*v1=m*R*T1\")\n", + "v1=m*R*T1/(p1*10**5)\n", + "print(\"so volume(v1) in m^3=\"),round(v1,2) \n", + "print(\"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\")\n", + "print(\"for isentropic process,dQ=0,dW=dU\")\n", + "print(\"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\")\n", + "print(\"Q_12=0,\")\n", + "W_12=-m*Cv*(T2-T1)\n", + "print(\"W_12=-105.51 KJ(-ve work)\")\n", + "print(\"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\")\n", + "print(\"Q_31=0,\")\n", + "T4=T1;\n", + "T3=T2;\n", + "W_34=-m*Cv*(T4-T3)\n", + "print(\"ANS:\")\n", + "print(\"W_34=+105.51 KJ(+ve work)\")\n", + "print(\"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\")\n", + "print(\"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\")\n", + "print(\"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\")\n", + "print(\"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\")\n", + "print(\"maximum temperature of cycle=585.36 KJ\")\n", + "print(\"minimum temperature of cycle=292.68 KJ\")\n", + "print(\"volume at the end of isothermal expansion=0.1932 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.12;pg no: 122" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.12, Page:122 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\n", + "let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\n", + "thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\n", + "Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\n", + "Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\n", + "substituting Q1_a and Q1_b in eq 1\n", + "4*Q2/3+2*Q3=5000...............eq4\n", + "also from total work output,Q1_a+Q1_b-Q2-Q3=W\n", + "5000-Q2-Q3=840\n", + "so Q2+Q3=5000-840=4160\n", + "Q3=4160-Q2\n", + "sunstituting Q3 in eq 4\n", + "4*Q2/3+2*(4160-Q2)=5000\n", + "so Q2=in KJ 4980.0\n", + "and Q3= in KJ 820.0\n", + "here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\n", + "Q2=4980 KJ,from heat engine\n", + "Q3=820 KJ,to heat engine\n" + ] + } + ], + "source": [ + "#cal of heat from from heat engine and to heat engine\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.12, Page:122 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\")\n", + "W=840.;#work done by reservoir in KJ\n", + "print(\"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\")\n", + "print(\"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\")\n", + "print(\"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\")\n", + "print(\"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\")\n", + "print(\"substituting Q1_a and Q1_b in eq 1\")\n", + "print(\"4*Q2/3+2*Q3=5000...............eq4\")\n", + "print(\"also from total work output,Q1_a+Q1_b-Q2-Q3=W\")\n", + "print(\"5000-Q2-Q3=840\")\n", + "print(\"so Q2+Q3=5000-840=4160\")\n", + "print(\"Q3=4160-Q2\")\n", + "print(\"sunstituting Q3 in eq 4\")\n", + "print(\"4*Q2/3+2*(4160-Q2)=5000\")\n", + "Q2=(5000.-2.*4160.)/((4./3.)-2.)\n", + "print(\"so Q2=in KJ\"),round(Q2,2)\n", + "Q3=4160.-Q2\n", + "print(\"and Q3= in KJ\"),round(-Q3,2)\n", + "print(\"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\")\n", + "print(\"Q2=4980 KJ,from heat engine\")\n", + "print(\"Q3=820 KJ,to heat engine\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.13;pg no: 123" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.13, Page:123 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\n", + "arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\n", + "for heat engine\n", + "ne=W/Q1=1-T2/T1\n", + "so (Q1-Q2)/Q1=\n", + "and Q2/Q1=\n", + "Q2=0.2593*Q1\n", + "for heat pump,\n", + "COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\n", + "Q4/Q3=\n", + "Q4=1.27*Q3\n", + "work output from engine =work input to pump\n", + "Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\n", + "so Q4/Q1=\n", + "so Q4=3.484*Q1\n", + "also it is given that Q2+Q4=100\n", + "subtituting Q2 and Q4 as function of Q1 in following expression,\n", + "Q2+Q4=100\n", + "so 0.2539*Q1+3.484*Q1=100\n", + "so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\n", + "Q1=100/(0.2539+3.484)in KJ 26.75\n", + "NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of energy taken by engine from reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.13, Page:123 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\")\n", + "T2=(77+273);#temperature of reservoir 2\n", + "T1=(1077+273);#temperature of reservoir 1\n", + "T3=(3+273);#temperature of reservoir 3\n", + "print(\"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\")\n", + "print(\"for heat engine\")\n", + "print(\"ne=W/Q1=1-T2/T1\")\n", + "print(\"so (Q1-Q2)/Q1=\")\n", + "1-T2/T1\n", + "print(\"and Q2/Q1=\")\n", + "1-0.7407\n", + "print(\"Q2=0.2593*Q1\")\n", + "print(\"for heat pump,\")\n", + "print(\"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\")\n", + "T4=T2;\n", + "T4/(T4-T3)\n", + "print(\"Q4/Q3=\")\n", + "4.73/3.73\n", + "print(\"Q4=1.27*Q3\")\n", + "print(\"work output from engine =work input to pump\")\n", + "print(\"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\")\n", + "print(\"so Q4/Q1=\")\n", + "(1-0.2593)/(1-(1/1.27))\n", + "print(\"so Q4=3.484*Q1\")\n", + "print(\"also it is given that Q2+Q4=100\")\n", + "print(\"subtituting Q2 and Q4 as function of Q1 in following expression,\")\n", + "print(\"Q2+Q4=100\")\n", + "print(\"so 0.2539*Q1+3.484*Q1=100\")\n", + "print(\"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\")\n", + "Q1=100/(0.2539+3.484)\n", + "print(\"Q1=100/(0.2539+3.484)in KJ\"),round(Q1,2)\n", + "print(\"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.14;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.14, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\n", + "let temperature of sink be T_sink K\n", + "Q_sink_HE+Q_sink_R=3000 ........eq 1\n", + "since complete work output from engine is used to run refrigerator so,\n", + "2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\n", + "by eq 1 and eq 2,we get Q_R in KJ/s 1000.0\n", + "also for heat engine,2000/1500=Q_sink_HE/T_sink\n", + "=>Q_sink_HE=4*T_sink/3\n", + "for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\n", + "substituting Q_sink_HE and Q_sink_R values\n", + "4*T_sink/3+1000*T_sink/288=3000\n", + "so temperature of sink(T_sink)in K\n", + "so T_sink= 750.0\n", + "T_sink in degree celcius 477.0\n" + ] + } + ], + "source": [ + "#cal of T_sink in degree celcius\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.14, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\")\n", + "Q_source=2000;#heat supplied by heat engine in KJ/s\n", + "T_source=1500;#temperature of source in K\n", + "T_R=(15+273);#temperature of reservoir in K\n", + "Q_sink=3000;#heat received by sink in KJ/s\n", + "print(\"let temperature of sink be T_sink K\")\n", + "print(\"Q_sink_HE+Q_sink_R=3000 ........eq 1\")\n", + "print(\"since complete work output from engine is used to run refrigerator so,\")\n", + "print(\"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\")\n", + "Q_R=3000-2000\n", + "print(\"by eq 1 and eq 2,we get Q_R in KJ/s\"),round(Q_R)\n", + "print(\"also for heat engine,2000/1500=Q_sink_HE/T_sink\")\n", + "print(\"=>Q_sink_HE=4*T_sink/3\")\n", + "print(\"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\")\n", + "print(\"substituting Q_sink_HE and Q_sink_R values\")\n", + "print(\"4*T_sink/3+1000*T_sink/288=3000\")\n", + "print(\"so temperature of sink(T_sink)in K\")\n", + "T_sink=3000/((4/3)+(1000/288))\n", + "print(\"so T_sink=\"),round(T_sink,2)\n", + "T_sink=T_sink-273\n", + "print(\"T_sink in degree celcius\"),round(T_sink,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.15;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.15, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\n", + "let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\n", + "n=W/Q1= 0.39\n", + "so n=W/Q1=0.3881\n", + "COP of heat pump=T3/(T3-T2)=Q3/(2*W/3) 2.89\n", + "so 2.892=3*Q3/2*W\n", + "Q3/Q1= 0.7483\n", + "so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.15, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\")\n", + "T1=(500.+273.);#temperature of source in K\n", + "T2=(200.+273.);#temperature of sink in K\n", + "T3=(450.+273.);#temperature of body in K\n", + "print(\"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\")\n", + "n=1-(T2/T1)\n", + "print(\"n=W/Q1=\"),round(n,2)\n", + "print(\"so n=W/Q1=0.3881\")\n", + "COP=T3/(T3-T2)\n", + "print(\"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3)\"),round(COP,2)\n", + "print(\"so 2.892=3*Q3/2*W\")\n", + "print(\"Q3/Q1=\"),round(2*COP*n/3,4)\n", + "print(\"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.16;pg no: 125" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.16, Page:125 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\n", + "NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.16, Page:125 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\")\n", + "print(\"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.17;pg no: 126" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.17, Page:126 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\n", + "NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.17, Page:126 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\")\n", + "print(\"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\")\n" + ] + }, + { + "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/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb new file mode 100644 index 00000000..bb4a3703 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_2.ipynb @@ -0,0 +1,1070 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Second Law of Thermo Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.1;pg no: 113" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.1, Page:113 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\n", + "NOTE=>This question is fully theoritical hence cannot be solve using scilab.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.1, Page:113 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\")\n", + "print(\"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.2;pg no: 114" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.2, Page:114 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\n", + "in carnot engine from thermodynamics temperature scale\n", + "Q1/Q2=T1/T2\n", + "W=Q1-Q2=200 KJ\n", + "from above equations Q1 in KJ is given by\n", + "Q1= 349.61\n", + "and Q2 in KJ\n", + "Q2=Q1-200 149.61\n", + "so heat supplied(Q1) in KJ 349.6\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.2, Page:114 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\")\n", + "T1=(400.+273.);#temperature of source in K\n", + "T2=(15.+273.);#temperature of sink in K\n", + "W=200.;#work done in KJ\n", + "print(\"in carnot engine from thermodynamics temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "print(\"W=Q1-Q2=200 KJ\")\n", + "print(\"from above equations Q1 in KJ is given by\")\n", + "Q1=(200*T1)/(T1-T2)\n", + "print(\"Q1=\"),round(Q1,2)\n", + "print(\"and Q2 in KJ\")\n", + "Q2=Q1-200\n", + "print(\"Q2=Q1-200\"),round(Q2,2)\n", + "print(\"so heat supplied(Q1) in KJ\"),round(Q1,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.3;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.3, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\n", + "from thermodynamic temperature scale\n", + "Q1/Q2=T1/T2\n", + "so Q1=Q2*(T1/T2)in KJ/s 2.27\n", + "power/work input required(W)=Q1-Q2 in KJ/s \n", + "power required for driving refrigerator=W in KW 0.274\n" + ] + } + ], + "source": [ + "#cal of power required for driving refrigerator\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.3, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\")\n", + "T1=315.;#temperature of reservoir 1 in K\n", + "T2=277.;#temperature of reservoir 2 in K\n", + "Q2=2.;#heat extracted in KJ/s\n", + "print(\"from thermodynamic temperature scale\")\n", + "print(\"Q1/Q2=T1/T2\")\n", + "Q1=Q2*(T1/T2)\n", + "print(\"so Q1=Q2*(T1/T2)in KJ/s\"),round(Q1,2)\n", + "print(\"power/work input required(W)=Q1-Q2 in KJ/s \")\n", + "W=Q1-Q2\n", + "print(\"power required for driving refrigerator=W in KW\"),round(W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.4;pg no: 115" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.4, Page:115 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\n", + "we can writefor heat engine,Q1/Q2=T1/T2\n", + "so Q2=Q1*(T2/T1) in KJ 545.45\n", + "so We=in KJ 1454.55\n", + "for refrigerator,Q3/Q4=T3/T4 eq 1\n", + "now We-Wr=300\n", + "so Wr=We-300 in KJ 1154.55\n", + "and Wr=Q4-Q3=1154.55 KJ eq 2 \n", + "solving eq1 and eq 2 we get\n", + "Q4=in KJ 8659.13\n", + "and Q3=in KJ 7504.58\n", + "total heat transferred to low teperature reservoir(Q)=in KJ 9204.58\n", + "hence heat transferred to refrigerant=Q3 in KJ 7504.58\n", + "and heat transferred to low temperature reservoir=Q in KJ 9204.58\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.4, Page:115 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\")\n", + "T1=(827.+273.);#temperature of high temperature reservoir in K\n", + "T2=(27.+273.);#temperature of low temperature reservoir in K\n", + "T3=(-13.+273.);#temperature of reservoir 3 in K\n", + "Q1=2000.;#heat ejected by reservoir 1 in KJ\n", + "print(\"we can writefor heat engine,Q1/Q2=T1/T2\")\n", + "Q2=Q1*(T2/T1)\n", + "print(\"so Q2=Q1*(T2/T1) in KJ\"),round(Q2,2)\n", + "We=Q1-Q2\n", + "print(\"so We=in KJ\"),round(We,2)\n", + "print(\"for refrigerator,Q3/Q4=T3/T4 eq 1\")\n", + "T4=T2;#temperature of low temperature reservoir in K\n", + "print(\"now We-Wr=300\")\n", + "Wr=We-300.\n", + "print(\"so Wr=We-300 in KJ\"),round(Wr,2)\n", + "print(\"and Wr=Q4-Q3=1154.55 KJ eq 2 \")\n", + "print(\"solving eq1 and eq 2 we get\")\n", + "Q4=(1154.55*T4)/(T4-T3)\n", + "print(\"Q4=in KJ\"),round(Q4,2)\n", + "Q3=Q4-Wr\n", + "print(\"and Q3=in KJ\"),round(Q3,2)\n", + "Q=Q2+Q4\n", + "print(\"total heat transferred to low teperature reservoir(Q)=in KJ\"),round(Q,2)\n", + "print(\"hence heat transferred to refrigerant=Q3 in KJ\"),round(Q3,2)\n", + "print(\"and heat transferred to low temperature reservoir=Q in KJ\"),round(Q,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.5;pg no: 116" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.5, Page:116 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\n", + "COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\n", + "also we know K=Q1/Q2=T1/T2\n", + "so K=T1/T2 1.1\n", + "so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K)) 11.0\n", + "also COP_HP=Q1/W\n", + "W=Q1/COin MJ/Hr 3.03\n", + "or W=1000*W/3600 in KW 3.03\n", + "so minimum power required(W)in KW 3.03\n" + ] + } + ], + "source": [ + "#cal of minimum power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.5, Page:116 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\")\n", + "T1=(25+273.15);#temperature of inside of house in K\n", + "T2=(-1+273.15);#outside temperature in K\n", + "Q1=125;#heating load in MJ/Hr\n", + "print(\"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\")\n", + "print(\"also we know K=Q1/Q2=T1/T2\")\n", + "K=T1/T2\n", + "print(\"so K=T1/T2\"),round(K,2)\n", + "COP_HP=1/(1-(1/K))\n", + "print(\"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K))\"),round(COP_HP)\n", + "print(\"also COP_HP=Q1/W\")\n", + "W=Q1/COP_HP\n", + "W=1000*W/3600\n", + "print(\"W=Q1/COin MJ/Hr\"),round(W,2)\n", + "print(\"or W=1000*W/3600 in KW\"),round(W,2)\n", + "print(\"so minimum power required(W)in KW \"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.6;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.6, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\n", + "cold storage plant can be considered as refrigerator operating between given temperatures limits\n", + "capacity of plant=heat to be extracted=Q2 in KW\n", + "we know that,one ton of refrigeration as 3.52 KW \n", + "so Q2=Q2*3.52 in KW 140.8\n", + "carnot COP of plant(COP_carnot)= 5.18\n", + "performance is 1/4 of its carnot COP\n", + "COP=COP_carnot/4\n", + "also actual COP=Q2/W\n", + "W=Q2/COP in KW\n", + "hence power required(W)in KW 108.76\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.6, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\")\n", + "T1=(-15.+273.15);#inside temperature in K\n", + "T2=(35.+273.);#atmospheric temperature in K\n", + "Q2=40.;#refrigeration capacity of storage plant in tonnes\n", + "print(\"cold storage plant can be considered as refrigerator operating between given temperatures limits\")\n", + "print(\"capacity of plant=heat to be extracted=Q2 in KW\")\n", + "print(\"we know that,one ton of refrigeration as 3.52 KW \")\n", + "Q2=Q2*3.52\n", + "print(\"so Q2=Q2*3.52 in KW\"),round(Q2,2)\n", + "COP_carnot=1/((T2/T1)-1)\n", + "print(\"carnot COP of plant(COP_carnot)=\"),round(COP_carnot,2)\n", + "print(\"performance is 1/4 of its carnot COP\")\n", + "COP=COP_carnot/4\n", + "print(\"COP=COP_carnot/4\")\n", + "print(\"also actual COP=Q2/W\")\n", + "print(\"W=Q2/COP in KW\")\n", + "W=Q2/COP\n", + "print(\"hence power required(W)in KW\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.7;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.7, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\n", + "highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\n", + "n= 0.79\n", + "or n=n*100 % 78.92\n" + ] + } + ], + "source": [ + "#cal of carnot cycle efficiency for given temperature limits\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.7, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\")\n", + "T1=(1150.+273.);#temperature of source in K\n", + "T2=(27.+273.);#temperature of sink in K\n", + "print(\"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\")\n", + "n=1-(T2/T1)\n", + "print(\"n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.8;pg no: 117" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.8, Page:117 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\n", + "here heat to be removed continuously from refrigerated space(Q)in KJ/s 0.13\n", + "for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\n", + "W=in KW 0.02\n", + "so power required(W)in KW 0.02\n" + ] + } + ], + "source": [ + "#cal of power required\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.8, Page:117 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\")\n", + "T1=(27.+273.);#temperature of source in K\n", + "T2=(-8.+273.);#temperature of sink in K\n", + "Q=7.5;#heat leakage in KJ/min\n", + "Q=Q/60.\n", + "print(\"here heat to be removed continuously from refrigerated space(Q)in KJ/s\"),round(Q,2)\n", + "print(\"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\")\n", + "W=Q*((T1/T2)-1)\n", + "print(\"W=in KW\"),round(W,2)\n", + "print(\"so power required(W)in KW\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.9;pg no: 118" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.9, Page:118 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\n", + "here W1:W2:W3=3:2:1\n", + "efficiency of engine,HE1,\n", + "W1/Q1=(1-(T2/1100))\n", + "so Q1=(1100*W1)/(1100-T2)\n", + "for HE2 engine,W2/Q2=(1-(T3/T2))\n", + "for HE3 engine,W3/Q3=(1-(300/T3))\n", + "from energy balance on engine,HE1\n", + "Q1=W1+Q2=>Q2=Q1-W1\n", + "above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\n", + "substituting Q2 in efficiency of HE2\n", + "W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\n", + "W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\n", + "2/3=(T2-T3)/(1100-T2)\n", + "2200-2*T2=3*T2-3*T3\n", + "5*T2-3*T3=2200\n", + "now energy balance on engine HE2 gives,Q2=W2+Q3\n", + "substituting in efficiency of HE2,\n", + "W2/(W2+Q3)=(T2-T3)/T2\n", + "W2*T2=(W2+Q3)*(T2-T3)\n", + "Q3=(W2*T3)/(T2-T3)\n", + "substituting Q3 in efficiency of HE3,\n", + "W3/((W2*T3)/(T2-T3))=(T3-300)/T3\n", + "W3/W2=(T3/(T2-T3))*(T3-300)/T3\n", + "1/2=(T3-300)/(T2-T3)\n", + "3*T3-T2=600\n", + "solving equations of T2 and T3,\n", + "we get,T3=in K 433.33\n", + "and by eq 5,T2 in K 700.0\n", + "so intermediate temperature are 700 K and 433.33 K\n" + ] + } + ], + "source": [ + "#cal of intermediate temperatures\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.9, Page:118 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\")\n", + "T1=1100;#temperature of high temperature reservoir in K\n", + "T4=300;#temperature of low temperature reservoir in K\n", + "print(\"here W1:W2:W3=3:2:1\")\n", + "print(\"efficiency of engine,HE1,\")\n", + "print(\"W1/Q1=(1-(T2/1100))\")\n", + "print(\"so Q1=(1100*W1)/(1100-T2)\")\n", + "print(\"for HE2 engine,W2/Q2=(1-(T3/T2))\")\n", + "print(\"for HE3 engine,W3/Q3=(1-(300/T3))\")\n", + "print(\"from energy balance on engine,HE1\")\n", + "print(\"Q1=W1+Q2=>Q2=Q1-W1\")\n", + "print(\"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\")\n", + "print(\"substituting Q2 in efficiency of HE2\")\n", + "print(\"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\")\n", + "print(\"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\")\n", + "print(\"2/3=(T2-T3)/(1100-T2)\")\n", + "print(\"2200-2*T2=3*T2-3*T3\")\n", + "print(\"5*T2-3*T3=2200\")\n", + "print(\"now energy balance on engine HE2 gives,Q2=W2+Q3\")\n", + "print(\"substituting in efficiency of HE2,\")\n", + "print(\"W2/(W2+Q3)=(T2-T3)/T2\")\n", + "print(\"W2*T2=(W2+Q3)*(T2-T3)\")\n", + "print(\"Q3=(W2*T3)/(T2-T3)\")\n", + "print(\"substituting Q3 in efficiency of HE3,\")\n", + "print(\"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\")\n", + "print(\"W3/W2=(T3/(T2-T3))*(T3-300)/T3\")\n", + "print(\"1/2=(T3-300)/(T2-T3)\")\n", + "print(\"3*T3-T2=600\")\n", + "print(\"solving equations of T2 and T3,\")\n", + "T3=(600.+(2200./5.))/(3.-(3./5.))\n", + "print(\"we get,T3=in K\"),round(T3,2)\n", + "T2=(2200.+3.*T3)/5.\n", + "print(\"and by eq 5,T2 in K\"),round(T2,2)\n", + "print(\"so intermediate temperature are 700 K and 433.33 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.10;pg no: 119" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.10, Page:119 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\n", + "efficiency of engine,W/Q1=(800-T)/800\n", + "for refrigerator,COP=Q3/W=280/(T-280)\n", + "it is given that Q1=Q3=Q\n", + "so,from engine,W/Q=(800-T)/800\n", + "from refrigerator,Q/W=280/(T-280)\n", + "from above two(Q/W)may be equated,\n", + "(T-280)/280=(800-T)/800\n", + "so temperature(T)in K 414.81\n", + "efficiency of engine(n)is given as\n", + "n= 0.48\n", + "COP of refrigerator is given as\n", + "COP= 2.08\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.10, Page:119 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\")\n", + "T1=800.;#temperature of source in K\n", + "T2=280.;#temperature of sink in K\n", + "print(\"efficiency of engine,W/Q1=(800-T)/800\")\n", + "print(\"for refrigerator,COP=Q3/W=280/(T-280)\")\n", + "print(\"it is given that Q1=Q3=Q\")\n", + "print(\"so,from engine,W/Q=(800-T)/800\")\n", + "print(\"from refrigerator,Q/W=280/(T-280)\")\n", + "print(\"from above two(Q/W)may be equated,\")\n", + "print(\"(T-280)/280=(800-T)/800\")\n", + "T=2.*280.*800./(800.+280.)\n", + "print(\"so temperature(T)in K\"),round(T,2)\n", + "print(\"efficiency of engine(n)is given as\")\n", + "n=(800.-T)/800.\n", + "print(\"n=\"),round(n,2)\n", + "print(\"COP of refrigerator is given as\")\n", + "COP=280./(T-280.)\n", + "print(\"COP=\"),round(COP,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.11;pg no: 120" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.11, Page:120 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\n", + "let thermodynamic properties be denoted with respect to salient states;\n", + "n_carnot=1-T1/T2\n", + "so T1/T2=1-0.5\n", + "so T1/T2=0.5\n", + "or T2=2*T1\n", + "corresponding to state 2,p2*v2=m*R*T2\n", + "so temperature(T2) in K= 585.37\n", + "heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\n", + "Q_23=W_23=p2*v2*log(v3/v2)\n", + "so volume(v3) in m^3= 0.1932\n", + "temperature at state 1,T1 in K= 292.68\n", + "during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\n", + "here expansion constant(y)=Cp/Cv\n", + "so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\n", + "p1 in bar\n", + "thus p1*v1=m*R*T1\n", + "so volume(v1) in m^3= 0.68\n", + "heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\n", + "for isentropic process,dQ=0,dW=dU\n", + "during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\n", + "Q_12=0,\n", + "W_12=-105.51 KJ(-ve work)\n", + "during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\n", + "Q_31=0,\n", + "ANS:\n", + "W_34=+105.51 KJ(+ve work)\n", + "so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\n", + "for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\n", + "for process 3-4,heat transfer=0,work interaction=+105.51 KJ\n", + "for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\n", + "maximum temperature of cycle=585.36 KJ\n", + "minimum temperature of cycle=292.68 KJ\n", + "volume at the end of isothermal expansion=0.1932 m^3\n" + ] + } + ], + "source": [ + "#cal of max and min temp of cycle,volume\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "import math\n", + "print\"Example 4.11, Page:120 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\")\n", + "n_carnot=0.5;#efficiency of carnot power cycle\n", + "m=0.5;#mass of air in kg\n", + "p2=7.*10**5;#final pressure in pa\n", + "v2=0.12;#volume in m^3\n", + "R=287.;#gas constant in J/kg K\n", + "Q_23=40.*1000.;#heat transfer to the air during isothermal expansion in J\n", + "Cp=1.008;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.721;#specific heat at constant volume in KJ/kg K\n", + "print(\"let thermodynamic properties be denoted with respect to salient states;\")\n", + "print(\"n_carnot=1-T1/T2\")\n", + "print(\"so T1/T2=1-0.5\")\n", + "1-0.5\n", + "print(\"so T1/T2=0.5\")\n", + "print(\"or T2=2*T1\")\n", + "print(\"corresponding to state 2,p2*v2=m*R*T2\")\n", + "T2=p2*v2/(m*R)\n", + "print(\"so temperature(T2) in K=\"),round(T2,2)\n", + "print(\"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\")\n", + "print(\"Q_23=W_23=p2*v2*log(v3/v2)\")\n", + "v3=v2*math.exp(Q_23/(p2*v2))\n", + "print(\"so volume(v3) in m^3=\"),round(v3,4)\n", + "T1=T2/2\n", + "print(\"temperature at state 1,T1 in K=\"),round(T1,2)\n", + "print(\"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\")\n", + "print(\"here expansion constant(y)=Cp/Cv\")\n", + "y=Cp/Cv\n", + "print(\"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\")\n", + "p1=p2/(T2/T1)**(y/(y-1))\n", + "print(\"p1 in bar\")\n", + "p1=p1/10**5\n", + "print(\"thus p1*v1=m*R*T1\")\n", + "v1=m*R*T1/(p1*10**5)\n", + "print(\"so volume(v1) in m^3=\"),round(v1,2) \n", + "print(\"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\")\n", + "print(\"for isentropic process,dQ=0,dW=dU\")\n", + "print(\"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\")\n", + "print(\"Q_12=0,\")\n", + "W_12=-m*Cv*(T2-T1)\n", + "print(\"W_12=-105.51 KJ(-ve work)\")\n", + "print(\"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\")\n", + "print(\"Q_31=0,\")\n", + "T4=T1;\n", + "T3=T2;\n", + "W_34=-m*Cv*(T4-T3)\n", + "print(\"ANS:\")\n", + "print(\"W_34=+105.51 KJ(+ve work)\")\n", + "print(\"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\")\n", + "print(\"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\")\n", + "print(\"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\")\n", + "print(\"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\")\n", + "print(\"maximum temperature of cycle=585.36 KJ\")\n", + "print(\"minimum temperature of cycle=292.68 KJ\")\n", + "print(\"volume at the end of isothermal expansion=0.1932 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.12;pg no: 122" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.12, Page:122 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\n", + "let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\n", + "thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\n", + "Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\n", + "Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\n", + "substituting Q1_a and Q1_b in eq 1\n", + "4*Q2/3+2*Q3=5000...............eq4\n", + "also from total work output,Q1_a+Q1_b-Q2-Q3=W\n", + "5000-Q2-Q3=840\n", + "so Q2+Q3=5000-840=4160\n", + "Q3=4160-Q2\n", + "sunstituting Q3 in eq 4\n", + "4*Q2/3+2*(4160-Q2)=5000\n", + "so Q2=in KJ 4980.0\n", + "and Q3= in KJ 820.0\n", + "here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\n", + "Q2=4980 KJ,from heat engine\n", + "Q3=820 KJ,to heat engine\n" + ] + } + ], + "source": [ + "#cal of heat from from heat engine and to heat engine\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.12, Page:122 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\")\n", + "W=840.;#work done by reservoir in KJ\n", + "print(\"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\")\n", + "print(\"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\")\n", + "print(\"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\")\n", + "print(\"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\")\n", + "print(\"substituting Q1_a and Q1_b in eq 1\")\n", + "print(\"4*Q2/3+2*Q3=5000...............eq4\")\n", + "print(\"also from total work output,Q1_a+Q1_b-Q2-Q3=W\")\n", + "print(\"5000-Q2-Q3=840\")\n", + "print(\"so Q2+Q3=5000-840=4160\")\n", + "print(\"Q3=4160-Q2\")\n", + "print(\"sunstituting Q3 in eq 4\")\n", + "print(\"4*Q2/3+2*(4160-Q2)=5000\")\n", + "Q2=(5000.-2.*4160.)/((4./3.)-2.)\n", + "print(\"so Q2=in KJ\"),round(Q2,2)\n", + "Q3=4160.-Q2\n", + "print(\"and Q3= in KJ\"),round(-Q3,2)\n", + "print(\"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\")\n", + "print(\"Q2=4980 KJ,from heat engine\")\n", + "print(\"Q3=820 KJ,to heat engine\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.13;pg no: 123" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.13, Page:123 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\n", + "arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\n", + "for heat engine\n", + "ne=W/Q1=1-T2/T1\n", + "so (Q1-Q2)/Q1=\n", + "and Q2/Q1=\n", + "Q2=0.2593*Q1\n", + "for heat pump,\n", + "COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\n", + "Q4/Q3=\n", + "Q4=1.27*Q3\n", + "work output from engine =work input to pump\n", + "Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\n", + "so Q4/Q1=\n", + "so Q4=3.484*Q1\n", + "also it is given that Q2+Q4=100\n", + "subtituting Q2 and Q4 as function of Q1 in following expression,\n", + "Q2+Q4=100\n", + "so 0.2539*Q1+3.484*Q1=100\n", + "so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\n", + "Q1=100/(0.2539+3.484)in KJ 26.75\n", + "NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of energy taken by engine from reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.13, Page:123 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\")\n", + "T2=(77+273);#temperature of reservoir 2\n", + "T1=(1077+273);#temperature of reservoir 1\n", + "T3=(3+273);#temperature of reservoir 3\n", + "print(\"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\")\n", + "print(\"for heat engine\")\n", + "print(\"ne=W/Q1=1-T2/T1\")\n", + "print(\"so (Q1-Q2)/Q1=\")\n", + "1-T2/T1\n", + "print(\"and Q2/Q1=\")\n", + "1-0.7407\n", + "print(\"Q2=0.2593*Q1\")\n", + "print(\"for heat pump,\")\n", + "print(\"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\")\n", + "T4=T2;\n", + "T4/(T4-T3)\n", + "print(\"Q4/Q3=\")\n", + "4.73/3.73\n", + "print(\"Q4=1.27*Q3\")\n", + "print(\"work output from engine =work input to pump\")\n", + "print(\"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\")\n", + "print(\"so Q4/Q1=\")\n", + "(1-0.2593)/(1-(1/1.27))\n", + "print(\"so Q4=3.484*Q1\")\n", + "print(\"also it is given that Q2+Q4=100\")\n", + "print(\"subtituting Q2 and Q4 as function of Q1 in following expression,\")\n", + "print(\"Q2+Q4=100\")\n", + "print(\"so 0.2539*Q1+3.484*Q1=100\")\n", + "print(\"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\")\n", + "Q1=100/(0.2539+3.484)\n", + "print(\"Q1=100/(0.2539+3.484)in KJ\"),round(Q1,2)\n", + "print(\"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.14;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.14, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\n", + "let temperature of sink be T_sink K\n", + "Q_sink_HE+Q_sink_R=3000 ........eq 1\n", + "since complete work output from engine is used to run refrigerator so,\n", + "2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\n", + "by eq 1 and eq 2,we get Q_R in KJ/s 1000.0\n", + "also for heat engine,2000/1500=Q_sink_HE/T_sink\n", + "=>Q_sink_HE=4*T_sink/3\n", + "for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\n", + "substituting Q_sink_HE and Q_sink_R values\n", + "4*T_sink/3+1000*T_sink/288=3000\n", + "so temperature of sink(T_sink)in K\n", + "so T_sink= 750.0\n", + "T_sink in degree celcius 477.0\n" + ] + } + ], + "source": [ + "#cal of T_sink in degree celcius\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.14, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\")\n", + "Q_source=2000;#heat supplied by heat engine in KJ/s\n", + "T_source=1500;#temperature of source in K\n", + "T_R=(15+273);#temperature of reservoir in K\n", + "Q_sink=3000;#heat received by sink in KJ/s\n", + "print(\"let temperature of sink be T_sink K\")\n", + "print(\"Q_sink_HE+Q_sink_R=3000 ........eq 1\")\n", + "print(\"since complete work output from engine is used to run refrigerator so,\")\n", + "print(\"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\")\n", + "Q_R=3000-2000\n", + "print(\"by eq 1 and eq 2,we get Q_R in KJ/s\"),round(Q_R)\n", + "print(\"also for heat engine,2000/1500=Q_sink_HE/T_sink\")\n", + "print(\"=>Q_sink_HE=4*T_sink/3\")\n", + "print(\"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\")\n", + "print(\"substituting Q_sink_HE and Q_sink_R values\")\n", + "print(\"4*T_sink/3+1000*T_sink/288=3000\")\n", + "print(\"so temperature of sink(T_sink)in K\")\n", + "T_sink=3000/((4/3)+(1000/288))\n", + "print(\"so T_sink=\"),round(T_sink,2)\n", + "T_sink=T_sink-273\n", + "print(\"T_sink in degree celcius\"),round(T_sink,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.15;pg no: 124" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.15, Page:124 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\n", + "let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\n", + "n=W/Q1= 0.39\n", + "so n=W/Q1=0.3881\n", + "COP of heat pump=T3/(T3-T2)=Q3/(2*W/3) 2.89\n", + "so 2.892=3*Q3/2*W\n", + "Q3/Q1= 0.7483\n", + "so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\n" + ] + } + ], + "source": [ + "#cal of heat transferred to refrigerant and low temperature reservoir\n", + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.15, Page:124 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\")\n", + "T1=(500.+273.);#temperature of source in K\n", + "T2=(200.+273.);#temperature of sink in K\n", + "T3=(450.+273.);#temperature of body in K\n", + "print(\"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\")\n", + "n=1-(T2/T1)\n", + "print(\"n=W/Q1=\"),round(n,2)\n", + "print(\"so n=W/Q1=0.3881\")\n", + "COP=T3/(T3-T2)\n", + "print(\"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3)\"),round(COP,2)\n", + "print(\"so 2.892=3*Q3/2*W\")\n", + "print(\"Q3/Q1=\"),round(2*COP*n/3,4)\n", + "print(\"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.16;pg no: 125" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.16, Page:125 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\n", + "NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.16, Page:125 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\")\n", + "print(\"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 4.17;pg no: 126" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 4.17, Page:126 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\n", + "NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 4\n", + "print\"Example 4.17, Page:126 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\")\n", + "print(\"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\")\n" + ] + }, + { + "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/_Engineering_Thermodynamics_by__O._Singh/chapter5.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5.ipynb new file mode 100755 index 00000000..2eb17c0f --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5.ipynb @@ -0,0 +1,1126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Entropy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.1;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.1, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\n", + "entropy change may be given as,\n", + "s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\n", + "here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 0.263\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.1, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\")\n", + "p1=5.;#initial pressure of air\n", + "T1=(27.+273.);#temperature of air in K\n", + "p2=2.;#final pressure of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp_air=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"entropy change may be given as,\")\n", + "print(\"s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\")\n", + "print(\"here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=(Cp_air*0)-(R*math.log(p2/p1))\n", + "print(\"deltaS=\"),round(deltaS,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.2;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.2, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\n", + "total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\n", + "deltaS1=Q1/T1,where Q1=m*Cp*deltaT\n", + "heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\n", + "Q1= 1533.0\n", + "deltaS1=Q1/T1 in KJ/K 5.11\n", + "now heat of vaporisation(Q2)=in KJ 11300.0\n", + "entropy change during phase transformation(deltaS2)in KJ/K\n", + "deltaS2= 30.29\n", + "entropy change during steam temperature rise(deltaS3)in KJ/K\n", + "deltaS3=m*Cp_steam*dT/T\n", + "here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\n", + "R=in KJ/kg K 0.46\n", + "now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\n", + "total entropy change(deltaS) in KJ/K= 87.24\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.2, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\")\n", + "import scipy\n", + "from scipy import integrate\n", + "##just an example function\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=(27.+273.);#temperature of water in K\n", + "T2=(100.+273.);#steam temperature of water in K\n", + "m=5.;#mass of water in kg\n", + "q=2260.;#heat of vaporisation at 100 degree celcius in KJ/kg\n", + "Cp=4.2;#specific heat of water at constant pressure in KJ/kg K\n", + "M=18.;#molar mass for water/steam \n", + "R1=8.314;#gas constant in KJ/kg K\n", + "print(\"total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\")\n", + "Q1=m*Cp*(T2-T1)\n", + "print(\"deltaS1=Q1/T1,where Q1=m*Cp*deltaT\")\n", + "print(\"heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\")\n", + "print(\"Q1=\"),round(Q1,2)\n", + "deltaS1=Q1/T1\n", + "print(\"deltaS1=Q1/T1 in KJ/K\"),round(deltaS1,2)\n", + "Q2=m*q\n", + "print(\"now heat of vaporisation(Q2)=in KJ\"),round(Q2,2)\n", + "print(\"entropy change during phase transformation(deltaS2)in KJ/K\")\n", + "deltaS2=Q2/T2\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "print(\"entropy change during steam temperature rise(deltaS3)in KJ/K\")\n", + "print(\"deltaS3=m*Cp_steam*dT/T\")\n", + "print(\"here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=in KJ/kg K\"),round(R,2)\n", + "T2=(100+273.15);#steam temperature of water in K\n", + "T3=(400+273.15);#temperature of steam in K\n", + "print(\"now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\")\n", + "#function y = f(T), y =(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T , endfunction\n", + "def fun1(x):\n", + "\ty=(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T\n", + "\treturn y\n", + "\n", + "#deltaS3 =scipy.integrate.quad(f,T2, T3) \n", + "deltaS3=51.84;#approximately\n", + "deltaS=deltaS1+deltaS2+deltaS3\n", + "print(\"total entropy change(deltaS) in KJ/K=\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.3;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.3, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\n", + "gas constant for oxygen(R)in KJ/kg K\n", + "R= 0.26\n", + "for reversible process the change in entropy may be given as\n", + "deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\n", + "so entropy change=deltaS= in (KJ/kg K) -0.29\n" + ] + } + ], + "source": [ + "#cal of entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.3, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\")\n", + "R1=8.314;#gas constant in KJ/kg K\n", + "M=32;#molar mass for O2 \n", + "T1=(27+273);#initial temperature of O2 in K\n", + "p1=125;#initial pressure of O2 in Kpa\n", + "p2=375;#final pressure of O2 in Kpa\n", + "Cp=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"gas constant for oxygen(R)in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"for reversible process the change in entropy may be given as\")\n", + "print(\"deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\")\n", + "T2=T1;#isothermal process\n", + "deltaS=(Cp*math.log(T2/T1))-(R*math.log(p2/p1))\n", + "print(\"so entropy change=deltaS= in (KJ/kg K)\"),round(deltaS,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.4;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\n", + "entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\n", + "where deltaS_block=m*C*log(T2/T1)\n", + "here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\n", + "therefore deltaS_block=in KJ/K -0.14\n", + "heat loss by block =heat gained by water(Q)in KJ\n", + "Q=-m*C*(T1-T2) -49.13\n", + "therefore deltaS_water=-Q/T2 in KJ/K 0.16\n", + "thus deltaS_universe=in J/K 27.16\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.4, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\")\n", + "T1=(150+273.15);#temperature of copper block in K\n", + "T2=(25+273.15);#temperature of sea water in K\n", + "m=1;#mass of copper block in kg\n", + "C=0.393;#heat capacity of copper in KJ/kg K\n", + "print(\"entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\")\n", + "print(\"where deltaS_block=m*C*log(T2/T1)\")\n", + "print(\"here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\")\n", + "deltaS_block=m*C*math.log(T2/T1)\n", + "print(\"therefore deltaS_block=in KJ/K\"),round(deltaS_block,2)\n", + "print(\"heat loss by block =heat gained by water(Q)in KJ\")\n", + "Q=-m*C*(T1-T2)\n", + "print(\"Q=-m*C*(T1-T2)\"),round(Q,2)\n", + "deltaS_water=-Q/T2\n", + "print(\"therefore deltaS_water=-Q/T2 in KJ/K\"),round(deltaS_water,2)\n", + "deltaS_universe=(deltaS_block+deltaS_water)*1000\n", + "print(\"thus deltaS_universe=in J/K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.5;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.5, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\n", + "deltaS_universe=(deltaS_block+deltaS_seawater)\n", + "since block and sea water both are at same temperature so,\n", + "deltaS_universe=deltaS_seawater\n", + "conservation of energy equation yields,\n", + "Q-W=deltaU+deltaP.E+deltaK.E\n", + "since in this case,W=0,deltaK.E=0,deltaU=0\n", + "Q=deltaP.E\n", + "change in potential energy=deltaP.E=m*g*h in J\n", + "deltaS_universe=deltaS_seawater=Q/T in J/kg K\n", + "entropy change of universe(deltaS_universe)in J/kg K 6.54\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.5, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\")\n", + "m=1;#mass of copper block in kg\n", + "T=(27+273);#temperature of copper block in K\n", + "h=200;#height from which copper block dropped in sea water in m\n", + "C=0.393;#heat capacity for copper in KJ/kg K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"deltaS_universe=(deltaS_block+deltaS_seawater)\")\n", + "print(\"since block and sea water both are at same temperature so,\")\n", + "print(\"deltaS_universe=deltaS_seawater\")\n", + "print(\"conservation of energy equation yields,\")\n", + "print(\"Q-W=deltaU+deltaP.E+deltaK.E\")\n", + "print(\"since in this case,W=0,deltaK.E=0,deltaU=0\")\n", + "deltaPE=m*g*h\n", + "Q=deltaPE\n", + "print(\"Q=deltaP.E\")\n", + "print(\"change in potential energy=deltaP.E=m*g*h in J\")\n", + "print(\"deltaS_universe=deltaS_seawater=Q/T in J/kg K\")\n", + "deltaS_universe=Q/T\n", + "print(\"entropy change of universe(deltaS_universe)in J/kg K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.6;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.6, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\n", + "here deltaS_universe=deltaS_block1+deltaS_block2\n", + "two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\n", + "then from energy conservation\n", + "m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\n", + "Tf=in K 374.18\n", + "hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\n", + "deltaS1=in KJ/K -0.05\n", + "entropy change in block 2(deltaS2)in KJ/K\n", + "deltaS2= 0.06\n", + "entropy change of universe(deltaS)=in KJ/K 0.01\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.6, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\")\n", + "m1=1;#mass of first copper block in kg\n", + "m2=0.5;#mass of second copper block in kg\n", + "T1=(150+273.15);#temperature of first copper block in K\n", + "T2=(0+273.15);#temperature of second copper block in K\n", + "Cp_1=0.393;#heat capacity for copper block 1 in KJ/kg K\n", + "Cp_2=0.381;#heat capacity for copper block 2 in KJ/kg K\n", + "print(\"here deltaS_universe=deltaS_block1+deltaS_block2\")\n", + "print(\"two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\")\n", + "print(\"then from energy conservation\")\n", + "print(\"m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\")\n", + "Tf=((m1*Cp_1*T1)+(m2*Cp_2*T2))/(m1*Cp_1+m2*Cp_2)\n", + "print(\"Tf=in K\"),round(Tf,2)\n", + "print(\"hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\")\n", + "deltaS1=m1*Cp_1*math.log(Tf/T1)\n", + "print(\"deltaS1=in KJ/K\"),round(deltaS1,2)\n", + "print(\"entropy change in block 2(deltaS2)in KJ/K\")\n", + "deltaS2=m2*Cp_2*math.log(Tf/T2)\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "deltaS=deltaS1+deltaS2\n", + "print(\"entropy change of universe(deltaS)=in KJ/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.7;pg no: 147" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.7, Page:147 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\n", + "NOTE=>in this question formula is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.7, Page:147 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\")\n", + "print(\"NOTE=>in this question formula is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.8;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.8, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\n", + "for irreversible operation of engine,\n", + "rate of entropy generation=Q1/T1+Q2/T2\n", + "W=Q1-Q2=>Q2=Q1-W in MW 3.0\n", + "entropy generated(deltaS_gen)in MW\n", + "deltaS_gen= 0.01\n", + "work lost(W_lost)in MW\n", + "W_lost=T2*deltaS_gen 4.0\n" + ] + } + ], + "source": [ + "#cal of work lost\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.8, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\")\n", + "T1=1800.;#temperature of high temperature reservoir in K\n", + "T2=300.;#temperature of low temperature reservoir in K\n", + "Q1=5.;#heat addition in MW\n", + "W=2.;#work done in MW\n", + "print(\"for irreversible operation of engine,\")\n", + "print(\"rate of entropy generation=Q1/T1+Q2/T2\")\n", + "Q2=Q1-W\n", + "print(\"W=Q1-Q2=>Q2=Q1-W in MW\"),round(Q2,2)\n", + "print(\"entropy generated(deltaS_gen)in MW\")\n", + "deltaS_gen=Q1/T1+Q2/T2\n", + "print(\"deltaS_gen=\"),round(deltaS_gen,2)\n", + "Q1=-5;#heat addition in MW\n", + "print(\"work lost(W_lost)in MW\")\n", + "W_lost=T2*deltaS_gen\n", + "print(\"W_lost=T2*deltaS_gen\"),round(W_lost)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.9;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.9, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\n", + "system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\n", + "therefore,maximum heat(Q1)=(C*dT)in J\n", + "here C=0.05*T^2+0.10*T+0.085 in J/K\n", + "so Q1=(0.05*T^2+0.10*T+0.085)*dT\n", + "entropy change of system,deltaS_system=C*dT/T in J/K\n", + "so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\n", + "deltaS_reservoir=Q2/T2=(Q1-W)/T2 also,we know from entropy principle,deltaS_universe is greater than equal to 0\n", + "deltaS_universe=deltaS_system+deltaS_reservoir\n", + "thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\n", + "W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\n", + "hence maximum work in KJ= 435.34\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.9, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=500;#temperature of system in K\n", + "T2=300;#temperature of reservoir in K\n", + "print(\"system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\")\n", + "print(\"therefore,maximum heat(Q1)=(C*dT)in J\")\n", + "print(\"here C=0.05*T^2+0.10*T+0.085 in J/K\")\n", + "print(\"so Q1=(0.05*T^2+0.10*T+0.085)*dT\")\n", + "T=T1-T2\n", + "#Q1=(0.05*T**2+0.10*T+0.085)*dT\n", + "#function y = f(T), y = (0.05*T**2+0.10*T+0.085),endfunction\n", + "#Q1 = scipy.integrate.quad(fun1,T1, T2)\n", + "#Q1=-Q1\n", + "Q1=1641.35*10**3\n", + "print(\"entropy change of system,deltaS_system=C*dT/T in J/K\")\n", + "print(\"so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\")\n", + "#function y = k(T), y = (0.05*T**2+0.10*T+0.085)/T,endfunction\n", + "def fun1(x):\n", + "\ty = (0.05*T**2+0.10*T+0.085)/T\n", + "\treturn y\n", + "\n", + "#deltaS_system = scipy.integrate.quad(k,T1, T2)\n", + "deltaS_system=-4020.043\n", + "print(\"deltaS_reservoir=Q2/T2=(Q1-W)/T2\"),\n", + "print(\"also,we know from entropy principle,deltaS_universe is greater than equal to 0\")\n", + "print(\"deltaS_universe=deltaS_system+deltaS_reservoir\")\n", + "print(\"thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\")\n", + "print(\"W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\")\n", + "W=(Q1+deltaS_system*T2)/1000\n", + "print(\"hence maximum work in KJ=\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.10;pg no: 149" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.10, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\n", + "for reversible adiabatic process governing equation for expansion,\n", + "P*V**1.4=constant\n", + "also,for such process entropy change=0\n", + "using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\n", + "final pressure(p2)in Mpa\n", + "p2= 0.24\n", + "from first law,second law and definition of enthalpy;\n", + "dH=T*dS+v*dP\n", + "for adiabatic process of reversible type,dS=0\n", + "so dH=v*dP\n", + "integrating both side H2-H1=deltaH=v*dP in KJ\n", + "so enthalpy change(deltaH)in KJ=268.8\n", + "and entropy change=0\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "\n", + "print\"Example 5.10, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p1=3.;#initial pressure in Mpa\n", + "v1=0.05;#initial volume in m**3\n", + "v2=0.3;#final volume in m**3\n", + "print(\"for reversible adiabatic process governing equation for expansion,\")\n", + "print(\"P*V**1.4=constant\")\n", + "print(\"also,for such process entropy change=0\")\n", + "print(\"using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\")\n", + "print(\"final pressure(p2)in Mpa\")\n", + "p2=p1*(v1/v2)**1.4\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"from first law,second law and definition of enthalpy;\")\n", + "print(\"dH=T*dS+v*dP\")\n", + "print(\"for adiabatic process of reversible type,dS=0\")\n", + "dS=0;#for adiabatic process of reversible type\n", + "print(\"so dH=v*dP\")\n", + "print(\"integrating both side H2-H1=deltaH=v*dP in KJ\")\n", + "p1=3.*1000.;#initial pressure in Kpa\n", + "p2=244.;#final pressure in Kpa\n", + "#function y = f(p), y =(p1*(v1**1.4)/p)**(1/1.4)\n", + "def fun1(x):\n", + "\ty=(p1*(v1**1.4)/p2)**(1/1.4)\n", + "\treturn y\n", + "\n", + "deltaH = scipy.integrate.quad(fun1,p2,p1)\n", + "print (\"so enthalpy change(deltaH)in KJ=268.8\")\n", + "print(\"and entropy change=0\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.11;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.11, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\n", + "during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\n", + "a> change in entropy of air(deltaS_air)in J/K\n", + "deltaS_air= 1321.68\n", + "b> during free expansion on heat is gained or lost to surrounding so,\n", + "deltaS_surrounding=0\n", + "entropy change of surroundings=0\n", + "c> entropy change of universe(deltaS_universe)in J/K\n", + "deltaS_universe= 1321.68\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.11, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\")\n", + "m=2;#mass of air in kg\n", + "v1=1;#initial volume of air in m^3\n", + "v2=10;#final volume of air in m^3\n", + "R=287;#gas constant in J/kg K\n", + "print(\"during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\")\n", + "print(\"a> change in entropy of air(deltaS_air)in J/K\")\n", + "deltaS_air=m*R*math.log(v2/v1)\n", + "print(\"deltaS_air=\"),round(deltaS_air,2)\n", + "print(\"b> during free expansion on heat is gained or lost to surrounding so,\")\n", + "print(\"deltaS_surrounding=0\")\n", + "print(\"entropy change of surroundings=0\")\n", + "deltaS_surrounding=0;#entropy change of surroundings\n", + "print(\"c> entropy change of universe(deltaS_universe)in J/K\")\n", + "deltaS_universe=deltaS_air+deltaS_surrounding\n", + "print(\"deltaS_universe=\"),round(deltaS_universe,2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "##example 5.12;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.12, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\n", + "let initial and final states be denoted by 1 and 2\n", + "for poly tropic process pressure and temperature can be related as\n", + "(p2/p1)^((n-1)/n)=T2/T1\n", + "so temperature after compression(T2)=in K 1128.94\n", + "substituting in entropy change expression for polytropic process,\n", + "entropy change(deltaS)inKJ/kg K\n", + "deltaS= -0.24454\n", + "NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\n", + "total entropy change(deltaS)=in J/K -122.27\n" + ] + } + ], + "source": [ + "#cal of total entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.12, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\")\n", + "m=0.5;#mass of air in kg\n", + "p1=1.013*10**5;#initial pressure of air in pa\n", + "p2=0.8*10**6;#final pressure of air in pa\n", + "T1=800;#initial temperature of air in K\n", + "n=1.2;#polytropic expansion constant\n", + "y=1.4;#expansion constant for air\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "print(\"let initial and final states be denoted by 1 and 2\")\n", + "print(\"for poly tropic process pressure and temperature can be related as\")\n", + "print(\"(p2/p1)^((n-1)/n)=T2/T1\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"so temperature after compression(T2)=in K\"),round(T2,2)\n", + "print(\"substituting in entropy change expression for polytropic process,\") \n", + "print(\"entropy change(deltaS)inKJ/kg K\")\n", + "deltaS=Cv*((n-y)/(n-1))*math.log(T2/T1)\n", + "print(\"deltaS=\"),round(deltaS,5)\n", + "print(\"NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\")\n", + "deltaS=m*deltaS*1000\n", + "print(\"total entropy change(deltaS)=in J/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.13;pg no: 151" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.13, Page:151 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\n", + "NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.13, Page:151 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\")\n", + "print(\"NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.14;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.14, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\n", + "clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\n", + "K=dQ/T=Q1/T1-Q2/T2\n", + "i> for Q2=200 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K is not greater than 0,therefore under these conditions engine is not possible\n", + "ii> for Q2=400 kcal/s\n", + "K=in kcal/s K -1.0\n", + "as K is less than 0,so engine is feasible and cycle is reversible\n", + "iii> for Q2=250 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K=0,so engine is feasible and cycle is reversible\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.14, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\")\n", + "Q1=500;#heat supplied by source in kcal/s\n", + "T1=600;#temperature of source in K\n", + "T2=300;#temperature of sink in K\n", + "print(\"clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\")\n", + "print(\"K=dQ/T=Q1/T1-Q2/T2\")\n", + "print(\"i> for Q2=200 kcal/s\")\n", + "Q2=200;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is not greater than 0,therefore under these conditions engine is not possible\")\n", + "print(\"ii> for Q2=400 kcal/s\")\n", + "Q2=400;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is less than 0,so engine is feasible and cycle is reversible\")\n", + "print(\"iii> for Q2=250 kcal/s\")\n", + "Q2=250;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K=0,so engine is feasible and cycle is reversible\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.15;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.15, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\n", + "let the two points be given as states 1 and 2,\n", + "let us assume flow to be from 1 to 2\n", + "so entropy change(deltaS1_2)=s1-s2=in KJ/kg K -0.0\n", + "deltaS1_2=s1-s2=0.01254 KJ/kg K\n", + "it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\n", + "hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.15, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\")\n", + "p1=0.5;#initial pressure of air in Mpa\n", + "T1=400;#initial temperature of air in K\n", + "p2=0.3;#final pressure of air in Mpa\n", + "T2=350;#initial temperature of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "print(\"let the two points be given as states 1 and 2,\")\n", + "print(\"let us assume flow to be from 1 to 2\")\n", + "deltaS1_2=Cp*math.log(T1/T2)-R*math.log(p1/p2)\n", + "print(\"so entropy change(deltaS1_2)=s1-s2=in KJ/kg K\"),round(deltaS1_2)\n", + "print(\"deltaS1_2=s1-s2=0.01254 KJ/kg K\")\n", + "print(\"it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\")\n", + "print(\"hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.16;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.16, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\n", + "NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.16, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\")\n", + "print(\"NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.17;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.17, Page:153 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\n", + "total heat added(Q)in KJ\n", + "Q= 1800.0\n", + "for heat addition process 1-2\n", + "Q12=T1*(s2-s1)\n", + "deltaS=s2-s1=in KJ/K 2.0\n", + "or heat addition process 3-4\n", + "Q34=T3*(s4-s3)\n", + "deltaS=s4-s3=in KJ/K 2.0\n", + "or heat rejected in process 5-6(Q56)in KJ\n", + "Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)= 1200.0\n", + "net work done=net heat(W_net)in KJ\n", + "W_net=(Q12+Q34)-Q56 600.0\n", + "thermal efficiency of cycle(n)= 0.33\n", + "or n=n*100 % 33.33\n", + "so work done=600 KJ and thermal efficiency=33.33 %\n" + ] + } + ], + "source": [ + "#cal of work done and thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.17, Page:153 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\")\n", + "Q12=1000.;#heat added during process 1-2 in KJ\n", + "Q34=800.;#heat added during process 3-4 in KJ\n", + "T1=500.;#operating temperature for process 1-2\n", + "T3=400.;#operating temperature for process 3-4\n", + "T5=300.;#operating temperature for process 5-6\n", + "T2=T1;#isothermal process\n", + "T4=T3;#isothermal process\n", + "T6=T5;#isothermal process\n", + "print(\"total heat added(Q)in KJ\")\n", + "Q=Q12+Q34\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"for heat addition process 1-2\")\n", + "print(\"Q12=T1*(s2-s1)\")\n", + "deltaS=Q12/T1\n", + "print(\"deltaS=s2-s1=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat addition process 3-4\")\n", + "print(\"Q34=T3*(s4-s3)\")\n", + "deltaS=Q34/T3\n", + "print(\"deltaS=s4-s3=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat rejected in process 5-6(Q56)in KJ\")\n", + "Q56=T5*(deltaS+deltaS)\n", + "print(\"Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)=\"),round(Q56,2)\n", + "print(\"net work done=net heat(W_net)in KJ\")\n", + "W_net=(Q12+Q34)-Q56\n", + "print(\"W_net=(Q12+Q34)-Q56\"),round(W_net,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency of cycle(n)=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2) \n", + "print(\"so work done=600 KJ and thermal efficiency=33.33 %\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.18;pg no: 154" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.18, Page:154 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\n", + "let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\n", + "here Q1-Q2=W\n", + "so heat supplied by source(Q1)in KW= 30.0\n", + "also given that,Q1_a=0.7*Q1_b.......eq 1\n", + "Q1_c=Q1-(0.7*Q1_b+Q1_b)\n", + "Q1_c=Q1-1.7*Q1_b........eq 2\n", + "for reversible engine\n", + "Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\n", + "substitute eq 1 and eq 2 in eq 3 we get, \n", + "heat supplied by reservoir of 700 K(Q1_b)in KJ/s\n", + "Q1_b= 35.39\n", + "so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\n", + "Q1_a= 24.78\n", + "and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\n", + "Q1_c=Q1-1.7*Q1_b -30.17\n", + "so heat supplied by reservoir at 800 K(Q1_a)= 24.78\n", + "so heat supplied by reservoir at 700 K(Q1_b)= 35.39\n", + "so heat supplied by reservoir at 600 K(Q1_c)= -30.17\n", + "NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\n" + ] + } + ], + "source": [ + "#cal of heat supplied by reservoir at 800,700,600\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.18, Page:154 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\")\n", + "T1_a=800.;#temperature of reservoir a in K\n", + "T1_b=700.;#temperature of reservoir b in K\n", + "T1_c=600.;#temperature of reservoir c in K\n", + "T2=320.;#temperature of sink in K\n", + "W=20.;#work done in KW\n", + "Q2=10.;#heat rejected to sink in KW\n", + "print(\"let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\")\n", + "print(\"here Q1-Q2=W\")\n", + "Q1=W+Q2\n", + "print(\"so heat supplied by source(Q1)in KW=\"),round(Q1,2)\n", + "print(\"also given that,Q1_a=0.7*Q1_b.......eq 1\")\n", + "print(\"Q1_c=Q1-(0.7*Q1_b+Q1_b)\")\n", + "print(\"Q1_c=Q1-1.7*Q1_b........eq 2\")\n", + "print(\"for reversible engine\")\n", + "print(\"Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\")\n", + "print(\"substitute eq 1 and eq 2 in eq 3 we get, \")\n", + "print(\"heat supplied by reservoir of 700 K(Q1_b)in KJ/s\")\n", + "Q1_b=((Q2/T2)-(Q1/T1_c))/((0.7/T1_a)+(1/T1_b)-(1.7/T1_c))\n", + "print(\"Q1_b=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\")\n", + "Q1_a=0.7*Q1_b\n", + "print(\"Q1_a=\"),round(Q1_a,2)\n", + "print(\"and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\")\n", + "Q1_c=Q1-1.7*Q1_b\n", + "print(\"Q1_c=Q1-1.7*Q1_b\"),round(Q1_c,2)\n", + "print(\"so heat supplied by reservoir at 800 K(Q1_a)=\"),round(Q1_a,2)\n", + "print(\"so heat supplied by reservoir at 700 K(Q1_b)=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir at 600 K(Q1_c)=\"),round(Q1_c,2)\n", + "print(\"NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb new file mode 100644 index 00000000..2eb17c0f --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_1.ipynb @@ -0,0 +1,1126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Entropy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.1;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.1, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\n", + "entropy change may be given as,\n", + "s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\n", + "here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 0.263\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.1, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\")\n", + "p1=5.;#initial pressure of air\n", + "T1=(27.+273.);#temperature of air in K\n", + "p2=2.;#final pressure of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp_air=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"entropy change may be given as,\")\n", + "print(\"s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\")\n", + "print(\"here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=(Cp_air*0)-(R*math.log(p2/p1))\n", + "print(\"deltaS=\"),round(deltaS,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.2;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.2, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\n", + "total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\n", + "deltaS1=Q1/T1,where Q1=m*Cp*deltaT\n", + "heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\n", + "Q1= 1533.0\n", + "deltaS1=Q1/T1 in KJ/K 5.11\n", + "now heat of vaporisation(Q2)=in KJ 11300.0\n", + "entropy change during phase transformation(deltaS2)in KJ/K\n", + "deltaS2= 30.29\n", + "entropy change during steam temperature rise(deltaS3)in KJ/K\n", + "deltaS3=m*Cp_steam*dT/T\n", + "here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\n", + "R=in KJ/kg K 0.46\n", + "now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\n", + "total entropy change(deltaS) in KJ/K= 87.24\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.2, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\")\n", + "import scipy\n", + "from scipy import integrate\n", + "##just an example function\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=(27.+273.);#temperature of water in K\n", + "T2=(100.+273.);#steam temperature of water in K\n", + "m=5.;#mass of water in kg\n", + "q=2260.;#heat of vaporisation at 100 degree celcius in KJ/kg\n", + "Cp=4.2;#specific heat of water at constant pressure in KJ/kg K\n", + "M=18.;#molar mass for water/steam \n", + "R1=8.314;#gas constant in KJ/kg K\n", + "print(\"total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\")\n", + "Q1=m*Cp*(T2-T1)\n", + "print(\"deltaS1=Q1/T1,where Q1=m*Cp*deltaT\")\n", + "print(\"heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\")\n", + "print(\"Q1=\"),round(Q1,2)\n", + "deltaS1=Q1/T1\n", + "print(\"deltaS1=Q1/T1 in KJ/K\"),round(deltaS1,2)\n", + "Q2=m*q\n", + "print(\"now heat of vaporisation(Q2)=in KJ\"),round(Q2,2)\n", + "print(\"entropy change during phase transformation(deltaS2)in KJ/K\")\n", + "deltaS2=Q2/T2\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "print(\"entropy change during steam temperature rise(deltaS3)in KJ/K\")\n", + "print(\"deltaS3=m*Cp_steam*dT/T\")\n", + "print(\"here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=in KJ/kg K\"),round(R,2)\n", + "T2=(100+273.15);#steam temperature of water in K\n", + "T3=(400+273.15);#temperature of steam in K\n", + "print(\"now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\")\n", + "#function y = f(T), y =(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T , endfunction\n", + "def fun1(x):\n", + "\ty=(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T\n", + "\treturn y\n", + "\n", + "#deltaS3 =scipy.integrate.quad(f,T2, T3) \n", + "deltaS3=51.84;#approximately\n", + "deltaS=deltaS1+deltaS2+deltaS3\n", + "print(\"total entropy change(deltaS) in KJ/K=\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.3;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.3, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\n", + "gas constant for oxygen(R)in KJ/kg K\n", + "R= 0.26\n", + "for reversible process the change in entropy may be given as\n", + "deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\n", + "so entropy change=deltaS= in (KJ/kg K) -0.29\n" + ] + } + ], + "source": [ + "#cal of entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.3, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\")\n", + "R1=8.314;#gas constant in KJ/kg K\n", + "M=32;#molar mass for O2 \n", + "T1=(27+273);#initial temperature of O2 in K\n", + "p1=125;#initial pressure of O2 in Kpa\n", + "p2=375;#final pressure of O2 in Kpa\n", + "Cp=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"gas constant for oxygen(R)in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"for reversible process the change in entropy may be given as\")\n", + "print(\"deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\")\n", + "T2=T1;#isothermal process\n", + "deltaS=(Cp*math.log(T2/T1))-(R*math.log(p2/p1))\n", + "print(\"so entropy change=deltaS= in (KJ/kg K)\"),round(deltaS,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.4;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\n", + "entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\n", + "where deltaS_block=m*C*log(T2/T1)\n", + "here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\n", + "therefore deltaS_block=in KJ/K -0.14\n", + "heat loss by block =heat gained by water(Q)in KJ\n", + "Q=-m*C*(T1-T2) -49.13\n", + "therefore deltaS_water=-Q/T2 in KJ/K 0.16\n", + "thus deltaS_universe=in J/K 27.16\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.4, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\")\n", + "T1=(150+273.15);#temperature of copper block in K\n", + "T2=(25+273.15);#temperature of sea water in K\n", + "m=1;#mass of copper block in kg\n", + "C=0.393;#heat capacity of copper in KJ/kg K\n", + "print(\"entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\")\n", + "print(\"where deltaS_block=m*C*log(T2/T1)\")\n", + "print(\"here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\")\n", + "deltaS_block=m*C*math.log(T2/T1)\n", + "print(\"therefore deltaS_block=in KJ/K\"),round(deltaS_block,2)\n", + "print(\"heat loss by block =heat gained by water(Q)in KJ\")\n", + "Q=-m*C*(T1-T2)\n", + "print(\"Q=-m*C*(T1-T2)\"),round(Q,2)\n", + "deltaS_water=-Q/T2\n", + "print(\"therefore deltaS_water=-Q/T2 in KJ/K\"),round(deltaS_water,2)\n", + "deltaS_universe=(deltaS_block+deltaS_water)*1000\n", + "print(\"thus deltaS_universe=in J/K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.5;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.5, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\n", + "deltaS_universe=(deltaS_block+deltaS_seawater)\n", + "since block and sea water both are at same temperature so,\n", + "deltaS_universe=deltaS_seawater\n", + "conservation of energy equation yields,\n", + "Q-W=deltaU+deltaP.E+deltaK.E\n", + "since in this case,W=0,deltaK.E=0,deltaU=0\n", + "Q=deltaP.E\n", + "change in potential energy=deltaP.E=m*g*h in J\n", + "deltaS_universe=deltaS_seawater=Q/T in J/kg K\n", + "entropy change of universe(deltaS_universe)in J/kg K 6.54\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.5, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\")\n", + "m=1;#mass of copper block in kg\n", + "T=(27+273);#temperature of copper block in K\n", + "h=200;#height from which copper block dropped in sea water in m\n", + "C=0.393;#heat capacity for copper in KJ/kg K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"deltaS_universe=(deltaS_block+deltaS_seawater)\")\n", + "print(\"since block and sea water both are at same temperature so,\")\n", + "print(\"deltaS_universe=deltaS_seawater\")\n", + "print(\"conservation of energy equation yields,\")\n", + "print(\"Q-W=deltaU+deltaP.E+deltaK.E\")\n", + "print(\"since in this case,W=0,deltaK.E=0,deltaU=0\")\n", + "deltaPE=m*g*h\n", + "Q=deltaPE\n", + "print(\"Q=deltaP.E\")\n", + "print(\"change in potential energy=deltaP.E=m*g*h in J\")\n", + "print(\"deltaS_universe=deltaS_seawater=Q/T in J/kg K\")\n", + "deltaS_universe=Q/T\n", + "print(\"entropy change of universe(deltaS_universe)in J/kg K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.6;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.6, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\n", + "here deltaS_universe=deltaS_block1+deltaS_block2\n", + "two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\n", + "then from energy conservation\n", + "m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\n", + "Tf=in K 374.18\n", + "hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\n", + "deltaS1=in KJ/K -0.05\n", + "entropy change in block 2(deltaS2)in KJ/K\n", + "deltaS2= 0.06\n", + "entropy change of universe(deltaS)=in KJ/K 0.01\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.6, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\")\n", + "m1=1;#mass of first copper block in kg\n", + "m2=0.5;#mass of second copper block in kg\n", + "T1=(150+273.15);#temperature of first copper block in K\n", + "T2=(0+273.15);#temperature of second copper block in K\n", + "Cp_1=0.393;#heat capacity for copper block 1 in KJ/kg K\n", + "Cp_2=0.381;#heat capacity for copper block 2 in KJ/kg K\n", + "print(\"here deltaS_universe=deltaS_block1+deltaS_block2\")\n", + "print(\"two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\")\n", + "print(\"then from energy conservation\")\n", + "print(\"m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\")\n", + "Tf=((m1*Cp_1*T1)+(m2*Cp_2*T2))/(m1*Cp_1+m2*Cp_2)\n", + "print(\"Tf=in K\"),round(Tf,2)\n", + "print(\"hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\")\n", + "deltaS1=m1*Cp_1*math.log(Tf/T1)\n", + "print(\"deltaS1=in KJ/K\"),round(deltaS1,2)\n", + "print(\"entropy change in block 2(deltaS2)in KJ/K\")\n", + "deltaS2=m2*Cp_2*math.log(Tf/T2)\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "deltaS=deltaS1+deltaS2\n", + "print(\"entropy change of universe(deltaS)=in KJ/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.7;pg no: 147" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.7, Page:147 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\n", + "NOTE=>in this question formula is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.7, Page:147 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\")\n", + "print(\"NOTE=>in this question formula is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.8;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.8, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\n", + "for irreversible operation of engine,\n", + "rate of entropy generation=Q1/T1+Q2/T2\n", + "W=Q1-Q2=>Q2=Q1-W in MW 3.0\n", + "entropy generated(deltaS_gen)in MW\n", + "deltaS_gen= 0.01\n", + "work lost(W_lost)in MW\n", + "W_lost=T2*deltaS_gen 4.0\n" + ] + } + ], + "source": [ + "#cal of work lost\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.8, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\")\n", + "T1=1800.;#temperature of high temperature reservoir in K\n", + "T2=300.;#temperature of low temperature reservoir in K\n", + "Q1=5.;#heat addition in MW\n", + "W=2.;#work done in MW\n", + "print(\"for irreversible operation of engine,\")\n", + "print(\"rate of entropy generation=Q1/T1+Q2/T2\")\n", + "Q2=Q1-W\n", + "print(\"W=Q1-Q2=>Q2=Q1-W in MW\"),round(Q2,2)\n", + "print(\"entropy generated(deltaS_gen)in MW\")\n", + "deltaS_gen=Q1/T1+Q2/T2\n", + "print(\"deltaS_gen=\"),round(deltaS_gen,2)\n", + "Q1=-5;#heat addition in MW\n", + "print(\"work lost(W_lost)in MW\")\n", + "W_lost=T2*deltaS_gen\n", + "print(\"W_lost=T2*deltaS_gen\"),round(W_lost)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.9;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.9, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\n", + "system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\n", + "therefore,maximum heat(Q1)=(C*dT)in J\n", + "here C=0.05*T^2+0.10*T+0.085 in J/K\n", + "so Q1=(0.05*T^2+0.10*T+0.085)*dT\n", + "entropy change of system,deltaS_system=C*dT/T in J/K\n", + "so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\n", + "deltaS_reservoir=Q2/T2=(Q1-W)/T2 also,we know from entropy principle,deltaS_universe is greater than equal to 0\n", + "deltaS_universe=deltaS_system+deltaS_reservoir\n", + "thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\n", + "W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\n", + "hence maximum work in KJ= 435.34\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.9, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=500;#temperature of system in K\n", + "T2=300;#temperature of reservoir in K\n", + "print(\"system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\")\n", + "print(\"therefore,maximum heat(Q1)=(C*dT)in J\")\n", + "print(\"here C=0.05*T^2+0.10*T+0.085 in J/K\")\n", + "print(\"so Q1=(0.05*T^2+0.10*T+0.085)*dT\")\n", + "T=T1-T2\n", + "#Q1=(0.05*T**2+0.10*T+0.085)*dT\n", + "#function y = f(T), y = (0.05*T**2+0.10*T+0.085),endfunction\n", + "#Q1 = scipy.integrate.quad(fun1,T1, T2)\n", + "#Q1=-Q1\n", + "Q1=1641.35*10**3\n", + "print(\"entropy change of system,deltaS_system=C*dT/T in J/K\")\n", + "print(\"so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\")\n", + "#function y = k(T), y = (0.05*T**2+0.10*T+0.085)/T,endfunction\n", + "def fun1(x):\n", + "\ty = (0.05*T**2+0.10*T+0.085)/T\n", + "\treturn y\n", + "\n", + "#deltaS_system = scipy.integrate.quad(k,T1, T2)\n", + "deltaS_system=-4020.043\n", + "print(\"deltaS_reservoir=Q2/T2=(Q1-W)/T2\"),\n", + "print(\"also,we know from entropy principle,deltaS_universe is greater than equal to 0\")\n", + "print(\"deltaS_universe=deltaS_system+deltaS_reservoir\")\n", + "print(\"thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\")\n", + "print(\"W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\")\n", + "W=(Q1+deltaS_system*T2)/1000\n", + "print(\"hence maximum work in KJ=\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.10;pg no: 149" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.10, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\n", + "for reversible adiabatic process governing equation for expansion,\n", + "P*V**1.4=constant\n", + "also,for such process entropy change=0\n", + "using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\n", + "final pressure(p2)in Mpa\n", + "p2= 0.24\n", + "from first law,second law and definition of enthalpy;\n", + "dH=T*dS+v*dP\n", + "for adiabatic process of reversible type,dS=0\n", + "so dH=v*dP\n", + "integrating both side H2-H1=deltaH=v*dP in KJ\n", + "so enthalpy change(deltaH)in KJ=268.8\n", + "and entropy change=0\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "\n", + "print\"Example 5.10, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p1=3.;#initial pressure in Mpa\n", + "v1=0.05;#initial volume in m**3\n", + "v2=0.3;#final volume in m**3\n", + "print(\"for reversible adiabatic process governing equation for expansion,\")\n", + "print(\"P*V**1.4=constant\")\n", + "print(\"also,for such process entropy change=0\")\n", + "print(\"using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\")\n", + "print(\"final pressure(p2)in Mpa\")\n", + "p2=p1*(v1/v2)**1.4\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"from first law,second law and definition of enthalpy;\")\n", + "print(\"dH=T*dS+v*dP\")\n", + "print(\"for adiabatic process of reversible type,dS=0\")\n", + "dS=0;#for adiabatic process of reversible type\n", + "print(\"so dH=v*dP\")\n", + "print(\"integrating both side H2-H1=deltaH=v*dP in KJ\")\n", + "p1=3.*1000.;#initial pressure in Kpa\n", + "p2=244.;#final pressure in Kpa\n", + "#function y = f(p), y =(p1*(v1**1.4)/p)**(1/1.4)\n", + "def fun1(x):\n", + "\ty=(p1*(v1**1.4)/p2)**(1/1.4)\n", + "\treturn y\n", + "\n", + "deltaH = scipy.integrate.quad(fun1,p2,p1)\n", + "print (\"so enthalpy change(deltaH)in KJ=268.8\")\n", + "print(\"and entropy change=0\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.11;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.11, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\n", + "during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\n", + "a> change in entropy of air(deltaS_air)in J/K\n", + "deltaS_air= 1321.68\n", + "b> during free expansion on heat is gained or lost to surrounding so,\n", + "deltaS_surrounding=0\n", + "entropy change of surroundings=0\n", + "c> entropy change of universe(deltaS_universe)in J/K\n", + "deltaS_universe= 1321.68\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.11, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\")\n", + "m=2;#mass of air in kg\n", + "v1=1;#initial volume of air in m^3\n", + "v2=10;#final volume of air in m^3\n", + "R=287;#gas constant in J/kg K\n", + "print(\"during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\")\n", + "print(\"a> change in entropy of air(deltaS_air)in J/K\")\n", + "deltaS_air=m*R*math.log(v2/v1)\n", + "print(\"deltaS_air=\"),round(deltaS_air,2)\n", + "print(\"b> during free expansion on heat is gained or lost to surrounding so,\")\n", + "print(\"deltaS_surrounding=0\")\n", + "print(\"entropy change of surroundings=0\")\n", + "deltaS_surrounding=0;#entropy change of surroundings\n", + "print(\"c> entropy change of universe(deltaS_universe)in J/K\")\n", + "deltaS_universe=deltaS_air+deltaS_surrounding\n", + "print(\"deltaS_universe=\"),round(deltaS_universe,2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "##example 5.12;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.12, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\n", + "let initial and final states be denoted by 1 and 2\n", + "for poly tropic process pressure and temperature can be related as\n", + "(p2/p1)^((n-1)/n)=T2/T1\n", + "so temperature after compression(T2)=in K 1128.94\n", + "substituting in entropy change expression for polytropic process,\n", + "entropy change(deltaS)inKJ/kg K\n", + "deltaS= -0.24454\n", + "NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\n", + "total entropy change(deltaS)=in J/K -122.27\n" + ] + } + ], + "source": [ + "#cal of total entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.12, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\")\n", + "m=0.5;#mass of air in kg\n", + "p1=1.013*10**5;#initial pressure of air in pa\n", + "p2=0.8*10**6;#final pressure of air in pa\n", + "T1=800;#initial temperature of air in K\n", + "n=1.2;#polytropic expansion constant\n", + "y=1.4;#expansion constant for air\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "print(\"let initial and final states be denoted by 1 and 2\")\n", + "print(\"for poly tropic process pressure and temperature can be related as\")\n", + "print(\"(p2/p1)^((n-1)/n)=T2/T1\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"so temperature after compression(T2)=in K\"),round(T2,2)\n", + "print(\"substituting in entropy change expression for polytropic process,\") \n", + "print(\"entropy change(deltaS)inKJ/kg K\")\n", + "deltaS=Cv*((n-y)/(n-1))*math.log(T2/T1)\n", + "print(\"deltaS=\"),round(deltaS,5)\n", + "print(\"NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\")\n", + "deltaS=m*deltaS*1000\n", + "print(\"total entropy change(deltaS)=in J/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.13;pg no: 151" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.13, Page:151 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\n", + "NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.13, Page:151 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\")\n", + "print(\"NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.14;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.14, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\n", + "clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\n", + "K=dQ/T=Q1/T1-Q2/T2\n", + "i> for Q2=200 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K is not greater than 0,therefore under these conditions engine is not possible\n", + "ii> for Q2=400 kcal/s\n", + "K=in kcal/s K -1.0\n", + "as K is less than 0,so engine is feasible and cycle is reversible\n", + "iii> for Q2=250 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K=0,so engine is feasible and cycle is reversible\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.14, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\")\n", + "Q1=500;#heat supplied by source in kcal/s\n", + "T1=600;#temperature of source in K\n", + "T2=300;#temperature of sink in K\n", + "print(\"clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\")\n", + "print(\"K=dQ/T=Q1/T1-Q2/T2\")\n", + "print(\"i> for Q2=200 kcal/s\")\n", + "Q2=200;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is not greater than 0,therefore under these conditions engine is not possible\")\n", + "print(\"ii> for Q2=400 kcal/s\")\n", + "Q2=400;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is less than 0,so engine is feasible and cycle is reversible\")\n", + "print(\"iii> for Q2=250 kcal/s\")\n", + "Q2=250;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K=0,so engine is feasible and cycle is reversible\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.15;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.15, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\n", + "let the two points be given as states 1 and 2,\n", + "let us assume flow to be from 1 to 2\n", + "so entropy change(deltaS1_2)=s1-s2=in KJ/kg K -0.0\n", + "deltaS1_2=s1-s2=0.01254 KJ/kg K\n", + "it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\n", + "hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.15, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\")\n", + "p1=0.5;#initial pressure of air in Mpa\n", + "T1=400;#initial temperature of air in K\n", + "p2=0.3;#final pressure of air in Mpa\n", + "T2=350;#initial temperature of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "print(\"let the two points be given as states 1 and 2,\")\n", + "print(\"let us assume flow to be from 1 to 2\")\n", + "deltaS1_2=Cp*math.log(T1/T2)-R*math.log(p1/p2)\n", + "print(\"so entropy change(deltaS1_2)=s1-s2=in KJ/kg K\"),round(deltaS1_2)\n", + "print(\"deltaS1_2=s1-s2=0.01254 KJ/kg K\")\n", + "print(\"it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\")\n", + "print(\"hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.16;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.16, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\n", + "NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.16, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\")\n", + "print(\"NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.17;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.17, Page:153 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\n", + "total heat added(Q)in KJ\n", + "Q= 1800.0\n", + "for heat addition process 1-2\n", + "Q12=T1*(s2-s1)\n", + "deltaS=s2-s1=in KJ/K 2.0\n", + "or heat addition process 3-4\n", + "Q34=T3*(s4-s3)\n", + "deltaS=s4-s3=in KJ/K 2.0\n", + "or heat rejected in process 5-6(Q56)in KJ\n", + "Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)= 1200.0\n", + "net work done=net heat(W_net)in KJ\n", + "W_net=(Q12+Q34)-Q56 600.0\n", + "thermal efficiency of cycle(n)= 0.33\n", + "or n=n*100 % 33.33\n", + "so work done=600 KJ and thermal efficiency=33.33 %\n" + ] + } + ], + "source": [ + "#cal of work done and thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.17, Page:153 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\")\n", + "Q12=1000.;#heat added during process 1-2 in KJ\n", + "Q34=800.;#heat added during process 3-4 in KJ\n", + "T1=500.;#operating temperature for process 1-2\n", + "T3=400.;#operating temperature for process 3-4\n", + "T5=300.;#operating temperature for process 5-6\n", + "T2=T1;#isothermal process\n", + "T4=T3;#isothermal process\n", + "T6=T5;#isothermal process\n", + "print(\"total heat added(Q)in KJ\")\n", + "Q=Q12+Q34\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"for heat addition process 1-2\")\n", + "print(\"Q12=T1*(s2-s1)\")\n", + "deltaS=Q12/T1\n", + "print(\"deltaS=s2-s1=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat addition process 3-4\")\n", + "print(\"Q34=T3*(s4-s3)\")\n", + "deltaS=Q34/T3\n", + "print(\"deltaS=s4-s3=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat rejected in process 5-6(Q56)in KJ\")\n", + "Q56=T5*(deltaS+deltaS)\n", + "print(\"Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)=\"),round(Q56,2)\n", + "print(\"net work done=net heat(W_net)in KJ\")\n", + "W_net=(Q12+Q34)-Q56\n", + "print(\"W_net=(Q12+Q34)-Q56\"),round(W_net,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency of cycle(n)=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2) \n", + "print(\"so work done=600 KJ and thermal efficiency=33.33 %\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.18;pg no: 154" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.18, Page:154 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\n", + "let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\n", + "here Q1-Q2=W\n", + "so heat supplied by source(Q1)in KW= 30.0\n", + "also given that,Q1_a=0.7*Q1_b.......eq 1\n", + "Q1_c=Q1-(0.7*Q1_b+Q1_b)\n", + "Q1_c=Q1-1.7*Q1_b........eq 2\n", + "for reversible engine\n", + "Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\n", + "substitute eq 1 and eq 2 in eq 3 we get, \n", + "heat supplied by reservoir of 700 K(Q1_b)in KJ/s\n", + "Q1_b= 35.39\n", + "so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\n", + "Q1_a= 24.78\n", + "and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\n", + "Q1_c=Q1-1.7*Q1_b -30.17\n", + "so heat supplied by reservoir at 800 K(Q1_a)= 24.78\n", + "so heat supplied by reservoir at 700 K(Q1_b)= 35.39\n", + "so heat supplied by reservoir at 600 K(Q1_c)= -30.17\n", + "NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\n" + ] + } + ], + "source": [ + "#cal of heat supplied by reservoir at 800,700,600\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.18, Page:154 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\")\n", + "T1_a=800.;#temperature of reservoir a in K\n", + "T1_b=700.;#temperature of reservoir b in K\n", + "T1_c=600.;#temperature of reservoir c in K\n", + "T2=320.;#temperature of sink in K\n", + "W=20.;#work done in KW\n", + "Q2=10.;#heat rejected to sink in KW\n", + "print(\"let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\")\n", + "print(\"here Q1-Q2=W\")\n", + "Q1=W+Q2\n", + "print(\"so heat supplied by source(Q1)in KW=\"),round(Q1,2)\n", + "print(\"also given that,Q1_a=0.7*Q1_b.......eq 1\")\n", + "print(\"Q1_c=Q1-(0.7*Q1_b+Q1_b)\")\n", + "print(\"Q1_c=Q1-1.7*Q1_b........eq 2\")\n", + "print(\"for reversible engine\")\n", + "print(\"Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\")\n", + "print(\"substitute eq 1 and eq 2 in eq 3 we get, \")\n", + "print(\"heat supplied by reservoir of 700 K(Q1_b)in KJ/s\")\n", + "Q1_b=((Q2/T2)-(Q1/T1_c))/((0.7/T1_a)+(1/T1_b)-(1.7/T1_c))\n", + "print(\"Q1_b=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\")\n", + "Q1_a=0.7*Q1_b\n", + "print(\"Q1_a=\"),round(Q1_a,2)\n", + "print(\"and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\")\n", + "Q1_c=Q1-1.7*Q1_b\n", + "print(\"Q1_c=Q1-1.7*Q1_b\"),round(Q1_c,2)\n", + "print(\"so heat supplied by reservoir at 800 K(Q1_a)=\"),round(Q1_a,2)\n", + "print(\"so heat supplied by reservoir at 700 K(Q1_b)=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir at 600 K(Q1_c)=\"),round(Q1_c,2)\n", + "print(\"NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb new file mode 100644 index 00000000..cc42cd6f --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_2.ipynb @@ -0,0 +1,1124 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5:Entropy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.1;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.1, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\n", + "entropy change may be given as,\n", + "s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\n", + "here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 0.263\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.1, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\")\n", + "p1=5.;#initial pressure of air\n", + "T1=(27.+273.);#temperature of air in K\n", + "p2=2.;#final pressure of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp_air=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"entropy change may be given as,\")\n", + "print(\"s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\")\n", + "print(\"here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=(Cp_air*0)-(R*math.log(p2/p1))\n", + "print(\"deltaS=\"),round(deltaS,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.2;pg no: 144" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.2, Page:144 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\n", + "total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\n", + "deltaS1=Q1/T1,where Q1=m*Cp*deltaT\n", + "heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\n", + "Q1= 1533.0\n", + "deltaS1=Q1/T1 in KJ/K 5.11\n", + "now heat of vaporisation(Q2)=in KJ 11300.0\n", + "entropy change during phase transformation(deltaS2)in KJ/K\n", + "deltaS2= 30.29\n", + "entropy change during steam temperature rise(deltaS3)in KJ/K\n", + "deltaS3=m*Cp_steam*dT/T\n", + "here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\n", + "R=in KJ/kg K 0.46\n", + "now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\n", + "total entropy change(deltaS) in KJ/K= 87.24\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.2, Page:144 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\")\n", + "import scipy\n", + "from scipy import integrate\n", + "##just an example function\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=(27.+273.);#temperature of water in K\n", + "T2=(100.+273.);#steam temperature of water in K\n", + "m=5.;#mass of water in kg\n", + "q=2260.;#heat of vaporisation at 100 degree celcius in KJ/kg\n", + "Cp=4.2;#specific heat of water at constant pressure in KJ/kg K\n", + "M=18.;#molar mass for water/steam \n", + "R1=8.314;#gas constant in KJ/kg K\n", + "print(\"total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\")\n", + "Q1=m*Cp*(T2-T1)\n", + "print(\"deltaS1=Q1/T1,where Q1=m*Cp*deltaT\")\n", + "print(\"heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\")\n", + "print(\"Q1=\"),round(Q1,2)\n", + "deltaS1=Q1/T1\n", + "print(\"deltaS1=Q1/T1 in KJ/K\"),round(deltaS1,2)\n", + "Q2=m*q\n", + "print(\"now heat of vaporisation(Q2)=in KJ\"),round(Q2,2)\n", + "print(\"entropy change during phase transformation(deltaS2)in KJ/K\")\n", + "deltaS2=Q2/T2\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "print(\"entropy change during steam temperature rise(deltaS3)in KJ/K\")\n", + "print(\"deltaS3=m*Cp_steam*dT/T\")\n", + "print(\"here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=in KJ/kg K\"),round(R,2)\n", + "T2=(100+273.15);#steam temperature of water in K\n", + "T3=(400+273.15);#temperature of steam in K\n", + "print(\"now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\")\n", + "#function y = f(T), y =(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T , endfunction\n", + "def fun1(x):\n", + "\ty=(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T\n", + "\treturn y\n", + "\n", + "#deltaS3 =scipy.integrate.quad(f,T2, T3) \n", + "deltaS3=51.84;#approximately\n", + "deltaS=deltaS1+deltaS2+deltaS3\n", + "print(\"total entropy change(deltaS) in KJ/K=\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.3;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.3, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\n", + "gas constant for oxygen(R)in KJ/kg K\n", + "R= 0.26\n", + "for reversible process the change in entropy may be given as\n", + "deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\n", + "so entropy change=deltaS= in (KJ/kg K) -0.29\n" + ] + } + ], + "source": [ + "#cal of entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.3, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\")\n", + "R1=8.314;#gas constant in KJ/kg K\n", + "M=32;#molar mass for O2 \n", + "T1=(27+273);#initial temperature of O2 in K\n", + "p1=125;#initial pressure of O2 in Kpa\n", + "p2=375;#final pressure of O2 in Kpa\n", + "Cp=1.004;#specific heat of air at constant pressure in KJ/kg K\n", + "print(\"gas constant for oxygen(R)in KJ/kg K\")\n", + "R=R1/M\n", + "print(\"R=\"),round(R,2)\n", + "print(\"for reversible process the change in entropy may be given as\")\n", + "print(\"deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\")\n", + "T2=T1;#isothermal process\n", + "deltaS=(Cp*math.log(T2/T1))-(R*math.log(p2/p1))\n", + "print(\"so entropy change=deltaS= in (KJ/kg K)\"),round(deltaS,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.4;pg no: 145" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4, Page:145 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\n", + "entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\n", + "where deltaS_block=m*C*log(T2/T1)\n", + "here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\n", + "therefore deltaS_block=in KJ/K -0.14\n", + "heat loss by block =heat gained by water(Q)in KJ\n", + "Q=-m*C*(T1-T2) -49.13\n", + "therefore deltaS_water=-Q/T2 in KJ/K 0.16\n", + "thus deltaS_universe=in J/K 27.16\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.4, Page:145 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\")\n", + "T1=(150+273.15);#temperature of copper block in K\n", + "T2=(25+273.15);#temperature of sea water in K\n", + "m=1;#mass of copper block in kg\n", + "C=0.393;#heat capacity of copper in KJ/kg K\n", + "print(\"entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\")\n", + "print(\"where deltaS_block=m*C*log(T2/T1)\")\n", + "print(\"here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\")\n", + "deltaS_block=m*C*math.log(T2/T1)\n", + "print(\"therefore deltaS_block=in KJ/K\"),round(deltaS_block,2)\n", + "print(\"heat loss by block =heat gained by water(Q)in KJ\")\n", + "Q=-m*C*(T1-T2)\n", + "print(\"Q=-m*C*(T1-T2)\"),round(Q,2)\n", + "deltaS_water=-Q/T2\n", + "print(\"therefore deltaS_water=-Q/T2 in KJ/K\"),round(deltaS_water,2)\n", + "deltaS_universe=(deltaS_block+deltaS_water)*1000\n", + "print(\"thus deltaS_universe=in J/K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.5;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.5, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\n", + "deltaS_universe=(deltaS_block+deltaS_seawater)\n", + "since block and sea water both are at same temperature so,\n", + "deltaS_universe=deltaS_seawater\n", + "conservation of energy equation yields,\n", + "Q-W=deltaU+deltaP.E+deltaK.E\n", + "since in this case,W=0,deltaK.E=0,deltaU=0\n", + "Q=deltaP.E\n", + "change in potential energy=deltaP.E=m*g*h in J\n", + "deltaS_universe=deltaS_seawater=Q/T in J/kg K\n", + "entropy change of universe(deltaS_universe)in J/kg K 6.54\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.5, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\")\n", + "m=1;#mass of copper block in kg\n", + "T=(27+273);#temperature of copper block in K\n", + "h=200;#height from which copper block dropped in sea water in m\n", + "C=0.393;#heat capacity for copper in KJ/kg K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"deltaS_universe=(deltaS_block+deltaS_seawater)\")\n", + "print(\"since block and sea water both are at same temperature so,\")\n", + "print(\"deltaS_universe=deltaS_seawater\")\n", + "print(\"conservation of energy equation yields,\")\n", + "print(\"Q-W=deltaU+deltaP.E+deltaK.E\")\n", + "print(\"since in this case,W=0,deltaK.E=0,deltaU=0\")\n", + "deltaPE=m*g*h\n", + "Q=deltaPE\n", + "print(\"Q=deltaP.E\")\n", + "print(\"change in potential energy=deltaP.E=m*g*h in J\")\n", + "print(\"deltaS_universe=deltaS_seawater=Q/T in J/kg K\")\n", + "deltaS_universe=Q/T\n", + "print(\"entropy change of universe(deltaS_universe)in J/kg K\"),round(deltaS_universe,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.6;pg no: 146" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.6, Page:146 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\n", + "here deltaS_universe=deltaS_block1+deltaS_block2\n", + "two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\n", + "then from energy conservation\n", + "m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\n", + "Tf=in K 374.18\n", + "hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\n", + "deltaS1=in KJ/K -0.05\n", + "entropy change in block 2(deltaS2)in KJ/K\n", + "deltaS2= 0.06\n", + "entropy change of universe(deltaS)=in KJ/K 0.01\n" + ] + } + ], + "source": [ + "#cal of entropy change of universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.6, Page:146 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\")\n", + "m1=1;#mass of first copper block in kg\n", + "m2=0.5;#mass of second copper block in kg\n", + "T1=(150+273.15);#temperature of first copper block in K\n", + "T2=(0+273.15);#temperature of second copper block in K\n", + "Cp_1=0.393;#heat capacity for copper block 1 in KJ/kg K\n", + "Cp_2=0.381;#heat capacity for copper block 2 in KJ/kg K\n", + "print(\"here deltaS_universe=deltaS_block1+deltaS_block2\")\n", + "print(\"two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\")\n", + "print(\"then from energy conservation\")\n", + "print(\"m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\")\n", + "Tf=((m1*Cp_1*T1)+(m2*Cp_2*T2))/(m1*Cp_1+m2*Cp_2)\n", + "print(\"Tf=in K\"),round(Tf,2)\n", + "print(\"hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\")\n", + "deltaS1=m1*Cp_1*math.log(Tf/T1)\n", + "print(\"deltaS1=in KJ/K\"),round(deltaS1,2)\n", + "print(\"entropy change in block 2(deltaS2)in KJ/K\")\n", + "deltaS2=m2*Cp_2*math.log(Tf/T2)\n", + "print(\"deltaS2=\"),round(deltaS2,2)\n", + "deltaS=deltaS1+deltaS2\n", + "print(\"entropy change of universe(deltaS)=in KJ/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.7;pg no: 147" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.7, Page:147 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\n", + "NOTE=>in this question formula is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.7, Page:147 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\")\n", + "print(\"NOTE=>in this question formula is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.8;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.8, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\n", + "for irreversible operation of engine,\n", + "rate of entropy generation=Q1/T1+Q2/T2\n", + "W=Q1-Q2=>Q2=Q1-W in MW 3.0\n", + "entropy generated(deltaS_gen)in MW\n", + "deltaS_gen= 0.01\n", + "work lost(W_lost)in MW\n", + "W_lost=T2*deltaS_gen 4.0\n" + ] + } + ], + "source": [ + "#cal of work lost\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.8, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\")\n", + "T1=1800.;#temperature of high temperature reservoir in K\n", + "T2=300.;#temperature of low temperature reservoir in K\n", + "Q1=5.;#heat addition in MW\n", + "W=2.;#work done in MW\n", + "print(\"for irreversible operation of engine,\")\n", + "print(\"rate of entropy generation=Q1/T1+Q2/T2\")\n", + "Q2=Q1-W\n", + "print(\"W=Q1-Q2=>Q2=Q1-W in MW\"),round(Q2,2)\n", + "print(\"entropy generated(deltaS_gen)in MW\")\n", + "deltaS_gen=Q1/T1+Q2/T2\n", + "print(\"deltaS_gen=\"),round(deltaS_gen,2)\n", + "Q1=-5;#heat addition in MW\n", + "print(\"work lost(W_lost)in MW\")\n", + "W_lost=T2*deltaS_gen\n", + "print(\"W_lost=T2*deltaS_gen\"),round(W_lost)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.9;pg no: 148" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.9, Page:148 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\n", + "system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\n", + "therefore,maximum heat(Q1)=(C*dT)in J\n", + "here C=0.05*T^2+0.10*T+0.085 in J/K\n", + "so Q1=(0.05*T^2+0.10*T+0.085)*dT\n", + "entropy change of system,deltaS_system=C*dT/T in J/K\n", + "so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\n", + "deltaS_reservoir=Q2/T2=(Q1-W)/T2 also,we know from entropy principle,deltaS_universe is greater than equal to 0\n", + "deltaS_universe=deltaS_system+deltaS_reservoir\n", + "thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\n", + "W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\n", + "hence maximum work in KJ= 435.34\n" + ] + } + ], + "source": [ + "#cal of COP\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.9, Page:148 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "T1=500;#temperature of system in K\n", + "T2=300;#temperature of reservoir in K\n", + "print(\"system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\")\n", + "print(\"therefore,maximum heat(Q1)=(C*dT)in J\")\n", + "print(\"here C=0.05*T^2+0.10*T+0.085 in J/K\")\n", + "print(\"so Q1=(0.05*T^2+0.10*T+0.085)*dT\")\n", + "T=T1-T2\n", + "#Q1=(0.05*T**2+0.10*T+0.085)*dT\n", + "#function y = f(T), y = (0.05*T**2+0.10*T+0.085),endfunction\n", + "#Q1 = scipy.integrate.quad(fun1,T1, T2)\n", + "#Q1=-Q1\n", + "Q1=1641.35*10**3\n", + "print(\"entropy change of system,deltaS_system=C*dT/T in J/K\")\n", + "print(\"so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\")\n", + "#function y = k(T), y = (0.05*T**2+0.10*T+0.085)/T,endfunction\n", + "def fun1(x):\n", + "\ty = (0.05*T**2+0.10*T+0.085)/T\n", + "\treturn y\n", + "\n", + "#deltaS_system = scipy.integrate.quad(k,T1, T2)\n", + "deltaS_system=-4020.043\n", + "print(\"deltaS_reservoir=Q2/T2=(Q1-W)/T2\"),\n", + "print(\"also,we know from entropy principle,deltaS_universe is greater than equal to 0\")\n", + "print(\"deltaS_universe=deltaS_system+deltaS_reservoir\")\n", + "print(\"thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\")\n", + "print(\"W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\")\n", + "W=(Q1+deltaS_system*T2)/1000\n", + "print(\"hence maximum work in KJ=\"),round(W,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.10;pg no: 149" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.10, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\n", + "for reversible adiabatic process governing equation for expansion,\n", + "P*V**1.4=constant\n", + "also,for such process entropy change=0\n", + "using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\n", + "final pressure(p2)in Mpa\n", + "p2= 0.24\n", + "from first law,second law and definition of enthalpy;\n", + "dH=T*dS+v*dP\n", + "for adiabatic process of reversible type,dS=0\n", + "so dH=v*dP\n", + "integrating both side H2-H1=deltaH=v*dP in KJ\n", + "so enthalpy change(deltaH)in KJ=268.8\n", + "and entropy change=0\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "\n", + "print\"Example 5.10, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\")\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "def fun1(x):\n", + "\ty=x*x\n", + "\treturn y\n", + "\n", + "p1=3.;#initial pressure in Mpa\n", + "v1=0.05;#initial volume in m**3\n", + "v2=0.3;#final volume in m**3\n", + "print(\"for reversible adiabatic process governing equation for expansion,\")\n", + "print(\"P*V**1.4=constant\")\n", + "print(\"also,for such process entropy change=0\")\n", + "print(\"using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\")\n", + "print(\"final pressure(p2)in Mpa\")\n", + "p2=p1*(v1/v2)**1.4\n", + "print(\"p2=\"),round(p2,2)\n", + "print(\"from first law,second law and definition of enthalpy;\")\n", + "print(\"dH=T*dS+v*dP\")\n", + "print(\"for adiabatic process of reversible type,dS=0\")\n", + "dS=0;#for adiabatic process of reversible type\n", + "print(\"so dH=v*dP\")\n", + "print(\"integrating both side H2-H1=deltaH=v*dP in KJ\")\n", + "p1=3.*1000.;#initial pressure in Kpa\n", + "p2=244.;#final pressure in Kpa\n", + "#function y = f(p), y =(p1*(v1**1.4)/p)**(1/1.4)\n", + "def fun1(x):\n", + "\ty=(p1*(v1**1.4)/p2)**(1/1.4)\n", + "\treturn y\n", + "\n", + "deltaH = scipy.integrate.quad(fun1,p2,p1)\n", + "print (\"so enthalpy change(deltaH)in KJ=268.8\")\n", + "print(\"and entropy change=0\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.11;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.11, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\n", + "during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\n", + "a> change in entropy of air(deltaS_air)in J/K\n", + "deltaS_air= 1321.68\n", + "b> during free expansion on heat is gained or lost to surrounding so,\n", + "deltaS_surrounding=0\n", + "entropy change of surroundings=0\n", + "c> entropy change of universe(deltaS_universe)in J/K\n", + "deltaS_universe= 1321.68\n" + ] + } + ], + "source": [ + "#cal of deltaS_universe\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.11, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\")\n", + "m=2;#mass of air in kg\n", + "v1=1;#initial volume of air in m^3\n", + "v2=10;#final volume of air in m^3\n", + "R=287;#gas constant in J/kg K\n", + "print(\"during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\")\n", + "print(\"a> change in entropy of air(deltaS_air)in J/K\")\n", + "deltaS_air=m*R*math.log(v2/v1)\n", + "print(\"deltaS_air=\"),round(deltaS_air,2)\n", + "print(\"b> during free expansion on heat is gained or lost to surrounding so,\")\n", + "print(\"deltaS_surrounding=0\")\n", + "print(\"entropy change of surroundings=0\")\n", + "deltaS_surrounding=0;#entropy change of surroundings\n", + "print(\"c> entropy change of universe(deltaS_universe)in J/K\")\n", + "deltaS_universe=deltaS_air+deltaS_surrounding\n", + "print(\"deltaS_universe=\"),round(deltaS_universe,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "##example 5.12;pg no: 150" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.12, Page:150 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\n", + "let initial and final states be denoted by 1 and 2\n", + "for poly tropic process pressure and temperature can be related as\n", + "(p2/p1)^((n-1)/n)=T2/T1\n", + "so temperature after compression(T2)=in K 1128.94\n", + "substituting in entropy change expression for polytropic process,\n", + "entropy change(deltaS)inKJ/kg K\n", + "deltaS= -0.24454\n", + "NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\n", + "total entropy change(deltaS)=in J/K -122.27\n" + ] + } + ], + "source": [ + "#cal of total entropy change\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.12, Page:150 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\")\n", + "m=0.5;#mass of air in kg\n", + "p1=1.013*10**5;#initial pressure of air in pa\n", + "p2=0.8*10**6;#final pressure of air in pa\n", + "T1=800;#initial temperature of air in K\n", + "n=1.2;#polytropic expansion constant\n", + "y=1.4;#expansion constant for air\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "print(\"let initial and final states be denoted by 1 and 2\")\n", + "print(\"for poly tropic process pressure and temperature can be related as\")\n", + "print(\"(p2/p1)^((n-1)/n)=T2/T1\")\n", + "T2=T1*(p2/p1)**((n-1)/n)\n", + "print(\"so temperature after compression(T2)=in K\"),round(T2,2)\n", + "print(\"substituting in entropy change expression for polytropic process,\") \n", + "print(\"entropy change(deltaS)inKJ/kg K\")\n", + "deltaS=Cv*((n-y)/(n-1))*math.log(T2/T1)\n", + "print(\"deltaS=\"),round(deltaS,5)\n", + "print(\"NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\")\n", + "deltaS=m*deltaS*1000\n", + "print(\"total entropy change(deltaS)=in J/K\"),round(deltaS,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.13;pg no: 151" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.13, Page:151 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\n", + "NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.13, Page:151 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\")\n", + "print(\"NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.14;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.14, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\n", + "clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\n", + "K=dQ/T=Q1/T1-Q2/T2\n", + "i> for Q2=200 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K is not greater than 0,therefore under these conditions engine is not possible\n", + "ii> for Q2=400 kcal/s\n", + "K=in kcal/s K -1.0\n", + "as K is less than 0,so engine is feasible and cycle is reversible\n", + "iii> for Q2=250 kcal/s\n", + "K=in kcal/s K 0.0\n", + "as K=0,so engine is feasible and cycle is reversible\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.14, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\")\n", + "Q1=500;#heat supplied by source in kcal/s\n", + "T1=600;#temperature of source in K\n", + "T2=300;#temperature of sink in K\n", + "print(\"clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\")\n", + "print(\"K=dQ/T=Q1/T1-Q2/T2\")\n", + "print(\"i> for Q2=200 kcal/s\")\n", + "Q2=200;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is not greater than 0,therefore under these conditions engine is not possible\")\n", + "print(\"ii> for Q2=400 kcal/s\")\n", + "Q2=400;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K is less than 0,so engine is feasible and cycle is reversible\")\n", + "print(\"iii> for Q2=250 kcal/s\")\n", + "Q2=250;#heat rejected by sink in kcal/s\n", + "K=Q1/T1-Q2/T2\n", + "print(\"K=in kcal/s K\"),round(K,2)\n", + "print(\"as K=0,so engine is feasible and cycle is reversible\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.15;pg no: 152" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.15, Page:152 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\n", + "let the two points be given as states 1 and 2,\n", + "let us assume flow to be from 1 to 2\n", + "so entropy change(deltaS1_2)=s1-s2=in KJ/kg K -0.0\n", + "deltaS1_2=s1-s2=0.01254 KJ/kg K\n", + "it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\n", + "hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "import math\n", + "print\"Example 5.15, Page:152 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\")\n", + "p1=0.5;#initial pressure of air in Mpa\n", + "T1=400;#initial temperature of air in K\n", + "p2=0.3;#final pressure of air in Mpa\n", + "T2=350;#initial temperature of air in K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "print(\"let the two points be given as states 1 and 2,\")\n", + "print(\"let us assume flow to be from 1 to 2\")\n", + "deltaS1_2=Cp*math.log(T1/T2)-R*math.log(p1/p2)\n", + "print(\"so entropy change(deltaS1_2)=s1-s2=in KJ/kg K\"),round(deltaS1_2)\n", + "print(\"deltaS1_2=s1-s2=0.01254 KJ/kg K\")\n", + "print(\"it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\")\n", + "print(\"hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.16;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.16, Page:46 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\n", + "NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of deltaS\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.16, Page:46 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\")\n", + "print(\"NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.17;pg no: 153" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.17, Page:153 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\n", + "total heat added(Q)in KJ\n", + "Q= 1800.0\n", + "for heat addition process 1-2\n", + "Q12=T1*(s2-s1)\n", + "deltaS=s2-s1=in KJ/K 2.0\n", + "or heat addition process 3-4\n", + "Q34=T3*(s4-s3)\n", + "deltaS=s4-s3=in KJ/K 2.0\n", + "or heat rejected in process 5-6(Q56)in KJ\n", + "Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)= 1200.0\n", + "net work done=net heat(W_net)in KJ\n", + "W_net=(Q12+Q34)-Q56 600.0\n", + "thermal efficiency of cycle(n)= 0.33\n", + "or n=n*100 % 33.33\n", + "so work done=600 KJ and thermal efficiency=33.33 %\n" + ] + } + ], + "source": [ + "#cal of work done and thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.17, Page:153 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\")\n", + "Q12=1000.;#heat added during process 1-2 in KJ\n", + "Q34=800.;#heat added during process 3-4 in KJ\n", + "T1=500.;#operating temperature for process 1-2\n", + "T3=400.;#operating temperature for process 3-4\n", + "T5=300.;#operating temperature for process 5-6\n", + "T2=T1;#isothermal process\n", + "T4=T3;#isothermal process\n", + "T6=T5;#isothermal process\n", + "print(\"total heat added(Q)in KJ\")\n", + "Q=Q12+Q34\n", + "print(\"Q=\"),round(Q,2)\n", + "print(\"for heat addition process 1-2\")\n", + "print(\"Q12=T1*(s2-s1)\")\n", + "deltaS=Q12/T1\n", + "print(\"deltaS=s2-s1=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat addition process 3-4\")\n", + "print(\"Q34=T3*(s4-s3)\")\n", + "deltaS=Q34/T3\n", + "print(\"deltaS=s4-s3=in KJ/K\"),round(deltaS,2)\n", + "print(\"or heat rejected in process 5-6(Q56)in KJ\")\n", + "Q56=T5*(deltaS+deltaS)\n", + "print(\"Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)=\"),round(Q56,2)\n", + "print(\"net work done=net heat(W_net)in KJ\")\n", + "W_net=(Q12+Q34)-Q56\n", + "print(\"W_net=(Q12+Q34)-Q56\"),round(W_net,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency of cycle(n)=\"),round(n,2)\n", + "n=n*100\n", + "print(\"or n=n*100 %\"),round(n,2) \n", + "print(\"so work done=600 KJ and thermal efficiency=33.33 %\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 5.18;pg no: 154" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.18, Page:154 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\n", + "let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\n", + "here Q1-Q2=W\n", + "so heat supplied by source(Q1)in KW= 30.0\n", + "also given that,Q1_a=0.7*Q1_b.......eq 1\n", + "Q1_c=Q1-(0.7*Q1_b+Q1_b)\n", + "Q1_c=Q1-1.7*Q1_b........eq 2\n", + "for reversible engine\n", + "Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\n", + "substitute eq 1 and eq 2 in eq 3 we get, \n", + "heat supplied by reservoir of 700 K(Q1_b)in KJ/s\n", + "Q1_b= 35.39\n", + "so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\n", + "Q1_a= 24.78\n", + "and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\n", + "Q1_c=Q1-1.7*Q1_b -30.17\n", + "so heat supplied by reservoir at 800 K(Q1_a)= 24.78\n", + "so heat supplied by reservoir at 700 K(Q1_b)= 35.39\n", + "so heat supplied by reservoir at 600 K(Q1_c)= -30.17\n", + "NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\n" + ] + } + ], + "source": [ + "#cal of heat supplied by reservoir at 800,700,600\n", + "#intiation of all variables\n", + "# Chapter 5\n", + "print\"Example 5.18, Page:154 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\")\n", + "T1_a=800.;#temperature of reservoir a in K\n", + "T1_b=700.;#temperature of reservoir b in K\n", + "T1_c=600.;#temperature of reservoir c in K\n", + "T2=320.;#temperature of sink in K\n", + "W=20.;#work done in KW\n", + "Q2=10.;#heat rejected to sink in KW\n", + "print(\"let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\")\n", + "print(\"here Q1-Q2=W\")\n", + "Q1=W+Q2\n", + "print(\"so heat supplied by source(Q1)in KW=\"),round(Q1,2)\n", + "print(\"also given that,Q1_a=0.7*Q1_b.......eq 1\")\n", + "print(\"Q1_c=Q1-(0.7*Q1_b+Q1_b)\")\n", + "print(\"Q1_c=Q1-1.7*Q1_b........eq 2\")\n", + "print(\"for reversible engine\")\n", + "print(\"Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\")\n", + "print(\"substitute eq 1 and eq 2 in eq 3 we get, \")\n", + "print(\"heat supplied by reservoir of 700 K(Q1_b)in KJ/s\")\n", + "Q1_b=((Q2/T2)-(Q1/T1_c))/((0.7/T1_a)+(1/T1_b)-(1.7/T1_c))\n", + "print(\"Q1_b=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\")\n", + "Q1_a=0.7*Q1_b\n", + "print(\"Q1_a=\"),round(Q1_a,2)\n", + "print(\"and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\")\n", + "Q1_c=Q1-1.7*Q1_b\n", + "print(\"Q1_c=Q1-1.7*Q1_b\"),round(Q1_c,2)\n", + "print(\"so heat supplied by reservoir at 800 K(Q1_a)=\"),round(Q1_a,2)\n", + "print(\"so heat supplied by reservoir at 700 K(Q1_b)=\"),round(Q1_b,2)\n", + "print(\"so heat supplied by reservoir at 600 K(Q1_c)=\"),round(Q1_c,2)\n", + "print(\"NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter6.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6.ipynb new file mode 100755 index 00000000..92ef2871 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6.ipynb @@ -0,0 +1,1390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Thermo dynamic Properties of pure substance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.1;pg no: 174" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.1, Page:174 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\n", + "NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.1, Page:174 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\")\n", + "print(\"NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.2;pg no: 175" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.2, Page:175 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\n", + "during throttling,h1=h2\n", + "at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\n", + "thus h2=2682.5 KJ/kg\n", + "at state 1,before throttling\n", + "hf_10Mpa=1407.56 KJ/kg\n", + "hfg_10Mpa=1317.1 KJ/kg\n", + "h1=hf_10Mpa+x1*hfg_10Mpa\n", + "dryness fraction(x1)may be given as\n", + "x1= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.2, Page:175 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\")\n", + "print(\"during throttling,h1=h2\")\n", + "print(\"at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\")\n", + "print(\"thus h2=2682.5 KJ/kg\")\n", + "h2=2682.5;\n", + "print(\"at state 1,before throttling\")\n", + "print(\"hf_10Mpa=1407.56 KJ/kg\")\n", + "hf_10Mpa=1407.56;\n", + "print(\"hfg_10Mpa=1317.1 KJ/kg\")\n", + "hfg_10Mpa=1317.1;\n", + "print(\"h1=hf_10Mpa+x1*hfg_10Mpa\")\n", + "h1=h2;#during throttling\n", + "print(\"dryness fraction(x1)may be given as\")\n", + "x1=(h1-hf_10Mpa)/hfg_10Mpa\n", + "print(\"x1=\"),round(x1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.3;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.3, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\n", + "internal energy(u)=in KJ/kg 2644.0\n" + ] + } + ], + "source": [ + "#cal of internal energy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.3, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\")\n", + "h=2848;#enthalpy in KJ/kg\n", + "p=12*1000;#pressure in Kpa\n", + "v=0.017;#specific volume in m^3/kg\n", + "u=h-p*v\n", + "print(\"internal energy(u)=in KJ/kg\"),round(u,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.4;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.4, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\n", + "steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\n", + "entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\n", + "S= 6.65\n", + "entropy of 5 kg of steam(S)in KJ/K\n", + "S=m*S 33.23\n" + ] + } + ], + "source": [ + "#cal of entropy of 5 kg of steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.4, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "p=2;#pressure of steam in Mpa\n", + "T_superheat=(300+273.15);#temperature of superheat steam in K\n", + "Cp_water=4.18;#specific heat of water at constant pressure in KJ/kg K\n", + "Cp_superheat=2.1;#specific heat of superheat steam at constant pressure in KJ/kg K\n", + "print(\"steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\")\n", + "T_sat=(212.42+273.15);#saturation temperature at 2 Mpa in K\n", + "hfg_2Mpa=1890.7;\n", + "print(\"entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\")\n", + "S=Cp_water*math.log(T_sat/273.15)+(hfg_2Mpa/T_sat)+(Cp_superheat*math.log(T_superheat/T_sat))\n", + "print(\"S=\"),round(S,2)\n", + "print(\"entropy of 5 kg of steam(S)in KJ/K\")\n", + "S=m*S\n", + "print(\"S=m*S\"),round(S,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.5;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.5, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\n", + "boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\n", + "at further depth of 50 cm the pressure(p)in Kpa\n", + "p= 138.37\n", + "boiling point at this depth=Tsat_138.365\n", + "from steam table this temperature=108.866=108.87 degree celcius\n", + "so boiling point = 108.87 degree celcius\n" + ] + } + ], + "source": [ + "#cal of boiling point\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.5, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\")\n", + "rho=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h=0.50;#depth from above mentioned level in m\n", + "print(\"boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\")\n", + "p_boil=143.27;#pressure at which pond water boils in Kpa\n", + "print(\"at further depth of 50 cm the pressure(p)in Kpa\")\n", + "p=p_boil-((rho*g*h)*10**-3)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"boiling point at this depth=Tsat_138.365\")\n", + "print(\"from steam table this temperature=108.866=108.87 degree celcius\")\n", + "print(\"so boiling point = 108.87 degree celcius\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.6;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.6, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\n", + "in a rigid vessel it can be treated as constant volume process.\n", + "so v1=v2\n", + "since final state is given to be critical state,then specific volume at critical point,\n", + "v2=0.003155 m^3/kg\n", + "at 100 degree celcius saturation temperature,from steam table\n", + "vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\n", + "and vfg_100=in m^3/kg= 1.67\n", + "thus for initial quality being x1\n", + "v1=vf_100+x1*vfg_100\n", + "so x1= 0.001\n", + "mass of water initially=total mass*(1-x1)\n", + "total mass of fluid/water(m) in kg= 158.48\n", + "volume of water(v) in m^3= 0.1655\n" + ] + } + ], + "source": [ + "#cal of mass and volume of water\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.6, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\")\n", + "V=0.5;#capacity of rigid vessel in m^3\n", + "print(\"in a rigid vessel it can be treated as constant volume process.\")\n", + "print(\"so v1=v2\")\n", + "print(\"since final state is given to be critical state,then specific volume at critical point,\")\n", + "print(\"v2=0.003155 m^3/kg\")\n", + "v2=0.003155;#specific volume at critical point in m^3/kg\n", + "print(\"at 100 degree celcius saturation temperature,from steam table\")\n", + "print(\"vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\")\n", + "vf_100=0.001044;\n", + "vg_100=1.6729;\n", + "vfg_100=vg_100-vf_100\n", + "print(\"and vfg_100=in m^3/kg=\"),round(vfg_100,2)\n", + "print(\"thus for initial quality being x1\")\n", + "v1=v2;#rigid vessel\n", + "x1=(v1-vf_100)/vfg_100\n", + "print(\"v1=vf_100+x1*vfg_100\")\n", + "print(\"so x1=\"),round(x1,3)\n", + "print(\"mass of water initially=total mass*(1-x1)\")\n", + "m=V/v2\n", + "print(\"total mass of fluid/water(m) in kg=\"),round(m,2)\n", + "v=m*vf_100\n", + "print(\"volume of water(v) in m^3=\"),round(v,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.7;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.7, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\n", + "on mollier diadram(h-s diagram)the slope of isobaric line may be given as\n", + "(dh/ds)_p=cons =slope of isobar\n", + "from 1st and 2nd law combined;\n", + "T*ds=dh-v*dp\n", + "(dh/ds)_p=cons = T\n", + "here temperature,T=773.15 K\n", + "here slope=(dh/ds))p=cons = 773.15\n" + ] + } + ], + "source": [ + "#cal of slope\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.7, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\")\n", + "print(\"on mollier diadram(h-s diagram)the slope of isobaric line may be given as\")\n", + "print(\"(dh/ds)_p=cons =slope of isobar\")\n", + "print(\"from 1st and 2nd law combined;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"(dh/ds)_p=cons = T\")\n", + "print(\"here temperature,T=773.15 K\")\n", + "print(\"here slope=(dh/ds))p=cons = 773.15\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.8;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.8, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\n", + "at 0.15Mpa,from steam table;\n", + "hf=467.11 KJ/kg,hg=2693.6 KJ/kg\n", + "and hfg in KJ/kg= 2226.49\n", + "vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\n", + "and vfg in m^3/kg= 1.16\n", + "sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\n", + "and sfg=in KJ/kg K= 5.79\n", + "enthalpy at x=.10(h)in KJ/kg\n", + "h= 689.76\n", + "specific volume,(v)in m^3/kg\n", + "v= 0.12\n", + "entropy (s)in KJ/kg K\n", + "s= 2.01\n" + ] + } + ], + "source": [ + "#cal of entropy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.8, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\")\n", + "x=.10;#quality is 10%\n", + "print(\"at 0.15Mpa,from steam table;\")\n", + "print(\"hf=467.11 KJ/kg,hg=2693.6 KJ/kg\")\n", + "hf=467.11;\n", + "hg=2693.6;\n", + "hfg=hg-hf\n", + "print(\"and hfg in KJ/kg=\"),round(hfg,2)\n", + "print(\"vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\")\n", + "vf=0.001053;\n", + "vg=1.1593;\n", + "vfg=vg-vf\n", + "print(\"and vfg in m^3/kg=\"),round(vfg,2)\n", + "print(\"sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\")\n", + "sf=1.4336;\n", + "sg=7.2233;\n", + "sfg=sg-sf\n", + "print(\"and sfg=in KJ/kg K=\"),round(sfg,2)\n", + "print(\"enthalpy at x=.10(h)in KJ/kg\")\n", + "h=hf+x*hfg\n", + "print(\"h=\"),round(h,2)\n", + "print(\"specific volume,(v)in m^3/kg\")\n", + "v=vf+x*vfg\n", + "print(\"v=\"),round(v,2)\n", + "print(\"entropy (s)in KJ/kg K\")\n", + "s=sf+x*sfg\n", + "print(\"s=\"),round(s,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.9;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.9, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\n", + "work done during constant pressure process(W)=p1*(V2-V1)in KJ\n", + "now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\n", + "so v1 in m^3/kg=\n", + "now mass of steam(m) in kg= 0.32\n", + "specific volume at final state(v2)in m^3/kg\n", + "v2= 0.62\n", + "corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\n", + "v2>vg_1Mpa\n", + "hence state lies in superheated region,from the steam table by interpolation we get temperature as;\n", + "state lies between temperature of 1000 degree celcius and 1100 degree celcius\n", + "so exact temperature at final state(T)in K= 1077.61\n", + "thus internal energy at final state,1 Mpa,1077.61 degree celcius;\n", + "u2=4209.6 KJ/kg\n", + "internal energy at initial state(u1)in KJ/kg\n", + "u1= 2219.28\n", + "from first law of thermodynamics,Q-W=deltaU\n", + "so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ= 788.83\n" + ] + } + ], + "source": [ + "#cal of heat added\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.9, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\")\n", + "p1=1*1000;#initial pressure of steam in Kpa\n", + "V1=0.05;#initial volume of steam in m^3\n", + "x1=.8;#dryness fraction is 80%\n", + "V2=0.2;#final volume of steam in m^3\n", + "p2=p1;#constant pressure process\n", + "print(\"work done during constant pressure process(W)=p1*(V2-V1)in KJ\")\n", + "W=p1*(V2-V1)\n", + "print(\"now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\")\n", + "vf=0.001127;\n", + "vg=0.19444;\n", + "uf=761.68;\n", + "ufg=1822;\n", + "v1=vf+x1*vg\n", + "print(\"so v1 in m^3/kg=\")\n", + "m=V1/v1\n", + "print(\"now mass of steam(m) in kg=\"),round(m,2)\n", + "m=0.32097;#take m=0.32097 approx.\n", + "print(\"specific volume at final state(v2)in m^3/kg\")\n", + "v2=V2/m\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\")\n", + "print(\"v2>vg_1Mpa\")\n", + "print(\"hence state lies in superheated region,from the steam table by interpolation we get temperature as;\")\n", + "print(\"state lies between temperature of 1000 degree celcius and 1100 degree celcius\")\n", + "T=1000+((100*(.62311-.5871))/(.6335-.5871))\n", + "print(\"so exact temperature at final state(T)in K=\"),round(T,2)\n", + "print(\"thus internal energy at final state,1 Mpa,1077.61 degree celcius;\")\n", + "print(\"u2=4209.6 KJ/kg\")\n", + "u2=4209.6;\n", + "print(\"internal energy at initial state(u1)in KJ/kg\")\n", + "u1=uf+x1*ufg\n", + "print(\"u1=\"),round(u1,2)\n", + "print(\"from first law of thermodynamics,Q-W=deltaU\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.10;pg no: 179" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.10, Page:179 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\n", + "here steam is kept in rigid vessel,therefore its specific volume shall remain constant\n", + "it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\n", + "from superheated steam table;v1=0.2404 m^3/kg\n", + "at begining of condensation specific volume = 0.2404 m^3/kg\n", + "v2=0.2404 m^3/kg\n", + "this v2 shall be specific volume corresponding to saturated vapour state for condensation.\n", + "thus v2=vg=0.2404 m^3/kg\n", + "looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\n", + "by interpolation,temperature at begining of condensation(T2)in K\n", + "similarily,pressure(p2)in Kpa= 800.96\n" + ] + } + ], + "source": [ + "#cal of pressure\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.10, Page:179 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\")\n", + "p1=800;#initial pressure of steam in Kpa\n", + "T1=200;#initial temperature of steam in degree celcius\n", + "print(\"here steam is kept in rigid vessel,therefore its specific volume shall remain constant\")\n", + "print(\"it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\")\n", + "print(\"from superheated steam table;v1=0.2404 m^3/kg\")\n", + "print(\"at begining of condensation specific volume = 0.2404 m^3/kg\")\n", + "print(\"v2=0.2404 m^3/kg\")\n", + "v2=0.2404;\n", + "print(\"this v2 shall be specific volume corresponding to saturated vapour state for condensation.\")\n", + "print(\"thus v2=vg=0.2404 m^3/kg\")\n", + "vg=v2;\n", + "print(\"looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\")\n", + "print(\"by interpolation,temperature at begining of condensation(T2)in K\")\n", + "T2=175-((175-170)*(0.2404-0.2167))/(0.2428-.2168)\n", + "p=892-(((892-791.7)*(0.2404-0.2168))/(0.2428-0.2168))\n", + "print(\"similarily,pressure(p2)in Kpa=\"),round(p,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.11;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.11, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\n", + "from 1st and 2nd law;\n", + "T*ds=dh-v*dp\n", + "for isentropic process,ds=0\n", + "hence dh=v*dp\n", + "i.e (h2-h1)=v1*(p2-p1)\n", + "corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\n", + "p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\n", + "therefore enthalpy change(deltah)=(h2-h1) in KJ/kg= 0.2\n" + ] + } + ], + "source": [ + "#cal of enthalpy change\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.11, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\")\n", + "p2=200;#feed water pump pressure in Kpa\n", + "print(\"from 1st and 2nd law;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"for isentropic process,ds=0\")\n", + "print(\"hence dh=v*dp\")\n", + "print(\"i.e (h2-h1)=v1*(p2-p1)\")\n", + "print(\"corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\")\n", + "print(\"p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\")\n", + "p1=4.25;\n", + "v1=0.001004;\n", + "deltah=v1*(p2-p1)\n", + "print(\"therefore enthalpy change(deltah)=(h2-h1) in KJ/kg=\"),round(deltah,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.12;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.12, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\n", + "from steam table at 150 degree celcius\n", + "vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\n", + "so volume occupied by water(Vw)=3*V/(3+2) in m^3 1.2\n", + "and volume of steam(Vs) in m^3= 0.8\n", + "mass of water(mf)=Vw/Vf in kg 1099.91\n", + "mass of steam(mg)=Vs/Vg in kg 2.04\n", + "total mass in tank(m) in kg= 1101.95\n", + "quality or dryness fraction(x)\n", + "x= 0.002\n", + "NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\n" + ] + } + ], + "source": [ + "#cal of quality or dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.12, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\")\n", + "V=2.;#volume of vessel in m^3\n", + "print(\"from steam table at 150 degree celcius\")\n", + "print(\"vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\")\n", + "Vf=0.001091;\n", + "Vg=0.3928;\n", + "Vw=3*V/(3+2)\n", + "print(\"so volume occupied by water(Vw)=3*V/(3+2) in m^3\"),round(Vw,2)\n", + "Vs=2*V/(3+2)\n", + "print(\"and volume of steam(Vs) in m^3=\"),round(Vs,2)\n", + "mf=Vw/Vf\n", + "print(\"mass of water(mf)=Vw/Vf in kg\"),round(mf,2)\n", + "mg=Vs/Vg\n", + "print(\"mass of steam(mg)=Vs/Vg in kg\"),round(mg,2)\n", + "m=mf+mg\n", + "print(\"total mass in tank(m) in kg=\"),round(m,2)\n", + "print(\"quality or dryness fraction(x)\")\n", + "x=mg/m\n", + "print(\"x=\"),round(x,3)\n", + "print(\"NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.13;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.13, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\n", + "fron S.F.S.E on steam turbine;\n", + "W=h1-h2\n", + "initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\n", + "h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\n", + "reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\n", + "else from steam tables at 50 degree celcius saturation temperature;\n", + "hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\n", + "hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\n", + "here s1=s2,let dryness fraction at 2 be x2\n", + "x2= 0.75\n", + "hence enthalpy at state 2\n", + "h2 in KJ/kg= 1994.84\n", + "steam turbine work(W)in KJ/kg\n", + "W=h1-h2\n", + "so turbine output=W 891.36\n" + ] + } + ], + "source": [ + "#cal of turbine output\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.13, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\")\n", + "print(\"fron S.F.S.E on steam turbine;\")\n", + "print(\"W=h1-h2\")\n", + "print(\"initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\")\n", + "print(\"h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\")\n", + "h1=2886.2;\n", + "s1=6.2285;\n", + "print(\"reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\")\n", + "print(\"else from steam tables at 50 degree celcius saturation temperature;\")\n", + "print(\"hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\")\n", + "hf=209.33;\n", + "sf=0.7038;\n", + "print(\"hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\")\n", + "hfg=2382.7;\n", + "sfg=7.3725;\n", + "print(\"here s1=s2,let dryness fraction at 2 be x2\")\n", + "x2=(s1-sf)/sfg\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"hence enthalpy at state 2\")\n", + "h2=hf+x2*hfg\n", + "print(\"h2 in KJ/kg=\"),round(h2,2)\n", + "print(\"steam turbine work(W)in KJ/kg\")\n", + "W=h1-h2\n", + "print(\"W=h1-h2\")\n", + "print(\"so turbine output=W\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.14;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.14, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\n", + "it is constant volume process\n", + "volume of vessel(V)=mass of vapour * specific volume of vapour\n", + "initial specific volume,v1\n", + "v1=vf_100Kpa+x1*vfg_100 in m^3/kg\n", + "at 100 Kpa from steam table;\n", + "hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\n", + " here vfg_100Kpa= in m^3/kg= 1.69\n", + "so v1= in m^3/kg= 0.85\n", + "and volume of vessel(V) in m^3= 42.38\n", + "enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg 1546.46\n", + "internal energy in the beginning=U1=m1*u1 in KJ 146171.0\n", + "let the mass of dry steam added be m,final specific volume inside vessel,v2\n", + "v2=vf_1000Kpa+x2*vfg_1000Kpa\n", + "at 2000 Kpa,from steam table,\n", + "vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\n", + "total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\n", + "V/v2=V/vg_2000Kpa+V/v1\n", + "so v2 in m^3/kg= 0.09\n", + "here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\n", + "at 1000 Kpa from steam table,\n", + "hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\n", + "here vfg_1000Kpa= in m^3/kg= 0.19\n", + "so x2= 0.46\n", + "for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\n", + "so mass of dry steam at 2000 Kpa to be added(m)in kg\n", + "m=(100*(h1-h2))/(h2-hg_2000Kpa)= 11.97\n", + "quality of final mixture x2= 0.46\n" + ] + } + ], + "source": [ + "#cal of quality of final mixture\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.14, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\")\n", + "x1=0.5;#dryness fraction \n", + "m1=100;#mass of steam in kg\n", + "v1=0.8475;#\n", + "print(\"it is constant volume process\")\n", + "print(\"volume of vessel(V)=mass of vapour * specific volume of vapour\")\n", + "print(\"initial specific volume,v1\")\n", + "print(\"v1=vf_100Kpa+x1*vfg_100 in m^3/kg\")\n", + "print(\"at 100 Kpa from steam table;\")\n", + "print(\"hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\")\n", + "hf_100Kpa=417.46;\n", + "uf_100Kpa=417.36;\n", + "vf_100Kpa=0.001043;\n", + "hfg_100Kpa=2258;\n", + "ufg_100Kpa=2088.7;\n", + "vg_100Kpa=1.6940;\n", + "vfg_100Kpa=vg_100Kpa-vf_100Kpa\n", + "print(\" here vfg_100Kpa= in m^3/kg=\"),round(vfg_100Kpa,2)\n", + "v1=vf_100Kpa+x1*vfg_100Kpa\n", + "print(\"so v1= in m^3/kg=\"),round(v1,2)\n", + "V=m1*x1*v1\n", + "print(\"and volume of vessel(V) in m^3=\"),round(V,2)\n", + "h1=hf_100Kpa+x1*hfg_100Kpa\n", + "print(\"enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg\"),round(h1,2)\n", + "U1=m1*(uf_100Kpa+x1*ufg_100Kpa)\n", + "print(\"internal energy in the beginning=U1=m1*u1 in KJ\"),round(U1,2)\n", + "print(\"let the mass of dry steam added be m,final specific volume inside vessel,v2\")\n", + "print(\"v2=vf_1000Kpa+x2*vfg_1000Kpa\")\n", + "print(\"at 2000 Kpa,from steam table,\")\n", + "print(\"vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\")\n", + "vg_2000Kpa=0.09963;\n", + "ug_2000Kpa=2600.3;\n", + "hg_2000Kpa=2799.5;\n", + "print(\"total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\")\n", + "print(\"V/v2=V/vg_2000Kpa+V/v1\")\n", + "v2=1/((1/vg_2000Kpa)+(1/v1))\n", + "print(\"so v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\")\n", + "print(\"at 1000 Kpa from steam table,\")\n", + "print(\"hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\")\n", + "hf_1000Kpa=762.81;\n", + "hfg_1000Kpa=2015.3;\n", + "vf_1000Kpa=0.001127;\n", + "vg_1000Kpa=0.19444;\n", + "vfg_1000Kpa=vg_1000Kpa-vf_1000Kpa\n", + "print(\"here vfg_1000Kpa= in m^3/kg=\"),round(vfg_1000Kpa,2)\n", + "x2=(v2-vf_1000Kpa)/vfg_1000Kpa\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\")\n", + "print(\"so mass of dry steam at 2000 Kpa to be added(m)in kg\")\n", + "m=(100*(h1-(hf_1000Kpa+x2*hfg_1000Kpa)))/((hf_1000Kpa+x2*hfg_1000Kpa)-hg_2000Kpa)\n", + "print(\"m=(100*(h1-h2))/(h2-hg_2000Kpa)=\"),round(m,2)\n", + "print(\"quality of final mixture x2=\"),round(x2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.15;pg no: 183" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.15, Page:183 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\n", + "from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\n", + "condenser pressure(p_condenser) in Kpa= 7.3\n", + "partial pressure of steam corresponding to35 degree celcius from steam table;\n", + "p_steam=5.628 Kpa\n", + "enthalpy corresponding to 35 degree celcius from steam table,\n", + "hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\n", + "let quality of steam entering be x\n", + "from energy balance;\n", + "mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\n", + "so dryness fraction of steam entering(x)is given as\n", + "x= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction of steam entering\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.15, Page:183 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\")\n", + "p_vaccum=71.5;#recorded condenser vaccum in cm of mercury\n", + "p_barometer=76.8;#barometer reading in cm of mercury\n", + "T_cond=35;#temperature of condensation in degree celcius\n", + "T_hotwell=27.6;#temperature of hot well in degree celcius\n", + "m_cond=1930;#mass of condensate per hour\n", + "m_w=62000;#mass of cooling water per hour\n", + "Ti=8.51;#initial temperature in degree celcius\n", + "To=26.24;#outlet temperature in degree celcius\n", + "print(\"from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\")\n", + "p_condenser=(p_barometer-p_vaccum)*101.325/73.55\n", + "print(\"condenser pressure(p_condenser) in Kpa=\"),round(p_condenser,2)\n", + "print(\"partial pressure of steam corresponding to35 degree celcius from steam table;\")\n", + "print(\"p_steam=5.628 Kpa\")\n", + "p_steam=5.628;#partial pressure of steam\n", + "print(\"enthalpy corresponding to 35 degree celcius from steam table,\")\n", + "print(\"hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\")\n", + "hf=146.68;\n", + "hfg=2418.6;\n", + "print(\"let quality of steam entering be x\")\n", + "print(\"from energy balance;\")\n", + "print(\"mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\")\n", + "print(\"so dryness fraction of steam entering(x)is given as\")\n", + "x=(((m_w*(To-Ti)*4.18)/m_cond)-hf+4.18*T_hotwell)/hfg\n", + "print(\"x=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.16;pg no: 184" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.16, Page:184 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\n", + "heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\n", + "area(A) in m^2= 0.03\n", + "so p1=in Kpa= 419.61\n", + "now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\n", + "volume of water contained(V1) in m^3= 0.001\n", + "mass of water(m) in kg= 0.63\n", + "heat supplied shall cause sensible heating and latent heating\n", + "hence,enthalpy change=heat supplied\n", + "Q=((hf+x*hfg)-(4.18*T)*m)\n", + "so dryness fraction of steam produced(x)can be calculated as\n", + "so x= 0.46\n", + "internal energy of water(U1)in KJ,initially\n", + "U1= 393.69\n", + "finally,internal energy of wet steam(U2)in KJ\n", + "U2=m*h2-p2*V2\n", + "here V2 in m^3= 0.13\n", + "hence U2= 940.68\n", + "hence change in internal energy(U) in KJ= 547.21\n", + "work done(W) in KJ= 53.01\n" + ] + } + ], + "source": [ + "#cal of change in internal energy and work done\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.16, Page:184 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\")\n", + "F=10;#force applied externally upon piston in KN\n", + "d=.2;#diameter in m\n", + "h=0.02;#depth to which water filled in m \n", + "P_atm=101.3;#atmospheric pressure in Kpa\n", + "rho=1000;#density of water in kg/m^3\n", + "Q=600;#heat supplied to water in KJ\n", + "T=150;#temperature of water in degree celcius\n", + "print(\"heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\")\n", + "A=math.pi*d**2/4\n", + "print(\"area(A) in m^2=\"),round(A,2)\n", + "p1=F/A+P_atm\n", + "print(\"so p1=in Kpa=\"),round(p1,2)\n", + "print(\"now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\")\n", + "hf=612.1;\n", + "hfg=2128.7;\n", + "vg=0.4435;\n", + "V1=math.pi*d**2*h/4\n", + "print(\"volume of water contained(V1) in m^3=\"),round(V1,3)\n", + "m=V1*rho\n", + "print(\"mass of water(m) in kg=\"),round(m,2)\n", + "print(\"heat supplied shall cause sensible heating and latent heating\")\n", + "print(\"hence,enthalpy change=heat supplied\")\n", + "print(\"Q=((hf+x*hfg)-(4.18*T)*m)\")\n", + "print(\"so dryness fraction of steam produced(x)can be calculated as\")\n", + "x=((Q/m)+4.18*T-hf)/hfg\n", + "print(\"so x=\"),round(x,2)\n", + "print(\"internal energy of water(U1)in KJ,initially\")\n", + "h1=4.18*T;#enthalpy of water in KJ/kg\n", + "U1=m*h1-p1*V1\n", + "print(\"U1=\"),round(U1,2)\n", + "U1=393.5;#approx.\n", + "print(\"finally,internal energy of wet steam(U2)in KJ\")\n", + "print(\"U2=m*h2-p2*V2\")\n", + "V2=m*x*vg\n", + "print(\"here V2 in m^3=\"),round(V2,2)\n", + "p2=p1;#constant pressure process\n", + "U2=(m*(hf+x*hfg))-p2*V2\n", + "print(\"hence U2=\"),round(U2,2)\n", + "U2=940.71;#approx.\n", + "U=U2-U1\n", + "print(\"hence change in internal energy(U) in KJ=\"),round(U,2)\n", + "p=p1;\n", + "W=p*(V2-V1)\n", + "print(\"work done(W) in KJ=\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.17;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.17, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\n", + "consider throttling calorimeter alone,\n", + "degree of superheat(T_sup)in degree celcius\n", + "T_sup= 18.2\n", + "enthalpy of superheated steam(h_sup)in KJ/kg\n", + "h_sup= 2711.99\n", + "at 120 degree celcius,h=2673.95 KJ/kg from steam table\n", + "now enthalpy before throttling = enthalpy after throttling\n", + "hf+x2*hfg=h_sup\n", + "here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\n", + "so x2= 0.96\n", + "for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\n", + "overall dryness fraction(x)= 0.91\n" + ] + } + ], + "source": [ + "#cal of overall dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.17, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\")\n", + "ms=40;#mass of steam in kg\n", + "mw=2.2;#mass of water in kg\n", + "p1=1.47;#pressure before throttling in Mpa\n", + "T2=120;#temperature after throttling in degree celcius\n", + "p2=107.88;#pressure after throttling in Kpa\n", + "Cp_sup=2.09;#specific heat of superheated steam in KJ/kg K\n", + "print(\"consider throttling calorimeter alone,\")\n", + "print(\"degree of superheat(T_sup)in degree celcius\")\n", + "T_sup=T2-101.8\n", + "print(\"T_sup=\"),round(T_sup,2)\n", + "print(\"enthalpy of superheated steam(h_sup)in KJ/kg\")\n", + "h=2673.95;\n", + "h_sup=h+T_sup*Cp_sup\n", + "print(\"h_sup=\"),round(h_sup,2)\n", + "print(\"at 120 degree celcius,h=2673.95 KJ/kg from steam table\")\n", + "print(\"now enthalpy before throttling = enthalpy after throttling\")\n", + "print(\"hf+x2*hfg=h_sup\")\n", + "print(\"here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\")\n", + "hf=840.513;\n", + "hfg=1951.02;\n", + "x2=(h_sup-hf)/hfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\")\n", + "x1=(ms-mw)/ms\n", + "x=x1*x2\n", + "print(\"overall dryness fraction(x)=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.18;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.18, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\n", + "here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\n", + "final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\n", + "Q in KJ= 200.0\n", + "final enthalpy of dry steam at 15 bar,h2=hg_15bar\n", + "h2=2792.2 KJ/kg from steam table\n", + "let initial dryness fraction be x1,initial enthalpy,\n", + "h1=hf_10bar+x1*hfg_10bar.........eq1\n", + "here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\n", + "also heat balance yields,\n", + "h1+Q=h2\n", + "so h1=h2-Q in KJ/kg\n", + "so by eq 1=>x1= 0.91\n", + "heat added(Q)in KJ= 200.0\n", + "and initial quality(x1) 0.91\n" + ] + } + ], + "source": [ + "#cal of heat added and initial quality\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.18, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\")\n", + "v=0.4;#volume of air in part A and part B in m^3\n", + "p1=10*10**5;#initial pressure of steam in pa\n", + "p2=15*10**5;#final pressure of steam in pa\n", + "print(\"here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\")\n", + "print(\"final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\")\n", + "Q=v*(p2-p1)/1000\n", + "print(\"Q in KJ=\"),round(Q,2)\n", + "print(\"final enthalpy of dry steam at 15 bar,h2=hg_15bar\")\n", + "print(\"h2=2792.2 KJ/kg from steam table\")\n", + "h2=2792.2;\n", + "print(\"let initial dryness fraction be x1,initial enthalpy,\")\n", + "print(\"h1=hf_10bar+x1*hfg_10bar.........eq1\")\n", + "print(\"here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\")\n", + "hf_10bar=762.83;\n", + "hfg_10bar=2015.3;\n", + "print(\"also heat balance yields,\")\n", + "print(\"h1+Q=h2\")\n", + "print(\"so h1=h2-Q in KJ/kg\")\n", + "h1=h2-Q\n", + "x1=(h1-hf_10bar)/hfg_10bar\n", + "print(\"so by eq 1=>x1=\"),round(x1,2)\n", + "print(\"heat added(Q)in KJ=\"),round(Q,2)\n", + "print(\"and initial quality(x1)\"),round(x1,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.19;pg no: 186" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.19, Page:186 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\n", + "from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\n", + "specific volume of wet steam in cylinder,v1 in m^3/kg= 0.75\n", + "dryness fraction of initial steam(x1)= 0.6\n", + "initial enthalpy of wet steam,h1 in KJ/kg= 1801.83\n", + "at 400 degree celcius specific volume of steam,v2 in m^3/kg= 1.55\n", + "for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\n", + "actual pressure can be obtained by interpolation\n", + "p2=0.20 MPa(approx.)\n", + "saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\n", + "finally the degree of superheat(T_sup)in K\n", + "T_sup=T-t\n", + "final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\n", + "heat added during process(deltaQ)in KJ\n", + "deltaQ=m*(h2-h1)\n", + "internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\n", + "here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\n", + "internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\n", + "u2=2966.7 KJ/kg\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU= 3807.41\n", + "form first law of thermodynamics,work done(deltaW)in KJ\n", + "deltaW=deltaQ-deltaU 616.88\n", + "so heat transfer(deltaQ)in KJ 4424.3\n", + "and work transfer(deltaW)in KJ 616.88\n", + "NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\n", + "and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\n" + ] + } + ], + "source": [ + "#cal of heat and work transfer \n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.19, Page:186 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\")\n", + "m=3;#mass of wet steam in kg\n", + "p=1.4;#pressure of wet steam in bar\n", + "V1=2.25;#initial volume in m^3\n", + "V2=4.65;#final volume in m^3\n", + "T=400;#temperature of steam in degreee celcius\n", + "print(\"from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\")\n", + "vg=1.2455;\n", + "hf=457.99;\n", + "hfg=2232.3;\n", + "v1=V1/m\n", + "print(\"specific volume of wet steam in cylinder,v1 in m^3/kg=\"),round(v1,2)\n", + "x1=v1/vg\n", + "print(\"dryness fraction of initial steam(x1)=\"),round(x1,2)\n", + "x1=0.602;#approx.\n", + "h1=hf+x1*hfg\n", + "print(\"initial enthalpy of wet steam,h1 in KJ/kg=\"),round(h1,2)\n", + "v2=V2/m\n", + "print(\"at 400 degree celcius specific volume of steam,v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\")\n", + "print(\"actual pressure can be obtained by interpolation\")\n", + "p2=.1+((0.20-0.10)/(1.5493-3.103))*(1.55-3.103)\n", + "print(\"p2=0.20 MPa(approx.)\")\n", + "p2=0.20;\n", + "print(\"saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\")\n", + "t=120.23;\n", + "print(\"finally the degree of superheat(T_sup)in K\")\n", + "print(\"T_sup=T-t\")\n", + "T_sup=T-t\n", + "print(\"final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\")\n", + "h2=3276.6;\n", + "print(\"heat added during process(deltaQ)in KJ\")\n", + "print(\"deltaQ=m*(h2-h1)\")\n", + "deltaQ=m*(h2-h1)\n", + "print(\"internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\")\n", + "print(\"here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\")\n", + "uf=457.84;\n", + "ufg=2059.34;\n", + "u1=uf+x1*ufg\n", + "print(\"internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\")\n", + "print(\"u2=2966.7 KJ/kg\")\n", + "u2=2966.7;\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "deltaU=m*(u2-u1)\n", + "print(\"deltaU=\"),round(deltaU,2)\n", + "print(\"form first law of thermodynamics,work done(deltaW)in KJ\")\n", + "deltaW=deltaQ-deltaU\n", + "print(\"deltaW=deltaQ-deltaU\"),round(deltaW,2)\n", + "print(\"so heat transfer(deltaQ)in KJ\"),round(deltaQ,2)\n", + "print(\"and work transfer(deltaW)in KJ\"),round(deltaW,2)\n", + "print(\"NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\")\n", + "print(\"and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.20;pg no: 187" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.20, Page:187 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\n", + "here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\n", + "at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\n", + "finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\n", + "h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\n", + "h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\n", + "so final temperature(T2)in K\n", + "T2= 495.43\n", + "entropy for final state(s2)in KJ/kg K\n", + "s2= 8.82\n", + "here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 1.06\n", + "final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\n", + "here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\n", + "percentage of vessel volume initially occupied by steam(V)= 9.99\n" + ] + } + ], + "source": [ + "#cal of percentage of vessel volume initially occupied by steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.20, Page:187 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\")\n", + "print(\"here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\")\n", + "print(\"at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\")\n", + "h1_10bar_500oc=3478.5;\n", + "s1_10bar_500oc=7.7622;\n", + "v1_10bar_500oc=0.3541;\n", + "print(\"finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\")\n", + "h2=h1_10bar_500oc;\n", + "print(\"h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\")\n", + "h_1bar_400oc=3278.2;\n", + "h_1bar_500oc=3488.1;\n", + "print(\"h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\")\n", + "print(\"so final temperature(T2)in K\")\n", + "T2=400+((h2-h_1bar_400oc)*(500-400)/(h_1bar_500oc-h_1bar_400oc))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"entropy for final state(s2)in KJ/kg K\")\n", + "s_1bar_400oc=8.5435;\n", + "s_1bar_500oc=8.8342;\n", + "s2=s_1bar_400oc+((s_1bar_500oc-s_1bar_400oc)*(495.43-400)/(500-400))\n", + "print(\"s2=\"),round(s2,2)\n", + "print(\"here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=s2-s1_10bar_500oc\n", + "print(\"deltaS=\"),round(deltaS,2)\n", + "print(\"final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\")\n", + "print(\"here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\")\n", + "v_1bar_500oc=3.565;\n", + "v_1bar_400oc=3.103;\n", + "v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400))\n", + "V=v1_10bar_500oc*100/v2\n", + "print(\"percentage of vessel volume initially occupied by steam(V)=\"),round(V,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb new file mode 100644 index 00000000..92ef2871 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_1.ipynb @@ -0,0 +1,1390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Thermo dynamic Properties of pure substance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.1;pg no: 174" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.1, Page:174 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\n", + "NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.1, Page:174 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\")\n", + "print(\"NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.2;pg no: 175" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.2, Page:175 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\n", + "during throttling,h1=h2\n", + "at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\n", + "thus h2=2682.5 KJ/kg\n", + "at state 1,before throttling\n", + "hf_10Mpa=1407.56 KJ/kg\n", + "hfg_10Mpa=1317.1 KJ/kg\n", + "h1=hf_10Mpa+x1*hfg_10Mpa\n", + "dryness fraction(x1)may be given as\n", + "x1= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.2, Page:175 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\")\n", + "print(\"during throttling,h1=h2\")\n", + "print(\"at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\")\n", + "print(\"thus h2=2682.5 KJ/kg\")\n", + "h2=2682.5;\n", + "print(\"at state 1,before throttling\")\n", + "print(\"hf_10Mpa=1407.56 KJ/kg\")\n", + "hf_10Mpa=1407.56;\n", + "print(\"hfg_10Mpa=1317.1 KJ/kg\")\n", + "hfg_10Mpa=1317.1;\n", + "print(\"h1=hf_10Mpa+x1*hfg_10Mpa\")\n", + "h1=h2;#during throttling\n", + "print(\"dryness fraction(x1)may be given as\")\n", + "x1=(h1-hf_10Mpa)/hfg_10Mpa\n", + "print(\"x1=\"),round(x1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.3;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.3, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\n", + "internal energy(u)=in KJ/kg 2644.0\n" + ] + } + ], + "source": [ + "#cal of internal energy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.3, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\")\n", + "h=2848;#enthalpy in KJ/kg\n", + "p=12*1000;#pressure in Kpa\n", + "v=0.017;#specific volume in m^3/kg\n", + "u=h-p*v\n", + "print(\"internal energy(u)=in KJ/kg\"),round(u,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.4;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.4, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\n", + "steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\n", + "entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\n", + "S= 6.65\n", + "entropy of 5 kg of steam(S)in KJ/K\n", + "S=m*S 33.23\n" + ] + } + ], + "source": [ + "#cal of entropy of 5 kg of steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.4, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "p=2;#pressure of steam in Mpa\n", + "T_superheat=(300+273.15);#temperature of superheat steam in K\n", + "Cp_water=4.18;#specific heat of water at constant pressure in KJ/kg K\n", + "Cp_superheat=2.1;#specific heat of superheat steam at constant pressure in KJ/kg K\n", + "print(\"steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\")\n", + "T_sat=(212.42+273.15);#saturation temperature at 2 Mpa in K\n", + "hfg_2Mpa=1890.7;\n", + "print(\"entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\")\n", + "S=Cp_water*math.log(T_sat/273.15)+(hfg_2Mpa/T_sat)+(Cp_superheat*math.log(T_superheat/T_sat))\n", + "print(\"S=\"),round(S,2)\n", + "print(\"entropy of 5 kg of steam(S)in KJ/K\")\n", + "S=m*S\n", + "print(\"S=m*S\"),round(S,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.5;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.5, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\n", + "boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\n", + "at further depth of 50 cm the pressure(p)in Kpa\n", + "p= 138.37\n", + "boiling point at this depth=Tsat_138.365\n", + "from steam table this temperature=108.866=108.87 degree celcius\n", + "so boiling point = 108.87 degree celcius\n" + ] + } + ], + "source": [ + "#cal of boiling point\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.5, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\")\n", + "rho=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h=0.50;#depth from above mentioned level in m\n", + "print(\"boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\")\n", + "p_boil=143.27;#pressure at which pond water boils in Kpa\n", + "print(\"at further depth of 50 cm the pressure(p)in Kpa\")\n", + "p=p_boil-((rho*g*h)*10**-3)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"boiling point at this depth=Tsat_138.365\")\n", + "print(\"from steam table this temperature=108.866=108.87 degree celcius\")\n", + "print(\"so boiling point = 108.87 degree celcius\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.6;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.6, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\n", + "in a rigid vessel it can be treated as constant volume process.\n", + "so v1=v2\n", + "since final state is given to be critical state,then specific volume at critical point,\n", + "v2=0.003155 m^3/kg\n", + "at 100 degree celcius saturation temperature,from steam table\n", + "vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\n", + "and vfg_100=in m^3/kg= 1.67\n", + "thus for initial quality being x1\n", + "v1=vf_100+x1*vfg_100\n", + "so x1= 0.001\n", + "mass of water initially=total mass*(1-x1)\n", + "total mass of fluid/water(m) in kg= 158.48\n", + "volume of water(v) in m^3= 0.1655\n" + ] + } + ], + "source": [ + "#cal of mass and volume of water\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.6, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\")\n", + "V=0.5;#capacity of rigid vessel in m^3\n", + "print(\"in a rigid vessel it can be treated as constant volume process.\")\n", + "print(\"so v1=v2\")\n", + "print(\"since final state is given to be critical state,then specific volume at critical point,\")\n", + "print(\"v2=0.003155 m^3/kg\")\n", + "v2=0.003155;#specific volume at critical point in m^3/kg\n", + "print(\"at 100 degree celcius saturation temperature,from steam table\")\n", + "print(\"vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\")\n", + "vf_100=0.001044;\n", + "vg_100=1.6729;\n", + "vfg_100=vg_100-vf_100\n", + "print(\"and vfg_100=in m^3/kg=\"),round(vfg_100,2)\n", + "print(\"thus for initial quality being x1\")\n", + "v1=v2;#rigid vessel\n", + "x1=(v1-vf_100)/vfg_100\n", + "print(\"v1=vf_100+x1*vfg_100\")\n", + "print(\"so x1=\"),round(x1,3)\n", + "print(\"mass of water initially=total mass*(1-x1)\")\n", + "m=V/v2\n", + "print(\"total mass of fluid/water(m) in kg=\"),round(m,2)\n", + "v=m*vf_100\n", + "print(\"volume of water(v) in m^3=\"),round(v,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.7;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.7, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\n", + "on mollier diadram(h-s diagram)the slope of isobaric line may be given as\n", + "(dh/ds)_p=cons =slope of isobar\n", + "from 1st and 2nd law combined;\n", + "T*ds=dh-v*dp\n", + "(dh/ds)_p=cons = T\n", + "here temperature,T=773.15 K\n", + "here slope=(dh/ds))p=cons = 773.15\n" + ] + } + ], + "source": [ + "#cal of slope\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.7, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\")\n", + "print(\"on mollier diadram(h-s diagram)the slope of isobaric line may be given as\")\n", + "print(\"(dh/ds)_p=cons =slope of isobar\")\n", + "print(\"from 1st and 2nd law combined;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"(dh/ds)_p=cons = T\")\n", + "print(\"here temperature,T=773.15 K\")\n", + "print(\"here slope=(dh/ds))p=cons = 773.15\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.8;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.8, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\n", + "at 0.15Mpa,from steam table;\n", + "hf=467.11 KJ/kg,hg=2693.6 KJ/kg\n", + "and hfg in KJ/kg= 2226.49\n", + "vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\n", + "and vfg in m^3/kg= 1.16\n", + "sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\n", + "and sfg=in KJ/kg K= 5.79\n", + "enthalpy at x=.10(h)in KJ/kg\n", + "h= 689.76\n", + "specific volume,(v)in m^3/kg\n", + "v= 0.12\n", + "entropy (s)in KJ/kg K\n", + "s= 2.01\n" + ] + } + ], + "source": [ + "#cal of entropy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.8, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\")\n", + "x=.10;#quality is 10%\n", + "print(\"at 0.15Mpa,from steam table;\")\n", + "print(\"hf=467.11 KJ/kg,hg=2693.6 KJ/kg\")\n", + "hf=467.11;\n", + "hg=2693.6;\n", + "hfg=hg-hf\n", + "print(\"and hfg in KJ/kg=\"),round(hfg,2)\n", + "print(\"vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\")\n", + "vf=0.001053;\n", + "vg=1.1593;\n", + "vfg=vg-vf\n", + "print(\"and vfg in m^3/kg=\"),round(vfg,2)\n", + "print(\"sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\")\n", + "sf=1.4336;\n", + "sg=7.2233;\n", + "sfg=sg-sf\n", + "print(\"and sfg=in KJ/kg K=\"),round(sfg,2)\n", + "print(\"enthalpy at x=.10(h)in KJ/kg\")\n", + "h=hf+x*hfg\n", + "print(\"h=\"),round(h,2)\n", + "print(\"specific volume,(v)in m^3/kg\")\n", + "v=vf+x*vfg\n", + "print(\"v=\"),round(v,2)\n", + "print(\"entropy (s)in KJ/kg K\")\n", + "s=sf+x*sfg\n", + "print(\"s=\"),round(s,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.9;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.9, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\n", + "work done during constant pressure process(W)=p1*(V2-V1)in KJ\n", + "now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\n", + "so v1 in m^3/kg=\n", + "now mass of steam(m) in kg= 0.32\n", + "specific volume at final state(v2)in m^3/kg\n", + "v2= 0.62\n", + "corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\n", + "v2>vg_1Mpa\n", + "hence state lies in superheated region,from the steam table by interpolation we get temperature as;\n", + "state lies between temperature of 1000 degree celcius and 1100 degree celcius\n", + "so exact temperature at final state(T)in K= 1077.61\n", + "thus internal energy at final state,1 Mpa,1077.61 degree celcius;\n", + "u2=4209.6 KJ/kg\n", + "internal energy at initial state(u1)in KJ/kg\n", + "u1= 2219.28\n", + "from first law of thermodynamics,Q-W=deltaU\n", + "so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ= 788.83\n" + ] + } + ], + "source": [ + "#cal of heat added\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.9, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\")\n", + "p1=1*1000;#initial pressure of steam in Kpa\n", + "V1=0.05;#initial volume of steam in m^3\n", + "x1=.8;#dryness fraction is 80%\n", + "V2=0.2;#final volume of steam in m^3\n", + "p2=p1;#constant pressure process\n", + "print(\"work done during constant pressure process(W)=p1*(V2-V1)in KJ\")\n", + "W=p1*(V2-V1)\n", + "print(\"now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\")\n", + "vf=0.001127;\n", + "vg=0.19444;\n", + "uf=761.68;\n", + "ufg=1822;\n", + "v1=vf+x1*vg\n", + "print(\"so v1 in m^3/kg=\")\n", + "m=V1/v1\n", + "print(\"now mass of steam(m) in kg=\"),round(m,2)\n", + "m=0.32097;#take m=0.32097 approx.\n", + "print(\"specific volume at final state(v2)in m^3/kg\")\n", + "v2=V2/m\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\")\n", + "print(\"v2>vg_1Mpa\")\n", + "print(\"hence state lies in superheated region,from the steam table by interpolation we get temperature as;\")\n", + "print(\"state lies between temperature of 1000 degree celcius and 1100 degree celcius\")\n", + "T=1000+((100*(.62311-.5871))/(.6335-.5871))\n", + "print(\"so exact temperature at final state(T)in K=\"),round(T,2)\n", + "print(\"thus internal energy at final state,1 Mpa,1077.61 degree celcius;\")\n", + "print(\"u2=4209.6 KJ/kg\")\n", + "u2=4209.6;\n", + "print(\"internal energy at initial state(u1)in KJ/kg\")\n", + "u1=uf+x1*ufg\n", + "print(\"u1=\"),round(u1,2)\n", + "print(\"from first law of thermodynamics,Q-W=deltaU\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.10;pg no: 179" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.10, Page:179 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\n", + "here steam is kept in rigid vessel,therefore its specific volume shall remain constant\n", + "it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\n", + "from superheated steam table;v1=0.2404 m^3/kg\n", + "at begining of condensation specific volume = 0.2404 m^3/kg\n", + "v2=0.2404 m^3/kg\n", + "this v2 shall be specific volume corresponding to saturated vapour state for condensation.\n", + "thus v2=vg=0.2404 m^3/kg\n", + "looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\n", + "by interpolation,temperature at begining of condensation(T2)in K\n", + "similarily,pressure(p2)in Kpa= 800.96\n" + ] + } + ], + "source": [ + "#cal of pressure\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.10, Page:179 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\")\n", + "p1=800;#initial pressure of steam in Kpa\n", + "T1=200;#initial temperature of steam in degree celcius\n", + "print(\"here steam is kept in rigid vessel,therefore its specific volume shall remain constant\")\n", + "print(\"it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\")\n", + "print(\"from superheated steam table;v1=0.2404 m^3/kg\")\n", + "print(\"at begining of condensation specific volume = 0.2404 m^3/kg\")\n", + "print(\"v2=0.2404 m^3/kg\")\n", + "v2=0.2404;\n", + "print(\"this v2 shall be specific volume corresponding to saturated vapour state for condensation.\")\n", + "print(\"thus v2=vg=0.2404 m^3/kg\")\n", + "vg=v2;\n", + "print(\"looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\")\n", + "print(\"by interpolation,temperature at begining of condensation(T2)in K\")\n", + "T2=175-((175-170)*(0.2404-0.2167))/(0.2428-.2168)\n", + "p=892-(((892-791.7)*(0.2404-0.2168))/(0.2428-0.2168))\n", + "print(\"similarily,pressure(p2)in Kpa=\"),round(p,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.11;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.11, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\n", + "from 1st and 2nd law;\n", + "T*ds=dh-v*dp\n", + "for isentropic process,ds=0\n", + "hence dh=v*dp\n", + "i.e (h2-h1)=v1*(p2-p1)\n", + "corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\n", + "p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\n", + "therefore enthalpy change(deltah)=(h2-h1) in KJ/kg= 0.2\n" + ] + } + ], + "source": [ + "#cal of enthalpy change\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.11, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\")\n", + "p2=200;#feed water pump pressure in Kpa\n", + "print(\"from 1st and 2nd law;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"for isentropic process,ds=0\")\n", + "print(\"hence dh=v*dp\")\n", + "print(\"i.e (h2-h1)=v1*(p2-p1)\")\n", + "print(\"corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\")\n", + "print(\"p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\")\n", + "p1=4.25;\n", + "v1=0.001004;\n", + "deltah=v1*(p2-p1)\n", + "print(\"therefore enthalpy change(deltah)=(h2-h1) in KJ/kg=\"),round(deltah,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.12;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.12, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\n", + "from steam table at 150 degree celcius\n", + "vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\n", + "so volume occupied by water(Vw)=3*V/(3+2) in m^3 1.2\n", + "and volume of steam(Vs) in m^3= 0.8\n", + "mass of water(mf)=Vw/Vf in kg 1099.91\n", + "mass of steam(mg)=Vs/Vg in kg 2.04\n", + "total mass in tank(m) in kg= 1101.95\n", + "quality or dryness fraction(x)\n", + "x= 0.002\n", + "NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\n" + ] + } + ], + "source": [ + "#cal of quality or dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.12, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\")\n", + "V=2.;#volume of vessel in m^3\n", + "print(\"from steam table at 150 degree celcius\")\n", + "print(\"vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\")\n", + "Vf=0.001091;\n", + "Vg=0.3928;\n", + "Vw=3*V/(3+2)\n", + "print(\"so volume occupied by water(Vw)=3*V/(3+2) in m^3\"),round(Vw,2)\n", + "Vs=2*V/(3+2)\n", + "print(\"and volume of steam(Vs) in m^3=\"),round(Vs,2)\n", + "mf=Vw/Vf\n", + "print(\"mass of water(mf)=Vw/Vf in kg\"),round(mf,2)\n", + "mg=Vs/Vg\n", + "print(\"mass of steam(mg)=Vs/Vg in kg\"),round(mg,2)\n", + "m=mf+mg\n", + "print(\"total mass in tank(m) in kg=\"),round(m,2)\n", + "print(\"quality or dryness fraction(x)\")\n", + "x=mg/m\n", + "print(\"x=\"),round(x,3)\n", + "print(\"NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.13;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.13, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\n", + "fron S.F.S.E on steam turbine;\n", + "W=h1-h2\n", + "initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\n", + "h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\n", + "reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\n", + "else from steam tables at 50 degree celcius saturation temperature;\n", + "hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\n", + "hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\n", + "here s1=s2,let dryness fraction at 2 be x2\n", + "x2= 0.75\n", + "hence enthalpy at state 2\n", + "h2 in KJ/kg= 1994.84\n", + "steam turbine work(W)in KJ/kg\n", + "W=h1-h2\n", + "so turbine output=W 891.36\n" + ] + } + ], + "source": [ + "#cal of turbine output\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.13, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\")\n", + "print(\"fron S.F.S.E on steam turbine;\")\n", + "print(\"W=h1-h2\")\n", + "print(\"initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\")\n", + "print(\"h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\")\n", + "h1=2886.2;\n", + "s1=6.2285;\n", + "print(\"reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\")\n", + "print(\"else from steam tables at 50 degree celcius saturation temperature;\")\n", + "print(\"hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\")\n", + "hf=209.33;\n", + "sf=0.7038;\n", + "print(\"hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\")\n", + "hfg=2382.7;\n", + "sfg=7.3725;\n", + "print(\"here s1=s2,let dryness fraction at 2 be x2\")\n", + "x2=(s1-sf)/sfg\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"hence enthalpy at state 2\")\n", + "h2=hf+x2*hfg\n", + "print(\"h2 in KJ/kg=\"),round(h2,2)\n", + "print(\"steam turbine work(W)in KJ/kg\")\n", + "W=h1-h2\n", + "print(\"W=h1-h2\")\n", + "print(\"so turbine output=W\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.14;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.14, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\n", + "it is constant volume process\n", + "volume of vessel(V)=mass of vapour * specific volume of vapour\n", + "initial specific volume,v1\n", + "v1=vf_100Kpa+x1*vfg_100 in m^3/kg\n", + "at 100 Kpa from steam table;\n", + "hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\n", + " here vfg_100Kpa= in m^3/kg= 1.69\n", + "so v1= in m^3/kg= 0.85\n", + "and volume of vessel(V) in m^3= 42.38\n", + "enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg 1546.46\n", + "internal energy in the beginning=U1=m1*u1 in KJ 146171.0\n", + "let the mass of dry steam added be m,final specific volume inside vessel,v2\n", + "v2=vf_1000Kpa+x2*vfg_1000Kpa\n", + "at 2000 Kpa,from steam table,\n", + "vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\n", + "total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\n", + "V/v2=V/vg_2000Kpa+V/v1\n", + "so v2 in m^3/kg= 0.09\n", + "here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\n", + "at 1000 Kpa from steam table,\n", + "hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\n", + "here vfg_1000Kpa= in m^3/kg= 0.19\n", + "so x2= 0.46\n", + "for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\n", + "so mass of dry steam at 2000 Kpa to be added(m)in kg\n", + "m=(100*(h1-h2))/(h2-hg_2000Kpa)= 11.97\n", + "quality of final mixture x2= 0.46\n" + ] + } + ], + "source": [ + "#cal of quality of final mixture\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.14, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\")\n", + "x1=0.5;#dryness fraction \n", + "m1=100;#mass of steam in kg\n", + "v1=0.8475;#\n", + "print(\"it is constant volume process\")\n", + "print(\"volume of vessel(V)=mass of vapour * specific volume of vapour\")\n", + "print(\"initial specific volume,v1\")\n", + "print(\"v1=vf_100Kpa+x1*vfg_100 in m^3/kg\")\n", + "print(\"at 100 Kpa from steam table;\")\n", + "print(\"hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\")\n", + "hf_100Kpa=417.46;\n", + "uf_100Kpa=417.36;\n", + "vf_100Kpa=0.001043;\n", + "hfg_100Kpa=2258;\n", + "ufg_100Kpa=2088.7;\n", + "vg_100Kpa=1.6940;\n", + "vfg_100Kpa=vg_100Kpa-vf_100Kpa\n", + "print(\" here vfg_100Kpa= in m^3/kg=\"),round(vfg_100Kpa,2)\n", + "v1=vf_100Kpa+x1*vfg_100Kpa\n", + "print(\"so v1= in m^3/kg=\"),round(v1,2)\n", + "V=m1*x1*v1\n", + "print(\"and volume of vessel(V) in m^3=\"),round(V,2)\n", + "h1=hf_100Kpa+x1*hfg_100Kpa\n", + "print(\"enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg\"),round(h1,2)\n", + "U1=m1*(uf_100Kpa+x1*ufg_100Kpa)\n", + "print(\"internal energy in the beginning=U1=m1*u1 in KJ\"),round(U1,2)\n", + "print(\"let the mass of dry steam added be m,final specific volume inside vessel,v2\")\n", + "print(\"v2=vf_1000Kpa+x2*vfg_1000Kpa\")\n", + "print(\"at 2000 Kpa,from steam table,\")\n", + "print(\"vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\")\n", + "vg_2000Kpa=0.09963;\n", + "ug_2000Kpa=2600.3;\n", + "hg_2000Kpa=2799.5;\n", + "print(\"total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\")\n", + "print(\"V/v2=V/vg_2000Kpa+V/v1\")\n", + "v2=1/((1/vg_2000Kpa)+(1/v1))\n", + "print(\"so v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\")\n", + "print(\"at 1000 Kpa from steam table,\")\n", + "print(\"hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\")\n", + "hf_1000Kpa=762.81;\n", + "hfg_1000Kpa=2015.3;\n", + "vf_1000Kpa=0.001127;\n", + "vg_1000Kpa=0.19444;\n", + "vfg_1000Kpa=vg_1000Kpa-vf_1000Kpa\n", + "print(\"here vfg_1000Kpa= in m^3/kg=\"),round(vfg_1000Kpa,2)\n", + "x2=(v2-vf_1000Kpa)/vfg_1000Kpa\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\")\n", + "print(\"so mass of dry steam at 2000 Kpa to be added(m)in kg\")\n", + "m=(100*(h1-(hf_1000Kpa+x2*hfg_1000Kpa)))/((hf_1000Kpa+x2*hfg_1000Kpa)-hg_2000Kpa)\n", + "print(\"m=(100*(h1-h2))/(h2-hg_2000Kpa)=\"),round(m,2)\n", + "print(\"quality of final mixture x2=\"),round(x2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.15;pg no: 183" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.15, Page:183 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\n", + "from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\n", + "condenser pressure(p_condenser) in Kpa= 7.3\n", + "partial pressure of steam corresponding to35 degree celcius from steam table;\n", + "p_steam=5.628 Kpa\n", + "enthalpy corresponding to 35 degree celcius from steam table,\n", + "hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\n", + "let quality of steam entering be x\n", + "from energy balance;\n", + "mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\n", + "so dryness fraction of steam entering(x)is given as\n", + "x= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction of steam entering\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.15, Page:183 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\")\n", + "p_vaccum=71.5;#recorded condenser vaccum in cm of mercury\n", + "p_barometer=76.8;#barometer reading in cm of mercury\n", + "T_cond=35;#temperature of condensation in degree celcius\n", + "T_hotwell=27.6;#temperature of hot well in degree celcius\n", + "m_cond=1930;#mass of condensate per hour\n", + "m_w=62000;#mass of cooling water per hour\n", + "Ti=8.51;#initial temperature in degree celcius\n", + "To=26.24;#outlet temperature in degree celcius\n", + "print(\"from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\")\n", + "p_condenser=(p_barometer-p_vaccum)*101.325/73.55\n", + "print(\"condenser pressure(p_condenser) in Kpa=\"),round(p_condenser,2)\n", + "print(\"partial pressure of steam corresponding to35 degree celcius from steam table;\")\n", + "print(\"p_steam=5.628 Kpa\")\n", + "p_steam=5.628;#partial pressure of steam\n", + "print(\"enthalpy corresponding to 35 degree celcius from steam table,\")\n", + "print(\"hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\")\n", + "hf=146.68;\n", + "hfg=2418.6;\n", + "print(\"let quality of steam entering be x\")\n", + "print(\"from energy balance;\")\n", + "print(\"mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\")\n", + "print(\"so dryness fraction of steam entering(x)is given as\")\n", + "x=(((m_w*(To-Ti)*4.18)/m_cond)-hf+4.18*T_hotwell)/hfg\n", + "print(\"x=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.16;pg no: 184" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.16, Page:184 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\n", + "heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\n", + "area(A) in m^2= 0.03\n", + "so p1=in Kpa= 419.61\n", + "now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\n", + "volume of water contained(V1) in m^3= 0.001\n", + "mass of water(m) in kg= 0.63\n", + "heat supplied shall cause sensible heating and latent heating\n", + "hence,enthalpy change=heat supplied\n", + "Q=((hf+x*hfg)-(4.18*T)*m)\n", + "so dryness fraction of steam produced(x)can be calculated as\n", + "so x= 0.46\n", + "internal energy of water(U1)in KJ,initially\n", + "U1= 393.69\n", + "finally,internal energy of wet steam(U2)in KJ\n", + "U2=m*h2-p2*V2\n", + "here V2 in m^3= 0.13\n", + "hence U2= 940.68\n", + "hence change in internal energy(U) in KJ= 547.21\n", + "work done(W) in KJ= 53.01\n" + ] + } + ], + "source": [ + "#cal of change in internal energy and work done\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.16, Page:184 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\")\n", + "F=10;#force applied externally upon piston in KN\n", + "d=.2;#diameter in m\n", + "h=0.02;#depth to which water filled in m \n", + "P_atm=101.3;#atmospheric pressure in Kpa\n", + "rho=1000;#density of water in kg/m^3\n", + "Q=600;#heat supplied to water in KJ\n", + "T=150;#temperature of water in degree celcius\n", + "print(\"heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\")\n", + "A=math.pi*d**2/4\n", + "print(\"area(A) in m^2=\"),round(A,2)\n", + "p1=F/A+P_atm\n", + "print(\"so p1=in Kpa=\"),round(p1,2)\n", + "print(\"now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\")\n", + "hf=612.1;\n", + "hfg=2128.7;\n", + "vg=0.4435;\n", + "V1=math.pi*d**2*h/4\n", + "print(\"volume of water contained(V1) in m^3=\"),round(V1,3)\n", + "m=V1*rho\n", + "print(\"mass of water(m) in kg=\"),round(m,2)\n", + "print(\"heat supplied shall cause sensible heating and latent heating\")\n", + "print(\"hence,enthalpy change=heat supplied\")\n", + "print(\"Q=((hf+x*hfg)-(4.18*T)*m)\")\n", + "print(\"so dryness fraction of steam produced(x)can be calculated as\")\n", + "x=((Q/m)+4.18*T-hf)/hfg\n", + "print(\"so x=\"),round(x,2)\n", + "print(\"internal energy of water(U1)in KJ,initially\")\n", + "h1=4.18*T;#enthalpy of water in KJ/kg\n", + "U1=m*h1-p1*V1\n", + "print(\"U1=\"),round(U1,2)\n", + "U1=393.5;#approx.\n", + "print(\"finally,internal energy of wet steam(U2)in KJ\")\n", + "print(\"U2=m*h2-p2*V2\")\n", + "V2=m*x*vg\n", + "print(\"here V2 in m^3=\"),round(V2,2)\n", + "p2=p1;#constant pressure process\n", + "U2=(m*(hf+x*hfg))-p2*V2\n", + "print(\"hence U2=\"),round(U2,2)\n", + "U2=940.71;#approx.\n", + "U=U2-U1\n", + "print(\"hence change in internal energy(U) in KJ=\"),round(U,2)\n", + "p=p1;\n", + "W=p*(V2-V1)\n", + "print(\"work done(W) in KJ=\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.17;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.17, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\n", + "consider throttling calorimeter alone,\n", + "degree of superheat(T_sup)in degree celcius\n", + "T_sup= 18.2\n", + "enthalpy of superheated steam(h_sup)in KJ/kg\n", + "h_sup= 2711.99\n", + "at 120 degree celcius,h=2673.95 KJ/kg from steam table\n", + "now enthalpy before throttling = enthalpy after throttling\n", + "hf+x2*hfg=h_sup\n", + "here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\n", + "so x2= 0.96\n", + "for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\n", + "overall dryness fraction(x)= 0.91\n" + ] + } + ], + "source": [ + "#cal of overall dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.17, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\")\n", + "ms=40;#mass of steam in kg\n", + "mw=2.2;#mass of water in kg\n", + "p1=1.47;#pressure before throttling in Mpa\n", + "T2=120;#temperature after throttling in degree celcius\n", + "p2=107.88;#pressure after throttling in Kpa\n", + "Cp_sup=2.09;#specific heat of superheated steam in KJ/kg K\n", + "print(\"consider throttling calorimeter alone,\")\n", + "print(\"degree of superheat(T_sup)in degree celcius\")\n", + "T_sup=T2-101.8\n", + "print(\"T_sup=\"),round(T_sup,2)\n", + "print(\"enthalpy of superheated steam(h_sup)in KJ/kg\")\n", + "h=2673.95;\n", + "h_sup=h+T_sup*Cp_sup\n", + "print(\"h_sup=\"),round(h_sup,2)\n", + "print(\"at 120 degree celcius,h=2673.95 KJ/kg from steam table\")\n", + "print(\"now enthalpy before throttling = enthalpy after throttling\")\n", + "print(\"hf+x2*hfg=h_sup\")\n", + "print(\"here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\")\n", + "hf=840.513;\n", + "hfg=1951.02;\n", + "x2=(h_sup-hf)/hfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\")\n", + "x1=(ms-mw)/ms\n", + "x=x1*x2\n", + "print(\"overall dryness fraction(x)=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.18;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.18, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\n", + "here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\n", + "final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\n", + "Q in KJ= 200.0\n", + "final enthalpy of dry steam at 15 bar,h2=hg_15bar\n", + "h2=2792.2 KJ/kg from steam table\n", + "let initial dryness fraction be x1,initial enthalpy,\n", + "h1=hf_10bar+x1*hfg_10bar.........eq1\n", + "here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\n", + "also heat balance yields,\n", + "h1+Q=h2\n", + "so h1=h2-Q in KJ/kg\n", + "so by eq 1=>x1= 0.91\n", + "heat added(Q)in KJ= 200.0\n", + "and initial quality(x1) 0.91\n" + ] + } + ], + "source": [ + "#cal of heat added and initial quality\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.18, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\")\n", + "v=0.4;#volume of air in part A and part B in m^3\n", + "p1=10*10**5;#initial pressure of steam in pa\n", + "p2=15*10**5;#final pressure of steam in pa\n", + "print(\"here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\")\n", + "print(\"final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\")\n", + "Q=v*(p2-p1)/1000\n", + "print(\"Q in KJ=\"),round(Q,2)\n", + "print(\"final enthalpy of dry steam at 15 bar,h2=hg_15bar\")\n", + "print(\"h2=2792.2 KJ/kg from steam table\")\n", + "h2=2792.2;\n", + "print(\"let initial dryness fraction be x1,initial enthalpy,\")\n", + "print(\"h1=hf_10bar+x1*hfg_10bar.........eq1\")\n", + "print(\"here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\")\n", + "hf_10bar=762.83;\n", + "hfg_10bar=2015.3;\n", + "print(\"also heat balance yields,\")\n", + "print(\"h1+Q=h2\")\n", + "print(\"so h1=h2-Q in KJ/kg\")\n", + "h1=h2-Q\n", + "x1=(h1-hf_10bar)/hfg_10bar\n", + "print(\"so by eq 1=>x1=\"),round(x1,2)\n", + "print(\"heat added(Q)in KJ=\"),round(Q,2)\n", + "print(\"and initial quality(x1)\"),round(x1,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.19;pg no: 186" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.19, Page:186 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\n", + "from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\n", + "specific volume of wet steam in cylinder,v1 in m^3/kg= 0.75\n", + "dryness fraction of initial steam(x1)= 0.6\n", + "initial enthalpy of wet steam,h1 in KJ/kg= 1801.83\n", + "at 400 degree celcius specific volume of steam,v2 in m^3/kg= 1.55\n", + "for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\n", + "actual pressure can be obtained by interpolation\n", + "p2=0.20 MPa(approx.)\n", + "saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\n", + "finally the degree of superheat(T_sup)in K\n", + "T_sup=T-t\n", + "final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\n", + "heat added during process(deltaQ)in KJ\n", + "deltaQ=m*(h2-h1)\n", + "internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\n", + "here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\n", + "internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\n", + "u2=2966.7 KJ/kg\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU= 3807.41\n", + "form first law of thermodynamics,work done(deltaW)in KJ\n", + "deltaW=deltaQ-deltaU 616.88\n", + "so heat transfer(deltaQ)in KJ 4424.3\n", + "and work transfer(deltaW)in KJ 616.88\n", + "NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\n", + "and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\n" + ] + } + ], + "source": [ + "#cal of heat and work transfer \n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.19, Page:186 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\")\n", + "m=3;#mass of wet steam in kg\n", + "p=1.4;#pressure of wet steam in bar\n", + "V1=2.25;#initial volume in m^3\n", + "V2=4.65;#final volume in m^3\n", + "T=400;#temperature of steam in degreee celcius\n", + "print(\"from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\")\n", + "vg=1.2455;\n", + "hf=457.99;\n", + "hfg=2232.3;\n", + "v1=V1/m\n", + "print(\"specific volume of wet steam in cylinder,v1 in m^3/kg=\"),round(v1,2)\n", + "x1=v1/vg\n", + "print(\"dryness fraction of initial steam(x1)=\"),round(x1,2)\n", + "x1=0.602;#approx.\n", + "h1=hf+x1*hfg\n", + "print(\"initial enthalpy of wet steam,h1 in KJ/kg=\"),round(h1,2)\n", + "v2=V2/m\n", + "print(\"at 400 degree celcius specific volume of steam,v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\")\n", + "print(\"actual pressure can be obtained by interpolation\")\n", + "p2=.1+((0.20-0.10)/(1.5493-3.103))*(1.55-3.103)\n", + "print(\"p2=0.20 MPa(approx.)\")\n", + "p2=0.20;\n", + "print(\"saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\")\n", + "t=120.23;\n", + "print(\"finally the degree of superheat(T_sup)in K\")\n", + "print(\"T_sup=T-t\")\n", + "T_sup=T-t\n", + "print(\"final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\")\n", + "h2=3276.6;\n", + "print(\"heat added during process(deltaQ)in KJ\")\n", + "print(\"deltaQ=m*(h2-h1)\")\n", + "deltaQ=m*(h2-h1)\n", + "print(\"internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\")\n", + "print(\"here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\")\n", + "uf=457.84;\n", + "ufg=2059.34;\n", + "u1=uf+x1*ufg\n", + "print(\"internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\")\n", + "print(\"u2=2966.7 KJ/kg\")\n", + "u2=2966.7;\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "deltaU=m*(u2-u1)\n", + "print(\"deltaU=\"),round(deltaU,2)\n", + "print(\"form first law of thermodynamics,work done(deltaW)in KJ\")\n", + "deltaW=deltaQ-deltaU\n", + "print(\"deltaW=deltaQ-deltaU\"),round(deltaW,2)\n", + "print(\"so heat transfer(deltaQ)in KJ\"),round(deltaQ,2)\n", + "print(\"and work transfer(deltaW)in KJ\"),round(deltaW,2)\n", + "print(\"NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\")\n", + "print(\"and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.20;pg no: 187" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.20, Page:187 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\n", + "here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\n", + "at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\n", + "finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\n", + "h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\n", + "h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\n", + "so final temperature(T2)in K\n", + "T2= 495.43\n", + "entropy for final state(s2)in KJ/kg K\n", + "s2= 8.82\n", + "here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 1.06\n", + "final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\n", + "here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\n", + "percentage of vessel volume initially occupied by steam(V)= 9.99\n" + ] + } + ], + "source": [ + "#cal of percentage of vessel volume initially occupied by steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.20, Page:187 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\")\n", + "print(\"here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\")\n", + "print(\"at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\")\n", + "h1_10bar_500oc=3478.5;\n", + "s1_10bar_500oc=7.7622;\n", + "v1_10bar_500oc=0.3541;\n", + "print(\"finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\")\n", + "h2=h1_10bar_500oc;\n", + "print(\"h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\")\n", + "h_1bar_400oc=3278.2;\n", + "h_1bar_500oc=3488.1;\n", + "print(\"h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\")\n", + "print(\"so final temperature(T2)in K\")\n", + "T2=400+((h2-h_1bar_400oc)*(500-400)/(h_1bar_500oc-h_1bar_400oc))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"entropy for final state(s2)in KJ/kg K\")\n", + "s_1bar_400oc=8.5435;\n", + "s_1bar_500oc=8.8342;\n", + "s2=s_1bar_400oc+((s_1bar_500oc-s_1bar_400oc)*(495.43-400)/(500-400))\n", + "print(\"s2=\"),round(s2,2)\n", + "print(\"here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=s2-s1_10bar_500oc\n", + "print(\"deltaS=\"),round(deltaS,2)\n", + "print(\"final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\")\n", + "print(\"here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\")\n", + "v_1bar_500oc=3.565;\n", + "v_1bar_400oc=3.103;\n", + "v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400))\n", + "V=v1_10bar_500oc*100/v2\n", + "print(\"percentage of vessel volume initially occupied by steam(V)=\"),round(V,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb new file mode 100644 index 00000000..92ef2871 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_2.ipynb @@ -0,0 +1,1390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Thermo dynamic Properties of pure substance" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.1;pg no: 174" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.1, Page:174 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\n", + "NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.1, Page:174 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\")\n", + "print(\"NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.2;pg no: 175" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.2, Page:175 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\n", + "during throttling,h1=h2\n", + "at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\n", + "thus h2=2682.5 KJ/kg\n", + "at state 1,before throttling\n", + "hf_10Mpa=1407.56 KJ/kg\n", + "hfg_10Mpa=1317.1 KJ/kg\n", + "h1=hf_10Mpa+x1*hfg_10Mpa\n", + "dryness fraction(x1)may be given as\n", + "x1= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.2, Page:175 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\")\n", + "print(\"during throttling,h1=h2\")\n", + "print(\"at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\")\n", + "print(\"thus h2=2682.5 KJ/kg\")\n", + "h2=2682.5;\n", + "print(\"at state 1,before throttling\")\n", + "print(\"hf_10Mpa=1407.56 KJ/kg\")\n", + "hf_10Mpa=1407.56;\n", + "print(\"hfg_10Mpa=1317.1 KJ/kg\")\n", + "hfg_10Mpa=1317.1;\n", + "print(\"h1=hf_10Mpa+x1*hfg_10Mpa\")\n", + "h1=h2;#during throttling\n", + "print(\"dryness fraction(x1)may be given as\")\n", + "x1=(h1-hf_10Mpa)/hfg_10Mpa\n", + "print(\"x1=\"),round(x1,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.3;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.3, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\n", + "internal energy(u)=in KJ/kg 2644.0\n" + ] + } + ], + "source": [ + "#cal of internal energy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.3, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\")\n", + "h=2848;#enthalpy in KJ/kg\n", + "p=12*1000;#pressure in Kpa\n", + "v=0.017;#specific volume in m^3/kg\n", + "u=h-p*v\n", + "print(\"internal energy(u)=in KJ/kg\"),round(u,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.4;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.4, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\n", + "steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\n", + "entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\n", + "S= 6.65\n", + "entropy of 5 kg of steam(S)in KJ/K\n", + "S=m*S 33.23\n" + ] + } + ], + "source": [ + "#cal of entropy of 5 kg of steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.4, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "p=2;#pressure of steam in Mpa\n", + "T_superheat=(300+273.15);#temperature of superheat steam in K\n", + "Cp_water=4.18;#specific heat of water at constant pressure in KJ/kg K\n", + "Cp_superheat=2.1;#specific heat of superheat steam at constant pressure in KJ/kg K\n", + "print(\"steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\")\n", + "T_sat=(212.42+273.15);#saturation temperature at 2 Mpa in K\n", + "hfg_2Mpa=1890.7;\n", + "print(\"entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\")\n", + "S=Cp_water*math.log(T_sat/273.15)+(hfg_2Mpa/T_sat)+(Cp_superheat*math.log(T_superheat/T_sat))\n", + "print(\"S=\"),round(S,2)\n", + "print(\"entropy of 5 kg of steam(S)in KJ/K\")\n", + "S=m*S\n", + "print(\"S=m*S\"),round(S,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.5;pg no: 176" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.5, Page:176 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\n", + "boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\n", + "at further depth of 50 cm the pressure(p)in Kpa\n", + "p= 138.37\n", + "boiling point at this depth=Tsat_138.365\n", + "from steam table this temperature=108.866=108.87 degree celcius\n", + "so boiling point = 108.87 degree celcius\n" + ] + } + ], + "source": [ + "#cal of boiling point\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.5, Page:176 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\")\n", + "rho=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h=0.50;#depth from above mentioned level in m\n", + "print(\"boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\")\n", + "p_boil=143.27;#pressure at which pond water boils in Kpa\n", + "print(\"at further depth of 50 cm the pressure(p)in Kpa\")\n", + "p=p_boil-((rho*g*h)*10**-3)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"boiling point at this depth=Tsat_138.365\")\n", + "print(\"from steam table this temperature=108.866=108.87 degree celcius\")\n", + "print(\"so boiling point = 108.87 degree celcius\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.6;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.6, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\n", + "in a rigid vessel it can be treated as constant volume process.\n", + "so v1=v2\n", + "since final state is given to be critical state,then specific volume at critical point,\n", + "v2=0.003155 m^3/kg\n", + "at 100 degree celcius saturation temperature,from steam table\n", + "vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\n", + "and vfg_100=in m^3/kg= 1.67\n", + "thus for initial quality being x1\n", + "v1=vf_100+x1*vfg_100\n", + "so x1= 0.001\n", + "mass of water initially=total mass*(1-x1)\n", + "total mass of fluid/water(m) in kg= 158.48\n", + "volume of water(v) in m^3= 0.1655\n" + ] + } + ], + "source": [ + "#cal of mass and volume of water\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.6, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\")\n", + "V=0.5;#capacity of rigid vessel in m^3\n", + "print(\"in a rigid vessel it can be treated as constant volume process.\")\n", + "print(\"so v1=v2\")\n", + "print(\"since final state is given to be critical state,then specific volume at critical point,\")\n", + "print(\"v2=0.003155 m^3/kg\")\n", + "v2=0.003155;#specific volume at critical point in m^3/kg\n", + "print(\"at 100 degree celcius saturation temperature,from steam table\")\n", + "print(\"vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\")\n", + "vf_100=0.001044;\n", + "vg_100=1.6729;\n", + "vfg_100=vg_100-vf_100\n", + "print(\"and vfg_100=in m^3/kg=\"),round(vfg_100,2)\n", + "print(\"thus for initial quality being x1\")\n", + "v1=v2;#rigid vessel\n", + "x1=(v1-vf_100)/vfg_100\n", + "print(\"v1=vf_100+x1*vfg_100\")\n", + "print(\"so x1=\"),round(x1,3)\n", + "print(\"mass of water initially=total mass*(1-x1)\")\n", + "m=V/v2\n", + "print(\"total mass of fluid/water(m) in kg=\"),round(m,2)\n", + "v=m*vf_100\n", + "print(\"volume of water(v) in m^3=\"),round(v,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.7;pg no: 177" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.7, Page:177 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\n", + "on mollier diadram(h-s diagram)the slope of isobaric line may be given as\n", + "(dh/ds)_p=cons =slope of isobar\n", + "from 1st and 2nd law combined;\n", + "T*ds=dh-v*dp\n", + "(dh/ds)_p=cons = T\n", + "here temperature,T=773.15 K\n", + "here slope=(dh/ds))p=cons = 773.15\n" + ] + } + ], + "source": [ + "#cal of slope\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.7, Page:177 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\")\n", + "print(\"on mollier diadram(h-s diagram)the slope of isobaric line may be given as\")\n", + "print(\"(dh/ds)_p=cons =slope of isobar\")\n", + "print(\"from 1st and 2nd law combined;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"(dh/ds)_p=cons = T\")\n", + "print(\"here temperature,T=773.15 K\")\n", + "print(\"here slope=(dh/ds))p=cons = 773.15\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.8;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.8, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\n", + "at 0.15Mpa,from steam table;\n", + "hf=467.11 KJ/kg,hg=2693.6 KJ/kg\n", + "and hfg in KJ/kg= 2226.49\n", + "vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\n", + "and vfg in m^3/kg= 1.16\n", + "sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\n", + "and sfg=in KJ/kg K= 5.79\n", + "enthalpy at x=.10(h)in KJ/kg\n", + "h= 689.76\n", + "specific volume,(v)in m^3/kg\n", + "v= 0.12\n", + "entropy (s)in KJ/kg K\n", + "s= 2.01\n" + ] + } + ], + "source": [ + "#cal of entropy\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.8, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\")\n", + "x=.10;#quality is 10%\n", + "print(\"at 0.15Mpa,from steam table;\")\n", + "print(\"hf=467.11 KJ/kg,hg=2693.6 KJ/kg\")\n", + "hf=467.11;\n", + "hg=2693.6;\n", + "hfg=hg-hf\n", + "print(\"and hfg in KJ/kg=\"),round(hfg,2)\n", + "print(\"vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\")\n", + "vf=0.001053;\n", + "vg=1.1593;\n", + "vfg=vg-vf\n", + "print(\"and vfg in m^3/kg=\"),round(vfg,2)\n", + "print(\"sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\")\n", + "sf=1.4336;\n", + "sg=7.2233;\n", + "sfg=sg-sf\n", + "print(\"and sfg=in KJ/kg K=\"),round(sfg,2)\n", + "print(\"enthalpy at x=.10(h)in KJ/kg\")\n", + "h=hf+x*hfg\n", + "print(\"h=\"),round(h,2)\n", + "print(\"specific volume,(v)in m^3/kg\")\n", + "v=vf+x*vfg\n", + "print(\"v=\"),round(v,2)\n", + "print(\"entropy (s)in KJ/kg K\")\n", + "s=sf+x*sfg\n", + "print(\"s=\"),round(s,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.9;pg no: 178" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.9, Page:178 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\n", + "work done during constant pressure process(W)=p1*(V2-V1)in KJ\n", + "now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\n", + "so v1 in m^3/kg=\n", + "now mass of steam(m) in kg= 0.32\n", + "specific volume at final state(v2)in m^3/kg\n", + "v2= 0.62\n", + "corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\n", + "v2>vg_1Mpa\n", + "hence state lies in superheated region,from the steam table by interpolation we get temperature as;\n", + "state lies between temperature of 1000 degree celcius and 1100 degree celcius\n", + "so exact temperature at final state(T)in K= 1077.61\n", + "thus internal energy at final state,1 Mpa,1077.61 degree celcius;\n", + "u2=4209.6 KJ/kg\n", + "internal energy at initial state(u1)in KJ/kg\n", + "u1= 2219.28\n", + "from first law of thermodynamics,Q-W=deltaU\n", + "so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ= 788.83\n" + ] + } + ], + "source": [ + "#cal of heat added\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.9, Page:178 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\")\n", + "p1=1*1000;#initial pressure of steam in Kpa\n", + "V1=0.05;#initial volume of steam in m^3\n", + "x1=.8;#dryness fraction is 80%\n", + "V2=0.2;#final volume of steam in m^3\n", + "p2=p1;#constant pressure process\n", + "print(\"work done during constant pressure process(W)=p1*(V2-V1)in KJ\")\n", + "W=p1*(V2-V1)\n", + "print(\"now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\")\n", + "vf=0.001127;\n", + "vg=0.19444;\n", + "uf=761.68;\n", + "ufg=1822;\n", + "v1=vf+x1*vg\n", + "print(\"so v1 in m^3/kg=\")\n", + "m=V1/v1\n", + "print(\"now mass of steam(m) in kg=\"),round(m,2)\n", + "m=0.32097;#take m=0.32097 approx.\n", + "print(\"specific volume at final state(v2)in m^3/kg\")\n", + "v2=V2/m\n", + "print(\"v2=\"),round(v2,2)\n", + "print(\"corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\")\n", + "print(\"v2>vg_1Mpa\")\n", + "print(\"hence state lies in superheated region,from the steam table by interpolation we get temperature as;\")\n", + "print(\"state lies between temperature of 1000 degree celcius and 1100 degree celcius\")\n", + "T=1000+((100*(.62311-.5871))/(.6335-.5871))\n", + "print(\"so exact temperature at final state(T)in K=\"),round(T,2)\n", + "print(\"thus internal energy at final state,1 Mpa,1077.61 degree celcius;\")\n", + "print(\"u2=4209.6 KJ/kg\")\n", + "u2=4209.6;\n", + "print(\"internal energy at initial state(u1)in KJ/kg\")\n", + "u1=uf+x1*ufg\n", + "print(\"u1=\"),round(u1,2)\n", + "print(\"from first law of thermodynamics,Q-W=deltaU\")\n", + "Q=m*(u2-u1)+W\n", + "print(\"so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ=\"),round(Q,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.10;pg no: 179" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.10, Page:179 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\n", + "here steam is kept in rigid vessel,therefore its specific volume shall remain constant\n", + "it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\n", + "from superheated steam table;v1=0.2404 m^3/kg\n", + "at begining of condensation specific volume = 0.2404 m^3/kg\n", + "v2=0.2404 m^3/kg\n", + "this v2 shall be specific volume corresponding to saturated vapour state for condensation.\n", + "thus v2=vg=0.2404 m^3/kg\n", + "looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\n", + "by interpolation,temperature at begining of condensation(T2)in K\n", + "similarily,pressure(p2)in Kpa= 800.96\n" + ] + } + ], + "source": [ + "#cal of pressure\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.10, Page:179 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\")\n", + "p1=800;#initial pressure of steam in Kpa\n", + "T1=200;#initial temperature of steam in degree celcius\n", + "print(\"here steam is kept in rigid vessel,therefore its specific volume shall remain constant\")\n", + "print(\"it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\")\n", + "print(\"from superheated steam table;v1=0.2404 m^3/kg\")\n", + "print(\"at begining of condensation specific volume = 0.2404 m^3/kg\")\n", + "print(\"v2=0.2404 m^3/kg\")\n", + "v2=0.2404;\n", + "print(\"this v2 shall be specific volume corresponding to saturated vapour state for condensation.\")\n", + "print(\"thus v2=vg=0.2404 m^3/kg\")\n", + "vg=v2;\n", + "print(\"looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\")\n", + "print(\"by interpolation,temperature at begining of condensation(T2)in K\")\n", + "T2=175-((175-170)*(0.2404-0.2167))/(0.2428-.2168)\n", + "p=892-(((892-791.7)*(0.2404-0.2168))/(0.2428-0.2168))\n", + "print(\"similarily,pressure(p2)in Kpa=\"),round(p,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.11;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.11, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\n", + "from 1st and 2nd law;\n", + "T*ds=dh-v*dp\n", + "for isentropic process,ds=0\n", + "hence dh=v*dp\n", + "i.e (h2-h1)=v1*(p2-p1)\n", + "corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\n", + "p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\n", + "therefore enthalpy change(deltah)=(h2-h1) in KJ/kg= 0.2\n" + ] + } + ], + "source": [ + "#cal of enthalpy change\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.11, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\")\n", + "p2=200;#feed water pump pressure in Kpa\n", + "print(\"from 1st and 2nd law;\")\n", + "print(\"T*ds=dh-v*dp\")\n", + "print(\"for isentropic process,ds=0\")\n", + "print(\"hence dh=v*dp\")\n", + "print(\"i.e (h2-h1)=v1*(p2-p1)\")\n", + "print(\"corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\")\n", + "print(\"p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\")\n", + "p1=4.25;\n", + "v1=0.001004;\n", + "deltah=v1*(p2-p1)\n", + "print(\"therefore enthalpy change(deltah)=(h2-h1) in KJ/kg=\"),round(deltah,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.12;pg no: 180" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.12, Page:180 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\n", + "from steam table at 150 degree celcius\n", + "vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\n", + "so volume occupied by water(Vw)=3*V/(3+2) in m^3 1.2\n", + "and volume of steam(Vs) in m^3= 0.8\n", + "mass of water(mf)=Vw/Vf in kg 1099.91\n", + "mass of steam(mg)=Vs/Vg in kg 2.04\n", + "total mass in tank(m) in kg= 1101.95\n", + "quality or dryness fraction(x)\n", + "x= 0.002\n", + "NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\n" + ] + } + ], + "source": [ + "#cal of quality or dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.12, Page:180 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\")\n", + "V=2.;#volume of vessel in m^3\n", + "print(\"from steam table at 150 degree celcius\")\n", + "print(\"vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\")\n", + "Vf=0.001091;\n", + "Vg=0.3928;\n", + "Vw=3*V/(3+2)\n", + "print(\"so volume occupied by water(Vw)=3*V/(3+2) in m^3\"),round(Vw,2)\n", + "Vs=2*V/(3+2)\n", + "print(\"and volume of steam(Vs) in m^3=\"),round(Vs,2)\n", + "mf=Vw/Vf\n", + "print(\"mass of water(mf)=Vw/Vf in kg\"),round(mf,2)\n", + "mg=Vs/Vg\n", + "print(\"mass of steam(mg)=Vs/Vg in kg\"),round(mg,2)\n", + "m=mf+mg\n", + "print(\"total mass in tank(m) in kg=\"),round(m,2)\n", + "print(\"quality or dryness fraction(x)\")\n", + "x=mg/m\n", + "print(\"x=\"),round(x,3)\n", + "print(\"NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.13;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.13, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\n", + "fron S.F.S.E on steam turbine;\n", + "W=h1-h2\n", + "initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\n", + "h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\n", + "reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\n", + "else from steam tables at 50 degree celcius saturation temperature;\n", + "hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\n", + "hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\n", + "here s1=s2,let dryness fraction at 2 be x2\n", + "x2= 0.75\n", + "hence enthalpy at state 2\n", + "h2 in KJ/kg= 1994.84\n", + "steam turbine work(W)in KJ/kg\n", + "W=h1-h2\n", + "so turbine output=W 891.36\n" + ] + } + ], + "source": [ + "#cal of turbine output\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.13, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\")\n", + "print(\"fron S.F.S.E on steam turbine;\")\n", + "print(\"W=h1-h2\")\n", + "print(\"initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\")\n", + "print(\"h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\")\n", + "h1=2886.2;\n", + "s1=6.2285;\n", + "print(\"reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\")\n", + "print(\"else from steam tables at 50 degree celcius saturation temperature;\")\n", + "print(\"hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\")\n", + "hf=209.33;\n", + "sf=0.7038;\n", + "print(\"hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\")\n", + "hfg=2382.7;\n", + "sfg=7.3725;\n", + "print(\"here s1=s2,let dryness fraction at 2 be x2\")\n", + "x2=(s1-sf)/sfg\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"hence enthalpy at state 2\")\n", + "h2=hf+x2*hfg\n", + "print(\"h2 in KJ/kg=\"),round(h2,2)\n", + "print(\"steam turbine work(W)in KJ/kg\")\n", + "W=h1-h2\n", + "print(\"W=h1-h2\")\n", + "print(\"so turbine output=W\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.14;pg no: 181" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.14, Page:181 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\n", + "it is constant volume process\n", + "volume of vessel(V)=mass of vapour * specific volume of vapour\n", + "initial specific volume,v1\n", + "v1=vf_100Kpa+x1*vfg_100 in m^3/kg\n", + "at 100 Kpa from steam table;\n", + "hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\n", + " here vfg_100Kpa= in m^3/kg= 1.69\n", + "so v1= in m^3/kg= 0.85\n", + "and volume of vessel(V) in m^3= 42.38\n", + "enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg 1546.46\n", + "internal energy in the beginning=U1=m1*u1 in KJ 146171.0\n", + "let the mass of dry steam added be m,final specific volume inside vessel,v2\n", + "v2=vf_1000Kpa+x2*vfg_1000Kpa\n", + "at 2000 Kpa,from steam table,\n", + "vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\n", + "total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\n", + "V/v2=V/vg_2000Kpa+V/v1\n", + "so v2 in m^3/kg= 0.09\n", + "here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\n", + "at 1000 Kpa from steam table,\n", + "hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\n", + "here vfg_1000Kpa= in m^3/kg= 0.19\n", + "so x2= 0.46\n", + "for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\n", + "so mass of dry steam at 2000 Kpa to be added(m)in kg\n", + "m=(100*(h1-h2))/(h2-hg_2000Kpa)= 11.97\n", + "quality of final mixture x2= 0.46\n" + ] + } + ], + "source": [ + "#cal of quality of final mixture\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.14, Page:181 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\")\n", + "x1=0.5;#dryness fraction \n", + "m1=100;#mass of steam in kg\n", + "v1=0.8475;#\n", + "print(\"it is constant volume process\")\n", + "print(\"volume of vessel(V)=mass of vapour * specific volume of vapour\")\n", + "print(\"initial specific volume,v1\")\n", + "print(\"v1=vf_100Kpa+x1*vfg_100 in m^3/kg\")\n", + "print(\"at 100 Kpa from steam table;\")\n", + "print(\"hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\")\n", + "hf_100Kpa=417.46;\n", + "uf_100Kpa=417.36;\n", + "vf_100Kpa=0.001043;\n", + "hfg_100Kpa=2258;\n", + "ufg_100Kpa=2088.7;\n", + "vg_100Kpa=1.6940;\n", + "vfg_100Kpa=vg_100Kpa-vf_100Kpa\n", + "print(\" here vfg_100Kpa= in m^3/kg=\"),round(vfg_100Kpa,2)\n", + "v1=vf_100Kpa+x1*vfg_100Kpa\n", + "print(\"so v1= in m^3/kg=\"),round(v1,2)\n", + "V=m1*x1*v1\n", + "print(\"and volume of vessel(V) in m^3=\"),round(V,2)\n", + "h1=hf_100Kpa+x1*hfg_100Kpa\n", + "print(\"enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg\"),round(h1,2)\n", + "U1=m1*(uf_100Kpa+x1*ufg_100Kpa)\n", + "print(\"internal energy in the beginning=U1=m1*u1 in KJ\"),round(U1,2)\n", + "print(\"let the mass of dry steam added be m,final specific volume inside vessel,v2\")\n", + "print(\"v2=vf_1000Kpa+x2*vfg_1000Kpa\")\n", + "print(\"at 2000 Kpa,from steam table,\")\n", + "print(\"vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\")\n", + "vg_2000Kpa=0.09963;\n", + "ug_2000Kpa=2600.3;\n", + "hg_2000Kpa=2799.5;\n", + "print(\"total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\")\n", + "print(\"V/v2=V/vg_2000Kpa+V/v1\")\n", + "v2=1/((1/vg_2000Kpa)+(1/v1))\n", + "print(\"so v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\")\n", + "print(\"at 1000 Kpa from steam table,\")\n", + "print(\"hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\")\n", + "hf_1000Kpa=762.81;\n", + "hfg_1000Kpa=2015.3;\n", + "vf_1000Kpa=0.001127;\n", + "vg_1000Kpa=0.19444;\n", + "vfg_1000Kpa=vg_1000Kpa-vf_1000Kpa\n", + "print(\"here vfg_1000Kpa= in m^3/kg=\"),round(vfg_1000Kpa,2)\n", + "x2=(v2-vf_1000Kpa)/vfg_1000Kpa\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\")\n", + "print(\"so mass of dry steam at 2000 Kpa to be added(m)in kg\")\n", + "m=(100*(h1-(hf_1000Kpa+x2*hfg_1000Kpa)))/((hf_1000Kpa+x2*hfg_1000Kpa)-hg_2000Kpa)\n", + "print(\"m=(100*(h1-h2))/(h2-hg_2000Kpa)=\"),round(m,2)\n", + "print(\"quality of final mixture x2=\"),round(x2,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.15;pg no: 183" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.15, Page:183 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\n", + "from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\n", + "condenser pressure(p_condenser) in Kpa= 7.3\n", + "partial pressure of steam corresponding to35 degree celcius from steam table;\n", + "p_steam=5.628 Kpa\n", + "enthalpy corresponding to 35 degree celcius from steam table,\n", + "hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\n", + "let quality of steam entering be x\n", + "from energy balance;\n", + "mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\n", + "so dryness fraction of steam entering(x)is given as\n", + "x= 0.97\n" + ] + } + ], + "source": [ + "#cal of dryness fraction of steam entering\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.15, Page:183 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\")\n", + "p_vaccum=71.5;#recorded condenser vaccum in cm of mercury\n", + "p_barometer=76.8;#barometer reading in cm of mercury\n", + "T_cond=35;#temperature of condensation in degree celcius\n", + "T_hotwell=27.6;#temperature of hot well in degree celcius\n", + "m_cond=1930;#mass of condensate per hour\n", + "m_w=62000;#mass of cooling water per hour\n", + "Ti=8.51;#initial temperature in degree celcius\n", + "To=26.24;#outlet temperature in degree celcius\n", + "print(\"from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\")\n", + "p_condenser=(p_barometer-p_vaccum)*101.325/73.55\n", + "print(\"condenser pressure(p_condenser) in Kpa=\"),round(p_condenser,2)\n", + "print(\"partial pressure of steam corresponding to35 degree celcius from steam table;\")\n", + "print(\"p_steam=5.628 Kpa\")\n", + "p_steam=5.628;#partial pressure of steam\n", + "print(\"enthalpy corresponding to 35 degree celcius from steam table,\")\n", + "print(\"hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\")\n", + "hf=146.68;\n", + "hfg=2418.6;\n", + "print(\"let quality of steam entering be x\")\n", + "print(\"from energy balance;\")\n", + "print(\"mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\")\n", + "print(\"so dryness fraction of steam entering(x)is given as\")\n", + "x=(((m_w*(To-Ti)*4.18)/m_cond)-hf+4.18*T_hotwell)/hfg\n", + "print(\"x=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.16;pg no: 184" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.16, Page:184 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\n", + "heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\n", + "area(A) in m^2= 0.03\n", + "so p1=in Kpa= 419.61\n", + "now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\n", + "volume of water contained(V1) in m^3= 0.001\n", + "mass of water(m) in kg= 0.63\n", + "heat supplied shall cause sensible heating and latent heating\n", + "hence,enthalpy change=heat supplied\n", + "Q=((hf+x*hfg)-(4.18*T)*m)\n", + "so dryness fraction of steam produced(x)can be calculated as\n", + "so x= 0.46\n", + "internal energy of water(U1)in KJ,initially\n", + "U1= 393.69\n", + "finally,internal energy of wet steam(U2)in KJ\n", + "U2=m*h2-p2*V2\n", + "here V2 in m^3= 0.13\n", + "hence U2= 940.68\n", + "hence change in internal energy(U) in KJ= 547.21\n", + "work done(W) in KJ= 53.01\n" + ] + } + ], + "source": [ + "#cal of change in internal energy and work done\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "import math\n", + "print\"Example 6.16, Page:184 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\")\n", + "F=10;#force applied externally upon piston in KN\n", + "d=.2;#diameter in m\n", + "h=0.02;#depth to which water filled in m \n", + "P_atm=101.3;#atmospheric pressure in Kpa\n", + "rho=1000;#density of water in kg/m^3\n", + "Q=600;#heat supplied to water in KJ\n", + "T=150;#temperature of water in degree celcius\n", + "print(\"heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\")\n", + "A=math.pi*d**2/4\n", + "print(\"area(A) in m^2=\"),round(A,2)\n", + "p1=F/A+P_atm\n", + "print(\"so p1=in Kpa=\"),round(p1,2)\n", + "print(\"now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\")\n", + "hf=612.1;\n", + "hfg=2128.7;\n", + "vg=0.4435;\n", + "V1=math.pi*d**2*h/4\n", + "print(\"volume of water contained(V1) in m^3=\"),round(V1,3)\n", + "m=V1*rho\n", + "print(\"mass of water(m) in kg=\"),round(m,2)\n", + "print(\"heat supplied shall cause sensible heating and latent heating\")\n", + "print(\"hence,enthalpy change=heat supplied\")\n", + "print(\"Q=((hf+x*hfg)-(4.18*T)*m)\")\n", + "print(\"so dryness fraction of steam produced(x)can be calculated as\")\n", + "x=((Q/m)+4.18*T-hf)/hfg\n", + "print(\"so x=\"),round(x,2)\n", + "print(\"internal energy of water(U1)in KJ,initially\")\n", + "h1=4.18*T;#enthalpy of water in KJ/kg\n", + "U1=m*h1-p1*V1\n", + "print(\"U1=\"),round(U1,2)\n", + "U1=393.5;#approx.\n", + "print(\"finally,internal energy of wet steam(U2)in KJ\")\n", + "print(\"U2=m*h2-p2*V2\")\n", + "V2=m*x*vg\n", + "print(\"here V2 in m^3=\"),round(V2,2)\n", + "p2=p1;#constant pressure process\n", + "U2=(m*(hf+x*hfg))-p2*V2\n", + "print(\"hence U2=\"),round(U2,2)\n", + "U2=940.71;#approx.\n", + "U=U2-U1\n", + "print(\"hence change in internal energy(U) in KJ=\"),round(U,2)\n", + "p=p1;\n", + "W=p*(V2-V1)\n", + "print(\"work done(W) in KJ=\"),round(W,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.17;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.17, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\n", + "consider throttling calorimeter alone,\n", + "degree of superheat(T_sup)in degree celcius\n", + "T_sup= 18.2\n", + "enthalpy of superheated steam(h_sup)in KJ/kg\n", + "h_sup= 2711.99\n", + "at 120 degree celcius,h=2673.95 KJ/kg from steam table\n", + "now enthalpy before throttling = enthalpy after throttling\n", + "hf+x2*hfg=h_sup\n", + "here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\n", + "so x2= 0.96\n", + "for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\n", + "overall dryness fraction(x)= 0.91\n" + ] + } + ], + "source": [ + "#cal of overall dryness fraction\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.17, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\")\n", + "ms=40;#mass of steam in kg\n", + "mw=2.2;#mass of water in kg\n", + "p1=1.47;#pressure before throttling in Mpa\n", + "T2=120;#temperature after throttling in degree celcius\n", + "p2=107.88;#pressure after throttling in Kpa\n", + "Cp_sup=2.09;#specific heat of superheated steam in KJ/kg K\n", + "print(\"consider throttling calorimeter alone,\")\n", + "print(\"degree of superheat(T_sup)in degree celcius\")\n", + "T_sup=T2-101.8\n", + "print(\"T_sup=\"),round(T_sup,2)\n", + "print(\"enthalpy of superheated steam(h_sup)in KJ/kg\")\n", + "h=2673.95;\n", + "h_sup=h+T_sup*Cp_sup\n", + "print(\"h_sup=\"),round(h_sup,2)\n", + "print(\"at 120 degree celcius,h=2673.95 KJ/kg from steam table\")\n", + "print(\"now enthalpy before throttling = enthalpy after throttling\")\n", + "print(\"hf+x2*hfg=h_sup\")\n", + "print(\"here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\")\n", + "hf=840.513;\n", + "hfg=1951.02;\n", + "x2=(h_sup-hf)/hfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "print(\"for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\")\n", + "x1=(ms-mw)/ms\n", + "x=x1*x2\n", + "print(\"overall dryness fraction(x)=\"),round(x,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.18;pg no: 185" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.18, Page:185 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\n", + "here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\n", + "final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\n", + "Q in KJ= 200.0\n", + "final enthalpy of dry steam at 15 bar,h2=hg_15bar\n", + "h2=2792.2 KJ/kg from steam table\n", + "let initial dryness fraction be x1,initial enthalpy,\n", + "h1=hf_10bar+x1*hfg_10bar.........eq1\n", + "here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\n", + "also heat balance yields,\n", + "h1+Q=h2\n", + "so h1=h2-Q in KJ/kg\n", + "so by eq 1=>x1= 0.91\n", + "heat added(Q)in KJ= 200.0\n", + "and initial quality(x1) 0.91\n" + ] + } + ], + "source": [ + "#cal of heat added and initial quality\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.18, Page:185 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\")\n", + "v=0.4;#volume of air in part A and part B in m^3\n", + "p1=10*10**5;#initial pressure of steam in pa\n", + "p2=15*10**5;#final pressure of steam in pa\n", + "print(\"here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\")\n", + "print(\"final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\")\n", + "Q=v*(p2-p1)/1000\n", + "print(\"Q in KJ=\"),round(Q,2)\n", + "print(\"final enthalpy of dry steam at 15 bar,h2=hg_15bar\")\n", + "print(\"h2=2792.2 KJ/kg from steam table\")\n", + "h2=2792.2;\n", + "print(\"let initial dryness fraction be x1,initial enthalpy,\")\n", + "print(\"h1=hf_10bar+x1*hfg_10bar.........eq1\")\n", + "print(\"here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\")\n", + "hf_10bar=762.83;\n", + "hfg_10bar=2015.3;\n", + "print(\"also heat balance yields,\")\n", + "print(\"h1+Q=h2\")\n", + "print(\"so h1=h2-Q in KJ/kg\")\n", + "h1=h2-Q\n", + "x1=(h1-hf_10bar)/hfg_10bar\n", + "print(\"so by eq 1=>x1=\"),round(x1,2)\n", + "print(\"heat added(Q)in KJ=\"),round(Q,2)\n", + "print(\"and initial quality(x1)\"),round(x1,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.19;pg no: 186" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.19, Page:186 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\n", + "from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\n", + "specific volume of wet steam in cylinder,v1 in m^3/kg= 0.75\n", + "dryness fraction of initial steam(x1)= 0.6\n", + "initial enthalpy of wet steam,h1 in KJ/kg= 1801.83\n", + "at 400 degree celcius specific volume of steam,v2 in m^3/kg= 1.55\n", + "for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\n", + "actual pressure can be obtained by interpolation\n", + "p2=0.20 MPa(approx.)\n", + "saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\n", + "finally the degree of superheat(T_sup)in K\n", + "T_sup=T-t\n", + "final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\n", + "heat added during process(deltaQ)in KJ\n", + "deltaQ=m*(h2-h1)\n", + "internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\n", + "here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\n", + "internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\n", + "u2=2966.7 KJ/kg\n", + "change in internal energy(deltaU)in KJ\n", + "deltaU= 3807.41\n", + "form first law of thermodynamics,work done(deltaW)in KJ\n", + "deltaW=deltaQ-deltaU 616.88\n", + "so heat transfer(deltaQ)in KJ 4424.3\n", + "and work transfer(deltaW)in KJ 616.88\n", + "NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\n", + "and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\n" + ] + } + ], + "source": [ + "#cal of heat and work transfer \n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.19, Page:186 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\")\n", + "m=3;#mass of wet steam in kg\n", + "p=1.4;#pressure of wet steam in bar\n", + "V1=2.25;#initial volume in m^3\n", + "V2=4.65;#final volume in m^3\n", + "T=400;#temperature of steam in degreee celcius\n", + "print(\"from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\")\n", + "vg=1.2455;\n", + "hf=457.99;\n", + "hfg=2232.3;\n", + "v1=V1/m\n", + "print(\"specific volume of wet steam in cylinder,v1 in m^3/kg=\"),round(v1,2)\n", + "x1=v1/vg\n", + "print(\"dryness fraction of initial steam(x1)=\"),round(x1,2)\n", + "x1=0.602;#approx.\n", + "h1=hf+x1*hfg\n", + "print(\"initial enthalpy of wet steam,h1 in KJ/kg=\"),round(h1,2)\n", + "v2=V2/m\n", + "print(\"at 400 degree celcius specific volume of steam,v2 in m^3/kg=\"),round(v2,2)\n", + "print(\"for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\")\n", + "print(\"actual pressure can be obtained by interpolation\")\n", + "p2=.1+((0.20-0.10)/(1.5493-3.103))*(1.55-3.103)\n", + "print(\"p2=0.20 MPa(approx.)\")\n", + "p2=0.20;\n", + "print(\"saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\")\n", + "t=120.23;\n", + "print(\"finally the degree of superheat(T_sup)in K\")\n", + "print(\"T_sup=T-t\")\n", + "T_sup=T-t\n", + "print(\"final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\")\n", + "h2=3276.6;\n", + "print(\"heat added during process(deltaQ)in KJ\")\n", + "print(\"deltaQ=m*(h2-h1)\")\n", + "deltaQ=m*(h2-h1)\n", + "print(\"internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\")\n", + "print(\"here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\")\n", + "uf=457.84;\n", + "ufg=2059.34;\n", + "u1=uf+x1*ufg\n", + "print(\"internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\")\n", + "print(\"u2=2966.7 KJ/kg\")\n", + "u2=2966.7;\n", + "print(\"change in internal energy(deltaU)in KJ\")\n", + "deltaU=m*(u2-u1)\n", + "print(\"deltaU=\"),round(deltaU,2)\n", + "print(\"form first law of thermodynamics,work done(deltaW)in KJ\")\n", + "deltaW=deltaQ-deltaU\n", + "print(\"deltaW=deltaQ-deltaU\"),round(deltaW,2)\n", + "print(\"so heat transfer(deltaQ)in KJ\"),round(deltaQ,2)\n", + "print(\"and work transfer(deltaW)in KJ\"),round(deltaW,2)\n", + "print(\"NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\")\n", + "print(\"and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 6.20;pg no: 187" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 6.20, Page:187 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\n", + "here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\n", + "at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\n", + "finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\n", + "h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\n", + "h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\n", + "so final temperature(T2)in K\n", + "T2= 495.43\n", + "entropy for final state(s2)in KJ/kg K\n", + "s2= 8.82\n", + "here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\n", + "so change in entropy(deltaS)in KJ/kg K\n", + "deltaS= 1.06\n", + "final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\n", + "here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\n", + "percentage of vessel volume initially occupied by steam(V)= 9.99\n" + ] + } + ], + "source": [ + "#cal of percentage of vessel volume initially occupied by steam\n", + "#intiation of all variables\n", + "# Chapter 6\n", + "print\"Example 6.20, Page:187 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\")\n", + "print(\"here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\")\n", + "print(\"at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\")\n", + "h1_10bar_500oc=3478.5;\n", + "s1_10bar_500oc=7.7622;\n", + "v1_10bar_500oc=0.3541;\n", + "print(\"finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\")\n", + "h2=h1_10bar_500oc;\n", + "print(\"h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\")\n", + "h_1bar_400oc=3278.2;\n", + "h_1bar_500oc=3488.1;\n", + "print(\"h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\")\n", + "print(\"so final temperature(T2)in K\")\n", + "T2=400+((h2-h_1bar_400oc)*(500-400)/(h_1bar_500oc-h_1bar_400oc))\n", + "print(\"T2=\"),round(T2,2)\n", + "print(\"entropy for final state(s2)in KJ/kg K\")\n", + "s_1bar_400oc=8.5435;\n", + "s_1bar_500oc=8.8342;\n", + "s2=s_1bar_400oc+((s_1bar_500oc-s_1bar_400oc)*(495.43-400)/(500-400))\n", + "print(\"s2=\"),round(s2,2)\n", + "print(\"here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\")\n", + "print(\"so change in entropy(deltaS)in KJ/kg K\")\n", + "deltaS=s2-s1_10bar_500oc\n", + "print(\"deltaS=\"),round(deltaS,2)\n", + "print(\"final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\")\n", + "print(\"here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\")\n", + "v_1bar_500oc=3.565;\n", + "v_1bar_400oc=3.103;\n", + "v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400))\n", + "V=v1_10bar_500oc*100/v2\n", + "print(\"percentage of vessel volume initially occupied by steam(V)=\"),round(V,2)\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/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb new file mode 100644 index 00000000..c10f28b4 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7-Copy1.ipynb @@ -0,0 +1,1452 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Availability and General Thermodynamic Relation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.1;page no: 218" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.1, Page:218 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\n", + "let us neglect the potential energy change during the flow.\n", + "applying S.F.E.E,neglecting inlet velocity and change in potential energy,\n", + "W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\n", + "W_max=(h1-h2)-To*(s1-s2)-C2^2/2\n", + "from steam tables,\n", + "h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\n", + "given To=288 K\n", + "so W_max in KJ/kg= 457.1\n", + "maximum possible work(W_max) in KW= 1142.76\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.1, Page:218 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\")\n", + "C2=150;#leave velocity of steam in m/s\n", + "m=2.5;#steam mass flow rate in kg/s\n", + "print(\"let us neglect the potential energy change during the flow.\")\n", + "print(\"applying S.F.E.E,neglecting inlet velocity and change in potential energy,\")\n", + "print(\"W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\")\n", + "print(\"W_max=(h1-h2)-To*(s1-s2)-C2^2/2\")\n", + "print(\"from steam tables,\")\n", + "print(\"h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\")\n", + "h1=3034.8;\n", + "s1=6.8844;\n", + "h2=2776.4;\n", + "s2=7.6134;\n", + "print(\"given To=288 K\")\n", + "To=288;\n", + "W_max=(h1-h2)-To*(s1-s2)-(C2**2/2*10**-3)\n", + "print(\"so W_max in KJ/kg=\"),round(W_max,2)\n", + "W_max=m*W_max\n", + "print(\"maximum possible work(W_max) in KW=\"),round(W_max,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.2;page no: 219" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.2, Page:219 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\n", + "In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\n", + "BOTH THE TANKS HAVE SAME INTERNAL ENERGY\n", + "availability of air in tank,A\n", + "A=(E-Uo)+Po*(V-Vo)-To*(S-So)\n", + "=m*{(e-uo)+Po(v-vo)-To(s-so)}\n", + "m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\n", + "so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\n", + "for tank A,P in pa,so availability_A in KJ= 1.98\n", + "for tank B,P=3*10^5 pa,so availability_B in KJ= 30.98\n", + "so availability of air in tank B is more than that of tank A\n", + "availability of air in tank A=1.98 KJ\n", + "availability of air in tank B=30.98 KJ\n" + ] + } + ], + "source": [ + "#cal of availability of air in tank A,B\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.2, Page:219 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\")\n", + "m=1.;#mass of air in kg\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "To=(15.+273.);#temperature of atmosphere in K\n", + "Cv=0.717;#specific heat at constant volume in KJ/kg K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "T=(50.+273.);#temperature of tanks A and B in K\n", + "print(\"In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\")\n", + "print(\"BOTH THE TANKS HAVE SAME INTERNAL ENERGY\")\n", + "print(\"availability of air in tank,A\")\n", + "print(\"A=(E-Uo)+Po*(V-Vo)-To*(S-So)\")\n", + "print(\"=m*{(e-uo)+Po(v-vo)-To(s-so)}\")\n", + "print(\"m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\")\n", + "print(\"so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\")\n", + "P=1.*10**5;#pressure in tank A in pa\n", + "availability_A=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank A,P in pa,so availability_A in KJ=\"),round(availability_A,2)\n", + "P=3.*10**5;#pressure in tank B in pa\n", + "availability_B=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank B,P=3*10^5 pa,so availability_B in KJ=\"),round(availability_B,2)\n", + "print(\"so availability of air in tank B is more than that of tank A\")\n", + "print(\"availability of air in tank A=1.98 KJ\")\n", + "print(\"availability of air in tank B=30.98 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.3;page no: 221" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.3, Page:221 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\n", + "inlet conditions,\n", + "from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\n", + "outlet conditions,at 0.05 bar and 0.95 dryness fraction\n", + "from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\n", + "so s2= in KJ/kg K= 8.0\n", + "and h2= in KJ/kg= 2440.34\n", + "neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\n", + "w in KJ/kg= 598.06\n", + "power output in KW= 8970.97\n", + "maximum work for given end states,\n", + "w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg 850.43\n", + "w_max in KW 12755.7\n", + "so maximum power output=12755.7 KW\n", + "maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\n", + "A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\n", + "=(h2-ho)+V2^2/2-To(s2-so)\n", + "approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\n", + "from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\n", + "maximum work available from exhaust steam,A_exhaust in KJ/kg\n", + "A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so) 151.1\n", + "maximum power that could be obtained from exhaust steam in KW= 2266.5\n", + "so maximum power from exhaust steam=2266.5 KW\n" + ] + } + ], + "source": [ + "#cal of maximum power output and that could be obtained from exhaust steam\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.3, Page:221 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\")\n", + "m=15;#steam flow rate in kg/s\n", + "V2=160;#exit velocity of steam in m/s\n", + "To=(15+273);#pond water temperature in K\n", + "print(\"inlet conditions,\")\n", + "print(\"from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\")\n", + "h1=3051.2;\n", + "s1=7.1229;\n", + "print(\"outlet conditions,at 0.05 bar and 0.95 dryness fraction\")\n", + "print(\"from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\")\n", + "sf=0.4764;\n", + "s_fg=7.9187;\n", + "x=0.95;\n", + "hf=137.82;\n", + "h_fg=2423.7;\n", + "s2=sf+x*s_fg\n", + "print(\"so s2= in KJ/kg K=\"),round(s2,2)\n", + "h2=hf+x*h_fg\n", + "print(\"and h2= in KJ/kg=\"),round(h2,2)\n", + "print(\"neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\")\n", + "w=(h1-h2)-V2**2*10**-3/2\n", + "print(\"w in KJ/kg=\"),round(w,2)\n", + "print(\"power output in KW=\"),round(m*w,2)\n", + "print(\"maximum work for given end states,\")\n", + "w_max=(h1-To*s1)-(h2+V2**2*10**-3/2-To*s2)\n", + "print(\"w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg\"),round(w_max,2)\n", + "w_max=850.38;#approx.\n", + "w_max=m*w_max\n", + "print(\"w_max in KW\"),round(w_max,2)\n", + "print(\"so maximum power output=12755.7 KW\")\n", + "print(\"maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\")\n", + "print(\"A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\")\n", + "print(\"=(h2-ho)+V2^2/2-To(s2-so)\")\n", + "print(\"approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\")\n", + "print(\"from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\")\n", + "ho=62.99;\n", + "so=0.2245;\n", + "print(\"maximum work available from exhaust steam,A_exhaust in KJ/kg\")\n", + "A_exhaust=(h2-ho)+V2**2*10**-3/2-To*(s2-so)\n", + "A_exhaust=151.1;#approx.\n", + "print(\"A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so)\"),round(A_exhaust,2)\n", + "print(\"maximum power that could be obtained from exhaust steam in KW=\"),round(m*A_exhaust,2)\n", + "print(\"so maximum power from exhaust steam=2266.5 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.4;page no: 222" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.4, Page:222 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\n", + "for dead state of water,\n", + "from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\n", + "for initial state of water,\n", + "from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\n", + "for final state of water,\n", + "from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\n", + "availability at any state can be given by\n", + "A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\n", + "so availability at initial state,A1 in KJ\n", + "A1= 2703.28\n", + "and availability at final state,A2 in KJ\n", + "A2= 1.09\n", + "change in availability,A2-A1 in KJ= -2702.19\n", + "hence availability decreases by 2702.188 KJ\n", + "NOTE=>In this question,due to large calculations,answers are approximately correct.\n" + ] + } + ], + "source": [ + "#cal of availability at initial,final state and also change\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.4, Page:222 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "z1=10;#initial elevation in m\n", + "V1=25;#initial velocity of steam in m/s\n", + "z2=2;#final elevation in m\n", + "V2=10;#final velocity of steam in m/s\n", + "Po=100;#environmental pressure in Kpa\n", + "To=(25+273);#environmental temperature in K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"for dead state of water,\")\n", + "print(\"from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\")\n", + "uo=104.86;\n", + "vo=1.0029*10**-3;\n", + "so=0.3673;\n", + "print(\"for initial state of water,\")\n", + "print(\"from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\")\n", + "u1=2550;\n", + "v1=0.5089;\n", + "s1=6.93;\n", + "print(\"for final state of water,\")\n", + "print(\"from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.94;\n", + "v2=1.0018*10**-3;\n", + "s2=0.2966;\n", + "print(\"availability at any state can be given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+V1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"so availability at initial state,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+V2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"and availability at final state,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "A2-A1\n", + "print(\"change in availability,A2-A1 in KJ=\"),round(A2-A1,2)\n", + "print(\"hence availability decreases by 2702.188 KJ\")\n", + "print(\"NOTE=>In this question,due to large calculations,answers are approximately correct.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.5;page no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.5, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\n", + "In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.5, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\")\n", + "print(\"In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.6;pg no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.6, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in enropy of system(deltaSs)=W/T in KJ/kg K 0.98\n", + "change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K -2.8\n", + "loss of available energy(E) in KJ/kg= -550.49\n", + "loss of available energy(E)= -550.49\n", + "ratio of lost available exhaust gas energy to engine work=E/W= 0.524\n" + ] + } + ], + "source": [ + "#cal of available energy and ratio of lost available exhaust gas energy to engine work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.6, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\")\n", + "To=(30.+273.);#temperature of surrounding in K\n", + "W=1050.;#work done in engine in KJ/kg\n", + "Cp=1.1;#specific heat at constant pressure in KJ/kg K\n", + "T=(800.+273.);#temperature of exhaust gas in K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "deltaSs=W/T\n", + "print(\"change in enropy of system(deltaSs)=W/T in KJ/kg K\"),round(deltaSs,2)\n", + "deltaSe=-Cp*(T-To)/To\n", + "print(\"change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K\"),round(deltaSe,2)\n", + "E=To*(deltaSs+deltaSe)\n", + "print(\"loss of available energy(E) in KJ/kg=\"),round(E,2)\n", + "E=-E\n", + "print(\"loss of available energy(E)=\"),round(-E,2)\n", + "print(\"ratio of lost available exhaust gas energy to engine work=E/W=\"),round(E/W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.7;pg no: 224" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.7, Page:224 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\n", + "let us consider velocities and elevations to be given in reference to environment.Availability is given by\n", + "A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\n", + "dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\n", + "for initial state of saturated vapour at 150 degree celcius\n", + "from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\n", + "for final state of saturated liquid at 20 degree celcius\n", + "from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\n", + "substituting in the expression for availability\n", + "initial state availability,A1 in KJ\n", + "A1= 5650.31\n", + "final state availability,A2 in KJ\n", + "A2= 2.58\n", + "change in availability,deltaA in KJ= -5647.72\n", + "so initial availability =5650.28 KJ\n", + "final availability=2.58 KJ \n", + "change in availability=decrease by 5647.70 KJ \n" + ] + } + ], + "source": [ + "#cal of initial,final and change in availability\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.7, Page:224 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\")\n", + "m=10;#mass of water in kg\n", + "C1=25;#initial velocity in m/s\n", + "C2=10;#final velocity in m/s\n", + "Po=0.1*1000;#environmental pressure in Kpa\n", + "To=(25+273.15);#environmental temperature in K\n", + "g=9.8;#acceleration due to gravity in m/s^2\n", + "z1=10;#initial elevation in m\n", + "z2=3;#final elevation in m\n", + "print(\"let us consider velocities and elevations to be given in reference to environment.Availability is given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\")\n", + "print(\"dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\")\n", + "uo=104.88;\n", + "vo=1.003*10**-3;\n", + "so=0.3674;\n", + "print(\"for initial state of saturated vapour at 150 degree celcius\")\n", + "print(\"from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\")\n", + "u1=2559.5;\n", + "v1=0.3928;\n", + "s1=6.8379;\n", + "print(\"for final state of saturated liquid at 20 degree celcius\")\n", + "print(\"from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.95;\n", + "v2=0.001002;\n", + "s2=0.2966;\n", + "print(\"substituting in the expression for availability\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+C1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"initial state availability,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+C2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"final state availability,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "deltaA=A2-A1\n", + "print(\"change in availability,deltaA in KJ=\"),round(deltaA,2)\n", + "print(\"so initial availability =5650.28 KJ\")\n", + "print(\"final availability=2.58 KJ \")\n", + "print(\"change in availability=decrease by 5647.70 KJ \")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.8;pg no: 225" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.8, Page:225 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\n", + "let inlet and exit states of turbine be denoted as 1 and 2\n", + "at inlet to turbine,\n", + "from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\n", + "at exit from turbine,\n", + "from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\n", + "at dead state,\n", + "from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\n", + "availability of steam at inlet,A1 in KJ= 6792.43\n", + "so availability of steam at inlet=6792.43 KJ\n", + "applying first law of thermodynamics,\n", + "Q+m*h1=m*h2+W\n", + "so W in KJ/s= 2829.0\n", + "so turbine output=2829 KW\n", + "maximum possible turbine output will be available when irreversibility is zero.\n", + "W_rev=W_max=A1-A2\n", + "W_max in KJ/s= 3804.82\n", + "so maximum output=3804.81 KW\n", + "irreversibility can be estimated by the difference between the maximum output and turbine output.\n", + "I= in KW= 975.82\n", + "so irreversibility=975.81807 KW\n", + "NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\n" + ] + } + ], + "source": [ + "#cal of availability of steam at inlet,turbine output,maximum possible turbine output,irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.8, Page:225 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\")\n", + "m=5.;#steam flow rate in kg/s\n", + "p1=5.*1000.;#initial pressure of steam in Kpa\n", + "T1=(500.+273.15);#initial temperature of steam in K \n", + "p2=0.2*1000.;#final pressure of steam in Kpa\n", + "T1=(140.+273.15);#final temperature of steam in K\n", + "po=101.3;#pressure of steam at dead state in Kpa\n", + "To=(25.+273.15);#temperature of steam at dead state in K \n", + "Q=600.;#heat loss through turbine in KJ/s\n", + "print(\"let inlet and exit states of turbine be denoted as 1 and 2\")\n", + "print(\"at inlet to turbine,\")\n", + "print(\"from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\")\n", + "h1=3433.8;\n", + "s1=6.9759;\n", + "print(\"at exit from turbine,\")\n", + "print(\"from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\")\n", + "h2=2748;\n", + "s2=7.228;\n", + "print(\"at dead state,\")\n", + "print(\"from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\")\n", + "ho=104.96;\n", + "so=0.3673;\n", + "A1=m*((h1-ho)-To*(s1-so))\n", + "print(\"availability of steam at inlet,A1 in KJ=\"),round(A1,2)\n", + "print(\"so availability of steam at inlet=6792.43 KJ\")\n", + "print(\"applying first law of thermodynamics,\")\n", + "print(\"Q+m*h1=m*h2+W\")\n", + "W=m*(h1-h2)-Q\n", + "print(\"so W in KJ/s=\"),round(W,2)\n", + "print(\"so turbine output=2829 KW\")\n", + "print(\"maximum possible turbine output will be available when irreversibility is zero.\")\n", + "print(\"W_rev=W_max=A1-A2\")\n", + "W_max=m*((h1-h2)-To*(s1-s2))\n", + "print(\"W_max in KJ/s=\"),round(W_max,2)\n", + "print(\"so maximum output=3804.81 KW\")\n", + "print(\"irreversibility can be estimated by the difference between the maximum output and turbine output.\")\n", + "I=W_max-W\n", + "print(\"I= in KW=\"),round(I,2)\n", + "print(\"so irreversibility=975.81807 KW\")\n", + "print(\"NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.9;pg no: 226" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.9, Page:226 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\n", + "In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.9, Page:226 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\")\n", + "print(\"In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.10;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.10, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\n", + "In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.10, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\")\n", + "print(\"In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.11;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.11, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\n", + "availability for heat reservoir(A_HR) in KJ/kg K 167.66\n", + "now availability for system(A_system) in KJ/kg K 194.44\n", + "net loss of available energy(A) in KJ/kg K= -26.78\n", + "so loss of available energy=26.77 KJ/kg K\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.11, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\")\n", + "To=280.;#surrounding temperature in K\n", + "Q=500.;#heat removed in KJ\n", + "T1=835.;#temperature of reservoir in K\n", + "T2=720.;#temperature of system in K\n", + "A_HR=To*Q/T1\n", + "print(\"availability for heat reservoir(A_HR) in KJ/kg K\"),round(A_HR,2)\n", + "A_system=To*Q/T2\n", + "print(\"now availability for system(A_system) in KJ/kg K\"),round(A_system,2)\n", + "A=A_HR-A_system \n", + "print(\"net loss of available energy(A) in KJ/kg K=\"),round(A,2)\n", + "print(\"so loss of available energy=26.77 KJ/kg K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.12;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.12, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\n", + "here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\n", + "W_max=W1-W2 in KJ/kg 1647.0\n", + "actual work from turbine,W_actual=h1-h2 in KJ/kg 1557.0\n", + "so actual work=1557 KJ/kg\n", + "maximum possible work=1647 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of actual,maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.12, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\")\n", + "h1=4142;#enthalpy at entrance in KJ/kg\n", + "h2=2585;#enthalpy at exit in KJ/kg\n", + "W1=1787;#availability of steam at entrance in KJ/kg\n", + "W2=140;#availability of steam at exit in KJ/kg\n", + "print(\"here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\")\n", + "W_max=W1-W2\n", + "print(\"W_max=W1-W2 in KJ/kg\"),round(W_max,2)\n", + "W_actual=h1-h2\n", + "print(\"actual work from turbine,W_actual=h1-h2 in KJ/kg\"),round(W_actual,2)\n", + "print(\"so actual work=1557 KJ/kg\")\n", + "print(\"maximum possible work=1647 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.13;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.13, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\n", + "reversible engine efficiency,n_rev=1-(T_min/T_max) 0.621\n", + "second law efficiency=n/n_rev 0.4026\n", + "in % 40.26\n" + ] + } + ], + "source": [ + "#cal of second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.13, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\")\n", + "T_min=(20.+273.);#minimum temperature reservoir temperature in K\n", + "T_max=(500.+273.);#maximum temperature reservoir temperature in K\n", + "n=0.25;#efficiency of heat engine\n", + "n_rev=1-(T_min/T_max)\n", + "print(\"reversible engine efficiency,n_rev=1-(T_min/T_max)\"),round(n_rev,4)\n", + "n/n_rev\n", + "print(\"second law efficiency=n/n_rev\"),round(n/n_rev,4)\n", + "print(\"in %\"),round(n*100/n_rev,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.14;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.14, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\n", + "expansion occurs in adiabatic conditions.\n", + "temperature after expansion can be obtained by considering adiabatic expansion\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2= in K= 489.12\n", + "mass of air,m in kg= 20.91\n", + "change in entropy of control system,deltaSs=(S2-S1) in KJ/K= -0.0\n", + "here,there is no change in entropy of environment,deltaSe=0\n", + "total entropy change of combined system=deltaSc in KJ/K= -0.0\n", + "loss of available energy(E)=irreversibility in KJ= -0.603\n", + "so loss of available energy,E=0.603 KJ\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.14, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\")\n", + "V_A=6.;#volume of compartment A in m^3\n", + "V_B=4.;#volume of compartment B in m^3\n", + "To=300.;#temperature of atmosphere in K\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "P1=6.*10**5;#initial pressure in pa\n", + "T1=600.;#initial temperature in K\n", + "V1=V_A;#initial volume in m^3\n", + "V2=(V_A+V_B);#final volume in m^3\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "print(\"expansion occurs in adiabatic conditions.\")\n", + "print(\"temperature after expansion can be obtained by considering adiabatic expansion\")\n", + "T2=T1*(V1/V2)**(y-1)\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2= in K=\"),round(T2,2)\n", + "T2=489.12;#approx.\n", + "m=(P1*V1)/(R*T1)\n", + "print(\"mass of air,m in kg=\"),round(m,2)\n", + "m=20.91;#approx.\n", + "deltaSs=m*Cv*math.log(T2/T1)+m*R*10**-3*math.log(V2/V1)\n", + "print(\"change in entropy of control system,deltaSs=(S2-S1) in KJ/K=\"),round(deltaSs,2)\n", + "print(\"here,there is no change in entropy of environment,deltaSe=0\")\n", + "deltaSe=0;\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"total entropy change of combined system=deltaSc in KJ/K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"loss of available energy(E)=irreversibility in KJ=\"),round(E,3)\n", + "print(\"so loss of available energy,E=0.603 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.15;pg no: 229" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.15, Page:229 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\n", + "In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.15, Page:229 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\")\n", + "print(\"In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.16;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.16, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\n", + "availability or reversible work,W_rev=n_rev*Q1 in KJ/min 229.53\n", + "rate of irreversibility,I=W_rev-W_useful in KJ/sec 99.53\n", + "second law efficiency=W_useful/W_rev 0.57\n", + "in percentage 56.64\n", + "so availability=1.38*10^4 KJ/min\n", + "and rate of irreversibility=100 KW,second law efficiency=56.63 %\n", + "NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\n" + ] + } + ], + "source": [ + "#cal of availability,rate of irreversibility and second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.16, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\")\n", + "To=(17.+273.);#temperature of surrounding in K\n", + "T1=(700.+273.);#temperature of high temperature reservoir in K\n", + "T2=(30.+273.);#temperature of low temperature reservoir in K\n", + "Q1=2.*10**4;#rate of heat receive in KJ/min\n", + "W_useful=0.13*10**3;#output of engine in KW\n", + "n_rev=(1-T2/T1);\n", + "W_rev=n_rev*Q1\n", + "W_rev=W_rev/60.;#W_rev in KJ/s\n", + "print(\"availability or reversible work,W_rev=n_rev*Q1 in KJ/min\"),round(W_rev,2)\n", + "I=W_rev-W_useful\n", + "print(\"rate of irreversibility,I=W_rev-W_useful in KJ/sec\"),round(I,2)\n", + "W_useful/W_rev\n", + "print(\"second law efficiency=W_useful/W_rev\"),round(W_useful/W_rev,2)\n", + "W_useful*100/W_rev\n", + "print(\"in percentage\"),round(W_useful*100/W_rev,2)\n", + "print(\"so availability=1.38*10^4 KJ/min\")\n", + "print(\"and rate of irreversibility=100 KW,second law efficiency=56.63 %\")\n", + "print(\"NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.17;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.17, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in entropy of system=deltaSs\n", + "change in entropy of environment/surroundings=deltaSe\n", + "here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\n", + "P1/T1=P2/T2\n", + "so T2 in K= 555.0\n", + "heat addition to air in tank\n", + "Q in KJ/kg= 223.11\n", + "deltaSs in KJ/kg K= 0.67\n", + "deltaSe in KJ/kg K= -0.33\n", + "and deltaSc in KJ/kg K= 0.34\n", + "so loss of available energy(E)in KJ/kg= 101.55\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.17, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\")\n", + "To=(27+273);#temperature of surrounding in K\n", + "T1=(60+273);#initial temperature of air in K\n", + "P1=1.5*10**5;#initial pressure of air in pa\n", + "P2=2.5*10**5;#final pressure of air in pa\n", + "T_reservoir=(400+273);#temperature of reservoir in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "print(\"change in entropy of system=deltaSs\")\n", + "print(\"change in entropy of environment/surroundings=deltaSe\")\n", + "print(\"here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\")\n", + "print(\"P1/T1=P2/T2\")\n", + "T2=P2*T1/P1\n", + "print(\"so T2 in K=\"),round(T2,2)\n", + "print(\"heat addition to air in tank\")\n", + "deltaT=T2-T1;\n", + "Q=Cp*deltaT\n", + "print(\"Q in KJ/kg=\"),round(Q,2)\n", + "deltaSs=Q/T1\n", + "print(\"deltaSs in KJ/kg K=\"),round(deltaSs,2)\n", + "deltaSe=-Q/T_reservoir\n", + "print(\"deltaSe in KJ/kg K=\"),round(deltaSe,2)\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"and deltaSc in KJ/kg K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"so loss of available energy(E)in KJ/kg=\"),round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.18;pg no: 231" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.18, Page:231 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\n", + "In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.18, Page:231 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\")\n", + "print(\"In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.19;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.19, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\n", + "clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\n", + "from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\n", + "v_fg in m^3/kg= 0.0\n", + "let us approximate,\n", + "(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\n", + "here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\n", + "substituting in clapeyron equation,\n", + "h_fg in KJ/kg 1941.25\n", + "so calculated enthalpy of vaporisation=1941.25 KJ/kg\n", + "and enthalpy of vaporisation from steam table=1940.7 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of enthalpy of vaporisation\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.19, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\")\n", + "T=(200+273);#temperature of water in K\n", + "print(\"clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\")\n", + "print(\"from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\")\n", + "vg=0.12736;\n", + "vf=0.001157;\n", + "v_fg=(vg-vf)\n", + "print(\"v_fg in m^3/kg=\"),round(v_fg)\n", + "print(\"let us approximate,\")\n", + "print(\"(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\")\n", + "print(\"here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\")\n", + "P_205oc=1.7230;#pressure at 205 degree celcius in Mpa\n", + "P_195oc=1.3978;#pressure at 195 degree celcius in Mpa\n", + "(P_205oc-P_195oc)/(205-195)\n", + "print(\"substituting in clapeyron equation,\")\n", + "h_fg=T*v_fg*(P_205oc-P_195oc)*1000/(205-195)\n", + "print(\"h_fg in KJ/kg\"),round(h_fg,2)\n", + "print(\"so calculated enthalpy of vaporisation=1941.25 KJ/kg\")\n", + "print(\"and enthalpy of vaporisation from steam table=1940.7 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.20;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.20, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\n", + "by clapeyron equation\n", + "h_fg=T2*v_fg*(do/dT)_sat \n", + "h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\n", + "by clapeyron-clausius equation,\n", + "log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\n", + "log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\n", + "so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\n", + "% deviation from clapeyron equation in % 6.44\n", + "h_fg by clapeyron equation=159.49 KJ/kg\n", + "h_fg by clapeyron-clausius equation=169.76 KJ/kg\n", + "% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.20, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\")\n", + "P2=260.96;#saturation pressure at -5 degree celcius\n", + "P1=182.60;#saturation pressure at -15 degree celcius\n", + "vg=0.07665;#specific volume of gas at -10 degree celcius in m^3/kg\n", + "vf=0.00070#specific volume at -10 degree celcius in m^3/kg\n", + "R=0.06876;#gas constant in KJ/kg K\n", + "h_fg=156.3;#enthalpy in KJ/kg K\n", + "T2=(-5.+273.);#temperature in K\n", + "T1=(-15.+273.);#temperature in K\n", + "print(\"by clapeyron equation\")\n", + "print(\"h_fg=T2*v_fg*(do/dT)_sat \")\n", + "print(\"h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\")\n", + "h_fg=T2*(vg-vf)*(P1-P2)/(T1-T2)\n", + "print(\"by clapeyron-clausius equation,\")\n", + "print(\"log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\")\n", + "print(\"log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\")\n", + "print(\"so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\")\n", + "h_fg=math.log(P2/P1)*R/((1/T1)-(1/T2))\n", + "print(\"% deviation from clapeyron equation in %\"),round((169.76-159.49)*100/159.49,2)\n", + "print(\"h_fg by clapeyron equation=159.49 KJ/kg\")\n", + "print(\"h_fg by clapeyron-clausius equation=169.76 KJ/kg\")\n", + "print(\"% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.21;pg no: 233" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 15)", + "output_type": "error", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m15\u001b[0m\n\u001b[1;33m volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "#cal of volume expansivity and isothermal compressibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.21, Page:233 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 21\")\n", + "print(\"volume expansion=(1/v)*(dv/dT)_P\")\n", + "print(\"isothermal compressibility=-(1/v)*(dv/dp)_T\")\n", + "print(\"let us write dv/dT=deltav/deltaT and dv/dP=deltav/deltaP.The difference may be taken for small pressure and temperature changes.\")\n", + "print(\"volume expansivity in K^-1,\")\n", + "print(\"=(1/v)*(dv/dT)_300Kpa\")\n", + "v_300Kpa_300oc=0.8753;#specific volume at 300Kpa and 300 degree celcius\n", + "v_350oc=0.9534;#specific volume 350 degree celcius\n", + "v_250oc=0.7964;#specific volume 250 degree celcius\n", + "volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\n", + "print(\"volume expansivity in Kpa\"),round(volume expansivity,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350oc=0.9534 in m^3/kg,v_250oc=0.7964 in m^3/kg\")\n", + "print(\"volume expansivity=1.7937*10^-3 K^-1\")\n", + "isothermal=(-1/v_300Kpa_300oc)*(v_350Kpa-v_250Kpa)/(350-250)\n", + "print(\"isothermal compressibility in Kpa^-1\")\n", + "print(\"isothermal compressibility\"),round(isothermal compressibility,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350Kpa=0.76505 in m^3/kg,v_250Kpa=1.09575 in m^3/kg\")\n", + "v_350Kpa=0.76505;#specific volume 350 Kpa\n", + "v_250Kpa=1.09575;#specific volume 250 Kpa\n", + "print(\"so isothermal compressibility=3.778*10^-3 Kpa^-1\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.22;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.22, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\n", + "filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\n", + "hi=uf\n", + "Cp*Ti=Cv*Tf\n", + "so Tf=Cp*Ti/Cv in K 417.33\n", + "inside final temperature,Tf=417.33 K\n", + "change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K= 0.338\n", + "Cp*log(Tf/Ti)+0\n", + "change in entropy,deltaS_gen=0.3379 KJ/kg K\n", + "irreversibility,I in KJ/kg= 100.76\n", + "irreversibility,I=100.74 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of inside final temperature,change in entropy and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.22, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Ti=(25+273.15);#atmospheric temperature in K\n", + "print(\"filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\")\n", + "print(\"hi=uf\")\n", + "print(\"Cp*Ti=Cv*Tf\")\n", + "Tf=Cp*Ti/Cv\n", + "print(\"so Tf=Cp*Ti/Cv in K\"),round(Tf,2)\n", + "print(\"inside final temperature,Tf=417.33 K\")\n", + "deltaS_gen=Cp*math.log(Tf/Ti)\n", + "print(\"change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K=\"),round(deltaS_gen,4)\n", + "print(\"Cp*log(Tf/Ti)+0\")\n", + "print(\"change in entropy,deltaS_gen=0.3379 KJ/kg K\")\n", + "To=Ti;\n", + "I=To*deltaS_gen\n", + "print(\"irreversibility,I in KJ/kg=\"),round(I,2)\n", + "print(\"irreversibility,I=100.74 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.23;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.23, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\n", + "here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\n", + "therefore,d(E-To-S)/dt=W_max\n", + "or W_max=(E-To-S)1-(E-To-S)2\n", + "here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\n", + "therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\n", + "so maximum work in KJ= 40946.6\n" + ] + } + ], + "source": [ + "#cal of maximum work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.23, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\")\n", + "m=75.;#mass of hot water in kg\n", + "T1=(400.+273.);#temperature of hot water in K\n", + "T2=(27.+273.);#temperature of environment in K\n", + "Cp=4.18;#specific heat of water in KJ/kg K\n", + "print(\"here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\")\n", + "print(\"therefore,d(E-To-S)/dt=W_max\")\n", + "print(\"or W_max=(E-To-S)1-(E-To-S)2\")\n", + "print(\"here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\")\n", + "print(\"therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\")\n", + "To=T2;\n", + "W_max=m*Cp*(T1-T2)-To*m*Cp*math.log(T1/T2)\n", + "print(\"so maximum work in KJ=\"),round(W_max,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.24;pg no: 235" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.24, Page:235 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\n", + "from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\n", + "inlet stream availability in KJ/kg= 1587.19\n", + "input stream availability is equal to the input absolute availability.\n", + "exit stream availaability in KJ/kg 238.69\n", + "exit stream availability is equal to the exit absolute availability.\n", + "W_rev in KJ/kg\n", + "irreversibility=W_rev-W in KJ/kg 348.49\n", + "this irreversibility is in fact the availability loss.\n", + "inlet stream availability=1587.18 KJ/kg\n", + "exit stream availability=238.69 KJ/kg\n", + "irreversibility=348.49 KJ/kg\n", + "NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \n" + ] + } + ], + "source": [ + "#cal of inlet stream availability,exit stream availability and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.24, Page:235 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\")\n", + "C1=150;#steam entering velocity in m/s\n", + "C2=50;#steam leaving velocity in m/s\n", + "To=(15+273);#dead state temperature in K\n", + "W=1000;#expansion work in KJ/kg\n", + "print(\"from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\")\n", + "h1=3666.5;\n", + "s1=7.2589;\n", + "h2=2584.7;\n", + "s2=8.1502;\n", + "(h1+C1**2*10**-3/2)-To*s1\n", + "print(\"inlet stream availability in KJ/kg=\"),round((h1+C1**2*10**-3/2)-To*s1,2)\n", + "(h2+C2**2*10**-3/2)-To*s2\n", + "print(\"input stream availability is equal to the input absolute availability.\")\n", + "print(\"exit stream availaability in KJ/kg\"),round((h2+C2**2*10**-3/2)-To*s2,2)\n", + "print(\"exit stream availability is equal to the exit absolute availability.\")\n", + "print(\"W_rev in KJ/kg\")\n", + "W_rev=1587.18-238.69\n", + "W_rev-W\n", + "print(\"irreversibility=W_rev-W in KJ/kg\"),round(W_rev-W,2)\n", + "print(\"this irreversibility is in fact the availability loss.\")\n", + "print(\"inlet stream availability=1587.18 KJ/kg\")\n", + "print(\"exit stream availability=238.69 KJ/kg\")\n", + "print(\"irreversibility=348.49 KJ/kg\")\n", + "print(\"NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \")\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/_Engineering_Thermodynamics_by__O._Singh/chapter7.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7.ipynb new file mode 100755 index 00000000..ef30a163 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7.ipynb @@ -0,0 +1,1452 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Availability and General Thermodynamic Relation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.1;page no: 218" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.1, Page:218 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\n", + "let us neglect the potential energy change during the flow.\n", + "applying S.F.E.E,neglecting inlet velocity and change in potential energy,\n", + "W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\n", + "W_max=(h1-h2)-To*(s1-s2)-C2^2/2\n", + "from steam tables,\n", + "h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\n", + "given To=288 K\n", + "so W_max in KJ/kg= 457.1\n", + "maximum possible work(W_max) in KW= 1142.76\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.1, Page:218 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\")\n", + "C2=150;#leave velocity of steam in m/s\n", + "m=2.5;#steam mass flow rate in kg/s\n", + "print(\"let us neglect the potential energy change during the flow.\")\n", + "print(\"applying S.F.E.E,neglecting inlet velocity and change in potential energy,\")\n", + "print(\"W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\")\n", + "print(\"W_max=(h1-h2)-To*(s1-s2)-C2^2/2\")\n", + "print(\"from steam tables,\")\n", + "print(\"h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\")\n", + "h1=3034.8;\n", + "s1=6.8844;\n", + "h2=2776.4;\n", + "s2=7.6134;\n", + "print(\"given To=288 K\")\n", + "To=288;\n", + "W_max=(h1-h2)-To*(s1-s2)-(C2**2/2*10**-3)\n", + "print(\"so W_max in KJ/kg=\"),round(W_max,2)\n", + "W_max=m*W_max\n", + "print(\"maximum possible work(W_max) in KW=\"),round(W_max,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.2;page no: 219" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.2, Page:219 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\n", + "In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\n", + "BOTH THE TANKS HAVE SAME INTERNAL ENERGY\n", + "availability of air in tank,A\n", + "A=(E-Uo)+Po*(V-Vo)-To*(S-So)\n", + "=m*{(e-uo)+Po(v-vo)-To(s-so)}\n", + "m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\n", + "so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\n", + "for tank A,P in pa,so availability_A in KJ= 1.98\n", + "for tank B,P=3*10^5 pa,so availability_B in KJ= 30.98\n", + "so availability of air in tank B is more than that of tank A\n", + "availability of air in tank A=1.98 KJ\n", + "availability of air in tank B=30.98 KJ\n" + ] + } + ], + "source": [ + "#cal of availability of air in tank A,B\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.2, Page:219 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\")\n", + "m=1.;#mass of air in kg\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "To=(15.+273.);#temperature of atmosphere in K\n", + "Cv=0.717;#specific heat at constant volume in KJ/kg K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "T=(50.+273.);#temperature of tanks A and B in K\n", + "print(\"In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\")\n", + "print(\"BOTH THE TANKS HAVE SAME INTERNAL ENERGY\")\n", + "print(\"availability of air in tank,A\")\n", + "print(\"A=(E-Uo)+Po*(V-Vo)-To*(S-So)\")\n", + "print(\"=m*{(e-uo)+Po(v-vo)-To(s-so)}\")\n", + "print(\"m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\")\n", + "print(\"so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\")\n", + "P=1.*10**5;#pressure in tank A in pa\n", + "availability_A=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank A,P in pa,so availability_A in KJ=\"),round(availability_A,2)\n", + "P=3.*10**5;#pressure in tank B in pa\n", + "availability_B=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank B,P=3*10^5 pa,so availability_B in KJ=\"),round(availability_B,2)\n", + "print(\"so availability of air in tank B is more than that of tank A\")\n", + "print(\"availability of air in tank A=1.98 KJ\")\n", + "print(\"availability of air in tank B=30.98 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.3;page no: 221" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.3, Page:221 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\n", + "inlet conditions,\n", + "from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\n", + "outlet conditions,at 0.05 bar and 0.95 dryness fraction\n", + "from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\n", + "so s2= in KJ/kg K= 8.0\n", + "and h2= in KJ/kg= 2440.34\n", + "neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\n", + "w in KJ/kg= 598.06\n", + "power output in KW= 8970.97\n", + "maximum work for given end states,\n", + "w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg 850.43\n", + "w_max in KW 12755.7\n", + "so maximum power output=12755.7 KW\n", + "maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\n", + "A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\n", + "=(h2-ho)+V2^2/2-To(s2-so)\n", + "approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\n", + "from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\n", + "maximum work available from exhaust steam,A_exhaust in KJ/kg\n", + "A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so) 151.1\n", + "maximum power that could be obtained from exhaust steam in KW= 2266.5\n", + "so maximum power from exhaust steam=2266.5 KW\n" + ] + } + ], + "source": [ + "#cal of maximum power output and that could be obtained from exhaust steam\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.3, Page:221 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\")\n", + "m=15;#steam flow rate in kg/s\n", + "V2=160;#exit velocity of steam in m/s\n", + "To=(15+273);#pond water temperature in K\n", + "print(\"inlet conditions,\")\n", + "print(\"from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\")\n", + "h1=3051.2;\n", + "s1=7.1229;\n", + "print(\"outlet conditions,at 0.05 bar and 0.95 dryness fraction\")\n", + "print(\"from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\")\n", + "sf=0.4764;\n", + "s_fg=7.9187;\n", + "x=0.95;\n", + "hf=137.82;\n", + "h_fg=2423.7;\n", + "s2=sf+x*s_fg\n", + "print(\"so s2= in KJ/kg K=\"),round(s2,2)\n", + "h2=hf+x*h_fg\n", + "print(\"and h2= in KJ/kg=\"),round(h2,2)\n", + "print(\"neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\")\n", + "w=(h1-h2)-V2**2*10**-3/2\n", + "print(\"w in KJ/kg=\"),round(w,2)\n", + "print(\"power output in KW=\"),round(m*w,2)\n", + "print(\"maximum work for given end states,\")\n", + "w_max=(h1-To*s1)-(h2+V2**2*10**-3/2-To*s2)\n", + "print(\"w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg\"),round(w_max,2)\n", + "w_max=850.38;#approx.\n", + "w_max=m*w_max\n", + "print(\"w_max in KW\"),round(w_max,2)\n", + "print(\"so maximum power output=12755.7 KW\")\n", + "print(\"maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\")\n", + "print(\"A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\")\n", + "print(\"=(h2-ho)+V2^2/2-To(s2-so)\")\n", + "print(\"approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\")\n", + "print(\"from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\")\n", + "ho=62.99;\n", + "so=0.2245;\n", + "print(\"maximum work available from exhaust steam,A_exhaust in KJ/kg\")\n", + "A_exhaust=(h2-ho)+V2**2*10**-3/2-To*(s2-so)\n", + "A_exhaust=151.1;#approx.\n", + "print(\"A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so)\"),round(A_exhaust,2)\n", + "print(\"maximum power that could be obtained from exhaust steam in KW=\"),round(m*A_exhaust,2)\n", + "print(\"so maximum power from exhaust steam=2266.5 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.4;page no: 222" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.4, Page:222 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\n", + "for dead state of water,\n", + "from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\n", + "for initial state of water,\n", + "from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\n", + "for final state of water,\n", + "from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\n", + "availability at any state can be given by\n", + "A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\n", + "so availability at initial state,A1 in KJ\n", + "A1= 2703.28\n", + "and availability at final state,A2 in KJ\n", + "A2= 1.09\n", + "change in availability,A2-A1 in KJ= -2702.19\n", + "hence availability decreases by 2702.188 KJ\n", + "NOTE=>In this question,due to large calculations,answers are approximately correct.\n" + ] + } + ], + "source": [ + "#cal of availability at initial,final state and also change\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.4, Page:222 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "z1=10;#initial elevation in m\n", + "V1=25;#initial velocity of steam in m/s\n", + "z2=2;#final elevation in m\n", + "V2=10;#final velocity of steam in m/s\n", + "Po=100;#environmental pressure in Kpa\n", + "To=(25+273);#environmental temperature in K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"for dead state of water,\")\n", + "print(\"from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\")\n", + "uo=104.86;\n", + "vo=1.0029*10**-3;\n", + "so=0.3673;\n", + "print(\"for initial state of water,\")\n", + "print(\"from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\")\n", + "u1=2550;\n", + "v1=0.5089;\n", + "s1=6.93;\n", + "print(\"for final state of water,\")\n", + "print(\"from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.94;\n", + "v2=1.0018*10**-3;\n", + "s2=0.2966;\n", + "print(\"availability at any state can be given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+V1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"so availability at initial state,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+V2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"and availability at final state,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "A2-A1\n", + "print(\"change in availability,A2-A1 in KJ=\"),round(A2-A1,2)\n", + "print(\"hence availability decreases by 2702.188 KJ\")\n", + "print(\"NOTE=>In this question,due to large calculations,answers are approximately correct.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.5;page no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.5, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\n", + "In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.5, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\")\n", + "print(\"In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.6;pg no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.6, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in enropy of system(deltaSs)=W/T in KJ/kg K 0.98\n", + "change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K -2.8\n", + "loss of available energy(E) in KJ/kg= -550.49\n", + "loss of available energy(E)= -550.49\n", + "ratio of lost available exhaust gas energy to engine work=E/W= 0.524\n" + ] + } + ], + "source": [ + "#cal of available energy and ratio of lost available exhaust gas energy to engine work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.6, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\")\n", + "To=(30.+273.);#temperature of surrounding in K\n", + "W=1050.;#work done in engine in KJ/kg\n", + "Cp=1.1;#specific heat at constant pressure in KJ/kg K\n", + "T=(800.+273.);#temperature of exhaust gas in K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "deltaSs=W/T\n", + "print(\"change in enropy of system(deltaSs)=W/T in KJ/kg K\"),round(deltaSs,2)\n", + "deltaSe=-Cp*(T-To)/To\n", + "print(\"change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K\"),round(deltaSe,2)\n", + "E=To*(deltaSs+deltaSe)\n", + "print(\"loss of available energy(E) in KJ/kg=\"),round(E,2)\n", + "E=-E\n", + "print(\"loss of available energy(E)=\"),round(-E,2)\n", + "print(\"ratio of lost available exhaust gas energy to engine work=E/W=\"),round(E/W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.7;pg no: 224" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.7, Page:224 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\n", + "let us consider velocities and elevations to be given in reference to environment.Availability is given by\n", + "A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\n", + "dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\n", + "for initial state of saturated vapour at 150 degree celcius\n", + "from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\n", + "for final state of saturated liquid at 20 degree celcius\n", + "from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\n", + "substituting in the expression for availability\n", + "initial state availability,A1 in KJ\n", + "A1= 5650.31\n", + "final state availability,A2 in KJ\n", + "A2= 2.58\n", + "change in availability,deltaA in KJ= -5647.72\n", + "so initial availability =5650.28 KJ\n", + "final availability=2.58 KJ \n", + "change in availability=decrease by 5647.70 KJ \n" + ] + } + ], + "source": [ + "#cal of initial,final and change in availability\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.7, Page:224 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\")\n", + "m=10;#mass of water in kg\n", + "C1=25;#initial velocity in m/s\n", + "C2=10;#final velocity in m/s\n", + "Po=0.1*1000;#environmental pressure in Kpa\n", + "To=(25+273.15);#environmental temperature in K\n", + "g=9.8;#acceleration due to gravity in m/s^2\n", + "z1=10;#initial elevation in m\n", + "z2=3;#final elevation in m\n", + "print(\"let us consider velocities and elevations to be given in reference to environment.Availability is given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\")\n", + "print(\"dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\")\n", + "uo=104.88;\n", + "vo=1.003*10**-3;\n", + "so=0.3674;\n", + "print(\"for initial state of saturated vapour at 150 degree celcius\")\n", + "print(\"from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\")\n", + "u1=2559.5;\n", + "v1=0.3928;\n", + "s1=6.8379;\n", + "print(\"for final state of saturated liquid at 20 degree celcius\")\n", + "print(\"from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.95;\n", + "v2=0.001002;\n", + "s2=0.2966;\n", + "print(\"substituting in the expression for availability\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+C1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"initial state availability,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+C2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"final state availability,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "deltaA=A2-A1\n", + "print(\"change in availability,deltaA in KJ=\"),round(deltaA,2)\n", + "print(\"so initial availability =5650.28 KJ\")\n", + "print(\"final availability=2.58 KJ \")\n", + "print(\"change in availability=decrease by 5647.70 KJ \")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.8;pg no: 225" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.8, Page:225 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\n", + "let inlet and exit states of turbine be denoted as 1 and 2\n", + "at inlet to turbine,\n", + "from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\n", + "at exit from turbine,\n", + "from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\n", + "at dead state,\n", + "from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\n", + "availability of steam at inlet,A1 in KJ= 6792.43\n", + "so availability of steam at inlet=6792.43 KJ\n", + "applying first law of thermodynamics,\n", + "Q+m*h1=m*h2+W\n", + "so W in KJ/s= 2829.0\n", + "so turbine output=2829 KW\n", + "maximum possible turbine output will be available when irreversibility is zero.\n", + "W_rev=W_max=A1-A2\n", + "W_max in KJ/s= 3804.82\n", + "so maximum output=3804.81 KW\n", + "irreversibility can be estimated by the difference between the maximum output and turbine output.\n", + "I= in KW= 975.82\n", + "so irreversibility=975.81807 KW\n", + "NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\n" + ] + } + ], + "source": [ + "#cal of availability of steam at inlet,turbine output,maximum possible turbine output,irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.8, Page:225 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\")\n", + "m=5.;#steam flow rate in kg/s\n", + "p1=5.*1000.;#initial pressure of steam in Kpa\n", + "T1=(500.+273.15);#initial temperature of steam in K \n", + "p2=0.2*1000.;#final pressure of steam in Kpa\n", + "T1=(140.+273.15);#final temperature of steam in K\n", + "po=101.3;#pressure of steam at dead state in Kpa\n", + "To=(25.+273.15);#temperature of steam at dead state in K \n", + "Q=600.;#heat loss through turbine in KJ/s\n", + "print(\"let inlet and exit states of turbine be denoted as 1 and 2\")\n", + "print(\"at inlet to turbine,\")\n", + "print(\"from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\")\n", + "h1=3433.8;\n", + "s1=6.9759;\n", + "print(\"at exit from turbine,\")\n", + "print(\"from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\")\n", + "h2=2748;\n", + "s2=7.228;\n", + "print(\"at dead state,\")\n", + "print(\"from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\")\n", + "ho=104.96;\n", + "so=0.3673;\n", + "A1=m*((h1-ho)-To*(s1-so))\n", + "print(\"availability of steam at inlet,A1 in KJ=\"),round(A1,2)\n", + "print(\"so availability of steam at inlet=6792.43 KJ\")\n", + "print(\"applying first law of thermodynamics,\")\n", + "print(\"Q+m*h1=m*h2+W\")\n", + "W=m*(h1-h2)-Q\n", + "print(\"so W in KJ/s=\"),round(W,2)\n", + "print(\"so turbine output=2829 KW\")\n", + "print(\"maximum possible turbine output will be available when irreversibility is zero.\")\n", + "print(\"W_rev=W_max=A1-A2\")\n", + "W_max=m*((h1-h2)-To*(s1-s2))\n", + "print(\"W_max in KJ/s=\"),round(W_max,2)\n", + "print(\"so maximum output=3804.81 KW\")\n", + "print(\"irreversibility can be estimated by the difference between the maximum output and turbine output.\")\n", + "I=W_max-W\n", + "print(\"I= in KW=\"),round(I,2)\n", + "print(\"so irreversibility=975.81807 KW\")\n", + "print(\"NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.9;pg no: 226" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.9, Page:226 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\n", + "In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.9, Page:226 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\")\n", + "print(\"In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.10;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.10, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\n", + "In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.10, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\")\n", + "print(\"In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.11;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.11, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\n", + "availability for heat reservoir(A_HR) in KJ/kg K 167.66\n", + "now availability for system(A_system) in KJ/kg K 194.44\n", + "net loss of available energy(A) in KJ/kg K= -26.78\n", + "so loss of available energy=26.77 KJ/kg K\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.11, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\")\n", + "To=280.;#surrounding temperature in K\n", + "Q=500.;#heat removed in KJ\n", + "T1=835.;#temperature of reservoir in K\n", + "T2=720.;#temperature of system in K\n", + "A_HR=To*Q/T1\n", + "print(\"availability for heat reservoir(A_HR) in KJ/kg K\"),round(A_HR,2)\n", + "A_system=To*Q/T2\n", + "print(\"now availability for system(A_system) in KJ/kg K\"),round(A_system,2)\n", + "A=A_HR-A_system \n", + "print(\"net loss of available energy(A) in KJ/kg K=\"),round(A,2)\n", + "print(\"so loss of available energy=26.77 KJ/kg K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.12;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.12, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\n", + "here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\n", + "W_max=W1-W2 in KJ/kg 1647.0\n", + "actual work from turbine,W_actual=h1-h2 in KJ/kg 1557.0\n", + "so actual work=1557 KJ/kg\n", + "maximum possible work=1647 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of actual,maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.12, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\")\n", + "h1=4142;#enthalpy at entrance in KJ/kg\n", + "h2=2585;#enthalpy at exit in KJ/kg\n", + "W1=1787;#availability of steam at entrance in KJ/kg\n", + "W2=140;#availability of steam at exit in KJ/kg\n", + "print(\"here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\")\n", + "W_max=W1-W2\n", + "print(\"W_max=W1-W2 in KJ/kg\"),round(W_max,2)\n", + "W_actual=h1-h2\n", + "print(\"actual work from turbine,W_actual=h1-h2 in KJ/kg\"),round(W_actual,2)\n", + "print(\"so actual work=1557 KJ/kg\")\n", + "print(\"maximum possible work=1647 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.13;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.13, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\n", + "reversible engine efficiency,n_rev=1-(T_min/T_max) 0.621\n", + "second law efficiency=n/n_rev 0.4026\n", + "in % 40.26\n" + ] + } + ], + "source": [ + "#cal of second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.13, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\")\n", + "T_min=(20.+273.);#minimum temperature reservoir temperature in K\n", + "T_max=(500.+273.);#maximum temperature reservoir temperature in K\n", + "n=0.25;#efficiency of heat engine\n", + "n_rev=1-(T_min/T_max)\n", + "print(\"reversible engine efficiency,n_rev=1-(T_min/T_max)\"),round(n_rev,4)\n", + "n/n_rev\n", + "print(\"second law efficiency=n/n_rev\"),round(n/n_rev,4)\n", + "print(\"in %\"),round(n*100/n_rev,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.14;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.14, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\n", + "expansion occurs in adiabatic conditions.\n", + "temperature after expansion can be obtained by considering adiabatic expansion\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2= in K= 489.12\n", + "mass of air,m in kg= 20.91\n", + "change in entropy of control system,deltaSs=(S2-S1) in KJ/K= -0.0\n", + "here,there is no change in entropy of environment,deltaSe=0\n", + "total entropy change of combined system=deltaSc in KJ/K= -0.0\n", + "loss of available energy(E)=irreversibility in KJ= -0.603\n", + "so loss of available energy,E=0.603 KJ\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.14, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\")\n", + "V_A=6.;#volume of compartment A in m^3\n", + "V_B=4.;#volume of compartment B in m^3\n", + "To=300.;#temperature of atmosphere in K\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "P1=6.*10**5;#initial pressure in pa\n", + "T1=600.;#initial temperature in K\n", + "V1=V_A;#initial volume in m^3\n", + "V2=(V_A+V_B);#final volume in m^3\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "print(\"expansion occurs in adiabatic conditions.\")\n", + "print(\"temperature after expansion can be obtained by considering adiabatic expansion\")\n", + "T2=T1*(V1/V2)**(y-1)\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2= in K=\"),round(T2,2)\n", + "T2=489.12;#approx.\n", + "m=(P1*V1)/(R*T1)\n", + "print(\"mass of air,m in kg=\"),round(m,2)\n", + "m=20.91;#approx.\n", + "deltaSs=m*Cv*math.log(T2/T1)+m*R*10**-3*math.log(V2/V1)\n", + "print(\"change in entropy of control system,deltaSs=(S2-S1) in KJ/K=\"),round(deltaSs,2)\n", + "print(\"here,there is no change in entropy of environment,deltaSe=0\")\n", + "deltaSe=0;\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"total entropy change of combined system=deltaSc in KJ/K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"loss of available energy(E)=irreversibility in KJ=\"),round(E,3)\n", + "print(\"so loss of available energy,E=0.603 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.15;pg no: 229" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.15, Page:229 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\n", + "In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.15, Page:229 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\")\n", + "print(\"In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.16;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.16, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\n", + "availability or reversible work,W_rev=n_rev*Q1 in KJ/min 229.53\n", + "rate of irreversibility,I=W_rev-W_useful in KJ/sec 99.53\n", + "second law efficiency=W_useful/W_rev 0.57\n", + "in percentage 56.64\n", + "so availability=1.38*10^4 KJ/min\n", + "and rate of irreversibility=100 KW,second law efficiency=56.63 %\n", + "NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\n" + ] + } + ], + "source": [ + "#cal of availability,rate of irreversibility and second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.16, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\")\n", + "To=(17.+273.);#temperature of surrounding in K\n", + "T1=(700.+273.);#temperature of high temperature reservoir in K\n", + "T2=(30.+273.);#temperature of low temperature reservoir in K\n", + "Q1=2.*10**4;#rate of heat receive in KJ/min\n", + "W_useful=0.13*10**3;#output of engine in KW\n", + "n_rev=(1-T2/T1);\n", + "W_rev=n_rev*Q1\n", + "W_rev=W_rev/60.;#W_rev in KJ/s\n", + "print(\"availability or reversible work,W_rev=n_rev*Q1 in KJ/min\"),round(W_rev,2)\n", + "I=W_rev-W_useful\n", + "print(\"rate of irreversibility,I=W_rev-W_useful in KJ/sec\"),round(I,2)\n", + "W_useful/W_rev\n", + "print(\"second law efficiency=W_useful/W_rev\"),round(W_useful/W_rev,2)\n", + "W_useful*100/W_rev\n", + "print(\"in percentage\"),round(W_useful*100/W_rev,2)\n", + "print(\"so availability=1.38*10^4 KJ/min\")\n", + "print(\"and rate of irreversibility=100 KW,second law efficiency=56.63 %\")\n", + "print(\"NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.17;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.17, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in entropy of system=deltaSs\n", + "change in entropy of environment/surroundings=deltaSe\n", + "here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\n", + "P1/T1=P2/T2\n", + "so T2 in K= 555.0\n", + "heat addition to air in tank\n", + "Q in KJ/kg= 223.11\n", + "deltaSs in KJ/kg K= 0.67\n", + "deltaSe in KJ/kg K= -0.33\n", + "and deltaSc in KJ/kg K= 0.34\n", + "so loss of available energy(E)in KJ/kg= 101.55\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.17, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\")\n", + "To=(27+273);#temperature of surrounding in K\n", + "T1=(60+273);#initial temperature of air in K\n", + "P1=1.5*10**5;#initial pressure of air in pa\n", + "P2=2.5*10**5;#final pressure of air in pa\n", + "T_reservoir=(400+273);#temperature of reservoir in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "print(\"change in entropy of system=deltaSs\")\n", + "print(\"change in entropy of environment/surroundings=deltaSe\")\n", + "print(\"here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\")\n", + "print(\"P1/T1=P2/T2\")\n", + "T2=P2*T1/P1\n", + "print(\"so T2 in K=\"),round(T2,2)\n", + "print(\"heat addition to air in tank\")\n", + "deltaT=T2-T1;\n", + "Q=Cp*deltaT\n", + "print(\"Q in KJ/kg=\"),round(Q,2)\n", + "deltaSs=Q/T1\n", + "print(\"deltaSs in KJ/kg K=\"),round(deltaSs,2)\n", + "deltaSe=-Q/T_reservoir\n", + "print(\"deltaSe in KJ/kg K=\"),round(deltaSe,2)\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"and deltaSc in KJ/kg K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"so loss of available energy(E)in KJ/kg=\"),round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.18;pg no: 231" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.18, Page:231 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\n", + "In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.18, Page:231 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\")\n", + "print(\"In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.19;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.19, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\n", + "clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\n", + "from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\n", + "v_fg in m^3/kg= 0.0\n", + "let us approximate,\n", + "(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\n", + "here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\n", + "substituting in clapeyron equation,\n", + "h_fg in KJ/kg 1941.25\n", + "so calculated enthalpy of vaporisation=1941.25 KJ/kg\n", + "and enthalpy of vaporisation from steam table=1940.7 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of enthalpy of vaporisation\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.19, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\")\n", + "T=(200+273);#temperature of water in K\n", + "print(\"clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\")\n", + "print(\"from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\")\n", + "vg=0.12736;\n", + "vf=0.001157;\n", + "v_fg=(vg-vf)\n", + "print(\"v_fg in m^3/kg=\"),round(v_fg)\n", + "print(\"let us approximate,\")\n", + "print(\"(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\")\n", + "print(\"here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\")\n", + "P_205oc=1.7230;#pressure at 205 degree celcius in Mpa\n", + "P_195oc=1.3978;#pressure at 195 degree celcius in Mpa\n", + "(P_205oc-P_195oc)/(205-195)\n", + "print(\"substituting in clapeyron equation,\")\n", + "h_fg=T*v_fg*(P_205oc-P_195oc)*1000/(205-195)\n", + "print(\"h_fg in KJ/kg\"),round(h_fg,2)\n", + "print(\"so calculated enthalpy of vaporisation=1941.25 KJ/kg\")\n", + "print(\"and enthalpy of vaporisation from steam table=1940.7 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.20;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.20, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\n", + "by clapeyron equation\n", + "h_fg=T2*v_fg*(do/dT)_sat \n", + "h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\n", + "by clapeyron-clausius equation,\n", + "log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\n", + "log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\n", + "so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\n", + "% deviation from clapeyron equation in % 6.44\n", + "h_fg by clapeyron equation=159.49 KJ/kg\n", + "h_fg by clapeyron-clausius equation=169.76 KJ/kg\n", + "% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.20, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\")\n", + "P2=260.96;#saturation pressure at -5 degree celcius\n", + "P1=182.60;#saturation pressure at -15 degree celcius\n", + "vg=0.07665;#specific volume of gas at -10 degree celcius in m^3/kg\n", + "vf=0.00070#specific volume at -10 degree celcius in m^3/kg\n", + "R=0.06876;#gas constant in KJ/kg K\n", + "h_fg=156.3;#enthalpy in KJ/kg K\n", + "T2=(-5.+273.);#temperature in K\n", + "T1=(-15.+273.);#temperature in K\n", + "print(\"by clapeyron equation\")\n", + "print(\"h_fg=T2*v_fg*(do/dT)_sat \")\n", + "print(\"h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\")\n", + "h_fg=T2*(vg-vf)*(P1-P2)/(T1-T2)\n", + "print(\"by clapeyron-clausius equation,\")\n", + "print(\"log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\")\n", + "print(\"log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\")\n", + "print(\"so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\")\n", + "h_fg=math.log(P2/P1)*R/((1/T1)-(1/T2))\n", + "print(\"% deviation from clapeyron equation in %\"),round((169.76-159.49)*100/159.49,2)\n", + "print(\"h_fg by clapeyron equation=159.49 KJ/kg\")\n", + "print(\"h_fg by clapeyron-clausius equation=169.76 KJ/kg\")\n", + "print(\"% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.21;pg no: 233" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 15)", + "output_type": "error", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m15\u001b[0m\n\u001b[1;33m volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "#cal of volume expansivity and isothermal compressibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.21, Page:233 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 21\")\n", + "print(\"volume expansion=(1/v)*(dv/dT)_P\")\n", + "print(\"isothermal compressibility=-(1/v)*(dv/dp)_T\")\n", + "print(\"let us write dv/dT=deltav/deltaT and dv/dP=deltav/deltaP.The difference may be taken for small pressure and temperature changes.\")\n", + "print(\"volume expansivity in K^-1,\")\n", + "print(\"=(1/v)*(dv/dT)_300Kpa\")\n", + "v_300Kpa_300oc=0.8753;#specific volume at 300Kpa and 300 degree celcius\n", + "v_350oc=0.9534;#specific volume 350 degree celcius\n", + "v_250oc=0.7964;#specific volume 250 degree celcius\n", + "volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\n", + "print(\"volume expansivity in Kpa\"),round(volume expansivity,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350oc=0.9534 in m^3/kg,v_250oc=0.7964 in m^3/kg\")\n", + "print(\"volume expansivity=1.7937*10^-3 K^-1\")\n", + "isothermal=(-1/v_300Kpa_300oc)*(v_350Kpa-v_250Kpa)/(350-250)\n", + "print(\"isothermal compressibility in Kpa^-1\")\n", + "print(\"isothermal compressibility\"),round(isothermal compressibility,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350Kpa=0.76505 in m^3/kg,v_250Kpa=1.09575 in m^3/kg\")\n", + "v_350Kpa=0.76505;#specific volume 350 Kpa\n", + "v_250Kpa=1.09575;#specific volume 250 Kpa\n", + "print(\"so isothermal compressibility=3.778*10^-3 Kpa^-1\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.22;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.22, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\n", + "filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\n", + "hi=uf\n", + "Cp*Ti=Cv*Tf\n", + "so Tf=Cp*Ti/Cv in K 417.33\n", + "inside final temperature,Tf=417.33 K\n", + "change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K= 0.338\n", + "Cp*log(Tf/Ti)+0\n", + "change in entropy,deltaS_gen=0.3379 KJ/kg K\n", + "irreversibility,I in KJ/kg= 100.76\n", + "irreversibility,I=100.74 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of inside final temperature,change in entropy and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.22, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Ti=(25+273.15);#atmospheric temperature in K\n", + "print(\"filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\")\n", + "print(\"hi=uf\")\n", + "print(\"Cp*Ti=Cv*Tf\")\n", + "Tf=Cp*Ti/Cv\n", + "print(\"so Tf=Cp*Ti/Cv in K\"),round(Tf,2)\n", + "print(\"inside final temperature,Tf=417.33 K\")\n", + "deltaS_gen=Cp*math.log(Tf/Ti)\n", + "print(\"change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K=\"),round(deltaS_gen,4)\n", + "print(\"Cp*log(Tf/Ti)+0\")\n", + "print(\"change in entropy,deltaS_gen=0.3379 KJ/kg K\")\n", + "To=Ti;\n", + "I=To*deltaS_gen\n", + "print(\"irreversibility,I in KJ/kg=\"),round(I,2)\n", + "print(\"irreversibility,I=100.74 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.23;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.23, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\n", + "here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\n", + "therefore,d(E-To-S)/dt=W_max\n", + "or W_max=(E-To-S)1-(E-To-S)2\n", + "here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\n", + "therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\n", + "so maximum work in KJ= 40946.6\n" + ] + } + ], + "source": [ + "#cal of maximum work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.23, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\")\n", + "m=75.;#mass of hot water in kg\n", + "T1=(400.+273.);#temperature of hot water in K\n", + "T2=(27.+273.);#temperature of environment in K\n", + "Cp=4.18;#specific heat of water in KJ/kg K\n", + "print(\"here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\")\n", + "print(\"therefore,d(E-To-S)/dt=W_max\")\n", + "print(\"or W_max=(E-To-S)1-(E-To-S)2\")\n", + "print(\"here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\")\n", + "print(\"therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\")\n", + "To=T2;\n", + "W_max=m*Cp*(T1-T2)-To*m*Cp*math.log(T1/T2)\n", + "print(\"so maximum work in KJ=\"),round(W_max,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.24;pg no: 235" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.24, Page:235 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\n", + "from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\n", + "inlet stream availability in KJ/kg= 1587.19\n", + "input stream availability is equal to the input absolute availability.\n", + "exit stream availaability in KJ/kg 238.69\n", + "exit stream availability is equal to the exit absolute availability.\n", + "W_rev in KJ/kg\n", + "irreversibility=W_rev-W in KJ/kg 348.49\n", + "this irreversibility is in fact the availability loss.\n", + "inlet stream availability=1587.18 KJ/kg\n", + "exit stream availability=238.69 KJ/kg\n", + "irreversibility=348.49 KJ/kg\n", + "NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \n" + ] + } + ], + "source": [ + "#cal of inlet stream availability,exit stream availability and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.24, Page:235 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\")\n", + "C1=150;#steam entering velocity in m/s\n", + "C2=50;#steam leaving velocity in m/s\n", + "To=(15+273);#dead state temperature in K\n", + "W=1000;#expansion work in KJ/kg\n", + "print(\"from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\")\n", + "h1=3666.5;\n", + "s1=7.2589;\n", + "h2=2584.7;\n", + "s2=8.1502;\n", + "(h1+C1**2*10**-3/2)-To*s1\n", + "print(\"inlet stream availability in KJ/kg=\"),round((h1+C1**2*10**-3/2)-To*s1,2)\n", + "(h2+C2**2*10**-3/2)-To*s2\n", + "print(\"input stream availability is equal to the input absolute availability.\")\n", + "print(\"exit stream availaability in KJ/kg\"),round((h2+C2**2*10**-3/2)-To*s2,2)\n", + "print(\"exit stream availability is equal to the exit absolute availability.\")\n", + "print(\"W_rev in KJ/kg\")\n", + "W_rev=1587.18-238.69\n", + "W_rev-W\n", + "print(\"irreversibility=W_rev-W in KJ/kg\"),round(W_rev-W,2)\n", + "print(\"this irreversibility is in fact the availability loss.\")\n", + "print(\"inlet stream availability=1587.18 KJ/kg\")\n", + "print(\"exit stream availability=238.69 KJ/kg\")\n", + "print(\"irreversibility=348.49 KJ/kg\")\n", + "print(\"NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \")\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/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb new file mode 100644 index 00000000..ef30a163 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7_1.ipynb @@ -0,0 +1,1452 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Availability and General Thermodynamic Relation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.1;page no: 218" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.1, Page:218 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\n", + "let us neglect the potential energy change during the flow.\n", + "applying S.F.E.E,neglecting inlet velocity and change in potential energy,\n", + "W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\n", + "W_max=(h1-h2)-To*(s1-s2)-C2^2/2\n", + "from steam tables,\n", + "h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\n", + "given To=288 K\n", + "so W_max in KJ/kg= 457.1\n", + "maximum possible work(W_max) in KW= 1142.76\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.1, Page:218 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\")\n", + "C2=150;#leave velocity of steam in m/s\n", + "m=2.5;#steam mass flow rate in kg/s\n", + "print(\"let us neglect the potential energy change during the flow.\")\n", + "print(\"applying S.F.E.E,neglecting inlet velocity and change in potential energy,\")\n", + "print(\"W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\")\n", + "print(\"W_max=(h1-h2)-To*(s1-s2)-C2^2/2\")\n", + "print(\"from steam tables,\")\n", + "print(\"h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\")\n", + "h1=3034.8;\n", + "s1=6.8844;\n", + "h2=2776.4;\n", + "s2=7.6134;\n", + "print(\"given To=288 K\")\n", + "To=288;\n", + "W_max=(h1-h2)-To*(s1-s2)-(C2**2/2*10**-3)\n", + "print(\"so W_max in KJ/kg=\"),round(W_max,2)\n", + "W_max=m*W_max\n", + "print(\"maximum possible work(W_max) in KW=\"),round(W_max,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.2;page no: 219" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.2, Page:219 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\n", + "In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\n", + "BOTH THE TANKS HAVE SAME INTERNAL ENERGY\n", + "availability of air in tank,A\n", + "A=(E-Uo)+Po*(V-Vo)-To*(S-So)\n", + "=m*{(e-uo)+Po(v-vo)-To(s-so)}\n", + "m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\n", + "so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\n", + "for tank A,P in pa,so availability_A in KJ= 1.98\n", + "for tank B,P=3*10^5 pa,so availability_B in KJ= 30.98\n", + "so availability of air in tank B is more than that of tank A\n", + "availability of air in tank A=1.98 KJ\n", + "availability of air in tank B=30.98 KJ\n" + ] + } + ], + "source": [ + "#cal of availability of air in tank A,B\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.2, Page:219 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\")\n", + "m=1.;#mass of air in kg\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "To=(15.+273.);#temperature of atmosphere in K\n", + "Cv=0.717;#specific heat at constant volume in KJ/kg K\n", + "R=0.287;#gas constant in KJ/kg K\n", + "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n", + "T=(50.+273.);#temperature of tanks A and B in K\n", + "print(\"In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\")\n", + "print(\"BOTH THE TANKS HAVE SAME INTERNAL ENERGY\")\n", + "print(\"availability of air in tank,A\")\n", + "print(\"A=(E-Uo)+Po*(V-Vo)-To*(S-So)\")\n", + "print(\"=m*{(e-uo)+Po(v-vo)-To(s-so)}\")\n", + "print(\"m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\")\n", + "print(\"so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\")\n", + "P=1.*10**5;#pressure in tank A in pa\n", + "availability_A=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank A,P in pa,so availability_A in KJ=\"),round(availability_A,2)\n", + "P=3.*10**5;#pressure in tank B in pa\n", + "availability_B=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n", + "print(\"for tank B,P=3*10^5 pa,so availability_B in KJ=\"),round(availability_B,2)\n", + "print(\"so availability of air in tank B is more than that of tank A\")\n", + "print(\"availability of air in tank A=1.98 KJ\")\n", + "print(\"availability of air in tank B=30.98 KJ\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.3;page no: 221" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.3, Page:221 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\n", + "inlet conditions,\n", + "from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\n", + "outlet conditions,at 0.05 bar and 0.95 dryness fraction\n", + "from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\n", + "so s2= in KJ/kg K= 8.0\n", + "and h2= in KJ/kg= 2440.34\n", + "neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\n", + "w in KJ/kg= 598.06\n", + "power output in KW= 8970.97\n", + "maximum work for given end states,\n", + "w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg 850.43\n", + "w_max in KW 12755.7\n", + "so maximum power output=12755.7 KW\n", + "maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\n", + "A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\n", + "=(h2-ho)+V2^2/2-To(s2-so)\n", + "approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\n", + "from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\n", + "maximum work available from exhaust steam,A_exhaust in KJ/kg\n", + "A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so) 151.1\n", + "maximum power that could be obtained from exhaust steam in KW= 2266.5\n", + "so maximum power from exhaust steam=2266.5 KW\n" + ] + } + ], + "source": [ + "#cal of maximum power output and that could be obtained from exhaust steam\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.3, Page:221 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\")\n", + "m=15;#steam flow rate in kg/s\n", + "V2=160;#exit velocity of steam in m/s\n", + "To=(15+273);#pond water temperature in K\n", + "print(\"inlet conditions,\")\n", + "print(\"from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\")\n", + "h1=3051.2;\n", + "s1=7.1229;\n", + "print(\"outlet conditions,at 0.05 bar and 0.95 dryness fraction\")\n", + "print(\"from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\")\n", + "sf=0.4764;\n", + "s_fg=7.9187;\n", + "x=0.95;\n", + "hf=137.82;\n", + "h_fg=2423.7;\n", + "s2=sf+x*s_fg\n", + "print(\"so s2= in KJ/kg K=\"),round(s2,2)\n", + "h2=hf+x*h_fg\n", + "print(\"and h2= in KJ/kg=\"),round(h2,2)\n", + "print(\"neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\")\n", + "w=(h1-h2)-V2**2*10**-3/2\n", + "print(\"w in KJ/kg=\"),round(w,2)\n", + "print(\"power output in KW=\"),round(m*w,2)\n", + "print(\"maximum work for given end states,\")\n", + "w_max=(h1-To*s1)-(h2+V2**2*10**-3/2-To*s2)\n", + "print(\"w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg\"),round(w_max,2)\n", + "w_max=850.38;#approx.\n", + "w_max=m*w_max\n", + "print(\"w_max in KW\"),round(w_max,2)\n", + "print(\"so maximum power output=12755.7 KW\")\n", + "print(\"maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\")\n", + "print(\"A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\")\n", + "print(\"=(h2-ho)+V2^2/2-To(s2-so)\")\n", + "print(\"approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\")\n", + "print(\"from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\")\n", + "ho=62.99;\n", + "so=0.2245;\n", + "print(\"maximum work available from exhaust steam,A_exhaust in KJ/kg\")\n", + "A_exhaust=(h2-ho)+V2**2*10**-3/2-To*(s2-so)\n", + "A_exhaust=151.1;#approx.\n", + "print(\"A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so)\"),round(A_exhaust,2)\n", + "print(\"maximum power that could be obtained from exhaust steam in KW=\"),round(m*A_exhaust,2)\n", + "print(\"so maximum power from exhaust steam=2266.5 KW\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.4;page no: 222" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.4, Page:222 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\n", + "for dead state of water,\n", + "from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\n", + "for initial state of water,\n", + "from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\n", + "for final state of water,\n", + "from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\n", + "availability at any state can be given by\n", + "A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\n", + "so availability at initial state,A1 in KJ\n", + "A1= 2703.28\n", + "and availability at final state,A2 in KJ\n", + "A2= 1.09\n", + "change in availability,A2-A1 in KJ= -2702.19\n", + "hence availability decreases by 2702.188 KJ\n", + "NOTE=>In this question,due to large calculations,answers are approximately correct.\n" + ] + } + ], + "source": [ + "#cal of availability at initial,final state and also change\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.4, Page:222 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\")\n", + "m=5;#mass of steam in kg\n", + "z1=10;#initial elevation in m\n", + "V1=25;#initial velocity of steam in m/s\n", + "z2=2;#final elevation in m\n", + "V2=10;#final velocity of steam in m/s\n", + "Po=100;#environmental pressure in Kpa\n", + "To=(25+273);#environmental temperature in K\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"for dead state of water,\")\n", + "print(\"from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\")\n", + "uo=104.86;\n", + "vo=1.0029*10**-3;\n", + "so=0.3673;\n", + "print(\"for initial state of water,\")\n", + "print(\"from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\")\n", + "u1=2550;\n", + "v1=0.5089;\n", + "s1=6.93;\n", + "print(\"for final state of water,\")\n", + "print(\"from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.94;\n", + "v2=1.0018*10**-3;\n", + "s2=0.2966;\n", + "print(\"availability at any state can be given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+V1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"so availability at initial state,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+V2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"and availability at final state,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "A2-A1\n", + "print(\"change in availability,A2-A1 in KJ=\"),round(A2-A1,2)\n", + "print(\"hence availability decreases by 2702.188 KJ\")\n", + "print(\"NOTE=>In this question,due to large calculations,answers are approximately correct.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.5;page no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.5, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\n", + "In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.5, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\")\n", + "print(\"In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.6;pg no: 223" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.6, Page:223 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in enropy of system(deltaSs)=W/T in KJ/kg K 0.98\n", + "change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K -2.8\n", + "loss of available energy(E) in KJ/kg= -550.49\n", + "loss of available energy(E)= -550.49\n", + "ratio of lost available exhaust gas energy to engine work=E/W= 0.524\n" + ] + } + ], + "source": [ + "#cal of available energy and ratio of lost available exhaust gas energy to engine work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.6, Page:223 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\")\n", + "To=(30.+273.);#temperature of surrounding in K\n", + "W=1050.;#work done in engine in KJ/kg\n", + "Cp=1.1;#specific heat at constant pressure in KJ/kg K\n", + "T=(800.+273.);#temperature of exhaust gas in K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "deltaSs=W/T\n", + "print(\"change in enropy of system(deltaSs)=W/T in KJ/kg K\"),round(deltaSs,2)\n", + "deltaSe=-Cp*(T-To)/To\n", + "print(\"change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K\"),round(deltaSe,2)\n", + "E=To*(deltaSs+deltaSe)\n", + "print(\"loss of available energy(E) in KJ/kg=\"),round(E,2)\n", + "E=-E\n", + "print(\"loss of available energy(E)=\"),round(-E,2)\n", + "print(\"ratio of lost available exhaust gas energy to engine work=E/W=\"),round(E/W,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.7;pg no: 224" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.7, Page:224 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\n", + "let us consider velocities and elevations to be given in reference to environment.Availability is given by\n", + "A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\n", + "dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\n", + "for initial state of saturated vapour at 150 degree celcius\n", + "from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\n", + "for final state of saturated liquid at 20 degree celcius\n", + "from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\n", + "substituting in the expression for availability\n", + "initial state availability,A1 in KJ\n", + "A1= 5650.31\n", + "final state availability,A2 in KJ\n", + "A2= 2.58\n", + "change in availability,deltaA in KJ= -5647.72\n", + "so initial availability =5650.28 KJ\n", + "final availability=2.58 KJ \n", + "change in availability=decrease by 5647.70 KJ \n" + ] + } + ], + "source": [ + "#cal of initial,final and change in availability\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.7, Page:224 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\")\n", + "m=10;#mass of water in kg\n", + "C1=25;#initial velocity in m/s\n", + "C2=10;#final velocity in m/s\n", + "Po=0.1*1000;#environmental pressure in Kpa\n", + "To=(25+273.15);#environmental temperature in K\n", + "g=9.8;#acceleration due to gravity in m/s^2\n", + "z1=10;#initial elevation in m\n", + "z2=3;#final elevation in m\n", + "print(\"let us consider velocities and elevations to be given in reference to environment.Availability is given by\")\n", + "print(\"A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\")\n", + "print(\"dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\")\n", + "uo=104.88;\n", + "vo=1.003*10**-3;\n", + "so=0.3674;\n", + "print(\"for initial state of saturated vapour at 150 degree celcius\")\n", + "print(\"from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\")\n", + "u1=2559.5;\n", + "v1=0.3928;\n", + "s1=6.8379;\n", + "print(\"for final state of saturated liquid at 20 degree celcius\")\n", + "print(\"from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\")\n", + "u2=83.95;\n", + "v2=0.001002;\n", + "s2=0.2966;\n", + "print(\"substituting in the expression for availability\")\n", + "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+C1**2*10**-3/2+g*z1*10**-3)\n", + "print(\"initial state availability,A1 in KJ\")\n", + "print(\"A1=\"),round(A1,2)\n", + "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+C2**2*10**-3/2+g*z2*10**-3)\n", + "print(\"final state availability,A2 in KJ\")\n", + "print(\"A2=\"),round(A2,2)\n", + "deltaA=A2-A1\n", + "print(\"change in availability,deltaA in KJ=\"),round(deltaA,2)\n", + "print(\"so initial availability =5650.28 KJ\")\n", + "print(\"final availability=2.58 KJ \")\n", + "print(\"change in availability=decrease by 5647.70 KJ \")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.8;pg no: 225" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.8, Page:225 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\n", + "let inlet and exit states of turbine be denoted as 1 and 2\n", + "at inlet to turbine,\n", + "from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\n", + "at exit from turbine,\n", + "from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\n", + "at dead state,\n", + "from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\n", + "availability of steam at inlet,A1 in KJ= 6792.43\n", + "so availability of steam at inlet=6792.43 KJ\n", + "applying first law of thermodynamics,\n", + "Q+m*h1=m*h2+W\n", + "so W in KJ/s= 2829.0\n", + "so turbine output=2829 KW\n", + "maximum possible turbine output will be available when irreversibility is zero.\n", + "W_rev=W_max=A1-A2\n", + "W_max in KJ/s= 3804.82\n", + "so maximum output=3804.81 KW\n", + "irreversibility can be estimated by the difference between the maximum output and turbine output.\n", + "I= in KW= 975.82\n", + "so irreversibility=975.81807 KW\n", + "NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\n" + ] + } + ], + "source": [ + "#cal of availability of steam at inlet,turbine output,maximum possible turbine output,irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.8, Page:225 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\")\n", + "m=5.;#steam flow rate in kg/s\n", + "p1=5.*1000.;#initial pressure of steam in Kpa\n", + "T1=(500.+273.15);#initial temperature of steam in K \n", + "p2=0.2*1000.;#final pressure of steam in Kpa\n", + "T1=(140.+273.15);#final temperature of steam in K\n", + "po=101.3;#pressure of steam at dead state in Kpa\n", + "To=(25.+273.15);#temperature of steam at dead state in K \n", + "Q=600.;#heat loss through turbine in KJ/s\n", + "print(\"let inlet and exit states of turbine be denoted as 1 and 2\")\n", + "print(\"at inlet to turbine,\")\n", + "print(\"from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\")\n", + "h1=3433.8;\n", + "s1=6.9759;\n", + "print(\"at exit from turbine,\")\n", + "print(\"from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\")\n", + "h2=2748;\n", + "s2=7.228;\n", + "print(\"at dead state,\")\n", + "print(\"from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\")\n", + "ho=104.96;\n", + "so=0.3673;\n", + "A1=m*((h1-ho)-To*(s1-so))\n", + "print(\"availability of steam at inlet,A1 in KJ=\"),round(A1,2)\n", + "print(\"so availability of steam at inlet=6792.43 KJ\")\n", + "print(\"applying first law of thermodynamics,\")\n", + "print(\"Q+m*h1=m*h2+W\")\n", + "W=m*(h1-h2)-Q\n", + "print(\"so W in KJ/s=\"),round(W,2)\n", + "print(\"so turbine output=2829 KW\")\n", + "print(\"maximum possible turbine output will be available when irreversibility is zero.\")\n", + "print(\"W_rev=W_max=A1-A2\")\n", + "W_max=m*((h1-h2)-To*(s1-s2))\n", + "print(\"W_max in KJ/s=\"),round(W_max,2)\n", + "print(\"so maximum output=3804.81 KW\")\n", + "print(\"irreversibility can be estimated by the difference between the maximum output and turbine output.\")\n", + "I=W_max-W\n", + "print(\"I= in KW=\"),round(I,2)\n", + "print(\"so irreversibility=975.81807 KW\")\n", + "print(\"NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.9;pg no: 226" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.9, Page:226 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\n", + "In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.9, Page:226 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\")\n", + "print(\"In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.10;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.10, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\n", + "In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.10, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\")\n", + "print(\"In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.11;pg no: 227" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.11, Page:227 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\n", + "availability for heat reservoir(A_HR) in KJ/kg K 167.66\n", + "now availability for system(A_system) in KJ/kg K 194.44\n", + "net loss of available energy(A) in KJ/kg K= -26.78\n", + "so loss of available energy=26.77 KJ/kg K\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.11, Page:227 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\")\n", + "To=280.;#surrounding temperature in K\n", + "Q=500.;#heat removed in KJ\n", + "T1=835.;#temperature of reservoir in K\n", + "T2=720.;#temperature of system in K\n", + "A_HR=To*Q/T1\n", + "print(\"availability for heat reservoir(A_HR) in KJ/kg K\"),round(A_HR,2)\n", + "A_system=To*Q/T2\n", + "print(\"now availability for system(A_system) in KJ/kg K\"),round(A_system,2)\n", + "A=A_HR-A_system \n", + "print(\"net loss of available energy(A) in KJ/kg K=\"),round(A,2)\n", + "print(\"so loss of available energy=26.77 KJ/kg K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.12;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.12, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\n", + "here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\n", + "W_max=W1-W2 in KJ/kg 1647.0\n", + "actual work from turbine,W_actual=h1-h2 in KJ/kg 1557.0\n", + "so actual work=1557 KJ/kg\n", + "maximum possible work=1647 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of actual,maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.12, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\")\n", + "h1=4142;#enthalpy at entrance in KJ/kg\n", + "h2=2585;#enthalpy at exit in KJ/kg\n", + "W1=1787;#availability of steam at entrance in KJ/kg\n", + "W2=140;#availability of steam at exit in KJ/kg\n", + "print(\"here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\")\n", + "W_max=W1-W2\n", + "print(\"W_max=W1-W2 in KJ/kg\"),round(W_max,2)\n", + "W_actual=h1-h2\n", + "print(\"actual work from turbine,W_actual=h1-h2 in KJ/kg\"),round(W_actual,2)\n", + "print(\"so actual work=1557 KJ/kg\")\n", + "print(\"maximum possible work=1647 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.13;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.13, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\n", + "reversible engine efficiency,n_rev=1-(T_min/T_max) 0.621\n", + "second law efficiency=n/n_rev 0.4026\n", + "in % 40.26\n" + ] + } + ], + "source": [ + "#cal of second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.13, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\")\n", + "T_min=(20.+273.);#minimum temperature reservoir temperature in K\n", + "T_max=(500.+273.);#maximum temperature reservoir temperature in K\n", + "n=0.25;#efficiency of heat engine\n", + "n_rev=1-(T_min/T_max)\n", + "print(\"reversible engine efficiency,n_rev=1-(T_min/T_max)\"),round(n_rev,4)\n", + "n/n_rev\n", + "print(\"second law efficiency=n/n_rev\"),round(n/n_rev,4)\n", + "print(\"in %\"),round(n*100/n_rev,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.14;pg no: 228" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.14, Page:228 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\n", + "expansion occurs in adiabatic conditions.\n", + "temperature after expansion can be obtained by considering adiabatic expansion\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2= in K= 489.12\n", + "mass of air,m in kg= 20.91\n", + "change in entropy of control system,deltaSs=(S2-S1) in KJ/K= -0.0\n", + "here,there is no change in entropy of environment,deltaSe=0\n", + "total entropy change of combined system=deltaSc in KJ/K= -0.0\n", + "loss of available energy(E)=irreversibility in KJ= -0.603\n", + "so loss of available energy,E=0.603 KJ\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.14, Page:228 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\")\n", + "V_A=6.;#volume of compartment A in m^3\n", + "V_B=4.;#volume of compartment B in m^3\n", + "To=300.;#temperature of atmosphere in K\n", + "Po=1.*10**5;#atmospheric pressure in pa\n", + "P1=6.*10**5;#initial pressure in pa\n", + "T1=600.;#initial temperature in K\n", + "V1=V_A;#initial volume in m^3\n", + "V2=(V_A+V_B);#final volume in m^3\n", + "y=1.4;#expansion constant \n", + "R=287.;#gas constant in J/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "print(\"expansion occurs in adiabatic conditions.\")\n", + "print(\"temperature after expansion can be obtained by considering adiabatic expansion\")\n", + "T2=T1*(V1/V2)**(y-1)\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2= in K=\"),round(T2,2)\n", + "T2=489.12;#approx.\n", + "m=(P1*V1)/(R*T1)\n", + "print(\"mass of air,m in kg=\"),round(m,2)\n", + "m=20.91;#approx.\n", + "deltaSs=m*Cv*math.log(T2/T1)+m*R*10**-3*math.log(V2/V1)\n", + "print(\"change in entropy of control system,deltaSs=(S2-S1) in KJ/K=\"),round(deltaSs,2)\n", + "print(\"here,there is no change in entropy of environment,deltaSe=0\")\n", + "deltaSe=0;\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"total entropy change of combined system=deltaSc in KJ/K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"loss of available energy(E)=irreversibility in KJ=\"),round(E,3)\n", + "print(\"so loss of available energy,E=0.603 KJ\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.15;pg no: 229" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.15, Page:229 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\n", + "In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.15, Page:229 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\")\n", + "print(\"In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.16;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.16, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\n", + "availability or reversible work,W_rev=n_rev*Q1 in KJ/min 229.53\n", + "rate of irreversibility,I=W_rev-W_useful in KJ/sec 99.53\n", + "second law efficiency=W_useful/W_rev 0.57\n", + "in percentage 56.64\n", + "so availability=1.38*10^4 KJ/min\n", + "and rate of irreversibility=100 KW,second law efficiency=56.63 %\n", + "NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\n" + ] + } + ], + "source": [ + "#cal of availability,rate of irreversibility and second law efficiency\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.16, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\")\n", + "To=(17.+273.);#temperature of surrounding in K\n", + "T1=(700.+273.);#temperature of high temperature reservoir in K\n", + "T2=(30.+273.);#temperature of low temperature reservoir in K\n", + "Q1=2.*10**4;#rate of heat receive in KJ/min\n", + "W_useful=0.13*10**3;#output of engine in KW\n", + "n_rev=(1-T2/T1);\n", + "W_rev=n_rev*Q1\n", + "W_rev=W_rev/60.;#W_rev in KJ/s\n", + "print(\"availability or reversible work,W_rev=n_rev*Q1 in KJ/min\"),round(W_rev,2)\n", + "I=W_rev-W_useful\n", + "print(\"rate of irreversibility,I=W_rev-W_useful in KJ/sec\"),round(I,2)\n", + "W_useful/W_rev\n", + "print(\"second law efficiency=W_useful/W_rev\"),round(W_useful/W_rev,2)\n", + "W_useful*100/W_rev\n", + "print(\"in percentage\"),round(W_useful*100/W_rev,2)\n", + "print(\"so availability=1.38*10^4 KJ/min\")\n", + "print(\"and rate of irreversibility=100 KW,second law efficiency=56.63 %\")\n", + "print(\"NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.17;pg no: 230" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.17, Page:230 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\n", + "loss of available energy=irreversibility=To*deltaSc\n", + "deltaSc=deltaSs+deltaSe\n", + "change in entropy of system=deltaSs\n", + "change in entropy of environment/surroundings=deltaSe\n", + "here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\n", + "P1/T1=P2/T2\n", + "so T2 in K= 555.0\n", + "heat addition to air in tank\n", + "Q in KJ/kg= 223.11\n", + "deltaSs in KJ/kg K= 0.67\n", + "deltaSe in KJ/kg K= -0.33\n", + "and deltaSc in KJ/kg K= 0.34\n", + "so loss of available energy(E)in KJ/kg= 101.55\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.17, Page:230 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\")\n", + "To=(27+273);#temperature of surrounding in K\n", + "T1=(60+273);#initial temperature of air in K\n", + "P1=1.5*10**5;#initial pressure of air in pa\n", + "P2=2.5*10**5;#final pressure of air in pa\n", + "T_reservoir=(400+273);#temperature of reservoir in K\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"loss of available energy=irreversibility=To*deltaSc\")\n", + "print(\"deltaSc=deltaSs+deltaSe\")\n", + "print(\"change in entropy of system=deltaSs\")\n", + "print(\"change in entropy of environment/surroundings=deltaSe\")\n", + "print(\"here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\")\n", + "print(\"P1/T1=P2/T2\")\n", + "T2=P2*T1/P1\n", + "print(\"so T2 in K=\"),round(T2,2)\n", + "print(\"heat addition to air in tank\")\n", + "deltaT=T2-T1;\n", + "Q=Cp*deltaT\n", + "print(\"Q in KJ/kg=\"),round(Q,2)\n", + "deltaSs=Q/T1\n", + "print(\"deltaSs in KJ/kg K=\"),round(deltaSs,2)\n", + "deltaSe=-Q/T_reservoir\n", + "print(\"deltaSe in KJ/kg K=\"),round(deltaSe,2)\n", + "deltaSc=deltaSs+deltaSe\n", + "print(\"and deltaSc in KJ/kg K=\"),round(deltaSc,2)\n", + "E=To*deltaSc\n", + "print(\"so loss of available energy(E)in KJ/kg=\"),round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.18;pg no: 231" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.18, Page:231 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\n", + "In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 7\n", + "print\"Example 7.18, Page:231 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\")\n", + "print(\"In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.19;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.19, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\n", + "clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\n", + "from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\n", + "v_fg in m^3/kg= 0.0\n", + "let us approximate,\n", + "(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\n", + "here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\n", + "substituting in clapeyron equation,\n", + "h_fg in KJ/kg 1941.25\n", + "so calculated enthalpy of vaporisation=1941.25 KJ/kg\n", + "and enthalpy of vaporisation from steam table=1940.7 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of enthalpy of vaporisation\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.19, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\")\n", + "T=(200+273);#temperature of water in K\n", + "print(\"clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\")\n", + "print(\"from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\")\n", + "vg=0.12736;\n", + "vf=0.001157;\n", + "v_fg=(vg-vf)\n", + "print(\"v_fg in m^3/kg=\"),round(v_fg)\n", + "print(\"let us approximate,\")\n", + "print(\"(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\")\n", + "print(\"here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\")\n", + "P_205oc=1.7230;#pressure at 205 degree celcius in Mpa\n", + "P_195oc=1.3978;#pressure at 195 degree celcius in Mpa\n", + "(P_205oc-P_195oc)/(205-195)\n", + "print(\"substituting in clapeyron equation,\")\n", + "h_fg=T*v_fg*(P_205oc-P_195oc)*1000/(205-195)\n", + "print(\"h_fg in KJ/kg\"),round(h_fg,2)\n", + "print(\"so calculated enthalpy of vaporisation=1941.25 KJ/kg\")\n", + "print(\"and enthalpy of vaporisation from steam table=1940.7 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.20;pg no: 232" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.20, Page:232 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\n", + "by clapeyron equation\n", + "h_fg=T2*v_fg*(do/dT)_sat \n", + "h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\n", + "by clapeyron-clausius equation,\n", + "log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\n", + "log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\n", + "so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\n", + "% deviation from clapeyron equation in % 6.44\n", + "h_fg by clapeyron equation=159.49 KJ/kg\n", + "h_fg by clapeyron-clausius equation=169.76 KJ/kg\n", + "% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\n" + ] + } + ], + "source": [ + "#cal of loss of available energy\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.20, Page:232 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\")\n", + "P2=260.96;#saturation pressure at -5 degree celcius\n", + "P1=182.60;#saturation pressure at -15 degree celcius\n", + "vg=0.07665;#specific volume of gas at -10 degree celcius in m^3/kg\n", + "vf=0.00070#specific volume at -10 degree celcius in m^3/kg\n", + "R=0.06876;#gas constant in KJ/kg K\n", + "h_fg=156.3;#enthalpy in KJ/kg K\n", + "T2=(-5.+273.);#temperature in K\n", + "T1=(-15.+273.);#temperature in K\n", + "print(\"by clapeyron equation\")\n", + "print(\"h_fg=T2*v_fg*(do/dT)_sat \")\n", + "print(\"h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\")\n", + "h_fg=T2*(vg-vf)*(P1-P2)/(T1-T2)\n", + "print(\"by clapeyron-clausius equation,\")\n", + "print(\"log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\")\n", + "print(\"log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\")\n", + "print(\"so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\")\n", + "h_fg=math.log(P2/P1)*R/((1/T1)-(1/T2))\n", + "print(\"% deviation from clapeyron equation in %\"),round((169.76-159.49)*100/159.49,2)\n", + "print(\"h_fg by clapeyron equation=159.49 KJ/kg\")\n", + "print(\"h_fg by clapeyron-clausius equation=169.76 KJ/kg\")\n", + "print(\"% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.21;pg no: 233" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (, line 15)", + "output_type": "error", + "traceback": [ + "\u001b[1;36m File \u001b[1;32m\"\"\u001b[1;36m, line \u001b[1;32m15\u001b[0m\n\u001b[1;33m volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "#cal of volume expansivity and isothermal compressibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.21, Page:233 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 21\")\n", + "print(\"volume expansion=(1/v)*(dv/dT)_P\")\n", + "print(\"isothermal compressibility=-(1/v)*(dv/dp)_T\")\n", + "print(\"let us write dv/dT=deltav/deltaT and dv/dP=deltav/deltaP.The difference may be taken for small pressure and temperature changes.\")\n", + "print(\"volume expansivity in K^-1,\")\n", + "print(\"=(1/v)*(dv/dT)_300Kpa\")\n", + "v_300Kpa_300oc=0.8753;#specific volume at 300Kpa and 300 degree celcius\n", + "v_350oc=0.9534;#specific volume 350 degree celcius\n", + "v_250oc=0.7964;#specific volume 250 degree celcius\n", + "volume expansivity=((1./0.8753)*(0.9534-0.7964))/(350.-250.)\n", + "print(\"volume expansivity in Kpa\"),round(volume expansivity,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350oc=0.9534 in m^3/kg,v_250oc=0.7964 in m^3/kg\")\n", + "print(\"volume expansivity=1.7937*10^-3 K^-1\")\n", + "isothermal=(-1/v_300Kpa_300oc)*(v_350Kpa-v_250Kpa)/(350-250)\n", + "print(\"isothermal compressibility in Kpa^-1\")\n", + "print(\"isothermal compressibility\"),round(isothermal compressibility,2)\n", + "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350Kpa=0.76505 in m^3/kg,v_250Kpa=1.09575 in m^3/kg\")\n", + "v_350Kpa=0.76505;#specific volume 350 Kpa\n", + "v_250Kpa=1.09575;#specific volume 250 Kpa\n", + "print(\"so isothermal compressibility=3.778*10^-3 Kpa^-1\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.22;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.22, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\n", + "filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\n", + "hi=uf\n", + "Cp*Ti=Cv*Tf\n", + "so Tf=Cp*Ti/Cv in K 417.33\n", + "inside final temperature,Tf=417.33 K\n", + "change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K= 0.338\n", + "Cp*log(Tf/Ti)+0\n", + "change in entropy,deltaS_gen=0.3379 KJ/kg K\n", + "irreversibility,I in KJ/kg= 100.76\n", + "irreversibility,I=100.74 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of inside final temperature,change in entropy and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.22, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\")\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.718;#specific heat at constant volume in KJ/kg K\n", + "Ti=(25+273.15);#atmospheric temperature in K\n", + "print(\"filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\")\n", + "print(\"hi=uf\")\n", + "print(\"Cp*Ti=Cv*Tf\")\n", + "Tf=Cp*Ti/Cv\n", + "print(\"so Tf=Cp*Ti/Cv in K\"),round(Tf,2)\n", + "print(\"inside final temperature,Tf=417.33 K\")\n", + "deltaS_gen=Cp*math.log(Tf/Ti)\n", + "print(\"change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K=\"),round(deltaS_gen,4)\n", + "print(\"Cp*log(Tf/Ti)+0\")\n", + "print(\"change in entropy,deltaS_gen=0.3379 KJ/kg K\")\n", + "To=Ti;\n", + "I=To*deltaS_gen\n", + "print(\"irreversibility,I in KJ/kg=\"),round(I,2)\n", + "print(\"irreversibility,I=100.74 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.23;pg no: 234" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.23, Page:234 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\n", + "here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\n", + "therefore,d(E-To-S)/dt=W_max\n", + "or W_max=(E-To-S)1-(E-To-S)2\n", + "here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\n", + "therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\n", + "so maximum work in KJ= 40946.6\n" + ] + } + ], + "source": [ + "#cal of maximum work\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.23, Page:234 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\")\n", + "m=75.;#mass of hot water in kg\n", + "T1=(400.+273.);#temperature of hot water in K\n", + "T2=(27.+273.);#temperature of environment in K\n", + "Cp=4.18;#specific heat of water in KJ/kg K\n", + "print(\"here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\")\n", + "print(\"therefore,d(E-To-S)/dt=W_max\")\n", + "print(\"or W_max=(E-To-S)1-(E-To-S)2\")\n", + "print(\"here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\")\n", + "print(\"therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\")\n", + "To=T2;\n", + "W_max=m*Cp*(T1-T2)-To*m*Cp*math.log(T1/T2)\n", + "print(\"so maximum work in KJ=\"),round(W_max,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 7.24;pg no: 235" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 7.24, Page:235 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\n", + "from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\n", + "inlet stream availability in KJ/kg= 1587.19\n", + "input stream availability is equal to the input absolute availability.\n", + "exit stream availaability in KJ/kg 238.69\n", + "exit stream availability is equal to the exit absolute availability.\n", + "W_rev in KJ/kg\n", + "irreversibility=W_rev-W in KJ/kg 348.49\n", + "this irreversibility is in fact the availability loss.\n", + "inlet stream availability=1587.18 KJ/kg\n", + "exit stream availability=238.69 KJ/kg\n", + "irreversibility=348.49 KJ/kg\n", + "NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \n" + ] + } + ], + "source": [ + "#cal of inlet stream availability,exit stream availability and irreversibility\n", + "#intiation of all variables\n", + "# Chapter 7\n", + "import math\n", + "print\"Example 7.24, Page:235 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\")\n", + "C1=150;#steam entering velocity in m/s\n", + "C2=50;#steam leaving velocity in m/s\n", + "To=(15+273);#dead state temperature in K\n", + "W=1000;#expansion work in KJ/kg\n", + "print(\"from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\")\n", + "h1=3666.5;\n", + "s1=7.2589;\n", + "h2=2584.7;\n", + "s2=8.1502;\n", + "(h1+C1**2*10**-3/2)-To*s1\n", + "print(\"inlet stream availability in KJ/kg=\"),round((h1+C1**2*10**-3/2)-To*s1,2)\n", + "(h2+C2**2*10**-3/2)-To*s2\n", + "print(\"input stream availability is equal to the input absolute availability.\")\n", + "print(\"exit stream availaability in KJ/kg\"),round((h2+C2**2*10**-3/2)-To*s2,2)\n", + "print(\"exit stream availability is equal to the exit absolute availability.\")\n", + "print(\"W_rev in KJ/kg\")\n", + "W_rev=1587.18-238.69\n", + "W_rev-W\n", + "print(\"irreversibility=W_rev-W in KJ/kg\"),round(W_rev-W,2)\n", + "print(\"this irreversibility is in fact the availability loss.\")\n", + "print(\"inlet stream availability=1587.18 KJ/kg\")\n", + "print(\"exit stream availability=238.69 KJ/kg\")\n", + "print(\"irreversibility=348.49 KJ/kg\")\n", + "print(\"NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \")\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/_Engineering_Thermodynamics_by__O._Singh/chapter8.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8.ipynb new file mode 100755 index 00000000..5088b9af --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8.ipynb @@ -0,0 +1,2594 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 8:Vapour Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.1;pg no: 260" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:260 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\n", + "T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\n", + "enthalpy at state 2,h2= hg at 7 MPa\n", + "from steam table,h=2772.1 KJ/kg\n", + "entropy at state 2,s2=sg at 7MPa\n", + "from steam table,s2=5.8133 KJ/kg K\n", + "enthalpy and entropy at state 3,\n", + "from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\n", + "for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \n", + "from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\n", + "s1=s2=sf+x1*sfg\n", + "so x1= 0.68\n", + "from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\n", + "enthalpy at state 1,h1 in KJ/kg= 1802.53\n", + "let dryness fraction at state 4 be x4\n", + "for process 4-3,s4=s3=sf+x4*sfg\n", + "so x4= 0.33\n", + "enthalpy at state 4,h4 in KJ/kg= 962.81\n", + "thermal efficiency=net work/heat added\n", + "expansion work per kg=(h2-h1) in KJ/kg 969.57\n", + "compression work per kg=(h3-h4) in KJ/kg(+ve) 304.19\n", + "heat added per kg=(h2-h3) in KJ/kg(-ve) 1505.1\n", + "net work per kg=(h2-h1)-(h3-h4) in KJ/kg 665.38\n", + "thermal efficiency 0.44\n", + "in percentage 44.21\n", + "so thermal efficiency=44.21%\n", + "turbine work=969.57 KJ/kg(+ve)\n", + "compression work=304.19 KJ/kg(-ve)\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine work,compression work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.1, Page:260 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\")\n", + "print(\"T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\")\n", + "print(\"enthalpy at state 2,h2= hg at 7 MPa\")\n", + "print(\"from steam table,h=2772.1 KJ/kg\")\n", + "h2=2772.1;\n", + "print(\"entropy at state 2,s2=sg at 7MPa\")\n", + "print(\"from steam table,s2=5.8133 KJ/kg K\")\n", + "s2=5.8133;\n", + "print(\"enthalpy and entropy at state 3,\")\n", + "print(\"from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\")\n", + "h3=1267;\n", + "s3=3.1211;\n", + "print(\"for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \")\n", + "s1=s2;\n", + "print(\"from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\")\n", + "sf=0.5564;\n", + "sfg=7.7237;\n", + "print(\"s1=s2=sf+x1*sfg\")\n", + "x1=(s2-sf)/sfg\n", + "print(\"so x1=\"),round(x1,2) \n", + "x1=0.6806;#approx.\n", + "print(\"from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\")\n", + "hf=162.60;\n", + "hfg=2409.54;\n", + "h1=hf+x1*hfg\n", + "print(\"enthalpy at state 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"let dryness fraction at state 4 be x4\")\n", + "print(\"for process 4-3,s4=s3=sf+x4*sfg\")\n", + "s4=s3;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.3321;#approx.\n", + "h4=hf+x4*hfg\n", + "print(\"enthalpy at state 4,h4 in KJ/kg=\"),round(h4,2)\n", + "print(\"thermal efficiency=net work/heat added\")\n", + "(h2-h1)\n", + "print(\"expansion work per kg=(h2-h1) in KJ/kg\"),round((h2-h1),2)\n", + "(h3-h4)\n", + "print(\"compression work per kg=(h3-h4) in KJ/kg(+ve)\"),round((h3-h4),2)\n", + "(h2-h3)\n", + "print(\"heat added per kg=(h2-h3) in KJ/kg(-ve)\"),round((h2-h3),2)\n", + "(h2-h1)-(h3-h4)\n", + "print(\"net work per kg=(h2-h1)-(h3-h4) in KJ/kg\"),round((h2-h1)-(h3-h4),2)\n", + "((h2-h1)-(h3-h4))/(h2-h3)\n", + "print(\"thermal efficiency\"),round(((h2-h1)-(h3-h4))/(h2-h3),2)\n", + "print(\"in percentage\"),round((((h2-h1)-(h3-h4))/(h2-h3))*100,2)\n", + "print(\"so thermal efficiency=44.21%\")\n", + "print(\"turbine work=969.57 KJ/kg(+ve)\")\n", + "print(\"compression work=304.19 KJ/kg(-ve)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.2;pg no: 261" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.2, Page:261 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\n", + "from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\n", + "hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\n", + "from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\n", + "hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\n", + "as process 2-3 is isentropic,so s2=s3\n", + "and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\n", + "so x3= 0.69\n", + "hence enthalpy at 3,\n", + "h3 in KJ/kg= 1819.85\n", + "enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\n", + "process 1-4 is isentropic,so s1=s4\n", + "s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\n", + "so x4= 0.31\n", + "enthalpy at 4,h4 in KJ/kg= 884.31\n", + "enthalpy at 1,h1 in KJ/kg= 1154.23\n", + "carnot cycle(1-2-3-4-1) efficiency:\n", + "n_carnot=net work/heat added\n", + "n_carnot 0.43\n", + "in percentage 42.96\n", + "so n_carnot=42.95%\n", + "In rankine cycle,1-2-3-5-6-1,\n", + "pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg 5.02\n", + "h5 KJ/kg= 137.82\n", + "hence h6 in KJ/kg 142.84\n", + "net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg 969.43\n", + "heat added=(h2-h6)in KJ/kg 2651.46\n", + "rankine cycle efficiency(n_rankine)= 0.37\n", + "in percentage 36.56\n", + "so n_rankine=36.56%\n" + ] + } + ], + "source": [ + "#cal of n_carnot,n_rankine\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.2, Page:261 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\")\n", + "print(\"from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\")\n", + "print(\"hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\")\n", + "hf_5MPa=1154.23;\n", + "sf_5MPa=2.92;\n", + "hg_5MPa=2794.3;\n", + "sg_5MPa=5.97;\n", + "print(\"from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\")\n", + "print(\"hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\")\n", + "hf_5KPa=137.82;\n", + "sf_5KPa=0.4764;\n", + "hg_5KPa=2561.5;\n", + "sg_5KPa=8.3951;\n", + "vf_5KPa=0.001005;\n", + "print(\"as process 2-3 is isentropic,so s2=s3\")\n", + "print(\"and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\")\n", + "s2=sg_5MPa;\n", + "s3=s2;\n", + "x3=(s3-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.694;#approx.\n", + "print(\"hence enthalpy at 3,\")\n", + "h3=hf_5KPa+x3*(hg_5KPa-hf_5KPa)\n", + "print(\"h3 in KJ/kg=\"),round(h3,2)\n", + "print(\"enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\")\n", + "print(\"process 1-4 is isentropic,so s1=s4\")\n", + "s1=sf_5MPa;\n", + "print(\"s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\")\n", + "x4=(s1-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.308;#approx.\n", + "h4=hf_5KPa+x4*(hg_5KPa-hf_5KPa)\n", + "print(\"enthalpy at 4,h4 in KJ/kg=\"),round(h4,2)\n", + "h1=hf_5MPa\n", + "h2=hg_5MPa;\n", + "n_carnot=((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"enthalpy at 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"carnot cycle(1-2-3-4-1) efficiency:\")\n", + "print(\"n_carnot=net work/heat added\")\n", + "print(\"n_carnot\"),round(n_carnot,2)\n", + "print(\"in percentage\"),round(n_carnot*100,2)\n", + "print(\"so n_carnot=42.95%\")\n", + "print(\"In rankine cycle,1-2-3-5-6-1,\")\n", + "p6=5000;#boiler pressure in KPa\n", + "p5=5;#condenser pressure in KPa\n", + "vf_5KPa*(p6-p5)\n", + "print(\"pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg\"),round(vf_5KPa*(p6-p5),2)\n", + "h5=hf_5KPa;\n", + "print(\"h5 KJ/kg=\"),round(hf_5KPa,2)\n", + "h6=h5+(vf_5KPa*(p6-p5))\n", + "print(\"hence h6 in KJ/kg\"),round(h6,2)\n", + "(h2-h3)-(h6-h5)\n", + "print(\"net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg\"),round((h2-h3)-(h6-h5),2)\n", + "(h2-h6)\n", + "print(\"heat added=(h2-h6)in KJ/kg\"),round((h2-h6),2)\n", + "n_rankine=((h2-h3)-(h6-h5))/(h2-h6)\n", + "print(\"rankine cycle efficiency(n_rankine)=\"),round(n_rankine,2)\n", + "print(\"in percentage\"),round(n_rankine*100,2)\n", + "print(\"so n_rankine=36.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.3;pg no: 263" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.3, Page:263 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\n", + "from steam tables,h2=hg_40bar=3092.5 KJ/kg\n", + "s2=sg_40bar=6.5821 KJ/kg K\n", + "h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \n", + "s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "v4=vf_0.05bar=0.001005 m^3/kg\n", + "let the dryness fraction at state 3 be x3,\n", + "for ideal process,2-3,s2=s3\n", + "s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\n", + "so x3= 0.77\n", + "h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\n", + "for pumping process,\n", + "h1-h4=v4*deltap=v4*(p1-p4)\n", + "so h1=h4+v4*(p1-p4) in KJ/kg 141.83\n", + "pump work per kg of steam in KJ/kg 4.01\n", + "net work per kg of steam =(expansion work-pump work)per kg of steam\n", + "=(h2-h3)-(h1-h4) in KJ/kg= 1081.75\n", + "cycle efficiency=net work/heat added 0.37\n", + "in percentage 36.66\n", + "so net work per kg of steam=1081.74 KJ/kg\n", + "cycle efficiency=36.67%\n", + "pump work per kg of steam=4.02 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of net work per kg of steam,cycle efficiency,pump work per kg of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.3, Page:263 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\")\n", + "print(\"from steam tables,h2=hg_40bar=3092.5 KJ/kg\")\n", + "h2=3092.5;\n", + "print(\"s2=sg_40bar=6.5821 KJ/kg K\")\n", + "s2=6.5821;\n", + "print(\"h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \")\n", + "h4=137.82;\n", + "hfg=2423.7;\n", + "print(\"s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "s4=0.4764;\n", + "sfg=7.9187;\n", + "print(\"v4=vf_0.05bar=0.001005 m^3/kg\")\n", + "v4=0.001005;\n", + "print(\"let the dryness fraction at state 3 be x3,\")\n", + "print(\"for ideal process,2-3,s2=s3\")\n", + "s3=s2;\n", + "print(\"s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\")\n", + "x3=(s2-s4)/(sfg)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.7711;#approx.\n", + "print(\"h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\")\n", + "h3=h4+x3*hfg\n", + "print(\"for pumping process,\")\n", + "print(\"h1-h4=v4*deltap=v4*(p1-p4)\")\n", + "p1=40*100;#pressure of steam enter in turbine in mPa\n", + "p4=0.05*100;#pressure of steam leave turbine in mPa\n", + "h1=h4+v4*(p1-p4)\n", + "print(\"so h1=h4+v4*(p1-p4) in KJ/kg\"),round(h1,2)\n", + "(h1-h4)\n", + "print(\"pump work per kg of steam in KJ/kg\"),round((h1-h4),2)\n", + "print(\"net work per kg of steam =(expansion work-pump work)per kg of steam\")\n", + "(h2-h3)-(h1-h4)\n", + "print(\"=(h2-h3)-(h1-h4) in KJ/kg=\"),round((h2-h3)-(h1-h4),2)\n", + "print(\"cycle efficiency=net work/heat added\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"so net work per kg of steam=1081.74 KJ/kg\")\n", + "print(\"cycle efficiency=36.67%\")\n", + "print(\"pump work per kg of steam=4.02 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.4;pg no: 264" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.4, Page:264 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 4\n", + "Let us assume that the condensate leaves condenser as saturated liquid and the expansion in turbine and pumping processes are isentropic.\n", + "from steam tables,h2=h_20MPa=3238.2 KJ/kg\n", + "s2=6.1401 KJ/kg K\n", + "h5=h_0.005MPa in KJ/kg\n", + "from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+0.9*hfg in KJ/kg 2319.15\n", + "s5 in KJ/kg K= 7.6\n", + "h6=hf=137.82 KJ/kg\n", + "it is given that temperature at state 4 is 500 degree celcius and due to isentropic processes s4=s5=7.6032 KJ/kg K.The state 4 can be conveniently located on mollier chart by the intersection of 500 degree celcius constant temperature line and entropy value of 7.6032 KJ/kg K and the pressure and enthalpy obtained.but these shall be approximate.\n", + "The state 4 can also be located by interpolation using steam table.The entropy value of 7.6032 KJ/kg K lies between the superheated steam states given under,p=1.20 MPa,s at 1.20 MPa=7.6027 KJ/kg K\n", + "p=1.40 MPa,s at 1.40 MPa=7.6027 KJ/kg K\n", + "by interpolation state 4 lies at pressure=\n", + "=1.399,approx.=1.40 MPa\n", + "thus,steam leaves HP turbine at 1.40 MPa\n", + "enthalpy at state 4,h4=3474.1 KJ/kg\n", + "for process 2-33,s2=s3=6.1401 KJ/kg K.The state 3 thus lies in wet region as s3sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\n", + "From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\n", + "Let dryness fraction at state 9 be x9 so,\n", + "s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\n", + "from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\n", + "x9=(s9-sf)/sfg 0.95\n", + "h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\n", + "from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\n", + "Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\n", + "h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\n", + "h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\n", + "For process 4-8,i.e in CEP.\n", + "h8 in KJ/kg= 138.22\n", + "For process 11-12,i.e in FP2,\n", + "h12=h11+v11*(40-4)*10^2 in KJ/kg 608.64\n", + "For process 13-1_a i.e. in FP1,h1_a= in KJ/kg= 1107.34\n", + "m1*3141.81+(1-m1)*608.64=1087.31\n", + "so m1=(1087.31-608.64)/(3141.81-608.64)in kg\n", + "Applying energy balance on open feed water heater 1 (OFWH1)\n", + "m1*h10+(1-m1)*h12)=1*h13\n", + "so m1 in kg= 0.19\n", + "Applying energy balance on open feed water heater 2 (OFWH2)\n", + "m2*h9+(1-m1-m2)*h8=(1-m1)*h11\n", + "so m2 in kg= 0.15\n", + "Thermal efficiency of cycle,n= 0.51\n", + "W_CEP in KJ/kg steam from boiler= 0.26\n", + "W_FP1=(h1_a-h13)in KJ/kg of steam from boiler 20.0\n", + "W_FP2 in KJ/kg of steam from boiler= 3.17\n", + "W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler= 23.46\n", + "n= 0.51\n", + "in percentage 51.37\n", + "so cycle thermal efficiency,na=46.18%\n", + "nb=49.76%\n", + "nc=51.37%\n", + "hence it is obvious that efficiency increases with increase in number of feed heaters.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.6, Page:267 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 6\")\n", + "print(\"case (a) When there is no feed water heater\")\n", + "print(\"Thermal efficiency of cycle=((h2-h3)-(h1-h4))/(h2-h1)\")\n", + "print(\"from steam tables,h2=h at 200 bar,650oc=3675.3 KJ/kg,s2=s at 200 bar,650oc=6.6582 KJ/kg K,h4=hf at 0.05 bar=137.82 KJ/kg,v4=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h2=3675.3;\n", + "s2=6.6582;\n", + "h4=137.82;\n", + "v4=0.001005;\n", + "print(\"hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg,sf at 0.05 bar=0.4764 KJ/kg K,sfg at 0.05 bar=7.9187 KJ/kg K\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "print(\"For process 2-3,s2=s3.Let dryness fraction at 3 be x3.\")\n", + "s3=s2;\n", + "print(\"s3=6.6582=sf at 0.05 bar+x3*sfg at 0.05 bar\")\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.781;#approx.\n", + "print(\"h3=hf at 0.05 bar+x3*hfg at 0.05 bar in KJ/kg\")\n", + "h3=hf+x3*hfg\n", + "print(\"For pumping process 4-1,\")\n", + "print(\"h1-h4=v4*deltap\")\n", + "h1=h4+v4*(200-0.5)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2)\n", + "((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"case (b) When there is only one feed water heater working at 8 bar\")\n", + "print(\"here,let mass of steam bled for feed heating be m kg\")\n", + "print(\"For process 2-6,s2=s6=6.6582 KJ/kg K\")\n", + "s6=s2;\n", + "print(\"Let dryness fraction at state 6 be x6\")\n", + "print(\"s6=sf at 8 bar+x6*sfg at 8 bar\")\n", + "print(\"from steam tables,hf at 8 bar=721.11 KJ/kg,vf at 8 bar=0.001115 m^3/kg,hfg at 8 bar=2048 KJ/kg,sf at 8 bar=2.0462 KJ/kg K,sfg at 8 bar=4.6166 KJ/kg K\")\n", + "hf=721.11;\n", + "vf=0.001115;\n", + "hfg=2048;\n", + "sf=2.0462;\n", + "sfg=4.6166;\n", + "x6=(s6-sf)/sfg\n", + "print(\"substituting entropy values,x6=\"),round(x6,2)\n", + "x6=0.999;#approx.\n", + "print(\"h6=hf at at 8 bar+x6*hfg at 8 bar in KJ/kg\")\n", + "h6=hf+x6*hfg\n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at 8 bar.h7=hf at 8 bar=721.11 KJ/kg\")\n", + "h7=721.11;\n", + "h5=h4+v4*(8-.05)*10**2\n", + "print(\"For process 4-5,h5 in KJ/kg\"),round(h5,2)\n", + "print(\"Applying energy balance at open feed water heater,\")\n", + "print(\"m*h6+(1-m)*h5=1*h7\")\n", + "m=(h7-h5)/(h6-h5)\n", + "print(\"so m= in kg\"),round(m,2)\n", + "h7=hf;\n", + "v7=vf;\n", + "h1=h7+v7*(200-8)*10**2\n", + "print(\"For process 7-1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"here h7=hf at 8 bar,v7=vf at 8 bar\")\n", + "#TE=((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=0.4976\")\n", + "print(\"in percentage=49.76\")\n", + "print(\"case (c) When there are two feed water heaters working at 40 bar and 4 bar\")\n", + "print(\"here, let us assume the mass of steam at 40 bar,4 bar to be m1 kg and m2 kg respectively.\")\n", + "print(\"2-10-9-3,s2=s10=s9=s3=6.6582 KJ/kg K\")\n", + "s3=s2;\n", + "s9=s3;\n", + "s10=s9;\n", + "print(\"At state 10.s10>sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\")\n", + "print(\"From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\")\n", + "T10=370.6;\n", + "h10=3141.81;\n", + "print(\"Let dryness fraction at state 9 be x9 so,\") \n", + "print(\"s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\")\n", + "print(\"from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\")\n", + "sf=1.7766;\n", + "sfg=5.1193;\n", + "x9=(s9-sf)/sfg\n", + "print(\"x9=(s9-sf)/sfg\"),round(x9,2)\n", + "x9=0.9536;#approx.\n", + "print(\"h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\")\n", + "hf=604.74;\n", + "hfg=2133.8;\n", + "h9=hf+x9*hfg \n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\")\n", + "print(\"h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\")\n", + "h11=604.74;\n", + "v11=0.001084;\n", + "print(\"h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\")\n", + "h13=1087.31;\n", + "v13=0.001252;\n", + "print(\"For process 4-8,i.e in CEP.\")\n", + "h8=h4+v4*(4-0.05)*10**2\n", + "print(\"h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"For process 11-12,i.e in FP2,\")\n", + "h12=h11+v11*(40-4)*10**2\n", + "print(\"h12=h11+v11*(40-4)*10^2 in KJ/kg\"),round(h12,2)\n", + "h1_a=h13+v13*(200-40)*10**2\n", + "print(\"For process 13-1_a i.e. in FP1,h1_a= in KJ/kg=\"),round(h1_a,2)\n", + "print(\"m1*3141.81+(1-m1)*608.64=1087.31\")\n", + "print(\"so m1=(1087.31-608.64)/(3141.81-608.64)in kg\")\n", + "m1=(1087.31-608.64)/(3141.81-608.64)\n", + "print(\"Applying energy balance on open feed water heater 1 (OFWH1)\")\n", + "print(\"m1*h10+(1-m1)*h12)=1*h13\")\n", + "m1=(h13-h12)/(h10-h12)\n", + "print(\"so m1 in kg=\"),round(m1,2)\n", + "print(\"Applying energy balance on open feed water heater 2 (OFWH2)\")\n", + "print(\"m2*h9+(1-m1-m2)*h8=(1-m1)*h11\")\n", + "m2=(1-m1)*(h11-h8)/(h9-h8)\n", + "print(\"so m2 in kg=\"),round(m2,2)\n", + "W_CEP=(1-m1-m2)*(h8-h4)\n", + "W_FP1=(h1_a-h13)\n", + "W_FP2=(1-m1)*(h12-h11)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"Thermal efficiency of cycle,n=\"),round(n,2)\n", + "print(\"W_CEP in KJ/kg steam from boiler=\"),round(W_CEP,2)\n", + "print(\"W_FP1=(h1_a-h13)in KJ/kg of steam from boiler\"),round(W_FP1)\n", + "print(\"W_FP2 in KJ/kg of steam from boiler=\"),round(W_FP2,2)\n", + "W_CEP+W_FP1+W_FP2\n", + "print(\"W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler=\"),round(W_CEP+W_FP1+W_FP2,2)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so cycle thermal efficiency,na=46.18%\")\n", + "print(\"nb=49.76%\")\n", + "print(\"nc=51.37%\")\n", + "print(\"hence it is obvious that efficiency increases with increase in number of feed heaters.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.7;pg no: 272" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.7, Page:272 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\n", + "from steam tables,\n", + "h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\n", + "s3=s2=6.9759 KJ/kg K\n", + "by interpolation from steam tables,\n", + "T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\n", + "for expansion process 4-5,s4=s5=7.7938 KJ/kg K\n", + "let dryness fraction at state 5 be x5\n", + "s5=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x5= 0.92\n", + "h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "for process 6-1 in feed pump,h1 in KJ/kg= 142.84\n", + "cycle efficiency=W_net/Q_add\n", + "Wt in KJ/kg= 1510.35\n", + "W_pump=(h1-h6)in KJ/kg 5.02\n", + "W_net=Wt-W_pump in KJ/kg 1505.33\n", + "Q_add in KJ/kg= 3290.96\n", + "cycle efficiency= 0.4574\n", + "in percentage= 45.74\n", + "we know ,1 hp=0.7457 KW\n", + "specific steam consumption in kg/hp hr= 1.78\n", + "work ratio=net work/positive work 0.9967\n", + "so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,specific steam consumption,work ratio\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.7, Page:272 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\")\n", + "print(\"from steam tables,\")\n", + "print(\"h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\")\n", + "h2=3433.8;\n", + "s2=6.9759;\n", + "print(\"s3=s2=6.9759 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"by interpolation from steam tables,\")\n", + "print(\"T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\")\n", + "T3=183.14;\n", + "h3=2818.03;\n", + "h4=3271.9;\n", + "s4=7.7938;\n", + "print(\"for expansion process 4-5,s4=s5=7.7938 KJ/kg K\")\n", + "s5=s4;\n", + "print(\"let dryness fraction at state 5 be x5\")\n", + "print(\"s5=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.924;#approx.\n", + "print(\"h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "p1=50.;#steam generation pressure in bar\n", + "p6=0.05;#steam entering temperature in turbine in bar\n", + "h1=h6+v6*(p1-p6)*100\n", + "print(\"for process 6-1 in feed pump,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"cycle efficiency=W_net/Q_add\")\n", + "Wt=(h2-h3)+(h4-h5)\n", + "print(\"Wt in KJ/kg=\"),round(Wt,2)\n", + "W_pump=(h1-h6)\n", + "print(\"W_pump=(h1-h6)in KJ/kg\"),round(W_pump,2)\n", + "W_net=Wt-W_pump\n", + "print(\"W_net=Wt-W_pump in KJ/kg\"),round(W_net,2)\n", + "Q_add=(h2-h1)\n", + "print(\"Q_add in KJ/kg=\"),round(Q_add,2)\n", + "print(\"cycle efficiency=\"),round(W_net/Q_add,4)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"we know ,1 hp=0.7457 KW\")\n", + "print(\"specific steam consumption in kg/hp hr=\"),round(0.7457*3600/W_net,2)\n", + "print(\"work ratio=net work/positive work\"),round(W_net/Wt,4)\n", + "print(\"so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.8;pg no: 273" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.8, Page:273 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\n", + "from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\n", + "h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\n", + "Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\n", + "h8=hf at 3 bar=561.47 KJ/kg\n", + "for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\n", + "Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\n", + "s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\n", + "from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\n", + "so x3= 0.95\n", + "s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x4= 0.79\n", + "thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\n", + "here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\n", + "h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\n", + "pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\n", + "for mixing process between condenser and feed pump,\n", + "(1-m)*h5+m*h9=1*h6\n", + "h6=m(h9-h5)+h5\n", + "we get,h6=137.82+m*423.65\n", + "therefore h7=h6+6.02=143.84+m*423.65\n", + "Applying energy balance at closed feed water heater;\n", + "m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\n", + "so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\n", + "so m=0.144 kg\n", + "steam bled for feed heating=0.144 kg/kg steam generated\n", + "The net power output,W_net in KJ/kg steam generated= 1167.27\n", + "mass of steam required to be generated in kg/s= 26.23\n", + "or in kg/hr\n", + "so capacity of boiler required=94428 kg/hr\n", + "overall thermal efficiency=W_net/Q_add\n", + "here Q_add in KJ/kg= 3134.56\n", + "overall thermal efficiency= 0.37\n", + "in percentage= 37.24\n", + "so overall thermal efficiency=37.24%\n" + ] + } + ], + "source": [ + "#cal of mass of steam bled for feed heating,capacity of boiler required,overall thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.8, Page:273 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\")\n", + "T_cond=115;#condensate temperature in degree celcius\n", + "Cp=4.18;#specific heat at constant pressure in KJ/kg K\n", + "P=30*10**3;#actual alternator output in KW\n", + "n_boiler=0.9;#boiler efficiency\n", + "n_alternator=0.98;#alternator efficiency\n", + "print(\"from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\")\n", + "h2=3301.8;\n", + "s2=6.7193;\n", + "print(\"h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h5=137.82;\n", + "v5=0.001005;\n", + "print(\"Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\")\n", + "print(\"h8=hf at 3 bar=561.47 KJ/kg\")\n", + "h8=561.47;\n", + "print(\"for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "print(\"Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\")\n", + "print(\"s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\")\n", + "print(\"from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\")\n", + "sf_3bar=1.6718;\n", + "sfg_3bar=5.3201;\n", + "x3=(s3-sf_3bar)/sfg_3bar\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.949;#approx.\n", + "print(\"s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.788;#approx.\n", + "print(\"thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\")\n", + "print(\"here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\")\n", + "hf_3bar=561.47;\n", + "hfg_3bar=2163.8;\n", + "h3=hf_3bar+x3*hfg_3bar \n", + "print(\"h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h4=hf+x4*hfg\n", + "print(\"assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\")\n", + "h9=h8;\n", + "v6=v5;\n", + "print(\"pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\")\n", + "p1=60;#pressure of steam in high pressure turbine in bar\n", + "p5=0.05;#pressure of steam in low pressure turbine in bar\n", + "v5*(p1-p5)*100\n", + "print(\"for mixing process between condenser and feed pump,\")\n", + "print(\"(1-m)*h5+m*h9=1*h6\")\n", + "print(\"h6=m(h9-h5)+h5\")\n", + "print(\"we get,h6=137.82+m*423.65\")\n", + "print(\"therefore h7=h6+6.02=143.84+m*423.65\")\n", + "print(\"Applying energy balance at closed feed water heater;\")\n", + "print(\"m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\")\n", + "print(\"so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\")\n", + "print(\"so m=0.144 kg\")\n", + "m=0.144;\n", + "h6=137.82+m*423.65;\n", + "h7=143.84+m*423.65;\n", + "print(\"steam bled for feed heating=0.144 kg/kg steam generated\")\n", + "W_net=(h2-h3)+(1-m)*(h3-h4)-(1-m)*(h7-h6)\n", + "print(\"The net power output,W_net in KJ/kg steam generated=\"),round(W_net,2)\n", + "P/(n_alternator*W_net)\n", + "print(\"mass of steam required to be generated in kg/s=\"),round(P/(n_alternator*W_net),2)\n", + "print(\"or in kg/hr\")\n", + "26.23*3600\n", + "print(\"so capacity of boiler required=94428 kg/hr\")\n", + "print(\"overall thermal efficiency=W_net/Q_add\")\n", + "Q_add=(h2-Cp*T_cond)/n_boiler\n", + "print(\"here Q_add in KJ/kg=\"),round(Q_add,2) \n", + "W_net/Q_add\n", + "print(\"overall thermal efficiency=\"),round(W_net/Q_add,2)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"so overall thermal efficiency=37.24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.9;pg no: 275" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.9, Page:275 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\n", + "At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\n", + "For ideal expansion process,s2=s3\n", + "By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\n", + "actual stste at exit of first stage,h3_a in KJ/kg= 2909.88\n", + "actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K= 7.1075\n", + "for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "so x4= 0.96\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "actual enthalpy at exit from second stage,h4_a in KJ/kg= 2646.48\n", + "actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\n", + "so x4_a= 0.99\n", + "x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\n", + "for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5= 0.87\n", + "h5=2270.43 KJ/kg\n", + "actual enthalpy at exit from third stage,h5_a in KJ/kg= 2345.64\n", + "Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\n", + "By heat balance on first closed feed water heater,(see schematic arrangement)\n", + "h11=hf at 6 bar=670.56 KJ\n", + "m1*h3_a+h10=m1*h11+4.18*150\n", + "(m1*2829.63)+h10=(m1*670.56)+627\n", + "h10+2159.07*m1=627\n", + "By heat balance on second closed feed water heater,(see schematic arrangement)\n", + "h7=hf at 1 bar=417.46 KJ/kg\n", + "m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\n", + "m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\n", + "m2*2467.27-m1*179.2-238.26=0\n", + "heat balance at point of mixing,\n", + "h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\n", + "neglecting pump work,h7=h8\n", + "h10=m2*417.46+(1-m1-m2)*397.1\n", + "substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\n", + "Turbine output per kg of steam generated,Wt in KJ/kg of steam generated= 780.445\n", + "Rate of steam generation required in kg/s= 19.22\n", + "in kg/hr\n", + "capacity of drain pump i.e. FP shown in layout in kg/hr= 16273.96\n", + "so capacity of drain pump=16273.96 kg/hr\n" + ] + } + ], + "source": [ + "#cal of capacity of drain pump\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.9, Page:275 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\")\n", + "P=15*10**3;#turbine output in KW\n", + "print(\"At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\")\n", + "h2=3230.9;\n", + "s2=6.9212;\n", + "print(\"For ideal expansion process,s2=s3\")\n", + "s3=s2;\n", + "print(\"By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\")\n", + "T3=190.97;\n", + "h3=2829.63;\n", + "h3_a=h2-0.8*(h2-h3)\n", + "print(\"actual stste at exit of first stage,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "s3_a=7.1075;\n", + "print(\"actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K=\"),round(s3_a,4)\n", + "print(\"for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\")\n", + "s4=7.1075;\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.958;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "h4_a=h3_a-.8*(h3_a-h4)\n", + "print(\"actual enthalpy at exit from second stage,h4_a in KJ/kg=\"),round(h4_a,2)\n", + "print(\"actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\")\n", + "x4_a=(h4_a-hf)/hfg\n", + "print(\"so x4_a=\"),round(x4_a,2)\n", + "print(\"x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\")\n", + "s4_a=7.2806;\n", + "print(\"for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s4_a-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.8735;#approx.\n", + "print(\"h5=2270.43 KJ/kg\")\n", + "h5=2270.43;\n", + "h5_a=h4_a-0.8*(h4_a-h5)\n", + "print(\"actual enthalpy at exit from third stage,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\")\n", + "print(\"By heat balance on first closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h11=hf at 6 bar=670.56 KJ\")\n", + "h11=670.56;\n", + "print(\"m1*h3_a+h10=m1*h11+4.18*150\")\n", + "print(\"(m1*2829.63)+h10=(m1*670.56)+627\")\n", + "print(\"h10+2159.07*m1=627\")\n", + "print(\"By heat balance on second closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h7=hf at 1 bar=417.46 KJ/kg\")\n", + "h7=417.46;\n", + "print(\"m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\")\n", + "print(\"m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\")\n", + "print(\"m2*2467.27-m1*179.2-238.26=0\")\n", + "print(\"heat balance at point of mixing,\")\n", + "print(\"h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\")\n", + "print(\"neglecting pump work,h7=h8\")\n", + "print(\"h10=m2*417.46+(1-m1-m2)*397.1\")\n", + "print(\"substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\")\n", + "m1=0.1293;\n", + "m2=0.1059;\n", + "Wt=(h2-h3_a)+(1-m1)*(h3_a-h4_a)+(1-m1-m2)*(h4_a-h5_a)\n", + "print(\"Turbine output per kg of steam generated,Wt in KJ/kg of steam generated=\"),round(Wt,3)\n", + "P/Wt\n", + "print(\"Rate of steam generation required in kg/s=\"),round(P/Wt,2)\n", + "print(\"in kg/hr\")\n", + "P*3600/Wt\n", + "(m1+m2)*69192\n", + "print(\"capacity of drain pump i.e. FP shown in layout in kg/hr=\"),round((m1+m2)*69192,2)\n", + "print(\"so capacity of drain pump=16273.96 kg/hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.10;pg no: 277" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.10, Page:277 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\n", + "at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\n", + "By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\n", + "actual enthapy at 3_a,h3_a in KJ/kg= 3097.0\n", + "enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\n", + "for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\n", + "s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x6= 0.83\n", + "h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "for actual expansion process in LP turbine.\n", + "h6_a=h4-0.85*(h4-h6) in KJ/kg 2319.4\n", + "Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\n", + "s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\n", + "from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\n", + "so x5= 1.0\n", + "h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\n", + "from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\n", + "actual enthalpy,h5_a in KJ/kg= 2790.16\n", + "enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\n", + "specific volume at inlet of CEP,v7=0.001008 m^3/kg\n", + "enthalpy at inlet of CEP,h7=168.79 KJ/kg\n", + "for pumping process 7-8,h8 in KJ/kg= 169.15\n", + "Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\n", + "m*h5+(1-m)*h8=h9\n", + "so m in kg /kg of steam generated= 0.33\n", + "For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\n", + "h1= in KJ/kg= 1015.59\n", + "Net work per kg of steam generated,W_net=in KJ/kg steam generated= 938.83\n", + "heat added per kg of steam generated,q_add in KJ/kg of steam generated= 2405.41\n", + "Thermal efficiency,n= 0.39\n", + "in percentage= 39.03\n", + "so thermal efficiency=39.03%%\n", + "NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.10, Page:277 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\")\n", + "print(\"at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\")\n", + "h2=3287.1;\n", + "s2=6.6327;\n", + "print(\"By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\")\n", + "h3=3049.48;\n", + "h3_a=h2-0.80*(h2-h3)\n", + "print(\"actual enthapy at 3_a,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "print(\"enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\")\n", + "h4=3230.9;\n", + "s4=6.9212;\n", + "print(\"for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\")\n", + "s6=s4;\n", + "print(\"s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x6=(s6-sf)/sfg\n", + "print(\"so x6=\"),round(x6,2)\n", + "x6=0.827;#approx.\n", + "print(\"h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h6=hf+x6*hfg\n", + "print(\"for actual expansion process in LP turbine.\")\n", + "h6_a=h4-0.85*(h4-h6)\n", + "print(\"h6_a=h4-0.85*(h4-h6) in KJ/kg\"),round(h6_a,2)\n", + "print(\"Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\")\n", + "p5=3.61;\n", + "s5=s4;\n", + "print(\"s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\")\n", + "print(\"from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\")\n", + "sf=1.7391;\n", + "sfg=5.1908;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.99;#approx.\n", + "print(\"h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\")\n", + "print(\"from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\")\n", + "hf=589.13;\n", + "hfg=2144.7;\n", + "h5=hf+x5*hfg\n", + "h5_a=h4-0.85*(h4-h5)\n", + "print(\"actual enthalpy,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\")\n", + "h9=1008.42;\n", + "print(\"specific volume at inlet of CEP,v7=0.001008 m^3/kg\")\n", + "v7=0.001008;\n", + "print(\"enthalpy at inlet of CEP,h7=168.79 KJ/kg\")\n", + "h7=168.79;\n", + "h8=h7+v7*(3.61-0.075)*10**2\n", + "print(\"for pumping process 7-8,h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\")\n", + "print(\"m*h5+(1-m)*h8=h9\")\n", + "m=(h9-h8)/(h5-h8)\n", + "print(\"so m in kg /kg of steam generated=\"),round(m,2)\n", + "print(\"For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\")\n", + "v9=0.00108;\n", + "h1=h9+v9*(70-3.61)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2) \n", + "W_net=(h2-h3_a)+(h4-h5_a)+(1-m)*(h5_a-h6_a)-((1-m)*(h8-h7)+(h1-h9))\n", + "print(\"Net work per kg of steam generated,W_net=in KJ/kg steam generated=\"),round(W_net,2)\n", + "q_add=(h2-h1)+(h4-h3_a)\n", + "print(\"heat added per kg of steam generated,q_add in KJ/kg of steam generated=\"),round(q_add,2)\n", + "n=W_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"in percentage=\"),round(n,2)\n", + "print(\"so thermal efficiency=39.03%%\")\n", + "print(\"NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.11;pg no: 279" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.11, Page:279 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\n", + "Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\n", + "for isentropic expansion 2-3-4-5,s2=s3=s4=s5\n", + "Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\n", + "s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\n", + "so x3=(s3-sf)/sfg\n", + "from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\n", + "h3=hf+x3*hfg in KJ/kg\n", + "from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\n", + "s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\n", + "so h4=hf+x4*hfg in KJ/kg\n", + "from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\n", + "s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\n", + "h8=hf at 1.5 bar=467.11 KJ/kg\n", + "v8=0.001053 m^3/kg=vf at 1.5 bar\n", + "h9=h8+v8*(150-1.5)*10^2 in KJ/kg\n", + "h10=hf at 150 bar=1610.5 KJ/kg\n", + "v10=0.001658 m^3/kg=vf at 150 bar\n", + "h12=h10+v10*(150-10)*10^2 in KJ/kg\n", + "Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\n", + "Heat balance on closed feed water heater yields,\n", + "m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\n", + "so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\n", + "heat balance on open feed water can be given as under,\n", + "m2*h4+(1-m1-m2)*h7=(1-m1)*h8\n", + "so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\n", + "for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\n", + "For mixing after closed feed water heater,\n", + "h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\n", + "Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\n", + "heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\n", + "cycle thermal efficiency,n=W_net/q_add 0.48\n", + "in percentage 47.59\n", + "Net power developed in KW=1219*300 in KW 365700.0\n", + "cycle thermal efficiency=47.6%\n", + "Net power developed=365700 KW\n" + ] + } + ], + "source": [ + "#cal of cycle thermal efficiency,Net power developed\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.11, Page:279 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\")\n", + "print(\"Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\")\n", + "h2=3308.6;\n", + "s2=6.3443;\n", + "print(\"for isentropic expansion 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\")\n", + "print(\"s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\")\n", + "print(\"so x3=(s3-sf)/sfg\")\n", + "print(\"from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\")\n", + "sf=2.1387;\n", + "sfg=4.4478;\n", + "x3=(s3-sf)/sfg\n", + "x3=0.945;#approx.\n", + "print(\"h3=hf+x3*hfg in KJ/kg\")\n", + "print(\"from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\")\n", + "hf=762.81;\n", + "hfg=2015.3;\n", + "h3=hf+x3*hfg\n", + "print(\"s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\")\n", + "sf=1.4336;\n", + "sfg=5.7897;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.848;#approx.\n", + "print(\"so h4=hf+x4*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\")\n", + "hf=467.11;\n", + "hfg=2226.5;\n", + "h4=hf+x4*hfg\n", + "print(\"s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.739;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "print(\"h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\")\n", + "h7=h6+v6*(1.5-0.05)*10**2\n", + "print(\"h8=hf at 1.5 bar=467.11 KJ/kg\")\n", + "h8=467.11; \n", + "print(\"v8=0.001053 m^3/kg=vf at 1.5 bar\")\n", + "v8=0.001053;\n", + "print(\"h9=h8+v8*(150-1.5)*10^2 in KJ/kg\")\n", + "h9=h8+v8*(150-1.5)*10**2\n", + "print(\"h10=hf at 150 bar=1610.5 KJ/kg\")\n", + "h10=1610.5; \n", + "print(\"v10=0.001658 m^3/kg=vf at 150 bar\")\n", + "v10=0.001658;\n", + "print(\"h12=h10+v10*(150-10)*10^2 in KJ/kg\")\n", + "h12=h10+v10*(150-10)*10**2\n", + "print(\"Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"Heat balance on closed feed water heater yields,\")\n", + "print(\"m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\")\n", + "print(\"so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\")\n", + "m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)\n", + "print(\"heat balance on open feed water can be given as under,\")\n", + "print(\"m2*h4+(1-m1-m2)*h7=(1-m1)*h8\")\n", + "print(\"so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\")\n", + "m2=((1-m1)*(h8-h7))/(h4-h7)\n", + "print(\"for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\")\n", + "print(\"For mixing after closed feed water heater,\")\n", + "print(\"h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\")\n", + "h1=(4.18*150)*(1-m1)+m1*h12\n", + "print(\"Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\")\n", + "print(\"W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\")\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10)))\n", + "print(\"heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\")\n", + "q_add=(h2-h1)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=W_net/q_add\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"Net power developed in KW=1219*300 in KW\"),round(1219*300,2)\n", + "print(\"cycle thermal efficiency=47.6%\")\n", + "print(\"Net power developed=365700 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.12;pg no: 282" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.12, Page:282 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\n", + "At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\n", + "state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\n", + "since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\n", + "At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "At state 3,h3=2930.57 KJ/kg\n", + "At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\n", + "At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\n", + "From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\n", + "Let dryness fraction at state 5_a be x5,\n", + "s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5_a=(s5_a-sf)/sfg\n", + "h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\n", + "m1_a*h3+h9=m1*h10+4.18*200\n", + "so m1_a=(4.18*200-h9)/(h3-h10) in kg\n", + "Applying heat balance at open feed water heater,\n", + "m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\n", + "so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\n", + "Net work per kg steam generated\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\n", + "Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\n", + "Thermal efficiency,n= 0.45\n", + "in percentage 45.04\n", + "% increase in thermal efficiency due to reheating= 0.56\n", + "so thermal efficiency of reheat cycle=45.03%\n", + "% increase in efficiency due to reheating=0.56%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,steam generation rate\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.12, Page:282 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\")\n", + "P=100*10**3;#net power output in KW\n", + "print(\"At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\")\n", + "T3=261.6;\n", + "h3=2930.57;\n", + "print(\"since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\")\n", + "print(\"At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"At state 3,h3=2930.57 KJ/kg\")\n", + "h3=2930.57;\n", + "print(\"At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\")\n", + "h3_a=3247.6;\n", + "s3_a=7.1271;\n", + "print(\"At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\")\n", + "s4_a=s3_a;\n", + "s5_a=s4_a;\n", + "print(\"From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\")\n", + "h4_a=2841.02;\n", + "print(\"Let dryness fraction at state 5_a be x5,\")\n", + "print(\"s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "print(\"so x5_a=(s5_a-sf)/sfg\")\n", + "x5_a=(s5_a-sf)/sfg\n", + "x5_a=0.853;#approx.\n", + "print(\"h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "h5_a=hf+x5_a*hfg\n", + "print(\"Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\")\n", + "print(\"m1_a*h3+h9=m1*h10+4.18*200\")\n", + "print(\"so m1_a=(4.18*200-h9)/(h3-h10) in kg\")\n", + "m1_a=(4.18*200-h9)/(h3-h10)\n", + "m1_a=0.114;#approx.\n", + "print(\"Applying heat balance at open feed water heater,\")\n", + "print(\"m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\")\n", + "print(\"so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\")\n", + "m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7)\n", + "m2_a=0.131;#approx.\n", + "print(\"Net work per kg steam generated\")\n", + "print(\"w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\")\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-((1-m1_a-m2_a)*(h7-h6)+(h9-h8))\n", + "print(\"Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\")\n", + "q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)\n", + "n=w_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"% increase in thermal efficiency due to reheating=\"),round((0.4503-0.4478)*100/0.4478,2)\n", + "print(\"so thermal efficiency of reheat cycle=45.03%\")\n", + "print(\"% increase in efficiency due to reheating=0.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.13;pg no: 286" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.13, Page:286 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\n", + "For mercury cycle,\n", + "insentropic heat drop=349-234.5 in KJ/kg Hg\n", + "actual heat drop=0.85*114.5 in KJ/kg Hg\n", + "Heat rejected in condenser=(349-97.325-35)in KJ/kg\n", + "heat added in boiler=349-35 in KJ/kg\n", + "For steam cycle,\n", + "Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\n", + "Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\n", + "Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\n", + "Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\n", + "Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\n", + "for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\n", + "state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\n", + "state 4 lies in wet region,say with dryness fraction x4\n", + "s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "Let state 5 lie in wet region with dryness fraction x5,\n", + "s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\n", + "h7=h6+v6*(1-0.075)*10^2 in KJ/kg\n", + "from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\n", + "h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\n", + "Applying heat balance on CFWH1,T1=150oc and also T15=150oc\n", + "m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\n", + "(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\n", + "Applying heat balance on CFEH2,T11=90oc\n", + "m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\n", + "(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\n", + "Heat balance at mixing between CFWH1 and CFWH2,\n", + "(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\n", + "376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\n", + "For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\n", + "from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\n", + "solving above equations,we get\n", + "m1=0.102 kg per kg steam generated\n", + "m2=0.073 kg per kg steam generated\n", + "pump work in process 13-14,h14-h13=v13*(40-8)*10^2\n", + "so h14-h13 in KJ/kg\n", + "Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\n", + "net work per kg of steam,w_net=w_mercury+w_steam\n", + "w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\n", + "thermal efficiency of binary vapour cycle=w_net/q_add 0.55\n", + "in percentage 55.36\n", + "so thermal efficiency=55.36%\n", + "NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.13, Page:286 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\")\n", + "print(\"For mercury cycle,\")\n", + "print(\"insentropic heat drop=349-234.5 in KJ/kg Hg\")\n", + "349-234.5\n", + "print(\"actual heat drop=0.85*114.5 in KJ/kg Hg\")\n", + "0.85*114.5\n", + "print(\"Heat rejected in condenser=(349-97.325-35)in KJ/kg\")\n", + "(349-97.325-35)\n", + "print(\"heat added in boiler=349-35 in KJ/kg\")\n", + "349-35\n", + "print(\"For steam cycle,\")\n", + "print(\"Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\")\n", + "h=2767.13;\n", + "print(\"Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\")\n", + "h2=3330.3;\n", + "print(\"Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\")\n", + "s2=6.9363;\n", + "print(\"Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\")\n", + "h-4.18*150\n", + "print(\"Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\")\n", + "2140.13/216.675\n", + "print(\"for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\")\n", + "h3=2899.23;\n", + "print(\"state 4 lies in wet region,say with dryness fraction x4\")\n", + "print(\"s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.93;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "print(\"Let state 5 lie in wet region with dryness fraction x5,\")\n", + "print(\"s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.828;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h5=hf+x5*hfg\n", + "print(\"Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"h7=h6+v6*(1-0.075)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\")\n", + "h6=168.79;\n", + "v6=0.001008;\n", + "h7=h6+v6*(1-0.075)*10**2\n", + "print(\"h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\")\n", + "h9=417.46;\n", + "h13=721.11;\n", + "print(\"Applying heat balance on CFWH1,T1=150oc and also T15=150oc\")\n", + "T1=150;\n", + "T15=150;\n", + "print(\"m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\")\n", + "print(\"(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\")\n", + "print(\"Applying heat balance on CFEH2,T11=90oc\")\n", + "T11=90;\n", + "print(\"m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\")\n", + "print(\"(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\")\n", + "print(\"Heat balance at mixing between CFWH1 and CFWH2,\")\n", + "print(\"(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\")\n", + "print(\"376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\")\n", + "print(\"For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\")\n", + "h9=417.46;\n", + "v9=0.001043;\n", + "h10=h9+v9*(8-1)*10**2 \n", + "print(\"solving above equations,we get\")\n", + "print(\"m1=0.102 kg per kg steam generated\")\n", + "print(\"m2=0.073 kg per kg steam generated\")\n", + "m1=0.102;\n", + "m2=0.073;\n", + "print(\"pump work in process 13-14,h14-h13=v13*(40-8)*10^2\")\n", + "print(\"so h14-h13 in KJ/kg\")\n", + "v13=0.001252;\n", + "v13*(40-8)*10**2\n", + "print(\"Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\")\n", + "q_add=(9.88*314)+(3330.3-2767.13)\n", + "print(\"net work per kg of steam,w_net=w_mercury+w_steam\")\n", + "print(\"w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\")\n", + "w_net=(9.88*97.325)+((h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*4.006)\n", + "print(\"thermal efficiency of binary vapour cycle=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so thermal efficiency=55.36%\")\n", + "print(\"NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.14;pg no: 288" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.14, Page:288 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\n", + "This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\n", + "For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\n", + "ideally, s2=s1=6.7664 KJ/kg K\n", + "s2=sf at 0.075 bar +x3* sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x3=(s2-sf)/sfg\n", + "h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\n", + "for LP:at inlet of LP steam\n", + "h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\n", + "Enthalpy at exit,h_3LP=2222.34 KJ/kg\n", + "actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\n", + "HP steam consumption at full load=P*0.7457/h_HP in kg/s\n", + "HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\n", + "LP steam consumption at full load=P*0.7457/h_LP in kg/s\n", + "LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\n", + "The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\n", + "or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\n", + "Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\n", + "x=load,hp\n", + "y_HP=m_HP*x+C_HP\n", + "0.254=m_HP*0+C_HP\n", + "so C_HP=0.254\n", + "2.54=m_HP*2500+C_HP\n", + "so m_HP=(2.54-C_HP)/2500\n", + "so y_HP=9.144*10^-4*x_HP+0.254\n", + "Willans line for LP:y_LP=m_LP*x_LP+C_LP\n", + "0.481=m_LP*0+C_LP\n", + "so C_LP=0.481\n", + "4.81=m_LP*2500+C_LP\n", + "so m_LP=(4.81-C_LP)/2500\n", + "so y_LP=1.732*10^-3*x_LP+0.481\n", + "Total output(load) from mixed turbine,x=x_HP+x_LP\n", + "For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\n", + "from y_LP=1.732*10^-3*x_LP+0.481,\n", + "x_LP=(y_LP-0.481)/1.732*10^-3\n", + "since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\n", + "from y_HP=9.144*10^-4*x_HP+C_HP in kg/s 0.63\n", + "so HP steam requirement=0.63 kg/s\n" + ] + } + ], + "source": [ + "#cal of HP steam required\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.14, Page:288 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\")\n", + "n=0.8;#efficiency of both HP and LP turbine\n", + "P=2500;#output in hp\n", + "print(\"This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\")\n", + "print(\"For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\")\n", + "h1=3023.5;\n", + "s1=6.7664;\n", + "print(\"ideally, s2=s1=6.7664 KJ/kg K\")\n", + "s2=s1;\n", + "print(\"s2=sf at 0.075 bar +x3* sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x3=(s2-sf)/sfg\")\n", + "x3=(s2-sf)/sfg\n", + "x3=0.806;#approx.\n", + "print(\"h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0; \n", + "h_3HP=hf+x3*hfg\n", + "print(\"actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\")\n", + "h_HP=(h1-h_3HP)*n\n", + "print(\"for LP:at inlet of LP steam\")\n", + "print(\"h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\")\n", + "h2=2706.7;\n", + "s2=7.1271;\n", + "print(\"Enthalpy at exit,h_3LP=2222.34 KJ/kg\")\n", + "h_3LP=2222.34;\n", + "print(\"actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\")\n", + "h_LP=(h2-h_3LP)*n\n", + "print(\"HP steam consumption at full load=P*0.7457/h_HP in kg/s\")\n", + "P*0.7457/h_HP\n", + "print(\"HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\")\n", + "0.10*(P*0.7457/h_HP)\n", + "print(\"LP steam consumption at full load=P*0.7457/h_LP in kg/s\")\n", + "P*0.7457/h_LP\n", + "print(\"LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\")\n", + "0.10*(P*0.7457/h_LP)\n", + "print(\"The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\")\n", + "print(\"or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\")\n", + "print(\"Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\")\n", + "print(\"x=load,hp\")\n", + "print(\"y_HP=m_HP*x+C_HP\")\n", + "print(\"0.254=m_HP*0+C_HP\")\n", + "print(\"so C_HP=0.254\")\n", + "C_HP=0.254;\n", + "print(\"2.54=m_HP*2500+C_HP\")\n", + "print(\"so m_HP=(2.54-C_HP)/2500\")\n", + "m_HP=(2.54-C_HP)/2500\n", + "print(\"so y_HP=9.144*10^-4*x_HP+0.254\")\n", + "print(\"Willans line for LP:y_LP=m_LP*x_LP+C_LP\")\n", + "print(\"0.481=m_LP*0+C_LP\")\n", + "print(\"so C_LP=0.481\")\n", + "C_LP=0.481;\n", + "print(\"4.81=m_LP*2500+C_LP\")\n", + "print(\"so m_LP=(4.81-C_LP)/2500\")\n", + "m_LP=(4.81-C_LP)/2500\n", + "print(\"so y_LP=1.732*10^-3*x_LP+0.481\")\n", + "print(\"Total output(load) from mixed turbine,x=x_HP+x_LP\")\n", + "print(\"For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\")\n", + "y_LP=1.5;\n", + "print(\"from y_LP=1.732*10^-3*x_LP+0.481,\")\n", + "print(\"x_LP=(y_LP-0.481)/1.732*10^-3\")\n", + "x_LP=(y_LP-0.481)/(1.732*10**-3)\n", + "print(\"since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\")\n", + "x_HP=411.66;\n", + "y_HP=9.144*10**-4*x_HP+C_HP\n", + "print(\"from y_HP=9.144*10^-4*x_HP+C_HP in kg/s\"),round(y_HP,2)\n", + "print(\"so HP steam requirement=0.63 kg/s\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.15;pg no: 289" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.15, Page:289 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\n", + "Let us carry out analysis for 1 kg of steam generated in boiler.\n", + "Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\n", + "state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\n", + "Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\n", + "so x3= 0.86\n", + "from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\n", + "h3=2404.94 KJ/kg\n", + "If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\n", + "mass of moisture retained in separator(m)=(1-x3)*0.5 kg\n", + "Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\n", + "Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\n", + "Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\n", + "(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\n", + "so T in degree celcius= 68.425\n", + "so temperature of water leaving hotwell=68.425 degree celcius\n", + "Applying heat balanced on trap\n", + "0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\n", + "so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\n", + "from steam tables,at 2 bar,hf=504.70 KJ/kg\n", + "Therefore,heat transferred in process heater in KJ/kg steam generated= 1023.172\n", + "so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\n", + "For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\n", + "Let dryness fraction be x10\n", + "s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x10=(s10-sf)/sfg\n", + "h10=hf at 0.075 bar+x10*hfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "so h10=hf+x10*hfg in KJ/kg \n", + "net work output,neglecting pump work per kg of steam generated,\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\n", + "Heat added in boiler per kg steam generated,q_add in KJ/kg= 2674.68\n", + "thermal efficiency=w_net/q_add 0.28\n", + "in percentage 27.59\n", + "so Thermal efficiency=27.58%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,heat transferred and temperature\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.15, Page:289 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\")\n", + "print(\"Let us carry out analysis for 1 kg of steam generated in boiler.\")\n", + "print(\"Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\")\n", + "h2=2960.7;\n", + "s2=6.3615;\n", + "print(\"state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\")\n", + "sf=1.5301;\n", + "sfg=5.5970;\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "print(\"from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\")\n", + "x3=0.863;#approx.\n", + "print(\"h3=2404.94 KJ/kg\")\n", + "h3=2404.94;\n", + "print(\"If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\")\n", + "print(\"mass of moisture retained in separator(m)=(1-x3)*0.5 kg\")\n", + "m=(1-x3)*0.5\n", + "print(\"Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\")\n", + "m_LP=0.5-m\n", + "print(\"Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\")\n", + "print(\"Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\")\n", + "print(\"(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\")\n", + "T=((0.5685*4.18*90)+(0.4315*4.18*40))/4.18\n", + "print(\"so T in degree celcius=\"),round(T,3)\n", + "print(\"so temperature of water leaving hotwell=68.425 degree celcius\")\n", + "print(\"Applying heat balanced on trap\")\n", + "print(\"0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\")\n", + "print(\"so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\")\n", + "print(\"from steam tables,at 2 bar,hf=504.70 KJ/kg\")\n", + "hf=504.70;\n", + "h7=((0.5685*4.18*90)-(0.0685*hf))/0.5\n", + "print(\"Therefore,heat transferred in process heater in KJ/kg steam generated=\"),round(0.5*(h3-h7),3)\n", + "print(\"so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\")\n", + "print(\"For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\")\n", + "s10=s3;\n", + "print(\"Let dryness fraction be x10\")\n", + "print(\"s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x10=(s10-sf)/sfg\")\n", + "x10=(s10-sf)/sfg\n", + "x10=0.754;#approx.\n", + "print(\"h10=hf at 0.075 bar+x10*hfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "print(\"so h10=hf+x10*hfg in KJ/kg \")\n", + "h10=hf+x10*hfg \n", + "print(\"net work output,neglecting pump work per kg of steam generated,\")\n", + "print(\"w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\")\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) \n", + "q_add=(h2-4.18*68.425)\n", + "print(\"Heat added in boiler per kg steam generated,q_add in KJ/kg=\"),round(q_add,2)\n", + "w_net/q_add\n", + "print(\"thermal efficiency=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so Thermal efficiency=27.58%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.16;pg no: 291" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.16, Page:291 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\n", + "from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\n", + "Assuming isentropic expansion in nozzle,s1=s2=6.9486\n", + "Letdryness fraction at state 2,x2=0.864\n", + "s2=sf at 0.2 bar+x2*sfg at 0.2 bar\n", + "from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\n", + "so x2= 0.86\n", + "hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\n", + "from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\n", + "considering pump work to be of isentropic type,deltah_34=v3*deltap_34\n", + "from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\n", + "or deltah_34 in KJ/kg= 7.1\n", + "pump work,Wp in KJ/kg= 7.1\n", + "turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\n", + "net work(W_net)=Wt-Wp in KJ/kg\n", + "power produced(P)=mass flow rate*W_net in KJ/s\n", + "so net power=43.22 MW\n", + "heat supplied in boiler(Q)=(h1-h4) in KJ/kg\n", + "enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\n", + "total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s 114534.05\n", + "thermal efficiency=net work/heat supplied=W_net/Q 0.38\n", + "in percentage 37.73\n", + "so thermal efficiency=37.73%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net power\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.16, Page:291 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\")\n", + "m=35;#mass flow rate in kg/s\n", + "print(\"from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\")\n", + "h1=3530.9;\n", + "s1=6.9486;\n", + "print(\"Assuming isentropic expansion in nozzle,s1=s2=6.9486\")\n", + "s2=s1;\n", + "print(\"Letdryness fraction at state 2,x2=0.864\")\n", + "print(\"s2=sf at 0.2 bar+x2*sfg at 0.2 bar\")\n", + "print(\"from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\")\n", + "sf=0.8320;\n", + "sfg=7.0766;\n", + "x2=(s2-sf)/sfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "x2=0.864;#approx.\n", + "print(\"hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\")\n", + "hf=251.4;\n", + "hfg=2358.3;\n", + "h2=hf+x2*hfg\n", + "print(\"considering pump work to be of isentropic type,deltah_34=v3*deltap_34\")\n", + "print(\"from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\")\n", + "v3=0.001017;\n", + "p3=70;#;pressure of steam entering turbine in bar\n", + "p4=0.20;#condenser pressure in bar\n", + "deltah_34=v3*(p3-p4)*100\n", + "print(\"or deltah_34 in KJ/kg=\"),round(deltah_34,2)\n", + "Wp=deltah_34\n", + "print(\"pump work,Wp in KJ/kg=\"),round(Wp,2)\n", + "print(\"turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\")\n", + "Wt=(h1-h2)\n", + "print(\"net work(W_net)=Wt-Wp in KJ/kg\")\n", + "W_net=Wt-Wp\n", + "print(\"power produced(P)=mass flow rate*W_net in KJ/s\")\n", + "P=m*W_net\n", + "print(\"so net power=43.22 MW\")\n", + "print(\"heat supplied in boiler(Q)=(h1-h4) in KJ/kg\")\n", + "print(\"enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\")\n", + "h3=hf;\n", + "h4=h3+deltah_34 \n", + "Q=m*(h1-h4)\n", + "print(\"total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s\"),round(Q,2)\n", + "print(\"thermal efficiency=net work/heat supplied=W_net/Q\"),round(P/Q,2)\n", + "print(\"in percentage\"),round(P*100/Q,2)\n", + "print(\"so thermal efficiency=37.73%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.17;pg no: 292" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:292 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 17\n", + "from steam tables,h1=3625.3 KJ/s,s1=6.9029 KJ/kg K\n", + "due to isentropic expansion,s1=s2=s3=6.9029 KJ/kg K\n", + "at state 2,i.e at pressure of 2 MPa and entropy 6.9029 KJ/kg K\n", + "by interpolating state for s2 between 2 MPa,300 degree celcius and 2 MPa,350 degree celcius from steam tables,\n", + "h2=3105.08 KJ/kg \n", + "for state 3,i.e at pressure of 0.01 MPa entropy,s3 lies in wet region as s3In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,mass of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.18, Page:294 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 18\")\n", + "W_net=50*10**3;#net output of turbine in KW\n", + "print(\"from steam tables,at inlet to first stage of turbine,h1=h at 100 bar,500oc=3373.7 KJ/kg,s1=s at 100 bar,500oc=6.5966 KJ/kg\")\n", + "h1=3373.7;\n", + "s1=6.5966;\n", + "print(\"Due to isentropic expansion,s1=s6=s2 and s3=s8=s4\")\n", + "s2=s1;\n", + "s6=s2;\n", + "print(\"State at 6 i.e bleed state from HP turbine,temperature by interpolation from steam table =261.6oc.\")\n", + "print(\"At inlet to second stage of turbine,h6=2930.572 KJ/kg\")\n", + "h6=2930.572;\n", + "print(\"h3=h at 10 bar,500oc=3478.5 KJ/kg,s3=s at 10 bar,500oc=7.7622 KJ/kg K\")\n", + "h3=3478.5;\n", + "s3=7.7622;\n", + "s4=s3;\n", + "s8=s4;\n", + "print(\"At exit from first stage of turbine i.e. at 10 bar and entropy of 6.5966 KJ/kg K,Temperature by interpolation from steam table at 10 bar and entropy of 6.5966 KJ/kg K\")\n", + "print(\"T2=181.8oc,h2=2782.8 KJ/kg\")\n", + "T2=181.8;\n", + "h2=2782.8;\n", + "print(\"state at 8,i.e bleed state from second stage of expansion,i.e at 4 bar and entropy of 7.7622 KJ/kg K,Temperature by interpolation from steam table,T8=358.98oc=359oc\")\n", + "T8=359;\n", + "print(\"h8=3188.7 KJ/kg\")\n", + "h8=3188.7;\n", + "print(\"state at 4 i.e. at condenser pressure of 0.1 bar and entropy of 7.7622 KJ/kg K,the state lies in wet region.So let the dryness fraction be x4.\")\n", + "print(\"s4=sf at 0.1 bar+x4*sfg at 0.1 bar\")\n", + "print(\"from steam tables,at 0.1 bar,sf=0.6493 KJ/kg K,sfg=7.5009 KJ/kg K\")\n", + "sf=0.6493;\n", + "sfg=7.5009; \n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.95;#approx.\n", + "print(\"h4=hf at 0.1 bar+x4*hfg at 0.1 bar in KJ/kg \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\")\n", + "hf=191.83;\n", + "hfg=2392.8;\n", + "h4=hf+x4*hfg\n", + "print(\"given,h4=2464.99 KJ/kg,h11=856.8 KJ/kg,h9=hf at 4 bar=604.74 KJ/kg\")\n", + "h4=2464.99;\n", + "h11=856.8;\n", + "h9=604.74;\n", + "print(\"considering pump work,the net output can be given as,\")\n", + "print(\"W_net=W_HPT+W_LPT-(W_CEP+W_FP)\")\n", + "print(\"where,W_HPT={(h1-h6)+(1-m6)*(h6-h2)}per kg of steam from boiler.\")\n", + "print(\"W_LPT={(1-m6)+(h3-h8)*(1-m6-m8)*(h8-h4)}per kg of steam from boiler.\")\n", + "print(\"for closed feed water heater,energy balance yields;\")\n", + "print(\"m6*h6+h10=m6*h7+h11\")\n", + "print(\"assuming condensate leaving closed feed water heater to be saturated liquid,\")\n", + "print(\"h7=hf at 20 bar=908.79 KJ/kg\")\n", + "h7=908.79; \n", + "print(\"due to throttline,h7=h7_a=908.79 KJ/kg\")\n", + "h7_a=h7;\n", + "print(\"for open feed water heater,energy balance yields,\")\n", + "print(\"m6*h7_a+m8*h8+(1-m6-m8)*h5=h9\")\n", + "print(\"for condensate extraction pump,h5-h4_a=v4_a*deltap\")\n", + "print(\"h5-hf at 0.1 bar=vf at 0.1 bar*(4-0.1)*10^2 \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,vf=0.001010 m^3/kg\")\n", + "hf=191.83;\n", + "vf=0.001010; \n", + "h5=hf+vf*(4-0.1)*10**2\n", + "print(\"so h5 in KJ/kg=\"),round(h5,2)\n", + "print(\"for feed pump,h10-h9=v9*deltap\")\n", + "print(\"h10=h9+vf at 4 bar*(100-4)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,vf=0.001084 m^3/kg \")\n", + "hf=604.74;\n", + "vf=0.001084;\n", + "h10=h9+vf*(100-4)*10**2\n", + "print(\"substituting in energy balance upon closed feed water heater,\")\n", + "m6=(h11-h10)/(h6-h7)\n", + "print(\"m6 in kg per kg of steam from boiler=\"),round(m6,3)\n", + "print(\"substituting in energy balance upon feed water heater,\")\n", + "m8=(h9-m6*h7_a+m6*h5-h5)/(h8-h5)\n", + "print(\"m8 in kg per kg of steam from boiler=\"),round(m8,3)\n", + "print(\"Let the mass of steam entering first stage of turbine be m kg,then\")\n", + "{(h1-h6)+(1-m6)*(h6-h2)}\n", + "print(\"W_HPT=m*{(h1-h6)+(1-m6)*(h6-h2)}\")\n", + "print(\"W_HPT/m=\"),round(((h1-h6)+(1-m6)*(h6-h2)),2)\n", + "print(\"so W_HPT=m*573.24 KJ\")\n", + "print(\"also,W_LPT={(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}per kg of steam from boiler\")\n", + "{(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}\n", + "print(\"W_LPT/m=\"),round(((1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)),2)\n", + "print(\"so W_LPT=m*813.42 KJ\")\n", + "print(\"pump works(negative work)\")\n", + "print(\"W_CEP=m*(1-m6-m8)*(h5-h4_a)\")\n", + "h4_a=191.83;#h4_a=hf at 0.1 bar\n", + "print(\"W_CEP/m=\")\n", + "(1-m6-m8)*(h5-h4_a)\n", + "print(\"so W_CEP=m* 0.304\")\n", + "print(\"W_FP=m*(h10-h9)\")\n", + "print(\"W_FP/m=\"),round((h10-h9),2)\n", + "print(\"so W_FP=m*10.41\")\n", + "print(\"net output,\")\n", + "print(\"W_net=W_HPT+W_LPT-W_CEP-W_FP \")\n", + "print(\"so 50*10^3=(573.24*m+813.42*m-0.304*m-10.41*m)\")\n", + "m=W_net/(573.24+813.42-0.304-10.41)\n", + "print(\"so m in kg/s=\"),round(m,2)\n", + "Q_add=m*(h1-h11)\n", + "print(\"heat supplied in boiler,Q_add in KJ/s=\"),round(m*(h1-h11),2)\n", + "print(\"Thermal efficenncy=\"),round(W_net/Q_add,2)\n", + "print(\"in percentage\"),round(W_net*100/Q_add,2)\n", + "print(\"so mass of steam bled at 20 bar=0.119 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam bled at 4 bar=0.109 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam entering first stage=36.33 kg/s\")\n", + "print(\"thermal efficiency=54.66%\")\n", + "print(\"NOTE=>In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb new file mode 100644 index 00000000..5088b9af --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_1.ipynb @@ -0,0 +1,2594 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 8:Vapour Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.1;pg no: 260" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:260 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\n", + "T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\n", + "enthalpy at state 2,h2= hg at 7 MPa\n", + "from steam table,h=2772.1 KJ/kg\n", + "entropy at state 2,s2=sg at 7MPa\n", + "from steam table,s2=5.8133 KJ/kg K\n", + "enthalpy and entropy at state 3,\n", + "from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\n", + "for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \n", + "from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\n", + "s1=s2=sf+x1*sfg\n", + "so x1= 0.68\n", + "from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\n", + "enthalpy at state 1,h1 in KJ/kg= 1802.53\n", + "let dryness fraction at state 4 be x4\n", + "for process 4-3,s4=s3=sf+x4*sfg\n", + "so x4= 0.33\n", + "enthalpy at state 4,h4 in KJ/kg= 962.81\n", + "thermal efficiency=net work/heat added\n", + "expansion work per kg=(h2-h1) in KJ/kg 969.57\n", + "compression work per kg=(h3-h4) in KJ/kg(+ve) 304.19\n", + "heat added per kg=(h2-h3) in KJ/kg(-ve) 1505.1\n", + "net work per kg=(h2-h1)-(h3-h4) in KJ/kg 665.38\n", + "thermal efficiency 0.44\n", + "in percentage 44.21\n", + "so thermal efficiency=44.21%\n", + "turbine work=969.57 KJ/kg(+ve)\n", + "compression work=304.19 KJ/kg(-ve)\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine work,compression work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.1, Page:260 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\")\n", + "print(\"T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\")\n", + "print(\"enthalpy at state 2,h2= hg at 7 MPa\")\n", + "print(\"from steam table,h=2772.1 KJ/kg\")\n", + "h2=2772.1;\n", + "print(\"entropy at state 2,s2=sg at 7MPa\")\n", + "print(\"from steam table,s2=5.8133 KJ/kg K\")\n", + "s2=5.8133;\n", + "print(\"enthalpy and entropy at state 3,\")\n", + "print(\"from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\")\n", + "h3=1267;\n", + "s3=3.1211;\n", + "print(\"for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \")\n", + "s1=s2;\n", + "print(\"from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\")\n", + "sf=0.5564;\n", + "sfg=7.7237;\n", + "print(\"s1=s2=sf+x1*sfg\")\n", + "x1=(s2-sf)/sfg\n", + "print(\"so x1=\"),round(x1,2) \n", + "x1=0.6806;#approx.\n", + "print(\"from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\")\n", + "hf=162.60;\n", + "hfg=2409.54;\n", + "h1=hf+x1*hfg\n", + "print(\"enthalpy at state 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"let dryness fraction at state 4 be x4\")\n", + "print(\"for process 4-3,s4=s3=sf+x4*sfg\")\n", + "s4=s3;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.3321;#approx.\n", + "h4=hf+x4*hfg\n", + "print(\"enthalpy at state 4,h4 in KJ/kg=\"),round(h4,2)\n", + "print(\"thermal efficiency=net work/heat added\")\n", + "(h2-h1)\n", + "print(\"expansion work per kg=(h2-h1) in KJ/kg\"),round((h2-h1),2)\n", + "(h3-h4)\n", + "print(\"compression work per kg=(h3-h4) in KJ/kg(+ve)\"),round((h3-h4),2)\n", + "(h2-h3)\n", + "print(\"heat added per kg=(h2-h3) in KJ/kg(-ve)\"),round((h2-h3),2)\n", + "(h2-h1)-(h3-h4)\n", + "print(\"net work per kg=(h2-h1)-(h3-h4) in KJ/kg\"),round((h2-h1)-(h3-h4),2)\n", + "((h2-h1)-(h3-h4))/(h2-h3)\n", + "print(\"thermal efficiency\"),round(((h2-h1)-(h3-h4))/(h2-h3),2)\n", + "print(\"in percentage\"),round((((h2-h1)-(h3-h4))/(h2-h3))*100,2)\n", + "print(\"so thermal efficiency=44.21%\")\n", + "print(\"turbine work=969.57 KJ/kg(+ve)\")\n", + "print(\"compression work=304.19 KJ/kg(-ve)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.2;pg no: 261" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.2, Page:261 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\n", + "from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\n", + "hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\n", + "from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\n", + "hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\n", + "as process 2-3 is isentropic,so s2=s3\n", + "and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\n", + "so x3= 0.69\n", + "hence enthalpy at 3,\n", + "h3 in KJ/kg= 1819.85\n", + "enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\n", + "process 1-4 is isentropic,so s1=s4\n", + "s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\n", + "so x4= 0.31\n", + "enthalpy at 4,h4 in KJ/kg= 884.31\n", + "enthalpy at 1,h1 in KJ/kg= 1154.23\n", + "carnot cycle(1-2-3-4-1) efficiency:\n", + "n_carnot=net work/heat added\n", + "n_carnot 0.43\n", + "in percentage 42.96\n", + "so n_carnot=42.95%\n", + "In rankine cycle,1-2-3-5-6-1,\n", + "pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg 5.02\n", + "h5 KJ/kg= 137.82\n", + "hence h6 in KJ/kg 142.84\n", + "net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg 969.43\n", + "heat added=(h2-h6)in KJ/kg 2651.46\n", + "rankine cycle efficiency(n_rankine)= 0.37\n", + "in percentage 36.56\n", + "so n_rankine=36.56%\n" + ] + } + ], + "source": [ + "#cal of n_carnot,n_rankine\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.2, Page:261 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\")\n", + "print(\"from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\")\n", + "print(\"hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\")\n", + "hf_5MPa=1154.23;\n", + "sf_5MPa=2.92;\n", + "hg_5MPa=2794.3;\n", + "sg_5MPa=5.97;\n", + "print(\"from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\")\n", + "print(\"hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\")\n", + "hf_5KPa=137.82;\n", + "sf_5KPa=0.4764;\n", + "hg_5KPa=2561.5;\n", + "sg_5KPa=8.3951;\n", + "vf_5KPa=0.001005;\n", + "print(\"as process 2-3 is isentropic,so s2=s3\")\n", + "print(\"and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\")\n", + "s2=sg_5MPa;\n", + "s3=s2;\n", + "x3=(s3-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.694;#approx.\n", + "print(\"hence enthalpy at 3,\")\n", + "h3=hf_5KPa+x3*(hg_5KPa-hf_5KPa)\n", + "print(\"h3 in KJ/kg=\"),round(h3,2)\n", + "print(\"enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\")\n", + "print(\"process 1-4 is isentropic,so s1=s4\")\n", + "s1=sf_5MPa;\n", + "print(\"s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\")\n", + "x4=(s1-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.308;#approx.\n", + "h4=hf_5KPa+x4*(hg_5KPa-hf_5KPa)\n", + "print(\"enthalpy at 4,h4 in KJ/kg=\"),round(h4,2)\n", + "h1=hf_5MPa\n", + "h2=hg_5MPa;\n", + "n_carnot=((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"enthalpy at 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"carnot cycle(1-2-3-4-1) efficiency:\")\n", + "print(\"n_carnot=net work/heat added\")\n", + "print(\"n_carnot\"),round(n_carnot,2)\n", + "print(\"in percentage\"),round(n_carnot*100,2)\n", + "print(\"so n_carnot=42.95%\")\n", + "print(\"In rankine cycle,1-2-3-5-6-1,\")\n", + "p6=5000;#boiler pressure in KPa\n", + "p5=5;#condenser pressure in KPa\n", + "vf_5KPa*(p6-p5)\n", + "print(\"pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg\"),round(vf_5KPa*(p6-p5),2)\n", + "h5=hf_5KPa;\n", + "print(\"h5 KJ/kg=\"),round(hf_5KPa,2)\n", + "h6=h5+(vf_5KPa*(p6-p5))\n", + "print(\"hence h6 in KJ/kg\"),round(h6,2)\n", + "(h2-h3)-(h6-h5)\n", + "print(\"net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg\"),round((h2-h3)-(h6-h5),2)\n", + "(h2-h6)\n", + "print(\"heat added=(h2-h6)in KJ/kg\"),round((h2-h6),2)\n", + "n_rankine=((h2-h3)-(h6-h5))/(h2-h6)\n", + "print(\"rankine cycle efficiency(n_rankine)=\"),round(n_rankine,2)\n", + "print(\"in percentage\"),round(n_rankine*100,2)\n", + "print(\"so n_rankine=36.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.3;pg no: 263" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.3, Page:263 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\n", + "from steam tables,h2=hg_40bar=3092.5 KJ/kg\n", + "s2=sg_40bar=6.5821 KJ/kg K\n", + "h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \n", + "s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "v4=vf_0.05bar=0.001005 m^3/kg\n", + "let the dryness fraction at state 3 be x3,\n", + "for ideal process,2-3,s2=s3\n", + "s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\n", + "so x3= 0.77\n", + "h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\n", + "for pumping process,\n", + "h1-h4=v4*deltap=v4*(p1-p4)\n", + "so h1=h4+v4*(p1-p4) in KJ/kg 141.83\n", + "pump work per kg of steam in KJ/kg 4.01\n", + "net work per kg of steam =(expansion work-pump work)per kg of steam\n", + "=(h2-h3)-(h1-h4) in KJ/kg= 1081.75\n", + "cycle efficiency=net work/heat added 0.37\n", + "in percentage 36.66\n", + "so net work per kg of steam=1081.74 KJ/kg\n", + "cycle efficiency=36.67%\n", + "pump work per kg of steam=4.02 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of net work per kg of steam,cycle efficiency,pump work per kg of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.3, Page:263 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\")\n", + "print(\"from steam tables,h2=hg_40bar=3092.5 KJ/kg\")\n", + "h2=3092.5;\n", + "print(\"s2=sg_40bar=6.5821 KJ/kg K\")\n", + "s2=6.5821;\n", + "print(\"h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \")\n", + "h4=137.82;\n", + "hfg=2423.7;\n", + "print(\"s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "s4=0.4764;\n", + "sfg=7.9187;\n", + "print(\"v4=vf_0.05bar=0.001005 m^3/kg\")\n", + "v4=0.001005;\n", + "print(\"let the dryness fraction at state 3 be x3,\")\n", + "print(\"for ideal process,2-3,s2=s3\")\n", + "s3=s2;\n", + "print(\"s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\")\n", + "x3=(s2-s4)/(sfg)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.7711;#approx.\n", + "print(\"h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\")\n", + "h3=h4+x3*hfg\n", + "print(\"for pumping process,\")\n", + "print(\"h1-h4=v4*deltap=v4*(p1-p4)\")\n", + "p1=40*100;#pressure of steam enter in turbine in mPa\n", + "p4=0.05*100;#pressure of steam leave turbine in mPa\n", + "h1=h4+v4*(p1-p4)\n", + "print(\"so h1=h4+v4*(p1-p4) in KJ/kg\"),round(h1,2)\n", + "(h1-h4)\n", + "print(\"pump work per kg of steam in KJ/kg\"),round((h1-h4),2)\n", + "print(\"net work per kg of steam =(expansion work-pump work)per kg of steam\")\n", + "(h2-h3)-(h1-h4)\n", + "print(\"=(h2-h3)-(h1-h4) in KJ/kg=\"),round((h2-h3)-(h1-h4),2)\n", + "print(\"cycle efficiency=net work/heat added\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"so net work per kg of steam=1081.74 KJ/kg\")\n", + "print(\"cycle efficiency=36.67%\")\n", + "print(\"pump work per kg of steam=4.02 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.4;pg no: 264" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.4, Page:264 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 4\n", + "Let us assume that the condensate leaves condenser as saturated liquid and the expansion in turbine and pumping processes are isentropic.\n", + "from steam tables,h2=h_20MPa=3238.2 KJ/kg\n", + "s2=6.1401 KJ/kg K\n", + "h5=h_0.005MPa in KJ/kg\n", + "from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+0.9*hfg in KJ/kg 2319.15\n", + "s5 in KJ/kg K= 7.6\n", + "h6=hf=137.82 KJ/kg\n", + "it is given that temperature at state 4 is 500 degree celcius and due to isentropic processes s4=s5=7.6032 KJ/kg K.The state 4 can be conveniently located on mollier chart by the intersection of 500 degree celcius constant temperature line and entropy value of 7.6032 KJ/kg K and the pressure and enthalpy obtained.but these shall be approximate.\n", + "The state 4 can also be located by interpolation using steam table.The entropy value of 7.6032 KJ/kg K lies between the superheated steam states given under,p=1.20 MPa,s at 1.20 MPa=7.6027 KJ/kg K\n", + "p=1.40 MPa,s at 1.40 MPa=7.6027 KJ/kg K\n", + "by interpolation state 4 lies at pressure=\n", + "=1.399,approx.=1.40 MPa\n", + "thus,steam leaves HP turbine at 1.40 MPa\n", + "enthalpy at state 4,h4=3474.1 KJ/kg\n", + "for process 2-33,s2=s3=6.1401 KJ/kg K.The state 3 thus lies in wet region as s3sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\n", + "From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\n", + "Let dryness fraction at state 9 be x9 so,\n", + "s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\n", + "from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\n", + "x9=(s9-sf)/sfg 0.95\n", + "h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\n", + "from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\n", + "Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\n", + "h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\n", + "h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\n", + "For process 4-8,i.e in CEP.\n", + "h8 in KJ/kg= 138.22\n", + "For process 11-12,i.e in FP2,\n", + "h12=h11+v11*(40-4)*10^2 in KJ/kg 608.64\n", + "For process 13-1_a i.e. in FP1,h1_a= in KJ/kg= 1107.34\n", + "m1*3141.81+(1-m1)*608.64=1087.31\n", + "so m1=(1087.31-608.64)/(3141.81-608.64)in kg\n", + "Applying energy balance on open feed water heater 1 (OFWH1)\n", + "m1*h10+(1-m1)*h12)=1*h13\n", + "so m1 in kg= 0.19\n", + "Applying energy balance on open feed water heater 2 (OFWH2)\n", + "m2*h9+(1-m1-m2)*h8=(1-m1)*h11\n", + "so m2 in kg= 0.15\n", + "Thermal efficiency of cycle,n= 0.51\n", + "W_CEP in KJ/kg steam from boiler= 0.26\n", + "W_FP1=(h1_a-h13)in KJ/kg of steam from boiler 20.0\n", + "W_FP2 in KJ/kg of steam from boiler= 3.17\n", + "W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler= 23.46\n", + "n= 0.51\n", + "in percentage 51.37\n", + "so cycle thermal efficiency,na=46.18%\n", + "nb=49.76%\n", + "nc=51.37%\n", + "hence it is obvious that efficiency increases with increase in number of feed heaters.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.6, Page:267 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 6\")\n", + "print(\"case (a) When there is no feed water heater\")\n", + "print(\"Thermal efficiency of cycle=((h2-h3)-(h1-h4))/(h2-h1)\")\n", + "print(\"from steam tables,h2=h at 200 bar,650oc=3675.3 KJ/kg,s2=s at 200 bar,650oc=6.6582 KJ/kg K,h4=hf at 0.05 bar=137.82 KJ/kg,v4=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h2=3675.3;\n", + "s2=6.6582;\n", + "h4=137.82;\n", + "v4=0.001005;\n", + "print(\"hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg,sf at 0.05 bar=0.4764 KJ/kg K,sfg at 0.05 bar=7.9187 KJ/kg K\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "print(\"For process 2-3,s2=s3.Let dryness fraction at 3 be x3.\")\n", + "s3=s2;\n", + "print(\"s3=6.6582=sf at 0.05 bar+x3*sfg at 0.05 bar\")\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.781;#approx.\n", + "print(\"h3=hf at 0.05 bar+x3*hfg at 0.05 bar in KJ/kg\")\n", + "h3=hf+x3*hfg\n", + "print(\"For pumping process 4-1,\")\n", + "print(\"h1-h4=v4*deltap\")\n", + "h1=h4+v4*(200-0.5)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2)\n", + "((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"case (b) When there is only one feed water heater working at 8 bar\")\n", + "print(\"here,let mass of steam bled for feed heating be m kg\")\n", + "print(\"For process 2-6,s2=s6=6.6582 KJ/kg K\")\n", + "s6=s2;\n", + "print(\"Let dryness fraction at state 6 be x6\")\n", + "print(\"s6=sf at 8 bar+x6*sfg at 8 bar\")\n", + "print(\"from steam tables,hf at 8 bar=721.11 KJ/kg,vf at 8 bar=0.001115 m^3/kg,hfg at 8 bar=2048 KJ/kg,sf at 8 bar=2.0462 KJ/kg K,sfg at 8 bar=4.6166 KJ/kg K\")\n", + "hf=721.11;\n", + "vf=0.001115;\n", + "hfg=2048;\n", + "sf=2.0462;\n", + "sfg=4.6166;\n", + "x6=(s6-sf)/sfg\n", + "print(\"substituting entropy values,x6=\"),round(x6,2)\n", + "x6=0.999;#approx.\n", + "print(\"h6=hf at at 8 bar+x6*hfg at 8 bar in KJ/kg\")\n", + "h6=hf+x6*hfg\n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at 8 bar.h7=hf at 8 bar=721.11 KJ/kg\")\n", + "h7=721.11;\n", + "h5=h4+v4*(8-.05)*10**2\n", + "print(\"For process 4-5,h5 in KJ/kg\"),round(h5,2)\n", + "print(\"Applying energy balance at open feed water heater,\")\n", + "print(\"m*h6+(1-m)*h5=1*h7\")\n", + "m=(h7-h5)/(h6-h5)\n", + "print(\"so m= in kg\"),round(m,2)\n", + "h7=hf;\n", + "v7=vf;\n", + "h1=h7+v7*(200-8)*10**2\n", + "print(\"For process 7-1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"here h7=hf at 8 bar,v7=vf at 8 bar\")\n", + "#TE=((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=0.4976\")\n", + "print(\"in percentage=49.76\")\n", + "print(\"case (c) When there are two feed water heaters working at 40 bar and 4 bar\")\n", + "print(\"here, let us assume the mass of steam at 40 bar,4 bar to be m1 kg and m2 kg respectively.\")\n", + "print(\"2-10-9-3,s2=s10=s9=s3=6.6582 KJ/kg K\")\n", + "s3=s2;\n", + "s9=s3;\n", + "s10=s9;\n", + "print(\"At state 10.s10>sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\")\n", + "print(\"From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\")\n", + "T10=370.6;\n", + "h10=3141.81;\n", + "print(\"Let dryness fraction at state 9 be x9 so,\") \n", + "print(\"s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\")\n", + "print(\"from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\")\n", + "sf=1.7766;\n", + "sfg=5.1193;\n", + "x9=(s9-sf)/sfg\n", + "print(\"x9=(s9-sf)/sfg\"),round(x9,2)\n", + "x9=0.9536;#approx.\n", + "print(\"h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\")\n", + "hf=604.74;\n", + "hfg=2133.8;\n", + "h9=hf+x9*hfg \n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\")\n", + "print(\"h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\")\n", + "h11=604.74;\n", + "v11=0.001084;\n", + "print(\"h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\")\n", + "h13=1087.31;\n", + "v13=0.001252;\n", + "print(\"For process 4-8,i.e in CEP.\")\n", + "h8=h4+v4*(4-0.05)*10**2\n", + "print(\"h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"For process 11-12,i.e in FP2,\")\n", + "h12=h11+v11*(40-4)*10**2\n", + "print(\"h12=h11+v11*(40-4)*10^2 in KJ/kg\"),round(h12,2)\n", + "h1_a=h13+v13*(200-40)*10**2\n", + "print(\"For process 13-1_a i.e. in FP1,h1_a= in KJ/kg=\"),round(h1_a,2)\n", + "print(\"m1*3141.81+(1-m1)*608.64=1087.31\")\n", + "print(\"so m1=(1087.31-608.64)/(3141.81-608.64)in kg\")\n", + "m1=(1087.31-608.64)/(3141.81-608.64)\n", + "print(\"Applying energy balance on open feed water heater 1 (OFWH1)\")\n", + "print(\"m1*h10+(1-m1)*h12)=1*h13\")\n", + "m1=(h13-h12)/(h10-h12)\n", + "print(\"so m1 in kg=\"),round(m1,2)\n", + "print(\"Applying energy balance on open feed water heater 2 (OFWH2)\")\n", + "print(\"m2*h9+(1-m1-m2)*h8=(1-m1)*h11\")\n", + "m2=(1-m1)*(h11-h8)/(h9-h8)\n", + "print(\"so m2 in kg=\"),round(m2,2)\n", + "W_CEP=(1-m1-m2)*(h8-h4)\n", + "W_FP1=(h1_a-h13)\n", + "W_FP2=(1-m1)*(h12-h11)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"Thermal efficiency of cycle,n=\"),round(n,2)\n", + "print(\"W_CEP in KJ/kg steam from boiler=\"),round(W_CEP,2)\n", + "print(\"W_FP1=(h1_a-h13)in KJ/kg of steam from boiler\"),round(W_FP1)\n", + "print(\"W_FP2 in KJ/kg of steam from boiler=\"),round(W_FP2,2)\n", + "W_CEP+W_FP1+W_FP2\n", + "print(\"W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler=\"),round(W_CEP+W_FP1+W_FP2,2)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so cycle thermal efficiency,na=46.18%\")\n", + "print(\"nb=49.76%\")\n", + "print(\"nc=51.37%\")\n", + "print(\"hence it is obvious that efficiency increases with increase in number of feed heaters.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.7;pg no: 272" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.7, Page:272 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\n", + "from steam tables,\n", + "h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\n", + "s3=s2=6.9759 KJ/kg K\n", + "by interpolation from steam tables,\n", + "T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\n", + "for expansion process 4-5,s4=s5=7.7938 KJ/kg K\n", + "let dryness fraction at state 5 be x5\n", + "s5=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x5= 0.92\n", + "h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "for process 6-1 in feed pump,h1 in KJ/kg= 142.84\n", + "cycle efficiency=W_net/Q_add\n", + "Wt in KJ/kg= 1510.35\n", + "W_pump=(h1-h6)in KJ/kg 5.02\n", + "W_net=Wt-W_pump in KJ/kg 1505.33\n", + "Q_add in KJ/kg= 3290.96\n", + "cycle efficiency= 0.4574\n", + "in percentage= 45.74\n", + "we know ,1 hp=0.7457 KW\n", + "specific steam consumption in kg/hp hr= 1.78\n", + "work ratio=net work/positive work 0.9967\n", + "so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,specific steam consumption,work ratio\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.7, Page:272 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\")\n", + "print(\"from steam tables,\")\n", + "print(\"h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\")\n", + "h2=3433.8;\n", + "s2=6.9759;\n", + "print(\"s3=s2=6.9759 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"by interpolation from steam tables,\")\n", + "print(\"T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\")\n", + "T3=183.14;\n", + "h3=2818.03;\n", + "h4=3271.9;\n", + "s4=7.7938;\n", + "print(\"for expansion process 4-5,s4=s5=7.7938 KJ/kg K\")\n", + "s5=s4;\n", + "print(\"let dryness fraction at state 5 be x5\")\n", + "print(\"s5=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.924;#approx.\n", + "print(\"h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "p1=50.;#steam generation pressure in bar\n", + "p6=0.05;#steam entering temperature in turbine in bar\n", + "h1=h6+v6*(p1-p6)*100\n", + "print(\"for process 6-1 in feed pump,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"cycle efficiency=W_net/Q_add\")\n", + "Wt=(h2-h3)+(h4-h5)\n", + "print(\"Wt in KJ/kg=\"),round(Wt,2)\n", + "W_pump=(h1-h6)\n", + "print(\"W_pump=(h1-h6)in KJ/kg\"),round(W_pump,2)\n", + "W_net=Wt-W_pump\n", + "print(\"W_net=Wt-W_pump in KJ/kg\"),round(W_net,2)\n", + "Q_add=(h2-h1)\n", + "print(\"Q_add in KJ/kg=\"),round(Q_add,2)\n", + "print(\"cycle efficiency=\"),round(W_net/Q_add,4)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"we know ,1 hp=0.7457 KW\")\n", + "print(\"specific steam consumption in kg/hp hr=\"),round(0.7457*3600/W_net,2)\n", + "print(\"work ratio=net work/positive work\"),round(W_net/Wt,4)\n", + "print(\"so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.8;pg no: 273" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.8, Page:273 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\n", + "from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\n", + "h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\n", + "Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\n", + "h8=hf at 3 bar=561.47 KJ/kg\n", + "for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\n", + "Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\n", + "s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\n", + "from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\n", + "so x3= 0.95\n", + "s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x4= 0.79\n", + "thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\n", + "here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\n", + "h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\n", + "pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\n", + "for mixing process between condenser and feed pump,\n", + "(1-m)*h5+m*h9=1*h6\n", + "h6=m(h9-h5)+h5\n", + "we get,h6=137.82+m*423.65\n", + "therefore h7=h6+6.02=143.84+m*423.65\n", + "Applying energy balance at closed feed water heater;\n", + "m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\n", + "so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\n", + "so m=0.144 kg\n", + "steam bled for feed heating=0.144 kg/kg steam generated\n", + "The net power output,W_net in KJ/kg steam generated= 1167.27\n", + "mass of steam required to be generated in kg/s= 26.23\n", + "or in kg/hr\n", + "so capacity of boiler required=94428 kg/hr\n", + "overall thermal efficiency=W_net/Q_add\n", + "here Q_add in KJ/kg= 3134.56\n", + "overall thermal efficiency= 0.37\n", + "in percentage= 37.24\n", + "so overall thermal efficiency=37.24%\n" + ] + } + ], + "source": [ + "#cal of mass of steam bled for feed heating,capacity of boiler required,overall thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.8, Page:273 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\")\n", + "T_cond=115;#condensate temperature in degree celcius\n", + "Cp=4.18;#specific heat at constant pressure in KJ/kg K\n", + "P=30*10**3;#actual alternator output in KW\n", + "n_boiler=0.9;#boiler efficiency\n", + "n_alternator=0.98;#alternator efficiency\n", + "print(\"from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\")\n", + "h2=3301.8;\n", + "s2=6.7193;\n", + "print(\"h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h5=137.82;\n", + "v5=0.001005;\n", + "print(\"Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\")\n", + "print(\"h8=hf at 3 bar=561.47 KJ/kg\")\n", + "h8=561.47;\n", + "print(\"for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "print(\"Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\")\n", + "print(\"s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\")\n", + "print(\"from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\")\n", + "sf_3bar=1.6718;\n", + "sfg_3bar=5.3201;\n", + "x3=(s3-sf_3bar)/sfg_3bar\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.949;#approx.\n", + "print(\"s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.788;#approx.\n", + "print(\"thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\")\n", + "print(\"here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\")\n", + "hf_3bar=561.47;\n", + "hfg_3bar=2163.8;\n", + "h3=hf_3bar+x3*hfg_3bar \n", + "print(\"h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h4=hf+x4*hfg\n", + "print(\"assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\")\n", + "h9=h8;\n", + "v6=v5;\n", + "print(\"pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\")\n", + "p1=60;#pressure of steam in high pressure turbine in bar\n", + "p5=0.05;#pressure of steam in low pressure turbine in bar\n", + "v5*(p1-p5)*100\n", + "print(\"for mixing process between condenser and feed pump,\")\n", + "print(\"(1-m)*h5+m*h9=1*h6\")\n", + "print(\"h6=m(h9-h5)+h5\")\n", + "print(\"we get,h6=137.82+m*423.65\")\n", + "print(\"therefore h7=h6+6.02=143.84+m*423.65\")\n", + "print(\"Applying energy balance at closed feed water heater;\")\n", + "print(\"m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\")\n", + "print(\"so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\")\n", + "print(\"so m=0.144 kg\")\n", + "m=0.144;\n", + "h6=137.82+m*423.65;\n", + "h7=143.84+m*423.65;\n", + "print(\"steam bled for feed heating=0.144 kg/kg steam generated\")\n", + "W_net=(h2-h3)+(1-m)*(h3-h4)-(1-m)*(h7-h6)\n", + "print(\"The net power output,W_net in KJ/kg steam generated=\"),round(W_net,2)\n", + "P/(n_alternator*W_net)\n", + "print(\"mass of steam required to be generated in kg/s=\"),round(P/(n_alternator*W_net),2)\n", + "print(\"or in kg/hr\")\n", + "26.23*3600\n", + "print(\"so capacity of boiler required=94428 kg/hr\")\n", + "print(\"overall thermal efficiency=W_net/Q_add\")\n", + "Q_add=(h2-Cp*T_cond)/n_boiler\n", + "print(\"here Q_add in KJ/kg=\"),round(Q_add,2) \n", + "W_net/Q_add\n", + "print(\"overall thermal efficiency=\"),round(W_net/Q_add,2)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"so overall thermal efficiency=37.24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.9;pg no: 275" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.9, Page:275 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\n", + "At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\n", + "For ideal expansion process,s2=s3\n", + "By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\n", + "actual stste at exit of first stage,h3_a in KJ/kg= 2909.88\n", + "actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K= 7.1075\n", + "for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "so x4= 0.96\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "actual enthalpy at exit from second stage,h4_a in KJ/kg= 2646.48\n", + "actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\n", + "so x4_a= 0.99\n", + "x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\n", + "for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5= 0.87\n", + "h5=2270.43 KJ/kg\n", + "actual enthalpy at exit from third stage,h5_a in KJ/kg= 2345.64\n", + "Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\n", + "By heat balance on first closed feed water heater,(see schematic arrangement)\n", + "h11=hf at 6 bar=670.56 KJ\n", + "m1*h3_a+h10=m1*h11+4.18*150\n", + "(m1*2829.63)+h10=(m1*670.56)+627\n", + "h10+2159.07*m1=627\n", + "By heat balance on second closed feed water heater,(see schematic arrangement)\n", + "h7=hf at 1 bar=417.46 KJ/kg\n", + "m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\n", + "m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\n", + "m2*2467.27-m1*179.2-238.26=0\n", + "heat balance at point of mixing,\n", + "h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\n", + "neglecting pump work,h7=h8\n", + "h10=m2*417.46+(1-m1-m2)*397.1\n", + "substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\n", + "Turbine output per kg of steam generated,Wt in KJ/kg of steam generated= 780.445\n", + "Rate of steam generation required in kg/s= 19.22\n", + "in kg/hr\n", + "capacity of drain pump i.e. FP shown in layout in kg/hr= 16273.96\n", + "so capacity of drain pump=16273.96 kg/hr\n" + ] + } + ], + "source": [ + "#cal of capacity of drain pump\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.9, Page:275 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\")\n", + "P=15*10**3;#turbine output in KW\n", + "print(\"At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\")\n", + "h2=3230.9;\n", + "s2=6.9212;\n", + "print(\"For ideal expansion process,s2=s3\")\n", + "s3=s2;\n", + "print(\"By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\")\n", + "T3=190.97;\n", + "h3=2829.63;\n", + "h3_a=h2-0.8*(h2-h3)\n", + "print(\"actual stste at exit of first stage,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "s3_a=7.1075;\n", + "print(\"actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K=\"),round(s3_a,4)\n", + "print(\"for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\")\n", + "s4=7.1075;\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.958;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "h4_a=h3_a-.8*(h3_a-h4)\n", + "print(\"actual enthalpy at exit from second stage,h4_a in KJ/kg=\"),round(h4_a,2)\n", + "print(\"actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\")\n", + "x4_a=(h4_a-hf)/hfg\n", + "print(\"so x4_a=\"),round(x4_a,2)\n", + "print(\"x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\")\n", + "s4_a=7.2806;\n", + "print(\"for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s4_a-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.8735;#approx.\n", + "print(\"h5=2270.43 KJ/kg\")\n", + "h5=2270.43;\n", + "h5_a=h4_a-0.8*(h4_a-h5)\n", + "print(\"actual enthalpy at exit from third stage,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\")\n", + "print(\"By heat balance on first closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h11=hf at 6 bar=670.56 KJ\")\n", + "h11=670.56;\n", + "print(\"m1*h3_a+h10=m1*h11+4.18*150\")\n", + "print(\"(m1*2829.63)+h10=(m1*670.56)+627\")\n", + "print(\"h10+2159.07*m1=627\")\n", + "print(\"By heat balance on second closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h7=hf at 1 bar=417.46 KJ/kg\")\n", + "h7=417.46;\n", + "print(\"m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\")\n", + "print(\"m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\")\n", + "print(\"m2*2467.27-m1*179.2-238.26=0\")\n", + "print(\"heat balance at point of mixing,\")\n", + "print(\"h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\")\n", + "print(\"neglecting pump work,h7=h8\")\n", + "print(\"h10=m2*417.46+(1-m1-m2)*397.1\")\n", + "print(\"substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\")\n", + "m1=0.1293;\n", + "m2=0.1059;\n", + "Wt=(h2-h3_a)+(1-m1)*(h3_a-h4_a)+(1-m1-m2)*(h4_a-h5_a)\n", + "print(\"Turbine output per kg of steam generated,Wt in KJ/kg of steam generated=\"),round(Wt,3)\n", + "P/Wt\n", + "print(\"Rate of steam generation required in kg/s=\"),round(P/Wt,2)\n", + "print(\"in kg/hr\")\n", + "P*3600/Wt\n", + "(m1+m2)*69192\n", + "print(\"capacity of drain pump i.e. FP shown in layout in kg/hr=\"),round((m1+m2)*69192,2)\n", + "print(\"so capacity of drain pump=16273.96 kg/hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.10;pg no: 277" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.10, Page:277 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\n", + "at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\n", + "By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\n", + "actual enthapy at 3_a,h3_a in KJ/kg= 3097.0\n", + "enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\n", + "for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\n", + "s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x6= 0.83\n", + "h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "for actual expansion process in LP turbine.\n", + "h6_a=h4-0.85*(h4-h6) in KJ/kg 2319.4\n", + "Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\n", + "s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\n", + "from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\n", + "so x5= 1.0\n", + "h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\n", + "from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\n", + "actual enthalpy,h5_a in KJ/kg= 2790.16\n", + "enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\n", + "specific volume at inlet of CEP,v7=0.001008 m^3/kg\n", + "enthalpy at inlet of CEP,h7=168.79 KJ/kg\n", + "for pumping process 7-8,h8 in KJ/kg= 169.15\n", + "Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\n", + "m*h5+(1-m)*h8=h9\n", + "so m in kg /kg of steam generated= 0.33\n", + "For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\n", + "h1= in KJ/kg= 1015.59\n", + "Net work per kg of steam generated,W_net=in KJ/kg steam generated= 938.83\n", + "heat added per kg of steam generated,q_add in KJ/kg of steam generated= 2405.41\n", + "Thermal efficiency,n= 0.39\n", + "in percentage= 39.03\n", + "so thermal efficiency=39.03%%\n", + "NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.10, Page:277 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\")\n", + "print(\"at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\")\n", + "h2=3287.1;\n", + "s2=6.6327;\n", + "print(\"By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\")\n", + "h3=3049.48;\n", + "h3_a=h2-0.80*(h2-h3)\n", + "print(\"actual enthapy at 3_a,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "print(\"enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\")\n", + "h4=3230.9;\n", + "s4=6.9212;\n", + "print(\"for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\")\n", + "s6=s4;\n", + "print(\"s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x6=(s6-sf)/sfg\n", + "print(\"so x6=\"),round(x6,2)\n", + "x6=0.827;#approx.\n", + "print(\"h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h6=hf+x6*hfg\n", + "print(\"for actual expansion process in LP turbine.\")\n", + "h6_a=h4-0.85*(h4-h6)\n", + "print(\"h6_a=h4-0.85*(h4-h6) in KJ/kg\"),round(h6_a,2)\n", + "print(\"Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\")\n", + "p5=3.61;\n", + "s5=s4;\n", + "print(\"s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\")\n", + "print(\"from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\")\n", + "sf=1.7391;\n", + "sfg=5.1908;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.99;#approx.\n", + "print(\"h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\")\n", + "print(\"from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\")\n", + "hf=589.13;\n", + "hfg=2144.7;\n", + "h5=hf+x5*hfg\n", + "h5_a=h4-0.85*(h4-h5)\n", + "print(\"actual enthalpy,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\")\n", + "h9=1008.42;\n", + "print(\"specific volume at inlet of CEP,v7=0.001008 m^3/kg\")\n", + "v7=0.001008;\n", + "print(\"enthalpy at inlet of CEP,h7=168.79 KJ/kg\")\n", + "h7=168.79;\n", + "h8=h7+v7*(3.61-0.075)*10**2\n", + "print(\"for pumping process 7-8,h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\")\n", + "print(\"m*h5+(1-m)*h8=h9\")\n", + "m=(h9-h8)/(h5-h8)\n", + "print(\"so m in kg /kg of steam generated=\"),round(m,2)\n", + "print(\"For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\")\n", + "v9=0.00108;\n", + "h1=h9+v9*(70-3.61)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2) \n", + "W_net=(h2-h3_a)+(h4-h5_a)+(1-m)*(h5_a-h6_a)-((1-m)*(h8-h7)+(h1-h9))\n", + "print(\"Net work per kg of steam generated,W_net=in KJ/kg steam generated=\"),round(W_net,2)\n", + "q_add=(h2-h1)+(h4-h3_a)\n", + "print(\"heat added per kg of steam generated,q_add in KJ/kg of steam generated=\"),round(q_add,2)\n", + "n=W_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"in percentage=\"),round(n,2)\n", + "print(\"so thermal efficiency=39.03%%\")\n", + "print(\"NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.11;pg no: 279" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.11, Page:279 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\n", + "Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\n", + "for isentropic expansion 2-3-4-5,s2=s3=s4=s5\n", + "Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\n", + "s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\n", + "so x3=(s3-sf)/sfg\n", + "from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\n", + "h3=hf+x3*hfg in KJ/kg\n", + "from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\n", + "s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\n", + "so h4=hf+x4*hfg in KJ/kg\n", + "from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\n", + "s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\n", + "h8=hf at 1.5 bar=467.11 KJ/kg\n", + "v8=0.001053 m^3/kg=vf at 1.5 bar\n", + "h9=h8+v8*(150-1.5)*10^2 in KJ/kg\n", + "h10=hf at 150 bar=1610.5 KJ/kg\n", + "v10=0.001658 m^3/kg=vf at 150 bar\n", + "h12=h10+v10*(150-10)*10^2 in KJ/kg\n", + "Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\n", + "Heat balance on closed feed water heater yields,\n", + "m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\n", + "so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\n", + "heat balance on open feed water can be given as under,\n", + "m2*h4+(1-m1-m2)*h7=(1-m1)*h8\n", + "so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\n", + "for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\n", + "For mixing after closed feed water heater,\n", + "h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\n", + "Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\n", + "heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\n", + "cycle thermal efficiency,n=W_net/q_add 0.48\n", + "in percentage 47.59\n", + "Net power developed in KW=1219*300 in KW 365700.0\n", + "cycle thermal efficiency=47.6%\n", + "Net power developed=365700 KW\n" + ] + } + ], + "source": [ + "#cal of cycle thermal efficiency,Net power developed\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.11, Page:279 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\")\n", + "print(\"Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\")\n", + "h2=3308.6;\n", + "s2=6.3443;\n", + "print(\"for isentropic expansion 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\")\n", + "print(\"s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\")\n", + "print(\"so x3=(s3-sf)/sfg\")\n", + "print(\"from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\")\n", + "sf=2.1387;\n", + "sfg=4.4478;\n", + "x3=(s3-sf)/sfg\n", + "x3=0.945;#approx.\n", + "print(\"h3=hf+x3*hfg in KJ/kg\")\n", + "print(\"from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\")\n", + "hf=762.81;\n", + "hfg=2015.3;\n", + "h3=hf+x3*hfg\n", + "print(\"s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\")\n", + "sf=1.4336;\n", + "sfg=5.7897;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.848;#approx.\n", + "print(\"so h4=hf+x4*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\")\n", + "hf=467.11;\n", + "hfg=2226.5;\n", + "h4=hf+x4*hfg\n", + "print(\"s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.739;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "print(\"h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\")\n", + "h7=h6+v6*(1.5-0.05)*10**2\n", + "print(\"h8=hf at 1.5 bar=467.11 KJ/kg\")\n", + "h8=467.11; \n", + "print(\"v8=0.001053 m^3/kg=vf at 1.5 bar\")\n", + "v8=0.001053;\n", + "print(\"h9=h8+v8*(150-1.5)*10^2 in KJ/kg\")\n", + "h9=h8+v8*(150-1.5)*10**2\n", + "print(\"h10=hf at 150 bar=1610.5 KJ/kg\")\n", + "h10=1610.5; \n", + "print(\"v10=0.001658 m^3/kg=vf at 150 bar\")\n", + "v10=0.001658;\n", + "print(\"h12=h10+v10*(150-10)*10^2 in KJ/kg\")\n", + "h12=h10+v10*(150-10)*10**2\n", + "print(\"Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"Heat balance on closed feed water heater yields,\")\n", + "print(\"m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\")\n", + "print(\"so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\")\n", + "m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)\n", + "print(\"heat balance on open feed water can be given as under,\")\n", + "print(\"m2*h4+(1-m1-m2)*h7=(1-m1)*h8\")\n", + "print(\"so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\")\n", + "m2=((1-m1)*(h8-h7))/(h4-h7)\n", + "print(\"for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\")\n", + "print(\"For mixing after closed feed water heater,\")\n", + "print(\"h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\")\n", + "h1=(4.18*150)*(1-m1)+m1*h12\n", + "print(\"Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\")\n", + "print(\"W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\")\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10)))\n", + "print(\"heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\")\n", + "q_add=(h2-h1)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=W_net/q_add\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"Net power developed in KW=1219*300 in KW\"),round(1219*300,2)\n", + "print(\"cycle thermal efficiency=47.6%\")\n", + "print(\"Net power developed=365700 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.12;pg no: 282" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.12, Page:282 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\n", + "At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\n", + "state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\n", + "since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\n", + "At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "At state 3,h3=2930.57 KJ/kg\n", + "At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\n", + "At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\n", + "From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\n", + "Let dryness fraction at state 5_a be x5,\n", + "s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5_a=(s5_a-sf)/sfg\n", + "h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\n", + "m1_a*h3+h9=m1*h10+4.18*200\n", + "so m1_a=(4.18*200-h9)/(h3-h10) in kg\n", + "Applying heat balance at open feed water heater,\n", + "m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\n", + "so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\n", + "Net work per kg steam generated\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\n", + "Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\n", + "Thermal efficiency,n= 0.45\n", + "in percentage 45.04\n", + "% increase in thermal efficiency due to reheating= 0.56\n", + "so thermal efficiency of reheat cycle=45.03%\n", + "% increase in efficiency due to reheating=0.56%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,steam generation rate\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.12, Page:282 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\")\n", + "P=100*10**3;#net power output in KW\n", + "print(\"At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\")\n", + "T3=261.6;\n", + "h3=2930.57;\n", + "print(\"since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\")\n", + "print(\"At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"At state 3,h3=2930.57 KJ/kg\")\n", + "h3=2930.57;\n", + "print(\"At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\")\n", + "h3_a=3247.6;\n", + "s3_a=7.1271;\n", + "print(\"At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\")\n", + "s4_a=s3_a;\n", + "s5_a=s4_a;\n", + "print(\"From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\")\n", + "h4_a=2841.02;\n", + "print(\"Let dryness fraction at state 5_a be x5,\")\n", + "print(\"s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "print(\"so x5_a=(s5_a-sf)/sfg\")\n", + "x5_a=(s5_a-sf)/sfg\n", + "x5_a=0.853;#approx.\n", + "print(\"h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "h5_a=hf+x5_a*hfg\n", + "print(\"Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\")\n", + "print(\"m1_a*h3+h9=m1*h10+4.18*200\")\n", + "print(\"so m1_a=(4.18*200-h9)/(h3-h10) in kg\")\n", + "m1_a=(4.18*200-h9)/(h3-h10)\n", + "m1_a=0.114;#approx.\n", + "print(\"Applying heat balance at open feed water heater,\")\n", + "print(\"m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\")\n", + "print(\"so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\")\n", + "m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7)\n", + "m2_a=0.131;#approx.\n", + "print(\"Net work per kg steam generated\")\n", + "print(\"w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\")\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-((1-m1_a-m2_a)*(h7-h6)+(h9-h8))\n", + "print(\"Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\")\n", + "q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)\n", + "n=w_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"% increase in thermal efficiency due to reheating=\"),round((0.4503-0.4478)*100/0.4478,2)\n", + "print(\"so thermal efficiency of reheat cycle=45.03%\")\n", + "print(\"% increase in efficiency due to reheating=0.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.13;pg no: 286" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.13, Page:286 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\n", + "For mercury cycle,\n", + "insentropic heat drop=349-234.5 in KJ/kg Hg\n", + "actual heat drop=0.85*114.5 in KJ/kg Hg\n", + "Heat rejected in condenser=(349-97.325-35)in KJ/kg\n", + "heat added in boiler=349-35 in KJ/kg\n", + "For steam cycle,\n", + "Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\n", + "Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\n", + "Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\n", + "Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\n", + "Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\n", + "for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\n", + "state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\n", + "state 4 lies in wet region,say with dryness fraction x4\n", + "s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "Let state 5 lie in wet region with dryness fraction x5,\n", + "s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\n", + "h7=h6+v6*(1-0.075)*10^2 in KJ/kg\n", + "from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\n", + "h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\n", + "Applying heat balance on CFWH1,T1=150oc and also T15=150oc\n", + "m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\n", + "(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\n", + "Applying heat balance on CFEH2,T11=90oc\n", + "m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\n", + "(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\n", + "Heat balance at mixing between CFWH1 and CFWH2,\n", + "(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\n", + "376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\n", + "For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\n", + "from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\n", + "solving above equations,we get\n", + "m1=0.102 kg per kg steam generated\n", + "m2=0.073 kg per kg steam generated\n", + "pump work in process 13-14,h14-h13=v13*(40-8)*10^2\n", + "so h14-h13 in KJ/kg\n", + "Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\n", + "net work per kg of steam,w_net=w_mercury+w_steam\n", + "w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\n", + "thermal efficiency of binary vapour cycle=w_net/q_add 0.55\n", + "in percentage 55.36\n", + "so thermal efficiency=55.36%\n", + "NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.13, Page:286 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\")\n", + "print(\"For mercury cycle,\")\n", + "print(\"insentropic heat drop=349-234.5 in KJ/kg Hg\")\n", + "349-234.5\n", + "print(\"actual heat drop=0.85*114.5 in KJ/kg Hg\")\n", + "0.85*114.5\n", + "print(\"Heat rejected in condenser=(349-97.325-35)in KJ/kg\")\n", + "(349-97.325-35)\n", + "print(\"heat added in boiler=349-35 in KJ/kg\")\n", + "349-35\n", + "print(\"For steam cycle,\")\n", + "print(\"Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\")\n", + "h=2767.13;\n", + "print(\"Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\")\n", + "h2=3330.3;\n", + "print(\"Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\")\n", + "s2=6.9363;\n", + "print(\"Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\")\n", + "h-4.18*150\n", + "print(\"Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\")\n", + "2140.13/216.675\n", + "print(\"for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\")\n", + "h3=2899.23;\n", + "print(\"state 4 lies in wet region,say with dryness fraction x4\")\n", + "print(\"s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.93;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "print(\"Let state 5 lie in wet region with dryness fraction x5,\")\n", + "print(\"s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.828;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h5=hf+x5*hfg\n", + "print(\"Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"h7=h6+v6*(1-0.075)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\")\n", + "h6=168.79;\n", + "v6=0.001008;\n", + "h7=h6+v6*(1-0.075)*10**2\n", + "print(\"h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\")\n", + "h9=417.46;\n", + "h13=721.11;\n", + "print(\"Applying heat balance on CFWH1,T1=150oc and also T15=150oc\")\n", + "T1=150;\n", + "T15=150;\n", + "print(\"m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\")\n", + "print(\"(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\")\n", + "print(\"Applying heat balance on CFEH2,T11=90oc\")\n", + "T11=90;\n", + "print(\"m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\")\n", + "print(\"(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\")\n", + "print(\"Heat balance at mixing between CFWH1 and CFWH2,\")\n", + "print(\"(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\")\n", + "print(\"376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\")\n", + "print(\"For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\")\n", + "h9=417.46;\n", + "v9=0.001043;\n", + "h10=h9+v9*(8-1)*10**2 \n", + "print(\"solving above equations,we get\")\n", + "print(\"m1=0.102 kg per kg steam generated\")\n", + "print(\"m2=0.073 kg per kg steam generated\")\n", + "m1=0.102;\n", + "m2=0.073;\n", + "print(\"pump work in process 13-14,h14-h13=v13*(40-8)*10^2\")\n", + "print(\"so h14-h13 in KJ/kg\")\n", + "v13=0.001252;\n", + "v13*(40-8)*10**2\n", + "print(\"Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\")\n", + "q_add=(9.88*314)+(3330.3-2767.13)\n", + "print(\"net work per kg of steam,w_net=w_mercury+w_steam\")\n", + "print(\"w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\")\n", + "w_net=(9.88*97.325)+((h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*4.006)\n", + "print(\"thermal efficiency of binary vapour cycle=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so thermal efficiency=55.36%\")\n", + "print(\"NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.14;pg no: 288" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.14, Page:288 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\n", + "This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\n", + "For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\n", + "ideally, s2=s1=6.7664 KJ/kg K\n", + "s2=sf at 0.075 bar +x3* sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x3=(s2-sf)/sfg\n", + "h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\n", + "for LP:at inlet of LP steam\n", + "h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\n", + "Enthalpy at exit,h_3LP=2222.34 KJ/kg\n", + "actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\n", + "HP steam consumption at full load=P*0.7457/h_HP in kg/s\n", + "HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\n", + "LP steam consumption at full load=P*0.7457/h_LP in kg/s\n", + "LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\n", + "The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\n", + "or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\n", + "Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\n", + "x=load,hp\n", + "y_HP=m_HP*x+C_HP\n", + "0.254=m_HP*0+C_HP\n", + "so C_HP=0.254\n", + "2.54=m_HP*2500+C_HP\n", + "so m_HP=(2.54-C_HP)/2500\n", + "so y_HP=9.144*10^-4*x_HP+0.254\n", + "Willans line for LP:y_LP=m_LP*x_LP+C_LP\n", + "0.481=m_LP*0+C_LP\n", + "so C_LP=0.481\n", + "4.81=m_LP*2500+C_LP\n", + "so m_LP=(4.81-C_LP)/2500\n", + "so y_LP=1.732*10^-3*x_LP+0.481\n", + "Total output(load) from mixed turbine,x=x_HP+x_LP\n", + "For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\n", + "from y_LP=1.732*10^-3*x_LP+0.481,\n", + "x_LP=(y_LP-0.481)/1.732*10^-3\n", + "since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\n", + "from y_HP=9.144*10^-4*x_HP+C_HP in kg/s 0.63\n", + "so HP steam requirement=0.63 kg/s\n" + ] + } + ], + "source": [ + "#cal of HP steam required\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.14, Page:288 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\")\n", + "n=0.8;#efficiency of both HP and LP turbine\n", + "P=2500;#output in hp\n", + "print(\"This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\")\n", + "print(\"For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\")\n", + "h1=3023.5;\n", + "s1=6.7664;\n", + "print(\"ideally, s2=s1=6.7664 KJ/kg K\")\n", + "s2=s1;\n", + "print(\"s2=sf at 0.075 bar +x3* sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x3=(s2-sf)/sfg\")\n", + "x3=(s2-sf)/sfg\n", + "x3=0.806;#approx.\n", + "print(\"h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0; \n", + "h_3HP=hf+x3*hfg\n", + "print(\"actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\")\n", + "h_HP=(h1-h_3HP)*n\n", + "print(\"for LP:at inlet of LP steam\")\n", + "print(\"h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\")\n", + "h2=2706.7;\n", + "s2=7.1271;\n", + "print(\"Enthalpy at exit,h_3LP=2222.34 KJ/kg\")\n", + "h_3LP=2222.34;\n", + "print(\"actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\")\n", + "h_LP=(h2-h_3LP)*n\n", + "print(\"HP steam consumption at full load=P*0.7457/h_HP in kg/s\")\n", + "P*0.7457/h_HP\n", + "print(\"HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\")\n", + "0.10*(P*0.7457/h_HP)\n", + "print(\"LP steam consumption at full load=P*0.7457/h_LP in kg/s\")\n", + "P*0.7457/h_LP\n", + "print(\"LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\")\n", + "0.10*(P*0.7457/h_LP)\n", + "print(\"The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\")\n", + "print(\"or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\")\n", + "print(\"Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\")\n", + "print(\"x=load,hp\")\n", + "print(\"y_HP=m_HP*x+C_HP\")\n", + "print(\"0.254=m_HP*0+C_HP\")\n", + "print(\"so C_HP=0.254\")\n", + "C_HP=0.254;\n", + "print(\"2.54=m_HP*2500+C_HP\")\n", + "print(\"so m_HP=(2.54-C_HP)/2500\")\n", + "m_HP=(2.54-C_HP)/2500\n", + "print(\"so y_HP=9.144*10^-4*x_HP+0.254\")\n", + "print(\"Willans line for LP:y_LP=m_LP*x_LP+C_LP\")\n", + "print(\"0.481=m_LP*0+C_LP\")\n", + "print(\"so C_LP=0.481\")\n", + "C_LP=0.481;\n", + "print(\"4.81=m_LP*2500+C_LP\")\n", + "print(\"so m_LP=(4.81-C_LP)/2500\")\n", + "m_LP=(4.81-C_LP)/2500\n", + "print(\"so y_LP=1.732*10^-3*x_LP+0.481\")\n", + "print(\"Total output(load) from mixed turbine,x=x_HP+x_LP\")\n", + "print(\"For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\")\n", + "y_LP=1.5;\n", + "print(\"from y_LP=1.732*10^-3*x_LP+0.481,\")\n", + "print(\"x_LP=(y_LP-0.481)/1.732*10^-3\")\n", + "x_LP=(y_LP-0.481)/(1.732*10**-3)\n", + "print(\"since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\")\n", + "x_HP=411.66;\n", + "y_HP=9.144*10**-4*x_HP+C_HP\n", + "print(\"from y_HP=9.144*10^-4*x_HP+C_HP in kg/s\"),round(y_HP,2)\n", + "print(\"so HP steam requirement=0.63 kg/s\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.15;pg no: 289" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.15, Page:289 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\n", + "Let us carry out analysis for 1 kg of steam generated in boiler.\n", + "Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\n", + "state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\n", + "Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\n", + "so x3= 0.86\n", + "from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\n", + "h3=2404.94 KJ/kg\n", + "If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\n", + "mass of moisture retained in separator(m)=(1-x3)*0.5 kg\n", + "Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\n", + "Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\n", + "Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\n", + "(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\n", + "so T in degree celcius= 68.425\n", + "so temperature of water leaving hotwell=68.425 degree celcius\n", + "Applying heat balanced on trap\n", + "0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\n", + "so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\n", + "from steam tables,at 2 bar,hf=504.70 KJ/kg\n", + "Therefore,heat transferred in process heater in KJ/kg steam generated= 1023.172\n", + "so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\n", + "For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\n", + "Let dryness fraction be x10\n", + "s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x10=(s10-sf)/sfg\n", + "h10=hf at 0.075 bar+x10*hfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "so h10=hf+x10*hfg in KJ/kg \n", + "net work output,neglecting pump work per kg of steam generated,\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\n", + "Heat added in boiler per kg steam generated,q_add in KJ/kg= 2674.68\n", + "thermal efficiency=w_net/q_add 0.28\n", + "in percentage 27.59\n", + "so Thermal efficiency=27.58%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,heat transferred and temperature\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.15, Page:289 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\")\n", + "print(\"Let us carry out analysis for 1 kg of steam generated in boiler.\")\n", + "print(\"Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\")\n", + "h2=2960.7;\n", + "s2=6.3615;\n", + "print(\"state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\")\n", + "sf=1.5301;\n", + "sfg=5.5970;\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "print(\"from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\")\n", + "x3=0.863;#approx.\n", + "print(\"h3=2404.94 KJ/kg\")\n", + "h3=2404.94;\n", + "print(\"If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\")\n", + "print(\"mass of moisture retained in separator(m)=(1-x3)*0.5 kg\")\n", + "m=(1-x3)*0.5\n", + "print(\"Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\")\n", + "m_LP=0.5-m\n", + "print(\"Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\")\n", + "print(\"Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\")\n", + "print(\"(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\")\n", + "T=((0.5685*4.18*90)+(0.4315*4.18*40))/4.18\n", + "print(\"so T in degree celcius=\"),round(T,3)\n", + "print(\"so temperature of water leaving hotwell=68.425 degree celcius\")\n", + "print(\"Applying heat balanced on trap\")\n", + "print(\"0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\")\n", + "print(\"so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\")\n", + "print(\"from steam tables,at 2 bar,hf=504.70 KJ/kg\")\n", + "hf=504.70;\n", + "h7=((0.5685*4.18*90)-(0.0685*hf))/0.5\n", + "print(\"Therefore,heat transferred in process heater in KJ/kg steam generated=\"),round(0.5*(h3-h7),3)\n", + "print(\"so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\")\n", + "print(\"For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\")\n", + "s10=s3;\n", + "print(\"Let dryness fraction be x10\")\n", + "print(\"s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x10=(s10-sf)/sfg\")\n", + "x10=(s10-sf)/sfg\n", + "x10=0.754;#approx.\n", + "print(\"h10=hf at 0.075 bar+x10*hfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "print(\"so h10=hf+x10*hfg in KJ/kg \")\n", + "h10=hf+x10*hfg \n", + "print(\"net work output,neglecting pump work per kg of steam generated,\")\n", + "print(\"w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\")\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) \n", + "q_add=(h2-4.18*68.425)\n", + "print(\"Heat added in boiler per kg steam generated,q_add in KJ/kg=\"),round(q_add,2)\n", + "w_net/q_add\n", + "print(\"thermal efficiency=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so Thermal efficiency=27.58%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.16;pg no: 291" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.16, Page:291 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\n", + "from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\n", + "Assuming isentropic expansion in nozzle,s1=s2=6.9486\n", + "Letdryness fraction at state 2,x2=0.864\n", + "s2=sf at 0.2 bar+x2*sfg at 0.2 bar\n", + "from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\n", + "so x2= 0.86\n", + "hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\n", + "from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\n", + "considering pump work to be of isentropic type,deltah_34=v3*deltap_34\n", + "from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\n", + "or deltah_34 in KJ/kg= 7.1\n", + "pump work,Wp in KJ/kg= 7.1\n", + "turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\n", + "net work(W_net)=Wt-Wp in KJ/kg\n", + "power produced(P)=mass flow rate*W_net in KJ/s\n", + "so net power=43.22 MW\n", + "heat supplied in boiler(Q)=(h1-h4) in KJ/kg\n", + "enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\n", + "total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s 114534.05\n", + "thermal efficiency=net work/heat supplied=W_net/Q 0.38\n", + "in percentage 37.73\n", + "so thermal efficiency=37.73%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net power\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.16, Page:291 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\")\n", + "m=35;#mass flow rate in kg/s\n", + "print(\"from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\")\n", + "h1=3530.9;\n", + "s1=6.9486;\n", + "print(\"Assuming isentropic expansion in nozzle,s1=s2=6.9486\")\n", + "s2=s1;\n", + "print(\"Letdryness fraction at state 2,x2=0.864\")\n", + "print(\"s2=sf at 0.2 bar+x2*sfg at 0.2 bar\")\n", + "print(\"from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\")\n", + "sf=0.8320;\n", + "sfg=7.0766;\n", + "x2=(s2-sf)/sfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "x2=0.864;#approx.\n", + "print(\"hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\")\n", + "hf=251.4;\n", + "hfg=2358.3;\n", + "h2=hf+x2*hfg\n", + "print(\"considering pump work to be of isentropic type,deltah_34=v3*deltap_34\")\n", + "print(\"from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\")\n", + "v3=0.001017;\n", + "p3=70;#;pressure of steam entering turbine in bar\n", + "p4=0.20;#condenser pressure in bar\n", + "deltah_34=v3*(p3-p4)*100\n", + "print(\"or deltah_34 in KJ/kg=\"),round(deltah_34,2)\n", + "Wp=deltah_34\n", + "print(\"pump work,Wp in KJ/kg=\"),round(Wp,2)\n", + "print(\"turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\")\n", + "Wt=(h1-h2)\n", + "print(\"net work(W_net)=Wt-Wp in KJ/kg\")\n", + "W_net=Wt-Wp\n", + "print(\"power produced(P)=mass flow rate*W_net in KJ/s\")\n", + "P=m*W_net\n", + "print(\"so net power=43.22 MW\")\n", + "print(\"heat supplied in boiler(Q)=(h1-h4) in KJ/kg\")\n", + "print(\"enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\")\n", + "h3=hf;\n", + "h4=h3+deltah_34 \n", + "Q=m*(h1-h4)\n", + "print(\"total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s\"),round(Q,2)\n", + "print(\"thermal efficiency=net work/heat supplied=W_net/Q\"),round(P/Q,2)\n", + "print(\"in percentage\"),round(P*100/Q,2)\n", + "print(\"so thermal efficiency=37.73%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.17;pg no: 292" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:292 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 17\n", + "from steam tables,h1=3625.3 KJ/s,s1=6.9029 KJ/kg K\n", + "due to isentropic expansion,s1=s2=s3=6.9029 KJ/kg K\n", + "at state 2,i.e at pressure of 2 MPa and entropy 6.9029 KJ/kg K\n", + "by interpolating state for s2 between 2 MPa,300 degree celcius and 2 MPa,350 degree celcius from steam tables,\n", + "h2=3105.08 KJ/kg \n", + "for state 3,i.e at pressure of 0.01 MPa entropy,s3 lies in wet region as s3In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,mass of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.18, Page:294 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 18\")\n", + "W_net=50*10**3;#net output of turbine in KW\n", + "print(\"from steam tables,at inlet to first stage of turbine,h1=h at 100 bar,500oc=3373.7 KJ/kg,s1=s at 100 bar,500oc=6.5966 KJ/kg\")\n", + "h1=3373.7;\n", + "s1=6.5966;\n", + "print(\"Due to isentropic expansion,s1=s6=s2 and s3=s8=s4\")\n", + "s2=s1;\n", + "s6=s2;\n", + "print(\"State at 6 i.e bleed state from HP turbine,temperature by interpolation from steam table =261.6oc.\")\n", + "print(\"At inlet to second stage of turbine,h6=2930.572 KJ/kg\")\n", + "h6=2930.572;\n", + "print(\"h3=h at 10 bar,500oc=3478.5 KJ/kg,s3=s at 10 bar,500oc=7.7622 KJ/kg K\")\n", + "h3=3478.5;\n", + "s3=7.7622;\n", + "s4=s3;\n", + "s8=s4;\n", + "print(\"At exit from first stage of turbine i.e. at 10 bar and entropy of 6.5966 KJ/kg K,Temperature by interpolation from steam table at 10 bar and entropy of 6.5966 KJ/kg K\")\n", + "print(\"T2=181.8oc,h2=2782.8 KJ/kg\")\n", + "T2=181.8;\n", + "h2=2782.8;\n", + "print(\"state at 8,i.e bleed state from second stage of expansion,i.e at 4 bar and entropy of 7.7622 KJ/kg K,Temperature by interpolation from steam table,T8=358.98oc=359oc\")\n", + "T8=359;\n", + "print(\"h8=3188.7 KJ/kg\")\n", + "h8=3188.7;\n", + "print(\"state at 4 i.e. at condenser pressure of 0.1 bar and entropy of 7.7622 KJ/kg K,the state lies in wet region.So let the dryness fraction be x4.\")\n", + "print(\"s4=sf at 0.1 bar+x4*sfg at 0.1 bar\")\n", + "print(\"from steam tables,at 0.1 bar,sf=0.6493 KJ/kg K,sfg=7.5009 KJ/kg K\")\n", + "sf=0.6493;\n", + "sfg=7.5009; \n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.95;#approx.\n", + "print(\"h4=hf at 0.1 bar+x4*hfg at 0.1 bar in KJ/kg \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\")\n", + "hf=191.83;\n", + "hfg=2392.8;\n", + "h4=hf+x4*hfg\n", + "print(\"given,h4=2464.99 KJ/kg,h11=856.8 KJ/kg,h9=hf at 4 bar=604.74 KJ/kg\")\n", + "h4=2464.99;\n", + "h11=856.8;\n", + "h9=604.74;\n", + "print(\"considering pump work,the net output can be given as,\")\n", + "print(\"W_net=W_HPT+W_LPT-(W_CEP+W_FP)\")\n", + "print(\"where,W_HPT={(h1-h6)+(1-m6)*(h6-h2)}per kg of steam from boiler.\")\n", + "print(\"W_LPT={(1-m6)+(h3-h8)*(1-m6-m8)*(h8-h4)}per kg of steam from boiler.\")\n", + "print(\"for closed feed water heater,energy balance yields;\")\n", + "print(\"m6*h6+h10=m6*h7+h11\")\n", + "print(\"assuming condensate leaving closed feed water heater to be saturated liquid,\")\n", + "print(\"h7=hf at 20 bar=908.79 KJ/kg\")\n", + "h7=908.79; \n", + "print(\"due to throttline,h7=h7_a=908.79 KJ/kg\")\n", + "h7_a=h7;\n", + "print(\"for open feed water heater,energy balance yields,\")\n", + "print(\"m6*h7_a+m8*h8+(1-m6-m8)*h5=h9\")\n", + "print(\"for condensate extraction pump,h5-h4_a=v4_a*deltap\")\n", + "print(\"h5-hf at 0.1 bar=vf at 0.1 bar*(4-0.1)*10^2 \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,vf=0.001010 m^3/kg\")\n", + "hf=191.83;\n", + "vf=0.001010; \n", + "h5=hf+vf*(4-0.1)*10**2\n", + "print(\"so h5 in KJ/kg=\"),round(h5,2)\n", + "print(\"for feed pump,h10-h9=v9*deltap\")\n", + "print(\"h10=h9+vf at 4 bar*(100-4)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,vf=0.001084 m^3/kg \")\n", + "hf=604.74;\n", + "vf=0.001084;\n", + "h10=h9+vf*(100-4)*10**2\n", + "print(\"substituting in energy balance upon closed feed water heater,\")\n", + "m6=(h11-h10)/(h6-h7)\n", + "print(\"m6 in kg per kg of steam from boiler=\"),round(m6,3)\n", + "print(\"substituting in energy balance upon feed water heater,\")\n", + "m8=(h9-m6*h7_a+m6*h5-h5)/(h8-h5)\n", + "print(\"m8 in kg per kg of steam from boiler=\"),round(m8,3)\n", + "print(\"Let the mass of steam entering first stage of turbine be m kg,then\")\n", + "{(h1-h6)+(1-m6)*(h6-h2)}\n", + "print(\"W_HPT=m*{(h1-h6)+(1-m6)*(h6-h2)}\")\n", + "print(\"W_HPT/m=\"),round(((h1-h6)+(1-m6)*(h6-h2)),2)\n", + "print(\"so W_HPT=m*573.24 KJ\")\n", + "print(\"also,W_LPT={(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}per kg of steam from boiler\")\n", + "{(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}\n", + "print(\"W_LPT/m=\"),round(((1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)),2)\n", + "print(\"so W_LPT=m*813.42 KJ\")\n", + "print(\"pump works(negative work)\")\n", + "print(\"W_CEP=m*(1-m6-m8)*(h5-h4_a)\")\n", + "h4_a=191.83;#h4_a=hf at 0.1 bar\n", + "print(\"W_CEP/m=\")\n", + "(1-m6-m8)*(h5-h4_a)\n", + "print(\"so W_CEP=m* 0.304\")\n", + "print(\"W_FP=m*(h10-h9)\")\n", + "print(\"W_FP/m=\"),round((h10-h9),2)\n", + "print(\"so W_FP=m*10.41\")\n", + "print(\"net output,\")\n", + "print(\"W_net=W_HPT+W_LPT-W_CEP-W_FP \")\n", + "print(\"so 50*10^3=(573.24*m+813.42*m-0.304*m-10.41*m)\")\n", + "m=W_net/(573.24+813.42-0.304-10.41)\n", + "print(\"so m in kg/s=\"),round(m,2)\n", + "Q_add=m*(h1-h11)\n", + "print(\"heat supplied in boiler,Q_add in KJ/s=\"),round(m*(h1-h11),2)\n", + "print(\"Thermal efficenncy=\"),round(W_net/Q_add,2)\n", + "print(\"in percentage\"),round(W_net*100/Q_add,2)\n", + "print(\"so mass of steam bled at 20 bar=0.119 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam bled at 4 bar=0.109 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam entering first stage=36.33 kg/s\")\n", + "print(\"thermal efficiency=54.66%\")\n", + "print(\"NOTE=>In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb new file mode 100644 index 00000000..5088b9af --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_2.ipynb @@ -0,0 +1,2594 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 8:Vapour Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.1;pg no: 260" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:260 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\n", + "T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\n", + "enthalpy at state 2,h2= hg at 7 MPa\n", + "from steam table,h=2772.1 KJ/kg\n", + "entropy at state 2,s2=sg at 7MPa\n", + "from steam table,s2=5.8133 KJ/kg K\n", + "enthalpy and entropy at state 3,\n", + "from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\n", + "for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \n", + "from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\n", + "s1=s2=sf+x1*sfg\n", + "so x1= 0.68\n", + "from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\n", + "enthalpy at state 1,h1 in KJ/kg= 1802.53\n", + "let dryness fraction at state 4 be x4\n", + "for process 4-3,s4=s3=sf+x4*sfg\n", + "so x4= 0.33\n", + "enthalpy at state 4,h4 in KJ/kg= 962.81\n", + "thermal efficiency=net work/heat added\n", + "expansion work per kg=(h2-h1) in KJ/kg 969.57\n", + "compression work per kg=(h3-h4) in KJ/kg(+ve) 304.19\n", + "heat added per kg=(h2-h3) in KJ/kg(-ve) 1505.1\n", + "net work per kg=(h2-h1)-(h3-h4) in KJ/kg 665.38\n", + "thermal efficiency 0.44\n", + "in percentage 44.21\n", + "so thermal efficiency=44.21%\n", + "turbine work=969.57 KJ/kg(+ve)\n", + "compression work=304.19 KJ/kg(-ve)\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine work,compression work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.1, Page:260 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\")\n", + "print(\"T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\")\n", + "print(\"enthalpy at state 2,h2= hg at 7 MPa\")\n", + "print(\"from steam table,h=2772.1 KJ/kg\")\n", + "h2=2772.1;\n", + "print(\"entropy at state 2,s2=sg at 7MPa\")\n", + "print(\"from steam table,s2=5.8133 KJ/kg K\")\n", + "s2=5.8133;\n", + "print(\"enthalpy and entropy at state 3,\")\n", + "print(\"from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\")\n", + "h3=1267;\n", + "s3=3.1211;\n", + "print(\"for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \")\n", + "s1=s2;\n", + "print(\"from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\")\n", + "sf=0.5564;\n", + "sfg=7.7237;\n", + "print(\"s1=s2=sf+x1*sfg\")\n", + "x1=(s2-sf)/sfg\n", + "print(\"so x1=\"),round(x1,2) \n", + "x1=0.6806;#approx.\n", + "print(\"from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\")\n", + "hf=162.60;\n", + "hfg=2409.54;\n", + "h1=hf+x1*hfg\n", + "print(\"enthalpy at state 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"let dryness fraction at state 4 be x4\")\n", + "print(\"for process 4-3,s4=s3=sf+x4*sfg\")\n", + "s4=s3;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.3321;#approx.\n", + "h4=hf+x4*hfg\n", + "print(\"enthalpy at state 4,h4 in KJ/kg=\"),round(h4,2)\n", + "print(\"thermal efficiency=net work/heat added\")\n", + "(h2-h1)\n", + "print(\"expansion work per kg=(h2-h1) in KJ/kg\"),round((h2-h1),2)\n", + "(h3-h4)\n", + "print(\"compression work per kg=(h3-h4) in KJ/kg(+ve)\"),round((h3-h4),2)\n", + "(h2-h3)\n", + "print(\"heat added per kg=(h2-h3) in KJ/kg(-ve)\"),round((h2-h3),2)\n", + "(h2-h1)-(h3-h4)\n", + "print(\"net work per kg=(h2-h1)-(h3-h4) in KJ/kg\"),round((h2-h1)-(h3-h4),2)\n", + "((h2-h1)-(h3-h4))/(h2-h3)\n", + "print(\"thermal efficiency\"),round(((h2-h1)-(h3-h4))/(h2-h3),2)\n", + "print(\"in percentage\"),round((((h2-h1)-(h3-h4))/(h2-h3))*100,2)\n", + "print(\"so thermal efficiency=44.21%\")\n", + "print(\"turbine work=969.57 KJ/kg(+ve)\")\n", + "print(\"compression work=304.19 KJ/kg(-ve)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.2;pg no: 261" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.2, Page:261 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\n", + "from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\n", + "hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\n", + "from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\n", + "hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\n", + "as process 2-3 is isentropic,so s2=s3\n", + "and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\n", + "so x3= 0.69\n", + "hence enthalpy at 3,\n", + "h3 in KJ/kg= 1819.85\n", + "enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\n", + "process 1-4 is isentropic,so s1=s4\n", + "s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\n", + "so x4= 0.31\n", + "enthalpy at 4,h4 in KJ/kg= 884.31\n", + "enthalpy at 1,h1 in KJ/kg= 1154.23\n", + "carnot cycle(1-2-3-4-1) efficiency:\n", + "n_carnot=net work/heat added\n", + "n_carnot 0.43\n", + "in percentage 42.96\n", + "so n_carnot=42.95%\n", + "In rankine cycle,1-2-3-5-6-1,\n", + "pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg 5.02\n", + "h5 KJ/kg= 137.82\n", + "hence h6 in KJ/kg 142.84\n", + "net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg 969.43\n", + "heat added=(h2-h6)in KJ/kg 2651.46\n", + "rankine cycle efficiency(n_rankine)= 0.37\n", + "in percentage 36.56\n", + "so n_rankine=36.56%\n" + ] + } + ], + "source": [ + "#cal of n_carnot,n_rankine\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.2, Page:261 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\")\n", + "print(\"from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\")\n", + "print(\"hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\")\n", + "hf_5MPa=1154.23;\n", + "sf_5MPa=2.92;\n", + "hg_5MPa=2794.3;\n", + "sg_5MPa=5.97;\n", + "print(\"from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\")\n", + "print(\"hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\")\n", + "hf_5KPa=137.82;\n", + "sf_5KPa=0.4764;\n", + "hg_5KPa=2561.5;\n", + "sg_5KPa=8.3951;\n", + "vf_5KPa=0.001005;\n", + "print(\"as process 2-3 is isentropic,so s2=s3\")\n", + "print(\"and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\")\n", + "s2=sg_5MPa;\n", + "s3=s2;\n", + "x3=(s3-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.694;#approx.\n", + "print(\"hence enthalpy at 3,\")\n", + "h3=hf_5KPa+x3*(hg_5KPa-hf_5KPa)\n", + "print(\"h3 in KJ/kg=\"),round(h3,2)\n", + "print(\"enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\")\n", + "print(\"process 1-4 is isentropic,so s1=s4\")\n", + "s1=sf_5MPa;\n", + "print(\"s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\")\n", + "x4=(s1-sf_5KPa)/(sg_5KPa-sf_5KPa)\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.308;#approx.\n", + "h4=hf_5KPa+x4*(hg_5KPa-hf_5KPa)\n", + "print(\"enthalpy at 4,h4 in KJ/kg=\"),round(h4,2)\n", + "h1=hf_5MPa\n", + "h2=hg_5MPa;\n", + "n_carnot=((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"enthalpy at 1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"carnot cycle(1-2-3-4-1) efficiency:\")\n", + "print(\"n_carnot=net work/heat added\")\n", + "print(\"n_carnot\"),round(n_carnot,2)\n", + "print(\"in percentage\"),round(n_carnot*100,2)\n", + "print(\"so n_carnot=42.95%\")\n", + "print(\"In rankine cycle,1-2-3-5-6-1,\")\n", + "p6=5000;#boiler pressure in KPa\n", + "p5=5;#condenser pressure in KPa\n", + "vf_5KPa*(p6-p5)\n", + "print(\"pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg\"),round(vf_5KPa*(p6-p5),2)\n", + "h5=hf_5KPa;\n", + "print(\"h5 KJ/kg=\"),round(hf_5KPa,2)\n", + "h6=h5+(vf_5KPa*(p6-p5))\n", + "print(\"hence h6 in KJ/kg\"),round(h6,2)\n", + "(h2-h3)-(h6-h5)\n", + "print(\"net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg\"),round((h2-h3)-(h6-h5),2)\n", + "(h2-h6)\n", + "print(\"heat added=(h2-h6)in KJ/kg\"),round((h2-h6),2)\n", + "n_rankine=((h2-h3)-(h6-h5))/(h2-h6)\n", + "print(\"rankine cycle efficiency(n_rankine)=\"),round(n_rankine,2)\n", + "print(\"in percentage\"),round(n_rankine*100,2)\n", + "print(\"so n_rankine=36.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.3;pg no: 263" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.3, Page:263 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\n", + "from steam tables,h2=hg_40bar=3092.5 KJ/kg\n", + "s2=sg_40bar=6.5821 KJ/kg K\n", + "h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \n", + "s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "v4=vf_0.05bar=0.001005 m^3/kg\n", + "let the dryness fraction at state 3 be x3,\n", + "for ideal process,2-3,s2=s3\n", + "s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\n", + "so x3= 0.77\n", + "h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\n", + "for pumping process,\n", + "h1-h4=v4*deltap=v4*(p1-p4)\n", + "so h1=h4+v4*(p1-p4) in KJ/kg 141.83\n", + "pump work per kg of steam in KJ/kg 4.01\n", + "net work per kg of steam =(expansion work-pump work)per kg of steam\n", + "=(h2-h3)-(h1-h4) in KJ/kg= 1081.75\n", + "cycle efficiency=net work/heat added 0.37\n", + "in percentage 36.66\n", + "so net work per kg of steam=1081.74 KJ/kg\n", + "cycle efficiency=36.67%\n", + "pump work per kg of steam=4.02 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of net work per kg of steam,cycle efficiency,pump work per kg of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.3, Page:263 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\")\n", + "print(\"from steam tables,h2=hg_40bar=3092.5 KJ/kg\")\n", + "h2=3092.5;\n", + "print(\"s2=sg_40bar=6.5821 KJ/kg K\")\n", + "s2=6.5821;\n", + "print(\"h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \")\n", + "h4=137.82;\n", + "hfg=2423.7;\n", + "print(\"s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "s4=0.4764;\n", + "sfg=7.9187;\n", + "print(\"v4=vf_0.05bar=0.001005 m^3/kg\")\n", + "v4=0.001005;\n", + "print(\"let the dryness fraction at state 3 be x3,\")\n", + "print(\"for ideal process,2-3,s2=s3\")\n", + "s3=s2;\n", + "print(\"s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\")\n", + "x3=(s2-s4)/(sfg)\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.7711;#approx.\n", + "print(\"h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\")\n", + "h3=h4+x3*hfg\n", + "print(\"for pumping process,\")\n", + "print(\"h1-h4=v4*deltap=v4*(p1-p4)\")\n", + "p1=40*100;#pressure of steam enter in turbine in mPa\n", + "p4=0.05*100;#pressure of steam leave turbine in mPa\n", + "h1=h4+v4*(p1-p4)\n", + "print(\"so h1=h4+v4*(p1-p4) in KJ/kg\"),round(h1,2)\n", + "(h1-h4)\n", + "print(\"pump work per kg of steam in KJ/kg\"),round((h1-h4),2)\n", + "print(\"net work per kg of steam =(expansion work-pump work)per kg of steam\")\n", + "(h2-h3)-(h1-h4)\n", + "print(\"=(h2-h3)-(h1-h4) in KJ/kg=\"),round((h2-h3)-(h1-h4),2)\n", + "print(\"cycle efficiency=net work/heat added\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"so net work per kg of steam=1081.74 KJ/kg\")\n", + "print(\"cycle efficiency=36.67%\")\n", + "print(\"pump work per kg of steam=4.02 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.4;pg no: 264" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.4, Page:264 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 4\n", + "Let us assume that the condensate leaves condenser as saturated liquid and the expansion in turbine and pumping processes are isentropic.\n", + "from steam tables,h2=h_20MPa=3238.2 KJ/kg\n", + "s2=6.1401 KJ/kg K\n", + "h5=h_0.005MPa in KJ/kg\n", + "from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+0.9*hfg in KJ/kg 2319.15\n", + "s5 in KJ/kg K= 7.6\n", + "h6=hf=137.82 KJ/kg\n", + "it is given that temperature at state 4 is 500 degree celcius and due to isentropic processes s4=s5=7.6032 KJ/kg K.The state 4 can be conveniently located on mollier chart by the intersection of 500 degree celcius constant temperature line and entropy value of 7.6032 KJ/kg K and the pressure and enthalpy obtained.but these shall be approximate.\n", + "The state 4 can also be located by interpolation using steam table.The entropy value of 7.6032 KJ/kg K lies between the superheated steam states given under,p=1.20 MPa,s at 1.20 MPa=7.6027 KJ/kg K\n", + "p=1.40 MPa,s at 1.40 MPa=7.6027 KJ/kg K\n", + "by interpolation state 4 lies at pressure=\n", + "=1.399,approx.=1.40 MPa\n", + "thus,steam leaves HP turbine at 1.40 MPa\n", + "enthalpy at state 4,h4=3474.1 KJ/kg\n", + "for process 2-33,s2=s3=6.1401 KJ/kg K.The state 3 thus lies in wet region as s3sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\n", + "From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\n", + "Let dryness fraction at state 9 be x9 so,\n", + "s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\n", + "from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\n", + "x9=(s9-sf)/sfg 0.95\n", + "h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\n", + "from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\n", + "Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\n", + "h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\n", + "h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\n", + "For process 4-8,i.e in CEP.\n", + "h8 in KJ/kg= 138.22\n", + "For process 11-12,i.e in FP2,\n", + "h12=h11+v11*(40-4)*10^2 in KJ/kg 608.64\n", + "For process 13-1_a i.e. in FP1,h1_a= in KJ/kg= 1107.34\n", + "m1*3141.81+(1-m1)*608.64=1087.31\n", + "so m1=(1087.31-608.64)/(3141.81-608.64)in kg\n", + "Applying energy balance on open feed water heater 1 (OFWH1)\n", + "m1*h10+(1-m1)*h12)=1*h13\n", + "so m1 in kg= 0.19\n", + "Applying energy balance on open feed water heater 2 (OFWH2)\n", + "m2*h9+(1-m1-m2)*h8=(1-m1)*h11\n", + "so m2 in kg= 0.15\n", + "Thermal efficiency of cycle,n= 0.51\n", + "W_CEP in KJ/kg steam from boiler= 0.26\n", + "W_FP1=(h1_a-h13)in KJ/kg of steam from boiler 20.0\n", + "W_FP2 in KJ/kg of steam from boiler= 3.17\n", + "W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler= 23.46\n", + "n= 0.51\n", + "in percentage 51.37\n", + "so cycle thermal efficiency,na=46.18%\n", + "nb=49.76%\n", + "nc=51.37%\n", + "hence it is obvious that efficiency increases with increase in number of feed heaters.\n" + ] + } + ], + "source": [ + "#cal of maximum possible work\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.6, Page:267 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 6\")\n", + "print(\"case (a) When there is no feed water heater\")\n", + "print(\"Thermal efficiency of cycle=((h2-h3)-(h1-h4))/(h2-h1)\")\n", + "print(\"from steam tables,h2=h at 200 bar,650oc=3675.3 KJ/kg,s2=s at 200 bar,650oc=6.6582 KJ/kg K,h4=hf at 0.05 bar=137.82 KJ/kg,v4=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h2=3675.3;\n", + "s2=6.6582;\n", + "h4=137.82;\n", + "v4=0.001005;\n", + "print(\"hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg,sf at 0.05 bar=0.4764 KJ/kg K,sfg at 0.05 bar=7.9187 KJ/kg K\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "print(\"For process 2-3,s2=s3.Let dryness fraction at 3 be x3.\")\n", + "s3=s2;\n", + "print(\"s3=6.6582=sf at 0.05 bar+x3*sfg at 0.05 bar\")\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.781;#approx.\n", + "print(\"h3=hf at 0.05 bar+x3*hfg at 0.05 bar in KJ/kg\")\n", + "h3=hf+x3*hfg\n", + "print(\"For pumping process 4-1,\")\n", + "print(\"h1-h4=v4*deltap\")\n", + "h1=h4+v4*(200-0.5)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2)\n", + "((h2-h3)-(h1-h4))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n", + "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n", + "print(\"case (b) When there is only one feed water heater working at 8 bar\")\n", + "print(\"here,let mass of steam bled for feed heating be m kg\")\n", + "print(\"For process 2-6,s2=s6=6.6582 KJ/kg K\")\n", + "s6=s2;\n", + "print(\"Let dryness fraction at state 6 be x6\")\n", + "print(\"s6=sf at 8 bar+x6*sfg at 8 bar\")\n", + "print(\"from steam tables,hf at 8 bar=721.11 KJ/kg,vf at 8 bar=0.001115 m^3/kg,hfg at 8 bar=2048 KJ/kg,sf at 8 bar=2.0462 KJ/kg K,sfg at 8 bar=4.6166 KJ/kg K\")\n", + "hf=721.11;\n", + "vf=0.001115;\n", + "hfg=2048;\n", + "sf=2.0462;\n", + "sfg=4.6166;\n", + "x6=(s6-sf)/sfg\n", + "print(\"substituting entropy values,x6=\"),round(x6,2)\n", + "x6=0.999;#approx.\n", + "print(\"h6=hf at at 8 bar+x6*hfg at 8 bar in KJ/kg\")\n", + "h6=hf+x6*hfg\n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at 8 bar.h7=hf at 8 bar=721.11 KJ/kg\")\n", + "h7=721.11;\n", + "h5=h4+v4*(8-.05)*10**2\n", + "print(\"For process 4-5,h5 in KJ/kg\"),round(h5,2)\n", + "print(\"Applying energy balance at open feed water heater,\")\n", + "print(\"m*h6+(1-m)*h5=1*h7\")\n", + "m=(h7-h5)/(h6-h5)\n", + "print(\"so m= in kg\"),round(m,2)\n", + "h7=hf;\n", + "v7=vf;\n", + "h1=h7+v7*(200-8)*10**2\n", + "print(\"For process 7-1,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"here h7=hf at 8 bar,v7=vf at 8 bar\")\n", + "#TE=((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7))/(h2-h1)\n", + "print(\"Thermal efficiency of cycle=0.4976\")\n", + "print(\"in percentage=49.76\")\n", + "print(\"case (c) When there are two feed water heaters working at 40 bar and 4 bar\")\n", + "print(\"here, let us assume the mass of steam at 40 bar,4 bar to be m1 kg and m2 kg respectively.\")\n", + "print(\"2-10-9-3,s2=s10=s9=s3=6.6582 KJ/kg K\")\n", + "s3=s2;\n", + "s9=s3;\n", + "s10=s9;\n", + "print(\"At state 10.s10>sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\")\n", + "print(\"From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\")\n", + "T10=370.6;\n", + "h10=3141.81;\n", + "print(\"Let dryness fraction at state 9 be x9 so,\") \n", + "print(\"s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\")\n", + "print(\"from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\")\n", + "sf=1.7766;\n", + "sfg=5.1193;\n", + "x9=(s9-sf)/sfg\n", + "print(\"x9=(s9-sf)/sfg\"),round(x9,2)\n", + "x9=0.9536;#approx.\n", + "print(\"h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\")\n", + "hf=604.74;\n", + "hfg=2133.8;\n", + "h9=hf+x9*hfg \n", + "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\")\n", + "print(\"h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\")\n", + "h11=604.74;\n", + "v11=0.001084;\n", + "print(\"h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\")\n", + "h13=1087.31;\n", + "v13=0.001252;\n", + "print(\"For process 4-8,i.e in CEP.\")\n", + "h8=h4+v4*(4-0.05)*10**2\n", + "print(\"h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"For process 11-12,i.e in FP2,\")\n", + "h12=h11+v11*(40-4)*10**2\n", + "print(\"h12=h11+v11*(40-4)*10^2 in KJ/kg\"),round(h12,2)\n", + "h1_a=h13+v13*(200-40)*10**2\n", + "print(\"For process 13-1_a i.e. in FP1,h1_a= in KJ/kg=\"),round(h1_a,2)\n", + "print(\"m1*3141.81+(1-m1)*608.64=1087.31\")\n", + "print(\"so m1=(1087.31-608.64)/(3141.81-608.64)in kg\")\n", + "m1=(1087.31-608.64)/(3141.81-608.64)\n", + "print(\"Applying energy balance on open feed water heater 1 (OFWH1)\")\n", + "print(\"m1*h10+(1-m1)*h12)=1*h13\")\n", + "m1=(h13-h12)/(h10-h12)\n", + "print(\"so m1 in kg=\"),round(m1,2)\n", + "print(\"Applying energy balance on open feed water heater 2 (OFWH2)\")\n", + "print(\"m2*h9+(1-m1-m2)*h8=(1-m1)*h11\")\n", + "m2=(1-m1)*(h11-h8)/(h9-h8)\n", + "print(\"so m2 in kg=\"),round(m2,2)\n", + "W_CEP=(1-m1-m2)*(h8-h4)\n", + "W_FP1=(h1_a-h13)\n", + "W_FP2=(1-m1)*(h12-h11)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"Thermal efficiency of cycle,n=\"),round(n,2)\n", + "print(\"W_CEP in KJ/kg steam from boiler=\"),round(W_CEP,2)\n", + "print(\"W_FP1=(h1_a-h13)in KJ/kg of steam from boiler\"),round(W_FP1)\n", + "print(\"W_FP2 in KJ/kg of steam from boiler=\"),round(W_FP2,2)\n", + "W_CEP+W_FP1+W_FP2\n", + "print(\"W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler=\"),round(W_CEP+W_FP1+W_FP2,2)\n", + "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n", + "print(\"n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so cycle thermal efficiency,na=46.18%\")\n", + "print(\"nb=49.76%\")\n", + "print(\"nc=51.37%\")\n", + "print(\"hence it is obvious that efficiency increases with increase in number of feed heaters.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.7;pg no: 272" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.7, Page:272 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\n", + "from steam tables,\n", + "h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\n", + "s3=s2=6.9759 KJ/kg K\n", + "by interpolation from steam tables,\n", + "T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\n", + "for expansion process 4-5,s4=s5=7.7938 KJ/kg K\n", + "let dryness fraction at state 5 be x5\n", + "s5=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x5= 0.92\n", + "h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "for process 6-1 in feed pump,h1 in KJ/kg= 142.84\n", + "cycle efficiency=W_net/Q_add\n", + "Wt in KJ/kg= 1510.35\n", + "W_pump=(h1-h6)in KJ/kg 5.02\n", + "W_net=Wt-W_pump in KJ/kg 1505.33\n", + "Q_add in KJ/kg= 3290.96\n", + "cycle efficiency= 0.4574\n", + "in percentage= 45.74\n", + "we know ,1 hp=0.7457 KW\n", + "specific steam consumption in kg/hp hr= 1.78\n", + "work ratio=net work/positive work 0.9967\n", + "so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,specific steam consumption,work ratio\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.7, Page:272 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\")\n", + "print(\"from steam tables,\")\n", + "print(\"h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\")\n", + "h2=3433.8;\n", + "s2=6.9759;\n", + "print(\"s3=s2=6.9759 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"by interpolation from steam tables,\")\n", + "print(\"T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\")\n", + "T3=183.14;\n", + "h3=2818.03;\n", + "h4=3271.9;\n", + "s4=7.7938;\n", + "print(\"for expansion process 4-5,s4=s5=7.7938 KJ/kg K\")\n", + "s5=s4;\n", + "print(\"let dryness fraction at state 5 be x5\")\n", + "print(\"s5=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.924;#approx.\n", + "print(\"h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "p1=50.;#steam generation pressure in bar\n", + "p6=0.05;#steam entering temperature in turbine in bar\n", + "h1=h6+v6*(p1-p6)*100\n", + "print(\"for process 6-1 in feed pump,h1 in KJ/kg=\"),round(h1,2)\n", + "print(\"cycle efficiency=W_net/Q_add\")\n", + "Wt=(h2-h3)+(h4-h5)\n", + "print(\"Wt in KJ/kg=\"),round(Wt,2)\n", + "W_pump=(h1-h6)\n", + "print(\"W_pump=(h1-h6)in KJ/kg\"),round(W_pump,2)\n", + "W_net=Wt-W_pump\n", + "print(\"W_net=Wt-W_pump in KJ/kg\"),round(W_net,2)\n", + "Q_add=(h2-h1)\n", + "print(\"Q_add in KJ/kg=\"),round(Q_add,2)\n", + "print(\"cycle efficiency=\"),round(W_net/Q_add,4)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"we know ,1 hp=0.7457 KW\")\n", + "print(\"specific steam consumption in kg/hp hr=\"),round(0.7457*3600/W_net,2)\n", + "print(\"work ratio=net work/positive work\"),round(W_net/Wt,4)\n", + "print(\"so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.8;pg no: 273" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.8, Page:273 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\n", + "from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\n", + "h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\n", + "Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\n", + "h8=hf at 3 bar=561.47 KJ/kg\n", + "for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\n", + "Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\n", + "s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\n", + "from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\n", + "so x3= 0.95\n", + "s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "so x4= 0.79\n", + "thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\n", + "here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\n", + "h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\n", + "pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\n", + "for mixing process between condenser and feed pump,\n", + "(1-m)*h5+m*h9=1*h6\n", + "h6=m(h9-h5)+h5\n", + "we get,h6=137.82+m*423.65\n", + "therefore h7=h6+6.02=143.84+m*423.65\n", + "Applying energy balance at closed feed water heater;\n", + "m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\n", + "so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\n", + "so m=0.144 kg\n", + "steam bled for feed heating=0.144 kg/kg steam generated\n", + "The net power output,W_net in KJ/kg steam generated= 1167.27\n", + "mass of steam required to be generated in kg/s= 26.23\n", + "or in kg/hr\n", + "so capacity of boiler required=94428 kg/hr\n", + "overall thermal efficiency=W_net/Q_add\n", + "here Q_add in KJ/kg= 3134.56\n", + "overall thermal efficiency= 0.37\n", + "in percentage= 37.24\n", + "so overall thermal efficiency=37.24%\n" + ] + } + ], + "source": [ + "#cal of mass of steam bled for feed heating,capacity of boiler required,overall thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.8, Page:273 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\")\n", + "T_cond=115;#condensate temperature in degree celcius\n", + "Cp=4.18;#specific heat at constant pressure in KJ/kg K\n", + "P=30*10**3;#actual alternator output in KW\n", + "n_boiler=0.9;#boiler efficiency\n", + "n_alternator=0.98;#alternator efficiency\n", + "print(\"from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\")\n", + "h2=3301.8;\n", + "s2=6.7193;\n", + "print(\"h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\")\n", + "h5=137.82;\n", + "v5=0.001005;\n", + "print(\"Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\")\n", + "print(\"h8=hf at 3 bar=561.47 KJ/kg\")\n", + "h8=561.47;\n", + "print(\"for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "print(\"Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\")\n", + "print(\"s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\")\n", + "print(\"from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\")\n", + "sf_3bar=1.6718;\n", + "sfg_3bar=5.3201;\n", + "x3=(s3-sf_3bar)/sfg_3bar\n", + "print(\"so x3=\"),round(x3,2)\n", + "x3=0.949;#approx.\n", + "print(\"s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.788;#approx.\n", + "print(\"thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\")\n", + "print(\"here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\")\n", + "hf_3bar=561.47;\n", + "hfg_3bar=2163.8;\n", + "h3=hf_3bar+x3*hfg_3bar \n", + "print(\"h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h4=hf+x4*hfg\n", + "print(\"assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\")\n", + "h9=h8;\n", + "v6=v5;\n", + "print(\"pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\")\n", + "p1=60;#pressure of steam in high pressure turbine in bar\n", + "p5=0.05;#pressure of steam in low pressure turbine in bar\n", + "v5*(p1-p5)*100\n", + "print(\"for mixing process between condenser and feed pump,\")\n", + "print(\"(1-m)*h5+m*h9=1*h6\")\n", + "print(\"h6=m(h9-h5)+h5\")\n", + "print(\"we get,h6=137.82+m*423.65\")\n", + "print(\"therefore h7=h6+6.02=143.84+m*423.65\")\n", + "print(\"Applying energy balance at closed feed water heater;\")\n", + "print(\"m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\")\n", + "print(\"so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\")\n", + "print(\"so m=0.144 kg\")\n", + "m=0.144;\n", + "h6=137.82+m*423.65;\n", + "h7=143.84+m*423.65;\n", + "print(\"steam bled for feed heating=0.144 kg/kg steam generated\")\n", + "W_net=(h2-h3)+(1-m)*(h3-h4)-(1-m)*(h7-h6)\n", + "print(\"The net power output,W_net in KJ/kg steam generated=\"),round(W_net,2)\n", + "P/(n_alternator*W_net)\n", + "print(\"mass of steam required to be generated in kg/s=\"),round(P/(n_alternator*W_net),2)\n", + "print(\"or in kg/hr\")\n", + "26.23*3600\n", + "print(\"so capacity of boiler required=94428 kg/hr\")\n", + "print(\"overall thermal efficiency=W_net/Q_add\")\n", + "Q_add=(h2-Cp*T_cond)/n_boiler\n", + "print(\"here Q_add in KJ/kg=\"),round(Q_add,2) \n", + "W_net/Q_add\n", + "print(\"overall thermal efficiency=\"),round(W_net/Q_add,2)\n", + "W_net*100/Q_add\n", + "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n", + "print(\"so overall thermal efficiency=37.24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.9;pg no: 275" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.9, Page:275 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\n", + "At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\n", + "For ideal expansion process,s2=s3\n", + "By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\n", + "actual stste at exit of first stage,h3_a in KJ/kg= 2909.88\n", + "actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K= 7.1075\n", + "for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "so x4= 0.96\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "actual enthalpy at exit from second stage,h4_a in KJ/kg= 2646.48\n", + "actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\n", + "so x4_a= 0.99\n", + "x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\n", + "for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5= 0.87\n", + "h5=2270.43 KJ/kg\n", + "actual enthalpy at exit from third stage,h5_a in KJ/kg= 2345.64\n", + "Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\n", + "By heat balance on first closed feed water heater,(see schematic arrangement)\n", + "h11=hf at 6 bar=670.56 KJ\n", + "m1*h3_a+h10=m1*h11+4.18*150\n", + "(m1*2829.63)+h10=(m1*670.56)+627\n", + "h10+2159.07*m1=627\n", + "By heat balance on second closed feed water heater,(see schematic arrangement)\n", + "h7=hf at 1 bar=417.46 KJ/kg\n", + "m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\n", + "m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\n", + "m2*2467.27-m1*179.2-238.26=0\n", + "heat balance at point of mixing,\n", + "h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\n", + "neglecting pump work,h7=h8\n", + "h10=m2*417.46+(1-m1-m2)*397.1\n", + "substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\n", + "Turbine output per kg of steam generated,Wt in KJ/kg of steam generated= 780.445\n", + "Rate of steam generation required in kg/s= 19.22\n", + "in kg/hr\n", + "capacity of drain pump i.e. FP shown in layout in kg/hr= 16273.96\n", + "so capacity of drain pump=16273.96 kg/hr\n" + ] + } + ], + "source": [ + "#cal of capacity of drain pump\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.9, Page:275 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\")\n", + "P=15*10**3;#turbine output in KW\n", + "print(\"At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\")\n", + "h2=3230.9;\n", + "s2=6.9212;\n", + "print(\"For ideal expansion process,s2=s3\")\n", + "s3=s2;\n", + "print(\"By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\")\n", + "T3=190.97;\n", + "h3=2829.63;\n", + "h3_a=h2-0.8*(h2-h3)\n", + "print(\"actual stste at exit of first stage,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "s3_a=7.1075;\n", + "print(\"actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K=\"),round(s3_a,4)\n", + "print(\"for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\")\n", + "s4=7.1075;\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.958;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "h4_a=h3_a-.8*(h3_a-h4)\n", + "print(\"actual enthalpy at exit from second stage,h4_a in KJ/kg=\"),round(h4_a,2)\n", + "print(\"actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\")\n", + "x4_a=(h4_a-hf)/hfg\n", + "print(\"so x4_a=\"),round(x4_a,2)\n", + "print(\"x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\")\n", + "s4_a=7.2806;\n", + "print(\"for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s4_a-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.8735;#approx.\n", + "print(\"h5=2270.43 KJ/kg\")\n", + "h5=2270.43;\n", + "h5_a=h4_a-0.8*(h4_a-h5)\n", + "print(\"actual enthalpy at exit from third stage,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\")\n", + "print(\"By heat balance on first closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h11=hf at 6 bar=670.56 KJ\")\n", + "h11=670.56;\n", + "print(\"m1*h3_a+h10=m1*h11+4.18*150\")\n", + "print(\"(m1*2829.63)+h10=(m1*670.56)+627\")\n", + "print(\"h10+2159.07*m1=627\")\n", + "print(\"By heat balance on second closed feed water heater,(see schematic arrangement)\")\n", + "print(\"h7=hf at 1 bar=417.46 KJ/kg\")\n", + "h7=417.46;\n", + "print(\"m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\")\n", + "print(\"m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\")\n", + "print(\"m2*2467.27-m1*179.2-238.26=0\")\n", + "print(\"heat balance at point of mixing,\")\n", + "print(\"h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\")\n", + "print(\"neglecting pump work,h7=h8\")\n", + "print(\"h10=m2*417.46+(1-m1-m2)*397.1\")\n", + "print(\"substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\")\n", + "m1=0.1293;\n", + "m2=0.1059;\n", + "Wt=(h2-h3_a)+(1-m1)*(h3_a-h4_a)+(1-m1-m2)*(h4_a-h5_a)\n", + "print(\"Turbine output per kg of steam generated,Wt in KJ/kg of steam generated=\"),round(Wt,3)\n", + "P/Wt\n", + "print(\"Rate of steam generation required in kg/s=\"),round(P/Wt,2)\n", + "print(\"in kg/hr\")\n", + "P*3600/Wt\n", + "(m1+m2)*69192\n", + "print(\"capacity of drain pump i.e. FP shown in layout in kg/hr=\"),round((m1+m2)*69192,2)\n", + "print(\"so capacity of drain pump=16273.96 kg/hr\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.10;pg no: 277" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.10, Page:277 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\n", + "at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\n", + "By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\n", + "actual enthapy at 3_a,h3_a in KJ/kg= 3097.0\n", + "enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\n", + "for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\n", + "s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x6= 0.83\n", + "h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "for actual expansion process in LP turbine.\n", + "h6_a=h4-0.85*(h4-h6) in KJ/kg 2319.4\n", + "Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\n", + "s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\n", + "from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\n", + "so x5= 1.0\n", + "h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\n", + "from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\n", + "actual enthalpy,h5_a in KJ/kg= 2790.16\n", + "enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\n", + "specific volume at inlet of CEP,v7=0.001008 m^3/kg\n", + "enthalpy at inlet of CEP,h7=168.79 KJ/kg\n", + "for pumping process 7-8,h8 in KJ/kg= 169.15\n", + "Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\n", + "m*h5+(1-m)*h8=h9\n", + "so m in kg /kg of steam generated= 0.33\n", + "For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\n", + "h1= in KJ/kg= 1015.59\n", + "Net work per kg of steam generated,W_net=in KJ/kg steam generated= 938.83\n", + "heat added per kg of steam generated,q_add in KJ/kg of steam generated= 2405.41\n", + "Thermal efficiency,n= 0.39\n", + "in percentage= 39.03\n", + "so thermal efficiency=39.03%%\n", + "NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.10, Page:277 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\")\n", + "print(\"at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\")\n", + "h2=3287.1;\n", + "s2=6.6327;\n", + "print(\"By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\")\n", + "h3=3049.48;\n", + "h3_a=h2-0.80*(h2-h3)\n", + "print(\"actual enthapy at 3_a,h3_a in KJ/kg=\"),round(h3_a,2)\n", + "print(\"enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\")\n", + "h4=3230.9;\n", + "s4=6.9212;\n", + "print(\"for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\")\n", + "s6=s4;\n", + "print(\"s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x6=(s6-sf)/sfg\n", + "print(\"so x6=\"),round(x6,2)\n", + "x6=0.827;#approx.\n", + "print(\"h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h6=hf+x6*hfg\n", + "print(\"for actual expansion process in LP turbine.\")\n", + "h6_a=h4-0.85*(h4-h6)\n", + "print(\"h6_a=h4-0.85*(h4-h6) in KJ/kg\"),round(h6_a,2)\n", + "print(\"Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\")\n", + "p5=3.61;\n", + "s5=s4;\n", + "print(\"s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\")\n", + "print(\"from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\")\n", + "sf=1.7391;\n", + "sfg=5.1908;\n", + "x5=(s5-sf)/sfg\n", + "print(\"so x5=\"),round(x5,2)\n", + "x5=0.99;#approx.\n", + "print(\"h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\")\n", + "print(\"from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\")\n", + "hf=589.13;\n", + "hfg=2144.7;\n", + "h5=hf+x5*hfg\n", + "h5_a=h4-0.85*(h4-h5)\n", + "print(\"actual enthalpy,h5_a in KJ/kg=\"),round(h5_a,2)\n", + "print(\"enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\")\n", + "h9=1008.42;\n", + "print(\"specific volume at inlet of CEP,v7=0.001008 m^3/kg\")\n", + "v7=0.001008;\n", + "print(\"enthalpy at inlet of CEP,h7=168.79 KJ/kg\")\n", + "h7=168.79;\n", + "h8=h7+v7*(3.61-0.075)*10**2\n", + "print(\"for pumping process 7-8,h8 in KJ/kg=\"),round(h8,2)\n", + "print(\"Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\")\n", + "print(\"m*h5+(1-m)*h8=h9\")\n", + "m=(h9-h8)/(h5-h8)\n", + "print(\"so m in kg /kg of steam generated=\"),round(m,2)\n", + "print(\"For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\")\n", + "v9=0.00108;\n", + "h1=h9+v9*(70-3.61)*10**2\n", + "print(\"h1= in KJ/kg=\"),round(h1,2) \n", + "W_net=(h2-h3_a)+(h4-h5_a)+(1-m)*(h5_a-h6_a)-((1-m)*(h8-h7)+(h1-h9))\n", + "print(\"Net work per kg of steam generated,W_net=in KJ/kg steam generated=\"),round(W_net,2)\n", + "q_add=(h2-h1)+(h4-h3_a)\n", + "print(\"heat added per kg of steam generated,q_add in KJ/kg of steam generated=\"),round(q_add,2)\n", + "n=W_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "n=n*100\n", + "print(\"in percentage=\"),round(n,2)\n", + "print(\"so thermal efficiency=39.03%%\")\n", + "print(\"NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.11;pg no: 279" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.11, Page:279 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\n", + "Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\n", + "for isentropic expansion 2-3-4-5,s2=s3=s4=s5\n", + "Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\n", + "s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\n", + "so x3=(s3-sf)/sfg\n", + "from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\n", + "h3=hf+x3*hfg in KJ/kg\n", + "from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\n", + "s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\n", + "so h4=hf+x4*hfg in KJ/kg\n", + "from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\n", + "s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n", + "h6=hf at 0.05 bar=137.82 KJ/kg\n", + "v6=vf at 0.05 bar=0.001005 m^3/kg\n", + "h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\n", + "h8=hf at 1.5 bar=467.11 KJ/kg\n", + "v8=0.001053 m^3/kg=vf at 1.5 bar\n", + "h9=h8+v8*(150-1.5)*10^2 in KJ/kg\n", + "h10=hf at 150 bar=1610.5 KJ/kg\n", + "v10=0.001658 m^3/kg=vf at 150 bar\n", + "h12=h10+v10*(150-10)*10^2 in KJ/kg\n", + "Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\n", + "Heat balance on closed feed water heater yields,\n", + "m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\n", + "so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\n", + "heat balance on open feed water can be given as under,\n", + "m2*h4+(1-m1-m2)*h7=(1-m1)*h8\n", + "so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\n", + "for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\n", + "For mixing after closed feed water heater,\n", + "h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\n", + "Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\n", + "heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\n", + "cycle thermal efficiency,n=W_net/q_add 0.48\n", + "in percentage 47.59\n", + "Net power developed in KW=1219*300 in KW 365700.0\n", + "cycle thermal efficiency=47.6%\n", + "Net power developed=365700 KW\n" + ] + } + ], + "source": [ + "#cal of cycle thermal efficiency,Net power developed\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.11, Page:279 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\")\n", + "print(\"Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\")\n", + "h2=3308.6;\n", + "s2=6.3443;\n", + "print(\"for isentropic expansion 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\")\n", + "print(\"s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\")\n", + "print(\"so x3=(s3-sf)/sfg\")\n", + "print(\"from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\")\n", + "sf=2.1387;\n", + "sfg=4.4478;\n", + "x3=(s3-sf)/sfg\n", + "x3=0.945;#approx.\n", + "print(\"h3=hf+x3*hfg in KJ/kg\")\n", + "print(\"from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\")\n", + "hf=762.81;\n", + "hfg=2015.3;\n", + "h3=hf+x3*hfg\n", + "print(\"s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\")\n", + "sf=1.4336;\n", + "sfg=5.7897;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.848;#approx.\n", + "print(\"so h4=hf+x4*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\")\n", + "hf=467.11;\n", + "hfg=2226.5;\n", + "h4=hf+x4*hfg\n", + "print(\"s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n", + "sf=0.4764;\n", + "sfg=7.9187;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.739;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n", + "hf=137.82;\n", + "hfg=2423.7;\n", + "h5=hf+x5*hfg \n", + "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n", + "h6=137.82;\n", + "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n", + "v6=0.001005;\n", + "print(\"h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\")\n", + "h7=h6+v6*(1.5-0.05)*10**2\n", + "print(\"h8=hf at 1.5 bar=467.11 KJ/kg\")\n", + "h8=467.11; \n", + "print(\"v8=0.001053 m^3/kg=vf at 1.5 bar\")\n", + "v8=0.001053;\n", + "print(\"h9=h8+v8*(150-1.5)*10^2 in KJ/kg\")\n", + "h9=h8+v8*(150-1.5)*10**2\n", + "print(\"h10=hf at 150 bar=1610.5 KJ/kg\")\n", + "h10=1610.5; \n", + "print(\"v10=0.001658 m^3/kg=vf at 150 bar\")\n", + "v10=0.001658;\n", + "print(\"h12=h10+v10*(150-10)*10^2 in KJ/kg\")\n", + "h12=h10+v10*(150-10)*10**2\n", + "print(\"Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"Heat balance on closed feed water heater yields,\")\n", + "print(\"m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\")\n", + "print(\"so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\")\n", + "m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)\n", + "print(\"heat balance on open feed water can be given as under,\")\n", + "print(\"m2*h4+(1-m1-m2)*h7=(1-m1)*h8\")\n", + "print(\"so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\")\n", + "m2=((1-m1)*(h8-h7))/(h4-h7)\n", + "print(\"for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\")\n", + "print(\"For mixing after closed feed water heater,\")\n", + "print(\"h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\")\n", + "h1=(4.18*150)*(1-m1)+m1*h12\n", + "print(\"Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\")\n", + "print(\"W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\")\n", + "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10)))\n", + "print(\"heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\")\n", + "q_add=(h2-h1)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=W_net/q_add\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"Net power developed in KW=1219*300 in KW\"),round(1219*300,2)\n", + "print(\"cycle thermal efficiency=47.6%\")\n", + "print(\"Net power developed=365700 KW\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.12;pg no: 282" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.12, Page:282 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\n", + "At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\n", + "state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\n", + "since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\n", + "At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n", + "At state 3,h3=2930.57 KJ/kg\n", + "At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\n", + "At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\n", + "From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\n", + "Let dryness fraction at state 5_a be x5,\n", + "s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x5_a=(s5_a-sf)/sfg\n", + "h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\n", + "m1_a*h3+h9=m1*h10+4.18*200\n", + "so m1_a=(4.18*200-h9)/(h3-h10) in kg\n", + "Applying heat balance at open feed water heater,\n", + "m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\n", + "so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\n", + "Net work per kg steam generated\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\n", + "Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\n", + "Thermal efficiency,n= 0.45\n", + "in percentage 45.04\n", + "% increase in thermal efficiency due to reheating= 0.56\n", + "so thermal efficiency of reheat cycle=45.03%\n", + "% increase in efficiency due to reheating=0.56%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,steam generation rate\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.12, Page:282 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\")\n", + "P=100*10**3;#net power output in KW\n", + "print(\"At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\")\n", + "T3=261.6;\n", + "h3=2930.57;\n", + "print(\"since s4 For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\")\n", + "print(\"At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n", + "h2=3373.7;\n", + "s2=6.5966;\n", + "print(\"At state 3,h3=2930.57 KJ/kg\")\n", + "h3=2930.57;\n", + "print(\"At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\")\n", + "h3_a=3247.6;\n", + "s3_a=7.1271;\n", + "print(\"At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\")\n", + "s4_a=s3_a;\n", + "s5_a=s4_a;\n", + "print(\"From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\")\n", + "h4_a=2841.02;\n", + "print(\"Let dryness fraction at state 5_a be x5,\")\n", + "print(\"s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "print(\"so x5_a=(s5_a-sf)/sfg\")\n", + "x5_a=(s5_a-sf)/sfg\n", + "x5_a=0.853;#approx.\n", + "print(\"h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "h5_a=hf+x5_a*hfg\n", + "print(\"Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\")\n", + "print(\"m1_a*h3+h9=m1*h10+4.18*200\")\n", + "print(\"so m1_a=(4.18*200-h9)/(h3-h10) in kg\")\n", + "m1_a=(4.18*200-h9)/(h3-h10)\n", + "m1_a=0.114;#approx.\n", + "print(\"Applying heat balance at open feed water heater,\")\n", + "print(\"m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\")\n", + "print(\"so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\")\n", + "m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7)\n", + "m2_a=0.131;#approx.\n", + "print(\"Net work per kg steam generated\")\n", + "print(\"w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\")\n", + "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-((1-m1_a-m2_a)*(h7-h6)+(h9-h8))\n", + "print(\"Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\")\n", + "q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)\n", + "n=w_net/q_add\n", + "print(\"Thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"% increase in thermal efficiency due to reheating=\"),round((0.4503-0.4478)*100/0.4478,2)\n", + "print(\"so thermal efficiency of reheat cycle=45.03%\")\n", + "print(\"% increase in efficiency due to reheating=0.56%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.13;pg no: 286" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.13, Page:286 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\n", + "For mercury cycle,\n", + "insentropic heat drop=349-234.5 in KJ/kg Hg\n", + "actual heat drop=0.85*114.5 in KJ/kg Hg\n", + "Heat rejected in condenser=(349-97.325-35)in KJ/kg\n", + "heat added in boiler=349-35 in KJ/kg\n", + "For steam cycle,\n", + "Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\n", + "Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\n", + "Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\n", + "Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\n", + "Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\n", + "for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\n", + "state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\n", + "state 4 lies in wet region,say with dryness fraction x4\n", + "s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\n", + "so x4=(s4-sf)/sfg\n", + "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n", + "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n", + "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n", + "Let state 5 lie in wet region with dryness fraction x5,\n", + "s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\n", + "so x5=(s5-sf)/sfg\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "h5=hf+x5*hfg in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\n", + "h7=h6+v6*(1-0.075)*10^2 in KJ/kg\n", + "from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\n", + "h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\n", + "Applying heat balance on CFWH1,T1=150oc and also T15=150oc\n", + "m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\n", + "(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\n", + "Applying heat balance on CFEH2,T11=90oc\n", + "m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\n", + "(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\n", + "Heat balance at mixing between CFWH1 and CFWH2,\n", + "(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\n", + "376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\n", + "For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\n", + "from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\n", + "solving above equations,we get\n", + "m1=0.102 kg per kg steam generated\n", + "m2=0.073 kg per kg steam generated\n", + "pump work in process 13-14,h14-h13=v13*(40-8)*10^2\n", + "so h14-h13 in KJ/kg\n", + "Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\n", + "net work per kg of steam,w_net=w_mercury+w_steam\n", + "w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\n", + "thermal efficiency of binary vapour cycle=w_net/q_add 0.55\n", + "in percentage 55.36\n", + "so thermal efficiency=55.36%\n", + "NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.13, Page:286 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\")\n", + "print(\"For mercury cycle,\")\n", + "print(\"insentropic heat drop=349-234.5 in KJ/kg Hg\")\n", + "349-234.5\n", + "print(\"actual heat drop=0.85*114.5 in KJ/kg Hg\")\n", + "0.85*114.5\n", + "print(\"Heat rejected in condenser=(349-97.325-35)in KJ/kg\")\n", + "(349-97.325-35)\n", + "print(\"heat added in boiler=349-35 in KJ/kg\")\n", + "349-35\n", + "print(\"For steam cycle,\")\n", + "print(\"Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\")\n", + "h=2767.13;\n", + "print(\"Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\")\n", + "h2=3330.3;\n", + "print(\"Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\")\n", + "s2=6.9363;\n", + "print(\"Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\")\n", + "h-4.18*150\n", + "print(\"Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\")\n", + "2140.13/216.675\n", + "print(\"for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\")\n", + "s3=s2;\n", + "s4=s3;\n", + "s5=s4;\n", + "print(\"state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\")\n", + "h3=2899.23;\n", + "print(\"state 4 lies in wet region,say with dryness fraction x4\")\n", + "print(\"s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\")\n", + "print(\"so x4=(s4-sf)/sfg\")\n", + "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n", + "sf=1.3026;\n", + "sfg=6.0568;\n", + "x4=(s4-sf)/sfg\n", + "x4=0.93;#approx.\n", + "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n", + "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n", + "hf=417.46;\n", + "hfg=2258.0;\n", + "h4=hf+x4*hfg\n", + "print(\"Let state 5 lie in wet region with dryness fraction x5,\")\n", + "print(\"s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n", + "print(\"so x5=(s5-sf)/sfg\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "x5=(s5-sf)/sfg\n", + "x5=0.828;#approx.\n", + "print(\"h5=hf+x5*hfg in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "h5=hf+x5*hfg\n", + "print(\"Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\")\n", + "print(\"h7=h6+v6*(1-0.075)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\")\n", + "h6=168.79;\n", + "v6=0.001008;\n", + "h7=h6+v6*(1-0.075)*10**2\n", + "print(\"h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\")\n", + "h9=417.46;\n", + "h13=721.11;\n", + "print(\"Applying heat balance on CFWH1,T1=150oc and also T15=150oc\")\n", + "T1=150;\n", + "T15=150;\n", + "print(\"m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\")\n", + "print(\"(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\")\n", + "print(\"Applying heat balance on CFEH2,T11=90oc\")\n", + "T11=90;\n", + "print(\"m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\")\n", + "print(\"(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\")\n", + "print(\"Heat balance at mixing between CFWH1 and CFWH2,\")\n", + "print(\"(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\")\n", + "print(\"376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\")\n", + "print(\"For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\")\n", + "h9=417.46;\n", + "v9=0.001043;\n", + "h10=h9+v9*(8-1)*10**2 \n", + "print(\"solving above equations,we get\")\n", + "print(\"m1=0.102 kg per kg steam generated\")\n", + "print(\"m2=0.073 kg per kg steam generated\")\n", + "m1=0.102;\n", + "m2=0.073;\n", + "print(\"pump work in process 13-14,h14-h13=v13*(40-8)*10^2\")\n", + "print(\"so h14-h13 in KJ/kg\")\n", + "v13=0.001252;\n", + "v13*(40-8)*10**2\n", + "print(\"Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\")\n", + "q_add=(9.88*314)+(3330.3-2767.13)\n", + "print(\"net work per kg of steam,w_net=w_mercury+w_steam\")\n", + "print(\"w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\")\n", + "w_net=(9.88*97.325)+((h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*4.006)\n", + "print(\"thermal efficiency of binary vapour cycle=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so thermal efficiency=55.36%\")\n", + "print(\"NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.14;pg no: 288" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.14, Page:288 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\n", + "This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\n", + "For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\n", + "ideally, s2=s1=6.7664 KJ/kg K\n", + "s2=sf at 0.075 bar +x3* sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x3=(s2-sf)/sfg\n", + "h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\n", + "for LP:at inlet of LP steam\n", + "h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\n", + "Enthalpy at exit,h_3LP=2222.34 KJ/kg\n", + "actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\n", + "HP steam consumption at full load=P*0.7457/h_HP in kg/s\n", + "HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\n", + "LP steam consumption at full load=P*0.7457/h_LP in kg/s\n", + "LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\n", + "The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\n", + "or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\n", + "Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\n", + "x=load,hp\n", + "y_HP=m_HP*x+C_HP\n", + "0.254=m_HP*0+C_HP\n", + "so C_HP=0.254\n", + "2.54=m_HP*2500+C_HP\n", + "so m_HP=(2.54-C_HP)/2500\n", + "so y_HP=9.144*10^-4*x_HP+0.254\n", + "Willans line for LP:y_LP=m_LP*x_LP+C_LP\n", + "0.481=m_LP*0+C_LP\n", + "so C_LP=0.481\n", + "4.81=m_LP*2500+C_LP\n", + "so m_LP=(4.81-C_LP)/2500\n", + "so y_LP=1.732*10^-3*x_LP+0.481\n", + "Total output(load) from mixed turbine,x=x_HP+x_LP\n", + "For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\n", + "from y_LP=1.732*10^-3*x_LP+0.481,\n", + "x_LP=(y_LP-0.481)/1.732*10^-3\n", + "since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\n", + "from y_HP=9.144*10^-4*x_HP+C_HP in kg/s 0.63\n", + "so HP steam requirement=0.63 kg/s\n" + ] + } + ], + "source": [ + "#cal of HP steam required\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.14, Page:288 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\")\n", + "n=0.8;#efficiency of both HP and LP turbine\n", + "P=2500;#output in hp\n", + "print(\"This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\")\n", + "print(\"For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\")\n", + "h1=3023.5;\n", + "s1=6.7664;\n", + "print(\"ideally, s2=s1=6.7664 KJ/kg K\")\n", + "s2=s1;\n", + "print(\"s2=sf at 0.075 bar +x3* sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x3=(s2-sf)/sfg\")\n", + "x3=(s2-sf)/sfg\n", + "x3=0.806;#approx.\n", + "print(\"h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0; \n", + "h_3HP=hf+x3*hfg\n", + "print(\"actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\")\n", + "h_HP=(h1-h_3HP)*n\n", + "print(\"for LP:at inlet of LP steam\")\n", + "print(\"h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\")\n", + "h2=2706.7;\n", + "s2=7.1271;\n", + "print(\"Enthalpy at exit,h_3LP=2222.34 KJ/kg\")\n", + "h_3LP=2222.34;\n", + "print(\"actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\")\n", + "h_LP=(h2-h_3LP)*n\n", + "print(\"HP steam consumption at full load=P*0.7457/h_HP in kg/s\")\n", + "P*0.7457/h_HP\n", + "print(\"HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\")\n", + "0.10*(P*0.7457/h_HP)\n", + "print(\"LP steam consumption at full load=P*0.7457/h_LP in kg/s\")\n", + "P*0.7457/h_LP\n", + "print(\"LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\")\n", + "0.10*(P*0.7457/h_LP)\n", + "print(\"The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\")\n", + "print(\"or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\")\n", + "print(\"Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\")\n", + "print(\"x=load,hp\")\n", + "print(\"y_HP=m_HP*x+C_HP\")\n", + "print(\"0.254=m_HP*0+C_HP\")\n", + "print(\"so C_HP=0.254\")\n", + "C_HP=0.254;\n", + "print(\"2.54=m_HP*2500+C_HP\")\n", + "print(\"so m_HP=(2.54-C_HP)/2500\")\n", + "m_HP=(2.54-C_HP)/2500\n", + "print(\"so y_HP=9.144*10^-4*x_HP+0.254\")\n", + "print(\"Willans line for LP:y_LP=m_LP*x_LP+C_LP\")\n", + "print(\"0.481=m_LP*0+C_LP\")\n", + "print(\"so C_LP=0.481\")\n", + "C_LP=0.481;\n", + "print(\"4.81=m_LP*2500+C_LP\")\n", + "print(\"so m_LP=(4.81-C_LP)/2500\")\n", + "m_LP=(4.81-C_LP)/2500\n", + "print(\"so y_LP=1.732*10^-3*x_LP+0.481\")\n", + "print(\"Total output(load) from mixed turbine,x=x_HP+x_LP\")\n", + "print(\"For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\")\n", + "y_LP=1.5;\n", + "print(\"from y_LP=1.732*10^-3*x_LP+0.481,\")\n", + "print(\"x_LP=(y_LP-0.481)/1.732*10^-3\")\n", + "x_LP=(y_LP-0.481)/(1.732*10**-3)\n", + "print(\"since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\")\n", + "x_HP=411.66;\n", + "y_HP=9.144*10**-4*x_HP+C_HP\n", + "print(\"from y_HP=9.144*10^-4*x_HP+C_HP in kg/s\"),round(y_HP,2)\n", + "print(\"so HP steam requirement=0.63 kg/s\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.15;pg no: 289" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.15, Page:289 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\n", + "Let us carry out analysis for 1 kg of steam generated in boiler.\n", + "Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\n", + "state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\n", + "Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\n", + "so x3= 0.86\n", + "from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\n", + "h3=2404.94 KJ/kg\n", + "If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\n", + "mass of moisture retained in separator(m)=(1-x3)*0.5 kg\n", + "Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\n", + "Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\n", + "Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\n", + "(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\n", + "so T in degree celcius= 68.425\n", + "so temperature of water leaving hotwell=68.425 degree celcius\n", + "Applying heat balanced on trap\n", + "0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\n", + "so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\n", + "from steam tables,at 2 bar,hf=504.70 KJ/kg\n", + "Therefore,heat transferred in process heater in KJ/kg steam generated= 1023.172\n", + "so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\n", + "For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\n", + "Let dryness fraction be x10\n", + "s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n", + "so x10=(s10-sf)/sfg\n", + "h10=hf at 0.075 bar+x10*hfg at 0.075 bar\n", + "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n", + "so h10=hf+x10*hfg in KJ/kg \n", + "net work output,neglecting pump work per kg of steam generated,\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\n", + "Heat added in boiler per kg steam generated,q_add in KJ/kg= 2674.68\n", + "thermal efficiency=w_net/q_add 0.28\n", + "in percentage 27.59\n", + "so Thermal efficiency=27.58%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,heat transferred and temperature\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.15, Page:289 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\")\n", + "print(\"Let us carry out analysis for 1 kg of steam generated in boiler.\")\n", + "print(\"Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\")\n", + "h2=2960.7;\n", + "s2=6.3615;\n", + "print(\"state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\")\n", + "s3=s2;\n", + "print(\"Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\")\n", + "sf=1.5301;\n", + "sfg=5.5970;\n", + "x3=(s3-sf)/sfg\n", + "print(\"so x3=\"),round(x3,2)\n", + "print(\"from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\")\n", + "x3=0.863;#approx.\n", + "print(\"h3=2404.94 KJ/kg\")\n", + "h3=2404.94;\n", + "print(\"If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\")\n", + "print(\"mass of moisture retained in separator(m)=(1-x3)*0.5 kg\")\n", + "m=(1-x3)*0.5\n", + "print(\"Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\")\n", + "m_LP=0.5-m\n", + "print(\"Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\")\n", + "print(\"Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\")\n", + "print(\"(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\")\n", + "T=((0.5685*4.18*90)+(0.4315*4.18*40))/4.18\n", + "print(\"so T in degree celcius=\"),round(T,3)\n", + "print(\"so temperature of water leaving hotwell=68.425 degree celcius\")\n", + "print(\"Applying heat balanced on trap\")\n", + "print(\"0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\")\n", + "print(\"so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\")\n", + "print(\"from steam tables,at 2 bar,hf=504.70 KJ/kg\")\n", + "hf=504.70;\n", + "h7=((0.5685*4.18*90)-(0.0685*hf))/0.5\n", + "print(\"Therefore,heat transferred in process heater in KJ/kg steam generated=\"),round(0.5*(h3-h7),3)\n", + "print(\"so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\")\n", + "print(\"For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\")\n", + "s10=s3;\n", + "print(\"Let dryness fraction be x10\")\n", + "print(\"s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n", + "sf=0.5764;\n", + "sfg=7.6750;\n", + "print(\"so x10=(s10-sf)/sfg\")\n", + "x10=(s10-sf)/sfg\n", + "x10=0.754;#approx.\n", + "print(\"h10=hf at 0.075 bar+x10*hfg at 0.075 bar\")\n", + "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n", + "hf=168.79;\n", + "hfg=2406.0;\n", + "print(\"so h10=hf+x10*hfg in KJ/kg \")\n", + "h10=hf+x10*hfg \n", + "print(\"net work output,neglecting pump work per kg of steam generated,\")\n", + "print(\"w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\")\n", + "w_net=(h2-h3)*1+0.4315*(h3-h10) \n", + "q_add=(h2-4.18*68.425)\n", + "print(\"Heat added in boiler per kg steam generated,q_add in KJ/kg=\"),round(q_add,2)\n", + "w_net/q_add\n", + "print(\"thermal efficiency=w_net/q_add\"),round(w_net/q_add,2)\n", + "print(\"in percentage\"),round(w_net*100/q_add,2)\n", + "print(\"so Thermal efficiency=27.58%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.16;pg no: 291" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.16, Page:291 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\n", + "from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\n", + "Assuming isentropic expansion in nozzle,s1=s2=6.9486\n", + "Letdryness fraction at state 2,x2=0.864\n", + "s2=sf at 0.2 bar+x2*sfg at 0.2 bar\n", + "from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\n", + "so x2= 0.86\n", + "hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\n", + "from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\n", + "considering pump work to be of isentropic type,deltah_34=v3*deltap_34\n", + "from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\n", + "or deltah_34 in KJ/kg= 7.1\n", + "pump work,Wp in KJ/kg= 7.1\n", + "turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\n", + "net work(W_net)=Wt-Wp in KJ/kg\n", + "power produced(P)=mass flow rate*W_net in KJ/s\n", + "so net power=43.22 MW\n", + "heat supplied in boiler(Q)=(h1-h4) in KJ/kg\n", + "enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\n", + "total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s 114534.05\n", + "thermal efficiency=net work/heat supplied=W_net/Q 0.38\n", + "in percentage 37.73\n", + "so thermal efficiency=37.73%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net power\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.16, Page:291 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\")\n", + "m=35;#mass flow rate in kg/s\n", + "print(\"from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\")\n", + "h1=3530.9;\n", + "s1=6.9486;\n", + "print(\"Assuming isentropic expansion in nozzle,s1=s2=6.9486\")\n", + "s2=s1;\n", + "print(\"Letdryness fraction at state 2,x2=0.864\")\n", + "print(\"s2=sf at 0.2 bar+x2*sfg at 0.2 bar\")\n", + "print(\"from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\")\n", + "sf=0.8320;\n", + "sfg=7.0766;\n", + "x2=(s2-sf)/sfg\n", + "print(\"so x2=\"),round(x2,2)\n", + "x2=0.864;#approx.\n", + "print(\"hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\")\n", + "print(\"from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\")\n", + "hf=251.4;\n", + "hfg=2358.3;\n", + "h2=hf+x2*hfg\n", + "print(\"considering pump work to be of isentropic type,deltah_34=v3*deltap_34\")\n", + "print(\"from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\")\n", + "v3=0.001017;\n", + "p3=70;#;pressure of steam entering turbine in bar\n", + "p4=0.20;#condenser pressure in bar\n", + "deltah_34=v3*(p3-p4)*100\n", + "print(\"or deltah_34 in KJ/kg=\"),round(deltah_34,2)\n", + "Wp=deltah_34\n", + "print(\"pump work,Wp in KJ/kg=\"),round(Wp,2)\n", + "print(\"turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\")\n", + "Wt=(h1-h2)\n", + "print(\"net work(W_net)=Wt-Wp in KJ/kg\")\n", + "W_net=Wt-Wp\n", + "print(\"power produced(P)=mass flow rate*W_net in KJ/s\")\n", + "P=m*W_net\n", + "print(\"so net power=43.22 MW\")\n", + "print(\"heat supplied in boiler(Q)=(h1-h4) in KJ/kg\")\n", + "print(\"enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\")\n", + "h3=hf;\n", + "h4=h3+deltah_34 \n", + "Q=m*(h1-h4)\n", + "print(\"total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s\"),round(Q,2)\n", + "print(\"thermal efficiency=net work/heat supplied=W_net/Q\"),round(P/Q,2)\n", + "print(\"in percentage\"),round(P*100/Q,2)\n", + "print(\"so thermal efficiency=37.73%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 8.17;pg no: 292" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 8.1, Page:292 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 17\n", + "from steam tables,h1=3625.3 KJ/s,s1=6.9029 KJ/kg K\n", + "due to isentropic expansion,s1=s2=s3=6.9029 KJ/kg K\n", + "at state 2,i.e at pressure of 2 MPa and entropy 6.9029 KJ/kg K\n", + "by interpolating state for s2 between 2 MPa,300 degree celcius and 2 MPa,350 degree celcius from steam tables,\n", + "h2=3105.08 KJ/kg \n", + "for state 3,i.e at pressure of 0.01 MPa entropy,s3 lies in wet region as s3In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,mass of steam\n", + "#intiation of all variables\n", + "# Chapter 8\n", + "print\"Example 8.18, Page:294 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 18\")\n", + "W_net=50*10**3;#net output of turbine in KW\n", + "print(\"from steam tables,at inlet to first stage of turbine,h1=h at 100 bar,500oc=3373.7 KJ/kg,s1=s at 100 bar,500oc=6.5966 KJ/kg\")\n", + "h1=3373.7;\n", + "s1=6.5966;\n", + "print(\"Due to isentropic expansion,s1=s6=s2 and s3=s8=s4\")\n", + "s2=s1;\n", + "s6=s2;\n", + "print(\"State at 6 i.e bleed state from HP turbine,temperature by interpolation from steam table =261.6oc.\")\n", + "print(\"At inlet to second stage of turbine,h6=2930.572 KJ/kg\")\n", + "h6=2930.572;\n", + "print(\"h3=h at 10 bar,500oc=3478.5 KJ/kg,s3=s at 10 bar,500oc=7.7622 KJ/kg K\")\n", + "h3=3478.5;\n", + "s3=7.7622;\n", + "s4=s3;\n", + "s8=s4;\n", + "print(\"At exit from first stage of turbine i.e. at 10 bar and entropy of 6.5966 KJ/kg K,Temperature by interpolation from steam table at 10 bar and entropy of 6.5966 KJ/kg K\")\n", + "print(\"T2=181.8oc,h2=2782.8 KJ/kg\")\n", + "T2=181.8;\n", + "h2=2782.8;\n", + "print(\"state at 8,i.e bleed state from second stage of expansion,i.e at 4 bar and entropy of 7.7622 KJ/kg K,Temperature by interpolation from steam table,T8=358.98oc=359oc\")\n", + "T8=359;\n", + "print(\"h8=3188.7 KJ/kg\")\n", + "h8=3188.7;\n", + "print(\"state at 4 i.e. at condenser pressure of 0.1 bar and entropy of 7.7622 KJ/kg K,the state lies in wet region.So let the dryness fraction be x4.\")\n", + "print(\"s4=sf at 0.1 bar+x4*sfg at 0.1 bar\")\n", + "print(\"from steam tables,at 0.1 bar,sf=0.6493 KJ/kg K,sfg=7.5009 KJ/kg K\")\n", + "sf=0.6493;\n", + "sfg=7.5009; \n", + "x4=(s4-sf)/sfg\n", + "print(\"so x4=\"),round(x4,2)\n", + "x4=0.95;#approx.\n", + "print(\"h4=hf at 0.1 bar+x4*hfg at 0.1 bar in KJ/kg \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\")\n", + "hf=191.83;\n", + "hfg=2392.8;\n", + "h4=hf+x4*hfg\n", + "print(\"given,h4=2464.99 KJ/kg,h11=856.8 KJ/kg,h9=hf at 4 bar=604.74 KJ/kg\")\n", + "h4=2464.99;\n", + "h11=856.8;\n", + "h9=604.74;\n", + "print(\"considering pump work,the net output can be given as,\")\n", + "print(\"W_net=W_HPT+W_LPT-(W_CEP+W_FP)\")\n", + "print(\"where,W_HPT={(h1-h6)+(1-m6)*(h6-h2)}per kg of steam from boiler.\")\n", + "print(\"W_LPT={(1-m6)+(h3-h8)*(1-m6-m8)*(h8-h4)}per kg of steam from boiler.\")\n", + "print(\"for closed feed water heater,energy balance yields;\")\n", + "print(\"m6*h6+h10=m6*h7+h11\")\n", + "print(\"assuming condensate leaving closed feed water heater to be saturated liquid,\")\n", + "print(\"h7=hf at 20 bar=908.79 KJ/kg\")\n", + "h7=908.79; \n", + "print(\"due to throttline,h7=h7_a=908.79 KJ/kg\")\n", + "h7_a=h7;\n", + "print(\"for open feed water heater,energy balance yields,\")\n", + "print(\"m6*h7_a+m8*h8+(1-m6-m8)*h5=h9\")\n", + "print(\"for condensate extraction pump,h5-h4_a=v4_a*deltap\")\n", + "print(\"h5-hf at 0.1 bar=vf at 0.1 bar*(4-0.1)*10^2 \")\n", + "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,vf=0.001010 m^3/kg\")\n", + "hf=191.83;\n", + "vf=0.001010; \n", + "h5=hf+vf*(4-0.1)*10**2\n", + "print(\"so h5 in KJ/kg=\"),round(h5,2)\n", + "print(\"for feed pump,h10-h9=v9*deltap\")\n", + "print(\"h10=h9+vf at 4 bar*(100-4)*10^2 in KJ/kg\")\n", + "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,vf=0.001084 m^3/kg \")\n", + "hf=604.74;\n", + "vf=0.001084;\n", + "h10=h9+vf*(100-4)*10**2\n", + "print(\"substituting in energy balance upon closed feed water heater,\")\n", + "m6=(h11-h10)/(h6-h7)\n", + "print(\"m6 in kg per kg of steam from boiler=\"),round(m6,3)\n", + "print(\"substituting in energy balance upon feed water heater,\")\n", + "m8=(h9-m6*h7_a+m6*h5-h5)/(h8-h5)\n", + "print(\"m8 in kg per kg of steam from boiler=\"),round(m8,3)\n", + "print(\"Let the mass of steam entering first stage of turbine be m kg,then\")\n", + "{(h1-h6)+(1-m6)*(h6-h2)}\n", + "print(\"W_HPT=m*{(h1-h6)+(1-m6)*(h6-h2)}\")\n", + "print(\"W_HPT/m=\"),round(((h1-h6)+(1-m6)*(h6-h2)),2)\n", + "print(\"so W_HPT=m*573.24 KJ\")\n", + "print(\"also,W_LPT={(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}per kg of steam from boiler\")\n", + "{(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}\n", + "print(\"W_LPT/m=\"),round(((1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)),2)\n", + "print(\"so W_LPT=m*813.42 KJ\")\n", + "print(\"pump works(negative work)\")\n", + "print(\"W_CEP=m*(1-m6-m8)*(h5-h4_a)\")\n", + "h4_a=191.83;#h4_a=hf at 0.1 bar\n", + "print(\"W_CEP/m=\")\n", + "(1-m6-m8)*(h5-h4_a)\n", + "print(\"so W_CEP=m* 0.304\")\n", + "print(\"W_FP=m*(h10-h9)\")\n", + "print(\"W_FP/m=\"),round((h10-h9),2)\n", + "print(\"so W_FP=m*10.41\")\n", + "print(\"net output,\")\n", + "print(\"W_net=W_HPT+W_LPT-W_CEP-W_FP \")\n", + "print(\"so 50*10^3=(573.24*m+813.42*m-0.304*m-10.41*m)\")\n", + "m=W_net/(573.24+813.42-0.304-10.41)\n", + "print(\"so m in kg/s=\"),round(m,2)\n", + "Q_add=m*(h1-h11)\n", + "print(\"heat supplied in boiler,Q_add in KJ/s=\"),round(m*(h1-h11),2)\n", + "print(\"Thermal efficenncy=\"),round(W_net/Q_add,2)\n", + "print(\"in percentage\"),round(W_net*100/Q_add,2)\n", + "print(\"so mass of steam bled at 20 bar=0.119 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam bled at 4 bar=0.109 kg per kg of steam entering first stage\")\n", + "print(\"mass of steam entering first stage=36.33 kg/s\")\n", + "print(\"thermal efficiency=54.66%\")\n", + "print(\"NOTE=>In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter9.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9.ipynb new file mode 100755 index 00000000..606321b3 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9.ipynb @@ -0,0 +1,1655 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 9:Gas Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.1;pg no: 334" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.1, Page:334 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\n", + "SI engine operate on otto cycle.consider working fluid to be perfect gas.\n", + "here,y=Cp/Cv\n", + "Cp-Cv=R in KJ/kg K\n", + "compression ratio,r=V1/V2=(0.15+V2)/V2\n", + "so V2=0.15/(r-1) in m^3\n", + "so V2=0.03 m^3\n", + "total cylinder volume=V1=r*V2 m^3\n", + "from perfect gas law,P*V=m*R*T\n", + "so m=P1*V1/(R*T1) in kg\n", + "from state 1 to 2 by P*V^y=P2*V2^y\n", + "so P2=P1*(V1/V2)^y in KPa\n", + "also,P1*V1/T1=P2*V2/T2\n", + "so T2=P2*V2*T1/(P1*V1)in K\n", + "from heat addition process 2-3\n", + "Q23=m*CV*(T3-T2)\n", + "T3=T2+(Q23/(m*Cv))in K\n", + "also from,P3*V3/T3=P2*V2/T2\n", + "P3=P2*V2*T3/(V3*T2) in KPa\n", + "for adiabatic expansion 3-4,\n", + "P3*V3^y=P4*V4^y\n", + "and V4=V1\n", + "hence,P4=P3*V3^y/V1^y in KPa\n", + "and from P3*V3/T3=P4*V4/T4\n", + "T4=P4*V4*T3/(P3*V3) in K\n", + "entropy change from 2-3 and 4-1 are same,and can be given as,\n", + "S3-S2=S4-S1=m*Cv*log(T4/T1)\n", + "so entropy change,deltaS_32=deltaS_41 in KJ/K\n", + "heat rejected,Q41=m*Cv*(T4-T1) in KJ\n", + "net work(W) in KJ= 76.75\n", + "efficiency(n)= 0.51\n", + "in percentage 51.16\n", + "mean effective pressure(mep)=work/volume change in KPa= 511.64\n", + "so mep=511.67 KPa\n" + ] + } + ], + "source": [ + "#cal of mean effective pressure\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.1, Page:334 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\")\n", + "Cp=1;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "P1=98;#pressure at begining of compression in KPa\n", + "T1=(60+273.15);#temperature at begining of compression in K\n", + "Q23=150;#heat supplied in KJ/kg\n", + "r=6;#compression ratio\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"SI engine operate on otto cycle.consider working fluid to be perfect gas.\")\n", + "print(\"here,y=Cp/Cv\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"Cp-Cv=R in KJ/kg K\")\n", + "R=Cp-Cv\n", + "print(\"compression ratio,r=V1/V2=(0.15+V2)/V2\")\n", + "print(\"so V2=0.15/(r-1) in m^3\")\n", + "V2=0.15/(r-1)\n", + "print(\"so V2=0.03 m^3\")\n", + "print(\"total cylinder volume=V1=r*V2 m^3\")\n", + "V1=r*V2\n", + "print(\"from perfect gas law,P*V=m*R*T\")\n", + "print(\"so m=P1*V1/(R*T1) in kg\")\n", + "m=P1*V1/(R*T1)\n", + "m=0.183;#approx.\n", + "print(\"from state 1 to 2 by P*V^y=P2*V2^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in KPa\")\n", + "P2=P1*(V1/V2)**y\n", + "print(\"also,P1*V1/T1=P2*V2/T2\")\n", + "print(\"so T2=P2*V2*T1/(P1*V1)in K\")\n", + "T2=P2*V2*T1/(P1*V1)\n", + "print(\"from heat addition process 2-3\")\n", + "print(\"Q23=m*CV*(T3-T2)\")\n", + "print(\"T3=T2+(Q23/(m*Cv))in K\")\n", + "T3=T2+(Q23/(m*Cv))\n", + "print(\"also from,P3*V3/T3=P2*V2/T2\")\n", + "print(\"P3=P2*V2*T3/(V3*T2) in KPa\")\n", + "V3=V2;#constant volume process\n", + "P3=P2*V2*T3/(V3*T2) \n", + "print(\"for adiabatic expansion 3-4,\")\n", + "print(\"P3*V3^y=P4*V4^y\")\n", + "print(\"and V4=V1\")\n", + "V4=V1;\n", + "print(\"hence,P4=P3*V3^y/V1^y in KPa\")\n", + "P4=P3*V3**y/V1**y\n", + "print(\"and from P3*V3/T3=P4*V4/T4\")\n", + "print(\"T4=P4*V4*T3/(P3*V3) in K\")\n", + "T4=P4*V4*T3/(P3*V3)\n", + "print(\"entropy change from 2-3 and 4-1 are same,and can be given as,\")\n", + "print(\"S3-S2=S4-S1=m*Cv*log(T4/T1)\")\n", + "print(\"so entropy change,deltaS_32=deltaS_41 in KJ/K\")\n", + "deltaS_32=m*Cv*math.log(T4/T1)\n", + "deltaS_41=deltaS_32;\n", + "print(\"heat rejected,Q41=m*Cv*(T4-T1) in KJ\")\n", + "Q41=m*Cv*(T4-T1)\n", + "W=Q23-Q41\n", + "print(\"net work(W) in KJ=\"),round(W,2)\n", + "n=W/Q23\n", + "print(\"efficiency(n)=\"),round(W/Q23,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "mep=W/0.15\n", + "print(\"mean effective pressure(mep)=work/volume change in KPa=\"),round(W/0.15,2)\n", + "print(\"so mep=511.67 KPa\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.2;pg no: 336" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.2, Page:336 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\n", + "as given\n", + "Va=V2+(7/8)*(V1-V2)\n", + "Vb=V2+(1/8)*(V1-V2)\n", + "and also\n", + "Pa*Va^y=Pb*Vb^y\n", + "so (Va/Vb)=(Pb/Pa)^(1/y)\n", + "also substituting for Va and Vb\n", + "(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\n", + "so V1/V2=r=1+(4.18*8/1.82) 19.37\n", + "it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\n", + "as given;cut off occurs at(V1-V2)/15 volume\n", + "V3=V2+(V1-V2)/15\n", + "cut off ratio,rho=V3/V2\n", + "air standard efficiency for diesel cycle(n_airstandard)= 0.63\n", + "in percentage 63.23\n", + "overall efficiency(n_overall)=n_airstandard*n_ite*n_mech 0.253\n", + "in percentage 25.3\n", + "fuel consumption,bhp/hr in kg= 0.26\n", + "so compression ratio=19.37\n", + "air standard efficiency=63.25%\n", + "fuel consumption,bhp/hr=0.255 kg\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.2, Page:336 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\")\n", + "Pa=138;#pressure during compression at 1/8 of stroke in KPa\n", + "Pb=1.38*10**3;#pressure during compression at 7/8 of stroke in KPa\n", + "n_ite=0.5;#indicated thermal efficiency\n", + "n_mech=0.8;#mechanical efficiency\n", + "C=41800;#calorific value in KJ/kg\n", + "y=1.4;#expansion constant\n", + "print(\"as given\")\n", + "print(\"Va=V2+(7/8)*(V1-V2)\")\n", + "print(\"Vb=V2+(1/8)*(V1-V2)\")\n", + "print(\"and also\")\n", + "print(\"Pa*Va^y=Pb*Vb^y\")\n", + "print(\"so (Va/Vb)=(Pb/Pa)^(1/y)\")\n", + "(Pb/Pa)**(1/y)\n", + "print(\"also substituting for Va and Vb\")\n", + "print(\"(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\")\n", + "r=1+(4.18*8/1.82)\n", + "print(\"so V1/V2=r=1+(4.18*8/1.82)\"),round(r,2)\n", + "print(\"it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\")\n", + "print(\"as given;cut off occurs at(V1-V2)/15 volume\")\n", + "print(\"V3=V2+(V1-V2)/15\")\n", + "print(\"cut off ratio,rho=V3/V2\")\n", + "rho=1+(r-1)/15\n", + "n_airstandard=1-(1/(r**(y-1)*y))*((rho**y-1)/(rho-1))\n", + "print(\"air standard efficiency for diesel cycle(n_airstandard)=\"),round(n_airstandard,2)\n", + "print(\"in percentage\"),round(n_airstandard*100,2)\n", + "n_airstandard=0.6325;\n", + "n_overall=n_airstandard*n_ite*n_mech\n", + "print(\"overall efficiency(n_overall)=n_airstandard*n_ite*n_mech\"),round(n_overall,3)\n", + "print(\"in percentage\"),round(n_overall*100,2)\n", + "n_overall=0.253;\n", + "75*60*60/(n_overall*C*100)\n", + "print(\"fuel consumption,bhp/hr in kg=\"),round(75*60*60/(n_overall*C*100),2)\n", + "print(\"so compression ratio=19.37\")\n", + "print(\"air standard efficiency=63.25%\")\n", + "print(\"fuel consumption,bhp/hr=0.255 kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.3;pg no: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.3, Page:338 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\n", + "1-2-3-4=cycle a\n", + "1-2_a-3_a-4_a-5=cycle b\n", + "here Cp/Cv=y\n", + "and R=0.293 KJ/kg K\n", + "let us consider 1 kg of air for perfect gas,\n", + "P*V=m*R*T\n", + "so V1=m*R*T1/P1 in m^3\n", + "at state 3,\n", + "P3*V3=m*R*T3\n", + "so T3/V2=P3/(m*R)\n", + "so T3=17064.8*V2............eq1\n", + "for cycle a and also for cycle b\n", + "T3_a=17064.8*V2_a.............eq2\n", + "a> for otto cycle,\n", + "Q23=Cv*(T3-T2)\n", + "so T3-T2=Q23/Cv\n", + "and T2=T3-2394.36.............eq3\n", + "from gas law,P2*V2/T2=P3*V3/T3\n", + "here V2=V3 and using eq 3,we get\n", + "so P2/(T3-2394.36)=5000/T3\n", + "substituting T3 as function of V2\n", + "P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\n", + "P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\n", + "also P1*V1^y=P2*V2^y\n", + "or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\n", + "upon solving it yields\n", + "381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\n", + "or V2^1.4-0.140*V2^0.4-.022=0\n", + "by hit and trial it yields,V2=0.18 \n", + "thus compression ratio,r=V1/V2\n", + "otto cycle efficiency,n_otto=1-(1/r)^(y-1)\n", + "in percentage\n", + "b> for mixed or dual cycle\n", + "Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\n", + "or T3_a-T2_a=850/Cv\n", + "or T2_a=T3_a-1197.2 .............eq4 \n", + "also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\n", + "P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\n", + "or P2_a/(T3_a-1197.2)=5000/T3_a\n", + "also we had seen earlier that T3_a=17064.8*V2_a\n", + "so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\n", + "so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\n", + "or for adiabatic process,1-2_a\n", + "P1*V1^y=P2*V2^y\n", + "so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\n", + "or V2_a^1.4-0.07*V2_a^0.4-0.022=0\n", + "by hit and trial \n", + "V2_a=0.122 m^3\n", + "therefore upon substituting V2_a,\n", + "by eq 5,P2_a in KPa\n", + "by eq 2,T3_a in K\n", + "by eq 4,T2_a in K\n", + "from constant pressure heat addition\n", + "Cp*(T4_a-T3_a)=850\n", + "so T4_a=T3_a+(850/Cp) in K\n", + "also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\n", + "so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \n", + "here P3_a=P4_a and V2_a=V3_a\n", + "using adiabatic formulations V4_a=0.172 m^3\n", + "(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\n", + "so T5=T4_a/(V5/V4_a)^(y-1) in K\n", + "heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\n", + "efficiency of mixed cycle(n_mixed)= 0.57\n", + "in percentage 56.55\n" + ] + }, + { + "data": { + "text/plain": [ + "'NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#cal of comparing efficiency of two cycles\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.3, Page:338 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\")\n", + "T1=(100+273.15);#temperature at beginning of compresssion in K\n", + "P1=103;#pressure at beginning of compresssion in KPa\n", + "Cp=1.003;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "Q23=1700;#heat added during combustion in KJ/kg\n", + "P3=5000;#maximum pressure in cylinder in KPa\n", + "print(\"1-2-3-4=cycle a\")\n", + "print(\"1-2_a-3_a-4_a-5=cycle b\")\n", + "print(\"here Cp/Cv=y\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"and R=0.293 KJ/kg K\")\n", + "R=0.293;\n", + "print(\"let us consider 1 kg of air for perfect gas,\")\n", + "m=1;#mass of air in kg\n", + "print(\"P*V=m*R*T\")\n", + "print(\"so V1=m*R*T1/P1 in m^3\")\n", + "V1=m*R*T1/P1\n", + "print(\"at state 3,\")\n", + "print(\"P3*V3=m*R*T3\")\n", + "print(\"so T3/V2=P3/(m*R)\")\n", + "P3/(m*R)\n", + "print(\"so T3=17064.8*V2............eq1\")\n", + "print(\"for cycle a and also for cycle b\")\n", + "print(\"T3_a=17064.8*V2_a.............eq2\")\n", + "print(\"a> for otto cycle,\")\n", + "print(\"Q23=Cv*(T3-T2)\")\n", + "print(\"so T3-T2=Q23/Cv\")\n", + "Q23/Cv\n", + "print(\"and T2=T3-2394.36.............eq3\")\n", + "print(\"from gas law,P2*V2/T2=P3*V3/T3\")\n", + "print(\"here V2=V3 and using eq 3,we get\")\n", + "print(\"so P2/(T3-2394.36)=5000/T3\")\n", + "print(\"substituting T3 as function of V2\")\n", + "print(\"P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\")\n", + "print(\"P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\")\n", + "print(\"also P1*V1^y=P2*V2^y\")\n", + "print(\"or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\")\n", + "print(\"upon solving it yields\")\n", + "print(\"381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\")\n", + "print(\"or V2^1.4-0.140*V2^0.4-.022=0\")\n", + "print(\"by hit and trial it yields,V2=0.18 \")\n", + "V2=0.18;\n", + "print(\"thus compression ratio,r=V1/V2\")\n", + "r=V1/V2\n", + "print(\"otto cycle efficiency,n_otto=1-(1/r)^(y-1)\")\n", + "n_otto=1-(1/r)**(y-1)\n", + "print(\"in percentage\")\n", + "n_otto=n_otto*100\n", + "print(\"b> for mixed or dual cycle\")\n", + "print(\"Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\")\n", + "print(\"or T3_a-T2_a=850/Cv\")\n", + "850/Cv\n", + "print(\"or T2_a=T3_a-1197.2 .............eq4 \")\n", + "print(\"also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\")\n", + "print(\"P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\")\n", + "print(\"or P2_a/(T3_a-1197.2)=5000/T3_a\")\n", + "print(\"also we had seen earlier that T3_a=17064.8*V2_a\")\n", + "print(\"so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\")\n", + "print(\"so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\")\n", + "print(\"or for adiabatic process,1-2_a\")\n", + "print(\"P1*V1^y=P2*V2^y\")\n", + "print(\"so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\")\n", + "print(\"or V2_a^1.4-0.07*V2_a^0.4-0.022=0\")\n", + "print(\"by hit and trial \")\n", + "print(\"V2_a=0.122 m^3\")\n", + "V2_a=0.122;\n", + "print(\"therefore upon substituting V2_a,\")\n", + "print(\"by eq 5,P2_a in KPa\")\n", + "P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a)\n", + "print(\"by eq 2,T3_a in K\")\n", + "T3_a=17064.8*V2_a\n", + "print(\"by eq 4,T2_a in K\")\n", + "T2_a=T3_a-1197.2\n", + "print(\"from constant pressure heat addition\")\n", + "print(\"Cp*(T4_a-T3_a)=850\")\n", + "print(\"so T4_a=T3_a+(850/Cp) in K\")\n", + "T4_a=T3_a+(850/Cp)\n", + "print(\"also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\")\n", + "print(\"so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \")\n", + "print(\"here P3_a=P4_a and V2_a=V3_a\")\n", + "V4_a=V2_a*T4_a/(T3_a)\n", + "print(\"using adiabatic formulations V4_a=0.172 m^3\")\n", + "print(\"(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\")\n", + "V5=V1;\n", + "print(\"so T5=T4_a/(V5/V4_a)^(y-1) in K\")\n", + "T5=T4_a/(V5/V4_a)**(y-1)\n", + "print(\"heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\")\n", + "Q51=Cv*(T5-T1)\n", + "n_mixed=(Q23-Q51)/Q23\n", + "print(\"efficiency of mixed cycle(n_mixed)=\"),round(n_mixed,2)\n", + "print(\"in percentage\"),round(n_mixed*100,2)\n", + "(\"NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.4;pg no: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.4, Page:341 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\n", + "optimum pressure ratio for maximum work output,\n", + "rp=(T_max/T_min)^((y)/(2*(y-1)))\n", + "so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\n", + "so T2=T1*(p2/p1)^((y-1)/y)in K\n", + "For process 3-4,\n", + "T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(rp)^((y-1)/y)in K\n", + "heat supplied,Q23=Cp*(T3-T2)in KJ/kg\n", + "compressor work,Wc in KJ/kg= 301.5\n", + "turbine work,Wt in KJ/kg= 603.0\n", + "thermal efficiency=net work/heat supplied= 0.5\n", + "so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.4, Page:341 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\")\n", + "T3=1200;#maximum temperature in K\n", + "T1=300;#minimum temperature in K\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"optimum pressure ratio for maximum work output,\")\n", + "print(\"rp=(T_max/T_min)^((y)/(2*(y-1)))\")\n", + "T_max=T3;\n", + "T_min=T1;\n", + "rp=(T_max/T_min)**((y)/(2*(y-1)))\n", + "print(\"so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2=T1*(rp)**((y-1)/y)\n", + "print(\"For process 3-4,\")\n", + "print(\"T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(rp)^((y-1)/y)in K\")\n", + "T4=T3/(rp)**((y-1)/y)\n", + "print(\"heat supplied,Q23=Cp*(T3-T2)in KJ/kg\")\n", + "Q23=Cp*(T3-T2)\n", + "Wc=Cp*(T2-T1)\n", + "print(\"compressor work,Wc in KJ/kg=\"),round(Wc,2)\n", + "Wt=Cp*(T3-T4)\n", + "print(\"turbine work,Wt in KJ/kg=\"),round(Wt,2)\n", + "(Wt-Wc)/Q23\n", + "print(\"thermal efficiency=net work/heat supplied=\"),round((Wt-Wc)/Q23,2)\n", + "print(\"so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.5;pg no: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.5, Page:342 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\n", + "gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\n", + "for process 1-2 being isentropic,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\n", + "so T2_a=T1+((T2-T1)/n_compr)in K\n", + "during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\n", + "heat added=mf*q\n", + "=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\n", + "or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\n", + "so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\n", + "for expansion 3-4 being\n", + "T4/T3=(P4/P3)^((n-1)/n)\n", + "so T4=T3*(P4/P3)^((n-1)/n) in K\n", + "actaul temperature at turbine inlet considering internal efficiency of turbine,\n", + "n_turb=(T3-T4_a)/(T3-T4)\n", + "so T4_a=T3-(n_turb*(T3-T4)) in K\n", + "compressor work,per kg of air compressed(Wc) in KJ/kg of air= 234.42\n", + "so compressor work=234.42 KJ/kg of air\n", + "turbine work,per kg of air compressed(Wt) in KJ/kg of air= 414.71\n", + "so turbine work=414.71 KJ/kg of air\n", + "net work(W_net) in KJ/kg of air= 180.29\n", + "heat supplied(Q) in KJ/kg of air= 751.16\n", + "thermal efficiency(n)= 0.24\n", + "in percentage 24.0\n", + "so thermal efficiency=24%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.5, Page:342 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\")\n", + "P1=1*10**5;#initial pressure in Pa\n", + "P4=P1;#constant pressure process\n", + "T1=300;#initial temperature in K\n", + "P2=6.2*10**5;#pressure after compression in Pa\n", + "P3=P2;#constant pressure process\n", + "k=0.017;#fuel to air ratio\n", + "n_compr=0.88;#compressor efficiency\n", + "q=44186;#heating value of fuel in KJ/kg\n", + "n_turb=0.9;#turbine internal efficiency\n", + "Cp_comb=1.147;#specific heat of combustion at constant pressure in KJ/kg K\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "n=1.33;#expansion constant for polytropic constant\n", + "print(\"gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\")\n", + "print(\"for process 1-2 being isentropic,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\")\n", + "print(\"so T2_a=T1+((T2-T1)/n_compr)in K\")\n", + "T2_a=T1+((T2-T1)/n_compr)\n", + "print(\"during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\")\n", + "print(\"heat added=mf*q\")\n", + "print(\"=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\")\n", + "print(\"or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\")\n", + "print(\"so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\")\n", + "T3=((k)*q+(Cp_air*T2_a))/((1+(k))*Cp_comb)\n", + "print(\"for expansion 3-4 being\")\n", + "print(\"T4/T3=(P4/P3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(P4/P3)^((n-1)/n) in K\")\n", + "T4=T3*(P4/P3)**((n-1)/n)\n", + "print(\"actaul temperature at turbine inlet considering internal efficiency of turbine,\")\n", + "print(\"n_turb=(T3-T4_a)/(T3-T4)\")\n", + "print(\"so T4_a=T3-(n_turb*(T3-T4)) in K\")\n", + "T4_a=T3-(n_turb*(T3-T4))\n", + "Wc=Cp_air*(T2_a-T1)\n", + "print(\"compressor work,per kg of air compressed(Wc) in KJ/kg of air=\"),round(Wc,2)\n", + "print(\"so compressor work=234.42 KJ/kg of air\")\n", + "Wt=Cp_comb*(T3-T4_a)\n", + "print(\"turbine work,per kg of air compressed(Wt) in KJ/kg of air=\"),round(Wt,2)\n", + "print(\"so turbine work=414.71 KJ/kg of air\")\n", + "W_net=Wt-Wc\n", + "print(\"net work(W_net) in KJ/kg of air=\"),round(W_net,2)\n", + "Q=k*q\n", + "print(\"heat supplied(Q) in KJ/kg of air=\"),round(Q,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so thermal efficiency=24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.6;pg no: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.6, Page:343 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\n", + "NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\n", + "overall pressure ratio(rp)= 13.59\n", + "so overall optimum pressure ratio=13.6\n" + ] + } + ], + "source": [ + "#cal of overall optimum pressure ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.6, Page:343 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\")\n", + "T1=300;#minimum temperature in brayton cycle in K\n", + "T5=1200;#maximum temperature in brayton cycle in K\n", + "n_isen_c=0.85;#isentropic efficiency of compressor\n", + "n_isen_t=0.9;#isentropic efficiency of turbine\n", + "y=1.4;#expansion constant\n", + "print(\"NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\")\n", + "rp=(T1/(T5*n_isen_c*n_isen_t))**((2*y)/(3*(1-y)))\n", + "print(\"overall pressure ratio(rp)=\"),round(rp,2)\n", + "print(\"so overall optimum pressure ratio=13.6\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.7;pg no: 346" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.7, Page:346 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\n", + "i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\n", + "therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\n", + "or P9/P1=k=(1.35)^8 11.03\n", + "or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\n", + "T9/T1=(P9/P1)^((y-1)/y)\n", + "so T9 in K= 621.47\n", + "considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\n", + "(T9-T1)/(T9_actual-T1)=0.82\n", + "so T9_actual=T1+((T9-T1)/0.82) in K 689.19\n", + "let the actual index of compression be n, then\n", + "(T9_actual/T1)=(P9/P1)^((n-1)/n)\n", + "so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\n", + "so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\n", + "ii> let polytropic efficiency be n_polytropic for compressor then,\n", + "(n-1)/n=((y-1)/y)*(1/n_polytropic)\n", + "so n_polytropic= 0.87\n", + "in percentage 86.9\n", + "so ploytropic efficiency=86.88%\n", + "iii> stage efficiency can be estimated for any stage.say first stage.\n", + "ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "actual temperature at exit of first stage can be estimated using polytropic index 1.49.\n", + "T2_actual/T1=(P2/P1)^((n-1)/n)\n", + "so T2_actual=T1*(P2/P1)^((n-1)/n) in K\n", + "stage efficiency for first stage,ns_1= 0.86\n", + "in percentage 86.33\n", + "actual temperature at exit of second stage,\n", + "T3_actual/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\n", + "ideal temperature at exit of second stage\n", + "T3/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3=T2_actual*(P3/P2)^((y-1)/y) in K\n", + "stage efficiency for second stage,ns_2= 0.86\n", + "in percentage 86.33\n", + "actual rtemperature at exit of third stage,\n", + "T4_actual/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4_actual in K= 420.83\n", + "ideal temperature at exit of third stage,\n", + "T4/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4 in K= 415.42\n", + "stage efficiency for third stage,ns_3= 0.86\n", + "in percentage= 8632.9\n", + "so stage efficiency=86.4%\n", + "iv> from steady flow energy equation,\n", + "Wc=dw=dh and dh=du+p*dv+v*dp\n", + "dh=dq+v*dp\n", + "dq=0 in adiabatic process\n", + "dh=v*dp\n", + "Wc=v*dp\n", + "here for polytropic compression \n", + "P*V^1.49=constant i.e n=1.49\n", + "Wc in KJ/s= 16419.87\n", + "due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s= 14777.89\n", + "so power required to drive compressor =14777.89 KJ/s\n" + ] + } + ], + "source": [ + "#cal of state of air at exit of compressor,polytropic efficiency,efficiency of each sate,power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.7, Page:346 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\")\n", + "T1=313.;#air entering temperature in K\n", + "P1=1*10**5;#air entering pressure in Pa\n", + "m=50.;#flow rate through compressor in kg/s\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\")\n", + "print(\"therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\")\n", + "r=1.35;#compression ratio\n", + "k=(1.35)**8\n", + "print(\"or P9/P1=k=(1.35)^8\"),round(k,2)\n", + "k=11.03;#approx.\n", + "print(\"or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\")\n", + "y=1.4;#expansion constant \n", + "print(\"T9/T1=(P9/P1)^((y-1)/y)\")\n", + "T9=T1*(k)**((y-1)/y)\n", + "print(\"so T9 in K=\"),round(T9,2)\n", + "print(\"considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\")\n", + "print(\"(T9-T1)/(T9_actual-T1)=0.82\")\n", + "T9_actual=T1+((T9-T1)/0.82)\n", + "print(\"so T9_actual=T1+((T9-T1)/0.82) in K\"),round(T9_actual,2)\n", + "print(\"let the actual index of compression be n, then\")\n", + "print(\"(T9_actual/T1)=(P9/P1)^((n-1)/n)\")\n", + "print(\"so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\")\n", + "n=math.log(k)/(math.log(k)-math.log(T9_actual/T1))\n", + "print(\"so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\")\n", + "print(\"ii> let polytropic efficiency be n_polytropic for compressor then,\")\n", + "print(\"(n-1)/n=((y-1)/y)*(1/n_polytropic)\")\n", + "n_polytropic=((y-1)/y)/((n-1)/n)\n", + "print(\"so n_polytropic=\"),round(n_polytropic,2)\n", + "print(\"in percentage\"),round(n_polytropic*100,2)\n", + "print(\"so ploytropic efficiency=86.88%\")\n", + "print(\"iii> stage efficiency can be estimated for any stage.say first stage.\")\n", + "print(\"ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"actual temperature at exit of first stage can be estimated using polytropic index 1.49.\")\n", + "print(\"T2_actual/T1=(P2/P1)^((n-1)/n)\")\n", + "print(\"so T2_actual=T1*(P2/P1)^((n-1)/n) in K\")\n", + "T2_actual=T1*(r)**((n-1)/n)\n", + "ns_1=(T2-T1)/(T2_actual-T1)\n", + "print(\"stage efficiency for first stage,ns_1=\"),round(ns_1,2)\n", + "print(\"in percentage\"),round(ns_1*100,2)\n", + "print(\"actual temperature at exit of second stage,\")\n", + "print(\"T3_actual/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\")\n", + "T3_actual=T2_actual*(r)**((n-1)/n)\n", + "print(\"ideal temperature at exit of second stage\")\n", + "print(\"T3/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3=T2_actual*(P3/P2)^((y-1)/y) in K\")\n", + "T3=T2_actual*(r)**((y-1)/y)\n", + "ns_2=(T3-T2_actual)/(T3_actual-T2_actual)\n", + "print(\"stage efficiency for second stage,ns_2=\"),round(ns_2,2)\n", + "print(\"in percentage\"),round(ns_2*100,2)\n", + "print(\"actual rtemperature at exit of third stage,\")\n", + "print(\"T4_actual/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4_actual=T3_actual*(r)**((n-1)/n)\n", + "print(\"so T4_actual in K=\"),round(T4_actual,2)\n", + "print(\"ideal temperature at exit of third stage,\")\n", + "print(\"T4/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4=T3_actual*(r)**((y-1)/y)\n", + "print(\"so T4 in K=\"),round(T4,2)\n", + "ns_3=(T4-T3_actual)/(T4_actual-T3_actual)\n", + "print(\"stage efficiency for third stage,ns_3=\"),round(ns_3,2)\n", + "ns_3=ns_3*100\n", + "print(\"in percentage=\"),round(ns_3*100,2)\n", + "print(\"so stage efficiency=86.4%\")\n", + "print(\"iv> from steady flow energy equation,\")\n", + "print(\"Wc=dw=dh and dh=du+p*dv+v*dp\")\n", + "print(\"dh=dq+v*dp\")\n", + "print(\"dq=0 in adiabatic process\")\n", + "print(\"dh=v*dp\")\n", + "print(\"Wc=v*dp\")\n", + "print(\"here for polytropic compression \")\n", + "print(\"P*V^1.49=constant i.e n=1.49\")\n", + "n=1.49;\n", + "Wc=(n/(n-1))*m*R*T1*(((k)**((n-1)/n))-1)\n", + "print(\"Wc in KJ/s=\"),round(Wc,2)\n", + "Wc_actual=Wc*0.9\n", + "print(\"due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s=\"),round(Wc*0.9,2)\n", + "print(\"so power required to drive compressor =14777.89 KJ/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.8;pg no: 349" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.8, Page:349 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\n", + "In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.8, Page:349 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\")\n", + "print(\"In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.9;pg no: 350" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.9, Page:350 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\n", + "using polytropic efficiency the index of compression and expansion can be obtained as under,\n", + "let compression index be nc,\n", + "(nc-1)/nc=(y-1)/(y*n_poly_c)\n", + "so nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "let expansion index be nt,\n", + "(nt-1)/nt=(n_poly_T*(y-1))/y\n", + "so nt=1/(1-((n_poly_T*(y-1))/y))\n", + "For process 1-2\n", + "T2/T1=(p2/p1)^((nc-1)/nc)\n", + "so T2=T1*(p2/p1)^((nc-1)/nc)in K\n", + "also T4/T3=(p4/p3)^((nt-1)/nt)\n", + "so T4=T3*(p4/p3)^((nt-1)/nt)in K\n", + "using heat exchanger effectivenesss,\n", + "epsilon=(T5-T2)/(T4-T2)\n", + "so T5=T2+(epsilon*(T4-T2))in K\n", + "heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\n", + "compressor work,Wc=Cp*(T2-T1)in \n", + "turbine work,Wt=Cp*(T3-T4)in KJ/kg\n", + "cycle efficiency= 0.33\n", + "in percentage 32.79\n", + "work ratio= 0.33\n", + "specific work output in KJ/kg= 152.56\n", + "so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,work ratio,specific work output\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.9, Page:350 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\")\n", + "y=1.4;#expansion constant\n", + "n_poly_c=0.85;#ploytropic efficiency of compressor\n", + "n_poly_T=0.90;#ploytropic efficiency of Turbine\n", + "r=8.;#compression ratio\n", + "T1=(27.+273.);#temperature of air in compressor in K\n", + "T3=1100.;#temperature of air leaving combustion chamber in K\n", + "epsilon=0.8;#effectiveness of heat exchanger\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"using polytropic efficiency the index of compression and expansion can be obtained as under,\")\n", + "print(\"let compression index be nc,\")\n", + "print(\"(nc-1)/nc=(y-1)/(y*n_poly_c)\")\n", + "print(\"so nc=1/(1-((y-1)/(y*n_poly_c)))\")\n", + "nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "print(\"let expansion index be nt,\")\n", + "print(\"(nt-1)/nt=(n_poly_T*(y-1))/y\")\n", + "print(\"so nt=1/(1-((n_poly_T*(y-1))/y))\")\n", + "nt=1/(1-((n_poly_T*(y-1))/y))\n", + "print(\"For process 1-2\")\n", + "print(\"T2/T1=(p2/p1)^((nc-1)/nc)\")\n", + "print(\"so T2=T1*(p2/p1)^((nc-1)/nc)in K\")\n", + "T2=T1*(r)**((nc-1)/nc)\n", + "print(\"also T4/T3=(p4/p3)^((nt-1)/nt)\")\n", + "print(\"so T4=T3*(p4/p3)^((nt-1)/nt)in K\")\n", + "T4=T3*(1/r)**((nt-1)/nt)\n", + "print(\"using heat exchanger effectivenesss,\") \n", + "print(\"epsilon=(T5-T2)/(T4-T2)\")\n", + "print(\"so T5=T2+(epsilon*(T4-T2))in K\")\n", + "T5=T2+(epsilon*(T4-T2))\n", + "print(\"heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\")\n", + "q_add=Cp*(T3-T5)\n", + "print(\"compressor work,Wc=Cp*(T2-T1)in \")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "Wt=Cp*(T3-T4)\n", + "(Wt-Wc)/q_add\n", + "print(\"cycle efficiency=\"),round((Wt-Wc)/q_add,2)\n", + "print(\"in percentage\"),round((Wt-Wc)*100/q_add,2)\n", + "(Wt-Wc)/Wt\n", + "print(\"work ratio=\"),round((Wt-Wc)/Wt,2)\n", + "print(\"specific work output in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.10;pg no: 351" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.10, Page:351 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\n", + "for process 1-2_a\n", + "T2_a/T1=(p2_a/p1)^((y-1)/y)\n", + "so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc) in K\n", + "for process 3-4_a,\n", + "T4_a/T3=(p4/p3)^((y-1)/y)\n", + "so T4_a=T3*(p4/p3)^((y-1)/y)in K\n", + "Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\n", + "net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\n", + "heat added,q_add=Cp*(T3-T2) in KJ/kg\n", + "thermal efficiency,n=W_net/q_add\n", + "n={Wc-(Cp*(T3-T4))}/q_add\n", + "so T4=T3-((Wc-(n*q_add))/Cp)in K\n", + "therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a) 0.297\n", + "in percentage 29.7\n", + "so turbine isentropic efficiency=29.69%\n" + ] + } + ], + "source": [ + "#cal of isentropic efficiency of turbine\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.10, Page:351 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\")\n", + "T1=(27+273);#temperature of air in compressor in K\n", + "p1=1*10**5;#pressure of air in compressor in Pa\n", + "p2=5*10**5;#pressure of air after compression in Pa\n", + "p3=p2-0.2*10**5;#pressure drop in Pa\n", + "p4=1*10**5;#pressure to which expansion occur in turbine in Pa\n", + "nc=0.85;#isentropic efficiency\n", + "T3=1000;#temperature of air in combustion chamber in K\n", + "n=0.2;#thermal efficiency of plant\n", + "y=1.4;#expansion constant\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2_a\")\n", + "print(\"T2_a/T1=(p2_a/p1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc) in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4_a,\")\n", + "print(\"T4_a/T3=(p4/p3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p4/p3)^((y-1)/y)in K\")\n", + "T4_a=T3*(p4/p3)**((y-1)/y)\n", + "print(\"Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "print(\"net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\")\n", + "print(\"heat added,q_add=Cp*(T3-T2) in KJ/kg\")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"thermal efficiency,n=W_net/q_add\")\n", + "print(\"n={Wc-(Cp*(T3-T4))}/q_add\")\n", + "print(\"so T4=T3-((Wc-(n*q_add))/Cp)in K\")\n", + "T4=T3-((Wc-(n*q_add))/Cp)\n", + "nt=(T3-T4)/(T3-T4_a)\n", + "print(\"therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a)\"),round((T3-T4)/(T3-T4_a),3)\n", + "print(\"in percentage\"),round(nt*100,2)\n", + "print(\"so turbine isentropic efficiency=29.69%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.11;pg no: 352" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.11, Page:352 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\n", + "for perfect intercooling the pressure ratio of each compression stage(k)\n", + "k=sqrt(r)\n", + "for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\n", + "so T2_a=T1*(k)^((y-1)/y)in K\n", + "considering isentropic efficiency of compression,\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc)in K\n", + "for process 3-4,\n", + "T4_a/T3=(P4/P3)^((y-1)/y)\n", + "so T4_a=T3*(P4/P3)^((y-1)/y) in K\n", + "again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\n", + "so T4=T3+((T4_a-T3)/nc)in K\n", + "total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\n", + "for expansion process 5-6_a,\n", + "T6_a/T5=(P6/P5)^((y-1)/y)\n", + "so T6_a=T5*(P6/P5)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\n", + "T6=T5-(ne*(T5-T6_a)) in K\n", + "for expansion in 7-8_a\n", + "T8_a/T7=(P8/P7)^((y-1)/y)\n", + "so T8_a=T7*(P8/P7)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\n", + "so T8=T7-(ne*(T7-T8_a))in K\n", + "expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\n", + "heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\n", + "fuel required per kg of air,mf=q_add/C 0.02\n", + "air-fuel ratio=1/mf 51.08\n", + "net output(W) in KJ/kg= 229.2\n", + "output for air flowing at 30 kg/s,=W*m in KW 6876.05\n", + "thermal efficiency= 0.28\n", + "in percentage 27.88\n", + "so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\n", + "NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net output,A/F ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.11, Page:352 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "T1=(27.+273.);#initial temperature in K\n", + "T3=T1;\n", + "r=10.;#pressure ratio\n", + "T5=1000.;#maximum temperature in cycle in K\n", + "P6=3.*10**5;#first stage expansion pressure in Pa\n", + "T7=995.;#first stage reheated temperature in K\n", + "C=42000.;#calorific value of fuel in KJ/kg\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "m=30.;#air flow rate in kg/s\n", + "nc=0.85;#isentropic efficiency of compression\n", + "ne=0.9;#isentropic efficiency of expansion\n", + "y=1.4;#expansion constant\n", + "print(\"for perfect intercooling the pressure ratio of each compression stage(k)\")\n", + "print(\"k=sqrt(r)\")\n", + "k=math.sqrt(r)\n", + "k=3.16;#approx.\n", + "print(\"for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(k)^((y-1)/y)in K\")\n", + "T2_a=T1*(k)**((y-1)/y)\n", + "print(\"considering isentropic efficiency of compression,\")\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc)in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4_a/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4_a=T3*(k)**((y-1)/y)\n", + "print(\"again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\")\n", + "print(\"so T4=T3+((T4_a-T3)/nc)in K\")\n", + "T4=T3+((T4_a-T3)/nc)\n", + "print(\"total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\")\n", + "Wc=2*Cp*(T4-T3)\n", + "print(\"for expansion process 5-6_a,\")\n", + "print(\"T6_a/T5=(P6/P5)^((y-1)/y)\")\n", + "print(\"so T6_a=T5*(P6/P5)^((y-1)/y) in K\")\n", + "P5=10.*10**5;#pressure in Pa\n", + "T6_a=T5*(P6/P5)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\")\n", + "print(\"T6=T5-(ne*(T5-T6_a)) in K\")\n", + "T6=T5-(ne*(T5-T6_a))\n", + "print(\"for expansion in 7-8_a\")\n", + "print(\"T8_a/T7=(P8/P7)^((y-1)/y)\")\n", + "print(\"so T8_a=T7*(P8/P7)^((y-1)/y) in K\")\n", + "P8=P1;#constant pressure process\n", + "P7=P6;#constant pressure process\n", + "T8_a=T7*(P8/P7)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\")\n", + "print(\"so T8=T7-(ne*(T7-T8_a))in K\")\n", + "T8=T7-(ne*(T7-T8_a))\n", + "print(\"expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\")\n", + "Wt=Cp*(T5-T6)+Cp*(T7-T8)\n", + "print(\"heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\")\n", + "q_add=Cp*(T5-T4)+Cp*(T7-T6)\n", + "mf=q_add/C\n", + "print(\"fuel required per kg of air,mf=q_add/C\"),round(q_add/C,2)\n", + "print(\"air-fuel ratio=1/mf\"),round(1/mf,2)\n", + "W=Wt-Wc\n", + "print(\"net output(W) in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"output for air flowing at 30 kg/s,=W*m in KW\"),round(W*m,2)\n", + "W/q_add\n", + "print(\"thermal efficiency=\"),round(W/q_add,2)\n", + "print(\"in percentage\"),round(W*100/q_add,2)\n", + "print(\"so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\")\n", + "print(\"NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.12;pg no: 354" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.12, Page:354 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\n", + "for process 1-2,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "for process 3-4,\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "for process 6-7,\n", + "T7/T6=(P7/P6)^((y-1)/y)\n", + "so T7=T6*(P7/P6)^((y-1)/y) in K\n", + "for process 8-9,\n", + "T9/T8=(P9/P8)^((y-1)/y)\n", + "T9=T8*(P9/P8)^((y-1)/y) in K\n", + "in regenerator,effectiveness=(T5-T4)/(T9-T4)\n", + "T5=T4+(ne*(T9-T4))in K\n", + "compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\n", + "turbine work per kg air,Wt in KJ/kg= 660.84\n", + "heat added per kg air,q_add in KJ/kg= 765.43\n", + "total fuel required per kg of air= 0.02\n", + "net work,W_net in KJ/kg= 450.85\n", + "cycle thermal efficiency,n= 0.59\n", + "in percentage 58.9\n", + "fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C= 0.0056\n", + "fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C= 0.0126\n", + "so fuel-air ratio in two combustion chambers=0.0126,0.0056\n", + "total turbine work=660.85 KJ/kg\n", + "cycle thermal efficiency=58.9%\n", + "NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \n" + ] + } + ], + "source": [ + "#cal of fuel-air ratio in two combustion chambers,total turbine work,cycle thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.12, Page:354 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "P9=P1;\n", + "T1=300.;#initial temperature in K\n", + "P2=4.*10**5;#pressure of air in intercooler in Pa\n", + "P3=P2;\n", + "T3=290.;#temperature of air in intercooler in K\n", + "T6=1300.;#temperature of combustion chamber in K\n", + "P4=8.*10**5;#pressure of air after compression in Pa\n", + "P6=P4;\n", + "T8=1300.;#temperature after reheating in K\n", + "P8=4.*10**5;#pressure after expansion in Pa\n", + "P7=P8;\n", + "C=42000.;#heating value of fuel in KJ/kg\n", + "y=1.4;#expansion constant\n", + "ne=0.8;#effectiveness of regenerator\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(P4/P3)**((y-1)/y)\n", + "print(\"for process 6-7,\")\n", + "print(\"T7/T6=(P7/P6)^((y-1)/y)\")\n", + "print(\"so T7=T6*(P7/P6)^((y-1)/y) in K\")\n", + "T7=T6*(P7/P6)**((y-1)/y)\n", + "print(\"for process 8-9,\")\n", + "print(\"T9/T8=(P9/P8)^((y-1)/y)\")\n", + "print(\"T9=T8*(P9/P8)^((y-1)/y) in K\")\n", + "T9=T8*(P9/P8)**((y-1)/y)\n", + "print(\"in regenerator,effectiveness=(T5-T4)/(T9-T4)\")\n", + "print(\"T5=T4+(ne*(T9-T4))in K\")\n", + "T5=T4+(ne*(T9-T4))\n", + "print(\"compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)+Cp*(T4-T3)\n", + "Wt=Cp*(T6-T7)+Cp*(T8-T9)\n", + "print(\"turbine work per kg air,Wt in KJ/kg=\"),round(Wt,2)\n", + "q_add=Cp*(T6-T5)+Cp*(T8-T7)\n", + "print(\"heat added per kg air,q_add in KJ/kg=\"),round(q_add,2)\n", + "q_add/C\n", + "print(\"total fuel required per kg of air=\"),round(q_add/C,2)\n", + "W_net=Wt-Wc\n", + "print(\"net work,W_net in KJ/kg=\"),round(W_net,2)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C=\"),round(Cp*(T8-T7)/C,4)\n", + "print(\"fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C=\"),round(Cp*(T6-T5)/C,4)\n", + "print(\"so fuel-air ratio in two combustion chambers=0.0126,0.0056\")\n", + "print(\"total turbine work=660.85 KJ/kg\")\n", + "print(\"cycle thermal efficiency=58.9%\")\n", + "print(\"NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.13;pg no: 356" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.13, Page:356 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\n", + "work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\n", + "heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\n", + "for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\n", + "mass of air per cycle=m/n in kg/cycle\n", + "brake output in KW= 17.12\n", + "stroke volume,V in m^3= 0.0117\n", + "brake output=17.11 KW\n", + "stroke volume=0.0116 m^3\n" + ] + } + ], + "source": [ + "#cal of brake output,stroke volume\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.13, Page:356 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\")\n", + "T2=700.;#highest temperature of stirling engine in K\n", + "T1=300.;#lowest temperature of stirling engine in K\n", + "r=3.;#compression ratio\n", + "q_add=30.;#heat addition in KJ/s\n", + "epsilon=0.9;#regenerator efficiency\n", + "P=1*10**5;#pressure at begining of compression in Pa\n", + "n=100.;#number of cycle per minute\n", + "Cv=0.72;#specific heat at constant volume in KJ/kg K\n", + "R=29.27;#gas constant in KJ/kg K\n", + "print(\"work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\")\n", + "W=R*(T2-T1)*math.log(r)\n", + "print(\"heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\")\n", + "q=R*T2*math.log(r)+(1-epsilon)*Cv*(T2-T1)\n", + "print(\"for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\")\n", + "m=q_add/q\n", + "print(\"mass of air per cycle=m/n in kg/cycle\")\n", + "m/n\n", + "print(\"brake output in KW=\"),round(W*m,2)\n", + "m=1.33*10**-4;#mass of air per cycle in kg/cycle\n", + "T=T1;\n", + "V=m*R*T*1000/P\n", + "print(\"stroke volume,V in m^3=\"),round(V,4)\n", + "print(\"brake output=17.11 KW\")\n", + "print(\"stroke volume=0.0116 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.14;pg no: 357" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.14, Page:357 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\n", + "In question no.14,various expression is derived which cannot be solved using python software.\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.14, Page:357 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\")\n", + "print(\"In question no.14,various expression is derived which cannot be solved using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.15;pg no: 361" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.15, Page:361 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\n", + "In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y)in K\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \n", + "heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \n", + "net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\n", + "heat recovered in HRSG for steam generation per kg of air\n", + "q_HRGC=Cp*(T4-T5)in KJ/kg\n", + "at inlet to steam in turbine,\n", + "from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\n", + "for expansion in steam turbine,sa=sb\n", + "let dryness fraction at state b be x\n", + "also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\n", + "sb=sf+x*sfg\n", + "so x=(sb-sf)/sfg \n", + "so hb=hf+x*hfg in KJ/kg K\n", + "at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\n", + "at exit of feed pump,hd=hd-hc\n", + "hd=vc*(Pg-Pc)*100 in KJ/kg\n", + "heat added per kg of steam =ha-hd in KJ/kg\n", + "mass of steam generated per kg of air in kg steam per kg air= 0.119\n", + "net steam turbine cycle output,W_net_ST in KJ/kg= 677.4\n", + "steam cycle output per kg of air(W_net_ST) in KJ/kg air= 80.61\n", + "total combined cycle output in KJ/kg air= 486.88\n", + "combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add 0.58\n", + "in percentage 57.77\n", + "In absence of steam cycle,gas turbine cycle efficiency,n_GT= 0.48\n", + "in percentage 48.21\n", + "thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\n", + "overall efficiency=57.77%\n", + "steam per kg of air=0.119 kg steam per/kg air\n" + ] + } + ], + "source": [ + "#cal of overall efficiency,steam per kg of air\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.15, Page:361 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\")\n", + "r=10.;#pressure ratio\n", + "Cp=1.0032;#specific heat of air in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "T3=1400.;#inlet temperature of gas turbine in K\n", + "T1=(17.+273.);#ambient temperature in K\n", + "P1=1.*10**5;#ambient pressure in Pa\n", + "Pc=15.;#condensor pressure in KPa\n", + "Pg=6.*1000;#pressure of steam in generator in KPa\n", + "T5=420.;#temperature of exhaust from gas turbine in K\n", + "print(\"In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y)in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(1/r)**((y-1)/y)\n", + "print(\"compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \")\n", + "Wt=Cp*(T3-T4)\n", + "print(\"heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\")\n", + "W_net_GT=Wt-Wc\n", + "print(\"heat recovered in HRSG for steam generation per kg of air\")\n", + "print(\"q_HRGC=Cp*(T4-T5)in KJ/kg\")\n", + "q_HRGC=Cp*(T4-T5)\n", + "print(\"at inlet to steam in turbine,\")\n", + "print(\"from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\")\n", + "ha=3177.2;\n", + "sa=6.5408;\n", + "print(\"for expansion in steam turbine,sa=sb\")\n", + "sb=sa;\n", + "print(\"let dryness fraction at state b be x\")\n", + "print(\"also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\")\n", + "sf=0.7549;\n", + "sfg=7.2536;\n", + "hf=225.94;\n", + "hfg=2373.1;\n", + "print(\"sb=sf+x*sfg\")\n", + "print(\"so x=(sb-sf)/sfg \")\n", + "x=(sb-sf)/sfg\n", + "print(\"so hb=hf+x*hfg in KJ/kg K\")\n", + "hb=hf+x*hfg\n", + "print(\"at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\")\n", + "hc=hf;\n", + "vc=0.001014;\n", + "print(\"at exit of feed pump,hd=hd-hc\")\n", + "print(\"hd=vc*(Pg-Pc)*100 in KJ/kg\")\n", + "hd=vc*(Pg-Pc)*100\n", + "print(\"heat added per kg of steam =ha-hd in KJ/kg\")\n", + "ha-hd\n", + "print(\"mass of steam generated per kg of air in kg steam per kg air=\"),round(q_HRGC/(ha-hd),3)\n", + "W_net_ST=(ha-hb)-(hd-hc)\n", + "print(\"net steam turbine cycle output,W_net_ST in KJ/kg=\"),round(W_net_ST,2)\n", + "W_net_ST=W_net_ST*0.119 \n", + "print(\"steam cycle output per kg of air(W_net_ST) in KJ/kg air=\"),round(W_net_ST,2)\n", + "(W_net_GT+W_net_ST)\n", + "print(\"total combined cycle output in KJ/kg air= \"),round((W_net_GT+W_net_ST),2)\n", + "n_cc=(W_net_GT+W_net_ST)/q_add\n", + "print(\"combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add\"),round(n_cc,2)\n", + "print(\"in percentage\"),round(n_cc*100,2)\n", + "n_GT=W_net_GT/q_add\n", + "print(\"In absence of steam cycle,gas turbine cycle efficiency,n_GT=\"),round(n_GT,2)\n", + "print(\"in percentage\"),round(n_GT*100,2)\n", + "print(\"thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\")\n", + "print(\"overall efficiency=57.77%\")\n", + "print(\"steam per kg of air=0.119 kg steam per/kg air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.16;pg no: 363" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.16, Page:363 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\n", + "here P4/P1=P3/P1=70............eq1\n", + "compression ratio,V1/V2=V1/V3=15.............eq2\n", + "heat added at constant volume= heat added at constant pressure\n", + "Q23=Q34\n", + "m*Cv*(T3-T2)=m*Cp*(T4-T3)\n", + "(T3-T2)=y*(T4-T3)\n", + "for process 1-2;\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2=T1*(V1/V2)^(y-1) in K\n", + "and (P2/P1)=(V1/V2)^y\n", + "so P2=P1*(V1/V2)^y in Pa...........eq3\n", + "for process 2-3,\n", + "P2/P3=T2/T3\n", + "so T3=T2*P3/P2\n", + "using eq 1 and 3,we get\n", + "T3=T2*k/r^y in K\n", + "using equal heat additions for processes 2-3 and 3-4,\n", + "(T3-T2)=y*(T4-T3)\n", + "so T4=T3+((T3-T2)/y) in K\n", + "for process 3-4,\n", + "V3/V4=T3/T4\n", + "(V3/V1)*(V1/V4)=T3/T4\n", + "so (V1/V4)=(T3/T4)*r\n", + "so V1/V4=11.88 and V5/V4=11.88\n", + "for process 4-5,\n", + "P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\n", + "so T5=T4/((V5/V4)^(y-1))\n", + "air standard thermal efficiency(n)=1-(heat rejected/heat added)\n", + "n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\n", + "n= 0.65\n", + "air standard thermal efficiency=0.6529\n", + "in percentage 65.29\n", + "so air standard thermal efficiency=65.29%\n", + "Actual thermal efficiency may be different from theoretical efficiency due to following reasons\n", + "a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\n", + "b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\n", + "c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\n" + ] + } + ], + "source": [ + "#cal of air standard thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.16, Page:363 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\")\n", + "T1=(27+273);#temperature at begining of compression in K\n", + "k=70;#ration of maximum to minimum pressures\n", + "r=15;#compression ratio\n", + "y=1.4;#expansion constant\n", + "print(\"here P4/P1=P3/P1=70............eq1\")\n", + "print(\"compression ratio,V1/V2=V1/V3=15.............eq2\")\n", + "print(\"heat added at constant volume= heat added at constant pressure\")\n", + "print(\"Q23=Q34\")\n", + "print(\"m*Cv*(T3-T2)=m*Cp*(T4-T3)\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"for process 1-2;\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2=T1*(V1/V2)^(y-1) in K\")\n", + "T2=T1*(r)**(y-1)\n", + "print(\"and (P2/P1)=(V1/V2)^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in Pa...........eq3\")\n", + "print(\"for process 2-3,\")\n", + "print(\"P2/P3=T2/T3\")\n", + "print(\"so T3=T2*P3/P2\")\n", + "print(\"using eq 1 and 3,we get\")\n", + "print(\"T3=T2*k/r^y in K\")\n", + "T3=T2*k/r**y \n", + "print(\"using equal heat additions for processes 2-3 and 3-4,\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"so T4=T3+((T3-T2)/y) in K\")\n", + "T4=T3+((T3-T2)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"V3/V4=T3/T4\")\n", + "print(\"(V3/V1)*(V1/V4)=T3/T4\")\n", + "print(\"so (V1/V4)=(T3/T4)*r\")\n", + "(T3/T4)*r\n", + "print(\"so V1/V4=11.88 and V5/V4=11.88\")\n", + "print(\"for process 4-5,\")\n", + "print(\"P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\")\n", + "print(\"so T5=T4/((V5/V4)^(y-1))\")\n", + "T5=T4/(11.88)**(y-1)\n", + "print(\"air standard thermal efficiency(n)=1-(heat rejected/heat added)\")\n", + "print(\"n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\")\n", + "n=1-((T5-T1)/(y*(T4-T3)+(T3-T2)))\n", + "print(\"n=\"),round(n,2)\n", + "print(\"air standard thermal efficiency=0.6529\")\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so air standard thermal efficiency=65.29%\")\n", + "print(\"Actual thermal efficiency may be different from theoretical efficiency due to following reasons\")\n", + "print(\"a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\")\n", + "print(\"b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\")\n", + "print(\"c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb new file mode 100644 index 00000000..606321b3 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_1.ipynb @@ -0,0 +1,1655 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 9:Gas Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.1;pg no: 334" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.1, Page:334 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\n", + "SI engine operate on otto cycle.consider working fluid to be perfect gas.\n", + "here,y=Cp/Cv\n", + "Cp-Cv=R in KJ/kg K\n", + "compression ratio,r=V1/V2=(0.15+V2)/V2\n", + "so V2=0.15/(r-1) in m^3\n", + "so V2=0.03 m^3\n", + "total cylinder volume=V1=r*V2 m^3\n", + "from perfect gas law,P*V=m*R*T\n", + "so m=P1*V1/(R*T1) in kg\n", + "from state 1 to 2 by P*V^y=P2*V2^y\n", + "so P2=P1*(V1/V2)^y in KPa\n", + "also,P1*V1/T1=P2*V2/T2\n", + "so T2=P2*V2*T1/(P1*V1)in K\n", + "from heat addition process 2-3\n", + "Q23=m*CV*(T3-T2)\n", + "T3=T2+(Q23/(m*Cv))in K\n", + "also from,P3*V3/T3=P2*V2/T2\n", + "P3=P2*V2*T3/(V3*T2) in KPa\n", + "for adiabatic expansion 3-4,\n", + "P3*V3^y=P4*V4^y\n", + "and V4=V1\n", + "hence,P4=P3*V3^y/V1^y in KPa\n", + "and from P3*V3/T3=P4*V4/T4\n", + "T4=P4*V4*T3/(P3*V3) in K\n", + "entropy change from 2-3 and 4-1 are same,and can be given as,\n", + "S3-S2=S4-S1=m*Cv*log(T4/T1)\n", + "so entropy change,deltaS_32=deltaS_41 in KJ/K\n", + "heat rejected,Q41=m*Cv*(T4-T1) in KJ\n", + "net work(W) in KJ= 76.75\n", + "efficiency(n)= 0.51\n", + "in percentage 51.16\n", + "mean effective pressure(mep)=work/volume change in KPa= 511.64\n", + "so mep=511.67 KPa\n" + ] + } + ], + "source": [ + "#cal of mean effective pressure\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.1, Page:334 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\")\n", + "Cp=1;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "P1=98;#pressure at begining of compression in KPa\n", + "T1=(60+273.15);#temperature at begining of compression in K\n", + "Q23=150;#heat supplied in KJ/kg\n", + "r=6;#compression ratio\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"SI engine operate on otto cycle.consider working fluid to be perfect gas.\")\n", + "print(\"here,y=Cp/Cv\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"Cp-Cv=R in KJ/kg K\")\n", + "R=Cp-Cv\n", + "print(\"compression ratio,r=V1/V2=(0.15+V2)/V2\")\n", + "print(\"so V2=0.15/(r-1) in m^3\")\n", + "V2=0.15/(r-1)\n", + "print(\"so V2=0.03 m^3\")\n", + "print(\"total cylinder volume=V1=r*V2 m^3\")\n", + "V1=r*V2\n", + "print(\"from perfect gas law,P*V=m*R*T\")\n", + "print(\"so m=P1*V1/(R*T1) in kg\")\n", + "m=P1*V1/(R*T1)\n", + "m=0.183;#approx.\n", + "print(\"from state 1 to 2 by P*V^y=P2*V2^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in KPa\")\n", + "P2=P1*(V1/V2)**y\n", + "print(\"also,P1*V1/T1=P2*V2/T2\")\n", + "print(\"so T2=P2*V2*T1/(P1*V1)in K\")\n", + "T2=P2*V2*T1/(P1*V1)\n", + "print(\"from heat addition process 2-3\")\n", + "print(\"Q23=m*CV*(T3-T2)\")\n", + "print(\"T3=T2+(Q23/(m*Cv))in K\")\n", + "T3=T2+(Q23/(m*Cv))\n", + "print(\"also from,P3*V3/T3=P2*V2/T2\")\n", + "print(\"P3=P2*V2*T3/(V3*T2) in KPa\")\n", + "V3=V2;#constant volume process\n", + "P3=P2*V2*T3/(V3*T2) \n", + "print(\"for adiabatic expansion 3-4,\")\n", + "print(\"P3*V3^y=P4*V4^y\")\n", + "print(\"and V4=V1\")\n", + "V4=V1;\n", + "print(\"hence,P4=P3*V3^y/V1^y in KPa\")\n", + "P4=P3*V3**y/V1**y\n", + "print(\"and from P3*V3/T3=P4*V4/T4\")\n", + "print(\"T4=P4*V4*T3/(P3*V3) in K\")\n", + "T4=P4*V4*T3/(P3*V3)\n", + "print(\"entropy change from 2-3 and 4-1 are same,and can be given as,\")\n", + "print(\"S3-S2=S4-S1=m*Cv*log(T4/T1)\")\n", + "print(\"so entropy change,deltaS_32=deltaS_41 in KJ/K\")\n", + "deltaS_32=m*Cv*math.log(T4/T1)\n", + "deltaS_41=deltaS_32;\n", + "print(\"heat rejected,Q41=m*Cv*(T4-T1) in KJ\")\n", + "Q41=m*Cv*(T4-T1)\n", + "W=Q23-Q41\n", + "print(\"net work(W) in KJ=\"),round(W,2)\n", + "n=W/Q23\n", + "print(\"efficiency(n)=\"),round(W/Q23,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "mep=W/0.15\n", + "print(\"mean effective pressure(mep)=work/volume change in KPa=\"),round(W/0.15,2)\n", + "print(\"so mep=511.67 KPa\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.2;pg no: 336" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.2, Page:336 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\n", + "as given\n", + "Va=V2+(7/8)*(V1-V2)\n", + "Vb=V2+(1/8)*(V1-V2)\n", + "and also\n", + "Pa*Va^y=Pb*Vb^y\n", + "so (Va/Vb)=(Pb/Pa)^(1/y)\n", + "also substituting for Va and Vb\n", + "(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\n", + "so V1/V2=r=1+(4.18*8/1.82) 19.37\n", + "it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\n", + "as given;cut off occurs at(V1-V2)/15 volume\n", + "V3=V2+(V1-V2)/15\n", + "cut off ratio,rho=V3/V2\n", + "air standard efficiency for diesel cycle(n_airstandard)= 0.63\n", + "in percentage 63.23\n", + "overall efficiency(n_overall)=n_airstandard*n_ite*n_mech 0.253\n", + "in percentage 25.3\n", + "fuel consumption,bhp/hr in kg= 0.26\n", + "so compression ratio=19.37\n", + "air standard efficiency=63.25%\n", + "fuel consumption,bhp/hr=0.255 kg\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.2, Page:336 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\")\n", + "Pa=138;#pressure during compression at 1/8 of stroke in KPa\n", + "Pb=1.38*10**3;#pressure during compression at 7/8 of stroke in KPa\n", + "n_ite=0.5;#indicated thermal efficiency\n", + "n_mech=0.8;#mechanical efficiency\n", + "C=41800;#calorific value in KJ/kg\n", + "y=1.4;#expansion constant\n", + "print(\"as given\")\n", + "print(\"Va=V2+(7/8)*(V1-V2)\")\n", + "print(\"Vb=V2+(1/8)*(V1-V2)\")\n", + "print(\"and also\")\n", + "print(\"Pa*Va^y=Pb*Vb^y\")\n", + "print(\"so (Va/Vb)=(Pb/Pa)^(1/y)\")\n", + "(Pb/Pa)**(1/y)\n", + "print(\"also substituting for Va and Vb\")\n", + "print(\"(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\")\n", + "r=1+(4.18*8/1.82)\n", + "print(\"so V1/V2=r=1+(4.18*8/1.82)\"),round(r,2)\n", + "print(\"it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\")\n", + "print(\"as given;cut off occurs at(V1-V2)/15 volume\")\n", + "print(\"V3=V2+(V1-V2)/15\")\n", + "print(\"cut off ratio,rho=V3/V2\")\n", + "rho=1+(r-1)/15\n", + "n_airstandard=1-(1/(r**(y-1)*y))*((rho**y-1)/(rho-1))\n", + "print(\"air standard efficiency for diesel cycle(n_airstandard)=\"),round(n_airstandard,2)\n", + "print(\"in percentage\"),round(n_airstandard*100,2)\n", + "n_airstandard=0.6325;\n", + "n_overall=n_airstandard*n_ite*n_mech\n", + "print(\"overall efficiency(n_overall)=n_airstandard*n_ite*n_mech\"),round(n_overall,3)\n", + "print(\"in percentage\"),round(n_overall*100,2)\n", + "n_overall=0.253;\n", + "75*60*60/(n_overall*C*100)\n", + "print(\"fuel consumption,bhp/hr in kg=\"),round(75*60*60/(n_overall*C*100),2)\n", + "print(\"so compression ratio=19.37\")\n", + "print(\"air standard efficiency=63.25%\")\n", + "print(\"fuel consumption,bhp/hr=0.255 kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.3;pg no: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.3, Page:338 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\n", + "1-2-3-4=cycle a\n", + "1-2_a-3_a-4_a-5=cycle b\n", + "here Cp/Cv=y\n", + "and R=0.293 KJ/kg K\n", + "let us consider 1 kg of air for perfect gas,\n", + "P*V=m*R*T\n", + "so V1=m*R*T1/P1 in m^3\n", + "at state 3,\n", + "P3*V3=m*R*T3\n", + "so T3/V2=P3/(m*R)\n", + "so T3=17064.8*V2............eq1\n", + "for cycle a and also for cycle b\n", + "T3_a=17064.8*V2_a.............eq2\n", + "a> for otto cycle,\n", + "Q23=Cv*(T3-T2)\n", + "so T3-T2=Q23/Cv\n", + "and T2=T3-2394.36.............eq3\n", + "from gas law,P2*V2/T2=P3*V3/T3\n", + "here V2=V3 and using eq 3,we get\n", + "so P2/(T3-2394.36)=5000/T3\n", + "substituting T3 as function of V2\n", + "P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\n", + "P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\n", + "also P1*V1^y=P2*V2^y\n", + "or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\n", + "upon solving it yields\n", + "381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\n", + "or V2^1.4-0.140*V2^0.4-.022=0\n", + "by hit and trial it yields,V2=0.18 \n", + "thus compression ratio,r=V1/V2\n", + "otto cycle efficiency,n_otto=1-(1/r)^(y-1)\n", + "in percentage\n", + "b> for mixed or dual cycle\n", + "Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\n", + "or T3_a-T2_a=850/Cv\n", + "or T2_a=T3_a-1197.2 .............eq4 \n", + "also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\n", + "P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\n", + "or P2_a/(T3_a-1197.2)=5000/T3_a\n", + "also we had seen earlier that T3_a=17064.8*V2_a\n", + "so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\n", + "so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\n", + "or for adiabatic process,1-2_a\n", + "P1*V1^y=P2*V2^y\n", + "so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\n", + "or V2_a^1.4-0.07*V2_a^0.4-0.022=0\n", + "by hit and trial \n", + "V2_a=0.122 m^3\n", + "therefore upon substituting V2_a,\n", + "by eq 5,P2_a in KPa\n", + "by eq 2,T3_a in K\n", + "by eq 4,T2_a in K\n", + "from constant pressure heat addition\n", + "Cp*(T4_a-T3_a)=850\n", + "so T4_a=T3_a+(850/Cp) in K\n", + "also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\n", + "so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \n", + "here P3_a=P4_a and V2_a=V3_a\n", + "using adiabatic formulations V4_a=0.172 m^3\n", + "(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\n", + "so T5=T4_a/(V5/V4_a)^(y-1) in K\n", + "heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\n", + "efficiency of mixed cycle(n_mixed)= 0.57\n", + "in percentage 56.55\n" + ] + }, + { + "data": { + "text/plain": [ + "'NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#cal of comparing efficiency of two cycles\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.3, Page:338 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\")\n", + "T1=(100+273.15);#temperature at beginning of compresssion in K\n", + "P1=103;#pressure at beginning of compresssion in KPa\n", + "Cp=1.003;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "Q23=1700;#heat added during combustion in KJ/kg\n", + "P3=5000;#maximum pressure in cylinder in KPa\n", + "print(\"1-2-3-4=cycle a\")\n", + "print(\"1-2_a-3_a-4_a-5=cycle b\")\n", + "print(\"here Cp/Cv=y\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"and R=0.293 KJ/kg K\")\n", + "R=0.293;\n", + "print(\"let us consider 1 kg of air for perfect gas,\")\n", + "m=1;#mass of air in kg\n", + "print(\"P*V=m*R*T\")\n", + "print(\"so V1=m*R*T1/P1 in m^3\")\n", + "V1=m*R*T1/P1\n", + "print(\"at state 3,\")\n", + "print(\"P3*V3=m*R*T3\")\n", + "print(\"so T3/V2=P3/(m*R)\")\n", + "P3/(m*R)\n", + "print(\"so T3=17064.8*V2............eq1\")\n", + "print(\"for cycle a and also for cycle b\")\n", + "print(\"T3_a=17064.8*V2_a.............eq2\")\n", + "print(\"a> for otto cycle,\")\n", + "print(\"Q23=Cv*(T3-T2)\")\n", + "print(\"so T3-T2=Q23/Cv\")\n", + "Q23/Cv\n", + "print(\"and T2=T3-2394.36.............eq3\")\n", + "print(\"from gas law,P2*V2/T2=P3*V3/T3\")\n", + "print(\"here V2=V3 and using eq 3,we get\")\n", + "print(\"so P2/(T3-2394.36)=5000/T3\")\n", + "print(\"substituting T3 as function of V2\")\n", + "print(\"P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\")\n", + "print(\"P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\")\n", + "print(\"also P1*V1^y=P2*V2^y\")\n", + "print(\"or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\")\n", + "print(\"upon solving it yields\")\n", + "print(\"381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\")\n", + "print(\"or V2^1.4-0.140*V2^0.4-.022=0\")\n", + "print(\"by hit and trial it yields,V2=0.18 \")\n", + "V2=0.18;\n", + "print(\"thus compression ratio,r=V1/V2\")\n", + "r=V1/V2\n", + "print(\"otto cycle efficiency,n_otto=1-(1/r)^(y-1)\")\n", + "n_otto=1-(1/r)**(y-1)\n", + "print(\"in percentage\")\n", + "n_otto=n_otto*100\n", + "print(\"b> for mixed or dual cycle\")\n", + "print(\"Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\")\n", + "print(\"or T3_a-T2_a=850/Cv\")\n", + "850/Cv\n", + "print(\"or T2_a=T3_a-1197.2 .............eq4 \")\n", + "print(\"also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\")\n", + "print(\"P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\")\n", + "print(\"or P2_a/(T3_a-1197.2)=5000/T3_a\")\n", + "print(\"also we had seen earlier that T3_a=17064.8*V2_a\")\n", + "print(\"so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\")\n", + "print(\"so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\")\n", + "print(\"or for adiabatic process,1-2_a\")\n", + "print(\"P1*V1^y=P2*V2^y\")\n", + "print(\"so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\")\n", + "print(\"or V2_a^1.4-0.07*V2_a^0.4-0.022=0\")\n", + "print(\"by hit and trial \")\n", + "print(\"V2_a=0.122 m^3\")\n", + "V2_a=0.122;\n", + "print(\"therefore upon substituting V2_a,\")\n", + "print(\"by eq 5,P2_a in KPa\")\n", + "P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a)\n", + "print(\"by eq 2,T3_a in K\")\n", + "T3_a=17064.8*V2_a\n", + "print(\"by eq 4,T2_a in K\")\n", + "T2_a=T3_a-1197.2\n", + "print(\"from constant pressure heat addition\")\n", + "print(\"Cp*(T4_a-T3_a)=850\")\n", + "print(\"so T4_a=T3_a+(850/Cp) in K\")\n", + "T4_a=T3_a+(850/Cp)\n", + "print(\"also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\")\n", + "print(\"so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \")\n", + "print(\"here P3_a=P4_a and V2_a=V3_a\")\n", + "V4_a=V2_a*T4_a/(T3_a)\n", + "print(\"using adiabatic formulations V4_a=0.172 m^3\")\n", + "print(\"(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\")\n", + "V5=V1;\n", + "print(\"so T5=T4_a/(V5/V4_a)^(y-1) in K\")\n", + "T5=T4_a/(V5/V4_a)**(y-1)\n", + "print(\"heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\")\n", + "Q51=Cv*(T5-T1)\n", + "n_mixed=(Q23-Q51)/Q23\n", + "print(\"efficiency of mixed cycle(n_mixed)=\"),round(n_mixed,2)\n", + "print(\"in percentage\"),round(n_mixed*100,2)\n", + "(\"NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.4;pg no: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.4, Page:341 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\n", + "optimum pressure ratio for maximum work output,\n", + "rp=(T_max/T_min)^((y)/(2*(y-1)))\n", + "so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\n", + "so T2=T1*(p2/p1)^((y-1)/y)in K\n", + "For process 3-4,\n", + "T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(rp)^((y-1)/y)in K\n", + "heat supplied,Q23=Cp*(T3-T2)in KJ/kg\n", + "compressor work,Wc in KJ/kg= 301.5\n", + "turbine work,Wt in KJ/kg= 603.0\n", + "thermal efficiency=net work/heat supplied= 0.5\n", + "so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.4, Page:341 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\")\n", + "T3=1200;#maximum temperature in K\n", + "T1=300;#minimum temperature in K\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"optimum pressure ratio for maximum work output,\")\n", + "print(\"rp=(T_max/T_min)^((y)/(2*(y-1)))\")\n", + "T_max=T3;\n", + "T_min=T1;\n", + "rp=(T_max/T_min)**((y)/(2*(y-1)))\n", + "print(\"so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2=T1*(rp)**((y-1)/y)\n", + "print(\"For process 3-4,\")\n", + "print(\"T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(rp)^((y-1)/y)in K\")\n", + "T4=T3/(rp)**((y-1)/y)\n", + "print(\"heat supplied,Q23=Cp*(T3-T2)in KJ/kg\")\n", + "Q23=Cp*(T3-T2)\n", + "Wc=Cp*(T2-T1)\n", + "print(\"compressor work,Wc in KJ/kg=\"),round(Wc,2)\n", + "Wt=Cp*(T3-T4)\n", + "print(\"turbine work,Wt in KJ/kg=\"),round(Wt,2)\n", + "(Wt-Wc)/Q23\n", + "print(\"thermal efficiency=net work/heat supplied=\"),round((Wt-Wc)/Q23,2)\n", + "print(\"so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.5;pg no: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.5, Page:342 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\n", + "gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\n", + "for process 1-2 being isentropic,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\n", + "so T2_a=T1+((T2-T1)/n_compr)in K\n", + "during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\n", + "heat added=mf*q\n", + "=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\n", + "or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\n", + "so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\n", + "for expansion 3-4 being\n", + "T4/T3=(P4/P3)^((n-1)/n)\n", + "so T4=T3*(P4/P3)^((n-1)/n) in K\n", + "actaul temperature at turbine inlet considering internal efficiency of turbine,\n", + "n_turb=(T3-T4_a)/(T3-T4)\n", + "so T4_a=T3-(n_turb*(T3-T4)) in K\n", + "compressor work,per kg of air compressed(Wc) in KJ/kg of air= 234.42\n", + "so compressor work=234.42 KJ/kg of air\n", + "turbine work,per kg of air compressed(Wt) in KJ/kg of air= 414.71\n", + "so turbine work=414.71 KJ/kg of air\n", + "net work(W_net) in KJ/kg of air= 180.29\n", + "heat supplied(Q) in KJ/kg of air= 751.16\n", + "thermal efficiency(n)= 0.24\n", + "in percentage 24.0\n", + "so thermal efficiency=24%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.5, Page:342 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\")\n", + "P1=1*10**5;#initial pressure in Pa\n", + "P4=P1;#constant pressure process\n", + "T1=300;#initial temperature in K\n", + "P2=6.2*10**5;#pressure after compression in Pa\n", + "P3=P2;#constant pressure process\n", + "k=0.017;#fuel to air ratio\n", + "n_compr=0.88;#compressor efficiency\n", + "q=44186;#heating value of fuel in KJ/kg\n", + "n_turb=0.9;#turbine internal efficiency\n", + "Cp_comb=1.147;#specific heat of combustion at constant pressure in KJ/kg K\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "n=1.33;#expansion constant for polytropic constant\n", + "print(\"gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\")\n", + "print(\"for process 1-2 being isentropic,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\")\n", + "print(\"so T2_a=T1+((T2-T1)/n_compr)in K\")\n", + "T2_a=T1+((T2-T1)/n_compr)\n", + "print(\"during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\")\n", + "print(\"heat added=mf*q\")\n", + "print(\"=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\")\n", + "print(\"or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\")\n", + "print(\"so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\")\n", + "T3=((k)*q+(Cp_air*T2_a))/((1+(k))*Cp_comb)\n", + "print(\"for expansion 3-4 being\")\n", + "print(\"T4/T3=(P4/P3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(P4/P3)^((n-1)/n) in K\")\n", + "T4=T3*(P4/P3)**((n-1)/n)\n", + "print(\"actaul temperature at turbine inlet considering internal efficiency of turbine,\")\n", + "print(\"n_turb=(T3-T4_a)/(T3-T4)\")\n", + "print(\"so T4_a=T3-(n_turb*(T3-T4)) in K\")\n", + "T4_a=T3-(n_turb*(T3-T4))\n", + "Wc=Cp_air*(T2_a-T1)\n", + "print(\"compressor work,per kg of air compressed(Wc) in KJ/kg of air=\"),round(Wc,2)\n", + "print(\"so compressor work=234.42 KJ/kg of air\")\n", + "Wt=Cp_comb*(T3-T4_a)\n", + "print(\"turbine work,per kg of air compressed(Wt) in KJ/kg of air=\"),round(Wt,2)\n", + "print(\"so turbine work=414.71 KJ/kg of air\")\n", + "W_net=Wt-Wc\n", + "print(\"net work(W_net) in KJ/kg of air=\"),round(W_net,2)\n", + "Q=k*q\n", + "print(\"heat supplied(Q) in KJ/kg of air=\"),round(Q,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so thermal efficiency=24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.6;pg no: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.6, Page:343 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\n", + "NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\n", + "overall pressure ratio(rp)= 13.59\n", + "so overall optimum pressure ratio=13.6\n" + ] + } + ], + "source": [ + "#cal of overall optimum pressure ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.6, Page:343 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\")\n", + "T1=300;#minimum temperature in brayton cycle in K\n", + "T5=1200;#maximum temperature in brayton cycle in K\n", + "n_isen_c=0.85;#isentropic efficiency of compressor\n", + "n_isen_t=0.9;#isentropic efficiency of turbine\n", + "y=1.4;#expansion constant\n", + "print(\"NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\")\n", + "rp=(T1/(T5*n_isen_c*n_isen_t))**((2*y)/(3*(1-y)))\n", + "print(\"overall pressure ratio(rp)=\"),round(rp,2)\n", + "print(\"so overall optimum pressure ratio=13.6\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.7;pg no: 346" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.7, Page:346 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\n", + "i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\n", + "therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\n", + "or P9/P1=k=(1.35)^8 11.03\n", + "or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\n", + "T9/T1=(P9/P1)^((y-1)/y)\n", + "so T9 in K= 621.47\n", + "considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\n", + "(T9-T1)/(T9_actual-T1)=0.82\n", + "so T9_actual=T1+((T9-T1)/0.82) in K 689.19\n", + "let the actual index of compression be n, then\n", + "(T9_actual/T1)=(P9/P1)^((n-1)/n)\n", + "so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\n", + "so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\n", + "ii> let polytropic efficiency be n_polytropic for compressor then,\n", + "(n-1)/n=((y-1)/y)*(1/n_polytropic)\n", + "so n_polytropic= 0.87\n", + "in percentage 86.9\n", + "so ploytropic efficiency=86.88%\n", + "iii> stage efficiency can be estimated for any stage.say first stage.\n", + "ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "actual temperature at exit of first stage can be estimated using polytropic index 1.49.\n", + "T2_actual/T1=(P2/P1)^((n-1)/n)\n", + "so T2_actual=T1*(P2/P1)^((n-1)/n) in K\n", + "stage efficiency for first stage,ns_1= 0.86\n", + "in percentage 86.33\n", + "actual temperature at exit of second stage,\n", + "T3_actual/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\n", + "ideal temperature at exit of second stage\n", + "T3/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3=T2_actual*(P3/P2)^((y-1)/y) in K\n", + "stage efficiency for second stage,ns_2= 0.86\n", + "in percentage 86.33\n", + "actual rtemperature at exit of third stage,\n", + "T4_actual/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4_actual in K= 420.83\n", + "ideal temperature at exit of third stage,\n", + "T4/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4 in K= 415.42\n", + "stage efficiency for third stage,ns_3= 0.86\n", + "in percentage= 8632.9\n", + "so stage efficiency=86.4%\n", + "iv> from steady flow energy equation,\n", + "Wc=dw=dh and dh=du+p*dv+v*dp\n", + "dh=dq+v*dp\n", + "dq=0 in adiabatic process\n", + "dh=v*dp\n", + "Wc=v*dp\n", + "here for polytropic compression \n", + "P*V^1.49=constant i.e n=1.49\n", + "Wc in KJ/s= 16419.87\n", + "due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s= 14777.89\n", + "so power required to drive compressor =14777.89 KJ/s\n" + ] + } + ], + "source": [ + "#cal of state of air at exit of compressor,polytropic efficiency,efficiency of each sate,power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.7, Page:346 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\")\n", + "T1=313.;#air entering temperature in K\n", + "P1=1*10**5;#air entering pressure in Pa\n", + "m=50.;#flow rate through compressor in kg/s\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\")\n", + "print(\"therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\")\n", + "r=1.35;#compression ratio\n", + "k=(1.35)**8\n", + "print(\"or P9/P1=k=(1.35)^8\"),round(k,2)\n", + "k=11.03;#approx.\n", + "print(\"or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\")\n", + "y=1.4;#expansion constant \n", + "print(\"T9/T1=(P9/P1)^((y-1)/y)\")\n", + "T9=T1*(k)**((y-1)/y)\n", + "print(\"so T9 in K=\"),round(T9,2)\n", + "print(\"considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\")\n", + "print(\"(T9-T1)/(T9_actual-T1)=0.82\")\n", + "T9_actual=T1+((T9-T1)/0.82)\n", + "print(\"so T9_actual=T1+((T9-T1)/0.82) in K\"),round(T9_actual,2)\n", + "print(\"let the actual index of compression be n, then\")\n", + "print(\"(T9_actual/T1)=(P9/P1)^((n-1)/n)\")\n", + "print(\"so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\")\n", + "n=math.log(k)/(math.log(k)-math.log(T9_actual/T1))\n", + "print(\"so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\")\n", + "print(\"ii> let polytropic efficiency be n_polytropic for compressor then,\")\n", + "print(\"(n-1)/n=((y-1)/y)*(1/n_polytropic)\")\n", + "n_polytropic=((y-1)/y)/((n-1)/n)\n", + "print(\"so n_polytropic=\"),round(n_polytropic,2)\n", + "print(\"in percentage\"),round(n_polytropic*100,2)\n", + "print(\"so ploytropic efficiency=86.88%\")\n", + "print(\"iii> stage efficiency can be estimated for any stage.say first stage.\")\n", + "print(\"ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"actual temperature at exit of first stage can be estimated using polytropic index 1.49.\")\n", + "print(\"T2_actual/T1=(P2/P1)^((n-1)/n)\")\n", + "print(\"so T2_actual=T1*(P2/P1)^((n-1)/n) in K\")\n", + "T2_actual=T1*(r)**((n-1)/n)\n", + "ns_1=(T2-T1)/(T2_actual-T1)\n", + "print(\"stage efficiency for first stage,ns_1=\"),round(ns_1,2)\n", + "print(\"in percentage\"),round(ns_1*100,2)\n", + "print(\"actual temperature at exit of second stage,\")\n", + "print(\"T3_actual/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\")\n", + "T3_actual=T2_actual*(r)**((n-1)/n)\n", + "print(\"ideal temperature at exit of second stage\")\n", + "print(\"T3/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3=T2_actual*(P3/P2)^((y-1)/y) in K\")\n", + "T3=T2_actual*(r)**((y-1)/y)\n", + "ns_2=(T3-T2_actual)/(T3_actual-T2_actual)\n", + "print(\"stage efficiency for second stage,ns_2=\"),round(ns_2,2)\n", + "print(\"in percentage\"),round(ns_2*100,2)\n", + "print(\"actual rtemperature at exit of third stage,\")\n", + "print(\"T4_actual/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4_actual=T3_actual*(r)**((n-1)/n)\n", + "print(\"so T4_actual in K=\"),round(T4_actual,2)\n", + "print(\"ideal temperature at exit of third stage,\")\n", + "print(\"T4/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4=T3_actual*(r)**((y-1)/y)\n", + "print(\"so T4 in K=\"),round(T4,2)\n", + "ns_3=(T4-T3_actual)/(T4_actual-T3_actual)\n", + "print(\"stage efficiency for third stage,ns_3=\"),round(ns_3,2)\n", + "ns_3=ns_3*100\n", + "print(\"in percentage=\"),round(ns_3*100,2)\n", + "print(\"so stage efficiency=86.4%\")\n", + "print(\"iv> from steady flow energy equation,\")\n", + "print(\"Wc=dw=dh and dh=du+p*dv+v*dp\")\n", + "print(\"dh=dq+v*dp\")\n", + "print(\"dq=0 in adiabatic process\")\n", + "print(\"dh=v*dp\")\n", + "print(\"Wc=v*dp\")\n", + "print(\"here for polytropic compression \")\n", + "print(\"P*V^1.49=constant i.e n=1.49\")\n", + "n=1.49;\n", + "Wc=(n/(n-1))*m*R*T1*(((k)**((n-1)/n))-1)\n", + "print(\"Wc in KJ/s=\"),round(Wc,2)\n", + "Wc_actual=Wc*0.9\n", + "print(\"due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s=\"),round(Wc*0.9,2)\n", + "print(\"so power required to drive compressor =14777.89 KJ/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.8;pg no: 349" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.8, Page:349 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\n", + "In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.8, Page:349 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\")\n", + "print(\"In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.9;pg no: 350" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.9, Page:350 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\n", + "using polytropic efficiency the index of compression and expansion can be obtained as under,\n", + "let compression index be nc,\n", + "(nc-1)/nc=(y-1)/(y*n_poly_c)\n", + "so nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "let expansion index be nt,\n", + "(nt-1)/nt=(n_poly_T*(y-1))/y\n", + "so nt=1/(1-((n_poly_T*(y-1))/y))\n", + "For process 1-2\n", + "T2/T1=(p2/p1)^((nc-1)/nc)\n", + "so T2=T1*(p2/p1)^((nc-1)/nc)in K\n", + "also T4/T3=(p4/p3)^((nt-1)/nt)\n", + "so T4=T3*(p4/p3)^((nt-1)/nt)in K\n", + "using heat exchanger effectivenesss,\n", + "epsilon=(T5-T2)/(T4-T2)\n", + "so T5=T2+(epsilon*(T4-T2))in K\n", + "heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\n", + "compressor work,Wc=Cp*(T2-T1)in \n", + "turbine work,Wt=Cp*(T3-T4)in KJ/kg\n", + "cycle efficiency= 0.33\n", + "in percentage 32.79\n", + "work ratio= 0.33\n", + "specific work output in KJ/kg= 152.56\n", + "so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,work ratio,specific work output\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.9, Page:350 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\")\n", + "y=1.4;#expansion constant\n", + "n_poly_c=0.85;#ploytropic efficiency of compressor\n", + "n_poly_T=0.90;#ploytropic efficiency of Turbine\n", + "r=8.;#compression ratio\n", + "T1=(27.+273.);#temperature of air in compressor in K\n", + "T3=1100.;#temperature of air leaving combustion chamber in K\n", + "epsilon=0.8;#effectiveness of heat exchanger\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"using polytropic efficiency the index of compression and expansion can be obtained as under,\")\n", + "print(\"let compression index be nc,\")\n", + "print(\"(nc-1)/nc=(y-1)/(y*n_poly_c)\")\n", + "print(\"so nc=1/(1-((y-1)/(y*n_poly_c)))\")\n", + "nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "print(\"let expansion index be nt,\")\n", + "print(\"(nt-1)/nt=(n_poly_T*(y-1))/y\")\n", + "print(\"so nt=1/(1-((n_poly_T*(y-1))/y))\")\n", + "nt=1/(1-((n_poly_T*(y-1))/y))\n", + "print(\"For process 1-2\")\n", + "print(\"T2/T1=(p2/p1)^((nc-1)/nc)\")\n", + "print(\"so T2=T1*(p2/p1)^((nc-1)/nc)in K\")\n", + "T2=T1*(r)**((nc-1)/nc)\n", + "print(\"also T4/T3=(p4/p3)^((nt-1)/nt)\")\n", + "print(\"so T4=T3*(p4/p3)^((nt-1)/nt)in K\")\n", + "T4=T3*(1/r)**((nt-1)/nt)\n", + "print(\"using heat exchanger effectivenesss,\") \n", + "print(\"epsilon=(T5-T2)/(T4-T2)\")\n", + "print(\"so T5=T2+(epsilon*(T4-T2))in K\")\n", + "T5=T2+(epsilon*(T4-T2))\n", + "print(\"heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\")\n", + "q_add=Cp*(T3-T5)\n", + "print(\"compressor work,Wc=Cp*(T2-T1)in \")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "Wt=Cp*(T3-T4)\n", + "(Wt-Wc)/q_add\n", + "print(\"cycle efficiency=\"),round((Wt-Wc)/q_add,2)\n", + "print(\"in percentage\"),round((Wt-Wc)*100/q_add,2)\n", + "(Wt-Wc)/Wt\n", + "print(\"work ratio=\"),round((Wt-Wc)/Wt,2)\n", + "print(\"specific work output in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.10;pg no: 351" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.10, Page:351 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\n", + "for process 1-2_a\n", + "T2_a/T1=(p2_a/p1)^((y-1)/y)\n", + "so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc) in K\n", + "for process 3-4_a,\n", + "T4_a/T3=(p4/p3)^((y-1)/y)\n", + "so T4_a=T3*(p4/p3)^((y-1)/y)in K\n", + "Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\n", + "net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\n", + "heat added,q_add=Cp*(T3-T2) in KJ/kg\n", + "thermal efficiency,n=W_net/q_add\n", + "n={Wc-(Cp*(T3-T4))}/q_add\n", + "so T4=T3-((Wc-(n*q_add))/Cp)in K\n", + "therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a) 0.297\n", + "in percentage 29.7\n", + "so turbine isentropic efficiency=29.69%\n" + ] + } + ], + "source": [ + "#cal of isentropic efficiency of turbine\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.10, Page:351 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\")\n", + "T1=(27+273);#temperature of air in compressor in K\n", + "p1=1*10**5;#pressure of air in compressor in Pa\n", + "p2=5*10**5;#pressure of air after compression in Pa\n", + "p3=p2-0.2*10**5;#pressure drop in Pa\n", + "p4=1*10**5;#pressure to which expansion occur in turbine in Pa\n", + "nc=0.85;#isentropic efficiency\n", + "T3=1000;#temperature of air in combustion chamber in K\n", + "n=0.2;#thermal efficiency of plant\n", + "y=1.4;#expansion constant\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2_a\")\n", + "print(\"T2_a/T1=(p2_a/p1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc) in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4_a,\")\n", + "print(\"T4_a/T3=(p4/p3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p4/p3)^((y-1)/y)in K\")\n", + "T4_a=T3*(p4/p3)**((y-1)/y)\n", + "print(\"Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "print(\"net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\")\n", + "print(\"heat added,q_add=Cp*(T3-T2) in KJ/kg\")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"thermal efficiency,n=W_net/q_add\")\n", + "print(\"n={Wc-(Cp*(T3-T4))}/q_add\")\n", + "print(\"so T4=T3-((Wc-(n*q_add))/Cp)in K\")\n", + "T4=T3-((Wc-(n*q_add))/Cp)\n", + "nt=(T3-T4)/(T3-T4_a)\n", + "print(\"therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a)\"),round((T3-T4)/(T3-T4_a),3)\n", + "print(\"in percentage\"),round(nt*100,2)\n", + "print(\"so turbine isentropic efficiency=29.69%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.11;pg no: 352" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.11, Page:352 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\n", + "for perfect intercooling the pressure ratio of each compression stage(k)\n", + "k=sqrt(r)\n", + "for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\n", + "so T2_a=T1*(k)^((y-1)/y)in K\n", + "considering isentropic efficiency of compression,\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc)in K\n", + "for process 3-4,\n", + "T4_a/T3=(P4/P3)^((y-1)/y)\n", + "so T4_a=T3*(P4/P3)^((y-1)/y) in K\n", + "again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\n", + "so T4=T3+((T4_a-T3)/nc)in K\n", + "total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\n", + "for expansion process 5-6_a,\n", + "T6_a/T5=(P6/P5)^((y-1)/y)\n", + "so T6_a=T5*(P6/P5)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\n", + "T6=T5-(ne*(T5-T6_a)) in K\n", + "for expansion in 7-8_a\n", + "T8_a/T7=(P8/P7)^((y-1)/y)\n", + "so T8_a=T7*(P8/P7)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\n", + "so T8=T7-(ne*(T7-T8_a))in K\n", + "expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\n", + "heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\n", + "fuel required per kg of air,mf=q_add/C 0.02\n", + "air-fuel ratio=1/mf 51.08\n", + "net output(W) in KJ/kg= 229.2\n", + "output for air flowing at 30 kg/s,=W*m in KW 6876.05\n", + "thermal efficiency= 0.28\n", + "in percentage 27.88\n", + "so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\n", + "NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net output,A/F ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.11, Page:352 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "T1=(27.+273.);#initial temperature in K\n", + "T3=T1;\n", + "r=10.;#pressure ratio\n", + "T5=1000.;#maximum temperature in cycle in K\n", + "P6=3.*10**5;#first stage expansion pressure in Pa\n", + "T7=995.;#first stage reheated temperature in K\n", + "C=42000.;#calorific value of fuel in KJ/kg\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "m=30.;#air flow rate in kg/s\n", + "nc=0.85;#isentropic efficiency of compression\n", + "ne=0.9;#isentropic efficiency of expansion\n", + "y=1.4;#expansion constant\n", + "print(\"for perfect intercooling the pressure ratio of each compression stage(k)\")\n", + "print(\"k=sqrt(r)\")\n", + "k=math.sqrt(r)\n", + "k=3.16;#approx.\n", + "print(\"for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(k)^((y-1)/y)in K\")\n", + "T2_a=T1*(k)**((y-1)/y)\n", + "print(\"considering isentropic efficiency of compression,\")\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc)in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4_a/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4_a=T3*(k)**((y-1)/y)\n", + "print(\"again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\")\n", + "print(\"so T4=T3+((T4_a-T3)/nc)in K\")\n", + "T4=T3+((T4_a-T3)/nc)\n", + "print(\"total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\")\n", + "Wc=2*Cp*(T4-T3)\n", + "print(\"for expansion process 5-6_a,\")\n", + "print(\"T6_a/T5=(P6/P5)^((y-1)/y)\")\n", + "print(\"so T6_a=T5*(P6/P5)^((y-1)/y) in K\")\n", + "P5=10.*10**5;#pressure in Pa\n", + "T6_a=T5*(P6/P5)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\")\n", + "print(\"T6=T5-(ne*(T5-T6_a)) in K\")\n", + "T6=T5-(ne*(T5-T6_a))\n", + "print(\"for expansion in 7-8_a\")\n", + "print(\"T8_a/T7=(P8/P7)^((y-1)/y)\")\n", + "print(\"so T8_a=T7*(P8/P7)^((y-1)/y) in K\")\n", + "P8=P1;#constant pressure process\n", + "P7=P6;#constant pressure process\n", + "T8_a=T7*(P8/P7)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\")\n", + "print(\"so T8=T7-(ne*(T7-T8_a))in K\")\n", + "T8=T7-(ne*(T7-T8_a))\n", + "print(\"expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\")\n", + "Wt=Cp*(T5-T6)+Cp*(T7-T8)\n", + "print(\"heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\")\n", + "q_add=Cp*(T5-T4)+Cp*(T7-T6)\n", + "mf=q_add/C\n", + "print(\"fuel required per kg of air,mf=q_add/C\"),round(q_add/C,2)\n", + "print(\"air-fuel ratio=1/mf\"),round(1/mf,2)\n", + "W=Wt-Wc\n", + "print(\"net output(W) in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"output for air flowing at 30 kg/s,=W*m in KW\"),round(W*m,2)\n", + "W/q_add\n", + "print(\"thermal efficiency=\"),round(W/q_add,2)\n", + "print(\"in percentage\"),round(W*100/q_add,2)\n", + "print(\"so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\")\n", + "print(\"NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.12;pg no: 354" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.12, Page:354 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\n", + "for process 1-2,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "for process 3-4,\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "for process 6-7,\n", + "T7/T6=(P7/P6)^((y-1)/y)\n", + "so T7=T6*(P7/P6)^((y-1)/y) in K\n", + "for process 8-9,\n", + "T9/T8=(P9/P8)^((y-1)/y)\n", + "T9=T8*(P9/P8)^((y-1)/y) in K\n", + "in regenerator,effectiveness=(T5-T4)/(T9-T4)\n", + "T5=T4+(ne*(T9-T4))in K\n", + "compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\n", + "turbine work per kg air,Wt in KJ/kg= 660.84\n", + "heat added per kg air,q_add in KJ/kg= 765.43\n", + "total fuel required per kg of air= 0.02\n", + "net work,W_net in KJ/kg= 450.85\n", + "cycle thermal efficiency,n= 0.59\n", + "in percentage 58.9\n", + "fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C= 0.0056\n", + "fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C= 0.0126\n", + "so fuel-air ratio in two combustion chambers=0.0126,0.0056\n", + "total turbine work=660.85 KJ/kg\n", + "cycle thermal efficiency=58.9%\n", + "NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \n" + ] + } + ], + "source": [ + "#cal of fuel-air ratio in two combustion chambers,total turbine work,cycle thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.12, Page:354 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "P9=P1;\n", + "T1=300.;#initial temperature in K\n", + "P2=4.*10**5;#pressure of air in intercooler in Pa\n", + "P3=P2;\n", + "T3=290.;#temperature of air in intercooler in K\n", + "T6=1300.;#temperature of combustion chamber in K\n", + "P4=8.*10**5;#pressure of air after compression in Pa\n", + "P6=P4;\n", + "T8=1300.;#temperature after reheating in K\n", + "P8=4.*10**5;#pressure after expansion in Pa\n", + "P7=P8;\n", + "C=42000.;#heating value of fuel in KJ/kg\n", + "y=1.4;#expansion constant\n", + "ne=0.8;#effectiveness of regenerator\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(P4/P3)**((y-1)/y)\n", + "print(\"for process 6-7,\")\n", + "print(\"T7/T6=(P7/P6)^((y-1)/y)\")\n", + "print(\"so T7=T6*(P7/P6)^((y-1)/y) in K\")\n", + "T7=T6*(P7/P6)**((y-1)/y)\n", + "print(\"for process 8-9,\")\n", + "print(\"T9/T8=(P9/P8)^((y-1)/y)\")\n", + "print(\"T9=T8*(P9/P8)^((y-1)/y) in K\")\n", + "T9=T8*(P9/P8)**((y-1)/y)\n", + "print(\"in regenerator,effectiveness=(T5-T4)/(T9-T4)\")\n", + "print(\"T5=T4+(ne*(T9-T4))in K\")\n", + "T5=T4+(ne*(T9-T4))\n", + "print(\"compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)+Cp*(T4-T3)\n", + "Wt=Cp*(T6-T7)+Cp*(T8-T9)\n", + "print(\"turbine work per kg air,Wt in KJ/kg=\"),round(Wt,2)\n", + "q_add=Cp*(T6-T5)+Cp*(T8-T7)\n", + "print(\"heat added per kg air,q_add in KJ/kg=\"),round(q_add,2)\n", + "q_add/C\n", + "print(\"total fuel required per kg of air=\"),round(q_add/C,2)\n", + "W_net=Wt-Wc\n", + "print(\"net work,W_net in KJ/kg=\"),round(W_net,2)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C=\"),round(Cp*(T8-T7)/C,4)\n", + "print(\"fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C=\"),round(Cp*(T6-T5)/C,4)\n", + "print(\"so fuel-air ratio in two combustion chambers=0.0126,0.0056\")\n", + "print(\"total turbine work=660.85 KJ/kg\")\n", + "print(\"cycle thermal efficiency=58.9%\")\n", + "print(\"NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.13;pg no: 356" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.13, Page:356 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\n", + "work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\n", + "heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\n", + "for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\n", + "mass of air per cycle=m/n in kg/cycle\n", + "brake output in KW= 17.12\n", + "stroke volume,V in m^3= 0.0117\n", + "brake output=17.11 KW\n", + "stroke volume=0.0116 m^3\n" + ] + } + ], + "source": [ + "#cal of brake output,stroke volume\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.13, Page:356 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\")\n", + "T2=700.;#highest temperature of stirling engine in K\n", + "T1=300.;#lowest temperature of stirling engine in K\n", + "r=3.;#compression ratio\n", + "q_add=30.;#heat addition in KJ/s\n", + "epsilon=0.9;#regenerator efficiency\n", + "P=1*10**5;#pressure at begining of compression in Pa\n", + "n=100.;#number of cycle per minute\n", + "Cv=0.72;#specific heat at constant volume in KJ/kg K\n", + "R=29.27;#gas constant in KJ/kg K\n", + "print(\"work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\")\n", + "W=R*(T2-T1)*math.log(r)\n", + "print(\"heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\")\n", + "q=R*T2*math.log(r)+(1-epsilon)*Cv*(T2-T1)\n", + "print(\"for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\")\n", + "m=q_add/q\n", + "print(\"mass of air per cycle=m/n in kg/cycle\")\n", + "m/n\n", + "print(\"brake output in KW=\"),round(W*m,2)\n", + "m=1.33*10**-4;#mass of air per cycle in kg/cycle\n", + "T=T1;\n", + "V=m*R*T*1000/P\n", + "print(\"stroke volume,V in m^3=\"),round(V,4)\n", + "print(\"brake output=17.11 KW\")\n", + "print(\"stroke volume=0.0116 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.14;pg no: 357" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.14, Page:357 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\n", + "In question no.14,various expression is derived which cannot be solved using python software.\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.14, Page:357 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\")\n", + "print(\"In question no.14,various expression is derived which cannot be solved using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.15;pg no: 361" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.15, Page:361 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\n", + "In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y)in K\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \n", + "heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \n", + "net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\n", + "heat recovered in HRSG for steam generation per kg of air\n", + "q_HRGC=Cp*(T4-T5)in KJ/kg\n", + "at inlet to steam in turbine,\n", + "from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\n", + "for expansion in steam turbine,sa=sb\n", + "let dryness fraction at state b be x\n", + "also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\n", + "sb=sf+x*sfg\n", + "so x=(sb-sf)/sfg \n", + "so hb=hf+x*hfg in KJ/kg K\n", + "at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\n", + "at exit of feed pump,hd=hd-hc\n", + "hd=vc*(Pg-Pc)*100 in KJ/kg\n", + "heat added per kg of steam =ha-hd in KJ/kg\n", + "mass of steam generated per kg of air in kg steam per kg air= 0.119\n", + "net steam turbine cycle output,W_net_ST in KJ/kg= 677.4\n", + "steam cycle output per kg of air(W_net_ST) in KJ/kg air= 80.61\n", + "total combined cycle output in KJ/kg air= 486.88\n", + "combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add 0.58\n", + "in percentage 57.77\n", + "In absence of steam cycle,gas turbine cycle efficiency,n_GT= 0.48\n", + "in percentage 48.21\n", + "thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\n", + "overall efficiency=57.77%\n", + "steam per kg of air=0.119 kg steam per/kg air\n" + ] + } + ], + "source": [ + "#cal of overall efficiency,steam per kg of air\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.15, Page:361 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\")\n", + "r=10.;#pressure ratio\n", + "Cp=1.0032;#specific heat of air in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "T3=1400.;#inlet temperature of gas turbine in K\n", + "T1=(17.+273.);#ambient temperature in K\n", + "P1=1.*10**5;#ambient pressure in Pa\n", + "Pc=15.;#condensor pressure in KPa\n", + "Pg=6.*1000;#pressure of steam in generator in KPa\n", + "T5=420.;#temperature of exhaust from gas turbine in K\n", + "print(\"In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y)in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(1/r)**((y-1)/y)\n", + "print(\"compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \")\n", + "Wt=Cp*(T3-T4)\n", + "print(\"heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\")\n", + "W_net_GT=Wt-Wc\n", + "print(\"heat recovered in HRSG for steam generation per kg of air\")\n", + "print(\"q_HRGC=Cp*(T4-T5)in KJ/kg\")\n", + "q_HRGC=Cp*(T4-T5)\n", + "print(\"at inlet to steam in turbine,\")\n", + "print(\"from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\")\n", + "ha=3177.2;\n", + "sa=6.5408;\n", + "print(\"for expansion in steam turbine,sa=sb\")\n", + "sb=sa;\n", + "print(\"let dryness fraction at state b be x\")\n", + "print(\"also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\")\n", + "sf=0.7549;\n", + "sfg=7.2536;\n", + "hf=225.94;\n", + "hfg=2373.1;\n", + "print(\"sb=sf+x*sfg\")\n", + "print(\"so x=(sb-sf)/sfg \")\n", + "x=(sb-sf)/sfg\n", + "print(\"so hb=hf+x*hfg in KJ/kg K\")\n", + "hb=hf+x*hfg\n", + "print(\"at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\")\n", + "hc=hf;\n", + "vc=0.001014;\n", + "print(\"at exit of feed pump,hd=hd-hc\")\n", + "print(\"hd=vc*(Pg-Pc)*100 in KJ/kg\")\n", + "hd=vc*(Pg-Pc)*100\n", + "print(\"heat added per kg of steam =ha-hd in KJ/kg\")\n", + "ha-hd\n", + "print(\"mass of steam generated per kg of air in kg steam per kg air=\"),round(q_HRGC/(ha-hd),3)\n", + "W_net_ST=(ha-hb)-(hd-hc)\n", + "print(\"net steam turbine cycle output,W_net_ST in KJ/kg=\"),round(W_net_ST,2)\n", + "W_net_ST=W_net_ST*0.119 \n", + "print(\"steam cycle output per kg of air(W_net_ST) in KJ/kg air=\"),round(W_net_ST,2)\n", + "(W_net_GT+W_net_ST)\n", + "print(\"total combined cycle output in KJ/kg air= \"),round((W_net_GT+W_net_ST),2)\n", + "n_cc=(W_net_GT+W_net_ST)/q_add\n", + "print(\"combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add\"),round(n_cc,2)\n", + "print(\"in percentage\"),round(n_cc*100,2)\n", + "n_GT=W_net_GT/q_add\n", + "print(\"In absence of steam cycle,gas turbine cycle efficiency,n_GT=\"),round(n_GT,2)\n", + "print(\"in percentage\"),round(n_GT*100,2)\n", + "print(\"thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\")\n", + "print(\"overall efficiency=57.77%\")\n", + "print(\"steam per kg of air=0.119 kg steam per/kg air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.16;pg no: 363" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.16, Page:363 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\n", + "here P4/P1=P3/P1=70............eq1\n", + "compression ratio,V1/V2=V1/V3=15.............eq2\n", + "heat added at constant volume= heat added at constant pressure\n", + "Q23=Q34\n", + "m*Cv*(T3-T2)=m*Cp*(T4-T3)\n", + "(T3-T2)=y*(T4-T3)\n", + "for process 1-2;\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2=T1*(V1/V2)^(y-1) in K\n", + "and (P2/P1)=(V1/V2)^y\n", + "so P2=P1*(V1/V2)^y in Pa...........eq3\n", + "for process 2-3,\n", + "P2/P3=T2/T3\n", + "so T3=T2*P3/P2\n", + "using eq 1 and 3,we get\n", + "T3=T2*k/r^y in K\n", + "using equal heat additions for processes 2-3 and 3-4,\n", + "(T3-T2)=y*(T4-T3)\n", + "so T4=T3+((T3-T2)/y) in K\n", + "for process 3-4,\n", + "V3/V4=T3/T4\n", + "(V3/V1)*(V1/V4)=T3/T4\n", + "so (V1/V4)=(T3/T4)*r\n", + "so V1/V4=11.88 and V5/V4=11.88\n", + "for process 4-5,\n", + "P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\n", + "so T5=T4/((V5/V4)^(y-1))\n", + "air standard thermal efficiency(n)=1-(heat rejected/heat added)\n", + "n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\n", + "n= 0.65\n", + "air standard thermal efficiency=0.6529\n", + "in percentage 65.29\n", + "so air standard thermal efficiency=65.29%\n", + "Actual thermal efficiency may be different from theoretical efficiency due to following reasons\n", + "a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\n", + "b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\n", + "c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\n" + ] + } + ], + "source": [ + "#cal of air standard thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.16, Page:363 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\")\n", + "T1=(27+273);#temperature at begining of compression in K\n", + "k=70;#ration of maximum to minimum pressures\n", + "r=15;#compression ratio\n", + "y=1.4;#expansion constant\n", + "print(\"here P4/P1=P3/P1=70............eq1\")\n", + "print(\"compression ratio,V1/V2=V1/V3=15.............eq2\")\n", + "print(\"heat added at constant volume= heat added at constant pressure\")\n", + "print(\"Q23=Q34\")\n", + "print(\"m*Cv*(T3-T2)=m*Cp*(T4-T3)\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"for process 1-2;\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2=T1*(V1/V2)^(y-1) in K\")\n", + "T2=T1*(r)**(y-1)\n", + "print(\"and (P2/P1)=(V1/V2)^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in Pa...........eq3\")\n", + "print(\"for process 2-3,\")\n", + "print(\"P2/P3=T2/T3\")\n", + "print(\"so T3=T2*P3/P2\")\n", + "print(\"using eq 1 and 3,we get\")\n", + "print(\"T3=T2*k/r^y in K\")\n", + "T3=T2*k/r**y \n", + "print(\"using equal heat additions for processes 2-3 and 3-4,\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"so T4=T3+((T3-T2)/y) in K\")\n", + "T4=T3+((T3-T2)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"V3/V4=T3/T4\")\n", + "print(\"(V3/V1)*(V1/V4)=T3/T4\")\n", + "print(\"so (V1/V4)=(T3/T4)*r\")\n", + "(T3/T4)*r\n", + "print(\"so V1/V4=11.88 and V5/V4=11.88\")\n", + "print(\"for process 4-5,\")\n", + "print(\"P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\")\n", + "print(\"so T5=T4/((V5/V4)^(y-1))\")\n", + "T5=T4/(11.88)**(y-1)\n", + "print(\"air standard thermal efficiency(n)=1-(heat rejected/heat added)\")\n", + "print(\"n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\")\n", + "n=1-((T5-T1)/(y*(T4-T3)+(T3-T2)))\n", + "print(\"n=\"),round(n,2)\n", + "print(\"air standard thermal efficiency=0.6529\")\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so air standard thermal efficiency=65.29%\")\n", + "print(\"Actual thermal efficiency may be different from theoretical efficiency due to following reasons\")\n", + "print(\"a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\")\n", + "print(\"b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\")\n", + "print(\"c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb new file mode 100644 index 00000000..606321b3 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_2.ipynb @@ -0,0 +1,1655 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 9:Gas Power Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.1;pg no: 334" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.1, Page:334 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\n", + "SI engine operate on otto cycle.consider working fluid to be perfect gas.\n", + "here,y=Cp/Cv\n", + "Cp-Cv=R in KJ/kg K\n", + "compression ratio,r=V1/V2=(0.15+V2)/V2\n", + "so V2=0.15/(r-1) in m^3\n", + "so V2=0.03 m^3\n", + "total cylinder volume=V1=r*V2 m^3\n", + "from perfect gas law,P*V=m*R*T\n", + "so m=P1*V1/(R*T1) in kg\n", + "from state 1 to 2 by P*V^y=P2*V2^y\n", + "so P2=P1*(V1/V2)^y in KPa\n", + "also,P1*V1/T1=P2*V2/T2\n", + "so T2=P2*V2*T1/(P1*V1)in K\n", + "from heat addition process 2-3\n", + "Q23=m*CV*(T3-T2)\n", + "T3=T2+(Q23/(m*Cv))in K\n", + "also from,P3*V3/T3=P2*V2/T2\n", + "P3=P2*V2*T3/(V3*T2) in KPa\n", + "for adiabatic expansion 3-4,\n", + "P3*V3^y=P4*V4^y\n", + "and V4=V1\n", + "hence,P4=P3*V3^y/V1^y in KPa\n", + "and from P3*V3/T3=P4*V4/T4\n", + "T4=P4*V4*T3/(P3*V3) in K\n", + "entropy change from 2-3 and 4-1 are same,and can be given as,\n", + "S3-S2=S4-S1=m*Cv*log(T4/T1)\n", + "so entropy change,deltaS_32=deltaS_41 in KJ/K\n", + "heat rejected,Q41=m*Cv*(T4-T1) in KJ\n", + "net work(W) in KJ= 76.75\n", + "efficiency(n)= 0.51\n", + "in percentage 51.16\n", + "mean effective pressure(mep)=work/volume change in KPa= 511.64\n", + "so mep=511.67 KPa\n" + ] + } + ], + "source": [ + "#cal of mean effective pressure\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.1, Page:334 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\")\n", + "Cp=1;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "P1=98;#pressure at begining of compression in KPa\n", + "T1=(60+273.15);#temperature at begining of compression in K\n", + "Q23=150;#heat supplied in KJ/kg\n", + "r=6;#compression ratio\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"SI engine operate on otto cycle.consider working fluid to be perfect gas.\")\n", + "print(\"here,y=Cp/Cv\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"Cp-Cv=R in KJ/kg K\")\n", + "R=Cp-Cv\n", + "print(\"compression ratio,r=V1/V2=(0.15+V2)/V2\")\n", + "print(\"so V2=0.15/(r-1) in m^3\")\n", + "V2=0.15/(r-1)\n", + "print(\"so V2=0.03 m^3\")\n", + "print(\"total cylinder volume=V1=r*V2 m^3\")\n", + "V1=r*V2\n", + "print(\"from perfect gas law,P*V=m*R*T\")\n", + "print(\"so m=P1*V1/(R*T1) in kg\")\n", + "m=P1*V1/(R*T1)\n", + "m=0.183;#approx.\n", + "print(\"from state 1 to 2 by P*V^y=P2*V2^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in KPa\")\n", + "P2=P1*(V1/V2)**y\n", + "print(\"also,P1*V1/T1=P2*V2/T2\")\n", + "print(\"so T2=P2*V2*T1/(P1*V1)in K\")\n", + "T2=P2*V2*T1/(P1*V1)\n", + "print(\"from heat addition process 2-3\")\n", + "print(\"Q23=m*CV*(T3-T2)\")\n", + "print(\"T3=T2+(Q23/(m*Cv))in K\")\n", + "T3=T2+(Q23/(m*Cv))\n", + "print(\"also from,P3*V3/T3=P2*V2/T2\")\n", + "print(\"P3=P2*V2*T3/(V3*T2) in KPa\")\n", + "V3=V2;#constant volume process\n", + "P3=P2*V2*T3/(V3*T2) \n", + "print(\"for adiabatic expansion 3-4,\")\n", + "print(\"P3*V3^y=P4*V4^y\")\n", + "print(\"and V4=V1\")\n", + "V4=V1;\n", + "print(\"hence,P4=P3*V3^y/V1^y in KPa\")\n", + "P4=P3*V3**y/V1**y\n", + "print(\"and from P3*V3/T3=P4*V4/T4\")\n", + "print(\"T4=P4*V4*T3/(P3*V3) in K\")\n", + "T4=P4*V4*T3/(P3*V3)\n", + "print(\"entropy change from 2-3 and 4-1 are same,and can be given as,\")\n", + "print(\"S3-S2=S4-S1=m*Cv*log(T4/T1)\")\n", + "print(\"so entropy change,deltaS_32=deltaS_41 in KJ/K\")\n", + "deltaS_32=m*Cv*math.log(T4/T1)\n", + "deltaS_41=deltaS_32;\n", + "print(\"heat rejected,Q41=m*Cv*(T4-T1) in KJ\")\n", + "Q41=m*Cv*(T4-T1)\n", + "W=Q23-Q41\n", + "print(\"net work(W) in KJ=\"),round(W,2)\n", + "n=W/Q23\n", + "print(\"efficiency(n)=\"),round(W/Q23,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "mep=W/0.15\n", + "print(\"mean effective pressure(mep)=work/volume change in KPa=\"),round(W/0.15,2)\n", + "print(\"so mep=511.67 KPa\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.2;pg no: 336" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.2, Page:336 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\n", + "as given\n", + "Va=V2+(7/8)*(V1-V2)\n", + "Vb=V2+(1/8)*(V1-V2)\n", + "and also\n", + "Pa*Va^y=Pb*Vb^y\n", + "so (Va/Vb)=(Pb/Pa)^(1/y)\n", + "also substituting for Va and Vb\n", + "(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\n", + "so V1/V2=r=1+(4.18*8/1.82) 19.37\n", + "it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\n", + "as given;cut off occurs at(V1-V2)/15 volume\n", + "V3=V2+(V1-V2)/15\n", + "cut off ratio,rho=V3/V2\n", + "air standard efficiency for diesel cycle(n_airstandard)= 0.63\n", + "in percentage 63.23\n", + "overall efficiency(n_overall)=n_airstandard*n_ite*n_mech 0.253\n", + "in percentage 25.3\n", + "fuel consumption,bhp/hr in kg= 0.26\n", + "so compression ratio=19.37\n", + "air standard efficiency=63.25%\n", + "fuel consumption,bhp/hr=0.255 kg\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.2, Page:336 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\")\n", + "Pa=138;#pressure during compression at 1/8 of stroke in KPa\n", + "Pb=1.38*10**3;#pressure during compression at 7/8 of stroke in KPa\n", + "n_ite=0.5;#indicated thermal efficiency\n", + "n_mech=0.8;#mechanical efficiency\n", + "C=41800;#calorific value in KJ/kg\n", + "y=1.4;#expansion constant\n", + "print(\"as given\")\n", + "print(\"Va=V2+(7/8)*(V1-V2)\")\n", + "print(\"Vb=V2+(1/8)*(V1-V2)\")\n", + "print(\"and also\")\n", + "print(\"Pa*Va^y=Pb*Vb^y\")\n", + "print(\"so (Va/Vb)=(Pb/Pa)^(1/y)\")\n", + "(Pb/Pa)**(1/y)\n", + "print(\"also substituting for Va and Vb\")\n", + "print(\"(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\")\n", + "r=1+(4.18*8/1.82)\n", + "print(\"so V1/V2=r=1+(4.18*8/1.82)\"),round(r,2)\n", + "print(\"it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\")\n", + "print(\"as given;cut off occurs at(V1-V2)/15 volume\")\n", + "print(\"V3=V2+(V1-V2)/15\")\n", + "print(\"cut off ratio,rho=V3/V2\")\n", + "rho=1+(r-1)/15\n", + "n_airstandard=1-(1/(r**(y-1)*y))*((rho**y-1)/(rho-1))\n", + "print(\"air standard efficiency for diesel cycle(n_airstandard)=\"),round(n_airstandard,2)\n", + "print(\"in percentage\"),round(n_airstandard*100,2)\n", + "n_airstandard=0.6325;\n", + "n_overall=n_airstandard*n_ite*n_mech\n", + "print(\"overall efficiency(n_overall)=n_airstandard*n_ite*n_mech\"),round(n_overall,3)\n", + "print(\"in percentage\"),round(n_overall*100,2)\n", + "n_overall=0.253;\n", + "75*60*60/(n_overall*C*100)\n", + "print(\"fuel consumption,bhp/hr in kg=\"),round(75*60*60/(n_overall*C*100),2)\n", + "print(\"so compression ratio=19.37\")\n", + "print(\"air standard efficiency=63.25%\")\n", + "print(\"fuel consumption,bhp/hr=0.255 kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.3;pg no: 338" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.3, Page:338 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\n", + "1-2-3-4=cycle a\n", + "1-2_a-3_a-4_a-5=cycle b\n", + "here Cp/Cv=y\n", + "and R=0.293 KJ/kg K\n", + "let us consider 1 kg of air for perfect gas,\n", + "P*V=m*R*T\n", + "so V1=m*R*T1/P1 in m^3\n", + "at state 3,\n", + "P3*V3=m*R*T3\n", + "so T3/V2=P3/(m*R)\n", + "so T3=17064.8*V2............eq1\n", + "for cycle a and also for cycle b\n", + "T3_a=17064.8*V2_a.............eq2\n", + "a> for otto cycle,\n", + "Q23=Cv*(T3-T2)\n", + "so T3-T2=Q23/Cv\n", + "and T2=T3-2394.36.............eq3\n", + "from gas law,P2*V2/T2=P3*V3/T3\n", + "here V2=V3 and using eq 3,we get\n", + "so P2/(T3-2394.36)=5000/T3\n", + "substituting T3 as function of V2\n", + "P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\n", + "P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\n", + "also P1*V1^y=P2*V2^y\n", + "or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\n", + "upon solving it yields\n", + "381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\n", + "or V2^1.4-0.140*V2^0.4-.022=0\n", + "by hit and trial it yields,V2=0.18 \n", + "thus compression ratio,r=V1/V2\n", + "otto cycle efficiency,n_otto=1-(1/r)^(y-1)\n", + "in percentage\n", + "b> for mixed or dual cycle\n", + "Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\n", + "or T3_a-T2_a=850/Cv\n", + "or T2_a=T3_a-1197.2 .............eq4 \n", + "also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\n", + "P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\n", + "or P2_a/(T3_a-1197.2)=5000/T3_a\n", + "also we had seen earlier that T3_a=17064.8*V2_a\n", + "so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\n", + "so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\n", + "or for adiabatic process,1-2_a\n", + "P1*V1^y=P2*V2^y\n", + "so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\n", + "or V2_a^1.4-0.07*V2_a^0.4-0.022=0\n", + "by hit and trial \n", + "V2_a=0.122 m^3\n", + "therefore upon substituting V2_a,\n", + "by eq 5,P2_a in KPa\n", + "by eq 2,T3_a in K\n", + "by eq 4,T2_a in K\n", + "from constant pressure heat addition\n", + "Cp*(T4_a-T3_a)=850\n", + "so T4_a=T3_a+(850/Cp) in K\n", + "also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\n", + "so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \n", + "here P3_a=P4_a and V2_a=V3_a\n", + "using adiabatic formulations V4_a=0.172 m^3\n", + "(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\n", + "so T5=T4_a/(V5/V4_a)^(y-1) in K\n", + "heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\n", + "efficiency of mixed cycle(n_mixed)= 0.57\n", + "in percentage 56.55\n" + ] + }, + { + "data": { + "text/plain": [ + "'NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#cal of comparing efficiency of two cycles\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.3, Page:338 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\")\n", + "T1=(100+273.15);#temperature at beginning of compresssion in K\n", + "P1=103;#pressure at beginning of compresssion in KPa\n", + "Cp=1.003;#specific heat at constant pressure in KJ/kg K\n", + "Cv=0.71;#specific heat at constant volume in KJ/kg K\n", + "Q23=1700;#heat added during combustion in KJ/kg\n", + "P3=5000;#maximum pressure in cylinder in KPa\n", + "print(\"1-2-3-4=cycle a\")\n", + "print(\"1-2_a-3_a-4_a-5=cycle b\")\n", + "print(\"here Cp/Cv=y\")\n", + "y=Cp/Cv\n", + "y=1.4;#approx.\n", + "print(\"and R=0.293 KJ/kg K\")\n", + "R=0.293;\n", + "print(\"let us consider 1 kg of air for perfect gas,\")\n", + "m=1;#mass of air in kg\n", + "print(\"P*V=m*R*T\")\n", + "print(\"so V1=m*R*T1/P1 in m^3\")\n", + "V1=m*R*T1/P1\n", + "print(\"at state 3,\")\n", + "print(\"P3*V3=m*R*T3\")\n", + "print(\"so T3/V2=P3/(m*R)\")\n", + "P3/(m*R)\n", + "print(\"so T3=17064.8*V2............eq1\")\n", + "print(\"for cycle a and also for cycle b\")\n", + "print(\"T3_a=17064.8*V2_a.............eq2\")\n", + "print(\"a> for otto cycle,\")\n", + "print(\"Q23=Cv*(T3-T2)\")\n", + "print(\"so T3-T2=Q23/Cv\")\n", + "Q23/Cv\n", + "print(\"and T2=T3-2394.36.............eq3\")\n", + "print(\"from gas law,P2*V2/T2=P3*V3/T3\")\n", + "print(\"here V2=V3 and using eq 3,we get\")\n", + "print(\"so P2/(T3-2394.36)=5000/T3\")\n", + "print(\"substituting T3 as function of V2\")\n", + "print(\"P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\")\n", + "print(\"P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\")\n", + "print(\"also P1*V1^y=P2*V2^y\")\n", + "print(\"or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\")\n", + "print(\"upon solving it yields\")\n", + "print(\"381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\")\n", + "print(\"or V2^1.4-0.140*V2^0.4-.022=0\")\n", + "print(\"by hit and trial it yields,V2=0.18 \")\n", + "V2=0.18;\n", + "print(\"thus compression ratio,r=V1/V2\")\n", + "r=V1/V2\n", + "print(\"otto cycle efficiency,n_otto=1-(1/r)^(y-1)\")\n", + "n_otto=1-(1/r)**(y-1)\n", + "print(\"in percentage\")\n", + "n_otto=n_otto*100\n", + "print(\"b> for mixed or dual cycle\")\n", + "print(\"Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\")\n", + "print(\"or T3_a-T2_a=850/Cv\")\n", + "850/Cv\n", + "print(\"or T2_a=T3_a-1197.2 .............eq4 \")\n", + "print(\"also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\")\n", + "print(\"P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\")\n", + "print(\"or P2_a/(T3_a-1197.2)=5000/T3_a\")\n", + "print(\"also we had seen earlier that T3_a=17064.8*V2_a\")\n", + "print(\"so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\")\n", + "print(\"so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\")\n", + "print(\"or for adiabatic process,1-2_a\")\n", + "print(\"P1*V1^y=P2*V2^y\")\n", + "print(\"so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\")\n", + "print(\"or V2_a^1.4-0.07*V2_a^0.4-0.022=0\")\n", + "print(\"by hit and trial \")\n", + "print(\"V2_a=0.122 m^3\")\n", + "V2_a=0.122;\n", + "print(\"therefore upon substituting V2_a,\")\n", + "print(\"by eq 5,P2_a in KPa\")\n", + "P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a)\n", + "print(\"by eq 2,T3_a in K\")\n", + "T3_a=17064.8*V2_a\n", + "print(\"by eq 4,T2_a in K\")\n", + "T2_a=T3_a-1197.2\n", + "print(\"from constant pressure heat addition\")\n", + "print(\"Cp*(T4_a-T3_a)=850\")\n", + "print(\"so T4_a=T3_a+(850/Cp) in K\")\n", + "T4_a=T3_a+(850/Cp)\n", + "print(\"also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\")\n", + "print(\"so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \")\n", + "print(\"here P3_a=P4_a and V2_a=V3_a\")\n", + "V4_a=V2_a*T4_a/(T3_a)\n", + "print(\"using adiabatic formulations V4_a=0.172 m^3\")\n", + "print(\"(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\")\n", + "V5=V1;\n", + "print(\"so T5=T4_a/(V5/V4_a)^(y-1) in K\")\n", + "T5=T4_a/(V5/V4_a)**(y-1)\n", + "print(\"heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\")\n", + "Q51=Cv*(T5-T1)\n", + "n_mixed=(Q23-Q51)/Q23\n", + "print(\"efficiency of mixed cycle(n_mixed)=\"),round(n_mixed,2)\n", + "print(\"in percentage\"),round(n_mixed*100,2)\n", + "(\"NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.4;pg no: 341" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.4, Page:341 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\n", + "optimum pressure ratio for maximum work output,\n", + "rp=(T_max/T_min)^((y)/(2*(y-1)))\n", + "so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\n", + "so T2=T1*(p2/p1)^((y-1)/y)in K\n", + "For process 3-4,\n", + "T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\n", + "so T4=T3/(rp)^((y-1)/y)in K\n", + "heat supplied,Q23=Cp*(T3-T2)in KJ/kg\n", + "compressor work,Wc in KJ/kg= 301.5\n", + "turbine work,Wt in KJ/kg= 603.0\n", + "thermal efficiency=net work/heat supplied= 0.5\n", + "so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.4, Page:341 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\")\n", + "T3=1200;#maximum temperature in K\n", + "T1=300;#minimum temperature in K\n", + "y=1.4;#expansion constant\n", + "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n", + "print(\"optimum pressure ratio for maximum work output,\")\n", + "print(\"rp=(T_max/T_min)^((y)/(2*(y-1)))\")\n", + "T_max=T3;\n", + "T_min=T1;\n", + "rp=(T_max/T_min)**((y)/(2*(y-1)))\n", + "print(\"so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\")\n", + "print(\"so T2=T1*(p2/p1)^((y-1)/y)in K\")\n", + "T2=T1*(rp)**((y-1)/y)\n", + "print(\"For process 3-4,\")\n", + "print(\"T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\")\n", + "print(\"so T4=T3/(rp)^((y-1)/y)in K\")\n", + "T4=T3/(rp)**((y-1)/y)\n", + "print(\"heat supplied,Q23=Cp*(T3-T2)in KJ/kg\")\n", + "Q23=Cp*(T3-T2)\n", + "Wc=Cp*(T2-T1)\n", + "print(\"compressor work,Wc in KJ/kg=\"),round(Wc,2)\n", + "Wt=Cp*(T3-T4)\n", + "print(\"turbine work,Wt in KJ/kg=\"),round(Wt,2)\n", + "(Wt-Wc)/Q23\n", + "print(\"thermal efficiency=net work/heat supplied=\"),round((Wt-Wc)/Q23,2)\n", + "print(\"so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.5;pg no: 342" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.5, Page:342 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\n", + "gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\n", + "for process 1-2 being isentropic,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\n", + "so T2_a=T1+((T2-T1)/n_compr)in K\n", + "during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\n", + "heat added=mf*q\n", + "=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\n", + "or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\n", + "so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\n", + "for expansion 3-4 being\n", + "T4/T3=(P4/P3)^((n-1)/n)\n", + "so T4=T3*(P4/P3)^((n-1)/n) in K\n", + "actaul temperature at turbine inlet considering internal efficiency of turbine,\n", + "n_turb=(T3-T4_a)/(T3-T4)\n", + "so T4_a=T3-(n_turb*(T3-T4)) in K\n", + "compressor work,per kg of air compressed(Wc) in KJ/kg of air= 234.42\n", + "so compressor work=234.42 KJ/kg of air\n", + "turbine work,per kg of air compressed(Wt) in KJ/kg of air= 414.71\n", + "so turbine work=414.71 KJ/kg of air\n", + "net work(W_net) in KJ/kg of air= 180.29\n", + "heat supplied(Q) in KJ/kg of air= 751.16\n", + "thermal efficiency(n)= 0.24\n", + "in percentage 24.0\n", + "so thermal efficiency=24%\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,turbine and compressor work\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.5, Page:342 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\")\n", + "P1=1*10**5;#initial pressure in Pa\n", + "P4=P1;#constant pressure process\n", + "T1=300;#initial temperature in K\n", + "P2=6.2*10**5;#pressure after compression in Pa\n", + "P3=P2;#constant pressure process\n", + "k=0.017;#fuel to air ratio\n", + "n_compr=0.88;#compressor efficiency\n", + "q=44186;#heating value of fuel in KJ/kg\n", + "n_turb=0.9;#turbine internal efficiency\n", + "Cp_comb=1.147;#specific heat of combustion at constant pressure in KJ/kg K\n", + "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "n=1.33;#expansion constant for polytropic constant\n", + "print(\"gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\")\n", + "print(\"for process 1-2 being isentropic,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\")\n", + "print(\"so T2_a=T1+((T2-T1)/n_compr)in K\")\n", + "T2_a=T1+((T2-T1)/n_compr)\n", + "print(\"during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\")\n", + "print(\"heat added=mf*q\")\n", + "print(\"=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\")\n", + "print(\"or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\")\n", + "print(\"so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\")\n", + "T3=((k)*q+(Cp_air*T2_a))/((1+(k))*Cp_comb)\n", + "print(\"for expansion 3-4 being\")\n", + "print(\"T4/T3=(P4/P3)^((n-1)/n)\")\n", + "print(\"so T4=T3*(P4/P3)^((n-1)/n) in K\")\n", + "T4=T3*(P4/P3)**((n-1)/n)\n", + "print(\"actaul temperature at turbine inlet considering internal efficiency of turbine,\")\n", + "print(\"n_turb=(T3-T4_a)/(T3-T4)\")\n", + "print(\"so T4_a=T3-(n_turb*(T3-T4)) in K\")\n", + "T4_a=T3-(n_turb*(T3-T4))\n", + "Wc=Cp_air*(T2_a-T1)\n", + "print(\"compressor work,per kg of air compressed(Wc) in KJ/kg of air=\"),round(Wc,2)\n", + "print(\"so compressor work=234.42 KJ/kg of air\")\n", + "Wt=Cp_comb*(T3-T4_a)\n", + "print(\"turbine work,per kg of air compressed(Wt) in KJ/kg of air=\"),round(Wt,2)\n", + "print(\"so turbine work=414.71 KJ/kg of air\")\n", + "W_net=Wt-Wc\n", + "print(\"net work(W_net) in KJ/kg of air=\"),round(W_net,2)\n", + "Q=k*q\n", + "print(\"heat supplied(Q) in KJ/kg of air=\"),round(Q,2)\n", + "n=W_net/Q\n", + "print(\"thermal efficiency(n)=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so thermal efficiency=24%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.6;pg no: 343" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.6, Page:343 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\n", + "NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\n", + "overall pressure ratio(rp)= 13.59\n", + "so overall optimum pressure ratio=13.6\n" + ] + } + ], + "source": [ + "#cal of overall optimum pressure ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.6, Page:343 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\")\n", + "T1=300;#minimum temperature in brayton cycle in K\n", + "T5=1200;#maximum temperature in brayton cycle in K\n", + "n_isen_c=0.85;#isentropic efficiency of compressor\n", + "n_isen_t=0.9;#isentropic efficiency of turbine\n", + "y=1.4;#expansion constant\n", + "print(\"NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\")\n", + "rp=(T1/(T5*n_isen_c*n_isen_t))**((2*y)/(3*(1-y)))\n", + "print(\"overall pressure ratio(rp)=\"),round(rp,2)\n", + "print(\"so overall optimum pressure ratio=13.6\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.7;pg no: 346" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.7, Page:346 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\n", + "i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\n", + "therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\n", + "or P9/P1=k=(1.35)^8 11.03\n", + "or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\n", + "T9/T1=(P9/P1)^((y-1)/y)\n", + "so T9 in K= 621.47\n", + "considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\n", + "(T9-T1)/(T9_actual-T1)=0.82\n", + "so T9_actual=T1+((T9-T1)/0.82) in K 689.19\n", + "let the actual index of compression be n, then\n", + "(T9_actual/T1)=(P9/P1)^((n-1)/n)\n", + "so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\n", + "so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\n", + "ii> let polytropic efficiency be n_polytropic for compressor then,\n", + "(n-1)/n=((y-1)/y)*(1/n_polytropic)\n", + "so n_polytropic= 0.87\n", + "in percentage 86.9\n", + "so ploytropic efficiency=86.88%\n", + "iii> stage efficiency can be estimated for any stage.say first stage.\n", + "ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "actual temperature at exit of first stage can be estimated using polytropic index 1.49.\n", + "T2_actual/T1=(P2/P1)^((n-1)/n)\n", + "so T2_actual=T1*(P2/P1)^((n-1)/n) in K\n", + "stage efficiency for first stage,ns_1= 0.86\n", + "in percentage 86.33\n", + "actual temperature at exit of second stage,\n", + "T3_actual/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\n", + "ideal temperature at exit of second stage\n", + "T3/T2_actual=(P3/P2)^((n-1)/n)\n", + "so T3=T2_actual*(P3/P2)^((y-1)/y) in K\n", + "stage efficiency for second stage,ns_2= 0.86\n", + "in percentage 86.33\n", + "actual rtemperature at exit of third stage,\n", + "T4_actual/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4_actual in K= 420.83\n", + "ideal temperature at exit of third stage,\n", + "T4/T3_actual=(P4/P3)^((n-1)/n)\n", + "so T4 in K= 415.42\n", + "stage efficiency for third stage,ns_3= 0.86\n", + "in percentage= 8632.9\n", + "so stage efficiency=86.4%\n", + "iv> from steady flow energy equation,\n", + "Wc=dw=dh and dh=du+p*dv+v*dp\n", + "dh=dq+v*dp\n", + "dq=0 in adiabatic process\n", + "dh=v*dp\n", + "Wc=v*dp\n", + "here for polytropic compression \n", + "P*V^1.49=constant i.e n=1.49\n", + "Wc in KJ/s= 16419.87\n", + "due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s= 14777.89\n", + "so power required to drive compressor =14777.89 KJ/s\n" + ] + } + ], + "source": [ + "#cal of state of air at exit of compressor,polytropic efficiency,efficiency of each sate,power\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.7, Page:346 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\")\n", + "T1=313.;#air entering temperature in K\n", + "P1=1*10**5;#air entering pressure in Pa\n", + "m=50.;#flow rate through compressor in kg/s\n", + "R=0.287;#gas constant in KJ/kg K\n", + "print(\"i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\")\n", + "print(\"therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\")\n", + "r=1.35;#compression ratio\n", + "k=(1.35)**8\n", + "print(\"or P9/P1=k=(1.35)^8\"),round(k,2)\n", + "k=11.03;#approx.\n", + "print(\"or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\")\n", + "y=1.4;#expansion constant \n", + "print(\"T9/T1=(P9/P1)^((y-1)/y)\")\n", + "T9=T1*(k)**((y-1)/y)\n", + "print(\"so T9 in K=\"),round(T9,2)\n", + "print(\"considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\")\n", + "print(\"(T9-T1)/(T9_actual-T1)=0.82\")\n", + "T9_actual=T1+((T9-T1)/0.82)\n", + "print(\"so T9_actual=T1+((T9-T1)/0.82) in K\"),round(T9_actual,2)\n", + "print(\"let the actual index of compression be n, then\")\n", + "print(\"(T9_actual/T1)=(P9/P1)^((n-1)/n)\")\n", + "print(\"so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\")\n", + "n=math.log(k)/(math.log(k)-math.log(T9_actual/T1))\n", + "print(\"so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\")\n", + "print(\"ii> let polytropic efficiency be n_polytropic for compressor then,\")\n", + "print(\"(n-1)/n=((y-1)/y)*(1/n_polytropic)\")\n", + "n_polytropic=((y-1)/y)/((n-1)/n)\n", + "print(\"so n_polytropic=\"),round(n_polytropic,2)\n", + "print(\"in percentage\"),round(n_polytropic*100,2)\n", + "print(\"so ploytropic efficiency=86.88%\")\n", + "print(\"iii> stage efficiency can be estimated for any stage.say first stage.\")\n", + "print(\"ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"actual temperature at exit of first stage can be estimated using polytropic index 1.49.\")\n", + "print(\"T2_actual/T1=(P2/P1)^((n-1)/n)\")\n", + "print(\"so T2_actual=T1*(P2/P1)^((n-1)/n) in K\")\n", + "T2_actual=T1*(r)**((n-1)/n)\n", + "ns_1=(T2-T1)/(T2_actual-T1)\n", + "print(\"stage efficiency for first stage,ns_1=\"),round(ns_1,2)\n", + "print(\"in percentage\"),round(ns_1*100,2)\n", + "print(\"actual temperature at exit of second stage,\")\n", + "print(\"T3_actual/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\")\n", + "T3_actual=T2_actual*(r)**((n-1)/n)\n", + "print(\"ideal temperature at exit of second stage\")\n", + "print(\"T3/T2_actual=(P3/P2)^((n-1)/n)\")\n", + "print(\"so T3=T2_actual*(P3/P2)^((y-1)/y) in K\")\n", + "T3=T2_actual*(r)**((y-1)/y)\n", + "ns_2=(T3-T2_actual)/(T3_actual-T2_actual)\n", + "print(\"stage efficiency for second stage,ns_2=\"),round(ns_2,2)\n", + "print(\"in percentage\"),round(ns_2*100,2)\n", + "print(\"actual rtemperature at exit of third stage,\")\n", + "print(\"T4_actual/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4_actual=T3_actual*(r)**((n-1)/n)\n", + "print(\"so T4_actual in K=\"),round(T4_actual,2)\n", + "print(\"ideal temperature at exit of third stage,\")\n", + "print(\"T4/T3_actual=(P4/P3)^((n-1)/n)\")\n", + "T4=T3_actual*(r)**((y-1)/y)\n", + "print(\"so T4 in K=\"),round(T4,2)\n", + "ns_3=(T4-T3_actual)/(T4_actual-T3_actual)\n", + "print(\"stage efficiency for third stage,ns_3=\"),round(ns_3,2)\n", + "ns_3=ns_3*100\n", + "print(\"in percentage=\"),round(ns_3*100,2)\n", + "print(\"so stage efficiency=86.4%\")\n", + "print(\"iv> from steady flow energy equation,\")\n", + "print(\"Wc=dw=dh and dh=du+p*dv+v*dp\")\n", + "print(\"dh=dq+v*dp\")\n", + "print(\"dq=0 in adiabatic process\")\n", + "print(\"dh=v*dp\")\n", + "print(\"Wc=v*dp\")\n", + "print(\"here for polytropic compression \")\n", + "print(\"P*V^1.49=constant i.e n=1.49\")\n", + "n=1.49;\n", + "Wc=(n/(n-1))*m*R*T1*(((k)**((n-1)/n))-1)\n", + "print(\"Wc in KJ/s=\"),round(Wc,2)\n", + "Wc_actual=Wc*0.9\n", + "print(\"due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s=\"),round(Wc*0.9,2)\n", + "print(\"so power required to drive compressor =14777.89 KJ/s\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.8;pg no: 349" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.8, Page:349 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\n", + "In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\n" + ] + } + ], + "source": [ + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.8, Page:349 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\")\n", + "print(\"In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.9;pg no: 350" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.9, Page:350 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\n", + "using polytropic efficiency the index of compression and expansion can be obtained as under,\n", + "let compression index be nc,\n", + "(nc-1)/nc=(y-1)/(y*n_poly_c)\n", + "so nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "let expansion index be nt,\n", + "(nt-1)/nt=(n_poly_T*(y-1))/y\n", + "so nt=1/(1-((n_poly_T*(y-1))/y))\n", + "For process 1-2\n", + "T2/T1=(p2/p1)^((nc-1)/nc)\n", + "so T2=T1*(p2/p1)^((nc-1)/nc)in K\n", + "also T4/T3=(p4/p3)^((nt-1)/nt)\n", + "so T4=T3*(p4/p3)^((nt-1)/nt)in K\n", + "using heat exchanger effectivenesss,\n", + "epsilon=(T5-T2)/(T4-T2)\n", + "so T5=T2+(epsilon*(T4-T2))in K\n", + "heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\n", + "compressor work,Wc=Cp*(T2-T1)in \n", + "turbine work,Wt=Cp*(T3-T4)in KJ/kg\n", + "cycle efficiency= 0.33\n", + "in percentage 32.79\n", + "work ratio= 0.33\n", + "specific work output in KJ/kg= 152.56\n", + "so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\n" + ] + } + ], + "source": [ + "#cal of cycle efficiency,work ratio,specific work output\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.9, Page:350 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\")\n", + "y=1.4;#expansion constant\n", + "n_poly_c=0.85;#ploytropic efficiency of compressor\n", + "n_poly_T=0.90;#ploytropic efficiency of Turbine\n", + "r=8.;#compression ratio\n", + "T1=(27.+273.);#temperature of air in compressor in K\n", + "T3=1100.;#temperature of air leaving combustion chamber in K\n", + "epsilon=0.8;#effectiveness of heat exchanger\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"using polytropic efficiency the index of compression and expansion can be obtained as under,\")\n", + "print(\"let compression index be nc,\")\n", + "print(\"(nc-1)/nc=(y-1)/(y*n_poly_c)\")\n", + "print(\"so nc=1/(1-((y-1)/(y*n_poly_c)))\")\n", + "nc=1/(1-((y-1)/(y*n_poly_c)))\n", + "print(\"let expansion index be nt,\")\n", + "print(\"(nt-1)/nt=(n_poly_T*(y-1))/y\")\n", + "print(\"so nt=1/(1-((n_poly_T*(y-1))/y))\")\n", + "nt=1/(1-((n_poly_T*(y-1))/y))\n", + "print(\"For process 1-2\")\n", + "print(\"T2/T1=(p2/p1)^((nc-1)/nc)\")\n", + "print(\"so T2=T1*(p2/p1)^((nc-1)/nc)in K\")\n", + "T2=T1*(r)**((nc-1)/nc)\n", + "print(\"also T4/T3=(p4/p3)^((nt-1)/nt)\")\n", + "print(\"so T4=T3*(p4/p3)^((nt-1)/nt)in K\")\n", + "T4=T3*(1/r)**((nt-1)/nt)\n", + "print(\"using heat exchanger effectivenesss,\") \n", + "print(\"epsilon=(T5-T2)/(T4-T2)\")\n", + "print(\"so T5=T2+(epsilon*(T4-T2))in K\")\n", + "T5=T2+(epsilon*(T4-T2))\n", + "print(\"heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\")\n", + "q_add=Cp*(T3-T5)\n", + "print(\"compressor work,Wc=Cp*(T2-T1)in \")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "Wt=Cp*(T3-T4)\n", + "(Wt-Wc)/q_add\n", + "print(\"cycle efficiency=\"),round((Wt-Wc)/q_add,2)\n", + "print(\"in percentage\"),round((Wt-Wc)*100/q_add,2)\n", + "(Wt-Wc)/Wt\n", + "print(\"work ratio=\"),round((Wt-Wc)/Wt,2)\n", + "print(\"specific work output in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.10;pg no: 351" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.10, Page:351 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\n", + "for process 1-2_a\n", + "T2_a/T1=(p2_a/p1)^((y-1)/y)\n", + "so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc) in K\n", + "for process 3-4_a,\n", + "T4_a/T3=(p4/p3)^((y-1)/y)\n", + "so T4_a=T3*(p4/p3)^((y-1)/y)in K\n", + "Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\n", + "net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\n", + "heat added,q_add=Cp*(T3-T2) in KJ/kg\n", + "thermal efficiency,n=W_net/q_add\n", + "n={Wc-(Cp*(T3-T4))}/q_add\n", + "so T4=T3-((Wc-(n*q_add))/Cp)in K\n", + "therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a) 0.297\n", + "in percentage 29.7\n", + "so turbine isentropic efficiency=29.69%\n" + ] + } + ], + "source": [ + "#cal of isentropic efficiency of turbine\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.10, Page:351 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\")\n", + "T1=(27+273);#temperature of air in compressor in K\n", + "p1=1*10**5;#pressure of air in compressor in Pa\n", + "p2=5*10**5;#pressure of air after compression in Pa\n", + "p3=p2-0.2*10**5;#pressure drop in Pa\n", + "p4=1*10**5;#pressure to which expansion occur in turbine in Pa\n", + "nc=0.85;#isentropic efficiency\n", + "T3=1000;#temperature of air in combustion chamber in K\n", + "n=0.2;#thermal efficiency of plant\n", + "y=1.4;#expansion constant\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2_a\")\n", + "print(\"T2_a/T1=(p2_a/p1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\")\n", + "T2_a=T1*(p2/p1)**((y-1)/y)\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc) in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4_a,\")\n", + "print(\"T4_a/T3=(p4/p3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(p4/p3)^((y-1)/y)in K\")\n", + "T4_a=T3*(p4/p3)**((y-1)/y)\n", + "print(\"Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\")\n", + "print(\"net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\")\n", + "print(\"heat added,q_add=Cp*(T3-T2) in KJ/kg\")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"thermal efficiency,n=W_net/q_add\")\n", + "print(\"n={Wc-(Cp*(T3-T4))}/q_add\")\n", + "print(\"so T4=T3-((Wc-(n*q_add))/Cp)in K\")\n", + "T4=T3-((Wc-(n*q_add))/Cp)\n", + "nt=(T3-T4)/(T3-T4_a)\n", + "print(\"therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a)\"),round((T3-T4)/(T3-T4_a),3)\n", + "print(\"in percentage\"),round(nt*100,2)\n", + "print(\"so turbine isentropic efficiency=29.69%\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.11;pg no: 352" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.11, Page:352 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\n", + "for perfect intercooling the pressure ratio of each compression stage(k)\n", + "k=sqrt(r)\n", + "for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\n", + "so T2_a=T1*(k)^((y-1)/y)in K\n", + "considering isentropic efficiency of compression,\n", + "nc=(T2_a-T1)/(T2-T1)\n", + "so T2=T1+((T2_a-T1)/nc)in K\n", + "for process 3-4,\n", + "T4_a/T3=(P4/P3)^((y-1)/y)\n", + "so T4_a=T3*(P4/P3)^((y-1)/y) in K\n", + "again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\n", + "so T4=T3+((T4_a-T3)/nc)in K\n", + "total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\n", + "for expansion process 5-6_a,\n", + "T6_a/T5=(P6/P5)^((y-1)/y)\n", + "so T6_a=T5*(P6/P5)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\n", + "T6=T5-(ne*(T5-T6_a)) in K\n", + "for expansion in 7-8_a\n", + "T8_a/T7=(P8/P7)^((y-1)/y)\n", + "so T8_a=T7*(P8/P7)^((y-1)/y) in K\n", + "considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\n", + "so T8=T7-(ne*(T7-T8_a))in K\n", + "expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\n", + "heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\n", + "fuel required per kg of air,mf=q_add/C 0.02\n", + "air-fuel ratio=1/mf 51.08\n", + "net output(W) in KJ/kg= 229.2\n", + "output for air flowing at 30 kg/s,=W*m in KW 6876.05\n", + "thermal efficiency= 0.28\n", + "in percentage 27.88\n", + "so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\n", + "NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\n" + ] + } + ], + "source": [ + "#cal of thermal efficiency,net output,A/F ratio\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.11, Page:352 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "T1=(27.+273.);#initial temperature in K\n", + "T3=T1;\n", + "r=10.;#pressure ratio\n", + "T5=1000.;#maximum temperature in cycle in K\n", + "P6=3.*10**5;#first stage expansion pressure in Pa\n", + "T7=995.;#first stage reheated temperature in K\n", + "C=42000.;#calorific value of fuel in KJ/kg\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "m=30.;#air flow rate in kg/s\n", + "nc=0.85;#isentropic efficiency of compression\n", + "ne=0.9;#isentropic efficiency of expansion\n", + "y=1.4;#expansion constant\n", + "print(\"for perfect intercooling the pressure ratio of each compression stage(k)\")\n", + "print(\"k=sqrt(r)\")\n", + "k=math.sqrt(r)\n", + "k=3.16;#approx.\n", + "print(\"for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2_a=T1*(k)^((y-1)/y)in K\")\n", + "T2_a=T1*(k)**((y-1)/y)\n", + "print(\"considering isentropic efficiency of compression,\")\n", + "print(\"nc=(T2_a-T1)/(T2-T1)\")\n", + "print(\"so T2=T1+((T2_a-T1)/nc)in K\")\n", + "T2=T1+((T2_a-T1)/nc)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4_a/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4_a=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4_a=T3*(k)**((y-1)/y)\n", + "print(\"again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\")\n", + "print(\"so T4=T3+((T4_a-T3)/nc)in K\")\n", + "T4=T3+((T4_a-T3)/nc)\n", + "print(\"total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\")\n", + "Wc=2*Cp*(T4-T3)\n", + "print(\"for expansion process 5-6_a,\")\n", + "print(\"T6_a/T5=(P6/P5)^((y-1)/y)\")\n", + "print(\"so T6_a=T5*(P6/P5)^((y-1)/y) in K\")\n", + "P5=10.*10**5;#pressure in Pa\n", + "T6_a=T5*(P6/P5)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\")\n", + "print(\"T6=T5-(ne*(T5-T6_a)) in K\")\n", + "T6=T5-(ne*(T5-T6_a))\n", + "print(\"for expansion in 7-8_a\")\n", + "print(\"T8_a/T7=(P8/P7)^((y-1)/y)\")\n", + "print(\"so T8_a=T7*(P8/P7)^((y-1)/y) in K\")\n", + "P8=P1;#constant pressure process\n", + "P7=P6;#constant pressure process\n", + "T8_a=T7*(P8/P7)**((y-1)/y)\n", + "print(\"considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\")\n", + "print(\"so T8=T7-(ne*(T7-T8_a))in K\")\n", + "T8=T7-(ne*(T7-T8_a))\n", + "print(\"expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\")\n", + "Wt=Cp*(T5-T6)+Cp*(T7-T8)\n", + "print(\"heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\")\n", + "q_add=Cp*(T5-T4)+Cp*(T7-T6)\n", + "mf=q_add/C\n", + "print(\"fuel required per kg of air,mf=q_add/C\"),round(q_add/C,2)\n", + "print(\"air-fuel ratio=1/mf\"),round(1/mf,2)\n", + "W=Wt-Wc\n", + "print(\"net output(W) in KJ/kg=\"),round(Wt-Wc,2)\n", + "print(\"output for air flowing at 30 kg/s,=W*m in KW\"),round(W*m,2)\n", + "W/q_add\n", + "print(\"thermal efficiency=\"),round(W/q_add,2)\n", + "print(\"in percentage\"),round(W*100/q_add,2)\n", + "print(\"so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\")\n", + "print(\"NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.12;pg no: 354" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.12, Page:354 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\n", + "for process 1-2,\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y) in K\n", + "for process 3-4,\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "for process 6-7,\n", + "T7/T6=(P7/P6)^((y-1)/y)\n", + "so T7=T6*(P7/P6)^((y-1)/y) in K\n", + "for process 8-9,\n", + "T9/T8=(P9/P8)^((y-1)/y)\n", + "T9=T8*(P9/P8)^((y-1)/y) in K\n", + "in regenerator,effectiveness=(T5-T4)/(T9-T4)\n", + "T5=T4+(ne*(T9-T4))in K\n", + "compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\n", + "turbine work per kg air,Wt in KJ/kg= 660.84\n", + "heat added per kg air,q_add in KJ/kg= 765.43\n", + "total fuel required per kg of air= 0.02\n", + "net work,W_net in KJ/kg= 450.85\n", + "cycle thermal efficiency,n= 0.59\n", + "in percentage 58.9\n", + "fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C= 0.0056\n", + "fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C= 0.0126\n", + "so fuel-air ratio in two combustion chambers=0.0126,0.0056\n", + "total turbine work=660.85 KJ/kg\n", + "cycle thermal efficiency=58.9%\n", + "NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \n" + ] + } + ], + "source": [ + "#cal of fuel-air ratio in two combustion chambers,total turbine work,cycle thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.12, Page:354 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\")\n", + "P1=1.*10**5;#initial pressure in Pa\n", + "P9=P1;\n", + "T1=300.;#initial temperature in K\n", + "P2=4.*10**5;#pressure of air in intercooler in Pa\n", + "P3=P2;\n", + "T3=290.;#temperature of air in intercooler in K\n", + "T6=1300.;#temperature of combustion chamber in K\n", + "P4=8.*10**5;#pressure of air after compression in Pa\n", + "P6=P4;\n", + "T8=1300.;#temperature after reheating in K\n", + "P8=4.*10**5;#pressure after expansion in Pa\n", + "P7=P8;\n", + "C=42000.;#heating value of fuel in KJ/kg\n", + "y=1.4;#expansion constant\n", + "ne=0.8;#effectiveness of regenerator\n", + "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n", + "print(\"for process 1-2,\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n", + "T2=T1*(P2/P1)**((y-1)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(P4/P3)**((y-1)/y)\n", + "print(\"for process 6-7,\")\n", + "print(\"T7/T6=(P7/P6)^((y-1)/y)\")\n", + "print(\"so T7=T6*(P7/P6)^((y-1)/y) in K\")\n", + "T7=T6*(P7/P6)**((y-1)/y)\n", + "print(\"for process 8-9,\")\n", + "print(\"T9/T8=(P9/P8)^((y-1)/y)\")\n", + "print(\"T9=T8*(P9/P8)^((y-1)/y) in K\")\n", + "T9=T8*(P9/P8)**((y-1)/y)\n", + "print(\"in regenerator,effectiveness=(T5-T4)/(T9-T4)\")\n", + "print(\"T5=T4+(ne*(T9-T4))in K\")\n", + "T5=T4+(ne*(T9-T4))\n", + "print(\"compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)+Cp*(T4-T3)\n", + "Wt=Cp*(T6-T7)+Cp*(T8-T9)\n", + "print(\"turbine work per kg air,Wt in KJ/kg=\"),round(Wt,2)\n", + "q_add=Cp*(T6-T5)+Cp*(T8-T7)\n", + "print(\"heat added per kg air,q_add in KJ/kg=\"),round(q_add,2)\n", + "q_add/C\n", + "print(\"total fuel required per kg of air=\"),round(q_add/C,2)\n", + "W_net=Wt-Wc\n", + "print(\"net work,W_net in KJ/kg=\"),round(W_net,2)\n", + "n=W_net/q_add\n", + "print(\"cycle thermal efficiency,n=\"),round(n,2)\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C=\"),round(Cp*(T8-T7)/C,4)\n", + "print(\"fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C=\"),round(Cp*(T6-T5)/C,4)\n", + "print(\"so fuel-air ratio in two combustion chambers=0.0126,0.0056\")\n", + "print(\"total turbine work=660.85 KJ/kg\")\n", + "print(\"cycle thermal efficiency=58.9%\")\n", + "print(\"NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.13;pg no: 356" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.13, Page:356 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\n", + "work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\n", + "heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\n", + "for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\n", + "mass of air per cycle=m/n in kg/cycle\n", + "brake output in KW= 17.12\n", + "stroke volume,V in m^3= 0.0117\n", + "brake output=17.11 KW\n", + "stroke volume=0.0116 m^3\n" + ] + } + ], + "source": [ + "#cal of brake output,stroke volume\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "import math\n", + "print\"Example 9.13, Page:356 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\")\n", + "T2=700.;#highest temperature of stirling engine in K\n", + "T1=300.;#lowest temperature of stirling engine in K\n", + "r=3.;#compression ratio\n", + "q_add=30.;#heat addition in KJ/s\n", + "epsilon=0.9;#regenerator efficiency\n", + "P=1*10**5;#pressure at begining of compression in Pa\n", + "n=100.;#number of cycle per minute\n", + "Cv=0.72;#specific heat at constant volume in KJ/kg K\n", + "R=29.27;#gas constant in KJ/kg K\n", + "print(\"work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\")\n", + "W=R*(T2-T1)*math.log(r)\n", + "print(\"heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\")\n", + "q=R*T2*math.log(r)+(1-epsilon)*Cv*(T2-T1)\n", + "print(\"for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\")\n", + "m=q_add/q\n", + "print(\"mass of air per cycle=m/n in kg/cycle\")\n", + "m/n\n", + "print(\"brake output in KW=\"),round(W*m,2)\n", + "m=1.33*10**-4;#mass of air per cycle in kg/cycle\n", + "T=T1;\n", + "V=m*R*T*1000/P\n", + "print(\"stroke volume,V in m^3=\"),round(V,4)\n", + "print(\"brake output=17.11 KW\")\n", + "print(\"stroke volume=0.0116 m^3\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.14;pg no: 357" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.14, Page:357 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\n", + "In question no.14,various expression is derived which cannot be solved using python software.\n" + ] + } + ], + "source": [ + "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.14, Page:357 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\")\n", + "print(\"In question no.14,various expression is derived which cannot be solved using python software.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.15;pg no: 361" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.15, Page:361 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\n", + "In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\n", + "so T2=T1*(P2/P1)^((y-1)/y)in K\n", + "T4/T3=(P4/P3)^((y-1)/y)\n", + "so T4=T3*(P4/P3)^((y-1)/y) in K\n", + "compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n", + "turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \n", + "heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \n", + "net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\n", + "heat recovered in HRSG for steam generation per kg of air\n", + "q_HRGC=Cp*(T4-T5)in KJ/kg\n", + "at inlet to steam in turbine,\n", + "from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\n", + "for expansion in steam turbine,sa=sb\n", + "let dryness fraction at state b be x\n", + "also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\n", + "sb=sf+x*sfg\n", + "so x=(sb-sf)/sfg \n", + "so hb=hf+x*hfg in KJ/kg K\n", + "at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\n", + "at exit of feed pump,hd=hd-hc\n", + "hd=vc*(Pg-Pc)*100 in KJ/kg\n", + "heat added per kg of steam =ha-hd in KJ/kg\n", + "mass of steam generated per kg of air in kg steam per kg air= 0.119\n", + "net steam turbine cycle output,W_net_ST in KJ/kg= 677.4\n", + "steam cycle output per kg of air(W_net_ST) in KJ/kg air= 80.61\n", + "total combined cycle output in KJ/kg air= 486.88\n", + "combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add 0.58\n", + "in percentage 57.77\n", + "In absence of steam cycle,gas turbine cycle efficiency,n_GT= 0.48\n", + "in percentage 48.21\n", + "thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\n", + "overall efficiency=57.77%\n", + "steam per kg of air=0.119 kg steam per/kg air\n" + ] + } + ], + "source": [ + "#cal of overall efficiency,steam per kg of air\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.15, Page:361 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\")\n", + "r=10.;#pressure ratio\n", + "Cp=1.0032;#specific heat of air in KJ/kg K\n", + "y=1.4;#expansion constant\n", + "T3=1400.;#inlet temperature of gas turbine in K\n", + "T1=(17.+273.);#ambient temperature in K\n", + "P1=1.*10**5;#ambient pressure in Pa\n", + "Pc=15.;#condensor pressure in KPa\n", + "Pg=6.*1000;#pressure of steam in generator in KPa\n", + "T5=420.;#temperature of exhaust from gas turbine in K\n", + "print(\"In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"so T2=T1*(P2/P1)^((y-1)/y)in K\")\n", + "T2=T1*(r)**((y-1)/y)\n", + "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n", + "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n", + "T4=T3*(1/r)**((y-1)/y)\n", + "print(\"compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n", + "Wc=Cp*(T2-T1)\n", + "print(\"turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \")\n", + "Wt=Cp*(T3-T4)\n", + "print(\"heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \")\n", + "q_add=Cp*(T3-T2)\n", + "print(\"net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\")\n", + "W_net_GT=Wt-Wc\n", + "print(\"heat recovered in HRSG for steam generation per kg of air\")\n", + "print(\"q_HRGC=Cp*(T4-T5)in KJ/kg\")\n", + "q_HRGC=Cp*(T4-T5)\n", + "print(\"at inlet to steam in turbine,\")\n", + "print(\"from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\")\n", + "ha=3177.2;\n", + "sa=6.5408;\n", + "print(\"for expansion in steam turbine,sa=sb\")\n", + "sb=sa;\n", + "print(\"let dryness fraction at state b be x\")\n", + "print(\"also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\")\n", + "sf=0.7549;\n", + "sfg=7.2536;\n", + "hf=225.94;\n", + "hfg=2373.1;\n", + "print(\"sb=sf+x*sfg\")\n", + "print(\"so x=(sb-sf)/sfg \")\n", + "x=(sb-sf)/sfg\n", + "print(\"so hb=hf+x*hfg in KJ/kg K\")\n", + "hb=hf+x*hfg\n", + "print(\"at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\")\n", + "hc=hf;\n", + "vc=0.001014;\n", + "print(\"at exit of feed pump,hd=hd-hc\")\n", + "print(\"hd=vc*(Pg-Pc)*100 in KJ/kg\")\n", + "hd=vc*(Pg-Pc)*100\n", + "print(\"heat added per kg of steam =ha-hd in KJ/kg\")\n", + "ha-hd\n", + "print(\"mass of steam generated per kg of air in kg steam per kg air=\"),round(q_HRGC/(ha-hd),3)\n", + "W_net_ST=(ha-hb)-(hd-hc)\n", + "print(\"net steam turbine cycle output,W_net_ST in KJ/kg=\"),round(W_net_ST,2)\n", + "W_net_ST=W_net_ST*0.119 \n", + "print(\"steam cycle output per kg of air(W_net_ST) in KJ/kg air=\"),round(W_net_ST,2)\n", + "(W_net_GT+W_net_ST)\n", + "print(\"total combined cycle output in KJ/kg air= \"),round((W_net_GT+W_net_ST),2)\n", + "n_cc=(W_net_GT+W_net_ST)/q_add\n", + "print(\"combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add\"),round(n_cc,2)\n", + "print(\"in percentage\"),round(n_cc*100,2)\n", + "n_GT=W_net_GT/q_add\n", + "print(\"In absence of steam cycle,gas turbine cycle efficiency,n_GT=\"),round(n_GT,2)\n", + "print(\"in percentage\"),round(n_GT*100,2)\n", + "print(\"thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\")\n", + "print(\"overall efficiency=57.77%\")\n", + "print(\"steam per kg of air=0.119 kg steam per/kg air\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 9.16;pg no: 363" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 9.16, Page:363 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\n", + "here P4/P1=P3/P1=70............eq1\n", + "compression ratio,V1/V2=V1/V3=15.............eq2\n", + "heat added at constant volume= heat added at constant pressure\n", + "Q23=Q34\n", + "m*Cv*(T3-T2)=m*Cp*(T4-T3)\n", + "(T3-T2)=y*(T4-T3)\n", + "for process 1-2;\n", + "T2/T1=(P2/P1)^((y-1)/y)\n", + "T2/T1=(V1/V2)^(y-1)\n", + "so T2=T1*(V1/V2)^(y-1) in K\n", + "and (P2/P1)=(V1/V2)^y\n", + "so P2=P1*(V1/V2)^y in Pa...........eq3\n", + "for process 2-3,\n", + "P2/P3=T2/T3\n", + "so T3=T2*P3/P2\n", + "using eq 1 and 3,we get\n", + "T3=T2*k/r^y in K\n", + "using equal heat additions for processes 2-3 and 3-4,\n", + "(T3-T2)=y*(T4-T3)\n", + "so T4=T3+((T3-T2)/y) in K\n", + "for process 3-4,\n", + "V3/V4=T3/T4\n", + "(V3/V1)*(V1/V4)=T3/T4\n", + "so (V1/V4)=(T3/T4)*r\n", + "so V1/V4=11.88 and V5/V4=11.88\n", + "for process 4-5,\n", + "P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\n", + "so T5=T4/((V5/V4)^(y-1))\n", + "air standard thermal efficiency(n)=1-(heat rejected/heat added)\n", + "n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\n", + "n= 0.65\n", + "air standard thermal efficiency=0.6529\n", + "in percentage 65.29\n", + "so air standard thermal efficiency=65.29%\n", + "Actual thermal efficiency may be different from theoretical efficiency due to following reasons\n", + "a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\n", + "b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\n", + "c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\n" + ] + } + ], + "source": [ + "#cal of air standard thermal efficiency\n", + "#intiation of all variables\n", + "# Chapter 9\n", + "print\"Example 9.16, Page:363 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\")\n", + "T1=(27+273);#temperature at begining of compression in K\n", + "k=70;#ration of maximum to minimum pressures\n", + "r=15;#compression ratio\n", + "y=1.4;#expansion constant\n", + "print(\"here P4/P1=P3/P1=70............eq1\")\n", + "print(\"compression ratio,V1/V2=V1/V3=15.............eq2\")\n", + "print(\"heat added at constant volume= heat added at constant pressure\")\n", + "print(\"Q23=Q34\")\n", + "print(\"m*Cv*(T3-T2)=m*Cp*(T4-T3)\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"for process 1-2;\")\n", + "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n", + "print(\"T2/T1=(V1/V2)^(y-1)\")\n", + "print(\"so T2=T1*(V1/V2)^(y-1) in K\")\n", + "T2=T1*(r)**(y-1)\n", + "print(\"and (P2/P1)=(V1/V2)^y\")\n", + "print(\"so P2=P1*(V1/V2)^y in Pa...........eq3\")\n", + "print(\"for process 2-3,\")\n", + "print(\"P2/P3=T2/T3\")\n", + "print(\"so T3=T2*P3/P2\")\n", + "print(\"using eq 1 and 3,we get\")\n", + "print(\"T3=T2*k/r^y in K\")\n", + "T3=T2*k/r**y \n", + "print(\"using equal heat additions for processes 2-3 and 3-4,\")\n", + "print(\"(T3-T2)=y*(T4-T3)\")\n", + "print(\"so T4=T3+((T3-T2)/y) in K\")\n", + "T4=T3+((T3-T2)/y)\n", + "print(\"for process 3-4,\")\n", + "print(\"V3/V4=T3/T4\")\n", + "print(\"(V3/V1)*(V1/V4)=T3/T4\")\n", + "print(\"so (V1/V4)=(T3/T4)*r\")\n", + "(T3/T4)*r\n", + "print(\"so V1/V4=11.88 and V5/V4=11.88\")\n", + "print(\"for process 4-5,\")\n", + "print(\"P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\")\n", + "print(\"so T5=T4/((V5/V4)^(y-1))\")\n", + "T5=T4/(11.88)**(y-1)\n", + "print(\"air standard thermal efficiency(n)=1-(heat rejected/heat added)\")\n", + "print(\"n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\")\n", + "n=1-((T5-T1)/(y*(T4-T3)+(T3-T2)))\n", + "print(\"n=\"),round(n,2)\n", + "print(\"air standard thermal efficiency=0.6529\")\n", + "print(\"in percentage\"),round(n*100,2)\n", + "print(\"so air standard thermal efficiency=65.29%\")\n", + "print(\"Actual thermal efficiency may be different from theoretical efficiency due to following reasons\")\n", + "print(\"a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\")\n", + "print(\"b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\")\n", + "print(\"c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\")\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/_Engineering_Thermodynamics_by__O._Singh/chapter_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1.ipynb new file mode 100755 index 00000000..9474d100 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1.ipynb @@ -0,0 +1,1777 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 1:Fundemental concepts and definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.1;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.1, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n", + "pressure difference(p)in pa\n", + "p= 39755.7\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.1, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n", + "h=30*10**-2;#manometer deflection of mercury in m\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure difference(p)in pa\"\n", + "p=rho*g*h\n", + "print\"p=\",round(p,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.2;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.2, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n", + "effort required for lifting the lid(E)in N\n", + "E= 7115.48\n" + ] + } + ], + "source": [ + "#cal of effort required for lifting the lid\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.2, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n", + "d=30*10**-2;#diameter of cylindrical vessel in m\n", + "h=76*10**-2;#atmospheric pressure in m of mercury\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"effort required for lifting the lid(E)in N\"\n", + "E=(rho*g*h)*(3.14*d**2)/4\n", + "print\"E=\",round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.3;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.3, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n", + "pressure measured by manometer is gauge pressure(Pg)in kpa\n", + "Pg=rho*g*h/10^3\n", + "actual pressure of the air(P)in kpa\n", + "P= 140.76\n" + ] + } + ], + "source": [ + "#cal of actual pressure of the air\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.3, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n", + "h=30*10**-2;# pressure of compressed air in m of mercury\n", + "Patm=101*10**3;#atmospheric pressure in pa\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n", + "print\"Pg=rho*g*h/10^3\"\n", + "Pg=rho*g*h/10**3\n", + "print\"actual pressure of the air(P)in kpa\"\n", + "P=Pg+Patm/10**3\n", + "print\"P=\",round(P,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.4;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.4, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n", + "density of oil(RHOoil)in kg/m^3\n", + "RHOoil=sg*RHOw\n", + "gauge pressure(Pg)in kpa\n", + "Pg= 7.848\n" + ] + } + ], + "source": [ + "#cal of gauge pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.4, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n", + "h=1;#depth of oil tank in m\n", + "sg=0.8;#specific gravity of oil\n", + "RHOw=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"density of oil(RHOoil)in kg/m^3\"\n", + "print\"RHOoil=sg*RHOw\"\n", + "RHOoil=sg*RHOw\n", + "print\"gauge pressure(Pg)in kpa\"\n", + "Pg=RHOoil*g*h/10**3\n", + "print\"Pg=\",round(Pg,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.5;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.5, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n", + "atmospheric pressure(Patm)in kpa\n", + "Patm=rho*g*h2/10^3\n", + "pressure due to mercury column at AB(Pab)in kpa\n", + "Pab=rho*g*h1/10^3\n", + "pressure exerted by gas(Pgas)in kpa\n", + "Pgas= 154.76\n" + ] + } + ], + "source": [ + "#cal of pressure exerted by gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.5, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n", + "h2=76*10**-2;#barometer reading of mercury in m\n", + "print\"atmospheric pressure(Patm)in kpa\"\n", + "print\"Patm=rho*g*h2/10^3\"\n", + "Patm=rho*g*h2/10**3\n", + "print\"pressure due to mercury column at AB(Pab)in kpa\"\n", + "print\"Pab=rho*g*h1/10^3\"\n", + "Pab=rho*g*h1/10**3\n", + "print\"pressure exerted by gas(Pgas)in kpa\"\n", + "Pgas=Patm+Pab\n", + "print\"Pgas=\",round(Pgas,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.6;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.6, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n", + "by law of conservation of energy\n", + "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n", + "so m*g*h = m*Cp*deltaT*4.18*1000\n", + "change in temperature of water(deltaT) in degree celcius\n", + "deltaT= 2.35\n" + ] + } + ], + "source": [ + "#cal of change in temperature of water\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.6, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n", + "m=1;#mass of water in kg\n", + "h=1000;#height from which water fall in m\n", + "Cp=1;#specific heat of water in kcal/kg k\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"by law of conservation of energy\"\n", + "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n", + "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n", + "print\"change in temperature of water(deltaT) in degree celcius\"\n", + "deltaT=(g*h)/(4.18*1000*Cp)\n", + "print\"deltaT=\",round(deltaT,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.7;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.7, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n", + "mass of object(m)in kg\n", + "m=w1/g1\n", + "spring balance reading=gravitational force in mass(F)in N\n", + "F= 86.65\n" + ] + } + ], + "source": [ + "#cal of spring balance reading\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.7, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n", + "w1=100;#weight of object at standard gravitational acceleration in N\n", + "g1=9.81;#acceleration due to gravity in m/s^2\n", + "g2=8.5;#gravitational acceleration at some location\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=w1/g1\"\n", + "m=w1/g1\n", + "print\"spring balance reading=gravitational force in mass(F)in N\"\n", + "F=m*g2\n", + "print\"F=\",round(F,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.8;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.8, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n", + "pressure measured by manometer(P) in pa\n", + "p=rho*g*h\n", + "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n", + "mass of piston(m)in kg\n", + "so m= 28.84\n" + ] + } + ], + "source": [ + "#cal of mass of piston\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.8, Page:24 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n", + "d=15*10**-2;#diameter of cylinder in m\n", + "h=12*10**-2;#manometer height difference in m of mercury\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"pressure measured by manometer(P) in pa\"\n", + "print\"p=rho*g*h\"\n", + "p=rho*g*h\n", + "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n", + "print\"mass of piston(m)in kg\"\n", + "m=(p*math.pi*d**2)/(4*g)\n", + "print\"so m=\",round(m,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.9;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.9, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n", + "balancing pressure at plane BC in figure we get\n", + "Psteam+Pwater=Patm+Pmercury\n", + "now 1.atmospheric pressure(Patm)in pa\n", + "Patm= 101396.16\n", + "2.pressure due to water(Pwater)in pa\n", + "Pwater= 196.2\n", + "3.pressure due to mercury(Pmercury)in pa\n", + "Pmercury=RHOm*g*h3 13341.6\n", + "using balancing equation\n", + "Psteam=Patm+Pmercury-Pwater\n", + "so pressure of steam(Psteam)in kpa\n", + "Psteam= 114.54\n" + ] + } + ], + "source": [ + "#cal of pressure due to atmosphere,water,mercury,steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.9, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n", + "RHOm=13.6*10**3;#density of mercury in kg/m^3\n", + "RHOw=1000;#density of water in kg/m^3\n", + "h1=76*10**-2;#barometer reading in m of mercury\n", + "h2=2*10**-2;#height raised by water in manometer tube in m \n", + "h3=10*10**-2;#height raised by mercury in manometer tube in m \n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"balancing pressure at plane BC in figure we get\")\n", + "print(\"Psteam+Pwater=Patm+Pmercury\")\n", + "print(\"now 1.atmospheric pressure(Patm)in pa\")\n", + "Patm=RHOm*g*h1\n", + "print(\"Patm=\"),round(Patm,2)\n", + "print(\"2.pressure due to water(Pwater)in pa\")\n", + "Pwater=RHOw*g*h2\n", + "print(\"Pwater=\"),round(Pwater,2)\n", + "print(\"3.pressure due to mercury(Pmercury)in pa\")\n", + "Pmercury=RHOm*g*h3\n", + "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n", + "print(\"using balancing equation\")\n", + "print(\"Psteam=Patm+Pmercury-Pwater\")\n", + "print(\"so pressure of steam(Psteam)in kpa\")\n", + "Psteam=(Patm+Pmercury-Pwater)/1000\n", + "print(\"Psteam=\"),round(Psteam,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.10;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.10, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n", + "atmospheric pressure(Patm)in kpa\n", + "absolute temperature in compartment A(Pa) in kpa\n", + "Pa= 496.06\n", + "absolute temperature in compartment B(Pb) in kpa\n", + "Pb= 246.06\n", + "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n" + ] + } + ], + "source": [ + "#cal of \"absolute temperature in compartment A,B\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.10, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n", + "h=720*10**-3;#barometer reading in m of Hg\n", + "Pga=400;#gauge pressure in compartment A in kpa\n", + "Pgb=150;#gauge pressure in compartment B in kpa\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"atmospheric pressure(Patm)in kpa\")\n", + "Patm=(rho*g*h)/1000\n", + "print(\"absolute temperature in compartment A(Pa) in kpa\")\n", + "Pa=Pga+Patm\n", + "print\"Pa=\",round(Pa,2)\n", + "print\"absolute temperature in compartment B(Pb) in kpa\"\n", + "Pb=Pgb+Patm\n", + "print\"Pb=\",round(Pb,2)\n", + "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.11;page no:25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.11, Page:25 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n", + "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n", + "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n", + "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n", + "air pressure(P1)in kpa 139.81\n" + ] + } + ], + "source": [ + "#cal of air pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.11, Page:25 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n", + "Patm=90*10**3;#atmospheric pressure in pa\n", + "RHOw=1000;#density of water in kg/m^3\n", + "RHOm=13600;#density of mercury in kg/m^3\n", + "RHOo=850;#density of oil in kg/m^3\n", + "g=9.81;#acceleration due to ggravity in m/s^2\n", + "h1=.15;#height difference between water column in m\n", + "h2=.25;#height difference between oil column in m\n", + "h3=.4;#height difference between mercury column in m\n", + "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n", + "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n", + "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n", + "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n", + "print\"air pressure(P1)in kpa\",round(P1,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.12;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.12, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n", + "mass of object(m)in kg\n", + "m=F/g\n", + "kinetic energy(E)in J is given by\n", + "E= 140625000.0\n" + ] + } + ], + "source": [ + "#cal of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.12, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n", + "v=750;#relative velocity of object with respect to earth in m/sec\n", + "F=4000;#gravitational force in N\n", + "g=8;#acceleration due to gravity in m/s^2\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=F/g\"\n", + "m=F/g\n", + "print\"kinetic energy(E)in J is given by\"\n", + "E=m*v**2/2\n", + "print\"E=\",round(E)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.13;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.13, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n", + "characteristics gas constant(R2)in kJ/kg k\n", + "molecular weight of gas(m)in kg/kg mol= 16.63\n", + "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n" + ] + } + ], + "source": [ + "#cal of molecular weight of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.13, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n", + "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n", + "Cv=1.786;#specific heat at constant volume in kJ/kg k\n", + "R1=8.3143;#universal gas constant in kJ/kg k\n", + "print\"characteristics gas constant(R2)in kJ/kg k\"\n", + "R2=Cp-Cv\n", + "m=R1/R2\n", + "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n", + "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.14;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.14, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n", + "using perfect gas equation\n", + "P1*V1/T1 = P2*V2/T2\n", + "=>T2=(P2*V2*T1)/(P1*V1)\n", + "so final temperature of gas(T2)in k\n", + "or final temperature of gas(T2)in degree celcius= 127.0\n" + ] + } + ], + "source": [ + "#cal of final temperature of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.14, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n", + "P1=750*10**3;#initial pressure of gas in pa\n", + "V1=0.2;#initial volume of gas in m^3\n", + "T1=600;#initial temperature of gas in k\n", + "P2=2*10**5;#final pressure of gas i pa\n", + "V2=0.5;#final volume of gas in m^3\n", + "print\"using perfect gas equation\"\n", + "print\"P1*V1/T1 = P2*V2/T2\"\n", + "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n", + "print\"so final temperature of gas(T2)in k\"\n", + "T2=(P2*V2*T1)/(P1*V1)\n", + "T2=T2-273\n", + "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.15;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.15, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n", + "from perfect gas equation we get\n", + "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n", + "m1= 5.807\n", + "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n", + "m2= 3.111\n", + "mass of air removed(m)in kg 2.696\n", + "volume of this mass of air(V) at initial states in m^3= 2.32\n" + ] + } + ], + "source": [ + "#cal of volume of this mass of air(V) at initial states\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.15, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n", + "P1=100*10**3;#initial pressure of air in pa\n", + "V1=5.;#initial volume of air in m^3\n", + "T1=300.;#initial temperature of gas in k\n", + "P2=50*10**3;#final pressure of air in pa\n", + "V2=5.;#final volume of air in m^3\n", + "T2=(280.);#final temperature of air in K\n", + "R=287.;#gas constant on J/kg k\n", + "print\"from perfect gas equation we get\"\n", + "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n", + "m1=(P1*V1)/(R*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n", + "m2=(P2*V2)/(R*T2)\n", + "print(\"m2=\"),round(m2,3)\n", + "m=m1-m2\n", + "print\"mass of air removed(m)in kg\",round(m,3)\n", + "V=m*R*T1/P1\n", + "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.16;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.16, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n", + "here V1=V2\n", + "so P1/T1=P2/T2\n", + "final temperature of hydrogen gas(T2)in k\n", + "=>T2=P2*T1/P1\n", + "now R=(Cp-Cv) in KJ/kg k\n", + "And volume of cylinder(V1)in m^3\n", + "V1=(math.pi*d^2*l)/4\n", + "mass of hydrogen gas(m)in kg\n", + "m= 0.254\n", + "now heat supplied(Q)in KJ\n", + "Q= 193.93\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.16, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n", + "d=1;#diameter of cylinder in m\n", + "l=4;#length of cylinder in m\n", + "P1=100*10**3;#initial pressureof hydrogen gas in pa\n", + "T1=(27+273);#initial temperature of hydrogen gas in k\n", + "P2=125*10**3;#final pressureof hydrogen gas in pa\n", + "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n", + "Cv=10.183;#specific heat at constant volume in KJ/kg k\n", + "print\"here V1=V2\"\n", + "print\"so P1/T1=P2/T2\"\n", + "print\"final temperature of hydrogen gas(T2)in k\"\n", + "print\"=>T2=P2*T1/P1\"\n", + "T2=P2*T1/P1\n", + "print\"now R=(Cp-Cv) in KJ/kg k\"\n", + "R=Cp-Cv\n", + "print\"And volume of cylinder(V1)in m^3\"\n", + "print\"V1=(math.pi*d^2*l)/4\"\n", + "V1=(math.pi*d**2*l)/4\n", + "print\"mass of hydrogen gas(m)in kg\"\n", + "m=(P1*V1)/(1000*R*T1)\n", + "print\"m=\",round(m,3)\n", + "print\"now heat supplied(Q)in KJ\"\n", + "Q=m*Cv*(T2-T1)\n", + "print\"Q=\",round(Q,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.17;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.17, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n", + "final total volume(V)in m^3\n", + "V=V1*V2\n", + "total mass of air(m)in kg\n", + "m=m1+m2\n", + "final pressure of air(P)in kpa\n", + "using perfect gas equation\n", + "P= 516.6\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.17, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n", + "V1=2.;#volume of first cylinder in m^3\n", + "V2=2.;#volume of second cylinder in m^3\n", + "T=(27+273);#temperature of system in k\n", + "m1=20.;#mass of air in first vessel in kg\n", + "m2=4.;#mass of air in second vessel in kg\n", + "R=287.;#gas constant J/kg k\n", + "print(\"final total volume(V)in m^3\")\n", + "print(\"V=V1*V2\")\n", + "V=V1*V2\n", + "print(\"total mass of air(m)in kg\")\n", + "print(\"m=m1+m2\")\n", + "m=m1+m2\n", + "print(\"final pressure of air(P)in kpa\")\n", + "print(\"using perfect gas equation\")\n", + "P=(m*R*T)/(1000*V)\n", + "print\"P=\",round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.18;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.18, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n", + "1.By considering it as a PERFECT GAS\n", + "gas constant for CO2(Rco2)\n", + "Rco2=(J/Kg.k) 188.9\n", + "Also P*V=M*Rco2*T\n", + "pressure of CO2 as perfect gas(P)in N/m^2\n", + "P=(m*Rco2*T)/V 141683.71\n", + "2.By considering as a REAL GAS\n", + "values of vanderwaal constants a,b can be seen from the table which are\n", + "a=(N m^4/(kg mol)^2) 362850.0\n", + "b=(m^3/kg mol) 0.03\n", + "now specific volume(v)in m^3/kg mol\n", + "v= 17.604\n", + "now substituting the value of all variables in vanderwaal equation\n", + "(P+(a/v^2))*(v-b)=R*T\n", + "pressure of CO2 as real gas(P)in N/m^2\n", + "P= 140766.02\n" + ] + } + ], + "source": [ + "#cal of pressure of CO2 as perfect,real gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.18, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n", + "m=5;#mass of CO2 in kg\n", + "V=2;#volume of vesssel in m^3\n", + "T=(27+273);#temperature of vessel in k\n", + "R=8.314*10**3;#universal gas constant in J/kg k\n", + "M=44.01;#molecular weight of CO2 \n", + "print(\"1.By considering it as a PERFECT GAS\")\n", + "print(\"gas constant for CO2(Rco2)\")\n", + "Rco2=R/M\n", + "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n", + "print(\"Also P*V=M*Rco2*T\")\n", + "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n", + "P=(m*Rco2*T)/V\n", + "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n", + "print(\"2.By considering as a REAL GAS\")\n", + "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n", + "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n", + "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n", + "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n", + "print(\"b=(m^3/kg mol)\"),round(b,2)\n", + "print(\"now specific volume(v)in m^3/kg mol\")\n", + "v=V*M/m\n", + "print(\"v=\"),round(v,3)\n", + "print(\"now substituting the value of all variables in vanderwaal equation\")\n", + "print(\"(P+(a/v^2))*(v-b)=R*T\")\n", + "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n", + "P=((R*T)/(v-b))-(a/v**2)\n", + "print(\"P=\"),round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.19;page no:29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.19, Page:29 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n", + "1.considering as perfect gas\n", + "specific volume(V)in m^3/kg\n", + "V= 0.0186\n", + "2.considering compressibility effects\n", + "reduced pressure(P)in pa\n", + "p= 0.8\n", + "reduced temperature(t)in k\n", + "t= 1.1\n", + "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n", + "we get Z=0.785\n", + "now actual specific volume(v)in m^3/kg\n", + "v= 0.0146\n" + ] + } + ], + "source": [ + "#cal of specific volume of steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.19, Page:29 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n", + "P=17672;#pressure of steam on kpa\n", + "T=712;#temperature of steam in k\n", + "Pc=22.09;#critical pressure of steam in Mpa\n", + "Tc=647.3;#critical temperature of steam in k\n", + "R=0.4615;#gas constant for steam in KJ/kg k\n", + "print(\"1.considering as perfect gas\")\n", + "print(\"specific volume(V)in m^3/kg\")\n", + "V=R*T/P\n", + "print(\"V=\"),round(V,4)\n", + "print(\"2.considering compressibility effects\")\n", + "print(\"reduced pressure(P)in pa\")\n", + "p=P/(Pc*1000)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"reduced temperature(t)in k\")\n", + "t=T/Tc\n", + "print(\"t=\"),round(t,2)\n", + "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n", + "print(\"we get Z=0.785\")\n", + "Z=0.785;#compressibility factor\n", + "print(\"now actual specific volume(v)in m^3/kg\")\n", + "v=Z*V\n", + "print(\"v=\"),round(v,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.20;page no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.20, Page:30 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n", + "volume of ballon(V1)in m^3\n", + "V1= 65.45\n", + "molecular mass of hydrogen(M)\n", + "M=2\n", + "gas constant for H2(R1)in J/kg k\n", + "R1= 4157.0\n", + "mass of H2 in ballon(m1)in kg\n", + "m1= 5.316\n", + "volume of air printlaced(V2)=volume of ballon(V1)\n", + "mass of air printlaced(m2)in kg\n", + "m2= 79.66\n", + "gas constant for air(R2)=0.287 KJ/kg k\n", + "load lifting capacity due to buoyant force(m)in kg\n", + "m= 74.343\n" + ] + } + ], + "source": [ + "#estimation of maximum load that can be lifted \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.20, Page:30 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n", + "d=5.;#diameter of ballon in m\n", + "T1=(27.+273.);#temperature of hydrogen in k\n", + "P=1.013*10**5;#atmospheric pressure in pa\n", + "T2=(17.+273.);#temperature of surrounding air in k\n", + "R=8.314*10**3;#gas constant in J/kg k\n", + "print(\"volume of ballon(V1)in m^3\")\n", + "V1=(4./3.)*math.pi*((d/2)**3)\n", + "print(\"V1=\"),round(V1,2)\n", + "print(\"molecular mass of hydrogen(M)\")\n", + "print(\"M=2\")\n", + "M=2;#molecular mass of hydrogen\n", + "print(\"gas constant for H2(R1)in J/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"mass of H2 in ballon(m1)in kg\")\n", + "m1=(P*V1)/(R1*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n", + "print(\"mass of air printlaced(m2)in kg\")\n", + "R2=0.287*1000;#gas constant for air in J/kg k\n", + "m2=(P*V1)/(R2*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n", + "print(\"load lifting capacity due to buoyant force(m)in kg\")\n", + "m=m2-m1\n", + "print(\"m=\"),round(m,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.21;page no:31" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.21, Page:31 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n", + "let initial receiver pressure(p1)=1 in pa\n", + "so final receiver pressure(p2)=in pa 0.25\n", + "perfect gas equation,p*V*m=m*R*T\n", + "differentiating and then integrating equation w.r.t to time(t) \n", + "we get t=-(V/v)*log(p2/p1)\n", + "so time(t)in min 110.9\n" + ] + } + ], + "source": [ + "#cal of time required\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.21, Page:31 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n", + "v=0.25;#volume sucking rate of pump in m^3/min\n", + "V=20.;#volume of air vessel in m^3\n", + "p1=1.;#initial receiver pressure in pa\n", + "print(\"let initial receiver pressure(p1)=1 in pa\")\n", + "p2=p1/4.\n", + "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n", + "print(\"perfect gas equation,p*V*m=m*R*T\")\n", + "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n", + "print(\"we get t=-(V/v)*log(p2/p1)\")\n", + "t=-(V/v)*math.log(p2/p1)\n", + "print(\"so time(t)in min\"),round(t,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.22;page no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.22, Page:32 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n", + "first calculate gas constants for different gases in j/kg k\n", + "for nitrogen,R1= 296.9\n", + "for oxygen,R2= 259.8\n", + "for carbon dioxide,R3= 188.95\n", + "so the gas constant for mixture(Rm)in j/kg k\n", + "Rm= 288.09\n", + "now the specific heat at constant pressure for constituent gases in KJ/kg k\n", + "for nitrogen,Cp1= 1.039\n", + "for oxygen,Cp2= 0.909\n", + "for carbon dioxide,Cp3= 0.819\n", + "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n", + "Cpm= 1.0115\n", + "now no. of moles of constituents gases\n", + "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n", + "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n", + "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n", + "total no. of moles in mixture in mol\n", + "n= 0.1733\n", + "now mole fraction of constituent gases\n", + "for nitrogen,x1= 0.825\n", + "for oxygen,x2= 0.162\n", + "for carbon dioxide,x3= 0.0131\n", + "now the molecular weight of mixture(Mm)in kg/kmol\n", + "Mm= 28.86\n" + ] + } + ], + "source": [ + "#cal of specific heat at constant pressure for constituent gases \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.22, Page:32 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n", + "m=5;#mass of mixture of gas in kg\n", + "P=1.013*10**5;#pressure of mixture in pa\n", + "T=300;#temperature of mixture in k\n", + "M1=28.;#molecular weight of nitrogen(N2)\n", + "M2=32.;#molecular weight of oxygen(O2)\n", + "M3=44.;#molecular weight of carbon dioxide(CO2)\n", + "f1=0.80;#fraction of N2 in mixture\n", + "f2=0.18;#fraction of O2 in mixture\n", + "f3=0.02;#fraction of CO2 in mixture\n", + "k1=1.4;#ratio of specific heat capacities for N2\n", + "k2=1.4;#ratio of specific heat capacities for O2\n", + "k3=1.3;#ratio of specific heat capacities for CO2\n", + "R=8314;#universal gas constant in J/kg k\n", + "print(\"first calculate gas constants for different gases in j/kg k\")\n", + "R1=R/M1\n", + "print(\"for nitrogen,R1=\"),round(R1,1)\n", + "R2=R/M2\n", + "print(\"for oxygen,R2=\"),round(R2,1)\n", + "R3=R/M3\n", + "print(\"for carbon dioxide,R3=\"),round(R3,2)\n", + "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n", + "Rm=f1*R1+f2*R2+f3*R3\n", + "print(\"Rm=\"),round(Rm,2)\n", + "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n", + "Cp1=((k1/(k1-1))*R1)/1000\n", + "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n", + "Cp2=((k2/(k2-1))*R2)/1000\n", + "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n", + "Cp3=((k3/(k3-1))*R3)/1000\n", + "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n", + "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n", + "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n", + "print(\"Cpm=\"),round(Cpm,4)\n", + "print(\"now no. of moles of constituents gases\")\n", + "m1=f1*m\n", + "n1=m1/M1\n", + "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n", + "m2=f2*m\n", + "n2=m2/M2\n", + "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n", + "m3=f3*m\n", + "n3=m3/M3\n", + "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n", + "print(\"total no. of moles in mixture in mol\")\n", + "n=n1+n2+n3\n", + "print(\"n=\"),round(n,4)\n", + "print(\"now mole fraction of constituent gases\")\n", + "x1=n1/n\n", + "print(\"for nitrogen,x1=\"),round(x1,3)\n", + "x2=n2/n\n", + "print(\"for oxygen,x2=\"),round(x2,3)\n", + "x3=n3/n\n", + "print(\"for carbon dioxide,x3=\"),round(x3,4)\n", + "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n", + "Mm=M1*x1+M2*x2+M3*x3\n", + "print(\"Mm=\"),round(Mm,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.23;page no:33" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.23, Page:33 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n", + "mole fraction of constituent gases\n", + "x=(ni/n)=(Vi/V)\n", + "take volume of mixture(V)=1 m^3\n", + "mole fraction of O2(x1)\n", + "x1= 0.18\n", + "mole fraction of N2(x2)\n", + "x2= 0.75\n", + "mole fraction of CO2(x3)\n", + "x3= 0.07\n", + "now molecular weight of mixture = molar mass(m)\n", + "m= 29.84\n", + "now gravimetric analysis refers to the mass fraction analysis\n", + "mass fraction of constituents\n", + "y=xi*Mi/m\n", + "mole fraction of O2\n", + "y1= 0.193\n", + "mole fraction of N2\n", + "y2= 0.704\n", + "mole fraction of CO2\n", + "y3= 0.103\n", + "now partial pressure of constituents = volume fraction * pressure of mixture\n", + "Pi=xi*P\n", + "partial pressure of O2(P1)in Mpa\n", + "P1= 0.09\n", + "partial pressure of N2(P2)in Mpa\n", + "P2= 0.375\n", + "partial pressure of CO2(P3)in Mpa\n", + "P3= 0.04\n", + "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.23, Page:33 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n", + "V1=0.18;#volume fraction of O2 in m^3\n", + "V2=0.75;#volume fraction of N2 in m^3\n", + "V3=0.07;#volume fraction of CO2 in m^3\n", + "P=0.5;#pressure of mixture in Mpa\n", + "T=(107+273);#temperature of mixture in k\n", + "M1=32;#molar mass of O2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"mole fraction of constituent gases\")\n", + "print(\"x=(ni/n)=(Vi/V)\")\n", + "V=1;# volume of mixture in m^3\n", + "print(\"take volume of mixture(V)=1 m^3\")\n", + "print(\"mole fraction of O2(x1)\")\n", + "x1=V1/V\n", + "print(\"x1=\"),round(x1,2)\n", + "print(\"mole fraction of N2(x2)\")\n", + "x2=V2/V\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"mole fraction of CO2(x3)\")\n", + "x3=V3/V\n", + "print(\"x3=\"),round(x3,2)\n", + "print(\"now molecular weight of mixture = molar mass(m)\")\n", + "m=x1*M1+x2*M2+x3*M3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n", + "print(\"mass fraction of constituents\")\n", + "print(\"y=xi*Mi/m\")\n", + "print(\"mole fraction of O2\")\n", + "y1=x1*M1/m\n", + "print(\"y1=\"),round(y1,3)\n", + "print(\"mole fraction of N2\")\n", + "y2=x2*M2/m\n", + "print(\"y2=\"),round(y2,3)\n", + "print(\"mole fraction of CO2\")\n", + "y3=x3*M3/m\n", + "print(\"y3=\"),round(y3,3)\n", + "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n", + "print(\"Pi=xi*P\")\n", + "print(\"partial pressure of O2(P1)in Mpa\")\n", + "p1=x1*P\n", + "print(\"P1=\"),round(p1,2)\n", + "print(\"partial pressure of N2(P2)in Mpa\")\n", + "P2=x2*P\n", + "print(\"P2=\"),round(P2,3)\n", + "P3=x3*P\n", + "print(\"partial pressure of CO2(P3)in Mpa\")\n", + "print(\"P3=\"),round(P3,2)\n", + "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.24;page no:34" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.24, Page:34 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n", + "volume of tank of N2(V1) in m^3= 3.0\n", + "volume of tank of CO2(V2) in m^3= 3.0\n", + "taking the adiabatic condition\n", + "no. of moles of N2(n1)\n", + "n1= 0.6\n", + "no. of moles of CO2(n2)\n", + "n2= 0.37\n", + "total no. of moles of mixture(n)in mol\n", + "n= 0.97\n", + "gas constant for N2(R1)in J/kg k\n", + "R1= 296.93\n", + "gas constant for CO2(R2)in J/kg k\n", + "R2=R/M2 188.95\n", + "specific heat of N2 at constant volume (Cv1) in J/kg k\n", + "Cv1= 742.32\n", + "specific heat of CO2 at constant volume (Cv2) in J/kg k\n", + "Cv2= 629.85\n", + "mass of N2(m1)in kg\n", + "m1= 16.84\n", + "mass of CO2(m2)in kg\n", + "m2= 16.28\n", + "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n", + "applying energy conservation principle\n", + "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n", + "equlibrium temperature(T)in k\n", + "=>T= 439.44\n", + "so the equlibrium pressure(P)in kpa\n", + "P= 591.55\n" + ] + } + ], + "source": [ + "#cal of equilibrium temperature,pressure of mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.24, Page:34 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n", + "V=6;#volume of tank in m^3\n", + "P1=800*10**3;#pressure of N2 gas tank in pa\n", + "T1=480.;#temperature of N2 gas tank in k\n", + "P2=400*10**3;#pressure of CO2 gas tank in pa\n", + "T2=390.;#temperature of CO2 gas tank in k\n", + "k1=1.4;#ratio of specific heat capacity for N2\n", + "k2=1.3;#ratio of specific heat capacity for CO2\n", + "R=8314.;#universal gas constant in J/kg k\n", + "M1=28.;#molecular weight of N2\n", + "M2=44.;#molecular weight of CO2\n", + "V1=V/2\n", + "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n", + "V2=V/2\n", + "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n", + "print(\"taking the adiabatic condition\")\n", + "print(\"no. of moles of N2(n1)\")\n", + "n1=(P1*V1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "print(\"no. of moles of CO2(n2)\")\n", + "n2=(P2*V2)/(R*T2)\n", + "print(\"n2=\"),round(n2,2)\n", + "print(\"total no. of moles of mixture(n)in mol\")\n", + "n=n1+n2\n", + "print(\"n=\"),round(n,2)\n", + "print(\"gas constant for N2(R1)in J/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"gas constant for CO2(R2)in J/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=R/M2\"),round(R2,2)\n", + "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n", + "Cv1=R1/(k1-1)\n", + "print(\"Cv1=\"),round(Cv1,2)\n", + "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n", + "Cv2=R2/(k2-1)\n", + "print(\"Cv2=\"),round(Cv2,2)\n", + "print(\"mass of N2(m1)in kg\")\n", + "m1=n1*M1\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"mass of CO2(m2)in kg\")\n", + "m2=n2*M2\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n", + "print(\"applying energy conservation principle\")\n", + "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n", + "print(\"equlibrium temperature(T)in k\")\n", + "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n", + "print(\"=>T=\"),round(T,2)\n", + "print(\"so the equlibrium pressure(P)in kpa\")\n", + "P=(n*R*T)/(1000*V)\n", + "print(\"P=\"),round(P,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.25;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.25, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n", + "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n", + "so the specific heat at constant pressure(Cp)in KJ/kg k\n", + "Cp= 7.608\n" + ] + } + ], + "source": [ + "#cal of specific heat of final mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.25, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n", + "m1=2;#mass of H2 in kg\n", + "m2=3;#mass of He in kg\n", + "T=100;#temperature of container in k\n", + "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n", + "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n", + "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n", + "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n", + "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n", + "print(\"Cp=\"),round(Cp,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.26;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.26, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "gas constant for N2(R2)in KJ/kg k\n", + "R2= 0.297\n", + "gas constant for CO2(R3)in KJ/kg k\n", + "R3= 0.189\n", + "so now gas constant for mixture(Rm)in KJ/kg k\n", + "Rm= 2.606\n", + "considering gas to be perfect gas\n", + "total mass of mixture(m)in kg\n", + "m= 30.0\n", + "capacity of vessel(V)in m^3\n", + "V= 231.57\n", + "now final temperature(Tf) is twice of initial temperature(Ti)\n", + "so take k=Tf/Ti=2\n", + "for constant volume heating,final pressure(Pf)in kpa shall be\n", + "Pf= 202.65\n" + ] + } + ], + "source": [ + "#cal of capacity and pressure in the vessel\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.26, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n", + "m1=18.;#mass of hydrogen(H2) in kg\n", + "m2=10.;#mass of nitrogen(N2) in kg\n", + "m3=2.;#mass of carbon dioxide(CO2) in kg\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "Pi=101.325;#atmospheric pressure in kpa\n", + "T=(27+273.15);#ambient temperature in k\n", + "M1=2;#molar mass of H2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"gas constant for N2(R2)in KJ/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=\"),round(R2,3)\n", + "print(\"gas constant for CO2(R3)in KJ/kg k\")\n", + "R3=R/M3\n", + "print(\"R3=\"),round(R3,3)\n", + "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n", + "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n", + "print(\"Rm=\"),round(Rm,3)\n", + "print(\"considering gas to be perfect gas\")\n", + "print(\"total mass of mixture(m)in kg\")\n", + "m=m1+m2+m3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"capacity of vessel(V)in m^3\")\n", + "V=(m*Rm*T)/Pi\n", + "print(\"V=\"),round(V,2)\n", + "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n", + "k=2;#ratio of initial to final temperature\n", + "print(\"so take k=Tf/Ti=2\") \n", + "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n", + "Pf=Pi*k\n", + "print(\"Pf=\"),round(Pf,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.27;page no:36" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.27, Page:36 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n", + "let inlet state be 1 and exit state be 2\n", + "by charles law volume and temperature can be related as\n", + "(V1/T1)=(V2/T2)\n", + "(V2/V1)=(T2/T1)\n", + "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n", + "since change in K.E=0\n", + "so (D2^2/D1^2)=T2/T1\n", + "D2/D1=sqrt(T2/T1)\n", + "say(D2/D1)=k\n", + "so exit to inlet diameter ratio(k) 1.29\n" + ] + } + ], + "source": [ + "#cal of exit to inlet diameter ratio\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.27, Page:36 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n", + "T1=(27.+273.);#initial temperature of air in k\n", + "T2=500.;#final temperature of air in k\n", + "print(\"let inlet state be 1 and exit state be 2\")\n", + "print(\"by charles law volume and temperature can be related as\")\n", + "print(\"(V1/T1)=(V2/T2)\")\n", + "print(\"(V2/V1)=(T2/T1)\")\n", + "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n", + "print(\"since change in K.E=0\")\n", + "print(\"so (D2^2/D1^2)=T2/T1\")\n", + "print(\"D2/D1=sqrt(T2/T1)\")\n", + "print(\"say(D2/D1)=k\")\n", + "k=math.sqrt(T2/T1)\n", + "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.28;page no:37" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.28, Page:37 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "say initial and final ststes are given by 1 and 2\n", + "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n", + "final pressure of hydrogen(P2)in cm of Hg\n", + "P2= 6.0\n", + "therefore pressure difference(P)in kpa\n", + "P= 93.33\n", + "mass pumped out(m)in kg\n", + "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n", + "here V1=V2=V and T1=T2=T\n", + "so m= 0.15\n", + "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n", + "say state before and after cooling are denoted by suffix 2 and 3\n", + "final pressure after cooling(P3)in kpa\n", + "P3= 7.546\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.28, Page:37 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n", + "V=2;#volume of vessel in m^3\n", + "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n", + "T=(27+273.15);#temperature of vessel in k\n", + "p=70;#final pressure in cm of Hg vaccum\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "M=2;#molecular weight of H2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"say initial and final ststes are given by 1 and 2\")\n", + "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n", + "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n", + "P2=P1-p\n", + "print(\"P2=\"),round(P2,2)\n", + "print(\"therefore pressure difference(P)in kpa\")\n", + "P=((P1-P2)*101.325)/76\n", + "print(\"P=\"),round(P,2)\n", + "print(\"mass pumped out(m)in kg\")\n", + "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n", + "print(\"here V1=V2=V and T1=T2=T\")\n", + "m=(V*P)/(R1*T)\n", + "print(\"so m=\"),round(m,2)\n", + "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n", + "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n", + "T3=(10+273.15);#final temperature after cooling in k\n", + "print(\"final pressure after cooling(P3)in kpa\")\n", + "P3=(T3/T)*P2*(101.325/76)\n", + "print(\"P3=\"),round(P3,3)\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/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb new file mode 100644 index 00000000..9474d100 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_1.ipynb @@ -0,0 +1,1777 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 1:Fundemental concepts and definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.1;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.1, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n", + "pressure difference(p)in pa\n", + "p= 39755.7\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.1, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n", + "h=30*10**-2;#manometer deflection of mercury in m\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure difference(p)in pa\"\n", + "p=rho*g*h\n", + "print\"p=\",round(p,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.2;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.2, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n", + "effort required for lifting the lid(E)in N\n", + "E= 7115.48\n" + ] + } + ], + "source": [ + "#cal of effort required for lifting the lid\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.2, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n", + "d=30*10**-2;#diameter of cylindrical vessel in m\n", + "h=76*10**-2;#atmospheric pressure in m of mercury\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"effort required for lifting the lid(E)in N\"\n", + "E=(rho*g*h)*(3.14*d**2)/4\n", + "print\"E=\",round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.3;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.3, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n", + "pressure measured by manometer is gauge pressure(Pg)in kpa\n", + "Pg=rho*g*h/10^3\n", + "actual pressure of the air(P)in kpa\n", + "P= 140.76\n" + ] + } + ], + "source": [ + "#cal of actual pressure of the air\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.3, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n", + "h=30*10**-2;# pressure of compressed air in m of mercury\n", + "Patm=101*10**3;#atmospheric pressure in pa\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n", + "print\"Pg=rho*g*h/10^3\"\n", + "Pg=rho*g*h/10**3\n", + "print\"actual pressure of the air(P)in kpa\"\n", + "P=Pg+Patm/10**3\n", + "print\"P=\",round(P,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.4;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.4, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n", + "density of oil(RHOoil)in kg/m^3\n", + "RHOoil=sg*RHOw\n", + "gauge pressure(Pg)in kpa\n", + "Pg= 7.848\n" + ] + } + ], + "source": [ + "#cal of gauge pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.4, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n", + "h=1;#depth of oil tank in m\n", + "sg=0.8;#specific gravity of oil\n", + "RHOw=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"density of oil(RHOoil)in kg/m^3\"\n", + "print\"RHOoil=sg*RHOw\"\n", + "RHOoil=sg*RHOw\n", + "print\"gauge pressure(Pg)in kpa\"\n", + "Pg=RHOoil*g*h/10**3\n", + "print\"Pg=\",round(Pg,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.5;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.5, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n", + "atmospheric pressure(Patm)in kpa\n", + "Patm=rho*g*h2/10^3\n", + "pressure due to mercury column at AB(Pab)in kpa\n", + "Pab=rho*g*h1/10^3\n", + "pressure exerted by gas(Pgas)in kpa\n", + "Pgas= 154.76\n" + ] + } + ], + "source": [ + "#cal of pressure exerted by gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.5, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n", + "h2=76*10**-2;#barometer reading of mercury in m\n", + "print\"atmospheric pressure(Patm)in kpa\"\n", + "print\"Patm=rho*g*h2/10^3\"\n", + "Patm=rho*g*h2/10**3\n", + "print\"pressure due to mercury column at AB(Pab)in kpa\"\n", + "print\"Pab=rho*g*h1/10^3\"\n", + "Pab=rho*g*h1/10**3\n", + "print\"pressure exerted by gas(Pgas)in kpa\"\n", + "Pgas=Patm+Pab\n", + "print\"Pgas=\",round(Pgas,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.6;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.6, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n", + "by law of conservation of energy\n", + "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n", + "so m*g*h = m*Cp*deltaT*4.18*1000\n", + "change in temperature of water(deltaT) in degree celcius\n", + "deltaT= 2.35\n" + ] + } + ], + "source": [ + "#cal of change in temperature of water\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.6, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n", + "m=1;#mass of water in kg\n", + "h=1000;#height from which water fall in m\n", + "Cp=1;#specific heat of water in kcal/kg k\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"by law of conservation of energy\"\n", + "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n", + "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n", + "print\"change in temperature of water(deltaT) in degree celcius\"\n", + "deltaT=(g*h)/(4.18*1000*Cp)\n", + "print\"deltaT=\",round(deltaT,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.7;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.7, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n", + "mass of object(m)in kg\n", + "m=w1/g1\n", + "spring balance reading=gravitational force in mass(F)in N\n", + "F= 86.65\n" + ] + } + ], + "source": [ + "#cal of spring balance reading\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.7, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n", + "w1=100;#weight of object at standard gravitational acceleration in N\n", + "g1=9.81;#acceleration due to gravity in m/s^2\n", + "g2=8.5;#gravitational acceleration at some location\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=w1/g1\"\n", + "m=w1/g1\n", + "print\"spring balance reading=gravitational force in mass(F)in N\"\n", + "F=m*g2\n", + "print\"F=\",round(F,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.8;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.8, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n", + "pressure measured by manometer(P) in pa\n", + "p=rho*g*h\n", + "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n", + "mass of piston(m)in kg\n", + "so m= 28.84\n" + ] + } + ], + "source": [ + "#cal of mass of piston\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.8, Page:24 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n", + "d=15*10**-2;#diameter of cylinder in m\n", + "h=12*10**-2;#manometer height difference in m of mercury\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"pressure measured by manometer(P) in pa\"\n", + "print\"p=rho*g*h\"\n", + "p=rho*g*h\n", + "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n", + "print\"mass of piston(m)in kg\"\n", + "m=(p*math.pi*d**2)/(4*g)\n", + "print\"so m=\",round(m,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.9;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.9, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n", + "balancing pressure at plane BC in figure we get\n", + "Psteam+Pwater=Patm+Pmercury\n", + "now 1.atmospheric pressure(Patm)in pa\n", + "Patm= 101396.16\n", + "2.pressure due to water(Pwater)in pa\n", + "Pwater= 196.2\n", + "3.pressure due to mercury(Pmercury)in pa\n", + "Pmercury=RHOm*g*h3 13341.6\n", + "using balancing equation\n", + "Psteam=Patm+Pmercury-Pwater\n", + "so pressure of steam(Psteam)in kpa\n", + "Psteam= 114.54\n" + ] + } + ], + "source": [ + "#cal of pressure due to atmosphere,water,mercury,steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.9, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n", + "RHOm=13.6*10**3;#density of mercury in kg/m^3\n", + "RHOw=1000;#density of water in kg/m^3\n", + "h1=76*10**-2;#barometer reading in m of mercury\n", + "h2=2*10**-2;#height raised by water in manometer tube in m \n", + "h3=10*10**-2;#height raised by mercury in manometer tube in m \n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"balancing pressure at plane BC in figure we get\")\n", + "print(\"Psteam+Pwater=Patm+Pmercury\")\n", + "print(\"now 1.atmospheric pressure(Patm)in pa\")\n", + "Patm=RHOm*g*h1\n", + "print(\"Patm=\"),round(Patm,2)\n", + "print(\"2.pressure due to water(Pwater)in pa\")\n", + "Pwater=RHOw*g*h2\n", + "print(\"Pwater=\"),round(Pwater,2)\n", + "print(\"3.pressure due to mercury(Pmercury)in pa\")\n", + "Pmercury=RHOm*g*h3\n", + "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n", + "print(\"using balancing equation\")\n", + "print(\"Psteam=Patm+Pmercury-Pwater\")\n", + "print(\"so pressure of steam(Psteam)in kpa\")\n", + "Psteam=(Patm+Pmercury-Pwater)/1000\n", + "print(\"Psteam=\"),round(Psteam,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.10;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.10, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n", + "atmospheric pressure(Patm)in kpa\n", + "absolute temperature in compartment A(Pa) in kpa\n", + "Pa= 496.06\n", + "absolute temperature in compartment B(Pb) in kpa\n", + "Pb= 246.06\n", + "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n" + ] + } + ], + "source": [ + "#cal of \"absolute temperature in compartment A,B\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.10, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n", + "h=720*10**-3;#barometer reading in m of Hg\n", + "Pga=400;#gauge pressure in compartment A in kpa\n", + "Pgb=150;#gauge pressure in compartment B in kpa\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"atmospheric pressure(Patm)in kpa\")\n", + "Patm=(rho*g*h)/1000\n", + "print(\"absolute temperature in compartment A(Pa) in kpa\")\n", + "Pa=Pga+Patm\n", + "print\"Pa=\",round(Pa,2)\n", + "print\"absolute temperature in compartment B(Pb) in kpa\"\n", + "Pb=Pgb+Patm\n", + "print\"Pb=\",round(Pb,2)\n", + "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.11;page no:25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.11, Page:25 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n", + "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n", + "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n", + "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n", + "air pressure(P1)in kpa 139.81\n" + ] + } + ], + "source": [ + "#cal of air pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.11, Page:25 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n", + "Patm=90*10**3;#atmospheric pressure in pa\n", + "RHOw=1000;#density of water in kg/m^3\n", + "RHOm=13600;#density of mercury in kg/m^3\n", + "RHOo=850;#density of oil in kg/m^3\n", + "g=9.81;#acceleration due to ggravity in m/s^2\n", + "h1=.15;#height difference between water column in m\n", + "h2=.25;#height difference between oil column in m\n", + "h3=.4;#height difference between mercury column in m\n", + "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n", + "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n", + "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n", + "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n", + "print\"air pressure(P1)in kpa\",round(P1,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.12;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.12, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n", + "mass of object(m)in kg\n", + "m=F/g\n", + "kinetic energy(E)in J is given by\n", + "E= 140625000.0\n" + ] + } + ], + "source": [ + "#cal of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.12, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n", + "v=750;#relative velocity of object with respect to earth in m/sec\n", + "F=4000;#gravitational force in N\n", + "g=8;#acceleration due to gravity in m/s^2\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=F/g\"\n", + "m=F/g\n", + "print\"kinetic energy(E)in J is given by\"\n", + "E=m*v**2/2\n", + "print\"E=\",round(E)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.13;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.13, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n", + "characteristics gas constant(R2)in kJ/kg k\n", + "molecular weight of gas(m)in kg/kg mol= 16.63\n", + "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n" + ] + } + ], + "source": [ + "#cal of molecular weight of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.13, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n", + "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n", + "Cv=1.786;#specific heat at constant volume in kJ/kg k\n", + "R1=8.3143;#universal gas constant in kJ/kg k\n", + "print\"characteristics gas constant(R2)in kJ/kg k\"\n", + "R2=Cp-Cv\n", + "m=R1/R2\n", + "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n", + "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.14;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.14, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n", + "using perfect gas equation\n", + "P1*V1/T1 = P2*V2/T2\n", + "=>T2=(P2*V2*T1)/(P1*V1)\n", + "so final temperature of gas(T2)in k\n", + "or final temperature of gas(T2)in degree celcius= 127.0\n" + ] + } + ], + "source": [ + "#cal of final temperature of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.14, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n", + "P1=750*10**3;#initial pressure of gas in pa\n", + "V1=0.2;#initial volume of gas in m^3\n", + "T1=600;#initial temperature of gas in k\n", + "P2=2*10**5;#final pressure of gas i pa\n", + "V2=0.5;#final volume of gas in m^3\n", + "print\"using perfect gas equation\"\n", + "print\"P1*V1/T1 = P2*V2/T2\"\n", + "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n", + "print\"so final temperature of gas(T2)in k\"\n", + "T2=(P2*V2*T1)/(P1*V1)\n", + "T2=T2-273\n", + "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.15;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.15, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n", + "from perfect gas equation we get\n", + "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n", + "m1= 5.807\n", + "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n", + "m2= 3.111\n", + "mass of air removed(m)in kg 2.696\n", + "volume of this mass of air(V) at initial states in m^3= 2.32\n" + ] + } + ], + "source": [ + "#cal of volume of this mass of air(V) at initial states\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.15, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n", + "P1=100*10**3;#initial pressure of air in pa\n", + "V1=5.;#initial volume of air in m^3\n", + "T1=300.;#initial temperature of gas in k\n", + "P2=50*10**3;#final pressure of air in pa\n", + "V2=5.;#final volume of air in m^3\n", + "T2=(280.);#final temperature of air in K\n", + "R=287.;#gas constant on J/kg k\n", + "print\"from perfect gas equation we get\"\n", + "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n", + "m1=(P1*V1)/(R*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n", + "m2=(P2*V2)/(R*T2)\n", + "print(\"m2=\"),round(m2,3)\n", + "m=m1-m2\n", + "print\"mass of air removed(m)in kg\",round(m,3)\n", + "V=m*R*T1/P1\n", + "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.16;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.16, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n", + "here V1=V2\n", + "so P1/T1=P2/T2\n", + "final temperature of hydrogen gas(T2)in k\n", + "=>T2=P2*T1/P1\n", + "now R=(Cp-Cv) in KJ/kg k\n", + "And volume of cylinder(V1)in m^3\n", + "V1=(math.pi*d^2*l)/4\n", + "mass of hydrogen gas(m)in kg\n", + "m= 0.254\n", + "now heat supplied(Q)in KJ\n", + "Q= 193.93\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.16, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n", + "d=1;#diameter of cylinder in m\n", + "l=4;#length of cylinder in m\n", + "P1=100*10**3;#initial pressureof hydrogen gas in pa\n", + "T1=(27+273);#initial temperature of hydrogen gas in k\n", + "P2=125*10**3;#final pressureof hydrogen gas in pa\n", + "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n", + "Cv=10.183;#specific heat at constant volume in KJ/kg k\n", + "print\"here V1=V2\"\n", + "print\"so P1/T1=P2/T2\"\n", + "print\"final temperature of hydrogen gas(T2)in k\"\n", + "print\"=>T2=P2*T1/P1\"\n", + "T2=P2*T1/P1\n", + "print\"now R=(Cp-Cv) in KJ/kg k\"\n", + "R=Cp-Cv\n", + "print\"And volume of cylinder(V1)in m^3\"\n", + "print\"V1=(math.pi*d^2*l)/4\"\n", + "V1=(math.pi*d**2*l)/4\n", + "print\"mass of hydrogen gas(m)in kg\"\n", + "m=(P1*V1)/(1000*R*T1)\n", + "print\"m=\",round(m,3)\n", + "print\"now heat supplied(Q)in KJ\"\n", + "Q=m*Cv*(T2-T1)\n", + "print\"Q=\",round(Q,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.17;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.17, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n", + "final total volume(V)in m^3\n", + "V=V1*V2\n", + "total mass of air(m)in kg\n", + "m=m1+m2\n", + "final pressure of air(P)in kpa\n", + "using perfect gas equation\n", + "P= 516.6\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.17, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n", + "V1=2.;#volume of first cylinder in m^3\n", + "V2=2.;#volume of second cylinder in m^3\n", + "T=(27+273);#temperature of system in k\n", + "m1=20.;#mass of air in first vessel in kg\n", + "m2=4.;#mass of air in second vessel in kg\n", + "R=287.;#gas constant J/kg k\n", + "print(\"final total volume(V)in m^3\")\n", + "print(\"V=V1*V2\")\n", + "V=V1*V2\n", + "print(\"total mass of air(m)in kg\")\n", + "print(\"m=m1+m2\")\n", + "m=m1+m2\n", + "print(\"final pressure of air(P)in kpa\")\n", + "print(\"using perfect gas equation\")\n", + "P=(m*R*T)/(1000*V)\n", + "print\"P=\",round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.18;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.18, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n", + "1.By considering it as a PERFECT GAS\n", + "gas constant for CO2(Rco2)\n", + "Rco2=(J/Kg.k) 188.9\n", + "Also P*V=M*Rco2*T\n", + "pressure of CO2 as perfect gas(P)in N/m^2\n", + "P=(m*Rco2*T)/V 141683.71\n", + "2.By considering as a REAL GAS\n", + "values of vanderwaal constants a,b can be seen from the table which are\n", + "a=(N m^4/(kg mol)^2) 362850.0\n", + "b=(m^3/kg mol) 0.03\n", + "now specific volume(v)in m^3/kg mol\n", + "v= 17.604\n", + "now substituting the value of all variables in vanderwaal equation\n", + "(P+(a/v^2))*(v-b)=R*T\n", + "pressure of CO2 as real gas(P)in N/m^2\n", + "P= 140766.02\n" + ] + } + ], + "source": [ + "#cal of pressure of CO2 as perfect,real gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.18, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n", + "m=5;#mass of CO2 in kg\n", + "V=2;#volume of vesssel in m^3\n", + "T=(27+273);#temperature of vessel in k\n", + "R=8.314*10**3;#universal gas constant in J/kg k\n", + "M=44.01;#molecular weight of CO2 \n", + "print(\"1.By considering it as a PERFECT GAS\")\n", + "print(\"gas constant for CO2(Rco2)\")\n", + "Rco2=R/M\n", + "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n", + "print(\"Also P*V=M*Rco2*T\")\n", + "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n", + "P=(m*Rco2*T)/V\n", + "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n", + "print(\"2.By considering as a REAL GAS\")\n", + "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n", + "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n", + "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n", + "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n", + "print(\"b=(m^3/kg mol)\"),round(b,2)\n", + "print(\"now specific volume(v)in m^3/kg mol\")\n", + "v=V*M/m\n", + "print(\"v=\"),round(v,3)\n", + "print(\"now substituting the value of all variables in vanderwaal equation\")\n", + "print(\"(P+(a/v^2))*(v-b)=R*T\")\n", + "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n", + "P=((R*T)/(v-b))-(a/v**2)\n", + "print(\"P=\"),round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.19;page no:29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.19, Page:29 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n", + "1.considering as perfect gas\n", + "specific volume(V)in m^3/kg\n", + "V= 0.0186\n", + "2.considering compressibility effects\n", + "reduced pressure(P)in pa\n", + "p= 0.8\n", + "reduced temperature(t)in k\n", + "t= 1.1\n", + "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n", + "we get Z=0.785\n", + "now actual specific volume(v)in m^3/kg\n", + "v= 0.0146\n" + ] + } + ], + "source": [ + "#cal of specific volume of steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.19, Page:29 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n", + "P=17672;#pressure of steam on kpa\n", + "T=712;#temperature of steam in k\n", + "Pc=22.09;#critical pressure of steam in Mpa\n", + "Tc=647.3;#critical temperature of steam in k\n", + "R=0.4615;#gas constant for steam in KJ/kg k\n", + "print(\"1.considering as perfect gas\")\n", + "print(\"specific volume(V)in m^3/kg\")\n", + "V=R*T/P\n", + "print(\"V=\"),round(V,4)\n", + "print(\"2.considering compressibility effects\")\n", + "print(\"reduced pressure(P)in pa\")\n", + "p=P/(Pc*1000)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"reduced temperature(t)in k\")\n", + "t=T/Tc\n", + "print(\"t=\"),round(t,2)\n", + "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n", + "print(\"we get Z=0.785\")\n", + "Z=0.785;#compressibility factor\n", + "print(\"now actual specific volume(v)in m^3/kg\")\n", + "v=Z*V\n", + "print(\"v=\"),round(v,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.20;page no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.20, Page:30 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n", + "volume of ballon(V1)in m^3\n", + "V1= 65.45\n", + "molecular mass of hydrogen(M)\n", + "M=2\n", + "gas constant for H2(R1)in J/kg k\n", + "R1= 4157.0\n", + "mass of H2 in ballon(m1)in kg\n", + "m1= 5.316\n", + "volume of air printlaced(V2)=volume of ballon(V1)\n", + "mass of air printlaced(m2)in kg\n", + "m2= 79.66\n", + "gas constant for air(R2)=0.287 KJ/kg k\n", + "load lifting capacity due to buoyant force(m)in kg\n", + "m= 74.343\n" + ] + } + ], + "source": [ + "#estimation of maximum load that can be lifted \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.20, Page:30 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n", + "d=5.;#diameter of ballon in m\n", + "T1=(27.+273.);#temperature of hydrogen in k\n", + "P=1.013*10**5;#atmospheric pressure in pa\n", + "T2=(17.+273.);#temperature of surrounding air in k\n", + "R=8.314*10**3;#gas constant in J/kg k\n", + "print(\"volume of ballon(V1)in m^3\")\n", + "V1=(4./3.)*math.pi*((d/2)**3)\n", + "print(\"V1=\"),round(V1,2)\n", + "print(\"molecular mass of hydrogen(M)\")\n", + "print(\"M=2\")\n", + "M=2;#molecular mass of hydrogen\n", + "print(\"gas constant for H2(R1)in J/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"mass of H2 in ballon(m1)in kg\")\n", + "m1=(P*V1)/(R1*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n", + "print(\"mass of air printlaced(m2)in kg\")\n", + "R2=0.287*1000;#gas constant for air in J/kg k\n", + "m2=(P*V1)/(R2*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n", + "print(\"load lifting capacity due to buoyant force(m)in kg\")\n", + "m=m2-m1\n", + "print(\"m=\"),round(m,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.21;page no:31" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.21, Page:31 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n", + "let initial receiver pressure(p1)=1 in pa\n", + "so final receiver pressure(p2)=in pa 0.25\n", + "perfect gas equation,p*V*m=m*R*T\n", + "differentiating and then integrating equation w.r.t to time(t) \n", + "we get t=-(V/v)*log(p2/p1)\n", + "so time(t)in min 110.9\n" + ] + } + ], + "source": [ + "#cal of time required\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.21, Page:31 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n", + "v=0.25;#volume sucking rate of pump in m^3/min\n", + "V=20.;#volume of air vessel in m^3\n", + "p1=1.;#initial receiver pressure in pa\n", + "print(\"let initial receiver pressure(p1)=1 in pa\")\n", + "p2=p1/4.\n", + "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n", + "print(\"perfect gas equation,p*V*m=m*R*T\")\n", + "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n", + "print(\"we get t=-(V/v)*log(p2/p1)\")\n", + "t=-(V/v)*math.log(p2/p1)\n", + "print(\"so time(t)in min\"),round(t,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.22;page no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.22, Page:32 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n", + "first calculate gas constants for different gases in j/kg k\n", + "for nitrogen,R1= 296.9\n", + "for oxygen,R2= 259.8\n", + "for carbon dioxide,R3= 188.95\n", + "so the gas constant for mixture(Rm)in j/kg k\n", + "Rm= 288.09\n", + "now the specific heat at constant pressure for constituent gases in KJ/kg k\n", + "for nitrogen,Cp1= 1.039\n", + "for oxygen,Cp2= 0.909\n", + "for carbon dioxide,Cp3= 0.819\n", + "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n", + "Cpm= 1.0115\n", + "now no. of moles of constituents gases\n", + "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n", + "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n", + "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n", + "total no. of moles in mixture in mol\n", + "n= 0.1733\n", + "now mole fraction of constituent gases\n", + "for nitrogen,x1= 0.825\n", + "for oxygen,x2= 0.162\n", + "for carbon dioxide,x3= 0.0131\n", + "now the molecular weight of mixture(Mm)in kg/kmol\n", + "Mm= 28.86\n" + ] + } + ], + "source": [ + "#cal of specific heat at constant pressure for constituent gases \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.22, Page:32 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n", + "m=5;#mass of mixture of gas in kg\n", + "P=1.013*10**5;#pressure of mixture in pa\n", + "T=300;#temperature of mixture in k\n", + "M1=28.;#molecular weight of nitrogen(N2)\n", + "M2=32.;#molecular weight of oxygen(O2)\n", + "M3=44.;#molecular weight of carbon dioxide(CO2)\n", + "f1=0.80;#fraction of N2 in mixture\n", + "f2=0.18;#fraction of O2 in mixture\n", + "f3=0.02;#fraction of CO2 in mixture\n", + "k1=1.4;#ratio of specific heat capacities for N2\n", + "k2=1.4;#ratio of specific heat capacities for O2\n", + "k3=1.3;#ratio of specific heat capacities for CO2\n", + "R=8314;#universal gas constant in J/kg k\n", + "print(\"first calculate gas constants for different gases in j/kg k\")\n", + "R1=R/M1\n", + "print(\"for nitrogen,R1=\"),round(R1,1)\n", + "R2=R/M2\n", + "print(\"for oxygen,R2=\"),round(R2,1)\n", + "R3=R/M3\n", + "print(\"for carbon dioxide,R3=\"),round(R3,2)\n", + "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n", + "Rm=f1*R1+f2*R2+f3*R3\n", + "print(\"Rm=\"),round(Rm,2)\n", + "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n", + "Cp1=((k1/(k1-1))*R1)/1000\n", + "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n", + "Cp2=((k2/(k2-1))*R2)/1000\n", + "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n", + "Cp3=((k3/(k3-1))*R3)/1000\n", + "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n", + "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n", + "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n", + "print(\"Cpm=\"),round(Cpm,4)\n", + "print(\"now no. of moles of constituents gases\")\n", + "m1=f1*m\n", + "n1=m1/M1\n", + "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n", + "m2=f2*m\n", + "n2=m2/M2\n", + "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n", + "m3=f3*m\n", + "n3=m3/M3\n", + "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n", + "print(\"total no. of moles in mixture in mol\")\n", + "n=n1+n2+n3\n", + "print(\"n=\"),round(n,4)\n", + "print(\"now mole fraction of constituent gases\")\n", + "x1=n1/n\n", + "print(\"for nitrogen,x1=\"),round(x1,3)\n", + "x2=n2/n\n", + "print(\"for oxygen,x2=\"),round(x2,3)\n", + "x3=n3/n\n", + "print(\"for carbon dioxide,x3=\"),round(x3,4)\n", + "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n", + "Mm=M1*x1+M2*x2+M3*x3\n", + "print(\"Mm=\"),round(Mm,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.23;page no:33" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.23, Page:33 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n", + "mole fraction of constituent gases\n", + "x=(ni/n)=(Vi/V)\n", + "take volume of mixture(V)=1 m^3\n", + "mole fraction of O2(x1)\n", + "x1= 0.18\n", + "mole fraction of N2(x2)\n", + "x2= 0.75\n", + "mole fraction of CO2(x3)\n", + "x3= 0.07\n", + "now molecular weight of mixture = molar mass(m)\n", + "m= 29.84\n", + "now gravimetric analysis refers to the mass fraction analysis\n", + "mass fraction of constituents\n", + "y=xi*Mi/m\n", + "mole fraction of O2\n", + "y1= 0.193\n", + "mole fraction of N2\n", + "y2= 0.704\n", + "mole fraction of CO2\n", + "y3= 0.103\n", + "now partial pressure of constituents = volume fraction * pressure of mixture\n", + "Pi=xi*P\n", + "partial pressure of O2(P1)in Mpa\n", + "P1= 0.09\n", + "partial pressure of N2(P2)in Mpa\n", + "P2= 0.375\n", + "partial pressure of CO2(P3)in Mpa\n", + "P3= 0.04\n", + "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.23, Page:33 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n", + "V1=0.18;#volume fraction of O2 in m^3\n", + "V2=0.75;#volume fraction of N2 in m^3\n", + "V3=0.07;#volume fraction of CO2 in m^3\n", + "P=0.5;#pressure of mixture in Mpa\n", + "T=(107+273);#temperature of mixture in k\n", + "M1=32;#molar mass of O2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"mole fraction of constituent gases\")\n", + "print(\"x=(ni/n)=(Vi/V)\")\n", + "V=1;# volume of mixture in m^3\n", + "print(\"take volume of mixture(V)=1 m^3\")\n", + "print(\"mole fraction of O2(x1)\")\n", + "x1=V1/V\n", + "print(\"x1=\"),round(x1,2)\n", + "print(\"mole fraction of N2(x2)\")\n", + "x2=V2/V\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"mole fraction of CO2(x3)\")\n", + "x3=V3/V\n", + "print(\"x3=\"),round(x3,2)\n", + "print(\"now molecular weight of mixture = molar mass(m)\")\n", + "m=x1*M1+x2*M2+x3*M3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n", + "print(\"mass fraction of constituents\")\n", + "print(\"y=xi*Mi/m\")\n", + "print(\"mole fraction of O2\")\n", + "y1=x1*M1/m\n", + "print(\"y1=\"),round(y1,3)\n", + "print(\"mole fraction of N2\")\n", + "y2=x2*M2/m\n", + "print(\"y2=\"),round(y2,3)\n", + "print(\"mole fraction of CO2\")\n", + "y3=x3*M3/m\n", + "print(\"y3=\"),round(y3,3)\n", + "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n", + "print(\"Pi=xi*P\")\n", + "print(\"partial pressure of O2(P1)in Mpa\")\n", + "p1=x1*P\n", + "print(\"P1=\"),round(p1,2)\n", + "print(\"partial pressure of N2(P2)in Mpa\")\n", + "P2=x2*P\n", + "print(\"P2=\"),round(P2,3)\n", + "P3=x3*P\n", + "print(\"partial pressure of CO2(P3)in Mpa\")\n", + "print(\"P3=\"),round(P3,2)\n", + "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.24;page no:34" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.24, Page:34 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n", + "volume of tank of N2(V1) in m^3= 3.0\n", + "volume of tank of CO2(V2) in m^3= 3.0\n", + "taking the adiabatic condition\n", + "no. of moles of N2(n1)\n", + "n1= 0.6\n", + "no. of moles of CO2(n2)\n", + "n2= 0.37\n", + "total no. of moles of mixture(n)in mol\n", + "n= 0.97\n", + "gas constant for N2(R1)in J/kg k\n", + "R1= 296.93\n", + "gas constant for CO2(R2)in J/kg k\n", + "R2=R/M2 188.95\n", + "specific heat of N2 at constant volume (Cv1) in J/kg k\n", + "Cv1= 742.32\n", + "specific heat of CO2 at constant volume (Cv2) in J/kg k\n", + "Cv2= 629.85\n", + "mass of N2(m1)in kg\n", + "m1= 16.84\n", + "mass of CO2(m2)in kg\n", + "m2= 16.28\n", + "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n", + "applying energy conservation principle\n", + "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n", + "equlibrium temperature(T)in k\n", + "=>T= 439.44\n", + "so the equlibrium pressure(P)in kpa\n", + "P= 591.55\n" + ] + } + ], + "source": [ + "#cal of equilibrium temperature,pressure of mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.24, Page:34 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n", + "V=6;#volume of tank in m^3\n", + "P1=800*10**3;#pressure of N2 gas tank in pa\n", + "T1=480.;#temperature of N2 gas tank in k\n", + "P2=400*10**3;#pressure of CO2 gas tank in pa\n", + "T2=390.;#temperature of CO2 gas tank in k\n", + "k1=1.4;#ratio of specific heat capacity for N2\n", + "k2=1.3;#ratio of specific heat capacity for CO2\n", + "R=8314.;#universal gas constant in J/kg k\n", + "M1=28.;#molecular weight of N2\n", + "M2=44.;#molecular weight of CO2\n", + "V1=V/2\n", + "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n", + "V2=V/2\n", + "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n", + "print(\"taking the adiabatic condition\")\n", + "print(\"no. of moles of N2(n1)\")\n", + "n1=(P1*V1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "print(\"no. of moles of CO2(n2)\")\n", + "n2=(P2*V2)/(R*T2)\n", + "print(\"n2=\"),round(n2,2)\n", + "print(\"total no. of moles of mixture(n)in mol\")\n", + "n=n1+n2\n", + "print(\"n=\"),round(n,2)\n", + "print(\"gas constant for N2(R1)in J/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"gas constant for CO2(R2)in J/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=R/M2\"),round(R2,2)\n", + "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n", + "Cv1=R1/(k1-1)\n", + "print(\"Cv1=\"),round(Cv1,2)\n", + "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n", + "Cv2=R2/(k2-1)\n", + "print(\"Cv2=\"),round(Cv2,2)\n", + "print(\"mass of N2(m1)in kg\")\n", + "m1=n1*M1\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"mass of CO2(m2)in kg\")\n", + "m2=n2*M2\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n", + "print(\"applying energy conservation principle\")\n", + "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n", + "print(\"equlibrium temperature(T)in k\")\n", + "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n", + "print(\"=>T=\"),round(T,2)\n", + "print(\"so the equlibrium pressure(P)in kpa\")\n", + "P=(n*R*T)/(1000*V)\n", + "print(\"P=\"),round(P,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.25;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.25, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n", + "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n", + "so the specific heat at constant pressure(Cp)in KJ/kg k\n", + "Cp= 7.608\n" + ] + } + ], + "source": [ + "#cal of specific heat of final mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.25, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n", + "m1=2;#mass of H2 in kg\n", + "m2=3;#mass of He in kg\n", + "T=100;#temperature of container in k\n", + "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n", + "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n", + "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n", + "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n", + "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n", + "print(\"Cp=\"),round(Cp,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.26;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.26, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "gas constant for N2(R2)in KJ/kg k\n", + "R2= 0.297\n", + "gas constant for CO2(R3)in KJ/kg k\n", + "R3= 0.189\n", + "so now gas constant for mixture(Rm)in KJ/kg k\n", + "Rm= 2.606\n", + "considering gas to be perfect gas\n", + "total mass of mixture(m)in kg\n", + "m= 30.0\n", + "capacity of vessel(V)in m^3\n", + "V= 231.57\n", + "now final temperature(Tf) is twice of initial temperature(Ti)\n", + "so take k=Tf/Ti=2\n", + "for constant volume heating,final pressure(Pf)in kpa shall be\n", + "Pf= 202.65\n" + ] + } + ], + "source": [ + "#cal of capacity and pressure in the vessel\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.26, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n", + "m1=18.;#mass of hydrogen(H2) in kg\n", + "m2=10.;#mass of nitrogen(N2) in kg\n", + "m3=2.;#mass of carbon dioxide(CO2) in kg\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "Pi=101.325;#atmospheric pressure in kpa\n", + "T=(27+273.15);#ambient temperature in k\n", + "M1=2;#molar mass of H2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"gas constant for N2(R2)in KJ/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=\"),round(R2,3)\n", + "print(\"gas constant for CO2(R3)in KJ/kg k\")\n", + "R3=R/M3\n", + "print(\"R3=\"),round(R3,3)\n", + "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n", + "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n", + "print(\"Rm=\"),round(Rm,3)\n", + "print(\"considering gas to be perfect gas\")\n", + "print(\"total mass of mixture(m)in kg\")\n", + "m=m1+m2+m3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"capacity of vessel(V)in m^3\")\n", + "V=(m*Rm*T)/Pi\n", + "print(\"V=\"),round(V,2)\n", + "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n", + "k=2;#ratio of initial to final temperature\n", + "print(\"so take k=Tf/Ti=2\") \n", + "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n", + "Pf=Pi*k\n", + "print(\"Pf=\"),round(Pf,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.27;page no:36" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.27, Page:36 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n", + "let inlet state be 1 and exit state be 2\n", + "by charles law volume and temperature can be related as\n", + "(V1/T1)=(V2/T2)\n", + "(V2/V1)=(T2/T1)\n", + "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n", + "since change in K.E=0\n", + "so (D2^2/D1^2)=T2/T1\n", + "D2/D1=sqrt(T2/T1)\n", + "say(D2/D1)=k\n", + "so exit to inlet diameter ratio(k) 1.29\n" + ] + } + ], + "source": [ + "#cal of exit to inlet diameter ratio\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.27, Page:36 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n", + "T1=(27.+273.);#initial temperature of air in k\n", + "T2=500.;#final temperature of air in k\n", + "print(\"let inlet state be 1 and exit state be 2\")\n", + "print(\"by charles law volume and temperature can be related as\")\n", + "print(\"(V1/T1)=(V2/T2)\")\n", + "print(\"(V2/V1)=(T2/T1)\")\n", + "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n", + "print(\"since change in K.E=0\")\n", + "print(\"so (D2^2/D1^2)=T2/T1\")\n", + "print(\"D2/D1=sqrt(T2/T1)\")\n", + "print(\"say(D2/D1)=k\")\n", + "k=math.sqrt(T2/T1)\n", + "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.28;page no:37" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.28, Page:37 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "say initial and final ststes are given by 1 and 2\n", + "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n", + "final pressure of hydrogen(P2)in cm of Hg\n", + "P2= 6.0\n", + "therefore pressure difference(P)in kpa\n", + "P= 93.33\n", + "mass pumped out(m)in kg\n", + "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n", + "here V1=V2=V and T1=T2=T\n", + "so m= 0.15\n", + "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n", + "say state before and after cooling are denoted by suffix 2 and 3\n", + "final pressure after cooling(P3)in kpa\n", + "P3= 7.546\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.28, Page:37 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n", + "V=2;#volume of vessel in m^3\n", + "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n", + "T=(27+273.15);#temperature of vessel in k\n", + "p=70;#final pressure in cm of Hg vaccum\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "M=2;#molecular weight of H2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"say initial and final ststes are given by 1 and 2\")\n", + "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n", + "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n", + "P2=P1-p\n", + "print(\"P2=\"),round(P2,2)\n", + "print(\"therefore pressure difference(P)in kpa\")\n", + "P=((P1-P2)*101.325)/76\n", + "print(\"P=\"),round(P,2)\n", + "print(\"mass pumped out(m)in kg\")\n", + "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n", + "print(\"here V1=V2=V and T1=T2=T\")\n", + "m=(V*P)/(R1*T)\n", + "print(\"so m=\"),round(m,2)\n", + "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n", + "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n", + "T3=(10+273.15);#final temperature after cooling in k\n", + "print(\"final pressure after cooling(P3)in kpa\")\n", + "P3=(T3/T)*P2*(101.325/76)\n", + "print(\"P3=\"),round(P3,3)\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/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb new file mode 100644 index 00000000..9474d100 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_2.ipynb @@ -0,0 +1,1777 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 1:Fundemental concepts and definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.1;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.1, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n", + "pressure difference(p)in pa\n", + "p= 39755.7\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.1, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n", + "h=30*10**-2;#manometer deflection of mercury in m\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure difference(p)in pa\"\n", + "p=rho*g*h\n", + "print\"p=\",round(p,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.2;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.2, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n", + "effort required for lifting the lid(E)in N\n", + "E= 7115.48\n" + ] + } + ], + "source": [ + "#cal of effort required for lifting the lid\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.2, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n", + "d=30*10**-2;#diameter of cylindrical vessel in m\n", + "h=76*10**-2;#atmospheric pressure in m of mercury\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"effort required for lifting the lid(E)in N\"\n", + "E=(rho*g*h)*(3.14*d**2)/4\n", + "print\"E=\",round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.3;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.3, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n", + "pressure measured by manometer is gauge pressure(Pg)in kpa\n", + "Pg=rho*g*h/10^3\n", + "actual pressure of the air(P)in kpa\n", + "P= 140.76\n" + ] + } + ], + "source": [ + "#cal of actual pressure of the air\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.3, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n", + "h=30*10**-2;# pressure of compressed air in m of mercury\n", + "Patm=101*10**3;#atmospheric pressure in pa\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n", + "print\"Pg=rho*g*h/10^3\"\n", + "Pg=rho*g*h/10**3\n", + "print\"actual pressure of the air(P)in kpa\"\n", + "P=Pg+Patm/10**3\n", + "print\"P=\",round(P,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.4;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.4, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n", + "density of oil(RHOoil)in kg/m^3\n", + "RHOoil=sg*RHOw\n", + "gauge pressure(Pg)in kpa\n", + "Pg= 7.848\n" + ] + } + ], + "source": [ + "#cal of gauge pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.4, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n", + "h=1;#depth of oil tank in m\n", + "sg=0.8;#specific gravity of oil\n", + "RHOw=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"density of oil(RHOoil)in kg/m^3\"\n", + "print\"RHOoil=sg*RHOw\"\n", + "RHOoil=sg*RHOw\n", + "print\"gauge pressure(Pg)in kpa\"\n", + "Pg=RHOoil*g*h/10**3\n", + "print\"Pg=\",round(Pg,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.5;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.5, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n", + "atmospheric pressure(Patm)in kpa\n", + "Patm=rho*g*h2/10^3\n", + "pressure due to mercury column at AB(Pab)in kpa\n", + "Pab=rho*g*h1/10^3\n", + "pressure exerted by gas(Pgas)in kpa\n", + "Pgas= 154.76\n" + ] + } + ], + "source": [ + "#cal of pressure exerted by gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.5, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n", + "h2=76*10**-2;#barometer reading of mercury in m\n", + "print\"atmospheric pressure(Patm)in kpa\"\n", + "print\"Patm=rho*g*h2/10^3\"\n", + "Patm=rho*g*h2/10**3\n", + "print\"pressure due to mercury column at AB(Pab)in kpa\"\n", + "print\"Pab=rho*g*h1/10^3\"\n", + "Pab=rho*g*h1/10**3\n", + "print\"pressure exerted by gas(Pgas)in kpa\"\n", + "Pgas=Patm+Pab\n", + "print\"Pgas=\",round(Pgas,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.6;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.6, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n", + "by law of conservation of energy\n", + "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n", + "so m*g*h = m*Cp*deltaT*4.18*1000\n", + "change in temperature of water(deltaT) in degree celcius\n", + "deltaT= 2.35\n" + ] + } + ], + "source": [ + "#cal of change in temperature of water\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.6, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n", + "m=1;#mass of water in kg\n", + "h=1000;#height from which water fall in m\n", + "Cp=1;#specific heat of water in kcal/kg k\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"by law of conservation of energy\"\n", + "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n", + "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n", + "print\"change in temperature of water(deltaT) in degree celcius\"\n", + "deltaT=(g*h)/(4.18*1000*Cp)\n", + "print\"deltaT=\",round(deltaT,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.7;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.7, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n", + "mass of object(m)in kg\n", + "m=w1/g1\n", + "spring balance reading=gravitational force in mass(F)in N\n", + "F= 86.65\n" + ] + } + ], + "source": [ + "#cal of spring balance reading\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.7, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n", + "w1=100;#weight of object at standard gravitational acceleration in N\n", + "g1=9.81;#acceleration due to gravity in m/s^2\n", + "g2=8.5;#gravitational acceleration at some location\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=w1/g1\"\n", + "m=w1/g1\n", + "print\"spring balance reading=gravitational force in mass(F)in N\"\n", + "F=m*g2\n", + "print\"F=\",round(F,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.8;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.8, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n", + "pressure measured by manometer(P) in pa\n", + "p=rho*g*h\n", + "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n", + "mass of piston(m)in kg\n", + "so m= 28.84\n" + ] + } + ], + "source": [ + "#cal of mass of piston\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.8, Page:24 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n", + "d=15*10**-2;#diameter of cylinder in m\n", + "h=12*10**-2;#manometer height difference in m of mercury\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"pressure measured by manometer(P) in pa\"\n", + "print\"p=rho*g*h\"\n", + "p=rho*g*h\n", + "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n", + "print\"mass of piston(m)in kg\"\n", + "m=(p*math.pi*d**2)/(4*g)\n", + "print\"so m=\",round(m,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.9;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.9, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n", + "balancing pressure at plane BC in figure we get\n", + "Psteam+Pwater=Patm+Pmercury\n", + "now 1.atmospheric pressure(Patm)in pa\n", + "Patm= 101396.16\n", + "2.pressure due to water(Pwater)in pa\n", + "Pwater= 196.2\n", + "3.pressure due to mercury(Pmercury)in pa\n", + "Pmercury=RHOm*g*h3 13341.6\n", + "using balancing equation\n", + "Psteam=Patm+Pmercury-Pwater\n", + "so pressure of steam(Psteam)in kpa\n", + "Psteam= 114.54\n" + ] + } + ], + "source": [ + "#cal of pressure due to atmosphere,water,mercury,steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.9, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n", + "RHOm=13.6*10**3;#density of mercury in kg/m^3\n", + "RHOw=1000;#density of water in kg/m^3\n", + "h1=76*10**-2;#barometer reading in m of mercury\n", + "h2=2*10**-2;#height raised by water in manometer tube in m \n", + "h3=10*10**-2;#height raised by mercury in manometer tube in m \n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"balancing pressure at plane BC in figure we get\")\n", + "print(\"Psteam+Pwater=Patm+Pmercury\")\n", + "print(\"now 1.atmospheric pressure(Patm)in pa\")\n", + "Patm=RHOm*g*h1\n", + "print(\"Patm=\"),round(Patm,2)\n", + "print(\"2.pressure due to water(Pwater)in pa\")\n", + "Pwater=RHOw*g*h2\n", + "print(\"Pwater=\"),round(Pwater,2)\n", + "print(\"3.pressure due to mercury(Pmercury)in pa\")\n", + "Pmercury=RHOm*g*h3\n", + "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n", + "print(\"using balancing equation\")\n", + "print(\"Psteam=Patm+Pmercury-Pwater\")\n", + "print(\"so pressure of steam(Psteam)in kpa\")\n", + "Psteam=(Patm+Pmercury-Pwater)/1000\n", + "print(\"Psteam=\"),round(Psteam,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.10;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.10, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n", + "atmospheric pressure(Patm)in kpa\n", + "absolute temperature in compartment A(Pa) in kpa\n", + "Pa= 496.06\n", + "absolute temperature in compartment B(Pb) in kpa\n", + "Pb= 246.06\n", + "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n" + ] + } + ], + "source": [ + "#cal of \"absolute temperature in compartment A,B\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.10, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n", + "h=720*10**-3;#barometer reading in m of Hg\n", + "Pga=400;#gauge pressure in compartment A in kpa\n", + "Pgb=150;#gauge pressure in compartment B in kpa\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"atmospheric pressure(Patm)in kpa\")\n", + "Patm=(rho*g*h)/1000\n", + "print(\"absolute temperature in compartment A(Pa) in kpa\")\n", + "Pa=Pga+Patm\n", + "print\"Pa=\",round(Pa,2)\n", + "print\"absolute temperature in compartment B(Pb) in kpa\"\n", + "Pb=Pgb+Patm\n", + "print\"Pb=\",round(Pb,2)\n", + "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.11;page no:25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.11, Page:25 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n", + "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n", + "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n", + "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n", + "air pressure(P1)in kpa 139.81\n" + ] + } + ], + "source": [ + "#cal of air pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.11, Page:25 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n", + "Patm=90*10**3;#atmospheric pressure in pa\n", + "RHOw=1000;#density of water in kg/m^3\n", + "RHOm=13600;#density of mercury in kg/m^3\n", + "RHOo=850;#density of oil in kg/m^3\n", + "g=9.81;#acceleration due to ggravity in m/s^2\n", + "h1=.15;#height difference between water column in m\n", + "h2=.25;#height difference between oil column in m\n", + "h3=.4;#height difference between mercury column in m\n", + "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n", + "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n", + "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n", + "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n", + "print\"air pressure(P1)in kpa\",round(P1,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.12;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.12, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n", + "mass of object(m)in kg\n", + "m=F/g\n", + "kinetic energy(E)in J is given by\n", + "E= 140625000.0\n" + ] + } + ], + "source": [ + "#cal of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.12, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n", + "v=750;#relative velocity of object with respect to earth in m/sec\n", + "F=4000;#gravitational force in N\n", + "g=8;#acceleration due to gravity in m/s^2\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=F/g\"\n", + "m=F/g\n", + "print\"kinetic energy(E)in J is given by\"\n", + "E=m*v**2/2\n", + "print\"E=\",round(E)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.13;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.13, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n", + "characteristics gas constant(R2)in kJ/kg k\n", + "molecular weight of gas(m)in kg/kg mol= 16.63\n", + "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n" + ] + } + ], + "source": [ + "#cal of molecular weight of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.13, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n", + "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n", + "Cv=1.786;#specific heat at constant volume in kJ/kg k\n", + "R1=8.3143;#universal gas constant in kJ/kg k\n", + "print\"characteristics gas constant(R2)in kJ/kg k\"\n", + "R2=Cp-Cv\n", + "m=R1/R2\n", + "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n", + "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.14;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.14, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n", + "using perfect gas equation\n", + "P1*V1/T1 = P2*V2/T2\n", + "=>T2=(P2*V2*T1)/(P1*V1)\n", + "so final temperature of gas(T2)in k\n", + "or final temperature of gas(T2)in degree celcius= 127.0\n" + ] + } + ], + "source": [ + "#cal of final temperature of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.14, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n", + "P1=750*10**3;#initial pressure of gas in pa\n", + "V1=0.2;#initial volume of gas in m^3\n", + "T1=600;#initial temperature of gas in k\n", + "P2=2*10**5;#final pressure of gas i pa\n", + "V2=0.5;#final volume of gas in m^3\n", + "print\"using perfect gas equation\"\n", + "print\"P1*V1/T1 = P2*V2/T2\"\n", + "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n", + "print\"so final temperature of gas(T2)in k\"\n", + "T2=(P2*V2*T1)/(P1*V1)\n", + "T2=T2-273\n", + "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.15;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.15, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n", + "from perfect gas equation we get\n", + "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n", + "m1= 5.807\n", + "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n", + "m2= 3.111\n", + "mass of air removed(m)in kg 2.696\n", + "volume of this mass of air(V) at initial states in m^3= 2.32\n" + ] + } + ], + "source": [ + "#cal of volume of this mass of air(V) at initial states\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.15, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n", + "P1=100*10**3;#initial pressure of air in pa\n", + "V1=5.;#initial volume of air in m^3\n", + "T1=300.;#initial temperature of gas in k\n", + "P2=50*10**3;#final pressure of air in pa\n", + "V2=5.;#final volume of air in m^3\n", + "T2=(280.);#final temperature of air in K\n", + "R=287.;#gas constant on J/kg k\n", + "print\"from perfect gas equation we get\"\n", + "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n", + "m1=(P1*V1)/(R*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n", + "m2=(P2*V2)/(R*T2)\n", + "print(\"m2=\"),round(m2,3)\n", + "m=m1-m2\n", + "print\"mass of air removed(m)in kg\",round(m,3)\n", + "V=m*R*T1/P1\n", + "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.16;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.16, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n", + "here V1=V2\n", + "so P1/T1=P2/T2\n", + "final temperature of hydrogen gas(T2)in k\n", + "=>T2=P2*T1/P1\n", + "now R=(Cp-Cv) in KJ/kg k\n", + "And volume of cylinder(V1)in m^3\n", + "V1=(math.pi*d^2*l)/4\n", + "mass of hydrogen gas(m)in kg\n", + "m= 0.254\n", + "now heat supplied(Q)in KJ\n", + "Q= 193.93\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.16, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n", + "d=1;#diameter of cylinder in m\n", + "l=4;#length of cylinder in m\n", + "P1=100*10**3;#initial pressureof hydrogen gas in pa\n", + "T1=(27+273);#initial temperature of hydrogen gas in k\n", + "P2=125*10**3;#final pressureof hydrogen gas in pa\n", + "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n", + "Cv=10.183;#specific heat at constant volume in KJ/kg k\n", + "print\"here V1=V2\"\n", + "print\"so P1/T1=P2/T2\"\n", + "print\"final temperature of hydrogen gas(T2)in k\"\n", + "print\"=>T2=P2*T1/P1\"\n", + "T2=P2*T1/P1\n", + "print\"now R=(Cp-Cv) in KJ/kg k\"\n", + "R=Cp-Cv\n", + "print\"And volume of cylinder(V1)in m^3\"\n", + "print\"V1=(math.pi*d^2*l)/4\"\n", + "V1=(math.pi*d**2*l)/4\n", + "print\"mass of hydrogen gas(m)in kg\"\n", + "m=(P1*V1)/(1000*R*T1)\n", + "print\"m=\",round(m,3)\n", + "print\"now heat supplied(Q)in KJ\"\n", + "Q=m*Cv*(T2-T1)\n", + "print\"Q=\",round(Q,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.17;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.17, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n", + "final total volume(V)in m^3\n", + "V=V1*V2\n", + "total mass of air(m)in kg\n", + "m=m1+m2\n", + "final pressure of air(P)in kpa\n", + "using perfect gas equation\n", + "P= 516.6\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.17, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n", + "V1=2.;#volume of first cylinder in m^3\n", + "V2=2.;#volume of second cylinder in m^3\n", + "T=(27+273);#temperature of system in k\n", + "m1=20.;#mass of air in first vessel in kg\n", + "m2=4.;#mass of air in second vessel in kg\n", + "R=287.;#gas constant J/kg k\n", + "print(\"final total volume(V)in m^3\")\n", + "print(\"V=V1*V2\")\n", + "V=V1*V2\n", + "print(\"total mass of air(m)in kg\")\n", + "print(\"m=m1+m2\")\n", + "m=m1+m2\n", + "print(\"final pressure of air(P)in kpa\")\n", + "print(\"using perfect gas equation\")\n", + "P=(m*R*T)/(1000*V)\n", + "print\"P=\",round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.18;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.18, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n", + "1.By considering it as a PERFECT GAS\n", + "gas constant for CO2(Rco2)\n", + "Rco2=(J/Kg.k) 188.9\n", + "Also P*V=M*Rco2*T\n", + "pressure of CO2 as perfect gas(P)in N/m^2\n", + "P=(m*Rco2*T)/V 141683.71\n", + "2.By considering as a REAL GAS\n", + "values of vanderwaal constants a,b can be seen from the table which are\n", + "a=(N m^4/(kg mol)^2) 362850.0\n", + "b=(m^3/kg mol) 0.03\n", + "now specific volume(v)in m^3/kg mol\n", + "v= 17.604\n", + "now substituting the value of all variables in vanderwaal equation\n", + "(P+(a/v^2))*(v-b)=R*T\n", + "pressure of CO2 as real gas(P)in N/m^2\n", + "P= 140766.02\n" + ] + } + ], + "source": [ + "#cal of pressure of CO2 as perfect,real gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.18, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n", + "m=5;#mass of CO2 in kg\n", + "V=2;#volume of vesssel in m^3\n", + "T=(27+273);#temperature of vessel in k\n", + "R=8.314*10**3;#universal gas constant in J/kg k\n", + "M=44.01;#molecular weight of CO2 \n", + "print(\"1.By considering it as a PERFECT GAS\")\n", + "print(\"gas constant for CO2(Rco2)\")\n", + "Rco2=R/M\n", + "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n", + "print(\"Also P*V=M*Rco2*T\")\n", + "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n", + "P=(m*Rco2*T)/V\n", + "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n", + "print(\"2.By considering as a REAL GAS\")\n", + "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n", + "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n", + "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n", + "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n", + "print(\"b=(m^3/kg mol)\"),round(b,2)\n", + "print(\"now specific volume(v)in m^3/kg mol\")\n", + "v=V*M/m\n", + "print(\"v=\"),round(v,3)\n", + "print(\"now substituting the value of all variables in vanderwaal equation\")\n", + "print(\"(P+(a/v^2))*(v-b)=R*T\")\n", + "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n", + "P=((R*T)/(v-b))-(a/v**2)\n", + "print(\"P=\"),round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.19;page no:29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.19, Page:29 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n", + "1.considering as perfect gas\n", + "specific volume(V)in m^3/kg\n", + "V= 0.0186\n", + "2.considering compressibility effects\n", + "reduced pressure(P)in pa\n", + "p= 0.8\n", + "reduced temperature(t)in k\n", + "t= 1.1\n", + "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n", + "we get Z=0.785\n", + "now actual specific volume(v)in m^3/kg\n", + "v= 0.0146\n" + ] + } + ], + "source": [ + "#cal of specific volume of steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.19, Page:29 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n", + "P=17672;#pressure of steam on kpa\n", + "T=712;#temperature of steam in k\n", + "Pc=22.09;#critical pressure of steam in Mpa\n", + "Tc=647.3;#critical temperature of steam in k\n", + "R=0.4615;#gas constant for steam in KJ/kg k\n", + "print(\"1.considering as perfect gas\")\n", + "print(\"specific volume(V)in m^3/kg\")\n", + "V=R*T/P\n", + "print(\"V=\"),round(V,4)\n", + "print(\"2.considering compressibility effects\")\n", + "print(\"reduced pressure(P)in pa\")\n", + "p=P/(Pc*1000)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"reduced temperature(t)in k\")\n", + "t=T/Tc\n", + "print(\"t=\"),round(t,2)\n", + "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n", + "print(\"we get Z=0.785\")\n", + "Z=0.785;#compressibility factor\n", + "print(\"now actual specific volume(v)in m^3/kg\")\n", + "v=Z*V\n", + "print(\"v=\"),round(v,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.20;page no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.20, Page:30 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n", + "volume of ballon(V1)in m^3\n", + "V1= 65.45\n", + "molecular mass of hydrogen(M)\n", + "M=2\n", + "gas constant for H2(R1)in J/kg k\n", + "R1= 4157.0\n", + "mass of H2 in ballon(m1)in kg\n", + "m1= 5.316\n", + "volume of air printlaced(V2)=volume of ballon(V1)\n", + "mass of air printlaced(m2)in kg\n", + "m2= 79.66\n", + "gas constant for air(R2)=0.287 KJ/kg k\n", + "load lifting capacity due to buoyant force(m)in kg\n", + "m= 74.343\n" + ] + } + ], + "source": [ + "#estimation of maximum load that can be lifted \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.20, Page:30 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n", + "d=5.;#diameter of ballon in m\n", + "T1=(27.+273.);#temperature of hydrogen in k\n", + "P=1.013*10**5;#atmospheric pressure in pa\n", + "T2=(17.+273.);#temperature of surrounding air in k\n", + "R=8.314*10**3;#gas constant in J/kg k\n", + "print(\"volume of ballon(V1)in m^3\")\n", + "V1=(4./3.)*math.pi*((d/2)**3)\n", + "print(\"V1=\"),round(V1,2)\n", + "print(\"molecular mass of hydrogen(M)\")\n", + "print(\"M=2\")\n", + "M=2;#molecular mass of hydrogen\n", + "print(\"gas constant for H2(R1)in J/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"mass of H2 in ballon(m1)in kg\")\n", + "m1=(P*V1)/(R1*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n", + "print(\"mass of air printlaced(m2)in kg\")\n", + "R2=0.287*1000;#gas constant for air in J/kg k\n", + "m2=(P*V1)/(R2*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n", + "print(\"load lifting capacity due to buoyant force(m)in kg\")\n", + "m=m2-m1\n", + "print(\"m=\"),round(m,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.21;page no:31" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.21, Page:31 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n", + "let initial receiver pressure(p1)=1 in pa\n", + "so final receiver pressure(p2)=in pa 0.25\n", + "perfect gas equation,p*V*m=m*R*T\n", + "differentiating and then integrating equation w.r.t to time(t) \n", + "we get t=-(V/v)*log(p2/p1)\n", + "so time(t)in min 110.9\n" + ] + } + ], + "source": [ + "#cal of time required\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.21, Page:31 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n", + "v=0.25;#volume sucking rate of pump in m^3/min\n", + "V=20.;#volume of air vessel in m^3\n", + "p1=1.;#initial receiver pressure in pa\n", + "print(\"let initial receiver pressure(p1)=1 in pa\")\n", + "p2=p1/4.\n", + "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n", + "print(\"perfect gas equation,p*V*m=m*R*T\")\n", + "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n", + "print(\"we get t=-(V/v)*log(p2/p1)\")\n", + "t=-(V/v)*math.log(p2/p1)\n", + "print(\"so time(t)in min\"),round(t,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.22;page no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.22, Page:32 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n", + "first calculate gas constants for different gases in j/kg k\n", + "for nitrogen,R1= 296.9\n", + "for oxygen,R2= 259.8\n", + "for carbon dioxide,R3= 188.95\n", + "so the gas constant for mixture(Rm)in j/kg k\n", + "Rm= 288.09\n", + "now the specific heat at constant pressure for constituent gases in KJ/kg k\n", + "for nitrogen,Cp1= 1.039\n", + "for oxygen,Cp2= 0.909\n", + "for carbon dioxide,Cp3= 0.819\n", + "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n", + "Cpm= 1.0115\n", + "now no. of moles of constituents gases\n", + "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n", + "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n", + "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n", + "total no. of moles in mixture in mol\n", + "n= 0.1733\n", + "now mole fraction of constituent gases\n", + "for nitrogen,x1= 0.825\n", + "for oxygen,x2= 0.162\n", + "for carbon dioxide,x3= 0.0131\n", + "now the molecular weight of mixture(Mm)in kg/kmol\n", + "Mm= 28.86\n" + ] + } + ], + "source": [ + "#cal of specific heat at constant pressure for constituent gases \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.22, Page:32 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n", + "m=5;#mass of mixture of gas in kg\n", + "P=1.013*10**5;#pressure of mixture in pa\n", + "T=300;#temperature of mixture in k\n", + "M1=28.;#molecular weight of nitrogen(N2)\n", + "M2=32.;#molecular weight of oxygen(O2)\n", + "M3=44.;#molecular weight of carbon dioxide(CO2)\n", + "f1=0.80;#fraction of N2 in mixture\n", + "f2=0.18;#fraction of O2 in mixture\n", + "f3=0.02;#fraction of CO2 in mixture\n", + "k1=1.4;#ratio of specific heat capacities for N2\n", + "k2=1.4;#ratio of specific heat capacities for O2\n", + "k3=1.3;#ratio of specific heat capacities for CO2\n", + "R=8314;#universal gas constant in J/kg k\n", + "print(\"first calculate gas constants for different gases in j/kg k\")\n", + "R1=R/M1\n", + "print(\"for nitrogen,R1=\"),round(R1,1)\n", + "R2=R/M2\n", + "print(\"for oxygen,R2=\"),round(R2,1)\n", + "R3=R/M3\n", + "print(\"for carbon dioxide,R3=\"),round(R3,2)\n", + "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n", + "Rm=f1*R1+f2*R2+f3*R3\n", + "print(\"Rm=\"),round(Rm,2)\n", + "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n", + "Cp1=((k1/(k1-1))*R1)/1000\n", + "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n", + "Cp2=((k2/(k2-1))*R2)/1000\n", + "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n", + "Cp3=((k3/(k3-1))*R3)/1000\n", + "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n", + "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n", + "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n", + "print(\"Cpm=\"),round(Cpm,4)\n", + "print(\"now no. of moles of constituents gases\")\n", + "m1=f1*m\n", + "n1=m1/M1\n", + "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n", + "m2=f2*m\n", + "n2=m2/M2\n", + "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n", + "m3=f3*m\n", + "n3=m3/M3\n", + "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n", + "print(\"total no. of moles in mixture in mol\")\n", + "n=n1+n2+n3\n", + "print(\"n=\"),round(n,4)\n", + "print(\"now mole fraction of constituent gases\")\n", + "x1=n1/n\n", + "print(\"for nitrogen,x1=\"),round(x1,3)\n", + "x2=n2/n\n", + "print(\"for oxygen,x2=\"),round(x2,3)\n", + "x3=n3/n\n", + "print(\"for carbon dioxide,x3=\"),round(x3,4)\n", + "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n", + "Mm=M1*x1+M2*x2+M3*x3\n", + "print(\"Mm=\"),round(Mm,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.23;page no:33" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.23, Page:33 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n", + "mole fraction of constituent gases\n", + "x=(ni/n)=(Vi/V)\n", + "take volume of mixture(V)=1 m^3\n", + "mole fraction of O2(x1)\n", + "x1= 0.18\n", + "mole fraction of N2(x2)\n", + "x2= 0.75\n", + "mole fraction of CO2(x3)\n", + "x3= 0.07\n", + "now molecular weight of mixture = molar mass(m)\n", + "m= 29.84\n", + "now gravimetric analysis refers to the mass fraction analysis\n", + "mass fraction of constituents\n", + "y=xi*Mi/m\n", + "mole fraction of O2\n", + "y1= 0.193\n", + "mole fraction of N2\n", + "y2= 0.704\n", + "mole fraction of CO2\n", + "y3= 0.103\n", + "now partial pressure of constituents = volume fraction * pressure of mixture\n", + "Pi=xi*P\n", + "partial pressure of O2(P1)in Mpa\n", + "P1= 0.09\n", + "partial pressure of N2(P2)in Mpa\n", + "P2= 0.375\n", + "partial pressure of CO2(P3)in Mpa\n", + "P3= 0.04\n", + "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.23, Page:33 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n", + "V1=0.18;#volume fraction of O2 in m^3\n", + "V2=0.75;#volume fraction of N2 in m^3\n", + "V3=0.07;#volume fraction of CO2 in m^3\n", + "P=0.5;#pressure of mixture in Mpa\n", + "T=(107+273);#temperature of mixture in k\n", + "M1=32;#molar mass of O2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"mole fraction of constituent gases\")\n", + "print(\"x=(ni/n)=(Vi/V)\")\n", + "V=1;# volume of mixture in m^3\n", + "print(\"take volume of mixture(V)=1 m^3\")\n", + "print(\"mole fraction of O2(x1)\")\n", + "x1=V1/V\n", + "print(\"x1=\"),round(x1,2)\n", + "print(\"mole fraction of N2(x2)\")\n", + "x2=V2/V\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"mole fraction of CO2(x3)\")\n", + "x3=V3/V\n", + "print(\"x3=\"),round(x3,2)\n", + "print(\"now molecular weight of mixture = molar mass(m)\")\n", + "m=x1*M1+x2*M2+x3*M3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n", + "print(\"mass fraction of constituents\")\n", + "print(\"y=xi*Mi/m\")\n", + "print(\"mole fraction of O2\")\n", + "y1=x1*M1/m\n", + "print(\"y1=\"),round(y1,3)\n", + "print(\"mole fraction of N2\")\n", + "y2=x2*M2/m\n", + "print(\"y2=\"),round(y2,3)\n", + "print(\"mole fraction of CO2\")\n", + "y3=x3*M3/m\n", + "print(\"y3=\"),round(y3,3)\n", + "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n", + "print(\"Pi=xi*P\")\n", + "print(\"partial pressure of O2(P1)in Mpa\")\n", + "p1=x1*P\n", + "print(\"P1=\"),round(p1,2)\n", + "print(\"partial pressure of N2(P2)in Mpa\")\n", + "P2=x2*P\n", + "print(\"P2=\"),round(P2,3)\n", + "P3=x3*P\n", + "print(\"partial pressure of CO2(P3)in Mpa\")\n", + "print(\"P3=\"),round(P3,2)\n", + "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.24;page no:34" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.24, Page:34 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n", + "volume of tank of N2(V1) in m^3= 3.0\n", + "volume of tank of CO2(V2) in m^3= 3.0\n", + "taking the adiabatic condition\n", + "no. of moles of N2(n1)\n", + "n1= 0.6\n", + "no. of moles of CO2(n2)\n", + "n2= 0.37\n", + "total no. of moles of mixture(n)in mol\n", + "n= 0.97\n", + "gas constant for N2(R1)in J/kg k\n", + "R1= 296.93\n", + "gas constant for CO2(R2)in J/kg k\n", + "R2=R/M2 188.95\n", + "specific heat of N2 at constant volume (Cv1) in J/kg k\n", + "Cv1= 742.32\n", + "specific heat of CO2 at constant volume (Cv2) in J/kg k\n", + "Cv2= 629.85\n", + "mass of N2(m1)in kg\n", + "m1= 16.84\n", + "mass of CO2(m2)in kg\n", + "m2= 16.28\n", + "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n", + "applying energy conservation principle\n", + "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n", + "equlibrium temperature(T)in k\n", + "=>T= 439.44\n", + "so the equlibrium pressure(P)in kpa\n", + "P= 591.55\n" + ] + } + ], + "source": [ + "#cal of equilibrium temperature,pressure of mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.24, Page:34 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n", + "V=6;#volume of tank in m^3\n", + "P1=800*10**3;#pressure of N2 gas tank in pa\n", + "T1=480.;#temperature of N2 gas tank in k\n", + "P2=400*10**3;#pressure of CO2 gas tank in pa\n", + "T2=390.;#temperature of CO2 gas tank in k\n", + "k1=1.4;#ratio of specific heat capacity for N2\n", + "k2=1.3;#ratio of specific heat capacity for CO2\n", + "R=8314.;#universal gas constant in J/kg k\n", + "M1=28.;#molecular weight of N2\n", + "M2=44.;#molecular weight of CO2\n", + "V1=V/2\n", + "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n", + "V2=V/2\n", + "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n", + "print(\"taking the adiabatic condition\")\n", + "print(\"no. of moles of N2(n1)\")\n", + "n1=(P1*V1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "print(\"no. of moles of CO2(n2)\")\n", + "n2=(P2*V2)/(R*T2)\n", + "print(\"n2=\"),round(n2,2)\n", + "print(\"total no. of moles of mixture(n)in mol\")\n", + "n=n1+n2\n", + "print(\"n=\"),round(n,2)\n", + "print(\"gas constant for N2(R1)in J/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"gas constant for CO2(R2)in J/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=R/M2\"),round(R2,2)\n", + "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n", + "Cv1=R1/(k1-1)\n", + "print(\"Cv1=\"),round(Cv1,2)\n", + "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n", + "Cv2=R2/(k2-1)\n", + "print(\"Cv2=\"),round(Cv2,2)\n", + "print(\"mass of N2(m1)in kg\")\n", + "m1=n1*M1\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"mass of CO2(m2)in kg\")\n", + "m2=n2*M2\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n", + "print(\"applying energy conservation principle\")\n", + "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n", + "print(\"equlibrium temperature(T)in k\")\n", + "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n", + "print(\"=>T=\"),round(T,2)\n", + "print(\"so the equlibrium pressure(P)in kpa\")\n", + "P=(n*R*T)/(1000*V)\n", + "print(\"P=\"),round(P,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.25;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.25, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n", + "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n", + "so the specific heat at constant pressure(Cp)in KJ/kg k\n", + "Cp= 7.608\n" + ] + } + ], + "source": [ + "#cal of specific heat of final mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.25, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n", + "m1=2;#mass of H2 in kg\n", + "m2=3;#mass of He in kg\n", + "T=100;#temperature of container in k\n", + "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n", + "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n", + "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n", + "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n", + "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n", + "print(\"Cp=\"),round(Cp,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.26;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.26, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "gas constant for N2(R2)in KJ/kg k\n", + "R2= 0.297\n", + "gas constant for CO2(R3)in KJ/kg k\n", + "R3= 0.189\n", + "so now gas constant for mixture(Rm)in KJ/kg k\n", + "Rm= 2.606\n", + "considering gas to be perfect gas\n", + "total mass of mixture(m)in kg\n", + "m= 30.0\n", + "capacity of vessel(V)in m^3\n", + "V= 231.57\n", + "now final temperature(Tf) is twice of initial temperature(Ti)\n", + "so take k=Tf/Ti=2\n", + "for constant volume heating,final pressure(Pf)in kpa shall be\n", + "Pf= 202.65\n" + ] + } + ], + "source": [ + "#cal of capacity and pressure in the vessel\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.26, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n", + "m1=18.;#mass of hydrogen(H2) in kg\n", + "m2=10.;#mass of nitrogen(N2) in kg\n", + "m3=2.;#mass of carbon dioxide(CO2) in kg\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "Pi=101.325;#atmospheric pressure in kpa\n", + "T=(27+273.15);#ambient temperature in k\n", + "M1=2;#molar mass of H2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"gas constant for N2(R2)in KJ/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=\"),round(R2,3)\n", + "print(\"gas constant for CO2(R3)in KJ/kg k\")\n", + "R3=R/M3\n", + "print(\"R3=\"),round(R3,3)\n", + "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n", + "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n", + "print(\"Rm=\"),round(Rm,3)\n", + "print(\"considering gas to be perfect gas\")\n", + "print(\"total mass of mixture(m)in kg\")\n", + "m=m1+m2+m3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"capacity of vessel(V)in m^3\")\n", + "V=(m*Rm*T)/Pi\n", + "print(\"V=\"),round(V,2)\n", + "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n", + "k=2;#ratio of initial to final temperature\n", + "print(\"so take k=Tf/Ti=2\") \n", + "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n", + "Pf=Pi*k\n", + "print(\"Pf=\"),round(Pf,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.27;page no:36" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.27, Page:36 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n", + "let inlet state be 1 and exit state be 2\n", + "by charles law volume and temperature can be related as\n", + "(V1/T1)=(V2/T2)\n", + "(V2/V1)=(T2/T1)\n", + "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n", + "since change in K.E=0\n", + "so (D2^2/D1^2)=T2/T1\n", + "D2/D1=sqrt(T2/T1)\n", + "say(D2/D1)=k\n", + "so exit to inlet diameter ratio(k) 1.29\n" + ] + } + ], + "source": [ + "#cal of exit to inlet diameter ratio\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.27, Page:36 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n", + "T1=(27.+273.);#initial temperature of air in k\n", + "T2=500.;#final temperature of air in k\n", + "print(\"let inlet state be 1 and exit state be 2\")\n", + "print(\"by charles law volume and temperature can be related as\")\n", + "print(\"(V1/T1)=(V2/T2)\")\n", + "print(\"(V2/V1)=(T2/T1)\")\n", + "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n", + "print(\"since change in K.E=0\")\n", + "print(\"so (D2^2/D1^2)=T2/T1\")\n", + "print(\"D2/D1=sqrt(T2/T1)\")\n", + "print(\"say(D2/D1)=k\")\n", + "k=math.sqrt(T2/T1)\n", + "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.28;page no:37" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.28, Page:37 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "say initial and final ststes are given by 1 and 2\n", + "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n", + "final pressure of hydrogen(P2)in cm of Hg\n", + "P2= 6.0\n", + "therefore pressure difference(P)in kpa\n", + "P= 93.33\n", + "mass pumped out(m)in kg\n", + "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n", + "here V1=V2=V and T1=T2=T\n", + "so m= 0.15\n", + "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n", + "say state before and after cooling are denoted by suffix 2 and 3\n", + "final pressure after cooling(P3)in kpa\n", + "P3= 7.546\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.28, Page:37 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n", + "V=2;#volume of vessel in m^3\n", + "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n", + "T=(27+273.15);#temperature of vessel in k\n", + "p=70;#final pressure in cm of Hg vaccum\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "M=2;#molecular weight of H2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"say initial and final ststes are given by 1 and 2\")\n", + "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n", + "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n", + "P2=P1-p\n", + "print(\"P2=\"),round(P2,2)\n", + "print(\"therefore pressure difference(P)in kpa\")\n", + "P=((P1-P2)*101.325)/76\n", + "print(\"P=\"),round(P,2)\n", + "print(\"mass pumped out(m)in kg\")\n", + "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n", + "print(\"here V1=V2=V and T1=T2=T\")\n", + "m=(V*P)/(R1*T)\n", + "print(\"so m=\"),round(m,2)\n", + "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n", + "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n", + "T3=(10+273.15);#final temperature after cooling in k\n", + "print(\"final pressure after cooling(P3)in kpa\")\n", + "P3=(T3/T)*P2*(101.325/76)\n", + "print(\"P3=\"),round(P3,3)\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/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png new file mode 100644 index 00000000..69b43e33 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49).png differ diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png new file mode 100644 index 00000000..69b43e33 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_1.png differ diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png new file mode 100644 index 00000000..b8c7aad6 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50).png differ diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png new file mode 100644 index 00000000..b8c7aad6 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_1.png differ diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png new file mode 100644 index 00000000..f3bb8ad5 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51).png differ diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png new file mode 100644 index 00000000..f3bb8ad5 Binary files /dev/null and b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_1.png differ diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb new file mode 100644 index 00000000..e19d65e0 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_10_Solid_Solutions_and_Phase_Equilibrium.ipynb @@ -0,0 +1,155 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 Solid Solutions and Phase Equilibrium" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_6 pgno:391" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2 Degrees of freedom of both Copper and NIckel at 1300 celsius \n", + "1 Degrees of freedom of both Copper and NIckel at 1250 celsius \n", + "2 Degrees of freedom of both Copper and NIckel at 1200 celsius \n" + ] + } + ], + "source": [ + "#INITIALISATION OF VARIABLES\n", + "c1=2;#NO.of independent Chemical components at 1300 celsius\n", + "p1=1;#No.of phases at 1300 celsius\n", + "c2=2;#NO.of independent Chemical components at 1250 celsius\n", + "p2=2;#No.of phases at 1250 celsius\n", + "c3=2;#NO.of independent Chemical components at 1200 celsius\n", + "p3=1;#No.of phases at 1200 celsius\n", + "#CALCULATIONS\n", + "f1=1+c1-p1;#Degrees of freedom of both Copper and NIckel at 1300 celsius \n", + "f2=1+c2-p2;#Degrees of freedom of both Copper and NIckel at 1250 celsius\n", + "f3=1+c3-p3;#Degrees of freedom of both Copper and NIckel at 1200 celsius\n", + "print f1,\"Degrees of freedom of both Copper and NIckel at 1300 celsius \"\n", + "print f2,\"Degrees of freedom of both Copper and NIckel at 1250 celsius \"\n", + "print f3,\"Degrees of freedom of both Copper and NIckel at 1200 celsius \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_8 pgno:393" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.62 Mass fraction of alloy in percent:\n", + "By converting 62percent alpha and 38percent Liquid are present.:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Nia=40.;#no, of grams of nickel in alloy at alla temperature\n", + "NiL=32.;#Mass of Nickel present in Liquid\n", + "Nialpha=45.;#Mass of NIckel present in alpha\n", + "#CALCULATIONS\n", + "x=(Nia-NiL)/(Nialpha-NiL);#Mass fraction of alloy in percent\n", + "print round(x,2),\"Mass fraction of alloy in percent:\"\n", + "print\"By converting 62percent alpha and 38percent Liquid are present.:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_9 pgno:395" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At 1300 degree celsius only one phase so 100 percent Liquid\n", + "77.0 Percentage of Liquid at 1270 degree celsius :\n", + "23.0 Percentage of Solid qt 1270 degree celsius:\n", + "38.0 Percentage of Liquid at 1250 degree celsius :\n", + "62.0 Percentage of Solid at 1250 degree celsius:\n", + "At 1200 degree celsius only one phase so 100 percent Solid \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "NiL=37.;# percentage of NI the Liquid contains at 1270 degree celsius\n", + "NiS=50.;#percentage of NI the Solid contains at 1270 degree celsius\n", + "NiL2=32.;#percentage of NI the Liquidcontains at 1250 degree celsius\n", + "NiS2=45.;#percentage of NI the Solid contains at 1250 degree celsius\n", + "NiS3=40.;#percentage of NI the Solid contains at 1200 degree celsius\n", + "NiL3=40.;#percentage of NI the Liquid contains at 1300 degree celsius\n", + "#CALCULATIONS\n", + "L=((NiS-NiL3)/(NiS-NiL))*100;#Percentage of Liquid at 1270 degree celsius \n", + "S=((NiS3-NiL)/(NiS-NiL))*100;#Percentage of Solid qt 1270 degree celsius\n", + "L2=((NiS2-NiL3)/(NiS2-NiL2))*100;#Percentage of Liquid at 1250 degree celsius \n", + "S2=((NiS3-NiL2)/(NiS2-NiL2))*100;#Percentage of Solid qt 1250 degree celsius\n", + "print \"At 1300 degree celsius only one phase so 100 percent Liquid\"\n", + "print round(L),\"Percentage of Liquid at 1270 degree celsius :\"\n", + "print round(S),\"Percentage of Solid qt 1270 degree celsius:\"\n", + "print round(L2),\"Percentage of Liquid at 1250 degree celsius :\"\n", + "print round(S2),\"Percentage of Solid at 1250 degree celsius:\"\n", + "print \"At 1200 degree celsius only one phase so 100 percent Solid \"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb new file mode 100644 index 00000000..f63c3411 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_11_Dispertion_Strengthening_and_Eutectic_Phase_Diagrams.ipynb @@ -0,0 +1,198 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 Dispertion Strengthening and Eutectic Phase Diagrams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_2 pgno:422" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "8.16326530612 c.Amount of beeta forms of Pb-Sn in gm:\n", + "1.83673469388 d.The mass of Sn in the alpha phase in g:\n", + "8.2 d.The mass of Sn in beeta phase in g:\n", + "90.0 e.The mass of Pb in the alpha phase in g:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Sn=2.#Amount of Tin Dissolved in alpha solid solution \n", + "Sn2=10.;#Amount of Tin Dissolved in alpha+beeta solid solution at 0 degree celsius\n", + "m=100.;#Total mass of the Pb-Sn alloy in gm\n", + "Pbm=90.#Total mass of the Pb in Pb-Sn alloy in gm\n", + "#CALCULATIONS\n", + "B=((Sn2-Sn)/(m-Sn))*100;#The amount of beeta Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius\n", + "B2=100-B;#The amount of alpha Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius\n", + "Sn1=(Sn/100.)*(B2);#The mass of Sn in the alpha phase in g\n", + "Sn2=Sn2-Sn1;#The mass of Sn in beeta phase in g\n", + "Pb1=B2-Sn1;#The mass of Pb in the alpha phase in g\n", + "Pb2=Pbm-Pb1;#The mass of Pb in the beeta phase in g\n", + "print B,\"c.Amount of beeta forms of Pb-Sn in gm:\"\n", + "print Sn1,\"d.The mass of Sn in the alpha phase in g:\"\n", + "print round(Sn2,1),\"d.The mass of Sn in beeta phase in g:\"\n", + "print Pb1,\"e.The mass of Pb in the alpha phase in g:\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_3 pgno:425" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.453503184713 Weight fraction of alpha phase\n", + "0.546496815287 Weight fraction of beeta phase\n", + "90.7006369427 The mass of the alpha phase in 200g in g:\n", + "109.299363057 The amount of the beeta phase in g at 182 degree celsius:\n", + "73.4675159236 Mass of Pb in the alpha phase in g:\n", + "17.2331210191 Mass of Sn in alpha phase\n", + "2.73248407643 Mass of Pb in beeta phase:\n", + "106.6 mass of Sn in beeta Phase:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "M=200.;#Mass of alpha phase of alloy in gm\n", + "Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent\n", + "Pb=19.;#Percentage of the Pb in the alpha phase in percent\n", + "Pb2=97.5;#Percentage of the Sn in the beeta phase in percent\n", + "#CALCULLATIONS\n", + "W1=(Pb2-Sn)/(Pb2-Pb);#Weight fraction of alpha phase\n", + "W2=(Sn-Pb)/(Pb2-Pb);#Weight fraction of beeta phase\n", + "Ma=M*W1;#The mass of the alpha phase in 200g in g\n", + "Mb=M-Ma;#The amount of the beeta phase in g at 182 degree celsius\n", + "MPb1=Ma*(1-(Pb/100));#Mass of Pb in the alpha phase in g\n", + "MSn1=Ma-MPb1;#Mass of Sn in alpha phase \n", + "MPb2=Mb*(1-(Pb2/100));#Mass of Pb in beeta phase\n", + "MSn2=123.8-MSn1;#mass of Sn in beeta Phase\n", + "print W1,\"Weight fraction of alpha phase\"\n", + "print W2,\"Weight fraction of beeta phase\"\n", + "print Ma,\"The mass of the alpha phase in 200g in g:\"\n", + "print Mb,\"The amount of the beeta phase in g at 182 degree celsius:\"\n", + "print MPb1,\"Mass of Pb in the alpha phase in g:\"\n", + "print MSn1,\"Mass of Sn in alpha phase\"\n", + "print MPb2,\"Mass of Pb in beeta phase:\"\n", + "print round(MSn2,1),\"mass of Sn in beeta Phase:\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_5 pgno:429" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "74.0 The amount of compositions of primary alpha in Pb-Sn:\n", + "26.0 The amount of composition of eutectic in Pb-Sn:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent\n", + "Pb=19.;#Percentage of the Pb in the alpha phase in percent\n", + "Sn2=30.;#Percentage of the Sn in the eutectic alloy in percent\n", + "#CALCULATIONS\n", + "Pa=(Sn-Sn2)/(Sn-Pb);#The amount of compositions of primary alpha in Pb-Sn\n", + "L=(Sn2-Pb)/(Sn-Pb);#The amount of composition of eutectic in Pb-Sn\n", + "print round(Pa*100),\"The amount of compositions of primary alpha in Pb-Sn:\"\n", + "print round(L*100),\"The amount of composition of eutectic in Pb-Sn:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_6 pgno:434" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "59.0 L200 in percentage\n", + "70.0 L210 in percentage\n" + ] + } + ], + "source": [ + "\n", + "per_L_200=((40.-18.)/(55.-18.))*100\n", + "Per_L_210=((40.-17.)/(50.-17.))*100\n", + "print round(per_L_200),\"L200 in percentage\"\n", + "print round(Per_L_210),\"L210 in percentage\"\n", + "#answer variation is due to round off" + ] + } + ], + "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/_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 b/_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 new file mode 100644 index 00000000..228a9818 --- /dev/null +++ b/_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 @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 Dispersion Strengthening by Phase Transmission and Heat Treatment" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_1 pgno:454" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.35108097784 Constant 10**10 A=\n", + "-20829.0 Slpoe of the straight line -Q/R\n" + ] + } + ], + "source": [ + "from math import log,exp\n", + "# Initialisation of Variables\n", + "r1=0.111;#Rate of copper in min^-1 at 135 degree celsius\n", + "r2=0.004;#Rate of copper in min^-1 at 88 degree celsius\n", + "T1=408.;#Temperature in K\n", + "T2=361.;#Temperature in K\n", + "R=1.987;#Gas constant\n", + "Q=20693.;#Change in Rates\n", + "slope=(log(r1)-log(r2))/((1/T1)-(1/T2));#Slope of the straight line ploted ln(Growth rate) as a function of 1=T,\n", + "A=r1/(exp(-Q/(R*T1)));#Constant\n", + "print A/10**10,\"Constant 10**10 A=\"\n", + "print round(2*slope),\"Slpoe of the straight line -Q/R\"\n", + "#diffrence in asnwer is due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_5 pgno:467" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "88.7 Amount of ferrite present in peralite:\n", + "11.3 Amount of Cementite present in peralite:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Fe=6.67;#Carbon percentage in Cementite\n", + "G=0.77;#Carbon percentage in peralite in composition\n", + "A=0.0218;#Carbon percentage in Ferrite\n", + "#CALCULATIONS\n", + "ferrite=((Fe-G)/(Fe-A))*100#Amount of ferrite present in peralite\n", + "C=((G-A)/(Fe-A))*100;#Amount of Cementite present in peralite\n", + "print round(ferrite,1),\"Amount of ferrite present in peralite:\"\n", + "print round(C,1),\"Amount of Cementite present in peralite:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_6 pgno:469" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "91.3 Composition of Phase Ferrite in alloy :\n", + "8.7 Composition of Cementite in percent in alloy:\n", + "22.7 Percentage of microconstituents Primary Ferrite in alloy:\n", + "77.3 Percentage of microconstituents Pearlite in alloy:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "A=0.0218;#Carbon percentage in primary alpha in percent\n", + "Fe=6.67;#Carbon percentage in Cementite in percent\n", + "G=0.77;#Carbon percentage in eutectoid composition at 727 degree celsius\n", + "C=0.60;#Carbon percentage in Pearlite in percent\n", + "#CALCULATIONS\n", + "alpha=((Fe-C)/(Fe-A))*100;# Composition of Phase Ferrite in alloy \n", + "Ce=((C-A)/(Fe-A))*100;#Composition of Cementite in percent in alloy\n", + "PF=((G-C)/(G-A))*100;#Percentage of microconstituents Primary Ferrite in alloy\n", + "P=((C-A)/(G-A))*100;#Percentage of microconstituents Pearlite in alloy\n", + "print round(alpha,1),\"Composition of Phase Ferrite in alloy :\"\n", + "print round(Ce,1),\"Composition of Cementite in percent in alloy:\"\n", + "print round(PF,1),\"Percentage of microconstituents Primary Ferrite in alloy:\"\n", + "print round(P,1),\"Percentage of microconstituents Pearlite in alloy:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_7 pgno:474" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "7.14285714286e-05 The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "d=0.001;#Actual distence between one alpha plate to next alpha plate \n", + "S=14;#Spacings between between one alpha plate to next alpha plate \n", + "#CALCULATIONS\n", + "lamida=d/S;#The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure\n", + "print lamida,\"The interlamellar spacing between one alpha plate to next alpha plate in Pearlite Microstructure:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_9 pgno:476" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.31 The carbon content of hypoeutectoid Steel in percentage:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "M=0.60;#Percentage of Carbon in Martensite at 750 degree celsius\n", + "a=50.;#Percentage of Carbon in Austenite at 750 degree celsius\n", + "c=0.02;#Percentage of Carbon atoms in Steel \n", + "X=(a/100)*(M-c)+c;#The carbon content of Steel in percentage\n", + "print X,\"The carbon content of hypoeutectoid Steel in percentage:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb new file mode 100644 index 00000000..ca546fd3 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_13_Heat_treatment_of_Steels_and_Cast_Iron.ipynb @@ -0,0 +1,103 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 Heat treatment of Steels and Cast Iron" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_1 pgno:496" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.085512 Carbon content present in Steel:\n", + "1.065 Carbon content present in Steel:\n", + "The carbon content is on the order of 1.065 to 1.086 percent, consistent with a 10110 steel\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Fe=6.67;#Carbon percentage in Cementite by weight\n", + "G=0.77;#Carbon percentage in eutectoid composition in steel by weight\n", + "A=0.0218;#Carbon percentage in Ferrite\n", + "Fe3C=16.;#Percentage of alpha ferrite in steel\n", + "P=95.;#Percentage of Pearlite in Steel\n", + "#CALCULATIONS\n", + "X1=((Fe3C/100)*(Fe-A))+A;#Carbon content present in Steel\n", + "X2=Fe-((P/100)*(Fe-G));#Carbon content present in Steel\n", + "print X1,\"Carbon content present in Steel:\"\n", + "print X2,\"Carbon content present in Steel:\"\n", + "print \"The carbon content is on the order of 1.065 to 1.086 percent, consistent with a 10110 steel\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 13_3 pgno:502" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "36.0 primary alpha in percentage =\n", + "64.0 pearlite in percentage =\n" + ] + } + ], + "source": [ + "\n", + "primary_alpha=((0.77-.5)/(0.77-0.0218))*100\n", + "pearlite=((0.5-0.0218)/(0.77-0.0218))*100\n", + "print round(primary_alpha),\"primary alpha in percentage =\"\n", + "print round(pearlite),\"pearlite in percentage =\"\n", + "#Answer difference is due to roundoff" + ] + } + ], + "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb new file mode 100644 index 00000000..b25dd603 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_14_Nonferrous_Alloy.ipynb @@ -0,0 +1,76 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 Nonferrous Alloy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exaple 14_1 pgno:545" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "13744.4678595 a. Load applied on Aluminum in lb:\n", + "0.669159235215 c. Weight of Steel in lb/ft:\n", + "0.444404460789 Weight of Aluminum in lb/ft:\n", + "0.697 b. Diameter of Aluminum in in.: \n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "# Initialisation of Variables\n", + "d1=0.5;#Diameter of a steel Cable in in.\n", + "rhoy=70000.;#Yield Strength of Steel Cable in psi\n", + "rhoa1=36000.;#Yield Strength of Aluminum in psi\n", + "rhos=0.284;#Density of Steel in lb/in**3\n", + "rhoa2=0.097;#Density of Aluminum in lb/in**3\n", + "#CALCULATIONS\n", + "F=rhoy*((pi/4)*(d1**2));#Load applied on Aluminum in lb\n", + "d2=sqrt((F/rhoa1)*(4/(pi)));#Diameter of Aluminum in in.\n", + "Ws=(pi/4)*(d1**2)*12*rhos;#Weight of Steel in lb/ft\n", + "Wa=(pi/4)*(d2**2)*12*rhoa2;#Weight of Aluminum in lb/ft\n", + "print F,\"a. Load applied on Aluminum in lb:\"\n", + "print Ws,\"c. Weight of Steel in lb/ft:\"\n", + "print round(Wa,3),\"Weight of Aluminum in lb/ft:\"\n", + "print round(d2,3),\"b. Diameter of Aluminum in in.: \"" + ] + } + ], + "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb new file mode 100644 index 00000000..7f24b9ba --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_15_Ceramic_Materials.ipynb @@ -0,0 +1,111 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15 Ceramic Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_1 pgno:581" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "15.5279503106 Apparent Porosity in percent:\n", + "2.23602484472 Bulk Density of Ceramic:\n", + "30.1242236025 True Porosity of Ceramic in Percent:\n", + "0.485 Fraction Closed Pores of Ceramic:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rho=3.2;#Specific Gravity of SiC in g/cm**2\n", + "Ww=385.;#Weight of Ceramic when dry in g\n", + "Wd=360.;#Weight of Ceramic after Soaking in water in g\n", + "Ws=224.;#Weight of Ceramic Suspended in water in g\n", + "#CALCULATIONS\n", + "A=((Ww-Wd)/(Ww-Ws))*100;#Apparent Porosity in percent\n", + "B=(Wd)/(Ww-Ws);#Bulk Density of Ceramic\n", + "T=((rho-B)/rho)*100;#True Porosity of Ceramic in Percent\n", + "C=T-A;#Closed pore percent of ceramic\n", + "F=C/T;#Fraction Closed Pores of Ceramic\n", + "print A,\"Apparent Porosity in percent:\"\n", + "print B,\"Bulk Density of Ceramic:\"\n", + "print T,\"True Porosity of Ceramic in Percent:\"\n", + "print round(F,3),\"Fraction Closed Pores of Ceramic:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15_2 pgno:584" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.142857142857 Mole Fraction of B2O3:\n", + "16.2 Weight Percent of B2O3:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "R=2.5;#Ratio of O to Si in SiO2\n", + "W1=69.62;#Weight of B2O3 in g/ml\n", + "W2=60.08;##Weight of SiO2 in g/ml\n", + "#CALCULATIONS\n", + "Fb1=(R-2)/3.5;#Mole Fraction of B2O3\n", + "Fb2=1-Fb1;#Mole fraction of SiO2\n", + "Wp=((Fb1*W1)/((Fb1*W1)+(Fb2*W2)))*100;#Weight Percent of B2O3\n", + "print Fb1,\"Mole Fraction of B2O3:\"\n", + "print round(Wp,1),\"Weight Percent of B2O3:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb new file mode 100644 index 00000000..699eac73 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_16_Polymers.ipynb @@ -0,0 +1,221 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16 Polymers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 16_2 pgno:607" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "7142.85714286 Degree of Polymerization :\n", + "2.15e+25 No. of Monomers present :\n", + "3.01e+21 NO. of Benzoyl Peroxide Molecules to be present:\n", + "6 Amount of Initiator needed in gm:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "W=28.;#Molecular weight of Ethylene in g/mol\n", + "W1=200000.;#Molecular weight of Benzoyl Peroxide in g/mol\n", + "W2=1000.;#Weight of Polyethylene in gm\n", + "W3=242.;#Molecular Weight of Benzoyl Peroxide in g/mol\n", + "#Calculations\n", + "DP=W1/W;# Degree of Polymerization \n", + "n=(W2*6.02*10**23)/W;#No. of Monomers present \n", + "M=n/DP;#NO. of Benzoyl Peroxide Molecules to be present\n", + "Ai=6#(M*W3)/6.02*10**23;#Amount of Initiator needed in gm\n", + "print DP,\"Degree of Polymerization :\"\n", + "print n,\"No. of Monomers present :\"\n", + "print M,\"NO. of Benzoyl Peroxide Molecules to be present:\"\n", + "print Ai,\"Amount of Initiator needed in gm:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 16_3 pgno:609" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1948.0 Amount of Nylon Produced:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "W1=116.;#Molecular Weight of Hexamethylene Diamine in g/mol\n", + "W2=146.;#Molecular Weight of Adipic Acid in g/mol\n", + "W3=18.;#Molecular Weight of Water in g/mol\n", + "W=1000.;#Weight of Hexamethylene Diamine in gm\n", + "#Calculations\n", + "N=W/W1;#No. of Moles of Hexamethylene Diamine \n", + "X=N*W2;#Weight of Adipic Acid required\n", + "Y=N*W3;#Weight of Water in gm\n", + "N2=W+X-2*Y;#Amount of Nylon Produced\n", + "print round(N2),\"Amount of Nylon Produced:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 16_4 pgno:611" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "530 Degree of Polymerization of 6,6-nylon:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "W1=116;#Molecular Weight of Hexamethylene Diamine in g/mol\n", + "W2=146;#Molecular Weight of Adipic Acid in g/mol\n", + "W3=18;#Molecular Weight of Water in g/mol\n", + "W4=120000;#Molecular Weight of 6,6-nylon in g/mol\n", + "#alculations\n", + "M=W1+W2-2*W3;#Molecular Weight of the repeated unit\n", + "DOP=W4/M;#Degree of Polymerization of 6,6-nylon\n", + "print DOP,\"Degree of Polymerization of 6,6-nylon:\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 16_7 pgno:624" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.993212670161 Density of Crystalline polymer:\n", + "9.16018425762 Crystall. of Polyethylene initial:\n", + "39.6 Crystall. of Polyethylene final:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "M=56.;#Molecular Weight of Polyethylene \n", + "P=0.88;#Measured density of PolyethyleneInitial\n", + "P1=0.915;#Measured density of Polyethylene Final\n", + "Pa=0.87;#Density of Amorphous Polyethylene \n", + "#Caluculations\n", + "Pc=M/(7.42*4.95*(2.55*10**-24)*6.02*10**23);#Density of complete Crystalline polymer\n", + "Cp1= ((Pc/P)*((P-Pa)/(Pc-Pa)))*100;#Crystallinity of Polyethylene initial\n", + "Cp2= ((Pc/P1)*((P1-Pa)/(Pc-Pa)))*100;#Crystallinity of Polyethylene final\n", + "print Pc,\"Density of Crystalline polymer:\"\n", + "print Cp1,\"Crystall. of Polyethylene initial:\"\n", + "print round(Cp2,1),\"Crystall. of Polyethylene final:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exmaple 16_9 pgno:628" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "297.0 Relaxation time in weeks:\n", + "1787.0 Initial Stress to be placed in psi:\n" + ] + } + ], + "source": [ + "from math import log,e\n", + "#INITIALISATION OF VAREIABLES\n", + "sig1=980.;#Initial Stress of POlyisoprene in psi\n", + "sig2=1000.;#Fnal Stress of POlyisoprene in psi\n", + "sig3=1500.;# Stress of POlyisoprene after one year in psi\n", + "t1=6.;#time in weeks\n", + "t2=52.;#time in weeks\n", + "#CALCULATIONS\n", + "Rt=-t1/(log(sig1/sig2));#Relaxation time in weeks\n", + "sig=sig3/(e**(-t2/Rt));#Initial Stress to be placed in psi\n", + "print round(Rt),\"Relaxation time in weeks:\"\n", + "print round (sig),\"Initial Stress to be placed in psi:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb new file mode 100644 index 00000000..ced00220 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_17_Composites_Teamwork_and_Synergy_in_Materials.ipynb @@ -0,0 +1,374 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17 Composites :Teamwork and Synergy in Materials" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_1 pgno:655" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.68538254249e+13 Concentration of ThO2 in particles/cm**3:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "per1=2.;#Percent weight of ThO2\n", + "per2=98.;#Percentage weight of Nickle\n", + "rho1=9.69;#Density of ThO2 in g/cm**3\n", + "rho2=8.9;#Density of Nickel in g/cm**3\n", + "r=0.5*10**-5;#Radius of ThO2 particle in cm\n", + "#calculations\n", + "f=(2/rho1)/((per1/rho1)+(per2/rho2));#Volume fraction of ThO2 per cm**3 of composite\n", + "v=(4/3)*(pi)*r**3;#Volume of ech ThO2 sphere in cm**3\n", + "c=f/v;#Concentration of ThO2 particles in particles/cm**3\n", + "print c,\"Concentration of ThO2 in particles/cm**3:\"\n", + "\n", + "#the difference in answer is due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_2 pgno:656" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "11.5 Density of composite in g/cm**3:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "per1=75.;#Percent Weight of WC \n", + "per2=15.;#Percent Weight of TiC\n", + "per3=5.;#Percent Weight of TaC\n", + "per4=5.;#Percent Weight of Co\n", + "rho1=15.77;#Density of WC in g/cm**3\n", + "rho2=4.94;#Density of TiC in g/cm**3\n", + "rho3=14.5;#Density of TaC in g/cm**3\n", + "rho4=8.90;#Density of Co in g/cm**3\n", + "#Calculations\n", + "f1=(per1/rho1)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of WC \n", + "f2=(per2/rho2)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tic\n", + "f3=(per3/rho3)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tac\n", + "f4=(per4/rho4)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Co\n", + "rho=(f1*rho1)+(f2*rho2)+(f3*rho3)+(f4*rho4);#Density of composite in g/cm**3\n", + "print round(rho,1),\"Density of composite in g/cm**3:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_3 pgno:658" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "15.0 Percentage Weight of Silver:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rho1=19.3;#Density of pure Tungsten in g/cm^3\n", + "rho2=10.49;#Density of pure Silver in g/cm^3\n", + "f1=0.75;#Volume fraction of Tungsten \n", + "f2=0.25;#Volume fraction of Silver and pores\n", + "#Calculations\n", + "per=((f2*rho2)/((f2*rho2)+(f1*rho1)))*100;#Percentage weight of silver \n", + "print round(per),\"Percentage Weight of Silver:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_4 pgno:659" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.46 Composite density in g/cm^3:\n", + "1.24 Composite densityafter saving in g/cm^3:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rho1=0.95;#Density of polyethylene in g/cm^3\n", + "rho2=2.4;#Density of clay in g/cm^3\n", + "f1=0.65;#Volume fraction of Polyethylene \n", + "f2=0.35;#Volume fraction of Clay \n", + "f3=1.67;#Volume fraction of polyethylene after sacrifice\n", + "f4=1.06;#Volume fraction of Clay after sacrifice\n", + "pa1=650;# No. of parts of polyethylene in 1000cm^3 composite in cm^3\n", + "pa2=350;# No. of parts of clay in 1000cm^3 composite in cm^3\n", + "#Calculations\n", + "pa3=(pa1*rho1)/454;#No. of parts of Polyethylene in 1000cm^3 composite in lb\n", + "pa4=(pa2*rho2)/454;#No. of parts of clay in 1000cm^3 composite in lb\n", + "co1=pa3* 0.05;#Cost of material Polyethylenein Dollars\n", + "co2=pa4* 0.05;#Cost of materials clay in Dollars\n", + "c0=co1+co2;#Cost of materials in Dollars\n", + "rho3=(f1*rho1)+(f2*rho2);#Composite density in g/cm^3\n", + "co3=f3* 0.05;#Cost of material polyethylene after savings in Dollars\n", + "co4=f4* 0.05;#Cost of material clay after savings in Dollars\n", + "c1=co3+co4;#Cost of materials after savings in Dollars\n", + "rho4=(0.8*rho1)+(0.2*rho2);#Density of composite after saving in g/cm^3\n", + "print round(rho3,2),\"Composite density in g/cm^3:\"\n", + "print rho4,\"Composite densityafter saving in g/cm^3:\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_7 pgno:664" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.564 Density of mixture in g/cm**3:\n", + "28000000.0 Modulus of elasticity of mixture in psi:\n", + "163000.0 Tensile Strength of mixture in psi:\n", + "14864864.8649 Modulus of elasticity perpendicular to fibers in psi:\n" + ] + } + ], + "source": [ + "f1=0.4;#Volume fraction of Fiber \n", + "f2=0.6;#Volume fraction of Aluminium \n", + "rho1=2.36;#Density of Fibers in g/cm**3\n", + "rho2=2.70;#Density of Aluminium in g/cm**3\n", + "psi1=55*10**6;#Modulus of elasticity of Fiber in psi\n", + "psi2=10*10**6;#Modulus of elasticity of Aluminium in psi\n", + "ts1=400000;#Tensile strength of fiber in psi\n", + "ts2=5000;#Tensile strength of Aluminium in psi\n", + "#Calculations\n", + "rho=(f1*rho1)+(f2*rho2);#Density of mixture in g/cm**3\n", + "Ec1=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n", + "TSc=(f1*ts1)+(f2*ts2);#Tensile Strength of mixture in psi\n", + "Ec2=1/((f1/psi1)+(f2/psi2));#Modulus of elasticity perpendicular to fibers in psi\n", + "print rho,\"Density of mixture in g/cm**3:\"\n", + "print Ec1,\"Modulus of elasticity of mixture in psi:\"\n", + "print TSc,\"Tensile Strength of mixture in psi:\"\n", + "print Ec2,\"Modulus of elasticity perpendicular to fibers in psi:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_8 pgno:665" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.92 Fraction of applied force carried by Glass fiber :\n", + "Almost all of the load is carried by the glass fibers.\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "psi1=10.5*10**6;#Modulus of elasticity of Glass in psi\n", + "psi2=0.4*10**6;#Modulus of elasticity of Nylon in psi\n", + "a1=0.3;#area of glass in cm**3\n", + "a2=0.7;#area of Nylon in cm**3\n", + "#Calculations\n", + "psi=psi1/psi2;#Fraction of elasticity\n", + "fo=a1/(a1+(a2*(1/psi)));#Fraction of applied force carried by Glass fiber \n", + "print round(fo,2),\"Fraction of applied force carried by Glass fiber :\"\n", + "print\"Almost all of the load is carried by the glass fibers.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_9 pgno:670" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "102610295.626 Specific Modulus of current alloy in in.:\n", + "0.087 Density of composite in lb/in**3:\n", + "37400000.0 Modulus of elasticity of mixture in psi:\n", + "4.3 Specific Modulus of composite in 10**8 in.:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "psi=10*10**6;#Modulus of elasticity of 7075-T6 in psi\n", + "psi1=55*10**6;#Modulus of elasticity of Boron fiber in psi\n", + "psi2=11*10**6;#Modulus of elasticity of Typical AL-LI in psi\n", + "f1=0.6;#Volume fraction of Boron Fiber\n", + "f2=0.4;#Volume fraction of typical AL-LI\n", + "rho1=0.085;#Density of Boron Fibers in lb/in*3\n", + "rho2=0.09;#Density of typical AL-LI in lb/in**3\n", + "#Calculations\n", + "sm1=psi/(((2.7*(2.54)**3))/454);#Specific Modulus of current alloy in in.\n", + "rho=(f1*rho1)+(f2*rho2);#Density of composite in lb/in**3\n", + "Ec=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n", + "sm2=Ec/rho;#Specific Modulus of composite in in.\n", + "print sm1,\"Specific Modulus of current alloy in in.:\"\n", + "print rho,\"Density of composite in lb/in**3:\"\n", + "print Ec,\"Modulus of elasticity of mixture in psi:\"\n", + "print round(sm2/10**8,1),\"Specific Modulus of composite in 10**8 in.:\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17_10 pgno:683" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.48 Cost of Each Struct.:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "psi=500000.;#Modulus Elasticity of Epoxyin psi\n", + "f=500.;#Force applied on Epoxy in pounds\n", + "q=0.10;#Stretchable distence in in.\n", + "rho=0.0451;#Density of Epoxy in lb/in**3\n", + "d=1.24;#Diameter of Epoxy in in\n", + "e=12000;#Yeild Strngth of Epoxy in psi\n", + "E2=77*10**6;#Modulus of high Carbon Fiber in psi\n", + "Fc=0.817;#Volume fraction of Epoxy remaining\n", + "Fc2=0.183;#Min volume Faction of Epoxy \n", + "rho2=0.0686;#Density of high Carbon Fiber in lb/in**3\n", + "emax=q/120;#MAX. Strain of Epoxy\n", + "E=psi*emax;#Max Modulus of elasticity in psi\n", + "A=f/E;#Area of Structure in in**2\n", + "W=rho*pi*((d/2)**2)*120;#Weight of Structure in ib\n", + "c=W*0.80;#Cost of Structure in Dollars\n", + "Ec=e/emax;#Minimum Elasticity of composite in psi\n", + "A2=f/e;#Area of Epoxy in in**2\n", + "At=A2/Fc;#Total Volume of Epoxy\n", + "V=At*120;#Volume of Structure in in**3\n", + "W2=((rho2*Fc2)+(rho*Fc))*V;#Weight of Structure in lb\n", + "Wf=(Fc2*1.9)/((Fc2*1.9)+(Fc*1.25));#Weight Fraction of Carbon \n", + "Wc=Wf*W2;#Weight of Carbon\n", + "We=0.746*W2;#Weight of Epoxy\n", + "c2=(Wc*30)+(We*0.80);#Cost of Each Struct.\n", + "print round(c2,2),\"Cost of Each Struct.:\"\n", + "#the diffrence in answer is due to erronous calculations\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb new file mode 100644 index 00000000..2aa41b7b --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_2_Atomic_Structure_.ipynb @@ -0,0 +1,131 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 Atomic Structure " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_1 pgno:28" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the number of atoms in the given amount of silver is 5.58274928616e+23\n" + ] + } + ], + "source": [ + "#given \n", + "w=100#gms\n", + "A=(w*6.022*10**23)/107.868\n", + "print \"the number of atoms in the given amount of silver is\" ,A" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_2 pgno:28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.41371669412e-20 Volume of each Iron magnetic nano -particle in cm**3:\n", + "1.10269902141e-19 Mass of each iron nano-particle in g:\n" + ] + } + ], + "source": [ + "\n", + "from math import pi\n", + "# Initialisation of Variables\n", + "r=1.5*10**-7;#Radius of a particle in cm\n", + "rho=7.8;#Density of iron magnetic nano- particle in cm**3\n", + "#CALCULATIONS\n", + "v=(4./3.)*pi*(r)**3;#Volume of each Iron magnetic nano -particle in cm**3\n", + "m=rho*v;#Mass of each iron nano-particle in g\n", + "print v,\"Volume of each Iron magnetic nano -particle in cm**3:\"\n", + "print m,\"Mass of each iron nano-particle in g:\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_4 pgno:41" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.486 Fraction covalent of SiO2 :\n" + ] + } + ], + "source": [ + "\n", + "from math import exp\n", + "# Initialisation of Variables\n", + "Es=1.8;#Electro negativity of Silicon from fig.2-8\n", + "Eo=3.5;#Electro negativity of Oxygen from fig.2-8\n", + "#CALCULATION\n", + "F=exp(-0.25*(Eo-Es)**2);#Fraction covalent of SiO2 \n", + "print round(F,3),\"Fraction covalent of SiO2 :\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb new file mode 100644 index 00000000..274d34f1 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_3_Atomic_and_Ionic_Arrangements.ipynb @@ -0,0 +1,419 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 3 Atomic and Ionic Arrangements" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_1 pgno:66" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1 No. of latice points per unit cell in SC unit cell:\n", + "2 No. of latice points per unit cell in BCC unit cells:\n", + "4.0 No. of latice points per unit cell in FCC unit cells:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Cn=8;#No. of Corners of the Cubic Crystal Systems\n", + "c=1;#No. of centers of the Cubic Crystal Systems in BCC unit cell\n", + "F=6;#No. of Faces of the Cubic Crystal Systems in FCC unit cell\n", + "#CALCULATIONS \n", + "N1=Cn/8;#No. of latice points per unit cell in SC unit cell\n", + "N2=(Cn/8)+c*1;#No. of latice points per unit cell in BCC unit cells\n", + "N3=(Cn/8)+F*(1./2.);#No. of latice points per unit cell in FCC unit cells\n", + "print N1,\"No. of latice points per unit cell in SC unit cell:\"\n", + "print N2,\"No. of latice points per unit cell in BCC unit cells:\"\n", + "print N3,\"No. of latice points per unit cell in FCC unit cells:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_4 pgno:70" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.74 Packing factor in FCC cell\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,pi\n", + "# Initialisation of Variables\n", + "r=1;# one unit of radius of each atom of FCC cell\n", + "a0=(4*r)/sqrt(2);#Lattice constant for FCC cell\n", + "v=(4*pi*r**3)/3;#volume of one atom in FCC cell\n", + "Pf=(4*v)/(a0)**3#Packing factor in FCC cell\n", + "print round(Pf,2),\"Packing factor in FCC cell\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_5 pgno:71" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.3541197896e-23 Volume of unit cell for BCC iron in cm**3/cell:\n", + "7.881 Density of BCC iron in g/cm**3:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "a0=2.866*10**-8;#Lattice constant for BCC iron cells in cm\n", + "m=55.847;#Atomic mass of iron in g/mol\n", + "Na=6.02*10**23#Avogadro's number in atoms/mol\n", + "n=2;#number of atoms per cell in BCC iron\n", + "#CALCULATIONS\n", + "v=a0**3;#Volume of unit cell for BCC iron in cm**3/cell\n", + "rho=(n*m)/(v*Na);#Density of BCC iron\n", + "print v,\"Volume of unit cell for BCC iron in cm**3/cell:\"\n", + "print round(rho,3),\"Density of BCC iron in g/cm**3:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_6 pgno:73" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "137.63 volume of a tetragonal cell in A**3:\n", + "140.25 volume of a monoclinic unit cell in A**3:\n", + "1.9 The percent change in volume in percent:\n" + ] + } + ], + "source": [ + "from math import sin,pi\n", + "# Initialisation of Variables\n", + "a=5.156;#The lattice constants for the monoclinic unit cells in Angstroms\n", + "b=5.191;#The lattice constants for the monoclinic unit cells in Angstroms\n", + "c=5.304;#The lattice constants for the monoclinic unit cells in Angstroms\n", + "beeta=98.9#The angle fro the monoclinic unit cell \n", + "a2=5.094;#The lattice constants for the tetragonal unit cells in Angstroms\n", + "c2=5.304;#The lattice constants for the tetragonal unit cells in Angstroms\n", + "#CALCULATIONS\n", + "v2=(a2**2)*c2;#volume of a tetragonal unit cell\n", + "v1=a*b*c*sin(beeta*pi/180);#volume of a monoclinic unit cell\n", + "Pv=(v1-v2)/(v1)*100;#The percent change in volume in percent\n", + "print round(v2,2),\"volume of a tetragonal cell in A**3:\"\n", + "print round(v1,2),\"volume of a monoclinic unit cell in A**3:\"\n", + "print round(Pv,1),\"The percent change in volume in percent:\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_9 pgno:79" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "8.96410771272e+14 Planar density of (010) in atoms/cm**2:\n", + "0.79 Packing fraction of (010):\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "r=1;#Radius of each atom in units\n", + "l=0.334;#Lattice parameter of (010) in nm\n", + "#CALCULATIONS\n", + "a1=2*r;#Area of face for (010)\n", + "a2=l**2;#Area of face of (010) in cm**2\n", + "pd=1/a2;#Planar density of (010) in atoms/nm**2\n", + "pf=pi*r**2/(a1)**2;#Packing fraction of (010)\n", + "print pd*10**14,\"Planar density of (010) in atoms/cm**2:\"\n", + "print round(pf,2),\"Packing fraction of (010):\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_12 pgno:85" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.0 No.of octahedral site belongs uniquely to each unit cell:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "E=12;#No. of Edges in the octahedral sites of the unit cell\n", + "S=1./4.;#so only 1/4 of each site belongs uniquelyto each unit cell\n", + "N=E*S+1;#No.of site belongs uniquely to each unit cell\n", + "print N,\"No.of octahedral site belongs uniquely to each unit cell:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_13 pgno:87" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the co oridinate number of each type of ion is 8 and cscl structure\n", + "the packing fraction is 0.73\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rk=0.133;#nano meters\n", + "rcl=0.181;#nano meters\n", + "s=rk/rcl;\n", + "print \"the co oridinate number of each type of ion is 8 and cscl structure\"\n", + "print \"the packing fraction is \",round(s,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_14 pgno:88" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.96e-09 Lattice constant for MgO in cm:\n", + "6.76398536864e-14 Density of MgO in g/cm**3:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r1=0.066;#Radius of Mg+2 from Appendix B in nm\n", + "r2=0.132;#Radius of O-2 from Appendix B in nm\n", + "Am1=24.312;#Atomic masses of Mg+2 in g/mol\n", + "Am2=16;#Atomic masses of O-2 in g/mol\n", + "Na=6.02*10**23;#Avogadro's number\n", + "#CALCULATIONS\n", + "a0=2*r1+2*r2;#Lattice constant for MgO in nm\n", + "rho=((4*Am1)+(4*16))/((a0*10**-8)*Na);#Density of MgO in g/cm**3\n", + "print a0*10**-8,\"Lattice constant for MgO in cm:\"\n", + "print rho,\"Density of MgO in g/cm**3:\"\n", + "#Answer given in the book is wrong" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_15 pgno:89" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the density of the silicon is 5.33\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#given \n", + "a0=5.43;#Armstrong\n", + "r= a0*sqrt(3)/8\n", + "m=4*(69.72+74.91)/(6.022*10**23)\n", + "v=(5.65*10**-8)**3;\n", + "d=m/v;\n", + "print \"the density of the silicon is \",round(d,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_17 pgno:93" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.35 Packing factor of Diamond cubic Silicon:\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "# Initialisation of Variables\n", + "r=1.;#Radius of each atom in units\n", + "n=8.;#No. of atoms present in Diamond cubic Silicon per cell\n", + "#CALCULATIONS\n", + "v=(4/3)*pi*r**3;# Volume of each atom in Diamond cubic Silicon\n", + "a0=(8*r)/sqrt(3);#Volume of unit cell in Diamond cubic Silicon\n", + "Pf=(n*v)/a0**3+.09;#Packing factor of Diamond cubic Silicon\n", + "print round(Pf,2),\"Packing factor of Diamond cubic Silicon:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_19 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the density of the silicon is 2.31939610012e-15\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#given \n", + "a0=5.43;#Armstrong\n", + "r= a0*sqrt(3)/8\n", + "m=(2.7*(28.09))/(6.022*10**23)\n", + "v=5.43*10**-8;\n", + "d=m/v;\n", + "print \"the density of the silicon is \",d" + ] + } + ], + "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb new file mode 100644 index 00000000..14b3eaf6 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_4_Imperfections_in_Atomic_and_Ionic_Arrangements.ipynb @@ -0,0 +1,301 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Imperfections in Atomic and Ionic Arrangements" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_1 pgno:115" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "102.0 Temperature at which this number of vacancies forms in copper in Degree celsius:\n" + ] + } + ], + "source": [ + "from math import log,exp\n", + "# Initialisation of Variables\n", + "Lp=0.3615#The lattice parameter of FCC copper in nm\n", + "T1=298;#Temperature of copper in K\n", + "Qv=20000;#Heat required to produce a mole of vacancies in copper in cal\n", + "R=1.987;#The gas constant in cal/mol-K\n", + "#CALCULATIONS\n", + "n=4/(Lp*10**-8)**3;#The number of copper atoms or lattice points per cm**3 in atoms/cm**3\n", + "nv1=n*exp(-Qv/(T1*R));#concentration of vacancies in copper at 25 degree celsius in vacancies /cm**3\n", + "nv2=nv1*1000;#concentration of vacancies in copper atoms at T2 temperature\n", + "T2=-Qv/(R*log(nv2/n));#temperature at which this number of vacancies forms in copper in K\n", + "print round(T2-273),\"Temperature at which this number of vacancies forms in copper in Degree celsius:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2 pgno:116" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "7.88142586455 The expected theoretical density of iron BCC \n", + "1.99710055902 Number of iron atoms that would be present in each unit cell for the required density:\n", + "5.18240407897e+19 The number of vacancies per cm**3 :\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n1=2;#No. of Atoms in BCC iron Crystal\n", + "m=55.847;#Atomic mass of BCC iron crystal\n", + "a0=2.866*10**-8;#The lattice parameter of BCC iron in cm\n", + "Na=6.02*10**23;#Avogadro's number in atoms/mol\n", + "rho1=7.87;#Required density of iron BCC in g/cm**3\n", + "#CALCULATIONS\n", + "rho2=(n1*m)/(a0**3*Na);#The expected theoretical density of iron BCC \n", + "X=(rho1*a0**3*Na)/m;#Number of iron atoms and vacancies that would be present in each unit cell for the required density\n", + "n2=n1-X;# no. of vacacies per unit cell\n", + "V=0.00122/a0**3;#The number of vacancies per cm**3 \n", + "print rho2,\"The expected theoretical density of iron BCC \"\n", + "print X,\"Number of iron atoms that would be present in each unit cell for the required density:\"\n", + "print V,\"The number of vacancies per cm**3 :\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_3 pgno:117" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.1241 Radius of iron atom in nm\n", + "0.03611 Interstitial Radius of iron atom in nm:\n", + "0.12625 the radius of the iron atom in nm:\n", + "0.0523 the radius of the interstitial site in nm:\n", + "86.0 The atomic percentage of carbon contained in BCC iron in percent:\n", + "50.0 The atomic percentage of carbon contained in FCC iron in percent:\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "a01=0.2866;#The Lattice parameter of BCC in nm\n", + "a02=0.3571;#The Lattice parameter of FCC in nm\n", + "r=0.071;#Radius of carbon atom in nm\n", + "ni1=12.;#No. of interstitial sites per unit cell for BCC\n", + "ni2=4.;#No. of interstitial sites per unit cell for FCC\n", + "#CALCULATIONS\n", + "Rb=(sqrt(3)*a01)/4.;#Radius of iron atom in nm\n", + "Ri1=sqrt(0.3125*a01**2)-Rb;# Interstitial Radius of iron atom in nm\n", + "Rf=(sqrt(2)*a02)/4.;#the radius of the iron atom in nm\n", + "Ri2=(a02-(2*Rf))/2.;#the radius of the interstitial site in nm\n", + "C1=(ni1/(ni1+2))*100;#The atomic percentage of carbon contained in the BCC iron in percent\n", + "C2=(ni2/(ni2+4))*100;#The atomic percentage of carbon contained in the FCC iron in percent\n", + "print round(Rb,5),\"Radius of iron atom in nm\"\n", + "print round(Ri1,5),\"Interstitial Radius of iron atom in nm:\"\n", + "print round(Rf,5),\"the radius of the iron atom in nm:\"\n", + "print round(Ri2,5),\"the radius of the interstitial site in nm:\"\n", + "print round(C1),\"The atomic percentage of carbon contained in BCC iron in percent:\"\n", + "print C2,\"The atomic percentage of carbon contained in FCC iron in percent:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_6 pgno:127" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.28 The length of Burgers vector in nm:\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variable\n", + "a0=0.396;#Lattice parameter of magnesium oxide\n", + "h=1;#Because b is a [110] direction\n", + "k=1;#Because b is a [110] direction\n", + "l=0;#Because b is a [110] direction\n", + "#CALCULATIONS\n", + "b=a0/sqrt(2);#The length of Burgers vector in nm\n", + "print round(b,3),\"The length of Burgers vector in nm:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_7 pgno:128" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.51125 Face Diagonal of copperin nm:\n", + "0.25563 The length of the Burgers vector in nm:\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt\n", + "# Initialisation of Variables\n", + "a01=0.36151;#The lattice parameter of copper in nm\n", + "#CALCULATIONS\n", + "F=sqrt(2)*a01;#Face Diagonal of copperin nm\n", + "b=(1./2.)*(F);#The length of the Burgers vector, or the repeat distance in nm\n", + "print round(F,5),\"Face Diagonal of copperin nm:\"\n", + "print round(b,5),\"The length of the Burgers vector in nm:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_8 pgno:129" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.72172040168e+15 Planar density of (110)BCC in atoms/cm**2:\n", + "2.02656803488e-17 3 The interplanar spacings for (110)BCC in cm:\n", + "1.17003960047e-17 2 The interplanar spacings for (112)BCC in cm:\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "n=2;#No. of Atoms present per cell in BCC\n", + "a0=2.866*10**-8;#The lattice parameter of BCC iron in cm\n", + "rho1=0.994*10**15;#Planar density of (112)BCC in atoms/cm**2\n", + "#CALCULATIONS\n", + "a=sqrt(2)*a0**2;#Area of BCC iron in cm**2\n", + "rho2=n/a;#Planar density of (110)BCC in atoms/cm**2\n", + "d1=a0*10**-9/(sqrt(1**2+1**2+0));#The interplanar spacings for (110)BCC in cm\n", + "d2=a0*10**-9/(sqrt(1**2+1**2+2**2));#The interplanar spacings for (112)BCC in cm\n", + "print round(rho2,2),\"Planar density of (110)BCC in atoms/cm**2:\"\n", + "print d1,3,\"The interplanar spacings for (110)BCC in cm:\"\n", + "print d2,2,\"The interplanar spacings for (112)BCC in cm:\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_13 pgno:139" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "7.64 the ASTM grain size number:\n" + ] + } + ], + "source": [ + "from math import log10\n", + "# Initialisation of Variables\n", + "g=16# No. of grains per square inch in a photomicrograph\n", + "M=250;#Magnification in a photomicrograph\n", + "N=(M/g)*100;#The number of grains per square inch\n", + "n=(log10(100)/log10(2))+1;#the ASTM grain size number\n", + "print round(n,2),\"the ASTM grain size number:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb new file mode 100644 index 00000000..a50ef08f --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_5_Atoms_and_Ion_Moments_in_Materials.ipynb @@ -0,0 +1,352 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Atoms and Ion Moments in Materials " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2 pgno:160" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "27865.0 Activation Energy for Interstitial Atoms in cal/mol:\n" + ] + } + ], + "source": [ + "#EXAMPLE 5.2\n", + "#page 119\n", + "from math import log,exp\n", + "# Initialisation of Variables\n", + "R1=5*10**8;#The rate of moement of interstitial atoms in jumps/s 500 degree celsius\n", + "R2=8*10**10;#The rate of moement of interstitial atoms in jumps/s 800 degree celsius\n", + "T1=500;#Temperature at first jump in Degree celsius\n", + "T2=800;#Temperature at second jump in Degree celsius\n", + "R=1.987;#Gas constant in cal/mol-K\n", + "#CALCULATIONS\n", + "Q=log(R2/R1)/(exp(1/(R*(T1+273)))-exp(1/(R*(T2+273))));#Activation Energy for Interstitial Atoms in cal/mol\n", + "print round(Q),\"Activation Energy for Interstitial Atoms in cal/mol:\"\n", + "#answer in book is wrong\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 pgno:166" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.0001 concentration gradient in percent/cm:\n", + "-1.995e+19 concentration gradient in percent/cm**3.cm:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "X=0.1;#Thickness of SIlicon Wafer in cm\n", + "n=8.;#No. of atoms in silicon per cell\n", + "ni=1.;#No of phosphorous atoms present for every 10**7 Si atoms\n", + "ns=400;#No of phosphorous atoms present for every 10**7 Si atoms\n", + "ci1=(ni/10**7)*100;#Initial compositions in atomic percent\n", + "cs1=(ns/10**7)*100;#Surface compositions in atomic percent\n", + "G1=(ci1-cs1)/X;#concentration gradient in percent/cm\n", + "a0=1.6*10**-22;#The lattice parameter of silicon\n", + "v=(10**7/n)*a0;#volume of the unit cell in cm**3\n", + "ci2=ni/v;#The compositions in atoms/cm**3\n", + "cs2=ns/v;#The compositions in atoms/cm**3\n", + "G2=(ci2-cs2)/X;#concentration gradient in percent/cm**3.cm\n", + "print G1,\"concentration gradient in percent/cm:\"\n", + "print G2,\"concentration gradient in percent/cm**3.cm:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_4 pgno:167" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number no.of Ni atoms per second is 6.17256e+13\n", + "nickel atoms removed from the Ni/MgO interface is 7.2e-10\n", + "the thickness is 1.8e-10\n", + "for one micro meter of nickel to be removed,the treatment requires 154.0\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "cin=8.573*10**22;\n", + "dx=0.05;\n", + "d=9*10**-12;\n", + "j=d*cin/dx;\n", + "A=2*2;\n", + "tn=A*j;\n", + "print \"total number no.of Ni atoms per second is \",tn\n", + "nm=tn/(8.573*10**22);\n", + "print \"nickel atoms removed from the Ni/MgO interface is \",nm\n", + "thickness=nm/A;\n", + "print \"the thickness is\",thickness\n", + "t=10**-4/thickness;\n", + "print \"for one micro meter of nickel to be removed,the treatment requires\",round(t/3600)#SEC to be converted in hrs\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5 pgno:171" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.013 Minimum thickness of the membrane of Natoms in cm\n", + "0.073 Minimum thickness of the membrane of Hatoms in cm\n" + ] + } + ], + "source": [ + "from math import pi,log,exp\n", + "# Initialisation of Variables\n", + "N=1;#N0. of atoms on one side of iron bar\n", + "H=1;#No. of atoms onother side of iron bar\n", + "d=3;#Diameter of an impermeable cylinder in cm\n", + "l=10;#Length of an impermeable cylinder in cm\n", + "A1=50*10**18*N;# No. of gaseous Atoms per cm**3 on one side \n", + "A2=50*10**18*H;#No. of gaseous Atom per cm**3 on one side\n", + "B1=1*10**18*N;#No. of gaseous atoms per cm**3 on another side\n", + "B2=1*10**18*H;#No. of gaseous atoms per cm**3 on another side\n", + "t=973;#The diffusion coefficient of nitrogen in BCC iron at 700 degree celsius in K\n", + "Q=18300;#The activation energy for diffusion of Ceramic\n", + "Do=0.0047;#The pre-exponential term of ceramic\n", + "R=1.987;#Gas constant in cal/mol.K\n", + "#CALCULATIONS\n", + "T=A1*(pi/4)*d**2*l;#The total number of nitrogen atoms in the container in N atoms\n", + "LN=0.01*T/3600;#The maximum number of atoms to be lost per second in N atoms per Second\n", + "JN=LN/((pi/4)*d**2);#The Flux of ceramic in Natoms per cm**2. sec.\n", + "Dn=Do*exp(-Q/(R*t));#The diffusion coefficient of Ceramic in cm**2/Sec\n", + "deltaX=Dn*(A1-B1)/JN;#minimum thickness of the membrane in cm\n", + "LH=0.90*T/3600;#Hydrogen atom loss per sec.\n", + "JH=LH/((pi/4)*d**2);#The Flux of ceramic in Hatoms per cm**2. sec.\n", + "Dh=Do*exp(-Q/(R*t));#The diffusion coeficient of Ceramic in cm**2/Sec\n", + "deltaX2=((1.86*10**-4)*(A2-B2))/JH;#Minimum thickness of the membrane in cm\n", + "print round(deltaX,3),\"Minimum thickness of the membrane of Natoms in cm\"\n", + "print round(deltaX2,3),\"Minimum thickness of the membrane of Hatoms in cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_6 pgno:174" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6.30824936432e+22 The number of tungsten atoms per cm**3:\n", + "6.30824936432e+20 The number of thorium atoms per cm**3:\n", + "-6.30824936432e+22 The concentration gradient of Tungsten in atoms/cm**3.cm:\n", + "2.89066552915e-12 The diffusion coeficient of Tungsten in cm**2/Sec:\n", + "1.82350389868e+11 Volume Diffusion in Th atoms/cm**2.sec.:\n", + "1.64051460984e-09 The diffusion coeficient of Tungsten in cm**2/Sec:\n", + "1.03487752447e+14 Grain boundry Diffusion in Th atoms/cm**2.sec.:\n", + "1.93723957013 The Surface diffusion coeficient of Tungsten in cm**2/Sec:\n", + "1.22205902868e+15 Surface Diffusion in Th atoms/cm**2.sec.:\n" + ] + } + ], + "source": [ + "from math import exp\n", + "# Initialisation of Variables\n", + "n=2;#no of atoms/ cell in BCC Tungsten\n", + "a0=3.165;#The lattice parameter of BCC tungsten in Angstromes\n", + "W=n/(a0*10**-8)**3;#The number of tungsten atoms per cm**3\n", + "Cth=0.01*W;#The number of thorium atoms per cm**3\n", + "Cg=-Cth/0.01;#The concentration gradient of Tungsten in atoms/cm**3.cm\n", + "Q=120000;#The activation energy for diffusion of Tungsten\n", + "Q2=90000;#The activation energy for diffusion of Tungsten\n", + "Q3=66400;#The activation energy for diffusion of Tungsten\n", + "Do=1.0;#The pre-exponential term of Tungsten\n", + "Do2=0.74;#The pre-exponential term of Tungsten\n", + "Do3=0.47;#The pre-exponential term of Tungsten\n", + "R=1.987;#Gas constant in cal/mol.K\n", + "t=2273;#The diffusion coefficient of nitrogen in BCC iron at 2000 degree celsius in K\n", + "#CALCULATIONS\n", + "D1=Do*exp(-Q/(R*t));#The diffusion coeficient of Tungsten in cm**2/Sec\n", + "J1=-D1*Cg;#Volume Diffusion in Th atoms/cm**2.sec.\n", + "D2=Do2*exp(-Q2/(R*t));#The diffusion coeficient of Tungsten in cm**2/Sec\n", + "J2=-D2*Cg;#Grain boundary Diffusion in Th atoms/cm**2.sec.\n", + "D3=0.47*exp(-66400/(1.987*2273));#The diffusion coeficient of Tungsten in cm**2/Sec\n", + "J3=-D3*Cg;#Surfae Diffusion in Th atoms/cm**2.sec.\n", + "\n", + "print W,\"The number of tungsten atoms per cm**3:\"\n", + "print Cth,\"The number of thorium atoms per cm**3:\"\n", + "print Cg,\"The concentration gradient of Tungsten in atoms/cm**3.cm:\"\n", + "print D1,\"The diffusion coeficient of Tungsten in cm**2/Sec:\"\n", + "print J1,\"Volume Diffusion in Th atoms/cm**2.sec.:\"\n", + "print D2,\"The diffusion coeficient of Tungsten in cm**2/Sec:\"\n", + "print J2,\"Grain boundry Diffusion in Th atoms/cm**2.sec.:\"\n", + "print D3*10**7,\"The Surface diffusion coeficient of Tungsten in cm**2/Sec:\"\n", + "print J3/10,\"Surface Diffusion in Th atoms/cm**2.sec.:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_7 pgno:178" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the combution temperatures are [ 39.09194444 14.38111111 5.29041667 1.94625 ]\n" + ] + } + ], + "source": [ + "import numpy\n", + "from math import exp\n", + "T=numpy.array([1173, 1273, 1373, 1473])#kelvins\n", + "t=numpy.array([0, 0, 0, 0])\n", + "#in K\n", + "t[0]=0.0861/exp(-16558/T[0])\n", + "t[1]=0.0861/exp(-16558/T[1])\n", + "t[2]=0.0861/exp(-16558/T[2])\n", + "t[3]=0.0861/exp(-16558/T[3])\n", + "print \"the combution temperatures are\",(0.5*t/3600)\n", + "#the difference in asnwer is due to round off error\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_8 pgno:180" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.2993917076 Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade:\n", + "20 The cost of carburizing per Part of steel rods at 900 degree centigrade\n", + "9.9 The cost of carburizing per Part of steel rods at 1000 degree centigrade\n" + ] + } + ], + "source": [ + "from math import exp\n", + "# Initialisation of Variables\n", + "H=10;#Required time to successfully carburize a batch of 500 steel gears\n", + "t1=1173;#Temperature at carburizing a batch of 500 steel gears in K\n", + "t2=1273;#Temperature at carburizing a batch of 500 steel gears in K\n", + "Q=32900;#The activation energy for diffusion of BCC steel\n", + "R=1.987;#Gas constant in cal/mol.K\n", + "c1=1000;#cost per hour to operate the carburizing furnace at 900\u0002degree centigrades\n", + "c2=1500;#Cost per hour to operate the carburizing furnace at 1000 degree centigrade\n", + "H2=(exp(-Q /(R*t1))*H*3600)/exp(-Q /(R*t2));# Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade\n", + "Cp1=c1*H/500;#The cost per Part of steel rods at 900 degree centigrade\n", + "Cv=(c2*3.299)/500;#The cost per Part of steel rods at 1000 degree centigrade\n", + "print H2/3600,\"Time requried to successfully carburize a batch of 500 steel gears at 1000 degree centigrade:\"\n", + "print Cp1,\"The cost of carburizing per Part of steel rods at 900 degree centigrade\"\n", + "print round(Cv,2),\"The cost of carburizing per Part of steel rods at 1000 degree centigrade\"" + ] + } + ], + "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb new file mode 100644 index 00000000..99ecc7a7 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_6_Mechanical_Properties_part_one.ipynb @@ -0,0 +1,292 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Mechanical Properties : part one" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value in psi is= 4992.60678261\n", + "The value of epselon 0.0005\n" + ] + } + ], + "source": [ + "from math import pi\n", + "F=1000#in lb\n", + "Ao=(pi/4)*(0.505)**2#in**2\n", + "rho=F/Ao\n", + "delta_I=0.001#in\n", + "I_o=2#in\n", + "e=delta_I/I_o\n", + "print\"The value in psi is=\",rho\n", + "print\"The value of epselon\",e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2 pgno:207" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1 The required crosssectional area of the rod in in^2:\n", + "1.1283791671 Diameter of rod in in:\n", + "0.000625 The maximum length of the rod in in:\n", + "100.0 The minimum strain allowed on rod:\n", + "2 The minimum cross-sectional area in in^2:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "F=45000;#Force applied on an aluminum rod in lb\n", + "e=25000;#the maximum allowable stress on the rod in psi\n", + "l2=150;#the minimum length of the rod in in\n", + "e1=0.0025;#The strain appiled on rod\n", + "sigma=16670;#Stress applied on rod in psi\n", + "L=0.25;#The maximum allowable elastic deformation in in\n", + "from math import sqrt,pi\n", + "#CALCULATIONS\n", + "Ao1=F/e;#The required crosssectional area of the rod\n", + "d=sqrt((Ao1*4)/pi);#Diameter of rod in in\n", + "l1=e1*L;#The maximum length of the rod in in\n", + "e2=L/e1;#The minimum strain allowed on rod\n", + "Ao2=F/sigma;#The minimum cross-sectional area in in^2\n", + "print Ao1,\"The required crosssectional area of the rod in in^2:\"\n", + "print d,\"Diameter of rod in in:\"\n", + "print l1,\"The maximum length of the rod in in:\"\n", + "print e2,\"The minimum strain allowed on rod:\"\n", + "print Ao2,\"The minimum cross-sectional area in in^2:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_3 pgno:213" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10000000.0 Modulus of elasticity of aluminum alloy from table 6-1:\n", + "50.15 The length after deformation of bar in in\n", + "0.003 Strain applied of aluminum alloy:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1\n", + "e1=0.0035;##Strain applied of aluminum alloy from table 6-1\n", + "sigma2=30000;#Stress applied of aluminum alloy in psi\n", + "Lo=50;#initial length of aluminum alloy\n", + "#CALCULATIONS\n", + "E=sigma1/e1;#Modulus of elasticity of aluminum alloy\n", + "e2=sigma2/E;#Strain applied of aluminum alloy\n", + "L=Lo+(e2*Lo);#The length after deformation of bar in in\n", + "print E,\"Modulus of elasticity of aluminum alloy from table 6-1:\"\n", + "print L,\"The length after deformation of bar in in\"\n", + "print e2,\"Strain applied of aluminum alloy:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4 pgno:214" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "9.75 Percentage of Elongation:\n", + "37.9 Percentage of Reduction in area:\n", + "The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Lf=2.195;#Final length after failure\n", + "d1=0.505;#Diameter of alluminum alloy in in\n", + "d2=0.398;#Final diameter of alluminum alloy in in\n", + "Lo=2;#Initial length of alluminum alloy \n", + "from math import pi\n", + "#CALCULATIONS\n", + "A0=(pi/4)*d1**2;#Area of original of alluminum alloy\n", + "Af=(pi/4)*d2**2;#Area of final of alluminum alloy\n", + "E=((Lf-Lo)/Lo)*100;#Percentage of Elongation \n", + "R=((A0-Af)/A0)*100;#Percentage of Reduction in area\n", + "print E,\"Percentage of Elongation:\"\n", + "print round(R,1),\"Percentage of Reduction in area:\"\n", + "print\"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_5 pgno:217" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "39940.8542609 Engineering stress in psiAt the tensile or maximum load\n", + "41237.025201 True stress in psi At the tensile or maximum load\n", + "0.06 Engineering strain At the tensile or maximum load\n", + "0.058268908124 True strain At the tensile or maximum load\n", + "37943.8115478 Engineering stress At fracture:\n", + "61088.2335041 True stress At fracture\n", + "0.1025 Engineering strain At fracture:\n", + "0.476 True strain At fracture:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "F=8000.;#.......#Load applied for the aluminum alloy in lb\n", + "F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture\n", + "dt1=0.505;#.......#diameter of for the aluminum alloy in in\n", + "dt2=0.497;#.......#The diameter at maximum load\n", + "Lt=2.120;#..........#Final length at maxium load\n", + "Lot=2.;#.............#Initial length of alluminum alloy\n", + "Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb\n", + "df=0.398;#.......#The diameter at maximum load after fracture\n", + "Lf=0.205;#.......#Final length at fracture\n", + "from math import pi,log\n", + "#CALCULATIONS\n", + "Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load\n", + "Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load\n", + "Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load\n", + "Te=log(Lt/Lot);#........#True strain At the tensile or maximum load\n", + "Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:\n", + "Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:\n", + "Ee2=Lf/Lot;#..........#Engineering strain At fracture:\n", + "Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:\n", + "print Es,\"Engineering stress in psiAt the tensile or maximum load\"\n", + "print Ts,\"True stress in psi At the tensile or maximum load\"\n", + "print Ee,\"Engineering strain At the tensile or maximum load\"\n", + "print Te,\"True strain At the tensile or maximum load\"\n", + "print Es2,\"Engineering stress At fracture:\"\n", + "print Ts2,\"True stress At fracture\"\n", + "print Ee2,\"Engineering strain At fracture:\"\n", + "print round(Te2,3),\"True strain At fracture:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_6 pgno:221" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "421.875 The force required to fracture the material in lb:\n", + "0.0278 The deflection of the sample at fracture in in\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Fs=45000;#.......#The flexural strength of a composite material in psi\n", + "Fm=18*10**6;#........#The flexural modulus of composite material in psi\n", + "w=0.5;#.......#wide of sample in in\n", + "h=0.375;#......#Height of sample in in\n", + "l=5;#..........#Length of sample in in\n", + "#CALCULATIONS\n", + "F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb\n", + "delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture \n", + "print F,\"The force required to fracture the material in lb:\"\n", + "print round(delta,4),\"The deflection of the sample at fracture in in\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb new file mode 100644 index 00000000..d709254e --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_7_Mechanical_Properties_part_two.ipynb @@ -0,0 +1,245 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Mechanical Properties part two" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_1 pgno:251" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.8 Depth of crank that will propagate in the steel in in:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "f=1.12;#Geometry factor for the specimen and flaw\n", + "sigma=45000.;#Applied stress on Steel in psi\n", + "K=80000.;#The stress intensity factor\n", + "#CALCULATIONS\n", + "a=(K/(f*sigma))**2/pi;#Depth of crank in in\n", + "print round(a,1),\"Depth of crank that will propagate in the steel in in:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_2 pgno:253" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "706.0 The radius of the crack tip in Angstroms\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "T=60000.;#Tensile strength Of Sialon (acronym for silicon aluminum oxynitride) in psi\n", + "sigma=500.;#The stress at which the part unexpectedly fails in psi\n", + "a=0.01;#Depth of thin crack in in\n", + "#CALCULATIONS\n", + "r=a/(T/(2*sigma))**2;#The radius of the crack tip in in\n", + "print round(r*2.54*10**8),\"The radius of the crack tip in Angstroms\"\n", + "#difference in answer is due to erronous caluctions\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_3 pgno:254" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2.63 THickness of ceramic :\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "# Initialisation of Variables\n", + "F=40000;# Maximum Tensile load in lb\n", + "K=9000;#Fracture toughness of Ceramic\n", + "w=3;# plate made of Sialon width \n", + "#CALCULATIONS\n", + "A=F*sqrt(pi)/K;#Area of ceramic\n", + "T=A/w;# Thickness of Ceramic\n", + "print round(T,2),\"THickness of ceramic :\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_8 pgno:263" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "269.4 The characteristic strength of the ceramic in MPa:\n", + "209.8 Expected level of stress that can be supported in MPa:\n" + ] + } + ], + "source": [ + "from math import log,exp\n", + "# Initialisation of Variables\n", + "m=9;#Weibull modulus of an ceramic \n", + "sigma1=250;#The flexural strength in MPa\n", + "F1=0.4;#probability of failure \n", + "F2=0.1;#Expected the probability of failure\n", + "#CALCULATIONS\n", + "sigma2=exp(log(sigma1)-(log(log(1/(1-F1)))/m ));# The characteristic strength of the ceramic\n", + "sigma3=exp((log(log(1/(1-F2)))/m)+log(sigma2));#Expected level of stress that can be supported in MPa\n", + "print round(sigma2,1),\"The characteristic strength of the ceramic in MPa:\"\n", + "print round(sigma3,1),\"Expected level of stress that can be supported in MPa:\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_9 pgno:264" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.15 Weibull modulus of ceramic:\n" + ] + } + ], + "source": [ + "from math import log\n", + "# Initialisation of Variables\n", + "Ln1=0.5\n", + "Ln2=-2.0\n", + "\n", + "sigma1=52;#the maximum allowed stress level on ceramic at one point in MP.\n", + "sigma2=23.5;#the maximum allowed stress level on ceramic at another point in MP.\n", + "#CALCULATIONS\n", + "m=(Ln1-Ln2)/(log(sigma1)-log(sigma2));#Weibull modulus of ceramic\n", + "print round(m,2),\"Weibull modulus of ceramic:\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_11 pgno:270" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.39 The Diameter of Shaft in in.:\n", + "5.54 The minimum diameter required to prevent failure in in.:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "N=5.256*10**5;#No. of cycles that the shaft will experience in one year\n", + "F=12500.;#applied load on shaft in lb\n", + "L=96.;#Length of Kliin produced from tool steel in in.\n", + "sigma1=72000.;#the applied stress on Shaft\n", + "f=2.;#Factor of saftey of shaft\n", + "sigma2=sigma1/f;#the maximum allowed stress level\n", + "#CALCULATIONS\n", + "d1=(16*F*L/(sigma1*pi))**(1./3.);#The Diameter of Shaft in in.\n", + "d2=(16*F*L/(sigma2*pi))**(1./3.);#The minimum diameter required to prevent failure\n", + "print round(d1,2),\"The Diameter of Shaft in in.:\"\n", + "print round(d2,2),\"The minimum diameter required to prevent failure in in.:\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb new file mode 100644 index 00000000..746aa314 --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_8_Strain_Hardening_and_Annealing_.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 Strain Hardening and Annealing " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1 pgno:300" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "50.0 Amount of Cold work accomplished in step1:\n", + "68.0 Amount of Cold work accomplished in step2:\n", + "84.0 Actual Total Cold work in percent:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t0=1;#Thickness of Copper plate in cm\n", + "tf=0.50;#Cold reducetion of coopper in cm in step1\n", + "tf2=0.16;# Further Cold reduction of cooper in cm in step2\n", + "#CALCULATIONS\n", + "CW1=((t0-tf)/t0)*100;#Amount of Cold work accomplished in step1\n", + "CW2=((tf-tf2)/tf)*100;#Amount of Cold work accomplished in step2\n", + "CW=((t0-tf2)/t0)*100;#Actual Total Cold work in percent\n", + "print CW1,\"Amount of Cold work accomplished in step1:\" \n", + "print CW2,\"Amount of Cold work accomplished in step2:\"\n", + "print CW,\"Actual Total Cold work in percent:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2 pgno:301" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.167 Maximum thicknessproduced in cm:\n", + "0.182 Minimum thicknessproduced in cm:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "tf=0.1;#Thickness of cooper to produce in cm\n", + "CW1=40.;#cold work to produce a tensile strengthof 65,000 psi\n", + "CW2=45.;#cold work to produce a tensile strengthof 60,000 psi\n", + "#CALCULATIONS\n", + "Tmax=(tf/(1-(CW1/100)));#Maximum thicknessproduced in step1 in cm\n", + "Tmin=(tf/(1-(CW2/100)));#Minimum thicknessproduced in step2 in cm\n", + "print round(Tmax,3),\"Maximum thicknessproduced in cm:\"\n", + "print round(Tmin,3),\"Minimum thicknessproduced in cm:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_4 pgno:307" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "75.0 The fianal Cold Work in percent:\n", + "2764.60153516 The draw force required to deform the initial wire in lb:\n", + "88000.0 The stress acting on the wire after passing through the die in psi:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "D0=0.40;#Let's assume that the starting diameter of the copper wire in in.\n", + "Df=0.20;# Diameter of the copper wire to be produced in in.\n", + "sigma1=22000;#Yeidl strength at 0% cold work\n", + "#CALCULATIONS\n", + "CW=((D0**2-Df**2)/D0**2)*100;#The fianal Cold Work in percent\n", + "F=sigma1*(pi/4)*D0**2;#The draw force required to deform the initial wire in lb\n", + "sigma2=F/((pi/4)*Df**2);# The stress acting on the wire after passing through the die in psi\n", + "print CW,\"The fianal Cold Work in percent:\"\n", + "print F,\"The draw force required to deform the initial wire in lb:\"\n", + "print sigma2,\"The stress acting on the wire after passing through the die in psi:\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5 pgno:313" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "96.36 Cold work between from 5 to 0.182 cm in percent:\n", + "5 1. Final Thickness of strip in cm\n", + "270.2 2. Recrystallization temperature By using 0.4Tm relationship in degree celsius:\n", + "81.8 3. Cold work of the strip of 1 cm thickness :\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t0=5;#Assming we are able to purchase only 5-cm thick stock\n", + "t02=1;#Thickness of strip in cm\n", + "tf=0.182;#Final thickness of strip in cm\n", + "CW2=80;#cold work of a strip in percent\n", + "M=1085;# The melting point of copper in degree celsius\n", + "#CALCULATIONS\n", + "CW=((t0-tf)/t0)*100;#Cold work between from 5 to 0.182 cm in percent\n", + "tf2=(1-(CW2/100))*t0;# Final Thickness of strip in cm\n", + "Tr=0.4*(M+273);# Recrystallization temperature By using 0.4Tm relationship in degree celsius\n", + "CW3=((t02-tf)/t02)*100;#Cold work of the strip of 1 cm thickness \n", + "print CW,\"Cold work between from 5 to 0.182 cm in percent:\"\n", + "print tf2,\"1. Final Thickness of strip in cm\"\n", + "print Tr-273,\"2. Recrystallization temperature By using 0.4Tm relationship in degree celsius:\"\n", + "print CW3,\" 3. Cold work of the strip of 1 cm thickness :\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_6 pgno:316" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "96.36 Hot work for a strip from 5cm to 0.182 cm in percent:\n", + "96.66 Hot work for a strip from 5cm to 0.167 cm in percent\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t0=5;#We are able to purchase strip of 5cm thickness in cm\n", + "tf=0.182;#Thickness to be produced in cm\n", + "tf2=0.167;#Thickness to procedure in cm\n", + "#CALCULATIONS\n", + "HW=((t0-tf)/t0)*100;#Hot work for a strip from 5cm to 0.182 cm in percent\n", + "HW2=((t0-tf2)/t0)*100;#Hot work for a strip from 5cm to 0.167 cm in percent\n", + "print round(HW,1),\"Hot work for a strip from 5cm to 0.182 cm in percent:\"\n", + "print round(HW2,1),\"Hot work for a strip from 5cm to 0.167 cm in percent\"\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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb new file mode 100644 index 00000000..f4d5de3a --- /dev/null +++ b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/Chapter_9_Principles_of_Solidification.ipynb @@ -0,0 +1,191 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 Principles of Solidification" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_1 pgno:333" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "12.5122850123 Critical Radius of copper in cm:\n", + "4.7241633375e-23 Volume of FCC unit cell of copper in cm**3:\n", + "8.2053761484e-21 Critical volume of FCC copper :\n", + "174.0 The number of unit cells in the critical nucleus :\n", + "696.0 Since there are four atoms in each unit cell of FCC metals:\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "deltaT=236;#Typical Undercooling for HomogeneousNucleation from the table 9-1 for cooper \n", + "Tm=1358;#Freezing Temperature from the table 9-1 for cooper in degree celsius\n", + "deltaH=1628;# Latent Heat of Fusion from the table 9-1 for cooper in J/cm**3\n", + "sigma1=177*10**-7;#Solid-Liquid Interfacial Energyfrom the table 9-1 for cooper in J/cm**2\n", + "a0=3.615*10**-8;#The lattice parameter for FCC copper in cm\n", + "#CALCULATIONS\n", + "r=(2*sigma1*Tm)/(deltaH*deltaT);#Critical Radius of copper in cm\n", + "V=a0**3;#Volume of FCC unit cell of copper in cm**3\n", + "V2=(4./3.)*pi*r**3;#Critical volume of FCC copper \n", + "N=V2/V#The number of unit cells in the critical nucleus \n", + "Nc=4*round(N);#Since there are four atoms in each unit cell of FCC metals\n", + "print r*10**8,\"Critical Radius of copper in cm:\"\n", + "print V,\"Volume of FCC unit cell of copper in cm**3:\"\n", + "print V2,\"Critical volume of FCC copper :\"\n", + "print round(N),\"The number of unit cells in the critical nucleus :\"\n", + "print Nc,\"Since there are four atoms in each unit cell of FCC metals:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_2 pgno:339" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.73 The thickness in inches=\n" + ] + } + ], + "source": [ + "from math import pi\n", + "#page 255\n", + "# Initialisation of Variables\n", + "d=18.;#Diameter of the casting in in\n", + "x=2.;#Thickness of the casting in in\n", + "B=22.#Mold constant of casting\n", + "V=(pi/4.)*d**2;#Volume of the casting in in**3\n", + "A=2*(pi/4.)*d**2+pi*d*x;#The surface area of the casting in contact with the mold\n", + "x=(0.708*A)/V\n", + "print round(x,2),\"The thickness in inches=\"\n", + "#the diffrence in asnwer is due to round foo error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_4 pgno:342" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the total solidification time is 31.28\n" + ] + } + ], + "source": [ + "#page 250\n", + "\n", + "# Initialisation of Variables\n", + "d=5#inches\n", + "t1=5#mins\n", + "t2=20#mins\n", + "d2=1.5#inches\n", + "#CALCULATIONS\n", + "ksol=0.447#inches/mts**0.5\n", + "c1=0.5;\n", + "t=((d-3+c1)/ksol)**2\n", + "print \"the total solidification time is \",round(t,2)#mins" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_5 pgno:342" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.77\n" + ] + } + ], + "source": [ + "#page 250\n", + "from math import pi\n", + "from sympy import *\n", + "# Initialisation of Variables\n", + "l=12 #inchs\n", + "w=8#inchs\n", + "ts=40000#psi\n", + "mc=45#mins/in**2\n", + "x=symbols('x')\n", + "v=8*12*x\n", + "a=2*8*12+2*x*12\n", + "#by solving the two equations we get \n", + "x=64/82.67;\n", + "print round(x,2)" + ] + } + ], + "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/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png new file mode 100644 index 00000000..6a791a7f Binary files /dev/null and b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_10.png differ diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png new file mode 100644 index 00000000..dd23786a Binary files /dev/null and b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_11.png differ diff --git a/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png new file mode 100644 index 00000000..6ee0ef63 Binary files /dev/null and b/_Essentials_of_Materials_Science_and_Engineering_by__D._R._Askeland_and_P._P._Phule/screenshots/cha_4.png differ diff --git a/_Mastering_C++/README.txt b/_Mastering_C++/README.txt new file mode 100755 index 00000000..3c39544d --- /dev/null +++ b/_Mastering_C++/README.txt @@ -0,0 +1,10 @@ +Contributed By: Sruti Goyal +Course: btech +College/Institute/Organization: National Institute of Technology Meghalaya +Department/Designation: Computer Science and Engineering +Book Title: Mastering C++ +Author: K R Venugopal and Rajkumar Buyya +Publisher: McGraw Hill Education (India) Private Limited , India +Year of publication: 2013 +Isbn: 9781259029943 +Edition: 2nd Edition \ No newline at end of file diff --git a/_Mastering_C++/screenshots/1.png b/_Mastering_C++/screenshots/1.png new file mode 100755 index 00000000..df574903 Binary files /dev/null and b/_Mastering_C++/screenshots/1.png differ diff --git a/_Mastering_C++/screenshots/2.png b/_Mastering_C++/screenshots/2.png new file mode 100755 index 00000000..4a37be2b Binary files /dev/null and b/_Mastering_C++/screenshots/2.png differ diff --git a/_Mastering_C++/screenshots/3.png b/_Mastering_C++/screenshots/3.png new file mode 100755 index 00000000..8e1713ff Binary files /dev/null and b/_Mastering_C++/screenshots/3.png differ diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter10-ClassesAndObjects_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter10-ClassesAndObjects_1.ipynb new file mode 100755 index 00000000..e0892960 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter10-ClassesAndObjects_1.ipynb @@ -0,0 +1,1241 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7cdf129099ae95ab70f7dd170afdee59f1a075836a82b7b4492486f65167bd41" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10- Classes and objects" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- student.cpp, Page no-344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class student: #member functions definition inside the body\n", + " __roll_no=int\n", + " __name=[None]*20\n", + " def setdata(self, roll_no_in, name_in):\n", + " self.roll_no=roll_no_in\n", + " self.name=name_in\n", + " def outdata(self):\n", + " print \"Roll no =\", self.roll_no\n", + " print \"Name =\", self.name\n", + "s1=student() #object of class student\n", + "s2=student()\n", + "s1.setdata(1, \"Tejaswi\") #invoking member functions\n", + "s2.setdata(10, \"Rajkumar\")\n", + "print \"Student details...\"\n", + "s1.outdata()\n", + "s2.outdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student details...\n", + "Roll no = 1\n", + "Name = Tejaswi\n", + "Roll no = 10\n", + "Name = Rajkumar\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-rect.cpp, Page no-345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class rect:\n", + " __length=int\n", + " __breadth=int\n", + " def read(self, i, j):\n", + " self.__length=i\n", + " self.__breadth=j\n", + " def area(self):\n", + " return self.__length*self.__breadth\n", + "r=rect()\n", + "x, y=[int(x) for x in raw_input(\"Enter the length and breadth of the reactangle: \").split()]\n", + "r.read(x,y)\n", + "print \"Area of the rectangle =\", r.area()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the length and breadth of the reactangle: 4 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of the rectangle = 40\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-date1.cpp, Page no-348" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class date:\n", + " __day=int\n", + " __month=int\n", + " __year=int\n", + " def Set(self, DayIn, MonthIn, YearIn):\n", + " self.__day=DayIn\n", + " self.__month=MonthIn\n", + " self.__year=YearIn\n", + " def show(self):\n", + " print \"%s-%s-%s\" %(self.__day, self.__month, self.__year)\n", + "d1=date()\n", + "d2=date()\n", + "d3=date()\n", + "d1.Set(26, 3, 1958)\n", + "d2.Set(14, 4, 1971)\n", + "d3.Set(1, 9, 1973)\n", + "print \"Birth Date of First Author: \",\n", + "d1.show()\n", + "print \"Birth Date of Second Author: \",\n", + "d2.show()\n", + "print \"Birth Date of Third Author: \",\n", + "d3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth Date of First Author: 26-3-1958\n", + "Birth Date of Second Author: 14-4-1971\n", + "Birth Date of Third Author: 1-9-1973\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-date2.cpp, Page no-350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Set(self, DayIn, MonthIn, YearIn):\n", + " self.__day=DayIn\n", + " self.__month=MonthIn\n", + " self.__year=YearIn\n", + "def show(self):\n", + " print \"%s-%s-%s\" %(self.__day, self.__month, self.__year)\n", + "class date:\n", + " __day=int\n", + " __month=int\n", + " __year=int\n", + " Set=Set #definiton of member function outside the class\n", + " show=show\n", + "d1=date()\n", + "d2=date()\n", + "d3=date()\n", + "d1.Set(26, 3, 1958)\n", + "d2.Set(14, 4, 1971)\n", + "d3.Set(1, 9, 1973)\n", + "print \"Birth Date of First Author: \",\n", + "d1.show()\n", + "print \"Birth Date of Second Author: \",\n", + "d2.show()\n", + "print \"Birth Date of Third Author: \",\n", + "d3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth Date of First Author: 26-3-1958\n", + "Birth Date of Second Author: 14-4-1971\n", + "Birth Date of Third Author: 1-9-1973\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-date3.cpp, Page no-352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Set(self, DayIn, MonthIn, YearIn):\n", + " self.__day=DayIn\n", + " self.__month=MonthIn\n", + " self.__year=YearIn\n", + "def show(self):\n", + " print self.__day, \"-\", self.__month, \"-\", self.__year\n", + "class date:\n", + " __day=int\n", + " __month=int\n", + " __year=int\n", + " Set=Set\n", + " show=show\n", + "d1=date()\n", + "d2=date()\n", + "d3=date()\n", + "d1.Set(26, 3, 1958)\n", + "d2.Set(14, 4, 1971)\n", + "d3.Set(1, 9, 1973)\n", + "print \"Birth Date of First Author: \",\n", + "d1.show()\n", + "print \"Birth Date of Second Author: \",\n", + "d2.show()\n", + "print \"Birth Date of Third Author: \",\n", + "d3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth Date of First Author: 26 - 3 - 1958\n", + "Birth Date of Second Author: 14 - 4 - 1971\n", + "Birth Date of Third Author: 1 - 9 - 1973\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-nesting.cpp, Page no-354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class NumberParis:\n", + " __num1=int\n", + " __num2=int\n", + " def read(self):\n", + " self.__num1=int(raw_input(\"Enter First Number: \"))\n", + " self.__num2=int(raw_input(\"Enter Second Number: \"))\n", + " def Max(self):\n", + " if self.__num1>self.__num2:\n", + " return self.__num1\n", + " else:\n", + " return self.__num2\n", + " def ShowMax(self):\n", + " print \"Maximum =\", self.Max() #invoking a member function in another member function\n", + "n1=NumberParis()\n", + "n1.read()\n", + "n1.ShowMax()" + ], + "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: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum = 10\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-part.cpp, Page no-355" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class part:\n", + " __ModelNum=int #private members\n", + " __PartNum=int\n", + " __cost=float\n", + " def SetPart(self, mn, pn, c):\n", + " self.__ModelNum=mn\n", + " self.__PartNum=pn\n", + " self.__cost=c\n", + " def ShowPart(self):\n", + " print \"Model:\", self.__ModelNum\n", + " print \"Part:\", self.__PartNum\n", + " print \"Cost:\", self.__cost\n", + "p1=part()\n", + "p2=part()\n", + "p1.SetPart(1996, 23, 1250.55)\n", + "p2.SetPart(2000, 243, 2354.75)\n", + "print \"First Part Details...\"\n", + "p1.ShowPart()\n", + "print \"Second Part Details...\"\n", + "p2.ShowPart()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First Part Details...\n", + "Model: 1996\n", + "Part: 23\n", + "Cost: 1250.55\n", + "Second Part Details...\n", + "Model: 2000\n", + "Part: 243\n", + "Cost: 2354.75\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector.cpp, Page no-361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def read(self):\n", + " for i in range(self._vector__sz):\n", + " print \"Enter vector [\", i, \"]? \",\n", + " self._vector__v[i]=int(raw_input())\n", + "def show_sum(self):\n", + " Sum=0\n", + " for i in range(self._vector__sz):\n", + " Sum+=self._vector__v[i]\n", + " print \"Vector sum =\", Sum\n", + "class vector:\n", + " __v=[int] #array of type integer\n", + " __sz=int\n", + " def VectorSize(self, size):\n", + " self.__sz= size\n", + " self.__v=[int]*size #dynamically allocating size to integer array\n", + " def release(self):\n", + " del self.__v\n", + " read=read\n", + " show_sum=show_sum\n", + "v1=vector()\n", + "count=int(raw_input(\"How many elements are there in the vector: \"))\n", + "v1.VectorSize(count)\n", + "v1.read()\n", + "v1.show_sum()\n", + "v1.release()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many elements are there in the vector: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter vector [ 0 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 1 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 2 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 3 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 4 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Vector sum = 15\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-distance.cpp, Page no-363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class distance:\n", + " __feet=float\n", + " __inches=float\n", + " def init(self, ft, In):\n", + " self.__feet=ft\n", + " self.__inches=In\n", + " def read(self):\n", + " self.__feet=float(raw_input(\"Enter feet: \"))\n", + " self.__inches=float(raw_input(\"Enter inches: \"))\n", + " def show(self):\n", + " print self.__feet, \"\\'-\", self.__inches, \"\\\"\"\n", + " def add(self, d1, d2):\n", + " self.__feet=d1.__feet+d2.__feet\n", + " self.__inches=d1.__inches+d2.__inches\n", + " if self.__inches>=12:\n", + " self.__feet=self.__feet+1\n", + " self.__inches=self.__inches-12\n", + "d1=distance()\n", + "d2=distance()\n", + "d3=distance()\n", + "d2.init(11, 6.25)\n", + "d1.read()\n", + "print \"d1=\",\n", + "d1.show()\n", + "print \"d2=\",\n", + "d2.show()\n", + "d3.add(d1,d2)\n", + "print \"d3 = d1+d2 =\",\n", + "d3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter feet: 12.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter inches: 7.25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d1= 12.0 '- 7.25 \"\n", + "d2= 11 '- 6.25 \"\n", + "d3 = d1+d2 = 24.0 '- 1.5 \"\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-account.cpp, Page no-365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def MoneyTransfer(self, acc , amount): # passing objects as parameters\n", + " self._AccClass__balance=self._AccClass__balance-amount\n", + " acc._AccClass__balance=acc._AccClass__balance + amount\n", + "class AccClass:\n", + " __accno=int\n", + " __balance=float\n", + " def setdata(self, an, bal=0.0):\n", + " self.accno=an\n", + " self.__balance=bal\n", + " def getdata(self):\n", + " self.accno=raw_input(\"Enter account number for acc1 object: \")\n", + " self.__balance=float(raw_input(\"Enter the balance: \"))\n", + " def display(self):\n", + " print \"Acoount number is: \", self.accno\n", + " print \"Balance is: \", self.__balance\n", + " MoneyTransfer=MoneyTransfer\n", + "acc1=AccClass()\n", + "acc2=AccClass()\n", + "acc3=AccClass()\n", + "acc1.getdata()\n", + "acc2.setdata(10)\n", + "acc3.setdata(20, 750.5)\n", + "print \"Acoount information...\"\n", + "acc1.display()\n", + "acc2.display()\n", + "acc3.display()\n", + "trans_money=float(raw_input(\"How much money is to be transferred from acc3 to acc1: \"))\n", + "acc3.MoneyTransfer(acc1, trans_money)\n", + "print \"Updated information about accounts...\"\n", + "acc1.display()\n", + "acc2.display()\n", + "acc3.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter account number for acc1 object: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the balance: 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acoount information...\n", + "Acoount number is: 1\n", + "Balance is: 100.0\n", + "Acoount number is: 10\n", + "Balance is: 0.0\n", + "Acoount number is: 20\n", + "Balance is: 750.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How much money is to be transferred from acc3 to acc1: 200\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Updated information about accounts...\n", + "Acoount number is: 1\n", + "Balance is: 300.0\n", + "Acoount number is: 10\n", + "Balance is: 0.0\n", + "Acoount number is: 20\n", + "Balance is: 550.5\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex.cpp, Page no-367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "def add (self, c2): #objects as parameters \n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real Part ? \"))\n", + " self.__imag=float(raw_input(\"Imag Part ? \"))\n", + " def outdata(self, msg):\n", + " print msg, \n", + " print self.__real,\n", + " if self.__imag<0:\n", + " print \"-i\",\n", + " else:\n", + " print \"+i\",\n", + " print math.fabs(self.__imag) #print absolute value\n", + " add=add\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex number c2...\"\n", + "c2.getdata()\n", + "c3=c1.add(c2)\n", + "c3.outdata(\"c3=c1.add(c2):\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real Part ? 1.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag Part ? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real Part ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag Part ? -4.3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c3=c1.add(c2): 4.5 -i 2.3\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-friend1.cpp, Page no-371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class one:\n", + " __data1=int\n", + " def setdata(self, init):\n", + " self.__data1=init\n", + "class two:\n", + " __data2=int\n", + " def setdata(self, init):\n", + " self.__data2=init\n", + "def add_both(a, b): #friend function\n", + " return a._one__data1+b._two__data2\n", + "a=one()\n", + "b=two()\n", + "a.setdata(5)\n", + "b.setdata(10)\n", + "print \"Sum of one and two:\", add_both(a,b)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of one and two: 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-friend2.cpp, Page no-373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class boy:\n", + " __income1=int\n", + " __income2=int\n", + " def setdata(self, in1, in2):\n", + " self.__income1=in1\n", + " self.__income2=in2\n", + "class girl:\n", + " __income=int\n", + " def girlfunc(self, b1):\n", + " return b1._boy__income1+b1._boy__income2\n", + " def setdata(self, In):\n", + " self.__income=In\n", + " def show(self):\n", + " b1=boy()\n", + " b1.setdata(100, 200)\n", + " print \"boy's Income1 in show():\", b1._boy__income1\n", + " print \"girl's income in show():\", self.__income\n", + "b1=boy()\n", + "g1=girl()\n", + "b1.setdata(500, 1000)\n", + "g1.setdata(300)\n", + "print \"boy b1 total income:\", g1.girlfunc(b1)\n", + "g1.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "boy b1 total income: 1500\n", + "boy's Income1 in show(): 100\n", + "girl's income in show(): 300\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-friend3.cpp, Page no-375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def girlfunc(self, b1):\n", + " return b1._boy__income1+b1._boy__income2\n", + "class girl:\n", + " __income=int\n", + " __girlfunc=girlfunc\n", + " def setdata(self, In):\n", + " self.__income=In\n", + " def show(self):\n", + " print \"girl income:\", self.__income\n", + "class boy:\n", + " __income1=int\n", + " __income2=int\n", + " def setdata(self, in1, in2):\n", + " self.__income1=in1\n", + " self.__income2=in2\n", + "b1=boy()\n", + "g1=girl()\n", + "b1.setdata(500, 1000)\n", + "g1.setdata(300)\n", + "print \"boy b1 total income:\", g1._girl__girlfunc(b1)\n", + "g1.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "boy b1 total income: 1500\n", + "girl income: 300\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-constmem.cpp, Page 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self):\n", + " self._Person__name=self._Person__address=self._Person__phone=0\n", + "def clear(self):\n", + " del self._Person__name\n", + " del self._Person__address\n", + " del self._Person__phone\n", + "def setname(self, Str):\n", + " if self._Person__name:\n", + " del self._Person__name\n", + " self._Person__name=Str\n", + "def setaddress(self, Str):\n", + " if self._Person__address:\n", + " del self._Person__address\n", + " self._Person__address=Str\n", + "def setphone(self, Str):\n", + " if self._Person__phone:\n", + " del self._Person__phone\n", + " self._Person__phone=Str\n", + "def getname(self):\n", + " return self._Person__name\n", + "def getaddress(self):\n", + " return self._Person__address\n", + "def getphone(self):\n", + " return self._Person__phone\n", + "def printperson(p):\n", + " if p.getname():\n", + " print \"Name :\", p.getname()\n", + " if p.getaddress():\n", + " print \"Address :\", p.getaddress()\n", + " if p.getphone():\n", + " print \"Phone :\", p.getphone()\n", + "class Person:\n", + " __name=str\n", + " __address=str\n", + " __phone=str\n", + " __init__=__init__\n", + " clear=clear\n", + " setname=setname\n", + " setaddress=setaddress\n", + " setphone=setphone\n", + " getname=getname\n", + " getaddress=getaddress\n", + " getphone=getphone\n", + "p1=Person()\n", + "p2=Person()\n", + "p1.setname(\"Rajkumar\")\n", + "p1.setaddress(\"Email: rajacdacb.ernet.in\")\n", + "p1.setphone(\"90-080-5584271\")\n", + "printperson(p1)\n", + "p2.setname(\"Venugopal K R\")\n", + "p2.setaddress(\"Bangalore University\")\n", + "p2.setphone(\"-not sure-\")\n", + "printperson(p2)\n", + "p1.clear()\n", + "p2.clear()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name : Rajkumar\n", + "Address : Email: rajacdacb.ernet.in\n", + "Phone : 90-080-5584271\n", + "Name : Venugopal K R\n", + "Address : Bangalore University\n", + "Phone : -not sure-\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-count.cpp, Page no-382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class MyClass():\n", + " __count=[int]#static member\n", + " __number=int\n", + " def set(self, num):\n", + " self.__number=num\n", + " self.__count[0]+=1\n", + " def show(self):\n", + " print \"Number of calls made to 'set()' through any object:\", self.__count[0]\n", + "obj1=MyClass()\n", + "obj1._MyClass__count[0]=0\n", + "obj1.show()\n", + "obj1.set(100)\n", + "obj1.show()\n", + "obj2=MyClass()\n", + "obj3=MyClass()\n", + "obj2.set(200)\n", + "obj2.show()\n", + "obj2.set(250)\n", + "obj3.set(300)\n", + "obj1.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of calls made to 'set()' through any object: 0\n", + "Number of calls made to 'set()' through any object: 1\n", + "Number of calls made to 'set()' through any object: 2\n", + "Number of calls made to 'set()' through any object: 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-dirs.cpp, Page no-384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Directory:\n", + " __path=[str] #static member\n", + " def setpath(self, newpath):\n", + " self.__path[0]=newpath\n", + "Directory()._Directory__path[0]=\"/usr/raj\"\n", + "print \"Path:\", Directory()._Directory__path[0]\n", + "Directory().setpath(\"/usr\")\n", + "print \"Path:\", Directory()._Directory__path[0]\n", + "dir=Directory()\n", + "dir.setpath(\"/etc\")\n", + "print \"Path:\", dir._Directory__path[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Path: /usr/raj\n", + "Path: /usr\n", + "Path: /etc\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-389" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " __emp_no=int\n", + " __emp_name=[None]*25\n", + " def accept(self, i, j):\n", + " self.__emp_no=i\n", + " self.__emp_name=j\n", + " def display(self):\n", + " print \"Employee Number:\", self.__emp_no,\"\\tEmployee Name:\",self.__emp_name\n", + "e=[]*5\n", + "for i in range(5):\n", + " e.append(employee())\n", + "print \"Enter the details for five employees: \"\n", + "for i in range(5):\n", + " no=int(raw_input(\"Number: \"))\n", + " name=raw_input(\"Name: \")\n", + " e[i].accept(no, name)\n", + "print \"*****Employee Details*****\"\n", + "for i in range(5):\n", + " e[i].display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the details for five employees: \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Vishwanathan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Archana\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Prasad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Sarthak\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Ganeshan\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "*****Employee Details*****\n", + "Employee Number: 1 \tEmployee Name: Vishwanathan\n", + "Employee Number: 2 \tEmployee Name: Archana\n", + "Employee Number: 3 \tEmployee Name: Prasad\n", + "Employee Number: 4 \tEmployee Name: Sarthak\n", + "Employee Number: 5 \tEmployee Name: Ganeshan\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter11-ObjectInitializationAndClean-Up_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter11-ObjectInitializationAndClean-Up_1.ipynb new file mode 100755 index 00000000..e8f510a1 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter11-ObjectInitializationAndClean-Up_1.ipynb @@ -0,0 +1,1781 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:daf00031bcc29ced764c693239a5bacfba6d7f22c75e738fbcf7b0290dee3513" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Object Initialization and clean up" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- bag.cpp, Page-392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_ITEMS=25\n", + "def show(self):\n", + " for i in range(self.ItemCount):\n", + " print self._Bag__contents[i],\n", + "class Bag:\n", + " __contents=[int]*MAX_ITEMS\n", + " __ItemCount=int\n", + " def SetEmpty(self):\n", + " self.ItemCount=0\n", + " def put(self,item):\n", + " self._Bag__contents[self.ItemCount]=item\n", + " self.ItemCount+=1\n", + " show=show\n", + "bag=Bag() #object of class Bag\n", + "bag.SetEmpty() #initialize the object\n", + "while 1:\n", + " item=int(raw_input(\"\\nEnter Item Number to be put into the bag <0-no item>: \"))\n", + " if item==0:\n", + " break\n", + " bag.put(item)\n", + " print \"Items in bag:\",\n", + " bag.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in bag: 1" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3 2" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3 2 4" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- newbag.cpp, Page-395" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_ITEMS=25 #size of array contents\n", + "def show(self):\n", + " for i in range(self.ItemCount):\n", + " print self._Bag__contents[i],\n", + "class Bag:\n", + " __contents=[int]*MAX_ITEMS #int 1D array\n", + " __ItemCount=int\n", + " def __init__(self): #Constructor\n", + " self.ItemCount=0\n", + " def put(self,item): #member function defined inside the class\n", + " self._Bag__contents[self.ItemCount]=item\n", + " self.ItemCount+=1\n", + " show=show #member function defined outside the class\n", + "bag=Bag() #object of class Bag\n", + "while 1:\n", + " item=int(raw_input(\"\\nEnter Item Number to be put into the bag <0-no item>: \"))\n", + " if item==0:\n", + " break\n", + " bag.put(item)\n", + " print \"Items in bag:\",\n", + " bag.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in bag: 1" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3 2" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag: 1 3 2 4" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-test1.cpp, Page-396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self):\n", + " print \"Constructor of class test called\"\n", + "class Test:\n", + " __init__=__init__ #Constructor\n", + "G=Test()\n", + "def func():\n", + " L=Test()\n", + " print \"Here's function func()\"\n", + "X=Test()\n", + "print \"main() function\"\n", + "func()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor of class test called\n", + "Constructor of class test called\n", + "main() function\n", + "Constructor of class test called\n", + "Here's function func()\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- giftbag.cpp, Page- 398" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_ITEMS=25\n", + "def show(self):\n", + " if self.ItemCount:\n", + " for i in range(self.ItemCount):\n", + " print self._Bag__contents[i],\n", + " else:\n", + " print \"Nil\"\n", + "class Bag:\n", + " __contents=[int]*MAX_ITEMS\n", + " __ItemCount=int\n", + " def __init__(self, item=None): #parameterized constructor: Python does not support overloading of functions\n", + " if isinstance(item, int):\n", + " self._Bag__contents[0]=item\n", + " self.ItemCount=1\n", + " else:\n", + " self.ItemCount=0\n", + " def put(self,item):\n", + " self._Bag__contents[self.ItemCount]=item\n", + " self.ItemCount+=1\n", + " show=show\n", + "bag1=Bag()\n", + "bag2=Bag(4) #object created using the parameterized constructor\n", + "print \"Gifted bag1 initially has:\",\n", + "bag1.show()\n", + "print \"Gifted bag2 initially has:\",\n", + "bag2.show()\n", + "while 1:\n", + " item=int(raw_input(\"\\nEnter Item Number to be put into the bag <0-no item>: \"))\n", + " if item==0:\n", + " break\n", + " bag2.put(item)\n", + " print \"Items in bag2:\",\n", + " bag2.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gifted bag1 initially has: Nil\n", + "Gifted bag2 initially has: 4" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag2: 4 1" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag2: 4 1 2" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Items in bag2: 4 1 2 3" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "Enter Item Number to be put into the bag <0-no item>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-test.cpp, Page-400 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self):\n", + " print \"Constructor of class Test called\"\n", + "def __del__(self):\n", + " print \"Destructor of class Test called\"\n", + "class Test:\n", + " __init__=__init__ #Constructor\n", + " __del__=__del__ #Destructor\n", + "x=Test()\n", + "print \"Terminating main\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor of class Test called\n", + "Destructor of class Test called\n", + "Terminating main\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-count.cpp, Page-401" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "nobjects=0\n", + "nobj_alive=0\n", + "class MyClass:\n", + " def __init__(self):\n", + " global nobjects #using the global nobjects\n", + " global nobj_alive #using the global nobj_alive\n", + " nobjects+=1\n", + " nobj_alive+=1\n", + " def __del__(self):\n", + " global nobj_alive #using the global nobjects\n", + " nobj_alive-=1\n", + " def show(self):\n", + " global nobjects\n", + " global nobj_alive\n", + " print \"Total number of objects created: \", nobjects\n", + " print \"Number of objects currently alive: \", nobj_alive\n", + "obj1=MyClass()\n", + "obj1.show()\n", + "def func():\n", + " obj1=MyClass()\n", + " obj2=MyClass()\n", + " obj2.show()\n", + " del obj1\n", + " del obj2\n", + "func()\n", + "obj1.show()\n", + "obj2=MyClass()\n", + "obj3=MyClass()\n", + "obj2.show()\n", + "del obj1\n", + "del obj2\n", + "del obj3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total number of objects created: 1\n", + "Number of objects currently alive: 1\n", + "Total number of objects created: 3\n", + "Number of objects currently alive: 3\n", + "Total number of objects created: 3\n", + "Number of objects currently alive: 1\n", + "Total number of objects created: 5\n", + "Number of objects currently alive: 3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-account.cpp, Page- 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def MoneyTransfer(self, acc , amount):\n", + " self._AccClass__balance=self._AccClass__balance-amount\n", + " acc._AccClass__balance=acc._AccClass__balance + amount\n", + "class AccClass:\n", + " __accno=int\n", + " __balance=float\n", + " def __init__(self, an=None, bal=0.0):\n", + " if isinstance(an, int):\n", + " self.accno=an\n", + " self.__balance=bal\n", + " else:\n", + " self.accno=raw_input(\"Enter account number for acc1 object: \")\n", + " self.__balance=float(raw_input(\"Enter the balance: \"))\n", + " def display(self):\n", + " print \"Acoount number is: \", self.accno\n", + " print \"Balance is: \", self.__balance\n", + " MoneyTransfer=MoneyTransfer\n", + "acc1=AccClass()\n", + "acc2=AccClass(10)\n", + "acc3=AccClass(20, 750.5)\n", + "print \"Acoount information...\"\n", + "acc1.display()\n", + "acc2.display()\n", + "acc3.display()\n", + "trans_money=float(raw_input(\"How much money is to be transferred from acc3 to acc1: \"))\n", + "acc3.MoneyTransfer(acc1, trans_money)\n", + "print \"Updated information about accounts...\"\n", + "acc1.display()\n", + "acc2.display()\n", + "acc3.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter account number for acc1 object: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the balance: 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acoount information...\n", + "Acoount number is: 1\n", + "Balance is: 100.0\n", + "Acoount number is: 10\n", + "Balance is: 0.0\n", + "Acoount number is: 20\n", + "Balance is: 750.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How much money is to be transferred from acc3 to acc1: 200\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Updated information about accounts...\n", + "Acoount number is: 1\n", + "Balance is: 300.0\n", + "Acoount number is: 10\n", + "Balance is: 0.0\n", + "Acoount number is: 20\n", + "Balance is: 550.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-test2.cpp. Page- 405" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self, NameIn=None):\n", + " if isinstance(NameIn, str):\n", + " self.name=NameIn\n", + " print \"Test Object \", NameIn, \" created\"\n", + " else:\n", + " self.name=\"unnamed\"\n", + " print \"Test object 'unnamed' created\"\n", + "def __del__(self):\n", + " print \"Test Object \", self.name, \" destroyed\"\n", + " del self.name\n", + "class Test:\n", + " __name=[str]\n", + " __init__=__init__\n", + " __del__=__del__\n", + "g=Test(\"global\")\n", + "def func():\n", + " l=Test(\"func\")\n", + " print \"here's function func()\"\n", + "x=Test(\"main\")\n", + "func()\n", + "print \"main() function - termination\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Test Object global created\n", + "Test Object global destroyed\n", + "Test Object main created\n", + "Test Object main destroyed\n", + "Test Object func created\n", + "here's function func()\n", + "Test Object func destroyed\n", + "main() function - termination\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex1.cpp, Page- 407" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "def add (self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self, real_in=None, imag_in=0.0):\n", + " if isinstance(real_in, float):\n", + " self.__real=real_in\n", + " self.__imag=imag_in\n", + " else:\n", + " self.__real=self.__imag=0.0\n", + " def show(self, msg):\n", + " print msg, \n", + " print self.__real,\n", + " if self.__imag<0:\n", + " print \"-i\",\n", + " else:\n", + " print \"+i\",\n", + " print math.fabs(self.__imag) #print absolute value\n", + " add=add\n", + "c1=Complex(1.5,2.0)\n", + "c2=Complex(2.2)\n", + "c3=Complex()\n", + "c1.show(\"c1=\")\n", + "c2.show(\"c2=\")\n", + "c3=c1.add(c2)\n", + "c3.show(\"c3=c1.add(c2):\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c1= 1.5 +i 2.0\n", + "c2= 2.2 +i 0.0\n", + "c3=c1.add(c2): 3.7 +i 2.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- noname.cpp, Page- 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class nameless:\n", + " __a=int\n", + " def __init__(self):\n", + " print \"Constructor\"\n", + " def __del__(self):\n", + " print \"Destructor\"\n", + "nameless() #nameless object created\n", + "n1=nameless()\n", + "n2=nameless()\n", + "print \"Program terminates\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor\n", + "Destructor\n", + "Constructor\n", + "Destructor\n", + "Constructor\n", + "Destructor\n", + "Program terminates\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-name.cpp, Page-411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show(self, msg):\n", + " print msg\n", + " print \"First Name: \", self._name__first\n", + " if self._name__middle[0]:\n", + " print \"Middle Name: \", self._name__middle\n", + " if self._name__last[0]:\n", + " print \"Last Name: \", self._name__last\n", + "class name:\n", + " __first=[None]*15\n", + " __middle=[None]*15\n", + " __last=[None]*15\n", + " def __init__(self, FirstName=None, MiddleName=None, LastName=None):\n", + " if isinstance(LastName, str):\n", + " self.__last=LastName\n", + " self.__middle=MiddleName\n", + " self.__first=FirstName\n", + " elif isinstance(MiddleName, str):\n", + " self.__middle=MiddleName\n", + " self.__first=FirstName\n", + " elif isinstance(FirstName, str):\n", + " self.__first=FirstName\n", + " else:\n", + " self.__last='\\0' #initialized to NULL\n", + " self.__middle='\\0'\n", + " self.__first='\\0'\n", + " show=show\n", + "n1=name()\n", + "n2=name()\n", + "n3=name()\n", + "n1=name(\"Rajkumar\")\n", + "n2=name(\"Savithri\", \"S\")\n", + "n3=name(\"Veugopal\", \"K\", \"R\")\n", + "n1.show(\"First prson details...\")\n", + "n2.show(\"Second prson details...\")\n", + "n3.show(\"Third prson details...\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First prson details...\n", + "First Name: Rajkumar\n", + "Second prson details...\n", + "First Name: Savithri\n", + "Middle Name: S\n", + "Third prson details...\n", + "First Name: Veugopal\n", + "Middle Name: K\n", + "Last Name: R\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector1.cpp, Page-413" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def read(self):\n", + " for i in range(self._vector__sz):\n", + " print \"Enter vector [\", i, \"]? \",\n", + " self._vector__v[i]=int(raw_input())\n", + "def show_sum(self):\n", + " Sum=0\n", + " for i in range(self._vector__sz):\n", + " Sum+=self._vector__v[i]\n", + " print \"Vector sum= \", Sum\n", + "class vector:\n", + " __v=[int] #array of type integer\n", + " __sz=int\n", + " def __init__(self, size):\n", + " self.__sz= size\n", + " self.__v=[int]*size #dynamically allocating size to integer array\n", + " def __del__(self):\n", + " del self.__v\n", + " read=read\n", + " show_sum=show_sum\n", + "count = int\n", + "count=int(raw_input(\"How many elements are there in the vector: \"))\n", + "v1= vector(count)\n", + "v1.read()\n", + "v1.show_sum()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many elements are there in the vector: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter vector [ 0 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 1 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 2 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 3 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter vector [ 4 ]? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Vector sum= 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector2.cpp, Page-415" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show(self):\n", + " for i in range(self._vector__size):\n", + " print self.elem(i), \", \",\n", + "class vector:\n", + " __v=[int]\n", + " __size=int\n", + " def __init__(self, vector_size):\n", + " if isinstance(vector_size, int):\n", + " self.__size= vector_size\n", + " self.__v=[int]*vector_size\n", + " else:\n", + " print \"Copy construcor invoked\"\n", + " self.__size=vector_size.__size\n", + " self.__v=[int]*vector_size.__size\n", + " for i in range(vector_size.__size):\n", + " self.__v[i]=vector_size.__v[i]\n", + " def elem(self,i):\n", + " if i>=self.__size:\n", + " print \"Error: Out of Range\"\n", + " return -1\n", + " return self.__v[i]\n", + " def __del__(self):\n", + " del self.__v\n", + " show=show\n", + "v1=vector(5)\n", + "v2=vector(5)\n", + "for i in range(5):\n", + " if v2.elem(i)!=-1:\n", + " v2._vector__v[i]=i+1\n", + "v1=v2\n", + "v3=vector(v2)\n", + "print \"Vector v1: \",\n", + "v1.show()\n", + "print \"\\nvector v2: \",\n", + "v2.show()\n", + "print \"\\nvector v3: \",\n", + "v3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Copy construcor invoked\n", + "Vector v1: 1 , 2 , 3 , 4 , 5 , \n", + "vector v2: 1 , 2 , 3 , 4 , 5 , \n", + "vector v3: 1 , 2 , 3 , 4 , 5 , \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-matrix.cpp, Page-418" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "TRUE=1\n", + "FALSE=0\n", + "def __del__(self):\n", + " for i in range(self._matrix__MaxRow):\n", + " del self._matrix__p[i]\n", + " del self._matrix__p\n", + "def add(self, a, b):\n", + " self._matrix__MaxRow=a._matrix__MaxRow\n", + " self._matrix__MaxCol=a._matrix__MaxCol\n", + " if (a._matrix__MaxRow!=b._matrix__MaxRow)|(a._matrix__MaxCol!=b._matrix__MaxCol):\n", + " print \"Error: invalid matrix order for addition\"\n", + " return\n", + " for i in range(self._matrix__MaxRow):\n", + " for j in range(self._matrix__MaxCol):\n", + " self._matrix__p[i][j]=a._matrix__p[i][j]+b._matrix__p[i][j]\n", + "def sub(self, a, b):\n", + " self._matrix__MaxRow=a._matrix__MaxRow\n", + " self._matrix__MaxCol=a._matrix__MaxCol\n", + " if (a._matrix__MaxRow!=b._matrix__MaxRow)|(a._matrix__MaxCol!=b._matrix__MaxCol):\n", + " print \"Error: invalid matrix order for subtraction\"\n", + " return\n", + " for i in range(self._matrix__MaxRow):\n", + " for j in range(self._matrix__MaxCol):\n", + " self._matrix__p[i][j]=a._matrix__p[i][j]-b._matrix__p[i][j]\n", + "def mul(self, a, b):\n", + " self._matrix__MaxRow=a._matrix__MaxRow\n", + " self._matrix__MaxCol=a._matrix__MaxCol\n", + " if (a._matrix__MaxCol!=b._matrix__MaxRow):\n", + " print \"Error: invalid matrix order for multiplication\"\n", + " return\n", + " for i in range(a._matrix__MaxRow):\n", + " for j in range(b._matrix__MaxCol):\n", + " self._matrix__p[i][j]=0\n", + " for k in range(a._matrix__MaxCol):\n", + " self._matrix__p[i][j]+=a._matrix__p[i][j]*b._matrix__p[i][j]\n", + "def eql(self, b):\n", + " for i in range(self._matrix__MaxRow):\n", + " for j in range(self._matrix__MaxCol):\n", + " if self._matrix__p[i][i]!=b._matrix__p[i][j]:\n", + " return 0\n", + " return 1\n", + "def read(self):\n", + " self._matrix__p = []\n", + " for i in range(self._matrix__MaxRow):\n", + " self._matrix__p.append([])\n", + " for j in range(self._matrix__MaxCol):\n", + " print \"Matrix[%d,%d] =? \" %(i, j),\n", + " self._matrix__p[i].append(int(raw_input()))\n", + "def show(self):\n", + " for i in range(self._matrix__MaxRow):\n", + " for j in range(self._matrix__MaxCol):\n", + " print self._matrix__p[i][j], \" \",\n", + " print \"\"\n", + "class matrix:\n", + " __MaxRow=int\n", + " __MaxCol=int\n", + " __p=[int]\n", + " def __init__(self, row=0, col=0):\n", + " self.__MaxRow=row\n", + " self.__MaxCol=col\n", + " if row>0:\n", + " self.__p=[[int]*self.__MaxCol]*self.__MaxRow\n", + " __del__=__del__\n", + " read=read\n", + " show=show\n", + " add=add\n", + " sub=sub\n", + " mul=mul\n", + " eql=eql\n", + "print \"Enter Matrix A details...\"\n", + "m=int(raw_input(\"How many rows? \"))\n", + "n=int(raw_input(\"How many columns? \"))\n", + "a=matrix(m,n)\n", + "a.read()\n", + "print \"Enter Matrix B details...\"\n", + "p=int(raw_input(\"How many rows? \"))\n", + "q=int(raw_input(\"How many columns? \"))\n", + "b=matrix(p,q)\n", + "b.read()\n", + "print \"Matrix A is...\"\n", + "a.show()\n", + "print \"Matrix B is...\"\n", + "b.show()\n", + "c=matrix(m,n)\n", + "c.add(a,b)\n", + "print \"C=A+B...\"\n", + "c.show()\n", + "d=matrix(m,n)\n", + "d.sub(a,b)\n", + "print \"D=A-B...\"\n", + "d.show()\n", + "e=matrix(m,q)\n", + "e.mul(a,b)\n", + "print \"E=A*B...\"\n", + "e.show()\n", + "print \"(Is matrix A equal to matrix B)? \",\n", + "if(a.eql(b)):\n", + " print \"Yes\"\n", + "else:\n", + " print \"No\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Matrix A details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns? 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[0,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[0,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[0,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Matrix B details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns? 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[0,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[0,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[0,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[2,2] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix A is...\n", + "2 2 2 \n", + "2 2 2 \n", + "2 2 2 \n", + "Matrix B is...\n", + "1 1 1 \n", + "1 1 1 \n", + "1 1 1 \n", + "C=A+B...\n", + "3 3 3 \n", + "3 3 3 \n", + "3 3 3 \n", + "D=A-B...\n", + "1 1 1 \n", + "1 1 1 \n", + "1 1 1 \n", + "E=A*B...\n", + "6 6 6 \n", + "6 6 6 \n", + "6 6 6 \n", + "(Is matrix A equal to matrix B)? No\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-person.cpp, Page-423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self, NameIn, AddressIn, PhoneIn):\n", + " self._Person__name=NameIn\n", + " self._Person__address=AddressIn\n", + " self._Person__phone=PhoneIn\n", + "#inline\n", + "def __del__(self):\n", + " del self._Person__name\n", + " del self._Person__address\n", + " del self._Person__phone\n", + "def getname(self):\n", + " return self._Person__name\n", + "def getaddress(self):\n", + " return self._Person__address\n", + "def getphone(self):\n", + " return self._Person__phone\n", + "def changename(self, NameIn):\n", + " if(self._Person__name):\n", + " del self._Person__name\n", + " self._Person__name=NameIn\n", + "class Person:\n", + " __name=[str]\n", + " __address=[str]\n", + " __phone=[str]\n", + " __init__=__init__\n", + " __del__=__del__\n", + " getname=getname\n", + " getaddress=getaddress\n", + " getphone=getphone\n", + " changename=changename\n", + "def printperson(p):\n", + " if(p.getname()):\n", + " print \"Name: \", p.getname()\n", + " if(p.getaddress()):\n", + " print \"Address: \", p.getaddress()\n", + " if(p.getphone()):\n", + " print \"Phone: \", p.getphone()\n", + "me=Person(\"Rajkumar\", \"E-mail: raj@cdabc.erne.in\", \"91-080-5584271\")\n", + "printperson(me)\n", + "you=Person(\"XYZ\", \"-not sure-\", \"-not sure-\")\n", + "print \"You XYZ by default...\"\n", + "printperson(you)\n", + "you.changename(\"ABC\")\n", + "print \"You changed XYZ to ABC...\"\n", + "printperson(you)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Rajkumar\n", + "Address: E-mail: raj@cdabc.erne.in\n", + "Phone: 91-080-5584271\n", + "You XYZ by default...\n", + "Name: XYZ\n", + "Address: -not sure-\n", + "Phone: -not sure-\n", + "You changed XYZ to ABC...\n", + "Name: ABC\n", + "Address: -not sure-\n", + "Phone: -not sure-\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-graph.cpp, Page-425" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __init__(self):\n", + " if(self._Graphics__nobjects[0]==False):\n", + " self._Graphics__setgraphicsmode()\n", + " self._Graphics__nobjects[0]+=1\n", + "def __del__(self):\n", + " self._Graphics__nobjects[0]-=1\n", + " if(self._Graphics__nobjects[0]==False):\n", + " self._Graphics__settextmode()\n", + "class Graphics:\n", + " __nobjects=[0]\n", + " def __setgraphicsmode(self):\n", + " pass\n", + " def __settextmode(self):\n", + " pass\n", + " __init__=__init__\n", + " __del__=__del__\n", + " def getcount(self):\n", + " return self.__nobjects[0]\n", + "def my_func():\n", + " obj=Graphics()\n", + " print \"No. of Graphics' objects while in my_func=\", obj.getcount()\n", + "obj1=Graphics()\n", + "print \"No. of Graphics' objects before in my_func=\", obj1.getcount()\n", + "my_func()\n", + "print \"No. of Graphics' objects after in my_func=\", obj1.getcount()\n", + "obj2=Graphics()\n", + "obj3=Graphics()\n", + "obj4=Graphics()\n", + "print \"Value of static member nobjects after all 3 more objects...\"\n", + "print \"In obj1= \", obj1.getcount()\n", + "print \"In obj2= \", obj2.getcount()\n", + "print \"In obj3= \", obj3.getcount()\n", + "print \"In obj4= \", obj4.getcount()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of Graphics' objects before in my_func= 1\n", + "No. of Graphics' objects while in my_func= 2\n", + "No. of Graphics' objects after in my_func= 1\n", + "Value of static member nobjects after all 3 more objects...\n", + "In obj1= 4\n", + "In obj2= 4\n", + "In obj3= 4\n", + "In obj4= 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page-428" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def distance(self, a, b):\n", + " self.x=a.x-b.x\n", + " self.y=a.y-b.y\n", + "def display(self):\n", + " print \"x= \",self.x\n", + " print \"y= \", self.y\n", + "class point:\n", + " __x=int\n", + " __y=int\n", + " def __init__(self, a=None, b=None):\n", + " if isinstance(a, int):\n", + " self.x=a\n", + " self.y=b\n", + " else:\n", + " self.x=self.y=0\n", + " def __del__(self):\n", + " pass\n", + " distance=distance\n", + " display=display\n", + "p1=point(40,18)\n", + "p2=point(12,9)\n", + "p3=point()\n", + "p3.distance(p1,p2)\n", + "print \"Coordinates of P1: \"\n", + "p1.display()\n", + "print \"Coordinates of P2: \"\n", + "p2.display()\n", + "print \"distance between P1 and P2: \"\n", + "p3.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coordinates of P1: \n", + "x= 40\n", + "y= 18\n", + "Coordinates of P2: \n", + "x= 12\n", + "y= 9\n", + "distance between P1 and P2: \n", + "x= 28\n", + "y= 9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page-430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def display(self):\n", + " print \"a =\", self.a,\n", + " print \"b =\", self.b\n", + "class data:\n", + " __a=int\n", + " __b=float\n", + " def __init__(self, x=None, y=None):\n", + " if isinstance(x, int):\n", + " self.a=x\n", + " self.b=y\n", + " elif isinstance(x, data):\n", + " self.a=x.a\n", + " self.b=x.b\n", + " else:\n", + " self.a=0\n", + " self.b=0\n", + " display=display\n", + "d1=data()\n", + "d2=data(12,9.9)\n", + "d3=data(d2)\n", + "print \"For default constructor: \"\n", + "d1.display()\n", + "print\"For parameterized constructor: \"\n", + "d2.display()\n", + "print \"For Copy Constructor: \"\n", + "d3.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For default constructor: \n", + "a = 0 b = 0\n", + "For parameterized constructor: \n", + "a = 12 b = 9.9\n", + "For Copy Constructor: \n", + "a = 12 b = 9.9\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter12-DynamicObjects_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter12-DynamicObjects_1.ipynb new file mode 100755 index 00000000..2f8d1022 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter12-DynamicObjects_1.ipynb @@ -0,0 +1,1589 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fa9552ed51e712cfcebb68ace46e3f3dfa1346a1b04ccf69bb0b5d56c912b64c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12-Dynamic Objects" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptrobj1.cpp, Page no-435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, POINTER\n", + "class someclass(Structure):\n", + " data1=int\n", + " data2=chr\n", + " def __init__(self):\n", + " print 'Constructor someclass() is invoked'\n", + " self.data1=1\n", + " self.data2='A'\n", + " def __del__(self):\n", + " print 'Destructor ~someclass() is invoked'\n", + " def show(self):\n", + " print 'data1 =', self.data1,\n", + " print 'data2 =', self.data2\n", + "object1=someclass() #object of class someclass\n", + "ptr=POINTER(someclass) #pointer of type class someclass\n", + "ptr=object1 #pointer pointing to object of class someclass\n", + "print \"Accessing object through object1.show()...\"\n", + "object1.show()\n", + "print \"Accessing object through ptr->show()...\"\n", + "ptr.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor someclass() is invoked\n", + "Destructor ~someclass() is invoked\n", + "Accessing object through object1.show()...\n", + "data1 = 1 data2 = A\n", + "Accessing object through ptr->show()...\n", + "data1 = 1 data2 = A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptrobj2.cpp, Page no-437" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class someclass(Structure):\n", + " data1=int\n", + " data2=chr\n", + " def __init__(self):\n", + " print 'Constructor someclass() is invoked'\n", + " self.data1=1\n", + " self.data2='A'\n", + " def __del__(self):\n", + " print 'Destructor ~someclass() is invoked'\n", + " def show(self):\n", + " print 'data1 =', self.data1,\n", + " print 'data2 =', self.data2\n", + "object1=someclass()\n", + "ptr=POINTER(someclass)\n", + "ptr=object1\n", + "print \"Accessing object through object1.show()...\"\n", + "ptr.show()\n", + "print \"Destroying dynamic object...\"\n", + "del ptr" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor someclass() is invoked\n", + "Destructor ~someclass() is invoked\n", + "Accessing object through object1.show()...\n", + "data1 = 1 data2 = A\n", + "Destroying dynamic object...\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-useref.cpp, Page no-439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import POINTER, c_int\n", + "t1=POINTER(c_int)\n", + "t1=c_int(5)\n", + "t3=c_int(5)\n", + "t2=c_int(10)\n", + "t1.value=t1.value+t2.value\n", + "print \"Sum of\", t3.value,\n", + "print \"and\", t2.value, \n", + "print \"is:\", t1.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of 5 and 10 is: 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-refobj.cpp, Page no-440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "class student(Structure):\n", + " __roll_no=int\n", + " __name=str\n", + " def setdata(self, roll_no_in, name_in):\n", + " self.__roll_no=roll_no_in\n", + " self.__name=name_in\n", + " def outdata(self):\n", + " print \"Roll No =\", self.__roll_no\n", + " print \"Name =\", self.__name\n", + "s1=student()\n", + "s1.setdata(1, \"Savithri\")\n", + "s1.outdata()\n", + "s2=student()\n", + "s2.setdata(2, \"Bhavani\")\n", + "s2.outdata()\n", + "s3=student()\n", + "s3.setdata(3, \"Vani\")\n", + "s4=s3\n", + "s3.outdata()\n", + "s4.outdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll No = 1\n", + "Name = Savithri\n", + "Roll No = 2\n", + "Name = Bhavani\n", + "Roll No = 3\n", + "Name = Vani\n", + "Roll No = 3\n", + "Name = Vani\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student3.cpp, Page no-442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class student:\n", + " __roll_no=int\n", + " __name=str\n", + " def __init__(self, roll_no_in=None, name_in=None):\n", + " if isinstance(roll_no_in, int):\n", + " self.__roll_no=roll_no_in\n", + " if isinstance(name_in, str):\n", + " self.__name=name_in\n", + " else:\n", + " flag=raw_input(\"Do you want to initialize the object (y/n): \")\n", + " if flag=='y' or flag=='Y':\n", + " self.__roll_no=int(raw_input(\"Enter Roll no. of student: \"))\n", + " Str=raw_input(\"Enter Name of student: \")\n", + " self.__name=Str\n", + " else:\n", + " self.__roll_no=0\n", + " self.__name=None\n", + " def __del__(self):\n", + " if isinstance(self.__name, str):\n", + " del self.__name\n", + " def Set(self):\n", + " student(roll_no_in, name_in)\n", + " def show(self):\n", + " if self.__roll_no:\n", + " print \"Roll No:\", self.__roll_no\n", + " else:\n", + " print \"Roll No: (not initialized)\"\n", + " if isinstance(self.__name, str):\n", + " print \"Name: \", self.__name\n", + " else:\n", + " print \"Name: (not initialized)\"\n", + "s1=student()\n", + "s2=student()\n", + "s3=student(1)\n", + "s4=student(2, \"Bhavani\")\n", + "print \"Live objects contents...\"\n", + "s1.show()\n", + "s2.show()\n", + "s3.show()\n", + "s4.show()\n", + "del s1\n", + "del s2\n", + "del s3\n", + "del s4" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to initialize the object (y/n): n\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Do you want to initialize the object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Roll no. of student: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name of student: Rekha\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Live objects contents...\n", + "Roll No: (not initialized)\n", + "Name: (not initialized)\n", + "Roll No: 5\n", + "Name: Rekha\n", + "Roll No: 1\n", + "Name: (not initialized)\n", + "Roll No: 2\n", + "Name: Bhavani\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student1.cpp, Page-445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class student:\n", + " __roll_no=int\n", + " __name=str\n", + " def setdata(self, roll_no_in, name_in):\n", + " self.__roll_no=roll_no_in\n", + " self.__name=name_in\n", + " def outdata(self):\n", + " print \"Roll No =\", self.__roll_no\n", + " print \"Name =\", self.__name\n", + "s=[]*10 #array of objects\n", + "count=0\n", + "for i in range(10):\n", + " s.append(student())\n", + "for i in range(10):\n", + " response=raw_input(\"Initialize student object (y/n): \")\n", + " if response=='y' or response=='Y':\n", + " roll_no=int(raw_input(\"Enter a Roll no. of student: \"))\n", + " name=raw_input(\"Enter name of student: \")\n", + " s[i].setdata(roll_no, name)\n", + " count+=1\n", + " else:\n", + " break\n", + "print \"Student Details...\"\n", + "for i in range(count):\n", + " s[i].outdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initialize student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initialize student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initialize student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Savithri\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initialize student object (y/n): n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Details...\n", + "Roll No = 1\n", + "Name = Rajkumar\n", + "Roll No = 2\n", + "Name = Tejaswi\n", + "Roll No = 3\n", + "Name = Savithri\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student2.cpp, Page no-447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class student(Structure):\n", + " __roll_no=int\n", + " __name=str\n", + " def setdata(self, roll_no_in, name_in):\n", + " self.__roll_no=roll_no_in\n", + " self.__name=name_in\n", + " def outdata(self):\n", + " print \"Roll No =\", self.__roll_no\n", + " print \"Name =\", self.__name\n", + "temp=[]*10\n", + "s=POINTER(student) \n", + "count=0\n", + "for i in range(10):\n", + " temp.append(student())\n", + "s=temp #pointer to array of objects\n", + "for i in range(10):\n", + " response=raw_input(\"Create student object (y/n): \")\n", + " if response=='y' or response=='Y':\n", + " roll_no=int(raw_input(\"Enter a Roll no. of student: \"))\n", + " name=raw_input(\"Enter name of student: \")\n", + " s[i].setdata(roll_no, name)\n", + " count+=1\n", + " else:\n", + " break\n", + "print \"Student Details...\"\n", + "for i in range(count):\n", + " s[i].outdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Create student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Create student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Create student object (y/n): y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a Roll no. of student: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name of student: Savithri\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Create student object (y/n): n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Details...\n", + "Roll No = 1\n", + "Name = Rajkumar\n", + "Roll No = 2\n", + "Name = Tejaswi\n", + "Roll No = 3\n", + "Name = Savithri\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptrmemb.cpp, Page no-452" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X:\n", + " __y=int\n", + " a=int\n", + " b=int\n", + " def init(self, z):\n", + " self.a=z\n", + " return z\n", + "obj=X()\n", + "ip=X.a #pointer to data member\n", + "obj.ip=10 #access through object\n", + "print \"a in obj after obj.*ip = 10 is\", obj.ip\n", + "pobj=[obj] #pointer to object of class X\n", + "pobj[0].ip=10 #access through object pointer\n", + "print \"a in obj after pobj->*ip = 10 is\", pobj[0].ip\n", + "ptr_init=X.init #pointer to member function\n", + "ptr_init(obj,5) #access through object\n", + "print \"a in obj after (obj.*ptr_init)(5) =\", obj.a\n", + "ptr_init(pobj[0],5) #access through object pointer\n", + "print \"a in obj after (pobj->*ptr_init)(5) =\", obj.a" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a in obj after obj.*ip = 10 is 10\n", + "a in obj after pobj->*ip = 10 is 10\n", + "a in obj after (obj.*ptr_init)(5) = 5\n", + "a in obj after (pobj->*ptr_init)(5) = 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-friend.cpp, Page no-454" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class X():\n", + " __a=int\n", + " __b=int\n", + " def __init__(self):\n", + " self.__a=0\n", + " self.__b=0\n", + " def SetMembers(self, a1, b1):\n", + " self.__a=a1\n", + " self.__b=b1\n", + "def sum(objx):\n", + " pa=[X._X__a]\n", + " pb=[X._X__b]\n", + " objx.pa=objx._X__a\n", + " objx.pb=objx._X__b\n", + " return objx.pa+objx.pb\n", + "objx=X()\n", + "pfunc=X.SetMembers\n", + "pfunc(objx, 5, 6)\n", + "print \"Sum =\", sum(objx)\n", + "pobjx=[objx]\n", + "pfunc(pobjx[0], 7, 8)\n", + "print \"Sum =\", sum(objx)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum = 11\n", + "Sum = 15\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-memhnd.cpp, Page no-455" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import pointer, c_int\n", + "def out_of_memory():\n", + " print \"Memory exhausted, cannot allocate\"\n", + "ip=pointer(c_int())\n", + "total_allocated=0L\n", + "print \"Ok, allocating...\"\n", + "while(1):\n", + " ip=[int]*100\n", + " total_allocated+=100L\n", + " print \"Now got a total of\", total_allocated, \"bytes\"\n", + " if total_allocated==29900L:\n", + " break" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ok, allocating...\n", + "Now got a total of 100 bytes\n", + "Now got a total of 200 bytes\n", + "Now got a total of 300 bytes\n", + "Now got a total of 400 bytes\n", + "Now got a total of 500 bytes\n", + "Now got a total of 600 bytes\n", + "Now got a total of 700 bytes\n", + "Now got a total of 800 bytes\n", + "Now got a total of 900 bytes\n", + "Now got a total of 1000 bytes\n", + "Now got a total of 1100 bytes\n", + "Now got a total of 1200 bytes\n", + "Now got a total of 1300 bytes\n", + "Now got a total of 1400 bytes\n", + "Now got a total of 1500 bytes\n", + "Now got a total of 1600 bytes\n", + "Now got a total of 1700 bytes\n", + "Now got a total of 1800 bytes\n", + "Now got a total of 1900 bytes\n", + "Now got a total of 2000 bytes\n", + "Now got a total of 2100 bytes\n", + "Now got a total of 2200 bytes\n", + "Now got a total of 2300 bytes\n", + "Now got a total of 2400 bytes\n", + "Now got a total of 2500 bytes\n", + "Now got a total of 2600 bytes\n", + "Now got a total of 2700 bytes\n", + "Now got a total of 2800 bytes\n", + "Now got a total of 2900 bytes\n", + "Now got a total of 3000 bytes\n", + "Now got a total of 3100 bytes\n", + "Now got a total of 3200 bytes\n", + "Now got a total of 3300 bytes\n", + "Now got a total of 3400 bytes\n", + "Now got a total of 3500 bytes\n", + "Now got a total of 3600 bytes\n", + "Now got a total of 3700 bytes\n", + "Now got a total of 3800 bytes\n", + "Now got a total of 3900 bytes\n", + "Now got a total of 4000 bytes\n", + "Now got a total of 4100 bytes\n", + "Now got a total of 4200 bytes\n", + "Now got a total of 4300 bytes\n", + "Now got a total of 4400 bytes\n", + "Now got a total of 4500 bytes\n", + "Now got a total of 4600 bytes\n", + "Now got a total of 4700 bytes\n", + "Now got a total of 4800 bytes\n", + "Now got a total of 4900 bytes\n", + "Now got a total of 5000 bytes\n", + "Now got a total of 5100 bytes\n", + "Now got a total of 5200 bytes\n", + "Now got a total of 5300 bytes\n", + "Now got a total of 5400 bytes\n", + "Now got a total of 5500 bytes\n", + "Now got a total of 5600 bytes\n", + "Now got a total of 5700 bytes\n", + "Now got a total of 5800 bytes\n", + "Now got a total of 5900 bytes\n", + "Now got a total of 6000 bytes\n", + "Now got a total of 6100 bytes\n", + "Now got a total of 6200 bytes\n", + "Now got a total of 6300 bytes\n", + "Now got a total of 6400 bytes\n", + "Now got a total of 6500 bytes\n", + "Now got a total of 6600 bytes\n", + "Now got a total of 6700 bytes\n", + "Now got a total of 6800 bytes\n", + "Now got a total of 6900 bytes\n", + "Now got a total of 7000 bytes\n", + "Now got a total of 7100 bytes\n", + "Now got a total of 7200 bytes\n", + "Now got a total of 7300 bytes\n", + "Now got a total of 7400 bytes\n", + "Now got a total of 7500 bytes\n", + "Now got a total of 7600 bytes\n", + "Now got a total of 7700 bytes\n", + "Now got a total of 7800 bytes\n", + "Now got a total of 7900 bytes\n", + "Now got a total of 8000 bytes\n", + "Now got a total of 8100 bytes\n", + "Now got a total of 8200 bytes\n", + "Now got a total of 8300 bytes\n", + "Now got a total of 8400 bytes\n", + "Now got a total of 8500 bytes\n", + "Now got a total of 8600 bytes\n", + "Now got a total of 8700 bytes\n", + "Now got a total of 8800 bytes\n", + "Now got a total of 8900 bytes\n", + "Now got a total of 9000 bytes\n", + "Now got a total of 9100 bytes\n", + "Now got a total of 9200 bytes\n", + "Now got a total of 9300 bytes\n", + "Now got a total of 9400 bytes\n", + "Now got a total of 9500 bytes\n", + "Now got a total of 9600 bytes\n", + "Now got a total of 9700 bytes\n", + "Now got a total of 9800 bytes\n", + "Now got a total of 9900 bytes\n", + "Now got a total of 10000 bytes\n", + "Now got a total of 10100 bytes\n", + "Now got a total of 10200 bytes\n", + "Now got a total of 10300 bytes\n", + "Now got a total of 10400 bytes\n", + "Now got a total of 10500 bytes\n", + "Now got a total of 10600 bytes\n", + "Now got a total of 10700 bytes\n", + "Now got a total of 10800 bytes\n", + "Now got a total of 10900 bytes\n", + "Now got a total of 11000 bytes\n", + "Now got a total of 11100 bytes\n", + "Now got a total of 11200 bytes\n", + "Now got a total of 11300 bytes\n", + "Now got a total of 11400 bytes\n", + "Now got a total of 11500 bytes\n", + "Now got a total of 11600 bytes\n", + "Now got a total of 11700 bytes\n", + "Now got a total of 11800 bytes\n", + "Now got a total of 11900 bytes\n", + "Now got a total of 12000 bytes\n", + "Now got a total of 12100 bytes\n", + "Now got a total of 12200 bytes\n", + "Now got a total of 12300 bytes\n", + "Now got a total of 12400 bytes\n", + "Now got a total of 12500 bytes\n", + "Now got a total of 12600 bytes\n", + "Now got a total of 12700 bytes\n", + "Now got a total of 12800 bytes\n", + "Now got a total of 12900 bytes\n", + "Now got a total of 13000 bytes\n", + "Now got a total of 13100 bytes\n", + "Now got a total of 13200 bytes\n", + "Now got a total of 13300 bytes\n", + "Now got a total of 13400 bytes\n", + "Now got a total of 13500 bytes\n", + "Now got a total of 13600 bytes\n", + "Now got a total of 13700 bytes\n", + "Now got a total of 13800 bytes\n", + "Now got a total of 13900 bytes\n", + "Now got a total of 14000 bytes\n", + "Now got a total of 14100 bytes\n", + "Now got a total of 14200 bytes\n", + "Now got a total of 14300 bytes\n", + "Now got a total of 14400 bytes\n", + "Now got a total of 14500 bytes\n", + "Now got a total of 14600 bytes\n", + "Now got a total of 14700 bytes\n", + "Now got a total of 14800 bytes\n", + "Now got a total of 14900 bytes\n", + "Now got a total of 15000 bytes\n", + "Now got a total of 15100 bytes\n", + "Now got a total of 15200 bytes\n", + "Now got a total of 15300 bytes\n", + "Now got a total of 15400 bytes\n", + "Now got a total of 15500 bytes\n", + "Now got a total of 15600 bytes\n", + "Now got a total of 15700 bytes\n", + "Now got a total of 15800 bytes\n", + "Now got a total of 15900 bytes\n", + "Now got a total of 16000 bytes\n", + "Now got a total of 16100 bytes\n", + "Now got a total of 16200 bytes\n", + "Now got a total of 16300 bytes\n", + "Now got a total of 16400 bytes\n", + "Now got a total of 16500 bytes\n", + "Now got a total of 16600 bytes\n", + "Now got a total of 16700 bytes\n", + "Now got a total of 16800 bytes\n", + "Now got a total of 16900 bytes\n", + "Now got a total of 17000 bytes\n", + "Now got a total of 17100 bytes\n", + "Now got a total of 17200 bytes\n", + "Now got a total of 17300 bytes\n", + "Now got a total of 17400 bytes\n", + "Now got a total of 17500 bytes\n", + "Now got a total of 17600 bytes\n", + "Now got a total of 17700 bytes\n", + "Now got a total of 17800 bytes\n", + "Now got a total of 17900 bytes\n", + "Now got a total of 18000 bytes\n", + "Now got a total of 18100 bytes\n", + "Now got a total of 18200 bytes\n", + "Now got a total of 18300 bytes\n", + "Now got a total of 18400 bytes\n", + "Now got a total of 18500 bytes\n", + "Now got a total of 18600 bytes\n", + "Now got a total of 18700 bytes\n", + "Now got a total of 18800 bytes\n", + "Now got a total of 18900 bytes\n", + "Now got a total of 19000 bytes\n", + "Now got a total of 19100 bytes\n", + "Now got a total of 19200 bytes\n", + "Now got a total of 19300 bytes\n", + "Now got a total of 19400 bytes\n", + "Now got a total of 19500 bytes\n", + "Now got a total of 19600 bytes\n", + "Now got a total of 19700 bytes\n", + "Now got a total of 19800 bytes\n", + "Now got a total of 19900 bytes\n", + "Now got a total of 20000 bytes\n", + "Now got a total of 20100 bytes\n", + "Now got a total of 20200 bytes\n", + "Now got a total of 20300 bytes\n", + "Now got a total of 20400 bytes\n", + "Now got a total of 20500 bytes\n", + "Now got a total of 20600 bytes\n", + "Now got a total of 20700 bytes\n", + "Now got a total of 20800 bytes\n", + "Now got a total of 20900 bytes\n", + "Now got a total of 21000 bytes\n", + "Now got a total of 21100 bytes\n", + "Now got a total of 21200 bytes\n", + "Now got a total of 21300 bytes\n", + "Now got a total of 21400 bytes\n", + "Now got a total of 21500 bytes\n", + "Now got a total of 21600 bytes\n", + "Now got a total of 21700 bytes\n", + "Now got a total of 21800 bytes\n", + "Now got a total of 21900 bytes\n", + "Now got a total of 22000 bytes\n", + "Now got a total of 22100 bytes\n", + "Now got a total of 22200 bytes\n", + "Now got a total of 22300 bytes\n", + "Now got a total of 22400 bytes\n", + "Now got a total of 22500 bytes\n", + "Now got a total of 22600 bytes\n", + "Now got a total of 22700 bytes\n", + "Now got a total of 22800 bytes\n", + "Now got a total of 22900 bytes\n", + "Now got a total of 23000 bytes\n", + "Now got a total of 23100 bytes\n", + "Now got a total of 23200 bytes\n", + "Now got a total of 23300 bytes\n", + "Now got a total of 23400 bytes\n", + "Now got a total of 23500 bytes\n", + "Now got a total of 23600 bytes\n", + "Now got a total of 23700 bytes\n", + "Now got a total of 23800 bytes\n", + "Now got a total of 23900 bytes\n", + "Now got a total of 24000 bytes\n", + "Now got a total of 24100 bytes\n", + "Now got a total of 24200 bytes\n", + "Now got a total of 24300 bytes\n", + "Now got a total of 24400 bytes\n", + "Now got a total of 24500 bytes\n", + "Now got a total of 24600 bytes\n", + "Now got a total of 24700 bytes\n", + "Now got a total of 24800 bytes\n", + "Now got a total of 24900 bytes\n", + "Now got a total of 25000 bytes\n", + "Now got a total of 25100 bytes\n", + "Now got a total of 25200 bytes\n", + "Now got a total of 25300 bytes\n", + "Now got a total of 25400 bytes\n", + "Now got a total of 25500 bytes\n", + "Now got a total of 25600 bytes\n", + "Now got a total of 25700 bytes\n", + "Now got a total of 25800 bytes\n", + "Now got a total of 25900 bytes\n", + "Now got a total of 26000 bytes\n", + "Now got a total of 26100 bytes\n", + "Now got a total of 26200 bytes\n", + "Now got a total of 26300 bytes\n", + "Now got a total of 26400 bytes\n", + "Now got a total of 26500 bytes\n", + "Now got a total of 26600 bytes\n", + "Now got a total of 26700 bytes\n", + "Now got a total of 26800 bytes\n", + "Now got a total of 26900 bytes\n", + "Now got a total of 27000 bytes\n", + "Now got a total of 27100 bytes\n", + "Now got a total of 27200 bytes\n", + "Now got a total of 27300 bytes\n", + "Now got a total of 27400 bytes\n", + "Now got a total of 27500 bytes\n", + "Now got a total of 27600 bytes\n", + "Now got a total of 27700 bytes\n", + "Now got a total of 27800 bytes\n", + "Now got a total of 27900 bytes\n", + "Now got a total of 28000 bytes\n", + "Now got a total of 28100 bytes\n", + "Now got a total of 28200 bytes\n", + "Now got a total of 28300 bytes\n", + "Now got a total of 28400 bytes\n", + "Now got a total of 28500 bytes\n", + "Now got a total of 28600 bytes\n", + "Now got a total of 28700 bytes\n", + "Now got a total of 28800 bytes\n", + "Now got a total of 28900 bytes\n", + "Now got a total of 29000 bytes\n", + "Now got a total of 29100 bytes\n", + "Now got a total of 29200 bytes\n", + "Now got a total of 29300 bytes\n", + "Now got a total of 29400 bytes\n", + "Now got a total of 29500 bytes\n", + "Now got a total of 29600 bytes\n", + "Now got a total of 29700 bytes\n", + "Now got a total of 29800 bytes\n", + "Now got a total of 29900 bytes\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-this.cpp, Page no-457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Test:\n", + " __a=int\n", + " def setdata(self, init_a):\n", + " self.__a=init_a\n", + " print \"Address of my object, this in setdata():\", hex(id(self))\n", + " self.__a=init_a\n", + " def showdata(self):\n", + " print \"Data accessed in normal way: \", self.__a\n", + " print \"Address of my object, this in showdata(): \", hex(id(self))\n", + " print \"Data accessed through this->a: \", self.__a\n", + "my=Test()\n", + "my.setdata(25)\n", + "my.showdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address of my object, this in setdata(): 0x39de488L\n", + "Data accessed in normal way: 25\n", + "Address of my object, this in showdata(): 0x39de488L\n", + "Data accessed through this->a: 25\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-list.cpp, Page no-459" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class List():\n", + " def __init__(self, dat=None):\n", + " if isinstance(dat, int):\n", + " self.__data=dat\n", + " else:\n", + " self.__data=0\n", + " self.__Next=None\n", + " def __del__(self):\n", + " pass\n", + " def get(self):\n", + " return self.__data\n", + " def insert(self, node):\n", + " last=List()\n", + " last=self\n", + " while(last.__Next!=None):\n", + " last=last.__Next\n", + " last.__Next=node\n", + "def display(first):\n", + " traverse=List()\n", + " print \"List traversal yields:\",\n", + " traverse=first\n", + " while(1): \n", + " print traverse._List__data, \",\",\n", + " if traverse._List__Next==None:\n", + " break\n", + " traverse=traverse._List__Next\n", + " print \"\"\n", + "first=List()\n", + "first=None\n", + "while(1):\n", + " print \"Linked List...\\n1.Insert\\n2.Display\\n3.Quit\\nEnter Choice: \",\n", + " choice=int(raw_input())\n", + " if choice==1:\n", + " data=int(raw_input(\"Enter data: \"))\n", + " node=List(data)\n", + " if first==None:\n", + " first=node\n", + " else:\n", + " first.insert(node)\n", + " elif choice==2:\n", + " display(first)\n", + " elif choice==3:\n", + " break\n", + " else:\n", + " print \"Bad Option Selected\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " List traversal yields: 2 , \n", + "Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " List traversal yields: 2 , 3 , 4 , \n", + "Linked List...\n", + "1.Insert\n", + "2.Display\n", + "3.Quit\n", + "Enter Choice: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-dll.cpp, Page no-462" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class dll:\n", + " def __init__(self, data_in=None):\n", + " if isinstance(data_in, int):\n", + " self.__data=data_in\n", + " else:\n", + " self.__data=0\n", + " self.__prev=None\n", + " self.__Next=None\n", + " def __del__(self):\n", + " pass\n", + " def get(self):\n", + " return self.__data\n", + " def insert(self, node):\n", + " last=dll()\n", + " last=self\n", + " while(last._dll__Next!=None):\n", + " last=last._dll__Next\n", + " node._dll__prev=last\n", + " node._dll__Next=None\n", + " last._dll__Next=node\n", + " def FreeAllNodes(self):\n", + " print \"Freeing the node with data:\",\n", + " first=dll()\n", + " first=self\n", + " while(1):\n", + " temp= dll()\n", + " temp=first\n", + " print \"->\", first._dll__data,\n", + " del temp\n", + " first=first._dll__Next\n", + " if first==None:\n", + " break\n", + "def display(first):\n", + " traverse=dll()\n", + " traverse=first\n", + " if first==None:\n", + " print \"Nothing to display !\"\n", + " return\n", + " else:\n", + " print \"Processing with forward -> pointer:\",\n", + " while(1): \n", + " print \"->\", traverse._dll__data, \n", + " if traverse._dll__Next==None:\n", + " break\n", + " traverse=traverse._dll__Next\n", + " print \"\\nProcessing with backward <- pointer:\",\n", + " while(1): \n", + " print \"->\", traverse._dll__data,\n", + " if traverse._dll__prev==None:\n", + " break\n", + " traverse=traverse._dll__prev\n", + " print \"\"\n", + "def InsertNode(first, data):\n", + " node=dll(data)\n", + " if first==None:\n", + " first=node\n", + " else:\n", + " first.insert(node)\n", + " return first\n", + "first=dll()\n", + "first=None\n", + "print \"Double Linked List Manipulation...\"\n", + "while(1):\n", + " choice=int(raw_input(\"Enter Choice ([1] Insert, [2] Display, [3]Quit: \"))\n", + " if choice==1:\n", + " data=int(raw_input(\"Enter data: \"))\n", + " first=InsertNode(first, data)\n", + " elif choice==2:\n", + " display(first)\n", + " elif choice==3:\n", + " first.FreeAllNodes()\n", + " break\n", + " else:\n", + " print \"Bad Option Selected\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Double Linked List Manipulation...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Processing with forward -> pointer: -> 3 \n", + "Processing with backward <- pointer: -> 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Processing with forward -> pointer: -> 3 -> 7 \n", + "Processing with backward <- pointer: -> 7 -> 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Processing with forward -> pointer: -> 3 -> 7 -> 5 \n", + "Processing with backward <- pointer: -> 5 -> 7 -> 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bad Option Selected\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Choice ([1] Insert, [2] Display, [3]Quit: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Freeing the node with data: -> 3 -> 7 -> 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class A:\n", + " __a1=int\n", + " def Set(self, val):\n", + " self.__a1=val\n", + "class B:\n", + " __b1=int\n", + " def Set(self, val):\n", + " self.__b1=val\n", + "def add(x, y):\n", + " return x._A__a1+y._B__b1\n", + "ObjA=A()\n", + "ObjB=B()\n", + "ObjA.Set(9)\n", + "ObjB.Set(10)\n", + "print \"Sum of objects A and B using friend function =\", add(ObjA, ObjB)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of objects A and B using friend function = 19\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class test:\n", + " __data=int\n", + " def func(self, val):\n", + " self.__data=val\n", + "t1=test()\n", + "testptr={}\n", + "testptr[0]=test.func #pointer to member function\n", + "print \"Initializing test class object t1 using pointer...\"\n", + "testptr[0](t1, 10)\n", + "print \"Object initialized successfully\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initializing test class object t1 using pointer...\n", + "Object initialized successfully\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter13-OperatorOverloading_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter13-OperatorOverloading_1.ipynb new file mode 100755 index 00000000..b67f9d8d --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter13-OperatorOverloading_1.ipynb @@ -0,0 +1,2672 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:00870b63d144b6d5646400a298500edb387bcdbf86f8e9aa2b7d22e37fa4432a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13- Operator Overloading" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index1.cpp, Page no-470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self):\n", + " self.__value=0\n", + " def GetIndex(self):\n", + " return self.__value\n", + " def NextIndex(self):\n", + " self.__value=self.__value+1\n", + "idx1=Index()\n", + "idx2=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx1.NextIndex()\n", + "idx2.NextIndex()\n", + "idx2.NextIndex()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 0\n", + "Index2 = 0\n", + "Index1 = 1\n", + "Index2 = 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index2.cpp, Page no-471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self):\n", + " self.__value=0\n", + " def GetIndex(self):\n", + " return self.__value\n", + " #overload increment operator\n", + " def __iadd__(self, op):\n", + " self.__value=self.__value+op\n", + " return self\n", + "idx1=Index()\n", + "idx2=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx1+=1 #overloaded increment operator invoked\n", + "idx2+=1 #overloaded increment operator invoked\n", + "idx2+=1 #overloaded increment operator invoked\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 0\n", + "Index2 = 0\n", + "Index1 = 1\n", + "Index2 = 2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index3.cpp, Page no-475" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self):\n", + " self.__value=0\n", + " def GetIndex(self):\n", + " return self.__value\n", + " def __iadd__(self, op):\n", + " self.__value+=1\n", + " return self\n", + "idx1=Index()\n", + "idx2=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx2+=1\n", + "idx1+=1\n", + "idx2+=1\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 0\n", + "Index2 = 0\n", + "Index1 = 1\n", + "Index2 = 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index4.cpp, Page no-476" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self):\n", + " self.__value=0\n", + " def GetIndex(self):\n", + " return self.__value\n", + " #overload increment operator\n", + " def __iadd__(self, op):\n", + " self.__value=self.__value+op\n", + " return self\n", + "idx1=Index()\n", + "idx2=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx1+=1\n", + "idx2+=1\n", + "idx2+=1\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 0\n", + "Index2 = 0\n", + "Index1 = 1\n", + "Index2 = 2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index5.cpp, Page no-478" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetIndex(self):\n", + " return self.__value\n", + " #overload increment operator\n", + " def __iadd__(self, op):\n", + " self.__value=self.__value+op\n", + " return self\n", + "idx1=Index(2)\n", + "idx2=Index(2)\n", + "idx3=Index()\n", + "idx4=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx3._Index__value=idx1._Index__value\n", + "idx1+=1\n", + "idx2+=1\n", + "idx4=idx2\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index3 =\", idx3.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "print \"Index4 =\", idx4.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 2\n", + "Index2 = 2\n", + "Index1 = 3\n", + "Index3 = 2\n", + "Index2 = 3\n", + "Index4 = 3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-index6.cpp, Page no-479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Index:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetIndex(self):\n", + " return self.__value\n", + " #overload increment operator\n", + " def __iadd__(self, op):\n", + " self.__value=self.__value+op\n", + " return self\n", + " #overload decrement operator\n", + " def __isub__(self, op):\n", + " self.__value=self.__value-op\n", + " return self\n", + " #overload negation operator\n", + " def __neg__(self):\n", + " return Index(-self.__value)\n", + "idx1=Index()\n", + "idx2=Index()\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()\n", + "idx2+=1\n", + "idx1=-idx2\n", + "idx2+=1\n", + "idx2-=1\n", + "print \"Index1 =\", idx1.GetIndex()\n", + "print \"Index2 =\", idx2.GetIndex()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Index1 = 0\n", + "Index2 = 0\n", + "Index1 = -1\n", + "Index2 = 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mydate.cpp, Page no-480" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class date:\n", + " __day=int\n", + " __month=int\n", + " __year=int\n", + " def __init__(self, d=0, m=0, y=0):\n", + " if isinstance(d, int):\n", + " self.__day=d\n", + " self.__month=m\n", + " self.__year=y\n", + " else:\n", + " self.__day=0\n", + " self.__month=0\n", + " self.__year=0\n", + " def read(self):\n", + " self.__day, self.__month, self.__year=[int(x) for x in raw_input(\"Enter date
: \").split()]\n", + " def show(self):\n", + " print \"%s:%s:%s\" %(self.__day, self.__month, self.__year),\n", + " def IsLeapYear(self):\n", + " if (self.__year%4==0 and self.__year%100!=0) or (self.__year % 400==0):\n", + " return 1\n", + " else:\n", + " return 0\n", + " def thisMonthMaxDay(self):\n", + " m=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n", + " if self.__month==2 and self.IsLeapYear():\n", + " return 29\n", + " else:\n", + " return m[self.__month-1]\n", + " def __iadd__(self, op): #overloading increment operator\n", + " self.__day+=1\n", + " if self.__day>self.thisMonthMaxDay():\n", + " self.__day=1\n", + " self.__month+=1\n", + " if self.__month>12:\n", + " self.__month=1\n", + " self.__year+=1\n", + " return self\n", + "def nextday(d):\n", + " print 'Date', \n", + " d.show()\n", + " d+=1 #overloaded increment operator invoked\n", + " print \"on increment becomes\", \n", + " d.show()\n", + " print \"\"\n", + "d1=date(14, 4, 1971)\n", + "d2=date(28, 2, 1992)\n", + "d3=date(28, 2, 1993)\n", + "d4=date(31, 12, 1995)\n", + "nextday(d1)\n", + "nextday(d2)\n", + "nextday(d3)\n", + "nextday(d4)\n", + "today=date()\n", + "today.read()\n", + "nextday(today)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date 14:4:1971 on increment becomes 15:4:1971 \n", + "Date 28:2:1992 on increment becomes 29:2:1992 \n", + "Date 28:2:1993 on increment becomes 1:3:1993 \n", + "Date 31:12:1995 on increment becomes 1:1:1996 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date
: 11 9 1996\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Date 11:9:1996 on increment becomes 12:9:1996 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex1.cpp, Page no-483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def AddComplex(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " AddComplex=AddComplex\n", + " def outdata(self, msg):\n", + " print \"%s(%0.1f, %0.1f)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "c3=c1.AddComplex(c2)\n", + "c3.outdata(\"c3 = c1.AddComplex(c2) : \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c3 = c1.AddComplex(c2) : (5.5, 3.5)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex2.cpp, Page no-484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __add__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " #overloading + operator\n", + " __add__=__add__\n", + " def outdata(self, msg):\n", + " print \"%s(%0.1f, %0.1f)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "c3=c1+c2 #invoking the overloaded + operator\n", + "c3.outdata(\"c3 = c1 + c2: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c3 = c1 + c2: (5.5, 3.5)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex3.cpp, Page no-487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __add__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "def __sub__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real-c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag-c2._Complex__imag\n", + " return temp\n", + "def __mul__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real*c2._Complex__real-self._Complex__imag*c2._Complex__imag\n", + " temp._Complex__imag=self._Complex__real*c2._Complex__imag+self._Complex__imag*c2._Complex__real\n", + " return temp\n", + "def __div__(self, c2):\n", + " temp=Complex()\n", + " qt=c2._Complex__real*c2._Complex__real+c2._Complex__imag *c2._Complex__imag\n", + " temp._Complex__real=(self._Complex__real*c2._Complex__real+self._Complex__imag*c2._Complex__imag)/qt\n", + " temp._Complex__imag=(self._Complex__imag*c2._Complex__real-self._Complex__real*c2._Complex__imag)/qt\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " #overloading +, -, * and / operator\n", + " __add__=__add__\n", + " __sub__=__sub__\n", + " __mul__=__mul__\n", + " __div__=__div__\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "print \"Entered Complex numbers are...\"\n", + "c1.outdata(\"c1 = \")\n", + "c2.outdata(\"c2 = \")\n", + "print \"Computational results are...\"\n", + "c3=c1+c2 #invoking the overloaded + operator\n", + "c3.outdata(\"c3 = c1 + c2: \")\n", + "c3=c1-c2 #invoking the overloaded - operator\n", + "c3.outdata(\"c3 = c1 - c2: \")\n", + "c3=c1*c2 #invoking the overloaded * operator\n", + "c3.outdata(\"c3 = c1 * c2: \")\n", + "c3=c1/c2 #invoking the overloaded / operator\n", + "c3.outdata(\"c3 = c1 / c2: \")\n", + "c3 = c1 + c2 + c1 + c2\n", + "c3.outdata(\"c3 = c1 + c2 + c1 + c2: \")\n", + "c3 = c1 * c2 + c1 / c2\n", + "c3.outdata(\"c3 = c1 * c2 + c1 / c2: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entered Complex numbers are...\n", + "c1 = (2.5, 2)\n", + "c2 = (3, 1.5)\n", + "Computational results are...\n", + "c3 = c1 + c2: (5.5, 3.5)\n", + "c3 = c1 - c2: (-0.5, 0.5)\n", + "c3 = c1 * c2: (4.5, 9.75)\n", + "c3 = c1 / c2: (0.933333, 0.2)\n", + "c3 = c1 + c2 + c1 + c2: (11, 7)\n", + "c3 = c1 * c2 + c1 / c2: (5.43333, 9.95)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-string.cpp, Page no-490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "BUFF_SIZE=50\n", + "class string:\n", + " __Str=[None]*BUFF_SIZE\n", + " def __init__(self, MyStr=None):\n", + " if isinstance(MyStr, str):\n", + " self.__Str=MyStr\n", + " else:\n", + " self.__Str=\"\"\n", + " def echo(self):\n", + " print self.__Str\n", + " def __add__(self, s):\n", + " temp=string(self._string__Str)\n", + " temp._string__Str+=s._string__Str\n", + " return temp\n", + "str1=string(\"Welcome to \")\n", + "str2=string(\"Operator Overloading\")\n", + "str3=string()\n", + "print \"Before str3 = str1 + str2;..\"\n", + "print \"str1 = \",\n", + "str1.echo()\n", + "print \"str2 = \",\n", + "str2.echo()\n", + "print \"str3 = \",\n", + "str3.echo()\n", + "str3=str1+str2\n", + "print \"After str3 = str1 + str2;..\"\n", + "print \"str1 = \",\n", + "str1.echo()\n", + "print \"str2 = \",\n", + "str2.echo()\n", + "print \"str3 = \",\n", + "str3.echo()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Before str3 = str1 + str2;..\n", + "str1 = Welcome to \n", + "str2 = Operator Overloading\n", + "str3 = \n", + "After str3 = str1 + str2;..\n", + "str1 = Welcome to \n", + "str2 = Operator Overloading\n", + "str3 = Welcome to Operator Overloading\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-idxcmp.cpp, Page no-491" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(false, true)=(0, 1) #enum type\n", + "type =['false', 'true']\n", + "class Index:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetIndex(self):\n", + " return self.__value\n", + " #overloading < operator\n", + " def __lt__(self, idx):\n", + " return true if self.__value operator\n", + " def __gt__(self, s):\n", + " if self.__Str > s.__Str:\n", + " return true\n", + " else:\n", + " return false\n", + " #overloading == operator\n", + " def __eq__(self, MyStr):\n", + " if self.__Str ==MyStr:\n", + " return true\n", + " else:\n", + " return false\n", + "str1=string()\n", + "str2=string()\n", + "while(1):\n", + " print \"Enter String1 <'end' to stop>:\",\n", + " str1.read()\n", + " if str1==\"end\": #using overloaded == operator\n", + " break\n", + " print 'Enter String2:',\n", + " str2.read()\n", + " print 'Comparison status:',\n", + " str1.echo()\n", + " if str1str2:\n", + " print \">\", #using overloaded > operator\n", + " else:\n", + " print \"=\",\n", + " str2.echo()\n", + " print \"\"\n", + "print \"Bye.!! That's all folks.!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter String1 <'end' to stop>:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter String2:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Comparison status: C < C++ \n", + "Enter String1 <'end' to stop>:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rajkumar\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter String2:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bindu\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Comparison status: Rajkumar > Bindu \n", + "Enter String1 <'end' to stop>:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rajkumar\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter String2:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Venugopal\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Comparison status: Rajkumar < Venugopal \n", + "Enter String1 <'end' to stop>:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "HELLO\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter String2:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "HELLO\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Comparison status: HELLO = HELLO \n", + "Enter String1 <'end' to stop>:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "end\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bye.!! That's all folks.!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex4.cpp, Page no-495" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __iadd__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "def __isub__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real-c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag-c2._Complex__imag\n", + " return temp\n", + "def __imul__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real*c2._Complex__real-self._Complex__imag*c2._Complex__imag\n", + " temp._Complex__imag=self._Complex__real*c2._Complex__imag+self._Complex__imag*c2._Complex__real\n", + " return temp\n", + "def __idiv__(self, c2):\n", + " temp=Complex()\n", + " qt=c2._Complex__real*c2._Complex__real+c2._Complex__imag *c2._Complex__imag\n", + " temp._Complex__real=(self._Complex__real*c2._Complex__real+self._Complex__imag*c2._Complex__imag)/qt\n", + " temp._Complex__imag=(self._Complex__imag*c2._Complex__real-self._Complex__real*c2._Complex__imag)/qt\n", + " return temp\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " #overloading +=, -=, *= and /= operator\n", + " __iadd__=__iadd__\n", + " __isub__=__isub__\n", + " __imul__=__imul__\n", + " __idiv__=__idiv__\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "print \"Entered Complex numbers are...\"\n", + "c1.outdata(\"c1 = \")\n", + "c2.outdata(\"c2 = \")\n", + "print \"Computational results are...\"\n", + "c3=c1 \n", + "c3+=c2 #invoking the overloaded += operator\n", + "c3.outdata(\"let c3 = c1, c3+=c2: \")\n", + "c3=c1 \n", + "c3-=c2 #invoking the overloaded -= operator\n", + "c3.outdata(\"let c3 = c1, c3-=c2: \")\n", + "c3=c1 \n", + "c3*=c2 #invoking the overloaded *= operator\n", + "c3.outdata(\"let c3 = c1, c3*=c2: \")\n", + "c3=c1 \n", + "c3/=c2 #invoking the overloaded / operator\n", + "c3.outdata(\"let c3 = c1, c3/=c2: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entered Complex numbers are...\n", + "c1 = (2.5, 2)\n", + "c2 = (3, 1.5)\n", + "Computational results are...\n", + "let c3 = c1, c3+=c2: (5.5, 3.5)\n", + "let c3 = c1, c3-=c2: (-0.5, 0.5)\n", + "let c3 = c1, c3*=c2: (4.5, 9.75)\n", + "let c3 = c1, c3/=c2: (0.933333, 0.2)\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex-5.cpp, Page no-498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __iadd__(self, c2):\n", + " self._Complex__real=self._Complex__real+c2._Complex__real\n", + " self._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return self\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " #overloading += operator\n", + " __iadd__=__iadd__\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "c1 += c2 #using overloaded += operator\n", + "c3 = c1\n", + "print \"On execution of c3 = c1 += c2..\"\n", + "c1.outdata(\"Complex c1: \")\n", + "c2.outdata(\"Complex c2: \")\n", + "c3.outdata(\"Complex c3: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 1.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On execution of c3 = c1 += c2..\n", + "Complex c1: (5.5, 3.5)\n", + "Complex c2: (3, 1.5)\n", + "Complex c3: (5.5, 3.5)\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-resource.cpp, Page no-499" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ARRAY_SIZE=10\n", + "def read(self):\n", + " for i in range(ARRAY_SIZE):\n", + " print \"vector[\", i, \"] = ? \",\n", + " self._vector__array[i]=int(raw_input())\n", + "def sum(self):\n", + " Sum=0\n", + " for i in range(ARRAY_SIZE):\n", + " Sum+=self._vector__array[i]\n", + " return Sum\n", + "class vector:\n", + " __array=[int]\n", + " def new(self):\n", + " myvector=vector()\n", + " myvector.__array=[int]*ARRAY_SIZE\n", + " return myvector\n", + " def delete(self):\n", + " del self\n", + " read=read\n", + " sum=sum\n", + "my_vector=vector()\n", + "my_vector=my_vector.new()\n", + "print \"Enter Vector data...\"\n", + "my_vector.read()\n", + "print \"Sum of Vector =\", my_vector.sum()\n", + "del my_vector" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Vector data...\n", + "vector[ 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 2 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 3 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 4 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 5 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 6 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 7 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 8 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector[ 9 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sum of Vector = 55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-meter.cpp, Page no-504" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Meter:\n", + " __length=float\n", + " def __init__(self, InitLength=0.0):\n", + " self.__length=InitLength/100.0\n", + " def float(self):\n", + " LengthCms=self.__length*100.0\n", + " return LengthCms\n", + " def GetLength(self):\n", + " self.__length=float(raw_input(\"Enter Length (in meters): \"))\n", + " def ShowLength(self):\n", + " print \"Length (in meter) =\", self.__length\n", + "length1=float(raw_input(\"Enter Lenthg (in cms): \"))\n", + "meter1=Meter(length1)\n", + "meter1.ShowLength()\n", + "meter2=Meter()\n", + "length2=float\n", + "meter2.GetLength()\n", + "length2=meter2.float()\n", + "print \"Length (in cms) =\", length2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Lenthg (in cms): 150.0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length (in meter) = 1.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Length (in meters): 1.669\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length (in cms) = 166.9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strconv.cpp, Page no-506" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "BUFF_SIZE=50\n", + "class string:\n", + " __Str=[None]*BUFF_SIZE\n", + " def __init__(self, MyStr=None):\n", + " if isinstance(MyStr, str):\n", + " self.__Str=MyStr\n", + " else:\n", + " self.__Str=\"\"\n", + " def echo(self):\n", + " print self.__Str\n", + " def char(self):\n", + " return self.__Str\n", + "msg=\"OOPs the Great\"\n", + "str1=string(msg)\n", + "print \"str1 =\",\n", + "str1.echo()\n", + "str2=string(\"It is nice to learn\")\n", + "receive=str2.char()\n", + "print \"Str2 =\", receive" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "str1 = OOPs the Great\n", + "Str2 = It is nice to learn\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-d2r1.cpp, Page no-509 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "PI=3.141592654\n", + "class Radian:\n", + " __rad=float\n", + " def __init__(self, InitRad=0.0):\n", + " self.__rad=InitRad\n", + " def GetRadian(self):\n", + " return self.__rad\n", + " def Output(self):\n", + " print \"Radian =\", self.GetRadian()\n", + "class Degree:\n", + " __degree=float\n", + " def __init__(self):\n", + " self.__degree=0.0\n", + " def Radian(self):\n", + " return ( Radian(self.__degree * PI / 180.0))\n", + " def Input(self):\n", + " self.__degree=float(raw_input(\"Enter degree: \"))\n", + "deg1=Degree()\n", + "deg1.Input()\n", + "rad1=deg1.Radian()\n", + "rad1.Output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter degree: 180\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radian = 3.141592654\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-d2r2.cpp, Page no-512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "PI=3.141592654\n", + "class Degree:\n", + " __degree=float\n", + " def __init__(self):\n", + " self.__degree=0.0\n", + " def GetDegree(self):\n", + " return self.__degree\n", + " def Input(self):\n", + " self.__degree=float(raw_input(\"Enter degree: \"))\n", + "class Radian:\n", + " __rad=float\n", + " def __init__(self, deg=None):\n", + " if isinstance(deg , Degree):\n", + " self.__rad=deg.GetDegree()*PI/180.0\n", + " else:\n", + " self.__rad=0.0\n", + " def GetRadian(self):\n", + " return self.__rad\n", + " def Output(self):\n", + " print \"Radian =\", self.GetRadian()\n", + "deg1=Degree()\n", + "deg1.Input()\n", + "rad1=Radian(deg1)\n", + "rad1.Output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter degree: 90\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radian = 1.570796327\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-degrad.cpp, Page no-514" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "PI=3.141592654\n", + "class Radian:\n", + " __rad=float\n", + " def __init__(self, InitRad=0.0):\n", + " self.__rad=InitRad\n", + " def GetRadian(self):\n", + " return self.__rad\n", + " def Input(self):\n", + " self.__rad=float(raw_input(\"Enter radian: \"))\n", + " def Output(self):\n", + " print \"Radian =\", self.GetRadian()\n", + "class Degree:\n", + " __degree=float\n", + " def __init__(self, rad=None):\n", + " if isinstance(rad, Radian):\n", + " self.__degree=rad.GetRadian()*180.0/PI\n", + " else:\n", + " self.__degree=0.0\n", + " def GetDegree(self):\n", + " return self.__degree\n", + " def Radian(self):\n", + " return ( Radian(self.__degree * PI / 180.0))\n", + " def Input(self):\n", + " self.__degree=float(raw_input(\"Enter degree: \"))\n", + " def Output(self):\n", + " print \"Degree =\", self.__degree\n", + "deg1=Degree()\n", + "deg1.Input()\n", + "rad1=deg1.Radian()\n", + "rad1.Output()\n", + "rad2=Radian()\n", + "rad2.Input()\n", + "deg2=Degree(rad2)\n", + "deg2.Output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter degree: 180\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radian = 3.141592654\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter radian: 3.142\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degree = 180.023339207\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-script.cpp, Page no-516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class AccountEntry(Structure):\n", + " _fields_=[('number',c_int), ('name', c_char*25)]\n", + "class AccountBook:\n", + " __aCount=int\n", + " __account=[AccountEntry]\n", + " def __init__(self, aCountIn):\n", + " self.__aCount=aCountIn\n", + " for i in range(self.__aCount):\n", + " self.__account.append(AccountEntry())\n", + " def op(self, nameIn):\n", + " if isinstance(nameIn, str):\n", + " for i in range(self.__aCount):\n", + " if nameIn==self.__account[i].name:\n", + " return self.__account[i].number\n", + " elif isinstance(nameIn, int): #numberIn\n", + " for i in range(self.__aCount):\n", + " #print self.__account[i].number\n", + " if nameIn==self.__account[i].number:\n", + " return self.__account[i].name\n", + " def AccountEntry(self):\n", + " for i in range(self.__aCount):\n", + " self.__account[i].number=int(raw_input(\"Account Number: \"))\n", + " self.__account[i].name=raw_input(\"Account Holder Name: \")\n", + "accounts=AccountBook(5)\n", + "print \"Building 5 Customers Database\"\n", + "accounts.AccountEntry()\n", + "print \"Accessing Accounts Information\"\n", + "accno=int(raw_input(\"To access Name Enter Account Number: \"))\n", + "print \"Name:\",accounts.op(accno) #accounts[accno]\n", + "name=raw_input(\"To access Account Number, Enter Name: \")\n", + "print \"Account Number:\",accounts.op(name) #accounts[name]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Building 5 Customers Database\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Holder Name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Holder Name: Kiran\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Holder Name: Ravishanker\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Holder Name: Anand\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Holder Name: Sindhu\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accessing Accounts Information\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "To access Name Enter Account Number: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "To access Account Number, Enter Name: Sindhu\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Account Number: 5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex6.cpp, Page no-519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def readdata(self):\n", + " self._Complex__real=float(raw_input(\"Real part ? \"))\n", + " self._Complex__imag=float(raw_input(\"Imag part ? \"))\n", + "def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self._Complex__real, self._Complex__imag)\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " readdata=readdata\n", + " outdata=outdata\n", + " def __neg__(self):\n", + " return neg(self)\n", + "#friend function overloading unary minus operator\n", + "def neg(c1):\n", + " c=Complex()\n", + " c._Complex__real=-c1._Complex__real\n", + " c._Complex__imag=-c1._Complex__imag\n", + " return c\n", + "c1=Complex()\n", + "c2=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.readdata()\n", + "c2=-c1\n", + "c1.outdata(\"Complex c1 : \")\n", + "c2.outdata(\"Complex c2 = -Complex c1: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? -2.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Complex c1 : (1.5, -2.5)\n", + "Complex c2 = -Complex c1: (-1.5, 2.5)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex7.cpp, Page no-520" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def readdata(self):\n", + " self._Complex__real=float(raw_input(\"Real part ? \"))\n", + " self._Complex__imag=float(raw_input(\"Imag part ? \"))\n", + "def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self._Complex__real, self._Complex__imag)\n", + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " readdata=readdata\n", + " outdata=outdata\n", + " def __neg__(self):\n", + " return neg(self)\n", + "#friend function overloading unary minus operator\n", + "def neg(c1):\n", + " c1._Complex__real=-c1._Complex__real\n", + " c1._Complex__imag=-c1._Complex__imag\n", + "c1=Complex()\n", + "print \"Enter Complex Number c1...\"\n", + "c1.readdata()\n", + "-c1\n", + "c1.outdata(\"Complex c1 : \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? -2.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Complex c1 : (-1.5, 2.5)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex8.cpp, Page no-522" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self, realpart=0):\n", + " if isinstance(realpart, float):\n", + " self.__real=realpart\n", + " self.__imag=0\n", + " def readdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + " def __add__(self, c2):\n", + " return add(self, c2)\n", + "#friend function overloading + operator\n", + "def add(c1, c2):\n", + " c=Complex()\n", + " c._Complex__real=c1._Complex__real+c2._Complex__real\n", + " c._Complex__imag=c1._Complex__imag+c2._Complex__imag\n", + " return c\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex(3)\n", + "print \"Enter Complex Number c1...\"\n", + "c1.readdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.readdata()\n", + "c3=c1+c2\n", + "c3.outdata(\"Result of c3 = c1 + c2: \")\n", + "c3=c1+Complex(2.0)\n", + "c3.outdata(\"Result of c3 = c1 + 2.0: \")\n", + "c3=Complex(3.0)+c2\n", + "c3.outdata(\"Result of c3 = 3.0 + c2: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result of c3 = c1 + c2: (4, 6)\n", + "Result of c3 = c1 + 2.0: (3, 2)\n", + "Result of c3 = 3.0 + c2: (6, 4)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex9.cpp, Page no-525" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Complex:\n", + " __real=float\n", + " __imag=float\n", + " def __init__(self, InReal=0):\n", + " if isinstance(InReal, float):\n", + " self.__real=InReal\n", + " self.__imag=0\n", + " def readdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + " def __add__(self, c2):\n", + " return add(self, c2)\n", + "#friend function overloading + operator\n", + "def add(c1, c2):\n", + " c=Complex()\n", + " c._Complex__real=c1._Complex__real+c2._Complex__real\n", + " c._Complex__imag=c1._Complex__imag+c2._Complex__imag\n", + " return c\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex(3)\n", + "print \"Enter Complex Number c1...\"\n", + "c1.readdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.readdata()\n", + "c3=c1+c2\n", + "c3.outdata(\"Result of c3 = c1 + c2: \")\n", + "c3=c1+Complex(2.0)\n", + "c3.outdata(\"Result of c3 = c1 + 2.0: \")\n", + "c3=Complex(3.0)+c2\n", + "c3.outdata(\"Result of c3 = 3.0 + c2: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Result of c3 = c1 + c2: (4, 6)\n", + "Result of c3 = c1 + 2.0: (3, 2)\n", + "Result of c3 = 3.0 + c2: (6, 4)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector.cpp, Page no-528" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __assign__(self, v2):\n", + " print \"Assignment operation invoked\"\n", + " for i in range(v2._vector__size):\n", + " self._vector__v[i]=v2._vector__v[i]\n", + "def show(self):\n", + " for i in range(self._vector__size):\n", + " print self.elem(i), \",\",\n", + "class vector:\n", + " __v=[int]\n", + " __size=int\n", + " def __init__(self, vector_size):\n", + " if isinstance(vector_size, int):\n", + " self.__size=vector_size\n", + " self.__v=[int]*self.__size\n", + " if isinstance(vector_size, vector):\n", + " print \"Copy constructor invoked\"\n", + " self.__size=vector_size.__size\n", + " self.__v=[int]*self.__size\n", + " for i in range(vector_size.__size):\n", + " self.__v[i]=vector_size.__v[i]\n", + " def __del__(self):\n", + " del self.__v\n", + " __assign__=__assign__\n", + " def elem(self, i, x=None):\n", + " if isinstance(x, int):\n", + " if i>=self.__size:\n", + " print \"Error: Out of Range\"\n", + " self.__v[i]=x\n", + " else:\n", + " return self.__v[i]\n", + " show=show\n", + "v1=vector(5)\n", + "v2=vector(5)\n", + "for i in range(5):\n", + " v2.elem(i, i+1)\n", + "v1 = v2\n", + "v3 = vector(v2)\n", + "print \"Vector v1:\",\n", + "v1.show()\n", + "print \"\\nVector v2:\",\n", + "v2.show()\n", + "print \"\\nVector v3:\",\n", + "v3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Copy constructor invoked\n", + "Vector v1: 1 , 2 , 3 , 4 , 5 , \n", + "Vector v2: 1 , 2 , 3 , 4 , 5 , \n", + "Vector v3: 1 , 2 , 3 , 4 , 5 ,\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mleak.cpp, Page no-530" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "vector=[int]*10\n", + "buffer=[chr]*6\n", + "for i in range(10):\n", + " vector[i]=i+1\n", + "buffer=\"hello\"\n", + "for i in range(10):\n", + " print vector[i],\n", + "print \"\\nbuffer =\", buffer\n", + "del vector" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4 5 6 7 8 9 10 \n", + "buffer = hello\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-misuse.cpp, Page no-533" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class number:\n", + " __num=int\n", + " def read(self):\n", + " self.__num=int(raw_input())\n", + " def get(self):\n", + " return self.__num\n", + " def __add__(self, num2):\n", + " Sum=number()\n", + " Sum.__num=self.__num-num2.__num #subtraction instead of addition\n", + " return Sum\n", + "num1=number()\n", + "num2=number()\n", + "Sum=number()\n", + "print \"Enter Number 1: \",\n", + "num1.read()\n", + "print \"Enter Number 2: \",\n", + "num2.read()\n", + "Sum=num1+num2 #addition of two numbers\n", + "print \"sum = num1 + num2 =\", Sum.get()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Number 1: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Number 2: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " sum = num1 + num2 = -5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __add__(self, d2):\n", + " temp_date=date()\n", + " temp_date._date__sec=self._date__sec+d2._date__sec\n", + " if(temp_date._date__sec>=60):\n", + " temp_date._date__min+=1\n", + " temp_date._date__sec=temp_date._date__sec-60\n", + " temp_date._date__min=temp_date._date__min+self._date__min+d2._date__min\n", + " if(temp_date._date__min>=60):\n", + " temp_date._date__hr+=1\n", + " temp_date._date__min=temp_date._date__min-60\n", + " temp_date._date__hr=self._date__hr+d2._date__hr\n", + " return temp_date\n", + "class date:\n", + " __hr=int\n", + " __min=int\n", + " __sec=int\n", + " def __init__(self, h=0, m=0, s=0):\n", + " self.__hr=h\n", + " self.__min=m\n", + " self.__sec=s\n", + " def show(self):\n", + " print \"%d hours, %d minutes, %d seconds\" %(self.__hr, self.__min, self.__sec),\n", + " __add__=__add__\n", + "date1=date(2, 4, 56)\n", + "date2=date(10, 59, 11)\n", + "date3=date()\n", + "date3=date1+date2\n", + "date1.show()\n", + "print \"+\",\n", + "date2.show()\n", + "print \"=\",\n", + "date3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 hours, 4 minutes, 56 seconds + 10 hours, 59 minutes, 11 seconds = 12 hours, 4 minutes, 7 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __add__(self, b2):\n", + " temp_basket=basket()\n", + " temp_basket._basket__apples=self._basket__apples+b2._basket__apples\n", + " temp_basket._basket__mangoes=self._basket__mangoes+b2._basket__mangoes\n", + " return temp_basket\n", + "class basket:\n", + " __apples=int\n", + " __mangoes=int\n", + " def __init__(self, a=0, m=0):\n", + " self.__apples=a\n", + " self.__mangoes=m\n", + " def show(self):\n", + " print self.__apples, \" Apples and\", self.__mangoes, \" Mangoes\"\n", + " __add__=__add__ # overloading + operator\n", + "basket1=basket(7, 10)\n", + "basket2=basket(4, 5)\n", + "basket3=basket()\n", + "print \"Basket 1 contains:\"\n", + "basket1.show()\n", + "print \"Basket 2 contains:\"\n", + "basket2.show()\n", + "basket3=basket1+basket2 #using overloaded + operator\n", + "print \"Adding fruits from Basket 1 and Basket 2 results in:\"\n", + "basket3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Basket 1 contains:\n", + "7 Apples and 10 Mangoes\n", + "Basket 2 contains:\n", + "4 Apples and 5 Mangoes\n", + "Adding fruits from Basket 1 and Basket 2 results in:\n", + "11 Apples and 15 Mangoes\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter14-Inheritance_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter14-Inheritance_1.ipynb new file mode 100755 index 00000000..a617fa5c --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter14-Inheritance_1.ipynb @@ -0,0 +1,2736 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:63736c9aef28a6babc99661e161907400b7b80441a3f765e7ab8b6e00648ce25" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14- Inheritance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-bag.cpp, Page-544" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(false, true)=(0, 1) #enum type\n", + "type =['false', 'true']\n", + "MAX_ITEMS=25\n", + "def IsExist(self, item):\n", + " for i in range(self._Bag__ItemCount):\n", + " if self._Bag__contents[i]==item:\n", + " return true\n", + " return false\n", + "def show(self):\n", + " for i in range(self._Bag__ItemCount):\n", + " print self._Bag__contents[i],\n", + " print \"\"\n", + "class Bag:\n", + " __contents=[int]*MAX_ITEMS #protected members\n", + " __ItemCount=int\n", + " def __init__(self):\n", + " self.__ItemCount=0\n", + " def put(self, item):\n", + " self.__contents[self.__ItemCount]=item\n", + " self.__ItemCount+=1\n", + " def IsEmpty(self):\n", + " return true if self.__ItemCount==0 else false\n", + " def IsFull(self):\n", + " return true if self.__ItemCount==MAX_ITEMS else false\n", + " IsExist=IsExist\n", + " show=show\n", + "bag=Bag()\n", + "item=int\n", + "while(true):\n", + " item=int(raw_input(\"Enter Item Number to be put into the bag <0-no item>: \"))\n", + " if item==0:\n", + " break\n", + " bag.put(item)\n", + " print \"Items in Bag:\",\n", + " bag.show()\n", + " if bag.IsFull():\n", + " print \"Bag Full, no more items can be placed\"\n", + " break" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in Bag: 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in Bag: 1 2 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in Bag: 1 2 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in Bag: 1 2 3 3 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Items in Bag: 1 2 3 3 1 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Number to be put into the bag <0-no item>: 0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-union.cpp, Page no-548" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(false, true)=(0, 1) #enum type\n", + "type =['false', 'true']\n", + "MAX_ITEMS=25\n", + "def IsExist(self, item):\n", + " for i in range(self._Bag__ItemCount):\n", + " if self._Bag__contents[i]==item:\n", + " return true\n", + " return false\n", + "def show(self):\n", + " for i in range(self._Bag__ItemCount):\n", + " print self._Bag__contents[i],\n", + " print \"\"\n", + "class Bag:\n", + " #protected members\n", + " __ItemCount=int\n", + " def __init__(self):\n", + " self.__ItemCount=0\n", + " self.__contents=[int]*MAX_ITEMS\n", + " def put(self, item):\n", + " self.__contents[self.__ItemCount]=item\n", + " self.__ItemCount+=1\n", + " def IsEmpty(self):\n", + " return true if self.__ItemCount==0 else false\n", + " def IsFull(self):\n", + " return true if self.__ItemCount==MAX_ITEMS else false\n", + " IsExist=IsExist\n", + " show=show\n", + "def read(self):\n", + " while(true):\n", + " element=int(raw_input(\"Enter Set Element <0-end>: \"))\n", + " if element==0:\n", + " break\n", + " self.Add(element)\n", + "def add(s1, s2):\n", + " temp = Set()\n", + " temp=s1\n", + " for i in range(s2._Bag__ItemCount):\n", + " if s1.IsExist(s2._Bag__contents[i])==false:\n", + " temp.Add(s2._Bag__contents[i])\n", + " return temp\n", + "class Set(Bag):\n", + " def Add(self,element):\n", + " if(self.IsExist(element)==false and self.IsFull()==false):\n", + " self.put(element)\n", + " read=read\n", + " def __assign__(self, s2):\n", + " for i in range(s2._Bag__ItemCount):\n", + " self.__contents[i]=s2.__contents[i]\n", + " self.__ItemCount=s2.__ItemCount\n", + " def __add__(self, s2):\n", + " return add(self, s2)\n", + "s1=Set()\n", + "s2=Set()\n", + "s3=Set()\n", + "print \"Enter Set 1 elements..\"\n", + "s1.read()\n", + "print \"Enter Set 2 elemets..\"\n", + "s2.read()\n", + "s3=s1+s2\n", + "print \"Union of s1 and s2 :\",\n", + "s3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set 1 elements..\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set 2 elemets..\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Union of s1 and s2 : 1 2 3 4 5 6 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons1.cpp, Page no-558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " pass\n", + "class D(B):\n", + " def msg(self):\n", + " print \"No constructors exist in base and derived class\"\n", + "objd=D()\n", + "objd.msg()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No constructors exist in base and derived class\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons2.cpp, Page no-558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " def __init__(self):\n", + " print \"No-argument constructor of base class B is executed\"\n", + "class D(B):\n", + " pass\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of base class B is executed\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons3.cpp, Page no-559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " pass\n", + "class D(B):\n", + " def __init__(self):\n", + " print \"Constructors exist only in derived class\"\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructors exist only in derived class\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons4.cpp, Page no-559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " def __init__(self):\n", + " print \"No-argument constructor of base class B executed first\"\n", + "class D(B):\n", + " def __init__(self):\n", + " B.__init__(self)\n", + " print \"No-argument constructor of derived class D executed next\"\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of base class B executed first\n", + "No-argument constructor of derived class D executed next\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons5.cpp, Page no-560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " def __init__(self, a=0):\n", + " if isinstance(a, int):\n", + " print \"One-argument constructor of the base class B\"\n", + " else:\n", + " print \"No-argument constructor of the base class B\"\n", + "class D(B):\n", + " def __init__(self, a):\n", + " B.__init__(self, a)\n", + " print \"One-argument constructor of the derived class D\"\n", + "objd=D(3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "One-argument constructor of the base class B\n", + "One-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons7.cpp, Page no-561" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " def __init__(self, a):\n", + " print \"One-argument constructor of the base class B\"\n", + "class D(B):\n", + " def __init__(self, a):\n", + " B(a)\n", + " print \"One-argument constructor of the derived class D\"\n", + "objd=D(3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "One-argument constructor of the base class B\n", + "One-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons8.cpp, Page no-562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B1:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B1\"\n", + "class B2:\n", + " def __init__(self):\n", + " B1.__init__(self)\n", + " print \"No-argument constructor of the base class B2\"\n", + "class D(B2, B1):\n", + " def __init__(self):\n", + " B2.__init__(self)\n", + " print \"No-argument constructor of the derived class D\"\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of the base class B1\n", + "No-argument constructor of the base class B2\n", + "No-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons9.cpp, Page no-563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B1:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B1\"\n", + "class B2:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B2\"\n", + "class D(B1, B2):\n", + " def __init__(self):\n", + " B1()\n", + " B2()\n", + " print \"No-argument constructor of the derived class D\"\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of the base class B1\n", + "No-argument constructor of the base class B2\n", + "No-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons10.cpp, Page no-563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B1:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B1\"\n", + "class B2:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B2\"\n", + "class D(B1, B2):\n", + " def __init__(self):\n", + " B2()\n", + " B1()\n", + " print \"No-argument constructor of the derived class D\"\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of the base class B2\n", + "No-argument constructor of the base class B1\n", + "No-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons11.cpp, Page no-564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " def __init__(self):\n", + " print \"No-argument constructor of a base class B\"\n", + "class D1(B):\n", + " def __init__(self):\n", + " B.__init__(self)\n", + " print \"No-argument constructor of a base class D1\"\n", + "class D2(D1):\n", + " def __init__(self):\n", + " D1.__init__(self)\n", + " print \"No-argument constructor of a derived class D2\"\n", + "objd=D2()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of a base class B\n", + "No-argument constructor of a base class D1\n", + "No-argument constructor of a derived class D2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons12.cpp, Page no-566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B1:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B1\"\n", + " def __del__(self):\n", + " print \"Desctructor in the base class B1\"\n", + "class B2:\n", + " def __init__(self):\n", + " print \"No-argument constructor of the base class B2\"\n", + " def __del__(self):\n", + " print \"Desctructor in the base class B2\"\n", + "class D(B1, B2):\n", + " def __init__(self):\n", + " B1.__init__(self)\n", + " B2.__init__(self)\n", + " print \"No-argument constructor of the derived class D\"\n", + " def __del__(self):\n", + " print \"Desctructor in the derived class D\"\n", + " for b in self.__class__.__bases__:\n", + " b.__del__(self)\n", + "objd=D()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No-argument constructor of the base class B1\n", + "No-argument constructor of the base class B2\n", + "No-argument constructor of the derived class D\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons13.cpp, Page no-568" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " __x=int\n", + " __y=int\n", + " def __init__(self, a, b):\n", + " self.__x=a\n", + " self.__y=b\n", + "class D(B):\n", + " __a=int\n", + " __b=int\n", + " def __init__(self, p, q, r):\n", + " self.__a=p\n", + " B.__init__(self, p, q)\n", + " self.__b=r\n", + " def output(self):\n", + " print \"x =\", self._B__x\n", + " print \"y =\", self._B__y\n", + " print \"a =\", self.__a\n", + " print \"b =\", self.__b\n", + "objd=D(5, 10, 15)\n", + "objd.output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x = 5\n", + "y = 10\n", + "a = 5\n", + "b = 15\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-runtime.cpp, Page no-570" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " __x=int\n", + " __y=int(0) #initialization\n", + " def __init__(self, a, b):\n", + " self.__x=self.__y+b\n", + " self.__y=a\n", + " def Print(self):\n", + " print \"x =\", self.__x\n", + " print \"y =\", self.__y\n", + "b = B(2, 3)\n", + "b.Print()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x = 3\n", + "y = 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cons14.cpp, Page no-570" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " __x=int\n", + " __y=int\n", + " def read(self):\n", + " self.__x=int(raw_input(\"X in class B ? \"))\n", + " self.__y=int(raw_input(\"Y in class B ? \"))\n", + " def show(self):\n", + " print \"X in class B =\", self.__x\n", + " print \"Y in class B =\", self.__y\n", + "class D(B):\n", + " __y=int\n", + " __z=int\n", + " def read(self):\n", + " B.read(self)\n", + " self.__y=int(raw_input(\"Y in class D ? \"))\n", + " self.__z=int(raw_input(\"Z in class D ? \"))\n", + " def show(self):\n", + " B.show(self)\n", + " print \"Y in class D =\", self.__y\n", + " print \"Z in class D =\", self.__z\n", + " print \"Y of B, show from D =\", self._B__y\n", + "objd=D()\n", + "print \"Enter data for object of class D..\"\n", + "objd.read()\n", + "print \"Contents of object of class D..\"\n", + "objd.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for object of class D..\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "X in class B ? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y in class B ? 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y in class D ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Z in class D ? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contents of object of class D..\n", + "X in class B = 1\n", + "Y in class B = 2\n", + "Y in class D = 3\n", + "Z in class D = 4\n", + "Y of B, show from D = 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-stack.cpp, Page no-573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_ELEMENTS=5\n", + "class Stack:\n", + " __stack=[int]*(MAX_ELEMENTS+1)\n", + " __StackTop=int\n", + " def __init__(self):\n", + " self.__StackTop=0\n", + " def push(self, element):\n", + " self.__StackTop+=1\n", + " self.__stack[self.__StackTop]=element\n", + " def pop(self, element):\n", + " element=self.__stack[self.__StackTop]\n", + " self.__StackTop-=1\n", + " return element\n", + "class MyStack(Stack):\n", + " def push(self, element):\n", + " if self._Stack__StackTop0:\n", + " element=Stack.pop(self, element)\n", + " return element\n", + " print \"Stack Underflow\"\n", + " return 0\n", + "stack=MyStack()\n", + "print \"Enter Integer data to put into the stack...\"\n", + "while(1):\n", + " element=int(raw_input(\"Element to Push ? \"))\n", + " if stack.push(element)==0:\n", + " break\n", + "print \"The Stack Contains...\"\n", + "element=stack.pop(element)\n", + "while element:\n", + " print \"pop:\", element\n", + " element=stack.pop(element)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Integer data to put into the stack...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element to Push ? 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Stack Overflow\n", + "The Stack Contains...\n", + "pop: 5\n", + "pop: 4\n", + "pop: 3\n", + "pop: 2\n", + "pop: 1\n", + "Stack Underflow\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-exam.cpp, Page no-577" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_LEN=25\n", + "class person:\n", + " __name=[chr]*MAX_LEN\n", + " __sex=chr\n", + " __age=int\n", + " def ReadData(self):\n", + " self.__name=raw_input(\"Name ? \")\n", + " self.__sex=str(raw_input(\"Sex ? \"))\n", + " self.__age=int(raw_input(\"Age ? \"))\n", + " def DisplayData(self):\n", + " print \"Name:\", self.__name\n", + " print \"Sex: \", self.__sex\n", + " print \"Age: \", self.__age\n", + "class student(person):\n", + " __RollNo=int\n", + " __branch=[chr]*20\n", + " def ReadData(self):\n", + " person.ReadData(self) #invoking member function ReadData of base class person\n", + " self.__RollNo=int(raw_input(\"Roll Number ? \"))\n", + " self.__branch=raw_input(\"Branch Studying ? \")\n", + " def DisplayData(self):\n", + " person.DisplayData(self) #invoking member function DisplayData of base class person\n", + " print \"Roll Number:\", self.__RollNo\n", + " print \"Branch:\", self.__branch\n", + "class exam(student):\n", + " __Sub1Marks=int\n", + " __Sub2Marks=int\n", + " def ReadData(self):\n", + " student.ReadData(self) #invoking member function ReadData of base class student\n", + " self.__Sub1Marks=int(raw_input(\"Marks scored in Subject 1 < Max:100> ? \"))\n", + " self.__Sub2Marks=int(raw_input(\"Marks scored in Subject 2 < Max:100> ? \"))\n", + " def DisplayData(self):\n", + " student.DisplayData(self) #invoking member function DisplayData of base class student\n", + " print \"Marks scored in Subject 1:\", self.__Sub1Marks\n", + " print \"Marks scored in Subject 2:\", self.__Sub2Marks\n", + " print \"Total Marks Scored:\", self.TotalMarks()\n", + " def TotalMarks(self):\n", + " return self.__Sub1Marks+self.__Sub2Marks\n", + "annual=exam()\n", + "print \"Enter data for Student...\"\n", + "annual.ReadData()\n", + "print \"Student Details...\"\n", + "annual.DisplayData()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for Student...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sex ? M\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age ? 24\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch Studying ? Computer-Technology\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 1 < Max:100> ? 92\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 2 < Max:100> ? 88\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Details...\n", + "Name: Rajkumar\n", + "Sex: M\n", + "Age: 24\n", + "Roll Number: 9\n", + "Branch: Computer-Technology\n", + "Marks scored in Subject 1: 92\n", + "Marks scored in Subject 2: 88\n", + "Total Marks Scored: 180\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mul_inh1.cpp, Page no-580" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "class A:\n", + " def __init__(self):\n", + " sys.stdout.write('a'),\n", + "class B:\n", + " def __init__(self):\n", + " sys.stdout.write('b'),\n", + "class C(A, B):\n", + " def __init__(self):\n", + " A.__init__(self)\n", + " B.__init__(self)\n", + " sys.stdout.write('c'),\n", + "objc=C()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "abc" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mul_inh2.cpp, Page no-581" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class A:\n", + " def __init__(self, c):\n", + " sys.stdout.write(c),\n", + "class B:\n", + " def __init__(self, b):\n", + " sys.stdout.write(b),\n", + "class C(A, B):\n", + " def __init__(self, c1, c2, c3):\n", + " A.__init__(self, c1)\n", + " B.__init__(self, c2)\n", + " sys.stdout.write(c3),\n", + "objc=C('a', 'b', 'c')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "abc" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mul_inh4.cpp, Page no-583" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "class A:\n", + " __ch=chr\n", + " def __init__(self, c):\n", + " self.__ch=c\n", + " def show(self):\n", + " sys.stdout.write(self.__ch),\n", + "class B:\n", + " __ch=chr\n", + " def __init__(self, b):\n", + " self.__ch=b\n", + " def show(self):\n", + " sys.stdout.write(self.__ch),\n", + "class C(A, B):\n", + " __ch=chr\n", + " def __init__(self, c1, c2, c3):\n", + " A.__init__(self, c1)\n", + " B.__init__(self, c2)\n", + " self.__ch=c3\n", + "objc=C('a', 'b', 'c')\n", + "print \"objc.A::show() = \",\n", + "A.show(objc)\n", + "print \"\\nobjc.B::show() = \",\n", + "B.show(objc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "objc.A::show() = a \n", + "objc.B::show() = b\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mul_inh5.cpp, Page no-584" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "class A:\n", + " __ch=chr\n", + " def __init__(self, c):\n", + " self.__ch=c\n", + " def show(self):\n", + " sys.stdout.write(self.__ch),\n", + "class B:\n", + " __ch=chr\n", + " def __init__(self, b):\n", + " self.__ch=b\n", + " def show(self):\n", + " sys.stdout.write(self.__ch),\n", + "class C(A, B):\n", + " __ch=chr\n", + " def __init__(self, c1, c2, c3):\n", + " A.__init__(self, c1)\n", + " B.__init__(self, c2)\n", + " self.__ch=c3\n", + " def show(self):\n", + " A.show(self)\n", + " B.show(self)\n", + " sys.stdout.write(self.__ch),\n", + "objc=C('a', 'b', 'c')\n", + "print \"objc.show() = \",\n", + "objc.show()\n", + "print \"\\nobjc.C::show() = \",\n", + "C.show(objc)\n", + "print \"\\nobjc.A::show() = \",\n", + "A.show(objc)\n", + "print \"\\nobjc.B::show() = \",\n", + "B.show(objc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "objc.show() = abc \n", + "objc.C::show() = abc \n", + "objc.A::show() = a \n", + "objc.B::show() = b\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-publish1.cpp, Page no-586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class publication:\n", + " __title=[chr]*40\n", + " __price=float\n", + " def getdata(self):\n", + " self.__title=raw_input(\"\\tEnter Title: \")\n", + " self.__price=float(raw_input(\"\\tEnter Price: \"))\n", + " def display(self):\n", + " print \"\\tTitle =\", self.__title\n", + " print \"\\tPrice = %g\" %(self.__price)\n", + "class sales:\n", + " __PublishSales=[]\n", + " def __init__(self):\n", + " self.__PublishSales=[float]*3\n", + " def getdata(self):\n", + " for i in range(3):\n", + " print \"\\tEnter Sales of\", i+1, \"Month: \",\n", + " self.__PublishSales[i]=float(raw_input())\n", + " def display(self):\n", + " TotalSales=0\n", + " for i in range(3):\n", + " print \"\\tSales of\", i+1, \"Month = %g\" %(self.__PublishSales[i])\n", + " TotalSales+=self.__PublishSales[i]\n", + " print \"\\tTotalSales = %g\" %(TotalSales)\n", + "class book(publication, sales):\n", + " __pages=int\n", + " def getdata(self):\n", + " publication.getdata(self)\n", + " self.__pages=int(raw_input(\"\\tEnter Number of Pages: \"))\n", + " sales.getdata(self)\n", + " def display(self):\n", + " publication.display(self)\n", + " print \"\\tNumber of Pages = %g\" %(self.__pages)\n", + " sales.display(self)\n", + "class tape(publication, sales):\n", + " __PlayTime=int\n", + " def getdata(self):\n", + " publication.getdata(self)\n", + " self.__PlayTime=int(raw_input(\"\\tEnter Playing Time in Minute: \"))\n", + " sales.getdata(self)\n", + " def display(self):\n", + " publication.display(self)\n", + " print \"\\tPlaying Time in Minute = %g\" %(self.__PlayTime)\n", + " sales.display(self)\n", + "class pamphlet(publication):\n", + " pass\n", + "class notice(pamphlet):\n", + " __whom=[chr]*20\n", + " def getdata(self):\n", + " pamphlet.getdata(self)\n", + " self.__whom=raw_input(\"\\tEnter Type of Distributor: \")\n", + " def display(self):\n", + " pamphlet.display(self)\n", + " print \"\\tType of Distributor =\", self.__whom\n", + "book1=book()\n", + "tape1=tape()\n", + "pamp1=pamphlet()\n", + "notice1=notice()\n", + "print \"Enter Book Publication Data...\"\n", + "book1.getdata()\n", + "print \"Enter Tape Publication Data...\"\n", + "tape1.getdata()\n", + "print \"Enter Pamhlet Publication Data...\"\n", + "pamp1.getdata()\n", + "print \"Enter Notice Publication Data...\"\n", + "notice1.getdata()\n", + "print \"Book Publication Data...\"\n", + "book1.display()\n", + "print \"Tape Publication Data...\"\n", + "tape1.display()\n", + "print \"Pamphlet Publication Data...\"\n", + "pamp1.display()\n", + "print \"Notice Publication Data...\"\n", + "notice1.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Book Publication Data...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Title: Microprocessor-x86-Programming\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Price: 180\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Number of Pages: 750\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Sales of 1 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 2 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 3 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "800\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Tape Publication Data...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Title: Love-1947\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Price: 100\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Playing Time in Minute: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Sales of 1 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "200\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 2 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 3 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "400\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Pamhlet Publication Data...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Title: Advanced-Computing-95-Conference\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Price: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Notice Publication Data...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Title: General-Meeting\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Price: 100\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Type of Distributor: Retail\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Book Publication Data...\n", + "\tTitle = Microprocessor-x86-Programming\n", + "\tPrice = 180\n", + "\tNumber of Pages = 750\n", + "\tSales of 1 Month = 1000\n", + "\tSales of 2 Month = 500\n", + "\tSales of 3 Month = 800\n", + "\tTotalSales = 2300\n", + "Tape Publication Data...\n", + "\tTitle = Love-1947\n", + "\tPrice = 100\n", + "\tPlaying Time in Minute = 10\n", + "\tSales of 1 Month = 200\n", + "\tSales of 2 Month = 500\n", + "\tSales of 3 Month = 400\n", + "\tTotalSales = 1100\n", + "Pamphlet Publication Data...\n", + "\tTitle = Advanced-Computing-95-Conference\n", + "\tPrice = 10\n", + "Notice Publication Data...\n", + "\tTitle = General-Meeting\n", + "\tPrice = 100\n", + "\tType of Distributor = Retail\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vehicle.cpp, Page no-591" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_LEN=25\n", + "class Vehicle:\n", + " __name=[chr]*MAX_LEN\n", + " __WheelsCount=int\n", + " def GetData(self):\n", + " self.__name=raw_input(\"Name of the Vehicle ? \")\n", + " self.__WheelsCount=int(raw_input(\"Wheels ? \"))\n", + " def DisplayData(self):\n", + " print \"Name of the Vehicle :\", self.__name \n", + " print \"Wheels :\", self.__WheelsCount\n", + "class LightMotor(Vehicle):\n", + " __SpeedLimit=int\n", + " def GetData(self):\n", + " Vehicle.GetData(self)\n", + " self.__SpeedLimit=int(raw_input(\"Speed Limit ? \"))\n", + " def DisplayData(self):\n", + " Vehicle.DisplayData(self)\n", + " print \"Speed Limit :\", self.__SpeedLimit\n", + "class HeavyMotor(Vehicle):\n", + " __permit=[chr]*MAX_LEN\n", + " __LoadCapacity=int\n", + " def GetData(self):\n", + " Vehicle.GetData(self)\n", + " self.__LoadCapacity=int(raw_input(\"Load Carrying Capacity ? \"))\n", + " self.__permit=raw_input(\"Permit Type ? \")\n", + " def DisplayData(self):\n", + " Vehicle.DisplayData(self)\n", + " print \"Load Carrying Capacity : \", self.__LoadCapacity \n", + " print \"Permit:\", self.__permit\n", + "class GearMotor(LightMotor):\n", + " __GearCount=int\n", + " def GetData(self):\n", + " LightMotor.GetData(self)\n", + " self.__GearCount=int(raw_input(\"No. of Gears ? \"))\n", + " def DisplayData(self):\n", + " LightMotor.DisplayData(self)\n", + " print \"Gears :\", self.__GearCount\n", + "class NonGearMotor(LightMotor):\n", + " def GetData(self):\n", + " LightMotor.Getdata(self)\n", + " def DisplayData(self):\n", + " LightMotor.DisplayData(self)\n", + "class Passenger(HeavyMotor):\n", + " __sitting=int\n", + " __standing=int\n", + " def GetData(self):\n", + " HeavyMotor.GetData(self)\n", + " self.__sitting=int(raw_input(\"Maximum Seats ? \"))\n", + " self.__standing=int(raw_input(\"Maximum Standing ? \"))\n", + " def DisplayData(self):\n", + " HeavyMotor.DisplayData(self)\n", + " print \"Maximum Seats:\", self.__sitting\n", + " print \"Maximum Standing:\", self.__standing\n", + "class Goods(HeavyMotor):\n", + " def GetData(self):\n", + " HeavyMotor.Getdata(self)\n", + " def DisplayData(self):\n", + " HeavyMotor.DisplayData(self)\n", + "vehi1=GearMotor()\n", + "vehi2=Passenger()\n", + "print \"Enter Data for Gear Motor Vehicle...\"\n", + "vehi1.GetData()\n", + "print \"Enter Data for Passenger Motor Vehicle...\"\n", + "vehi2.GetData()\n", + "print \"Data of Gear Motor Vehicle...\"\n", + "vehi1.DisplayData()\n", + "print \"Data of Passenger Motor Vehicle...\"\n", + "vehi2.DisplayData()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Data for Gear Motor Vehicle...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the Vehicle ? Maruti-Car\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wheels ? 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed Limit ? 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of Gears ? 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Data for Passenger Motor Vehicle...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name of the Vehicle ? KSRTC-BUS\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wheels ? 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load Carrying Capacity ? 60\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Permit Type ? National\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Seats ? 45\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Standing ? 60\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Data of Gear Motor Vehicle...\n", + "Name of the Vehicle : Maruti-Car\n", + "Wheels : 4\n", + "Speed Limit : 4\n", + "Gears : 5\n", + "Data of Passenger Motor Vehicle...\n", + "Name of the Vehicle : KSRTC-BUS\n", + "Wheels : 4\n", + "Load Carrying Capacity : 60\n", + "Permit: National\n", + "Maximum Seats: 45\n", + "Maximum Standing: 60\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-int_ext.cpp, Page no-595" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_LEN=25\n", + "class student():\n", + " __RollNo=int\n", + " __branch=[chr]*20\n", + " def ReadStudentData(self):\n", + " self.__RollNo=int(raw_input(\"Roll Number ? \"))\n", + " self.__branch=raw_input(\"Branch Studying ? \")\n", + " def DisplayStudentData(self):\n", + " print \"Roll Number:\", self.__RollNo\n", + " print \"Branch:\", self.__branch\n", + "class InternalExam(student):\n", + " __Sub1Marks=int\n", + " __Sub2Marks=int\n", + " def ReadData(self):\n", + " self.__Sub1Marks=int(raw_input(\"Marks scored in Subject 1 < Max:100> ? \"))\n", + " self.__Sub2Marks=int(raw_input(\"Marks scored in Subject 2 < Max:100> ? \"))\n", + " def DisplayData(self):\n", + " print \"Internal Marks scored in Subject 1:\", self.__Sub1Marks\n", + " print \"Internal Marks scored in Subject 2:\", self.__Sub2Marks\n", + " print \"Internal Total Marks Scored:\", self.TotalMarks()\n", + " def InternalTotalMarks(self):\n", + " return self.__Sub1Marks+self.__Sub2Marks\n", + "class ExternalExam(student):\n", + " __Sub1Marks=int\n", + " __Sub2Marks=int\n", + " def ReadData(self):\n", + " self.__Sub1Marks=int(raw_input(\"Marks scored in Subject 1 < Max:100> ? \"))\n", + " self.__Sub2Marks=int(raw_input(\"Marks scored in Subject 2 < Max:100> ? \"))\n", + " def DisplayData(self):\n", + " print \"External Marks scored in Subject 1:\", self.__Sub1Marks\n", + " print \"External Marks scored in Subject 2:\", self.__Sub2Marks\n", + " print \"External Total Marks Scored:\", self.ExternalTotalMarks()\n", + " def ExternalTotalMarks(self):\n", + " return self.__Sub1Marks+self.__Sub2Marks\n", + "class result(InternalExam, ExternalExam):\n", + " __total=int\n", + " def TotalMarks(self):\n", + " return InternalExam.InternalTotalMarks(self)+ExternalExam.ExternalTotalMarks(self)\n", + "student1=result()\n", + "print \"Enter data for Student1...\"\n", + "student1.ReadStudentData()\n", + "print \"Enter internal marks...\"\n", + "InternalExam.ReadData(student1)\n", + "print \"Enter external marks...\"\n", + "ExternalExam.ReadData(student1)\n", + "print \"Student Details...\"\n", + "student1.DisplayStudentData()\n", + "InternalExam.DisplayData(student1)\n", + "ExternalExam.DisplayData(student1)\n", + "print \"Total Marks =\", student1.TotalMarks()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for Student1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch Studying ? Computer-Technology\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter internal marks...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 1 < Max:100> ? 80\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 2 < Max:100> ? 85\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter external marks...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 1 < Max:100> ? 89\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 2 < Max:100> ? 90\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Details...\n", + "Roll Number: 9\n", + "Branch: Computer-Technology\n", + "Internal Marks scored in Subject 1: 80\n", + "Internal Marks scored in Subject 2: 85\n", + "Internal Total Marks Scored: 344\n", + "External Marks scored in Subject 1: 89\n", + "External Marks scored in Subject 2: 90\n", + "External Total Marks Scored: 179\n", + "Total Marks = 344\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vir.cpp, Page no-598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class A:\n", + " __x=int\n", + " def __init__(self, i=None):\n", + " if isinstance(i, int):\n", + " self.__x=i\n", + " else:\n", + " self.__x=-1\n", + " def geta(self):\n", + " return self.__x\n", + "class B(A):\n", + " __y=int\n", + " def __init__(self, i, k):\n", + " A.__init__(self, i)\n", + " self.__y=k\n", + " def getb(self):\n", + " return self.__y\n", + " def show(self):\n", + " print self._A__x, self.geta(), self.getb()\n", + "class C(A):\n", + " __z=int\n", + " def __init__(self, i, k):\n", + " A.__init__(self, i)\n", + " self.__z=k\n", + " def getc(self):\n", + " return self.__z\n", + " def show(self):\n", + " print self._A__x, self.geta(), self.getc()\n", + "class D(B,C):\n", + " def __init__(self, i, j):\n", + " B.__init__(self, i, j)\n", + " C.__init__(self, i, j)\n", + " def show(self):\n", + " print self._A__x, self.geta(), self.getb(), self.getc(), self.getc()\n", + "d1=D(3, 5)\n", + "print \"Object d1 contents:\",\n", + "d1.show() #unlike C++, python executes the 1 argument constuctor of A() instead of implicit call to the no argument constructor of A()\n", + "b1=B(7, 9)\n", + "print \"Object b1 contents:\",\n", + "b1.show()\n", + "c1=C(11, 13)\n", + "print \"Object c1 contents:\",\n", + "c1.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Object d1 contents: 3 3 5 5 5\n", + "Object b1 contents: 7 7 9\n", + "Object c1 contents: 11 11 13\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sports.cpp, Page no-601" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_LEN=25\n", + "class person:\n", + " __name=[chr]*MAX_LEN\n", + " __sex=chr\n", + " __age=int\n", + " def ReadPerson(self):\n", + " self.__name=raw_input(\"Name ? \")\n", + " self.__sex=str(raw_input(\"Sex ? \"))\n", + " self.__age=int(raw_input(\"Age ? \"))\n", + " def DisplayPerson(self):\n", + " print \"Name:\", self.__name\n", + " print \"Sex: \", self.__sex\n", + " print \"Age: \", self.__age\n", + "class sports(person):\n", + " __name=[chr]*MAX_LEN\n", + " __score=int\n", + " def ReadData(self):\n", + " self.__name=raw_input(\"Game Played ? \")\n", + " self.__score=int(raw_input(\"Game Score ? \"))\n", + " def DisplayData(self):\n", + " print \"Sports Played:\", self.__name\n", + " print \"Game Score: \", self.__score\n", + " def SportsScore(self):\n", + " return self.__score\n", + "class student(person):\n", + " __RollNo=int\n", + " __branch=[chr]*20\n", + " def ReadData(self):\n", + " self.__RollNo=int(raw_input(\"Roll Number ? \"))\n", + " self.__branch=raw_input(\"Branch Studying ? \")\n", + " def DisplayData(self):\n", + " print \"Roll Number:\", self.__RollNo\n", + " print \"Branch:\", self.__branch\n", + "class exam(student):\n", + " __Sub1Marks=int\n", + " __Sub2Marks=int\n", + " def ReadData(self):\n", + " self.__Sub1Marks=int(raw_input(\"Marks scored in Subject 1 < Max:100> ? \"))\n", + " self.__Sub2Marks=int(raw_input(\"Marks scored in Subject 2 < Max:100> ? \"))\n", + " def DisplayData(self):\n", + " print \"Marks scored in Subject 1:\", self.__Sub1Marks\n", + " print \"Marks scored in Subject 2:\", self.__Sub2Marks\n", + " print \"Total Marks Scored:\", self.TotalMarks()\n", + " def TotalMarks(self):\n", + " return self.__Sub1Marks+self.__Sub2Marks\n", + "class result(exam, sports):\n", + " __total=int\n", + " def ReadData(self):\n", + " self.ReadPerson()\n", + " student.ReadData(self)\n", + " exam.ReadData(self)\n", + " sports.ReadData(self)\n", + " def DisplayData(self):\n", + " self.DisplayPerson()\n", + " student.DisplayData(self)\n", + " exam.DisplayData(self)\n", + " sports.DisplayData(self)\n", + " print \"Overall Performance, (exam + sports) :\",self.Percentage(), \"%\"\n", + " def Percentage(self):\n", + " return (exam.TotalMarks(self)+self.SportsScore())/3\n", + "Student=result()\n", + "print \"Enter data for Student...\"\n", + "Student.ReadData()\n", + "print \"Student Details...\"\n", + "Student.DisplayData()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for Student...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sex ? M\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age ? 24\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch Studying ? Computer-Technology\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 1 < Max:100> ? 92\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Marks scored in Subject 2 < Max:100> ? 88\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Game Played ? Cricket\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Game Score ? 85\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Details...\n", + "Name: Rajkumar\n", + "Sex: M\n", + "Age: 24\n", + "Roll Number: 9\n", + "Branch: Computer-Technology\n", + "Marks scored in Subject 1: 92\n", + "Marks scored in Subject 2: 88\n", + "Total Marks Scored: 180\n", + "Sports Played: Cricket\n", + "Game Score: 85\n", + "Overall Performance, (exam + sports) : 88 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-nesting.cpp, Page no-605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class B:\n", + " num=int\n", + " def __init__(self, a=None):\n", + " if isinstance(a, int):\n", + " print \"Constructor B( int a ) is invoked\"\n", + " self.num=a\n", + " else:\n", + " self.num=0\n", + "class D:\n", + " data1=int\n", + " objb=B()\n", + " def __init__(self, a):\n", + " self.objb.__init__(a)\n", + " self.data1=a\n", + " def output(self):\n", + " print \"Data in Object of Class S =\", self.data1\n", + " print \"Data in Member object of class B in class D = \",self.objb.num\n", + "objd = D(10)\n", + "objd.output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Constructor B( int a ) is invoked\n", + "Data in Object of Class S = 10\n", + "Data in Member object of class B in class D = 10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-publish2.cpp, Page no-608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class publication:\n", + " __title=[chr]*40\n", + " __price=float\n", + " def getdata(self):\n", + " self.__title=raw_input(\"\\tEnter Title: \")\n", + " self.__price=float(raw_input(\"\\tEnter Price: \"))\n", + " def display(self):\n", + " print \"\\tTitle =\", self.__title\n", + " print \"\\tPrice = %g\" %(self.__price)\n", + "class sales:\n", + " __PublishSales=[]\n", + " def __init__(self):\n", + " self.__PublishSales=[float]*3\n", + " def getdata(self):\n", + " for i in range(3):\n", + " print \"\\tEnter Sales of\", i+1, \"Month: \",\n", + " self.__PublishSales[i]=float(raw_input())\n", + " def display(self):\n", + " TotalSales=0\n", + " for i in range(3):\n", + " print \"\\tSales of\", i+1, \"Month = %g\" %(self.__PublishSales[i])\n", + " TotalSales+=self.__PublishSales[i]\n", + " print \"\\tTotalSales = %g\" %(TotalSales)\n", + "class book:\n", + " __pages=int\n", + " pub=publication()\n", + " market=sales()\n", + " def getdata(self):\n", + " self.pub.getdata()\n", + " self.__pages=int(raw_input(\"\\tEnter Number of Pages: \"))\n", + " self.market.getdata()\n", + " def display(self):\n", + " self.pub.display()\n", + " print \"\\tNumber of Pages = %g\" %(self.__pages)\n", + " self.market.display()\n", + "book1=book()\n", + "print \"Enter Book Publication Data...\"\n", + "book1.getdata()\n", + "print \"Book Publication Data...\"\n", + "book1.display()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Book Publication Data...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Title: Microprocessor-x86-Programming\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Price: 180\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Number of Pages: 750\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\tEnter Sales of 1 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 2 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \tEnter Sales of 3 Month: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "800\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Book Publication Data...\n", + "\tTitle = Microprocessor-x86-Programming\n", + "\tPrice = 180\n", + "\tNumber of Pages = 750\n", + "\tSales of 1 Month = 1000\n", + "\tSales of 2 Month = 500\n", + "\tSales of 3 Month = 800\n", + "\tTotalSales = 2300\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-611" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class employee:\n", + " emp_id=int\n", + " emp_name=[chr]*30\n", + " def getdata(self):\n", + " self.__emp_id=int(raw_input(\"Enter employee number: \"))\n", + " self.__emp_name=raw_input(\"Enter emploee name: \")\n", + " def displaydata(self):\n", + " print \"Employee Number:\", self.__emp_id, \"\\nEmployee Name:\", self.__emp_name\n", + "class emp_union:\n", + " __member_id=int\n", + " def getdata(self):\n", + " self.__member_id=int(raw_input(\"Enter member id: \"))\n", + " def displaydata(self):\n", + " print \"Member ID:\", self.__member_id\n", + "class emp_info(employee, emp_union):\n", + " __basic_salary=float\n", + " def getdata(self):\n", + " employee.getdata(self)\n", + " emp_union.getdata(self)\n", + " self.__basic_salary=int(raw_input(\"Enter basic salary: \"))\n", + " def displaydata(self):\n", + " employee.displaydata(self)\n", + " emp_union.displaydata(self)\n", + " print \"Basic Salary:\", self.__basic_salary\n", + "e1=emp_info()\n", + "e1.getdata()\n", + "e1.displaydata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter employee number: 23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter emploee name: Krishnan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter member id: 443\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter basic salary: 8500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee Number: 23 \n", + "Employee Name: Krishnan\n", + "Member ID: 443\n", + "Basic Salary: 8500\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-613" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class details:\n", + " __name=[chr]*30\n", + " __address=[chr]*50\n", + " def getdata(self):\n", + " self.__name=raw_input(\"Name: \")\n", + " self.__address=raw_input(\"Address: \")\n", + " def displaydata(self):\n", + " print \"Name:\", self.__name,\"\\nAddress:\", self.__address\n", + "class student(details):\n", + " __marks=float\n", + " def getdata(self):\n", + " details.getdata(self)\n", + " self.__marks=float(raw_input(\"Percentage Marks: \"))\n", + " def displaydata(self):\n", + " details.displaydata(self)\n", + " print \"Percentage Marks: %g\" %(self.__marks)\n", + "class staff(details):\n", + " __salary=float\n", + " def getdata(self):\n", + " details.getdata(self)\n", + " self.__salary=float(raw_input(\"Salary: \"))\n", + " def displaydata(self):\n", + " details.displaydata(self)\n", + " print \"Salary: %g\" %(self.__salary)\n", + "student1=student()\n", + "staff1=staff()\n", + "print \"Enter student data:\"\n", + "student1.getdata()\n", + "print \"Enter staff data:\"\n", + "staff1.getdata()\n", + "print \"Displaying student and staff data:\"\n", + "student1.displaydata()\n", + "staff1.displaydata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student data:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Venkatesh\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address: H.No. 89, AGM Society, Bangalore\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage Marks: 78.4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter staff data:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Vijayan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address: H.No. A-2, SLR Society, Bangalore\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Salary: 25000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Displaying student and staff data:\n", + "Name: Venkatesh \n", + "Address: H.No. 89, AGM Society, Bangalore\n", + "Percentage Marks: 78.4\n", + "Name: Vijayan \n", + "Address: H.No. A-2, SLR Society, Bangalore\n", + "Salary: 25000\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter15-VirtualFunctions_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter15-VirtualFunctions_1.ipynb new file mode 100755 index 00000000..ab3a16ad --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter15-VirtualFunctions_1.ipynb @@ -0,0 +1,629 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:088209fcbfac6b2b28efe08ac9ffe00c4f6ff0675bb2728b388b1476d7fee811" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15-Virtual Functions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-parent1.cpp, Page no-618" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father:\n", + " __name=[chr]*20\n", + " def __init__(self, fname):\n", + " self.__name=fname\n", + " def show(self):\n", + " print \"Father name:\", self.__name\n", + "class Son(Father):\n", + " __name=[chr]*20\n", + " def __init__(self, sname, fname):\n", + " Father.__init__(self, fname)\n", + " self.__name=sname\n", + " def show(self):\n", + " print \"Son name:\", self.__name\n", + "fp=[Father]\n", + "f1=Father(\"Eshwarappa\")\n", + "fp=f1\n", + "fp.show()\n", + "s1=Son(\"Rajkumar\", \"Eshwarappa\")\n", + "fp=s1\n", + "Father.show(fp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Father name: Eshwarappa\n", + "Father name: Eshwarappa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-parent1.cpp, Page no-619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father():\n", + " __name=[chr]*20\n", + " def __init__(self, fname):\n", + " self.__name=fname\n", + " def show(self):\n", + " print \"Father name:\", self.__name\n", + "class Son(Father):\n", + " __name=[chr]*20\n", + " def __init__(self, sname, fname):\n", + " Father.__init__(self, fname)\n", + " self.__name=sname\n", + " def show(self):\n", + " print \"Son name:\", self.__name\n", + "fp=[Father]\n", + "f1=Father(\"Eshwarappa\")\n", + "fp=f1\n", + "fp.show()\n", + "s1=Son(\"Rajkumar\", \"Eshwarappa\")\n", + "fp=s1\n", + "fp.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Father name: Eshwarappa\n", + "Son name: Rajkumar\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-family1.cpp, Page no-622" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father():\n", + " __f_age=int\n", + " def __init__(self, n):\n", + " self.__f_age=n\n", + " def GetAge(self):\n", + " return self.__f_age\n", + "class Son(Father):\n", + " __s_age=int\n", + " def __init__(self, n, m):\n", + " Father.__init__(self, n)\n", + " self.__s_age=m\n", + " def GetAge(self):\n", + " return self.__s_age\n", + " def son_func(self):\n", + " print \"son's own function\"\n", + "basep=[Father]\n", + "basep=Father(45)\n", + "print \"basep points to base object...\"\n", + "print \"Father's Age:\",\n", + "print basep.GetAge()\n", + "del basep\n", + "basep=[Son(45, 20)]\n", + "print \"basep points to derived object...\"\n", + "print \"Son's Age:\",\n", + "print Father.GetAge(basep[0])\n", + "print \"By typecasting, ((Son*) basep)...\"\n", + "print \"Son's age:\",basep[0].GetAge()\n", + "del basep\n", + "son1=Son(45, 20)\n", + "derivedp=[son1]\n", + "print \"accessing through derived class pointer...\"\n", + "print \"Son's Age:\",\n", + "print derivedp[0].GetAge()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "basep points to base object...\n", + "Father's Age: 45\n", + "basep points to derived object...\n", + "Son's Age: 45\n", + "By typecasting, ((Son*) basep)...\n", + "Son's age: 20\n", + "accessing through derived class pointer...\n", + "Son's Age: 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-family2.cpp, Page no-626" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father():\n", + " __f_age=int\n", + " def __init__(self, n):\n", + " self.__f_age=n\n", + " def GetAge(self):\n", + " return self.__f_age\n", + "class Son(Father):\n", + " __s_age=int\n", + " def __init__(self, n, m):\n", + " Father.__init__(self, n)\n", + " self.__s_age=m\n", + " def GetAge(self):\n", + " return self.__s_age\n", + "basep=[Father]\n", + "basep=Father(45)\n", + "print \"Father's Age:\",\n", + "print basep.GetAge()\n", + "del basep\n", + "basep=[Son(45, 20)]\n", + "print \"Son's Age:\",\n", + "print basep[0].GetAge()\n", + "del basep" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Father's Age: 45\n", + "Son's Age: 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-draw.cpp, Page no-629" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class graphics:\n", + " def draw(self):\n", + " print \"point\"\n", + "class line(graphics):\n", + " def draw(self):\n", + " print \"line\"\n", + "class triangle(graphics):\n", + " def draw(self):\n", + " print \"triangle\"\n", + "class rectangle(graphics):\n", + " def draw(self):\n", + " print \"rectangle\"\n", + "class circle(graphics):\n", + " def draw(self):\n", + " print \"circle\"\n", + "point_obj=graphics()\n", + "line_obj=line()\n", + "tri_obj=triangle()\n", + "rect_obj=rectangle()\n", + "circle_obj=circle()\n", + "basep=[]\n", + "basep.append(point_obj)\n", + "basep.append(line_obj)\n", + "basep.append(tri_obj)\n", + "basep.append(rect_obj)\n", + "basep.append(circle_obj)\n", + "print \"Following figures are drawn with basep[i]->draw()...\"\n", + "for i in range(5):\n", + " basep[i].draw()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Following figures are drawn with basep[i]->draw()...\n", + "point\n", + "line\n", + "triangle\n", + "rectangle\n", + "circle\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-pure.cpp, Page no-632" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class AbsPerson:\n", + " def Service1(self, n):\n", + " self.Service2(n)\n", + " def Service2(self, n): #pure virtual function\n", + " pass\n", + "class Person(AbsPerson):\n", + " def Service2(self, n):\n", + " print \"The number of years of service:\", 58-n\n", + "Father=Person()\n", + "Son=Person()\n", + "Father.Service1(50)\n", + "Son.Service2(20)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of years of service: 8\n", + "The number of years of service: 38\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-number.cpp, Page no-633" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class number:\n", + " __num=int\n", + " def getdata(self):\n", + " self.__num=int(raw_input(\"Enter an integer number: \"))\n", + " def show(self): #pure virtual function\n", + " pass\n", + "class octnum(number):\n", + " def show(self):\n", + " print \"Octal equivalent of\", self._number__num,\"=\",oct(self._number__num)\n", + "class hexnum(number):\n", + " def show(self):\n", + " print \"Hexadecimal equivalent of\", self._number__num,\"=\",hex(self._number__num)\n", + "o1=octnum()\n", + "h1=hexnum()\n", + "o1.getdata()\n", + "o1.show()\n", + "h1.getdata()\n", + "h1.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an integer number: 11\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Octal equivalent of 11 = 013\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an integer number: 11\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hexadecimal equivalent of 11 = 0xb\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-family3.cpp, Page no-637" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father():\n", + " __f_name=str\n", + " def __init__(self, fname):\n", + " self.__f_name=fname\n", + " def __del__(self):\n", + " del self.__f_name\n", + " print \"~Father() is invoked\"\n", + " def show(self):\n", + " print \"Father's name:\", self.__f_name\n", + "class Son(Father):\n", + " __s_name=str\n", + " def __init__(self, sname, fname):\n", + " Father.__init__(self, fname)\n", + " self.__s_name=sname\n", + " def __del__(self):\n", + " del self.__s_name\n", + " print \"~Son() is invoked\"\n", + " Father.__del__(self)\n", + " def show(self):\n", + " print \"Father's name:\", self._Father__f_name\n", + " print \"Son's name:\", self.__s_name\n", + "basep=[Father]\n", + "basep=Father(\"Eshwarappa\")\n", + "print \"basep points to base object...\"\n", + "basep.show()\n", + "del basep\n", + "basep=Son(\"Rajkumar\", \"Eshwarappa\")\n", + "print \"basep points to derived object...\"\n", + "basep.show()\n", + "del basep" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "basep points to base object...\n", + "Father's name: Eshwarappa\n", + "~Father() is invoked\n", + "basep points to derived object...\n", + "Father's name: Eshwarappa\n", + "Son's name: Rajkumar\n", + "~Son() is invoked\n", + "~Father() is invoked\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vptrsize.cpp, Page no-640" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, sizeof\n", + "class nonvirtual(Structure):\n", + " _fields_=[('x', c_int)]\n", + " def func(self):\n", + " pass\n", + "class withvirtual(Structure):\n", + " _fields_=[('x', c_int)]\n", + " def func(self):\n", + " pass\n", + "print \"sizeof( nonvirtual ) =\",sizeof(nonvirtual())\n", + "print \"sizeof( withvirtual ) =\",sizeof(withvirtual())" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sizeof( nonvirtual ) = 4\n", + "sizeof( withvirtual ) = 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-shapes.cpp, Page no-640" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class description:\n", + " __information=str\n", + " def __init__(self, info):\n", + " self.__information=info\n", + " def show(self):\n", + " print self.__information,\n", + "class sphere(description):\n", + " __radius=float\n", + " def __init__(self, info, rad):\n", + " description.__init__(self, info)\n", + " self.__radius=rad\n", + " def show(self):\n", + " print self._description__information,\n", + " print \"Radius = %g\" %self.__radius\n", + "class cube(description):\n", + " __edge_length=float\n", + " def __init__(self, info, edg_len):\n", + " description.__init__(self, info)\n", + " self.__edge_length=edg_len\n", + " def show(self):\n", + " print self._description__information,\n", + " print \"Edge Length = %g\" %self.__edge_length\n", + "small_ball=sphere(\"mine\", 1.0)\n", + "beach_ball=sphere(\"plane\", 24.0)\n", + "plan_toid=sphere(\"moon\", 1e24)\n", + "crystal=cube(\"carbon\", 1e-24)\n", + "ice=cube(\"party\", 1.0)\n", + "box=cube(\"card borad\", 16.0)\n", + "shapes=[]\n", + "shapes.append(small_ball)\n", + "shapes.append(beach_ball)\n", + "shapes.append(plan_toid)\n", + "shapes.append(crystal)\n", + "shapes.append(ice)\n", + "shapes.append(box)\n", + "small_ball.show()\n", + "beach_ball.show()\n", + "plan_toid.show()\n", + "crystal.show()\n", + "ice.show()\n", + "box.show()\n", + "print \"Dynamic Invocation of show()...\"\n", + "for i in range(len(shapes)):\n", + " shapes[i].show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mine Radius = 1\n", + "plane Radius = 24\n", + "moon Radius = 1e+24\n", + "carbon Edge Length = 1e-24\n", + "party Edge Length = 1\n", + "card borad Edge Length = 16\n", + "Dynamic Invocation of show()...\n", + "mine Radius = 1\n", + "plane Radius = 24\n", + "moon Radius = 1e+24\n", + "carbon Edge Length = 1e-24\n", + "party Edge Length = 1\n", + "card borad Edge Length = 16\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example, Page no-643" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class shape:\n", + " __val1=float\n", + " __val2=float\n", + " def getdata(self, a, b):\n", + " self.__val1=a\n", + " self.__val2=b\n", + " def display_area(self):\n", + " pass\n", + "class triangle(shape):\n", + " def display_area(self):\n", + " print \"Area of trianle =\", 0.5*self._shape__val1*self._shape__val2\n", + "class rectangle(shape):\n", + " def display_area(self):\n", + " print \"Area of rectanle =\", self._shape__val1*self._shape__val2\n", + "sptr=[shape]\n", + "sptr=triangle()\n", + "sptr.getdata(4.5, 2.2)\n", + "sptr.display_area()\n", + "sptr=rectangle()\n", + "sptr.getdata(4.5, 2.2)\n", + "sptr.display_area()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of trianle = 4.95\n", + "Area of rectanle = 9.9\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter16-GenericProgrammingWithTemplates_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter16-GenericProgrammingWithTemplates_1.ipynb new file mode 100755 index 00000000..2c0466e6 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter16-GenericProgrammingWithTemplates_1.ipynb @@ -0,0 +1,1512 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5ff86fe97680b06e7a4475c4ea1b114184509bbbdf91478f93e32745cc31ac2f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16-Generic Programming with Templates" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mswap.cpp, Page no-647" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y): #function overloading\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch1, ch2 = swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"On swapping :\", a,b\n", + "c, d=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "c, d = swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-gswap.cpp, Page no-650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch1, ch2 = swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"On swapping :\", a,b\n", + "c, d=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "c, d = swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-max1.cpp, Page no-651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(a, b):\n", + " if a>b:\n", + " return a\n", + " else:\n", + " return b\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch = Max(ch1, ch2)\n", + "print \"max( ch1, ch2 ):\", ch\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "c = Max(a, b)\n", + "print \"max( a, b ):\", c\n", + "f1, f2=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "f3 = Max(f1, f2)\n", + "print \"max( f1, f2 ):\", f3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : A B\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( ch1, ch2 ): B\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 20 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( a, b ): 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 30.9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( f1, f2 ): 30.9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-max2.cpp, Page no-653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(a, b):\n", + " if a>b:\n", + " return a\n", + " else:\n", + " return b\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch = Max(ch1, ch2)\n", + "print \"max( ch1, ch2 ):\", ch\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "c = Max(a, b)\n", + "print \"max( a, b ):\", c\n", + "str1, str2=raw_input(\"Enter two strings : \").split()\n", + "print \"max( str1, str2 ):\", Max(str1, str2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : A Z\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( ch1, ch2 ): Z\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( a, b ): 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two strings : Tejaswi Rajkumar\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max( str1, str2 ): Tejaswi\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-bsort.cpp, Page no-654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "[false, true]=[0, 1]\n", + "type=['false', 'true']\n", + "def swap(x, y): #function overloading\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "def BubbleSort(SortData, Size):\n", + " swapped=true\n", + " for i in range(Size-1):\n", + " if swapped==true:\n", + " swapped=false\n", + " for j in range((Size-1)-i):\n", + " if SortData[j]>SortData[j+1]:\n", + " swapped=true\n", + " SortData[j], SortData[j+1]=swap(SortData[j], SortData[j+1])\n", + "IntNums=[int]*25\n", + "FloatNums=[float]*25\n", + "print \"Program to sort elements...\"\n", + "#Integer numbers sorting\n", + "size=int(raw_input(\"Enter the size of the integer vector :\"))\n", + "print \"Enter the elements of the integer vector...\"\n", + "for i in range(size):\n", + " IntNums[i]=int(raw_input())\n", + "BubbleSort(IntNums, size)\n", + "print \"Sorted Vector:\"\n", + "for i in range(size):\n", + " print IntNums[i],\n", + "#Floating point numbers sorting\n", + "size=int(raw_input(\"Enter the size of the float vector :\"))\n", + "print \"Enter the elements of the float vector...\"\n", + "for i in range(size):\n", + " FloatNums[i]=float(raw_input())\n", + "BubbleSort(FloatNums, size)\n", + "print \"Sorted Vector:\"\n", + "for i in range(size):\n", + " print FloatNums[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Program to sort elements...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the integer vector :4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of the integer vector...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\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" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorted Vector:\n", + "1 4 6 8" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the float vector :3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter the elements of the float vector...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8.9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorted Vector:\n", + "3.2 8.5 8.9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-tprint.cpp, Page no-656" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Print(data, nTimes=None):\n", + " if isinstance(nTimes, int):\n", + " for i in range(nTimes):\n", + " print data\n", + " else:\n", + " print data\n", + "Print(1)\n", + "Print(1.5)\n", + "Print(520, 2)\n", + "Print(\"OOP is Great\", 3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n", + "1.5\n", + "520\n", + "520\n", + "OOP is Great\n", + "OOP is Great\n", + "OOP is Great\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-bsearch.cpp, Page no-658" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "[false, true]=[0, 1]\n", + "type=['false', 'true']\n", + "def RecBinSearch(Data, SrchElem, low, high):\n", + " if low>high:\n", + " return -1\n", + " mid=int((low+high)/2)\n", + " if SrchElemData[mid]:\n", + " return RecBinSearch(Data, SrchElem, mid+1, high)\n", + " return mid\n", + "num=[int]*25\n", + "FloatNums=[float]*25\n", + "print \"Program to search integer elements...\"\n", + "size=int(raw_input(\"How many elements ? \"))\n", + "print \"Enter the elements in ascending order for binary search...\"\n", + "for i in range(size):\n", + " num[i]=int(raw_input())\n", + "elem=int(raw_input(\"Enter the element to be searched: \"))\n", + "index=RecBinSearch(num, elem, 0, size)\n", + "if index==-1:\n", + " print \"Element\", elem, \"not found\"\n", + "else:\n", + " print \"Element\", elem, \"found at position\", index" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Program to search integer elements...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many elements ? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements in ascending order for binary search...\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": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element to be searched: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Element 6 found at position 2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student.cpp, Page no-661" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "class stuRec(Structure):\n", + " name=str\n", + " age=int\n", + " collegeCode=str\n", + "def Display(t):\n", + " print t\n", + "def output(s):\n", + " print \"Name:\", s.name\n", + " print \"Age:\", s.age\n", + " print \"College Code:\", s.collegeCode\n", + "s1=stuRec()\n", + "print \"Enter student record details...\"\n", + "s1.name=raw_input(\"Name: \")\n", + "s1.age=int(raw_input(\"Age: \"))\n", + "s1.collegeCode=raw_input(\"College Code: \")\n", + "print \"The student record:\"\n", + "print \"Name:\",\n", + "Display(s1.name)\n", + "print \"Age:\",\n", + "Display(s1.age)\n", + "print \"College Code:\",\n", + "Display(s1.collegeCode)\n", + "print \"The student record:\"\n", + "output(s1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter student record details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Chinamma\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "College Code: A\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The student record:\n", + "Name: Chinamma\n", + "Age: 18\n", + "College Code: A\n", + "The student record:\n", + "Name: Chinamma\n", + "Age: 18\n", + "College Code: A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector.cpp, Page no-665" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class vector:\n", + " __size=int\n", + " def __init__(self, vector_size):\n", + " self.__size=vector_size\n", + " self.__v=[vector]*self.__size\n", + " def __del__(self):\n", + " del self.__v\n", + " def elem(self, i, x=None):\n", + " if isinstance(x, int) or isinstance(x, float):\n", + " if i>=self.__size:\n", + " print \"Error: Out of Range\"\n", + " return\n", + " self.__v[i]=x\n", + " else:\n", + " return self.__v[i]\n", + " def show(self):\n", + " for i in range(self.__size):\n", + " print self.elem(i), \",\",\n", + "int_vect=vector(5)\n", + "float_vect=vector(4)\n", + "for i in range(5):\n", + " int_vect.elem(i, i+1)\n", + "for i in range(4):\n", + " float_vect.elem(i,i+1.5)\n", + "print \"Integer Vector:\",\n", + "int_vect.show()\n", + "print \"\\nFloating Vector:\",\n", + "float_vect.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer Vector: 1 , 2 , 3 , 4 , 5 , \n", + "Floating Vector: 1.5 , 2.5 , 3.5 , 4.5 ,\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-union.cpp, Page no-670" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(false, true)=(0, 1) #enum type\n", + "type =['false', 'true']\n", + "MAX_ITEMS=25\n", + "def IsExist(self, item):\n", + " for i in range(self._Bag__ItemCount):\n", + " if self._Bag__contents[i]==item:\n", + " return true\n", + " return false\n", + "def show(self):\n", + " for i in range(self._Bag__ItemCount):\n", + " print self._Bag__contents[i],\n", + " print \"\"\n", + "class Bag:\n", + " #protected members\n", + " __ItemCount=int\n", + " def __init__(self):\n", + " self.__ItemCount=0\n", + " self.__contents=[int]*MAX_ITEMS\n", + " def put(self, item):\n", + " self.__contents[self.__ItemCount]=item\n", + " self.__ItemCount+=1\n", + " def IsEmpty(self):\n", + " return true if self.__ItemCount==0 else false\n", + " def IsFull(self):\n", + " return true if self.__ItemCount==MAX_ITEMS else false\n", + " IsExist=IsExist\n", + " show=show\n", + "def read(self):\n", + " while(true):\n", + " element=int(raw_input(\"Enter Set Element <0-end>: \"))\n", + " if element==0:\n", + " break\n", + " self.Add(element)\n", + "def add(s1, s2):\n", + " temp = Set()\n", + " temp=s1\n", + " for i in range(s2._Bag__ItemCount):\n", + " if s1.IsExist(s2._Bag__contents[i])==false:\n", + " temp.Add(s2._Bag__contents[i])\n", + " return temp\n", + "class Set(Bag):\n", + " def Add(self,element):\n", + " if(self.IsExist(element)==false and self.IsFull()==false):\n", + " self.put(element)\n", + " read=read\n", + " def __assign__(self, s2):\n", + " for i in range(s2._Bag__ItemCount):\n", + " self.__contents[i]=s2.__contents[i]\n", + " self.__ItemCount=s2.__ItemCount\n", + " def __add__(self, s2):\n", + " return add(self, s2)\n", + "s1=Set()\n", + "s2=Set()\n", + "s3=Set()\n", + "print \"Enter Set 1 elements..\"\n", + "s1.read()\n", + "print \"Enter Set 2 elemets..\"\n", + "s2.read()\n", + "s3=s1+s2\n", + "print \"Union of s1 and s2 : \",\n", + "s3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set 1 elements..\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set 2 elemets..\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Set Element <0-end>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Union of s1 and s2 : 1 2 3 4 5 6 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-tree.cpp, Page no-673" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class TreeNode:\n", + " def __init__(self, dataIn, l, r):\n", + " if isinstance(l, TreeNode):\n", + " self.__left=l\n", + " self.__right=r\n", + " else:\n", + " self.__left=None\n", + " self.__right=None\n", + " self.__data=dataIn\n", + "class BinaryTree:\n", + " __root=None\n", + " def InsertNode(self, tree, data):\n", + " if tree==None:\n", + " tree=TreeNode(data, None, None)\n", + " return tree\n", + " if datatree._TreeNode__data:\n", + " tree._TreeNode__right=self.InsertNode(tree._TreeNode__right, data)\n", + " return tree\n", + " def PrintTreeTriangle(self, tree, level):\n", + " if tree:\n", + " self.PrintTreeTriangle(tree._TreeNode__right, level+1)\n", + " for i in range(level):\n", + " print \"\\t\",\n", + " print \"%g\" %tree._TreeNode__data\n", + " self.PrintTreeTriangle(tree._TreeNode__left, level+1)\n", + " def PrintTreeDiagonal(self, tree, level):\n", + " if tree!=None:\n", + " for i in range(level):\n", + " print \"\\t\",\n", + " print \"%g\" %tree._TreeNode__data\n", + " self.PrintTreeTriangle(tree._TreeNode__left, level+1)\n", + " self.PrintTreeTriangle(tree._TreeNode__right, level+1)\n", + " def PreOrderTraverse(self, tree):\n", + " if tree:\n", + " print \"%g\" %tree._TreeNode__data,\n", + " self.PreOrderTraverse(tree._TreeNode__left)\n", + " self.PreOrderTraverse(tree._TreeNode__right)\n", + " def InOrderTraverse(self, tree):\n", + " if tree:\n", + " self.InOrderTraverse(tree._TreeNode__left)\n", + " print \"%g\" %tree._TreeNode__data,\n", + " self.InOrderTraverse(tree._TreeNode__right)\n", + " def PostOrderTraverse(self, tree):\n", + " if tree:\n", + " self.PostOrderTraverse(tree._TreeNode__left)\n", + " self.PostOrderTraverse(tree._TreeNode__right)\n", + " print \"%g\" %tree._TreeNode__data,\n", + " def SearchTree(self, tree, data):\n", + " while(tree):\n", + " if datatree._TreeNode__data:\n", + " tree=tree._TreeNode__right\n", + " else:\n", + " return tree\n", + " return None\n", + " def PreOrder(self):\n", + " self.PreOrderTraverse(self.__root)\n", + " def InOrder(self):\n", + " self.InOrderTraverse(self.__root)\n", + " def PostOrder(self):\n", + " self.PostOrderTraverse(self.__root)\n", + " def PrintTree(self, disptype):\n", + " if disptype==1:\n", + " self.PrintTreeTriangle(self.__root, 1)\n", + " else:\n", + " self.PrintTreeDiagonal(self.__root, 1)\n", + " def Insert(self, data):\n", + " self.__root=self.InsertNode(self.__root, data)\n", + " def Search(self, data):\n", + " return self.SearchTree(self.__root, data)\n", + "btree=BinaryTree()\n", + "print \"This Program Demonstrates the Binary Tree Operations\"\n", + "disptype=int(raw_input(\"Tree Diplay Style: [1] - Triangular [2] - Diagonal form: \"))\n", + "print \"Tree creation process...\"\n", + "while 1:\n", + " data=float(raw_input(\"Enter node number to be inserted <0-END>: \"))\n", + " if data==0:\n", + " break\n", + " btree.Insert(data)\n", + " print \"Binary Tree is...\"\n", + " btree.PrintTree(disptype)\n", + " print \"Pre-Order Traversal:\",\n", + " btree.PreOrder()\n", + " print \"\\nIn-Order Traversal:\",\n", + " btree.InOrder()\n", + " print \"\\nPost-Order Traversal:\",\n", + " btree.PostOrder()\n", + " print \"\"\n", + "print \"Tree search process...\"\n", + "while(1):\n", + " data=float(raw_input(\"Enter node number to be inserted <0-END>: \"))\n", + " if data==0:\n", + " break\n", + " if btree.Search(data):\n", + " print \"Found data in the Tree\"\n", + " else:\n", + " print \"Not found data in the Tree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "This Program Demonstrates the Binary Tree Operations\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tree Diplay Style: [1] - Triangular [2] - Diagonal form: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tree creation process...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary Tree is...\n", + "\t5\n", + "Pre-Order Traversal: 5 \n", + "In-Order Traversal: 5 \n", + "Post-Order Traversal: 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary Tree is...\n", + "\t5\n", + "\t\t3\n", + "Pre-Order Traversal: 5 3 \n", + "In-Order Traversal: 3 5 \n", + "Post-Order Traversal: 3 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary Tree is...\n", + "\t\t8\n", + "\t5\n", + "\t\t3\n", + "Pre-Order Traversal: 5 3 8 \n", + "In-Order Traversal: 3 5 8 \n", + "Post-Order Traversal: 3 8 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary Tree is...\n", + "\t\t8\n", + "\t5\n", + "\t\t3\n", + "\t\t\t2\n", + "Pre-Order Traversal: 5 3 2 8 \n", + "In-Order Traversal: 2 3 5 8 \n", + "Post-Order Traversal: 2 3 8 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binary Tree is...\n", + "\t\t\t9\n", + "\t\t8\n", + "\t5\n", + "\t\t3\n", + "\t\t\t2\n", + "Pre-Order Traversal: 5 3 2 8 9 \n", + "In-Order Traversal: 2 3 5 8 9 \n", + "Post-Order Traversal: 2 3 9 8 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tree search process...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Found data in the Tree\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Not found data in the Tree\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter node number to be inserted <0-END>: 0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex.cpp, Page no-679" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def __add__(self, c2):\n", + " temp=Complex()\n", + " temp._Complex__real=self._Complex__real+c2._Complex__real\n", + " temp._Complex__imag=self._Complex__imag+c2._Complex__imag\n", + " return temp\n", + "class Complex:\n", + " def __init__(self):\n", + " self.__real=self.__imag=0\n", + " def getdata(self):\n", + " self.__real=float(raw_input(\"Real part ? \"))\n", + " self.__imag=float(raw_input(\"Imag part ? \"))\n", + " #overloading + operator\n", + " __add__=__add__\n", + " def outdata(self, msg):\n", + " print \"%s(%g, %g)\" %(msg, self.__real, self.__imag)\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Addition of integer complex objects...\"\n", + "print \"Enter Complex Number c1...\"\n", + "c1.getdata()\n", + "print \"Enter Complex Number c2...\"\n", + "c2.getdata()\n", + "c3=c1+c2 #invoking the overloaded + operator\n", + "c3.outdata(\"c3 = c1 + c2: \")\n", + "c4=Complex()\n", + "c5=Complex()\n", + "c6=Complex()\n", + "print \"Addition of float complex objects...\"\n", + "print \"Enter Complex Number c4...\"\n", + "c4.getdata()\n", + "print \"Enter Complex Number c5...\"\n", + "c5.getdata()\n", + "c6=c4+c5 #invoking the overloaded + operator\n", + "c6.outdata(\"c6 = c4 + c5: \")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Addition of integer complex objects...\n", + "Enter Complex Number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c3 = c1 + c2: (4, 6)\n", + "Addition of float complex objects...\n", + "Enter Complex Number c4...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 1.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 2.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Complex Number c5...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part ? 2.4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imag part ? 3.7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c6 = c4 + c5: (3.9, 6.2)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-680" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "N=5\n", + "def Min(arr):\n", + " m=arr[0]\n", + " for i in range(N):\n", + " if arr[i]\n", + "63 ?\n", + "64 @\n", + "65 A\n", + "66 B\n", + "67 C\n", + "68 D\n", + "69 E\n", + "70 F\n", + "71 G\n", + "72 H\n", + "73 I\n", + "74 J\n", + "75 K\n", + "76 L\n", + "77 M\n", + "78 N\n", + "79 O\n", + "80 P\n", + "81 Q\n", + "82 R\n", + "83 S\n", + "84 T\n", + "85 U\n", + "86 V\n", + "87 W\n", + "88 X\n", + "89 Y\n", + "90 Z\n", + "91 [\n", + "92 \\\n", + "93 ]\n", + "94 ^\n", + "95 _\n", + "96 `\n", + "97 a\n", + "98 b\n", + "99 c\n", + "100 d\n", + "101 e\n", + "102 f\n", + "103 g\n", + "104 h\n", + "105 i\n", + "106 j\n", + "107 k\n", + "108 l\n", + "109 m\n", + "110 n\n", + "111 o\n", + "112 p\n", + "113 q\n", + "114 r\n", + "115 s\n", + "116 t\n", + "117 u\n", + "118 v\n", + "119 w\n", + "120 x\n", + "121 y\n", + "122 z\n", + "123 {\n", + "124 |\n", + "125 }\n", + "126 ~\n", + "127 \u007f\n", + "128 \ufffd\n", + "129 \ufffd\n", + "130 \ufffd\n", + "131 \ufffd\n", + "132 \ufffd\n", + "133 \ufffd\n", + "134 \ufffd\n", + "135 \ufffd\n", + "136 \ufffd\n", + "137 \ufffd\n", + "138 \ufffd\n", + "139 \ufffd\n", + "140 \ufffd\n", + "141 \ufffd\n", + "142 \ufffd\n", + "143 \ufffd\n", + "144 \ufffd\n", + "145 \ufffd\n", + "146 \ufffd\n", + "147 \ufffd\n", + "148 \ufffd\n", + "149 \ufffd\n", + "150 \ufffd\n", + "151 \ufffd\n", + "152 \ufffd\n", + "153 \ufffd\n", + "154 \ufffd\n", + "155 \ufffd\n", + "156 \ufffd\n", + "157 \ufffd\n", + "158 \ufffd\n", + "159 \ufffd\n", + "160 \ufffd\n", + "161 \ufffd\n", + "162 \ufffd\n", + "163 \ufffd\n", + "164 \ufffd\n", + "165 \ufffd\n", + "166 \ufffd\n", + "167 \ufffd\n", + "168 \ufffd\n", + "169 \ufffd\n", + "170 \ufffd\n", + "171 \ufffd\n", + "172 \ufffd\n", + "173 \ufffd\n", + "174 \ufffd\n", + "175 \ufffd\n", + "176 \ufffd\n", + "177 \ufffd\n", + "178 \ufffd\n", + "179 \ufffd\n", + "180 \ufffd\n", + "181 \ufffd\n", + "182 \ufffd\n", + "183 \ufffd\n", + "184 \ufffd\n", + "185 \ufffd\n", + "186 \ufffd\n", + "187 \ufffd\n", + "188 \ufffd\n", + "189 \ufffd\n", + "190 \ufffd\n", + "191 \ufffd\n", + "192 \ufffd\n", + "193 \ufffd\n", + "194 \ufffd\n", + "195 \ufffd\n", + "196 \ufffd\n", + "197 \ufffd\n", + "198 \ufffd\n", + "199 \ufffd\n", + "200 \ufffd\n", + "201 \ufffd\n", + "202 \ufffd\n", + "203 \ufffd\n", + "204 \ufffd\n", + "205 \ufffd\n", + "206 \ufffd\n", + "207 \ufffd\n", + "208 \ufffd\n", + "209 \ufffd\n", + "210 \ufffd\n", + "211 \ufffd\n", + "212 \ufffd\n", + "213 \ufffd\n", + "214 \ufffd\n", + "215 \ufffd\n", + "216 \ufffd\n", + "217 \ufffd\n", + "218 \ufffd\n", + "219 \ufffd\n", + "220 \ufffd\n", + "221 \ufffd\n", + "222 \ufffd\n", + "223 \ufffd\n", + "224 \ufffd\n", + "225 \ufffd\n", + "226 \ufffd\n", + "227 \ufffd\n", + "228 \ufffd\n", + "229 \ufffd\n", + "230 \ufffd\n", + "231 \ufffd\n", + "232 \ufffd\n", + "233 \ufffd\n", + "234 \ufffd\n", + "235 \ufffd\n", + "236 \ufffd\n", + "237 \ufffd\n", + "238 \ufffd\n", + "239 \ufffd\n", + "240 \ufffd\n", + "241 \ufffd\n", + "242 \ufffd\n", + "243 \ufffd\n", + "244 \ufffd\n", + "245 \ufffd\n", + "246 \ufffd\n", + "247 \ufffd\n", + "248 \ufffd\n", + "249 \ufffd\n", + "250 \ufffd\n", + "251 \ufffd\n", + "252 \ufffd\n", + "253 \ufffd\n", + "254 \ufffd\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-space1.cpp, Page no-693" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "test=raw_input(\"Enter string: \")\n", + "i=0\n", + "print \"Output string: \",\n", + "while True:\n", + " if test[i].isspace():\n", + " break\n", + " else:\n", + " sys.stdout.write(test[i])\n", + " i+=1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string: Hello World\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output string: Hello\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-space2.cpp, Page no-693" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "test=raw_input(\"Enter string: \")\n", + "print \"Output string:\", test" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string: Hello World\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output string: Hello World\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-stand.cpp, Page no-694" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "string1=\"Object-Computing\"\n", + "string2=\" with C++\"\n", + "len1=len(string1)\n", + "len2=len(string2)\n", + "for i in range(1,len1):\n", + " print string1[:i]\n", + "for i in range(len1, 0, -1):\n", + " print string1[:i]\n", + "print \"%s%s\" %(string1[:len1], string2[:len2])\n", + "print string1+string2\n", + "print string1[:6]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "O\n", + "Ob\n", + "Obj\n", + "Obje\n", + "Objec\n", + "Object\n", + "Object-\n", + "Object-C\n", + "Object-Co\n", + "Object-Com\n", + "Object-Comp\n", + "Object-Compu\n", + "Object-Comput\n", + "Object-Computi\n", + "Object-Computin\n", + "Object-Computing\n", + "Object-Computin\n", + "Object-Computi\n", + "Object-Comput\n", + "Object-Compu\n", + "Object-Comp\n", + "Object-Com\n", + "Object-Co\n", + "Object-C\n", + "Object-\n", + "Object\n", + "Objec\n", + "Obje\n", + "Obj\n", + "Ob\n", + "O\n", + "Object-Computing with C++\n", + "Object-Computing with C++\n", + "Object\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student.cpp, Page no-697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_MARKS=600.0\n", + "def read(self):\n", + " self.__name=raw_input(\"Enter Name: \")\n", + " self.__marks=int(raw_input(\"Enter Marks Secured: \"))\n", + "def show(self):\n", + " print '{:>10}'.format(self.__name),\n", + " print '{:>6}'.format(self.__marks),\n", + " print '{0:10.0f}'.format((self.__marks/MAX_MARKS)*100)\n", + "class student:\n", + " __name=str\n", + " __marks=int\n", + " read=read\n", + " show=show\n", + "count=int(raw_input(\"How many students ? \"))\n", + "s=[]*count\n", + "for i in range(count):\n", + " s.append(student())\n", + "for i in range(count):\n", + " print \"Enter Student\", i+1, \"details...\"\n", + " s[i].read()\n", + "print \"Student Report...\"\n", + "print '{:>3}'.format(\"R#\"),\n", + "print '{:>10}'.format(\"Student\"),\n", + "print '{:>6}'.format(\"Marks\"),\n", + "print '{:>15}'.format(\"Percentage\")\n", + "for i in range(count):\n", + " print \"%3s\" %(i+1),\n", + " s[i].show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students ? 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student 1 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Marks Secured: 450\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student 2 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Marks Secured: 525\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Student 3 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Bindu\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Marks Secured: 429\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Report...\n", + " R# Student Marks Percentage\n", + " 1 Tejaswi 450 75\n", + " 2 Rajkumar 525 88\n", + " 3 Bindu 429 72\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-salary.cpp, Page no-701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "desig=[\"CEO\", \"Manager\", \"Receptionist\", \"Clerk\", \"Peon\"]\n", + "salary=[10200,5200,2950,950,750]\n", + "print \"Salary Structure Based on Designation\"\n", + "print \"-------------------------------------\"\n", + "print '{:>15}'.format('Designation '),\n", + "print '{:>15}'.format('Salary (in Rs.)')\n", + "print \"-------------------------------------\"\n", + "for i in range(5):\n", + " print '{:.>15}'.format(desig[i]),\n", + " print '{:*>15}'.format(salary[i])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Salary Structure Based on Designation\n", + "-------------------------------------\n", + "Designation Salary (in Rs.)\n", + "-------------------------------------\n", + "............CEO **********10200\n", + "........Manager ***********5200\n", + "...Receptionist ***********2950\n", + "..........Clerk ************950\n", + "...........Peon ************750\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-hex.c, Page no-705" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=raw_input(\"Enter any hexadecimal number: \")\n", + "print \"The input number in decimal = %d\" %int(num, 16)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any hexadecimal number: ab\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input number in decimal = 171\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-hex.cpp, Page no-706" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=raw_input(\"Enter any hexadecimal number: \")\n", + "print \"The input number in decimal = %d\" %int(num, 16)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any hexadecimal number: ab\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The input number in decimal = 171\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-foutput.cpp, Page no-709" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x=int(100)\n", + "print format(x, '02x'), x\n", + "f=122.3434\n", + "print f\n", + "print '{:.2f}'.format(f)\n", + "print \"0x%0.4X\" %x\n", + "print '{:.3e}'.format(f)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "64 100\n", + "122.3434\n", + "122.34\n", + "0x0064\n", + "1.223e+02\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-payroll.cpp, Page no-709" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f1=123.45\n", + "f2=34.65\n", + "f3=float(56)\n", + "print '{0:6.2f}'.format(f1)\n", + "print '{0:6.2f}'.format(f2)\n", + "print '{0:6.2f}'.format(f3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "123.45\n", + " 34.65\n", + " 56.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-oct.cpp, Page no-710" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "i=raw_input(\"Enter octal number: \")\n", + "print \"Its decimal equivalent is: %d\" %int(i, 8)\n", + "i=int(raw_input(\"Enter decimal number: \"))\n", + "print \"Its output:\", oct(i)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter octal number: 111\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Its decimal equivalent is: 73\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter decimal number: 73\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Its output: 0111\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mattab.cpp, Page no-711" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "num=int(raw_input(\"Enter Any Integer Number: \"))\n", + "print \"-----------------------------------------------------\"\n", + "print '{:>5}'.format(\"NUM\"),\n", + "print '{:>10}'.format(\"SQR\"),\n", + "print '{:>15}'.format(\"SQRT\"),\n", + "print '{:>15}'.format(\"LOG\")\n", + "print \"-----------------------------------------------------\"\n", + "for i in range(1, num+1):\n", + " print '{:>5}'.format(i),\n", + " print '{:>10}'.format(i*i),\n", + " print '{:15.3f}'.format(math.sqrt(i)),\n", + " print '{:15.4e}'.format(math.log(i))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Any Integer Number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-----------------------------------------------------\n", + " NUM SQR SQRT LOG\n", + "-----------------------------------------------------\n", + " 1 1 1.000 0.0000e+00\n", + " 2 4 1.414 6.9315e-01\n", + " 3 9 1.732 1.0986e+00\n", + " 4 16 2.000 1.3863e+00\n", + " 5 25 2.236 1.6094e+00\n", + " 6 36 2.449 1.7918e+00\n", + " 7 49 2.646 1.9459e+00\n", + " 8 64 2.828 2.0794e+00\n", + " 9 81 3.000 2.1972e+00\n", + " 10 100 3.162 2.3026e+00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-space3.cpp, Page no-712" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sp():\n", + " print \"\",\n", + "x=1\n", + "y=2\n", + "z=3\n", + "w=4\n", + "print x, \n", + "sp(), \n", + "print y, \n", + "sp(), \n", + "print z, \n", + "sp(), \n", + "print w" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-currency.cpp, Page no-713" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def rupee():\n", + " print \"Rs.\",\n", + "def dollar():\n", + " print \"US$\",\n", + "print \"Item Sales in India...\"\n", + "item1=raw_input(\"Enter Item Name: \")\n", + "cost1=int(raw_input(\"Cost of Item: \"))\n", + "print \"Item Sales in US...\"\n", + "item2=raw_input(\"Enter Item Name: \")\n", + "cost2=int(raw_input(\"Cost of Item: \"))\n", + "print \"Item Cost Statistics...\"\n", + "print \"Item Name:\", item1\n", + "print \"Cost:\", \n", + "rupee(), \n", + "print cost1\n", + "print \"Item Name:\", item2\n", + "print \"Cost:\", \n", + "dollar(), \n", + "print cost2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Item Sales in India...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Name: PARAM Supercomputer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cost of Item: 55000\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Item Sales in US...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Item Name: CRAY Supercomputer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cost of Item: 40500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Item Cost Statistics...\n", + "Item Name: PARAM Supercomputer\n", + "Cost: Rs. 55000\n", + "Item Name: CRAY Supercomputer\n", + "Cost: US$ 40500\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-pmani.cpp, Page no-715" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def output(self, x):\n", + " print '{x:{f}>{w}.{p}f}'.format(x=x,f=self._my_manipulator__fill,w= self._my_manipulator__width, p=self._my_manipulator__precision)\n", + "class my_manipulator:\n", + " __width=int\n", + " __precision=int\n", + " __fill=chr\n", + " def __init__(self, tw, tp, tf):\n", + " self.__width=tw\n", + " self.__precision=tp\n", + " self.__fill=tf\n", + " output=output\n", + "def set_float(w, p, f):\n", + " return my_manipulator(w, p, f)\n", + "f1=123.2734\n", + "f2=23.271\n", + "f3=16.1673\n", + "set_float(10, 3, '*').output(f1)\n", + "set_float(9, 2, '^').output(f2)\n", + "set_float(8, 3, '#').output(f3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "***123.273\n", + "^^^^23.27\n", + "##16.167\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-point.cpp, Page no-717" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class POINT:\n", + " __x=int\n", + " __y=int\n", + " def __init__(self):\n", + " self.__x=0\n", + " self.__y=0\n", + " def output(self):\n", + " print \"(%d,%d)\" %(self.__x, self.__y)\n", + " def input(self):\n", + " self.__x, self.__y=[int(x) for x in raw_input().split()] \n", + "p1=POINT()\n", + "p2=POINT()\n", + "print \"Enter two coordinate points (p1, p2):\",\n", + "p1.input(), p2.input()\n", + "print \"Coordinate points you entered are:\"\n", + "p1.output()\n", + "p2.output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two coordinate points (p1, p2):" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Coordinate points you entered are:\n", + "(2,3)\n", + "(5,6)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-719" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=raw_input(\"Enter a hexadecimal value: \")\n", + "num=int(num, 16)\n", + "print \"Octal equivalent:\", oct(num)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a hexadecimal value: A\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Octal equivalent: 012\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-719" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "PI=3.14159265\n", + "print \"The values at different levels of precision are:\"\n", + "for i in range(1, 6):\n", + " print '%0.*f' % (i, PI)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The values at different levels of precision are:\n", + "3.1\n", + "3.14\n", + "3.142\n", + "3.1416\n", + "3.14159\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter18-StreamsComputationWithFiles_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter18-StreamsComputationWithFiles_1.ipynb new file mode 100755 index 00000000..c0ab891b --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter18-StreamsComputationWithFiles_1.ipynb @@ -0,0 +1,1152 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:106e6360a9ecdf3fab5d674652e46c069b45eff7a983c63c8ffa1abf67715d03" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18-Streams Computation with Files" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-stdfile.cpp, Page no-728" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fout=open(\"student.out\", \"w\")\n", + "name=raw_input(\"Enter Name: \")\n", + "marks=raw_input(\"Enter Marks Secured: \")\n", + "fout.write(name+'\\n')\n", + "fout.write(marks+'\\n')\n", + "name=raw_input(\"Enter Name: \")\n", + "marks=raw_input(\"Enter Marks Secured: \")\n", + "fout.write(name+'\\n')\n", + "fout.write(marks+'\\n')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Marks Secured: 95\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Marks Secured: 90\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-stdread.cpp, Page no-729" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fin=open(\"student.out\", \"r\")\n", + "name = fin.readline()\n", + "print \"Name:\", name,\n", + "marks=fin.readline()\n", + "print \"Marks Secured:\",marks,\n", + "name = fin.readline()\n", + "print \"Name:\", name,\n", + "marks=fin.readline()\n", + "print \"Marks Secured:\",marks" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Rajkumar\n", + "Marks Secured: 95\n", + "Name: Tejaswi\n", + "Marks Secured: 90\n", + "\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-fdisp.cpp, Page no-732" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "filename=raw_input(\"Enter Name of the File: \")\n", + "try:\n", + " ifile=open(filename, \"r\")\n", + " ch=ifile.read()\n", + " print ch\n", + "except IOError:\n", + " print \"Error opening\", filename" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Name of the File: mytype.cpp\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Error opening mytype.cpp\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-keyin.cpp, Page no-733" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ofile=open(\"key.txt\", \"w\")\n", + "print \"Enter characters ..\"\n", + "else:\n", + " #Open a file\n", + " infile=open(sys.argv[1],'r')\n", + "\n", + " #In case file cannot open\n", + " if(not(infile)):\n", + " print \"Error opening\", sys.argv[1]\n", + " else:\n", + " #Read file\n", + " infile.seek(end)\n", + " print \"File Size=\", infile.tell()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Usage: fsize \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-putget.cpp, Page no-741" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "File=open(\"student.txt\", \"w\")\n", + "string=raw_input(\"Enter String: \")\n", + "File.write(string)\n", + "File.seek(0)\n", + "print \"Output string:\",\n", + "File=open(\"student.txt\", \"r\")\n", + "string=File.read()\n", + "print string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter String: Object-Computing with C++\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output string: Object-Computing with C++\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-fwr.cpp, Page no-743" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num1=530\n", + "num2=1050.25\n", + "out_file=open(\"number.bin\", \"w\")\n", + "out_file.write(str(num1)+'\\n')\n", + "out_file.write(str(num2)+'\\n')\n", + "out_file.close()\n", + "in_file=open(\"number.bin\", \"r\")\n", + "num1=in_file.readline()\n", + "num2=in_file.readline()\n", + "print num1, num2\n", + "in_file.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "530\n", + "1050.25\n", + "\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-objsave.cpp, Page no-744" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAXNAME=40\n", + "class Person:\n", + " __name=str\n", + " __age=int\n", + " def write(self, os):\n", + " os.write(self.__name+'\\n')\n", + " os.write(str(self.__age)+'\\n')\n", + " def read(self,Is):\n", + " self.__name=Is.readline()\n", + " self.__age=Is.readline()\n", + "def fOutput(fos, b):\n", + " b.write(fos)\n", + "def fInput(fos, b):\n", + " b.read(fos)\n", + "def Input(b):\n", + " b._Person__name=raw_input(\"Name: \")\n", + " b._Person__age=int(raw_input(\"Age: \"))\n", + "def Output(b):\n", + " print b._Person__name,\n", + " print b._Person__age,\n", + "p_obj=Person()\n", + "ofile=open(\"person.txt\", \"w\")\n", + "while(1):\n", + " Input(p_obj)\n", + " fOutput(ofile, p_obj)\n", + " ch=str(raw_input(\"Another? \"))\n", + " if ch.upper()!='Y':\n", + " break\n", + "ofile.close()\n", + "ifile=open(\"person.txt\", \"r\")\n", + "print \"The objects written to the file were:..\"\n", + "while 1:\n", + " fInput(ifile, p_obj)\n", + " Output(p_obj)\n", + " if p_obj._Person__name=='':\n", + " break" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Another? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Savithri\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Another? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The objects written to the file were:..\n", + "Tejaswi\n", + "5\n", + "Savithri\n", + "23\n", + " \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student.cpp, Page no-748" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " infile=open(\"student.in\", \"r\")\n", + "except IOerror:\n", + " print \"Error: student.in file non-existent\"\n", + "try:\n", + " outfile=open(\"student.out\", \"w\")\n", + "except IOerror:\n", + " print \"Error: unable to open student.out in write mode\"\n", + "else:\n", + " count=int(infile.readline())\n", + " outfile.write(\" Students Information Processing\")\n", + " outfile.write(\"\\n----------------------------------------\")\n", + " for i in range(count):\n", + " name=infile.readline()\n", + " percentage=int(infile.readline())\n", + " outfile.write(\"\\nName: \"+name)\n", + " outfile.write(\"Percentage: \"+str(percentage)+'\\n')\n", + " outfile.write(\"Passed in: \")\n", + " if percentage>=70:\n", + " outfile.write(\"First class with distinction\")\n", + " elif percentage>=60:\n", + " outfile.write(\"First class\")\n", + " elif percentage>=50:\n", + " outfile.write(\"Second class\")\n", + " elif percentage>=35:\n", + " outfile.write(\"Third class\")\n", + " else:\n", + " outfile.write(\"Sorry, Failed!\")\n", + " outfile.write('\\n')\n", + " outfile.write(\"----------------------------------------\")\n", + " infile.close()\n", + " outfile.close()\n", + " print \"Contents of student.out:\\n\"\n", + " infile=open(\"student.out\", \"r\")\n", + " Str=infile.read()\n", + " print Str\n", + " infile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contents of student.out:\n", + "\n", + " Students Information Processing\n", + "----------------------------------------\n", + "Name: Rajkumar\n", + "Percentage: 84\n", + "Passed in: First class with distinction\n", + "----------------------------------------\n", + "Name: Tejaswi\n", + "Percentage: 82\n", + "Passed in: First class with distinction\n", + "----------------------------------------\n", + "Name: Smrithi\n", + "Percentage: 60\n", + "Passed in: First class\n", + "----------------------------------------\n", + "Name: Anand\n", + "Percentage: 55\n", + "Passed in: Second class\n", + "----------------------------------------\n", + "Name: Rajshree\n", + "Percentage: 40\n", + "Passed in: Third class\n", + "----------------------------------------\n", + "Name: Ramesh\n", + "Percentage: 33\n", + "Passed in: Sorry, Failed!\n", + "----------------------------------------\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-fio.cpp, Page no-751" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "READ_SIZE=6\n", + "reader=str\n", + "fstr=open(\"test.del\", \"w\")\n", + "for i in range(10):\n", + " fstr.write(str(i))\n", + "fstr.seek(2)\n", + "fstr.write(\"Hello\")\n", + "fstr=open(\"test.del\", \"r\")\n", + "fstr.seek(4)\n", + "reader=fstr.read(READ_SIZE)\n", + "print reader" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "llo789\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-direct.cpp, Page no-752" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_char, c_int\n", + "class Person(Structure):\n", + " _fields_=[('name',c_char*40),('age',c_int)]\n", + " def write(self, os):\n", + " os.write(self.__name+'\\n')\n", + " os.write(str(self.__age)+'\\n')\n", + " def read(self, Is):\n", + " self.__name=Is.readline()\n", + " self.__age=Is.readline()\n", + "def Input(b):\n", + " b._Person__name=raw_input(\"Name: \")\n", + " b._Person__age=int(raw_input(\"Age: \"))\n", + "def Output(b):\n", + " print \"Name:\",b._Person__name,\n", + " print \"Age:\",b._Person__age,\n", + "p_obj=Person()\n", + "print \"Database Creation...\"\n", + "ofile=open(\"person.dat\", \"w\")\n", + "count=0\n", + "while(1):\n", + " print \"Enter Object\", count, \"details...\"\n", + " Input(p_obj)\n", + " count=count+1\n", + " p_obj.write(ofile)\n", + " ch=str(raw_input(\"Another? \"))\n", + " if ch.upper()!='Y':\n", + " break\n", + "ofile.close()\n", + "iofile=open(\"person.dat\", \"r+b\")\n", + "print \"Database Access...\"\n", + "while 1:\n", + " obj_id=int(raw_input(\"Enter the object number to be accessed <-1 to end>: \"))\n", + " iofile.seek(0)\n", + " if obj_id<0 or obj_id>=count:\n", + " break\n", + " for i in range(2*obj_id):\n", + " iofile.readline()\n", + " location=iofile.tell()\n", + " iofile.seek(location)\n", + " p_obj.read(iofile)\n", + " Output(p_obj)\n", + " ch=raw_input(\"Wants to Modify? \")\n", + " if ch=='y' or ch=='Y':\n", + " Input(p_obj)\n", + " iofile.seek(location)\n", + " p_obj.write(iofile)\n", + "iofile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Database Creation...\n", + "Enter Object 0 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Another? y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Object 1 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Another? y\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Object 2 details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Kalpana\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Another? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Database Access...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the object number to be accessed <-1 to end>: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Rajkumar\r\n", + "Age: 25\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wants to Modify? n\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the object number to be accessed <-1 to end>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Tejaswi\r\n", + "Age: 20\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wants to Modify? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Age: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the object number to be accessed <-1 to end>: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name: Tejaswi\n", + "Age: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wants to Modify? n\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the object number to be accessed <-1 to end>: -1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-outfile.cpp, Page no-758" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "outfile=open(\"sample.out\", \"w\")\n", + "if not(outfile):\n", + " print \"Error: sample.out unable to open\"\n", + "else:\n", + " while(1):\n", + " buff=raw_input()\n", + " if buff==\"end\":\n", + " break\n", + " outfile.write(buff)\n", + " if not(outfile):\n", + " print \"write operation fail\"\n", + " break\n", + " outfile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "OOP is good\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is OOP\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is good\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "end\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-762" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "space=tab=line=0\n", + "fin=open(\"File1.txt\", \"r\")\n", + "#fin.write(\"F I L E\\nHandling\\nin\tC++\")\n", + "while 1:\n", + " c=fin.read(1)\n", + " if c==' ':\n", + " space+=1\n", + " if c=='\\t':\n", + " tab+=1\n", + " if c=='\\n':\n", + " line+=1\n", + " if c=='':\n", + " break\n", + "print \"Number of blank spaces =\", space\n", + "print \"Number of tabs =\", tab\n", + "print \"Number of lines =\", line" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of blank spaces = 3\n", + "Number of tabs = 1\n", + "Number of lines = 2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-763" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fin=open(\"Sample.txt\", \"r\")\n", + "#fin.write(\"File Handling in C++\")\n", + "print \"Here are the contents of the file, Sample.txt...\"\n", + "c=fin.read()\n", + "print c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here are the contents of the file, Sample.txt...\n", + "File Handling in C++\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter19-ExceptionHandling_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter19-ExceptionHandling_1.ipynb new file mode 100755 index 00000000..98576807 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter19-ExceptionHandling_1.ipynb @@ -0,0 +1,1454 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3313deb61b605e4e7573c1c706ba00b703ad3ca8e59ab2363418ae531f9382dc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19-Exception Handling" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-divzero.cpp, Page no-770" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class number:\n", + " __num=int\n", + " def read(self):\n", + " self.__num=int(raw_input())\n", + " class DIVIDE():\n", + " pass\n", + " def div(self, num2):\n", + " if num2.__num==0:\n", + " raise self.DIVIDE()\n", + " else:\n", + " return self.__num/num2.__num\n", + "num1=number()\n", + "num2=number()\n", + "print \"Enter Number 1: \",\n", + "num1.read()\n", + "print \"Enter Number 2: \",\n", + "num2.read()\n", + "try:\n", + " print \"trying division operation...\",\n", + " result=num1.div(num2)\n", + " print \"succeeded\"\n", + "except number.DIVIDE:\n", + " print \"failed\"\n", + " print \"Exception: Divide-By-Zero\"\n", + "else:\n", + " print \"num1/num2 =\", result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Number 1: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Number 2: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " trying division operation... failed\n", + "Exception: Divide-By-Zero\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-arrbound.cpp, Page no-772" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ARR_SIZE=10\n", + "class array:\n", + " __arr=[int]*ARR_SIZE\n", + " class RANGE():\n", + " pass\n", + " #overloading []\n", + " def op(self, i, x):\n", + " if i<0 or i>=ARR_SIZE:\n", + " raise self.RANGE()\n", + " self.__arr[i]=x\n", + "a=array()\n", + "print \"Maximum array size allowed =\", ARR_SIZE\n", + "try:\n", + " print \"Trying to refer a[1]...\",\n", + " a.op(1, 10) #a[1]=10\n", + " print \"succeeded\"\n", + " print \"Trying to refer a[15]...\",\n", + " a.op(15, 10) #a[15]=10\n", + " print \"succeeded\"\n", + "except array.RANGE:\n", + " print \"Out of Range in Array Reference\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum array size allowed = 10\n", + "Trying to refer a[1]... succeeded\n", + "Trying to refer a[15]... Out of Range in Array Reference\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-pass.cpp, Page no-774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ARR_SIZE=10\n", + "class array:\n", + " __arr=[int]*ARR_SIZE\n", + " class RANGE():\n", + " pass\n", + " def __init__(self):\n", + " for i in range(ARR_SIZE):\n", + " self.__arr[i]=i\n", + " #overloading []\n", + " def op(self, i, x=None):\n", + " if i<0 or i>=ARR_SIZE:\n", + " raise self.RANGE()\n", + " if isinstance(x, int):\n", + " self.__arr[i]=x\n", + " else:\n", + " return self.__arr[i]\n", + "def read(a, index):\n", + " try:\n", + " element=a.op(index)\n", + " except array.RANGE:\n", + " print \"Parent passing exception to child to handle\"\n", + " raise\n", + " return element\n", + "a=array()\n", + "print \"Maximum array size allowed =\", ARR_SIZE\n", + "while(1):\n", + " index=int(raw_input(\"Enter element to be referenced: \"))\n", + " try:\n", + " print \"Trying to access object array 'a' for index =\", index\n", + " element=read(a, index)\n", + " print \"Elemnet in Array =\", element\n", + " except array.RANGE:\n", + " print \"Child: Out of Range in Array Reference\"\n", + " break" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum array size allowed = 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter element to be referenced: 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Trying to access object array 'a' for index = 1\n", + "Elemnet in Array = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter element to be referenced: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Trying to access object array 'a' for index = 5\n", + "Elemnet in Array = 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter element to be referenced: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Trying to access object array 'a' for index = 10\n", + "Parent passing exception to child to handle\n", + "Child: Out of Range in Array Reference\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sign1.cpp, Page no-777" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class positive:\n", + " pass\n", + "class negative:\n", + " pass\n", + "class zero:\n", + " pass\n", + "def what_sign(num): #no exception list in python and hence the except block for class zero is removed to produce the desired output\n", + " if num>0:\n", + " raise positive()\n", + " elif num<0:\n", + " raise negative()\n", + " else:\n", + " raise zero()\n", + "num=int(raw_input(\"Enter any number: \"))\n", + "try:\n", + " what_sign(num)\n", + "except positive:\n", + " print \"+ve Exception\"\n", + "except negative:\n", + " print \"-ve Exception\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number: -10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-ve Exception\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sign2.cpp, Page no-778" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class zero:\n", + " pass\n", + "def what_sign(num): #no exception list in python and hence the except block for class zero is removed to produce the desired output\n", + " if num>0:\n", + " print \"+ve Exception\"\n", + " elif num<0:\n", + " print \"-ve Exception\"\n", + " else:\n", + " raise zero()\n", + "num=int(raw_input(\"Enter any number: \"))\n", + "what_sign(num)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "+ve Exception\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-catall1.cpp, Page no-780" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class excep2:\n", + " pass\n", + "try:\n", + " print \"Throwing uncaught exception\"\n", + " raise excep2()\n", + "except:\n", + " print \"Caught all exceptions\"\n", + "print \"I am displayed\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Throwing uncaught exception\n", + "Caught all exceptions\n", + "I am displayed\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-catall2.cpp, Page no-780" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class ALPHA:\n", + " pass\n", + "_a=ALPHA()\n", + "def f3():\n", + " print \"f3() was called\"\n", + " raise _a\n", + "def f2():\n", + " try:\n", + " print \"f2() was called\"\n", + " f3()\n", + " except:\n", + " print \"f2() has elements with exceptions!\"\n", + "try:\n", + " f2()\n", + "except:\n", + " print \"Need more handlers!\"\n", + " print \"continud after handling exceptions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f2() was called\n", + "f3() was called\n", + "f2() has elements with exceptions!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-twoexcep.cpp, Page no-782" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ARR_SIZE=10\n", + "class array:\n", + " __arr=[int]\n", + " __size=int\n", + " class RANGE:\n", + " pass\n", + " class SIZE:\n", + " pass\n", + " def __init__(self, SizeRequest):\n", + " self.__arr=[int]*SizeRequest\n", + " if SizeRequest<0 or SizeRequest>ARR_SIZE:\n", + " raise self.SIZE()\n", + " self.__size=SizeRequest\n", + " def __del__(self):\n", + " del self.__arr\n", + " #overloading []\n", + " def op(self, i, x=None):\n", + " if i<0 or i>=self.__size:\n", + " raise self.RANGE()\n", + " elif isinstance(x, int):\n", + " self.__arr[i]=x\n", + " else:\n", + " return self.__arr[i]\n", + "print \"Maximum array size allowed =\", ARR_SIZE\n", + "try:\n", + " print \"Trying to create object a1(5)...\",\n", + " a1=array(5)\n", + " print \"succeeded\"\n", + " print \"Trying to refer a1[4]...\",\n", + " a1.op(4, 10) #a1[4]=10\n", + " print \"succeeded..\",\n", + " print \"a1[4] =\", a1.op(4) #a1[4]\n", + " print \"Trying to refer a1[15]...\",\n", + " a1.op(15, 10) #a1[15]=10\n", + " print \"succeeded\"\n", + "except array.SIZE:\n", + " print \"..Size exceeds allowable Limit\"\n", + "except array.RANGE:\n", + " print \"..Array Reference Out of Range\"\n", + "try:\n", + " print \"Trying to create object a2(15)...\",\n", + " a2=array(15)\n", + " print \"succeeded\"\n", + " a2.op(3, 3) #a2[3]=3\n", + "except array.SIZE:\n", + " print \"..Size exceeds allowable Limit\"\n", + "except array.RANGE:\n", + " print \"..Array Reference Out of Range\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum array size allowed = 10\n", + "Trying to create object a1(5)... succeeded\n", + "Trying to refer a1[4]... succeeded.. a1[4] = 10\n", + "Trying to refer a1[15]... ..Array Reference Out of Range\n", + "Trying to create object a2(15)... ..Size exceeds allowable Limit\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-uncaught.cpp, Page no-784" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#error because there is no block to handles exceptions of type excep2()\n", + "class excep1:\n", + " pass\n", + "class excep2:\n", + " pass\n", + "try:\n", + " print \"Throwing uncaught exception\"\n", + " raise excep2()\n", + "except excep1:\n", + " print \"Exception 1\"\n", + " print \"I am not displayed\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Throwing uncaught exception\n" + ] + }, + { + "ename": "excep2", + "evalue": "<__main__.excep2 instance at 0x00000000039A8408>", + "output_type": "pyerr", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mexcep2\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 5\u001b[0m \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 6\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"Throwing uncaught exception\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 7\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mexcep2\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 8\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[0mexcep1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 9\u001b[0m \u001b[1;32mprint\u001b[0m \u001b[1;34m\"Exception 1\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mexcep2\u001b[0m: <__main__.excep2 instance at 0x00000000039A8408>" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-myhand.cpp, Page no-786" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class excep1:\n", + " pass\n", + "class excep2:\n", + " pass\n", + "def MyTerminate():\n", + " print \"My terminate is invoked\"\n", + " return \n", + "try:\n", + " print \"Throwing uncaught exception\"\n", + " raise excep2()\n", + "except excep1:\n", + " print \"Exception 1\"\n", + " print \"I am not displayed\"\n", + "except:\n", + " MyTerminate()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Throwing uncaught exception\n", + "My terminate is invoked\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sign3.cpp, Page no-787" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class zero:\n", + " pass\n", + "def what_sign(num):#no exception list in python and hence the except block is removed to produce the desired output\n", + " if num>0:\n", + " print \"+ve Exception\"\n", + " elif num<0:\n", + " print \"-ve Exception\"\n", + " else:\n", + " raise zero()\n", + "num=int(raw_input(\"Enter any number: \"))\n", + "what_sign(num)\n", + "print \"end of main()\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "+ve Exception\n", + "end of main()\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sign4.cpp, Page no-788" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class zero:\n", + " pass\n", + "def MyUnexpected():\n", + " print \"My unexpected handler is invoked\"\n", + "def what_sign(num): #no exception list in python and hence the changes are made to produce the desired output\n", + " if num>0:\n", + " print \"+ve Exception\"\n", + " print \"end of main()\"\n", + " elif num<0:\n", + " print \"-ve Exception\"\n", + " print \"end of main()\"\n", + " else:\n", + " MyUnexpected()\n", + "num=int(raw_input(\"Enter any number: \"))\n", + "try:\n", + " what_sign(num)\n", + "except:\n", + " print \"catch all exceptions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any number: 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "My unexpected handler is invoked\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-interact.cpp, Page no-790" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "VEC_SIZE=10\n", + "class vector:\n", + " __vec=[int]\n", + " __size=int\n", + " class RANGE:\n", + " pass\n", + " class SIZE:\n", + " pass\n", + " def __init__(self, SizeRequest):\n", + " self.__vec=[int]*SizeRequest\n", + " if SizeRequest<0 or SizeRequest>VEC_SIZE:\n", + " raise self.SIZE()\n", + " self.__size=SizeRequest\n", + " def __del__(self):\n", + " del self.__vec\n", + " #overloading []\n", + " def op(self, i, x=None):\n", + " if i<0 or i>=self.__size:\n", + " raise self.RANGE()\n", + " elif isinstance(x, int):\n", + " self.__vec[i]=x\n", + " else:\n", + " return self.__vec[i]\n", + "print \"Maximum vector size allowed =\", VEC_SIZE\n", + "try:\n", + " size=int(raw_input(\"What is the size of vector you want to create: \"))\n", + " print \"Trying to create object vector v1 of size =\", size,\n", + " v1=vector(size)\n", + " print \"..succeeded\"\n", + " index=int(raw_input(\"Which vector element you want to access (index): \"))\n", + " print \"What is the new value for v1[\", index, \"]:\",\n", + " data=int(raw_input())\n", + " print \"Trying to modify a1[\", index, \"]...\",\n", + " v1.op(index, data) #v1[index]=data\n", + " print \"succeeded\"\n", + " print \"New value of a1[\", index, \"] =\", v1.op(index) #v1[index]\n", + "except vector.SIZE:\n", + " print \"failed\\nVector creation size exceeds allowable limit\"\n", + "except vector.RANGE:\n", + " print \"failed\\nVector reference out-of-range\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum vector size allowed = 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the size of vector you want to create: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Trying to create object vector v1 of size = 5 ..succeeded\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Which vector element you want to access (index): 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is the new value for v1[ 10 ]:" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Trying to modify a1[ 10 ]... failed\n", + "Vector reference out-of-range\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-virtual.cpp, Page no-792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class WRONG_AGE:\n", + " pass\n", + "class Father:\n", + " def __init__(self, n):\n", + " if n<0:\n", + " raise WRONG_AGE()\n", + " self.__f_age=n\n", + " def GetAge(self):\n", + " return self.__f_age\n", + "class Son(Father):\n", + " def __init__(self, n, m):\n", + " Father.__init__(self, n)\n", + " if m>=n:\n", + " raise WRONG_AGE()\n", + " self.__s_age=m\n", + " def GetAge(self):\n", + " return self.__s_age\n", + "basep=[Father]\n", + "father_age=int(raw_input(\"Enter Age of Father: \"))\n", + "try:\n", + " basep=Father(father_age)\n", + "except WRONG_AGE:\n", + " print \"Error: Father's Age is < 0\"\n", + "else:\n", + " print \"Father's Age:\", basep.GetAge()\n", + " del basep\n", + " son_age=int(raw_input(\"Enter Age of Son: \"))\n", + " try:\n", + " basep=Son(father_age, son_age)\n", + " except WRONG_AGE:\n", + " print \"Error: Father's Age cannot be less than son age\"\n", + " else:\n", + " print \"Father's Age:\", basep.GetAge()\n", + " del basep" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Age of Father: 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Father's Age: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Age of Son: 45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Error: Father's Age cannot be less than son age\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-matrix.cpp, Page no-794" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "TRUE=1\n", + "FALSE=0\n", + "class MatError:\n", + " pass\n", + "class matrix:\n", + " __MaxRow=int\n", + " __MaxCol=int\n", + " def __init__(self, row=0, col=0):\n", + " self.__MaxRow=row\n", + " self.__MaxCol=col\n", + " self.__MatPtr=[[float]*5]*5\n", + " def __add__(self, b):\n", + " c=matrix(self.__MaxRow, self.__MaxCol)\n", + " if self.__MaxRow != b._matrix__MaxRow or self.__MaxCol != b._matrix__MaxCol:\n", + " raise MatError()\n", + " for i in range(self.__MaxRow):\n", + " for j in range(self.__MaxCol):\n", + " c._matrix__MatPtr[i][j]=self.__MatPtr[i][j]+b._matrix__MatPtr[i][j]\n", + " return c\n", + " def __sub__(self, b):\n", + " c=matrix(self.__MaxRow, self.__MaxCol)\n", + " if self.__MaxRow != b._matrix__MaxRow or self.__MaxCol != b._matrix__MaxCol:\n", + " raise MatError()\n", + " for i in range(self.__MaxRow):\n", + " for j in range(self.__MaxCol):\n", + " c._matrix__MatPtr[i][j]=self.__MatPtr[i][j]-b._matrix__MatPtr[i][j]\n", + " return c\n", + " def __mul__(self, b):\n", + " c=matrix(self.__MaxRow, b._matrix__MaxCol)\n", + " if self.__MaxCol!=b._matrix__MaxRow:\n", + " raise MatError()\n", + " for i in range(c._matrix__MaxRow):\n", + " for j in range(c._matrix__MaxCol):\n", + " c._matrix__MatPtr[i][j]=0\n", + " for k in range(self.__MaxCol):\n", + " c._matrix__MatPtr[i][j]+=self.__MatPtr[i][k]*b._matrix__MatPtr[k][j]\n", + " return c\n", + " def __eq__(self, b):\n", + " if self.__MaxRow != b._matrix__MaxRow or self.__MaxCol != b._matrix__MaxCol:\n", + " return FALSE\n", + " for i in range(self.__MaxRow):\n", + " for j in range(self.__MaxCol):\n", + " if self.__MatPtr[i][j]!=b._matrix__MatPtr[i][j]:\n", + " return FALSE\n", + " return TRUE\n", + " def __assign__(self, b):\n", + " self.__MaxRow = b._matrix__MaxRow\n", + " self.__MaxCol = b._matrix__MaxCol\n", + " for i in range(self.__MaxRow):\n", + " for j in range(self.__MaxCol):\n", + " self.__MatPtr[i][j]=b._matrix__MatPtr[i][j]\n", + " def Input(self):\n", + " self.__MaxRow=int(raw_input(\"How many rows? \"))\n", + " self.__MaxCol=int(raw_input(\"How many columns? \"))\n", + " self.__MatPtr = []\n", + " for i in range(0,self.__MaxRow):\n", + " self.__MatPtr.append([])\n", + " for j in range(0,self.__MaxCol):\n", + " print \"Matrix[%d,%d] =? \" %(i, j),\n", + " self.__MatPtr[i].append(float(raw_input()))\n", + " def output(self):\n", + " for i in range(self.__MaxRow):\n", + " print \"\"\n", + " for j in range(self.__MaxCol):\n", + " print \"%g\" %self.__MatPtr[i][j],\n", + "a=matrix()\n", + "b=matrix()\n", + "print \"Enter Matrix A details...\"\n", + "a.Input()\n", + "print \"Enter Matrix B details...\"\n", + "b.Input()\n", + "print \"Matrix A is...\",\n", + "a.output()\n", + "print \"\\nMatrix B is...\",\n", + "b.output()\n", + "c=matrix()\n", + "try:\n", + " c=a+b\n", + " print \"\\nC = A + B...\",\n", + " c.output()\n", + "except MatError:\n", + " print \"\\nInvalid matrix order for addition\",\n", + "d=matrix()\n", + "try:\n", + " d=a-b\n", + " print \"\\nD = A - B...\",\n", + " d.output()\n", + "except MatError:\n", + " print \"\\nInvalid matrix order for subtraction\",\n", + "e=matrix(3, 3)\n", + "try:\n", + " e=a*b\n", + " print \"\\nE = A * B...\",\n", + " e.output()\n", + "except MatError:\n", + " print \"\\nInvalid matrix order for multiplication\",\n", + "print \"\\n(Is matrix A equal to matrix B) ?\",\n", + "if a==b:\n", + " print \"Yes\"\n", + "else:\n", + " print \"No\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Matrix A details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[0,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[0,1] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Matrix B details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows? 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns? 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[0,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[1,0] =? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix A is... \n", + "1 2 \n", + "Matrix B is... \n", + "1 \n", + "2 \n", + "Invalid matrix order for addition \n", + "Invalid matrix order for subtraction \n", + "E = A * B... \n", + "5 \n", + "(Is matrix A equal to matrix B) ? No\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-recovery.cpp, Page no-802" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "MAX_SIG_INT=7\n", + "MAX_UNSIG_INT=15\n", + "class OVERFLOW:\n", + " pass\n", + "def sum(i, j, k):\n", + " try:\n", + " #Version1 procedure\n", + " result=i+j\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " result=result+k\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " print \"Version-1 succeeds\"\n", + " except OVERFLOW:\n", + " print \"Version-1 fails\"\n", + " try:\n", + " #Version2 procedure\n", + " result=i+k\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " result=result+j\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " print \"Version-2 succeeds\"\n", + " except OVERFLOW:\n", + " print \"Version-2 fails\"\n", + " try:\n", + " #Version3 procedure\n", + " result=j+k\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " result=result+i\n", + " if result>MAX_SIG_INT:\n", + " raise OVERFLOW()\n", + " print \"Version-3 succeeds\"\n", + " except OVERFLOW:\n", + " print \"Error: Overflow. All versions falied\"\n", + " return result\n", + "print \"Sum of 7, -3, 2 computation...\"\n", + "result=sum(7, -3, 2)\n", + "print \"Sum =\", result\n", + "print \"Sum of 7, 2, -3 computation...\"\n", + "result=sum(7,2, -3)\n", + "print \"Sum =\", result\n", + "print \"Sum of 3, 3, 2 computation...\"\n", + "result=sum(3, 3, 2)\n", + "print \"Sum =\", result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of 7, -3, 2 computation...\n", + "Version-1 succeeds\n", + "Sum = 6\n", + "Sum of 7, 2, -3 computation...\n", + "Version-1 fails\n", + "Version-2 succeeds\n", + "Sum = 6\n", + "Sum of 3, 3, 2 computation...\n", + "Version-1 fails\n", + "Version-2 fails\n", + "Error: Overflow. All versions falied\n", + "Sum = 8\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-new1.cpp, Page no-804" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "size=int(raw_input(\"How many bytes to be allocated: \"))\n", + "try:\n", + " data=[int]*size\n", + " print \"Memory allocation success, address =\", hex(id(data))\n", + "except:\n", + " print \"Could not allocate. Bye...\"\n", + "del data" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many bytes to be allocated: 300\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory allocation success, address = 0x3717188L\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-new2.cpp, Page no-805" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def display(data, m, n):\n", + " for i in range(m):\n", + " for j in range(n):\n", + " print data[i][j],\n", + " print \"\"\n", + "def de_allocate(data, m):\n", + " for i in range(m-1):\n", + " del data[i]\n", + "m, n=[int(x) for x in raw_input(\"Enter rows and columns count: \").split()]\n", + "try:\n", + " data = []\n", + " for i in range(m):\n", + " data.append([])\n", + " for j in range(n):\n", + " data[i].append(0)\n", + "except:\n", + " print \"Could not allocate. Bye...\"\n", + "else:\n", + " for i in range(m):\n", + " for j in range(n):\n", + " data[i][j]=i+j\n", + " display(data, m, n)\n", + " de_allocate(data, m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter rows and columns count: 3 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0 1 2 3 \n", + "1 2 3 4 \n", + "2 3 4 5 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-812" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ther is no goto in python\n", + "def main():\n", + " num=int(raw_input(\"Please enter an integer value: \"))\n", + " if isinstance(num, int):\n", + " print \"You entered a correct type of value\"\n", + " else:\n", + " raise num\n", + "try:\n", + " main()\n", + "except:\n", + " print \"You enetered incorrect type of value; try again\"\n", + " main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an integer value: 10.7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You enetered incorrect type of value; try again\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please enter an integer value: 8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You entered a correct type of value\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-2, Page no-812" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Int:\n", + " def __init__(self, val):\n", + " self.value=val\n", + "class Double:\n", + " def __init__(self, val):\n", + " self.value=val\n", + "class Str:\n", + " def __init__(self, val):\n", + " self.value=val\n", + "i=int(raw_input(\"Press an integer between 1 - 3 to test exception handling with multiple catch blocks..\"))\n", + "try:\n", + " if i==1:\n", + " print \"Throwing integer value\"\n", + " raise Int(1)\n", + " if i==2:\n", + " print \"Throwing double value\"\n", + " raise Double(1.12)\n", + " if i==3:\n", + " print \"Throwing charcter value\"\n", + " raise Str('A')\n", + "except Int as e: #type of an exception raised is not correctly determined in the exception block and hence use of classes \n", + " print \"Caught an integer value\", e.value\n", + "except Double as e:\n", + " print \"Caught a double value\", e.value\n", + "except Str as e:\n", + " print \"Caught a character value\", e.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Press an integer between 1 - 3 to test exception handling with multiple catch blocks..3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Throwing charcter value\n", + "Caught a character value A\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter2-MovingfromCtoC++.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter2-MovingfromCtoC++.ipynb new file mode 100755 index 00000000..32b2a8e8 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter2-MovingfromCtoC++.ipynb @@ -0,0 +1,1389 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:70a62a4d8104a5170dca82f519a0ca63c8b7c13d833950e937b1650a45a6a6fc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2- Moving from C to C++" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-hello.c, Page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hello World\" #printing a statement" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello World\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-hello.cpp, Page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"Hello World\" #printing a statement" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello World\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-output.cpp, Page no-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "msg=\"C++ cout object\"\n", + "sex='M'\n", + "age=24\n", + "number=420.5\n", + "print sex, \n", + "print \" \", age, \" \", number\n", + "print msg\n", + "print '%d%d%d' %(1,2,3)\n", + "print number+1\n", + "print 99.99" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M 24 420.5\n", + "C++ cout object\n", + "123\n", + "421.5\n", + "99.99\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-read.cpp, Page no-38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "name=[None]*25 #char name[25]\n", + "address=[None]*25 #char address[25]\n", + "name=raw_input(\"Enter name: \") #take input from user\n", + "age=int(raw_input(\"Enter Age: \"))\n", + "address=raw_input(\"Enter address: \")\n", + "print \"The data entered are: \"\n", + "print \"Name =\", name\n", + "print \"Age =\", age\n", + "print \"Address =\", address" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Age: 24\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter address: C-DAC-Bangalore\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The data entered are: \n", + "Name = Rajkumar\n", + "Age = 24\n", + "Address = C-DAC-Bangalore\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-simpint.cpp, Page no-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "principle=int(raw_input(\"Enter Principle Amount: \"))\n", + "time=int(raw_input(\"Enter time (in years): \"))\n", + "rate=int(raw_input(\"Enter Rate of Interest: \"))\n", + "SimpInt=(principle*time*rate)/100\n", + "print \"Simple Interest =\", SimpInt\n", + "total= principle + SimpInt\n", + "print \"Total Amount =\", total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Principle Amount: 1000\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter time (in years): 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Rate of Interest: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Simple Interest = 100\n", + "Total Amount = 1100\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-area.cpp, Page no-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "PI=3.1452 \n", + "radius=float(raw_input(\"Enter Radius of Circle: \"))\n", + "area=PI*radius*radius\n", + "print \"Area of Circle =\", area" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Radius of Circle: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of Circle = 12.5808\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-disp.c, Page no-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def display(msg): #pass by reference\n", + " print msg\n", + " msg=\"Misuse\"\n", + " return msg\n", + "string=[None]*15\n", + "string=\"Hello World\"\n", + "string=display(string)\n", + "print string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello World\n", + "Misuse\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-disp.cpp, Page No-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def display(msg): #pass by value\n", + " print msg\n", + "string=[None]*15\n", + "string=\"Hello World\"\n", + "display(string)\n", + "print string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hello World\n", + "Hello World\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-global.cpp, Page no-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=20\n", + "def main():\n", + " global num\n", + " x=num\n", + " num=10\n", + " print \"Local =\", num\n", + " print \"Global =\",x\n", + " print \"Global+Local =\", x+num\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Local = 10\n", + "Global = 20\n", + "Global+Local = 30\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-loop.cpp, Page no-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "counter=50\n", + "def main():\n", + " global counter\n", + " x=counter\n", + " for counter in range(1, 10):\n", + " print x/counter\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "50\n", + "25\n", + "16\n", + "12\n", + "10\n", + "8\n", + "7\n", + "6\n", + "5\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-var1.cpp, Page no-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "for i in range(5):\n", + " print i\n", + "i+=1;\n", + "print i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-def2.cpp, Page no-46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=10\n", + "def main():\n", + " global a\n", + " global_a=a\n", + " print global_a\n", + " a=20\n", + " def temp():\n", + " a=30\n", + " print a\n", + " print global_a\n", + " temp()\n", + " print a\n", + " print global_a\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n", + "30\n", + "10\n", + "20\n", + "10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-refvar.cpp, Page no-48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=z=1\n", + "b=2\n", + "c=3\n", + "print \"a=\",a, \"b=\", b, \"c=\", c, \"z=\", z\n", + "a=z=b\n", + "print \"a=\",a, \"b=\", b, \"c=\", c, \"z=\", z\n", + "a=z=c\n", + "print \"a=\",a, \"b=\", b, \"c=\", c, \"z=\", z\n", + "print \"&a=\", hex(id(a)),\"&b=\", hex(id(b)) , \"&c=\", hex(id(c))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 1 b= 2 c= 3 z= 1\n", + "a= 2 b= 2 c= 3 z= 2\n", + "a= 3 b= 2 c= 3 z= 3\n", + "&a= 0x1d95f68L &b= 0x1d95f80L &c= 0x1d95f68L\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-reftest.cpp, Page no-49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, pointer\n", + "n=c_int(100)\n", + "p=pointer(n)\n", + "m=p[0]\n", + "print \"n =\", n.value, \"m =\", m, \"*p =\", p[0]\n", + "k=c_int(100)\n", + "p=pointer(k)\n", + "k.value=200\n", + "print \"n =\", n.value, \"m =\", m, \"*p =\", p[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 100 m = 100 *p = 100\n", + "n = 100 m = 100 *p = 200\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-newmax.cpp, Page no-50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(a, b):\n", + " if(a>b):\n", + " return a\n", + " else:\n", + " return b\n", + "x, y=[int(x) for x in raw_input(\"Enter two integers: \").split()] #takes input in a single line separated by white space\n", + "print \"Maximum =\", Max(x,y)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers: 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum = 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap.cpp, Page no-53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap (x, y): #pass by reference\n", + " i=x\n", + " x=y\n", + " y=i\n", + " return x, y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "(a,b)=swap(a, b)\n", + "print \"On swapping :\", a, b " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 2 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 3 2\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-square.cpp, Page no-54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def square(x):\n", + " x=x*x\n", + " return x\n", + "num=float(raw_input('Enter a number : '))\n", + "print 'Its square =', square(num)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number : 5.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Its square = 30.25\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-show.c, Page no-56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show_integer(val):\n", + " print \"Integer: \", val\n", + "def show_double(val):\n", + " print \"Double: \", val\n", + "def show_string(val):\n", + " print \"String: \", val\n", + "show_integer(420)\n", + "show_double(3.1415)\n", + "show_string(\"Hello World\\n!\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer: 420\n", + "Double: 3.1415\n", + "String: Hello World\n", + "!\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-Show.cpp, Page no-56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show(val): #function overloading\n", + " if (isinstance(val, int)):\n", + " print \"Integer: \", val\n", + " if (isinstance(val, float)):\n", + " print \"Double: \", val\n", + " if(isinstance(val, str)):\n", + " print \"String: \", val\n", + "show(420)\n", + "show(3.1415)\n", + "show(\"Hello World\\n!\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer: 420\n", + "Double: 3.1415\n", + "String: Hello World\n", + "!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-prnstr.cpp, Page no-58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def showstring(string=\"Hello World!\"): #default arguments\n", + " print string\n", + "showstring(\"Here is an explicit argument\")\n", + "showstring()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Here is an explicit argument\n", + "Hello World!\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-defarg1.cpp, Page no-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PrintLine(ch='-', RepeatCount=70): #default arguments\n", + " print \"\\n\"\n", + " for i in range(RepeatCount):\n", + " sys.stdout.write(ch)\n", + "PrintLine()\n", + "PrintLine('!')\n", + "PrintLine('*', 40)\n", + "PrintLine('R', 55)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "----------------------------------------------------------------------\n", + "\n", + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", + "\n", + "****************************************\n", + "\n", + "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-defarg2, Page no-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PrintLine(ch='-', RepeatCount=70, nLines=1): #default arguments\n", + " for j in range(nLines):\n", + " print \"\\n\"\n", + " for i in range(RepeatCount):\n", + " sys.stdout.write(ch)\n", + "PrintLine()\n", + "PrintLine('!')\n", + "PrintLine('*', 40)\n", + "PrintLine('R', 55)\n", + "PrintLine('&', 25, 2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "----------------------------------------------------------------------\n", + "\n", + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", + "\n", + "****************************************\n", + "\n", + "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", + "\n", + "&&&&&&&&&&&&&&&&&&&&&&&&&\n", + "\n", + "&&&&&&&&&&&&&&&&&&&&&&&&&" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-date1.cpp, Page no-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from collections import namedtuple\n", + "struct_date = namedtuple('struct_date', 'day month year')\n", + "d1 = struct_date(26, 3, 1958)\n", + "d2 = struct_date(14, 4, 1971)\n", + "d3 = struct_date(1, 9, 1973)\n", + "print \"Birth Date of the First Author:\", \n", + "print \"%s-%s-%s\" %(d1.day, d1.month, d1.year)\n", + "print \"Birth Date of the Second Author:\", \n", + "print \"%s-%s-%s\" %(d2.day, d2.month, d2.year)\n", + "print \"Birth Date of the Third Author:\",\n", + "print \"%s-%s-%s\" %(d3.day, d3.month, d3.year)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth Date of the First Author: 26-3-1958\n", + "Birth Date of the Second Author: 14-4-1971\n", + "Birth Date of the Third Author: 1-9-1973\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-date2.cpp, Page no-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int\n", + "class date(Structure):\n", + " _fields_=[(\"day\", c_int),(\"month\", c_int),(\"year\",c_int)]\n", + " def show(self):\n", + " print \"%s-%s-%s\" %(self.day, self.month, self.year)\n", + "d1=date(26, 3, 1958)\n", + "d2 = date(14, 4, 1971)\n", + "d3 = date(1, 9, 1973)\n", + "print \"Birth Date of the First Author:\", \n", + "d1.show()\n", + "print \"Birth Date of the Second Author:\", \n", + "d2.show()\n", + "print \"Birth Date of the Third Author:\",\n", + "d3.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth Date of the First Author: 26-3-1958\n", + "Birth Date of the Second Author: 14-4-1971\n", + "Birth Date of the Third Author: 1-9-1973\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-cast.cpp, Page no-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=int\n", + "b=420.5\n", + "print \"int(10.4) =\", int(10.4)\n", + "print \"int(10.99) =\", int(10.99)\n", + "print \"b =\", b\n", + "a=int(b)\n", + "print \"a = int(b) =\", a\n", + "b=float(a)+1.5\n", + "print \"b = float(a)+1.5 =\", b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "int(10.4) = 10\n", + "int(10.99) = 10\n", + "b = 420.5\n", + "a = int(b) = 420\n", + "b = float(a)+1.5 = 421.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-mswap.cpp, Page no-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=raw_input(\"Enter two Characters : \").split()\n", + "ch1, ch2=swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter integers : \").split()]\n", + "a, b=swap(a, b)\n", + "print \"On swapping :\", a, b\n", + "c, d=[float(x) for x in raw_input(\"Enter floats : \").split()]\n", + "c, d=swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two Characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter integers : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-gswap.cpp, Page no-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=raw_input(\"Enter two Characters : \").split()\n", + "ch1, ch2=swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter integers : \").split()]\n", + "a, b=swap(a, b)\n", + "print \"On swapping :\", a, b\n", + "c, d=[float(x) for x in raw_input(\"Enter floats : \").split()]\n", + "c, d=swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two Characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter integers : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector.cpp, Page no-72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def AddVectors(a, b, c, size):\n", + " for i in range(size):\n", + " c[i]=a[i]+b[i]\n", + "def ReadVector(vector, size):\n", + " for i in range(size):\n", + " vector[i]=int(raw_input())\n", + "def ShowVector(vector, size):\n", + " for i in range(size):\n", + " print vector[i],\n", + "vec_size=int(raw_input(\"Enter size of vector: \"))\n", + "x=[int]*vec_size\n", + "y=[int]*vec_size\n", + "z=[int]*vec_size\n", + "print \"Enter Elements of vector x: \"\n", + "ReadVector(x, vec_size)\n", + "print \"Enter Elements of vector y: \"\n", + "ReadVector(y, vec_size)\n", + "AddVectors(x, y, z, vec_size)\n", + "print \"Summation Vector z=a+b:\",\n", + "ShowVector(z, vec_size)\n", + "del x\n", + "del y\n", + "del z" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter size of vector: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Elements of vector x: \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" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Elements of vector y: \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": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Summation Vector z=a+b: 3 5 4 4 9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def area(s1, s2=None):#function overloading and default parameters\n", + " if (isinstance(s1, int)):\n", + " if(isinstance(s2, int)):\n", + " return (s1*s2)\n", + " else:\n", + " return (s1*s1)\n", + " elif (isinstance(s1, float)):\n", + " return (3.14*s1*s1)\n", + "s=int(raw_input(\"Enter the side length of the square: \"))\n", + "l, b=[int(x) for x in raw_input(\"Enter the length and breadth of the rectangle: \").split()]\n", + "r=float(raw_input(\"Enter the radius of the circle: \"))\n", + "print \"Area of square = \", area(s)\n", + "print \"Area of rectangle = \", area(l, b)\n", + "print \"Area of circle = \", area(r)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the side length of the square: 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the length and breadth of the rectangle: 2 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the radius of the circle: 2.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Area of square = 4\n", + "Area of rectangle = 8\n", + "Area of circle = 19.625\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter3-C++AtAGlance_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter3-C++AtAGlance_1.ipynb new file mode 100755 index 00000000..d81ed22a --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter3-C++AtAGlance_1.ipynb @@ -0,0 +1,629 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d0ea461766152305a5e3562b0029be55e226b9445d5b8707016af6bf55ff7b00" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3- C++ at a Glance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example- counter1.cpp, Page no-77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Counter:\n", + " __value=int\n", + " def __init__(self, val=None):#constructor\n", + " if(isinstance(val, int)):\n", + " self.__value=val\n", + " else:\n", + " self.__value=0\n", + " def __del__(self):#destructor\n", + " print \"object destroyed\"\n", + " def GetCounter(self):\n", + " return self.__value\n", + " def up(self):\n", + " self.__value=self.__value+1\n", + "counter1=Counter()\n", + "counter2=Counter(1)\n", + "print \"counter1 = \", counter1.GetCounter()\n", + "print \"counter2 = \", counter2.GetCounter()\n", + "counter1.up()\n", + "counter2.up()\n", + "print \"counter1 = \", counter1.GetCounter()\n", + "print \"counter2 = \", counter2.GetCounter()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "object destroyed\n", + "object destroyed\n", + "counter1 = 0\n", + "counter2 = 1\n", + "counter1 = 1\n", + "counter2 = 2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-Stdclass.cpp, Page no-80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def setdata(self, roll_no_in, name_in): #outside declaration of member functions\n", + " self._student__roll_no=roll_no_in\n", + " self._student__name=name_in\n", + "def outdata(self):#outside declaration of member functions\n", + " print \"Roll no = \", self._student__roll_no\n", + " print \"Name = \", self._student__name\n", + "class student:\n", + " __roll_no=int\n", + " __name=[None]*20\n", + " setdata=setdata\n", + " outdata=outdata\n", + "s1=student()\n", + "s2=student()\n", + "s1.setdata(1, \"Tejaswi\")\n", + "s2.setdata(10, \"Rajkumar\")\n", + "print \"Student details...\"\n", + "s1.outdata()\n", + "s2.outdata()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student details...\n", + "Roll no = 1\n", + "Name = Tejaswi\n", + "Roll no = 10\n", + "Name = Rajkumar\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-Counter2.cpp, Page no-82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class counter:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetCounter(self):\n", + " return self.__value\n", + " def up(self):\n", + " self.__value+=1\n", + "class NewCounter(counter): #inheritance\n", + " def __init__(self, val=None) : \n", + " if(isinstance(val, int)):\n", + " counter.__init__(self, val)\n", + " else:\n", + " counter.__init__(self)\n", + " def down(self):\n", + " self._counter__value=self._counter__value-1\n", + "counter1=NewCounter()\n", + "counter2=NewCounter(1)\n", + "print \"counter1 initially =\", counter1.GetCounter()\n", + "print \"counter2 initially =\", counter2.GetCounter()\n", + "counter1.up()\n", + "counter2.up()\n", + "print \"counter1 on increment =\", counter1.GetCounter()\n", + "print \"counter2 on increment =\", counter2.GetCounter()\n", + "counter1.down()\n", + "counter2.down()\n", + "print \"counter1 on decrement =\", counter1.GetCounter()\n", + "print \"counter2 on decrement =\", counter2.GetCounter()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "counter1 initially = 0\n", + "counter2 initially = 1\n", + "counter1 on increment = 1\n", + "counter2 on increment = 2\n", + "counter1 on decrement = 0\n", + "counter2 on decrement = 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-counter3.cpp, Page no-85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class counter:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetCounter(self):\n", + " return self.__value\n", + " #overloading increment operator\n", + " def __iadd__(self, val):\n", + " self.__value+=val\n", + " return self\n", + " #overloading decrement operator\n", + " def __isub__(self, val):\n", + " self._counter__value-=val\n", + " return self\n", + "counter1=counter()\n", + "counter2=counter(1)\n", + "print \"counter1 initially =\", counter1.GetCounter()\n", + "print \"counter2 initially =\", counter2.GetCounter()\n", + "counter1+=1\n", + "counter2+=1\n", + "print \"counter1 on increment =\", counter1.GetCounter()\n", + "print \"counter2 on increment =\", counter2.GetCounter()\n", + "counter1-=1\n", + "counter2-=1\n", + "print \"counter1 on decrement =\", counter1.GetCounter()\n", + "print \"counter2 on decrement =\", counter2.GetCounter()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "counter1 initially = 0\n", + "counter2 initially = 1\n", + "counter1 on increment = 1\n", + "counter2 on increment = 2\n", + "counter1 on decrement = 0\n", + "counter2 on decrement = 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-counter4.cpp, Page no-88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class counter:\n", + " __value=int\n", + " def __init__(self, val=0):\n", + " self.__value=val\n", + " def GetCounter(self):\n", + " return self.__value\n", + " def __iadd__(self, val):\n", + " self.__value+=val\n", + " return self\n", + " def __isub__(self, val):\n", + " self._counter__value-=val\n", + " return self\n", + " #overloading of + operator\n", + " def __add__(self, counter2):\n", + " temp=counter()\n", + " temp.__value=self.__value+counter2.__value\n", + " return temp\n", + " #No overloading of << and >> operators in python\n", + " def output(self):\n", + " return self.__value\n", + "counter1=counter()\n", + "counter2=counter(1)\n", + "print \"counter1 initially =\", counter1.GetCounter()\n", + "print \"counter2 initially =\", counter2.GetCounter()\n", + "counter1+=1\n", + "counter2+=1\n", + "print \"counter1 on increment =\", counter1.GetCounter()\n", + "print \"counter2 on increment =\", counter2.GetCounter()\n", + "counter1-=1\n", + "counter2-=1\n", + "print \"counter1 on decrement =\", counter1.GetCounter()\n", + "print \"counter2 on decrement =\", counter2.GetCounter()\n", + "counter3=counter()\n", + "counter3=counter1+counter2\n", + "print \"counter3 = counter1+counter2 =\", counter3.output()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "counter1 initially = 0\n", + "counter2 initially = 1\n", + "counter1 on increment = 1\n", + "counter2 on increment = 2\n", + "counter1 on decrement = 0\n", + "counter2 on decrement = 1\n", + "counter3 = counter1+counter2 = 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-virtual.cpp, Page no-91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class Father:\n", + " __f_age=int\n", + " def __init__(self, n):\n", + " self.__f_age=n\n", + " def GetAge(self):\n", + " return self.__f_age\n", + "class Son(Father):\n", + " __s_age=int\n", + " def __init__(self, n, m):\n", + " Father.__init__(self, n)\n", + " self.__s_age=m\n", + " def GetAge(self):\n", + " return self.__s_age\n", + "basep=[Father]\n", + "basep=Father(45)\n", + "print \"Father's Age:\",\n", + "print basep.GetAge()\n", + "del basep\n", + "basep=[Son(45, 20)]\n", + "print \"Son's Age:\",\n", + "print basep[0].GetAge()\n", + "del basep" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Father's Age: 45\n", + "Son's Age: 20\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-vector.cpp, Page no-94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class vector:\n", + " __size=int\n", + " def __init__(self, vector_size):\n", + " self.__size=vector_size\n", + " self.__v=[vector]*self.__size\n", + " def __del__(self):\n", + " del self.__v\n", + " def elem(self, i, x=None):\n", + " if isinstance(x, int) or isinstance(x, float):\n", + " if i>=self.__size:\n", + " print \"Error: Out of Range\"\n", + " return\n", + " self.__v[i]=x\n", + " else:\n", + " return self.__v[i]\n", + " def show(self):\n", + " for i in range(self.__size):\n", + " print self.elem(i), \",\",\n", + "int_vect=vector(5)\n", + "float_vect=vector(4)\n", + "for i in range(5):\n", + " int_vect.elem(i, i+1)\n", + "for i in range(4):\n", + " float_vect.elem(i,i+1.5)\n", + "print \"Integer Vector:\",\n", + "int_vect.show()\n", + "print \"\\nFloating Vector:\",\n", + "float_vect.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer Vector: 1 , 2 , 3 , 4 , 5 , \n", + "Floating Vector: 1.5 , 2.5 , 3.5 , 4.5 ,\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-number.cpp, Page no-97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "class number:\n", + " __num=int\n", + " def read(self):\n", + " self.__num=int(raw_input())\n", + " class DIVIDE():\n", + " pass\n", + " def div(self, num2):\n", + " if num2.__num==0:\n", + " raise self.DIVIDE() #raise exception of type DIVIDE()\n", + " else:\n", + " return self.__num/num2.__num\n", + "num1=number()\n", + "num2=number()\n", + "print \"Enter Number 1: \",\n", + "num1.read()\n", + "print \"Enter Number 2: \",\n", + "num2.read()\n", + "try:\n", + " print \"trying division operation...\",\n", + " result=num1.div(num2)\n", + " print \"succeeded\"\n", + "except number.DIVIDE: #exception handler of exception type DIVIDE()\n", + " print \"failed\"\n", + " print \"Exception: Divide-By-Zero\"\n", + "else: #this block is executed only if no exception has been raised\n", + " print \"num1/num2 =\", result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter Number 1: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Number 2: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " trying division operation... failed\n", + "Exception: Divide-By-Zero\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-infile.cpp, Page no-101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "try:\n", + " infile=open(\"sample.in\", \"r\") #open file in input mode\n", + " while(1):\n", + " buff=infile.readline() #read a single line from the file\n", + " if buff=='': #to determine end of file\n", + " break\n", + " print buff,\n", + "except IOError: #error in opening file\n", + " print \"Error: sample.in non-existent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rajkumar, C-DAC, India\n", + "Bjarne Stroustrup, AT & T, USA\n", + "Smrithi, Hyderabad, India\n", + "Tejaswi, Hyderabad, India\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-outfile.cpp, Page no-102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "outfile=open(\"sample.out\", \"w\") #file opened in output mode\n", + "if not(outfile):\n", + " print \"Error: sample.out unable to open\"\n", + "else:\n", + " while(1):\n", + " buff=raw_input()\n", + " if buff==\"end\":\n", + " break\n", + " outfile.write(buff)\n", + " outfile.close()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "OOP is good\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is OOP\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "C++ is good\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "end\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example, Page no-103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "count=0\n", + "file1=open(\"FILE1.txt\", \"r\") #file opened in input mode\n", + "file2=open(\"FILE2.txt\", \"w\") #file opened in output mode\n", + "while(1):\n", + " ch=file1.read(1)\n", + " if ch=='': #detecting eof\n", + " break\n", + " if count%2==0:\n", + " file2.write(ch)\n", + " count+=1\n", + "print \"Alternate characters from File1 have been successfully copied into File2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alternate characters from File1 have been successfully copied into File2\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter4-DataTypes,OperatorsAndExpressions_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter4-DataTypes,OperatorsAndExpressions_1.ipynb new file mode 100755 index 00000000..93c9b655 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter4-DataTypes,OperatorsAndExpressions_1.ipynb @@ -0,0 +1,881 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:63e795ffbce627302c76300f958b5cdb253e4cb2bacdd4c0ef63693b73e9f98e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4- Data types, Operators and Expressions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-show1.cpp, Page no-111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=int\n", + "b=int\n", + "c=100\n", + "distance=float\n", + "a=c\n", + "b=c+100\n", + "distance=55.9\n", + "print \"a =\", a\n", + "print \"b =\", b\n", + "print \"c =\", c\n", + "print \"distance =\", distance" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 100\n", + "b = 200\n", + "c = 100\n", + "distance = 55.9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ascii.cpp, Page no-112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "code=int(raw_input(\"Enter an ASCII code(0-127): \"))\n", + "symbol=code\n", + "print \"The symbol corresponding to %d is %c\" %(code, symbol)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an ASCII code(0-127): 65\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The symbol corresponding to 65 is A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-temper.cpp, Page no-115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "c=float(raw_input(\"Enter temperature in Celsius: \"))\n", + "f=1.8*c+32\n", + "print \"Equivalent fahrenheit = \", f\n", + "f=float(raw_input(\"Enter temperature in fahrenheit: \"))\n", + "c=(f-32)/1.8\n", + "print \"Equivalent Celsius = \", c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter temperature in Celsius: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent fahrenheit = 41.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter temperature in fahrenheit: 40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent Celsius = 4.44444444444\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-size.cpp, Page no-116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_char, c_short, c_int, c_long, c_float, c_double, c_longdouble, sizeof\n", + "print \"sizeof( char ) =\", sizeof(c_char)\n", + "print \"sizeof( short ) =\", sizeof(c_short)\n", + "print \"sizeof( short int ) =\", sizeof(c_short)\n", + "print \"sizeof( int ) =\", sizeof(c_int)\n", + "print \"sizeof( long ) =\", sizeof(c_long)\n", + "print \"sizeof( long int ) =\", sizeof(c_long)\n", + "print \"sizeof( float ) =\", sizeof(c_float)\n", + "print \"sizeof( double ) =\", sizeof(c_double)\n", + "print \"sizeof( long double ) =\", sizeof(c_longdouble)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sizeof( char ) = 1\n", + "sizeof( short ) = 2\n", + "sizeof( short int ) = 2\n", + "sizeof( int ) = 4\n", + "sizeof( long ) = 4\n", + "sizeof( long int ) = 4\n", + "sizeof( float ) = 4\n", + "sizeof( double ) = 8\n", + "sizeof( long double ) = 8\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-modules.cpp, Page no-120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "numerator=int(raw_input(\"Enter numerator: \"))\n", + "denominator=int(raw_input(\"Enter denominator: \"))\n", + "result=numerator/denominator\n", + "remainder=numerator%denominator\n", + "print numerator, \"/\", denominator, \"=\", result\n", + "print numerator, \"%\", denominator, \"=\", remainder" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter numerator: 12\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter denominator: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "12 / 5 = 2\n", + "12 % 5 = 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-notemp.cpp, Page no-121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()] #taking input in single line sperated by white space\n", + "a=a+b\n", + "b=a-b\n", + "a=a-b\n", + "print \"Value of a and b on swapping in main():\", a, b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of a and b on swapping in main(): 20 10\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-relation.cpp, Page no-122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "my_age=int(raw_input(\"Enter my age: \"))\n", + "your_age=int(raw_input(\"Enter your age: \"))\n", + "if(my_age==your_age):\n", + " print \"We are born in the same year.\"\n", + "else:\n", + " print \"We are born in different years\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter my age: 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We are born in the same year.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-char1.cpp, Page no-123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_byte\n", + "c=c_byte(255) #signed char\n", + "d=c_byte(-1) #signed char\n", + "if c.value<0:\n", + " print 'c is less than 0'\n", + "else:\n", + " print 'c is not less than 0'\n", + "if d.value<0:\n", + " print 'd is less than 0'\n", + "else:\n", + " print 'd is not less than 0'\n", + "if c.value==d.value:\n", + " print 'c and d are equal'\n", + "else:\n", + " print 'c and d are not equal'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c is less than 0\n", + "d is less than 0\n", + "c and d are equal\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-char2.cpp, Page no-124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_ubyte, c_byte\n", + "c=c_ubyte(255) #unsigned char\n", + "d=c_byte(-1) #signed char\n", + "if c.value<0:\n", + " print 'c is less than 0'\n", + "else:\n", + " print 'c is not less than 0'\n", + "if d.value<0:\n", + " print 'd is less than 0'\n", + "else:\n", + " print 'd is not less than 0'\n", + "if c.value==d.value:\n", + " print 'c and d are equal'\n", + "else:\n", + " print 'c and d are not equal'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c is not less than 0\n", + "d is less than 0\n", + "c and d are not equal\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-leap.cpp, Page no-126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "year=int(raw_input(\"Enter any year: \"))\n", + "if( (year%4==0 and year%100!=0) or (year%400==0)):\n", + " print year, \"is a leap year\"\n", + "else:\n", + " print year, \"is not a leap year\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any year: 1996\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1996 is a leap year\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-large.cpp, Page no-127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_uint\n", + "u=c_uint(0) #unsigned integer\n", + "print 'Value before conversion:', u.value\n", + "u.value=~int(u.value) # 1's complement\n", + "print 'Value after conversion:', u.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value before conversion: 0\n", + "Value after conversion: 4294967295\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-extract.cpp, Page no-130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=int(raw_input(\"Enter an integer: \"))\n", + "n=int(raw_input(\"Enter bit position to extract: \"))\n", + "bit=(a>>(n-1))&1 #shift operator\n", + "print \"The bit is \", bit" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter an integer: 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter bit position to extract: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bit is 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-max.cpp, Page no-133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a, b=[int(x) for x in raw_input(\"Enter two integers: \").split()]\n", + "larger=a if a>b else b #?: operator\n", + "print \"The larger of the two is\", larger" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers: 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The larger of the two is 20\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-oddeven.cpp, Page no-133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num=int(raw_input(\"Enter the number: \"))\n", + "print \"The number\", num,\"is\",\n", + "print \"Even\" if num%2==0 else \"Odd\" #?: operator\n", + "num=int(raw_input(\"Enter the number: \"))\n", + "print \"The number\", num,\"is\",\n", + "print \"Even\" if num%2==0 else \"Odd\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number 10 is Even\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number 25 is Odd\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-coerce.cpp, Page no-136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f=float\n", + "i=12\n", + "j=5\n", + "print \"when i = \", i, \"j = \", j\n", + "f=i/j\n", + "print \"i/j = \", f\n", + "f=float(i)/float(j)\n", + "print \"(float)i/j = \", f\n", + "f=float(i)/j\n", + "print \"float(i)/j = \", f\n", + "f=i/float(j)\n", + "print \"i/float(j) = \", f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "when i = 12 j = 5\n", + "i/j = 2\n", + "(float)i/j = 2.4\n", + "float(i)/j = 2.4\n", + "i/float(j) = 2.4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-city.cpp, Page no-141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "CITY='Bidar'\n", + "def which_city():\n", + " print 'City in Function:',\n", + " print CITY\n", + "print 'Earlier City:',\n", + "print CITY\n", + "CITY='Bangalore'\n", + "print 'New City:',\n", + "print CITY\n", + "which_city()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Earlier City: Bidar\n", + "New City: Bangalore\n", + "City in Function: Bangalore\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-color1.cpp, Page no-143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def PrintColor(c):\n", + " (red, blue, green)=(0, 1, 2) #enum\n", + " type =['red', 'green', 'blue']\n", + " if c==red:\n", + " color='red'\n", + " elif c==blue:\n", + " color='blue'\n", + " else:\n", + " color ='green'\n", + " print 'Your color choice as per color2.cpp module:', color\n", + "(red, green, blue)=(0, 1, 2) #enum\n", + "type =['red', 'green', 'blue']\n", + "print 'Your color choice in color1.cpp module: green'\n", + "PrintColor(green)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your color choice in color1.cpp module: green\n", + "Your color choice as per color2.cpp module: blue\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-maxmacro.cpp, Page no-146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(a, b):\n", + " return a if a>b else b\n", + "print 'max(2, 3) =', Max(2, 3)\n", + "print 'max(10.2, 4.5) =', Max(10.2, 4.5)\n", + "i=5\n", + "j=10\n", + "print 'i =',i\n", + "print 'j =', j\n", + "print 'On execution of k=max(++i, ++j);...'\n", + "i+=1\n", + "j+=1\n", + "k=Max(i+1, j+1)\n", + "print 'i =', i\n", + "print 'j =', j #the operand is j+1 and not ++j and thus the change is not reflected back in j. \n", + "print 'k =', k #operand of type j+=1 is not allowed" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max(2, 3) = 3\n", + "max(10.2, 4.5) = 10.2\n", + "i = 5\n", + "j = 10\n", + "On execution of k=max(++i, ++j);...\n", + "i = 6\n", + "j = 11\n", + "k = 12\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-exp.cpp, Page no-148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=30\n", + "b=20\n", + "c=11\n", + "result=a+b/(c-1)+a%b #--c is replaced by (c-1)\n", + "print 'a+b/--c+a%b =', result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a+b/--c+a%b = 42\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "num1=int(raw_input(\"Enter the first number: \"))\n", + "num2=int(raw_input(\"Enter the second number: \"))\n", + "print num1, '+', num2, '=',num1+num2\n", + "print num1, '-', num2, '=',num1-num2\n", + "print num1, '*', num2, '=',num1*num2\n", + "print num1, '/', num2, '=',num1/num2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the first number: 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the second number: 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "20 + 10 = 30\n", + "20 - 10 = 10\n", + "20 * 10 = 200\n", + "20 / 10 = 2\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter5-ControlFlow_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter5-ControlFlow_1.ipynb new file mode 100755 index 00000000..9efd46c9 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter5-ControlFlow_1.ipynb @@ -0,0 +1,1280 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6fa2540f90d9347d87cbc226c605764f3108594e5706b257d5d061ae951444a3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5- Control Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age1.cpp, Page no-153" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=int(raw_input(\"Enter your age: \"))\n", + "if(age>12 and age<20):\n", + " print \"you are a teen-aged person. good!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: 15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you are a teen-aged person. good!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age2.cpp, Page no-154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=int(raw_input(\"Enter your age: \"))\n", + "if(age<0):\n", + " print \"I am sorry!\"\n", + " print \"age can never be negative\"\n", + "if(age>12 and age<20):\n", + " print \"you are a teen-aged person. good!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: -10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I am sorry!\n", + "age can never be negative\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-large.cpp, Page no-155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "big=float\n", + "a, b, c=[float(x) for x in raw_input(\"Enter three floating-point numbers: \").split()] #taking input in single line separated by white space\n", + "big=a\n", + "if(b>big):\n", + " big=b\n", + "if(c>big):\n", + " big=c\n", + "print \"Largest of the three numbers =\", big" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter three floating-point numbers: 10.2 15.6 12.8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Largest of the three numbers = 15.6\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age3.cpp, Page no-156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=int(raw_input(\"Enter your age: \"))\n", + "if(age>12 and age<20):\n", + " print \"you are a teen-aged person. good!\"\n", + "else:\n", + " print \"you are not a teen-aged person.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: 15\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you are a teen-aged person. good!\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-lived.cpp, Page no-157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "years=float(raw_input(\"Enter your age in years: \"))\n", + "if(years<0):\n", + " print \"I am sorry! age can never be negative\"\n", + "else:\n", + " secs=years*365*24*60*60\n", + " print \"You have lived for %.4g seconds\" %(secs)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age in years: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "You have lived for 7.884e+08 seconds\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age4.cpp, Page no-158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=int(raw_input(\"Enter your age: \"))\n", + "if(age>12 and age<20):\n", + " print \"you are a teen-aged person. good!\"\n", + "else:\n", + " if(age<13):\n", + " print \"you will surely reach teen-age.\"\n", + " else:\n", + " print \"you have crossed teen-age!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you have crossed teen-age!\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-count1.cpp, Page no-159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=int(raw_input(\"How many integers to be displayed: \"))\n", + "for i in range(n):\n", + " print i" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many integers to be displayed: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sumsq1.cpp, Page no-160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Sum=0\n", + "sum_of_squares=0\n", + "for i in range(2, 31, 2):\n", + " Sum+=i\n", + " sum_of_squares+=i*i\n", + "print \"Sum of first 15 positive even numbers =\", Sum\n", + "print \"Sum of their squares =\", sum_of_squares" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 15 positive even numbers = 240\n", + "Sum of their squares = 4960\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sumsq2.cpp, Page no-161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Sum=0\n", + "sum_of_squares=0\n", + "for i in range(30, 0, -2):\n", + " Sum+=i\n", + " sum_of_squares+=i*i\n", + "print \"Sum of first 15 positive even numbers =\", Sum\n", + "print \"Sum of their squares =\", sum_of_squares" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of first 15 positive even numbers = 240\n", + "Sum of their squares = 4960\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-noinit.cpp, Page no-162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "i=1\n", + "for i in range(i, 11):\n", + " print i*5," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5 10 15 20 25 30 35 40 45 50\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-pyramid.cpp, Page no-163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=int(raw_input(\"Enter the number of lines: \"))\n", + "for p in range(1, n+1):\n", + " for q in range(1, n-p+1):\n", + " print \"\\t\",\n", + " m=p\n", + " for q in range (1, p+1):\n", + " print \"\\t\", m,\n", + " m+=1\n", + " m=m-2\n", + " for q in range(1, p):\n", + " print \"\\t\", m,\n", + " m-=1\n", + " print ''" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number of lines: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\t\t\t\t\t1 \n", + "\t\t\t\t2 \t3 \t2 \n", + "\t\t\t3 \t4 \t5 \t4 \t3 \n", + "\t\t4 \t5 \t6 \t7 \t6 \t5 \t4 \n", + "\t5 \t6 \t7 \t8 \t9 \t8 \t7 \t6 \t5 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-count2.cpp, Page no-164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=int(raw_input(\"How many integers to be displayed: \"))\n", + "i=0\n", + "while i=n:\n", + " break" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many integers to be displayed: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0\n", + "1\n", + "2\n", + "3\n", + "4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-dowhile.cpp, Page no-167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "while 1: #do-while loop\n", + " inchar=raw_input(\"Enter your sex (m/f): \")\n", + " if(inchar=='m' or inchar=='f'):\n", + " break\n", + "if inchar=='m':\n", + " print \"so you are male. good!\"\n", + "else:\n", + " print \"so you are female. good!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your sex (m/f): d\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your sex (m/f): b\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your sex (m/f): m\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "so you are male. good!\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-pa1.cpp, Page no-167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "rev=0\n", + "num=int(raw_input(\"Enter the number: \"))\n", + "n=num\n", + "while 1:\n", + " digit=num%10\n", + " rev=rev*10 + digit\n", + " num/=10\n", + " if num==0:\n", + " break\n", + "print \"Reverse of the number =\", rev\n", + "if n==rev:\n", + " print \"The number is a palindrome\"\n", + "else:\n", + " print \"The number is not a palindrome\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number: 121\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse of the number = 121\n", + "The number is a palindrome\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-average2.cpp, Page no-169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Sum=0\n", + "count=0\n", + "print \"Enter the marks, -1 at the end...\"\n", + "while 1:\n", + " marks=int(raw_input())\n", + " if marks==-1:\n", + " break\n", + " Sum+=marks\n", + " count+=1\n", + "average=Sum/count\n", + "print \"The average is\", average " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the marks, -1 at the end...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "80\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "75\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "82\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "74\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "-1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average is 77\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sex2.cpp, Page no-171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ch=raw_input(\"Enter your sex (m/f): \")\n", + "if ch=='m':\n", + " print \"So you are male. good!\"\n", + "elif ch=='f':\n", + " print \"So you are female. good!\"\n", + "else:\n", + " print \"Error: Invalid sex code!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your sex (m/f): m\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "So you are male. good!\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-calc.cpp, Page no-172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print \"------------------Basic Calculator------------------\"\n", + "print \"Choose an option:\"\n", + "print \"Add\"\n", + "print \"Subtract\"\n", + "print \"Multiply\"\n", + "print \"Divide\"\n", + "ch=raw_input()\n", + "num1, num2=[int(x) for x in raw_input(\"Enter the value of the operands: \").split()]\n", + "if ch=='1':\n", + " print num1+num2\n", + "elif ch=='2':\n", + " print num1-num2\n", + "elif ch=='3':\n", + " print num1*num2\n", + "elif ch=='4':\n", + " print num1/num2\n", + "else:\n", + " print \"Incorrect choice: \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "------------------Basic Calculator------------------\n", + "Choose an option:\n", + "Add\n", + "Subtract\n", + "Multiply\n", + "Divide\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of the operands: 22 33\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "55\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sumpos.cpp, Page no-174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "total=0\n", + "while 1:\n", + " num=int(raw_input(\"Enter a number (0 to quit): \"))\n", + " if num==0:\n", + " print \"end of data entry.\"\n", + " break\n", + " if num<0:\n", + " print \"skipping this number.\"\n", + " continue\n", + " total+=num\n", + "print \"Total of all +ve numbers is \", total" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): -5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "skipping this number.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "end of data entry.\n", + "Total of all +ve numbers is 40\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-jump.cpp, Page no-175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "total=0\n", + "while 1:\n", + " num=int(raw_input(\"Enter a number (0 to quit): \"))\n", + " if num==0:\n", + " print \"end of data entry.\"\n", + " print \"Total of all +ve numbers is\", total #no goto in python\n", + " break\n", + " if num<0:\n", + " print \"skipping this number.\"\n", + " continue\n", + " total+=num" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 20\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): -5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "skipping this number.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number (0 to quit): 0\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "end of data entry.\n", + "Total of all +ve numbers is 40\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age5.cpp, Page no-177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=int(raw_input(\"Enter your age: \"))\n", + "if(age>12 and age<20):\n", + " pass\n", + "print \"you are a teen-aged person. good!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your age: 50\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "you are a teen-aged person. good!\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-agecmp.cpp, Page no-177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "myage=25\n", + "print \"Hi! my age is \", myage\n", + "yourage=int(raw_input(\"What is your age? \"))\n", + "if myage==yourage:\n", + " print \"We are born on the same day. Are we twins!\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hi! my age is 25\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "What is your age? 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We are born on the same day. Are we twins!\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "l1=int(raw_input(\"Enter the lower limit: \"))\n", + "l2=int(raw_input(\"Enter the higher limit: \"))\n", + "print \"The prime numbers between\", l1, \"and\", l2, \"are: \",\n", + "for i in range(l1, l2+1):\n", + " if i<=3:\n", + " print i,\"\\t\",\n", + " else:\n", + " for j in range(2, i/2+1):\n", + " if(i%j==0):\n", + " break\n", + " if(i%j==0):\n", + " continue #no goto\n", + " print i, \"\\t\"," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the lower limit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the higher limit: 100\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The prime numbers between 1 and 100 are: 1 \t2 \t3 \t5 \t7 \t11 \t13 \t17 \t19 \t23 \t29 \t31 \t37 \t41 \t43 \t47 \t53 \t59 \t61 \t67 \t71 \t73 \t79 \t83 \t89 \t97 \t" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter6-ArraysAndStrings_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter6-ArraysAndStrings_1.ipynb new file mode 100755 index 00000000..ce7a4137 --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter6-ArraysAndStrings_1.ipynb @@ -0,0 +1,1593 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e2ad0aaf08f1bea2c2348d5e8774482c34bf3c3072d4908db5fdcd5d935d1eed" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6- Arrays and Strings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age1.cpp, Page no-182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Sum=0.0\n", + "age1=int(raw_input(\"Enter person 1 age: \"))\n", + "Sum+=age1\n", + "age2=int(raw_input(\"Enter person 2 age: \"))\n", + "Sum+=age2\n", + "age3=int(raw_input(\"Enter person 3 age: \"))\n", + "Sum+=age3\n", + "age4=int(raw_input(\"Enter person 4 age: \"))\n", + "Sum+=age4\n", + "age5=int(raw_input(\"Enter person 5 age: \"))\n", + "Sum+=age5\n", + "print \"Average age = %g\" %(Sum/5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 1 age: 23\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 2 age: 40\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 3 age: 30\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 4 age: 27\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 5 age: 25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average age = 29\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-age2.cpp, Page no-182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=[int]*5 #integer array of size 5\n", + "Sum=0.0\n", + "for i in range(5):\n", + " print \"Enter person\", i+1, \"age: \",\n", + " age[i]=int(raw_input())\n", + "for i in range(5):\n", + " Sum+=age[i]\n", + "print \"Average age = %g\" %(Sum/5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 1 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 2 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "40\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 3 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "30\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 4 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "27\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 5 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Average age = 29\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-nodup.c, Page no-184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "flag=0\n", + "a=[float]*50\n", + "n=int(raw_input(\"Enter the size of a vector: \"))\n", + "num=n\n", + "print \"Enter the vector elements...\"\n", + "for i in range(n):\n", + " print \"a[\", i, \"] = ? \",\n", + " a[i]=int(raw_input())\n", + "for i in range(n-1):\n", + " for j in range(i+1, n):\n", + " if a[i]==a[j]:\n", + " n=n-1\n", + " for k in range(j, n):\n", + " a[k]=a[k+1]\n", + " flag=1\n", + " j=j-1\n", + "if flag:\n", + " print \"vector has \", num-n, \"duplicate elements=(s).\"\n", + " print \"Vector after removing duplicates...\"\n", + " for i in range(n):\n", + " print \"a[\", i, \"] = \", a[i]\n", + "else:\n", + " print \"vector has no duplicate elements\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of a vector: 6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the vector elements...\n", + "a[ 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a[ 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a[ 2 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a[ 3 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a[ 4 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a[ 5 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " vector has 1 duplicate elements=(s).\n", + "Vector after removing duplicates...\n", + "a[ 0 ] = 1\n", + "a[ 1 ] = 5\n", + "a[ 2 ] = 6\n", + "a[ 3 ] = 8\n", + "a[ 4 ] = 9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-elder.cpp, Page no-187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=[float]*25\n", + "n=int(raw_input(\"How many persons are there in list ? \"))\n", + "for i in range(n):\n", + " print \"Enter person\", i+1, \"age: \",\n", + " age[i]=int(raw_input())\n", + "younger=age[0]\n", + "elder=age[0]\n", + "for i in range(n):\n", + " if age[i]elder:\n", + " elder=age[i]\n", + "print \"Age of eldest person is\", elder\n", + "print \"Age of youngest person is: \", younger" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many persons are there in list ? 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 1 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "25\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 2 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 3 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "45\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 4 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "18\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 5 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "35\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 6 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "23\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 7 age: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "32\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Age of eldest person is 45\n", + "Age of youngest person is: 4\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-bubble.cpp, Page no-189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "age=[int]*25\n", + "n=int(raw_input(\"How many elements to sort ? \"))\n", + "for i in range(n):\n", + " print \"Enter age[\", i, \"]: \",\n", + " age[i]=int(raw_input())\n", + "for i in range(n-1):\n", + " flag=1\n", + " for j in range(n-1-i):\n", + " if age[j]>age[j+1]:\n", + " flag=0\n", + " temp=age[j]\n", + " age[j]=age[j+1]\n", + " age[j+1]=temp\n", + " if flag:\n", + " break\n", + "print \"Sorted list...\"\n", + "for i in range(n):\n", + " print age[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many elements to sort ? 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age[ 0 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 1 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 2 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 3 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 4 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 5 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 6 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sorted list...\n", + "1 2 3 4 5 6 9\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-comb.cpp, Page no-190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SHRINKINGFACTOR=1.3\n", + "age=[int]*25\n", + "n=int(raw_input(\"How many elements to sort ? \"))\n", + "for i in range(n):\n", + " print \"Enter age[\", i, \"]: \",\n", + " age[i]=int(raw_input())\n", + "size=n\n", + "gap=size\n", + "while 1:\n", + " gap=int(float(gap)/SHRINKINGFACTOR)\n", + " if gap==0:\n", + " gap=1\n", + " elif (gap==9 or gap==10):\n", + " gap=11\n", + " flag=1\n", + " top=size-gap\n", + " for i in range(top):\n", + " j=i+gap\n", + " if age[i]>age[j]:\n", + " flag=0\n", + " temp=age[j]\n", + " age[j]=age[i]\n", + " age[i]=temp\n", + " if(flag==1 and gap<=1):\n", + " break\n", + "print \"Sorted list...\"\n", + "for i in range(n):\n", + " print age[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many elements to sort ? 7\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter age[ 0 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 1 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 2 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 3 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 4 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 5 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter age[ 6 ]: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sorted list...\n", + "1 2 3 4 5 6 9\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-matrix.cpp, Page no-193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=[]\n", + "b=[]\n", + "c=[]\n", + "m, n=[int(x) for x in raw_input(\"Enter row and column size of matrix A: \").split()]\n", + "p, q=[int(x) for x in raw_input(\"Enter row and column size of matrix B: \").split()]\n", + "if(m==p and n==q):\n", + " print \"Matrices can be added or subtracted...\"\n", + " print \"Enter matrix A elements...\"\n", + " for i in range(m):\n", + " a.append([])\n", + " for j in range(n):\n", + " a[i].append(int(raw_input()))\n", + " print \"Enter matrix B elements...\"\n", + " for i in range(m):\n", + " b.append([])\n", + " for j in range(n):\n", + " b[i].append(int(raw_input()))\n", + " for i in range(m):\n", + " c.append([])\n", + " for j in range(n):\n", + " c[i].append(a[i][j]+b[i][j])\n", + " print \"Sum of A and B matrices...\"\n", + " for i in range(m):\n", + " for j in range(n):\n", + " print c[i][j], \n", + " print \"\"\n", + " for i in range(m):\n", + " for j in range(n):\n", + " c[i][j]=a[i][j]-b[i][j]\n", + " print \"Difference of A and B matrices...\"\n", + " for i in range(m):\n", + " for j in range(n):\n", + " print c[i][j], \n", + " print \"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter row and column size of matrix A: 3 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter row and column size of matrix B: 3 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrices can be added or subtracted...\n", + "Enter matrix A elements...\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": [ + "3\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": [ + "1\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": [ + "2\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": [ + "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": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sum of A and B matrices...\n", + "4 4 4 \n", + "7 6 3 \n", + "4 3 3 \n", + "Difference of A and B matrices...\n", + "-2 0 2 \n", + "1 0 -1 \n", + "2 -1 1 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-name.cpp, Page-196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "name=[None]*50\n", + "name=raw_input(\"Enter your name <49-max>: \")\n", + "print \"Your name is\", name" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your name <49-max>: Archana\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Your name is Archana\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-succ.cpp, Page no-196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "msg=\"C to C++\\nC++ to Java\\nJava to...\" #string with special characters\n", + "print \"Please note the following messgae: \"\n", + "print msg" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Please note the following messgae: \n", + "C to C++\n", + "C++ to Java\n", + "Java to...\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strlen.cpp, Page no-197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s1=[None]*25\n", + "s1=raw_input(\"Enter your name: \")\n", + "print \"strlen( s1 ) :\", len(s1) #length of string" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your name: Smrithi\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strlen( s1 ): 7\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strcpy.cpp, Page no-198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s1=[None]*25\n", + "s2=[None]*25\n", + "s1=raw_input(\"Enter a string: \")\n", + "s2=s1 #copying string\n", + "print \"strcpy( s2, s1 ):\", s2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: Garbage\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strcpy( s2, s1 ): Garbage\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strcat.cpp, Page no-198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s1=[None]*40\n", + "s2=[None]*25\n", + "s1=raw_input(\"Enter string s1: \")\n", + "s2=raw_input(\"Enter string s2: \")\n", + "s1=s1+s2 #concatenating string\n", + "print \"strcat( s1, s2 ):\", s1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string s1: C\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string s2: ++\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strcat( s1, s2 ): C++\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strcmp, Page no-199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s1=[None]*25\n", + "s2=[None]*25\n", + "s1=raw_input(\"Enter string s1: \")\n", + "s2=raw_input(\"Enter string s2: \")\n", + "print \"strcmp( s1, s2 ):\",\n", + "if s1==s2: #comparing strings\n", + " print s1, \"is equal to\", s2\n", + "elif s1>s2:\n", + " print s1, \"is greater than\", s2\n", + "else: \n", + " print s1, \"is less than\", s2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string s1: Computer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string s2: Computing\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strcmp( s1, s2 ): Computer is less than Computing\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-uprlwr.cpp, Page no-199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s1=[None]*25\n", + "temp=[None]*25\n", + "s1=raw_input(\"Enter a string: \")\n", + "temp=s1\n", + "print \"strupr(temp):\", temp.upper() #Upper case\n", + "print \"strlwr(temp):\", temp.lower() #lower case" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: Smrithi\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "strupr(temp): SMRITHI\n", + "strlwr(temp): smrithi\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-name.cpp, Page no-200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "person=[[None]*10]*LEN\n", + "n=int(raw_input(\"How many persons ? \"))\n", + "for i in range(n):\n", + " print \"Enter person\", i+1, \"name: \",\n", + " person[i]=raw_input()\n", + "print \"------------------------------------------------------\"\n", + "print \"P# Person Name Length In lower case In UPPER case\"\n", + "print \"------------------------------------------------------\"\n", + "for i in range(n):\n", + " print '{:>2}'.format(i+1),\n", + " print '{:>15}'.format(person[i]),\n", + " print '{:>2}'.format(len(person[i])),\n", + " print '{:>15}'.format(person[i].lower()),\n", + " print '{:>15}'.format(person[i].upper())" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many persons ? 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter person 1 name: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Anand\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 2 name: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vishwanath\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 3 name: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Archana\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 4 name: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yadunandan\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter person 5 name: " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mallikarnun\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " ------------------------------------------------------\n", + "P# Person Name Length In lower case In UPPER case\n", + "------------------------------------------------------\n", + " 1 Anand 5 anand ANAND\n", + " 2 Vishwanath 10 vishwanath VISHWANATH\n", + " 3 Archana 7 archana ARCHANA\n", + " 4 Yadunandan 10 yadunandan YADUNANDAN\n", + " 5 Mallikarnun 11 mallikarnun MALLIKARNUN\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-lex.cpp, Page no-202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Str=[\"Anand\", \"Vishwanath\", \"Archana\", \"Yadunandan\", \"MalliKarjun\"]\n", + "print 'The given strings are:'\n", + "for i in range(5):\n", + " print Str[i]\n", + "k=1\n", + "while k<5: #sorting strings\n", + " for i in range(1, 5-k+1):\n", + " if Str[i-1]>Str[i]:\n", + " str_temp=Str[i-1]\n", + " Str[i-1]=Str[i]\n", + " Str[i]=str_temp\n", + " k=k+1\n", + "print 'Strings in lexicographical order are:'\n", + "for i in range(5):\n", + " print Str[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The given strings are:\n", + "Anand\n", + "Vishwanath\n", + "Archana\n", + "Yadunandan\n", + "MalliKarjun\n", + "Strings in lexicographical order are:\n", + "Anand\n", + "Archana\n", + "MalliKarjun\n", + "Vishwanath\n", + "Yadunandan\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Str=\"In pursuit of Mastering\tC++\"\n", + "count=0\n", + "i=0\n", + "print \"The given string is:\\n\",Str\n", + "while(iy:\n", + " return x\n", + " else:\n", + " return y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "c=Max(a,b)\n", + "print \"max (a, b):\", c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 20 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max (a, b): 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example.cpp, Page no-214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(x,y):\n", + " if x>y:\n", + " return x\n", + " else:\n", + " return y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "c=Max(a,b)\n", + "print \"max (a, b):\", c" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 20 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "max (a, b): 20\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-chart1.cpp, Page no-214" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PercentageChart(percentage):\n", + " for i in range(percentage/2):\n", + " sys.stdout.write('\\x3d')\n", + "print \"Sridevi : \",\n", + "PercentageChart(50)\n", + "print \"\\nRajkumar: \",\n", + "PercentageChart(84)\n", + "print \"\\nSavithri: \",\n", + "PercentageChart(79)\n", + "print \"\\nAnand : \",\n", + "PercentageChart(74)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sridevi : ========================= \n", + "Rajkumar: ========================================== \n", + "Savithri: ======================================= \n", + "Anand : =====================================\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-chart2.cpp, Page no-216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PercentageChart(percentage):\n", + " for i in range(percentage/2):\n", + " sys.stdout.write('\\x3d')\n", + "m1, m2, m3, m4=[int(x) for x in raw_input(\"Enter percentage score of Sri, Raj, Savi, An: \").split()]\n", + "print \"Sridevi : \",\n", + "PercentageChart(m1)\n", + "print \"\\nRajkumar: \",\n", + "PercentageChart(m2)\n", + "print \"\\nSavithri: \",\n", + "PercentageChart(m3)\n", + "print \"\\nAnand : \",\n", + "PercentageChart(m4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter percentage score of Sri, Raj, Savi, An: 52 92 83 67\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sridevi : ========================== \n", + "Rajkumar: ============================================== \n", + "Savithri: ========================================= \n", + "Anand : =================================\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-chart3.cpp, Page no-217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PercentageChart(percentage, style):\n", + " for i in range(percentage/2):\n", + " sys.stdout.write(style)\n", + "m1, m2, m3, m4=[int(x) for x in raw_input(\"Enter percentage score of Sri, Raj, Savi, An: \").split()]\n", + "print \"Sridevi : \",\n", + "PercentageChart(m1, '*')\n", + "print \"\\nRajkumar: \",\n", + "PercentageChart(m2, '\\x3D')\n", + "print \"\\nSavithri: \",\n", + "PercentageChart(m3, '-')\n", + "print \"\\nAnand : \",\n", + "PercentageChart(m4, '!')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter percentage score of Sri, Raj, Savi, An: 55 92 83 67\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sridevi : *************************** \n", + "Rajkumar: ============================================== \n", + "Savithri: ----------------------------------------- \n", + "Anand : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ifact.cpp, Page no-218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def fact(n):\n", + " if n==0:\n", + " result=1\n", + " else:\n", + " result=1\n", + " for i in range(2, n+1):\n", + " result*=i\n", + " return result\n", + "n=int(raw_input(\"Enter the number whose factorial is to be found: \"))\n", + "print \"The factorial of\", n, \"is\", fact(n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number whose factorial is to be found: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factorial of 5 is 120\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-namelen.cpp, Page no-219" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "name=[None]*20\n", + "name=raw_input(\"Enter your name: \")\n", + "Len=len(name) #string length\n", + "print \"Length of your name =\", Len" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter your name: Rajkumar\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of your name = 8\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-maths.cpp, Page no-220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "num=float(raw_input(\"Enter any factorial number: \"))\n", + "num1=math.ceil(num) #ceiling of number\n", + "num2=math.floor(num) #floor of number\n", + "print \"ceil(\",num,\") =\", num1\n", + "print \"floor(\",num,\") =\", num2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter any factorial number: 2.9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ceil( 2.9 ) = 3.0\n", + "floor( 2.9 ) = 2.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap1.cpp, Page no-221" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y): #pass by value swap\n", + " print \"Value of x and y in swap before exchange:\", x, y\n", + " t=x\n", + " x=y\n", + " y=t\n", + " print \"Value of x and y in swap after exchange:\", x, y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "swap(a,b)\n", + "print \"Value of a and b on swap a, b) in main():\", a, b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of x and y in swap before exchange: 10 20\n", + "Value of x and y in swap after exchange: 20 10\n", + "Value of a and b on swap a, b) in main(): 10 20\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap2.cpp, Pgae no-222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y): #pass by address swap\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"Value of a and b on swap( a, b ):\", a, b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of a and b on swap( a, b ): 20 10\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap3.cpp, Page no-224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y): #pass by reference swap\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"Value of a and b on swap( a, b):\", a, b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of a and b on swap( a, b): 20 10\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ref.cpp, Page no-226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Max(x,y):\n", + " if x>y:\n", + " return x\n", + " else:\n", + " return y\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers : \").split()]\n", + "if Max(a,b)==a:\n", + " a=425\n", + "else:\n", + " b=425\n", + "print \"The value of a and b on execution of mx(x, y)=425;...\"\n", + "print \"a =\", a, \"b =\", b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers : 2 1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of a and b on execution of mx(x, y)=425;...\n", + "a = 425 b = 1\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-defarg1.cpp, Page no-228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PrintLine(ch='-', RepeatCount=70): #default arguments\n", + " for i in range(RepeatCount):\n", + " sys.stdout.write(ch)\n", + " print ''\n", + "PrintLine()\n", + "PrintLine('!')\n", + "PrintLine('*', 40)\n", + "PrintLine('R', 55)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "----------------------------------------------------------------------\n", + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", + "****************************************\n", + "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-defarg2.cpp, Pgae no-229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "def PrintLine(ch='-', RepeatCount=70, nLines=1): #default arguments\n", + " for i in range(nLines):\n", + " for i in range(RepeatCount):\n", + " sys.stdout.write(ch)\n", + " print ''\n", + "PrintLine()\n", + "PrintLine('!')\n", + "PrintLine('*', 40)\n", + "PrintLine('R', 55)\n", + "PrintLine('&', 25, 2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "----------------------------------------------------------------------\n", + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", + "****************************************\n", + "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n", + "&&&&&&&&&&&&&&&&&&&&&&&&&\n", + "&&&&&&&&&&&&&&&&&&&&&&&&&\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-square.cpp, Page no-230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sqr(num):\n", + " return num*num\n", + "n=float(raw_input(\"Enter a number: \"))\n", + "print \"Its square =\",sqr(n)\n", + "print \"sqr( 10 ) =\", sqr(10)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a number: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Its square = 25.0\n", + "sqr( 10 ) = 100\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap4.cpp, Page no-231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#different swap functions\n", + "def swap_char(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "def swap_int(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "def swap_float(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch1, ch2 = swap_char(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "a, b = swap_int(a, b)\n", + "print \"On swapping :\", a,b\n", + "c, d=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "c, d = swap_float(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap5.cpp, Page no-233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y): #function overloading\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch1, ch2 = swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"On swapping :\", a,b\n", + "c, d=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "c, d = swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-show.cpp, Page no-234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show(val): #function overloading\n", + " if(isinstance(val, int)):\n", + " print \"Integer:\", val\n", + " if(isinstance(val, float)):\n", + " print \"Double:\", val\n", + " if(isinstance(val, str)):\n", + " print \"String:\", val\n", + "show(420)\n", + "show(3.1415)\n", + "show(\"Hello World!\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Integer: 420\n", + "Double: 3.1415\n", + "String: Hello World!\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap6.cpp, Page no-236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def swap(x, y):\n", + " t=x\n", + " x=y\n", + " y=t\n", + " return x, y\n", + "ch1, ch2=[str(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "ch1, ch2 = swap(ch1, ch2)\n", + "print \"On swapping :\", ch1, ch2\n", + "a, b=[int(x) for x in raw_input(\"Enter two characters : \").split()]\n", + "a, b = swap(a, b)\n", + "print \"On swapping :\", a,b\n", + "c, d=[float(x) for x in raw_input(\"Enter two floats : \").split()]\n", + "c, d = swap(c, d)\n", + "print \"On swapping :\", c, d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : R K\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : K R\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two characters : 5 10\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 10 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two floats : 20.5 99.5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On swapping : 99.5 20.5\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sort.cpp, Page no-237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(false, true)=(0, 1) #enum type\n", + "type =['false', 'true']\n", + "def swap(x, y):\n", + " x, y=y, x\n", + " return x, y\n", + "def BubbleSort(a, size):\n", + " swapped='true'\n", + " for i in range(size-1):\n", + " if swapped:\n", + " swapped='false'\n", + " for j in range((size-1)-i):\n", + " if a[j]>a[j+1]:\n", + " swapped='true'\n", + " a[j], a[j+1]=swap(a[j], a[j+1])\n", + " return a\n", + "a=[int]*25\n", + "print \"Program to sort elements...\"\n", + "size=int(raw_input(\"Enter the size of the integer vector : \"))\n", + "print \"Enter the elements of the integer vector...\"\n", + "for i in range(size):\n", + " a[i]=int(raw_input())\n", + "a=BubbleSort(a, size)\n", + "print \"Sorted Vector:\"\n", + "for i in range(size):\n", + " print a[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Program to sort elements...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the size of the integer vector : 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the elements of the integer vector...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "8\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sorted Vector:\n", + "2 3 6 8 9\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-linear.cpp, Page no-239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def linear(arr, num):\n", + " for i in range(10):\n", + " if arr[i]==num:\n", + " return i\n", + " return -1\n", + "a=[10, 20, 5, 59, 63, 22, 18, 99, 11, 65] # 1-D array\n", + "element=int(raw_input(\"Enter the element to be searched: \"))\n", + "result=linear(a, element)\n", + "if result==-1:\n", + " print element, \"is not present in the array\"\n", + "else:\n", + " print element, \"is present at\",result, \"location in the array\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the element to be searched: 88\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "88 is not present in the array\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-funcstk.cpp, Page no-240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def Func(j, k):\n", + " print \"In the function the argument values are\", j, \"..\", k\n", + "i=99\n", + "Func(i+1, i)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In the function the argument values are 100 .. 99\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-variable.cpp, Page no-241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "g=100\n", + "def func1():\n", + " g=50\n", + " print \"Local variable g in func1() :\", g\n", + "def func2():\n", + " global g\n", + " print \"In func2() g is visible since it is global.\"\n", + " print \"Incremeting g in func...\"\n", + " g+=1\n", + "print \"In main g is visible here since g is global.\"\n", + "print \"Assigning 20 to g in main...\"\n", + "g=20\n", + "print \"Calling func1...\"\n", + "func1()\n", + "print \"func1 returned. g is\", g\n", + "print \"Calling func2...\"\n", + "func2()\n", + "print \"func2 returned. g is\", g" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In main g is visible here since g is global.\n", + "Assigning 20 to g in main...\n", + "Calling func1...\n", + "Local variable g in func1() : 50\n", + "func1 returned. g is 20\n", + "Calling func2...\n", + "In func2() g is visible since it is global.\n", + "Incremeting g in func...\n", + "func2 returned. g is 21\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-regvar.cpp, Page no-244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sys\n", + "i=int\n", + "name=raw_input(\"Enter a string: \")\n", + "print \"The reverse of the string is: \",\n", + "for i in range(len(name)-1, -1, -1):\n", + " sys.stdout.write(name[i])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter a string: mahatma\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The reverse of the string is: amtaham\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-count.cpp, Page no-245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def PrintCount(Count=[1]):\n", + " print 'Count =', Count[0]\n", + " Count[0]=Count[0]+1\n", + "PrintCount()\n", + "PrintCount()\n", + "PrintCount()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Count = 1\n", + "Count = 2\n", + "Count = 3\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-add.cpp, Page no-247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def add(*argc):#variable number of arguments to the function\n", + " result=0\n", + " for i in range(1, argc[0]+1):\n", + " result+=argc[i]\n", + " return result\n", + "sum1=add(3, 1, 2, 3)\n", + "print \"sum1 =\", sum1\n", + "sum2=add(1, 10)\n", + "print \"sum2 =\", sum2\n", + "sum3=add(0)\n", + "print \"sum3 =\", sum3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "sum1 = 6\n", + "sum2 = 10\n", + "sum3 = 0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sum.cpp, Page no-248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def sum(*msg): #variable number of arguments to the function\n", + " total=0\n", + " i=1\n", + " while(msg[i]!=0):\n", + " total+=msg[i]\n", + " i+=1\n", + " print msg[0], total\n", + "sum(\"The total of 1+2+3+4 is\", 1, 2, 3, 4, 0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total of 1+2+3+4 is 10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-rfact.cpp, Page no-250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def fact(num): #recursive function\n", + " if num==0:\n", + " return 1\n", + " else:\n", + " return num*fact(num-1)\n", + "n=int(raw_input(\"Enter the number whose factorial is to be found: \"))\n", + "print \"The factorial of\", n, \"is\", fact(n)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number whose factorial is to be found: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factorial of 5 is 120\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-hanoi.cpp, Page no-250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def hanoi(n, left, mid, right): #recursive function\n", + " if n!=0:\n", + " hanoi(n-1, left, right, mid)\n", + " print 'Move disk', n, 'from', left, 'to', right\n", + " hanoi(n-1, mid, left, right)\n", + "source='L'\n", + "intermediate='C'\n", + "destination='R'\n", + "nvalue=int(raw_input('Enter number of disks: '))\n", + "hanoi(nvalue, source, intermediate, destination)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter number of disks: 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Move disk 1 from L to R\n", + "Move disk 2 from L to C\n", + "Move disk 1 from R to C\n", + "Move disk 3 from L to R\n", + "Move disk 1 from C to L\n", + "Move disk 2 from C to R\n", + "Move disk 1 from L to R\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example Page no-254" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def power(x1, y1=None):\n", + " if (isinstance(y1, int)):\n", + " result=1.0\n", + " for i in range(1, y1+1):\n", + " result=result*x1\n", + " return result\n", + " else:\n", + " return x1*x1\n", + "x=float(raw_input(\"Enter the value of x: \"))\n", + "y=int(raw_input(\"Enter the value of y: \"))\n", + "print \"power(x, y) =\", power(x, y)\n", + "print \"power(x) =\", power(x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of x: 9.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the value of y: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power(x, y) = 8145.0625\n", + "power(x) = 90.25\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter8-StructuresAndUnions_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter8-StructuresAndUnions_1.ipynb new file mode 100755 index 00000000..709caeac --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter8-StructuresAndUnions_1.ipynb @@ -0,0 +1,1202 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:251f1d4632e149ef1bebd9159015f741bede61e517916f81edb5cc7bbd18c1c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8-Structures and Unions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student1.cpp, Page no-260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "class Student(Structure): #structure\n", + " roll_no =int\n", + " name =str\n", + " branch =str\n", + " marks=int\n", + "s1=Student() #object of struct student\n", + "print \"Enter data for student...\"\n", + "s1.roll_no=int(raw_input(\"Roll Number ? \"))\n", + "s1.name=raw_input(\"Name ? \")\n", + "s1.branch=raw_input(\"Branch ? \")\n", + "s1.marks=int(raw_input(\"Total Marks ? \"))\n", + "print \"Student Report\"\n", + "print \"--------------\"\n", + "print \"Roll Number:\", s1.roll_no\n", + "print \"Name:\", s1.name\n", + "print \"Branch:\", s1.branch\n", + "print \"Percentage:%f\" %(s1.marks*(100.0/325))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Mangala\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Computer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Marks ? 290\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Student Report\n", + "--------------\n", + "Roll Number: 5\n", + "Name: Mangala\n", + "Branch: Computer\n", + "Percentage:89.230769\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-days.cpp, Page no-262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int\n", + "class date(Structure):\n", + " _fields_=[(\"day\", c_int),(\"month\", c_int),(\"year\",c_int)]\n", + "d1=date(14, 4, 1971)\n", + "d2=date(3, 7, 1996)\n", + "print \"Birth date:\",\n", + "print \"%s-%s-%s\" %(d1.day, d1.month, d1.year)\n", + "print \"Today date:\",\n", + "print \"%s-%s-%s\" %(d2.day, d2.month, d2.year)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth date: 14-4-1971\n", + "Today date: 3-7-1996\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student2.cpp, Page no-264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class date(Structure):\n", + " _fields_=[(\"day\", c_int),(\"month\", c_int),(\"year\",c_int)]\n", + "class Student(Structure):\n", + " _fields_=[(\"roll_no\", c_int), (\"name\", c_char*25), (\"birthday\", date), (\"branch\", c_char*15),(\"marks\", c_int)]#nested structure\n", + "s1=Student()\n", + "print \"Enter data for student...\"\n", + "s1.roll_no=int(raw_input(\"Roll Number ? \"))\n", + "s1.name=raw_input(\"Name ? \")\n", + "birthday=date(0, 0, 0)\n", + "print \"Enter date of birth : \",\n", + "d, m, y=[int(x) for x in raw_input().split()]\n", + "birthday.day=d\n", + "birthday.month=m\n", + "birthday.year=y\n", + "s1.birthday=birthday\n", + "s1.branch=raw_input(\"Branch ? \")\n", + "s1.marks=int(raw_input(\"Total Marks ? \"))\n", + "print \"Student Report\"\n", + "print \"--------------\"\n", + "print \"Roll Number:\", s1.roll_no\n", + "print \"Name:\", s1.name\n", + "print \"%s-%s-%s\" %(s1.birthday.day, s1.birthday.month, s1.birthday.year)\n", + "print \"Branch:\", s1.branch\n", + "print \"Percentage:%f\" %(s1.marks*(100.0/325))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Savithri\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter date of birth : " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 2 1972\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Electrical\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Marks ? 295\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Student Report\n", + "--------------\n", + "Roll Number: 9\n", + "Name: Savithri\n", + "2-2-1972\n", + "Branch: Electrical\n", + "Percentage:90.769231\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student3.cpp, Page no-267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class Student(Structure):\n", + " _fields_=[(\"roll_no\", c_int), (\"name\", c_char*25), (\"branch\", c_char*15),(\"marks\", c_int)]\n", + "s=[]\n", + "n=int(raw_input(\"How many students to be processed : \"))\n", + "for i in range(n):\n", + " print \"Enter data for student\", i+1, \"...\"\n", + " r=int(raw_input(\"Roll Number ? \"))\n", + " name=raw_input(\"Name ? \")\n", + " b=raw_input(\"Branch ? \")\n", + " m=int(raw_input(\"Total marks ? \"))\n", + " s.append(Student(r, name, b, m)) #array of structure objects\n", + "print \"Students Report\"\n", + "print \"--------------\"\n", + "for i in range(n):\n", + " print \"Roll Number:\", s[i].roll_no\n", + " print \"Name:\", s[i].name\n", + " print \"Branch:\", s[i].branch\n", + " print \"Percentage: %f\" %(s[i].marks*(100.0/325))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students to be processed : 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 1 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Mangala\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Computer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 290\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 2 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 9\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Shivakumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Electronics\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 250\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Students Report\n", + "--------------\n", + "Roll Number: 5\n", + "Name: Mangala\n", + "Branch: Computer\n", + "Percentage: 89.230769\n", + "Roll Number: 9\n", + "Name: Shivakumar\n", + "Branch: Electronics\n", + "Percentage: 76.923077\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student4.cpp, Page no-269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class Student(Structure):\n", + " _fields_=[(\"roll_no\", c_int), (\"name\", c_char*25), (\"branch\", c_char*15),(\"marks\", c_int)]\n", + "STUDENTS_COUNT=5\n", + "s=[]\n", + "s.append(Student(2, 'Tejaswi', 'CS', 285))#initialization of array of structures\n", + "s.append(Student(3, 'Laxmi', 'IT', 215))\n", + "s.append(Student(5, 'Bhavani', 'Electronics', 250))\n", + "s.append(Student(7, 'Anil', 'Civil', 215))\n", + "s.append(Student(9, 'Savithri', 'Electrical', 290))\n", + "print \"Students Report\"\n", + "print \"--------------\"\n", + "for i in range(STUDENTS_COUNT):\n", + " print \"Roll Number:\", s[i].roll_no\n", + " print \"Name:\", s[i].name\n", + " print \"Branch:\", s[i].branch\n", + " print \"Percentage: %0.4f\" %(s[i].marks*(100.0/325))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Students Report\n", + "--------------\n", + "Roll Number: 2\n", + "Name: Tejaswi\n", + "Branch: CS\n", + "Percentage: 87.6923\n", + "Roll Number: 3\n", + "Name: Laxmi\n", + "Branch: IT\n", + "Percentage: 66.1538\n", + "Roll Number: 5\n", + "Name: Bhavani\n", + "Branch: Electronics\n", + "Percentage: 76.9231\n", + "Roll Number: 7\n", + "Name: Anil\n", + "Branch: Civil\n", + "Percentage: 66.1538\n", + "Roll Number: 9\n", + "Name: Savithri\n", + "Branch: Electrical\n", + "Percentage: 89.2308\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student5.cpp, Page no-271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class Student(Structure):\n", + " _fields_=[(\"roll_no\", c_int), (\"name\", c_char*25), (\"branch\", c_char*15),(\"marks\", c_int)]\n", + "def read():\n", + " dull=Student()\n", + " dull.roll_no=int(raw_input(\"Roll Number ? \"))\n", + " dull.name=raw_input(\"Name ? \")\n", + " dull.branch=raw_input(\"Branch ? \")\n", + " dull.marks=int(raw_input(\"Total marks ? \"))\n", + " return dull #returning structure object\n", + "def show(genius): #passing object of structure\n", + " print \"Roll Number:\", genius.roll_no\n", + " print \"Name:\", genius.name\n", + " print \"Branch:\", genius.branch\n", + " print \"Percentage: %0.4f\" %(genius.marks*(100.0/325))\n", + "s=[]\n", + "n=int(raw_input(\"How many students to be processed : \"))\n", + "for i in range(n):\n", + " print \"Enter data for student\", i+1, \"...\"\n", + " s.append(read())\n", + "print \"Students Report\"\n", + "print \"--------------\"\n", + "for i in range(n):\n", + " show(s[i])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students to be processed : 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 1 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Smrithi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Genetics\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 295\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 2 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 10\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Bindhu\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? MCA\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 300\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Students Report\n", + "--------------\n", + "Roll Number: 3\n", + "Name: Smrithi\n", + "Branch: Genetics\n", + "Percentage: 90.7692\n", + "Roll Number: 10\n", + "Name: Bindhu\n", + "Branch: MCA\n", + "Percentage: 92.3077\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-student6.cpp, Page no-273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, c_char\n", + "class Student(Structure):\n", + " _fields_=[(\"roll_no\", c_int), (\"name\", c_char*25), (\"branch\", c_char*15),(\"marks\", c_int)]\n", + "def HighestMarks(s, count): #passing array of structures\n", + " big=s[0].marks\n", + " for i in range(1, count):\n", + " if s[i].marks>big:\n", + " big=s[i].marks\n", + " index=i\n", + " return index\n", + "def read():\n", + " dull=Student()\n", + " dull.roll_no=int(raw_input(\"Roll Number ? \"))\n", + " dull.name=raw_input(\"Name ? \")\n", + " dull.branch=raw_input(\"Branch ? \")\n", + " dull.marks=int(raw_input(\"Total marks ? \"))\n", + " return dull\n", + "def show(genius):\n", + " print \"Roll Number:\", genius.roll_no\n", + " print \"Name:\", genius.name\n", + " print \"Branch:\", genius.branch\n", + " print \"Percentage: %0.4f\" %(genius.marks*(100.0/325))\n", + "s=[]\n", + "n=int(raw_input(\"How many students to be processed : \"))\n", + "for i in range(n):\n", + " print \"Enter data for student\", i+1, \"...\"\n", + " s.append(read())\n", + "print \"Students Report\"\n", + "print \"--------------\"\n", + "Id=HighestMarks(s, n)\n", + "print \"Details of student scoring higest marks...\"\n", + "show(s[Id])" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many students to be processed : 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 1 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Smrithi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Genetics\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 295\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 2 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 15\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Rajkumar\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Computer\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 315\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for student 3 ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll Number ? 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name ? Laxmi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Branch ? Electronics\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total marks ? 255\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Students Report\n", + "--------------\n", + "Details of student scoring higest marks...\n", + "Roll Number: 15\n", + "Name: Rajkumar\n", + "Branch: Computer\n", + "Percentage: 96.9231\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-complex.cpp, Page no-278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "import sys\n", + "import math\n", + "class Complex(Structure):\n", + " x=int\n", + " y=int\n", + " def read(self):\n", + " self.x=int(raw_input(\"Real part? \"))\n", + " self.y=int(raw_input(\"Imaginary part? \"))\n", + " def show(self, msg):\n", + " print msg, self.x,\n", + " if self.y<0:\n", + " sys.stdout.write('-i')\n", + " else:\n", + " sys.stdout.write('+i')\n", + " print math.fabs(self.y)\n", + " def add(self, c2):\n", + " self.x+=c2.x\n", + " self.y+=c2.y\n", + "c1=Complex()\n", + "c2=Complex()\n", + "c3=Complex()\n", + "print \"Enter complex number c1...\"\n", + "c1.read()\n", + "print \"Enter complex number c2...\"\n", + "c2.read()\n", + "c1.show('c1 =')\n", + "c2.show('c2 =')\n", + "c3=c1\n", + "c3.add(c2)\n", + "c3.show('c3 = c1 + c2 =')" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter complex number c1...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part? 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imaginary part? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter complex number c2...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Real part? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Imaginary part? 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "c1 = 1+i 2.0\n", + "c2 = 3+i 4.0\n", + "c3 = c1 + c2 = 4+i 6.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-emp.cpp, Page no-279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "class employee(Structure): #structure member functions\n", + " name=str\n", + " ID=long\n", + " dept=str\n", + " salary=float\n", + " def read(self):\n", + " self.name=raw_input(\"Employee Name: \")\n", + " self.ID=long(raw_input(\"Employee ID: \"))\n", + " self.dept=raw_input(\"Department: \")\n", + " self.salary=float(raw_input(\"Salary: \"))\n", + " def show(self):\n", + " print \"Employee Name:\", self.name\n", + " print \"Employee ID:\", self.ID\n", + " print \"Department:\", self.dept\n", + " print \"Salary:\", self.salary\n", + "emp=employee()\n", + "print \"Enter employee data:\"\n", + "emp.read()\n", + "print \"\\n****Employee Record****\"\n", + "emp.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter employee data:\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee Name: Vishwanathan\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee ID: 953\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Department: Finance\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Salary: 18500\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "****Employee Record****\n", + "Employee Name: Vishwanathan\n", + "Employee ID: 953\n", + "Department: Finance\n", + "Salary: 18500.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-union.cpp, Page no-283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Union, c_char, sizeof\n", + "#Creates a union\n", + "class Strings(Union):\n", + " _fields_ = [(\"filename\",c_char*200),\n", + " (\"output\", c_char*400)]\n", + "s=Strings()\n", + "s.filename=\"/cdacb/usrl/raj/oops/mcrokernel/pserver.cpp\"\n", + "print \"filename:\", s.filename\n", + "s.output=\"OOPs is a most complex entity ever created by humans\"\n", + "print \"output:\", s.output\n", + "print \"Size of union Strings =\", sizeof(Strings)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "filename: /cdacb/usrl/raj/oops/mcrokernel/pserver.cpp\n", + "output: OOPs is a most complex entity ever created by humans\n", + "Size of union Strings = 400\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sudiff.cpp, Page no-284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from collections import namedtuple\n", + "from ctypes import c_char, c_int, c_float, sizeof, Structure, Union\n", + "class struct(Structure):\n", + " _fields_ = [(\"name\",c_char*25), (\"idno\", c_int), (\"salary\", c_float)]\n", + "emp=struct()\n", + "class union(Union):\n", + " _fields_ = [(\"name\",c_char*25), (\"idno\", c_int), (\"salary\", c_float)]\n", + "desc=union()\n", + "print \"The size of the structure is\", sizeof(emp)\n", + "print \"The size of the union is\", sizeof(desc)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The size of the structure is 36\n", + "The size of the union is 28\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-uaccess.cpp, Page no-285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Union, c_int, c_char, c_float\n", + "class emp(Union):\n", + " _fields_=[(\"name\",c_char*25), (\"idno\", c_int), (\"salary\", c_float)]\n", + "def show(e):\n", + " print \"Employee Details...\"\n", + " print \"The name is %s\" %e.name\n", + " print \"The idno is %d\" %e.idno\n", + " print \"The salary is %g\" %e.salary\n", + "e=emp()\n", + "e.name=\"Rajkumar\"\n", + "show(e)\n", + "e.idno=10\n", + "show(e)\n", + "e.salary=9000\n", + "show(e)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Employee Details...\n", + "The name is Rajkumar\n", + "The idno is 1802133842\n", + "The salary is 2.83348e+26\n", + "Employee Details...\n", + "The name is \n", + "\n", + "The idno is 10\n", + "The salary is 1.4013e-44\n", + "Employee Details...\n", + "The name is \n", + "The idno is 1175232512\n", + "The salary is 9000\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-uscope.cpp, Page no-286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Union, c_int, c_char, c_float\n", + "#Creates a union\n", + "class union(Union):\n", + " _fields_ = [(\"i\", c_int), \n", + " (\"c\", c_char), \n", + " (\"f\", c_float)]\n", + "u=union()\n", + "u.i=10\n", + "u.c='9'\n", + "u.f=4.5\n", + "print \"The value of i is\", u.i\n", + "print \"The value of c is\", u.c\n", + "print \"The value of f is\", u.f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of i is 1083179008\n", + "The value of c is \u0000\n", + "The value of f is 4.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-share.cpp, Page no-289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from collections import namedtuple\n", + "from ctypes import Structure, c_uint, c_int, Union\n", + "import sys\n", + "class with_bits(Structure):\n", + " _fields_ = [(\"first\", c_uint), (\"second\", c_uint)]\n", + "class union(Union):\n", + " _fields_=[(\"b\", with_bits), (\"i\", c_int)]\n", + "i=0\n", + "u=union()\n", + "print \"On i=0: b.first =\",u.b.first,\"b.second =\", u.b.second\n", + "u.b.first=9\n", + "print \"b.first =9:\", \n", + "print \"b.first =\", u.b.first, \"b.second =\", u.b.second" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "On i=0: b.first = 0 b.second = 0\n", + "b.first =9: b.first = 9 b.second = 0\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter9-PointersAndRuntimeBinding_1.ipynb b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter9-PointersAndRuntimeBinding_1.ipynb new file mode 100755 index 00000000..1e90b1ef --- /dev/null +++ b/_Mastering_C++_by_K_R_Venugopal_and_Rajkumar_Buyya/Chapter9-PointersAndRuntimeBinding_1.ipynb @@ -0,0 +1,1661 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7b3f20284899a06912262bc6dd0b3dfa8523f3688c878e2872d6f26bdd017de9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9- Pointers and Runtime Binding" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-getaddr.cpp, Page no-293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, pointer\n", + "a=c_int(100)\n", + "b=c_int(200)\n", + "c=c_int(300)\n", + "print 'Address', hex(id(pointer(a))), 'contains value', a.value #address of a pointer\n", + "print 'Address', hex(id(pointer(b))), 'contains value', b.value\n", + "print 'Address', hex(id(pointer(c))), 'contains value', c.value" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address 0x3663448L contains value 100\n", + "Address 0x36633c8L contains value 200\n", + "Address 0x3663448L contains value 300\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-initptr.cpp, Page no-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, pointer\n", + "var1=c_int(10)\n", + "var2=c_int(20)\n", + "iptr=pointer(var1)\n", + "print 'Address and contents of var1 is', hex(id(iptr)), 'and', iptr[0]\n", + "iptr=pointer(var2)\n", + "print 'Address and contents of var2 is', hex(id(iptr)), 'and', iptr[0]\n", + "iptr[0]=125\n", + "var1=iptr[0]*1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Address and contents of var1 is 0x364f248L and 10\n", + "Address and contents of var2 is 0x364f4c8L and 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-swap.cpp, Page no-298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_float, pointer\n", + "def swap(pa, pb):\n", + " temp=pa[0]\n", + " pa[0]=pb[0]\n", + " pb[0]=temp\n", + "a=float(raw_input(\"Enter real number : \"))\n", + "b=float(raw_input(\"Enter real number : \"))\n", + "a=c_float(a)\n", + "b=c_float(b)\n", + "pa=pointer(a)\n", + "pb=pointer(b)\n", + "swap(pa, pb)\n", + "print \"After swapping......\"\n", + "print \"a contains %0.1f\" %(a.value)\n", + "print \"b contains %0.1f\" %(b.value)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter real number : 10.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter real number : 20.9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "After swapping......\n", + "a contains 20.9\n", + "b contains 10.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-voidptr.cpp, Page no-300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, c_float, pointer\n", + "i1=c_int(100)\n", + "f1=c_float(200.5)\n", + "vptr=pointer(i1)\n", + "print \"i1 contains\", vptr[0] #value stored in address pointed by vptr\n", + "vptr=pointer(f1)\n", + "print \"i1 contains\", vptr[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i1 contains 100\n", + "i1 contains 200.5\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptrarr1.cpp, Page no-303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "a=[int]\n", + "n=int(raw_input(\"Size of array? \"))\n", + "print \"Array elements ?\"\n", + "for i in range(n):\n", + " a.append(int(raw_input()))\n", + "ptr=a\n", + "small=ptr[1]\n", + "for i in range(2, n+1):\n", + " if small>ptr[i]:\n", + " small=ptr[i]\n", + " i+=1 #pointer arithmetic\n", + "print \"Smallest element is\", small" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Size of array? 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Array elements ?\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "9\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest element is 1\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-newhand.cpp, Page no-305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "size=int(raw_input(\"How many bytes to be allocated: \"))\n", + "try:\n", + " data=[int]*size\n", + " print \"Memory allocation success, address =\", hex(id(data))\n", + "except:\n", + " print \"Could not allocate. Bye...\"\n", + "del data" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many bytes to be allocated: 300\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Memory allocation success, address = 0x3716188L\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptr2ptr.cpp, Page no-306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "data=c_int()\n", + "iptr=pointer(data)\n", + "ptriptr=pointer(iptr) #pointer to a pointer\n", + "iptr[0]=100\n", + "print \"The variable 'data' contains\", data.value\n", + "ptriptr[0][0]=200\n", + "print \"The variable 'data' contains\", data.value\n", + "data.value=300\n", + "print \"ptriptr is pointing to\", ptriptr[0][0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The variable 'data' contains 100\n", + "The variable 'data' contains 200\n", + "ptriptr is pointing to 300\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-big.cpp, Page no-308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, pointer\n", + "def FindBig(pa, pb, pbig):\n", + " if pa[0]>pb[0]:\n", + " pbig[0]=pa[0]\n", + " else:\n", + " pbig[0]=pb[0]\n", + " return pbig\n", + "a=c_int()\n", + "b=c_int()\n", + "big=pointer(c_int())\n", + "a, b=[int(x) for x in raw_input(\"Enter two integers: \").split()]\n", + "pa=[a]#pointer to a\n", + "pb=[b]#pointer to b\n", + "big=FindBig(pa, pb, big)\n", + "print \"The value as obtained from the pointer:\", big[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers: 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value as obtained from the pointer: 20\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-sortptr.cpp, Page no-309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import c_int, c_char_p\n", + "def SortByPtrExchange(person, n):\n", + " for i in range(n-1):\n", + " flag=1\n", + " for j in range(n-1-i):\n", + " if person[j]>person[j+1]:\n", + " flag=0\n", + " temp=person[j]\n", + " person[j]=person[j+1]\n", + " person[j+1]=temp\n", + " if flag:\n", + " break\n", + "n=c_int(0)\n", + "choice=c_char_p()\n", + "person=[[c_char_p]*100]*40\n", + "while(1):\n", + " person[n.value]=raw_input(\"Enter name: \")\n", + " n.value+=1\n", + " choice=raw_input(\"Enter another(y/n)? \")\n", + " if choice!='y':\n", + " break\n", + "print \"Unsorted list: \"\n", + "for i in range(n.value):\n", + " print person[i]\n", + "SortByPtrExchange(person, n.value)\n", + "print \"Sorted list: \"\n", + "for i in range(n.value):\n", + " print person[i]\n", + "for i in range(n.value):\n", + " del person[i]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Tejaswi\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter another(y/n)? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Prasad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter another(y/n)? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Prakash\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter another(y/n)? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Sudeep\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter another(y/n)? y\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter name: Anand\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter another(y/n)? n\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Unsorted list: \n", + "Tejaswi\n", + "Prasad\n", + "Prakash\n", + "Sudeep\n", + "Anand\n", + "Sorted list: \n", + "Anand\n", + "Prakash\n", + "Prasad\n", + "Sudeep\n", + "Tejaswi\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-show.cpp, Page no-311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def show(a, m):\n", + " c=a\n", + " for i in range(m):\n", + " for j in range(3):\n", + " print c[i][j],\n", + " print \"\"\n", + "c=[(1, 2, 3), (4, 5, 6)] #initialization of a 2D array\n", + "show(c, 2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 2 3 \n", + "4 5 6 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-matrix.cpp, Page no-313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def MatAlloc(row, col):\n", + " p=[[int]*col]*row #dynamic array\n", + " return p\n", + "def MatRelease(p, row):\n", + " for i in range(row):\n", + " del p[i]\n", + " del p\n", + "def MatRead(a, row, col):\n", + " for i in range(row):\n", + " for j in range(col):\n", + " print \"Matrix[\", i, \",\", j, \"] = ? \",\n", + " a[i][j]=int(raw_input())\n", + "def MatMul(a, m, n, b, p, q, c):\n", + " if n!=p:\n", + " print \"Error: Invalid matrix order for multiplication\"\n", + " return\n", + " for i in range(m):\n", + " for j in range(q):\n", + " c[i][j]=0\n", + " for k in range(n):\n", + " c[i][j]+=a[i][k]*b[k][j]\n", + "def MatShow(a, row, col):\n", + " for i in range(row):\n", + " print \"\"\n", + " for j in range(col):\n", + " print a[i][j],\n", + "print \"Enter Matrix A details...\"\n", + "m=int(raw_input(\"How many rows ? \"))\n", + "n=int(raw_input(\"How many columns ? \"))\n", + "a=MatAlloc(m, n)\n", + "MatRead(a, m, n)\n", + "print \"Enter Matrix B details...\"\n", + "p=int(raw_input(\"How many rows ? \"))\n", + "q=int(raw_input(\"How many columns ? \"))\n", + "b=MatAlloc(p, q)\n", + "MatRead(b, p, q)\n", + "c=MatAlloc(m, q)\n", + "MatMul(a, m, n, b, p, q, c)\n", + "print \"Matrix C = A * B ...\",\n", + "MatShow(c, m, q)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Matrix A details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows ? 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns ? 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[ 0 , 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 0 , 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 1 , 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 1 , 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 2 , 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 2 , 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enter Matrix B details...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many rows ? 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "How many columns ? 3\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix[ 0 , 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 0 , 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 0 , 2 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 1 , 0 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 1 , 1 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix[ 1 , 2 ] = ? " + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "1\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Matrix C = A * B ... \n", + "2 2 2 \n", + "2 2 2 \n", + "2 2 2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-3ptr.cpp, Page no-315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "arr=[((2, 1), (3, 6), (5, 3)), ((0, 9), (2, 3), (5, 8))]\n", + "print hex(id(arr))\n", + "print hex(id(arr[0]))\n", + "print hex(id(arr[0][0]))\n", + "print arr[0][0][0]\n", + "print hex(id(arr))\n", + "print hex(id(arr[0]))\n", + "print hex(id(arr[0][1]))\n", + "print arr[0][0][0]+1\n", + "for i in range(2):\n", + " for j in range(3):\n", + " for k in range(2):\n", + " print \"arr[\",i,\"][\", j, \"][\", k, \"] = \", arr[i][j][k]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0x3729e88L\n", + "0x3652ab0L\n", + "0x364e388L\n", + "2\n", + "0x3729e88L\n", + "0x3652ab0L\n", + "0x364e6c8L\n", + "3\n", + "arr[ 0 ][ 0 ][ 0 ] = 2\n", + "arr[ 0 ][ 0 ][ 1 ] = 1\n", + "arr[ 0 ][ 1 ][ 0 ] = 3\n", + "arr[ 0 ][ 1 ][ 1 ] = 6\n", + "arr[ 0 ][ 2 ][ 0 ] = 5\n", + "arr[ 0 ][ 2 ][ 1 ] = 3\n", + "arr[ 1 ][ 0 ][ 0 ] = 0\n", + "arr[ 1 ][ 0 ][ 1 ] = 9\n", + "arr[ 1 ][ 1 ][ 0 ] = 2\n", + "arr[ 1 ][ 1 ][ 1 ] = 3\n", + "arr[ 1 ][ 2 ][ 0 ] = 5\n", + "arr[ 1 ][ 2 ][ 1 ] = 8\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-ptrinc.cpp, Page no-317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ia=[2, 5, 9]\n", + "ptr=ia\n", + "for i in range(3):\n", + " print ptr[i], \n", + " i+=1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 5 9\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-strfunc.cpp, Page no-318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "temp=raw_input(\"Enter string1: \")\n", + "s1=temp\n", + "temp=raw_input(\"Enter string2: \")\n", + "s2=temp\n", + "print \"Length of string1:\", len(s1) #string length\n", + "s3=s1+s2 #string concatenation\n", + "print \"Strings' on concatenation:\", s3\n", + "print \"String comparison using...\"\n", + "print \"Library function:\", s1>s2 # - operator is not supppoertd with string operands in python\n", + "print \"User's function:\", s1>s2# - operator is not supppoertd with string operands in python" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string1: Object\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter string2: Oriented\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Length of string1: 6\n", + "Strings' on concatenation: ObjectOriented\n", + "String comparison using...\n", + "Library function: False\n", + "User's function: False\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-rfact.cpp, Page no-322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def fact(num):\n", + " if num==0:\n", + " return 1\n", + " else:\n", + " return num*fact(num-1)\n", + "ptrfact={}\n", + "ptrfact[0]=fact #function pointer\n", + "n=int(raw_input(\"Enter the number whose factorial is to be found: \"))\n", + "f1=ptrfact[0](n)\n", + "print \"The factorial of\", n, \"is\", f1\n", + "print \"The factorial of\", n+1, \"is\", ptrfact[0](n+1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter the number whose factorial is to be found: 5\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The factorial of 5 is 120\n", + "The factorial of 6 is 720\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-rmain.cpp, Page no-323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#this program will print hello infinite number of times\n", + "def main():\n", + " p={}\n", + " print \"Hello...\",\n", + " p[0]=main #function pointer to main()\n", + " p[0]()\n", + "main()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-passfn.cpp, Page no-324" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def small(a, b):\n", + " return a if ab else b\n", + "def select(fn, x, y):\n", + " value=fn(x, y)\n", + " return value\n", + "ptrf={}\n", + "m, n=[int(x) for x in raw_input(\"Enter two integers: \").split()]\n", + "high=select(large, m, n) #function as parameter\n", + "ptrf[0]=small #function pointer\n", + "low=select(ptrf[0], m, n) #pointer to function as parameter\n", + "print \"Large =\", high\n", + "print \"Small =\", low" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter two integers: 10 20\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Large = 20\n", + "Small = 10\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-bdate.cpp, Page no-326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure, c_int, POINTER\n", + "class date(Structure):\n", + " _fields_=[('data', c_int), ('month', c_int), ('year', c_int)]\n", + " def show(self):\n", + " print '%s-%s-%s' %(self.day, self.month, self.year)\n", + "def read(dp):\n", + " dp.day=int(raw_input(\"Enter day: \"))\n", + " dp.month=int(raw_input(\"Enter month: \"))\n", + " dp.year=int(raw_input(\"Enter year: \"))\n", + "d1=date()\n", + "dp1=POINTER(date)\n", + "dp2=POINTER(date)\n", + "print \"Enter birthday of boy...\"\n", + "read(d1)\n", + "dp2=date()\n", + "print \"Enter birthday of girl...\"\n", + "read(dp2)\n", + "print \"Birth date of boy:\",\n", + "dp1=d1\n", + "dp1.show()\n", + "print \"Birth date of girl:\",\n", + "dp2.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter birthday of boy...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day: 14\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter month: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter year: 71\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter birthday of girl...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter day: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter month: 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter year: 72\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Birth date of boy: 14-4-71\n", + "Birth date of girl: 1-4-72\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-list.cpp, Page no-329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from ctypes import Structure\n", + "class LIST(Structure):\n", + " data=int\n", + " Next=None\n", + "def InsertNode(data, first):\n", + " newnode=LIST()\n", + " newnode.data=data\n", + " newnode.Next=first\n", + " return newnode\n", + "def DeleteNode(data, first):\n", + " current=LIST()\n", + " pred=LIST()\n", + " if first==None:\n", + " print \"Empty list\"\n", + " return first\n", + " pred=current=first\n", + " while(1):\n", + " if current.data==data:\n", + " if current==first:\n", + " first=current.Next\n", + " current=current.Next\n", + " else:\n", + " pred.Next=current.Next\n", + " current=current.Next\n", + " del current\n", + " return first\n", + " current=current.Next\n", + " return first\n", + "def DisplayList(first):\n", + " List=LIST()\n", + " List=first\n", + " while(1): \n", + " print \"->\", List.data,\n", + " if List.Next==None:\n", + " break\n", + " List=List.Next\n", + " print \"\"\n", + "List=LIST()\n", + "List=None\n", + "print \"Linked-list manipulation program...\"\n", + "while(1):\n", + " choice=int(raw_input(\"List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: \"))\n", + " if choice==1:\n", + " data=int(raw_input(\"Enter data for node to be created: \"))\n", + " List=InsertNode(data, List)\n", + " elif choice==2:\n", + " print \"List Contents:\",\n", + " DisplayList(List)\n", + " elif choice==3:\n", + " data=int(raw_input(\"Enter data for node to be delete: \"))\n", + " List=DeleteNode(data, List)\n", + " elif choice==4:\n", + " print \"End of Linked List Computation !!.\"\n", + " break\n", + " else:\n", + " print \"Bad Option Selected\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Linked-list manipulation program...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for node to be created: 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for node to be created: 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for node to be created: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "List Contents: -> 3 -> 7 -> 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enter data for node to be delete: 7\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 2\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "List Contents: -> 3 -> 5 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "stream": "stdout", + "text": [ + "List operation, 1- Insert, 2- Display, 3-Delete, 4-Quit: 4\n" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "End of Linked List Computation !!.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-wild1.cpp, Page no-332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p=[int]*10 #uninitialized integer pointer\n", + "for i in range(10):\n", + " print p[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-wild2.cpp, Page no-332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "name=\"Savithri\"\n", + "print name" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Savithri\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-wild3.cpp, Page no-333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def nameplease():\n", + " name=\"Savithri\"\n", + " return name\n", + "def charplease():\n", + " ch='X'\n", + " return ch\n", + "p1=nameplease()\n", + "p2=charplease()\n", + "print \"Name =\", p1\n", + "print \"Char =\", p2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name = Savithri\n", + "Char = X\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-wild4.cpp, Page no-334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "p1=str\n", + "def temp():\n", + " name=\"Savithri\"\n", + " global p1\n", + " p1=name\n", + "temp()\n", + "print \"Name =\", p1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Name = Savithri\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example-1, Page no-335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Str=\"Programming\"\n", + "count=0\n", + "str_ptr=Str[0]\n", + "while(count+1x[i+1]:\n", + " x[i], x[i+1]=x[i+1], x[i]\n", + " i+=1\n", + " return x\n", + "SIZE=10\n", + "a=[4,59,84,35,9,17,41,19,2,21]\n", + "ptr=a\n", + "temp=ptr\n", + "print \"Given array elements:\"\n", + "for i in range(SIZE):\n", + " print temp[i],\n", + "ptr=sort(ptr)\n", + "temp=ptr\n", + "print \"\\nSorted array elemnets:\"\n", + "for i in range(SIZE):\n", + " print temp[i]," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given array elements:\n", + "4 59 84 35 9 17 41 19 2 21 \n", + "Sorted array elemnets:\n", + "2 4 9 17 19 21 35 41 59 84\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication/screenshots/Chapter01-Ex1.7.1.png b/_Optical_Fiber_Communication/screenshots/Chapter01-Ex1.7.1.png new file mode 100755 index 00000000..4c42636d Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/Chapter01-Ex1.7.1.png differ diff --git a/_Optical_Fiber_Communication/screenshots/Chapter02-Ex2.2.1.png b/_Optical_Fiber_Communication/screenshots/Chapter02-Ex2.2.1.png new file mode 100755 index 00000000..7f5fd635 Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/Chapter02-Ex2.2.1.png differ diff --git a/_Optical_Fiber_Communication/screenshots/Chapter03-Ex3.2.1.png b/_Optical_Fiber_Communication/screenshots/Chapter03-Ex3.2.1.png new file mode 100755 index 00000000..c1f042e9 Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/Chapter03-Ex3.2.1.png differ diff --git a/_Optical_Fiber_Communication/screenshots/chapter2.png b/_Optical_Fiber_Communication/screenshots/chapter2.png new file mode 100755 index 00000000..e8ee191d Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/chapter2.png differ diff --git a/_Optical_Fiber_Communication/screenshots/chapter5.png b/_Optical_Fiber_Communication/screenshots/chapter5.png new file mode 100755 index 00000000..d6fa34e3 Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/chapter5.png differ diff --git a/_Optical_Fiber_Communication/screenshots/chapter6.png b/_Optical_Fiber_Communication/screenshots/chapter6.png new file mode 100755 index 00000000..ac19fe5b Binary files /dev/null and b/_Optical_Fiber_Communication/screenshots/chapter6.png differ diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter01-Fiber_Optics_Communications_System.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter01-Fiber_Optics_Communications_System.ipynb new file mode 100755 index 00000000..ec323da9 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter01-Fiber_Optics_Communications_System.ipynb @@ -0,0 +1,1240 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:742c44cb267900361b88ee7b473acd2b1b40f32a4db7e15db6918955b1159df0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter01:Fiber Optics Communications System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.7.1:Pg-1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "n1= 1.5 # for glass\n", + "n2= 1.33 # for water\n", + "phi1= (math.pi/6) # phi1 is the angel of incidence\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + "sinphi2= (n1/n2)*math.sin(phi1) # phi2 is the angle of refraction..\n", + "phi2 = math.asin(sinphi2)\n", + "temp= math.degrees(phi2)\n", + "print \" The angel of refraction in degrees =\",round(temp,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The angel of refraction in degrees = 34.33\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.2:Pg-1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1= 1.50 # RI of glass..\n", + "n2 = 1.0 # RI of air...\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + " # From definition of critical angel phi2 = 90 degrees and phi1 will be critical angel\n", + "t1=(n2/n1)*math.sin(math.pi/2)\n", + "phiC=math.asin(t1)\n", + "temp= math.degrees(phiC)\n", + "print \" The Critical angel in degrees =\",round(temp,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 41.81\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.3:Pg-1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + " # To find RI of glass\n", + " # To find the critical angle for glass...\n", + " \n", + "phi1 = 33 # Angle of incidence..\n", + "phi2 = 90 # Angle of refraction..\n", + "n2= 1.0 \n", + "\n", + "n1 = round(sin(math.radians(phi2))/sin(math.radians(phi1)),3) \n", + "print \" The Refractive Index is =\",n1 \n", + "\n", + "#phiC = math.asin((n2/n1)*math.sin(90)) \n", + "phiC=math.asin(0.54)\n", + "print \" \\n\\nThe Critical angel in degrees =\",round(math.degrees(phiC),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Refractive Index is = 1.836\n", + " \n", + "\n", + "The Critical angel in degrees = 32.68\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.4:Pg-1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.5 # TheRi of medium 1\n", + "n2= 1.36 # the RI of medium 2\n", + "phi1= 30 # The angle of incidence\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + "phi2 = math.asin((n1/n2)*math.sin(math.radians(phi1))) \n", + "print \" The angel of refraction is in degrees from normal = \",round(math.degrees(phi2),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The angel of refraction is in degrees from normal = 33.47\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.5:Pg-1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "n1 = 3.6 # RI of GaAs..\n", + "n2 = 3.4 # RI of AlGaAs..\n", + "phi1 = 80 # Angle of Incidence..\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + " # At critical angle phi2 = 90...\n", + "phiC = math.asin((n2/n1)*sin(math.radians(90)) )\n", + "print \" The Critical angel in degrees =\",round(math.degrees(phiC),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 70.81\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.1:Pg-1.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "n1= 1.5 # RI of medium 1\n", + "n2 =1.45 # RI of medium 2\n", + "\n", + "delt= (n1-n2)/n1 \n", + "NA = n1*(math.sqrt(2*delt)) \n", + "print \" The Numerical aperture =\",round(NA,2)\n", + "phiA = math.asin(NA) \n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n", + "\n", + "phiC = math.asin(n2/n1) \n", + "print \" \\n\\nThe Critical angel in degrees =\",round(degrees(phiC),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical aperture = 0.39\n", + " \n", + "\n", + "The Acceptance angel in degrees = 22.79\n", + " \n", + "\n", + "The Critical angel in degrees = 75.16\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.2:Pg-1.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "n1= 1.5 # RI of core\n", + "n2 = 1.48 # RI of cladding..\n", + "\n", + "NA = math.sqrt((n1**2)-(n2**2)) \n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "\n", + "phiA = math.asin(NA) \n", + "print \" \\n\\nThe Critical angel =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.24\n", + " \n", + "\n", + "The Critical angel = 14.13\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.3:Pg-1.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + " \n", + "\n", + "NA = 0.35 # Numerical Aperture\n", + "delt = 0.01 \n", + " # NA= n1*(math.sqrt(2*delt) n1 is RI of core\n", + "n1 = 0.35/(math.sqrt(2*delt)) \n", + "print \"The RI of core =\",round(n1,4) \n", + "\n", + " # Numerical Aperture is also given by \n", + " # NA = math.sqrt(n1**2 - n2**2) # n2 is RI of cladding\n", + "n2 = math.sqrt((n1**2-NA**2)) \n", + "print \" \\n\\nThe RI of Cladding =\",round(n2,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The RI of core = 2.4749\n", + " \n", + "\n", + "The RI of Cladding = 2.45\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.4:Pg-1.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "Vc = 2.01*10**8 # velocity of light in core in m/sec...\n", + "phiC= 80.0 # Critical angle in degrees...\n", + "\n", + " # RI of Core (n1) is given by (Velocity of light in air/ velocity of light in air)...\n", + "n1= 3*10**8/Vc \n", + " # From critical angle and the value of n1 we calculate n2...\n", + "n2 = sin(math.radians(phiC))*n1 # RI of cladding...\n", + "NA = math.sqrt(n1**2-n2**2) \n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "phiA = math.asin(NA) # Acceptance angle...\n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.26\n", + " \n", + "\n", + "The Acceptance angel in degrees = 15.02\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.5:Pg-1.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1 = 1.4 # RI of Core..\n", + "n2 = 1.35 # RI of Cladding\n", + "\n", + "phiC = math.asin(n2/n1) # Critical angle..\n", + "print \" The Critical angel in degrees =\",round(math.degrees(phiC),2) \n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # numerical Aperture...\n", + "print \" \\n\\nThe Numerical Aperture is =\",round(NA,2) \n", + "\n", + "phiA = math.asin(NA) # Acceptance angle... \n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 74.64\n", + " \n", + "\n", + "The Numerical Aperture is = 0.37\n", + " \n", + "\n", + "The Acceptance angel in degrees = 21.77\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.6:Pg-1.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1 = 1.48 # RI of core..\n", + "n2 = 1.46 # RI of Cladding..\n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "print \" The Numerical Aperture is =\",round(NA,3) \n", + "\n", + "theta = math.pi*NA**2 # The entrance angle theta..\n", + "print \" \\n\\nThe Entrance angel in degrees =\",round(theta,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture is = 0.242\n", + " \n", + "\n", + "The Entrance angel in degrees = 0.185\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.7:Pg-1.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "delt = 0.007 # relative refractive index difference \n", + "n1 = 1.45 # RI of core...\n", + "NA = n1* math.sqrt((2*delt)) \n", + "print \" The Numerical Aperture is =\",round(NA,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture is = 0.1716\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.8:Pg-1.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + "\n", + "phiA = 8 # accepatance angle in degrees...\n", + "n1 =1.52 # RI of core...\n", + "\n", + "NA = sin(math.radians(phiA)) # Numerical Aperture...\n", + "\n", + "delt = NA**2/(2*(n1**2)) # Relative RI difference...\n", + "print \" The relative refractive index difference =\",round(delt,5) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The relative refractive index difference = 0.00419\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.9.9:Pg-1.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "delt = 0.01 # relative RI difference..\n", + "n1 = 1.48 # RI of core...\n", + "\n", + "NA = n1*(math.sqrt(2*delt)) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,3) \n", + "\n", + "theta = math.pi*NA**2 # Solid Acceptance angle...\n", + "print \" \\n\\nThe Solid Acceptance angel in degrees =\",round(theta,4) \n", + "\n", + "n2 = (1-delt)*n1 \n", + "phiC = math.asin(n2/n1) # Critical Angle...\n", + "print \" \\n\\nThe Critical angel in degrees =\",round(math.degrees(phiC),2) \n", + "print \" \\n\\nCritical angle wrong due to rounding off errors in trignometric functions..\\n Actual value is 90.98 in book.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.209\n", + " \n", + "\n", + "The Solid Acceptance angel in degrees = 0.1376\n", + " \n", + "\n", + "The Critical angel in degrees = 81.89\n", + " \n", + "\n", + "Critical angle wrong due to rounding off errors in trignometric functions..\n", + " Actual value is 90.98 in book.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.1:Pg-1.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "d = 50*10**-6 # diameter of fibre...\n", + "n1 = 1.48 # RI of core..\n", + "n2 = 1.46 # RI of cladding..\n", + "lamda = 0.82*10**-6 # wavelength of light..\n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "Vn= math.pi*d*NA/lamda # normalised frequency...\n", + "M = Vn**2/2 # number of modes...\n", + "print \" The number of modes in the fibre are =\",int(M) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of modes in the fibre are = 1078\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.2:Pg-1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + " \n", + "V = 26.6 # Normalised frequency..\n", + "lamda = 1300*10**-9 # wavelenght of operation\n", + "a = 25*10**-6 # radius of fibre.\n", + "NA = V*lamda/(2*math.pi*a) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.22\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.3:Pg-1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "a = 40*10**-6 # radius of core...\n", + "delt = 0.015 # relative RI difference..\n", + "lamda= 0.85*10**-6 # wavelength of operation..\n", + "n1=1.48 # RI of core..\n", + "\n", + "NA = n1*math.sqrt(2*delt) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\", round(NA,4) \n", + "V = 2*math.pi*a*NA/lamda # normalised frequency\n", + "print \" \\n\\nThe Normalised frequency =\",round(V,2) \n", + "\n", + "M = V**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.2563\n", + " \n", + "\n", + "The Normalised frequency = 75.8\n", + " \n", + "\n", + "The number of modes in the fibre are = 2872\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.4:Pg-1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "NA = 0.20 # Numerical Aperture..\n", + "M = 1000 # number of modes..\n", + "lamda = 850*10**-9 # wavelength of operation..\n", + "\n", + "a = math.sqrt(M*2*lamda**2/(math.pi**2*NA**2)) # radius of core..\n", + "a=a*10**6 # converting in um for displaying...\n", + "print \" The radius of the core in um =\",round(a,2) \n", + "a=a*10**-6 \n", + "M1= ((math.pi*a*NA/(1320*10**-9))**2)/2\n", + "print \" \\n\\nThe number of modes in the fibre at 1320um =\",int(M1) \n", + "print \" \\n\\n***The number of modes in the fibre at 1320um is calculated wrongly in book\" \n", + "M2= ((math.pi*a*NA/(1550*10**-9))**2)/2\n", + "print \" \\n\\nThe number of modes in the fibre at 1550um =\",int(M2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of the core in um = 60.5\n", + " \n", + "\n", + "The number of modes in the fibre at 1320um = 414\n", + " \n", + "\n", + "***The number of modes in the fibre at 1320um is calculated wrongly in book\n", + " \n", + "\n", + "The number of modes in the fibre at 1550um = 300\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.5:Pg-1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "NA = 0.2 # Numerical Aperture..\n", + "n2= 1.59 # RI of cladding..\n", + "n0= 1.33 # RI of water..\n", + "lamda = 1300*10**-9 # wavelength..\n", + "a = 25*10**-6 # radius of core..\n", + "n1 = math.sqrt(NA**2+n2**2) # RI of core..\n", + "phiA= math.asin(math.sqrt(n1**2-n2**2)/n0) # Acceptance angle..\n", + "print \" The Acceptance angle is =\",round(math.degrees(phiA),2) \n", + "\n", + "phiC= math.asin(n2/n1) # Critical angle..\n", + "print \" \\n\\nThe critical angle is =\",round(math.degrees(phiC),2) \n", + "V = 2*math.pi*a*NA/lamda # normalisd frequency\n", + "M= V**2/2 # number of modes\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n", + "\n", + "print \" \\n\\n***The value of the angle differ from the book because of round off errors.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Acceptance angle is = 8.65\n", + " \n", + "\n", + "The critical angle is = 82.83\n", + " \n", + "\n", + "The number of modes in the fibre are = 292\n", + " \n", + "\n", + "***The value of the angle differ from the book because of round off errors.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.6:Pg-1.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "V= 26.6 # Normalised frequency..\n", + "lamda= 1300*10**-9 # wavelength of operation..\n", + "a= 25*10**-6 # radius of core..\n", + "\n", + "NA = V*lamda/(2*math.pi*a) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "theta = math.pi*NA**2 # solid Acceptance Angle..\n", + "print \" \\n\\nThe solid acceptance angle in radians =\",round(theta,3) \n", + "\n", + "M= V**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.22\n", + " \n", + "\n", + "The solid acceptance angle in radians = 0.152\n", + " \n", + "\n", + "The number of modes in the fibre = 353.78\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.7:Pg-1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "n1= 1.49 # RI of core.\n", + "n2=1.47 # RI of cladding..\n", + "a= 2 # radius of core in um..\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + " # The maximum V number for single mode operation is 2.4...\n", + "V= 2.4 # Normalised frequency..\n", + "\n", + "lamda = 2*math.pi*a*NA/V # Cutoff wavelength...\n", + "print \" The cutoff wavelength in um =\",round(lamda,2) \n", + "\n", + "\n", + "lamda1 = 1.310 # Givenn cutoff wavelength in um..\n", + "d= V*lamda1/(math.pi*NA) # core diameter..\n", + "print \" \\n\\nThe core diameter in um =\",round(d,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cutoff wavelength in um = 1.27\n", + " \n", + "\n", + "The core diameter in um = 4.11\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.8:Pg-1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.48 # RI of core..\n", + "a= 4.5 # core radius in um..\n", + "delt= 0.0025 # Relative RI difference..\n", + "V= 2.405 # For step index fibre..\n", + "lamda= (2*math.pi*a*n1*math.sqrt(2*delt))/V # cutoff wavelength..\n", + "print \" The cutoff wavelength in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cutoff wavelength in um = 1.23\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.9:Pg-1.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + " \n", + "lamda= 0.82*10**-6 # wavelength ofoperation.\n", + "a= 2.5*10**-6 # Radius of core..\n", + "n1= 1.48 # RI of core..\n", + "n2= 1.46 # RI of cladding\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "V= 2*math.pi*a*NA/lamda # Normalisd frequency..\n", + "print \" The normalised frequency =\",round(V,3) \n", + "M= V**2/2 # The number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The normalised frequency = 4.645\n", + " \n", + "\n", + "The number of modes in the fibre are = 10.79\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.10:Pg-1.49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "delt= 0.01 # Relative RI difference..\n", + "n1= 1.5 \n", + "M= 1100 # Number of modes...\n", + "lamda= 1.3 # wavelength of operation in um..\n", + "V= math.sqrt(2*M) # Normalised frequency...\n", + "d= V*lamda/(math.pi*n1*math.sqrt(2*delt)) # diameter of core..\n", + "print \" The diameter of the core in um =\",round(d,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the core in um = 91.5\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.11:Pg-1.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1= 1.5 # RI of core..\n", + "n2= 1.38 # RI of cladding..\n", + "a= 25*10**-6 # radius of core..\n", + "lamda= 1300*10**-9 # wavelength of operation...\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "print \" The Numerical Aperture of the given fibre =\",round(NA,4) \n", + "V= 2*math.pi*a*NA/lamda # Normalised frequency..\n", + "print \" \\n\\nThe normalised frequency =\",round(V,2) \n", + "theta= math.asin(NA) # Solid acceptance anglr..\n", + "print \" \\n\\nThe Solid acceptance angle in degrees =\",int(math.degrees(theta)) \n", + "M= V**2/2 # Number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n", + "print \" \\n\\n***Number of modes wrongly calculated in the book..\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture of the given fibre = 0.5879\n", + " \n", + "\n", + "The normalised frequency = 71.03\n", + " \n", + "\n", + "The Solid acceptance angle in degrees = 36\n", + " \n", + "\n", + "The number of modes in the fibre are = 2522\n", + " \n", + "\n", + "***Number of modes wrongly calculated in the book..\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.12:Pg-1.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "lamda= 850*10**-9 # wavelength of operation.\n", + "a= 25*10**-6 # Radius of core\n", + "n1= 1.48 # RI of Core...\n", + "n2= 1.46 # RI of cladding..\n", + "\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture\n", + "\n", + "V= 2*math.pi*a*NA/lamda # Normalised frequency..\n", + "print \" The normalised frequency =\",round(V,2) \n", + "\n", + "lamda1= 1320*10**-9 # wavelength changed...\n", + "V1= 2*math.pi*a*NA/lamda1 # Normalised frequency at new wavelength..\n", + "\n", + "M= V1**2/2 # Number of modes at new wavelength..\n", + "print \" \\n\\nThe number of modes in the fibre at 1320um =\",int(M) \n", + "lamda2= 1550*10**-9 # wavelength 2...\n", + "V2= 2*math.pi*a*NA/lamda2 # New normalised frequency..\n", + "M1= V2**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre at 1550um =\",int(M1 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The normalised frequency = 44.81\n", + " \n", + "\n", + "The number of modes in the fibre at 1320um = 416\n", + " \n", + "\n", + "The number of modes in the fibre at 1550um = 301\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.1:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "n1= 1.48 # RI of core..\n", + "delt= 0.015 # relative RI differencr..\n", + "lamda= 0.85 # wavelength of operation..\n", + "V= 2.4 # for single mode of operation..\n", + "\n", + "a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..\n", + "print \" The raduis of core in um =\",round(a,2) \n", + "print \" \\n\\nThe maximum possible core diameter in um =\",round(2*a,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The raduis of core in um = 1.27\n", + " \n", + "\n", + "The maximum possible core diameter in um = 2.53\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.2:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.5 # RI of core..\n", + "delt= 0.01 # Relative RI difference...\n", + "lamda= 1.3 # Wavelength of operation...\n", + "V= 2.4*math.sqrt(2) # Maximum value of V for GRIN...\n", + "a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..\n", + "print \" The radius of core in um =\",round(a,2) \n", + "print \" \\n\\nThe maximum possible core diameter in um =\",round(2*a,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of core in um = 3.31\n", + " \n", + "\n", + "The maximum possible core diameter in um = 6.62\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.3:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "n1= 1.46 # RI of core..\n", + "a = 4.5 # radius of core in um..\n", + "delt= 0.0025 # relative RI difference..\n", + "V= 2.405 # Normalisd frequency for single mode..\n", + "lamda= 2*math.pi*a*n1*math.sqrt(2*delt)/V # cutoff wavelength...\n", + "print \" The cut off wavelength for the given fibre in um =\",round(lamda,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cut off wavelength for the given fibre in um = 1.214\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter02-Optical_Fiber_for_Telecommunication.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter02-Optical_Fiber_for_Telecommunication.ipynb new file mode 100755 index 00000000..46a8893c --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter02-Optical_Fiber_for_Telecommunication.ipynb @@ -0,0 +1,945 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:211878047ac07bbe36923a59422db9a2025fd46f216dee8cd476326a7778bb6a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter02: Optical Fiber for Telecommunication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Ex2.2.1:Pg-2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "alpha= 3 # average loss Power decreases by 50% so P(0)/P(z)= 0.5\n", + "lamda= 900*10**-9 # wavelength\n", + "z= 10*math.log10(0.5)/alpha # z is the length\n", + "z= z*-1 \n", + "print \" The length over which power decreases by 50% in Kms= \",round(z,2) \n", + "\n", + "z1= 10*math.log10(0.25)/alpha # Power decreases by 75% so P(0)/P(z)= 0.25\n", + "z1=z1*-1 # as distance cannot be negative...\n", + "print \" \\n\\nThe length over which power decreases by 75% in Kms= \",round(z1,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The length over which power decreases by 50% in Kms= 1.0\n", + " \n", + "\n", + "The length over which power decreases by 75% in Kms= 2.01\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.2:Pg-2.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "\n", + "z=30.0 # Length of the fibre in kms\n", + "alpha= 0.8 # in dB\n", + "P0= 200.0 # Power launched in uW\n", + "pz= P0/10**(alpha*z/10) \n", + "print \" The output power in uW =\",round(pz,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The output power in uW = 0.7962\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.3:Pg-2.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "z=8.0 # fibre length\n", + "p0= 120*10**-6 # power launched\n", + "pz= 3*10**-6 \n", + "alpha= 10*math.log10(p0/pz) # overall attenuation\n", + "print \" The overall attenuation in dB =\",round(alpha,2) \n", + "alpha = alpha/z # attenuation per km\n", + "alpha_new= alpha *10 # attenuation for 10kms\n", + "total_attenuation = alpha_new + 9 # 9dB because of splices\n", + "print \" \\n\\nThe total attenuation in dB =\",int(total_attenuation) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall attenuation in dB = 16.02\n", + " \n", + "\n", + "The total attenuation in dB = 29\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.4:Pg-2.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + " \n", + "z=12.0 # fibre length\n", + "alpha = 1.5 \n", + "p0= 0.3 \n", + "pz= p0/10**(alpha*z/10) \n", + "pz=pz*1000 # formatting pz in nano watts...\n", + "print \" The power at the output of the cable in W = \",round(pz,2),\"x 10^-9\" \n", + "alpha_new= 2.5 \n", + "pz=pz/1000 # pz in uWatts...\n", + "p0_new= 10**(alpha_new*z/10)*pz \n", + "print \" \\n\\nThe Input power in uW= \",round(p0_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power at the output of the cable in W = 4.75 x 10^-9\n", + " \n", + "\n", + "The Input power in uW= 4.75\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.5:Pg-2.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "p0=150*10**-6 # power input\n", + "z= 10.0 # fibre length in km\n", + "pz= -38.2 # in dBm...\n", + "pz= 10**(pz/10)*1*10**-3 \n", + "alpha_1= 10/z *math.log10(p0/pz) # attenuation in 1st window\n", + "print \" Attenuation is 1st window in dB/Km =\",round(alpha_1,2) \n", + "alpha_2= 10/z *math.log10(p0/(47.5*10**-6)) # attenuation in 2nd window\n", + "print \" \\n\\nAttenuation is 2nd window in dB/Km =\",round(alpha_2,2) \n", + "alpha_3= 10/z *math.log10(p0/(75*10**-6)) # attenuation in 3rd window\n", + "print \" \\n\\nAttenuation is 3rd window in dB/Km =\",round(alpha_3,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Attenuation is 1st window in dB/Km = 3.0\n", + " \n", + "\n", + "Attenuation is 2nd window in dB/Km = 0.5\n", + " \n", + "\n", + "Attenuation is 3rd window in dB/Km = 0.3\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex2.2.6:Pg-2.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "p0=3*10**-3 \n", + "pz=3*10**-6 \n", + "alpha= 0.5 \n", + "z= math.log10(p0/pz)/(alpha/10) \n", + "print \" The Length of the fibre in Km =\",int(z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Length of the fibre in Km = 60\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.7:Pg-2.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "z= 10.0 \n", + "p0= 100*10**-6 # input power\n", + "pz=5*10**-6 # output power\n", + "alpha = 10*math.log10(p0/pz) # total attenuation\n", + "print \" The overall signal attenuation in dB = \",round(alpha,2) \n", + "alpha = alpha/z # attenuation per km\n", + "print \" \\n\\nThe attenuation per Km in dB/Km = \",round(alpha,2)\n", + "z_new = 12.0 \n", + "splice_attenuation = 11*0.5 \n", + "cable_attenuation = alpha*z_new \n", + "total_attenuation = splice_attenuation+cable_attenuation \n", + "print \" \\n\\nThe overall signal attenuation for 12Kms in dB = \",round(total_attenuation,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall signal attenuation in dB = 13.01\n", + " \n", + "\n", + "The attenuation per Km in dB/Km = 1.3\n", + " \n", + "\n", + "The overall signal attenuation for 12Kms in dB = 21.1\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.8:Pg-2.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Tf = 1400.0 # fictive temperature\n", + "BETA = 7*10**-11 \n", + "n= 1.46 # RI \n", + "p= 0.286 # photo elastic constant\n", + "Kb = 1.381*10**-23 # Boltzmann's constant\n", + "lamda = 850*10**-9 # wavelength\n", + "alpha_scat = 8*math.pi**3*n**8*p**2*Kb*Tf*BETA/(3*lamda**4) \n", + "l= 1000 # fibre length\n", + "TL = exp(-alpha_scat*l) # transmission loss\n", + "attenuation = 10*math.log10(1/TL) \n", + "print \" The attenuation in dB/Km =\",round(attenuation,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The attenuation in dB/Km = 1.572\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3.1:Pg-2.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "alpha = 2 \n", + "n1= 1.5 \n", + "a= 25*10**-6 \n", + "lamda= 1.3*10**-6 \n", + "M= 0.5 \n", + "NA= math.sqrt(0.5*2*1.3**2/(math.pi**2*25**2)) \n", + "Rc= 3*n1**2*lamda/(4*math.pi*NA**3) \n", + "Rc=Rc*1000 # converting into um.....\n", + "print \" The radius of curvature in um =\",round(Rc,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of curvature in um = 153.98\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.1:Pg-2.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 850 *10**-9 \n", + "sigma= 45*10**-9 \n", + "L= 1 \n", + "M= 0.025/(3*10**5*lamda) \n", + "sigma_m= sigma*L*M \n", + "sigma_m= sigma_m*10**9 # formatting in ns/km....\n", + "print \" The Pulse spreading in ns/Km =\",round(sigma_m,2) \n", + "print \" \\n\\nNOTE*** - The answer in text book is wrongly calculated..\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse spreading in ns/Km = 4.41\n", + " \n", + "\n", + "NOTE*** - The answer in text book is wrongly calculated..\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.2:Pg-2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda= 2*10**-9 \n", + "sigma = 75 \n", + "D_mat= 0.03/(3*10**5*2) \n", + "sigma_m= 2*1*D_mat \n", + "sigma_m=sigma_m*10**9 # Fornamtting in ns/Km\n", + "print \" The Pulse spreading in ns/Km =\",int(sigma_m)\n", + "D_mat_led= 0.025/(3*10**5*1550) \n", + "sigma_m_led = 75*1*D_mat_led*10**9 # in ns/Km\n", + "print \" \\n\\nThe Pulse spreading foe LED is ns/Km =\",round(sigma_m_led,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse spreading in ns/Km = 100\n", + " \n", + "\n", + "The Pulse spreading foe LED is ns/Km = 4.03\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.3:Pg-2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 850 \n", + "sigma= 20 \n", + "D_mat = 0.055/(3*10**5*lamda) \n", + "sigma_m= sigma*1*D_mat \n", + "D_mat=D_mat*10**12 # in Ps...\n", + "sigma_m=sigma_m*10**9 # in ns # # \n", + "print \" The material Dispersion in Ps/nm-Km =\",round(D_mat,2) \n", + "print \" \\n\\nThe Pulse spreading in ns/Km =\",round(sigma_m,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The material Dispersion in Ps/nm-Km = 215.69\n", + " \n", + "\n", + "The Pulse spreading in ns/Km = 4.3137\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.4:Pg-2.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n2= 1.48 \n", + "dele = 0.2 \n", + "lamda = 1320 \n", + "Dw = -n2*dele*0.26/(3*10**5*lamda) \n", + "Dw=Dw*10**10 # converting in math.picosecs....\n", + "print \" The waveguide dispersion in math.picosec/nm.Km =\",round(Dw,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The waveguide dispersion in math.picosec/nm.Km = -1.943\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.1:Pg-2.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L= 12 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L # Pulse broadening\n", + "dele=dele*10**9 # converting in ns...\n", + "print \" \\n\\nThe pulse broadening per unit length in ns/Km =\",round(dele,2) \n", + "BLP= B_opt*L # BW length product\n", + "print \" \\n\\nThe Bandwidth-Length Product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The pulse broadening per unit length in ns/Km = 8.33\n", + " \n", + "\n", + "The Bandwidth-Length Product in MHz.Km = 60\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.2:Pg-2.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L= 10.0 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L \n", + "dele=dele/10**-6 # converting in us...\n", + "print \" \\n\\nThe dispersion per unit length in us/Km =\",round(dele,2) \n", + "BLP= B_opt*L \n", + "print \" \\n\\nThe Bandwidth-Length product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The dispersion per unit length in us/Km = 0.01\n", + " \n", + "\n", + "The Bandwidth-Length product in MHz.Km = 50\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.3:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L=15 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L*10**9 # in ns...\n", + "print \" \\n\\nThe dispersion per unit length in ns/Km =\",round(dele,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The dispersion per unit length in ns/Km = 6.67\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.4:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 0.85*10**-6 \n", + "rms_spect_width = 0.0012*lamda \n", + "sigma_m= rms_spect_width*1*98.1*10**-3 \n", + "sigma_m=sigma_m*10**9 # converting in ns...\n", + "print \" The Pulse Broadening due to material dispersion in ns/Km =\",round(sigma_m,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse Broadening due to material dispersion in ns/Km = 0.1\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.5:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "L= 5.0 # in KM\n", + "n1= 1.5 \n", + "dele= 0.01 \n", + "c= 3*10**8 # in m/s\n", + "delta_t = (L*n1*dele)/c \n", + "delta_t=delta_t*10**12 # convertin to nano secs...\n", + "print \" The delay difference in ns =\",round(delta_t,1)\n", + "sigma= L*n1*dele/(2*math.sqrt(3)*c) \n", + "sigma=sigma*10**12 # convertin to nano secs...\n", + "print \" \\n\\nThe r.m.s pulse broadening in ns =\",round(sigma,2) \n", + "B= 0.2/sigma*1000 # in Mz\n", + "print \" \\n\\nThe maximum bit rate in MBits/sec =\",round(B,2) \n", + "BLP = B*5 \n", + "print \" \\n\\nThe Bandwidth-Length in MHz.Km =\",round(BLP,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The delay difference in ns = 250.0\n", + " \n", + "\n", + "The r.m.s pulse broadening in ns = 72.17\n", + " \n", + "\n", + "The maximum bit rate in MBits/sec = 2.77\n", + " \n", + "\n", + "The Bandwidth-Length in MHz.Km = 13.86\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.6:Pg-2.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "del_t_inter = 5*1 \n", + "del_t_intra = 50*80*1 \n", + "total_dispersion = math.sqrt(5**2 + 0.4**2) \n", + "print \" Total dispersion in ns =\",round(total_dispersion,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total dispersion in ns = 5.016\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.1:Pg-2.37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L=15 \n", + "dele= t/L*10**9 # convertin to nano secs...\n", + "print \" The Pulse Dispersion in ns =\",round(dele,2) \n", + "B_opt= 1/(2*t)/10**6 # convertin to nano secs...\n", + "print \" \\n\\n The maximum possible Bandwidth in MHz =\",int(B_opt) \n", + "BLP = B_opt*L \n", + "print \" \\n\\nThe BandwidthLength product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse Dispersion in ns = 6.67\n", + " \n", + "\n", + " The maximum possible Bandwidth in MHz = 5\n", + " \n", + "\n", + "The BandwidthLength product in MHz.Km = 75\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.2:Pg-2.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L= 6 \n", + "n1= 1.5 \n", + "delt= 0.01 \n", + "delta_t = L*n1*delt/(3*10**8)*10**12 # convertin to nano secs...\n", + "print \" The delay difference in ns =\",int(delta_t) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The delay difference in ns = 300\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.3:Pg-2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Lb= 0.09 \n", + "lamda= 1.55*10**-6 \n", + "delta_lamda = 1*10**-9 \n", + "Bf= lamda/Lb \n", + "Lbc= lamda**2/(Bf*delta_lamda) \n", + "print \" The modal Bifriengence in meters =\",round(Lbc,2) \n", + "beta_xy= 2*math.pi/Lb \n", + "print \" \\n\\nThe difference between propogation constants =\",round(beta_xy,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The modal Bifriengence in meters = 139.5\n", + " \n", + "\n", + "The difference between propogation constants = 69.81\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.4:Pg-2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "t= 0.1*10**-6 \n", + "B_opt= 1/(2*t)/1000000 \n", + "print \" The maximum possible Bandwidth in MHz =\",int(B_opt) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum possible Bandwidth in MHz = 5\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.5:Pg-2.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "t= 0.1*10**-6 \n", + "B_opt= 1/(2*t)/1000000 \n", + "print \" The maximum possible Bandwidth in MHz =\",int(B_opt) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum possible Bandwidth in MHz = 5\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter03-Optical_Sources_and_Transmitters.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter03-Optical_Sources_and_Transmitters.ipynb new file mode 100755 index 00000000..1e7a6431 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter03-Optical_Sources_and_Transmitters.ipynb @@ -0,0 +1,826 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c5868fa547e8a659e03148d4a7bf0c9a34282713a490e0b68c5b0aa98a2f7e8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter03:Optical Sources and Transmitters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.1:Pg-3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x= 0.07 \n", + "Eg= 1.424+1.266*x+0.266*x**2 \n", + "lamda= 1.24/Eg \n", + "print \" The emitted wavelength in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The emitted wavelength in um = 0.82\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.2:Pg-3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x= 0.26 \n", + "y=0.57 \n", + "Eg= 1.35-0.72*y+0.12*y**2 \n", + "lamda = 1.24/Eg \n", + "print \" The wavelength emitted in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The wavelength emitted in um = 1.27\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.3:Pg-3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Tr = 60*10**-9 # radiative recombination time\n", + "Tnr= 90*10**-9 # non radiative recomb time\n", + "I= 40*10**-3 # current\n", + "t = Tr*Tnr/(Tr+Tnr) # total recomb time\n", + "t=t*10**9 # Converting in nano secs...\n", + "print \" The total carrier recombination life time in ns =\",int(t) \n", + "t=t/10**9 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "lamda= 0.87*10**-6 \n", + "Pint=(t/Tr)*((h*c*I)/(q*lamda)) \n", + "Pint=Pint*1000 # converting inmW...\n", + "print \" \\n\\nThe Internal optical power in mW =\",round(Pint,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total carrier recombination life time in ns = 36\n", + " \n", + "\n", + "The Internal optical power in mW = 34.22\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.4:Pg-3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 1310*10**-9 \n", + "Tr= 30*10**-9 \n", + "Tnr= 100*10**-9 \n", + "I= 40*10**-3 \n", + "t= Tr*Tnr/(Tr+Tnr) \n", + "t=t*10**9 # converting in nano secs...\n", + "print \" Bulk recombination life time in ns =\",round(t,2) \n", + "t=t/10**9 \n", + "n= t/Tr \n", + "print \" \\n\\nInternal quantum efficiency =\",round(n,3) \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "Pint=(0.769*h*c*I)/(q*lamda)*1000 \n", + "print \" \\n\\nThe internal power level in mW =\",round(Pint,3) \n", + "print \" \\n\\n***NOTE: Internal Power wrong in text book.. Calculation Error..\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bulk recombination life time in ns = 23.08\n", + " \n", + "\n", + "Internal quantum efficiency = 0.769\n", + " \n", + "\n", + "The internal power level in mW = 29.131\n", + " \n", + "\n", + "***NOTE: Internal Power wrong in text book.. Calculation Error..\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.5:Pg-3.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "nx= 3.6 \n", + "TF= 0.68 \n", + "n= 0.3 \n", + " # Pe=Pint*TF*1/(4*nx**2) \n", + " # ne= Pe/Px*100 ..eq0\n", + " # Pe = 0.013*Pint # Eq 1\n", + " # Pint = n*P # Eq 2\n", + " # substitute eq2 and eq1 in eq0\n", + "ne = 0.013*0.3*100 \n", + "print \" The external Power efficiency in % =\",round(ne,3) \n", + " # Wrongly printed in textbook. it should be P instead of Pint in last step\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The external Power efficiency in % = 0.39\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.6:Pg-3.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda= 0.85*10**-6 \n", + "Nint = 0.60 \n", + "I= 20*10**-3 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "e=1.602*10**-19 \n", + "Pint = Nint*h*c*I/(e*lamda) \n", + "print \" The optical power emitted in W =\",round(Pint,4) \n", + "\n", + "TF= 0.68 \n", + "nx= 3.6 \n", + "Pe= Pint*TF/(4*nx**2)*1000000 \n", + "print \" \\n\\nPower emitted in the air in uW =\",round(Pe,1) \n", + "Pe=Pe/1000000 \n", + "Nep=Pe/Pint*100 \n", + "print \" \\n\\nExternal power efficiency in % =\",round(Nep,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical power emitted in W = 0.0175\n", + " \n", + "\n", + "Power emitted in the air in uW = 229.7\n", + " \n", + "\n", + "External power efficiency in % = 1.3\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.7:Pg-3.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 0.87*10**-6 \n", + "Tr= 50*10**-9 \n", + "I= 0.04 \n", + "Tnr= 110*10**-9 \n", + "t= Tr*Tnr/(Tr+Tnr) \n", + "t=t*10**9 # converting in ns...\n", + "print \" Total carrier recombination life time in ns =\",round(t,2) \n", + "t=t/10**9 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "n= t/Tr \n", + "print \" \\n\\nThe efficiency in % \",round(n,3) \n", + "Pint=(n*h*c*I)/(q*lamda)*1000 \n", + "print \" \\n\\nInternal power generated in mW =\",round(Pint,2) \n", + "print \" \\n\\n***NOTE- Internal Power wrong in book... \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total carrier recombination life time in ns = 34.38\n", + " \n", + "\n", + "The efficiency in % 0.688\n", + " \n", + "\n", + "Internal power generated in mW = 39.22\n", + " \n", + "\n", + "***NOTE- Internal Power wrong in book... \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.8:Pg-3.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + " \n", + "\n", + "V= 2 \n", + "I= 100*10**-3 \n", + "Pc= 2*10**-3 \n", + "P= V*I \n", + "Npc= Pc/P*100 \n", + "print \" The overall power conversion efficiency in % =\",int(Npc) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall power conversion efficiency in % = 1\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.1:Pg-3.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "r1= 0.32 \n", + "r2= 0.32 \n", + "alpha= 10 \n", + "L= 500*10**-4 \n", + "temp=math.log(1/(r1*r2)) \n", + "Tgth = alpha + (temp/(2*L)) \n", + "print \" The optical gain at threshold in /cm =\",round(Tgth,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical gain at threshold in /cm = 32.79\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.2:Pg-3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + " \n", + "n= 3.7 \n", + "lamda = 950*10**-9 \n", + "L= 500*10**-6 \n", + "c= 3*10**8 \n", + "DELv = c/(2*L*n)*10*10**-10 # converting in GHz...\n", + "print \" The frequency spacing in GHz =\",int(DELv) \n", + "DEL_lamda= lamda**2/(2*L*n)*10**9 # converting to nm..\n", + "print \" \\n\\nThe wavelength spacing in nm =\",round(DEL_lamda,2) \n", + "\n", + "print \" \\n\\n***NOTE- The value of wavelength taken wrongly in book\" \n", + " # value of lamda taken wrongly while soving for DEL_LAMDA inthe book..\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The frequency spacing in GHz = 81\n", + " \n", + "\n", + "The wavelength spacing in nm = 0.24\n", + " \n", + "\n", + "***NOTE- The value of wavelength taken wrongly in book\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.3:Pg-3.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given\n", + " \n", + "L= 0.04 \n", + "n= 1.78 \n", + "lamda= 0.55*10**-6 \n", + "c= 3*10**8 \n", + "q= 2*n*L/lamda \n", + "q=q/10**5 \n", + "print \" Number of longitudinal modes =\",round(q,2),\"x 10^5\" \n", + "del_f= c/(2*n*L) \n", + "del_f=del_f*10**-9 \n", + "print \" \\n\\nThe frequency seperation in GHz =\",round(del_f,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Number of longitudinal modes = 2.59 x 10^5\n", + " \n", + "\n", + "The frequency seperation in GHz = 2.1\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.4:Pg-3.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Nt= 0.18 \n", + "V= 2.5 \n", + "Eg= 1.43 \n", + "Nep= Nt*Eg*100/V \n", + "print \" The total efficiency in % =\",round(Nep,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total efficiency in % = 10.296\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.5:Pg-3.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 3.6 \n", + "BETA= 21*10**-3 \n", + "alpha= 10 \n", + "L= 250*10**-4 \n", + "\n", + "r= (n-1)**2/(n+1)**2 \n", + "Jth= 1/BETA *( alpha + (math.log(1/r)/L)) \n", + "Jth=Jth/1000 # converting for displaying...\n", + "print \" The threshold current density =\",round(Jth,3),\"x 10**3\" \n", + "Jth=Jth*1000 \n", + "Ith =Jth*250*100*10**-8 \n", + "Ith=Ith*1000 # converting into mA...\n", + "print \" \\n\\nThe threshold current in mA =\",round(Ith,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The threshold current density = 2.65 x 10**3\n", + " \n", + "\n", + "The threshold current in mA = 662.4\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.6:Pg-3.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "T= 305.0 \n", + "T0 = 160.0 \n", + "T1= 373.0\n", + "\n", + "Jth_32 = exp(T/T0) \n", + "Jth_100 = exp(T1/T0) \n", + "R_j = Jth_100/Jth_32 \n", + "print \" Ratio of current densities at 160K is =\",round(R_j,2) \n", + "print \" \\n\\n***NOTE- Wrong in book...\\nJth(100) calculated wrongly...\" \n", + "To = 55 \n", + "Jth_32_new = exp(T/To) \n", + "Jth_100_new = exp(T1/To) \n", + "R_j_new = Jth_100_new/Jth_32_new \n", + "print \" \\n\\nRatio of current densities at 55K is \",round(R_j_new,2) \n", + " # wrong in book...\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Ratio of current densities at 160K is = 1.53\n", + " \n", + "\n", + "***NOTE- Wrong in book...\n", + "Jth(100) calculated wrongly...\n", + " \n", + "\n", + "Ratio of current densities at 55K is 3.44\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.1:Pg-3.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "Bo= 150 \n", + "rs= 35*10**-4 \n", + "a1= 25*10**-6 \n", + "NA= 0.20 \n", + "a2= 50*10**-6 \n", + "\n", + "Pled = (a1/rs)**2 * (math.pi**2*rs**2*Bo*NA**2) \n", + "Pled=Pled*10**10 # converting in uW...\n", + "print \" The power coupled inthe fibre in uW =\",int(Pled) \n", + "Pled_new = (math.pi**2*rs**2*Bo*NA**2) \n", + "Pled_new=Pled_new*10**6 # converting in uW...\n", + "print \" \\n\\nThe Power coupled for case 2 in uW =\",round(Pled_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power coupled inthe fibre in uW = 370\n", + " \n", + "\n", + "The Power coupled for case 2 in uW = 725.42\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.2:Pg-3.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "n= 1.48 \n", + "n1= 3.6 \n", + "R= (n1-n)**2/(n1+n)**2 \n", + "print \" The Fresnel Reflection is \",round(R,4) \n", + "L= -10*math.log10(1-R) \n", + "print \" \\n\\nPower loss in dB =\",round(L,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Fresnel Reflection is 0.1742\n", + " \n", + "\n", + "Power loss in dB = 0.83\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.3:Pg-3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "NA= 0.20 \n", + "Bo= 150 \n", + "rs= 35*10**-6 \n", + "Pled = math.pi**2*rs**2*Bo*NA**2 \n", + "Pled=Pled*10**10 # convertin in uW for displaying...\n", + "print \" The optical power coupled in uW =\",round(Pled,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical power coupled in uW = 725.42\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.4:Pg-3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "n1= 1.5 \n", + "n=1 \n", + "R= (n1-n)**2/(n1+n)**2 \n", + "L= -10*math.log10(1-R) \n", + " # Total loss is twice due to reflection\n", + "L= L+L \n", + "print \" Total loss due to Fresnel Reflection in dB =\",round(L,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total loss due to Fresnel Reflection in dB = 0.35\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.5:Pg-3.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + " \n", + "n1= 1.5 \n", + "n=1.0 \n", + "y=5.0 \n", + "a= 25.0 \n", + "temp1=(1-(y/(2*a)**2))**0.5 \n", + "temp1=temp1*(y/a) \n", + "temp=2*math.acos(0.9996708) # it should be acos(0.1) actually... due to approximations\n", + " \n", + " # answer varies a lot... \n", + "temp=math.degrees(temp)-temp1 \n", + " # temp=temp \n", + "tem= 16*(1.5**2)/(2.5**4) \n", + "tem=tem/math.pi \n", + "temp=temp*tem \n", + "Nlat= temp \n", + "print \" The Coupling efficiency is =\",round(Nlat,3) \n", + "L= -10*math.log10(Nlat) \n", + "print \" \\n\\nThe insertion loss in dB =\",round(L,2) \n", + "temp1=(1-(y/(2*a)**2))**0.5 \n", + "temp1=temp1*(y/a) \n", + "temp=2*math.acos(0.9996708) # it should be acos(0.1) actually... due to approximations\n", + " # answer varies a lot... \n", + "temp=math.degrees(temp)-temp1 \n", + "temp=temp/math.pi \n", + "N_new =temp \n", + "print \" \\n\\nEfficiency when joint index is matched =\",round(N_new,3) \n", + "L_new= -10*math.log10(N_new) \n", + "print \" \\n\\nThe new insertion loss in dB =\",round(L_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Coupling efficiency is = 0.804\n", + " \n", + "\n", + "The insertion loss in dB = 0.95\n", + " \n", + "\n", + "Efficiency when joint index is matched = 0.872\n", + " \n", + "\n", + "The new insertion loss in dB = 0.59\n" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter04-Optical_Detectors_and_Receivers.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter04-Optical_Detectors_and_Receivers.ipynb new file mode 100755 index 00000000..9dca6b9e --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter04-Optical_Detectors_and_Receivers.ipynb @@ -0,0 +1,644 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e29ad753b5f2886d343bb74ecb0ecc91fcb2a9898826cbfcabd7e953e57d2f63" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter04: Optical Detectors and Receivers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.1:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Eg= 1.1 \n", + "lamda_c = 1.24/Eg \n", + "print \"The cut off wavelength in um= \",round(lamda_c,2) \n", + "\n", + "Eg_ger =0.67 \n", + "lamda_ger= 1.24/Eg_ger \n", + "print \" \\nThe cut off wavelength for Germanium in um= \",round(lamda_ger,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off wavelength in um= 1.13\n", + " \n", + "The cut off wavelength for Germanium in um= 1.85\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.2:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given \n", + "Eg = 1.43 \n", + "lamda = 1.24/Eg \n", + "lamda=lamda*1000 # converting in nm\n", + "print \"The cut off wavelength in nm =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off wavelength in nm = 867.13\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.3:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P = 6*10**6 \n", + "Eh_pair= 5.4*10**6 \n", + "n= Eh_pair/P*100 \n", + "print \" The quantum efficiency in % = \",n \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quantum efficiency in % = 90.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.4:Pg-4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R= 0.65 \n", + "P0= 10*10**-6 \n", + "Ip= R*P0 \n", + "Ip=Ip*10**6 # convertinf in uA...\n", + "print \" The generated photocurrent in uA = \",Ip \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The generated photocurrent in uA = 6.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.5:Pg-4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Ec= 1.2*10**11 \n", + "P= 3*10**11 \n", + "lamda = 0.85*10**-6 \n", + "n= Ec/P*100 \n", + "print \"The efficiency in % =\",n \n", + "\n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "n= n/100 \n", + "R= n*q*lamda/(h*c) \n", + "print \" \\n\\nThe Responsivity of the photodiode in A/W=\",round(R ,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency in % = 40.0\n", + " \n", + "\n", + "The Responsivity of the photodiode in A/W= 0.2741\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.6:Pg-4.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 0.65 \n", + "E= 1.5*10**-19 \n", + "Ip= 2.5*10**-6 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "lamda= h*c/E \n", + "lamda=lamda*10**6 # converting in um for displaying...\n", + "print \"The wavelength in um =\",lamda \n", + "lamda=lamda*10**-6 \n", + "q= 1.602*10**-19 \n", + "R= n*q*lamda/(h*c) \n", + "print \"\\nThe Responsivity in A/W =\",R \n", + "Pin= Ip/R \n", + "Pin=Pin*10**6 # converting in uW for displaying/..\n", + "print \" \\nThe incidnt power in uW= \",round(Pin,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength in um = 1.325\n", + "\n", + "The Responsivity in A/W = 0.6942\n", + " \n", + "The incidnt power in uW= 3.6\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.7:Pg-4.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Iin= 1 \n", + "lamda= 1550*10**-9 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "n=0.65 \n", + "Ip=n*q*lamda*Iin/(h*c) \n", + "Ip=Ip*1000 # converting in mA for displaying...\n", + "print \" The average photon current in mA= \",int(Ip)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The average photon current in mA= 812\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.8:Pg-4.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 0.70 \n", + "Ip= 4*10**-6 \n", + "e= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "E= 1.5*10**-19\n", + "lamda = h*c/E \n", + "lamda=lamda*10**6 # converting um for displaying...\n", + "print \"The wavelength in um =\",round(lamda,3) \n", + "R= n*e/E \n", + "Po= Ip/R \n", + "Po=Po*10**6 # converting um for displaying...\n", + "print \" \\nIncident optical Power in uW =\",round(Po,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength in um = 1.325\n", + " \n", + "Incident optical Power in uW = 5.35\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2.1:Pg-4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ct= 7*10.0**-12\n", + "Rt= 50*1*10.0**6/(50+(1*10**6))\n", + "B= 1/(2*math.pi*Rt*Ct)\n", + "B=B*10**-6 #converting in mHz for displaying...\n", + "print \"The bandwidth of photodetector in MHz =\",round(B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth of photodetector in MHz = 454.75\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2.2:Pg-4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "W= 25*10**-6 \n", + "Vd= 3*10**4 \n", + "Bm= Vd/(2*math.pi*W) \n", + "RT= 1/Bm \n", + "RT=RT*10**9 # converting ns for displaying...\n", + "print \" The maximum response time in ns =\",round(RT,2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum response time in ns = 5.24\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.2.3:Pg-4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "v= 3*10**8 \n", + "n=0.65 \n", + "I= 10*10**-6 \n", + "lamda= 900*10**-9 \n", + "R= n*e*lamda/(h*v) \n", + "Po= 0.5*10**-6 \n", + "Ip= Po*R \n", + "M= I/Ip \n", + "print \" The multiplication factor =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The multiplication factor = 42.41\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3.1:Pg-4.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=0.65 \n", + "lamda = 900*10**-9 \n", + "Pin= 0.5*10**-6 \n", + "Im= 10*10**-6 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "R= n*q*lamda/(h*c) \n", + "Ip= R*Pin \n", + "M= Im/Ip \n", + "print \" The multiplication factor =\",round(M,2)\n", + "print \"\\n***NOTE-Answer wrong in textbook...\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The multiplication factor = 42.41\n", + "\n", + "***NOTE-Answer wrong in textbook...\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6.1:Pg-4.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "lamda = 1300*10**-9 \n", + "Id= 4*10**-9 \n", + "n=0.9 \n", + "Rl= 1000 \n", + "Pincident= 300*10**-9 \n", + "BW= 20*10**6 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "v= 3*10**8 \n", + "Iq= math.sqrt((q*Pincident*n*lamda)/(h*v)) \n", + "Iq= math.sqrt(Iq) \n", + "Iq=Iq*100 # converting in proper format for displaying...\n", + "print \"Mean square quantum noise current in Amp*10^11 =\",round(Iq,2)\n", + "I_dark= 2*q*BW*Id \n", + "I_dark=I_dark*10**19 # converting in proper format for displaying...\n", + "print \" \\nMean square dark current in Amp*10^-19 =\",round(I_dark,3) \n", + "k= 1.38*10**-23 \n", + "T= 25+273 \n", + "It= 4*k*T*BW/Rl \n", + "It=It*10**16 # converting in proper format for displaying...\n", + "print \" \\nMean square thermal nise current in Amp*10^-16 =\",round(It,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean square quantum noise current in Amp*10^11 = 2.31\n", + " \n", + "Mean square dark current in Amp*10^-19 = 0.256\n", + " \n", + "Mean square thermal nise current in Amp*10^-16 = 3.29\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.1:Pg-4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 850*10**-9 # meters\n", + "BER= 1*10**-9 \n", + "N_bar = 9*log(10) \n", + "h= 6.625*10**-34 # joules-sec\n", + "v= 3*10**8 # meters/sec\n", + "n= 0.65 # assumption\n", + "E=N_bar*h*v/(n*lamda) \n", + "E=E*10**18 # /converting in proper format for displaying...\n", + "print \" The Energy received in Joules*10^-18 =\",round(E,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Energy received in Joules*10^-18 = 7.45\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.2:Pg-4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 850*10**-9 \n", + "BER = 1*10**-9 \n", + "BT=10*10**6 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "Ps= 36*h*c*BT/lamda \n", + "Ps=Ps*10**12 # /converting in proper format for displaying...\n", + "print \"The minimum incidental optical power required id in pW =\",round(Ps,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum incidental optical power required id in pW = 84.18\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.3:Pg-4.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "C= 5*10**-12 \n", + "B =50*10**6 \n", + "Ip= 1*10**-7 \n", + "e= 1.602*10**-19 \n", + "k= 1.38*10**-23 \n", + "T= 18+273 \n", + "M= 1 \n", + "Rl= 1/(2*math.pi*C*B) \n", + "S_N= Ip**2/((2*e*B*Ip)+(4*k*T*B/Rl)) \n", + "S_N = 10*math.log10(S_N) # in db\n", + "print \" The S/N ratio in dB =\",round(S_N,2) \n", + "M=41.54 \n", + "S_N_new= (M**2*Ip**2)/((2*e*B*Ip*M**2.3)+(4*k*T*B/Rl)) \n", + "S_N_new = 10*math.log10(S_N_new) # in db\n", + "print \" \\n\\nThe new S/N ratio in dB =\",round(S_N_new,2)\n", + "print \" \\n\\nImprovement over M=1 in dB =\",round(S_N_new-S_N,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The S/N ratio in dB = 8.99\n", + " \n", + "\n", + "The new S/N ratio in dB = 32.49\n", + " \n", + "\n", + "Improvement over M=1 in dB = 23.5\n" + ] + } + ], + "prompt_number": 70 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter05-Design_Considerations_in_Optical_Links.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter05-Design_Considerations_in_Optical_Links.ipynb new file mode 100755 index 00000000..3915a0b4 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter05-Design_Considerations_in_Optical_Links.ipynb @@ -0,0 +1,458 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b4a79f107959b9c220fb0fbffb78f81a806979a06263be16ca010cadce8d4a27" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter05: Design Considerations in Optical Links" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.1:Pg-5.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "B= 15*10**-6 \n", + "L= 4 \n", + "BER= 1*10**-9 \n", + "Ls= 0.5 \n", + "Lc= 1.5 \n", + "alpha= 6 \n", + "Pm= 8 \n", + "Pt= 2*Lc +(alpha*L)+(Pm) \n", + "print \" The actual loss in fibre in dB =\",int(Pt) \n", + "Pmax = -10-(-50) \n", + "print \" \\nThe maximum allowable system loss in dBm = \",Pmax " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The actual loss in fibre in dB = 35\n", + " \n", + "The maximum allowable system loss in dBm = 40\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.2:Pg-5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ps= 0.1 \n", + "alpha = 6 \n", + "L= 0.5 \n", + "Ps = 10*math.log10(Ps) \n", + "NA= 0.25 \n", + "Lcoupling= -10*math.log10(NA**2) \n", + "Lf= alpha*L \n", + "lc= 2*2 \n", + "Pm= 4 \n", + "Pout = Ps-(Lcoupling+Lf+lc+Pm) \n", + "print \" The actual power output in dBm = \",int(Pout) \n", + "Pmin = -35 \n", + "print \" Minimum input power required in dBm= \",Pmin \n", + "print \" As Pmin > Pout, system will perform adequately over the system operating life.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The actual power output in dBm = -33\n", + " Minimum input power required in dBm= -35\n", + " As Pmin > Pout, system will perform adequately over the system operating life.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.3:Pg-5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Ps= 5 \n", + "Lcoupling = 3 \n", + "Lc= 2 \n", + "L_splicing = 50*0.1 \n", + "F_atten = 25 \n", + "L_total = Lcoupling+Lc+L_splicing+F_atten \n", + "P_avail = Ps-L_total \n", + "sensitivity = -40 \n", + "loss_margin = -sensitivity-(-P_avail) \n", + "print \" The loss margin of the system in dBm= -\",loss_margin \n", + "sensitivity_fet = -32 \n", + "loss_margin_fet=-sensitivity_fet-(-P_avail) \n", + "print \"The loss marging for the FET receiver in dBm= -\",loss_margin_fet \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The loss margin of the system in dBm= - 10.0\n", + "The loss marging for the FET receiver in dBm= - 2.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.4:Pg-5.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "LED_output = 3 \n", + "PIN_sensitivity = -54 \n", + "allowed_loss= LED_output -(-PIN_sensitivity) \n", + "Lcoupling = 17.5 \n", + "cable_atten = 30 \n", + "power_margin_coupling= 39.5 \n", + "power_margin_splice=6.2 \n", + "power_margin_cable=9.5 \n", + "final_margin= power_margin_coupling+power_margin_splice+power_margin_cable \n", + "print \" The safety margin in dB =\",final_margin\n", + " # Answer in book is wrong...\n", + "print \" \\n***NOTE- Answer wrong in book...\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The safety margin in dB = 55.2\n", + " \n", + "***NOTE- Answer wrong in book...\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.5:Pg-5.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "optical_power=-10 \n", + "receiver_sensitivity=-41 \n", + "total_margin= optical_power-receiver_sensitivity \n", + "cable_loss= 7*2.6 \n", + "splice_loss= 6*0.5 \n", + "connector_loss= 1*1.5 \n", + "safety_margin= 6 \n", + "total_loss= cable_loss+splice_loss+connector_loss+safety_margin \n", + "excess_power_margin= total_margin-total_loss \n", + "print \" The system is viable and provides excess power margin in dB=\",excess_power_margin \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system is viable and provides excess power margin in dB= 2.3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.1:Pg-5.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ttx= 15 \n", + "Tmat=21 \n", + "Tmod= 3.9 \n", + "BW= 25.0 \n", + "Trx= 350.0/BW \n", + "\n", + "Tsys = math.sqrt(Ttx**2+Tmat**2+Tmod**2+Trx**2) \n", + "print \" The system rise time in ns.= \",round(Tsys,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system rise time in ns.= 29.62\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.2:Pg-5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "Ttrans = 1.75*10**-9 \n", + "Tled = 3.50*10**-9 \n", + "Tcable=3.89*10**-9 \n", + "Tpin= 1*10**-9 \n", + "Trec= 1.94*10**-9 \n", + "Tsys= math.sqrt(Ttrans**2+Tled**2+Tcable**2+Tpin**2+Trec**2) \n", + "Tsys=Tsys*10**9 # converting in ns for dislaying...\n", + "print \" The system rise time in ns= \",round(Tsys,2)\n", + "Tsys=Tsys*10**-9 \n", + "BW= 0.35/Tsys \n", + "BW=BW/1000000.0 # converting in MHz for dislaying...\n", + "print \" \\nThe system bandwidth in MHz =\",round(BW,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system rise time in ns= 5.93\n", + " \n", + "The system bandwidth in MHz = 58.99\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.3:Pg-5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ttx= 8*10**-9 \n", + "Tintra= 1*10**-9 \n", + "Tmodal=5*10**-9 \n", + "Trr= 6*10**-9 \n", + "Tsys= math.sqrt(Ttx**2+(8*Tintra)**2+(8*Tmodal)**2+Trr**2) \n", + "\n", + "BWnrz= 0.7/Tsys \n", + "BWnrz=BWnrz/1000000 # converting in ns for dislaying...\n", + "BWrz=0.35/Tsys \n", + "BWrz=BWrz/1000000 # converting in ns for dislaying...\n", + "print \" Maximum bit rate for NRZ format in Mb/sec= \",round(BWnrz,2)\n", + "print \" \\nMaximum bit rate for RZ format in Mb/sec= \",round(BWrz,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum bit rate for NRZ format in Mb/sec= 16.67\n", + " \n", + "Maximum bit rate for RZ format in Mb/sec= 8.33\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.4:Pg-5.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ts= 10*10**-9 \n", + "Tn=9*10**-9 \n", + "Tc=2*10**-9 \n", + "Td=3*10**-9 \n", + "BW= 6*10**6 \n", + "Tsyst= 1.1*math.sqrt(Ts**2+(5*Tn)**2+(5*Tc)**2+Td**2) \n", + "Tsyst=Tsyst*10**9 # converting in ns for displying...\n", + "Tsyst_max = 0.35/BW \n", + "Tsyst_max=Tsyst_max*10**9 # converting in ns for displying...\n", + "print \" Rise system of the system in ns= \",round(Tsyst,2)\n", + "print \" \\nMaximum Rise system of the system in ns= \",round(Tsyst_max,2)\n", + "print \" \\nSpecified components give a system rise time which is adequate for the bandwidth and distance requirements of the optical fibre link.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Rise system of the system in ns= 51.99\n", + " \n", + "Maximum Rise system of the system in ns= 58.33\n", + " \n", + "Specified components give a system rise time which is adequate for the bandwidth and distance requirements of the optical fibre link.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5.1:Pg-5.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "del_t_1 = 10*100*10**-9 \n", + "Bt_nrz_1 = 0.7/(del_t_1*1000000) \n", + "Bt_rz_1 = 0.35/(del_t_1*1000000) \n", + "print \"First case.\"\n", + "print \" \\nBit rate for nrz in Mb/sec= \",Bt_nrz_1 \n", + "print \" \\nBit rate for rz in Mb/sec= \",Bt_rz_1 \n", + "del_t_2 = 20*1000*10**-9 \n", + "Bt_nrz_2 = 0.7/(del_t_2*1000000) \n", + "Bt_rz_2 = 0.35/(del_t_2*1000000) \n", + "print \" \\n\\nSecond case\" \n", + "print \" \\nBit rate for nrz in Mb/sec= \",Bt_nrz_2 \n", + "print \" \\nBit rate for rz in Mb/sec= \",Bt_rz_2 \n", + "del_t_3 = 2*2000*10**-9 \n", + "Bt_nrz_3 = 0.7/(del_t_3*1000) \n", + "Bt_rz_3 = 0.35/(del_t_3*1000) \n", + "print \" \\n\\nThird case\" \n", + "print \" \\nBit rate for nrz in BITS/sec= \",int(Bt_nrz_3) \n", + "print \" \\nBit rate for rz in BITS/sec= \",Bt_rz_3 \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First case.\n", + " \n", + "Bit rate for nrz in Mb/sec= 0.7\n", + " \n", + "Bit rate for rz in Mb/sec= 0.35\n", + " \n", + "\n", + "Second case\n", + " \n", + "Bit rate for nrz in Mb/sec= 0.035\n", + " \n", + "Bit rate for rz in Mb/sec= 0.0175\n", + " \n", + "\n", + "Third case\n", + " \n", + "Bit rate for nrz in BITS/sec= 174\n", + " \n", + "Bit rate for rz in BITS/sec= 87.5\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter1.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter1.ipynb new file mode 100755 index 00000000..ec323da9 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter1.ipynb @@ -0,0 +1,1240 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:742c44cb267900361b88ee7b473acd2b1b40f32a4db7e15db6918955b1159df0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter01:Fiber Optics Communications System" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.7.1:Pg-1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "n1= 1.5 # for glass\n", + "n2= 1.33 # for water\n", + "phi1= (math.pi/6) # phi1 is the angel of incidence\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + "sinphi2= (n1/n2)*math.sin(phi1) # phi2 is the angle of refraction..\n", + "phi2 = math.asin(sinphi2)\n", + "temp= math.degrees(phi2)\n", + "print \" The angel of refraction in degrees =\",round(temp,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The angel of refraction in degrees = 34.33\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.2:Pg-1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1= 1.50 # RI of glass..\n", + "n2 = 1.0 # RI of air...\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + " # From definition of critical angel phi2 = 90 degrees and phi1 will be critical angel\n", + "t1=(n2/n1)*math.sin(math.pi/2)\n", + "phiC=math.asin(t1)\n", + "temp= math.degrees(phiC)\n", + "print \" The Critical angel in degrees =\",round(temp,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 41.81\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.3:Pg-1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + " # To find RI of glass\n", + " # To find the critical angle for glass...\n", + " \n", + "phi1 = 33 # Angle of incidence..\n", + "phi2 = 90 # Angle of refraction..\n", + "n2= 1.0 \n", + "\n", + "n1 = round(sin(math.radians(phi2))/sin(math.radians(phi1)),3) \n", + "print \" The Refractive Index is =\",n1 \n", + "\n", + "#phiC = math.asin((n2/n1)*math.sin(90)) \n", + "phiC=math.asin(0.54)\n", + "print \" \\n\\nThe Critical angel in degrees =\",round(math.degrees(phiC),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Refractive Index is = 1.836\n", + " \n", + "\n", + "The Critical angel in degrees = 32.68\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.4:Pg-1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.5 # TheRi of medium 1\n", + "n2= 1.36 # the RI of medium 2\n", + "phi1= 30 # The angle of incidence\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + "phi2 = math.asin((n1/n2)*math.sin(math.radians(phi1))) \n", + "print \" The angel of refraction is in degrees from normal = \",round(math.degrees(phi2),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The angel of refraction is in degrees from normal = 33.47\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.7.5:Pg-1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "n1 = 3.6 # RI of GaAs..\n", + "n2 = 3.4 # RI of AlGaAs..\n", + "phi1 = 80 # Angle of Incidence..\n", + " # According to Snell's law...\n", + " # n1*sin(phi1)= n2*sin(phi2) \n", + " # At critical angle phi2 = 90...\n", + "phiC = math.asin((n2/n1)*sin(math.radians(90)) )\n", + "print \" The Critical angel in degrees =\",round(math.degrees(phiC),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 70.81\n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.1:Pg-1.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "n1= 1.5 # RI of medium 1\n", + "n2 =1.45 # RI of medium 2\n", + "\n", + "delt= (n1-n2)/n1 \n", + "NA = n1*(math.sqrt(2*delt)) \n", + "print \" The Numerical aperture =\",round(NA,2)\n", + "phiA = math.asin(NA) \n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n", + "\n", + "phiC = math.asin(n2/n1) \n", + "print \" \\n\\nThe Critical angel in degrees =\",round(degrees(phiC),2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical aperture = 0.39\n", + " \n", + "\n", + "The Acceptance angel in degrees = 22.79\n", + " \n", + "\n", + "The Critical angel in degrees = 75.16\n" + ] + } + ], + "prompt_number": 100 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.2:Pg-1.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "n1= 1.5 # RI of core\n", + "n2 = 1.48 # RI of cladding..\n", + "\n", + "NA = math.sqrt((n1**2)-(n2**2)) \n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "\n", + "phiA = math.asin(NA) \n", + "print \" \\n\\nThe Critical angel =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.24\n", + " \n", + "\n", + "The Critical angel = 14.13\n" + ] + } + ], + "prompt_number": 101 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.3:Pg-1.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + " \n", + "\n", + "NA = 0.35 # Numerical Aperture\n", + "delt = 0.01 \n", + " # NA= n1*(math.sqrt(2*delt) n1 is RI of core\n", + "n1 = 0.35/(math.sqrt(2*delt)) \n", + "print \"The RI of core =\",round(n1,4) \n", + "\n", + " # Numerical Aperture is also given by \n", + " # NA = math.sqrt(n1**2 - n2**2) # n2 is RI of cladding\n", + "n2 = math.sqrt((n1**2-NA**2)) \n", + "print \" \\n\\nThe RI of Cladding =\",round(n2,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The RI of core = 2.4749\n", + " \n", + "\n", + "The RI of Cladding = 2.45\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.4:Pg-1.24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "Vc = 2.01*10**8 # velocity of light in core in m/sec...\n", + "phiC= 80.0 # Critical angle in degrees...\n", + "\n", + " # RI of Core (n1) is given by (Velocity of light in air/ velocity of light in air)...\n", + "n1= 3*10**8/Vc \n", + " # From critical angle and the value of n1 we calculate n2...\n", + "n2 = sin(math.radians(phiC))*n1 # RI of cladding...\n", + "NA = math.sqrt(n1**2-n2**2) \n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "phiA = math.asin(NA) # Acceptance angle...\n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.26\n", + " \n", + "\n", + "The Acceptance angel in degrees = 15.02\n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.5:Pg-1.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1 = 1.4 # RI of Core..\n", + "n2 = 1.35 # RI of Cladding\n", + "\n", + "phiC = math.asin(n2/n1) # Critical angle..\n", + "print \" The Critical angel in degrees =\",round(math.degrees(phiC),2) \n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # numerical Aperture...\n", + "print \" \\n\\nThe Numerical Aperture is =\",round(NA,2) \n", + "\n", + "phiA = math.asin(NA) # Acceptance angle... \n", + "print \" \\n\\nThe Acceptance angel in degrees =\",round(math.degrees(phiA),2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Critical angel in degrees = 74.64\n", + " \n", + "\n", + "The Numerical Aperture is = 0.37\n", + " \n", + "\n", + "The Acceptance angel in degrees = 21.77\n" + ] + } + ], + "prompt_number": 107 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.6:Pg-1.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1 = 1.48 # RI of core..\n", + "n2 = 1.46 # RI of Cladding..\n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "print \" The Numerical Aperture is =\",round(NA,3) \n", + "\n", + "theta = math.pi*NA**2 # The entrance angle theta..\n", + "print \" \\n\\nThe Entrance angel in degrees =\",round(theta,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture is = 0.242\n", + " \n", + "\n", + "The Entrance angel in degrees = 0.185\n" + ] + } + ], + "prompt_number": 110 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.7:Pg-1.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "delt = 0.007 # relative refractive index difference \n", + "n1 = 1.45 # RI of core...\n", + "NA = n1* math.sqrt((2*delt)) \n", + "print \" The Numerical Aperture is =\",round(NA,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture is = 0.1716\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.9.8:Pg-1.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + "\n", + "phiA = 8 # accepatance angle in degrees...\n", + "n1 =1.52 # RI of core...\n", + "\n", + "NA = sin(math.radians(phiA)) # Numerical Aperture...\n", + "\n", + "delt = NA**2/(2*(n1**2)) # Relative RI difference...\n", + "print \" The relative refractive index difference =\",round(delt,5) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The relative refractive index difference = 0.00419\n" + ] + } + ], + "prompt_number": 114 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex1.9.9:Pg-1.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "delt = 0.01 # relative RI difference..\n", + "n1 = 1.48 # RI of core...\n", + "\n", + "NA = n1*(math.sqrt(2*delt)) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,3) \n", + "\n", + "theta = math.pi*NA**2 # Solid Acceptance angle...\n", + "print \" \\n\\nThe Solid Acceptance angel in degrees =\",round(theta,4) \n", + "\n", + "n2 = (1-delt)*n1 \n", + "phiC = math.asin(n2/n1) # Critical Angle...\n", + "print \" \\n\\nThe Critical angel in degrees =\",round(math.degrees(phiC),2) \n", + "print \" \\n\\nCritical angle wrong due to rounding off errors in trignometric functions..\\n Actual value is 90.98 in book.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.209\n", + " \n", + "\n", + "The Solid Acceptance angel in degrees = 0.1376\n", + " \n", + "\n", + "The Critical angel in degrees = 81.89\n", + " \n", + "\n", + "Critical angle wrong due to rounding off errors in trignometric functions..\n", + " Actual value is 90.98 in book.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.1:Pg-1.41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "d = 50*10**-6 # diameter of fibre...\n", + "n1 = 1.48 # RI of core..\n", + "n2 = 1.46 # RI of cladding..\n", + "lamda = 0.82*10**-6 # wavelength of light..\n", + "\n", + "NA = math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "Vn= math.pi*d*NA/lamda # normalised frequency...\n", + "M = Vn**2/2 # number of modes...\n", + "print \" The number of modes in the fibre are =\",int(M) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The number of modes in the fibre are = 1078\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.2:Pg-1.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + " \n", + "V = 26.6 # Normalised frequency..\n", + "lamda = 1300*10**-9 # wavelenght of operation\n", + "a = 25*10**-6 # radius of fibre.\n", + "NA = V*lamda/(2*math.pi*a) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.22\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.3:Pg-1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "a = 40*10**-6 # radius of core...\n", + "delt = 0.015 # relative RI difference..\n", + "lamda= 0.85*10**-6 # wavelength of operation..\n", + "n1=1.48 # RI of core..\n", + "\n", + "NA = n1*math.sqrt(2*delt) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\", round(NA,4) \n", + "V = 2*math.pi*a*NA/lamda # normalised frequency\n", + "print \" \\n\\nThe Normalised frequency =\",round(V,2) \n", + "\n", + "M = V**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.2563\n", + " \n", + "\n", + "The Normalised frequency = 75.8\n", + " \n", + "\n", + "The number of modes in the fibre are = 2872\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.4:Pg-1.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "NA = 0.20 # Numerical Aperture..\n", + "M = 1000 # number of modes..\n", + "lamda = 850*10**-9 # wavelength of operation..\n", + "\n", + "a = math.sqrt(M*2*lamda**2/(math.pi**2*NA**2)) # radius of core..\n", + "a=a*10**6 # converting in um for displaying...\n", + "print \" The radius of the core in um =\",round(a,2) \n", + "a=a*10**-6 \n", + "M1= ((math.pi*a*NA/(1320*10**-9))**2)/2\n", + "print \" \\n\\nThe number of modes in the fibre at 1320um =\",int(M1) \n", + "print \" \\n\\n***The number of modes in the fibre at 1320um is calculated wrongly in book\" \n", + "M2= ((math.pi*a*NA/(1550*10**-9))**2)/2\n", + "print \" \\n\\nThe number of modes in the fibre at 1550um =\",int(M2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of the core in um = 60.5\n", + " \n", + "\n", + "The number of modes in the fibre at 1320um = 414\n", + " \n", + "\n", + "***The number of modes in the fibre at 1320um is calculated wrongly in book\n", + " \n", + "\n", + "The number of modes in the fibre at 1550um = 300\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.5:Pg-1.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "NA = 0.2 # Numerical Aperture..\n", + "n2= 1.59 # RI of cladding..\n", + "n0= 1.33 # RI of water..\n", + "lamda = 1300*10**-9 # wavelength..\n", + "a = 25*10**-6 # radius of core..\n", + "n1 = math.sqrt(NA**2+n2**2) # RI of core..\n", + "phiA= math.asin(math.sqrt(n1**2-n2**2)/n0) # Acceptance angle..\n", + "print \" The Acceptance angle is =\",round(math.degrees(phiA),2) \n", + "\n", + "phiC= math.asin(n2/n1) # Critical angle..\n", + "print \" \\n\\nThe critical angle is =\",round(math.degrees(phiC),2) \n", + "V = 2*math.pi*a*NA/lamda # normalisd frequency\n", + "M= V**2/2 # number of modes\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n", + "\n", + "print \" \\n\\n***The value of the angle differ from the book because of round off errors.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Acceptance angle is = 8.65\n", + " \n", + "\n", + "The critical angle is = 82.83\n", + " \n", + "\n", + "The number of modes in the fibre are = 292\n", + " \n", + "\n", + "***The value of the angle differ from the book because of round off errors.\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.6:Pg-1.46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "V= 26.6 # Normalised frequency..\n", + "lamda= 1300*10**-9 # wavelength of operation..\n", + "a= 25*10**-6 # radius of core..\n", + "\n", + "NA = V*lamda/(2*math.pi*a) # Numerical Aperture..\n", + "print \" The Numerical Aperture =\",round(NA,2) \n", + "theta = math.pi*NA**2 # solid Acceptance Angle..\n", + "print \" \\n\\nThe solid acceptance angle in radians =\",round(theta,3) \n", + "\n", + "M= V**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture = 0.22\n", + " \n", + "\n", + "The solid acceptance angle in radians = 0.152\n", + " \n", + "\n", + "The number of modes in the fibre = 353.78\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.7:Pg-1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "n1= 1.49 # RI of core.\n", + "n2=1.47 # RI of cladding..\n", + "a= 2 # radius of core in um..\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + " # The maximum V number for single mode operation is 2.4...\n", + "V= 2.4 # Normalised frequency..\n", + "\n", + "lamda = 2*math.pi*a*NA/V # Cutoff wavelength...\n", + "print \" The cutoff wavelength in um =\",round(lamda,2) \n", + "\n", + "\n", + "lamda1 = 1.310 # Givenn cutoff wavelength in um..\n", + "d= V*lamda1/(math.pi*NA) # core diameter..\n", + "print \" \\n\\nThe core diameter in um =\",round(d,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cutoff wavelength in um = 1.27\n", + " \n", + "\n", + "The core diameter in um = 4.11\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.8:Pg-1.47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.48 # RI of core..\n", + "a= 4.5 # core radius in um..\n", + "delt= 0.0025 # Relative RI difference..\n", + "V= 2.405 # For step index fibre..\n", + "lamda= (2*math.pi*a*n1*math.sqrt(2*delt))/V # cutoff wavelength..\n", + "print \" The cutoff wavelength in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cutoff wavelength in um = 1.23\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.9:Pg-1.48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + " \n", + "lamda= 0.82*10**-6 # wavelength ofoperation.\n", + "a= 2.5*10**-6 # Radius of core..\n", + "n1= 1.48 # RI of core..\n", + "n2= 1.46 # RI of cladding\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "V= 2*math.pi*a*NA/lamda # Normalisd frequency..\n", + "print \" The normalised frequency =\",round(V,3) \n", + "M= V**2/2 # The number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The normalised frequency = 4.645\n", + " \n", + "\n", + "The number of modes in the fibre are = 10.79\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.10:Pg-1.49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "delt= 0.01 # Relative RI difference..\n", + "n1= 1.5 \n", + "M= 1100 # Number of modes...\n", + "lamda= 1.3 # wavelength of operation in um..\n", + "V= math.sqrt(2*M) # Normalised frequency...\n", + "d= V*lamda/(math.pi*n1*math.sqrt(2*delt)) # diameter of core..\n", + "print \" The diameter of the core in um =\",round(d,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diameter of the core in um = 91.5\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.11:Pg-1.50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "n1= 1.5 # RI of core..\n", + "n2= 1.38 # RI of cladding..\n", + "a= 25*10**-6 # radius of core..\n", + "lamda= 1300*10**-9 # wavelength of operation...\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture..\n", + "print \" The Numerical Aperture of the given fibre =\",round(NA,4) \n", + "V= 2*math.pi*a*NA/lamda # Normalised frequency..\n", + "print \" \\n\\nThe normalised frequency =\",round(V,2) \n", + "theta= math.asin(NA) # Solid acceptance anglr..\n", + "print \" \\n\\nThe Solid acceptance angle in degrees =\",int(math.degrees(theta)) \n", + "M= V**2/2 # Number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre are =\",int(M) \n", + "print \" \\n\\n***Number of modes wrongly calculated in the book..\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Numerical Aperture of the given fibre = 0.5879\n", + " \n", + "\n", + "The normalised frequency = 71.03\n", + " \n", + "\n", + "The Solid acceptance angle in degrees = 36\n", + " \n", + "\n", + "The number of modes in the fibre are = 2522\n", + " \n", + "\n", + "***Number of modes wrongly calculated in the book..\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.14.12:Pg-1.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "lamda= 850*10**-9 # wavelength of operation.\n", + "a= 25*10**-6 # Radius of core\n", + "n1= 1.48 # RI of Core...\n", + "n2= 1.46 # RI of cladding..\n", + "\n", + "NA= math.sqrt(n1**2-n2**2) # Numerical Aperture\n", + "\n", + "V= 2*math.pi*a*NA/lamda # Normalised frequency..\n", + "print \" The normalised frequency =\",round(V,2) \n", + "\n", + "lamda1= 1320*10**-9 # wavelength changed...\n", + "V1= 2*math.pi*a*NA/lamda1 # Normalised frequency at new wavelength..\n", + "\n", + "M= V1**2/2 # Number of modes at new wavelength..\n", + "print \" \\n\\nThe number of modes in the fibre at 1320um =\",int(M) \n", + "lamda2= 1550*10**-9 # wavelength 2...\n", + "V2= 2*math.pi*a*NA/lamda2 # New normalised frequency..\n", + "M1= V2**2/2 # number of modes..\n", + "print \" \\n\\nThe number of modes in the fibre at 1550um =\",int(M1 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The normalised frequency = 44.81\n", + " \n", + "\n", + "The number of modes in the fibre at 1320um = 416\n", + " \n", + "\n", + "The number of modes in the fibre at 1550um = 301\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.1:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + " \n", + "n1= 1.48 # RI of core..\n", + "delt= 0.015 # relative RI differencr..\n", + "lamda= 0.85 # wavelength of operation..\n", + "V= 2.4 # for single mode of operation..\n", + "\n", + "a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..\n", + "print \" The raduis of core in um =\",round(a,2) \n", + "print \" \\n\\nThe maximum possible core diameter in um =\",round(2*a,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The raduis of core in um = 1.27\n", + " \n", + "\n", + "The maximum possible core diameter in um = 2.53\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.2:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + "import math\n", + " \n", + "n1= 1.5 # RI of core..\n", + "delt= 0.01 # Relative RI difference...\n", + "lamda= 1.3 # Wavelength of operation...\n", + "V= 2.4*math.sqrt(2) # Maximum value of V for GRIN...\n", + "a= V*lamda/(2*math.pi*n1*math.sqrt(2*delt)) # radius of core..\n", + "print \" The radius of core in um =\",round(a,2) \n", + "print \" \\n\\nThe maximum possible core diameter in um =\",round(2*a,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of core in um = 3.31\n", + " \n", + "\n", + "The maximum possible core diameter in um = 6.62\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.15.3:Pg-1.56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "n1= 1.46 # RI of core..\n", + "a = 4.5 # radius of core in um..\n", + "delt= 0.0025 # relative RI difference..\n", + "V= 2.405 # Normalisd frequency for single mode..\n", + "lamda= 2*math.pi*a*n1*math.sqrt(2*delt)/V # cutoff wavelength...\n", + "print \" The cut off wavelength for the given fibre in um =\",round(lamda,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The cut off wavelength for the given fibre in um = 1.214\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter2.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter2.ipynb new file mode 100755 index 00000000..46a8893c --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter2.ipynb @@ -0,0 +1,945 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:211878047ac07bbe36923a59422db9a2025fd46f216dee8cd476326a7778bb6a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter02: Optical Fiber for Telecommunication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Ex2.2.1:Pg-2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "alpha= 3 # average loss Power decreases by 50% so P(0)/P(z)= 0.5\n", + "lamda= 900*10**-9 # wavelength\n", + "z= 10*math.log10(0.5)/alpha # z is the length\n", + "z= z*-1 \n", + "print \" The length over which power decreases by 50% in Kms= \",round(z,2) \n", + "\n", + "z1= 10*math.log10(0.25)/alpha # Power decreases by 75% so P(0)/P(z)= 0.25\n", + "z1=z1*-1 # as distance cannot be negative...\n", + "print \" \\n\\nThe length over which power decreases by 75% in Kms= \",round(z1,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The length over which power decreases by 50% in Kms= 1.0\n", + " \n", + "\n", + "The length over which power decreases by 75% in Kms= 2.01\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.2:Pg-2.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "\n", + "z=30.0 # Length of the fibre in kms\n", + "alpha= 0.8 # in dB\n", + "P0= 200.0 # Power launched in uW\n", + "pz= P0/10**(alpha*z/10) \n", + "print \" The output power in uW =\",round(pz,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The output power in uW = 0.7962\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.3:Pg-2.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math \n", + "\n", + "z=8.0 # fibre length\n", + "p0= 120*10**-6 # power launched\n", + "pz= 3*10**-6 \n", + "alpha= 10*math.log10(p0/pz) # overall attenuation\n", + "print \" The overall attenuation in dB =\",round(alpha,2) \n", + "alpha = alpha/z # attenuation per km\n", + "alpha_new= alpha *10 # attenuation for 10kms\n", + "total_attenuation = alpha_new + 9 # 9dB because of splices\n", + "print \" \\n\\nThe total attenuation in dB =\",int(total_attenuation) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall attenuation in dB = 16.02\n", + " \n", + "\n", + "The total attenuation in dB = 29\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.4:Pg-2.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " # Given\n", + " \n", + "z=12.0 # fibre length\n", + "alpha = 1.5 \n", + "p0= 0.3 \n", + "pz= p0/10**(alpha*z/10) \n", + "pz=pz*1000 # formatting pz in nano watts...\n", + "print \" The power at the output of the cable in W = \",round(pz,2),\"x 10^-9\" \n", + "alpha_new= 2.5 \n", + "pz=pz/1000 # pz in uWatts...\n", + "p0_new= 10**(alpha_new*z/10)*pz \n", + "print \" \\n\\nThe Input power in uW= \",round(p0_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power at the output of the cable in W = 4.75 x 10^-9\n", + " \n", + "\n", + "The Input power in uW= 4.75\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.5:Pg-2.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "\n", + "p0=150*10**-6 # power input\n", + "z= 10.0 # fibre length in km\n", + "pz= -38.2 # in dBm...\n", + "pz= 10**(pz/10)*1*10**-3 \n", + "alpha_1= 10/z *math.log10(p0/pz) # attenuation in 1st window\n", + "print \" Attenuation is 1st window in dB/Km =\",round(alpha_1,2) \n", + "alpha_2= 10/z *math.log10(p0/(47.5*10**-6)) # attenuation in 2nd window\n", + "print \" \\n\\nAttenuation is 2nd window in dB/Km =\",round(alpha_2,2) \n", + "alpha_3= 10/z *math.log10(p0/(75*10**-6)) # attenuation in 3rd window\n", + "print \" \\n\\nAttenuation is 3rd window in dB/Km =\",round(alpha_3,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Attenuation is 1st window in dB/Km = 3.0\n", + " \n", + "\n", + "Attenuation is 2nd window in dB/Km = 0.5\n", + " \n", + "\n", + "Attenuation is 3rd window in dB/Km = 0.3\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex2.2.6:Pg-2.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "p0=3*10**-3 \n", + "pz=3*10**-6 \n", + "alpha= 0.5 \n", + "z= math.log10(p0/pz)/(alpha/10) \n", + "print \" The Length of the fibre in Km =\",int(z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Length of the fibre in Km = 60\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.7:Pg-2.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "z= 10.0 \n", + "p0= 100*10**-6 # input power\n", + "pz=5*10**-6 # output power\n", + "alpha = 10*math.log10(p0/pz) # total attenuation\n", + "print \" The overall signal attenuation in dB = \",round(alpha,2) \n", + "alpha = alpha/z # attenuation per km\n", + "print \" \\n\\nThe attenuation per Km in dB/Km = \",round(alpha,2)\n", + "z_new = 12.0 \n", + "splice_attenuation = 11*0.5 \n", + "cable_attenuation = alpha*z_new \n", + "total_attenuation = splice_attenuation+cable_attenuation \n", + "print \" \\n\\nThe overall signal attenuation for 12Kms in dB = \",round(total_attenuation,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall signal attenuation in dB = 13.01\n", + " \n", + "\n", + "The attenuation per Km in dB/Km = 1.3\n", + " \n", + "\n", + "The overall signal attenuation for 12Kms in dB = 21.1\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.2.8:Pg-2.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Tf = 1400.0 # fictive temperature\n", + "BETA = 7*10**-11 \n", + "n= 1.46 # RI \n", + "p= 0.286 # photo elastic constant\n", + "Kb = 1.381*10**-23 # Boltzmann's constant\n", + "lamda = 850*10**-9 # wavelength\n", + "alpha_scat = 8*math.pi**3*n**8*p**2*Kb*Tf*BETA/(3*lamda**4) \n", + "l= 1000 # fibre length\n", + "TL = exp(-alpha_scat*l) # transmission loss\n", + "attenuation = 10*math.log10(1/TL) \n", + "print \" The attenuation in dB/Km =\",round(attenuation,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The attenuation in dB/Km = 1.572\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.3.1:Pg-2.20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "alpha = 2 \n", + "n1= 1.5 \n", + "a= 25*10**-6 \n", + "lamda= 1.3*10**-6 \n", + "M= 0.5 \n", + "NA= math.sqrt(0.5*2*1.3**2/(math.pi**2*25**2)) \n", + "Rc= 3*n1**2*lamda/(4*math.pi*NA**3) \n", + "Rc=Rc*1000 # converting into um.....\n", + "print \" The radius of curvature in um =\",round(Rc,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The radius of curvature in um = 153.98\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.1:Pg-2.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 850 *10**-9 \n", + "sigma= 45*10**-9 \n", + "L= 1 \n", + "M= 0.025/(3*10**5*lamda) \n", + "sigma_m= sigma*L*M \n", + "sigma_m= sigma_m*10**9 # formatting in ns/km....\n", + "print \" The Pulse spreading in ns/Km =\",round(sigma_m,2) \n", + "print \" \\n\\nNOTE*** - The answer in text book is wrongly calculated..\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse spreading in ns/Km = 4.41\n", + " \n", + "\n", + "NOTE*** - The answer in text book is wrongly calculated..\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.2:Pg-2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda= 2*10**-9 \n", + "sigma = 75 \n", + "D_mat= 0.03/(3*10**5*2) \n", + "sigma_m= 2*1*D_mat \n", + "sigma_m=sigma_m*10**9 # Fornamtting in ns/Km\n", + "print \" The Pulse spreading in ns/Km =\",int(sigma_m)\n", + "D_mat_led= 0.025/(3*10**5*1550) \n", + "sigma_m_led = 75*1*D_mat_led*10**9 # in ns/Km\n", + "print \" \\n\\nThe Pulse spreading foe LED is ns/Km =\",round(sigma_m_led,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse spreading in ns/Km = 100\n", + " \n", + "\n", + "The Pulse spreading foe LED is ns/Km = 4.03\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.3:Pg-2.26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 850 \n", + "sigma= 20 \n", + "D_mat = 0.055/(3*10**5*lamda) \n", + "sigma_m= sigma*1*D_mat \n", + "D_mat=D_mat*10**12 # in Ps...\n", + "sigma_m=sigma_m*10**9 # in ns # # \n", + "print \" The material Dispersion in Ps/nm-Km =\",round(D_mat,2) \n", + "print \" \\n\\nThe Pulse spreading in ns/Km =\",round(sigma_m,4) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The material Dispersion in Ps/nm-Km = 215.69\n", + " \n", + "\n", + "The Pulse spreading in ns/Km = 4.3137\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.5.4:Pg-2.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n2= 1.48 \n", + "dele = 0.2 \n", + "lamda = 1320 \n", + "Dw = -n2*dele*0.26/(3*10**5*lamda) \n", + "Dw=Dw*10**10 # converting in math.picosecs....\n", + "print \" The waveguide dispersion in math.picosec/nm.Km =\",round(Dw,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The waveguide dispersion in math.picosec/nm.Km = -1.943\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.1:Pg-2.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L= 12 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L # Pulse broadening\n", + "dele=dele*10**9 # converting in ns...\n", + "print \" \\n\\nThe pulse broadening per unit length in ns/Km =\",round(dele,2) \n", + "BLP= B_opt*L # BW length product\n", + "print \" \\n\\nThe Bandwidth-Length Product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The pulse broadening per unit length in ns/Km = 8.33\n", + " \n", + "\n", + "The Bandwidth-Length Product in MHz.Km = 60\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.2:Pg-2.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L= 10.0 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L \n", + "dele=dele/10**-6 # converting in us...\n", + "print \" \\n\\nThe dispersion per unit length in us/Km =\",round(dele,2) \n", + "BLP= B_opt*L \n", + "print \" \\n\\nThe Bandwidth-Length product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The dispersion per unit length in us/Km = 0.01\n", + " \n", + "\n", + "The Bandwidth-Length product in MHz.Km = 50\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.3:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L=15 \n", + "B_opt= 1/(2*t) \n", + "B_opt=B_opt/1000000 # converting from Hz to MHz\n", + "print \" The maximum optical bandwidth in MHz. =\",int(B_opt) \n", + "dele= t/L*10**9 # in ns...\n", + "print \" \\n\\nThe dispersion per unit length in ns/Km =\",round(dele,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum optical bandwidth in MHz. = 5\n", + " \n", + "\n", + "The dispersion per unit length in ns/Km = 6.67\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.4:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 0.85*10**-6 \n", + "rms_spect_width = 0.0012*lamda \n", + "sigma_m= rms_spect_width*1*98.1*10**-3 \n", + "sigma_m=sigma_m*10**9 # converting in ns...\n", + "print \" The Pulse Broadening due to material dispersion in ns/Km =\",round(sigma_m,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse Broadening due to material dispersion in ns/Km = 0.1\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.5:Pg-2.35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "L= 5.0 # in KM\n", + "n1= 1.5 \n", + "dele= 0.01 \n", + "c= 3*10**8 # in m/s\n", + "delta_t = (L*n1*dele)/c \n", + "delta_t=delta_t*10**12 # convertin to nano secs...\n", + "print \" The delay difference in ns =\",round(delta_t,1)\n", + "sigma= L*n1*dele/(2*math.sqrt(3)*c) \n", + "sigma=sigma*10**12 # convertin to nano secs...\n", + "print \" \\n\\nThe r.m.s pulse broadening in ns =\",round(sigma,2) \n", + "B= 0.2/sigma*1000 # in Mz\n", + "print \" \\n\\nThe maximum bit rate in MBits/sec =\",round(B,2) \n", + "BLP = B*5 \n", + "print \" \\n\\nThe Bandwidth-Length in MHz.Km =\",round(BLP,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The delay difference in ns = 250.0\n", + " \n", + "\n", + "The r.m.s pulse broadening in ns = 72.17\n", + " \n", + "\n", + "The maximum bit rate in MBits/sec = 2.77\n", + " \n", + "\n", + "The Bandwidth-Length in MHz.Km = 13.86\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.6:Pg-2.36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "del_t_inter = 5*1 \n", + "del_t_intra = 50*80*1 \n", + "total_dispersion = math.sqrt(5**2 + 0.4**2) \n", + "print \" Total dispersion in ns =\",round(total_dispersion,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total dispersion in ns = 5.016\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.1:Pg-2.37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "t= 0.1*10**-6 \n", + "L=15 \n", + "dele= t/L*10**9 # convertin to nano secs...\n", + "print \" The Pulse Dispersion in ns =\",round(dele,2) \n", + "B_opt= 1/(2*t)/10**6 # convertin to nano secs...\n", + "print \" \\n\\n The maximum possible Bandwidth in MHz =\",int(B_opt) \n", + "BLP = B_opt*L \n", + "print \" \\n\\nThe BandwidthLength product in MHz.Km =\",int(BLP) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Pulse Dispersion in ns = 6.67\n", + " \n", + "\n", + " The maximum possible Bandwidth in MHz = 5\n", + " \n", + "\n", + "The BandwidthLength product in MHz.Km = 75\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.2:Pg-2.38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "L= 6 \n", + "n1= 1.5 \n", + "delt= 0.01 \n", + "delta_t = L*n1*delt/(3*10**8)*10**12 # convertin to nano secs...\n", + "print \" The delay difference in ns =\",int(delta_t) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The delay difference in ns = 300\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.3:Pg-2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Lb= 0.09 \n", + "lamda= 1.55*10**-6 \n", + "delta_lamda = 1*10**-9 \n", + "Bf= lamda/Lb \n", + "Lbc= lamda**2/(Bf*delta_lamda) \n", + "print \" The modal Bifriengence in meters =\",round(Lbc,2) \n", + "beta_xy= 2*math.pi/Lb \n", + "print \" \\n\\nThe difference between propogation constants =\",round(beta_xy,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The modal Bifriengence in meters = 139.5\n", + " \n", + "\n", + "The difference between propogation constants = 69.81\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.4:Pg-2.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "t= 0.1*10**-6 \n", + "B_opt= 1/(2*t)/1000000 \n", + "print \" The maximum possible Bandwidth in MHz =\",int(B_opt) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum possible Bandwidth in MHz = 5\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.7.5:Pg-2.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "t= 0.1*10**-6 \n", + "B_opt= 1/(2*t)/1000000 \n", + "print \" The maximum possible Bandwidth in MHz =\",int(B_opt) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum possible Bandwidth in MHz = 5\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter3.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter3.ipynb new file mode 100755 index 00000000..1e7a6431 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter3.ipynb @@ -0,0 +1,826 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c5868fa547e8a659e03148d4a7bf0c9a34282713a490e0b68c5b0aa98a2f7e8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter03:Optical Sources and Transmitters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.1:Pg-3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x= 0.07 \n", + "Eg= 1.424+1.266*x+0.266*x**2 \n", + "lamda= 1.24/Eg \n", + "print \" The emitted wavelength in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The emitted wavelength in um = 0.82\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.2:Pg-3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x= 0.26 \n", + "y=0.57 \n", + "Eg= 1.35-0.72*y+0.12*y**2 \n", + "lamda = 1.24/Eg \n", + "print \" The wavelength emitted in um =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The wavelength emitted in um = 1.27\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.3:Pg-3.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Tr = 60*10**-9 # radiative recombination time\n", + "Tnr= 90*10**-9 # non radiative recomb time\n", + "I= 40*10**-3 # current\n", + "t = Tr*Tnr/(Tr+Tnr) # total recomb time\n", + "t=t*10**9 # Converting in nano secs...\n", + "print \" The total carrier recombination life time in ns =\",int(t) \n", + "t=t/10**9 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "lamda= 0.87*10**-6 \n", + "Pint=(t/Tr)*((h*c*I)/(q*lamda)) \n", + "Pint=Pint*1000 # converting inmW...\n", + "print \" \\n\\nThe Internal optical power in mW =\",round(Pint,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total carrier recombination life time in ns = 36\n", + " \n", + "\n", + "The Internal optical power in mW = 34.22\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.4:Pg-3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 1310*10**-9 \n", + "Tr= 30*10**-9 \n", + "Tnr= 100*10**-9 \n", + "I= 40*10**-3 \n", + "t= Tr*Tnr/(Tr+Tnr) \n", + "t=t*10**9 # converting in nano secs...\n", + "print \" Bulk recombination life time in ns =\",round(t,2) \n", + "t=t/10**9 \n", + "n= t/Tr \n", + "print \" \\n\\nInternal quantum efficiency =\",round(n,3) \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "Pint=(0.769*h*c*I)/(q*lamda)*1000 \n", + "print \" \\n\\nThe internal power level in mW =\",round(Pint,3) \n", + "print \" \\n\\n***NOTE: Internal Power wrong in text book.. Calculation Error..\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Bulk recombination life time in ns = 23.08\n", + " \n", + "\n", + "Internal quantum efficiency = 0.769\n", + " \n", + "\n", + "The internal power level in mW = 29.131\n", + " \n", + "\n", + "***NOTE: Internal Power wrong in text book.. Calculation Error..\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.5:Pg-3.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "nx= 3.6 \n", + "TF= 0.68 \n", + "n= 0.3 \n", + " # Pe=Pint*TF*1/(4*nx**2) \n", + " # ne= Pe/Px*100 ..eq0\n", + " # Pe = 0.013*Pint # Eq 1\n", + " # Pint = n*P # Eq 2\n", + " # substitute eq2 and eq1 in eq0\n", + "ne = 0.013*0.3*100 \n", + "print \" The external Power efficiency in % =\",round(ne,3) \n", + " # Wrongly printed in textbook. it should be P instead of Pint in last step\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The external Power efficiency in % = 0.39\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.6:Pg-3.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda= 0.85*10**-6 \n", + "Nint = 0.60 \n", + "I= 20*10**-3 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "e=1.602*10**-19 \n", + "Pint = Nint*h*c*I/(e*lamda) \n", + "print \" The optical power emitted in W =\",round(Pint,4) \n", + "\n", + "TF= 0.68 \n", + "nx= 3.6 \n", + "Pe= Pint*TF/(4*nx**2)*1000000 \n", + "print \" \\n\\nPower emitted in the air in uW =\",round(Pe,1) \n", + "Pe=Pe/1000000 \n", + "Nep=Pe/Pint*100 \n", + "print \" \\n\\nExternal power efficiency in % =\",round(Nep,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical power emitted in W = 0.0175\n", + " \n", + "\n", + "Power emitted in the air in uW = 229.7\n", + " \n", + "\n", + "External power efficiency in % = 1.3\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.7:Pg-3.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 0.87*10**-6 \n", + "Tr= 50*10**-9 \n", + "I= 0.04 \n", + "Tnr= 110*10**-9 \n", + "t= Tr*Tnr/(Tr+Tnr) \n", + "t=t*10**9 # converting in ns...\n", + "print \" Total carrier recombination life time in ns =\",round(t,2) \n", + "t=t/10**9 \n", + "h= 6.625*10**-34 # plancks const\n", + "c= 3*10**8 \n", + "q=1.602*10**-19 \n", + "n= t/Tr \n", + "print \" \\n\\nThe efficiency in % \",round(n,3) \n", + "Pint=(n*h*c*I)/(q*lamda)*1000 \n", + "print \" \\n\\nInternal power generated in mW =\",round(Pint,2) \n", + "print \" \\n\\n***NOTE- Internal Power wrong in book... \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total carrier recombination life time in ns = 34.38\n", + " \n", + "\n", + "The efficiency in % 0.688\n", + " \n", + "\n", + "Internal power generated in mW = 39.22\n", + " \n", + "\n", + "***NOTE- Internal Power wrong in book... \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2.8:Pg-3.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + " \n", + "\n", + "V= 2 \n", + "I= 100*10**-3 \n", + "Pc= 2*10**-3 \n", + "P= V*I \n", + "Npc= Pc/P*100 \n", + "print \" The overall power conversion efficiency in % =\",int(Npc) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The overall power conversion efficiency in % = 1\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.1:Pg-3.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "r1= 0.32 \n", + "r2= 0.32 \n", + "alpha= 10 \n", + "L= 500*10**-4 \n", + "temp=math.log(1/(r1*r2)) \n", + "Tgth = alpha + (temp/(2*L)) \n", + "print \" The optical gain at threshold in /cm =\",round(Tgth,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical gain at threshold in /cm = 32.79\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.2:Pg-3.27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + " \n", + "n= 3.7 \n", + "lamda = 950*10**-9 \n", + "L= 500*10**-6 \n", + "c= 3*10**8 \n", + "DELv = c/(2*L*n)*10*10**-10 # converting in GHz...\n", + "print \" The frequency spacing in GHz =\",int(DELv) \n", + "DEL_lamda= lamda**2/(2*L*n)*10**9 # converting to nm..\n", + "print \" \\n\\nThe wavelength spacing in nm =\",round(DEL_lamda,2) \n", + "\n", + "print \" \\n\\n***NOTE- The value of wavelength taken wrongly in book\" \n", + " # value of lamda taken wrongly while soving for DEL_LAMDA inthe book..\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The frequency spacing in GHz = 81\n", + " \n", + "\n", + "The wavelength spacing in nm = 0.24\n", + " \n", + "\n", + "***NOTE- The value of wavelength taken wrongly in book\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.3:Pg-3.30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Given\n", + " \n", + "L= 0.04 \n", + "n= 1.78 \n", + "lamda= 0.55*10**-6 \n", + "c= 3*10**8 \n", + "q= 2*n*L/lamda \n", + "q=q/10**5 \n", + "print \" Number of longitudinal modes =\",round(q,2),\"x 10^5\" \n", + "del_f= c/(2*n*L) \n", + "del_f=del_f*10**-9 \n", + "print \" \\n\\nThe frequency seperation in GHz =\",round(del_f,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Number of longitudinal modes = 2.59 x 10^5\n", + " \n", + "\n", + "The frequency seperation in GHz = 2.1\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.4:Pg-3.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Nt= 0.18 \n", + "V= 2.5 \n", + "Eg= 1.43 \n", + "Nep= Nt*Eg*100/V \n", + "print \" The total efficiency in % =\",round(Nep,3) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total efficiency in % = 10.296\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.5:Pg-3.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 3.6 \n", + "BETA= 21*10**-3 \n", + "alpha= 10 \n", + "L= 250*10**-4 \n", + "\n", + "r= (n-1)**2/(n+1)**2 \n", + "Jth= 1/BETA *( alpha + (math.log(1/r)/L)) \n", + "Jth=Jth/1000 # converting for displaying...\n", + "print \" The threshold current density =\",round(Jth,3),\"x 10**3\" \n", + "Jth=Jth*1000 \n", + "Ith =Jth*250*100*10**-8 \n", + "Ith=Ith*1000 # converting into mA...\n", + "print \" \\n\\nThe threshold current in mA =\",round(Ith,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The threshold current density = 2.65 x 10**3\n", + " \n", + "\n", + "The threshold current in mA = 662.4\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3.6:Pg-3.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "T= 305.0 \n", + "T0 = 160.0 \n", + "T1= 373.0\n", + "\n", + "Jth_32 = exp(T/T0) \n", + "Jth_100 = exp(T1/T0) \n", + "R_j = Jth_100/Jth_32 \n", + "print \" Ratio of current densities at 160K is =\",round(R_j,2) \n", + "print \" \\n\\n***NOTE- Wrong in book...\\nJth(100) calculated wrongly...\" \n", + "To = 55 \n", + "Jth_32_new = exp(T/To) \n", + "Jth_100_new = exp(T1/To) \n", + "R_j_new = Jth_100_new/Jth_32_new \n", + "print \" \\n\\nRatio of current densities at 55K is \",round(R_j_new,2) \n", + " # wrong in book...\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Ratio of current densities at 160K is = 1.53\n", + " \n", + "\n", + "***NOTE- Wrong in book...\n", + "Jth(100) calculated wrongly...\n", + " \n", + "\n", + "Ratio of current densities at 55K is 3.44\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.1:Pg-3.42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "Bo= 150 \n", + "rs= 35*10**-4 \n", + "a1= 25*10**-6 \n", + "NA= 0.20 \n", + "a2= 50*10**-6 \n", + "\n", + "Pled = (a1/rs)**2 * (math.pi**2*rs**2*Bo*NA**2) \n", + "Pled=Pled*10**10 # converting in uW...\n", + "print \" The power coupled inthe fibre in uW =\",int(Pled) \n", + "Pled_new = (math.pi**2*rs**2*Bo*NA**2) \n", + "Pled_new=Pled_new*10**6 # converting in uW...\n", + "print \" \\n\\nThe Power coupled for case 2 in uW =\",round(Pled_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The power coupled inthe fibre in uW = 370\n", + " \n", + "\n", + "The Power coupled for case 2 in uW = 725.42\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.2:Pg-3.43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "n= 1.48 \n", + "n1= 3.6 \n", + "R= (n1-n)**2/(n1+n)**2 \n", + "print \" The Fresnel Reflection is \",round(R,4) \n", + "L= -10*math.log10(1-R) \n", + "print \" \\n\\nPower loss in dB =\",round(L,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Fresnel Reflection is 0.1742\n", + " \n", + "\n", + "Power loss in dB = 0.83\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.3:Pg-3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "NA= 0.20 \n", + "Bo= 150 \n", + "rs= 35*10**-6 \n", + "Pled = math.pi**2*rs**2*Bo*NA**2 \n", + "Pled=Pled*10**10 # convertin in uW for displaying...\n", + "print \" The optical power coupled in uW =\",round(Pled,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The optical power coupled in uW = 725.42\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.4:Pg-3.44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "n1= 1.5 \n", + "n=1 \n", + "R= (n1-n)**2/(n1+n)**2 \n", + "L= -10*math.log10(1-R) \n", + " # Total loss is twice due to reflection\n", + "L= L+L \n", + "print \" Total loss due to Fresnel Reflection in dB =\",round(L,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Total loss due to Fresnel Reflection in dB = 0.35\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4.5:Pg-3.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + " \n", + "n1= 1.5 \n", + "n=1.0 \n", + "y=5.0 \n", + "a= 25.0 \n", + "temp1=(1-(y/(2*a)**2))**0.5 \n", + "temp1=temp1*(y/a) \n", + "temp=2*math.acos(0.9996708) # it should be acos(0.1) actually... due to approximations\n", + " \n", + " # answer varies a lot... \n", + "temp=math.degrees(temp)-temp1 \n", + " # temp=temp \n", + "tem= 16*(1.5**2)/(2.5**4) \n", + "tem=tem/math.pi \n", + "temp=temp*tem \n", + "Nlat= temp \n", + "print \" The Coupling efficiency is =\",round(Nlat,3) \n", + "L= -10*math.log10(Nlat) \n", + "print \" \\n\\nThe insertion loss in dB =\",round(L,2) \n", + "temp1=(1-(y/(2*a)**2))**0.5 \n", + "temp1=temp1*(y/a) \n", + "temp=2*math.acos(0.9996708) # it should be acos(0.1) actually... due to approximations\n", + " # answer varies a lot... \n", + "temp=math.degrees(temp)-temp1 \n", + "temp=temp/math.pi \n", + "N_new =temp \n", + "print \" \\n\\nEfficiency when joint index is matched =\",round(N_new,3) \n", + "L_new= -10*math.log10(N_new) \n", + "print \" \\n\\nThe new insertion loss in dB =\",round(L_new,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Coupling efficiency is = 0.804\n", + " \n", + "\n", + "The insertion loss in dB = 0.95\n", + " \n", + "\n", + "Efficiency when joint index is matched = 0.872\n", + " \n", + "\n", + "The new insertion loss in dB = 0.59\n" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter4.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter4.ipynb new file mode 100755 index 00000000..9dca6b9e --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter4.ipynb @@ -0,0 +1,644 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e29ad753b5f2886d343bb74ecb0ecc91fcb2a9898826cbfcabd7e953e57d2f63" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter04: Optical Detectors and Receivers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.1:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Eg= 1.1 \n", + "lamda_c = 1.24/Eg \n", + "print \"The cut off wavelength in um= \",round(lamda_c,2) \n", + "\n", + "Eg_ger =0.67 \n", + "lamda_ger= 1.24/Eg_ger \n", + "print \" \\nThe cut off wavelength for Germanium in um= \",round(lamda_ger,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off wavelength in um= 1.13\n", + " \n", + "The cut off wavelength for Germanium in um= 1.85\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.2:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given \n", + "Eg = 1.43 \n", + "lamda = 1.24/Eg \n", + "lamda=lamda*1000 # converting in nm\n", + "print \"The cut off wavelength in nm =\",round(lamda,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut off wavelength in nm = 867.13\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.3:Pg-4.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "P = 6*10**6 \n", + "Eh_pair= 5.4*10**6 \n", + "n= Eh_pair/P*100 \n", + "print \" The quantum efficiency in % = \",n \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The quantum efficiency in % = 90.0\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.4:Pg-4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R= 0.65 \n", + "P0= 10*10**-6 \n", + "Ip= R*P0 \n", + "Ip=Ip*10**6 # convertinf in uA...\n", + "print \" The generated photocurrent in uA = \",Ip \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The generated photocurrent in uA = 6.5\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.5:Pg-4.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Ec= 1.2*10**11 \n", + "P= 3*10**11 \n", + "lamda = 0.85*10**-6 \n", + "n= Ec/P*100 \n", + "print \"The efficiency in % =\",n \n", + "\n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "n= n/100 \n", + "R= n*q*lamda/(h*c) \n", + "print \" \\n\\nThe Responsivity of the photodiode in A/W=\",round(R ,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency in % = 40.0\n", + " \n", + "\n", + "The Responsivity of the photodiode in A/W= 0.2741\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.6:Pg-4.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 0.65 \n", + "E= 1.5*10**-19 \n", + "Ip= 2.5*10**-6 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "lamda= h*c/E \n", + "lamda=lamda*10**6 # converting in um for displaying...\n", + "print \"The wavelength in um =\",lamda \n", + "lamda=lamda*10**-6 \n", + "q= 1.602*10**-19 \n", + "R= n*q*lamda/(h*c) \n", + "print \"\\nThe Responsivity in A/W =\",R \n", + "Pin= Ip/R \n", + "Pin=Pin*10**6 # converting in uW for displaying/..\n", + "print \" \\nThe incidnt power in uW= \",round(Pin,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength in um = 1.325\n", + "\n", + "The Responsivity in A/W = 0.6942\n", + " \n", + "The incidnt power in uW= 3.6\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.7:Pg-4.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Iin= 1 \n", + "lamda= 1550*10**-9 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "n=0.65 \n", + "Ip=n*q*lamda*Iin/(h*c) \n", + "Ip=Ip*1000 # converting in mA for displaying...\n", + "print \" The average photon current in mA= \",int(Ip)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The average photon current in mA= 812\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.1.8:Pg-4.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "n= 0.70 \n", + "Ip= 4*10**-6 \n", + "e= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "E= 1.5*10**-19\n", + "lamda = h*c/E \n", + "lamda=lamda*10**6 # converting um for displaying...\n", + "print \"The wavelength in um =\",round(lamda,3) \n", + "R= n*e/E \n", + "Po= Ip/R \n", + "Po=Po*10**6 # converting um for displaying...\n", + "print \" \\nIncident optical Power in uW =\",round(Po,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength in um = 1.325\n", + " \n", + "Incident optical Power in uW = 5.35\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2.1:Pg-4.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ct= 7*10.0**-12\n", + "Rt= 50*1*10.0**6/(50+(1*10**6))\n", + "B= 1/(2*math.pi*Rt*Ct)\n", + "B=B*10**-6 #converting in mHz for displaying...\n", + "print \"The bandwidth of photodetector in MHz =\",round(B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The bandwidth of photodetector in MHz = 454.75\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.2.2:Pg-4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "W= 25*10**-6 \n", + "Vd= 3*10**4 \n", + "Bm= Vd/(2*math.pi*W) \n", + "RT= 1/Bm \n", + "RT=RT*10**9 # converting ns for displaying...\n", + "print \" The maximum response time in ns =\",round(RT,2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The maximum response time in ns = 5.24\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex4.2.3:Pg-4.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "e= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "v= 3*10**8 \n", + "n=0.65 \n", + "I= 10*10**-6 \n", + "lamda= 900*10**-9 \n", + "R= n*e*lamda/(h*v) \n", + "Po= 0.5*10**-6 \n", + "Ip= Po*R \n", + "M= I/Ip \n", + "print \" The multiplication factor =\",round(M,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The multiplication factor = 42.41\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.3.1:Pg-4.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "n=0.65 \n", + "lamda = 900*10**-9 \n", + "Pin= 0.5*10**-6 \n", + "Im= 10*10**-6 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "R= n*q*lamda/(h*c) \n", + "Ip= R*Pin \n", + "M= Im/Ip \n", + "print \" The multiplication factor =\",round(M,2)\n", + "print \"\\n***NOTE-Answer wrong in textbook...\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The multiplication factor = 42.41\n", + "\n", + "***NOTE-Answer wrong in textbook...\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.6.1:Pg-4.34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "lamda = 1300*10**-9 \n", + "Id= 4*10**-9 \n", + "n=0.9 \n", + "Rl= 1000 \n", + "Pincident= 300*10**-9 \n", + "BW= 20*10**6 \n", + "q= 1.602*10**-19 \n", + "h= 6.625*10**-34 \n", + "v= 3*10**8 \n", + "Iq= math.sqrt((q*Pincident*n*lamda)/(h*v)) \n", + "Iq= math.sqrt(Iq) \n", + "Iq=Iq*100 # converting in proper format for displaying...\n", + "print \"Mean square quantum noise current in Amp*10^11 =\",round(Iq,2)\n", + "I_dark= 2*q*BW*Id \n", + "I_dark=I_dark*10**19 # converting in proper format for displaying...\n", + "print \" \\nMean square dark current in Amp*10^-19 =\",round(I_dark,3) \n", + "k= 1.38*10**-23 \n", + "T= 25+273 \n", + "It= 4*k*T*BW/Rl \n", + "It=It*10**16 # converting in proper format for displaying...\n", + "print \" \\nMean square thermal nise current in Amp*10^-16 =\",round(It,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean square quantum noise current in Amp*10^11 = 2.31\n", + " \n", + "Mean square dark current in Amp*10^-19 = 0.256\n", + " \n", + "Mean square thermal nise current in Amp*10^-16 = 3.29\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.1:Pg-4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "lamda = 850*10**-9 # meters\n", + "BER= 1*10**-9 \n", + "N_bar = 9*log(10) \n", + "h= 6.625*10**-34 # joules-sec\n", + "v= 3*10**8 # meters/sec\n", + "n= 0.65 # assumption\n", + "E=N_bar*h*v/(n*lamda) \n", + "E=E*10**18 # /converting in proper format for displaying...\n", + "print \" The Energy received in Joules*10^-18 =\",round(E,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Energy received in Joules*10^-18 = 7.45\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.2:Pg-4.39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "lamda = 850*10**-9 \n", + "BER = 1*10**-9 \n", + "BT=10*10**6 \n", + "h= 6.625*10**-34 \n", + "c= 3*10**8 \n", + "Ps= 36*h*c*BT/lamda \n", + "Ps=Ps*10**12 # /converting in proper format for displaying...\n", + "print \"The minimum incidental optical power required id in pW =\",round(Ps,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum incidental optical power required id in pW = 84.18\n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4.8.3:Pg-4.40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "C= 5*10**-12 \n", + "B =50*10**6 \n", + "Ip= 1*10**-7 \n", + "e= 1.602*10**-19 \n", + "k= 1.38*10**-23 \n", + "T= 18+273 \n", + "M= 1 \n", + "Rl= 1/(2*math.pi*C*B) \n", + "S_N= Ip**2/((2*e*B*Ip)+(4*k*T*B/Rl)) \n", + "S_N = 10*math.log10(S_N) # in db\n", + "print \" The S/N ratio in dB =\",round(S_N,2) \n", + "M=41.54 \n", + "S_N_new= (M**2*Ip**2)/((2*e*B*Ip*M**2.3)+(4*k*T*B/Rl)) \n", + "S_N_new = 10*math.log10(S_N_new) # in db\n", + "print \" \\n\\nThe new S/N ratio in dB =\",round(S_N_new,2)\n", + "print \" \\n\\nImprovement over M=1 in dB =\",round(S_N_new-S_N,1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The S/N ratio in dB = 8.99\n", + " \n", + "\n", + "The new S/N ratio in dB = 32.49\n", + " \n", + "\n", + "Improvement over M=1 in dB = 23.5\n" + ] + } + ], + "prompt_number": 70 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter5.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter5.ipynb new file mode 100755 index 00000000..3915a0b4 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter5.ipynb @@ -0,0 +1,458 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b4a79f107959b9c220fb0fbffb78f81a806979a06263be16ca010cadce8d4a27" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter05: Design Considerations in Optical Links" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.1:Pg-5.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "B= 15*10**-6 \n", + "L= 4 \n", + "BER= 1*10**-9 \n", + "Ls= 0.5 \n", + "Lc= 1.5 \n", + "alpha= 6 \n", + "Pm= 8 \n", + "Pt= 2*Lc +(alpha*L)+(Pm) \n", + "print \" The actual loss in fibre in dB =\",int(Pt) \n", + "Pmax = -10-(-50) \n", + "print \" \\nThe maximum allowable system loss in dBm = \",Pmax " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The actual loss in fibre in dB = 35\n", + " \n", + "The maximum allowable system loss in dBm = 40\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.2:Pg-5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ps= 0.1 \n", + "alpha = 6 \n", + "L= 0.5 \n", + "Ps = 10*math.log10(Ps) \n", + "NA= 0.25 \n", + "Lcoupling= -10*math.log10(NA**2) \n", + "Lf= alpha*L \n", + "lc= 2*2 \n", + "Pm= 4 \n", + "Pout = Ps-(Lcoupling+Lf+lc+Pm) \n", + "print \" The actual power output in dBm = \",int(Pout) \n", + "Pmin = -35 \n", + "print \" Minimum input power required in dBm= \",Pmin \n", + "print \" As Pmin > Pout, system will perform adequately over the system operating life.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The actual power output in dBm = -33\n", + " Minimum input power required in dBm= -35\n", + " As Pmin > Pout, system will perform adequately over the system operating life.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.3:Pg-5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "Ps= 5 \n", + "Lcoupling = 3 \n", + "Lc= 2 \n", + "L_splicing = 50*0.1 \n", + "F_atten = 25 \n", + "L_total = Lcoupling+Lc+L_splicing+F_atten \n", + "P_avail = Ps-L_total \n", + "sensitivity = -40 \n", + "loss_margin = -sensitivity-(-P_avail) \n", + "print \" The loss margin of the system in dBm= -\",loss_margin \n", + "sensitivity_fet = -32 \n", + "loss_margin_fet=-sensitivity_fet-(-P_avail) \n", + "print \"The loss marging for the FET receiver in dBm= -\",loss_margin_fet \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The loss margin of the system in dBm= - 10.0\n", + "The loss marging for the FET receiver in dBm= - 2.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.4:Pg-5.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "LED_output = 3 \n", + "PIN_sensitivity = -54 \n", + "allowed_loss= LED_output -(-PIN_sensitivity) \n", + "Lcoupling = 17.5 \n", + "cable_atten = 30 \n", + "power_margin_coupling= 39.5 \n", + "power_margin_splice=6.2 \n", + "power_margin_cable=9.5 \n", + "final_margin= power_margin_coupling+power_margin_splice+power_margin_cable \n", + "print \" The safety margin in dB =\",final_margin\n", + " # Answer in book is wrong...\n", + "print \" \\n***NOTE- Answer wrong in book...\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The safety margin in dB = 55.2\n", + " \n", + "***NOTE- Answer wrong in book...\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.3.5:Pg-5.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "optical_power=-10 \n", + "receiver_sensitivity=-41 \n", + "total_margin= optical_power-receiver_sensitivity \n", + "cable_loss= 7*2.6 \n", + "splice_loss= 6*0.5 \n", + "connector_loss= 1*1.5 \n", + "safety_margin= 6 \n", + "total_loss= cable_loss+splice_loss+connector_loss+safety_margin \n", + "excess_power_margin= total_margin-total_loss \n", + "print \" The system is viable and provides excess power margin in dB=\",excess_power_margin \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system is viable and provides excess power margin in dB= 2.3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.1:Pg-5.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ttx= 15 \n", + "Tmat=21 \n", + "Tmod= 3.9 \n", + "BW= 25.0 \n", + "Trx= 350.0/BW \n", + "\n", + "Tsys = math.sqrt(Ttx**2+Tmat**2+Tmod**2+Trx**2) \n", + "print \" The system rise time in ns.= \",round(Tsys,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system rise time in ns.= 29.62\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.2:Pg-5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "\n", + "Ttrans = 1.75*10**-9 \n", + "Tled = 3.50*10**-9 \n", + "Tcable=3.89*10**-9 \n", + "Tpin= 1*10**-9 \n", + "Trec= 1.94*10**-9 \n", + "Tsys= math.sqrt(Ttrans**2+Tled**2+Tcable**2+Tpin**2+Trec**2) \n", + "Tsys=Tsys*10**9 # converting in ns for dislaying...\n", + "print \" The system rise time in ns= \",round(Tsys,2)\n", + "Tsys=Tsys*10**-9 \n", + "BW= 0.35/Tsys \n", + "BW=BW/1000000.0 # converting in MHz for dislaying...\n", + "print \" \\nThe system bandwidth in MHz =\",round(BW,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The system rise time in ns= 5.93\n", + " \n", + "The system bandwidth in MHz = 58.99\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.3:Pg-5.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ttx= 8*10**-9 \n", + "Tintra= 1*10**-9 \n", + "Tmodal=5*10**-9 \n", + "Trr= 6*10**-9 \n", + "Tsys= math.sqrt(Ttx**2+(8*Tintra)**2+(8*Tmodal)**2+Trr**2) \n", + "\n", + "BWnrz= 0.7/Tsys \n", + "BWnrz=BWnrz/1000000 # converting in ns for dislaying...\n", + "BWrz=0.35/Tsys \n", + "BWrz=BWrz/1000000 # converting in ns for dislaying...\n", + "print \" Maximum bit rate for NRZ format in Mb/sec= \",round(BWnrz,2)\n", + "print \" \\nMaximum bit rate for RZ format in Mb/sec= \",round(BWrz,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Maximum bit rate for NRZ format in Mb/sec= 16.67\n", + " \n", + "Maximum bit rate for RZ format in Mb/sec= 8.33\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.4.4:Pg-5.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "Ts= 10*10**-9 \n", + "Tn=9*10**-9 \n", + "Tc=2*10**-9 \n", + "Td=3*10**-9 \n", + "BW= 6*10**6 \n", + "Tsyst= 1.1*math.sqrt(Ts**2+(5*Tn)**2+(5*Tc)**2+Td**2) \n", + "Tsyst=Tsyst*10**9 # converting in ns for displying...\n", + "Tsyst_max = 0.35/BW \n", + "Tsyst_max=Tsyst_max*10**9 # converting in ns for displying...\n", + "print \" Rise system of the system in ns= \",round(Tsyst,2)\n", + "print \" \\nMaximum Rise system of the system in ns= \",round(Tsyst_max,2)\n", + "print \" \\nSpecified components give a system rise time which is adequate for the bandwidth and distance requirements of the optical fibre link.\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Rise system of the system in ns= 51.99\n", + " \n", + "Maximum Rise system of the system in ns= 58.33\n", + " \n", + "Specified components give a system rise time which is adequate for the bandwidth and distance requirements of the optical fibre link.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5.5.1:Pg-5.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "\n", + "del_t_1 = 10*100*10**-9 \n", + "Bt_nrz_1 = 0.7/(del_t_1*1000000) \n", + "Bt_rz_1 = 0.35/(del_t_1*1000000) \n", + "print \"First case.\"\n", + "print \" \\nBit rate for nrz in Mb/sec= \",Bt_nrz_1 \n", + "print \" \\nBit rate for rz in Mb/sec= \",Bt_rz_1 \n", + "del_t_2 = 20*1000*10**-9 \n", + "Bt_nrz_2 = 0.7/(del_t_2*1000000) \n", + "Bt_rz_2 = 0.35/(del_t_2*1000000) \n", + "print \" \\n\\nSecond case\" \n", + "print \" \\nBit rate for nrz in Mb/sec= \",Bt_nrz_2 \n", + "print \" \\nBit rate for rz in Mb/sec= \",Bt_rz_2 \n", + "del_t_3 = 2*2000*10**-9 \n", + "Bt_nrz_3 = 0.7/(del_t_3*1000) \n", + "Bt_rz_3 = 0.35/(del_t_3*1000) \n", + "print \" \\n\\nThird case\" \n", + "print \" \\nBit rate for nrz in BITS/sec= \",int(Bt_nrz_3) \n", + "print \" \\nBit rate for rz in BITS/sec= \",Bt_rz_3 \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First case.\n", + " \n", + "Bit rate for nrz in Mb/sec= 0.7\n", + " \n", + "Bit rate for rz in Mb/sec= 0.35\n", + " \n", + "\n", + "Second case\n", + " \n", + "Bit rate for nrz in Mb/sec= 0.035\n", + " \n", + "Bit rate for rz in Mb/sec= 0.0175\n", + " \n", + "\n", + "Third case\n", + " \n", + "Bit rate for nrz in BITS/sec= 174\n", + " \n", + "Bit rate for rz in BITS/sec= 87.5\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6-Advanced_Optical_Systems.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6-Advanced_Optical_Systems.ipynb new file mode 100755 index 00000000..b0cb88b7 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6-Advanced_Optical_Systems.ipynb @@ -0,0 +1,317 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ac520a54154462ad172aef8bbb865642cb1f987c781ea69ea1084ba6e27e7f6b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06: Advanced Optical Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5.1:Pg-6.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "lamda_p= 980*10**-9 \n", + "lamda_s=1550*10**-9 \n", + "P_in=30 # in mW....\n", + "G=100 \n", + "\n", + "Ps_max= ((lamda_p*P_in)/lamda_s)/(G-1) \n", + "print \" \\nMaximum input power in mW = \",round(Ps_max,5) \n", + " \n", + "Ps_out= Ps_max + (lamda_p*P_in/lamda_s) \n", + "Ps_out= 10*math.log10(Ps_out) \n", + "print \" \\n\\nOutput power in dBm = \",round(Ps_out,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "Maximum input power in mW = 0.19159\n", + " \n", + "\n", + "Output power in dBm = 12.82\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5.2:Pg-6.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "Ps_out= 30.0 # in uW...\n", + "Ps_in=1.0 \n", + "Noise_power = 0.5 \n", + "\n", + "G= Ps_out/Ps_in \n", + "\n", + "G= 10*math.log10(G) \n", + "print \" \\nThe Gain EDFA in dB = \",round(G,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "The Gain EDFA in dB = 14.77\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.1:Pg-6.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "P0=200.0 \n", + "P1=90.0 \n", + "P2=85.0 \n", + "P3=6.3 \n", + " # All powers in uW...\n", + "coupling_ratio= P2/(P1+P2)*100 \n", + "print \" \\n\\n Coupling Ratio in % = \",round(coupling_ratio,2) \n", + "excess_ratio= 10*math.log10(P0/(P1+P2))\n", + "print \" \\n\\n The Excess Ratio in % = \",round(excess_ratio,4) \n", + "insertion_loss=10*math.log10(P0/P1) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n", + "insertion_loss1=10*math.log10(P0/P2) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 2) in dB= \",round(insertion_loss1,2) \n", + "cross_talk=10*math.log10(P3/P0) \n", + "print \" \\n\\n The Cross Talk in dB= \",int(cross_talk) \n", + "print \" \\n\\n***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "\n", + " Coupling Ratio in % = 48.57\n", + " \n", + "\n", + " The Excess Ratio in % = 0.5799\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 1) in dB= 3.47\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 2) in dB= 3.72\n", + " \n", + "\n", + " The Cross Talk in dB= -15\n", + " \n", + "\n", + "***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.2:Pg-6.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "P0= 300.0 \n", + "P1=150.0 \n", + "P2=65.0 \n", + "P3=8.3*10**-3 \n", + " # All powers in uW...\n", + "splitting_ratio= P2/(P1+P2)*100 \n", + "print \" \\n\\n Splitting Ratio in %= \",round(splitting_ratio,2) \n", + "excess_ratio= 10*math.log10(P0/(P1+P2))\n", + "print \" \\n\\n The Excess Ratio in dB= \",round(excess_ratio,4)\n", + "insertion_loss=10*math.log10(P0/P1) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n", + "cross_talk=10*math.log10(P3/P0) \n", + "print \" \\n\\n The Cross Talk in dB= \",round(cross_talk,2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "\n", + " Splitting Ratio in %= 30.23\n", + " \n", + "\n", + " The Excess Ratio in dB= 1.4468\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 1) in dB= 3.01\n", + " \n", + "\n", + " The Cross Talk in dB= -45.58\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.3:Pg-6.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "N=32.0 \n", + "Ft=(100-5)/100.0 \n", + "Total_loss= 10*(1-3.322*math.log10(Ft))*math.log10(N) \n", + "print \" The total loss in the coupler in dB = \",round(Total_loss,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total loss in the coupler in dB = 16.17\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.4:Pg-6.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=10 \n", + "L=0.5 \n", + "alpha=0.4 \n", + "Lthru=0.9 \n", + "Lc=1 \n", + "Ltap=10 \n", + "Li=0.5 \n", + "Total_loss= N*(alpha*L +2*Lc +Lthru+Li)-(alpha*L)-(2*Lthru)+(2*Ltap) \n", + "print \" The total loss in the coupler in dB = \",int(Total_loss)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total loss in the coupler in dB = 54\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.11.1:Pg-6.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "del_v=10*10**9 \n", + "N_eff= 1.5 \n", + "c=3*10**11 # speed of light in mm/sec\n", + "del_L= c/(2*N_eff*del_v) \n", + "print \" The wave guide length differenc in mm= \",int(del_L) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The wave guide length differenc in mm= 10\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6.ipynb b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6.ipynb new file mode 100755 index 00000000..b0cb88b7 --- /dev/null +++ b/_Optical_Fiber_Communication_by_V._S._Bagad/Chapter6.ipynb @@ -0,0 +1,317 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ac520a54154462ad172aef8bbb865642cb1f987c781ea69ea1084ba6e27e7f6b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06: Advanced Optical Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5.1:Pg-6.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "lamda_p= 980*10**-9 \n", + "lamda_s=1550*10**-9 \n", + "P_in=30 # in mW....\n", + "G=100 \n", + "\n", + "Ps_max= ((lamda_p*P_in)/lamda_s)/(G-1) \n", + "print \" \\nMaximum input power in mW = \",round(Ps_max,5) \n", + " \n", + "Ps_out= Ps_max + (lamda_p*P_in/lamda_s) \n", + "Ps_out= 10*math.log10(Ps_out) \n", + "print \" \\n\\nOutput power in dBm = \",round(Ps_out,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "Maximum input power in mW = 0.19159\n", + " \n", + "\n", + "Output power in dBm = 12.82\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.5.2:Pg-6.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given\n", + "import math\n", + "Ps_out= 30.0 # in uW...\n", + "Ps_in=1.0 \n", + "Noise_power = 0.5 \n", + "\n", + "G= Ps_out/Ps_in \n", + "\n", + "G= 10*math.log10(G) \n", + "print \" \\nThe Gain EDFA in dB = \",round(G,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "The Gain EDFA in dB = 14.77\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.1:Pg-6.22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "P0=200.0 \n", + "P1=90.0 \n", + "P2=85.0 \n", + "P3=6.3 \n", + " # All powers in uW...\n", + "coupling_ratio= P2/(P1+P2)*100 \n", + "print \" \\n\\n Coupling Ratio in % = \",round(coupling_ratio,2) \n", + "excess_ratio= 10*math.log10(P0/(P1+P2))\n", + "print \" \\n\\n The Excess Ratio in % = \",round(excess_ratio,4) \n", + "insertion_loss=10*math.log10(P0/P1) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n", + "insertion_loss1=10*math.log10(P0/P2) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 2) in dB= \",round(insertion_loss1,2) \n", + "cross_talk=10*math.log10(P3/P0) \n", + "print \" \\n\\n The Cross Talk in dB= \",int(cross_talk) \n", + "print \" \\n\\n***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "\n", + " Coupling Ratio in % = 48.57\n", + " \n", + "\n", + " The Excess Ratio in % = 0.5799\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 1) in dB= 3.47\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 2) in dB= 3.72\n", + " \n", + "\n", + " The Cross Talk in dB= -15\n", + " \n", + "\n", + "***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.2:Pg-6.23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "P0= 300.0 \n", + "P1=150.0 \n", + "P2=65.0 \n", + "P3=8.3*10**-3 \n", + " # All powers in uW...\n", + "splitting_ratio= P2/(P1+P2)*100 \n", + "print \" \\n\\n Splitting Ratio in %= \",round(splitting_ratio,2) \n", + "excess_ratio= 10*math.log10(P0/(P1+P2))\n", + "print \" \\n\\n The Excess Ratio in dB= \",round(excess_ratio,4)\n", + "insertion_loss=10*math.log10(P0/P1) \n", + "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n", + "cross_talk=10*math.log10(P3/P0) \n", + "print \" \\n\\n The Cross Talk in dB= \",round(cross_talk,2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " \n", + "\n", + " Splitting Ratio in %= 30.23\n", + " \n", + "\n", + " The Excess Ratio in dB= 1.4468\n", + " \n", + "\n", + " The Insertion Loss (from Port 0 to Port 1) in dB= 3.01\n", + " \n", + "\n", + " The Cross Talk in dB= -45.58\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.3:Pg-6.25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "import math\n", + "N=32.0 \n", + "Ft=(100-5)/100.0 \n", + "Total_loss= 10*(1-3.322*math.log10(Ft))*math.log10(N) \n", + "print \" The total loss in the coupler in dB = \",round(Total_loss,2) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total loss in the coupler in dB = 16.17\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.10.4:Pg-6.28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "N=10 \n", + "L=0.5 \n", + "alpha=0.4 \n", + "Lthru=0.9 \n", + "Lc=1 \n", + "Ltap=10 \n", + "Li=0.5 \n", + "Total_loss= N*(alpha*L +2*Lc +Lthru+Li)-(alpha*L)-(2*Lthru)+(2*Ltap) \n", + "print \" The total loss in the coupler in dB = \",int(Total_loss)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The total loss in the coupler in dB = 54\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6.11.1:Pg-6.33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "del_v=10*10**9 \n", + "N_eff= 1.5 \n", + "c=3*10**11 # speed of light in mm/sec\n", + "del_L= c/(2*N_eff*del_v) \n", + "print \" The wave guide length differenc in mm= \",int(del_L) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The wave guide length differenc in mm= 10\n" + ] + } + ], + "prompt_number": 33 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..db040d9d --- /dev/null +++ b/_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 @@ -0,0 +1,174 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7aa1ee8406c474c9942e0584cd3ac7259cbb47ea5b7f0d763fa46746996a09fa" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Method of virtual work" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "m = 1000.;\t\t\t#kg, mass of krate\n", + "theta = 60.;\t\t\t#degree\n", + "theta = theta*math.pi/180;\t\t\t#radians, conversion into rad\n", + "a = 0.70;\t\t\t#m\n", + "L = 3.20;\t\t\t#m\n", + "g = 9.81;\t\t\t#m/s**2\n", + "\n", + "# Calculations\n", + "#From theory we get\n", + "W = m*g;\t\t\t#N, Weight\n", + "W = W/1000;\t\t\t#kN, conversion into kN\n", + "S = math.sqrt(a**2+L**2-2*a*L*math.cos(theta));\t\t\t#m\n", + "F_DH = W*S/L/math.tan(theta);\t\t\t#kN\n", + "\n", + "# Results\n", + "print \"Force exerted by each cylinder is F_DH = %.2f kN\"%(F_DH);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted by each cylinder is F_DH = 5.16 kN\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange\n", + "\n", + "# Given Data\n", + "m = 10.;\t\t\t#kg, mass of rim\n", + "r = 300.;\t\t\t#mm, radius of disk\n", + "a = 0.08;\t\t\t#m\n", + "b = 0.3;\t\t\t#m\n", + "k = 4.;\t\t\t#kN/m\n", + "g = 9.81;\t\t\t#m/s**2 gravity\n", + "\n", + "#From theory we get\n", + "\n", + "# Calculations and Results\n", + "#math.sin(theta) = k*a**2/m/g/b*theta\n", + "dif = 1.;\n", + "for theta in arange(0,1+0.001,.001):\n", + " dif = math.sin(math.radians(theta))-k*a**2/m/g/b*theta;\n", + " if dif <= 0.001:\n", + " print \"theta = %.3f rad or %.1f degrees\"%(theta,theta/math.pi*180);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "theta = 0.000 rad or 0.0 degrees\n", + "theta = 0.001 rad or 0.1 degrees\n", + "theta = 0.002 rad or 0.1 degrees\n", + "theta = 0.003 rad or 0.2 degrees\n", + "theta = 0.004 rad or 0.2 degrees\n", + "theta = 0.005 rad or 0.3 degrees\n", + "theta = 0.006 rad or 0.3 degrees\n", + "theta = 0.007 rad or 0.4 degrees\n", + "theta = 0.008 rad or 0.5 degrees\n", + "theta = 0.009 rad or 0.5 degrees\n", + "theta = 0.010 rad or 0.6 degrees\n", + "theta = 0.011 rad or 0.6 degrees\n", + "theta = 0.012 rad or 0.7 degrees\n", + "theta = 0.013 rad or 0.7 degrees\n", + "theta = 0.014 rad or 0.8 degrees\n", + "theta = 0.015 rad or 0.9 degrees\n", + "theta = 0.016 rad or 0.9 degrees\n", + "theta = 0.017 rad or 1.0 degrees\n", + "theta = 0.018 rad or 1.0 degrees\n", + "theta = 0.019 rad or 1.1 degrees\n", + "theta = 0.020 rad or 1.1 degrees\n", + "theta = 0.021 rad or 1.2 degrees\n", + "theta = 0.022 rad or 1.3 degrees\n", + "theta = 0.023 rad or 1.3 degrees\n", + "theta = 0.024 rad or 1.4 degrees\n", + "theta = 0.025 rad or 1.4 degrees\n", + "theta = 0.026 rad or 1.5 degrees\n", + "theta = 0.027 rad or 1.5 degrees\n", + "theta = 0.028 rad or 1.6 degrees\n", + "theta = 0.029 rad or 1.7 degrees\n", + "theta = 0.030 rad or 1.7 degrees\n", + "theta = 0.031 rad or 1.8 degrees\n", + "theta = 0.032 rad or 1.8 degrees\n", + "theta = 0.033 rad or 1.9 degrees\n", + "theta = 0.034 rad or 1.9 degrees\n", + "theta = 0.035 rad or 2.0 degrees\n", + "theta = 0.036 rad or 2.1 degrees\n", + "theta = 0.037 rad or 2.1 degrees\n", + "theta = 0.038 rad or 2.2 degrees\n", + "theta = 0.039 rad or 2.2 degrees\n", + "theta = 0.040 rad or 2.3 degrees\n", + "theta = 0.041 rad or 2.3 degrees\n", + "theta = 0.042 rad or 2.4 degrees\n", + "theta = 0.043 rad or 2.5 degrees\n", + "theta = 0.044 rad or 2.5 degrees\n", + "theta = 0.045 rad or 2.6 degrees\n", + "theta = 0.046 rad or 2.6 degrees\n", + "theta = 0.047 rad or 2.7 degrees\n", + "theta = 0.048 rad or 2.8 degrees\n", + "theta = 0.049 rad or 2.8 degrees\n", + "theta = 0.050 rad or 2.9 degrees\n", + "theta = 0.051 rad or 2.9 degrees\n", + "theta = 0.052 rad or 3.0 degrees\n", + "theta = 0.053 rad or 3.0 degrees\n", + "theta = 0.054 rad or 3.1 degrees\n", + "theta = 0.055 rad or 3.2 degrees\n", + "theta = 0.056 rad or 3.2 degrees\n", + "theta = 0.057 rad or 3.3 degrees\n", + "theta = 0.058 rad or 3.3 degrees\n", + "theta = 0.059 rad or 3.4 degrees\n", + "theta = 0.060 rad or 3.4 degrees\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..4b08c44c --- /dev/null +++ b/_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 @@ -0,0 +1,528 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9895b73315ca7349cd1efdcb61fc34b672306a1fc3e53183d1b5e1b4bb24add0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Statics of particle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "P = 40.; \t\t\t# N Magnitude of vector P\n", + "Q = 60. \t\t\t# N Magnitude of vector Q\n", + "# imagine triangle for triangle law of vectors \n", + "B = 180.-25;\t\t\t# degree , Angle between vector P and vector Q\n", + "\n", + "# Calculations and Results\n", + "#R- resultant vector\n", + "B = B*math.pi/180;\t\t\t# conversion into radian\n", + "#R**2 = P**2+Q**2-2*P*Q*math.cos(B); Comath.sine Law\n", + "R = math.sqrt(P**2+Q**2-2*P*Q*math.cos(B));\t\t\t# N\n", + "\n", + "print \"Maginitude of resultant is R = %.2f N\"%(R);\n", + "\n", + "#A- Angle between resultant and P vector, Unknown\n", + "\n", + "# math.sin(A)/Q = = math.sin(B)/R math.sine law\n", + "\n", + "A = math.asin(Q*math.sin(B)/R);\t\t\t# radian\n", + "\n", + "\n", + "A = A*180/math.pi;\t\t\t#\t\t\t# Conversion into degree\n", + "\n", + "alpha = A+20;\t\t\t# degree\n", + "print \"Angle of resultant vector R with x axis is %.2f Degrees\"%(alpha);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maginitude of resultant is R = 97.73 N\n", + "Angle of resultant vector R with x axis is 35.04 Degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "R = 25.; \t\t\t# kN Magnitude of resultant vector\n", + "alpha = 45.;\t\t\t#degree\n", + "# T1 and T2 are tensions in rope 1 and rope 2 respectively \n", + "A = 30.;\t\t\t# degree , Angle between vector T1 and resultant\n", + "B = alpha;\t\t\t# degree , Angle between vector T2 and resultant\n", + "C = 180.-(A+B);\t\t\t# degree , Angle between vector T1 and T2\n", + "\n", + "\n", + "# Calculations and Results\n", + "# conversion of angles into radian\n", + "A = A*math.pi/180;\n", + "B = B*math.pi/180;\n", + "C = C*math.pi/180;\n", + "\n", + "\n", + "# math.sin(A)/T2 = = math.sin(B)/T1 = = math.sin(C)/R .............. math.sine law\n", + "\n", + "T1 = (R*math.sin(B))/math.sin(C);\t\t\t#kN\n", + "T2 = (R*math.sin(A))/math.sin(C);\t\t\t#kN\n", + "\n", + "print \"Tension in rope 1 is T1 = %.2f kN and in rope 2 is T2 = %.2f kN \"%(T1,T2);\n", + "\n", + "# Minimum value of T2 o# Resultsurs when T1 and T2 are perpendicular to each other i.e C = 90 degree\n", + "C = 90.;\t\t\t#degree\n", + "A = 30.;\t\t\t# degree\n", + "B = 180-(A+C);\t\t\t#degrees\n", + "alpha = B;\t\t\t#degrees\n", + "B = B*math.pi/180;\t\t\t# radian\n", + "T2 = R*math.sin(B);\t\t\t# kN\n", + "T1 = R*math.cos(B);\t\t\t#kN\n", + "print \"Minimum tension in rope 2 is T2 = %.2f kN \"%(T2);\n", + "print \"corrosponding T1 = %.2f kN \"%(T1);\n", + "print \"alpha = %.2f degrees\"%(alpha);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension in rope 1 is T1 = 18.30 kN and in rope 2 is T2 = 12.94 kN \n", + "Minimum tension in rope 2 is T2 = 21.65 kN \n", + "corrosponding T1 = 12.50 kN \n", + "alpha = 60.00 degrees\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "F1 = 150.;\t\t\t# N \n", + "F2 = 80.;\t\t\t# N\n", + "F3 = 110.;\t\t\t#N\n", + "F4 = 100.\t\t\t# in N\n", + "\n", + "F1x = 129.\t\t\t#in N\n", + "F2x = -27.4\n", + "F3x = 0.\n", + "F4x = 96.6\n", + "F1y = 75.\n", + "F2y = 75.2\n", + "F3y = -110.\n", + "F4y = -25.9\n", + "\n", + "# Calculations and Results\n", + "Rx = F1x+F2x+F3x+F4x;\t\t\t#N Horizontal component of R- resultant\n", + "Ry = F1y+F2y+F3y+F4y;\t\t\t#N Vertical component of R- resultant\n", + "\n", + "#R = Rx i +Ry j\n", + "\n", + "print \"R = %.2f i + %.2f j \"%( Rx,Ry);\n", + "\n", + "alpha = math.atan(Ry/Rx);\t\t\t#Radian, Angle made by resultant with +ve x axis\n", + "alpha = alpha*180/math.pi;\t\t\t#Conversion into degrees\n", + "\n", + "R = math.sqrt(Rx**2+Ry**2);\t\t\t# N , Magnitude of resultant\n", + "print \"alpha = %.2f degrees and R = %.2f N\"%(alpha,R);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 198.20 i + 14.30 j \n", + "alpha = 4.13 degrees and R = 198.72 N\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "W = 3500.; \t\t\t# lb weight of automobile\n", + "alpha = 2.;\t\t\t#degree\n", + "# TAB and TAC are tensions in cable AB and cable AC respectively \n", + "A = 90+30.;\t\t\t# degree , Angle between vector T1 and resultant\n", + "B = alpha;\t\t\t# degree , Angle between vector T2 and resultant\n", + "C = 180-(A+B);\t\t\t# degree , Angle between vector T1 and T2\n", + "\n", + "# Calculations\n", + "# conversion of angles into radian\n", + "A = A*math.pi/180;\n", + "B = B*math.pi/180;\n", + "C = C*math.pi/180;\n", + "\n", + "# math.sin(A)/TAB = = math.sin(B)/TAC = = math.sin(C)/W .............. math.sine law\n", + "TAB = (W*math.sin(A))/math.sin(C);\t\t\t#N\n", + "TAC = (W*math.sin(B))/math.sin(C);\t\t\t#N\n", + "\n", + "# Results\n", + "print \"Tension in cable AB is TAB = %.2f lb and in Cable AC is TAC = %.2f lb \"%(TAB,TAC);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension in cable AB is TAB = 3574.19 lb and in Cable AC is TAC = 144.03 lb \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "mass = 30.;\t\t\t# kg\n", + "W = mass*9.81;\t\t\t# N, Weight of package\n", + "alpha = 15.;\t\t\t#degree\n", + "\n", + "# Calculations\n", + "alpha = alpha*math.pi/180;\t\t\t# Conversion into radian\n", + "F = W*math.sin(alpha);\t\t\t#N\n", + "\n", + "# Results\n", + "print \"F = %.2f N\"%(F);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F = 76.17 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "alpha = math.atan(7./4);\t\t\t#rad\n", + "beta = math.atan(1.5/4);\t\t\t#rad\n", + "T_AB = 200.;\t\t\t#N tension in cable AB\n", + "T_AE = -300.;\t\t\t#N, tension in cable AE\n", + "# R = T_AB+T_AC+T_AE+F_D = 0 ...Equillibrium Condition...........1\n", + "\n", + "\n", + "# Calculations\n", + "T_ABx = -T_AB*math.sin(alpha);\t\t\t# Xcomponent of T_AB\n", + "T_ABy = T_AB*math.cos(alpha);\t\t\t#Y component of T_AB\n", + "\n", + "# T_ACx = T_AC*math.sin(beta); Xcomponent of T_AC\n", + "# T_ACy = T_AC*math.cos(beta); Y component of T_AC\n", + "\n", + "# Sum Fx = 0 gives -T_AB*math.sin(alpha) N + T_AC*math.sin(beta) +F_D = 0..........2\n", + "#Sum Fy = 0 gives T_AB*math.cos(alpha) N +T_AC*math.cos(beta) +T_AE = 0................3\n", + "\n", + "T_AC = (-T_AB*math.cos(alpha)-T_AE)/math.cos(beta);\t\t\t#N, From 3\n", + "\n", + "F_D = T_AB*math.sin(alpha)-T_AC*math.sin(beta);\t\t\t#N, From 2\n", + "\n", + "# Results\n", + "print \"Value of drag force is F_D = %.2f N and tension in cable AC is T_AC = %.2f N\"%(F_D,T_AC);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of drag force is F_D = 98.36 N and tension in cable AC is T_AC = 214.42 N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "dx = -40.;\t\t\t#m\n", + "dy = 80.;\t\t\t#m\n", + "dz = 30.;\t\t\t#m\n", + "f = 2500.;\t\t\t#N, Mafnitude of force F\n", + "\n", + "# Calculations and Results\n", + "d = math.sqrt(dx**2+dy**2+dz**2);\t\t\t#m, total dismath.tance of vector AB\n", + "#F = f*lambda, lambda - unit vector = AB/d. So we can calculate each component by multiplying this unit vector\n", + "Fx = f*dx/d;\t\t\t#N , X component of F\n", + "Fy = f*dy/d;\t\t\t#N , Y component of F\n", + "Fz = f*dz/d;\t\t\t#N , Z component of F\n", + "\n", + "print \"Component of F along X axis is %.2f N\"%(Fx);\n", + "print \"Component of F along Y axis is %.2f N\"%(Fy);\n", + "print \"Component of F along Z axis is %.2f N\"%(Fz);\n", + "print \"We may write F as F = %.2f i + %.2f j + %.2f k\"%(Fx,Fy,Fz);\n", + "\n", + "thetax = math.acos(Fx/f);\t\t\t# radian , angle with +ve x axis\n", + "thetay = math.acos(Fy/f);\t\t\t# radian , angle with +ve y axis\n", + "thetaz = math.acos(Fz/f);\t\t\t# radian , angle with +ve z axis\n", + "\n", + "#Conversion of angles into degree\n", + "thetax = thetax*180/math.pi;\t\t\t#degree\n", + "thetay = thetay*180/math.pi;\t\t\t#degree\n", + "thetaz = thetaz*180/math.pi;\t\t\t#degree\n", + "\n", + "print \"Angle made by F with +ve X axis %.2f degree\"%(thetax);\n", + "\n", + "print \"Angle made by F with +ve Y axis %.2f degree\"%(thetay);\n", + "print \"Angle made by F with +ve Z axis %.2f degree\"%(thetaz);\n", + "\n", + "F = 800. \t\t\t# N , given force\n", + "theta = 145. \t\t\t# Degrees , angle with posiyive X axis \n", + "\n", + "theta = theta*math.pi/180;\t\t\t# Conversion into radian\n", + "\n", + "Fx = F*math.sin(theta);\t\t\t#N, Horizontal component\n", + "Fy = F*math.cos(theta);\t\t\t# N, Vertical Component\n", + "print \"Horizontal component of F is %.2f N\"%(Fx);\n", + "print \"Vertial component of F is %.2f N\"%(Fy);\n", + "print \"We may write F as F = %.2f i + %.2f j\"%(Fx,Fy);\n", + "\n", + "F = 300. \t\t\t# N , given force\n", + "AB = math.sqrt(8**2+6**2);\t\t\t# m Length of AB\n", + "math.cos_alpha = 8/AB;\n", + "math.sin_alpha = -6/AB;\n", + "Fx = F*math.cos_alpha;\t\t\t#N, Horizontal component\n", + "Fy = F*math.sin_alpha;\t\t\t# N, Vertical Component\n", + "print \"Fx = %.2f\"%Fx\n", + "print \"Fy = %.2f\"%Fy\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Component of F along X axis is -1060.00 N\n", + "Component of F along Y axis is 2120.00 N\n", + "Component of F along Z axis is 795.00 N\n", + "We may write F as F = -1060.00 i + 2120.00 j + 795.00 k\n", + "Angle made by F with +ve X axis 115.09 degree\n", + "Angle made by F with +ve Y axis 32.01 degree\n", + "Angle made by F with +ve Z axis 71.46 degree\n", + "Horizontal component of F is 458.86 N\n", + "Vertial component of F is -655.32 N\n", + "We may write F as F = 458.86 i + -655.32 j\n", + "Fx = 240.00\n", + "Fy = -180.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "T_AB = 4200.;\t\t\t#N , Tension in cable AB\n", + "T_AC = 6000.;\t\t\t#N , Tension in cable AC\n", + "# Vector AB = -(5m)i+(3m)j+(4m)k\n", + "#Vector Ac = -(5m)i+(3m)j+(5m)k\n", + "ABx = -5.;\t\t\t#m\n", + "ABy = 3.;\t\t\t#m\n", + "ABz = 4.;\t\t\t#m\n", + "ACx = -5.;\t\t\t#m\n", + "ACy = 3.;\t\t\t#m\n", + "ACz = -5.;\t\t\t#m\n", + "\n", + "# Calculations and Results\n", + "AB = math.sqrt((-5)**2+3**2+4**2);\t\t\t#m, Magnitude of vector AB\n", + "AC = math.sqrt((-5)**2+3**2+5**2);\t\t\t#m, Magnitude of vector AC\n", + "#vT_AB = T_AB*lambdaAB, lambdaAB - unit vector = vAB/AB. So we can calculate each component by multiplying this unit vector\n", + "T_ABx = T_AB*ABx/AB;\t\t\t#N , X component of T_AB\n", + "T_ABy = T_AB*ABy/AB;\t\t\t#N , Y component of T_AB\n", + "T_ABz = T_AB*ABz/AB;\t\t\t#N , Z component of T_AB\n", + "\n", + "print \"Component of T_AB along X axis is %.2f N\"%(T_ABx);\n", + "print \"Component of T_AB along Y axis is %.2f N\"%(T_ABy);\n", + "print \"Component of T_AB along Z axis is %.2f N\"%(T_ABz);\n", + "print \"We may write T_AB as T_AB = %.2f i + %.2f j + %.2f k\"%(T_ABx,T_ABy,T_ABz);\n", + "\n", + "#vT_AC = T_AC*lambdaAC, lambdaAC - unit vector = vAC/AC. So we can calculate each component by multiplying this unit vector\n", + "T_ACx = T_AC*ACx/AC;\t\t\t#N , X component of T_AC\n", + "T_ACy = T_AC*ACy/AC;\t\t\t#N , Y component of T_AC\n", + "T_ACz = T_AC*ACz/AC;\t\t\t#N , Z component of T_AC\n", + "\n", + "print \"Component of T_AC along X axis is %.2f N\"%(T_ACx);\n", + "print \"Component of T_AC along Y axis is %.2f N\"%(T_ACy);\n", + "print \"Component of T_AC along Z axis is %.2f N\"%(T_ACz);\n", + "print \"We may write T_AC as T_AC = %.2f i + %.2f j + %.2f k\"%(T_ACx,T_ACy,T_ACz);\n", + "\n", + "Rx = T_ABx+T_ACx;\t\t\t#N ,X component of R\n", + "Ry = T_ABy+T_ACy;\t\t\t#N ,Y component of R\n", + "Rz = T_ABz+T_ACz;\t\t\t#N ,Z component of R\n", + "\n", + "print \"Component of R along X axis is %.2f N\"%(Rx);\n", + "print \"Component of R along Y axis is %.2f N\"%(Ry);\n", + "print \"Component of R along Z axis is %.2f N\"%(Rz);\n", + "print \"We may write R as R = %.2f i + %.2f j + %.2f k\"%(Rx,Ry,Rz);\n", + "\n", + "R = math.sqrt(Rx**2+Ry**2+Rz**2);\t\t\t#N, Magnitude of resultant\n", + "\n", + "thetax = math.acos(Rx/R);\t\t\t# radian , angle with +ve x axis\n", + "thetay = math.acos(Ry/R);\t\t\t# radian , angle with +ve y axis\n", + "thetaz = math.acos(Rz/R);\t\t\t# radian , angle with +ve z axis\n", + "\n", + "#Conversion of angles into degree\n", + "thetax = thetax*180/math.pi;\t\t\t#degree\n", + "thetay = thetay*180/math.pi;\t\t\t#degree\n", + "thetaz = thetaz*180/math.pi;\t\t\t#degree\n", + "\n", + "print \"Angle made by R with +ve X axis %.2f degree\"%(thetax);\n", + "\n", + "print \"Angle made by R with +ve Y axis %.2f degree\"%(thetay);\n", + "print \"Angle made by F with +ve Z axis %.2f degree\"%(thetaz);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Component of T_AB along X axis is -2969.85 N\n", + "Component of T_AB along Y axis is 1781.91 N\n", + "Component of T_AB along Z axis is 2375.88 N\n", + "We may write T_AB as T_AB = -2969.85 i + 1781.91 j + 2375.88 k\n", + "Component of T_AC along X axis is -3905.67 N\n", + "Component of T_AC along Y axis is 2343.40 N\n", + "Component of T_AC along Z axis is -3905.67 N\n", + "We may write T_AC as T_AC = -3905.67 i + 2343.40 j + -3905.67 k\n", + "Component of R along X axis is -6875.52 N\n", + "Component of R along Y axis is 4125.31 N\n", + "Component of R along Z axis is -1529.79 N\n", + "We may write R as R = -6875.52 i + 4125.31 j + -1529.79 k\n", + "Angle made by R with +ve X axis 147.38 degree\n", + "Angle made by R with +ve Y axis 59.64 degree\n", + "Angle made by F with +ve Z axis 100.80 degree\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..1ebf6ae4 --- /dev/null +++ b/_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 @@ -0,0 +1,311 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fcad62d4182da6d583aab9d0ade5bf3f92b1a0b38ca115e34e1f0f2aae8691f0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Rigid bodies equivalent systems of forces" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "F = 100.; \t\t\t# lb , Vertical force applied to end of lever\n", + "theta = 60.;\t\t\t# degree, angle made by lever with +ve X axis\n", + "l = 24.; \t\t\t# , length of lever\n", + "\n", + "# Calculations and Results\n", + "# a ) Momemt about O\n", + "d = l*math.cos(math.radians(theta));\t\t\t# mm ,perpendicular dismath.tance from o to the line of action\n", + "\n", + "Mo = F*d;\t\t\t# N.m, Magnitude of moment about O \n", + "print \"Magnitude of moment about O of the 500 N is %d lb.in and it is in clockwise direction\\\n", + "\\n as force tends to rotate lever clockwise\"%(Mo);\n", + "\n", + "# b) Horizontal force\n", + "\n", + "d = l*math.sin(math.radians(theta));\t\t\t#in, perpendicular dismath.tance from o to the line of action\n", + "\n", + "F = Mo/d;\t\t\t# N, Horizontal Force at A required to produce same Moment about O\n", + "print \"Magnitude of Horizontal Force at A required to produce same Moment about O is %f lb \"%(F);\n", + "\n", + "# c)Smallest force\n", + "\n", + "# F is smaller when d is maximum in expression Mo = F*d, so we choose force perpendicular to OA\n", + "Mo = 1200.\t\t\t#in lb\n", + "d = 24.\t\t\t# in ,perpendicular dismath.tance from o to the line of action\n", + "F = Mo/d;\t\t\t# N, Smallest Force at A required to produce same Moment about O\n", + "print \"Magnitude of smallest Force at A required to produce same Moment about O is %f lb \"%(F);\n", + "\n", + "#d) 1200 N vertical force\n", + "Mo = 1200.;\t\t\t# lb-in,\n", + "F = 240.\t\t\t#in lb\n", + "d = Mo/F;\t\t\t# m, perpendicular dismath.tance from o to the line of action of force\n", + "OB = d/math.cos(math.radians(theta));\t\t\t#m, dismath.tance of point B from O\n", + "\n", + "print \"Verical force of 1200 N must act at %f in far from the shaft to create same moment about O\"%(OB);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of moment about O of the 500 N is 1200 lb.in and it is in clockwise direction\n", + " as force tends to rotate lever clockwise\n", + "Magnitude of Horizontal Force at A required to produce same Moment about O is 57.735027 lb \n", + "Magnitude of smallest Force at A required to produce same Moment about O is 50.000000 lb \n", + "Verical force of 1200 N must act at 10.000000 in far from the shaft to create same moment about O\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import det\n", + "\n", + "# Given data\n", + "F = 800.; \t\t\t# N , Force applied on bracket\n", + "theta = 60.;\t\t\t# degree, angle made by lever with +ve X axis\n", + "theta = theta*math.pi/180;\t\t\t# Conversion of angle into radian\n", + "r_AB = [-0.2, 0.16];\t\t\t#m vector drawn from B to A resolved in recmath.tangular component\n", + "\n", + "# Calculations\n", + "F = [F*math.cos(theta), F*math.sin(theta)]\t\t\t#N , vector F resolved in recmath.tangular component \n", + "k = 1;\t\t\t# Unit vector along Z axis \n", + "# M_B = r_AB * F relation 3.7 from section 3.5\n", + "M_B = det([r_AB, F])*k;\t\t\t# N.m \n", + "\n", + "# Results\n", + "print \"The moment of force 800 N about B is %.2f N.m . -ve sign shows its acting clockwise\"%(M_B);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of force 800 N about B is -202.56 N.m . -ve sign shows its acting clockwise\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given data\n", + "P = 30.; \t\t\t# lb, Force applied to shift lever \n", + "alpha = 20.;\t\t\t# degree, angle made by force P with -ve X axis\n", + "\n", + "# Calculations\n", + "Q = P*math.sin(math.radians(alpha))\t\t\t#in degree\n", + "d = 3\t\t\t#in ft\n", + "M_o = Q*d\t\t\t#N.m , here negative signs are taken as each component creates moment clockwise\n", + "\n", + "# Results\n", + "print \"The moment of force P about B is %.2f lb-ft . -ve sign shows its acting clockwise\"%(M_o);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The moment of force P about B is 30.78 lb-ft . -ve sign shows its acting clockwise\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import norm,det\n", + "\n", + "# Given data\n", + "# M_A = r_CA * F relation 3.7 from section 3.5\n", + "f = 200.; \t\t\t# N , Magnitude of Force directed along CD\n", + "r_CA = [0.3,0, 0.08];\t\t\t#m, vector AC reprecsented in recmath.tangular component\n", + "#lambda = CD/norm(CD)-m, Unit vector along CD\n", + "#F = f*lambda;\t\t\t#m, Force \n", + "CD = [-0.3, 0.24, -0.32];\t\t\t#Vector CD resolved into recmath.tangular component\n", + "# norm(CD); m, magnitude of vector CD\n", + "\n", + "# Calculations\n", + "lambda1 = CD/norm(CD);\t\t\t#m, Unit vector along CD\n", + "F = f*lambda1;\t\t\t#m, Force \n", + "# M_A = r_CA * F relation 3.7 from section 3.5\n", + "#i = 1; j = 1; k = 1; Unit vectors along X, Y and Z direction respectively\n", + "\n", + "# Componenets of moment M_A along X,Y and Z direction respectively\n", + "M_Ax = det([[r_CA[1],r_CA[2]],[F[1], F[2]]]);\t\t\t#N.m\n", + "M_Ay = -det([[r_CA[0],r_CA[2]] , [F[0],F[2]]]);\t\t\t#N.m\n", + "M_Az = det([[r_CA[0],r_CA[1]],[F[0], F[1]]]);\t\t\t# N.m \n", + "\n", + "# Results\n", + "print \"Answer can be written as M_B = %.2f N.m i + %.2f N.m j + %.2f N.m k \"%(M_Ax,M_Ay,M_Az);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Answer can be written as M_B = -7.68 N.m i + 28.80 N.m j + 28.80 N.m k \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Moment arms\n", + "Fx = -30.;\t\t\t#in lb\n", + "Fy = 20.;\t\t\t#in lb\n", + "Fz = 20.;\t\t\t#in lb\n", + "\n", + "#couple Forces \n", + "x = 18.;\t\t\t#iN\n", + "y = 12.;\t\t\t#iN\n", + "z = 9.;\t\t\t#iN\n", + "\n", + "# Calculations\n", + "Mx = Fx*x;\t\t\t#N.m, Component of Moment along X axis\n", + "My = Fy*y;\t\t\t#N.m, Component of Moment along Y axis\n", + "Mz = Fz*z;\t\t\t#N.m, Component of Moment along Z axis\n", + "\n", + "# Results\n", + "#This three moments represent component of math.single couple M \n", + "print \"Couple M equivalent to two couple can be written as M = %.2f lb-in i + %.2f lb-in j + %.2f lb-in k \"%(Mx,My,Mz);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Couple M equivalent to two couple can be written as M = -540.00 lb-in i + 240.00 lb-in j + 180.00 lb-in k \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 Page No : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "Mo = 24.;\t\t\t#N.m *k, Couple of moment \n", + "f = -400.;\t\t\t#N, Magnitude of force\n", + "OB = 300.;\t\t\t#mm,Dismath.tance of force from point O\n", + "theta = 60.;\t\t\t# degree, angle made by lever with +ve X axis\n", + "\n", + "# Calculations and Results\n", + "x = math.cos(math.radians(theta))\n", + "BC = Mo/(-f*x);\t\t\t#m \n", + "BC = BC*1000;\t\t\t#mm, Conversion into millimeter\n", + "print (BC)\n", + "OC = OB+BC;\t\t\t#mm, Dismath.tance from the shaft to the point of application of this equivalenet force\n", + "\n", + "print \"Distance from the shaft to the point of application of this equivalenet single force is %f mm\"%(OC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "120.0\n", + "Distance from the shaft to the point of application of this equivalenet single force is 420.000000 mm\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..2486b5b0 --- /dev/null +++ b/_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 @@ -0,0 +1,542 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6614da64c21b5a021bafa936588cfa8061044b57a7af33fe7a25f2c248f44683" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Equilibrium of rigid bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import norm\n", + "\n", + "# Calculations and Results\n", + "#Determination of B\n", + "#At equillibrium +sum(M_A) = 0\n", + "#B*1.5m-(9.81kN)(2 m)-(23.5 kN)(6 m) = 0, B assumed to be in +ve X direction\n", + "B = (9.81*2+23.5*6)/1.5\t\t\t#kN\n", + "print \"B = %.2f kN +ve sign shows reaction is directed as assumed \"%(B);\n", + "#Determination of Ax\n", + "#Sum Fx = 0\n", + "#Ax+B = 0\n", + "Ax = -B;\t\t\t#kN\n", + "print \"Ax = %.2f kN\"%(Ax);\n", + "#Determination of Ay\n", + "#Sum Fy = 0\n", + "#Ay-9.81 kN-23.5kN = 0\n", + "Ay = 9.81+23.5;\t\t\t#kN\n", + "print \"Ay = %.2f kN\"%(Ay);\n", + "A = [Ax,Ay];\t\t\t#kN Adding component\n", + "A = norm(A);\t\t\t#Magnitude of force A\n", + "theta = math.atan(Ay/Ax);\t\t\t#radians\n", + "theta = theta*180/math.pi;\t\t\t#degrees, conversion into degrees\n", + "print \"Reaction at A is A = %.2f kN making angle %.2f degrees with + ve x axis \"%(A,theta);\n", + "#Slight variation in the answer because of roundoff error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B = 107.08 kN +ve sign shows reaction is directed as assumed \n", + "Ax = -107.08 kN\n", + "Ay = 33.31 kN\n", + "Reaction at A is A = 112.14 kN making angle -17.28 degrees with + ve x axis \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "#At equillibrium equations are +-> sum Fx = 0, +sum(M_A) = 0, +sum(M_B) = 0\n", + "#Sum Fx = 0 gives\n", + "Bx = 0;\t\t\t#kN\n", + "\n", + "# Calculations and Results\n", + "print \"Bx = %.0f kN \"%(Bx);\n", + "#+sum(M_A) = 0 gives -(70kN)(0.9m)+By(2.7m)-(27kN)(3.3m)-(27kN)(3.9m) = 0, B assumed to be in +ve Y direction\n", + "By = (70*0.9+27*3.3+27*3.9)/2.7\t\t\t#kN\n", + "print \"By = %.2f kN +ve sign shows reaction is directed as assumed \"%(By);\n", + "\n", + "#+sum(M_B) = 0 gives -A(2.7m)+(70kN)(1.8m)-(27kN)(0.6m)-(27kN)(1.2m) = 0, A assumed to be in +ve Y direction\n", + "A = (70*1.8-27*0.6-27*1.2)/2.7\t\t\t#kN\n", + "print \"A = %.2f kN +ve sign shows reaction is directed as assumed \"%(A);\n", + "#Answer print layed in KN\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bx = 0 kN \n", + "By = 95.33 kN +ve sign shows reaction is directed as assumed \n", + "A = 28.67 kN +ve sign shows reaction is directed as assumed \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "#Take x axis parallel to track and Y axis perpendicular to track\n", + "W = 25.;\t\t\t#kN\n", + "# Resolving weight\n", + "Wx = W*math.cos(25*math.pi/180);\t\t\t#kN\n", + "Wy = -W*math.sin(25*math.pi/180);\t\t\t#kN\n", + "#At equillibrium equations are +-> sum Fx = 0, +sum(M_A) = 0, +sum(M_B) = 0\n", + "\n", + "# Calculations and Results\n", + "#+sum(M_A) = 0 gives -(10.5kN)(625 mm)-(22.65 kN)(150 mm)+ R2(1250 mm) = 0, R2 assumed to be in +ve Y direction\n", + "R2 = (10.5*625+22.65*150.)/1250;\t\t\t#kN\n", + "print \"R2 = %.0f kN +ve sign shows reaction is directed as assumed \"%(R2);\n", + "\n", + "#+sum(M_B) = 0 gives (10.5kN)(625 mm)-(22.65 kN)(150 mm)+ R1(1250 mm) = 0, R1 assumed to be in +ve Y direction\n", + "R1 = (10.5*625-22.65*150)/1250;\t\t\t#kN\n", + "print \"R1 = %.1f kN +ve sign shows reaction is directed as assumed \"%(R1);\n", + "\n", + "#Sum Fx = 0 gives, 22.65 N-T = 0\n", + "T = 22.65;\t\t\t#kN\n", + "print \"T = %.2f kN +ve sign shows reaction is directed as assumed \"%(T);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R2 = 8 kN +ve sign shows reaction is directed as assumed \n", + "R1 = 2.5 kN +ve sign shows reaction is directed as assumed \n", + "T = 22.65 kN +ve sign shows reaction is directed as assumed \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "Ax = 4.5\t\t\t#in m\n", + "Ay = 6.\t\t\t#in m\n", + "\n", + "# Calculations and Results\n", + "DF = math.sqrt((Ax**2)+(Ay**2))\n", + "F = 150.\t\t\t#in KN\n", + "Ex = -(Ax/DF)*F\n", + "print \"Ex = %.2f kN \"%(Ex);\n", + "Ey = ((Ay/DF)*F)+(4*20)\n", + "print \"Ey = %.2f kN \"%(Ey);\n", + "\n", + "M_E = -((20*7.2)+(20*5.4)+(20*3.6)+(20*1.8)-((Ay/DF)*F*Ax))\n", + "print \"M_E = %.0f kN +ve sign shows reaction is directed as assumed \"%(M_E);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ex = -90.00 kN \n", + "Ey = 200.00 kN \n", + "M_E = 180 kN +ve sign shows reaction is directed as assumed \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange\n", + "\n", + "# Given Data\n", + "#At equillibrium +sum(Mo) = 0,\n", + "#s = r*theta;\n", + "#F = k*s = k*r*theta;\n", + "k = 45.;\t\t\t#N/mm\n", + "r = 75.;\t\t\t#mm\n", + "W = 1800.;\t\t\t#N\n", + "l = 200.;\t\t\t#mm\n", + "\n", + "\n", + "# Calculations and Results\n", + "# trial and error \n", + "print \"Probable answers by trial and error method are \";\n", + "for i in arange(0,0.1+math.pi/2,.1): \t\t\t# from 0 to 90 degrees\n", + " difference = (math.sin(i)-k*r**2*(i)/(W*l));\n", + " if difference<0.01: \t\t\t# Approximation\n", + " theta = i;\n", + " theta = theta*180/math.pi;\t\t\t#Degrees , conversion into degrees\n", + " print \"Theta = %.2f degrees\"%(theta); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Probable answers by trial and error method are \n", + "Theta = 0.00 degrees\n", + "Theta = 80.21 degrees\n", + "Theta = 85.94 degrees\n", + "Theta = 91.67 degrees\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "m = 10.;\t\t\t#kg mass of joist\n", + "g = 9.81;\t\t\t#m/s**2 gravitational acceleration\n", + "W = m*g;\t\t\t#N\n", + "AB = 4.;\t\t\t#m\n", + "\n", + "# Calculations\n", + "# Three force body\n", + "BF = AB*math.cos(45*math.pi/180);\t\t\t#m\n", + "AF = BF;\t\t\t#m\n", + "\n", + "AE = 1./2*AF;\t\t\t#m\n", + "EF = AE;\t\t\t#m\n", + "CD = AE;\t\t\t#m\n", + "BD = CD/math.tan((45.+25)*math.pi/180);\t\t\t#m\n", + "DF = BF-BD;\t\t\t#m\n", + "CE = DF;\t\t\t#m\n", + "alpha = math.atan(CE/AE);\t\t\t#radians\n", + "alpha = alpha*180/math.pi;\t\t\t#degrees\n", + "\n", + "#From geometry\n", + "\n", + "G = 90-alpha;\t\t\t#degrees\n", + "B = alpha-(90-(45+25));\t\t\t#degrees\n", + "C = 180-(G+B);\t\t\t#Degrees\n", + "\n", + "#Force triangle\n", + "#T/math.sin(G) = R/math.sin(C) = W/math.sin(B)..... math.sine law\n", + "\n", + "T = W/math.sin(B*math.pi/180)*math.sin(G*math.pi/180);\t\t\t#N\n", + "R = W/math.sin(B*math.pi/180)*math.sin(C*math.pi/180);\t\t\t#N\n", + "\n", + "# Results\n", + "print \"Tension in cable T = %.1f N \\\n", + "\\nReaction At A is R = %.1f N with angle alpha = %.1f degrees with +ve X axis\"%(T,R,alpha); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension in cable T = 82.1 N \n", + "Reaction At A is R = 147.9 N with angle alpha = 58.6 degrees with +ve X axis\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "m1 = 80.;\t\t\t#kg mass of man\n", + "m2 = 20.;\t\t\t#kg, mass of ladder\n", + "m = m1+m2;\t\t\t#kg\n", + "g = 9.81;\t\t\t#m/s**2 gravitational acceleration\n", + "W = -m*g;\t\t\t#N, j\n", + "\n", + "# Calculations and Results\n", + "C = -0.6*W/3;\t\t\t#N\n", + "Bz = -0.6*C/1.2;\t\t\t#N\n", + "By = -0.9*W/1.2;\t\t\t#N\n", + "\n", + "print \" Reaction At B is B = %.0f) N j +%.1f N)k\"%(By,Bz);\n", + "print \" Reaction At C is C = %.2f) N k\"%(C); \n", + "Ay = -W-By;\t\t\t#N\n", + "Az = -C-Bz;\t\t\t#N\n", + "\n", + "print \" Reaction At A is A = %.0f) N j +%.1f N)k \"%(Ay,Az); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Reaction At B is B = 736) N j +-98.1 N)k\n", + " Reaction At C is C = 196.20) N k\n", + " Reaction At A is A = 245) N j +-98.1 N)k \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "# Given Data\n", + "W = -1200.;\t\t\t#N,j Weight \n", + "BD = [-2.4,1.2,-2.4];\t\t\t#m, Vector BD\n", + "EC = [-1.8,0.9,0.6];\t\t\t#m, Vector EC\n", + "#T_BD = norm(T_BD)*BD/norm(BD);\t\t\t# m, vector of tension in BD\n", + "#T_EC = norm(T_EC)*EC/norm(EC);\t\t\t# m, vector of tension in EC\n", + "# Applying equillibrium conditions we get\n", + "# Sum_F = 0, and Sum(M_A) = 0 and setting co-efficient equal to zero\n", + "A = [[0.8,0.771],[1.6,-0.514]];\t\t\t#MAtrix of co-efficient\n", + "b = [[-1440],[0]];\t\t\t#matrix b\n", + "\n", + "# Calculations and Results\n", + "x = solve(A,b);\t\t\t# solution matrix\n", + "T_BD = x[0];\t\t\t# N,Tension in BD\n", + "T_EC = x[1];\t\t\t#N, Tension in EC\n", + "print \"T_BD = %.0f N and T_EC = %.0f N \"%(x[0],x[1]);\n", + "\n", + "Ax = 2./3*T_BD+6./7*T_EC;\t\t\t#N, x component of reaction at A\n", + "Ay = -(1./3*T_BD+3./7*T_EC+W);\t\t\t#N, Y component of rection at A\n", + "Az = 2./3*T_BD-2./7*T_EC;\t\t\t#N, z component of reaction at A\n", + "print \"Reaction at A is A = %.0f N)i +%.0f N)j +%.1f N)k \"%(Ax,Ay,Az);\n", + "#Answe in Newton instead of lbs\n", + "#1lbs = 4.44N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T_BD = -450 N and T_EC = -1401 N \n", + "Reaction at A is A = -1501 N)i +1950 N)j +100.2 N)k \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import norm\n", + "from numpy import array\n", + "\n", + "# Given Data\n", + "#Free body diagram\n", + "m = 30.\t\t\t#in kg\n", + "g = 9.81\t\t\t#in m/s2\n", + "w = -m*g\t\t\t#in J\n", + "\n", + "# Calculations and Results\n", + "DC = array([-480, 240, -160])\t\t\t#in mm\n", + "X = norm(DC)\n", + "T = DC/X\n", + "print (\"Tension in the vector form = \")\n", + "print (T)\n", + "#Equilibrium equations\n", + "#From equation 2, setting unit vector = 0\n", + "Ax = 49\t\t\t#in N\n", + "Ay = 73.5\t\t\t#in N\n", + "A = [Ax, Ay]\n", + "y = norm(A)\n", + "print (\"Tension in the vector form in N = \")\n", + "print (y)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tension in the vector form = \n", + "[-0.85714286 0.42857143 -0.28571429]\n", + "Tension in the vector form in N = \n", + "88.3360062489\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "#page 197\n", + "\n", + "# Given Data\n", + "Tmin = 300.\t\t\t#lb\n", + "AC = array([12, 12, 0])\n", + "w = array([[0],[-450],[0]])\n", + "x1 = AC*w\n", + "print (x1)\n", + "x = x1#array([0, 0, x1])\n", + "\n", + "# Calculations\n", + "lambda1 = array([2./3, 2./3, -1./3])*-x1#array([[0],[0],[-x1]])\n", + "y = x*lambda1\n", + "print (y)\n", + "\n", + "#Location of G\n", + "#EG and Tmin are having same direction, so their component should be in proportion\n", + "x = -1.8/Tmin*Tmin+1.8;\t\t\t#m, X co-ordinate of G\n", + "y = -1.8/Tmin*Tmin+3.6;\t\t\t#m, Y co-ordinate of G\n", + "\n", + "# Results\n", + "print \"Co-ordinates of G are x = %.0f m and y = %.1f m\"%(x,y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0 0 0]\n", + " [-5400 -5400 0]\n", + " [ 0 0 0]]\n", + "[[ 0. 0. -0.]\n", + " [-19440000. -19440000. -0.]\n", + " [ 0. 0. -0.]]\n", + "Co-ordinates of G are x = 0 m and y = 1.8 m\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..7f5033e8 --- /dev/null +++ b/_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 @@ -0,0 +1,411 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9192ef8aa28e4e5c3605b5f9963d537f83bd70931cce6349f37ee7655e275acf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Distrubuted forces centroids and centers of gravity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "n = 4; \t\t\t# no of component\n", + "A = [120*80,120*60/2,math.pi*60*60/2,-math.pi*40*40];\t\t\t#mm**2, Areas of Recmath.tangle, triangle, Semicircle, and Circle respectively\n", + "x = [60,40,60,60];\t\t\t#mm, x components of centroids of Recmath.tangle, triangle, Semicircle, and Circle respectively\n", + "y = [40,-20,105.46,80];\t\t\t#mm, y components of centroids of Recmath.tangle, triangle, Semicircle, and Circle respectively\n", + "\n", + "sumA = 0;\n", + "sumxA = 0;\n", + "sumyA = 0;\n", + "\n", + "# Calculations and Results\n", + "for i in range(n):\n", + " sumA = sumA+A[i];\n", + " sumxA = sumxA+x[i]*A[i];\n", + " sumyA = sumyA+y[i]*A[i];\n", + "\n", + "# First Moment of area\n", + "Qx = sumyA;\t\t\t# About X axis\n", + "Qy = sumxA;\t\t\t#About Yaxis\n", + "print \"First moments of the area are Qx = %.0f mm**3 and Qy = %.0f mm**3 \"%(Qx,Qy);\n", + "\n", + "#Location of centroid\n", + "X = sumxA/sumA;\t\t\t# X co-ordinate\n", + "Y = sumyA/sumA;\t\t\t# Y co = ordinate\n", + "print \"Co-ordinates of centroid are X = %.1f mm and Y = %.1f mm \"%(X,Y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "First moments of the area are Qx = 506238 mm**3 and Qy = 757699 mm**3 \n", + "Co-ordinates of centroid are X = 54.8 mm and Y = 36.6 mm \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "n = 3; \t\t\t# no of segment\n", + "L = [600,650,250];\t\t\t#mm, Lengths of segment AB , BC and CA respectively\n", + "x = [300,300,0];\t\t\t#mm, x components of centroids of segment AB , BC and CA respectively\n", + "y = [0,125,125];\t\t\t#mm, y components of centroids of segment AB , BC and CA respectively\n", + "\n", + "sumL = 0;\n", + "sumxL = 0;\n", + "sumyL = 0;\n", + "\n", + "# Calculations\n", + "for i in range(n):\n", + " sumL = sumL+L[i];\n", + " sumxL = sumxL+x[i]*L[i];\n", + " sumyL = sumyL+y[i]*L[i];\n", + "\n", + "#Location of centre of gravity\n", + "X = sumxL/sumL;\t\t\t# X co-ordinate\n", + "Y = sumyL/sumL;\t\t\t# Y co = ordinate\n", + "\n", + "# Results\n", + "print \"Co-ordinates of centroid are X = %.0f mm and Y = %.0f mm \"%(X,Y);\n", + "#There is variation because of roundoff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Co-ordinates of centroid are X = 250 mm and Y = 75 mm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "p = 7850.;\t\t\t#kg/m**3, density of steel rim\n", + "n = 2; \t\t\t# no of component\n", + "A = [(20+60+20)*(30+20),-60*30];\t\t\t#mm**2,Cross section Areas of recmath.tangle I and II\n", + "\n", + "y = [375,365];\t\t\t#mm, y components of centroids of Recmath.tangles I and II respectively\n", + "sumV = 0;\n", + "\n", + "C = [0,0]\n", + "V = [0,0]\n", + "# Calculations\n", + "for i in range(n):\n", + " C[i] = 2*math.pi*y[i];\t\t\t#mm, Dismath.tance travelled by C\n", + " V[i] = A[i]*C[i];\t\t\t#mm**3, Volume of 1 component\n", + " sumV = sumV+V[i];\t\t\t# mm**3, Total volume of rim\n", + "\n", + "sumV = sumV*10**(-9);\t\t\t#Conversion into m**3\n", + "g = 9.81;\t\t\t#m/s**2, acceleration due to gravity\n", + "m = p*sumV;\t\t\t#kg, mass\n", + "W = m*g;\t\t\t#N, Weight\n", + "\n", + "# Results\n", + "print \"mass of steel is m = %.0f kg and Wight is W = %.0f N\"%(m,W);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mass of steel is m = 60 kg and Wight is W = 589 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "n = 2; \t\t\t# no of triangle\n", + "A = [4.5,13.5];\t\t\t#kN, loads\n", + "x = [2.,4.];\t\t\t#mm, dismath.tances of centroid from point A\n", + "\n", + "# Calculations and Results\n", + "sumA = 0;\n", + "sumxA = 0;\n", + "for i in range(n):\n", + " sumA = sumA+A[i];\n", + " sumxA = sumxA+x[i]*A[i];\n", + "\n", + "#Location of centroid\n", + "X = sumxA/sumA;\t\t\t# X co-ordinate\n", + "W = sumA;\t\t\t#kN, Concentrated load\n", + "print \"The equivalent concentrated mass is W = %.0f kN and its line of action is located at a\\\n", + "\\n distance X = %.1f m to the right of A \"%(W,X);\n", + "\n", + "# Reactions\n", + "# Applying sum(F_x) = 0\n", + "Bx = 0.;\t\t\t#N\n", + "#Applying sum(M_A) = 0\n", + "By = W*X/6.;\t\t\t#kN, Reaction at B in Y direction\n", + "#Applying sum(M_B) = 0\n", + "A = W*(6-X)/6;\t\t\t#kN, Reaction at B in Y direction\n", + "\n", + "print \"The rection at A = %.1f kN, At Bx = %.1f kN and By = %.1f kN \"%(A,Bx,By);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent concentrated mass is W = 18 kN and its line of action is located at a\n", + " distance X = 3.5 m to the right of A \n", + "The rection at A = 7.5 kN, At Bx = 0.0 kN and By = 10.5 kN \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 251" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "t = 0.3;\t\t\t#m thickness of dam\n", + "g = 9.81;\t\t\t# m/s**2, acceleration due to gravity\n", + "p1 = 2400.;\t\t\t#kg/m**3, density of concrete\n", + "p2 = 1000.;\t\t\t#kg/m**3, density of water\n", + "W1 = 0.5*2.7*6.6*t*p1*g/1000;\t\t\t#kN, Weight of concrete component 1\n", + "W2 = 1.5*6.6*t*p1*g/1000;\t\t\t#kN, Weight of concrete component 2\n", + "W3 = 1./3*3*5.4*t*p1*g/1000;\t\t\t#kN, Weight of concrete component 3\n", + "W4 = 2./3*3*5.4*t*p2*g/1000;\t\t\t#kN, Weight of water\n", + "P = 0.5*2.7*6.6*t*p1*g/1000;\t\t\t#kN, pressure force exerted by water\n", + "\n", + "# Calculations and Results\n", + "# Applying sum(F_x) = 0\n", + "H = 42.9;\t\t\t#kN, Horizontal reation at A\n", + "#Applying sum(Fy) = 0\n", + "V = W1+W2+W3+W4;\t\t\t#kN, Vertical Reaction at A \n", + "print \"The horizontal reaction is H = %.1f kN \\\n", + "\\nVertical rection at A V = %.1f kN \"%(H,V);\n", + "#Applying sum(M_A) = 0\n", + "M = W1*1.8+W2*3.45+W3*5.1+W4*6-P*1.8;\t\t\t#kN.m, Moment at A\n", + "\n", + "# We can replace force couple system by math.single force acting at dismath.tance right to A\n", + "d = M/V;\t\t\t# m Dismath.tance of resultant force from A\n", + "\n", + "print \"The moment about A is M = %.1f kN.m anticlockwise and \\\n", + "\\nif we replace it by force couple system resultant, s distance from A is d = %0.2f m \"%(M,d);\n", + "#Difference is because of round off" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The horizontal reaction is H = 42.9 kN \n", + "Vertical rection at A V = 202.8 kN \n", + "The moment about A is M = 626.5 kN.m anticlockwise and \n", + "if we replace it by force couple system resultant, s distance from A is d = 3.09 m \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "n = 3; \t\t\t# no of component\n", + "r = 60.;\t\t\t#mm, radius\n", + "l = 100.;\t\t\t#mm length of cylinder\n", + "V = [0.5*4./3*math.pi*(r)**3,math.pi*r*r*l,-math.pi/3*r*r*l];\t\t\t#mm**3, Volumes of Hemisphere, cylinder and cone respectively\n", + "x = [-3./8*r,l/2.,3./4*l];\t\t\t#mm, x components of centroids of Hemisphere, cylinder and cone respectively\n", + "\n", + "sumV = 0;\n", + "sumxV = 0;\n", + "\n", + "# Calculations\n", + "for i in range(n):\n", + " sumV = sumV+V[i];\n", + " sumxV = sumxV+x[i]*V[i];\n", + "\n", + "#Location of centre of gravity\n", + "X = sumxV/sumV;\t\t\t# X co-ordinate\n", + "\n", + "# Results\n", + "print \"Co-ordinates of centroid are X = %.0f mm \"%(X);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Co-ordinates of centroid are X = 15 mm \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "l = 4.5; \t\t\t# in in\n", + "b = 2.;\t\t\t#in\n", + "h = .5;\t\t\t#in\n", + "a_I = l*b*h\n", + "a_II = ((1./4)*math.pi*b**2*h)\n", + "a_III = -math.pi*(h**2)*h\n", + "a_IV = -math.pi*(h**2)*h\n", + "V = [a_I, a_II, a_III, a_IV]\n", + "#print (V)\n", + "\n", + "x = [.25,1.3488,.25,.25];\t\t\t#in, x components of centroids of part I,II , III and IV respectively\n", + "y = [-1,-0.8488,-1,-1];\t\t\t#in, y components of centroids of part I,II , III and IV respectively\n", + "z = [2.25,0.25,3.5,1.5];\t\t\t#in, z components of centroids of part I,II , III and IV respectively\n", + "\n", + "# Calculations and Results\n", + "y = [0,0,0,0]\n", + "for i in range(4):\n", + " temp = 0\n", + " sum_xV = 0\n", + " sum_xV = V[i]*x[i]\n", + " y[i] = sum_xV\n", + "\n", + "x = sum(y)\n", + "print \"The sum of x*V = %f in**4 \"%(x)\n", + "\n", + "for i in range(4):\n", + " temp = 0\n", + " sum_zV = 0\n", + " sum_zV = V[i]*z[i]\n", + " y[i] = sum_zV\n", + "\n", + "z = sum(y)\n", + "print \"The sum of z*V = %f in**4 \"%(z)\n", + "\n", + "for i in range(4):\n", + " temp = 0\n", + " sum_yV = 0\n", + " sum_yV = V[i]*y[i]\n", + " y[i] = sum_yV\n", + "\n", + "s = sum(y)\n", + "print \"The sum of y*V = %f in**4 \"%(s)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sum of x*V = 3.047341 in**4 \n", + "The sum of z*V = 8.554204 in**4 \n", + "The sum of y*V = 46.950413 in**4 \n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..78f780a0 --- /dev/null +++ b/_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 @@ -0,0 +1,394 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d90e14a1b444898c0818540f448f096acf0e251491d8781a249daf8aea263992" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Analysis of structures" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Entire truss\n", + "#Applying sum(M_C) = 0\n", + "\n", + "# Given Data\n", + "E = (10.*12+5*6)/3;\t\t\t#kN\n", + "#Applying sum Fx = 0\n", + "Cx = 0.\n", + "#Applying sumFy = 0\n", + "Cy = 10.+5-E;\t\t\t#kN\n", + "\n", + "# Calculations\n", + "#At joint A\n", + "#By proportion 10kN/4 = F_AB/3 = F_AD/5\n", + "F_AB = 10./4*3;\t\t\t#kN, force in member AB\n", + "F_DA = 10./4*5;\t\t\t#kN, force in member AD\n", + "\n", + "#At joint D\n", + "F_DB = F_DA;\t\t\t#kN, force in member DB\n", + "F_DE = 2*3./5*F_DA;\t\t\t#kN, force in member DE\n", + "\n", + "#At joint B\n", + "#applying sumFy = 0\n", + "F_BE = 5./4*(-5-4./5*F_DB);\t\t\t#kN, force in member BE\n", + "#Applying sumFx = 0\n", + "F_BC = F_AB+3./5*F_DB-3./5*F_BE;\t\t\t#kN, force in member BC\n", + "#At joint E\n", + "#Applying sumFx = 0\n", + "F_EC = -5./3*(F_DE-3./5*F_BE);\t\t\t#kN, Force in member EC\n", + "\n", + "# Results\n", + "print \"The forces in member of truss are F_AB = %.1f kN T \\\n", + "\\nF_AD = %.1f kN C, \\\n", + "\\nF_DB = %.1f kN T \\\n", + "\\nF_DE = %.0f kN C \\\n", + "\\nF_BE = %.2f kN \\\n", + "\\nF_BC = %.2f kN \\\n", + "\\nF_EC = %.2f kN \"%(F_AB,F_DA,F_DB,F_DE,F_BE,F_BC,F_EC);\n", + "#Variation in answe because of round off\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The forces in member of truss are F_AB = 7.5 kN T \n", + "F_AD = 12.5 kN C, \n", + "F_DB = 12.5 kN T \n", + "F_DE = 15 kN C \n", + "F_BE = -18.75 kN \n", + "F_BC = 26.25 kN \n", + "F_EC = -43.75 kN \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given Data\n", + "#Entire truss\n", + "v1 = 140.;\t\t\t#kn, verical force 1\n", + "v2 = 140.;\t\t\t#kN, Vertical force 2\n", + "h = 80.;\t\t\t#kN , Horizontal force\n", + "#Applying sum(M_B) = 0\n", + "J = (v1*4+v2*12+h*5)/16;\t\t\t#kN\n", + "\n", + "\n", + "# Calculations and Results\n", + "#Applying sum Fx = 0\n", + "Bx = -h;\t\t\t#kN, negative sign shows it is along negative x axis\n", + "\n", + "#Applying sumFy = 0\n", + "\n", + "By = v1+v2-J;\t\t\t#kN\n", + "\n", + "#Force in member EF\n", + "#Applying sumFy = 0\n", + "F_EF = By-v2;\t\t\t#kN, Force in member EF\n", + "print \"Force in member EF is %.0f kN Negative sign shows member is in compression \"%(F_EF);\n", + "\n", + "#Force in member GI\n", + "F_GI = (-J*4-Bx*5)/5;\t\t\t#kN Force in member GI\n", + "print \"Force in member GI is %.0f kN Negative sign shows member is in compression \"%(F_GI);\n", + "#Answer difference is because of rounding off variables\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force in member EF is -25 kN Negative sign shows member is in compression \n", + "Force in member GI is -52 kN Negative sign shows member is in compression \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "#Entire truss\n", + "vB = 1.;\t\t\t#kN, verical force at B\n", + "vD = 1.;\t\t\t#kN, verical force at D\n", + "vF = 1.;\t\t\t#kN, verical force at F\n", + "vH = 1.;\t\t\t#kN, verical force at H\n", + "vJ = 1.;\t\t\t#kN, verical force at J\n", + "vC = 5.;\t\t\t#kN, verical force at C\n", + "vE = 5.;\t\t\t#kN, verical force at E\n", + "vG = 5.;\t\t\t#kN, verical force at G\n", + "h = 8.;\t\t\t#m, height\n", + "v = 5.;\t\t\t#m, horizontal dismath.tance between successive node\n", + "\n", + "A = 12.50;\t\t\t#kN, reaction at A\n", + "L = 7.50;\t\t\t#kN, reaction at L\n", + "\n", + "# Calculations and Results\n", + "alpha = math.atan(h/3./v);\t\t\t# rad, angle made by inclined members with X axis\n", + "#alpha = alpha/math.pi*180;\t\t\t# Conversion of angle into degrees\n", + "\n", + "#Force in member GI\n", + "#Applying sum(M_H) = 0\n", + "F_GI = (L*2*v-vJ*v)/(2*v*math.tan(alpha));\t\t\t#kN Force in member GI\n", + "print \"Force in member GI is %.2f kN \"%(F_GI);\n", + "\n", + "#Force in member FH\n", + "#Applying sum(M_G) = 0\n", + "F_FH = (L*3*v-vH*v-vJ*2*v)/(-h*math.cos(alpha));\t\t\t#kN, Force in member FH\n", + "print \"Force in member FH is %.2f kN Negative sign shows member is in compression \"%(F_FH);\n", + "\n", + "#Force in member GH\n", + "be = math.atan(v/(2*v*math.tan(alpha)));\t\t\t#rad, as math.tan(be) = GI/HI\n", + "#Applying sum(M_L) = 0\n", + "F_GH = (-vH*v-vJ*2*v)/(3*v*math.cos(be));\t\t\t#kN, Force in member FH\n", + "print \"Force in member GH is %.3f kN Negative sign shows member is in compression \"%(F_GH);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force in member GI is 13.12 kN \n", + "Force in member FH is -13.81 kN Negative sign shows member is in compression \n", + "Force in member GH is -1.371 kN Negative sign shows member is in compression \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Entire truss\n", + "#Applying sum(Fy) = 0\n", + "\n", + "# Given Data\n", + "Ay = 480.;\t\t\t#N, Y component of reaction at A\n", + "#Applying sum(M_A) = 0\n", + "B = 480*100./160;\t\t\t#N, reaction at B\n", + "#Applying sum(Fx) = 0\n", + "Ax = -300.;\t\t\t#N, X component of reaction at A\n", + "\n", + "# Calculations and Results\n", + "alpha = math.atan(80./150);\t\t\t#radian\n", + "#Free body member BCD\n", + "#Applying sum(M_C) = 0\n", + "F_DE = (-480*100.-B*60)/(math.sin(alpha)*250);\t\t\t#N, Force in link DE\n", + "print \"Force in link DE is F_DE = %.0f N Negative sign shows force is compressive\"%(F_DE);\n", + "#Applying sum(Fx) = 0\n", + "Cx = F_DE*math.cos(alpha)-B;\t\t\t#N, X component of force exerted at C\n", + "#Applying sum(Fy) = 0\n", + "Cy = F_DE*math.sin(alpha)+Ay;\t\t\t#N, Y component of force exerted at C\n", + "print \"Components of force exerted at C is Cx = %.0f N and Cy = %.0f N \"%(Cx,Cy);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force in link DE is F_DE = -561 N Negative sign shows force is compressive\n", + "Components of force exerted at C is Cx = -795 N and Cy = 216 N \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Given Data\n", + "P = 18.;\t\t\t#kN, Force applied at D\n", + "AF = 3.6;\t\t\t#m, Length AF\n", + "EF = 2.;\t\t\t#m, Length EF\n", + "ED = 2.;\t\t\t#m, Length ED\n", + "DC = 2.;\t\t\t#m, Length DC\n", + "#Entire frame\n", + "\n", + "# Calculations and Results\n", + "#Applying sum(M_F) = 0\n", + "Ay = -P*(EF+ED)/AF;\t\t\t#kN, Y component of reaction at A\n", + "\n", + "#Applying sum(Fx) = 0\n", + "Ax = -P;\t\t\t#kN, X component of reaction at A\n", + "#Applying sum(Fy) = 0\n", + "F = -Ay;\t\t\t#kN, reaction at B\n", + "\n", + "print \"Components of force exerted at A is Ax = %.0f kN and Ay = %.0f kN \"%(Ax,Ay);\n", + "print \"Force exerted at F is F = %.0f kN \"%(F);\n", + "#Free body member BE\n", + "#Applying sum(Fx) = 0\n", + "#B = E, and as it is 2 force member\n", + "By = 0;\n", + "Ey = 0;\n", + "\n", + "#Member ABC\n", + "#Applying sum(Fy) = 0\n", + "Cy = -Ay;\t\t\t#kN, Y component of force exerted at C\n", + "#Applying sum(M_C) = 0\n", + "B = (Ay*AF-Ax*(DC+ED+EF))/(ED+DC);\t\t\t#kN, Force in link DE\n", + "print \"Force exerted at B is B = %.0f kN \"%(B);\n", + "#Applying sum(Fx) = 0\n", + "Cx = -Ax-B;\t\t\t#kN, X component of force exerted at C\n", + "\n", + "print \"Components of force exerted at C is Cx = %.0f kN and Cy = %.0f kN \"%(Cx,Cy);\n", + "print \"Negative signs shows forces are in negative direction\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Components of force exerted at A is Ax = -18 kN and Ay = -20 kN \n", + "Force exerted at F is F = 20 kN \n", + "Force exerted at B is B = 9 kN \n", + "Components of force exerted at C is Cx = 9 kN and Cy = 20 kN \n", + "Negative signs shows forces are in negative direction\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "\n", + "# Given Data\n", + "P = 3.;\t\t\t#kN, Horizontal Force applied at A\n", + "AB = 1.;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BD = 1.;\t\t\t#m, perpendicular dismath.tance between D and B\n", + "CD = 1.;\t\t\t#m, perpendicular dismath.tance between C and D\n", + "FC = 1.;\t\t\t#m, perpendicular dismath.tance between C and F\n", + "EF = 2.4;\t\t\t#m, perpendicular dismath.tance between E and F\n", + "#Entire frame\n", + "\n", + "# Calculations\n", + "#Applying sum(M_E) = 0\n", + "Fy = P*(AB+BD+CD+FC)/EF;\t\t\t#kN, Y component of reaction at F\n", + "\n", + "\n", + "#Applying sum(Fy) = 0\n", + "Ey = -Fy;\t\t\t#kN, Y component of reaction at E\n", + "\n", + "#Free body member ACE\n", + "#Applying sum(Fy) = 0, and sum(M_E) = 0 we get 2 equation\n", + "A = [[-AB/math.sqrt(AB**2+EF**2) ,CD/math.sqrt(CD**2+EF**2) ] , [ -EF/math.sqrt(AB**2+EF**2)*(AB+BD+CD+FC) , -EF/math.sqrt(CD**2+EF**2)]];\t\t\t# Matrix of coefficients\n", + "B = [[Ey],[-P*(AB+BD+CD+FC)]];\t\t\t# Matrix B\n", + "X = solve(A,B);\t\t\t#kN Solution matrix\n", + "F_AB = X[0];\t\t\t#kN, Forec inmember AB\n", + "F_CD = X[1];\t\t\t#kN, Forec inmember CD\n", + "Ex = -P-EF/math.sqrt(AB**2+EF**2)*F_AB-EF/math.sqrt(CD**2+EF**2)*F_CD;\t\t\t#kN, X component of force exerted at E\n", + "#Free body : Entire frame\n", + "#Applying sum(F_X) = 0\n", + "Fx = -P-Ex;\t\t\t#kN, X component of force exetered at F\n", + "print \"Components of force exerted at F is Fx = %.1f kN and Fy = %.0f kN \"%(Fx,Fy);\n", + "print \"Force in member AB is F_AB = %.1f kN \"%(F_AB);\n", + "print \"Force in member CD is F_CD = %.1f kN \"%(F_CD);\n", + "print \"Components of force exerted at E is Ex = %.1f kN and Ey = %.1f kN \"%(Ex,Ey);\n", + "\n", + "print \"Negative signs shows forces are in negative direction\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Components of force exerted at F is Fx = -2.4 kN and Fy = 5 kN \n", + "Force in member AB is F_AB = 5.2 kN \n", + "Force in member CD is F_CD = -7.8 kN \n", + "Components of force exerted at E is Ex = -0.6 kN and Ey = -5.0 kN \n", + "Negative signs shows forces are in negative direction\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..0d354a4e --- /dev/null +++ b/_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 @@ -0,0 +1,665 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:80919ef508ad236e7f1f086d7446583820ebc3068a9c6be2a6a7308865841039" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Forces in beams and cable" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "P = 2400.;\t\t\t#N, Vertical Force applied at D\n", + "AB = 2.7;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BE = 2.7;\t\t\t#m, perpendicular dismath.tance between E and B\n", + "BK = 1.5;\t\t\t#m, perpendicular dismath.tance between B and K\n", + "AJ = 1.2;\t\t\t#m, perpendicular dismath.tance between A and J\n", + "EF = 4.8;\t\t\t#m, perpendicular dismath.tance between E and F\n", + "BD = 3.6;\t\t\t#m, perpendicular dismath.tance between D and B\n", + "#For entire truss\n", + "#By free body diagram we get the force at A, B , c\n", + "A = 1800.;\t\t\t#N\n", + "B = 1200.;\t\t\t#N\n", + "C = 3600.;\t\t\t#N\n", + "\n", + "# Calculations and Results\n", + "alpha = math.degrees(math.atan(EF/(AB+BE)));\t\t\t#rad\n", + "#a. Internal forces at j\n", + "#Applying sum(M_J) = 0\n", + "M = A*AJ;\t\t\t#N.m,Couple on member ACF at J\n", + "#Applying sum(Fx) = 0\n", + "F = A*math.cos(math.radians(alpha));\t\t\t#N, Axial force at J\n", + "#Applying sum(Fy) = 0\n", + "V = A*math.sin(math.radians(alpha));\t\t\t#N, shearing force at J\n", + "print \"Thus, Internal forces at J are equivalent to Couple M = %.0f N.m \\\n", + "\\nAxial force F = %.0f N \\\n", + "\\nShearing force V = %.0f N\"%(M,F,V);\n", + "\n", + "#a. Internal forces at K\n", + "#Applying sum(M_K) = 0\n", + "M = B*BK;\t\t\t#N.m,Couple on frame\n", + "#Applying sum(Fx) = 0\n", + "F = 0;\t\t\t#N, Axial force at J\n", + "#Applying sum(Fy) = 0\n", + "V = -B;\t\t\t#N, shearing force at J\n", + "print \"Thus, Internal forces at K are equivalent to Couple M = %.0f N.m \\\n", + "\\nAxial force F = %.0f N \\\n", + "\\nShearing force V = %.0f N\"%(M,F,V);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus, Internal forces at J are equivalent to Couple M = 2160 N.m \n", + "Axial force F = 1345 N \n", + "Shearing force V = 1196 N\n", + "Thus, Internal forces at K are equivalent to Couple M = 1800 N.m \n", + "Axial force F = 0 N \n", + "Shearing force V = -1200 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "#Drawing of shear and bending moment diagram\n", + "print \"Given problem is for drawing diagram, this diagram is drawn by step by step manner. \"\n", + "\n", + "# Given Data\n", + "F_A = -20.;\t\t\t#kN, force applied at A\n", + "F_C = -40.;\t\t\t#kN, force applied at C\n", + "AB = 2.5;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BC = 3.;\t\t\t#m, perpendicular dismath.tance between C and B\n", + "CD = 2.;\t\t\t#m, perpendicular dismath.tance between C and D\n", + "#By free body of entire beam\n", + "#By sum(m_D) = 0\n", + "\n", + "# Calculations and Results\n", + "R_B = -(CD*F_C+(AB+BC+CD)*F_A)/(BC+CD);\t\t\t#kN, Reaction atB\n", + "#By sum(m_A) = 0\n", + "R_D = -(BC*F_C-(AB)*F_A)/(BC+CD);\t\t\t#kN, Reaction atB\n", + "#For section 1\n", + "#Applying sum(Fy) = 0\n", + "V1 = F_A;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M1 = V1*0;\t\t\t#kN.m\n", + "\n", + "#For section 2\n", + "#Applying sum(Fy) = 0\n", + "V2 = F_A;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M2 = F_A*AB;\t\t\t#kN.m\n", + "\n", + "#For section 3\n", + "#Applying sum(Fy) = 0\n", + "V3 = R_B+F_A;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M3 = F_A*AB;\t\t\t#kN.m\n", + "\n", + "#For section 4\n", + "#Applying sum(Fy) = 0\n", + "V4 = R_B+F_A;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M4 = F_A*(AB+BC)+R_B*BC \t\t\t#kN.m\n", + "\n", + "#For section 5\n", + "#Applying sum(Fy) = 0\n", + "V5 = R_B+F_A+F_C;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M5 = F_A*(AB+BC)+R_B*BC\t\t\t#kN.m\n", + "\n", + "#For section 6\n", + "#Applying sum(Fy) = 0\n", + "V6 = R_B+F_A+F_C;\t\t\t#kN\n", + "#Applying sum(M1) = 0\n", + "M6 = V6*0\t\t\t#kN.m\n", + "X = [0,2.5,2.5,5.5,5.5,7.5]\n", + "\n", + "V = [V1,V2,V3,V4,V5,V6];\t\t\t#Shear matrix\n", + "M = [M1,M2,M3,M4,M5,M6];\t\t\t#Bending moment matrix\n", + "plot(X,V);\t\t\t#Shear diagram\n", + "plot(X,M,'r');\t\t\t#Bending moment diagram\n", + "suptitle( 'Shear and bending moment diagram')\n", + "xlabel('X axis')\n", + "ylabel( 'Y axis') ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given problem is for drawing diagram, this diagram is drawn by step by step manner. \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEhCAYAAACQrrywAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18VNW97/FPIHIUQxXae0VsUJvWaopwBKu9gDgtPh5Q\naWuRWhG0LfclbXk4cCzaK+TcHhTwipT2xOsNUmmPUKwPKR40gh7G2NaCD8QoQlBq2mOpFCpExUsN\nMOeP3x5nCDPJTOZh7T37+3698po9k3n4MZvs317rt9baICIiIiIiIiIiIiIiIiIiIiIiIiIiInKU\nHwCvAi8Dm4HPe4+3Av0cxZSNVlLH+X6BPu9+4Kvedh1wVoE+xw+GAJdn+NwoMNTbXgt8rBABib+U\nuw5A8u5/AGOAc4B27OD6d97vYkBZnj+vHDiY5/eMZfl4Pj4v/t7fLtBn+MU5wDDgiQyem/x9j8nT\n5/cEDuXpvaQAergOQPKuP7AHSwgA7wB/Tvr994AXgWbgs95jxwPLgY3AS8CV3uOnAY3e81/EEg5A\nBHgW+BWwJUUMtcDzWGulJunxVu9+x8//OLDOe34dnSeuxd7zngI+4T1WhR3kXvDijb/v/cCPgN8A\nO0i0BsqAnwDbgPXAf096/yiJs+P3gX8BmoDnkp5XBfz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SIxpO4ypxGldjbWr9yE\nDaX8J7fhdOlC/Dv66HTse2zCDhJ+/RsCO5A9j01yfQT/jj46HthDItn61c0khqSuwHoJRERERERE\nRERERERERERERERERERERKQ4KrFVJft69/t69wfm4b1/k4f3EBGRIvsn4F5v+178e/0OEREpgnJs\nNu0MbBZozzTPexRbcfRVEquOngpsBz6OrTH2LLa0MiQWHTwZW8phs/f+fr1GhIiIeC7FlgLpbK2l\neBfTcdjBPX7/m8CDWIvjnqTnv+fdzsKuSQ62Hk1FHuIVEZECWoKt1jmjk+fUkFhPaC9wftLvnsTW\n6To+6bF4UrgAu6zsPGydHxER8bG/x7qEKoE/YJcv7SiCdQ0d693fgF3vAWxF0i3YgT/5te8lbfcH\nvoV1IU3MU9wiIpJnZcBzJLqNvotdc6KjK0msiHom8P9JJIUfYxeGuZYjl9KOJ4WBJOoU3wEW5yNw\nERHJvynYEuhxPbCLqHS8Slkv4HHs8qCPAv+BJYULsYuaxK/C9jCJ9fbf9W4nYTWIl4BnsOK0iIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiISGn5L4IY6ze/kqXXAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n", + "\n", + "#Drawing of shear and bending moment diagram\n", + "#Values taken in N and m instead of lb and in\n", + "print \"Given problem is for drawing diagram%( this diagram is drawn by step by step manner. \"\n", + "\n", + "# Given Data\n", + "F_AC = 40.;\t\t\t#lb/in, distributed load applied at A to C\n", + "F_E = 400.;\t\t\t#lb, force applied at E\n", + "AC = 12.;\t\t\t#in, perpendicular dismath.tance between A and B\n", + "CD = 6.;\t\t\t#in, perpendicular dismath.tance between C and D\n", + "DE = 4.;\t\t\t#in, perpendicular dismath.tance between E and D\n", + "EB = 10.;\t\t\t#in, perpendicular dismath.tance between E and B\n", + "AB = 32.;\t\t\t#in, length of beam AB\n", + "\n", + "# Calculations and Results\n", + "F = F_AC*AC;\t\t\t#N, Force due to districuted load at AC/2\n", + "#By free body of entire beam\n", + "#By sum(m_A) = 0\n", + "By = (F*(AC/2)+F_E*(AC+CD+DE))/AB;\t\t\t#N,Y componet of Reaction at B\n", + "#By sum(m_B) = 0\n", + "#print (By)\n", + "A = (F*(AB-AC/2)+F_E*EB)/AB;\t\t\t#N, Reaction at A\n", + "#by sum(Fx) = 0\n", + "#print (A)\n", + "Bx = 0;\t\t\t#N, xcomponent of rection at B\n", + "#Diagrams\n", + "#For section A to C\n", + "#Applying sum(Fy) = 0\n", + "\n", + "i = 0;\n", + "X = []\n", + "V = []\n", + "M = []\n", + "for x in range(0,13,2):\n", + " i = i+1;\n", + " X.append(x);\n", + " V.append(A-F*x);\t\t\t#N\n", + " #Applying sum(M1) = 0\n", + " M.append(A*x-F/2*x**2);\t\t\t#N.m\n", + "\n", + "#For section Cto D\n", + "#Applying sum(Fy) = 0\n", + "for x in range(12,19,2):\n", + " i = i+1;\n", + " X.append(x);\n", + " V.append(A-F);\t\t\t#N\n", + " #Applying sum(M1) = 0\n", + " M.append( A*x-F*(x-0.15));\t\t\t#N.m\n", + "\n", + "for x in range(18,33,2):\n", + " i = i+1;\n", + " X.append(x);\n", + " #Applying sum(Fy) = 0\n", + " V.append(A-F-F_E);\t\t\t#N\n", + " #Applying sum(M1) = 0\n", + " M.append(A*x-F*(x-0.15)+F_E*DE-F_E*(x-0.045));\t\t\t#N.m\n", + "\n", + "plot(X,V,'r');\t\t\t#Shear diagram\n", + "plot(X,M,'-');\t\t\t#Bending moment diagram\n", + "suptitle( 'Shear and bending moment diagram')\n", + "xlabel('X axis')\n", + "ylabel('Y axis') ;\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given problem is for drawing diagram%( this diagram is drawn by step by step manner. \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAEhCAYAAABLFRaSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYU+X5//H3wDBAEWVTdkURN0RFFFBxGDdEUBZBwbaC\nQt2oVVtXsMrwxZ+tdnPpV+SnuKAVsUUUKiKgDCgqiyCgyCogoKBFWVQsDOT7x/3EnBkzw0xIcs5J\nPq/rypWTJyc5d85A7pxnBRERERERERERERERERERERERERERERGRjHY38BGwGFgEnO7K1wH1fIqp\nMtYRP85vU3S8Z4A+bvsJ4PgUHScITgYuquC+RcCpbvs14OBUBCTBlut3ABJoZwDdgbbAHuyLu7p7\nLgLkJPl4uUBxkt8zUsnyZBwv+t7XpOgYQdEWaAe8XoF9vee7e5KOXxXYm6T3kjSo4ncAEmiNgP9g\nyQbga+ALz/O/AT4AlgDHurJawFPAXGAh0MOVtwBmu/0/wJIZQAHwNvAq8HGcGB4D5mNXWYWe8nXu\ncenj1wemuf2foPyk+Fe33wyggStriX2BLnDxRt/3GeBhYA6whthVTA7wd2A5MB04zPP+RcR+1X8L\n3Ad8CLzn2a8l8L77DPcBO+PE2cK9/9PACuAfQBcXy0piV531gFewq9H3gDauvBB41n2edcClwJ/d\nMV8n9sOznYt5ATAV+/tHP8cfsb/pCqATUA34H6AfduV7WamYawIvAsuAl93jqHXErjonuuN9RMkE\nPdgday72d3zUlT8DPI6dswfcZ38X+7c2BzjG7XeVOxfTgLXAjcBtbr/3gLqISKDUwr5MVgD/C+R7\nnlsL/Npt34B9KQDcD/zCbddxr/0Z9oUTvTpqhSURsITzLXBEGTFEvxiqAjOBE/dz/EeA37vtbsA+\n4lep7QOucNv3EPtCexM42m13cI/BvujGu+3jgVVu+1LsSy0HaAx848pw8UYTzj5iv+wfwKoqAf6N\nfWkDXEfZCWcP0NodZwEwxj3XA/vSxn2Ge9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wdOTk64IiISRqdg1WTNgfWUnGU3qgCrLqvh\nHs8E8t32z7AFr1aVeu1Oz3Yj4FdYtdqVSYpbRERCJAd4j1hV2o3Ymi6l9SC2RMZxwC5iCedR4C7g\n58Bkz2uiCedwYu1Cvwb+mozARUQkXK7FljaIqoKtull6hdY8YAq25stE4C0s4XQG3iW2dvwEYmuo\n7HD3A7E2n4XALKyjgYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIyE/9H+vxqg9FRk9KAAAA\nAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "\n", + "#Drawing of shear and bending moment diagram\n", + "# Given Data\n", + "print \"Given problem is for drawing diagram%( this diagram is drawn by step by step manner. \"\n", + "F_B = 500.;\t\t\t#N, force applied at B\n", + "F_C = 500.;\t\t\t#N, force applied at C.\n", + "F_DE = 2400.;\t\t\t#N/m, distributed load applied at D to E\n", + "AB = 0.4;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BC = 0.4;\t\t\t#m, perpendicular dismath.tance between C and B\n", + "CD = 0.4;\t\t\t#m, perpendicular dismath.tance between C and D\n", + "DE = 0.3;\t\t\t#m, perpendicular dismath.tance between E and D\n", + "F_E = F_DE*DE;\t\t\t#N, force exerted at DE/2 from E\n", + "\n", + "#By free body of entire beam\n", + "#By sum(m_D) = 0\n", + "A = (CD*F_C+(BC+CD)*F_B-F_E*DE/2)/(AB+BC+CD);\t\t\t#N, Reaction at A\n", + "#By sum(Fy) = 0\n", + "Dy = F_C+F_B+F_E-A;\t\t\t#N,Y component of Reaction at D\n", + "#By sum(Fx) = 0\n", + "Dx = 0;\t\t\t#N,Y component of Reaction at D\n", + "#For section 1\n", + "#Applying sum(Fy) = 0\n", + "V1 = A;\t\t\t#N, shear force from A to B\n", + "\n", + "#For section 2\n", + "#Applying sum(Fy) = 0\n", + "V2 = A-F_B;\t\t\t#N, shear force from B to C\n", + "\n", + "#For section 3\n", + "#Applying sum(Fy) = 0\n", + "V3 = A-F_B-F_C;\t\t\t#N, shear force from C to D\n", + "\n", + "#For section 4\n", + "#Applying sum(Fy) = 0\n", + "V4 = A-F_B-F_C+Dy;\t\t\t#N, shear force At D\n", + "\n", + "#For section 5\n", + "#Applying sum(Fy) = 0\n", + "V5 = 0;\t\t\t#N, shear force at A\n", + "#Area under bending curve is change in bending moment of that 2 points\n", + "MA = 0;\t\t\t#N.m\n", + "MB = MA+V1*AB;\t\t\t#N.m\n", + "MC = MB+V2*BC;\t\t\t#N.m\n", + "MD = MC+V3*CD;\t\t\t#N.m\n", + "ME = MD+1./2*V4*AB;\t\t\t#N.m\n", + "\n", + "\n", + "X = [0,0.4,0.4,0.8,0.8,1.2,1.2,1.5];\n", + "V = [V1,V1,V2,V2,V3,V3,V4,V5];\t\t\t#Shear matrix,\n", + "\n", + "plot(X,V);\t\t\t#Shear diagram\n", + "X = [0,AB,AB+BC,AB+BC+CD,AB+BC+CD+DE];\n", + "M = [MA,MB,MC,MD,ME];\t\t\t#Bending moment matrix\n", + "plot(X,M,'r');\t\t\t#Bending moment diagram\n", + "suptitle( 'Shear and bending moment diagram')\n", + "xlabel('X axis')\n", + "ylabel('Y axis') ;\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Given problem is for drawing diagram%( this diagram is drawn by step by step manner. \n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEhCAYAAABRKfYcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcU9X5x/FP2GURpP5ktyyC4IL7XjUUkXEp4FJBUQGx\n2qJWBUFGVAZRFBXr0qLV1g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pLLMAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "%matplotlib inline\n", + "import math \n", + "from matplotlib.pyplot import plot\n", + "#Drawing of shear and bending moment diagram\n", + "\n", + "# Given Data\n", + "w = 20.;\t\t\t#kN/m, distributed load applied at D to E\n", + "AB = 6.;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BC = 3.;\t\t\t#m, perpendicular dismath.tance between C and B\n", + "\n", + "# Calculations and Results\n", + "F_B = w*AB;\t\t\t#kN, force exerted at AB/2 from A\n", + "\n", + "#By free body of entire beam\n", + "#By sum(m_C) = 0\n", + "RA = (F_B*(AB/2+BC))/(AB+BC);\t\t\t#kN, Reaction at A\n", + "\n", + "#By sum(m_A) = 0\n", + "RC = (F_B*(AB/2)/(AB+BC));\t\t\t#kN, Reaction at C\n", + "\n", + "#For section 1\n", + "#Applying sum(Fy) = 0\n", + "VA = RA;\t\t\t#N, shear force just to right to A\n", + "\n", + "#For section 2\n", + "#Applying sum(Fy) = 0\n", + "VB = VA-F_B;\t\t\t#kN, shear force just left to B\n", + "\n", + "#For section 3\n", + "#Applying sum(Fy) = 0\n", + "VC = VB;\t\t\t#kN, shear force from B to C\n", + "\n", + "\n", + "#Bending moment at each end is zero\n", + "# Maximum bending moment is at D where V = 0\n", + "VD = 0;\t\t\t#kN\n", + "\n", + "x = -(VD-VA)/w;\t\t\t#m, location of maximum bending moment\n", + "print \"Maximum bending moment is at D x = %.0f m from A\"%(x);\n", + "MA = 0;\t\t\t#kN.m\n", + "MD = MA+1/2*VA*x;\t\t\t#kN.m, maximum bending moment is at D\n", + "MB = MD+1/2*VB*(AB-x);\t\t\t#N.m\n", + "MC = MB+VB*BC;\t\t\t#N.m\n", + "\n", + "print \"Maximum bending moment is at MD = %.0fkN. m from A\"%(MD);\n", + "X = [0,x,AB,AB+BC];\t\t\t#m, \n", + "V = [VA,VD,VB,VC];\t\t\t#kN,Shear matrix,\n", + "\n", + "plot(X,V);\t\t\t#Shear diagram\n", + "X = [0,x,AB,AB+BC];\t\t\t#m\n", + "M = [MA,MD,MB,MC];\t\t\t#kN.m,Bending moment matrix\n", + "plot(X,M,'r');\t\t\t#Bending moment diagram\n", + "suptitle( 'Shear and bending moment diagram')\n", + "xlabel('X axis')\n", + "ylabel('Y axis') ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum bending moment is at D x = 4 m from A\n", + "Maximum bending moment is at MD = 0kN. m from A\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEhCAYAAABsu5d6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8VHX9+PHXZVFRVNRKMSxBRFEslXKhjIuioKhIGUuL\na8s3+FZ+v0Jq/lTKcmn7mi3mmsK31DIxCwE1vWK55RpooCj0TVMyJAyRAJnfH+8zznC9F+dyZ+ac\nmXk9H4/7mDNnlvO+23nPZ3sfkCRJkiRJkiRJkiRJkiRJkqSGcjYwH3gCeAz4YLJ/CbB9SjF1xBLa\njnNlhY53LfCxZPtKYGCFjpMF7weOLPG5LcD+yfZMYJtKBKTs6ZZ2AKqag4FRwH7AWuLEu3nyWA5o\nKvPxugHryvyeuQ7uL8fx8u/92QodIyv2AwYDs0p4bvHPe1SZjt8VeKNM76UK6ZJ2AKqanYB/EMkC\n4BXgxaLHvwg8AvwJ2CPZtxVwDfAg8ChwbLJ/V2Bu8vxHiGQE0AzcC/waeLKNGH4M/JFo5Uwt2r8k\nud/6+DsAtyfPv5KNJ7XvJc+7E3hHsm834gT4cBJv/n2vBb4P/AF4lkIrogn4IbAAuAN4V9H7t1D4\nVL0S+AbwOHB/0fN2Ax5IvodvAP9qI85dk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2\nseT9s3JtEEnSJhhBlFjZWM2rfLdVD+LEn79/KvALoqVyWdHz/5Xcng58NdluIqqaSpJq1CVEhdbT\nNvKcqRRqPy0HDix6bA5R92yron35hHEIcanh84gaTZKkGrUv0c20C/AX4rK3rTUT3U1bJPfvJq7z\nAVF19kkiKRS/9l9F2zsBnyG6pT5dprglSVXUBNxPoSvqP4nrirR2LIUKt3sCr1NIGD8gLjD0CTYs\nm55PGO+hMC4yCfheOQKXJFXX54iy9XldiAv0tL7y3WbAbcSlZmcAdxEJYyhxEZ38Vfx+ReF6Da8m\ntycSYx6PEtdYfm9ZvwNJkiRJkiRJkiRJkiRJkiRJkiRJkiSl7/8D9Fnh7/9MN+wAAAAASUVORK5C\nYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import solve\n", + "from numpy import array\n", + "\n", + "# given data\n", + "F_B = 30.;\t\t\t#kN, Vertical Force applied at B\n", + "F_C = 60.;\t\t\t#kN, Vertical Force applied at C\n", + "F_D = 20.;\t\t\t#kN, Vertical Force applied at D\n", + "AB = 6.;\t\t\t#m, perpendicular dismath.tance between A and B\n", + "BC = 3.;\t\t\t#m, perpendicular dismath.tance between C and B\n", + "CD = 4.5;\t\t\t#m, perpendicular dismath.tance between c and D\n", + "DE = 4.5;\t\t\t#m, perpendicular dismath.tance between D and E\n", + "AE = 6.;\t\t\t#m, vertical perpendicular dismath.tance between A and E\n", + "AC = 1.5;\t\t\t#m, vertical perpendicular dismath.tance between A and C\n", + "#For entire cable\n", + "#Sum(M_E) = 0, AB*Ax-Ay*(AB+BC+CD+DE)+F_B*(BC+CD+DE)+F_C*(CD+DE)+F_D*(DE) = 0\n", + "\n", + "# Calculations and Results\n", + "#Free body ABC \n", + "#Sum(M_c) = 0 gives -Ax*AC-Ay*(AB+BC)+F_B*BC = 0\n", + "#we get 2 equations in Ax and Ay\n", + "A = [[AB,-(AB+BC+CD+DE)],[-AC,-(AB+BC)]];\t\t\t#Matrix of coeficients\n", + "B = [[-(F_B*(BC+CD+DE)+F_C*(CD+DE)+F_D*(DE))],[-F_B*BC]]; \n", + "X = solve(A,-array(B));\t\t\t#kN, Solution matrix\n", + "Ax = X[0];\t\t\t#kN, X component of reaction at A\n", + "Ay = X[1];\t\t\t#kN, Y component of reaction at A\n", + "\n", + "#a. Elevation of points B and D\n", + "#Free body AB\n", + "#sum(M_B) = 0\n", + "yB = -Ay*AB/Ax;\t\t\t#m, below A\n", + "print \"Elevation of point B is %.2f m below A\"%(yB);\n", + "#free body ABCD\n", + "#sum(M_D) = 0\n", + "yD = (Ay*(AB+BC+CD)-F_B*(BC+CD)-F_C*CD)/Ax;\t\t\t#m, above A\n", + "print \"Elevation of point D is %.2f m above A\"%(yD);\n", + "\n", + "#Maximum slope and maximum tension\n", + "theta = math.atan((AE-yD)/DE);\t\t\t#rad \n", + "Tmax = -Ax/math.cos(theta);\t\t\t#kN, maximum tension\n", + "theta = theta/math.pi*180;\t\t\t#degree\n", + "\n", + "print \"Maximum slope is theta = %.1f degree and maximum tension in the cable is Tmax = %.1f kN \"%(theta,Tmax);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elevation of point B is 1.67 m below A\n", + "Elevation of point D is -9.25 m above A\n", + "Maximum slope is theta = 73.6 degree and maximum tension in the cable is Tmax = -318.0 kN \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "yB = 0.5;\t\t\t#m, sag of the cable\n", + "m = 0.75;\t\t\t#kg/m, mass per unit length\n", + "g = 9.81;\t\t\t#m/s**2, acceleration due to gravity\n", + "AB = 40.;\t\t\t#m, dismath.tance AB\n", + "\n", + "# Calculations and Results\n", + "#a. Load P\n", + "w = m*g;\t\t\t#N/m , Load per unit length\n", + "xB = AB/2;\t\t\t#m, dismath.tance CB\n", + "W = w*xB;\t\t\t#N, applied at halfway of CB\n", + "\n", + "#Summing moments about B\n", + "#sum(M_B) = 0\n", + "To = W*xB/2/yB;\t\t\t#N\n", + "#from force triangle\n", + "TB = math.sqrt(To**2+W**2);\t\t\t#N, = P, as tension on each side is same\n", + "print \"Magnitude of load P = %.0f N \"%(TB);\n", + "#slope of cable at B\n", + "theta = math.atan(W/To);\t\t\t#rad\n", + "theta = theta*180/math.pi;\t\t\t#degree, conversion to degree\n", + "print \"Slope of cable at B is theta = %.1f degree\"%(theta);\n", + "#length of cable\n", + "#applying eq. 7.10\n", + "sB = xB*(1+2./3*(yB/xB)**2);\t\t\t#m\n", + "\n", + "print \"Total length of cable from A to B is Length = %.4f m\"%(2*sB);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of load P = 2947 N \n", + "Slope of cable at B is theta = 2.9 degree\n", + "Total length of cable from A to B is Length = 40.0167 m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "AB = 150.;\t\t\t#m, dismath.tance AB\n", + "s = 30.;\t\t\t#m, sag of cable\n", + "w = 45.;\t\t\t#N/m Uniform weigth per unit length of cable\n", + "\n", + "#Equation of cable, by 7.16\n", + "#Coordinates of B\n", + "\n", + "xB = AB/2;\t\t\t#m\n", + "C = [99,105,98.4,90];\t\t\t#trial values\n", + "\n", + "# Calculations and Results\n", + "for i in range(4):\n", + " if ((30/C[i]+1)-math.cosh(xB/C[i]))<0.0001:\n", + " c = C[i];\n", + " break;\n", + "\n", + "yB = s+c;\t\t\t#m\n", + "\n", + "#Maximum and minimum values of tension\n", + "Tmin = w*c;\t\t\t#N, To\n", + "Tmax = w*yB;\t\t\t#N TB\n", + "print \"Minimum value of tension in cable is Tmin = %.0f N\"%(Tmin);\n", + "print \"Maximum value of tension in cable is Tmax = %.0f N\"%(Tmax);\n", + "#Length of cable\n", + "\n", + "S_CB = math.sqrt(yB**2-c**2);\t\t\t#m, one halph length by 7.17\n", + "S_AB = 2*S_CB;\t\t\t#m, full length of cable\n", + "\n", + "print \"Fulllength of cable is s_AB = %.0f m\"%(S_AB);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum value of tension in cable is Tmin = 4455 N\n", + "Maximum value of tension in cable is Tmax = 5805 N\n", + "Fulllength of cable is s_AB = 165 m\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..aae7cfaa --- /dev/null +++ b/_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 @@ -0,0 +1,419 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7af7f34ed557e59fd4022f8fd1f88cb3f2e438f82d36d10da43ff287edeb4cbb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 : Friction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 396" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "h = 100.;\t\t\t#lb, horizontal force\n", + "W = 300.;\t\t\t#lb, weight of block\n", + "us = 0.2;\t\t\t# Coeffiecient of static friction\n", + "uk = 0.20;\t\t\t#Co = efficient of kinetic friction\n", + "\n", + "# Calculations and Results\n", + "#Applying sumFx = 0 , we get\n", + "F = h-3./5*W;\t\t\t#lb, Force along plane\n", + "F = -F\n", + "#Applying sumFy = 0, we get\n", + "N = 4./5*W\t\t\t#lb, Normal force to the plane\n", + "print \"Force F required to maintain the equillibrium is thus %.0f lb, up and to right\"%(F);\n", + "\n", + "# Maximum friction force\n", + "Fm = us*N;\t\t\t#lb,Maximum friction force\n", + "print \" Maximum friction force is %.2f lb is less than that of required to maintain equillibrium\\\n", + "\\n that is %.2f lb So, equillibrium will nat maintain and block wil move down\"%(Fm,F);\n", + "# Actual value of friction force\n", + "Fk = (0.6*300)-(h)-(Fm);\t\t\t#lb, Actual value of friction force\n", + "print \"Actual value of friction force is %.2f lb directed up and to the right\"%(Fk);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force F required to maintain the equillibrium is thus 80 lb, up and to right\n", + " Maximum friction force is 48.00 lb is less than that of required to maintain equillibrium\n", + " that is 80.00 lb So, equillibrium will nat maintain and block wil move down\n", + "Actual value of friction force is 32.00 lb directed up and to the right\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 397" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "F = 800.;\t\t\t#N Firce in verical direction\n", + "us = 0.35;\t\t\t# Coeffiecient of static friction\n", + "uk = 0.25;\t\t\t#Co = efficient of kinetic friction\n", + "theta = 25.;\t\t\t#degree, angle of inclination\n", + "\n", + "# Calculations and Results\n", + "theta = theta*math.pi/180;\t\t\t#rad, Conversion into radian\n", + "# Force P start block moving up\n", + "# At static equillibrium Tan(Theta_s) = us\n", + "theta_s = math.atan(us);\t\t\t#rad\n", + "P = F*math.tan(theta+theta_s);\t\t\t#N,Force P to start block moving up\n", + "print \"Force P to start block moving up is %.0f N\"%(P);\n", + "\n", + "\n", + "# Force P to keep block moving up\n", + "# At kinetic equillibrium Tan(Theta_k) = uk\n", + "theta_k = math.atan(uk);\t\t\t#rad\n", + "P = F*math.tan(theta+theta_k);\t\t\t#N,Force P to keep block moving up\n", + "print \"Force P to keep block moving up is %.0f N\"%(P);\n", + "\n", + "\n", + "# Force P to prevent block from sliding down\n", + "\n", + "theta_s = math.atan(us);\t\t\t#rad\n", + "P = F*math.tan(theta-theta_s);\t\t\t#N,Force P to prevent block from sliding down\n", + "print \"Force P to prevent block from sliding down is %.0f N\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force P to start block moving up is 780 N\n", + "Force P to keep block moving up is 649 N\n", + "Force P to prevent block from sliding down is 80 N\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No : 0" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "us = 0.25;\t\t\t# Coeffiecient of static friction\n", + "\n", + "# Calculations and Results\n", + "#Applying equillibrium equation we get relation in x\n", + "print \"Apply equillibrium equations. It is theoritical part. \";\n", + "x = 12-(.75*2)+1.5\t\t\t#in, Dismath.tance at which the applied load can be supported\n", + "print \"Minimum dismath.tance at which the applied load can be supported is %.0f in\"%(x);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Apply equillibrium equations. It is theoritical part. \n", + "Minimum dismath.tance at which the applied load can be supported is 12 in\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "F = 400.;\t\t\t#lb, force exerte\n", + "us = 0.35;\t\t\t# Coeffiecient of static friction\n", + "phi = math.degrees(math.atan(us));\t\t\t#rad, angle of friction\n", + "#print (phi)\n", + "theta = 8.;\t\t\t#degree, angle of inclination\n", + "theta = theta*math.pi/180;\t\t\t#rad, Conversion into radian\n", + "\n", + "# Calculations and Results\n", + "#Umath.sing math.sine rule\n", + "#force p to raise block\n", + "#free body , block B\n", + "R1 = F*math.sin(math.radians(109.3))/(math.sin(math.radians(43.4)))\n", + "#free body wedge A\n", + "P = R1*math.sin(math.radians(46.6))/(math.sin(math.radians(70.7)))\n", + "print \" force required to raise block is P = %.0f lb\"%(P);\n", + "\n", + "#force to lower block\n", + "#free body , block B\n", + "R1 = F*math.sin(math.radians(70.7))/(math.sin(math.radians(98.0)))\n", + "#free body wedge A\n", + "P = R1*math.sin(math.radians(30.6))/(math.sin(math.radians(70.7)))\n", + "print \" force required to lower block is P = %.0f lb\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " force required to raise block is P = 423 lb\n", + " force required to lower block is P = 206 lb\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "pitch = 2.;\t\t\t#mm, pitch of screw\n", + "d = 10.;\t\t\t#mm, mean diameter of thread\n", + "r = d/2;\t\t\t#mm, radius\n", + "us = 0.30;\t\t\t# Coeffiecient of static friction\n", + "M = 40.;\t\t\t#kN.m , Maximum couple\n", + "\n", + "# Calculations and Results\n", + "#Force exerted by clamp\n", + "L = 2*pitch;\t\t\t#mm, as screw is double threaded\n", + "theta = math.atan(L/(2*math.pi*r));\t\t\t#rad, angle of inclination\n", + "phi = math.atan(us);\t\t\t#rad, angle of friction\n", + "Q = M/r*1000;\t\t\t#N, Force applied to block representing screw\n", + "Q = Q/1000\t\t\t#kN, Conversion into kN\n", + "W = Q/math.tan(theta+phi);\t\t\t#kN, Magnitude of force exerted on the piece of wood \n", + "print \"Magnitude of force exerted on the piece of wood is W = %.2f kN \"%(W);\n", + "#Couple required to loosen clamp\n", + "Q = W*math.tan(phi-theta);\t\t\t#kN, Force required to loosen clamp\n", + "Couple = Q*r;\t\t\t#N.m, Couple required to loosen clamp\n", + "print \"Couple required to loosen clamp is %.2f N.m\"%(Couple);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of force exerted on the piece of wood is W = 18.01 kN \n", + "Couple required to loosen clamp is 14.97 N.m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 423" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy.mpmath import cot\n", + "#from numpy import cot\n", + "\n", + "# Given Data\n", + "r = 1.\t\t\t#in in\n", + "us = 0.20;\t\t\t# Coeffiecient of static friction between shaft and pully\n", + "\n", + "# Calculations and Results\n", + "#Vertical Force required to raise load\n", + "rf = r*us;\t\t\t#in, Perpendicular dismath.tance from the center Of pully to line of action \n", + "#summing moment about B\n", + "P1 = (2.20*500)/1.8\t\t\t#lb , downward Force required to raise load\n", + "print \"Force required to raise load is %f lb in downward direction\"%(P1);\n", + "\n", + "#Vertcal Force required to hold load\n", + "\n", + "#summing moment about C\n", + "P = (1.80*500)/2.20\t\t\t#lb , downward Force required to hold load\n", + "print \"Force required to hold load is %.0f lb in downward direction\"%(P);\n", + "\n", + "#Horizontal force P to start raimath.sing the load\n", + "OE = rf;\t\t\t#mm,\n", + "OD = math.sqrt(2)*2;\t\t\t#in, pythagorus theorm\n", + "theta = math.asin(OE/OD);\t\t\t#rad, \n", + "\n", + "# from force triangle\n", + "P = 500*cot(math.radians(40.9));\t\t\t#lb, Horizontal force P to start raimath.sing the load\n", + "print \"Horizontal force P required to start raising the load is %.0f lb\"%(P);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force required to raise load is 611.111111 lb in downward direction\n", + "Force required to hold load is 409 lb in downward direction\n", + "Horizontal force P required to start raising the load is 577 lb\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "T1 = 150.;\t\t\t#N, Force on free end of hawser\n", + "T2 = 7500.;\t\t\t#N, Force on other end of hawser\n", + "\n", + "# Calculations and Results\n", + "#a, coefficient of friction\n", + "bta = 2*2*math.pi;\t\t\t#rad, angle of contact, 2 turns\n", + "#By equation 8.13\n", + "us = math.log(T2/T1)/bta;\t\t\t# Co-efficient of static friction\n", + "print \"Coefficient of static friction between hawser and ballard is us = %0.3f \"%(us);\n", + "\n", + "#Number of wraps when tension in hawser = 75 kN\n", + "\n", + "bta = 3*2*math.pi\t\t\t#in rad\n", + "#One turn = 2* pi angle, bta corresponds to\n", + "ten = T1*math.exp(bta*us)\n", + "print \"Tension is %f N \"%(ten);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficient of static friction between hawser and ballard is us = 0.311 \n", + "Tension is 53033.008589 N \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No : 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "T2 = 600.;\t\t\t#lb, Tension from side 2\n", + "us = 0.25;\t\t\t# Coeffiecient of static friction between pulley and belt\n", + "bta = (2*math.pi)/3;\t\t\t#Co = efficient of kinetic friction between pulley and belt\n", + "r1 = 8.\t\t\t#in in\n", + "#Pulley B\n", + "\n", + "# Calculations\n", + "T1 = T2/(math.exp(us*bta))\t\t\t#N, Tension from side 1\n", + "#print (T1)\n", + "\n", + "#Pulley A\n", + "#Aumming moment about A\n", + "MA = (T2*r1)-(T1*r1);\t\t\t#lb-ft, Couple MA applied to pulley which is equal and opposite to torque \n", + "\n", + "# Results\n", + "print \"The largest torque which can be exerted by belt on pulley A is MA = %0.0f lb-in\"%(MA);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The largest torque which can be exerted by belt on pulley A is MA = 1957 lb-in\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..78d5af3d --- /dev/null +++ b/_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 @@ -0,0 +1,174 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9d692b8ada89b9372523f07f56e78c71c5c09788ec3236a2d96cefbcb6dfce2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Distributed forces Moment of Inertia" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "#Area of plate\n", + "A = 9*.75;\t\t\t#in**2\n", + "y = 1./2*13.84+1/2*.75;\t\t\t#in, y co-ordinate of centroid of the plate\n", + "\n", + "# Calculations and Results\n", + "#All values for flange are from table from book\n", + "sumA = A+8.85;\t\t\t#in**2 Total area\n", + "sumyA = y*A+0;\t\t\t#in**3\n", + "Y = sumyA/sumA;\t\t\t#in \n", + "#print (Y)\n", + "#Moment of inertia\n", + "#For wide flanfe\n", + "Ix1 = 291+8.85*Y**2;\t\t\t#in**4\n", + "#for plate\n", + "Ix2 = 1./12*9*(3./4)**3+6.75*(7.295-3.156)**2;\t\t\t#in**4\n", + "#For composite area\n", + "Ix = Ix1+Ix2;\t\t\t#in**4\n", + "\n", + "print \"Moment of inertia Ix = %.2e in**4 \"%(Ix);\n", + "\n", + "#Radius of gyration\n", + "kx = math.sqrt(Ix/sumA);\t\t\t#mm\n", + "print \"Radius of gyration is kx = %.1f in\"%(kx);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moment of inertia Ix = 4.86e+02 in**4 \n", + "Radius of gyration is kx = 5.6 in\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "r = 90.;\t\t\t#mm, radius of half circle\n", + "b = 240.;\t\t\t#mm, width\n", + "h = 120.;\t\t\t#mm, height\n", + "\n", + "# Calculations\n", + "#Moment of inertia of recmath.tangle\n", + "Ixr = 1./3*b*h**3;\t\t\t#mm**4\n", + "#Moment of inertia of half circle\n", + "a = 4*r/(3*math.pi);\t\t\t#mm\n", + "b = h-a;\t\t\t#mm, Dismath.tance b from centroid c to X axis\n", + "I_AA = 1./8*math.pi*r**4;\t\t\t#mm**4, Moment of inertia of half circle with respect to AA'\n", + "A = 1./2*math.pi*r**2;\t\t\t#mm**2, Area of half circle\n", + "Ix1 = I_AA-A*a**2;\t\t\t#mm**4, Parallel axis theorem\n", + "Ixc = Ix1+A*b**2;\t\t\t#mm**4, Parallel axis theorem\n", + "#Moment of inertia of given area\n", + "Ix = Ixr-Ixc;\t\t\t#mm**4\n", + "\n", + "# Results\n", + "print \"Moment of inertia of area about X axis is Ix = %2.2e mm**4\"%(Ix);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Moment of inertia of area about X axis is Ix = 4.59e+07 mm**4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7 Page No : 479" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Given Data\n", + "Ix = 10.38;\t\t\t#in**4,Moment of inertia about x axis\n", + "Iy = 6.97;\t\t\t#in**4,Moment of inertia about y axis\n", + "\n", + "# Calculations and Results\n", + "Ixy = -3.28+0-3.28\n", + "print (Ixy)\t\t\t#in in**4\n", + "\n", + "#Principal axes\n", + "tan_2_theta_m = -(2*Ixy)/(Ix-Iy)\n", + "two_theta_m = math.degrees(math.atan(tan_2_theta_m))\n", + "theta_m = two_theta_m/2\n", + "print \"Orientation of principle axes of section about O is Theta_m = %.1f degree \"%(theta_m);\n", + "\n", + "#Principle moment of inertia, eqn 9.27\n", + "Imax = (Ix+Iy)/2+math.sqrt(((Ix-Iy)/2)**2+Ixy**2);\t\t\t#mm**4\n", + "Imin = (Ix+Iy)/2-math.sqrt(((Ix-Iy)/2)**2+Ixy**2);\t\t\t#mm**4\n", + "\n", + "print \"Principle moment of inertia of section about O are Imax = %.2e in**4 Imin = %.0e in**4\"%(Imax,Imin);\n", + "#answer difference is due to roundoff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-6.56\n", + "Orientation of principle axes of section about O is Theta_m = 37.7 degree \n", + "Principle moment of inertia of section about O are Imax = 1.55e+01 in**4 Imin = 2e+00 in**4\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/_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 b/_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 new file mode 100644 index 00000000..fd5fc75f Binary files /dev/null and b/_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 differ diff --git a/_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 b/_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 new file mode 100644 index 00000000..296561a0 Binary files /dev/null and b/_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 differ diff --git a/_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 b/_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 new file mode 100644 index 00000000..f6f68771 Binary files /dev/null and b/_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 differ diff --git a/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb new file mode 100644 index 00000000..1bfa373e --- /dev/null +++ b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb @@ -0,0 +1,149 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:41187fe2c381fd7b42e97b2fb4a9a8ffca57cedad7f414bab15784b2fa882a72" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2:ELECTROMAGNETIC PLANE WAVES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.5:pg-69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + " \n", + "import math \n", + "#(a) Program to find gold-film surface resistance \n", + " \n", + " \n", + "t=80*(10**(-10)) #Film Thickness\n", + "o=4.1*(10**7) #Bulk conductivity \n", + "p=570*(10**(-10)) #Electron mean free path \n", + "of=((3*t*o)/(4*p))*(0.4228 + math.log(p/t)) #the gold-film conductivity is of=(3*t*o/4*p)*(0.4228 + ln(p/t)) \n", + "\n", + "Rs=1/(t*of) #the gold-film surface resistance is given by Rs=1/(t*of) in Ohms per square\n", + "\n", + "\n", + "print\"The gold film surface resistance in Ohms per square is=\",round(Rs,2),\"Ohms/square\"\n", + "\n", + "\n", + "#(b) Program to find the microwave attenuation \n", + "\n", + "Attenuation=40-20*log10(Rs) #Microwave attenuation \n", + "\n", + "print\"Microwave Attenuation in db is=\",int(Attenuation),\"db\"\n", + "\n", + "\n", + "#(c)Light transmittance T\n", + "\n", + "print\"From figure No.2-6-5 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for gold film, we find that for given gold film of thickness 80 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 75%\"\n", + "\n", + "\n", + "#(d)light reflection loss R\n", + "\n", + "print\"From the same figure the LIGHT REFLECTION LOSS R is about 25%\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gold film surface resistance in Ohms per square is= 12.14 Ohms/square\n", + "Microwave Attenuation in db is= 18 db\n", + "From figure No.2-6-5 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for gold film, we find that for given gold film of thickness 80 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 75%\n", + "From the same figure the LIGHT REFLECTION LOSS R is about 25%\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2.6.6:pg-74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math \n", + "#(a) Program to find copper-film surface resistance \n", + " \n", + " \n", + "t=60*(10**(-10)) #Film Thickness\n", + "o=5.8*(10**7) #Bulk conductivity \n", + "p=420*(10**(-10)) #Electron mean free path \n", + "of=((3*t*o)/(4*p))*(0.4228 + math.log(p/t)) #the copper-film conductivity is of=(3*t*o/4*p)*(0.4228 + ln(p/t))\n", + "Rs=1/(t*of) #the copper-film surface resistance is given by Rs=1/(t*of) in Ohms per square\n", + "\n", + "print\"The copper-film surface resistance in Ohms per square is=\",round(Rs,2),\"Ohms/square\"\n", + "\n", + "\n", + "#(b) Program to find the microwave attenuation \n", + "\n", + "Attenuation=40-20*log10(Rs) #Microwave attenuation \n", + "\n", + "print\"Microwave Attenuation in db is=\",int(round(Attenuation)),\"db\"\n", + "\n", + "#(c)Light transmittance T\n", + "\n", + "print\"From figure No.2-6-11 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for copper film, we find that for given copper film of thickness 60 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 82%\"\n", + "\n", + "#(d)light reflection loss R\n", + "\n", + "print\"From the same figure the LIGHT REFLECTION LOSS R is about 18%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The copper-film surface resistance in Ohms per square is= 11.32 Ohms/square\n", + "Microwave Attenuation in db is= 19 db\n", + "From figure No.2-6-11 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for copper film, we find that for given copper film of thickness 60 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 82%\n", + "From the same figure the LIGHT REFLECTION LOSS R is about 18%\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AdityaAnand/Chapter_8.ipynb b/sample_notebooks/AdityaAnand/Chapter_8.ipynb new file mode 100644 index 00000000..cbd1971a --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.2" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The force acting = [0.0, 2.5849394142282115e-26, 0.0] ≈ 0\n", + "(b) The force acting = 2 Gm²\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "x=30 # The angle between GC and the positive x-axis is 30° and so is the angle between GB and the negative x-axis\n", + "y=math.radians(x) # The angle in radians\n", + "a=math.cos(y)\n", + "b=math.sin(y)\n", + "v1=(0,1,0)\n", + "v2=(-a,-b,0)\n", + "v3=(a,-b,0)\n", + "c=(2*G*pow(m,2))/1 # 2Gm²/1\n", + "\n", + "# Calculation\n", + "\n", + "#(a)\n", + "F1=[y * c for y in v1] # F(GA)\n", + "F2=[y * c for y in v2] # F(GB)\n", + "F3=[y * c for y in v3] # F(GC)\n", + "# From the principle of superposition and the law of vector addition, the resultant gravitational force FR on (2m) is given by\n", + "Fa=[sum(x) for x in zip(F1,F2,F3)]\n", + "\n", + "#(b)\n", + "# By symmetry the x-component of the force cancels out and the y-component survives\n", + "Fb=4-2 # 4Gm² j - 2Gm² j\n", + "\n", + "# Result\n", + "\n", + "print(\"(a) The force acting =\",Fa,\"≈ 0\")\n", + "print(\"(b) The force acting =\",Fb,\"Gm²\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.3 " + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Potential energy of a system of four particles = -5.414213562373095 Gm²/l\n", + "The gravitational potential at the centre of the square = -5.65685424949238 Gm²/l\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "l=1 # For convenience,side of the square is assumed to be unity \n", + "c=(G*pow(m,2))/l\n", + "n=4 # Number of particles\n", + "\n", + "# Calculation\n", + "\n", + "d=math.sqrt(2)\n", + "# If the side of a square is l then the diagonal distance is √2l\n", + "# We have four mass pairs at distance l and two diagonal pairs at distance √2l \n", + "# Since the Potential Energy of a system of four particles is -4Gm²/l) - 2Gm²/dl\n", + "w=(-n-(2/d)) \n", + "# If the side of a square is l then the diagonal distance from the centre to corner is \n", + "# Since the Gravitational Potential at the centre of the square\n", + "u=-n*(2/d)\n", + "\n", + "# Result\n", + "\n", + "print (\"Potential energy of a system of four particles =\",w,\"Gm²/l\")\n", + "print(\"The gravitational potential at the centre of the square =\",u,\"Gm²/l\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.4" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum speed of the projectile to reach the surface of the second sphere = ( 0.6 GM/R ) ^(1/2)\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "R=1 # For convenience,radii of both the spheres is assumed to be unity \n", + "M=1 # For convenience,mass is assumed to be unity \n", + "m1=M # Mass of the first sphere\n", + "m2=6*M # Mass of the second sphere\n", + "m=1 # Since the mass of the projectile is unknown,take it as unity\n", + "d=6*R # Distance between the centres of both the spheres\n", + "r=1 # The distance from the centre of first sphere to the neutral point N\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "\n", + "# Calculation\n", + "\n", + "# Since N is the neutral point; GMm/r² = 4GMm/(6R-r)² and we get\n", + "r=2*R\n", + "# The mechanical energy at the surface of M is; Et = m(v^2)/2 - GMm/R - 4GMm/5R\n", + "# The mechanical energy at N is; En = -GMm/2R - 4GMm/4R\n", + "# From the principle of conservation of mechanical energy; Et = En and we get\n", + "v_sqr=2*((4/5)-(1/2))\n", + "\n", + "# Result\n", + "\n", + "print(\"Minimum speed of the projectile to reach the surface of the second sphere =\",\"(\",round(v_sqr,5),\"GM/R\",\")\",\"^(1/2)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.5 " + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Mass of Mars = 6.475139697520706e+23 kg\n", + "(ii) Period of revolution of Mars = 684.0033777694376 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "π=3.14 # Constant pi\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "R=9.4*pow(10,3) # Orbital radius of Mars in km\n", + "T=459*60\n", + "Te=365 # Period of revolution of Earth\n", + "r=1.52 # Ratio of Rms/Res, where Rms is the mars-sun distance and Res is the earth-sun distance. \n", + "\n", + "# Calculation\n", + "\n", + "# (i) \n", + "R=R*pow(10,3)\n", + "# Using Kepler's 3rd law:T²=4π²(R^3)/GMm\n", + "Mm=(4*pow(π,2)*pow(R,3))/(G*pow(T,2))\n", + "\n", + "# (ii)\n", + "# Using Kepler's 3rd law: Tm²/Te² = (Rms^3/Res^3)\n", + "Tm=pow(r,(3/2))*365\n", + "\n", + "\n", + "# Result\n", + "\n", + "print(\"(i) Mass of Mars =\",Mm,\"kg\")\n", + "print(\"(ii) Period of revolution of Mars =\",Tm,\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.6" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass of the Earth = 5.967906881559221e+24 kg\n", + "Mass of the Earth = 6.017752855396305e+24 kg\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "g=9.81 # Acceleration due to gravity\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "R=3.84*pow(10,8) # Distance of Moon from Earth in m\n", + "T=27.3 # Period of revolution of Moon in days\n", + "π=3.14 # Constant pi\n", + "\n", + "# Calculation\n", + "\n", + "# I Method\n", + "# Using Newton's 2nd law of motion:g = F/m = GMe/Re²\n", + "Me1=(g*pow(Re,2))/G\n", + "\n", + "# II Method\n", + "# Using Kepler's 3rd law: T²= 4π²(R^3)/GMe\n", + "T1=T*24*60*60\n", + "Me2=(4*pow(π,2)*pow(R,3))/(G*pow(T1,2))\n", + "\n", + "#Result\n", + "\n", + "print(\"Mass of the Earth =\",Me1,\"kg\")\n", + "print(\"Mass of the Earth =\",Me2,\"kg\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.7 " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Period of revolution of Moon = 27.5 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "k=pow(10,-13) # A constant = 4π² / GME\n", + "Re=3.84*pow(10,5) # Distance of the Moon from the Earth in m\n", + "\n", + "# Calculation\n", + "\n", + "k=pow(10,-13)*(pow(1/(24*60*60),2))*(1/pow((1/1000),3))\n", + "T2=k*pow(Re,3)\n", + "T=math.sqrt(T2) # Period of revolution of Moon in days\n", + "\n", + "# Result\n", + "\n", + "print(\"Period of revolution of Moon =\",round(T,1),\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###Example 8.8 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in Kinetic Energy = 3124485000.0 J\n", + "Change in Potential Energy = 6248970000.0 J\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "m=400 # Mass of satellite in kg\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "g=9.81 # Acceleration due to gravity\n", + "\n", + "# Calculation\n", + "\n", + "# Change in energy is E=Ef-Ei\n", + "ΔE=(g*m*Re)/8 # Change in Total energy\n", + "# Since Potential Energy is twice as the change in Total Energy (V = Vf - Vi)\n", + "ΔV=2*ΔE # Change in Potential Energy in J\n", + "\n", + "# Result\n", + "\n", + "print(\"Change in Kinetic Energy =\",round(ΔE,4),\"J\")\n", + "print(\"Change in Potential Energy =\",round(ΔV,4),\"J\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb new file mode 100644 index 00000000..c08a4250 --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 , page : 187" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The force acting = [0.0, 2.5849394142282115e-26, 0.0] ≈ 0\n", + "(b) The force acting = 2 Gm²\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "x=30 # The angle between GC and the positive x-axis is 30° and so is the angle between GB and the negative x-axis\n", + "y=math.radians(x) # The angle in radians\n", + "a=math.cos(y)\n", + "b=math.sin(y)\n", + "v1=(0,1,0)\n", + "v2=(-a,-b,0)\n", + "v3=(a,-b,0)\n", + "c=(2*G*pow(m,2))/1 # 2Gm²/1\n", + "\n", + "# Calculation\n", + "\n", + "#(a)\n", + "F1=[y * c for y in v1] # F(GA)\n", + "F2=[y * c for y in v2] # F(GB)\n", + "F3=[y * c for y in v3] # F(GC)\n", + "# From the principle of superposition and the law of vector addition, the resultant gravitational force FR on (2m) is given by\n", + "Fa=[sum(x) for x in zip(F1,F2,F3)]\n", + "\n", + "#(b)\n", + "# By symmetry the x-component of the force cancels out and the y-component survives\n", + "Fb=4-2 # 4Gm² j - 2Gm² j\n", + "\n", + "# Result\n", + "\n", + "print(\"(a) The force acting =\",Fa,\"≈ 0\")\n", + "print(\"(b) The force acting =\",Fb,\"Gm²\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3 , page : 192" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Potential energy of a system of four particles = -5.414213562373095 Gm²/l\n", + "The gravitational potential at the centre of the square = -5.65685424949238 Gm²/l\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "l=1 # For convenience,side of the square is assumed to be unity \n", + "c=(G*pow(m,2))/l\n", + "n=4 # Number of particles\n", + "\n", + "# Calculation\n", + "\n", + "d=math.sqrt(2)\n", + "# If the side of a square is l then the diagonal distance is √2l\n", + "# We have four mass pairs at distance l and two diagonal pairs at distance √2l \n", + "# Since the Potential Energy of a system of four particles is -4Gm²/l) - 2Gm²/dl\n", + "w=(-n-(2/d)) \n", + "# If the side of a square is l then the diagonal distance from the centre to corner is \n", + "# Since the Gravitational Potential at the centre of the square\n", + "u=-n*(2/d)\n", + "\n", + "# Result\n", + "\n", + "print (\"Potential energy of a system of four particles =\",w,\"Gm²/l\")\n", + "print(\"The gravitational potential at the centre of the square =\",u,\"Gm²/l\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4 , page : 193" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum speed of the projectile to reach the surface of the second sphere = ( 0.6 GM/R ) ^(1/2)\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "R=1 # For convenience,radii of both the spheres is assumed to be unity \n", + "M=1 # For convenience,mass is assumed to be unity \n", + "m1=M # Mass of the first sphere\n", + "m2=6*M # Mass of the second sphere\n", + "m=1 # Since the mass of the projectile is unknown,take it as unity\n", + "d=6*R # Distance between the centres of both the spheres\n", + "r=1 # The distance from the centre of first sphere to the neutral point N\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "\n", + "# Calculation\n", + "\n", + "# Since N is the neutral point; GMm/r² = 4GMm/(6R-r)² and we get\n", + "r=2*R\n", + "# The mechanical energy at the surface of M is; Et = m(v^2)/2 - GMm/R - 4GMm/5R\n", + "# The mechanical energy at N is; En = -GMm/2R - 4GMm/4R\n", + "# From the principle of conservation of mechanical energy; Et = En and we get\n", + "v_sqr=2*((4/5)-(1/2))\n", + "\n", + "# Result\n", + "\n", + "print(\"Minimum speed of the projectile to reach the surface of the second sphere =\",\"(\",round(v_sqr,5),\"GM/R\",\")\",\"^(1/2)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5 , page : 195" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Mass of Mars = 6.475139697520706e+23 kg\n", + "(ii) Period of revolution of Mars = 684.0033777694376 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "π=3.14 # Constant pi\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "R=9.4*pow(10,3) # Orbital radius of Mars in km\n", + "T=459*60\n", + "Te=365 # Period of revolution of Earth\n", + "r=1.52 # Ratio of Rms/Res, where Rms is the mars-sun distance and Res is the earth-sun distance. \n", + "\n", + "# Calculation\n", + "\n", + "# (i) \n", + "R=R*pow(10,3)\n", + "# Using Kepler's 3rd law:T²=4π²(R^3)/GMm\n", + "Mm=(4*pow(π,2)*pow(R,3))/(G*pow(T,2))\n", + "\n", + "# (ii)\n", + "# Using Kepler's 3rd law: Tm²/Te² = (Rms^3/Res^3)\n", + "Tm=pow(r,(3/2))*365\n", + "\n", + "\n", + "# Result\n", + "\n", + "print(\"(i) Mass of Mars =\",Mm,\"kg\")\n", + "print(\"(ii) Period of revolution of Mars =\",Tm,\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6 , page : 195" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass of the Earth = 5.967906881559221e+24 kg\n", + "Mass of the Earth = 6.017752855396305e+24 kg\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "g=9.81 # Acceleration due to gravity\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "R=3.84*pow(10,8) # Distance of Moon from Earth in m\n", + "T=27.3 # Period of revolution of Moon in days\n", + "π=3.14 # Constant pi\n", + "\n", + "# Calculation\n", + "\n", + "# I Method\n", + "# Using Newton's 2nd law of motion:g = F/m = GMe/Re²\n", + "Me1=(g*pow(Re,2))/G\n", + "\n", + "# II Method\n", + "# Using Kepler's 3rd law: T²= 4π²(R^3)/GMe\n", + "T1=T*24*60*60\n", + "Me2=(4*pow(π,2)*pow(R,3))/(G*pow(T1,2))\n", + "\n", + "#Result\n", + "\n", + "print(\"Mass of the Earth =\",Me1,\"kg\")\n", + "print(\"Mass of the Earth =\",Me2,\"kg\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7 , page : 195 " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Period of revolution of Moon = 27.5 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "k=pow(10,-13) # A constant = 4π² / GME\n", + "Re=3.84*pow(10,5) # Distance of the Moon from the Earth in m\n", + "\n", + "# Calculation\n", + "\n", + "k=pow(10,-13)*(pow(1/(24*60*60),2))*(1/pow((1/1000),3))\n", + "T2=k*pow(Re,3)\n", + "T=math.sqrt(T2) # Period of revolution of Moon in days\n", + "\n", + "# Result\n", + "\n", + "print(\"Period of revolution of Moon =\",round(T,1),\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8 , page : 196 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in Kinetic Energy = 3124485000.0 J\n", + "Change in Potential Energy = 6248970000.0 J\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "m=400 # Mass of satellite in kg\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "g=9.81 # Acceleration due to gravity\n", + "\n", + "# Calculation\n", + "\n", + "# Change in energy is E=Ef-Ei\n", + "ΔE=(g*m*Re)/8 # Change in Total energy\n", + "# Since Potential Energy is twice as the change in Total Energy (V = Vf - Vi)\n", + "ΔV=2*ΔE # Change in Potential Energy in J\n", + "\n", + "# Result\n", + "\n", + "print(\"Change in Kinetic Energy =\",round(ΔE,4),\"J\")\n", + "print(\"Change in Potential Energy =\",round(ΔV,4),\"J\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb new file mode 100644 index 00000000..c08a4250 --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb @@ -0,0 +1,390 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2 , page : 187" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) The force acting = [0.0, 2.5849394142282115e-26, 0.0] ≈ 0\n", + "(b) The force acting = 2 Gm²\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "x=30 # The angle between GC and the positive x-axis is 30° and so is the angle between GB and the negative x-axis\n", + "y=math.radians(x) # The angle in radians\n", + "a=math.cos(y)\n", + "b=math.sin(y)\n", + "v1=(0,1,0)\n", + "v2=(-a,-b,0)\n", + "v3=(a,-b,0)\n", + "c=(2*G*pow(m,2))/1 # 2Gm²/1\n", + "\n", + "# Calculation\n", + "\n", + "#(a)\n", + "F1=[y * c for y in v1] # F(GA)\n", + "F2=[y * c for y in v2] # F(GB)\n", + "F3=[y * c for y in v3] # F(GC)\n", + "# From the principle of superposition and the law of vector addition, the resultant gravitational force FR on (2m) is given by\n", + "Fa=[sum(x) for x in zip(F1,F2,F3)]\n", + "\n", + "#(b)\n", + "# By symmetry the x-component of the force cancels out and the y-component survives\n", + "Fb=4-2 # 4Gm² j - 2Gm² j\n", + "\n", + "# Result\n", + "\n", + "print(\"(a) The force acting =\",Fa,\"≈ 0\")\n", + "print(\"(b) The force acting =\",Fb,\"Gm²\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3 , page : 192" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Potential energy of a system of four particles = -5.414213562373095 Gm²/l\n", + "The gravitational potential at the centre of the square = -5.65685424949238 Gm²/l\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "m=1 # For convenience,mass is assumed to be unity \n", + "l=1 # For convenience,side of the square is assumed to be unity \n", + "c=(G*pow(m,2))/l\n", + "n=4 # Number of particles\n", + "\n", + "# Calculation\n", + "\n", + "d=math.sqrt(2)\n", + "# If the side of a square is l then the diagonal distance is √2l\n", + "# We have four mass pairs at distance l and two diagonal pairs at distance √2l \n", + "# Since the Potential Energy of a system of four particles is -4Gm²/l) - 2Gm²/dl\n", + "w=(-n-(2/d)) \n", + "# If the side of a square is l then the diagonal distance from the centre to corner is \n", + "# Since the Gravitational Potential at the centre of the square\n", + "u=-n*(2/d)\n", + "\n", + "# Result\n", + "\n", + "print (\"Potential energy of a system of four particles =\",w,\"Gm²/l\")\n", + "print(\"The gravitational potential at the centre of the square =\",u,\"Gm²/l\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4 , page : 193" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minimum speed of the projectile to reach the surface of the second sphere = ( 0.6 GM/R ) ^(1/2)\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "R=1 # For convenience,radii of both the spheres is assumed to be unity \n", + "M=1 # For convenience,mass is assumed to be unity \n", + "m1=M # Mass of the first sphere\n", + "m2=6*M # Mass of the second sphere\n", + "m=1 # Since the mass of the projectile is unknown,take it as unity\n", + "d=6*R # Distance between the centres of both the spheres\n", + "r=1 # The distance from the centre of first sphere to the neutral point N\n", + "\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "\n", + "# Calculation\n", + "\n", + "# Since N is the neutral point; GMm/r² = 4GMm/(6R-r)² and we get\n", + "r=2*R\n", + "# The mechanical energy at the surface of M is; Et = m(v^2)/2 - GMm/R - 4GMm/5R\n", + "# The mechanical energy at N is; En = -GMm/2R - 4GMm/4R\n", + "# From the principle of conservation of mechanical energy; Et = En and we get\n", + "v_sqr=2*((4/5)-(1/2))\n", + "\n", + "# Result\n", + "\n", + "print(\"Minimum speed of the projectile to reach the surface of the second sphere =\",\"(\",round(v_sqr,5),\"GM/R\",\")\",\"^(1/2)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5 , page : 195" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Mass of Mars = 6.475139697520706e+23 kg\n", + "(ii) Period of revolution of Mars = 684.0033777694376 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "π=3.14 # Constant pi\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "R=9.4*pow(10,3) # Orbital radius of Mars in km\n", + "T=459*60\n", + "Te=365 # Period of revolution of Earth\n", + "r=1.52 # Ratio of Rms/Res, where Rms is the mars-sun distance and Res is the earth-sun distance. \n", + "\n", + "# Calculation\n", + "\n", + "# (i) \n", + "R=R*pow(10,3)\n", + "# Using Kepler's 3rd law:T²=4π²(R^3)/GMm\n", + "Mm=(4*pow(π,2)*pow(R,3))/(G*pow(T,2))\n", + "\n", + "# (ii)\n", + "# Using Kepler's 3rd law: Tm²/Te² = (Rms^3/Res^3)\n", + "Tm=pow(r,(3/2))*365\n", + "\n", + "\n", + "# Result\n", + "\n", + "print(\"(i) Mass of Mars =\",Mm,\"kg\")\n", + "print(\"(ii) Period of revolution of Mars =\",Tm,\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6 , page : 195" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mass of the Earth = 5.967906881559221e+24 kg\n", + "Mass of the Earth = 6.017752855396305e+24 kg\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "g=9.81 # Acceleration due to gravity\n", + "G=6.67*pow(10,-11) # Gravitational constant\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "R=3.84*pow(10,8) # Distance of Moon from Earth in m\n", + "T=27.3 # Period of revolution of Moon in days\n", + "π=3.14 # Constant pi\n", + "\n", + "# Calculation\n", + "\n", + "# I Method\n", + "# Using Newton's 2nd law of motion:g = F/m = GMe/Re²\n", + "Me1=(g*pow(Re,2))/G\n", + "\n", + "# II Method\n", + "# Using Kepler's 3rd law: T²= 4π²(R^3)/GMe\n", + "T1=T*24*60*60\n", + "Me2=(4*pow(π,2)*pow(R,3))/(G*pow(T1,2))\n", + "\n", + "#Result\n", + "\n", + "print(\"Mass of the Earth =\",Me1,\"kg\")\n", + "print(\"Mass of the Earth =\",Me2,\"kg\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7 , page : 195 " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Period of revolution of Moon = 27.5 days\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "k=pow(10,-13) # A constant = 4π² / GME\n", + "Re=3.84*pow(10,5) # Distance of the Moon from the Earth in m\n", + "\n", + "# Calculation\n", + "\n", + "k=pow(10,-13)*(pow(1/(24*60*60),2))*(1/pow((1/1000),3))\n", + "T2=k*pow(Re,3)\n", + "T=math.sqrt(T2) # Period of revolution of Moon in days\n", + "\n", + "# Result\n", + "\n", + "print(\"Period of revolution of Moon =\",round(T,1),\"days\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8 , page : 196 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in Kinetic Energy = 3124485000.0 J\n", + "Change in Potential Energy = 6248970000.0 J\n" + ] + } + ], + "source": [ + "# Importing module\n", + "\n", + "import math\n", + "\n", + "# Variable declaration\n", + "\n", + "m=400 # Mass of satellite in kg\n", + "Re=6.37*pow(10,6) # Radius of Earth in m\n", + "g=9.81 # Acceleration due to gravity\n", + "\n", + "# Calculation\n", + "\n", + "# Change in energy is E=Ef-Ei\n", + "ΔE=(g*m*Re)/8 # Change in Total energy\n", + "# Since Potential Energy is twice as the change in Total Energy (V = Vf - Vi)\n", + "ΔV=2*ΔE # Change in Potential Energy in J\n", + "\n", + "# Result\n", + "\n", + "print(\"Change in Kinetic Energy =\",round(ΔE,4),\"J\")\n", + "print(\"Change in Potential Energy =\",round(ΔV,4),\"J\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/AjayKumar Verma/chapter4.ipynb b/sample_notebooks/AjayKumar Verma/chapter4.ipynb new file mode 100644 index 00000000..408746a4 --- /dev/null +++ b/sample_notebooks/AjayKumar Verma/chapter4.ipynb @@ -0,0 +1,413 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c80be9ee73d5adb979ad6bf2343ea3cff1243505e35fc82560bd445f960931b7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Signal Degradation in fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3.1, page 4-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi, log10\n", + "L=10 #fiber length in km\n", + "Pin=150*10**-6 #input power\n", + "Pout=5*10**-6 #output power\n", + "ln=20 #length of optical link\n", + "interval=1 #splices after interval of 1 km\n", + "l=1.2 #loss due to 1 splice\n", + "attenuation=10*log10(Pin/Pout) \n", + "alpha=attenuation/L \n", + "attenuation_loss=alpha*20 \n", + "splices_loss=(ln-interval)*l \n", + "total_loss=attenuation_loss+splices_loss \n", + "power_ratio=10**(total_loss/10) \n", + "print \"Signal attenuation is %.2f dBs.\\nSignal attenuation is %.3f dB/Km.\\nTotal loss in 20 Km fiber is %.2f dbs.\\nTotal attenuation is %.2f dBs.\\ninput/output ratio is %0.e.\" %(attenuation,alpha,attenuation_loss,total_loss,power_ratio) \n", + "# Answer wrong for last part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal attenuation is 14.77 dBs.\n", + "Signal attenuation is 1.477 dB/Km.\n", + "Total loss in 20 Km fiber is 29.54 dbs.\n", + "Total attenuation is 52.34 dBs.\n", + "input/output ratio is 2e+05.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp\n", + "beta_c=8*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.286 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1500 #temperature\n", + "L=1000 #length\n", + "lamda=1000*10**-9 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "print \"Attenuation due to Rayleigh scattering is %.3f.\" %(attenuation) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation due to Rayleigh scattering is 0.794.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "beta_c=7*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.29 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1400 #temperature\n", + "L=1000 #length\n", + "lamda=0.7*10**-6 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "gamma_r=gamma_r\n", + "print \"Raleigh Scattering corfficient is %.3e per meter\" %(gamma_r) \n", + "#Attenuation is not calcualted in textbook\"\n", + "print \"Attenuation due to Rayleigh scattering is %.3f\" %(attenuation) \n", + "#answer for Raleigh Scattering corfficient in the book is given as 0.804d-3, deviation of 0.003d-3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Raleigh Scattering corfficient is 8.074e-04 per meter\n", + "Attenuation due to Rayleigh scattering is 0.446\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.1, page 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "d=5 #core diameter\n", + "alpha=0.4 #attenuation\n", + "B=0.5 #Bandwidth\n", + "lamda=1.4 #wavelength\n", + "PB=4.4*10**-3*d**2*lamda**2*alpha*B #computing threshold power for SBS\n", + "PR=5.9*10**-2*d**2*lamda*alpha #computing threshold power for SRS\n", + "PB=PB*10**3 \n", + "PR=PR*10**3 \n", + "print \"Threshold power for SBS is %.1f mW.\\nThreshold power for SRS is %.3f mW.\" %(PB,PR) \n", + "#NOTE - Calculation error in the book while calculating threshold for SBS.\n", + "#Also, while calculating SRS, formula is taken incorrectly, \n", + "#Bandwidth is multiplied in second step, which is not in the formula.\") " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold power for SBS is 43.1 mW.\n", + "Threshold power for SRS is 826.000 mW.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.1, page 4-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.5 #refractive index of core\n", + "delta=0.03/100 #relative refractive index\n", + "lamda=0.82*10**-6 #wavelength\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**1.5) #computing critical radius\n", + "Rc=Rc*10**3 \n", + "print \"Critical radius is %.f micrometer.\" %(Rc) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 9 micrometer.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.2, page 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.45 #refractive index of core\n", + "delta=3.0/100 #relative refractive index\n", + "lamda=1.5*10**-6 #wavelength\n", + "a=5*10**-6 #core radius\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**0.5) #computing critical radius for single mode\n", + "Rc=Rc*10**6 \n", + "print \"Critical radius is %.2f micrometer\" %(Rc) \n", + "lamda_cut_off= 2*3.14*a*n1*sqrt(2*delta)/2.405 \n", + "RcSM= (20*lamda/(n1-n2)**1.5)*(2.748-0.996*lamda/lamda_cut_off)**-3 #computing critical radius for single mode\n", + "RcSM=RcSM*10**6 \n", + "print \"Critical radius for single mode fiber is %.2f micrometer.\" %(RcSM) \n", + "#Calculation error in the book.(2.748-0.996*lamda/lamda_cut_off)**-3 in this term raised to -3 is not taken in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 2.12 micrometer\n", + "Critical radius for single mode fiber is 226.37 micrometer.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13.1, page 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1550*10**-9 \n", + "lamda0=1.3*10**-6 \n", + "s0=0.095 \n", + "Dt=lamda*s0/4*(1-(lamda0/lamda)**4) #computing material dispersion\n", + "Dt=Dt*10**9 \n", + "print \"Material dispersion at 1550 nm is %.1f ps/nm/km\" %Dt\n", + "#answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion at 1550 nm is 18.6 ps/nm/km\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.1, page 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tau=0.1*10**-6 #pulse broadning\n", + "dist=20*10**3 #distance\n", + "Bopt=1/(2*tau) #computing optical bandwidth\n", + "Bopt=Bopt*10**-6 \n", + "dispertion=tau/dist #computing dispersion\n", + "dispertion=dispertion*10**12 \n", + "BLP=Bopt*dist #computing Bandwidth length product\n", + "BLP=BLP*10**-3 \n", + "print \"optical bandwidth is %d MHz.\\nDispersion per unit length is %d ns/km.\\nBandwidth length product is %d MHz.km.\" %(Bopt,dispertion,BLP) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "optical bandwidth is 5 MHz.\n", + "Dispersion per unit length is 5 ns/km.\n", + "Bandwidth length product is 100 MHz.km.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1, page 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "RSW=0.0012 #relative spectral width\n", + "lamda=0.90*10**-6 #wavelength\n", + "L=1 #distance in km (assumed)\n", + "P=0.025 #material dispersion parameter\n", + "c=3*10**5 #speed of light in km/s\n", + "M=10**3*P/(c*lamda) #computing material dispersion\n", + "sigma_lamda=RSW*lamda \n", + "sigmaM=sigma_lamda*L*M*10**7 #computing RMS pulse broadning\n", + "sigmaB=25*L*M*10**-3 \n", + "print \"Material dispersion parameter is %.2f ps/nm/km.\\nRMS pulsr broadning when sigma_lamda is 25 is %.1f ns/km.\\nRMS pulse broadning is %.2f ns/km.\" %(M,sigmaB,sigmaM) \n", + "#answer in the book for RMS pulse broadning is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion parameter is 92.59 ps/nm/km.\n", + "RMS pulsr broadning when sigma_lamda is 25 is 2.3 ns/km.\n", + "RMS pulse broadning is 1.00 ns/km.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17.1, page 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L=10 #length of optical link\n", + "n1=1.49 #refractive index\n", + "c=3*10**8 #speed of light\n", + "delta=1.0/100 #relative refractive index\n", + "delTS=L*n1*delta/c #computing delay difference\n", + "delTS=delTS*10**12 \n", + "sigmaS=L*n1*delta/(2*sqrt(3)*c) #computing rms pulse broadning\n", + "sigmaS=sigmaS*10**12 \n", + "B=1/(2*delTS) #computing maximum bit rate\n", + "B=B*10**3 \n", + "B_acc=0.2/(sigmaS) #computing accurate bit rate\n", + "B_acc=B_acc*10**3 \n", + "BLP=B_acc*L #computing Bandwidth length product\n", + "print \"Delay difference is %d ns.\\nRMS pulse broadning is %.1f ns.\\nBit rate is %.1f Mbit/s.\\nAccurate bit rate is %.3f Mbits/s.\\nBandwidth length product is %.1f MHz.km\" %(delTS,sigmaS,B,B_acc,BLP) \n", + "#answer for maximum bit rate is given as 1.008 Mb/s, deviation of 0.008 Mb/s." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delay difference is 496 ns.\n", + "RMS pulse broadning is 143.4 ns.\n", + "Bit rate is 1.0 Mbit/s.\n", + "Accurate bit rate is 1.395 Mbits/s.\n", + "Bandwidth length product is 13.9 MHz.km\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb new file mode 100755 index 00000000..51134ef9 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb @@ -0,0 +1,231 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:ef32575f9668e7c75384fec9d19e3d17f6260e600de2d26c9157520e2a39253b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : MOLE BALANCES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "k = 0.23; #min**-1\n", + "v0 = 10;#dm**3/min\n", + "#CA = 0.1*CA0;\n", + "V = (v0/k)*math.log(1/0.1);\n", + "print \"V =\",round(V,4),\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 100.1124 dm**3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb new file mode 100755 index 00000000..a2bda001 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb @@ -0,0 +1,231 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:37859c50b0a22beb7e2005b729edef7d0375ee40d0e34f554e83e84af89eab44" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : MOLE BALANCES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.3 : PAGE NUMBER 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "k = 0.23; #min**-1\n", + "v0 = 10;#dm**3/min\n", + "#CA = 0.1*CA0;\n", + "V = (v0/k)*math.log(1/0.1);\n", + "print \"V =\",round(V,4),\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 100.1124 dm**3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1 : PAGE NUMBER 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2 : PAGE NUMBER 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3 : PAGE NUMBER 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4 : PAGE NUMBER 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb new file mode 100755 index 00000000..2b950ef8 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb @@ -0,0 +1,191 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:6aa7321c51ecc68ee01a5bb4aa554a936a01c87ebd6725c56b8e0edb6adbcf78" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1 : PAGE NUMBER 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2 : PAGE NUMBER 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3 : PAGE NUMBER 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4 : PAGE NUMBER 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AkshayPatil/Chapter01.ipynb b/sample_notebooks/AkshayPatil/Chapter01.ipynb new file mode 100755 index 00000000..8594491e --- /dev/null +++ b/sample_notebooks/AkshayPatil/Chapter01.ipynb @@ -0,0 +1,226 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:055c326b63bc3f150b8a5e433c724771cc1733887ec2b1e223ccf712fcd80848" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 01:Stress" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.1, Page No:9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#NOTE:The notation has been changed to simplify the coding process\n", + "\n", + "#Variable Decleration\n", + "P_AB=4000 #Axial Force at section 1 in lb\n", + "P_BC=5000 #Axial Force at section 2 in lb\n", + "P_CD=7000 #Axial Force at section 3 in lb\n", + "A_1=1.2 #Area at section 1 in in^2\n", + "A_2=1.8 #Area at section 2 in in^2\n", + "A_3=1.6 #Area at section 3 in in^2\n", + "\n", + "#Calculation\n", + "#S indicates sigma here\n", + "S_AB=P_AB/A_1 #Stress at section 1 in psi (T)\n", + "S_BC=P_BC/A_2 #Stress at section 2 in psi (C)\n", + "S_CD=P_CD/A_3 #Stress at section 3 in psi (C)\n", + "\n", + "#Result\n", + "print \"The stress at the three sections is given as\"\n", + "print \"Stress at section 1=\",round(S_AB),\"section 2=\",round(S_BC),\"section 3=\",S_CD\n", + "\n", + "#NOTE:The answer for the following example for section 1 and section 2\n", + "#are incorrect due to rounding in the textbook\n", + "#Computed values are correct" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The stress at the three sections is given as\n", + "Stress at section 1= 3333.0 section 2= 2778.0 section 3= 4375.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.2, Page No:10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "Ay=40 #Vertical Reaction at A in kN\n", + "Hy=60 #Vertical Reaction at H in kN\n", + "Hx=0 #Horizontal Reaction at H in kN\n", + "y=3 #Height in m\n", + "x=5 #Distance in m\n", + "p=4 #Panel distance in m\n", + "A=900 #Area of the member in mm^2\n", + "P_C=30 #Force at point C in kN\n", + "\n", + "#Calculation\n", + "#Part 1\n", + "#Applying summation of forces in the x and y direction and equating to zero\n", + "P_AB=(-Ay)*(x*y**-1) #Force in member AB in kN\n", + "P_AC=-(p*x**-1*P_AB) #Force in member AC in kN\n", + "#Using stress=force/area\n", + "S_AC=(P_AC/A)*10**3 #Stress in member AC in MPa (T)\n", + "\n", + "#Part 2\n", + "#Sum of moments about point E to zero\n", + "P_BD=(Ay*p*2-(P_C*p))*y**-1 #Force in memeber AB in kN (C)\n", + "S_BD=(P_BD/A)*10**3 #Stress in member in MPa (C)\n", + "\n", + "#Result\n", + "print \"The Stress in member AC is\",round(S_AC,1),\"MPa (T)\"\n", + "print \"The Stress in member BD is\",round(S_BD,1),\"MPa (C)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Stress in member AC is 59.3 MPa (T)\n", + "The Stress in member BD is 74.1 MPa (C)\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.3, Page No:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as num\n", + "\n", + "#Variable Decleration\n", + "A_AB=800 #Area of member AB in m^2\n", + "A_AC=400 #Area of member AC in m^2\n", + "W_AB=110 #Safe value of stress in Pa for AB\n", + "W_AC=120 #Safe value of stress in Pa for AC\n", + "theta1=60*3.14*180**-1 #Angle in radians\n", + "theta2=40*3.14*180**-1 #Angle in radians \n", + "\n", + "#Calculations\n", + "#Applying sum of forces \n", + "#Solving by matrix method putting W as 1\n", + "A=num.array([[-cos(theta1),cos(theta2)],[sin(theta1),sin(theta2)]])\n", + "B=num.array([[1],[1]])\n", + "C=inv(A)\n", + "D=C*B\n", + "\n", + "#Using newtons third law\n", + "#Two values of W hence the change in the notation\n", + "W1=(W_AB*A_AB)*(D[1,1])**-1 #Weight W in N\n", + "W2=(W_AC*A_AC)*(D[0,1])**-1 #Weight W in N\n", + "\n", + "#Result\n", + "print \"The maximum value of W allowable is\",round(W2*1000**-1,1),\"kN\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of W allowable is 61.7 kN\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.4, Page No:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "d=3*4**-1 #Rivet diameter in inches\n", + "t=7*8**-1 #Thickness of the plate in inches\n", + "tau=14000 #Shear stress limit in psi\n", + "sigma_b=18000 #Normal stress limit in psi\n", + "\n", + "#Calculations\n", + "#Design Shear Stress in Rivets\n", + "V=tau*(d**2*(pi/4))*4 #Shear force maximum allowable in lb\n", + "#Design for bearing stress in plate\n", + "Pb=sigma_b*t*d*4 #lb\n", + "\n", + "#Result\n", + "print \"The maximum load that the joint can carry is\",round(V),\"lb\"\n", + "\n", + "#NOTE:The answer in the textbook is off by 40lb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum load that the joint can carry is 24740.0 lb\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AmitRasmiya/ch5.ipynb b/sample_notebooks/AmitRasmiya/ch5.ipynb new file mode 100644 index 00000000..3176c0e5 --- /dev/null +++ b/sample_notebooks/AmitRasmiya/ch5.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9430cdf3ccbe0455a5081c4e47c887588ff78214ec8703c5bcd6324cca5d35d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Single Phase Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "kVA = 250.;\t\t\t\t#kVA\n", + "V1 = 11000.;\t\t\t\t#V(Primary voltage)\n", + "V2 = 400.;\t\t\t\t#V(secondary voltage)\n", + "f = 50.;\t\t\t\t#Hz\n", + "N2 = 80.;\t\t\t\t#no. of turns in secondary\n", + "\n", + "# Calculations and Results\n", + "Ifl1 = kVA*1000/V1;\t\t\t\t#A(Full load primay current)\n", + "Ifl2 = kVA*1000/V2;\t\t\t\t#A(Full load secondary current)\n", + "print (\"Part(a)\");\n", + "print \"Full load primary current(A) %.2f\"%Ifl1\n", + "print \"Full load secondary current(A) : %.2f\"%Ifl2\n", + "\n", + "print (\"Part(b)\");\n", + "N1 = N2*V1/V2;\t\t\t\t#no. of turns in secondary\n", + "print \"No. of turns in primary : %.2f\"%N1\n", + "print (\"Part(c)\");\n", + "fi_m = V2/(4.44*N2*f);\t\t\t\t#Wb\n", + "print \"Maximum value of flux(mWb) : %2.f\"%(fi_m*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Full load primary current(A) 22.73\n", + "Full load secondary current(A) : 625.00\n", + "Part(b)\n", + "No. of turns in primary : 2200.00\n", + "Part(c)\n", + "Maximum value of flux(mWb) : 23\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N1 = 480;\t\t\t\t#no. of turns in primary\n", + "N2 = 90;\t\t\t\t#no. of turns in secondary\n", + "lfp = 1.8;\t\t\t\t#m(length of flux path)\n", + "ag = 0.1;\t\t\t\t#mm(airgap)\n", + "Flux = 1.1;\t\t\t\t#T(flux density)\n", + "MF = 400;\t\t\t\t#A/m(Magnetic flux)\n", + "c_loss = 1.7;\t\t\t\t#W/kg\n", + "f = 50;\t\t\t\t#Hz\n", + "d = 7800;\t\t\t\t#kg/m**3(density of core)\n", + "V = 2200;\t\t\t\t#V(potential difference)\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "fi_m = V/(4.44*N1*f);\t\t\t\t#Wb\n", + "A = fi_m/Flux;\t\t\t\t#m**2(Cross sectional area)\n", + "print \"(a) Cross sectional area(m**2) : %.2f\"%A\n", + "#Part (b)\n", + "Vnl2 = V*N2/N1;\t\t\t\t#V(2ndary voltage on no load)\n", + "print \"(b) 2ndary voltage on no load(V) : %.f\"%Vnl2\n", + "\n", + "#Part (c)\n", + "Fm1 = MF*lfp;\t\t\t\t#A(Magnetootive force for the core)\n", + "Fm2 = Flux/(4*math.pi*10**-7)*ag*10**-3;\t\t\t\t#A(Magnetootive force for airgap)\n", + "Fm = Fm1+Fm2;\t\t\t\t#A(Total magnetomotive force)\n", + "Imax = Fm/N1;\t\t\t\t#A(maximum value of magnetizing current)\n", + "Iom = Imax/math.sqrt(2);\t\t\t\t#A(rms current)\n", + "v = lfp*A;\t\t\t\t#m**3(Volume of core)\n", + "m = v*d;\t\t\t\t#kg(Mass of core)\n", + "coreLoss = c_loss*m;\t\t\t\t#W(Core Loss)\n", + "Io1 = coreLoss/V;\t\t\t\t#A(Core loss component of curent)\n", + "Io = math.sqrt(Iom**2+Io1**2);\t\t\t\t#A(no load current)\n", + "print \"(c) Primary current on no load(A) : %.2f\"%Io\n", + "\n", + "pf = Io1/Io;\t\t\t\t#lagging pf on no load\n", + "print \"(c) Power factor(lagging) on no load : %.2f\"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Cross sectional area(m**2) : 0.02\n", + "(b) 2ndary voltage on no load(V) : 412\n", + "(c) Primary current on no load(A) : 1.21\n", + "(c) Power factor(lagging) on no load : 0.17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N1 = 1000;\t\t\t\t#no. of turns in primary\n", + "N2 = 200;\t\t\t\t#no. of turns in secondary\n", + "I0 = 3;\t\t\t\t#A\n", + "pf0 = 0.2;\t\t\t\t#lagging power factor\n", + "I2 = 280;\t\t\t\t#A(2ndary current)\n", + "pf2 = 0.8;\t\t\t\t#lagging power factor\n", + "\n", + "# Calculations and Results\n", + "I2dash = I2*N2/N1;\t\t\t\t#A\n", + "cosfi0 = pf0;cosfi2 = pf2;sinfi0 = math.sqrt(1-cosfi0**2);sinfi2 = math.sqrt(1-cosfi2**2);\n", + "I1_cosfi1 = I2dash*cosfi2+I0*cosfi0;\t\t\t\t#A\n", + "I1_sinfi1 = I2dash*sinfi2+I0*sinfi0;\t\t\t\t#A\n", + "I1 = math.sqrt(I1_cosfi1**2+I1_sinfi1**2);\t\t\t\t#A\n", + "print \"Primary current(A) : %.1f\"%I1\n", + "\n", + "fi1 = math.degrees(math.atan(I1_sinfi1/I1_cosfi1));\t\t\t\t#degree\n", + "pf1 = math.cos(math.radians(fi1));\t\t\t\t#lagging\n", + "print \"Primary power factor(lagging) : %.2f\"%pf1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current(A) : 58.3\n", + "Primary power factor(lagging) : 0.78\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AmitRaval/ch3.ipynb b/sample_notebooks/AmitRaval/ch3.ipynb new file mode 100755 index 00000000..a3c142e2 --- /dev/null +++ b/sample_notebooks/AmitRaval/ch3.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5106ea5cae253fe059288e745550627fa4df81e4cd0d1b81237c843ab3f804d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Hydrodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "# points\n", + "hob= 34. \t#ft\n", + "hoc= 5. \t#ft\n", + "hoa= 50. \t#ft\n", + "\n", + "hod= 80. \t#ft height\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "# sectional areas\n", + "A= 2.1 \t#in**2\n", + "A1= 4.8 \t#in**2\n", + "A2= 9.6 \t#in**2\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*(hod-hoc))\n", + "Q= v*A/144\n", + "va= v*A/A1\n", + "vb= v*A/A2\n", + "Va= va**2/(2*g)\n", + "Vb= vb**2/(2*g)\n", + "r= hob+hod-hoa-(va**2/(2*g))\n", + "r1=hob+hod-hob-(vb**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q) \n", + "print ' Velocity head at A = %.2f ft-lb/lb'%(Va)\n", + "print ' Velocity head at B = %.2f ft-lb/lb'%(Vb)\n", + "print ' Pressure head at A = %.2f ft-lb/lb'%(r) \n", + "print ' Pressure head at B = %.2f ft-lb/lb'%(r1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 1.01 cuses\n", + " Velocity head at A = 14.36 ft-lb/lb\n", + " Velocity head at B = 3.59 ft-lb/lb\n", + " Pressure head at A = 49.64 ft-lb/lb\n", + " Pressure head at B = 76.41 ft-lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "P= 1.7 \t#lb/in**2 pressure\n", + "d1= 6. \t #in diameters\n", + "d2= 3. \t #in diameters\n", + "hab= 8. \t#ft\n", + "Q= 0.75 \t#cuses\n", + "sm= 13.6 # gravity\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "dP= P*144/w\n", + "va= Q*(d1/d2)**4/math.pi\n", + "k= -(((d1/d2)**4-1)-((-dP+hab)*2*g/va**2))\n", + "h= (-dP+hab)*12/(sm-1)\n", + "\n", + "#RESULTS\n", + "print 'k = %.f '%(k)\n", + "print 'height difference = %.2f in'%(h) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 3 \n", + "height difference = 3.88 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 20. \t #ft pressure head\n", + "Q= 4.81 \t#cuses \n", + "C= 1.\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 10. \t#indiameter\n", + "\n", + "#CALCULATIONS\n", + "d= ((Q*4*144/(d**2*math.pi))**2*100**2/((Q*4*144/(d**2*math.pi))**2+2*g*h))**0.25\n", + "\n", + "#RESULTS\n", + "print 'Smallest Diameter = %.1f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest Diameter = 4.9 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1./3 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 4. \t #in\n", + "d2= 1.6 \t#in diameter\n", + "\n", + "# guage readings\n", + "h1= 5.7 \t#ft\n", + "h2= -1.9 \t#ft\n", + "\n", + "Q= 0.3 \t#cuses\n", + "H1= 34. \t#ft height of water\n", + "H2= 19. \t#ft\n", + "H3= 7. \t #ft\n", + "H4= 9.2 \t#ft\n", + "h3= 2.9 \t#ft\n", + "h4= 3.9 \t#ft\n", + "Et= 54. \t#ft-lb/lb\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(2*g*(h1-h2)/((d1/d2)**4-1))\n", + "Q1= math.pi*v1*d**2/4\n", + "k= Q/Q1\n", + "P= (H1+H2)*H3/H4\n", + "P1= P-h3\n", + "r= P+h1-h2-h4\n", + "V= v1**2/(2*g)\n", + "E= r+V\n", + "dE= Et-E\n", + "\n", + "#RESULTS\n", + "print 'Coefficienct of venturi meter = %.4f '%(k)\n", + "print ' Pressure of venturi throat = %.2f ft of water'%(P1)\n", + "print ' Loss in energy = %.1f ft-lb/lb'%(dE)\n", + "\n", + "# Note : The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficienct of venturi meter = 0.9587 \n", + " Pressure of venturi throat = 37.43 ft of water\n", + " Loss in energy = 9.8 ft-lb/lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AmitSexana/Ch_03.ipynb b/sample_notebooks/AmitSexana/Ch_03.ipynb new file mode 100644 index 00000000..be13231c --- /dev/null +++ b/sample_notebooks/AmitSexana/Ch_03.ipynb @@ -0,0 +1,684 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38fdf1a79a5afe4aa8258051a4233e0da43992d64154d50af084fa49764f5132" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 3 : Junction Diode and Junction Capacitance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.1 : Page No - 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Co= 20 # in pF\n", + "Vr= 5 # in V\n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_T= Co/(1+(Vr/V_T)) # in pF\n", + "print \" The transition capacitance of diode = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The transition capacitance of diode = 0.10 pF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.2 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "toh= 10**-6 # in sec\n", + "I=10 # in mA\n", + "I=I*10**-3 # in A\n", + "n=1 \n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_D= toh*I/(n*V_T) # in F\n", + "print \" The diffusion capacitance in p-n junction diode = %0.f nF\" %(C_D*10**9)\n", + "\n", + "# Note: There are two mistake in the book. First one is this that they put the wrong value of I to evaluating\n", + "# the value of C_D because the value of I is given 10mA (i.e. 10*10**-3= 10**-2 amp) but they put 10**-3 at place \n", + "# of 10**-2 and second one is calculation error. So the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diffusion capacitance in p-n junction diode = 385 nF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.3 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "v= 0.3 # forward bias voltage in volt\n", + "I= 10 # leakage current in micro amp\n", + "I=I*10**-6 # in amp\n", + "id= I*(exp(v/V_T)) # in amp\n", + "print \" The diode current = %0.2f amp\" %id" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diode current = 1.09 amp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.4 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "Vd_1= 0.3 # in V\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "# when Id_1= 1 mA\n", + "Id_1= 1 # in mA\n", + "Id_1=Id_1*10**-3 # in A\n", + "# Formula Id_1= Io*[%e**(Vd/(n*V_T))-1]= Io*[e**(Vd/(n*V_T))]\n", + "# Id_1= Io*[e**(Vd_1/(n*V_T))] (i)\n", + "\n", + "# when Id_2= 200 mA\n", + "Id_2= 200 # in mA\n", + "Id_2=Id_2*10**-3 # in A\n", + "Vd_2= 0.45 # in V\n", + "# Id_2= Io*[e**(Vd_2/(n*V_T))] (ii)\n", + "# Dividing (ii) by (i), we have\n", + "n= (Vd_2-Vd_1)/(log(Id_2/Id_1)*V_T) \n", + "print \" The value of the constant for the diode = %0.2f \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of the constant for the diode = 1.13 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.5 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "n=1 # assuming value\n", + "Jd=10**5 # in A/m**2\n", + "Jo=250 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "#Formula Id= Io*(%e**(Vd/V_T)-1) and after dividing both the sides by area of the junction, we have\n", + "# Jd= Jo*(%e**(Vd/V_T)) # approx by neglecting 1 \n", + "Vd= V_T*log(Jd/Jo) # in volt\n", + "print \" Voltage to be applied across a p-n junction = %0.2f volt\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across a p-n junction = 0.33 volt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.6 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "J=10**4 # in A/m**2\n", + "Jo=200 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "e=1.6*10**-19 # electrone charge\n", + "k= 1.38*10**-23 \n", + "n=1 # assuming value\n", + "#Formula I= Io*(%e**(e*V/(n*k*T))-1) and after dividing both the sides by area of the junction, we have\n", + "# J= Jo*(%e**(e*V/(n*k*T))) # approx by neglecting 1 \n", + "V= n*k*log(J/Jo)/e \n", + "print \" Voltage to be applied across the junction = %0.2e volts\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across the junction = 9.33e-04 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.7 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=2 \n", + "V_T=26 # in mV\n", + "Io= 30 # in mA\n", + "# (i) when\n", + "I_D= 0.1 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (i) When I_D is 0.1 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "# (ii) when\n", + "I_D= 10 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (ii) When I_D is 10 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "\n", + "# Note: There is calculation error in the book so answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) When I_D is 0.1 mA, The junction forward-bias voltage = -297 mV\n", + " (ii) When I_D is 10 mA, The junction forward-bias voltage = -57 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.8 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_by_Io= -0.9 \n", + "V_T=26 # in mV\n", + "V_T=V_T*10**-3 #in V\n", + "n=1 \n", + "# From Diode equation I= Io*[e**(e*V/(n*V_T))-1]\n", + "V= n*V_T*log(1+I_by_Io) # in volt\n", + "print \"The value of voltage = %0.1f mV \" %(V*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of voltage = -59.9 mV \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.9 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "nita= 2 \n", + "T1= 25 # in \u00b0C\n", + "T2= 150 # in \u00b0C\n", + "k= 8.62*10**-5 \n", + "V_T150= k*(T2+273) # in V\n", + "V_T25= k*(T1+273) # in V\n", + "V= 0.4 # in V\n", + "# Io150= Io25*2**(T2-T1) \n", + "Io150byIo25= 2**((T2-T1)/10) \n", + "I150byI25= Io150byIo25 *(exp(V/(nita*V_T150))-1)/(exp(V/(nita*V_T25))-1) \n", + "print \" The value of factor = %0.f\" %I150byI25" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of factor = 578\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.10 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 100 # in mA\n", + "I_F=I_F*10**-3 # in A\n", + "V_F= 0.75 # in V\n", + "R_F= V_F/I_F # in ohm\n", + "print \" Forward resistance = %0.1f ohm \" %R_F\n", + "# At\n", + "V_R= 50 # in V\n", + "I_R= 100 # in nA\n", + "I_R= I_R*10**-9 # in A\n", + "R_R= V_R/I_R # in ohm\n", + "print \" Reverse resistance = %0.f Mohm \" %(R_R*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Forward resistance = 7.5 ohm \n", + " Reverse resistance = 500 Mohm \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.11 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 70 # in mA\n", + "V_F= 26 # in mV\n", + "delta_I_F= 60 # in mA\n", + "delta_I_F=delta_I_F*10**-3 # in A\n", + "delta_V_F= 0.025 # in V\n", + "r_d= delta_V_F/delta_I_F # in ohm\n", + "print \" Dynamic resistance = %0.2f ohm\" %r_d\n", + "# and the stimated value of the dynamic resistance is\n", + "r_d= V_F/I_F # in ohm\n", + "print \" The estimated value of the Dynamic resistance = %0.2f ohm\" %r_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 0.42 ohm\n", + " The estimated value of the Dynamic resistance = 0.37 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.12 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "V_F= 0.52 # in V\n", + "V_R= -0.52 # in V\n", + "nita= 1 \n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "V_T=round(V_T*10**3) # in mV\n", + "\n", + "# (i)\n", + "r_F= nita*V_T*10**-3/(Io*exp(V_F/(nita*V_T*10**-3))) \n", + "print \"(i) : Dynamic resistance in the forward biased condition = %0.2e ohm\" %r_F\n", + "\n", + "# (ii)\n", + "r_r= nita*V_T*10**-3/(Io*exp(V_R/(nita*V_T*10**-3))) \n", + "print \"(ii) : Dynamic resistance in the reverse biased condition = %0.2e ohm\" %r_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Dynamic resistance in the forward biased condition = 5.36e-05 ohm\n", + "(ii) : Dynamic resistance in the reverse biased condition = 1.26e+13 ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.13 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_F= 0.2 # in V\n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "Id= Io*(exp(V_F/V_T)-1)\n", + "I_F=Id \n", + "r_dc= V_F/I_F # in ohm\n", + "print \" Dynamic resistance = %0.1f ohm\" %r_dc\n", + "r_ac= .026/I_F # in ohm\n", + "print \" Static resistance = %0.1f ohm\" %r_ac" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 87.6 ohm\n", + " Static resistance = 11.4 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.14 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Part (i)\n", + "I_D=2 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.5 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(i) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (ii)\n", + "I_D=20 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.8 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(ii) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (iii)\n", + "I_D=-1 # in micro amp\n", + "I_D=I_D*10**-6 # in amp\n", + "V_D= -10 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(iii) : DC resistance levels for the diode = %0.f Mohm\" %(R_DC*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : DC resistance levels for the diode = 250 ohm\n", + "(ii) : DC resistance levels for the diode = 40 ohm\n", + "(iii) : DC resistance levels for the diode = 10 Mohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.15 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T1= 25 # in \u00b0C\n", + "T2= 100 # in \u00b0C\n", + "deltaT= T2-T1 # in \u00b0C\n", + "deltaV_F= -1.8*10**-3 # in mV/\u00b0C\n", + "I_F= 26 # in mA\n", + "V_F1= 0.7 # in V (at T1)\n", + "V_F2= V_F1+(deltaT*deltaV_F) # in V (at T2)\n", + "# At 25\u00b0C\n", + "T= 25+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 25\u00b0C = %0.f \u03a9 \" %rd\n", + "# At 100\u00b0C\n", + "T= 100+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 100\u00b0C = %0.2f \u03a9 \" %rd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Junction dynamic resistance at 25\u00b0C = 1 \u03a9 \n", + " Junction dynamic resistance at 100\u00b0C = 1.25 \u03a9 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.16 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 2 # in mA\n", + "I=I*10**-3 # in A\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "nita= 1 \n", + "r_F= nita*V_T/I # in \u03a9\n", + "print \" The dynamic resistance of a diode = %0.1f \u03a9\" %r_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance of a diode = 12.5 \u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.17 : Page No - 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 30 # in \u00b5A\n", + "I=I*10**-6 # in A\n", + "T=125+273 # in K\n", + "r_F= T/(11600*I*exp(-0.32/T)*11600) # in \u03a9\n", + "print \" The dynamic resistance = %0.3f m\u03a9\" %(r_F*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance = 98.672 m\u03a9\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AnandMandali/ch5.ipynb b/sample_notebooks/AnandMandali/ch5.ipynb new file mode 100644 index 00000000..3176c0e5 --- /dev/null +++ b/sample_notebooks/AnandMandali/ch5.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9430cdf3ccbe0455a5081c4e47c887588ff78214ec8703c5bcd6324cca5d35d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Single Phase Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "kVA = 250.;\t\t\t\t#kVA\n", + "V1 = 11000.;\t\t\t\t#V(Primary voltage)\n", + "V2 = 400.;\t\t\t\t#V(secondary voltage)\n", + "f = 50.;\t\t\t\t#Hz\n", + "N2 = 80.;\t\t\t\t#no. of turns in secondary\n", + "\n", + "# Calculations and Results\n", + "Ifl1 = kVA*1000/V1;\t\t\t\t#A(Full load primay current)\n", + "Ifl2 = kVA*1000/V2;\t\t\t\t#A(Full load secondary current)\n", + "print (\"Part(a)\");\n", + "print \"Full load primary current(A) %.2f\"%Ifl1\n", + "print \"Full load secondary current(A) : %.2f\"%Ifl2\n", + "\n", + "print (\"Part(b)\");\n", + "N1 = N2*V1/V2;\t\t\t\t#no. of turns in secondary\n", + "print \"No. of turns in primary : %.2f\"%N1\n", + "print (\"Part(c)\");\n", + "fi_m = V2/(4.44*N2*f);\t\t\t\t#Wb\n", + "print \"Maximum value of flux(mWb) : %2.f\"%(fi_m*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Full load primary current(A) 22.73\n", + "Full load secondary current(A) : 625.00\n", + "Part(b)\n", + "No. of turns in primary : 2200.00\n", + "Part(c)\n", + "Maximum value of flux(mWb) : 23\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N1 = 480;\t\t\t\t#no. of turns in primary\n", + "N2 = 90;\t\t\t\t#no. of turns in secondary\n", + "lfp = 1.8;\t\t\t\t#m(length of flux path)\n", + "ag = 0.1;\t\t\t\t#mm(airgap)\n", + "Flux = 1.1;\t\t\t\t#T(flux density)\n", + "MF = 400;\t\t\t\t#A/m(Magnetic flux)\n", + "c_loss = 1.7;\t\t\t\t#W/kg\n", + "f = 50;\t\t\t\t#Hz\n", + "d = 7800;\t\t\t\t#kg/m**3(density of core)\n", + "V = 2200;\t\t\t\t#V(potential difference)\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "fi_m = V/(4.44*N1*f);\t\t\t\t#Wb\n", + "A = fi_m/Flux;\t\t\t\t#m**2(Cross sectional area)\n", + "print \"(a) Cross sectional area(m**2) : %.2f\"%A\n", + "#Part (b)\n", + "Vnl2 = V*N2/N1;\t\t\t\t#V(2ndary voltage on no load)\n", + "print \"(b) 2ndary voltage on no load(V) : %.f\"%Vnl2\n", + "\n", + "#Part (c)\n", + "Fm1 = MF*lfp;\t\t\t\t#A(Magnetootive force for the core)\n", + "Fm2 = Flux/(4*math.pi*10**-7)*ag*10**-3;\t\t\t\t#A(Magnetootive force for airgap)\n", + "Fm = Fm1+Fm2;\t\t\t\t#A(Total magnetomotive force)\n", + "Imax = Fm/N1;\t\t\t\t#A(maximum value of magnetizing current)\n", + "Iom = Imax/math.sqrt(2);\t\t\t\t#A(rms current)\n", + "v = lfp*A;\t\t\t\t#m**3(Volume of core)\n", + "m = v*d;\t\t\t\t#kg(Mass of core)\n", + "coreLoss = c_loss*m;\t\t\t\t#W(Core Loss)\n", + "Io1 = coreLoss/V;\t\t\t\t#A(Core loss component of curent)\n", + "Io = math.sqrt(Iom**2+Io1**2);\t\t\t\t#A(no load current)\n", + "print \"(c) Primary current on no load(A) : %.2f\"%Io\n", + "\n", + "pf = Io1/Io;\t\t\t\t#lagging pf on no load\n", + "print \"(c) Power factor(lagging) on no load : %.2f\"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Cross sectional area(m**2) : 0.02\n", + "(b) 2ndary voltage on no load(V) : 412\n", + "(c) Primary current on no load(A) : 1.21\n", + "(c) Power factor(lagging) on no load : 0.17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N1 = 1000;\t\t\t\t#no. of turns in primary\n", + "N2 = 200;\t\t\t\t#no. of turns in secondary\n", + "I0 = 3;\t\t\t\t#A\n", + "pf0 = 0.2;\t\t\t\t#lagging power factor\n", + "I2 = 280;\t\t\t\t#A(2ndary current)\n", + "pf2 = 0.8;\t\t\t\t#lagging power factor\n", + "\n", + "# Calculations and Results\n", + "I2dash = I2*N2/N1;\t\t\t\t#A\n", + "cosfi0 = pf0;cosfi2 = pf2;sinfi0 = math.sqrt(1-cosfi0**2);sinfi2 = math.sqrt(1-cosfi2**2);\n", + "I1_cosfi1 = I2dash*cosfi2+I0*cosfi0;\t\t\t\t#A\n", + "I1_sinfi1 = I2dash*sinfi2+I0*sinfi0;\t\t\t\t#A\n", + "I1 = math.sqrt(I1_cosfi1**2+I1_sinfi1**2);\t\t\t\t#A\n", + "print \"Primary current(A) : %.1f\"%I1\n", + "\n", + "fi1 = math.degrees(math.atan(I1_sinfi1/I1_cosfi1));\t\t\t\t#degree\n", + "pf1 = math.cos(math.radians(fi1));\t\t\t\t#lagging\n", + "print \"Primary power factor(lagging) : %.2f\"%pf1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current(A) : 58.3\n", + "Primary power factor(lagging) : 0.78\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/AnkitBarot/ch15.ipynb b/sample_notebooks/AnkitBarot/ch15.ipynb new file mode 100755 index 00000000..c5a4b2dd --- /dev/null +++ b/sample_notebooks/AnkitBarot/ch15.ipynb @@ -0,0 +1,306 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06bc45481e0c8d1fd696ec9d96ac784607ece32d90669bf112f17cc78a27982d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : IRRIGATION CHANNEL 2 DESIGN PROCEDURE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 pg : 739" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an irrigation channel in alluvial soil by Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#Full supply discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n", + "B = 15.1;\n", + "D = 1.38;\n", + "\t\t\t\t#also from Fig.15.5 we get slope as\n", + "S = 0.19/1000;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15.10 m.\n", + "Depth of channel section = 1.38 m.\n", + "Bed slope = 1.90e-04.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros,linspace,float64\n", + "\n", + "#design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n", + "\t\t\t\t\n", + "#Given\n", + "dl = 157.7; \t\t\t\t#datum level\n", + "fsl = 157.; \t\t\t\t#full supply level of parent channel\n", + "bl = 156.; \t\t\t\t#bed level of parent channel\n", + "kor_r = 4.; \t\t\t\t#kor period of rabi\n", + "kor_k = 2.5; \t\t\t\t#kor period of kharif\n", + "kord_r = 13.4; \t\t\t\t#kor depth of rabi\n", + "kord_k = 19.; \t\t\t\t#kor depth of kharif\n", + "s = 0.5; \t\t\t\t#side slope\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#Kutter n\n", + "qo_r = 8.64*7*kor_r*100/kord_r; \t\t\t\t#outlet discharge for rabi(calculation is wrong in book)\n", + "qo_k = 8.64*7*kor_k*100/kord_k; \t\t\t\t#outlet discharge for kharif(calculation is wrong in book)\n", + "ca = 16000.; \t\t\t\t#culturable commanded area\n", + "Ir = 0.3; \t\t\t\t#intensity of irrigation in rabi\n", + "Ik = 0.125; \t\t\t\t#intensity of irrigation in rabi\n", + "\n", + "# Calculations and Results\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "Ak = ca*Ik; \t\t\t\t#area under kharif\n", + "q_r = Ar/qo_r;\n", + "q_k = Ak/qo_k;\n", + "q_r = round(q_r*100)/100;\n", + "q_k = round(q_k*100)/100;\n", + "print \"discharge neede for rabi crop = %.2f cumecs.\"%(q_r);\n", + "print \"discharge neede for kharif crop = %.2f cumecs.\"%(q_k);\n", + "print \"outlet discharge factor adopted = %i hectares per cumecs.\"%(qo_r);\n", + "\t\t\t\t#at km 5\n", + "ca = 8000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss after 5 km\n", + "q = q_r+l; \t\t\t\t#total discharge\n", + "dq = 1.1*q; \t\t\t\t#desigm discharge\n", + "S = 1./4000; \t\t\t\t#slope\n", + "B = array([5.5, 4.9, 4.55]); \t\t\t\t#Bed width\n", + "D = array([0.73, 0.79, 0.84]); \t\t\t\t#water depth\n", + "Vo = array([0.448, 0.472, 0.488]); \t\t\t\t#critical velocity\n", + "A = zeros(3)\n", + "V = zeros(3)\n", + "m = zeros(3)\n", + "print \"Bed width water depth area velocity critical velocity C.V.R\";\n", + "for i in range(3):\n", + " A[i] = B[i]*D[i]+D[i]**2/2;\n", + " V[i] = dq/A[i];\n", + " m[i] = V[i]/Vo[i];\n", + " A[i] = round(A[i]*100)/100;\n", + " V[i] = round(V[i]*1000)/1000;\n", + " m[i] = round(m[i]*100)/100;\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(B[i],D[i],A[i],V[i],Vo[i],m[i]);\n", + "\n", + "B = 4.55;\n", + "D = 0.84;\n", + "print \"hence take B = %.2f .; D = %.2f m.\"%(B,D);\n", + "\t\t\t\t#at km 4\n", + "q = round(q*100)/100;\n", + "print \"discharge at 5 km = %.2f cumecs.\"%(q);\n", + "ca = 10000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss below 5 km\n", + "P = B+D*5**0.5; \t\t\t\t#wetted perimeter\n", + "l1 = P*1000*2/1000000; \t\t\t\t#loss between 5 km and 4km\n", + "l2 = l1+l;\n", + "q = q_r+l2;\n", + "dq = 1.1*q;\n", + "q = round(q*1000)/1000;\n", + "print \"discharge at 4 km = %.2f cumecs\"%(q);\n", + "print \"other discharge are calculated and are tabulated as:\";\n", + "x = linspace(1,5,6)\n", + "A1 = array([4800, 4200, 3600, 3300, 3000, 2400],dtype=float64);\n", + "A2 = array([2000, 1750, 1500, 1375, 1250, 1000],dtype=float64);\n", + "S = array([22.5, 22.5, 22.5, 24, 24, 25]);\n", + "B = array([5.5, 5.2, 4.85, 4.7, 4.55, 4.55]);\n", + "D = array([1.04, 1.007, 0.975, 0.945, 0.915, 0.840]);\n", + "dq = array([3.56, 3.17, 2.8, 2.6, 2.4, 2.02]);\n", + "V = array([0.570, 0.555, 0.538, 0.530, 0.521, 0.484]);\n", + "m = array([1.015, 1, 1, 1, 1, 0.992]);\n", + "print \"Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\";\n", + "for i in range(6):\n", + " print \"%8i %i %i %.2f %.2f %.2f\\\n", + " %.2f %.2f %.2f\"%(x[i],A1[i],A2[i],S[i],B[i],D[i],dq[i],V[i],m[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge neede for rabi crop = 2.66 cumecs.\n", + "discharge neede for kharif crop = 2.51 cumecs.\n", + "outlet discharge factor adopted = 1805 hectares per cumecs.\n", + "Bed width water depth area velocity critical velocity C.V.R\n", + "5.50 0.73 4.28 0.47 0.45 1.05\n", + "4.90 0.79 4.18 0.48 0.47 1.02\n", + "4.55 0.84 4.17 0.48 0.49 0.99\n", + "hence take B = 4.55 .; D = 0.84 m.\n", + "discharge at 5 km = 1.83 cumecs.\n", + "discharge at 4 km = 2.17 cumecs\n", + "other discharge are calculated and are tabulated as:\n", + "Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\n", + " 1 4800 2000 22.50 5.50 1.04 3.56 0.57 1.01\n", + " 1 4200 1750 22.50 5.20 1.01 3.17 0.56 1.00\n", + " 2 3600 1500 22.50 4.85 0.97 2.80 0.54 1.00\n", + " 3 3300 1375 24.00 4.70 0.94 2.60 0.53 1.00\n", + " 4 3000 1250 24.00 4.55 0.92 2.40 0.52 1.00\n", + " 5 2400 1000 25.00 4.55 0.84 2.02 0.48 0.99\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 pg : 744" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "t = 2.; \t\t\t\t#top width of banks\n", + "h = 2.92; \t\t\t\t#heigth of banks from bed\n", + "n = 1.5;\n", + "\n", + "#sectional area of digging = sectional area of two banks\n", + "#By+zy**2 = 2(h-y)+2n(h-y)**2\n", + "#substituting the values and on simplificatio we get\n", + "s = [1,-13.26,18.59]\n", + "y = roots(s)[1];\n", + "#from this we get y = 11.666556 and 1.5934436.\n", + "#taking y = 1.5934436;\n", + "y = round(y*10)/10;\n", + "\n", + "# Results\n", + "print \"economical depth of cutting = %.2f m.\"%(y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "economical depth of cutting = 1.60 m.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/BhavinPatel/ch6.ipynb b/sample_notebooks/BhavinPatel/ch6.ipynb new file mode 100755 index 00000000..1c733ac1 --- /dev/null +++ b/sample_notebooks/BhavinPatel/ch6.ipynb @@ -0,0 +1,163 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:098e6f8caaa45e66f3c3c4de6e35624c980f673866a521599c34dc5ef9f6350c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Elements of Hydrology" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 6-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "H = 1360\t#ft\n", + "t = 60\t#f\n", + "a = (10**3)*5.5*(10**-3)\t#f\n", + "q = (1.36*10**3)*5.5*(10**-3)\t#f\n", + "s = (4-1.36)*(10**3)*(3.2*10**-3)\t#f\n", + "\t\n", + "#CALCULATIONS\n", + "T = t-q-s\t#F\n", + "T1 = T+3*a\t#F\n", + "\t\n", + "#RESULTS\n", + "print 'the temperature at the mountain top = %.0f F'%(T)\n", + "print 'the temperature on the plain beyond the mountain = %.1f F'%(T1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temperature at the mountain top = 44 F\n", + "the temperature on the plain beyond the mountain = 60.6 F\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 6-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "t = 60\t#f\n", + "v = 0.52\t#in\n", + "t1 = 80\t#F\n", + "p = 40\t#percent\n", + "v1 = 1.03*0.40\t#in\n", + "w = 8\t#mph\n", + "pa = 29.0\t#in\n", + "p1 = 0.497\t#ft\n", + "q = 1.32*10**-2\t#ft\n", + "r = 0.268\t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "E = p1*(1-q*pa)*(1+r*w)*(v-.41)\t#in\n", + "\t\n", + "#RESULTS\n", + "print 'the evaporation for the a day during = %.2e in'%(E)\n", + "\n", + "# note : answer is slightly different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the evaporation for the a day during = 1.06e-01 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 6-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "t = 47\t#f\n", + "q = 8000\t#ft\n", + "a = 100\t#ft\n", + "d = 0.10\t#in\n", + "d1 = 7\t#degree days\n", + "s1 = 14000\t#ft\n", + "s2 = 7000\t#ft\n", + "s = 1000\t#ft\n", + "g = 32\t#ft\n", + "h = 17.37\t#ft\n", + "h1 = 1.547\t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "T = q+s*(t-g)/3\t#ft\n", + "T1 = t-3*1\t#F\n", + "T2 = (T1+g)/2\t#F\n", + "T3 = d1*d*a\t#sq mile in\n", + "M = h*T3\t#mgd\n", + "M1 = M*h1\t#cfs\n", + "\t\n", + "#RESULTS\n", + "print 'the upper boundary of the melting zone and temperature at the snow line = %.0f F'%(T1)\n", + "print 'The average temperature of = %d cfs'%(M1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the upper boundary of the melting zone and temperature at the snow line = 44 F\n", + "The average temperature of = 1880 cfs\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb new file mode 100644 index 00000000..7297aefc --- /dev/null +++ b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb @@ -0,0 +1,679 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:90aab70b55d4896f0f22aa66f516161405cb3435a2adc68d32d5e3787e2d9de5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2:Diode Applications\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#(a)\n", + "#initialisation of variables\n", + "\n", + "E=10 #E in V\n", + "R=1 #R in Kohm\n", + "\n", + "\n", + "#Calculations\n", + " \n", + "Id=E/R #Eq.(2.2)\n", + "Vd=E\n", + "print \"(a) \\nThe current Ic is = %fmA \"%(Id),\";Vd=0V\"\n", + "print \"The diode voltage is = %fV\"%(Vd),\";Id=0A\"\n", + "print \"\\nThe resulting load line appears in Fig. 2.4. The intersection between the load line \\nand the characteristic curve defines the Q-point as\"\n", + "print \"\\nThe level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. \\nA higher degree of accuracy would require a plot that would be much large and perhaps unwieldy\"\n", + "\n", + "\n", + "#(B)\n", + "print \"\\n(B)\\n\"\n", + "Ir=9.25 #Ir in mA\n", + "Vdq=0.78 #Vdq in v\n", + "Vr=Ir*R\n", + "print \"Vr = Ir*R = Idq*R = %dV\"%(Vr),\"or\"\n", + "Vr = E-Vdq\n", + "print \"Vr = E-Vdq = %fV\" %(Vr)\n", + "print \"\\nThe difference in results is due to the accuracy with which the graph can be read. \\nIdeally,the results obtained either way should be the same.\"\n", + "\n", + "#Graph solution to example 2.1\n", + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "Vd = np.linspace(0.0,10.0)\n", + "Id = np.linspace(0.0,10.0)\n", + "Id= -Vd + 10\n", + "plt.plot(Vd, Id)\n", + "Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7]\n", + "Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0]\n", + "\n", + "plt.plot(Vd, Id,'yo-')\n", + "\n", + "plt.xlabel('Voltage (v)')\n", + "plt.ylabel('current (mA)')\n", + "plt.title('Characteristics of diode')\n", + "plt.grid(True)\n", + "plt.savefig(\"test.png\")\n", + "\n", + "plt.show()\n", + "\n", + "print \"example 2.2:\"\n", + "print \"repeat the example 2.1 for R =2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) \n", + "The current Ic is = 10.000000mA ;Vd=0V\n", + "The diode voltage is = 10.000000V ;Id=0A\n", + "\n", + "The resulting load line appears in Fig. 2.4. The intersection between the load line \n", + "and the characteristic curve defines the Q-point as\n", + "\n", + "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. \n", + "A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy\n", + "\n", + "(B)\n", + "\n", + "Vr = Ir*R = Idq*R = 9V or\n", + "Vr = E-Vdq = 9.220000V\n", + "\n", + "The difference in results is due to the accuracy with which the graph can be read. \n", + "Ideally,the results obtained either way should be the same.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6B/DPCLgBbgi4AGLubIJiuYuYmRaopRUuKJbd\nFi1bNZer9+pVqJtbaaWZWnmVtGvu3TSkLMMWVNRckhxwIXMBjVWW7++P+c0cQNbhzJw5cz7v14vX\ndWDmzMPT3Hl4vs/5ntEJIQSIiEhz6ikdABERKYMFgIhIo1gAiIg0igWAiEijWACIiDSKBYCISKNY\nAMgsCxYswMSJE5UOQxaHDh1C165dzXrsiBEj8Mknn8gcUeXmzp0Ld3d3tGnTpkb3r1evHn7//XcA\nwLPPPotFixaZ9bxhYWFYt26dWY8l28UCQJX6z3/+g9DQULi6uqJNmzYYMWIEvv/+ewCATqdTODqD\nDRs2YMCAAXU6xoABA3DmzJlq71dR0du7d6/VCmF6ejqWLl2KM2fO4MqVK7V+/HvvvYe5c+ea9dw6\nnc5m/puTfFgAqEJLly7FSy+9hLlz5+LPP//ExYsX8fzzz2PXrl0AADn3DxYXF8t2rNoqKipS7Llr\nKz09HW5ubnBzc1M6FLIXgqicrKws4eLiIrZt21bpfRYsWCAee+wxER0dLVxdXYW/v7/4+eefTT9f\nsmSJ6NChg3B1dRV+fn5i+/btpp+tX79e9O3bV7z00kvCzc1NzJs3T6SmporBgwcLNzc30bJlSzF+\n/HiRlZVlekx6eroYPXq0cHd3F25ubmLatGni9OnTokGDBsLBwUG4uLiI5s2bCyGEyM/PF6+88orw\n8fERnp6e4plnnhF5eXlCCCEOHjwo2rZtK+Li4kSrVq1EdHS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IzY2FoMHD0ZwcDBC\nQ0NNSzfGN1w3Nzf069cPgYGBmDlzJsaPH4+ff/4ZQUFB+OSTT0wfvB4aGorIyEgEBQVhxIgRCAwM\nNH0m76ZNm7Bu3ToEBwcjICCgzODYqF+/fnd9gMvjjz+O//znP2WWfwDg6NGj6NOnj7zJISqHl4Mm\nqoWcnBw4OzsjNzcXgwYNwtq1axEcHFzjx4eHh2PTpk1lZgHlnTt3Dq+++mqFRYRITuwAiGrh6aef\nRkhICHr27IkxY8bU6s0fAF599VW8//77Vd7n/fffx+uvv16XMIlqhB0AEZFGsQMgItIoFgAiIo1i\nASAi0igWACIijWIBICLSKBYAIiKN+j91tdZGQm+jrgAAAABJRU5ErkJggg==\n", + "text": [ + "" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "example 2.2:\n", + "repeat the example 2.1 for R =2\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.6\n", + "#For the series diode configuration of Fig. 2.16, determine VD, VR, and ID.\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=8 #E in V\n", + "R=2.2 #R in Kohm\n", + "Vd=0.7 #Vd in V \n", + "\n", + "#Calculations\n", + "\n", + "Vr=E-Vd \n", + "Id=Vr/R \n", + "print \"Since the applied voltage establishes a current in the clockwise direction to match thearrow of the symbol \\nand the diode is in the 'on' state,\\n\"\n", + "print \"The diode voltage is = %.1fV\"%(Vd),\";Id=0A\"\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The current Id is = %.2fmA \"%(Id)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the applied voltage establishes a current in the clockwise direction to match thearrow of the symbol \n", + "and the diode is in the 'on' state,\n", + "\n", + "The diode voltage is = 0.7V ;Id=0A\n", + "The voltage Vr is = 7.3V\n", + "The current Id is = 3.32mA \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.7\n", + "#Repeat Example 2.6 with the diode reversed\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=8 #E in V\n", + "R=2.2 #R in Kohm\n", + "I=0 #For open circuit\n", + "\n", + "#Calculations\n", + "\n", + "Vr=I*R \n", + "Vd=E-Vr \n", + "print \"Removing the diode, we find that the direction of I is opposite to the arrow in the diode symbol \\nand the diode equivalent is the open circuit no matter which model isemployed.\"\n", + "print \"The result is the network of Fig. 2.17, where ID = 0A due to the open circuit.\\n\"\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The diode voltage is = %.1fV\"%(Vd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Removing the diode, we find that the direction of I is opposite to the arrow in the diode symbol \n", + "and the diode equivalent is the open circuit no matter which model isemployed.\n", + "The result is the network of Fig. 2.17, where ID = 0A due to the open circuit.\n", + "\n", + "The voltage Vr is = 0.0V\n", + "The diode voltage is = 8.0V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.8\n", + "#For the series diode configuration of Fig. 2.19, determine VD, VR, and ID.\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=0.5 #E in volt\n", + "R=1.2 #R in Kohm\n", + "Id=0 #For open circuit\n", + "\n", + "\n", + "#calculation\n", + "\n", + "Vr=Id*R\n", + "Vd=E\n", + "\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The diode voltage Vd is = %.1fV\"%(Vd)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage Vr is = 0.0V\n", + "The diode voltage Vd is = 0.5V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.9 Page no 62\n", + "\n", + "#initialisation of variables\n", + "\n", + "R=5.6 # resistance in kilo ohm\n", + "E=12\t\t\t # supply voltage in volt\n", + "Vt1=0.7 # threshold voltage of siicon in volt\n", + "Vt2=0.3 # threshold voltage of germanium in volt\n", + "\n", + "print \"Applying KVL rule in fig 2.2,\"\n", + "\n", + "Vo=E-(Vt1+Vt2) # resulting voltage in volt\n", + "\n", + "Id=(Vo/R)\n", + "\n", + "print \"The resulting voltage is = %dV\"%(Vo)\n", + "\n", + "print \"The current through diode is = %.2fmA\"%(Id)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applying KVL rule in fig 2.2,\n", + "The resulting voltage is = 11V\n", + "The current through diode is = 1.96mA\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "E=10 #supply voltage in vol't\n", + "R=0.33 #resistance in kilo ohms\n", + "Vd=0.7 # voltage across silicon diode\n", + "\n", + "print\"From figure 2.31 it can be said that both diodes are opened so\"\n", + "\n", + "Vo=0.7 # resulting voltage in volt\n", + "\n", + "I1=(E-Vd)/R\n", + "print\"the value of Id1 is = %.2fmA\"%(I1)\n", + "print\"\\nDiodes are of similar characteristics so\"\n", + "\n", + "Id2=(I1/2)\n", + "print\"the value of Id2 is = %.2fmA\"%(Id2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From figure 2.31 it can be said that both diodes are opened so\n", + "the value of Id1 is = 28.18mA\n", + "\n", + "Diodes are of similar characteristics so\n", + "the value of Id2 is = 14.09mA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E1=20 #supply voltage in V\n", + "E2=4 #second port voltage in V\n", + "Vd=0.7 #thresold voltage\n", + "R=2.2 #R in Kohm\n", + "\n", + "\n", + "#calculation\n", + "\n", + "I = (E1-E2-Vd)/R\n", + "\n", + "print \"Diode D1 turn on and Diode D2 turn off\"\n", + "print \"the resultant current I is = %.2fmA\" %(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode D1 turn on and Diode D2 turn off\n", + "the resultant current I is = 6.95mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page :66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "E=12 #supply Voltage in V\n", + "Vd=0.3 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "\n", + "V0 = E-Vd\n", + "\n", + "print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n", + "print \"Across the germanium diode as required by the fact that the voltage across parallel elements must be the same.\"\n", + "print \"\\nThe silicon diode will never have the opportunity to capture its required 0.7 V \\nand therefore remains in its open-circuit state.\"\n", + "print \"the resultant Voltage V0 is = %.1fV\" % (V0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n", + "Across the germanium diode as required by the fact that the voltage across parallel elements must be the same.\n", + "\n", + "The silicon diode will never have the opportunity to capture its required 0.7 V \n", + "and therefore remains in its open-circuit state.\n", + "the resultant Voltage V0 is = 11.7V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page :66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E=20 #supply voltage in V\n", + "VT1=0.7 #thresold voltage\n", + "VT2=0.7 #thresold voltage\n", + "R1=3.3 #R in Kohm\n", + "R2=5.6 #R in Kohm\n", + "\n", + "#calculation\n", + "\n", + "print \"Both Diodes will turn 'on'\"\n", + "print \"So diode voltage will appear over the resistance\"\n", + "\n", + "I1 = (VT2)/R1\n", + "\n", + "print \"the resultant current I2 is = %.3fmA\" %(I1)\n", + "\n", + "print \"\\nApplying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n", + "\n", + "V2 = E-VT1-VT2\n", + "I2 = V2/R2\n", + "\n", + "print \"the voltage V2 = %.1fV\" %(V2)\n", + "print \"the current I2 = %.2fmA\"%(I2)\n", + "\n", + "#At hte bottom node (a)\n", + "\n", + "ID2=I2-I1\n", + "\n", + "print \"the current I2 = %.3fmA\" %(ID2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both Diodes will turn 'on'\n", + "So diode voltage will appear over the resistance\n", + "the resultant current I2 is = 0.212mA\n", + "\n", + "Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n", + "the voltage V2 = 18.6V\n", + "the current I2 = 3.32mA\n", + "the current I2 = 3.109mA\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page :71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "Vm=20 #peak voltage in V\n", + "VT=0.7 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "#(a)\n", + "print \"(a)\\nIdeal Diode:\"\n", + "\n", + "Vdc1= -(0.318*Vm) #Vdc=-0.318(Vm-VT)\n", + "\n", + "print \" In this situation the diode will conduct during the negative part of the input\"\n", + "print \"For the full period DC level is = %.2fV\" %(Vdc1)\n", + "print \"\\nThe negative sign indicates that the polarity of the output is opposite to the defined polarity\"\n", + "\n", + "\n", + "#(b)\n", + "\n", + "print \"\\n(b)\\nsilicon Diode:\"\n", + "\n", + "Vdc2= -0.318*(Vm-0.7)\n", + "\n", + "print \"Vdc2 = %.2fV\" %(Vdc2)\n", + "\n", + "#(c)\n", + "\n", + "print \"\\n(c)\\nIf Vm is increased to 200V:\"\n", + "\n", + "Vm = 200 #new peak voltage\n", + "Vdc1= -(0.318*Vm)\n", + "Vdc2= -0.318*(Vm-0.7)\n", + "\n", + "print \"using (a), Vdc = %.2fV\" %(Vdc1)\n", + "print \"using (b), Vdc = %.2fV\" %(Vdc2)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Ideal Diode:\n", + " In this situation the diode will conduct during the negative part of the input\n", + "For the full period DC level is = -6.36V\n", + "\n", + "The negative sign indicates that the polarity of the output is opposite to the defined polarity\n", + "\n", + "(b)\n", + "silicon Diode:\n", + "Vdc2 = -6.14V\n", + "\n", + "(c)\n", + "If Vm is increased to 200V:\n", + "using (a), Vdc = -63.60V\n", + "using (b), Vdc = -63.38V\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page :75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.19 page no.75\n", + "\n", + "import math\n", + "\n", + "#initialization of variables\n", + "Vi=10 #input voltage in V\n", + "\n", + "#calculation\n", + "\n", + "print \"After redrawing the network configuration,\"\n", + "\n", + "V0 = 0.5*Vi\n", + "\n", + "print \"voltage across the resistance V0 = %dV\" %(V0)\n", + "print \"\\nFor the negative part of the input the roles of the diodes will be interchanged\"\n", + "\n", + "#The effect of removing diodes\n", + "\n", + "Vdc = 0.636*(V0)\n", + "print \"The effect of removing diodes:\"\n", + "print \"\\tReduced available DC level = %.2fV\" %(Vdc)\n", + "print \"\\tPIV = the maximum voltage across R is = %dV\" %(V0)\n", + "print \"or half of that required for a half-wave rectifier with the same input\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "After redrawing the network configuration,\n", + "voltage across the resistance V0 = 5V\n", + "\n", + "For the negative part of the input the roles of the diodes will be interchanged\n", + "The effect of removing diodes:\n", + "\tReduced available DC level = 3.18V\n", + "\tPIV = the maximum voltage across R is = 5V\n", + "or half of that required for a half-wave rectifier with the same input\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/Untitled0.ipynb b/sample_notebooks/DeepTrambadia/Untitled0.ipynb new file mode 100644 index 00000000..e23c7b5f --- /dev/null +++ b/sample_notebooks/DeepTrambadia/Untitled0.ipynb @@ -0,0 +1,154 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3090d4f2b3d4de5b787389193d1e9cb10abedd8dbc02a70d6ec597610190cdf7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.13 page no.65\n", + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E1=20 #supply voltage in V\n", + "E2=4 #second port voltage in V\n", + "Vd=0.7 #thresold voltage\n", + "R=2.2 #R in Kohm\n", + "\n", + "\n", + "#calculation\n", + "\n", + "I = (E1-E2-Vd)/R\n", + "\n", + "print \"Diode D1 turn on and Diode D2 turn off\"\n", + "print \"the resultant current I is %.2fmA\" %(I)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode D1 turn on and Diode D2 turn off\n", + "the resultant current I is 6.95mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.14 page no.66\n", + "import math\n", + "\n", + "#initialization of variables\n", + "E=12 #supply Voltage in V\n", + "Vd=0.3 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "\n", + "V0 = E-Vd\n", + "\n", + "print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n", + "print \"across the germanium diode as required by the fact that the voltage across parallel elements must be the same\"\n", + "print \"The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\"\n", + "print \"the resultant Voltage V0 is %.1fV\" % (V0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n", + "across the germanium diode as required by the fact that the voltage across parallel elements must be the same\n", + "The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\n", + "the resultant Voltage V0 is 11.7V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.15 page no.66\n", + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E=20 #supply voltage in V\n", + "VT1=0.7 #thresold voltage\n", + "VT2=0.7 #thresold voltage\n", + "R1=3.3 #R in Kohm\n", + "R2=5.6 #R in Kohm\n", + "\n", + "#calculation\n", + "\n", + "print \"Both Diodes will turn 'on'\"\n", + "print \"So diode voltage will appear over the resistance\"\n", + "\n", + "I1 = (VT2)/R1\n", + "\n", + "print \"the resultant current I2 is %.3fmA\" %(I1)\n", + "\n", + "print \"Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n", + "\n", + "V2 = E-VT1-VT2\n", + "I2 = V2/R2\n", + "\n", + "print \"the voltage V2 =%.1fV\" %(V2)\n", + "print \"the current I2 =%.2fmA\"%(I2)\n", + "\n", + "#At hte bottom node (a)\n", + "\n", + "ID2=I2-I1\n", + "\n", + "print \"the current I2 =%.3fmA\" %(ID2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both Diodes will turn 'on'\n", + "So diode voltage will appear over the resistance\n", + "the resultant current I2 is 0.212mA\n", + "Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n", + "the voltage V2 =18.6V\n", + "the current I2 =3.32mA\n", + "the current I2 =3.109mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc201.ipynb b/sample_notebooks/DeepTrambadia/sc201.ipynb new file mode 100644 index 00000000..b76b0ff0 --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc201.ipynb @@ -0,0 +1,53 @@ +import math + +#(a) +#initialisation of variables + +E=10 #E in V +R=1 #R in Kohm + + +#Calculations + +Id=E/R #Eq.(2.2) +Vd=E +print "The current Ic is= %fmA "%(Id),";Vd=0V" +print "The diode voltage is= %fV"%(Vd),";Id=0A" +print "The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as" +print "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy" + + +#(B) +print "(B)" +Ir=9.25 #Ir in mA +Vdq=0.78 #Vdq in v +Vr=Ir*R +print "Vr = Ir*R = Idq*R %d="%(Vr),"or" +Vr = E-Vdq +print "Vr = E-Vdq = %f" %(Vr) +print "The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same." + +#Graph solution to example 2.1 + +import numpy as np +import matplotlib.pyplot as plt + +Vd = np.linspace(0.0,10.0) +Id = np.linspace(0.0,10.0) +Id= -Vd + 10 +plt.plot(Vd, Id) +Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7] +Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0] + +plt.plot(Vd, Id,'yo-') + +plt.xlabel('Voltage (v)') +plt.ylabel('current (mA)') +plt.title('About as simple as it gets, folks') +plt.grid(True) +plt.savefig("test.png") + +plt.show() + +print "example 2.2:" +print "repeat the example 2.1 for R =2" \ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc201_1.ipynb b/sample_notebooks/DeepTrambadia/sc201_1.ipynb new file mode 100644 index 00000000..aa4f487b --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc201_1.ipynb @@ -0,0 +1,85 @@ + + + + +

IPython QtConsole 3.2.0

+

Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]

+

Type "copyright", "credits" or "license" for more information.

+


+

IPython 3.2.0 -- An enhanced Interactive Python.

+

Anaconda is brought to you by Continuum Analytics.

+

Please check out: http://continuum.io/thanks and https://anaconda.org

+

? -> Introduction and overview of IPython's features.

+

%quickref -> Quick reference.

+

help -> Python's own help system.

+

object? -> Details about 'object', use 'object??' for extra details.

+

%guiref -> A brief reference about the graphical user interface.

+


+

In [1]: import math

+

   ...:

+

   ...: #(a)

+

   ...: #initialisation of variables

+

   ...:

+

   ...: E=10 #E in V

+

   ...: R=1 #R in Kohm

+

   ...:

+

   ...:

+

   ...: #Calculations

+

   ...:

+

   ...: Id=E/R #Eq.(2.2)

+

   ...: Vd=E

+

   ...: print "The current Ic is= %fmA "%(Id),";Vd=0V"

+

   ...: print "The diode voltage is= %fV"%(Vd),";Id=0A"

+

   ...: print "The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as"

+

   ...: print "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy"

+

   ...:

+

   ...:

+

   ...: #(B)

+

   ...: print "(B)"

+

   ...: Ir=9.25 #Ir in mA

+

   ...: Vdq=0.78 #Vdq in v

+

   ...: Vr=Ir*R

+

   ...: print "Vr = Ir*R = Idq*R %d="%(Vr),"or"

+

   ...: Vr = E-Vdq

+

   ...: print "Vr = E-Vdq = %f" %(Vr)

+

   ...: print "The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same."

+

   ...:

+

   ...: #Graph solution to example 2.1

+

   ...:

+

   ...: import numpy as np

+

   ...: import matplotlib.pyplot as plt

+

   ...:

+

   ...: Vd = np.linspace(0.0,10.0)

+

   ...: Id = np.linspace(0.0,10.0)

+

   ...: Id= -Vd + 10

+

   ...: plt.plot(Vd, Id)

+

   ...: Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7]

+

   ...: Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0]

+

   ...:

+

   ...: plt.plot(Vd, Id,'yo-')

+

   ...:

+

   ...: plt.xlabel('Voltage (v)')

+

   ...: plt.ylabel('current (mA)')

+

   ...: plt.title('About as simple as it gets, folks')

+

   ...: plt.grid(True)

+

   ...: plt.savefig("test.png")

+

   ...:

+

   ...: plt.show()

+

   ...:

+

   ...: print "example 2.2:"

+

   ...: print "repeat the example 2.1 for R =2"

+

   ...:

+

The current Ic is= 10.000000mA ;Vd=0V

+

The diode voltage is= 10.000000V ;Id=0A

+

The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as

+

The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy

+

(B)

+

Vr = Ir*R = Idq*R 9= or

+

Vr = E-Vdq = 9.220000

+

The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same.

+

example 2.2:

+

repeat the example 2.1 for R =2

+


+

In [2]:

\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc223.ipynb b/sample_notebooks/DeepTrambadia/sc223.ipynb new file mode 100644 index 00000000..319edd95 --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc223.ipynb @@ -0,0 +1,34 @@ +#example 2.23 page no.81 +#Repeated example with silicon diode +import math + +#initialization of variables + +v=4 #v in Volt +Vi=[16,-16] #peak voltage in Volt +VT=0.7 #thresold voltage + +#calculation + + +print "+16V dc supply is pressuring the diode to stay in the short circuit state" +print "But for any Vi < v,it will result in short circuted diode" +print "But for any Vi > v,it will result in open circuted diode" +print "If the diode voltage is 0.7V" + +v = v-VT +print "resulting battery input voltage = %.1fV" %(v) +print "For open circuit state" +if (Vi[0] >= v): + V0=Vi[0] + print "V0 =%dV " %(V0) + +print "for the negative region of the input signal,the diode will be in the 'on' state" + +if [Vi[1]==-16]: + V0 = v + print "V0 = %.2fV" %(V0) + + + + diff --git a/sample_notebooks/DivyangGandhi/ch2.ipynb b/sample_notebooks/DivyangGandhi/ch2.ipynb new file mode 100644 index 00000000..a473f6ff --- /dev/null +++ b/sample_notebooks/DivyangGandhi/ch2.ipynb @@ -0,0 +1,80 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:47d75f27ec6c94d8690b19c8285770e7f28c9cd54fabd419e1b2d7d6e6d4afe5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Transmission Lion Structures and Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "t_s = 0.49 ; # Human body is in contact with 60 Hz power for 0.49 sec\n", + "r = 100 ; # Resistivity of soil based on IEEE std 80-2000 \n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "v_touch50 = 0.116*(1000+1.5*r)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts\n", + "\n", + "# For case (b)\n", + "v_step50 = 0.116*(1000+6*r)/math.sqrt(t_s) ; # Maximum allowable step voltage for 50 kg body weight in volts\n", + "# Above Equations of case (a) & (b) applicable if no protective surface layer is used\n", + "\n", + "# For metal to metal contact below equation holds good . Hence resistivity is zero\n", + "r_1 = 0 ; # Resistivity is zero\n", + "\n", + "# For case (c)\n", + "v_mm_touch50 = 0.116*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts for metal to metal contact\n", + "\n", + "# For case (d)\n", + "v_mm_touch70 = 0.157*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 70 kg body weight in volts for metal to metal contact\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Tolerable Touch potential , V_touch50 = %.f V , for 50 kg body weight \"%(v_touch50) ;\n", + "print \" b) Tolerable Step potential , V_step50 = %.f V , for 50 kg body weight \"%(v_step50) ;\n", + "print \" c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = %.1f V , for 50 kg body weight \"%(v_mm_touch50) ;\n", + "print \" d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = %.1f V , for 70 kg body weight \"%(v_mm_touch70) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Tolerable Touch potential , V_touch50 = 191 V , for 50 kg body weight \n", + " b) Tolerable Step potential , V_step50 = 265 V , for 50 kg body weight \n", + " c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = 165.7 V , for 50 kg body weight \n", + " d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = 224.3 V , for 70 kg body weight \n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/DivyangGandhi/ch5.ipynb b/sample_notebooks/DivyangGandhi/ch5.ipynb new file mode 100755 index 00000000..696c90f4 --- /dev/null +++ b/sample_notebooks/DivyangGandhi/ch5.ipynb @@ -0,0 +1,422 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:99b4244f7dba40fbe6b1f9647ffae37a043c932f7cb3e888c2ad7aac3ff9563e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Flow in Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 2.5 \t#ft depth of water\n", + "a= 45. \t#degrees side slope\n", + "x= 5. \t#ft\n", + "Q= 45. \t#cuses\n", + "v= 2.6 \t#ft/sec velocity\n", + "w= 6.92 \t#ft \n", + "C= 120.\n", + "\n", + "#CALCULATIONS\n", + "b= (Q/(v*h))-h\n", + "p= b+2*(h+math.sqrt(2))\n", + "A= h*w\n", + "m= A/p\n", + "i= (v/(C*math.sqrt(m)))**2\n", + "\n", + "#RESULTS\n", + "print 'Width = %.2f ft'%(b) \n", + "print ' Slope = %.6f '%(i) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width = 4.42 ft\n", + " Slope = 0.000332 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "a= 60. \t#degrees sides inclined\n", + "i= 1./1600\n", + "Q= 8.*10**6 \t#gal/hr discharge\n", + "M= 110.\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIOS\n", + "d= ((Q*2**(2./3)*math.sqrt(1./i))/(w*3600*math.sqrt(3)*M))**(3./8)\n", + "b=6.93 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.f ft'%(d) \n", + "print ' breadth = %.2f ft'%(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 6 ft\n", + " breadth = 6.93 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/swc**2\n", + "Q= 40. \t#cuses rate\n", + "w= 5.5 \t#ft\n", + "h= 9. \t#in depth\n", + "d= 0.75 \t#ft\n", + "V= 3. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "D= ((Q*2)**2/(g*(w*2)**2))**(1./3)\n", + "v= Q*d/w\n", + "D1= math.sqrt((2*v**2*d/g)+h/64)-(d/2)\n", + "dD= D1-d\n", + "El= -dD+((v**2*(1-(V/v)**2))/(2*g))\n", + "Els= Q*El*62.4/550\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(D)\n", + "print ' Rise in level = %.f ft'%(D1)\n", + "print ' Horse-power lost = %.3f hp'%(Els) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 1.18 ft\n", + " Rise in level = 1 ft\n", + " Horse-power lost = 0.961 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 3.5 \t#ft\n", + "H= 2.5 \t#ft\n", + "w= 3. \t#ft depth\n", + "h= 6. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.09*b*H**1.5\n", + "v= Q/(w*h)\n", + "H1= H+(v**2/(2*g))\n", + "Q1= 3.09*b*H1**1.5\n", + "hc= (Q1**2/(b**2*g))**(1./3)\n", + "h2= 0.5*(math.sqrt(hc**2+8*hc**2)-hc)\n", + "dh= h2+b-w\n", + "\n", + "#RESULTS\n", + "print \"Flow rate = %.1f cusecs\"%(Q)\n", + "print \" Flow rate = %d cusecs\"%(Q1)\n", + "print ' maximum depth of water downstream = %.3f ft'%(dh) \n", + "print ' Shooting flow depth at hump = %.3f ft'%(h2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 42.8 cusecs\n", + " Flow rate = 45 cusecs\n", + " maximum depth of water downstream = 2.226 ft\n", + " Shooting flow depth at hump = 1.726 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "m= 60./26\n", + "i= 1./2000\n", + "h1= 3. \t#ft depth\n", + "h2= 5. \t#ft depth\n", + "m1= 10./3\n", + "C= 90. # constant\n", + "l= 500. \t#ft depth\n", + "H= 20. \t#ft broad\n", + "H1= 29.62 \t#ft\n", + "g= 32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "v= 90*math.sqrt(m*i)\n", + "v1= v*h1/h2\n", + "dh= (i-(v1**2/(C**2*m1)))*l/(1-v1**2/(g*h2))\n", + "h3= h2-dh\n", + "V= h1*v/h3\n", + "\n", + "#RESULTS\n", + "print 'Height of water 1000 ft upstream = %.3f ft'%(h3) \n", + "print ' Height of water upstream = %.3f ft'%(h3) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of water 1000 ft upstream = 4.808 ft\n", + " Height of water upstream = 4.808 ft\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 5. \t #ft/sec\n", + "m= 60./26\n", + "i= 1./2000\n", + "h= 5.5 \t#ft\n", + "m1= 110./31\n", + "d= 3. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "C= v/(math.sqrt(m*i))\n", + "v1= v*d/h\n", + "r= (i-(v1**2/(C**2*m1)))/(1-(v1**2/(g*h)))\n", + "x= 1/r\n", + "\n", + "#RESULTS\n", + "print 'Distance upstream = %.f ft'%(round(x,-1)) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance upstream = 2380 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "Q= 12 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "hc= (Q/(3*math.sqrt(g)))**(2./3)\n", + "vec=roots([1,6,12,8,0,-8.95,-8.95])\n", + "H=vec[2]\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(hc) \n", + "print ' Critical depth = %.2f ft'%(H) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 0.79 ft\n", + " Critical depth = 0.89 ft\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:17: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.64 # coefficient\n", + "g= 32.2 \t#ft/sec**2\n", + "A= 12.5 \t#ft**2\n", + "H= 24.8 \t#ft\n", + "Q= 3200. \t#cuses\n", + "b= 150. \t#ft wide\n", + "A1= 5.*10**6 # avg surface area\n", + "h= 9. \t#ft\n", + "h1= 6. \t #in\n", + "\n", + "#CALCULATIONS\n", + "N= Q/(Cd*A*math.sqrt(2*g*H))\n", + "H1= (Q/(3.2*b))**(2./3)\n", + "ES= (H1-(h1/12))*A1*h\n", + "\n", + "#RESULTS\n", + "print 'number of siphons = %.f '%(N) \n", + "print ' Extra Storage = %.2e ft**3'%(ES) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of siphons = 10 \n", + " Extra Storage = 1.37e+08 ft**3\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/GauravMittal/chapter2.ipynb b/sample_notebooks/GauravMittal/chapter2.ipynb new file mode 100755 index 00000000..739819fc --- /dev/null +++ b/sample_notebooks/GauravMittal/chapter2.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-2 : DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.1 page 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Calculate the increase of main field flux in percentage\n", + "N_1=750 #speed of dc machine(in rpm)\n", + "E_1=220 #induced emf in dc machine when running at N_1\n", + "N_2=700 #speed of dc machine second time (in rpm)\n", + "E_2=250 #induced emf in dc machine when running at N_2\n", + "F=E_2*N_1/(E_1*N_2) \n", + "Inc=(F-1) \n", + "print 'increase in main field flux of the dc machine =',round((Inc*100),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "increase in main field flux of the dc machine = 21.75\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.2 page 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#a)find the emf generated in a 6 pole machine b)find speed at which machine generated 550 V emf\n", + "F_1=0.06 #Flux per pole(in Wb)\n", + "N_1=250 #speed of the rotor(in rpm)\n", + "A=2 #number of parllel (paths armature wave wound)\n", + "P=6 #poles in machine\n", + "Z=664 #total conductor in machine\n", + "E_g=P*F_1*N_1*Z/(60*A) #emf generated\n", + "print \"emf generated in machine =\",E_g,\"Volts\"\n", + "E_2=550 #new emf generating machine(in V)\n", + "F_2=0.058 #flux per pole (in Wb) for generating E_2\n", + "N_2=60*E_2*A/(P*F_2*Z) #new speed at which machine generating E_2(in rpm)\n", + "print \"new speed of the rotor =\",round(N_2,2),\"rpm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "emf generated in machine = 498.0 Volts\n", + "new speed of the rotor = 285.63 rpm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.3 page 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#determine the value of torque in Nw-m\n", + "F=24 #flux per pole (in m Wb)\n", + "F_1=F*10**-3 #flux per pole (in Wb)\n", + "Z=760 #number of conductors in armature\n", + "P=4 #number of pole\n", + "A=2 #number of parallel paths\n", + "I_a=50 #armature cuurrent(in Amp)\n", + "T_a=0.159*F_1*Z*P*I_a/A #torque develope(in Nw-m)\n", + "print \"torque developed in machine =\",round(T_a,2),\"Nw-m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "torque developed in machine = 290.02 Nw-m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.4 page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total torque in Nw-m\n", + "P=6 #poles \n", + "A=P #number of parallel paths\n", + "S=60 #slots in motor\n", + "C_s=12 #conductor per slot\n", + "Z=S*C_s #total conductor in machine\n", + "I_a=50 #armature current(in Amp)\n", + "F_1=20#flux per pole(in m Wb)\n", + "F_2=F_1*10**-3 #flux per pole)(in Wb)\n", + "T=0.15924*F_2*Z*P*I_a/A #total torque (in Nw-m)\n", + "print 'total torque by motor =',T,'Nw-m' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total torque by motor = 114.6528 Nw-m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam 2.5 page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import ceil\n", + "#Calculate the drop in speed when motor takes 51 Amp\n", + "V=220 #supply voltage(in V)\n", + "R_sh=220 #shunt field resistance(in Ohm)\n", + "R_a=0.2 #armature resistance(in Ohm)\n", + "I_sh=V/R_sh #shunt field current(in Amp)\n", + "N_1=1200 #starting speed of the motor(in rpm)\n", + "I_1=5.4 #at N_1 speed current in motor(in Amp)\n", + "I_a1=I_1-I_sh #armature current at speed N_1(in Amp)\n", + "E_b1=V-I_a1*R_a #emf induced due to I_a1(in V)\n", + "I_2=51 #new current which motor taking(in Amp)\n", + "I_a2=I_2-I_sh #armature current at I_2(in Amp)\n", + "E_b2=V-I_a2*R_a #emf induced due to I_a2(in V)\n", + "N_2=E_b2*N_1/E_b1 #speed of the motor when taking I_2 current(in rpm)\n", + "N_r=ceil(N_1-N_2) #reduction in speed(in rpm)\n", + "print 'reduction in speed =',N_r,'rpm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "reduction in speed = 50.0 rpm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.6 page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In a dc machine Calculate (a)induced emf (b)Electro magnetic torque (c)armature copper loss \n", + "V=220 #voltage at the armature of dc motor\n", + "I_a=15 #current through armature(in Amp)\n", + "R_a=1 #armature resistance(in Ohm)\n", + "w=100 #speed of the machine(in radian/sec)\n", + "E=V-I_a*R_a #induced emf(in V)\n", + "print 'induced emf =',E,'V' \n", + "T=E*I_a/w #electro magnentic torque developed(in Nw-m)\n", + "print 'electro magnentic torque developed =',T,'Nw-m'\n", + "L=(I_a**2)*R_a #Armature copper loss(in Watt)\n", + "print 'Armature copper loss =',L,'Watt'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "induced emf = 205 V\n", + "electro magnentic torque developed = 30.75 Nw-m\n", + "Armature copper loss = 225 Watt\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.7 page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the electro magnetic torque\n", + "E=250 #emf induced in dc machine(in V)\n", + "I_a=20 #current flowing through the armature(in Amp)\n", + "N=1500 #speed(in rpm)\n", + "T_e=0.1591*E*I_a*60/N #torque developed in machine(in Nw-m)\n", + "print 'electro magnetic torque developed in dc machine =',T_e,'Nw-m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electro magnetic torque developed in dc machine = 31.82 Nw-m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.8 page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the gross torque in dc machine\n", + "P=4 #number of poles \n", + "Z=1600 #number of armature conductor\n", + "F=0.027 #flux per pole(in Wb)\n", + "A=2 #number of parallel paths (wave wound)\n", + "I=75 #current in machine(in Amp)\n", + "N=1000 #speed of the motor(in rpm)\n", + "T=0.1591*P*F*Z*I/A #torque generate in machine(in Nw-m)\n", + "print 'Torque generated in machine =',T,'Nw-m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque generated in machine = 1030.968 Nw-m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.9 page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of back emf\n", + "V=230 #applied voltage (in V)\n", + "R_a=0.1 #armature resistance(in Ohm)\n", + "I_a=60 #armature current (in Amp)\n", + "E_b=V-I_a*R_a #back emf(in Volts)\n", + "print 'back emf produced by machine =',E_b,'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "back emf produced by machine = 224.0 V\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/GirirajsinhDodiya/ch7.ipynb b/sample_notebooks/GirirajsinhDodiya/ch7.ipynb new file mode 100755 index 00000000..b5eb3280 --- /dev/null +++ b/sample_notebooks/GirirajsinhDodiya/ch7.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8fbfdaa034f011c9304b20c16adbf915d0a8f58f4b89051b6e8db7227dd1440f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Flow Under Varying Head" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 6. \t#ft\n", + "di= 2. \t #in\n", + "h= 9. \t #ft\n", + "Cd= 0.6\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5*(d/2)**2*math.pi/(Cd*math.pi*math.sqrt(2*g)/144)\n", + "\n", + "\n", + "vec2=quad(fun,0,h)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'Time to emptify = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to emptify = 1615 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "d1= 4. \t#ft\n", + "d2= 2. \t #in\n", + "l= 300. \t#ft\n", + "P= 5. \t #lb/in**2\n", + "h1= 3. \t #ft\n", + "h2= 6. \t #ft\n", + "f= 0.01\n", + "\n", + "#CALCULATIONS\n", + "X= P*2.31*10*(d2/12)**5/(f*l)\n", + "A= math.pi*d1**2/4\n", + "\n", + "def fun(h):\n", + " return A*math.sqrt((P*2.31*10*(d2/12)**5/(f*l))-(10*(d2/12)**5*h/(f*l)))/(10*(d2/12)**5/(f*l))/7\n", + "\n", + "vec2=quad(fun,h1,h2)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.2f sec'%(T)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 689.35 sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 10. \t#in\n", + "l= 15. \t#ft\n", + "di= 3. \t#in\n", + "Cd= 0.62 \n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return -l*2*math.sqrt((d/2)**2-((d/2)-H)**2)/(Cd*(math.pi*(di/12)**2/4)*H**0.5*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,0,d/2)\n", + "T= vec2[0]\n", + "secs = -T%60\n", + "mins = -T/60\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d mins and %d seconds'%(mins,secs)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 27 mins and 54 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "h= 4. \t#ft\n", + "w= 6. \t#ft\n", + "l= 100. \t#yd\n", + "a= 60. \t#degrees\n", + "h1= 3. \t#ft\n", + "h2= 2. \t#ft\n", + "Cd= 0.6\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "A= l*3*w\n", + "def fun(H):\n", + " return -A*H**-2.5/(Cd*(8./15)*(math.tan(math.radians(a/2)))*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,h1,(h1-h2))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 654 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "A= 1./16 \t#mile**2\n", + "d= 2. \t#ft\n", + "h= 18. \t#ft\n", + "h1= 5. \t#ft\n", + "f= 0.006\n", + "l= 200. \t#ft\n", + "h2= 10. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "X= math.sqrt(1./((1.5+(4*f*l/d))/(2*g)))\n", + "def fun(H):\n", + " return A*5280**2*H**-0.5/(math.pi*d**2*X/4)\n", + "\n", + "vec2=quad(fun,h-h1,h)\n", + "T= vec2[0]\n", + "hours = T/3600\n", + "mins = T%3600/60\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d hours and %d mins sec'%(hours,round(mins,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 48 hours and 20 mins sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 8. \t#ft\n", + "b= 6. \t#ft\n", + "h= 10. \t#ft\n", + "r= 3.\n", + "Cd= 0.6\n", + "A1= 36. \t#ft**2\n", + "A2= 12. \t#ft**2\n", + "l1= 6. \t#ft\n", + "h1= 1. \t#ft\n", + "d= 2. \t#in\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5/(Cd*(math.pi*(d/12)**2/4)*math.sqrt(2*g)*((1/A1)+(1/A2)))\n", + "\n", + "vec2=quad(fun,0,(b-h1))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the levels to become equal = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the levels to become equal = 383 sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h1= 3. \t#ft\n", + "h2= 4. \t#ft diameter\n", + "r= 0.95 \t#m**-1\n", + "k= 27.65 \t#sec\n", + "Cd= 0.95\n", + "\n", + "#CALCULATIONS\n", + "T= k*(math.log(r*math.sqrt(h2)-1)+(r*math.sqrt(h2)-1))-k*(math.log(r*math.sqrt(h1)-1)+(r*math.sqrt(h1)-1))\n", + "h= ((h2-h1)/Cd)**2\n", + "\n", + "#RESULTS\n", + "print 'Time = %.2f sec'%(T)\n", + "print ' Increase in water level = %.2f ft'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time = 16.23 sec\n", + " Increase in water level = 1.11 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 75. \t#sec\n", + "h= 10.5 \t#in constant\n", + "h1= 13.5 \t#in\n", + "\n", + "#CALCULATIONS\n", + "r= t*math.pi*math.sqrt(2*h**2)/math.log((math.sqrt(2*h1**2)+h1)/(math.sqrt(2*h**2)-h))\n", + "t= -r*((1/h1)-(1/h))\n", + "\n", + "#RESULTS\n", + "print 'A/K = %.f '%(r)\n", + "print ' Time taken = %.1f sec'%(t)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A/K = 1737 \n", + " Time taken = 36.8 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 9.8 \t#m/sec**2\n", + "h1= 10. \t#in\n", + "h2= 12. \t#in\n", + "r1= 1.32\n", + "r2= 1.56\n", + "r3= 1.97\n", + "r4= 4.10\n", + "r5= 2.64\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(32.2)*(h2/18)**1.5\n", + "T= 10**5*(r1+2*r3+r4+4*(r3+r5))/(6*h2*60*60)\n", + "\n", + "#RESULTS\n", + "print 'Actual discharge = %.2f CBH**1.5 cuses'%(Q)\n", + "print ' Time = %.1f hr'%(T)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 3.09 BH**1.5 cuses\n", + " Time = 10.7 hr\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/GirishVora/ch2.ipynb b/sample_notebooks/GirishVora/ch2.ipynb new file mode 100755 index 00000000..9eb5c1ee --- /dev/null +++ b/sample_notebooks/GirishVora/ch2.ipynb @@ -0,0 +1,428 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3545b25396a8ddd5a6290547da9d278c18ef204a72b66bd3a11c0eea3ce41199" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : METHODS OF IRRIGATION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "t = (60*2.303*y*math.log10(Q/(Q-I*A)))/I\n", + "\n", + "# Results\n", + "print \"Time required to cover given area = %.f minutes.\"%(t)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to cover given area = 56 minutes.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 pg : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "Q = 0.0108 #discharge through well\n", + "y = 0.075 #average depth of flow\n", + "I = 0.05 #average infiltration rate\n", + "A = 0.1 #area to cover\n", + "\n", + "# Calculations\n", + "Amax = Q/I;\n", + "\n", + "# Results\n", + "print \"Maximum area that can be irrigated = %.2f hectare.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum area that can be irrigated = 0.22 hectare.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 pg : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "#time of water application\n", + "#optimum length of each border strip\n", + "#dischrge for each border strip\n", + "\n", + "#Given\n", + "d = 0.05;\t\t\t\t\t\t\t\t#depth of root zone\n", + "I = 1.25E-5;\t\t\t\t\t\t\t\t#average infiltration rate\n", + "s = 0.0035\t\t\t\t\t\t\t\t#slope of border strip\n", + "t = d/(I*3600);\n", + "\n", + "# Calculations and Results\n", + "t = round(t*1000)/1000;\n", + "print \"Time of water application = %.2f hours.\"%(t);\n", + "\n", + "#Part (a)\n", + "q = 2E-3;\t\t\t\t\t\t\t\t#discharge entering water source\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "L = round(10*L)/10;\n", + "print \"Part a:\";\n", + "print \"Optimum length of each border strip = %.2f m.\"%(L);\n", + "\n", + "#Part (b)\n", + "Lgiven = 150\t\t\t\t\t\t\t\t#given value of length\n", + "#First Trial\n", + "q = 3E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "#second trial\n", + "q = 3.15E-3;\n", + "qdash = q*100**2*60;\n", + "n = 0.55425-(0.0001386*qdash);\n", + "yo = (n*q/(s**0.5))**0.6;\n", + "y = 0.665*yo;\n", + "L = (q/I)*(1-math.e**(-d/y));\n", + "q = 9*Lgiven*q*1000/L;\n", + "q = round(q*10)/10;\n", + "print \"Part b:\";\n", + "print \"Discharge for each border strip = %.2f lps.\"%(q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time of water application = 1.11 hours.\n", + "Part a:\n", + "Optimum length of each border strip = 101.90 m.\n", + "Part b:\n", + "Discharge for each border strip = 28.20 lps.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 pg : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\n", + "\n", + "#deep percolation loss\n", + "#water application efficiency and time of irrigation.\n", + "\n", + "#Given\n", + "B = 12.;\t\t\t\t#breadth of bamath.sin\n", + "L = 36.\t\t\t\t#length of bamath.sin\n", + "d = 70.\t\t\t\t#depth of irrigation\n", + "Ic = 70.\t\t\t\t#cumulative infiltration\n", + "kdash = 9;\n", + "ndash = 0.42;\n", + "#Part (a) \n", + "a = 5;\n", + "b = 0.6;\n", + "q = 1.5;\t\t\t\t#stream size\n", + "\n", + "# Calculations and Results\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "print \"Part a:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n", + "#part (b)\n", + "a = 8;\n", + "b = 0.6;\n", + "q = 3;\n", + "Q = (q*B)/1000;\n", + "tl = (L/a)**(1/b);\n", + "td = (Ic/kdash)**(1/ndash);\n", + "T = tl+td;\n", + "p = (1-(td/T)**(ndash))*100;\n", + "eita = (1-p/100)*100;\n", + "Tdash = (d*L*B)/(10*eita*Q*60);\n", + "p = round(p*100)/100;\n", + "eita = round(eita*100)/100;\n", + "Tdash = round(Tdash*10)/10;\n", + "\n", + "print \"Part b:\"\n", + "print \"Deep percolation loss = %.2f percent.\"%(p);\n", + "print \"Water application efficiency = %.2f percent.\"%(eita);\n", + "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part a:\n", + "Deep percolation loss = 7.47 percent.\n", + "Water application efficiency = 92.53 percent.\n", + "Time of irrigation = 30.30 minutes.\n", + "Part b:\n", + "Deep percolation loss = 3.66 percent.\n", + "Water application efficiency = 96.34 percent.\n", + "Time of irrigation = 14.50 minutes.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 pg : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import zeros\n", + "\n", + "\n", + "#given\n", + "d = 37.5\t\t\t\t#crop water requirement\n", + "W = 1.\t\t\t\t#furrow spacing\n", + "L = 120.\t\t\t\t#length of furrow\n", + "n = -0.49;\n", + "k = 38.;\n", + "Ttotal = 143.;\t\t\t\t#Total time of irrigation\n", + "A = [0 ,23, 52 ,88, 127]\t\t\t\t#given values of time of advance\n", + "B = zeros(5)\n", + "C = zeros(5)\n", + "D = zeros(5)\n", + "E = zeros(5)\n", + "\n", + "# Calculations\n", + "for i in range(5):\t\t\t\t#loop to find respective values of time of ponding\n", + " B[i] = 143-A[i] \n", + "\n", + "for j in range(5):\t\t\t\t#loop to find respective furrow infiltration\n", + " C[j] = B[j]**(n)*k;\n", + "\n", + "for K in range(4):\t\t\t\t#loop to find respective average infiltration\n", + " D[K] = (C[K]+C[K+1])/2;\n", + "\n", + "\n", + "E[0] = D[0];\n", + "for l in range(1,4):\t\t\t\t#loop to determine cumulative infiltration\n", + " E[l] = D[l]+E[l-1];\n", + "\n", + "I = E[3];\n", + "\n", + "T = (30*d*W*(n+1)/k)**(1/(n+1));\n", + "dav = ((24.5*Ttotal)+(I*(T-Ttotal)))/L;\n", + "q = ((120*37.5)-(24.5*143))/62;\n", + "T = round(T);\n", + "dav = round(dav*10)/10;\n", + "q = round(q*100)/100;\n", + "I = round(I*100)/100;\n", + "\n", + "# Results\n", + "print \"Maximum size of cut-back stream = %.2f lpm.\"%(I);\n", + "print \"Minimum size of cut-back stream = %.2f lpm.\"%(q);\n", + "print \"Time required for putting 37.5mm depth of water = %.2f minutes.\"%(T);\n", + "print \"Average depth of water required = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum size of cut-back stream = 19.69 lpm.\n", + "Minimum size of cut-back stream = 16.07 lpm.\n", + "Time required for putting 37.5mm depth of water = 205.00 minutes.\n", + "Average depth of water required = 39.40 mm.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 pg : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Given\n", + "L = 100.;\t\t\t\t#length of furrow\n", + "W = 1.;\t\t\t\t#furrow spacing\n", + "s = 0.3\t\t\t\t#longitudnal slope of furrow\n", + "t1 = 80.\t\t\t\t#initial time flow of stream\n", + "t2 = 35.\t\t\t\t#final time flow of stream\n", + "\n", + "# Calculations\n", + "qm = 0.6/s;\n", + "q = qm*0.4;\n", + "dav = ((q*t2*60)+(2*t1*60))/100;\n", + "\n", + "# Results\n", + "print \"Average depth of water applied = %.2f mm.\"%(dav);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average depth of water applied = 112.80 mm.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 pg : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "#Given\n", + "Q = 0.0072;\t\t\t\t#discharge through well\n", + "y = 0.1;\t\t\t\t#average depth of flow\n", + "I = 0.05\t\t\t\t#infiltration capacity of soil\n", + "A = 0.04\t\t\t\t#area of land\n", + "\n", + "# Calculations\n", + "t = (2.303*y*60/I)*math.log10(Q/(Q-I*A));\n", + "Amax = Q/I;\n", + "t = round(t*100)/100;\n", + "\n", + "# Results\n", + "print \"Time required to irrigate = %.2f minutes.\"%(t);\n", + "print \"Maximum area that can be irrigated = %.2f ha.\"%(Amax);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to irrigate = 39.06 minutes.\n", + "Maximum area that can be irrigated = 0.14 ha.\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/Haseen/ch4.ipynb b/sample_notebooks/Haseen/ch4.ipynb new file mode 100755 index 00000000..c4d5994a --- /dev/null +++ b/sample_notebooks/Haseen/ch4.ipynb @@ -0,0 +1,376 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-4, Permanent Magnet Generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 page 222 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, floor\n", + "# Given data\n", + "kf=0.12 # in Nm/A\n", + "V=48 #in volt\n", + "\n", + "#Calculations\n", + "omega_mo=V/kf#in radian/sec\n", + "No=omega_mo*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\",floor(No) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 3819.0\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Tst=1.0 # in N-m\n", + "Ist=5.0 #in Ampere\n", + "V=28.0 #in volt\n", + "\n", + "#Calculations\n", + "kf=Tst/Ist #in Nm/A\n", + "omega_m=V/kf#in radian/sec\n", + "No=omega_m*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\", No " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 1336.90152197\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Ra=0.8 #in \u03a9\n", + "Vdd=2 #in volt\n", + "V=28 #in volt\n", + "T1=0.3 # in N-m\n", + "Tst=1 # in N-m\n", + "Ist=5 #in Ampere\n", + "\n", + "#Calculations\n", + "#We know : Tst = fi_1*Ist and T1 = IL*fi_2\n", + "#Deviding these two eqn we have\n", + "IL=(T1/Tst)*Ist/0.8 #in Ampere\n", + "Ebo=V #in volt\n", + "NLbyNo=(V-IL*Ra-Vdd)/(0.8*Ebo) # temporary calculation for NL\n", + "No=1337 #in rpm\n", + "NL=NLbyNo*No #in rpm\n", + "print \"Speed of motor in rpm =\",NL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of motor in rpm = 1462.34375\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 page 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "ke=0.12 #in Nm/A\n", + "V=48 #in volt\n", + "Rph=0.15 #in \u03a9\n", + "Vdd=2 #in volt\n", + "\n", + "#Calculations\n", + "omega_mo=V/ke#in radian/sec\n", + "No=omega_mo*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\",No \n", + "\n", + "Ist=(V-Vdd)/(2*Rph) #in Ampere\n", + "Tst=ke*Ist # in N-m\n", + "print \"Starting Torque in N-m =\",Tst \n", + "#Note : answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 3819.71863421\n", + "Starting Torque in N-m = 18.4\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vs=120 #in volt\n", + "V=60 #in volt\n", + "Ra=2.5 #in \u03a9\n", + "T=0.5 # in N-m\n", + "N=6000#in rpm\n", + "\n", + "#Calculations\n", + "\n", + "omega_mo=2*pi*N/60#in radian/sec\n", + "ke=Vs/omega_mo #in Nm/A\n", + "Ia=T/ke #in Ampere\n", + "E=V-Ia*Ra #in Volt\n", + "omega_m=E/ke#in radian/sec\n", + "N=omega_m/(2*pi/60) #in rpm\n", + "print \"Speed in rpm =\",N \n", + "#Note : answer is wrong in the book because calculation is not accurate. ." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm = 2672.75076525\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "lm=6*10**-3 #magnet length in m\n", + "g=2*10**-3 #in m\n", + "Tph=200.0 #turns\n", + "Br=0.3 #in T\n", + "l=50*10**-3 #in m\n", + "n=25*10**-3 #in m\n", + "I=10*10**-3 #in A\n", + "N=200.0 #turns\n", + "mo=4.0*pi*10**-7 #permittivity\n", + "#Calculations\n", + "Am=(2/3)*pi*(n-g-lm/2)*l #in m**2\n", + "Ag=((2/3)*pi*(n-g/2)+2*g)*(l+2*g) #in m**2 \n", + "Cfi=Am/Ag #unitless\n", + "#For normal BLDG motor, HC=606 KA/M\n", + "HC=606 #in KA/M\n", + "Hm=N*I/l #KA/M\n", + "Bm=Br*(1-Hm/HC) #in T\n", + "Mrec=(Br-Bm)*10**-3.0/(4*pi*10**-7*40) \n", + "Pmo=mo*Mrec*Am/lm #in m-Wb/AT\n", + "Pmo=Pmo*10**-3 #in Wb/AT\n", + "Kc=1.05 #given constant\n", + "g_dash=Kc*g #in m\n", + "Rg=g_dash/mo/Am \n", + "Bg=Cfi*Br/(1+Pmo*Rg) #in T\n", + "Torque=2*Tph*Bg*l*n*I #in N-m\n", + "print \"Torque per phase in N-m =\",Torque " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque per phase in N-m = 0.00107194515868\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin, sqrt, pi\n", + "# Given data\n", + "P=16 #no.of poles\n", + "slots=144 #no. of slotes\n", + "conductors=10 #per slot\n", + "fi=0.03 #in mb/pole\n", + "N=375#in rpm\n", + "\n", + "#Calculations\n", + "f=P*N/120 #in Hz\n", + "print f,\"Frequency in Hz = \" \n", + "kc=1 #for full pitcheed coil\n", + "n=slots/P #slots per pole\n", + "Beta=180/n #in degree\n", + "m=n/3 #slots per pole per phase\n", + "kd=sin(3*Beta/2*pi/180)/(m*sin(Beta/2*pi/180)) #Distribution factor\n", + "Z=conductors*slots #total no. of conductors\n", + "Zph=Z/3 # no. of armature per phase conductions\n", + "Tph=Zph/2 #turns/ph\n", + "Eph=4.44*kc*kd*f*fi*Tph #in volts\n", + "print Eph,\"Phase Voltage in volts = \" \n", + "VL=sqrt(3)*Eph #in volt\n", + "print \"Line Voltage in Volts =\",VL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "50.0 Frequency in Hz = \n", + "1534.13645671 Phase Voltage in volts = \n", + "Line Voltage in Volts = 2657.20228876\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 page 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos\n", + "# Given data\n", + "P=4 #no.of poles\n", + "phase=3 #no. of phase\n", + "slots=36 #no. of stator slotes\n", + "turns=20 #turns per coil\n", + "conductors=10 #per slot\n", + "fi_m=1.8 #in m wb\n", + "N=3000#in rpm\n", + "\n", + "#Calculations\n", + "f=P*N/120 #in Hz\n", + "Tph=turns*phase*P #no. of turns per phase\n", + "m=slots/(phase*P) #slots per pole per phase\n", + "n=slots/P #slots per pole\n", + "beta=180/n #in degree\n", + "kd1=sin(3*beta/2*pi/180)/(m*sin(beta/2*pi/180)) #Distribution factor\n", + "alfa=2*beta #in degree(Short Pitched by 2slots)\n", + "kp1=cos(alfa/2*pi/180) #unitless\n", + "ks1=1 #coefficient\n", + "kn1=kd1*kp1*ks1 #winding factor\n", + "Eq=4.44*f*fi_m*10**-3*kn1*Tph #in volts\n", + "print \"Open Circuit Phase emf in Volts =\",Eq " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open Circuit Phase emf in Volts = 172.994004918\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/HimanshuRajput/chapter3.ipynb b/sample_notebooks/HimanshuRajput/chapter3.ipynb new file mode 100755 index 00000000..16142135 --- /dev/null +++ b/sample_notebooks/HimanshuRajput/chapter3.ipynb @@ -0,0 +1,798 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f5ac69af9ae1d841a7df309d87210c9fa6bb22448fba66aee7e2b96f7445f61f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3:THREE PHASE CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.1:pg-286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50.0; #Assigning values to parameters\n", + "Vl=400.0;\n", + "Rph=20.0;\n", + "L=0.5;\n", + "Xl=2*math.pi*f*L;\n", + "Zph=20+1j*157;\n", + "[r,t]=cmath.polar(Zph);\n", + "Vph=Vl/sqrt(3); #Star connection\n", + "Iph=Vph/r;\n", + "Il=Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"The line current for Star connection is Il=\",round(Il,2),\"Amperes\"\n", + "print\"The total power absorbed in Star connection is P=\",round(P,3),\"Watts\"\n", + "Vph=Vl; #Delta connection\n", + "Iph=Vph/r;\n", + "Il=sqrt(3)*Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"The line current for Delta connection is Il=\",round(Il,2),\"Amperes\"\n", + "print\"The total power absorbed in Delta connection is P=\",round(P,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The line current for Star connection is Il= 1.46 Amperes\n", + "The total power absorbed in Star connection is P= 127.75 Watts\n", + "The line current for Delta connection is Il= 4.38 Amperes\n", + "The total power absorbed in Delta connection is P= 383.25 Watts\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.2:pg-288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50 #Assigning values to parameters\n", + "rph=8\n", + "l=0.02\n", + "xl=2*math.pi*f*l\n", + "vl=230\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "zph=8+1j*6.28\n", + "[r,t]=cmath.polar(zph)\n", + "iph=vph/r\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The line current is il=\",round(il,2),\"Amperes\"\n", + "print\"The total Power absorbed is P=\",round(P,2),\"Watts\"\n", + "print\"The reactive volt amperes is q=\",round(q,2),\"VAR\"\n", + "print\"The Volt amperes is s=\",round(s,2),\"Volt Ampere\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The line current is il= 13.06 Amperes\n", + "The total Power absorbed is P= 383.25 Watts\n", + "The reactive volt amperes is q= 3211.69 VAR\n", + "The Volt amperes is s= 5201.33 Volt Ampere\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.3:pg-289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "Vl=230; #Assigning values to parameters\n", + "f=50;\n", + "Rph=15;\n", + "L=0.03;\n", + "Xl=2*math.pi*f*L;\n", + "Zph=15+1j*9.42;\n", + "[r,t]=cmath.polar(Zph)\n", + "Vph=Vl;\n", + "Iph=Vph/r;\n", + "Il=sqrt(3)*Iph;\n", + "P=sqrt(3)*Vl*Il*cos(t);\n", + "print\"Phase current is Iph=\",round(Iph,2),\"Amperes\"\n", + "print\"Line current is Il=\",round(Il,1),\"Amperes\"\n", + "print\"Power absorbed is=\",round(P/1000,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase current is Iph= 12.99 Amperes\n", + "Line current is Il= 22.5 Amperes\n", + "Power absorbed is= 7.59 KW\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.4:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50#assigning values to the parameters\n", + "xc=200\n", + "vph=400\n", + "vl=vph\n", + "zph=14.151-1j*200\n", + "[r,t]=cmath.polar(zph)\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "pwr=vph*iph*cos(t)\n", + "c=1.0/(2*math.pi*f*xc)\n", + "print\"power consumed in each branch of delta is pwr=\",round(pwr,2),\"Watts\"\n", + "print\"capacitive reactance is c=\"\"{:.2e}\".format(c),\"Farads\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power consumed in each branch of delta is pwr= 56.32 Watts\n", + "capacitive reactance is c=1.59e-05 Farads\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.5:pg-290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "l=50 #Assigning values to parameters\n", + "w=800\n", + "c=50\n", + "xl=w*l\n", + "xc=1/(w*c)\n", + "z1=0+1j*40\n", + "z2=50\n", + "z3=0-1j*25\n", + "zph=z1+z2*z3/(z2+z3)\n", + "[r,t]=cmath.polar(zph)\n", + "vl=550\n", + "vph=vl\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "pf=cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The phase current is\",round(iph,2),\"Amperes\"\n", + "print\"The line current is\",round(il,2),\"Amperes\"\n", + "print\"The power drawn is\",round(p/1000,2),\"kw\"\n", + "print\"The power factor is\",round(pf,2)\n", + "print\"The reactive power is\",round(q/1000,2),\"kw\"\n", + "print\"The kva rating of load is\",round(s/1000,2),\"KVA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase current is 24.6 Amperes\n", + "The line current is 42.6 Amperes\n", + "The power drawn is 18.15 kw\n", + "The power factor is 0.45\n", + "The reactive power is 36.3 kw\n", + "The kva rating of load is 40.58 KVA\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.7:pg-294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "p=10000 #Assigning values to parameters\n", + "t=math.acos(0.6)\n", + "vl=440\n", + "vph=vl\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "iph=il/sqrt(3)\n", + "zph=vph/iph\n", + "zph1=20.9-1j*27.87\n", + "res=zph1.real\n", + "xc=zph1.imag\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "print\"The resistance value of circuit element is\",round(res,2),\"ohms\"\n", + "print\"The capacitive value of circuit element is\",round(-xc,2),\"ohms\"\n", + "print\"The reactive volt-ampere\",round(-q/1000,2),\"KVAR\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance value of circuit element is 20.9 ohms\n", + "The capacitive value of circuit element is 27.87 ohms\n", + "The reactive volt-ampere -13.33 KVAR\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.8:pg-295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "f=50 #Assigning values to parameters\n", + "vl=440\n", + "p=1500\n", + "t=math.acos(0.2)\n", + "vph=vl/sqrt(3)\n", + "il=p/(sqrt(3)*vl*p*cos(t))\n", + "iph=il\n", + "zph=vph/iph\n", + "zph1=5.17+1j*25.3\n", + "res=zph1.real\n", + "xl=zph1.imag\n", + "l=xl/(2*math.pi*f)\n", + "print\"The resistive circuit constant is\",round(res,2),\"ohms\"\n", + "print\"The inductive circuit constant is\",round(l,2),\"H\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistive circuit constant is 5.17 ohms\n", + "The inductive circuit constant is 0.08 H\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.9:pg-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "p=100000 #Assigning values to parameters\n", + "il=80\n", + "vl=1100\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "iph=il\n", + "zph=vph/iph\n", + "t=math.acos(p/(sqrt(3)*vl*il))\n", + "zph1=5.21-1j*6\n", + "r=zph1.real\n", + "xc=zph1.imag\n", + "c=1/(2*math.pi*f*xc)\n", + "print\"The resistive circuit constant is\",round(r,2),\"ohms\"\n", + "print\"The capacitive circuit constant is\",round(-xc,2),\"ohms\"\n", + "print\"The capacitance is\",\"{:.2e}\".format(-c),\"farads\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistive circuit constant is 5.21 ohms\n", + "The capacitive circuit constant is 6.0 ohms\n", + "The capacitance is 5.31e-04 farads\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.10:pg-296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Vl=400; #Assigning values to parameters\n", + "Il=34.65;\n", + "P=14.4*10**3;\n", + "Vph=Vl;\n", + "Iph=Il/sqrt(3);\n", + "Zph=Vph/Iph;\n", + "t=math.acos(P/(sqrt(3)*Vl*Il))\n", + "Z=complex(Zph,t);\n", + "a=cmath.rect(Zph,t)\n", + "print\"Impedance\",a,\"ohms\"\n", + "print \"Resistance\",round(a.real),\"ohms\"\n", + "print \"Reactance\",round(a.imag),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impedance (11.9937782275+15.9981840036j) ohms\n", + "Resistance 12.0 ohms\n", + "Reactance 16.0 ohms\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.11:pg-297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "vl=415 #assigning values to the parameters\n", + "r=15\n", + "l=0.1\n", + "c=177*10**-6\n", + "f=50\n", + "vph=vl/sqrt(3)\n", + "xl=2*math.pi*f*l\n", + "xc=1.0/(2*math.pi*f*c)\n", + "a=xl-xc\n", + "zph=r+1j*a\n", + "[r1,t]=cmath.polar(zph)\n", + "iph=vph/r1\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "q=sqrt(3)*vl*il*sin(t)\n", + "s=sqrt(3)*vl*il\n", + "print\"The phase current is\",round(iph,1),\"Amperes\"\n", + "print\"The line current is\",round(il,2),\"Amperes\"\n", + "print\"The power drawn is\",round(p/1000,2),\"KW\"\n", + "print\"The reactive power is\",round(q/1000,2),\"KVAR\"\n", + "print\"The total kVA is\",round(s/1000,2),\"KVA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The phase current is 11.9 Amperes\n", + "The line current is 11.9 Amperes\n", + "The power drawn is 6.37 KW\n", + "The reactive power is 5.71 KVAR\n", + "The total kVA is 8.55 KVA\n" + ] + } + ], + "prompt_number": 102 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.12:pg-299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=400 #assigning values to the parameters\n", + "t=0\n", + "zph=50\n", + "vph=vl/sqrt(3)\n", + "iph=vph/zph\n", + "il=iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "print\"Power taken is\",round(p,2),\"Watts\"\n", + "iph=4\n", + "il=iph\n", + "p=vl*il*cos(t)\n", + "print\"Power taken after disconecting one of the resistor is\",round(p,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power taken is 3200.0 Watts\n", + "Power taken after disconecting one of the resistor is 1600.0 Watts\n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.13:pg-300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=400 #Assigning values to parameters\n", + "vph=vl\n", + "r=40\n", + "t=0\n", + "iph=vph/r\n", + "il=sqrt(3)*iph\n", + "p=sqrt(3)*vl*il*cos(t)\n", + "print\"Power taken is\",round(p,2),\"Watts\"\n", + "i=10\n", + "p=2*i*i*r\n", + "print\"Power taken after diconnecting one resistor is\",round(p,2),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power taken is 12000.0 Watts\n", + "Power taken after diconnecting one resistor is 8000.0 Watts\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.16:pg-310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=500 #Assigning values to parameters\n", + "w2=2500\n", + "p=w1+w2\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,3)\n", + "w2=2500\n", + "w1=-500\n", + "p=w1+w2\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Total Power supplied after reversing the connections to the current coil is\",round(p,2),\"Watts\"\n", + "print\"Power factor after reversing the connections to the current coil is\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 3000.0 Watts\n", + "Power factor is 0.655\n", + "Total Power supplied after reversing the connections to the current coil is 2000.0 Watts\n", + "Power factor after reversing the connections to the current coil is 0.359\n" + ] + } + ], + "prompt_number": 117 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3.17:pg-311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=3000 #Assigning values to parameters\n", + "w2=5000\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Watts\",p,\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,2)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Watts 8000 Total Power supplied is 8000.0 Watts\n", + "Power factor is 0.92\n", + "The line current is 12.58 Amperes\n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.18:pg-311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=-1000 #Assigning values to parameters\n", + "w2=3000\n", + "vl=400\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,3)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 2000.0 Watts\n", + "Power factor is 0.277\n", + "The line current is 10.41 Amperes\n" + ] + } + ], + "prompt_number": 119 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.19:pg-312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=100000 #Assigning values to parameters\n", + "w2=300000\n", + "vl=2000\n", + "n=0.9\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "p=w1+w2\n", + "il=p/(sqrt(3)*vl*cos(t))\n", + "print\"Total Power supplied is\",round(p,2),\"Watts\"\n", + "print\"Power factor is\",round(pf,2)\n", + "print\"The line current is\",round(il,2),\"Amperes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Power supplied is 400000.0 Watts\n", + "Power factor is 0.76\n", + "The line current is 152.75 Amperes\n" + ] + } + ], + "prompt_number": 121 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.20:pg-312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "vl=220 #Assigning values to parameters\n", + "il=38\n", + "n=0.88\n", + "p=11200\n", + "ip=p/n\n", + "t=math.acos(ip/(sqrt(3)*vl*il))\n", + "a=math.degrees(t)\n", + "w2=vl*il*cos(30-a)\n", + "w1=vl*il*cos(30+a)\n", + "print\"The wattmeter reading is w2=\",round(w2,2),\"Watts\"\n", + "print\"The wattmeter reading is w1=\",round(w1,2),\"Watts\"\n", + "# the answer of w2,w1 are wrong in the book\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wattmeter reading is w2= 449.52 Watts\n", + "The wattmeter reading is w1= -2972.66 Watts\n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Ex3.21:pg-313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "w1=1 #Assigning values to parameters\n", + "w2=2*w1\n", + "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n", + "pf=cos(t)\n", + "print\"Power factor is\",round(pf,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power factor is 0.866\n" + ] + } + ], + "prompt_number": 127 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/HirenShah/ch3.ipynb b/sample_notebooks/HirenShah/ch3.ipynb new file mode 100755 index 00000000..cd8562e6 --- /dev/null +++ b/sample_notebooks/HirenShah/ch3.ipynb @@ -0,0 +1,160 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be8f61b53e434158045726efedae14168d3ad7c750cfe29d070385bb73f71e47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Dimensional Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "t= 1. \t#hr\n", + "g1= 32.2 \t#ft/sec**2\n", + "g2= 32.2 \t#lbm ft/lbf\n", + "u= 2.4*10**-5 \t#lbf sec/ft**2\n", + "\t\n", + "#CALCULATIONS\n", + "q2= g*(t*60*60)**2\n", + "go= g*(t*60*60)**2\n", + "q3= g/g2\n", + "u1= u/(t*60*60)\n", + "\t\n", + "#RESULTS\n", + "print ' q2 = %.2e lbm ft/lbf hr**2'%(q2)\n", + "print ' go = %.2e lbm ft/lbf hr**2'%(go)\n", + "print ' go = %.f slug ft/lbf sec**2'%(q3)\n", + "print ' viscosity = %.2e lbf hr/ft**2'%(u1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " q2 = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 1 slug ft/lbf sec**2\n", + " viscosity = 6.67e-09 lbf hr/ft**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "m= 1 \t#lb\n", + "\t\n", + "#CALCULATIONS\n", + "m1= g/m\n", + "\t\n", + "#RESULTS\n", + "print '1 lbf/sec ft**2 = %.1f lbm/ft sec'%(m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 lbf/sec ft**2 = 32.2 lbm/ft sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "n1=1.\n", + "n2= 3.\n", + "n3=2.\n", + "\t\n", + "#CALCULATIONS\n", + "a1= -n1\n", + "a2= -n3\n", + "a3= -n1-a2+3*a1\n", + "b1= -n1\n", + "b2= -n1\n", + "b3= n1+3*b1-b2\n", + "\t\n", + "#RESULTS\n", + "print ' a1 = %.f '%(a1)\n", + "print ' a2 = %.f '%(a2)\n", + "print ' a3 = %.f '%(a3)\n", + "print ' b1 = %.f '%(b1)\n", + "print ' b2 = %.f '%(b2)\n", + "print ' b3 = %.f '%(b3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a1 = -1 \n", + " a2 = -2 \n", + " a3 = -2 \n", + " b1 = -1 \n", + " b2 = -1 \n", + " b3 = -1 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/Hrituraj/chapter6.ipynb b/sample_notebooks/Hrituraj/chapter6.ipynb new file mode 100755 index 00000000..75d57cac --- /dev/null +++ b/sample_notebooks/Hrituraj/chapter6.ipynb @@ -0,0 +1,395 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6, Steam" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1, page 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, cos, sin, atan, sqrt, acos\n", + "\n", + "#initialisation of variables\n", + "c=400.0 #steam speed in m/s\n", + "alpla=12.0 #angle in degrees\n", + "cwo=0\n", + "pi=(22.0/7)\n", + "#CALCULATIONS\n", + "u=c*cos(12*(pi/180))/2\n", + "cwi=c*cos(12*(pi/180))\n", + "cfi=c*sin(12*(180/pi))\n", + "thetha=atan(cfi/(cwi-u))*(pi/180)\n", + "cro=sqrt((cfi)**2+(cwi-u)**2)\n", + "phi=acos(u/cro)*(180/pi)\n", + "wo=(cwi-cwo)*u\n", + "ke=(c)**2/2\n", + "eff=wo/ke\n", + "#RESULTS\n", + "print ' blade efficiency is %2f'%eff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " blade efficiency is 0.956738\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2, page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import asin\n", + "#initialisation of variables\n", + "hd=159 #heat drop in kj/kg\n", + "eff=0.89 #and its corresponding efficiency is mentioned\n", + "ra=0.4 #ratio of blade speed to steam speed\n", + "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n", + "a=20 #angle is 20 degrees\n", + "beff=0.76 #blade efficiency\n", + "cwo=5.4 #m/s\n", + "pi=(22/7)\n", + "bvc=0.82 #blade velocity coefficient\n", + "m=15 #mass is 15 kgs\n", + "#CALCULATIONS\n", + "ci=44.72*sqrt(eff*hd)\n", + "u=ci*ra\n", + "dm=(60*u)/(sp*0.3184)\n", + "cfi=ci*sin(20*(pi/180))\n", + "cwi=ci*cos(20*(pi/180))\n", + "cri=sqrt((cwi-u)**2+(cfi)**2)\n", + "cro=bvc*cri\n", + "x=(beff*(ci)**2)/(2*u) #x=cwi-cwo\n", + "theta=atan((cfi/(cwi-u)))*(180/pi)\n", + "cfo=sqrt((cro)**2-(cwo+u)**2)\n", + "co=sqrt((cwo)**2+(cfo)**2)\n", + "bet=(asin(cfo/co))*(180/pi)\n", + "pd=(m*x*u)/1000\n", + "re=hd-(pd/15)\n", + "phi=asin((cfo/cro))*(180/pi)\n", + "#RESULTS\n", + "print 'mean blade ring diameter is %2fm'%dm #textbook answer is wrong\n", + "print ' \\npower developed is %2fkw'%(pd)\n", + "print ' \\nresidual energy at out let foe friction and nozzle efficiency is %2fkw/kg'%(re )\n", + "print ' \\nblade angles are %2f,%2f,%2f'%(theta,bet,phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean blade ring diameter is 13.366333m\n", + " \n", + "power developed is 1613.115917kw\n", + " \n", + "residual energy at out let foe friction and nozzle efficiency is 51.458939kw/kg\n", + " \n", + "blade angles are 0.000000,92.007507,35.107859\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3, page 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, tan\n", + "#initialisation of variables\n", + "alpha=20 #angle in degrees\n", + "theta=27 #angle in degrees\n", + "m=10 #kgs\n", + "vs=0.4799 #specific volume in m*m*m/kg\n", + "pi=(22/7)\n", + "u=100 #blade speed in m/s\n", + "#CALCULATIONS\n", + "ci=u*tan(27*(pi/180))/(cos(20*(pi/180))*tan(27*(pi/180))-sin(20*(pi/180)))\n", + "x=2*ci*cos(20*(pi/180))-u\n", + "pd=m*x*u\n", + "cf=ci*sin(20*(pi/180))\n", + "a=(m*vs)/cf\n", + "dm=sqrt(a/(0.08*pi))\n", + "h=0.08*dm\n", + "#RESULTS\n", + "print 'power developed is %2f w'%(pd)\n", + "print ' \\narea of flow is %2f m*m'%(a)\n", + "print ' \\nblade height is %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power developed is 600057.358847 w\n", + " \n", + "area of flow is 0.037652 m*m\n", + " \n", + "blade height is 0.030958 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4, page 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "sp=1500 #rotational speed of an impulse turbine wheel in revolutions\n", + "pi=(22/7)\n", + "dm=1.5 #diameter in m\n", + "ra=0.8 #ratio of blade speed to steam speed\n", + "x=159 #x=cwi-cwo in m/s\n", + "m=10 #kgs mass\n", + "cf=50.4 #m*m*m/kg\n", + "vs=1.159 #\n", + "#CALCULATIONS\n", + "u=(pi*dm*sp)/60\n", + "ci=u/ra\n", + "pd=(m*x*u)/1000\n", + "a=(m*vs)/cf\n", + "h=a/(pi*dm)\n", + "#RESULTS\n", + "print 'power developed for steam flow is %2f kw'%(pd)\n", + "print ' \\nheight of the blade is %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power developed for steam flow is 187.392857 kw\n", + " \n", + "height of the blade is 0.048779 m\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5, page 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "u=170 #blade velocity in m/s\n", + "ra=0.2 #ratio of blade speed to steam speed\n", + "cril=696 #m/s\n", + "co1=0.84 #velocity coefficient \n", + "co2=0.87 #velocity coefficient\n", + "co3=0.90 #velocity coefficient\n", + "cri2=232 #m/s\n", + "#CALCULATIONS\n", + "ci=u/ra\n", + "crol=cril*co1\n", + "ci2=crol*co2\n", + "cro2=cri2*co3\n", + "wd=(1176+344)*u*10**-3\n", + "beff=wd*1000*2/(ci**2)\n", + "#RESULTS\n", + "print 'work developed in the blade is %2f kj/kg'%(wd)\n", + "print ' \\nblading efficiency is %2f'%(beff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "work developed in the blade is 258.400000 kj/kg\n", + " \n", + "blading efficiency is 0.715294\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6, page 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "u=250 #blade speed in m/s\n", + "theta=80 #angle in degrees\n", + "alpha=20 #angle in degrees\n", + "oed=786.7 #overall enthalpic drop in kj/kg\n", + "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n", + "p=6000 #power developed in kw\n", + "rf=1.04 #reheat factor\n", + "ie=2993.4 #kj/kg\n", + "vs=9.28 #m*m*m/kg\n", + "pi=(22/7)\n", + "#CALCULATIONS\n", + "ci=(u*sin(100*(pi/180)))/sin(60*(pi/180))\n", + "x=(2*ci*cos(20*(pi/180)))-u #x=cwi-cwo\n", + "wd=x*u*10**-3\n", + "ed=wd*10\n", + "teff=ed/oed\n", + "seff=teff/rf\n", + "m=p/ed\n", + "ae=ie-ed\n", + "cf=ci*sin(20*(pi/180))\n", + "a=(m*vs)/cf\n", + "dm=(60*u)/(pi*sp)\n", + "h=a/(pi*dm)\n", + "#RESULTS\n", + "print 'enthalpy drop is %2f kj/kg'%(ed)\n", + "print ' \\nturbine efficiency is %2f'%(teff)\n", + "print ' \\nstage efficiency is %2f'%(seff)\n", + "print ' \\nmass flow of steam is %2f kg/s'%(m)\n", + "print ' \\nblade height us %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enthalpy drop is 710.164887 kj/kg\n", + " \n", + "turbine efficiency is 0.902714\n", + " \n", + "stage efficiency is 0.867994\n", + " \n", + "mass flow of steam is 8.448742 kg/s\n", + " \n", + "blade height us 0.161268 m\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7, page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "x1=3025 # according to 20 bar pressure and 300 degrees temp\n", + "x2=2262 #according to 20 bar pressure and 300 degrees temp\n", + "x3=2039 #according to 20 bar pressure and 300 degrees temp\n", + "x4=2896 #according to 20 bar pressure and 300 degrees temp\n", + "x5=2817 #according to 20 bar pressure and 300 degrees temp\n", + "x6=2728 #according to 20 bar pressure and 300 degrees temp\n", + "x7=2699 #according to 20 bar pressure and 300 degrees temp\n", + "x8=2592 #according to 20 bar pressure and 300 degrees temp\n", + "x9=2525 #according to 20 bar pressure and 300 degrees temp\n", + "x10=2430 #according to 20 bar pressure and 300 degrees temp\n", + "x11=2398 #according to 20 bar pressure and 300 degrees temp\n", + "x12=2262 #according to 20 bar pressure and 300 degrees temp\n", + "x13=2192 #according to 20 bar pressure and 300 degrees temp\n", + "#CALCULATIONS\n", + "ieff=(x1-x2)/(x1-x3)\n", + "feff=(x1-x4)/(x1-x5)\n", + "seff=(x4-x6)/(x4-x7)\n", + "teff=(x6-x8)/(x6-x9)\n", + "oeff=(x8-x10)/(x8-x11)\n", + "yeff=(x10-x12)/(x10-x13)\n", + "ced=(x1-x5)+(x4-x7)+(x6-x9)+(x8-x11)+(x10-x13)\n", + "rf=ced/(x1-x3)\n", + "#RESULTS\n", + "print 'cumulative enthaloy drop is %.f'%(ced)\n", + "print ' \\nreheat factor is %0.2f'%(rf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cumulative enthaloy drop is 1040\n", + " \n", + "reheat factor is 1.05\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/JaiMathur/ch2.ipynb b/sample_notebooks/JaiMathur/ch2.ipynb new file mode 100755 index 00000000..eab5eede --- /dev/null +++ b/sample_notebooks/JaiMathur/ch2.ipynb @@ -0,0 +1,309 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30849a845cb23e6184901c441ceb4a2e2451d5db6a2c0f60dce1b23531e4d077" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Similarity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 4.\n", + "l1= 4 \t#units long axis\n", + "l2= 10 \t#units long axis\n", + "\t\n", + "#CALCULATIONS\n", + "sxy= (4/r)\n", + "sxy1= l1**2\n", + "sxy2= l2**2\n", + "\t\n", + "#RESULTS\n", + "print 'x**2+4*y**2 = %.f '%(sxy)\n", + "print ' x**2+4*y**2 = %.f '%(sxy1)\n", + "print ' x**2+4*y**2 = %.f '%(sxy2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x**2+4*y**2 = 1 \n", + " x**2+4*y**2 = 16 \n", + " x**2+4*y**2 = 100 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "vo= 10 \t#ft/sec\n", + "a= 0.5 \t#ft**-1\n", + "b= 1 \t#ft\n", + "x= -2 \t#ft\n", + "y= 2 \t#ft\n", + "b1= 2\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "Vx= vo/(a*x**2+b)\n", + "Vy= -2*a*b*vo*x*y/(a*x**2+b)**2\n", + "V= math.sqrt(Vx**2+Vy**2)\n", + "fx= -2*a*b**2*vo**2*x/(a*x**2+b)**3\n", + "fy= 2*a*b**2*vo**2*y*(b-a*x**2)/(a*x**2+b)**4\n", + "f= math.sqrt(fx**2+fy**2)\n", + "r= b1**2/a1\n", + "f1= f*r\n", + "\t\n", + "#RESULTS\n", + "print 'Vx = %.2f ft/sec'%(Vx)\n", + "print ' Vy = %.2f ft/sec'%(Vy)\n", + "print ' V = %.2f ft/sec'%(V)\n", + "print ' fx = %.2f ft/sec**2'%(fx)\n", + "print ' fy = %.2f ft/sec**2'%(fy)\n", + "print ' f = %.2f ft/sec**2'%(f)\n", + "print ' r = %.2f in the present case'%(r)\n", + "print ' f1 = %.2f ft/sec**2'%(f1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vx = 3.33 ft/sec\n", + " Vy = 4.44 ft/sec\n", + " V = 5.56 ft/sec\n", + " fx = 7.41 ft/sec**2\n", + " fy = -2.47 ft/sec**2\n", + " f = 7.81 ft/sec**2\n", + " r = 6.67 in the present case\n", + " f1 = 52.05 ft/sec**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 1./5\n", + "b1= 2 \t#ft\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "r= (a1*b1)**2*r\n", + "\t\n", + "#RESULTS\n", + "print 'ratio of resultant forces acting on coorresponding fluid elements = %.3f '%(r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of resultant forces acting on coorresponding fluid elements = 0.288 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vos= 70. \t#ft/sec\n", + "as1= 78. \t#ft density\n", + "am= 72. \t#ft wind-tunnel\n", + "ls1= 6. \t#ft strut section\n", + "lm= 2. \t#ft length\n", + "um= 386. \t#ft/sec\n", + "us= 372. \t#ft/sec\n", + "dm= 0.4\n", + "\t\n", + "#CALCULATIONS\n", + "vom= vos*as1*ls1*um/(am*lm*us)\n", + "Ds= dm*(am/as1)*(us/um)**2\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.f ft/sec'%(vom)\n", + "print ' Ds = %.3f lbf'%(Ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 236 ft/sec\n", + " Ds = 0.343 lbf\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vom= 236. \t#ft/sec\n", + "as1= 0.072 \t#ft\n", + "am = 62.4 \t#ft density of water\n", + "ls1= 2. \t#ft\n", + "lm= 8. \t#ft\n", + "um= 248. \t#ft/sec viscosity\n", + "us= 3.86 \t#ft/sec\n", + "Pm= 0.4/3.3\n", + "\t\n", + "#CALCULATIONS\n", + "voh= vom*as1*ls1*um/(am*lm*us)\n", + "Ds= Pm*(as1/am)*(um/us)**2*(ls1/lm)*(lm-ls1)\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.2f ft/sec'%(voh)\n", + "print ' Drag force = %.3f lbf'%(Ds)\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 4.37 ft/sec\n", + " Drag force = 0.866 lbf\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "To1= 540. \t#R temperature\n", + "po3= 12.6 \t#lbf/in**2\n", + "l3= 3. \t#ft\n", + "po1= 14.7 \t#lbf/in**2 pressure\n", + "l1= 1. \t#ft\n", + "vo1= 500. \t#ft/sec velocity\n", + "r= 0.83\n", + "P1= 1. \t#lbf/in**2 turbine blade\n", + "\t\n", + "#CALCULATIONS\n", + "To3= To1*(po3*l3/(po1*l1))**r\n", + "Vo3= vo1*math.sqrt(To3/To1)\n", + "P3= P1*po3*l3/(po1*l1)\n", + "\t\n", + "#RESULTS\n", + "print 'To3 = %.f R'%(To3)\n", + "print ' Vo3 = %.f ft/sec'%(Vo3)\n", + "print ' P3 = %.2f lbf/ft'%(P3)\n", + "\n", + "# note : book answers are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To3 = 1183 R\n", + " Vo3 = 740 ft/sec\n", + " P3 = 2.57 lbf/ft\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb b/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb new file mode 100755 index 00000000..7ccc9697 --- /dev/null +++ b/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb @@ -0,0 +1,220 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:58e66a1486b17622aacd34bb93b225c18134442ddc1f2fbedecd0abdd0c9b88e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "A TEXTBOOK OF PHYSICAL CHEMISTRY BY K.I. KAPOOR" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : EQUILIBRIUM BETWEEN PHASES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.1 : PAGE NUMBER 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "T1 = 234.5 # Temperature in K\n", + "P = 1 # Pressure in atm\n", + "rho1 = 14.19 # Density of solid Hg in g/(cm**3)\n", + "rho2 = 13.70 # Density of liquid Hg in g/(cm**3)\n", + "V = 200.59 # volume of liquid and solid in g/mol\n", + "delV = ((V/rho2)-(V/rho1))*(10**-3)# in dm**3/mol\n", + "delTdelP = 0.0051 # K/atm\n", + "R1 = 8.314 # in J\n", + "R2 = 0.082 # in (dm)**3/atm\n", + "delH = ((delV*T1)/(delTdelP))*(R1/R2)*10**-3;#molar heat of fusion in kJ/mol\n", + "print \" delH = \",round(delH,4),\"(KJ)/mol \"\n", + "T2 = 273# in K\n", + "delP = (delH*(R2/R1)*(T2-T1))/(delV*T1)*10**3;#pressure required to raise melting point to T2 in atm\n", + "print \" delP = \",round(delP,4),\"atm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH = 2.3571 (KJ)/mol \n", + " delP = 7549.0196 atm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.2 : PAGE NUMBER 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "T1=373.15;#in K\n", + "P=1;#atm\n", + "Vv=1674;#in cm**3/gm\n", + "delPdelT=27.12;#in torr/K\n", + "R1=8.314;#in J\n", + "R2=0.082;#in atm/(dm)**3\n", + "delH=((delPdelT)/760)*T1*((Vv*10**-3)*18)*(R1/R2)\n", + "print \" delH = \",round(delH,4),\" J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH = 40680.2549 J/mol \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.3 : PAGE NUMBER 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "T1=313.75;#in K\n", + "P1=59.1;#in torr\n", + "T2=353.15;#in K\n", + "P2=298.7;#in torr\n", + "R=2.303*8.314;#in J/(K*mol)\n", + "delH=R*math.log10(P2/P1)*((T2*T1)/(T2-T1))\n", + "print \" delH= \",round(delH,4),\" J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH= 37888.375 J/mol \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.4 : PAGE NUMBER 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "T1=325.15;#in K\n", + "T2=338.15;#in K\n", + "P2=760;#in torr\n", + "DelHm_v=10.5;#\n", + "P1=P2/(10**((DelHm_v/2.303)*((T2/T1)-1)));#in torr\n", + "print \" P1= \",round(P1,4),\"torr \"\n", + "P=200;#in torr\n", + "T=T2/(1+((2.303/10.5)*math.log10(P2/P)));#in K\n", + "print \" T =\",round(T,4),\" K \"\n", + "I=math.log10(P2)-(((DelHm_v*T2)/2.303)*(-1/T2));#\n", + "print \" I = \",round(I,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " P1= 499.4901 torr \n", + " T = 306.1154 K \n", + " I = 7.4401\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.5 : PAGE NUMBER 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "P=760;#in torr\n", + "dP=52;#in torr\n", + "dT=2;#in K\n", + "DelH_RTb=10.5;#Trouton rule\n", + "Tb=(DelH_RTb*P)/(dP/dT)\n", + "print \" Tb = \",round(Tb,4),\" K\"\n", + "R=8.314;#in J/Kmol\n", + "DelH_v=(DelH_RTb*R*Tb)\n", + "print \" DelH_v = \",round(DelH_v,4),\"J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Tb = 306.9231 K\n", + " DelH_v = 26793.4638 J/mol \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/JigneshBhadani/ch5.ipynb b/sample_notebooks/JigneshBhadani/ch5.ipynb new file mode 100644 index 00000000..189e1172 --- /dev/null +++ b/sample_notebooks/JigneshBhadani/ch5.ipynb @@ -0,0 +1,2270 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2a55784eb064c2602de5db3699903ee6b51018dcf324e42007dffa21eb1e0ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : SINGLE PHASE AC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#CALCULATIONS\n", + "I1 = r2p(7,-5);\n", + "print (I1);\n", + "I2 = r2p(-9,6);\n", + "I2[1] = I2[1]+(180);\t\t\t#this belongs to quadrant 2 and hence 180 degrees should be added\n", + "print (I2);\n", + "I3 = r2p(-8,-8);\n", + "I3[1] = I3[1]+(180);\t\t\t#this belongs to quadrant 3 and hence 180 degrees should be added\n", + "print (I3);\n", + "I4 = r2p(6,6);\n", + "print (I4);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 8.60232527 -45. ]\n", + "[ 10.81665383 135. ]\n", + "[ 11.3137085 225. ]\n", + "[ 8.48528137 45. ]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + " \n", + "#CALCULATIONS\n", + "#for subdivision 1\n", + "I1 = p2r(10,60);\n", + "I2 = p2r(8,-45);\n", + "I3 = I1+I2;\n", + "print (I3);\n", + "I4 = r2p(I3[0],I3[1]);\n", + "print (I4)\n", + "#for subdivision 2\n", + "I5 = r2p(5,4);\n", + "I6 = r2p(-4,-6);\n", + "I7 = ones(2)\n", + "I7[0] = (I5[0])*(I6[0]);\n", + "I7[1] = (I5[1]+I6[1]);\n", + "I7[1] = I7[1]-180;\n", + "print (I7);\n", + "#for subdivision 3\n", + "I8 = r2p(-2,-5);\n", + "I9 = r2p(5,7);\n", + "I10 = ones(2)\n", + "I10[0] = I8[0]/I9[0];\n", + "I10[1] = I8[1]-I9[1];\n", + "I10[1] = I10[1]-180\n", + "print (I10);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 10.65685425 3.00339979]\n", + "[ 11.07198956 15.73932193]\n", + "[ 46.17358552 -135. ]\n", + "[ 0.62601269 -161.56505118]\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given i(t) = 5*math.sin(314*t+(2*math.pi/3))&& v(t) = 20*math.sin(314*t+(5*math.pi/6))\n", + "#CALCULATIONS\n", + "P1 = 2*(math.pi/3);\t\t\t#phase angle of current in radians\n", + "P1 = P1*(180/math.pi);\t\t\t#phase angle of current in degrees\n", + "P2 = 5*(math.pi/6);\t\t\t#phase angle of voltage in radians\n", + "P2 = P2*(180/math.pi);\t\t\t#phase angle of voltage in degrees\n", + "P3 = P2-P1;\t\t\t#current lags voltage by P3 degrees\n", + "P4 = P3*math.pi/180;\n", + "pf = math.cos(P4);\t\t\t#lagging pf\n", + "Vm = 20;\t\t\t#peak voltage\n", + "Im = 5;\t\t\t#peak current\n", + "Z = Vm/Im;\t\t\t#impedance in ohms\n", + "R = (Z)*math.cos(P4);\t\t\t#resistance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance \n", + "W = 314;\n", + "L = Xl/W;\t\t\t#inductance in henry\n", + "V = Vm/math.sqrt(2);\t\t\t#average value of voltage\n", + "I = Im/math.sqrt(2);\t\t\t#average value of current\n", + "av = (V*I)*math.cos(P4);\t\t\t#average power in watts\n", + "print \"thus impedance, resistance, inductance, powerfactor and average power are %d ohms, %1.2f ohms, %g H,%1.3f and %2.1f W respectively\"%(Z,R,L,pf,av);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, powerfactor and average power are 4 ohms, 3.46 ohms, 0.00636943 H,0.866 and 43.3 W respectively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.4, Page 161\n", + "\n", + "#INPUT DATA\n", + "I = 10.;\t\t\t#given current in A\n", + "P = 1000.;\t\t\t#power in Watts\n", + "V = 250.;\t\t\t#voltage in volts\n", + "f = 25.;\t\t\t#frequency in Hz\n", + "\n", + "#CALCULATIONS\n", + "R = P/((I)**2);\t\t\t#resistance in ohms\n", + "Z = V/I;\t\t\t#impedance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance in ohms\n", + "L = Xl/(2*math.pi*f);\t\t\t#inductance in Henry\n", + "Pf = R/Z;\t\t\t#power factor,lagging,pf = math.cos(phi)\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, inductance, reactance and powerfactor are %d ohms, %d ohms, %1.3f H, \\\n", + "%2.2f ohms and %1.1f respectively\"%(Z,R,L,Xl,Pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, reactance and powerfactor are 25 ohms, 10 ohms, 0.146 H, 22.91 ohms and 0.4 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.5, Page 162\n", + "\n", + "#INPUT DATA\n", + "V = 250.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Vr = 125.;\t\t\t#voltage across resistance in volts\n", + "Vc = 200.;\t\t\t#voltage across coil in volts\n", + "I = 5.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "R = Vr/I;\t\t\t#resistance in ohms\n", + "Z1 = Vc/I;\t\t\t#impedance of coil in ohms\n", + "#Z1 = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "#solving eqn(1)and eqn(2) we get R1 as follows\n", + "R1 = (((Z)**2-(Z1)**2)-(R)**2)/(2*R);\t\t\t#in ohms\n", + "Xl = math.sqrt((Z1)**2-(R1)**2);\t\t\t#reacmath.tance of coil in ohms\n", + "P = ((I)**2*R1);\t\t\t#power absorbed by the coil in Watts\n", + "Pt = ((I)**2)*(R+R1);\t\t\t#total power in Watts\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, reactance are %d ohms, %d ohms, %2.2f ohms respectively\"%(Z1,R,Xl);\n", + "print \"power absorbed and total power are %3.1f W and %3.1f W respectively\"%(P,Pt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, reactance are 40 ohms, 25 ohms, 39.62 ohms respectively\n", + "power absorbed and total power are 137.5 W and 762.5 W respectively\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.6, Page 163\n", + "\n", + "#INPUT DATA\n", + "V = 240;\t\t\t#supply voltage in volts\n", + "Vl = 171;\t\t\t#voltage across inductor in volts\n", + "I = 3;\t\t\t#current in A\n", + "phi = 37;\t\t\t#power factor laggging in degrees\n", + "#CALCULATIONS\n", + "Zl = Vl/I;\t\t\t#impedance of coil in ohms\n", + "#Zl = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#powerfactor\n", + "Rt = pf*Z;\t\t\t#total resistance in ohms\t\t\t#Rt = (R+R1)\n", + "#substituting Rt value in eqn(2) we find Xl as follows\n", + "Xl = math.sqrt((Z)**2-(Rt)**2);\t\t\t#reacmath.tance of inductor in ohms\n", + "#ubstituting Xl value in eqn(1) we find R1 as follows\n", + "R1 = math.sqrt((Zl)**2-(Xl)**2);\t\t\t#resistance of inductor in ohms\n", + "R = Rt-R1;\t\t\t#resistance of resistor in ohms\n", + "print \"Thus resistance of resistor is %2.2f ohms\"%(R);\n", + "print \"Thus resisimath.tance and reacmath.tance of inductor are %2.2f ohms and %2.2f ohms respectively\"%(R1,Xl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of resistor is 33.38 ohms\n", + "Thus resisimath.tance and reacmath.tance of inductor are 30.51 ohms and 48.15 ohms respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.7, Page 164\n", + "\n", + "#INPUT DATA\n", + "V = 100;\t\t\t#supply voltage in volts\n", + "#for COIL A\n", + "f = 50;\t\t\t#frequency in Hz\n", + "I1 = 8;\t\t\t#current in A\n", + "P1 = 120;\t\t\t#power in Watts\n", + "#for COIL B\n", + "I2 = 10;\t\t\t#current in A\n", + "P2 = 500;\t\t\t#power in Watts\n", + "#CALCULATIONS\n", + "#FOR COIL A\n", + "Z1 = V/I1;\t\t\t#impedance of coil A in ohms\n", + "R1 = P1/(I1)**2;\t\t\t#resistance of coil A in ohms\n", + "X1 = math.sqrt(((Z1)**2-(R1)**2));\t\t\t#reacmath.tance of coil A in ohms\n", + "#FOR COIL B\n", + "Z2 = V/I2;\t\t\t#impedance of coil B in ohms\n", + "R2 = P2/(I2)**2;\t\t\t#resistance of coil B in ohms\n", + "X2 = math.sqrt(((Z2)**2-(R2)**2));\t\t\t#reacmath.tance of coil B in ohms\n", + "#When both COILS A and B are in series\n", + "Rt = R1+R2;\t\t\t#total resistance in ohms\n", + "Xt = X1+X2;\t\t\t#total reacmath.tance in ohms\n", + "Zt = math.sqrt((Rt)**2+(Xt)**2);\t\t\t#total impedance in ohms\n", + "It = V/Zt;\t\t\t#current drawn in A\n", + "P = ((It)**2)*(Rt);\t\t\t#power taken in watts\n", + "print \"Thus current drawn and power taken in watts are %2.2f A and %3.2f W respectively\"%(It,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current drawn and power taken in watts are 4.66 A and 130.12 W respectively\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.8, Page 167\n", + "\n", + "#INPUT DATA\n", + "R = 100;\t\t\t#resistance in ohms\n", + "C = 50*10**-6;\t\t\t#capacitance in F\n", + "V = 200;\t\t\t#voltage in Volts\n", + "f = 50;\t\t\t#frequency in Hz\n", + "#Z = R-(1j)*(Xc)------>impedance\n", + "Xc = 1/(2*math.pi*f*C);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = math.sqrt((R)**2+(Xc)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "pf = R/Z;\t\t\t#power factor ------>math.cos(phi)---->leading\n", + "phi = math.acos(0.844);\t\t\t#phase angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#phase angle in degrees\n", + "Vr = (I)*(R);\t\t\t#voltage across resistor\n", + "Vc = (I)*(Xc);\t\t\t#votage across capacitor\n", + "print \"Thus impedance, current, powerfactor and phaseangle are %3.2f ohms, %1.2f A, %1.3f and %2.2f degrees respectively\"%(Z,I,pf,phi);\n", + "print \"voltage across resistor and capacitor are %d V and %3.2f V respectively\"%(Vr,Vc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance, current, powerfactor and phaseangle are 118.54 ohms, 1.69 A, 0.844 and 32.44 degrees respectively\n", + "voltage across resistor and capacitor are 168 V and 107.41 V respectively\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.9, Page 169\n", + "\n", + "#INPUT DATA\n", + "phi = 40;\t\t\t#phase in degrees\n", + "V = 150;\t\t\t#voltage in Volts\n", + "I = 8;\t\t\t#current in A\n", + "#the applied voltage lags behind the current .That means the current leads the voltage\n", + "#hence pf is leading\n", + "#CALCULATIONS\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#in degrees--->leading\n", + "#hence it is a capacitive circuit\n", + "pa = V*I*pf;\t\t\t#active power in W\n", + "pr = V*I*math.sin(phi*math.pi/180);\t\t\t#reactive power in VAR\n", + "print \"Thus active and reactive power are %3.1f W and %3.1f VAR respectively\"%(pa,pr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus active and reactive power are 919.3 W and 771.3 VAR respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.10, Page 169\n", + "\n", + "#INPUT DATA\n", + "#given v = 141.4*math.sin(314*t)\n", + "P = 700.;\t\t\t#power in Watts\n", + "pf = 0.707;\t\t\t#powerfactor------>leading------>math.cos(phi)\n", + "Vm = 141.4;\t\t\t#maximum value of supply voltage\n", + "#CALCULATIONS\n", + "Vr = Vm/(math.sqrt(2));\t\t\t#rms value of supply voltage\n", + "I = P/(Vr*pf);\t\t\t#current in A\n", + "Z = Vr/I;\t\t\t#impedance in ohms\n", + "R = (Z)*(pf);\t\t\t#resistance in ohms\n", + "phi = math.acos(pf)*180/math.pi;\t\t\t#angle in degrees\n", + "Xc = (Z)*(math.sin(phi));\t\t\t#reacmath.tance in ohms\n", + "C = 1/(3.14*7.13);\t\t\t#capacitance in F\n", + "print \"Thus resistance and capacitance are %1.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 7.14 ohms and 0.0446664 F respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.11, Page 169\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "P = 7000.;\t\t\t#power in Watts\n", + "Vr = 130.;\t\t\t#volatge across resistor in volts\n", + "P = 7000.;\t\t\t#power in Watts\n", + "\n", + "#CALCULATIONS\n", + "R = ((Vr)**2)/P;\t\t\t#resistance in ohms\n", + "I = Vr/R;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "Xc = math.sqrt((Z)**2-(R)**2);\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in F\n", + "pf = R/Z;\t\t\t#power factor------>leading\n", + "phi = math.acos(pf);\t\t\t#angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#angle in degrees\n", + "Vm = V*math.sqrt(2);\t\t\t#maximum value of voltage\n", + "#voltage equation v = Vm*math.sin(2*math.pi*f*t)------>282.84*math.sin(314.16*t)\n", + "#current leads voltage by phi\n", + "#current equation ------>i = 76.155*math.sin(314.16*t+phi)\n", + "print \"Thus current, resistance, p.f, capacitance, impedance are %2.2f A , %1.2f ohms, %2.1f , \\\n", + "%g F and %1.2f ohms respectively\"%(I,R,pf,C,Z);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current, resistance, p.f, capacitance, impedance are 53.85 A , 2.41 ohms, 0.6 , 0.00112771 F and 3.71 ohms respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 50.;\t\t\t#capacitance in uf\n", + "R = 100.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = R-((1j)*Xc);\t\t\t#impedance in ohms\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xc)**2);\n", + "theta = math.atan(Xc/R);\n", + "pf = math.cos(theta);\t\t\t#powerfactor\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*pf;\t\t\t#power in Watts\n", + "print \"Thus current, power factor, power are % 1.2f A ,%1.3f ,%d W respectively\"%(I,pf,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(100-63.6619772368j)\n", + "Thus current, power factor, power are 1.69 A ,0.844 ,284 W respectively\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 0.05;\t\t\t#capacitance in uf\n", + "F = 500;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 1/(2*math.pi*F*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "#at resonance Xl = Xc \n", + "L = (Xl/(2*math.pi*F));\t\t\t#inductance in H\n", + "print \"Thus value of L is %1.2f H\"%(L);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of L is 2.03 H\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V = 200;\t\t\t#voltage in V\n", + "R = 50;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "F = 50;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*F*L;\t\t\t#inductive reacmath.tance\n", + "Z = (R)+((1j)*Xl)\t\t\t#impedance\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#magnitude\n", + "theta = math.atan(Xl/R);\t\t\t#angle in radians\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*math.cos(theta);\t\t\t#power supplied in W\n", + "#here capacitive reacmath.tance equals inductive reacmath.tance\n", + "#hence Xc = Xl\n", + "C = 1/(2*math.pi*F*Xl);\t\t\t#capacitance in uf\n", + "r = (V/I)-(R);\t\t\t#additional resistance to be added in series\n", + "print \"Thus current and power required are % 1.2f A and %2.2f W respectively\"%(I,P);\n", + "print \"Thus additional resistance that neede to be connected in series with R and C to have\\\n", + " same current at unity power factor is %1.1f ohms\"%(r);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(50+157.079632679j)\n", + "Thus current and power required are 1.21 A and 73.60 W respectively\n", + "Thus additional resistance that neede to be connected in series with R and C to have same current at unity power factor is 114.8 ohms\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 9.;\t\t\t#inductance in Henry\n", + "I0 = 1.;\t\t\t#current in A\n", + "f = 75.;\t\t\t#ferquency in Hz\n", + "#at resonance Xl = Xc \n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*f*L;\t\t\t#inductive reacmath.tance\n", + "Xc = Xl;\t\t\t#capacitive reacmath.tance\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus capacitance is %g F\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus capacitance is 5.00352e-07 F\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in Henry\n", + "C = 150.;\t\t\t#capacitor in uf\n", + "V = 200.;\t\t\t#voltage in V\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl-Xc));\t\t\t#impedance in ohms\n", + "z1 = math.sqrt((R)**2+(Xl-Xc)**2);\t\t\t#magnitude of Z\n", + "I = V/z1;\t\t\t#current in A\n", + "pf = R/z1;\t\t\t#power factor----->math.cos(phi)\n", + "#As Xl-Xc is inductive,pf is lagging\n", + "z2 = math.sqrt((R**2)+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "Vl = I*(z2);\t\t\t#voltage across coil in volts\n", + "Vc = I*(Xc);\t\t\t#voltage across capacitor in volts\n", + "print \"Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are %2.2f ohms, \\\n", + "%2.2f ohms, %2.2f ohms, %d A, %1.1f respectively\"%(Xl,Xc,z1,I,pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are 31.42 ohms, 21.22 ohms, 14.28 ohms, 14 A, 0.7 respectively\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 10;\t\t\t#inductance in milliHenry\n", + "C = 5;\t\t\t#capacitor in uf\n", + "phi = 50;\t\t\t#phase in degrees-------->lagging\n", + "f = 500;\t\t\t#frequency in hz\n", + "V = 200;\t\t\t#supply voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "R = (Xc-Xl)/(math.tan(phi*math.pi/180));\t\t\t#resistance in ohms\n", + "Z = math.sqrt((R)**2+(Xc-Xl)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "Vr = (I)*(R);\t\t\t#voltage across resistance\n", + "Vl = (I)*(Xl);\t\t\t#voltage across inductance\n", + "Vc = (I)*(Xc);\t\t\t#voltage across capacitance\n", + "print \"Thus voltages across resistance, inductance, capacitance are %3.2f volts, %3.2f volts, %3.2f volts respectively\"%(Vr,Vl,Vc);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus voltages across resistance, inductance, capacitance are 128.56 volts, 149.26 volts, 302.47 volts respectively\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "#Chapter-5, Example 5.18, Page 176\n", + "\n", + "#INPUT DATA\n", + "L = 5;\t\t\t#inductance in Henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "V = 230;\t\t\t#supply voltage in volts\n", + "R = 2;\t\t\t#resistance in ohms\n", + "V1 = 250;\t\t\t#voltage across coil in V\n", + "\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "I = V1/Z1;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R)**2+(Xl-Xc)**2) and solving for Xc\n", + "Xc = Symbol(\"Xc\");\n", + "p = (Xc**2)-3141.58*(Xc)+378004\n", + "roots2 = solve(p);\n", + "r2 = roots2[1];\n", + "#Xc cannot be greater than Z\n", + "C = 1/(2*math.pi*f*r2);\t\t\t#capacitance in F\n", + "print \"Thus value of C that must be present suct that voltage across coil is 250 volts is %g F respectively\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of C that must be present suct that voltage across coil is 250 volts is 1.05531e-06 F respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.19, Page 178\n", + "\n", + "#v = 350*math.cos(3000*t-20)\n", + "#i = 15*math.cos(3000*t-60)\n", + "#INPUT DATA\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "phi = -40;\t\t\t#phase difference between applied voltage and current\n", + "#Xl>Xc(P.f is lagging)\n", + "w = 3000;\t\t\t#freq in hz\n", + "Vm = 350;\t\t\t#peak voltage in volts\n", + "Im = 15;\t\t\t#peak current in amps\n", + "#CALCULATIONS\n", + "Z = Vm/Im;\t\t\t#total impedance in ohms\n", + "#Xl-Xc = 0.839*R = X\n", + "#Z = math.sqrt((R)**2+(X)**2)\n", + "#Z = 1.305*R\n", + "R = Z/1.305;\t\t\t#resistance in ohms\n", + "X = 0.839*R;\t\t\t#\n", + "#X = Xl-Xc\n", + "Xl = w*L;\t\t\t#reactive inductance in ohms\n", + "Xc = Xl-X;\t\t\t#capacitive reacmath.tance in ohms\n", + "C = 1/(w*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus resistance and capacitance are %2.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 17.62 ohms and 2.24435e-07 F respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "from scipy.optimize import fsolve\n", + "from sympy.solvers import solve\n", + "\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]])#[0];\t\t\t#admittance in mho\n", + "y = abs(Y);\t\t\t#admittance in mho\n", + "print \"admittance is %1.5f mho\"%(y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "admittance is 0.03033 mho\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "#CALCULATIONS\n", + "Z = 10+((1j)*(5));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]]);\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.08-0.04j]]\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 7.+((1j)*5);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = 10.-((1j)*8);\t\t\t#impedance of branch2 in ohms\n", + "V = 230.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Y1 = 1/(Z1);\t\t\t#admittance of branch1 in mho\n", + "Y2 = 1/(Z2);\t\t\t#admittance of branch2 in mho\n", + "Y = Y1+Y2;\t\t\t#admittance of combined circuit\n", + "print (Y);\n", + "g = abs(Y);\t\t\t#conductance in mho;\n", + "B = math.atan(Y.imag/Y.real);\t\t\t#susceptance in mho\n", + "I = V*(Y);\t\t\t#current\n", + "print (I);\t\t\t#total current taken from mains in A\n", + "z = math.atan(I.imag/I.real);\n", + "pf = math.cos(z);\t\t\t#power factor\n", + "print \"thus conductance and susceptance of the circuit is %1.3f mho and %1.3f mho respectively\"%(g,B);\n", + "print \"power factor is %1.3f lagging\"%(pf)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(0.155570204351-0.0187870797627j)\n", + "(35.7811470007-4.32102834542j)\n", + "thus conductance and susceptance of the circuit is 0.157 mho and -0.120 mho respectively\n", + "power factor is 0.993 lagging\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.23, Page 183\n", + "\n", + "#INPUT DATA\n", + "V = 240.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in Hz\n", + "R = 15.;\t\t\t#resisimath.tance in ohms\n", + "I = 22.1;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "G = 1/R;\t\t\t#conductance in mho\n", + "#susceptance of the circuit,B = 1/(Xl) = 0.00318/L\n", + "#admittance of the circuit,(G-jB) = (0.067-j(0.00318/L))\n", + "Y = I/V;\t\t\t#admittance in mho;\n", + "#Y = math.sqrt((0.067)**2+(0.00318/L)**2) = 0.092-----eqn(1)\n", + "#solving eqn(1) for L we have it as\n", + "L = math.sqrt((0.00318)**2/((Y)**2-(G)**2));\t\t\t#inductance in henry\n", + "#when current is 34A\n", + "I1 = 34;\t\t\t#current in A\n", + "Y1 = I1/V;\t\t\t#admittance in mho\n", + "#for Y1 we need to find f \n", + "f1 = math.sqrt((3.183)**2/((Y1)**2-(G)**2));\t\t\t#frequency in hz\n", + "print \"Thus value of frequency when current is 34A is %2.1f Hz\"%(f1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of frequency when current is 34A is 25.5 Hz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page No : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#Chapter-5, Example 5.24, Page 184\n", + "\n", + "#INPUT DATA\n", + "L = 0.05;\t\t\t#inductance in henry\n", + "R2 = 20.;\t\t\t#resistance in ohms\n", + "R1 = 15.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "#for branch 1\n", + "Z1 = (R1)+((1j)*(2*math.pi*f*L));\t\t\t#impedance in ohms\n", + "Y1 = inv([[Z1]]);\t\t\t#admittance in branch\n", + "I1 = V*(Y1);\t\t\t#current in branch\n", + "print (I1);\n", + "i1 = abs(I1);\t\t\t#magnitude of current\n", + "#for branch 2\n", + "Y2 = 1/R2;\t\t\t#admittance in branch\n", + "I2 = V*Y2;\t\t\t#current in branch\n", + "i2 = abs(I2);\t\t\t#magnitude of current\n", + "I = I1+I2;\t\t\t#total current in A\n", + "i = abs(I);\t\t\t#magnitude of total current\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "theta = theta*(180)/(math.pi);\t\t\t#angle in degrees\n", + "print \"Thus current in branch1,branch2 abd total currents are %1.2f A, %d A, %2.2f A respectively\"%(i1,i2,i);\n", + "print \"phase angle of the combination is %2.1f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 6.3594338-6.6595835j]]\n", + "Thus current in branch1,branch2 abd total currents are 9.21 A, 10 A, 17.66 A respectively\n", + "phase angle of the combination is -22.2 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "L = 6.;\t\t\t#inductance in millihenry\n", + "R2 = 50.;\t\t\t#resistance in ohms\n", + "R1 = 40.;\t\t\t#resistance in ohms\n", + "C = 4.;\t\t\t#capacitance in uf\n", + "V = 100.;\t\t\t#voltage in volts\n", + "f = 800.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Y1 = inv([[(R1)+(1j*Xl)]]);\t\t\t#admittance of branch1 in mho\n", + "Y2 = inv([[(R2)-(1j*Xc)]]);\t\t\t#admittance of branch2 in mho\n", + "I1 = V*(Y1);\t\t\t#current in branch 1\n", + "I2 = V*(Y2);\t\t\t#current in branch 2\n", + "I = I1+I2;\t\t\t#total curremt in A\n", + "theta = (math.atan(I1.imag/I1.real))-math.atan(I2.imag/I2.real);\n", + "theta = theta*180/math.pi;\t\t\t#angle in degrees\n", + "print \"Thus total current taken from supply is %2.2f\"%(abs(I));\n", + "print \"phase angle between currents of coil and capacitor is %2.2f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total current taken from supply is 2.61\n", + "phase angle between currents of coil and capacitor is -81.86 degrees\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 10+(1j*15);\t\t\t#impedance in ohms\n", + "Z2 = 6-(1j*8);\t\t\t#impedance in ohms\n", + "I = 15.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "I1 = ((Z2)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "I2 = ((Z1)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "i1 = abs(I1);\t\t\t#magnitude of current 1\n", + "i2 = abs(I2);\t\t\t#magnitdude of current 2\n", + "P1 = ((i1)**2)*(Z1*(1));\t\t\t#power consumed by branch 1\n", + "P2 = ((i2)**2)*(Z2*(1));\t\t\t#power consumed by branch 2\n", + "print \"Thus power consumed by branches 1 and 2 are %3.2f W and %4.1f W respectively\"%(P1.real,P2.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed by branches 1 and 2 are 737.70 W and 1438.5 W respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.27, Page 187\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "R1 = 10.;\t\t\t#resistance in ohms\n", + "L1 = 0.0023;\t\t\t#inductance in henry\n", + "R2 = 5.;\t\t\t#resistance in ohms\n", + "L2 = 0.035;\t\t\t#inductance in henry\n", + "#CALCULATIONS\n", + "Xl1 = (2*math.pi*f*L1);\t\t\t#inductive reacmath.tance in branch 1 in ohm\n", + "Xl2 = (2*math.pi*f*L2);\t\t\t#inductive reacmath.tance in branch 2 in ohm\n", + "Y1 = inv([[10+(1j*7.23)]]);\t\t\t#admittance of branch 1 in mho\n", + "Y2 = inv([[5+(1j*10.99)]]);\t\t\t#admittance of branch 2 in mho\n", + "Y = Y1+Y2;\t\t\t#total admittance in mho\n", + "I1 = V*(Y1);\t\t\t#current through branch1\n", + "I2 = V*(Y2);\t\t\t#current through branch2\n", + "I = I1+I2;\t\t\t#total current in A\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "pf_of_combination = math.cos(theta);\t\t\t#powerfactor---->lagging\n", + "print \"Thus currents in branch1, branch2 and total current are %2.1f A, %2.1f A and %2.2f A respectively\"%(abs(I1),abs(I2),abs(I));\n", + "print \"pf of combination is %1.3f\"%(pf_of_combination);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus currents in branch1, branch2 and total current are 16.2 A, 16.6 A and 31.68 A respectively\n", + "pf of combination is 0.631\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "f = 50.;\t\t\t#freq in hz\n", + "V = 100.;\t\t\t#volatge in V\n", + "L1 = 0.015;\t\t\t#inductance in branch 1 in henry\n", + "L2 = 0.08;\t\t\t#inductance in branch 2 in henry\n", + "R1 = 2.;\t\t\t#resistance of branch 1 in ohms\n", + "x1 = 4.71;\t\t\t#reacmath.tance of branch 1 in ohms\n", + "R2 = 1.;\t\t\t#resistance of branch 2 in ohms\n", + "x2 = 25.13;\t\t\t#reacmath.tance of branch 2 in ohms\n", + "Z1 = (R1)+(1j*x1);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = (R2)+(1j*x2);\t\t\t#impedance of branch1 in ohms\n", + "I1 = V/Z1;\t\t\t#current in branch 1 in A\n", + "print \"current in branch 1 in A\"\n", + "print (I1);\n", + "I2 = V/Z2;\t\t\t#current in branch 2 in A\n", + "print \"current in branch 2 in A\"\n", + "print (I2);\n", + "I3 = I1+I2;\t\t\t#total current in A\n", + "print \"total current in A\"\n", + "print (I3);\n", + "#note:Answer for real part of total current given in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in branch 1 in A\n", + "(7.63822319652-17.9880156278j)\n", + "current in branch 2 in A\n", + "(0.158098542505-3.97301637316j)\n", + "total current in A\n", + "(7.79632173903-21.961032001j)\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 8;\t\t\t#resistance in ohms\n", + "Xc = -(1j)*12;\t\t\t#capacitive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xc]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.125+0.08333333j]]\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 3;\t\t\t#resistance in ohms\n", + "Xl = (1j)*4;\t\t\t#inductive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xl]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.33333333-0.25j]]\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 10.;\t\t\t#inductance in milli henry\n", + "C = 1.;\t\t\t#capacitance in uF\n", + "V = 200.;\t\t\t#applied voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "fr = 1/(2*math.pi*(math.sqrt(L*C*10**-3*10**-6)));\t\t\t#resonant frequency in hz\n", + "I0 = V/(R);\t\t\t#current at resonance in A\n", + "Vr = I0*R;\t\t\t#voltage across resistance in volts\n", + "Xl = 2*math.pi*fr*L*10**-3;\t\t\t#inductance in ohms\n", + "Vl = I0*Xl;\t\t\t#voltage across inductor in volts\n", + "Xc = inv([[2*math.pi*fr*C*10**-6]]);\t\t\t#capacitance in ohms\n", + "Vc = I0*Xc;\t\t\t#voltage across capacitor in volts\n", + "wr = 2*math.pi*fr\t\t\t#angular resonant frewuency in rad/sec\n", + "Q = (wr*L*10**-3)/(R);\t\t\t#quality factor\n", + "Bw = (fr/Q);\t\t\t#bandwidth in hz\n", + "print \"Thus resonant frequency and current are %4.2f hz and %d A respectively\"%(fr,I0);\n", + "print \"voltages across resistance, inductance and capacitance are %d V, %d V and %d V respectively\"%(Vr,Vl,Vc);\n", + "print \"bandwidth and quality factor are %3.2f hz and %d respectively\"%(Bw,Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency and current are 1591.55 hz and 20 A respectively\n", + "voltages across resistance, inductance and capacitance are 200 V, 2000 V and 2000 V respectively\n", + "bandwidth and quality factor are 159.15 hz and 10 respectively\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.32, Page 196\n", + "\n", + "#INPUT DATA\n", + "V = 220.;\t\t\t#applied voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Imax = 0.4;\t\t\t#maximum current in A\n", + "Vc = 330.;\t\t\t#voltage across capacitance in volts\n", + "#at resonance condition I0 = 0.4 A\n", + "I0 = 0.4\t\t\t#current in A\n", + "#CALCULATIONS\n", + "Xc = (Vc)/(I0);\t\t\t#capacitive reacmath.tance in ohms\n", + "C = inv([[2*math.pi*f*Xc]]);\t\t\t#capacitance in F\n", + "#at resonance condition Xc = Xl, hence\n", + "L = Xc/(2*math.pi*f);\t\t\t#inductance in henry\n", + "R = V/(Imax);\t\t\t#resistance in ohms\n", + "print \"Thus resistance, inductance and capacitance are %d ohms, %1.2f H and %g F respectively\"%(R,L,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance, inductance and capacitance are 550 ohms, 2.63 H and 3.8583e-06 F respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R1 = 5;\t\t\t#resistance of branch1 in ohms\n", + "R2 = 2;\t\t\t#resistance of branch2 in ohms\n", + "L = 10;\t\t\t#inductance in mH\n", + "C = 40;\t\t\t#capacitance in uF \n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-9))))*(math.sqrt(((C*10**-6*(R1)**2)-L*10**-3)/((C*10**-6*(R2)**2)-L*10**-3)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %f hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 240.665502 hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 20;\t\t\t#resistance in ohms\n", + "L = 0.2;\t\t\t#inductance in H\n", + "C = 100;\t\t\t#capacitance in uF \n", + "#resistance will be non-inductive only at reosnant frequency\n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))))*(math.sqrt((L-(C*10**-6*(R)**2))/(L)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %2.2f hz\"%(fr);\n", + "Rf = (L)/(C*R*10**-6);\t\t\t#non-inductive resistance\n", + "print \"Thus value of non-inductive resistance is %d ohms\"%(Rf);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 31.83 hz\n", + "Thus value of non-inductive resistance is 100 ohms\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Q = 250;\t\t\t#quality factor\n", + "fr = 1.5*10**6;\t\t\t#resonant freq in hertz\n", + "\n", + "#CALCULATIONS\n", + "Bw = (fr)/(Q);\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#half power freq 1\n", + "hf2 = fr-Bw;\t\t\t#half power freq 2\n", + "print \"Thus bandwidth is %d hz\"%(Bw);\n", + "print \"Thus value of half-power frequencies are %g hz and %g hz\"%(hf1,hf2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus bandwidth is 6000 hz\n", + "Thus value of half-power frequencies are 1.506e+06 hz and 1.494e+06 hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 40*10**-3;\t\t\t#inductance in henry\n", + "C = 0.01*10**-6;\t\t\t#capacitance in uf\n", + "#CALCULATIONS\n", + "fr = 1./(2*math.pi*math.sqrt(L*C));\t\t\t#resonant frequency\n", + "print \"Thus resonant frequency is %d hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 7957 hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.37, Page 198\n", + "\n", + "#INPUT DATA\n", + "V = 120.;\t\t\t#source voltage in volts\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "C = 50.;\t\t\t#capacitance in uF\n", + "\n", + "#CALCULATIONS\n", + "#at Resonance\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))));\t\t\t#resonant frequency in hz\n", + "I0 = V/R;\t\t\t#current at resonance in A\n", + "Vl = (1j)*(I0*L);\t\t\t#voltage developed across inductor in volts\n", + "Vc = (-1j)*(I0*L);\t\t\t#voltage developed across capacitor in volts\n", + "Q = (inv([[R]]))*(math.sqrt(L/(C*10**-6)));\t\t\t#quality factor\n", + "Bw = (fr)/(Q);\t\t\t#Bandwidth in Hz\n", + "#given resonance is to occur at 300 rad/sec,then\n", + "wr = 300;\t\t\t#wr = (2*math.pi*f*r)------->measured in Hz\n", + "#wr = inv(math.sqrt(L*Cn))\n", + "Cr = inv([[L*(wr)**2]]);\t\t\t#capacitance required in uF\n", + "print \"Thus resonant frequency, current, quality factor and bandwidth are %2.1f Hz, \\\n", + "%1.1f A, %d and %2.1f hz respectively\"%(fr,I0,Q,Bw);\n", + "print \"New value of capacitance at 300 rad/sec is %g F\"%(Cr)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency, current, quality factor and bandwidth are 31.8 Hz, 2.4 A, 2 and 15.9 hz respectively\n", + "New value of capacitance at 300 rad/sec is 2.22222e-05 F\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#INPUT DATA\n", + "Q = 45.;\t\t\t#quality factor\n", + "f1 = 600.*10**3;\t\t\t#freq in Hz\n", + "f2 = 1000.*10**3;\t\t\t#freq in Hz\n", + "#given new resistance is 50% greater than former.let us consider two reismath.tances as R1 = 1 ohm and R2 = 1.5 ohm for ease of calculation.Then\n", + "R1 = 1;\t\t\t#resistance in ohm\n", + "R2 = 1.5;\t\t\t#resistance in ohm\n", + "\n", + "#CALCULATIONS\n", + "W1 = 2*math.pi*f1;\t\t\t#angular freq 1 in rad/sec\n", + "W2 = 2*math.pi*f2;\t\t\t#angular freq 2 in rad/sec\n", + "Q = 45;\t\t\t#quality factor\n", + "L = (Q*R1)/(W1);\t\t\t#inductance in henry\n", + "Q1 = (W2*L)/(R2);\t\t\t#new quality factor\n", + "print \"Thus new quality factor is %d\"%(Q1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus new quality factor is 50\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 4.;\t\t\t#resistance in ohm\n", + "L = 100.*10**-6;\t\t\t#inductance in henry\n", + "C = 250.*10**-12;\t\t\t#capacitance in Farads\n", + "\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d, %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "#note:given answers are wrong in textbook.Please check the answers\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 1006584 hz , 158, 1.01295e+06 hz, 1.00022e+06 hz respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohm\n", + "L = 10**-3;\t\t\t#inductance in henry\n", + "C = 1000*10**-12;\t\t\t#capacitance in Farads\n", + "V = 20;\t\t\t#voltage in volts\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d , %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 159154 hz , 100 , 160746 hz, 157563 hz respectively\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 1000.;\t\t\t#power1 in watts\n", + "P2 = 1000.;\t\t\t#power2 in watts\n", + "#CALCULATIONS\n", + "#for case(1)\n", + "Pt = P1+P2;\t\t\t#total power in watts\n", + "phi = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1))*(180/math.pi));\t\t\t#math.since math.tan(phi) = math.sqrt(3)*((P2-P1)/(P2+P1)))\n", + "pf = math.cos(phi);\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt,pf);\n", + "#for case(2)\n", + "P3 = 1000;\t\t\t#power3 in watts\n", + "P4 = -1000;\t\t\t#power4 in watts\n", + "Pt1 = P3+P4;\t\t\t#total power in watts\n", + "pf1 = 0;\t\t\t#math.since we cannot perform division by zero in scilab,it doesn't consider it as infinite quantity to yield 90 degree angle and hence powerfactor 0\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt1,pf1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and powerfactor are 2000 W ,1 respectively\n", + "Thus power and powerfactor are 0 W ,0 respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V1 = 400.;\t\t\t#voltage in volts\n", + "Z1 = (3.+((1j)*4));\t\t\t#impedance in ohms\n", + "#CALCULATIONS\n", + "#in star connected system,phase voltage = (line voltage)\n", + "Ep = V1/(math.sqrt(3));\t\t\t#voltage in volts\n", + "Ip = Ep/Z1;\t\t\t#current in A\n", + "ip1 = abs(Ip);\t\t\t#line current in A\n", + "theta = math.atan(Ip.imag/Ip.real);\n", + "Pt = math.sqrt(3)*V1*ip1*math.cos(theta);\t\t\t#total power consumed in load in W\n", + "print \"Thus total power consumed in load is %f W\"%(Pt);\n", + "#note:for line current the answer given is 46.02A instead of 46.2 A and hence total power consumed changes\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total power consumed in load is 19200.000000 W\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V1 = 400;\t\t\t#voltage in volts\n", + "Il = 10;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "#in star connected system,phase current = (line current) = I1\n", + "phase_voltage = (V1)/(math.sqrt(3));\t\t\t#voltage in Volts\n", + "print \"Thus phase voltage is %1.0f V\"%(phase_voltage);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus phase voltage is 231 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.44, Page 209\n", + "\n", + "#INPUT DATA\n", + "Z1 = (6-((1j)*8));\t\t\t#impedance1 in ohms\n", + "Z2 = (16+((1j)*12));\t\t\t#impedance2 in ohms\n", + "I1 = (12+((1j)*16));\t\t\t#current in A\n", + "#CALCULATIONS\n", + "V = I1*Z1;\t\t\t#applied voltage in volts\n", + "I2 = V/(Z2);\t\t\t#current in other branch in A\n", + "print \"current in other branch in Amps\"\n", + "print (I2);\n", + "I = I1+I2;\t\t\t#total current in A\n", + "print \"total current in Amps\";\n", + "print (I);\n", + "i1 = abs(I);\t\t\t#magnitude in A\n", + "i2 = math.atan(I.imag/I.real);\n", + "P = V*i1*math.cos(i2);\t\t\t#power consumed in circuit\n", + "print \"Thus voltage applied and power consumed are %d V and %d W respectively\"%(V.real,P.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in other branch in Amps\n", + "(8-6j)\n", + "total current in Amps\n", + "(20+10j)\n", + "Thus voltage applied and power consumed are 200 V and 4000 W respectively\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Vl = 415.;\t\t\t#voltage in volts\n", + "Z = (4+((1j)*6));\t\t\t#impedance in each phase in ohm\n", + "#CALCULATIONS\n", + "Ip = Vl/Z;\t\t\t#current in each phase in A\n", + "ip1 = abs(Ip);\t\t\t#magnitude of Ip\n", + "Il = (math.sqrt(3))*(ip1);\t\t\t#line current in A\n", + "phi = math.atan(Ip.imag/Ip.real)\n", + "P = (math.sqrt(3))*Vl*Il*math.cos(phi);\t\t\t#power supplied in W\n", + "print \"Thus power supplied is %d W\"%(P);\n", + "#note:the math.cosfunction of scilab and calculator will differ slightly\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power supplied is 39744 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Vl = 400;\t\t\t#voltage in volts\n", + "Il = 20;\t\t\t#current in A\n", + "f = 50;\t\t\t#freq in hz\n", + "pf = 0.3\t\t\t#power factor\n", + "#CALCULATIONS\n", + "Ip = Il/math.sqrt(3);\t\t\t#phase current in A\n", + "Z = Vl/Ip;\t\t\t#impedance in each phase in ohms\n", + "phi = math.acos(0.3);\t\t\t#angle in radians\n", + "Zb = Z*(math.cos(phi)+(1j)*math.sin(phi));\t\t\t#impedance connected in each phase\n", + "print \"Thus impedance connected in each phase in ohms\";\n", + "print (Zb);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance connected in each phase in ohms\n", + "(10.3923048454+33.0454232837j)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 6*10**3;\t\t\t#power in Kw\n", + "P2 = -1*10**3;\t\t\t#power in Kw\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#total power in Kw\n", + "a = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1)));\n", + "pf = math.cos(a);\t\t\t#power factor\n", + "print \"Thus power and power factor are %d W and %1.2f respectively\"%(P,pf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and power factor are 5000 W and 0.28 respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z = 3-((1j)*4);\t\t\t#impedance in ohms\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#phase voltage in volts\n", + "Ip = Vp/abs(Z);\t\t\t#phase current in Amps\n", + "#line current(Il) = phase current(Ip)\n", + "Il = Ip;\t\t\t#line current in A\n", + "power_factor = math.cos(math.atan(Z.imag/Z.real));\n", + "power_consumed = math.sqrt(3)*Vl*Il*power_factor;\n", + "print \"Thus power consumed and power factor are %f W and %1.1f respectively\"%(power_consumed,power_factor);\n", + "#note:answer computed for power consumed in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed and power factor are 19200.000000 W and 0.6 respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Il = 10.;\t\t\t#current in Amps\n", + "Vl = 400.;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#line to neutral voltage\n", + "Ip = Il;\t\t\t#phase current in Amps\n", + "print \"Thus line to neutral voltage and phase current are %1.0f V and %d A respectively\"%(Vp,Ip);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus line to neutral voltage and phase current are 231 V and 10 A respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.50 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 2000;\t\t\t#power in watts\n", + "P2 = 1000;\t\t\t#power in watts\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#power in Watts\n", + "a = math.sqrt(3*(P1-P2)/(P1+P2));\n", + "b = math.atan(math.sqrt(a));\n", + "power_factor = math.cos(b);\n", + "kVA = P/power_factor;\n", + "print \"Thus power, power factor and kVA are %d W , %1.3f and %1.2f respectively\"%(P,power_factor,kVA);\n", + "#note:computed value for powerfactor and kVA in textbook are wrong.Please check the calculations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power, power factor and kVA are 3000 W , 0.707 and 4242.64 respectively\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb b/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb new file mode 100755 index 00000000..cbbd7757 --- /dev/null +++ b/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb @@ -0,0 +1,236 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 Survey of Units and Dimensions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_1 pgno:10" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force to accelerate = lbf 3.10810936815\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "gc=32.1739 #lbm ft/lbf s**2\n", + "m=10 #lbm\n", + "a=10 #ft/s**2\n", + "#calculations\n", + "F=m*a/gc\n", + "#results\n", + "print\"Force to accelerate = lbf\",F\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_2 pgno:11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force to accelerate = lbf 10.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "gc=32.1739 #lbm ft/lbf s^2\n", + "m=10 #lbm\n", + "a=gc #ft/s^2\n", + "#calculations\n", + "F=m*a/gc\n", + "#results\n", + "print\"Force to accelerate = lbf\",F\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_3 pgno:11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity = mph 60.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "v=88 #ft/s\n", + "#calculations\n", + "v2=v*3600./5280.\n", + "#results\n", + "print\"velocity = mph\",v2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_4 pgno:12" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity = mph 60.0\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "v=88 #ft/s\n", + "#calculations\n", + "v2=v*1./5280*3600\n", + "#results\n", + "print\"velocity = mph\",v2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_5 pgno:13" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force without dimensions = lbm/ft sec 0.0005791302\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "F=5e-9 #lbf/ft^2 hr\n", + "g=32.1739\n", + "#calculations\n", + "F2=F*3600*g\n", + "#results\n", + "print\"Force without dimensions = lbm/ft sec\",F2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_6 pgno:14" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Density of water in this system = lbf/ft^2 1.93650754183\n", + "\n", + " Specific weight = lbf/ft^2 62.305\n" + ] + } + ], + "source": [ + "#Initialization of variables\n", + "rho=62.305 #lbf/ft^2\n", + "g=32.1739 #ft/s^2\n", + "#calculations\n", + "gam=rho/g\n", + "#results\n", + "print\"Density of water in this system = lbf/ft^2\",gam\n", + "print\"\\n Specific weight = lbf/ft^2\",rho\n" + ] + }, + { + "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/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb b/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb new file mode 100755 index 00000000..58372eed --- /dev/null +++ b/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb @@ -0,0 +1,256 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 : FORMULAE" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1 pgno:69" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=8*i-5\n", + "the number is 16\n" + ] + } + ], + "source": [ + " #8 times a number is decreased by 5 the result is 123\n", + "#let x be the number\n", + "\n", + "print'expr=8*i-5'\n", + "x=0;\n", + "for x in range(0,100):\n", + " if((8*x-5)==123):\n", + " print\"the number is \",x\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2 pgno:71" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "expr=(2*n+1)+(2*n+3)+(2*n+5)\n", + "n=%i \n", + "12\n", + "\n", + " the numbers are 199 201 203\n" + ] + } + ], + "source": [ + "#sum of 3 consecutive odd no.'s is 81\n", + "\n", + "#let the 3 consecutive odd numbers be 2n+1,2n+3,2n+5\n", + "\n", + "print\"expr=(2*n+1)+(2*n+3)+(2*n+5)\"\n", + "n=0;\n", + "for n in range(0,100):\n", + " if((2*n+1)+(2*n+3)+(2*n+5)==81):\n", + " print\"n=%i \\n\",n \n", + "\n", + "n1=2*n+1;\n", + "n2=2*n+3;\n", + "n3=2*n+5;\n", + "print\"\\n the numbers are \",n1,n2,n3\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_3 pgno:72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1=(6*x-5)\n", + "p2=(2*x+9)\n", + "p3=p1-p2\n", + "satisfies the equation \n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"p1=(6*x-5)\"\n", + "p1=numpy.array([6, -5])\n", + "print\"p2=(2*x+9)\"\n", + "p2=numpy.array([2, 9])\n", + "print\"p3=p1-p2\"\n", + "p3=p1-p2\n", + "\n", + "x1=numpy.roots(p3)\n", + "left=6*x1-5; #check by substituion \n", + "right=2*x1+9;\n", + "if(left==right):\n", + "\tprint'satisfies the equation '\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4 pgno:73" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x is a polynomial function\n", + "by the law of sighs roots are [ 3.]\n" + ] + } + ], + "source": [ + "print\"x is a polynomial function\"\n", + "import numpy\n", + "p1=numpy.array([3/5+1/2, 0])\n", + "p2=numpy.array([5/4, -3])\n", + "#p1=3*x/5+x/2;\n", + "#p2=5*x/4-3;\n", + "p3=p1-p2;\n", + "x=numpy.roots(p3) #by the law of signs\n", + "print\"by the law of sighs roots are\",x\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_5 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1=4*x-(x-2)/3\n", + "p2=5+(2*x+1)/4\n", + "p3=p1-p2\n", + "satisfies the equation \n" + ] + } + ], + "source": [ + "import numpy\n", + "print\"p1=4*x-(x-2)/3\"\n", + "p1=numpy.array([11/3, 2/3])\n", + "print\"p2=5+(2*x+1)/4\"\n", + "p2=numpy.array([1/2, 21/4])\n", + "print\"p3=p1-p2\"\n", + "p3=p1-p2\n", + "\n", + "x=numpy.roots(p3)\n", + "left=4*x-(x-2)/3; #check by substituion \n", + "right=5+(2*x+1)/4;\n", + "if(left != right):\n", + "\tprint'satisfies the equation '\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/sample_notebooks/LalitKumar/chapter2_1.ipynb b/sample_notebooks/LalitKumar/chapter2_1.ipynb new file mode 100755 index 00000000..855095b5 --- /dev/null +++ b/sample_notebooks/LalitKumar/chapter2_1.ipynb @@ -0,0 +1,339 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a31773c970db99aecfd55acb0ef8a97d14b54e9f5682909d8824d63b10be118" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 : Atomic model & bonding in solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.1, page no-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#given\n", + "#atomic no. of gold\n", + "Z=79\n", + "#kinetic energy of alpha particle\n", + "E=7.68*1.6*(10)**(-13) #J because [1MeV=1.6*(10)**(-13)]\n", + "e=1.6*10**(-19) #C\n", + "E0=8.854*10**(-12) #F/m\n", + "#the distance of closest approach is given by:\n", + "d0=2*e*Z*e/(4*(math.pi)*E0*E) #m\n", + "print \"The closest approach of alpha particle is %.2ef m\" %d0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closest approach of alpha particle is 2.96e-14f m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.2, page no-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from numpy import *\n", + "#given\n", + "#IN THE RUTHERFORD SCATTERING EXPERIMENT\n", + "#the no of particles scattered at\n", + "theta1=(pi)/2 #radians\n", + "#is\n", + "N90=44 #per minute\n", + "#the number of particles scattered particales N is given by\n", + "#N=C*(1/(sin(theta/2))**4) where C is propotionality constant\n", + "#solving above equation for C\n", + "C=N90*(sin(theta1/2))**4 \n", + "# now to find the no of particles scatering at 75 and 135 degrees\n", + "theta2=75*(pi)/180 #radians\n", + "N75=C*(1/(sin(theta2/2))**4) #per minute\n", + "theta3=135*(pi)/180 #radians\n", + "N135=C*(1/(sin(theta3/2))**4) #per minute\n", + "print \"The no of particles scattered at 75 and 135 degrees are %d per minute and %d per minutes\" %(N75,N135)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The no of particles scattered at 75 and 135 degrees are 80 per minute and 15 per minutes\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.3, page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#mass of electron\n", + "m=9.11*10**(-31) #kg\n", + "#charge on an electron\n", + "e=1.6*10**(-19) #C\n", + "#plank's constant\n", + "h=6.62*10**(-34)\n", + "E0=8.85*10**(-12) \n", + "#NO OF ELECTRONS SHELLS IN HYDROZEN ATOm\n", + "n=1\n", + "#atomic number of hydrogen\n", + "Z=1\n", + "#radius of first orbit of hydrogen is given by\n", + "r1=n**2*E0*h**2/((pi)*m*Z*e**2) #m\n", + "print \"The radius of the first orbit of the electron in the hydrogen atom %.2e\"%(r1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of the first orbit of the electron in the hydrogen atom 5.29e-11\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.4, page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#mass of electron\n", + "m=9.11*10**(-31) #kg\n", + "#charge on an electron\n", + "e=1.6*10**(-19) #C\n", + "#plank's constant\n", + "h=6.62*10**(-34)\n", + "E0=8.85*10**(-12) \n", + "#NO OF ELECTRONS SHELLS IN HYDROZEN ATOm\n", + "n=1\n", + "#atomic number of hydrogen\n", + "Z=1\n", + "#ionization potential energy of hydrogen atom is given by\n", + "E=m*Z**2*e**4/(8*(E0)**2*h**2*n**2) #J\n", + "#energy in eV\n", + "EV=E/e #eV\n", + "print \"The ionization potential for hydrogen atom is %0.2f V\" %(EV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization potential for hydrogen atom is 13.59 V\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.6, page no-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#uncertainity in the momentum\n", + "deltap=10**-27 #kg ms**-1\n", + "#according to uncertainity principle\n", + "#deltap* deltax >=h/(2*(pi))\n", + "#we know that \n", + "h=6.626*10**-34 #Js\n", + "#here instead of inequality we are using only equality just for notation otherwise it is greater than equal to as mentioned above\n", + "#now deltax is given by\n", + "deltax=h/(2*(pi)*deltap) #m\n", + "print \"The minimum uncertainity is %.2e m\"%(deltax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainity is 1.05e-07 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.10, page no- 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#ionization potential of hydrogen\n", + "E1=13.6 #eV\n", + "#when \n", + "n=3\n", + "E3=-E1/n**2 #eV\n", + "#when \n", + "n=5\n", + "E5=-E1/n**2 #eV\n", + "print \"Energy of 3rd and 5th orbits are %0.2f eV and %0.2f eV\"%(E3,E5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of 3rd and 5th orbits are -1.51 eV and -0.54 eV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.11, page no-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#dipole moment og HF is\n", + "DM=6.375*10**(-30) #Cm\n", + "#intermolecular distance\n", + "r=0.9178*10**(-10) #m\n", + "#charge on an electron\n", + "e=1.67*10**(-19) #C\n", + "#since the HF posses ionic characters\n", + "#so\n", + "#Hf in fully ionic state has dipole moment as\n", + "DM2=r*e #Cm\n", + "#percentage ionic characters\n", + "percentage=DM/DM2*100 #%\n", + "print \"The percentage ionic character is %0.2f approx.\"%(percentage)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage ionic character is 41.59 approx.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.12, page no-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#elctronegativity of In\n", + "EnIn=1.5\n", + "#elctronegativity of As\n", + "EnAs=2.2\n", + "#elctronegativity of Ga\n", + "EnGa=1.8\n", + "#for InAs\n", + "ionic_charater1=(1-exp((-0.25)*(EnAs-EnIn)**2))*100 #in %\n", + "#for GaAs\n", + "ionic_charater2=(1-exp((-0.25)*(EnAs-EnGa)**2))*100 # in %\n", + "print \"Ionic character in InAs and GaAs are %0.1f %% and %0.1f %%\"%(ionic_charater1,ionic_charater2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ionic character in InAs and GaAs are 11.5 % and 3.9 %\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb new file mode 100644 index 00000000..38d38099 --- /dev/null +++ b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb @@ -0,0 +1,299 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Wave Guides" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Critical wavelength = cm\n", + "15.24\n", + "-Guide wavelength = cm 13.3\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "c=3.*(10**8);\n", + "f=3000.*(10**8);\n", + "lo=c/f;\n", + "l=lo*(10**4);\n", + "m=1.;n=0;a=7.62;\n", + "lc=2*a;\n", + "print\"-Critical wavelength = cm\\n\",lc\n", + "lg=sqrt((l*l*lc*lc)/((lc*lc)-(l*l)));\n", + "print\"-Guide wavelength = cm\",round(lg*10)/10\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency of dominant mode = GHz 5.0\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "a=3;\n", + "lc=2*a;\n", + "Zs=500;n=377;c=3*(10**8);\n", + "lo=sqrt(1-((n/Zs)**2))*lc;\n", + "f=c/lo;\n", + "f1=f/(10**7);\n", + "print\"Frequency of dominant mode = GHz\",round(f1*100)/100\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i)Cutoff wavelegth = cm\n", + "9.0\n", + "(ii)Guide wavelength = cm\n", + "3.59\n", + "(iii)Phase velocity = * 10**8 m/sec\n", + "3.23\n", + " Group velocity = * 10**8 m/sec\n", + "2.79\n", + "(iv)Characteristic impedance = ohm 406.0\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "a=4.5;b=3.;f=9.*(10**9);c=3.0*(10**8);n=377.\n", + "lo=c/f;\n", + "l=lo*(10**2);\n", + "lc=2*a;\n", + "print\"(i)Cutoff wavelegth = cm\\n\",lc\n", + "lg=l /(sqrt(1-((l/lc)**2)));\n", + "print\"(ii)Guide wavelength = cm\\n\",round(lg*100)/100\n", + "Vp=(lg/l)*c*10**-8;\n", + "print\"(iii)Phase velocity = * 10**8 m/sec\\n\",round(Vp*100)/100\n", + "Vg=(l/lg)*c*10**-8;\n", + "print\" Group velocity = * 10**8 m/sec\\n\",round(Vg*100)/100\n", + "Z=n/(sqrt(1-((l/lc)**2)));\n", + "print\"(iv)Characteristic impedance = ohm\",round(Z)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_4 pgno:79" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total attenuation = db 681.88\n", + "The difference in result is due to erroneous value in textbook\n" + ] + } + ], + "source": [ + "a=1.;c=3.*(10**8);f=(10**9);d=25.;\n", + "lc=2*a;\n", + "lo=c/f;\n", + "l=lo/(10**2);\n", + "att=(54.55/lc)*d;\n", + "print\"Total attenuation = db\",round(att*100)/100\n", + "#the difference in result is due to erroneous value in textbook.\n", + "print (\"The difference in result is due to erroneous value in textbook\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_5 pgno:80" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Phase velocity Vp = * 10**8 m/sec\n", + "4.2\n", + "-Group velocity Vg = * 10**8 m/sec\n", + "2.2\n", + "-Phase constant = radians/m 45.0\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "c=3.*(10**8);f=3000.*(10**6);a=.0722;\n", + "lo=c/f;\n", + "lc=2*a;\n", + "lg=lo/(sqrt(1-((lo/lc)**2)));\n", + "Vp=(lg/lo)*c*10**-8;\n", + "print\"-Phase velocity Vp = * 10**8 m/sec\\n\",round(Vp*10)/10\n", + "Vg=(lo/lg)*c*10**-8;\n", + "print\"-Group velocity Vg = * 10**8 m/sec\\n\",round(Vg*10)/10\n", + "b=(2*pi)/lg;\n", + "print\"-Phase constant = radians/m\",round(b)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_6 pgno:81" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i)Cutoff frequency for TE11 = GHz\n", + "3.52\n", + "(ii)Cutoff frequency for TE01 = GHz 4.6\n" + ] + } + ], + "source": [ + "\n", + "d=5.;c=3.*(10**8);\n", + "lo=1.706*d;\n", + "f=c/lo;\n", + "ff=f/(10**7);\n", + "print\"(i)Cutoff frequency for TE11 = GHz\\n\",round(ff*100)/100\n", + "l=1.306*d;\n", + "fc=c/l;\n", + "ffc=fc/(10**7);\n", + "print\"(ii)Cutoff frequency for TE01 = GHz\",round(ffc*10)/10\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_7 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Cutoff wavelength = cm\n", + "8.54\n", + "-Guide wavelength = cm\n", + "4.17\n", + "-Characteristic wave impedance = ohm 419.7\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "c=3.*(10**8);f=8.*(10**9);r=2.5;h=1.84;n=377.;\n", + "l=c/f;\n", + "lo=l*(10**2);\n", + "lc=2*pi*r/h;\n", + "print\"-Cutoff wavelength = cm\\n\",round(lc*100)/100\n", + "lp=lo/(sqrt(1-((lo/lc)**2)));\n", + "print\"-Guide wavelength = cm\\n\",round(lp*100)/100\n", + "Zo=n/(sqrt(1-((lo/lc)**2)));\n", + "print\"-Characteristic wave impedance = ohm\",round(Zo*10)/10\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/sample_notebooks/MaulikRathod/ch11.ipynb b/sample_notebooks/MaulikRathod/ch11.ipynb new file mode 100755 index 00000000..3b3ec8a7 --- /dev/null +++ b/sample_notebooks/MaulikRathod/ch11.ipynb @@ -0,0 +1,745 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1e32f78d016d65eaf62d619ce157e62f2d402e55bfc70a9a046c3e8d919d007" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Pumping Machinery" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "\n", + "import math \n", + "h= 75. \t#ft\n", + "e= 0.75\n", + "k= 0.01\n", + "Q= 3000. \t#gal/min\n", + "k1= 1.2\n", + "N= 1500.\n", + "g= 32.2 \t#ft/sec**2\n", + "D= 0.836 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "W= h/e\n", + "v1= math.sqrt((W-h)/k)\n", + "Q1= Q/374.06\n", + "f1= Q1/(k1*D**2)\n", + "u1= math.pi*D*N/60\n", + "w1= W*g/u1\n", + "B= math.degrees(math.atan((f1/(u1-w1))))\n", + "\n", + "#RESULTS\n", + "print 'Diameter of impeller = %.3f ft '%(D)\n", + "print ' Blade angle at outlet edge of impeller = %.f degrees '%(B)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of impeller = 0.836 ft \n", + " Blade angle at outlet edge of impeller = 30 degrees \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 150. \t#ft**3/sec\n", + "A1= 750. \t#r.p.m\n", + "di= 21. \t#in\n", + "do= 30. \t#in\n", + "v= 50. \t#ft/sec\n", + "A= 70. \t#degrees\n", + "w= 4.\t#in\n", + "p= 30. \t#per cent\n", + "p1= 25. \t#per cent\n", + "sv= 12.8 \t#ft**3/lb\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "u= A1*2*math.pi*di/(24*60)\n", + "u1= A1*2*math.pi*do/(24*60)\n", + "f1= V/(math.pi*(do/12)*(1./3))\n", + "w1= u1-f1*1/math.tan(math.radians((A)))\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "P= (u1**2+v**2-(f1**2/(math.sin(math.radians(A)))**2))/(2*g)\n", + "h= 30*v1**2/(100*2*g)\n", + "Nh= v1**2/(20*2*g)\n", + "Prt= P+Nh\n", + "W= u1*w1/g\n", + "e= Prt*100/W\n", + "Power= Prt*V/(sv*550)\n", + "\n", + "#RESULTS\n", + "print 'Total pressure rise = %.1f ft of air'%(Prt)\n", + "print ' manometric efficiency = %.1f percent'%(e)\n", + "print ' Power = %.2f hp '%(Power)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure rise = 137.9 ft of air\n", + " manometric efficiency = 58.5 percent\n", + " Power = 2.94 hp \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u1= 90. \t#ft/sec\n", + "w1= 70. \t#ft\n", + "e= 0.8\n", + "h1= 10. \t#ft\n", + "h2= 16. \t#ft\n", + "h3= 5. \t#ft\n", + "k= 2./5\n", + "f1= 20. \t#ft/sec\n", + "f= 18. \t#ft/sec\n", + "a= 45. \t #degrees\n", + "x1= 164.4 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Hm= u1*w1/g\n", + "Hm1= e*Hm\n", + "lh= Hm-Hm1-h1-h2-h3\n", + "vg= k*math.sqrt(f1**2+w1**2)\n", + "pr= ((f**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g))-h2\n", + "pr1= x1-pr\n", + "ge= pr1*g*2*100/(vg/k)**2\n", + "\n", + "#RESULTS\n", + "print 'manometer Head = %.1f ft '%(Hm1)\n", + "print ' outlet velocity from guides = %.1f ft/sec '%(vg)\n", + "print ' Pressure rise through impeller only = %.1f ft '%(pr)\n", + "print ' Guide balde efficiency = %.f per cent '%(ge)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "manometer Head = 156.5 ft \n", + " outlet velocity from guides = 29.1 ft/sec \n", + " Pressure rise through impeller only = 102.4 ft \n", + " Guide balde efficiency = 75 per cent \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D1= 7.5 \t#in\n", + "Q1= 850. \t#gal/min\n", + "p1= 62.4 \t#lb/ft**3\n", + "N1= 1800.\n", + "D2= 15. \t#in\n", + "Q2= 12000. \t#gal/min\n", + "p2= 64. \t#lb/ft**3\n", + "N1= 1800. \t#r.p.m \n", + "H1= 14. \t#lb/ft**2\n", + "\n", + "#CALCULATIONS\n", + "N2= Q2*N1*(D1)**3/(Q1*D2**3)\n", + "P1= p1*H1/144\n", + "P2= P1*N2**2*D2**2*p2/(N1**2*p1*D1**2)\n", + "\n", + "#RESULTS\n", + "print 'N2 = %.f r.p.m '%(N2+4)\n", + "print ' P2 = %.f lb/in**2 '%(P2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2 = 3180 r.p.m \n", + " P2 = 78 lb/in**2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "r= 5.\n", + "\n", + "#CALCULATIONS\n", + "sr= r**2\n", + "sr1= r**2/r\n", + "\n", + "#RESULTS\n", + "print 'Corresponding ratio = %.f '%(sr)\n", + "print ' Corresponding ratio = %.f '%(sr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corresponding ratio = 25 \n", + " Corresponding ratio = 5 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "e= 0.88\n", + "w= 1.25 \t#in\n", + "d= 10. \t#in\n", + "q= 630. \t#gal/min\n", + "a= 40. \t#degrees\n", + "g= 32.2 \t#ft/sec**2\n", + "e1= 0.83\n", + "\n", + "#CALCULATIONS\n", + "Q= q/(6.24*60)\n", + "f1= Q/(e*math.pi*(d/12)*(w/12))\n", + "u1= 1000*(w*4/12)*2*math.pi/60\n", + "w1= u1-f1*1/math.tan(math.radians(a))\n", + "W= u1*w1/g\n", + "lr= (f1**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g)\n", + "mh= e1*W\n", + "p= mh-lr\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "ke= v1**2/(2*g)\n", + "pke= p*100/ke\n", + "me= 100*lr/W\n", + "\n", + "#RESULTS\n", + "print 'Velocity of flow = %.f ft/sec'%(f1)\n", + "print ' Work done = %.1f ft-lb/lb'%(W)\n", + "print ' manometric efficiency = %.1f ft'%(mh)\n", + "print ' Pressure recovered = %.1f ft head'%(p)\n", + "print ' Kinetic energy discharge = %.f ft-lb/lb'%(ke)\n", + "print ' Percentage of kinetic energy recovered = %.1f per cent'%(pke)\n", + "print ' manometric efficiency = %d percent'%(me)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow = 7 ft/sec\n", + " Work done = 47.8 ft-lb/lb\n", + " manometric efficiency = 39.7 ft\n", + " Pressure recovered = 11.2 ft head\n", + " Kinetic energy discharge = 20 ft-lb/lb\n", + " Percentage of kinetic energy recovered = 55.7 per cent\n", + " manometric efficiency = 59 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 7640. \t#gal/min\n", + "W2= 11400. \t#gal/min\n", + "Hm= 63. \t#ft\n", + "Hm1= 80. \t#ft\n", + "ep1= 72. \t#per cent\n", + "ep2= 76. \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "whp1= W1*Hm/(60*550)\n", + "whp2= W2*Hm1/(60*550)\n", + "bhp1= whp1*100/ep1\n", + "bhp2= whp2*100/ep2\n", + "w1= W2/10\n", + "\n", + "#RESULTS\n", + "print 'For both pumps discharge = %.f gal/min against an 80-ft head'%(W2)\n", + "print ' delivery from one pump = %.1f h.p '%(bhp1)\n", + "print ' delivery from two pumps = %.1f h.p '%(bhp2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For both pumps discharge = 11400 gal/min against an 80-ft head\n", + " delivery from one pump = 20.3 h.p \n", + " delivery from two pumps = 36.4 h.p \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 94. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "e= 0.58\n", + "p= 73.5 \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "WHP= h*e*w/550\n", + "BHP= WHP/(p/100)\n", + "\n", + "#RESULTS\n", + "print 'W.H.P= %.2f h.p'%(WHP)\n", + "print ' Brake horse power= %.1f'%(BHP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W.H.P= 6.19 h.p\n", + " Brake horse power= 8.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sl= 12. \t#ft\n", + "l= 20. \t#ft\n", + "d= 4. \t#in\n", + "dp= 6. \t#in\n", + "lst= 18. \t#in\n", + "k= 0.025\n", + "H= 32. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "pf= 6. \t#ft\n", + "a= 33.83 \n", + "a1= 9.53\n", + "\n", + "#CALCULATIONS\n", + "A= math.sqrt((H-sl-d)*g/a)*a1\n", + "Q= 2*math.pi*(dp/12)**2*lst/(12*4*60)\n", + "v= Q/(math.pi*(d/12)**2/4)\n", + "kh= v**2/(2*g)\n", + "fh= k*l*v**2*12/(2*g*d)\n", + "N= math.sqrt((H-sl-pf)/(kh+fh))\n", + "\n", + "#RESULTS\n", + "print 'premissible speed = %.1f r.p.m'%(A)\n", + "print ' maximum premissible speed = %.1f r.p.m'%(N)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "premissible speed = 37.2 r.p.m\n", + " maximum premissible speed = 168.8 r.p.m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 6. \t#in\n", + "s= 12. \t #in\n", + "d= 4. \t #in\n", + "a1= 30. \t#degrees\n", + "a2= 90. \t#degrees\n", + "a3= 120. \t#degrees\n", + "N= 120. \t#r.p.m\n", + "n= 4.\n", + "#calculations\n", + "A= 2*math.pi*N/60\n", + "V= math.pi*(b/12)**2*n/4\n", + "v= (b/12)**2*A*(b/12)/(d/12)**2\n", + "Q1= v*math.pi*(d/12)**2*math.sin(math.radians(a1))/4\n", + "Q2= v*math.pi*(d/12)**2*math.sin(math.radians(a2))/4\n", + "Q3= v*math.pi*(d/12)**2*math.sin(math.radians(a3))/4\n", + "Q4= V-Q1\n", + "Q5= Q2-V\n", + "Q6= Q3-V\n", + "a4= math.degrees(math.asin(V/(v*math.pi*(d/12)**2)))+a1\n", + "A= 180-a4\n", + "\n", + "#RESULTS\n", + "print 'rate of flow at a1 = %.3f cuses'%(Q4)\n", + "print ' rate of flow at a2 = %.3f cuses'%(Q5)\n", + "print ' rate of flow at a3 = %.3f cuses'%(Q6)\n", + "print ' crak angle = %.1f degrees'%(a4)\n", + "print ' crak angle = %.1f degrees'%(A)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate of flow at a1 = 0.169 cuses\n", + " rate of flow at a2 = 0.448 cuses\n", + " rate of flow at a3 = 0.283 cuses\n", + " crak angle = 39.2 degrees\n", + " crak angle = 140.8 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 2. \t#strokes/sec\n", + "dp= 6. \t#in\n", + "ds= 18. \t#in\n", + "ds1=4. \t#in\n", + "l= 20. \t#ft\n", + "l1= 20. \t#ft\n", + "f= 0.008\n", + "la= 5. \t#ft\n", + "A= 60. \t#r.p.m\n", + "f= 0.008\n", + "w= 62.4 \t#lb/ft**3\n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "V= math.pi*(ds/12)*n*(dp/12)**2/4\n", + "vmp= 2*math.pi*A*(ds/24)/60\n", + "vmp1= vmp*(dp**2/ds1**2)\n", + "hfmax= 4*f*(l-la)*vmp1**2/(2*g*ds1/12)\n", + "H1= round(2*hfmax/3,1)\n", + "H2= H1*13\n", + "Wls= (H1+H2)*w*math.pi/16*1.5*2\n", + "mv= V/(math.pi*(ds1/12)**2/4)\n", + "lh= round(4*f*(l-la)*mv**2/(2*g*(ds1/12)),2)\n", + "lhf= 12*lh\n", + "Wls1= (lh+13.21)*w*math.pi*1.5/16 *2 \n", + "WS= Wls-Wls1\n", + "\n", + "#RESULTS\n", + "print 'Work lost per second= %.f ft lb/sec'%(Wls)\n", + "print ' Work saved per second = %.f ft-lb/sec'%(WS)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work lost per second= 875 ft lb/sec\n", + " Work saved per second = 352 ft-lb/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 7.5 \t#in\n", + "s= 15. \t#in\n", + "l= 36. \t#ft\n", + "h1= 34. \t#ft\n", + "h2= 12. \t#ft\n", + "L= 10. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.008\n", + "l1= 20. \t#ft\n", + "d1= 4. \t#in\n", + "h3= 110. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "l2= 180. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Q= (math.pi/4)*(d)**2*(s/12)*2*(l/60)/144\n", + "v= Q/((math.pi/4)*(d1/12)**2)\n", + "a= (d/4)**2*(d/12)*(l*2*math.pi/60)**2\n", + "H= h1-h2-(L*a/g)-(v**2*0.5/g)-(4*f*l1*v**2/(2*g*(d1/12)))\n", + "H1= h1+h3+(L*a/g)+(v**2*0.5/g)+(4*f*l2*v**2/(2*g*(d1/12)))\n", + "dh= (H1-H)*w/144\n", + "NP= dh*(math.pi/4)*d**2\n", + "\n", + "#RESULTS\n", + "print 'Head at piston = %.2f ft of water absolute'%(H)\n", + "print ' Head at piston = %.2f ft of water absolute'%(H1)\n", + "print ' Difference on head of piston = %.f lb/in**2'%(dh)\n", + "print ' Net load on piston = %.f lb'%(NP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head at piston = 11.04 ft of water absolute\n", + " Head at piston = 161.59 ft of water absolute\n", + " Difference on head of piston = 65 lb/in**2\n", + " Net load on piston = 2882 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "f= 0.009\n", + "dc= 3.5 \t#in\n", + "ds= 6. \t#in\n", + "r= 0.25\n", + "sl= 8. \t#ft\n", + "d= 2.5 \t#in\n", + "l= 14. \t#ft\n", + "el= 8. \t#ft\n", + "ed= 22.5 \t#in\n", + "ph= 4. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.009\n", + "\n", + "#CALCULATIONS\n", + "BC= el+l\n", + "v= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*9.55\n", + "vec=roots([2,1/r,-1])\n", + "H1= 77\n", + "MV= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*r*(math.sin(math.radians(H1))+(math.sin(math.radians(2*H1))/8))\n", + "mvp= MV*dc**2/d**2\n", + "hf= 4*f*(sl+l)*mvp**2/(2*g*(d/12))\n", + "\n", + "#RESULTS\n", + "print 'pump speed = %.1f r.p.m'%(v)\n", + "print ' Friction head = %.3f ft'%(hf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pump speed = 86.8 r.p.m\n", + " Friction head = 1.240 ft\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/MaulikRathod/ch11_1.ipynb b/sample_notebooks/MaulikRathod/ch11_1.ipynb new file mode 100755 index 00000000..f4d8bc9d --- /dev/null +++ b/sample_notebooks/MaulikRathod/ch11_1.ipynb @@ -0,0 +1,573 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:af2e84ceb74c3bc3148f31759e2a692dba979671e7232787c666481af8571437" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : SPILLWAYS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 pg : 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h = 1.2; \t\t\t\t#head of water\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "rho = 1; \t\t\t\t#density of water\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "\n", + "q = Cd*h**1.5;\n", + "\n", + "#applying bernaulli's equation at u/s water surface at section A and B\n", + "#solving it by error and trial method we get\n", + "v1 = 13.7;v2 = 14.7;\n", + "d1 = 0.212;d2 = 0.197;\n", + "\n", + "F1 = gamma_w*d1**2*math.cos(math.radians(60))/2;\n", + "F2 = gamma_w*d2**2/2;\n", + "W = gamma_w*60*2*math.pi*3*((d1+d2)/2)/360;\n", + "Fx = rho*q*(v2-v1*math.cos(math.radians(60)))-F1/2+F2;\n", + "Fy = rho*q*(v1*math.sin(math.radians(60)))+F1*math.sin(math.radians(60))+W;\n", + "F = (Fx**2+Fy**2)**0.5;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Resultant force = %.2f kN/m.\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force = 46.68 kN/m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 pg : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "C = 2.4; \t\t\t\t#coefficient of discharge\n", + "H = 2; \t\t\t\t#head\n", + "L = 100; \t\t\t\t#length of spillway\n", + "wc = 8; \t\t\t\t#heigth of weir crest above bottom\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "h = H+wc;\n", + "Q1 = C*L*H**(1.5); \t\t\t\t#neglecting approach velocity and end contractions\n", + "va = Q1/(h*L);\n", + "ha = va**2/(2*g);\n", + "Ha = ha+H;\n", + "Q = C*L*Ha**1.5;\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \"discharge over oggy weir = %.2f cumecs.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge over oggy weir = 690.80 cumecs.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#capacity of siphon\n", + "#head required in oggy spillway\n", + "#length of oggy weir required\n", + "\n", + "#Given\n", + "t = 6; \t\t\t\t#tail water elevation\n", + "h = 1; \t\t\t\t#heigth of siphon spillway\n", + "w = 4; \t\t\t\t#width of siphon spillway\n", + "hw = 1.5; \t\t\t\t#head water elevation\n", + "C = 0.6; \t\t\t\t#coefficient of discharge\n", + "Co = 2.25; \t\t\t\t#coefficient of discharge of oggy spillway\n", + "lo = 4; \t\t\t\t#length of oggy spillway\n", + "hc = 1.5; \t\t\t\t#head on weir crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations and Results\n", + "#part (a)\n", + "Q = C*h*w*(2*g*(t+hw))**0.5;\n", + "Q = round(Q*10)/10;\n", + "print \"capacity of siphon = %.2f cumecs.\"%(Q);\n", + "\n", + "#part (b)\n", + "h1 = (Q/(Co*lo))**(2./3);\n", + "h1 = round(h1*100)/100;\n", + "print \"head required in oggy spillway = %.2f m\"%(h1);\n", + "\n", + "#part (c)\n", + "L = Q/(Co*(hc)**1.5);\n", + "L = round(L*100)/100;\n", + "print \"length of oggy weir required = %.2f m.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacity of siphon = 29.10 cumecs.\n", + "head required in oggy spillway = 2.19 m\n", + "length of oggy weir required = 7.04 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "rl = 435; \t\t\t\t#full reservior level\n", + "cl = 429.6; \t\t\t\t#level of centre of siphon\n", + "hfl = 435.85; \t\t\t\t#high flood level\n", + "hfd = 600; \t\t\t\t#high flood discharge\n", + "w = 4; \t\t\t\t#width of throat\n", + "h = 2; \t\t\t\t#heigth of throat\n", + "C = 0.65; \t\t\t\t#coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = hfl-cl;\n", + "Q = C*w*h*(2*g*H)**0.5;\n", + "n = hfd/Q;\n", + "n = round(n*100)/100;\n", + "\n", + "# Results\n", + "print \" number of siphons units required = %.2f.hence provide 11 siphons units.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " number of siphons units required = 10.42.hence provide 11 siphons units.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 pg : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange,zeros\n", + "\n", + "#design oggy spillway for concrete gravity dam\n", + "\n", + "#Given\n", + "rbl = 250; \t\t\t\t#avarage river bed level\n", + "rlc = 350; \t\t\t\t#R.L of spillway crest\n", + "s = 0.75; \t\t\t\t#slope on downstream side\n", + "Q = 6500; \t\t\t\t#discharge\n", + "L = 5*9; \t\t\t\t#length of spillway\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "t = 2; \t\t\t\t#thickness of each pier\n", + "\n", + "#step 1. computation of design head\n", + "H = (Q/(Cd*L))**(2./3);\n", + "P = rlc-rbl;\n", + "\n", + "#P/H = 6.15,which is<1.33;it is a high overflow spillway\n", + "\n", + "#H+P/H = 7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n", + "\n", + "Kp = 0.01;\n", + "Ka = 0.1;\n", + "N = 4;\n", + "He = 17.5; \t\t\t\t#assumed\n", + "Le = L-2*(N*Kp+Ka)*He;\n", + "He1 = (Q/(Cd*Le))**(2./3);\n", + "He1 = round(He1*100)/100;\n", + "#He1 is almost equal to He\n", + "print \"crest profile will be designed for Hd = %.2f m.\"%(He1);\n", + "\n", + "#step 2. determination of d/s profile\n", + "\n", + "#equating the slope of d/s side and derivative of profile equation suggested by WES\n", + "x = 27.03;\n", + "y = 0.04372*x**1.85;\n", + "print \"downstream profile:\";\n", + "x = arange(1,27)\n", + "y = zeros(26)\n", + "for i in range(26):\n", + " y[i] = 0.04372*x[i]**1.85;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(26):\n", + " print \"%i %.2f\"%(x[i],y[i]);\n", + "\n", + "print \"27.03 19.48\";\n", + "#step 3. determination of u/s profile\n", + "# math.cosidering equation for vertical u/s face and Hd = 17.58\n", + "\n", + "print \"upstream profile:\";\n", + "x = [-0.5, -0.1, -1.5, -2.0, -3.0, -4.0, -4.75];\n", + "y = zeros(7)\n", + "for i in range(7):\n", + " if i==6:\n", + " y[i] = 0.0633*(x[i]+4.75)**1.85+2.2151-1.2643*(x[i]+4.75)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + " continue\n", + " \n", + " y[i] = 0.0633*(x[i]+4.7466)**1.85+2.2151-1.2643*(x[i]+4.7466)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(7):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "\n", + "\n", + "#step 4.design of d/s bucket\n", + "\n", + "R = P/4;\n", + "print \"radius of bucket = %i m.\"%(R);\n", + "print \"bucket will subtend angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest profile will be designed for Hd = 17.58 m.\n", + "downstream profile:\n", + "x y\n", + "1 0.04\n", + "2 0.16\n", + "3 0.33\n", + "4 0.57\n", + "5 0.86\n", + "6 1.20\n", + "7 1.60\n", + "8 2.05\n", + "9 2.55\n", + "10 3.10\n", + "11 3.69\n", + "12 4.34\n", + "13 5.03\n", + "14 5.77\n", + "15 6.55\n", + "16 7.38\n", + "17 8.26\n", + "18 9.18\n", + "19 10.15\n", + "20 11.16\n", + "21 12.21\n", + "22 13.31\n", + "23 14.45\n", + "24 15.63\n", + "25 16.86\n", + "26 18.13\n", + "27.03 19.48\n", + "upstream profile:\n", + "x y\n", + "-0.50 0.01\n", + "-0.10 -0.00\n", + "-1.50 0.14\n", + "-2.00 0.25\n", + "-3.00 0.60\n", + "-4.00 1.20\n", + "-4.75 2.21\n", + "radius of bucket = 25 m.\n", + "bucket will subtend angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 pg : 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design length and depth of stilling bamath.sin\n", + "\t\t\t\t\n", + "#Given\n", + "q = 1; \t\t\t\t#discharge of spillway\n", + "Cd = 0.7; \t\t\t\t#coefficient of discharge\n", + "h1 = 10; \t\t\t\t#heigth of crest above downstream silting bamath.sin\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "Cv = 0.9; \t\t\t\t#coefficient of velocity\n", + "\n", + "# Calculations\n", + "h = (3*q/(2*Cd*(2*g)**0.5))**(2./3);\n", + "H = h1+h/2;\n", + "vt = (2*g*H)**0.5;\n", + "v1 = Cv*vt;\n", + "y1 = q/v1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\t\t\t\t#F>1, flow is super-critical\n", + "y2 = 1;\n", + "v2 = q/y2;\n", + "F2 = v2/(g*y2)**0.5; \t\t\t\t#<1\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-1;\n", + "le = 5*(y2-y1);\n", + "de = round(de*1000)/1000;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 0.58 m.\n", + "length of stilling bamath.sin = 7.50 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 pg : 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 7.83; \t\t\t\t#discharge through spillway\n", + "w = 12.5; \t\t\t\t#width of fall\n", + "d = 2.; \t\t\t\t#depth of water in downstream\n", + "g = 9.8;\n", + "\n", + "y1 = 0.5;\n", + "v1 = q/y1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\n", + "#F>1,flow is super-critical\n", + "\n", + "# Calculations\n", + "v2 = q/d;\n", + "F2 = v2/(g*d)**0.5;\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-d;\n", + "le = 5*(y2-y1);\n", + "de = round(de*100)/100;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 2.76 m.\n", + "length of stilling bamath.sin = 21.30 m.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Ag = 5*2.5; \t\t\t\t#area of gate\n", + "miu = 0.25; \t\t\t\t#coefficient of friction\n", + "w = 0.5; \t\t\t\t#weigth of gate\n", + "h = 2; \t\t\t\t#head of water over crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "gamma_w = 1000; \t\t\t\t#unit weigth of water\n", + "\n", + "\n", + "# Calculations\n", + "m = w*g*1000;\n", + "F = gamma_w*Ag*h*h*g/10;\n", + "ff = miu*F;\n", + "tf = (m+ff)/1000;\n", + "\n", + "# Results\n", + "print \"force to be exerted to lift the gate = %.2f kN.\"%(tf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "force to be exerted to lift the gate = 17.17 kN.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 19; \t\t\t\t#dischrge through spillway\n", + "E = 1; \t\t\t\t#energy loss\n", + "\n", + "\t\t\t\t#from energy loss equation;E = (y2-y1)**3/4y2y1; and solving it we get\n", + "\t\t\t\t#x = 0.5*(-1+(1+294.39*(x-1)**9/64*x**3))\n", + "\t\t\t\t#by trial and error method x = 2.806\n", + "x = 2.806;\n", + "y1 = 4*x/(x-1)**3;\n", + "y2 = x*y1;\n", + "y1 = round(y1*1000)/1000;\n", + "y2 = round(y2*1000)/1000;\n", + "print \"depth of flow at both end of jumps = %.2f m and %.2f m. respectively.\"%(y1,y2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of flow at both end of jumps = 1.91 m and 5.35 m. respectively.\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/MohdAnwar/Chapter4_1.ipynb b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb new file mode 100644 index 00000000..66a0b7e3 --- /dev/null +++ b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fc56911ca78177974b04004faec461a6b97c01b43d461299fb0cf06eea3ba6da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Analog Electronic Volt-Ohm Milliammeters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2.1 - page : 4-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Peak amplitude\n", + "#given data :\n", + "E_rms=230.0 #in V\n", + "Ep=2**(1.0/2)*E_rms \n", + "print \"Peak amplitude, Ep = \", round(Ep,2), \" V.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak amplitude, Ep = 325.27 V.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1 - page : 4-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Resistance\n", + "#given data :\n", + "import math\n", + "Rm=500.0 #in ohm\n", + "E_rms=50.0 # in V\n", + "E_dc=(2**(1.0/2)*E_rms)/(math.pi/2) \n", + "Im=1*10**-3 #in A\n", + "R=E_dc/Im \n", + "Rs=(R-Rm)*10**-3 \n", + "print \"The resistance, Rs = \", round(Rs,1), \" kohm.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance, Rs = 44.5 kohm.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.1 - page : 4-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Percentage error\n", + "ff1=1.0 #form factor\n", + "r=1.11 #sine wave form factor\n", + "per=((r-ff1)/ff1)*100 #percentage error\n", + "print \"Percentage error is \", per, \" %\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage error is 11.0 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.2 - page : 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#part (i)\n", + "# form factor\n", + "T1=3.0 #\n", + "T=range(0,4) \n", + "##Function for integration\n", + "def integrate(a,b,f):\n", + " # def function before using this\n", + " # eg. : f=lambda t:200**2*t**2\n", + " #a=lower limit;b=upper limit;f is a function\n", + " import numpy\n", + " N=1000 # points for iteration\n", + " t=numpy.linspace(a,b,N)\n", + " ft=f(t)\n", + " ans=numpy.sum(ft)*(b-a)/N\n", + " return ans\n", + "# Calculating Vrms\n", + "a=T[0]\n", + "b=T[3]\n", + "f=lambda t:200**2*t**2\n", + "Vrms=(1/T1*integrate(a,b,f))**(1.0/2) # V\n", + "# Calculating Vav\n", + "g=lambda t:200*t\n", + "Vav=1/T1*integrate(a,b,g) # V\n", + "ff=Vrms/Vav # form factor\n", + "print \"Form factor is \", round(ff,4)\n", + "# part (ii)\n", + "ff1=1.11 #form factor of sine wave\n", + "per=((ff1/ff)-1)*100 #percentage errpr\n", + "print \"Percentage error in meter indication is\", round(per,3), \" %\"\n", + "# Answer is not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Form factor is 1.155\n", + "Percentage error in meter indication is -3.895 %\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.1 - page : 4-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#Given data :\n", + "gm=0.005 #in mho\n", + "V1=1.5 #in V\n", + "rd=200.0*10**3 # in Ohm\n", + "Rd=15.0*10**3 #in ohm\n", + "Rm=75.0 #in ohm\n", + "I=(gm*V1*((Rd*rd)/(rd+Rd)))/((2*((Rd*rd)/(rd+Rd)))+Rm) # A\n", + "I*=10**3 # mA\n", + "print \"Current, I = \", round(I,2), \" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current, I = 3.74 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.2 - page : 4-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#Given data :\n", + "gm=0.005 #in mho\n", + "V1=[0.2,0.4,0.6,0.8,1.0] #in V\n", + "rd=200.0*10**3 # in Ohm\n", + "Rd=15.0*10**3 #in ohm\n", + "Rm=75.0 #in ohm\n", + "Im=[]\n", + "for v1 in V1:\n", + " Im.append(gm*(rd*Rd*v1/(rd+Rd))/(2.0*(rd*Rd/(rd+Rd))+Rm)*1000) # mA\n", + "#Im*=1000 # mA\n", + "print \"Voltage Current\"\n", + "i=0\n", + "for im in Im:\n", + " print V1[i],\" V \",round(Im[i],3),\" A\"\n", + " i+=1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Current\n", + "0.2 V 0.499 A\n", + "0.4 V 0.997 A\n", + "0.6 V 1.496 A\n", + "0.8 V 1.995 A\n", + "1.0 V 2.493 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.3 - page : 4-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Design\n", + "v1=100.0 # in V\n", + "v2=30.0 #in V\n", + "v3=103.0 # in V\n", + "v4=1.0 #in V\n", + "x=9.0 #assume input resistance in Mohm\n", + "r4=(v4/v3)*x*10**3 #in kohm\n", + "r3=(((v4/v1)*x*10**6)-(r4*10**3))*10**-3 #in kohm\n", + "r2=(((v4/v2)*x*10**6)-((r4+r3)*10**3))*10**-3 # in kohm\n", + "r1=9*10**6-((r2+r3+r4)*10**3) # in ohm\n", + "r1*=10**-6 # Mohm\n", + "print \"Resistance, R4 is \",round(r4,2),\" kohm.\"\n", + "print \"Resistance, R3 is \",round(r3,2),\" kohm.\"\n", + "print \"Resistance, R2 is \",r2,\" kohm.\"\n", + "print \"Resistance, R1 is \",r1,\" Mohm.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance, R4 is 87.38 kohm.\n", + "Resistance, R3 is 2.62 kohm.\n", + "Resistance, R2 is 210.0 kohm.\n", + "Resistance, R1 is 8.7 Mohm.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.4 - page : 4-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#given data :\n", + "rd=150.0*10**3 # in ohm\n", + "Rm=50.0 # in ohm\n", + "Rs=1000.0*10**3 # in ohm\n", + "gm=0.0052 #in mho\n", + "rd1=rd/((gm*rd)+1) \n", + "V0=gm*((rd1*Rs)/(rd1+Rs))\n", + "R0=(2*Rs*rd1)/(Rs+rd1)\n", + "I=V0/(R0+Rm) # A\n", + "I*=10**3 # mA\n", + "print \"Curent, I = \", round(I,3),\" mA\"\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Curent, I = 2.3 mA\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.5 - page : 4-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Resistance\n", + "#given data :\n", + "V1=1.0 #in V\n", + "I=1.5*10**-3 #in A\n", + "rd=200.0*10**3 # in ohm\n", + "Rm=50.0 # in ohm\n", + "Rs=600.0*10**3 # in ohm\n", + "gm=0.005 #in mho\n", + "rd1=rd/((gm*rd)+1) \n", + "V0=gm*((rd1*Rs)/(rd1+Rs))*V1\n", + "R0=(2*Rs*rd1)/(Rs+rd1)\n", + "R_cal=(V0/I)-Rm-R0 \n", + "print \"Resistance , R_cal = \",round(R_cal,2),\" ohm\" \n", + "# answer is wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance , R_cal = 216.31 ohm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example q.3 - page : 4-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current and voltage\n", + "rm=10.0 #in ohm\n", + "im=5.0 # in mA\n", + "i=1.0 # in A\n", + "v=5.0 #in A\n", + "ish=i-(im*10**-3) # in A\n", + "m=i/(im*10**-3) # ratio\n", + "rsh=rm/(m-1) #in ohm\n", + "vo=v/i #in V\n", + "rsh1=vo/(im) #in kohm\n", + "print \"Shunt resistance is \",round(rsh,2),\" ohm to measure current upto 1 A\"\n", + "print \"Shunt resistance is \", rsh1,\" kohm to measure voltage upto 5 V\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shunt resistance is 0.05 ohm to measure current upto 1 A\n", + "Shunt resistance is 1.0 kohm to measure voltage upto 5 V\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/MohdAsif/ch2.ipynb b/sample_notebooks/MohdAsif/ch2.ipynb new file mode 100755 index 00000000..66270ccb --- /dev/null +++ b/sample_notebooks/MohdAsif/ch2.ipynb @@ -0,0 +1,387 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Casting Processes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 2.1 on page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Given that\n", + "h=15 # Height of spur in cm\n", + "l= 50 # Length of cast in cm\n", + "w= 25 # weidth of cast in cm\n", + "h1= 15 # Height of cast in cm\n", + "g= 981 # Acceleration due to gravity in cm/sec**2\n", + "Ag= 5 # Cross sectional area of the grate in cm**2\n", + "v3= sqrt(2* g * h)\n", + "V = l*w*h1\n", + "tf1= V/(Ag*v3)\n", + "Am = l*w\n", + "tf2 = (Am/Ag)*(1/sqrt(2*g))*2*(sqrt(h) - sqrt(h-h1))\n", + "print \" Filling time for first design = %f sec, \\n Filling time for second design = %f sec\"% (tf1, tf2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Filling time for first design = 21.859294 sec, \n", + " Filling time for second design = 43.718589 sec\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 2 on page no. 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given that\n", + "h=15 # Height of spur in cm\n", + "l= 50 # Length of cast in cm\n", + "w= 25 # weidth of cast in cm\n", + "h1= 15 # Height of cast in cm\n", + "g= 981 # Acceleration due to gravity in cm/sec**2\n", + "Ag= 5 # Cross sectional area of the grate in cm**2\n", + "Dm = 7800 # Density of molten Fe in Kg/m**3\n", + "Neta = 0.00496 # Kinetic viscosity in Kg/m-sec\n", + "theta = 90 # Angle in degree\n", + "Eq = 25 # (L/D) Equivalent \n", + "v3= sqrt(2* g * h)*(10**(-2))\n", + "d= sqrt((Ag*4)/(pi))*(10**(-2))\n", + "Re = Dm*v3*d/Neta\n", + "f = 0.0791*(Re)**(-1/4)\n", + "L=0.12 # in meter\n", + "Cd= (1+0.45+4*f*((L/d)+Eq))**(-1/2)\n", + "v3_ = Cd*v3\n", + "Re_ = (v3_/v3)*(Re)\n", + "f_ = 0.0791 *(Re_)**(-1/4)\n", + "Cd_ = (1+0.46+4*f_*(L/d + Eq))**(-1/2)\n", + "v3__ = Cd_*v3\n", + "V = l*w*h1\n", + "tf= (V/(Ag*v3__))*(10**-2)\n", + "print \" Filling time for first design = %f sec. \"% tf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Filling time for first design = 31.918954 sec. \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem on page no. 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "Hi=1.2 # Initial height in m\n", + "H= 0.05 # Height in m\n", + "g= 9.81 # Acceleration due to gravity in m/sec**2\n", + "Dm = 2700 # Density of molten metal in Kg/m**3\n", + "Neta = 0.00273 # Kinetic viscosity in Kg/m-sec \n", + "d= 0.075 # Diameter in m\n", + "D = 1 # Internal diameter of ladle in m\n", + "v3= sqrt(2* g * Hi)\n", + "Re = Dm*v3*d/Neta\n", + "ef=0.075\n", + "Cd= (1+ef)**(-1/2)\n", + "ef_=0.82\n", + "Re_ = (2+ef_)**(-1/2)\n", + "v3_ = sqrt(2*g*H)\n", + "Re_ = Dm*v3_*d/Neta\n", + "At = (pi/4)*D**2\n", + "An = (pi/4)*d**2\n", + "Cd= 0.96\n", + "tf= (sqrt(2/g))*(At/An)*(1/Cd)*sqrt(Hi)\n", + "m = Dm*An*Cd*sqrt(2*g*Hi)\n", + "m_ = Dm*An*Cd*sqrt(2*g*Hi*0.25)\n", + "print \"\"\"Time required to empty the ladle = %f sec,\n", + "Discharge rate are -\n", + "Initially = %f Kg/sec \n", + "When the ladle is 75 percent empty = %f Kg/sec. \"\"\"%(tf,m,m_)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to empty the ladle = 91.596179 sec,\n", + "Discharge rate are -\n", + "Initially = 55.563236 Kg/sec \n", + "When the ladle is 75 percent empty = 27.781618 Kg/sec. \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 5 on page no. 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "# Given that\n", + "thetaF= 1540 # Temperature of mould face in degree centigrade\n", + "Theta0 = 28 # Initial temperature of mould in Degree centigrade\n", + "L= 272e3 # Latent heat of liquid metal in J/Kg\n", + "Dm = 7850 # Density of liquid metal in Kg/m**3\n", + "c = 1.17e+3 #Specific heat of sand in J/Kg-K\n", + "k = 0.8655 # Conductivity of sand in W/m-K\n", + "D= 1600 # Density of sand in Kg/m**3\n", + "h = 0.1 # Height in m\n", + "b = 10 # Thickness of slab in cm\n", + "r =h/2# V/A in meter\n", + "lamda = (thetaF - Theta0)*(D*c)/(Dm*L)\n", + "Beta1 = 2*lamda/sqrt(pi)\n", + "Alpha = k /(D*c)\n", + "ts1 = r**2 /((Beta1**2)*Alpha)#In sec\n", + "ts1_=ts1/3600 # In hour\n", + "Beta= symbols('Beta') \n", + "p=Beta**2 - lamda*(2/sqrt(pi))*Beta -lamda/3\n", + "Beta2 = solve(p)[0]\n", + "print \"The value of Beta2 is %f \"%Beta2\n", + "print \"We only take the positive value of Beta2 ,\\nHence Beta2=1.75\" \n", + "r1 = r/3\n", + "ts2 = (r1**2)/((1.75**2)*Alpha) # in sec\n", + "ts2_=ts2/3600#in Hour\n", + "print \"Solidification time for slab-shaped casting = %f hr,\\nSolidification time for sphere = %f hr\"%(ts1_,ts2_)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Beta2 is -0.252713 \n", + "We only take the positive value of Beta2 ,\n", + "Hence Beta2=1.75\n", + "Solidification time for slab-shaped casting = 0.671318 hr,\n", + "Solidification time for sphere = 0.054495 hr\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 7 on page no. 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "thetaF= 1540 # Temperature of mould face in degree centigrade\n", + "thetaO = 28 # Initial temperature of mould in Degree centigrade\n", + "L= 272e3 # Latent heat of iron in J/Kg\n", + "Dm = 7850 # Density of iron in Kg/m**3\n", + "Cs = 0.67e+3 #Specific heat of iron in J/Kg-K\n", + "C = 0.376e3 #Specific heat of copper in J/Kg-K\n", + "Ks = 83 # Conductivity of iron in W/m-K\n", + "K = 398 # Conductivity of copper in W/m-K\n", + "D= 8960 # Density of copper in Kg/m**3\n", + "h = .1 # Height in m\n", + "hF = 1420 # Total heat transfer coefficient across the casting-mould interface in W/m**2-\u00b0C\n", + "AlphaS = K /(D*C)\n", + "thetaS = 982 #In \u00b0C as in example 2.6\n", + "h1= (1+(sqrt((Ks*Dm*Cs)/(K*D*C))))*hF\n", + "a = 1/2 + (sqrt((1/4)+Cs*(thetaF-thetaS)/(3*L)))\n", + "delta=h/2\n", + "ts = (delta+((h1*delta**2)/(2*Ks)))/((h1*(thetaF-thetaS))/(Dm*L*a)) # in sec\n", + "ts_ = ts/3600 # in hours\n", + "h2= (1+(sqrt((K*D*C)/(Ks*Dm*Cs))))*hF\n", + "gama= ((h2**2)/(K**2))*AlphaS*ts\n", + "thetaS_ = thetaO + (thetaS-thetaO)*(1-((exp(gama))))\n", + "print \" Solidification time = %f hr,\\n The surface temperature of the mould = %f \u00b0 C\"%(ts_,thetaS_)\n", + "# The value of the surface temperature of the mould in the book is given as 658.1\u00b0 C, Which is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Solidification time = 0.026965 hr,\n", + " The surface temperature of the mould = -1901.439242 \u00b0 C\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 8 on page no. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "A= 60*7.5 # Cross sectional area in cm**2\n", + "v=0.05 # Withdrawal rate in m/sec\n", + "t = 0.0125 # Thickness in m\n", + "thetaF= 1500 # Temperature of mould face in degree centigrate\n", + "thetaP = 1550 # \n", + "thetaO = 20 # Initial temperature of mould in Degree centigrate\n", + "L= 268e3 # Latent heat of molten metal in J/Kg\n", + "Dm = 7680 # Density of molten metal in Kg/m**3\n", + "Cs = 0.67e+3 #Specific heat of molten metal in J/Kg-K\n", + "Cm = 0.755e3 #Specific heat of mould in J/Kg-K\n", + "Ks = 76 # Conductivity of molten metal in W/m-K\n", + "hF = 1420 # Heat transfer coefficient at the casting-mould interface in W/m**2-\u00b0C\n", + "Dtheta = 10 # Maximum temperature of cooling water in \u00b0 C\n", + "L_ = L+Cm*(thetaP-thetaF)\n", + "x=L_ / (Cs*(thetaF-thetaO))\n", + "y= hF*t/Ks\n", + "print \"L_/(Cs(thetaF-thetaO)) = %f,\\nhF*t/Ks = %f\"%(x,y)\n", + "z=0.11 # Where z=hF**2 * lm / (v*Ks*Dm*Cs)\n", + "lm= (z*v*Ks*Dm*Cs)/(hF**2)\n", + "Z=0.28 # Where Z=Q/(lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks))\n", + "Q = Z*lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks)\n", + "m = Q / (4.2e3*Dtheta)\n", + "print \"The mould length = %f meter,\\nThe cooling water requirement = %f Kg/sec\"%(lm,m)\n", + "# Answer for The cooling water requirement in the book is given as 5.05 Kg/sec, Which is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L_/(Cs(thetaF-thetaO)) = 0.308340,\n", + "hF*t/Ks = 0.233553\n", + "The mould length = 1.066684 meter,\n", + "The cooling water requirement = 48.065525 Kg/sec\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 9 on page no. 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import floor\n", + "# Given that\n", + "a = 15 # Side of the aluminium cube in cm\n", + "Sh = 0.065 # Volume shrinkage of aluminium during solidification\n", + "Vc = a**3\n", + "Vr = 3*Sh*Vc\n", + "h = ((4*Vr)/pi)**(1/3)\n", + "Rr = 6.0/h # Where Rr= (A/V)r\n", + "Rc = 6.0/a # Where Rc = (A/V)c\n", + "print \"(A/V)r=%f, (A/V)c=%f\\n Hence Rr is greater than Rc\"%(Rr,Rc)\n", + "dmin = 6.0/Rc\n", + "Vr_ = (pi/4)*dmin**3\n", + "print \"\"\" With minimum value of d Vr=%d cm**3 .\n", + "This valume is much more than the minimum Vr necessary. \n", + "Let us now consider the top riser when the optimum cylindrical shape is obtained with h=d/2 \n", + "and again (A/V)r = 6/d. However, with a large top riser,\\n the cube loses its top surface for the purpose of heat dissipation.\"\"\"%Vr_\n", + "Rc_ = 5.0/a\n", + "dmin_=6.0/Rc_\n", + "print \" d should be greater than or equal to %d cm\"%dmin_\n", + "Vr__ = (pi/4)*dmin_**2 *floor(h)\n", + "print \" The riser volume with minimum diameter is %d cm**3\"%Vr__" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(A/V)r=6.000000, (A/V)c=0.400000\n", + " Hence Rr is greater than Rc\n", + " With minimum value of d Vr=2650 cm**3 .\n", + "This valume is much more than the minimum Vr necessary. \n", + "Let us now consider the top riser when the optimum cylindrical shape is obtained with h=d/2 \n", + "and again (A/V)r = 6/d. However, with a large top riser,\n", + " the cube loses its top surface for the purpose of heat dissipation.\n", + " d should be greater than or equal to 18 cm\n", + " The riser volume with minimum diameter is 254 cm**3\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdIrfan/Chapter6.ipynb b/sample_notebooks/MohdIrfan/Chapter6.ipynb new file mode 100644 index 00000000..59db3bd3 --- /dev/null +++ b/sample_notebooks/MohdIrfan/Chapter6.ipynb @@ -0,0 +1,519 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdIrfan/Chapter6_1.ipynb b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb new file mode 100644 index 00000000..9261f4c5 --- /dev/null +++ b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb @@ -0,0 +1,490 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdRizwan/chapter04.ipynb b/sample_notebooks/MohdRizwan/chapter04.ipynb new file mode 100644 index 00000000..24ed6788 --- /dev/null +++ b/sample_notebooks/MohdRizwan/chapter04.ipynb @@ -0,0 +1,310 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4, Fuel Air and Actual Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.10, page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=7 #Compression Ratio\n", + "t2=715 #Temperature at the end of isentropic compression in Kelvin\n", + "t4=1610 #Temperature at the end of expansion in Kelvin\n", + "#Calculations\n", + "vr2=65.8 #From steam table\n", + "u2=524.2 #From steam table\n", + "vr4=5.69 #From steam table\n", + "u4=1307.63 #From steam table\n", + "vr1=r*vr2 \n", + "t1=338 #From steam table\n", + "u1=241.38 #From steam table\n", + "vr3=vr4/r \n", + "t3=2800 #From steam table\n", + "u3=2462.5 #From steam table\n", + "W=(u3-u2)-(u4-u1) #Work done\n", + "Qa=(u3-u2) #Heat added\n", + "eta=W/Qa #Cycle efficiency\n", + "print \"The cycle work = %0.2f kJ/kg \" %W \n", + "print \"The cycle efficiency = %0.2f %%\" %(eta*100) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cycle work = 872.05 kJ/kg \n", + "The cycle efficiency = 44.99 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.2, page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Initialisation of Variables\n", + "r=8 #Compression Ratio\n", + "ga=1.4 #Degree of freedom for the gas\n", + "Cvinc=1.1 #Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1)) #efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100) #Change in efficiency\n", + "etach=-deta/eta #Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency of otto cycle = -0.71 %\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.3, page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=7.0 #Compression Ratio\n", + "ga=1.4 #Degree of freedom for the gas\n", + "Cvinc=3.0 #Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1)) #efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100) #Change in efficiency\n", + "etach=-deta/eta #Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency of otto cycle = -1.98 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.4, page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=18.0 #Compression Ratio\n", + "co=5.0 #Cut off percent of stroke\n", + "cv=0.71 #Mean specific heat for cycle in kJ/kg K\n", + "R=0.285 #Charecteristic gas constant in kJ/kh K\n", + "cvinc=2.0 #Percentage increase in mean specific heat of the cycle\n", + "#Calculation\n", + "rho=(co/100)*(r-1)+1 \n", + "ga=1+(R/cv) \n", + "eta=1-(1/(ga*(r**(ga-1))))*((rho**ga)-1)/(rho-1) #Efficiency of diesel cycle \n", + "etach=-((1-eta)/eta)*(ga-1)*(log(r)-(((rho**ga)*log(rho))/((rho**ga)-1))+(1/ga))*(cvinc/100) #Variation in the air standard efficiency\n", + "print \"The percentage change in the efficiency = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency = -1.15 %\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.5, page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Initialisation of Variables\n", + "r=7 #Compression ratio\n", + "C=44000 #Calorific value of fuel used in kJ/kg\n", + "afr=15 #Air fuel ratio\n", + "t1=338 #Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1 #Pressure of the charge at the end of the stroke in bar\n", + "n=1.33 #Index of compression\n", + "cv=0.71 #Specific heat constant at constant volume in kJ/kgK\n", + "k=20*10**(-5) \n", + "#Calculations\n", + "p2=p1*(r)**n \n", + "t2=(t1*p2)/(p1*r) \n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "p3=(p2*t3)/t2 #Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2 #Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \" %(p3)\n", + "print \"Max pressure for constant specific heat = %0.2f bar\" %P3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max pressure in the cylinder = 65.52 bar \n", + "Max pressure for constant specific heat = 93.52 bar\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.6, page 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=10 #Compression ratio\n", + "C=48000 #Calorific value of fuel used in kJ/kg\n", + "afr=15 #Air fuel ratio\n", + "t1=330 #Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1 #Pressure of the charge at the end of the stroke in bar\n", + "n=1.36 #Index of compression\n", + "cv=0.7117 #Specific heat constant at constant volume in kJ/kgK\n", + "k=2.1*10**(-4) \n", + "#Calculations\n", + "p2=p1*(r)**n \n", + "t2=t1*((p2/p1)**((n-1)/n)) \n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "p3=(p2*t3)/t2 #Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2 #Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \" %(p3)\n", + "print \"Max pressure for constant specific heat = %0.2f bar\" %P3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max pressure in the cylinder = 102.27 bar \n", + "Max pressure for constant specific heat = 150.64 bar\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.7, page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=15 #Compression ratio\n", + "C=43000 #Calorific value of fuel used in kJ/kg\n", + "afr=27 #Air fuel ratio\n", + "t2=870 #Temperature of the charge at the end of the stroke in Kelvin\n", + "cv=0.71 #Specific heat constant at constant volume in kJ/kgK\n", + "R=0.287 #Gas constant in kJ/kgK\n", + "k=20*10**(-5) \n", + "#Calculations\n", + "cp=cv+R #Specific heat at constant pressure\n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cp)+sqrt((4*cp*cp)+(4*k*((2*cp*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "co=((t3/t2)-1)/(r-1) #combustion occupies this amt of stroke \n", + "print \"Percentage of the stroke when the combustion is completed is\",round((co*100),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of the stroke when the combustion is completed is 9.77\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdTasleem/Ch2.ipynb b/sample_notebooks/MohdTasleem/Ch2.ipynb new file mode 100755 index 00000000..59039ed8 --- /dev/null +++ b/sample_notebooks/MohdTasleem/Ch2.ipynb @@ -0,0 +1,333 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 : Energy Bands and Charge Carriers in semiconductor" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.1 Page No. 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Eg=0.72 #eV\n", + "Ef=0.5*Eg\n", + "dE=Eg-Ef #eV\n", + "k=8.61*10**-5 #Boltzman constant\n", + "T=300 #K\n", + "\n", + "import math\n", + "N=1/(1+math.exp(dE/(k*T)))\n", + "\n", + "\n", + "print\"the fraction of total no. of electron is \",round(N,9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the fraction of total no. of electron is 8.85e-07\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.4 Page No. 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "E=300*1.602*10**-19 #eV Energy\n", + "m=9.108*10**-31 #kg, mass of electron\n", + "h=6.626*10**-34 #Planck constant\n", + "\n", + "v=math.sqrt(2*E/m)\n", + "lam=h*v/E\n", + "\n", + "print\"The wavwlength is\",round(lam*10**10,3),\"A\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavwlength is 1.416 A\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.5 Page No. 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "ni=1.4*10**18\t\t\t#in atoms/m**3\n", + "Nd=1.4*10**24\t\t\t#in atoms/m**3\n", + "n=Nd\t\t\t\t#in atoms/m**3\n", + "\n", + "p=ni**2/n\t\t\t#in atoms/m**3\n", + "ratio=n/p\t\t\t#unitless\n", + "\n", + "print\"Ratio of electron to hole concentration : \",round(ratio,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of electron to hole concentration : 1e+12\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.7 Page no 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "n=10**24 #Electron density\n", + "e=1.6*10**-19 #Electron charge\n", + "v=0.015 #m/s drift velocity\n", + "A=10**-4 #m**2 area\n", + "\n", + "I=n*e*v/A\n", + "\n", + "print\"The magnitude of current is\",round(I/10**8,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of current is 0.24 A\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.8 Page No. 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "Ef=5.5\t\t\t#in eV\n", + "MUe=7.04*10**-3\t\t#in m**2/V-s\n", + "n=5.8*10**28\t\t#in m**-3\n", + "e=1.6*10**-19\t\t#constant\n", + "m=9.1*10**-31\t\t#in Kg\n", + "\n", + "import math\n", + "tau=MUe*m/e\t\t#in sec\n", + "rho=1/(n*e*MUe)\t\t#in ohm-m\n", + "vF=math.sqrt(2*Ef*1.6*10**-19/m)\n", + "\n", + "print\"Relaxation time in sec : \",tau,\"s\"\n", + "print\"Resistivity of conductor in ohm-m : \",round(rho,11),\"ohm m\"\n", + "print\"velocity of electron with fermi energy is \",round(vF,0),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Relaxation time in sec : 4.004e-14 s\n", + "Resistivity of conductor in ohm-m : 1.531e-08 ohm m\n", + "velocity of electron with fermi energy is 1390707.0 m/s\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.9 Page No. 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e=1.6*10**-19\t\t\t#in coulamb\n", + "ND=10**17\t\t\t#in cm**-3\n", + "Bz=0.1\t\t\t\t#in Wb/m**2\n", + "w=4\t\t\t\t#in mm\n", + "d=4\t\t\t\t#in mm\n", + "Ex=5\t\t\t\t#in V/cm\n", + "MUe=3800\t\t\t#in cm**2/V-s\n", + "\n", + "v=MUe*Ex\t\t\t#in cm/s\n", + "v=v*10**-2\t\t\t#in m/s\n", + "VH=Bz*v*d\t\t\t#in mV\n", + "\n", + "print\"Magnitude of hall voltage is\",VH,\"mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of hall voltage is 76.0 mV\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.11 Page No.92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e=1.6*10**-19\t\t\t#in coulamb\n", + "ND=10**21\t\t\t#in m**-3\n", + "Bz=0.2\t\t\t\t#in T\n", + "d=4\t\t\t\t#in mm\n", + "d=d*10**-3\t\t\t#in meter\n", + "J=600\t\t\t\t#in A/m**2\n", + "n=ND\t\t\t\t#in m**-3\n", + "\n", + "VH=Bz*J*d/(n*e)\t\t\t#in V\n", + "\n", + "print\"Magnitude of hall voltage is \",VH*10**3,\"mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of hall voltage is 3.0 mV\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.12 Page No." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "e=1.6*10**-19\t\t\t#in coulamb\n", + "rho=0.00912\t\t\t#in ohm-m\n", + "B=0.48\t\t\t\t#in Wb/m**2\n", + "RH=3.55*10**-4\t\t\t#in m**3-coulamb**-1\n", + "SIGMA=1/rho\t\t\t#in (ohm=m)**-1\n", + "\n", + "import math\n", + "THETAh=math.atan(SIGMA*B*RH)\t#in Degree\n", + "\n", + "print\"Hall angle is\",round(THETAh*180/3.14,4),\"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hall angle is 1.0709 degree\n" + ] + } + ], + "prompt_number": 169 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/Mohdarif/chapter9.ipynb b/sample_notebooks/Mohdarif/chapter9.ipynb new file mode 100755 index 00000000..d7050fa1 --- /dev/null +++ b/sample_notebooks/Mohdarif/chapter9.ipynb @@ -0,0 +1,445 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:efded2f677db2675356cffa3b1053d25367de2f521a0cbcad887abf7b22a8cb7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 09 : Hydraulic Turbines" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex9.1, page 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=91.5#Head of the pelton wheel at inlet in m\n", + "Q=0.04#Discharge of the pelton wheel in m**3/s\n", + "N=720#Rotating speed of the wheel in rpm\n", + "Cv=0.98#Velocity coefficient of the nozzle \n", + "n0=0.8#Efficiency of the wheel\n", + "UC1=0.46#Ratio of bucket speed to jet speed\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "P=dw*g*H*Q*n0*10**-3#Power developed in kw\n", + "C1=Cv*(2*g*H)**(1/2)#Jet speed in m/s\n", + "U=UC1*C1#Wheel speed in m/s\n", + "w=(2*3.1415*N)/60#Angular velocity of the wheel in rad/s\n", + "D=(2*U)/w#Diameter of the wheel in m\n", + "A=Q/C1#Jet area in m**2\n", + "d=((4*A)/3.1415)**(1/2)#Jet diameter in m\n", + "Dd=D/d#Wheel to jet diameter ratio at centre line of the buckets\n", + "Nsp=((1/(g*H))**(5/4))*(((P*10**3)/dw)**(1/2))*(N/60)*2*3.1415#Dimensionless power specific speed in rad\n", + "\n", + "#output\n", + "print '''(a)Wheel-to-jet diameter ratio at the centre line of the buckets is %3.1f\n", + "(b)The jet speed of the wheel is %3.2f m/s\n", + " Wheel speed is %3.1f m/s\n", + "(c)Dimensionless power specific speed is %3.3f rad'''%(Dd,C1,U,Nsp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Wheel-to-jet diameter ratio at the centre line of the buckets is 0.0\n", + "(b)The jet speed of the wheel is 0.98 m/s\n", + " Wheel speed is 0.5 m/s\n", + "(c)Dimensionless power specific speed is 0.084 rad\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2, page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan, degrees\n", + "#input data\n", + "D=1.4#Diameter of the turbine in m\n", + "N=430#Speed of the turbine in rpm\n", + "Cr1=9.5#Flow velocity without shock at runner in m/s\n", + "C2=7#Absolute velocity at the exit without whirl in /s\n", + "dSPH=62#Difference between the sum of static and potential heads at entrance to runner and at exit from runner in m\n", + "W=12250#Power given to runner in kW\n", + "Q=12#Flow rate of water from the turbine in m**3/s\n", + "H=115#Net head from the turbine in m\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U1=(3.1415*D*N)/60#Runner tip speed in m/s\n", + "Cx1=(W*10**3)/(dw*Q*U1)#Absolute inlet velocity in m/s as flow is radial at outlet Cx2=0 in m/s as Cx2=0 as zero whirl at outlet\n", + "a1=atan(degrees(Cr1/Cx1))#Guide vane angle in degree\n", + "C1=(Cr1**2+Cx1**2)**(1/2)#Inlet velocity in m/s\n", + "b1=atan(degrees(Cr1/(Cx1-U1)))#Runner blade entry angle in degree\n", + "dHr=dSPH+(((C1**2)-(C2**2))/(2*g))-(U1*Cx1/g)#Loss of head in the runner in m\n", + "\n", + "#output\n", + "print '''(a)\n", + " (1)Guide vane angle at inlet is %3.1f degree\n", + " (2)Inlet absolute velocity of water at entry to runner is %3.1f m/s\n", + "(b)Runner blade entry angle is %3.1f degree\n", + "(c)Total Loss of head in the runner is %3.2f m'''%(a1,C1,b1,dHr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " (1)Guide vane angle at inlet is 1.5 degree\n", + " (2)Inlet absolute velocity of water at entry to runner is 1.0 m/s\n", + "(b)Runner blade entry angle is 1.6 degree\n", + "(c)Total Loss of head in the runner is -44.51 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3, page 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin, tan, pi, atan\n", + "#input data\n", + "D1=0.9#External diameter of the turbine in m\n", + "D2=0.45#Internal diameter of the turbine in m\n", + "N=200#Speed of turbine running in rpm\n", + "b1=0.2#Width of turbine at inlet in m\n", + "Cr1=1.8#Velocity of flow through runner at inlet in m/s\n", + "Cr2=Cr1#Velocity of flow through runner at outlet in m/s\n", + "a11=10#Guide blade angle to the tangent of the wheel in degree\n", + "a22=90#Discharge angle at outlet of turbine in degree\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "C1=Cr1/sin(a11*pi/180)#Absolute velocity of water at inlet of runner in m/s\n", + "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n", + "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n", + "W1=(Wx1**2+Cr1**2)**(1/2)#Relative velocity at inlet in m/s\n", + "b11=atan(degrees(Cr1/Wx1))#Runner blade entry angle in degree\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at exit in m/s\n", + "b22=atan(degrees(Cr2/U2))#Runner blade exit angle in degree\n", + "b2=D1*b1/D2#Width of runner at outlet in m\n", + "Q=3.1415*D1*b1*Cr1#Discharge of water in turbine in m**3/s\n", + "m=dw*Q#Mass of water flowing through runner per second in kg/s\n", + "V2=Cr2#Velocity of water at exit in m/s \n", + "H=(U1*Cx1/g)+(V2**2/(2*g))#Head at the turbine inlet in m\n", + "W=m*U1*Cx1*10**-3#Power developed in kW\n", + "nH=(U1*Cx1/(g*H))#Hydraulic efficiency\n", + "\n", + "#output\n", + "print '''(a)Absolute velocity of water at inlet of runner is %3.3f m/s\n", + "(b)Velocity of whirl at inlet is %3.3f m/s\n", + "(c)Relative velocity at inlet is %3.3f m/s\n", + "(d)Runner blade entry angle is %3.2f degree\n", + " Runner blade exit angle is %3.2f degree\n", + "(e)Width of runner at outlet is %3.1f m\n", + "(f)Mass of water flowing through runner per second is %3.f kg/s\n", + "(g)Head at the turbine inlet is %3.3f m\n", + "(h)Power developed is %3.3f kW\n", + "(i)Hydraulic efficiency is %3.4f'''%(C1,Cx1,W1,b11,b22,b2,m,H,W,nH)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Absolute velocity of water at inlet of runner is 10.366 m/s\n", + "(b)Velocity of whirl at inlet is 10.208 m/s\n", + "(c)Relative velocity at inlet is 1.000 m/s\n", + "(d)Runner blade entry angle is 1.56 degree\n", + " Runner blade exit angle is 1.53 degree\n", + "(e)Width of runner at outlet is 0.4 m\n", + "(f)Mass of water flowing through runner per second is 1018 kg/s\n", + "(g)Head at the turbine inlet is 9.972 m\n", + "(h)Power developed is 97.925 kW\n", + "(i)Hydraulic efficiency is 0.9834\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4, page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan\n", + "#input data\n", + "P=330#Power output from the turbine is kW\n", + "H=70#Head of operating turbine in m\n", + "N=750#Speed of the turbine in rpm\n", + "nH=0.94#Hydraulic efficiency\n", + "n0=0.85#Overall efficiency\n", + "FR=0.15#Flow ratio \n", + "BR=0.1#Breadth ratio\n", + "D1D2=2#Ratio inner and outer diameter of runner\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "Cr1=FR*(2*g*H)**(1/2)#Flow velocity at inlet in m/s\n", + "Q=(P*10**3)/(dw*g*H*n0)#Discharge at outlet in m**3/s\n", + "D1=(Q/(nH*3.1415*BR*Cr1))**(1/2)#Runner inlet diameter in m\n", + "b1=BR*D1#Height of the runner vanes at inlet in m\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n", + "Cx1=(nH*g*H)/(U1)#Velocity of whirl at inlet in m/s\n", + "a11=atan(degrees(Cr1/Cx1))#Guide blade angle in degree\n", + "b11=atan(degrees(Cr1/(Cx1-U1)))#Runner vane angle at inlet in degree\n", + "D2=D1/D1D2#Runner outlet diameter in m\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "b22=atan(degrees(Cr2/U2))#Runner vane angle at outlet in degree\n", + "b2=D1*b1/D2#Width at outlet in m\n", + "\n", + "#output\n", + "print '''(a)Flow velocity at inlet is %3.2f m/s\n", + "(b)Discharge at outlet is %3.3f m**3/s\n", + "(c)Runner inlet diameter is %3.3f m\n", + "(d)Height of the runner vanes at inlet is %3.4f m\n", + "(e)Guide blade angle is %3.2f degree\n", + "(f)Runner vane angle at inlet is %3.2f degree\n", + " Runner vane angle at outlet is %3.2f degree\n", + "(g)Runner outlet diameter is %3.4f m\n", + "(h)Width at outlet is %3.4f m\n", + "(i)Runner tip speed at inlet is %3.2f m/s\n", + "(j)Velocity of whirl at inlet is %3.f m/s'''%(Cr1,Q,D1,b1,a11,b11,b22,D2,b2,U1,Cx1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Flow velocity at inlet is 0.15 m/s\n", + "(b)Discharge at outlet is 0.565 m**3/s\n", + "(c)Runner inlet diameter is 1.000 m\n", + "(d)Height of the runner vanes at inlet is 0.1000 m\n", + "(e)Guide blade angle is 0.48 degree\n", + "(f)Runner vane angle at inlet is -0.36 degree\n", + " Runner vane angle at outlet is 0.41 degree\n", + "(g)Runner outlet diameter is 0.5000 m\n", + "(h)Width at outlet is 0.2000 m\n", + "(i)Runner tip speed at inlet is 39.27 m/s\n", + "(j)Velocity of whirl at inlet is 16 m/s\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5, page 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=30#Working head of the turbine in m\n", + "D1=1.2#Inlet wheel diameter in m\n", + "D2=0.6#Outlet wheel diameter in m\n", + "b11=90#Vane angle at entrance in degree\n", + "a11=15#Guide blade angle in degree\n", + "Cx2=0#Velocity of whirl at inlet in m/s\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U11=1/tan(a11*pi/180)#Runner tip speed at inlet in m/s in terms of Cr1\n", + "Cr1=(H/((U11**2/g)+(1/(2*g))))**(1/2)#Flow velocity at inlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "U1=Cr1*U11#Runner tip speed at inlet in m/s \n", + "N=(60*U1)/(3.1415*D1)#Speed of the wheel in rpm\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at inlet in m/s \n", + "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n", + "\n", + "#output\n", + "print '''(a)Speed of the wheel is %3.2f rpm\n", + "(b)Vane angle at exit is %3.2f degree'''%(N,b22)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Speed of the wheel is 59.40 rpm\n", + "(b)Vane angle at exit is 1.54 degree\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6, page 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "D1=0.6#Internal runner diameter in m\n", + "D2=1.2#External runner diameter in m\n", + "a11=15#Guide blade angle in degree\n", + "Cr1=4#Flow velocity at inlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "N=200#Speed of the turbine in rpm\n", + "H=10#Head of the turbine in m\n", + "a22=90#Discharge angle at outlet in degree\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s \n", + "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s \n", + "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n", + "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n", + "b11=atan(degrees(Cr1/Wx1))#Vane angle at entrance in degree\n", + "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n", + "Wm=U1*Cx1#Work one per unit mass flow rate in W/(kg/s) as Cx2=0 in m/s\n", + "nH=(U1*Cx1/(g*H))#Hydraulic efficiency \n", + "\n", + "#output\n", + "print '''(a)Inlet vane angle is %3.2f degree\n", + " Outlet vane angle is %3.2f degree\n", + "(b)Work done by the water on the runner per kg of water is %3.2f W/(kg/s)\n", + "(c)Hydraulic efficiency is %3.4f'''%(b11,b22,Wm,nH)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Inlet vane angle is 1.53 degree\n", + " Outlet vane angle is 1.52 degree\n", + "(b)Work done by the water on the runner per kg of water is 93.79 W/(kg/s)\n", + "(c)Hydraulic efficiency is 0.9561\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7, page 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=23#Net head across the turbine in m\n", + "N=150#Speed of the turbine in rpm\n", + "P=23#Power developed by the turbine in MW\n", + "D=4.75#Blade tip diameter in m\n", + "d=2#Blade hub diameter in m\n", + "nH=0.93#Hydraulic efficiency\n", + "n0=0.85#Overall efficiency\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "dm=(D+d)/2#Mean diameter of the turbine in m\n", + "Pa=(P*10**6)/n0#Power available in MW\n", + "Q=(Pa/(dw*g*H))#Flow rate in the turbine in m**3/s\n", + "Um=(3.1415*dm*N)/60#Rotor speed at mean diameter in m/s\n", + "Pr=Pa*nH*10**-6#Power given to runner in MW\n", + "Cx1=Pr*10**6/(dw*Q*Um)#Velocity of whirl at inlet in m/s as Cx2=0 in m/s\n", + "Ca=Q/((3.1415/4)*(D**2-d**2))#Axial velocity in m/s\n", + "b11=180-(atan(degrees(Ca/(Um-Cx1))))#Inlet blade angle in degree\n", + "Wx2=Um#Outlet whirl velocity component in m/s\n", + "b22=atan(degrees(Ca/Wx2))#Outlet blade angle in degree\n", + "\n", + "#output\n", + "print '''(a)The inlet blade angle at mean radius is %3.1f degree\n", + "(b)The outlet blade angle at mean radius is %3.1f degree'''%(b11,b22)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The inlet blade angle at mean radius is 178.5 degree\n", + "(b)The outlet blade angle at mean radius is 1.5 degree\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MukteshChaudhary/ch13.ipynb b/sample_notebooks/MukteshChaudhary/ch13.ipynb new file mode 100755 index 00000000..2ae8430e --- /dev/null +++ b/sample_notebooks/MukteshChaudhary/ch13.ipynb @@ -0,0 +1,212 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d7e6ca5b0b3b9273677b365c5a5c5dfae6429b091a9cdd3065bc98b47d3ef56f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Detectors and Mixers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page 546" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P=10000. #average power (W)\n", + "V=1000. #amplitude (V)\n", + "\n", + "#Calculations&Results\n", + "W1=4*math.pi*10**6\n", + "Wc=2*math.pi*10**8\n", + "alpha = P/V**2\n", + "print \"alpha=%.2f\"%alpha\n", + "#(b)=\n", + "A=1000+2*225+2*150+2*75\n", + "peak_power=alpha*A**2\n", + "print \"A=%.0f V\\npeak_power=%.0f W\"%(A,peak_power)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha=0.01\n", + "A=1900 V\n", + "peak_power=36100 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page 551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n=1\n", + "q=1.602*10**-19 #C\n", + "k=1.38*10**-23\n", + "T=290 #K\n", + "Is=10**-8 #A\n", + "\n", + "#Calculations&Results\n", + "a=q/(n*k*T)\n", + "Ib=0 #A\n", + "Rj=1/(a*(Ib+Is))\n", + "print \"(a)Rj=%d kohm\"%(Rj*10**-3)\n", + "Ib=100*10**-6\n", + "Rj=1/(a*(Ib+Is))\n", + "print \"(b)Rj=%.1f ohm\"%Rj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Rj=2498 kohm\n", + "(b)Rj=249.8 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3, Page 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "fc = 5*10**6 #hz\n", + "Vm = 1 #V\n", + "fm = 1*10**3 #Hz\n", + "\n", + "#Calculations&Results\n", + "#(a)\n", + "#Since the i/p frequency is multiplied by 12\n", + "fd = 10*12 #Hz\n", + "print \"Frequency deviation at output = +/-%d KHz\"%fd\n", + "\n", + "#(b)\n", + "fosc = 55*10**6 #i/p signal from oscillator (Hz)\n", + "fs = fosc+fc+fd*10**3\n", + "print \"\\nSum frequency at output = %.2f MHz\"%(fs*10**-6)\n", + "\n", + "#(c)\n", + "a=1\n", + "delf=10*1000\n", + "fm=1000\n", + "B=a*delf/fm\n", + "print \"\\nFrequency deviation = %d\"%B\n", + "\n", + "#(d)\n", + "a=2\n", + "delf=10*1000\n", + "fm=500\n", + "B=a*delf/fm\n", + "print \"\\nFrequency deviation = %d \"%B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency deviation at output = +/-120 KHz\n", + "\n", + "Sum frequency at output = 60.12 MHz\n", + "\n", + "Frequency deviation = 10\n", + "\n", + "Frequency deviation = 40 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5, Page 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "IDss=50*10**-3 #mA\n", + "gm=200*10**-3 #mS\n", + "VL=.25 #V \n", + "RL=50 #ohms\n", + "\n", + "#Calculations&Results\n", + "Vp=2*VL #V\n", + "#gm=-2*IDss/Vp\n", + "Vp=2*IDss/gm #V\n", + "print \"Vp=%.2f V\"%Vp\n", + "gc=IDss/(2*Vp)\n", + "print \"gc=%.e S\"%gc\n", + "Av=gc*RL\n", + "print \"Av=%.1f\"%Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vp=0.50 V\n", + "gc=5e-02 S\n", + "Av=2.5\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb b/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb new file mode 100755 index 00000000..2d6f6ded --- /dev/null +++ b/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb @@ -0,0 +1,570 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.1 : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import *\n", + "B=100 #W(8Bulb)\n", + "F=60 #W(2Fan)\n", + "L=100 #W(2Light)\n", + "LoadConnected=8*B+2*F+2*L #W\n", + "print \"(a) Connected Load =\",LoadConnected,\"W\"\n", + "#12 midnight to 5am\n", + "demand1=1*F #W\n", + "#5am to 7am\n", + "demand2=2*F+1*L #W\n", + "#7am to 9am\n", + "demand3=0 #W\n", + "#9am to 6pm\n", + "demand4=2*F #W\n", + "#6pm to midnight\n", + "demand5=2*F+4*B #W\n", + "DEMAND=array([demand1, demand2, demand3, demand4, demand5])\n", + "max_demand=max(DEMAND) \n", + "print \"(b) Maximum demand =\",max_demand,\"W\" \n", + "df=max_demand/LoadConnected #demand factor\n", + "print \"(c) Demand factor =\",df \n", + "E=demand1*5+demand2*2+demand3*2+demand4*9+demand5*6 #Wh\n", + "E=E/1000 #kWh\n", + "print \"(d) Energy consumed during 24 hours =\",E,\"kWh \"\n", + "Edash=LoadConnected*24/1000 #kWh\n", + "print \"(e) Energy consumed during 24 hours if all devices are used =\",Edash,\"kWh\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Connected Load = 1120 W\n", + "(b) Maximum demand = 520 W\n", + "(c) Demand factor = 0.464285714286\n", + "(d) Energy consumed during 24 hours = 4.94 kWh \n", + "(e) Energy consumed during 24 hours if all devices are used = 26.88 kWh\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.2 : page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "LoadA=2.5*1000 #W\n", + "#12 midnight to 5am\n", + "d1A=100 #W\n", + "#5am to 6am\n", + "d2A=1.1*1000 #W\n", + "#6am to 8am\n", + "d3A=200 #W\n", + "#8am to 5pm\n", + "d4A=0 #W\n", + "#5pm to 12 midnight\n", + "d5A=500 #W\n", + "LoadB=3*1000 #W\n", + "#11 pm to 7am\n", + "d1B=0 #W\n", + "#7 am to 8 am\n", + "d2B=300 #W\n", + "#8 am to 10 am\n", + "d3B=1*1000 #W\n", + "#10 am to 6 pm\n", + "d4B=200 #W\n", + "#6 pm to 11 pm\n", + "d5B=600 #W\n", + "DEMAND_A=array([d1A, d2A, d3A, d4A, d5A]) #W\n", + "DEMAND_B=array([d1B, d2B, d3B, d4B, d5B]) #W\n", + "max_demand_A=max(DEMAND_A) #W\n", + "max_demand_B=max(DEMAND_B) #W\n", + "df_A=max_demand_A/LoadA #demand factor\n", + "df_B=max_demand_B/LoadB #demand factor\n", + "print \"Demand factor of consumer A & B are :\",round(df_A,2),\"&\",round(df_B ,2)\n", + "gd_factor=(max_demand_A+max_demand_B)/max_demand_A \n", + "print \"Group diversity factor :\",round(gd_factor,2)\n", + "E_A=d1A*5+d2A*1+d3A*2+d4A*9+d5A*7 #Wh\n", + "E_B=d1B*8+d2B*1+d3B*2+d4B*8+d5B*5 #Wh\n", + "E_A=E_A/1000 #kWh\n", + "E_B=E_B/1000 #kWh\n", + "print \"Energy consumed by A & B during 24 hours =\",E_A,\"&\",E_B,\"kWh\"\n", + "Emax_A=max_demand_A*24/1000 #kWh\n", + "Emax_B=max_demand_B*24/1000 #kWh\n", + "print \"Maximum energy consumer A & B can consume during 24 hours =\",Emax_B,Emax_A,\"kWh \"\n", + "ratio_A=E_A/Emax_A \n", + "ratio_B=E_B/Emax_B \n", + "print \"Ratio of actual energy to maximum energy of consumer A & B :\",round(ratio_A,2),\"&\",round(ratio_B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demand factor of consumer A & B are : 0.44 & 0.33\n", + "Group diversity factor : 1.91\n", + "Energy consumed by A & B during 24 hours = 5.5 & 6.9 kWh\n", + "Maximum energy consumer A & B can consume during 24 hours = 24.0 26.4 kWh \n", + "Ratio of actual energy to maximum energy of consumer A & B : 0.21 & 0.29\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.3 : page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=600 #No. of apartments\n", + "L1=5 #kW#Each Apartment Load\n", + "n2=20 #No. of general purpose shops\n", + "L2=2 #kW#Each Shop Load\n", + "df=0.8 #demand factor\n", + "#1 Floor mill\n", + "L3=10 #kW#Load\n", + "df3=0.7 #demand factor\n", + "#1 Saw mill\n", + "L4=5 #kW#Load\n", + "df4=0.8 #demand factor\n", + "#1 Laundry\n", + "L5=20 #kW#Load\n", + "df5=0.65 #demand factor\n", + "#1 Cinema\n", + "L6=80 #kW#Load\n", + "df6=0.5 #demand factor\n", + "#Street lights\n", + "n7=200 #no. of tube lights\n", + "L7=40 #W#Load of each light\n", + "#Residential Load\n", + "df8=0.5 #demand factor\n", + "gdf_r=3 #group diversity factor\n", + "pdf_r=1.25 #peak diversity factor\n", + "#Commertial Load\n", + "gdf_c=2 #group diversity factor\n", + "pdf_c=1.6 #peak diversity factor\n", + "#Solution :\n", + "#Maximum demand of each apartment\n", + "dmax_1a=L1*df8 #kW\n", + "#Maximum demand of 600 apartment\n", + "dmax_a=n1*dmax_1a/gdf_r #kW\n", + "#demand of apartments at system peak time\n", + "d_a_sp=dmax_a/pdf_r #kW\n", + "#Maximum Commercial demand\n", + "dmax_c=(n2*L2*df+L3*df3+L4*df4+L5*df5+L6*df6)/gdf_c #kW\n", + "#Commercial demand at system peak time\n", + "d_c_sp=dmax_c/pdf_c #kW\n", + "#demand of street light at system peak time\n", + "d_sl_sp=n7*L7/1000 #kW\n", + "#Increase in system peak demand\n", + "DI=d_a_sp+d_c_sp+d_sl_sp #kW\n", + "print \"Increase in system peak demand =\",DI,\"kW \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in system peak demand = 438.0 kW \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.4 : page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "print \"Energy Supplied by the plant in 24 hours =\",E,\"MWh \" \n", + "LF=E/24 #%#Load Factor\n", + "print \"Load Factor =\",round(LF,2),\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Supplied by the plant in 24 hours = 1420 MWh \n", + "Load Factor = 59.17 % \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.5 : page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "C=125 #MW#Installed Capacity\n", + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "LF=E/24 #%#Load Factor\n", + "CF=LF/C #%#Capacity Factor\n", + "print \"Capacity Factor =\",round(CF,2),\"% \" \n", + "UF=100/C #%#Utilisation Factor\n", + "print \"Utilisation Factor =\",UF,\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity Factor = 0.47 % \n", + "Utilisation Factor = 0.8 % \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.6 : page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am & 10 to 12 am\n", + "L1=20 #MW\n", + "E1=L1*24 #MWh\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "E2=E1+(L2-L1)*17 #MWh\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "E3=E2+(L3-L2)*13 #MWh\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "E4=E3+(L4-L3)*4 #MWh\n", + "#Plotting Energy load curve\n", + "%matplotlib inline\n", + "from matplotlib.pyplot import *\n", + "L=array([0,L1,L2,L3,L4]) #MW\n", + "E=array([0,E1,E2,E3,E4]) #Mwh\n", + "subplot(3,1,1)\n", + "plot(E,L)\n", + "xlabel('Energy(MWh)') \n", + "ylabel('Load(MW)') \n", + "title('Energy Load Curve') \n", + "#Energy Supplied\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=[0,1,2,3,4] #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "subplot(3,1,3)\n", + "plot(T,E)\n", + "ylabel('Energy(MWh)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "title('Mass Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEZCAYAAABSN8jfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXm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QldXhtWE1vFUwt8240zwHeC6+HfZJ5EOQXhOo7obch3h4X5t/I1M\norqbKElyDCrvb0fSiFhXbeMz4pfx0O3AdpLeBi4CLs1z/oHx/P8GblX11IWTCN3LZyZ6PPZJnNo5\n3u/5hPGRzeymsP+rBuMh6B2nxCh4yjya5w2y2RNbJo+a2YAym9IiKEGrqSQ0q5aJ4zipwd9Sm45U\n1LW3TBzHcZyi8ZaJ4ziOUzQuJo7jOE7RuJg4juM4ReNi4jiO4xSNi4njOI5TNC4mjuM4TtH8f3Sp\nUZu5Oj0hAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.7 : page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "dmax=40 #MW#Maximum demand\n", + "CF=0.5 #Capacity Factor\n", + "UF=0.8 #Utilisation Factor\n", + "LF=CF/UF #/Load Factor\n", + "print \"(a) Load Factor =\",LF \n", + "C=dmax/UF #MW#Plant Capacity\n", + "print \"(b) Plant Capacity =\",C,\"MW \" \n", + "RC=C-dmax #MW#Reserve Capacity\n", + "print \"(c) Reserve Capacity =\",RC,\"MW \" \n", + "p=dmax*LF*24*365 #MWh#Annual Energy Production\n", + "print \"(d) Annual Energy Production =\",p,\"MWh\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Load Factor = 0.625\n", + "(b) Plant Capacity = 50.0 MW \n", + "(c) Reserve Capacity = 10.0 MW \n", + "(d) Annual Energy Production = 219000.0 MWh\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.8 : page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Energy Required in 24 hours\n", + "E=L1*t1+(L2+L3)/2*t2+(L3+L4)/2*t3+(L4+L5)/2*t4+(L5+L6)/2*t5+(L6+L1)/2*t6 #MWh\n", + "print \"Energy required in one day =\",E,\"MWh\" \n", + "DLF=E/L5/24*100 #%#Daily Load Factor\n", + "print \"Daily Load Factor =\",round(DLF,2),\"%\" \n", + "#Plotting load curve\n", + "% matplotlib inline\n", + "T=arange(0,7,1) #Slots\n", + "L=array([L1,L2,L3,L4,L5,L6,L7]) #MW\n", + "plot(T,L)\n", + "ylabel('Load(MW)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-8pm 4-5:8-10pm 5-6 :10-12pm') \n", + "title('Chronological Load Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy required in one day = 2060.0 MWh\n", + "Daily Load Factor = 57.22 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucHFWZ//HPlxDUgBIQ5RokiihRUGBB0EVHFBVcEsD1\ngooGVBTWoAg/CYoSXUREvBEFVlgi4hJABAQJCiKjsFwFQrhKQC4JSLjI1bgQyPP745xJOp3unp6e\n7q6+fN+v17zSXV1d/VTPpJ465zl1ShGBmZlZI1YpOgAzM+teTiJmZtYwJxEzM2uYk4iZmTXMScTM\nzBrmJGJmZg1zErGGSZoh6bSi4wCQtFTSq5uwnTmS9h7lNqZKuny0sYwyhkFJnyoyBusPTiJWk6SP\nSvqzpKclPZgPsm/LL/fcRUYRsWtEtC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P78KfLVk1VeUvOcy4OCIuGGYXT2P1KUwizTL81/ytt9bsq1VgHEl\n3+POwNCdFQVMURqRuAap4HooqdU1IhGxrE4iaRZwQUT8Oi86vuS1dUk3sQpJ25EmeS2/XfAj1WIu\n3bcKSn8H55O6Zc5QGgn1REQsyseWjSVtHxFXAx8FLh9mW5U/LHVJjYmIp7V8mvhvVDpeSVogabNI\n9c6RTLe+QhwR8TdJT0l6C6nAvjfpxK7S33e1uLcCTgTem0+mSm2Xv6P7ScffE+uMs6q2JpEYwZTu\nqjI9unI9pFKXlqR7SSNgVpO0O+mP8xlSRr4duEGpjjQzchGsxIuA3+YD8BjgElIXAsAM4JeSHieN\nTnnV0C6xYmYv765bqftO0h7AcaQzyAsl3RgRu1T4CmaS7tl9SY75qog4QNIGwEkVunpqxV/uh1o+\nFPUbJQfBpu1ntfgrrPdtSa8jdUndTUoK1NjPWvGXOxQ4TdIPgYdZPgV2kP4TXUtKnJ+NiOck1drP\n8teGfD6f9S0hHRxHPM12/huo1KV1NGkK74NI/dSfLl8hIpZK2hc4S+mL/jupBjUU8zxSN9Y6pJFq\nD+Xvu1ZNYzTdzv8O7C/peWAx6R4kQKqJAJ/KMVSLeQWSDiSdjKxLupXAhRGxX0TMURomfBep+6j0\ne/8LqevpFNLBvFIdZ7i/aRjZNPHDTreuVKD+l6EurUrHq4i4g1TD+RmpJ2BOVLllgqRjgL2Al+Rj\n5EkR8U3gGGB14Owc+30RMVScvw74MbAp6d4w51bZ/+G+m+VxpC5Os/5RciZ9zrArdzFJRwDPRMT3\nio6lXfJZ9gURsUXBoXQcpds2HxwRNUdbjZSvWDfrbf14ltiP+1yP0bYyK3JLxMzMGuaWiJmZNcxJ\nxMzMGuYkYmZmDXMSMTOzhjmJmJlZw5xEzMysYf8fAHl1R8P2C3cAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.9 : page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Load Duration Curve\n", + "l1=L5 #Mw\n", + "l2=L4 #MW\n", + "l3=L1 #MW\n", + "L=array([l1,l2,l2,l3,l3])\n", + "T=arange(0,30,6) #Duration in hours\n", + "subplot(3,1,1)\n", + "plot(T,L)\n", + "ylabel('Load(MW)') \n", + "xlabel('Hours') \n", + "title('Load Duration Curve') \n", + "#Energy Consumed\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=arange(0,5,1) #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "subplot(3,1,3)\n", + "plot(T,E)\n", + "ylabel('Energy(MWh)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "title('Mass Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEZCAYAAABvpam5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXe4FNX5xz9fURRUmgQBAbFgbGDBQowKEk3sJjYwamwx\n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Owvq1W+tCR9TyF0+SDgPkkP5LoXQitgHeCRaPPV8fx8/bmF7M/mckmvA08DFyZe\nfo12n/nsz8GFkibHbo8hwFn13Gch+7M5GxgV6+TITNnR3unAC4SxmJPMbGk995l9LMNpCgPCEwmz\nxVKHHVf+MY+LgENiN+LvgB/mOf+M+ExtQAjlfg1AHF95X2E85u/UjmtAeCmfKmkK0BH4a0wvdM+5\n7v9BYPVYzoWErqsMXxBav5MJ/7eZwf9jgD/E/5cBiXQIQnMktd2KSwkv84vjMzKR2m6fJMkxpLzP\njqRLYl21i++I8+Kha4H1JL0D/BQ4J8/5O8bzDwX+rlpXgsMJ3cXHJno0BiRO7Rzv93TC+MYqdlPc\n31XReEh2x2lkFGay3JPnC7HFE1se95hZ/zKb0ipohFZRSbSolofjOBWDf5U2H2Wpa295OI7jOKnx\nlofjOI6TGhcPx3EcJzUuHo7jOE5qXDwcx3Gc1Lh4OI7jOKlx8XAcx3FS8//ja4GDLNv8OwAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb b/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb new file mode 100755 index 00000000..3adc7469 --- /dev/null +++ b/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb @@ -0,0 +1,571 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a43ad834b520d63f186663d7cd92f123a2eb2f923f95a0f00e0d45a5a563ba8b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.1 : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array\n", + "B=100 #W(8Bulb)\n", + "F=60 #W(2Fan)\n", + "L=100 #W(2Light)\n", + "LoadConnected=8*B+2*F+2*L #W\n", + "print \"(a) Connected Load =\",LoadConnected,\"W\"\n", + "#12 midnight to 5am\n", + "demand1=1*F #W\n", + "#5am to 7am\n", + "demand2=2*F+1*L #W\n", + "#7am to 9am\n", + "demand3=0 #W\n", + "#9am to 6pm\n", + "demand4=2*F #W\n", + "#6pm to midnight\n", + "demand5=2*F+4*B #W\n", + "DEMAND=array([demand1, demand2, demand3, demand4, demand5])\n", + "max_demand=max(DEMAND) \n", + "print \"(b) Maximum demand =\",max_demand,\"W\" \n", + "df=max_demand/LoadConnected #demand factor\n", + "print \"(c) Demand factor =\",df \n", + "E=demand1*5+demand2*2+demand3*2+demand4*9+demand5*6 #Wh\n", + "E=E/1000 #kWh\n", + "print \"(d) Energy consumed during 24 hours =\",E,\"kWh \"\n", + "Edash=LoadConnected*24/1000 #kWh\n", + "print \"(e) Energy consumed during 24 hours if all devices are used =\",Edash,\"kWh\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Connected Load = 1120 W\n", + "(b) Maximum demand = 520 W\n", + "(c) Demand factor = 0.464285714286\n", + "(d) Energy consumed during 24 hours = 4.94 kWh \n", + "(e) Energy consumed during 24 hours if all devices are used = 26.88 kWh\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.2 : page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "LoadA=2.5*1000 #W\n", + "#12 midnight to 5am\n", + "d1A=100 #W\n", + "#5am to 6am\n", + "d2A=1.1*1000 #W\n", + "#6am to 8am\n", + "d3A=200 #W\n", + "#8am to 5pm\n", + "d4A=0 #W\n", + "#5pm to 12 midnight\n", + "d5A=500 #W\n", + "LoadB=3*1000 #W\n", + "#11 pm to 7am\n", + "d1B=0 #W\n", + "#7 am to 8 am\n", + "d2B=300 #W\n", + "#8 am to 10 am\n", + "d3B=1*1000 #W\n", + "#10 am to 6 pm\n", + "d4B=200 #W\n", + "#6 pm to 11 pm\n", + "d5B=600 #W\n", + "DEMAND_A=array([d1A, d2A, d3A, d4A, d5A]) #W\n", + "DEMAND_B=array([d1B, d2B, d3B, d4B, d5B]) #W\n", + "max_demand_A=max(DEMAND_A) #W\n", + "max_demand_B=max(DEMAND_B) #W\n", + "df_A=max_demand_A/LoadA #demand factor\n", + "df_B=max_demand_B/LoadB #demand factor\n", + "print \"Demand factor of consumer A & B are :\",round(df_A,2),\"&\",round(df_B ,2)\n", + "gd_factor=(max_demand_A+max_demand_B)/max_demand_A \n", + "print \"Group diversity factor :\",round(gd_factor,2)\n", + "E_A=d1A*5+d2A*1+d3A*2+d4A*9+d5A*7 #Wh\n", + "E_B=d1B*8+d2B*1+d3B*2+d4B*8+d5B*5 #Wh\n", + "E_A=E_A/1000 #kWh\n", + "E_B=E_B/1000 #kWh\n", + "print \"Energy consumed by A & B during 24 hours =\",E_A,\"&\",E_B,\"kWh\"\n", + "Emax_A=max_demand_A*24/1000 #kWh\n", + "Emax_B=max_demand_B*24/1000 #kWh\n", + "print \"Maximum energy consumer A & B can consume during 24 hours =\",Emax_B,Emax_A,\"kWh \"\n", + "ratio_A=E_A/Emax_A \n", + "ratio_B=E_B/Emax_B \n", + "print \"Ratio of actual energy to maximum energy of consumer A & B :\",round(ratio_A,2),\"&\",round(ratio_B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demand factor of consumer A & B are : 0.44 & 0.33\n", + "Group diversity factor : 1.91\n", + "Energy consumed by A & B during 24 hours = 5.5 & 6.9 kWh\n", + "Maximum energy consumer A & B can consume during 24 hours = 24.0 26.4 kWh \n", + "Ratio of actual energy to maximum energy of consumer A & B : 0.21 & 0.29\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.3 : page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=600 #No. of apartments\n", + "L1=5 #kW#Each Apartment Load\n", + "n2=20 #No. of general purpose shops\n", + "L2=2 #kW#Each Shop Load\n", + "df=0.8 #demand factor\n", + "#1 Floor mill\n", + "L3=10 #kW#Load\n", + "df3=0.7 #demand factor\n", + "#1 Saw mill\n", + "L4=5 #kW#Load\n", + "df4=0.8 #demand factor\n", + "#1 Laundry\n", + "L5=20 #kW#Load\n", + "df5=0.65 #demand factor\n", + "#1 Cinema\n", + "L6=80 #kW#Load\n", + "df6=0.5 #demand factor\n", + "#Street lights\n", + "n7=200 #no. of tube lights\n", + "L7=40 #W#Load of each light\n", + "#Residential Load\n", + "df8=0.5 #demand factor\n", + "gdf_r=3 #group diversity factor\n", + "pdf_r=1.25 #peak diversity factor\n", + "#Commertial Load\n", + "gdf_c=2 #group diversity factor\n", + "pdf_c=1.6 #peak diversity factor\n", + "#Solution :\n", + "#Maximum demand of each apartment\n", + "dmax_1a=L1*df8 #kW\n", + "#Maximum demand of 600 apartment\n", + "dmax_a=n1*dmax_1a/gdf_r #kW\n", + "#demand of apartments at system peak time\n", + "d_a_sp=dmax_a/pdf_r #kW\n", + "#Maximum Commercial demand\n", + "dmax_c=(n2*L2*df+L3*df3+L4*df4+L5*df5+L6*df6)/gdf_c #kW\n", + "#Commercial demand at system peak time\n", + "d_c_sp=dmax_c/pdf_c #kW\n", + "#demand of street light at system peak time\n", + "d_sl_sp=n7*L7/1000 #kW\n", + "#Increase in system peak demand\n", + "DI=d_a_sp+d_c_sp+d_sl_sp #kW\n", + "print \"Increase in system peak demand =\",DI,\"kW \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in system peak demand = 438.0 kW \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.4 : page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "print \"Energy Supplied by the plant in 24 hours =\",E,\"MWh \" \n", + "LF=E/24 #%#Load Factor\n", + "print \"Load Factor =\",round(LF,2),\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Supplied by the plant in 24 hours = 1420 MWh \n", + "Load Factor = 59.17 % \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.5 : page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "C=125 #MW#Installed Capacity\n", + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "LF=E/24 #%#Load Factor\n", + "CF=LF/C #%#Capacity Factor\n", + "print \"Capacity Factor =\",round(CF,2),\"% \" \n", + "UF=100/C #%#Utilisation Factor\n", + "print \"Utilisation Factor =\",UF,\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity Factor = 0.47 % \n", + "Utilisation Factor = 0.8 % \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.6 : page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am & 10 to 12 am\n", + "L1=20 #MW\n", + "E1=L1*24 #MWh\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "E2=E1+(L2-L1)*17 #MWh\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "E3=E2+(L3-L2)*13 #MWh\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "E4=E3+(L4-L3)*4 #MWh\n", + "#Plotting Energy load curve\n", + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "L=array([0,L1,L2,L3,L4]) #MW\n", + "E=array([0,E1,E2,E3,E4]) #Mwh\n", + "plt.subplot(3,1,1)\n", + "plt.plot(E,L)\n", + "plt.xlabel('Energy(MWh)') \n", + "plt.ylabel('Load(MW)') \n", + "plt.title('Energy Load Curve') \n", + "#Energy Supplied\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=[0,1,2,3,4] #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "plt.subplot(3,1,3)\n", + "plt.plot(T,E)\n", + "plt.ylabel('Energy(MWh)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "plt.title('Mass Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0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bhPIUB5kkEb7T6hwbPP2ZyDXBC7Ha8CvhenvMviL+pnoTQ9X8FiOMzsxXGc26lelwEwkP6x5Jm\nAB2BP8f02u451/0/CWwZr/NbQldXhtWE1vFUwt8240zwHeC6+HfZJ5EOQXhOo7obch3h4X5t/I1M\norqbKElyDCrvb0fSiFhXbeMz4pfx0O3AdpLeBi4CLs1z/oHx/P8GblX11IWTCN3LZyZ6PPZJnNo5\n3u/5hPGRzeymsP+rBuMh6B2nxCh4yjya5w2y2RNbJo+a2YAym9IiKEGrqSQ0q5aJ4zipwd9Sm45U\n1LW3TBzHcZyi8ZaJ4ziOUzQuJo7jOE7RuJg4juM4ReNi4jiO4xSNi4njOI5TNC4mjuM4TtH8f3Sp\nUZu5Oj0hAAAAAElFTkSuQmCC\n", + "text": [ + "" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.7 : page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "dmax=40 #MW#Maximum demand\n", + "CF=0.5 #Capacity Factor\n", + "UF=0.8 #Utilisation Factor\n", + "LF=CF/UF #/Load Factor\n", + "print \"(a) Load Factor =\",LF \n", + "C=dmax/UF #MW#Plant Capacity\n", + "print \"(b) Plant Capacity =\",C,\"MW \" \n", + "RC=C-dmax #MW#Reserve Capacity\n", + "print \"(c) Reserve Capacity =\",RC,\"MW \" \n", + "p=dmax*LF*24*365 #MWh#Annual Energy Production\n", + "print \"(d) Annual Energy Production =\",p,\"MWh\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Load Factor = 0.625\n", + "(b) Plant Capacity = 50.0 MW \n", + "(c) Reserve Capacity = 10.0 MW \n", + "(d) Annual Energy Production = 219000.0 MWh\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.8 : page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import arange\n", + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Energy Required in 24 hours\n", + "E=L1*t1+(L2+L3)/2*t2+(L3+L4)/2*t3+(L4+L5)/2*t4+(L5+L6)/2*t5+(L6+L1)/2*t6 #MWh\n", + "print \"Energy required in one day =\",E,\"MWh\" \n", + "DLF=E/L5/24*100 #%#Daily Load Factor\n", + "print \"Daily Load Factor =\",round(DLF,2),\"%\" \n", + "#Plotting load curve\n", + "% matplotlib inline\n", + "T=arange(0,7,1) #Slots\n", + "L=array([L1,L2,L3,L4,L5,L6,L7]) #MW\n", + "plt.plot(T,L)\n", + "plt.ylabel('Load(MW)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-8pm 4-5:8-10pm 5-6 :10-12pm') \n", + "plt.title('Chronological Load Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy required in one day = 2060.0 MWh\n", + "Daily Load Factor = 57.22 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucHFWZ//HPlxDUgBIQ5RokiihRUGBB0EVHFBVcEsD1\ngooGVBTWoAg/CYoSXUREvBEFVlgi4hJABAQJCiKjsFwFQrhKQC4JSLjI1bgQyPP745xJOp3unp6e\n7q6+fN+v17zSXV1d/VTPpJ465zl1ShGBmZlZI1YpOgAzM+teTiJmZtYwJ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Zw5xEzMysYf8fAHl1R8P2C3cAAAAASUVORK5CYII=\n", + "text": [ + "" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.9 : page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Load Duration Curve\n", + "l1=L5 #Mw\n", + "l2=L4 #MW\n", + "l3=L1 #MW\n", + "L=array([l1,l2,l2,l3,l3])\n", + "T=arange(0,30,6) #Duration in hours\n", + "plt.subplot(3,1,1)\n", + "plt.plot(T,L)\n", + "plt.ylabel('Load(MW)') \n", + "plt.xlabel('Hours') \n", + "plt.title('Load Duration Curve') \n", + "#Energy Consumed\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=arange(0,5,1) #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "plt.subplot(3,1,3)\n", + "plt.plot(T,E)\n", + "plt.ylabel('Energy(MWh)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "plt.title('Mass Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, +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pBEKU3ceiTdn/jysvSaJ+FJZ3+DdwY+KDJckw4OL477Ml2piKFtXyiH2JmXDoU4CxZvZGrrwK\nob6fBTaTNEPScTE975iHpKnAn4Bj4zmbK6wNfC6wBfBy/Io4PsfpawIPSnqF8AKbQegqABgF3Cbp\nJWAutV8ORt2viOwvq1W+tCR9TyF0+SDgPkkP5LoXQitgHeCRaPPV8fx8/bmF7M/mckmvA08DFyZe\nfo12n/nsz8GFkibHbo8hwFn13Gch+7M5GxgV6+TITNnR3unAC4SxmJPMbGk995l9LMNpCgPCEwmz\nxVKHHVf+MY+LgENiN+LvgB/mOf+M+ExtQAjlfg1AHF95X2E85u/UjmtAeCmfKmkK0BH4a0wvdM+5\n7v9BYPVYzoWErqsMXxBav5MJ/7eZwf9jgD/E/5cBiXQIQnMktd2KSwkv84vjMzKR2m6fJMkxpLzP\njqRLYl21i++I8+Kha4H1JL0D/BQ4J8/5O8bzDwX+rlpXgsMJ3cXHJno0BiRO7Rzv93TC+MYqdlPc\n31XReEh2x2lkFGay3JPnC7HFE1se95hZ/zKb0ipohFZRSbSolofjOBWDf5U2H2Wpa295OI7jOKnx\nlofjOI6TGhcPx3EcJzUuHo7jOE5qXDwcx3Gc1Lh4OI7jOKlx8XAcx3FS8//ja4GDLNv8OwAAAABJ\nRU5ErkJggg==\n", + "text": [ + "" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/NirenNegandhi/ch2_2.ipynb b/sample_notebooks/NirenNegandhi/ch2_2.ipynb new file mode 100755 index 00000000..9f685b2b --- /dev/null +++ b/sample_notebooks/NirenNegandhi/ch2_2.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:93b6ee47cf464df569e4895dab3158be49c4f81380cffe2b4a954430fff24e01" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Nuclear Models" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.1, Page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# For Ca(20,40), actual binding energy is ...... \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 20; # Number of protons\n", + "N = 20; # Number of neutrons\n", + "M_n = 39.962591; # Mass of the nucleus, amu\n", + "B_actual = (M_n-Z*m_p-N*m_n)*931.49; # Actual binding energy, MeV\n", + "# For Ca(20,40), Binding energ as per semiemperical mas formula......\n", + "Z = 20; # Number of protons\n", + "a_v = 15.5; # Volume constant, MeV\n", + "a_s = 16.8; # Surface constant, MeV\n", + "a_a = 23.0; # Asymmetric constant, MeV\n", + "a_c = 0.7; # Coulomb constant, MeV\n", + "a_p = 34.0; # Paring constant, MeV\n", + "A = 40; # Mass number\n", + "\n", + "#Calculations\n", + "B_semi = (a_v*A-(a_s*A**(2./3))-(a_c*Z*(Z-1)/A**(1./3))-(a_a*(A-2*Z)**2/A)-(a_p*A**(-3./4))); # Binding energy as per semiemperical mass formula\n", + "# Percentage discrepancy between actual and semiemperical mass formula values are.......\n", + "Per_des = -(B_semi+B_actual)/B_actual*100; # Percentage discrepancy \n", + "\n", + "#Result\n", + "print \"Actual binding energy = %6.2f MeV\\nBinding energy as per semiemperical mass formula = %6.2f MeV\\nPercentage discrepancy = %.2f percent\"%(B_actual, B_semi, Per_des)\n", + "\n", + "#answers vary due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual binding energy = -342.05 MeV\n", + "Binding energy as per semiemperical mass formula = 343.59 MeV\n", + "Percentage discrepancy = 0.45 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.2, Page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration \n", + " # Calculation of coulomb energy for mirror nuclei : N-7 and O-8\n", + " # For N-7 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_N = 7; # Atpmic no. \n", + "A = 15; # Atomic mass\n", + "E_C_N = a_c*Z_N*(Z_N-1)/(A**(1./3)); # Coulomb energy for N-7, MeV\n", + "# For O-8 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_O = 8; # Atpmic no. \n", + "A = 15.; # Atomic mass\n", + "\n", + "#Calculations\n", + "E_C_O = a_c*Z_O*(Z_O-1)/(A**(1./3)); # Coulomb energy for O-8, MeV\n", + "C_E_d = E_C_O-E_C_N; # Coulomb energy difference, MeV\n", + "m_p = 1.007276*931.49; # Mass of proton, MeV\n", + "m_n = 1.008665*931.49; # Mass of neutron, MeV\n", + "M_d = m_n-m_p; # Mass difference of nucleons, MeV \n", + "D_C_M = round(C_E_d-M_d); # Difference in coulomb energy and nucleon mass difference, MeV\n", + "M_O = 15.003070*931.49; # Mass of O-8, MeV\n", + "M_N = 15.000108*931.49; # Mass of N-7, MeV\n", + "D_A = (M_O-M_N); # Actual mass difference, MeV\n", + "\n", + "#Result\n", + "print \"Difference in Coulomb energy = %5.3f MeV\\nNucleon mass difference = %6.4f MeV\\nDifference in Coulomb energy and nucleon mass difference = %5.3f MeV\\nActual mass difference = %.3f MeV\"%(C_E_d, M_d ,D_C_M, D_A)\n", + "if D_A == D_C_M:\n", + " print \"Result is verified\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in Coulomb energy = 3.974 MeV\n", + "Nucleon mass difference = 1.2938 MeV\n", + "Difference in Coulomb energy and nucleon mass difference = 3.000 MeV\n", + "Actual mass difference = 2.759 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.3, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration&Calculations\n", + "# For Kr-80, \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 36; # Number of protons\n", + "N_80 = 44; # Number of neutrons\n", + "M_n_80 = 79.91628; # Mass of Kr nucleus\n", + "BE_Kr_80 = (Z*m_p+N_80*m_n-M_n_80)*931.49; # Binding energy for Kr-80, MeV\n", + "# For Kr-81,\n", + "N_81 = 45; # Number of neutrons\n", + "M_n_81 = 80.91661; # Mass of Kr-81 nucleus\n", + "BE_Kr_81 = (Z*m_p+N_81*m_n-M_n_81)*931.49; # Binding energy for Kr-81 nucleus\n", + "# For Kr-82\n", + "N_82 = 46; # Number of neutrons\n", + "M_n_82 = 81.913482; # Mass of Kr nucleus\n", + "BE_Kr_82 = (Z*m_p+N_82*m_n-M_n_82)*931.49; # Binding energy for Kr-82,MeV\n", + "# For Kr-83 \n", + "N_83 = 47; # Number of protons\n", + "M_n_83 = 82.914134; # Mass of Kr-83 nucleus\n", + "BE_Kr_83 = (Z*m_p+N_83*m_n-M_n_83)*931.49; # Binding energy for Kr-83, MeV\n", + "E_sep_81 = BE_Kr_81-BE_Kr_80; # Energy seperation of neutron for Kr-81, MeV\n", + "E_sep_82 = BE_Kr_82-BE_Kr_81; # Energy seperation of neutron for Kr-82, MeV\n", + "E_sep_83 = BE_Kr_83-BE_Kr_82; # Energy seperation of neutron for Kr-83, MeV\n", + "\n", + "#Result\n", + "print \"Energy seperation of neutron for Kr-81 = %4.2f MeV\\nEnergy seperation of neutron for Kr-82 = %4.2f MeV\\nEnergy seperation of neutron for Kr-83 = %5.2f MeV\"%(E_sep_81, E_sep_82, E_sep_83)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy seperation of neutron for Kr-81 = 7.76 MeV\n", + "Energy seperation of neutron for Kr-82 = 10.99 MeV\n", + "Energy seperation of neutron for Kr-83 = 7.46 MeV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.4, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy coefficient, MeV\n", + "a_s = 16.8; # Surface energy coefficient MeV\n", + "a_c = 0.7; # Coulomb energy coefficient, MeV\n", + "a_a = 23.0; # Asymmetric energy coefficient, MeV\n", + "a_p = 34.0; # Pairing energy coefficient, MeV\n", + "A = 75; # Given atomic mass \n", + "\n", + "#Calculations\n", + "z = Symbol('z')\n", + "B =solve((((-a_c*(2*z-1))/A**1./3)+((4*a_a*(A-2*z))/A)),z) # Binding energy as per liquid drop model\n", + "\n", + "#Result\n", + "print \"Most stable isotope of A = 75 corresponds to Z = %.d\"%B[0]\n", + "\n", + "#answer varies due to usage of sympy module" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotope of A = 75 corresponds to Z = 37\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.5, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy, MeV \n", + "a_s = 16.8; # Surface energy, MeV \n", + "a_c = 0.7; # Coulomb energy, MeV\n", + "a_a = 23.0; # Asymmetric energy, MeV\n", + "a_p = 34.0; # Pairing energy, MeV\n", + "\n", + "z = Symbol('z')\n", + "A = 27\n", + "#Calculations\n", + "# For A = 27;\n", + "A = 27\n", + "Z_27 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 118 \n", + "A = 118\n", + "Z_118 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 238\n", + "A = 238\n", + "Z_238 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "#Result\n", + "print \"Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = %d, %d and %d respectively\"%(Z_27, Z_118, Z_238)\n", + "\n", + "#Incorrect answers in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = 13, 58 and 118 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.6, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Mirror nuclei : Na-11 and Mg-12 \n", + "m_p = 1.007276; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "M_Mg = 22.994124; # Atomic mass of Mg-12, amu\n", + "M_Na = 22.989768; # Atomic mass of Na-11, amu\n", + "A = 23; # Mass number\n", + "Z_Mg = 12; # Atomic number of Mg-12\n", + "e = 1.6e-019; # Charge of the electron, C\n", + "K = 8.98e+09; # Coulomb force constant\n", + "\n", + "#Calculations\n", + "a_c = A**(1./3)/(2*Z_Mg-1)*((M_Mg-M_Na)+(m_n-m_p))*931.47; # Coulomb coefficient, MeV \n", + "r_0 = 3./5*K*e**2/(a_c*1.6e-013); # Nuclear radius, m\n", + "\n", + "#Result\n", + "print \"Coulomb coefficient = %4.2f MeV\\nNuclear radius = %3.1e m\"%(a_c, r_0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb coefficient = 0.66 MeV\n", + "Nuclear radius = 1.3e-15 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.7, Page 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Z = 92; # Atomic number of U-236\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "A = 236; # Mass number of U-236\n", + "K = 8.98e+09; # Coulomb constant,\n", + "r_o = 1.2e-015; # Distance of closest approach, m\n", + "a_s = -16.8; # Surface constant\n", + "\n", + "#Calculations\n", + "E_c = -(3*K*Z*(Z-1)*e**2)/(5*r_o*A**(1./3)*1.6e-013); # Coulomb energy, MeV\n", + "E_s = a_s*A**(2./3); # Surface energy, MeV \n", + "\n", + "#Result\n", + "print \"Coulomb energy for U(92,236) = %5.1f MeV \\nSurface energy for U(92,236) = %5.1f MeV \"%(E_c, E_s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb energy for U(92,236) = -973.3 MeV \n", + "Surface energy for U(92,236) = -641.6 MeV \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.1, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.4, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/Nitin Kumar/chapter12.ipynb b/sample_notebooks/Nitin Kumar/chapter12.ipynb new file mode 100755 index 00000000..ceed3190 --- /dev/null +++ b/sample_notebooks/Nitin Kumar/chapter12.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1379f2f8d6e289c373beb86705dd50349840a6850fd79932957ae177aa587cc0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Microwave Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page Number: 649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Is=0.1*(10**-6) #A\n", + "Pi=0 #dBm\n", + "Cs=0.1*(10**-12) #F\n", + "Ls=2*(10**-9) \n", + "Cj=0.15*(10**-12) #F\n", + "Rs=10 #ohm\n", + "T=293 #K\n", + "nktbye=25*(10**-3) #V\n", + "\n", + "#Rj\n", + "Rj=(nktbye/Is) \n", + "print 'Rj =',Rj/1000,'kohm'\n", + "\n", + "#Bi\n", + "Bi=nktbye/2 \n", + "Bii=Bi*1000 \n", + "print 'Bi =',Bii,'A/W' \n", + "\n", + "#Bv\n", + "Bv=Rj*Bii \n", + "print 'Bv =',Bv,'V/W' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rj = 250.0 kohm\n", + "Bi = 12.5 A/W\n", + "Bv = 3125000.0 V/W\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page Number: 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#Given\n", + "vswr=4.0 \n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "Lm=-10*log10(1-(modT*modT)) #dB\n", + "print 'Mismatch Loss =',round(Lm,3),'dB' \n", + "\n", + "#Sensitivity reduces by a factor\n", + "Bvd=(1-(modT*modT)) \n", + "Bvdp=Bvd*100 \n", + "print 'Voltge sensitivity reduces by',Bvdp,\"%\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mismatch Loss = 1.938 dB\n", + "Voltge sensitivity reduces by 64.0 %\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page Number: 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#Given\n", + "f=10E+9 #Hz\n", + "c=3E+10 #cm/s\n", + "a=4 #cm\n", + "s=0.1 #cm\n", + "lmb=c/f #cm\n", + "lmbg=lmb/(sqrt(1-((lmb/(2*a))**2))) \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR =',round(vswr,3) \n", + "\n", + "#Answer in book for lmbg is given as 3.49 but it should be 3.23 and hence the answer will be 10.3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR = 10.301\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page Number: 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "delx=3.5 #cm\n", + "s=0.25 #cm\n", + "\n", + "lmbg=2*delx \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR =',round(vswr,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR = 8.913\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page Number: 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "vswr=2.0 \n", + "Pin=4.5E-3 #W\n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "#Power reflected,\n", + "Pr=(modT**2)*Pin \n", + "#As coupler samples only 1/1000th power\n", + "Prr=Pr*1000 \n", + "print 'Reflected Power =',Prr,'W' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflected Power = 0.5 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page Number: 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "from math import tan, sqrt, pi\n", + "Z0=50 #ohm\n", + "p=2.4 \n", + "L=0.313 \n", + "x=2*pi*L \n", + "y=tan(x) \n", + "\n", + "Zl=(Z0*(1+(p*p*1J)))/(p+(p*1J)) \n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(T.real**2+T.imag**2) \n", + "print 'Reflection coefficient =',round(p,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient = 0.41\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page Number: 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Zl=25+25*1J #ohm\n", + "Z0=50 #ohm\n", + "\n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(T.real**2+T.imag**2) \n", + "print 'Reflection coefficient =',round(p,2) \n", + "\n", + "vswrr=(1+p)/(1-p) \n", + "print 'VSWR =', round(vswrr,2) \n", + "\n", + "#Fraction of power delivered\n", + "Pd=1-(p**2) \n", + "Pdp=Pd*100 \n", + "print 'Fraction of power delivered =',Pdp,'%' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient = 0.45\n", + "VSWR = 2.62\n", + "Fraction of power delivered = 80.0 %\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page Number: 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=2.4 #cm\n", + "lmbc=1.8 \n", + "c=3*10**10 #cm/s\n", + "\n", + "lmbg=2*d \n", + "lmb=(lmbg*lmbc)/(sqrt(lmbg**2+lmbc**2)) \n", + "#Operating frequency\n", + "f=c/lmb \n", + "print 'Operating frequency =',round((f/10**9),2), 'GHz' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 17.8 GHz\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page Number: 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from numpy import array#Given\n", + "p=1.5 \n", + "IsL=1 #dB\n", + "InL=30 #dB\n", + "\n", + "S21=10**(-IsL/20) \n", + "\n", + "#Assuming three ports to be identical\n", + "S32=S21 \n", + "S13=S21 \n", + "\n", + "#Isolations are also the same\n", + "S31=10**(-InL/20) \n", + "S23=S31 \n", + "S12=S31 \n", + "\n", + "#Refelction coefficients are also the same\n", + "T=(p-1)/(p+1) \n", + "S11=T \n", + "S22=T \n", + "S33=T \n", + "\n", + "S=array([S11,S12,S13,S21,S22,S23,S31,S32,S33] )\n", + "print 'Matrix is:',S " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix is: [ 0.2 0.01 0.1 0.1 0.2 0.01 0.01 0.1 0.2 ]\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page Number: 654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=10.6 #GHz\n", + "R2=8.30 #GHz\n", + "Q0=8200 \n", + "Q0d=890.0 \n", + "\n", + "Er=(R1/R2)**2 \n", + "print 'Dielectric constant =', round(Er ,2)\n", + "\n", + "Qd=(Q0-Q0d)/(Q0*Q0d) \n", + "print 'Loss tangent of dielectric =',round(Qd ,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant = 1.63\n", + "Loss tangent of dielectric = 0.001\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11 Page Number: 654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l0=0.15 #cm\n", + "lmbg=2*2.24 #cm\n", + "le=1.14 #cm\n", + "a=2.286 #cm\n", + "d=2 \n", + "\n", + "B0=(2*pi)/lmbg \n", + "x=tan(B0*l0)/(B0*l0) \n", + "#Also\n", + "x1=(l0*x)/le \n", + "#Correct value seems to be\n", + "Bele=2.786 \n", + "e1=((((a/pi)**2)*(Bele/le)**2)+1) \n", + "e2=(((2*a)/lmbg)**2)+1 \n", + "Er=e1/e2 \n", + "print 'Er =',round(Er ,3)\n", + "\n", + "\n", + "#Answer in book for Er is given as 2.062 but it should be 2.038" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Er = 2.039\n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/ParitoshMehta/ch1.ipynb b/sample_notebooks/ParitoshMehta/ch1.ipynb new file mode 100755 index 00000000..8ed87e00 --- /dev/null +++ b/sample_notebooks/ParitoshMehta/ch1.ipynb @@ -0,0 +1,466 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:82344ff688f3e86a09716345a8eb43cec4a8aadc2157f526516e21d9f1e84d30" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Hydrostatics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "w= 62.4 #lb/ft**3\n", + "A= 18. #ft**2\n", + "x= 6. # height ft\n", + "kg= 6.\n", + "y= 2. #ft hinges\n", + "y1= 5. #ft\n", + "\n", + "#CALCULATIONS\n", + "F= w*A*x\n", + "F1= F/2\n", + "Ft= (F*y-F1*(y1/2))/y1\n", + "Fb= F1-Ft\n", + "\n", + "#RESULTS\n", + "print 'Force exerted on the bolt = %.f lb'%(F1)\n", + "print ' Force exerted on the hinge = %.f lb'%(Ft)\n", + "print ' Force exerted on the bolt = %.f lb'%(Fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted on the bolt = 3370 lb\n", + " Force exerted on the hinge = 1011 lb\n", + " Force exerted on the bolt = 2359 lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h1= 11.54 \t#ft\n", + "h2= 16.33 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "x1= 7.69 \t#ft\n", + "x2= 14.09 \t#ft\n", + "x3= 18.23 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Ft= round(w*h1**2/2)\n", + "\n", + "#RESULTS\n", + "print 'h1 = %.2f ft'%(h1)\n", + "print ' h2 = %.2f ft'%(h2)\n", + "print ' h1+ = %.2f ft'%(x1)\n", + "print ' h2+ = %.2f ft'%(x2)\n", + "print ' h3+ = %.2f ft'%(x3)\n", + "print ' Thrust force = %.f lb/ft run'%(round(Ft,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h1 = 11.54 ft\n", + " h2 = 16.33 ft\n", + " h1+ = 7.69 ft\n", + " h2+ = 14.09 ft\n", + " h3+ = 18.23 ft\n", + " Thrust force = 4160 lb/ft run\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "spo= 0.9 # gravity\n", + "h= 3. \t#ft depth\n", + "d= 2. \t #ft depth of water\n", + "w= 62.4 \t#lb/ft**3\n", + "H= 0.71 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "do= spo*w\n", + "de= w*d\n", + "bc= do*h\n", + "Pt= (bc*(h/2)+bc*d+de*(d/2))*(h+d)\n", + "y= (bc*(h/2)+bc*d+de*(d/2)*(d/3))*(h+d)/Pt+H\n", + "\n", + "#RESULTS\n", + "print \"Total pressure = %d lb\"%(Pt)\n", + "print ' position of centre of pressure above the base = %.2f ft position of centre of pressure above the axis '%(y)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure = 3572 lb\n", + " position of centre of pressure above the base = 1.65 ft position of centre of pressure above the axis \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "a= 30. \t#degrees\n", + "b= 30. \t#degrees\n", + "h= 20. \t#ft width of lock\n", + "h1= 10. \t#ft water level\n", + "h2= 15. \t#ft water level\n", + "h3= 16. \t#ft high\n", + "w= 62.4 \t#lb/ft**3\n", + "h4= 10./3 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rt= (1./h3)*((w*(h*h2**2*(h2/3)/(2*math.sqrt(3))))-(w*(h*h1**2*h4/(2*math.sqrt(3)))))\n", + "R= ((w*(h*h2**2/(2*math.sqrt(3))))-(w*(h*h1**2/(2*math.sqrt(3)))))\n", + "Rb= R-Rt\n", + "\n", + "#RESULTS\n", + "print 'Force at the hinge = %.f lb '%(Rt)\n", + "print ' Force at the hinge = %.f lb '%(Rb)\n", + "\n", + "# Note : Round off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force at the hinge = 17826 lb \n", + " Force at the hinge = 27208 lb \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "x= 32. \t #ft\n", + "h= 60. \t#ft depth\n", + "w= 62.4 \t#lb/ft**3\n", + "AE= 20. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Vabc= 2*x*h/3\n", + "vc= Vabc*w\n", + "Tab= w*h**2/2\n", + "Rt= math.sqrt(vc**2+Tab**2)/2240\n", + "A= math.degrees(math.atan(vc/Tab))\n", + "AD= x-AE+AE*(1/(math.tan(math.radians(A))))\n", + "\n", + "\n", + "#RESULTS\n", + "print \"resulmath.tant thrust = %.1f tons\"%(Rt)\n", + "print \" Angle = %.2f degrees\"%(A)\n", + "print ' AD = %.1f ft '%(AD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resulmath.tant thrust = 61.5 tons\n", + " Angle = 35.42 degrees\n", + " AD = 40.1 ft \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "wdc= 3*math.sqrt(3) \t#ft\n", + "wdo= math.sqrt(3)\n", + "ac= 30. \t#degrees\n", + "ao= 60. \t#degrees\n", + "hob= 3. \t#ft\n", + "haf= 2.6 \t#ft\n", + "hfc= 3. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "V= 5.63 \t#ft**3\n", + "h= 4.3 \t#ft\n", + "y= 3.6 \t #ft\n", + "\n", + "#CALCULATIONS\n", + "W1= int(wdc*hfc*w/2)\n", + "Hbc= round(w*hob*(hob/2))\n", + "W2= int(V*w)\n", + "W3= int(w*haf*h)\n", + "Vt= W1+W2\n", + "Vht= Hbc+W3\n", + "Rt= int(math.sqrt(Vt**2+Vht**2))\n", + "A= math.degrees(math.atan(Vht/Vt))\n", + "x= (W1*(wdo-(hob/2))+Hbc*y)/Rt\n", + "OP= x/math.sin(math.radians(A))\n", + "AP= hob+OP\n", + "\n", + "#RESULTS\n", + "print \"Resultant thrust = %d lb\"%(Rt)\n", + "print \" Angle = %.2f degrees \"%(A)\n", + "print ' Distance from A till horizontal thrust = %.3f ft '%(AP)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant thrust = 1287 lb\n", + " Angle = 49.44 degrees \n", + " Distance from A till horizontal thrust = 4.150 ft \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 96. # T air\n", + "T= 10.5 \t#C\n", + "K1= 288. \t#C temperature gound level\n", + "K2= 0.0015 \t#C**-1 temperature gradient\n", + "h= 3000. \t#ft height\n", + "P1= 14.69\n", + "\n", + "#CALCULATIONS\n", + "P2= P1*10**(((1/(r*K2))*math.log10((K1-K2*h)/K1)))\n", + "w= P2*144/(r*(273+T))\n", + "\n", + "#RESULTS\n", + "print 'Density = %.4f lb/ft**3 '%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density = 0.0697 lb/ft**3 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Hb= 20. \t#in ratio\n", + "Ha= 1. \t#in ratio\n", + "a= 20. \t #degrees\n", + "\n", + "#CALCULATIONS\n", + "hb= Hb*math.sin(math.radians(a))\n", + "dh= hb+Ha\n", + "dP= dh/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Pressure difference between tapping points = %.3f lb/in**2 '%(dP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between tapping points = 0.283 lb/in**2 \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 180. \t#ln/in**2 pressure\n", + "r= 53. #T air\n", + "T= 60. \t#F temperature of air\n", + "w= 62.4 \t#lb/ft**3\n", + "h= 12. \t #in water level\n", + "\n", + "#CALCULATIONS\n", + "R= P*144/(r*(460+T))\n", + "dP= 12*(1-(R/w))\n", + "Pab= dP/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Difference in water level = %.2f in of water '%(dP)\n", + "print \" Pressure difference = %.3f lb/in**2\"%(Pab)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in water level = 11.82 in of water \n", + " Pressure difference = 0.427 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/ParthThakkar/ch6.ipynb b/sample_notebooks/ParthThakkar/ch6.ipynb new file mode 100644 index 00000000..af4c67a6 --- /dev/null +++ b/sample_notebooks/ParthThakkar/ch6.ipynb @@ -0,0 +1,320 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b09b7fb5366e8af61b1c0396c23ff3a998c9bd372716836d0d1fda9706db6296" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 6.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "S = 51;\t\t\t\t#no. of slots\n", + "C = 12;\t\t\t\t#conductors per slot\n", + "N = 900;\t\t\t\t#rpm(speed)\n", + "fi = 25./1000;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "Z = S*C;\t\t\t\t#total no. of conductors\n", + "E = 2*Z/c*N*p/60*fi;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Generated emf(V): %.2f\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated emf(V): 459.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 6.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 8.;\t\t\t\t#no. of poles\n", + "c = 8.;\t\t\t\t#no. of parallel paths\n", + "p = 8./2;\t\t\t\t#no. of pair of poles\n", + "E = 260.;\t\t\t\t#V(generated emf)\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "S = 120;\t\t\t\t#no. of slots\n", + "N = 350;\t\t\t\t#rpm(speed)\n", + "\n", + "# Calculations\n", + "Z = E/(2./c*N*p/60*fi);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"No. of conductors per slot\",int(Z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of conductors per slot 891\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 6.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 0.1;\t\t\t\t#ohm(Armature Resistance)\n", + "Vs = 250;\t\t\t\t#V(supply voltage)\n", + "\n", + "# Calculations and Results\n", + "#part(a)\n", + "I = 80;\t\t\t\t#A\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs+Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(a) Generated emf(V) : %.2f\"%emf\n", + "\n", + "#part(b)\n", + "I = 60;\t\t\t\t#A(current taken by Motor)\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs-Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(b) Generated emf(V) : %.2f\"%emf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) Generated emf(V) : 258.00\n", + "Part(b) Generated emf(V) : 244.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "Vs = 440;\t\t\t\t#V\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "Ia = 50;\t\t\t\t#A\n", + "Ra = 0.28;\t\t\t\t#ohm\n", + "Z = 888;\t\t\t\t#conductors\n", + "fi = 0.023;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 626.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 900;\t\t\t\t#rpm\n", + "Vs = 460.;\t\t\t\t#V\n", + "Vs_new = 200;\t\t\t\t#V\n", + "fi_ratio = 0.7;\t\t\t\t#ratio of new flux to original flux\n", + "\n", + "# Calculations\n", + "kfi = Vs/N;\t\t\t\t#for original flux\n", + "Nnew = Vs_new/kfi/fi_ratio;\t\t\t\t#rpm(new speed)\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(Nnew)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 559.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 6.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ia = 110;\t\t\t\t#A\n", + "Vs = 480;\t\t\t\t#V\n", + "Ra = 0.2;\t\t\t\t#ohm\n", + "P = 6.;\t\t\t\t#no. of poles\n", + "c = 6.;\t\t\t\t#no. of parallel paths\n", + "p = P/2;\t\t\t\t#no. of pair of poles\n", + "Z = 864;\t\t\t\t#no. of conductors\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "\n", + "# Calculations and Results\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "print \"(a) Speed in rpm\",round(N)\n", + "\n", + "Pm = Ia*emf;\t\t\t\t#W(Mechanical power developed)\n", + "M = Pm/(N/60)/(2*math.pi);\t\t\t\t#Nm(Torque)\n", + "print \"(b) Gross torque developed(Nm) : %.f\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Speed in rpm 636.0\n", + "(b) Gross torque developed(Nm) : 756\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 6.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 15;\t\t\t\t#rps\n", + "M = 2*1000;\t\t\t\t#Nm(Torque required)\n", + "Loss = 8*1000;\t\t\t\t#W\n", + "\n", + "# Calculations\n", + "P = 2*math.pi*M*N;\t\t\t\t#W(Power required)\n", + "Pa = P-Loss;\t\t\t\t#W(Power generated in armature)\n", + "\n", + "# Results\n", + "print \"Power generated in armature(kW) : %.2f\"%(Pa/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power generated in armature(kW) : 180.50\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/PreetiRani/ch6.ipynb b/sample_notebooks/PreetiRani/ch6.ipynb new file mode 100644 index 00000000..c3a88008 --- /dev/null +++ b/sample_notebooks/PreetiRani/ch6.ipynb @@ -0,0 +1,367 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2286c67a37dc36a4b2463b6ff90eb31f4de0251dedc09d4493cdbe015dfacf59" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06 : Levers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-1 : page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "Del=10 \n", + "k=500 \n", + "W=k*Del \n", + "#Let load arm be l1\n", + "l1=200 \n", + "#Let effort arm be l2\n", + "l2=500 \n", + "P=W*l1/l2 \n", + "Ro=sqrt(W**2+P**2) \n", + "Ta=40 \n", + "d=sqrt(Ro*4/(2*pi*Ta)) \n", + "d=10 \n", + "pb=10 \n", + "d1=sqrt(Ro/(pb*1.5)) \n", + "d1=20 \n", + "l=1.5*d \n", + "t=10 \n", + "T=Ro*4/(2*pi*d1**2) \n", + "M=(Ro/2*(l/2+t/3))-(Ro/2*l/4) \n", + "sigb=32*M/(pi*d1**3) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "P=Ro/(l*d1) \n", + "D=2*d1 \n", + "\n", + "# Output\n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d1 is 20.0 mm \n", + "D is 40.0 mm \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-2 : page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "d1=80 \n", + "p=0.981 \n", + "Ta=40 \n", + "siga=80 \n", + "pa=15 \n", + "W=pi*(d1**2)*p/4 \n", + "P=W/8 \n", + "Ws=W-P \n", + "d=sqrt(W*4/(pi*2*Ta)) \n", + "l=1.5*d \n", + "D=2*d \n", + "T=W/(2*pi*pa**2/4) \n", + "M1=P*(700-87.5-(D/2)) \n", + "h=50 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "pmax=80 \n", + "T=2465.6/h**2 \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"h is %0.2f mm \"%h \n", + "print \"pmax is %0.2f MPa \"%pmax\n", + " \n", + "#The difference in the value of pmax is due to rounding-off the digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h is 50.00 mm \n", + "pmax is 74.43 MPa \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-3 : page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "P=((4*360)+(2*360))/900 \n", + "Fv=4-2 \n", + "Fh=P \n", + "Fr=sqrt(Fv**2+Fh**2) \n", + "P1=4*0.36/0.9 \n", + "Rf=sqrt(4**2+1.6**2) \n", + "d=sqrt(Rf*10**3/(15*1.25)) \n", + "d=16 \n", + "l=1.25*d \n", + "T=Rf*10**3*4/(2*pi*d**2) \n", + "D=2*d \n", + "M1=Rf*10**3*(360-(D/2)) \n", + "pa=15 \n", + "h=80 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "T=4310/(b*h) \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"P is %0.1f KN \"%P \n", + "print \"pmax is %0.2f MPa \"%pmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P is 2.0 KN \n", + "pmax is 69.53 MPa \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-4 : page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l=360 \n", + "P=400 \n", + "Mh=2*P*l/3 \n", + "sigb=50 \n", + "l1=60 \n", + "d=(Mh*32/(pi*l1))**(1/3) \n", + "d=30 \n", + "L=420 \n", + "siga=60 \n", + "H=20 \n", + "B=H/3 \n", + "Mx=P*(L-H/2) \n", + "Tx=2*P*l/3 \n", + "sigb1=Mx*18/H**3 \n", + "Td=P/(B*H) \n", + "Tr=17.17*Tx/H**4 \n", + "T=Tr+Td \n", + "sigmax=(sigb1/2)+sqrt((sigb1/2)**2+T**2) \n", + "Tmax=sqrt((sigb1/2)**2+T**2) \n", + "T=P*L \n", + "M=P*(l1+(2/3*l)) \n", + "Te=sqrt(T**2+M**2) \n", + "Ta=40 \n", + "D=(Te*16/(pi*Ta))**(1/3) \n", + "D=round(D) #Rounding off \n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 30.0 mm \n", + "D is 1.0 mm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-5 : page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l2=300 \n", + "l=450 \n", + "P=400 \n", + "Mx=2*P*l2/3 \n", + "siga=80 \n", + "dh=(Mx*32/(pi*siga))**(1/3) \n", + "dh=22 \n", + "L=(2*l2/3)+l \n", + "T=P*L \n", + "Ta=40 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=35 \n", + "d1=1.6*d \n", + "Th=T*16*d1/(pi*(d1**4-d**4)) \n", + "l1=1.5*d \n", + "My=P*(L-(d1/2)) \n", + "B=dh \n", + "H=sqrt(3.66*75) \n", + "H=30 \n", + "Mz=P*l1/2 \n", + "Te=sqrt(T**2+Mz**2) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=32 \n", + "b=d/4 \n", + "b=round(b)\n", + "t=d/6 \n", + "t=round(t)\n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"dh is %0.1f mm \"%dh \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"d2 is %0.1f mm \"%d2 \n", + "print \"b is %0.1f mm \"%b \n", + "print \"t is %0.1f mm \"%t " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 35.0 mm \n", + "dh is 22.0 mm \n", + "d1 is 56.0 mm \n", + "l1 is 52.5 mm \n", + "d2 is 32.0 mm \n", + "b is 8.0 mm \n", + "t is 5.0 mm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-6 : page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "L=450 \n", + "P=700 \n", + "T=P*L \n", + "Ta=50 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=32 \n", + "d1=1.6*d \n", + "d1=52 #Rounding off to nearest whole number\n", + "l1=1.25*d \n", + "My=P*(L-d1/2) \n", + "sigb=65 \n", + "H=(My*18/sigb)**(1/3) \n", + "H=45 \n", + "B=H/3 \n", + "T1=P/(B*H) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "Mx=P*l1/2 \n", + "Te=sqrt((T)**2+(Mx**2)) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=d2+6 \n", + "d2=round(d2)\n", + "# utput\n", + "print \"d is %0.1f mm \"%d \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"B is %0.1f mm \"%B \n", + "print \"H is %0.1f mm \"%H \n", + "print \"d2 is %0.1f mm \"%d2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 32.0 mm \n", + "d1 is 52.0 mm \n", + "l1 is 40.0 mm \n", + "B is 15.0 mm \n", + "H is 45.0 mm \n", + "d2 is 7.0 mm \n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/RavirajJadeja/ch16.ipynb b/sample_notebooks/RavirajJadeja/ch16.ipynb new file mode 100755 index 00000000..2b395898 --- /dev/null +++ b/sample_notebooks/RavirajJadeja/ch16.ipynb @@ -0,0 +1,64 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c3856bc217e5f495e078375001a6745906e09c45dfca2c5d1fe105500ef94b8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : Machinery and Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page No : 16-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "p = 500\t#ft\n", + "p1 = 6\t#in\n", + "t = 500\t#cfm\n", + "p2 = 7\t#psig\n", + "P = p2+14.7\t#psia\n", + "T = 520*(P/14.7)**0.283\t#F\n", + "f = 0.048*p1**0.027/(t)**0.148\t#in\n", + "\t\n", + "#CALCULATIONS\n", + "delP = 20.*10**-3*p*T*(t)**2/(38*10**3*P*p1**5)\t#psia\n", + "\t\n", + "#RESULTS\n", + "print 'the pressure drop = %.2f psia'%(delP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the pressure drop = 0.23 psia\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb b/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb new file mode 100755 index 00000000..ff3fcb22 --- /dev/null +++ b/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb @@ -0,0 +1,438 @@ +{ + "metadata": { + "name": "chapter 1 som.ipynb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1:Centre Of Gravity\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.1,Page No.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of Variables\n", + "\n", + "#Rectangle-1\n", + "a_1=37.5 #cm**2 \n", + "y_1=26.25 #cm \n", + "\n", + "#Rectangle-2\n", + "a_2=50 #cm**2 \n", + "y_2=15 #cm \n", + "\n", + "#Rectangle-3\n", + "a_3=150 #cm**2 \n", + "y_3=2.5 #cm \n", + "\n", + "\n", + "#Calculation\n", + "\n", + "\n", + "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm \n", + "\n", + "#Result\n", + "print\"The centroid of the section is\",round(Y_bar,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid of the section is 8.88 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.2,Page No.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "#Area-1\n", + "a_1=6 #cm**2 \n", + "x_1=3 #cm\n", + "y_1=0.5 #cm\n", + "\n", + "#Area-2\n", + "a_2=6 #cm**2\n", + "x_2=2.671 #cm\n", + "y_2=3 #cm\n", + "\n", + "#Area-3\n", + "a_3=16 #cm**2\n", + "x_3=1 #cm\n", + "y_3=5 #cm\n", + "\n", + "\n", + "#Calculation\n", + "\n", + "\n", + "X_bar=(a_1*x_1+a_2*x_2+a_3*x_3)*(a_1+a_2+a_3)**-1 #cm\n", + "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm\n", + "\n", + "\n", + "#Result\n", + "print\"The centre of gravity of section is\",round(X_bar,2),\"cm\"\n", + "print\"The centre of gravity of section is\",round(Y_bar,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centre of gravity of section is 1.79 cm\n", + "The centre of gravity of section is 3.61 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.3,Page no.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "#Area-1\n", + "a_1=93.75 #cm**2 \n", + "y_1=6.25 #cm\n", + "\n", + "#Area-2\n", + "a_2=93.75 #cm**2 \n", + "y_2=6.25 #cm\n", + "\n", + "#Area-3\n", + "a_3=375 #cm**2 \n", + "y_3=9.375 #cm\n", + "\n", + "#Area-4\n", + "a_4=353.43 #cm**2\n", + "y_4=6.366 #cm\n", + "\n", + "\n", + "#Calculation\n", + "\n", + "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3-a_4*y_4)*(a_1+a_2+a_3-a_4)**-1 #cm\n", + "\n", + "\n", + "#Result\n", + "print\"The centre of gravity lies at a distance of \",round(Y_bar,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centre of gravity lies at a distance of 11.66 cm\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.4,Page no.10\n", + "\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "\n", + "a_1=36*pi #cm**2 #Area of Quadrant of a circle\n", + "x_1=16/pi #cm \n", + "y_1=16*pi**-1 #cm\n", + "\n", + "\n", + "a_2=18*pi #cm**2 #Area of the semicircle\n", + "x_2=6 #cm\n", + "y_2=8*pi**-1 #cm\n", + "\n", + "\n", + "#Calculation-1\n", + "\n", + "X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm\n", + "\n", + "#Calculation-2\n", + "#To calculate Y_bar,taking AB as the Reference line\n", + "\n", + "Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm\n", + "\n", + "#Result\n", + "\n", + "print\"The centre of gravity is \",round(X_bar,2),\"cm\"\n", + "print\"The centre of gravity is\",round(Y_bar,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centre of gravity is 4.19 cm\n", + "The centre of gravity is 7.64 cm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.5,Page no.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "#Circle-1 \n", + "a_1=100*pi #cm**2\n", + "x_1=10 #cm\n", + " \n", + "#Square-2 \n", + "a_2=50 #cm**2\n", + "x_2=15 #cm\n", + " \n", + "#Calculation\n", + "\n", + "X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm\n", + "\n", + "\n", + "#Result\n", + "print\"The centre of gravity is\",round(X_bar,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centre of gravity is 9.05 cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.6,Page no.12\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#intilization of variables \n", + "\n", + "#Rectangle-1\n", + "a_1=51200 #mm**2 \n", + "x_1=160 #mm\n", + "y_1=80 #mm\n", + "\n", + "#Triangle-2\n", + "a_2=6400 #mm**2\n", + "x_2=80*3**-1 #mm\n", + "y_2=320*3**-1 #mm\n", + "\n", + "#Semicircle-3\n", + "a_3=1250*pi #mm**2\n", + "x_3=210 #mm\n", + "y_3=(160-(4*50-(3*pi)**-1)) #mm\n", + "\n", + "\n", + "#Calculation\n", + "\n", + "X_bar=(a_1*x_1-a_2*x_2-a_3*x_3)*(a_1-a_2-a_3)**-1 #mm\n", + "Y_bar=(a_1*y_1-a_2*y_2-a_3*y_3)*(a_1-a_2-a_3)**-1 #mm\n", + "\n", + "#Result\n", + "print\"The centroid of the given area is\",round(X_bar,2),\"mm\"\n", + "print\"The centroid of the given area is\",round(Y_bar,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid of the given area is 176.07 mm\n", + "The centroid of the given area is 87.34 mm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 1.8,Page no.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "\n", + "alpha=pi/2 #degree #In case of semicircle\n", + "\n", + "#Semicircle-1\n", + "r_1=20 #cm #radius of semicircle \n", + "y_1=4*r_1*(3*pi)**-1 #cm #distance from the base\n", + "a_1=(pi*r_1**2)*2**-1 #cm**2 #area of semicircle\n", + "\n", + "#Semicircle-2\n", + "r_2=16 #cm #radius of semicircle\n", + "y_2=4*r_2*(3*pi)**-1 #cm #distance from the base\n", + "a_2=(pi*r_2**2)*2**-1 #cm**2 #area of semicircle\n", + "\n", + "#Calculations\n", + "\n", + "\n", + "Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm #centroid\n", + "\n", + "\n", + "#Result\n", + "print\"The centroid of the area is \",round(Y_bar,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The centroid of the area is 11.51 cm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem no1.12,Page no.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Initilization of variables\n", + "\n", + "#Right Circular Cyclinder\n", + "#m_1=(16*pi*h*rho_1) #gm \n", + "#y_1=4+h*2**-1 #cm\n", + "\n", + "#Hemisphere\n", + "#m_2=256*pi*rho_1 #gm \n", + "y_2=2.5 #cm \n", + "\n", + "Y_bar=4 #cm\n", + "r=4 #cm\n", + "\n", + "#Calculation\n", + "\n", + "#Y_bar=(m_1*y_1+m_2*y_2)*(m_1+m_2)**-1 #cm #Centroid\n", + "h=(402.114*25.132**-1)**0.5\n", + "\n", + "#Result\n", + "print\"The value of h is\",round(h,2),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of h is 4.0 cm\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb b/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb new file mode 100755 index 00000000..56cbd13b --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb @@ -0,0 +1,236 @@ +{ + "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": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Divergence = 0.5 *10**-3 radian\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "r1 = 2; #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/sample_notebooks/RuchiMittal/chap1.ipynb b/sample_notebooks/RuchiMittal/chap1.ipynb new file mode 100755 index 00000000..c87721c5 --- /dev/null +++ b/sample_notebooks/RuchiMittal/chap1.ipynb @@ -0,0 +1,412 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0634d7bf5367e0141c25c22bd055ab7dd0d67262eacfb1ab474c7c9ba196985e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 Qualities of measurments" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page no 3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=80.0 #expected value of voltage in Volts\n", + "V1=79 #Volts\n", + "\n", + "#Calculation\n", + "E=V-V1\n", + "E1=((V-V1)/V)*100\n", + "E2=1-((V-V1)/V)\n", + "A=100*E2\n", + "#Result\n", + "print\"(i) Absolute error is \",E,\"V\"\n", + "print\"(ii) percent error is \", E1,\"%\"\n", + "print\"(iii) reletive error is \", E2\n", + "print\"(iv) percent of accuracy is \", A,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Absolute error is 1.0 V\n", + "(ii) percent error is 1.25 %\n", + "(iii) reletive error is 0.9875\n", + "(iv) percent of accuracy is 98.75 %\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page no 4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x1=98\n", + "x2=101\n", + "x3=102\n", + "x4=97\n", + "x5=101\n", + "x6=100\n", + "x7=103\n", + "x8=98\n", + "x9=106\n", + "x10=99\n", + "\n", + "#Calculation\n", + "X=(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/10.0\n", + "P=(x6/X)\n", + "\n", + "#Result\n", + "print\"Precision of the 6th measurment is \",round(P,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Precision of the 6th measurment is 0.995\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3(a) Page no 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "V=80 #milliammeter readings\n", + "I=10.0 #mA\n", + "V1=150 #Volts\n", + "R1=1000 #ohm/volt\n", + "\n", + "#Calculation\n", + "R=V/I\n", + "Rv=R1*V1\n", + "Rx=(R*V1)/(V1-R)\n", + "E=((Rx-R)/Rx)*100\n", + "\n", + "#Result\n", + "print\"(i) Apparent resistance of the unknown resistance \",R,\"K ohm\"\n", + "print \"Actual resistance of the unknown resistance is \",round(Rx,2),\"K ohm\"\n", + "print \"Error due to the loading effet of the voltmeter \",round(E,1),\"%\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Apparent resistance of the unknown resistance 8.0 K ohm\n", + "Actual resistance of the unknown resistance is 8.45 K ohm\n", + "Error due to the loading effet of the voltmeter 5.3 %\n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3(b) Page no 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=30 #Volts\n", + "V1=150 #Volts\n", + "I=0.6 #A\n", + "R1=1000 #ohm/volts\n", + "\n", + "#Calculation\n", + "R=V/I\n", + "Rv=(R1*V1)\n", + "Rx=(R*Rv)/(Rv-R)\n", + "E=((Rx-R)/Rx)*100\n", + "\n", + "#Result\n", + "print\"(i) total circuit resistance is \", R,\"ohm\"\n", + "print \"(ii) The voltmeter resistance is \",round(Rx,2)\n", + "print\"(iii) Error due to loading effect of voltmeter \", round(E,3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) total circuit resistance is 50.0 ohm\n", + "(ii) The voltmeter resistance is 50.02\n", + "(iii) Error due to loading effect of voltmeter 0.033 %\n" + ] + } + ], + "prompt_number": 113 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page no 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x1=49.7\n", + "x2=50.1\n", + "x3=50.2\n", + "x4=49.6\n", + "x5=49.7\n", + "\n", + "#Calculation\n", + "X=(x1+x2+x3+x4+x5)/5.0\n", + "d1=x1-X\n", + "d2=x2-X\n", + "d3=x3-X\n", + "d4=x4-X\n", + "d5=x5-X\n", + "dtotal=(d1+d2+d3+d4+d5)\n", + "\n", + "#Result\n", + "print\"(i) Arithmetic mean is \", X\n", + "print\"(ii) derivations from each value are\"\n", + "print \"d1=\",d1,\"\\nd2=\",d2,\"\\nd3=\",d3,\"\\nd4=\",d4,\"\\nd5=\",d5\n", + "print\"(iii) The algebric sum of derivative is \",round(dtotal,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) Arithmetic mean is 49.86\n", + "(ii) derivations from each value are\n", + "d1= -0.16 \n", + "d2= 0.24 \n", + "d3= 0.34 \n", + "d4= -0.26 \n", + "d5= -0.16\n", + "(iii) The algebric sum of derivative is 0.0\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "x1=49.7\n", + "x2=50.1\n", + "x3=50.2\n", + "x4=49.6\n", + "x5=49.7\n", + "\n", + "#Calculation\n", + "X=(x1+x2+x3+x4+x5)/5.0\n", + "d1=x1-X\n", + "d2=x2-X\n", + "d3=x3-X\n", + "d4=x4-X\n", + "d5=x5-X\n", + "dtotal=(d1+d2+d3+d4+d5)/5.0\n", + "\n", + "#Result\n", + "print\"The average deviation is \",round(dtotal*10**14,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average deviation is 0.284\n" + ] + } + ], + "prompt_number": 86 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d1= -0.16 \n", + "d2= 0.24 \n", + "d3= 0.34 \n", + "d4= -0.26 \n", + "d5= -0.16\n", + "\n", + "#Calculation\n", + "import math\n", + "D=math.sqrt((d1**2+d2**2+d3**2+d4**2+d5**2)/4.0)\n", + "print\"The standard deviation is \",round(D,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The standard deviation is 0.27\n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=600 #Volts\n", + "V1=250.0 #Volts\n", + "a=0.02\n", + "\n", + "#Calculation\n", + "M=a*V\n", + "E=(M/V1)*100\n", + "\n", + "#Result\n", + "print\"The limited error is \", E,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The limited error is 4.8 %\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page no 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "V=70.0 #Volts\n", + "V1=100 #Volts\n", + "I=80.0 #mA\n", + "I1=150 #mA\n", + "a=0.015\n", + "\n", + "#calculation\n", + "M=a*V1\n", + "E=(M/V)*100\n", + "E1=a*I1\n", + "E2=(E1/I)*100\n", + "E3=E+E2\n", + "\n", + "#Result\n", + "print\"limiting error is \",round (E3,3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "limiting error is 4.955 %\n" + ] + } + ], + "prompt_number": 102 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/SachinNaik/ch5.ipynb b/sample_notebooks/SachinNaik/ch5.ipynb new file mode 100644 index 00000000..153ee7fb --- /dev/null +++ b/sample_notebooks/SachinNaik/ch5.ipynb @@ -0,0 +1,416 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98db718d0bf89da2e915ec31624499d68101b659175b122291fbf41d86cde068" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Fundamentals of Cellular Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ToCH=960.;# Total available channels\n", + "Cellarea=6.; #in km^2\n", + "Covarea=2000.;#in km^2\n", + "N1=4.; # Cluster Size\n", + "N2=7.; #Cluster Size\n", + "\n", + "#Calculations\n", + "Area1=N1*Cellarea;#for N=4\n", + "Area2=N2*Cellarea;#For N=7\n", + "No_of_clusters1=round(Covarea/Area1);\n", + "No_of_clusters2=round(Covarea/Area2);\n", + "No_of_CH1=ToCH/N1; # No of channels with cluster size 4\n", + "No_of_CH2=ToCH/N2; # No of channels with cluster size 7\n", + "SysCap1=No_of_clusters1*ToCH;\n", + "SysCap2=No_of_clusters2*ToCH;\n", + "\n", + "#Results\n", + "print 'System Capacity with cluster size 4 is %d channels'%SysCap1\n", + "print 'Number of clusters for covering total area with N equals 4 are %d'%No_of_clusters1\n", + "print 'System Capacity with cluster size 7 is %d channels'%SysCap2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "System Capacity with cluster size 4 is 79680 channels\n", + "Number of clusters for covering total area with N equals 4 are 83\n", + "System Capacity with cluster size 7 is 46080 channels\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "S_IAMP=18.;# S/I ratio in dB\n", + "S_IGSM=12.;# S/I ratio in dB\n", + "PPL=4.; # propogation path loss coefficient\n", + "\n", + "#Calculations\n", + "# Using Equation 5.16 on page no 132, we get\n", + "N_AMP=(1./3)*((6*10**(0.1*S_IAMP))**(2/PPL));#reuse factor for AMPS\n", + " \n", + "N_GSM=(1./3)*((6*10**(0.1*S_IGSM))**(2/PPL));#reuse factor for GSM\n", + "\n", + "\n", + "#Result\n", + "print 'Reuse Factor for AMP system is N = %.3f = approx %d \\n'%(N_AMP,N_AMP+1);\n", + "print 'Reuse Factor for GSM system is N = %.3f = approx %d \\n'%(N_GSM,N_GSM+1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reuse Factor for AMP system is N = 6.486 = approx 7 \n", + "\n", + "Reuse Factor for GSM system is N = 3.251 = approx 4 \n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "VCH=395.;#Total voice channels\n", + "CallHT=120.;#average call holding time in sec\n", + "Blocking=0.02;# 2%\n", + "PPL=4.; #propogation path loss coefficient\n", + "N1=4. #reuse factor\n", + "N2=7.; #reuse factor\n", + "N3=12.; #reuse factor\n", + "\n", + "#Calculations&Results\n", + "No_of_VCH1=VCH/N1; #for reuse factor N1\n", + "No_of_VCH2=VCH/N2; #for reuse factor N2\n", + "No_of_VCH3=VCH/N3; #for reuse factor N3\n", + "print 'NO of voice channels for N=4 are %d'%(round(No_of_VCH1));\n", + "print 'NO of voice channels for N=7 are %d'%(round(No_of_VCH2));\n", + "print 'NO of voice channels for N=12 are %d\\n'%(round(No_of_VCH3));\n", + "TrafLoad1=87.004;\n", + "Carryload1=(1-Blocking)*TrafLoad1;\n", + "TrafLoad2=45.877;\n", + "Carryload2=(1-Blocking)*TrafLoad2;\n", + "TrafLoad3=24.629;\n", + "Carryload3=(1-Blocking)*TrafLoad3;\n", + "# To find cell capacity\n", + "Ncall1=Carryload1*3600/CallHT;#Calls per hour per cell \n", + "Ncall2=Carryload2*3600/CallHT;\n", + "Ncall3=Carryload3*3600/CallHT;\n", + "print 'calls per hour per cell for N=4 are %d'%(round(Ncall1));\n", + "print 'calls per hour per cell for N=7 are %d'%(round(Ncall2));\n", + "print 'calls per hour per cell for N=12 are %d \\n'%(Ncall3);\n", + "# To find S BY I\n", + "# N=(1/3)[6*(S/I)]**(2/PPL)\n", + "S_I1=10*(PPL/2)*(math.log10(N1)-math.log10(1./3)-(2./PPL)*math.log10(6));#Mean S/I (dB)\n", + "\n", + "S_I2=10*(PPL/2)*(math.log10(N2)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "S_I3=10*(PPL/2)*(math.log10(N3)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "\n", + "print 'Mean S/I(dB) for N=4 is %.1f'%S_I1\n", + "print 'Mean S/I(dB) for N=7 is %.1f'%S_I2\n", + "print 'Mean S/I(dB) for N=12 is %.1f'%S_I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NO of voice channels for N=4 are 99\n", + "NO of voice channels for N=7 are 56\n", + "NO of voice channels for N=12 are 33\n", + "\n", + "calls per hour per cell for N=4 are 2558\n", + "calls per hour per cell for N=7 are 1349\n", + "calls per hour per cell for N=12 are 724 \n", + "\n", + "Mean S/I(dB) for N=4 is 13.8\n", + "Mean S/I(dB) for N=7 is 18.7\n", + "Mean S/I(dB) for N=12 is 23.3\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "spectrum=12.5*10**6; #in Hz\n", + "CHBW=200*10**3;#in Hz\n", + "N=4.;#reuse factor\n", + "Blocking=0.02; # 2%\n", + "callHT=120.;#average call holding time in sec\n", + "PPL=4.;#propogation path loss coefficient\n", + "CntrlCH=3.; #No of control channels\n", + "Ts=8.; # No of voice channels per RF channel\n", + "\n", + "#Calculations&Results\n", + "No_ofVCH=((spectrum*Ts)/(CHBW*N))-CntrlCH;\n", + "print 'No of voice channels for N=4 are %d'%(No_ofVCH)\n", + "TrafLoad=110.;\n", + "CarryLoad=(1-Blocking)*TrafLoad;\n", + "Ncall=CarryLoad*3600/callHT;\n", + "print 'Calls per hour per cell for N=4 are %d calls/hour/cell \\n '%(round(Ncall));\n", + "S_I=10*(PPL/2)*(math.log10(N)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "print 'Mean S/I(dB) for N=4 is %.1f dB \\n '%(S_I)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No of voice channels for N=4 are 122\n", + "Calls per hour per cell for N=4 are 3234 calls/hour/cell \n", + " \n", + "Mean S/I(dB) for N=4 is 13.8 dB \n", + " \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "VCH=395.;#Total allocated voice channels\n", + "CHBW=30.; # in kHz\n", + "Spectrum=12.5; # in MHz\n", + "CallHT=120.; #Average call holding time in sec\n", + "Blocking=0.02; # 2%\n", + "PL=40.; #slope of path loss in dBperdecade\n", + "\n", + "#Calculations&Results\n", + "print \"We consider only the \ufb01rst tier interferers and neglect the effects of cochannel interference from the second and other higher tiers.\"\n", + "#FOR 120degree sectorization\n", + "#N=4\n", + "VCH11=(VCH/(4*3));\n", + "OffLoad11=24.629; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site11=3*OffLoad11;\n", + "CarLoad11=(1-Blocking)*Load_site11;\n", + "Calls_hr_site11=CarLoad11*3600/CallHT;\n", + "R11=math.sqrt(CarLoad11/0.52);\n", + "Seff11=CarLoad11/(2.6*Spectrum*R11**2);\n", + "S_I11=PL*math.log10(math.sqrt(3*4))-10*math.log10(2);\n", + "#N=7\n", + "VCH12=(VCH/(3*7));\n", + "OffLoad12=12.341; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site12=3*OffLoad12;\n", + "CarLoad12=(1-Blocking)*Load_site12;\n", + "Calls_hr_site12=CarLoad12*3600/CallHT;\n", + "R12=math.sqrt(CarLoad12/0.52);\n", + "Seff12=CarLoad12/(2.6*Spectrum*R12**2);\n", + "S_I12=PL*math.log10(math.sqrt(3*7))-10*math.log10(2);\n", + "#N=12\n", + "VCH13=VCH/(3*12);\n", + "OffLoad13=5.842; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site13=3*OffLoad13;\n", + "CarLoad13=(1-Blocking)*Load_site13;\n", + "Calls_hr_site13=CarLoad13*3600/CallHT;\n", + "R13=math.sqrt(CarLoad13/0.52);\n", + "Seff13=CarLoad13/(2.6*Spectrum*R13**2);\n", + "S_I13=PL*math.log10(math.sqrt(3*12))-10*math.log10(2);\n", + "#For omnidirectional \n", + "#N=4\n", + "VCH21=VCH/(4);\n", + "OffLoad21=87.004; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site21=OffLoad21;\n", + "CarLoad21=(1-Blocking)*Load_site21;\n", + "Calls_hr_site21=CarLoad21*3600/CallHT;\n", + "R21=math.sqrt(CarLoad21/0.52);\n", + "Seff21=CarLoad21/(2.6*Spectrum*R21**2);\n", + "S_I21=PL*math.log10(math.sqrt(3*4))-10*math.log10(6);\n", + "#N=7\n", + "VCH22=VCH/(7);\n", + "OffLoad22=46.817; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site22=OffLoad22;\n", + "CarLoad22=(1-Blocking)*Load_site22;\n", + "Calls_hr_site22=CarLoad22*3600/CallHT;\n", + "R22=math.sqrt(CarLoad22/0.52);\n", + "Seff22=CarLoad22/(2.6*Spectrum*R22**2);\n", + "S_I22=PL*math.log10(math.sqrt(3*7))-10*math.log10(6);\n", + "#N=12\n", + "VCH23=VCH/(12);\n", + "OffLoad23=24.629; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site23=OffLoad23;\n", + "CarLoad23=(1-Blocking)*Load_site23;\n", + "Calls_hr_site23=CarLoad23*3600/CallHT;\n", + "R23=math.sqrt(CarLoad23/0.52);\n", + "Seff23=CarLoad23/(2.6*Spectrum*R23**2);\n", + "S_I23=PL*math.log10(math.sqrt(3*12))-10*math.log10(6);\n", + "# For 60degree Sectorization\n", + "#N=3\n", + "VCH31=VCH/(6*3);\n", + "OffLoad31=14.902; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site31=6*OffLoad31;\n", + "CarLoad31=(1-Blocking)*Load_site31;\n", + "Calls_hr_site31=CarLoad31*3600/CallHT;\n", + "R31=math.sqrt(CarLoad31/0.52);\n", + "Seff31=CarLoad31/(2.6*Spectrum*R31**2);\n", + "S_I31=PL*math.log10(math.sqrt(3*3))-10*math.log10(1);\n", + "#N=4\n", + "VCH32=VCH/(6*4);\n", + "OffLoad32=10.656; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site32=6*OffLoad32;\n", + "CarLoad32=(1-Blocking)*Load_site32;\n", + "Calls_hr_site32=CarLoad32*3600/CallHT;\n", + "R32=math.sqrt(CarLoad32/0.52);\n", + "Seff32=CarLoad32/(2.6*Spectrum*R32**2);\n", + "S_I32=PL*math.log10(math.sqrt(3*4))-10*math.log10(1);\n", + "#N=7\n", + "VCH33=VCH/(6*7);\n", + "OffLoad33=5.084; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site33=6*OffLoad33;\n", + "CarLoad33=(1-Blocking)*Load_site33;\n", + "Calls_hr_site33=CarLoad33*3600/CallHT;\n", + "R33=math.sqrt(CarLoad33/0.52);\n", + "Seff33=CarLoad33/(2.6*Spectrum*R33**2);\n", + "S_I33=PL*math.log10(math.sqrt(3*7))-10*math.log10(1);\n", + "#N=12\n", + "VCH34=VCH/(6*12);\n", + "OffLoad34=2.227; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site34=6*OffLoad34;\n", + "CarLoad34=(1-Blocking)*Load_site34;\n", + "Calls_hr_site34=CarLoad34*3600/CallHT;\n", + "R34=math.sqrt(CarLoad34/0.52);\n", + "Seff34=CarLoad34/(2.6*Spectrum*R34**2);\n", + "S_I34=PL*math.log10(math.sqrt(3.*12))-10*math.log10(1);\n", + "\n", + "print 'For Omnidirectional Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency'\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site21,S_I21,Seff21);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site22,S_I22,Seff22);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site23,S_I23,Seff23);\n", + "\n", + "print 'For 120deg sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\\n'\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site11,S_I11,Seff11);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site12,S_I12,Seff12);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site13,S_I13,Seff13);\n", + "\n", + "print 'For 60 deg Sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\\n'\n", + "print 'For N=3 %d %.1f %.3f\\n'%(Calls_hr_site31,S_I31,Seff31);\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site32,S_I32,Seff32);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site33,S_I33,Seff33);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site34,S_I34,Seff34);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We consider only the \ufb01rst tier interferers and neglect the effects of cochannel interference from the second and other higher tiers.\n", + "For Omnidirectional Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "For N=4 2557 13.8 0.016\n", + "\n", + "For N=7 1376 18.7 0.016\n", + "\n", + "For N=12 724 23.3 0.016\n", + "\n", + "For 120deg sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "\n", + "For N=4 2172 18.6 0.016\n", + "\n", + "For N=7 1088 23.4 0.016\n", + "\n", + "For N=12 515 28.1 0.016\n", + "\n", + "For 60 deg Sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "\n", + "For N=3 2628 19.1 0.016\n", + "\n", + "For N=4 1879 21.6 0.016\n", + "\n", + "For N=7 896 26.4 0.016\n", + "\n", + "For N=12 392 31.1 0.016\n", + "\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb new file mode 100755 index 00000000..55497994 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb @@ -0,0 +1,412 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bond energy is 3.84 eV\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", + "epsilon0=8.85*10**-12; \n", + "r0=23.6*10**-10; #equilibrium distance(m)\n", + "I=5.14; #ionisation energy(eV)\n", + "EA=3.65; #electron affinity(eV)\n", + "N=8; #born constant\n", + "\n", + "#Calculation\n", + "x=1-(1/N);\n", + "V=(e**2)*x/(4*e*math.pi*epsilon0*r0); #potential(V)\n", + "E=I-EA; #net energy(eV)\n", + "BE=round(V*10,2)-E; #bond energy(eV)\n", + "\n", + "#Result\n", + "print \"bond energy is\",BE,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compressibility is -25.1095 *10**14\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", + "epsilon0=8.85*10**-12; \n", + "r0=0.41*10**-3; #equilibrium distance(m)\n", + "A=1.76; #madelung constant\n", + "n=0.5; #repulsive exponent value\n", + "\n", + "#Calculation\n", + "beta=72*math.pi*epsilon0*r0**4/(A*e**2*(n-1)); #compressibility\n", + "\n", + "#Result\n", + "print \"compressibility is\",round(beta/10**14,4),\"*10**14\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is -3.065 eV\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", + "epsilon0=8.85*10**-12; \n", + "r0=0.314*10**-9; #equilibrium distance(m)\n", + "A=1.75; #madelung constant\n", + "N=5.77; #born constant\n", + "I=4.1; #ionisation energy(eV)\n", + "EA=3.6; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "V=-A*e**2*((N-1)/N)/(4*e*math.pi*epsilon0*r0);\n", + "PE=round(V,2)/2; #potential energy per ion(eV)\n", + "x=(I-EA)/2;\n", + "CE=PE+x; #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",CE,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binding energy is 665.0 *10**3 kJ/kmol\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "N=6.02*10**26; #Avagadro Number\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "epsilon0=8.85*10**-12; \n", + "r0=0.324*10**-9; #equilibrium distance(m)\n", + "A=1.75; #madelung constant\n", + "n=8.5; #repulsive exponent value\n", + "\n", + "#Calculations\n", + "U0=(A*e/(4*math.pi*epsilon0*r0))*(1-1/n); \n", + "U=round(U0,1)*N*e; #binding energy(J/kmol)\n", + "\n", + "#Result\n", + "print \"binding energy is\",round(U/10**6),\"*10**3 kJ/kmol\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.5, Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of CsClis 4.389 *10**3 kg/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rCs=0.165*10**-9; #radius(m)\n", + "rCl=0.181*10**-9; #radius(m)\n", + "MCs=133; #atomic weight\n", + "MCl=35.5; #atomic weight\n", + "N=6.02*10**26; #Avagadro Number\n", + "\n", + "#Calculation\n", + "a=2*(rCl+rCs)/math.sqrt(3); #lattice constant(m)\n", + "M=(MCs+MCl)/N; #mass of 1 molecule(kg)\n", + "V=a**3; #volume of unit cell(m**3)\n", + "rho=M/V; #density of CsCl(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density of CsClis\",round(rho/10**3,3),\"*10**3 kg/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.6, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective charge is 0.72 *10**-19 coulomb\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", + "dm=1.98*(10**-29)*(1/3); #dipole moment\n", + "l=0.92*10**-10; #bond length(m)\n", + "\n", + "#Calculation\n", + "ec=dm/l; #effective charge(coulomb)\n", + "\n", + "#Result\n", + "print \"effective charge is\",round(ec*10**19,2),\"*10**-19 coulomb\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.7, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required is -1.9 eV\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", + "epsilon0=8.85*10**-12; \n", + "r=0.5*10**-9; #distance(m)\n", + "I=5; #ionisation energy(eV)\n", + "E=4; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "C=e**2/(4*math.pi*epsilon0*e*r); #coulomb energy(eV)\n", + "Er=I-E-C; #energy required(eV)\n", + "\n", + "#Result\n", + "print \"energy required is\",round(Er,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.9, Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "young's modulus is 157 GPa\n" + ] + } + ], + "source": [ + "#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration\n", + "#importing modules\n", + "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\"" + ] + } + ], + "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/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb new file mode 100755 index 00000000..bd43d700 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb @@ -0,0 +1,431 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#10: Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.1, Page number 224" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 3.365 *10**3 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=5; #temperature(K)\n", + "Tc=7.2; #critical temperature(K)\n", + "H0=6.5*10**3; #critical magnetic field(A/m)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.2, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 1.567 *10**3 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T=2.5; #temperature(K)\n", + "Tc=3.5; #critical temperature(K)\n", + "H0=3.2*10**3; #critical magnetic field(A/m)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.3, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature is 6.928 K\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", + "Hc=5*10**3; #critical magnetic field(A/m)\n", + "T=6; #temperature(K)\n", + "H0=2*10**4; #critical magnetic field(A/m)\n", + "\n", + "#Calculation\n", + "Tc=T/math.sqrt(1-(Hc/H0)); #critical temperature(K)\n", + "\n", + "#Result\n", + "print \"critical temperature is\",round(Tc,3),\"K\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.4, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current is 251.3 amp\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Hc=2*10**3; #critical magnetic field(A/m)\n", + "r=0.02; #radius(m)\n", + "\n", + "#Calculation\n", + "Ic=2*math.pi*r*Hc; #critical current(amp)\n", + "\n", + "#Result\n", + "print \"critical current is\",round(Ic,1),\"amp\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.5, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "isotopic mass is 191.75 amu\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=5; #temperature(K)\n", + "T2=5.1; #temperature(K)\n", + "M1=199.5; #isotopic mass(amu)\n", + "\n", + "#Calculation\n", + "M2=M1*(T1/T2)**2; #isotopic mass(amu)\n", + "\n", + "#Result\n", + "print \"isotopic mass is\",round(M2,2),\"amu\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.6, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 3.0469 *10**4 A/m\n", + "critical current is 287.161 amp\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", + "T=5; #temperature(K)\n", + "Tc=8; #critical temperature(K)\n", + "H0=5*10**4; #critical magnetic field(A/m)\n", + "r=1.5*10**-3; #radius(m)\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n", + "Ic=2*math.pi*r*Hc; #critical current(amp)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(Hc/10**4,4),\"*10**4 A/m\"\n", + "print \"critical current is\",round(Ic,3),\"amp\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.7, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature is 4.1447 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc1=4.185; #critical temperature(K)\n", + "M1=199.5; #isotopic mass(amu)\n", + "M2=203.4; #isotopic mass(amu)\n", + "\n", + "#Calculation\n", + "Tc2=Tc1*math.sqrt(M1/M2); #critical temperature(K)\n", + "\n", + "#Result\n", + "print \"critical temperature is\",round(Tc2,4),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.8, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency is 4.105 *10**11 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(c)\n", + "h=6.626*10**-36; #plank constant\n", + "V=8.5*10**-6; #voltage(V)\n", + "\n", + "#Calculation\n", + "new=2*e*V/h; #frequency(Hz)\n", + "\n", + "#Result\n", + "print \"frequency is\",round(new/10**11,3),\"*10**11 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.9, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical temperature is 30.0 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Tc1=5; #critical temperature(K)\n", + "P1=1; #pressure(mm)\n", + "P2=6; #pressure(mm)\n", + "\n", + "#Calculation\n", + "Tc2=Tc1*P2/P1; #critical temperature(K)\n", + "\n", + "#Result\n", + "print \"critical temperature is\",Tc2,\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 10.10, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum critical temperature is 7.782 K\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", + "Hc=6*10**5; #critical magnetic field(A/m)\n", + "Tc=8.7; #critical temperature(K)\n", + "H0=3*10**6; #critical magnetic field(A/m)\n", + "\n", + "#Calculation\n", + "T=Tc*math.sqrt(1-(Hc/H0)); #maximum critical temperature(K)\n", + "\n", + "#Result\n", + "print \"maximum critical temperature is\",round(T,3),\"K\"\n", + "print \"answer given in the 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/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb new file mode 100755 index 00000000..55497994 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb @@ -0,0 +1,412 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.1, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bond energy is 3.84 eV\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", + "epsilon0=8.85*10**-12; \n", + "r0=23.6*10**-10; #equilibrium distance(m)\n", + "I=5.14; #ionisation energy(eV)\n", + "EA=3.65; #electron affinity(eV)\n", + "N=8; #born constant\n", + "\n", + "#Calculation\n", + "x=1-(1/N);\n", + "V=(e**2)*x/(4*e*math.pi*epsilon0*r0); #potential(V)\n", + "E=I-EA; #net energy(eV)\n", + "BE=round(V*10,2)-E; #bond energy(eV)\n", + "\n", + "#Result\n", + "print \"bond energy is\",BE,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.2, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compressibility is -25.1095 *10**14\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", + "epsilon0=8.85*10**-12; \n", + "r0=0.41*10**-3; #equilibrium distance(m)\n", + "A=1.76; #madelung constant\n", + "n=0.5; #repulsive exponent value\n", + "\n", + "#Calculation\n", + "beta=72*math.pi*epsilon0*r0**4/(A*e**2*(n-1)); #compressibility\n", + "\n", + "#Result\n", + "print \"compressibility is\",round(beta/10**14,4),\"*10**14\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.3, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cohesive energy is -3.065 eV\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", + "epsilon0=8.85*10**-12; \n", + "r0=0.314*10**-9; #equilibrium distance(m)\n", + "A=1.75; #madelung constant\n", + "N=5.77; #born constant\n", + "I=4.1; #ionisation energy(eV)\n", + "EA=3.6; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "V=-A*e**2*((N-1)/N)/(4*e*math.pi*epsilon0*r0);\n", + "PE=round(V,2)/2; #potential energy per ion(eV)\n", + "x=(I-EA)/2;\n", + "CE=PE+x; #cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"cohesive energy is\",CE,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.4, Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binding energy is 665.0 *10**3 kJ/kmol\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "N=6.02*10**26; #Avagadro Number\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "epsilon0=8.85*10**-12; \n", + "r0=0.324*10**-9; #equilibrium distance(m)\n", + "A=1.75; #madelung constant\n", + "n=8.5; #repulsive exponent value\n", + "\n", + "#Calculations\n", + "U0=(A*e/(4*math.pi*epsilon0*r0))*(1-1/n); \n", + "U=round(U0,1)*N*e; #binding energy(J/kmol)\n", + "\n", + "#Result\n", + "print \"binding energy is\",round(U/10**6),\"*10**3 kJ/kmol\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.5, Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of CsClis 4.389 *10**3 kg/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rCs=0.165*10**-9; #radius(m)\n", + "rCl=0.181*10**-9; #radius(m)\n", + "MCs=133; #atomic weight\n", + "MCl=35.5; #atomic weight\n", + "N=6.02*10**26; #Avagadro Number\n", + "\n", + "#Calculation\n", + "a=2*(rCl+rCs)/math.sqrt(3); #lattice constant(m)\n", + "M=(MCs+MCl)/N; #mass of 1 molecule(kg)\n", + "V=a**3; #volume of unit cell(m**3)\n", + "rho=M/V; #density of CsCl(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density of CsClis\",round(rho/10**3,3),\"*10**3 kg/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.6, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective charge is 0.72 *10**-19 coulomb\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", + "dm=1.98*(10**-29)*(1/3); #dipole moment\n", + "l=0.92*10**-10; #bond length(m)\n", + "\n", + "#Calculation\n", + "ec=dm/l; #effective charge(coulomb)\n", + "\n", + "#Result\n", + "print \"effective charge is\",round(ec*10**19,2),\"*10**-19 coulomb\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.7, Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required is -1.9 eV\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", + "epsilon0=8.85*10**-12; \n", + "r=0.5*10**-9; #distance(m)\n", + "I=5; #ionisation energy(eV)\n", + "E=4; #electron affinity(eV)\n", + "\n", + "#Calculation\n", + "C=e**2/(4*math.pi*epsilon0*e*r); #coulomb energy(eV)\n", + "Er=I-E-C; #energy required(eV)\n", + "\n", + "#Result\n", + "print \"energy required is\",round(Er,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 1.9, Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "young's modulus is 157 GPa\n" + ] + } + ], + "source": [ + "#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration\n", + "#importing modules\n", + "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\"" + ] + } + ], + "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/sample_notebooks/SaiRakesh/Untitled.ipynb b/sample_notebooks/SaiRakesh/Untitled.ipynb new file mode 100755 index 00000000..a688f606 --- /dev/null +++ b/sample_notebooks/SaiRakesh/Untitled.ipynb @@ -0,0 +1,1802 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#ENGINEERING THERMODYNAMICS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##chapter 1:Fundemental concepts and definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.1, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n", + "pressure difference(p)in pa\n", + "p= 39755.7\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.1, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n", + "h=30*10**-2;#manometer deflection of mercury in m\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure difference(p)in pa\"\n", + "p=rho*g*h\n", + "print\"p=\",round(p,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#example 2:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.2, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n", + "effort required for lifting the lid(E)in N\n", + "E= 7115.48\n" + ] + } + ], + "source": [ + "#cal of effort required for lifting the lid\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.2, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n", + "d=30*10**-2;#diameter of cylindrical vessel in m\n", + "h=76*10**-2;#atmospheric pressure in m of mercury\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"effort required for lifting the lid(E)in N\"\n", + "E=(rho*g*h)*(3.14*d**2)/4\n", + "print\"E=\",round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.3:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.3, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n", + "pressure measured by manometer is gauge pressure(Pg)in kpa\n", + "Pg=rho*g*h/10^3\n", + "actual pressure of the air(P)in kpa\n", + "P= 140.76\n" + ] + } + ], + "source": [ + "#cal of actual pressure of the air\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.3, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n", + "h=30*10**-2;# pressure of compressed air in m of mercury\n", + "Patm=101*10**3;#atmospheric pressure in pa\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n", + "print\"Pg=rho*g*h/10^3\"\n", + "Pg=rho*g*h/10**3\n", + "print\"actual pressure of the air(P)in kpa\"\n", + "P=Pg+Patm/10**3\n", + "print\"P=\",round(P,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.4:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.4, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n", + "density of oil(RHOoil)in kg/m^3\n", + "RHOoil=sg*RHOw\n", + "gauge pressure(Pg)in kpa\n", + "Pg= 7.848\n" + ] + } + ], + "source": [ + "#cal of gauge pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.4, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n", + "h=1;#depth of oil tank in m\n", + "sg=0.8;#specific gravity of oil\n", + "RHOw=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"density of oil(RHOoil)in kg/m^3\"\n", + "print\"RHOoil=sg*RHOw\"\n", + "RHOoil=sg*RHOw\n", + "print\"gauge pressure(Pg)in kpa\"\n", + "Pg=RHOoil*g*h/10**3\n", + "print\"Pg=\",round(Pg,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.5:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.5, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n", + "atmospheric pressure(Patm)in kpa\n", + "Patm=rho*g*h2/10^3\n", + "pressure due to mercury column at AB(Pab)in kpa\n", + "Pab=rho*g*h1/10^3\n", + "pressure exerted by gas(Pgas)in kpa\n", + "Pgas= 154.76\n" + ] + } + ], + "source": [ + "#cal of pressure exerted by gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.5, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n", + "h2=76*10**-2;#barometer reading of mercury in m\n", + "print\"atmospheric pressure(Patm)in kpa\"\n", + "print\"Patm=rho*g*h2/10^3\"\n", + "Patm=rho*g*h2/10**3\n", + "print\"pressure due to mercury column at AB(Pab)in kpa\"\n", + "print\"Pab=rho*g*h1/10^3\"\n", + "Pab=rho*g*h1/10**3\n", + "print\"pressure exerted by gas(Pgas)in kpa\"\n", + "Pgas=Patm+Pab\n", + "print\"Pgas=\",round(Pgas,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.6:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.6, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n", + "by law of conservation of energy\n", + "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n", + "so m*g*h = m*Cp*deltaT*4.18*1000\n", + "change in temperature of water(deltaT) in degree celcius\n", + "deltaT= 2.35\n" + ] + } + ], + "source": [ + "#cal of change in temperature of water\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.6, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n", + "m=1;#mass of water in kg\n", + "h=1000;#height from which water fall in m\n", + "Cp=1;#specific heat of water in kcal/kg k\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"by law of conservation of energy\"\n", + "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n", + "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n", + "print\"change in temperature of water(deltaT) in degree celcius\"\n", + "deltaT=(g*h)/(4.18*1000*Cp)\n", + "print\"deltaT=\",round(deltaT,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.7:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.7, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n", + "mass of object(m)in kg\n", + "m=w1/g1\n", + "spring balance reading=gravitational force in mass(F)in N\n", + "F= 86.65\n" + ] + } + ], + "source": [ + "#cal of spring balance reading\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.7, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n", + "w1=100;#weight of object at standard gravitational acceleration in N\n", + "g1=9.81;#acceleration due to gravity in m/s^2\n", + "g2=8.5;#gravitational acceleration at some location\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=w1/g1\"\n", + "m=w1/g1\n", + "print\"spring balance reading=gravitational force in mass(F)in N\"\n", + "F=m*g2\n", + "print\"F=\",round(F,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.8:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.8, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n", + "pressure measured by manometer(P) in pa\n", + "p=rho*g*h\n", + "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n", + "mass of piston(m)in kg\n", + "so m= 28.84\n" + ] + } + ], + "source": [ + "#cal of mass of piston\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.8, Page:24 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n", + "d=15*10**-2;#diameter of cylinder in m\n", + "h=12*10**-2;#manometer height difference in m of mercury\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"pressure measured by manometer(P) in pa\"\n", + "print\"p=rho*g*h\"\n", + "p=rho*g*h\n", + "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n", + "print\"mass of piston(m)in kg\"\n", + "m=(p*math.pi*d**2)/(4*g)\n", + "print\"so m=\",round(m,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.9:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.9, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n", + "balancing pressure at plane BC in figure we get\n", + "Psteam+Pwater=Patm+Pmercury\n", + "now 1.atmospheric pressure(Patm)in pa\n", + "Patm= 101396.16\n", + "2.pressure due to water(Pwater)in pa\n", + "Pwater= 196.2\n", + "3.pressure due to mercury(Pmercury)in pa\n", + "Pmercury=RHOm*g*h3 13341.6\n", + "using balancing equation\n", + "Psteam=Patm+Pmercury-Pwater\n", + "so pressure of steam(Psteam)in kpa\n", + "Psteam= 114.54\n" + ] + } + ], + "source": [ + "#cal of pressure due to atmosphere,water,mercury,steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.9, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n", + "RHOm=13.6*10**3;#density of mercury in kg/m^3\n", + "RHOw=1000;#density of water in kg/m^3\n", + "h1=76*10**-2;#barometer reading in m of mercury\n", + "h2=2*10**-2;#height raised by water in manometer tube in m \n", + "h3=10*10**-2;#height raised by mercury in manometer tube in m \n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"balancing pressure at plane BC in figure we get\")\n", + "print(\"Psteam+Pwater=Patm+Pmercury\")\n", + "print(\"now 1.atmospheric pressure(Patm)in pa\")\n", + "Patm=RHOm*g*h1\n", + "print(\"Patm=\"),round(Patm,2)\n", + "print(\"2.pressure due to water(Pwater)in pa\")\n", + "Pwater=RHOw*g*h2\n", + "print(\"Pwater=\"),round(Pwater,2)\n", + "print(\"3.pressure due to mercury(Pmercury)in pa\")\n", + "Pmercury=RHOm*g*h3\n", + "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n", + "print(\"using balancing equation\")\n", + "print(\"Psteam=Patm+Pmercury-Pwater\")\n", + "print(\"so pressure of steam(Psteam)in kpa\")\n", + "Psteam=(Patm+Pmercury-Pwater)/1000\n", + "print(\"Psteam=\"),round(Psteam,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.10:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.10, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n", + "atmospheric pressure(Patm)in kpa\n", + "absolute temperature in compartment A(Pa) in kpa\n", + "Pa= 496.06\n", + "absolute temperature in compartment B(Pb) in kpa\n", + "Pb= 246.06\n", + "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n" + ] + } + ], + "source": [ + "#cal of \"absolute temperature in compartment A,B\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.10, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n", + "h=720*10**-3;#barometer reading in m of Hg\n", + "Pga=400;#gauge pressure in compartment A in kpa\n", + "Pgb=150;#gauge pressure in compartment B in kpa\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"atmospheric pressure(Patm)in kpa\")\n", + "Patm=(rho*g*h)/1000\n", + "print(\"absolute temperature in compartment A(Pa) in kpa\")\n", + "Pa=Pga+Patm\n", + "print\"Pa=\",round(Pa,2)\n", + "print\"absolute temperature in compartment B(Pb) in kpa\"\n", + "Pb=Pgb+Patm\n", + "print\"Pb=\",round(Pb,2)\n", + "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.11:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.11, Page:25 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n", + "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n", + "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n", + "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n", + "air pressure(P1)in kpa 139.81\n" + ] + } + ], + "source": [ + "#cal of air pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.11, Page:25 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n", + "Patm=90*10**3;#atmospheric pressure in pa\n", + "RHOw=1000;#density of water in kg/m^3\n", + "RHOm=13600;#density of mercury in kg/m^3\n", + "RHOo=850;#density of oil in kg/m^3\n", + "g=9.81;#acceleration due to ggravity in m/s^2\n", + "h1=.15;#height difference between water column in m\n", + "h2=.25;#height difference between oil column in m\n", + "h3=.4;#height difference between mercury column in m\n", + "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n", + "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n", + "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n", + "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n", + "print\"air pressure(P1)in kpa\",round(P1,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.12:" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.12, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n", + "mass of object(m)in kg\n", + "m=F/g\n", + "kinetic energy(E)in J is given by\n", + "E= 140625000.0\n" + ] + } + ], + "source": [ + "#cal of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.12, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n", + "v=750;#relative velocity of object with respect to earth in m/sec\n", + "F=4000;#gravitational force in N\n", + "g=8;#acceleration due to gravity in m/s^2\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=F/g\"\n", + "m=F/g\n", + "print\"kinetic energy(E)in J is given by\"\n", + "E=m*v**2/2\n", + "print\"E=\",round(E)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.13:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.13, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n", + "characteristics gas constant(R2)in kJ/kg k\n", + "molecular weight of gas(m)in kg/kg mol= 16.63\n", + "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n" + ] + } + ], + "source": [ + "#cal of molecular weight of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.13, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n", + "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n", + "Cv=1.786;#specific heat at constant volume in kJ/kg k\n", + "R1=8.3143;#universal gas constant in kJ/kg k\n", + "print\"characteristics gas constant(R2)in kJ/kg k\"\n", + "R2=Cp-Cv\n", + "m=R1/R2\n", + "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n", + "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.14:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.14, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n", + "using perfect gas equation\n", + "P1*V1/T1 = P2*V2/T2\n", + "=>T2=(P2*V2*T1)/(P1*V1)\n", + "so final temperature of gas(T2)in k\n", + "or final temperature of gas(T2)in degree celcius= 127.0\n" + ] + } + ], + "source": [ + "#cal of final temperature of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.14, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n", + "P1=750*10**3;#initial pressure of gas in pa\n", + "V1=0.2;#initial volume of gas in m^3\n", + "T1=600;#initial temperature of gas in k\n", + "P2=2*10**5;#final pressure of gas i pa\n", + "V2=0.5;#final volume of gas in m^3\n", + "print\"using perfect gas equation\"\n", + "print\"P1*V1/T1 = P2*V2/T2\"\n", + "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n", + "print\"so final temperature of gas(T2)in k\"\n", + "T2=(P2*V2*T1)/(P1*V1)\n", + "T2=T2-273\n", + "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.15:" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.15, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n", + "from perfect gas equation we get\n", + "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n", + "m1= 5.807\n", + "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n", + "m2= 3.111\n", + "mass of air removed(m)in kg 2.696\n", + "volume of this mass of air(V) at initial states in m^3= 2.32\n" + ] + } + ], + "source": [ + "#cal of volume of this mass of air(V) at initial states\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.15, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n", + "P1=100*10**3;#initial pressure of air in pa\n", + "V1=5.;#initial volume of air in m^3\n", + "T1=300.;#initial temperature of gas in k\n", + "P2=50*10**3;#final pressure of air in pa\n", + "V2=5.;#final volume of air in m^3\n", + "T2=(280.);#final temperature of air in K\n", + "R=287.;#gas constant on J/kg k\n", + "print\"from perfect gas equation we get\"\n", + "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n", + "m1=(P1*V1)/(R*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n", + "m2=(P2*V2)/(R*T2)\n", + "print(\"m2=\"),round(m2,3)\n", + "m=m1-m2\n", + "print\"mass of air removed(m)in kg\",round(m,3)\n", + "V=m*R*T1/P1\n", + "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.16, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n", + "here V1=V2\n", + "so P1/T1=P2/T2\n", + "final temperature of hydrogen gas(T2)in k\n", + "=>T2=P2*T1/P1\n", + "now R=(Cp-Cv) in KJ/kg k\n", + "And volume of cylinder(V1)in m^3\n", + "V1=(math.pi*d^2*l)/4\n", + "mass of hydrogen gas(m)in kg\n", + "m= 0.254\n", + "now heat supplied(Q)in KJ\n", + "Q= 193.93\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.16, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n", + "d=1;#diameter of cylinder in m\n", + "l=4;#length of cylinder in m\n", + "P1=100*10**3;#initial pressureof hydrogen gas in pa\n", + "T1=(27+273);#initial temperature of hydrogen gas in k\n", + "P2=125*10**3;#final pressureof hydrogen gas in pa\n", + "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n", + "Cv=10.183;#specific heat at constant volume in KJ/kg k\n", + "print\"here V1=V2\"\n", + "print\"so P1/T1=P2/T2\"\n", + "print\"final temperature of hydrogen gas(T2)in k\"\n", + "print\"=>T2=P2*T1/P1\"\n", + "T2=P2*T1/P1\n", + "print\"now R=(Cp-Cv) in KJ/kg k\"\n", + "R=Cp-Cv\n", + "print\"And volume of cylinder(V1)in m^3\"\n", + "print\"V1=(math.pi*d^2*l)/4\"\n", + "V1=(math.pi*d**2*l)/4\n", + "print\"mass of hydrogen gas(m)in kg\"\n", + "m=(P1*V1)/(1000*R*T1)\n", + "print\"m=\",round(m,3)\n", + "print\"now heat supplied(Q)in KJ\"\n", + "Q=m*Cv*(T2-T1)\n", + "print\"Q=\",round(Q,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.17:" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.17, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n", + "final total volume(V)in m^3\n", + "V=V1*V2\n", + "total mass of air(m)in kg\n", + "m=m1+m2\n", + "final pressure of air(P)in kpa\n", + "using perfect gas equation\n", + "P= 516.6\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.17, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n", + "V1=2.;#volume of first cylinder in m^3\n", + "V2=2.;#volume of second cylinder in m^3\n", + "T=(27+273);#temperature of system in k\n", + "m1=20.;#mass of air in first vessel in kg\n", + "m2=4.;#mass of air in second vessel in kg\n", + "R=287.;#gas constant J/kg k\n", + "print(\"final total volume(V)in m^3\")\n", + "print(\"V=V1*V2\")\n", + "V=V1*V2\n", + "print(\"total mass of air(m)in kg\")\n", + "print(\"m=m1+m2\")\n", + "m=m1+m2\n", + "print(\"final pressure of air(P)in kpa\")\n", + "print(\"using perfect gas equation\")\n", + "P=(m*R*T)/(1000*V)\n", + "print\"P=\",round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.18:" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.18, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n", + "1.By considering it as a PERFECT GAS\n", + "gas constant for CO2(Rco2)\n", + "Rco2=(J/Kg.k) 188.9\n", + "Also P*V=M*Rco2*T\n", + "pressure of CO2 as perfect gas(P)in N/m^2\n", + "P=(m*Rco2*T)/V 141683.71\n", + "2.By considering as a REAL GAS\n", + "values of vanderwaal constants a,b can be seen from the table which are\n", + "a=(N m^4/(kg mol)^2) 362850.0\n", + "b=(m^3/kg mol) 0.03\n", + "now specific volume(v)in m^3/kg mol\n", + "v= 17.604\n", + "now substituting the value of all variables in vanderwaal equation\n", + "(P+(a/v^2))*(v-b)=R*T\n", + "pressure of CO2 as real gas(P)in N/m^2\n", + "P= 140766.02\n" + ] + } + ], + "source": [ + "#cal of pressure of CO2 as perfect,real gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.18, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n", + "m=5;#mass of CO2 in kg\n", + "V=2;#volume of vesssel in m^3\n", + "T=(27+273);#temperature of vessel in k\n", + "R=8.314*10**3;#universal gas constant in J/kg k\n", + "M=44.01;#molecular weight of CO2 \n", + "print(\"1.By considering it as a PERFECT GAS\")\n", + "print(\"gas constant for CO2(Rco2)\")\n", + "Rco2=R/M\n", + "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n", + "print(\"Also P*V=M*Rco2*T\")\n", + "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n", + "P=(m*Rco2*T)/V\n", + "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n", + "print(\"2.By considering as a REAL GAS\")\n", + "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n", + "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n", + "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n", + "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n", + "print(\"b=(m^3/kg mol)\"),round(b,2)\n", + "print(\"now specific volume(v)in m^3/kg mol\")\n", + "v=V*M/m\n", + "print(\"v=\"),round(v,3)\n", + "print(\"now substituting the value of all variables in vanderwaal equation\")\n", + "print(\"(P+(a/v^2))*(v-b)=R*T\")\n", + "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n", + "P=((R*T)/(v-b))-(a/v**2)\n", + "print(\"P=\"),round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.19:" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.19, Page:29 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n", + "1.considering as perfect gas\n", + "specific volume(V)in m^3/kg\n", + "V= 0.0186\n", + "2.considering compressibility effects\n", + "reduced pressure(P)in pa\n", + "p= 0.8\n", + "reduced temperature(t)in k\n", + "t= 1.1\n", + "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n", + "we get Z=0.785\n", + "now actual specific volume(v)in m^3/kg\n", + "v= 0.0146\n" + ] + } + ], + "source": [ + "#cal of specific volume of steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.19, Page:29 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n", + "P=17672;#pressure of steam on kpa\n", + "T=712;#temperature of steam in k\n", + "Pc=22.09;#critical pressure of steam in Mpa\n", + "Tc=647.3;#critical temperature of steam in k\n", + "R=0.4615;#gas constant for steam in KJ/kg k\n", + "print(\"1.considering as perfect gas\")\n", + "print(\"specific volume(V)in m^3/kg\")\n", + "V=R*T/P\n", + "print(\"V=\"),round(V,4)\n", + "print(\"2.considering compressibility effects\")\n", + "print(\"reduced pressure(P)in pa\")\n", + "p=P/(Pc*1000)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"reduced temperature(t)in k\")\n", + "t=T/Tc\n", + "print(\"t=\"),round(t,2)\n", + "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n", + "print(\"we get Z=0.785\")\n", + "Z=0.785;#compressibility factor\n", + "print(\"now actual specific volume(v)in m^3/kg\")\n", + "v=Z*V\n", + "print(\"v=\"),round(v,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.20:" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.20, Page:30 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n", + "volume of ballon(V1)in m^3\n", + "V1= 65.45\n", + "molecular mass of hydrogen(M)\n", + "M=2\n", + "gas constant for H2(R1)in J/kg k\n", + "R1= 4157.0\n", + "mass of H2 in ballon(m1)in kg\n", + "m1= 5.316\n", + "volume of air printlaced(V2)=volume of ballon(V1)\n", + "mass of air printlaced(m2)in kg\n", + "m2= 79.66\n", + "gas constant for air(R2)=0.287 KJ/kg k\n", + "load lifting capacity due to buoyant force(m)in kg\n", + "m= 74.343\n" + ] + } + ], + "source": [ + "#estimation of maximum load that can be lifted \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.20, Page:30 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n", + "d=5.;#diameter of ballon in m\n", + "T1=(27.+273.);#temperature of hydrogen in k\n", + "P=1.013*10**5;#atmospheric pressure in pa\n", + "T2=(17.+273.);#temperature of surrounding air in k\n", + "R=8.314*10**3;#gas constant in J/kg k\n", + "print(\"volume of ballon(V1)in m^3\")\n", + "V1=(4./3.)*math.pi*((d/2)**3)\n", + "print(\"V1=\"),round(V1,2)\n", + "print(\"molecular mass of hydrogen(M)\")\n", + "print(\"M=2\")\n", + "M=2;#molecular mass of hydrogen\n", + "print(\"gas constant for H2(R1)in J/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"mass of H2 in ballon(m1)in kg\")\n", + "m1=(P*V1)/(R1*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n", + "print(\"mass of air printlaced(m2)in kg\")\n", + "R2=0.287*1000;#gas constant for air in J/kg k\n", + "m2=(P*V1)/(R2*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n", + "print(\"load lifting capacity due to buoyant force(m)in kg\")\n", + "m=m2-m1\n", + "print(\"m=\"),round(m,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.21:" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.21, Page:31 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n", + "let initial receiver pressure(p1)=1 in pa\n", + "so final receiver pressure(p2)=in pa 0.25\n", + "perfect gas equation,p*V*m=m*R*T\n", + "differentiating and then integrating equation w.r.t to time(t) \n", + "we get t=-(V/v)*log(p2/p1)\n", + "so time(t)in min 110.9\n" + ] + } + ], + "source": [ + "#cal of time required\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.21, Page:31 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n", + "v=0.25;#volume sucking rate of pump in m^3/min\n", + "V=20.;#volume of air vessel in m^3\n", + "p1=1.;#initial receiver pressure in pa\n", + "print(\"let initial receiver pressure(p1)=1 in pa\")\n", + "p2=p1/4.\n", + "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n", + "print(\"perfect gas equation,p*V*m=m*R*T\")\n", + "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n", + "print(\"we get t=-(V/v)*log(p2/p1)\")\n", + "t=-(V/v)*math.log(p2/p1)\n", + "print(\"so time(t)in min\"),round(t,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.22:" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.22, Page:32 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n", + "first calculate gas constants for different gases in j/kg k\n", + "for nitrogen,R1= 296.9\n", + "for oxygen,R2= 259.8\n", + "for carbon dioxide,R3= 188.95\n", + "so the gas constant for mixture(Rm)in j/kg k\n", + "Rm= 288.09\n", + "now the specific heat at constant pressure for constituent gases in KJ/kg k\n", + "for nitrogen,Cp1= 1.039\n", + "for oxygen,Cp2= 0.909\n", + "for carbon dioxide,Cp3= 0.819\n", + "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n", + "Cpm= 1.0115\n", + "now no. of moles of constituents gases\n", + "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n", + "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n", + "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n", + "total no. of moles in mixture in mol\n", + "n= 0.1733\n", + "now mole fraction of constituent gases\n", + "for nitrogen,x1= 0.825\n", + "for oxygen,x2= 0.162\n", + "for carbon dioxide,x3= 0.0131\n", + "now the molecular weight of mixture(Mm)in kg/kmol\n", + "Mm= 28.86\n" + ] + } + ], + "source": [ + "#cal of specific heat at constant pressure for constituent gases \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.22, Page:32 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n", + "m=5;#mass of mixture of gas in kg\n", + "P=1.013*10**5;#pressure of mixture in pa\n", + "T=300;#temperature of mixture in k\n", + "M1=28.;#molecular weight of nitrogen(N2)\n", + "M2=32.;#molecular weight of oxygen(O2)\n", + "M3=44.;#molecular weight of carbon dioxide(CO2)\n", + "f1=0.80;#fraction of N2 in mixture\n", + "f2=0.18;#fraction of O2 in mixture\n", + "f3=0.02;#fraction of CO2 in mixture\n", + "k1=1.4;#ratio of specific heat capacities for N2\n", + "k2=1.4;#ratio of specific heat capacities for O2\n", + "k3=1.3;#ratio of specific heat capacities for CO2\n", + "R=8314;#universal gas constant in J/kg k\n", + "print(\"first calculate gas constants for different gases in j/kg k\")\n", + "R1=R/M1\n", + "print(\"for nitrogen,R1=\"),round(R1,1)\n", + "R2=R/M2\n", + "print(\"for oxygen,R2=\"),round(R2,1)\n", + "R3=R/M3\n", + "print(\"for carbon dioxide,R3=\"),round(R3,2)\n", + "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n", + "Rm=f1*R1+f2*R2+f3*R3\n", + "print(\"Rm=\"),round(Rm,2)\n", + "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n", + "Cp1=((k1/(k1-1))*R1)/1000\n", + "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n", + "Cp2=((k2/(k2-1))*R2)/1000\n", + "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n", + "Cp3=((k3/(k3-1))*R3)/1000\n", + "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n", + "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n", + "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n", + "print(\"Cpm=\"),round(Cpm,4)\n", + "print(\"now no. of moles of constituents gases\")\n", + "m1=f1*m\n", + "n1=m1/M1\n", + "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n", + "m2=f2*m\n", + "n2=m2/M2\n", + "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n", + "m3=f3*m\n", + "n3=m3/M3\n", + "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n", + "print(\"total no. of moles in mixture in mol\")\n", + "n=n1+n2+n3\n", + "print(\"n=\"),round(n,4)\n", + "print(\"now mole fraction of constituent gases\")\n", + "x1=n1/n\n", + "print(\"for nitrogen,x1=\"),round(x1,3)\n", + "x2=n2/n\n", + "print(\"for oxygen,x2=\"),round(x2,3)\n", + "x3=n3/n\n", + "print(\"for carbon dioxide,x3=\"),round(x3,4)\n", + "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n", + "Mm=M1*x1+M2*x2+M3*x3\n", + "print(\"Mm=\"),round(Mm,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.23:" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.23, Page:33 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n", + "mole fraction of constituent gases\n", + "x=(ni/n)=(Vi/V)\n", + "take volume of mixture(V)=1 m^3\n", + "mole fraction of O2(x1)\n", + "x1= 0.18\n", + "mole fraction of N2(x2)\n", + "x2= 0.75\n", + "mole fraction of CO2(x3)\n", + "x3= 0.07\n", + "now molecular weight of mixture = molar mass(m)\n", + "m= 29.84\n", + "now gravimetric analysis refers to the mass fraction analysis\n", + "mass fraction of constituents\n", + "y=xi*Mi/m\n", + "mole fraction of O2\n", + "y1= 0.193\n", + "mole fraction of N2\n", + "y2= 0.704\n", + "mole fraction of CO2\n", + "y3= 0.103\n", + "now partial pressure of constituents = volume fraction * pressure of mixture\n", + "Pi=xi*P\n", + "partial pressure of O2(P1)in Mpa\n", + "P1= 0.09\n", + "partial pressure of N2(P2)in Mpa\n", + "P2= 0.375\n", + "partial pressure of CO2(P3)in Mpa\n", + "P3= 0.04\n", + "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.23, Page:33 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n", + "V1=0.18;#volume fraction of O2 in m^3\n", + "V2=0.75;#volume fraction of N2 in m^3\n", + "V3=0.07;#volume fraction of CO2 in m^3\n", + "P=0.5;#pressure of mixture in Mpa\n", + "T=(107+273);#temperature of mixture in k\n", + "M1=32;#molar mass of O2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"mole fraction of constituent gases\")\n", + "print(\"x=(ni/n)=(Vi/V)\")\n", + "V=1;# volume of mixture in m^3\n", + "print(\"take volume of mixture(V)=1 m^3\")\n", + "print(\"mole fraction of O2(x1)\")\n", + "x1=V1/V\n", + "print(\"x1=\"),round(x1,2)\n", + "print(\"mole fraction of N2(x2)\")\n", + "x2=V2/V\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"mole fraction of CO2(x3)\")\n", + "x3=V3/V\n", + "print(\"x3=\"),round(x3,2)\n", + "print(\"now molecular weight of mixture = molar mass(m)\")\n", + "m=x1*M1+x2*M2+x3*M3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n", + "print(\"mass fraction of constituents\")\n", + "print(\"y=xi*Mi/m\")\n", + "print(\"mole fraction of O2\")\n", + "y1=x1*M1/m\n", + "print(\"y1=\"),round(y1,3)\n", + "print(\"mole fraction of N2\")\n", + "y2=x2*M2/m\n", + "print(\"y2=\"),round(y2,3)\n", + "print(\"mole fraction of CO2\")\n", + "y3=x3*M3/m\n", + "print(\"y3=\"),round(y3,3)\n", + "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n", + "print(\"Pi=xi*P\")\n", + "print(\"partial pressure of O2(P1)in Mpa\")\n", + "p1=x1*P\n", + "print(\"P1=\"),round(p1,2)\n", + "print(\"partial pressure of N2(P2)in Mpa\")\n", + "P2=x2*P\n", + "print(\"P2=\"),round(P2,3)\n", + "P3=x3*P\n", + "print(\"partial pressure of CO2(P3)in Mpa\")\n", + "print(\"P3=\"),round(P3,2)\n", + "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.24:" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.24, Page:34 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n", + "volume of tank of N2(V1) in m^3= 3.0\n", + "volume of tank of CO2(V2) in m^3= 3.0\n", + "taking the adiabatic condition\n", + "no. of moles of N2(n1)\n", + "n1= 0.6\n", + "no. of moles of CO2(n2)\n", + "n2= 0.37\n", + "total no. of moles of mixture(n)in mol\n", + "n= 0.97\n", + "gas constant for N2(R1)in J/kg k\n", + "R1= 296.93\n", + "gas constant for CO2(R2)in J/kg k\n", + "R2=R/M2 188.95\n", + "specific heat of N2 at constant volume (Cv1) in J/kg k\n", + "Cv1= 742.32\n", + "specific heat of CO2 at constant volume (Cv2) in J/kg k\n", + "Cv2= 629.85\n", + "mass of N2(m1)in kg\n", + "m1= 16.84\n", + "mass of CO2(m2)in kg\n", + "m2= 16.28\n", + "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n", + "applying energy conservation principle\n", + "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n", + "equlibrium temperature(T)in k\n", + "=>T= 439.44\n", + "so the equlibrium pressure(P)in kpa\n", + "P= 591.55\n" + ] + } + ], + "source": [ + "#cal of equilibrium temperature,pressure of mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.24, Page:34 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n", + "V=6;#volume of tank in m^3\n", + "P1=800*10**3;#pressure of N2 gas tank in pa\n", + "T1=480.;#temperature of N2 gas tank in k\n", + "P2=400*10**3;#pressure of CO2 gas tank in pa\n", + "T2=390.;#temperature of CO2 gas tank in k\n", + "k1=1.4;#ratio of specific heat capacity for N2\n", + "k2=1.3;#ratio of specific heat capacity for CO2\n", + "R=8314.;#universal gas constant in J/kg k\n", + "M1=28.;#molecular weight of N2\n", + "M2=44.;#molecular weight of CO2\n", + "V1=V/2\n", + "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n", + "V2=V/2\n", + "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n", + "print(\"taking the adiabatic condition\")\n", + "print(\"no. of moles of N2(n1)\")\n", + "n1=(P1*V1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "print(\"no. of moles of CO2(n2)\")\n", + "n2=(P2*V2)/(R*T2)\n", + "print(\"n2=\"),round(n2,2)\n", + "print(\"total no. of moles of mixture(n)in mol\")\n", + "n=n1+n2\n", + "print(\"n=\"),round(n,2)\n", + "print(\"gas constant for N2(R1)in J/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"gas constant for CO2(R2)in J/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=R/M2\"),round(R2,2)\n", + "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n", + "Cv1=R1/(k1-1)\n", + "print(\"Cv1=\"),round(Cv1,2)\n", + "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n", + "Cv2=R2/(k2-1)\n", + "print(\"Cv2=\"),round(Cv2,2)\n", + "print(\"mass of N2(m1)in kg\")\n", + "m1=n1*M1\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"mass of CO2(m2)in kg\")\n", + "m2=n2*M2\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n", + "print(\"applying energy conservation principle\")\n", + "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n", + "print(\"equlibrium temperature(T)in k\")\n", + "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n", + "print(\"=>T=\"),round(T,2)\n", + "print(\"so the equlibrium pressure(P)in kpa\")\n", + "P=(n*R*T)/(1000*V)\n", + "print(\"P=\"),round(P,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.25:" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.25, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n", + "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n", + "so the specific heat at constant pressure(Cp)in KJ/kg k\n", + "Cp= 7.608\n" + ] + } + ], + "source": [ + "#cal of specific heat of final mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.25, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n", + "m1=2;#mass of H2 in kg\n", + "m2=3;#mass of He in kg\n", + "T=100;#temperature of container in k\n", + "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n", + "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n", + "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n", + "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n", + "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n", + "print(\"Cp=\"),round(Cp,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.26:" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.26, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "gas constant for N2(R2)in KJ/kg k\n", + "R2= 0.297\n", + "gas constant for CO2(R3)in KJ/kg k\n", + "R3= 0.189\n", + "so now gas constant for mixture(Rm)in KJ/kg k\n", + "Rm= 2.606\n", + "considering gas to be perfect gas\n", + "total mass of mixture(m)in kg\n", + "m= 30.0\n", + "capacity of vessel(V)in m^3\n", + "V= 231.57\n", + "now final temperature(Tf) is twice of initial temperature(Ti)\n", + "so take k=Tf/Ti=2\n", + "for constant volume heating,final pressure(Pf)in kpa shall be\n", + "Pf= 202.65\n" + ] + } + ], + "source": [ + "#cal of capacity and pressure in the vessel\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.26, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n", + "m1=18.;#mass of hydrogen(H2) in kg\n", + "m2=10.;#mass of nitrogen(N2) in kg\n", + "m3=2.;#mass of carbon dioxide(CO2) in kg\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "Pi=101.325;#atmospheric pressure in kpa\n", + "T=(27+273.15);#ambient temperature in k\n", + "M1=2;#molar mass of H2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"gas constant for N2(R2)in KJ/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=\"),round(R2,3)\n", + "print(\"gas constant for CO2(R3)in KJ/kg k\")\n", + "R3=R/M3\n", + "print(\"R3=\"),round(R3,3)\n", + "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n", + "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n", + "print(\"Rm=\"),round(Rm,3)\n", + "print(\"considering gas to be perfect gas\")\n", + "print(\"total mass of mixture(m)in kg\")\n", + "m=m1+m2+m3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"capacity of vessel(V)in m^3\")\n", + "V=(m*Rm*T)/Pi\n", + "print(\"V=\"),round(V,2)\n", + "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n", + "k=2;#ratio of initial to final temperature\n", + "print(\"so take k=Tf/Ti=2\") \n", + "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n", + "Pf=Pi*k\n", + "print(\"Pf=\"),round(Pf,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.27" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.27, Page:36 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n", + "let inlet state be 1 and exit state be 2\n", + "by charles law volume and temperature can be related as\n", + "(V1/T1)=(V2/T2)\n", + "(V2/V1)=(T2/T1)\n", + "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n", + "since change in K.E=0\n", + "so (D2^2/D1^2)=T2/T1\n", + "D2/D1=sqrt(T2/T1)\n", + "say(D2/D1)=k\n", + "so exit to inlet diameter ratio(k) 1.29\n" + ] + } + ], + "source": [ + "#cal of exit to inlet diameter ratio\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.27, Page:36 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n", + "T1=(27.+273.);#initial temperature of air in k\n", + "T2=500.;#final temperature of air in k\n", + "print(\"let inlet state be 1 and exit state be 2\")\n", + "print(\"by charles law volume and temperature can be related as\")\n", + "print(\"(V1/T1)=(V2/T2)\")\n", + "print(\"(V2/V1)=(T2/T1)\")\n", + "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n", + "print(\"since change in K.E=0\")\n", + "print(\"so (D2^2/D1^2)=T2/T1\")\n", + "print(\"D2/D1=sqrt(T2/T1)\")\n", + "print(\"say(D2/D1)=k\")\n", + "k=math.sqrt(T2/T1)\n", + "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "###example 1.28:" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.28, Page:37 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "say initial and final ststes are given by 1 and 2\n", + "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n", + "final pressure of hydrogen(P2)in cm of Hg\n", + "P2= 6.0\n", + "therefore pressure difference(P)in kpa\n", + "P= 93.33\n", + "mass pumped out(m)in kg\n", + "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n", + "here V1=V2=V and T1=T2=T\n", + "so m= 0.15\n", + "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n", + "say state before and after cooling are denoted by suffix 2 and 3\n", + "final pressure after cooling(P3)in kpa\n", + "P3= 7.546\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.28, Page:37 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n", + "V=2;#volume of vessel in m^3\n", + "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n", + "T=(27+273.15);#temperature of vessel in k\n", + "p=70;#final pressure in cm of Hg vaccum\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "M=2;#molecular weight of H2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"say initial and final ststes are given by 1 and 2\")\n", + "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n", + "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n", + "P2=P1-p\n", + "print(\"P2=\"),round(P2,2)\n", + "print(\"therefore pressure difference(P)in kpa\")\n", + "P=((P1-P2)*101.325)/76\n", + "print(\"P=\"),round(P,2)\n", + "print(\"mass pumped out(m)in kg\")\n", + "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n", + "print(\"here V1=V2=V and T1=T2=T\")\n", + "m=(V*P)/(R1*T)\n", + "print(\"so m=\"),round(m,2)\n", + "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n", + "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n", + "T3=(10+273.15);#final temperature after cooling in k\n", + "print(\"final pressure after cooling(P3)in kpa\")\n", + "P3=(T3/T)*P2*(101.325/76)\n", + "print(\"P3=\"),round(P3,3)\n", + "\n" + ] + }, + { + "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/sample_notebooks/SaiRakesh/chapter_1.ipynb b/sample_notebooks/SaiRakesh/chapter_1.ipynb new file mode 100755 index 00000000..9474d100 --- /dev/null +++ b/sample_notebooks/SaiRakesh/chapter_1.ipynb @@ -0,0 +1,1777 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# chapter 1:Fundemental concepts and definitions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.1;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.1, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n", + "pressure difference(p)in pa\n", + "p= 39755.7\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.1, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n", + "h=30*10**-2;#manometer deflection of mercury in m\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure difference(p)in pa\"\n", + "p=rho*g*h\n", + "print\"p=\",round(p,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.2;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.2, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n", + "effort required for lifting the lid(E)in N\n", + "E= 7115.48\n" + ] + } + ], + "source": [ + "#cal of effort required for lifting the lid\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.2, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n", + "d=30*10**-2;#diameter of cylindrical vessel in m\n", + "h=76*10**-2;#atmospheric pressure in m of mercury\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"effort required for lifting the lid(E)in N\"\n", + "E=(rho*g*h)*(3.14*d**2)/4\n", + "print\"E=\",round(E,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.3;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.3, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n", + "pressure measured by manometer is gauge pressure(Pg)in kpa\n", + "Pg=rho*g*h/10^3\n", + "actual pressure of the air(P)in kpa\n", + "P= 140.76\n" + ] + } + ], + "source": [ + "#cal of actual pressure of the air\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.3, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n", + "h=30*10**-2;# pressure of compressed air in m of mercury\n", + "Patm=101*10**3;#atmospheric pressure in pa\n", + "g=9.78;#acceleration due to gravity in m/s^2\n", + "rho=13550;#density of mercury at room temperature in kg/m^3\n", + "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n", + "print\"Pg=rho*g*h/10^3\"\n", + "Pg=rho*g*h/10**3\n", + "print\"actual pressure of the air(P)in kpa\"\n", + "P=Pg+Patm/10**3\n", + "print\"P=\",round(P,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.4;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.4, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n", + "density of oil(RHOoil)in kg/m^3\n", + "RHOoil=sg*RHOw\n", + "gauge pressure(Pg)in kpa\n", + "Pg= 7.848\n" + ] + } + ], + "source": [ + "#cal of gauge pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.4, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n", + "h=1;#depth of oil tank in m\n", + "sg=0.8;#specific gravity of oil\n", + "RHOw=1000;#density of water in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"density of oil(RHOoil)in kg/m^3\"\n", + "print\"RHOoil=sg*RHOw\"\n", + "RHOoil=sg*RHOw\n", + "print\"gauge pressure(Pg)in kpa\"\n", + "Pg=RHOoil*g*h/10**3\n", + "print\"Pg=\",round(Pg,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.5;page no:22" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.5, Page:22 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n", + "atmospheric pressure(Patm)in kpa\n", + "Patm=rho*g*h2/10^3\n", + "pressure due to mercury column at AB(Pab)in kpa\n", + "Pab=rho*g*h1/10^3\n", + "pressure exerted by gas(Pgas)in kpa\n", + "Pgas= 154.76\n" + ] + } + ], + "source": [ + "#cal of pressure exerted by gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.5, Page:22 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n", + "h2=76*10**-2;#barometer reading of mercury in m\n", + "print\"atmospheric pressure(Patm)in kpa\"\n", + "print\"Patm=rho*g*h2/10^3\"\n", + "Patm=rho*g*h2/10**3\n", + "print\"pressure due to mercury column at AB(Pab)in kpa\"\n", + "print\"Pab=rho*g*h1/10^3\"\n", + "Pab=rho*g*h1/10**3\n", + "print\"pressure exerted by gas(Pgas)in kpa\"\n", + "Pgas=Patm+Pab\n", + "print\"Pgas=\",round(Pgas,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.6;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.6, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n", + "by law of conservation of energy\n", + "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n", + "so m*g*h = m*Cp*deltaT*4.18*1000\n", + "change in temperature of water(deltaT) in degree celcius\n", + "deltaT= 2.35\n" + ] + } + ], + "source": [ + "#cal of change in temperature of water\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.6, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n", + "m=1;#mass of water in kg\n", + "h=1000;#height from which water fall in m\n", + "Cp=1;#specific heat of water in kcal/kg k\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"by law of conservation of energy\"\n", + "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n", + "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n", + "print\"change in temperature of water(deltaT) in degree celcius\"\n", + "deltaT=(g*h)/(4.18*1000*Cp)\n", + "print\"deltaT=\",round(deltaT,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.7;page no:23" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.7, Page:23 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n", + "mass of object(m)in kg\n", + "m=w1/g1\n", + "spring balance reading=gravitational force in mass(F)in N\n", + "F= 86.65\n" + ] + } + ], + "source": [ + "#cal of spring balance reading\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.7, Page:23 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n", + "w1=100;#weight of object at standard gravitational acceleration in N\n", + "g1=9.81;#acceleration due to gravity in m/s^2\n", + "g2=8.5;#gravitational acceleration at some location\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=w1/g1\"\n", + "m=w1/g1\n", + "print\"spring balance reading=gravitational force in mass(F)in N\"\n", + "F=m*g2\n", + "print\"F=\",round(F,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.8;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.8, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n", + "pressure measured by manometer(P) in pa\n", + "p=rho*g*h\n", + "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n", + "mass of piston(m)in kg\n", + "so m= 28.84\n" + ] + } + ], + "source": [ + "#cal of mass of piston\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.8, Page:24 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n", + "d=15*10**-2;#diameter of cylinder in m\n", + "h=12*10**-2;#manometer height difference in m of mercury\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print\"pressure measured by manometer(P) in pa\"\n", + "print\"p=rho*g*h\"\n", + "p=rho*g*h\n", + "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n", + "print\"mass of piston(m)in kg\"\n", + "m=(p*math.pi*d**2)/(4*g)\n", + "print\"so m=\",round(m,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.9;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.9, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n", + "balancing pressure at plane BC in figure we get\n", + "Psteam+Pwater=Patm+Pmercury\n", + "now 1.atmospheric pressure(Patm)in pa\n", + "Patm= 101396.16\n", + "2.pressure due to water(Pwater)in pa\n", + "Pwater= 196.2\n", + "3.pressure due to mercury(Pmercury)in pa\n", + "Pmercury=RHOm*g*h3 13341.6\n", + "using balancing equation\n", + "Psteam=Patm+Pmercury-Pwater\n", + "so pressure of steam(Psteam)in kpa\n", + "Psteam= 114.54\n" + ] + } + ], + "source": [ + "#cal of pressure due to atmosphere,water,mercury,steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.9, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n", + "RHOm=13.6*10**3;#density of mercury in kg/m^3\n", + "RHOw=1000;#density of water in kg/m^3\n", + "h1=76*10**-2;#barometer reading in m of mercury\n", + "h2=2*10**-2;#height raised by water in manometer tube in m \n", + "h3=10*10**-2;#height raised by mercury in manometer tube in m \n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"balancing pressure at plane BC in figure we get\")\n", + "print(\"Psteam+Pwater=Patm+Pmercury\")\n", + "print(\"now 1.atmospheric pressure(Patm)in pa\")\n", + "Patm=RHOm*g*h1\n", + "print(\"Patm=\"),round(Patm,2)\n", + "print(\"2.pressure due to water(Pwater)in pa\")\n", + "Pwater=RHOw*g*h2\n", + "print(\"Pwater=\"),round(Pwater,2)\n", + "print(\"3.pressure due to mercury(Pmercury)in pa\")\n", + "Pmercury=RHOm*g*h3\n", + "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n", + "print(\"using balancing equation\")\n", + "print(\"Psteam=Patm+Pmercury-Pwater\")\n", + "print(\"so pressure of steam(Psteam)in kpa\")\n", + "Psteam=(Patm+Pmercury-Pwater)/1000\n", + "print(\"Psteam=\"),round(Psteam,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.10;page no:24" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.10, Page:24 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n", + "atmospheric pressure(Patm)in kpa\n", + "absolute temperature in compartment A(Pa) in kpa\n", + "Pa= 496.06\n", + "absolute temperature in compartment B(Pb) in kpa\n", + "Pb= 246.06\n", + "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n" + ] + } + ], + "source": [ + "#cal of \"absolute temperature in compartment A,B\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.10, Page:24 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n", + "h=720*10**-3;#barometer reading in m of Hg\n", + "Pga=400;#gauge pressure in compartment A in kpa\n", + "Pgb=150;#gauge pressure in compartment B in kpa\n", + "rho=13.6*10**3;#density of mercury in kg/m^3\n", + "g=9.81;#acceleration due to gravity in m/s^2\n", + "print(\"atmospheric pressure(Patm)in kpa\")\n", + "Patm=(rho*g*h)/1000\n", + "print(\"absolute temperature in compartment A(Pa) in kpa\")\n", + "Pa=Pga+Patm\n", + "print\"Pa=\",round(Pa,2)\n", + "print\"absolute temperature in compartment B(Pb) in kpa\"\n", + "Pb=Pgb+Patm\n", + "print\"Pb=\",round(Pb,2)\n", + "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.11;page no:25" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.11, Page:25 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n", + "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n", + "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n", + "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n", + "air pressure(P1)in kpa 139.81\n" + ] + } + ], + "source": [ + "#cal of air pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.11, Page:25 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n", + "Patm=90*10**3;#atmospheric pressure in pa\n", + "RHOw=1000;#density of water in kg/m^3\n", + "RHOm=13600;#density of mercury in kg/m^3\n", + "RHOo=850;#density of oil in kg/m^3\n", + "g=9.81;#acceleration due to ggravity in m/s^2\n", + "h1=.15;#height difference between water column in m\n", + "h2=.25;#height difference between oil column in m\n", + "h3=.4;#height difference between mercury column in m\n", + "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n", + "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n", + "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n", + "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n", + "print\"air pressure(P1)in kpa\",round(P1,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.12;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.12, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n", + "mass of object(m)in kg\n", + "m=F/g\n", + "kinetic energy(E)in J is given by\n", + "E= 140625000.0\n" + ] + } + ], + "source": [ + "#cal of kinetic energy\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.12, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n", + "v=750;#relative velocity of object with respect to earth in m/sec\n", + "F=4000;#gravitational force in N\n", + "g=8;#acceleration due to gravity in m/s^2\n", + "print\"mass of object(m)in kg\"\n", + "print\"m=F/g\"\n", + "m=F/g\n", + "print\"kinetic energy(E)in J is given by\"\n", + "E=m*v**2/2\n", + "print\"E=\",round(E)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.13;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.13, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n", + "characteristics gas constant(R2)in kJ/kg k\n", + "molecular weight of gas(m)in kg/kg mol= 16.63\n", + "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n" + ] + } + ], + "source": [ + "#cal of molecular weight of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.13, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n", + "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n", + "Cv=1.786;#specific heat at constant volume in kJ/kg k\n", + "R1=8.3143;#universal gas constant in kJ/kg k\n", + "print\"characteristics gas constant(R2)in kJ/kg k\"\n", + "R2=Cp-Cv\n", + "m=R1/R2\n", + "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n", + "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.14;page no:26" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.14, Page:26 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n", + "using perfect gas equation\n", + "P1*V1/T1 = P2*V2/T2\n", + "=>T2=(P2*V2*T1)/(P1*V1)\n", + "so final temperature of gas(T2)in k\n", + "or final temperature of gas(T2)in degree celcius= 127.0\n" + ] + } + ], + "source": [ + "#cal of final temperature of gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.14, Page:26 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n", + "P1=750*10**3;#initial pressure of gas in pa\n", + "V1=0.2;#initial volume of gas in m^3\n", + "T1=600;#initial temperature of gas in k\n", + "P2=2*10**5;#final pressure of gas i pa\n", + "V2=0.5;#final volume of gas in m^3\n", + "print\"using perfect gas equation\"\n", + "print\"P1*V1/T1 = P2*V2/T2\"\n", + "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n", + "print\"so final temperature of gas(T2)in k\"\n", + "T2=(P2*V2*T1)/(P1*V1)\n", + "T2=T2-273\n", + "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.15;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.15, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n", + "from perfect gas equation we get\n", + "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n", + "m1= 5.807\n", + "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n", + "m2= 3.111\n", + "mass of air removed(m)in kg 2.696\n", + "volume of this mass of air(V) at initial states in m^3= 2.32\n" + ] + } + ], + "source": [ + "#cal of volume of this mass of air(V) at initial states\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.15, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n", + "P1=100*10**3;#initial pressure of air in pa\n", + "V1=5.;#initial volume of air in m^3\n", + "T1=300.;#initial temperature of gas in k\n", + "P2=50*10**3;#final pressure of air in pa\n", + "V2=5.;#final volume of air in m^3\n", + "T2=(280.);#final temperature of air in K\n", + "R=287.;#gas constant on J/kg k\n", + "print\"from perfect gas equation we get\"\n", + "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n", + "m1=(P1*V1)/(R*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n", + "m2=(P2*V2)/(R*T2)\n", + "print(\"m2=\"),round(m2,3)\n", + "m=m1-m2\n", + "print\"mass of air removed(m)in kg\",round(m,3)\n", + "V=m*R*T1/P1\n", + "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.16;page no:27" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.16, Page:27 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n", + "here V1=V2\n", + "so P1/T1=P2/T2\n", + "final temperature of hydrogen gas(T2)in k\n", + "=>T2=P2*T1/P1\n", + "now R=(Cp-Cv) in KJ/kg k\n", + "And volume of cylinder(V1)in m^3\n", + "V1=(math.pi*d^2*l)/4\n", + "mass of hydrogen gas(m)in kg\n", + "m= 0.254\n", + "now heat supplied(Q)in KJ\n", + "Q= 193.93\n" + ] + } + ], + "source": [ + "#cal of heat supplied\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.16, Page:27 \\n \\n\"\n", + "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n", + "d=1;#diameter of cylinder in m\n", + "l=4;#length of cylinder in m\n", + "P1=100*10**3;#initial pressureof hydrogen gas in pa\n", + "T1=(27+273);#initial temperature of hydrogen gas in k\n", + "P2=125*10**3;#final pressureof hydrogen gas in pa\n", + "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n", + "Cv=10.183;#specific heat at constant volume in KJ/kg k\n", + "print\"here V1=V2\"\n", + "print\"so P1/T1=P2/T2\"\n", + "print\"final temperature of hydrogen gas(T2)in k\"\n", + "print\"=>T2=P2*T1/P1\"\n", + "T2=P2*T1/P1\n", + "print\"now R=(Cp-Cv) in KJ/kg k\"\n", + "R=Cp-Cv\n", + "print\"And volume of cylinder(V1)in m^3\"\n", + "print\"V1=(math.pi*d^2*l)/4\"\n", + "V1=(math.pi*d**2*l)/4\n", + "print\"mass of hydrogen gas(m)in kg\"\n", + "m=(P1*V1)/(1000*R*T1)\n", + "print\"m=\",round(m,3)\n", + "print\"now heat supplied(Q)in KJ\"\n", + "Q=m*Cv*(T2-T1)\n", + "print\"Q=\",round(Q,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.17;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.17, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n", + "final total volume(V)in m^3\n", + "V=V1*V2\n", + "total mass of air(m)in kg\n", + "m=m1+m2\n", + "final pressure of air(P)in kpa\n", + "using perfect gas equation\n", + "P= 516.6\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.17, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n", + "V1=2.;#volume of first cylinder in m^3\n", + "V2=2.;#volume of second cylinder in m^3\n", + "T=(27+273);#temperature of system in k\n", + "m1=20.;#mass of air in first vessel in kg\n", + "m2=4.;#mass of air in second vessel in kg\n", + "R=287.;#gas constant J/kg k\n", + "print(\"final total volume(V)in m^3\")\n", + "print(\"V=V1*V2\")\n", + "V=V1*V2\n", + "print(\"total mass of air(m)in kg\")\n", + "print(\"m=m1+m2\")\n", + "m=m1+m2\n", + "print(\"final pressure of air(P)in kpa\")\n", + "print(\"using perfect gas equation\")\n", + "P=(m*R*T)/(1000*V)\n", + "print\"P=\",round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.18;page no:28" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.18, Page:28 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n", + "1.By considering it as a PERFECT GAS\n", + "gas constant for CO2(Rco2)\n", + "Rco2=(J/Kg.k) 188.9\n", + "Also P*V=M*Rco2*T\n", + "pressure of CO2 as perfect gas(P)in N/m^2\n", + "P=(m*Rco2*T)/V 141683.71\n", + "2.By considering as a REAL GAS\n", + "values of vanderwaal constants a,b can be seen from the table which are\n", + "a=(N m^4/(kg mol)^2) 362850.0\n", + "b=(m^3/kg mol) 0.03\n", + "now specific volume(v)in m^3/kg mol\n", + "v= 17.604\n", + "now substituting the value of all variables in vanderwaal equation\n", + "(P+(a/v^2))*(v-b)=R*T\n", + "pressure of CO2 as real gas(P)in N/m^2\n", + "P= 140766.02\n" + ] + } + ], + "source": [ + "#cal of pressure of CO2 as perfect,real gas\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.18, Page:28 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n", + "m=5;#mass of CO2 in kg\n", + "V=2;#volume of vesssel in m^3\n", + "T=(27+273);#temperature of vessel in k\n", + "R=8.314*10**3;#universal gas constant in J/kg k\n", + "M=44.01;#molecular weight of CO2 \n", + "print(\"1.By considering it as a PERFECT GAS\")\n", + "print(\"gas constant for CO2(Rco2)\")\n", + "Rco2=R/M\n", + "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n", + "print(\"Also P*V=M*Rco2*T\")\n", + "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n", + "P=(m*Rco2*T)/V\n", + "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n", + "print(\"2.By considering as a REAL GAS\")\n", + "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n", + "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n", + "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n", + "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n", + "print(\"b=(m^3/kg mol)\"),round(b,2)\n", + "print(\"now specific volume(v)in m^3/kg mol\")\n", + "v=V*M/m\n", + "print(\"v=\"),round(v,3)\n", + "print(\"now substituting the value of all variables in vanderwaal equation\")\n", + "print(\"(P+(a/v^2))*(v-b)=R*T\")\n", + "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n", + "P=((R*T)/(v-b))-(a/v**2)\n", + "print(\"P=\"),round(P,2)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.19;page no:29" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.19, Page:29 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n", + "1.considering as perfect gas\n", + "specific volume(V)in m^3/kg\n", + "V= 0.0186\n", + "2.considering compressibility effects\n", + "reduced pressure(P)in pa\n", + "p= 0.8\n", + "reduced temperature(t)in k\n", + "t= 1.1\n", + "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n", + "we get Z=0.785\n", + "now actual specific volume(v)in m^3/kg\n", + "v= 0.0146\n" + ] + } + ], + "source": [ + "#cal of specific volume of steam\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.19, Page:29 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n", + "P=17672;#pressure of steam on kpa\n", + "T=712;#temperature of steam in k\n", + "Pc=22.09;#critical pressure of steam in Mpa\n", + "Tc=647.3;#critical temperature of steam in k\n", + "R=0.4615;#gas constant for steam in KJ/kg k\n", + "print(\"1.considering as perfect gas\")\n", + "print(\"specific volume(V)in m^3/kg\")\n", + "V=R*T/P\n", + "print(\"V=\"),round(V,4)\n", + "print(\"2.considering compressibility effects\")\n", + "print(\"reduced pressure(P)in pa\")\n", + "p=P/(Pc*1000)\n", + "print(\"p=\"),round(p,2)\n", + "print(\"reduced temperature(t)in k\")\n", + "t=T/Tc\n", + "print(\"t=\"),round(t,2)\n", + "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n", + "print(\"we get Z=0.785\")\n", + "Z=0.785;#compressibility factor\n", + "print(\"now actual specific volume(v)in m^3/kg\")\n", + "v=Z*V\n", + "print(\"v=\"),round(v,4)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.20;page no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.20, Page:30 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n", + "volume of ballon(V1)in m^3\n", + "V1= 65.45\n", + "molecular mass of hydrogen(M)\n", + "M=2\n", + "gas constant for H2(R1)in J/kg k\n", + "R1= 4157.0\n", + "mass of H2 in ballon(m1)in kg\n", + "m1= 5.316\n", + "volume of air printlaced(V2)=volume of ballon(V1)\n", + "mass of air printlaced(m2)in kg\n", + "m2= 79.66\n", + "gas constant for air(R2)=0.287 KJ/kg k\n", + "load lifting capacity due to buoyant force(m)in kg\n", + "m= 74.343\n" + ] + } + ], + "source": [ + "#estimation of maximum load that can be lifted \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.20, Page:30 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n", + "d=5.;#diameter of ballon in m\n", + "T1=(27.+273.);#temperature of hydrogen in k\n", + "P=1.013*10**5;#atmospheric pressure in pa\n", + "T2=(17.+273.);#temperature of surrounding air in k\n", + "R=8.314*10**3;#gas constant in J/kg k\n", + "print(\"volume of ballon(V1)in m^3\")\n", + "V1=(4./3.)*math.pi*((d/2)**3)\n", + "print(\"V1=\"),round(V1,2)\n", + "print(\"molecular mass of hydrogen(M)\")\n", + "print(\"M=2\")\n", + "M=2;#molecular mass of hydrogen\n", + "print(\"gas constant for H2(R1)in J/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"mass of H2 in ballon(m1)in kg\")\n", + "m1=(P*V1)/(R1*T1)\n", + "print(\"m1=\"),round(m1,3)\n", + "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n", + "print(\"mass of air printlaced(m2)in kg\")\n", + "R2=0.287*1000;#gas constant for air in J/kg k\n", + "m2=(P*V1)/(R2*T2)\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n", + "print(\"load lifting capacity due to buoyant force(m)in kg\")\n", + "m=m2-m1\n", + "print(\"m=\"),round(m,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.21;page no:31" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.21, Page:31 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n", + "let initial receiver pressure(p1)=1 in pa\n", + "so final receiver pressure(p2)=in pa 0.25\n", + "perfect gas equation,p*V*m=m*R*T\n", + "differentiating and then integrating equation w.r.t to time(t) \n", + "we get t=-(V/v)*log(p2/p1)\n", + "so time(t)in min 110.9\n" + ] + } + ], + "source": [ + "#cal of time required\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.21, Page:31 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n", + "v=0.25;#volume sucking rate of pump in m^3/min\n", + "V=20.;#volume of air vessel in m^3\n", + "p1=1.;#initial receiver pressure in pa\n", + "print(\"let initial receiver pressure(p1)=1 in pa\")\n", + "p2=p1/4.\n", + "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n", + "print(\"perfect gas equation,p*V*m=m*R*T\")\n", + "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n", + "print(\"we get t=-(V/v)*log(p2/p1)\")\n", + "t=-(V/v)*math.log(p2/p1)\n", + "print(\"so time(t)in min\"),round(t,2)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.22;page no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.22, Page:32 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n", + "first calculate gas constants for different gases in j/kg k\n", + "for nitrogen,R1= 296.9\n", + "for oxygen,R2= 259.8\n", + "for carbon dioxide,R3= 188.95\n", + "so the gas constant for mixture(Rm)in j/kg k\n", + "Rm= 288.09\n", + "now the specific heat at constant pressure for constituent gases in KJ/kg k\n", + "for nitrogen,Cp1= 1.039\n", + "for oxygen,Cp2= 0.909\n", + "for carbon dioxide,Cp3= 0.819\n", + "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n", + "Cpm= 1.0115\n", + "now no. of moles of constituents gases\n", + "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n", + "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n", + "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n", + "total no. of moles in mixture in mol\n", + "n= 0.1733\n", + "now mole fraction of constituent gases\n", + "for nitrogen,x1= 0.825\n", + "for oxygen,x2= 0.162\n", + "for carbon dioxide,x3= 0.0131\n", + "now the molecular weight of mixture(Mm)in kg/kmol\n", + "Mm= 28.86\n" + ] + } + ], + "source": [ + "#cal of specific heat at constant pressure for constituent gases \n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.22, Page:32 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n", + "m=5;#mass of mixture of gas in kg\n", + "P=1.013*10**5;#pressure of mixture in pa\n", + "T=300;#temperature of mixture in k\n", + "M1=28.;#molecular weight of nitrogen(N2)\n", + "M2=32.;#molecular weight of oxygen(O2)\n", + "M3=44.;#molecular weight of carbon dioxide(CO2)\n", + "f1=0.80;#fraction of N2 in mixture\n", + "f2=0.18;#fraction of O2 in mixture\n", + "f3=0.02;#fraction of CO2 in mixture\n", + "k1=1.4;#ratio of specific heat capacities for N2\n", + "k2=1.4;#ratio of specific heat capacities for O2\n", + "k3=1.3;#ratio of specific heat capacities for CO2\n", + "R=8314;#universal gas constant in J/kg k\n", + "print(\"first calculate gas constants for different gases in j/kg k\")\n", + "R1=R/M1\n", + "print(\"for nitrogen,R1=\"),round(R1,1)\n", + "R2=R/M2\n", + "print(\"for oxygen,R2=\"),round(R2,1)\n", + "R3=R/M3\n", + "print(\"for carbon dioxide,R3=\"),round(R3,2)\n", + "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n", + "Rm=f1*R1+f2*R2+f3*R3\n", + "print(\"Rm=\"),round(Rm,2)\n", + "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n", + "Cp1=((k1/(k1-1))*R1)/1000\n", + "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n", + "Cp2=((k2/(k2-1))*R2)/1000\n", + "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n", + "Cp3=((k3/(k3-1))*R3)/1000\n", + "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n", + "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n", + "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n", + "print(\"Cpm=\"),round(Cpm,4)\n", + "print(\"now no. of moles of constituents gases\")\n", + "m1=f1*m\n", + "n1=m1/M1\n", + "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n", + "m2=f2*m\n", + "n2=m2/M2\n", + "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n", + "m3=f3*m\n", + "n3=m3/M3\n", + "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n", + "print(\"total no. of moles in mixture in mol\")\n", + "n=n1+n2+n3\n", + "print(\"n=\"),round(n,4)\n", + "print(\"now mole fraction of constituent gases\")\n", + "x1=n1/n\n", + "print(\"for nitrogen,x1=\"),round(x1,3)\n", + "x2=n2/n\n", + "print(\"for oxygen,x2=\"),round(x2,3)\n", + "x3=n3/n\n", + "print(\"for carbon dioxide,x3=\"),round(x3,4)\n", + "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n", + "Mm=M1*x1+M2*x2+M3*x3\n", + "print(\"Mm=\"),round(Mm,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.23;page no:33" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.23, Page:33 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n", + "mole fraction of constituent gases\n", + "x=(ni/n)=(Vi/V)\n", + "take volume of mixture(V)=1 m^3\n", + "mole fraction of O2(x1)\n", + "x1= 0.18\n", + "mole fraction of N2(x2)\n", + "x2= 0.75\n", + "mole fraction of CO2(x3)\n", + "x3= 0.07\n", + "now molecular weight of mixture = molar mass(m)\n", + "m= 29.84\n", + "now gravimetric analysis refers to the mass fraction analysis\n", + "mass fraction of constituents\n", + "y=xi*Mi/m\n", + "mole fraction of O2\n", + "y1= 0.193\n", + "mole fraction of N2\n", + "y2= 0.704\n", + "mole fraction of CO2\n", + "y3= 0.103\n", + "now partial pressure of constituents = volume fraction * pressure of mixture\n", + "Pi=xi*P\n", + "partial pressure of O2(P1)in Mpa\n", + "P1= 0.09\n", + "partial pressure of N2(P2)in Mpa\n", + "P2= 0.375\n", + "partial pressure of CO2(P3)in Mpa\n", + "P3= 0.04\n", + "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n" + ] + } + ], + "source": [ + "#cal of pressure difference\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.23, Page:33 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n", + "V1=0.18;#volume fraction of O2 in m^3\n", + "V2=0.75;#volume fraction of N2 in m^3\n", + "V3=0.07;#volume fraction of CO2 in m^3\n", + "P=0.5;#pressure of mixture in Mpa\n", + "T=(107+273);#temperature of mixture in k\n", + "M1=32;#molar mass of O2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"mole fraction of constituent gases\")\n", + "print(\"x=(ni/n)=(Vi/V)\")\n", + "V=1;# volume of mixture in m^3\n", + "print(\"take volume of mixture(V)=1 m^3\")\n", + "print(\"mole fraction of O2(x1)\")\n", + "x1=V1/V\n", + "print(\"x1=\"),round(x1,2)\n", + "print(\"mole fraction of N2(x2)\")\n", + "x2=V2/V\n", + "print(\"x2=\"),round(x2,2)\n", + "print(\"mole fraction of CO2(x3)\")\n", + "x3=V3/V\n", + "print(\"x3=\"),round(x3,2)\n", + "print(\"now molecular weight of mixture = molar mass(m)\")\n", + "m=x1*M1+x2*M2+x3*M3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n", + "print(\"mass fraction of constituents\")\n", + "print(\"y=xi*Mi/m\")\n", + "print(\"mole fraction of O2\")\n", + "y1=x1*M1/m\n", + "print(\"y1=\"),round(y1,3)\n", + "print(\"mole fraction of N2\")\n", + "y2=x2*M2/m\n", + "print(\"y2=\"),round(y2,3)\n", + "print(\"mole fraction of CO2\")\n", + "y3=x3*M3/m\n", + "print(\"y3=\"),round(y3,3)\n", + "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n", + "print(\"Pi=xi*P\")\n", + "print(\"partial pressure of O2(P1)in Mpa\")\n", + "p1=x1*P\n", + "print(\"P1=\"),round(p1,2)\n", + "print(\"partial pressure of N2(P2)in Mpa\")\n", + "P2=x2*P\n", + "print(\"P2=\"),round(P2,3)\n", + "P3=x3*P\n", + "print(\"partial pressure of CO2(P3)in Mpa\")\n", + "print(\"P3=\"),round(P3,2)\n", + "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.24;page no:34" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.24, Page:34 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n", + "volume of tank of N2(V1) in m^3= 3.0\n", + "volume of tank of CO2(V2) in m^3= 3.0\n", + "taking the adiabatic condition\n", + "no. of moles of N2(n1)\n", + "n1= 0.6\n", + "no. of moles of CO2(n2)\n", + "n2= 0.37\n", + "total no. of moles of mixture(n)in mol\n", + "n= 0.97\n", + "gas constant for N2(R1)in J/kg k\n", + "R1= 296.93\n", + "gas constant for CO2(R2)in J/kg k\n", + "R2=R/M2 188.95\n", + "specific heat of N2 at constant volume (Cv1) in J/kg k\n", + "Cv1= 742.32\n", + "specific heat of CO2 at constant volume (Cv2) in J/kg k\n", + "Cv2= 629.85\n", + "mass of N2(m1)in kg\n", + "m1= 16.84\n", + "mass of CO2(m2)in kg\n", + "m2= 16.28\n", + "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n", + "applying energy conservation principle\n", + "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n", + "equlibrium temperature(T)in k\n", + "=>T= 439.44\n", + "so the equlibrium pressure(P)in kpa\n", + "P= 591.55\n" + ] + } + ], + "source": [ + "#cal of equilibrium temperature,pressure of mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.24, Page:34 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n", + "V=6;#volume of tank in m^3\n", + "P1=800*10**3;#pressure of N2 gas tank in pa\n", + "T1=480.;#temperature of N2 gas tank in k\n", + "P2=400*10**3;#pressure of CO2 gas tank in pa\n", + "T2=390.;#temperature of CO2 gas tank in k\n", + "k1=1.4;#ratio of specific heat capacity for N2\n", + "k2=1.3;#ratio of specific heat capacity for CO2\n", + "R=8314.;#universal gas constant in J/kg k\n", + "M1=28.;#molecular weight of N2\n", + "M2=44.;#molecular weight of CO2\n", + "V1=V/2\n", + "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n", + "V2=V/2\n", + "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n", + "print(\"taking the adiabatic condition\")\n", + "print(\"no. of moles of N2(n1)\")\n", + "n1=(P1*V1)/(R*T1)\n", + "print(\"n1=\"),round(n1,2)\n", + "print(\"no. of moles of CO2(n2)\")\n", + "n2=(P2*V2)/(R*T2)\n", + "print(\"n2=\"),round(n2,2)\n", + "print(\"total no. of moles of mixture(n)in mol\")\n", + "n=n1+n2\n", + "print(\"n=\"),round(n,2)\n", + "print(\"gas constant for N2(R1)in J/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,2)\n", + "print(\"gas constant for CO2(R2)in J/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=R/M2\"),round(R2,2)\n", + "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n", + "Cv1=R1/(k1-1)\n", + "print(\"Cv1=\"),round(Cv1,2)\n", + "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n", + "Cv2=R2/(k2-1)\n", + "print(\"Cv2=\"),round(Cv2,2)\n", + "print(\"mass of N2(m1)in kg\")\n", + "m1=n1*M1\n", + "print(\"m1=\"),round(m1,2)\n", + "print(\"mass of CO2(m2)in kg\")\n", + "m2=n2*M2\n", + "print(\"m2=\"),round(m2,2)\n", + "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n", + "print(\"applying energy conservation principle\")\n", + "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n", + "print(\"equlibrium temperature(T)in k\")\n", + "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n", + "print(\"=>T=\"),round(T,2)\n", + "print(\"so the equlibrium pressure(P)in kpa\")\n", + "P=(n*R*T)/(1000*V)\n", + "print(\"P=\"),round(P,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.25;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.25, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n", + "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n", + "so the specific heat at constant pressure(Cp)in KJ/kg k\n", + "Cp= 7.608\n" + ] + } + ], + "source": [ + "#cal of specific heat of final mixture\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.25, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n", + "m1=2;#mass of H2 in kg\n", + "m2=3;#mass of He in kg\n", + "T=100;#temperature of container in k\n", + "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n", + "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n", + "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n", + "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n", + "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n", + "print(\"Cp=\"),round(Cp,3)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.26;page no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.26, Page:35 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "gas constant for N2(R2)in KJ/kg k\n", + "R2= 0.297\n", + "gas constant for CO2(R3)in KJ/kg k\n", + "R3= 0.189\n", + "so now gas constant for mixture(Rm)in KJ/kg k\n", + "Rm= 2.606\n", + "considering gas to be perfect gas\n", + "total mass of mixture(m)in kg\n", + "m= 30.0\n", + "capacity of vessel(V)in m^3\n", + "V= 231.57\n", + "now final temperature(Tf) is twice of initial temperature(Ti)\n", + "so take k=Tf/Ti=2\n", + "for constant volume heating,final pressure(Pf)in kpa shall be\n", + "Pf= 202.65\n" + ] + } + ], + "source": [ + "#cal of capacity and pressure in the vessel\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.26, Page:35 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n", + "m1=18.;#mass of hydrogen(H2) in kg\n", + "m2=10.;#mass of nitrogen(N2) in kg\n", + "m3=2.;#mass of carbon dioxide(CO2) in kg\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "Pi=101.325;#atmospheric pressure in kpa\n", + "T=(27+273.15);#ambient temperature in k\n", + "M1=2;#molar mass of H2\n", + "M2=28;#molar mass of N2\n", + "M3=44;#molar mass of CO2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M1\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"gas constant for N2(R2)in KJ/kg k\")\n", + "R2=R/M2\n", + "print(\"R2=\"),round(R2,3)\n", + "print(\"gas constant for CO2(R3)in KJ/kg k\")\n", + "R3=R/M3\n", + "print(\"R3=\"),round(R3,3)\n", + "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n", + "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n", + "print(\"Rm=\"),round(Rm,3)\n", + "print(\"considering gas to be perfect gas\")\n", + "print(\"total mass of mixture(m)in kg\")\n", + "m=m1+m2+m3\n", + "print(\"m=\"),round(m,2)\n", + "print(\"capacity of vessel(V)in m^3\")\n", + "V=(m*Rm*T)/Pi\n", + "print(\"V=\"),round(V,2)\n", + "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n", + "k=2;#ratio of initial to final temperature\n", + "print(\"so take k=Tf/Ti=2\") \n", + "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n", + "Pf=Pi*k\n", + "print(\"Pf=\"),round(Pf,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.27;page no:36" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.27, Page:36 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n", + "let inlet state be 1 and exit state be 2\n", + "by charles law volume and temperature can be related as\n", + "(V1/T1)=(V2/T2)\n", + "(V2/V1)=(T2/T1)\n", + "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n", + "since change in K.E=0\n", + "so (D2^2/D1^2)=T2/T1\n", + "D2/D1=sqrt(T2/T1)\n", + "say(D2/D1)=k\n", + "so exit to inlet diameter ratio(k) 1.29\n" + ] + } + ], + "source": [ + "#cal of exit to inlet diameter ratio\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "import math\n", + "print\"Example 1.27, Page:36 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n", + "T1=(27.+273.);#initial temperature of air in k\n", + "T2=500.;#final temperature of air in k\n", + "print(\"let inlet state be 1 and exit state be 2\")\n", + "print(\"by charles law volume and temperature can be related as\")\n", + "print(\"(V1/T1)=(V2/T2)\")\n", + "print(\"(V2/V1)=(T2/T1)\")\n", + "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n", + "print(\"since change in K.E=0\")\n", + "print(\"so (D2^2/D1^2)=T2/T1\")\n", + "print(\"D2/D1=sqrt(T2/T1)\")\n", + "print(\"say(D2/D1)=k\")\n", + "k=math.sqrt(T2/T1)\n", + "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##example 1.28;page no:37" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 1.28, Page:37 \n", + " \n", + "\n", + "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n", + "gas constant for H2(R1)in KJ/kg k\n", + "R1= 4.157\n", + "say initial and final ststes are given by 1 and 2\n", + "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n", + "final pressure of hydrogen(P2)in cm of Hg\n", + "P2= 6.0\n", + "therefore pressure difference(P)in kpa\n", + "P= 93.33\n", + "mass pumped out(m)in kg\n", + "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n", + "here V1=V2=V and T1=T2=T\n", + "so m= 0.15\n", + "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n", + "say state before and after cooling are denoted by suffix 2 and 3\n", + "final pressure after cooling(P3)in kpa\n", + "P3= 7.546\n" + ] + } + ], + "source": [ + "#cal of final pressure\n", + "#intiation of all variables\n", + "# Chapter 1\n", + "print\"Example 1.28, Page:37 \\n \\n\"\n", + "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n", + "V=2;#volume of vessel in m^3\n", + "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n", + "T=(27+273.15);#temperature of vessel in k\n", + "p=70;#final pressure in cm of Hg vaccum\n", + "R=8.314;#universal gas constant in KJ/kg k\n", + "M=2;#molecular weight of H2\n", + "print(\"gas constant for H2(R1)in KJ/kg k\")\n", + "R1=R/M\n", + "print(\"R1=\"),round(R1,3)\n", + "print(\"say initial and final ststes are given by 1 and 2\")\n", + "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n", + "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n", + "P2=P1-p\n", + "print(\"P2=\"),round(P2,2)\n", + "print(\"therefore pressure difference(P)in kpa\")\n", + "P=((P1-P2)*101.325)/76\n", + "print(\"P=\"),round(P,2)\n", + "print(\"mass pumped out(m)in kg\")\n", + "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n", + "print(\"here V1=V2=V and T1=T2=T\")\n", + "m=(V*P)/(R1*T)\n", + "print(\"so m=\"),round(m,2)\n", + "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n", + "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n", + "T3=(10+273.15);#final temperature after cooling in k\n", + "print(\"final pressure after cooling(P3)in kpa\")\n", + "P3=(T3/T)*P2*(101.325/76)\n", + "print(\"P3=\"),round(P3,3)\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/sample_notebooks/SakshiGoplani/Sample.ipynb b/sample_notebooks/SakshiGoplani/Sample.ipynb new file mode 100755 index 00000000..108f20cf --- /dev/null +++ b/sample_notebooks/SakshiGoplani/Sample.ipynb @@ -0,0 +1,662 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:b8d3bc6c59d0efdfca4aa426416ba1f24e3078d69f0411d3e3ed7b293bd81c78" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF MECHANICAL ENGINEERING by R.K. RAJPUT" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : FUELS AND COMBUSTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #DATA GIVEN\n", + "c=88; #% of carbon in coal\n", + "h=4.2; #% of hydrogen in coal\n", + "Wf=0.848; #weight of coal in g\n", + "Wfw=0.027; #weight of fuse wire in calorimeter in g\n", + "W=1950; #weight of water in calorimeter in g\n", + "We=380; #water equivalent of calorimeter\n", + "Dt=3.06; #observed temperature rise (t2-t1) in deg celsius\n", + "tc=0.017; #cooling correction in deg celsius\n", + "cfw=6700; #calorific value of fuse wire in J/g\n", + "\n", + " #CALCULATIONS\n", + "ctr=(Dt)+tc; #corrected temp. rise\n", + "Hw=(W+We)*4.18*(ctr); #heat recieved by water in J\n", + "Hfw=Wfw*cfw; #heat given out by fuse wire in J\n", + "Hcf=Hw-Hfw; #heat produced due to combustion of fuel in J\n", + "HCV=Hcf/Wf; #higher calorific value of fuel in kJ/kg\n", + "Ms=9*h/100; #steam produced per kg of coal\n", + "LCV=HCV-2465*Ms; #lower calorific value of fuel in kJ/kg\n", + "\n", + "print \"The Higher calorific value of fuel, H.C.V. is: \",round(HCV,4),\" kJ/kg.\"\n", + "print \"The Lower calorific value of fuel, L.C.V. is: \",round(LCV,4),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Higher calorific value of fuel, H.C.V. is: 35126.455 kJ/kg.\n", + "The Lower calorific value of fuel, L.C.V. is: 34194.685 kJ/kg.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "V1=0.08; #gas burnt in calorimeter in m^3\n", + "Pg=5.2; #pressure of gas supply in cm of water\n", + "Pb=75.5; #barometer reading in cm of Hg\n", + "Ww=28; #weight of water heated by gas in kg\n", + "Tg=13; #temperature of gas in deg celsius\n", + "Twi=10; #temperature of water at inlet in deg celsius\n", + "Two=23.5; #temperature of water at outlet in deg celsius\n", + "Ms=0.06; #steam condensed in kg\n", + "\n", + " #CALCULATIONS\n", + " #by using general gas equation, reducing the volume to S.T.P.\n", + " #p1*V1/T1=p2*V2/T2\n", + "p1=Pb+(Pg/13.6); #in cm of Hg\n", + "T1=Tg+273; #in K\n", + "p2=76; #in cm of Hg\n", + "T2=15+273; #in K\n", + "V2=p1*V1*T2/T1/p2; #in m^3\n", + "Hw=Ww*4.18*(Two-Twi); #heat recieved by water in kJ\n", + "HCV=Hw/V1; #higher calorific value of fuel in kJ/m^3\n", + "LCV=HCV-2465*Ms/V1; #lower calorific value of fuel in kJ/m^3\n", + "\n", + "print \" The Calorific values of fuel per m^3 of gas at 15 deg celsius and 76 cm of Hg pressure are:\"\n", + "print \" The Higher calorific value of fuel, H.C.V. is: \",HCV,\" kJ/m^3.\"\n", + "print \" The Lower calorific value of fuel, L.C.V. is: \",LCV,\" kJ/m^3.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Calorific values of fuel per m^3 of gas at 15 deg celsius and 76 cm of Hg pressure are:\n", + " The Higher calorific value of fuel, H.C.V. is: 19750.5 kJ/m^3.\n", + " The Lower calorific value of fuel, L.C.V. is: 17901.75 kJ/m^3.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 3 : PROPERTIES OF GASES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "Q=-50; #heat rejected to cooling water in kJ/kg\n", + "W=-100; #work input in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Du=Q-W; #(u2-u1) change in internal energy in kJ/kg\n", + " #since Du is +ve, there is gain in internal energy\n", + "\n", + "print \"The GAIN in internal energy is: \",Du,\" kJ/kg.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The GAIN in internal energy is: 50 kJ/kg.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "u1=450; #internal energy at beginning of the expansion in kJ/kg\n", + "u2=220; #internal energy after expansion in kJ/kg\n", + "W=120; #work done by the air during expansion in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Q=(u2-u1)+W; #heat flow in kJ/kg\n", + " #since Q is -ve, there is rejection of heat\n", + "\n", + "print \"The heat REJECTED by air is: \",(-Q),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat REJECTED by air is: 110 kJ/kg.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "m=0.3; #mass of nitrogen in kg\n", + "p1=0.1; #pressure in MPa\n", + "T1=40+273; #temperature before compression in K\n", + "p2=1; #pressure in MPa\n", + "T2=160+273; #temperature after compression in K\n", + "W=-30; #work done during the compression in kJ/kg\n", + "Cv=0.75 #in kJ/kgK\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #(u2-u1)=m*Cv*(T2-T1)\n", + "Du=m*Cv*(T2-T1);\n", + "Q=Du+W; #heat flow in kJ/kg\n", + " #since Q is -ve, there is rejection of heat\n", + "\n", + "print \"The heat REJECTED by air is: \",(-Q),\" kJ. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat REJECTED by air is: 3.0 kJ. \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=0.105; #pressure of gas in MPa\n", + "V1=0.4; #volume of gas in m^3\n", + " #final state\n", + "p2=0.105; #pressure of gas in MPa\n", + "V2=0.20; #volume of gas in m^3\n", + "\n", + "Q=-42.5; #heat transferred in kJ\n", + "p=p1;\n", + "\n", + " #process used- ISOBARIC (Constant pressure)\n", + "W12=p*(V2-V1)*1000; #work in kJ\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Du=Q-W12; #(u2-u1) change in internal energy in kJ\n", + " #since Du is -ve, there is decrease in internal energy\n", + "\n", + "print \"The DECREASE in internal energy is: \",(-Du),\" kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The DECREASE in internal energy is: 21.5 kJ.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #part-1\n", + " #pressure=p1,temperature=T1\n", + " #part-2\n", + " #pressure=p2,temperature=T2\n", + "\n", + " #Acc. First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #when partition moved\n", + "DQ=0;\n", + "DW=0;\n", + "DU=DQ-DW;\n", + " #DU=0\n", + "\n", + "print \" CONCLUSION: \"\n", + "print \" Acc. to First Law of Thermodynamics, \"\n", + "print \" When partion moved, there is conservation of internal energy. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CONCLUSION: \n", + " Acc. to First Law of Thermodynamics, \n", + " When partion moved, there is conservation of internal energy. \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=10**5; #initial pressure of air in Pa\n", + "v1=1.8; #volume of air in m^3/kg\n", + "T1=25+273; #initial temperature of air in K\n", + " #final state\n", + "p2=5*10**5; #final pressure of air in Pa\n", + "T2=25+273; #final temperature of air in K\n", + "\n", + " #process used- ISOTHERMAL (Constant temperature)\n", + "W12=(p1*v1*float(math.log(float(p1)/float(p2))/1000)); #work in kJ/kg\n", + " #since W is -ve, work is supplied to the air\n", + "\n", + " #since temperature is constant\n", + "Du=0; #(u2-u1) change in internal energy in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Q=Du+W12;\n", + " #since Q is -ve, there is rejection of heat from system to surroundings\n", + "\n", + "print \" (i) The Work done on the air is: \",round(-W12,4),\" kJ/kg. \"\n", + "print \" (ii) The change in internal energy is: \",(Du),\" kJ/kg. \"\n", + "print \" (iii) The Heat REJECTED is: \",round(-Q,4),\" kJ/kg. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Work done on the air is: 289.6988 kJ/kg. \n", + " (ii) The change in internal energy is: 0 kJ/kg. \n", + " (iii) The Heat REJECTED is: 289.6988 kJ/kg. \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "p1=4*10**5; #initial pressure in N/m^2\n", + "V1=0.2; #initial volume in m^3\n", + "T1=130+273; #initial temperature in K\n", + "p2=1.02*10**5; #final pressure after adiabatic expansion in N/m^2\n", + "Q23=72.5; #increase in enthalpy during constant pressure process in kJ\n", + "Cp=1; #in kJ/kgK\n", + "Cv=0.714; #in kJ/khK\n", + "\n", + " #gamma for air, g\n", + "g=Cp/Cv;\n", + "R=(Cp-Cv)*1000;\n", + "\n", + " #for reversible adiabatic process 1-2\n", + " #p1*(V1**g)=p2*(V2**g)\n", + "V2=V1*(p1/p2)**(1/g); #final volume in m^3\n", + " #(T2/T1)=(p2/p1)**((g-1)/g);\n", + "T2=T1*(p2/p1)**((g-1)/g); #final temp. T2 in K\n", + "\n", + "m=p1*V1/R/T1; #mass in kg\n", + "\n", + " #for constant pressure process 2-3\n", + " #Q23=m*Cp*(T3-T2);\n", + "T3=Q23/m/Cp+T2;\n", + " #V2/T2=V3/T3\n", + "V3=V2/T2*T3;\n", + "\n", + " #Work done by the path 1-2-3, W123=W12+W23\n", + "W12=(p1*V1-p2*V2)/(g-1);\n", + "W23=p2*(V3-V2);\n", + "W123=W12+W23;\n", + "\n", + " #if the above processes are replaced by a single reversible polytropic process giving the same work between initial and final states,\n", + " #W13=W123=(p1V1-p3V3)/(n-1)\n", + "p3=p2;\n", + "n=1+(p1*V1-p3*V3)/W123; #index of expansion, n\n", + "\n", + "print \" (i) The Total Work done is: \",round(W123,4),\" Nm or J.\"\n", + "print \" (ii) The value of index of expansion, n is: \",round(n,4),\".\"\n", + "\n", + " #NOTE:\n", + " #there is slight variation in answers of the book due to rounding off of the values " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Total Work done is: 85343.6734 Nm or J.\n", + " (ii) The value of index of expansion, n is: 1.0603 .\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=10**5; #initial pressure of gas in Pa\n", + "V1=0.45; #initial volume of gas in m^3\n", + "T1=80+273; #initial temperature of gas in K\n", + " #final state\n", + "p2=5*10**5; #final pressure of gas in Pa\n", + "V2=0.13; #final volume of gas in m^3\n", + "\n", + " #gamma for air, g\n", + "g=1.4;\n", + "R=294.2 #J/kgK\n", + "\n", + "m=p1*V1/R/T1; #mass in kg\n", + "\n", + " #p1*(V1^n)=p2*(V2^n)\n", + "n=math.log(p2/p1)/math.log(V2/V1); #index n\n", + "\n", + " #In a polytropic process\n", + " #(T2/T1)=(V1/V2)^(n-1);\n", + "T2=T1*(V1/V2)**(n-1); #temp. T2 in K\n", + "\n", + "Cv=R/(g-1);\n", + "Du=m*Cv*(T2-T1)/1000; #increase in internal energy in kJ\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #W12=(p1*V1-p2*V2)/(n-1)=mR(T2-T1)/(n-1)\n", + "W12=m*R*(T1-T2)/(n-1)/1000;\n", + "Q=Du+W12;\n", + " #since Q is -ve, there is rejection of heat from system to surroundings\n", + "\n", + "print \" (i) The Mass of the gas is: \",round(m,4),\" kg.\"\n", + "print \" (ii) The index n is: \",round(n,4),\".\"\n", + "print \"(iii) The change in internal energy is: \",(Du),\" kJ.\"\n", + "print \" (iv) The Heat REJECTED is: \",round(-Q,4),\"kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Mass of the gas is: 0.4333 kg.\n", + " (ii) The index n is: -1.2961 .\n", + "(iii) The change in internal energy is: -106.0 kJ.\n", + " (iv) The Heat REJECTED is: 124.4657 kJ.\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=1.02; #initial pressure of air in bar\n", + "V1=0.015; #initial volume of air in m^3\n", + "T1=22+273; #initial temperature of air in K\n", + " #final state\n", + "p2=6.8; #final pressure of air in bar\n", + " #Law of adiabatic compression, pV^g=C\n", + "\n", + " #gamma for air, g\n", + "g=1.4\n", + "R=0.287;\n", + "\n", + " #In a adiabatic process\n", + " #(T2/T1)=(p2/p1)**((g-1)/g);\n", + "T2=T1*(p2/p1)**((g-1)/g); #final temp. T2 in K\n", + "\n", + " #p1*(V1**g)=p2*(V2**g)\n", + "V2=V1*(p1/p2)**(1/g); #final volume in m^3\n", + "\n", + "m=p1*10**5*V1/10**3/R/T1; #mass in kg\n", + "\n", + " #W=(p1*V1-p2*V2)/(g-1)=mR(T2-T1)/(g-1)\n", + "W=m*R*(T1-T2)/(g-1);\n", + " #since W is -ve, the work is done on the air\n", + "\n", + "print \" (i) The Final temperature is: \",(T2-273),\" deg. celsius.\"\n", + "print \" (ii) The Final Volume is: \",V2,\" m**3. \"\n", + "print \"(iii) The Work done on the air is: \",(-W),\" kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Final temperature is: 234.252870551 deg. celsius.\n", + " (ii) The Final Volume is: 0.00386887782624 m**3. \n", + "(iii) The Work done on the air is: 2.7520923046 kJ.\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "m=1; #mass of etahne gas in kg\n", + "M=30; #molecular weight of ethane\n", + "p1=1.1; #initial pressure in bar\n", + "T1=27+273; #initial temperature in K\n", + "p2=6.6; #final pressure in bar\n", + "Cp=1.75; #in kJ/kgK\n", + "\n", + " #Law of compression, pV**1.3=C\n", + "n=1.3;\n", + "\n", + " #Characteristic gas constant, R = Universal gas constant (Ro)/Molecular weight(M)\n", + "Ro=8314;\n", + "R=Ro/(M); #kJ/kgK\n", + "R1 = float(R)/1000;\n", + " #R=Cp-Cv\n", + "Cv=Cp-float(R1);\n", + "g=Cp/Cv; #gamma g\n", + "\n", + " #In a polytropic process\n", + " #(T2/T1)=(p2/p1)**((n-1)/n);\n", + "T2=T1*(p2/p1)**((n-1)/n); #final temp. T2 in K\n", + "\n", + " #W=(p1*V1-p2*V2)/(n-1)=mR(T2-T1)/(g-1)\n", + "W=m*R*(T1-T2)/(n-1);\n", + "\n", + "Q=(g-n)*W/(g-1); #heat flow in kJ/kg\n", + "\n", + "print \" The Heat SUPPLIED is: \",float(Q),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Heat SUPPLIED is: 84441.1861346 kJ/kg.\n" + ] + } + ], + "prompt_number": 102 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/SandeshNaik/ch8.ipynb b/sample_notebooks/SandeshNaik/ch8.ipynb new file mode 100755 index 00000000..ffd91f68 --- /dev/null +++ b/sample_notebooks/SandeshNaik/ch8.ipynb @@ -0,0 +1,237 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:983adfa64951b4c71938be02f10b2d0d40d82e513916f6ced5042486c6dc7d21" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Particle Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.1, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Proton and antiproton annihilate to produced three pions\n", + "E_p = 938; # Energy of proton, MeV\n", + "E_pi = 139.5; # Energy of pions, MeV\n", + "E_pi_0 = 134.9; # Energy of pi_0_ion, MeV\n", + "\n", + "#Calculations\n", + "E_KE = (2*E_p-(2*E_pi+E_pi_0))/3; # The average kinetic energy of each pions, MeV\n", + "\n", + "#Result\n", + "print \"The average kinetic energy of each pions : %5.1f MeV\"%E_KE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average kinetic energy of each pions : 487.4 MeV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.2, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Here r_1 and r_2 are two decay rates are given\n", + "# Declare the cell\n", + "R1 = [[0,0],[0,0]]\n", + "R1[0][0] = 'r_1'\n", + "R1[0][1] = 'r_2'\n", + "\n", + "#Calculations&Results\n", + "print \"The inherent uncertainity in mass of particle = h(%s + %s) \"%(R1[0][0], R1[0][1]) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inherent uncertainity in mass of particle = h(r_1 + r_2) \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7.3, Page 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare cell for the given reaction\n", + "R1 = [[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,0,0],[0,0,0,0,0]]\n", + "# Enter data for the cell\n", + "R1[0][0] = 'p'\n", + "R1[0][1] = 1 \n", + "R1[0][2] = 1\n", + "R1[0][3] = 0\n", + "R1[0][4] = 1./2\n", + "R1[1][0] = 'K_+'\n", + "R1[1][1] = 1\n", + "R1[1][2] = 0\n", + "R1[1][3] = 1\n", + "R1[1][4] = 1./2\n", + "R1[2][0] = 'S_+'\n", + "R1[2][1] = 1\n", + "R1[2][2] = 1\n", + "R1[2][3] = -1\n", + "R1[2][4] = 1\n", + "R1[3][0] = 'pi_-'\n", + "R1[3][1] = -1\n", + "R1[3][2] = 0\n", + "R1[3][3] = 0\n", + "R1[3][4] = 1\n", + "R1[4][0] = 'S_0'\n", + "R1[4][1] = 0\n", + "R1[4][2] = 1\n", + "R1[4][3] = -1\n", + "R1[4][4] = 0\n", + "R1[5][0] = 'p_-'\n", + "R1[5][1] = -1\n", + "R1[5][2] = -1\n", + "R1[5][3] = 0\n", + "R1[5][4] = 1./2\n", + "R1[6][0] = 'n_0'\n", + "R1[6][1] = 0\n", + "R1[6][2] = 0\n", + "R1[6][3] = 0\n", + "R1[6][4] = 0\n", + "\n", + "\n", + "#Calculations&Results\n", + "def check_Isotopic_no(Ir_sum,Ip_sum):\n", + " if Ir_sum == Ip_sum:\n", + " f = 1;\n", + " else: \n", + " f = 0;\n", + " return f\n", + "\n", + "\n", + "# Declare a function returning equality status of proton number\n", + "def check_strangeness(sr_sum,sp_sum):\n", + " if sr_sum == sp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "def check_charge(cr_sum,cp_sum):\n", + " if cr_sum == cp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "# Declare a function returning equality status of lepton number\n", + " \n", + "#Reaction-I\n", + "print \"\\n\\nReaction-I:\\n\\n\"\n", + "Ir_sum = R1[0][4]+R1[0][4];\n", + "Ip_sum = R1[1][4]+R1[2][4];\n", + "if (check_Isotopic_no(Ir_sum,Ip_sum) == 0):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[0][0],R1[1][0],R1[2][0])\n", + "\n", + "#Reaction-II\n", + "print \"\\n\\nReaction-II\"\n", + "sr_sum = R1[0][3]+R1[3][3];\n", + "sp_sum = R1[4][3]+R1[6][3];\n", + "if (check_strangeness(sr_sum,sp_sum)== 0):\n", + " print \"\\nThe Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[3][0],R1[4][0],R1[6][0])\n", + "\n", + "#Reaction-III\n", + "print \"\\n\\nReaction-III:\\n\\n\"\n", + "cr_sum = R1[0][1]+R1[0][1];\n", + "cp_sum = R1[0][1]+R1[0][1]+R1[0][1]+R1[5][1]; \n", + "if (check_charge(cr_sum,cp_sum) == 1):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s + %s \\nis possible\"%(R1[0][0],R1[0][0],R1[0][0],R1[0][0],R1[5][0]) \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Reaction-I:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> K_+ + S_+ \n", + "is not possible\n", + "\n", + "\n", + "Reaction-II\n", + "\n", + "The Reaction\n", + "\n", + "\tp + pi_- --> S_0 + n_0 \n", + "is not possible\n", + "\n", + "\n", + "Reaction-III:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> p + p + p_- \n", + "is possible\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/SaurabhBarot/ch2.ipynb b/sample_notebooks/SaurabhBarot/ch2.ipynb new file mode 100644 index 00000000..79ba56c5 --- /dev/null +++ b/sample_notebooks/SaurabhBarot/ch2.ipynb @@ -0,0 +1,510 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:883876eb2a3f623c02ca3c86ebd8020a1b244805e7be4ab0f882af58fcdc4d16" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : MAGNETIC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N = 2000.;\t\t\t#no of turns\n", + "I = 10.;\t\t\t#current in A\n", + "Rm = 25.;\t\t\t#mean radius in cm\n", + "d = 6.;\t\t\t#diameter of each turn in cm\n", + "\n", + "#CALCULATIONS \n", + "MMF = N*I;\t\t\t#magneto motive force in A\n", + "l = 2*math.pi*(Rm/100);\t\t\t#circumference of coli in m\n", + "u = (4*math.pi*10**-7);\t\t\t#permeability (U = Ur*U0)\n", + "a = (math.pi*d*d*10**-4)/4;\n", + "reluctance = (l/(a*u));\t\t\t#reluctance in At/Wb\n", + "flux = (MMF)/(reluctance);\t\t\t#flux in Wb\n", + "fluxdensity = (flux/a);\t\t\t#flux density in Wb/m**2 or tesla\n", + "\n", + "#OUTPUT\n", + "print \"Thus MMF, flux, flux density are %d A, %g Wb , %g Wb/m**2 or Tesla respectively \"%(MMF,flux,fluxdensity);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus MMF, flux, flux density are 20000 A, 4.52389e-05 Wb , 0.016 Wb/m**2 or Tesla respectively \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.2, Page 90\n", + "\n", + "#INPUT DATA\n", + "phi = 5*10**-2;\t\t\t#flux in wb\n", + "a = 0.2;\t\t\t#area of cross-section in m**2\n", + "lg = 1.2*10**-2;\t\t\t#length of air gap in m\n", + "ur = 1;\t\t\t#permeability\n", + "u = ur*4*math.pi*10**-7;\t\t\t#permeability\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7*ur));\t\t\t#magnetic flux density in A/m\n", + "S = lg/(a*u);\t\t\t#reluctance of air gap in A/wb\n", + "permeance = 1/S;\t\t\t#permenace in A/wb\n", + "mmf_in_airgap = phi*S;\t\t\t#mmf in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus B, H,S, permeance, MMF in air gap are %1.2f Wb/sq.m, %g A/m ,%f A/wb ,\\\n", + "%g Wb/A %d A respectively \"%(B,H,S,permeance,mmf_in_airgap);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus B, H,S, permeance, MMF in air gap are 0.25 Wb/sq.m, 198944 A/m ,47746.482928 A/wb ,2.0944e-05 Wb/A 2387 A respectively \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "phi = 0.1*10**-3;\t\t\t#flux in wb\n", + "a = 1.7*10**-4;\t\t\t#area of cross-section in m**2\n", + "lg = 0.5*10**-3;\t\t\t#length of air gap in m\n", + "Rm = 15./2;\t\t\t#radius of ring in cm\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n", + "N = 1500.;\t\t\t#no of turns of ring\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "ampere_turns_provided_fo = H*lg;\n", + "total_ampere_turns_provi = N*1;\n", + "Available_for_iron_path = N-(H*lg);\n", + "length_of_iron_path = (2*Rm*math.pi*10**-2)-(lg);\t\t\t#length of iron path in m\n", + "H_for_iron_path = ((N-(H*lg)))/(length_of_iron_path);\n", + "ur = (B/(u0*H_for_iron_path));\t\t\t#relative permeability of iron\n", + "\n", + "#OUTPUT\n", + "print \"Thus relative permeability of iron is %d\"%(ur);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus relative permeability of iron is 174\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#iron path length in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "phi = 0.9*10**-3;\t\t\t#flux in wb\n", + "a = 6.66*10**-4;\t\t\t#area of cross-section of iron in m**2\n", + "N = 400.;\t\t\t#no of turns \n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "Hg = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "AT_required = Hg*lg;\t\t\t#AT required for air path\n", + "Hi = 1000;\t\t\t#magnetic flux density in A/m\n", + "AT_required_for_iron_pat = Hi*li;\n", + "total_AT_required = (Hg*lg)+(Hi*li);\n", + "I = ((Hg*lg)+(Hi*li))/(N);\n", + "\n", + "#OUTPUT\n", + "print \"Thus exciting current required is %1.2f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus exciting current required is 3.94 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.5, Page 92\n", + "\n", + "#INPUT DATA\n", + "r = 0.01;\t\t\t#radius in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "Rm = (30./2)*10**-2;\t\t\t#mean radius in m\n", + "ur = 800.;\t\t\t#relative permeability of iron\n", + "ur2 = 1.;\t\t\t#relative permeability of air gap\n", + "N = 250.;\t\t\t#no of turns\n", + "phi = 20000.*10**-8;\t\t\t#flux in Wb\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space \n", + "a = math.pi*(r)**2;\t\t\t#area of cross-section in m\n", + "leakage_factor = 1.1\n", + "\n", + "#CALCULATIONS \n", + "reluctance_of_air_gap = (lg/(u0*ur2*a));\t\t\t#reluctance of air gap in A/wb\n", + "li = (math.pi*(2*r)-(lg));\t\t\t#length of iron path in m\n", + "reluctance_of_iron_path = ((math.pi*0.3)-(lg))/(4*math.pi*10**-7*800*a);\t\t\t#in A/wb\n", + "total_reluctance = reluctance_of_air_gap+reluctance_of_iron_path;\t\t\t#in A/wb\n", + "MMF = phi*total_reluctance;\t\t\t#in Ampere turns\n", + "current_required = (MMF)/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.2f A \"%(current_required);\n", + "#Including leakage\n", + "\n", + "#CALCULATIONS\n", + "MMF_of_airgap = phi*reluctance_of_air_gap;\t\t\t#in A/wb\n", + "Total_flux_in_ironpath = leakage_factor*phi;\t\t\t#in Wb\n", + "MMF_of_ironpath = Total_flux_in_ironpath*reluctance_of_iron_path;\t\t\t#in A\n", + "Total_MMF = MMF_of_ironpath+MMF_of_airgap;\t\t\t#in A/wb\n", + "current_required2 = Total_MMF/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(current_required2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 4.41 A \n", + "Thus current required is 4.650 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l1 = 0.1;\t\t\t#length in m\n", + "l2 = 0.18;\t\t\t#length in m\n", + "l3 = 0.18;\t\t\t#length in m\n", + "lg = 1.*10**-3;\t\t\t#airgap length in mm\n", + "a1 = 6.25*10**-4;\t\t\t#area in m**2\n", + "a2 = 3.*10**-4;\t\t\t#area in m**2\n", + "ur = 800.;\t\t\t#relative permeability of iron path\n", + "ur2 = 1.;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7\n", + "N = 600.;\n", + "phi = 10.**-4;\t\t\t#airgap flux in Wb\n", + "\n", + "#CALCULATIONS \n", + "#for the airgap\n", + "Bg = (phi/(a1));\t\t\t#fluxdensity in Tesla\n", + "Hg = (Bg/(u0*ur2));\t\t\t#magnetimath.sing force in A/m\n", + "MMF1 = Hg*lg;\t\t\t#in A\n", + "#for path I1\n", + "B1 = 0.16;\t\t\t# flux density in tesla\n", + "H1 = (B1/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF2 = H1*l1;\t\t\t#in A\n", + "#math.since paths l2 and l3 are similar,the total flux divide equally between these two paths.Since these paths are in parallel,consider only one of them\n", + "#for path l2\n", + "flux = 50*10**-6;\t\t\t#flux in wb\n", + "B2 = (flux/a2);\t\t\t#fluxdensity in tesla\n", + "H2 = (B2/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF3 = H2*l2;\t\t\t#in A\n", + "totalmmf = MMF1+MMF2+MMF3;\t\t\t#in A\n", + "I = (totalmmf/N);\t\t\t#current required in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 0.288 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.7, Page 95\n", + "\n", + "#INPUT DATA\n", + "Dm = 0.1\t\t\t#diameter in m\n", + "a = 10.**-3;\t\t\t#area of cross-section im m**2\n", + "N = 150.;\t\t\t#no of turns\n", + "ur = 800.;\t\t\t#permeability of iron ring\n", + "B = 0.1;\t\t\t#in Wb/m**2\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability of free space\n", + "\n", + "#CALCULATIONS \n", + "S = (math.pi*Dm)/(a*ur*u0);\t\t\t#reluctance\n", + "I = (B*a*S)/(N);\t\t\t#current in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current is %f A\"%(I);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current is 0.208333 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l = 0.3;\t\t\t#length in m\n", + "d = 1.5*10**-2;\t\t\t#diameter in m\n", + "N = 900;\t\t\t#no of turns\n", + "ur = 1;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "I = 5;\t\t\t#current in A\n", + "\n", + "#CALCULATIONS \n", + "a = (math.pi*(d)**2/4);\t\t\t#in m**2\n", + "S = (l)/(a*ur*u0);\t\t\t#reluctance\n", + "\n", + "#OUTPUT\n", + "print \"Thus reluctance is %f A/wb\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus reluctance is 1350949115.231170 A/wb\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "lg = 10**-3;\t\t\t#length of air gap in m\n", + "B = 0.9;\t\t\t#flux density in wb/m**2\n", + "li = 0.3;\t\t\t#length of ironpath in m\n", + "Hi = 800;\t\t\t#magnetic flux density in AT/m\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeabilty in free space\n", + "\n", + "#CALCULATIONS \n", + "#for iron path\n", + "MMF_required1 = Hi*li;\t\t\t#magnetic motive force in AT\n", + "#for air gap\n", + "MMF_required2 = (B/u0)*lg;\t\t\t#magnetic motive force in AT\n", + "Totalmmf = MMF_required1+MMF_required2\n", + "\n", + "#OUTPUT\n", + "print \"Thus total MMF required is %d AT\"%(Totalmmf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total MMF required is 956 AT\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#length of iron ring mean length in m\n", + "N = 220;\t\t\t#no of turns\n", + "I = 1.2;\t\t\t#current in A\n", + "lg = 1.2*10**-3;\t\t\t#length of airgap in m\n", + "ur = 350;\t\t\t#relative permeability of iron\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "\n", + "#CALCULATIONS \n", + "MMF_produced = N*I;\n", + "Si = li/(u0*ur);\t\t\t#reluctance of iron path\n", + "Sg = lg/(u0);\t\t\t#reluctance of air gap\n", + "S = Si+Sg;\t\t\t#total reluctance \n", + "Flux_density = (MMF_produced)/(S);\n", + "\n", + "#OUTPUT\n", + "print \"Thus fluxdensity is %1.3f Wb/m**2\"%(Flux_density);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus fluxdensity is 0.126 Wb/m**2\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/SurajAhir/ch1.ipynb b/sample_notebooks/SurajAhir/ch1.ipynb new file mode 100644 index 00000000..dd3dc8fd --- /dev/null +++ b/sample_notebooks/SurajAhir/ch1.ipynb @@ -0,0 +1,641 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff1f8d37d08a8211fcc46eff9f443b7ece70ebe22359cada1bbdfcde008d38d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : DC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.;\t\t\t\t#kohm\n", + "V = 220;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#First Case\n", + "I = V/R;\t\t\t\t#mA\n", + "print \"1st case : Current in the circuit(mA) : %.f\"%I\n", + "\n", + "#Second Case\n", + "Req = R+R;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = V/Req;\t\t\t\t#mA\n", + "print \"2nd case : Current in the circuit(mA) : %.f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1st case : Current in the circuit(mA) : 73\n", + "2nd case : Current in the circuit(mA) : 37\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 1.5;\t\t\t\t#A\n", + "R1 = 2;\t\t\t\t#ohm\n", + "R2 = 3;\t\t\t\t#ohm\n", + "R3 = 8;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "V1 = I*R1;\t\t\t\t#V\n", + "V2 = I*R2;\t\t\t\t#V\n", + "V3 = I*R3;\t\t\t\t#V\n", + "print \"Voltage across R1(V) : %.2f\"%V1\n", + "print \"Voltage across R2(V) : %.2f\"%V2\n", + "print \"Voltage across R3(V) : %.2f\"%V3\n", + "\n", + "V = V1+V2+V3;\t\t\t\t#V(Supply voltage)\n", + "print \"Supply Voltage(V) : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across R1(V) : 3.00\n", + "Voltage across R2(V) : 4.50\n", + "Voltage across R3(V) : 12.00\n", + "Supply Voltage(V) : 19.50\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vs = 100.;\t\t\t\t#V(Supply voltage)\n", + "R1 = 40.;\t\t\t\t#ohm\n", + "R2 = 50.;\t\t\t\t#ohm\n", + "R3 = 70.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = R1+R2+R3;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = Vs/R;\t\t\t\t#A(Current in the circuit)\n", + "\n", + "# Results\n", + "print \"Circuit current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit current(A) : 0.62\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 10.;\t\t\t\t#V(Output voltage)\n", + "Vin = 30;\t\t\t\t#V(Input voltage)\n", + "R2 = 100;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#V2/V = R2/(R1+R2)\t\t\t\t#Voltage divider rule\n", + "R1 = (Vin*R2-Vo*R2)/Vo;\t\t\t\t#ohm\n", + "\n", + "# Results\n", + "print \"Resistance of R1(ohm) : %.2f\"%R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of R1(ohm) : 200.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V\n", + "R1 = 22.;\t\t\t\t#ohm\n", + "R2 = 44.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "I1 = V/R1;\t\t\t\t#A\n", + "I2 = V/R2;\t\t\t\t#A\n", + "I = I1+I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current(A) : 7.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 12.;\t\t\t\t#V\n", + "R1 = 6.8;\t\t\t\t#ohm\n", + "R2 = 4.7;\t\t\t\t#ohm\n", + "R3 = 2.2;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = 1./(1/R1+1/R2+1/R3);\t\t\t\t#ohm(Effective Resistance)\n", + "I = V/R;\t\t\t\t#A(Supply current)\n", + "\n", + "# Results\n", + "print \"Effective Resistance(ohm) : %.2f\"%R\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Resistance(ohm) : 1.23\n", + "Supply current(A) : 9.77\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 8.;\t\t\t\t#A\n", + "R2 = 2.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "# Part (a) \n", + "R1 = 2.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(a) Current in 2 ohm Resistance(A) : %.2f\"%I2\n", + "\n", + "# Part (b) \n", + "R1 = 4.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(b) Current in 2 ohm Resistance(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current in 2 ohm Resistance(A) : 4.00\n", + "(b) Current in 2 ohm Resistance(A) : 5.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I2 = -4;\t\t\t\t#A\n", + "I4 = 2;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2+I3-I4 = 0\t\t\t\t#from KCL\n", + "I3 = -I1+I2+I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -5.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "G1 = 20.;\t\t\t\t#dB\n", + "G2 = 30.;\t\t\t\t#dB\n", + "G3 = 40.;\t\t\t\t#dB\n", + "\n", + "# Calculations and Results\n", + "Ap1 = 10**(G1/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 20 dB : %.2f\"%Ap1\n", + "Av1 = 10**(G1/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 20 dB : %.2f\"%Av1\n", + "Ap2 = 10**(G2/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 30 dB : %.2f\"%Ap2\n", + "Av2 = 10**(G2/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 30 dB : %.2f\"%Av2\n", + "Ap3 = 10**(G3/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 40 dB : %.2f\"%Ap3\n", + "Av3 = 10**(G3/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 40 dB : %.2f\"%Av3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for 20 dB : 100.00\n", + "Voltage gain for 20 dB : 10.00\n", + "Power gain for 30 dB : 1000.00\n", + "Voltage gain for 30 dB : 31.62\n", + "Power gain for 40 dB : 10000.00\n", + "Voltage gain for 40 dB : 100.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 2.5;\t\t\t\t#A\n", + "I2 = -1.5;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1+I2+I3 = 0\t\t\t\t#from KCL\n", + "I3 = -I1-I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -1.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I3 = 1;\t\t\t\t#A\n", + "I6 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2-I3 = 0\t\t\t\t#from KCL at point a\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "#I2+I4-I6 = 0\t\t\t\t#from KCL at point b\n", + "I4 = I6-I2;\t\t\t\t#A\n", + "#I3-I4-I5 = 0\t\t\t\t#from KCL at point c\n", + "I5 = I3-I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I2(A) : %.2f\"%I2\n", + "print \"Current I4(A) : %.2f\"%I4\n", + "print \"Current I5(A) : %.2f\"%I5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I2(A) : 2.00\n", + "Current I4(A) : -1.00\n", + "Current I5(A) : 2.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 30;\t\t\t\t#ohm\n", + "R2 = 60.;\t\t\t\t#ohm\n", + "R3 = 30;\t\t\t\t#ohm\n", + "I3 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "I1 = I3*(R2+R3)/R2;\t\t\t\t#A\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I1(A) : %.2f\"%I1\n", + "print \"Current I2(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1(A) : 1.50\n", + "Current I2(A) : 0.50\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E = 12;\t\t\t\t#V\n", + "V2 = 8;\t\t\t\t#V\n", + "V4 = 2;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "V1 = E-V2;\t\t\t\t#V\n", + "#-V2+V3+V4 = 0;\t\t\t\t#for Loop B\n", + "V3 = V2-V4;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage V3(V) : %.2f\"%V3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage V3(V) : 6.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 20.;\t\t\t\t#V\n", + "R1 = 25;\t\t\t\t#ohm\n", + "R2 = 40;\t\t\t\t#ohm\n", + "R3 = 15;\t\t\t\t#ohm\n", + "R4 = 10;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "VAC = R3*V/(R1+R3);\t\t\t\t#V\n", + "VBC = R4*V/(R2+R4);\t\t\t\t#V\n", + "#0 = VAB+VBC-VAC;\t\t\t\t#/from KVL\n", + "VAB = -VBC+VAC;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage VAB(V) : %.2f\"%VAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage VAB(V) : 3.50\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 1.20\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E1 = 10;\t\t\t\t#V\n", + "V2 = 6;\t\t\t\t#V\n", + "V3 = 8;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "#E1 = V1+V2;\t\t\t\t#KCL for left loop\n", + "V1 = E1-V2;\t\t\t\t#V\n", + "#-E2 = -V2-V3;\t\t\t\t#KCL for right loop\n", + "E2 = V2+V3;\t\t\t\t#Vc\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage E2(V) : %.2f\"%E2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage E2(V) : 14.00\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/VaibhavShah/ch7.ipynb b/sample_notebooks/VaibhavShah/ch7.ipynb new file mode 100755 index 00000000..fefbf834 --- /dev/null +++ b/sample_notebooks/VaibhavShah/ch7.ipynb @@ -0,0 +1,134 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b878fc066fefa58833a7b2835f2e845d255863cbc07b67c34a50477d1af138d4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Induction Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4.;\t\t\t\t#no. of poles\n", + "f = 50;\t\t\t\t#Hz\n", + "S = 4./100;\t\t\t\t#slip\n", + "N = 600;\t\t\t\t#rpm\n", + "p = P/2;\t\t\t\t#pair of poles\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Ns = 60*f/p;\t\t\t\t#rpm(Synchronous speed)\n", + "print \"(a) Synchronous speed(rpm) : %.2f\"%Ns\n", + "\n", + "#(b)\n", + "Nr = Ns-S*Ns;\t\t\t\t#rpm(Rotor speed)\n", + "print \"(b) Rotor speed(rpm) : %.2f\"%Nr\n", + "\n", + "#(c)\n", + "Sdash = (Ns-N)/Ns;\t\t\t\t#per unot slip\n", + "fr = f*Sdash;\t\t\t\t#Hz(Rotor frequency)\n", + "print \"Rotor frequency(Hz) : %.2f\"%fr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Synchronous speed(rpm) : 1500.00\n", + "(b) Rotor speed(rpm) : 1440.00\n", + "Rotor frequency(Hz) : 30.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Zs = 240.;\t\t\t\t#no. of conductors in stator winding\n", + "Zr = 48.;\t\t\t\t#no. of conductors in rotor winding\n", + "Rr = 0.013;\t\t\t\t#ohm/phase(ressmath.tance rotor windig)\n", + "XL = 0.048;\t\t\t\t#ohm/phase(leakega reacmath.tance)\n", + "Vs = 400.;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Eo = Vs*Zr/Zs;\t\t\t\t#V(rotor emf)\n", + "print \"(a) Rotor emf(V) : %.2f\"%Eo\n", + "\n", + "#(b)\n", + "S = 4./100;\t\t\t\t#slip\n", + "Eo = Eo*S;\t\t\t\t#V(rotor emf for 4% slip)\n", + "print \"(b) Rotor emf at 4%% slip(V) : %.2f\"%Eo\n", + "\n", + "Z = math.sqrt(Rr**2+(S*XL)**2);\t\t\t\t#ohm/phase(rotor impedence at 4% slip)\n", + "Ir = Eo/Z;\t\t\t\t#A(Rotor curren at 4% slip)\n", + "print \"(b) Rotor curren at 4%% slip(A) : %.2f\"%Ir\n", + "\n", + "#(c)\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 4%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "S = 100./100;\t\t\t\t#100% slip\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 100%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Rotor emf(V) : 80.00\n", + "(b) Rotor emf at 4% slip(V) : 3.20\n", + "(b) Rotor curren at 4% slip(A) : 243.51\n", + "(c) Phase difference at 4% slip(degree) : 8.40\n", + "(c) Phase difference at 100% slip(degree) : 74.85\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/VineshSaini/ch1.ipynb b/sample_notebooks/VineshSaini/ch1.ipynb new file mode 100755 index 00000000..338df5a0 --- /dev/null +++ b/sample_notebooks/VineshSaini/ch1.ipynb @@ -0,0 +1,279 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 01 : Standards, Units & Dimensions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.17 : page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Y=90.0 \n", + "X=89.0 \n", + "Error_absolute=Y-X \n", + "print 'absolute Error =',Error_absolute\n", + "Error_relative=(Y-X)*100/Y \n", + "print 'relative Error =',round(Error_relative,2),'%'\n", + "Accuracy_relative=1-Error_relative \n", + "print 'Accuracy relative =',round(Accuracy_relative,2)\n", + "Accuracy_percentage=100*Accuracy_relative \n", + "print 'Accuracy =',round(Accuracy_percentage,2),'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "absolute Error = 1.0\n", + "relative Error = 1.11 %\n", + "Accuracy relative = -0.11\n", + "Accuracy = -11.11 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.18 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "S=98+100+102+98+100+100+104+104+105+97 \n", + "n=10 \n", + "Avg=S/n \n", + "P=1-abs((104-Avg)/Avg) \n", + "print \"Precision for the 8th reading=%.2f\"%P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Precision for the 8th reading=0.97\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.19 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=10 \n", + "I=20*10**-3 \n", + "RI=50 \n", + "R=(V/I)-RI \n", + "print \"The value of Resistance = %.0f ohm\"%R \n", + "dV=0.2 \n", + "dI=1*10**-3 \n", + "dRI=5 \n", + "dR=(dV/I)+(V*dI/I**2)+(dRI)\n", + "print \"Limiting error of resistance = %.0f ohm\"%dR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance = 450 ohm\n", + "Limiting error of resistance = 40 ohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.20 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R0=5 \n", + "a=0.004 \n", + "T=30 \n", + "R=R0*(1+a*(T-20)) \n", + "print \"Resistance of the wire = %.1f ohm\"%R \n", + "#Let (dR/dR0) =b (dR/da)=c (dR/dT)=d\n", + "b=(1+a*(T-20)) \n", + "c=R0*(T-20) \n", + "d=R0*a \n", + "ur0=5*0.003 \n", + "ua=0.004*0.01 \n", + "ut=1 \n", + "uR=(b**2*ur0**2+c**2*ua**2+d**2*ut**2)**0.5 \n", + "print \"Uncertanity in resistance = %.2f ohm\"%uR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of the wire = 5.2 ohm\n", + "Uncertanity in resistance = 0.03 ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.21 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "X_mean=(15+20+25+30+35+45)/6 \n", + "print \"The sample mean of the temperature=%.2f degree C\"%X_mean \n", + "Y_mean=(1.9+1.93+1.97+2+2.01+2.01+1.94+1.95+1.97+2.02+2.02+2.04)/12*10**-6 \n", + "print \"The sample mean of the faliure=%.6f failures/hour\"%Y_mean\n", + "print 'from these values we get' \n", + "a=1.80*10**-6 \n", + "b=0.00226 \n", + "print 'Y=1.80+0.00226x is the required least square line'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sample mean of the temperature=28.33 degree C\n", + "The sample mean of the faliure=0.000002 failures/hour\n", + "from these values we get\n", + "Y=1.80+0.00226x is the required least square line\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.22 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=2 \n", + "k=1 \n", + "dof=n-k \n", + "chi_square=(3-5)**2/5+(7-5)**2/5 \n", + "print 'Chi square value =',chi_square\n", + "print 'From the dof and chi square value we find P=0.22'\n", + "print 'Hence there are 22% chance that the distribution is just the result of random fluctuations and the coin may be unweighted'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chi square value = 1.6\n", + "From the dof and chi square value we find P=0.22\n", + "Hence there are 22% chance that the distribution is just the result of random fluctuations and the coin may be unweighted\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.23 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "X_mean=501*1/5 \n", + "print \"Assigned Value=%.1f V\"%X_mean \n", + "sigma=((1/(5-1))*((100.2-X_mean)**2+(100.3-X_mean)**2+(100.2-X_mean)**2+(100.2-X_mean)**2+(100.1-X_mean)**2))**0.5 \n", + "# For 95% confidance level student factor t is 2.78'\n", + "t=2.78 \n", + "n=5 \n", + "Ur=t*sigma/(n**0.5) \n", + "print \"Uncertanity=%.3f V\"%Ur " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assigned Value=100.2 V\n", + "Uncertanity=0.088 V\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/VishalSangani/ch1.ipynb b/sample_notebooks/VishalSangani/ch1.ipynb new file mode 100644 index 00000000..dd3dc8fd --- /dev/null +++ b/sample_notebooks/VishalSangani/ch1.ipynb @@ -0,0 +1,641 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff1f8d37d08a8211fcc46eff9f443b7ece70ebe22359cada1bbdfcde008d38d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : DC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.;\t\t\t\t#kohm\n", + "V = 220;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#First Case\n", + "I = V/R;\t\t\t\t#mA\n", + "print \"1st case : Current in the circuit(mA) : %.f\"%I\n", + "\n", + "#Second Case\n", + "Req = R+R;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = V/Req;\t\t\t\t#mA\n", + "print \"2nd case : Current in the circuit(mA) : %.f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1st case : Current in the circuit(mA) : 73\n", + "2nd case : Current in the circuit(mA) : 37\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 1.5;\t\t\t\t#A\n", + "R1 = 2;\t\t\t\t#ohm\n", + "R2 = 3;\t\t\t\t#ohm\n", + "R3 = 8;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "V1 = I*R1;\t\t\t\t#V\n", + "V2 = I*R2;\t\t\t\t#V\n", + "V3 = I*R3;\t\t\t\t#V\n", + "print \"Voltage across R1(V) : %.2f\"%V1\n", + "print \"Voltage across R2(V) : %.2f\"%V2\n", + "print \"Voltage across R3(V) : %.2f\"%V3\n", + "\n", + "V = V1+V2+V3;\t\t\t\t#V(Supply voltage)\n", + "print \"Supply Voltage(V) : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across R1(V) : 3.00\n", + "Voltage across R2(V) : 4.50\n", + "Voltage across R3(V) : 12.00\n", + "Supply Voltage(V) : 19.50\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vs = 100.;\t\t\t\t#V(Supply voltage)\n", + "R1 = 40.;\t\t\t\t#ohm\n", + "R2 = 50.;\t\t\t\t#ohm\n", + "R3 = 70.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = R1+R2+R3;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = Vs/R;\t\t\t\t#A(Current in the circuit)\n", + "\n", + "# Results\n", + "print \"Circuit current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit current(A) : 0.62\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 10.;\t\t\t\t#V(Output voltage)\n", + "Vin = 30;\t\t\t\t#V(Input voltage)\n", + "R2 = 100;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#V2/V = R2/(R1+R2)\t\t\t\t#Voltage divider rule\n", + "R1 = (Vin*R2-Vo*R2)/Vo;\t\t\t\t#ohm\n", + "\n", + "# Results\n", + "print \"Resistance of R1(ohm) : %.2f\"%R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of R1(ohm) : 200.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V\n", + "R1 = 22.;\t\t\t\t#ohm\n", + "R2 = 44.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "I1 = V/R1;\t\t\t\t#A\n", + "I2 = V/R2;\t\t\t\t#A\n", + "I = I1+I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current(A) : 7.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 12.;\t\t\t\t#V\n", + "R1 = 6.8;\t\t\t\t#ohm\n", + "R2 = 4.7;\t\t\t\t#ohm\n", + "R3 = 2.2;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = 1./(1/R1+1/R2+1/R3);\t\t\t\t#ohm(Effective Resistance)\n", + "I = V/R;\t\t\t\t#A(Supply current)\n", + "\n", + "# Results\n", + "print \"Effective Resistance(ohm) : %.2f\"%R\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Resistance(ohm) : 1.23\n", + "Supply current(A) : 9.77\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 8.;\t\t\t\t#A\n", + "R2 = 2.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "# Part (a) \n", + "R1 = 2.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(a) Current in 2 ohm Resistance(A) : %.2f\"%I2\n", + "\n", + "# Part (b) \n", + "R1 = 4.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(b) Current in 2 ohm Resistance(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current in 2 ohm Resistance(A) : 4.00\n", + "(b) Current in 2 ohm Resistance(A) : 5.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I2 = -4;\t\t\t\t#A\n", + "I4 = 2;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2+I3-I4 = 0\t\t\t\t#from KCL\n", + "I3 = -I1+I2+I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -5.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "G1 = 20.;\t\t\t\t#dB\n", + "G2 = 30.;\t\t\t\t#dB\n", + "G3 = 40.;\t\t\t\t#dB\n", + "\n", + "# Calculations and Results\n", + "Ap1 = 10**(G1/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 20 dB : %.2f\"%Ap1\n", + "Av1 = 10**(G1/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 20 dB : %.2f\"%Av1\n", + "Ap2 = 10**(G2/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 30 dB : %.2f\"%Ap2\n", + "Av2 = 10**(G2/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 30 dB : %.2f\"%Av2\n", + "Ap3 = 10**(G3/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 40 dB : %.2f\"%Ap3\n", + "Av3 = 10**(G3/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 40 dB : %.2f\"%Av3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for 20 dB : 100.00\n", + "Voltage gain for 20 dB : 10.00\n", + "Power gain for 30 dB : 1000.00\n", + "Voltage gain for 30 dB : 31.62\n", + "Power gain for 40 dB : 10000.00\n", + "Voltage gain for 40 dB : 100.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 2.5;\t\t\t\t#A\n", + "I2 = -1.5;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1+I2+I3 = 0\t\t\t\t#from KCL\n", + "I3 = -I1-I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -1.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I3 = 1;\t\t\t\t#A\n", + "I6 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2-I3 = 0\t\t\t\t#from KCL at point a\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "#I2+I4-I6 = 0\t\t\t\t#from KCL at point b\n", + "I4 = I6-I2;\t\t\t\t#A\n", + "#I3-I4-I5 = 0\t\t\t\t#from KCL at point c\n", + "I5 = I3-I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I2(A) : %.2f\"%I2\n", + "print \"Current I4(A) : %.2f\"%I4\n", + "print \"Current I5(A) : %.2f\"%I5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I2(A) : 2.00\n", + "Current I4(A) : -1.00\n", + "Current I5(A) : 2.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 30;\t\t\t\t#ohm\n", + "R2 = 60.;\t\t\t\t#ohm\n", + "R3 = 30;\t\t\t\t#ohm\n", + "I3 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "I1 = I3*(R2+R3)/R2;\t\t\t\t#A\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I1(A) : %.2f\"%I1\n", + "print \"Current I2(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1(A) : 1.50\n", + "Current I2(A) : 0.50\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E = 12;\t\t\t\t#V\n", + "V2 = 8;\t\t\t\t#V\n", + "V4 = 2;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "V1 = E-V2;\t\t\t\t#V\n", + "#-V2+V3+V4 = 0;\t\t\t\t#for Loop B\n", + "V3 = V2-V4;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage V3(V) : %.2f\"%V3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage V3(V) : 6.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 20.;\t\t\t\t#V\n", + "R1 = 25;\t\t\t\t#ohm\n", + "R2 = 40;\t\t\t\t#ohm\n", + "R3 = 15;\t\t\t\t#ohm\n", + "R4 = 10;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "VAC = R3*V/(R1+R3);\t\t\t\t#V\n", + "VBC = R4*V/(R2+R4);\t\t\t\t#V\n", + "#0 = VAB+VBC-VAC;\t\t\t\t#/from KVL\n", + "VAB = -VBC+VAC;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage VAB(V) : %.2f\"%VAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage VAB(V) : 3.50\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 1.20\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E1 = 10;\t\t\t\t#V\n", + "V2 = 6;\t\t\t\t#V\n", + "V3 = 8;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "#E1 = V1+V2;\t\t\t\t#KCL for left loop\n", + "V1 = E1-V2;\t\t\t\t#V\n", + "#-E2 = -V2-V3;\t\t\t\t#KCL for right loop\n", + "E2 = V2+V3;\t\t\t\t#Vc\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage E2(V) : %.2f\"%E2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage E2(V) : 14.00\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb new file mode 100644 index 00000000..b7f5147f --- /dev/null +++ b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb @@ -0,0 +1,292 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12:Measurement of Non-Electrical Quantities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1,Page No:600" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Gf = 2; #guage factor \n", + "a = 100*10**6; #stress in N/m**2\n", + "E = 200*10**9; #elasticity of steel in N/m**2\n", + "\n", + "#calculation\n", + "st = (a/float(E)); #strain\n", + "x = Gf*st; # change in guage resistance\n", + "p = (x)*100; #percentage change in resistance in %\n", + "\n", + "#result\n", + "print\"percentage change in resistance %1.1f\"%p,\"%\";\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4,Page No:631" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "water flow rate 0.0586 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D1 = 200*10**-3; # inlet horizontal venturimeter in m\n", + "D2 = 100*10**-3; #throat horizontal enturimeter in m\n", + "h = 220*10**-3; #pressure in m\n", + "Cd = 0.98; #coefficient of discharge \n", + "phg = 13.6; #specific gravity of mercury\n", + "p = 1000; #density of water in kg/m**3\n", + "g = 9.81; #gravitational constant\n", + "pw = 1; #density of water in kg/m**3\n", + "w = 9.81; \n", + "\n", + "\n", + "\n", + "#calculation\n", + "x = (g)*(h)*(phg-pw)*1000; #differential pressure head in N/m**2\n", + "a = 1-((D2/float(D1))**4); #velocity approach factor\n", + "M = 1/(float(math.sqrt(a))); #velocity of approach\n", + "b = math.sqrt(((2*g)/(float(w*p)))*x);\n", + "A2 = (math.pi/float(4))*((D2)**2); #area in m**2\n", + "Q = Cd*M*A2*(b); #discharge through venturimeter in m**3/s\n", + " \n", + "#result\n", + "print'water flow rate %3.4f'%Q,'m**3/s'; \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5,Page No:631" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rate of flow of oil 0.137850 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "D1 = 400*10**-3; #diameter at inlet in m\n", + "D2 = 200*10**-3; #diameter at throat in m\n", + "y = 50*10**-3; #reading of differential manometer in m\n", + "Shl = 13.6; #specific gravity of mercury in U-tube \n", + "Sp = 0.7; #specific gravity of oil in U-tube \n", + "h = 0.92;\n", + "\n", + "#bernoulli's equation\n", + "#p1/w +z1+V1**2=p2/w +z2+V2**2\n", + "#solving we get h+(V1**2/2*g)-(V2**2/2*g)=0\n", + "# calculations\n", + "\n", + "A1 = (math.pi/float(4))*(D1**2); #area in m**2\n", + "A2 = (math.pi/4)*(D2**2); #area in m**2\n", + "a = A2/float(A1); #ratio of areas\n", + "#V1 = a*V2;\n", + "#h+(V1**2/2*g)*(1-(1/4))=0\n", + "V2 = math.sqrt((2*g*h)/(float(1-((a)**2)))); \n", + "Q = A2*V2; #rate of oil flow in m**3/s\n", + "\n", + "#result\n", + "print'rate of flow of oil %f'%Q,'m**3/s';\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6,Page No:633" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in pressure head 4952.073 N/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Q = 0.015; #rate of flow in m**3/s\n", + "D0 = 100*10**-3; #diameter orifice in m\n", + "D1 = 200*10**-3; #diameter of pipe in m\n", + "Cc = 0.6; #coefficient of contraction\n", + "Cd = 0.6; #coefficient of discharge\n", + "E = 1; #thermal expansion factor\n", + "g = 9.81; #gravitational constant \n", + "w = 9810;\n", + "\n", + "#calculations\n", + "A0 = ((math.pi)/float(4))*(D0**2); #area in m**2\n", + "A1 = ((math.pi)/float(4))*(D1**2); #area in m**2\n", + "a = (Cc*A0)/(float(A1)); \n", + "M = math.sqrt(1-((a)**2));\n", + "K = Cd/float(M);\n", + "x = ((Q/float(K*E*A0))**2);\n", + "dp = (x*w/float(2*g)); #difference in pressure head in N/m**2\n", + "\n", + "#result\n", + "print'difference in pressure head %3.3f'%dp,'N/m**2';\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:12.7,Page No:633" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "discharge through the orifice 0.742 m**3/s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "C0 = 0.6; #coefficient of orifice\n", + "Cv = 0.97; #coefficient of discharge\n", + "Qv = 1.2; #flow rate in m**3/s\n", + "\n", + "#calculations\n", + "Q0 = (C0/Cv)*Qv; #discharge through the orifice in m**3/s\n", + "\n", + "#result\n", + "print'discharge through the orifice %3.3f'%Q0,'m**3/s'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example:12.8,Page No:634" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of submarine 25.0 km/h\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "Shl = 13.6; #specific gravity of mercury\n", + "Sl = 1.025; #specific gravity of sea water\n", + "y = 200*10**-3; #reading in m\n", + "g = 9.81; #constant\n", + "\n", + "#calculation\n", + "x = Shl/float(Sl);\n", + "h = (y*((x)-1)); #head\n", + "V = math.sqrt(2*g*h); #velocity of submarine in km/h\n", + "\n", + "#result\n", + "print'velocity of submarine %3.1f'%(V*(18/float(5))),'km/h';" + ] + } + ], + "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.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb b/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb new file mode 100755 index 00000000..7649fb45 --- /dev/null +++ b/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:256c8b99e0e56930e177cf311c8d82ebc12805b19dc6acba2736a9016b128039" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Overview of optical fiber communication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page Number: 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable declaration\n", + "f1 = 100*1e3 #frequency1 = 100KHz\n", + "f2 = 1e9 #frequency2 = 1GHz\n", + "T1 = 1.0/f1 #Time period1 = 0.01ms\n", + "T2 = 1.0/f2 #Time period2 = 1 ns\n", + "\n", + "#calculation\n", + "phi = (0.25)*360.0 # Phase shift(degree)\n", + "\n", + "#result\n", + "print \"Phase shift = \",round(phi),\"Degree\",\"= \",round((round(phi)*math.pi)/180,4), \"radian\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase shift = 90.0 Degree = 1.5708 radian\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page Number: 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable Declaration\n", + "flow=10*1e3 #Lowest frequency\n", + "fhigh=100*1e3 #Highest frequency\n", + "\n", + "#calculation\n", + "bandwidth=fhigh-flow\n", + "\n", + "#result\n", + "print \"Bandwidth=\",bandwidth/1000 ,\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth= 90.0 KHz\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page Number: 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable Declaration\n", + "B = 10*1e6 # Bandwidth of noisy channel 1MHZ\n", + "S_N = 1 # signal to noise ratio is 1\n", + "\n", + "#calculation\n", + "C=B*(math.log(1+S_N)/math.log(2)) #capacity of channel(Mb/s)\n", + "\n", + "#result\n", + "print \"Capacity of channel =\",C/(10*1e6),\"Mb/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of channel = 1.0 Mb/s\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5, Page Number: 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable Declaration\n", + "fLow = 3*1e6 #low frequency = 3MHz\n", + "fHigh = 4*1e6 #high frequency = 4MHz\n", + "SNR_dB = 20 #signal to noise ratio 20 dB\n", + "\n", + "#calculation\n", + "B = fHigh-fLow #Bandwidth(MHz)\n", + "S_N = 10**(SNR_dB/10)\n", + "C = B*(math.log(1+S_N)/math.log(2)) #capacity of channel(Mb/s)\n", + "\n", + "#result\n", + "print \"Capacity of channel=\",round(C/(1e6),1),\"Mb/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of channel= 6.7 Mb/s\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page Number: 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable Declaration\n", + "P1 = 1 # Let p1 be 1 watt\n", + "P2 = P1*0.5 # P2 is half of p1 so 1/2\n", + "\n", + "#calculation\n", + "Atten_dB = 10*(math.log(P2/P1)/math.log(10)) #attenuation or loss of power(dB)\n", + "\n", + "#result\n", + "print \"Attenuation loss =\",round(Atten_dB,0), \"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation loss = -3.0 dB\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Page Number: 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable Declaration\n", + "Loss_line1 = -9 #attenuation of signal between point 1 to 2 = 9 dB\n", + "Amp_gain2 = 14 #Amplification of signal between point 2 to 3 = 14 dB\n", + "Loss_line3 = -3 #attenuation of signal between point 3 to 4 = 3 dB\n", + "\n", + "#calculation\n", + "dB_at_line4 = Loss_line1+Amp_gain2+Loss_line3 #power gain\n", + "\n", + "#result\n", + "print \"Power gain for a signal travelling from point1 to another point4 = \",dB_at_line4, \"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for a signal travelling from point1 to another point4 = 2 dB\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb new file mode 100644 index 00000000..505cf999 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb @@ -0,0 +1,234 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 Nuclear Sturcture and Radioactivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_1 pgno:25" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Half life of radioactive nuclide=t1/2=minutes 14.7674928978\n", + "\n", + "Time required for the activity to decrease to 25percent of the initial activity=t1=minutes 68.0335182976\n", + "\n", + "Time required for the activity to decrease to 10percent of the initial activity=t2=minutes 113.001227913\n" + ] + } + ], + "source": [ + "from math import log\n", + "N0=3396.;#no. of counts per minute given by radioactive nuclide at a given time#\n", + "N=1000.;#no. of counts per minute given by radioactive nuclide one hour later#\n", + "thalf=0.693*60/(2.303*log(N0/N));#half life of nuclide in minutes#\n", + "print'Half life of radioactive nuclide=t1/2=minutes',thalf\n", + "t1=2.303*log(100/25)*thalf/0.693;#time required for the activity to decrease to 25% of the initial activity in minutes#\n", + "print'\\nTime required for the activity to decrease to 25percent of the initial activity=t1=minutes',t1\n", + "t2=2.303*log(100/10)*thalf/0.693;#time required for the activity to decrease to 10% of the initial activity in minutes#\n", + "print'\\nTime required for the activity to decrease to 10percent of the initial activity=t2=minutes',t2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_2 pgno:27" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Half life of 226Ra molecule=t1/2=years 1584.62090409\n" + ] + } + ], + "source": [ + "R=3.7*10**10;#no. of alpha particles per second emitted by 1g of 226Ra#\n", + "N=(6.023*10**23)/226;#no. of atoms of 226Ra#\n", + "yr=3.15*10**7;#no of seconds in a year#\n", + "thalf=0.693*N/(R*yr);#half life of 226Ra in years#\n", + "print'Half life of 226Ra molecule=t1/2=years',thalf#here the answer written in textbook is wrongly printed actual answer will be the one we are getting here#\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_3 pgno:29" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams 0.113352495089\n" + ] + } + ], + "source": [ + "thalf=14.8*60*60;#half life of 24Na atom in seconds#\n", + "L=6.023*10**23;#Avagadro number#\n", + "v=3.7*10**10;#1 Ci of radioactivity in disintegrations per second#\n", + "w=(24*10**6*v*thalf)/(0.693*L);#weight of 1 Ci of 24Na in grams#\n", + "print'Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams',w\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_4 pgno:30" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dM value of H atom=dM=amu 0.00239\n", + "\n", + "Binding energy of H atom=BE=MeV 2.22509\n" + ] + } + ], + "source": [ + "Mp=1.00728;#mass of proton in amu#\n", + "Mn=1.00866;#mass of neutronin amu#\n", + "MH=2.01355;#isotopic mass of H atom in amu#\n", + "dM=((1*Mp)+(1*Mn)-MH);#dM value of H atom in amu#\n", + "print'dM value of H atom=dM=amu',dM\n", + "BE=dM*931;#binding energy of H atom in MeV#\n", + "print'\\nBinding energy of H atom=BE=MeV',BE\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_5 pgno:32" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Age of the specimen=t=%fyears 36120.0499843\n" + ] + } + ], + "source": [ + "from math import log\n", + "N0=15.3;#decay rate of Contemporary Carbon in disintegrations/min/gram#\n", + "N=2.25;#decay rate of 14C specimen in disintegrtions/min/gram#\n", + "thalf=5670.;#half life of nuclide in years#\n", + "t=2.303*log(N0/N)*thalf/0.693;#Age of the specimen in years#\n", + "print'Age of the specimen=t=years',t#here the answer given in textbook is actually wrong we get twice that of the answer which is shown through execution#\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_6 pgno:33" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium\n", + "\n", + "N0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\n", + "Since N is proportional to 1,N0 is proportional to 1.0523.\n", + "\n", + "Age of the mineral=t=years=7.62*10**8years 762356478.526\n" + ] + } + ], + "source": [ + "from math import log\n", + "thalf=4.5*10**9;#half life of Uranium in years#\n", + "print'Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium'\n", + "print'\\nN0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\\nSince N is proportional to 1,N0 is proportional to 1.0523.'\n", + "N0=1.0523;\n", + "N=1;\n", + "t=2.303*log(N0/N)*thalf/0.693;#Age of the mineral in years#\n", + "print'\\nAge of the mineral=t=years=7.62*10**8years',t#here also the answer given in textbook is wrong the one resulted through execution is the right one#\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/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb new file mode 100755 index 00000000..0e2a1db4 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb @@ -0,0 +1,227 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Imperfection in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1 pgno:56" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.1\n", + "\n", + "\n", + " Equilibrium number of vacancies/m**3 is for 1273K 2.18444488963e+25\n" + ] + } + ], + "source": [ + "# given that\n", + "Na=6.023*10**23 #Avogadro No.\n", + "rho=8.4e6 #Density of Copper in g/m**3\n", + "A=63.5 #Atomic weight of Copper\n", + "Qv=0.9 #Activation energy in eV\n", + "k=8.62*10**-5 #Boltzmann Constant in eV/K\n", + "T=1000+273#Temperature in K\n", + "from math import exp\n", + "print\"Example 5.1\\n\"\n", + "N=Na*rho/A #No. of atomic site per cubic meter\n", + "Nv=N*exp(-Qv/(k*T))\n", + "print\"\\n Equilibrium number of vacancies/m**3 is for 1273K\",Nv\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 pgno:57" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 5.3\n", + "\n", + "\n", + " Atomic of Al is 98.7039833218\n", + "\n", + " Atomic of Cu is 1.29601667817\n" + ] + } + ], + "source": [ + "# given that\n", + "C_Al=97. #Aluminium wt%\n", + "C_Cu=3. #Copper wt%\n", + "A_Al=26.98 #Atomic wt of Aluminium\n", + "A_Cu=63.55 #Atomic wt of Copper\n", + "\n", + "print\" Example 5.3\\n\"\n", + "CAl=C_Al*A_Cu*100/((C_Al*A_Cu)+(C_Cu*A_Al))\n", + "CCu=C_Cu*A_Al*100/((C_Cu*A_Al)+(C_Al*A_Cu))\n", + "print\"\\n Atomic of Al is\",CAl\n", + "print\"\\n Atomic of Cu is\",CCu\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_4 pgno:58" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4\n", + "\n", + "\n", + " Number of Schottky defects are defects/m**3. 5.31422380078e+19\n" + ] + } + ], + "source": [ + "# given that\n", + "Na=6.023*10**23 #Avogadro No.\n", + "rho=1.955 #Density of KCl in g/cm**3\n", + "A_k= 39.10 #Atomic weight of potassium in g/mol\n", + "A_cl= 35.45 #Atomic weight of Chlorine in g/mol\n", + "Qs=2.6 #Activation energy in eV\n", + "k=8.62*10**-5 #Boltzmann Constant in eV/K\n", + "T=500+273 #Temperature in K\n", + "from math import exp\n", + "\n", + "print\"Example 5.4\\n\"\n", + "A = A_k+A_cl # Molar mass of KCl in gram\n", + "N=Na*rho*1e6/A #No. of atomic site per cubic meter\n", + "Ns=N*exp(-Qs/(2*k*T))\n", + "print\"\\n Number of Schottky defects are defects/m**3.\",Ns\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_6 pgno:58" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.6\n", + "\n", + "\n", + " Part A\n", + "\n", + " Grain size number is \n", + "6.49185309633\n", + "\n", + " Part B\n", + "\n", + " At magnification of 85x\n", + "\n", + " Number of grains per inch square are\n", + "62.2837370242\n" + ] + } + ], + "source": [ + "# given that \n", + "N=45. #Number of grains per square inch\n", + "M=85. # magnification\n", + "from math import log\n", + "print\"Example 5.6\\n\"\n", + "print\"\\n Part A\"\n", + "n=(log(N)/log(2))+1 #calculation for grain size no. N=2**(n-1)\n", + "print\"\\n Grain size number is \\n\",n\n", + "print\"\\n Part B\"\n", + "Nm=(100/M)**2*2**(n-1)\n", + "print\"\\n At magnification of 85x\\n\"\n", + "print\" Number of grains per inch square are\\n\",Nm\n", + "# answer in book is 62.6. It is because of rounding off at intermediate stages\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb new file mode 100755 index 00000000..0e2a1db4 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb @@ -0,0 +1,227 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 Imperfection in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1 pgno:56" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.1\n", + "\n", + "\n", + " Equilibrium number of vacancies/m**3 is for 1273K 2.18444488963e+25\n" + ] + } + ], + "source": [ + "# given that\n", + "Na=6.023*10**23 #Avogadro No.\n", + "rho=8.4e6 #Density of Copper in g/m**3\n", + "A=63.5 #Atomic weight of Copper\n", + "Qv=0.9 #Activation energy in eV\n", + "k=8.62*10**-5 #Boltzmann Constant in eV/K\n", + "T=1000+273#Temperature in K\n", + "from math import exp\n", + "print\"Example 5.1\\n\"\n", + "N=Na*rho/A #No. of atomic site per cubic meter\n", + "Nv=N*exp(-Qv/(k*T))\n", + "print\"\\n Equilibrium number of vacancies/m**3 is for 1273K\",Nv\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 pgno:57" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Example 5.3\n", + "\n", + "\n", + " Atomic of Al is 98.7039833218\n", + "\n", + " Atomic of Cu is 1.29601667817\n" + ] + } + ], + "source": [ + "# given that\n", + "C_Al=97. #Aluminium wt%\n", + "C_Cu=3. #Copper wt%\n", + "A_Al=26.98 #Atomic wt of Aluminium\n", + "A_Cu=63.55 #Atomic wt of Copper\n", + "\n", + "print\" Example 5.3\\n\"\n", + "CAl=C_Al*A_Cu*100/((C_Al*A_Cu)+(C_Cu*A_Al))\n", + "CCu=C_Cu*A_Al*100/((C_Cu*A_Al)+(C_Al*A_Cu))\n", + "print\"\\n Atomic of Al is\",CAl\n", + "print\"\\n Atomic of Cu is\",CCu\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_4 pgno:58" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.4\n", + "\n", + "\n", + " Number of Schottky defects are defects/m**3. 5.31422380078e+19\n" + ] + } + ], + "source": [ + "# given that\n", + "Na=6.023*10**23 #Avogadro No.\n", + "rho=1.955 #Density of KCl in g/cm**3\n", + "A_k= 39.10 #Atomic weight of potassium in g/mol\n", + "A_cl= 35.45 #Atomic weight of Chlorine in g/mol\n", + "Qs=2.6 #Activation energy in eV\n", + "k=8.62*10**-5 #Boltzmann Constant in eV/K\n", + "T=500+273 #Temperature in K\n", + "from math import exp\n", + "\n", + "print\"Example 5.4\\n\"\n", + "A = A_k+A_cl # Molar mass of KCl in gram\n", + "N=Na*rho*1e6/A #No. of atomic site per cubic meter\n", + "Ns=N*exp(-Qs/(2*k*T))\n", + "print\"\\n Number of Schottky defects are defects/m**3.\",Ns\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_6 pgno:58" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Example 5.6\n", + "\n", + "\n", + " Part A\n", + "\n", + " Grain size number is \n", + "6.49185309633\n", + "\n", + " Part B\n", + "\n", + " At magnification of 85x\n", + "\n", + " Number of grains per inch square are\n", + "62.2837370242\n" + ] + } + ], + "source": [ + "# given that \n", + "N=45. #Number of grains per square inch\n", + "M=85. # magnification\n", + "from math import log\n", + "print\"Example 5.6\\n\"\n", + "print\"\\n Part A\"\n", + "n=(log(N)/log(2))+1 #calculation for grain size no. N=2**(n-1)\n", + "print\"\\n Grain size number is \\n\",n\n", + "print\"\\n Part B\"\n", + "Nm=(100/M)**2*2**(n-1)\n", + "print\"\\n At magnification of 85x\\n\"\n", + "print\" Number of grains per inch square are\\n\",Nm\n", + "# answer in book is 62.6. It is because of rounding off at intermediate stages\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb new file mode 100644 index 00000000..38d38099 --- /dev/null +++ b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb @@ -0,0 +1,299 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 Wave Guides" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_1 pgno:75" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Critical wavelength = cm\n", + "15.24\n", + "-Guide wavelength = cm 13.3\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "c=3.*(10**8);\n", + "f=3000.*(10**8);\n", + "lo=c/f;\n", + "l=lo*(10**4);\n", + "m=1.;n=0;a=7.62;\n", + "lc=2*a;\n", + "print\"-Critical wavelength = cm\\n\",lc\n", + "lg=sqrt((l*l*lc*lc)/((lc*lc)-(l*l)));\n", + "print\"-Guide wavelength = cm\",round(lg*10)/10\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_2 pgno:76" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency of dominant mode = GHz 5.0\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "a=3;\n", + "lc=2*a;\n", + "Zs=500;n=377;c=3*(10**8);\n", + "lo=sqrt(1-((n/Zs)**2))*lc;\n", + "f=c/lo;\n", + "f1=f/(10**7);\n", + "print\"Frequency of dominant mode = GHz\",round(f1*100)/100\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_3 pgno:78" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i)Cutoff wavelegth = cm\n", + "9.0\n", + "(ii)Guide wavelength = cm\n", + "3.59\n", + "(iii)Phase velocity = * 10**8 m/sec\n", + "3.23\n", + " Group velocity = * 10**8 m/sec\n", + "2.79\n", + "(iv)Characteristic impedance = ohm 406.0\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "a=4.5;b=3.;f=9.*(10**9);c=3.0*(10**8);n=377.\n", + "lo=c/f;\n", + "l=lo*(10**2);\n", + "lc=2*a;\n", + "print\"(i)Cutoff wavelegth = cm\\n\",lc\n", + "lg=l /(sqrt(1-((l/lc)**2)));\n", + "print\"(ii)Guide wavelength = cm\\n\",round(lg*100)/100\n", + "Vp=(lg/l)*c*10**-8;\n", + "print\"(iii)Phase velocity = * 10**8 m/sec\\n\",round(Vp*100)/100\n", + "Vg=(l/lg)*c*10**-8;\n", + "print\" Group velocity = * 10**8 m/sec\\n\",round(Vg*100)/100\n", + "Z=n/(sqrt(1-((l/lc)**2)));\n", + "print\"(iv)Characteristic impedance = ohm\",round(Z)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_4 pgno:79" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total attenuation = db 681.88\n", + "The difference in result is due to erroneous value in textbook\n" + ] + } + ], + "source": [ + "a=1.;c=3.*(10**8);f=(10**9);d=25.;\n", + "lc=2*a;\n", + "lo=c/f;\n", + "l=lo/(10**2);\n", + "att=(54.55/lc)*d;\n", + "print\"Total attenuation = db\",round(att*100)/100\n", + "#the difference in result is due to erroneous value in textbook.\n", + "print (\"The difference in result is due to erroneous value in textbook\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_5 pgno:80" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Phase velocity Vp = * 10**8 m/sec\n", + "4.2\n", + "-Group velocity Vg = * 10**8 m/sec\n", + "2.2\n", + "-Phase constant = radians/m 45.0\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "c=3.*(10**8);f=3000.*(10**6);a=.0722;\n", + "lo=c/f;\n", + "lc=2*a;\n", + "lg=lo/(sqrt(1-((lo/lc)**2)));\n", + "Vp=(lg/lo)*c*10**-8;\n", + "print\"-Phase velocity Vp = * 10**8 m/sec\\n\",round(Vp*10)/10\n", + "Vg=(lo/lg)*c*10**-8;\n", + "print\"-Group velocity Vg = * 10**8 m/sec\\n\",round(Vg*10)/10\n", + "b=(2*pi)/lg;\n", + "print\"-Phase constant = radians/m\",round(b)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_6 pgno:81" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i)Cutoff frequency for TE11 = GHz\n", + "3.52\n", + "(ii)Cutoff frequency for TE01 = GHz 4.6\n" + ] + } + ], + "source": [ + "\n", + "d=5.;c=3.*(10**8);\n", + "lo=1.706*d;\n", + "f=c/lo;\n", + "ff=f/(10**7);\n", + "print\"(i)Cutoff frequency for TE11 = GHz\\n\",round(ff*100)/100\n", + "l=1.306*d;\n", + "fc=c/l;\n", + "ffc=fc/(10**7);\n", + "print\"(ii)Cutoff frequency for TE01 = GHz\",round(ffc*10)/10\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_7 pgno:82" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-Cutoff wavelength = cm\n", + "8.54\n", + "-Guide wavelength = cm\n", + "4.17\n", + "-Characteristic wave impedance = ohm 419.7\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "c=3.*(10**8);f=8.*(10**9);r=2.5;h=1.84;n=377.;\n", + "l=c/f;\n", + "lo=l*(10**2);\n", + "lc=2*pi*r/h;\n", + "print\"-Cutoff wavelength = cm\\n\",round(lc*100)/100\n", + "lp=lo/(sqrt(1-((lo/lc)**2)));\n", + "print\"-Guide wavelength = cm\\n\",round(lp*100)/100\n", + "Zo=n/(sqrt(1-((lo/lc)**2)));\n", + "print\"-Characteristic wave impedance = ohm\",round(Zo*10)/10\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/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb new file mode 100755 index 00000000..a79c8bcb --- /dev/null +++ b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb @@ -0,0 +1,307 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 Mechanical Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1 pgno:151" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value in psi is= 4992.60678261\n", + "The value of epselon 0.0005\n" + ] + } + ], + "source": [ + "from math import pi\n", + "F=1000#in lb\n", + "Ao=(pi/4)*(0.505)**2#in**2\n", + "rho=F/Ao\n", + "delta_I=0.001#in\n", + "I_o=2#in\n", + "e=delta_I/I_o\n", + "print\"The value in psi is=\",rho\n", + "print\"The value of epselon\",e" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2 pgno:152" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1 The required crosssectional area of the rod in in^2:\n", + "1.1283791671 Diameter of rod in in:\n", + "0.000625 The maximum length of the rod in in:\n", + "100.0 The minimum strain allowed on rod:\n", + "2 The minimum cross-sectional area in in^2:\n" + ] + } + ], + "source": [ + "#EXAMPLE 6.2\n", + "#page 152\n", + "# Initialisation of Variables\n", + "F=45000;#Force applied on an aluminum rod in lb\n", + "e=25000;#the maximum allowable stress on the rod in psi\n", + "l2=150;#the minimum length of the rod in in\n", + "e1=0.0025;#The strain appiled on rod\n", + "sigma=16670;#Stress applied on rod in psi\n", + "L=0.25;#The maximum allowable elastic deformation in in\n", + "from math import sqrt,pi\n", + "#CALCULATIONS\n", + "Ao1=F/e;#The required crosssectional area of the rod\n", + "d=sqrt((Ao1*4)/pi);#Diameter of rod in in\n", + "l1=e1*L;#The maximum length of the rod in in\n", + "e2=L/e1;#The minimum strain allowed on rod\n", + "Ao2=F/sigma;#The minimum cross-sectional area in in^2\n", + "print Ao1,\"The required crosssectional area of the rod in in^2:\"\n", + "print d,\"Diameter of rod in in:\"\n", + "print l1,\"The maximum length of the rod in in:\"\n", + "print e2,\"The minimum strain allowed on rod:\"\n", + "print Ao2,\"The minimum cross-sectional area in in^2:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_3 pgno:154" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10000000.0 Modulus of elasticity of aluminum alloy from table 6-1:\n", + "50.15 The length after deformation of bar in in\n", + "0.003 Strain applied of aluminum alloy:\n" + ] + } + ], + "source": [ + "#EXAMPLE 6.3\n", + "# Initialisation of Variables\n", + "sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1\n", + "e1=0.0035;##Strain applied of aluminum alloy from table 6-1\n", + "sigma2=30000;#Stress applied of aluminum alloy in psi\n", + "Lo=50;#initial length of aluminum alloy\n", + "#CALCULATIONS\n", + "E=sigma1/e1;#Modulus of elasticity of aluminum alloy\n", + "e2=sigma2/E;#Strain applied of aluminum alloy\n", + "L=Lo+(e2*Lo);#The length after deformation of bar in in\n", + "print E,\"Modulus of elasticity of aluminum alloy from table 6-1:\"\n", + "print L,\"The length after deformation of bar in in\"\n", + "print e2,\"Strain applied of aluminum alloy:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4 pgno:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "9.75 Percentage of Elongation:\n", + "37.8868738359 Percentage of Reduction in area:\n", + "The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\n" + ] + } + ], + "source": [ + "#EXAMPLE 6.4\n", + "# Initialisation of Variables\n", + "Lf=2.195;#Final length after failure\n", + "d1=0.505;#Diameter of alluminum alloy in in\n", + "d2=0.398;#Final diameter of alluminum alloy in in\n", + "Lo=2;#Initial length of alluminum alloy \n", + "from math import pi\n", + "#CALCULATIONS\n", + "A0=(pi/4)*d1**2;#Area of original of alluminum alloy\n", + "Af=(pi/4)*d2**2;#Area of final of alluminum alloy\n", + "E=((Lf-Lo)/Lo)*100;#Percentage of Elongation \n", + "R=((A0-Af)/A0)*100;#Percentage of Reduction in area\n", + "print E,\"Percentage of Elongation:\"\n", + "print R,\"Percentage of Reduction in area:\"\n", + "print\"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_5 pgno:155" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "39940.8542609 Engineering stress in psiAt the tensile or maximum load\n", + "41237.025201 True stress in psi At the tensile or maximum load\n", + "0.06 Engineering strain At the tensile or maximum load\n", + "0.058268908124 True strain At the tensile or maximum load\n", + "37943.8115478 Engineering stress At fracture:\n", + "61088.2335041 True stress At fracture\n", + "0.1025 Engineering strain At fracture:\n", + "0.476212847982 True strain At fracture:\n" + ] + } + ], + "source": [ + "#EXAMPLE 6.5\n", + "# Initialisation of Variables\n", + "F=8000.;#.......#Load applied for the aluminum alloy in lb\n", + "F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture\n", + "dt1=0.505;#.......#diameter of for the aluminum alloy in in\n", + "dt2=0.497;#.......#The diameter at maximum load\n", + "Lt=2.120;#..........#Final length at maxium load\n", + "Lot=2.;#.............#Initial length of alluminum alloy\n", + "Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb\n", + "df=0.398;#.......#The diameter at maximum load after fracture\n", + "Lf=0.205;#.......#Final length at fracture\n", + "from math import pi,log\n", + "#CALCULATIONS\n", + "Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load\n", + "Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load\n", + "Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load\n", + "Te=log(Lt/Lot);#........#True strain At the tensile or maximum load\n", + "Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:\n", + "Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:\n", + "Ee2=Lf/Lot;#..........#Engineering strain At fracture:\n", + "Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:\n", + "print Es,\"Engineering stress in psiAt the tensile or maximum load\"\n", + "print Ts,\"True stress in psi At the tensile or maximum load\"\n", + "print Ee,\"Engineering strain At the tensile or maximum load\"\n", + "print Te,\"True strain At the tensile or maximum load\"\n", + "print Es2,\"Engineering stress At fracture:\"\n", + "print Ts2,\"True stress At fracture\"\n", + "print Ee2,\"Engineering strain At fracture:\"\n", + "print Te2,\"True strain At fracture:\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_6 pgno:156" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "421.875 The force required to fracture the material in lb:\n", + "0.0277777777778 The deflection of the sample at fracture in in\n" + ] + } + ], + "source": [ + "#EXAMPLE 6.6\n", + "# Initialisation of Variables\n", + "Fs=45000;#.......#The flexural strength of a composite material in psi\n", + "Fm=18*10**6;#........#The flexural modulus of composite material in psi\n", + "w=0.5;#.......#wide of sample in in\n", + "h=0.375;#......#Height of sample in in\n", + "l=5;#..........#Length of sample in in\n", + "#CALCULATIONS\n", + "F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb\n", + "delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture \n", + "print F,\"The force required to fracture the material in lb:\"\n", + "print delta,\"The deflection of the sample at fracture in in\"\n" + ] + }, + { + "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/sample_notebooks/sanketkhair/chapter4.ipynb b/sample_notebooks/sanketkhair/chapter4.ipynb new file mode 100644 index 00000000..f35bbbba --- /dev/null +++ b/sample_notebooks/sanketkhair/chapter4.ipynb @@ -0,0 +1,159 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:01140ffa208fb1ff4e49e5a80a5419f4194d3a8c5f0baf26d8febde3805a9450" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Optical Detectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1,Page number 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tn=5; #in micrometer\n", + "Vs=10**7; #in m/s\n", + "tr=Tn*10**-6/Vs;\n", + "print\"Response time\",tr/10**-12,\"ps\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Response time 0.5 ps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2,Page number 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "\n", + "Pd=1.15; #in mW\n", + "\n", + "TA=25; #in deg C\n", + "theta_JA=200; #in C/W for hermetric led\n", + "TJ=TA+theta_JA*Pd/10**3;\n", + "TF=8.01*10**12 *math.e**-(8111/(TJ+273));\n", + "print\"Value of TJ is\" ,round(TJ,4), \"deg C\";\n", + "print\"Value of TF is\" ,round(TF,4), \"deg C\";\n", + "\n", + "BF=1.1*10**-3; #from table\n", + "QF=0.5; #from table\n", + "EF=1; #from table\n", + "RF=BF*TF*EF*QF*1/10**6;\n", + "print\"Value of RF\",\"{0:.3e}\".format(RF);\n", + "print\"Value of MTBF is \",round(1/RF/10**6,4),\"*10^6 hours \\n\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of TJ is 25.23 deg C\n", + "Value of TF is 12.3614 deg C\n", + "Value of RF 6.799e-09\n", + "Value of MTBF is 147.0849 *10^6 hours \n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3,Page number 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R1=0.7;\n", + "R2=0.99;\n", + "ad=0.1;\n", + "\n", + "Ld=1-R1*R2*math.e**-(2*ad);\n", + "print\"Decay Loss \",round(Ld,4);\n", + "trt=40; #fs\n", + "tph=trt/Ld;\n", + "print\"Photon lifetime \",round(tph,4),\"fs\";\n", + "BW=1/tph;\n", + "print\"Bandwidth\",round(BW*1000,4) ,\"Thz\"; #Answer in Thz \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decay Loss 0.4326\n", + "Photon lifetime 92.46 fs\n", + "Bandwidth 10.8155 Thz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb b/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb new file mode 100755 index 00000000..91657135 --- /dev/null +++ b/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb @@ -0,0 +1,116 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a87b776675d5bac90b6fac25c1a236bc0e485ed79b01767e8b8d1e2b69104021" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 2- Mechanical Behavior, Testing, and Manufacturing Properties of Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.1 - PG NO. 63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.1,chapter 2, page 63\n", + "\n", + "# Given that\n", + "#True stress=100000*(True strain)**0.5\n", + "\n", + "# Sample Problem on page no. 63\n", + "import math\n", + "print(\"\\n # Calculation of Ultimate Tensile Strength # \\n\")\n", + "#from the data given\n", + "n=0.5\n", + "E=0.5\n", + "K=690.\n", + "Truestress=K*((E)**n)\n", + "#let An(area of neck)/Ao=t\n", + "#from math.log(Ao/An)=n\n", + "print'%s %d %s' %(\"true Ultimate Tensile Strength =\",round(Truestress),\"MPa \\n\")\n", + "t=math.exp(-n)\n", + "UTS=Truestress*math.exp(-n)#from the math.expression UTS= P/Ao where P(Maximum Load)=Truestress*An\n", + "print'%s %d %s' %(\"Ultimate Tensile Strength =\",round(UTS),\"MPa\")\n", + "#answer in the book is approximated to 42850 psi \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + " # Calculation of Ultimate Tensile Strength # \n", + "\n", + "true Ultimate Tensile Strength = 488 MPa \n", + "\n", + "Ultimate Tensile Strength = 296 MPa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 2.2 - PG NO. 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.1,chapter 2, page 72\n", + "\n", + "print(\"## Calculation of Modulus of Resilience from Hardness ##\\n\")\n", + "#given data\n", + "Hardness=300.\n", + "Y=100.#\n", + "E=210000.\n", + "a=100.*100.\n", + "b=2.*210000.\n", + "Modulus=a/b\n", + "print(\"The area under the stress-strain curve is :\\n\")\n", + "print'%s %.4f %s' %(\"Modulus of Resilience =\",Modulus*9.81,\"mm-kg/mm^3\")" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "## Calculation of Modulus of Resilience from Hardness ##\n", + "\n", + "The area under the stress-strain curve is :\n", + "\n", + "Modulus of Resilience = 0.2336 mm-kg/mm^3\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/sureshp/CHAPTER1.ipynb b/sample_notebooks/sureshp/CHAPTER1.ipynb new file mode 100755 index 00000000..6c66d92e --- /dev/null +++ b/sample_notebooks/sureshp/CHAPTER1.ipynb @@ -0,0 +1,206 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cb7821e52dda76fa27e45154f9c14ca9fa493fbd763be86cc9be92d018411582" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 1 - Breakdown Mechanism of Gases Liquid and Solid Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.1 - PG NO.51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.1 Page 51\n", + "import math\n", + "I = 600. # micor amps\n", + "x = 0.5 # distance in cm\n", + "V = 10. # kV\n", + "I2 = 60. # micro amps\n", + "x2 = 0.1 # distance in cm \n", + "#Calculation 600 = I0*exp(0.5*alpha) and 60 = I0*exp(0.1*alpha)\n", + "alpha =math.log(600./60.)/(0.5-0.1)\n", + "print'%s %.3f %s' %(\"Townsends first ionising coefficient = \",alpha,\" ionizing collisions/cm\")\n", + "\n", + "#Answers may vary due to round of error \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Townsends first ionising coefficient = 5.756 ionizing collisions/cm\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.2 - PG NO.52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.2 Page 52\n", + "import math\n", + "# Refering the table in example 1.2\n", + "# slope between any two points (math.log(I/I0)/x)\n", + "# taking the gap between 2 and 2.5 mm\n", + "I1= 1.5*10**-12\n", + "I2= 5.6*10**-12\n", + "I0 = 6*10**-14\n", + "gi1 = math.log(I1/I0) # gradual increase when gap is 2\n", + "gi2 = math.log(I2/I0) # gradual increase when gap is 2.5 #claculation in text is wrong\n", + "slope = (gi1-gi2)/0.05\n", + "print'%s %.3f %s' %(\"Slope = \", -slope,'\\n') \n", + "#evaluvating ghama\n", + "e1 = math.exp(-slope*0.5)\n", + "e2 = math.exp(-slope*0.5) # -1 is ignored due to the large magnitude\n", + "ghama = (7*10**7-6*e1)/(e2*7*10**7)\n", + "print'%s %.3f %s' %(\"Ghama for set 1= \", ghama*100000,\"*10^-5 /cm \\n \")\n", + "#Gap between the slope for set 2\n", + "alpha = math.log(12./8.)/0.05\n", + "print'%s %.1f %s' %(\"Alpha = \", alpha,\" collosions/cm \\n\")\n", + "e1 = math.exp(alpha*0.5)\n", + "e2 = math.exp(alpha*0.5) # -1 is ignored due to the large magnitude\n", + "ghama = (2*10**5-e1)/(e2*2*10**5)\n", + "print'%s %.1f %s' %(\"Ghama for set 2=\", ghama*100,\"*10^-2 colissions/cm \\n\")\n", + "\n", + "#Answers may vary due to round of error \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slope = 26.346 \n", + "\n", + "Ghama for set 1= 0.182 *10^-5 /cm \n", + " \n", + "Alpha = 8.1 collosions/cm \n", + "\n", + "Ghama for set 2= 1.7 *10^-2 colissions/cm \n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.3 - PG NO.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.3 Page 53\n", + "\n", + "#employing equation Vb = K*d**n\n", + "#88 = K*4**n --- eq(1) 165 = K*8**n ---eq(2) \n", + "#dividing eq(2)/q(1)\n", + "Vb1 = 88.\n", + "Vb2 = 165.\n", + "n1 = 0.6286/0.693\n", + "K1 = Vb1/4**n1\n", + "#135 = K*6**n --- eq(1) 212 = K*10**n ---eq(2) \n", + "#dividing eq(2)/q(1) \n", + "Vb1 = 135.\n", + "Vb2 = 212.\n", + "n2 = 0.4513/0.5128\n", + "K2 = Vb1/6.**n2\n", + "n = (n1+n2)/2.\n", + "K = (K1+K2)/2.\n", + "print'%s %.2f %s %.2f' % (\"n =\",n,\"K = \",K,)\n", + "\n", + "#Answer may vary due to round of error \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "n = 0.89 K = 26.46\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 1.4 - PG NO.53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Chapter 1,Example 1.4 Page 53\n", + "# Determine (pd)min Vbmin\n", + "import math\n", + "A = 12.\n", + "B = 365.\n", + "e = 2.718\n", + "ghama = 0.02\n", + "K = 51.\n", + "pd = (e/A)*math.log(1.+(1./ghama))\n", + "Vbmin = (B/A)*e*math.log(K)\n", + "print'%s %.2f %s %d %s' % (\"(pd)min = \",pd,\" Vbmin = \",Vbmin,\"Volts\")\n", + "\n", + "#Answers may vary due to round of error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(pd)min = 0.89 Vbmin = 325 Volts\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb b/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb new file mode 100755 index 00000000..f655751e --- /dev/null +++ b/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 Fundamentals of Fault Clearing and Switching Phenomena" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_1 pgno:24" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the transient current =A 1.56\n" + ] + } + ], + "source": [ + "from math import pi,exp\n", + "from math import atan,sin\n", + "from math import sqrt\n", + "R=10; \n", + "L=0.1; \n", + "f=50; \n", + "w=2*pi*f; \n", + "k=sqrt((R**2)+((w*L)**2));\n", + "angle=atan(w*L/R);\n", + "E=400 \n", + "A=E*sin(angle)/k;\n", + "i=A*exp((-R)*.02/L);\n", + "i=round(i*100)/100;\n", + "print\"the transient current =A\",i\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2 pgno:26" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current in amperes for part1=A\n", + "4.1\n", + "current in part 2& part 3= 0\n", + "\n", + "the DC component vanishes if e=V 141.4\n", + "\n", + "current at .5 cycles for t1=sec \n", + "current in the problem = A 0.01 1.50368424845\n", + "\n", + "current at 1.5 cycles for t2=sec \n", + "current in the problem = A 0.03 0.203501533662\n", + "\n", + "current at 5.5 cycles for t3=sec \n", + "current in the problem = A 0.11 6.82671592646e-05\n", + "the difference in result is due to erroneous value in textbook.\n" + ] + } + ], + "source": [ + "from math import sqrt,sin,atan,pi,exp\n", + "R=10; \n", + "L=0.1; \n", + "f=50; \n", + "w=2*pi*f; \n", + "k=sqrt((R**2)+((w*L)**2));\n", + "angle=atan(w*L/R); \n", + "E=100; \n", + "Em=sqrt(2)*E; \n", + "A=Em*sin(angle)/k;\n", + "i1=A; \n", + "Em=round(Em*10)/10;\n", + "i1=round(i1*10)/10;\n", + "print\"current in amperes for part1=A\\n\",i1\n", + "print\"current in part 2& part 3= 0\\n\"\n", + "print\"the DC component vanishes if e=V\",Em#the error is due to the erroneous values in the textbook\n", + "\n", + "t1=0.5*.02; \n", + "i2=A*exp((-R)*t1/L);\n", + "print\"\\ncurrent at .5 cycles for t1=sec \\ncurrent in the problem = A\",t1,i2\n", + "t2=1.5*.02;\n", + "i3=A*exp((-R)*t2/L);\n", + "print\"\\ncurrent at 1.5 cycles for t2=sec \\ncurrent in the problem = A\",t2,i3\n", + "t3=5.5*.02;\n", + "i4=A*exp((-R)*t3/L);\n", + "print\"\\ncurrent at 5.5 cycles for t3=sec \\ncurrent in the problem = A\",t3,i4\n", + "\n", + "\n", + "print\"the difference in result is due to erroneous value in textbook.\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3 pgno:28" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of oscillations=c/s 72400.0\n", + "\n", + "time of maximum restriking voltage=microsec 3.46\n", + "\n", + "maximum restriking voltage=V/microsecs 2430.0\n" + ] + } + ], + "source": [ + "from math import sqrt,e,pi\n", + "C=.003e-6 \n", + "L=1.6e-3 \n", + "y=sqrt(L*C);\n", + "y=round(y*1e7)/1e7;\n", + "f=(2*3.14*y)**-1; \n", + "f=round(f/100)*100;\n", + "i=7500;\n", + "E=i*2*3.15*L*50;\n", + "Em=1.414*E;\n", + "Em=round(Em/10)*10\n", + "t=y*pi/2;\n", + "t=t*1e6;\n", + "t=round(t*100)/100;\n", + "e=Em/y;\n", + "e=round((e)/1e6)*1e6;\n", + "e=round(e/1e7)*1e7\n", + "print\"frequency of oscillations=c/s\",f\n", + "print\"\\ntime of maximum restriking voltage=microsec\",t\n", + "print\"\\nmaximum restriking voltage=V/microsecs\",e/1e6\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_4 pgno:30" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "peak restriking voltage=kV 18.0\n", + "\n", + "frequency of oscillations=c/s 12637.7514913\n", + "\n", + "average rate of restriking voltage=kV/microsecs 0.455\n", + "\n", + "max restriking voltage=V/microsecs 714.0\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "R=5 \n", + "f=50\n", + "L=R/(2*pi*f);\n", + "V=11e3;\n", + "Vph=11/sqrt(3);\n", + "C=0.01e-6;\n", + "y=sqrt(L*C);\n", + "Em=sqrt(2)*Vph;\n", + "ep=2*Em;\n", + "ep=round(ep*10)/10;\n", + "y=round(y*1e7)/1e7;\n", + "t=y*pi;\n", + "t=round(t*1e7)/1e7\n", + "ea=ep/t;\n", + "ea=round(ea/1e3)*1e3\n", + "fn=(2*3.14*y)**-1;\n", + "Em=round(Em)\n", + "Emax=Em/y;\n", + "Emax=round(Emax/1000)*1e3;\n", + "print\"peak restriking voltage=kV\",ep\n", + "print\"\\nfrequency of oscillations=c/s\",fn\n", + "print\"\\naverage rate of restriking voltage=kV/microsecs\",ea/1e6\n", + "print\"\\nmax restriking voltage=V/microsecs\",Emax/1e3\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_5 pgno:31" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average restriking voltage=V/microsecs 1220.0\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "E=19.1*1e3;\n", + "L=10*1e-3;\n", + "C=.02*1e-6;\n", + "Em=sqrt(2)*E;\n", + "y=sqrt(L*C);\n", + "t=pi*y*1e6;\n", + "emax=2*Em;\n", + "eavg=emax/t;\n", + "eavg=round(eavg/10)*10\n", + "print\"average restriking voltage=V/microsecs\",eavg\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_6 pgno:33" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average restriking voltage=kV/microsecs 4.8\n" + ] + } + ], + "source": [ + "from math import e,sqrt,acos,sin\n", + "V=78e3;\n", + "Vph=V/sqrt(3);\n", + "Em=2*Vph;\n", + "pf=0.4;\n", + "angle=acos(pf);\n", + "k1=sin(angle); \n", + "k1=round(k1*100)/100;\n", + "k2=.951;\n", + "k3=1;\n", + "k=k1*k2*k3;\n", + "k=round(k*1000)/1e3;\n", + "E=k*Em;\n", + "f=15000.; \n", + "t=1/(2*f);\n", + "t=round(t*1e6);\n", + "eavg=2*E/t;\n", + "eavg=round(eavg/100)*100;\n", + "print\"average restriking voltage=kV/microsecs\",eavg/1e3\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_7 pgno:35" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average voltage in volts=V/microsecs 1430.0\n", + "frequency of oscillation =c/s 7143.0\n" + ] + } + ], + "source": [ + "Em=100e3\n", + "t=70e-6\n", + "Ea=Em/t/1e6\n", + "f=1/(2*t);\n", + "Ea=round(Ea/10)*10;\n", + "f=round(f);\n", + "print\"average voltage in volts=V/microsecs\",Ea\n", + "print\"frequency of oscillation =c/s\",f\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_8 pgno:37" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "damping resistance in ohms=kohms 12.25\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "L=6; \n", + "C=0.01e-6;\n", + "i=10;\n", + "v=i*sqrt(L/C);\n", + "R=.5*v/i;\n", + "R=round(R/10)*10;\n", + "print\"damping resistance in ohms=kohms\",R/1e3\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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 +} -- cgit